[
  {
    "path": ".gitattributes",
    "content": "*.js linguist-language=Go\n*.css linguist-language=Go"
  },
  {
    "path": ".github/ISSUE_TEMPLATE",
    "content": "请按照一下格式提交issue，谢谢！\n\n1. 你当前使用的是哪个版本的 MinDoc(`godoc_linux_amd64 version`)?\n\n\n2. 你当前使用的是什么操作系统?\n\n\n3. 你是如何操作的？\n\n\n4. 你期望得到什么结果?\n\n\n5. 当前遇到的是什么结果?"
  },
  {
    "path": ".github/workflows/build.yml",
    "content": "name: Go\n\non:\n  push:\n    branches: [ \"master\" ]\n  pull_request:\n    branches: [ \"master\" ]\n\njobs:\n  build:\n    name: ${{ matrix.config.name }}\n    runs-on: ${{ matrix.config.os }}\n    outputs:\n        tag: ${{ steps.git.outputs.tag }}\n    strategy:\n      fail-fast: false\n      matrix:\n        config: \n          - {\n              name: \"Windows Latest MSVC\",\n              artifact: \"windows\",\n              os: windows-latest\n            }\n          - {\n              name: \"Ubuntu Latest GCC\",\n              artifact: \"linux\",\n              os: ubuntu-latest\n            }\n    steps:\n      - uses: actions/checkout@v3\n\n      - name: Set up Go\n        uses: actions/setup-go@v5\n        with:\n          go-version: 1.24.0\n\n      - name: Build\n        run: |\n          go mod tidy\n          go build -v\n\n      # - name: Test\n      #  run: go test -v ./...\n\n      - name: Upload Artifact\n        uses: actions/upload-artifact@v4\n        with:\n          path: |\n            conf/**/*\n            static/**/*\n            views/**/*\n            mindoc.*\n          name: mindoc-${{ matrix.config.artifact }}-${{ steps.git.outputs.tag }}.7z\n"
  },
  {
    "path": ".gitignore",
    "content": "# Compiled Object files, Static and Dynamic libs (Shared Objects)\n*.o\n*.a\n*.so\n.DS_Store\n# Folders\n_obj\n_test\n\n# Architecture specific extensions/prefixes\n*.[568vq]\n[568vq].out\n\n*.cgo1.go\n*.cgo2.c\n_cgo_defun.c\n_cgo_gotypes.go\n_cgo_export.*\n\n_testmain.go\n\n*.exe\n*.exe~\nmindoc\nmindoc_linux_amd64\nmindoc_linux_musl_amd64\ndatabase/mindoc.db\n*.test\n*.prof\n.idea\n.vscode\n/conf/app.conf\n/vendor\n/runtime\n/uploads/*.*\n!/uploads/.gitkeep\ncalibre-*.txz\n"
  },
  {
    "path": ".travis.yml",
    "content": "os: linux\ndist: focal\n\nlanguage: go\ngo:\n  - \"1.18.1\"\n\narch:\n- amd64\n\nenv:\n- GO111MODULE=on CGO_ENABLED=1\n\ninstall:\n  - go mod tidy -v\n\nbefore_install:\n  - whereis gcc\n  - go env\n\nscript:\n  - go build -o mindoc_linux_amd64 -ldflags \"-w\"\n  - cp conf/app.conf.example conf/app.conf\n  - ./mindoc_linux_amd64 version\n  - rm conf/app.conf\n\nbefore_deploy:\n  - go mod tidy -v && GOARCH=amd64 GOOS=linux go build -v -o mindoc_linux_amd64 -ldflags=\"-w -X 'github.com/mindoc-org/mindoc/conf.VERSION=$TRAVIS_TAG' -X 'github.com/mindoc-org/mindoc/conf.BUILD_TIME=`date`' -X 'conf.GO_VERSION=`go version`'\"\n  # remove files\n  - rm appveyor.yml docker-compose.yml Dockerfile .travis.yml .gitattributes .gitignore go.mod go.sum main.go README.md simsun.ttc start.sh sync_host.sh build_amd64.sh build_musl_amd64.sh\n  # remove dirs\n  - rm -rf cache commands controllers converter .git .github graphics mail models routers utils runtime\n  - ls -alh\n  - cp conf/app.conf.example conf/app.conf\n  - zip -r mindoc_linux_amd64.zip conf static uploads views lib mindoc_linux_amd64 LICENSE.md\n\ndeploy:\n  provider: releases\n  token: $CI_USER_TOKEN\n  cleanup: true\n  overwrite: true\n  file:\n    - mindoc_linux_amd64.zip\n  on:\n    tags: true\n    branch: master\n"
  },
  {
    "path": "Dockerfile",
    "content": "FROM golang:bookworm AS build\n\nARG TAG=0.0.1\n\n# 编译-环境变量\nENV GO111MODULE=on\nENV GOPROXY=https://goproxy.cn,direct\nENV CGO_ENABLED=1\nENV GOARCH=amd64\nENV GOOS=linux\n\n# 工作目录\nADD . /go/src/github.com/mindoc-org/mindoc\nWORKDIR /go/src/github.com/mindoc-org/mindoc\n\n# 编译\nRUN go env\nRUN go mod tidy -v\nRUN go build -v -o mindoc_linux_amd64 -ldflags \"-w -s -X 'main.VERSION=$TAG' -X 'main.BUILD_TIME=`date`' -X 'main.GO_VERSION=`go version`'\"\nRUN cp conf/app.conf.example conf/app.conf\n# 清理不需要的文件\nRUN rm appveyor.yml docker-compose.yml Dockerfile .travis.yml .gitattributes .gitignore go.mod go.sum main.go README.md simsun.ttc start.sh conf/*.go\nRUN rm -rf cache commands controllers converter .git .github graphics mail models routers utils\n\n# 测试编译的mindoc是否ok\nRUN ./mindoc_linux_amd64 version\n\n# 必要的文件复制\nADD simsun.ttc /usr/share/fonts/win/\nADD start.sh /go/src/github.com/mindoc-org/mindoc\n\n\n# upgrade to the latest\nFROM ubuntu:latest\n\n# 切换默认shell为bash\nSHELL [\"/bin/bash\", \"-c\"]\n\nWORKDIR /mindoc\n\n# 文件复制\nCOPY --from=build /usr/share/fonts/win/simsun.ttc /usr/share/fonts/win/\nCOPY --from=build /go/src/github.com/mindoc-org/mindoc/mindoc_linux_amd64 /mindoc/\nCOPY --from=build /go/src/github.com/mindoc-org/mindoc/start.sh /mindoc/\nCOPY --from=build /go/src/github.com/mindoc-org/mindoc/LICENSE.md /mindoc/\n# 文件夹复制\nCOPY --from=build /go/src/github.com/mindoc-org/mindoc/lib /mindoc/lib\nCOPY --from=build /go/src/github.com/mindoc-org/mindoc/conf /mindoc/__default_assets__/conf\nCOPY --from=build /go/src/github.com/mindoc-org/mindoc/static /mindoc/__default_assets__/static\nCOPY --from=build /go/src/github.com/mindoc-org/mindoc/views /mindoc/__default_assets__/views\nCOPY --from=build /go/src/github.com/mindoc-org/mindoc/uploads /mindoc/__default_assets__/uploads\n\nRUN chmod a+r /usr/share/fonts/win/simsun.ttc\n\nRUN sed -i \"s/archive.ubuntu.com/mirrors.aliyun.com/g\" /etc/apt/sources.list /etc/apt/sources.list.d/*\n\n\n# 更新软件包信息\nRUN apt-get update\n\n# 时区设置(如果不设置, calibre依赖的tzdata在安装过程中会要求选择时区)\nENV TZ=Asia/Shanghai\nRUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone\n# tzdata的前端类型默认为readline（Shell情况下）或dialog（支持GUI的情况下）\nARG DEBIAN_FRONTEND=noninteractive\n# 安装时区信息\nRUN apt install -y --no-install-recommends tzdata\n# 重新配置tzdata软件包，使得时区设置生效\nRUN dpkg-reconfigure --frontend noninteractive tzdata\n\n# 安装文泉驿字体\n# 安装中文语言包\nRUN apt install -y fonts-wqy-microhei fonts-wqy-zenhei locales language-pack-zh-hans-base\n# 设置默认编码\nRUN locale-gen \"zh_CN.UTF-8\"\nRUN update-locale LANG=zh_CN.UTF-8\nENV LANG=zh_CN.UTF-8\nENV LANGUAGE=zh_CN:en\nENV LC_ALL=zh_CN.UTF-8\n\n# 安装必要依赖、下载、解压 calibre 并清理缓存\nRUN apt-get install -y --no-install-recommends \\\n        libglx0 libegl1 libnss3 libxcomposite1 libxkbcommon0 libxdamage1 libxrandr-dev libopengl0 libxtst6 libasound2t64 libxkbfile1\\\n        wget xz-utils && \\\n    mkdir -p /tmp/calibre-cache /opt/calibre && \\\n    wget -O /tmp/calibre-cache/calibre-x86_64.txz -c https://download.calibre-ebook.com/7.26.0/calibre-7.26.0-x86_64.txz  --no-check-certificate && \\\n    tar xJof /tmp/calibre-cache/calibre-x86_64.txz -C /opt/calibre && \\\n    rm -rf /tmp/calibre-cache && \\\n    apt-get clean && rm -rf /var/lib/apt/lists/*\n\n# 设置环境变量\nENV PATH=\"/opt/calibre:$PATH\" \\\n    QTWEBENGINE_CHROMIUM_FLAGS=\"--no-sandbox\" \\\n    QT_QPA_PLATFORM=\"offscreen\"\n\n# 测试 calibre 是否可正常使用\nRUN ebook-convert --version\n\n# refer: https://docs.docker.com/engine/reference/builder/#volume\nVOLUME [\"/mindoc/conf\",\"/mindoc/static\",\"/mindoc/views\",\"/mindoc/uploads\",\"/mindoc/runtime\",\"/mindoc/database\"]\n\n# refer: https://docs.docker.com/engine/reference/builder/#expose\nEXPOSE 8181/tcp\n\nENV ZONEINFO=/mindoc/lib/time/zoneinfo.zip\nRUN chmod +x /mindoc/start.sh\n\nENTRYPOINT [\"/bin/bash\", \"/mindoc/start.sh\"]\n\n# https://docs.docker.com/engine/reference/commandline/build/#options\n# docker build --progress plain --rm --build-arg TAG=2.1 --tag gsw945/mindoc:2.1 .\n# https://docs.docker.com/engine/reference/commandline/run/#options\n# set MINDOC=//d/mindoc # windows\n# export MINDOC=/home/ubuntu/mindoc-docker # linux\n# docker run -d --name=mindoc --restart=always -v /www/mindoc/uploads:/mindoc/uploads -v /www/mindoc/database:/mindoc/database  -v /www/mindoc/conf:/mindoc/conf  -e MINDOC_DB_ADAPTER=sqlite3 -e MINDOC_DB_DATABASE=./database/mindoc.db -e MINDOC_CACHE=true -e MINDOC_CACHE_PROVIDER=file -p 8181:8181 mindoc-org/mindoc:v2.1\n\n"
  },
  {
    "path": "LICENSE.md",
    "content": "                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"{}\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright {yyyy} {name of copyright owner}\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n"
  },
  {
    "path": "README.md",
    "content": "# MinDoc 简介\n\n[![Build Status](https://travis-ci.com/mindoc-org/mindoc.svg?branch=master)](https://travis-ci.com/mindoc-org/mindoc)\n[![Build status](https://ci.appveyor.com/api/projects/status/7680ia6mu29m12wx?svg=true)](https://ci.appveyor.com/project/mindoc-org/mindoc)\n\nMinDoc 是一款针对IT团队开发的简单好用的文档管理系统。\n\nMinDoc 的前身是 [SmartWiki](https://github.com/lifei6671/SmartWiki) 文档系统。SmartWiki 是基于 PHP 框架 laravel 开发的一款文档管理系统。因 PHP 的部署对普通用户来说太复杂，所以改用 Golang 开发。可以方便用户部署和实用。\n\n开发缘起是公司IT部门需要一款简单实用的项目接口文档管理和分享的系统。其功能和界面源于 kancloud 。\n\n可以用来储存日常接口文档，数据库字典，手册说明等文档。内置项目管理，用户管理，权限管理等功能，能够满足大部分中小团队的文档管理需求。\n\n##### 演示站点&文档:\n- https://demo.mindoc.cn/docs/mindochelp\n- https://www.iminho.me/wiki/docs/mindoc/\n- https://doc.gsw945.com/docs/mindoc-docs/\n\n---\n\n### 开发&维护&使用 悉知\n\n- 感谢作者 [lifei6671](https://github.com/lifei6671) 创造了MinDoc，并持续维护了很久。\n- 作者因工作等原因，精力有限，无法花费足够的时间来持续维护mindoc，已于北京时间2021年3月23日将mindoc交给社区(github组织[mindoc-org](https://github.com/mindoc-org))维护，期待热心开发者加入[mindoc-org](https://github.com/mindoc-org)一起来维护MinDoc。\n- 遇到问题请提 [Issues](https://github.com/mindoc-org/mindoc/issues )，欢迎使用者和贡献者加入QQ群 `1051164153`\n<a target=\"_blank\" href=\"https://qm.qq.com/cgi-bin/qm/qr?k=bHFR7P3Qp1nsSPbsTw4KN_ZpFLUAblIU&jump_from=webapi\"><img border=\"0\" src=\"https://pub.idqqimg.com/wpa/images/group.png\" alt=\"MinDoc使用&amp;开发交流群\" title=\"MinDoc使用&amp;开发交流群\"></a>\n- 对开发感兴趣请关注 [Development](https://github.com/mindoc-org/mindoc/projects/1):\n  - [Todo List](https://github.com/mindoc-org/mindoc/projects/1#column-13554511)\n  - [Work in progress](https://github.com/mindoc-org/mindoc/projects/1#column-13554512)\n  - [Review in progress](https://github.com/mindoc-org/mindoc/projects/1#column-13554513)\n- Mindoc基于 [beeego](https://github.com/beego/beego) 开发，beego文档地址: https://github.com/beego/beego-doc/tree/main/docs/zh\n- :warning: **特别声明**:\n  - 原作者 [lifei6671](https://github.com/lifei6671) 已于 2021-08-06 删除了个人捐赠信息，参见: [1a179179c1fe4d0d4db95e0b757d863aee5bf395](https://github.com/mindoc-org/mindoc/commit/1a179179c1fe4d0d4db95e0b757d863aee5bf395)\n  - 截止目前(2023-03-27)，[mindoc-org](https://github.com/mindoc-org) 暂未发布任何捐赠信息，请勿轻信\n\n---\n\n# 安装与使用\n\n~~如果你的服务器上没有安装golang程序请手动设置一个环境变量如下：键名为 ZONEINFO，值为MinDoc跟目录下的/lib/time/zoneinfo.zip 。~~\n\n更多信息请查看手册： [MinDoc 使用手册](https://demo.mindoc.cn/docs/mindochelp/mindoc-summary)\n\n对于没有Golang使用经验的用户，可以从 [https://github.com/mindoc-org/mindoc/releases](https://github.com/mindoc-org/mindoc/releases) 这里下载编译完的程序。\n\n如果有Golang开发经验，建议通过编译安装，要求golang版本不小于1.23.0(需支持`CGO`、`go mod`和`import _ \"time/tzdata\"`)(推荐Go版本为1.23.x)。\n> 注意: CentOS7上GLibC版本低，常规编译版本不能使用。需要自行源码编译,或使用使用musl编译版本。\n\n## 常规编译\n```bash\n# 克隆源码\ngit clone https://github.com/mindoc-org/mindoc.git\n# go包安装\ngo mod tidy -v\n# 编译(sqlite需要CGO支持)\ngo build -ldflags \"-w\" -o mindoc main.go\n# 数据库初始化(此步骤执行之前，需配置`conf/app.conf`)\n./mindoc install\n# 执行\n./mindoc\n# 开发阶段运行\nbee run\n```\n\n## 旧版本运行 可更新部分数据库配置\n```base\n./mindoc update\n```\n\nMinDoc 如果使用MySQL储存数据，则编码必须是`utf8mb4_general_ci`。请在安装前，把数据库配置填充到项目目录下的 `conf/app.conf` 中。\n\n如果使用 `SQLite` 数据库，则直接在配置文件中配置数据库路径即可.\n\n如果conf目录下不存在 `app.conf` 请重命名 `app.conf.example` 为 `app.conf`。\n\n**默认程序会自动初始化一个超级管理员用户：admin 密码：123456 。请登录后重新设置密码。**\n\n## Linux系统中不依赖gLibC的编译方式\n\n### 安装 musl-gcc\n```bash\n# 手动安装\nwget -c http://musl.libc.org/releases/musl-1.2.2.tar.gz\ntar -xvf musl-1.2.2.tar.gz\ncd musl-1.2.2\n./configure\nmake\nsudo make install\n# apt 安装\nsudo apt install musl-tools\n```\n\n\n### 使用 musl-gcc 编译 mindoc\n```bash\ngo mod tidy -v\nexport GOARCH=amd64\nexport GOOS=linux\n# 设置使用musl-gcc\nexport CC=/usr/local/musl/bin/musl-gcc\n# 设置版本\nexport TRAVIS_TAG=temp-musl-v`date +%y%m%d`\ngo build -v -o mindoc_linux_musl_amd64 -ldflags=\"-linkmode external -extldflags '-static' -w -X 'github.com/mindoc-org/mindoc/conf.VERSION=$TRAVIS_TAG' -X 'github.com/mindoc-org/mindoc/conf.BUILD_TIME=`date`' -X 'github.com/mindoc-org/mindoc/conf.GO_VERSION=`go version`'\"\n# 验证\n./mindoc_linux_musl_amd64 version\n```\n\n## Windows 上后台运行\n 使用 [mindoc-daemon](https://github.com/mindoc-org/mindoc-daemon)\n\n\n```ini\n#邮件配置-示例\n#是否启用邮件\nenable_mail=true\n#smtp服务器的账号\nsmtp_user_name=admin@iminho.me\n#smtp服务器的地址\nsmtp_host=smtp.ym.163.com\n#密码\nsmtp_password=1q2w3e__ABC\n#端口号\nsmtp_port=25\n#邮件发送人的地址\nform_user_name=admin@iminho.me\n#邮件有效期30分钟\nmail_expired=30\n```\n\n\n# 使用Docker部署\n如果是Docker用户，可参考项目内置的Dockerfile文件自行编译镜像(编译命令见Dockerfile文件底部注释，仅供参考)。\n\n在启动镜像时需要提供如下的常用环境变量(全部支持的环境变量请参考: [`conf/app.conf.example`](https://github.com/mindoc-org/mindoc/blob/master/conf/app.conf.example))：\n```ini\nDB_ADAPTER                  指定DB类型(默认为sqlite)\nMYSQL_PORT_3306_TCP_ADDR    MySQL地址\nMYSQL_PORT_3306_TCP_PORT    MySQL端口号\nMYSQL_INSTANCE_NAME         MySQL数据库名称\nMYSQL_USERNAME              MySQL账号\nMYSQL_PASSWORD              MySQL密码\nHTTP_PORT                   程序监听的端口号\nMINDOC_ENABLE_EXPORT        开启导出(默认为false)\n```\n\n#### 举个栗子-当前(公开)镜像(信息页面: https://cr.console.aliyun.com/images/cn-hangzhou/mindoc-org/mindoc/detail , 需要登录阿里云账号才可访问列表)\n##### Windows\n```bash\nset MINDOC=//d/mindoc\ndocker run -it --name=mindoc --restart=always -v \"%MINDOC%/conf\":\"/mindoc/conf\" -p 8181:8181 -e MINDOC_ENABLE_EXPORT=true -d registry.cn-hangzhou.aliyuncs.com/mindoc-org/mindoc:v2.2-beta.2\n```\n\n##### Linux、Mac\n```bash\nexport MINDOC=/home/ubuntu/mindoc-docker\ndocker run -it --name=mindoc --restart=always -v \"${MINDOC}/conf\":\"/mindoc/conf\" -p 8181:8181 -e MINDOC_ENABLE_EXPORT=true -d registry.cn-hangzhou.aliyuncs.com/mindoc-org/mindoc:v2.2-beta.2\n```\n\n##### 举个栗子-更多环境变量示例(镜像已过期，仅供参考，请以当前镜像为准)\n```bash\ndocker run -p 8181:8181 --name mindoc -e DB_ADAPTER=mysql -e MYSQL_PORT_3306_TCP_ADDR=10.xxx.xxx.xxx -e MYSQL_PORT_3306_TCP_PORT=3306 -e MYSQL_INSTANCE_NAME=mindoc -e MYSQL_USERNAME=root -e MYSQL_PASSWORD=123456 -e httpport=8181 -d daocloud.io/lifei6671/mindoc:latest\n```\n\n#### dockerfile内容参考\n- [无需代理直接加速各种 GitHub 资源拉取 | 国内镜像赋能 | 助力开发](https://blog.frytea.com/archives/504/)\n- [阿里云 - Ubuntu 镜像](https://developer.aliyun.com/mirror/ubuntu)\n\n### docker-compose 一键安装\n\n1. 修改配置文件\n    修改`docker-compose.yml`中的配置信息，主要修改`volumes`节点，将宿主机的两个目录映射到容器内。\n    `environment`节点，配置自己的环境变量。\n    \n2. 一键完成所有环境搭建\n    \n    > docker-compose up -d\n3. 浏览器访问\n    > http://localhost:8181/\n\n    整个部署完成了\n4. 常用命令参考\n   - 启动\n        \n        > docker-compose up -d\n   - 停止\n        \n        > docker-compose stop\n   - 重启\n        \n        > docker-compose restart\n   - 停止删除容器，释放所有资源\n        \n        > docker-compose down\n   - 删除并重新创建\n        > docker-compose -f docker-compose.yml down && docker-compose up -d\n        > \n        > 更多 docker-compose 的使用相关的内容 请查看官网文档或百度\n   \n#### MCP服务器对接指导\n1. 请在配置文件中启用MCP服务器功能\n在配置文件`app.conf`中添加或修改为如下内容：\n```\n# MCP Server 功能\nenable_mcp_server=\"${MINDOC_ENABLE_MCP_SERVER||true}\"\nmcp_api_key=\"${MINDOC_MCP_API_KEY||demo-mcp-api-key}\"\n```\n说明：\n`enable_mcp_server`为是否启用MCP服务器功能，默认为true。\n`mcp_api_key` 为MCP服务器的API密钥，示例配置中默认为`demo-mcp-api-key`，可根据需求自行修改。\n\n2. 在Dify等AI应用或其他可调用MCP服务器的项目配置中添加如下Mindoc配置\n```json\n{\n  \"mindoc\": {\n    \"transport\": \"streamable_http\",\n    \"url\": \"http://127.0.0.1:8181/mcp/?api_key=demo-mcp-api-key\",\n    \"headers\":{},\n    \"timeout\":600\n  }\n}\n```\n说明：\n`transport`为传输方式，目前支持`streamable_http`。\n`url`为Mindoc的MCP服务地址，示例配置中Endpoint默认为`http://127.0.0.1:8181`，默认的API密钥为`demo-mcp-api-key`，可自行修改为对接时项目实际使用的Endpoint和API密钥。\n\n# 项目截图\n\n**创建项目**\n\n![创建项目](https://github.com/mindoc-org/mindoc/blob/master/uploads/docs/create.png?raw=true)\n\n**项目列表**\n\n![项目列表](https://github.com/mindoc-org/mindoc/blob/master/uploads/docs/project_list.png?raw=true)\n\n**项目概述**\n\n![项目概述](https://github.com/mindoc-org/mindoc/blob/master/uploads/docs/intro.png?raw=true)\n\n**项目成员**\n\n![项目成员](https://github.com/mindoc-org/mindoc/blob/master/uploads/docs/member.png?raw=true)\n\n**项目设置**\n\n![项目设置](https://github.com/mindoc-org/mindoc/blob/master/uploads/docs/project_setting.png?raw=true)\n\n**基于Editor.md开发的Markdown编辑器**\n\n![基于Editor.md开发的Markdown编辑器](https://github.com/mindoc-org/mindoc/blob/master/uploads/docs/editor_md.png?raw=true)\n\n**基于wangEditor开发的富文本编辑器**\n\n![基于wangEditor开发的富文本编辑器](https://github.com/mindoc-org/mindoc/blob/master/uploads/docs/wang_editor.png?raw=true)\n\n\n**基于cherryMarkdown开发的编辑器**\n\n![基于cherry-markdown开发的编辑器](https://github.com/mindoc-org/mindoc/blob/master/uploads/docs/cheery-markdown.png?raw=true)\n\n**项目预览**\n\n![项目预览](https://github.com/mindoc-org/mindoc/blob/master/uploads/docs/preview.png?raw=true)\n\n**超级管理员后台**\n\n![超级管理员后台](https://github.com/mindoc-org/mindoc/blob/master/uploads/docs/admin.png?raw=true)\n\n\n# 使用的技术(TODO: 最新技术栈整理中，使用的第三方库升级中)\n\n- [Beego](https://github.com/beego/beego) ~~1.10.0~~\n- MySQL 5.6\n- [editor.md](https://github.com/pandao/editor.md) Markdown 编辑器\n- [cherry-markdown](https://github.com/Tencent/cherry-markdown) Cherry Markdown Writer\n- [Bootstrap](https://github.com/twbs/bootstrap) 3.2\n- [jQuery](https://github.com/jquery/jquery) 库\n- [WebUploader](https://github.com/fex-team/webuploader) 文件上传框架\n- [NProgress](https://github.com/rstacruz/nprogress) 库\n- [jsTree](https://github.com/vakata/jstree) 树状结构库\n- [Font Awesome](https://github.com/FortAwesome/Font-Awesome) 字体库\n- [Cropper](https://github.com/fengyuanchen/cropper) 图片剪裁库\n- [layer](https://github.com/sentsin/layer) 弹出层框架\n- [highlight.js](https://github.com/highlightjs/highlight.js) 代码高亮库\n- ~~to-markdown~~[Turndown](https://github.com/domchristie/turndown) HTML转Markdown库\n- ~~quill 富文本编辑器~~\n- [wangEditor](https://github.com/wangeditor-team/wangEditor) 富文本编辑器\n  - 参考\n    - [wangEditor v4.7 富文本编辑器教程](https://www.bookstack.cn/books/wangeditor-4.7-zh)\n    - [扩展菜单注册太过繁琐 #2493](https://github.com/wangeditor-team/wangEditor/issues/2493)\n  - 工具： `https://babeljs.io/repl` + `@babel/plugin-transform-classes`\n- [Vue.js](https://github.com/vuejs/vue) 框架\n- [MCP-Go](https://github.com/mark3labs/mcp-go)\n\n\n# 主要功能\n\n- 项目管理，可以对项目进行编辑更改，成员添加, 项目排序等。\n- 文档管理，添加和删除文档等。\n- 评论管理，可以管理文档评论和自己发布的评论。\n- 用户管理，添加和禁用用户，个人资料更改等。\n- 用户权限管理 ， 实现用户角色的变更。\n- 项目加密，可以设置项目公开状态，私有项目需要通过Token访问。\n- 站点配置，多语言切换, 可开启匿名访问、验证码等。\n\n# 参与开发\n\n我们欢迎您在 MinDoc 项目的 GitHub 上报告 issue 或者 pull request。\n\n如果您还不熟悉GitHub的Fork and Pull开发模式，您可以阅读GitHub的文档（https://help.github.com/articles/using-pull-requests） 获得更多的信息。\n\n# 关于作者[lifei6671](https://github.com/lifei6671)\n\n一个不纯粹的PHPer，一个不自由的 gopher 。\n\n\n# 部署补充\n- 若内网部署，draw.io无法使用外网，则需要用tomcat运行war包，见（https://github.com/jgraph/drawio） 从release下载，之后修改markdown.js的TODO行对应的链接即可\n- 为了护眼，简单增加了编辑界面的主题切换，见editormd.js和markdown_edit_template.tpl\n- (需重新编译项)为了对已删除文档/文档引用图片删除文字后，对悬空无引用的图片/附件进行清理，增加了清理接口，需重新编译\n     - 编译后除二进制文件外还需更新三个文件: conf/lang/en-us.ini,zh-cn.ini; attach_list.tpl\n     - 若不想重新编译，也可通过database/clean.py，手动执行对无引用图片/附件的文件清理和数据库记录双向清理。\n- 若采用nginx二级部署，以yourpath/为例，需修改\n     - conf/app.conf修改：`baseurl=\"/yourpath\"`\n     - static/js/kancloud.js文件中`url: \"/comment/xxxxx` => `url: \"/yourpath\" + \"/comment/xxxxx`, 共两处\n\n     - nginx端口代理示例:\n     ```\n     增加\n     location  /yourpath/ {\n          rewrite ^/yourpath/(.*) /$1  break;\n          proxy_pass http://127.0.0.1:8181;\n     }\n     ```\n     注意使用的是127.0.0.1，根据自身选择替换，如果nginx是docker部署，则还需要在docker中托管运行mindoc，具体参考如下配置:\n     - docker-compose代理示例(docker-nginx代理运行mindoc)\n     ```\n     version: '3'\n     services:\n       mynginx:\n       image: nginx:latest\n       ports:\n         - \"8880:80\"\n       command: \n         - bash\n         - -c\n         - |\n             service nginx start\n             cd /src/mindoc/ && ./mindoc\n       volumes:\n         - ..:/src\n         - ./nginx:/etc/nginx/conf.d\n     ```\n\n     目录结构\n     ```\n     onefolder\n     |\n       - docker\n       |\n         - docker-compose.yml\n         - nginx\n         |\n           - mynginx.conf\n       \n       - mindoc\n       |\n         - database/\n         - conf/\n         - ...\n     ```\n"
  },
  {
    "path": "appveyor.yml",
    "content": "version: 1.0.{build}\nbranches:\n  only:\n  - master\nimage: Visual Studio 2022\nclone_folder: c:\\gopath\\src\\github.com\\mindoc-org\\mindoc\ninit:\n- cmd: >-\n    if [%tbs_arch%]==[x86] SET PATH=C:\\msys64\\mingw32\\bin;%PATH%\n    \n    if [%tbs_arch%]==[x64] SET PATH=C:\\msys64\\mingw64\\bin;%PATH%\n    \n    SET PATH=%GOPATH%\\bin;%GOBIN%;%PATH%\n    \n    FOR /f \"delims=\" %%i IN ('go version') DO (SET GO_VERSION=%%i)\n    \n    git config --global --add safe.directory /cygdrive/c/gopath/src/github.com/mindoc-org/mindoc\nenvironment:\n  GOPATH: c:\\gopath\n  GOBIN: c:\\gobin\n  GO111MODULE: on\n  CGO_ENABLED: 1\n  matrix:\n  - tbs_arch: x86\n    GOARCH: 386\n    job_name: job_x86\n  - tbs_arch: x64\n    GOARCH: amd64\n    job_name: job_x64\ninstall:\n- cmd: >-\n    echo %PATH%\n    \n    echo %GO_VERSION%\n    \n    go env\n    \n    where gcc\n    \n    where g++\nbuild_script:\n- cmd: >-\n    cd c:\\gopath\\src\\github.com\\mindoc-org\\mindoc\n    \n    go mod tidy -v\n    \n    go build -v -o \"mindoc_windows_%GOARCH%.exe\" -ldflags=\"-w -X github.com/mindoc-org/mindoc/conf.VERSION=%APPVEYOR_REPO_TAG_NAME% -X 'github.com/mindoc-org/mindoc/conf.BUILD_TIME=%date% %time%' -X 'github.com/mindoc-org/mindoc/conf.GO_VERSION=%GO_VERSION%'\"\n    \n    7z a -t7z -r mindoc_windows_%GOARCH%.7z conf/*.conf* conf/lang/* static/* mindoc_windows_%GOARCH%.exe views/* uploads/* lib/* LICENSE.md\ntest_script:\n- cmd: >-\n    cd c:\\gopath\\src\\github.com\\mindoc-org\\mindoc\n    \n    pwsh -NoProfile -ExecutionPolicy Bypass -Command \"& {Copy-Item -Force -Path 'conf\\app.conf.example' -Destination 'conf\\app.conf'}\"\n    \n    mindoc_windows_%GOARCH%.exe version\nartifacts:\n- path: mindoc_windows_*.7z\ndeploy: off\n"
  },
  {
    "path": "build_amd64.sh",
    "content": "rm mindoc_linux_amd64 mindoc_linux_musl_amd64\nrm -rf ../mindoc_linux_amd64/\n\nexport GOARCH=amd64\nexport GOOS=linux\nexport CC=/usr/bin/gcc\n\nexport TRAVIS_TAG=v2.1-beta.6\n\ngo mod tidy -v\ngo build -v -o mindoc_linux_amd64 -ldflags=\"-linkmode external -extldflags '-static' -w -X 'github.com/mindoc-org/mindoc/conf.VERSION=$TRAVIS_TAG' -X 'github.com/mindoc-org/mindoc/conf.BUILD_TIME=`date`' -X 'github.com/mindoc-org/mindoc/conf.GO_VERSION=`go version`'\"\n./mindoc_linux_amd64 version\n\nmkdir ../mindoc_linux_amd64\ncp -r * ../mindoc_linux_amd64\ncd ../mindoc_linux_amd64\nrm -rf cache commands controllers converter .git .github graphics mail models routers utils runtime conf/*.go\nrm appveyor.yml docker-compose.yml Dockerfile .travis.yml .gitattributes .gitignore go.mod go.sum main.go README.md simsun.ttc start.sh sync_host.sh build_amd64.sh build_musl_amd64.sh\nzip -r mindoc_linux_amd64.zip conf static uploads views lib mindoc_linux_amd64 LICENSE.md\nmv ./mindoc_linux_amd64.zip ../\n"
  },
  {
    "path": "build_musl_amd64.sh",
    "content": "rm mindoc_linux_musl_amd64 mindoc_linux_amd64\nrm -rf ../mindoc_linux_musl_amd64/\n\nexport GOARCH=amd64\nexport GOOS=linux\nexport CC=/usr/local/musl/bin/musl-gcc\n\nexport TRAVIS_TAG=v2.1-beta.6\n\ngo mod tidy -v\ngo build -v -o mindoc_linux_musl_amd64 -ldflags=\"-linkmode external -extldflags '-static' -w -X 'github.com/mindoc-org/mindoc/conf.VERSION=$TRAVIS_TAG' -X 'github.com/mindoc-org/mindoc/conf.BUILD_TIME=`date`' -X 'github.com/mindoc-org/mindoc/conf.GO_VERSION=`go version`'\"\n./mindoc_linux_musl_amd64 version\n\nmkdir ../mindoc_linux_musl_amd64\ncp -r * ../mindoc_linux_musl_amd64\ncd ../mindoc_linux_musl_amd64\nrm -rf cache commands controllers converter .git .github graphics mail models routers utils runtime conf/*.go\nrm appveyor.yml docker-compose.yml Dockerfile .travis.yml .gitattributes .gitignore go.mod go.sum main.go README.md simsun.ttc start.sh sync_host.sh build_amd64.sh build_musl_amd64.sh\nzip -r mindoc_linux_musl_amd64.zip conf static uploads views lib mindoc_linux_musl_amd64 LICENSE.md\nmv ./mindoc_linux_musl_amd64.zip ../\n"
  },
  {
    "path": "cache/cache.go",
    "content": "package cache\n\nimport (\n\t\"bytes\"\n\t\"context\"\n\t\"encoding/gob\"\n\t\"errors\"\n\t\"time\"\n\n\t\"github.com/beego/beego/v2/client/cache\"\n\t\"github.com/beego/beego/v2/core/logs\"\n)\n\nvar bm cache.Cache\n\nvar nilctx = context.TODO()\n\nfunc Get(key string, e interface{}) error {\n\n\tval, err := bm.Get(nilctx, key)\n\n\tif err != nil {\n\t\treturn errors.New(\"get cache error:\" + err.Error())\n\t}\n\n\tif val == nil {\n\t\treturn errors.New(\"cache does not exist\")\n\t}\n\tif b, ok := val.([]byte); ok {\n\t\tbuf := bytes.NewBuffer(b)\n\n\t\tdecoder := gob.NewDecoder(buf)\n\n\t\terr := decoder.Decode(e)\n\n\t\tif err != nil {\n\t\t\tlogs.Error(\"反序列化对象失败 ->\", err)\n\t\t}\n\t\treturn err\n\t} else if s, ok := val.(string); ok && s != \"\" {\n\n\t\tbuf := bytes.NewBufferString(s)\n\n\t\tdecoder := gob.NewDecoder(buf)\n\n\t\terr := decoder.Decode(e)\n\n\t\tif err != nil {\n\t\t\tlogs.Error(\"反序列化对象失败 ->\", err)\n\t\t}\n\t\treturn err\n\t}\n\treturn errors.New(\"value is not []byte or string\")\n}\n\nfunc Put(key string, val interface{}, timeout time.Duration) error {\n\n\tvar buf bytes.Buffer\n\n\tencoder := gob.NewEncoder(&buf)\n\n\terr := encoder.Encode(val)\n\tif err != nil {\n\t\tlogs.Error(\"序列化对象失败 ->\", err)\n\t\treturn err\n\t}\n\n\treturn bm.Put(nilctx, key, buf.String(), timeout)\n}\n\nfunc Delete(key string) error {\n\treturn bm.Delete(nilctx, key)\n}\nfunc Incr(key string) error {\n\treturn bm.Incr(nilctx, key)\n}\nfunc Decr(key string) error {\n\treturn bm.Decr(nilctx, key)\n}\nfunc IsExist(key string) (bool, error) {\n\treturn bm.IsExist(nilctx, key)\n}\nfunc ClearAll() error {\n\treturn bm.ClearAll(nilctx)\n}\n\nfunc StartAndGC(config string) error {\n\treturn bm.StartAndGC(config)\n}\n\n//Init will initialize cache\nfunc Init(c cache.Cache) {\n\tbm = c\n}\n"
  },
  {
    "path": "cache/cache_null.go",
    "content": "package cache\n\nimport (\n\t\"context\"\n\t\"time\"\n)\n\ntype NullCache struct {\n\n}\n\n\nfunc (bm *NullCache) Get(ctx context.Context, key string) (interface{}, error) {\n\treturn nil, nil\n}\n\nfunc (bm *NullCache)GetMulti(ctx context.Context, keys []string) ([]interface{}, error) {\n\treturn nil, nil\n}\n\nfunc (bm *NullCache)Put(ctx context.Context,key string, val interface{}, timeout time.Duration) error {\n\treturn nil\n}\nfunc (bm *NullCache)Delete(ctx context.Context,key string) error {\n\treturn nil\n}\nfunc (bm *NullCache)Incr(ctx context.Context,key string) error {\n\treturn nil\n}\nfunc (bm *NullCache)Decr(ctx context.Context,key string) error {\n\treturn nil\n}\nfunc (bm *NullCache)IsExist(ctx context.Context,key string) (bool, error) {\n\treturn false, nil\n}\nfunc (bm *NullCache)ClearAll(ctx context.Context) error{\n\treturn nil\n}\n\nfunc (bm *NullCache)StartAndGC(config string) error {\n\treturn nil\n}\n"
  },
  {
    "path": "commands/command.go",
    "content": "package commands\n\nimport (\n\t\"encoding/gob\"\n\t\"flag\"\n\t\"fmt\"\n\t\"log\"\n\t\"net/url\"\n\t\"os\"\n\t\"path/filepath\"\n\t\"strconv\"\n\t\"strings\"\n\t\"time\"\n\t_ \"time/tzdata\"\n\n\t\"bytes\"\n\t\"encoding/json\"\n\t\"net/http\"\n\n\tbeegoCache \"github.com/beego/beego/v2/client/cache\"\n\t_ \"github.com/beego/beego/v2/client/cache/memcache\"\n\t\"github.com/beego/beego/v2/client/orm\"\n\t\"github.com/beego/beego/v2/core/logs\"\n\t\"github.com/beego/beego/v2/server/web\"\n\t\"github.com/beego/i18n\"\n\t\"github.com/howeyc/fsnotify\"\n\t_ \"github.com/lib/pq\"\n\t\"github.com/lifei6671/gocaptcha\"\n\t\"github.com/mindoc-org/mindoc/cache\"\n\t\"github.com/mindoc-org/mindoc/conf\"\n\t\"github.com/mindoc-org/mindoc/models\"\n\t\"github.com/mindoc-org/mindoc/utils/filetil\"\n)\n\n// RegisterDataBase 注册数据库\nfunc RegisterDataBase() {\n\tlogs.Info(\"正在初始化数据库配置.\")\n\tdbadapter, _ := web.AppConfig.String(\"db_adapter\")\n\torm.DefaultTimeLoc = time.Local\n\torm.DefaultRowsLimit = -1\n\n\tif strings.EqualFold(dbadapter, \"mysql\") {\n\t\thost, _ := web.AppConfig.String(\"db_host\")\n\t\tdatabase, _ := web.AppConfig.String(\"db_database\")\n\t\tusername, _ := web.AppConfig.String(\"db_username\")\n\t\tpassword, _ := web.AppConfig.String(\"db_password\")\n\n\t\ttimezone, _ := web.AppConfig.String(\"timezone\")\n\t\tlocation, err := time.LoadLocation(timezone)\n\t\tif err == nil {\n\t\t\torm.DefaultTimeLoc = location\n\t\t} else {\n\t\t\tlogs.Error(\"加载时区配置信息失败,请检查是否存在 ZONEINFO 环境变量->\", err)\n\t\t}\n\n\t\tport, _ := web.AppConfig.String(\"db_port\")\n\n\t\tdataSource := fmt.Sprintf(\"%s:%s@tcp(%s:%s)/%s?charset=utf8mb4&parseTime=true&loc=%s\", username, password, host, port, database, url.QueryEscape(timezone))\n\n\t\tif err := orm.RegisterDataBase(\"default\", \"mysql\", dataSource); err != nil {\n\t\t\tlogs.Error(\"注册默认数据库失败->\", err)\n\t\t\tos.Exit(1)\n\t\t}\n\n\t} else if strings.EqualFold(dbadapter, \"sqlite3\") {\n\n\t\tdatabase, _ := web.AppConfig.String(\"db_database\")\n\t\tif strings.HasPrefix(database, \"./\") {\n\t\t\tdatabase = filepath.Join(conf.WorkingDirectory, string(database[1:]))\n\t\t}\n\t\tif p, err := filepath.Abs(database); err == nil {\n\t\t\tdatabase = p\n\t\t}\n\n\t\tdbPath := filepath.Dir(database)\n\n\t\tif _, err := os.Stat(dbPath); err != nil && os.IsNotExist(err) {\n\t\t\t_ = os.MkdirAll(dbPath, 0777)\n\t\t}\n\n\t\terr := orm.RegisterDataBase(\"default\", \"sqlite3\", database)\n\n\t\tif err != nil {\n\t\t\tlogs.Error(\"注册默认数据库失败->\", err)\n\t\t}\n\t} else if strings.EqualFold(dbadapter, \"postgres\") {\n\t\thost, _ := web.AppConfig.String(\"db_host\")\n\t\tdatabase, _ := web.AppConfig.String(\"db_database\")\n\t\tusername, _ := web.AppConfig.String(\"db_username\")\n\t\tpassword, _ := web.AppConfig.String(\"db_password\")\n\t\tsslmode, _ := web.AppConfig.String(\"db_sslmode\")\n\n\t\ttimezone, _ := web.AppConfig.String(\"timezone\")\n\t\tlocation, err := time.LoadLocation(timezone)\n\t\tif err == nil {\n\t\t\torm.DefaultTimeLoc = location\n\t\t} else {\n\t\t\tlogs.Error(\"加载时区配置信息失败,请检查是否存在 ZONEINFO 环境变量->\", err)\n\t\t}\n\n\t\tport, _ := web.AppConfig.String(\"db_port\")\n\n\t\tdataSource := fmt.Sprintf(\"postgres://%s:%s@%s:%s/%s?sslmode=%s\", username, password, host, port, database, sslmode)\n\n\t\tif err := orm.RegisterDataBase(\"default\", \"postgres\", dataSource); err != nil {\n\t\t\tlogs.Error(\"注册默认数据库失败->\", err)\n\t\t\tos.Exit(1)\n\t\t}\n\n\t} else {\n\t\tlogs.Error(\"不支持的数据库类型.\")\n\t\tos.Exit(1)\n\t}\n\tlogs.Info(\"数据库初始化完成.\")\n}\n\n// RegisterModel 注册Model\nfunc RegisterModel() {\n\torm.RegisterModelWithPrefix(conf.GetDatabasePrefix(),\n\t\tnew(models.Member),\n\t\tnew(models.Book),\n\t\tnew(models.Relationship),\n\t\tnew(models.Option),\n\t\tnew(models.Document),\n\t\tnew(models.Attachment),\n\t\tnew(models.Logger),\n\t\tnew(models.MemberToken),\n\t\tnew(models.DocumentHistory),\n\t\tnew(models.Migration),\n\t\tnew(models.Label),\n\t\tnew(models.Blog),\n\t\tnew(models.Template),\n\t\tnew(models.Team),\n\t\tnew(models.TeamMember),\n\t\tnew(models.TeamRelationship),\n\t\tnew(models.Itemsets),\n\t\tnew(models.Comment),\n\t\tnew(models.WorkWeixinAccount),\n\t\tnew(models.DingTalkAccount),\n\t\tnew(models.ContentReverseIndex),\n\t)\n\tgob.Register(models.Blog{})\n\tgob.Register(models.Document{})\n\tgob.Register(models.Template{})\n\t//migrate.RegisterMigration()\n\terr := orm.RunSyncdb(\"default\", false, true)\n\tif err != nil {\n\t\tlogs.Error(\"注册Model失败 ->\", err)\n\t\tos.Exit(1)\n\t}\n}\n\n// RegisterLogger 注册日志\nfunc RegisterLogger(log string) {\n\n\tlogs.Reset()\n\tlogs.SetLogFuncCall(true)\n\t_ = logs.SetLogger(\"console\")\n\tlogs.EnableFuncCallDepth(true)\n\n\tif web.AppConfig.DefaultBool(\"log_is_async\", true) {\n\t\tlogs.Async(1e3)\n\t}\n\tif log == \"\" {\n\t\tlogPath, err := filepath.Abs(web.AppConfig.DefaultString(\"log_path\", conf.WorkingDir(\"runtime\", \"logs\")))\n\t\tif err == nil {\n\t\t\tlog = logPath\n\t\t} else {\n\t\t\tlog = conf.WorkingDir(\"runtime\", \"logs\")\n\t\t}\n\t}\n\n\tlogPath := filepath.Join(log, \"log.log\")\n\n\tif _, err := os.Stat(log); os.IsNotExist(err) {\n\t\t_ = os.MkdirAll(log, 0755)\n\t}\n\n\tconfig := make(map[string]interface{}, 1)\n\n\tconfig[\"filename\"] = logPath\n\tconfig[\"perm\"] = \"0755\"\n\tconfig[\"rotate\"] = true\n\n\tif maxLines := web.AppConfig.DefaultInt(\"log_maxlines\", 1000000); maxLines > 0 {\n\t\tconfig[\"maxLines\"] = maxLines\n\t}\n\tif maxSize := web.AppConfig.DefaultInt(\"log_maxsize\", 1<<28); maxSize > 0 {\n\t\tconfig[\"maxsize\"] = maxSize\n\t}\n\tif !web.AppConfig.DefaultBool(\"log_daily\", true) {\n\t\tconfig[\"daily\"] = false\n\t}\n\tif maxDays := web.AppConfig.DefaultInt(\"log_maxdays\", 7); maxDays > 0 {\n\t\tconfig[\"maxdays\"] = maxDays\n\t}\n\tif level := web.AppConfig.DefaultString(\"log_level\", \"Trace\"); level != \"\" {\n\t\tswitch level {\n\t\tcase \"Emergency\":\n\t\t\tconfig[\"level\"] = logs.LevelEmergency\n\t\tcase \"Alert\":\n\t\t\tconfig[\"level\"] = logs.LevelAlert\n\t\tcase \"Critical\":\n\t\t\tconfig[\"level\"] = logs.LevelCritical\n\t\tcase \"Error\":\n\t\t\tconfig[\"level\"] = logs.LevelError\n\t\tcase \"Warning\":\n\t\t\tconfig[\"level\"] = logs.LevelWarning\n\t\tcase \"Notice\":\n\t\t\tconfig[\"level\"] = logs.LevelNotice\n\t\tcase \"Informational\":\n\t\t\tconfig[\"level\"] = logs.LevelInformational\n\t\tcase \"Debug\":\n\t\t\tconfig[\"level\"] = logs.LevelDebug\n\t\t}\n\t}\n\tb, err := json.Marshal(config)\n\tif err != nil {\n\t\tlogs.Error(\"初始化文件日志时出错 ->\", err)\n\t\t_ = logs.SetLogger(\"file\", `{\"filename\":\"`+logPath+`\"}`)\n\t} else {\n\t\t_ = logs.SetLogger(logs.AdapterFile, string(b))\n\t}\n\n\tlogs.SetLogFuncCall(true)\n}\n\n// RunCommand 注册orm命令行工具\nfunc RegisterCommand() {\n\n\tif len(os.Args) >= 2 && os.Args[1] == \"install\" {\n\t\tResolveCommand(os.Args[2:])\n\t\tInstall()\n\t} else if len(os.Args) >= 2 && os.Args[1] == \"version\" {\n\t\tCheckUpdate()\n\t\tos.Exit(0)\n\t} else if len(os.Args) >= 2 && os.Args[1] == \"update\" {\n\t\tUpdate()\n\t\tos.Exit(0)\n\t}\n\n}\n\n// 注册模板函数\nfunc RegisterFunction() {\n\terr := web.AddFuncMap(\"config\", models.GetOptionValue)\n\n\tif err != nil {\n\t\tlogs.Error(\"注册函数 config 出错 ->\", err)\n\t\tos.Exit(-1)\n\t}\n\terr = web.AddFuncMap(\"cdn\", func(p string) string {\n\t\tcdn := web.AppConfig.DefaultString(\"cdn\", \"\")\n\t\tif strings.HasPrefix(p, \"http://\") || strings.HasPrefix(p, \"https://\") {\n\t\t\treturn p\n\t\t}\n\t\t//如果没有设置cdn，则使用baseURL拼接\n\t\tif cdn == \"\" {\n\t\t\tbaseUrl := web.AppConfig.DefaultString(\"baseurl\", \"\")\n\n\t\t\tif strings.HasPrefix(p, \"/\") && strings.HasSuffix(baseUrl, \"/\") {\n\t\t\t\treturn baseUrl + p[1:]\n\t\t\t}\n\t\t\tif !strings.HasPrefix(p, \"/\") && !strings.HasSuffix(baseUrl, \"/\") {\n\t\t\t\treturn baseUrl + \"/\" + p\n\t\t\t}\n\t\t\treturn baseUrl + p\n\t\t}\n\t\tif strings.HasPrefix(p, \"/\") && strings.HasSuffix(cdn, \"/\") {\n\t\t\treturn cdn + string(p[1:])\n\t\t}\n\t\tif !strings.HasPrefix(p, \"/\") && !strings.HasSuffix(cdn, \"/\") {\n\t\t\treturn cdn + \"/\" + p\n\t\t}\n\t\treturn cdn + p\n\t})\n\tif err != nil {\n\t\tlogs.Error(\"注册函数 cdn 出错 ->\", err)\n\t\tos.Exit(-1)\n\t}\n\n\terr = web.AddFuncMap(\"cdnjs\", conf.URLForWithCdnJs)\n\tif err != nil {\n\t\tlogs.Error(\"注册函数 cdnjs 出错 ->\", err)\n\t\tos.Exit(-1)\n\t}\n\terr = web.AddFuncMap(\"cdncss\", conf.URLForWithCdnCss)\n\tif err != nil {\n\t\tlogs.Error(\"注册函数 cdncss 出错 ->\", err)\n\t\tos.Exit(-1)\n\t}\n\terr = web.AddFuncMap(\"cdnimg\", conf.URLForWithCdnImage)\n\tif err != nil {\n\t\tlogs.Error(\"注册函数 cdnimg 出错 ->\", err)\n\t\tos.Exit(-1)\n\t}\n\t//重写url生成，支持配置域名以及域名前缀\n\terr = web.AddFuncMap(\"urlfor\", conf.URLFor)\n\tif err != nil {\n\t\tlogs.Error(\"注册函数 urlfor 出错 ->\", err)\n\t\tos.Exit(-1)\n\t}\n\t//读取配置值(未作任何转换)\n\terr = web.AddFuncMap(\"conf\", conf.CONF)\n\tif err != nil {\n\t\tlogs.Error(\"注册函数 conf 出错 ->\", err)\n\t\tos.Exit(-1)\n\t}\n\terr = web.AddFuncMap(\"date_format\", func(t time.Time, format string) string {\n\t\treturn t.Local().Format(format)\n\t})\n\tif err != nil {\n\t\tlogs.Error(\"注册函数 date_format 出错 ->\", err)\n\t\tos.Exit(-1)\n\t}\n\n\terr = web.AddFuncMap(\"i18n\", i18n.Tr)\n\tif err != nil {\n\t\tlogs.Error(\"注册函数 i18n 出错 ->\", err)\n\t\tos.Exit(-1)\n\t}\n\n\ti18nList, err := web.AppConfig.String(\"i18n_list\")\n\tif err != nil {\n\t\tlogs.Error(\"error : failed to read i18n_list config ->\", err)\n\t\ti18nList = \"\"\n\t}\n\tif i18nList == \"\" { // 之所以分开判断是因为读取出的配置也可能是空串\n\t\tlogs.Error(\"error : config `i18n_list` is empty, please add config item like format: `i18n_list=zh-CN:简体中文|en-US:English`\")\n\t\ti18nList = \"zh-cn:简体中文|en-us:English|ru-ru:Русский\" // 没有配置时给个默认配置，避免啥语言都没有\n\t}\n\n\tlangs := strings.Split(i18nList, \"|\")\n\ti18nMap := make(map[string]string)\n\tfor _, langItem := range langs {\n\t\tlangItemSplit := strings.Split(langItem, \":\")\n\t\tif len(langItemSplit) < 2 {\n\t\t\tlogs.Error(\"error: language config value `\" + langItem + \"` for `i18n_list` format error\")\n\t\t\tcontinue\n\t\t}\n\t\tlang := langItemSplit[0]\n\t\ti18nMap[lang] = langItemSplit[1]\n\t\tif err := i18n.SetMessage(lang, \"conf/lang/\"+lang+\".ini\"); err != nil {\n\t\t\tlogs.Error(\"Fail to set message file: \" + err.Error())\n\t\t\treturn\n\t\t}\n\t}\n\n\ti18nMapBytes, err := json.Marshal(i18nMap)\n\tif err != nil {\n\t\tlogs.Error(\"error: Fail to marshal i18n map, \" + err.Error())\n\t\ti18nMapBytes = []byte(\"{}\")\n\t}\n\n\terr = web.AppConfig.Set(\"i18n_map\", string(i18nMapBytes))\n\tif err != nil {\n\t\tlogs.Error(\"error: Fail to set i18n_map, \" + err.Error())\n\t}\n}\n\n// 解析命令\nfunc ResolveCommand(args []string) {\n\tflagSet := flag.NewFlagSet(\"MinDoc command: \", flag.ExitOnError)\n\tflagSet.StringVar(&conf.ConfigurationFile, \"config\", \"\", \"MinDoc configuration file.\")\n\tflagSet.StringVar(&conf.WorkingDirectory, \"dir\", \"\", \"MinDoc working directory.\")\n\tflagSet.StringVar(&conf.LogFile, \"log\", \"\", \"MinDoc log file path.\")\n\n\tif err := flagSet.Parse(args); err != nil {\n\t\tlog.Fatal(\"解析命令失败 ->\", err)\n\t}\n\n\tif conf.WorkingDirectory == \"\" {\n\t\tif p, err := filepath.Abs(os.Args[0]); err == nil {\n\t\t\tconf.WorkingDirectory = filepath.Dir(p)\n\t\t}\n\t}\n\n\tif conf.ConfigurationFile == \"\" {\n\t\tconf.ConfigurationFile = conf.WorkingDir(\"conf\", \"app.conf\")\n\t\tconfig := conf.WorkingDir(\"conf\", \"app.conf.example\")\n\t\tif !filetil.FileExists(conf.ConfigurationFile) && filetil.FileExists(config) {\n\t\t\t_ = filetil.CopyFile(conf.ConfigurationFile, config)\n\t\t}\n\t}\n\tif err := gocaptcha.ReadFonts(conf.WorkingDir(\"static\", \"fonts\"), \".ttf\"); err != nil {\n\t\tlog.Fatal(\"读取字体文件时出错 -> \", err)\n\t}\n\n\tif err := web.LoadAppConfig(\"ini\", conf.ConfigurationFile); err != nil {\n\t\tlog.Fatal(\"An error occurred:\", err)\n\t}\n\tif conf.LogFile == \"\" {\n\t\tlogPath, err := filepath.Abs(web.AppConfig.DefaultString(\"log_path\", conf.WorkingDir(\"runtime\", \"logs\")))\n\t\tif err == nil {\n\t\t\tconf.LogFile = logPath\n\t\t} else {\n\t\t\tconf.LogFile = conf.WorkingDir(\"runtime\", \"logs\")\n\t\t}\n\t}\n\n\tconf.AutoLoadDelay = web.AppConfig.DefaultInt(\"config_auto_delay\", 0)\n\tuploads := conf.WorkingDir(\"uploads\")\n\n\t_ = os.MkdirAll(uploads, 0666)\n\n\tweb.BConfig.WebConfig.StaticDir[\"/static\"] = filepath.Join(conf.WorkingDirectory, \"static\")\n\tweb.BConfig.WebConfig.StaticDir[\"/uploads\"] = uploads\n\tweb.BConfig.WebConfig.ViewsPath = conf.WorkingDir(\"views\")\n\tweb.BConfig.WebConfig.Session.SessionCookieSameSite = http.SameSiteDefaultMode\n\tvar upload_file_size = conf.GetUploadFileSize()\n\tif upload_file_size > web.BConfig.MaxUploadSize {\n\t\tweb.BConfig.MaxUploadSize = upload_file_size\n\t}\n\n\tfonts := conf.WorkingDir(\"static\", \"fonts\")\n\n\tif !filetil.FileExists(fonts) {\n\t\tlog.Fatal(\"Font path not exist.\")\n\t}\n\tif err := gocaptcha.ReadFonts(filepath.Join(conf.WorkingDirectory, \"static\", \"fonts\"), \".ttf\"); err != nil {\n\t\tlog.Fatal(\"读取字体失败 ->\", err)\n\t}\n\n\tRegisterDataBase()\n\tRegisterCache()\n\tRegisterModel()\n\tRegisterLogger(conf.LogFile)\n\tmodels.InitializeMissingIndexes()\n\n\tModifyPassword()\n}\n\n// 注册缓存管道\nfunc RegisterCache() {\n\tisOpenCache := web.AppConfig.DefaultBool(\"cache\", false)\n\tif !isOpenCache {\n\t\tcache.Init(&cache.NullCache{})\n\t\treturn\n\t}\n\tlogs.Info(\"正常初始化缓存配置.\")\n\tcacheProvider, _ := web.AppConfig.String(\"cache_provider\")\n\tif cacheProvider == \"file\" {\n\t\tcacheFilePath := web.AppConfig.DefaultString(\"cache_file_path\", \"./runtime/cache/\")\n\t\tif strings.HasPrefix(cacheFilePath, \"./\") {\n\t\t\tcacheFilePath = filepath.Join(conf.WorkingDirectory, string(cacheFilePath[1:]))\n\t\t}\n\t\tfileCache := beegoCache.NewFileCache()\n\n\t\tfileConfig := make(map[string]string, 0)\n\n\t\tfileConfig[\"CachePath\"] = cacheFilePath\n\t\tfileConfig[\"DirectoryLevel\"] = web.AppConfig.DefaultString(\"cache_file_dir_level\", \"2\")\n\t\tfileConfig[\"EmbedExpiry\"] = web.AppConfig.DefaultString(\"cache_file_expiry\", \"120\")\n\t\tfileConfig[\"FileSuffix\"] = web.AppConfig.DefaultString(\"cache_file_suffix\", \".bin\")\n\n\t\tbc, err := json.Marshal(&fileConfig)\n\t\tif err != nil {\n\t\t\tlogs.Error(\"初始化file缓存失败:\", err)\n\t\t\tos.Exit(1)\n\t\t}\n\n\t\t_ = fileCache.StartAndGC(string(bc))\n\n\t\tcache.Init(fileCache)\n\n\t} else if cacheProvider == \"memory\" {\n\t\tcacheInterval := web.AppConfig.DefaultInt(\"cache_memory_interval\", 60)\n\t\tmemory := beegoCache.NewMemoryCache()\n\t\tbeegoCache.DefaultEvery = cacheInterval\n\t\tcache.Init(memory)\n\t} else if cacheProvider == \"redis\" {\n\t\tvar redisConfig struct {\n\t\t\tConn     string `json:\"conn\"`\n\t\t\tPassword string `json:\"password\"`\n\t\t\tDbNum    string `json:\"dbNum\"`\n\t\t\tKey      string `json:\"key\"`\n\t\t}\n\t\t//设置Redis前缀\n\t\tif key := web.AppConfig.DefaultString(\"cache_redis_prefix\", \"\"); key != \"\" {\n\t\t\tredisConfig.Key = key // 设置Redis前缀，替代原来的 redis.DefaultKey\n\t\t}\n\t\tredisConfig.DbNum = \"0\"\n\t\tredisConfig.Conn = web.AppConfig.DefaultString(\"cache_redis_host\", \"\")\n\t\tif pwd := web.AppConfig.DefaultString(\"cache_redis_password\", \"\"); pwd != \"\" {\n\t\t\tredisConfig.Password = pwd\n\t\t}\n\t\tif dbNum := web.AppConfig.DefaultInt(\"cache_redis_db\", 0); dbNum > 0 {\n\t\t\tredisConfig.DbNum = strconv.Itoa(dbNum)\n\t\t}\n\n\t\tbc, err := json.Marshal(&redisConfig)\n\t\tif err != nil {\n\t\t\tlogs.Error(\"初始化Redis缓存失败:\", err)\n\t\t\tos.Exit(1)\n\t\t}\n\t\tredisCache, err := beegoCache.NewCache(\"redis\", string(bc))\n\n\t\tif err != nil {\n\t\t\tlogs.Error(\"初始化Redis缓存失败:\", err)\n\t\t\tos.Exit(1)\n\t\t}\n\n\t\tcache.Init(redisCache)\n\t} else if cacheProvider == \"memcache\" {\n\n\t\tvar memcacheConfig struct {\n\t\t\tConn string `json:\"conn\"`\n\t\t}\n\t\tmemcacheConfig.Conn = web.AppConfig.DefaultString(\"cache_memcache_host\", \"\")\n\n\t\tbc, err := json.Marshal(&memcacheConfig)\n\t\tif err != nil {\n\t\t\tlogs.Error(\"初始化 Memcache 缓存失败 ->\", err)\n\t\t\tos.Exit(1)\n\t\t}\n\t\tmemcache, err := beegoCache.NewCache(\"memcache\", string(bc))\n\n\t\tif err != nil {\n\t\t\tlogs.Error(\"初始化 Memcache 缓存失败 ->\", err)\n\t\t\tos.Exit(1)\n\t\t}\n\n\t\tcache.Init(memcache)\n\n\t} else {\n\t\tcache.Init(&cache.NullCache{})\n\t\tlogs.Warn(\"不支持的缓存管道,缓存将禁用 ->\", cacheProvider)\n\t\treturn\n\t}\n\tlogs.Info(\"缓存初始化完成.\")\n}\n\n// 自动加载配置文件.修改了监听端口号和数据库配置无法自动生效.\nfunc RegisterAutoLoadConfig() {\n\tif conf.AutoLoadDelay > 0 {\n\n\t\twatcher, err := fsnotify.NewWatcher()\n\n\t\tif err != nil {\n\t\t\tlogs.Error(\"创建配置文件监控器失败 ->\", err)\n\t\t}\n\t\tgo func() {\n\t\t\tfor {\n\t\t\t\tselect {\n\t\t\t\tcase ev := <-watcher.Event:\n\t\t\t\t\t//如果是修改了配置文件\n\t\t\t\t\tif ev.IsModify() {\n\t\t\t\t\t\tif err := web.LoadAppConfig(\"ini\", conf.ConfigurationFile); err != nil {\n\t\t\t\t\t\t\tlogs.Error(\"An error occurred ->\", err)\n\t\t\t\t\t\t\tcontinue\n\t\t\t\t\t\t}\n\t\t\t\t\t\tRegisterCache()\n\t\t\t\t\t\tRegisterLogger(\"\")\n\t\t\t\t\t\tlogs.Info(\"配置文件已加载 ->\", conf.ConfigurationFile)\n\t\t\t\t\t} else if ev.IsRename() {\n\t\t\t\t\t\t_ = watcher.WatchFlags(conf.ConfigurationFile, fsnotify.FSN_MODIFY|fsnotify.FSN_RENAME)\n\t\t\t\t\t}\n\t\t\t\t\tlogs.Info(ev.String())\n\t\t\t\tcase err := <-watcher.Error:\n\t\t\t\t\tlogs.Error(\"配置文件监控器错误 ->\", err)\n\n\t\t\t\t}\n\t\t\t}\n\t\t}()\n\n\t\terr = watcher.WatchFlags(conf.ConfigurationFile, fsnotify.FSN_MODIFY|fsnotify.FSN_RENAME)\n\n\t\tif err != nil {\n\t\t\tlogs.Error(\"监控配置文件失败 ->\", err)\n\t\t}\n\t}\n}\n\n// 注册错误处理方法.\nfunc RegisterError() {\n\tweb.ErrorHandler(\"404\", func(writer http.ResponseWriter, request *http.Request) {\n\t\tvar buf bytes.Buffer\n\n\t\tdata := make(map[string]interface{})\n\t\tdata[\"ErrorCode\"] = 404\n\t\tdata[\"ErrorMessage\"] = \"页面未找到或已删除\"\n\n\t\tif err := web.ExecuteViewPathTemplate(&buf, \"errors/error.tpl\", web.BConfig.WebConfig.ViewsPath, data); err == nil {\n\t\t\t_, _ = fmt.Fprint(writer, buf.String())\n\t\t} else {\n\t\t\t_, _ = fmt.Fprint(writer, data[\"ErrorMessage\"])\n\t\t}\n\t})\n\tweb.ErrorHandler(\"401\", func(writer http.ResponseWriter, request *http.Request) {\n\t\tvar buf bytes.Buffer\n\n\t\tdata := make(map[string]interface{})\n\t\tdata[\"ErrorCode\"] = 401\n\t\tdata[\"ErrorMessage\"] = \"请与 Web 服务器的管理员联系，以确认您是否具有访问所请求资源的权限。\"\n\n\t\tif err := web.ExecuteViewPathTemplate(&buf, \"errors/error.tpl\", web.BConfig.WebConfig.ViewsPath, data); err == nil {\n\t\t\t_, _ = fmt.Fprint(writer, buf.String())\n\t\t} else {\n\t\t\t_, _ = fmt.Fprint(writer, data[\"ErrorMessage\"])\n\t\t}\n\t})\n}\n\nfunc init() {\n\n\tif configPath, err := filepath.Abs(conf.ConfigurationFile); err == nil {\n\t\tconf.ConfigurationFile = configPath\n\t}\n\tif err := gocaptcha.ReadFonts(conf.WorkingDir(\"static\", \"fonts\"), \".ttf\"); err != nil {\n\t\tlog.Fatal(\"读取字体文件失败 ->\", err)\n\t}\n\tgob.Register(models.Member{})\n\n\tif p, err := filepath.Abs(os.Args[0]); err == nil {\n\t\tconf.WorkingDirectory = filepath.Dir(p)\n\t}\n}\n"
  },
  {
    "path": "commands/daemon/daemon.go",
    "content": "package daemon\n\nimport (\n\t\"fmt\"\n\t\"os\"\n\t\"path/filepath\"\n\n\t\"github.com/beego/beego/v2/core/logs\"\n\t\"github.com/beego/beego/v2/server/web\"\n\t\"github.com/kardianos/service\"\n\n\t\"github.com/mindoc-org/mindoc/commands\"\n\t\"github.com/mindoc-org/mindoc/conf\"\n\t\"github.com/mindoc-org/mindoc/controllers\"\n)\n\ntype Daemon struct {\n\tconfig *service.Config\n\terrs   chan error\n}\n\nfunc NewDaemon() *Daemon {\n\n\tconfig := &service.Config{\n\t\tName:             \"mindocd\",                               //服务显示名称\n\t\tDisplayName:      \"MinDoc service\",                        //服务名称\n\t\tDescription:      \"A document online management program.\", //服务描述\n\t\tWorkingDirectory: conf.WorkingDirectory,\n\t\tArguments:        os.Args[1:],\n\t}\n\n\treturn &Daemon{\n\t\tconfig: config,\n\t\terrs:   make(chan error, 100),\n\t}\n}\n\nfunc (d *Daemon) Config() *service.Config {\n\treturn d.config\n}\nfunc (d *Daemon) Start(s service.Service) error {\n\n\tgo d.Run()\n\treturn nil\n}\n\nfunc (d *Daemon) Run() {\n\n\tcommands.ResolveCommand(d.config.Arguments)\n\n\tcommands.RegisterFunction()\n\n\tcommands.RegisterAutoLoadConfig()\n\n\tcommands.RegisterError()\n\n\tweb.ErrorController(&controllers.ErrorController{})\n\n\tf, err := filepath.Abs(os.Args[0])\n\n\tif err != nil {\n\t\tf = os.Args[0]\n\t}\n\n\tfmt.Printf(\"MinDoc version => %s\\nbuild time => %s\\nstart directory => %s\\n%s\\n\", conf.VERSION, conf.BUILD_TIME, f, conf.GO_VERSION)\n\n\tweb.Run()\n}\n\nfunc (d *Daemon) Stop(s service.Service) error {\n\tif service.Interactive() {\n\t\tos.Exit(0)\n\t}\n\treturn nil\n}\n\nfunc Install() {\n\td := NewDaemon()\n\td.config.Arguments = os.Args[3:]\n\n\ts, err := service.New(d, d.config)\n\n\tif err != nil {\n\t\tlogs.Error(\"Create service error => \", err)\n\t\tos.Exit(1)\n\t}\n\terr = s.Install()\n\tif err != nil {\n\t\tlogs.Error(\"Install service error:\", err)\n\t\tos.Exit(1)\n\t} else {\n\t\tlogs.Info(\"Service installed!\")\n\t}\n\n\tos.Exit(0)\n}\n\nfunc Uninstall() {\n\td := NewDaemon()\n\ts, err := service.New(d, d.config)\n\n\tif err != nil {\n\t\tlogs.Error(\"Create service error => \", err)\n\t\tos.Exit(1)\n\t}\n\terr = s.Uninstall()\n\tif err != nil {\n\t\tlogs.Error(\"Install service error:\", err)\n\t\tos.Exit(1)\n\t} else {\n\t\tlogs.Info(\"Service uninstalled!\")\n\t}\n\tos.Exit(0)\n}\n\nfunc Restart() {\n\td := NewDaemon()\n\ts, err := service.New(d, d.config)\n\n\tif err != nil {\n\t\tlogs.Error(\"Create service error => \", err)\n\t\tos.Exit(1)\n\t}\n\terr = s.Restart()\n\tif err != nil {\n\t\tlogs.Error(\"Install service error:\", err)\n\t\tos.Exit(1)\n\t} else {\n\t\tlogs.Info(\"Service Restart!\")\n\t}\n\tos.Exit(0)\n}\n"
  },
  {
    "path": "commands/install.go",
    "content": "package commands\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\t\"os\"\n\t\"time\"\n\n\t\"flag\"\n\n\t\"github.com/beego/beego/v2/client/orm\"\n\t\"github.com/beego/beego/v2/core/logs\"\n\t\"github.com/beego/beego/v2/server/web\"\n\t\"github.com/beego/i18n\"\n\t\"github.com/mindoc-org/mindoc/conf\"\n\t\"github.com/mindoc-org/mindoc/models\"\n\t\"github.com/mindoc-org/mindoc/utils\"\n)\n\n//系统安装.\nfunc Install() {\n\n\tfmt.Println(\"Initializing...\")\n\n\terr := orm.RunSyncdb(\"default\", false, true)\n\tif err == nil {\n\t\tinitialization()\n\t} else {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Println(\"Install Successfully!\")\n\tos.Exit(0)\n\n}\n\nfunc Version() {\n\tif len(os.Args) >= 2 && os.Args[1] == \"version\" {\n\t\tfmt.Println(conf.VERSION)\n\t\tos.Exit(0)\n\t}\n}\n\n//修改用户密码\nfunc ModifyPassword() {\n\tvar account, password string\n\n\t//账号和密码需要解析参数后才能获取\n\tif len(os.Args) >= 2 && os.Args[1] == \"password\" {\n\t\tflagSet := flag.NewFlagSet(\"MinDoc command: \", flag.ExitOnError)\n\n\t\tflagSet.StringVar(&account, \"account\", \"\", \"用户账号.\")\n\t\tflagSet.StringVar(&password, \"password\", \"\", \"用户密码.\")\n\n\t\tif err := flagSet.Parse(os.Args[2:]); err != nil {\n\t\t\tlogs.Error(\"解析参数失败 -> \", err)\n\t\t\tos.Exit(1)\n\t\t}\n\n\t\tif len(os.Args) < 2 {\n\t\t\tfmt.Println(\"Parameter error.\")\n\t\t\tos.Exit(1)\n\t\t}\n\n\t\tif account == \"\" {\n\t\t\tfmt.Println(\"Account cannot be empty.\")\n\t\t\tos.Exit(1)\n\t\t}\n\t\tif password == \"\" {\n\t\t\tfmt.Println(\"Password cannot be empty.\")\n\t\t\tos.Exit(1)\n\t\t}\n\t\tmember, err := models.NewMember().FindByAccount(account)\n\n\t\tif err != nil {\n\t\t\tfmt.Println(\"Failed to change password:\", err)\n\t\t\tos.Exit(1)\n\t\t}\n\t\tpwd, err := utils.PasswordHash(password)\n\n\t\tif err != nil {\n\t\t\tfmt.Println(\"Failed to change password:\", err)\n\t\t\tos.Exit(1)\n\t\t}\n\t\tmember.Password = pwd\n\n\t\terr = member.Update(\"password\")\n\t\tif err != nil {\n\t\t\tfmt.Println(\"Failed to change password:\", err)\n\t\t\tos.Exit(1)\n\t\t}\n\t\tfmt.Println(\"Successfully modified.\")\n\t\tos.Exit(0)\n\t}\n\n}\n\n//初始化数据\nfunc initialization() {\n\n\terr := models.NewOption().Init()\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\n\tlang, _ := web.AppConfig.String(\"default_lang\")\n\terr = i18n.SetMessage(lang, \"conf/lang/\"+lang+\".ini\")\n\tif err != nil {\n\t\tpanic(fmt.Errorf(\"initialize locale error: %s\", err))\n\t}\n\n\tmember, err := models.NewMember().FindByFieldFirst(\"account\", \"admin\")\n\tif errors.Is(err, orm.ErrNoRows) {\n\n\t\t// create admin user\n\t\tlogs.Info(\"creating admin user\")\n\t\tmember.Account = \"admin\"\n\t\tmember.Avatar = conf.URLForWithCdnImage(\"/static/images/headimgurl.jpg\")\n\t\tmember.Password = \"123456\"\n\t\tmember.AuthMethod = \"local\"\n\t\tmember.Role = conf.MemberSuperRole\n\t\tmember.Email = \"admin@iminho.me\"\n\n\t\tif err := member.Add(); err != nil {\n\t\t\tpanic(\"Member.Add => \" + err.Error())\n\t\t}\n\n\t\t// create demo book\n\t\tlogs.Info(\"creating demo book\")\n\t\tbook := models.NewBook()\n\n\t\tbook.MemberId = member.MemberId\n\t\tbook.BookName = i18n.Tr(lang, \"init.default_proj_name\") //\"MinDoc演示项目\"\n\t\tbook.Status = 0\n\t\tbook.ItemId = 1\n\t\tbook.Description = i18n.Tr(lang, \"init.default_proj_desc\") //\"这是一个MinDoc演示项目，该项目是由系统初始化时自动创建。\"\n\t\tbook.CommentCount = 0\n\t\tbook.PrivatelyOwned = 0\n\t\tbook.CommentStatus = \"closed\"\n\t\tbook.Identify = \"mindoc\"\n\t\tbook.DocCount = 0\n\t\tbook.CommentCount = 0\n\t\tbook.Version = time.Now().Unix()\n\t\tbook.Cover = conf.GetDefaultCover()\n\t\tbook.Editor = \"markdown\"\n\t\tbook.Theme = \"default\"\n\n\t\tif err := book.Insert(lang); err != nil {\n\t\t\tpanic(\"初始化项目失败 -> \" + err.Error())\n\t\t}\n\t} else if err != nil {\n\t\tpanic(fmt.Errorf(\"occur errors when initialize: %s\", err))\n\t}\n\n\tif !models.NewItemsets().Exist(1) {\n\t\titem := models.NewItemsets()\n\t\titem.ItemName = i18n.Tr(lang, \"init.default_proj_space\") //\"默认项目空间\"\n\t\titem.MemberId = 1\n\t\tif err := item.Save(); err != nil {\n\t\t\tpanic(\"初始化项目空间失败 -> \" + err.Error())\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "commands/migrate/migrate.go",
    "content": "// Copyright 2013 bee authors\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\"): you may\n// not use this file except in compliance with the License. You may obtain\n// a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\n// License for the specific language governing permissions and limitations\n// under the License.\n\npackage migrate\n\nimport (\n\t\"os\"\n\n\t\"container/list\"\n\t\"fmt\"\n\t\"log\"\n\n\t\"github.com/beego/beego/v2/client/orm\"\n\t\"github.com/beego/beego/v2/server/web\"\n\t\"github.com/mindoc-org/mindoc/models\"\n)\n\nvar (\n\tmigrationList = &migrationCache{}\n)\n\ntype MigrationDatabase interface {\n\t//获取当前的版本\n\tVersion() int64\n\t//校验当前是否可更新\n\tValidUpdate(version int64) error\n\t//校验并备份表结构\n\tValidForBackupTableSchema() error\n\t//校验并更新表结构\n\tValidForUpdateTableSchema() error\n\t//恢复旧数据\n\tMigrationOldTableData() error\n\t//插入新数据\n\tMigrationNewTableData() error\n\t//增加迁移记录\n\tAddMigrationRecord(version int64) error\n\t//最后的清理工作\n\tMigrationCleanup() error\n\t//回滚本次迁移\n\tRollbackMigration() error\n}\n\ntype migrationCache struct {\n\titems *list.List\n}\n\nfunc RunMigration() {\n\n\tif len(os.Args) >= 2 && os.Args[1] == \"migrate\" {\n\n\t\tmigrate, err := models.NewMigration().FindFirst()\n\n\t\tif err != nil {\n\t\t\t//log.Fatalf(\"migrations table %s\", err)\n\t\t\tmigrate = models.NewMigration()\n\t\t}\n\t\tfmt.Println(\"Start migration databae... \")\n\n\t\tfor el := migrationList.items.Front(); el != nil; el = el.Next() {\n\n\t\t\t//如果存在比当前版本大的版本，则依次升级\n\t\t\tif item, ok := el.Value.(MigrationDatabase); ok && item.Version() > migrate.Version {\n\t\t\t\terr := item.ValidUpdate(migrate.Version)\n\t\t\t\tif err != nil {\n\t\t\t\t\tlog.Fatal(err)\n\t\t\t\t}\n\t\t\t\terr = item.ValidForBackupTableSchema()\n\t\t\t\tif err != nil {\n\t\t\t\t\titem.RollbackMigration()\n\t\t\t\t\tlog.Fatal(err)\n\t\t\t\t}\n\t\t\t\terr = item.ValidForUpdateTableSchema()\n\t\t\t\tif err != nil {\n\t\t\t\t\titem.RollbackMigration()\n\t\t\t\t\tlog.Fatal(err)\n\t\t\t\t}\n\t\t\t\terr = item.MigrationOldTableData()\n\t\t\t\tif err != nil {\n\t\t\t\t\titem.RollbackMigration()\n\t\t\t\t\tlog.Fatal(err)\n\t\t\t\t}\n\t\t\t\terr = item.MigrationNewTableData()\n\t\t\t\tif err != nil {\n\t\t\t\t\titem.RollbackMigration()\n\t\t\t\t\tlog.Fatal(err)\n\t\t\t\t}\n\t\t\t\terr = item.AddMigrationRecord(item.Version())\n\t\t\t\tif err != nil {\n\t\t\t\t\titem.RollbackMigration()\n\t\t\t\t\tlog.Fatal(err)\n\t\t\t\t}\n\t\t\t\terr = item.MigrationCleanup()\n\t\t\t\tif err != nil {\n\t\t\t\t\titem.RollbackMigration()\n\t\t\t\t\tlog.Fatal(err)\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tfmt.Println(\"Migration successfull.\")\n\t\tos.Exit(0)\n\t}\n}\n\n//导出数据库的表结构\nfunc ExportDatabaseTable() ([]string, error) {\n\tdbadapter, _ := web.AppConfig.String(\"db_adapter\")\n\tdbdatabase, _ := web.AppConfig.String(\"db_database\")\n\ttables := make([]string, 0)\n\n\to := orm.NewOrm()\n\tswitch dbadapter {\n\tcase \"mysql\":\n\t\t{\n\t\t\tvar lists []orm.Params\n\n\t\t\t_, err := o.Raw(fmt.Sprintf(\"SELECT TABLE_NAME FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA = '%s'\", dbdatabase)).Values(&lists)\n\t\t\tif err != nil {\n\t\t\t\treturn tables, err\n\t\t\t}\n\t\t\tfor _, table := range lists {\n\t\t\t\tvar results []orm.Params\n\n\t\t\t\t_, err = o.Raw(fmt.Sprintf(\"show create table %s\", table[\"TABLE_NAME\"])).Values(&results)\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn tables, err\n\t\t\t\t}\n\t\t\t\ttables = append(tables, results[0][\"Create Table\"].(string))\n\t\t\t}\n\t\t\tbreak\n\t\t}\n\tcase \"sqlite3\":\n\t\t{\n\t\t\tvar results []orm.Params\n\t\t\t_, err := o.Raw(\"SELECT sql FROM sqlite_master WHERE sql IS NOT NULL ORDER BY rootpage ASC\").Values(&results)\n\t\t\tif err != nil {\n\t\t\t\treturn tables, err\n\t\t\t}\n\t\t\tfor _, item := range results {\n\t\t\t\tif sql, ok := item[\"sql\"]; ok {\n\t\t\t\t\ttables = append(tables, sql.(string))\n\t\t\t\t}\n\t\t\t}\n\t\t\tbreak\n\t\t}\n\n\t}\n\treturn tables, nil\n}\n\nfunc RegisterMigration() {\n\tmigrationList.items = list.New()\n\n\tmigrationList.items.PushBack(NewMigrationVersion03())\n}\n"
  },
  {
    "path": "commands/migrate/migrate_v03.go",
    "content": "package migrate\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\t\"strings\"\n\t\"time\"\n\n\t\"github.com/beego/beego/v2/client/orm\"\n\t\"github.com/mindoc-org/mindoc/models\"\n)\n\ntype MigrationVersion03 struct {\n\tisValid bool\n\ttables  []string\n}\n\nfunc NewMigrationVersion03() *MigrationVersion03 {\n\treturn &MigrationVersion03{isValid: false, tables: make([]string, 0)}\n}\n\nfunc (m *MigrationVersion03) Version() int64 {\n\treturn 201705271114\n}\n\nfunc (m *MigrationVersion03) ValidUpdate(version int64) error {\n\tif m.Version() > version {\n\t\tm.isValid = true\n\t\treturn nil\n\t}\n\tm.isValid = false\n\treturn errors.New(\"The target version is higher than the current version.\")\n}\n\nfunc (m *MigrationVersion03) ValidForBackupTableSchema() error {\n\tif !m.isValid {\n\t\treturn errors.New(\"The current version failed to verify.\")\n\t}\n\tvar err error\n\tm.tables, err = ExportDatabaseTable()\n\n\treturn err\n}\n\nfunc (m *MigrationVersion03) ValidForUpdateTableSchema() error {\n\tif !m.isValid {\n\t\treturn errors.New(\"The current version failed to verify.\")\n\t}\n\n\terr := orm.RunSyncdb(\"default\", false, true)\n\n\tif err != nil {\n\t\treturn err\n\t}\n\n\t//_,err = o.Raw(\"ALTER TABLE md_members ADD auth_method VARCHAR(50) DEFAULT 'local' NULL\").Exec()\n\n\treturn err\n}\n\nfunc (m *MigrationVersion03) MigrationOldTableData() error {\n\tif !m.isValid {\n\t\treturn errors.New(\"The current version failed to verify.\")\n\t}\n\treturn nil\n}\n\nfunc (m *MigrationVersion03) MigrationNewTableData() error {\n\tif !m.isValid {\n\t\treturn errors.New(\"The current version failed to verify.\")\n\t}\n\to := orm.NewOrm()\n\n\t_, err := o.Raw(\"UPDATE md_members SET auth_method = 'local'\").Exec()\n\tif err != nil {\n\t\treturn err\n\t}\n\t_, err = o.Raw(\"INSERT INTO md_options (option_title, option_name, option_value) SELECT '是否启用文档历史','ENABLE_DOCUMENT_HISTORY','true' WHERE NOT exists(SELECT * FROM md_options WHERE option_name = 'ENABLE_DOCUMENT_HISTORY');\").Exec()\n\tif err != nil {\n\t\treturn err\n\t}\n\treturn nil\n}\n\nfunc (m *MigrationVersion03) AddMigrationRecord(version int64) error {\n\to := orm.NewOrm()\n\ttables, err := ExportDatabaseTable()\n\n\tif err != nil {\n\t\treturn err\n\t}\n\tmigration := models.NewMigration()\n\tmigration.Version = version\n\tmigration.Status = \"update\"\n\tmigration.CreateTime = time.Now()\n\tmigration.Name = fmt.Sprintf(\"update_%d\", version)\n\tmigration.Statements = strings.Join(tables, \"\\r\\n\")\n\n\t_, err = o.Insert(migration)\n\n\treturn err\n}\n\nfunc (m *MigrationVersion03) MigrationCleanup() error {\n\n\treturn nil\n}\n\nfunc (m *MigrationVersion03) RollbackMigration() error {\n\tif !m.isValid {\n\t\treturn errors.New(\"The current version failed to verify.\")\n\t}\n\to := orm.NewOrm()\n\t_, err := o.Raw(\"ALTER TABLE md_members DROP COLUMN auth_method\").Exec()\n\tif err != nil {\n\t\treturn err\n\t}\n\n\t_, err = o.Raw(\"DROP TABLE md_document_history\").Exec()\n\tif err != nil {\n\t\treturn err\n\t}\n\t_, err = o.Raw(\"DELETE md_options WHERE option_name = 'ENABLE_DOCUMENT_HISTORY'\").Exec()\n\n\tif err != nil {\n\t\treturn err\n\t}\n\n\treturn nil\n}\n"
  },
  {
    "path": "commands/update.go",
    "content": "package commands\n\nimport (\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"github.com/mindoc-org/mindoc/models\"\n\t\"io/ioutil\"\n\t\"net/http\"\n\t\"os\"\n\n\t\"github.com/beego/beego/v2/client/orm\"\n\t\"github.com/beego/beego/v2/core/logs\"\n\t\"github.com/mindoc-org/mindoc/conf\"\n)\n\n// 检查最新版本.\nfunc CheckUpdate() {\n\n\tfmt.Println(\"MinDoc current version => \", conf.VERSION)\n\n\tresp, err := http.Get(\"https://api.github.com/repos/mindoc-org/mindoc/tags\")\n\n\tif err != nil {\n\t\tlogs.Error(\"CheckUpdate => \", err)\n\t\tos.Exit(1)\n\t}\n\n\tdefer resp.Body.Close()\n\tbody, err := ioutil.ReadAll(resp.Body)\n\tif err != nil {\n\t\tlogs.Error(\"CheckUpdate => \", err)\n\t\tos.Exit(1)\n\t}\n\n\tvar result []*struct {\n\t\tName string `json:\"name\"`\n\t}\n\n\terr = json.Unmarshal(body, &result)\n\tif err != nil {\n\t\tlogs.Error(\"CheckUpdate => \", err)\n\t\tos.Exit(0)\n\t}\n\n\tif len(result) > 0 {\n\t\tfmt.Println(\"MinDoc last version => \", result[0].Name)\n\t}\n\n\tos.Exit(0)\n\n}\n\nfunc Update() {\n\tfmt.Println(\"Update...\")\n\tRegisterDataBase()\n\tRegisterModel()\n\terr := orm.RunSyncdb(\"default\", false, true)\n\tif err == nil {\n\t\tUpdateInitialization()\n\t} else {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Println(\"Update Successfully!\")\n\tos.Exit(0)\n}\nfunc UpdateInitialization() {\n\terr := models.NewOption().Update()\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n}\n"
  },
  {
    "path": "conf/app.conf.example",
    "content": "appname = mindoc\n\n#默认监听的网卡,为空则监听所有\nhttpaddr=\"${MINDOC_ADDR}\"\nhttpport = \"${MINDOC_PORT||8181}\"\nrunmode = \"${MINDOC_RUN_MODE||dev}\"\nsessionon = true\nsessionname = mindoc_id\ncopyrequestbody = true\nenablexsrf = \"${MINDOC_ENABLE_XSRF||false}\"\nenable_iframe = \"${MINDOC_ENABLE_IFRAME||false}\"\n\n#系统完整URL(http://doc.iminho.me),如果该项不设置，会从请求头中获取地址。\nbaseurl=\"${MINDOC_BASE_URL}\"\n\n\n#########代码高亮样式################\n#样式演示地址：https://highlightjs.org/static/demo/\nhighlight_style=\"${MINDOC_HIGHLIGHT_STYLE||github}\"\n\n########配置文件自动加载##################\n#大于0时系统会自动检测配置文件是否变动，变动后自动加载并生效,单位是秒。监听端口和数据库配置无效\nconfig_auto_delay=\"${MINDOC_CONFIG_AUTO_DELAY||20}\"\n\n#发布pdf时候的默认发布者（项目填写了公司名称以公司名称为准）\npublisher_def =\n\n########Session储存方式##############\n\n#默认Session生成Key的秘钥\nbeegoserversessionkey=NY1B$28pms12JM&c\nsessionprovider=\"${MINDOC_SESSION_PROVIDER||file}\"\nsessionproviderconfig=\"${MINDOC_SESSION_PROVIDER_CONFIG||./runtime/session}\"\n#默认的过期时间\nsessiongcmaxlifetime=\"${MINDOC_SESSION_MAX_LIFETIME||3600}\"\n\n#以文件方式储存\n#sessionprovider=file\n#sessionproviderconfig=./runtime/session\n\n#以redis方式储存\n#sessionprovider=redis\n#sessionproviderconfig=127.0.0.1:6379\n\n#以memcache方式储存\n#sessionprovider=memcache\n#sessionproviderconfig=127.0.0.1:11211\n\n#以内存方式托管Session\n#sessionprovider=memory\n\n#时区设置\ntimezone = Asia/Shanghai\n\n####################MySQL 数据库配置###########################\n#支持MySQL，sqlite3，postgres三种数据库，如果是sqlite3 则 db_database 标识数据库的物理目录\ndb_adapter=\"${MINDOC_DB_ADAPTER||sqlite3}\"\ndb_host=\"${MINDOC_DB_HOST||127.0.0.1}\"\ndb_port=\"${MINDOC_DB_PORT||3306}\"\ndb_database=\"${MINDOC_DB_DATABASE||./database/mindoc.db}\"\ndb_username=\"${MINDOC_DB_USERNAME||root}\"\ndb_password=\"${MINDOC_DB_PASSWORD||123456}\"\n#是否使用SSL，支持posgres，可选的值有：\n#disable - No SSL\n#require - Always SSL (skip verification)\n#verify-ca - Always SSL (verify that the certificate presented by the server was signed by a trusted CA)\n#verify-full - Always SSL (verify that the certification presented by the server was signed by a trusted CA and the server host name matches the one in the certificate)\ndb_sslmode=\"${MINDOC_DB_SSLMODE||disable}\"\n\n####################sqlite3 数据库配置###########################\n#db_adapter=sqlite3\n#db_database=./database/mindoc.db\n\n#项目默认封面\ncover=/static/images/book.jpg\n\n#默认头像\navatar=/static/images/headimgurl.jpg\n\n#默认阅读令牌长度\ntoken_size=12\n\n#上传文件的后缀,如果不限制后缀可以设置为 *\nupload_file_ext=txt|doc|docx|xls|xlsx|ppt|pptx|pdf|7z|rar|jpg|jpeg|png|gif|mp4|webm|avi\n\n#上传的文件大小限制\n# - 如果不填写, 则默认1GB，如果希望超过1GB，必须带单位\n# - 如果填写，单位可以是 TB、GB、MB、KB，不带单位表示字节\nupload_file_size=10MB\n\n####################邮件配置######################\n#是否启用邮件\nenable_mail=\"${MINDOC_ENABLE_MAIL||false}\"\n#每小时限制指定邮箱邮件发送次数\nmail_number=\"${MINDOC_MAIL_NUMBER||5}\"\n#smtp服务用户名\nsmtp_user_name=\"${MINDOC_SMTP_USER_NAME||admin@iminho.me}\"\n#smtp服务器地址\nsmtp_host=\"${MINDOC_SMTP_HOST||smtp.163.com}\"\"\n#smtp密码\nsmtp_password=\"${MINDOC_SMTP_PASSWORD}\"\n#端口号\nsmtp_port=\"${MINDOC_SMTP_PORT||25}\"\"\n#发送邮件的显示名称\nform_user_name=\"${MINDOC_FORM_USERNAME||admin@iminho.me}\"\n#邮件有效期30分钟\nmail_expired=\"${MINDOC_EXPIRED||30}\"\n#加密类型NONE 无认证、SSL 加密、LOGIN 普通用户登录\nsecure=\"${MINDOC_MAIL_SECURE||LOGIN}\"\n\n###############配置导出项目###################\nenable_export=\"${MINDOC_ENABLE_EXPORT||false}\"\n#同一个项目同时运行导出程序的并行数量，取值1-4之间，取值越大导出速度越快，越占用资源\nexport_process_num=\"${MINDOC_EXPORT_PROCESS_NUM||1}\"\n\n#并发导出的项目限制，指同一时间限制的导出项目数量，如果为0则不限制。设置的越大，越占用资源\nexport_limit_num=\"${MINDOC_EXPORT_LIMIT_NUM||5}\"\n\n#指同时等待导出的任务数量\nexport_queue_limit_num=\"${MINDOC_EXPORT_QUEUE_LIMIT_NUM||100}\"\n\n#导出项目的缓存目录配置\nexport_output_path=\"${MINDOC_EXPORT_OUTPUT_PATH||./runtime/cache}\"\n\n################百度地图密钥#################\nbaidumapkey=\n\n################Active Directory/LDAP################\n#是否启用ldap\nldap_enable=${MINDOC_LDAP_ENABLE||false}\n#ldap协议(ldap/ldaps)\nldap_scheme=\"${MINDOC_LDAP_SCHEME||ldap}\"\n#ldap主机名\nldap_host=\"${MINDOC_LDAP_HOST||127.0.0.1}\"\n#ldap端口\nldap_port=${MINDOC_LDAP_PORT||389}\n#ldap内哪个属性作为用户名\nldap_account=\"${MINDOC_LDAP_ACCOUNT||sAMAccountName}\"\n#ldap内哪个属性作为邮箱\nldap_mail=\"${MINDOC_LDAP_MAIL||mail}\"\n#搜索范围\nldap_base=\"${MINDOC_LDAP_BASE||dc=example,dc=com}\"\n#第一次绑定ldap用户dn\nldap_user=\"${MINDOC_LDAP_USER||cn=ldap helper,ou=example.com,dc=example,dc=com}\"\n#第一次绑定ldap用户密码\nldap_password=\"${MINDOC_LDAP_PASSWORD||xxx}\"\n#自动注册用户角色：0 超级管理员 /1 管理员/ 2 普通用户/ 3 只读用户\nldap_user_role=${MINDOC_LDAP_USER_ROLE||2}\n#ldap搜索filter规则,AD服务器: objectClass=User, openldap服务器: objectClass=posixAccount ,也可以定义为其他属性,如: title=mindoc\nldap_filter=\"${MINDOC_LDAP_FILTER||objectClass=posixAccount}\"\n\n############# HTTP自定义接口登录 ################\nhttp_login_url=\n#md5计算的秘钥\nhttp_login_secret=hzsp*THJUqwbCU%s\n##################################\n\n###############配置CDN加速##################\ncdn=\"${MINDOC_CDN_URL}\"\ncdnjs=\"${MINDOC_CDN_JS_URL}\"\ncdncss=\"${MINDOC_CDN_CSS_URL}\"\ncdnimg=\"${MINDOC_CDN_IMG_URL}\"\n\n######################缓存配置###############################\n\n#是否开启缓存，true 开启/false 不开启\ncache=\"${MINDOC_CACHE||false}\"\n\n#缓存方式:memory/memcache/redis/file\ncache_provider=\"${MINDOC_CACHE_PROVIDER||file}\"\n\n#当配置缓存方式为memory时,内存回收时间,单位是秒\ncache_memory_interval=\"${MINDOC_CACHE_MEMORY_INTERVAL||120}\"\n\n#当缓存方式配置为file时,缓存的储存目录\ncache_file_path=\"${MINDOC_CACHE_FILE_PATH||./runtime/cache/}\"\n\n#缓存文件后缀\ncache_file_suffix=\"${MINDOC_CACHE_FILE_SUFFIX||.bin}\"\n\n#文件缓存目录层级\ncache_file_dir_level=\"${MINDOC_CACHE_FILE_DIR_LEVEL||2}\"\n\n#文件缓存的默认过期时间\ncache_file_expiry=\"${MINDOC_CACHE_FILE_EXPIRY||3600}\"\n\n#memcache缓存服务器地址\ncache_memcache_host=\"${MINDOC_CACHE_MEMCACHE_HOST||127.0.0.1:11211}\"\n\n#redis服务器地址\ncache_redis_host=\"${MINDOC_CACHE_REDIS_HOST||127.0.0.1:6379}\"\n\n#redis数据库索引\ncache_redis_db=\"${MINDOC_CACHE_REDIS_DB||0}\"\n\n#redis服务器密码\ncache_redis_password=\"${MINDOC_CACHE_REDIS_PASSWORD}\"\n\n#缓存键的前缀\ncache_redis_prefix=\"${MINDOC_CACHE_REDIS_PREFIX||mindoc::cache}\"\n\n\n#########日志储存配置##############\n\n#日志保存路径，在linux上，自动创建的日志文件请不要删除，否则将无法写入日志\nlog_path=\"${MINDOC_LOG_PATH||./runtime/logs}\"\n\n#每个文件保存的最大行数，默认值 1000000\nlog_maxlines=\"${MINDOC_LOG_MAX_LINES||1000000}\"\n\n# 每个文件保存的最大尺寸，默认值是 1 << 28, //256 MB\nlog_maxsize=\"${MINDOC_LOG_MAX_SIZE}\"\n\n# 是否按照每天 logrotate，默认是 true\nlog_daily=\"${MINDOC_LOG_DAILY||true}\"\n\n# 文件最多保存多少天，默认保存 7 天\nlog_maxdays=\"${MINDOC_LOG_MAX_DAYS||30}\"\n\n# 日志保存的时候的级别，默认是 Trace 级别,可选值： Emergency/Alert/Critical/Error/Warning/Notice/Informational/Debug/Trace\nlog_level=\"${MINDOC_LOG_LEVEL||Alert}\"\n\n# 是否异步生成日志，默认是 true\nlog_is_async=\"${MINDOC_LOG_IS_ASYNC||TRUE}\"\n\n##########钉钉应用相关配置##############\n\n# 企业钉钉ID\ndingtalk_corpid=\"${MINDOC_DINGTALK_CORPID}\"\n\n# 钉钉AppKey\ndingtalk_app_key=\"${MINDOC_DINGTALK_APPKEY}\"\n\n# 钉钉AppSecret\ndingtalk_app_secret=\"${MINDOC_DINGTALK_APPSECRET}\"\n\n########企业微信登录配置##############\n\n# 企业ID\nworkweixin_corpid=\"${MINDOC_WORKWEIXIN_CORPID}\"\n\n# 应用ID\nworkweixin_agentid=\"${MINDOC_WORKWEIXIN_AGENTID}\"\n\n# 应用密钥\nworkweixin_secret=\"${MINDOC_WORKWEIXIN_SECRET}\"\n\n# i18n config\ni18n_list=zh-cn:简体中文|en-us:English|ru-ru:Русский\ndefault_lang=\"zh-cn\"\n\n# MCP Server 功能\nenable_mcp_server=\"${MINDOC_ENABLE_MCP_SERVER||false}\"\nmcp_api_key=\"${MINDOC_MCP_API_KEY||demo-mcp-api-key}\"\n"
  },
  {
    "path": "conf/enumerate.go",
    "content": "// package conf 为配置相关.\npackage conf\n\nimport (\n\t\"strings\"\n\n\t\"fmt\"\n\t\"os\"\n\t\"path/filepath\"\n\t\"strconv\"\n\n\t\"github.com/beego/beego/v2/server/web\"\n)\n\n// 登录用户的Session名\nconst LoginSessionName = \"LoginSessionName\"\n\nconst CaptchaSessionName = \"__captcha__\"\n\nconst RegexpEmail = \"^[a-zA-Z0-9.!#$%&'*+\\\\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$\"\n\n// 允许用户名中出现点号\nconst RegexpAccount = `^[a-zA-Z0-9][a-zA-Z0-9\\.-]{2,50}$`\n\n// PageSize 默认分页条数.\nconst PageSize = 10\n\n// 用户权限\nconst (\n\t// 超级管理员.\n\tMemberSuperRole SystemRole = iota\n\t//普通管理员.\n\tMemberAdminRole\n\t//普通用户.\n\tMemberGeneralRole\n\t//只读用户.\n\tMemberReaderRole\n)\n\n// 系统角色\ntype SystemRole int\n\nconst (\n\t// 创始人.\n\tBookFounder BookRole = iota\n\t//管理者\n\tBookAdmin\n\t//编辑者.\n\tBookEditor\n\t//观察者\n\tBookObserver\n\t//未指定关系\n\tBookRoleNoSpecific\n)\n\n// 项目角色\ntype BookRole int\n\nconst (\n\tLoggerOperate   = \"operate\"\n\tLoggerSystem    = \"system\"\n\tLoggerException = \"exception\"\n\tLoggerDocument  = \"document\"\n)\nconst (\n\t//本地账户校验\n\tAuthMethodLocal = \"local\"\n\t//LDAP用户校验\n\tAuthMethodLDAP = \"ldap\"\n)\n\nvar (\n\tVERSION    string\n\tBUILD_TIME string\n\tGO_VERSION string\n)\n\nvar (\n\tConfigurationFile = \"./conf/app.conf\"\n\tWorkingDirectory  = \"./\"\n\tLogFile           = \"./runtime/logs\"\n\tBaseUrl           = \"\"\n\tAutoLoadDelay     = 0\n)\n\n// app_key\nfunc GetAppKey() string {\n\treturn web.AppConfig.DefaultString(\"app_key\", \"mindoc\")\n}\n\nfunc GetDatabasePrefix() string {\n\treturn web.AppConfig.DefaultString(\"db_prefix\", \"md_\")\n}\n\n// 获取默认头像\nfunc GetDefaultAvatar() string {\n\treturn URLForWithCdnImage(web.AppConfig.DefaultString(\"avatar\", \"/static/images/headimgurl.jpg\"))\n}\n\n// 获取阅读令牌长度.\nfunc GetTokenSize() int {\n\treturn web.AppConfig.DefaultInt(\"token_size\", 12)\n}\n\n// 获取默认文档封面.\nfunc GetDefaultCover() string {\n\n\treturn URLForWithCdnImage(web.AppConfig.DefaultString(\"cover\", \"/static/images/book.jpg\"))\n}\n\n// 获取允许的上传文件的类型.\nfunc GetUploadFileExt() []string {\n\text := web.AppConfig.DefaultString(\"upload_file_ext\", \"png|jpg|jpeg|gif|txt|doc|docx|pdf|mp4\")\n\n\ttemp := strings.Split(ext, \"|\")\n\n\texts := make([]string, len(temp))\n\n\ti := 0\n\tfor _, item := range temp {\n\t\tif item != \"\" {\n\t\t\texts[i] = item\n\t\t\ti++\n\t\t}\n\t}\n\treturn exts\n}\n\n// 获取上传文件允许的最大值\nfunc GetUploadFileSize() int64 {\n\tsize := web.AppConfig.DefaultString(\"upload_file_size\", \"0\")\n\n\tif strings.HasSuffix(size, \"TB\") {\n\t\tif s, e := strconv.ParseInt(size[0:len(size)-2], 10, 64); e == nil {\n\t\t\treturn s * 1024 * 1024 * 1024 * 1024\n\t\t}\n\t}\n\tif strings.HasSuffix(size, \"GB\") {\n\t\tif s, e := strconv.ParseInt(size[0:len(size)-2], 10, 64); e == nil {\n\t\t\treturn s * 1024 * 1024 * 1024\n\t\t}\n\t}\n\tif strings.HasSuffix(size, \"MB\") {\n\t\tif s, e := strconv.ParseInt(size[0:len(size)-2], 10, 64); e == nil {\n\t\t\treturn s * 1024 * 1024\n\t\t}\n\t}\n\tif strings.HasSuffix(size, \"KB\") {\n\t\tif s, e := strconv.ParseInt(size[0:len(size)-2], 10, 64); e == nil {\n\t\t\treturn s * 1024\n\t\t}\n\t}\n\tif s, e := strconv.ParseInt(size, 10, 64); e == nil {\n\t\treturn s\n\t}\n\treturn 0\n}\n\n// 是否启用导出\nfunc GetEnableExport() bool {\n\treturn web.AppConfig.DefaultBool(\"enable_export\", true)\n}\n\n// 是否启用iframe\nfunc GetEnableIframe() bool {\n\treturn web.AppConfig.DefaultBool(\"enable_iframe\", false)\n}\n\n// 同一项目导出线程的并发数\nfunc GetExportProcessNum() int {\n\texportProcessNum := web.AppConfig.DefaultInt(\"export_process_num\", 1)\n\n\tif exportProcessNum <= 0 || exportProcessNum > 4 {\n\t\texportProcessNum = 1\n\t}\n\treturn exportProcessNum\n}\n\n// 导出项目队列的并发数量\nfunc GetExportLimitNum() int {\n\texportLimitNum := web.AppConfig.DefaultInt(\"export_limit_num\", 1)\n\n\tif exportLimitNum < 0 {\n\t\texportLimitNum = 1\n\t}\n\treturn exportLimitNum\n}\n\n// 等待导出队列的长度\nfunc GetExportQueueLimitNum() int {\n\texportQueueLimitNum := web.AppConfig.DefaultInt(\"export_queue_limit_num\", 10)\n\n\tif exportQueueLimitNum <= 0 {\n\t\texportQueueLimitNum = 100\n\t}\n\treturn exportQueueLimitNum\n}\n\n// 默认导出项目的缓存目录\nfunc GetExportOutputPath() string {\n\texportOutputPath := filepath.Join(web.AppConfig.DefaultString(\"export_output_path\", filepath.Join(WorkingDirectory, \"cache\")), \"books\")\n\n\treturn exportOutputPath\n}\n\n// 判断是否是允许上传的文件类型.\nfunc IsAllowUploadFileExt(ext string) bool {\n\n\tif strings.HasPrefix(ext, \".\") {\n\t\text = string(ext[1:])\n\t}\n\texts := GetUploadFileExt()\n\n\tfor _, item := range exts {\n\t\tif item == \"*\" {\n\t\t\treturn true\n\t\t}\n\t\tif strings.EqualFold(item, ext) {\n\t\t\treturn true\n\t\t}\n\t}\n\treturn false\n}\n\n// 读取配置文件值\nfunc CONF(key string, value ...string) string {\n\tdefaultValue := \"\"\n\tif len(value) > 0 {\n\t\tdefaultValue = value[0]\n\t}\n\treturn web.AppConfig.DefaultString(key, defaultValue)\n}\n\n// 重写生成URL的方法，加上完整的域名\nfunc URLFor(endpoint string, values ...interface{}) string {\n\tbaseUrl := web.AppConfig.DefaultString(\"baseurl\", \"\")\n\tpathUrl := web.URLFor(endpoint, values...)\n\n\tif baseUrl == \"\" {\n\t\tbaseUrl = BaseUrl\n\t}\n\tif strings.HasPrefix(pathUrl, \"http://\") {\n\t\treturn pathUrl\n\t}\n\tif strings.HasPrefix(pathUrl, \"/\") && strings.HasSuffix(baseUrl, \"/\") {\n\t\treturn baseUrl + pathUrl[1:]\n\t}\n\tif !strings.HasPrefix(pathUrl, \"/\") && !strings.HasSuffix(baseUrl, \"/\") {\n\t\treturn baseUrl + \"/\" + pathUrl\n\t}\n\treturn baseUrl + web.URLFor(endpoint, values...)\n}\n\nfunc URLForNotHost(endpoint string, values ...interface{}) string {\n\tbaseUrl := web.AppConfig.DefaultString(\"baseurl\", \"\")\n\tpathUrl := web.URLFor(endpoint, values...)\n\n\tif baseUrl == \"\" {\n\t\tbaseUrl = \"/\"\n\t}\n\tif strings.HasPrefix(pathUrl, \"http://\") {\n\t\treturn pathUrl\n\t}\n\tif strings.HasPrefix(pathUrl, \"/\") && strings.HasSuffix(baseUrl, \"/\") {\n\t\treturn baseUrl + pathUrl[1:]\n\t}\n\tif !strings.HasPrefix(pathUrl, \"/\") && !strings.HasSuffix(baseUrl, \"/\") {\n\t\treturn baseUrl + \"/\" + pathUrl\n\t}\n\treturn baseUrl + web.URLFor(endpoint, values...)\n}\n\nfunc URLForWithCdnImage(p string) string {\n\tif strings.HasPrefix(p, \"http://\") || strings.HasPrefix(p, \"https://\") {\n\t\treturn p\n\t}\n\tcdn := web.AppConfig.DefaultString(\"cdnimg\", \"\")\n\t//如果没有设置cdn，则使用baseURL拼接\n\tif cdn == \"\" {\n\t\tbaseUrl := web.AppConfig.DefaultString(\"baseurl\", \"/\")\n\n\t\tif strings.HasPrefix(p, \"/\") && strings.HasSuffix(baseUrl, \"/\") {\n\t\t\treturn baseUrl + p[1:]\n\t\t}\n\t\tif !strings.HasPrefix(p, \"/\") && !strings.HasSuffix(baseUrl, \"/\") {\n\t\t\treturn baseUrl + \"/\" + p\n\t\t}\n\t\treturn baseUrl + p\n\t}\n\tif strings.HasPrefix(p, \"/\") && strings.HasSuffix(cdn, \"/\") {\n\t\treturn cdn + string(p[1:])\n\t}\n\tif !strings.HasPrefix(p, \"/\") && !strings.HasSuffix(cdn, \"/\") {\n\t\treturn cdn + \"/\" + p\n\t}\n\treturn cdn + p\n}\n\nfunc URLForWithCdnCss(p string, v ...string) string {\n\tcdn := web.AppConfig.DefaultString(\"cdncss\", \"\")\n\tif strings.HasPrefix(p, \"http://\") || strings.HasPrefix(p, \"https://\") {\n\t\treturn p\n\t}\n\tfilePath := WorkingDir(p)\n\n\tif f, err := os.Stat(filePath); err == nil && !strings.Contains(p, \"?\") && len(v) > 0 && v[0] == \"version\" {\n\t\tp = p + fmt.Sprintf(\"?v=%s\", f.ModTime().Format(\"20060102150405\"))\n\t}\n\t//如果没有设置cdn，则使用baseURL拼接\n\tif cdn == \"\" {\n\t\tbaseUrl := web.AppConfig.DefaultString(\"baseurl\", \"/\")\n\n\t\tif strings.HasPrefix(p, \"/\") && strings.HasSuffix(baseUrl, \"/\") {\n\t\t\treturn baseUrl + p[1:]\n\t\t}\n\t\tif !strings.HasPrefix(p, \"/\") && !strings.HasSuffix(baseUrl, \"/\") {\n\t\t\treturn baseUrl + \"/\" + p\n\t\t}\n\t\treturn baseUrl + p\n\t}\n\tif strings.HasPrefix(p, \"/\") && strings.HasSuffix(cdn, \"/\") {\n\t\treturn cdn + string(p[1:])\n\t}\n\tif !strings.HasPrefix(p, \"/\") && !strings.HasSuffix(cdn, \"/\") {\n\t\treturn cdn + \"/\" + p\n\t}\n\treturn cdn + p\n}\n\nfunc URLForWithCdnJs(p string, v ...string) string {\n\tcdn := web.AppConfig.DefaultString(\"cdnjs\", \"\")\n\tif strings.HasPrefix(p, \"http://\") || strings.HasPrefix(p, \"https://\") {\n\t\treturn p\n\t}\n\n\tfilePath := WorkingDir(p)\n\n\tif f, err := os.Stat(filePath); err == nil && !strings.Contains(p, \"?\") && len(v) > 0 && v[0] == \"version\" {\n\t\tp = p + fmt.Sprintf(\"?v=%s\", f.ModTime().Format(\"20060102150405\"))\n\t}\n\n\t//如果没有设置cdn，则使用baseURL拼接\n\tif cdn == \"\" {\n\t\tbaseUrl := web.AppConfig.DefaultString(\"baseurl\", \"/\")\n\n\t\tif strings.HasPrefix(p, \"/\") && strings.HasSuffix(baseUrl, \"/\") {\n\t\t\treturn baseUrl + p[1:]\n\t\t}\n\t\tif !strings.HasPrefix(p, \"/\") && !strings.HasSuffix(baseUrl, \"/\") {\n\t\t\treturn baseUrl + \"/\" + p\n\t\t}\n\t\treturn baseUrl + p\n\t}\n\tif strings.HasPrefix(p, \"/\") && strings.HasSuffix(cdn, \"/\") {\n\t\treturn cdn + string(p[1:])\n\t}\n\tif !strings.HasPrefix(p, \"/\") && !strings.HasSuffix(cdn, \"/\") {\n\t\treturn cdn + \"/\" + p\n\t}\n\treturn cdn + p\n}\n\nfunc WorkingDir(elem ...string) string {\n\n\telems := append([]string{WorkingDirectory}, elem...)\n\n\treturn filepath.Join(elems...)\n}\n\nfunc init() {\n\tif p, err := filepath.Abs(\"./conf/app.conf\"); err == nil {\n\t\tConfigurationFile = p\n\t}\n\tif p, err := filepath.Abs(\"./\"); err == nil {\n\t\tWorkingDirectory = p\n\t}\n\tif p, err := filepath.Abs(\"./runtime/logs\"); err == nil {\n\t\tLogFile = p\n\t}\n}\n"
  },
  {
    "path": "conf/lang/en-us.ini",
    "content": "[common]\ntitle = mindoc\nhome = Home\nblog = Blog\nproject_space = Project Space\nperson_center = Personal Center\nmy_project = My Project\nmy_blog = My Article\nmanage = Management\nlogin = Log In\nlogout = Log Out\nofficial_website = Official Website\nfeedback = Feedback\nsource_code = Source Code\nmanual = Manual\nusername = Username\naccount = Account\nemail = Email\npassword = Password\nrole = Role\ncaptcha = Captcha\nkeep_login = Stay signed in\nforgot_password = Forgot password?\nregister = Create New Account\nthird_party_login = Third Party Login\ndingtalk_login = DingTalk Login\nwecom_login = WeCom Login\naccount_recovery = Account recovery\nnew_password = New password\nconfirm_password = Confirm password\nnew_account = Create New Account\nsetting = Setting\nsave = Save\nedit = Edit\ndelete = Delete\ncancel = Cancel\ncreate = Create\nconfirm_delete = Confirm\nupload_lang = en\njs_lang = en\nremove = Remove\noperate = Operate\nconfirm = Confirm\ncreator = Creator\nadministrator = Administrator\neditor = Editor\nobserver = Observer\nback = Back\ndetail = Detail\nadmin_right = Reading, writing and management\neditor_right = Reading and writing\nobserver_right = Reading only\nyes = yes\nno = no\nread = Read\ngenerate = Generate\nclean = Clean\n\n[init]\ndefault_proj_name = MinDoc Demo Project\ndefault_proj_desc = This is a MinDoc demo project, which is automatically created when the system is initialized.\ndefault_proj_space = Default Project Space\nblank_doc = Blank document\n\n[message]\ntips = Tips\npage_not_existed = The page does not exist\nno_permission = No enough permissions\nkeyword_placeholder = input keyword please...\nwrong_account_password = Incorrect username or password\nwrong_password = Wrong password\nclick_to_change = Click to change one\nlogging_in = logging in...\nneed_relogin = Relogin please.\nreturn_account_login = Return account password login\nno_account_yet = No account yet?\nhas_account = Already have an account?\naccount_empty = Account cannot be empty\nemail_empty = Email cannot be empty\npassword_empty = Password cannot be empty\ncaptcha_empty = Captcha cannot be empty\nsystem_error = System error\nprocessing = Processing...\nemail_sent = The email is sent successfully, please log in to check it.\nconfirm_password_empty = Confirm password cannot be empty\nincorrect_confirm_password = Incorrect confirm password\nillegal_request = Illegal request\naccount_or_password_empty = Account or Password cannot be empty\ncaptcha_wrong = Incorrect captcha\npassword_length_invalid = The password cannot be empty and must be between 6-50 characters\nmail_expired = Mail has expired\ncaptcha_expired = The verification code has expired, please try again.\nuser_not_existed = User does not exist\nreadusr_only_observer = Read only users can only be set as observers\nemail_not_exist = Email does not exist\nfailed_save_password = Failed to save password\nmail_service_not_enable = Mail service is not enabled\naccount_disable = Account has been disabled\nfailed_send_mail = Failed to send mail\nsent_too_many_times = Send too many times, please try again later\naccount_not_support_retrieval = The current user does not support password retrieval\nusername_invalid_format = The account number can only be composed of English alphanumerics and 3-50 characters\nemail_invalid_format = Email format is incorrect\naccount_existed = Username already existed\nfailed_register = Registration failed, please contact the system administrator\nfailed_obtain_user_info = Failed to obtain identity information\ndingtalk_auto_login_not_enable = DingTalk automatic login function is not enabled\nfailed_auto_login = Automatic login failed\nno_project = No Project\nitem_not_exist = Item does not exist or has been deleted\nitem_not_exist_or_no_permit = Item does not exist or has insufficient permissions\ndoc_not_exist = Document does not exist or has been deleted\ndoc_not_exist_or_no_permit = Document does not exist or has insufficient permissions\nunknown_exception = Unknown Exception\nno_data = No Data\nproject_must_belong_space = Project must belong to a project space, and the administrator can manage it\nproject_title_placeholder = Title (limit in 30 words)\nproject_title_tips = Project name cannot exceed 100 characters\nproject_id_placeholder = Project ID (limit in 30 characters)\nproject_id_tips = The ID can only contain lowercase letters, numbers, and \"-\", \".\" and \"_\" symbols.\nproject_desc_placeholder = Project description cannot exceed 500 characters\nproject_public_desc = (Anyone can access)\nproject_private_desc = (Only participants or use tokens can access)\nproject_cover_desc = The Cover can be edit in the settings\nconfirm_delete_project = Are you sure you want to delete the project?\nwarning_delete_project = Remove items will not be retrieved.\nproject_space_empty = Please select project space\nproject_title_empty = Project title cannot be empty\nproject_id_empty = Project ID cannot be empty\nproject_id_existed = Project ID already in use\nproject_id_error = Project ID error\nproject_id_length = Project ID must be less than 50 characters\nimport_file_empty = Please select the file to upload\nfile_type_placeholder = Please select a Zip file\npublish_to_queue = The publish task has been pushed to the task queue and will be executed soon.\nteam_name_empty = Team name cannot be empty\noperate_failed = Operation failed\nproject_id_desc = The project ID is used to mark the uniqueness of the item and cannot be modified.\nhistory_record_amount_desc = When document history enabled, this value limits the number of history saved per document\ncorp_id_desc = The footer that appears when the document PDF document is exported\nproject_desc_desc = The description information is no more than 500 characters, supports markdown syntax\nproject_desc_tips = The description information is no more than 500 characters\naccess_pass_desc = The password that needs to be provided to access the project without permit \nauto_publish_desc = Enable for each save is automatically published to the latest version\nenable_export_desc = Configure the exporter before you start the export, also enable the export function in the profile\nenable_share_desc = Sharing is only available for public projects, and private projects do not support sharing\nauto_save_desc = Save automatically every 30 seconds\nconfirm_into_private = Are you sure you want to make your project private?\ninto_private_notice = Private project need provide access token\nconfirm_into_public = Are you sure you want to make your project public?\ninto_public_notice = Public project could be visit by anyone\nproject_name_empty = Project name cannot be empty\nsuccess = Success\nfailed = Failed\nreceive_account_empty = The recipient account cannot be empty\nreceive_account_not_exist = The recipient account not exist\nreceive_account_disabled = The recipient account disable\ncannot_preview = Cannot preview\nupload_failed = Upload failed\nupload_file_size_limit = The file must be less than 2MB\nupload_file_empty = Upload file is empty\nuploda_file_type_error = upload file type is wrong\nchoose_pic_file = Please select a picture\nno_doc_in_cur_proj = No documents for the current project\nbuild_doc_tree_error = There was an error building the project document tree\nparam_error = Parameter error\ndoc_name_empty = Document name cannot empty\nparent_id_not_existed = Parent ID not existed\ndoc_not_belong_project = The document does not belong to the specified project`\nattachment_not_exist = Attachment does not exist\nread_file_error = Load file error\nconfirm_override_doc = The document has been modified, are you sure to override it?\ndoc_auto_published = The document was automatically published\nexport_func_disable = The export function is disable\ncur_project_export_func_disable = The export function is disable for current Project\ncur_project_not_support_md = The Markdown editor is not supported for the current project\nexport_failed = The export failed, check the system logs\nfile_converting = The document is being converted in the background, please download it later\nunsupport_file_type = Unsupport file type\nno_exportable_file = The project has no exportable file\ngen_qrcode_failed = Generate QrCode failed\nsearch_result_error = Search error\nget_doc_his_failed = Fail to get document history\nproject_space_not_exist = Project space does not exist\nsearch_placeholder = input keyword please\nno_search_result = No search results!\nuser_exist_in_proj = The user already exists in the project\ncannot_change_own_priv = Cannot change own permissions\ncannot_delete_self = Cannot delete myself\ncannot_handover_myself = Cannot handover to myself\nconfirm_delete_blog = Confirm delete blog?\ndelete_blog_tips = Deleted blog cannot be retrieved.\ninput_proj_id_pls = input project ID please\ninput_doc_id_pls = input document ID please\nblog_digest_tips = blog digest cannot exceed 500 characters\nblog_title_empty = blog title cannot be empty\nblog_not_exist = Blog does not exist or has been deleted\nblog_pwd_incorrect = Access password incorrect\nset_pwd_pls = please set password for encrypt blog\nunknown_blog_type = unknown blog type\nblog_title_tips = blog title cannot exceed 200 characters\nref_doc_prj_not_existed = The Project of reference document not existed\nquery_ref_doc_error = query reference document failed\nref_doc_not_exist_or_no_permit = reference document does not exist or has insufficient permissions\nblog_id_existed = blog id already existed\nquery_failed = query failed\nblog_has_modified = The article has been modified\ncur_user_cannot_change_pwd = The current user does not support changing the password\norigin_pwd_empty = The origin password cannot be empty\nnew_pwd_empty = The new password cannot be empty\nconfirm_pwd_empty = The confirm password cannot be empty\npwd_length = Password must be between 6-18 characters\npwd_length_tips = Password must be between 6-50 characters\nwrong_origin_pwd = The origin password incorrect\nwrong_confirm_pwd = The confirm passwrod incorrect\nsame_pwd = The new password must different from the origin\npwd_encrypt_failed = Password encryption failed\nteam_name_empty = Team name cannot be emtpy\nproj_empty = Project cannot be empty\nsite_name_empty = Site name cannot be empty\nproj_space_name_empty = Project space name cannot be empty\nproj_space_id_empty = Project space id cannot be empty\nproj_space_id_tips = The project space id can only consist of letters and numbers and be between 2-100 characters\nproject_order_desc = Number only, sort from largest to smallest\nproject_label_desc = Allows up to 10 labels, use \";\" to separate multiple tags\ncannot_change_own_status = Cannot change own status\ncannot_change_super_status = Cannot change super administrator status\ncannot_change_super_priv = Cannot change super administrator permissions\neditors_not_compatible = two editors are not compatible\n\n[blog]\nauthor = Author\nproject_list = Project List\nadd_project = Add Project\nimport_project = Import Project\ndelete_project = Delete Project\nproject_summary = Project summary\nread = Read\nedit = Edit\ndelete = Delete\ncopy = Copy\nview = View\npublish = Publish\nedit_doc = Edit Document\ndefault_cover = Default Cover\ncreate_time = Create Time\nupdate_time = Update Time\ncreator = Creator\ndoc_amount = Number of documents\ndoc_unit =\nproject_role = Project Role\nlast_edit = Last Edited\nproject_title = Project Title\nproject_id = Project ID\nproject_desc = Project description\npublic = Public\nprivate = Private\npublic_project = Public Project\nprivate_project = Private Project\nsummary = Summary\nmember = Member\nteam = Team\ncomment_amount = Number of comments\ncomment_unit =\nmember_manage = Member Manage\nadd_member = Add Member\nadministrator = Administrator\neditor = Editor\nobserver = Observer\nteam_manage = Team Manage\nadd_team = Add Team\nteam_name = Team name\nmember_amount = Number of members\njoin_time = Join Time\nproject_setting = Project setting\nhandover_project = Handover\nmake_public = Into Public\nmake_private = Into Privete\nhistory_record_amount = Number of history records\ncorp_id = corp name\ntext_editor = editor\nproject_label = Project Label\nproject_order = Project Order\naccess_pass = Access Password\naccess_token = Access Token\nauto_publish = Auto publish\nenable_export = Enable Export\nenable_share = Enable Share\nset_first_as_home = Set the first document as the default homepage\nauto_save = Auto Save\ncover = Cover\nclick_change_cover = Click to change the cover\nchange_cover = Change Cover\npreview = Preview\nchoose = Choose\nupload = Upload\nrecipient_account = Recipient\nblog_list = Blog List\nadd_blog = Add Blog\nencryption = encryption\nencrypt = encrypt\nedit_blog = Edit blog\ndelete_blog = Delete blog\nsetting_blog = Setting Blog\nno_blog = No Blog\nblog_setting = Blog Setting\ntitle = Blog Title\ntype = Blog Type\nnormal_blog = Normal Blog\nlink_blog = Link Blog\nref_doc = Reference Document\nblog_status = Blog Status\nblog_pwd = Blog Password\nblog_digest = Blog Digest\nposted_on = Posted on\nmodified_on = Modified on\nprev = prev\nnext = next\nno = no\nedit_title = Edit Blog\nprivate_blog_tips = Private blog, please enter password to access\nprint_text = Enable Printing\n\n[doc]\nword_to_html = Word to HTML\nhtml_to_markdown = HTML to Markdown\nmodify_doc = Modify Document\ncomparison = Comparison\nsave_merge = Save Merge\nprev_diff = Previous difference\nnext_diff = Next difference\nmerge_to_left = Merge to left\nmerge_to_right = Merge to right\nexchange_left_right = Exchange left and right\nprint = Print\ndownload = Download\nshare = Share\nshare_project = Share project\nshare_url = Project URL\ncontents = Contents\nsearch = Search\nexpand = Unfold\nfold = Fold\nclose = Close\ndoc_publish_by = Document is Published by\ndoc_publish =\nedit_doc = Edit Document\nbackward = backward\nsave = save\nsave_as_tpl = save as template\nundo = undo\nredo = redo\nbold = bold\nitalic = italic\nstrikethrough = strikethrough\nh1 = head 1\nh2 = head 2\nh3 = head 3\nh4 = head 4\nh5 = head 5\nh6 = head 6\nunorder_list = disorder list\norder_list = order list\nhline = horizontal line\nlink = link\nref_link = reference link\nadd_pic = add picture\ncode = code\ncode_block = code block\ntable = add table\nquote = quote\ngfm_task = GFM task\nattachment = attachment\njson_to_table = Json converted to table\ntemplate = template\ndraw = draw\nclose_preview = disable preview\nmodify_history = modify history\nsidebar = sidebar\nhelp = help\npublish = publish\ndocument = document\ncreate_doc = create document\nattachments = attachments\ndoc_name = Document name\ndoc_name_tips = Right-click on the document name of the directory to delete and modify the document name and add subordinate documents\ndoc_id = Document ID\ndoc_id_tips = The document ID can only contain lowercase letters, numbers, and \"-\" and \"_\" symbols, and can only start with a lowercase letter\nexpand_desc = (Expand nodes when reading)\nfold_desc = (Fold nodes when reading)\nempty_contents = Empty contents\nempty_contents_desc = Click to expand the subordinate nodes\nupload_attachment = Upload attachment\ndoc_history = Document history\nchoose_template_type = Choose template type please\nnormal_tpl = Normal\napi_tpl = API\ndata_dict = Data Dictionary\ncustom_tpl = Custom\ntpl_default_type = Default type\ntpl_plain_text = Plain Text\nfor_api_doc = Used for API Document\ncode_highlight = support code highlighting\nfor_data_dict = Used for data dictionary\nform_support = Form Support\nany_type_doc = Support any type of document\nas_global_tpl = Can be set as a global template\ntpl_name = Template name\ntpl_type = Template type\ncreator = Creator\ncreate_time = Create time\noperation = Operation\nglobal_tpl = Global\nglobal_tpl_desc = (Any Project is available)\nproject_tpl = Project\nproject_tpl_desc = (Only the current Project is available)\ninsert = insert\nuploading = Uploading\nhis_ver = Historic version\nupdate_time = Update time\nupdater = Updater\nversion = Version\ndelete = Delete\nrecover = Recover\nmerge = Merge\ncomparison_title = Document comparison [the left is the historical document, the right is the current document, please merge the documents to the right]\nfont_size = font size\nunderscore = underscore\nright_intent = right intent\nleft_intent = left intent\nsubscript = subscript\nsuperscript = superscript\nclean_format = clear format\nadd_video = add video\nformula = formula\nfont_color = font color\nbg_color = background color\ninput_pwd = input password please\nread_pwd = read password\ncommit = commit\nft_author = Author：\nft_last_editor = Last editor：\nft_create_time = Create time：\nft_update_time = Update time：\nview_count = Number of views\nchangetheme = Switch themes\nprev = prev\nnext = next\n\n[project]\nprj_space_list = Project Space List\nprj_space_list_of = List of Project Space %s\nsearch_title = Show Items of Project Space \"%s\"\nauthor = Author\nno_project = No Project\nprj_amount = Project Count\ncreator = Creator\ncreate_time = Create time\nno_project_space = No Project Space\n\n[search]\ntitle = Search\nsearch_title = Show search result for %s\ndoc = document\nprj = project\nblog = blog\nfrom_proj = from project\nfrom_blog = from blog\nauthor = author\nupdate_time = update time\nno_result = No search result\n\n[page]\nfirst = first\nlast = last\nprev = prev\nnext = next\n\n[uc]\nuser_center = User Center\nbase_info = Basic Info\nchange_pwd = Change Password\nusername = Username\nnickname = Nickname\nrealname = Real name\nemail = Email\nmobile = Mobile\ndescription = Description\ndescription_tips = Description cannot exceed 500 characters \navatar = Avatar\nchange_avatar = Change avatar\npassword = Password\norigin_pwd = Origin password\nnew_pwd = New password\nconfirm_pwd = Confirm password\nrole = Role\ntype = Type\nstatus = Status\nsuper_admin = Super administrator\nadmin = Administrator\nuser = User\nread_usr = Read-Only User\nnormal = Normal\ndisable = Disable\nenable = Enable\ncreate_user = Create User\nedit_user = Edit User\npwd_tips = Please leave it blank if you do not change the password, only local users can change the password\n\n[mgr]\nlanguage = Default Language\nzh_cn = 简体中文\nen_us = English\ndashboard_menu = Dashboard\nuser_menu = User\nteam_menu = Team\nproject_menu = Project\nproject_space_menu = Project Space\ncomment_menu = Comment\nconfig_menu = Configure\nattachment_menu = Attachment\nlabel_menu = Label\ndashboard_mgr = Dashboard\nuser_mgr = User Management\nteam_mgr = Team Management\nproject_mgr = Project Management\nproject_space_mgr = Project Space Management\ncomment_mgr = Comment Management\nconfig_mgr = Configure Management\nconfig_file = Configure File\nattachment_mgr = Attachment Management\nlabel_mgr = Label Management\nlabel_name = Label name\nused_quantity = Used Quantity\nproj_amount = Number Of Project\nblog_amount = Number Of Blog\nmember_amount = Number Of Member\ncomment_amount = Number Of Comment\nattachment_amount = Number Of Attachment\nmember_mgr = Member Management\nadd_member = Add Member\ncreate_team = Create Team\nteam_name = Team Name\nproj = Project\nmember = Member\nedit_team = Edit Team\nteam_member_mgr = Team Member Management\nteam_proj = Team Project\nadd_proj = Add Project\nproj_name = Project name\nproj_author = Project author\njoin_time = Join Time\njoin_proj = Join\nfile_name = File name\nis_exist = Is Exist\nexist = Exist\ndeleted = Deleted\nproj_blog_name = Project/Blog name\ndoc_name = Document name\nfile_path = File path\ndownload_url = Download URL\nfile_size = File size\nupload_time = Upload time\ndownload = Download\ndownload_title = Download to local\nattachment_name = Attachment name\nsite_name = Site Name\ndomain_icp = Domain ICP\nsite_desc = Site Description\nsite_desc_tips = Description cannot exceed 500 characters\nenable_anonymous_access = Enable anonymous access\nenable = Enable\ndisable = Disable\nenable_register = Enable Registration\nenable_captcha = Enable Captcha\nenable_doc_his = Enable Document Historic\nproj_space_name = Project space name\nproj_space_id = Project space ID\ncreate_proj_space = Create Project Space\nedit_proj_space = Edit Project Space\nproj_list = Project List\nedit_proj = Edit Project\ncreate_time = Create Time\ncreator = Creator\ndoc_amount = Number of Document\nlast_edit = Last Edit\ndelete_project = Delete Project\n"
  },
  {
    "path": "conf/lang/ru-ru.ini",
    "content": "[common]\ntitle = MinDoc\nhome = Домашняя\nblog = Блог\nproject_space = Проекты\nperson_center = Профиль\nmy_project = Мои проекты\nmy_blog = Моя статья\nmanage = Управление\nlogin = Войти\nlogout = Выйти\nofficial_website = Официальный сайт\nfeedback = Обратная связь\nsource_code = Исходный код\nmanual = Руководство пользователя\nusername = Имя пользователя\naccount = Аккаунт\nemail = Email\npassword = Пароль\nrole = Роль\ncaptcha = Капча\nkeep_login = Оставайтесь в системе\nforgot_password = забыл пароль?\nregister = Создать новый аккаунт\nthird_party_login = Вход третьей стороны\ndingtalk_login = Войти с помощью DingTalk\nwecom_login = Войти через Wecom\naccount_recovery = Восстановление аккаунта\nnew_password = Новый пароль\nconfirm_password = Подтвердите пароль\nnew_account = Создать новую учетную запись\nsetting = Настройка\nsave = Сохранить\nedit = Изменить\ndelete = Удалить\ncancel = Отмена\ncreate = Создать\nconfirm_delete = Подтверждать\nupload_lang = ru\njs_lang = ru-RU\nremove = Удалять\noperate = Оперировать\nconfirm = Подтверждать\ncreator = Создатель\nadministrator = Администратор\neditor = Редактор\nobserver = Наблюдатель\nback = Назад\ndetail = Деталь\nadmin_right = Чтение, письмо и управление\neditor_right = Чтение и письмо\nobserver_right = Только чтение\nyes = Да\nno = Нет\nread = Читать\ngenerate = Генерировать\nclean = Чистый\n\n[init]\ndefault_proj_name = Демонстрационный проект MinDoc\ndefault_proj_desc = Это демонстрационный проект MinDoc, который автоматически создается при инициализации системы\ndefault_proj_space = Пространство проекта по умолчанию\nblank_doc = Пустой документ\n\n[message]\ntips = Советы\npage_not_existed = Эта страница не существует\nno_permission = доступ запрещен\nkeyword_placeholder = введите ключевое слово, пожалуйста...\nwrong_account_password = Неправильное имя пользователя или пароль\nwrong_password = Неправильный пароль\nclick_to_change = Нажмите, чтобы изменить один\nlogging_in = Вход в систему...\nneed_relogin = Пожалуйста, войдите снова\nreturn_account_login = вернуться к входу с учетной записью и паролем\nno_account_yet = У вас еще нет аккаунта?\nhas_account = У вас уже есть аккаунт?\naccount_empty = Счет не может быть пустым\nemail_empty = Электронная почта не может быть пустой\npassword_empty = Пароль не может быть пустым\ncaptcha_empty = Капча не может быть пустой\nsystem_error = Система обнаружила ошибку\nprocessing = Обработка...\nemail_sent = Письмо успешно отправлено, пожалуйста, проверьте его\nconfirm_password_empty = Подтвержденный пароль не может быть пустым\nincorrect_confirm_password = Неверный подтвержденный пароль\nillegal_request = Незаконный запрос\naccount_or_password_empty = Учетная запись или пароль не могут быть пустыми\ncaptcha_wrong = Неправильная капча\npassword_length_invalid = Пароль не может быть пустым и должен содержать от 6 до 50 символов\nmail_expired = почта просрочена\ncaptcha_expired = Срок действия капчи истек, попробуйте еще раз\nuser_not_existed = этот пользователь не существует\nreadusr_only_observer = Толькі для чытання карыстальнікаў можна ўсталяваць толькі як назіральнікі\nemail_not_exist = этот адрес электронной почты не существует\nfailed_save_password = Не удалось сохранить пароль\nmail_service_not_enable = Служба электронной почты не включена\naccount_disable = эта учетная запись была отключена\nfailed_send_mail = Не удалось отправить электронное письмо\nsent_too_many_times = Отправьте слишком много раз, попробуйте еще раз позже\naccount_not_support_retrieval = Текущий пользователь не поддерживает восстановление пароля\nusername_invalid_format = Имя учетной записи может состоять только из английских букв, цифр и 3–50 символов\nemail_invalid_format = Неверный формат электронной почты\naccount_existed = Имя пользователя уже существует\nfailed_register = Регистрация не удалась, обратитесь к системному администратору\nfailed_obtain_user_info = Не удалось получить идентификационную информацию\ndingtalk_auto_login_not_enable = Функция автоматического входа в DingTalk не включена\nfailed_auto_login = Автоматический вход не удался\nno_project = Нет проекта\nitem_not_exist = Элемент не существует или был удален\nitem_not_exist_or_no_permit = Элемент не существует или имеет недостаточно прав\ndoc_not_exist = Документ не существует или был удален\ndoc_not_exist_or_no_permit = Документ не существует или имеет недостаточно прав\nunknown_exception = Неизвестное исключение\nno_data = Нет данных\nproject_must_belong_space = Каждый проект должен принадлежать к проектному пространству, и его администратор может им управлять\nproject_title_placeholder = Название (ограничение в 30 слов)\nproject_title_tips = Название проекта не может превышать 100 символов\nproject_id_placeholder = Идентификатор проекта (ограничение в 30 символов)\nproject_id_tips = Идентификатор может содержать только строчные буквы, цифры и символы «-», «.» и «_»\nproject_desc_placeholder = Описание проекта не может превышать 500 символов\nproject_public_desc = (Доступ возможен для всех)\nproject_private_desc = (Доступ возможен только участникам или пользователям токенов)\nproject_cover_desc = Изображение обложки проекта можно изменить в настройках проекта\nconfirm_delete_project = Вы уверены, что хотите удалить проект?\nwarning_delete_project = После удаления проекта его невозможно восстановить\nproject_space_empty = Пожалуйста, выберите проектное пространство\nproject_title_empty = Название проекта не может быть пустым\nproject_id_empty = ID проекта не может быть пустым\nproject_id_existed = Идентификатор проекта уже используется\nproject_id_error = Неверный идентификатор проекта\nproject_id_length = Идентификатор проекта должен быть менее 50 символов\nimport_file_empty = Пожалуйста, выберите файл для загрузки\nfile_type_placeholder = Пожалуйста, выберите файл zip/docx\npublish_to_queue = Задача публикации помещена в очередь задач и будет выполнена в ближайшее время\nteam_name_empty = Название команды не может быть пустым\noperate_failed = Операция не удалась\nproject_id_desc = Идентификатор проекта используется для обозначения уникальности элемента и не может быть изменен\nhistory_record_amount_desc = Если включена история документа, это значение ограничивает количество сохраненных историй для каждого документа\ncorp_id_desc = Нижний колонтитул, который появляется при экспорте документа PDF\nproject_desc_desc = Описание информации не более 500 символов, поддерживает синтаксис markdown\nproject_desc_tips = Описательная информация не более 500 символов\naccess_pass_desc = Пароль, который вам необходимо указать, если у вас нет разрешения на доступ к проекту\nauto_publish_desc = После включения каждое сохранение будет автоматически публиковаться в последней версии\nenable_export_desc = Перед включением экспорта настройте программу экспорта и одновременно включите функцию экспорта в файле конфигурации\nenable_share_desc = Совместное использование доступно только для публичных проектов. Частные проекты не поддерживают совместное использование\nauto_save_desc = Сохранять автоматически каждые 30 секунд\nconfirm_into_private = Вы уверены, что хотите сделать проект приватным?\ninto_private_notice = Частный проект должен предоставить токен доступа\nconfirm_into_public = Вы уверены, что хотите сделать свой проект публичным?\ninto_public_notice = Публичный проект может посетить любой желающий\nproject_name_empty = Название проекта не может быть пустым\nsuccess = Успех\nfailed = Неуспешный\nreceive_account_empty = Счет получателя не может быть пустым\nreceive_account_not_exist = Учетная запись получателя не существует\nreceive_account_disabled = Отключить учетную запись получателя\ncannot_preview = Невозможно просмотреть\nupload_failed = Загрузка не удалась\nupload_file_size_limit = Файл должен быть меньше 2MB\nupload_file_empty = Загруженный файл пуст\nuploda_file_type_error = Неправильный тип загруженного файла\nchoose_pic_file = Пожалуйста, выберите изображение\nno_doc_in_cur_proj = Нет документов по текущему проекту\nbuild_doc_tree_error = Произошла ошибка при построении дерева документов проекта\nparam_error = Ошибка параметра\ndoc_name_empty = Имя документа не может быть пустым\nparent_id_not_existed = Родительский идентификатор не существует\ndoc_not_belong_project = Документ не принадлежит указанному проекту\nattachment_not_exist = Вложение не существует\nread_file_error = Ошибка чтения документа\nconfirm_override_doc = Документ был изменен. Вы уверены, что хотите его отменить?\ndoc_auto_published = Документ был автоматически успешно опубликован\nexport_func_disable = Функция экспорта отключена\ncur_project_export_func_disable = Функция экспорта отключена для текущего проекта\ncur_project_not_support_md = Редактор Markdown не поддерживается для текущего проекта\nexport_failed = Экспорт не удался, проверьте системный журнал\nfile_converting = Документ конвертируется в фоновом режиме, пожалуйста, загрузите его позже\nunsupport_file_type = Неподдерживаемый тип файла\nno_exportable_file = Проект не имеет экспортируемого файла\ngen_qrcode_failed = Сгенерировать QR-код не удалось\nsearch_result_error = Ошибка поиска\nget_doc_his_failed = Не удалось получить историю документа\nproject_space_not_exist = Проектное пространство не существует\nsearch_placeholder = введите ключевое слово пожалуйста\nno_search_result = Результаты поиска отсутствуют!\nuser_exist_in_proj = Пользователь уже существует в проекте\ncannot_change_own_priv = Невозможно изменить собственные разрешения\ncannot_delete_self = Невозможно удалить себя\ncannot_handover_myself = Cannot be transferred to yourself\nconfirm_delete_blog = Подтвердить удаление блога?\ndelete_blog_tips = Удаленный блог не может быть восстановлен\ninput_proj_id_pls = введите идентификатор проекта, пожалуйста\ninput_doc_id_pls = введите идентификатор документа, пожалуйста\nblog_digest_tips = Дайджест блога не может превышать 500 символов\nblog_title_empty = название блога не может быть пустым\nblog_not_exist = Блог не существует или был удален\nblog_pwd_incorrect = Неверный пароль доступа\nset_pwd_pls = пожалуйста, установите пароль для шифрования блога\nunknown_blog_type = неизвестный тип блога\nblog_title_tips = Название блога не может превышать 200 символов\nref_doc_prj_not_existed = Проект справочного документа не существует\nquery_ref_doc_error = запрос справочного документа не удался\nref_doc_not_exist_or_no_permit = справочный документ не существует или имеет недостаточные разрешения\nblog_id_existed = идентификатор блога уже существует\nquery_failed = запрос не удался\nblog_has_modified = Статья была изменена\ncur_user_cannot_change_pwd = Текущий пользователь не поддерживает смену пароля\norigin_pwd_empty = Исходный пароль не может быть пустым\nnew_pwd_empty = Новый пароль не может быть пустым\nconfirm_pwd_empty = Подтверждение пароля не может быть пустым\npwd_length = Пароль должен содержать от 6 до 18 символов\npwd_length_tips = Пароль должен содержать от 6 до 50 символов\nwrong_origin_pwd = Неверный пароль источника\nwrong_confirm_pwd = Подтверждение пароля неверное\nsame_pwd = Новый пароль должен отличаться от исходного\npwd_encrypt_failed = Шифрование пароля не удалось\nteam_name_empty = Название команды не может быть пустым\nproj_empty = Проект не может быть пустым\nsite_name_empty = Имя сайта не может быть пустым\nproj_space_name_empty = Имя пространства проекта не может быть пустым\nproj_space_id_empty = Идентификатор пространства проекта не может быть пустым\nproj_space_id_tips = Идентификатор пространства проекта может состоять только из букв и цифр и содержать от 2 до 100 символов\nproject_order_desc = Только число, сортировать от большего к меньшему\nproject_label_desc = Максимально допустимое количество тегов — 10. Разделяйте несколько тегов знаком «;»\ncannot_change_own_status = Невозможно изменить свой статус\ncannot_change_super_status = Невозможно изменить статус суперадминистратора\ncannot_change_super_priv = Невозможно изменить права суперадминистратора\neditors_not_compatible = Эти два редактора несовместимы\n\n[blog]\nauthor = Автор\nproject_list = Список проектов\nadd_project = Добавить проект\nimport_project = Импорт проекта\ndelete_project = Удалить проект\nproject_summary = Резюме проекта\nread = Читать\nedit = Редактировать\ndelete = Удалить\ncopy = Копировать\nview = Вид\npublish = Публиковать\nedit_doc = Редактировать документ\ndefault_cover = Обложка по умолчанию\ncreate_time = Время создания\nupdate_time = Время обновления\ncreator = Создатель\ndoc_amount = Количество документов\ndoc_unit =\nproject_role = Роль проекта\nlast_edit = последний раз редактировалось\nproject_title = Название проекта\nproject_id = Идентификатор проекта\nproject_desc = Описание проекта\npublic = общественный\nprivate = Частный\npublic_project = Общественный проект\nprivate_project = Частный проект\nsummary = Краткое содержание\nmember = Член\nteam = Команда\ncomment_amount = Количество комментариев\ncomment_unit =\nmember_manage = управление членами\nadd_member = Добавить участника\nadministrator = Администратор\neditor = Редактор\nobserver = Наблюдатель\nteam_manage = управление командой\nadd_team = Добавить команду\nteam_name = Название команды\nmember_amount = Количество членов\njoin_time = Присоединился Время\nproject_setting = Настройка проекта\nhandover_project = Проект передачи\nmake_public = В общественность\nmake_private = В частную жизнь\nhistory_record_amount = Количество исторических записей\ncorp_id = название корпорации\ntext_editor = монтажер\nproject_label = Метка проекта\nproject_order = Сортировка проекта\naccess_pass = Пароль доступа\naccess_token = Токен доступа\nauto_publish = Автоматическая публикация\nenable_export = Включить экспорт\nenable_share = Включить Поделиться\nset_first_as_home = Установить первый документ в качестве домашней страницы по умолчанию\nauto_save = Автоматическое сохранение\ncover = крышка\nclick_change_cover = Нажмите, чтобы изменить обложку проекта\nchange_cover = сменить обложку\npreview = Предварительный просмотр\nchoose = Выбирать\nupload = Загрузить\nrecipient_account = Получатель\nblog_list = Список блогов\nadd_blog = Добавить блог\nencryption = шифрование\nencrypt = шифровать\nedit_blog = Редактировать блог\ndelete_blog = Удалить блог\nsetting_blog = Настройка блога\nno_blog = Нет блога\nblog_setting = Настройка блога\ntitle = Название блога\ntype = Тип блога\nnormal_blog = Обычный блог\nlink_blog = Связанный блог\nref_doc = Справочный документ\nblog_status = Статус блога\nblog_pwd = Пароль блога\nblog_digest = Блог Дайджест\nposted_on = Опубликовано\nmodified_on = Изменено\nprev = предыдущий\nnext = следующий\nno = нет\nedit_title = Редактировать блог\nprivate_blog_tips = Это частный блог, введите пароль для доступа\nprint_text = Включить печать\n\n[doc]\nword_to_html = Word в HTML\nhtml_to_markdown = HTML в Markdown\nmodify_doc = Изменить документ\ncomparison = Сравнение\nsave_merge = Сохранить Объединить\nprev_diff = Предыдущая разница\nnext_diff = Следующее отличие\nmerge_to_left = Объединить слева\nmerge_to_right = Объединить справа\nexchange_left_right = Обмен левого и правого\nprint = Печать\ndownload = Скачать\nshare = Делиться\nshare_project = Поделиться проектом\nshare_url = URL-адрес проекта\ncontents = Каталог\nsearch = Поиск\nexpand = Расширять\nfold = Складывать\nclose = Закрывать\ndoc_publish_by = Документ опубликован\ndoc_publish = выпускать\nedit_doc = Редактировать документ\nbackward = назад\nsave = Сохранять\nsave_as_tpl = Сохранить как шаблон\nundo = Отменить\nredo = Переделать\nbold = жирный\nitalic = курсив\nstrikethrough = зачеркивание\nh1 = H1\nh2 = H2\nh3 = H3\nh4 = H4\nh5 = H5\nh6 = H6\nunorder_list = Неупорядоченный список\norder_list = Упорядоченный список\nhline = Горизонтальная линия\nlink = Связь\nref_link = Ссылка на ссылку\nadd_pic = добавить картинку\ncode = код\ncode_block = блок кода\ntable = Добавить таблицу\nquote = цитировать\ngfm_task = Задача GFM\nattachment = вложение\njson_to_table = конвертировать json в таблицу\ntemplate = шаблон\ndraw = нарисовать\nclose_preview = отключить предварительный просмотр\nmodify_history = История модификаций\nsidebar = боковая панель\nhelp = помощь\npublish = публиковать\ndocument = документ\ncreate_doc = создать документ\nattachments = вложения\ndoc_name = Название документа\ndoc_name_tips = Щелкните правой кнопкой мыши по имени документа в каталоге, чтобы удалить и изменить имя документа, а также добавить подчиненные документы.\ndoc_id = Идентификатор документа\ndoc_id_tips = Идентификатор документа может содержать только строчные буквы, цифры, символы «-» и «_» и может начинаться только со строчной буквы.\nexpand_desc = (Расширять узлы при чтении)\nfold_desc = (Сворачивайте узлы при чтении)\nempty_contents = Пустой каталог\nempty_contents_desc = Нажмите, чтобы развернуть подчиненные узлы\nupload_attachment = Загрузить вложение\ndoc_history = История документа\nchoose_template_type = Выберите тип шаблона, пожалуйста\nnormal_tpl = Нормальный\napi_tpl = API\ndata_dict = Словарь данных\ncustom_tpl = Обычай\ntpl_default_type = Тип по умолчанию\ntpl_plain_text = Обычный текст\nfor_api_doc = Используется для API-документа\ncode_highlight = поддержка подсветки кода\nfor_data_dict = Используется для словаря данных\nform_support = Поддержка формы\nany_type_doc = Поддержка любого типа документа\nas_global_tpl = Можно установить как глобальный шаблон\ntpl_name = Имя шаблона\ntpl_type = Тип шаблона\ncreator = Создатель\ncreate_time = Время создания\noperation = Операция\nglobal_tpl = Глобальный\nglobal_tpl_desc = (Любой проект доступен)\nproject_tpl = Проект\nproject_tpl_desc = (Доступен только текущий проект)\ninsert = вставлять\nuploading = Загрузка\nhis_ver = Историческая версия\nupdate_time = Время обновления\nupdater = Обновление\nversion = Версия\ndelete = Удалить\nrecover = Восстанавливаться\nmerge = Слияние\ncomparison_title = Сравнение документов [слева — исторический документ, справа — текущий документ, пожалуйста, объедините документы справа]\nfont_size = размер шрифта\nunderscore = подчеркивание\nright_intent = правильное намерение\nleft_intent = левое намерение\nsubscript = нижний индекс\nsuperscript = верхний индекс\nclean_format = очистить формат\nadd_video = добавить видео\nformula = формула\nfont_color = цвет шрифта\nbg_color = цвет фона\ninput_pwd = введите пароль пожалуйста\nread_pwd = прочитать пароль\ncommit = совершить\nft_author = Автор：\nft_last_editor = Последний редактор：\nft_create_time = Время создания：\nft_update_time = Время обновления：\nview_count = Количество просмотров\nchangetheme = Переключить темы\n\n[project]\nprj_space_list = Список проектных пространств\nprj_space_list_of = Список проектного пространства %s\nsearch_title = Показать элементы пространства проекта \"%s\"\nauthor = Автор\nno_project = Нет проекта\nprj_amount = Количество проектов\ncreator = Создатель\ncreate_time = Время создания\nno_project_space = Нет места для проекта\n\n[search]\ntitle = Поиск\nsearch_title = Показать результат поиска для \"%s\"\ndoc = документ\nprj = проект\nblog = блог\nfrom_proj = из проекта\nfrom_blog = из блога\nauthor = автор\nupdate_time = время обновления\nno_result = Нет результатов поиска\n\n[page]\nfirst = первый\nlast = последний\nprev = предыдущий\nnext = следующий\n\n[uc]\nuser_center = Центр пользователя\nbase_info = основная информация\nchange_pwd = Изменить пароль\nusername = Имя пользователя\nnickname = Псевдоним\nrealname = Настоящее имя\nemail = Email\nmobile = Номер телефона\ndescription = Описание\ndescription_tips = Описание не может превышать 500 символов.\navatar = Аватар\nchange_avatar = Изменить аватар\npassword = Пароль\norigin_pwd = Исходный пароль\nnew_pwd = Новый пароль\nconfirm_pwd = Подтвердите пароль\nrole = Роль\ntype = Тип\nstatus = Статус\nsuper_admin = Супер администратор\nadmin = Администратор\nuser = Пользователь\nread_usr = Пользователи только для чтения\nnormal = Нормальный\ndisable = Отключено\nenable = Включено\ncreate_user = Добавить пользователя\nedit_user = Редактировать пользователя\npwd_tips = Пожалуйста, оставьте поле пустым, если вы не меняете пароль. Изменить пароль могут только локальные пользователи.\n\n[mgr]\nlanguage = Язык по умолчанию\nzh_cn = 简体中文\nen_us = English\ndashboard_menu = Приборная панель\nuser_menu = Пользователи\nteam_menu = Команды\nproject_menu = Проекты\nproject_space_menu = Проектные пространства\ncomment_menu = Комментарии\nconfig_menu = Конфигурирует\nattachment_menu = Вложения\nlabel_menu = Этикетки\ndashboard_mgr = Приборная панель\nuser_mgr = Управление пользователями\nteam_mgr = Управление командой\nproject_mgr = Управление проектом\nproject_space_mgr = Управление пространством проекта\ncomment_mgr = Управление комментариями\nconfig_mgr = Конфигурирует управление\nconfig_file = Настроить файл\nattachment_mgr = Управление вложениями\nlabel_mgr = Управление этикетками\nlabel_name = Название этикетки\nused_quantity = Использованное количество\nproj_amount = Количество проектов\nblog_amount = Количество блогов\nmember_amount = Количество членов\ncomment_amount = Количество комментариев\nattachment_amount = Количество вложений\nmember_mgr = Управление участниками\nadd_member = Добавить участника\ncreate_team = Создать команду\nteam_name = Название команды\nproj = Проект\nmember = Член\nedit_team = Редактировать информацию о команде\nteam_member_mgr = Управление членами команды\nteam_proj = Командный проект\nadd_proj = Добавить проект\nproj_name = Название проекта\nproj_author = Автор проекта\njoin_time = Присоединяйтесь Время\njoin_proj = Присоединиться\nfile_name = Имя файла\nis_exist = Существует\nexist = Существовать\ndeleted = Удалено\nproj_blog_name = Название проекта/блога\ndoc_name = Название документа\nfile_path = Путь файла\ndownload_url = URL для загрузки файла\nfile_size = Размер файла\nupload_time = Время, когда файл был загружен\ndownload = Скачать\ndownload_title = Загрузить на локальный путь\nattachment_name = Имя вложения\nsite_name = Название сайта\ndomain_icp = Регистрационный номер доменного имени ICP\nsite_desc = Описание веб-сайта\nsite_desc_tips = Описание не может превышать 500 символов\nenable_anonymous_access = Включить анонимный доступ\nenable = Включить\ndisable = Отключить\nenable_register = Включить регистрацию\nenable_captcha = Включить капчу\nenable_doc_his = Включить историю документов\nproj_space_name = Название пространства проекта\nproj_space_id = Идентификатор пространства проекта\ncreate_proj_space = Создать пространство проекта\nedit_proj_space = Редактировать пространство проекта\nproj_list = Список проектов\nedit_proj = Редактировать проект\ncreate_time = Время создания\ncreator = Создатель\ndoc_amount = Количество документов\nlast_edit = Последний редактор\ndelete_project = Удалить проект\n"
  },
  {
    "path": "conf/lang/zh-cn.ini",
    "content": "[common]\ntitle = 文档在线管理系统\nhome = 首页\nblog = 文章\nproject_space = 项目空间\nperson_center = 个人中心\nmy_project = 我的项目\nmy_blog = 我的文章\nmanage = 管理后台\nlogin = 登录\nlogout = 退出登录\nofficial_website = 官方网站\nfeedback = 意见反馈\nsource_code = 项目源码\nmanual = 使用手册\nusername = 用户名\naccount = 账号\nemail = 邮箱\npassword = 密码\nrole = 角色\ncaptcha = 验证码\nkeep_login = 保持登录\nforgot_password = 忘记密码？\nregister = 立即注册\nthird_party_login = 第三方登录\ndingtalk_login = 钉钉登录\nwecom_login = 企业微信登录\naccount_recovery = 找回密码\nnew_password = 新密码\nconfirm_password = 确认密码\nnew_account = 用户注册\nsetting = 设置\nsave = 保存\nedit = 编辑\ndelete = 删除\ncancel = 取消\ncreate = 创建\nconfirm_delete = 确定删除\nupload_lang = zh\njs_lang = zh-CN\nremove = 移除\noperate = 操作\nconfirm = 确定\ncreator = 创始人\nadministrator = 管理员\neditor = 编辑者\nobserver = 观察者\nback = 返回\ndetail = 详情\nadmin_right = 拥有阅读、写作和管理权限\neditor_right = 拥有阅读和写作权限\nobserver_right = 拥有阅读权限\nyes = 是\nno = 否\nread = 阅读\ngenerate = 生成\nclean = 清理\n\n[init]\ndefault_proj_name = MinDoc演示项目\ndefault_proj_desc = 这是一个MinDoc演示项目，该项目是由系统初始化时自动创建。\ndefault_proj_space = 默认项目空间\nblank_doc = 空白文档\n\n[message]\ntips = 友情提示\npage_not_existed = 页面不存在\nno_permission = 权限不足\nkeyword_placeholder = 请输入关键词...\nwrong_account_password = 账号或密码错误\nwrong_password = 密码错误\nclick_to_change = 点击换一张\nlogging_in = 正在登录...\nneed_relogin = 请重新登录。\nreturn_account_login = 返回账号密码登录\nno_account_yet = 还没有账号？\nhas_account = 已有账号？\naccount_empty = 账号不能为空\nemail_empty = 邮箱不能为空\npassword_empty = 密码不能为空\ncaptcha_empty = 验证码不能为空\nsystem_error = 系统错误\nprocessing = 正在处理...\nemail_sent = 邮件发送成功，请登录邮箱查看。\nconfirm_password_empty = 确认密码不能为空\nincorrect_confirm_password = 确认密码输入不正确\nillegal_request = 非法请求\naccount_or_password_empty = 账号或密码不能为空\ncaptcha_wrong = 验证码不正确\npassword_length_invalid = 密码不能为空且必须在6-50个字符之间\nmail_expired = 邮件已失效\ncaptcha_expired = 验证码已过期，请重新操作。\nuser_not_existed = 用户不存在\nreadusr_only_observer = 只读用户只能设置为观察者\nemail_not_exist = 邮箱不存在\nfailed_save_password = 保存密码失败\nmail_service_not_enable = 未启用邮件服务\naccount_disable = 账号已被禁用\nfailed_send_mail = 发送邮件失败\nsent_too_many_times = 发送次数太多，请稍候再试\naccount_not_support_retrieval = 当前用户不支持找回密码\nusername_invalid_format = 账号只能由英文字母数字组成，且在3-50个字符\nemail_invalid_format = 邮箱格式不正确\naccount_existed = 账号已存在\nfailed_register = 注册失败，请联系管理员\nfailed_obtain_user_info = 获取身份信息失败\ndingtalk_auto_login_not_enable = 未开启钉钉自动登录功能\nfailed_auto_login = 自动登录失败\nno_project = 暂无项目\nitem_not_exist = 项目不存在或已删除\nitem_not_exist_or_no_permit = 项目不存在或权限不足\ndoc_not_exist = 文档不存在或已删除\ndoc_not_exist_or_no_permit = 文档不存在或权限不足\nunknown_exception = 未知异常\nno_data = 暂无数据\nproject_must_belong_space = 每个项目必须归属一个项目空间，超级管理员可在后台管理和维护\nproject_title_placeholder = 项目标题(不超过100字)\nproject_title_tips = 项目标题不能超过100字符\nproject_id_placeholder = 项目唯一标识(不超过50字)\nproject_id_tips = 文档标识只能包含小写字母、数字，以及“-”、“.”和“_”符号.\nproject_desc_placeholder = 描述信息不超过500个字符\nproject_public_desc = (任何人都可以访问)\nproject_private_desc = (只有参与者或使用令牌才能访问)\nproject_cover_desc = 项目图片可在项目设置中修改\nconfirm_delete_project = 确定删除项目吗？\nwarning_delete_project = 删除项目后将无法找回。\nproject_space_empty = 请选择项目空间\nproject_title_empty = 项目标题不能为空\nproject_id_empty = 项目标识不能为空\nproject_id_existed = 文档标识已被使用\nproject_id_error = 项目标识有误\nproject_id_length = 项目标识必须小于50字符\nimport_file_empty = 请选择需要上传的文件\nfile_type_placeholder = 请选择Zip或Docx文件\npublish_to_queue = 发布任务已推送到任务队列，稍后将在后台执行。\nteam_name_empty = 团队名称不能为空\noperate_failed = 操作失败\nproject_id_desc = 项目标识用来标记项目的唯一性，不可修改。\nhistory_record_amount_desc = 当开启文档历史时,该值会限制每个文档保存的历史数量\ncorp_id_desc = 导出文档PDF文档时显示的页脚\nproject_desc_desc = 描述信息不超过500个字符,支持Markdown语法\nproject_desc_tips = 项目描述不能大于500字\naccess_pass_desc = 没有访问权限访问项目时需要提供的密码\nauto_publish_desc = 开启后，每次保存会自动发布到最新版本\nenable_export_desc = 开启导出前请先配置导出程序，并在配置文件中同时开启导出功能\nenable_share_desc = 分享只对公开项目生效，私有项目不支持分享\nauto_save_desc = 开启后每隔30秒会自动保存\nconfirm_into_private = 确定将项目转为私有吗？\ninto_private_notice = 转为私有后需要通过阅读令牌才能访问该项目。\nconfirm_into_public = 确定将项目转为公有吗？\ninto_public_notice = 转为公有后所有人都可以访问该项目。\nproject_name_empty = 项目名称不能为空\nsuccess = 成功\nfailed = 失败\nreceive_account_empty = 接受者账号不能为空\nreceive_account_not_exist = 接受用户不存在\nreceive_account_disabled = 接受用户已被禁用\ncannot_preview = 不能预览\nupload_failed = 上传失败\nupload_file_size_limit = 文件必须小于2MB\nupload_file_empty = 上传文件为空\nuploda_file_type_error = 文件类型有误\nchoose_pic_file = 请选择图片\nno_doc_in_cur_proj = 当前项目没有文档\nbuild_doc_tree_error = 生成项目文档树时出错\nparam_error = 参数错误\ndoc_name_empty = 文档名称不能为空\nparent_id_not_existed = 父分类不存在\ndoc_not_belong_project = 文档不属于指定的项目\nattachment_not_exist = 附件不存在或已删除\nread_file_error = 读取文档错误\nconfirm_override_doc = 文档已被修改确定要覆盖吗？\ndoc_auto_published = 文档自动发布成功\nexport_func_disable = 系统没有开启导出功能\ncur_project_export_func_disable = 当前项目没有开启导出功能\ncur_project_not_support_md = 当前项目不支持Markdown编辑器\nexport_failed = 导出失败，请查看系统日志\nfile_converting = 文档正在后台转换，请稍后再下载\nunsupport_file_type = 不支持的文件格式\nno_exportable_file = 项目没有导出文件\ngen_qrcode_failed = 生成二维码失败\nsearch_result_error = 搜索结果错误\nget_doc_his_failed = 获取历史失败\nproject_space_not_exist = 项目空间不存在\nsearch_placeholder = 请输入搜索关键字\nno_search_result = 暂无相关搜索结果！\nuser_exist_in_proj = 用户已存在该项目中\ncannot_change_own_priv = 不能变更自己的权限\ncannot_delete_self = 不能删除自己\ncannot_handover_myself = 不能转让给自己\nconfirm_delete_blog = 确定删除文章吗？\ndelete_blog_tips = 删除文章后将无法找回。\ninput_proj_id_pls = 请输入项目标识\ninput_doc_id_pls = 请输入文档标识\nblog_digest_tips = 文章摘要不超过500个字符\nblog_title_empty = 文章标题不能为空\nblog_not_exist = 文章不存在或已删除\nblog_pwd_incorrect = 文章密码不正确\nset_pwd_pls = 加密文章请设置密码\nunknown_blog_type = 未知的文章类型\nblog_title_tips = 文章标题不能大于200个字符\nref_doc_prj_not_existed = 关联文档的项目不存在\nquery_ref_doc_error = 查询关联项目文档时出错\nref_doc_not_exist_or_no_permit = 关联文档不存在或权限不足\nblog_id_existed = 文章标识已存在\nquery_failed = 查询失败\nblog_has_modified = 文章已被修改\ncur_user_cannot_change_pwd = 当前用户不支持修改密码\norigin_pwd_empty = 原密码不能为空\nnew_pwd_empty = 新密码不能为空\nconfirm_pwd_empty = 确认密码不能为空\npwd_length = 密码必须在6-18字之间\npwd_length_tips = 密码必须在6-50个字符之间\nwrong_origin_pwd = 原始密码不正确\nwrong_confirm_pwd = 确认密码不正确\nsame_pwd = 新密码不能和原始密码相同\npwd_encrypt_failed = 密码加密失败\nteam_name_empty = 团队名称不能为空\nproj_empty = 项目不能为空\nsite_name_empty = 网站标题不能为空\nproj_space_name_empty = 项目空间名称不能为空\nproj_space_id_empty = 项目空间标识不能为空\nproj_space_id_tips = 项目空间标识只能由字母和数字组成且在2-100字符之间\nproject_order_desc = 只能是数字，序号越大排序越靠前\nproject_label_desc = 最多允许添加10个标签，多个标签请用“;”分割\ncannot_change_own_status = 不能变更自己的状态\ncannot_change_super_status = 不能变更超级管理员的状态\ncannot_change_super_priv = 不能变更超级管理员的权限\neditors_not_compatible = 两种编辑器不兼容\n\n[blog]\nauthor = 作者\nproject_list = 项目列表\nadd_project = 添加项目\nimport_project = 导入项目\ndelete_project = 删除项目\nproject_summary = 项目概要\nread = 阅读\nedit = 编辑\ndelete = 删除\ncopy = 复制\nview = 查看文档\npublish = 发布\nedit_doc = 编辑文档\ndefault_cover = 默认封面\ncreate_time = 创建时间\nupdate_time = 修改时间\ncreator = 创建者\ndoc_amount = 文档数量\ndoc_unit = 篇\nproject_role = 项目角色\nlast_edit = 最后编辑\nproject_title = 项目标题\nproject_id = 项目标识\nproject_desc = 项目描述\npublic = 公开\nprivate = 私有\npublic_project = 公开项目\nprivate_project = 私有项目\nsummary = 概要\nmember = 成员\nteam = 团队\ncomment_amount = 评论数量\ncomment_unit = 条\nmember_manage = 成员管理\nadd_member = 添加成员\nadministrator = 管理员\neditor = 编辑者\nobserver = 观察者\nteam_manage = 团队管理\nadd_team = 添加团队\nteam_name = 团队名称\nmember_amount = 成员数量\njoin_time = 加入时间\nproject_setting = 项目设置\nhandover_project = 转让项目\nmake_public = 转为公有\nmake_private = 转为私有\nhistory_record_amount = 历史记录数量\ncorp_id = 公司名称\ntext_editor = 编辑器\nproject_label = 项目标签\nproject_order = 项目排序\naccess_pass = 访问密码\naccess_token = 访问令牌\nauto_publish = 自动发布\nenable_export = 开启导出\nenable_share = 开启分享\nset_first_as_home = 设置第一篇文档为默认首页\nauto_save = 自动保存\ncover = 封面\nclick_change_cover = 点击图片可修改项目封面\nchange_cover = 修改封面\npreview = 预览\nchoose = 选择\nupload = 上传\nrecipient_account = 接收者账号\nblog_list = 文章列表\nadd_blog = 添加文章\nencryption = 加密\nencrypt = 密\nedit_blog = 文章编辑\ndelete_blog = 删除文章\nsetting_blog = 文章设置\nno_blog = 暂无文章\nblog_setting = 文章设置\ntitle = 文章标题\ntype = 文章类型\nnormal_blog = 普通文章\nlink_blog = 链接文章\nref_doc = 关联文档\nblog_status = 文章状态\nblog_pwd = 文章密码\nblog_digest = 文章摘要\nposted_on = 发布于\nmodified_on = 修改于\nprev = 上一篇\nnext = 下一篇\nno = 无\nedit_title = 编辑文章\nprivate_blog_tips = 加密文章，请输入密码访问\nprint_text = 开启打印\n\n[doc]\nword_to_html = Word转笔记\nhtml_to_markdown = HTML转Markdown\nmodify_doc = 修改文档\ncomparison = 文档比较\nsave_merge = 保存合并\nprev_diff = 上一处差异\nnext_diff = 下一处差异\nmerge_to_left = 合并到左侧\nmerge_to_right = 合并到右侧\nexchange_left_right = 左右切换 \nprint = 打印\ndownload = 下载\nshare = 分享\nshare_project = 项目分享\nshare_url = 项目地址\ncontents = 目录\nsearch = 搜索\nexpand = 展开\nfold = 收起\nclose = 关闭\ndoc_publish_by = 本文档使用\ndoc_publish = 发布\nedit_doc = 编辑文档\nbackward = 返回\nsave = 保存\nsave_as_tpl = 保存为模板\nundo = 撤销\nredo = 重做\nbold = 粗体\nitalic = 斜体\nstrikethrough = 删除线\nh1 = 标题一\nh2 = 标题二\nh3 = 标题三\nh4 = 标题四\nh5 = 标题五\nh6 = 标题六\nunorder_list = 无序列表\norder_list = 有序列表\nhline = Horizontal line\nlink = 链接\nref_link = 引用链接\nadd_pic = 添加图片\ncode = 行内代码\ncode_block = 代码块\ntable = 添加表格\nquote = 引用\ngfm_task = GFM 任务列表\nattachment = 附件\njson_to_table = Json转换为表格\ntemplate = 模板\ndraw = 画图\nclose_preview = 关闭实时预览\nmodify_history = 修改历史\nsidebar = 边栏\nhelp = 使用帮助\npublish = 发布\ndocument = 文档\ncreate_doc = 创建文档\nattachments = 个附件\ndoc_name = 文档名称\ndoc_name_tips = 在目录的文档名上右键可以删除和修改文档名称以及添加下级文档\ndoc_id = 文档标识\ndoc_id_tips = 文档标识只能包含小写字母、数字，以及“-”和“_”符号,并且只能小写字母开头\nexpand_desc = (在阅读时会自动展开节点)\nfold_desc = (在阅读时会关闭节点)\nempty_contents = 空目录\nempty_contents_desc = (单击时会展开下级节点)\nupload_attachment = 上传附件\ndoc_history = 文档历史记录\nchoose_template_type = 请选择模板类型\nnormal_tpl = 普通文档\napi_tpl = API文档\ndata_dict = 数据字典\ncustom_tpl = 自定义模板\ntpl_default_type = 默认类型\ntpl_plain_text = 简单的文本文档\nfor_api_doc = 用于API文档速写\ncode_highlight = 支持代码高亮\nfor_data_dict = 用于数据字典显示\nform_support = 表格支持\nany_type_doc = 支持任意类型文档\nas_global_tpl = 可以设置为全局模板\ntpl_name = 模板名称\ntpl_type = 模板类型\ncreator = 创建人\ncreate_time = 创建时间\noperation = 操作\nglobal_tpl = 全局\nglobal_tpl_desc = (任何项目都可用)\nproject_tpl = 项目\nproject_tpl_desc = (只有当前项目可用)\ninsert = 插入\nuploading = 正在上传\nhis_ver = 历史版本\nupdate_time = 修改时间\nupdater = 修改人\nversion = 版本\ndelete = 删除\nrecover = 恢复\nmerge = 合并\ncomparison_title = 文档比较【左侧为历史文档，右侧为当前文档，请将文档合并到右侧】\nfont_size = 字号\nunderscore = 下划线\nright_intent = 右缩进\nleft_intent = 左缩进\nsubscript = 下标\nsuperscript = 上标\nclean_format = 清空格式\nadd_video = 添加视频\nformula = 公式\nfont_color = 字体颜色\nbg_color = 背景颜色\ninput_pwd = 请输入密码\nread_pwd = 浏览密码\ncommit = 提交\nft_author = 作者：\nft_last_editor = 最后编辑：\nft_create_time = 创建时间：\nft_update_time = 更新时间：\nview_count = 阅读次数\nchangetheme = 切换主题\nprev = 上一篇\nnext = 下一篇\n\n[project]\nprj_space_list = 项目空间列表\nprj_space_list_of = 项目空间%s的项目列表\nsearch_title = 显示项目空间为\"%s\"的项目\nauthor = 作者\nno_project = 暂无项目\nprj_amount = 项目数量\ncreator = 创建人\ncreate_time = 创建时间\nno_project_space = 没有项目空间\n\n[search]\ntitle = 搜索\nsearch_title = 显示\"%s\"的搜索结果\ndoc = 文档\nprj = 项目\nblog = 文章\nfrom_proj = 来自项目\nfrom_blog = 来自文章\nauthor = 作者\nupdate_time = 更新时间\nno_result = 暂无相关搜索结果\n\n[page]\nfirst = 首页\nlast = 末页\nprev = 上一页\nnext = 下一页\n\n[uc]\nuser_center = 用户中心\nbase_info = 基本信息\nchange_pwd = 修改密码\nusername = 用户名\nnickname = 昵称\nrealname = 真实姓名\nemail = 邮箱\nmobile = 手机号\ndescription = 描述\ndescription_tips = 描述不能超过500字\navatar = 头像\nchange_avatar = 修改头像\npassword = 密码\norigin_pwd = 原始密码\nnew_pwd = 新密码\nconfirm_pwd = 确认密码\nrole = 角色\ntype = 类型\nstatus = 状态\nsuper_admin = 超级管理员\nadmin = 管理员\nuser = 普通用户\nread_usr = 只读用户\nnormal = 正常\ndisable = 禁用\nenable = 启用\ncreate_user = 创建用户\nedit_user = 编辑用户\npwd_tips = 不修改密码请留空,只支持本地用户修改密码\n\n[mgr]\nlanguage = 默认语言\nzh_cn = 简体中文\nen_us = English\ndashboard_menu = 仪表盘\nuser_menu = 用户管理\nteam_menu = 团队管理\nproject_menu = 项目管理\nproject_space_menu = 项目空间管理\ncomment_menu = 评论管理\nconfig_menu = 配置管理\nattachment_menu = 附件管理\nlabel_menu = 标签管理\ndashboard_mgr = 仪表盘\nuser_mgr = 用户管理\nteam_mgr = 团队管理\nproject_mgr = 项目管理\nproject_space_mgr = 项目空间管理\ncomment_mgr = 评论管理\nconfig_mgr = 配置管理\nconfig_file = 配置文件\nattachment_mgr = 附件管理\nlabel_mgr = 标签管理\nlabel_name = 标签名称\nused_quantity = 使用数量\nproj_amount = 项目数量\nblog_amount = 文章数量\nmember_amount = 成员数量\ncomment_amount = 评论数量\nattachment_amount = 附件数量\nmember_mgr = 成员管理\nadd_member = 添加成员\ncreate_team = 创建团队\nteam_name = 团队名称\nproj = 项目\nmember = 成员\nedit_team = 编辑团队\nteam_member_mgr = 团队用户管理\nteam_proj = 团队项目\nadd_proj = 添加项目\nproj_name = 项目名称\nproj_author = 项目作者\njoin_time = 加入时间\njoin_proj = 加入项目\nfile_name = 文件名称\nis_exist = 是否存在\nexist = 存在\ndeleted = 已删除\nproj_blog_name = 项目/文章名称\ndoc_name = 文档名称\nfile_path = 文件路径\ndownload_url = 下载路径\nfile_size = 文件大小\nupload_time = 上传时间\ndownload = 下载\ndownload_title = 下载到本地\nattachment_name = 附件名称\nsite_name = 网站标题\ndomain_icp = 域名备案\nsite_desc = 网站描述\nsite_desc_tips = 描述信息不超过500个字符\nenable_anonymous_access = 启用匿名访问\nenable = 开启\ndisable = 关闭\nenable_register = 启用注册\nenable_captcha = 启用验证码\nenable_doc_his = 启用文档历史\nproj_space_name = 项目空间名称\nproj_space_id = 项目空间标识\ncreate_proj_space = 创建项目空间\nedit_proj_space = 编辑项目空间\nproj_list = 项目列表\nedit_proj = 编辑项目\ncreate_time = 创建时间\ncreator = 创建者\ndoc_amount = 文档数量\nlast_edit = 最后编辑\ndelete_project = 删除项目\n"
  },
  {
    "path": "conf/mail.go",
    "content": "package conf\n\nimport (\n\t\"strings\"\n\n\t\"github.com/beego/beego/v2/server/web\"\n)\n\ntype SmtpConf struct {\n\tEnableMail   bool\n\tMailNumber   int\n\tSmtpUserName string\n\tSmtpHost     string\n\tSmtpPassword string\n\tSmtpPort     int\n\tFormUserName string\n\tMailExpired  int\n\tSecure       string\n}\n\nfunc GetMailConfig() *SmtpConf {\n\tuser_name, _ := web.AppConfig.String(\"smtp_user_name\")\n\tpassword, _ := web.AppConfig.String(\"smtp_password\")\n\tsmtp_host, _ := web.AppConfig.String(\"smtp_host\")\n\tsmtp_port := web.AppConfig.DefaultInt(\"smtp_port\", 25)\n\tform_user_name, _ := web.AppConfig.String(\"form_user_name\")\n\tenable_mail, _ := web.AppConfig.String(\"enable_mail\")\n\tmail_number := web.AppConfig.DefaultInt(\"mail_number\", 5)\n\tsecure := web.AppConfig.DefaultString(\"secure\", \"NONE\")\n\n\tif secure != \"NONE\" && secure != \"LOGIN\" && secure != \"SSL\" {\n\t\tsecure = \"NONE\"\n\t}\n\tc := &SmtpConf{\n\t\tEnableMail:   strings.EqualFold(enable_mail, \"true\"),\n\t\tMailNumber:   mail_number,\n\t\tSmtpUserName: user_name,\n\t\tSmtpHost:     smtp_host,\n\t\tSmtpPassword: password,\n\t\tFormUserName: form_user_name,\n\t\tSmtpPort:     smtp_port,\n\t\tSecure:       secure,\n\t}\n\treturn c\n}\n"
  },
  {
    "path": "conf/workweixin.go",
    "content": "package conf\n\nimport (\n\t\"github.com/beego/beego/v2/server/web\"\n)\n\ntype WorkWeixinConf struct {\n\tCorpId  string // 企业ID\n\tAgentId string // 应用ID\n\tSecret  string // 应用密钥\n\t// ContactSecret string // 通讯录密钥\n}\n\nfunc GetWorkWeixinConfig() *WorkWeixinConf {\n\tcorpid, _ := web.AppConfig.String(\"workweixin_corpid\")\n\tagentid, _ := web.AppConfig.String(\"workweixin_agentid\")\n\tsecret, _ := web.AppConfig.String(\"workweixin_secret\")\n\t// contact_secret, _ := web.AppConfig.String(\"workweixin_contact_secret\")\n\n\tc := &WorkWeixinConf{\n\t\tCorpId:  corpid,\n\t\tAgentId: agentid,\n\t\tSecret:  secret,\n\t\t// ContactSecret: contact_secret,\n\t}\n\treturn c\n}\n"
  },
  {
    "path": "controllers/AccountController.go",
    "content": "package controllers\n\nimport (\n\t\"context\"\n\t\"encoding/json\"\n\t\"errors\"\n\t\"github.com/mindoc-org/mindoc/cache\"\n\t\"github.com/mindoc-org/mindoc/utils/auth2\"\n\t\"github.com/mindoc-org/mindoc/utils/auth2/dingtalk\"\n\t\"github.com/mindoc-org/mindoc/utils/auth2/wecom\"\n\t\"html/template\"\n\t\"math/rand\"\n\t\"net/http\"\n\t\"net/url\"\n\t\"regexp\"\n\t\"strings\"\n\t\"time\"\n\n\t\"github.com/beego/beego/v2/client/orm\"\n\t\"github.com/beego/beego/v2/core/logs\"\n\t\"github.com/beego/beego/v2/server/web\"\n\t\"github.com/beego/i18n\"\n\t\"github.com/lifei6671/gocaptcha\"\n\t\"github.com/mindoc-org/mindoc/conf\"\n\t\"github.com/mindoc-org/mindoc/mail\"\n\t\"github.com/mindoc-org/mindoc/models\"\n\t\"github.com/mindoc-org/mindoc/utils\"\n)\n\nconst (\n\tSessionUserInfoKey  = \"session-user-info-key\"\n\tAccessTokenCacheKey = \"access-token-cache-key\"\n)\n\nvar src = rand.New(rand.NewSource(time.Now().UnixNano()))\n\n// AccountController 用户登录与注册\ntype AccountController struct {\n\tBaseController\n}\n\nfunc (c *AccountController) referer() string {\n\tu, _ := url.PathUnescape(c.GetString(\"url\"))\n\tif u == \"\" {\n\t\tu = conf.URLFor(\"HomeController.Index\")\n\t}\n\treturn u\n}\n\nfunc (c *AccountController) IsInWorkWeixin() bool {\n\tua := c.Ctx.Input.UserAgent()\n\tvar wechatRule = regexp.MustCompile(`\\bMicroMessenger\\/\\d+(\\.\\d+)*\\b`)\n\tvar wxworkRule = regexp.MustCompile(`\\bwxwork\\/\\d+(\\.\\d+)*\\b`)\n\treturn wechatRule.MatchString(ua) && wxworkRule.MatchString(ua)\n}\n\nfunc (c *AccountController) Prepare() {\n\tc.BaseController.Prepare()\n\tc.EnableXSRF = web.AppConfig.DefaultBool(\"enablexsrf\", true)\n\n\tc.Data[\"xsrfdata\"] = template.HTML(c.XSRFFormHTML())\n\tc.Data[\"CanLoginWorkWeixin\"] = len(web.AppConfig.DefaultString(\"workweixin_corpid\", \"\")) > 0\n\tc.Data[\"CanLoginDingTalk\"] = len(web.AppConfig.DefaultString(\"dingtalk_app_key\", \"\")) > 0\n\n\tif !c.EnableXSRF {\n\t\treturn\n\t}\n\tif c.Ctx.Input.IsPost() {\n\t\ttoken := c.Ctx.Input.Query(\"_xsrf\")\n\t\tif token == \"\" {\n\t\t\ttoken = c.Ctx.Request.Header.Get(\"X-Xsrftoken\")\n\t\t}\n\t\tif token == \"\" {\n\t\t\ttoken = c.Ctx.Request.Header.Get(\"X-Csrftoken\")\n\t\t}\n\t\tif token == \"\" {\n\t\t\tif c.IsAjax() {\n\t\t\t\tc.JsonResult(403, i18n.Tr(c.Lang, \"message.illegal_request\"))\n\t\t\t} else {\n\t\t\t\tc.ShowErrorPage(403, i18n.Tr(c.Lang, \"message.illegal_request\"))\n\t\t\t}\n\t\t}\n\t\txsrfToken := c.XSRFToken()\n\t\tif xsrfToken != token {\n\t\t\tif c.IsAjax() {\n\t\t\t\tc.JsonResult(403, i18n.Tr(c.Lang, \"message.illegal_request\"))\n\t\t\t} else {\n\t\t\t\tc.ShowErrorPage(403, i18n.Tr(c.Lang, \"message.illegal_request\"))\n\t\t\t}\n\t\t}\n\t}\n}\n\n// Login 用户登录\nfunc (c *AccountController) Login() {\n\tc.TplName = \"account/login.tpl\"\n\n\tif member, ok := c.GetSession(conf.LoginSessionName).(models.Member); ok && member.MemberId > 0 {\n\t\tu := c.GetString(\"url\")\n\t\tif u == \"\" {\n\t\t\tu = c.Ctx.Request.Header.Get(\"Referer\")\n\t\t}\n\t\tif u == \"\" {\n\t\t\tu = conf.URLFor(\"HomeController.Index\")\n\t\t}\n\t\tc.Redirect(u, 302)\n\t}\n\tvar remember CookieRemember\n\t// 如果 Cookie 中存在登录信息\n\tif cookie, ok := c.GetSecureCookie(conf.GetAppKey(), \"login\"); ok {\n\t\tif err := utils.Decode(cookie, &remember); err == nil {\n\t\t\tif member, err := models.NewMember().Find(remember.MemberId); err == nil {\n\t\t\t\tc.SetMember(*member)\n\t\t\t\tc.LoggedIn(false)\n\t\t\t\tc.StopRun()\n\t\t\t}\n\t\t}\n\t}\n\n\tif c.Ctx.Input.IsPost() {\n\t\taccount := c.GetString(\"account\")\n\t\tpassword := c.GetString(\"password\")\n\t\tcaptcha := c.GetString(\"code\")\n\t\tisRemember := c.GetString(\"is_remember\")\n\n\t\t// 如果开启了验证码\n\t\tif v, ok := c.Option[\"ENABLED_CAPTCHA\"]; ok && strings.EqualFold(v, \"true\") {\n\t\t\tv, ok := c.GetSession(conf.CaptchaSessionName).(string)\n\t\t\tif !ok || !strings.EqualFold(v, captcha) {\n\t\t\t\tc.JsonResult(6001, i18n.Tr(c.Lang, \"message.captcha_wrong\"))\n\t\t\t}\n\t\t}\n\n\t\tif account == \"\" || password == \"\" {\n\t\t\tc.JsonResult(6002, i18n.Tr(c.Lang, \"message.account_or_password_empty\"))\n\t\t}\n\n\t\tmember, err := models.NewMember().Login(account, password)\n\t\tif err == nil {\n\t\t\tmember.LastLoginTime = time.Now()\n\t\t\t_ = member.Update(\"last_login_time\")\n\n\t\t\tc.SetMember(*member)\n\n\t\t\tif strings.EqualFold(isRemember, \"yes\") {\n\t\t\t\tremember.MemberId = member.MemberId\n\t\t\t\tremember.Account = member.Account\n\t\t\t\tremember.Time = time.Now()\n\t\t\t\tv, err := utils.Encode(remember)\n\t\t\t\tif err == nil {\n\t\t\t\t\tc.SetSecureCookie(conf.GetAppKey(), \"login\", v, time.Now().Add(time.Hour*24*30).Unix())\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tc.JsonResult(0, \"ok\", c.referer())\n\t\t} else {\n\t\t\tlogs.Error(\"用户登录 ->\", err)\n\t\t\tc.JsonResult(500, i18n.Tr(c.Lang, \"message.wrong_account_password\"), nil)\n\t\t}\n\t\treturn\n\t}\n\n\treferer := c.referer()\n\tu := c.GetString(\"url\")\n\tif u == \"\" {\n\t\tu = referer\n\t\tif u == \"\" {\n\t\t\tu = conf.BaseUrl\n\t\t}\n\t} else {\n\t\tvar schemaRule = regexp.MustCompile(`^https?\\:\\/\\/`)\n\t\tif !schemaRule.MatchString(u) {\n\t\t\tu = conf.BaseUrl + u\n\t\t}\n\t}\n\tc.Data[\"url\"] = referer\n\n\tauth2Redirect := \"AccountController.Auth2Redirect\"\n\tif can, _ := c.Data[\"CanLoginWorkWeixin\"].(bool); can {\n\t\tc.Data[\"workweixin_login_url\"] = conf.URLFor(auth2Redirect, \":app\", wecom.AppName, \"url\", url.PathEscape(u))\n\t}\n\n\tif can, _ := c.Data[\"CanLoginDingTalk\"].(bool); can {\n\t\tc.Data[\"dingtalk_login_url\"] = conf.URLFor(auth2Redirect, \":app\", dingtalk.AppName, \"url\", url.PathEscape(u))\n\n\t}\n\treturn\n}\n\n/*\nAuth2.0 第三方对接思路:\n1. Auth2Redirect: 点击相应第三方接口，路由重定向至第三方提供的Auth2.0地址\n2. Auth2Callback: 第三方回调处理，接收回调的授权码，并获取用户信息\n\t已绑定: 则读取用户信息，直接登录\n\t未绑定: 则弹窗提示（需要敏感信息）\n\t\ta) Auth2BindAccount: 绑定已有账户（用户名+密码）\n\t\tb) Auth2AutoAccount: 自动创建账户，以第三方用户ID作为用户名，密码123456。\n\t\t\t\t\t\t\t 用该方式创建的账户，无法使用账号密码登录，需要修改一次密码后才可以进行账号密码登录。\n*/\n\nfunc (c *AccountController) getAuth2Client() (auth2.Client, error) {\n\tapp := c.Ctx.Input.Param(\":app\")\n\tvar client auth2.Client\n\ttokenKey := AccessTokenCacheKey + \"-\" + app\n\n\tswitch app {\n\tcase wecom.AppName:\n\t\tif can, _ := c.Data[\"CanLoginWorkWeixin\"].(bool); !can {\n\t\t\treturn nil, errors.New(\"auth2.client.wecom.disabled\")\n\t\t}\n\t\tcorpId, _ := web.AppConfig.String(\"workweixin_corpid\")\n\t\tagentId, _ := web.AppConfig.String(\"workweixin_agentid\")\n\t\tsecret, _ := web.AppConfig.String(\"workweixin_secret\")\n\t\tclient = wecom.NewClient(corpId, agentId, secret)\n\n\tcase dingtalk.AppName:\n\t\tif can, _ := c.Data[\"CanLoginDingTalk\"].(bool); !can {\n\t\t\treturn nil, errors.New(\"auth2.client.dingtalk.disabled\")\n\t\t}\n\n\t\tappKey, _ := web.AppConfig.String(\"dingtalk_app_key\")\n\t\tappSecret, _ := web.AppConfig.String(\"dingtalk_app_secret\")\n\t\tclient = dingtalk.NewClient(appSecret, appKey)\n\n\tdefault:\n\t\treturn nil, errors.New(\"auth2.client.notsupported\")\n\t}\n\n\tvar tokenCache auth2.AccessTokenCache\n\terr := cache.Get(tokenKey, &tokenCache)\n\tif err != nil {\n\t\tlogs.Info(\"AccessToken从缓存读取失败\")\n\t\ttoken, err := client.GetAccessToken(context.Background())\n\t\tif err != nil {\n\t\t\treturn client, nil\n\t\t}\n\t\ttokenCache = auth2.NewAccessToken(token)\n\t\tcache.Put(tokenKey, tokenCache, tokenCache.GetExpireIn())\n\t}\n\n\t// 处理过期Token\n\tif tokenCache.IsExpired() {\n\t\ttoken, err := client.GetAccessToken(context.Background())\n\t\tif err != nil {\n\t\t\treturn client, nil\n\t\t}\n\t\ttokenCache = auth2.NewAccessToken(token)\n\t\tcache.Put(tokenKey, tokenCache, tokenCache.GetExpireIn())\n\t}\n\n\tclient.SetAccessToken(tokenCache)\n\treturn client, nil\n}\n\nfunc (c *AccountController) parseAuth2CallbackParam() (code, state string) {\n\tswitch c.Ctx.Input.Param(\":app\") {\n\tcase wecom.AppName:\n\t\tcode = c.GetString(\"code\")\n\t\tstate = c.GetString(\"state\")\n\tcase dingtalk.AppName:\n\t\tcode = c.GetString(\"authCode\")\n\t\tstate = c.GetString(\"state\")\n\t}\n\n\tlogs.Debug(\"code: \", code)\n\tlogs.Debug(\"state: \", state)\n\treturn\n}\n\nfunc (c *AccountController) getAuth2Account() (models.Auth2Account, error) {\n\tswitch c.Ctx.Input.Param(\":app\") {\n\tcase wecom.AppName:\n\t\treturn models.NewWorkWeixinAccount(), nil\n\n\tcase dingtalk.AppName:\n\t\treturn models.NewDingTalkAccount(), nil\n\t}\n\n\treturn nil, errors.New(\"auth2.account.notsupported\")\n}\n\n// Auth2Redirect 第三方auth2.0登录: 钉钉、企业微信\nfunc (c *AccountController) Auth2Redirect() {\n\tclient, err := c.getAuth2Client()\n\tif err != nil {\n\t\tc.DelSession(conf.LoginSessionName)\n\t\tc.SetMember(models.Member{})\n\t\tc.SetSecureCookie(conf.GetAppKey(), \"login\", \"\", -3600)\n\t\tc.StopRun()\n\t\treturn\n\t}\n\n\tapp := c.Ctx.Input.Param(\":app\")\n\tvar isAppBrowser bool\n\tswitch app {\n\tcase wecom.AppName:\n\t\tisAppBrowser = c.IsInWorkWeixin()\n\t}\n\n\tvar callback string\n\tu := c.GetString(\"url\")\n\tif u == \"\" {\n\t\tu = c.referer()\n\t\tcallback = conf.URLFor(\"AccountController.Auth2Callback\", \":app\", app)\n\t}\n\tif u != \"\" {\n\t\tvar schemaRule = regexp.MustCompile(`^https?\\:\\/\\/`)\n\t\tif !schemaRule.MatchString(u) {\n\t\t\tu = strings.TrimRight(conf.BaseUrl, \"/\") + strings.TrimLeft(u, \"/\")\n\t\t}\n\t\tcallback = conf.URLFor(\"AccountController.Auth2Callback\", \":app\", app, \"url\", url.PathEscape(u))\n\t}\n\n\tlogs.Debug(\"callback: \", callback) // debug\n\tc.Redirect(client.BuildURL(callback, isAppBrowser), http.StatusFound)\n}\n\n// Auth2Callback 第三方auth2.0回调\nfunc (c *AccountController) Auth2Callback() {\n\tclient, err := c.getAuth2Client()\n\tif err != nil {\n\t\tc.DelSession(conf.LoginSessionName)\n\t\tc.SetMember(models.Member{})\n\t\tc.SetSecureCookie(conf.GetAppKey(), \"login\", \"\", -3600)\n\t\tc.StopRun()\n\t\tlogs.Error(err)\n\t\treturn\n\t}\n\n\tif member, ok := c.GetSession(conf.LoginSessionName).(models.Member); ok && member.MemberId > 0 {\n\t\tu := c.GetString(\"url\")\n\t\tif u == \"\" {\n\t\t\tu = c.Ctx.Request.Header.Get(\"Referer\")\n\t\t}\n\t\tif u == \"\" {\n\t\t\tu = conf.URLFor(\"HomeController.Index\")\n\t\t}\n\t\tmember, err := models.NewMember().Find(member.MemberId)\n\t\tif err != nil {\n\t\t\tc.DelSession(conf.LoginSessionName)\n\t\t\tc.SetMember(models.Member{})\n\t\t\tc.SetSecureCookie(conf.GetAppKey(), \"login\", \"\", -3600)\n\t\t} else {\n\t\t\tc.SetMember(*member)\n\t\t}\n\t\tc.Redirect(u, 302)\n\t}\n\n\tvar remember CookieRemember\n\t// 如果 Cookie 中存在登录信息\n\tif cookie, ok := c.GetSecureCookie(conf.GetAppKey(), \"login\"); ok {\n\t\tif err := utils.Decode(cookie, &remember); err == nil {\n\t\t\tif member, err := models.NewMember().Find(remember.MemberId); err == nil {\n\t\t\t\tc.SetMember(*member)\n\t\t\t\tc.LoggedIn(false)\n\t\t\t\tc.StopRun()\n\t\t\t}\n\t\t}\n\t}\n\n\tc.TplName = \"account/auth2_callback.tpl\"\n\tbindExisted := \"false\"\n\terrMsg := \"\"\n\tuserInfoJson := \"{}\"\n\tdefer func() {\n\t\tc.Data[\"bind_existed\"] = template.JS(bindExisted)\n\t\tlogs.Debug(\"bind_existed: \", bindExisted)\n\t\tc.Data[\"error_msg\"] = template.JS(errMsg)\n\t\tc.Data[\"user_info_json\"] = template.JS(userInfoJson)\n\t\tc.Data[\"app\"] = template.JS(c.Ctx.Input.Param(\":app\"))\n\t}()\n\n\t// 请求参数获取\n\tcode, state := c.parseAuth2CallbackParam()\n\tif err := client.ValidateCallback(state); err != nil {\n\t\tc.DelSession(conf.LoginSessionName)\n\t\tc.SetMember(models.Member{})\n\t\tc.SetSecureCookie(conf.GetAppKey(), \"login\", \"\", -3600)\n\t\terrMsg = err.Error()\n\t\tlogs.Error(err)\n\t\treturn\n\t}\n\n\tuserInfo, err := client.GetUserInfo(context.Background(), code)\n\tif err != nil {\n\t\tc.DelSession(conf.LoginSessionName)\n\t\tc.SetMember(models.Member{})\n\t\tc.SetSecureCookie(conf.GetAppKey(), \"login\", \"\", -3600)\n\t\terrMsg = err.Error()\n\t\tlogs.Error(err)\n\t\treturn\n\t}\n\n\taccount, err := c.getAuth2Account()\n\tif err != nil {\n\t\tlogs.Error(\"获取Auth2用户失败 ->\", err)\n\t\tc.JsonResult(500, \"不支持的第三方用户\", nil)\n\t\treturn\n\t}\n\n\tmember, err := account.ExistedMember(userInfo.UserId)\n\tif err != nil {\n\t\tif err == orm.ErrNoRows {\n\t\t\tif userInfo.Mobile == \"\" {\n\t\t\t\terrMsg = \"请到应用浏览器中登录，并授权获取敏感信息。\"\n\t\t\t} else {\n\t\t\t\tjsonInfo, _ := json.Marshal(userInfo)\n\t\t\t\tuserInfoJson = string(jsonInfo)\n\t\t\t\terrMsg = \"\"\n\t\t\t\tc.SetSession(SessionUserInfoKey, userInfo)\n\t\t\t}\n\t\t} else {\n\t\t\tlogs.Error(\"Error: \", err)\n\t\t\terrMsg = \"登录错误: \" + err.Error()\n\t\t}\n\t\treturn\n\t}\n\n\tbindExisted = \"true\"\n\terrMsg = \"\"\n\n\tmember.LastLoginTime = time.Now()\n\t_ = member.Update(\"last_login_time\")\n\n\tc.SetMember(*member)\n\tremember.MemberId = member.MemberId\n\tremember.Account = member.Account\n\tremember.Time = time.Now()\n\tv, err := utils.Encode(remember)\n\tif err == nil {\n\t\tc.SetSecureCookie(conf.GetAppKey(), \"login\", v, time.Now().Add(time.Hour*24*30*5).Unix())\n\t}\n\tu := c.GetString(\"url\")\n\tif u == \"\" {\n\t\tu = conf.URLFor(\"HomeController.Index\")\n\t}\n\tc.Redirect(u, 302)\n\n}\n\n// Auth2BindAccount 第三方auth2.0绑定已有账号\nfunc (c *AccountController) Auth2BindAccount() {\n\tuserInfo, ok := c.GetSession(SessionUserInfoKey).(auth2.UserInfo)\n\tif !ok || len(userInfo.UserId) <= 0 {\n\t\tc.DelSession(SessionUserInfoKey)\n\t\tc.JsonResult(400, \"请求错误, 请从首页重新登录\")\n\t\treturn\n\t}\n\n\taccount := c.GetString(\"account\")\n\tpassword := c.GetString(\"password\")\n\tif account == \"\" || password == \"\" {\n\t\tc.JsonResult(400, \"账号或密码不能为空\")\n\t\treturn\n\t}\n\n\tmember, err := models.NewMember().Login(account, password)\n\tif err != nil {\n\t\tlogs.Error(\"用户登录 ->\", err)\n\t\tc.JsonResult(500, \"账号或密码错误\", nil)\n\t\treturn\n\t}\n\n\tbindAccount, err := c.getAuth2Account()\n\tif err != nil {\n\t\tlogs.Error(\"获取Auth2用户失败 ->\", err)\n\t\tc.JsonResult(500, \"不支持的第三方用户\", nil)\n\t\treturn\n\t}\n\n\tmember.CreateAt = 0\n\tormer := orm.NewOrm()\n\to, err := ormer.Begin()\n\tif err != nil {\n\t\tlogs.Error(\"开启事务时出错 -> \", err)\n\t\tc.JsonResult(500, \"开启事务时出错: \", err.Error())\n\t\treturn\n\t}\n\tif err := bindAccount.AddBind(ormer, userInfo, member); err != nil {\n\t\tlogs.Error(err)\n\t\to.Rollback()\n\t\tc.JsonResult(500, \"绑定失败，数据库错误: \"+err.Error())\n\t\treturn\n\t}\n\n\t// 绑定成功之后修改用户信息\n\tmember.LastLoginTime = time.Now()\n\t//member.RealName = user_info.Name\n\t//member.Avatar = user_info.Avatar\n\tif len(member.Avatar) < 1 {\n\t\tmember.Avatar = conf.GetDefaultAvatar()\n\t}\n\t//member.Email = user_info.Email\n\t//member.Phone = user_info.Mobile\n\tif _, err := ormer.Update(member, \"last_login_time\", \"real_name\", \"avatar\", \"email\", \"phone\"); err != nil {\n\t\to.Rollback()\n\t\tlogs.Error(\"保存用户信息失败=>\", err)\n\t\tc.JsonResult(500, \"绑定失败，现有账户信息更新失败: \"+err.Error())\n\t\treturn\n\n\t}\n\n\tif err := o.Commit(); err != nil {\n\t\tlogs.Error(\"开启事务时出错 -> \", err)\n\t\tc.JsonResult(500, \"开启事务时出错: \", err.Error())\n\t\treturn\n\t}\n\n\tc.DelSession(SessionUserInfoKey)\n\tc.SetMember(*member)\n\n\tvar remember CookieRemember\n\tremember.MemberId = member.MemberId\n\tremember.Account = member.Account\n\tremember.Time = time.Now()\n\tv, err := utils.Encode(remember)\n\tif err != nil {\n\t\tc.JsonResult(500, \"绑定成功, 但自动登录失败, 请返回首页重新登录\", nil)\n\t\treturn\n\t}\n\n\tc.SetSecureCookie(conf.GetAppKey(), \"login\", v, time.Now().Add(time.Hour*24*30*5).Unix())\n\tc.JsonResult(0, \"绑定成功\", nil)\n}\n\n// Auth2AutoAccount auth2.0自动创建账号\nfunc (c *AccountController) Auth2AutoAccount() {\n\tapp := c.Ctx.Input.Param(\":app\")\n\tlogs.Debug(\"app: \", app)\n\n\tuserInfo, ok := c.GetSession(SessionUserInfoKey).(auth2.UserInfo)\n\tif !ok || len(userInfo.UserId) <= 0 {\n\t\tc.DelSession(SessionUserInfoKey)\n\t\tc.JsonResult(400, \"请求错误, 请从首页重新登录\")\n\t\treturn\n\t}\n\n\tc.DelSession(SessionUserInfoKey)\n\tmember := models.NewMember()\n\n\tif _, err := member.FindByAccount(userInfo.UserId); err == nil && member.MemberId > 0 {\n\t\tc.JsonResult(400, \"账号已存在\")\n\t\treturn\n\t}\n\n\tormer := orm.NewOrm()\n\to, err := ormer.Begin()\n\tif err != nil {\n\t\tlogs.Error(\"开启事务时出错 -> \", err)\n\t\tc.JsonResult(500, \"开启事务时出错: \", err.Error())\n\t\treturn\n\t}\n\n\tmember.Account = userInfo.UserId\n\tmember.RealName = userInfo.Name\n\tmember.Password = \"123456\" // 强制设置默认密码，需修改一次密码后，才可以进行账号密码登录\n\thash, err := utils.PasswordHash(member.Password)\n\n\tif err != nil {\n\t\tlogs.Error(\"加密用户密码失败 =>\", err)\n\t\tc.JsonResult(500, \"加密用户密码失败\"+err.Error())\n\t\treturn\n\t}\n\n\tlogs.Debug(\"member.Password: \", member.Password)\n\tlogs.Debug(\"hash: \", hash)\n\tmember.Password = hash\n\n\tmember.Role = conf.MemberGeneralRole\n\tmember.Avatar = userInfo.Avatar\n\tif len(member.Avatar) < 1 {\n\t\tmember.Avatar = conf.GetDefaultAvatar()\n\t}\n\tmember.CreateAt = 0\n\tmember.Email = userInfo.Mail\n\tmember.Phone = userInfo.Mobile\n\tmember.Status = 0\n\tif _, err = ormer.Insert(member); err != nil {\n\t\to.Rollback()\n\t\tc.JsonResult(500, \"注册失败，数据库错误: \"+err.Error())\n\t\treturn\n\t}\n\n\taccount, err := c.getAuth2Account()\n\tif err != nil {\n\t\tlogs.Error(\"获取Auth2用户失败 ->\", err)\n\t\tc.JsonResult(500, \"不支持的第三方用户\", nil)\n\t\treturn\n\t}\n\n\tmember.CreateAt = 0\n\tif err := account.AddBind(ormer, userInfo, member); err != nil {\n\t\tlogs.Error(err)\n\t\to.Rollback()\n\t\tc.JsonResult(500, \"注册失败，数据库错误: \"+err.Error())\n\t\treturn\n\t}\n\n\tif err := o.Commit(); err != nil {\n\t\tlogs.Error(\"提交事务时出错 -> \", err)\n\t\tc.JsonResult(500, \"提交事务时出错: \", err.Error())\n\t\treturn\n\t}\n\n\tmember.LastLoginTime = time.Now()\n\t_ = member.Update(\"last_login_time\")\n\n\tc.SetMember(*member)\n\n\tvar remember CookieRemember\n\tremember.MemberId = member.MemberId\n\tremember.Account = member.Account\n\tremember.Time = time.Now()\n\tv, err := utils.Encode(remember)\n\tif err != nil {\n\t\tc.JsonResult(500, \"绑定成功, 但自动登录失败, 请返回首页重新登录\", nil)\n\t\treturn\n\t}\n\n\tc.SetSecureCookie(conf.GetAppKey(), \"login\", v, time.Now().Add(time.Hour*24*30*5).Unix())\n\tc.JsonResult(0, \"绑定成功\", nil)\n}\n\n// 钉钉登录\n//func (c *AccountController) DingTalkLogin() {\n//\tcode := c.GetString(\"dingtalk_code\")\n//\tif code == \"\" {\n//\t\tc.JsonResult(500, i18n.Tr(c.Lang, \"message.failed_obtain_user_info\"), nil)\n//\t}\n//\n//\tappKey, _ := web.AppConfig.String(\"dingtalk_app_key\")\n//\tappSecret, _ := web.AppConfig.String(\"dingtalk_app_secret\")\n//\ttmpReader, _ := web.AppConfig.String(\"dingtalk_tmp_reader\")\n//\n//\tif appKey == \"\" || appSecret == \"\" || tmpReader == \"\" {\n//\t\tc.JsonResult(500, i18n.Tr(c.Lang, \"message.dingtalk_auto_login_not_enable\"), nil)\n//\t\tc.StopRun()\n//\t}\n//\n//\tdingtalkAgent := dingtalk.NewDingTalkAgent(appSecret, appKey)\n//\terr := dingtalkAgent.GetAccesstoken()\n//\tif err != nil {\n//\t\tlogs.Warn(\"获取钉钉临时Token失败 ->\", err)\n//\t\tc.JsonResult(500, i18n.Tr(c.Lang, \"message.failed_auto_login\"), nil)\n//\t\tc.StopRun()\n//\t}\n//\n//\tuserid, err := dingtalkAgent.GetUserIDByCode(code)\n//\tif err != nil {\n//\t\tlogs.Warn(\"获取钉钉用户ID失败 ->\", err)\n//\t\tc.JsonResult(500, i18n.Tr(c.Lang, \"message.failed_auto_login\"), nil)\n//\t\tc.StopRun()\n//\t}\n//\n//\tusername, avatar, err := dingtalkAgent.GetUserNameAndAvatarByUserID(userid)\n//\tif err != nil {\n//\t\tlogs.Warn(\"获取钉钉用户信息失败 ->\", err)\n//\t\tc.JsonResult(500, i18n.Tr(c.Lang, \"message.failed_auto_login\"), nil)\n//\t\tc.StopRun()\n//\t}\n//\n//\tmember, err := models.NewMember().TmpLogin(tmpReader)\n//\tif err == nil {\n//\t\tmember.LastLoginTime = time.Now()\n//\t\t_ = member.Update(\"last_login_time\")\n//\t\tmember.Account = username\n//\t\tif avatar != \"\" {\n//\t\t\tmember.Avatar = avatar\n//\t\t}\n//\n//\t\tc.SetMember(*member)\n//\t}\n//\tc.JsonResult(0, \"ok\", username)\n//}\n\n// WorkWeixinLogin 用户企业微信登录\n//func (c *AccountController) WorkWeixinLogin() {\n//\tlogs.Info(\"UserAgent: \", c.Ctx.Input.UserAgent()) // debug\n//\n//\tif member, ok := c.GetSession(conf.LoginSessionName).(models.Member); ok && member.MemberId > 0 {\n//\t\tu := c.GetString(\"url\")\n//\t\tif u == \"\" {\n//\t\t\tu = c.Ctx.Request.Header.Get(\"Referer\")\n//\t\t\tif u == \"\" {\n//\t\t\t\tu = conf.URLFor(\"HomeController.Index\")\n//\t\t\t}\n//\t\t}\n//\t\t// session自动登录时刷新session内容\n//\t\tmember, err := models.NewMember().Find(member.MemberId)\n//\t\tif err != nil {\n//\t\t\tc.DelSession(conf.LoginSessionName)\n//\t\t\tc.SetMember(models.Member{})\n//\t\t\tc.SetSecureCookie(conf.GetAppKey(), \"login\", \"\", -3600)\n//\t\t} else {\n//\t\t\tc.SetMember(*member)\n//\t\t}\n//\t\tc.Redirect(u, 302)\n//\t}\n//\tvar remember CookieRemember\n//\t// 如果 Cookie 中存在登录信息\n//\tif cookie, ok := c.GetSecureCookie(conf.GetAppKey(), \"login\"); ok {\n//\t\tif err := utils.Decode(cookie, &remember); err == nil {\n//\t\t\tif member, err := models.NewMember().Find(remember.MemberId); err == nil {\n//\t\t\t\tc.SetMember(*member)\n//\t\t\t\tc.LoggedIn(false)\n//\t\t\t\tc.StopRun()\n//\t\t\t}\n//\t\t}\n//\t}\n//\n//\tif c.Ctx.Input.IsPost() {\n//\t\t// account := c.GetString(\"account\")\n//\t\t// password := c.GetString(\"password\")\n//\t\t// captcha := c.GetString(\"code\")\n//\t\t// isRemember := c.GetString(\"is_remember\")\n//\t\tc.JsonResult(400, \"request method not allowed\", nil)\n//\t} else {\n//\t\tvar callback_u string\n//\t\tu := c.GetString(\"url\")\n//\t\tif u == \"\" {\n//\t\t\tu = c.referer()\n//\t\t}\n//\t\tif u != \"\" {\n//\t\t\tvar schemaRule = regexp.MustCompile(`^https?\\:\\/\\/`)\n//\t\t\tif !schemaRule.MatchString(u) {\n//\t\t\t\tu = strings.TrimRight(conf.BaseUrl, \"/\") + strings.TrimLeft(u, \"/\")\n//\t\t\t}\n//\t\t}\n//\t\tif u == \"\" {\n//\t\t\tcallback_u = conf.URLFor(\"AccountController.WorkWeixinLoginCallback\")\n//\t\t} else {\n//\t\t\tcallback_u = conf.URLFor(\"AccountController.WorkWeixinLoginCallback\", \"url\", url.PathEscape(u))\n//\t\t}\n//\t\tlogs.Info(\"callback_u: \", callback_u) // debug\n//\n//\t\tstate := \"mindoc\"\n//\t\tworkweixinConf := conf.GetWorkWeixinConfig()\n//\t\tappid := workweixinConf.CorpId\n//\t\tagentid := workweixinConf.AgentId\n//\t\tvar redirect_uri string\n//\n//\t\tisInWorkWeixin := c.IsInWorkWeixin()\n//\t\tc.Data[\"IsInWorkWeixin\"] = isInWorkWeixin\n//\t\tif isInWorkWeixin {\n//\t\t\t// 企业微信内-网页授权登录\n//\t\t\turlFmt := \"%s?appid=%s&agentid=%s&redirect_uri=%s&response_type=code&scope=snsapi_privateinfo&state=%s#wechat_redirect\"\n//\t\t\tredirect_uri = fmt.Sprintf(urlFmt, WorkWeixin_AuthorizeUrlBase, appid, agentid, url.PathEscape(callback_u), state)\n//\t\t} else {\n//\t\t\t// 浏览器内-扫码授权登录\n//\t\t\turlFmt := \"%s?login_type=CorpApp&appid=%s&agentid=%s&redirect_uri=%s&state=%s\"\n//\t\t\tredirect_uri = fmt.Sprintf(urlFmt, WorkWeixin_QRConnectUrlBase, appid, agentid, url.PathEscape(callback_u), state)\n//\t\t}\n//\t\tlogs.Info(\"redirect_uri: \", redirect_uri) // debug\n//\t\tc.Redirect(redirect_uri, 302)\n//\t}\n//}\n\n/*\n思路:\n1. 浏览器打开\n        用户名+密码 登录 与企业微信没有交集\n        手机企业微信登录->扫码页面->扫码后获取用户信息, 判断是否绑定了企业微信\n            已绑定，则读取用户信息，直接登录\n            未绑定，则弹窗提示[未绑定企业微信，请先在企业微信中打开，完成绑定]\n2. 企业微信打开->自动登录->判断是否绑定了企业微信\n        已绑定，则读取用户信息，直接登录\n        未绑定，则弹窗提示\n            是否已有账户(用户名+密码方式)\n                有: 弹窗输入[用户名+密码+验证码]校验\n                无: 直接以企业UserId作为用户名(小写)，创建随机密码\n*/\n\n// WorkWeixinLoginCallback 用户企业微信登录-回调\n//func (c *AccountController) WorkWeixinLoginCallback() {\n//\tc.TplName = \"account/auth2_callback.tpl\"\n//\n//\tif member, ok := c.GetSession(conf.LoginSessionName).(models.Member); ok && member.MemberId > 0 {\n//\t\tu := c.GetString(\"url\")\n//\t\tif u == \"\" {\n//\t\t\tu = c.Ctx.Request.Header.Get(\"Referer\")\n//\t\t}\n//\t\tif u == \"\" {\n//\t\t\tu = conf.URLFor(\"HomeController.Index\")\n//\t\t}\n//\t\tmember, err := models.NewMember().Find(member.MemberId)\n//\t\tif err != nil {\n//\t\t\tc.DelSession(conf.LoginSessionName)\n//\t\t\tc.SetMember(models.Member{})\n//\t\t\tc.SetSecureCookie(conf.GetAppKey(), \"login\", \"\", -3600)\n//\t\t} else {\n//\t\t\tc.SetMember(*member)\n//\t\t}\n//\t\tc.Redirect(u, 302)\n//\t}\n//\n//\tvar remember CookieRemember\n//\t// 如果 Cookie 中存在登录信息\n//\tif cookie, ok := c.GetSecureCookie(conf.GetAppKey(), \"login\"); ok {\n//\t\tif err := utils.Decode(cookie, &remember); err == nil {\n//\t\t\tif member, err := models.NewMember().Find(remember.MemberId); err == nil {\n//\t\t\t\tc.SetMember(*member)\n//\t\t\t\tc.LoggedIn(false)\n//\t\t\t\tc.StopRun()\n//\t\t\t}\n//\t\t}\n//\t}\n//\n//\t// 请求参数获取\n//\treq_code := c.GetString(\"code\")\n//\tlogs.Warning(\"req_code: \", req_code)\n//\treq_state := c.GetString(\"state\")\n//\tlogs.Warning(\"req_state: \", req_state)\n//\tvar user_info_json string\n//\tvar error_msg string\n//\tvar bind_existed string\n//\tif len(req_code) > 0 && req_state == \"mindoc\" {\n//\t\t// 获取当前应用的access_token\n//\t\taccess_token, ok := workweixin.GetAccessToken()\n//\t\tif ok {\n//\t\t\tlogs.Warning(\"access_token: \", access_token)\n//\t\t\t// 获取当前请求的userid\n//\t\t\tuser_id, ticket, ok := workweixin.RequestUserId(access_token, req_code)\n//\t\t\tif ok {\n//\t\t\t\tlogs.Warning(\"user_id: \", user_id)\n//\t\t\t\t// 查询系统现有数据，是否绑定了当前请求用户的企业微信\n//\t\t\t\tmember, err := models.NewWorkWeixinAccount().ExistedMember(user_id)\n//\t\t\t\tif err == nil {\n//\t\t\t\t\tmember.LastLoginTime = time.Now()\n//\t\t\t\t\t_ = member.Update(\"last_login_time\")\n//\n//\t\t\t\t\tc.SetMember(*member)\n//\n//\t\t\t\t\tvar remember CookieRemember\n//\t\t\t\t\tremember.MemberId = member.MemberId\n//\t\t\t\t\tremember.Account = member.Account\n//\t\t\t\t\tremember.Time = time.Now()\n//\t\t\t\t\tv, err := utils.Encode(remember)\n//\t\t\t\t\tif err == nil {\n//\t\t\t\t\t\tc.SetSecureCookie(conf.GetAppKey(), \"login\", v, time.Now().Add(time.Hour*24*30*5).Unix())\n//\t\t\t\t\t}\n//\t\t\t\t\tbind_existed = \"true\"\n//\t\t\t\t\terror_msg = \"\"\n//\t\t\t\t\tu := c.GetString(\"url\")\n//\t\t\t\t\tif u == \"\" {\n//\t\t\t\t\t\tu = conf.URLFor(\"HomeController.Index\")\n//\t\t\t\t\t}\n//\t\t\t\t\tc.Redirect(u, 302)\n//\t\t\t\t} else if err == orm.ErrNoRows {\n//\t\t\t\t\tbind_existed = \"false\"\n//\t\t\t\t\tif ticket == \"\" {\n//\t\t\t\t\t\terror_msg = \"请到企业微信中登录，并授权获取敏感信息。\"\n//\t\t\t\t\t} else {\n//\t\t\t\t\t\tuser_info, err := workweixin.RequestUserPrivateInfo(access_token, user_id, ticket)\n//\t\t\t\t\t\tif err != nil {\n//\t\t\t\t\t\t\terror_msg = \"获取敏感信息错误: \" + err.Error()\n//\t\t\t\t\t\t} else {\n//\t\t\t\t\t\t\tjson_info, _ := json.Marshal(user_info)\n//\t\t\t\t\t\t\tuser_info_json = string(json_info)\n//\t\t\t\t\t\t\terror_msg = \"\"\n//\t\t\t\t\t\t\tc.SetSession(SessionUserInfoKey, user_info)\n//\t\t\t\t\t\t}\n//\t\t\t\t\t}\n//\t\t\t\t} else {\n//\t\t\t\t\tlogs.Error(\"Error: \", err)\n//\t\t\t\t\terror_msg = \"登录错误: \" + err.Error()\n//\t\t\t\t}\n//\t\t\t} else {\n//\t\t\t\terror_msg = \"获取用户Id失败: \" + user_id\n//\t\t\t}\n//\t\t} else {\n//\t\t\terror_msg = \"应用凭据获取失败: \" + access_token\n//\t\t}\n//\t} else {\n//\t\terror_msg = \"参数错误\"\n//\t}\n//\tif user_info_json == \"\" {\n//\t\tuser_info_json = \"{}\"\n//\t}\n//\tif bind_existed == \"\" {\n//\t\tbind_existed = \"null\"\n//\t}\n//\t// refer & doc:\n//\t// - https://golang.org/pkg/html/template/#HTML\n//\t// - https://stackoverflow.com/questions/24411880/go-html-templates-can-i-stop-the-templates-package-inserting-quotes-around-stri\n//\t// - https://stackoverflow.com/questions/38035176/insert-javascript-snippet-inside-template-with-beego-golang\n//\tc.Data[\"bind_existed\"] = template.JS(bind_existed)\n//\tlogs.Debug(\"bind_existed: \", bind_existed)\n//\tc.Data[\"error_msg\"] = template.JS(error_msg)\n//\tc.Data[\"user_info_json\"] = template.JS(user_info_json)\n//\t/*\n//\t\t// 调试: 显示源码\n//\t\tresult, err := c.RenderString()\n//\t\tif err != nil {\n//\t\t\tlogs.Error(err)\n//\t\t} else {\n//\t\t\tlogs.Warning(result)\n//\t\t}\n//\t*/\n//}\n\n// WorkWeixinLoginBind 用户企业微信登录-绑定\n//func (c *AccountController) WorkWeixinLoginBind() {\n//\tif user_info, ok := c.GetSession(SessionUserInfoKey).(workweixin.WorkWeixinUserPrivateInfo); ok && len(user_info.UserId) > 0 {\n//\t\treq_account := c.GetString(\"account\")\n//\t\treq_password := c.GetString(\"password\")\n//\t\tif req_account == \"\" || req_password == \"\" {\n//\t\t\tc.JsonResult(400, \"账号或密码不能为空\")\n//\t\t} else {\n//\t\t\tmember, err := models.NewMember().Login(req_account, req_password)\n//\t\t\tif err == nil {\n//\t\t\t\taccount := models.NewWorkWeixinAccount()\n//\t\t\t\taccount.MemberId = member.MemberId\n//\t\t\t\taccount.WorkWeixin_UserId = user_info.UserId\n//\t\t\t\tmember.CreateAt = 0\n//\t\t\t\tormer := orm.NewOrm()\n//\t\t\t\to, err := ormer.Begin()\n//\t\t\t\tif err != nil {\n//\t\t\t\t\tlogs.Error(\"开启事务时出错 -> \", err)\n//\t\t\t\t\tc.JsonResult(500, \"开启事务时出错: \", err.Error())\n//\t\t\t\t}\n//\t\t\t\tif err := account.AddBind(ormer); err != nil {\n//\t\t\t\t\to.Rollback()\n//\t\t\t\t\tc.JsonResult(500, \"绑定失败，数据库错误: \"+err.Error())\n//\t\t\t\t} else {\n//\t\t\t\t\t// 绑定成功之后修改用户信息\n//\t\t\t\t\tmember.LastLoginTime = time.Now()\n//\t\t\t\t\t//member.RealName = user_info.Name\n//\t\t\t\t\t//member.Avatar = user_info.Avatar\n//\t\t\t\t\tif len(member.Avatar) < 1 {\n//\t\t\t\t\t\tmember.Avatar = conf.GetDefaultAvatar()\n//\t\t\t\t\t}\n//\t\t\t\t\t//member.Email = user_info.Email\n//\t\t\t\t\t//member.Phone = user_info.Mobile\n//\t\t\t\t\tif _, err := ormer.Update(member, \"last_login_time\", \"real_name\", \"avatar\", \"email\", \"phone\"); err != nil {\n//\t\t\t\t\t\to.Rollback()\n//\t\t\t\t\t\tlogs.Error(\"保存用户信息失败=>\", err)\n//\t\t\t\t\t\tc.JsonResult(500, \"绑定失败，现有账户信息更新失败: \"+err.Error())\n//\t\t\t\t\t} else {\n//\t\t\t\t\t\tif err := o.Commit(); err != nil {\n//\t\t\t\t\t\t\tlogs.Error(\"开启事务时出错 -> \", err)\n//\t\t\t\t\t\t\tc.JsonResult(500, \"开启事务时出错: \", err.Error())\n//\t\t\t\t\t\t} else {\n//\t\t\t\t\t\t\tc.DelSession(SessionUserInfoKey)\n//\t\t\t\t\t\t\tc.SetMember(*member)\n//\n//\t\t\t\t\t\t\tvar remember CookieRemember\n//\t\t\t\t\t\t\tremember.MemberId = member.MemberId\n//\t\t\t\t\t\t\tremember.Account = member.Account\n//\t\t\t\t\t\t\tremember.Time = time.Now()\n//\t\t\t\t\t\t\tv, err := utils.Encode(remember)\n//\t\t\t\t\t\t\tif err == nil {\n//\t\t\t\t\t\t\t\tc.SetSecureCookie(conf.GetAppKey(), \"login\", v, time.Now().Add(time.Hour*24*30*5).Unix())\n//\t\t\t\t\t\t\t\tc.JsonResult(0, \"绑定成功\", nil)\n//\t\t\t\t\t\t\t} else {\n//\t\t\t\t\t\t\t\tc.JsonResult(500, \"绑定成功, 但自动登录失败, 请返回首页重新登录\", nil)\n//\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t}\n//\t\t\t\t\t}\n//\n//\t\t\t\t}\n//\n//\t\t\t} else {\n//\t\t\t\tlogs.Error(\"用户登录 ->\", err)\n//\t\t\t\tc.JsonResult(500, \"账号或密码错误\", nil)\n//\t\t\t}\n//\t\t\tc.JsonResult(500, \"TODO: 绑定以后账号功能开发中\")\n//\t\t}\n//\t} else {\n//\t\tif ok {\n//\t\t\tc.DelSession(SessionUserInfoKey)\n//\t\t}\n//\t\tc.JsonResult(400, \"请求错误, 请从首页重新登录\")\n//\t}\n//\n//}\n\n// WorkWeixinLoginIgnore 用户企业微信登录-忽略\n//func (c *AccountController) WorkWeixinLoginIgnore() {\n//\tif user_info, ok := c.GetSession(SessionUserInfoKey).(workweixin.WorkWeixinUserPrivateInfo); ok && len(user_info.UserId) > 0 {\n//\t\tc.DelSession(SessionUserInfoKey)\n//\t\tmember := models.NewMember()\n//\n//\t\tif _, err := member.FindByAccount(user_info.UserId); err == nil && member.MemberId > 0 {\n//\t\t\tc.JsonResult(400, \"账号已存在\")\n//\t\t}\n//\n//\t\tormer := orm.NewOrm()\n//\t\to, err := ormer.Begin()\n//\t\tif err != nil {\n//\t\t\tlogs.Error(\"开启事务时出错 -> \", err)\n//\t\t\tc.JsonResult(500, \"开启事务时出错: \", err.Error())\n//\t\t}\n//\n//\t\tmember.Account = user_info.UserId\n//\t\tmember.RealName = user_info.Name\n//\t\tvar rnd = rand.New(src)\n//\t\t// fmt.Sprintf(\"%x\", rnd.Uint64())\n//\t\t// strconv.FormatUint(rnd.Uint64(), 16)\n//\t\tmember.Password = user_info.UserId + strconv.FormatUint(rnd.Uint64(), 16)\n//\t\tmember.Password = \"123456\" // 强制设置默认密码，需修改一次密码后，才可以进行账号密码登录\n//\t\thash, err := utils.PasswordHash(member.Password)\n//\t\tif err != nil {\n//\t\t\tlogs.Error(\"加密用户密码失败 =>\", err)\n//\t\t\tc.JsonResult(500, \"加密用户密码失败\"+err.Error())\n//\t\t} else {\n//\t\t\tlogs.Error(\"member.Password: \", member.Password)\n//\t\t\tlogs.Error(\"hash: \", hash)\n//\t\t\tmember.Password = hash\n//\t\t}\n//\t\tmember.Role = conf.MemberGeneralRole\n//\t\tmember.Avatar = user_info.Avatar\n//\t\tif len(member.Avatar) < 1 {\n//\t\t\tmember.Avatar = conf.GetDefaultAvatar()\n//\t\t}\n//\t\tmember.CreateAt = 0\n//\t\tmember.Email = user_info.BizMail\n//\t\tmember.Phone = user_info.Mobile\n//\t\tmember.Status = 0\n//\t\tif _, err = ormer.Insert(member); err != nil {\n//\t\t\to.Rollback()\n//\t\t\tc.JsonResult(500, \"注册失败，数据库错误: \"+err.Error())\n//\t\t} else {\n//\t\t\taccount := models.NewWorkWeixinAccount()\n//\t\t\taccount.MemberId = member.MemberId\n//\t\t\taccount.WorkWeixin_UserId = user_info.UserId\n//\t\t\tmember.CreateAt = 0\n//\t\t\tif err := account.AddBind(ormer); err != nil {\n//\t\t\t\to.Rollback()\n//\t\t\t\tc.JsonResult(500, \"注册失败，数据库错误: \"+err.Error())\n//\t\t\t} else {\n//\t\t\t\tif err := o.Commit(); err != nil {\n//\t\t\t\t\tlogs.Error(\"提交事务时出错 -> \", err)\n//\t\t\t\t\tc.JsonResult(500, \"提交事务时出错: \", err.Error())\n//\t\t\t\t} else {\n//\t\t\t\t\tmember.LastLoginTime = time.Now()\n//\t\t\t\t\t_ = member.Update(\"last_login_time\")\n//\n//\t\t\t\t\tc.SetMember(*member)\n//\n//\t\t\t\t\tvar remember CookieRemember\n//\t\t\t\t\tremember.MemberId = member.MemberId\n//\t\t\t\t\tremember.Account = member.Account\n//\t\t\t\t\tremember.Time = time.Now()\n//\t\t\t\t\tv, err := utils.Encode(remember)\n//\t\t\t\t\tif err == nil {\n//\t\t\t\t\t\tc.SetSecureCookie(conf.GetAppKey(), \"login\", v, time.Now().Add(time.Hour*24*30*5).Unix())\n//\t\t\t\t\t\tc.JsonResult(0, \"绑定成功\", nil)\n//\t\t\t\t\t} else {\n//\t\t\t\t\t\tc.JsonResult(500, \"绑定成功, 但自动登录失败, 请返回首页重新登录\", nil)\n//\t\t\t\t\t}\n//\t\t\t\t}\n//\t\t\t}\n//\t\t}\n//\t} else {\n//\t\tif ok {\n//\t\t\tc.DelSession(SessionUserInfoKey)\n//\t\t}\n//\t\tc.JsonResult(400, \"请求错误, 请从首页重新登录\")\n//\t}\n//}\n\n// QR二维码登录\n//func (c *AccountController) QRLogin() {\n//\tappName := c.Ctx.Input.Param(\":app\")\n//\n//\tswitch appName {\n//\t// 钉钉扫码登录\n//\tcase \"dingtalk\":\n//\t\tcode := c.GetString(\"code\")\n//\t\tstate := c.GetString(\"state\")\n//\t\tif state != \"1\" || code == \"\" {\n//\t\t\tc.Redirect(conf.URLFor(\"AccountController.Login\"), 302)\n//\t\t\tc.StopRun()\n//\t\t}\n//\t\tappKey, _ := web.AppConfig.String(\"dingtalk_qr_key\")\n//\t\tappSecret, _ := web.AppConfig.String(\"dingtalk_qr_secret\")\n//\n//\t\tqrDingtalk := dingtalk.NewDingtalkQRLogin(appSecret, appKey)\n//\t\tunionID, err := qrDingtalk.GetUnionIDByCode(code)\n//\t\tif err != nil {\n//\t\t\tlogs.Warn(\"获取钉钉临时UnionID失败 ->\", err)\n//\t\t\tc.Redirect(conf.URLFor(\"AccountController.Login\"), 302)\n//\t\t\tc.StopRun()\n//\t\t}\n//\n//\t\tappKey, _ = web.AppConfig.String(\"dingtalk_app_key\")\n//\t\tappSecret, _ = web.AppConfig.String(\"dingtalk_app_secret\")\n//\t\ttmpReader, _ := web.AppConfig.String(\"dingtalk_tmp_reader\")\n//\n//\t\tdingtalkAgent := dingtalk.NewDingTalkAgent(appSecret, appKey)\n//\t\terr = dingtalkAgent.GetAccesstoken()\n//\t\tif err != nil {\n//\t\t\tlogs.Warn(\"获取钉钉临时Token失败 ->\", err)\n//\t\t\tc.Redirect(conf.URLFor(\"AccountController.Login\"), 302)\n//\t\t\tc.StopRun()\n//\t\t}\n//\n//\t\tuserid, err := dingtalkAgent.GetUserIDByUnionID(unionID)\n//\t\tif err != nil {\n//\t\t\tlogs.Warn(\"获取钉钉用户ID失败 ->\", err)\n//\t\t\tc.Redirect(conf.URLFor(\"AccountController.Login\"), 302)\n//\t\t\tc.StopRun()\n//\t\t}\n//\n//\t\tusername, avatar, err := dingtalkAgent.GetUserNameAndAvatarByUserID(userid)\n//\t\tif err != nil {\n//\t\t\tlogs.Warn(\"获取钉钉用户信息失败 ->\", err)\n//\t\t\tc.Redirect(conf.URLFor(\"AccountController.Login\"), 302)\n//\t\t\tc.StopRun()\n//\t\t}\n//\n//\t\tmember, err := models.NewMember().TmpLogin(tmpReader)\n//\t\tif err == nil {\n//\t\t\tmember.LastLoginTime = time.Now()\n//\t\t\t_ = member.Update(\"last_login_time\")\n//\t\t\tmember.Account = username\n//\t\t\tif avatar != \"\" {\n//\t\t\t\tmember.Avatar = avatar\n//\t\t\t}\n//\n//\t\t\tc.SetMember(*member)\n//\t\t\tc.LoggedIn(false)\n//\t\t\tc.StopRun()\n//\t\t}\n//\t\tc.Redirect(conf.URLFor(\"AccountController.Login\"), 302)\n//\n//\t// 企业微信扫码登录\n//\tcase \"workweixin\":\n//\t\t//\n//\n//\tdefault:\n//\t\tc.Redirect(conf.URLFor(\"AccountController.Login\"), 302)\n//\t\tc.StopRun()\n//\t}\n//}\n\n// 登录成功后的操作，如重定向到原始请求页面\nfunc (c *AccountController) LoggedIn(isPost bool) interface{} {\n\n\tturl := c.referer()\n\n\tif !isPost {\n\t\tc.Redirect(turl, 302)\n\t\treturn nil\n\t} else {\n\t\tvar data struct {\n\t\t\tTURL string `json:\"url\"`\n\t\t}\n\t\tdata.TURL = turl\n\t\treturn data\n\t}\n}\n\n// 用户注册\nfunc (c *AccountController) Register() {\n\tc.TplName = \"account/register.tpl\"\n\n\t//如果用户登录了，则跳转到网站首页\n\tif member, ok := c.GetSession(conf.LoginSessionName).(models.Member); ok && member.MemberId > 0 {\n\t\tc.Redirect(conf.URLFor(\"HomeController.Index\"), 302)\n\t}\n\t// 如果没有开启用户注册\n\tif v, ok := c.Option[\"ENABLED_REGISTER\"]; ok && !strings.EqualFold(v, \"true\") {\n\t\tc.Abort(\"404\")\n\t}\n\n\tif c.Ctx.Input.IsPost() {\n\t\taccount := c.GetString(\"account\")\n\t\tpassword1 := c.GetString(\"password1\")\n\t\tpassword2 := c.GetString(\"password2\")\n\t\temail := c.GetString(\"email\")\n\t\tcaptcha := c.GetString(\"code\")\n\n\t\tif ok, err := regexp.MatchString(conf.RegexpAccount, account); account == \"\" || !ok || err != nil {\n\t\t\tc.JsonResult(6001, i18n.Tr(c.Lang, \"message.username_invalid_format\"))\n\t\t}\n\t\tif l := strings.Count(password1, \"\"); password1 == \"\" || l > 50 || l < 6 {\n\t\t\tc.JsonResult(6002, i18n.Tr(c.Lang, \"message.password_length_invalid\"))\n\t\t}\n\t\tif password1 != password2 {\n\t\t\tc.JsonResult(6003, i18n.Tr(c.Lang, \"message.incorrect_confirm_password\"))\n\t\t}\n\t\tif ok, err := regexp.MatchString(conf.RegexpEmail, email); !ok || err != nil || email == \"\" {\n\t\t\tc.JsonResult(6004, i18n.Tr(c.Lang, \"message.email_invalid_format\"))\n\t\t}\n\t\t// 如果开启了验证码\n\t\tif v, ok := c.Option[\"ENABLED_CAPTCHA\"]; ok && strings.EqualFold(v, \"true\") {\n\t\t\tv, ok := c.GetSession(conf.CaptchaSessionName).(string)\n\t\t\tif !ok || !strings.EqualFold(v, captcha) {\n\t\t\t\tc.JsonResult(6001, i18n.Tr(c.Lang, \"message.captcha_wrong\"))\n\t\t\t}\n\t\t}\n\n\t\tmember := models.NewMember()\n\n\t\tif _, err := member.FindByAccount(account); err == nil && member.MemberId > 0 {\n\t\t\tc.JsonResult(6005, i18n.Tr(c.Lang, \"message.account_existed\"))\n\t\t}\n\n\t\tmember.Account = account\n\t\tmember.Password = password1\n\t\tmember.Role = conf.MemberGeneralRole\n\t\tmember.Avatar = conf.GetDefaultAvatar()\n\t\tmember.CreateAt = 0\n\t\tmember.Email = email\n\t\tmember.Status = 0\n\t\tif err := member.Add(); err != nil {\n\t\t\tc.JsonResult(6006, i18n.Tr(c.Lang, \"message.failed_register\"))\n\t\t}\n\n\t\tc.JsonResult(0, \"ok\", member)\n\t}\n}\n\n// 找回密码\nfunc (c *AccountController) FindPassword() {\n\tc.TplName = \"account/find_password_setp1.tpl\"\n\tmailConf := conf.GetMailConfig()\n\n\tif c.Ctx.Input.IsPost() {\n\n\t\temail := c.GetString(\"email\")\n\t\tcaptcha := c.GetString(\"code\")\n\n\t\tif email == \"\" {\n\t\t\tc.JsonResult(6005, i18n.Tr(c.Lang, \"message.email_empty\"))\n\t\t}\n\t\tif !mailConf.EnableMail {\n\t\t\tc.JsonResult(6004, i18n.Tr(c.Lang, \"message.mail_service_not_enable\"))\n\t\t}\n\n\t\t// 如果开启了验证码\n\t\tif v, ok := c.Option[\"ENABLED_CAPTCHA\"]; ok && strings.EqualFold(v, \"true\") {\n\t\t\tv, ok := c.GetSession(conf.CaptchaSessionName).(string)\n\t\t\tif !ok || !strings.EqualFold(v, captcha) {\n\t\t\t\tc.JsonResult(6001, i18n.Tr(c.Lang, \"message.captcha_wrong\"))\n\t\t\t}\n\t\t}\n\n\t\tmember, err := models.NewMember().FindByFieldFirst(\"email\", email)\n\t\tif err != nil {\n\t\t\tc.JsonResult(6006, i18n.Tr(c.Lang, \"message.email_not_exist\"))\n\t\t}\n\t\tif member == nil || member.Status != 0 {\n\t\t\tc.JsonResult(6007, i18n.Tr(c.Lang, \"message.account_disable\"))\n\t\t}\n\t\tif member == nil || member.AuthMethod == conf.AuthMethodLDAP {\n\t\t\tc.JsonResult(6011, i18n.Tr(c.Lang, \"message.account_not_support_retrieval\"))\n\t\t}\n\n\t\tcount, err := models.NewMemberToken().FindSendCount(email, time.Now().Add(-1*time.Hour), time.Now())\n\n\t\tif err != nil {\n\t\t\tlogs.Error(err)\n\t\t\tc.JsonResult(6008, i18n.Tr(c.Lang, \"message.failed_send_mail\"))\n\t\t}\n\t\tif count > mailConf.MailNumber {\n\t\t\tc.JsonResult(6008, i18n.Tr(c.Lang, \"message.sent_too_many_times\"))\n\t\t}\n\n\t\tmemberToken := models.NewMemberToken()\n\n\t\tmemberToken.Token = string(utils.Krand(32, utils.KC_RAND_KIND_ALL))\n\t\tmemberToken.Email = email\n\t\tmemberToken.MemberId = member.MemberId\n\t\tmemberToken.IsValid = false\n\t\tif _, err := memberToken.InsertOrUpdate(); err != nil {\n\t\t\tc.JsonResult(6009, i18n.Tr(c.Lang, \"message.failed_send_mail\"))\n\t\t}\n\n\t\tdata := map[string]interface{}{\n\t\t\t\"SITE_NAME\": c.Option[\"SITE_NAME\"],\n\t\t\t\"url\":       conf.URLFor(\"AccountController.FindPassword\", \"token\", memberToken.Token, \"mail\", email),\n\t\t\t\"BaseUrl\":   c.BaseUrl(),\n\t\t}\n\n\t\tbody, err := c.ExecuteViewPathTemplate(\"account/mail_template.tpl\", data)\n\t\tif err != nil {\n\t\t\tlogs.Error(err)\n\t\t\tc.JsonResult(6003, i18n.Tr(c.Lang, \"message.failed_send_mail\"))\n\t\t}\n\n\t\tgo func(mailConf *conf.SmtpConf, email string, body string) {\n\n\t\t\tmailConfig := &mail.SMTPConfig{\n\t\t\t\tUsername: mailConf.SmtpUserName,\n\t\t\t\tPassword: mailConf.SmtpPassword,\n\t\t\t\tHost:     mailConf.SmtpHost,\n\t\t\t\tPort:     mailConf.SmtpPort,\n\t\t\t\tSecure:   mailConf.Secure,\n\t\t\t\tIdentity: \"\",\n\t\t\t}\n\t\t\tlogs.Info(mailConfig)\n\n\t\t\tc := mail.NewSMTPClient(mailConfig)\n\t\t\tm := mail.NewMail()\n\n\t\t\tm.AddFrom(mailConf.FormUserName)\n\t\t\tm.AddFromName(mailConf.FormUserName)\n\t\t\tm.AddSubject(\"找回密码\")\n\t\t\tm.AddHTML(body)\n\t\t\tm.AddTo(email)\n\n\t\t\tif e := c.Send(m); e != nil {\n\t\t\t\tlogs.Error(\"发送邮件失败：\" + e.Error())\n\t\t\t} else {\n\t\t\t\tlogs.Info(\"邮件发送成功：\" + email)\n\t\t\t}\n\t\t\t//auth := smtp.PlainAuth(\n\t\t\t//\t\"\",\n\t\t\t//\tmail_conf.SmtpUserName,\n\t\t\t//\tmail_conf.SmtpPassword,\n\t\t\t//\tmail_conf.SmtpHost,\n\t\t\t//)\n\t\t\t//\n\t\t\t//mime := \"MIME-version: 1.0;\\nContent-Type: text/html; charset=\\\"UTF-8\\\";\\n\\n\"\n\t\t\t//subject := \"Subject: 找回密码!\\n\"\n\t\t\t//\n\t\t\t//err = smtp.SendMail(\n\t\t\t//\tmail_conf.SmtpHost+\":\"+strconv.Itoa(mail_conf.SmtpPort),\n\t\t\t//\tauth,\n\t\t\t//\tmail_conf.FormUserName,\n\t\t\t//\t[]string{email},\n\t\t\t//\t[]byte(subject+mime+\"\\n\"+body),\n\t\t\t//)\n\t\t\t//if err != nil {\n\t\t\t//\tlogs.Error(\"邮件发送失败 => \", email, err)\n\t\t\t//}\n\t\t}(mailConf, email, body)\n\n\t\tc.JsonResult(0, \"ok\", conf.URLFor(\"AccountController.Login\"))\n\t}\n\n\ttoken := c.GetString(\"token\")\n\temail := c.GetString(\"mail\")\n\n\tif token != \"\" && email != \"\" {\n\t\tmemberToken, err := models.NewMemberToken().FindByFieldFirst(\"token\", token)\n\t\tif err != nil {\n\t\t\tlogs.Error(err)\n\t\t\tc.Data[\"ErrorMessage\"] = i18n.Tr(c.Lang, \"message.mail_expired\")\n\t\t\tc.TplName = \"errors/error.tpl\"\n\t\t\treturn\n\t\t}\n\t\tsubTime := time.Until(memberToken.SendTime)\n\n\t\tif !strings.EqualFold(memberToken.Email, email) || subTime.Minutes() > float64(mailConf.MailExpired) || !memberToken.ValidTime.IsZero() {\n\t\t\tc.Data[\"ErrorMessage\"] = i18n.Tr(c.Lang, \"message.captcha_expired\")\n\t\t\tc.TplName = \"errors/error.tpl\"\n\t\t\treturn\n\t\t}\n\t\tc.Data[\"Email\"] = memberToken.Email\n\t\tc.Data[\"Token\"] = memberToken.Token\n\t\tc.TplName = \"account/find_password_setp2.tpl\"\n\n\t}\n}\n\n// 校验邮件并修改密码\nfunc (c *AccountController) ValidEmail() {\n\tpassword1 := c.GetString(\"password1\")\n\tpassword2 := c.GetString(\"password2\")\n\tcaptcha := c.GetString(\"code\")\n\ttoken := c.GetString(\"token\")\n\temail := c.GetString(\"mail\")\n\n\tif password1 == \"\" {\n\t\tc.JsonResult(6001, i18n.Tr(c.Lang, \"message.password_empty\"))\n\t}\n\tif l := strings.Count(password1, \"\"); l < 6 || l > 50 {\n\t\tc.JsonResult(6001, i18n.Tr(c.Lang, \"message.password_length_invalid\"))\n\t}\n\tif password2 == \"\" {\n\t\tc.JsonResult(6002, i18n.Tr(c.Lang, \"message.confirm_password_empty\"))\n\t}\n\tif password1 != password2 {\n\t\tc.JsonResult(6003, i18n.Tr(c.Lang, \"message.incorrect_confirm_password\"))\n\t}\n\tif captcha == \"\" {\n\t\tc.JsonResult(6004, i18n.Tr(c.Lang, \"message.captcha_empty\"))\n\t}\n\tv, ok := c.GetSession(conf.CaptchaSessionName).(string)\n\tif !ok || !strings.EqualFold(v, captcha) {\n\t\tc.JsonResult(6001, i18n.Tr(c.Lang, \"message.captcha_wrong\"))\n\t}\n\n\tmailConf := conf.GetMailConfig()\n\tmemberToken, err := models.NewMemberToken().FindByFieldFirst(\"token\", token)\n\tif err != nil {\n\t\tlogs.Error(err)\n\t\tc.JsonResult(6007, i18n.Tr(c.Lang, \"message.mail_expired\"))\n\t}\n\tsubTime := time.Until(memberToken.SendTime)\n\n\tif !strings.EqualFold(memberToken.Email, email) || subTime.Minutes() > float64(mailConf.MailExpired) || !memberToken.ValidTime.IsZero() {\n\n\t\tc.JsonResult(6008, i18n.Tr(c.Lang, \"message.captcha_expired\"))\n\t}\n\tmember, err := models.NewMember().Find(memberToken.MemberId)\n\tif err != nil {\n\t\tlogs.Error(err)\n\t\tc.JsonResult(6005, i18n.Tr(c.Lang, \"message.user_not_existed\"))\n\t}\n\thash, err := utils.PasswordHash(password1)\n\tif err != nil {\n\t\tlogs.Error(err)\n\t\tc.JsonResult(6006, i18n.Tr(c.Lang, \"message.failed_save_password\"))\n\t}\n\n\tmember.Password = hash\n\n\terr = member.Update(\"password\")\n\tmemberToken.ValidTime = time.Now()\n\tmemberToken.IsValid = true\n\tmemberToken.InsertOrUpdate()\n\n\tif err != nil {\n\t\tlogs.Error(err)\n\t\tc.JsonResult(6006, i18n.Tr(c.Lang, \"message.failed_save_password\"))\n\t}\n\tc.JsonResult(0, \"ok\", conf.URLFor(\"AccountController.Login\"))\n}\n\n// Logout 退出登录\nfunc (c *AccountController) Logout() {\n\tc.SetMember(models.Member{})\n\tc.SetSecureCookie(conf.GetAppKey(), \"login\", \"\", -3600)\n\tu := c.Ctx.Request.Header.Get(\"Referer\")\n\tc.Redirect(conf.URLFor(\"AccountController.Login\", \"url\", u), 302)\n}\n\n// 验证码\nfunc (c *AccountController) Captcha() {\n\tcaptchaImage := gocaptcha.NewCaptchaImage(140, 40, gocaptcha.RandLightColor())\n\n\tcaptchaImage.DrawNoise(gocaptcha.CaptchaComplexLower)\n\n\t// captchaImage.DrawTextNoise(gocaptcha.CaptchaComplexHigh)\n\ttxt := gocaptcha.RandText(4)\n\n\tc.SetSession(conf.CaptchaSessionName, txt)\n\n\tcaptchaImage.DrawText(txt)\n\t// captchaImage.Drawline(3);\n\tcaptchaImage.DrawBorder(gocaptcha.ColorToRGB(0x17A7A7A))\n\t// captchaImage.DrawHollowLine()\n\n\tcaptchaImage.SaveImage(c.Ctx.ResponseWriter, gocaptcha.ImageFormatJpeg)\n\tc.StopRun()\n}\n"
  },
  {
    "path": "controllers/BaseController.go",
    "content": "package controllers\n\nimport (\n\t\"bytes\"\n\t\"encoding/json\"\n\t\"io\"\n\t\"strings\"\n\t\"time\"\n\n\t\"html/template\"\n\t\"io/ioutil\"\n\t\"path/filepath\"\n\n\t\"github.com/beego/beego/v2/core/logs\"\n\t\"github.com/beego/beego/v2/server/web\"\n\t\"github.com/beego/i18n\"\n\t\"github.com/mindoc-org/mindoc/conf\"\n\t\"github.com/mindoc-org/mindoc/models\"\n\t\"github.com/mindoc-org/mindoc/utils\"\n)\n\ntype BaseController struct {\n\tweb.Controller\n\tMember                *models.Member\n\tOption                map[string]string\n\tEnableAnonymous       bool\n\tEnableDocumentHistory bool\n\tLang                  string\n}\n\ntype CookieRemember struct {\n\tMemberId int\n\tAccount  string\n\tTime     time.Time\n}\n\n// Prepare 预处理.\nfunc (c *BaseController) Prepare() {\n\tc.Data[\"SiteName\"] = \"MinDoc\"\n\tc.Data[\"Member\"] = models.NewMember()\n\tcontroller, action := c.GetControllerAndAction()\n\n\tc.Data[\"ActionName\"] = action\n\tc.Data[\"ControllerName\"] = controller\n\n\tc.EnableAnonymous = false\n\tc.EnableDocumentHistory = false\n\n\tif member, ok := c.GetSession(conf.LoginSessionName).(models.Member); ok && member.MemberId > 0 {\n\t\tc.Member = &member\n\t\tc.Data[\"Member\"] = c.Member\n\t} else {\n\t\tvar remember CookieRemember\n\t\t// //如果Cookie中存在登录信息，从cookie中获取用户信息\n\t\tif cookie, ok := c.GetSecureCookie(conf.GetAppKey(), \"login\"); ok {\n\t\t\tif err := utils.Decode(cookie, &remember); err == nil {\n\t\t\t\tif member, err := models.NewMember().Find(remember.MemberId); err == nil {\n\t\t\t\t\tc.Member = member\n\t\t\t\t\tc.Data[\"Member\"] = member\n\t\t\t\t\tc.SetMember(*member)\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\tconf.BaseUrl = c.BaseUrl()\n\tc.Data[\"BaseUrl\"] = c.BaseUrl()\n\n\tif options, err := models.NewOption().All(); err == nil {\n\t\tc.Option = make(map[string]string, len(options))\n\t\tfor _, item := range options {\n\t\t\tc.Data[item.OptionName] = item.OptionValue\n\t\t\tc.Option[item.OptionName] = item.OptionValue\n\t\t}\n\t\tc.EnableAnonymous = strings.EqualFold(c.Option[\"ENABLE_ANONYMOUS\"], \"true\")\n\t\tc.EnableDocumentHistory = strings.EqualFold(c.Option[\"ENABLE_DOCUMENT_HISTORY\"], \"true\")\n\t}\n\tc.Data[\"HighlightStyle\"] = web.AppConfig.DefaultString(\"highlight_style\", \"github\")\n\n\tif b, err := ioutil.ReadFile(filepath.Join(web.BConfig.WebConfig.ViewsPath, \"widgets\", \"scripts.tpl\")); err == nil {\n\t\tc.Data[\"Scripts\"] = template.HTML(string(b))\n\t}\n\n\tc.SetLang()\n}\n\n// 判断用户是否登录.\nfunc (c *BaseController) isUserLoggedIn() bool {\n\treturn c.Member != nil && c.Member.MemberId > 0\n}\n\n// SetMember 获取或设置当前登录用户信息,如果 MemberId 小于 0 则标识删除 Session\nfunc (c *BaseController) SetMember(member models.Member) {\n\n\tif member.MemberId <= 0 {\n\t\tc.DelSession(conf.LoginSessionName)\n\t\tc.DelSession(\"uid\")\n\t\tc.DestroySession()\n\t} else {\n\t\tc.SetSession(conf.LoginSessionName, member)\n\t\tc.SetSession(\"uid\", member.MemberId)\n\t}\n}\n\n// JsonResult 响应 json 结果\nfunc (c *BaseController) JsonResult(errCode int, errMsg string, data ...interface{}) {\n\tjsonData := make(map[string]interface{}, 3)\n\n\tjsonData[\"errcode\"] = errCode\n\tjsonData[\"message\"] = errMsg\n\n\tif len(data) > 0 && data[0] != nil {\n\t\tjsonData[\"data\"] = data[0]\n\t}\n\n\treturnJSON, err := json.Marshal(jsonData)\n\tif err != nil {\n\t\tlogs.Error(err)\n\t}\n\n\tc.Ctx.ResponseWriter.Header().Set(\"Content-Type\", \"application/json; charset=utf-8\")\n\tc.Ctx.ResponseWriter.Header().Set(\"Cache-Control\", \"no-cache, no-store\")\n\t_, err = io.WriteString(c.Ctx.ResponseWriter, string(returnJSON))\n\tif err != nil {\n\t\tlogs.Error(err)\n\t}\n\n\tc.StopRun()\n}\n\n// 如果错误不为空，则响应错误信息到浏览器.\nfunc (c *BaseController) CheckJsonError(code int, err error) {\n\n\tif err == nil {\n\t\treturn\n\t}\n\tjsonData := make(map[string]interface{}, 3)\n\n\tjsonData[\"errcode\"] = code\n\tjsonData[\"message\"] = err.Error()\n\n\treturnJSON, err := json.Marshal(jsonData)\n\tif err != nil {\n\t\tlogs.Error(err)\n\t}\n\n\tc.Ctx.ResponseWriter.Header().Set(\"Content-Type\", \"application/json; charset=utf-8\")\n\tc.Ctx.ResponseWriter.Header().Set(\"Cache-Control\", \"no-cache, no-store\")\n\t_, err = io.WriteString(c.Ctx.ResponseWriter, string(returnJSON))\n\tif err != nil {\n\t\tlogs.Error(err)\n\t}\n\n\tc.StopRun()\n}\n\n// ExecuteViewPathTemplate 执行指定的模板并返回执行结果.\nfunc (c *BaseController) ExecuteViewPathTemplate(tplName string, data interface{}) (string, error) {\n\tvar buf bytes.Buffer\n\n\tviewPath := c.ViewPath\n\n\tif c.ViewPath == \"\" {\n\t\tviewPath = web.BConfig.WebConfig.ViewsPath\n\n\t}\n\n\tif err := web.ExecuteViewPathTemplate(&buf, tplName, viewPath, data); err != nil {\n\t\treturn \"\", err\n\t}\n\treturn buf.String(), nil\n}\n\nfunc (c *BaseController) BaseUrl() string {\n\tbaseUrl := web.AppConfig.DefaultString(\"baseurl\", \"\")\n\tif baseUrl != \"\" {\n\t\tif strings.HasSuffix(baseUrl, \"/\") {\n\t\t\tbaseUrl = strings.TrimSuffix(baseUrl, \"/\")\n\t\t}\n\t} else {\n\t\tbaseUrl = c.Ctx.Input.Scheme() + \"://\" + c.Ctx.Request.Host\n\t}\n\treturn baseUrl\n}\n\n// 显示错误信息页面.\nfunc (c *BaseController) ShowErrorPage(errCode int, errMsg string) {\n\tc.TplName = \"errors/error.tpl\"\n\n\tc.Data[\"ErrorMessage\"] = errMsg\n\tc.Data[\"ErrorCode\"] = errCode\n\n\tvar buf bytes.Buffer\n\texeData := map[string]interface{}{\"ErrorMessage\": errMsg, \"ErrorCode\": errCode, \"BaseUrl\": conf.BaseUrl, \"Lang\": c.Lang}\n\n\tif err := web.ExecuteViewPathTemplate(&buf, \"errors/error.tpl\", web.BConfig.WebConfig.ViewsPath, exeData); err != nil {\n\t\tc.Abort(\"500\")\n\t}\n\tif errCode >= 200 && errCode <= 510 {\n\t\tc.CustomAbort(errCode, buf.String())\n\t} else {\n\t\tc.CustomAbort(500, buf.String())\n\t}\n}\n\nfunc (c *BaseController) CheckErrorResult(code int, err error) {\n\tif err != nil {\n\t\tc.ShowErrorPage(code, err.Error())\n\t}\n}\n\nfunc (c *BaseController) SetLang() {\n\thasCookie := false\n\tlang := c.GetString(\"lang\")\n\tif len(lang) == 0 {\n\t\tlang = c.Ctx.GetCookie(\"lang\")\n\t\thasCookie = true\n\t}\n\tif len(lang) == 0 ||\n\t\t!i18n.IsExist(lang) {\n\t\tif c.Data[\"language\"] != nil {\n\t\t\tlang = c.Data[\"language\"].(string)\n\t\t} else {\n\t\t\tlang, _ = web.AppConfig.String(\"default_lang\")\n\t\t}\n\t}\n\tif !hasCookie {\n\t\tc.Ctx.SetCookie(\"lang\", lang, 1<<31-1, \"/\")\n\t}\n\tc.Data[\"Lang\"] = lang\n\tc.Lang = lang\n}\n"
  },
  {
    "path": "controllers/BlogController.go",
    "content": "package controllers\n\nimport (\n\t\"context\"\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"html/template\"\n\t\"net/http\"\n\t\"net/url\"\n\t\"os\"\n\t\"path/filepath\"\n\t\"strconv\"\n\t\"strings\"\n\t\"time\"\n\n\t\"github.com/beego/beego/v2/client/orm\"\n\t\"github.com/beego/beego/v2/core/logs\"\n\t\"github.com/beego/beego/v2/server/web\"\n\t\"github.com/beego/i18n\"\n\t\"github.com/mindoc-org/mindoc/conf\"\n\t\"github.com/mindoc-org/mindoc/models\"\n\t\"github.com/mindoc-org/mindoc/utils\"\n\t\"github.com/mindoc-org/mindoc/utils/pagination\"\n)\n\ntype BlogController struct {\n\tBaseController\n}\n\nfunc (c *BlogController) Prepare() {\n\tc.BaseController.Prepare()\n\tif !c.EnableAnonymous && c.Member == nil {\n\t\tc.Redirect(conf.URLFor(\"AccountController.Login\")+\"?url=\"+url.PathEscape(conf.BaseUrl+c.Ctx.Request.URL.RequestURI()), 302)\n\t}\n}\n\n// 文章阅读\nfunc (c *BlogController) Index() {\n\tc.Prepare()\n\tc.TplName = \"blog/index.tpl\"\n\tblogId, _ := strconv.Atoi(c.Ctx.Input.Param(\":id\"))\n\n\tif blogId <= 0 {\n\t\tc.ShowErrorPage(404, i18n.Tr(c.Lang, \"message.page_not_existed\"))\n\t}\n\tblogReadSession := fmt.Sprintf(\"blog:read:%d\", blogId)\n\n\tblog, err := models.NewBlog().FindFromCache(blogId)\n\n\tif err != nil {\n\t\tc.ShowErrorPage(404, i18n.Tr(c.Lang, \"message.blog_not_existed\"))\n\t}\n\n\tif c.Ctx.Input.IsPost() {\n\t\tpassword := c.GetString(\"password\")\n\t\tif blog.BlogStatus == \"password\" && password != blog.Password {\n\t\t\tc.JsonResult(6001, i18n.Tr(c.Lang, \"message.blog_pwd_incorrect\"))\n\t\t} else if blog.BlogStatus == \"password\" && password == blog.Password {\n\t\t\t// Store the session value for the next GET request.\n\t\t\t_ = c.CruSession.Set(context.TODO(), blogReadSession, blogId)\n\t\t\tc.JsonResult(0, \"OK\")\n\t\t} else {\n\t\t\tc.JsonResult(0, \"OK\")\n\t\t}\n\t} else if blog.BlogStatus == \"password\" && c.CruSession.Get(context.TODO(), blogReadSession) == nil && // Read session doesn't exist\n\t\t(c.Member == nil || (blog.MemberId != c.Member.MemberId && !c.Member.IsAdministrator())) { // User isn't author or administrator\n\t\t//如果不存在已输入密码的标记\n\t\tc.TplName = \"blog/index_password.tpl\"\n\t}\n\tif blog.BlogType != 1 {\n\t\t//加载文章附件\n\t\t_ = blog.LinkAttach()\n\t}\n\n\tc.Data[\"Model\"] = blog\n\tc.Data[\"Content\"] = template.HTML(blog.BlogRelease)\n\n\tif blog.BlogExcerpt == \"\" {\n\t\tc.Data[\"Description\"] = utils.AutoSummary(blog.BlogRelease, 120)\n\t} else {\n\t\tc.Data[\"Description\"] = blog.BlogExcerpt\n\t}\n\n\tif nextBlog, err := models.NewBlog().QueryNext(blogId); err == nil {\n\t\tc.Data[\"Next\"] = nextBlog\n\t}\n\tif preBlog, err := models.NewBlog().QueryPrevious(blogId); err == nil {\n\t\tc.Data[\"Previous\"] = preBlog\n\t}\n}\n\n// 文章列表\nfunc (c *BlogController) List() {\n\tc.Prepare()\n\tc.TplName = \"blog/list.tpl\"\n\tpageIndex, _ := c.GetInt(\"page\", 1)\n\n\tvar blogList []*models.Blog\n\tvar totalCount int\n\tvar err error\n\n\tblogList, totalCount, err = models.NewBlog().FindToPager(pageIndex, conf.PageSize, 0, \"\")\n\n\tif err != nil && err != orm.ErrNoRows {\n\t\tc.ShowErrorPage(500, err.Error())\n\t}\n\tif totalCount > 0 {\n\t\tpager := pagination.NewPagination(c.Ctx.Request, totalCount, conf.PageSize, c.BaseUrl())\n\t\tc.Data[\"PageHtml\"] = pager.HtmlPages()\n\t\tfor _, blog := range blogList {\n\t\t\t//如果没有添加文章摘要，则自动提取\n\t\t\tif blog.BlogExcerpt == \"\" {\n\t\t\t\tblog.BlogExcerpt = utils.AutoSummary(blog.BlogRelease, 120)\n\t\t\t}\n\t\t\tblog.Link()\n\t\t}\n\t} else {\n\t\tc.Data[\"PageHtml\"] = \"\"\n\t}\n\n\tc.Data[\"Lists\"] = blogList\n}\n\n// 管理后台文章列表\nfunc (c *BlogController) ManageList() {\n\tc.Prepare()\n\tc.TplName = \"blog/manage_list.tpl\"\n\n\tpageIndex, _ := c.GetInt(\"page\", 1)\n\n\tblogList, totalCount, err := models.NewBlog().FindToPager(pageIndex, conf.PageSize, c.Member.MemberId, \"all\")\n\n\tif err != nil {\n\t\tc.ShowErrorPage(500, err.Error())\n\t}\n\tif totalCount > 0 {\n\t\tpager := pagination.NewPagination(c.Ctx.Request, totalCount, conf.PageSize, c.BaseUrl())\n\t\tc.Data[\"PageHtml\"] = pager.HtmlPages()\n\t} else {\n\t\tc.Data[\"PageHtml\"] = \"\"\n\t}\n\n\tc.Data[\"ModelList\"] = blogList\n\n}\n\n// 文章设置\nfunc (c *BlogController) ManageSetting() {\n\tc.Prepare()\n\tc.TplName = \"blog/manage_setting.tpl\"\n\t//如果是post请求\n\tif c.Ctx.Input.IsPost() {\n\t\tblogId, _ := c.GetInt(\"id\", 0)\n\t\tblogTitle := c.GetString(\"title\")\n\t\tblogIdentify := c.GetString(\"identify\")\n\t\torderIndex, _ := c.GetInt(\"order_index\", 0)\n\t\tblogType, _ := c.GetInt(\"blog_type\", 0)\n\t\tblogExcerpt := c.GetString(\"excerpt\", \"\")\n\t\tblogStatus := c.GetString(\"status\", \"publish\")\n\t\tblogPassword := c.GetString(\"password\", \"\")\n\t\tdocumentIdentify := strings.TrimSpace(c.GetString(\"documentIdentify\"))\n\t\tbookIdentify := strings.TrimSpace(c.GetString(\"bookIdentify\"))\n\t\tdocumentId := 0\n\n\t\tif c.Member.Role == conf.MemberReaderRole {\n\t\t\tc.JsonResult(6001, i18n.Tr(c.Lang, \"message.no_permission\"))\n\t\t}\n\t\tif blogTitle == \"\" {\n\t\t\tc.JsonResult(6001, i18n.Tr(c.Lang, \"message.blog_title_empty\"))\n\t\t}\n\t\tif strings.Count(blogExcerpt, \"\") > 500 {\n\t\t\tc.JsonResult(6008, i18n.Tr(c.Lang, \"message.blog_digest_tips\"))\n\t\t}\n\t\tif blogStatus != \"private\" && blogStatus != \"public\" && blogStatus != \"password\" && blogStatus != \"draft\" {\n\t\t\tblogStatus = \"public\"\n\t\t}\n\t\tif blogStatus == \"password\" && blogPassword == \"\" {\n\t\t\tc.JsonResult(6010, i18n.Tr(c.Lang, \"message.set_pwd_pls\"))\n\t\t}\n\t\tif blogType != 0 && blogType != 1 {\n\t\t\tc.JsonResult(6005, i18n.Tr(c.Lang, \"message.unknown_blog_type\"))\n\t\t}\n\t\tif strings.Count(blogTitle, \"\") > 200 {\n\t\t\tc.JsonResult(6002, i18n.Tr(c.Lang, \"message.blog_title_tips\"))\n\t\t}\n\t\t//如果是关联文章，需要同步关联的文档\n\t\tif blogType == 1 {\n\t\t\tbook, err := models.NewBook().FindByIdentify(bookIdentify)\n\n\t\t\tif err != nil {\n\t\t\t\tc.JsonResult(6011, i18n.Tr(c.Lang, \"message.ref_doc_not_exist_or_no_permit\"))\n\t\t\t}\n\t\t\tdoc, err := models.NewDocument().FindByIdentityFirst(documentIdentify, book.BookId)\n\t\t\tif err != nil {\n\t\t\t\tc.JsonResult(6003, i18n.Tr(c.Lang, \"message.query_failed\"))\n\t\t\t}\n\t\t\tdocumentId = doc.DocumentId\n\n\t\t\t// 如果不是超级管理员，则校验权限\n\t\t\tif !c.Member.IsAdministrator() {\n\t\t\t\tbookResult, err := models.NewBookResult().FindByIdentify(book.Identify, c.Member.MemberId)\n\n\t\t\t\tif err != nil || bookResult.RoleId == conf.BookObserver {\n\t\t\t\t\tc.JsonResult(6002, i18n.Tr(c.Lang, \"message.ref_doc_not_exist_or_no_permit\"))\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tvar blog *models.Blog\n\t\tvar err error\n\t\t//如果文章ID存在，则从数据库中查询文章\n\t\tif blogId > 0 {\n\t\t\tif c.Member.IsAdministrator() {\n\t\t\t\tblog, err = models.NewBlog().Find(blogId)\n\t\t\t} else {\n\t\t\t\tblog, err = models.NewBlog().FindByIdAndMemberId(blogId, c.Member.MemberId)\n\t\t\t}\n\n\t\t\tif err != nil {\n\t\t\t\tc.JsonResult(6003, i18n.Tr(c.Lang, \"message.blog_not_exist\"))\n\t\t\t}\n\t\t\t//如果设置了文章标识\n\t\t\tif blogIdentify != \"\" {\n\t\t\t\t//如果查询到的文章标识存在并且不是当前文章的id\n\t\t\t\tif b, err := models.NewBlog().FindByIdentify(blogIdentify); err == nil && b.BlogId != blogId {\n\t\t\t\t\tc.JsonResult(6004, i18n.Tr(c.Lang, \"message.blog_id_existed\"))\n\t\t\t\t}\n\t\t\t}\n\t\t\tblog.Modified = time.Now()\n\t\t\tblog.ModifyAt = c.Member.MemberId\n\t\t} else {\n\t\t\t//如果设置了文章标识\n\t\t\tif blogIdentify != \"\" {\n\t\t\t\tif models.NewBlog().IsExist(blogIdentify) {\n\t\t\t\t\tc.JsonResult(6004, i18n.Tr(c.Lang, \"message.blog_id_existed\"))\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tblog = models.NewBlog()\n\t\t\tblog.MemberId = c.Member.MemberId\n\t\t\tblog.Created = time.Now()\n\t\t}\n\t\tif blogIdentify == \"\" {\n\t\t\tblog.BlogIdentify = fmt.Sprintf(\"%s-%d\", \"post\", time.Now().UnixNano())\n\t\t} else {\n\t\t\tblog.BlogIdentify = blogIdentify\n\t\t}\n\n\t\tblog.BlogTitle = blogTitle\n\n\t\tblog.OrderIndex = orderIndex\n\t\tblog.BlogType = blogType\n\t\tif blogType == 1 {\n\t\t\tblog.DocumentId = documentId\n\t\t}\n\t\tblog.BlogExcerpt = blogExcerpt\n\t\tblog.BlogStatus = blogStatus\n\t\tblog.Password = blogPassword\n\n\t\tif err := blog.Save(); err != nil {\n\t\t\tlogs.Error(\"保存文章失败 -> \", err)\n\t\t\tc.JsonResult(6011, i18n.Tr(c.Lang, \"message.failed\"))\n\t\t} else {\n\t\t\tc.JsonResult(0, \"ok\", blog)\n\t\t}\n\t}\n\tif c.Ctx.Input.Referer() == \"\" {\n\t\tc.Data[\"Referer\"] = \"javascript:history.back();\"\n\t} else {\n\t\tc.Data[\"Referer\"] = c.Ctx.Input.Referer()\n\t}\n\tblogId, err := strconv.Atoi(c.Ctx.Input.Param(\":id\"))\n\n\tc.Data[\"DocumentIdentify\"] = \"\"\n\tif err == nil {\n\t\tblog, err := models.NewBlog().FindByIdAndMemberId(blogId, c.Member.MemberId)\n\t\tif err != nil {\n\t\t\tc.ShowErrorPage(500, err.Error())\n\t\t}\n\n\t\tc.Data[\"Model\"] = blog\n\t} else {\n\t\tc.Data[\"Model\"] = models.NewBlog()\n\t}\n}\n\n// 文章创建或编辑\nfunc (c *BlogController) ManageEdit() {\n\tc.Prepare()\n\tc.TplName = \"blog/manage_edit.tpl\"\n\n\tif c.Member.Role == conf.MemberReaderRole {\n\t\tc.JsonResult(6001, i18n.Tr(c.Lang, \"message.no_permission\"))\n\t}\n\n\tif c.Ctx.Input.IsPost() {\n\t\tblogId, _ := c.GetInt(\"blogId\", 0)\n\n\t\tif blogId <= 0 {\n\t\t\tc.JsonResult(6001, i18n.Tr(c.Lang, \"message.param_error\"))\n\t\t}\n\t\tblogContent := c.GetString(\"content\", \"\")\n\t\tblogHtml := c.GetString(\"htmlContent\", \"\")\n\t\tversion, _ := c.GetInt64(\"version\", 0)\n\t\tcover := c.GetString(\"cover\")\n\n\t\tvar blog *models.Blog\n\t\tvar err error\n\n\t\tif c.Member.IsAdministrator() {\n\t\t\tblog, err = models.NewBlog().Find(blogId)\n\t\t} else {\n\t\t\tblog, err = models.NewBlog().FindByIdAndMemberId(blogId, c.Member.MemberId)\n\t\t}\n\t\tif err != nil {\n\t\t\tlogs.Error(\"查询文章失败 ->\", err)\n\t\t\tc.JsonResult(6002, i18n.Tr(c.Lang, \"message.query_failed\"))\n\t\t}\n\t\tif version > 0 && blog.Version != version && cover != \"yes\" {\n\t\t\tc.JsonResult(6005, i18n.Tr(c.Lang, \"message.blog_has_modified\"))\n\t\t}\n\t\t//如果是关联文章，需要同步关联的文档\n\t\tif blog.BlogType == 1 {\n\t\t\tdoc, err := models.NewDocument().Find(blog.DocumentId)\n\t\t\tif err != nil {\n\t\t\t\tlogs.Error(\"查询关联项目文档时出错 ->\", err)\n\t\t\t\tc.JsonResult(6003, i18n.Tr(c.Lang, \"message.query_failed\"))\n\t\t\t}\n\t\t\tbook, err := models.NewBook().Find(doc.BookId)\n\t\t\tif err != nil {\n\t\t\t\tc.JsonResult(6002, i18n.Tr(c.Lang, \"message.item_not_exist_or_no_permit\"))\n\t\t\t}\n\n\t\t\t// 如果不是超级管理员，则校验权限\n\t\t\tif !c.Member.IsAdministrator() {\n\t\t\t\tbookResult, err := models.NewBookResult().FindByIdentify(book.Identify, c.Member.MemberId)\n\n\t\t\t\tif err != nil || bookResult.RoleId == conf.BookObserver {\n\t\t\t\t\tlogs.Error(\"FindByIdentify => \", err)\n\t\t\t\t\tc.JsonResult(6002, i18n.Tr(c.Lang, \"message.ref_doc_not_exist_or_no_permit\"))\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tdoc.Markdown = blogContent\n\t\t\tdoc.Release = blogHtml\n\t\t\tdoc.Content = blogHtml\n\t\t\tdoc.ModifyTime = time.Now()\n\t\t\tdoc.ModifyAt = c.Member.MemberId\n\t\t\tif err := doc.InsertOrUpdate(\"markdown\", \"release\", \"content\", \"modify_time\", \"modify_at\"); err != nil {\n\t\t\t\tlogs.Error(\"保存关联文档时出错 ->\", err)\n\t\t\t\tc.JsonResult(6004, i18n.Tr(c.Lang, \"message.failed\"))\n\t\t\t}\n\t\t}\n\n\t\tblog.BlogContent = blogContent\n\t\tblog.BlogRelease = blogHtml\n\t\tblog.ModifyAt = c.Member.MemberId\n\t\tblog.Modified = time.Now()\n\n\t\tif err := blog.Save(\"blog_content\", \"blog_release\", \"modify_at\", \"modify_time\", \"version\"); err != nil {\n\t\t\tlogs.Error(\"保存文章失败 -> \", err)\n\t\t\tc.JsonResult(6011, i18n.Tr(c.Lang, \"message.failed\"))\n\t\t} else {\n\t\t\tc.JsonResult(0, \"ok\", blog)\n\t\t}\n\t}\n\n\tblogId, _ := strconv.Atoi(c.Ctx.Input.Param(\":id\"))\n\n\tif blogId <= 0 {\n\t\tc.ShowErrorPage(500, i18n.Tr(c.Lang, \"message.param_error\"))\n\t}\n\tvar blog *models.Blog\n\tvar err error\n\n\tif c.Member.IsAdministrator() {\n\t\tblog, err = models.NewBlog().Find(blogId)\n\t} else {\n\t\tblog, err = models.NewBlog().FindByIdAndMemberId(blogId, c.Member.MemberId)\n\t}\n\tif err != nil {\n\t\tc.ShowErrorPage(404, i18n.Tr(c.Lang, \"message.blog_not_exist\"))\n\t}\n\tblog.LinkAttach()\n\n\tif len(blog.AttachList) > 0 {\n\t\treturnJSON, err := json.Marshal(blog.AttachList)\n\t\tif err != nil {\n\t\t\tlogs.Error(\"序列化文章附件时出错 ->\", err)\n\t\t} else {\n\t\t\tc.Data[\"AttachList\"] = template.JS(string(returnJSON))\n\t\t}\n\t} else {\n\t\tc.Data[\"AttachList\"] = template.JS(\"[]\")\n\t}\n\tif conf.GetUploadFileSize() > 0 {\n\t\tc.Data[\"UploadFileSize\"] = conf.GetUploadFileSize()\n\t} else {\n\t\tc.Data[\"UploadFileSize\"] = \"undefined\"\n\t}\n\tc.Data[\"Model\"] = blog\n}\n\n// 删除文章\nfunc (c *BlogController) ManageDelete() {\n\tc.Prepare()\n\tblogId, _ := c.GetInt(\"blog_id\", 0)\n\n\tif blogId <= 0 {\n\t\tc.JsonResult(6001, i18n.Tr(c.Lang, \"message.param_error\"))\n\t}\n\tvar blog *models.Blog\n\tvar err error\n\n\tif c.Member.IsAdministrator() {\n\t\tblog, err = models.NewBlog().Find(blogId)\n\t} else {\n\t\tblog, err = models.NewBlog().FindByIdAndMemberId(blogId, c.Member.MemberId)\n\t}\n\tif err != nil {\n\t\tc.JsonResult(6002, i18n.Tr(c.Lang, \"message.blog_not_exist\"))\n\t}\n\n\tif err := blog.Delete(blogId); err != nil {\n\t\tc.JsonResult(6003, i18n.Tr(c.Lang, \"message.failed\"))\n\t} else {\n\t\tc.JsonResult(0, i18n.Tr(c.Lang, \"message.success\"))\n\t}\n\n}\n\n// 上传附件或图片\nfunc (c *BlogController) Upload() {\n\tc.Prepare()\n\tblogId, _ := c.GetInt(\"blogId\")\n\n\tif blogId <= 0 {\n\t\tc.JsonResult(6001, i18n.Tr(c.Lang, \"message.param_error\"))\n\t}\n\n\tblog, err := models.NewBlog().Find(blogId)\n\n\tif err != nil {\n\t\tc.JsonResult(6010, i18n.Tr(c.Lang, \"message.blog_not_exist\"))\n\t}\n\tif !c.Member.IsAdministrator() && blog.MemberId != c.Member.MemberId {\n\t\tc.JsonResult(6011, i18n.Tr(c.Lang, \"message.no_permission\"))\n\t}\n\n\tname := \"editormd-file-file\"\n\n\tfile, moreFile, err := c.GetFile(name)\n\tif err == http.ErrMissingFile {\n\t\tname = \"editormd-image-file\"\n\t\tfile, moreFile, err = c.GetFile(name)\n\t\tif err == http.ErrMissingFile {\n\t\t\tc.JsonResult(6003, i18n.Tr(c.Lang, \"message.upload_file_empty\"))\n\t\t}\n\t}\n\n\tif err != nil {\n\t\tc.JsonResult(6002, err.Error())\n\t}\n\n\tdefer file.Close()\n\n\ttype Size interface {\n\t\tSize() int64\n\t}\n\n\tif conf.GetUploadFileSize() > 0 && moreFile.Size > conf.GetUploadFileSize() {\n\t\tc.JsonResult(6009, i18n.Tr(c.Lang, \"message.upload_file_size_limit\"))\n\t}\n\n\text := filepath.Ext(moreFile.Filename)\n\n\tif ext == \"\" {\n\t\tc.JsonResult(6003, i18n.Tr(c.Lang, \"message.upload_file_type_error\"))\n\t}\n\t//如果文件类型设置为 * 标识不限制文件类型\n\tif web.AppConfig.DefaultString(\"upload_file_ext\", \"\") != \"*\" {\n\t\tif !conf.IsAllowUploadFileExt(ext) {\n\t\t\tc.JsonResult(6004, i18n.Tr(c.Lang, \"message.upload_file_type_error\"))\n\t\t}\n\t}\n\n\t// 如果是超级管理员，则不判断权限\n\tif c.Member.IsAdministrator() {\n\t\t_, err := models.NewBlog().Find(blogId)\n\n\t\tif err != nil {\n\t\t\tc.JsonResult(6006, i18n.Tr(c.Lang, \"message.doc_not_exist_or_no_permit\"))\n\t\t}\n\n\t} else {\n\t\t_, err := models.NewBlog().FindByIdAndMemberId(blogId, c.Member.MemberId)\n\n\t\tif err != nil {\n\t\t\tlogs.Error(\"查询文章时出错 -> \", err)\n\t\t\tif err == orm.ErrNoRows {\n\t\t\t\tc.JsonResult(6006, i18n.Tr(c.Lang, \"message.no_permission\"))\n\t\t\t}\n\n\t\t\tc.JsonResult(6001, err.Error())\n\t\t}\n\t}\n\n\tfileName := \"attach_\" + strconv.FormatInt(time.Now().UnixNano(), 16)\n\n\tfilePath := filepath.Join(conf.WorkingDirectory, \"uploads\", \"blog\", time.Now().Format(\"200601\"), fileName+ext)\n\n\tpath := filepath.Dir(filePath)\n\n\tos.MkdirAll(path, os.ModePerm)\n\n\terr = c.SaveToFile(name, filePath)\n\n\tif err != nil {\n\t\tlogs.Error(\"SaveToFile => \", err)\n\t\tc.JsonResult(6005, i18n.Tr(c.Lang, \"message.failed\"))\n\t}\n\n\tvar httpPath string\n\tresult := make(map[string]interface{})\n\t//如果是图片，则当做内置图片处理，否则当做附件处理\n\tif strings.EqualFold(ext, \".jpg\") || strings.EqualFold(ext, \".jpeg\") || strings.EqualFold(ext, \".png\") || strings.EqualFold(ext, \".gif\") {\n\t\thttpPath = \"/\" + strings.Replace(strings.TrimPrefix(filePath, conf.WorkingDirectory), \"\\\\\", \"/\", -1)\n\t\tif strings.HasPrefix(httpPath, \"//\") {\n\t\t\thttpPath = conf.URLForWithCdnImage(string(httpPath[1:]))\n\t\t}\n\t} else {\n\t\tattachment := models.NewAttachment()\n\t\tattachment.BookId = 0\n\t\tattachment.FileName = moreFile.Filename\n\t\tattachment.CreateAt = c.Member.MemberId\n\t\tattachment.FileExt = ext\n\t\tattachment.FilePath = strings.TrimPrefix(filePath, conf.WorkingDirectory)\n\t\tattachment.DocumentId = blogId\n\t\t//如果是关联文章，则将附件设置为关联文档的文档上\n\t\tif blog.BlogType == 1 {\n\t\t\tattachment.BookId = blog.BookId\n\t\t\tattachment.DocumentId = blog.DocumentId\n\t\t}\n\t\tif fileInfo, err := os.Stat(filePath); err == nil {\n\t\t\tattachment.FileSize = float64(fileInfo.Size())\n\t\t}\n\n\t\tattachment.HttpPath = httpPath\n\n\t\tif err := attachment.Insert(); err != nil {\n\t\t\tos.Remove(filePath)\n\t\t\tlogs.Error(\"保存文件附件失败 -> \", err)\n\t\t\tc.JsonResult(6006, i18n.Tr(c.Lang, \"message.failed\"))\n\t\t}\n\t\tif attachment.HttpPath == \"\" {\n\t\t\tattachment.HttpPath = conf.URLForNotHost(\"BlogController.Download\", \":id\", blogId, \":attach_id\", attachment.AttachmentId)\n\n\t\t\tif err := attachment.Update(); err != nil {\n\t\t\t\tlogs.Error(\"保存文件失败 -> \", attachment.FilePath, err)\n\t\t\t\tc.JsonResult(6005, i18n.Tr(c.Lang, \"message.failed\"))\n\t\t\t}\n\t\t}\n\t\tresult[\"attach\"] = attachment\n\t}\n\n\tresult[\"errcode\"] = 0\n\tresult[\"success\"] = 1\n\tresult[\"message\"] = \"ok\"\n\tresult[\"url\"] = httpPath\n\tresult[\"alt\"] = fileName\n\n\tc.Ctx.Output.JSON(result, true, false)\n\tc.StopRun()\n}\n\n// 删除附件\nfunc (c *BlogController) RemoveAttachment() {\n\tc.Prepare()\n\tattachId, _ := c.GetInt(\"attach_id\")\n\tblogId, _ := strconv.Atoi(c.Ctx.Input.Param(\":id\"))\n\n\tif attachId <= 0 {\n\t\tc.JsonResult(6001, i18n.Tr(c.Lang, \"message.param_error\"))\n\t}\n\tblog, err := models.NewBlog().Find(blogId)\n\tif err != nil {\n\t\tif err == orm.ErrNoRows {\n\t\t\tc.ShowErrorPage(500, i18n.Tr(c.Lang, \"message.doc_not_exist\"))\n\t\t} else {\n\t\t\tc.ShowErrorPage(500, i18n.Tr(c.Lang, \"message.query_failed\"))\n\t\t}\n\t}\n\tattach, err := models.NewAttachment().Find(attachId)\n\n\tif err != nil {\n\t\tlogs.Error(err)\n\t\tc.JsonResult(6002, i18n.Tr(c.Lang, \"message.attachment_not_exist\"))\n\t}\n\n\tif !c.Member.IsAdministrator() {\n\t\t_, err := models.NewBlog().FindByIdAndMemberId(attach.DocumentId, c.Member.MemberId)\n\n\t\tif err != nil {\n\t\t\tlogs.Error(err)\n\t\t\tc.JsonResult(6003, i18n.Tr(c.Lang, \"message.doc_not_exist\"))\n\t\t}\n\t}\n\n\tif blog.BlogType == 1 && attach.BookId != blog.BookId && attach.DocumentId != blog.DocumentId {\n\t\tc.ShowErrorPage(404, i18n.Tr(c.Lang, \"message.attachment_not_exist\"))\n\t} else if attach.BookId != 0 || attach.DocumentId != blogId {\n\t\tc.ShowErrorPage(404, i18n.Tr(c.Lang, \"message.attachment_not_exist\"))\n\t}\n\n\tif err := attach.Delete(); err != nil {\n\t\tlogs.Error(err)\n\t\tc.JsonResult(6005, i18n.Tr(c.Lang, \"message.failed\"))\n\t}\n\n\tos.Remove(filepath.Join(conf.WorkingDirectory, attach.FilePath))\n\n\tc.JsonResult(0, \"ok\", attach)\n}\n\n// 下载附件\nfunc (c *BlogController) Download() {\n\tc.Prepare()\n\n\tblogId, _ := strconv.Atoi(c.Ctx.Input.Param(\":id\"))\n\tattachId, _ := strconv.Atoi(c.Ctx.Input.Param(\":attach_id\"))\n\tpassword := c.GetString(\"password\")\n\n\tblog, err := models.NewBlog().Find(blogId)\n\tif err != nil {\n\t\tif err == orm.ErrNoRows {\n\t\t\tc.ShowErrorPage(500, i18n.Tr(c.Lang, \"message.doc_not_exist\"))\n\t\t} else {\n\t\t\tc.ShowErrorPage(500, i18n.Tr(c.Lang, \"message.query_failed\"))\n\t\t}\n\t}\n\tblogReadSession := fmt.Sprintf(\"blog:read:%d\", blogId)\n\t//如果没有启动匿名访问，或者设置了访问密码\n\tif (c.Member == nil && !c.EnableAnonymous) || (blog.BlogStatus == \"password\" && password != blog.Password && c.CruSession.Get(context.TODO(), blogReadSession) == nil) {\n\t\tc.ShowErrorPage(403, i18n.Tr(c.Lang, \"message.no_permission\"))\n\t}\n\n\t// 查找附件\n\tattachment, err := models.NewAttachment().Find(attachId)\n\n\tif err != nil {\n\t\tif err == orm.ErrNoRows {\n\t\t\tc.ShowErrorPage(404, i18n.Tr(c.Lang, \"message.attachment_not_exist\"))\n\t\t} else {\n\t\t\tlogs.Error(\"查询附件时出现异常 -> \", err)\n\t\t\tc.ShowErrorPage(500, i18n.Tr(c.Lang, \"message.query_failed\"))\n\t\t}\n\t}\n\n\t//如果是链接的文章，需要校验文档ID是否一致，如果不是，需要保证附件的项目ID为0且文档的ID等于博文ID\n\tif blog.BlogType == 1 && attachment.DocumentId != blog.DocumentId {\n\t\tc.ShowErrorPage(404, i18n.Tr(c.Lang, \"message.attachment_not_exist\"))\n\t} else if blog.BlogType != 1 && (attachment.BookId != 0 || attachment.DocumentId != blogId) {\n\t\tc.ShowErrorPage(404, i18n.Tr(c.Lang, \"message.attachment_not_exist\"))\n\t}\n\n\tc.Ctx.Output.Download(filepath.Join(conf.WorkingDirectory, attachment.FilePath), attachment.FileName)\n\tc.StopRun()\n}\n"
  },
  {
    "path": "controllers/BookController.go",
    "content": "package controllers\n\nimport (\n\t\"context\"\n\t\"encoding/json\"\n\t\"errors\"\n\t\"fmt\"\n\t\"html/template\"\n\t\"os\"\n\t\"path/filepath\"\n\t\"regexp\"\n\t\"strconv\"\n\t\"strings\"\n\t\"time\"\n\n\t\"github.com/beego/i18n\"\n\t\"github.com/mindoc-org/mindoc/utils/sqltil\"\n\n\t\"net/http\"\n\n\t\"github.com/beego/beego/v2/client/orm\"\n\t\"github.com/beego/beego/v2/core/logs\"\n\t\"github.com/mindoc-org/mindoc/conf\"\n\t\"github.com/mindoc-org/mindoc/graphics\"\n\t\"github.com/mindoc-org/mindoc/models\"\n\t\"github.com/mindoc-org/mindoc/utils\"\n\t\"github.com/mindoc-org/mindoc/utils/pagination\"\n\t\"github.com/russross/blackfriday/v2\"\n)\n\ntype BookController struct {\n\tBaseController\n}\n\nfunc (c *BookController) Index() {\n\tc.Prepare()\n\tc.TplName = \"book/index.tpl\"\n\n\tpageIndex, _ := c.GetInt(\"page\", 1)\n\n\tbooks, totalCount, err := models.NewBook().FindToPager(pageIndex, conf.PageSize, c.Member.MemberId, c.Lang)\n\n\tif err != nil {\n\t\tlogs.Error(\"BookController.Index => \", err)\n\t\tc.Abort(\"500\")\n\t}\n\n\tfor i, book := range books {\n\t\tbooks[i].Description = utils.StripTags(string(blackfriday.Run([]byte(book.Description))))\n\t\tbooks[i].ModifyTime = book.ModifyTime.Local()\n\t\tbooks[i].CreateTime = book.CreateTime.Local()\n\t}\n\n\tif totalCount > 0 {\n\t\tpager := pagination.NewPagination(c.Ctx.Request, totalCount, conf.PageSize, c.BaseUrl())\n\t\tc.Data[\"PageHtml\"] = pager.HtmlPages()\n\t} else {\n\t\tc.Data[\"PageHtml\"] = \"\"\n\t}\n\tb, err := json.Marshal(books)\n\n\tif err != nil || len(books) <= 0 {\n\t\tc.Data[\"Result\"] = template.JS(\"[]\")\n\t} else {\n\t\tc.Data[\"Result\"] = template.JS(string(b))\n\t}\n\tif itemsets, err := models.NewItemsets().First(1); err == nil {\n\t\tc.Data[\"Item\"] = itemsets\n\t}\n}\n\n// Dashboard 项目概要 .\nfunc (c *BookController) Dashboard() {\n\tc.Prepare()\n\tc.TplName = \"book/dashboard.tpl\"\n\n\tkey := c.Ctx.Input.Param(\":key\")\n\n\tif key == \"\" {\n\t\tc.Abort(\"404\")\n\t}\n\n\tbook, err := models.NewBookResult().SetLang(c.Lang).FindByIdentify(key, c.Member.MemberId)\n\tif err != nil {\n\t\tif err == models.ErrPermissionDenied {\n\t\t\tc.Abort(\"403\")\n\t\t}\n\t\tc.Abort(\"500\")\n\t\treturn\n\t}\n\n\tc.Data[\"Description\"] = template.HTML(blackfriday.Run([]byte(book.Description)))\n\tc.Data[\"Model\"] = *book\n}\n\n// Setting 项目设置 .\nfunc (c *BookController) Setting() {\n\tc.Prepare()\n\tc.TplName = \"book/setting.tpl\"\n\n\tkey := c.Ctx.Input.Param(\":key\")\n\n\tif key == \"\" {\n\t\tc.Abort(\"404\")\n\t}\n\n\tbook, err := models.NewBookResult().FindByIdentify(key, c.Member.MemberId)\n\tif err != nil {\n\t\tif err == orm.ErrNoRows {\n\t\t\tc.Abort(\"404\")\n\t\t}\n\t\tif err == models.ErrPermissionDenied {\n\t\t\tc.Abort(\"403\")\n\t\t}\n\t\tc.Abort(\"500\")\n\t\treturn\n\t}\n\t//如果不是创始人也不是管理员则不能操作\n\tif book.RoleId != conf.BookFounder && book.RoleId != conf.BookAdmin {\n\t\tc.Abort(\"403\")\n\t}\n\tif book.PrivateToken != \"\" {\n\t\tbook.PrivateToken = conf.URLFor(\"DocumentController.Index\", \":key\", book.Identify, \"token\", book.PrivateToken)\n\t}\n\n\tc.Data[\"Model\"] = book\n\n}\n\n// 保存项目信息\nfunc (c *BookController) SaveBook() {\n\tbookResult, err := c.IsPermission()\n\n\tif err != nil {\n\t\tc.JsonResult(6001, err.Error())\n\t}\n\tbook, err := models.NewBook().Find(bookResult.BookId)\n\n\tif err != nil {\n\t\tlogs.Error(\"SaveBook => \", err)\n\t\tc.JsonResult(6002, err.Error())\n\t}\n\n\tbookName := strings.TrimSpace(c.GetString(\"book_name\"))\n\tdescription := strings.TrimSpace(c.GetString(\"description\", \"\"))\n\tcommentStatus := c.GetString(\"comment_status\")\n\t//tag := strings.TrimSpace(c.GetString(\"label\"))\n\teditor := strings.TrimSpace(c.GetString(\"editor\"))\n\tautoRelease := strings.TrimSpace(c.GetString(\"auto_release\")) == \"on\"\n\tpublisher := strings.TrimSpace(c.GetString(\"publisher\"))\n\thistoryCount, _ := c.GetInt(\"history_count\", 0)\n\tisDownload := strings.TrimSpace(c.GetString(\"is_download\")) == \"on\"\n\tenableShare := strings.TrimSpace(c.GetString(\"enable_share\")) == \"on\"\n\tisUseFirstDocument := strings.TrimSpace(c.GetString(\"is_use_first_document\")) == \"on\"\n\tautoSave := strings.TrimSpace(c.GetString(\"auto_save\")) == \"on\"\n\titemId, _ := c.GetInt(\"itemId\")\n\tpringState := strings.TrimSpace(c.GetString(\"print_state\")) == \"on\"\n\n\tif strings.Count(description, \"\") > 500 {\n\t\tc.JsonResult(6004, i18n.Tr(c.Lang, \"message.project_desc_tips\"))\n\t}\n\tif commentStatus != \"open\" && commentStatus != \"closed\" && commentStatus != \"group_only\" && commentStatus != \"registered_only\" {\n\t\tcommentStatus = \"closed\"\n\t}\n\n\tif !models.NewItemsets().Exist(itemId) {\n\t\tc.JsonResult(6006, i18n.Tr(c.Lang, \"message.project_space_not_exist\"))\n\t}\n\t// if editor != EditorMarkdown && editor != EditorCherryMarkdown && editor != EditorHtml && editor != EditorNewHtml {\n\tif editor != EditorMarkdown && editor != EditorCherryMarkdown && editor != EditorHtml && editor != EditorNewHtml && editor != EditorFroala {\n\t\teditor = EditorMarkdown\n\t}\n\n\tbook.BookName = bookName\n\tbook.Description = description\n\tbook.CommentStatus = commentStatus\n\tbook.Publisher = publisher\n\t//book.Label = tag\n\tif book.Editor == EditorMarkdown && editor == EditorCherryMarkdown || book.Editor == EditorCherryMarkdown && editor == EditorMarkdown {\n\t\tc.JsonResult(6006, i18n.Tr(c.Lang, \"message.editors_not_compatible\"))\n\t}\n\tbook.Editor = editor\n\tif editor == EditorCherryMarkdown {\n\t\tbook.Theme = \"cherry\"\n\t}\n\tbook.HistoryCount = historyCount\n\tbook.IsDownload = 0\n\tbook.BookPassword = strings.TrimSpace(c.GetString(\"bPassword\"))\n\tbook.ItemId = itemId\n\n\tif autoRelease {\n\t\tbook.AutoRelease = 1\n\t} else {\n\t\tbook.AutoRelease = 0\n\t}\n\tif isDownload {\n\t\tbook.IsDownload = 0\n\t} else {\n\t\tbook.IsDownload = 1\n\t}\n\tif enableShare {\n\t\tbook.IsEnableShare = 0\n\t} else {\n\t\tbook.IsEnableShare = 1\n\t}\n\tif isUseFirstDocument {\n\t\tbook.IsUseFirstDocument = 1\n\t} else {\n\t\tbook.IsUseFirstDocument = 0\n\t}\n\tif autoSave {\n\t\tbook.AutoSave = 1\n\t} else {\n\t\tbook.AutoSave = 0\n\t}\n\tif pringState {\n\t\tbook.PrintSate = 1\n\t} else {\n\t\tbook.PrintSate = 0\n\t}\n\tif err := book.Update(); err != nil {\n\t\tc.JsonResult(6006, i18n.Tr(c.Lang, \"message.failed\"))\n\t}\n\tbookResult.BookName = bookName\n\tbookResult.Description = description\n\tbookResult.CommentStatus = commentStatus\n\n\tlogs.Info(\"用户 [\", c.Member.Account, \"] 修改了项目 ->\", book)\n\n\tc.JsonResult(0, \"ok\", bookResult)\n}\n\n// 设置项目私有状态.\nfunc (c *BookController) PrivatelyOwned() {\n\n\tstatus := c.GetString(\"status\")\n\n\tif status != \"open\" && status != \"close\" {\n\t\tc.JsonResult(6003, i18n.Tr(c.Lang, \"message.param_error\"))\n\t}\n\tstate := 0\n\tif status == \"open\" {\n\t\tstate = 0\n\t} else {\n\t\tstate = 1\n\t}\n\n\tbookResult, err := c.IsPermission()\n\n\tif err != nil {\n\t\tc.JsonResult(6001, err.Error())\n\t\treturn\n\t}\n\t//只有创始人才能变更私有状态\n\tif bookResult.RoleId != conf.BookFounder {\n\t\tc.JsonResult(6002, i18n.Tr(c.Lang, \"message.no_permission\"))\n\t}\n\n\tbook, err := models.NewBook().Find(bookResult.BookId)\n\n\tif err != nil {\n\t\tc.JsonResult(6005, i18n.Tr(c.Lang, \"message.item_not_exist\"))\n\t\treturn\n\t}\n\tbook.PrivatelyOwned = state\n\n\terr = book.Update()\n\n\tif err != nil {\n\t\tlogs.Error(\"PrivatelyOwned => \", err)\n\t\tc.JsonResult(6004, i18n.Tr(c.Lang, \"message.failed\"))\n\t}\n\tlogs.Info(\"用户 【\", c.Member.Account, \"]修改了项目权限 ->\", state)\n\tc.JsonResult(0, \"ok\")\n}\n\n// Transfer 转让项目.\nfunc (c *BookController) Transfer() {\n\tc.Prepare()\n\taccount := c.GetString(\"account\")\n\n\tif account == \"\" {\n\t\tc.JsonResult(6004, i18n.Tr(c.Lang, \"message.receive_account_empty\"))\n\t}\n\tmember, err := models.NewMember().FindByAccount(account)\n\n\tif err != nil {\n\t\tlogs.Error(\"FindByAccount => \", err)\n\t\tc.JsonResult(6005, i18n.Tr(c.Lang, \"message.receive_account_not_exist\"))\n\t}\n\tif member.Status != 0 {\n\t\tc.JsonResult(6006, i18n.Tr(c.Lang, \"message.receive_account_disabled\"))\n\t}\n\tif member.MemberId == c.Member.MemberId {\n\t\tc.JsonResult(6007, i18n.Tr(c.Lang, \"message.cannot_handover_myself\"))\n\t}\n\tbookResult, err := c.IsPermission()\n\n\tif err != nil {\n\t\tc.JsonResult(6001, err.Error())\n\t\treturn\n\t}\n\n\terr = models.NewRelationship().Transfer(bookResult.BookId, c.Member.MemberId, member.MemberId)\n\n\tif err != nil {\n\t\tlogs.Error(\"转让项目失败 -> \", err)\n\t\tc.JsonResult(6008, err.Error())\n\t}\n\tc.JsonResult(0, \"ok\")\n}\n\n// 上传项目封面.\nfunc (c *BookController) UploadCover() {\n\n\tbookResult, err := c.IsPermission()\n\n\tif err != nil {\n\t\tc.JsonResult(6001, err.Error())\n\t\treturn\n\t}\n\tbook, err := models.NewBook().Find(bookResult.BookId)\n\n\tif err != nil {\n\t\tlogs.Error(\"SaveBook => \", err)\n\t\tc.JsonResult(6002, err.Error())\n\t}\n\n\tfile, moreFile, err := c.GetFile(\"image-file\")\n\n\tif err != nil {\n\t\tlogs.Error(\"获取上传文件失败 ->\", err.Error())\n\t\tc.JsonResult(500, \"读取文件异常\")\n\t\treturn\n\t}\n\tdefer file.Close()\n\n\text := filepath.Ext(moreFile.Filename)\n\n\tif !strings.EqualFold(ext, \".png\") && !strings.EqualFold(ext, \".jpg\") && !strings.EqualFold(ext, \".gif\") && !strings.EqualFold(ext, \".jpeg\") {\n\t\tc.JsonResult(500, \"不支持的图片格式\")\n\t}\n\n\tx1, _ := strconv.ParseFloat(c.GetString(\"x\"), 10)\n\ty1, _ := strconv.ParseFloat(c.GetString(\"y\"), 10)\n\tw1, _ := strconv.ParseFloat(c.GetString(\"width\"), 10)\n\th1, _ := strconv.ParseFloat(c.GetString(\"height\"), 10)\n\n\tx := int(x1)\n\ty := int(y1)\n\twidth := int(w1)\n\theight := int(h1)\n\n\tfileName := \"cover_\" + strconv.FormatInt(time.Now().UnixNano(), 16)\n\n\t//附件路径按照项目组织\n\t// \tfilePath := filepath.Join(\"uploads\", book.Identify, \"images\", fileName+ext)\n\tfilePath := filepath.Join(conf.WorkingDirectory, \"uploads\", book.Identify, \"images\", fileName+ext)\n\n\tpath := filepath.Dir(filePath)\n\n\tos.MkdirAll(path, os.ModePerm)\n\n\terr = c.SaveToFile(\"image-file\", filePath)\n\n\tif err != nil {\n\t\tlogs.Error(\"\", err)\n\t\tc.JsonResult(500, \"图片保存失败\")\n\t}\n\tdefer func(filePath string) {\n\t\tos.Remove(filePath)\n\t}(filePath)\n\n\t//剪切图片\n\tsubImg, err := graphics.ImageCopyFromFile(filePath, x, y, width, height)\n\n\tif err != nil {\n\t\tlogs.Error(\"graphics.ImageCopyFromFile => \", err)\n\t\tc.JsonResult(500, \"图片剪切\")\n\t}\n\n\tfilePath = filepath.Join(conf.WorkingDirectory, \"uploads\", time.Now().Format(\"200601\"), fileName+\"_small\"+ext)\n\n\t//生成缩略图并保存到磁盘\n\terr = graphics.ImageResizeSaveFile(subImg, 350, 460, filePath)\n\n\tif err != nil {\n\t\tlogs.Error(\"ImageResizeSaveFile => \", err.Error())\n\t\tc.JsonResult(500, \"保存图片失败\")\n\t}\n\n\turl := \"/\" + strings.Replace(strings.TrimPrefix(filePath, conf.WorkingDirectory), \"\\\\\", \"/\", -1)\n\n\tif strings.HasPrefix(url, \"//\") {\n\t\turl = string(url[1:])\n\t}\n\n\toldCover := book.Cover\n\n\tbook.Cover = conf.URLForWithCdnImage(url)\n\n\tif err := book.Update(); err != nil {\n\t\tc.JsonResult(6001, \"保存图片失败\")\n\t}\n\t//如果原封面不是默认封面则删除\n\tif oldCover != conf.GetDefaultCover() {\n\t\tos.Remove(\".\" + oldCover)\n\t}\n\tlogs.Info(\"用户[\", c.Member.Account, \"]上传了项目封面 ->\", book.BookName, book.BookId, book.Cover)\n\n\tc.JsonResult(0, \"ok\", url)\n}\n\n// Users 用户列表.\nfunc (c *BookController) Users() {\n\tc.Prepare()\n\tc.TplName = \"book/users.tpl\"\n\n\tkey := c.Ctx.Input.Param(\":key\")\n\tpageIndex, _ := c.GetInt(\"page\", 1)\n\n\tif key == \"\" {\n\t\tc.ShowErrorPage(404, i18n.Tr(c.Lang, \"message.item_not_exist\"))\n\t}\n\n\tbook, err := models.NewBookResult().FindByIdentify(key, c.Member.MemberId)\n\tif err != nil {\n\t\tif err == models.ErrPermissionDenied {\n\t\t\tc.Abort(\"403\")\n\t\t}\n\t\tc.Abort(\"500\")\n\t\treturn\n\t}\n\t//如果不是创始人也不是管理员则不能操作\n\tif book.RoleId != conf.BookFounder && book.RoleId != conf.BookAdmin {\n\t\tc.Abort(\"403\")\n\t}\n\tc.Data[\"Model\"] = *book\n\n\tmembers, totalCount, err := models.NewMemberRelationshipResult().FindForUsersByBookId(c.Lang, book.BookId, pageIndex, conf.PageSize)\n\n\tif totalCount > 0 {\n\t\tpager := pagination.NewPagination(c.Ctx.Request, totalCount, conf.PageSize, c.BaseUrl())\n\t\tc.Data[\"PageHtml\"] = pager.HtmlPages()\n\t} else {\n\t\tc.Data[\"PageHtml\"] = \"\"\n\t}\n\tb, err := json.Marshal(members)\n\n\tif err != nil {\n\t\tc.Data[\"Result\"] = template.JS(\"[]\")\n\t} else {\n\t\tc.Data[\"Result\"] = template.JS(string(b))\n\t}\n}\n\n// Create 创建项目.\nfunc (c *BookController) Create() {\n\n\tif c.Ctx.Input.IsPost() {\n\t\tbookName := strings.TrimSpace(c.GetString(\"book_name\", \"\"))\n\t\tidentify := strings.TrimSpace(c.GetString(\"identify\", \"\"))\n\t\tdescription := strings.TrimSpace(c.GetString(\"description\", \"\"))\n\t\tprivatelyOwned, _ := strconv.Atoi(c.GetString(\"privately_owned\"))\n\t\tcommentStatus := c.GetString(\"comment_status\")\n\t\teditor := c.GetString(\"editor\")\n\t\titemId, _ := c.GetInt(\"itemId\")\n\n\t\tif c.Member.Role == conf.MemberReaderRole {\n\t\t\tc.JsonResult(6001, i18n.Tr(c.Lang, \"message.no_permission\"))\n\t\t}\n\t\tif bookName == \"\" {\n\t\t\tc.JsonResult(6001, i18n.Tr(c.Lang, \"message.project_name_empty\"))\n\t\t}\n\t\tif identify == \"\" {\n\t\t\tc.JsonResult(6002, i18n.Tr(c.Lang, \"message.project_id_empty\"))\n\t\t}\n\t\tif ok, err := regexp.MatchString(`^[a-z]+[a-zA-Z0-9_\\-]*$`, identify); !ok || err != nil {\n\t\t\tc.JsonResult(6003, i18n.Tr(c.Lang, \"message.project_id_tips\"))\n\t\t}\n\t\tif strings.Count(identify, \"\") > 50 {\n\t\t\tc.JsonResult(6004, i18n.Tr(c.Lang, \"message.project_id_length\"))\n\t\t}\n\t\tif strings.Count(description, \"\") > 500 {\n\t\t\tc.JsonResult(6004, i18n.Tr(c.Lang, \"message.project_desc_tips\"))\n\t\t}\n\t\tif privatelyOwned != 0 && privatelyOwned != 1 {\n\t\t\tprivatelyOwned = 1\n\t\t}\n\t\tif !models.NewItemsets().Exist(itemId) {\n\t\t\tc.JsonResult(6005, i18n.Tr(c.Lang, \"message.project_space_not_exist\"))\n\t\t}\n\t\tif commentStatus != \"open\" && commentStatus != \"closed\" && commentStatus != \"group_only\" && commentStatus != \"registered_only\" {\n\t\t\tcommentStatus = \"closed\"\n\t\t}\n\t\tbook := models.NewBook()\n\t\tbook.Cover = conf.GetDefaultCover()\n\n\t\t//如果客户端上传了项目封面则直接保存\n\t\tif file, moreFile, err := c.GetFile(\"image-file\"); err == nil {\n\t\t\tdefer file.Close()\n\n\t\t\text := filepath.Ext(moreFile.Filename)\n\n\t\t\t//如果上传的是图片\n\t\t\tif strings.EqualFold(ext, \".png\") || strings.EqualFold(ext, \".jpg\") || strings.EqualFold(ext, \".gif\") || strings.EqualFold(ext, \".jpeg\") {\n\n\t\t\t\tfileName := \"cover_\" + strconv.FormatInt(time.Now().UnixNano(), 16)\n\n\t\t\t\tfilePath := filepath.Join(\"uploads\", time.Now().Format(\"200601\"), fileName+ext)\n\n\t\t\t\tpath := filepath.Dir(filePath)\n\n\t\t\t\tos.MkdirAll(path, os.ModePerm)\n\n\t\t\t\tif err := c.SaveToFile(\"image-file\", filePath); err == nil {\n\t\t\t\t\turl := \"/\" + strings.Replace(strings.TrimPrefix(filePath, conf.WorkingDirectory), \"\\\\\", \"/\", -1)\n\n\t\t\t\t\tif strings.HasPrefix(url, \"//\") {\n\t\t\t\t\t\turl = string(url[1:])\n\t\t\t\t\t}\n\t\t\t\t\tbook.Cover = url\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif books, _ := book.FindByField(\"identify\", identify, \"book_id\"); len(books) > 0 {\n\t\t\tc.JsonResult(6006, i18n.Tr(c.Lang, \"message.project_id_existed\"))\n\t\t}\n\n\t\tbook.BookName = bookName\n\t\tbook.Description = description\n\t\tbook.CommentCount = 0\n\t\tbook.PrivatelyOwned = privatelyOwned\n\t\tbook.CommentStatus = commentStatus\n\n\t\tbook.Identify = identify\n\t\tbook.DocCount = 0\n\t\tbook.MemberId = c.Member.MemberId\n\t\tbook.Version = time.Now().Unix()\n\t\tbook.IsEnableShare = 0\n\t\tbook.IsUseFirstDocument = 1\n\t\tbook.IsDownload = 1\n\t\tbook.AutoRelease = 0\n\t\tbook.ItemId = itemId\n\t\tbook.Editor = editor\n\t\tbook.Theme = \"default\"\n\n\t\tif err := book.Insert(c.Lang); err != nil {\n\t\t\tlogs.Error(\"Insert => \", err)\n\t\t\tc.JsonResult(6005, i18n.Tr(c.Lang, \"message.failed\"))\n\t\t}\n\t\tbookResult, err := models.NewBookResult().FindByIdentify(book.Identify, c.Member.MemberId)\n\n\t\tif err != nil {\n\t\t\tlogs.Error(err)\n\t\t}\n\n\t\tlogs.Info(\"用户[\", c.Member.Account, \"]创建了项目 ->\", book)\n\t\tc.JsonResult(0, \"ok\", bookResult)\n\t}\n\tc.JsonResult(6001, \"error\")\n}\n\n// 复制项目\nfunc (c *BookController) Copy() {\n\tif c.Ctx.Input.IsPost() {\n\t\t//检查是否有复制项目的权限\n\t\tif _, err := c.IsPermission(); err != nil {\n\t\t\tc.JsonResult(500, err.Error())\n\t\t}\n\t\tif c.Member.Role == conf.MemberReaderRole {\n\t\t\tc.JsonResult(6001, i18n.Tr(c.Lang, \"message.no_permission\"))\n\t\t}\n\t\tidentify := strings.TrimSpace(c.GetString(\"identify\", \"\"))\n\t\tif identify == \"\" {\n\t\t\tc.JsonResult(6001, i18n.Tr(c.Lang, \"message.param_error\"))\n\t\t}\n\t\tbook := models.NewBook()\n\t\terr := book.Copy(identify)\n\t\tif err != nil {\n\t\t\tc.JsonResult(6002, \"复制项目出错\")\n\t\t} else {\n\t\t\tbookResult, err := models.NewBookResult().FindByIdentify(book.Identify, c.Member.MemberId)\n\t\t\tif err != nil {\n\t\t\t\tlogs.Error(\"查询失败\")\n\t\t\t}\n\t\t\tc.JsonResult(0, \"ok\", bookResult)\n\t\t}\n\t}\n}\n\n// 导入zip压缩包或docx\nfunc (c *BookController) Import() {\n\tif c.Member.Role == conf.MemberReaderRole {\n\t\tc.JsonResult(6001, i18n.Tr(c.Lang, \"message.no_permission\"))\n\t}\n\tfile, moreFile, err := c.GetFile(\"import-file\")\n\tif err == http.ErrMissingFile {\n\t\tc.JsonResult(6003, \"没有发现需要上传的文件\")\n\t}\n\n\tdefer file.Close()\n\n\tbookName := strings.TrimSpace(c.GetString(\"book_name\"))\n\tidentify := strings.TrimSpace(c.GetString(\"identify\"))\n\tdescription := strings.TrimSpace(c.GetString(\"description\", \"\"))\n\tprivatelyOwned, _ := strconv.Atoi(c.GetString(\"privately_owned\"))\n\titemId, _ := c.GetInt(\"itemId\")\n\n\tif bookName == \"\" {\n\t\tc.JsonResult(6001, i18n.Tr(c.Lang, \"message.project_name_empty\"))\n\t}\n\tif len([]rune(bookName)) > 500 {\n\t\tc.JsonResult(6002, \"项目名称不能大于500字\")\n\t}\n\tif identify == \"\" {\n\t\tc.JsonResult(6002, i18n.Tr(c.Lang, \"message.project_id_empty\"))\n\t}\n\tif ok, err := regexp.MatchString(`^[a-z]+[a-zA-Z0-9_\\-]*$`, identify); !ok || err != nil {\n\t\tc.JsonResult(6003, i18n.Tr(c.Lang, \"message.project_id_tips\"))\n\t}\n\tif !models.NewItemsets().Exist(itemId) {\n\t\tc.JsonResult(6007, i18n.Tr(c.Lang, \"message.project_space_not_exist\"))\n\t}\n\tif strings.Count(identify, \"\") > 50 {\n\t\tc.JsonResult(6004, i18n.Tr(c.Lang, \"message.project_id_length\"))\n\t}\n\n\text := filepath.Ext(moreFile.Filename)\n\n\tif !strings.EqualFold(ext, \".zip\") && !strings.EqualFold(ext, \".docx\") {\n\t\tc.JsonResult(6004, \"不支持的文件类型\")\n\t}\n\n\tif books, _ := models.NewBook().FindByField(\"identify\", identify, \"book_id\"); len(books) > 0 {\n\t\tc.JsonResult(6006, i18n.Tr(c.Lang, \"message.project_id_existed\"))\n\t}\n\n\ttempPath := filepath.Join(os.TempDir(), c.CruSession.SessionID(context.TODO()))\n\n\tos.MkdirAll(tempPath, 0766)\n\n\ttempPath = filepath.Join(tempPath, moreFile.Filename)\n\n\terr = c.SaveToFile(\"import-file\", tempPath)\n\tif err != nil {\n\t\tc.JsonResult(6004, i18n.Tr(c.Lang, \"message.upload_failed\"))\n\t}\n\n\tbook := models.NewBook()\n\n\tbook.MemberId = c.Member.MemberId\n\tbook.Cover = conf.GetDefaultCover()\n\tbook.BookName = bookName\n\tbook.Description = description\n\tbook.CommentCount = 0\n\tbook.PrivatelyOwned = privatelyOwned\n\tbook.CommentStatus = \"closed\"\n\tbook.Identify = identify\n\tbook.DocCount = 0\n\tbook.MemberId = c.Member.MemberId\n\tbook.Version = time.Now().Unix()\n\tbook.ItemId = itemId\n\n\tbook.Editor = \"markdown\"\n\tbook.Theme = \"default\"\n\n\tif strings.EqualFold(ext, \".zip\") {\n\t\tgo book.ImportBook(tempPath, c.Lang)\n\t} else if strings.EqualFold(ext, \".docx\") {\n\t\tgo book.ImportWordBook(tempPath, c.Lang)\n\t}\n\n\tlogs.Info(\"用户[\", c.Member.Account, \"]导入了项目 ->\", book)\n\n\tc.JsonResult(0, \"项目正在后台转换中，请稍后查看\")\n}\n\n// CreateToken 创建访问来令牌.\n//func (c *BookController) CreateToken() {\n//\n//\taction := c.GetString(\"action\")\n//\n//\tbookResult, err := c.IsPermission()\n//\n//\tif err != nil {\n//\t\tif err == models.ErrPermissionDenied {\n//\t\t\tc.JsonResult(403, i18n.Tr(c.Lang, \"message.no_permission\"))\n//\t\t}\n//\t\tif err == orm.ErrNoRows {\n//\t\t\tc.JsonResult(404, i18n.Tr(c.Lang, \"message.item_not_exist\"))\n//\t\t}\n//\t\tlogs.Error(\"生成阅读令牌失败 =>\", err)\n//\t\tc.JsonResult(6002, err.Error())\n//\t}\n//\tbook := models.NewBook()\n//\n//\tif _, err := book.Find(bookResult.BookId); err != nil {\n//\t\tc.JsonResult(6001, i18n.Tr(c.Lang, \"message.item_not_exist\"))\n//\t}\n//\tif action == \"create\" {\n//\t\tif bookResult.PrivatelyOwned == 0 {\n//\t\t\tc.JsonResult(6001, \"公开项目不能创建阅读令牌\")\n//\t\t}\n//\n//\t\tbook.PrivateToken = string(utils.Krand(conf.GetTokenSize(), utils.KC_RAND_KIND_ALL))\n//\t\tif err := book.Update(); err != nil {\n//\t\t\tlogs.Error(\"生成阅读令牌失败 => \", err)\n//\t\t\tc.JsonResult(6003, \"生成阅读令牌失败\")\n//\t\t}\n//\t\tlogs.Info(\"用户[\", c.Member.Account, \"]创建项目令牌 ->\", book.PrivateToken)\n//\t\tc.JsonResult(0, \"ok\", conf.URLFor(\"DocumentController.Index\", \":key\", book.Identify, \"token\", book.PrivateToken))\n//\t} else {\n//\t\tbook.PrivateToken = \"\"\n//\t\tif err := book.Update(); err != nil {\n//\t\t\tlogs.Error(\"CreateToken => \", err)\n//\t\t\tc.JsonResult(6004, \"删除令牌失败\")\n//\t\t}\n//\t\tlogs.Info(\"用户[\", c.Member.Account, \"]创建项目令牌 ->\", book.PrivateToken)\n//\t\tc.JsonResult(0, \"ok\", \"\")\n//\t}\n//}\n\n// Delete 删除项目.\nfunc (c *BookController) Delete() {\n\tc.Prepare()\n\n\tbookResult, err := c.IsPermission()\n\n\tif err != nil {\n\t\tc.JsonResult(6001, err.Error())\n\t\treturn\n\t}\n\n\tif bookResult.RoleId != conf.BookFounder {\n\t\tc.JsonResult(6002, \"只有创始人才能删除项目\")\n\t}\n\terr = models.NewBook().ThoroughDeleteBook(bookResult.BookId)\n\n\tif err == orm.ErrNoRows {\n\t\tc.JsonResult(6002, i18n.Tr(c.Lang, \"message.item_not_exist\"))\n\t}\n\tif err != nil {\n\t\tlogs.Error(\"删除项目 => \", err)\n\t\tc.JsonResult(6003, \"删除失败\")\n\t}\n\tlogs.Info(\"用户[\", c.Member.Account, \"]删除了项目 ->\", bookResult)\n\tc.JsonResult(0, \"ok\")\n}\n\n// 发布项目.\nfunc (c *BookController) Release() {\n\tc.Prepare()\n\n\tidentify := c.GetString(\"identify\")\n\n\tbookId := 0\n\n\tif c.Member.IsAdministrator() {\n\t\tbook, err := models.NewBook().FindByFieldFirst(\"identify\", identify)\n\t\tif err != nil {\n\t\t\tlogs.Error(\"发布文档失败 ->\", err)\n\t\t\tc.JsonResult(6003, \"文档不存在\")\n\t\t\treturn\n\t\t}\n\t\tbookId = book.BookId\n\t} else {\n\t\tbook, err := models.NewBookResult().FindByIdentify(identify, c.Member.MemberId)\n\n\t\tif err != nil {\n\t\t\tif err == models.ErrPermissionDenied {\n\t\t\t\tc.JsonResult(6001, i18n.Tr(c.Lang, \"message.no_permission\"))\n\t\t\t}\n\t\t\tif err == orm.ErrNoRows {\n\t\t\t\tc.JsonResult(6002, i18n.Tr(c.Lang, \"message.item_not_exist\"))\n\t\t\t}\n\t\t\tlogs.Error(err)\n\t\t\tc.JsonResult(6003, i18n.Tr(c.Lang, \"message.unknown_exception\"))\n\t\t}\n\t\tif book.RoleId != conf.BookAdmin && book.RoleId != conf.BookFounder && book.RoleId != conf.BookEditor {\n\t\t\tc.JsonResult(6003, i18n.Tr(c.Lang, \"message.no_permission\"))\n\t\t}\n\t\tbookId = book.BookId\n\t}\n\tgo models.NewBook().ReleaseContent(bookId, c.Lang)\n\n\tc.JsonResult(0, i18n.Tr(c.Lang, \"message.publish_to_queue\"))\n}\n\n// 更新项目排序\nfunc (c *BookController) UpdateBookOrder() {\n\tif !c.Member.IsAdministrator() {\n\t\tc.JsonResult(403, \"权限不足\")\n\t\treturn\n\t}\n\ttype Params struct {\n\t\tIds string `form:\"ids\"`\n\t}\n\tvar params Params\n\tif err := c.ParseForm(&params); err != nil {\n\t\tc.JsonResult(6003, \"参数错误\")\n\t\treturn\n\t}\n\tidArray := strings.Split(params.Ids, \",\")\n\torderCount := len(idArray)\n\tfor _, id := range idArray {\n\t\tbookId, _ := strconv.Atoi(id)\n\t\torderCount--\n\t\tbook, err := models.NewBook().Find(bookId)\n\t\tif err != nil {\n\t\t\tcontinue\n\t\t}\n\t\tbook.BookId = bookId\n\t\tbook.OrderIndex = orderCount\n\t\terr = book.Update()\n\t\tif err != nil {\n\t\t\tcontinue\n\t\t}\n\t}\n\tc.JsonResult(0, \"ok\")\n}\n\n// 文档排序.\nfunc (c *BookController) SaveSort() {\n\tc.Prepare()\n\n\tidentify := c.Ctx.Input.Param(\":key\")\n\tif identify == \"\" {\n\t\tc.Abort(\"404\")\n\t}\n\n\tbookId := 0\n\tif c.Member.IsAdministrator() {\n\t\tbook, err := models.NewBook().FindByFieldFirst(\"identify\", identify)\n\t\tif err != nil || book == nil {\n\t\t\tc.JsonResult(6001, i18n.Tr(c.Lang, \"message.item_not_exist\"))\n\t\t\treturn\n\t\t}\n\t\tbookId = book.BookId\n\t} else {\n\t\tbookResult, err := models.NewBookResult().FindByIdentify(identify, c.Member.MemberId)\n\t\tif err != nil {\n\t\t\tlogs.Error(\"DocumentController.Edit => \", err)\n\n\t\t\tc.Abort(\"403\")\n\t\t}\n\t\tif bookResult.RoleId == conf.BookObserver {\n\t\t\tc.JsonResult(6002, i18n.Tr(c.Lang, \"message.item_not_exist_or_no_permit\"))\n\t\t}\n\t\tbookId = bookResult.BookId\n\t}\n\n\tcontent := c.Ctx.Input.RequestBody\n\n\tvar docs []map[string]interface{}\n\n\terr := json.Unmarshal(content, &docs)\n\n\tif err != nil {\n\t\tlogs.Error(err)\n\t\tc.JsonResult(6003, \"数据错误\")\n\t}\n\n\tfor _, item := range docs {\n\t\tif docId, ok := item[\"id\"].(float64); ok {\n\t\t\tdoc, err := models.NewDocument().Find(int(docId))\n\t\t\tif err != nil {\n\t\t\t\tlogs.Error(err)\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tif doc.BookId != bookId {\n\t\t\t\tlogs.Info(\"%s\", i18n.Tr(c.Lang, \"message.no_permission\"))\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tsort, ok := item[\"sort\"].(float64)\n\t\t\tif !ok {\n\t\t\t\tlogs.Info(\"排序数字转换失败 => \", item)\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tparentId, ok := item[\"parent\"].(float64)\n\t\t\tif !ok {\n\t\t\t\tlogs.Info(\"父分类转换失败 => \", item)\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tif parentId > 0 {\n\t\t\t\tif parent, err := models.NewDocument().Find(int(parentId)); err != nil || parent.BookId != bookId {\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\t\t\t}\n\t\t\tdoc.OrderSort = int(sort)\n\t\t\tdoc.ParentId = int(parentId)\n\t\t\tif err := doc.InsertOrUpdate(); err != nil {\n\t\t\t\tfmt.Printf(\"%s\", err.Error())\n\t\t\t\tlogs.Error(err)\n\t\t\t}\n\t\t} else {\n\t\t\tfmt.Printf(\"文档ID转换失败 => %+v\", item)\n\t\t}\n\n\t}\n\tc.JsonResult(0, \"ok\")\n}\n\nfunc (c *BookController) Team() {\n\tc.Prepare()\n\tc.TplName = \"book/team.tpl\"\n\n\tkey := c.Ctx.Input.Param(\":key\")\n\tpageIndex, _ := c.GetInt(\"page\", 1)\n\n\tif key == \"\" {\n\t\tc.ShowErrorPage(404, i18n.Tr(c.Lang, \"message.item_not_exist\"))\n\t}\n\n\tbook, err := models.NewBookResult().FindByIdentify(key, c.Member.MemberId)\n\tif err != nil || book == nil {\n\t\tif err == models.ErrPermissionDenied {\n\t\t\tc.ShowErrorPage(403, i18n.Tr(c.Lang, \"message.no_permission\"))\n\t\t}\n\t\tc.ShowErrorPage(500, i18n.Tr(c.Lang, \"message.system_error\"))\n\t\treturn\n\t}\n\t//如果不是创始人也不是管理员则不能操作\n\tif book.RoleId != conf.BookFounder && book.RoleId != conf.BookAdmin {\n\t\tc.Abort(\"403\")\n\t}\n\tc.Data[\"Model\"] = book\n\n\tmembers, totalCount, err := models.NewTeamRelationship().FindByBookToPager(book.BookId, pageIndex, conf.PageSize)\n\n\tif totalCount > 0 {\n\t\tpager := pagination.NewPagination(c.Ctx.Request, totalCount, conf.PageSize, c.BaseUrl())\n\t\tc.Data[\"PageHtml\"] = pager.HtmlPages()\n\t} else {\n\t\tc.Data[\"PageHtml\"] = \"\"\n\t}\n\tb, err := json.Marshal(members)\n\n\tif err != nil {\n\t\tc.Data[\"Result\"] = template.JS(\"[]\")\n\t} else {\n\t\tc.Data[\"Result\"] = template.JS(string(b))\n\t}\n}\n\nfunc (c *BookController) TeamAdd() {\n\tc.Prepare()\n\n\tteamId, _ := c.GetInt(\"teamId\")\n\n\tbook, err := c.IsPermission()\n\n\tif err != nil {\n\t\tc.JsonResult(500, err.Error())\n\t\treturn\n\t}\n\t//如果不是创始人也不是管理员则不能操作\n\tif book.RoleId != conf.BookFounder && book.RoleId != conf.BookAdmin {\n\t\tc.Abort(\"403\")\n\t}\n\t_, err = models.NewTeam().First(teamId, \"team_id\")\n\tif err != nil {\n\t\tif err == orm.ErrNoRows {\n\t\t\tc.JsonResult(500, \"团队不存在\")\n\t\t}\n\t\tc.JsonResult(5002, err.Error())\n\t}\n\tif _, err := models.NewTeamRelationship().FindByBookId(book.BookId, teamId); err == nil {\n\t\tc.JsonResult(5003, \"团队已加入当前项目\")\n\t}\n\tteamRel := models.NewTeamRelationship()\n\tteamRel.BookId = book.BookId\n\tteamRel.TeamId = teamId\n\terr = teamRel.Save()\n\tif err != nil {\n\t\tc.JsonResult(5004, \"加入项目失败\")\n\t\treturn\n\t}\n\tteamRel.Include()\n\n\tc.JsonResult(0, \"OK\", teamRel)\n}\n\n// 删除项目的团队.\nfunc (c *BookController) TeamDelete() {\n\tc.Prepare()\n\n\tteamId, _ := c.GetInt(\"teamId\")\n\n\tif teamId <= 0 {\n\t\tc.JsonResult(5001, i18n.Tr(c.Lang, \"message.param_error\"))\n\t}\n\tbook, err := c.IsPermission()\n\n\tif err != nil {\n\t\tc.JsonResult(5002, err.Error())\n\t\treturn\n\t}\n\t//如果不是创始人也不是管理员则不能操作\n\tif book.RoleId != conf.BookFounder && book.RoleId != conf.BookAdmin {\n\t\tc.Abort(\"403\")\n\t}\n\n\terr = models.NewTeamRelationship().DeleteByBookId(book.BookId, teamId)\n\n\tif err != nil {\n\t\tif err == orm.ErrNoRows {\n\t\t\tc.JsonResult(5003, \"团队未加入项目\")\n\t\t}\n\t\tc.JsonResult(5004, err.Error())\n\t}\n\tc.JsonResult(0, \"OK\")\n}\n\n// 团队搜索.\nfunc (c *BookController) TeamSearch() {\n\tc.Prepare()\n\n\tkeyword := strings.TrimSpace(c.GetString(\"q\"))\n\n\tbook, err := c.IsPermission()\n\n\tif err != nil {\n\t\tc.JsonResult(500, err.Error())\n\t}\n\tkeyword = sqltil.EscapeLike(keyword)\n\tsearchResult, err := models.NewTeamRelationship().FindNotJoinBookByBookIdentify(book.BookId, keyword, 10)\n\n\tif err != nil {\n\t\tc.JsonResult(500, err.Error(), searchResult)\n\t}\n\tc.JsonResult(0, \"OK\", searchResult)\n\n}\n\n// 项目空间搜索.\nfunc (c *BookController) ItemsetsSearch() {\n\tc.Prepare()\n\n\tkeyword := strings.TrimSpace(c.GetString(\"q\"))\n\tkeyword = sqltil.EscapeLike(keyword)\n\n\tsearchResult, err := models.NewItemsets().FindItemsetsByName(keyword, 10)\n\n\tif err != nil {\n\t\tc.JsonResult(500, err.Error(), searchResult)\n\t}\n\tc.JsonResult(0, \"OK\", searchResult)\n\n}\n\nfunc (c *BookController) IsPermission() (*models.BookResult, error) {\n\tidentify := c.GetString(\"identify\")\n\n\tif identify == \"\" {\n\t\treturn nil, errors.New(i18n.Tr(c.Lang, \"message.param_error\"))\n\t}\n\n\tbook, err := models.NewBookResult().FindByIdentify(identify, c.Member.MemberId)\n\n\tif err != nil {\n\t\tif err == models.ErrPermissionDenied {\n\t\t\treturn book, errors.New(i18n.Tr(c.Lang, \"message.no_permission\"))\n\t\t}\n\t\tif err == orm.ErrNoRows {\n\t\t\treturn book, errors.New(i18n.Tr(c.Lang, \"message.item_not_exist\"))\n\t\t}\n\t\treturn book, err\n\t}\n\tif book.RoleId != conf.BookAdmin && book.RoleId != conf.BookFounder {\n\t\treturn book, errors.New(i18n.Tr(c.Lang, \"message.no_permission\"))\n\t}\n\treturn book, nil\n}\n"
  },
  {
    "path": "controllers/BookMemberController.go",
    "content": "package controllers\n\nimport (\n\t\"errors\"\n\n\t\"github.com/beego/beego/v2/client/orm\"\n\t\"github.com/beego/beego/v2/core/logs\"\n\t\"github.com/beego/i18n\"\n\t\"github.com/mindoc-org/mindoc/conf\"\n\t\"github.com/mindoc-org/mindoc/models\"\n)\n\ntype BookMemberController struct {\n\tBaseController\n}\n\n// AddMember 参加参与用户.\nfunc (c *BookMemberController) AddMember() {\n\tidentify := c.GetString(\"identify\")\n\taccount, _ := c.GetInt(\"account\")\n\troleId, _ := c.GetInt(\"role_id\", 3)\n\tlogs.Info(account)\n\tif identify == \"\" || account <= 0 {\n\t\tc.JsonResult(6001, i18n.Tr(c.Lang, \"message.param_error\"))\n\t}\n\tbook, err := c.IsPermission()\n\n\tif err != nil {\n\t\tc.JsonResult(6001, err.Error())\n\t}\n\n\tmember := models.NewMember()\n\n\tif _, err := member.Find(account); err != nil {\n\t\tc.JsonResult(404, i18n.Tr(c.Lang, \"message.user_not_existed\"))\n\t}\n\tif member.Status == 1 {\n\t\tc.JsonResult(6003, i18n.Tr(c.Lang, \"message.user_disable\"))\n\t}\n\n\tif _, err := models.NewRelationship().FindForRoleId(book.BookId, member.MemberId); err == nil {\n\t\tc.JsonResult(6003, i18n.Tr(c.Lang, \"message.user_exist_in_proj\"))\n\t}\n\t//如果是只读用户，只能设置为观察者\n\tif member.Role == conf.MemberReaderRole && roleId != int(conf.BookObserver) {\n\t\tc.JsonResult(6003, i18n.Tr(c.Lang, \"message.readusr_only_observer\"))\n\t}\n\n\trelationship := models.NewRelationship()\n\trelationship.BookId = book.BookId\n\trelationship.MemberId = member.MemberId\n\trelationship.RoleId = conf.BookRole(roleId)\n\n\tif err := relationship.Insert(); err == nil {\n\t\tmemberRelationshipResult := models.NewMemberRelationshipResult().FromMember(member)\n\t\tmemberRelationshipResult.RoleId = conf.BookRole(roleId)\n\t\tmemberRelationshipResult.RelationshipId = relationship.RelationshipId\n\t\tmemberRelationshipResult.BookId = book.BookId\n\t\tmemberRelationshipResult.ResolveRoleName(c.Lang)\n\n\t\tc.JsonResult(0, \"ok\", memberRelationshipResult)\n\t}\n\tc.JsonResult(500, err.Error())\n}\n\n// 变更指定用户在指定项目中的权限\nfunc (c *BookMemberController) ChangeRole() {\n\tidentify := c.GetString(\"identify\")\n\tmemberId, _ := c.GetInt(\"member_id\", 0)\n\trole, _ := c.GetInt(\"role_id\", 0)\n\n\tif identify == \"\" || memberId <= 0 {\n\t\tc.JsonResult(6001, i18n.Tr(c.Lang, \"message.param_error\"))\n\t}\n\tif memberId == c.Member.MemberId {\n\t\tc.JsonResult(6006, i18n.Tr(c.Lang, \"message.cannot_change_own_priv\"))\n\t}\n\tbook, err := models.NewBookResult().FindByIdentify(identify, c.Member.MemberId)\n\n\tif err != nil {\n\t\tif err == models.ErrPermissionDenied {\n\t\t\tc.JsonResult(403, i18n.Tr(c.Lang, \"message.no_permission\"))\n\t\t}\n\t\tif err == orm.ErrNoRows {\n\t\t\tc.JsonResult(404, i18n.Tr(c.Lang, \"message.item_not_exist\"))\n\t\t}\n\t\tc.JsonResult(6002, err.Error())\n\t}\n\tif book.RoleId != 0 && book.RoleId != 1 {\n\t\tc.JsonResult(403, i18n.Tr(c.Lang, \"message.no_permission\"))\n\t}\n\n\tmember := models.NewMember()\n\n\tif _, err := member.Find(memberId); err != nil {\n\t\tc.JsonResult(6003, i18n.Tr(c.Lang, \"message.user_not_existed\"))\n\t}\n\tif member.Status == 1 {\n\t\tc.JsonResult(6004, i18n.Tr(c.Lang, \"message.user_disable\"))\n\t}\n\t//如果是只读用户，只能设置为观察者\n\tif member.Role == conf.MemberReaderRole && role != int(conf.BookObserver) {\n\t\tc.JsonResult(6003, i18n.Tr(c.Lang, \"message.readusr_only_observer\"))\n\t}\n\n\trelationship, err := models.NewRelationship().UpdateRoleId(book.BookId, memberId, conf.BookRole(role))\n\n\tif err != nil {\n\t\tlogs.Error(\"变更用户在项目中的权限 => \", err)\n\t\tc.JsonResult(6005, err.Error())\n\t}\n\n\tmemberRelationshipResult := models.NewMemberRelationshipResult().FromMember(member)\n\tmemberRelationshipResult.RoleId = relationship.RoleId\n\tmemberRelationshipResult.RelationshipId = relationship.RelationshipId\n\tmemberRelationshipResult.BookId = book.BookId\n\tmemberRelationshipResult.ResolveRoleName(c.Lang)\n\n\tc.JsonResult(0, \"ok\", memberRelationshipResult)\n}\n\n// 删除参与者.\nfunc (c *BookMemberController) RemoveMember() {\n\tidentify := c.GetString(\"identify\")\n\tmember_id, _ := c.GetInt(\"member_id\", 0)\n\n\tif identify == \"\" || member_id <= 0 {\n\t\tc.JsonResult(6001, i18n.Tr(c.Lang, \"message.param_error\"))\n\t}\n\tif member_id == c.Member.MemberId {\n\t\tc.JsonResult(6006, i18n.Tr(c.Lang, \"message.cannot_delete_self\"))\n\t}\n\tbook, err := models.NewBookResult().FindByIdentify(identify, c.Member.MemberId)\n\n\tif err != nil {\n\t\tif err == models.ErrPermissionDenied {\n\t\t\tc.JsonResult(403, i18n.Tr(c.Lang, \"message.no_permission\"))\n\t\t}\n\t\tif err == orm.ErrNoRows {\n\t\t\tc.JsonResult(404, i18n.Tr(c.Lang, \"message.item_not_exist\"))\n\t\t}\n\t\tc.JsonResult(6002, err.Error())\n\t}\n\t//如果不是创始人也不是管理员则不能操作\n\tif book.RoleId != conf.BookFounder && book.RoleId != conf.BookAdmin {\n\t\tc.JsonResult(403, i18n.Tr(c.Lang, \"message.no_permission\"))\n\t}\n\terr = models.NewRelationship().DeleteByBookIdAndMemberId(book.BookId, member_id)\n\n\tif err != nil {\n\t\tc.JsonResult(6007, err.Error())\n\t}\n\tc.JsonResult(0, \"ok\")\n}\n\nfunc (c *BookMemberController) IsPermission() (*models.BookResult, error) {\n\tidentify := c.GetString(\"identify\")\n\tbook, err := models.NewBookResult().FindByIdentify(identify, c.Member.MemberId)\n\n\tif err != nil {\n\t\tif err == models.ErrPermissionDenied {\n\t\t\treturn book, errors.New(i18n.Tr(c.Lang, \"message.no_permission\"))\n\t\t}\n\t\tif err == orm.ErrNoRows {\n\t\t\treturn book, errors.New(i18n.Tr(c.Lang, \"message.item_not_exist\"))\n\t\t}\n\t\treturn book, err\n\t}\n\tif book.RoleId != conf.BookAdmin && book.RoleId != conf.BookFounder {\n\t\treturn book, errors.New(i18n.Tr(c.Lang, \"message.no_permission\"))\n\t}\n\treturn book, nil\n}\n"
  },
  {
    "path": "controllers/CommentController.go",
    "content": "package controllers\n\nimport (\n\t\"strings\"\n\t\"time\"\n\n\t\"github.com/mindoc-org/mindoc/conf\"\n\t\"github.com/mindoc-org/mindoc/models\"\n\t\"github.com/mindoc-org/mindoc/utils/pagination\"\n)\n\ntype CommentController struct {\n\tBaseController\n}\n\nfunc (c *CommentController) Lists() {\n\tdocid, _ := c.GetInt(\"docid\", 0)\n\tpageIndex, _ := c.GetInt(\"page\", 1)\n\n\t// 获取评论、分页\n\tcomments, count, pageIndex := models.NewComment().QueryCommentByDocumentId(docid, pageIndex, conf.PageSize, c.Member)\n\tpage := pagination.PageUtil(int(count), pageIndex, conf.PageSize, comments)\n\n\tvar data struct {\n\t\tDocId int             `json:\"doc_id\"`\n\t\tPage  pagination.Page `json:\"page\"`\n\t}\n\tdata.DocId = docid\n\tdata.Page = page\n\n\tc.JsonResult(0, \"ok\", data)\n\treturn\n}\n\nfunc (c *CommentController) Create() {\n\tcontent := c.GetString(\"content\")\n\tid, _ := c.GetInt(\"doc_id\")\n\n\t_, err := models.NewDocument().Find(id)\n\tif err != nil {\n\t\tc.JsonResult(1, \"文章不存在\")\n\t}\n\n\tm := models.NewComment()\n\tm.DocumentId = id\n\tif c.Member == nil {\n\t\tc.JsonResult(1, \"请先登录，再评论\")\n\t}\n\tif len(c.Member.RealName) != 0 {\n\t\tm.Author = c.Member.RealName\n\t} else {\n\t\tm.Author = c.Member.Account\n\t}\n\tm.MemberId = c.Member.MemberId\n\tm.IPAddress = c.Ctx.Request.RemoteAddr\n\tm.IPAddress = strings.Split(m.IPAddress, \":\")[0]\n\tm.CommentDate = time.Now()\n\tm.Content = content\n\tm.Insert()\n\n\tvar data struct {\n\t\tDocId int `json:\"doc_id\"`\n\t}\n\tdata.DocId = id\n\n\tc.JsonResult(0, \"ok\", data)\n}\n\nfunc (c *CommentController) Index() {\n\tc.Prepare()\n\tc.TplName = \"comment/index.tpl\"\n}\n\nfunc (c *CommentController) Delete() {\n\tif c.Ctx.Input.IsPost() {\n\t\tid, _ := c.GetInt(\"id\", 0)\n\t\tm, err := models.NewComment().Find(id)\n\t\tif err != nil {\n\t\t\tc.JsonResult(1, \"评论不存在\")\n\t\t}\n\n\t\tdoc, err := models.NewDocument().Find(m.DocumentId)\n\t\tif err != nil {\n\t\t\tc.JsonResult(1, \"文章不存在\")\n\t\t}\n\n\t\t// 判断是否有权限删除\n\t\tbookRole, _ := models.NewRelationship().FindForRoleId(doc.BookId, c.Member.MemberId)\n\t\tif m.CanDelete(c.Member.MemberId, bookRole) {\n\t\t\terr := m.Delete()\n\t\t\tif err != nil {\n\t\t\t\tc.JsonResult(1, \"删除错误\")\n\t\t\t} else {\n\t\t\t\tc.JsonResult(0, \"ok\")\n\t\t\t}\n\t\t} else {\n\t\t\tc.JsonResult(1, \"没有权限删除\")\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "controllers/DocumentController.go",
    "content": "package controllers\n\nimport (\n\t\"context\"\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"html/template\"\n\t\"image/png\"\n\t\"io\"\n\t\"mime/multipart\"\n\t\"net/http\"\n\t\"net/url\"\n\t\"os\"\n\t\"path/filepath\"\n\t\"regexp\"\n\t\"strconv\"\n\t\"strings\"\n\t\"time\"\n\n\t\"github.com/beego/beego/v2/client/orm\"\n\t\"github.com/beego/beego/v2/core/logs\"\n\t\"github.com/beego/beego/v2/server/web\"\n\t\"github.com/beego/i18n\"\n\t\"github.com/boombuler/barcode\"\n\t\"github.com/boombuler/barcode/qr\"\n\t\"github.com/mindoc-org/mindoc/conf\"\n\t\"github.com/mindoc-org/mindoc/models\"\n\t\"github.com/mindoc-org/mindoc/utils\"\n\t\"github.com/mindoc-org/mindoc/utils/cryptil\"\n\t\"github.com/mindoc-org/mindoc/utils/filetil\"\n\t\"github.com/mindoc-org/mindoc/utils/gopool\"\n\t\"github.com/mindoc-org/mindoc/utils/pagination\"\n\t\"github.com/russross/blackfriday/v2\"\n)\n\n// DocumentController struct\ntype DocumentController struct {\n\tBaseController\n}\n\n// Document prev&next\ntype DocumentTreeFlatten struct {\n\tDocumentId   int    `json:\"id\"`\n\tDocumentName string `json:\"text\"`\n\t// ParentId     interface{} `json:\"parent\"`\n\tIdentify string `json:\"identify\"`\n\t// BookIdentify string      `json:\"-\"`\n\t// Version      int64       `json:\"version\"`\n}\n\n// 文档首页\nfunc (c *DocumentController) Index() {\n\tc.Prepare()\n\n\tidentify := c.Ctx.Input.Param(\":key\")\n\ttoken := c.GetString(\"token\")\n\n\tif identify == \"\" {\n\t\tc.ShowErrorPage(404, i18n.Tr(c.Lang, \"message.item_not_exist\"))\n\t}\n\n\t// 如果没有开启匿名访问则跳转到登录\n\tif !c.EnableAnonymous && !c.isUserLoggedIn() {\n\t\tpromptUserToLogIn(c)\n\t\treturn\n\t}\n\n\tbookResult := c.isReadable(identify, token)\n\n\tc.TplName = \"document/\" + bookResult.Theme + \"_read.tpl\"\n\n\tselected := 0\n\n\tif bookResult.IsUseFirstDocument {\n\t\tdoc, err := bookResult.FindFirstDocumentByBookId(bookResult.BookId)\n\t\tif err == nil {\n\t\t\tselected = doc.DocumentId\n\t\t\tc.Data[\"Title\"] = doc.DocumentName\n\t\t\tc.Data[\"Content\"] = template.HTML(doc.Release)\n\t\t\tc.Data[\"Description\"] = utils.AutoSummary(doc.Release, 120)\n\t\t\tc.Data[\"FoldSetting\"] = \"first\"\n\n\t\t\tif bookResult.Editor == EditorCherryMarkdown {\n\t\t\t\tc.Data[\"MarkdownTheme\"] = doc.MarkdownTheme\n\t\t\t}\n\n\t\t\tif bookResult.IsDisplayComment {\n\t\t\t\t// 获取评论、分页\n\t\t\t\tcomments, count, _ := models.NewComment().QueryCommentByDocumentId(doc.DocumentId, 1, conf.PageSize, c.Member)\n\t\t\t\tpage := pagination.PageUtil(int(count), 1, conf.PageSize, comments)\n\t\t\t\tc.Data[\"Page\"] = page\n\t\t\t}\n\t\t}\n\t} else {\n\t\tc.Data[\"Title\"] = i18n.Tr(c.Lang, \"blog.summary\")\n\t\tc.Data[\"Content\"] = template.HTML(blackfriday.Run([]byte(bookResult.Description)))\n\t\tc.Data[\"FoldSetting\"] = \"closed\"\n\t}\n\n\ttree, err := models.NewDocument().CreateDocumentTreeForHtml(bookResult.BookId, selected)\n\n\tif err != nil {\n\t\tif err == orm.ErrNoRows {\n\t\t\tc.ShowErrorPage(404, i18n.Tr(c.Lang, \"message.no_doc_in_cur_proj\"))\n\t\t} else {\n\t\t\tlogs.Error(\"生成项目文档树时出错 -> \", err)\n\t\t\tc.ShowErrorPage(500, i18n.Tr(c.Lang, \"message.build_doc_tree_error\"))\n\t\t}\n\t}\n\tc.Data[\"IS_DOCUMENT_INDEX\"] = true\n\tc.Data[\"Model\"] = bookResult\n\tc.Data[\"Result\"] = template.HTML(tree)\n}\n\n// CheckPassword : Handles password verification for private documents,\n// and front-end requests are made through Ajax.\nfunc (c *DocumentController) CheckPassword() {\n\tidentify := c.Ctx.Input.Param(\":key\")\n\tpassword := c.GetString(\"bPassword\")\n\n\tif identify == \"\" || password == \"\" {\n\t\tc.JsonResult(http.StatusBadRequest, i18n.Tr(c.Lang, \"message.param_error\"))\n\t}\n\n\t// You have not logged in and need to log in again.\n\tif !c.EnableAnonymous && !c.isUserLoggedIn() {\n\t\tlogs.Info(\"You have not logged in and need to log in again(SessionId: %s).\",\n\t\t\tc.CruSession.SessionID(context.TODO()))\n\t\tc.JsonResult(6000, i18n.Tr(c.Lang, \"message.need_relogin\"))\n\t\treturn\n\t}\n\n\tbook, err := models.NewBook().FindByFieldFirst(\"identify\", identify)\n\n\tif err != nil {\n\t\tlogs.Error(err)\n\t\tc.JsonResult(500, i18n.Tr(c.Lang, \"message.item_not_exist\"))\n\t}\n\n\tif book.BookPassword != password {\n\t\tc.JsonResult(5001, i18n.Tr(c.Lang, \"message.wrong_password\"))\n\t} else {\n\t\tc.SetSession(identify, password)\n\t\tc.JsonResult(0, \"OK\")\n\t}\n}\n\n// 阅读文档\nfunc (c *DocumentController) Read() {\n\tidentify := c.Ctx.Input.Param(\":key\")\n\ttoken := c.GetString(\"token\")\n\tid := c.GetString(\":id\")\n\n\tif identify == \"\" || id == \"\" {\n\t\tc.ShowErrorPage(404, i18n.Tr(c.Lang, \"message.item_not_exist\"))\n\t}\n\n\t// 如果没有开启匿名访问则跳转到登录\n\tif !c.EnableAnonymous && !c.isUserLoggedIn() {\n\t\tpromptUserToLogIn(c)\n\t\treturn\n\t}\n\n\tbookResult := c.isReadable(identify, token)\n\n\tc.TplName = fmt.Sprintf(\"document/%s_read.tpl\", bookResult.Theme)\n\n\tdoc := models.NewDocument()\n\tif docId, err := strconv.Atoi(id); err == nil {\n\t\tdoc, err = doc.FromCacheById(docId)\n\t\tif err != nil || doc == nil {\n\t\t\tlogs.Error(\"从缓存中读取文档时失败 ->\", err)\n\t\t\tc.ShowErrorPage(404, i18n.Tr(c.Lang, \"message.doc_not_exist\"))\n\t\t\treturn\n\t\t}\n\t} else {\n\t\tdoc, err = doc.FromCacheByIdentify(id, bookResult.BookId)\n\t\tif err != nil || doc == nil {\n\t\t\tif err == orm.ErrNoRows {\n\t\t\t\tc.ShowErrorPage(404, i18n.Tr(c.Lang, \"message.doc_not_exist\"))\n\t\t\t} else {\n\t\t\t\tlogs.Error(\"从数据库查询文档时出错 ->\", err)\n\t\t\t\tc.ShowErrorPage(500, i18n.Tr(c.Lang, \"message.unknown_exception\"))\n\t\t\t}\n\t\t\treturn\n\t\t}\n\t}\n\n\tif doc.BookId != bookResult.BookId {\n\t\tc.ShowErrorPage(404, i18n.Tr(c.Lang, \"message.doc_not_exist\"))\n\t}\n\tdoc.Lang = c.Lang\n\tdoc.Processor()\n\n\tattach, err := models.NewAttachment().FindListByDocumentId(doc.DocumentId)\n\tif err == nil {\n\t\tdoc.AttachList = attach\n\t}\n\n\t// prev,next\n\ttreeJson, err := models.NewDocument().FindDocumentTree2(bookResult.BookId)\n\tif err != nil {\n\t\tlogs.Error(\"生成项目文档树时出错 ->\", err)\n\t}\n\n\tres := getTreeRecursive(treeJson, 0)\n\tflat := make([]DocumentTreeFlatten, 0)\n\tFlatten(res, &flat)\n\tvar index int\n\tfor i, v := range flat {\n\t\tif v.Identify == id {\n\t\t\tindex = i\n\t\t}\n\t}\n\tvar PrevName, PrevPath, NextName, NextPath string\n\tif index == 0 {\n\t\tc.Data[\"PrevName\"] = \"\"\n\t\tPrevName = \"\"\n\t} else {\n\t\tc.Data[\"PrevPath\"] = identify + \"/\" + flat[index-1].Identify\n\t\tc.Data[\"PrevName\"] = flat[index-1].DocumentName\n\t\tPrevPath = identify + \"/\" + flat[index-1].Identify\n\t\tPrevName = flat[index-1].DocumentName\n\t}\n\tif index == len(flat)-1 {\n\t\tc.Data[\"NextName\"] = \"\"\n\t\tNextName = \"\"\n\t} else {\n\t\tc.Data[\"NextPath\"] = identify + \"/\" + flat[index+1].Identify\n\t\tc.Data[\"NextName\"] = flat[index+1].DocumentName\n\t\tNextPath = identify + \"/\" + flat[index+1].Identify\n\t\tNextName = flat[index+1].DocumentName\n\t}\n\n\tdoc.IncrViewCount(doc.DocumentId)\n\tdoc.ViewCount = doc.ViewCount + 1\n\tdoc.PutToCache()\n\n\tif c.IsAjax() {\n\t\tvar data struct {\n\t\t\tDocId         int    `json:\"doc_id\"`\n\t\t\tDocIdentify   string `json:\"doc_identify\"`\n\t\t\tDocTitle      string `json:\"doc_title\"`\n\t\t\tBody          string `json:\"body\"`\n\t\t\tTitle         string `json:\"title\"`\n\t\t\tVersion       int64  `json:\"version\"`\n\t\t\tViewCount     int    `json:\"view_count\"`\n\t\t\tMarkdownTheme string `json:\"markdown_theme\"`\n\t\t\tIsMarkdown    bool   `json:\"is_markdown\"`\n\t\t}\n\t\tdata.DocId = doc.DocumentId\n\t\tdata.DocIdentify = doc.Identify\n\t\tdata.DocTitle = doc.DocumentName\n\t\tdata.Body = doc.Release + \"<div class='wiki-bottom-left'>\"+ i18n.Tr(c.Lang, \"doc.prev\") + \"： <a href='/docs/\" + PrevPath + \"' rel='prev'>\" + PrevName + \"</a><br />\" + i18n.Tr(c.Lang, \"doc.next\") + \"： <a href='/docs/\" + NextPath + \"' rel='next'>\" + NextName + \"</a><br /></div>\"\n\t\tdata.Title = doc.DocumentName + \" - Powered by MinDoc\"\n\t\tdata.Version = doc.Version\n\t\tdata.ViewCount = doc.ViewCount\n\t\tdata.MarkdownTheme = doc.MarkdownTheme\n\t\tif bookResult.Editor == EditorCherryMarkdown {\n\t\t\tdata.IsMarkdown = true\n\t\t}\n\t\tc.JsonResult(0, \"ok\", data)\n\t} else {\n\t\tc.Data[\"DocumentId\"] = doc.DocumentId\n\t\tc.Data[\"DocIdentify\"] = doc.Identify\n\t\tif bookResult.IsDisplayComment {\n\t\t\t// 获取评论、分页\n\t\t\tcomments, count, _ := models.NewComment().QueryCommentByDocumentId(doc.DocumentId, 1, conf.PageSize, c.Member)\n\t\t\tpage := pagination.PageUtil(int(count), 1, conf.PageSize, comments)\n\t\t\tc.Data[\"Page\"] = page\n\t\t}\n\t}\n\n\ttree, err := models.NewDocument().CreateDocumentTreeForHtml(bookResult.BookId, doc.DocumentId)\n\n\tif err != nil && err != orm.ErrNoRows {\n\t\tlogs.Error(\"生成项目文档树时出错 ->\", err)\n\t\tc.ShowErrorPage(500, i18n.Tr(c.Lang, \"message.build_doc_tree_error\"))\n\t}\n\n\tc.Data[\"Description\"] = utils.AutoSummary(doc.Release, 120)\n\n\tc.Data[\"Model\"] = bookResult\n\tc.Data[\"Result\"] = template.HTML(tree)\n\tc.Data[\"Title\"] = doc.DocumentName\n\tc.Data[\"Content\"] = template.HTML(doc.Release + \"<div class='wiki-bottom-left'>\"+ i18n.Tr(c.Lang, \"doc.prev\") + \"： <a href='/docs/\" + PrevPath + \"' rel='prev'>\" + PrevName + \"</a><br />\" + i18n.Tr(c.Lang, \"doc.next\") + \"： <a href='/docs/\" + NextPath + \"' rel='next'>\" + NextName + \"</a><br /></div>\")\n\tc.Data[\"ViewCount\"] = doc.ViewCount\n\tc.Data[\"FoldSetting\"] = \"closed\"\n\tif bookResult.Editor == EditorCherryMarkdown {\n\t\tc.Data[\"MarkdownTheme\"] = doc.MarkdownTheme\n\t}\n\tif doc.IsOpen == 1 {\n\t\tc.Data[\"FoldSetting\"] = \"open\"\n\t} else if doc.IsOpen == 2 {\n\t\tc.Data[\"FoldSetting\"] = \"empty\"\n\t}\n}\n\n// 递归得到树状结构体\nfunc getTreeRecursive(list []*models.DocumentTree, parentId int) (res []*models.DocumentTree) {\n\tfor _, v := range list {\n\t\tif v.ParentId == parentId {\n\t\t\tv.Children = getTreeRecursive(list, v.DocumentId)\n\t\t\tres = append(res, v)\n\t\t}\n\t}\n\treturn res\n}\n\n// 递归将树状结构体转换为扁平结构体数组\n// func Flatten(list []*models.DocumentTree, flattened *[]DocumentTreeFlatten) (flatten *[]DocumentTreeFlatten) {\nfunc Flatten(list []*models.DocumentTree, flattened *[]DocumentTreeFlatten) {\n\t// Treeslice := make([]*DocumentTreeFlatten, 0)\n\tfor _, v := range list {\n\t\ttree := make([]DocumentTreeFlatten, 1)\n\t\ttree[0].DocumentId = v.DocumentId\n\t\ttree[0].DocumentName = v.DocumentName\n\t\ttree[0].Identify = v.Identify\n\t\t*flattened = append(*flattened, tree...)\n\t\tif len(v.Children) > 0 {\n\t\t\tFlatten(v.Children, flattened)\n\t\t}\n\t}\n\treturn\n}\n\n// 编辑文档\nfunc (c *DocumentController) Edit() {\n\tc.Prepare()\n\n\tif c.Member.Role == conf.MemberReaderRole {\n\t\tc.JsonResult(6001, i18n.Tr(c.Lang, \"message.no_permission\"))\n\t}\n\n\tidentify := c.Ctx.Input.Param(\":key\")\n\tif identify == \"\" {\n\t\tc.ShowErrorPage(404, i18n.Tr(c.Lang, \"message.project_id_error\"))\n\t}\n\n\tbookResult := models.NewBookResult()\n\n\tvar err error\n\t// 如果是管理者，则不判断权限\n\tif c.Member.IsAdministrator() {\n\t\tbook, err := models.NewBook().FindByFieldFirst(\"identify\", identify)\n\t\tif err != nil {\n\t\t\tc.JsonResult(6002, i18n.Tr(c.Lang, \"message.item_not_exist_or_no_permit\"))\n\t\t}\n\n\t\tbookResult = models.NewBookResult().ToBookResult(*book)\n\t} else {\n\t\tbookResult, err = models.NewBookResult().FindByIdentify(identify, c.Member.MemberId)\n\n\t\tif err != nil {\n\t\t\tif err == orm.ErrNoRows || err == models.ErrPermissionDenied {\n\t\t\t\tc.ShowErrorPage(403, i18n.Tr(c.Lang, \"message.item_not_exist_or_no_permit\"))\n\t\t\t} else {\n\t\t\t\tlogs.Error(\"查询项目时出错 -> \", err)\n\t\t\t\tc.ShowErrorPage(500, i18n.Tr(c.Lang, \"message.system_error\"))\n\t\t\t}\n\t\t\treturn\n\t\t}\n\t\tif bookResult.RoleId == conf.BookObserver {\n\t\t\tc.JsonResult(6002, i18n.Tr(c.Lang, \"message.item_not_exist_or_no_permit\"))\n\t\t}\n\t}\n\n\tc.TplName = fmt.Sprintf(\"document/%s_edit_template.tpl\", bookResult.Editor)\n\n\tc.Data[\"Model\"] = bookResult\n\n\tr, _ := json.Marshal(bookResult)\n\n\tc.Data[\"ModelResult\"] = template.JS(string(r))\n\n\tc.Data[\"Result\"] = template.JS(\"[]\")\n\n\ttrees, err := models.NewDocument().FindDocumentTree(bookResult.BookId)\n\n\tif err != nil {\n\t\tlogs.Error(\"FindDocumentTree => \", err)\n\t} else {\n\t\tif len(trees) > 0 {\n\t\t\tif jtree, err := json.Marshal(trees); err == nil {\n\t\t\t\tc.Data[\"Result\"] = template.JS(string(jtree))\n\t\t\t}\n\t\t} else {\n\t\t\tc.Data[\"Result\"] = template.JS(\"[]\")\n\t\t}\n\t}\n\n\tc.Data[\"BaiDuMapKey\"] = web.AppConfig.DefaultString(\"baidumapkey\", \"\")\n\n\tif conf.GetUploadFileSize() > 0 {\n\t\tc.Data[\"UploadFileSize\"] = conf.GetUploadFileSize()\n\t} else {\n\t\tc.Data[\"UploadFileSize\"] = \"undefined\"\n\t}\n}\n\n// 创建一个文档\nfunc (c *DocumentController) Create() {\n\tidentify := c.GetString(\"identify\")\n\tdocIdentify := c.GetString(\"doc_identify\")\n\tdocName := c.GetString(\"doc_name\")\n\tparentId, _ := c.GetInt(\"parent_id\", 0)\n\tdocId, _ := c.GetInt(\"doc_id\", 0)\n\tisOpen, _ := c.GetInt(\"is_open\", 0)\n\n\tif identify == \"\" {\n\t\tc.JsonResult(6001, i18n.Tr(c.Lang, \"message.param_error\"))\n\t}\n\n\tif docName == \"\" {\n\t\tc.JsonResult(6004, i18n.Tr(c.Lang, \"message.doc_name_empty\"))\n\t}\n\n\tbookId := 0\n\n\t// 如果是超级管理员则不判断权限\n\tif c.Member.IsAdministrator() {\n\t\tbook, err := models.NewBook().FindByFieldFirst(\"identify\", identify)\n\t\tif err != nil {\n\t\t\tlogs.Error(err)\n\t\t\tc.JsonResult(6002, i18n.Tr(c.Lang, \"message.item_not_existed_or_no_permit\"))\n\t\t}\n\n\t\tbookId = book.BookId\n\t} else {\n\t\tbookResult, err := models.NewBookResult().FindByIdentify(identify, c.Member.MemberId)\n\n\t\tif err != nil || bookResult.RoleId == conf.BookObserver {\n\t\t\tlogs.Error(\"FindByIdentify => \", err)\n\t\t\tc.JsonResult(6002, i18n.Tr(c.Lang, \"message.item_not_existed_or_no_permit\"))\n\t\t}\n\n\t\tbookId = bookResult.BookId\n\t}\n\n\tif docIdentify != \"\" {\n\t\tif ok, err := regexp.MatchString(`[a-z]+[a-zA-Z0-9_.\\-]*$`, docIdentify); !ok || err != nil {\n\t\t\tc.JsonResult(6003, i18n.Tr(c.Lang, \"message.project_id_tips\"))\n\t\t}\n\n\t\td, _ := models.NewDocument().FindByIdentityFirst(docIdentify, bookId)\n\t\tif d.DocumentId > 0 && d.DocumentId != docId {\n\t\t\tc.JsonResult(6006, i18n.Tr(c.Lang, \"message.project_id_existed\"))\n\t\t}\n\t}\n\tif parentId > 0 {\n\t\tdoc, err := models.NewDocument().Find(parentId)\n\t\tif err != nil || doc.BookId != bookId {\n\t\t\tc.JsonResult(6003, i18n.Tr(c.Lang, \"message.parent_id_not_existed\"))\n\t\t}\n\t}\n\n\tdocument, _ := models.NewDocument().Find(docId)\n\n\tdocument.MemberId = c.Member.MemberId\n\tdocument.BookId = bookId\n\n\tdocument.Identify = docIdentify\n\n\tdocument.Version = time.Now().Unix()\n\tdocument.DocumentName = docName\n\tdocument.ParentId = parentId\n\n\tif isOpen == 1 {\n\t\tdocument.IsOpen = 1\n\t} else if isOpen == 2 {\n\t\tdocument.IsOpen = 2\n\t} else {\n\t\tdocument.IsOpen = 0\n\t}\n\n\tif err := document.InsertOrUpdate(); err != nil {\n\t\tlogs.Error(\"添加或更新文档时出错 -> \", err)\n\t\tc.JsonResult(6005, i18n.Tr(c.Lang, \"message.failed\"))\n\t} else {\n\t\tc.JsonResult(0, \"ok\", document)\n\t}\n}\n\n// 上传附件或图片\nfunc (c *DocumentController) Upload() {\n\tidentify := c.GetString(\"identify\")\n\tdocId, _ := c.GetInt(\"doc_id\")\n\tisAttach := true\n\n\tif identify == \"\" {\n\t\tc.JsonResult(6001, i18n.Tr(c.Lang, \"message.param_error\"))\n\t}\n\n\tnames := []string{\"editormd-file-file\", \"editormd-image-file\", \"file\", \"editormd-resource-file\"}\n\tvar files []*multipart.FileHeader\n\tfor _, name := range names {\n\t\tfile, err := c.GetFiles(name)\n\t\tif err != nil {\n\t\t\tcontinue\n\t\t}\n\t\tif len(file) > 0 && err == nil {\n\t\t\tfiles = append(files, file...)\n\t\t}\n\t}\n\n\tif len(files) == 0 {\n\t\tc.JsonResult(6003, i18n.Tr(c.Lang, \"message.upload_file_empty\"))\n\t\treturn\n\t}\n\n\tresult2 := []map[string]interface{}{}\n\tvar result map[string]interface{}\n\tfor i, _ := range files {\n\t\t//for each fileheader, get a handle to the actual file\n\t\tfile, err := files[i].Open()\n\n\t\tdefer file.Close()\n\n\t\tif err != nil {\n\t\t\tc.JsonResult(6002, err.Error())\n\t\t}\n\n\t\t// defer file.Close()\n\n\t\ttype Size interface {\n\t\t\tSize() int64\n\t\t}\n\n\t\t// if conf.GetUploadFileSize() > 0 && moreFile.Size > conf.GetUploadFileSize() {\n\t\tif conf.GetUploadFileSize() > 0 && files[i].Size > conf.GetUploadFileSize() {\n\t\t\tc.JsonResult(6009, i18n.Tr(c.Lang, \"message.upload_file_size_limit\"))\n\t\t}\n\n\t\t// ext := filepath.Ext(moreFile.Filename)\n\t\text := filepath.Ext(files[i].Filename)\n\t\t//文件必须带有后缀名\n\t\tif ext == \"\" {\n\t\t\tc.JsonResult(6003, i18n.Tr(c.Lang, \"message.upload_file_type_error\"))\n\t\t}\n\t\t//如果文件类型设置为 * 标识不限制文件类型\n\t\tif conf.IsAllowUploadFileExt(ext) == false {\n\t\t\tc.JsonResult(6004, i18n.Tr(c.Lang, \"message.upload_file_type_error\"))\n\t\t}\n\n\t\tbookId := 0\n\n\t\t// 如果是超级管理员，则不判断权限\n\t\tif c.Member.IsAdministrator() {\n\t\t\tbook, err := models.NewBook().FindByFieldFirst(\"identify\", identify)\n\n\t\t\tif err != nil {\n\t\t\t\tc.JsonResult(6006, i18n.Tr(c.Lang, \"message.doc_not_exist_or_no_permit\"))\n\t\t\t}\n\n\t\t\tbookId = book.BookId\n\t\t} else {\n\t\t\tbook, err := models.NewBookResult().FindByIdentify(identify, c.Member.MemberId)\n\n\t\t\tif err != nil {\n\t\t\t\tlogs.Error(\"DocumentController.Edit => \", err)\n\t\t\t\tif err == orm.ErrNoRows {\n\t\t\t\t\tc.JsonResult(6006, i18n.Tr(c.Lang, \"message.no_permission\"))\n\t\t\t\t}\n\n\t\t\t\tc.JsonResult(6001, err.Error())\n\t\t\t}\n\n\t\t\t// 如果没有编辑权限\n\t\t\tif book.RoleId != conf.BookEditor && book.RoleId != conf.BookAdmin && book.RoleId != conf.BookFounder {\n\t\t\t\tc.JsonResult(6006, i18n.Tr(c.Lang, \"message.no_permission\"))\n\t\t\t}\n\n\t\t\tbookId = book.BookId\n\t\t}\n\n\t\tif docId > 0 {\n\t\t\tdoc, err := models.NewDocument().Find(docId)\n\t\t\tif err != nil {\n\t\t\t\tc.JsonResult(6007, i18n.Tr(c.Lang, \"message.doc_not_exist\"))\n\t\t\t}\n\n\t\t\tif doc.BookId != bookId {\n\t\t\t\tc.JsonResult(6008, i18n.Tr(c.Lang, \"message.doc_not_belong_project\"))\n\t\t\t}\n\t\t}\n\n\t\tfileName := \"m_\" + cryptil.UniqueId() + \"_r\"\n\t\tfilePath := filepath.Join(conf.WorkingDirectory, \"uploads\", identify)\n\n\t\t//将图片和文件分开存放\n\t\tattachment := models.NewAttachment()\n\t\tvar strategy filetil.FileTypeStrategy\n\t\tif filetil.IsImageExt(files[i].Filename) {\n\t\t\tstrategy = filetil.ImageStrategy{}\n\t\t\tattachment.ResourceType = \"image\"\n\t\t} else if filetil.IsVideoExt(files[i].Filename) {\n\t\t\tstrategy = filetil.VideoStrategy{}\n\t\t\tattachment.ResourceType = \"video\"\n\t\t} else {\n\t\t\tstrategy = filetil.DefaultStrategy{}\n\t\t\tattachment.ResourceType = \"file\"\n\t\t}\n\n\t\tfilePath = strategy.GetFilePath(filePath, fileName, ext)\n\n\t\tpath := filepath.Dir(filePath)\n\n\t\t_ = os.MkdirAll(path, os.ModePerm)\n\n\t\t//copy the uploaded file to the destination file\n\t\tdst, err := os.Create(filePath)\n\t\tdefer dst.Close()\n\t\tif _, err := io.Copy(dst, file); err != nil {\n\t\t\tlogs.Error(\"保存文件失败 -> \", err)\n\t\t\tc.JsonResult(6005, i18n.Tr(c.Lang, \"message.failed\"))\n\t\t}\n\n\t\tattachment.BookId = bookId\n\t\t// attachment.FileName = moreFile.Filename\n\t\tattachment.FileName = files[i].Filename\n\t\tattachment.CreateAt = c.Member.MemberId\n\t\tattachment.FileExt = ext\n\t\tattachment.FilePath = strings.TrimPrefix(filePath, conf.WorkingDirectory)\n\t\tattachment.DocumentId = docId\n\n\t\tif fileInfo, err := os.Stat(filePath); err == nil {\n\t\t\tattachment.FileSize = float64(fileInfo.Size())\n\t\t}\n\n\t\tif docId > 0 {\n\t\t\tattachment.DocumentId = docId\n\t\t}\n\n\t\tif filetil.IsImageExt(files[i].Filename) || filetil.IsVideoExt(files[i].Filename) {\n\t\t\tattachment.HttpPath = \"/\" + strings.Replace(strings.TrimPrefix(filePath, conf.WorkingDirectory), \"\\\\\", \"/\", -1)\n\t\t\tif strings.HasPrefix(attachment.HttpPath, \"//\") {\n\t\t\t\tattachment.HttpPath = conf.URLForWithCdnImage(string(attachment.HttpPath[1:]))\n\t\t\t}\n\n\t\t\tisAttach = false\n\t\t}\n\n\t\terr = attachment.Insert()\n\n\t\tif err != nil {\n\t\t\tos.Remove(filePath)\n\t\t\tlogs.Error(\"文件保存失败 ->\", err)\n\t\t\tc.JsonResult(6006, i18n.Tr(c.Lang, \"message.failed\"))\n\t\t}\n\n\t\tif attachment.HttpPath == \"\" {\n\t\t\tattachment.HttpPath = conf.URLForNotHost(\"DocumentController.DownloadAttachment\", \":key\", identify, \":attach_id\", attachment.AttachmentId)\n\n\t\t\tif err := attachment.Update(); err != nil {\n\t\t\t\tlogs.Error(\"保存文件失败 ->\", err)\n\t\t\t\tc.JsonResult(6005, i18n.Tr(c.Lang, \"message.failed\"))\n\t\t\t}\n\t\t}\n\t\tresult = map[string]interface{}{\n\t\t\t\"errcode\":       0,\n\t\t\t\"success\":       1,\n\t\t\t\"message\":       \"ok\",\n\t\t\t\"url\":           attachment.HttpPath,\n\t\t\t\"link\":          attachment.HttpPath,\n\t\t\t\"alt\":           attachment.FileName,\n\t\t\t\"is_attach\":     isAttach,\n\t\t\t\"attach\":        attachment,\n\t\t\t\"resource_type\": attachment.ResourceType,\n\t\t}\n\t\tresult2 = append(result2, result)\n\t}\n\tif len(files) == 1 {\n\t\t// froala单文件上传\n\t\tc.Ctx.Output.JSON(result, true, false)\n\t} else {\n\t\tc.Ctx.Output.JSON(result2, true, false)\n\t}\n\tc.StopRun()\n}\n\n// 下载附件\nfunc (c *DocumentController) DownloadAttachment() {\n\tc.Prepare()\n\n\tidentify := c.Ctx.Input.Param(\":key\")\n\tattachId, _ := strconv.Atoi(c.Ctx.Input.Param(\":attach_id\"))\n\ttoken := c.GetString(\"token\")\n\n\tmemberId := 0\n\n\tif c.Member != nil {\n\t\tmemberId = c.Member.MemberId\n\t}\n\n\tbookId := 0\n\n\t// 判断用户是否参与了项目\n\tbookResult, err := models.NewBookResult().FindByIdentify(identify, memberId)\n\n\tif err != nil {\n\t\t// 判断项目公开状态\n\t\tbook, err := models.NewBook().FindByFieldFirst(\"identify\", identify)\n\t\tif err != nil {\n\t\t\tif err == orm.ErrNoRows {\n\t\t\t\tc.ShowErrorPage(404, i18n.Tr(c.Lang, \"message.item_not_exist\"))\n\t\t\t} else {\n\t\t\t\tlogs.Error(\"查找项目时出错 ->\", err)\n\t\t\t\tc.ShowErrorPage(500, i18n.Tr(c.Lang, \"message.system_error\"))\n\t\t\t}\n\t\t}\n\n\t\t// 如果不是超级管理员则判断权限\n\t\tif c.Member == nil || c.Member.Role != conf.MemberSuperRole {\n\t\t\t// 如果项目是私有的，并且 token 不正确\n\t\t\tif (book.PrivatelyOwned == 1 && token == \"\") || (book.PrivatelyOwned == 1 && book.PrivateToken != token) {\n\t\t\t\tc.ShowErrorPage(403, i18n.Tr(c.Lang, \"message.no_permission\"))\n\t\t\t}\n\t\t}\n\n\t\tbookId = book.BookId\n\t} else {\n\t\tbookId = bookResult.BookId\n\t}\n\n\t// 查找附件\n\tattachment, err := models.NewAttachment().Find(attachId)\n\n\tif err != nil {\n\t\tlogs.Error(\"查找附件时出错 -> \", err)\n\t\tif err == orm.ErrNoRows {\n\t\t\tc.ShowErrorPage(404, i18n.Tr(c.Lang, \"message.attachment_not_exist\"))\n\t\t} else {\n\t\t\tc.ShowErrorPage(500, i18n.Tr(c.Lang, \"message.system_error\"))\n\t\t}\n\t}\n\n\tif attachment.BookId != bookId {\n\t\tc.ShowErrorPage(404, i18n.Tr(c.Lang, \"message.attachment_not_exist\"))\n\t}\n\n\tc.Ctx.Output.Download(filepath.Join(conf.WorkingDirectory, attachment.FilePath), attachment.FileName)\n\tc.StopRun()\n}\n\n// 删除附件\nfunc (c *DocumentController) RemoveAttachment() {\n\tc.Prepare()\n\tattachId, _ := c.GetInt(\"attach_id\")\n\n\tif attachId <= 0 {\n\t\tc.JsonResult(6001, i18n.Tr(c.Lang, \"message.param_error\"))\n\t}\n\n\tattach, err := models.NewAttachment().Find(attachId)\n\n\tif err != nil {\n\t\tlogs.Error(err)\n\t\tc.JsonResult(6002, i18n.Tr(c.Lang, \"message.attachment_not_exist\"))\n\t}\n\n\tdocument, err := models.NewDocument().Find(attach.DocumentId)\n\n\tif err != nil {\n\t\tlogs.Error(err)\n\t\tc.JsonResult(6003, i18n.Tr(c.Lang, \"message.doc_not_exist\"))\n\t}\n\n\tif c.Member.Role != conf.MemberSuperRole {\n\t\trel, err := models.NewRelationship().FindByBookIdAndMemberId(document.BookId, c.Member.MemberId)\n\t\tif err != nil {\n\t\t\tlogs.Error(err)\n\t\t\tc.JsonResult(6004, i18n.Tr(c.Lang, \"message.no_permission\"))\n\t\t}\n\n\t\tif rel.RoleId == conf.BookObserver {\n\t\t\tc.JsonResult(6004, i18n.Tr(c.Lang, \"message.no_permission\"))\n\t\t}\n\t}\n\n\terr = attach.Delete()\n\tif err != nil {\n\t\tlogs.Error(err)\n\t\tc.JsonResult(6005, i18n.Tr(c.Lang, \"message.failed\"))\n\t}\n\n\tos.Remove(filepath.Join(conf.WorkingDirectory, attach.FilePath))\n\n\tc.JsonResult(0, \"ok\", attach)\n}\n\n// 删除文档\nfunc (c *DocumentController) Delete() {\n\tc.Prepare()\n\n\tidentify := c.GetString(\"identify\")\n\tdocId, err := c.GetInt(\"doc_id\", 0)\n\n\tbookId := 0\n\n\t// 如果是超级管理员则忽略权限判断\n\tif c.Member.IsAdministrator() {\n\t\tbook, err := models.NewBook().FindByFieldFirst(\"identify\", identify)\n\t\tif err != nil {\n\t\t\tlogs.Error(\"FindByIdentify => \", err)\n\t\t\tc.JsonResult(6002, i18n.Tr(c.Lang, \"message.item_not_exist_or_no_permit\"))\n\t\t}\n\n\t\tbookId = book.BookId\n\t} else {\n\t\tbookResult, err := models.NewBookResult().FindByIdentify(identify, c.Member.MemberId)\n\n\t\tif err != nil || bookResult.RoleId == conf.BookObserver {\n\t\t\tlogs.Error(\"FindByIdentify => \", err)\n\t\t\tc.JsonResult(6002, i18n.Tr(c.Lang, \"message.item_not_exist_or_no_permit\"))\n\t\t}\n\n\t\tbookId = bookResult.BookId\n\t}\n\n\tif docId <= 0 {\n\t\tc.JsonResult(6001, i18n.Tr(c.Lang, \"message.param_error\"))\n\t}\n\n\tdoc, err := models.NewDocument().Find(docId)\n\n\tif err != nil {\n\t\tlogs.Error(\"Delete => \", err)\n\t\tc.JsonResult(6003, i18n.Tr(c.Lang, \"message.failed\"))\n\t}\n\t// 如果文档所属项目错误\n\tif doc.BookId != bookId {\n\t\tc.JsonResult(6004, i18n.Tr(c.Lang, \"message.param_error\"))\n\t}\n\n\t// 递归删除项目下的文档以及子文档\n\terr = doc.RecursiveDocument(doc.DocumentId)\n\tif err != nil {\n\t\tc.JsonResult(6005, i18n.Tr(c.Lang, \"message.failed\"))\n\t}\n\n\t// 重置文档数量统计\n\tmodels.NewBook().ResetDocumentNumber(doc.BookId)\n\tc.JsonResult(0, \"ok\")\n}\n\n// 获取文档内容\nfunc (c *DocumentController) Content() {\n\tc.Prepare()\n\n\tidentify := c.Ctx.Input.Param(\":key\")\n\tdocId, err := c.GetInt(\"doc_id\")\n\n\tif err != nil {\n\t\tdocId, _ = strconv.Atoi(c.Ctx.Input.Param(\":id\"))\n\t}\n\n\tbookId := 0\n\tautoRelease := false\n\n\t// 如果是超级管理员，则忽略权限\n\tif c.Member.IsAdministrator() {\n\t\tbook, err := models.NewBook().FindByFieldFirst(\"identify\", identify)\n\t\tif err != nil || book == nil {\n\t\t\tc.JsonResult(6002, i18n.Tr(c.Lang, \"message.item_not_exist_or_no_permit\"))\n\t\t\treturn\n\t\t}\n\n\t\tbookId = book.BookId\n\t\tautoRelease = book.AutoRelease == 1\n\t} else {\n\t\tbookResult, err := models.NewBookResult().FindByIdentify(identify, c.Member.MemberId)\n\n\t\tif err != nil || bookResult.RoleId == conf.BookObserver {\n\t\t\tlogs.Error(\"项目不存在或权限不足 -> \", err)\n\t\t\tc.JsonResult(6002, i18n.Tr(c.Lang, \"message.item_not_exist_or_no_permit\"))\n\t\t}\n\n\t\tbookId = bookResult.BookId\n\t\tautoRelease = bookResult.AutoRelease\n\t}\n\n\tif docId <= 0 {\n\t\tc.JsonResult(6001, i18n.Tr(c.Lang, \"message.param_error\"))\n\t}\n\n\tif c.Ctx.Input.IsPost() {\n\t\tmarkdown := strings.TrimSpace(c.GetString(\"markdown\", \"\"))\n\t\tcontent := c.GetString(\"html\")\n\t\tmarkdownTheme := c.GetString(\"markdown_theme\", \"theme__light\")\n\t\tversion, _ := c.GetInt64(\"version\", 0)\n\t\tisCover := c.GetString(\"cover\")\n\n\t\tdoc, err := models.NewDocument().Find(docId)\n\t\tif err != nil || doc == nil {\n\t\t\tc.JsonResult(6003, i18n.Tr(c.Lang, \"message.read_file_error\"))\n\t\t\treturn\n\t\t}\n\n\t\tif doc.BookId != bookId {\n\t\t\tc.JsonResult(6004, i18n.Tr(c.Lang, \"message.dock_not_belong_project\"))\n\t\t}\n\n\t\tif doc.Version != version && !strings.EqualFold(isCover, \"yes\") {\n\t\t\tlogs.Info(\"%d|\", version, doc.Version)\n\t\t\tc.JsonResult(6005, i18n.Tr(c.Lang, \"message.confirm_override_doc\"))\n\t\t}\n\n\t\thistory := models.NewDocumentHistory()\n\t\thistory.DocumentId = docId\n\t\thistory.Content = doc.Content\n\t\thistory.Markdown = doc.Markdown\n\t\thistory.DocumentName = doc.DocumentName\n\t\thistory.ModifyAt = c.Member.MemberId\n\t\thistory.MemberId = doc.MemberId\n\t\thistory.ParentId = doc.ParentId\n\t\thistory.Version = time.Now().Unix()\n\t\thistory.Action = \"modify\"\n\t\thistory.ActionName = i18n.Tr(c.Lang, \"doc.modify_doc\")\n\n\t\tif markdown == \"\" && content != \"\" {\n\t\t\tdoc.Markdown = content\n\t\t} else {\n\t\t\tdoc.Markdown = markdown\n\t\t\tdoc.MarkdownTheme = markdownTheme\n\t\t}\n\n\t\tdoc.Version = time.Now().Unix()\n\t\tdoc.Content = content\n\t\tdoc.ModifyAt = c.Member.MemberId\n\n\t\tif err := doc.InsertOrUpdate(); err != nil {\n\t\t\tlogs.Error(\"InsertOrUpdate => \", err)\n\t\t\tc.JsonResult(6006, i18n.Tr(c.Lang, \"message.failed\"))\n\t\t}\n\n\t\t// 如果启用了文档历史，则添加历史文档\n\t\t///如果两次保存的MD5值不同则保存为历史，否则忽略\n\t\tgo func(history *models.DocumentHistory) {\n\t\t\tif c.EnableDocumentHistory && cryptil.Md5Crypt(history.Markdown) != cryptil.Md5Crypt(doc.Markdown) {\n\t\t\t\t_, err = history.InsertOrUpdate()\n\t\t\t\tif err != nil {\n\t\t\t\t\tlogs.Error(\"DocumentHistory InsertOrUpdate => \", err)\n\t\t\t\t}\n\t\t\t}\n\t\t}(history)\n\n\t\t//如果启用了自动发布\n\t\tif autoRelease {\n\t\t\tgo func() {\n\t\t\t\tdoc.Lang = c.Lang\n\t\t\t\terr := doc.ReleaseContent()\n\t\t\t\tif err == nil {\n\t\t\t\t\tlogs.Informational(i18n.Tr(c.Lang, \"message.doc_auto_published\")+\"-> document_id=%d;document_name=%s\", doc.DocumentId, doc.DocumentName)\n\t\t\t\t}\n\t\t\t}()\n\t\t}\n\n\t\tc.JsonResult(0, \"ok\", doc)\n\t}\n\n\tdoc, err := models.NewDocument().Find(docId)\n\tif err != nil {\n\t\tc.JsonResult(6003, i18n.Tr(c.Lang, \"message.doc_not_exist\"))\n\t\treturn\n\t}\n\n\tattach, err := models.NewAttachment().FindListByDocumentId(doc.DocumentId)\n\tif err == nil {\n\t\tdoc.AttachList = attach\n\t}\n\n\tc.JsonResult(0, \"ok\", doc)\n}\n\n// Export 导出\nfunc (c *DocumentController) Export() {\n\tc.Prepare()\n\n\tidentify := c.Ctx.Input.Param(\":key\")\n\n\tif identify == \"\" {\n\t\tc.ShowErrorPage(500, i18n.Tr(c.Lang, \"message.param_error\"))\n\t}\n\n\toutput := c.GetString(\"output\")\n\ttoken := c.GetString(\"token\")\n\n\t// 如果没有开启匿名访问则跳转到登录\n\tif !c.EnableAnonymous && !c.isUserLoggedIn() {\n\t\tpromptUserToLogIn(c)\n\t\treturn\n\t}\n\tif !conf.GetEnableExport() {\n\t\tc.ShowErrorPage(500, i18n.Tr(c.Lang, \"export_func_disable\"))\n\t}\n\n\tbookResult := models.NewBookResult()\n\tif c.Member != nil && c.Member.IsAdministrator() {\n\t\tbook, err := models.NewBook().FindByIdentify(identify)\n\t\tif err != nil {\n\t\t\tif err == orm.ErrNoRows {\n\t\t\t\tc.ShowErrorPage(404, i18n.Tr(c.Lang, \"message.item_not_exist\"))\n\t\t\t} else {\n\t\t\t\tlogs.Error(\"查找项目时出错 ->\", err)\n\t\t\t\tc.ShowErrorPage(500, i18n.Tr(c.Lang, \"message.system_error\"))\n\t\t\t}\n\t\t}\n\t\tbookResult = models.NewBookResult().ToBookResult(*book)\n\t} else {\n\t\tbookResult = c.isReadable(identify, token)\n\t}\n\tif !bookResult.IsDownload {\n\t\tc.ShowErrorPage(200, i18n.Tr(c.Lang, \"message.cur_project_export_func_disable\"))\n\t}\n\n\tif !strings.HasPrefix(bookResult.Cover, \"http:://\") && !strings.HasPrefix(bookResult.Cover, \"https:://\") {\n\t\tbookResult.Cover = conf.URLForWithCdnImage(bookResult.Cover)\n\t}\n\tif output == Markdown {\n\t\tif bookResult.Editor != EditorMarkdown && bookResult.Editor != EditorCherryMarkdown {\n\t\t\tc.ShowErrorPage(500, i18n.Tr(c.Lang, \"message.cur_project_not_support_md\"))\n\t\t}\n\t\tp, err := bookResult.ExportMarkdown(c.CruSession.SessionID(context.TODO()))\n\n\t\tif err != nil {\n\t\t\tc.ShowErrorPage(500, i18n.Tr(c.Lang, \"message.failed\"))\n\t\t}\n\t\tc.Ctx.Output.Download(p, bookResult.BookName+\".zip\")\n\n\t\tc.StopRun()\n\t\treturn\n\t}\n\n\toutputPath := filepath.Join(conf.GetExportOutputPath(), strconv.Itoa(bookResult.BookId))\n\n\tpdfpath := filepath.Join(outputPath, \"book.pdf\")\n\tepubpath := filepath.Join(outputPath, \"book.epub\")\n\tmobipath := filepath.Join(outputPath, \"book.mobi\")\n\tdocxpath := filepath.Join(outputPath, \"book.docx\")\n\n\tif output == \"pdf\" && filetil.FileExists(pdfpath) {\n\t\tc.Ctx.Output.Download(pdfpath, bookResult.BookName+\".pdf\")\n\t\tc.Abort(\"200\")\n\t} else if output == \"epub\" && filetil.FileExists(epubpath) {\n\t\tc.Ctx.Output.Download(epubpath, bookResult.BookName+\".epub\")\n\n\t\tc.Abort(\"200\")\n\t} else if output == \"mobi\" && filetil.FileExists(mobipath) {\n\t\tc.Ctx.Output.Download(mobipath, bookResult.BookName+\".mobi\")\n\n\t\tc.Abort(\"200\")\n\t} else if output == \"docx\" && filetil.FileExists(docxpath) {\n\t\tc.Ctx.Output.Download(docxpath, bookResult.BookName+\".docx\")\n\n\t\tc.Abort(\"200\")\n\n\t} else if output == \"pdf\" || output == \"epub\" || output == \"docx\" || output == \"mobi\" {\n\t\tif err := models.BackgroundConvert(c.CruSession.SessionID(context.TODO()), bookResult); err != nil && err != gopool.ErrHandlerIsExist {\n\t\t\tc.ShowErrorPage(500, i18n.Tr(c.Lang, \"message.export_failed\"))\n\t\t}\n\n\t\tc.ShowErrorPage(200, i18n.Tr(c.Lang, \"message.file_converting\"))\n\t} else {\n\t\tc.ShowErrorPage(200, i18n.Tr(c.Lang, \"message.unsupport_file_type\"))\n\t}\n\n\tc.ShowErrorPage(404, i18n.Tr(c.Lang, \"message.no_exportable_file\"))\n}\n\n// 生成项目访问的二维码\nfunc (c *DocumentController) QrCode() {\n\tc.Prepare()\n\n\tidentify := c.GetString(\":key\")\n\n\tbook, err := models.NewBook().FindByIdentify(identify)\n\tif err != nil || book.BookId <= 0 {\n\t\tc.ShowErrorPage(404, i18n.Tr(c.Lang, \"message.item_not_exist\"))\n\t}\n\n\turi := conf.URLFor(\"DocumentController.Index\", \":key\", identify)\n\tcode, err := qr.Encode(uri, qr.L, qr.Unicode)\n\tif err != nil {\n\t\tlogs.Error(\"生成二维码失败 ->\", err)\n\t\tc.ShowErrorPage(500, i18n.Tr(c.Lang, \"message.gen_qrcode_failed\"))\n\t}\n\n\tcode, err = barcode.Scale(code, 150, 150)\n\tif err != nil {\n\t\tlogs.Error(\"生成二维码失败 ->\", err)\n\t\tc.ShowErrorPage(500, i18n.Tr(c.Lang, \"message.gen_qrcode_failed\"))\n\t}\n\n\tc.Ctx.ResponseWriter.Header().Set(\"Content-Type\", \"image/png\")\n\n\t// imgpath := filepath.Join(\"cache\",\"qrcode\",identify + \".png\")\n\n\terr = png.Encode(c.Ctx.ResponseWriter, code)\n\tif err != nil {\n\t\tlogs.Error(\"生成二维码失败 ->\", err)\n\t\tc.ShowErrorPage(500, i18n.Tr(c.Lang, \"message.gen_qrcode_failed\"))\n\t}\n}\n\n// 项目内搜索\nfunc (c *DocumentController) Search() {\n\tc.Prepare()\n\n\tidentify := c.Ctx.Input.Param(\":key\")\n\ttoken := c.GetString(\"token\")\n\tkeyword := strings.TrimSpace(c.GetString(\"keyword\"))\n\n\tif identify == \"\" {\n\t\tc.JsonResult(6001, i18n.Tr(c.Lang, \"message.param_error\"))\n\t}\n\n\tif !c.EnableAnonymous && !c.isUserLoggedIn() {\n\t\tpromptUserToLogIn(c)\n\t\treturn\n\t}\n\n\tbookResult := c.isReadable(identify, token)\n\n\tdocs, err := models.NewDocumentSearchResult().SearchDocument(keyword, bookResult.BookId)\n\tif err != nil {\n\t\tlogs.Error(err)\n\t\tc.JsonResult(6002, i18n.Tr(c.Lang, \"message.search_result_error\"))\n\t}\n\n\tif len(docs) < 0 {\n\t\tc.JsonResult(404, i18n.Tr(c.Lang, \"message.no_data\"))\n\t}\n\n\tfor _, doc := range docs {\n\t\tdoc.BookId = bookResult.BookId\n\t\tdoc.BookName = bookResult.BookName\n\t\tdoc.Description = bookResult.Description\n\t\tdoc.BookIdentify = bookResult.Identify\n\t}\n\n\tc.JsonResult(0, \"ok\", docs)\n}\n\n// 文档历史列表\nfunc (c *DocumentController) History() {\n\tc.Prepare()\n\n\tc.TplName = \"document/history.tpl\"\n\n\tidentify := c.GetString(\"identify\")\n\tdocId, err := c.GetInt(\"doc_id\", 0)\n\tpageIndex, _ := c.GetInt(\"page\", 1)\n\n\tbookId := 0\n\n\t// 如果是超级管理员则忽略权限判断\n\tif c.Member.IsAdministrator() {\n\t\tbook, err := models.NewBook().FindByFieldFirst(\"identify\", identify)\n\t\tif err != nil {\n\t\t\tlogs.Error(\"查找项目失败 ->\", err)\n\t\t\tc.Data[\"ErrorMessage\"] = i18n.Tr(c.Lang, \"message.item_not_exist_or_no_permit\")\n\t\t\treturn\n\t\t}\n\n\t\tbookId = book.BookId\n\t\tc.Data[\"Model\"] = book\n\t} else {\n\t\tbookResult, err := models.NewBookResult().FindByIdentify(identify, c.Member.MemberId)\n\t\tif err != nil || bookResult.RoleId == conf.BookObserver {\n\t\t\tlogs.Error(\"查找项目失败 ->\", err)\n\t\t\tc.Data[\"ErrorMessage\"] = i18n.Tr(c.Lang, \"message.item_not_exist_or_no_permit\")\n\t\t\treturn\n\t\t}\n\n\t\tbookId = bookResult.BookId\n\t\tc.Data[\"Model\"] = bookResult\n\t}\n\n\tif docId <= 0 {\n\t\tc.Data[\"ErrorMessage\"] = i18n.Tr(c.Lang, \"message.param_error\")\n\t\treturn\n\t}\n\n\tdoc, err := models.NewDocument().Find(docId)\n\tif err != nil {\n\t\tlogs.Error(\"Delete => \", err)\n\t\tc.Data[\"ErrorMessage\"] = i18n.Tr(c.Lang, \"message.get_doc_his_failed\")\n\t\treturn\n\t}\n\n\t// 如果文档所属项目错误\n\tif doc.BookId != bookId {\n\t\tc.Data[\"ErrorMessage\"] = i18n.Tr(c.Lang, \"message.param_error\")\n\t\treturn\n\t}\n\n\thistories, totalCount, err := models.NewDocumentHistory().FindToPager(docId, pageIndex, conf.PageSize)\n\tif err != nil {\n\t\tlogs.Error(\"分页查找文档历史失败 ->\", err)\n\t\tc.Data[\"ErrorMessage\"] = i18n.Tr(c.Lang, \"message.get_doc_his_failed\")\n\t\treturn\n\t}\n\n\tc.Data[\"List\"] = histories\n\tc.Data[\"PageHtml\"] = \"\"\n\tc.Data[\"Document\"] = doc\n\n\tif totalCount > 0 {\n\t\tpager := pagination.NewPagination(c.Ctx.Request, totalCount, conf.PageSize, c.BaseUrl())\n\t\tc.Data[\"PageHtml\"] = pager.HtmlPages()\n\t}\n}\n\nfunc (c *DocumentController) DeleteHistory() {\n\tc.Prepare()\n\n\tc.TplName = \"document/history.tpl\"\n\n\tidentify := c.GetString(\"identify\")\n\tdocId, err := c.GetInt(\"doc_id\", 0)\n\thistoryId, _ := c.GetInt(\"history_id\", 0)\n\n\tif historyId <= 0 {\n\t\tc.JsonResult(6001, i18n.Tr(c.Lang, \"message.param_error\"))\n\t}\n\n\tbookId := 0\n\n\t// 如果是超级管理员则忽略权限判断\n\tif c.Member.IsAdministrator() {\n\t\tbook, err := models.NewBook().FindByFieldFirst(\"identify\", identify)\n\t\tif err != nil {\n\t\t\tlogs.Error(\"查找项目失败 ->\", err)\n\t\t\tc.JsonResult(6002, i18n.Tr(c.Lang, \"message.item_not_exist_or_no_permit\"))\n\t\t}\n\n\t\tbookId = book.BookId\n\t} else {\n\t\tbookResult, err := models.NewBookResult().FindByIdentify(identify, c.Member.MemberId)\n\t\tif err != nil || bookResult.RoleId == conf.BookObserver {\n\t\t\tlogs.Error(\"查找项目失败 ->\", err)\n\t\t\tc.JsonResult(6002, i18n.Tr(c.Lang, \"message.item_not_exist_or_no_permit\"))\n\t\t}\n\n\t\tbookId = bookResult.BookId\n\t}\n\n\tif docId <= 0 {\n\t\tc.JsonResult(6001, i18n.Tr(c.Lang, \"message.param_error\"))\n\t}\n\n\tdoc, err := models.NewDocument().Find(docId)\n\tif err != nil {\n\t\tlogs.Error(\"Delete => \", err)\n\t\tc.JsonResult(6001, i18n.Tr(c.Lang, \"message.get_doc_his_failed\"))\n\t}\n\n\t// 如果文档所属项目错误\n\tif doc.BookId != bookId {\n\t\tc.JsonResult(6001, i18n.Tr(c.Lang, \"message.param_error\"))\n\t}\n\n\terr = models.NewDocumentHistory().Delete(historyId, docId)\n\tif err != nil {\n\t\tlogs.Error(err)\n\t\tc.JsonResult(6002, i18n.Tr(c.Lang, \"message.failed\"))\n\t}\n\n\tc.JsonResult(0, \"ok\")\n}\n\n// 通过文档历史恢复文档\nfunc (c *DocumentController) RestoreHistory() {\n\tc.Prepare()\n\n\tc.TplName = \"document/history.tpl\"\n\n\tidentify := c.GetString(\"identify\")\n\tdocId, err := c.GetInt(\"doc_id\", 0)\n\thistoryId, _ := c.GetInt(\"history_id\", 0)\n\n\tif historyId <= 0 {\n\t\tc.JsonResult(6001, i18n.Tr(c.Lang, \"message.param_error\"))\n\t}\n\n\tbookId := 0\n\t// 如果是超级管理员则忽略权限判断\n\tif c.Member.IsAdministrator() {\n\t\tbook, err := models.NewBook().FindByFieldFirst(\"identify\", identify)\n\t\tif err != nil {\n\t\t\tlogs.Error(\"FindByIdentify => \", err)\n\t\t\tc.JsonResult(6002, i18n.Tr(c.Lang, \"message.item_not_exist_or_no_permit\"))\n\t\t}\n\n\t\tbookId = book.BookId\n\t} else {\n\t\tbookResult, err := models.NewBookResult().FindByIdentify(identify, c.Member.MemberId)\n\t\tif err != nil || bookResult.RoleId == conf.BookObserver {\n\t\t\tlogs.Error(\"FindByIdentify => \", err)\n\t\t\tc.JsonResult(6002, i18n.Tr(c.Lang, \"message.item_not_exist_or_no_permit\"))\n\t\t}\n\n\t\tbookId = bookResult.BookId\n\t}\n\n\tif docId <= 0 {\n\t\tc.JsonResult(6001, i18n.Tr(c.Lang, \"message.param_error\"))\n\t}\n\n\tdoc, err := models.NewDocument().Find(docId)\n\tif err != nil {\n\t\tlogs.Error(\"Delete => \", err)\n\t\tc.JsonResult(6001, i18n.Tr(c.Lang, \"message.get_doc_his_failed\"))\n\t}\n\n\t// 如果文档所属项目错误\n\tif doc.BookId != bookId {\n\t\tc.JsonResult(6001, i18n.Tr(c.Lang, \"message.param_error\"))\n\t}\n\n\terr = models.NewDocumentHistory().Restore(historyId, docId, c.Member.MemberId)\n\tif err != nil {\n\t\tlogs.Error(err)\n\t\tc.JsonResult(6002, i18n.Tr(c.Lang, \"message.failed\"))\n\t}\n\n\tc.JsonResult(0, \"ok\", doc)\n}\n\nfunc (c *DocumentController) Compare() {\n\tc.Prepare()\n\n\tc.TplName = \"document/compare.tpl\"\n\n\thistoryId, _ := strconv.Atoi(c.Ctx.Input.Param(\":id\"))\n\tidentify := c.Ctx.Input.Param(\":key\")\n\n\tbookId := 0\n\teditor := EditorMarkdown\n\n\t// 如果是超级管理员则忽略权限判断\n\tif c.Member.IsAdministrator() {\n\t\tbook, err := models.NewBook().FindByFieldFirst(\"identify\", identify)\n\t\tif err != nil {\n\t\t\tlogs.Error(\"DocumentController.Compare => \", err)\n\t\t\tc.ShowErrorPage(403, i18n.Tr(c.Lang, \"message.no_permission\"))\n\t\t\treturn\n\t\t}\n\n\t\tbookId = book.BookId\n\t\tc.Data[\"Model\"] = book\n\t\teditor = book.Editor\n\t} else {\n\t\tbookResult, err := models.NewBookResult().FindByIdentify(identify, c.Member.MemberId)\n\t\tif err != nil || bookResult.RoleId == conf.BookObserver {\n\t\t\tlogs.Error(\"FindByIdentify => \", err)\n\t\t\tc.ShowErrorPage(403, i18n.Tr(c.Lang, \"message.no_permission\"))\n\t\t\treturn\n\t\t}\n\n\t\tbookId = bookResult.BookId\n\t\tc.Data[\"Model\"] = bookResult\n\t\teditor = bookResult.Editor\n\t}\n\n\tif historyId <= 0 {\n\t\tc.ShowErrorPage(60002, i18n.Tr(c.Lang, \"message.param_error\"))\n\t}\n\n\thistory, err := models.NewDocumentHistory().Find(historyId)\n\tif err != nil {\n\t\tlogs.Error(\"DocumentController.Compare => \", err)\n\t\tc.ShowErrorPage(60003, err.Error())\n\t}\n\n\tdoc, err := models.NewDocument().Find(history.DocumentId)\n\tif err != nil || doc == nil || doc.BookId != bookId {\n\t\tc.ShowErrorPage(60002, i18n.Tr(c.Lang, \"message.doc_not_exist\"))\n\t\treturn\n\t}\n\n\tc.Data[\"HistoryId\"] = historyId\n\tc.Data[\"DocumentId\"] = doc.DocumentId\n\n\tif editor == EditorMarkdown || editor == EditorCherryMarkdown {\n\t\tc.Data[\"HistoryContent\"] = history.Markdown\n\t\tc.Data[\"Content\"] = doc.Markdown\n\t} else {\n\t\tc.Data[\"HistoryContent\"] = template.HTML(history.Content)\n\t\tc.Data[\"Content\"] = template.HTML(doc.Content)\n\t}\n}\n\n// 判断用户是否可以阅读文档\nfunc (c *DocumentController) isReadable(identify, token string) *models.BookResult {\n\tbook, err := models.NewBook().FindByFieldFirst(\"identify\", identify)\n\n\tif err != nil {\n\t\tlogs.Error(err)\n\t\tc.ShowErrorPage(500, i18n.Tr(c.Lang, \"message.item_not_exist\"))\n\t}\n\tbookResult := models.NewBookResult().ToBookResult(*book)\n\tisOk := false\n\n\tif c.isUserLoggedIn() {\n\t\troleId, err := models.NewBook().FindForRoleId(book.BookId, c.Member.MemberId)\n\t\tif err == nil {\n\t\t\tisOk = true\n\t\t\tbookResult.MemberId = c.Member.MemberId\n\t\t\tbookResult.RoleId = roleId\n\t\t}\n\t}\n\n\t/* \t私有项目：\n\t *   管理员可以直接访问\n\t *   参与者可以直接访问\n\t *   其他用户（支持匿名访问）\n\t *   \ttoken设置情况\n\t *   \t\t已设置：可以通过token访问\n\t *   \t\t未设置：不可以通过token访问\n\t *   \tpassword设置情况\n\t *   \t\t已设置：可以通过password访问\n\t *   \t\t未设置：不可以通过password访问\n\t *   注意：\n\t *   1. 第一次访问需要存session\n\t *   2. 有session优先使用session中的token或者password，再使用携带的token或者password\n\t *   3. 私有项目如果token和password都没有设置，则除管理员和参与者的其他用户不可以访问\n\t *   4. 使用token访问如果不通过，则提示输入密码\n\t */\n\tif book.PrivatelyOwned == 1 {\n\t\tif c.isUserLoggedIn() && c.Member.IsAdministrator() {\n\t\t\treturn bookResult\n\t\t}\n\t\tif isOk { // Project participant.\n\t\t\treturn bookResult\n\t\t}\n\n\t\t// Use session in preference.\n\t\tif tokenOrPassword, ok := c.GetSession(identify).(string); ok {\n\t\t\tif strings.EqualFold(book.PrivateToken, tokenOrPassword) || strings.EqualFold(book.BookPassword, tokenOrPassword) {\n\t\t\t\treturn bookResult\n\t\t\t}\n\t\t}\n\n\t\t// Next: Session not exist or not correct.\n\t\tif book.PrivateToken != \"\" && book.PrivateToken == token {\n\t\t\tc.SetSession(identify, token)\n\t\t\treturn bookResult\n\t\t} else if book.BookPassword != \"\" {\n\t\t\t// Send a page for inputting password.\n\t\t\t// For verification, see function DocumentController.CheckPassword\n\t\t\tbody, err := c.ExecuteViewPathTemplate(\"document/document_password.tpl\",\n\t\t\t\tmap[string]string{\"Identify\": book.Identify, \"Lang\": c.Lang})\n\t\t\tif err != nil {\n\t\t\t\tlogs.Error(\"显示密码页面失败 ->\", err)\n\t\t\t\tc.ShowErrorPage(500, i18n.Tr(c.Lang, \"message.system_error\"))\n\t\t\t}\n\t\t\tc.CustomAbort(200, body)\n\t\t} else {\n\t\t\t// No permission to access this book.\n\t\t\tlogs.Info(\"尝试访问文档但权限不足 ->\", identify, token)\n\t\t\tc.ShowErrorPage(403, i18n.Tr(c.Lang, \"message.no_permission\"))\n\t\t}\n\t}\n\n\treturn bookResult\n}\n\nfunc promptUserToLogIn(c *DocumentController) {\n\tlogs.Info(\"Access \" + c.Ctx.Request.URL.RequestURI() + \" not permitted.\")\n\tlogs.Info(\"  Access will be redirected to login page(SessionId: \" + c.CruSession.SessionID(context.TODO()) + \").\")\n\n\tif c.IsAjax() {\n\t\tc.JsonResult(6000, i18n.Tr(c.Lang, \"message.need_relogin\"))\n\t} else {\n\t\tc.Redirect(conf.URLFor(\"AccountController.Login\")+\"?url=\"+url.PathEscape(conf.BaseUrl+c.Ctx.Request.URL.RequestURI()), 302)\n\t}\n}\n"
  },
  {
    "path": "controllers/ErrorController.go",
    "content": "package controllers\n\ntype ErrorController struct {\n\tBaseController\n}\n\nfunc (c *ErrorController) Error404() {\n\tc.TplName = \"errors/404.tpl\"\n}\n\nfunc (c *ErrorController) Error403() {\n\tc.TplName = \"errors/403.tpl\"\n}\n\nfunc (c *ErrorController) Error500() {\n\tc.TplName = \"errors/error.tpl\"\n}\n"
  },
  {
    "path": "controllers/HomeController.go",
    "content": "package controllers\n\nimport (\n\t\"math\"\n\t\"net/url\"\n\n\t\"github.com/beego/beego/v2/core/logs\"\n\t\"github.com/mindoc-org/mindoc/conf\"\n\t\"github.com/mindoc-org/mindoc/models\"\n\t\"github.com/mindoc-org/mindoc/utils/pagination\"\n)\n\ntype HomeController struct {\n\tBaseController\n}\n\nfunc (c *HomeController) Prepare() {\n\tc.BaseController.Prepare()\n\t//如果没有开启匿名访问，则跳转到登录页面\n\tif !c.EnableAnonymous && c.Member == nil {\n\t\tc.Redirect(conf.URLFor(\"AccountController.Login\")+\"?url=\"+url.PathEscape(conf.BaseUrl+c.Ctx.Request.URL.RequestURI()), 302)\n\t}\n}\n\nfunc (c *HomeController) Index() {\n\tc.Prepare()\n\tc.TplName = \"home/index.tpl\"\n\n\tpageIndex, _ := c.GetInt(\"page\", 1)\n\tpageSize := 18\n\tmemberId := 0\n\tif c.Member != nil {\n\t\tmemberId = c.Member.MemberId\n\t}\n\tbooks, totalCount, err := models.NewBook().FindForHomeToPager(pageIndex, pageSize, memberId)\n\tif err != nil {\n\t\tlogs.Error(err)\n\t\tc.Abort(\"500\")\n\t}\n\tif totalCount > 0 {\n\t\tpager := pagination.NewPagination(c.Ctx.Request, totalCount, pageSize, c.BaseUrl())\n\t\tc.Data[\"PageHtml\"] = pager.HtmlPages()\n\t} else {\n\t\tc.Data[\"PageHtml\"] = \"\"\n\t}\n\tc.Data[\"TotalPages\"] = int(math.Ceil(float64(totalCount) / float64(pageSize)))\n\tc.Data[\"Lists\"] = books\n}\n"
  },
  {
    "path": "controllers/ItemsetsController.go",
    "content": "package controllers\n\nimport (\n\t\"math\"\n\n\t\"github.com/beego/beego/v2/client/orm\"\n\t\"github.com/beego/beego/v2/core/logs\"\n\t\"github.com/mindoc-org/mindoc/conf\"\n\t\"github.com/mindoc-org/mindoc/models\"\n\t\"github.com/mindoc-org/mindoc/utils/pagination\"\n)\n\ntype ItemsetsController struct {\n\tBaseController\n}\n\nfunc (c *ItemsetsController) Prepare() {\n\tc.BaseController.Prepare()\n\n\t//如果没有开启你们访问则跳转到登录\n\tif !c.EnableAnonymous && c.Member == nil {\n\t\tc.Redirect(conf.URLFor(\"AccountController.Login\"), 302)\n\t\treturn\n\t}\n}\nfunc (c *ItemsetsController) Index() {\n\tc.Prepare()\n\tc.TplName = \"items/index.tpl\"\n\tpageSize := 16\n\n\tpageIndex, _ := c.GetInt(\"page\", 0)\n\n\titems, totalCount, err := models.NewItemsets().FindToPager(pageIndex, pageSize)\n\n\tif err != nil && err != orm.ErrNoRows {\n\t\tc.ShowErrorPage(500, err.Error())\n\t}\n\tif err == orm.ErrNoRows || len(items) <= 0 {\n\t\tc.Data[\"Lists\"] = items\n\t\tc.Data[\"PageHtml\"] = \"\"\n\t\treturn\n\t}\n\n\tif totalCount > 0 {\n\t\tpager := pagination.NewPagination(c.Ctx.Request, totalCount, pageSize, c.BaseUrl())\n\t\tc.Data[\"PageHtml\"] = pager.HtmlPages()\n\t} else {\n\t\tc.Data[\"PageHtml\"] = \"\"\n\t}\n\tc.Data[\"TotalPages\"] = int(math.Ceil(float64(totalCount) / float64(pageSize)))\n\tc.Data[\"Lists\"] = items\n}\n\nfunc (c *ItemsetsController) List() {\n\tc.Prepare()\n\tc.TplName = \"items/list.tpl\"\n\tpageSize := 18\n\titemKey := c.Ctx.Input.Param(\":key\")\n\tpageIndex, _ := c.GetInt(\"page\", 1)\n\n\tif itemKey == \"\" {\n\t\tc.Abort(\"404\")\n\t}\n\titem, err := models.NewItemsets().FindFirst(itemKey)\n\n\tif err != nil {\n\t\tif err == orm.ErrNoRows {\n\t\t\tc.Abort(\"404\")\n\t\t} else {\n\t\t\tlogs.Error(err)\n\t\t\tc.Abort(\"500\")\n\t\t}\n\t}\n\tmemberId := 0\n\tif c.Member != nil {\n\t\tmemberId = c.Member.MemberId\n\t}\n\tsearchResult, totalCount, err := models.NewItemsets().FindItemsetsByItemKey(itemKey, pageIndex, pageSize, memberId)\n\n\tif err != nil && err != orm.ErrNoRows {\n\t\tc.ShowErrorPage(500, \"查询文档列表时出错\")\n\t}\n\tif totalCount > 0 {\n\t\tpager := pagination.NewPagination(c.Ctx.Request, totalCount, pageSize, c.BaseUrl())\n\t\tc.Data[\"PageHtml\"] = pager.HtmlPages()\n\t} else {\n\t\tc.Data[\"PageHtml\"] = \"\"\n\t}\n\tc.Data[\"TotalPages\"] = int(math.Ceil(float64(totalCount) / float64(pageSize)))\n\tc.Data[\"Lists\"] = searchResult\n\n\tc.Data[\"Model\"] = item\n}\n"
  },
  {
    "path": "controllers/LabelController.go",
    "content": "package controllers\n\nimport (\n\t\"math\"\n\n\t\"github.com/beego/beego/v2/client/orm\"\n\t\"github.com/beego/beego/v2/core/logs\"\n\t\"github.com/mindoc-org/mindoc/conf\"\n\t\"github.com/mindoc-org/mindoc/models\"\n\t\"github.com/mindoc-org/mindoc/utils/pagination\"\n)\n\ntype LabelController struct {\n\tBaseController\n}\n\nfunc (c *LabelController) Prepare() {\n\tc.BaseController.Prepare()\n\n\t//如果没有开启你们访问则跳转到登录\n\tif !c.EnableAnonymous && c.Member == nil {\n\t\tc.Redirect(conf.URLFor(\"AccountController.Login\"), 302)\n\t\treturn\n\t}\n}\n\n//查看包含标签的文档列表.\nfunc (c *LabelController) Index() {\n\tc.Prepare()\n\tc.TplName = \"label/index.tpl\"\n\n\tlabelName := c.Ctx.Input.Param(\":key\")\n\tpageIndex, _ := c.GetInt(\"page\", 1)\n\tif labelName == \"\" {\n\t\tc.Abort(\"404\")\n\t}\n\t_, err := models.NewLabel().FindFirst(\"label_name\", labelName)\n\n\tif err != nil {\n\t\tif err == orm.ErrNoRows {\n\t\t\tc.Abort(\"404\")\n\t\t} else {\n\t\t\tlogs.Error(err)\n\t\t\tc.Abort(\"500\")\n\t\t}\n\t}\n\tmemberId := 0\n\tif c.Member != nil {\n\t\tmemberId = c.Member.MemberId\n\t}\n\tsearchResult, totalCount, err := models.NewBook().FindForLabelToPager(labelName, pageIndex, conf.PageSize, memberId)\n\n\tif err != nil && err != orm.ErrNoRows {\n\t\tlogs.Error(\"查询标签时出错 ->\", err)\n\t\tc.ShowErrorPage(500, \"查询文档列表时出错\")\n\t}\n\tif totalCount > 0 {\n\t\tpager := pagination.NewPagination(c.Ctx.Request, totalCount, conf.PageSize, c.BaseUrl())\n\t\tc.Data[\"PageHtml\"] = pager.HtmlPages()\n\t} else {\n\t\tc.Data[\"PageHtml\"] = \"\"\n\t}\n\tc.Data[\"Lists\"] = searchResult\n\n\tc.Data[\"LabelName\"] = labelName\n}\n\nfunc (c *LabelController) List() {\n\tc.Prepare()\n\tc.TplName = \"label/list.tpl\"\n\n\tpageIndex, _ := c.GetInt(\"page\", 1)\n\tpageSize := 200\n\n\tlabels, totalCount, err := models.NewLabel().FindToPager(pageIndex, pageSize)\n\n\tif err != nil && err != orm.ErrNoRows {\n\t\tc.ShowErrorPage(500, err.Error())\n\t}\n\tif totalCount > 0 {\n\t\tpager := pagination.NewPagination(c.Ctx.Request, totalCount, conf.PageSize, c.BaseUrl())\n\t\tc.Data[\"PageHtml\"] = pager.HtmlPages()\n\t} else {\n\t\tc.Data[\"PageHtml\"] = \"\"\n\t}\n\tc.Data[\"TotalPages\"] = int(math.Ceil(float64(totalCount) / float64(pageSize)))\n\n\tc.Data[\"Labels\"] = labels\n}\n"
  },
  {
    "path": "controllers/ManagerController.go",
    "content": "package controllers\n\nimport (\n\t\"encoding/json\"\n\t\"html/template\"\n\t\"regexp\"\n\t\"strings\"\n\n\t\"math\"\n\t\"path/filepath\"\n\t\"strconv\"\n\n\t\"io/ioutil\"\n\t\"os\"\n\n\t\"github.com/beego/beego/v2/client/orm\"\n\t\"github.com/beego/beego/v2/core/logs\"\n\t\"github.com/beego/beego/v2/server/web\"\n\t\"github.com/beego/i18n\"\n\t\"github.com/mindoc-org/mindoc/conf\"\n\t\"github.com/mindoc-org/mindoc/models\"\n\t\"github.com/mindoc-org/mindoc/utils\"\n\t\"github.com/mindoc-org/mindoc/utils/filetil\"\n\t\"github.com/mindoc-org/mindoc/utils/pagination\"\n\t\"github.com/russross/blackfriday/v2\"\n)\n\ntype ManagerController struct {\n\tBaseController\n}\n\nfunc (c *ManagerController) Prepare() {\n\tc.BaseController.Prepare()\n\n\tif !c.Member.IsAdministrator() {\n\t\tc.Abort(\"403\")\n\t}\n}\n\nfunc (c *ManagerController) Index() {\n\tc.TplName = \"manager/index.tpl\"\n\n\tc.Data[\"Model\"] = models.NewDashboard().Query()\n\tc.Data[\"Action\"] = \"index\"\n}\n\n// 用户列表.\nfunc (c *ManagerController) Users() {\n\tc.TplName = \"manager/users.tpl\"\n\tc.Data[\"Action\"] = \"users\"\n\tpageIndex, _ := c.GetInt(\"page\", 0)\n\n\ttempMember := models.NewMember()\n\ttempMember.Lang = c.Lang\n\tmembers, totalCount, err := tempMember.FindToPager(pageIndex, conf.PageSize)\n\tif err != nil {\n\t\tc.Data[\"ErrorMessage\"] = err.Error()\n\t\treturn\n\t}\n\n\tif totalCount > 0 {\n\t\tpager := pagination.NewPagination(c.Ctx.Request, totalCount, conf.PageSize, c.BaseUrl())\n\t\tc.Data[\"PageHtml\"] = pager.HtmlPages()\n\n\t\tfor _, item := range members {\n\t\t\titem.Avatar = conf.URLForWithCdnImage(item.Avatar)\n\t\t}\n\t} else {\n\t\tc.Data[\"PageHtml\"] = \"\"\n\t}\n\n\tb, err := json.Marshal(members)\n\tif err != nil {\n\t\tc.Data[\"Result\"] = template.JS(\"[]\")\n\t} else {\n\t\tc.Data[\"Result\"] = template.JS(string(b))\n\t}\n}\n\n// 添加用户.\nfunc (c *ManagerController) CreateMember() {\n\n\taccount := strings.TrimSpace(c.GetString(\"account\"))\n\tpassword1 := strings.TrimSpace(c.GetString(\"password1\"))\n\tpassword2 := strings.TrimSpace(c.GetString(\"password2\"))\n\temail := strings.TrimSpace(c.GetString(\"email\"))\n\tphone := strings.TrimSpace(c.GetString(\"phone\"))\n\trole, _ := c.GetInt(\"role\", 1)\n\tstatus, _ := c.GetInt(\"status\", 0)\n\n\tif ok, err := regexp.MatchString(conf.RegexpAccount, account); account == \"\" || !ok || err != nil {\n\t\tc.JsonResult(6001, i18n.Tr(c.Lang, \"message.username_invalid_format\"))\n\t}\n\tif l := strings.Count(password1, \"\"); password1 == \"\" || l > 50 || l < 6 {\n\t\tc.JsonResult(6002, i18n.Tr(c.Lang, \"message.pwd_length_tips\"))\n\t}\n\tif password1 != password2 {\n\t\tc.JsonResult(6003, i18n.Tr(c.Lang, \"message.wrong_confirm_pwd\"))\n\t}\n\tif ok, err := regexp.MatchString(conf.RegexpEmail, email); !ok || err != nil || email == \"\" {\n\t\tc.JsonResult(6004, i18n.Tr(c.Lang, \"message.email_invalid_format\"))\n\t}\n\tif role != 0 && role != 1 && role != 2 {\n\t\trole = 1\n\t}\n\tif status != 0 && status != 1 {\n\t\tstatus = 0\n\t}\n\n\tmember := models.NewMember()\n\n\tif _, err := member.FindByAccount(account); err == nil && member.MemberId > 0 {\n\t\tc.JsonResult(6005, i18n.Tr(c.Lang, \"message.account_existed\"))\n\t}\n\n\tmember.Account = account\n\tmember.Password = password1\n\tmember.Role = conf.SystemRole(role)\n\tmember.Avatar = conf.GetDefaultAvatar()\n\tmember.CreateAt = c.Member.MemberId\n\tmember.Email = email\n\tmember.RealName = strings.TrimSpace(c.GetString(\"real_name\", \"\"))\n\tmember.Lang = c.Lang\n\n\tif phone != \"\" {\n\t\tmember.Phone = phone\n\t}\n\n\tif err := member.Add(); err != nil {\n\t\tc.JsonResult(6006, err.Error())\n\t}\n\n\tc.JsonResult(0, \"ok\", member)\n}\n\n// 更新用户状态.\nfunc (c *ManagerController) UpdateMemberStatus() {\n\tc.Prepare()\n\n\tmember_id, _ := c.GetInt(\"member_id\", 0)\n\tstatus, _ := c.GetInt(\"status\", 0)\n\n\tif member_id <= 0 {\n\t\tc.JsonResult(6001, i18n.Tr(c.Lang, \"message.param_error\"))\n\t}\n\tif status != 0 && status != 1 {\n\t\tstatus = 0\n\t}\n\tmember := models.NewMember()\n\n\tif _, err := member.Find(member_id); err != nil {\n\t\tc.JsonResult(6002, i18n.Tr(c.Lang, \"message.user_not_existed\"))\n\t}\n\tif member.MemberId == c.Member.MemberId {\n\t\tc.JsonResult(6004, i18n.Tr(c.Lang, \"message.cannot_change_own_status\"))\n\t}\n\tif member.Role == conf.MemberSuperRole {\n\t\tc.JsonResult(6005, i18n.Tr(c.Lang, \"message.cannot_change_super_status\"))\n\t}\n\tmember.Status = status\n\n\tif err := member.Update(); err != nil {\n\t\tlogs.Error(\"\", err)\n\t\tc.JsonResult(6003, i18n.Tr(c.Lang, \"message.failed\"))\n\t}\n\tc.JsonResult(0, \"ok\", member)\n}\n\n// 变更用户权限.\nfunc (c *ManagerController) ChangeMemberRole() {\n\tc.Prepare()\n\n\tmemberId, _ := c.GetInt(\"member_id\", 0)\n\trole, _ := c.GetInt(\"role\", 0)\n\tif memberId <= 0 {\n\t\tc.JsonResult(6001, i18n.Tr(c.Lang, \"message.param_error\"))\n\t}\n\tif role != int(conf.MemberAdminRole) && role != int(conf.MemberGeneralRole) && role != int(conf.MemberReaderRole) {\n\t\tc.JsonResult(6001, i18n.Tr(c.Lang, \"message.no_permission\"))\n\t}\n\tmember := models.NewMember()\n\n\tif _, err := member.Find(memberId); err != nil {\n\t\tc.JsonResult(6002, i18n.Tr(c.Lang, \"message.user_not_existed\"))\n\t}\n\tif member.MemberId == c.Member.MemberId {\n\t\tc.JsonResult(6004, i18n.Tr(c.Lang, \"message.cannot_change_own_priv\"))\n\t}\n\tif member.Role == conf.MemberSuperRole {\n\t\tc.JsonResult(6005, i18n.Tr(c.Lang, \"message.cannot_change_super_priv\"))\n\t}\n\tmember.Role = conf.SystemRole(role)\n\n\tif err := member.Update(); err != nil {\n\t\tc.JsonResult(6003, i18n.Tr(c.Lang, \"message.failed\"))\n\t}\n\tmember.Lang = c.Lang\n\tmember.ResolveRoleName()\n\tc.JsonResult(0, \"ok\", member)\n}\n\n// 编辑用户信息.\nfunc (c *ManagerController) EditMember() {\n\tc.Prepare()\n\tc.TplName = \"manager/edit_users.tpl\"\n\tc.Data[\"Action\"] = \"users\"\n\tmember_id, _ := c.GetInt(\":id\", 0)\n\n\tif member_id <= 0 {\n\t\tc.Abort(\"404\")\n\t}\n\n\tmember, err := models.NewMember().Find(member_id)\n\tif err != nil {\n\t\tlogs.Error(err)\n\t\tc.Abort(\"404\")\n\t}\n\tif c.Ctx.Input.IsPost() {\n\t\tpassword1 := c.GetString(\"password1\")\n\t\tpassword2 := c.GetString(\"password2\")\n\t\temail := c.GetString(\"email\")\n\t\tphone := c.GetString(\"phone\")\n\t\tdescription := c.GetString(\"description\")\n\t\tmember.Email = email\n\t\tmember.Phone = phone\n\t\tmember.Description = description\n\t\tmember.RealName = c.GetString(\"real_name\")\n\t\tif password1 != \"\" && password2 != password1 {\n\t\t\tc.JsonResult(6001, i18n.Tr(c.Lang, \"message.wrong_confirm_pwd\"))\n\t\t}\n\t\tif password1 != \"\" && member.AuthMethod != conf.AuthMethodLDAP {\n\t\t\tmember.Password = password1\n\t\t}\n\t\tif err := member.Valid(password1 == \"\"); err != nil {\n\t\t\tc.JsonResult(6002, err.Error())\n\t\t}\n\t\tif password1 != \"\" {\n\t\t\tpassword, err := utils.PasswordHash(password1)\n\t\t\tif err != nil {\n\t\t\t\tlogs.Error(err)\n\t\t\t\tc.JsonResult(6003, i18n.Tr(c.Lang, \"message.pwd_encrypt_failed\"))\n\t\t\t}\n\t\t\tmember.Password = password\n\t\t}\n\t\tif err := member.Update(); err != nil {\n\t\t\tc.JsonResult(6004, err.Error())\n\t\t}\n\t\tc.JsonResult(0, \"ok\")\n\t}\n\n\tc.Data[\"Model\"] = member\n}\n\n// 删除一个用户，并将该用户的所有信息转移到超级管理员上.\nfunc (c *ManagerController) DeleteMember() {\n\tc.Prepare()\n\tmember_id, _ := c.GetInt(\"id\", 0)\n\n\tif member_id <= 0 {\n\t\tc.JsonResult(404, i18n.Tr(c.Lang, \"message.param_error\"))\n\t}\n\n\tmember, err := models.NewMember().Find(member_id)\n\tif err != nil {\n\t\tlogs.Error(err)\n\t\tc.JsonResult(500, i18n.Tr(c.Lang, \"message.user_not_existed\"))\n\t}\n\tif member.Role == conf.MemberSuperRole {\n\t\tc.JsonResult(500, \"不能删除超级管理员\")\n\t}\n\n\tsuperMember, err := models.NewMember().FindByFieldFirst(\"role\", 0)\n\tif err != nil {\n\t\tlogs.Error(err)\n\t\tc.JsonResult(5001, \"未能找到超级管理员\")\n\t}\n\n\terr = models.NewMember().Delete(member_id, superMember.MemberId)\n\tif err != nil {\n\t\tlogs.Error(err)\n\t\tc.JsonResult(5002, i18n.Tr(c.Lang, \"message.failed\"))\n\t}\n\tc.JsonResult(0, \"ok\")\n}\n\n// 项目列表.\nfunc (c *ManagerController) Books() {\n\tc.Prepare()\n\tc.TplName = \"manager/books.tpl\"\n\tc.Data[\"Action\"] = \"books\"\n\tpageIndex, _ := c.GetInt(\"page\", 1)\n\n\tbooks, totalCount, err := models.NewBookResult().FindToPager(pageIndex, conf.PageSize)\n\n\tif err != nil {\n\t\tc.Abort(\"500\")\n\t}\n\n\tif totalCount > 0 {\n\t\t//html := utils.GetPagerHtml(c.Ctx.Request.RequestURI, pageIndex, 8, totalCount)\n\n\t\tpager := pagination.NewPagination(c.Ctx.Request, totalCount, conf.PageSize, c.BaseUrl())\n\n\t\tc.Data[\"PageHtml\"] = pager.HtmlPages()\n\t} else {\n\t\tc.Data[\"PageHtml\"] = \"\"\n\t}\n\tfor i, book := range books {\n\t\tbooks[i].Description = utils.StripTags(string(blackfriday.Run([]byte(book.Description))))\n\t\tbooks[i].ModifyTime = book.ModifyTime.Local()\n\t\tbooks[i].CreateTime = book.CreateTime.Local()\n\t}\n\tc.Data[\"Lists\"] = books\n}\n\n// 编辑项目.\nfunc (c *ManagerController) EditBook() {\n\tc.Prepare()\n\n\tc.TplName = \"manager/edit_book.tpl\"\n\tc.Data[\"Action\"] = \"books\"\n\tidentify := c.GetString(\":key\")\n\n\tif identify == \"\" {\n\t\tc.Abort(\"404\")\n\t}\n\tbook, err := models.NewBook().FindByFieldFirst(\"identify\", identify)\n\tif err != nil {\n\t\tc.Abort(\"500\")\n\t}\n\n\tif c.Ctx.Input.IsPost() {\n\t\tbookName := strings.TrimSpace(c.GetString(\"book_name\"))\n\t\tdescription := strings.TrimSpace(c.GetString(\"description\", \"\"))\n\t\tcommentStatus := c.GetString(\"comment_status\")\n\t\ttag := strings.TrimSpace(c.GetString(\"label\"))\n\t\torderIndex, _ := c.GetInt(\"order_index\", 0)\n\t\tisDownload := strings.TrimSpace(c.GetString(\"is_download\")) == \"on\"\n\t\tenableShare := strings.TrimSpace(c.GetString(\"enable_share\")) == \"on\"\n\t\tisUseFirstDocument := strings.TrimSpace(c.GetString(\"is_use_first_document\")) == \"on\"\n\t\tautoRelease := strings.TrimSpace(c.GetString(\"auto_release\")) == \"on\"\n\t\tpublisher := strings.TrimSpace(c.GetString(\"publisher\"))\n\t\thistoryCount, _ := c.GetInt(\"history_count\", 0)\n\t\titemId, _ := c.GetInt(\"itemId\")\n\n\t\tif strings.Count(description, \"\") > 500 {\n\t\t\tc.JsonResult(6004, i18n.Tr(c.Lang, \"message.project_desc_tips\"))\n\t\t}\n\t\tif commentStatus != \"open\" && commentStatus != \"closed\" && commentStatus != \"group_only\" && commentStatus != \"registered_only\" {\n\t\t\tcommentStatus = \"closed\"\n\t\t}\n\t\tif tag != \"\" {\n\t\t\ttags := strings.Split(tag, \";\")\n\t\t\tif len(tags) > 10 {\n\t\t\t\tc.JsonResult(6005, \"最多允许添加10个标签\")\n\t\t\t}\n\t\t}\n\t\tif !models.NewItemsets().Exist(itemId) {\n\t\t\tc.JsonResult(6006, i18n.Tr(c.Lang, \"message.project_space_not_exist\"))\n\t\t}\n\t\tbook.Publisher = publisher\n\t\tbook.HistoryCount = historyCount\n\t\tbook.BookName = bookName\n\t\tbook.Description = description\n\t\tbook.CommentStatus = commentStatus\n\t\tbook.Label = tag\n\t\tbook.OrderIndex = orderIndex\n\t\tbook.ItemId = itemId\n\t\tbook.BookPassword = strings.TrimSpace(c.GetString(\"bPassword\"))\n\n\t\tif autoRelease {\n\t\t\tbook.AutoRelease = 1\n\t\t} else {\n\t\t\tbook.AutoRelease = 0\n\t\t}\n\t\tif isDownload {\n\t\t\tbook.IsDownload = 0\n\t\t} else {\n\t\t\tbook.IsDownload = 1\n\t\t}\n\t\tif enableShare {\n\t\t\tbook.IsEnableShare = 0\n\t\t} else {\n\t\t\tbook.IsEnableShare = 1\n\t\t}\n\t\tif isUseFirstDocument {\n\t\t\tbook.IsUseFirstDocument = 1\n\t\t} else {\n\t\t\tbook.IsUseFirstDocument = 0\n\t\t}\n\n\t\tif err := book.Update(); err != nil {\n\t\t\tc.JsonResult(6006, i18n.Tr(c.Lang, \"message.failed\"))\n\t\t}\n\t\tc.JsonResult(0, \"ok\")\n\t}\n\tif book.PrivateToken != \"\" {\n\t\tbook.PrivateToken = conf.URLFor(\"DocumentController.Index\", \":key\", book.Identify, \"token\", book.PrivateToken)\n\t}\n\tbookResult := models.NewBookResult()\n\tbookResult.ToBookResult(*book)\n\n\tc.Data[\"Model\"] = bookResult\n}\n\n// 删除项目.\nfunc (c *ManagerController) DeleteBook() {\n\tc.Prepare()\n\n\tbookId, _ := c.GetInt(\"book_id\", 0)\n\n\tif bookId <= 0 {\n\t\tc.JsonResult(6001, i18n.Tr(c.Lang, \"message.param_error\"))\n\t}\n\tbook := models.NewBook()\n\n\terr := book.ThoroughDeleteBook(bookId)\n\n\tif err == orm.ErrNoRows {\n\t\tc.JsonResult(6002, i18n.Tr(c.Lang, \"message.item_not_exist\"))\n\t}\n\tif err != nil {\n\t\tlogs.Error(\"删除失败 -> \", err)\n\t\tc.JsonResult(6003, i18n.Tr(c.Lang, \"message.failed\"))\n\t}\n\tc.JsonResult(0, \"ok\")\n}\n\n// CreateToken 创建访问来令牌.\nfunc (c *ManagerController) CreateToken() {\n\tc.Prepare()\n\taction := c.GetString(\"action\")\n\n\tidentify := c.GetString(\"identify\")\n\n\tbook, err := models.NewBook().FindByFieldFirst(\"identify\", identify)\n\n\tif err != nil {\n\t\tc.JsonResult(6001, i18n.Tr(c.Lang, \"message.item_not_exist\"))\n\t}\n\tif action == \"create\" {\n\n\t\tif book.PrivatelyOwned == 0 {\n\t\t\tc.JsonResult(6001, \"公开项目不能创建阅读令牌\")\n\t\t}\n\n\t\tbook.PrivateToken = string(utils.Krand(conf.GetTokenSize(), utils.KC_RAND_KIND_ALL))\n\t\tif err := book.Update(); err != nil {\n\t\t\tlogs.Error(\"生成阅读令牌失败 => \", err)\n\t\t\tc.JsonResult(6003, i18n.Tr(c.Lang, \"message.failed\"))\n\t\t}\n\t\tc.JsonResult(0, \"ok\", conf.URLFor(\"DocumentController.Index\", \":key\", book.Identify, \"token\", book.PrivateToken))\n\t} else {\n\t\tbook.PrivateToken = \"\"\n\t\tif err := book.Update(); err != nil {\n\t\t\tlogs.Error(\"CreateToken => \", err)\n\t\t\tc.JsonResult(6004, i18n.Tr(c.Lang, \"message.failed\"))\n\t\t}\n\t\tc.JsonResult(0, \"ok\", \"\")\n\t}\n}\n\n// 项目设置.\nfunc (c *ManagerController) Setting() {\n\tc.Prepare()\n\tc.TplName = \"manager/setting.tpl\"\n\tc.Data[\"Action\"] = \"setting\"\n\toptions, err := models.NewOption().All()\n\n\tif c.Ctx.Input.IsPost() {\n\t\tfor _, item := range options {\n\t\t\titem.OptionValue = c.GetString(item.OptionName)\n\t\t\titem.InsertOrUpdate()\n\t\t}\n\t\tc.JsonResult(0, \"ok\")\n\t}\n\n\tif err != nil {\n\t\tc.Abort(\"500\")\n\t}\n\tc.Data[\"SITE_TITLE\"] = c.Option[\"SITE_NAME\"]\n\n\tfor _, item := range options {\n\t\tc.Data[item.OptionName] = item.OptionValue\n\t}\n\n\ti18nMapStrs, err := web.AppConfig.String(\"i18n_map\")\n\tif err != nil {\n\t\tlogs.Error(\"web.AppConfig `i18n_map` not found\")\n\t\ti18nMapStrs = \"{}\"\n\t}\n\tvar i18nMap map[string]string\n\terr = json.Unmarshal([]byte(i18nMapStrs), &i18nMap)\n\tif err != nil {\n\t\tlogs.Error(\"json `i18nList` Unmarshal fail\")\n\t\ti18nMap = make(map[string]string)\n\t}\n\tc.Data[\"i18n_map\"] = i18nMap\n}\n\n// Transfer 转让项目.\nfunc (c *ManagerController) Transfer() {\n\tc.Prepare()\n\taccount := c.GetString(\"account\")\n\n\tif account == \"\" {\n\t\tc.JsonResult(6004, i18n.Tr(c.Lang, \"message.receive_account_empty\"))\n\t}\n\tmember, err := models.NewMember().FindByAccount(account)\n\n\tif err != nil {\n\t\tlogs.Error(\"FindByAccount => \", err)\n\t\tc.JsonResult(6005, i18n.Tr(c.Lang, \"message.receive_account_not_exist\"))\n\t}\n\tif member.Status != 0 {\n\t\tc.JsonResult(6006, i18n.Tr(c.Lang, \"message.receive_account_disabled\"))\n\t}\n\n\tif !c.Member.IsAdministrator() {\n\t\tc.Abort(\"403\")\n\t}\n\n\tidentify := c.GetString(\"identify\")\n\n\tbook, err := models.NewBook().FindByFieldFirst(\"identify\", identify)\n\tif err != nil {\n\t\tc.JsonResult(6001, err.Error())\n\t}\n\trel, err := models.NewRelationship().FindFounder(book.BookId)\n\n\tif err != nil {\n\t\tlogs.Error(\"FindFounder => \", err)\n\t\tc.JsonResult(6009, \"查询项目创始人失败\")\n\t}\n\tif member.MemberId == rel.MemberId {\n\t\tc.JsonResult(6007, \"不能转让给自己\")\n\t}\n\n\terr = models.NewRelationship().Transfer(book.BookId, rel.MemberId, member.MemberId)\n\n\tif err != nil {\n\t\tlogs.Error(\"Transfer => \", err)\n\t\tc.JsonResult(6008, err.Error())\n\t}\n\tc.JsonResult(0, \"ok\")\n}\n\nfunc (c *ManagerController) Comments() {\n\tc.Prepare()\n\tc.TplName = \"manager/comments.tpl\"\n\tif !c.Member.IsAdministrator() {\n\t\tc.Abort(\"403\")\n\t}\n\n}\n\n// DeleteComment 标记评论为已删除\nfunc (c *ManagerController) DeleteComment() {\n\tc.Prepare()\n\n\tcomment_id, _ := c.GetInt(\"comment_id\", 0)\n\n\tif comment_id <= 0 {\n\t\tc.JsonResult(6001, i18n.Tr(c.Lang, \"message.param_error\"))\n\t}\n\n\tcomment := models.NewComment()\n\n\tif _, err := comment.Find(comment_id); err != nil {\n\t\tc.JsonResult(6002, \"评论不存在\")\n\t}\n\n\tcomment.Approved = 3\n\n\tif err := comment.Update(\"approved\"); err != nil {\n\t\tc.JsonResult(6003, \"删除评论失败\")\n\t}\n\tc.JsonResult(0, \"ok\", comment)\n}\n\n// 设置项目私有状态.\nfunc (c *ManagerController) PrivatelyOwned() {\n\tc.Prepare()\n\tstatus := c.GetString(\"status\")\n\tidentify := c.GetString(\"identify\")\n\n\tif status != \"open\" && status != \"close\" {\n\t\tc.JsonResult(6003, i18n.Tr(c.Lang, \"message.param_error\"))\n\t}\n\tstate := 0\n\tif status == \"open\" {\n\t\tstate = 0\n\t} else {\n\t\tstate = 1\n\t}\n\n\tif !c.Member.IsAdministrator() {\n\t\tc.Abort(\"403\")\n\t}\n\n\tbook, err := models.NewBook().FindByFieldFirst(\"identify\", identify)\n\tif err != nil {\n\t\tc.JsonResult(6001, err.Error())\n\t}\n\n\tbook.PrivatelyOwned = state\n\n\tlogs.Info(\"\", state, status)\n\n\terr = book.Update()\n\n\tif err != nil {\n\t\tlogs.Error(\"PrivatelyOwned => \", err)\n\t\tc.JsonResult(6004, i18n.Tr(c.Lang, \"message.failed\"))\n\t}\n\tc.JsonResult(0, \"ok\")\n}\n\n// 附件列表.\nfunc (c *ManagerController) AttachList() {\n\tc.Prepare()\n\tc.TplName = \"manager/attach_list.tpl\"\n\tc.Data[\"Action\"] = \"attach\"\n\n\tpageIndex, _ := c.GetInt(\"page\", 1)\n\n\tattachList, totalCount, err := models.NewAttachment().FindToPager(pageIndex, conf.PageSize)\n\n\tif err != nil {\n\t\tc.Abort(\"500\")\n\t}\n\n\tif totalCount > 0 {\n\t\tpager := pagination.NewPagination(c.Ctx.Request, totalCount, conf.PageSize, c.BaseUrl())\n\t\tc.Data[\"PageHtml\"] = pager.HtmlPages()\n\t} else {\n\t\tc.Data[\"PageHtml\"] = \"\"\n\t}\n\n\tfor _, item := range attachList {\n\n\t\tp := filepath.Join(conf.WorkingDirectory, item.FilePath)\n\n\t\titem.IsExist = filetil.FileExists(p)\n\n\t}\n\tc.Data[\"Lists\"] = attachList\n}\n\n// 附件清理.\nfunc (c *ManagerController) AttachClean() {\n\tc.Prepare()\n\n\tattachList, _, err := models.NewAttachment().FindToPager(0, 0)\n\n\tif err != nil {\n\t\tc.Abort(\"500\")\n\t}\n\n\tfor _, item := range attachList {\n\n\t\tp := filepath.Join(conf.WorkingDirectory, item.FilePath)\n\n\t\titem.IsExist = filetil.FileExists(p)\n\t\tif item.IsExist {\n\t\t\t// 判断\n\t\t\tsearchList, err := models.NewDocumentSearchResult().SearchAllDocument(item.HttpPath)\n\t\t\tif err != nil {\n\t\t\t\tc.Abort(\"500\")\n\t\t\t} else if len(searchList) == 0 {\n\t\t\t\tlogs.Info(\"delete file:\", item.FilePath)\n\t\t\t\titem.FilePath = p\n\t\t\t\tif err := item.Delete(); err != nil {\n\t\t\t\t\tlogs.Error(\"AttachDelete => \", err)\n\t\t\t\t\tc.JsonResult(6002, err.Error())\n\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tc.JsonResult(0, \"ok\")\n}\n\n// 附件详情.\nfunc (c *ManagerController) AttachDetailed() {\n\tc.Prepare()\n\tc.TplName = \"manager/attach_detailed.tpl\"\n\tc.Data[\"Action\"] = \"attach\"\n\n\tattach_id, _ := strconv.Atoi(c.Ctx.Input.Param(\":id\"))\n\tif attach_id <= 0 {\n\t\tc.Abort(\"404\")\n\t}\n\n\tattach, err := models.NewAttachmentResult().Find(attach_id)\n\tif err != nil {\n\t\tlogs.Error(\"AttachDetailed => \", err)\n\t\tif err == orm.ErrNoRows {\n\t\t\tc.Abort(\"404\")\n\t\t} else {\n\t\t\tc.Abort(\"500\")\n\t\t}\n\t}\n\n\tattach.FilePath = filepath.Join(conf.WorkingDirectory, attach.FilePath)\n\tattach.HttpPath = conf.URLForWithCdnImage(attach.HttpPath)\n\n\tattach.IsExist = filetil.FileExists(attach.FilePath)\n\n\tc.Data[\"Model\"] = attach\n}\n\n// 删除附件.\nfunc (c *ManagerController) AttachDelete() {\n\tc.Prepare()\n\tattachId, _ := c.GetInt(\"attach_id\")\n\n\tif attachId <= 0 {\n\t\tc.Abort(\"404\")\n\t}\n\tattach, err := models.NewAttachment().Find(attachId)\n\n\tif err != nil {\n\t\tlogs.Error(\"AttachDelete => \", err)\n\t\tc.JsonResult(6001, err.Error())\n\t}\n\tattach.FilePath = filepath.Join(conf.WorkingDirectory, attach.FilePath)\n\n\tif err := attach.Delete(); err != nil {\n\t\tlogs.Error(\"AttachDelete => \", err)\n\t\tc.JsonResult(6002, err.Error())\n\t}\n\tc.JsonResult(0, \"ok\")\n}\n\n// 标签列表\nfunc (c *ManagerController) LabelList() {\n\tc.Prepare()\n\tc.TplName = \"manager/label_list.tpl\"\n\tc.Data[\"Action\"] = \"label\"\n\tpageIndex, _ := c.GetInt(\"page\", 1)\n\n\tlabels, totalCount, err := models.NewLabel().FindToPager(pageIndex, conf.PageSize)\n\tif err != nil {\n\t\tc.ShowErrorPage(50001, err.Error())\n\t}\n\tif totalCount > 0 {\n\t\tpager := pagination.NewPagination(c.Ctx.Request, totalCount, conf.PageSize, c.BaseUrl())\n\t\tc.Data[\"PageHtml\"] = pager.HtmlPages()\n\t} else {\n\t\tc.Data[\"PageHtml\"] = \"\"\n\t}\n\tc.Data[\"TotalPages\"] = int(math.Ceil(float64(totalCount) / float64(conf.PageSize)))\n\n\tc.Data[\"Lists\"] = labels\n}\n\n// 删除标签\nfunc (c *ManagerController) LabelDelete() {\n\tlabelId, err := strconv.Atoi(c.Ctx.Input.Param(\":id\"))\n\tif err != nil {\n\t\tlogs.Error(\"获取删除标签参数时出错:\", err)\n\t\tc.JsonResult(50001, i18n.Tr(c.Lang, \"message.param_error\"))\n\t}\n\tif labelId <= 0 {\n\t\tc.JsonResult(50001, i18n.Tr(c.Lang, \"message.param_error\"))\n\t}\n\n\tlabel, err := models.NewLabel().FindFirst(\"label_id\", labelId)\n\tif err != nil {\n\t\tlogs.Error(\"查询标签时出错:\", err)\n\t\tc.JsonResult(50001, \"查询标签时出错:\"+err.Error())\n\t}\n\tif err := label.Delete(); err != nil {\n\t\tc.JsonResult(50002, \"删除失败:\"+err.Error())\n\t} else {\n\t\tc.JsonResult(0, \"ok\")\n\t}\n}\n\nfunc (c *ManagerController) Config() {\n\tc.Prepare()\n\tc.TplName = \"manager/config.tpl\"\n\tc.Data[\"Action\"] = \"config\"\n\tif c.Ctx.Input.IsPost() {\n\t\tcontent := strings.TrimSpace(c.GetString(\"configFileTextArea\"))\n\t\tif content == \"\" {\n\t\t\tc.JsonResult(500, \"配置文件不能为空\")\n\t\t}\n\t\ttf, err := ioutil.TempFile(os.TempDir(), \"mindoc\")\n\n\t\tif err != nil {\n\t\t\tlogs.Error(\"创建临时文件失败 ->\", err)\n\t\t\tc.JsonResult(5001, \"创建临时文件失败\")\n\t\t}\n\t\tdefer tf.Close()\n\n\t\ttf.WriteString(content)\n\n\t\terr = web.LoadAppConfig(\"ini\", tf.Name())\n\n\t\tif err != nil {\n\t\t\tlogs.Error(\"加载配置文件失败 ->\", err)\n\t\t\tc.JsonResult(5002, \"加载配置文件失败\")\n\t\t}\n\t\terr = filetil.CopyFile(tf.Name(), conf.ConfigurationFile)\n\t\tif err != nil {\n\t\t\tlogs.Error(\"保存配置文件失败 ->\", err)\n\t\t\tc.JsonResult(5003, \"保存配置文件失败\")\n\t\t}\n\t\tc.JsonResult(0, \"保存成功\")\n\t}\n\tc.Data[\"ConfigContent\"] = \"\"\n\tif b, err := ioutil.ReadFile(conf.ConfigurationFile); err == nil {\n\t\tc.Data[\"ConfigContent\"] = string(b)\n\t}\n}\n\nfunc (c *ManagerController) Team() {\n\tc.Prepare()\n\tc.TplName = \"manager/team.tpl\"\n\tc.Data[\"Action\"] = \"team\"\n\tpageIndex, _ := c.GetInt(\"page\", 0)\n\n\tteams, totalCount, err := models.NewTeam().FindToPager(pageIndex, conf.PageSize)\n\tif err != nil && err != orm.ErrNoRows {\n\t\tc.ShowErrorPage(500, err.Error())\n\t}\n\tif err == orm.ErrNoRows || len(teams) <= 0 {\n\t\tc.Data[\"Result\"] = template.JS(\"[]\")\n\t\tc.Data[\"PageHtml\"] = \"\"\n\t\treturn\n\t}\n\n\tif totalCount > 0 {\n\t\tpager := pagination.NewPagination(c.Ctx.Request, totalCount, conf.PageSize, c.BaseUrl())\n\t\tc.Data[\"PageHtml\"] = pager.HtmlPages()\n\t} else {\n\t\tc.Data[\"PageHtml\"] = \"\"\n\t}\n\n\tb, err := json.Marshal(teams)\n\tif err != nil {\n\t\tc.Data[\"Result\"] = template.JS(\"[]\")\n\t} else {\n\t\tc.Data[\"Result\"] = template.JS(string(b))\n\t}\n}\n\nfunc (c *ManagerController) TeamCreate() {\n\tc.Prepare()\n\n\tteamName := c.GetString(\"teamName\")\n\n\tif teamName == \"\" {\n\t\tc.JsonResult(5001, i18n.Tr(c.Lang, \"message.team_name_empty\"))\n\t}\n\tteam := models.NewTeam()\n\n\tteam.MemberId = c.Member.MemberId\n\tteam.TeamName = teamName\n\n\tif err := team.Save(); err == nil {\n\t\tc.JsonResult(0, \"OK\", team)\n\t} else {\n\t\tc.JsonResult(5002, err.Error())\n\t}\n\n}\n\nfunc (c *ManagerController) TeamEdit() {\n\tc.Prepare()\n\tteamName := c.GetString(\"teamName\")\n\tteamId, _ := c.GetInt(\"teamId\")\n\n\tif teamName == \"\" {\n\t\tc.JsonResult(5001, i18n.Tr(c.Lang, \"message.team_name_empty\"))\n\t}\n\tif teamId <= 0 {\n\t\tc.JsonResult(5002, i18n.Tr(c.Lang, \"message.team_id_empty\"))\n\t}\n\tteam, err := models.NewTeam().First(teamId)\n\n\tc.CheckJsonError(5003, err)\n\n\tteam.TeamName = teamName\n\n\terr = team.Save()\n\n\tc.CheckJsonError(5004, err)\n\n\tc.JsonResult(0, \"OK\", team)\n}\n\nfunc (c *ManagerController) TeamDelete() {\n\tc.Prepare()\n\n\tteamId, _ := c.GetInt(\"teamId\")\n\tif teamId <= 0 {\n\t\tc.JsonResult(5002, i18n.Tr(c.Lang, \"message.team_id_empty\"))\n\t}\n\terr := models.NewTeam().Delete(teamId)\n\tc.CheckJsonError(5001, err)\n\n\tc.JsonResult(0, \"OK\")\n}\n\nfunc (c *ManagerController) TeamMemberList() {\n\tc.Prepare()\n\tc.TplName = \"manager/team_member_list.tpl\"\n\tc.Data[\"Action\"] = \"team\"\n\tteamId, _ := strconv.Atoi(c.Ctx.Input.Param(\":id\"))\n\tif teamId <= 0 {\n\t\tc.ShowErrorPage(500, i18n.Tr(c.Lang, \"message.param_error\"))\n\t}\n\tpageIndex, _ := c.GetInt(\"page\", 0)\n\n\tteam, err := models.NewTeam().First(teamId)\n\tif err == orm.ErrNoRows {\n\t\tc.ShowErrorPage(404, \"团队不存在\")\n\t}\n\tc.CheckErrorResult(500, err)\n\tc.Data[\"Model\"] = team\n\n\tteams, totalCount, err := models.NewTeamMember().SetLang(c.Lang).FindToPager(teamId, pageIndex, conf.PageSize)\n\tif err != nil && err != orm.ErrNoRows {\n\t\tc.ShowErrorPage(500, err.Error())\n\t}\n\tif err == orm.ErrNoRows || len(teams) <= 0 {\n\t\tc.Data[\"Result\"] = template.JS(\"[]\")\n\t\tc.Data[\"PageHtml\"] = \"\"\n\t\treturn\n\t}\n\n\tif totalCount > 0 {\n\t\tpager := pagination.NewPagination(c.Ctx.Request, totalCount, conf.PageSize, c.BaseUrl())\n\t\tc.Data[\"PageHtml\"] = pager.HtmlPages()\n\t} else {\n\t\tc.Data[\"PageHtml\"] = \"\"\n\t}\n\n\tb, err := json.Marshal(teams)\n\tif err != nil {\n\t\tlogs.Error(\"编码 JSON 结果失败 ->\", err)\n\t\tc.Data[\"Result\"] = template.JS(\"[]\")\n\t} else {\n\t\tc.Data[\"Result\"] = template.JS(string(b))\n\t}\n}\n\n// 搜索团队用户.\nfunc (c *ManagerController) TeamSearchMember() {\n\tc.Prepare()\n\n\tteamId, _ := c.GetInt(\"teamId\")\n\tkeyword := strings.TrimSpace(c.GetString(\"q\"))\n\n\tif teamId <= 0 {\n\t\tc.JsonResult(500, i18n.Tr(c.Lang, \"message.param_error\"))\n\t}\n\n\tsearchResult, err := models.NewTeamMember().FindNotJoinMemberByAccount(teamId, keyword, 10)\n\n\tif err != nil {\n\t\tc.JsonResult(500, err.Error())\n\t}\n\tc.JsonResult(0, \"OK\", searchResult)\n}\n\nfunc (c *ManagerController) TeamMemberAdd() {\n\tc.Prepare()\n\tteamId, _ := c.GetInt(\"teamId\")\n\tmemberId, _ := c.GetInt(\"memberId\")\n\troleId, _ := c.GetInt(\"roleId\")\n\n\tif teamId <= 0 || memberId <= 0 || roleId <= 0 || roleId > int(conf.BookObserver) {\n\t\tc.JsonResult(5001, i18n.Tr(c.Lang, \"message.system_error\"))\n\t}\n\n\tteamMember := models.NewTeamMember()\n\tteamMember.MemberId = memberId\n\tteamMember.TeamId = teamId\n\tteamMember.RoleId = conf.BookRole(roleId)\n\n\tif err := teamMember.Save(); err != nil {\n\t\tc.CheckJsonError(5001, err)\n\t}\n\n\tteamMember.Include()\n\n\tc.JsonResult(0, \"OK\", teamMember)\n}\n\nfunc (c *ManagerController) TeamMemberDelete() {\n\tc.Prepare()\n\tmemberId, _ := c.GetInt(\"memberId\")\n\tteamId, _ := c.GetInt(\"teamId\")\n\n\tteamMember, err := models.NewTeamMember().FindFirst(teamId, memberId)\n\n\tif err != nil {\n\t\tc.JsonResult(5001, \"用户不存在或已禁用\")\n\t}\n\terr = teamMember.Delete(teamMember.TeamMemberId)\n\tif err != nil {\n\t\tc.JsonResult(5002, i18n.Tr(c.Lang, \"message.failed\"))\n\t}\n\tc.JsonResult(0, \"ok\")\n}\n\nfunc (c *ManagerController) TeamChangeMemberRole() {\n\tc.Prepare()\n\tmemberId, _ := c.GetInt(\"memberId\")\n\troleId, _ := c.GetInt(\"roleId\")\n\tteamId, _ := c.GetInt(\"teamId\")\n\tif memberId <= 0 || roleId <= 0 || teamId <= 0 || roleId > int(conf.BookObserver) {\n\t\tc.JsonResult(5001, i18n.Tr(c.Lang, \"message.param_error\"))\n\t}\n\tteamMember, err := models.NewTeamMember().ChangeRoleId(teamId, memberId, conf.BookRole(roleId))\n\n\tif err != nil {\n\t\tc.JsonResult(5002, err.Error())\n\t} else {\n\t\tteamMember.SetLang(c.Lang).Include()\n\t\tc.JsonResult(0, \"OK\", teamMember)\n\t}\n}\n\n// 团队项目列表.\nfunc (c *ManagerController) TeamBookList() {\n\tc.Prepare()\n\tc.TplName = \"manager/team_book_list.tpl\"\n\tc.Data[\"Action\"] = \"team\"\n\tteamId, _ := strconv.Atoi(c.Ctx.Input.Param(\":id\"))\n\tpageIndex, _ := c.GetInt(\"page\", 0)\n\n\tif teamId <= 0 {\n\t\tc.JsonResult(5002, i18n.Tr(c.Lang, \"message.team_id_empty\"))\n\t}\n\n\tteam, err := models.NewTeam().First(teamId)\n\n\tif err == orm.ErrNoRows {\n\t\tc.ShowErrorPage(404, \"团队不存在\")\n\t}\n\tc.CheckErrorResult(500, err)\n\tc.Data[\"Model\"] = team\n\n\tteams, totalCount, err := models.NewTeamRelationship().FindToPager(teamId, pageIndex, conf.PageSize)\n\n\tif err != nil && err != orm.ErrNoRows {\n\t\tc.ShowErrorPage(500, err.Error())\n\t}\n\tif err == orm.ErrNoRows || len(teams) <= 0 {\n\t\tc.Data[\"Result\"] = template.JS(\"[]\")\n\t\tc.Data[\"PageHtml\"] = \"\"\n\t\treturn\n\t}\n\n\tif totalCount > 0 {\n\t\tpager := pagination.NewPagination(c.Ctx.Request, totalCount, conf.PageSize, c.BaseUrl())\n\t\tc.Data[\"PageHtml\"] = pager.HtmlPages()\n\t} else {\n\t\tc.Data[\"PageHtml\"] = \"\"\n\t}\n\n\tb, err := json.Marshal(teams)\n\tif err != nil {\n\t\tlogs.Error(\"编码 JSON 结果失败 ->\", err)\n\t\tc.Data[\"Result\"] = template.JS(\"[]\")\n\t} else {\n\t\tc.Data[\"Result\"] = template.JS(string(b))\n\t}\n}\n\n// 给团队增加项目.\nfunc (c *ManagerController) TeamBookAdd() {\n\tc.Prepare()\n\n\tteamId, _ := c.GetInt(\"teamId\")\n\tbookId, _ := c.GetInt(\"bookId\")\n\n\tif teamId <= 0 || bookId <= 0 {\n\t\tc.JsonResult(500, i18n.Tr(c.Lang, \"message.param_error\"))\n\t}\n\tteamRel := models.NewTeamRelationship()\n\tteamRel.BookId = bookId\n\tteamRel.TeamId = teamId\n\n\terr := teamRel.Save()\n\n\tif err != nil {\n\t\tc.JsonResult(5001, err.Error())\n\t} else {\n\t\tteamRel.Include()\n\t\tc.JsonResult(0, \"OK\", teamRel)\n\t}\n}\n\n// 搜索未参与的项目.\nfunc (c *ManagerController) TeamSearchBook() {\n\tc.Prepare()\n\n\tteamId, _ := c.GetInt(\"teamId\")\n\tkeyword := strings.TrimSpace(c.GetString(\"q\"))\n\n\tif teamId <= 0 {\n\t\tc.JsonResult(500, i18n.Tr(c.Lang, \"message.param_error\"))\n\t}\n\n\tsearchResult, err := models.NewTeamRelationship().FindNotJoinBookByName(teamId, keyword, 10)\n\n\tif err != nil {\n\t\tc.JsonResult(500, err.Error())\n\t}\n\tc.JsonResult(0, \"OK\", searchResult)\n\n}\n\n// 删除团队项目.\nfunc (c *ManagerController) TeamBookDelete() {\n\tc.Prepare()\n\tteamRelationshipId, _ := c.GetInt(\"teamRelId\")\n\n\tif teamRelationshipId <= 0 {\n\t\tc.JsonResult(500, i18n.Tr(c.Lang, \"message.param_error\"))\n\t}\n\n\terr := models.NewTeamRelationship().Delete(teamRelationshipId)\n\n\tif err != nil {\n\t\tc.JsonResult(5001, i18n.Tr(c.Lang, \"message.failed\"))\n\t}\n\tc.JsonResult(0, \"OK\")\n}\n\n// 项目空间列表.\nfunc (c *ManagerController) Itemsets() {\n\tc.Prepare()\n\tc.TplName = \"manager/itemsets.tpl\"\n\tc.Data[\"Action\"] = \"itemsets\"\n\tpageIndex, _ := c.GetInt(\"page\", 0)\n\n\titems, totalCount, err := models.NewItemsets().FindToPager(pageIndex, conf.PageSize)\n\n\tif err != nil && err != orm.ErrNoRows {\n\t\tc.ShowErrorPage(500, err.Error())\n\t}\n\tif err == orm.ErrNoRows || len(items) <= 0 {\n\t\tc.Data[\"Lists\"] = items\n\t\tc.Data[\"PageHtml\"] = \"\"\n\t\treturn\n\t}\n\n\tif totalCount > 0 {\n\t\tpager := pagination.NewPagination(c.Ctx.Request, totalCount, conf.PageSize, c.BaseUrl())\n\t\tc.Data[\"PageHtml\"] = pager.HtmlPages()\n\t} else {\n\t\tc.Data[\"PageHtml\"] = \"\"\n\t}\n\n\tc.Data[\"Lists\"] = items\n}\n\n// 编辑或添加项目空间.\nfunc (c *ManagerController) ItemsetsEdit() {\n\tc.Prepare()\n\titemId, _ := c.GetInt(\"itemId\")\n\titemName := strings.TrimSpace(c.GetString(\"itemName\"))\n\titemKey := strings.TrimSpace(c.GetString(\"itemKey\"))\n\tif itemName == \"\" || itemKey == \"\" {\n\t\tc.JsonResult(5001, i18n.Tr(c.Lang, \"message.param_error\"))\n\t}\n\tvar item *models.Itemsets\n\tvar err error\n\tif itemId > 0 {\n\t\tif item, err = models.NewItemsets().First(itemId); err != nil {\n\t\t\tif err == orm.ErrNoRows {\n\t\t\t\tc.JsonResult(5002, i18n.Tr(c.Lang, \"message.project_space_not_exist\"))\n\t\t\t} else {\n\t\t\t\tc.JsonResult(5003, \"查询项目空间出错\")\n\t\t\t}\n\t\t}\n\t} else {\n\t\titem = models.NewItemsets()\n\t}\n\n\titem.ItemKey = itemKey\n\titem.ItemName = itemName\n\titem.MemberId = c.Member.MemberId\n\titem.ModifyAt = c.Member.MemberId\n\n\tif err := item.Save(); err != nil {\n\t\tc.JsonResult(5004, err.Error())\n\t}\n\n\tc.JsonResult(0, \"OK\")\n}\n\n// 删除项目空间.\nfunc (c *ManagerController) ItemsetsDelete() {\n\tc.Prepare()\n\titemId, _ := c.GetInt(\"itemId\")\n\n\tif err := models.NewItemsets().Delete(itemId); err != nil {\n\t\tc.JsonResult(5001, err.Error())\n\t}\n\tc.JsonResult(0, \"OK\")\n}\n"
  },
  {
    "path": "controllers/SearchController.go",
    "content": "package controllers\n\nimport (\n\t\"strconv\"\n\t\"strings\"\n\n\t\"github.com/beego/beego/v2/core/logs\"\n\t\"github.com/beego/i18n\"\n\t\"github.com/mindoc-org/mindoc/conf\"\n\t\"github.com/mindoc-org/mindoc/models\"\n\t\"github.com/mindoc-org/mindoc/utils\"\n\t\"github.com/mindoc-org/mindoc/utils/pagination\"\n\t\"github.com/mindoc-org/mindoc/utils/segmenter\"\n\t\"github.com/mindoc-org/mindoc/utils/sqltil\"\n)\n\n// SearchV2Result 用于 IndexV2 的搜索结果结构\ntype SearchV2Result struct {\n\tSearchType   string      `json:\"search_type\"`\n\tDocumentId   int         `json:\"doc_id\"`\n\tDocumentName string      `json:\"doc_name\"`\n\tIdentify     string      `json:\"identify\"`\n\tDescription  string      `json:\"description\"`\n\tAuthor       string      `json:\"author\"`\n\tModifyTime   interface{} `json:\"modify_time\"`\n\tCreateTime   interface{} `json:\"create_time\"`\n\tBookId       int         `json:\"book_id\"`\n\tBookName     string      `json:\"book_name\"`\n\tBookIdentify string      `json:\"book_identify\"`\n}\n\n// SearchV2RawResult 底层搜索返回的原始结果，包含倒排索引的分数信息\ntype SearchV2RawResult struct {\n\tContentType  int         // 1-Document 2-Blog\n\tContentId    int         // 文档ID或博客ID\n\tScore        float64     // TF-IDF分数\n\tWordCounts   []int       // 各个词的词频\n\tSearchType   string      // \"document\" 或 \"blog\"\n\tDocumentId   int         // 文档ID\n\tDocumentName string      // 文档名称/博客标题\n\tIdentify     string      // 文档标识/博客标识\n\tDescription  string      // 描述\n\tContent      string      // 原始内容\n\tAuthor       string      // 作者\n\tModifyTime   interface{} // 修改时间\n\tCreateTime   interface{} // 创建时间\n\tBookId       int         // 项目ID (仅Document)\n\tBookName     string      // 项目名称 (仅Document)\n\tBookIdentify string      // 项目标识 (仅Document)\n\tBlogId       int         // 博客ID (仅Blog)\n\tBlogTitle    string      // 博客标题 (仅Blog)\n\tBlogIdentify string      // 博客标识 (仅Blog)\n\tBlogExcerpt  string      // 博客摘要 (仅Blog)\n}\n\n// PerformSearchV2Raw 执行倒排索引搜索的底层函数，返回原始结果\nfunc PerformSearchV2Raw(keyword string, pageIndex, pageSize int, memberId int) ([]*SearchV2RawResult, []string, int, error) {\n\t// 使用分词器对关键词进行分词\n\twords := segmenter.Segment(keyword)\n\tif len(words) == 0 {\n\t\t// 如果分词结果为空，直接使用原关键词\n\t\twords = []string{keyword}\n\t}\n\n\t// 使用倒排索引模型进行搜索\n\tindex := models.NewContentReverseIndex()\n\tresults, totalCount, err := index.FindByWordsWithPagination(words, pageIndex, pageSize)\n\tif err != nil {\n\t\treturn nil, words, 0, err\n\t}\n\n\t// 构建返回结果\n\tsearchResults := make([]*SearchV2RawResult, 0)\n\tfor _, result := range results {\n\t\titem := &SearchV2RawResult{\n\t\t\tContentType: result.ContentType,\n\t\t\tContentId:   result.ContentId,\n\t\t\tScore:       result.Score,\n\t\t\tWordCounts:  result.WordCounts,\n\t\t}\n\n\t\t// 根据内容类型获取详细信息\n\t\tif result.ContentType == 1 {\n\t\t\t// Document类型\n\t\t\tdoc, err := models.NewDocument().Find(result.ContentId)\n\t\t\tif err == nil {\n\t\t\t\t// 检查文档权限\n\t\t\t\tbook, bookErr := models.NewBook().Find(doc.BookId)\n\t\t\t\tif bookErr != nil {\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\n\t\t\t\titem.SearchType = \"document\"\n\t\t\t\titem.DocumentId = doc.DocumentId\n\t\t\t\titem.DocumentName = doc.DocumentName\n\t\t\t\titem.BookId = doc.BookId\n\t\t\t\titem.BookName = book.BookName\n\t\t\t\titem.Identify = doc.Identify\n\t\t\t\titem.BookIdentify = book.Identify\n\t\t\t\titem.CreateTime = doc.CreateTime\n\t\t\t\titem.ModifyTime = doc.ModifyTime\n\t\t\t\titem.Content = doc.Release\n\n\t\t\t\t// 获取作者信息\n\t\t\t\tif doc.MemberId > 0 {\n\t\t\t\t\tmember, _ := models.NewMember().Find(doc.MemberId, \"real_name\", \"account\")\n\t\t\t\t\tif member != nil {\n\t\t\t\t\t\tif member.RealName != \"\" {\n\t\t\t\t\t\t\titem.Author = member.RealName\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\titem.Author = member.Account\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// 提取描述\n\t\t\t\tdescription := doc.Release\n\t\t\t\tif description == \"\" {\n\t\t\t\t\tdescription = doc.Markdown\n\t\t\t\t}\n\t\t\t\t// 去除HTML标签\n\t\t\t\tdescription = utils.StripTags(description)\n\t\t\t\tif len([]rune(description)) > 100 {\n\t\t\t\t\tdescription = string([]rune(description)[:100]) + \"...\"\n\t\t\t\t}\n\t\t\t\titem.Description = description\n\n\t\t\t\tsearchResults = append(searchResults, item)\n\t\t\t}\n\t\t} else if result.ContentType == 2 {\n\t\t\t// Blog类型\n\t\t\tblog, err := models.NewBlog().Find(result.ContentId)\n\t\t\tif err == nil {\n\t\t\t\titem.SearchType = \"blog\"\n\t\t\t\titem.BlogId = blog.BlogId\n\t\t\t\titem.BlogTitle = blog.BlogTitle\n\t\t\t\titem.DocumentId = blog.BlogId\n\t\t\t\titem.DocumentName = blog.BlogTitle\n\t\t\t\titem.BlogIdentify = blog.BlogIdentify\n\t\t\t\titem.Identify = blog.BlogIdentify\n\t\t\t\titem.BlogExcerpt = blog.BlogExcerpt\n\t\t\t\titem.CreateTime = blog.Created\n\t\t\t\titem.ModifyTime = blog.Modified\n\t\t\t\titem.Content = blog.BlogRelease\n\n\t\t\t\t// 获取作者信息\n\t\t\t\tif blog.MemberId > 0 {\n\t\t\t\t\tmember, _ := models.NewMember().Find(blog.MemberId, \"real_name\", \"account\")\n\t\t\t\t\tif member != nil {\n\t\t\t\t\t\tif member.RealName != \"\" {\n\t\t\t\t\t\t\titem.Author = member.RealName\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\titem.Author = member.Account\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// 提取描述\n\t\t\t\tdescription := blog.BlogExcerpt\n\t\t\t\tif description == \"\" {\n\t\t\t\t\tdescription = blog.BlogRelease\n\t\t\t\t\tif description == \"\" {\n\t\t\t\t\t\tdescription = blog.BlogContent\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tdescription = utils.StripTags(description)\n\t\t\t\tif len([]rune(description)) > 100 {\n\t\t\t\t\tdescription = string([]rune(description)[:100]) + \"...\"\n\t\t\t\t}\n\t\t\t\titem.Description = description\n\n\t\t\t\tsearchResults = append(searchResults, item)\n\t\t\t}\n\t\t}\n\t}\n\n\treturn searchResults, words, totalCount, nil\n}\n\n// performSearchV2 执行倒排索引搜索，返回 SearchV2Result 列表\nfunc (c *SearchController) performSearchV2(keyword string, pageIndex, pageSize int) ([]*SearchV2Result, int, error) {\n\tmemberId := 0\n\tif c.Member != nil {\n\t\tmemberId = c.Member.MemberId\n\t}\n\trawResults, words, totalCount, err := PerformSearchV2Raw(keyword, pageIndex, pageSize, memberId)\n\tif err != nil {\n\t\treturn nil, 0, err\n\t}\n\n\t// 转换为 SearchV2Result\n\tsearchResults := make([]*SearchV2Result, 0, len(rawResults))\n\tfor _, raw := range rawResults {\n\t\titem := &SearchV2Result{\n\t\t\tSearchType:   raw.SearchType,\n\t\t\tDocumentId:   raw.DocumentId,\n\t\t\tDocumentName: raw.DocumentName,\n\t\t\tIdentify:     raw.Identify,\n\t\t\tDescription:  raw.Description,\n\t\t\tAuthor:       raw.Author,\n\t\t\tModifyTime:   raw.ModifyTime,\n\t\t\tCreateTime:   raw.CreateTime,\n\t\t\tBookId:       raw.BookId,\n\t\t\tBookName:     raw.BookName,\n\t\t\tBookIdentify: raw.BookIdentify,\n\t\t}\n\t\tsearchResults = append(searchResults, item)\n\t}\n\n\t// 高亮关键词\n\tfor _, item := range searchResults {\n\t\tfor _, word := range words {\n\t\t\tif word != \"\" {\n\t\t\t\titem.DocumentName = strings.Replace(item.DocumentName, word, \"<em>\"+word+\"</em>\", -1)\n\t\t\t\tif item.Description != \"\" {\n\t\t\t\t\titem.Description = strings.Replace(item.Description, word, \"<em>\"+word+\"</em>\", -1)\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn searchResults, totalCount, nil\n}\n\ntype SearchController struct {\n\tBaseController\n}\n\n// 搜索首页\nfunc (c *SearchController) Index() {\n\tc.Prepare()\n\tc.TplName = \"search/index.tpl\"\n\n\t//如果没有开启你们访问则跳转到登录\n\tif !c.EnableAnonymous && c.Member == nil {\n\t\tc.Redirect(conf.URLFor(\"AccountController.Login\"), 302)\n\t\treturn\n\t}\n\n\tkeyword := c.GetString(\"keyword\")\n\tpageIndex, _ := c.GetInt(\"page\", 1)\n\n\tc.Data[\"BaseUrl\"] = c.BaseUrl()\n\n\tif keyword != \"\" {\n\t\tc.Data[\"Keyword\"] = keyword\n\t\tmemberId := 0\n\t\tif c.Member != nil {\n\t\t\tmemberId = c.Member.MemberId\n\t\t}\n\t\tsearchResult, totalCount, err := models.NewDocumentSearchResult().FindToPager(sqltil.EscapeLike(keyword), pageIndex, conf.PageSize, memberId)\n\n\t\tif err != nil {\n\t\t\tlogs.Error(\"搜索失败 ->\", err)\n\t\t\treturn\n\t\t}\n\t\tif totalCount > 0 {\n\t\t\tpager := pagination.NewPagination(c.Ctx.Request, totalCount, conf.PageSize, c.BaseUrl())\n\t\t\tc.Data[\"PageHtml\"] = pager.HtmlPages()\n\t\t} else {\n\t\t\tc.Data[\"PageHtml\"] = \"\"\n\t\t}\n\t\tif len(searchResult) > 0 {\n\t\t\tkeywords := strings.Split(keyword, \" \")\n\n\t\t\tfor _, item := range searchResult {\n\t\t\t\tfor _, word := range keywords {\n\t\t\t\t\titem.DocumentName = strings.Replace(item.DocumentName, word, \"<em>\"+word+\"</em>\", -1)\n\t\t\t\t\tif item.Description != \"\" {\n\t\t\t\t\t\tsrc := item.Description\n\n\t\t\t\t\t\tr := []rune(utils.StripTags(item.Description))\n\n\t\t\t\t\t\tif len(r) > 100 {\n\t\t\t\t\t\t\tsrc = string(r[:100])\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tsrc = string(r)\n\t\t\t\t\t\t}\n\t\t\t\t\t\titem.Description = strings.Replace(src, word, \"<em>\"+word+\"</em>\", -1)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif item.Identify == \"\" {\n\t\t\t\t\titem.Identify = strconv.Itoa(item.DocumentId)\n\t\t\t\t}\n\t\t\t\tif item.ModifyTime.IsZero() {\n\t\t\t\t\titem.ModifyTime = item.CreateTime\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tc.Data[\"Lists\"] = searchResult\n\t}\n}\n\n// 搜索用户\nfunc (c *SearchController) User() {\n\tc.Prepare()\n\tkey := c.Ctx.Input.Param(\":key\")\n\tkeyword := strings.TrimSpace(c.GetString(\"q\"))\n\tif key == \"\" || keyword == \"\" {\n\t\tc.JsonResult(404, i18n.Tr(c.Lang, \"message.param_error\"))\n\t}\n\tkeyword = sqltil.EscapeLike(keyword)\n\n\tbook, err := models.NewBookResult().FindByIdentify(key, c.Member.MemberId)\n\tif err != nil {\n\t\tif err == models.ErrPermissionDenied {\n\t\t\tc.JsonResult(403, i18n.Tr(c.Lang, \"message.no_permission\"))\n\t\t}\n\t\tc.JsonResult(500, i18n.Tr(c.Lang, \"message.item_not_exist\"))\n\t}\n\n\t//members, err := models.NewMemberRelationshipResult().FindNotJoinUsersByAccount(book.BookId, 10, \"%\"+keyword+\"%\")\n\tmembers, err := models.NewMemberRelationshipResult().FindNotJoinUsersByAccountOrRealName(book.BookId, 10, \"%\"+keyword+\"%\")\n\tif err != nil {\n\t\tlogs.Error(\"查询用户列表出错：\" + err.Error())\n\t\tc.JsonResult(500, err.Error())\n\t}\n\tresult := models.SelectMemberResult{}\n\titems := make([]models.KeyValueItem, 0)\n\n\tfor _, member := range members {\n\t\titem := models.KeyValueItem{}\n\t\titem.Id = member.MemberId\n\t\titem.Text = member.Account + \"[\" + member.RealName + \"]\"\n\t\titems = append(items, item)\n\t}\n\n\tresult.Result = items\n\n\tc.JsonResult(0, \"OK\", result)\n}\n\n// IndexV2 使用倒排索引的搜索页面\nfunc (c *SearchController) IndexV2() {\n\tc.Prepare()\n\tc.TplName = \"search/index.tpl\"\n\n\t// 如果没有开启你们访问则跳转到登录\n\tif !c.EnableAnonymous && c.Member == nil {\n\t\tc.Redirect(conf.URLFor(\"AccountController.Login\"), 302)\n\t\treturn\n\t}\n\n\tkeyword := strings.TrimSpace(c.GetString(\"keyword\"))\n\tpageIndex, _ := c.GetInt(\"page\", 1)\n\tpageSize := conf.PageSize\n\n\tc.Data[\"BaseUrl\"] = c.BaseUrl()\n\n\tif keyword != \"\" {\n\t\tc.Data[\"Keyword\"] = keyword\n\n\t\tsearchResult, totalCount, err := c.performSearchV2(keyword, pageIndex, pageSize)\n\n\t\tif err != nil {\n\t\t\tlogs.Error(\"搜索失败 ->\", err)\n\t\t\treturn\n\t\t}\n\t\tif totalCount > 0 {\n\t\t\tpager := pagination.NewPagination(c.Ctx.Request, totalCount, conf.PageSize, c.BaseUrl())\n\t\t\tc.Data[\"PageHtml\"] = pager.HtmlPages()\n\t\t} else {\n\t\t\tc.Data[\"PageHtml\"] = \"\"\n\t\t}\n\n\t\t// 处理结果中的一些字段\n\t\tfor _, item := range searchResult {\n\t\t\tif item.Identify == \"\" {\n\t\t\t\titem.Identify = strconv.Itoa(item.DocumentId)\n\t\t\t}\n\t\t}\n\n\t\tc.Data[\"Lists\"] = searchResult\n\t}\n}\n\n// SearchV2 使用倒排索引进行搜索\nfunc (c *SearchController) SearchV2() {\n\tc.Prepare()\n\tmemberId := 0\n\tif c.Member != nil {\n\t\tmemberId = c.Member.MemberId\n\t}\n\n\t// 如果没有开启匿名访问且未登录则返回错误\n\tif !c.EnableAnonymous && c.Member == nil {\n\t\tc.JsonResult(401, \"请先登录\")\n\t\treturn\n\t}\n\n\tkeyword := strings.TrimSpace(c.GetString(\"keyword\"))\n\tif keyword == \"\" {\n\t\tc.JsonResult(400, \"搜索关键词不能为空\")\n\t\treturn\n\t}\n\n\tpageIndex, _ := c.GetInt(\"page\", 1)\n\tpageSize, _ := c.GetInt(\"page_size\", 10)\n\n\t// 使用底层搜索函数\n\trawResults, words, totalCount, err := PerformSearchV2Raw(keyword, pageIndex, pageSize, memberId)\n\tif err != nil {\n\t\tlogs.Error(\"倒排索引搜索失败 ->\", err)\n\t\tc.JsonResult(500, \"搜索失败\")\n\t\treturn\n\t}\n\n\t// 构建返回结果\n\tsearchResults := make([]map[string]interface{}, 0)\n\tfor _, raw := range rawResults {\n\t\titem := make(map[string]interface{})\n\t\titem[\"content_type\"] = raw.ContentType\n\t\titem[\"content_id\"] = raw.ContentId\n\t\titem[\"score\"] = raw.Score\n\t\titem[\"word_counts\"] = raw.WordCounts\n\t\titem[\"content\"] = raw.Content\n\n\t\tif raw.ContentType == 1 {\n\t\t\t// Document类型\n\t\t\titem[\"type\"] = \"document\"\n\t\t\titem[\"document_id\"] = raw.DocumentId\n\t\t\titem[\"document_name\"] = raw.DocumentName\n\t\t\titem[\"book_id\"] = raw.BookId\n\t\t\titem[\"book_name\"] = raw.BookName\n\t\t\titem[\"identify\"] = raw.Identify\n\t\t\titem[\"book_identify\"] = raw.BookIdentify\n\t\t\titem[\"create_time\"] = raw.CreateTime\n\t\t\titem[\"modify_time\"] = raw.ModifyTime\n\t\t\titem[\"description\"] = raw.Description\n\t\t} else if raw.ContentType == 2 {\n\t\t\t// Blog类型\n\t\t\titem[\"type\"] = \"blog\"\n\t\t\titem[\"blog_id\"] = raw.BlogId\n\t\t\titem[\"blog_title\"] = raw.BlogTitle\n\t\t\titem[\"blog_identify\"] = raw.BlogIdentify\n\t\t\titem[\"blog_excerpt\"] = raw.BlogExcerpt\n\t\t\titem[\"create_time\"] = raw.CreateTime\n\t\t\titem[\"modify_time\"] = raw.ModifyTime\n\t\t}\n\t\tsearchResults = append(searchResults, item)\n\t}\n\n\t// 高亮关键词\n\tfor _, item := range searchResults {\n\t\tfor _, word := range words {\n\t\t\tif word != \"\" {\n\t\t\t\tif title, ok := item[\"document_name\"]; ok {\n\t\t\t\t\titem[\"document_name\"] = strings.Replace(title.(string), word, \"<em>\"+word+\"</em>\", -1)\n\t\t\t\t}\n\t\t\t\tif title, ok := item[\"blog_title\"]; ok {\n\t\t\t\t\titem[\"blog_title\"] = strings.Replace(title.(string), word, \"<em>\"+word+\"</em>\", -1)\n\t\t\t\t}\n\t\t\t\tif desc, ok := item[\"description\"]; ok {\n\t\t\t\t\titem[\"description\"] = strings.Replace(desc.(string), word, \"<em>\"+word+\"</em>\", -1)\n\t\t\t\t}\n\t\t\t\tif excerpt, ok := item[\"blog_excerpt\"]; ok {\n\t\t\t\t\titem[\"blog_excerpt\"] = strings.Replace(excerpt.(string), word, \"<em>\"+word+\"</em>\", -1)\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tresponseData := map[string]interface{}{\n\t\t\"lists\":     searchResults,\n\t\t\"total\":     totalCount,\n\t\t\"page\":      pageIndex,\n\t\t\"page_size\": pageSize,\n\t}\n\n\tc.JsonResult(0, \"OK\", responseData)\n}\n"
  },
  {
    "path": "controllers/SettingController.go",
    "content": "package controllers\n\nimport (\n\t\"fmt\"\n\t\"os\"\n\t\"path/filepath\"\n\t\"strconv\"\n\t\"strings\"\n\t\"time\"\n\n\t\"github.com/beego/beego/v2/core/logs\"\n\t\"github.com/beego/i18n\"\n\t\"github.com/mindoc-org/mindoc/conf\"\n\t\"github.com/mindoc-org/mindoc/graphics\"\n\t\"github.com/mindoc-org/mindoc/models\"\n\t\"github.com/mindoc-org/mindoc/utils\"\n)\n\ntype SettingController struct {\n\tBaseController\n}\n\nfunc (c *SettingController) Index() {\n\tc.TplName = \"setting/index.tpl\"\n\n\tif c.Ctx.Input.IsPost() {\n\t\temail := strings.TrimSpace(c.GetString(\"email\", \"\"))\n\t\tphone := strings.TrimSpace(c.GetString(\"phone\"))\n\t\tdescription := strings.TrimSpace(c.GetString(\"description\"))\n\n\t\tif email == \"\" {\n\t\t\tc.JsonResult(601, i18n.Tr(c.Lang, \"message.email_empty\"))\n\t\t}\n\t\tmember := c.Member\n\t\tmember.Email = email\n\t\tmember.Phone = phone\n\t\tmember.Description = description\n\t\tmember.RealName = strings.TrimSpace(c.GetString(\"real_name\", \"\"))\n\t\tif err := member.Update(); err != nil {\n\t\t\tc.JsonResult(602, err.Error())\n\t\t}\n\t\tc.SetMember(*member)\n\t\tc.JsonResult(0, \"ok\")\n\t}\n}\n\nfunc (c *SettingController) Password() {\n\tc.TplName = \"setting/password.tpl\"\n\n\tif c.Ctx.Input.IsPost() {\n\t\tif c.Member.AuthMethod == conf.AuthMethodLDAP {\n\t\t\tc.JsonResult(6009, i18n.Tr(c.Lang, \"message.cur_user_cannot_change_pwd\"))\n\t\t}\n\t\tpassword1 := c.GetString(\"password1\")\n\t\tpassword2 := c.GetString(\"password2\")\n\t\tpassword3 := c.GetString(\"password3\")\n\n\t\tif password1 == \"\" {\n\t\t\tc.JsonResult(6003, i18n.Tr(c.Lang, \"message.origin_pwd_empty\"))\n\t\t}\n\n\t\tif password2 == \"\" {\n\t\t\tc.JsonResult(6004, i18n.Tr(c.Lang, \"message.new_pwd_empty\"))\n\t\t}\n\t\tif count := strings.Count(password2, \"\"); count < 6 || count > 18 {\n\t\t\tc.JsonResult(6009, i18n.Tr(c.Lang, \"message.pwd_length\"))\n\t\t}\n\t\tif password2 != password3 {\n\t\t\tc.JsonResult(6003, \"确认密码不正确\")\n\t\t}\n\t\tif ok, _ := utils.PasswordVerify(c.Member.Password, password1); !ok {\n\t\t\tc.JsonResult(6005, i18n.Tr(c.Lang, \"message.wrong_origin_pwd\"))\n\t\t}\n\t\tif password1 == password2 {\n\t\t\tc.JsonResult(6006, i18n.Tr(c.Lang, \"message.same_pwd\"))\n\t\t}\n\t\tpwd, err := utils.PasswordHash(password2)\n\t\tif err != nil {\n\t\t\tc.JsonResult(6007, i18n.Tr(c.Lang, \"message.pwd_encrypt_failed\"))\n\t\t}\n\t\tc.Member.Password = pwd\n\t\tif c.Member.AuthMethod == \"\" {\n\t\t\tc.Member.AuthMethod = \"local\"\n\t\t}\n\t\tif err := c.Member.Update(); err != nil {\n\t\t\tc.JsonResult(6008, err.Error())\n\t\t}\n\t\tc.JsonResult(0, \"ok\")\n\t}\n}\n\n// Upload 上传图片\nfunc (c *SettingController) Upload() {\n\tfile, moreFile, err := c.GetFile(\"image-file\")\n\tdefer file.Close()\n\n\tif err != nil {\n\t\tlogs.Error(\"\", err.Error())\n\t\tc.JsonResult(500, \"读取文件异常\")\n\t}\n\n\text := filepath.Ext(moreFile.Filename)\n\n\tif !strings.EqualFold(ext, \".png\") && !strings.EqualFold(ext, \".jpg\") && !strings.EqualFold(ext, \".gif\") && !strings.EqualFold(ext, \".jpeg\") {\n\t\tc.JsonResult(500, \"不支持的图片格式\")\n\t}\n\n\tx1, _ := strconv.ParseFloat(c.GetString(\"x\"), 10)\n\ty1, _ := strconv.ParseFloat(c.GetString(\"y\"), 10)\n\tw1, _ := strconv.ParseFloat(c.GetString(\"width\"), 10)\n\th1, _ := strconv.ParseFloat(c.GetString(\"height\"), 10)\n\n\tx := int(x1)\n\ty := int(y1)\n\twidth := int(w1)\n\theight := int(h1)\n\n\tfmt.Println(x, x1, y, y1)\n\n\tfileName := \"avatar_\" + strconv.FormatInt(time.Now().UnixNano(), 16)\n\n\tfilePath := filepath.Join(conf.WorkingDirectory, \"uploads\", time.Now().Format(\"200601\"), fileName+ext)\n\n\tpath := filepath.Dir(filePath)\n\n\tos.MkdirAll(path, os.ModePerm)\n\n\terr = c.SaveToFile(\"image-file\", filePath)\n\n\tif err != nil {\n\t\tlogs.Error(\"\", err)\n\t\tc.JsonResult(500, \"图片保存失败\")\n\t}\n\n\t//剪切图片\n\tsubImg, err := graphics.ImageCopyFromFile(filePath, x, y, width, height)\n\n\tif err != nil {\n\t\tlogs.Error(\"ImageCopyFromFile => \", err)\n\t\tc.JsonResult(6001, \"头像剪切失败\")\n\t}\n\tos.Remove(filePath)\n\n\tfilePath = filepath.Join(conf.WorkingDirectory, \"uploads\", time.Now().Format(\"200601\"), fileName+\"_small\"+ext)\n\n\terr = graphics.ImageResizeSaveFile(subImg, 120, 120, filePath)\n\t//err = graphics.SaveImage(filePath,subImg)\n\n\tif err != nil {\n\t\tlogs.Error(\"保存文件失败 => \", err.Error())\n\t\tc.JsonResult(500, \"保存文件失败\")\n\t}\n\n\turl := \"/\" + strings.Replace(strings.TrimPrefix(filePath, conf.WorkingDirectory), \"\\\\\", \"/\", -1)\n\tif strings.HasPrefix(url, \"//\") {\n\t\turl = string(url[1:])\n\t}\n\n\tif member, err := models.NewMember().Find(c.Member.MemberId); err == nil {\n\t\tavater := member.Avatar\n\n\t\tmember.Avatar = url\n\t\terr := member.Update()\n\t\tif err == nil {\n\t\t\tif strings.HasPrefix(avater, \"/uploads/\") {\n\t\t\t\tos.Remove(filepath.Join(conf.WorkingDirectory, avater))\n\t\t\t}\n\t\t\tc.SetMember(*member)\n\t\t} else {\n\t\t\tc.JsonResult(60001, \"保存头像失败\")\n\t\t}\n\t}\n\n\tc.JsonResult(0, \"ok\", url)\n}\n"
  },
  {
    "path": "controllers/TemplateController.go",
    "content": "package controllers\n\nimport (\n\t\"errors\"\n\t\"strings\"\n\n\t\"github.com/beego/beego/v2/client/orm\"\n\t\"github.com/beego/i18n\"\n\t\"github.com/mindoc-org/mindoc/conf\"\n\t\"github.com/mindoc-org/mindoc/models\"\n)\n\ntype TemplateController struct {\n\tBaseController\n\tBookId int\n}\n\nfunc (c *TemplateController) isPermission() error {\n\tc.Prepare()\n\n\tbookIdentify := c.GetString(\"identify\", \"\")\n\n\tif bookIdentify == \"\" {\n\t\treturn errors.New(i18n.Tr(c.Lang, \"message.param_error\"))\n\t}\n\n\tif !c.Member.IsAdministrator() {\n\t\tbook, err := models.NewBookResult().FindByIdentify(bookIdentify, c.Member.MemberId)\n\t\tif err != nil {\n\t\t\tif err == orm.ErrNoRows {\n\t\t\t\treturn errors.New(\"项目不存在或没有权限\")\n\t\t\t}\n\t\t\treturn errors.New(\"查询项目模板失败\")\n\t\t}\n\t\tc.BookId = book.BookId\n\t} else {\n\t\tbook, err := models.NewBook().FindByIdentify(bookIdentify, \"book_id\")\n\t\tif err != nil {\n\t\t\tif err == orm.ErrNoRows {\n\t\t\t\treturn errors.New(\"项目不存在或没有权限\")\n\t\t\t}\n\t\t\treturn errors.New(\"查询项目模板失败\")\n\t\t}\n\t\tc.BookId = book.BookId\n\t}\n\treturn nil\n}\n\n//获取指定模板信息\nfunc (c *TemplateController) Get() {\n\tif err := c.isPermission(); err != nil {\n\t\tc.JsonResult(500, err.Error())\n\t}\n\ttemplateId, _ := c.GetInt(\"template_id\", 0)\n\n\ttemplate, err := models.NewTemplate().Find(templateId)\n\n\tif err != nil {\n\t\tc.JsonResult(500, \"读取模板失败\")\n\t}\n\tif template.IsGlobal == 0 && template.BookId != c.BookId {\n\t\tc.JsonResult(404, \"模板不存在或已删除\")\n\t}\n\tc.JsonResult(0, \"OK\", template)\n}\n\n//获取模板列表\nfunc (c *TemplateController) List() {\n\tc.TplName = \"template/list.tpl\"\n\tif err := c.isPermission(); err != nil {\n\t\tc.Data[\"ErrorMessage\"] = err.Error()\n\t\treturn\n\t}\n\n\ttemplateList, err := models.NewTemplate().FindAllByBookId(c.BookId)\n\n\tif err != nil && err != orm.ErrNoRows {\n\t\tc.Data[\"ErrorMessage\"] = \"查询项目模板失败\"\n\t}\n\tif templateList != nil {\n\t\tfor i, t := range templateList {\n\t\t\ttemplateList[i] = t.Preload()\n\t\t}\n\t}\n\t//c.JsonResult(0,\"OK\",templateList)\n\tc.Data[\"List\"] = templateList\n}\n\n//添加模板\nfunc (c *TemplateController) Add() {\n\tif err := c.isPermission(); err != nil {\n\t\tc.JsonResult(500, err.Error())\n\t}\n\n\ttemplateId, _ := c.GetInt(\"template_id\", 0)\n\tcontent := c.GetString(\"content\")\n\tisGlobal, _ := c.GetInt(\"is_global\", 0)\n\ttemplateName := c.GetString(\"template_name\", \"\")\n\n\tif templateName == \"\" || strings.Count(templateName, \"\") > 300 {\n\t\tc.JsonResult(500, \"模板名称不能为空且必须小于300字\")\n\t}\n\ttemplate := models.NewTemplate()\n\n\tif templateId > 0 {\n\t\tt, err := template.Find(templateId)\n\t\tif err != nil {\n\t\t\tc.JsonResult(500, \"模板不存在\")\n\t\t}\n\n\t\ttemplate = t\n\t\ttemplate.ModifyAt = c.Member.MemberId\n\t}\n\n\ttemplate.TemplateId = templateId\n\ttemplate.BookId = c.BookId\n\ttemplate.TemplateContent = content\n\ttemplate.TemplateName = templateName\n\n\t//只有管理员才能设置全局模板\n\tif c.Member.IsAdministrator() {\n\t\ttemplate.IsGlobal = isGlobal\n\t} else {\n\t\ttemplate.IsGlobal = 0\n\t\t//如果不是管理员需要判断是否有项目权限\n\t\trel, err := models.NewRelationship().FindByBookIdAndMemberId(c.BookId, c.Member.MemberId)\n\t\tif err != nil || rel.RoleId == conf.BookObserver {\n\t\t\tc.JsonResult(403, \"没有权限\")\n\t\t}\n\t\t//如果修改的模板不是本人创建的，并且又不是项目创建者则禁止修改\n\t\tif template.MemberId > 0 && template.MemberId != c.Member.MemberId && rel.RoleId != conf.BookFounder {\n\t\t\tc.JsonResult(403, \"没有权限\")\n\t\t}\n\t}\n\ttemplate.MemberId = c.Member.MemberId\n\n\tvar cols []string\n\n\tif templateId > 0 {\n\t\tcols = []string{\"template_content\", \"modify_time\", \"modify_at\", \"version\"}\n\t}\n\n\tif err := template.Save(cols...); err != nil {\n\t\tc.JsonResult(500, \"报错模板失败\")\n\t}\n\tc.JsonResult(0, \"OK\", template)\n}\n\n//删除模板\nfunc (c *TemplateController) Delete() {\n\tif err := c.isPermission(); err != nil {\n\t\tc.JsonResult(500, err.Error())\n\t}\n\ttemplateId, _ := c.GetInt(\"template_id\", 0)\n\n\ttemplate, err := models.NewTemplate().Find(templateId)\n\n\tif err != nil {\n\t\tc.JsonResult(404, \"模板不存在\")\n\t}\n\n\tif c.Member.IsAdministrator() {\n\t\terr := models.NewTemplate().Delete(templateId, 0)\n\t\tif err != nil {\n\t\t\tc.JsonResult(500, \"删除失败\")\n\t\t}\n\t} else {\n\t\t//如果不是管理员需要判断是否有项目权限\n\t\trel, err := models.NewRelationship().FindByBookIdAndMemberId(template.BookId, c.Member.MemberId)\n\t\tif err != nil || rel.RoleId == conf.BookObserver {\n\t\t\tc.JsonResult(403, \"没有权限\")\n\t\t}\n\n\t\t//如果是创始人或管理者可以直接删除模板\n\t\tif rel.RoleId == conf.BookFounder || rel.RoleId == conf.BookAdmin {\n\t\t\terr := models.NewTemplate().Delete(templateId, 0)\n\t\t\tif err != nil {\n\t\t\t\tc.JsonResult(500, \"删除失败\")\n\t\t\t}\n\t\t}\n\n\t\tif err := models.NewTemplate().Delete(templateId, c.Member.MemberId); err != nil {\n\t\t\tc.JsonResult(500, \"删除失败\")\n\t\t}\n\t}\n\tc.JsonResult(0, \"OK\")\n}\n"
  },
  {
    "path": "controllers/const.go",
    "content": "package controllers\n\nconst (\n\tMarkdown             = \"markdown\"\n\tEditorMarkdown       = \"markdown\"\n\tEditorCherryMarkdown = \"cherry_markdown\"\n\tEditorHtml           = \"html\"\n\tEditorNewHtml        = \"new_html\"\n\tEditorFroala         = \"froala\"\n)\n"
  },
  {
    "path": "converter/converter.go",
    "content": "//Author:TruthHun\n//Email:TruthHun@QQ.COM\n//Date:2018-01-21\npackage converter\n\nimport (\n\t\"fmt\"\n\t\"io/ioutil\"\n\t\"os\"\n\t\"path/filepath\"\n\t\"strings\"\n\n\t\"errors\"\n\t\"os/exec\"\n\t\"time\"\n\n\t\"html\"\n\t\"sync\"\n\n\t\"github.com/mindoc-org/mindoc/utils/cryptil\"\n\t\"github.com/mindoc-org/mindoc/utils/filetil\"\n\t\"github.com/mindoc-org/mindoc/utils/ziptil\"\n)\n\ntype Converter struct {\n\tBasePath       string\n\tOutputPath\t   string\n\tConfig         Config\n\tDebug          bool\n\tGeneratedCover string\n\tProcessNum\t \tint\t\t//并发的任务数量\n\tprocess \tchan func()\n\tlimitChan\t\tchan bool\n}\n\n//目录结构\ntype Toc struct {\n\tId    int    `json:\"id\"`\n\tLink  string `json:\"link\"`\n\tPid   int    `json:\"pid\"`\n\tTitle string `json:\"title\"`\n}\n\n//config.json文件解析结构\ntype Config struct {\n\tCharset      string   `json:\"charset\"`       //字符编码，默认utf-8编码\n\tCover        string   `json:\"cover\"`         //封面图片，或者封面html文件\n\tTimestamp    string   `json:\"date\"`          //时间日期,如“2018-01-01 12:12:21”，其实是time.Time格式，但是直接用string就好\n\tDescription  string   `json:\"description\"`   //摘要\n\tFooter       string   `json:\"footer\"`        //pdf的footer\n\tHeader       string   `json:\"header\"`        //pdf的header\n\tIdentifier   string   `json:\"identifier\"`    //即uuid，留空即可\n\tLanguage     string   `json:\"language\"`      //语言，如zh、en、zh-CN、en-US等\n\tCreator      string   `json:\"creator\"`       //作者，即author\n\tPublisher    string   `json:\"publisher\"`     //出版单位\n\tContributor  string   `json:\"contributor\"`   //同Publisher\n\tTitle        string   `json:\"title\"`         //文档标题\n\tFormat       []string `json:\"format\"`        //导出格式，可选值：pdf、epub、mobi\n\tFontSize     string   `json:\"font_size\"`     //默认的pdf导出字体大小\n\tPaperSize    string   `json:\"paper_size\"`    //页面大小\n\tMarginLeft   string   `json:\"margin_left\"`   //PDF文档左边距，写数字即可，默认72pt\n\tMarginRight  string   `json:\"margin_right\"`  //PDF文档左边距，写数字即可，默认72pt\n\tMarginTop    string   `json:\"margin_top\"`    //PDF文档左边距，写数字即可，默认72pt\n\tMarginBottom string   `json:\"margin_bottom\"` //PDF文档左边距，写数字即可，默认72pt\n\tMore         []string `json:\"more\"`          //更多导出选项[PDF导出选项，具体参考：https://manual.calibre-ebook.com/generated/en/ebook-convert.html#pdf-output-options]\n\tToc          []Toc    `json:\"toc\"`           //目录\n\t///////////////////////////////////////////\n\tOrder []string `json:\"-\"` //这个不需要赋值\n}\n\nvar (\n\toutput       = \"output\" //文档导出文件夹\n\tebookConvert = \"ebook-convert\"\n)\n\nfunc CheckConvertCommand() error {\n\targs := []string{ \"--version\" }\n\tcmd := exec.Command(ebookConvert, args...)\n\n\treturn cmd.Run()\n}\n\n// 接口文档 https://manual.calibre-ebook.com/generated/en/ebook-convert.html#table-of-contents\n//根据json配置文件，创建文档转化对象\nfunc NewConverter(configFile string, debug ...bool) (converter *Converter, err error) {\n\tvar (\n\t\tcfg      Config\n\t\tbasepath string\n\t\tdb       bool\n\t)\n\tif len(debug) > 0 {\n\t\tdb = debug[0]\n\t}\n\n\tif cfg, err = parseConfig(configFile); err == nil {\n\t\tif basepath, err = filepath.Abs(filepath.Dir(configFile)); err == nil {\n\t\t\t//设置默认值\n\t\t\tif len(cfg.Timestamp) == 0 {\n\t\t\t\tcfg.Timestamp = time.Now().Format(\"2006-01-02 15:04:05\")\n\t\t\t}\n\t\t\tif len(cfg.Charset) == 0 {\n\t\t\t\tcfg.Charset = \"utf-8\"\n\t\t\t}\n\t\t\tconverter = &Converter{\n\t\t\t\tConfig:   cfg,\n\t\t\t\tBasePath: basepath,\n\t\t\t\tDebug:    db,\n\t\t\t\tProcessNum: 1,\n\t\t\t\tprocess: make(chan func(),4),\n\t\t\t\tlimitChan: make(chan bool,1),\n\t\t\t}\n\t\t}\n\t}\n\treturn\n}\n\n//执行文档转换\nfunc (convert *Converter) Convert() (err error) {\n\tif !convert.Debug { //调试模式下不删除生成的文件\n\t\tdefer convert.converterDefer() //最后移除创建的多余而文件\n\t}\n\tif convert.process == nil{\n\t\tconvert.process = make(chan func(),4)\n\t}\n\tif convert.limitChan == nil {\n\t\tif convert.ProcessNum <= 0 {\n\t\t\tconvert.ProcessNum = 1\n\t\t}\n\t\tconvert.limitChan = make(chan bool,convert.ProcessNum)\n\t\tfor i := 0; i < convert.ProcessNum;i++{\n\t\t\tconvert.limitChan <- true\n\t\t}\n\t}\n\n\tif err = convert.generateMimeType(); err != nil {\n\t\treturn\n\t}\n\tif err = convert.generateMetaInfo(); err != nil {\n\t\treturn\n\t}\n\tif err = convert.generateTocNcx(); err != nil { //生成目录\n\t\treturn\n\t}\n\tif err = convert.generateSummary(); err != nil { //生成文档内目录\n\t\treturn\n\t}\n\tif err = convert.generateTitlePage(); err != nil { //生成封面\n\t\treturn\n\t}\n\tif err = convert.generateContentOpf(); err != nil { //这个必须是generate*系列方法的最后一个调用\n\t\treturn\n\t}\n\n\t//将当前文件夹下的所有文件压缩成zip包，然后直接改名成content.epub\n\tf := filepath.Join(convert.OutputPath, \"content.epub\")\n\tos.Remove(f) //如果原文件存在了，则删除;\n\tif err = ziptil.Zip(convert.BasePath,f); err == nil {\n\t\t//创建导出文件夹\n\t\tos.Mkdir(convert.BasePath+\"/\"+output, os.ModePerm)\n\t\tif len(convert.Config.Format) > 0 {\n\t\t\tvar errs []string\n\n\t\t\tgo func(convert *Converter) {\n\t\t\t\tfor _, v := range convert.Config.Format {\n\t\t\t\t\tfmt.Println(\"convert to \" + v)\n\t\t\t\t\tswitch strings.ToLower(v) {\n\t\t\t\t\tcase \"epub\":\n\t\t\t\t\t\tconvert.process  <- func() {\n\t\t\t\t\t\t\tif err = convert.convertToEpub(); err != nil {\n\t\t\t\t\t\t\t\terrs = append(errs, err.Error())\n\t\t\t\t\t\t\t\tfmt.Println(\"转换EPUB文档失败：\" + err.Error())\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\tcase \"mobi\":\n\t\t\t\t\t\tconvert.process <- func() {\n\t\t\t\t\t\t\tif err = convert.convertToMobi(); err != nil {\n\t\t\t\t\t\t\t\terrs = append(errs, err.Error())\n\t\t\t\t\t\t\t\tfmt.Println(\"转换MOBI文档失败：\" + err.Error())\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\tcase \"pdf\":\n\t\t\t\t\t\tconvert.process <- func() {\n\t\t\t\t\t\t\tif err = convert.convertToPdf(); err != nil {\n\t\t\t\t\t\t\t\tfmt.Println(\"转换PDF文档失败：\" + err.Error())\n\t\t\t\t\t\t\t\terrs = append(errs, err.Error())\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\tcase \"docx\":\n\t\t\t\t\t\tconvert.process <- func() {\n\t\t\t\t\t\t\tif err = convert.convertToDocx(); err != nil {\n\t\t\t\t\t\t\t\tfmt.Println(\"转换WORD文档失败：\" + err.Error())\n\t\t\t\t\t\t\t\terrs = append(errs, err.Error())\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tclose(convert.process)\n\t\t\t}(convert)\n\n\t\t\tgroup :=  sync.WaitGroup{}\n\t\t\tfor {\n\t\t\t\taction, isClosed := <-convert.process\n\t\t\t\tif action == nil && !isClosed {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tgroup.Add(1)\n\t\t\t\t<- convert.limitChan\n\t\t\t\tgo func(group *sync.WaitGroup) {\n\t\t\t\t\taction()\n\t\t\t\t\tgroup.Done()\n\t\t\t\t\tconvert.limitChan <- true\n\t\t\t\t}(&group)\n\t\t\t}\n\n\t\t\tgroup.Wait()\n\n\t\t\tif len(errs) > 0 {\n\t\t\t\terr = errors.New(strings.Join(errs, \"\\n\"))\n\t\t\t}\n\t\t} else {\n\t\t\terr = convert.convertToPdf()\n\t\t\tif err != nil {\n\t\t\t\tfmt.Println(err)\n\t\t\t}\n\t\t}\n\t} else {\n\t\tfmt.Println(\"压缩目录出错\" + err.Error())\n\t}\n\treturn\n}\n\n//删除生成导出文档而创建的文件\nfunc (this *Converter) converterDefer() {\n\t//删除不必要的文件\n\tos.RemoveAll(filepath.Join(this.BasePath, \"META-INF\"))\n\tos.RemoveAll(filepath.Join(this.BasePath, \"content.epub\"))\n\tos.RemoveAll(filepath.Join(this.BasePath, \"mimetype\"))\n\tos.RemoveAll(filepath.Join(this.BasePath, \"toc.ncx\"))\n\tos.RemoveAll(filepath.Join(this.BasePath, \"content.opf\"))\n\tos.RemoveAll(filepath.Join(this.BasePath, \"titlepage.xhtml\")) //封面图片待优化\n\tos.RemoveAll(filepath.Join(this.BasePath, \"summary.html\"))    //文档目录\n}\n\n//生成metainfo\nfunc (this *Converter) generateMetaInfo() (err error) {\n\txml := `<?xml version=\"1.0\"?>\n\t\t\t<container version=\"1.0\" xmlns=\"urn:oasis:names:tc:opendocument:xmlns:container\">\n\t\t\t   <rootfiles>\n\t\t\t\t  <rootfile full-path=\"content.opf\" media-type=\"application/oebps-package+xml\"/>\n\t\t\t   </rootfiles>\n\t\t\t</container>\n    `\n\tfolder := filepath.Join(this.BasePath, \"META-INF\")\n\tos.MkdirAll(folder, os.ModePerm)\n\terr = ioutil.WriteFile(filepath.Join(folder, \"container.xml\"), []byte(xml), os.ModePerm)\n\treturn\n}\n\n//形成mimetyppe\nfunc (this *Converter) generateMimeType() (err error) {\n\treturn ioutil.WriteFile(filepath.Join(this.BasePath, \"mimetype\"), []byte(\"application/epub+zip\"), os.ModePerm)\n}\n\n//生成封面\nfunc (this *Converter) generateTitlePage() (err error) {\n\tif ext := strings.ToLower(filepath.Ext(this.Config.Cover)); !(ext == \".html\" || ext == \".xhtml\") {\n\t\txml := `<?xml version='1.0' encoding='` + this.Config.Charset + `'?>\n\t\t\t\t<html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"` + this.Config.Language + `\">\n\t\t\t\t\t<head>\n\t\t\t\t\t\t<meta http-equiv=\"Content-Type\" content=\"text/html; charset=` + this.Config.Charset + `\"/>\n\t\t\t\t\t\t<meta name=\"calibre:cover\" content=\"true\"/>\n\t\t\t\t\t\t<title>Cover</title>\n\t\t\t\t\t\t<style type=\"text/css\" title=\"override_css\">\n\t\t\t\t\t\t\t@page {padding: 0pt; margin:0pt}\n\t\t\t\t\t\t\tbody { text-align: center; padding:0pt; margin: 0pt; }\n\t\t\t\t\t\t</style>\n\t\t\t\t\t</head>\n\t\t\t\t\t<body>\n\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" version=\"1.1\" width=\"100%\" height=\"100%\" viewBox=\"0 0 800 1068\" preserveAspectRatio=\"none\">\n\t\t\t\t\t\t\t\t<image width=\"800\" height=\"1068\" xlink:href=\"` + strings.TrimPrefix(this.Config.Cover, \"./\") + `\"/>\n\t\t\t\t\t\t\t</svg>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</body>\n\t\t\t\t</html>\n\t\t`\n\t\tif err = ioutil.WriteFile(filepath.Join(this.BasePath, \"titlepage.xhtml\"), []byte(xml), os.ModePerm); err == nil {\n\t\t\tthis.GeneratedCover = \"titlepage.xhtml\"\n\t\t}\n\t}\n\treturn\n}\n\n//生成文档目录\nfunc (this *Converter) generateTocNcx() (err error) {\n\tncx := `<?xml version='1.0' encoding='` + this.Config.Charset + `'?>\n\t\t\t<ncx xmlns=\"http://www.daisy.org/z3986/2005/ncx/\" version=\"2005-1\" xml:lang=\"%v\">\n\t\t\t  <head>\n\t\t\t\t<meta content=\"4\" name=\"dtb:depth\"/>\n\t\t\t\t<meta content=\"calibre (2.85.1)\" name=\"dtb:generator\"/>\n\t\t\t\t<meta content=\"0\" name=\"dtb:totalPageCount\"/>\n\t\t\t\t<meta content=\"0\" name=\"dtb:maxPageNumber\"/>\n\t\t\t  </head>\n\t\t\t  <docTitle>\n\t\t\t\t<text>%v</text>\n\t\t\t  </docTitle>\n\t\t\t  <navMap>%v</navMap>\n\t\t\t</ncx>\n\t`\n\tcodes, _ := this.tocToXml(0, 1)\n\tncx = fmt.Sprintf(ncx, this.Config.Language, html.EscapeString(this.Config.Title), strings.Join(codes, \"\"))\n\treturn ioutil.WriteFile(filepath.Join(this.BasePath, \"toc.ncx\"), []byte(ncx), os.ModePerm)\n}\n\n//生成文档目录，即summary.html\nfunc (this *Converter) generateSummary() (err error) {\n\t//目录\n\tsummary := `<!DOCTYPE html>\n\t\t\t\t<html lang=\"` + this.Config.Language + `\">\n\t\t\t\t<head>\n\t\t\t\t    <meta charset=\"` + this.Config.Charset + `\">\n\t\t\t\t    <title>目录</title>\n\t\t\t\t    <style>\n\t\t\t\t        body{margin: 0px;padding: 0px;}h1{text-align: center;padding: 0px;margin: 0px;}ul,li{list-style: none;}\n\t\t\t\t        a{text-decoration: none;color: #4183c4;text-decoration: none;font-size: 16px;line-height: 28px;}\n\t\t\t\t    </style>\n\t\t\t\t</head>\n\t\t\t\t<body>\n\t\t\t\t    <h1>目&nbsp;&nbsp;&nbsp;&nbsp;录</h1>\n\t\t\t\t    %v\n\t\t\t\t</body>\n\t\t\t\t</html>`\n\tsummary = fmt.Sprintf(summary, strings.Join(this.tocToSummary(0), \"\"))\n\treturn ioutil.WriteFile(filepath.Join(this.BasePath, \"summary.html\"), []byte(summary), os.ModePerm)\n}\n\n//将toc转成toc.ncx文件\nfunc (this *Converter) tocToXml(pid, idx int) (codes []string, next_idx int) {\n\tvar code string\n\tfor _, toc := range this.Config.Toc {\n\t\tif toc.Pid == pid {\n\t\t\tcode, idx = this.getNavPoint(toc, idx)\n\t\t\tcodes = append(codes, code)\n\t\t\tfor _, item := range this.Config.Toc {\n\t\t\t\tif item.Pid == toc.Id {\n\t\t\t\t\tcode, idx = this.getNavPoint(item, idx)\n\t\t\t\t\tcodes = append(codes, code)\n\t\t\t\t\tvar code_arr []string\n\t\t\t\t\tcode_arr, idx = this.tocToXml(item.Id, idx)\n\t\t\t\t\tcodes = append(codes, code_arr...)\n\t\t\t\t\tcodes = append(codes, `</navPoint>`)\n\t\t\t\t}\n\t\t\t}\n\t\t\tcodes = append(codes, `</navPoint>`)\n\t\t}\n\t}\n\tnext_idx = idx\n\treturn\n}\n\n//将toc转成toc.ncx文件\nfunc (this *Converter) tocToSummary(pid int) (summarys []string) {\n\tsummarys = append(summarys, \"<ul>\")\n\tfor _, toc := range this.Config.Toc {\n\t\tif toc.Pid == pid {\n\t\t\tsummarys = append(summarys, fmt.Sprintf(`<li><a href=\"%v\">%v</a></li>`, toc.Link, html.EscapeString(toc.Title)))\n\t\t\tfor _, item := range this.Config.Toc {\n\n\t\t\t\tif item.Pid == toc.Id {\n\t\t\t\t\tsummarys = append(summarys, fmt.Sprintf(`<li><ul><li><a href=\"%v\">%v</a></li>`, item.Link, html.EscapeString(item.Title)))\n\t\t\t\t\tsummarys = append(summarys, \"<li>\")\n\t\t\t\t\tsummarys = append(summarys, this.tocToSummary(item.Id)...)\n\t\t\t\t\tsummarys = append(summarys, \"</li></ul></li>\")\n\t\t\t\t}\n\n\t\t\t}\n\t\t}\n\t}\n\tsummarys = append(summarys, \"</ul>\")\n\treturn\n}\n\n//生成navPoint\nfunc (this *Converter) getNavPoint(toc Toc, idx int) (navpoint string, nextidx int) {\n\tnavpoint = `\n\t<navPoint id=\"id%v\" playOrder=\"%v\">\n\t\t<navLabel>\n\t\t\t<text>%v</text>\n\t\t</navLabel>\n\t\t<content src=\"%v\"/>`\n\tnavpoint = fmt.Sprintf(navpoint, toc.Id, idx, html.EscapeString(toc.Title), toc.Link)\n\tthis.Config.Order = append(this.Config.Order, toc.Link)\n\tnextidx = idx + 1\n\treturn\n}\n\n//生成content.opf文件\n//倒数第二步调用\nfunc (this *Converter) generateContentOpf() (err error) {\n\tvar (\n\t\tguide       string\n\t\tmanifest    string\n\t\tmanifestArr []string\n\t\tspine       string //注意：如果存在封面，则需要把封面放在第一个位置\n\t\tspineArr    []string\n\t)\n\n\tmeta := `<dc:title>%v</dc:title>\n\t\t\t<dc:contributor opf:role=\"bkp\">%v</dc:contributor>\n\t\t\t<dc:publisher>%v</dc:publisher>\n\t\t\t<dc:description>%v</dc:description>\n\t\t\t<dc:language>%v</dc:language>\n\t\t\t<dc:creator opf:file-as=\"Unknown\" opf:role=\"aut\">%v</dc:creator>\n\t\t\t<meta name=\"calibre:timestamp\" content=\"%v\"/>\n\t`\n\tmeta = fmt.Sprintf(meta, html.EscapeString(this.Config.Title), html.EscapeString(this.Config.Contributor), html.EscapeString(this.Config.Publisher), html.EscapeString(this.Config.Description), this.Config.Language, html.EscapeString(this.Config.Creator), this.Config.Timestamp)\n\tif len(this.Config.Cover) > 0 {\n\t\tmeta = meta + `<meta name=\"cover\" content=\"cover\"/>`\n\t\tguide = `<reference href=\"titlepage.xhtml\" title=\"Cover\" type=\"cover\"/>`\n\t\tmanifest = fmt.Sprintf(`<item href=\"%v\" id=\"cover\" media-type=\"%v\"/>`, this.Config.Cover, GetMediaType(filepath.Ext(this.Config.Cover)))\n\t\tspineArr = append(spineArr, `<itemref idref=\"titlepage\"/>`)\n\t}\n\n\tif _, err := os.Stat(this.BasePath + \"/summary.html\"); err == nil {\n\t\tspineArr = append(spineArr, `<itemref idref=\"summary\"/>`) //目录\n\n\t}\n\n\t//扫描所有文件\n\tif files, err := filetil.ScanFiles(this.BasePath); err == nil {\n\t\tbasePath := strings.Replace(this.BasePath, \"\\\\\", \"/\", -1)\n\t\tfor _, file := range files {\n\t\t\tif !file.IsDir {\n\t\t\t\text := strings.ToLower(filepath.Ext(file.Path))\n\t\t\t\tsourcefile := strings.TrimPrefix(file.Path, basePath+\"/\")\n\t\t\t\tid := \"ncx\"\n\t\t\t\tif ext != \".ncx\" {\n\t\t\t\t\tif file.Name == \"titlepage.xhtml\" { //封面\n\t\t\t\t\t\tid = \"titlepage\"\n\t\t\t\t\t} else if file.Name == \"summary.html\" { //目录\n\t\t\t\t\t\tid = \"summary\"\n\t\t\t\t\t} else {\n\t\t\t\t\t\tid = cryptil.Md5Crypt(sourcefile)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif mt := GetMediaType(ext); mt != \"\" { //不是封面图片，且media-type不为空\n\t\t\t\t\tif sourcefile != strings.TrimLeft(this.Config.Cover, \"./\") { //不是封面图片，则追加进来。封面图片前面已经追加进来了\n\t\t\t\t\t\tmanifestArr = append(manifestArr, fmt.Sprintf(`<item href=\"%v\" id=\"%v\" media-type=\"%v\"/>`, sourcefile, id, mt))\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tfmt.Println(file.Path)\n\t\t\t}\n\t\t}\n\n\t\titems := make(map[string]string)\n\t\tfor _, link := range this.Config.Order {\n\t\t\tid := cryptil.Md5Crypt(link)\n\t\t\tif _, ok := items[id]; !ok { //去重\n\t\t\t\titems[id] = id\n\t\t\t\tspineArr = append(spineArr, fmt.Sprintf(`<itemref idref=\"%v\"/>`, id))\n\t\t\t}\n\t\t}\n\t\tmanifest = manifest + strings.Join(manifestArr, \"\\n\")\n\t\tspine = strings.Join(spineArr, \"\\n\")\n\t} else {\n\t\treturn err\n\t}\n\n\tpkg := `<?xml version='1.0' encoding='` + this.Config.Charset + `'?>\n\t\t<package xmlns=\"http://www.idpf.org/2007/opf\" unique-identifier=\"uuid_id\" version=\"2.0\">\n\t\t  <metadata xmlns:opf=\"http://www.idpf.org/2007/opf\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:dcterms=\"http://purl.org/dc/terms/\" xmlns:dc=\"http://purl.org/dc/elements/1.1/\" xmlns:calibre=\"http://calibre.kovidgoyal.net/2009/metadata\">\n\t\t\t%v\n\t\t  </metadata>\n\t\t  <manifest>\n\t\t\t%v\n\t\t  </manifest>\n\t\t  <spine toc=\"ncx\">\n\t\t\t%v\n\t\t  </spine>\n\t\t\t%v\n\t\t</package>\n\t`\n\tif len(guide) > 0 {\n\t\tguide = `<guide>` + guide + `</guide>`\n\t}\n\tpkg = fmt.Sprintf(pkg, meta, manifest, spine, guide)\n\treturn ioutil.WriteFile(filepath.Join(this.BasePath, \"content.opf\"), []byte(pkg), os.ModePerm)\n}\n\n//转成epub\nfunc (this *Converter) convertToEpub() (err error) {\n\targs := []string{\n\t\tfilepath.Join(this.OutputPath, \"content.epub\"),\n\t\tfilepath.Join(this.OutputPath, output, \"book.epub\"),\n\t}\n\t//cmd := exec.Command(ebookConvert, args...)\n\t//\n\t//if this.Debug {\n\t//\tfmt.Println(cmd.Args)\n\t//}\n\t//fmt.Println(\"正在转换EPUB文件\", args[0])\n\t//return cmd.Run()\n\n\treturn filetil.CopyFile(args[0],args[1])\n}\n\n//转成mobi\nfunc (this *Converter) convertToMobi() (err error) {\n\targs := []string{\n\t\tfilepath.Join(this.OutputPath, \"content.epub\"),\n\t\tfilepath.Join(this.OutputPath, output, \"book.mobi\"),\n\t}\n\tcmd := exec.Command(ebookConvert, args...)\n\tif this.Debug {\n\t\tfmt.Println(cmd.Args)\n\t}\n\tfmt.Println(\"正在转换 MOBI 文件\", args[0])\n\treturn cmd.Run()\n}\n\n//转成pdf\nfunc (this *Converter) convertToPdf() (err error) {\n\targs := []string{\n\t\tfilepath.Join(this.OutputPath, \"content.epub\"),\n\t\tfilepath.Join(this.OutputPath, output, \"book.pdf\"),\n\t}\n\t//页面大小\n\tif len(this.Config.PaperSize) > 0 {\n\t\targs = append(args, \"--paper-size\", this.Config.PaperSize)\n\t}\n\t//文字大小\n\tif len(this.Config.FontSize) > 0 {\n\t\targs = append(args, \"--pdf-default-font-size\", this.Config.FontSize)\n\t}\n\n\t//header template\n\tif len(this.Config.Header) > 0 {\n\t\targs = append(args, \"--pdf-header-template\", this.Config.Header)\n\t}\n\n\t//footer template\n\tif len(this.Config.Footer) > 0 {\n\t\targs = append(args, \"--pdf-footer-template\",this.Config.Footer)\n\t}\n\n\tif strings.Count(this.Config.MarginLeft,\"\") > 0 {\n\t\targs = append(args, \"--pdf-page-margin-left\", this.Config.MarginLeft)\n\t}\n\tif strings.Count(this.Config.MarginTop,\"\") > 0 {\n\t\targs = append(args, \"--pdf-page-margin-top\", this.Config.MarginTop)\n\t}\n\tif strings.Count(this.Config.MarginRight,\"\") > 0 {\n\t\targs = append(args, \"--pdf-page-margin-right\", this.Config.MarginRight)\n\t}\n\tif strings.Count(this.Config.MarginBottom,\"\") > 0 {\n\t\targs = append(args, \"--pdf-page-margin-bottom\", this.Config.MarginBottom)\n\t}\n\n\t//更多选项\n\tif len(this.Config.More) > 0 {\n\t\targs = append(args, this.Config.More...)\n\t}\n\n\tcmd := exec.Command(ebookConvert, args...)\n\tif this.Debug {\n\t\tfmt.Println(cmd.Args)\n\t}\n\tfmt.Println(\"正在转换 PDF 文件\", args[0])\n\treturn cmd.Run()\n}\n\n// 转成word\nfunc (this *Converter) convertToDocx() (err error) {\n\targs := []string{\n\t\tfilepath.Join(this.OutputPath , \"content.epub\"),\n\t\tfilepath.Join(this.OutputPath , output , \"book.docx\"),\n\t}\n\targs = append(args, \"--docx-no-toc\")\n\n\t//页面大小\n\tif len(this.Config.PaperSize) > 0 {\n\t\targs = append(args, \"--docx-page-size\", this.Config.PaperSize)\n\t}\n\n\tif len(this.Config.MarginLeft) > 0 {\n\t\targs = append(args, \"--docx-page-margin-left\", this.Config.MarginLeft)\n\t}\n\tif len(this.Config.MarginTop) > 0 {\n\t\targs = append(args, \"--docx-page-margin-top\", this.Config.MarginTop)\n\t}\n\tif len(this.Config.MarginRight) > 0 {\n\t\targs = append(args, \"--docx-page-margin-right\", this.Config.MarginRight)\n\t}\n\tif len(this.Config.MarginBottom) > 0 {\n\t\targs = append(args, \"--docx-page-margin-bottom\", this.Config.MarginBottom)\n\t}\n\tcmd := exec.Command(ebookConvert, args...)\n\n\tif this.Debug {\n\t\tfmt.Println(cmd.Args)\n\t}\n\tfmt.Println(\"正在转换 DOCX 文件\", args[0])\n\treturn cmd.Run()\n}\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"
  },
  {
    "path": "converter/util.go",
    "content": "//Author:TruthHun\n//Email:TruthHun@QQ.COM\n//Date:2018-01-21\npackage converter\n\nimport (\n\t\"encoding/json\"\n\t\"io/ioutil\"\n\t\"strings\"\n)\n\n//media-type\nvar MediaType = map[string]string{\n\t\".jpeg\":  \"image/jpeg\",\n\t\".png\":   \"image/png\",\n\t\".jpg\":   \"image/jpeg\",\n\t\".gif\":   \"image/gif\",\n\t\".ico\":   \"image/x-icon\",\n\t\".bmp\":   \"image/bmp\",\n\t\".html\":  \"application/xhtml+xml\",\n\t\".xhtml\": \"application/xhtml+xml\",\n\t\".htm\":   \"application/xhtml+xml\",\n\t\".otf\":   \"application/x-font-opentype\",\n\t\".ttf\":   \"application/x-font-ttf\",\n\t\".js\":    \"application/x-javascript\",\n\t\".ncx\":   \"x-dtbncx+xml\",\n\t\".txt\":   \"text/plain\",\n\t\".xml\":   \"text/xml\",\n\t\".css\":   \"text/css\",\n}\n\n//根据文件扩展名，获取media-type\nfunc GetMediaType(ext string) string {\n\tif mt, ok := MediaType[strings.ToLower(ext)]; ok {\n\t\treturn mt\n\t}\n\treturn \"\"\n}\n\n//解析配置文件\nfunc parseConfig(configFile string) (cfg Config, err error) {\n\tvar b []byte\n\tif b, err = ioutil.ReadFile(configFile); err == nil {\n\t\terr = json.Unmarshal(b, &cfg)\n\t}\n\treturn\n}\n\n"
  },
  {
    "path": "database/clean.py",
    "content": "import sqlite3\nimport os, glob\n\nconn = sqlite3.connect(\"mindoc.db\")\ncur = conn.cursor()         #通过建立数据库游标对象，准备读写操作\n\n\ncmd = \"\"\"\nSELECT \n    att.http_path\nFROM\n    md_attachment AS att\nWHERE (att.document_id != 0 OR (NOT EXISTS( SELECT 1 FROM md_documents WHERE markdown LIKE (\"%\" || att.http_path || \"%\"))))\nAND (att.document_id = 0 OR (NOT EXISTS( SELECT 1 FROM md_documents WHERE att.document_id = document_id )))\n\"\"\"\ncur.execute(cmd)\nfile_list = cur.fetchall()\nfor file_item in file_list:\n    item_path = file_item[0]\n    # 1. 删除os文件\n    if os.path.exists(os.path.join(\"..\", item_path[1:])):\n        os.remove(os.path.join(\"..\", item_path[1:]))\n    \n    # 2. 查询os是否删除成功，成功则删除附件记录\n    if not os.path.exists(os.path.join(\"..\", item_path[1:])):\n        cmd = \"\"\"\n        delete\n        from md_attachment\n        WHERE http_path = '{}'\n        \"\"\".format(item_path)\n        cur.execute(cmd)\nconn.commit()   #保存提交，确保数据保存成功\n\nconn.close()        #关闭与数据库的连接"
  },
  {
    "path": "dev-win-build.cmd",
    "content": "go build -v -ldflags \"-linkmode external -extldflags '-static' -w\" -o mindoc_windows_amd64.exe main.go"
  },
  {
    "path": "docker-compose.yml",
    "content": "version: \"3\"\nservices:\n  mindoc:\n    image: registry.cn-hangzhou.aliyuncs.com/mindoc-org/mindoc:v2.1\n    container_name: mindoc\n    privileged: false\n    restart: always\n    ports:\n      - 8181:8181\n    volumes:\n      - /var/www/mindoc/conf://mindoc/conf\n      - /var/www/mindoc/static://mindoc/static\n      - /var/www/mindoc/views://mindoc/views\n      - /var/www/mindoc/uploads://mindoc/uploads\n      - /var/www/mindoc/runtime://mindoc/runtime\n      - /var/www/mindoc/database://mindoc/database\n    environment:\n      - MINDOC_RUN_MODE=prod\n      - MINDOC_DB_ADAPTER=sqlite3\n      - MINDOC_DB_DATABASE=./database/mindoc.db\n      - MINDOC_CACHE=true\n      - MINDOC_CACHE_PROVIDER=file\n      - MINDOC_ENABLE_EXPORT=false\n      - MINDOC_BASE_URL=\n      - MINDOC_CDN_IMG_URL=\n      - MINDOC_CDN_CSS_URL=\n      - MINDOC_CDN_JS_URL=\n    dns:\n      - 223.5.5.5\n      - 223.6.6.6\n"
  },
  {
    "path": "go.mod",
    "content": "module github.com/mindoc-org/mindoc\n\ngo 1.23.0\n\nrequire (\n\tgithub.com/PuerkitoBio/goquery v1.10.2\n\tgithub.com/beego/beego/v2 v2.1.6\n\tgithub.com/beego/i18n v0.0.0-20161101132742-e9308947f407\n\tgithub.com/boombuler/barcode v1.1.0\n\tgithub.com/go-ldap/ldap/v3 v3.4.4\n\tgithub.com/howeyc/fsnotify v0.9.0\n\tgithub.com/kardianos/service v1.2.1\n\tgithub.com/lib/pq v1.10.9\n\tgithub.com/lifei6671/gocaptcha v0.2.0\n\tgithub.com/mark3labs/mcp-go v0.45.0\n\tgithub.com/mattn/go-runewidth v0.0.13\n\tgithub.com/mattn/go-sqlite3 v1.14.34\n\tgithub.com/nfnt/resize v0.0.0-20180221191011-83c6a9932646\n\tgithub.com/russross/blackfriday/v2 v2.1.0\n\tgithub.com/yanyiwu/gojieba v1.4.7\n)\n\nrequire (\n\tfilippo.io/edwards25519 v1.1.0 // indirect\n\tgithub.com/Azure/go-ntlmssp v0.0.0-20220621081337-cb9428e4ac1e // indirect\n\tgithub.com/Unknwon/goconfig v1.0.0 // indirect\n\tgithub.com/andybalholm/cascadia v1.3.3 // indirect\n\tgithub.com/bahlo/generic-list-go v0.2.0 // indirect\n\tgithub.com/beorn7/perks v1.0.1 // indirect\n\tgithub.com/bradfitz/gomemcache v0.0.0-20220106215444-fb4bf637b56d // indirect\n\tgithub.com/buger/jsonparser v1.1.1 // indirect\n\tgithub.com/cespare/xxhash/v2 v2.2.0 // indirect\n\tgithub.com/go-asn1-ber/asn1-ber v1.5.4 // indirect\n\tgithub.com/go-redis/redis/v7 v7.4.1 // indirect\n\tgithub.com/go-sql-driver/mysql v1.8.1 // indirect\n\tgithub.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0 // indirect\n\tgithub.com/google/uuid v1.6.0 // indirect\n\tgithub.com/hashicorp/golang-lru v0.5.4 // indirect\n\tgithub.com/invopop/jsonschema v0.13.0 // indirect\n\tgithub.com/mailru/easyjson v0.7.7 // indirect\n\tgithub.com/mitchellh/mapstructure v1.5.0 // indirect\n\tgithub.com/prometheus/client_golang v1.19.0 // indirect\n\tgithub.com/prometheus/client_model v0.5.0 // indirect\n\tgithub.com/prometheus/common v0.48.0 // indirect\n\tgithub.com/prometheus/procfs v0.12.0 // indirect\n\tgithub.com/rivo/uniseg v0.3.4 // indirect\n\tgithub.com/shiena/ansicolor v0.0.0-20200904210342-c7312218db18 // indirect\n\tgithub.com/smartystreets/goconvey v1.7.2 // indirect\n\tgithub.com/spf13/cast v1.7.1 // indirect\n\tgithub.com/valyala/bytebufferpool v1.0.0 // indirect\n\tgithub.com/wk8/go-ordered-map/v2 v2.1.8 // indirect\n\tgithub.com/yosida95/uritemplate/v3 v3.0.2 // indirect\n\tgolang.org/x/crypto v0.33.0 // indirect\n\tgolang.org/x/image v0.22.0 // indirect\n\tgolang.org/x/net v0.35.0 // indirect\n\tgolang.org/x/sync v0.11.0 // indirect\n\tgolang.org/x/sys v0.30.0 // indirect\n\tgolang.org/x/text v0.22.0 // indirect\n\tgoogle.golang.org/protobuf v1.34.2 // indirect\n\tgopkg.in/yaml.v3 v3.0.1 // indirect\n)\n"
  },
  {
    "path": "go.sum",
    "content": "filippo.io/edwards25519 v1.1.0 h1:FNf4tywRC1HmFuKW5xopWpigGjJKiJSV0Cqo0cJWDaA=\nfilippo.io/edwards25519 v1.1.0/go.mod h1:BxyFTGdWcka3PhytdK4V28tE5sGfRvvvRV7EaN4VDT4=\ngithub.com/Azure/go-ntlmssp v0.0.0-20220621081337-cb9428e4ac1e h1:NeAW1fUYUEWhft7pkxDf6WoUvEZJ/uOKsvtpjLnn8MU=\ngithub.com/Azure/go-ntlmssp v0.0.0-20220621081337-cb9428e4ac1e/go.mod h1:chxPXzSsl7ZWRAuOIE23GDNzjWuZquvFlgA8xmpunjU=\ngithub.com/PuerkitoBio/goquery v1.10.2 h1:7fh2BdHcG6VFZsK7toXBT/Bh1z5Wmy8Q9MV9HqT2AM8=\ngithub.com/PuerkitoBio/goquery v1.10.2/go.mod h1:0guWGjcLu9AYC7C1GHnpysHy056u9aEkUHwhdnePMCU=\ngithub.com/Unknwon/goconfig v1.0.0 h1:9IAu/BYbSLQi8puFjUQApZTxIHqSwrj5d8vpP8vTq4A=\ngithub.com/Unknwon/goconfig v1.0.0/go.mod h1:wngxua9XCNjvHjDiTiV26DaKDT+0c63QR6H5hjVUUxw=\ngithub.com/andybalholm/cascadia v1.3.3 h1:AG2YHrzJIm4BZ19iwJ/DAua6Btl3IwJX+VI4kktS1LM=\ngithub.com/andybalholm/cascadia v1.3.3/go.mod h1:xNd9bqTn98Ln4DwST8/nG+H0yuB8Hmgu1YHNnWw0GeA=\ngithub.com/bahlo/generic-list-go v0.2.0 h1:5sz/EEAK+ls5wF+NeqDpk5+iNdMDXrh3z3nPnH1Wvgk=\ngithub.com/bahlo/generic-list-go v0.2.0/go.mod h1:2KvAjgMlE5NNynlg/5iLrrCCZ2+5xWbdbCW3pNTGyYg=\ngithub.com/beego/beego/v2 v2.1.6 h1:ny2WqvtpG1gAkEqJ9PQrOz6ZcQvVBJK+dECDOd/heIM=\ngithub.com/beego/beego/v2 v2.1.6/go.mod h1:kFJvA21OjBwixXKx7BeH+Ug492Pp+h4cORHFTf1L8e0=\ngithub.com/beego/i18n v0.0.0-20161101132742-e9308947f407 h1:WtJfx5HqASTQp7HfiZldnin8KQV2futplF3duGp5PGc=\ngithub.com/beego/i18n v0.0.0-20161101132742-e9308947f407/go.mod h1:KLeFCpAMq2+50NkXC8iiJxLLiiTfTqrGtKEVm+2fk7s=\ngithub.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM=\ngithub.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw=\ngithub.com/bits-and-blooms/bitset v1.8.0 h1:FD+XqgOZDUxxZ8hzoBFuV9+cGWY9CslN6d5MS5JVb4c=\ngithub.com/bits-and-blooms/bitset v1.8.0/go.mod h1:7hO7Gc7Pp1vODcmWvKMRA9BNmbv6a/7QIWpPxHddWR8=\ngithub.com/bits-and-blooms/bloom/v3 v3.5.0 h1:AKDvi1V3xJCmSR6QhcBfHbCN4Vf8FfxeWkMNQfmAGhY=\ngithub.com/bits-and-blooms/bloom/v3 v3.5.0/go.mod h1:Y8vrn7nk1tPIlmLtW2ZPV+W7StdVMor6bC1xgpjMZFs=\ngithub.com/boombuler/barcode v1.1.0 h1:ChaYjBR63fr4LFyGn8E8nt7dBSt3MiU3zMOZqFvVkHo=\ngithub.com/boombuler/barcode v1.1.0/go.mod h1:paBWMcWSl3LHKBqUq+rly7CNSldXjb2rDl3JlRe0mD8=\ngithub.com/bradfitz/gomemcache v0.0.0-20220106215444-fb4bf637b56d h1:pVrfxiGfwelyab6n21ZBkbkmbevaf+WvMIiR7sr97hw=\ngithub.com/bradfitz/gomemcache v0.0.0-20220106215444-fb4bf637b56d/go.mod h1:H0wQNHz2YrLsuXOZozoeDmnHXkNCRmMW0gwFWDfEZDA=\ngithub.com/buger/jsonparser v1.1.1 h1:2PnMjfWD7wBILjqQbt530v576A/cAbQvEW9gGIpYMUs=\ngithub.com/buger/jsonparser v1.1.1/go.mod h1:6RYKKt7H4d4+iWqouImQ9R2FZql3VbhNgx27UK13J/0=\ngithub.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44=\ngithub.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=\ngithub.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=\ngithub.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=\ngithub.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=\ngithub.com/elazarl/go-bindata-assetfs v1.0.1 h1:m0kkaHRKEu7tUIUFVwhGGGYClXvyl4RE03qmvRTNfbw=\ngithub.com/elazarl/go-bindata-assetfs v1.0.1/go.mod h1:v+YaWX3bdea5J/mo8dSETolEo7R71Vk1u8bnjau5yw4=\ngithub.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8=\ngithub.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0=\ngithub.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=\ngithub.com/go-asn1-ber/asn1-ber v1.5.4 h1:vXT6d/FNDiELJnLb6hGNa309LMsrCoYFvpwHDF0+Y1A=\ngithub.com/go-asn1-ber/asn1-ber v1.5.4/go.mod h1:hEBeB/ic+5LoWskz+yKT7vGhhPYkProFKoKdwZRWMe0=\ngithub.com/go-ldap/ldap/v3 v3.4.4 h1:qPjipEpt+qDa6SI/h1fzuGWoRUY+qqQ9sOZq67/PYUs=\ngithub.com/go-ldap/ldap/v3 v3.4.4/go.mod h1:fe1MsuN5eJJ1FeLT/LEBVdWfNWKh459R7aXgXtJC+aI=\ngithub.com/go-redis/redis/v7 v7.4.1 h1:PASvf36gyUpr2zdOUS/9Zqc80GbM+9BDyiJSJDDOrTI=\ngithub.com/go-redis/redis/v7 v7.4.1/go.mod h1:JDNMw23GTyLNC4GZu9njt15ctBQVn7xjRfnwdHj/Dcg=\ngithub.com/go-sql-driver/mysql v1.8.1 h1:LedoTUt/eveggdHS9qUFC1EFSa8bU2+1pZjSRpvNJ1Y=\ngithub.com/go-sql-driver/mysql v1.8.1/go.mod h1:wEBSXgmK//2ZFJyE+qWnIsVGmvmEKlqwuVSjsCm7DZg=\ngithub.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0 h1:DACJavvAHhabrF08vX0COfcOBJRhZ8lUbR+ZWIs0Y5g=\ngithub.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0/go.mod h1:E/TSTwGwJL78qG/PmXZO1EjYhfJinVAhrmmHX6Z8B9k=\ngithub.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=\ngithub.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=\ngithub.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=\ngithub.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=\ngithub.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=\ngithub.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=\ngithub.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1 h1:EGx4pi6eqNxGaHF6qqu48+N2wcFQ5qg5FXgOdqsJ5d8=\ngithub.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY=\ngithub.com/hashicorp/golang-lru v0.5.4 h1:YDjusn29QI/Das2iO9M0BHnIbxPeyuCHsjMW+lJfyTc=\ngithub.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4=\ngithub.com/howeyc/fsnotify v0.9.0 h1:0gtV5JmOKH4A8SsFxG2BczSeXWWPvcMT0euZt5gDAxY=\ngithub.com/howeyc/fsnotify v0.9.0/go.mod h1:41HzSPxBGeFRQKEEwgh49TRw/nKBsYZ2cF1OzPjSJsA=\ngithub.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI=\ngithub.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=\ngithub.com/invopop/jsonschema v0.13.0 h1:KvpoAJWEjR3uD9Kbm2HWJmqsEaHt8lBUpd0qHcIi21E=\ngithub.com/invopop/jsonschema v0.13.0/go.mod h1:ffZ5Km5SWWRAIN6wbDXItl95euhFz2uON45H2qjYt+0=\ngithub.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y=\ngithub.com/jtolds/gls v4.20.0+incompatible h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7C0MuV77Wo=\ngithub.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU=\ngithub.com/kardianos/service v1.2.1 h1:AYndMsehS+ywIS6RB9KOlcXzteWUzxgMgBymJD7+BYk=\ngithub.com/kardianos/service v1.2.1/go.mod h1:CIMRFEJVL+0DS1a3Nx06NaMn4Dz63Ng6O7dl0qH0zVM=\ngithub.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=\ngithub.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE=\ngithub.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk=\ngithub.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=\ngithub.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=\ngithub.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=\ngithub.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=\ngithub.com/lib/pq v1.10.9 h1:YXG7RB+JIjhP29X+OtkiDnYaXQwpS4JEWq7dtCCRUEw=\ngithub.com/lib/pq v1.10.9/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o=\ngithub.com/lifei6671/gocaptcha v0.2.0 h1:CwMjGitq5MsYtWODQhlphdl7WhDdD243y1O2d3l8yFU=\ngithub.com/lifei6671/gocaptcha v0.2.0/go.mod h1:mcUWn1eB+kHOBHLQdmWAQ83bhEGrFTnGMqRCY7sFgUc=\ngithub.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0=\ngithub.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc=\ngithub.com/mark3labs/mcp-go v0.45.0 h1:s0S8qR/9fWaQ3pHxz7pm1uQ0DrswoSnRIxKIjbiQtkc=\ngithub.com/mark3labs/mcp-go v0.45.0/go.mod h1:YnJfOL382MIWDx1kMY+2zsRHU/q78dBg9aFb8W6Thdw=\ngithub.com/mattn/go-runewidth v0.0.13 h1:lTGmDsbAYt5DmK6OnoV7EuIF1wEIFAcxld6ypU4OSgU=\ngithub.com/mattn/go-runewidth v0.0.13/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w=\ngithub.com/mattn/go-sqlite3 v1.14.34 h1:3NtcvcUnFBPsuRcno8pUtupspG/GM+9nZ88zgJcp6Zk=\ngithub.com/mattn/go-sqlite3 v1.14.34/go.mod h1:Uh1q+B4BYcTPb+yiD3kU8Ct7aC0hY9fxUwlHK0RXw+Y=\ngithub.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY=\ngithub.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=\ngithub.com/nfnt/resize v0.0.0-20180221191011-83c6a9932646 h1:zYyBkD/k9seD2A7fsi6Oo2LfFZAehjjQMERAvZLEDnQ=\ngithub.com/nfnt/resize v0.0.0-20180221191011-83c6a9932646/go.mod h1:jpp1/29i3P1S/RLdc7JQKbRpFeM1dOBd8T9ki5s+AY8=\ngithub.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=\ngithub.com/onsi/ginkgo v1.10.1 h1:q/mM8GF/n0shIN8SaAZ0V+jnLPzen6WIVZdiwrRlMlo=\ngithub.com/onsi/ginkgo v1.10.1/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=\ngithub.com/onsi/gomega v1.7.0 h1:XPnZz8VVBHjVsy1vzJmRwIcSwiUO+JFfrv/xGiigmME=\ngithub.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=\ngithub.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=\ngithub.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=\ngithub.com/prometheus/client_golang v1.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU=\ngithub.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k=\ngithub.com/prometheus/client_model v0.5.0 h1:VQw1hfvPvk3Uv6Qf29VrPF32JB6rtbgI6cYPYQjL0Qw=\ngithub.com/prometheus/client_model v0.5.0/go.mod h1:dTiFglRmd66nLR9Pv9f0mZi7B7fk5Pm3gvsjB5tr+kI=\ngithub.com/prometheus/common v0.48.0 h1:QO8U2CdOzSn1BBsmXJXduaaW+dY/5QLjfB8svtSzKKE=\ngithub.com/prometheus/common v0.48.0/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5EC6ILDTlAPc=\ngithub.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo=\ngithub.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo=\ngithub.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc=\ngithub.com/rivo/uniseg v0.3.4 h1:3Z3Eu6FGHZWSfNKJTOUiPatWwfc7DzJRU04jFUqJODw=\ngithub.com/rivo/uniseg v0.3.4/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88=\ngithub.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ=\ngithub.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog=\ngithub.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk=\ngithub.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=\ngithub.com/shiena/ansicolor v0.0.0-20200904210342-c7312218db18 h1:DAYUYH5869yV94zvCES9F51oYtN5oGlwjxJJz7ZCnik=\ngithub.com/shiena/ansicolor v0.0.0-20200904210342-c7312218db18/go.mod h1:nkxAfR/5quYxwPZhyDxgasBMnRtBZd0FCEpawpjMUFg=\ngithub.com/smartystreets/assertions v1.2.0 h1:42S6lae5dvLc7BrLu/0ugRtcFVjoJNMC/N3yZFZkDFs=\ngithub.com/smartystreets/assertions v1.2.0/go.mod h1:tcbTF8ujkAEcZ8TElKY+i30BzYlVhC/LOxJk7iOWnoo=\ngithub.com/smartystreets/goconvey v1.7.2 h1:9RBaZCeXEQ3UselpuwUQHltGVXvdwm6cv1hgR6gDIPg=\ngithub.com/smartystreets/goconvey v1.7.2/go.mod h1:Vw0tHAZW6lzCRk3xgdin6fKYcG+G3Pg9vgXWeJpQFMM=\ngithub.com/spf13/cast v1.7.1 h1:cuNEagBQEHWN1FnbGEjCXL2szYEXqfJPbP2HNUaca9Y=\ngithub.com/spf13/cast v1.7.1/go.mod h1:ancEpBxwJDODSW/UG4rDrAqiKolqNNh2DX3mk86cAdo=\ngithub.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=\ngithub.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals=\ngithub.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg=\ngithub.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=\ngithub.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6KllzawFIhcdPw=\ngithub.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc=\ngithub.com/wk8/go-ordered-map/v2 v2.1.8 h1:5h/BUHu93oj4gIdvHHHGsScSTMijfx5PeYkE/fJgbpc=\ngithub.com/wk8/go-ordered-map/v2 v2.1.8/go.mod h1:5nJHM5DyteebpVlHnWMV0rPz6Zp7+xBAnxjb1X5vnTw=\ngithub.com/yanyiwu/gojieba v1.4.7 h1:2YkXELcYLTE0SJetq6xv4MjpEikWga6VpFn4jIFFQ/k=\ngithub.com/yanyiwu/gojieba v1.4.7/go.mod h1:JUq4DddFVGdHXJHxxepxRmhrKlDpaBxR8O28v6fKYLY=\ngithub.com/yosida95/uritemplate/v3 v3.0.2 h1:Ed3Oyj9yrmi9087+NczuL5BwkIc4wvTb5zIM+UJPGz4=\ngithub.com/yosida95/uritemplate/v3 v3.0.2/go.mod h1:ILOh0sOhIJR3+L/8afwt/kE++YT040gmv5BQTMR2HP4=\ngithub.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=\ngolang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=\ngolang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=\ngolang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=\ngolang.org/x/crypto v0.13.0/go.mod h1:y6Z2r+Rw4iayiXXAIxJIDAJ1zMW4yaTpebo8fPOliYc=\ngolang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDfU=\ngolang.org/x/crypto v0.23.0/go.mod h1:CKFgDieR+mRhux2Lsu27y0fO304Db0wZe70UKqHu0v8=\ngolang.org/x/crypto v0.31.0/go.mod h1:kDsLvtWBEx7MV9tJOj9bnXsPbxwJQ6csT/x4KIN4Ssk=\ngolang.org/x/crypto v0.33.0 h1:IOBPskki6Lysi0lo9qQvbxiQ+FvsCC/YWOecCHAixus=\ngolang.org/x/crypto v0.33.0/go.mod h1:bVdXmD7IV/4GdElGPozy6U7lWdRXA4qyRVGJV57uQ5M=\ngolang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js=\ngolang.org/x/image v0.22.0 h1:UtK5yLUzilVrkjMAZAZ34DXGpASN8i8pj8g+O+yd10g=\ngolang.org/x/image v0.22.0/go.mod h1:9hPFhljd4zZ1GNSIZJ49sqbp45GKK9t6w+iXvGqZUz4=\ngolang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=\ngolang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=\ngolang.org/x/mod v0.12.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=\ngolang.org/x/mod v0.15.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=\ngolang.org/x/mod v0.17.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=\ngolang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=\ngolang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=\ngolang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=\ngolang.org/x/net v0.0.0-20190923162816-aa69164e4478/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=\ngolang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=\ngolang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=\ngolang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=\ngolang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=\ngolang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg=\ngolang.org/x/net v0.15.0/go.mod h1:idbUs1IY1+zTqbi8yxTbhexhEEk5ur9LInksu6HrEpk=\ngolang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44=\ngolang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM=\ngolang.org/x/net v0.33.0/go.mod h1:HXLR5J+9DxmrqMwG9qjGCxZ+zKXxBru04zlTvWlWuN4=\ngolang.org/x/net v0.35.0 h1:T5GQRQb2y08kTAByq9L4/bz8cipCdA8FbRTXewonqY8=\ngolang.org/x/net v0.35.0/go.mod h1:EglIi67kWsHKlRzzVMUD93VMSWGFOMSZgxFjparz1Qk=\ngolang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=\ngolang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=\ngolang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=\ngolang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=\ngolang.org/x/sync v0.3.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y=\ngolang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=\ngolang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=\ngolang.org/x/sync v0.10.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=\ngolang.org/x/sync v0.11.0 h1:GGz8+XQP4FvTTrjZPzNKTMFtSXH80RAzG+5ghFPgK9w=\ngolang.org/x/sync v0.11.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=\ngolang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=\ngolang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=\ngolang.org/x/sys v0.0.0-20191010194322-b09406accb47/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20201015000850-e3ed0017c211/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=\ngolang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=\ngolang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=\ngolang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=\ngolang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=\ngolang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=\ngolang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=\ngolang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=\ngolang.org/x/sys v0.28.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=\ngolang.org/x/sys v0.30.0 h1:QjkSwP/36a20jFYWkSue1YwXzLmsV5Gfq7Eiy72C1uc=\ngolang.org/x/sys v0.30.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=\ngolang.org/x/telemetry v0.0.0-20240228155512-f48c80bd79b2/go.mod h1:TeRTkGYfJXctD9OcfyVLyj2J3IxLnKwHJR8f4D8a3YE=\ngolang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=\ngolang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=\ngolang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k=\ngolang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo=\ngolang.org/x/term v0.12.0/go.mod h1:owVbMEjm3cBLCHdkQu9b1opXd4ETQWc3BhuQGKgXgvU=\ngolang.org/x/term v0.17.0/go.mod h1:lLRBjIVuehSbZlaOtGMbcMncT+aqLLLmKrsjNrUguwk=\ngolang.org/x/term v0.20.0/go.mod h1:8UkIAJTvZgivsXaD6/pH6U9ecQzZ45awqEOzuCvwpFY=\ngolang.org/x/term v0.27.0/go.mod h1:iMsnZpn0cago0GOrHO2+Y7u7JPn5AylBrcoWkElMTSM=\ngolang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=\ngolang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=\ngolang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=\ngolang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=\ngolang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=\ngolang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=\ngolang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8=\ngolang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE=\ngolang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=\ngolang.org/x/text v0.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=\ngolang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ=\ngolang.org/x/text v0.22.0 h1:bofq7m3/HAFvbF51jz3Q9wLg3jkvSPuiZu/pD1XwgtM=\ngolang.org/x/text v0.22.0/go.mod h1:YRoo4H8PVmsu+E3Ou7cqLVH8oXWIHVoX0jqUWALQhfY=\ngolang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=\ngolang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=\ngolang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=\ngolang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=\ngolang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU=\ngolang.org/x/tools v0.13.0/go.mod h1:HvlwmtVNQAhOuCjW7xxvovg8wbNq7LwfXh/k7wXUl58=\ngolang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d/go.mod h1:aiJjzUbINMkxbQROHiO6hDPo2LHcIPhhQsa9DLh0yGk=\ngolang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=\ngoogle.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg=\ngoogle.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw=\ngopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=\ngopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=\ngopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=\ngopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q=\ngopkg.in/fsnotify.v1 v1.4.7 h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4=\ngopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys=\ngopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ=\ngopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw=\ngopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=\ngopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=\ngopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=\ngopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=\ngopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=\ngopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=\n"
  },
  {
    "path": "graphics/copy.go",
    "content": "package graphics\n\nimport (\n\t\"errors\"\n\t\"image\"\n\t\"os\"\n\n\t\"github.com/nfnt/resize\"\n)\n\nfunc ImageCopy(src image.Image, x, y, w, h int) (image.Image, error) {\n\n\tvar subImg image.Image\n\n\tif rgbImg, ok := src.(*image.YCbCr); ok {\n\t\tsubImg = rgbImg.SubImage(image.Rect(x, y, x+w, y+h)).(*image.YCbCr) //图片裁剪x0 y0 x1 y1\n\t} else if rgbImg, ok := src.(*image.RGBA); ok {\n\t\tsubImg = rgbImg.SubImage(image.Rect(x, y, x+w, y+h)).(*image.RGBA) //图片裁剪x0 y0 x1 y1\n\t} else if rgbImg, ok := src.(*image.NRGBA); ok {\n\t\tsubImg = rgbImg.SubImage(image.Rect(x, y, x+w, y+h)).(*image.NRGBA) //图片裁剪x0 y0 x1 y1\n\t} else if rgbImg, ok := src.(*image.Paletted); ok {\n\t\tsubImg = rgbImg.SubImage(image.Rect(x, y, x+w, y+h)).(*image.Paletted) //图片裁剪x0 y0 x1 y1\n\t} else {\n\n\t\treturn subImg, errors.New(\"图片解码失败\")\n\t}\n\n\treturn subImg, nil\n}\n\nfunc ImageCopyFromFile(p string, x, y, w, h int) (image.Image, error) {\n\tvar src image.Image\n\n\tfile, err := os.Open(p)\n\tif err != nil {\n\t\treturn src, err\n\t}\n\tdefer file.Close()\n\tsrc, _, err = image.Decode(file)\n\n\treturn ImageCopy(src, x, y, w, h)\n}\n\nfunc ImageResize(src image.Image, w, h int) image.Image {\n\treturn resize.Resize(uint(w), uint(h), src, resize.Lanczos3)\n}\nfunc ImageResizeSaveFile(src image.Image, width, height int, p string) error {\n\tdst := resize.Resize(uint(width), uint(height), src, resize.Lanczos3)\n\n\treturn SaveImage(p, dst)\n}\n"
  },
  {
    "path": "graphics/file.go",
    "content": "package graphics\n\nimport (\n\t\"image\"\n\t\"image/gif\"\n\t\"image/jpeg\"\n\t\"image/png\"\n\t\"os\"\n\t\"path/filepath\"\n\t\"strings\"\n)\n\n// 将图片保存到指定的路径\nfunc SaveImage(p string, src image.Image) error {\n\n\tos.MkdirAll(filepath.Dir(p), 0666)\n\n\tf, err := os.OpenFile(p, os.O_SYNC|os.O_RDWR|os.O_CREATE, 0666)\n\n\tif err != nil {\n\t\treturn err\n\t}\n\tdefer f.Close()\n\text := filepath.Ext(p)\n\n\tif strings.EqualFold(ext, \".jpg\") || strings.EqualFold(ext, \".jpeg\") {\n\n\t\terr = jpeg.Encode(f, src, &jpeg.Options{Quality: 80})\n\n\t} else if strings.EqualFold(ext, \".png\") {\n\t\terr = png.Encode(f, src)\n\t} else if strings.EqualFold(ext, \".gif\") {\n\t\terr = gif.Encode(f, src, &gif.Options{NumColors: 256})\n\t}\n\treturn err\n}\n"
  },
  {
    "path": "lib/time/README",
    "content": "The zoneinfo.zip archive contains time zone files compiled using\nthe code and data maintained as part of the IANA Time Zone Database.\nThe IANA asserts that the database is in the public domain.\n\nFor more information, see\nhttp://www.iana.org/time-zones\nftp://ftp.iana.org/tz/code/tz-link.htm\nhttp://tools.ietf.org/html/rfc6557\n\nTo rebuild the archive, read and run update.bash.\n"
  },
  {
    "path": "lib/time/update.bash",
    "content": "#!/bin/bash\n# Copyright 2012 The Go Authors. All rights reserved.\n# Use of this source code is governed by a BSD-style\n# license that can be found in the LICENSE file.\n\n# This script rebuilds the time zone files using files\n# downloaded from the ICANN/IANA distribution.\n# Consult http://www.iana.org/time-zones for the latest versions.\n\n# Versions to use.\nCODE=2016j\nDATA=2016j\n\nset -e\nrm -rf work\nmkdir work\ncd work\nmkdir zoneinfo\ncurl -O http://www.iana.org/time-zones/repository/releases/tzcode$CODE.tar.gz\ncurl -O http://www.iana.org/time-zones/repository/releases/tzdata$DATA.tar.gz\ntar xzf tzcode$CODE.tar.gz\ntar xzf tzdata$DATA.tar.gz\n\n# Turn off 64-bit output in time zone files.\n# We don't need those until 2037.\nperl -p -i -e 's/pass <= 2/pass <= 1/' zic.c\n\nmake CFLAGS=-DSTD_INSPIRED AWK=awk TZDIR=zoneinfo posix_only\n\n# America/Los_Angeles should not be bigger than 1100 bytes.\n# If it is, we probably failed to disable the 64-bit output, which\n# triples the size of the files.\nsize=$(ls -l zoneinfo/America/Los_Angeles | awk '{print $5}')\nif [ $size -gt 1200 ]; then\n\techo 'zone file too large; 64-bit edit failed?' >&2\n\texit 2\nfi\n\ncd zoneinfo\nrm -f ../../zoneinfo.zip\nzip -0 -r ../../zoneinfo.zip *\ncd ../..\n\necho\nif [ \"$1\" == \"-work\" ]; then \n\techo Left workspace behind in work/.\nelse\n\trm -rf work\nfi\necho New time zone files in zoneinfo.zip.\n\n"
  },
  {
    "path": "mail/smtp.go",
    "content": "package mail\n\nimport (\n\t\"bytes\"\n\t\"crypto/md5\"\n\t\"crypto/tls\"\n\t\"encoding/base64\"\n\t\"encoding/hex\"\n\t\"errors\"\n\t\"fmt\"\n\t\"io/ioutil\"\n\t\"log\"\n\t\"net/mail\"\n\t\"net/smtp\"\n\t\"path\"\n\t\"path/filepath\"\n\t\"regexp\"\n\t\"strconv\"\n\t\"strings\"\n\n\t\"github.com/beego/beego/v2/core/logs\"\n)\n\nvar (\n\timageRegex  = regexp.MustCompile(`(src|background)=[\"'](.*?)[\"']`)\n\tschemeRegxp = regexp.MustCompile(`^[a-zA-Z]+://`)\n)\n\n// Mail will represent a formatted email\ntype Mail struct {\n\tTo         []string\n\tToName     []string\n\tSubject    string\n\tHTML       string\n\tText       string\n\tFrom       string\n\tBcc        []string\n\tFromName   string\n\tReplyTo    string\n\tDate       string\n\tFiles      map[string]string\n\tHeaders    string\n\tBaseDir    string //内容中图片路径\n\tCharset    string //编码\n\tRetReceipt string //回执地址，空白则禁用回执\n}\n\n// NewMail returns a new Mail\nfunc NewMail() Mail {\n\treturn Mail{}\n}\n\n// SMTPClient struct\ntype SMTPClient struct {\n\tsmtpAuth smtp.Auth\n\thost     string\n\tport     string\n\tuser     string\n\tsecure   string\n}\n\n// SMTPConfig 配置结构体\ntype SMTPConfig struct {\n\tUsername string\n\tPassword string\n\tHost     string\n\tPort     int\n\tSecure   string\n\tIdentity string\n}\n\nfunc (s *SMTPConfig) Address() string {\n\tif s.Port == 0 {\n\t\ts.Port = 25\n\t}\n\treturn s.Host + `:` + strconv.Itoa(s.Port)\n}\n\nfunc (s *SMTPConfig) Auth() smtp.Auth {\n\tvar auth smtp.Auth\n\ts.Secure = strings.ToUpper(s.Secure)\n\tswitch s.Secure {\n\tcase \"NONE\":\n\t\tauth = unencryptedAuth{smtp.PlainAuth(s.Identity, s.Username, s.Password, s.Host)}\n\tcase \"LOGIN\":\n\t\tauth = LoginAuth(s.Username, s.Password)\n\tcase \"SSL\":\n\t\tfallthrough\n\tdefault:\n\t\t//auth = smtp.PlainAuth(s.Identity, s.Username, s.Password, s.Host)\n\t\tauth = unencryptedAuth{smtp.PlainAuth(s.Identity, s.Username, s.Password, s.Host)}\n\t}\n\treturn auth\n}\n\nfunc NewSMTPClient(conf *SMTPConfig) SMTPClient {\n\treturn SMTPClient{\n\t\tsmtpAuth: conf.Auth(),\n\t\thost:     conf.Host,\n\t\tport:     strconv.Itoa(conf.Port),\n\t\tuser:     conf.Username,\n\t\tsecure:   conf.Secure,\n\t}\n}\n\n// NewMail returns a new Mail\nfunc (c *SMTPClient) NewMail() Mail {\n\treturn NewMail()\n}\n\n// Send - It can be used for generic SMTP stuff\nfunc (c *SMTPClient) Send(m Mail) error {\n\tlength := 0\n\tif len(m.Charset) == 0 {\n\t\tm.Charset = \"utf-8\"\n\t}\n\tboundary := \"COSCMSBOUNDARYFORSMTPGOLIB\"\n\tvar message bytes.Buffer\n\tmessage.WriteString(fmt.Sprintf(\"X-SMTPAPI: %s\\r\\n\", m.Headers))\n\t//回执\n\tif len(m.RetReceipt) > 0 {\n\t\tmessage.WriteString(fmt.Sprintf(\"Return-Receipt-To: %s\\r\\n\", m.RetReceipt))\n\t\tmessage.WriteString(fmt.Sprintf(\"Disposition-Notification-To: %s\\r\\n\", m.RetReceipt))\n\t}\n\tmessage.WriteString(fmt.Sprintf(\"From: %s <%s>\\r\\n\", m.FromName, m.From))\n\tif len(m.ReplyTo) > 0 {\n\t\tmessage.WriteString(fmt.Sprintf(\"Return-Path: %s\\r\\n\", m.ReplyTo))\n\t}\n\tlength = len(m.To)\n\tif length > 0 {\n\t\tnameLength := len(m.ToName)\n\t\tif nameLength > 0 {\n\t\t\tmessage.WriteString(fmt.Sprintf(\"To: %s <%s>\", m.ToName[0], m.To[0]))\n\t\t} else {\n\t\t\tmessage.WriteString(fmt.Sprintf(\"To: <%s>\", m.To[0]))\n\t\t}\n\t\tfor i := 1; i < length; i++ {\n\t\t\tif nameLength > i {\n\t\t\t\tmessage.WriteString(fmt.Sprintf(\", %s <%s>\", m.ToName[i], m.To[i]))\n\t\t\t} else {\n\t\t\t\tmessage.WriteString(fmt.Sprintf(\", <%s>\", m.To[i]))\n\t\t\t}\n\t\t}\n\t}\n\tlength = len(m.Bcc)\n\tif length > 0 {\n\t\tmessage.WriteString(fmt.Sprintf(\"Bcc: <%s>\", m.Bcc[0]))\n\t\tfor i := 1; i < length; i++ {\n\t\t\tmessage.WriteString(fmt.Sprintf(\", <%s>\", m.Bcc[i]))\n\t\t}\n\t}\n\tmessage.WriteString(\"\\r\\n\")\n\tmessage.WriteString(fmt.Sprintf(\"Subject: %s\\r\\n\", m.Subject))\n\tmessage.WriteString(\"MIME-Version: 1.0\\r\\n\")\n\tif m.Files != nil {\n\t\tmessage.WriteString(fmt.Sprintf(\"Content-Type: multipart/mixed; boundary=\\\"%s\\\"\\r\\n\\n--%s\\r\\n\", boundary, boundary))\n\t}\n\tif len(m.HTML) > 0 {\n\t\t//解析内容中的图片\n\t\trs := imageRegex.FindAllStringSubmatch(m.HTML, -1)\n\t\tvar embedImages string\n\t\tfor _, v := range rs {\n\t\t\tsurl := v[2]\n\t\t\tif v2 := schemeRegxp.FindStringIndex(surl); v2 == nil {\n\t\t\t\tfilename := path.Base(surl)\n\t\t\t\tdirectory := path.Dir(surl)\n\t\t\t\tif directory == \".\" {\n\t\t\t\t\tdirectory = \"\"\n\t\t\t\t}\n\t\t\t\th := md5.New()\n\t\t\t\th.Write([]byte(surl + \"@coscms.0\"))\n\t\t\t\tcid := hex.EncodeToString(h.Sum(nil))\n\t\t\t\tif len(m.BaseDir) > 0 && !strings.HasSuffix(m.BaseDir, \"/\") {\n\t\t\t\t\tm.BaseDir += \"/\"\n\t\t\t\t}\n\t\t\t\tif len(directory) > 0 && !strings.HasSuffix(directory, \"/\") {\n\t\t\t\t\tdirectory += \"/\"\n\t\t\t\t}\n\t\t\t\tif str, err := m.ReadAttachment(m.BaseDir + directory + filename); err == nil {\n\t\t\t\t\tre3 := regexp.MustCompile(v[1] + `=[\"']` + regexp.QuoteMeta(surl) + `[\"']`)\n\t\t\t\t\tm.HTML = re3.ReplaceAllString(m.HTML, v[1]+`=\"cid:`+cid+`\"`)\n\n\t\t\t\t\tembedImages += fmt.Sprintf(\"--%s\\r\\n\", boundary)\n\t\t\t\t\tembedImages += fmt.Sprintf(\"Content-Type: application/octet-stream; name=\\\"%s\\\"; charset=\\\"%s\\\"\\r\\n\", filename, m.Charset)\n\t\t\t\t\tembedImages += fmt.Sprintf(\"Content-Description: %s\\r\\n\", filename)\n\t\t\t\t\tembedImages += fmt.Sprintf(\"Content-Disposition: inline; filename=\\\"%s\\\"; charset=\\\"%s\\\"\\r\\n\", filename, m.Charset)\n\t\t\t\t\tembedImages += fmt.Sprintf(\"Content-Transfer-Encoding: base64\\r\\nContent-ID: <%s>\\r\\n\\r\\n%s\\r\\n\\n\", cid, str)\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tpart := fmt.Sprintf(\"Content-Type: text/html\\r\\n\\n%s\\r\\n\\n\", m.HTML)\n\t\tmessage.WriteString(part)\n\t\tmessage.WriteString(embedImages)\n\t} else {\n\t\tpart := fmt.Sprintf(\"Content-Type: text/plain\\r\\n\\n%s\\r\\n\\n\", m.Text)\n\t\tmessage.WriteString(part)\n\t}\n\tif m.Files != nil {\n\t\tfor key, value := range m.Files {\n\t\t\tmessage.WriteString(fmt.Sprintf(\"--%s\\r\\n\", boundary))\n\t\t\tmessage.WriteString(\"Content-Type: application/octect-stream\\r\\n\")\n\t\t\tmessage.WriteString(\"Content-Transfer-Encoding:base64\\r\\n\")\n\t\t\tmessage.WriteString(fmt.Sprintf(\"Content-Disposition: attachment; filename=\\\"%s\\\"; charset=\\\"%s\\\"\\r\\n\\r\\n%s\\r\\n\\n\", key, m.Charset, value))\n\t\t}\n\t\tmessage.WriteString(fmt.Sprintf(\"--%s--\", boundary))\n\t}\n\tif c.secure == \"SSL\" || c.secure == \"TLS\" {\n\t\treturn c.SendTLS(m, message)\n\t}\n\treturn smtp.SendMail(c.host+\":\"+c.port, c.smtpAuth, m.From, m.To, message.Bytes())\n}\n\n//SendTLS 通过TLS发送\nfunc (c *SMTPClient) SendTLS(m Mail, message bytes.Buffer) error {\n\n\tvar ct *smtp.Client\n\tvar err error\n\t// TLS config\n\ttlsconfig := &tls.Config{\n\t\tInsecureSkipVerify: true,\n\t\tServerName:         c.host,\n\t}\n\n\t// Here is the key, you need to call tls.Dial instead of smtp.Dial\n\t// for smtp servers running on 465 that require an ssl connection\n\t// from the very beginning (no starttls)\n\tconn, err := tls.Dial(\"tcp\", c.host+\":\"+c.port, tlsconfig)\n\tif err != nil {\n\t\tlog.Println(err, c.host)\n\t\treturn err\n\t}\n\n\tct, err = smtp.NewClient(conn, c.host)\n\tif err != nil {\n\t\tlog.Println(err)\n\t\treturn err\n\t}\n\n\t//if err := ct.StartTLS(tlsconfig);err != nil {\n\t//\tlog.Println(\"StartTLS Error:\",err,c.host,c.port)\n\t//\treturn err\n\t//}\n\n\t//if err := ct.StartTLS(tlsconfig);err != nil {\n\t//\tfmt.Println(err)\n\t//\treturn err\n\t//}\n\n\tfmt.Println(c.smtpAuth)\n\tif ok, s := ct.Extension(\"AUTH\"); ok {\n\t\tlogs.Info(s)\n\t\t// Auth\n\t\tif err = ct.Auth(c.smtpAuth); err != nil {\n\t\t\tlog.Println(\"Auth Error:\",\n\t\t\t\terr,\n\t\t\t\tc.user,\n\t\t\t)\n\t\t\treturn err\n\t\t}\n\t}\n\t// To && From\n\tif err = ct.Mail(m.From); err != nil {\n\t\tlog.Println(\"Mail Error:\", err, m.From)\n\t\treturn err\n\t}\n\n\tfor _, v := range m.To {\n\t\tif err := ct.Rcpt(v); err != nil {\n\t\t\tlog.Println(\"Rcpt Error:\", err, v)\n\t\t\treturn err\n\t\t}\n\t}\n\n\t// Data\n\tw, err := ct.Data()\n\tif err != nil {\n\t\tlog.Println(\"Data Object Error:\", err)\n\t\treturn err\n\t}\n\n\t_, err = w.Write(message.Bytes())\n\tif err != nil {\n\t\tlog.Println(\"Write Data Object Error:\", err)\n\t\treturn err\n\t}\n\n\terr = w.Close()\n\tif err != nil {\n\t\tlog.Println(\"Data Object Close Error:\", err)\n\t\treturn err\n\t}\n\n\tct.Quit()\n\treturn nil\n}\n\n// AddTo will take a valid email address and store it in the mail.\n// It will return an error if the email is invalid.\nfunc (m *Mail) AddTo(email string) error {\n\t//Parses a single RFC 5322 address, e.g. \"Barry Gibbs <bg@example.com>\"\n\tparsedAddess, e := mail.ParseAddress(email)\n\tif e != nil {\n\t\treturn e\n\t}\n\tm.AddRecipient(parsedAddess)\n\treturn nil\n}\n\n// SetTos 设置收信人Email地址\nfunc (m *Mail) SetTos(emails []string) {\n\tm.To = emails\n}\n\n// AddToName will add a new receipient name to mail\nfunc (m *Mail) AddToName(name string) {\n\tm.ToName = append(m.ToName, name)\n}\n\n// AddRecipient will take an already parsed mail.Address\nfunc (m *Mail) AddRecipient(receipient *mail.Address) {\n\tm.To = append(m.To, receipient.Address)\n\tif len(receipient.Name) > 0 {\n\t\tm.ToName = append(m.ToName, receipient.Name)\n\t}\n}\n\n// AddSubject will set the subject of the mail\nfunc (m *Mail) AddSubject(s string) {\n\tm.Subject = s\n}\n\n// AddHTML will set the body of the mail\nfunc (m *Mail) AddHTML(html string) {\n\tm.HTML = html\n}\n\n// AddText will set the body of the email\nfunc (m *Mail) AddText(text string) {\n\tm.Text = text\n}\n\n// AddFrom will set the senders email\nfunc (m *Mail) AddFrom(from string) error {\n\t//Parses a single RFC 5322 address, e.g. \"Barry Gibbs <bg@example.com>\"\n\tparsedAddess, e := mail.ParseAddress(from)\n\tif e != nil {\n\t\treturn e\n\t}\n\tm.From = parsedAddess.Address\n\tm.FromName = parsedAddess.Name\n\treturn nil\n}\n\n// AddBCC works like AddTo but for BCC\nfunc (m *Mail) AddBCC(email string) error {\n\tparsedAddess, e := mail.ParseAddress(email)\n\tif e != nil {\n\t\treturn e\n\t}\n\tm.Bcc = append(m.Bcc, parsedAddess.Address)\n\treturn nil\n}\n\n// AddRecipientBCC works like AddRecipient but for BCC\nfunc (m *Mail) AddRecipientBCC(email *mail.Address) {\n\tm.Bcc = append(m.Bcc, email.Address)\n}\n\n// AddFromName will set the senders name\nfunc (m *Mail) AddFromName(name string) {\n\tm.FromName = name\n}\n\n// AddReplyTo will set the return address\nfunc (m *Mail) AddReplyTo(reply string) {\n\tm.ReplyTo = reply\n}\n\n// AddDate specifies the date\nfunc (m *Mail) AddDate(date string) {\n\tm.Date = date\n}\n\n// AddAttachment will include file/s in mail\nfunc (m *Mail) AddAttachment(filePath string) error {\n\tif m.Files == nil {\n\t\tm.Files = make(map[string]string)\n\t}\n\tstr, err := m.ReadAttachment(filePath)\n\tif err != nil {\n\t\treturn err\n\t}\n\t_, filename := filepath.Split(filePath)\n\tm.Files[filename] = str\n\treturn nil\n}\n\n// ReadAttachment reading attachment\nfunc (m *Mail) ReadAttachment(filePath string) (string, error) {\n\tfile, e := ioutil.ReadFile(filePath)\n\tif e != nil {\n\t\treturn \"\", e\n\t}\n\tencoded := base64.StdEncoding.EncodeToString(file)\n\ttotalChars := len(encoded)\n\tmaxLength := 500 //每行最大长度\n\ttotalLines := totalChars / maxLength\n\tvar buf bytes.Buffer\n\tfor i := 0; i < totalLines; i++ {\n\t\tbuf.WriteString(encoded[i*maxLength:(i+1)*maxLength] + \"\\n\")\n\t}\n\tbuf.WriteString(encoded[totalLines*maxLength:])\n\treturn buf.String(), nil\n}\n\n// AddHeaders addding header string\nfunc (m *Mail) AddHeaders(headers string) {\n\tm.Headers = headers\n}\n\n// =======================================================\n// unencryptedAuth\n// =======================================================\n\ntype unencryptedAuth struct {\n\tsmtp.Auth\n}\n\nfunc (a unencryptedAuth) Start(server *smtp.ServerInfo) (string, []byte, error) {\n\ts := *server\n\ts.TLS = true\n\treturn a.Auth.Start(&s)\n}\n\n// ======================================================\n// loginAuth\n// ======================================================\n\ntype loginAuth struct {\n\tusername, password string\n}\n\n// LoginAuth loginAuth方式认证\nfunc LoginAuth(username, password string) smtp.Auth {\n\treturn &loginAuth{username, password}\n}\n\nfunc (a *loginAuth) Start(server *smtp.ServerInfo) (string, []byte, error) {\n\tif !server.TLS {\n\t\treturn \"\", nil, errors.New(\"unencrypted connection\")\n\t}\n\treturn \"LOGIN\", []byte(a.username), nil\n}\n\nfunc (a *loginAuth) Next(fromServer []byte, more bool) ([]byte, error) {\n\tif more {\n\t\tswitch string(fromServer) {\n\t\tcase \"Username:\":\n\t\t\treturn []byte(a.username), nil\n\t\tcase \"Password:\":\n\t\t\treturn []byte(a.password), nil\n\t\tdefault:\n\t\t\treturn nil, errors.New(\"Unkown fromServer\")\n\t\t}\n\t}\n\treturn nil, nil\n}\n"
  },
  {
    "path": "mail/smtp_test.go",
    "content": "package mail\n\nimport (\n\t// \"os\"\n\t\"testing\"\n)\n\nfunc TestSend(t *testing.T) {\n\t/*\n\tconf := &SMTPConfig{\n\t\tUsername: \"swh@adm***.com\",\n\t\tPassword: \"\",\n\t\tHost:     \"smtp.exmail.qq.com\",\n\t\tPort:     465,\n\t\tSecure:   \"SSL\",\n\t}\n\tc := NewSMTPClient(conf)\n\tm := NewMail()\n\tm.AddTo(\"brother <1556****@qq.com>\")\n\tm.AddFrom(\"hank <\" + conf.Username + \">\")\n\tm.AddSubject(\"Testing\")\n\tm.AddText(\"Some text :)\")\n\tfilepath, _ := os.Getwd()\n\tm.AddAttachment(filepath + \"/README.md\")\n\tif e := c.Send(m); e != nil {\n\t\tt.Error(e)\n\t} else {\n\t\tt.Log(\"发送成功\")\n\t}\n\t*/\n}\n"
  },
  {
    "path": "mail/util.go",
    "content": "package mail\n\nimport (\n\t\"net/mail\"\n)\n\nfunc MailAddr(name string, address string) *mail.Address {\n\treturn &mail.Address{\n\t\tName:    name,\n\t\tAddress: address,\n\t}\n}\n\ntype Attachments struct {\n\tFiles   []string\n\tBaseDir string\n}\n\n//SendMail 发送电邮\nfunc SendMail(subject string, content string, receiver, sender string,\n\tbcc []string, smtpConfig *SMTPConfig, attachments *Attachments) error {\n\tc := NewSMTPClient(smtpConfig)\n\tm := NewMail()\n\terr := m.AddTo(receiver) //receiver e.g. \"Barry Gibbs <bg@example.com>\"\n\tif err != nil {\n\t\treturn err\n\t}\n\terr = m.AddFrom(sender)\n\tif err != nil {\n\t\treturn err\n\t}\n\tm.AddSubject(subject)\n\t//m.AddText(\"Some text :)\")\n\tm.AddHTML(content)\n\tif attachments != nil {\n\t\tm.BaseDir = attachments.BaseDir\n\t\tfor _, v := range attachments.Files {\n\t\t\terr = m.AddAttachment(v)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t}\n\t}\n\tfor _, addr := range bcc {\n\t\terr = m.AddBCC(addr)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\treturn c.Send(m)\n}\n"
  },
  {
    "path": "main.go",
    "content": "package main\n\nimport (\n\t\"fmt\"\n\t\"io/ioutil\"\n\t\"log\"\n\t\"os\"\n\t\"path/filepath\"\n\t\"runtime\"\n\t\"strings\"\n\n\t_ \"github.com/beego/beego/v2/server/web/session/memcache\"\n\t_ \"github.com/beego/beego/v2/server/web/session/mysql\"\n\t_ \"github.com/beego/beego/v2/server/web/session/redis\"\n\t\"github.com/kardianos/service\"\n\t_ \"github.com/mattn/go-sqlite3\"\n\t\"github.com/mindoc-org/mindoc/commands\"\n\t\"github.com/mindoc-org/mindoc/commands/daemon\"\n\t_ \"github.com/mindoc-org/mindoc/routers\"\n)\n\nfunc isViaDaemonUnix() bool {\n\tparentPid := os.Getppid()\n\n\tcmdLineBytes, err := ioutil.ReadFile(fmt.Sprintf(\"/proc/%d/cmdline\", parentPid))\n\tif err != nil {\n\t\treturn false\n\t}\n\n\tcmdLine := string(cmdLineBytes)\n\texecutable := strings.Split(cmdLine, \" \")[0]\n\tfmt.Printf(\"Parent executable: %s\\n\", executable)\n\tfilename := filepath.Base(executable)\n\treturn strings.Contains(filename, \"mindoc-daemon\")\n}\n\nfunc main() {\n\n\tif len(os.Args) >= 3 && os.Args[1] == \"service\" {\n\t\tif os.Args[2] == \"install\" {\n\t\t\tdaemon.Install()\n\t\t} else if os.Args[2] == \"remove\" {\n\t\t\tdaemon.Uninstall()\n\t\t} else if os.Args[2] == \"restart\" {\n\t\t\tdaemon.Restart()\n\t\t}\n\t}\n\tcommands.RegisterCommand()\n\n\td := daemon.NewDaemon()\n\n\tif runtime.GOOS != \"windows\" && !isViaDaemonUnix() {\n\t\ts, err := service.New(d, d.Config())\n\n\t\tif err != nil {\n\t\t\tfmt.Println(\"Create service error => \", err)\n\t\t\tos.Exit(1)\n\t\t}\n\n\t\tif err := s.Run(); err != nil {\n\t\t\tlog.Fatal(\"启动程序失败 ->\", err)\n\t\t}\n\t} else {\n\t\td.Run()\n\t}\n\n}\n"
  },
  {
    "path": "mcp/handler.go",
    "content": "package mcp\n\nimport (\n\t\"context\"\n\t\"encoding/json\"\n\n\t\"github.com/mark3labs/mcp-go/mcp\"\n\t\"github.com/mindoc-org/mindoc/conf\"\n\t\"github.com/mindoc-org/mindoc/controllers\"\n)\n\n// GetGlobalSearchMcpTool 获取全局搜索的mcp工具\nfunc GetGlobalSearchMcpTool() mcp.Tool {\n\treturn mcp.NewTool(\"MinDocGlobalSearch\",\n\t\tmcp.WithDescription(\"MinDoc全局文档内容搜索\"),\n\t\tmcp.WithString(\"keyword\",\n\t\t\tmcp.Required(),\n\t\t\tmcp.Description(\"要执行全局搜索的关键词，多个搜索关键词请用空格分割，请尽量使用最精简的关键词来检索，不要输入无关词汇\"),\n\t\t),\n\t\tmcp.WithNumber(\"pageIndex\",\n\t\t\tmcp.Required(),\n\t\t\tmcp.Description(\"全局搜索时指定分页的顺序下标，每页最多有10条结果，建议只查看最相关的1-10页文档内容的搜索结果\"),\n\t\t\tmcp.Enum(\"1\", \"2\", \"3\", \"4\", \"5\", \"6\", \"7\", \"8\", \"9\", \"10\"),\n\t\t),\n\t)\n}\n\n// GlobalSearchMcpHandler 全局搜索的mcp处理函数\nfunc GlobalSearchMcpHandler(ctx context.Context, request mcp.CallToolRequest) (*mcp.CallToolResult, error) {\n\tparamMap := request.Params.Arguments.(map[string]any)\n\tpageIndex := 1\n\tif v, ok := paramMap[\"pageIndex\"].(float64); ok {\n\t\tpageIndex = int(v)\n\t}\n\ttotalCount, result := globalSearchFunction(paramMap[\"keyword\"].(string), pageIndex)\n\tjsonContent, err := json.Marshal(result)\n\tif err != nil {\n\t\treturn mcp.NewToolResultStructuredOnly(map[string]any{\n\t\t\t\"totalCount\": 0,\n\t\t\t\"result\":     make([]map[string]any, 0),\n\t\t}), err\n\t}\n\n\tstructContent := make([]map[string]any, 0)\n\terr = json.Unmarshal(jsonContent, &structContent)\n\tif err != nil {\n\t\treturn mcp.NewToolResultStructuredOnly(map[string]any{\n\t\t\t\"totalCount\": 0,\n\t\t\t\"result\":     make([]map[string]any, 0),\n\t\t}), err\n\t}\n\n\treturn mcp.NewToolResultStructuredOnly(map[string]any{\n\t\t\"totalCount\": totalCount,\n\t\t\"result\":     structContent,\n\t}), nil\n}\n\nfunc globalSearchFunction(keyword string, pageIndex int) (int, []*controllers.SearchV2RawResult) {\n\tmemberId := 0\n\t// 使用底层搜索函数\n\tsearchResult, _, totalCount, err := controllers.PerformSearchV2Raw(keyword, pageIndex, conf.PageSize, memberId)\n\tif err != nil {\n\t\treturn 0, make([]*controllers.SearchV2RawResult, 0)\n\t}\n\treturn totalCount, searchResult\n}\n"
  },
  {
    "path": "mcp/mcp.go",
    "content": "package mcp\n\nimport (\n\t\"github.com/mark3labs/mcp-go/server\"\n)\n\n// MCPServer MinDoc MCP Server\ntype MCPServer struct {\n\tserver *server.MCPServer\n}\n\n// NewMCPServer creates a new MinDoc MCP Server\nfunc NewMCPServer() *MCPServer {\n\tmcpServer := server.NewMCPServer(\n\t\t\"MinDoc MCP Server\",\n\t\t\"1.0.0\",\n\t\tserver.WithRecovery(),\n\t)\n\n\tmcpServer.AddTool(GetGlobalSearchMcpTool(), GlobalSearchMcpHandler)\n\n\treturn &MCPServer{\n\t\tserver: mcpServer,\n\t}\n}\n\n// ServeHTTP Run starts the server\nfunc (s *MCPServer) ServeHTTP() *server.StreamableHTTPServer {\n\treturn server.NewStreamableHTTPServer(s.server)\n}\n"
  },
  {
    "path": "mcp/middleware.go",
    "content": "package mcp\n\nimport (\n\t\"context\"\n\t\"net/http\"\n\n\t\"github.com/beego/beego/v2/server/web\"\n\tbeegoContext \"github.com/beego/beego/v2/server/web/context\"\n)\n\n// AuthMiddleware 返回一个中间件函数，用于验证MCP请求中的认证令牌\nfunc AuthMiddleware(ctx *beegoContext.Context) {\n\tpresetMcpApiKey := web.AppConfig.DefaultString(\"mcp_api_key\", \"\")\n\tmcpApiKeyParamValue := ctx.Request.URL.Query().Get(\"api_key\")\n\tif presetMcpApiKey != mcpApiKeyParamValue {\n\t\thttp.Error(ctx.ResponseWriter, \"Missing or invalid mcp authorization key\", http.StatusUnauthorized)\n\t\treturn\n\t}\n\n\t// Add mcp_api_key to request context\n\tctx.Request.WithContext(context.WithValue(ctx.Request.Context(), \"mcp_api_key\", mcpApiKeyParamValue))\n}\n"
  },
  {
    "path": "models/AttachmentModel.go",
    "content": "// 数据库模型.\npackage models\n\nimport (\n\t\"time\"\n\n\t\"os\"\n\n\t\"strings\"\n\n\t\"github.com/beego/beego/v2/client/orm\"\n\t\"github.com/beego/beego/v2/core/logs\"\n\t\"github.com/mindoc-org/mindoc/conf\"\n\t\"github.com/mindoc-org/mindoc/utils/filetil\"\n\t// \"gorm.io/driver/sqlite\"\n\t// \"gorm.io/gorm\"\n\t// \"gorm.io/gorm/logger\"\n\t// \"gorm.io/gorm/schema\"\n)\n\n// 定义全局的db对象，我们执行数据库操作主要通过他实现。\n// var _db *gorm.DB\n\n// Attachment struct .\ntype Attachment struct {\n\tAttachmentId int       `orm:\"column(attachment_id);pk;auto;unique\" json:\"attachment_id\"`\n\tBookId       int       `orm:\"column(book_id);type(int);description(所属book id)\" json:\"book_id\"`\n\tDocumentId   int       `orm:\"column(document_id);type(int);null;description(所属文档id)\" json:\"doc_id\"`\n\tFileName     string    `orm:\"column(file_name);size(255);description(文件名称)\" json:\"file_name\"`\n\tFilePath     string    `orm:\"column(file_path);size(2000);description(文件路径)\" json:\"file_path\"`\n\tFileSize     float64   `orm:\"column(file_size);type(float);description(文件大小 字节)\" json:\"file_size\"`\n\tHttpPath     string    `orm:\"column(http_path);size(2000);description(文件路径)\" json:\"http_path\"`\n\tFileExt      string    `orm:\"column(file_ext);size(50);description(文件后缀)\" json:\"file_ext\"`\n\tCreateTime   time.Time `orm:\"type(datetime);column(create_time);auto_now_add;description(创建时间)\" json:\"create_time\"`\n\tCreateAt     int       `orm:\"column(create_at);type(int);description(创建人id)\" json:\"create_at\"`\n\tResourceType string    `orm:\"-\" json:\"resource_type\"`\n}\n\n// TableName 获取对应上传附件数据库表名.\nfunc (m *Attachment) TableName() string {\n\treturn \"attachment\"\n}\n\n// TableEngine 获取数据使用的引擎.\nfunc (m *Attachment) TableEngine() string {\n\treturn \"INNODB\"\n}\nfunc (m *Attachment) TableNameWithPrefix() string {\n\treturn conf.GetDatabasePrefix() + m.TableName()\n}\n\nfunc NewAttachment() *Attachment {\n\treturn &Attachment{}\n}\n\nfunc (m *Attachment) Insert() error {\n\to := orm.NewOrm()\n\n\t_, err := o.Insert(m)\n\n\treturn err\n}\nfunc (m *Attachment) Update() error {\n\to := orm.NewOrm()\n\t_, err := o.Update(m)\n\treturn err\n}\n\nfunc (m *Attachment) Delete() error {\n\to := orm.NewOrm()\n\n\t_, err := o.Delete(m)\n\n\tif err == nil {\n\t\tif err1 := os.Remove(m.FilePath); err1 != nil {\n\t\t\tlogs.Error(err1)\n\t\t}\n\t}\n\n\treturn err\n}\n\nfunc (m *Attachment) Find(id int) (*Attachment, error) {\n\tif id <= 0 {\n\t\treturn m, ErrInvalidParameter\n\t}\n\to := orm.NewOrm()\n\n\terr := o.QueryTable(m.TableNameWithPrefix()).Filter(\"attachment_id\", id).One(m)\n\n\treturn m, err\n}\n\n// 查询指定文档的附件列表\nfunc (m *Attachment) FindListByDocumentId(docId int) (attaches []*Attachment, err error) {\n\to := orm.NewOrm()\n\n\t_, err = o.QueryTable(m.TableNameWithPrefix()).Filter(\"document_id\", docId).Filter(\"book_id__gt\", 0).OrderBy(\"-attachment_id\").All(&attaches)\n\treturn\n}\n\n// 分页查询附件\nfunc (m *Attachment) FindToPager(pageIndex, pageSize int) (attachList []*AttachmentResult, totalCount int, err error) {\n\to := orm.NewOrm()\n\n\ttotal, err := o.QueryTable(m.TableNameWithPrefix()).Count()\n\n\tif err != nil {\n\n\t\treturn nil, 0, err\n\t}\n\ttotalCount = int(total)\n\n\tvar list []*Attachment\n\n\toffset := (pageIndex - 1) * pageSize\n\tif pageSize == 0 {\n\t\t_, err = o.QueryTable(m.TableNameWithPrefix()).OrderBy(\"-attachment_id\").Offset(offset).Limit(pageSize).All(&list)\n\t} else {\n\t\t_, err = o.QueryTable(m.TableNameWithPrefix()).OrderBy(\"-attachment_id\").All(&list)\n\t}\n\n\tif err != nil {\n\t\tif err == orm.ErrNoRows {\n\t\t\tlogs.Info(\"没有查到附件 ->\", err)\n\t\t\terr = nil\n\t\t}\n\t\treturn\n\t}\n\n\tfor _, item := range list {\n\t\tattach := &AttachmentResult{}\n\t\tattach.Attachment = *item\n\t\tattach.FileShortSize = filetil.FormatBytes(int64(attach.FileSize))\n\t\t//当项目ID为0标识是文章的附件\n\t\tif item.BookId == 0 && item.DocumentId > 0 {\n\t\t\tblog := NewBlog()\n\t\t\tif err := o.QueryTable(blog.TableNameWithPrefix()).Filter(\"blog_id\", item.DocumentId).One(blog, \"blog_title\"); err == nil {\n\t\t\t\tattach.BookName = blog.BlogTitle\n\t\t\t} else {\n\t\t\t\tattach.BookName = \"[文章不存在]\"\n\t\t\t}\n\t\t} else {\n\t\t\tbook := NewBook()\n\n\t\t\tif e := o.QueryTable(book.TableNameWithPrefix()).Filter(\"book_id\", item.BookId).One(book, \"book_name\"); e == nil {\n\t\t\t\tattach.BookName = book.BookName\n\n\t\t\t\tdoc := NewDocument()\n\n\t\t\t\tif e := o.QueryTable(doc.TableNameWithPrefix()).Filter(\"document_id\", item.DocumentId).One(doc, \"document_name\"); e == nil {\n\t\t\t\t\tattach.DocumentName = doc.DocumentName\n\t\t\t\t} else {\n\t\t\t\t\tattach.DocumentName = \"[文档不存在]\"\n\t\t\t\t}\n\n\t\t\t} else {\n\t\t\t\tattach.BookName = \"[项目不存在]\"\n\t\t\t}\n\t\t}\n\t\tattach.LocalHttpPath = strings.Replace(item.FilePath, \"\\\\\", \"/\", -1)\n\n\t\tattachList = append(attachList, attach)\n\t}\n\n\treturn\n}\n"
  },
  {
    "path": "models/AttachmentResult.go",
    "content": "package models\n\nimport (\n\t\"strings\"\n\n\t\"github.com/beego/beego/v2/client/orm\"\n\t\"github.com/mindoc-org/mindoc/utils/filetil\"\n)\n\ntype AttachmentResult struct {\n\tAttachment\n\tIsExist       bool\n\tBookName      string\n\tDocumentName  string\n\tFileShortSize string\n\tAccount       string\n\tLocalHttpPath string\n}\n\nfunc NewAttachmentResult() *AttachmentResult {\n\treturn &AttachmentResult{IsExist: false}\n}\n\nfunc (m *AttachmentResult) Find(id int) (*AttachmentResult, error) {\n\to := orm.NewOrm()\n\n\tattach := NewAttachment()\n\n\terr := o.QueryTable(m.TableNameWithPrefix()).Filter(\"attachment_id\", id).One(attach)\n\n\tif err != nil {\n\t\treturn m, err\n\t}\n\n\tm.Attachment = *attach\n\n\tif attach.BookId == 0 && attach.DocumentId > 0 {\n\t\tblog := NewBlog()\n\t\tif err := o.QueryTable(blog.TableNameWithPrefix()).Filter(\"blog_id\", attach.DocumentId).One(blog, \"blog_title\"); err == nil {\n\t\t\tm.BookName = blog.BlogTitle\n\t\t} else {\n\t\t\tm.BookName = \"[文章不存在]\"\n\t\t}\n\t} else {\n\t\tbook := NewBook()\n\n\t\tif e := o.QueryTable(book.TableNameWithPrefix()).Filter(\"book_id\", attach.BookId).One(book, \"book_name\"); e == nil {\n\t\t\tm.BookName = book.BookName\n\t\t} else {\n\t\t\tm.BookName = \"[不存在]\"\n\t\t}\n\t\tdoc := NewDocument()\n\n\t\tif e := o.QueryTable(doc.TableNameWithPrefix()).Filter(\"document_id\", attach.DocumentId).One(doc, \"document_name\"); e == nil {\n\t\t\tm.DocumentName = doc.DocumentName\n\t\t} else {\n\t\t\tm.DocumentName = \"[不存在]\"\n\t\t}\n\t}\n\tif attach.CreateAt > 0 {\n\t\tmember := NewMember()\n\t\tif e := o.QueryTable(member.TableNameWithPrefix()).Filter(\"member_id\", attach.CreateAt).One(member, \"account\"); e == nil {\n\t\t\tm.Account = member.Account\n\t\t}\n\t}\n\n\tm.FileShortSize = filetil.FormatBytes(int64(attach.FileSize))\n\tm.LocalHttpPath = strings.Replace(m.FilePath, \"\\\\\", \"/\", -1)\n\n\treturn m, nil\n}\n"
  },
  {
    "path": "models/Auth2Account.go",
    "content": "// Package models .\npackage models\n\nimport (\n\t\"errors\"\n\t\"github.com/mindoc-org/mindoc/utils/auth2\"\n\t\"time\"\n\n\t\"github.com/beego/beego/v2/client/orm\"\n\t\"github.com/beego/beego/v2/core/logs\"\n\t\"github.com/mindoc-org/mindoc/conf\"\n)\n\nvar (\n\t_ Auth2Account = (*WorkWeixinAccount)(nil)\n\t_ Auth2Account = (*DingTalkAccount)(nil)\n)\n\ntype Auth2Account interface {\n\tExistedMember(id string) (*Member, error)\n\tAddBind(o orm.Ormer, userInfo auth2.UserInfo, member *Member) error\n}\n\nfunc NewWorkWeixinAccount() *WorkWeixinAccount {\n\treturn &WorkWeixinAccount{}\n}\n\ntype WorkWeixinAccount struct {\n\tMemberId          int    `orm:\"column(member_id);type(int);default(-1);index\" json:\"member_id\"`\n\tUserDbId          int    `orm:\"pk;auto;unique;column(user_db_id)\" json:\"user_db_id\"`\n\tWorkWeixin_UserId string `orm:\"size(100);unique;column(workweixin_user_id)\" json:\"workweixin_user_id\"`\n\t// WorkWeixin_Name   string    `orm:\"size(255);column(workweixin_name)\" json:\"workweixin_name\"`\n\t// WorkWeixin_Phone  string    `orm:\"size(25);column(workweixin_phone)\" json:\"workweixin_phone\"`\n\t// WorkWeixin_Email  string    `orm:\"size(255);column(workweixin_email)\" json:\"workweixin_email\"`\n\t// WorkWeixin_Status int       `orm:\"type(int);column(status)\" json:\"status\"`\n\t// WorkWeixin_Avatar string    `orm:\"size(1024);column(avatar)\" json:\"avatar\"`\n\tCreateTime    time.Time `orm:\"type(datetime);column(create_time);auto_now_add\" json:\"create_time\"`\n\tCreateAt      int       `orm:\"type(int);column(create_at)\" json:\"create_at\"`\n\tLastLoginTime time.Time `orm:\"type(datetime);column(last_login_time);null\" json:\"last_login_time\"`\n}\n\n// TableName 获取对应数据库表名.\nfunc (m *WorkWeixinAccount) TableName() string {\n\treturn \"workweixin_accounts\"\n}\n\n// TableEngine 获取数据使用的引擎.\nfunc (m *WorkWeixinAccount) TableEngine() string {\n\treturn \"INNODB\"\n}\n\nfunc (m *WorkWeixinAccount) TableNameWithPrefix() string {\n\treturn conf.GetDatabasePrefix() + m.TableName()\n}\n\nfunc (m *WorkWeixinAccount) ExistedMember(workweixin_user_id string) (*Member, error) {\n\to := orm.NewOrm()\n\taccount := NewWorkWeixinAccount()\n\tmember := NewMember()\n\terr := o.QueryTable(m.TableNameWithPrefix()).Filter(\"workweixin_user_id\", workweixin_user_id).One(account)\n\tif err != nil {\n\t\treturn member, err\n\t}\n\n\tmember, err = member.Find(account.MemberId)\n\tif err != nil {\n\t\treturn member, err\n\t}\n\n\tif member.Status != 0 {\n\t\treturn member, errors.New(\"receive_account_disabled\")\n\t}\n\n\treturn member, nil\n\n}\n\n// AddBind 添加一个用户.\nfunc (m *WorkWeixinAccount) AddBind(o orm.Ormer, userInfo auth2.UserInfo, member *Member) error {\n\ttmpM := NewWorkWeixinAccount()\n\terr := o.QueryTable(m.TableNameWithPrefix()).Filter(\"workweixin_user_id\", userInfo.UserId).One(tmpM)\n\tif err == nil {\n\t\ttmpM.MemberId = member.MemberId\n\t\t_, err = o.Update(tmpM)\n\t\tif err != nil {\n\t\t\tlogs.Error(\"保存用户数据到数据时失败 =>\", err)\n\t\t\treturn errors.New(\"用户信息绑定失败, 数据库错误\")\n\t\t}\n\t\treturn nil\n\t}\n\n\tm.MemberId = member.MemberId\n\tm.WorkWeixin_UserId = userInfo.UserId\n\n\tif c, err := o.QueryTable(m.TableNameWithPrefix()).Filter(\"member_id\", m.MemberId).Count(); err == nil && c > 0 {\n\t\treturn errors.New(\"已绑定，不可重复绑定\")\n\t}\n\n\t_, err = o.Insert(m)\n\tif err != nil {\n\t\tlogs.Error(\"保存用户数据到数据时失败 =>\", err)\n\t\treturn errors.New(\"用户信息绑定失败, 数据库错误\")\n\t}\n\n\treturn nil\n}\n\nfunc NewDingTalkAccount() *DingTalkAccount {\n\treturn &DingTalkAccount{}\n}\n\ntype DingTalkAccount struct {\n\tMemberId        int       `orm:\"column(member_id);type(int);default(-1);index\" json:\"member_id\"`\n\tUserDbId        int       `orm:\"pk;auto;unique;column(user_db_id)\" json:\"user_db_id\"`\n\tDingtalk_UserId string    `orm:\"size(100);unique;column(dingtalk_user_id)\" json:\"dingtalk_user_id\"`\n\tCreateTime      time.Time `orm:\"type(datetime);column(create_time);auto_now_add\" json:\"create_time\"`\n\tCreateAt        int       `orm:\"type(int);column(create_at)\" json:\"create_at\"`\n\tLastLoginTime   time.Time `orm:\"type(datetime);column(last_login_time);null\" json:\"last_login_time\"`\n}\n\n// TableName 获取对应数据库表名.\nfunc (m *DingTalkAccount) TableName() string {\n\treturn \"dingtalk_accounts\"\n}\n\n// TableEngine 获取数据使用的引擎.\nfunc (m *DingTalkAccount) TableEngine() string {\n\treturn \"INNODB\"\n}\n\nfunc (m *DingTalkAccount) TableNameWithPrefix() string {\n\treturn conf.GetDatabasePrefix() + m.TableName()\n}\n\nfunc (m *DingTalkAccount) ExistedMember(userid string) (*Member, error) {\n\to := orm.NewOrm()\n\taccount := NewDingTalkAccount()\n\tmember := NewMember()\n\terr := o.QueryTable(m.TableNameWithPrefix()).Filter(\"dingtalk_user_id\", userid).One(account)\n\tif err != nil {\n\t\treturn member, err\n\t}\n\n\tmember, err = member.Find(account.MemberId)\n\tif err != nil {\n\t\treturn member, err\n\t}\n\n\tif member.Status != 0 {\n\t\treturn member, errors.New(\"receive_account_disabled\")\n\t}\n\n\treturn member, nil\n\n}\n\n// AddBind 添加一个用户.\nfunc (m *DingTalkAccount) AddBind(o orm.Ormer, userInfo auth2.UserInfo, member *Member) error {\n\ttmpM := NewDingTalkAccount()\n\terr := o.QueryTable(m.TableNameWithPrefix()).Filter(\"dingtalk_user_id\", userInfo.UserId).One(tmpM)\n\tif err == nil {\n\t\ttmpM.MemberId = member.MemberId\n\t\t_, err = o.Update(tmpM)\n\t\tif err != nil {\n\t\t\tlogs.Error(\"保存用户数据到数据时失败 =>\", err)\n\t\t\treturn errors.New(\"用户信息绑定失败, 数据库错误\")\n\t\t}\n\t\treturn nil\n\t}\n\n\tm.Dingtalk_UserId = userInfo.UserId\n\tm.MemberId = member.MemberId\n\n\tif c, err := o.QueryTable(m.TableNameWithPrefix()).Filter(\"member_id\", m.MemberId).Count(); err == nil && c > 0 {\n\t\treturn errors.New(\"已绑定，不可重复绑定\")\n\t}\n\n\t_, err = o.Insert(m)\n\tif err != nil {\n\t\tlogs.Error(\"保存用户数据到数据时失败 =>\", err)\n\t\treturn errors.New(\"用户信息绑定失败, 数据库错误\")\n\t}\n\n\treturn nil\n}\n"
  },
  {
    "path": "models/Base.go",
    "content": "package models\n\ntype Model struct {\n}\n"
  },
  {
    "path": "models/Blog.go",
    "content": "package models\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"strings\"\n\t\"time\"\n\n\t\"github.com/PuerkitoBio/goquery\"\n\t\"github.com/beego/beego/v2/client/orm\"\n\t\"github.com/beego/beego/v2/core/logs\"\n\t\"github.com/beego/beego/v2/server/web\"\n\t\"github.com/mindoc-org/mindoc/cache\"\n\t\"github.com/mindoc-org/mindoc/conf\"\n\t\"github.com/mindoc-org/mindoc/utils\"\n)\n\n// 博文表\ntype Blog struct {\n\tBlogId int `orm:\"pk;auto;unique;column(blog_id)\" json:\"blog_id\"`\n\t//文章标题\n\tBlogTitle string `orm:\"column(blog_title);size(500);description(文章标题)\" json:\"blog_title\"`\n\t//文章标识\n\tBlogIdentify string `orm:\"column(blog_identify);size(100);unique;description(文章标识)\" json:\"blog_identify\"`\n\t//排序序号\n\tOrderIndex int `orm:\"column(order_index);type(int);default(0);description(排序序号)\" json:\"order_index\"`\n\t//所属用户\n\tMemberId int `orm:\"column(member_id);type(int);default(0);index;description(所属用户)\" json:\"member_id\"`\n\t//用户头像\n\tMemberAvatar string `orm:\"-\" json:\"member_avatar\"`\n\t//文章类型:0 普通文章/1 链接文章\n\tBlogType int `orm:\"column(blog_type);type(int);default(0);description(文章类型: 0普通文章/1 链接文章)\" json:\"blog_type\"`\n\t//链接到的项目中的文档ID\n\tDocumentId int `orm:\"column(document_id);type(int);default(0);description(链接到的项目中的文档ID)\" json:\"document_id\"`\n\t//文章的标识\n\tDocumentIdentify string `orm:\"-\" json:\"document_identify\"`\n\t//关联文档的项目标识\n\tBookIdentify string `orm:\"-\" json:\"book_identify\"`\n\t//关联文档的项目ID\n\tBookId int `orm:\"-\" json:\"book_id\"`\n\t//文章摘要\n\tBlogExcerpt string `orm:\"column(blog_excerpt);size(1500);description(文章摘要)\" json:\"blog_excerpt\"`\n\t//文章内容\n\tBlogContent string `orm:\"column(blog_content);type(text);null;description(文章内容)\" json:\"blog_content\"`\n\t//发布后的文章内容\n\tBlogRelease string `orm:\"column(blog_release);type(text);null;description(发布后的文章内容)\" json:\"blog_release\"`\n\t//文章当前的状态，枚举enum(’publish’,’draft’,’password’)值，publish为已 发表，draft为草稿，password 为私人内容(不会被公开) 。默认为publish。\n\tBlogStatus string `orm:\"column(blog_status);size(100);default(publish);description(状态：publish为已发表-默认，draft:草稿，password :私人内容-不会被公开)\" json:\"blog_status\"`\n\t//文章密码，varchar(100)值。文章编辑才可为文章设定一个密码，凭这个密码才能对文章进行重新强加或修改。\n\tPassword string `orm:\"column(password);size(100);description(文章密码)\" json:\"-\"`\n\t//最后修改时间\n\tModified time.Time `orm:\"column(modify_time);type(datetime);auto_now;description(最后修改时间)\" json:\"modify_time\"`\n\t//修改人id\n\tModifyAt       int    `orm:\"column(modify_at);type(int);description(修改人id)\" json:\"-\"`\n\tModifyRealName string `orm:\"-\" json:\"modify_real_name\"`\n\t//创建时间\n\tCreated    time.Time `orm:\"column(create_time);type(datetime);auto_now_add;description(创建时间)\" json:\"create_time\"`\n\tCreateName string    `orm:\"-\" json:\"create_name\"`\n\t//版本号\n\tVersion int64 `orm:\"type(bigint);column(version);description(版本号)\" json:\"version\"`\n\t//附件列表\n\tAttachList []*Attachment `orm:\"-\" json:\"attach_list\"`\n}\n\n// 多字段唯一键\nfunc (b *Blog) TableUnique() [][]string {\n\treturn [][]string{\n\t\t{\"blog_id\", \"blog_identify\"},\n\t}\n}\n\n// TableName 获取对应数据库表名.\nfunc (b *Blog) TableName() string {\n\treturn \"blogs\"\n}\n\n// TableEngine 获取数据使用的引擎.\nfunc (b *Blog) TableEngine() string {\n\treturn \"INNODB\"\n}\n\nfunc (b *Blog) TableNameWithPrefix() string {\n\treturn conf.GetDatabasePrefix() + b.TableName()\n}\n\nfunc NewBlog() *Blog {\n\treturn &Blog{\n\t\tBlogStatus: \"public\",\n\t}\n}\n\n// 根据文章ID查询文章\nfunc (b *Blog) Find(blogId int) (*Blog, error) {\n\to := orm.NewOrm()\n\n\terr := o.QueryTable(b.TableNameWithPrefix()).Filter(\"blog_id\", blogId).One(b)\n\tif err != nil {\n\t\tlogs.Error(\"查询文章时失败 -> \", err)\n\t\treturn nil, err\n\t}\n\n\treturn b.Link()\n}\n\n// 从缓存中读取文章\nfunc (b *Blog) FindFromCache(blogId int) (blog *Blog, err error) {\n\tkey := fmt.Sprintf(\"blog-id-%d\", blogId)\n\tvar temp Blog\n\terr = cache.Get(key, &temp)\n\tif err == nil {\n\t\tb = &temp\n\t\tb.Link()\n\t\tlogs.Debug(\"从缓存读取文章成功 ->\", key)\n\t\treturn b, nil\n\t} else {\n\t\tlogs.Error(\"读取缓存失败 ->\", err)\n\t}\n\n\tblog, err = b.Find(blogId)\n\tif err == nil {\n\t\t//默认一个小时\n\t\tif err := cache.Put(key, blog, time.Hour*1); err != nil {\n\t\t\tlogs.Error(\"将文章存入缓存失败 ->\", err)\n\t\t}\n\t}\n\treturn\n}\n\n// 查找指定用户的指定文章\nfunc (b *Blog) FindByIdAndMemberId(blogId, memberId int) (*Blog, error) {\n\to := orm.NewOrm()\n\n\terr := o.QueryTable(b.TableNameWithPrefix()).Filter(\"blog_id\", blogId).Filter(\"member_id\", memberId).One(b)\n\tif err != nil {\n\t\tlogs.Error(\"查询文章时失败 -> \", err)\n\t\treturn nil, err\n\t}\n\n\treturn b.Link()\n}\n\n// 根据文章标识查询文章\nfunc (b *Blog) FindByIdentify(identify string) (*Blog, error) {\n\to := orm.NewOrm()\n\n\terr := o.QueryTable(b.TableNameWithPrefix()).Filter(\"blog_identify\", identify).One(b)\n\tif err != nil {\n\t\tlogs.Error(\"查询文章时失败 -> \", err)\n\t\treturn nil, err\n\t}\n\treturn b, nil\n}\n\n// 获取指定文章的链接内容\nfunc (b *Blog) Link() (*Blog, error) {\n\to := orm.NewOrm()\n\t//如果是链接文章，则需要从链接的项目中查找文章内容\n\tif b.BlogType == 1 && b.DocumentId > 0 {\n\t\tdoc := NewDocument()\n\t\tif err := o.QueryTable(doc.TableNameWithPrefix()).Filter(\"document_id\", b.DocumentId).One(doc, \"release\", \"markdown\", \"identify\", \"book_id\"); err != nil {\n\t\t\tlogs.Error(\"查询文章链接对象时出错 -> \", err)\n\t\t} else {\n\t\t\tb.DocumentIdentify = doc.Identify\n\t\t\tb.BlogRelease = doc.Release\n\n\t\t\t//目前仅支持markdown文档进行链接\n\t\t\tb.BlogContent = doc.Markdown\n\t\t\tbook := NewBook()\n\t\t\tif err := o.QueryTable(book.TableNameWithPrefix()).Filter(\"book_id\", doc.BookId).One(book, \"identify\"); err != nil {\n\t\t\t\tlogs.Error(\"查询关联文档的项目时出错 ->\", err)\n\t\t\t} else {\n\t\t\t\tb.BookIdentify = book.Identify\n\t\t\t\tb.BookId = doc.BookId\n\t\t\t}\n\t\t\t//处理链接文档存在源文档修改时间的问题\n\t\t\tif content, err := goquery.NewDocumentFromReader(bytes.NewBufferString(b.BlogRelease)); err == nil {\n\t\t\t\tcontent.Find(\".wiki-bottom\").Remove()\n\t\t\t\tif html, err := content.Html(); err == nil {\n\t\t\t\t\tb.BlogRelease = html\n\t\t\t\t} else {\n\t\t\t\t\tlogs.Error(\"处理文章失败 ->\", err)\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tlogs.Error(\"处理文章失败 ->\", err)\n\t\t\t}\n\t\t}\n\t}\n\n\tif b.ModifyAt > 0 {\n\t\tmember := NewMember()\n\t\tif err := o.QueryTable(member.TableNameWithPrefix()).Filter(\"member_id\", b.ModifyAt).One(member, \"real_name\", \"account\"); err == nil {\n\t\t\tif member.RealName != \"\" {\n\t\t\t\tb.ModifyRealName = member.RealName\n\t\t\t} else {\n\t\t\t\tb.ModifyRealName = member.Account\n\t\t\t}\n\t\t}\n\t}\n\tif b.MemberId > 0 {\n\t\tmember := NewMember()\n\t\tif err := o.QueryTable(member.TableNameWithPrefix()).Filter(\"member_id\", b.MemberId).One(member, \"real_name\", \"account\", \"avatar\"); err == nil {\n\t\t\tif member.RealName != \"\" {\n\t\t\t\tb.CreateName = member.RealName\n\t\t\t} else {\n\t\t\t\tb.CreateName = member.Account\n\t\t\t}\n\t\t\tb.MemberAvatar = member.Avatar\n\t\t}\n\t}\n\n\treturn b, nil\n}\n\n// 判断指定的文章标识是否存在\nfunc (b *Blog) IsExist(identify string) bool {\n\to := orm.NewOrm()\n\n\treturn o.QueryTable(b.TableNameWithPrefix()).Filter(\"blog_identify\", identify).Exist()\n}\n\n// 保存文章\nfunc (b *Blog) Save(cols ...string) error {\n\to := orm.NewOrm()\n\n\tif b.OrderIndex <= 0 {\n\t\tblog := NewBlog()\n\t\tif err := o.QueryTable(blog.TableNameWithPrefix()).OrderBy(\"-blog_id\").Limit(1).One(blog, \"blog_id\"); err == nil {\n\t\t\tb.OrderIndex = blog.BlogId + 1\n\t\t} else {\n\t\t\tc, _ := o.QueryTable(b.TableNameWithPrefix()).Count()\n\t\t\tb.OrderIndex = int(c) + 1\n\t\t}\n\t}\n\tvar err error\n\n\tb.Processor().Version = time.Now().Unix()\n\n\tif b.BlogId > 0 {\n\t\tb.Modified = time.Now()\n\t\t_, err = o.Update(b, cols...)\n\t\tkey := fmt.Sprintf(\"blog-id-%d\", b.BlogId)\n\t\t_ = cache.Delete(key)\n\n\t} else {\n\n\t\tb.Created = time.Now()\n\t\t_, err = o.Insert(b)\n\t}\n\n\tif err == nil && b.BlogId > 0 {\n\t\t// 刷新倒排索引\n\t\tgo func(blogId int, blogTitle, blogRelease, blogContent string) {\n\t\t\tcontent := blogRelease\n\t\t\tif content == \"\" {\n\t\t\t\tcontent = blogTitle + \"\\n\" + blogContent\n\t\t\t}\n\t\t\tcontent = utils.StripTags(content)\n\t\t\tif err := BuildIndexForBlog(blogId, content); err != nil {\n\t\t\t\tlogs.Error(\"构建Blog倒排索引失败 ->\", blogId, err)\n\t\t\t}\n\t\t}(b.BlogId, b.BlogTitle, b.BlogRelease, b.BlogContent)\n\t}\n\n\treturn err\n}\n\n// 过滤文章的危险标签，处理文章外链以及图片.\nfunc (b *Blog) Processor() *Blog {\n\n\tb.BlogRelease = utils.SafetyProcessor(b.BlogRelease)\n\n\t//解析文档中非本站的链接，并设置为新窗口打开\n\tif content, err := goquery.NewDocumentFromReader(bytes.NewBufferString(b.BlogRelease)); err == nil {\n\n\t\tcontent.Find(\"a\").Each(func(i int, contentSelection *goquery.Selection) {\n\t\t\tif src, ok := contentSelection.Attr(\"href\"); ok {\n\t\t\t\tif strings.HasPrefix(src, \"http://\") || strings.HasPrefix(src, \"https://\") {\n\t\t\t\t\t//logs.Info(src,conf.BaseUrl,strings.HasPrefix(src,conf.BaseUrl))\n\t\t\t\t\tif conf.BaseUrl != \"\" && !strings.HasPrefix(src, conf.BaseUrl) {\n\t\t\t\t\t\tcontentSelection.SetAttr(\"target\", \"_blank\")\n\t\t\t\t\t\tif html, err := content.Html(); err == nil {\n\t\t\t\t\t\t\tb.BlogRelease = html\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t}\n\t\t})\n\t\t//设置图片为CDN地址\n\t\tif cdnimg, _ := web.AppConfig.String(\"cdnimg\"); cdnimg != \"\" {\n\t\t\tcontent.Find(\"img\").Each(func(i int, contentSelection *goquery.Selection) {\n\t\t\t\tif src, ok := contentSelection.Attr(\"src\"); ok && strings.HasPrefix(src, \"/uploads/\") {\n\t\t\t\t\tcontentSelection.SetAttr(\"src\", utils.JoinURI(cdnimg, src))\n\t\t\t\t}\n\t\t\t})\n\t\t}\n\t}\n\n\treturn b\n}\n\n// 分页查询文章列表\nfunc (b *Blog) FindToPager(pageIndex, pageSize int, memberId int, status string) (blogList []*Blog, totalCount int, err error) {\n\n\to := orm.NewOrm()\n\n\toffset := (pageIndex - 1) * pageSize\n\n\tquery := o.QueryTable(b.TableNameWithPrefix())\n\n\tif memberId > 0 {\n\t\tquery = query.Filter(\"member_id\", memberId)\n\t}\n\tif status != \"\" && status != \"all\" {\n\t\tquery = query.Filter(\"blog_status\", status)\n\t}\n\n\tif status == \"\" {\n\t\tquery = query.Filter(\"blog_status__ne\", \"private\")\n\t}\n\n\t_, err = query.OrderBy(\"-order_index\", \"-blog_id\").Offset(offset).Limit(pageSize).All(&blogList)\n\n\tif err != nil {\n\t\tif err == orm.ErrNoRows {\n\t\t\terr = nil\n\t\t}\n\t\tlogs.Error(\"获取文章列表时出错 ->\", err)\n\t\treturn\n\t}\n\tcount, err := query.Count()\n\n\tif err != nil {\n\t\tlogs.Error(\"获取文章数量时出错 ->\", err)\n\t\treturn nil, 0, err\n\t}\n\ttotalCount = int(count)\n\tfor _, blog := range blogList {\n\t\tif blog.BlogType == 1 {\n\t\t\tblog.Link()\n\t\t}\n\t}\n\n\treturn\n}\n\n// 删除文章\nfunc (b *Blog) Delete(blogId int) error {\n\t// 删除文章缓存\n\tkey := fmt.Sprintf(\"blog-id-%d\", blogId)\n\t_ = cache.Delete(key)\n\to := orm.NewOrm()\n\n\t// 删除博客的倒排索引\n\tindex := NewContentReverseIndex()\n\t_ = index.DeleteByContentTypeAndContentId(2, blogId)\n\n\t_, err := o.QueryTable(b.TableNameWithPrefix()).Filter(\"blog_id\", blogId).Delete()\n\tif err != nil {\n\t\tlogs.Error(\"删除文章失败 ->\", err)\n\t}\n\treturn err\n}\n\n// 查询下一篇文章\nfunc (b *Blog) QueryNext(blogId int) (*Blog, error) {\n\to := orm.NewOrm()\n\tblog := NewBlog()\n\n\tif err := o.QueryTable(b.TableNameWithPrefix()).Filter(\"blog_id\", blogId).One(blog, \"order_index\"); err != nil {\n\t\tlogs.Error(\"查询文章时出错 ->\", err)\n\t\treturn b, err\n\t}\n\n\terr := o.QueryTable(b.TableNameWithPrefix()).Filter(\"order_index__gte\", blog.OrderIndex).Filter(\"blog_id__gt\", blogId).OrderBy(\"order_index\", \"blog_id\").One(blog)\n\n\tif err != nil && err != orm.ErrNoRows {\n\t\tlogs.Error(\"查询文章时出错 ->\", err)\n\t}\n\treturn blog, err\n}\n\n// 查询下一篇文章\nfunc (b *Blog) QueryPrevious(blogId int) (*Blog, error) {\n\to := orm.NewOrm()\n\tblog := NewBlog()\n\n\tif err := o.QueryTable(b.TableNameWithPrefix()).Filter(\"blog_id\", blogId).One(blog, \"order_index\"); err != nil {\n\t\tlogs.Error(\"查询文章时出错 ->\", err)\n\t\treturn b, err\n\t}\n\n\terr := o.QueryTable(b.TableNameWithPrefix()).Filter(\"order_index__lte\", blog.OrderIndex).Filter(\"blog_id__lt\", blogId).OrderBy(\"-order_index\", \"-blog_id\").One(blog)\n\n\tif err != nil && err != orm.ErrNoRows {\n\t\tlogs.Error(\"查询文章时出错 ->\", err)\n\t}\n\treturn blog, err\n}\n\n// 关联文章附件\nfunc (b *Blog) LinkAttach() (err error) {\n\n\to := orm.NewOrm()\n\n\tvar attachList []*Attachment\n\t//当不是关联文章时，用文章ID去查询附件\n\tif b.BlogType != 1 || b.DocumentId <= 0 {\n\t\t_, err = o.QueryTable(NewAttachment().TableNameWithPrefix()).Filter(\"document_id\", b.BlogId).Filter(\"book_id\", 0).All(&attachList)\n\t\tif err != nil && err != orm.ErrNoRows {\n\t\t\tlogs.Error(\"查询文章附件时出错 ->\", err)\n\t\t}\n\t} else {\n\t\t_, err = o.QueryTable(NewAttachment().TableNameWithPrefix()).Filter(\"document_id\", b.DocumentId).Filter(\"book_id\", b.BookId).All(&attachList)\n\n\t\tif err != nil && err != orm.ErrNoRows {\n\t\t\tlogs.Error(\"查询文章附件时出错 ->\", err)\n\t\t}\n\t}\n\tb.AttachList = attachList\n\treturn\n}\n"
  },
  {
    "path": "models/BlogResult.go",
    "content": "package models\n\n\ntype BlogResult struct{\n\n}"
  },
  {
    "path": "models/BookModel.go",
    "content": "package models\n\nimport (\n\t\"context\"\n\t\"crypto/md5\"\n\t\"errors\"\n\t\"fmt\"\n\t\"io\"\n\t\"io/ioutil\"\n\t\"os\"\n\t\"path/filepath\"\n\t\"regexp\"\n\t\"strconv\"\n\t\"strings\"\n\t\"sync\"\n\t\"time\"\n\n\t\"encoding/json\"\n\n\t\"github.com/beego/beego/v2/client/orm\"\n\t\"github.com/beego/beego/v2/core/logs\"\n\t\"github.com/beego/i18n\"\n\t\"github.com/mindoc-org/mindoc/conf\"\n\t\"github.com/mindoc-org/mindoc/utils\"\n\t\"github.com/mindoc-org/mindoc/utils/cryptil\"\n\t\"github.com/mindoc-org/mindoc/utils/filetil\"\n\t\"github.com/mindoc-org/mindoc/utils/requests\"\n\t\"github.com/mindoc-org/mindoc/utils/ziptil\"\n\t\"github.com/russross/blackfriday/v2\"\n)\n\nvar releaseQueue = make(chan int, 500)\nvar once = sync.Once{}\n\n// Book struct .\ntype Book struct {\n\tBookId int `orm:\"pk;auto;unique;column(book_id)\" json:\"book_id\"`\n\t// BookName 项目名称.\n\tBookName string `orm:\"column(book_name);size(500);description(名称)\" json:\"book_name\"`\n\t//所属项目空间\n\tItemId int `orm:\"column(item_id);type(int);default(1);description(所属项目空间id)\" json:\"item_id\"`\n\t// Identify 项目唯一标识.\n\tIdentify string `orm:\"column(identify);size(100);unique;description(唯一标识)\" json:\"identify\"`\n\t//是否是自动发布 0 否/1 是\n\tAutoRelease int `orm:\"column(auto_release);type(int);default(0);description(是否是自动发布 0 否/1 是)\" json:\"auto_release\"`\n\t//是否开启下载功能 0 是/1 否\n\tIsDownload int `orm:\"column(is_download);type(int);default(0);description(是否开启下载功能 0 是/1 否)\" json:\"is_download\"`\n\tOrderIndex int `orm:\"column(order_index);type(int);default(0);description(排序)\" json:\"order_index\"`\n\t// Description 项目描述.\n\tDescription string `orm:\"column(description);size(2000);description(项目描述)\" json:\"description\"`\n\t//发行公司\n\tPublisher string `orm:\"column(publisher);size(500);description(发行公司)\" json:\"publisher\"`\n\tLabel     string `orm:\"column(label);size(500);description(所属标签)\" json:\"label\"`\n\t// PrivatelyOwned 项目私有： 0 公开/ 1 私有\n\tPrivatelyOwned int `orm:\"column(privately_owned);type(int);default(0);description(项目私有： 0 公开/ 1 私有)\" json:\"privately_owned\"`\n\t// 当项目是私有时的访问Token.\n\tPrivateToken string `orm:\"column(private_token);size(500);null;description(当项目是私有时的访问Token)\" json:\"private_token\"`\n\t//访问密码.\n\tBookPassword string `orm:\"column(book_password);size(500);null;description(访问密码)\" json:\"book_password\"`\n\t//状态：0 正常/1 已删除\n\tStatus int `orm:\"column(status);type(int);default(0);description(状态：0 正常/1 已删除)\" json:\"status\"`\n\t//默认的编辑器.\n\tEditor string `orm:\"column(editor);size(50);description(默认的编辑器 markdown/html)\" json:\"editor\"`\n\t// DocCount 包含文档数量.\n\tDocCount int `orm:\"column(doc_count);type(int);description(包含文档数量)\" json:\"doc_count\"`\n\t// CommentStatus 评论设置的状态:open 为允许所有人评论，closed 为不允许评论, group_only 仅允许参与者评论 ,registered_only 仅允许注册者评论.\n\tCommentStatus string `orm:\"column(comment_status);size(20);default(open);description(评论设置的状态:open 为允许所有人评论，closed 为不允许评论, group_only 仅允许参与者评论 ,registered_only 仅允许注册者评论.)\" json:\"comment_status\"`\n\tCommentCount  int    `orm:\"column(comment_count);type(int);description(评论数量)\" json:\"comment_count\"`\n\t//封面地址\n\tCover string `orm:\"column(cover);size(1000);description(封面地址)\" json:\"cover\"`\n\t//主题风格\n\tTheme string `orm:\"column(theme);size(255);default(default);description(主题风格)\" json:\"theme\"`\n\t// CreateTime 创建时间 .\n\tCreateTime time.Time `orm:\"type(datetime);column(create_time);auto_now_add;description(创建时间)\" json:\"create_time\"`\n\t//每个文档保存的历史记录数量，0 为不限制\n\tHistoryCount int `orm:\"column(history_count);type(int);default(0);description(每个文档保存的历史记录数量，0 为不限制)\" json:\"history_count\"`\n\t//是否启用分享，0启用/1不启用\n\tIsEnableShare int       `orm:\"column(is_enable_share);type(int);default(0);description(是否启用分享，0启用/1不启用)\" json:\"is_enable_share\"`\n\tMemberId      int       `orm:\"column(member_id);size(100);description(作者id)\" json:\"member_id\"`\n\tModifyTime    time.Time `orm:\"type(datetime);column(modify_time);null;auto_now;description(修改时间)\" json:\"modify_time\"`\n\tVersion       int64     `orm:\"type(bigint);column(version);description(版本)\" json:\"version\"`\n\t//是否使用第一篇文章项目为默认首页,0 否/1 是\n\tIsUseFirstDocument int `orm:\"column(is_use_first_document);type(int);default(0);description(是否使用第一篇文章项目为默认首页,0 否/1 是)\" json:\"is_use_first_document\"`\n\t//是否开启自动保存：0 否/1 是\n\tAutoSave  int `orm:\"column(auto_save);type(tinyint);default(0);description(是否开启自动保存：0 否/1 是)\" json:\"auto_save\"`\n\tPrintSate int `orm:\"column(print_state);type(tinyint);default(1);description(启用打印：0 否/1 是)\" json:\"print_state\"`\n}\n\nfunc (book *Book) String() string {\n\tret, err := json.Marshal(*book)\n\n\tif err != nil {\n\t\treturn \"\"\n\t}\n\treturn string(ret)\n}\n\n// TableName 获取对应数据库表名.\nfunc (book *Book) TableName() string {\n\treturn \"books\"\n}\n\n// TableEngine 获取数据使用的引擎.\nfunc (book *Book) TableEngine() string {\n\treturn \"INNODB\"\n}\nfunc (book *Book) TableNameWithPrefix() string {\n\treturn conf.GetDatabasePrefix() + book.TableName()\n}\n\nfunc (book *Book) QueryTable() orm.QuerySeter {\n\treturn orm.NewOrm().QueryTable(book.TableNameWithPrefix())\n}\n\nfunc NewBook() *Book {\n\treturn &Book{}\n}\n\n// 添加一个项目\nfunc (book *Book) Insert(lang string) error {\n\to := orm.NewOrm()\n\t//\to.Begin()\n\tbook.BookName = utils.StripTags(book.BookName)\n\tif book.ItemId <= 0 {\n\t\tbook.ItemId = 1\n\t}\n\t_, err := o.Insert(book)\n\n\tif err == nil {\n\t\tif book.Label != \"\" {\n\t\t\tNewLabel().InsertOrUpdateMulti(book.Label)\n\t\t}\n\n\t\trelationship := NewRelationship()\n\t\trelationship.BookId = book.BookId\n\t\trelationship.RoleId = 0\n\t\trelationship.MemberId = book.MemberId\n\t\terr = relationship.Insert()\n\t\tif err != nil {\n\t\t\tlogs.Error(\"插入项目与用户关联 -> \", err)\n\t\t\t//o.Rollback()\n\t\t\treturn err\n\t\t}\n\t\tdocument := NewDocument()\n\t\tdocument.BookId = book.BookId\n\t\tdocument.DocumentName = i18n.Tr(lang, \"init.blank_doc\") //\"空白文档\"\n\t\tdocument.MemberId = book.MemberId\n\t\terr = document.InsertOrUpdate()\n\t\tif err != nil {\n\t\t\t//o.Rollback()\n\t\t\treturn err\n\t\t}\n\t\t//o.Commit()\n\t\treturn nil\n\t}\n\t//o.Rollback()\n\treturn err\n}\n\nfunc (book *Book) Find(id int, cols ...string) (*Book, error) {\n\tif id <= 0 {\n\t\treturn book, ErrInvalidParameter\n\t}\n\to := orm.NewOrm()\n\n\terr := o.QueryTable(book.TableNameWithPrefix()).Filter(\"book_id\", id).One(book, cols...)\n\n\treturn book, err\n}\n\n// 更新一个项目\nfunc (book *Book) Update(cols ...string) error {\n\to := orm.NewOrm()\n\n\tbook.BookName = utils.StripTags(book.BookName)\n\ttemp := NewBook()\n\ttemp.BookId = book.BookId\n\n\tif err := o.Read(temp); err != nil {\n\t\treturn err\n\t}\n\n\tif book.Label != \"\" || temp.Label != \"\" {\n\n\t\tgo NewLabel().InsertOrUpdateMulti(book.Label + \",\" + temp.Label)\n\t}\n\n\t_, err := o.Update(book, cols...)\n\treturn err\n}\n\n// 复制项目\nfunc (book *Book) Copy(identify string) error {\n\to := orm.NewOrm()\n\n\terr := o.QueryTable(book.TableNameWithPrefix()).Filter(\"identify\", identify).One(book)\n\n\tif err != nil {\n\t\tlogs.Error(\"查询项目时出错 -> \", err)\n\t\treturn err\n\t}\n\tif _, err := o.Begin(); err != nil {\n\t\tlogs.Error(\"开启事物时出错 -> \", err)\n\t\treturn err\n\t}\n\n\tbookId := book.BookId\n\tbook.BookId = 0\n\tbook.Identify = book.Identify + fmt.Sprintf(\"%s-%s\", identify, strconv.FormatInt(time.Now().UnixNano(), 32))\n\tbook.BookName = book.BookName + \"[副本]\"\n\tbook.CreateTime = time.Now()\n\tbook.CommentCount = 0\n\tbook.HistoryCount = 0\n\n\t/* v2 version of beego remove the o.Rollback api for transaction operation.\n\t * typically, in v1, you can write code like this:\n\t *\n\t *\t\to := orm.NewOrm()\n\t *\t\tif err := o.Operateion(); err != nil {\n\t *\t\t\to.Rollback()\n\t *\t\t\t...\n\t *\t\t}\n\t *\n\t * however, in v2, this is not available. beego will handles the transaction in new way using\n\t * cluster. the new code is like below:\n\t *\n\t * \t\to := orm.NewOrm()\n\t * \t\tif err := o.DoTx(func(ctx context.Context, txOrm orm.TxOrmer) error{\n\t *\t\t\terr := o.Operations()\n\t *\t\t\tif err != nil {\n\t *\t\t\t\treturn err\n\t * \t\t\t}\n\t *\t\t\t...\n\t * \t\t}); err != nil {\n\t *\t\t\t...\n\t * \t\t}\n\t *\n\t * \twhen operation failed, it will automatically calls o.Rollback() for TxOrmer.\n\t *  more details see https://beego.me/docs/mvc/model/transaction.md\n\t */\n\tif err := o.DoTx(func(ctx context.Context, txo orm.TxOrmer) error {\n\t\t_, err := txo.Insert(book)\n\t\treturn err\n\n\t}); err != nil {\n\t\tlogs.Error(\"复制项目时出错： %s\", err)\n\t\treturn err\n\t}\n\n\tvar rels []*Relationship\n\n\tif err := o.DoTx(func(ctx context.Context, txo orm.TxOrmer) error {\n\t\t_, err := txo.QueryTable(NewRelationship().TableNameWithPrefix()).Filter(\"book_id\", bookId).All(&rels)\n\t\treturn err\n\t}); err != nil {\n\t\tlogs.Error(\"复制项目关系时出错 -> \", err)\n\t\treturn err\n\t}\n\n\tfor _, rel := range rels {\n\t\trel.BookId = book.BookId\n\t\trel.RelationshipId = 0\n\t\tif err := o.DoTx(func(ctx context.Context, txo orm.TxOrmer) error {\n\t\t\t_, err := txo.Insert(rel)\n\t\t\treturn err\n\t\t}); err != nil {\n\t\t\tlogs.Error(\"复制项目关系时出错 -> \", err)\n\t\t\treturn err\n\t\t}\n\t}\n\n\tvar docs []*Document\n\n\tif err := o.DoTx(func(ctx context.Context, txOrm orm.TxOrmer) error {\n\t\t_, err := txOrm.QueryTable(NewDocument().TableNameWithPrefix()).Filter(\"book_id\", bookId).Filter(\"parent_id\", 0).All(&docs)\n\t\treturn err\n\t}); err != nil && err != orm.ErrNoRows {\n\t\tlogs.Error(\"读取项目文档时出错 -> \", err)\n\t\treturn err\n\t}\n\n\tif len(docs) > 0 {\n\t\tif err := o.DoTx(func(ctx context.Context, txOrm orm.TxOrmer) error {\n\t\t\treturn recursiveInsertDocument(docs, txOrm, book.BookId, 0)\n\t\t}); err != nil {\n\t\t\tlogs.Error(\"复制项目时出错 -> \", err)\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}\n\n// 递归的复制文档\nfunc recursiveInsertDocument(docs []*Document, o orm.TxOrmer, bookId int, parentId int) error {\n\tfor _, doc := range docs {\n\n\t\tdocId := doc.DocumentId\n\t\tdoc.DocumentId = 0\n\t\tdoc.ParentId = parentId\n\t\tdoc.BookId = bookId\n\t\tdoc.Version = time.Now().Unix()\n\n\t\tif _, err := o.Insert(doc); err != nil {\n\t\t\tlogs.Error(\"插入项目时出错 -> \", err)\n\t\t\treturn err\n\t\t}\n\n\t\tvar attachList []*Attachment\n\t\t//读取所有附件列表\n\t\tif _, err := o.QueryTable(NewAttachment().TableNameWithPrefix()).Filter(\"document_id\", docId).All(&attachList); err == nil {\n\t\t\tfor _, attach := range attachList {\n\t\t\t\tattach.BookId = bookId\n\t\t\t\tattach.DocumentId = doc.DocumentId\n\t\t\t\tattach.AttachmentId = 0\n\t\t\t\tif _, err := o.Insert(attach); err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tvar subDocs []*Document\n\n\t\tif _, err := o.QueryTable(NewDocument().TableNameWithPrefix()).Filter(\"parent_id\", docId).All(&subDocs); err != nil && err != orm.ErrNoRows {\n\t\t\tlogs.Error(\"读取文档时出错 -> \", err)\n\t\t\treturn err\n\t\t}\n\t\tif len(subDocs) > 0 {\n\n\t\t\tif err := recursiveInsertDocument(subDocs, o, bookId, doc.DocumentId); err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t}\n\t}\n\treturn nil\n}\n\n// 根据指定字段查询结果集.\nfunc (book *Book) FindByField(field string, value interface{}, cols ...string) ([]*Book, error) {\n\to := orm.NewOrm()\n\n\tvar books []*Book\n\t_, err := o.QueryTable(book.TableNameWithPrefix()).Filter(field, value).All(&books, cols...)\n\n\treturn books, err\n}\n\n// 根据指定字段查询一个结果.\nfunc (book *Book) FindByFieldFirst(field string, value interface{}) (*Book, error) {\n\to := orm.NewOrm()\n\n\terr := o.QueryTable(book.TableNameWithPrefix()).Filter(field, value).One(book)\n\n\treturn book, err\n\n}\n\n// 根据项目标识查询项目\nfunc (book *Book) FindByIdentify(identify string, cols ...string) (*Book, error) {\n\to := orm.NewOrm()\n\n\terr := o.QueryTable(book.TableNameWithPrefix()).Filter(\"identify\", identify).One(book, cols...)\n\n\treturn book, err\n}\n\n// 分页查询指定用户的项目\nfunc (book *Book) FindToPager(pageIndex, pageSize, memberId int, lang string) (books []*BookResult, totalCount int, err error) {\n\n\to := orm.NewOrm()\n\n\t//sql1 := \"SELECT COUNT(book.book_id) AS total_count FROM \" + book.TableNameWithPrefix() + \" AS book LEFT JOIN \" +\n\t//\trelationship.TableNameWithPrefix() + \" AS rel ON book.book_id=rel.book_id AND rel.member_id = ? WHERE rel.relationship_id > 0 \"\n\n\tsql1 := `SELECT\ncount(*) AS total_count\nFROM md_books AS book\n  LEFT JOIN md_relationship AS rel ON book.book_id = rel.book_id AND rel.member_id = ?\n  left join (select book_id,min(role_id) as role_id\n             from (select book_id,team_member_id,role_id\n                   from md_team_relationship as mtr\n                     left join md_team_member as mtm on mtm.team_id=mtr.team_id and mtm.member_id=? order by role_id desc )\n\t\t\t\t\tas t group by t.book_id)\n\t\t\tas team on team.book_id=book.book_id WHERE rel.role_id >= 0 or team.role_id >= 0`\n\n\terr = o.Raw(sql1, memberId, memberId).QueryRow(&totalCount)\n\n\tif err != nil {\n\t\treturn\n\t}\n\n\toffset := (pageIndex - 1) * pageSize\n\n\t//sql2 := \"SELECT book.*,rel.member_id,rel.role_id,m.account as create_name FROM \" + book.TableNameWithPrefix() + \" AS book\" +\n\t//\t\" LEFT JOIN \" + relationship.TableNameWithPrefix() + \" AS rel ON book.book_id=rel.book_id AND rel.member_id = ?\" +\n\t//\t\" LEFT JOIN \" + relationship.TableNameWithPrefix() + \" AS rel1 ON book.book_id=rel1.book_id  AND rel1.role_id=0\" +\n\t//\t\" LEFT JOIN \" + NewMember().TableNameWithPrefix() + \" AS m ON rel1.member_id=m.member_id \" +\n\t//\t\" WHERE rel.relationship_id > 0 ORDER BY book.order_index DESC,book.book_id DESC LIMIT \" + fmt.Sprintf(\"%d,%d\", pageSize, offset)\n\n\tsql2 := `SELECT\n  book.*,\n  case when rel.relationship_id  is null then team.role_id else rel.role_id end as role_id,\n  m.account as create_name\nFROM md_books AS book\n  LEFT JOIN md_relationship AS rel ON book.book_id = rel.book_id AND rel.member_id = ?\n  left join (select book_id,min(role_id) as role_id\n             from (select book_id,team_member_id,role_id\n                   from md_team_relationship as mtr\n                     left join md_team_member as mtm on mtm.team_id=mtr.team_id and mtm.member_id=? order by role_id desc )\n\t\t\t\t\tas t group by book_id) as team \n\t\t\ton team.book_id=book.book_id\n  LEFT JOIN md_relationship AS rel1 ON book.book_id = rel1.book_id AND rel1.role_id = 0\n  LEFT JOIN md_members AS m ON rel1.member_id = m.member_id\nWHERE rel.role_id >= 0 or team.role_id >= 0\nORDER BY book.order_index, book.book_id DESC limit ? offset ?`\n\n\t_, err = o.Raw(sql2, memberId, memberId, pageSize, offset).QueryRows(&books)\n\tif err != nil {\n\t\tlogs.Error(\"分页查询项目列表 => \", err)\n\t\treturn\n\t}\n\tsql := \"SELECT m.account,doc.modify_time FROM md_documents AS doc LEFT JOIN md_members AS m ON doc.modify_at=m.member_id WHERE book_id = ? LIMIT 1 ORDER BY doc.modify_time DESC\"\n\n\tif len(books) > 0 {\n\t\tfor index, book := range books {\n\t\t\tvar text struct {\n\t\t\t\tAccount    string\n\t\t\t\tModifyTime time.Time\n\t\t\t}\n\n\t\t\terr1 := o.Raw(sql, book.BookId).QueryRow(&text)\n\t\t\tif err1 == nil {\n\t\t\t\tbooks[index].LastModifyText = text.Account + \" 于 \" + text.ModifyTime.Format(\"2006-01-02 15:04:05\")\n\t\t\t}\n\t\t\tif book.RoleId == 0 {\n\t\t\t\tbook.RoleName = i18n.Tr(lang, \"common.creator\")\n\t\t\t} else if book.RoleId == 1 {\n\t\t\t\tbook.RoleName = i18n.Tr(lang, \"common.administrator\")\n\t\t\t} else if book.RoleId == 2 {\n\t\t\t\tbook.RoleName = i18n.Tr(lang, \"common.editor\")\n\t\t\t} else if book.RoleId == 3 {\n\t\t\t\tbook.RoleName = i18n.Tr(lang, \"common.observer\")\n\t\t\t}\n\t\t}\n\t}\n\treturn\n}\n\n// 彻底删除项目.\nfunc (book *Book) ThoroughDeleteBook(id int) error {\n\tif id <= 0 {\n\t\treturn ErrInvalidParameter\n\t}\n\to := orm.NewOrm()\n\n\tbook, err := book.Find(id)\n\tif err != nil {\n\t\treturn err\n\t}\n\to.Begin()\n\n\t//删除附件,这里没有删除实际物理文件\n\tif err := o.DoTx(func(ctx context.Context, txOrm orm.TxOrmer) error {\n\t\t_, err = txOrm.Raw(\"DELETE FROM \"+NewAttachment().TableNameWithPrefix()+\" WHERE book_id=?\", book.BookId).Exec()\n\t\treturn err\n\t}); err != nil {\n\t\treturn err\n\t}\n\n\t//删除该项目下所有文档的倒排索引\n\tif err := o.DoTx(func(ctx context.Context, txOrm orm.TxOrmer) error {\n\t\t// 先查询该项目下的所有文档ID，然后删除对应的倒排索引\n\t\tvar docIds []int\n\t\t_, err := txOrm.Raw(\"SELECT document_id FROM \"+NewDocument().TableNameWithPrefix()+\" WHERE book_id = ?\", book.BookId).QueryRows(&docIds)\n\t\tif err == nil && len(docIds) > 0 {\n\t\t\tindexTable := NewContentReverseIndex().TableNameWithPrefix()\n\t\t\t// 删除 content_type=1 (Document) 且 content_id 在 docIds 中的倒排索引\n\t\t\tplaceholders := make([]string, len(docIds))\n\t\t\targs := make([]interface{}, len(docIds)+1)\n\t\t\targs[0] = 1 // content_type=1\n\t\t\tfor i, id := range docIds {\n\t\t\t\tplaceholders[i] = \"?\"\n\t\t\t\targs[i+1] = id\n\t\t\t}\n\t\t\tsql := \"DELETE FROM \" + indexTable + \" WHERE content_type = ? AND content_id IN (\" + strings.Join(placeholders, \",\") + \")\"\n\t\t\t_, _ = txOrm.Raw(sql, args...).Exec()\n\t\t}\n\t\treturn nil\n\t}); err != nil {\n\t\t// 倒排索引删除失败不影响主流程，记日志即可\n\t\tlogs.Error(\"删除项目文档倒排索引失败 ->\", book.BookId, err)\n\t}\n\n\t//删除文档\n\tif err := o.DoTx(func(ctx context.Context, txOrm orm.TxOrmer) error {\n\t\t_, err = txOrm.Raw(\"DELETE FROM \"+NewDocument().TableNameWithPrefix()+\" WHERE book_id = ?\", book.BookId).Exec()\n\t\treturn err\n\t}); err != nil {\n\t\treturn err\n\t}\n\t//删除项目\n\tif err := o.DoTx(func(ctx context.Context, txOrm orm.TxOrmer) error {\n\t\t_, err = txOrm.Raw(\"DELETE FROM \"+book.TableNameWithPrefix()+\" WHERE book_id = ?\", book.BookId).Exec()\n\t\treturn err\n\t}); err != nil {\n\t\treturn err\n\t}\n\n\t//删除关系\n\n\tif err := o.DoTx(func(ctx context.Context, txOrm orm.TxOrmer) error {\n\t\t_, err = txOrm.Raw(\"DELETE FROM \"+NewRelationship().TableNameWithPrefix()+\" WHERE book_id = ?\", book.BookId).Exec()\n\t\treturn err\n\t}); err != nil {\n\t\treturn err\n\t}\n\n\tif err := o.DoTx(func(ctx context.Context, txOrm orm.TxOrmer) error {\n\t\t_, err = txOrm.Raw(fmt.Sprintf(\"DELETE FROM %s WHERE book_id=?\", NewTeamRelationship().TableNameWithPrefix()), book.BookId).Exec()\n\t\treturn err\n\t}); err != nil {\n\t\treturn err\n\t}\n\t//删除模板\n\n\tif err := o.DoTx(func(ctx context.Context, txOrm orm.TxOrmer) error {\n\t\t_, err = txOrm.Raw(\"DELETE FROM \"+NewTemplate().TableNameWithPrefix()+\" WHERE book_id = ?\", book.BookId).Exec()\n\t\treturn err\n\t}); err != nil {\n\t\treturn err\n\t}\n\n\tif book.Label != \"\" {\n\t\tNewLabel().InsertOrUpdateMulti(book.Label)\n\t}\n\n\t//删除导出缓存\n\tif err := os.RemoveAll(filepath.Join(conf.GetExportOutputPath(), strconv.Itoa(id))); err != nil {\n\t\tlogs.Error(\"删除项目缓存失败 ->\", err)\n\t}\n\t//删除附件和图片\n\tif err := os.RemoveAll(filepath.Join(conf.WorkingDirectory, \"uploads\", book.Identify)); err != nil {\n\t\tlogs.Error(\"删除项目附件和图片失败 ->\", err)\n\t}\n\n\treturn nil\n\n}\n\n// 分页查找系统首页数据.\nfunc (book *Book) FindForHomeToPager(pageIndex, pageSize, memberId int) (books []*BookResult, totalCount int, err error) {\n\to := orm.NewOrm()\n\n\toffset := (pageIndex - 1) * pageSize\n\t//如果是登录用户\n\tif memberId > 0 {\n\t\tsql1 := `SELECT COUNT(*)\nFROM md_books AS book\n  LEFT JOIN md_relationship AS rel ON rel.book_id = book.book_id AND rel.member_id = ?\n  left join (select book_id,min(role_id) AS role_id\n             from (select book_id,role_id\n                   from md_team_relationship as mtr\n                     left join md_team_member as mtm on mtm.team_id=mtr.team_id and mtm.member_id=? order by role_id desc )\nas t group by book_id) as team on team.book_id=book.book_id\nWHERE book.privately_owned = 0 or rel.role_id >=0 or team.role_id >=0`\n\t\terr = o.Raw(sql1, memberId, memberId).QueryRow(&totalCount)\n\t\tif err != nil {\n\t\t\treturn\n\t\t}\n\t\tsql2 := `SELECT book.*,rel1.*,mdmb.account AS create_name,mdmb.real_name FROM md_books AS book\n  LEFT JOIN md_relationship AS rel ON rel.book_id = book.book_id AND rel.member_id = ?\n  left join (select book_id,min(role_id) AS role_id\n             from (select book_id,role_id\n                   from md_team_relationship as mtr\n                     left join md_team_member as mtm on mtm.team_id=mtr.team_id and mtm.member_id=? order by role_id desc )\nas t group by book_id) as team on team.book_id=book.book_id\n  LEFT JOIN md_relationship AS rel1 ON rel1.book_id = book.book_id AND rel1.role_id = 0\n  LEFT JOIN md_members AS mdmb ON rel1.member_id = mdmb.member_id\nWHERE book.privately_owned = 0 or rel.role_id >=0 or team.role_id >=0 ORDER BY order_index desc,book.book_id DESC limit ? offset ?`\n\n\t\t_, err = o.Raw(sql2, memberId, memberId, pageSize, offset).QueryRows(&books)\n\n\t} else {\n\t\tcount, err1 := o.QueryTable(book.TableNameWithPrefix()).Filter(\"privately_owned\", 0).Count()\n\n\t\tif err1 != nil {\n\t\t\terr = err1\n\t\t\treturn\n\t\t}\n\t\ttotalCount = int(count)\n\n\t\tsql := `SELECT book.*,rel.*,mdmb.account AS create_name,mdmb.real_name FROM md_books AS book\n\t\t\tLEFT JOIN md_relationship AS rel ON rel.book_id = book.book_id AND rel.role_id = 0\n\t\t\tLEFT JOIN md_members AS mdmb ON rel.member_id = mdmb.member_id\n\t\t\tWHERE book.privately_owned = 0 ORDER BY order_index DESC ,book.book_id DESC limit ? offset ?`\n\n\t\t_, err = o.Raw(sql, pageSize, offset).QueryRows(&books)\n\n\t}\n\treturn\n}\n\n// 分页全局搜索.\nfunc (book *Book) FindForLabelToPager(keyword string, pageIndex, pageSize, memberId int) (books []*BookResult, totalCount int, err error) {\n\to := orm.NewOrm()\n\n\tkeyword = \"%\" + keyword + \"%\"\n\toffset := (pageIndex - 1) * pageSize\n\t//如果是登录用户\n\tif memberId > 0 {\n\t\tsql1 := `SELECT COUNT(*)\nFROM md_books AS book\n  LEFT JOIN md_relationship AS rel ON rel.book_id = book.book_id AND rel.member_id = ?\n  left join (select *\n             from (select book_id,team_member_id,role_id\n                   from md_team_relationship as mtr\n                     left join md_team_member as mtm on mtm.team_id=mtr.team_id and mtm.member_id=? order by role_id desc )as t group by t.role_id,t.team_member_id,t.book_id) as team on team.book_id = book.book_id\nWHERE (relationship_id > 0 OR book.privately_owned = 0 or team.team_member_id > 0) AND book.label LIKE ?`\n\n\t\terr = o.Raw(sql1, memberId, memberId, keyword).QueryRow(&totalCount)\n\t\tif err != nil {\n\t\t\treturn\n\t\t}\n\t\tsql2 := `SELECT book.*,rel1.*,mdmb.account AS create_name FROM md_books AS book\n\t\t\tLEFT JOIN md_relationship AS rel ON rel.book_id = book.book_id AND rel.member_id = ?\n\t\t\tleft join (select * from (select book_id,team_member_id,role_id\n                   \tfrom md_team_relationship as mtr\n\t\t\t\t\tleft join md_team_member as mtm on mtm.team_id=mtr.team_id and mtm.member_id=? order by role_id desc )as t group by t.role_id,t.team_member_id,t.book_id) as team \n\t\t\t\t\ton team.book_id = book.book_id\n\t\t\tLEFT JOIN md_relationship AS rel1 ON rel1.book_id = book.book_id AND rel1.role_id = 0\n\t\t\tLEFT JOIN md_members AS mdmb ON rel1.member_id = mdmb.member_id\n\t\t\tWHERE (rel.relationship_id > 0 OR book.privately_owned = 0 or team.team_member_id > 0) \n\t\t\tAND book.label LIKE ? ORDER BY order_index DESC ,book.book_id DESC limit ? offset ?`\n\n\t\t_, err = o.Raw(sql2, memberId, memberId, keyword, pageSize, offset).QueryRows(&books)\n\n\t\treturn\n\n\t} else {\n\t\tcount, err1 := o.QueryTable(NewBook().TableNameWithPrefix()).Filter(\"privately_owned\", 0).Filter(\"label__icontains\", keyword).Count()\n\n\t\tif err1 != nil {\n\t\t\terr = err1\n\t\t\treturn\n\t\t}\n\t\ttotalCount = int(count)\n\n\t\tsql := `SELECT book.*,rel.*,mdmb.account AS create_name FROM md_books AS book\n\t\t\tLEFT JOIN md_relationship AS rel ON rel.book_id = book.book_id AND rel.role_id = 0\n\t\t\tLEFT JOIN md_members AS mdmb ON rel.member_id = mdmb.member_id\n\t\t\tWHERE book.privately_owned = 0 AND book.label LIKE ? ORDER BY order_index DESC ,book.book_id DESC limit ? offset ?`\n\n\t\t_, err = o.Raw(sql, keyword, pageSize, offset).QueryRows(&books)\n\n\t\treturn\n\n\t}\n}\n\n// ReleaseContent 批量发布文档\nfunc (book *Book) ReleaseContent(bookId int, lang string) {\n\treleaseQueue <- bookId\n\tonce.Do(func() {\n\t\tgo func() {\n\t\t\tdefer func() {\n\t\t\t\tif err := recover(); err != nil {\n\t\t\t\t\tlogs.Error(\"协程崩溃 ->\", err)\n\t\t\t\t}\n\t\t\t}()\n\t\t\tfor bookId := range releaseQueue {\n\t\t\t\to := orm.NewOrm()\n\n\t\t\t\tvar docs []*Document\n\t\t\t\t_, err := o.QueryTable(NewDocument().TableNameWithPrefix()).Filter(\"book_id\", bookId).All(&docs)\n\n\t\t\t\tif err != nil {\n\t\t\t\t\tlogs.Error(\"发布失败 =>\", bookId, err)\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\t\t\t\tfor _, item := range docs {\n\t\t\t\t\titem.BookId = bookId\n\t\t\t\t\titem.Lang = lang\n\t\t\t\t\t_ = item.ReleaseContent()\n\t\t\t\t}\n\n\t\t\t\t//当文档发布后，需要删除已缓存的转换项目\n\t\t\t\toutputPath := filepath.Join(conf.GetExportOutputPath(), strconv.Itoa(bookId))\n\t\t\t\t_ = os.RemoveAll(outputPath)\n\t\t\t}\n\t\t}()\n\t})\n}\n\n// 重置文档数量\nfunc (book *Book) ResetDocumentNumber(bookId int) {\n\to := orm.NewOrm()\n\n\ttotalCount, err := o.QueryTable(NewDocument().TableNameWithPrefix()).Filter(\"book_id\", bookId).Count()\n\tif err == nil {\n\t\t_, err = o.Raw(\"UPDATE md_books SET doc_count = ? WHERE book_id = ?\", int(totalCount), bookId).Exec()\n\t\tif err != nil {\n\t\t\tlogs.Error(\"重置文档数量失败 =>\", bookId, err)\n\t\t}\n\t} else {\n\t\tlogs.Error(\"获取文档数量失败 =>\", bookId, err)\n\t}\n}\n\n// 导入zip项目\nfunc (book *Book) ImportBook(zipPath string, lang string) error {\n\tif !filetil.FileExists(zipPath) {\n\t\treturn errors.New(\"文件不存在 => \" + zipPath)\n\t}\n\n\tw := md5.New()\n\tio.WriteString(w, zipPath) //将str写入到w中\n\tio.WriteString(w, time.Now().String())\n\tio.WriteString(w, book.BookName)\n\tmd5str := fmt.Sprintf(\"%x\", w.Sum(nil)) //w.Sum(nil)将w的hash转成[]byte格式\n\n\ttempPath := filepath.Join(os.TempDir(), md5str)\n\n\tif err := os.MkdirAll(tempPath, 0766); err != nil {\n\t\tlogs.Error(\"创建导入目录出错 => \", err)\n\t}\n\t//如果加压缩失败\n\tif err := ziptil.Unzip(zipPath, tempPath); err != nil {\n\t\tlogs.Error(\"CAll ziptil.Unzip error, zipPath: %s, tempPath: %s, err: %v\",\n\t\t\tzipPath, tempPath, err)\n\t\treturn err\n\t}\n\t//当导入结束后，删除临时文件\n\t//defer os.RemoveAll(tempPath)\n\n\tfor {\n\t\t//如果当前目录下只有一个目录，则重置根目录\n\t\tif entries, err := ioutil.ReadDir(tempPath); err == nil && len(entries) == 1 {\n\t\t\tdir := entries[0]\n\t\t\tif dir.IsDir() && dir.Name() != \".\" && dir.Name() != \"..\" {\n\t\t\t\ttempPath = filepath.Join(tempPath, dir.Name())\n\t\t\t\tbreak\n\t\t\t}\n\n\t\t} else {\n\t\t\tbreak\n\t\t}\n\t}\n\n\ttempPath = strings.Replace(tempPath, \"\\\\\", \"/\", -1)\n\n\tdocMap := make(map[string]int, 0)\n\n\to := orm.NewOrm()\n\n\to.Insert(book)\n\trelationship := NewRelationship()\n\trelationship.BookId = book.BookId\n\trelationship.RoleId = 0\n\trelationship.MemberId = book.MemberId\n\trelationship.Insert()\n\n\terr := filepath.Walk(tempPath, func(path string, info os.FileInfo, err error) error {\n\t\tpath = strings.Replace(path, \"\\\\\", \"/\", -1)\n\t\tif path == tempPath {\n\t\t\treturn nil\n\t\t}\n\t\tif !info.IsDir() {\n\t\t\text := filepath.Ext(info.Name())\n\t\t\t//如果是Markdown文件\n\t\t\tif strings.EqualFold(ext, \".md\") || strings.EqualFold(ext, \".markdown\") {\n\t\t\t\tlogs.Info(\"正在处理 =>\", path, info.Name())\n\t\t\t\tdoc := NewDocument()\n\t\t\t\tdoc.BookId = book.BookId\n\t\t\t\tdoc.MemberId = book.MemberId\n\t\t\t\tdocIdentify := strings.Replace(strings.TrimPrefix(path, tempPath+\"/\"), \"/\", \"-\", -1)\n\n\t\t\t\tif ok, err := regexp.MatchString(`[a-z]+[a-zA-Z0-9_.\\-]*$`, docIdentify); !ok || err != nil {\n\t\t\t\t\tdocIdentify = \"import-\" + docIdentify\n\t\t\t\t}\n\n\t\t\t\tdoc.Identify = docIdentify\n\t\t\t\t//匹配图片，如果图片语法是在代码块中，这里同样会处理\n\t\t\t\tre := regexp.MustCompile(`!\\[(.*?)\\]\\((.*?)\\)`)\n\t\t\t\tmarkdown, err := filetil.ReadFileAndIgnoreUTF8BOM(path)\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\n\t\t\t\t//处理图片\n\t\t\t\tdoc.Markdown = re.ReplaceAllStringFunc(string(markdown), func(image string) string {\n\n\t\t\t\t\timages := re.FindAllSubmatch([]byte(image), -1)\n\t\t\t\t\tif len(images) <= 0 || len(images[0]) < 3 {\n\t\t\t\t\t\treturn image\n\t\t\t\t\t}\n\t\t\t\t\toriginalImageUrl := string(images[0][2])\n\t\t\t\t\timageUrl := strings.Replace(string(originalImageUrl), \"\\\\\", \"/\", -1)\n\n\t\t\t\t\t//如果是本地路径，则需要将图片复制到项目目录\n\t\t\t\t\tif !strings.HasPrefix(imageUrl, \"http://\") &&\n\t\t\t\t\t\t!strings.HasPrefix(imageUrl, \"https://\") &&\n\t\t\t\t\t\t!strings.HasPrefix(imageUrl, \"ftp://\") {\n\t\t\t\t\t\t//如果路径中存在参数\n\t\t\t\t\t\tif l := strings.Index(imageUrl, \"?\"); l > 0 {\n\t\t\t\t\t\t\timageUrl = imageUrl[:l]\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif strings.HasPrefix(imageUrl, \"/\") {\n\t\t\t\t\t\t\timageUrl = filepath.Join(tempPath, imageUrl)\n\t\t\t\t\t\t} else if strings.HasPrefix(imageUrl, \"./\") {\n\t\t\t\t\t\t\timageUrl = filepath.Join(filepath.Dir(path), strings.TrimPrefix(imageUrl, \"./\"))\n\t\t\t\t\t\t} else if strings.HasPrefix(imageUrl, \"../\") {\n\t\t\t\t\t\t\timageUrl = filepath.Join(filepath.Dir(path), imageUrl)\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\timageUrl = filepath.Join(filepath.Dir(path), imageUrl)\n\t\t\t\t\t\t}\n\t\t\t\t\t\timageUrl = strings.Replace(imageUrl, \"\\\\\", \"/\", -1)\n\t\t\t\t\t\tdstFile := filepath.Join(conf.WorkingDirectory, \"uploads\", time.Now().Format(\"200601\"), strings.TrimPrefix(imageUrl, tempPath))\n\n\t\t\t\t\t\tif filetil.FileExists(imageUrl) {\n\t\t\t\t\t\t\tfiletil.CopyFile(imageUrl, dstFile)\n\n\t\t\t\t\t\t\timageUrl = strings.TrimPrefix(strings.Replace(dstFile, \"\\\\\", \"/\", -1), strings.Replace(conf.WorkingDirectory, \"\\\\\", \"/\", -1))\n\n\t\t\t\t\t\t\tif !strings.HasPrefix(imageUrl, \"/\") && !strings.HasPrefix(imageUrl, \"\\\\\") {\n\t\t\t\t\t\t\t\timageUrl = \"/\" + imageUrl\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t} else {\n\t\t\t\t\t\timageExt := cryptil.Md5Crypt(imageUrl) + filepath.Ext(imageUrl)\n\n\t\t\t\t\t\tdstFile := filepath.Join(conf.WorkingDirectory, \"uploads\", time.Now().Format(\"200601\"), imageExt)\n\n\t\t\t\t\t\tif err := requests.DownloadAndSaveFile(imageUrl, dstFile); err == nil {\n\t\t\t\t\t\t\timageUrl = strings.TrimPrefix(strings.Replace(dstFile, \"\\\\\", \"/\", -1), strings.Replace(conf.WorkingDirectory, \"\\\\\", \"/\", -1))\n\t\t\t\t\t\t\tif !strings.HasPrefix(imageUrl, \"/\") && !strings.HasPrefix(imageUrl, \"\\\\\") {\n\t\t\t\t\t\t\t\timageUrl = \"/\" + imageUrl\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\timageUrl = strings.Replace(strings.TrimSuffix(image, originalImageUrl+\")\")+conf.URLForWithCdnImage(imageUrl)+\")\", \"\\\\\", \"/\", -1)\n\t\t\t\t\treturn imageUrl\n\t\t\t\t})\n\n\t\t\t\tlinkRegexp := regexp.MustCompile(`\\[(.*?)\\]\\((.*?)\\)`)\n\n\t\t\t\t//处理链接\n\t\t\t\tdoc.Markdown = linkRegexp.ReplaceAllStringFunc(doc.Markdown, func(link string) string {\n\t\t\t\t\tlinks := linkRegexp.FindAllStringSubmatch(link, -1)\n\t\t\t\t\toriginalLink := links[0][2]\n\t\t\t\t\tvar linkPath string\n\t\t\t\t\tvar err error\n\t\t\t\t\tif strings.HasPrefix(originalLink, \"<\") {\n\t\t\t\t\t\toriginalLink = strings.TrimPrefix(originalLink, \"<\")\n\t\t\t\t\t}\n\t\t\t\t\tif strings.HasSuffix(originalLink, \">\") {\n\t\t\t\t\t\toriginalLink = strings.TrimSuffix(originalLink, \">\")\n\t\t\t\t\t}\n\t\t\t\t\t//如果是从根目录开始，\n\t\t\t\t\tif strings.HasPrefix(originalLink, \"/\") {\n\t\t\t\t\t\tlinkPath, err = filepath.Abs(filepath.Join(tempPath, originalLink))\n\t\t\t\t\t} else if strings.HasPrefix(originalLink, \"./\") {\n\t\t\t\t\t\tlinkPath, err = filepath.Abs(filepath.Join(filepath.Dir(path), originalLink[1:]))\n\t\t\t\t\t} else {\n\t\t\t\t\t\tlinkPath, err = filepath.Abs(filepath.Join(filepath.Dir(path), originalLink))\n\t\t\t\t\t}\n\n\t\t\t\t\tif err == nil {\n\t\t\t\t\t\t//如果本地存在该链接\n\t\t\t\t\t\tif filetil.FileExists(linkPath) {\n\t\t\t\t\t\t\text := filepath.Ext(linkPath)\n\t\t\t\t\t\t\t//logs.Info(\"当前后缀 -> \",ext)\n\t\t\t\t\t\t\t//如果链接是Markdown文件，则生成文档标识,否则，将目标文件复制到项目目录\n\t\t\t\t\t\t\tif strings.EqualFold(ext, \".md\") || strings.EqualFold(ext, \".markdown\") {\n\t\t\t\t\t\t\t\tdocIdentify := strings.Replace(strings.TrimPrefix(strings.Replace(linkPath, \"\\\\\", \"/\", -1), tempPath+\"/\"), \"/\", \"-\", -1)\n\t\t\t\t\t\t\t\t//logs.Info(originalLink, \"|\", linkPath, \"|\", docIdentify)\n\t\t\t\t\t\t\t\tif ok, err := regexp.MatchString(`[a-z]+[a-zA-Z0-9_.\\-]*$`, docIdentify); !ok || err != nil {\n\t\t\t\t\t\t\t\t\tdocIdentify = \"import-\" + docIdentify\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tdocIdentify = strings.TrimSuffix(docIdentify, \"-README.md\")\n\n\t\t\t\t\t\t\t\tlink = strings.TrimSuffix(link, originalLink+\")\") + conf.URLFor(\"DocumentController.Read\", \":key\", book.Identify, \":id\", docIdentify) + \")\"\n\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tdstPath := filepath.Join(conf.WorkingDirectory, \"uploads\", time.Now().Format(\"200601\"), originalLink)\n\n\t\t\t\t\t\t\t\tfiletil.CopyFile(linkPath, dstPath)\n\n\t\t\t\t\t\t\t\ttempLink := conf.BaseUrl + strings.TrimPrefix(strings.Replace(dstPath, \"\\\\\", \"/\", -1), strings.Replace(conf.WorkingDirectory, \"\\\\\", \"/\", -1))\n\n\t\t\t\t\t\t\t\tlink = strings.TrimSuffix(link, originalLink+\")\") + tempLink + \")\"\n\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tlogs.Info(\"文件不存在 ->\", linkPath)\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\treturn link\n\t\t\t\t})\n\n\t\t\t\t//codeRe := regexp.MustCompile(\"```\\\\w+\")\n\n\t\t\t\t//doc.Markdown = codeRe.ReplaceAllStringFunc(doc.Markdown, func(s string) string {\n\t\t\t\t//\t//logs.Info(s)\n\t\t\t\t//\treturn strings.Replace(s,\"```\",\"``` \",-1)\n\t\t\t\t//})\n\n\t\t\t\tdoc.Content = string(blackfriday.Run([]byte(doc.Markdown)))\n\n\t\t\t\tdoc.Version = time.Now().Unix()\n\n\t\t\t\t//解析文档名称，默认使用第一个h标签为标题\n\t\t\t\tdocName := strings.TrimSuffix(info.Name(), ext)\n\n\t\t\t\tfor _, line := range strings.Split(doc.Markdown, \"\\n\") {\n\t\t\t\t\tif strings.HasPrefix(line, \"#\") {\n\t\t\t\t\t\tdocName = strings.TrimLeft(line, \"#\")\n\t\t\t\t\t\tbreak\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tdoc.DocumentName = strings.TrimSpace(docName)\n\n\t\t\t\tparentId := 0\n\n\t\t\t\tparentIdentify := strings.Replace(strings.Trim(strings.TrimSuffix(strings.TrimPrefix(path, tempPath), info.Name()), \"/\"), \"/\", \"-\", -1)\n\n\t\t\t\tif parentIdentify != \"\" {\n\n\t\t\t\t\tif ok, err := regexp.MatchString(`[a-z]+[a-zA-Z0-9_.\\-]*$`, parentIdentify); !ok || err != nil {\n\t\t\t\t\t\tparentIdentify = \"import-\" + parentIdentify\n\t\t\t\t\t}\n\t\t\t\t\tif id, ok := docMap[parentIdentify]; ok {\n\t\t\t\t\t\tparentId = id\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif strings.EqualFold(info.Name(), \"README.md\") {\n\t\t\t\t\tlogs.Info(path, \"|\", info.Name(), \"|\", parentIdentify, \"|\", parentId)\n\t\t\t\t}\n\t\t\t\tisInsert := false\n\t\t\t\t//如果当前文件是README.md，则将内容更新到父级\n\t\t\t\tif strings.EqualFold(info.Name(), \"README.md\") && parentId != 0 {\n\n\t\t\t\t\tdoc.DocumentId = parentId\n\t\t\t\t\t//logs.Info(path,\"|\",parentId)\n\t\t\t\t} else {\n\t\t\t\t\t//logs.Info(path,\"|\",parentIdentify)\n\t\t\t\t\tdoc.ParentId = parentId\n\t\t\t\t\tisInsert = true\n\t\t\t\t}\n\t\t\t\tif err := doc.InsertOrUpdate(\"document_name\", \"markdown\", \"content\"); err != nil {\n\t\t\t\t\tlogs.Error(doc.DocumentId, err)\n\t\t\t\t}\n\t\t\t\tif isInsert {\n\t\t\t\t\tdocMap[docIdentify] = doc.DocumentId\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\t//如果当前目录下存在Markdown文件，则需要创建此节点\n\t\t\tif filetil.HasFileOfExt(path, []string{\".md\", \".markdown\"}) {\n\t\t\t\tlogs.Info(\"正在处理 =>\", path, info.Name())\n\t\t\t\tidentify := strings.Replace(strings.Trim(strings.TrimPrefix(path, tempPath), \"/\"), \"/\", \"-\", -1)\n\t\t\t\tif ok, err := regexp.MatchString(`[a-z]+[a-zA-Z0-9_.\\-]*$`, identify); !ok || err != nil {\n\t\t\t\t\tidentify = \"import-\" + identify\n\t\t\t\t}\n\n\t\t\t\tparentDoc := NewDocument()\n\n\t\t\t\tparentDoc.MemberId = book.MemberId\n\t\t\t\tparentDoc.BookId = book.BookId\n\t\t\t\tparentDoc.Identify = identify\n\t\t\t\tparentDoc.Version = time.Now().Unix()\n\t\t\t\tparentDoc.DocumentName = \"空白文档\"\n\n\t\t\t\tparentId := 0\n\n\t\t\t\tparentIdentify := strings.TrimSuffix(identify, \"-\"+info.Name())\n\n\t\t\t\tif id, ok := docMap[parentIdentify]; ok {\n\t\t\t\t\tparentId = id\n\t\t\t\t}\n\n\t\t\t\tparentDoc.ParentId = parentId\n\n\t\t\t\tif err := parentDoc.InsertOrUpdate(); err != nil {\n\t\t\t\t\tlogs.Error(err)\n\t\t\t\t}\n\n\t\t\t\tdocMap[identify] = parentDoc.DocumentId\n\t\t\t\t//logs.Info(path,\"|\",parentDoc.DocumentId,\"|\",identify,\"|\",info.Name(),\"|\",parentIdentify)\n\t\t\t}\n\t\t}\n\n\t\treturn nil\n\t})\n\n\tif err != nil {\n\t\tlogs.Error(\"导入项目异常 => \", err)\n\t\tbook.Description = \"【项目导入存在错误：\" + err.Error() + \"】\"\n\t}\n\tlogs.Info(\"项目导入完毕 => \", book.BookName)\n\tbook.ReleaseContent(book.BookId, lang)\n\treturn err\n}\n\n// 导入docx项目\nfunc (book *Book) ImportWordBook(docxPath string, lang string) (err error) {\n\tif !filetil.FileExists(docxPath) {\n\t\treturn errors.New(\"文件不存在\")\n\t}\n\tdocxPath = strings.Replace(docxPath, \"\\\\\", \"/\", -1)\n\n\to := orm.NewOrm()\n\n\to.Insert(book)\n\trelationship := NewRelationship()\n\trelationship.BookId = book.BookId\n\trelationship.RoleId = 0\n\trelationship.MemberId = book.MemberId\n\terr = relationship.Insert()\n\tif err != nil {\n\t\tlogs.Error(\"插入项目与用户关联 -> \", err)\n\t\treturn err\n\t}\n\n\tdoc := NewDocument()\n\tdoc.BookId = book.BookId\n\tdoc.MemberId = book.MemberId\n\tdocIdentify := strings.Replace(strings.TrimPrefix(docxPath, os.TempDir()+\"/\"), \"/\", \"-\", -1)\n\n\tif ok, err := regexp.MatchString(`[a-z]+[a-zA-Z0-9_.\\-]*$`, docIdentify); !ok || err != nil {\n\t\tdocIdentify = \"import-\" + docIdentify\n\t}\n\n\tdoc.Identify = docIdentify\n\n\tif doc.Markdown, err = utils.Docx2md(docxPath, false); err != nil {\n\t\tlogs.Error(\"导入doc项目转换异常 => \", err)\n\t\treturn err\n\t}\n\n\t// fmt.Println(\"===doc.Markdown===\")\n\t// fmt.Println(doc.Markdown)\n\t// fmt.Println(\"==================\")\n\n\tdoc.Content = string(blackfriday.Run([]byte(doc.Markdown)))\n\n\t// fmt.Println(\"===doc.Content===\")\n\t// fmt.Println(doc.Content)\n\t// fmt.Println(\"==================\")\n\n\tdoc.Version = time.Now().Unix()\n\n\tvar docName string\n\tfor _, line := range strings.Split(doc.Markdown, \"\\n\") {\n\t\tif strings.HasPrefix(line, \"#\") {\n\t\t\tdocName = strings.TrimLeft(line, \"#\")\n\t\t\tbreak\n\t\t}\n\t}\n\n\tdoc.DocumentName = strings.TrimSpace(docName)\n\n\tif err := doc.InsertOrUpdate(\"document_name\", \"book_id\", \"markdown\", \"content\"); err != nil {\n\t\tlogs.Error(doc.DocumentId, err)\n\t}\n\tif err != nil {\n\t\tlogs.Error(\"导入项目异常 => \", err)\n\t\tbook.Description = \"【项目导入存在错误：\" + err.Error() + \"】\"\n\t}\n\tlogs.Info(\"项目导入完毕 => \", book.BookName)\n\tbook.ReleaseContent(book.BookId, lang)\n\treturn err\n}\n\nfunc (book *Book) FindForRoleId(bookId, memberId int) (conf.BookRole, error) {\n\to := orm.NewOrm()\n\n\tvar relationship Relationship\n\n\terr := NewRelationship().QueryTable().Filter(\"book_id\", bookId).Filter(\"member_id\", memberId).One(&relationship)\n\n\tif err != nil && err != orm.ErrNoRows {\n\t\treturn 0, err\n\t}\n\tif err == nil {\n\t\treturn relationship.RoleId, nil\n\t}\n\tsql := `select role_id\nfrom md_team_relationship as mtr\nleft join md_team_member as mtm using (team_id)\nwhere mtr.book_id = ? and mtm.member_id = ? order by mtm.role_id asc limit 1;`\n\n\tvar roleId int\n\terr = o.Raw(sql, bookId, memberId).QueryRow(&roleId)\n\n\tif err != nil {\n\t\tlogs.Error(\"查询用户项目角色出错 -> book_id=\", bookId, \" member_id=\", memberId, err)\n\t\treturn 0, err\n\t}\n\treturn conf.BookRole(roleId), nil\n}\n"
  },
  {
    "path": "models/BookResult.go",
    "content": "package models\n\nimport (\n\t\"bytes\"\n\t\"io/ioutil\"\n\t\"os\"\n\t\"path/filepath\"\n\t\"strconv\"\n\t\"strings\"\n\t\"time\"\n\n\t\"encoding/json\"\n\t\"net/http\"\n\t\"regexp\"\n\n\t\"github.com/PuerkitoBio/goquery\"\n\t\"github.com/beego/beego/v2/client/orm\"\n\t\"github.com/beego/beego/v2/core/logs\"\n\t\"github.com/beego/beego/v2/server/web\"\n\t\"github.com/beego/i18n\"\n\t\"github.com/mindoc-org/mindoc/conf\"\n\t\"github.com/mindoc-org/mindoc/converter\"\n\t\"github.com/mindoc-org/mindoc/utils/cryptil\"\n\t\"github.com/mindoc-org/mindoc/utils/filetil\"\n\t\"github.com/mindoc-org/mindoc/utils/gopool\"\n\t\"github.com/mindoc-org/mindoc/utils/requests\"\n\t\"github.com/mindoc-org/mindoc/utils/ziptil\"\n\t\"github.com/russross/blackfriday/v2\"\n)\n\nvar (\n\texportLimitWorkerChannel = gopool.NewChannelPool(conf.GetExportLimitNum(), conf.GetExportQueueLimitNum())\n)\n\ntype BookResult struct {\n\tBookId         int       `json:\"book_id\"`\n\tBookName       string    `json:\"book_name\"`\n\tItemId         int       `json:\"item_id\"`\n\tItemName       string    `json:\"item_name\"`\n\tIdentify       string    `json:\"identify\"`\n\tOrderIndex     int       `json:\"order_index\"`\n\tDescription    string    `json:\"description\"`\n\tPublisher      string    `json:\"publisher\"`\n\tPrivatelyOwned int       `json:\"privately_owned\"`\n\tPrivateToken   string    `json:\"private_token\"`\n\tBookPassword   string    `json:\"book_password\"`\n\tDocCount       int       `json:\"doc_count\"`\n\tCommentStatus  string    `json:\"comment_status\"`\n\tCommentCount   int       `json:\"comment_count\"`\n\tCreateTime     time.Time `json:\"create_time\"`\n\tCreateName     string    `json:\"create_name\"`\n\tRealName       string    `json:\"real_name\"`\n\tModifyTime     time.Time `json:\"modify_time\"`\n\tCover          string    `json:\"cover\"`\n\tTheme          string    `json:\"theme\"`\n\tLabel          string    `json:\"label\"`\n\tMemberId       int       `json:\"member_id\"`\n\tEditor         string    `json:\"editor\"`\n\tAutoRelease    bool      `json:\"auto_release\"`\n\tHistoryCount   int       `json:\"history_count\"`\n\n\t//RelationshipId     int           `json:\"relationship_id\"`\n\t//TeamRelationshipId int           `json:\"team_relationship_id\"`\n\tRoleId             conf.BookRole `json:\"role_id\"`\n\tRoleName           string        `json:\"role_name\"`\n\tStatus             int           `json:\"status\"`\n\tIsEnableShare      bool          `json:\"is_enable_share\"`\n\tIsUseFirstDocument bool          `json:\"is_use_first_document\"`\n\n\tLastModifyText   string `json:\"last_modify_text\"`\n\tIsDisplayComment bool   `json:\"is_display_comment\"`\n\tIsDownload       bool   `json:\"is_download\"`\n\tAutoSave         bool   `json:\"auto_save\"`\n\tPrintState       bool   `json:\"print_state\"`\n\tLang             string\n}\n\nfunc NewBookResult() *BookResult {\n\treturn &BookResult{}\n}\n\nfunc (m *BookResult) String() string {\n\tret, err := json.Marshal(*m)\n\n\tif err != nil {\n\t\treturn \"\"\n\t}\n\treturn string(ret)\n}\n\nfunc (m *BookResult) SetLang(lang string) *BookResult {\n\tm.Lang = lang\n\treturn m\n}\n\n// 根据项目标识查询项目以及指定用户权限的信息.\nfunc (m *BookResult) FindByIdentify(identify string, memberId int) (*BookResult, error) {\n\tif identify == \"\" || memberId <= 0 {\n\t\treturn m, ErrInvalidParameter\n\t}\n\to := orm.NewOrm()\n\n\tvar book Book\n\n\terr := NewBook().QueryTable().Filter(\"identify\", identify).One(&book)\n\n\tif err != nil {\n\t\tlogs.Error(\"获取项目失败 ->\", err)\n\t\treturn m, err\n\t}\n\n\troleId, err := NewBook().FindForRoleId(book.BookId, memberId)\n\n\tif err != nil {\n\t\treturn m, ErrPermissionDenied\n\t}\n\tvar relationship2 Relationship\n\n\t//查找项目创始人\n\terr = NewRelationship().QueryTable().Filter(\"book_id\", book.BookId).Filter(\"role_id\", 0).One(&relationship2)\n\n\tif err != nil {\n\t\tlogs.Error(\"根据项目标识查询项目以及指定用户权限的信息 -> \", err)\n\t\treturn m, ErrPermissionDenied\n\t}\n\n\tmember, err := NewMember().Find(relationship2.MemberId)\n\tif err != nil {\n\t\treturn m, err\n\t}\n\n\tm.ToBookResult(book)\n\tm.RoleId = roleId\n\tm.MemberId = memberId\n\tm.CreateName = member.Account\n\n\tif member.RealName != \"\" {\n\t\tm.RealName = member.RealName\n\t}\n\n\tif m.RoleId == conf.BookFounder {\n\t\tm.RoleName = i18n.Tr(m.Lang, \"common.creator\")\n\t} else if m.RoleId == conf.BookAdmin {\n\t\tm.RoleName = i18n.Tr(m.Lang, \"common.administrator\")\n\t} else if m.RoleId == conf.BookEditor {\n\t\tm.RoleName = i18n.Tr(m.Lang, \"common.editor\")\n\t} else if m.RoleId == conf.BookObserver {\n\t\tm.RoleName = i18n.Tr(m.Lang, \"common.observer\")\n\t}\n\n\tdoc := NewDocument()\n\n\terr = o.QueryTable(doc.TableNameWithPrefix()).Filter(\"book_id\", book.BookId).OrderBy(\"modify_time\").One(doc)\n\n\tif err == nil {\n\t\tmember2 := NewMember()\n\t\tmember2.Find(doc.ModifyAt)\n\n\t\tm.LastModifyText = member2.Account + \" 于 \" + doc.ModifyTime.Local().Format(\"2006-01-02 15:04:05\")\n\t}\n\n\treturn m, nil\n}\n\nfunc (m *BookResult) FindToPager(pageIndex, pageSize int) (books []*BookResult, totalCount int, err error) {\n\to := orm.NewOrm()\n\n\tcount, err := o.QueryTable(NewBook().TableNameWithPrefix()).Count()\n\n\tif err != nil {\n\t\treturn\n\t}\n\ttotalCount = int(count)\n\n\tsql := `SELECT\n\t\t\tbook.*,rel.relationship_id,rel.role_id,m.account AS create_name,m.real_name\n\t\tFROM md_books AS book\n\t\t\tLEFT JOIN md_relationship AS rel ON rel.book_id = book.book_id AND rel.role_id = 0\n\t\t\tLEFT JOIN md_members AS m ON rel.member_id = m.member_id\n\t\tORDER BY book.order_index DESC ,book.book_id DESC  limit ? offset ?`\n\n\toffset := (pageIndex - 1) * pageSize\n\n\t_, err = o.Raw(sql, pageSize, offset).QueryRows(&books)\n\n\treturn\n}\n\n// 实体转换\nfunc (m *BookResult) ToBookResult(book Book) *BookResult {\n\n\tm.BookId = book.BookId\n\tm.BookName = book.BookName\n\tm.Identify = book.Identify\n\tm.OrderIndex = book.OrderIndex\n\tm.Description = strings.Replace(book.Description, \"\\r\\n\", \"<br/>\", -1)\n\tm.PrivatelyOwned = book.PrivatelyOwned\n\tm.PrivateToken = book.PrivateToken\n\tm.BookPassword = book.BookPassword\n\tm.DocCount = book.DocCount\n\tm.CommentStatus = book.CommentStatus\n\tm.CommentCount = book.CommentCount\n\tm.CreateTime = book.CreateTime\n\tm.ModifyTime = book.ModifyTime\n\tm.Cover = book.Cover\n\tm.Label = book.Label\n\tm.Status = book.Status\n\tm.Editor = book.Editor\n\tm.Theme = book.Theme\n\tm.AutoRelease = book.AutoRelease == 1\n\tm.IsEnableShare = book.IsEnableShare == 0\n\tm.IsUseFirstDocument = book.IsUseFirstDocument == 1\n\tm.Publisher = book.Publisher\n\tm.HistoryCount = book.HistoryCount\n\tm.IsDownload = book.IsDownload == 0\n\tm.AutoSave = book.AutoSave == 1\n\tm.PrintState = book.PrintSate == 1\n\tm.ItemId = book.ItemId\n\tm.RoleId = conf.BookRoleNoSpecific\n\n\tif book.Theme == \"\" {\n\t\tm.Theme = \"default\"\n\t}\n\tif book.Editor == \"\" {\n\t\tm.Editor = \"markdown\"\n\t}\n\n\tdoc := NewDocument()\n\n\to := orm.NewOrm()\n\n\terr := o.QueryTable(doc.TableNameWithPrefix()).Filter(\"book_id\", book.BookId).OrderBy(\"modify_time\").One(doc)\n\n\tif err == nil {\n\t\tmember2 := NewMember()\n\t\tmember2.Find(doc.ModifyAt)\n\n\t\tm.LastModifyText = member2.Account + \" 于 \" + doc.ModifyTime.Local().Format(\"2006-01-02 15:04:05\")\n\t}\n\n\tif m.ItemId > 0 {\n\t\tif item, err := NewItemsets().First(m.ItemId); err == nil {\n\t\t\tm.ItemName = item.ItemName\n\t\t}\n\t}\n\tif m.CommentStatus == \"closed\" {\n\t\tm.IsDisplayComment = false\n\t} else if m.CommentStatus == \"open\" {\n\t\tm.IsDisplayComment = true\n\t} else if m.CommentStatus == \"registered_only\" {\n\t\t// todo\n\t} else if m.CommentStatus == \"group_only\" {\n\t\t// todo\n\t} else {\n\t\tm.IsDisplayComment = false\n\t}\n\n\treturn m\n}\n\n// 后台转换\nfunc BackgroundConvert(sessionId string, bookResult *BookResult) error {\n\n\tif err := converter.CheckConvertCommand(); err != nil {\n\t\tlogs.Error(\"检查转换程序失败 -> \", err)\n\t\treturn err\n\t}\n\terr := exportLimitWorkerChannel.LoadOrStore(bookResult.Identify, func() {\n\t\tbookResult.Converter(sessionId)\n\t})\n\n\tif err != nil {\n\n\t\tlogs.Error(\"将导出任务加入任务队列失败 -> \", err)\n\t\treturn err\n\t}\n\texportLimitWorkerChannel.Start()\n\treturn nil\n}\n\n// 导出PDF、word等格式\nfunc (m *BookResult) Converter(sessionId string) (ConvertBookResult, error) {\n\n\tconvertBookResult := ConvertBookResult{}\n\n\toutputPath := filepath.Join(conf.GetExportOutputPath(), strconv.Itoa(m.BookId))\n\tviewPath := web.BConfig.WebConfig.ViewsPath\n\n\tpdfpath := filepath.Join(outputPath, \"book.pdf\")\n\tepubpath := filepath.Join(outputPath, \"book.epub\")\n\tmobipath := filepath.Join(outputPath, \"book.mobi\")\n\tdocxpath := filepath.Join(outputPath, \"book.docx\")\n\n\t//先将转换的文件储存到临时目录\n\ttempOutputPath := filepath.Join(os.TempDir(), sessionId, m.Identify, \"source\") //filepath.Abs(filepath.Join(\"cache\", sessionId))\n\n\tsourceDir := strings.TrimSuffix(tempOutputPath, \"source\")\n\tif filetil.FileExists(sourceDir) {\n\t\tif err := os.RemoveAll(sourceDir); err != nil {\n\t\t\tlogs.Error(\"删除临时目录失败 ->\", sourceDir, err)\n\t\t}\n\t}\n\n\tif err := os.MkdirAll(outputPath, 0766); err != nil {\n\t\tlogs.Error(\"创建目录失败 -> \", outputPath, err)\n\t}\n\tif err := os.MkdirAll(tempOutputPath, 0766); err != nil {\n\t\tlogs.Error(\"创建目录失败 -> \", tempOutputPath, err)\n\t}\n\tos.MkdirAll(filepath.Join(tempOutputPath, \"Images\"), 0755)\n\n\t//defer os.RemoveAll(strings.TrimSuffix(tempOutputPath,\"source\"))\n\n\tif filetil.FileExists(pdfpath) && filetil.FileExists(epubpath) && filetil.FileExists(mobipath) && filetil.FileExists(docxpath) {\n\t\tconvertBookResult.EpubPath = epubpath\n\t\tconvertBookResult.MobiPath = mobipath\n\t\tconvertBookResult.PDFPath = pdfpath\n\t\tconvertBookResult.WordPath = docxpath\n\t\treturn convertBookResult, nil\n\t}\n\n\tdocs, err := NewDocument().FindListByBookId(m.BookId)\n\tif err != nil {\n\t\treturn convertBookResult, err\n\t}\n\n\ttocList := make([]converter.Toc, 0)\n\n\tfor _, item := range docs {\n\t\tif item.ParentId == 0 {\n\t\t\ttoc := converter.Toc{\n\t\t\t\tId:    item.DocumentId,\n\t\t\t\tLink:  strconv.Itoa(item.DocumentId) + \".html\",\n\t\t\t\tPid:   item.ParentId,\n\t\t\t\tTitle: item.DocumentName,\n\t\t\t}\n\n\t\t\ttocList = append(tocList, toc)\n\t\t}\n\t}\n\tfor _, item := range docs {\n\t\tif item.ParentId != 0 {\n\t\t\ttoc := converter.Toc{\n\t\t\t\tId:    item.DocumentId,\n\t\t\t\tLink:  strconv.Itoa(item.DocumentId) + \".html\",\n\t\t\t\tPid:   item.ParentId,\n\t\t\t\tTitle: item.DocumentName,\n\t\t\t}\n\t\t\ttocList = append(tocList, toc)\n\t\t}\n\t}\n\n\tebookConfig := converter.Config{\n\t\tCharset:      \"utf-8\",\n\t\tCover:        m.Cover,\n\t\tTimestamp:    time.Now().Format(\"2006-01-02 15:04:05\"),\n\t\tDescription:  string(blackfriday.Run([]byte(m.Description))),\n\t\tFooter:       \"<p style='color:#8E8E8E;font-size:12px;'>本文档使用 <a href='https://www.iminho.me' style='text-decoration:none;color:#1abc9c;font-weight:bold;'>MinDoc</a> 构建 <span style='float:right'>- _PAGENUM_ -</span></p>\",\n\t\tHeader:       \"<p style='color:#8E8E8E;font-size:12px;'>_SECTION_</p>\",\n\t\tIdentifier:   \"\",\n\t\tLanguage:     \"zh-CN\",\n\t\tCreator:      m.CreateName,\n\t\tPublisher:    m.Publisher,\n\t\tContributor:  m.Publisher,\n\t\tTitle:        m.BookName,\n\t\tFormat:       []string{\"epub\", \"mobi\", \"pdf\", \"docx\"},\n\t\tFontSize:     \"14\",\n\t\tPaperSize:    \"a4\",\n\t\tMarginLeft:   \"72\",\n\t\tMarginRight:  \"72\",\n\t\tMarginTop:    \"72\",\n\t\tMarginBottom: \"72\",\n\t\tToc:          tocList,\n\t\tMore:         []string{},\n\t}\n\n\tif m.Publisher != \"\" {\n\t\tebookConfig.Footer = \"<p style='color:#8E8E8E;font-size:12px;'>本文档由 <span style='text-decoration:none;color:#1abc9c;font-weight:bold;'>\" + m.Publisher + \"</span> 生成<span style='float:right'>- _PAGENUM_ -</span></p>\"\n\t} else if web.AppConfig.DefaultString(\"publisher_def\", \"\") != \"\" {\n\t\tdefPub := web.AppConfig.DefaultString(\"publisher_def\", \"\")\n\t\tebookConfig.Footer = \"<p style='color:#8E8E8E;font-size:12px;'>本文档由 <span style='text-decoration:none;color:#1abc9c;font-weight:bold;'>\" + defPub + \"</span> 生成<span style='float:right'>- _PAGENUM_ -</span></p>\"\n\t}\n\tif m.RealName != \"\" {\n\t\tebookConfig.Creator = m.RealName\n\t}\n\n\tif tempOutputPath, err = filepath.Abs(tempOutputPath); err != nil {\n\t\tlogs.Error(\"导出目录配置错误：\" + err.Error())\n\t\treturn convertBookResult, err\n\t}\n\n\tfor _, item := range docs {\n\t\tname := strconv.Itoa(item.DocumentId)\n\t\tfpath := filepath.Join(tempOutputPath, name+\".html\")\n\n\t\tf, err := os.OpenFile(fpath, os.O_CREATE|os.O_RDWR, 0755)\n\t\tif err != nil {\n\t\t\treturn convertBookResult, err\n\t\t}\n\t\tvar buf bytes.Buffer\n\n\t\tif err := web.ExecuteViewPathTemplate(&buf, \"document/export.tpl\", viewPath, map[string]interface{}{\"Model\": m, \"Lists\": item, \"BaseUrl\": conf.BaseUrl}); err != nil {\n\t\t\treturn convertBookResult, err\n\t\t}\n\t\thtml := buf.String()\n\n\t\tif err != nil {\n\n\t\t\tf.Close()\n\t\t\treturn convertBookResult, err\n\t\t}\n\n\t\tbufio := bytes.NewReader(buf.Bytes())\n\n\t\tdoc, err := goquery.NewDocumentFromReader(bufio)\n\t\tdoc.Find(\"img\").Each(func(i int, contentSelection *goquery.Selection) {\n\t\t\tif src, ok := contentSelection.Attr(\"src\"); ok {\n\t\t\t\t//var encodeString string\n\t\t\t\tdstSrcString := \"Images/\" + filepath.Base(src)\n\n\t\t\t\t//如果是本地路径则直接读取文件内容\n\t\t\t\tif strings.HasPrefix(src, \"/\") {\n\t\t\t\t\tspath := filepath.Join(conf.WorkingDirectory, src)\n\t\t\t\t\tif filetil.CopyFile(spath, filepath.Join(tempOutputPath, dstSrcString)); err != nil {\n\t\t\t\t\t\tlogs.Error(\"复制图片失败 -> \", err, src)\n\t\t\t\t\t\treturn\n\t\t\t\t\t}\n\n\t\t\t\t} else {\n\t\t\t\t\tclient := &http.Client{}\n\t\t\t\t\tif req, err := http.NewRequest(\"GET\", src, nil); err == nil {\n\t\t\t\t\t\treq.Header.Set(\"User-Agent\", \"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36\")\n\t\t\t\t\t\treq.Header.Set(\"Referer\", src)\n\t\t\t\t\t\t//10秒连接超时时间\n\t\t\t\t\t\tclient.Timeout = time.Second * 100\n\n\t\t\t\t\t\tif resp, err := client.Do(req); err == nil {\n\n\t\t\t\t\t\t\tdefer resp.Body.Close()\n\n\t\t\t\t\t\t\tif body, err := ioutil.ReadAll(resp.Body); err == nil {\n\t\t\t\t\t\t\t\t//encodeString = base64.StdEncoding.EncodeToString(body)\n\t\t\t\t\t\t\t\tif err := ioutil.WriteFile(filepath.Join(tempOutputPath, dstSrcString), body, 0755); err != nil {\n\t\t\t\t\t\t\t\t\tlogs.Error(\"下载图片失败 -> \", err, src)\n\t\t\t\t\t\t\t\t\treturn\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tlogs.Error(\"下载图片失败 -> \", err, src)\n\t\t\t\t\t\t\t\treturn\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tlogs.Error(\"下载图片失败 -> \", err, src)\n\t\t\t\t\t\t\treturn\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcontentSelection.SetAttr(\"src\", dstSrcString)\n\t\t\t}\n\t\t})\n\t\t//移除文档底部的更新信息\n\t\tif selection := doc.Find(\"div.wiki-bottom\").First(); selection.Size() > 0 {\n\t\t\tselection.Remove()\n\t\t}\n\n\t\thtml, err = doc.Html()\n\t\tif err != nil {\n\t\t\tf.Close()\n\t\t\treturn convertBookResult, err\n\t\t}\n\t\tf.WriteString(html)\n\t\tf.Close()\n\t}\n\n\tif err := filetil.CopyFile(filepath.Join(conf.WorkingDirectory, \"static\", \"css\", \"kancloud.css\"), filepath.Join(tempOutputPath, \"styles\", \"css\", \"kancloud.css\")); err != nil {\n\t\tlogs.Error(\"复制CSS样式出错 -> static/css/kancloud.css\", err)\n\t}\n\tif err := filetil.CopyFile(filepath.Join(conf.WorkingDirectory, \"static\", \"css\", \"export.css\"), filepath.Join(tempOutputPath, \"styles\", \"css\", \"export.css\")); err != nil {\n\t\tlogs.Error(\"复制CSS样式出错 -> static/css/export.css\", err)\n\t}\n\tif err := filetil.CopyFile(filepath.Join(conf.WorkingDirectory, \"static\", \"editor.md\", \"css\", \"editormd.preview.css\"), filepath.Join(tempOutputPath, \"styles\", \"editor.md\", \"css\", \"editormd.preview.css\")); err != nil {\n\t\tlogs.Error(\"复制CSS样式出错 -> static/editor.md/css/editormd.preview.css\", err)\n\t}\n\n\tif err := filetil.CopyFile(filepath.Join(conf.WorkingDirectory, \"static\", \"css\", \"markdown.preview.css\"), filepath.Join(tempOutputPath, \"styles\", \"css\", \"markdown.preview.css\")); err != nil {\n\t\tlogs.Error(\"复制CSS样式出错 -> static/css/markdown.preview.css\", err)\n\t}\n\tif err := filetil.CopyFile(filepath.Join(conf.WorkingDirectory, \"static\", \"editor.md\", \"lib\", \"highlight\", \"styles\", \"github.css\"), filepath.Join(tempOutputPath, \"styles\", \"css\", \"github.css\")); err != nil {\n\t\tlogs.Error(\"复制CSS样式出错 -> static/editor.md/lib/highlight/styles/github.css\", err)\n\t}\n\n\tif err := filetil.CopyDir(filepath.Join(conf.WorkingDirectory, \"static\", \"font-awesome\"), filepath.Join(tempOutputPath, \"styles\", \"font-awesome\")); err != nil {\n\t\tlogs.Error(\"复制CSS样式出错 -> static/font-awesome\", err)\n\t}\n\n\teBookConverter := &converter.Converter{\n\t\tBasePath:   tempOutputPath,\n\t\tOutputPath: filepath.Join(strings.TrimSuffix(tempOutputPath, \"source\"), \"output\"),\n\t\tConfig:     ebookConfig,\n\t\tDebug:      true,\n\t\tProcessNum: conf.GetExportProcessNum(),\n\t}\n\n\tos.MkdirAll(eBookConverter.OutputPath, 0766)\n\n\tif err := eBookConverter.Convert(); err != nil {\n\t\tlogs.Error(\"转换文件错误：\" + m.BookName + \" -> \" + err.Error())\n\t\treturn convertBookResult, err\n\t}\n\tlogs.Info(\"文档转换完成：\" + m.BookName)\n\n\tif err := filetil.CopyFile(filepath.Join(eBookConverter.OutputPath, \"output\", \"book.mobi\"), mobipath); err != nil {\n\t\tlogs.Error(\"复制文档失败 -> \", filepath.Join(eBookConverter.OutputPath, \"output\", \"book.mobi\"), err)\n\t}\n\tif err := filetil.CopyFile(filepath.Join(eBookConverter.OutputPath, \"output\", \"book.pdf\"), pdfpath); err != nil {\n\t\tlogs.Error(\"复制文档失败 -> \", filepath.Join(eBookConverter.OutputPath, \"output\", \"book.pdf\"), err)\n\t}\n\tif err := filetil.CopyFile(filepath.Join(eBookConverter.OutputPath, \"output\", \"book.epub\"), epubpath); err != nil {\n\t\tlogs.Error(\"复制文档失败 -> \", filepath.Join(eBookConverter.OutputPath, \"output\", \"book.epub\"), err)\n\t}\n\tif err := filetil.CopyFile(filepath.Join(eBookConverter.OutputPath, \"output\", \"book.docx\"), docxpath); err != nil {\n\t\tlogs.Error(\"复制文档失败 -> \", filepath.Join(eBookConverter.OutputPath, \"output\", \"book.docx\"), err)\n\t}\n\n\tconvertBookResult.MobiPath = mobipath\n\tconvertBookResult.PDFPath = pdfpath\n\tconvertBookResult.EpubPath = epubpath\n\tconvertBookResult.WordPath = docxpath\n\n\treturn convertBookResult, nil\n}\n\n// 导出Markdown原始文件\nfunc (m *BookResult) ExportMarkdown(sessionId string) (string, error) {\n\toutputPath := filepath.Join(conf.WorkingDirectory, \"uploads\", \"books\", strconv.Itoa(m.BookId), \"book.zip\")\n\n\tos.MkdirAll(filepath.Dir(outputPath), 0644)\n\n\ttempOutputPath := filepath.Join(os.TempDir(), sessionId, \"markdown\")\n\n\tdefer os.RemoveAll(tempOutputPath)\n\n\tbookUrl := conf.URLFor(\"DocumentController.Index\", \":key\", m.Identify) + \"/\"\n\n\terr := exportMarkdown(tempOutputPath, 0, m.BookId, tempOutputPath, bookUrl)\n\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\n\tif err := ziptil.Compress(outputPath, tempOutputPath); err != nil {\n\t\tlogs.Error(\"导出Markdown失败->\", err)\n\t\treturn \"\", err\n\t}\n\treturn outputPath, nil\n}\n\n// 递归导出Markdown文档\nfunc exportMarkdown(p string, parentId int, bookId int, baseDir string, bookUrl string) error {\n\to := orm.NewOrm()\n\n\tvar docs []*Document\n\n\t_, err := o.QueryTable(NewDocument().TableNameWithPrefix()).Filter(\"book_id\", bookId).Filter(\"parent_id\", parentId).All(&docs)\n\n\tif err != nil {\n\t\tlogs.Error(\"导出Markdown失败->\", err)\n\t\treturn err\n\t}\n\tfor _, doc := range docs {\n\t\t//获取当前文档的子文档数量，如果数量不为0，则将当前文档命名为READMD.md并设置成目录。\n\t\tsubDocCount, err := o.QueryTable(NewDocument().TableNameWithPrefix()).Filter(\"parent_id\", doc.DocumentId).Count()\n\n\t\tif err != nil {\n\t\t\tlogs.Error(\"导出Markdown失败->\", err)\n\t\t\treturn err\n\t\t}\n\n\t\tvar docPath string\n\n\t\tif subDocCount > 0 {\n\t\t\tif doc.Identify != \"\" {\n\t\t\t\tdocPath = filepath.Join(p, doc.Identify, \"README.md\")\n\t\t\t} else {\n\t\t\t\tdocPath = filepath.Join(p, strconv.Itoa(doc.DocumentId), \"README.md\")\n\t\t\t}\n\t\t} else {\n\t\t\tif doc.Identify != \"\" {\n\t\t\t\tif strings.HasSuffix(doc.Identify, \".md\") || strings.HasSuffix(doc.Identify, \".markdown\") {\n\t\t\t\t\tdocPath = filepath.Join(p, doc.Identify)\n\t\t\t\t} else {\n\t\t\t\t\tdocPath = filepath.Join(p, doc.Identify+\".md\")\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tdocPath = filepath.Join(p, strings.TrimSpace(doc.DocumentName)+\".md\")\n\t\t\t}\n\t\t}\n\t\tdirPath := filepath.Dir(docPath)\n\n\t\tos.MkdirAll(dirPath, 0766)\n\t\tmarkdown := doc.Markdown\n\t\t//如果当前文档不为空\n\t\tif strings.TrimSpace(doc.Markdown) != \"\" {\n\t\t\tre := regexp.MustCompile(`!\\[(.*?)\\]\\((.*?)\\)`)\n\n\t\t\t//处理文档中图片\n\t\t\tmarkdown = re.ReplaceAllStringFunc(doc.Markdown, func(image string) string {\n\t\t\t\timages := re.FindAllSubmatch([]byte(image), -1)\n\t\t\t\tif len(images) <= 0 || len(images[0]) < 3 {\n\t\t\t\t\treturn image\n\t\t\t\t}\n\t\t\t\toriginalImageUrl := string(images[0][2])\n\t\t\t\timageUrl := strings.Replace(string(originalImageUrl), \"\\\\\", \"/\", -1)\n\n\t\t\t\t//如果是本地路径，则需要将图片复制到项目目录\n\t\t\t\tif strings.HasPrefix(imageUrl, \"http://\") || strings.HasPrefix(imageUrl, \"https://\") {\n\t\t\t\t\timageExt := cryptil.Md5Crypt(imageUrl) + filepath.Ext(imageUrl)\n\n\t\t\t\t\tdstFile := filepath.Join(baseDir, \"uploads\", time.Now().Format(\"200601\"), imageExt)\n\n\t\t\t\t\tif err := requests.DownloadAndSaveFile(imageUrl, dstFile); err == nil {\n\t\t\t\t\t\timageUrl = strings.TrimPrefix(strings.Replace(dstFile, \"\\\\\", \"/\", -1), strings.Replace(baseDir, \"\\\\\", \"/\", -1))\n\t\t\t\t\t\tif !strings.HasPrefix(imageUrl, \"/\") && !strings.HasPrefix(imageUrl, \"\\\\\") {\n\t\t\t\t\t\t\timageUrl = \"/\" + imageUrl\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else if strings.HasPrefix(imageUrl, \"/\") {\n\t\t\t\t\tfiletil.CopyFile(filepath.Join(conf.WorkingDirectory, imageUrl), filepath.Join(baseDir, imageUrl))\n\t\t\t\t}\n\n\t\t\t\timageUrl = strings.Replace(strings.TrimSuffix(image, originalImageUrl+\")\")+imageUrl+\")\", \"\\\\\", \"/\", -1)\n\n\t\t\t\treturn imageUrl\n\t\t\t})\n\n\t\t\tlinkRe := regexp.MustCompile(`\\[(.*?)\\]\\((.*?)\\)`)\n\n\t\t\tmarkdown = linkRe.ReplaceAllStringFunc(markdown, func(link string) string {\n\t\t\t\tlinks := linkRe.FindAllStringSubmatch(link, -1)\n\t\t\t\tif len(links) > 0 && len(links[0]) >= 3 {\n\t\t\t\t\toriginalLink := links[0][2]\n\n\t\t\t\t\t//如果当前链接位于当前项目内\n\t\t\t\t\tif strings.HasPrefix(originalLink, bookUrl) {\n\t\t\t\t\t\tdocIdentify := strings.TrimSpace(strings.TrimPrefix(originalLink, bookUrl))\n\t\t\t\t\t\ttempDoc := NewDocument()\n\t\t\t\t\t\tif id, err := strconv.Atoi(docIdentify); err == nil && id > 0 {\n\t\t\t\t\t\t\terr := o.QueryTable(NewDocument().TableNameWithPrefix()).Filter(\"document_id\", id).One(tempDoc, \"identify\", \"parent_id\", \"document_id\")\n\t\t\t\t\t\t\tif err != nil {\n\t\t\t\t\t\t\t\tlogs.Error(err)\n\t\t\t\t\t\t\t\treturn link\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\terr := o.QueryTable(NewDocument().TableNameWithPrefix()).Filter(\"identify\", docIdentify).One(tempDoc, \"identify\", \"parent_id\", \"document_id\")\n\t\t\t\t\t\t\tif err != nil {\n\t\t\t\t\t\t\t\tlogs.Error(err)\n\t\t\t\t\t\t\t\treturn link\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\ttempLink := recursiveJoinDocumentIdentify(tempDoc.ParentId, \"\") + strings.TrimPrefix(originalLink, bookUrl)\n\n\t\t\t\t\t\tif !strings.HasSuffix(tempLink, \".md\") && !strings.HasSuffix(doc.Identify, \".markdown\") {\n\t\t\t\t\t\t\ttempLink = tempLink + \".md\"\n\t\t\t\t\t\t}\n\t\t\t\t\t\trelative := strings.TrimPrefix(strings.Replace(p, \"\\\\\", \"/\", -1), strings.Replace(baseDir, \"\\\\\", \"/\", -1))\n\t\t\t\t\t\trepeat := 0\n\t\t\t\t\t\tif relative != \"\" {\n\t\t\t\t\t\t\trelative = strings.TrimSuffix(strings.TrimPrefix(relative, \"/\"), \"/\")\n\t\t\t\t\t\t\trepeat = strings.Count(relative, \"/\") + 1\n\t\t\t\t\t\t}\n\t\t\t\t\t\tlogs.Info(repeat, \"|\", relative, \"|\", p, \"|\", baseDir)\n\t\t\t\t\t\ttempLink = strings.Repeat(\"../\", repeat) + tempLink\n\n\t\t\t\t\t\tlink = strings.TrimSuffix(link, originalLink+\")\") + tempLink + \")\"\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn link\n\n\t\t\t})\n\t\t} else {\n\t\t\tmarkdown = \"# \" + doc.DocumentName + \"\\n\"\n\t\t}\n\t\tif err := ioutil.WriteFile(docPath, []byte(markdown), 0644); err != nil {\n\t\t\tlogs.Error(\"导出Markdown失败->\", err)\n\t\t\treturn err\n\t\t}\n\n\t\tif subDocCount > 0 {\n\t\t\tif err = exportMarkdown(dirPath, doc.DocumentId, bookId, baseDir, bookUrl); err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t}\n\t}\n\treturn nil\n}\n\nfunc recursiveJoinDocumentIdentify(parentDocId int, identify string) string {\n\to := orm.NewOrm()\n\n\tdoc := NewDocument()\n\n\terr := o.QueryTable(NewDocument().TableNameWithPrefix()).Filter(\"document_id\", parentDocId).One(doc, \"identify\", \"parent_id\", \"document_id\")\n\n\tif err != nil {\n\t\tlogs.Error(err)\n\t\treturn identify\n\t}\n\n\tif doc.Identify == \"\" {\n\t\tidentify = strconv.Itoa(doc.DocumentId) + \"/\" + identify\n\t} else {\n\t\tidentify = doc.Identify + \"/\" + identify\n\t}\n\tif doc.ParentId > 0 {\n\t\tidentify = recursiveJoinDocumentIdentify(doc.ParentId, identify)\n\t}\n\treturn identify\n}\n\n// 查询项目的第一篇文档\nfunc (m *BookResult) FindFirstDocumentByBookId(bookId int) (*Document, error) {\n\n\to := orm.NewOrm()\n\n\tdoc := NewDocument()\n\n\terr := o.QueryTable(doc.TableNameWithPrefix()).Filter(\"book_id\", bookId).Filter(\"parent_id\", 0).OrderBy(\"order_sort\").One(doc)\n\n\treturn doc, err\n}\n"
  },
  {
    "path": "models/CommentModel.go",
    "content": "package models\n\nimport (\n\t\"errors\"\n\t\"time\"\n\n\t\"github.com/beego/beego/v2/client/orm\"\n\t\"github.com/mindoc-org/mindoc/conf\"\n)\n\n// Comment struct\ntype Comment struct {\n\tCommentId int `orm:\"pk;auto;unique;column(comment_id)\" json:\"comment_id\"`\n\tFloor     int `orm:\"column(floor);type(unsigned);default(0)\" json:\"floor\"`\n\tBookId    int `orm:\"column(book_id);type(int)\" json:\"book_id\"`\n\t// DocumentId 评论所属的文档.\n\tDocumentId int `orm:\"column(document_id);type(int)\" json:\"document_id\"`\n\t// Author 评论作者.\n\tAuthor string `orm:\"column(author);size(100)\" json:\"author\"`\n\t//MemberId 评论用户ID.\n\tMemberId int `orm:\"column(member_id);type(int)\" json:\"member_id\"`\n\t// IPAddress 评论者的IP地址\n\tIPAddress string `orm:\"column(ip_address);size(100)\" json:\"ip_address\"`\n\t// 评论日期.\n\tCommentDate time.Time `orm:\"type(datetime);column(comment_date);auto_now_add\" json:\"comment_date\"`\n\t//Content 评论内容.\n\tContent string `orm:\"column(content);size(2000)\" json:\"content\"`\n\t// Approved 评论状态：0 待审核/1 已审核/2 垃圾评论/ 3 已删除\n\tApproved int `orm:\"column(approved);type(int)\" json:\"approved\"`\n\t// UserAgent 评论者浏览器内容\n\tUserAgent string `orm:\"column(user_agent);size(500)\" json:\"user_agent\"`\n\t// Parent 评论所属父级\n\tParentId     int    `orm:\"column(parent_id);type(int);default(0)\" json:\"parent_id\"`\n\tAgreeCount   int    `orm:\"column(agree_count);type(int);default(0)\" json:\"agree_count\"`\n\tAgainstCount int    `orm:\"column(against_count);type(int);default(0)\" json:\"against_count\"`\n\tIndex        int    `orm:\"-\" json:\"index\"`\n\tShowDel      int    `orm:\"-\" json:\"show_del\"`\n\tAvatar       string `orm:\"-\" json:\"avatar\"`\n}\n\n// TableName 获取对应数据库表名.\nfunc (m *Comment) TableName() string {\n\treturn \"comments\"\n}\n\n// TableEngine 获取数据使用的引擎.\nfunc (m *Comment) TableEngine() string {\n\treturn \"INNODB\"\n}\n\nfunc (m *Comment) TableNameWithPrefix() string {\n\treturn conf.GetDatabasePrefix() + m.TableName()\n}\n\nfunc NewComment() *Comment {\n\treturn &Comment{}\n}\n\n// 是否有权限删除\nfunc (m *Comment) CanDelete(user_memberid int, user_bookrole conf.BookRole) bool {\n\treturn user_memberid == m.MemberId || user_bookrole == conf.BookFounder || user_bookrole == conf.BookAdmin\n}\n\n// 根据文档id查询文档评论\nfunc (m *Comment) QueryCommentByDocumentId(doc_id, page, pagesize int, member *Member) (comments []*Comment, count int64, ret_page int) {\n\tdoc, err := NewDocument().Find(doc_id)\n\tif err != nil {\n\t\treturn\n\t}\n\n\to := orm.NewOrm()\n\tcount, _ = o.QueryTable(m.TableNameWithPrefix()).Filter(\"document_id\", doc_id).Count()\n\tif -1 == page { // 请求最后一页\n\t\tvar total int = int(count)\n\t\tif total%pagesize == 0 {\n\t\t\tpage = total / pagesize\n\t\t} else {\n\t\t\tpage = total/pagesize + 1\n\t\t}\n\t}\n\toffset := (page - 1) * pagesize\n\tret_page = page\n\to.QueryTable(m.TableNameWithPrefix()).Filter(\"document_id\", doc_id).OrderBy(\"comment_date\").Offset(offset).Limit(pagesize).All(&comments)\n\n\t// 需要判断未登录的情况\n\tvar bookRole conf.BookRole\n\tif member != nil {\n\t\tbookRole, _ = NewRelationship().FindForRoleId(doc.BookId, member.MemberId)\n\t}\n\tfor i := 0; i < len(comments); i++ {\n\t\tcomments[i].Index = (i + 1) + (page-1)*pagesize\n\t\tif member != nil && comments[i].CanDelete(member.MemberId, bookRole) {\n\t\t\tcomments[i].ShowDel = 1\n\t\t\tcomments[i].Avatar = member.Avatar\n\t\t}\n\t}\n\treturn\n}\n\nfunc (m *Comment) Update(cols ...string) error {\n\to := orm.NewOrm()\n\n\t_, err := o.Update(m, cols...)\n\n\treturn err\n}\n\n// Insert 添加一条评论.\nfunc (m *Comment) Insert() error {\n\tif m.DocumentId <= 0 {\n\t\treturn errors.New(\"评论文档不存在\")\n\t}\n\tif m.Content == \"\" {\n\t\treturn ErrCommentContentNotEmpty\n\t}\n\n\to := orm.NewOrm()\n\n\tif m.CommentId > 0 {\n\t\tcomment := NewComment()\n\t\t//如果父评论不存在\n\t\tif err := o.Read(comment); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\tdocument := NewDocument()\n\t//如果评论的文档不存在\n\tif _, err := document.Find(m.DocumentId); err != nil {\n\t\treturn err\n\t}\n\tbook, err := NewBook().Find(document.BookId)\n\t//如果评论的项目不存在\n\tif err != nil {\n\t\treturn err\n\t}\n\t//如果已关闭评论\n\tif book.CommentStatus == \"closed\" {\n\t\treturn ErrCommentClosed\n\t}\n\tif book.CommentStatus == \"registered_only\" && m.MemberId <= 0 {\n\t\treturn ErrPermissionDenied\n\t}\n\t//如果仅参与者评论\n\tif book.CommentStatus == \"group_only\" {\n\t\tif m.MemberId <= 0 {\n\t\t\treturn ErrPermissionDenied\n\t\t}\n\t\trel := NewRelationship()\n\t\tif _, err := rel.FindForRoleId(book.BookId, m.MemberId); err != nil {\n\t\t\treturn ErrPermissionDenied\n\t\t}\n\t}\n\n\tif m.MemberId > 0 {\n\t\tmember := NewMember()\n\t\t//如果用户不存在\n\t\tif _, err := member.Find(m.MemberId); err != nil {\n\t\t\treturn ErrMemberNoExist\n\t\t}\n\t\t//如果用户被禁用\n\t\tif member.Status == 1 {\n\t\t\treturn ErrMemberDisabled\n\t\t}\n\t} else if m.Author == \"\" {\n\t\tm.Author = \"[匿名用户]\"\n\t}\n\tm.BookId = book.BookId\n\t_, err = o.Insert(m)\n\n\treturn err\n}\n\n// 删除一条评论\nfunc (m *Comment) Delete() error {\n\to := orm.NewOrm()\n\t_, err := o.Delete(m)\n\treturn err\n}\n\nfunc (m *Comment) Find(id int, cols ...string) (*Comment, error) {\n\to := orm.NewOrm()\n\tif err := o.QueryTable(m.TableNameWithPrefix()).Filter(\"comment_id\", id).One(m, cols...); err != nil {\n\t\treturn m, err\n\t}\n\treturn m, nil\n}\n"
  },
  {
    "path": "models/ContentReverseIndex.go",
    "content": "package models\n\nimport (\n\t\"crypto/md5\"\n\t\"encoding/hex\"\n\t\"errors\"\n\t\"fmt\"\n\t\"math\"\n\n\t\"github.com/beego/beego/v2/client/orm\"\n\t\"github.com/beego/beego/v2/core/logs\"\n\t\"github.com/mindoc-org/mindoc/conf\"\n\t\"github.com/mindoc-org/mindoc/utils\"\n\t\"github.com/mindoc-org/mindoc/utils/segmenter\"\n)\n\nfunc init() {\n\t//go InitializeMissingIndexes()\n}\n\n// ContentReverseIndex 倒排索引结构\ntype ContentReverseIndex struct {\n\tId string `orm:\"pk;column(id);size(64);description(唯一标识ID)\" json:\"id\"`\n\t// Word 分词词汇，最长64个字\n\tWord string `orm:\"column(word);size(64);index;description(分词词汇)\" json:\"word\"`\n\t// ContentType 内容类型：1-Document 2-Blog\n\tContentType int `orm:\"column(content_type);type(int);index:idx_content_type_id,priority:1;description(内容类型：1-Document 2-Blog)\" json:\"content_type\"`\n\t// ContentId 内容ID，对应DocumentId或BlogId\n\tContentId int `orm:\"column(content_id);type(int);index:idx_content_type_id,priority:2;description(内容ID)\" json:\"content_id\"`\n\t// WordCount 词频数\n\tWordCount int `orm:\"column(word_count);type(int);default(0);description(词频数)\" json:\"word_count\"`\n}\n\n// TableName 获取对应数据库表名\nfunc (c *ContentReverseIndex) TableName() string {\n\treturn \"t_content_reverse_index\"\n}\n\n// TableEngine 获取数据使用的引擎\nfunc (c *ContentReverseIndex) TableEngine() string {\n\treturn \"INNODB\"\n}\n\nfunc (c *ContentReverseIndex) TableNameWithPrefix() string {\n\treturn conf.GetDatabasePrefix() + c.TableName()\n}\n\nfunc NewContentReverseIndex() *ContentReverseIndex {\n\treturn &ContentReverseIndex{}\n}\n\n// Insert 插入倒排索引记录\nfunc (c *ContentReverseIndex) Insert() error {\n\tif c.Id == \"\" {\n\t\treturn errors.New(\"id不能为空\")\n\t}\n\tif c.Word == \"\" {\n\t\treturn errors.New(\"分词词汇不能为空\")\n\t}\n\tif c.ContentType != 1 && c.ContentType != 2 {\n\t\treturn errors.New(\"内容类型必须是1(Document)或2(Blog)\")\n\t}\n\tif c.ContentId <= 0 {\n\t\treturn errors.New(\"内容ID必须大于0\")\n\t}\n\n\to := orm.NewOrm()\n\t_, err := o.Insert(c)\n\treturn err\n}\n\n// DeleteByContentTypeAndContentId 根据内容类型和内容ID删除所有倒排索引记录\nfunc (c *ContentReverseIndex) DeleteByContentTypeAndContentId(contentType, contentId int) error {\n\tif contentType != 1 && contentType != 2 {\n\t\treturn errors.New(\"内容类型必须是1(Document)或2(Blog)\")\n\t}\n\tif contentId <= 0 {\n\t\treturn errors.New(\"内容ID必须大于0\")\n\t}\n\n\to := orm.NewOrm()\n\t_, err := o.QueryTable(c.TableNameWithPrefix()).Filter(\"content_type\", contentType).Filter(\"content_id\", contentId).Delete()\n\treturn err\n}\n\n// BatchInsert 批量插入倒排索引记录\nfunc (c *ContentReverseIndex) BatchInsert(indices []*ContentReverseIndex) error {\n\tif len(indices) == 0 {\n\t\treturn nil\n\t}\n\n\to := orm.NewOrm()\n\t_, err := o.InsertMulti(len(indices), indices)\n\treturn err\n}\n\n// ContentReverseIndexResult 倒排索引查询结果结构\ntype ContentReverseIndexResult struct {\n\tContentId   int     `json:\"content_id\"`\n\tContentType int     `json:\"content_type\"`\n\tScore       float64 `json:\"score\"`       // TF-IDF分数\n\tWordCounts  []int   `json:\"word_counts\"` // 各个词的词频\n}\n\n// FindByWordsWithPagination 根据多个分词词汇分页批量查询结果，按IDF值排序\n// words: 分词词汇列表\n// pageIndex: 页码，从1开始\n// pageSize: 每页数量\nfunc (c *ContentReverseIndex) FindByWordsWithPagination(words []string, pageIndex, pageSize int) ([]*ContentReverseIndexResult, int, error) {\n\tif len(words) == 0 {\n\t\treturn nil, 0, errors.New(\"分词词汇列表不能为空\")\n\t}\n\tif pageIndex <= 0 {\n\t\tpageIndex = 1\n\t}\n\tif pageSize <= 0 {\n\t\tpageSize = 10\n\t}\n\n\to := orm.NewOrm()\n\ttableName := c.TableNameWithPrefix()\n\n\t// 计算总文档数\n\ttotalDocsSql := \"SELECT COUNT(DISTINCT CONCAT(content_type, '-', content_id)) FROM \" + tableName\n\tvar totalDocs int\n\terr := o.Raw(totalDocsSql).QueryRow(&totalDocs)\n\tif err != nil {\n\t\treturn nil, 0, err\n\t}\n\n\t// 构建IN条件\n\twordPlaceholders := \"\"\n\twordArgs := make([]any, 0)\n\tfor i, word := range words {\n\t\tif i > 0 {\n\t\t\twordPlaceholders += \",\"\n\t\t}\n\t\twordPlaceholders += \"?\"\n\t\twordArgs = append(wordArgs, word)\n\t}\n\tsql := \"SELECT word, content_type, content_id, word_count FROM \" + tableName +\n\t\t\" WHERE word IN (\" + wordPlaceholders + \") ORDER BY content_type, content_id\"\n\ttype indexRecord struct {\n\t\tWord        string\n\t\tContentType int\n\t\tContentId   int\n\t\tWordCount   int\n\t}\n\tvar records []indexRecord\n\t_, err = o.Raw(sql, wordArgs...).QueryRows(&records)\n\tif err != nil {\n\t\treturn nil, 0, err\n\t}\n\n\t// 计算各文档的总词数\n\tsql = \"SELECT content_type, content_id, count(word_count) total_word_count FROM \" + tableName +\n\t\t\" GROUP BY content_type, content_id\"\n\ttype docWordCountRecord struct {\n\t\tContentType    int\n\t\tContentId      int\n\t\tTotalWordCount int\n\t}\n\tvar docWordCountRecords []docWordCountRecord\n\t_, err = o.Raw(sql).QueryRows(&docWordCountRecords)\n\tif err != nil {\n\t\treturn nil, 0, err\n\t}\n\n\tdocTotalWordCountMap := make(map[string]int)\n\tfor _, record := range docWordCountRecords {\n\t\tkey := fmt.Sprintf(\"%d-%d\", record.ContentType, record.ContentId)\n\t\tdocTotalWordCountMap[key] = record.TotalWordCount\n\t}\n\n\t// 聚合每个(content_type, content_id)的词频和计算TF-IDF\n\tcontentMap := make(map[string]*ContentReverseIndexResult)\n\tfor _, record := range records {\n\t\tkey := fmt.Sprintf(\"%d-%d\", record.ContentType, record.ContentId)\n\t\tif result, exists := contentMap[key]; exists {\n\t\t\tresult.WordCounts = append(result.WordCounts, record.WordCount)\n\t\t} else {\n\t\t\tcontentMap[key] = &ContentReverseIndexResult{\n\t\t\t\tContentId:   record.ContentId,\n\t\t\t\tContentType: record.ContentType,\n\t\t\t\tWordCounts:  []int{record.WordCount},\n\t\t\t}\n\t\t}\n\t}\n\n\tdocMapWithWords := make(map[string]int) // 用于计算包含搜索词的文档数\n\t// 计算每个文档包含多少个查询词\n\tdocWordCount := make(map[string]int)\n\tfor _, record := range records {\n\t\tkey := fmt.Sprintf(\"%d-%d\", record.ContentType, record.ContentId)\n\t\tdocWordCount[key] += record.WordCount\n\t\tdocMapWithWords[key] += 1\n\t}\n\n\t// 计算IDF并生成结果\n\tresults := make([]*ContentReverseIndexResult, 0, len(contentMap))\n\tfor key := range contentMap {\n\t\tresult := contentMap[key]\n\t\t// 计算TF：词频之和\n\t\ttf := float64(docWordCount[key]) / float64(docTotalWordCountMap[key]+1)\n\t\t// 计算DF：包含该词的文档数（简化处理，使用该文档包含的查询词数量）\n\t\tdf := len(docMapWithWords)\n\t\t// 计算IDF\n\t\tidf := 0.0\n\t\tif df > 0 && totalDocs > 0 {\n\t\t\tidf = math.Log(float64(totalDocs+1) / float64(df))\n\t\t}\n\n\t\t// 用于根据文档总词数调整TF-IDF的权重，避免总词数过小的文档权重过高\n\t\talpha := math.Log(1.0+float64(docTotalWordCountMap[key])*0.01) * 100\n\t\t// TF-IDF分数\n\t\tresult.Score = float64(tf) * idf * float64(alpha)\n\t\tresults = append(results, result)\n\t}\n\n\t// 按Score降序排序\n\tsortResultsByScore(results)\n\ttotalCount := len(results)\n\t// 分页\n\toffset := (pageIndex - 1) * pageSize\n\tstart := offset\n\tend := offset + pageSize\n\tif start > totalCount {\n\t\tstart = totalCount\n\t}\n\tif end > totalCount {\n\t\tend = totalCount\n\t}\n\tif start >= end {\n\t\treturn nil, totalCount, nil\n\t}\n\n\treturn results[start:end], totalCount, nil\n}\n\nfunc sortResultsByScore(results []*ContentReverseIndexResult) {\n\tfor i := 0; i < len(results)-1; i++ {\n\t\tfor j := i + 1; j < len(results); j++ {\n\t\t\tif results[i].Score < results[j].Score {\n\t\t\t\tresults[i], results[j] = results[j], results[i]\n\t\t\t}\n\t\t}\n\t}\n}\n\nfunc generateIndexId(contentType, contentId int, word string) string {\n\tsource := fmt.Sprintf(\"%d-%d-%s\", contentType, contentId, word)\n\thasher := md5.New()\n\thasher.Write([]byte(source))\n\thash := hasher.Sum(nil)\n\treturn hex.EncodeToString(hash)[:32]\n}\n\nfunc BuildIndexForDocument(documentId int, content string) error {\n\tif documentId <= 0 {\n\t\treturn errors.New(\"文档ID必须大于0\")\n\t}\n\n\tindex := NewContentReverseIndex()\n\terr := index.DeleteByContentTypeAndContentId(1, documentId)\n\tif err != nil {\n\t\tlogs.Error(\"删除文档倒排索引失败 ->\", documentId, err)\n\t\treturn err\n\t}\n\n\twords := segmenter.Segment(content)\n\tif len(words) == 0 {\n\t\treturn nil\n\t}\n\n\twordCountMap := make(map[string]int)\n\tfor _, word := range words {\n\t\tif len(word) > 64 {\n\t\t\tword = word[:64]\n\t\t}\n\t\twordCountMap[word]++\n\t}\n\n\tindices := make([]*ContentReverseIndex, 0, len(wordCountMap))\n\tfor word, count := range wordCountMap {\n\t\tid := generateIndexId(1, documentId, word)\n\n\t\tindexItem := &ContentReverseIndex{\n\t\t\tId:          id,\n\t\t\tWord:        word,\n\t\t\tContentType: 1,\n\t\t\tContentId:   documentId,\n\t\t\tWordCount:   count,\n\t\t}\n\t\tindices = append(indices, indexItem)\n\t}\n\n\tif len(indices) > 0 {\n\t\terr = index.BatchInsert(indices)\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"批量插入文档倒排索引失败 -> %d %v\", documentId, err)\n\t\t}\n\t}\n\n\treturn nil\n}\n\nfunc BuildIndexForBlog(blogId int, content string) error {\n\tif blogId <= 0 {\n\t\treturn errors.New(\"BlogID必须大于0\")\n\t}\n\n\tindex := NewContentReverseIndex()\n\terr := index.DeleteByContentTypeAndContentId(2, blogId)\n\tif err != nil {\n\t\tlogs.Error(\"删除Blog倒排索引失败 ->\", blogId, err)\n\t\treturn err\n\t}\n\n\twords := segmenter.Segment(content)\n\tif len(words) == 0 {\n\t\treturn nil\n\t}\n\n\twordCountMap := make(map[string]int)\n\tfor _, word := range words {\n\t\tif len(word) > 64 {\n\t\t\tword = word[:64]\n\t\t}\n\t\twordCountMap[word]++\n\t}\n\n\tindices := make([]*ContentReverseIndex, 0, len(wordCountMap))\n\tfor word, count := range wordCountMap {\n\t\tid := generateIndexId(2, blogId, word)\n\n\t\tindexItem := &ContentReverseIndex{\n\t\t\tId:          id,\n\t\t\tWord:        word,\n\t\t\tContentType: 2,\n\t\t\tContentId:   blogId,\n\t\t\tWordCount:   count,\n\t\t}\n\t\tindices = append(indices, indexItem)\n\t}\n\n\tif len(indices) > 0 {\n\t\terr = index.BatchInsert(indices)\n\t\tif err != nil {\n\t\t\tlogs.Error(\"批量插入Blog倒排索引失败 ->\", blogId, err)\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}\n\nfunc CheckDocumentIndexed(documentId int) bool {\n\tif documentId <= 0 {\n\t\treturn false\n\t}\n\n\to := orm.NewOrm()\n\tindex := NewContentReverseIndex()\n\treturn o.QueryTable(index.TableNameWithPrefix()).Filter(\"content_type\", 1).Filter(\"content_id\", documentId).Exist()\n}\n\nfunc CheckBlogIndexed(blogId int) bool {\n\tif blogId <= 0 {\n\t\treturn false\n\t}\n\n\to := orm.NewOrm()\n\tindex := NewContentReverseIndex()\n\treturn o.QueryTable(index.TableNameWithPrefix()).Filter(\"content_type\", 2).Filter(\"content_id\", blogId).Exist()\n}\n\nfunc GetUnindexedDocuments(limit int) ([]*Document, error) {\n\to := orm.NewOrm()\n\tvar documents []*Document\n\tdocTable := NewDocument().TableNameWithPrefix()\n\tindexTable := NewContentReverseIndex().TableNameWithPrefix()\n\n\tsql := \"SELECT d.* FROM \" + docTable + \" d \" +\n\t\t\"LEFT JOIN \" + indexTable + \" i ON i.content_type = 1 AND i.content_id = d.document_id \" +\n\t\t\"WHERE i.id IS NULL \" +\n\t\t\"ORDER BY d.document_id DESC\"\n\n\tif limit > 0 {\n\t\tsql += \" LIMIT ?\"\n\t\t_, err := o.Raw(sql, limit).QueryRows(&documents)\n\t\treturn documents, err\n\t}\n\n\t_, err := o.Raw(sql).QueryRows(&documents)\n\treturn documents, err\n}\n\nfunc GetUnindexedBlogs(limit int) ([]*Blog, error) {\n\to := orm.NewOrm()\n\tvar blogs []*Blog\n\tblogTable := NewBlog().TableNameWithPrefix()\n\tindexTable := NewContentReverseIndex().TableNameWithPrefix()\n\n\tsql := \"SELECT b.* FROM \" + blogTable + \" b \" +\n\t\t\"LEFT JOIN \" + indexTable + \" i ON i.content_type = 2 AND i.content_id = b.blog_id \" +\n\t\t\"WHERE i.id IS NULL \" +\n\t\t\"ORDER BY b.blog_id DESC\"\n\n\tif limit > 0 {\n\t\tsql += \" LIMIT ?\"\n\t\t_, err := o.Raw(sql, limit).QueryRows(&blogs)\n\t\treturn blogs, err\n\t}\n\n\t_, err := o.Raw(sql).QueryRows(&blogs)\n\treturn blogs, err\n}\n\n// InitializeMissingIndexes 初始化缺失的倒排索引\nfunc InitializeMissingIndexes() {\n\tgo func() {\n\t\tlogs.Info(\"开始检查并初始化缺失的倒排索引...\")\n\t\tInitializeMissingDocumentIndexes()\n\t\tInitializeMissingBlogIndexes()\n\t\tlogs.Info(\"倒排索引初始化检查完成\")\n\t}()\n}\n\nfunc InitializeMissingDocumentIndexes() {\n\tbatchSize := 100\n\tfor {\n\t\tdocuments, err := GetUnindexedDocuments(batchSize)\n\t\tif err != nil {\n\t\t\tlogs.Error(\"获取未索引文档失败 ->\", err)\n\t\t\tbreak\n\t\t}\n\n\t\tif len(documents) == 0 {\n\t\t\tbreak\n\t\t}\n\n\t\tfor _, doc := range documents {\n\t\t\tindexed := CheckDocumentIndexed(doc.DocumentId)\n\t\t\tif !indexed {\n\t\t\t\tcontent := doc.Release\n\t\t\t\tif content == \"\" {\n\t\t\t\t\tcontent = doc.Markdown\n\t\t\t\t}\n\t\t\t\tfor i := 0; i < 10; i++ { // 标题内容\"十分\"重要\n\t\t\t\t\tcontent = doc.DocumentName + \"\\n\" + content\n\t\t\t\t}\n\t\t\t\tcontent = utils.StripTags(content)\n\t\t\t\terr := BuildIndexForDocument(doc.DocumentId, content)\n\t\t\t\tif err != nil {\n\t\t\t\t\tlogs.Error(\"构建文档倒排索引失败 ->\", doc.DocumentId, err)\n\t\t\t\t} else {\n\t\t\t\t\tlogs.Info(\"文档倒排索引构建成功 ->\", doc.DocumentId)\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\nfunc InitializeMissingBlogIndexes() {\n\tbatchSize := 100\n\tfor {\n\t\tblogs, err := GetUnindexedBlogs(batchSize)\n\t\tif err != nil {\n\t\t\tlogs.Error(\"获取未索引Blog失败 ->\", err)\n\t\t\tbreak\n\t\t}\n\n\t\tif len(blogs) == 0 {\n\t\t\tbreak\n\t\t}\n\n\t\tfor _, blog := range blogs {\n\t\t\tindexed := CheckBlogIndexed(blog.BlogId)\n\t\t\tif !indexed {\n\t\t\t\tcontent := blog.BlogRelease\n\t\t\t\tif content == \"\" {\n\t\t\t\t\tcontent = blog.BlogContent\n\t\t\t\t}\n\t\t\t\tfor i := 0; i < 10; i++ { // 标题内容\"十分\"重要\n\t\t\t\t\tcontent = blog.BlogTitle + \"\\n\" + content\n\t\t\t\t}\n\t\t\t\tcontent = utils.StripTags(content)\n\n\t\t\t\terr := BuildIndexForBlog(blog.BlogId, content)\n\t\t\t\tif err != nil {\n\t\t\t\t\tlogs.Error(\"构建Blog倒排索引失败 ->\", blog.BlogId, err)\n\t\t\t\t} else {\n\t\t\t\t\tlogs.Info(\"Blog倒排索引构建成功 ->\", blog.BlogId)\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "models/ConvertBookResult.go",
    "content": "package models\n\n// 转换结果\ntype ConvertBookResult struct {\n\tPDFPath  string\n\tEpubPath string\n\tMobiPath string\n\tWordPath string\n}\n"
  },
  {
    "path": "models/Dashboard.go",
    "content": "package models\n\nimport \"github.com/beego/beego/v2/client/orm\"\n\ntype Dashboard struct {\n\tBookNumber       int64 `json:\"book_number\"`\n\tDocumentNumber   int64 `json:\"document_number\"`\n\tMemberNumber     int64 `json:\"member_number\"`\n\tCommentNumber    int64 `json:\"comment_number\"`\n\tAttachmentNumber int64 `json:\"attachment_number\"`\n}\n\nfunc NewDashboard() *Dashboard {\n\treturn &Dashboard{}\n}\n\nfunc (m *Dashboard) Query() *Dashboard {\n\to := orm.NewOrm()\n\n\tbook_number, _ := o.QueryTable(NewBook().TableNameWithPrefix()).Count()\n\n\tm.BookNumber = book_number\n\n\tdocument_count, _ := o.QueryTable(NewDocument().TableNameWithPrefix()).Count()\n\tm.DocumentNumber = document_count\n\n\tmember_number, _ := o.QueryTable(NewMember().TableNameWithPrefix()).Count()\n\tm.MemberNumber = member_number\n\n\t//comment_number,_ := o.QueryTable(NewComment().TableNameWithPrefix()).Count()\n\tm.CommentNumber = 0\n\n\tattachment_number, _ := o.QueryTable(NewAttachment().TableNameWithPrefix()).Count()\n\n\tm.AttachmentNumber = attachment_number\n\n\treturn m\n}\n"
  },
  {
    "path": "models/DocumentHistory.go",
    "content": "package models\n\nimport (\n\t\"time\"\n\n\t\"github.com/beego/beego/v2/client/orm\"\n\t\"github.com/beego/beego/v2/core/logs\"\n\t\"github.com/mindoc-org/mindoc/conf\"\n)\n\ntype DocumentHistory struct {\n\tHistoryId    int       `orm:\"column(history_id);pk;auto;unique\" json:\"history_id\"`\n\tAction       string    `orm:\"column(action);size(255);description(modify)\" json:\"action\"`\n\tActionName   string    `orm:\"column(action_name);size(255);description(修改文档)\" json:\"action_name\"`\n\tDocumentId   int       `orm:\"column(document_id);type(int);index;description(关联文档id)\" json:\"doc_id\"`\n\tDocumentName string    `orm:\"column(document_name);size(500);description(关联文档id)\" json:\"doc_name\"`\n\tParentId     int       `orm:\"column(parent_id);type(int);index;default(0);description(父级文档id)\" json:\"parent_id\"`\n\tMarkdown     string    `orm:\"column(markdown);type(text);null;description(文档内容)\" json:\"markdown\"`\n\tContent      string    `orm:\"column(content);type(text);null;description(文档内容)\" json:\"content\"`\n\tMemberId     int       `orm:\"column(member_id);type(int);description(作者id)\" json:\"member_id\"`\n\tModifyTime   time.Time `orm:\"column(modify_time);type(datetime);auto_now;description(修改时间)\" json:\"modify_time\"`\n\tModifyAt     int       `orm:\"column(modify_at);type(int);description(修改人id)\" json:\"-\"`\n\tVersion      int64     `orm:\"type(bigint);column(version);description(版本)\" json:\"version\"`\n\tIsOpen       int       `orm:\"column(is_open);type(int);default(0);description(是否展开子目录 0：阅读时关闭节点 1：阅读时展开节点 2：空目录 单击时会展开下级节点)\" json:\"is_open\"`\n}\n\ntype DocumentHistorySimpleResult struct {\n\tHistoryId  int       `json:\"history_id\"`\n\tActionName string    `json:\"action_name\"`\n\tMemberId   int       `json:\"member_id\"`\n\tAccount    string    `json:\"account\"`\n\tModifyAt   int       `json:\"modify_at\"`\n\tModifyName string    `json:\"modify_name\"`\n\tModifyTime time.Time `json:\"modify_time\"`\n\tVersion    int64     `json:\"version\"`\n}\n\n// TableName 获取对应数据库表名.\nfunc (m *DocumentHistory) TableName() string {\n\treturn \"document_history\"\n}\n\n// TableEngine 获取数据使用的引擎.\nfunc (m *DocumentHistory) TableEngine() string {\n\treturn \"INNODB\"\n}\n\nfunc (m *DocumentHistory) TableNameWithPrefix() string {\n\treturn conf.GetDatabasePrefix() + m.TableName()\n}\n\nfunc NewDocumentHistory() *DocumentHistory {\n\treturn &DocumentHistory{}\n}\nfunc (m *DocumentHistory) Find(id int) (*DocumentHistory, error) {\n\to := orm.NewOrm()\n\terr := o.QueryTable(m.TableNameWithPrefix()).Filter(\"history_id\", id).One(m)\n\n\treturn m, err\n}\n\n//清空指定文档的历史.\nfunc (m *DocumentHistory) Clear(docId int) error {\n\to := orm.NewOrm()\n\n\t_, err := o.Raw(\"DELETE md_document_history WHERE document_id = ?\", docId).Exec()\n\n\treturn err\n}\n\n//删除历史.\nfunc (m *DocumentHistory) Delete(historyId, docId int) error {\n\to := orm.NewOrm()\n\n\t_, err := o.QueryTable(m.TableNameWithPrefix()).Filter(\"history_id\", historyId).Filter(\"document_id\", docId).Delete()\n\n\treturn err\n}\n\n//恢复指定历史的文档.\nfunc (m *DocumentHistory) Restore(historyId, docId, uid int) error {\n\to := orm.NewOrm()\n\n\terr := o.QueryTable(m.TableNameWithPrefix()).Filter(\"history_id\", historyId).Filter(\"document_id\", docId).One(m)\n\n\tif err != nil {\n\t\treturn err\n\t}\n\tdoc, err := NewDocument().Find(m.DocumentId)\n\n\tif err != nil {\n\t\treturn err\n\t}\n\thistory := NewDocumentHistory()\n\thistory.DocumentId = docId\n\thistory.Content = doc.Content\n\thistory.Markdown = doc.Markdown\n\thistory.DocumentName = doc.DocumentName\n\thistory.ModifyAt = uid\n\thistory.MemberId = doc.MemberId\n\thistory.ParentId = doc.ParentId\n\thistory.Version = time.Now().Unix()\n\thistory.Action = \"restore\"\n\thistory.ActionName = \"恢复文档\"\n\thistory.IsOpen = doc.IsOpen\n\n\thistory.InsertOrUpdate()\n\n\tdoc.DocumentName = m.DocumentName\n\tdoc.Content = m.Content\n\tdoc.Markdown = m.Markdown\n\tdoc.Release = m.Content\n\tdoc.Version = time.Now().Unix()\n\tdoc.IsOpen = m.IsOpen\n\n\t_, err = o.Update(doc)\n\n\treturn err\n}\n\nfunc (m *DocumentHistory) InsertOrUpdate() (history *DocumentHistory, err error) {\n\to := orm.NewOrm()\n\thistory = m\n\n\tif m.HistoryId > 0 {\n\t\t_, err = o.Update(m)\n\t} else {\n\t\t_, err = o.Insert(m)\n\t\tif err == nil {\n\t\t\tif doc, e := NewDocument().Find(m.DocumentId); e == nil {\n\t\t\t\tif book, e := NewBook().Find(doc.BookId); e == nil && book.HistoryCount > 0 {\n\t\t\t\t\t//如果已存在的历史记录大于指定的记录，则清除旧记录\n\t\t\t\t\tif c, e := o.QueryTable(m.TableNameWithPrefix()).Filter(\"document_id\", doc.DocumentId).Count(); e == nil && c > int64(book.HistoryCount) {\n\n\t\t\t\t\t\tcount := c - int64(book.HistoryCount)\n\t\t\t\t\t\tlogs.Info(\"需要删除的历史文档数量：\", count)\n\t\t\t\t\t\tvar lists []DocumentHistory\n\n\t\t\t\t\t\tif _, e := o.QueryTable(m.TableNameWithPrefix()).Filter(\"document_id\", doc.DocumentId).OrderBy(\"history_id\").Limit(count).All(&lists, \"history_id\"); e == nil {\n\t\t\t\t\t\t\tfor _, d := range lists {\n\t\t\t\t\t\t\t\to.Delete(&d)\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tlogs.Info(book.HistoryCount)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\t}\n\treturn\n}\n\n//分页查询指定文档的历史.\nfunc (m *DocumentHistory) FindToPager(docId, pageIndex, pageSize int) (docs []*DocumentHistorySimpleResult, totalCount int, err error) {\n\n\to := orm.NewOrm()\n\n\toffset := (pageIndex - 1) * pageSize\n\n\ttotalCount = 0\n\n\tsql := `SELECT history.*,m1.account,m2.account as modify_name\nFROM md_document_history AS history\nLEFT JOIN md_members AS m1 ON history.member_id = m1.member_id\nLEFT JOIN md_members AS m2 ON history.modify_at = m2.member_id\nWHERE history.document_id = ? ORDER BY history.history_id DESC limit ? offset ?;`\n\n\t_, err = o.Raw(sql, docId, pageSize, offset).QueryRows(&docs)\n\n\tif err != nil {\n\t\treturn\n\t}\n\tvar count int64\n\tcount, err = o.QueryTable(m.TableNameWithPrefix()).Filter(\"document_id\", docId).Count()\n\n\tif err != nil {\n\t\treturn\n\t}\n\ttotalCount = int(count)\n\n\treturn\n}\n"
  },
  {
    "path": "models/DocumentModel.go",
    "content": "package models\n\nimport (\n\t\"time\"\n\n\t\"github.com/beego/i18n\"\n\n\t\"fmt\"\n\t\"strconv\"\n\n\t\"bytes\"\n\t\"os\"\n\t\"path/filepath\"\n\t\"strings\"\n\n\t\"github.com/PuerkitoBio/goquery\"\n\t\"github.com/beego/beego/v2/client/orm\"\n\t\"github.com/beego/beego/v2/core/logs\"\n\t\"github.com/beego/beego/v2/server/web\"\n\t\"github.com/mindoc-org/mindoc/cache\"\n\t\"github.com/mindoc-org/mindoc/conf\"\n\t\"github.com/mindoc-org/mindoc/utils\"\n)\n\n// Document struct.\ntype Document struct {\n\tDocumentId    int           `orm:\"pk;auto;unique;column(document_id)\" json:\"doc_id\"`\n\tDocumentName  string        `orm:\"column(document_name);size(500);description(文档名称)\" json:\"doc_name\"`\n\tIdentify      string        `orm:\"column(identify);size(100);index;null;default(null);description(唯一标识)\" json:\"identify\"` // Identify 文档唯一标识\n\tBookId        int           `orm:\"column(book_id);type(int);index;description(关联bools表主键)\" json:\"book_id\"`\n\tParentId      int           `orm:\"column(parent_id);type(int);index;default(0);description(父级文档)\" json:\"parent_id\"`\n\tOrderSort     int           `orm:\"column(order_sort);default(0);type(int);index;description(排序从小到大排序)\" json:\"order_sort\"`\n\tMarkdown      string        `orm:\"column(markdown);type(text);null;description(markdown内容)\" json:\"markdown\"` // Markdown markdown格式文档.\n\tMarkdownTheme string        `orm:\"column(markdown_theme);size(50);default(theme__light);description(markdown主题)\" json:\"markdown_theme\"`\n\tRelease       string        `orm:\"column(release);type(text);null;description(文章内容)\" json:\"release\"` // Release 发布后的Html格式内容.\n\tContent       string        `orm:\"column(content);type(text);null;description(文章内容)\" json:\"content\"` // Content 未发布的 Html 格式内容.\n\tCreateTime    time.Time     `orm:\"column(create_time);type(datetime);auto_now_add;description(创建时间)\" json:\"create_time\"`\n\tMemberId      int           `orm:\"column(member_id);type(int);description(关系用户id)\" json:\"member_id\"`\n\tModifyTime    time.Time     `orm:\"column(modify_time);type(datetime);auto_now;description(修改时间)\" json:\"modify_time\"`\n\tModifyAt      int           `orm:\"column(modify_at);type(int);description(修改人id)\" json:\"-\"`\n\tVersion       int64         `orm:\"column(version);type(bigint);description(版本，关联历史文档里的version)\" json:\"version\"`\n\tIsOpen        int           `orm:\"column(is_open);type(int);default(0);description(是否展开子目录 0：阅读时关闭节点 1：阅读时展开节点 2：空目录 单击时会展开下级节点)\" json:\"is_open\"` //是否展开子目录：0 否/1 是 /2 空间节点，单击时展开下一级\n\tViewCount     int           `orm:\"column(view_count);type(int);description(浏览量)\" json:\"view_count\"`\n\tAttachList    []*Attachment `orm:\"-\" json:\"attach\"`\n\t//i18n\n\tLang string `orm:\"-\"`\n}\n\n// 多字段唯一键\nfunc (item *Document) TableUnique() [][]string {\n\treturn [][]string{{\"book_id\", \"identify\"}}\n}\n\n// TableName 获取对应数据库表名.\nfunc (item *Document) TableName() string {\n\treturn \"documents\"\n}\n\n// TableEngine 获取数据使用的引擎.\nfunc (item *Document) TableEngine() string {\n\treturn \"INNODB\"\n}\n\nfunc (item *Document) TableNameWithPrefix() string {\n\treturn conf.GetDatabasePrefix() + item.TableName()\n}\n\nfunc NewDocument() *Document {\n\treturn &Document{\n\t\tVersion: time.Now().Unix(),\n\t}\n}\n\n// 根据文档ID查询指定文档.\nfunc (item *Document) Find(id int) (*Document, error) {\n\tif id <= 0 {\n\t\treturn item, ErrInvalidParameter\n\t}\n\n\to := orm.NewOrm()\n\n\terr := o.QueryTable(item.TableNameWithPrefix()).Filter(\"document_id\", id).One(item)\n\n\tif err == orm.ErrNoRows {\n\t\treturn item, ErrDataNotExist\n\t}\n\n\treturn item, nil\n}\n\n// 插入和更新文档.\nfunc (item *Document) InsertOrUpdate(cols ...string) error {\n\to := orm.NewOrm()\n\titem.DocumentName = utils.StripTags(item.DocumentName)\n\tvar err error\n\tif item.DocumentId > 0 {\n\t\t_, err = o.Update(item, cols...)\n\t} else {\n\t\tif item.Identify == \"\" {\n\t\t\tbook := NewBook()\n\t\t\tidentify := \"docs\"\n\t\t\tif err := o.QueryTable(book.TableNameWithPrefix()).Filter(\"book_id\", item.BookId).One(book, \"identify\"); err == nil {\n\t\t\t\tidentify = book.Identify\n\t\t\t}\n\n\t\t\titem.Identify = fmt.Sprintf(\"%s-%s\", identify, strconv.FormatInt(time.Now().UnixNano(), 32))\n\t\t}\n\n\t\tif item.OrderSort == 0 {\n\t\t\tsort, _ := o.QueryTable(item.TableNameWithPrefix()).Filter(\"book_id\", item.BookId).Filter(\"parent_id\", item.ParentId).Count()\n\t\t\titem.OrderSort = int(sort) + 1\n\t\t}\n\t\t_, err = o.Insert(item)\n\t\tNewBook().ResetDocumentNumber(item.BookId)\n\t}\n\tif err != nil {\n\t\treturn err\n\t}\n\n\treturn nil\n}\n\n// 根据文档识别编号和项目id获取一篇文档\nfunc (item *Document) FindByIdentityFirst(identify string, bookId int) (*Document, error) {\n\to := orm.NewOrm()\n\n\terr := o.QueryTable(item.TableNameWithPrefix()).Filter(\"book_id\", bookId).Filter(\"identify\", identify).One(item)\n\n\treturn item, err\n}\n\n// 递归删除一个文档.\nfunc (item *Document) RecursiveDocument(docId int) error {\n\n\to := orm.NewOrm()\n\n\tif doc, err := item.Find(docId); err == nil {\n\t\t// 删除文档的倒排索引\n\t\tindex := NewContentReverseIndex()\n\t\t_ = index.DeleteByContentTypeAndContentId(1, docId)\n\n\t\to.Delete(doc)\n\t\tNewDocumentHistory().Clear(doc.DocumentId)\n\t}\n\tvar maps []orm.Params\n\n\t_, err := o.Raw(\"SELECT document_id FROM \" + item.TableNameWithPrefix() + \" WHERE parent_id=\" + strconv.Itoa(docId)).Values(&maps)\n\tif err != nil {\n\t\tlogs.Error(\"RecursiveDocument => \", err)\n\t\treturn err\n\t}\n\n\tfor _, param := range maps {\n\t\tif docId, ok := param[\"document_id\"].(string); ok {\n\t\t\tid, _ := strconv.Atoi(docId)\n\t\t\t// 删除子文档的倒排索引\n\t\t\tindex := NewContentReverseIndex()\n\t\t\t_ = index.DeleteByContentTypeAndContentId(1, id)\n\n\t\t\to.QueryTable(item.TableNameWithPrefix()).Filter(\"document_id\", id).Delete()\n\t\t\titem.RecursiveDocument(id)\n\t\t}\n\t}\n\n\treturn nil\n}\n\n// 将文档写入缓存\nfunc (item *Document) PutToCache() {\n\tgo func(m Document) {\n\n\t\tif m.Identify == \"\" {\n\n\t\t\tif err := cache.Put(\"Document.Id.\"+strconv.Itoa(m.DocumentId), m, time.Second*3600); err != nil {\n\t\t\t\tlogs.Info(\"文档缓存失败:\", m.DocumentId)\n\t\t\t}\n\t\t} else {\n\t\t\tif err := cache.Put(fmt.Sprintf(\"Document.BookId.%d.Identify.%s\", m.BookId, m.Identify), m, time.Second*3600); err != nil {\n\t\t\t\tlogs.Info(\"文档缓存失败:\", m.DocumentId)\n\t\t\t}\n\t\t}\n\n\t}(*item)\n}\n\n// 清除缓存\nfunc (item *Document) RemoveCache() {\n\tgo func(m Document) {\n\t\tcache.Put(\"Document.Id.\"+strconv.Itoa(m.DocumentId), m, time.Second*3600)\n\n\t\tif m.Identify != \"\" {\n\t\t\tcache.Put(fmt.Sprintf(\"Document.BookId.%d.Identify.%s\", m.BookId, m.Identify), m, time.Second*3600)\n\t\t}\n\t}(*item)\n}\n\n// 从缓存获取\nfunc (item *Document) FromCacheById(id int) (*Document, error) {\n\n\tif err := cache.Get(\"Document.Id.\"+strconv.Itoa(id), &item); err == nil && item.DocumentId > 0 {\n\t\tlogs.Info(\"从缓存中获取文档信息成功 ->\", item.DocumentId)\n\t\treturn item, nil\n\t}\n\n\tif item.DocumentId > 0 {\n\t\titem.PutToCache()\n\t}\n\titem, err := item.Find(id)\n\n\tif err == nil {\n\t\titem.PutToCache()\n\t}\n\treturn item, err\n}\n\n// 根据文档标识从缓存中查询文档\nfunc (item *Document) FromCacheByIdentify(identify string, bookId int) (*Document, error) {\n\n\tkey := fmt.Sprintf(\"Document.BookId.%d.Identify.%s\", bookId, identify)\n\n\tif err := cache.Get(key, item); err == nil && item.DocumentId > 0 {\n\t\tlogs.Info(\"从缓存中获取文档信息成功 ->\", key)\n\t\treturn item, nil\n\t}\n\n\tdefer func() {\n\t\tif item.DocumentId > 0 {\n\t\t\titem.PutToCache()\n\t\t}\n\t}()\n\treturn item.FindByIdentityFirst(identify, bookId)\n}\n\n// 根据项目ID查询文档列表.\nfunc (item *Document) FindListByBookId(bookId int) (docs []*Document, err error) {\n\to := orm.NewOrm()\n\n\t_, err = o.QueryTable(item.TableNameWithPrefix()).Filter(\"book_id\", bookId).OrderBy(\"order_sort\").All(&docs)\n\n\treturn\n}\n\n// 判断文章是否存在\nfunc (item *Document) IsExist(documentId int) bool {\n\to := orm.NewOrm()\n\n\treturn o.QueryTable(item.TableNameWithPrefix()).Filter(\"document_id\", documentId).Exist()\n}\n\n// 发布单篇文档\nfunc (item *Document) ReleaseContent() error {\n\n\titem.Release = strings.TrimSpace(item.Content)\n\n\terr := item.Processor().InsertOrUpdate(\"release\")\n\n\tif err != nil {\n\t\tlogs.Error(fmt.Sprintf(\"发布失败 -> %+v\", item), err)\n\t\treturn err\n\t}\n\t//当文档发布后，需要清除已缓存的转换文档和文档缓存\n\titem.RemoveCache()\n\n\tif err := os.RemoveAll(filepath.Join(conf.WorkingDirectory, \"uploads\", \"books\", strconv.Itoa(item.BookId))); err != nil {\n\t\tlogs.Error(\"删除已缓存的文档目录失败 -> \", filepath.Join(conf.WorkingDirectory, \"uploads\", \"books\", strconv.Itoa(item.BookId)))\n\t\treturn err\n\t}\n\n\t// 刷新倒排索引\n\tgo func(docId int, docName, release, markdown string) {\n\t\tcontent := docName + \"\\n\" + release\n\t\tif content == \"\" {\n\t\t\tcontent = markdown\n\t\t}\n\t\tcontent = utils.StripTags(content)\n\t\tif err := BuildIndexForDocument(docId, content); err != nil {\n\t\t\tlogs.Error(\"error: 构建文档倒排索引失败 ->\", docId, err)\n\t\t}\n\t}(item.DocumentId, item.DocumentName, item.Release, item.Markdown)\n\n\treturn nil\n}\n\n// Processor 调用位置两处：\n// 1. 项目发布和文档发布: 处理文档的外链，附件，底部编辑信息等;\n// 2. 文档阅读：可以修复存在问题的文档，使其能正常显示附件下载和文档作者信息等。\nfunc (item *Document) Processor() *Document {\n\tif item.Release != \"\" {\n\t\titem.Release = utils.SafetyProcessor(item.Release)\n\t} else {\n\t\t// Release内容为空，直接赋值文档标签，保证附件下载正常\n\t\titem.Release = \"<div class=\\\"whole-article-wrap\\\"></div>\"\n\t}\n\n\t// Next: 生成文档的一些附加信息\n\tif docQuery, err := goquery.NewDocumentFromReader(bytes.NewBufferString(item.Release)); err == nil {\n\n\t\t//处理附件\n\t\tif selector := docQuery.Find(\"div.attach-list\").First(); selector.Size() <= 0 {\n\t\t\t//处理附件\n\t\t\tattachList, err := NewAttachment().FindListByDocumentId(item.DocumentId)\n\t\t\tif err == nil && len(attachList) > 0 {\n\t\t\t\tcontent := bytes.NewBufferString(\"<div class=\\\"attach-list\\\"><strong>\" + i18n.Tr(item.Lang, \"doc.attachment\") + \"</strong><ul>\")\n\t\t\t\tfor _, attach := range attachList {\n\t\t\t\t\tif strings.HasPrefix(attach.HttpPath, \"/\") {\n\t\t\t\t\t\tattach.HttpPath = strings.TrimSuffix(conf.BaseUrl, \"/\") + attach.HttpPath\n\t\t\t\t\t}\n\t\t\t\t\tli := fmt.Sprintf(\"<li><a href=\\\"%s\\\" target=\\\"_blank\\\" title=\\\"%s\\\">%s</a></li>\", attach.HttpPath, attach.FileName, attach.FileName)\n\n\t\t\t\t\tcontent.WriteString(li)\n\t\t\t\t}\n\t\t\t\tcontent.WriteString(\"</ul></div>\")\n\t\t\t\tif docQuery == nil {\n\t\t\t\t\tdocQuery, err = goquery.NewDocumentFromReader(content)\n\t\t\t\t\tif err != nil {\n\t\t\t\t\t\tlogs.Error(\"goquery->NewDocumentFromReader err:%+v\", err)\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif selector := docQuery.Find(\"div.wiki-bottom\").First(); selector.Size() > 0 {\n\t\t\t\t\t\tselector.BeforeHtml(content.String()) //This branch should be a compatible branch.\n\t\t\t\t\t} else if selector := docQuery.Find(\"div.markdown-article\").First(); selector.Size() > 0 {\n\t\t\t\t\t\tselector.AppendHtml(content.String()) //The document produced by the editor of Markdown will have this tag.class.\n\t\t\t\t\t} else if selector := docQuery.Find(\"div.whole-article-wrap\").First(); selector.Size() > 0 {\n\t\t\t\t\t\tselector.AppendHtml(content.String()) //All documents should have this tag.\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t//处理了文档底部信息\n\t\tif selector := docQuery.Find(\"div.wiki-bottom\").First(); selector.Size() <= 0 && item.MemberId > 0 {\n\t\t\t//处理文档结尾信息\n\t\t\tdocCreator, err := NewMember().Find(item.MemberId, \"real_name\", \"account\")\n\t\t\trelease := \"<div class=\\\"wiki-bottom\\\">\"\n\n\t\t\trelease += i18n.Tr(item.Lang, \"doc.ft_author\")\n\t\t\tif err == nil && docCreator != nil {\n\t\t\t\tif docCreator.RealName != \"\" {\n\t\t\t\t\trelease += docCreator.RealName\n\t\t\t\t} else {\n\t\t\t\t\trelease += docCreator.Account\n\t\t\t\t}\n\t\t\t}\n\t\t\trelease += \" &nbsp;\" + i18n.Tr(item.Lang, \"doc.ft_create_time\") + item.CreateTime.Local().Format(\"2006-01-02 15:04\") + \"<br>\"\n\n\t\t\tif item.ModifyAt > 0 {\n\t\t\t\tdocModify, err := NewMember().Find(item.ModifyAt, \"real_name\", \"account\")\n\t\t\t\tif err == nil {\n\t\t\t\t\tif docModify.RealName != \"\" {\n\t\t\t\t\t\trelease += i18n.Tr(item.Lang, \"doc.ft_last_editor\") + docModify.RealName\n\t\t\t\t\t} else {\n\t\t\t\t\t\trelease += i18n.Tr(item.Lang, \"doc.ft_last_editor\") + docModify.Account\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\trelease += \" &nbsp;\" + i18n.Tr(item.Lang, \"doc.ft_update_time\") + item.ModifyTime.Local().Format(\"2006-01-02 15:04\") + \"<br>\"\n\t\t\trelease += \"</div>\"\n\n\t\t\tif selector := docQuery.Find(\"div.markdown-article\").First(); selector.Size() > 0 {\n\t\t\t\tselector.AppendHtml(release)\n\t\t\t} else if selector := docQuery.Find(\"div.whole-article-wrap\").First(); selector.Size() > 0 {\n\t\t\t\tselector.AppendHtml(release)\n\t\t\t}\n\t\t}\n\t\tcdnimg, _ := web.AppConfig.String(\"cdnimg\")\n\n\t\tdocQuery.Find(\"img\").Each(func(i int, selection *goquery.Selection) {\n\n\t\t\tif src, ok := selection.Attr(\"src\"); ok {\n\t\t\t\tsrc = strings.TrimSpace(strings.ToLower(src))\n\t\t\t\t//过滤掉没有链接的图片标签\n\t\t\t\tif src == \"\" || strings.HasPrefix(src, \"data:text/html\") {\n\t\t\t\t\tselection.Remove()\n\t\t\t\t\treturn\n\t\t\t\t}\n\n\t\t\t\t//设置图片为CDN地址\n\t\t\t\tif cdnimg != \"\" && strings.HasPrefix(src, \"/uploads/\") {\n\t\t\t\t\tselection.SetAttr(\"src\", utils.JoinURI(cdnimg, src))\n\t\t\t\t}\n\n\t\t\t}\n\t\t\tselection.RemoveAttr(\"onerror\").RemoveAttr(\"onload\")\n\t\t})\n\t\t//过滤A标签的非法连接\n\t\tdocQuery.Find(\"a\").Each(func(i int, selection *goquery.Selection) {\n\t\t\tif val, exists := selection.Attr(\"href\"); exists {\n\t\t\t\tif val == \"\" {\n\t\t\t\t\tselection.SetAttr(\"href\", \"#\")\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t\tval = strings.Replace(strings.ToLower(val), \" \", \"\", -1)\n\t\t\t\t//移除危险脚本链接\n\t\t\t\tif strings.HasPrefix(val, \"data:text/html\") ||\n\t\t\t\t\tstrings.HasPrefix(val, \"vbscript:\") ||\n\t\t\t\t\tstrings.HasPrefix(val, \"&#106;avascript:\") ||\n\t\t\t\t\tstrings.HasPrefix(val, \"javascript:\") {\n\t\t\t\t\tselection.SetAttr(\"href\", \"#\")\n\t\t\t\t}\n\t\t\t}\n\t\t\t//移除所有 onerror 属性\n\t\t\tselection.RemoveAttr(\"onerror\").RemoveAttr(\"onload\").RemoveAttr(\"onclick\")\n\t\t})\n\n\t\tdocQuery.Find(\"script\").Remove()\n\t\tdocQuery.Find(\"link\").Remove()\n\t\tdocQuery.Find(\"vbscript\").Remove()\n\n\t\tif html, err := docQuery.Html(); err == nil {\n\t\t\titem.Release = strings.TrimSuffix(strings.TrimPrefix(strings.TrimSpace(html), \"<html><head></head><body>\"), \"</body></html>\")\n\t\t}\n\t}\n\n\treturn item\n}\n\n// 增加阅读次数\nfunc (item *Document) IncrViewCount(id int) {\n\to := orm.NewOrm()\n\to.QueryTable(item.TableNameWithPrefix()).Filter(\"document_id\", id).Update(orm.Params{\n\t\t\"view_count\": orm.ColValue(orm.ColAdd, 1),\n\t})\n}\n"
  },
  {
    "path": "models/DocumentSearchResult.go",
    "content": "package models\n\nimport (\n\t\"fmt\"\n\t\"regexp\"\n\t\"strings\"\n\t\"time\"\n\n\t\"github.com/beego/beego/v2/client/orm\"\n\t\"github.com/beego/beego/v2/core/logs\"\n\t\"github.com/beego/beego/v2/server/web\"\n)\n\ntype DocumentSearchResult struct {\n\tDocumentId   int    `json:\"doc_id\"`\n\tDocumentName string `json:\"doc_name\"`\n\t// Identify 文档唯一标识\n\tIdentify     string    `json:\"identify\"`\n\tDescription  string    `json:\"description\"`\n\tAuthor       string    `json:\"author\"`\n\tModifyTime   time.Time `json:\"modify_time\"`\n\tCreateTime   time.Time `json:\"create_time\"`\n\tBookId       int       `json:\"book_id\"`\n\tBookName     string    `json:\"book_name\"`\n\tBookIdentify string    `json:\"book_identify\"`\n\tSearchType   string    `json:\"search_type\"`\n}\n\nvar escape_re = regexp.MustCompile(`(?mi)(\\bLIKE\\s+\\?)`)\nvar escape_replace = \"${1} ESCAPE '\\\\'\"\n\nfunc need_escape(keyword string) bool {\n\tdbadapter, _ := web.AppConfig.String(\"db_adapter\")\n\tif strings.EqualFold(dbadapter, \"sqlite3\") && (strings.Contains(keyword, \"\\\\_\") || strings.Contains(keyword, \"\\\\%\")) {\n\t\treturn true\n\t}\n\treturn false\n}\n\nfunc escape_name(name string) string {\n\tdbadapter, _ := web.AppConfig.String(\"db_adapter\")\n\tch := \"`\"\n\tif strings.EqualFold(dbadapter, \"postgres\") {\n\t\tch = `\"`\n\t}\n\treturn fmt.Sprintf(\"%s%s%s\", ch, name, ch)\n}\n\nfunc NewDocumentSearchResult() *DocumentSearchResult {\n\treturn &DocumentSearchResult{}\n}\n\n// 分页全局搜索.\nfunc (m *DocumentSearchResult) FindToPager(keyword string, pageIndex, pageSize, memberId int) (searchResult []*DocumentSearchResult, totalCount int, err error) {\n\to := orm.NewOrm()\n\n\toffset := (pageIndex - 1) * pageSize\n\n\tkeyword = \"%\" + strings.Replace(keyword, \" \", \"%\", -1) + \"%\"\n\n\t_need_escape := need_escape(keyword)\n\tescape_sql := func(sql string) string {\n\t\tif _need_escape {\n\t\t\treturn escape_re.ReplaceAllString(sql, escape_replace)\n\t\t}\n\t\treturn sql\n\t}\n\n\tif memberId <= 0 {\n\t\tsql1 := `SELECT count(doc.document_id) as total_count FROM md_documents AS doc\n  LEFT JOIN md_books as book ON doc.book_id = book.book_id\nWHERE book.privately_owned = 0 AND (doc.document_name LIKE ? OR doc.release LIKE ?) `\n\n\t\tsql2 := `SELECT *\nFROM (\n       SELECT\n         doc.document_id,\n         doc.modify_time,\n         doc.create_time,\n         doc.document_name,\n         doc.identify,\n         doc.release    AS description,\n         book.identify  AS book_identify,\n         book.book_name,\n         rel.member_id,\n         mdmb.account AS author,\n         'document'     AS search_type\n       FROM md_documents AS doc\n         LEFT JOIN md_books AS book ON doc.book_id = book.book_id\n         LEFT JOIN md_relationship AS rel ON book.book_id = rel.book_id AND rel.role_id = 0\n         LEFT JOIN md_members AS mdmb ON rel.member_id = mdmb.member_id\n       WHERE book.privately_owned = 0 AND (doc.document_name LIKE ? OR doc.release LIKE ?)\n     UNION ALL\nSELECT\n  book.book_id AS document_id,\n  book.modify_time,\n  book.create_time,\n  book.book_name AS document_name,\n  book.identify,\n  book.description,\n  book.identify  AS book_identify,\n  book.book_name,\n  rel.member_id,\n  mdmb.account AS author,\n  'book'     AS search_type\nFROM  md_books AS book\n       LEFT JOIN md_relationship AS rel ON book.book_id = rel.book_id AND rel.role_id = 0\n       LEFT JOIN md_members AS mdmb ON rel.member_id = mdmb.member_id\nWHERE book.privately_owned = 0 AND (book.book_name LIKE ? OR book.description LIKE ?)\n\n       UNION ALL\n       SELECT\n         blog.blog_id AS document_id,\n         blog.modify_time,\n         blog.create_time,\n         blog.blog_title as document_name,\n         blog.blog_identify,\n         blog.blog_release,\n         blog.blog_identify,\n         blog.blog_title as book_name,\n         blog.member_id,\n         mdmb.account,\n         'blog' AS search_type\n       FROM md_blogs AS blog\n         LEFT JOIN md_members AS mdmb ON blog.member_id = mdmb.member_id\n       WHERE blog.blog_status = 'public' AND (blog.blog_release LIKE ? OR blog.blog_title LIKE ?)\n     ) AS union_table\nORDER BY create_time DESC\nLIMIT ? OFFSET ?;`\n\n\t\terr = o.Raw(escape_sql(sql1), keyword, keyword).QueryRow(&totalCount)\n\t\tif err != nil {\n\t\t\tlogs.Error(\"查询搜索结果失败 -> \", err)\n\t\t\treturn\n\t\t}\n\t\tsql3 := `       SELECT\n         count(*)\n       FROM md_blogs AS blog\n       WHERE blog.blog_status = 'public' AND (blog.blog_release LIKE ? OR blog.blog_title LIKE ?);`\n\n\t\tc := 0\n\t\terr = o.Raw(escape_sql(sql3), keyword, keyword).QueryRow(&c)\n\t\tif err != nil {\n\t\t\tlogs.Error(\"查询搜索结果失败 -> \", err)\n\t\t\treturn\n\t\t}\n\n\t\ttotalCount += c\n\t\t//查询项目的数量\n\t\tsql4 := `SELECT count(*) as total_count FROM md_books as book\nWHERE book.privately_owned = 0 AND (book.book_name LIKE ? OR book.description LIKE ?);`\n\n\t\terr = o.Raw(escape_sql(sql4), keyword, keyword).QueryRow(&c)\n\t\tif err != nil {\n\t\t\tlogs.Error(\"查询搜索结果失败 -> \", err)\n\t\t\treturn\n\t\t}\n\n\t\ttotalCount += c\n\n\t\t_, err = o.Raw(escape_sql(sql2), keyword, keyword, keyword, keyword, keyword, keyword, pageSize, offset).QueryRows(&searchResult)\n\t\tif err != nil {\n\t\t\tlogs.Error(\"查询搜索结果失败 -> \", err)\n\t\t\treturn\n\t\t}\n\t} else {\n\t\tsql1 := `SELECT count(doc.document_id) as total_count FROM md_documents AS doc\n  LEFT JOIN md_books as book ON doc.book_id = book.book_id\n  LEFT JOIN md_relationship AS rel ON doc.book_id = rel.book_id AND rel.role_id = 0\n  LEFT JOIN md_relationship AS rel1 ON doc.book_id = rel1.book_id AND rel1.member_id = ?\n\t\t\tleft join (select * from (select book_id,team_member_id,role_id\n                   \tfrom md_team_relationship as mtr\n\t\t\t\t\tleft join md_team_member as mtm on mtm.team_id=mtr.team_id and mtm.member_id=? order by role_id desc )as t group by t.role_id,t.team_member_id,t.book_id) as team \n\t\t\t\t\ton team.book_id = book.book_id\nWHERE (book.privately_owned = 0 OR rel1.relationship_id > 0 or team.team_member_id > 0)  AND (doc.document_name LIKE ? OR doc.release LIKE ?);`\n\n\t\tsql2 := `SELECT *\nFROM (\n       SELECT\n         doc.document_id,\n         doc.modify_time,\n         doc.create_time,\n         doc.document_name,\n         doc.identify,\n         doc.release    AS description,\n         book.identify  AS book_identify,\n         book.book_name,\n         rel.member_id,\n         mdmb.account AS author,\n         'document'     AS search_type\n       FROM md_documents AS doc\n         LEFT JOIN md_books AS book ON doc.book_id = book.book_id\n         LEFT JOIN md_relationship AS rel ON book.book_id = rel.book_id AND rel.role_id = 0\n         LEFT JOIN md_members AS mdmb ON rel.member_id = mdmb.member_id\n         LEFT JOIN md_relationship AS rel1 ON doc.book_id = rel1.book_id AND rel1.member_id = ?\n         LEFT JOIN (SELECT *\n                    FROM (SELECT\n                            book_id,\n                            team_member_id,\n                            role_id\n                          FROM md_team_relationship AS mtr\n                            LEFT JOIN md_team_member AS mtm ON mtm.team_id = mtr.team_id AND mtm.member_id = ?\n                          ORDER BY role_id DESC) AS t\n                    GROUP BY t.role_id, t.team_member_id, t.book_id) AS team\n           ON team.book_id = book.book_id\n       WHERE (book.privately_owned = 0 OR rel1.relationship_id > 0 OR team.team_member_id > 0) AND\n             (doc.document_name LIKE ? OR doc.release LIKE ?)\n       UNION ALL\n\n       SELECT\n         book.book_id AS document_id,\n         book.modify_time,\n         book.create_time,\n         book.book_name AS document_name,\n         book.identify,\n         book.description AS description,\n         book.identify  AS book_identify,\n         book.book_name,\n         rel.member_id,\n         mdmb.account AS author,\n         'book'     AS search_type\n       FROM md_books AS book\n         LEFT JOIN md_relationship AS rel ON book.book_id = rel.book_id AND rel.role_id = 0\n         LEFT JOIN md_members AS mdmb ON rel.member_id = mdmb.member_id\n         LEFT JOIN md_relationship AS rel1 ON book.book_id = rel1.book_id AND rel1.member_id = ?\n         LEFT JOIN (SELECT *\n                    FROM (SELECT\n                            book_id,\n                            team_member_id,\n                            role_id\n                          FROM md_team_relationship AS mtr\n                            LEFT JOIN md_team_member AS mtm ON mtm.team_id = mtr.team_id AND mtm.member_id = ?\n                          ORDER BY role_id DESC) AS t\n                    GROUP BY t.role_id, t.team_member_id, t.book_id) AS team\n           ON team.book_id = book.book_id\n       WHERE (book.privately_owned = 0 OR rel1.relationship_id > 0 OR team.team_member_id > 0) AND\n             (book.book_name LIKE ? OR book.description LIKE ?)\n UNION ALL\n       SELECT\n         blog.blog_id AS document_id, \n         blog.modify_time,\n         blog.create_time,\n         blog.blog_title as document_name,\n         blog.blog_identify as identify,\n         blog.blog_release as description,\n         blog.blog_identify  AS book_identify,\n         blog.blog_title as book_name,\n         blog.member_id,\n         mdmb.account,\n         'blog' AS search_type\n       FROM md_blogs AS blog\n         LEFT JOIN md_members AS mdmb ON blog.member_id = mdmb.member_id\n       WHERE (blog.blog_status = 'public' OR blog.member_id = ?) AND blog.blog_type = 0 AND\n             (blog.blog_release LIKE ? OR blog.blog_title LIKE ?)\n     ) AS union_table\nORDER BY create_time DESC\nLIMIT ? OFFSET ?;`\n\n\t\terr = o.Raw(escape_sql(sql1), memberId, memberId, keyword, keyword).QueryRow(&totalCount)\n\t\tif err != nil {\n\t\t\treturn\n\t\t}\n\t\tsql3 := `       SELECT\n         count(*)\n       FROM md_blogs AS blog\n       WHERE (blog.blog_status = 'public' OR blog.member_id = ?) AND blog.blog_type = 0 AND\n             (blog.blog_release LIKE ? OR blog.blog_title LIKE ?);`\n\n\t\tc := 0\n\t\terr = o.Raw(escape_sql(sql3), memberId, keyword, keyword).QueryRow(&c)\n\t\tif err != nil {\n\t\t\tlogs.Error(\"查询搜索结果失败 -> \", err)\n\t\t\treturn\n\t\t}\n\n\t\ttotalCount += c\n\n\t\tsql4 := `SELECT count(*) as total_count FROM md_books as book\n  LEFT JOIN md_relationship AS rel ON book.book_id = rel.book_id AND rel.role_id = 0\n  LEFT JOIN md_relationship AS rel1 ON book.book_id = rel1.book_id AND rel1.member_id = ?\n\t\t\tleft join (select * from (select book_id,team_member_id,role_id\n                   \tfrom md_team_relationship as mtr\n\t\t\t\t\tleft join md_team_member as mtm on mtm.team_id=mtr.team_id and mtm.member_id=? order by role_id desc )as t group by t.role_id,t.team_member_id,t.book_id) as team\n\t\t\t\t\ton team.book_id = book.book_id\nWHERE (book.privately_owned = 0 OR rel1.relationship_id > 0 or team.team_member_id > 0)  AND (book.book_name LIKE ? OR book.description LIKE ?);`\n\n\t\terr = o.Raw(escape_sql(sql4), memberId, memberId, keyword, keyword).QueryRow(&c)\n\t\tif err != nil {\n\t\t\tlogs.Error(\"查询搜索结果失败 -> \", err)\n\t\t\treturn\n\t\t}\n\n\t\ttotalCount += c\n\n\t\t_, err = o.Raw(escape_sql(sql2), memberId, memberId, keyword, keyword, memberId, memberId, keyword, keyword, memberId, keyword, keyword, pageSize, offset).QueryRows(&searchResult)\n\t\tif err != nil {\n\t\t\treturn\n\t\t}\n\t}\n\treturn\n}\n\n// 项目内搜索.\nfunc (m *DocumentSearchResult) SearchDocument(keyword string, bookId int) (docs []*DocumentSearchResult, err error) {\n\to := orm.NewOrm()\n\n\tsql := fmt.Sprintf(\"SELECT * FROM md_documents WHERE book_id = ? AND (document_name LIKE ? OR %s LIKE ?) \", escape_name(\"release\"))\n\tkeyword = \"%\" + keyword + \"%\"\n\n\t_need_escape := need_escape(keyword)\n\tescape_sql := func(sql string) string {\n\t\tif _need_escape {\n\t\t\treturn escape_re.ReplaceAllString(sql, escape_replace)\n\t\t}\n\t\treturn sql\n\t}\n\t_, err = o.Raw(escape_sql(sql), bookId, keyword, keyword).QueryRows(&docs)\n\n\treturn\n}\n\n// 所有项目搜索.\nfunc (m *DocumentSearchResult) SearchAllDocument(keyword string) (docs []*DocumentSearchResult, err error) {\n\to := orm.NewOrm()\n\n\tsql := fmt.Sprintf(\"SELECT * FROM md_documents WHERE (document_name LIKE ? OR %s LIKE ?) \", escape_name(\"release\"))\n\tkeyword = \"%\" + keyword + \"%\"\n\n\t_need_escape := need_escape(keyword)\n\tescape_sql := func(sql string) string {\n\t\tif _need_escape {\n\t\t\treturn escape_re.ReplaceAllString(sql, escape_replace)\n\t\t}\n\t\treturn sql\n\t}\n\n\t_, err = o.Raw(escape_sql(sql), keyword, keyword).QueryRows(&docs)\n\n\treturn\n}\n"
  },
  {
    "path": "models/DocumentTree.go",
    "content": "package models\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"html/template\"\n\t\"math\"\n\n\t\"github.com/beego/beego/v2/client/orm\"\n\t\"github.com/mindoc-org/mindoc/conf\"\n\t// \"gorm.io/driver/sqlite\"\n\t// \"gorm.io/gorm\"\n)\n\ntype DocumentTree struct {\n\tDocumentId   int                    `json:\"id\"`\n\tDocumentName string                 `json:\"text\"`\n\tParentId     interface{}            `json:\"parent\"`\n\tIdentify     string                 `json:\"identify\"`\n\tBookIdentify string                 `json:\"-\"`\n\tVersion      int64                  `json:\"version\"`\n\tState        *DocumentSelected      `json:\"-\"`\n\tAAttrs       map[string]interface{} `json:\"a_attr\"`\n\tChildren     []*DocumentTree        `json:\"children\"`\n}\n\n// type DocumentTreeJson struct {\n// \tgorm.Model\n// \tDocumentId   int                 `json:\"id\"`\n// \tDocumentName string              `json:\"text\"`\n// \tParentId     interface{}         `json:\"parent\"`\n// \tChildren     []*DocumentTreeJson `json:\"children\" gorm:\"-\"`\n// }\n\ntype DocumentSelected struct {\n\tSelected bool `json:\"selected\"`\n\tOpened   bool `json:\"opened\"`\n\tDisabled bool `json:\"disabled\"`\n}\n\n// 获取项目的文档树状结构\nfunc (item *Document) FindDocumentTree(bookId int) ([]*DocumentTree, error) {\n\to := orm.NewOrm()\n\n\ttrees := make([]*DocumentTree, 0)\n\n\tvar docs []*Document\n\n\tcount, err := o.QueryTable(item).Filter(\"book_id\", bookId).\n\t\tOrderBy(\"order_sort\", \"document_id\").\n\t\tLimit(math.MaxInt32).\n\t\tAll(&docs, \"document_id\", \"version\", \"document_name\", \"parent_id\", \"identify\", \"is_open\")\n\n\tif err != nil {\n\t\treturn trees, err\n\t}\n\tbook, _ := NewBook().Find(bookId)\n\n\ttrees = make([]*DocumentTree, count)\n\n\tfor index, item := range docs {\n\t\ttree := &DocumentTree{\n\t\t\tAAttrs: map[string]interface{}{\"is_open\": false, \"opened\": 0},\n\t\t}\n\t\tif index == 0 {\n\t\t\ttree.State = &DocumentSelected{Selected: true, Opened: true}\n\t\t\ttree.AAttrs = map[string]interface{}{\"is_open\": true, \"opened\": 1}\n\t\t} else if item.IsOpen == 1 {\n\t\t\ttree.State = &DocumentSelected{Selected: false, Opened: true}\n\t\t\ttree.AAttrs = map[string]interface{}{\"is_open\": true, \"opened\": 1}\n\t\t}\n\t\tif item.IsOpen == 2 {\n\t\t\ttree.State = &DocumentSelected{Selected: false, Opened: false, Disabled: true}\n\t\t\ttree.AAttrs = map[string]interface{}{\"disabled\": true, \"opened\": 2}\n\t\t}\n\t\ttree.DocumentId = item.DocumentId\n\t\ttree.Identify = item.Identify\n\t\ttree.Version = item.Version\n\t\ttree.BookIdentify = book.Identify\n\t\tif item.ParentId > 0 {\n\t\t\ttree.ParentId = item.ParentId\n\t\t} else {\n\t\t\ttree.ParentId = \"#\"\n\t\t}\n\n\t\ttree.DocumentName = item.DocumentName\n\n\t\ttrees[index] = tree\n\t}\n\n\treturn trees, nil\n}\n\n// 获取项目的文档树状结构2\nfunc (item *Document) FindDocumentTree2(bookId int) ([]*DocumentTree, error) {\n\to := orm.NewOrm()\n\n\ttrees := make([]*DocumentTree, 0)\n\n\tvar docs []*Document\n\n\tcount, err := o.QueryTable(item).Filter(\"book_id\", bookId).\n\t\tOrderBy(\"order_sort\", \"document_id\").\n\t\tLimit(math.MaxInt32).\n\t\tAll(&docs, \"document_id\", \"version\", \"document_name\", \"parent_id\", \"identify\", \"is_open\")\n\n\tif err != nil {\n\t\treturn trees, err\n\t}\n\tbook, _ := NewBook().Find(bookId)\n\n\ttrees = make([]*DocumentTree, count)\n\n\tfor index, item := range docs {\n\t\ttree := &DocumentTree{\n\t\t\tAAttrs: map[string]interface{}{\"is_open\": false, \"opened\": 0},\n\t\t}\n\t\tif index == 0 {\n\t\t\ttree.State = &DocumentSelected{Selected: true, Opened: true}\n\t\t\ttree.AAttrs = map[string]interface{}{\"is_open\": true, \"opened\": 1}\n\t\t} else if item.IsOpen == 1 {\n\t\t\ttree.State = &DocumentSelected{Selected: false, Opened: true}\n\t\t\ttree.AAttrs = map[string]interface{}{\"is_open\": true, \"opened\": 1}\n\t\t}\n\t\tif item.IsOpen == 2 {\n\t\t\ttree.State = &DocumentSelected{Selected: false, Opened: false, Disabled: true}\n\t\t\ttree.AAttrs = map[string]interface{}{\"disabled\": true, \"opened\": 2}\n\t\t}\n\t\ttree.DocumentId = item.DocumentId\n\t\ttree.Identify = item.Identify\n\t\ttree.Version = item.Version\n\t\ttree.BookIdentify = book.Identify\n\t\t// if item.ParentId > 0 {\n\t\ttree.ParentId = item.ParentId\n\t\t// } else {\n\t\t// \ttree.ParentId = \"#\"\n\t\t// }\n\n\t\ttree.DocumentName = item.DocumentName\n\n\t\ttrees[index] = tree\n\t}\n\n\treturn trees, nil\n}\n\nfunc (item *Document) CreateDocumentTreeForHtml(bookId, selectedId int) (string, error) {\n\ttrees, err := item.FindDocumentTree(bookId)\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\tparentId := getSelectedNode(trees, selectedId)\n\n\tbuf := bytes.NewBufferString(\"\")\n\n\tgetDocumentTree(trees, 0, selectedId, parentId, buf)\n\n\treturn buf.String(), nil\n\n}\n\n// 使用递归的方式获取指定ID的顶级ID\nfunc getSelectedNode(array []*DocumentTree, parent_id int) int {\n\n\tfor _, item := range array {\n\t\tif _, ok := item.ParentId.(string); ok && item.DocumentId == parent_id {\n\t\t\treturn item.DocumentId\n\t\t} else if pid, ok := item.ParentId.(int); ok && item.DocumentId == parent_id {\n\t\t\treturn getSelectedNode(array, pid)\n\t\t}\n\t}\n\treturn 0\n}\n\nfunc getDocumentTree(array []*DocumentTree, parentId int, selectedId int, selectedParentId int, buf *bytes.Buffer) {\n\tbuf.WriteString(\"<ul style='display:none;'>\")\n\n\tfor _, item := range array {\n\t\tpid := 0\n\n\t\tif p, ok := item.ParentId.(int); ok {\n\t\t\tpid = p\n\t\t}\n\t\tif pid == parentId {\n\n\t\t\tselected := \"\"\n\t\t\tif item.DocumentId == selectedId {\n\t\t\t\tselected = ` class=\"jstree-clicked\"`\n\t\t\t}\n\t\t\tselectedLi := \"\"\n\t\t\tif item.DocumentId == selectedParentId || (item.State != nil && item.State.Opened) {\n\t\t\t\tselectedLi = ` class=\"jstree-open\"`\n\t\t\t}\n\t\t\tbuf.WriteString(fmt.Sprintf(\"<li id=\\\"%d\\\"%s><a href=\\\"\", item.DocumentId, selectedLi))\n\t\t\tif item.Identify != \"\" {\n\t\t\t\turi := conf.URLFor(\"DocumentController.Read\", \":key\", item.BookIdentify, \":id\", item.Identify)\n\t\t\t\tbuf.WriteString(uri)\n\t\t\t} else {\n\t\t\t\turi := conf.URLFor(\"DocumentController.Read\", \":key\", item.BookIdentify, \":id\", item.DocumentId)\n\t\t\t\tbuf.WriteString(uri)\n\t\t\t}\n\t\t\tbuf.WriteString(fmt.Sprintf(\"\\\" title=\\\"%s\\\"\", template.HTMLEscapeString(item.DocumentName)))\n\t\t\tif item.State != nil && item.State.Disabled {\n\t\t\t\tbuf.WriteString(\" disabled=\\\"true\\\"\")\n\t\t\t}\n\t\t\tbuf.WriteString(fmt.Sprintf(\" data-version=\\\"%d\\\"%s>%s</a>\", item.Version, selected, template.HTMLEscapeString(item.DocumentName)))\n\n\t\t\tfor _, sub := range array {\n\t\t\t\tif p, ok := sub.ParentId.(int); ok && p == item.DocumentId {\n\t\t\t\t\tgetDocumentTree(array, p, selectedId, selectedParentId, buf)\n\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t}\n\t\t\tbuf.WriteString(\"</li>\")\n\n\t\t}\n\t}\n\tbuf.WriteString(\"</ul>\")\n}\n"
  },
  {
    "path": "models/Errors.go",
    "content": "// Package models 为项目所需的模型对象定义.\npackage models\n\nimport \"errors\"\n\nvar (\n\t// ErrMemberNoExist 用户不存在.\n\tErrMemberNoExist             = errors.New(\"用户不存在\")\n\tErrMemberExist               = errors.New(\"用户已存在\")\n\tErrMemberDisabled            = errors.New(\"用户被禁用\")\n\tErrMemberEmailEmpty          = errors.New(\"用户邮箱不能为空\")\n\tErrMemberEmailExist          = errors.New(\"用户邮箱已被使用\")\n\tErrMemberDescriptionTooLong  = errors.New(\"用户描述必须小于500字\")\n\tErrMemberEmailFormatError    = errors.New(\"邮箱格式不正确\")\n\tErrMemberPasswordFormatError = errors.New(\"密码必须在6-50个字符之间\")\n\tErrMemberAccountFormatError  = errors.New(\"账号只能由英文字母数字组成，且在3-50个字符\")\n\tErrMemberRoleError           = errors.New(\"用户权限不正确\")\n\t// ErrorMemberPasswordError 密码错误.\n\tErrorMemberPasswordError = errors.New(\"用户密码错误\")\n\t//ErrorMemberAuthMethodInvalid 不支持此认证方式\n\tErrMemberAuthMethodInvalid = errors.New(\"不支持此认证方式\")\n\t//ErrHTTPServerFail\n\tErrHTTPServerFail = errors.New(\"系统内部异常\")\n\t//ErrLDAPConnect 无法连接到LDAP服务器\n\tErrLDAPConnect = errors.New(\"无法连接到LDAP服务器\")\n\t//ErrLDAPFirstBind 第一次LDAP绑定失败\n\tErrLDAPFirstBind = errors.New(\"第一次LDAP绑定失败\")\n\t//ErrLDAPSearch LDAP搜索失败\n\tErrLDAPSearch = errors.New(\"LDAP搜索失败\")\n\t//ErrLDAPUserNotFoundOrTooMany\n\tErrLDAPUserNotFoundOrTooMany = errors.New(\"LDAP用户不存在或者多于一个\")\n\n\t// ErrDataNotExist 指定的服务已存在.\n\tErrDataNotExist = errors.New(\"数据不存在\")\n\n\t// ErrInvalidParameter 参数错误.\n\tErrInvalidParameter = errors.New(\"Invalid parameter\")\n\n\tErrPermissionDenied = errors.New(\"Permission denied\")\n\n\tErrCommentClosed          = errors.New(\"评论已关闭\")\n\tErrCommentContentNotEmpty = errors.New(\"评论内容不能为空\")\n)\n\ntype Error struct {\n\tcode    int\n\tmessage string\n}\n\nfunc (e Error) Error() string {\n\treturn e.message\n}\n\nfunc (e Error) Code() int {\n\treturn e.code\n}\n\nfunc NewError(code int, message string) Error {\n\treturn Error{code: code, message: message}\n}\n"
  },
  {
    "path": "models/Itemsets.go",
    "content": "package models\n\nimport (\n\t\"errors\"\n\t\"strings\"\n\t\"time\"\n\n\t\"github.com/beego/beego/v2/client/orm\"\n\t\"github.com/beego/beego/v2/core/logs\"\n\t\"github.com/mindoc-org/mindoc/conf\"\n\t\"github.com/mindoc-org/mindoc/utils\"\n\t\"github.com/mindoc-org/mindoc/utils/cryptil\"\n)\n\n//项目空间\ntype Itemsets struct {\n\tItemId      int       `orm:\"column(item_id);pk;auto;unique\" json:\"item_id\"`\n\tItemName    string    `orm:\"column(item_name);size(500);description(项目空间名称)\" json:\"item_name\"`\n\tItemKey     string    `orm:\"column(item_key);size(100);unique;description(项目空间标识)\" json:\"item_key\"`\n\tDescription string    `orm:\"column(description);type(text);null;description(描述)\" json:\"description\"`\n\tMemberId    int       `orm:\"column(member_id);size(100);description(所属用户)\" json:\"member_id\"`\n\tCreateTime  time.Time `orm:\"column(create_time);type(datetime);auto_now_add;description(创建时间)\" json:\"create_time\"`\n\tModifyTime  time.Time `orm:\"column(modify_time);type(datetime);null;auto_now;description(修改时间)\" json:\"modify_time\"`\n\tModifyAt    int       `orm:\"column(modify_at);type(int);description(修改人id)\" json:\"modify_at\"`\n\n\tBookNumber       int    `orm:\"-\" json:\"book_number\"`\n\tCreateTimeString string `orm:\"-\" json:\"create_time_string\"`\n\tCreateName       string `orm:\"-\" json:\"create_name\"`\n}\n\n// TableName 获取对应数据库表名.\nfunc (item *Itemsets) TableName() string {\n\treturn \"itemsets\"\n}\n\n// TableEngine 获取数据使用的引擎.\nfunc (item *Itemsets) TableEngine() string {\n\treturn \"INNODB\"\n}\nfunc (item *Itemsets) TableNameWithPrefix() string {\n\treturn conf.GetDatabasePrefix() + item.TableName()\n}\n\nfunc (item *Itemsets) QueryTable() orm.QuerySeter {\n\treturn orm.NewOrm().QueryTable(item.TableNameWithPrefix())\n}\n\nfunc NewItemsets() *Itemsets {\n\treturn &Itemsets{}\n}\n\nfunc (item *Itemsets) First(itemId int) (*Itemsets, error) {\n\tif itemId <= 0 {\n\t\treturn nil, ErrInvalidParameter\n\t}\n\terr := item.QueryTable().Filter(\"item_id\", itemId).One(item)\n\tif err != nil {\n\t\tlogs.Error(\"查询项目空间失败 -> item_id=\", itemId, err)\n\t} else {\n\t\titem.Include()\n\t}\n\treturn item, err\n}\n\nfunc (item *Itemsets) FindFirst(itemKey string) (*Itemsets, error) {\n\terr := item.QueryTable().Filter(\"item_key\", itemKey).One(item)\n\tif err != nil {\n\t\tlogs.Error(\"查询项目空间失败 -> itemKey=\", itemKey, err)\n\t} else {\n\t\titem.Include()\n\t}\n\treturn item, err\n}\n\nfunc (item *Itemsets) Exist(itemId int) bool {\n\treturn item.QueryTable().Filter(\"item_id\", itemId).Exist()\n}\n\n//保存\nfunc (item *Itemsets) Save() (err error) {\n\n\titem.ItemName = strings.TrimSpace(utils.StripTags(item.ItemName))\n\titem.Description = strings.TrimSpace(utils.StripTags(item.Description))\n\titem.ItemKey = strings.TrimSpace(item.ItemKey)\n\n\tif item.ItemName == \"\" {\n\t\treturn errors.New(\"项目空间名称不能为空\")\n\t}\n\tif item.ItemKey == \"\" {\n\t\titem.ItemKey = cryptil.NewRandChars(16)\n\t}\n\n\tif item.QueryTable().Filter(\"item_id__ne\", item.ItemId).Filter(\"item_key\", item.ItemKey).Exist() {\n\t\treturn errors.New(\"项目空间标识已存在\")\n\t}\n\tif item.ItemId > 0 {\n\t\t_, err = orm.NewOrm().Update(item)\n\t} else {\n\t\t_, err = orm.NewOrm().Insert(item)\n\t}\n\treturn\n}\n\n//删除.\nfunc (item *Itemsets) Delete(itemId int) (err error) {\n\tif itemId <= 0 {\n\t\treturn ErrInvalidParameter\n\t}\n\tif itemId == 1 {\n\t\treturn errors.New(\"默认项目空间不能删除\")\n\t}\n\tif !item.Exist(itemId) {\n\t\treturn errors.New(\"项目空间不存在\")\n\t}\n\tormer := orm.NewOrm()\n\to, err := ormer.Begin()\n\tif err != nil {\n\t\tlogs.Error(\"开启事物失败 ->\", err)\n\t\treturn err\n\t}\n\t_, err = o.QueryTable(item.TableNameWithPrefix()).Filter(\"item_id\", itemId).Delete()\n\tif err != nil {\n\t\tlogs.Error(\"删除项目空间失败 -> item_id=\", itemId, err)\n\t\to.Rollback()\n\t}\n\t_, err = o.Raw(\"update md_books set item_id=1 where item_id=?;\", itemId).Exec()\n\tif err != nil {\n\t\tlogs.Error(\"删除项目空间失败 -> item_id=\", itemId, err)\n\t\to.Rollback()\n\t}\n\n\treturn o.Commit()\n}\n\nfunc (item *Itemsets) Include() (*Itemsets, error) {\n\n\titem.CreateTimeString = item.CreateTime.Format(\"2006-01-02 15:04:05\")\n\n\tif item.MemberId > 0 {\n\t\tif m, err := NewMember().Find(item.MemberId, \"account\", \"real_name\"); err == nil {\n\t\t\tif m.RealName != \"\" {\n\t\t\t\titem.CreateName = m.RealName\n\t\t\t} else {\n\t\t\t\titem.CreateName = m.Account\n\t\t\t}\n\t\t}\n\t}\n\n\ti, err := NewBook().QueryTable().Filter(\"item_id\", item.ItemId).Count()\n\tif err != nil && err != orm.ErrNoRows {\n\t\treturn item, err\n\t}\n\titem.BookNumber = int(i)\n\n\treturn item, nil\n}\n\n//分页查询.\nfunc (item *Itemsets) FindToPager(pageIndex, pageSize int) (list []*Itemsets, totalCount int, err error) {\n\n\toffset := (pageIndex - 1) * pageSize\n\n\t_, err = item.QueryTable().OrderBy(\"-item_id\").Offset(offset).Limit(pageSize).All(&list)\n\n\tif err != nil {\n\t\treturn\n\t}\n\n\tc, err := item.QueryTable().Count()\n\tif err != nil {\n\t\treturn\n\t}\n\ttotalCount = int(c)\n\n\tfor _, item := range list {\n\t\titem.Include()\n\t}\n\treturn\n}\n\n//根据项目空间名称查询.\nfunc (item *Itemsets) FindItemsetsByName(name string, limit int) (*SelectMemberResult, error) {\n\tresult := SelectMemberResult{}\n\n\tvar itemsets []*Itemsets\n\tvar err error\n\tif name == \"\" {\n\t\t_, err = item.QueryTable().Limit(limit).All(&itemsets)\n\n\t} else {\n\t\t_, err = item.QueryTable().Filter(\"item_name__icontains\", name).Limit(limit).All(&itemsets)\n\t}\n\tif err != nil {\n\t\tlogs.Error(\"查询项目空间失败 ->\", err)\n\t\treturn &result, err\n\t}\n\n\titems := make([]KeyValueItem, 0)\n\n\tfor _, m := range itemsets {\n\t\titem := KeyValueItem{}\n\t\titem.Id = m.ItemId\n\t\titem.Text = m.ItemName\n\t\titems = append(items, item)\n\t}\n\tresult.Result = items\n\n\treturn &result, err\n}\n\n//根据项目空间标识查询项目空间的项目列表.\nfunc (item *Itemsets) FindItemsetsByItemKey(key string, pageIndex, pageSize, memberId int) (books []*BookResult, totalCount int, err error) {\n\to := orm.NewOrm()\n\n\terr = item.QueryTable().Filter(\"item_key\", key).One(item)\n\n\tif err != nil {\n\t\tlogs.Error(\"查询项目空间时出错 ->\", key, err)\n\t\treturn nil, 0, err\n\t}\n\toffset := (pageIndex - 1) * pageSize\n\t//如果是登录用户\n\tif memberId > 0 {\n\t\tsql1 := `SELECT COUNT(*)\nFROM md_books AS book\n  LEFT JOIN md_relationship AS rel ON rel.book_id = book.book_id AND rel.member_id = ?\n  left join (select book_id,min(role_id) as role_id\n             from (select book_id,role_id\n                   from md_team_relationship as mtr\n                     left join md_team_member as mtm on mtm.team_id=mtr.team_id and mtm.member_id=? order by role_id desc )\nas t group by book_id) as team on team.book_id = book.book_id\nWHERE book.item_id = ? AND (book.privately_owned = 0 or rel.role_id >= 0 or team.role_id >= 0)`\n\n\t\terr = o.Raw(sql1, memberId, memberId, item.ItemId).QueryRow(&totalCount)\n\t\tif err != nil {\n\t\t\tlogs.Error(\"查询项目空间时出错 ->\", key, err)\n\t\t\treturn\n\t\t}\n\t\tsql2 := `SELECT book.*,rel1.*,mdmb.account AS create_name FROM md_books AS book\n\t\t\tLEFT JOIN md_relationship AS rel ON rel.book_id = book.book_id AND rel.member_id = ?\n\t\t\tleft join (select book_id,min(role_id) as role_id from (select book_id,role_id\n                   \tfrom md_team_relationship as mtr\n\t\t\t\t\tleft join md_team_member as mtm on mtm.team_id=mtr.team_id and mtm.member_id=? order by role_id desc )\nas t group by book_id) as team \n\t\t\t\t\ton team.book_id = book.book_id\n\t\t\tLEFT JOIN md_relationship AS rel1 ON rel1.book_id = book.book_id AND rel1.role_id = 0\n\t\t\tLEFT JOIN md_members AS mdmb ON rel1.member_id = mdmb.member_id\n\t\t\tWHERE book.item_id = ? AND (book.privately_owned = 0 or rel.role_id >= 0 or team.role_id >= 0) \n\t\t\tORDER BY order_index desc,book.book_id DESC limit ? offset ?`\n\n\t\t_, err = o.Raw(sql2, memberId, memberId, item.ItemId, pageSize, offset).QueryRows(&books)\n\n\t\treturn\n\n\t} else {\n\t\tcount, err1 := o.QueryTable(NewBook().TableNameWithPrefix()).Filter(\"privately_owned\", 0).Filter(\"item_id\", item.ItemId).Count()\n\n\t\tif err1 != nil {\n\t\t\terr = err1\n\t\t\treturn\n\t\t}\n\t\ttotalCount = int(count)\n\n\t\tsql := `SELECT book.*,rel.*,mdmb.account AS create_name FROM md_books AS book\n\t\t\tLEFT JOIN md_relationship AS rel ON rel.book_id = book.book_id AND rel.role_id = 0\n\t\t\tLEFT JOIN md_members AS mdmb ON rel.member_id = mdmb.member_id\n\t\t\tWHERE book.item_id = ? AND book.privately_owned = 0 ORDER BY order_index desc,book.book_id DESC limit ? offset ?`\n\n\t\t_, err = o.Raw(sql, item.ItemId, pageSize, offset).QueryRows(&books)\n\n\t\treturn\n\n\t}\n}\n"
  },
  {
    "path": "models/LabelModel.go",
    "content": "package models\n\nimport (\n\t\"strings\"\n\n\t\"github.com/beego/beego/v2/client/orm\"\n\t\"github.com/beego/beego/v2/core/logs\"\n\t\"github.com/mindoc-org/mindoc/conf\"\n)\n\ntype Label struct {\n\tLabelId    int    `orm:\"column(label_id);pk;auto;unique;description(项目标签id)\" json:\"label_id\"`\n\tLabelName  string `orm:\"column(label_name);size(50);unique;description(项目标签名称)\" json:\"label_name\"`\n\tBookNumber int    `orm:\"column(book_number);description(包涵项目数量)\" json:\"book_number\"`\n}\n\n// TableName 获取对应数据库表名.\nfunc (m *Label) TableName() string {\n\treturn \"label\"\n}\n\n// TableEngine 获取数据使用的引擎.\nfunc (m *Label) TableEngine() string {\n\treturn \"INNODB\"\n}\n\nfunc (m *Label) TableNameWithPrefix() string {\n\treturn conf.GetDatabasePrefix() + m.TableName()\n}\n\nfunc NewLabel() *Label {\n\treturn &Label{}\n}\n\nfunc (m *Label) FindFirst(field string, value interface{}) (*Label, error) {\n\to := orm.NewOrm()\n\n\terr := o.QueryTable(m.TableNameWithPrefix()).Filter(field, value).One(m)\n\n\treturn m, err\n}\n\n//插入或更新标签.\nfunc (m *Label) InsertOrUpdate(labelName string) error {\n\to := orm.NewOrm()\n\n\terr := o.QueryTable(m.TableNameWithPrefix()).Filter(\"label_name\", labelName).One(m)\n\tif err != nil && err != orm.ErrNoRows {\n\t\treturn err\n\t}\n\tcount, _ := o.QueryTable(NewBook().TableNameWithPrefix()).Filter(\"label__icontains\", labelName).Count()\n\tm.BookNumber = int(count)\n\tm.LabelName = labelName\n\n\tif err == orm.ErrNoRows {\n\t\terr = nil\n\t\tm.LabelName = labelName\n\t\t_, err = o.Insert(m)\n\t} else {\n\t\t_, err = o.Update(m)\n\t}\n\treturn err\n}\n\n//批量插入或更新标签.\nfunc (m *Label) InsertOrUpdateMulti(labels string) {\n\tif labels != \"\" {\n\t\tlabelArray := strings.Split(labels, \",\")\n\n\t\tfor _, label := range labelArray {\n\t\t\tif label != \"\" {\n\t\t\t\tNewLabel().InsertOrUpdate(label)\n\t\t\t}\n\t\t}\n\t}\n}\n\n//删除标签\nfunc (m *Label) Delete() error {\n\to := orm.NewOrm()\n\t_, err := o.Raw(\"DELETE FROM \"+m.TableNameWithPrefix()+\" WHERE label_id= ?\", m.LabelId).Exec()\n\n\tif err != nil {\n\t\treturn err\n\t}\n\treturn nil\n}\n\n//分页查找标签.\nfunc (m *Label) FindToPager(pageIndex, pageSize int) (labels []*Label, totalCount int, err error) {\n\to := orm.NewOrm()\n\n\tcount, err := o.QueryTable(m.TableNameWithPrefix()).Count()\n\n\tif err != nil {\n\t\treturn\n\t}\n\ttotalCount = int(count)\n\n\toffset := (pageIndex - 1) * pageSize\n\n\t_, err = o.QueryTable(m.TableNameWithPrefix()).OrderBy(\"-book_number\").Offset(offset).Limit(pageSize).All(&labels)\n\n\tif err == orm.ErrNoRows {\n\t\tlogs.Info(\"没有查询到标签 ->\", err)\n\t\terr = nil\n\t\treturn\n\t}\n\treturn\n}\n"
  },
  {
    "path": "models/Logs.go",
    "content": "package models\n\nimport (\n\t\"errors\"\n\t\"sync/atomic\"\n\t\"time\"\n\n\t\"github.com/beego/beego/v2/client/orm\"\n\t\"github.com/mindoc-org/mindoc/conf\"\n)\n\nvar loggerQueue = &logQueue{channel: make(chan *Logger, 100), isRuning: 0}\n\ntype logQueue struct {\n\tchannel  chan *Logger\n\tisRuning int32\n}\n\n// Logger struct .\ntype Logger struct {\n\tLoggerId int64 `orm:\"pk;auto;unique;column(log_id)\" json:\"log_id\"`\n\tMemberId int   `orm:\"column(member_id);type(int)\" json:\"member_id\"`\n\t// 日志类别：operate 操作日志/ system 系统日志/ exception 异常日志 / document 文档操作日志\n\tCategory     string    `orm:\"column(category);size(255);default(operate)\" json:\"category\"`\n\tContent      string    `orm:\"column(content);type(text)\" json:\"content\"`\n\tOriginalData string    `orm:\"column(original_data);type(text)\" json:\"original_data\"`\n\tPresentData  string    `orm:\"column(present_data);type(text)\" json:\"present_data\"`\n\tCreateTime   time.Time `orm:\"type(datetime);column(create_time);auto_now_add\" json:\"create_time\"`\n\tUserAgent    string    `orm:\"column(user_agent);size(500)\" json:\"user_agent\"`\n\tIPAddress    string    `orm:\"column(ip_address);size(255)\" json:\"ip_address\"`\n}\n\n// TableName 获取对应数据库表名.\nfunc (m *Logger) TableName() string {\n\treturn \"logs\"\n}\n\n// TableEngine 获取数据使用的引擎.\nfunc (m *Logger) TableEngine() string {\n\treturn \"INNODB\"\n}\nfunc (m *Logger) TableNameWithPrefix() string {\n\treturn conf.GetDatabasePrefix() + m.TableName()\n}\n\nfunc NewLogger() *Logger {\n\treturn &Logger{}\n}\n\nfunc (m *Logger) Add() error {\n\tif m.MemberId <= 0 {\n\t\treturn errors.New(\"用户ID不能为空\")\n\t}\n\tif m.Category == \"\" {\n\t\tm.Category = \"system\"\n\t}\n\tif m.Content == \"\" {\n\t\treturn errors.New(\"日志内容不能为空\")\n\t}\n\tloggerQueue.channel <- m\n\tif atomic.LoadInt32(&(loggerQueue.isRuning)) <= 0 {\n\t\tatomic.AddInt32(&(loggerQueue.isRuning), 1)\n\t\tgo addLoggerAsync()\n\t}\n\treturn nil\n}\n\nfunc addLoggerAsync() {\n\tdefer atomic.AddInt32(&(loggerQueue.isRuning), -1)\n\to := orm.NewOrm()\n\n\tfor {\n\t\tlogger := <-loggerQueue.channel\n\n\t\to.Insert(logger)\n\t}\n}\n"
  },
  {
    "path": "models/Member.go",
    "content": "// Package models .\npackage models\n\nimport (\n\t\"crypto/md5\"\n\t\"crypto/tls\"\n\t\"encoding/hex\"\n\t\"encoding/json\"\n\t\"errors\"\n\t\"fmt\"\n\t\"io/ioutil\"\n\t\"net\"\n\t\"net/http\"\n\t\"net/url\"\n\t\"regexp\"\n\t\"strconv\"\n\t\"strings\"\n\t\"time\"\n\n\t\"github.com/go-ldap/ldap/v3\"\n\n\t\"math\"\n\n\t\"github.com/beego/beego/v2/client/orm\"\n\t\"github.com/beego/beego/v2/core/logs\"\n\t\"github.com/beego/beego/v2/server/web\"\n\t\"github.com/beego/i18n\"\n\t\"github.com/mindoc-org/mindoc/conf\"\n\t\"github.com/mindoc-org/mindoc/utils\"\n)\n\nvar LdapDefaultTimeout = 8 * time.Second\n\ntype Member struct {\n\tMemberId int    `orm:\"pk;auto;unique;column(member_id)\" json:\"member_id\"`\n\tAccount  string `orm:\"size(100);unique;column(account);description(登录名)\" json:\"account\"`\n\tRealName string `orm:\"size(255);column(real_name);description(真实姓名)\" json:\"real_name\"`\n\tPassword string `orm:\"size(1000);column(password);description(密码)\" json:\"-\"`\n\t//认证方式: local 本地数据库 /ldap LDAP\n\tAuthMethod  string `orm:\"column(auth_method);default(local);size(50);description(授权方式 local:本地校验 ldap：LDAP用户校验)\" json:\"auth_method\"`\n\tDescription string `orm:\"column(description);size(2000);description(描述)\" json:\"description\"`\n\tEmail       string `orm:\"size(100);column(email);unique;description(邮箱)\" json:\"email\"`\n\tPhone       string `orm:\"size(255);column(phone);null;default(null);description(手机)\" json:\"phone\"`\n\tAvatar      string `orm:\"size(1000);column(avatar);description(头像)\" json:\"avatar\"`\n\t//用户角色：0 超级管理员 /1 管理员/ 2 普通用户/ 3 只读用户 .\n\tRole          conf.SystemRole `orm:\"column(role);type(int);default(1);index;description(用户角色： 0：超级管理员 1：管理员 2：普通用户 3：只读用户)\" json:\"role\"`\n\tRoleName      string          `orm:\"-\" json:\"role_name\"`\n\tStatus        int             `orm:\"column(status);type(int);default(0);description(状态  0：启用 1：禁用)\" json:\"status\"` //用户状态：0 正常/1 禁用\n\tCreateTime    time.Time       `orm:\"type(datetime);column(create_time);auto_now_add;description(创建时间)\" json:\"create_time\"`\n\tCreateAt      int             `orm:\"type(int);column(create_at);description(创建人id)\" json:\"create_at\"`\n\tLastLoginTime time.Time       `orm:\"type(datetime);column(last_login_time);null;description(最后登录时间)\" json:\"last_login_time\"`\n\t//i18n\n\tLang string `orm:\"-\"`\n}\n\n// TableName 获取对应数据库表名.\nfunc (m *Member) TableName() string {\n\treturn \"members\"\n}\n\n// TableEngine 获取数据使用的引擎.\nfunc (m *Member) TableEngine() string {\n\treturn \"INNODB\"\n}\n\nfunc (m *Member) TableNameWithPrefix() string {\n\treturn conf.GetDatabasePrefix() + m.TableName()\n}\n\nfunc NewMember() *Member {\n\treturn &Member{}\n}\n\n// Login 用户登录.\nfunc (m *Member) Login(account string, password string) (*Member, error) {\n\to := orm.NewOrm()\n\n\tmember := &Member{}\n\n\t//err := o.QueryTable(m.TableNameWithPrefix()).Filter(\"account\", account).Filter(\"status\", 0).One(member)\n\terr := o.Raw(\"select * from md_members where (account = ? or email = ?) and status = 0 limit 1;\", account, account).QueryRow(member)\n\n\tif err != nil {\n\t\tif web.AppConfig.DefaultBool(\"ldap_enable\", false) {\n\t\t\tlogs.Info(\"转入LDAP登陆 ->\", account)\n\t\t\treturn member.ldapLogin(account, password)\n\t\t} else if url, err := web.AppConfig.String(\"http_login_url\"); url != \"\" {\n\t\t\tlogs.Info(\"转入 HTTP 接口登陆 ->\", account)\n\t\t\treturn member.httpLogin(account, password)\n\t\t} else {\n\t\t\tlogs.Error(\"user login for `%s`: %s\", account, err)\n\t\t\treturn member, ErrMemberNoExist\n\t\t}\n\t}\n\n\tswitch member.AuthMethod {\n\tcase \"local\":\n\t\tok, err := utils.PasswordVerify(member.Password, password)\n\t\tif ok && err == nil {\n\t\t\tm.ResolveRoleName()\n\t\t\treturn member, nil\n\t\t}\n\tcase \"ldap\":\n\t\treturn member.ldapLogin(account, password)\n\tcase \"http\":\n\t\treturn member.httpLogin(account, password)\n\tdefault:\n\t\treturn member, ErrMemberAuthMethodInvalid\n\t}\n\n\treturn member, ErrorMemberPasswordError\n}\n\n// TmpLogin 用于钉钉临时登录\n//func (m *Member) TmpLogin(account string) (*Member, error) {\n//\to := orm.NewOrm()\n//\tmember := &Member{}\n//\terr := o.Raw(\"select * from md_members where account = ? and status = 0 limit 1;\", account).QueryRow(member)\n//\tif err != nil {\n//\t\treturn member, ErrorMemberPasswordError\n//\t}\n//\treturn member, nil\n//}\n\n// ldapLogin 通过LDAP登陆\nfunc (m *Member) ldapLogin(account string, password string) (*Member, error) {\n\tif !web.AppConfig.DefaultBool(\"ldap_enable\", false) {\n\t\treturn m, ErrMemberAuthMethodInvalid\n\t}\n\tvar err error\n\tvar ldapOpt ldap.DialOpt\n\tldap_scheme := web.AppConfig.DefaultString(\"ldap_scheme\", \"ldap\")\n\tdialer := net.Dialer{Timeout: LdapDefaultTimeout}\n\tif ldap_scheme == \"ldaps\" {\n\t\tldapOpt = ldap.DialWithTLSDialer(&tls.Config{InsecureSkipVerify: true}, &dialer)\n\t} else {\n\t\tldapOpt = ldap.DialWithDialer(&dialer)\n\t}\n\tldap_host, _ := web.AppConfig.String(\"ldap_host\")\n\tldap_port := web.AppConfig.DefaultInt(\"ldap_port\", 3268)\n\tldap_url := fmt.Sprintf(\"%s://%s:%d\", ldap_scheme, ldap_host, ldap_port)\n\tlc, err := ldap.DialURL(ldap_url, ldapOpt)\n\tif err != nil {\n\t\tlogs.Error(\"绑定 LDAP 用户失败 ->\", err)\n\t\treturn m, ErrLDAPConnect\n\t}\n\tdefer lc.Close()\n\tldapuser, _ := web.AppConfig.String(\"ldap_user\")\n\tldappass, _ := web.AppConfig.String(\"ldap_password\")\n\terr = lc.Bind(ldapuser, ldappass)\n\tif err != nil {\n\t\tlogs.Error(\"绑定 LDAP 用户失败 ->\", err)\n\t\treturn m, ErrLDAPFirstBind\n\t}\n\tldapbase, _ := web.AppConfig.String(\"ldap_base\")\n\tldapfilter, _ := web.AppConfig.String(\"ldap_filter\")\n\tldapaccount, _ := web.AppConfig.String(\"ldap_account\")\n\tldapmail, _ := web.AppConfig.String(\"ldap_mail\")\n\t// 判断account是否是email\n\tisEmail := false\n\tvar email string\n\tldapattr := ldapaccount\n\tif ok, err := regexp.MatchString(conf.RegexpEmail, account); ok && err == nil {\n\t\tisEmail = true\n\t\temail = account\n\t\tldapattr = ldapmail\n\t}\n\tsearchRequest := ldap.NewSearchRequest(\n\t\tldapbase,\n\t\tldap.ScopeWholeSubtree, ldap.NeverDerefAliases, 0, 0, false,\n\t\t// 修改objectClass通过配置文件获取值\n\t\tfmt.Sprintf(\"(&(%s)(%s=%s))\", ldapfilter, ldapattr, account),\n\t\t[]string{\"dn\", \"mail\", \"cn\", \"ou\", \"sAMAccountName\"},\n\t\tnil,\n\t)\n\tsearchResult, err := lc.Search(searchRequest)\n\tif err != nil {\n\t\tlogs.Error(\"绑定 LDAP 用户失败 ->\", err)\n\t\treturn m, ErrLDAPSearch\n\t}\n\tif len(searchResult.Entries) != 1 {\n\t\treturn m, ErrLDAPUserNotFoundOrTooMany\n\t}\n\tuserdn := searchResult.Entries[0].DN\n\terr = lc.Bind(userdn, password)\n\tif err != nil {\n\t\tlogs.Error(\"绑定 LDAP 用户失败 ->\", err)\n\t\treturn m, ErrorMemberPasswordError\n\t}\n\n\tldap_cn := searchResult.Entries[0].GetAttributeValue(\"cn\")\n\tldap_mail := searchResult.Entries[0].GetAttributeValue(ldapmail)       // \"mail\"\n\tldap_account := searchResult.Entries[0].GetAttributeValue(ldapaccount) // \"sAMAccountName\"\n\n\tm.RealName = ldap_cn\n\tm.Account = ldap_account\n\tm.AuthMethod = \"ldap\"\n\t// 如果ldap配置了email\n\tif len(ldap_mail) > 0 && strings.Contains(ldap_mail, \"@\") {\n\t\t// 如果member已配置email\n\t\tif len(m.Email) > 0 {\n\t\t\t// 如果member配置的email和ldap配置的email不同\n\t\t\tif m.Email != ldap_mail {\n\t\t\t\treturn m, fmt.Errorf(\"ldap配置的email(%s)与数据库中已有email({%s})不同, 请联系管理员修改\", ldap_mail, m.Email)\n\t\t\t}\n\t\t} else {\n\t\t\t// 如果member未配置email，则用ldap的email配置\n\t\t\tm.Email = ldap_mail\n\t\t}\n\t} else {\n\t\t// 如果ldap未配置email，则直接绑定到member\n\t\tif isEmail {\n\t\t\tm.Email = email\n\t\t}\n\t}\n\tif m.MemberId <= 0 {\n\t\tm.Avatar = \"/static/images/headimgurl.jpg\"\n\t\tm.Role = conf.SystemRole(web.AppConfig.DefaultInt(\"ldap_user_role\", 2))\n\t\tm.CreateTime = time.Now()\n\n\t\terr = m.Add()\n\t\tif err != nil {\n\t\t\tlogs.Error(\"自动注册LDAP用户错误\", err)\n\t\t\treturn m, ErrorMemberPasswordError\n\t\t}\n\t\tm.ResolveRoleName()\n\t} else {\n\t\t// 更新ldap信息\n\t\terr = m.Update(\"account\", \"real_name\", \"email\", \"auth_method\")\n\t\tif err != nil {\n\t\t\tlogs.Error(\"LDAP更新用户信息失败\", err)\n\t\t\treturn m, errors.New(\"LDAP更新用户信息失败\")\n\t\t}\n\t\tm.ResolveRoleName()\n\t}\n\treturn m, nil\n}\n\nfunc (m *Member) httpLogin(account, password string) (*Member, error) {\n\turlStr, _ := web.AppConfig.String(\"http_login_url\")\n\tif urlStr == \"\" {\n\t\treturn nil, ErrMemberAuthMethodInvalid\n\t}\n\n\tval := url.Values{\n\t\t\"account\":  []string{account},\n\t\t\"password\": []string{password},\n\t\t\"time\":     []string{strconv.FormatInt(time.Now().Unix(), 10)},\n\t}\n\th := md5.New()\n\th.Write([]byte(val.Encode() + web.AppConfig.DefaultString(\"http_login_secret\", \"\")))\n\n\tval.Add(\"sn\", hex.EncodeToString(h.Sum(nil)))\n\n\tresp, err := http.PostForm(urlStr, val)\n\tif err != nil {\n\t\tlogs.Error(\"通过接口登录失败 -> \", urlStr, account, err)\n\t\treturn nil, ErrHTTPServerFail\n\t}\n\tdefer resp.Body.Close()\n\n\tbody, err := ioutil.ReadAll(resp.Body)\n\tif err != nil {\n\t\tlogs.Error(\"读取接口返回值失败 -> \", urlStr, account, err)\n\t\treturn nil, ErrHTTPServerFail\n\t}\n\tlogs.Info(\"HTTP 登录接口返回数据 ->\", string(body))\n\n\tvar result map[string]interface{}\n\n\tif err := json.Unmarshal(body, &result); err != nil {\n\t\tlogs.Error(\"解析接口返回值失败 -> \", urlStr, account, string(body))\n\t\treturn nil, ErrHTTPServerFail\n\t}\n\n\tif code, ok := result[\"errcode\"]; !ok || code.(float64) != 200 {\n\n\t\tif msg, ok := result[\"message\"]; ok {\n\t\t\treturn nil, errors.New(msg.(string))\n\t\t}\n\t\treturn nil, ErrHTTPServerFail\n\t}\n\tif m.MemberId <= 0 {\n\t\tmember := NewMember()\n\n\t\tif email, ok := result[\"email\"]; !ok || email == \"\" {\n\t\t\treturn nil, errors.New(\"接口返回的数据缺少邮箱字段\")\n\t\t} else {\n\t\t\tmember.Email = email.(string)\n\t\t}\n\n\t\tif avatar, ok := result[\"avater\"]; ok && avatar != \"\" {\n\t\t\tmember.Avatar = avatar.(string)\n\t\t} else {\n\t\t\tmember.Avatar = conf.URLForWithCdnImage(\"/static/images/headimgurl.jpg\")\n\t\t}\n\t\tif realName, ok := result[\"real_name\"]; ok && realName != \"\" {\n\t\t\tmember.RealName = realName.(string)\n\t\t}\n\t\tmember.Account = account\n\t\tmember.Password = password\n\t\tmember.AuthMethod = \"http\"\n\t\tmember.Role = conf.SystemRole(web.AppConfig.DefaultInt(\"ldap_user_role\", 2))\n\t\tmember.CreateTime = time.Now()\n\t\tif err := member.Add(); err != nil {\n\t\t\tlogs.Error(\"自动注册用户错误\", err)\n\t\t\treturn m, ErrorMemberPasswordError\n\t\t}\n\t\tmember.ResolveRoleName()\n\t\t*m = *member\n\t}\n\treturn m, nil\n}\n\n// Add 添加一个用户.\nfunc (m *Member) Add() error {\n\to := orm.NewOrm()\n\n\tif ok, err := regexp.MatchString(conf.RegexpAccount, m.Account); m.Account == \"\" || !ok || err != nil {\n\t\treturn errors.New(\"账号只能由英文字母数字组成，且在3-50个字符\")\n\t}\n\tif m.Email == \"\" {\n\t\treturn errors.New(\"邮箱不能为空\")\n\t}\n\tif ok, err := regexp.MatchString(conf.RegexpEmail, m.Email); !ok || err != nil || m.Email == \"\" {\n\t\treturn errors.New(\"邮箱格式不正确\")\n\t}\n\tif m.AuthMethod == \"local\" {\n\t\tif l := strings.Count(m.Password, \"\"); l < 6 || l >= 50 {\n\t\t\treturn errors.New(\"密码不能为空且必须在6-50个字符之间\")\n\t\t}\n\t}\n\tif c, err := o.QueryTable(m.TableNameWithPrefix()).Filter(\"email\", m.Email).Count(); err == nil && c > 0 {\n\t\treturn errors.New(\"邮箱已被使用\")\n\t}\n\n\thash, err := utils.PasswordHash(m.Password)\n\n\tif err != nil {\n\t\tlogs.Error(\"加密用户密码失败 =>\", err)\n\t\treturn errors.New(\"加密用户密码失败\")\n\t}\n\n\tm.Password = hash\n\tif m.AuthMethod == \"\" {\n\t\tm.AuthMethod = \"local\"\n\t}\n\t_, err = o.Insert(m)\n\n\tif err != nil {\n\t\tlogs.Error(\"保存用户数据到数据时失败 =>\", err)\n\t\treturn errors.New(\"保存用户失败\")\n\t}\n\tm.ResolveRoleName()\n\treturn nil\n}\n\n// Update 更新用户信息.\nfunc (m *Member) Update(cols ...string) error {\n\to := orm.NewOrm()\n\n\tif m.Email == \"\" {\n\t\treturn errors.New(\"邮箱不能为空\")\n\t}\n\tif c, err := o.QueryTable(m.TableNameWithPrefix()).Filter(\"email\", m.Email).Exclude(\"member_id\", m.MemberId).Count(); err == nil && c > 0 {\n\t\treturn errors.New(\"邮箱已被使用\")\n\t}\n\tif _, err := o.Update(m, cols...); err != nil {\n\t\tlogs.Error(\"保存用户信息失败=>\", err)\n\t\treturn errors.New(\"保存用户信息失败\")\n\t}\n\treturn nil\n}\n\nfunc (m *Member) Find(id int, cols ...string) (*Member, error) {\n\to := orm.NewOrm()\n\n\tif err := o.QueryTable(m.TableNameWithPrefix()).Filter(\"member_id\", id).One(m, cols...); err != nil {\n\t\treturn m, err\n\t}\n\tm.ResolveRoleName()\n\treturn m, nil\n}\n\nfunc (m *Member) ResolveRoleName() {\n\tif m.Role == conf.MemberSuperRole {\n\t\tm.RoleName = i18n.Tr(m.Lang, \"uc.super_admin\")\n\t} else if m.Role == conf.MemberAdminRole {\n\t\tm.RoleName = i18n.Tr(m.Lang, \"uc.admin\")\n\t} else if m.Role == conf.MemberGeneralRole {\n\t\tm.RoleName = i18n.Tr(m.Lang, \"uc.user\")\n\t} else if m.Role == conf.MemberReaderRole {\n\t\tm.RoleName = i18n.Tr(m.Lang, \"uc.read_usr\")\n\t}\n}\n\n// 根据账号查找用户.\nfunc (m *Member) FindByAccount(account string) (*Member, error) {\n\to := orm.NewOrm()\n\n\terr := o.QueryTable(m.TableNameWithPrefix()).Filter(\"account\", account).One(m)\n\n\tif err == nil {\n\t\tm.ResolveRoleName()\n\t}\n\treturn m, err\n}\n\n// 批量查询用户\nfunc (m *Member) FindByAccountList(accounts ...string) ([]*Member, error) {\n\to := orm.NewOrm()\n\n\tvar members []*Member\n\t_, err := o.QueryTable(m.TableNameWithPrefix()).Filter(\"account__in\", accounts).All(&members)\n\n\tif err == nil {\n\t\tfor _, item := range members {\n\t\t\titem.ResolveRoleName()\n\t\t}\n\t}\n\treturn members, err\n}\n\n// 分页查找用户.\nfunc (m *Member) FindToPager(pageIndex, pageSize int) ([]*Member, int, error) {\n\to := orm.NewOrm()\n\n\tvar members []*Member\n\n\toffset := (pageIndex - 1) * pageSize\n\n\ttotalCount, err := o.QueryTable(m.TableNameWithPrefix()).Count()\n\n\tif err != nil {\n\t\treturn members, 0, err\n\t}\n\n\t_, err = o.QueryTable(m.TableNameWithPrefix()).OrderBy(\"-member_id\").Offset(offset).Limit(pageSize).All(&members)\n\n\tif err != nil {\n\t\treturn members, 0, err\n\t}\n\n\tfor _, tm := range members {\n\t\ttm.Lang = m.Lang\n\t\ttm.ResolveRoleName()\n\t}\n\treturn members, int(totalCount), nil\n}\n\nfunc (m *Member) IsAdministrator() bool {\n\tif m == nil || m.MemberId <= 0 {\n\t\treturn false\n\t}\n\treturn m.Role == 0 || m.Role == 1\n}\n\n// 根据指定字段查找用户.\nfunc (m *Member) FindByFieldFirst(field string, value interface{}) (*Member, error) {\n\to := orm.NewOrm()\n\n\terr := o.QueryTable(m.TableNameWithPrefix()).Filter(field, value).OrderBy(\"-member_id\").One(m)\n\n\treturn m, err\n}\n\n// 校验用户.\nfunc (m *Member) Valid(is_hash_password bool) error {\n\n\t//邮箱不能为空\n\tif m.Email == \"\" {\n\t\treturn ErrMemberEmailEmpty\n\t}\n\t//用户描述必须小于500字\n\tif strings.Count(m.Description, \"\") > 500 {\n\t\treturn ErrMemberDescriptionTooLong\n\t}\n\tif m.Role != conf.MemberGeneralRole && m.Role != conf.MemberSuperRole && m.Role != conf.MemberAdminRole && m.Role != conf.MemberReaderRole {\n\t\treturn ErrMemberRoleError\n\t}\n\tif m.Status != 0 && m.Status != 1 {\n\t\tm.Status = 0\n\t}\n\t//邮箱格式校验\n\tif ok, err := regexp.MatchString(conf.RegexpEmail, m.Email); !ok || err != nil || m.Email == \"\" {\n\t\treturn ErrMemberEmailFormatError\n\t}\n\t//如果是未加密密码，需要校验密码格式\n\tif !is_hash_password {\n\t\tif l := strings.Count(m.Password, \"\"); m.Password == \"\" || l > 50 || l < 6 {\n\t\t\treturn ErrMemberPasswordFormatError\n\t\t}\n\t}\n\t//校验邮箱是否呗使用\n\tif member, err := NewMember().FindByFieldFirst(\"email\", m.Account); err == nil && member.MemberId > 0 {\n\t\tif m.MemberId > 0 && m.MemberId != member.MemberId {\n\t\t\treturn ErrMemberEmailExist\n\t\t}\n\t\tif m.MemberId <= 0 {\n\t\t\treturn ErrMemberEmailExist\n\t\t}\n\t}\n\n\tif m.MemberId > 0 {\n\t\t//校验用户是否存在\n\t\tif _, err := NewMember().Find(m.MemberId); err != nil {\n\t\t\treturn err\n\t\t}\n\t} else {\n\t\t//校验账号格式是否正确\n\t\tif ok, err := regexp.MatchString(conf.RegexpAccount, m.Account); m.Account == \"\" || !ok || err != nil {\n\t\t\treturn ErrMemberAccountFormatError\n\t\t}\n\t\t//校验账号是否被使用\n\t\tif member, err := NewMember().FindByAccount(m.Account); err == nil && member.MemberId > 0 {\n\t\t\treturn ErrMemberExist\n\t\t}\n\t}\n\n\treturn nil\n}\n\n// 删除一个用户.\nfunc (m *Member) Delete(oldId int, newId int) error {\n\tormer := orm.NewOrm()\n\n\to, err := ormer.Begin()\n\tif err != nil {\n\t\treturn err\n\t}\n\t_, err = o.Raw(\"DELETE FROM md_dingtalk_accounts WHERE member_id = ?\", oldId).Exec()\n\tif err != nil {\n\t\to.Rollback()\n\t\treturn err\n\t}\n\t_, err = o.Raw(\"DELETE FROM md_workweixin_accounts WHERE member_id = ?\", oldId).Exec()\n\tif err != nil {\n\t\to.Rollback()\n\t\treturn err\n\t}\n\n\t_, err = o.Raw(\"DELETE FROM md_members WHERE member_id = ?\", oldId).Exec()\n\tif err != nil {\n\t\to.Rollback()\n\t\treturn err\n\t}\n\t_, err = o.Raw(\"UPDATE md_attachment SET create_at = ? WHERE create_at = ?\", newId, oldId).Exec()\n\n\tif err != nil {\n\t\to.Rollback()\n\t\treturn err\n\t}\n\n\t_, err = o.Raw(\"UPDATE md_books SET member_id = ? WHERE member_id = ?\", newId, oldId).Exec()\n\tif err != nil {\n\t\to.Rollback()\n\t\treturn err\n\t}\n\t_, err = o.Raw(\"UPDATE md_document_history SET member_id=? WHERE member_id = ?\", newId, oldId).Exec()\n\tif err != nil {\n\t\to.Rollback()\n\t\treturn err\n\t}\n\t_, err = o.Raw(\"UPDATE md_document_history SET modify_at=? WHERE modify_at = ?\", newId, oldId).Exec()\n\tif err != nil {\n\t\to.Rollback()\n\t\treturn err\n\t}\n\t_, err = o.Raw(\"UPDATE md_documents SET member_id = ? WHERE member_id = ?;\", newId, oldId).Exec()\n\tif err != nil {\n\t\to.Rollback()\n\t\treturn err\n\t}\n\t_, err = o.Raw(\"UPDATE md_documents SET modify_at = ? WHERE modify_at = ?\", newId, oldId).Exec()\n\tif err != nil {\n\t\to.Rollback()\n\t\treturn err\n\t}\n\t_, err = o.Raw(\"UPDATE md_blogs SET member_id = ? WHERE member_id = ?;\", newId, oldId).Exec()\n\n\tif err != nil {\n\t\to.Rollback()\n\t\treturn err\n\t}\n\t_, err = o.Raw(\"UPDATE md_blogs SET modify_at = ? WHERE modify_at = ?\", newId, oldId).Exec()\n\tif err != nil {\n\t\to.Rollback()\n\t\treturn err\n\t}\n\n\t_, err = o.Raw(\"UPDATE md_templates SET modify_at = ? WHERE modify_at = ?\", newId, oldId).Exec()\n\tif err != nil {\n\t\to.Rollback()\n\t\treturn err\n\t}\n\n\t_, err = o.Raw(\"UPDATE md_templates SET member_id = ? WHERE member_id = ?\", newId, oldId).Exec()\n\tif err != nil {\n\t\to.Rollback()\n\t\treturn err\n\t}\n\t_, err = o.QueryTable(NewTeamMember()).Filter(\"member_id\", oldId).Delete()\n\n\tif err != nil {\n\t\to.Rollback()\n\t\treturn err\n\t}\n\n\t//_,err = o.Raw(\"UPDATE md_relationship SET member_id = ? WHERE member_id = ?\",newId,oldId).Exec()\n\t//if err != nil {\n\t//\n\t//\tif err != nil {\n\t//\t\to.Rollback()\n\t//\t\treturn err\n\t//\t}\n\t//}\n\tvar relationshipList []*Relationship\n\n\t_, err = o.QueryTable(NewRelationship().TableNameWithPrefix()).Filter(\"member_id\", oldId).Limit(math.MaxInt32).All(&relationshipList)\n\n\tif err == nil {\n\t\tfor _, relationship := range relationshipList {\n\t\t\t//如果存在创始人，则删除\n\t\t\tif relationship.RoleId == 0 {\n\t\t\t\trel := NewRelationship()\n\n\t\t\t\terr = o.QueryTable(relationship.TableNameWithPrefix()).Filter(\"book_id\", relationship.BookId).Filter(\"member_id\", newId).One(rel)\n\t\t\t\tif err == nil {\n\t\t\t\t\tif _, err := o.Delete(relationship); err != nil {\n\t\t\t\t\t\tlogs.Error(err)\n\t\t\t\t\t}\n\t\t\t\t\trelationship.RelationshipId = rel.RelationshipId\n\t\t\t\t}\n\t\t\t\trelationship.MemberId = newId\n\t\t\t\trelationship.RoleId = 0\n\t\t\t\tif _, err := o.Update(relationship); err != nil {\n\t\t\t\t\tlogs.Error(err)\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif _, err := o.Delete(relationship); err != nil {\n\t\t\t\t\tlogs.Error(err)\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tif err = o.Commit(); err != nil {\n\t\to.Rollback()\n\t\treturn err\n\t}\n\treturn nil\n}\n"
  },
  {
    "path": "models/MemberResult.go",
    "content": "package models\n\nimport (\n\t\"time\"\n\n\t\"github.com/beego/beego/v2/client/orm\"\n\t\"github.com/beego/i18n\"\n\t\"github.com/mindoc-org/mindoc/conf\"\n)\n\ntype MemberRelationshipResult struct {\n\tMemberId       int             `json:\"member_id\"`\n\tAccount        string          `json:\"account\"`\n\tRealName       string          `json:\"real_name\"`\n\tDescription    string          `json:\"description\"`\n\tEmail          string          `json:\"email\"`\n\tPhone          string          `json:\"phone\"`\n\tAvatar         string          `json:\"avatar\"`\n\tRole           conf.SystemRole `json:\"role\"`   //用户角色：0 管理员/ 1 普通用户\n\tStatus         int             `json:\"status\"` //用户状态：0 正常/1 禁用\n\tCreateTime     time.Time       `json:\"create_time\"`\n\tCreateAt       int             `json:\"create_at\"`\n\tRelationshipId int             `json:\"relationship_id\"`\n\tBookId         int             `json:\"book_id\"`\n\t// RoleId 角色：0 创始人(创始人不能被移除) / 1 管理员/2 编辑者/3 观察者\n\tRoleId   conf.BookRole `json:\"role_id\"`\n\tRoleName string        `json:\"role_name\"`\n}\n\ntype SelectMemberResult struct {\n\tResult []KeyValueItem `json:\"results\"`\n}\ntype KeyValueItem struct {\n\tId   int    `json:\"id\"`\n\tText string `json:\"text\"`\n}\n\nfunc NewMemberRelationshipResult() *MemberRelationshipResult {\n\treturn &MemberRelationshipResult{}\n}\n\nfunc (m *MemberRelationshipResult) FromMember(member *Member) *MemberRelationshipResult {\n\tm.MemberId = member.MemberId\n\tm.Account = member.Account\n\tm.Description = member.Description\n\tm.Email = member.Email\n\tm.Phone = member.Phone\n\tm.Avatar = member.Avatar\n\tm.Role = member.Role\n\tm.Status = member.Status\n\tm.CreateTime = member.CreateTime\n\tm.CreateAt = member.CreateAt\n\tm.RealName = member.RealName\n\n\treturn m\n}\n\nfunc (m *MemberRelationshipResult) ResolveRoleName(lang string) *MemberRelationshipResult {\n\tif m.RoleId == conf.BookAdmin {\n\t\tm.RoleName = i18n.Tr(lang, \"common.administrator\")\n\t} else if m.RoleId == conf.BookEditor {\n\t\tm.RoleName = i18n.Tr(lang, \"common.editor\")\n\t} else if m.RoleId == conf.BookObserver {\n\t\tm.RoleName = i18n.Tr(lang, \"common.observer\")\n\t}\n\treturn m\n}\n\n// 根据项目ID查询用户\nfunc (m *MemberRelationshipResult) FindForUsersByBookId(lang string, bookId, pageIndex, pageSize int) ([]*MemberRelationshipResult, int, error) {\n\to := orm.NewOrm()\n\n\tvar members []*MemberRelationshipResult\n\n\tsql1 := \"SELECT * FROM md_relationship AS rel LEFT JOIN md_members as mdmb ON rel.member_id = mdmb.member_id WHERE rel.book_id = ? ORDER BY rel.relationship_id DESC  limit ? offset ?\"\n\n\tsql2 := \"SELECT count(*) AS total_count FROM md_relationship AS rel LEFT JOIN md_members as mdmb ON rel.member_id = mdmb.member_id WHERE rel.book_id = ?\"\n\n\tvar total_count int\n\n\terr := o.Raw(sql2, bookId).QueryRow(&total_count)\n\n\tif err != nil {\n\t\treturn members, 0, err\n\t}\n\n\toffset := (pageIndex - 1) * pageSize\n\n\t_, err = o.Raw(sql1, bookId, pageSize, offset).QueryRows(&members)\n\n\tif err != nil {\n\t\treturn members, 0, err\n\t}\n\n\tfor _, item := range members {\n\t\titem.ResolveRoleName(lang)\n\t}\n\treturn members, total_count, nil\n}\n\n// 查询指定文档中不存在的用户列表\nfunc (m *MemberRelationshipResult) FindNotJoinUsersByAccount(bookId, limit int, account string) ([]*Member, error) {\n\to := orm.NewOrm()\n\n\tsql := \"SELECT m.* FROM md_members as m LEFT JOIN md_relationship as rel ON m.member_id=rel.member_id AND rel.book_id = ? WHERE rel.relationship_id IS NULL AND m.account LIKE ? LIMIT 0,?;\"\n\n\tvar members []*Member\n\n\t_, err := o.Raw(sql, bookId, account, limit).QueryRows(&members)\n\n\treturn members, err\n}\n\n// 根据姓名以及用户名模糊查询指定文档中不存在的用户列表\nfunc (m *MemberRelationshipResult) FindNotJoinUsersByAccountOrRealName(bookId, limit int, keyWord string) ([]*Member, error) {\n\to := orm.NewOrm()\n\n\tsql := \"SELECT m.* FROM md_members as m LEFT JOIN md_relationship as rel ON rel.member_id = m.member_id AND rel.book_id = ? WHERE rel.relationship_id IS NULL AND (m.real_name LIKE ? OR m.account LIKE ?) LIMIT ? OFFSET 0;\"\n\n\tvar members []*Member\n\n\t_, err := o.Raw(sql, bookId, keyWord, keyWord, limit).QueryRows(&members)\n\n\treturn members, err\n}\n"
  },
  {
    "path": "models/MemberToken.go",
    "content": "package models\n\nimport (\n\t\"time\"\n\n\t\"github.com/beego/beego/v2/client/orm\"\n\t\"github.com/mindoc-org/mindoc/conf\"\n)\n\ntype MemberToken struct {\n\tTokenId   int       `orm:\"column(token_id);pk;auto;unique\" json:\"token_id\"`\n\tMemberId  int       `orm:\"column(member_id);type(int)\" json:\"member_id\"`\n\tToken     string    `orm:\"column(token);size(150);index\" json:\"token\"`\n\tEmail     string    `orm:\"column(email);size(255)\" json:\"email\"`\n\tIsValid   bool      `orm:\"column(is_valid)\" json:\"is_valid\"`\n\tValidTime time.Time `orm:\"column(valid_time);null\" json:\"valid_time\"`\n\tSendTime  time.Time `orm:\"column(send_time);auto_now_add;type(datetime)\" json:\"send_time\"`\n}\n\n// TableName 获取对应数据库表名.\nfunc (m *MemberToken) TableName() string {\n\treturn \"member_token\"\n}\n\n// TableEngine 获取数据使用的引擎.\nfunc (m *MemberToken) TableEngine() string {\n\treturn \"INNODB\"\n}\n\nfunc (m *MemberToken) TableNameWithPrefix() string {\n\treturn conf.GetDatabasePrefix() + m.TableName()\n}\n\nfunc NewMemberToken() *MemberToken {\n\treturn &MemberToken{}\n}\n\nfunc (m *MemberToken) InsertOrUpdate() (*MemberToken, error) {\n\to := orm.NewOrm()\n\n\tif m.TokenId > 0 {\n\t\t_, err := o.Update(m)\n\t\treturn m, err\n\t}\n\t_, err := o.Insert(m)\n\n\treturn m, err\n}\n\nfunc (m *MemberToken) FindByFieldFirst(field string, value interface{}) (*MemberToken, error) {\n\to := orm.NewOrm()\n\n\terr := o.QueryTable(m.TableNameWithPrefix()).Filter(field, value).OrderBy(\"-token_id\").One(m)\n\n\treturn m, err\n}\n\nfunc (m *MemberToken) FindSendCount(mail string, start_time time.Time, end_time time.Time) (int, error) {\n\to := orm.NewOrm()\n\n\tc, err := o.QueryTable(m.TableNameWithPrefix()).Filter(\"send_time__gte\", start_time.Format(\"2006-01-02 15:04:05\")).Filter(\"send_time__lte\", end_time.Format(\"2006-01-02 15:04:05\")).Count()\n\n\tif err != nil {\n\t\treturn 0, err\n\t}\n\treturn int(c), nil\n}\n"
  },
  {
    "path": "models/Migrations.go",
    "content": "package models\n\nimport (\n\t\"time\"\n\n\t\"github.com/beego/beego/v2/client/orm\"\n\t\"github.com/mindoc-org/mindoc/conf\"\n)\n\ntype Migration struct {\n\tMigrationId int       `orm:\"column(migration_id);pk;auto;unique;\" json:\"migration_id\"`\n\tName        string    `orm:\"column(name);size(500)\" json:\"name\"`\n\tStatements  string    `orm:\"column(statements);type(text);null\" json:\"statements\"`\n\tStatus      string    `orm:\"column(status);default(update)\" json:\"status\"`\n\tCreateTime  time.Time `orm:\"column(create_time);type(datetime);auto_now_add\" json:\"create_time\"`\n\tVersion     int64     `orm:\"type(bigint);column(version);unique\" json:\"version\"`\n}\n\n// TableName 获取对应数据库表名.\nfunc (m *Migration) TableName() string {\n\treturn \"migrations\"\n}\n\n// TableEngine 获取数据使用的引擎.\nfunc (m *Migration) TableEngine() string {\n\treturn \"INNODB\"\n}\n\nfunc (m *Migration) TableNameWithPrefix() string {\n\treturn conf.GetDatabasePrefix() + m.TableName()\n}\n\nfunc NewMigration() *Migration {\n\treturn &Migration{}\n}\n\nfunc (m *Migration) FindFirst() (*Migration, error) {\n\to := orm.NewOrm()\n\n\terr := o.QueryTable(m.TableNameWithPrefix()).OrderBy(\"-migration_id\").One(m)\n\n\treturn m, err\n}\n"
  },
  {
    "path": "models/Options.go",
    "content": "package models\n\nimport (\n\t\"github.com/beego/beego/v2/client/orm\"\n\t\"github.com/mindoc-org/mindoc/conf\"\n)\n\n// Option struct .\ntype Option struct {\n\tOptionId    int    `orm:\"column(option_id);pk;auto;unique;\" json:\"option_id\"`\n\tOptionTitle string `orm:\"column(option_title);size(500)\" json:\"option_title\"`\n\tOptionName  string `orm:\"column(option_name);unique;size(80)\" json:\"option_name\"`\n\tOptionValue string `orm:\"column(option_value);type(text);null\" json:\"option_value\"`\n\tRemark      string `orm:\"column(remark);type(text);null\" json:\"remark\"`\n}\n\n// TableName 获取对应数据库表名.\nfunc (m *Option) TableName() string {\n\treturn \"options\"\n}\n\n// TableEngine 获取数据使用的引擎.\nfunc (m *Option) TableEngine() string {\n\treturn \"INNODB\"\n}\n\nfunc (m *Option) TableNameWithPrefix() string {\n\treturn conf.GetDatabasePrefix() + m.TableName()\n}\n\nfunc NewOption() *Option {\n\treturn &Option{}\n}\n\nfunc (p *Option) Find(id int) (*Option, error) {\n\to := orm.NewOrm()\n\n\tp.OptionId = id\n\n\tif err := o.Read(p); err != nil {\n\t\treturn p, err\n\t}\n\treturn p, nil\n}\n\nfunc (p *Option) FindByKey(key string) (*Option, error) {\n\to := orm.NewOrm()\n\n\tp.OptionName = key\n\tif err := o.Read(p); err != nil {\n\t\treturn p, err\n\t}\n\treturn p, nil\n}\n\nfunc GetOptionValue(key, def string) string {\n\n\tif option, err := NewOption().FindByKey(key); err == nil {\n\t\treturn option.OptionValue\n\t}\n\treturn def\n}\n\nfunc (p *Option) InsertOrUpdate() error {\n\n\to := orm.NewOrm()\n\n\tvar err error\n\n\tif p.OptionId > 0 || o.QueryTable(p.TableNameWithPrefix()).Filter(\"option_name\", p.OptionName).Exist() {\n\t\t_, err = o.Update(p)\n\t} else {\n\t\t_, err = o.Insert(p)\n\t}\n\treturn err\n}\n\nfunc (p *Option) InsertMulti(option ...Option) error {\n\n\to := orm.NewOrm()\n\n\t_, err := o.InsertMulti(len(option), option)\n\treturn err\n}\n\nfunc (p *Option) All() ([]*Option, error) {\n\to := orm.NewOrm()\n\tvar options []*Option\n\n\t_, err := o.QueryTable(p.TableNameWithPrefix()).All(&options)\n\n\tif err != nil {\n\t\treturn options, err\n\t}\n\treturn options, nil\n}\n\nfunc (m *Option) Init() error {\n\n\to := orm.NewOrm()\n\n\tif !o.QueryTable(m.TableNameWithPrefix()).Filter(\"option_name\", \"ENABLED_REGISTER\").Exist() {\n\t\toption := NewOption()\n\t\toption.OptionValue = \"false\"\n\t\toption.OptionName = \"ENABLED_REGISTER\"\n\t\toption.OptionTitle = \"是否启用注册\"\n\t\tif _, err := o.Insert(option); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\tif !o.QueryTable(m.TableNameWithPrefix()).Filter(\"option_name\", \"ENABLE_DOCUMENT_HISTORY\").Exist() {\n\t\toption := NewOption()\n\t\toption.OptionValue = \"true\"\n\t\toption.OptionName = \"ENABLE_DOCUMENT_HISTORY\"\n\t\toption.OptionTitle = \"是否启用文档历史\"\n\t\tif _, err := o.Insert(option); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\tif !o.QueryTable(m.TableNameWithPrefix()).Filter(\"option_name\", \"ENABLED_CAPTCHA\").Exist() {\n\t\toption := NewOption()\n\t\toption.OptionValue = \"true\"\n\t\toption.OptionName = \"ENABLED_CAPTCHA\"\n\t\toption.OptionTitle = \"是否启用验证码\"\n\t\tif _, err := o.Insert(option); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\tif !o.QueryTable(m.TableNameWithPrefix()).Filter(\"option_name\", \"ENABLE_ANONYMOUS\").Exist() {\n\t\toption := NewOption()\n\t\toption.OptionValue = \"false\"\n\t\toption.OptionName = \"ENABLE_ANONYMOUS\"\n\t\toption.OptionTitle = \"启用匿名访问\"\n\t\tif _, err := o.Insert(option); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\tif !o.QueryTable(m.TableNameWithPrefix()).Filter(\"option_name\", \"SITE_NAME\").Exist() {\n\t\toption := NewOption()\n\t\toption.OptionValue = \"MinDoc文档管理系统\"\n\t\toption.OptionName = \"SITE_NAME\"\n\t\toption.OptionTitle = \"站点名称\"\n\t\tif _, err := o.Insert(option); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\tif !o.QueryTable(m.TableNameWithPrefix()).Filter(\"option_name\", \"site_description\").Exist() {\n\t\toption := NewOption()\n\t\toption.OptionValue = \"MinDoc 是一款针对IT团队开发的简单好用的文档管理系统，可以用来储存日常接口文档，数据库字典，手册说明等文档。内置项目管理，用户管理，权限管理等功能，支持Markdown和富文本两种编辑器，能够满足大部分中小团队的文档管理需求。\"\n\t\toption.OptionName = \"site_description\"\n\t\toption.OptionTitle = \"站点描述\"\n\t\tif _, err := o.Insert(option); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\tif !o.QueryTable(m.TableNameWithPrefix()).Filter(\"option_name\", \"site_beian\").Exist() {\n\t\toption := NewOption()\n\t\toption.OptionValue = \"\"\n\t\toption.OptionName = \"site_beian\"\n\t\toption.OptionTitle = \"域名备案\"\n\t\tif _, err := o.Insert(option); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\tif !o.QueryTable(m.TableNameWithPrefix()).Filter(\"option_name\", \"language\").Exist() {\n\t\toption := NewOption()\n\t\toption.OptionValue = \"zh-cn\"\n\t\toption.OptionName = \"language\"\n\t\toption.OptionTitle = \"站点语言\"\n\t\tif _, err := o.Insert(option); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}\n\nfunc (m *Option) Update() error {\n\to := orm.NewOrm()\n\n\tif !o.QueryTable(m.TableNameWithPrefix()).Filter(\"option_name\", \"language\").Exist() {\n\t\toption := NewOption()\n\t\toption.OptionValue = \"zh-cn\"\n\t\toption.OptionName = \"language\"\n\t\toption.OptionTitle = \"站点语言\"\n\t\tif _, err := o.Insert(option); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\treturn nil\n}\n"
  },
  {
    "path": "models/Relationship.go",
    "content": "package models\n\nimport (\n\t\"errors\"\n\n\t\"github.com/beego/beego/v2/client/orm\"\n\t\"github.com/beego/beego/v2/core/logs\"\n\t\"github.com/mindoc-org/mindoc/conf\"\n)\n\ntype Relationship struct {\n\tRelationshipId int `orm:\"pk;auto;unique;column(relationship_id)\" json:\"relationship_id\"`\n\tMemberId       int `orm:\"column(member_id);type(int);description(作者id)\" json:\"member_id\"`\n\tBookId         int `orm:\"column(book_id);type(int);description(所属项目id)\" json:\"book_id\"`\n\t// RoleId 角色：0 创始人(创始人不能被移除) / 1 管理员/2 编辑者/3 观察者\n\tRoleId conf.BookRole `orm:\"column(role_id);type(int);description(角色-配置文件里写死：0 创始人-不能被移除 / 1 管理员/2 编辑者/3 观察者)\" json:\"role_id\"`\n}\n\n// TableName 获取对应数据库表名. 用户和项目的关联表\nfunc (m *Relationship) TableName() string {\n\treturn \"relationship\"\n}\nfunc (m *Relationship) TableNameWithPrefix() string {\n\treturn conf.GetDatabasePrefix() + m.TableName()\n}\n\n// TableEngine 获取数据使用的引擎.\nfunc (m *Relationship) TableEngine() string {\n\treturn \"INNODB\"\n}\n\n// 联合唯一键\nfunc (m *Relationship) TableUnique() [][]string {\n\treturn [][]string{\n\t\t{\"member_id\", \"book_id\"},\n\t}\n}\n\nfunc (m *Relationship) QueryTable() orm.QuerySeter {\n\treturn orm.NewOrm().QueryTable(m.TableNameWithPrefix())\n}\nfunc NewRelationship() *Relationship {\n\treturn &Relationship{}\n}\n\nfunc (m *Relationship) Find(id int) (*Relationship, error) {\n\to := orm.NewOrm()\n\n\terr := o.QueryTable(m.TableNameWithPrefix()).Filter(\"relationship_id\", id).One(m)\n\treturn m, err\n}\n\n//查询指定项目的创始人.\nfunc (m *Relationship) FindFounder(book_id int) (*Relationship, error) {\n\to := orm.NewOrm()\n\n\terr := o.QueryTable(m.TableNameWithPrefix()).Filter(\"book_id\", book_id).Filter(\"role_id\", 0).One(m)\n\n\treturn m, err\n}\n\nfunc (m *Relationship) UpdateRoleId(bookId, memberId int, roleId conf.BookRole) (*Relationship, error) {\n\to := orm.NewOrm()\n\tbook := NewBook()\n\tbook.BookId = bookId\n\n\tif err := o.Read(book); err != nil {\n\t\tlogs.Error(\"UpdateRoleId => \", err)\n\t\treturn m, errors.New(\"项目不存在\")\n\t}\n\terr := o.QueryTable(m.TableNameWithPrefix()).Filter(\"member_id\", memberId).Filter(\"book_id\", bookId).One(m)\n\n\tif err == orm.ErrNoRows {\n\t\tm = NewRelationship()\n\t\tm.BookId = bookId\n\t\tm.MemberId = memberId\n\t\tm.RoleId = roleId\n\t} else if err != nil {\n\t\treturn m, err\n\t} else if m.RoleId == conf.BookFounder {\n\t\treturn m, errors.New(\"不能变更创始人的权限\")\n\t}\n\tm.RoleId = roleId\n\n\tif m.RelationshipId > 0 {\n\t\t_, err = o.Update(m)\n\t} else {\n\t\t_, err = o.Insert(m)\n\t}\n\n\treturn m, err\n\n}\n\nfunc (m *Relationship) FindForRoleId(bookId, memberId int) (conf.BookRole, error) {\n\to := orm.NewOrm()\n\n\trelationship := NewRelationship()\n\n\terr := o.QueryTable(m.TableNameWithPrefix()).Filter(\"book_id\", bookId).Filter(\"member_id\", memberId).One(relationship)\n\n\tif err != nil {\n\t\treturn conf.BookRoleNoSpecific, err\n\t}\n\treturn relationship.RoleId, nil\n}\n\nfunc (m *Relationship) FindByBookIdAndMemberId(book_id, member_id int) (*Relationship, error) {\n\to := orm.NewOrm()\n\n\terr := o.QueryTable(m.TableNameWithPrefix()).Filter(\"book_id\", book_id).Filter(\"member_id\", member_id).One(m)\n\n\treturn m, err\n}\n\nfunc (m *Relationship) Insert() error {\n\to := orm.NewOrm()\n\n\t_, err := o.Insert(m)\n\n\treturn err\n}\n\nfunc (m *Relationship) Update(txOrm orm.TxOrmer) error {\n\t_, err := txOrm.Update(m)\n\tif err != nil {\n\t\ttxOrm.Rollback()\n\t}\n\treturn err\n}\n\nfunc (m *Relationship) DeleteByBookIdAndMemberId(book_id, member_id int) error {\n\to := orm.NewOrm()\n\n\terr := o.QueryTable(m.TableNameWithPrefix()).Filter(\"book_id\", book_id).Filter(\"member_id\", member_id).One(m)\n\n\tif err == orm.ErrNoRows {\n\t\treturn errors.New(\"用户未参与该项目\")\n\t}\n\tif m.RoleId == conf.BookFounder {\n\t\treturn errors.New(\"不能删除创始人\")\n\t}\n\t_, err = o.Delete(m)\n\n\tif err != nil {\n\t\tlogs.Error(\"删除项目参与者 => \", err)\n\t\treturn errors.New(\"删除失败\")\n\t}\n\treturn nil\n\n}\n\nfunc (m *Relationship) Transfer(book_id, founder_id, receive_id int) error {\n\tormer := orm.NewOrm()\n\n\tfounder := NewRelationship()\n\n\terr := ormer.QueryTable(m.TableNameWithPrefix()).Filter(\"book_id\", book_id).Filter(\"member_id\", founder_id).One(founder)\n\n\tif err != nil {\n\t\treturn err\n\t}\n\tif founder.RoleId != conf.BookFounder {\n\t\treturn errors.New(\"转让者不是创始人\")\n\t}\n\treceive := NewRelationship()\n\n\terr = ormer.QueryTable(m.TableNameWithPrefix()).Filter(\"book_id\", book_id).Filter(\"member_id\", receive_id).One(receive)\n\n\tif err != orm.ErrNoRows && err != nil {\n\t\treturn err\n\t}\n\to, _ := ormer.Begin()\n\n\tfounder.RoleId = conf.BookAdmin\n\n\treceive.MemberId = receive_id\n\treceive.RoleId = conf.BookFounder\n\treceive.BookId = book_id\n\n\tif err := founder.Update(o); err != nil {\n\t\treturn err\n\t}\n\tif receive.RelationshipId > 0 {\n\t\tif _, err := o.Update(receive); err != nil {\n\t\t\to.Rollback()\n\t\t\treturn err\n\t\t}\n\t} else {\n\t\tif _, err := o.Insert(receive); err != nil {\n\t\t\to.Rollback()\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn o.Commit()\n}\n"
  },
  {
    "path": "models/Team.go",
    "content": "package models\n\nimport (\n\t\"errors\"\n\t\"time\"\n\n\t\"github.com/beego/beego/v2/client/orm\"\n\t\"github.com/beego/beego/v2/core/logs\"\n\t\"github.com/mindoc-org/mindoc/conf\"\n)\n\n//团队.\ntype Team struct {\n\tTeamId      int       `orm:\"column(team_id);pk;auto;unique;\" json:\"team_id\"`\n  TeamName    string    `orm:\"column(team_name);size(255);description(团队名称)\" json:\"team_name\"`\n  MemberId    int       `orm:\"column(member_id);type(int);description(创建人id)\" json:\"member_id\"`\n  IsDelete    bool      `orm:\"column(is_delete);default(false);description(是否删除 false：否 true：是)\" json:\"is_delete\"`\n  CreateTime  time.Time `orm:\"column(create_time);type(datetime);auto_now_add;description(创建时间)\" json:\"create_time\"`\n\tMemberCount int       `orm:\"-\" json:\"member_count\"`\n\tBookCount   int       `orm:\"-\" json:\"book_count\"`\n\tMemberName  string    `orm:\"-\" json:\"member_name\"`\n}\n\n// TableName 获取对应数据库表名.\nfunc (t *Team) TableName() string {\n\treturn \"teams\"\n}\n\n// TableEngine 获取数据使用的引擎.\nfunc (t *Team) TableEngine() string {\n\treturn \"INNODB\"\n}\n\nfunc (t *Team) TableNameWithPrefix() string {\n\treturn conf.GetDatabasePrefix() + t.TableName()\n}\n\nfunc NewTeam() *Team {\n\treturn &Team{}\n}\n\n// 查询一个团队.\nfunc (t *Team) First(id int, cols ...string) (*Team, error) {\n\tif id <= 0 {\n\t\treturn nil, orm.ErrNoRows\n\t}\n\to := orm.NewOrm()\n\terr := o.QueryTable(t.TableNameWithPrefix()).Filter(\"team_id\", id).One(t, cols...)\n\n\tif err != nil {\n\t\tlogs.Error(\"查询团队失败 ->\", id, err)\n\t\treturn nil, err\n\t}\n\tt.Include()\n\treturn t, err\n}\n\nfunc (t *Team) Delete(id int) (err error) {\n\tif id <= 0 {\n\t\treturn ErrInvalidParameter\n\t}\n\tormer := orm.NewOrm()\n\n\to, err := ormer.Begin()\n\n\tif err != nil {\n\t\tlogs.Error(\"开启事物时出错 ->\", err)\n\t\treturn\n\t}\n\t_, err = o.QueryTable(t.TableNameWithPrefix()).Filter(\"team_id\", id).Delete()\n\n\tif err != nil {\n\t\tlogs.Error(\"删除团队时出错 ->\", err)\n\t\to.Rollback()\n\t\treturn\n\t}\n\n\t_, err = o.Raw(\"delete from md_team_member where team_id=?;\", id).Exec()\n\n\tif err != nil {\n\t\tlogs.Error(\"删除团队成员时出错 ->\", err)\n\t\to.Rollback()\n\t\treturn\n\t}\n\n\t_, err = o.Raw(\"delete from md_team_relationship where team_id=?;\", id).Exec()\n\n\tif err != nil {\n\t\tlogs.Error(\"删除团队项目时出错 ->\", err)\n\t\to.Rollback()\n\t\treturn err\n\t}\n\n\terr = o.Commit()\n\treturn\n}\n\n//分页查询团队.\nfunc (t *Team) FindToPager(pageIndex, pageSize int) (list []*Team, totalCount int, err error) {\n\to := orm.NewOrm()\n\n\toffset := (pageIndex - 1) * pageSize\n\n\t_, err = o.QueryTable(t.TableNameWithPrefix()).OrderBy(\"-team_id\").Offset(offset).Limit(pageSize).All(&list)\n\n\tif err != nil {\n\t\treturn\n\t}\n\n\tc, err := o.QueryTable(t.TableNameWithPrefix()).Count()\n\tif err != nil {\n\t\treturn\n\t}\n\ttotalCount = int(c)\n\n\tfor _, item := range list {\n\t\titem.Include()\n\t}\n\treturn\n}\n\nfunc (t *Team) Include() {\n\n\to := orm.NewOrm()\n\n\tif member, err := NewMember().Find(t.MemberId, \"account\", \"real_name\"); err == nil {\n\t\tif member.RealName != \"\" {\n\t\t\tt.MemberName = member.RealName\n\t\t} else {\n\t\t\tt.MemberName = member.Account\n\t\t}\n\t}\n\tif c, err := o.QueryTable(NewTeamRelationship().TableNameWithPrefix()).Filter(\"team_id\", t.TeamId).Count(); err == nil {\n\t\tt.BookCount = int(c)\n\t}\n\tif c, err := o.QueryTable(NewTeamMember().TableNameWithPrefix()).Filter(\"team_id\", t.TeamId).Count(); err == nil {\n\t\tt.MemberCount = int(c)\n\t}\n}\n\n//更新或添加一个团队.\nfunc (t *Team) Save(cols ...string) (err error) {\n\tif t.TeamName == \"\" {\n\t\treturn NewError(5001, \"团队名称不能为空\")\n\t}\n\n\to := orm.NewOrm()\n\n\tif t.TeamId <= 0 && o.QueryTable(t.TableNameWithPrefix()).Filter(\"team_name\", t.TeamName).Exist() {\n\t\treturn errors.New(\"团队名称已存在\")\n\t}\n\tif t.TeamId <= 0 {\n\t\t_, err = o.Insert(t)\n\t} else {\n\t\t_, err = o.Update(t, cols...)\n\t}\n\tif err != nil {\n\t\tlogs.Error(\"在保存团队时出错 ->\", err)\n\t}\n\treturn\n}\n"
  },
  {
    "path": "models/TeamMember.go",
    "content": "package models\n\nimport (\n\t\"errors\"\n\n\t\"github.com/beego/beego/v2/client/orm\"\n\t\"github.com/beego/beego/v2/core/logs\"\n\t\"github.com/beego/i18n\"\n\t\"github.com/mindoc-org/mindoc/conf\"\n)\n\ntype TeamMember struct {\n\tTeamMemberId int `orm:\"column(team_member_id);pk;auto;unique;\" json:\"team_member_id\"`\n\tTeamId       int `orm:\"column(team_id);type(int);description(团队id)\" json:\"team_id\"`\n\tMemberId     int `orm:\"column(member_id);type(int);description(成员id)\" json:\"member_id\"`\n\t// RoleId 角色：0 创始人(创始人不能被移除) / 1 管理员/2 编辑者/3 观察者\n\tRoleId   conf.BookRole `orm:\"column(role_id);type(int);description(RoleId 角色：0 创始人-创始人不能被移除 / 1 管理员/2 编辑者/3 观察者)\" json:\"role_id\"`\n\tRoleName string        `orm:\"-\" json:\"role_name\"`\n\tAccount  string        `orm:\"-\" json:\"account\"`\n\tRealName string        `orm:\"-\" json:\"real_name\"`\n\tAvatar   string        `orm:\"-\" json:\"avatar\"`\n\tLang     string        `orm:\"-\"`\n}\n\n// TableName 获取对应数据库表名.\nfunc (m *TeamMember) TableName() string {\n\treturn \"team_member\"\n}\nfunc (m *TeamMember) TableNameWithPrefix() string {\n\treturn conf.GetDatabasePrefix() + m.TableName()\n}\n\n// TableEngine 获取数据使用的引擎.\nfunc (m *TeamMember) TableEngine() string {\n\treturn \"INNODB\"\n}\n\n// 联合唯一键\nfunc (m *TeamMember) TableUnique() [][]string {\n\treturn [][]string{{\"team_id\", \"member_id\"}}\n}\n\nfunc (m *TeamMember) QueryTable() orm.QuerySeter {\n\treturn orm.NewOrm().QueryTable(m.TableNameWithPrefix())\n}\n\nfunc NewTeamMember() *TeamMember {\n\treturn &TeamMember{}\n}\n\nfunc (m *TeamMember) SetLang(lang string) *TeamMember {\n\tm.Lang = lang\n\treturn m\n}\n\nfunc (m *TeamMember) First(id int, cols ...string) (*TeamMember, error) {\n\tif id <= 0 {\n\t\treturn nil, errors.New(\"参数错误\")\n\t}\n\to := orm.NewOrm()\n\n\terr := o.QueryTable(m.TableNameWithPrefix()).Filter(\"team_member_id\", id).One(m, cols...)\n\n\tif err != nil && err != orm.ErrNoRows {\n\t\tlogs.Error(\"查询团队成员错误 ->\", err)\n\t}\n\n\treturn m.Include(), err\n}\n\nfunc (m *TeamMember) ChangeRoleId(teamId int, memberId int, roleId conf.BookRole) (member *TeamMember, err error) {\n\n\tif teamId <= 0 || memberId <= 0 || roleId <= 0 || roleId > conf.BookObserver {\n\t\treturn nil, ErrInvalidParameter\n\t}\n\to := orm.NewOrm()\n\n\terr = o.QueryTable(m.TableNameWithPrefix()).Filter(\"team_id\", teamId).Filter(\"member_id\", memberId).OrderBy(\"-team_member_id\").One(m)\n\n\tif err != nil {\n\t\tlogs.Error(\"查询团队用户时失败 ->\", err)\n\t\treturn m, err\n\t}\n\tm.RoleId = roleId\n\n\terr = m.Save(\"role_id\")\n\n\tif err == nil {\n\t\tm.Include()\n\t}\n\treturn m, err\n}\n\n//查询团队中指定的用户.\nfunc (m *TeamMember) FindFirst(teamId, memberId int) (*TeamMember, error) {\n\tif teamId <= 0 || memberId <= 0 {\n\t\treturn nil, ErrInvalidParameter\n\t}\n\to := orm.NewOrm()\n\terr := o.QueryTable(m.TableNameWithPrefix()).Filter(\"team_id\", teamId).Filter(\"member_id\", memberId).One(m)\n\n\tif err != nil {\n\t\tlogs.Error(\"查询团队用户失败 ->\", err)\n\t\treturn nil, err\n\t}\n\treturn m.Include(), nil\n}\n\n//更新或插入团队用户.\nfunc (m *TeamMember) Save(cols ...string) (err error) {\n\n\tif m.TeamId <= 0 {\n\t\treturn errors.New(\"团队不能为空\")\n\t}\n\tif m.MemberId <= 0 {\n\t\treturn errors.New(\"用户不能为空\")\n\t}\n\n\to := orm.NewOrm()\n\n\tif !o.QueryTable(NewTeam().TableNameWithPrefix()).Filter(\"team_id\", m.TeamId).Exist() {\n\t\treturn errors.New(\"团队不存在\")\n\t}\n\tif !o.QueryTable(NewMember()).Filter(\"member_id\", m.MemberId).Filter(\"status\", 0).Exist() {\n\t\treturn errors.New(\"用户不存在或已禁用\")\n\t}\n\n\tif m.TeamMemberId <= 0 {\n\t\tif o.QueryTable(m.TableNameWithPrefix()).Filter(\"team_id\", m.TeamId).Filter(\"member_id\", m.MemberId).Exist() {\n\t\t\treturn errors.New(\"团队中已存在该用户\")\n\t\t}\n\t\t_, err = o.Insert(m)\n\t} else {\n\t\t_, err = o.Update(m, cols...)\n\t}\n\tif err != nil {\n\t\tlogs.Error(\"在保存团队时出错 ->\", err)\n\t}\n\treturn\n}\n\n//删除一个团队用户.\nfunc (m *TeamMember) Delete(id int) (err error) {\n\n\tif id <= 0 {\n\t\treturn ErrInvalidParameter\n\t}\n\t_, err = orm.NewOrm().QueryTable(m.TableNameWithPrefix()).Filter(\"team_member_id\", id).Delete()\n\n\tif err != nil {\n\t\tlogs.Error(\"删除团队用户时出错 ->\", err)\n\t}\n\treturn\n}\n\n//分页查询团队用户.\nfunc (m *TeamMember) FindToPager(teamId, pageIndex, pageSize int) (list []*TeamMember, totalCount int, err error) {\n\tif teamId <= 0 {\n\t\terr = ErrInvalidParameter\n\t\treturn\n\t}\n\toffset := (pageIndex - 1) * pageSize\n\n\to := orm.NewOrm()\n\n\t_, err = o.QueryTable(m.TableNameWithPrefix()).Filter(\"team_id\", teamId).Offset(offset).Limit(pageSize).All(&list)\n\n\tif err != nil {\n\t\tif err != orm.ErrNoRows {\n\t\t\tlogs.Error(\"查询团队成员失败 ->\", err)\n\t\t}\n\t\treturn\n\t}\n\tc, err := o.QueryTable(m.TableNameWithPrefix()).Filter(\"team_id\", teamId).Count()\n\n\tif err != nil {\n\t\treturn\n\t}\n\ttotalCount = int(c)\n\n\t//将来优化\n\tfor _, item := range list {\n\t\titem.Lang = m.Lang\n\t\titem.Include()\n\t}\n\treturn\n}\n\n//查询关联数据.\nfunc (m *TeamMember) Include() *TeamMember {\n\n\tif member, err := NewMember().Find(m.MemberId, \"account\", \"real_name\", \"avatar\"); err == nil {\n\t\tm.Account = member.Account\n\t\tm.RealName = member.RealName\n\t\tm.Avatar = member.Avatar\n\t}\n\tif m.RoleId == 0 {\n\t\tm.RoleName = i18n.Tr(m.Lang, \"common.creator\") //\"创始人\"\n\t} else if m.RoleId == 1 {\n\t\tm.RoleName = i18n.Tr(m.Lang, \"common.administrator\") //\"管理员\"\n\t} else if m.RoleId == 2 {\n\t\tm.RoleName = i18n.Tr(m.Lang, \"common.editor\") //\"编辑者\"\n\t} else if m.RoleId == 3 {\n\t\tm.RoleName = i18n.Tr(m.Lang, \"common.observer\") //\"观察者\"\n\t}\n\treturn m\n}\n\n//查询未加入团队的用户。\nfunc (m *TeamMember) FindNotJoinMemberByAccount(teamId int, account string, limit int) (*SelectMemberResult, error) {\n\tif teamId <= 0 {\n\t\treturn nil, ErrInvalidParameter\n\t}\n\to := orm.NewOrm()\n\n\tsql := `select mdmb.member_id,mdmb.account,mdmb.real_name,team.team_member_id\nfrom md_members as mdmb \n  left join md_team_member as team on team.team_id = ? and mdmb.member_id = team.member_id\n  where mdmb.account like ? or mdmb.real_name like ? AND team_member_id IS NULL\n  order by mdmb.member_id desc \nlimit ?;`\n\n\tmembers := make([]*Member, 0)\n\n\t_, err := o.Raw(sql, teamId, \"%\"+account+\"%\", \"%\"+account+\"%\", limit).QueryRows(&members)\n\n\tif err != nil {\n\t\tlogs.Error(\"查询团队用户时出错 ->\", err)\n\t\treturn nil, err\n\t}\n\n\tresult := SelectMemberResult{}\n\titems := make([]KeyValueItem, 0)\n\n\tfor _, member := range members {\n\t\titem := KeyValueItem{}\n\t\titem.Id = member.MemberId\n\t\titem.Text = member.Account + \"[\" + member.RealName + \"]\"\n\t\titems = append(items, item)\n\t}\n\tresult.Result = items\n\n\treturn &result, err\n}\n\nfunc (m *TeamMember) FindByBookIdAndMemberId(bookId, memberId int) (*TeamMember, error) {\n\tif bookId <= 0 || memberId <= 0 {\n\t\treturn nil, ErrInvalidParameter\n\t}\n\t//一个用户可能在多个团队中，且一个项目可能有多个团队参与。因此需要查询用户最大权限。\n\tsql := `select *\nfrom md_team_member as team\nwhere team.team_id in (select rel.team_id from md_team_relationship as rel where rel.book_id = ?) \nand team.member_id = ? order by team.role_id asc limit 1;`\n\n\to := orm.NewOrm()\n\n\terr := o.Raw(sql, bookId, memberId).QueryRow(m)\n\n\tif err != nil {\n\t\tlogs.Error(\"查询用户项目所在团队失败 ->bookId=\", bookId, \" memberId=\", memberId, err)\n\t\treturn nil, err\n\t}\n\treturn m, nil\n}\n"
  },
  {
    "path": "models/TeamRelationship.go",
    "content": "package models\n\nimport (\n\t\"errors\"\n\t\"time\"\n\n\t\"github.com/beego/beego/v2/client/orm\"\n\t\"github.com/beego/beego/v2/core/logs\"\n\t\"github.com/mindoc-org/mindoc/conf\"\n)\n\ntype TeamRelationship struct {\n\tTeamRelationshipId int       `orm:\"column(team_relationship_id);pk;auto;unique;\" json:\"team_relationship_id\"`\n\tBookId             int       `orm:\"column(book_id);description(项目id)\" json:\"book_id\"`\n\tTeamId             int       `orm:\"column(team_id);description(团队id)\" json:\"team_id\"`\n\tCreateTime         time.Time `orm:\"column(create_time);type(datetime);auto_now_add;description(创建时间)\" json:\"create_time\"`\n\tTeamName           string    `orm:\"-\" json:\"team_name\"`\n\tMemberCount        int       `orm:\"-\" json:\"member_count\"`\n\tBookMemberId       int       `orm:\"-\" json:\"book_member_id\"`\n\tBookMemberName     string    `orm:\"-\" json:\"book_member_name\"`\n\tBookName           string    `orm:\"-\" json:\"book_name\"`\n}\n\n// TableName 获取对应数据库表名.\nfunc (m *TeamRelationship) TableName() string {\n\treturn \"team_relationship\"\n}\nfunc (m *TeamRelationship) TableNameWithPrefix() string {\n\treturn conf.GetDatabasePrefix() + m.TableName()\n}\n\n// TableEngine 获取数据使用的引擎.\nfunc (m *TeamRelationship) TableEngine() string {\n\treturn \"INNODB\"\n}\n\n// 联合唯一键\nfunc (m *TeamRelationship) TableUnique() [][]string {\n\treturn [][]string{{\"team_id\", \"book_id\"}}\n}\nfunc (m *TeamRelationship) QueryTable() orm.QuerySeter {\n\treturn orm.NewOrm().QueryTable(m.TableNameWithPrefix())\n}\n\nfunc NewTeamRelationship() *TeamRelationship {\n\treturn &TeamRelationship{}\n}\n\nfunc (m *TeamRelationship) First(teamId int, cols ...string) (*TeamRelationship, error) {\n\tif teamId <= 0 {\n\t\treturn nil, ErrInvalidParameter\n\t}\n\terr := m.QueryTable().Filter(\"team_id\", teamId).One(m, cols...)\n\tif err != nil {\n\t\tlogs.Error(\"查询项目团队失败 ->\", err)\n\t}\n\treturn m, err\n}\n\n//查找指定项目的指定团队.\nfunc (m *TeamRelationship) FindByBookId(bookId int, teamId int) (*TeamRelationship, error) {\n\tif teamId <= 0 || bookId <= 0 {\n\t\treturn nil, ErrInvalidParameter\n\t}\n\terr := m.QueryTable().Filter(\"team_id\", teamId).Filter(\"book_id\", bookId).One(m)\n\tif err != nil {\n\t\tlogs.Error(\"查询项目团队失败 ->\", err)\n\t}\n\treturn m, err\n}\n\n//删除指定项目的指定团队.\nfunc (m *TeamRelationship) DeleteByBookId(bookId int, teamId int) error {\n\terr := m.QueryTable().Filter(\"team_id\", teamId).Filter(\"book_id\", bookId).One(m)\n\tif err != nil {\n\t\tlogs.Error(\"查询项目团队失败 ->\", err)\n\t\treturn err\n\t}\n\tm.Include()\n\treturn m.Delete(m.TeamRelationshipId)\n}\n\n//保存团队项目.\nfunc (m *TeamRelationship) Save(cols ...string) (err error) {\n\tif m.TeamId <= 0 || m.BookId <= 0 {\n\t\treturn ErrInvalidParameter\n\t}\n\tif (m.TeamRelationshipId > 0 && m.QueryTable().Filter(\"book_id\", m.BookId).Filter(\"team_id\", m.TeamId).Filter(\"team_relationship_id__ne\", m.TeamRelationshipId).Exist()) ||\n\t\tm.TeamRelationshipId <= 0 && m.QueryTable().Filter(\"book_id\", m.BookId).Filter(\"team_id\", m.TeamId).Exist() {\n\t\treturn errors.New(\"当前团队已加入该项目\")\n\t}\n\tif m.TeamRelationshipId > 0 {\n\t\t_, err = orm.NewOrm().Update(m)\n\t} else {\n\t\t_, err = orm.NewOrm().Insert(m)\n\t}\n\tif err != nil {\n\t\tlogs.Error(\"保存团队项目时出错 ->\", err)\n\t}\n\treturn\n}\n\nfunc (m *TeamRelationship) Delete(teamRelId int) (err error) {\n\tif teamRelId <= 0 {\n\t\treturn ErrInvalidParameter\n\t}\n\t_, err = m.QueryTable().Filter(\"team_relationship_id\", teamRelId).Delete()\n\n\tif err != nil {\n\t\tlogs.Error(\"删除团队项目失败 ->\", err)\n\t}\n\treturn\n}\n\n//分页查询团队项目.\nfunc (m *TeamRelationship) FindToPager(teamId, pageIndex, pageSize int) (list []*TeamRelationship, totalCount int, err error) {\n\tif teamId <= 0 {\n\t\terr = ErrInvalidParameter\n\t\treturn\n\t}\n\toffset := (pageIndex - 1) * pageSize\n\n\to := orm.NewOrm()\n\n\t_, err = o.QueryTable(m.TableNameWithPrefix()).Filter(\"team_id\", teamId).OrderBy(\"-team_relationship_id\").Offset(offset).Limit(pageSize).All(&list)\n\n\tif err != nil {\n\t\tlogs.Error(\"查询团队项目时出错 ->\", err)\n\t\treturn\n\t}\n\tcount, err := m.QueryTable().Filter(\"team_id\", teamId).Count()\n\n\tif err != nil {\n\t\tlogs.Error(\"查询团队项目时出错 ->\", err)\n\t\treturn\n\t}\n\ttotalCount = int(count)\n\tfor _, item := range list {\n\t\titem.Include()\n\t}\n\treturn\n}\n\n//加载附加数据.\nfunc (m *TeamRelationship) Include() (*TeamRelationship, error) {\n\tif m.BookId > 0 {\n\t\tb, err := NewBook().Find(m.BookId, \"book_name\", \"identify\", \"member_id\")\n\t\tif err != nil {\n\t\t\treturn m, err\n\t\t}\n\t\tm.BookName = b.BookName\n\t\tm.BookMemberId = b.MemberId\n\t\tif b.MemberId > 0 {\n\t\t\tmember, err := NewMember().Find(b.MemberId, \"account\", \"real_name\")\n\t\t\tif err != nil {\n\t\t\t\treturn m, err\n\t\t\t}\n\t\t\tif member.RealName == \"\" {\n\t\t\t\tm.BookMemberName = member.Account\n\t\t\t} else {\n\t\t\t\tm.BookMemberName = member.RealName\n\t\t\t}\n\t\t}\n\t}\n\tif m.TeamId > 0 {\n\t\tteam, err := NewTeam().First(m.TeamId)\n\t\tif err == nil {\n\t\t\tm.TeamName = team.TeamName\n\t\t\tm.MemberCount = team.MemberCount\n\t\t}\n\t}\n\treturn m, nil\n}\n\n//查询未加入团队的项目.\nfunc (m *TeamRelationship) FindNotJoinBookByName(teamId int, bookName string, limit int) (*SelectMemberResult, error) {\n\tif teamId <= 0 {\n\t\treturn nil, ErrInvalidParameter\n\t}\n\to := orm.NewOrm()\n\n\tsql := `select book.book_id,book.book_name\nfrom  md_books as book\nwhere book.book_id not in (select team.book_id from md_team_relationship as team where team_id=?)\nand book.book_name like ? order by book_id desc limit ?;`\n\n\tbooks := make([]*Book, 0)\n\n\t_, err := o.Raw(sql, teamId, \"%\"+bookName+\"%\", limit).QueryRows(&books)\n\n\tif err != nil {\n\t\tlogs.Error(\"查询团队项目时出错 ->\", err)\n\t\treturn nil, err\n\t}\n\n\tresult := SelectMemberResult{}\n\titems := make([]KeyValueItem, 0)\n\n\tfor _, book := range books {\n\t\titem := KeyValueItem{}\n\t\titem.Id = book.BookId\n\t\titem.Text = book.BookName\n\t\titems = append(items, item)\n\t}\n\tresult.Result = items\n\n\treturn &result, err\n}\n\n//查找指定项目中未加入的团队.\nfunc (m *TeamRelationship) FindNotJoinBookByBookIdentify(bookId int, teamName string, limit int) (*SelectMemberResult, error) {\n\tif bookId <= 0 || teamName == \"\" {\n\t\treturn nil, ErrInvalidParameter\n\t}\n\n\to := orm.NewOrm()\n\tsql := `select *\nfrom md_teams as team\nwhere team.team_id not in (select rel.team_id from md_team_relationship as rel where rel.book_id = ?) \nand team.team_name like ? \norder by team.team_id desc limit ?;`\n\tteams := make([]*Team, 0)\n\n\t_, err := o.Raw(sql, bookId, \"%\"+teamName+\"%\", limit).QueryRows(&teams)\n\n\tif err != nil {\n\t\tlogs.Error(\"查询团队项目时出错 ->\", err)\n\t\treturn nil, err\n\t}\n\n\tresult := SelectMemberResult{}\n\titems := make([]KeyValueItem, 0)\n\n\tfor _, team := range teams {\n\t\titem := KeyValueItem{}\n\t\titem.Id = team.TeamId\n\t\titem.Text = team.TeamName\n\t\titems = append(items, item)\n\t}\n\tresult.Result = items\n\n\treturn &result, err\n}\n\n//查询指定项目的团队.\nfunc (m *TeamRelationship) FindByBookToPager(bookId, pageIndex, pageSize int) (list []*TeamRelationship, totalCount int, err error) {\n\n\tif bookId <= 0 {\n\t\terr = ErrInvalidParameter\n\t\treturn\n\t}\n\n\toffset := (pageIndex - 1) * pageSize\n\n\to := orm.NewOrm()\n\n\t_, err = o.QueryTable(m.TableNameWithPrefix()).Filter(\"book_id\", bookId).OrderBy(\"-team_relationship_id\").Offset(offset).Limit(pageSize).All(&list)\n\n\tif err != nil {\n\t\tlogs.Error(\"查询团队项目时出错 ->\", err)\n\t\treturn\n\t}\n\tcount, err := m.QueryTable().Filter(\"book_id\", bookId).Count()\n\n\tif err != nil {\n\t\tlogs.Error(\"查询团队项目时出错 ->\", err)\n\t\treturn\n\t}\n\ttotalCount = int(count)\n\tfor _, item := range list {\n\t\titem.Include()\n\t}\n\treturn\n}\n"
  },
  {
    "path": "models/Template.go",
    "content": "package models\n\nimport (\n\t\"errors\"\n\t\"time\"\n\n\t\"github.com/beego/beego/v2/client/orm\"\n\t\"github.com/beego/beego/v2/core/logs\"\n\t\"github.com/mindoc-org/mindoc/conf\"\n)\n\ntype Template struct {\n\tTemplateId   int    `orm:\"column(template_id);pk;auto;unique;\" json:\"template_id\"`\n\tTemplateName string `orm:\"column(template_name);size(500);\" json:\"template_name\"`\n\tMemberId     int    `orm:\"column(member_id);index\" json:\"member_id\"`\n\tBookId       int    `orm:\"column(book_id);index\" json:\"book_id\"`\n\tBookName     string `orm:\"-\" json:\"book_name\"`\n\t//是否是全局模板：0 否/1 是; 全局模板在所有项目中都可以使用；否则只能在创建模板的项目中使用\n\tIsGlobal        int       `orm:\"column(is_global);default(0)\" json:\"is_global\"`\n\tTemplateContent string    `orm:\"column(template_content);type(text);null\" json:\"template_content\"`\n\tCreateTime      time.Time `orm:\"column(create_time);type(datetime);auto_now_add\" json:\"create_time\"`\n\tCreateName      string    `orm:\"-\" json:\"create_name\"`\n\tModifyTime      time.Time `orm:\"column(modify_time);type(datetime);auto_now\" json:\"modify_time\"`\n\tModifyAt        int       `orm:\"column(modify_at);type(int)\" json:\"-\"`\n\tModifyName      string    `orm:\"-\" json:\"modify_name\"`\n\tVersion         int64     `orm:\"type(bigint);column(version)\" json:\"version\"`\n}\n\n// TableName 获取对应数据库表名.\nfunc (m *Template) TableName() string {\n\treturn \"templates\"\n}\n\n// TableEngine 获取数据使用的引擎.\nfunc (m *Template) TableEngine() string {\n\treturn \"INNODB\"\n}\n\nfunc (m *Template) TableNameWithPrefix() string {\n\treturn conf.GetDatabasePrefix() + m.TableName()\n}\n\nfunc NewTemplate() *Template {\n\treturn &Template{}\n}\n\n//查询指定ID的模板\nfunc (t *Template) Find(templateId int) (*Template, error) {\n\tif templateId <= 0 {\n\t\treturn t, ErrInvalidParameter\n\t}\n\n\to := orm.NewOrm()\n\n\terr := o.QueryTable(t.TableNameWithPrefix()).Filter(\"template_id\", templateId).One(t)\n\n\tif err != nil {\n\t\tlogs.Error(\"查询模板时失败 ->%s\", err)\n\t}\n\treturn t, err\n}\n\n//查询属于指定项目的模板.\nfunc (t *Template) FindByBookId(bookId int) ([]*Template, error) {\n\tif bookId <= 0 {\n\t\treturn nil, ErrInvalidParameter\n\t}\n\to := orm.NewOrm()\n\n\tvar templateList []*Template\n\n\t_, err := o.QueryTable(t.TableNameWithPrefix()).Filter(\"book_id\", bookId).OrderBy(\"-template_id\").All(&templateList)\n\n\tif err != nil {\n\t\tlogs.Error(\"查询模板列表失败 ->\", err)\n\t}\n\treturn templateList, err\n}\n\n//查询指定项目所有可用模板列表.\nfunc (t *Template) FindAllByBookId(bookId int) ([]*Template, error) {\n\tif bookId <= 0 {\n\t\treturn nil, ErrInvalidParameter\n\t}\n\to := orm.NewOrm()\n\n\tcond := orm.NewCondition()\n\n\tcond1 := cond.And(\"book_id\", bookId).Or(\"is_global\", 1)\n\n\tqs := o.QueryTable(t.TableNameWithPrefix())\n\n\tvar templateList []*Template\n\n\t_, err := qs.SetCond(cond1).OrderBy(\"-template_id\").All(&templateList)\n\n\tif err != nil {\n\t\tlogs.Error(\"查询模板列表失败 ->\", err)\n\t}\n\treturn templateList, err\n}\n\n//删除一个模板\nfunc (t *Template) Delete(templateId int, memberId int) error {\n\tif templateId <= 0 {\n\t\treturn ErrInvalidParameter\n\t}\n\n\to := orm.NewOrm()\n\n\tqs := o.QueryTable(t.TableNameWithPrefix()).Filter(\"template_id\", templateId)\n\n\tif memberId > 0 {\n\t\tqs = qs.Filter(\"member_id\", memberId)\n\t}\n\t_, err := qs.Delete()\n\n\tif err != nil {\n\t\tlogs.Error(\"删除模板失败 ->\", err)\n\t}\n\treturn err\n}\n\n//添加或更新模板\nfunc (t *Template) Save(cols ...string) (err error) {\n\n\tif t.BookId <= 0 {\n\t\treturn ErrInvalidParameter\n\t}\n\to := orm.NewOrm()\n\n\tif !o.QueryTable(NewBook().TableNameWithPrefix()).Filter(\"book_id\", t.BookId).Exist() {\n\t\treturn errors.New(\"项目不存在\")\n\t}\n\tif !o.QueryTable(NewMember().TableNameWithPrefix()).Filter(\"member_id\", t.MemberId).Filter(\"status\", 0).Exist() {\n\t\treturn errors.New(\"用户已被禁用\")\n\t}\n\tt.Version = time.Now().Unix()\n\n\tif t.TemplateId > 0 {\n\t\tt.ModifyTime = time.Now()\n\t\t_, err = o.Update(t, cols...)\n\t} else {\n\t\tt.CreateTime = time.Now()\n\t\t_, err = o.Insert(t)\n\t}\n\n\treturn\n}\n\n//预加载一些数据\nfunc (t *Template) Preload() *Template {\n\tif t != nil {\n\t\tif t.MemberId > 0 {\n\t\t\tm, err := NewMember().Find(t.MemberId, \"account\", \"real_name\")\n\t\t\tif err == nil {\n\t\t\t\tif m.RealName != \"\" {\n\t\t\t\t\tt.CreateName = m.RealName\n\t\t\t\t} else {\n\t\t\t\t\tt.CreateName = m.Account\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tlogs.Error(\"加载模板所有者失败 ->\", err)\n\t\t\t}\n\t\t}\n\t\tif t.ModifyAt > 0 {\n\t\t\tif m, err := NewMember().Find(t.ModifyAt, \"account\", \"real_name\"); err == nil {\n\t\t\t\tif m.RealName != \"\" {\n\t\t\t\t\tt.ModifyName = m.RealName\n\t\t\t\t} else {\n\t\t\t\t\tt.ModifyName = m.Account\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif t.BookId > 0 {\n\t\t\tif b, err := NewBook().Find(t.BookId, \"book_name\"); err == nil {\n\t\t\t\tt.BookName = b.BookName\n\t\t\t}\n\t\t}\n\t}\n\treturn t\n}\n"
  },
  {
    "path": "models/comment_result.go",
    "content": "package models\n\nimport \"github.com/beego/beego/v2/client/orm\"\n\ntype CommentResult struct {\n\tComment\n\tAuthor       string `json:\"author\"`\n\tReplyAccount string `json:\"reply_account\"`\n}\n\nfunc (m *CommentResult) FindForDocumentToPager(doc_id, page_index, page_size int) (comments []*CommentResult, totalCount int, err error) {\n\n\to := orm.NewOrm()\n\n\tsql1 := `\nSELECT\n  comment.* ,\n  parent.* ,\n  mdmb.account AS author,\n  p_member.account AS reply_account\nFROM md_comments AS comment\n  LEFT JOIN md_members AS mdmb ON comment.member_id = mdmb.member_id\n  LEFT JOIN md_comments AS parent ON comment.parent_id = parent.comment_id\n  LEFT JOIN md_members AS p_member ON p_member.member_id = parent.member_id\n\nWHERE comment.document_id = ? ORDER BY comment.comment_id DESC LIMIT 0,10`\n\n\toffset := (page_index - 1) * page_size\n\n\t_, err = o.Raw(sql1, doc_id, offset, page_size).QueryRows(&comments)\n\n\tv, err := o.QueryTable(m.TableNameWithPrefix()).Filter(\"document_id\", doc_id).Count()\n\n\tif err == nil {\n\t\ttotalCount = int(v)\n\t}\n\n\treturn\n}\n"
  },
  {
    "path": "models/comment_vote.go",
    "content": "package models\n\nimport (\n\t\"time\"\n\n\t\"github.com/beego/beego/v2/client/orm\"\n\t\"github.com/mindoc-org/mindoc/conf\"\n)\n\ntype CommentVote struct {\n\tVoteId          int       `orm:\"column(vote_id);pk;auto;unique\" json:\"vote_id\"`\n\tCommentId       int       `orm:\"column(comment_id);type(int);index\" json:\"comment_id\"`\n\tCommentMemberId int       `orm:\"column(comment_member_id);type(int);index;default(0)\" json:\"comment_member_id\"`\n\tVoteMemberId    int       `orm:\"column(vote_member_id);type(int);index\" json:\"vote_member_id\"`\n\tVoteState       int       `orm:\"column(vote_state);type(int)\" json:\"vote_state\"`\n\tCreateTime      time.Time `orm:\"column(create_time);type(datetime);auto_now_add\" json:\"create_time\"`\n}\n\n// TableName 获取对应数据库表名.\nfunc (m *CommentVote) TableName() string {\n\treturn \"comment_votes\"\n}\n\n// TableEngine 获取数据使用的引擎.\nfunc (m *CommentVote) TableEngine() string {\n\treturn \"INNODB\"\n}\n\nfunc (m *CommentVote) TableNameWithPrefix() string {\n\treturn conf.GetDatabasePrefix() + m.TableName()\n}\nfunc (u *CommentVote) TableUnique() [][]string {\n\treturn [][]string{\n\t\t[]string{\"comment_id\", \"vote_member_id\"},\n\t}\n}\nfunc NewCommentVote() *CommentVote {\n\treturn &CommentVote{}\n}\nfunc (m *CommentVote) InsertOrUpdate() (*CommentVote, error) {\n\to := orm.NewOrm()\n\n\tif m.VoteId > 0 {\n\t\t_, err := o.Update(m)\n\t\treturn m, err\n\t} else {\n\t\t_, err := o.Insert(m)\n\n\t\treturn m, err\n\t}\n}\n"
  },
  {
    "path": "routers/filter.go",
    "content": "package routers\n\nimport (\n\t\"encoding/json\"\n\t\"net/url\"\n\t\"regexp\"\n\n\t\"github.com/beego/beego/v2/server/web\"\n\t\"github.com/beego/beego/v2/server/web/context\"\n\n\t\"github.com/mindoc-org/mindoc/conf\"\n\t\"github.com/mindoc-org/mindoc/mcp\"\n\t\"github.com/mindoc-org/mindoc/models\"\n)\n\nfunc init() {\n\tvar FilterUser = func(ctx *context.Context) {\n\t\t_, ok := ctx.Input.Session(conf.LoginSessionName).(models.Member)\n\n\t\tif !ok {\n\t\t\tif ctx.Input.IsAjax() {\n\t\t\t\tjsonData := make(map[string]interface{}, 3)\n\n\t\t\t\tjsonData[\"errcode\"] = 403\n\t\t\t\tjsonData[\"message\"] = \"请登录后再操作\"\n\n\t\t\t\treturnJSON, _ := json.Marshal(jsonData)\n\n\t\t\t\tctx.ResponseWriter.Write(returnJSON)\n\t\t\t} else {\n\t\t\t\tctx.Redirect(302, conf.URLFor(\"AccountController.Login\")+\"?url=\"+url.PathEscape(conf.BaseUrl+ctx.Request.URL.RequestURI()))\n\t\t\t}\n\t\t}\n\t}\n\tweb.InsertFilter(\"/manager\", web.BeforeRouter, FilterUser)\n\tweb.InsertFilter(\"/manager/*\", web.BeforeRouter, FilterUser)\n\tweb.InsertFilter(\"/setting\", web.BeforeRouter, FilterUser)\n\tweb.InsertFilter(\"/setting/*\", web.BeforeRouter, FilterUser)\n\tweb.InsertFilter(\"/book\", web.BeforeRouter, FilterUser)\n\tweb.InsertFilter(\"/book/*\", web.BeforeRouter, FilterUser)\n\tweb.InsertFilter(\"/api/*\", web.BeforeRouter, FilterUser)\n\tweb.InsertFilter(\"/manage/*\", web.BeforeRouter, FilterUser)\n\tweb.InsertFilter(\"/mcp/*\", web.BeforeRouter, mcp.AuthMiddleware)\n\n\tvar FinishRouter = func(ctx *context.Context) {\n\t\tctx.ResponseWriter.Header().Add(\"MinDoc-Version\", conf.VERSION)\n\t\tctx.ResponseWriter.Header().Add(\"MinDoc-Site\", \"https://www.iminho.me\")\n\t\tctx.ResponseWriter.Header().Add(\"X-XSS-Protection\", \"1; mode=block\")\n\t}\n\n\tvar StartRouter = func(ctx *context.Context) {\n\t\tsessname, _ := web.AppConfig.String(\"sessionname\")\n\t\tsessionId := ctx.Input.Cookie(sessname)\n\t\tif sessionId != \"\" {\n\t\t\t//sessionId必须是数字字母组成，且最小32个字符，最大1024字符\n\t\t\tif ok, err := regexp.MatchString(`^[a-zA-Z0-9]{32,512}$`, sessionId); !ok || err != nil {\n\t\t\t\tpanic(\"401\")\n\t\t\t}\n\t\t}\n\t}\n\tweb.InsertFilter(\"/*\", web.BeforeStatic, StartRouter, web.WithReturnOnOutput(false))\n\tweb.InsertFilter(\"/*\", web.BeforeRouter, FinishRouter, web.WithReturnOnOutput(false))\n}\n"
  },
  {
    "path": "routers/router.go",
    "content": "package routers\n\nimport (\n\t// \"crypto/tls\"\n\t// \"log\"\n\t\"net/http\"\n\t\"net/http/httputil\"\n\t\"net/url\"\n\t\"strings\"\n\n\t\"github.com/beego/beego/v2/core/logs\"\n\t\"github.com/beego/beego/v2/server/web\"\n\t\"github.com/beego/beego/v2/server/web/context\"\n\n\t// \"github.com/mindoc-org/mindoc/conf\"\n\t\"github.com/mindoc-org/mindoc/controllers\"\n\t\"github.com/mindoc-org/mindoc/mcp\"\n)\n\ntype CorsTransport struct {\n\thttp.RoundTripper\n}\n\nfunc (t *CorsTransport) RoundTrip(req *http.Request) (resp *http.Response, err error) {\n\t// refer: https://stackoverflow.com/questions/31535569/golang-how-to-read-response-body-of-reverseproxy/31536962#31536962\n\tresp, err = t.RoundTripper.RoundTrip(req)\n\t// beego.Debug(resp)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\t/*\n\t\tb, err := ioutil.ReadAll(resp.Body)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\terr = resp.Body.Close()\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tb = bytes.Replace(b, []byte(\"server\"), []byte(\"schmerver\"), -1)\n\t\tbody := ioutil.NopCloser(bytes.NewReader(b))\n\t\tresp.Body = body\n\t\tresp.ContentLength = int64(len(b))\n\t\tresp.Header.Set(\"Content-Length\", strconv.Itoa(len(b)))\n\t*/\n\t// resp.Body.Close()\n\t// resp.Header.Del(\"Access-Control-Request-Method\")\n\t// resp.Header.Del(\"Access-Control-Request-Headers\")\n\tresp.Header.Set(\"Access-Control-Allow-Origin\", \"*\")\n\tresp.Header.Set(\"Access-Control-Allow-Methods\", \"POST, GET, OPTIONS, PUT, DELETE\")\n\t// resp.Header.Set(\"Access-Control-Allow-Headers\", \"Accept, Content-Type, Content-Length, Accept-Encoding, X-CSRF-Token, Authorization, X-Requested-With\")\n\ths := \"\"\n\tfor name, values := range resp.Header {\n\t\ths = hs + name + \", \"\n\t\t_ = values\n\t}\n\ths = strings.TrimRight(hs, \" \")\n\ths = strings.TrimRight(hs, \",\")\n\t// beego.Debug(hs)\n\tresp.Header.Set(\"Access-Control-Allow-Headers\", hs)\n\tresp.Header.Del(\"Mindoc-Version\")\n\tresp.Header.Del(\"Mindoc-Site\")\n\tresp.Header.Del(\"Server\")\n\tresp.Header.Del(\"X-Xss-Protection\")\n\treturn resp, nil\n}\n\nfunc singleJoiningSlash(a, b string) string {\n\taslash := strings.HasSuffix(a, \"/\")\n\tbslash := strings.HasPrefix(b, \"/\")\n\tswitch {\n\tcase aslash && bslash:\n\t\treturn a + b[1:]\n\tcase !aslash && !bslash:\n\t\treturn a + \"/\" + b\n\t}\n\treturn a + b\n}\n\nfunc init() {\n\tweb.Any(\"/hello-any\", func(ctx *context.Context) {\n\t\tctx.Output.Body([]byte(\"hello any demo\"))\n\t})\n\n\tweb.Any(\"/cors-anywhere\", func(ctx *context.Context) {\n\t\tu, _ := url.PathUnescape(ctx.Input.Query(\"url\"))\n\t\tif len(u) > 0 && strings.HasPrefix(u, \"http\") {\n\t\t\ttarget, _ := url.Parse(u)\n\t\t\tif target.Path == ctx.Request.URL.Path {\n\t\t\t\tctx.Output.Body([]byte(\"\"))\n\t\t\t} else {\n\t\t\t\tlogs.Error(\"target: \", target)\n\n\t\t\t\treverseProxy := httputil.NewSingleHostReverseProxy(target)\n\n\t\t\t\treverseProxy.Director = func(req *http.Request) {\n\t\t\t\t\tfor name, values := range ctx.Request.Header {\n\t\t\t\t\t\tfor _, value := range values {\n\t\t\t\t\t\t\treq.Header.Set(name, value)\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\treq.Header.Add(\"X-Forwarded-Host\", req.Host)\n\t\t\t\t\treq.Header.Add(\"X-Origin-Host\", target.Host)\n\t\t\t\t\treq.URL.Scheme = target.Scheme\n\t\t\t\t\treq.URL.Host = target.Host\n\n\t\t\t\t\t// proxyPath := singleJoiningSlash(target.Path, req.URL.Path)\n\t\t\t\t\tproxyPath := target.Path\n\t\t\t\t\tif strings.HasSuffix(proxyPath, \"/\") && len(proxyPath) > 1 {\n\t\t\t\t\t\tproxyPath = proxyPath[:len(proxyPath)-1]\n\t\t\t\t\t}\n\t\t\t\t\treq.URL.Path = proxyPath\n\t\t\t\t}\n\t\t\t\treverseProxy.Transport = &CorsTransport{http.DefaultTransport}\n\t\t\t\treverseProxy.ServeHTTP(ctx.ResponseWriter, ctx.Request)\n\t\t\t\tpanic(web.ErrAbort)\n\t\t\t}\n\t\t} else {\n\t\t\tctx.ResponseWriter.WriteHeader(http.StatusBadRequest)\n\t\t\tctx.Output.Body([]byte(\"400 Bad Request\"))\n\t\t}\n\t})\n\n\tweb.Router(\"/\", &controllers.HomeController{}, \"*:Index\")\n\n\tweb.Router(\"/login\", &controllers.AccountController{}, \"*:Login\")\n\tweb.Router(\"/auth2/redirect/:app\", &controllers.AccountController{}, \"*:Auth2Redirect\")\n\tweb.Router(\"/auth2/callback/:app\", &controllers.AccountController{}, \"*:Auth2Callback\")\n\tweb.Router(\"/auth2/account/bind/:app\", &controllers.AccountController{}, \"*:Auth2BindAccount\")\n\tweb.Router(\"/auth2/account/auto/:app\", &controllers.AccountController{}, \"*:Auth2AutoAccount\")\n\n\t//web.Router(\"/dingtalk_login\", &controllers.AccountController{}, \"*:DingTalkLogin\")\n\t//web.Router(\"/qrlogin/:app\", &controllers.AccountController{}, \"*:QRLogin\")\n\tweb.Router(\"/logout\", &controllers.AccountController{}, \"*:Logout\")\n\tweb.Router(\"/register\", &controllers.AccountController{}, \"*:Register\")\n\tweb.Router(\"/find_password\", &controllers.AccountController{}, \"*:FindPassword\")\n\tweb.Router(\"/valid_email\", &controllers.AccountController{}, \"post:ValidEmail\")\n\tweb.Router(\"/captcha\", &controllers.AccountController{}, \"*:Captcha\")\n\n\tweb.Router(\"/manager\", &controllers.ManagerController{}, \"*:Index\")\n\tweb.Router(\"/manager/users\", &controllers.ManagerController{}, \"*:Users\")\n\tweb.Router(\"/manager/users/edit/:id\", &controllers.ManagerController{}, \"*:EditMember\")\n\tweb.Router(\"/manager/member/create\", &controllers.ManagerController{}, \"post:CreateMember\")\n\tweb.Router(\"/manager/member/delete\", &controllers.ManagerController{}, \"post:DeleteMember\")\n\tweb.Router(\"/manager/member/update-member-status\", &controllers.ManagerController{}, \"post:UpdateMemberStatus\")\n\tweb.Router(\"/manager/member/change-member-role\", &controllers.ManagerController{}, \"post:ChangeMemberRole\")\n\tweb.Router(\"/manager/books\", &controllers.ManagerController{}, \"*:Books\")\n\tweb.Router(\"/manager/books/edit/:key\", &controllers.ManagerController{}, \"*:EditBook\")\n\tweb.Router(\"/manager/books/delete\", &controllers.ManagerController{}, \"*:DeleteBook\")\n\n\tweb.Router(\"/manager/comments\", &controllers.ManagerController{}, \"*:Comments\")\n\tweb.Router(\"/manager/setting\", &controllers.ManagerController{}, \"*:Setting\")\n\tweb.Router(\"/manager/books/token\", &controllers.ManagerController{}, \"post:CreateToken\")\n\tweb.Router(\"/manager/books/transfer\", &controllers.ManagerController{}, \"post:Transfer\")\n\tweb.Router(\"/manager/books/open\", &controllers.ManagerController{}, \"post:PrivatelyOwned\")\n\n\tweb.Router(\"/manager/attach/list\", &controllers.ManagerController{}, \"*:AttachList\")\n\tweb.Router(\"/manager/attach/clean\", &controllers.ManagerController{}, \"post:AttachClean\")\n\tweb.Router(\"/manager/attach/detailed/:id\", &controllers.ManagerController{}, \"*:AttachDetailed\")\n\tweb.Router(\"/manager/attach/delete\", &controllers.ManagerController{}, \"post:AttachDelete\")\n\tweb.Router(\"/manager/label/list\", &controllers.ManagerController{}, \"get:LabelList\")\n\tweb.Router(\"/manager/label/delete/:id\", &controllers.ManagerController{}, \"post:LabelDelete\")\n\n\t//web.Router(\"/manager/config\",  &controllers.ManagerController{}, \"*:Config\")\n\n\tweb.Router(\"/manager/team\", &controllers.ManagerController{}, \"*:Team\")\n\tweb.Router(\"/manager/team/create\", &controllers.ManagerController{}, \"POST:TeamCreate\")\n\tweb.Router(\"/manager/team/edit\", &controllers.ManagerController{}, \"POST:TeamEdit\")\n\tweb.Router(\"/manager/team/delete\", &controllers.ManagerController{}, \"POST:TeamDelete\")\n\n\tweb.Router(\"/manager/team/member/list/:id\", &controllers.ManagerController{}, \"*:TeamMemberList\")\n\tweb.Router(\"/manager/team/member/add\", &controllers.ManagerController{}, \"POST:TeamMemberAdd\")\n\tweb.Router(\"/manager/team/member/delete\", &controllers.ManagerController{}, \"POST:TeamMemberDelete\")\n\tweb.Router(\"/manager/team/member/change_role\", &controllers.ManagerController{}, \"POST:TeamChangeMemberRole\")\n\tweb.Router(\"/manager/team/member/search\", &controllers.ManagerController{}, \"*:TeamSearchMember\")\n\n\tweb.Router(\"/manager/team/book/list/:id\", &controllers.ManagerController{}, \"*:TeamBookList\")\n\tweb.Router(\"/manager/team/book/add\", &controllers.ManagerController{}, \"POST:TeamBookAdd\")\n\tweb.Router(\"/manager/team/book/delete\", &controllers.ManagerController{}, \"POST:TeamBookDelete\")\n\tweb.Router(\"/manager/team/book/search\", &controllers.ManagerController{}, \"*:TeamSearchBook\")\n\n\tweb.Router(\"/manager/itemsets\", &controllers.ManagerController{}, \"*:Itemsets\")\n\tweb.Router(\"/manager/itemsets/edit\", &controllers.ManagerController{}, \"post:ItemsetsEdit\")\n\tweb.Router(\"/manager/itemsets/delete\", &controllers.ManagerController{}, \"post:ItemsetsDelete\")\n\n\tweb.Router(\"/setting\", &controllers.SettingController{}, \"*:Index\")\n\tweb.Router(\"/setting/password\", &controllers.SettingController{}, \"*:Password\")\n\tweb.Router(\"/setting/upload\", &controllers.SettingController{}, \"*:Upload\")\n\n\tweb.Router(\"/book\", &controllers.BookController{}, \"*:Index\")\n\tweb.Router(\"/book/:key/dashboard\", &controllers.BookController{}, \"*:Dashboard\")\n\tweb.Router(\"/book/:key/setting\", &controllers.BookController{}, \"*:Setting\")\n\tweb.Router(\"/book/:key/users\", &controllers.BookController{}, \"*:Users\")\n\tweb.Router(\"/book/:key/release\", &controllers.BookController{}, \"post:Release\")\n\tweb.Router(\"/book/:key/sort\", &controllers.BookController{}, \"post:SaveSort\")\n\tweb.Router(\"/book/:key/teams\", &controllers.BookController{}, \"*:Team\")\n\tweb.Router(\"/book/updatebookorder\", &controllers.BookController{}, \"post:UpdateBookOrder\")\n\n\tweb.Router(\"/book/create\", &controllers.BookController{}, \"*:Create\")\n\tweb.Router(\"/book/itemsets/search\", &controllers.BookController{}, \"*:ItemsetsSearch\")\n\n\tweb.Router(\"/book/users/create\", &controllers.BookMemberController{}, \"post:AddMember\")\n\tweb.Router(\"/book/users/change\", &controllers.BookMemberController{}, \"post:ChangeRole\")\n\tweb.Router(\"/book/users/delete\", &controllers.BookMemberController{}, \"post:RemoveMember\")\n\tweb.Router(\"/book/users/import\", &controllers.BookController{}, \"post:Import\")\n\tweb.Router(\"/book/users/copy\", &controllers.BookController{}, \"post:Copy\")\n\n\tweb.Router(\"/book/setting/save\", &controllers.BookController{}, \"post:SaveBook\")\n\tweb.Router(\"/book/setting/open\", &controllers.BookController{}, \"post:PrivatelyOwned\")\n\tweb.Router(\"/book/setting/transfer\", &controllers.BookController{}, \"post:Transfer\")\n\tweb.Router(\"/book/setting/upload\", &controllers.BookController{}, \"post:UploadCover\")\n\tweb.Router(\"/book/setting/delete\", &controllers.BookController{}, \"post:Delete\")\n\n\tweb.Router(\"/book/team/add\", &controllers.BookController{}, \"POST:TeamAdd\")\n\tweb.Router(\"/book/team/delete\", &controllers.BookController{}, \"POST:TeamDelete\")\n\tweb.Router(\"/book/team/search\", &controllers.BookController{}, \"*:TeamSearch\")\n\n\t//管理文章的路由\n\tweb.Router(\"/manage/blogs\", &controllers.BlogController{}, \"*:ManageList\")\n\tweb.Router(\"/manage/blogs/setting/?:id\", &controllers.BlogController{}, \"*:ManageSetting\")\n\tweb.Router(\"/manage/blogs/edit/?:id\", &controllers.BlogController{}, \"*:ManageEdit\")\n\tweb.Router(\"/manage/blogs/delete\", &controllers.BlogController{}, \"post:ManageDelete\")\n\tweb.Router(\"/manage/blogs/upload\", &controllers.BlogController{}, \"post:Upload\")\n\tweb.Router(\"/manage/blogs/attach/:id\", &controllers.BlogController{}, \"post:RemoveAttachment\")\n\n\t//读文章的路由\n\tweb.Router(\"/blogs\", &controllers.BlogController{}, \"*:List\")\n\tweb.Router(\"/blog-attach/:id:int/:attach_id:int\", &controllers.BlogController{}, \"get:Download\")\n\tweb.Router(\"/blog-:id([0-9]+).html\", &controllers.BlogController{}, \"*:Index\")\n\n\t//模板相关接口\n\tweb.Router(\"/api/template/get\", &controllers.TemplateController{}, \"get:Get\")\n\tweb.Router(\"/api/template/list\", &controllers.TemplateController{}, \"post:List\")\n\tweb.Router(\"/api/template/add\", &controllers.TemplateController{}, \"post:Add\")\n\tweb.Router(\"/api/template/remove\", &controllers.TemplateController{}, \"post:Delete\")\n\n\tweb.Router(\"/api/attach/remove/\", &controllers.DocumentController{}, \"post:RemoveAttachment\")\n\tweb.Router(\"/api/:key/edit/?:id\", &controllers.DocumentController{}, \"*:Edit\")\n\tweb.Router(\"/api/upload\", &controllers.DocumentController{}, \"post:Upload\")\n\tweb.Router(\"/api/:key/create\", &controllers.DocumentController{}, \"post:Create\")\n\tweb.Router(\"/api/:key/delete\", &controllers.DocumentController{}, \"post:Delete\")\n\tweb.Router(\"/api/:key/content/?:id\", &controllers.DocumentController{}, \"*:Content\")\n\tweb.Router(\"/api/:key/compare/:id\", &controllers.DocumentController{}, \"*:Compare\")\n\tweb.Router(\"/api/search/user/:key\", &controllers.SearchController{}, \"*:User\")\n\n\tweb.Router(\"/history/get\", &controllers.DocumentController{}, \"get:History\")\n\tweb.Router(\"/history/delete\", &controllers.DocumentController{}, \"*:DeleteHistory\")\n\tweb.Router(\"/history/restore\", &controllers.DocumentController{}, \"*:RestoreHistory\")\n\n\tweb.Router(\"/docs/:key\", &controllers.DocumentController{}, \"*:Index\")\n\tweb.Router(\"/docs/:key/check-password\", &controllers.DocumentController{}, \"post:CheckPassword\")\n\tweb.Router(\"/docs/:key/:id\", &controllers.DocumentController{}, \"*:Read\")\n\tweb.Router(\"/docs/:key/search\", &controllers.DocumentController{}, \"post:Search\")\n\tweb.Router(\"/export/:key\", &controllers.DocumentController{}, \"*:Export\")\n\tweb.Router(\"/qrcode/:key.png\", &controllers.DocumentController{}, \"get:QrCode\")\n\n\tweb.Router(\"/attach_files/:key/:attach_id\", &controllers.DocumentController{}, \"get:DownloadAttachment\")\n\n\tweb.Router(\"/comment/create\", &controllers.CommentController{}, \"post:Create\")\n\tweb.Router(\"/comment/delete\", &controllers.CommentController{}, \"post:Delete\")\n\tweb.Router(\"/comment/lists\", &controllers.CommentController{}, \"get:Lists\")\n\tweb.Router(\"/comment/index\", &controllers.CommentController{}, \"*:Index\")\n\n\tweb.Router(\"/search\", &controllers.SearchController{}, \"get:Index\")\n\tweb.Router(\"/search-v2\", &controllers.SearchController{}, \"get:IndexV2\")\n\tweb.Router(\"/api/search-v2\", &controllers.SearchController{}, \"get:SearchV2\")\n\n\tweb.Router(\"/tag/:key\", &controllers.LabelController{}, \"get:Index\")\n\tweb.Router(\"/tags\", &controllers.LabelController{}, \"get:List\")\n\n\tweb.Router(\"/items\", &controllers.ItemsetsController{}, \"get:Index\")\n\tweb.Router(\"/items/:key\", &controllers.ItemsetsController{}, \"get:List\")\n\n\tif web.AppConfig.DefaultBool(\"enable_mcp_server\", false) {\n\t\tmcpServer := mcp.NewMCPServer()\n\t\tweb.Any(\"/mcp/*\", func(ctx *context.Context) {\n\t\t\tmcpServer.ServeHTTP().ServeHTTP(ctx.ResponseWriter, ctx.Request)\n\t\t})\n\t}\n}\n"
  },
  {
    "path": "start.sh",
    "content": "#!/bin/bash\nset -eux\n\n# 默认资源\nif [ ! -d \"/mindoc/conf\" ]; then mkdir -p \"/mindoc/conf\" ; fi\nif [[ -z \"$(ls -A -- \"/mindoc/conf\")\" ]] ; then cp -r \"/mindoc/__default_assets__/conf\" \"/mindoc/\" ; fi\n\nif [ ! -d \"/mindoc/static\" ]; then mkdir -p \"/mindoc/static\" ; fi\nif [[ -z \"$(ls -A -- \"/mindoc/static\")\" ]] ; then cp -r \"/mindoc/__default_assets__/static\" \"/mindoc/\" ; fi\n\nif [ ! -d \"/mindoc/views\" ]; then mkdir -p \"/mindoc/views\" ; fi\nif [[ -z \"$(ls -A -- \"/mindoc/views\")\" ]] ; then cp -r \"/mindoc/__default_assets__/views\" \"/mindoc/\" ; fi\n\nif [ ! -d \"/mindoc/uploads\" ]; then mkdir -p \"/mindoc/uploads\" ; fi\nif [[ -z \"$(ls -A -- \"/mindoc/uploads\")\" ]] ; then cp -r \"/mindoc/__default_assets__/uploads\" \"/mindoc/\" ; fi\n\n# 如果配置文件不存在就复制\ncp --no-clobber /mindoc/conf/app.conf.example /mindoc/conf/app.conf\n\n# 数据库等初始化\n/mindoc/mindoc_linux_amd64 install\n\n# 运行\n/mindoc/mindoc_linux_amd64\n\n# # Debug Dockerfile\n# while [ 1 ]\n# do\n#     echo \"log ...\"\n#     sleep 5s\n# done"
  },
  {
    "path": "static/bootstrap/css/bootstrap-theme.css",
    "content": "/*!\n * Bootstrap v3.3.7 (http://getbootstrap.com)\n * Copyright 2011-2016 Twitter, Inc.\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n */\n.btn-default,\n.btn-primary,\n.btn-success,\n.btn-info,\n.btn-warning,\n.btn-danger {\n  text-shadow: 0 -1px 0 rgba(0, 0, 0, .2);\n  -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), 0 1px 1px rgba(0, 0, 0, .075);\n          box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), 0 1px 1px rgba(0, 0, 0, .075);\n}\n.btn-default:active,\n.btn-primary:active,\n.btn-success:active,\n.btn-info:active,\n.btn-warning:active,\n.btn-danger:active,\n.btn-default.active,\n.btn-primary.active,\n.btn-success.active,\n.btn-info.active,\n.btn-warning.active,\n.btn-danger.active {\n  -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125);\n          box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125);\n}\n.btn-default.disabled,\n.btn-primary.disabled,\n.btn-success.disabled,\n.btn-info.disabled,\n.btn-warning.disabled,\n.btn-danger.disabled,\n.btn-default[disabled],\n.btn-primary[disabled],\n.btn-success[disabled],\n.btn-info[disabled],\n.btn-warning[disabled],\n.btn-danger[disabled],\nfieldset[disabled] .btn-default,\nfieldset[disabled] .btn-primary,\nfieldset[disabled] .btn-success,\nfieldset[disabled] .btn-info,\nfieldset[disabled] .btn-warning,\nfieldset[disabled] .btn-danger {\n  -webkit-box-shadow: none;\n          box-shadow: none;\n}\n.btn-default .badge,\n.btn-primary .badge,\n.btn-success .badge,\n.btn-info .badge,\n.btn-warning .badge,\n.btn-danger .badge {\n  text-shadow: none;\n}\n.btn:active,\n.btn.active {\n  background-image: none;\n}\n.btn-default {\n  text-shadow: 0 1px 0 #fff;\n  background-image: -webkit-linear-gradient(top, #fff 0%, #e0e0e0 100%);\n  background-image:      -o-linear-gradient(top, #fff 0%, #e0e0e0 100%);\n  background-image: -webkit-gradient(linear, left top, left bottom, from(#fff), to(#e0e0e0));\n  background-image:         linear-gradient(to bottom, #fff 0%, #e0e0e0 100%);\n  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe0e0e0', GradientType=0);\n  filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);\n  background-repeat: repeat-x;\n  border-color: #dbdbdb;\n  border-color: #ccc;\n}\n.btn-default:hover,\n.btn-default:focus {\n  background-color: #e0e0e0;\n  background-position: 0 -15px;\n}\n.btn-default:active,\n.btn-default.active {\n  background-color: #e0e0e0;\n  border-color: #dbdbdb;\n}\n.btn-default.disabled,\n.btn-default[disabled],\nfieldset[disabled] .btn-default,\n.btn-default.disabled:hover,\n.btn-default[disabled]:hover,\nfieldset[disabled] .btn-default:hover,\n.btn-default.disabled:focus,\n.btn-default[disabled]:focus,\nfieldset[disabled] .btn-default:focus,\n.btn-default.disabled.focus,\n.btn-default[disabled].focus,\nfieldset[disabled] .btn-default.focus,\n.btn-default.disabled:active,\n.btn-default[disabled]:active,\nfieldset[disabled] .btn-default:active,\n.btn-default.disabled.active,\n.btn-default[disabled].active,\nfieldset[disabled] .btn-default.active {\n  background-color: #e0e0e0;\n  background-image: none;\n}\n.btn-primary {\n  background-image: -webkit-linear-gradient(top, #337ab7 0%, #265a88 100%);\n  background-image:      -o-linear-gradient(top, #337ab7 0%, #265a88 100%);\n  background-image: -webkit-gradient(linear, left top, left bottom, from(#337ab7), to(#265a88));\n  background-image:         linear-gradient(to bottom, #337ab7 0%, #265a88 100%);\n  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff265a88', GradientType=0);\n  filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);\n  background-repeat: repeat-x;\n  border-color: #245580;\n}\n.btn-primary:hover,\n.btn-primary:focus {\n  background-color: #265a88;\n  background-position: 0 -15px;\n}\n.btn-primary:active,\n.btn-primary.active {\n  background-color: #265a88;\n  border-color: #245580;\n}\n.btn-primary.disabled,\n.btn-primary[disabled],\nfieldset[disabled] .btn-primary,\n.btn-primary.disabled:hover,\n.btn-primary[disabled]:hover,\nfieldset[disabled] .btn-primary:hover,\n.btn-primary.disabled:focus,\n.btn-primary[disabled]:focus,\nfieldset[disabled] .btn-primary:focus,\n.btn-primary.disabled.focus,\n.btn-primary[disabled].focus,\nfieldset[disabled] .btn-primary.focus,\n.btn-primary.disabled:active,\n.btn-primary[disabled]:active,\nfieldset[disabled] .btn-primary:active,\n.btn-primary.disabled.active,\n.btn-primary[disabled].active,\nfieldset[disabled] .btn-primary.active {\n  background-color: #265a88;\n  background-image: none;\n}\n.btn-success {\n  background-image: -webkit-linear-gradient(top, #5cb85c 0%, #419641 100%);\n  background-image:      -o-linear-gradient(top, #5cb85c 0%, #419641 100%);\n  background-image: -webkit-gradient(linear, left top, left bottom, from(#5cb85c), to(#419641));\n  background-image:         linear-gradient(to bottom, #5cb85c 0%, #419641 100%);\n  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5cb85c', endColorstr='#ff419641', GradientType=0);\n  filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);\n  background-repeat: repeat-x;\n  border-color: #3e8f3e;\n}\n.btn-success:hover,\n.btn-success:focus {\n  background-color: #419641;\n  background-position: 0 -15px;\n}\n.btn-success:active,\n.btn-success.active {\n  background-color: #419641;\n  border-color: #3e8f3e;\n}\n.btn-success.disabled,\n.btn-success[disabled],\nfieldset[disabled] .btn-success,\n.btn-success.disabled:hover,\n.btn-success[disabled]:hover,\nfieldset[disabled] .btn-success:hover,\n.btn-success.disabled:focus,\n.btn-success[disabled]:focus,\nfieldset[disabled] .btn-success:focus,\n.btn-success.disabled.focus,\n.btn-success[disabled].focus,\nfieldset[disabled] .btn-success.focus,\n.btn-success.disabled:active,\n.btn-success[disabled]:active,\nfieldset[disabled] .btn-success:active,\n.btn-success.disabled.active,\n.btn-success[disabled].active,\nfieldset[disabled] .btn-success.active {\n  background-color: #419641;\n  background-image: none;\n}\n.btn-info {\n  background-image: -webkit-linear-gradient(top, #5bc0de 0%, #2aabd2 100%);\n  background-image:      -o-linear-gradient(top, #5bc0de 0%, #2aabd2 100%);\n  background-image: -webkit-gradient(linear, left top, left bottom, from(#5bc0de), to(#2aabd2));\n  background-image:         linear-gradient(to bottom, #5bc0de 0%, #2aabd2 100%);\n  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff2aabd2', GradientType=0);\n  filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);\n  background-repeat: repeat-x;\n  border-color: #28a4c9;\n}\n.btn-info:hover,\n.btn-info:focus {\n  background-color: #2aabd2;\n  background-position: 0 -15px;\n}\n.btn-info:active,\n.btn-info.active {\n  background-color: #2aabd2;\n  border-color: #28a4c9;\n}\n.btn-info.disabled,\n.btn-info[disabled],\nfieldset[disabled] .btn-info,\n.btn-info.disabled:hover,\n.btn-info[disabled]:hover,\nfieldset[disabled] .btn-info:hover,\n.btn-info.disabled:focus,\n.btn-info[disabled]:focus,\nfieldset[disabled] .btn-info:focus,\n.btn-info.disabled.focus,\n.btn-info[disabled].focus,\nfieldset[disabled] .btn-info.focus,\n.btn-info.disabled:active,\n.btn-info[disabled]:active,\nfieldset[disabled] .btn-info:active,\n.btn-info.disabled.active,\n.btn-info[disabled].active,\nfieldset[disabled] .btn-info.active {\n  background-color: #2aabd2;\n  background-image: none;\n}\n.btn-warning {\n  background-image: -webkit-linear-gradient(top, #f0ad4e 0%, #eb9316 100%);\n  background-image:      -o-linear-gradient(top, #f0ad4e 0%, #eb9316 100%);\n  background-image: -webkit-gradient(linear, left top, left bottom, from(#f0ad4e), to(#eb9316));\n  background-image:         linear-gradient(to bottom, #f0ad4e 0%, #eb9316 100%);\n  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff0ad4e', endColorstr='#ffeb9316', GradientType=0);\n  filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);\n  background-repeat: repeat-x;\n  border-color: #e38d13;\n}\n.btn-warning:hover,\n.btn-warning:focus {\n  background-color: #eb9316;\n  background-position: 0 -15px;\n}\n.btn-warning:active,\n.btn-warning.active {\n  background-color: #eb9316;\n  border-color: #e38d13;\n}\n.btn-warning.disabled,\n.btn-warning[disabled],\nfieldset[disabled] .btn-warning,\n.btn-warning.disabled:hover,\n.btn-warning[disabled]:hover,\nfieldset[disabled] .btn-warning:hover,\n.btn-warning.disabled:focus,\n.btn-warning[disabled]:focus,\nfieldset[disabled] .btn-warning:focus,\n.btn-warning.disabled.focus,\n.btn-warning[disabled].focus,\nfieldset[disabled] .btn-warning.focus,\n.btn-warning.disabled:active,\n.btn-warning[disabled]:active,\nfieldset[disabled] .btn-warning:active,\n.btn-warning.disabled.active,\n.btn-warning[disabled].active,\nfieldset[disabled] .btn-warning.active {\n  background-color: #eb9316;\n  background-image: none;\n}\n.btn-danger {\n  background-image: -webkit-linear-gradient(top, #d9534f 0%, #c12e2a 100%);\n  background-image:      -o-linear-gradient(top, #d9534f 0%, #c12e2a 100%);\n  background-image: -webkit-gradient(linear, left top, left bottom, from(#d9534f), to(#c12e2a));\n  background-image:         linear-gradient(to bottom, #d9534f 0%, #c12e2a 100%);\n  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f', endColorstr='#ffc12e2a', GradientType=0);\n  filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);\n  background-repeat: repeat-x;\n  border-color: #b92c28;\n}\n.btn-danger:hover,\n.btn-danger:focus {\n  background-color: #c12e2a;\n  background-position: 0 -15px;\n}\n.btn-danger:active,\n.btn-danger.active {\n  background-color: #c12e2a;\n  border-color: #b92c28;\n}\n.btn-danger.disabled,\n.btn-danger[disabled],\nfieldset[disabled] .btn-danger,\n.btn-danger.disabled:hover,\n.btn-danger[disabled]:hover,\nfieldset[disabled] .btn-danger:hover,\n.btn-danger.disabled:focus,\n.btn-danger[disabled]:focus,\nfieldset[disabled] .btn-danger:focus,\n.btn-danger.disabled.focus,\n.btn-danger[disabled].focus,\nfieldset[disabled] .btn-danger.focus,\n.btn-danger.disabled:active,\n.btn-danger[disabled]:active,\nfieldset[disabled] .btn-danger:active,\n.btn-danger.disabled.active,\n.btn-danger[disabled].active,\nfieldset[disabled] .btn-danger.active {\n  background-color: #c12e2a;\n  background-image: none;\n}\n.thumbnail,\n.img-thumbnail {\n  -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, .075);\n          box-shadow: 0 1px 2px rgba(0, 0, 0, .075);\n}\n.dropdown-menu > li > a:hover,\n.dropdown-menu > li > a:focus {\n  background-color: #e8e8e8;\n  background-image: -webkit-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%);\n  background-image:      -o-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%);\n  background-image: -webkit-gradient(linear, left top, left bottom, from(#f5f5f5), to(#e8e8e8));\n  background-image:         linear-gradient(to bottom, #f5f5f5 0%, #e8e8e8 100%);\n  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#ffe8e8e8', GradientType=0);\n  background-repeat: repeat-x;\n}\n.dropdown-menu > .active > a,\n.dropdown-menu > .active > a:hover,\n.dropdown-menu > .active > a:focus {\n  background-color: #2e6da4;\n  background-image: -webkit-linear-gradient(top, #337ab7 0%, #2e6da4 100%);\n  background-image:      -o-linear-gradient(top, #337ab7 0%, #2e6da4 100%);\n  background-image: -webkit-gradient(linear, left top, left bottom, from(#337ab7), to(#2e6da4));\n  background-image:         linear-gradient(to bottom, #337ab7 0%, #2e6da4 100%);\n  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0);\n  background-repeat: repeat-x;\n}\n.navbar-default {\n  background-image: -webkit-linear-gradient(top, #fff 0%, #f8f8f8 100%);\n  background-image:      -o-linear-gradient(top, #fff 0%, #f8f8f8 100%);\n  background-image: -webkit-gradient(linear, left top, left bottom, from(#fff), to(#f8f8f8));\n  background-image:         linear-gradient(to bottom, #fff 0%, #f8f8f8 100%);\n  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#fff8f8f8', GradientType=0);\n  filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);\n  background-repeat: repeat-x;\n  border-radius: 4px;\n  -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), 0 1px 5px rgba(0, 0, 0, .075);\n          box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), 0 1px 5px rgba(0, 0, 0, .075);\n}\n.navbar-default .navbar-nav > .open > a,\n.navbar-default .navbar-nav > .active > a {\n  background-image: -webkit-linear-gradient(top, #dbdbdb 0%, #e2e2e2 100%);\n  background-image:      -o-linear-gradient(top, #dbdbdb 0%, #e2e2e2 100%);\n  background-image: -webkit-gradient(linear, left top, left bottom, from(#dbdbdb), to(#e2e2e2));\n  background-image:         linear-gradient(to bottom, #dbdbdb 0%, #e2e2e2 100%);\n  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdbdbdb', endColorstr='#ffe2e2e2', GradientType=0);\n  background-repeat: repeat-x;\n  -webkit-box-shadow: inset 0 3px 9px rgba(0, 0, 0, .075);\n          box-shadow: inset 0 3px 9px rgba(0, 0, 0, .075);\n}\n.navbar-brand,\n.navbar-nav > li > a {\n  text-shadow: 0 1px 0 rgba(255, 255, 255, .25);\n}\n.navbar-inverse {\n  background-image: -webkit-linear-gradient(top, #3c3c3c 0%, #222 100%);\n  background-image:      -o-linear-gradient(top, #3c3c3c 0%, #222 100%);\n  background-image: -webkit-gradient(linear, left top, left bottom, from(#3c3c3c), to(#222));\n  background-image:         linear-gradient(to bottom, #3c3c3c 0%, #222 100%);\n  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff3c3c3c', endColorstr='#ff222222', GradientType=0);\n  filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);\n  background-repeat: repeat-x;\n  border-radius: 4px;\n}\n.navbar-inverse .navbar-nav > .open > a,\n.navbar-inverse .navbar-nav > .active > a {\n  background-image: -webkit-linear-gradient(top, #080808 0%, #0f0f0f 100%);\n  background-image:      -o-linear-gradient(top, #080808 0%, #0f0f0f 100%);\n  background-image: -webkit-gradient(linear, left top, left bottom, from(#080808), to(#0f0f0f));\n  background-image:         linear-gradient(to bottom, #080808 0%, #0f0f0f 100%);\n  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff080808', endColorstr='#ff0f0f0f', GradientType=0);\n  background-repeat: repeat-x;\n  -webkit-box-shadow: inset 0 3px 9px rgba(0, 0, 0, .25);\n          box-shadow: inset 0 3px 9px rgba(0, 0, 0, .25);\n}\n.navbar-inverse .navbar-brand,\n.navbar-inverse .navbar-nav > li > a {\n  text-shadow: 0 -1px 0 rgba(0, 0, 0, .25);\n}\n.navbar-static-top,\n.navbar-fixed-top,\n.navbar-fixed-bottom {\n  border-radius: 0;\n}\n@media (max-width: 767px) {\n  .navbar .navbar-nav .open .dropdown-menu > .active > a,\n  .navbar .navbar-nav .open .dropdown-menu > .active > a:hover,\n  .navbar .navbar-nav .open .dropdown-menu > .active > a:focus {\n    color: #fff;\n    background-image: -webkit-linear-gradient(top, #337ab7 0%, #2e6da4 100%);\n    background-image:      -o-linear-gradient(top, #337ab7 0%, #2e6da4 100%);\n    background-image: -webkit-gradient(linear, left top, left bottom, from(#337ab7), to(#2e6da4));\n    background-image:         linear-gradient(to bottom, #337ab7 0%, #2e6da4 100%);\n    filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0);\n    background-repeat: repeat-x;\n  }\n}\n.alert {\n  text-shadow: 0 1px 0 rgba(255, 255, 255, .2);\n  -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 1px 2px rgba(0, 0, 0, .05);\n          box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 1px 2px rgba(0, 0, 0, .05);\n}\n.alert-success {\n  background-image: -webkit-linear-gradient(top, #dff0d8 0%, #c8e5bc 100%);\n  background-image:      -o-linear-gradient(top, #dff0d8 0%, #c8e5bc 100%);\n  background-image: -webkit-gradient(linear, left top, left bottom, from(#dff0d8), to(#c8e5bc));\n  background-image:         linear-gradient(to bottom, #dff0d8 0%, #c8e5bc 100%);\n  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8', endColorstr='#ffc8e5bc', GradientType=0);\n  background-repeat: repeat-x;\n  border-color: #b2dba1;\n}\n.alert-info {\n  background-image: -webkit-linear-gradient(top, #d9edf7 0%, #b9def0 100%);\n  background-image:      -o-linear-gradient(top, #d9edf7 0%, #b9def0 100%);\n  background-image: -webkit-gradient(linear, left top, left bottom, from(#d9edf7), to(#b9def0));\n  background-image:         linear-gradient(to bottom, #d9edf7 0%, #b9def0 100%);\n  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7', endColorstr='#ffb9def0', GradientType=0);\n  background-repeat: repeat-x;\n  border-color: #9acfea;\n}\n.alert-warning {\n  background-image: -webkit-linear-gradient(top, #fcf8e3 0%, #f8efc0 100%);\n  background-image:      -o-linear-gradient(top, #fcf8e3 0%, #f8efc0 100%);\n  background-image: -webkit-gradient(linear, left top, left bottom, from(#fcf8e3), to(#f8efc0));\n  background-image:         linear-gradient(to bottom, #fcf8e3 0%, #f8efc0 100%);\n  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3', endColorstr='#fff8efc0', GradientType=0);\n  background-repeat: repeat-x;\n  border-color: #f5e79e;\n}\n.alert-danger {\n  background-image: -webkit-linear-gradient(top, #f2dede 0%, #e7c3c3 100%);\n  background-image:      -o-linear-gradient(top, #f2dede 0%, #e7c3c3 100%);\n  background-image: -webkit-gradient(linear, left top, left bottom, from(#f2dede), to(#e7c3c3));\n  background-image:         linear-gradient(to bottom, #f2dede 0%, #e7c3c3 100%);\n  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffe7c3c3', GradientType=0);\n  background-repeat: repeat-x;\n  border-color: #dca7a7;\n}\n.progress {\n  background-image: -webkit-linear-gradient(top, #ebebeb 0%, #f5f5f5 100%);\n  background-image:      -o-linear-gradient(top, #ebebeb 0%, #f5f5f5 100%);\n  background-image: -webkit-gradient(linear, left top, left bottom, from(#ebebeb), to(#f5f5f5));\n  background-image:         linear-gradient(to bottom, #ebebeb 0%, #f5f5f5 100%);\n  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffebebeb', endColorstr='#fff5f5f5', GradientType=0);\n  background-repeat: repeat-x;\n}\n.progress-bar {\n  background-image: -webkit-linear-gradient(top, #337ab7 0%, #286090 100%);\n  background-image:      -o-linear-gradient(top, #337ab7 0%, #286090 100%);\n  background-image: -webkit-gradient(linear, left top, left bottom, from(#337ab7), to(#286090));\n  background-image:         linear-gradient(to bottom, #337ab7 0%, #286090 100%);\n  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff286090', GradientType=0);\n  background-repeat: repeat-x;\n}\n.progress-bar-success {\n  background-image: -webkit-linear-gradient(top, #5cb85c 0%, #449d44 100%);\n  background-image:      -o-linear-gradient(top, #5cb85c 0%, #449d44 100%);\n  background-image: -webkit-gradient(linear, left top, left bottom, from(#5cb85c), to(#449d44));\n  background-image:         linear-gradient(to bottom, #5cb85c 0%, #449d44 100%);\n  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5cb85c', endColorstr='#ff449d44', GradientType=0);\n  background-repeat: repeat-x;\n}\n.progress-bar-info {\n  background-image: -webkit-linear-gradient(top, #5bc0de 0%, #31b0d5 100%);\n  background-image:      -o-linear-gradient(top, #5bc0de 0%, #31b0d5 100%);\n  background-image: -webkit-gradient(linear, left top, left bottom, from(#5bc0de), to(#31b0d5));\n  background-image:         linear-gradient(to bottom, #5bc0de 0%, #31b0d5 100%);\n  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff31b0d5', GradientType=0);\n  background-repeat: repeat-x;\n}\n.progress-bar-warning {\n  background-image: -webkit-linear-gradient(top, #f0ad4e 0%, #ec971f 100%);\n  background-image:      -o-linear-gradient(top, #f0ad4e 0%, #ec971f 100%);\n  background-image: -webkit-gradient(linear, left top, left bottom, from(#f0ad4e), to(#ec971f));\n  background-image:         linear-gradient(to bottom, #f0ad4e 0%, #ec971f 100%);\n  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff0ad4e', endColorstr='#ffec971f', GradientType=0);\n  background-repeat: repeat-x;\n}\n.progress-bar-danger {\n  background-image: -webkit-linear-gradient(top, #d9534f 0%, #c9302c 100%);\n  background-image:      -o-linear-gradient(top, #d9534f 0%, #c9302c 100%);\n  background-image: -webkit-gradient(linear, left top, left bottom, from(#d9534f), to(#c9302c));\n  background-image:         linear-gradient(to bottom, #d9534f 0%, #c9302c 100%);\n  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f', endColorstr='#ffc9302c', GradientType=0);\n  background-repeat: repeat-x;\n}\n.progress-bar-striped {\n  background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);\n  background-image:      -o-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);\n  background-image:         linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);\n}\n.list-group {\n  border-radius: 4px;\n  -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, .075);\n          box-shadow: 0 1px 2px rgba(0, 0, 0, .075);\n}\n.list-group-item.active,\n.list-group-item.active:hover,\n.list-group-item.active:focus {\n  text-shadow: 0 -1px 0 #286090;\n  background-image: -webkit-linear-gradient(top, #337ab7 0%, #2b669a 100%);\n  background-image:      -o-linear-gradient(top, #337ab7 0%, #2b669a 100%);\n  background-image: -webkit-gradient(linear, left top, left bottom, from(#337ab7), to(#2b669a));\n  background-image:         linear-gradient(to bottom, #337ab7 0%, #2b669a 100%);\n  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2b669a', GradientType=0);\n  background-repeat: repeat-x;\n  border-color: #2b669a;\n}\n.list-group-item.active .badge,\n.list-group-item.active:hover .badge,\n.list-group-item.active:focus .badge {\n  text-shadow: none;\n}\n.panel {\n  -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, .05);\n          box-shadow: 0 1px 2px rgba(0, 0, 0, .05);\n}\n.panel-default > .panel-heading {\n  background-image: -webkit-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%);\n  background-image:      -o-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%);\n  background-image: -webkit-gradient(linear, left top, left bottom, from(#f5f5f5), to(#e8e8e8));\n  background-image:         linear-gradient(to bottom, #f5f5f5 0%, #e8e8e8 100%);\n  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#ffe8e8e8', GradientType=0);\n  background-repeat: repeat-x;\n}\n.panel-primary > .panel-heading {\n  background-image: -webkit-linear-gradient(top, #337ab7 0%, #2e6da4 100%);\n  background-image:      -o-linear-gradient(top, #337ab7 0%, #2e6da4 100%);\n  background-image: -webkit-gradient(linear, left top, left bottom, from(#337ab7), to(#2e6da4));\n  background-image:         linear-gradient(to bottom, #337ab7 0%, #2e6da4 100%);\n  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0);\n  background-repeat: repeat-x;\n}\n.panel-success > .panel-heading {\n  background-image: -webkit-linear-gradient(top, #dff0d8 0%, #d0e9c6 100%);\n  background-image:      -o-linear-gradient(top, #dff0d8 0%, #d0e9c6 100%);\n  background-image: -webkit-gradient(linear, left top, left bottom, from(#dff0d8), to(#d0e9c6));\n  background-image:         linear-gradient(to bottom, #dff0d8 0%, #d0e9c6 100%);\n  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8', endColorstr='#ffd0e9c6', GradientType=0);\n  background-repeat: repeat-x;\n}\n.panel-info > .panel-heading {\n  background-image: -webkit-linear-gradient(top, #d9edf7 0%, #c4e3f3 100%);\n  background-image:      -o-linear-gradient(top, #d9edf7 0%, #c4e3f3 100%);\n  background-image: -webkit-gradient(linear, left top, left bottom, from(#d9edf7), to(#c4e3f3));\n  background-image:         linear-gradient(to bottom, #d9edf7 0%, #c4e3f3 100%);\n  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7', endColorstr='#ffc4e3f3', GradientType=0);\n  background-repeat: repeat-x;\n}\n.panel-warning > .panel-heading {\n  background-image: -webkit-linear-gradient(top, #fcf8e3 0%, #faf2cc 100%);\n  background-image:      -o-linear-gradient(top, #fcf8e3 0%, #faf2cc 100%);\n  background-image: -webkit-gradient(linear, left top, left bottom, from(#fcf8e3), to(#faf2cc));\n  background-image:         linear-gradient(to bottom, #fcf8e3 0%, #faf2cc 100%);\n  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3', endColorstr='#fffaf2cc', GradientType=0);\n  background-repeat: repeat-x;\n}\n.panel-danger > .panel-heading {\n  background-image: -webkit-linear-gradient(top, #f2dede 0%, #ebcccc 100%);\n  background-image:      -o-linear-gradient(top, #f2dede 0%, #ebcccc 100%);\n  background-image: -webkit-gradient(linear, left top, left bottom, from(#f2dede), to(#ebcccc));\n  background-image:         linear-gradient(to bottom, #f2dede 0%, #ebcccc 100%);\n  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffebcccc', GradientType=0);\n  background-repeat: repeat-x;\n}\n.well {\n  background-image: -webkit-linear-gradient(top, #e8e8e8 0%, #f5f5f5 100%);\n  background-image:      -o-linear-gradient(top, #e8e8e8 0%, #f5f5f5 100%);\n  background-image: -webkit-gradient(linear, left top, left bottom, from(#e8e8e8), to(#f5f5f5));\n  background-image:         linear-gradient(to bottom, #e8e8e8 0%, #f5f5f5 100%);\n  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffe8e8e8', endColorstr='#fff5f5f5', GradientType=0);\n  background-repeat: repeat-x;\n  border-color: #dcdcdc;\n  -webkit-box-shadow: inset 0 1px 3px rgba(0, 0, 0, .05), 0 1px 0 rgba(255, 255, 255, .1);\n          box-shadow: inset 0 1px 3px rgba(0, 0, 0, .05), 0 1px 0 rgba(255, 255, 255, .1);\n}\n/*# sourceMappingURL=bootstrap-theme.css.map */\n"
  },
  {
    "path": "static/bootstrap/css/bootstrap.css",
    "content": "/*!\n * Bootstrap v3.3.7 (http://getbootstrap.com)\n * Copyright 2011-2016 Twitter, Inc.\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n */\n/*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */\nhtml {\n  font-family: sans-serif;\n  -webkit-text-size-adjust: 100%;\n      -ms-text-size-adjust: 100%;\n}\nbody {\n  margin: 0;\n}\narticle,\naside,\ndetails,\nfigcaption,\nfigure,\nfooter,\nheader,\nhgroup,\nmain,\nmenu,\nnav,\nsection,\nsummary {\n  display: block;\n}\naudio,\ncanvas,\nprogress,\nvideo {\n  display: inline-block;\n  vertical-align: baseline;\n}\naudio:not([controls]) {\n  display: none;\n  height: 0;\n}\n[hidden],\ntemplate {\n  display: none;\n}\na {\n  background-color: transparent;\n}\na:active,\na:hover {\n  outline: 0;\n}\nabbr[title] {\n  border-bottom: 1px dotted;\n}\nb,\nstrong {\n  font-weight: bold;\n}\ndfn {\n  font-style: italic;\n}\nh1 {\n  margin: .67em 0;\n  font-size: 2em;\n}\nmark {\n  color: #000;\n  background: #ff0;\n}\nsmall {\n  font-size: 80%;\n}\nsub,\nsup {\n  position: relative;\n  font-size: 75%;\n  line-height: 0;\n  vertical-align: baseline;\n}\nsup {\n  top: -.5em;\n}\nsub {\n  bottom: -.25em;\n}\nimg {\n  border: 0;\n}\nsvg:not(:root) {\n  overflow: hidden;\n}\nfigure {\n  margin: 1em 40px;\n}\nhr {\n  height: 0;\n  -webkit-box-sizing: content-box;\n     -moz-box-sizing: content-box;\n          box-sizing: content-box;\n}\npre {\n  overflow: auto;\n}\ncode,\nkbd,\npre,\nsamp {\n  font-family: monospace, monospace;\n  font-size: 1em;\n}\nbutton,\ninput,\noptgroup,\nselect,\ntextarea {\n  margin: 0;\n  font: inherit;\n  color: inherit;\n}\nbutton {\n  overflow: visible;\n}\nbutton,\nselect {\n  text-transform: none;\n}\nbutton,\nhtml input[type=\"button\"],\ninput[type=\"reset\"],\ninput[type=\"submit\"] {\n  -webkit-appearance: button;\n  cursor: pointer;\n}\nbutton[disabled],\nhtml input[disabled] {\n  cursor: default;\n}\nbutton::-moz-focus-inner,\ninput::-moz-focus-inner {\n  padding: 0;\n  border: 0;\n}\ninput {\n  line-height: normal;\n}\ninput[type=\"checkbox\"],\ninput[type=\"radio\"] {\n  -webkit-box-sizing: border-box;\n     -moz-box-sizing: border-box;\n          box-sizing: border-box;\n  padding: 0;\n}\ninput[type=\"number\"]::-webkit-inner-spin-button,\ninput[type=\"number\"]::-webkit-outer-spin-button {\n  height: auto;\n}\ninput[type=\"search\"] {\n  -webkit-box-sizing: content-box;\n     -moz-box-sizing: content-box;\n          box-sizing: content-box;\n  -webkit-appearance: textfield;\n}\ninput[type=\"search\"]::-webkit-search-cancel-button,\ninput[type=\"search\"]::-webkit-search-decoration {\n  -webkit-appearance: none;\n}\nfieldset {\n  padding: .35em .625em .75em;\n  margin: 0 2px;\n  border: 1px solid #c0c0c0;\n}\nlegend {\n  padding: 0;\n  border: 0;\n}\ntextarea {\n  overflow: auto;\n}\noptgroup {\n  font-weight: bold;\n}\ntable {\n  border-spacing: 0;\n  border-collapse: collapse;\n}\ntd,\nth {\n  padding: 0;\n}\n/*! Source: https://github.com/h5bp/html5-boilerplate/blob/master/src/css/main.css */\n@media print {\n  *,\n  *:before,\n  *:after {\n    color: #000 !important;\n    text-shadow: none !important;\n    background: transparent !important;\n    -webkit-box-shadow: none !important;\n            box-shadow: none !important;\n  }\n  a,\n  a:visited {\n    text-decoration: underline;\n  }\n  a[href]:after {\n    content: \" (\" attr(href) \")\";\n  }\n  abbr[title]:after {\n    content: \" (\" attr(title) \")\";\n  }\n  a[href^=\"#\"]:after,\n  a[href^=\"javascript:\"]:after {\n    content: \"\";\n  }\n  pre,\n  blockquote {\n    border: 1px solid #999;\n\n    page-break-inside: avoid;\n  }\n  thead {\n    display: table-header-group;\n  }\n  tr,\n  img {\n    page-break-inside: avoid;\n  }\n  img {\n    max-width: 100% !important;\n  }\n  p,\n  h2,\n  h3 {\n    orphans: 3;\n    widows: 3;\n  }\n  h2,\n  h3 {\n    page-break-after: avoid;\n  }\n  .navbar {\n    display: none;\n  }\n  .btn > .caret,\n  .dropup > .btn > .caret {\n    border-top-color: #000 !important;\n  }\n  .label {\n    border: 1px solid #000;\n  }\n  .table {\n    border-collapse: collapse !important;\n  }\n  .table td,\n  .table th {\n    background-color: #fff !important;\n  }\n  .table-bordered th,\n  .table-bordered td {\n    border: 1px solid #ddd !important;\n  }\n}\n@font-face {\n  font-family: 'Glyphicons Halflings';\n\n  src: url('../fonts/glyphicons-halflings-regular.eot');\n  src: url('../fonts/glyphicons-halflings-regular.eot?#iefix') format('embedded-opentype'), url('../fonts/glyphicons-halflings-regular.woff2') format('woff2'), url('../fonts/glyphicons-halflings-regular.woff') format('woff'), url('../fonts/glyphicons-halflings-regular.ttf') format('truetype'), url('../fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular') format('svg');\n}\n.glyphicon {\n  position: relative;\n  top: 1px;\n  display: inline-block;\n  font-family: 'Glyphicons Halflings';\n  font-style: normal;\n  font-weight: normal;\n  line-height: 1;\n\n  -webkit-font-smoothing: antialiased;\n  -moz-osx-font-smoothing: grayscale;\n}\n.glyphicon-asterisk:before {\n  content: \"\\002a\";\n}\n.glyphicon-plus:before {\n  content: \"\\002b\";\n}\n.glyphicon-euro:before,\n.glyphicon-eur:before {\n  content: \"\\20ac\";\n}\n.glyphicon-minus:before {\n  content: \"\\2212\";\n}\n.glyphicon-cloud:before {\n  content: \"\\2601\";\n}\n.glyphicon-envelope:before {\n  content: \"\\2709\";\n}\n.glyphicon-pencil:before {\n  content: \"\\270f\";\n}\n.glyphicon-glass:before {\n  content: \"\\e001\";\n}\n.glyphicon-music:before {\n  content: \"\\e002\";\n}\n.glyphicon-search:before {\n  content: \"\\e003\";\n}\n.glyphicon-heart:before {\n  content: \"\\e005\";\n}\n.glyphicon-star:before {\n  content: \"\\e006\";\n}\n.glyphicon-star-empty:before {\n  content: \"\\e007\";\n}\n.glyphicon-user:before {\n  content: \"\\e008\";\n}\n.glyphicon-film:before {\n  content: \"\\e009\";\n}\n.glyphicon-th-large:before {\n  content: \"\\e010\";\n}\n.glyphicon-th:before {\n  content: \"\\e011\";\n}\n.glyphicon-th-list:before {\n  content: \"\\e012\";\n}\n.glyphicon-ok:before {\n  content: \"\\e013\";\n}\n.glyphicon-remove:before {\n  content: \"\\e014\";\n}\n.glyphicon-zoom-in:before {\n  content: \"\\e015\";\n}\n.glyphicon-zoom-out:before {\n  content: \"\\e016\";\n}\n.glyphicon-off:before {\n  content: \"\\e017\";\n}\n.glyphicon-signal:before {\n  content: \"\\e018\";\n}\n.glyphicon-cog:before {\n  content: \"\\e019\";\n}\n.glyphicon-trash:before {\n  content: \"\\e020\";\n}\n.glyphicon-home:before {\n  content: \"\\e021\";\n}\n.glyphicon-file:before {\n  content: \"\\e022\";\n}\n.glyphicon-time:before {\n  content: \"\\e023\";\n}\n.glyphicon-road:before {\n  content: \"\\e024\";\n}\n.glyphicon-download-alt:before {\n  content: \"\\e025\";\n}\n.glyphicon-download:before {\n  content: \"\\e026\";\n}\n.glyphicon-upload:before {\n  content: \"\\e027\";\n}\n.glyphicon-inbox:before {\n  content: \"\\e028\";\n}\n.glyphicon-play-circle:before {\n  content: \"\\e029\";\n}\n.glyphicon-repeat:before {\n  content: \"\\e030\";\n}\n.glyphicon-refresh:before {\n  content: \"\\e031\";\n}\n.glyphicon-list-alt:before {\n  content: \"\\e032\";\n}\n.glyphicon-lock:before {\n  content: \"\\e033\";\n}\n.glyphicon-flag:before {\n  content: \"\\e034\";\n}\n.glyphicon-headphones:before {\n  content: \"\\e035\";\n}\n.glyphicon-volume-off:before {\n  content: \"\\e036\";\n}\n.glyphicon-volume-down:before {\n  content: \"\\e037\";\n}\n.glyphicon-volume-up:before {\n  content: \"\\e038\";\n}\n.glyphicon-qrcode:before {\n  content: \"\\e039\";\n}\n.glyphicon-barcode:before {\n  content: \"\\e040\";\n}\n.glyphicon-tag:before {\n  content: \"\\e041\";\n}\n.glyphicon-tags:before {\n  content: \"\\e042\";\n}\n.glyphicon-book:before {\n  content: \"\\e043\";\n}\n.glyphicon-bookmark:before {\n  content: \"\\e044\";\n}\n.glyphicon-print:before {\n  content: \"\\e045\";\n}\n.glyphicon-camera:before {\n  content: \"\\e046\";\n}\n.glyphicon-font:before {\n  content: \"\\e047\";\n}\n.glyphicon-bold:before {\n  content: \"\\e048\";\n}\n.glyphicon-italic:before {\n  content: \"\\e049\";\n}\n.glyphicon-text-height:before {\n  content: \"\\e050\";\n}\n.glyphicon-text-width:before {\n  content: \"\\e051\";\n}\n.glyphicon-align-left:before {\n  content: \"\\e052\";\n}\n.glyphicon-align-center:before {\n  content: \"\\e053\";\n}\n.glyphicon-align-right:before {\n  content: \"\\e054\";\n}\n.glyphicon-align-justify:before {\n  content: \"\\e055\";\n}\n.glyphicon-list:before {\n  content: \"\\e056\";\n}\n.glyphicon-indent-left:before {\n  content: \"\\e057\";\n}\n.glyphicon-indent-right:before {\n  content: \"\\e058\";\n}\n.glyphicon-facetime-video:before {\n  content: \"\\e059\";\n}\n.glyphicon-picture:before {\n  content: \"\\e060\";\n}\n.glyphicon-map-marker:before {\n  content: \"\\e062\";\n}\n.glyphicon-adjust:before {\n  content: \"\\e063\";\n}\n.glyphicon-tint:before {\n  content: \"\\e064\";\n}\n.glyphicon-edit:before {\n  content: \"\\e065\";\n}\n.glyphicon-share:before {\n  content: \"\\e066\";\n}\n.glyphicon-check:before {\n  content: \"\\e067\";\n}\n.glyphicon-move:before {\n  content: \"\\e068\";\n}\n.glyphicon-step-backward:before {\n  content: \"\\e069\";\n}\n.glyphicon-fast-backward:before {\n  content: \"\\e070\";\n}\n.glyphicon-backward:before {\n  content: \"\\e071\";\n}\n.glyphicon-play:before {\n  content: \"\\e072\";\n}\n.glyphicon-pause:before {\n  content: \"\\e073\";\n}\n.glyphicon-stop:before {\n  content: \"\\e074\";\n}\n.glyphicon-forward:before {\n  content: \"\\e075\";\n}\n.glyphicon-fast-forward:before {\n  content: \"\\e076\";\n}\n.glyphicon-step-forward:before {\n  content: \"\\e077\";\n}\n.glyphicon-eject:before {\n  content: \"\\e078\";\n}\n.glyphicon-chevron-left:before {\n  content: \"\\e079\";\n}\n.glyphicon-chevron-right:before {\n  content: \"\\e080\";\n}\n.glyphicon-plus-sign:before {\n  content: \"\\e081\";\n}\n.glyphicon-minus-sign:before {\n  content: \"\\e082\";\n}\n.glyphicon-remove-sign:before {\n  content: \"\\e083\";\n}\n.glyphicon-ok-sign:before {\n  content: \"\\e084\";\n}\n.glyphicon-question-sign:before {\n  content: \"\\e085\";\n}\n.glyphicon-info-sign:before {\n  content: \"\\e086\";\n}\n.glyphicon-screenshot:before {\n  content: \"\\e087\";\n}\n.glyphicon-remove-circle:before {\n  content: \"\\e088\";\n}\n.glyphicon-ok-circle:before {\n  content: \"\\e089\";\n}\n.glyphicon-ban-circle:before {\n  content: \"\\e090\";\n}\n.glyphicon-arrow-left:before {\n  content: \"\\e091\";\n}\n.glyphicon-arrow-right:before {\n  content: \"\\e092\";\n}\n.glyphicon-arrow-up:before {\n  content: \"\\e093\";\n}\n.glyphicon-arrow-down:before {\n  content: \"\\e094\";\n}\n.glyphicon-share-alt:before {\n  content: \"\\e095\";\n}\n.glyphicon-resize-full:before {\n  content: \"\\e096\";\n}\n.glyphicon-resize-small:before {\n  content: \"\\e097\";\n}\n.glyphicon-exclamation-sign:before {\n  content: \"\\e101\";\n}\n.glyphicon-gift:before {\n  content: \"\\e102\";\n}\n.glyphicon-leaf:before {\n  content: \"\\e103\";\n}\n.glyphicon-fire:before {\n  content: \"\\e104\";\n}\n.glyphicon-eye-open:before {\n  content: \"\\e105\";\n}\n.glyphicon-eye-close:before {\n  content: \"\\e106\";\n}\n.glyphicon-warning-sign:before {\n  content: \"\\e107\";\n}\n.glyphicon-plane:before {\n  content: \"\\e108\";\n}\n.glyphicon-calendar:before {\n  content: \"\\e109\";\n}\n.glyphicon-random:before {\n  content: \"\\e110\";\n}\n.glyphicon-comment:before {\n  content: \"\\e111\";\n}\n.glyphicon-magnet:before {\n  content: \"\\e112\";\n}\n.glyphicon-chevron-up:before {\n  content: \"\\e113\";\n}\n.glyphicon-chevron-down:before {\n  content: \"\\e114\";\n}\n.glyphicon-retweet:before {\n  content: \"\\e115\";\n}\n.glyphicon-shopping-cart:before {\n  content: \"\\e116\";\n}\n.glyphicon-folder-close:before {\n  content: \"\\e117\";\n}\n.glyphicon-folder-open:before {\n  content: \"\\e118\";\n}\n.glyphicon-resize-vertical:before {\n  content: \"\\e119\";\n}\n.glyphicon-resize-horizontal:before {\n  content: \"\\e120\";\n}\n.glyphicon-hdd:before {\n  content: \"\\e121\";\n}\n.glyphicon-bullhorn:before {\n  content: \"\\e122\";\n}\n.glyphicon-bell:before {\n  content: \"\\e123\";\n}\n.glyphicon-certificate:before {\n  content: \"\\e124\";\n}\n.glyphicon-thumbs-up:before {\n  content: \"\\e125\";\n}\n.glyphicon-thumbs-down:before {\n  content: \"\\e126\";\n}\n.glyphicon-hand-right:before {\n  content: \"\\e127\";\n}\n.glyphicon-hand-left:before {\n  content: \"\\e128\";\n}\n.glyphicon-hand-up:before {\n  content: \"\\e129\";\n}\n.glyphicon-hand-down:before {\n  content: \"\\e130\";\n}\n.glyphicon-circle-arrow-right:before {\n  content: \"\\e131\";\n}\n.glyphicon-circle-arrow-left:before {\n  content: \"\\e132\";\n}\n.glyphicon-circle-arrow-up:before {\n  content: \"\\e133\";\n}\n.glyphicon-circle-arrow-down:before {\n  content: \"\\e134\";\n}\n.glyphicon-globe:before {\n  content: \"\\e135\";\n}\n.glyphicon-wrench:before {\n  content: \"\\e136\";\n}\n.glyphicon-tasks:before {\n  content: \"\\e137\";\n}\n.glyphicon-filter:before {\n  content: \"\\e138\";\n}\n.glyphicon-briefcase:before {\n  content: \"\\e139\";\n}\n.glyphicon-fullscreen:before {\n  content: \"\\e140\";\n}\n.glyphicon-dashboard:before {\n  content: \"\\e141\";\n}\n.glyphicon-paperclip:before {\n  content: \"\\e142\";\n}\n.glyphicon-heart-empty:before {\n  content: \"\\e143\";\n}\n.glyphicon-link:before {\n  content: \"\\e144\";\n}\n.glyphicon-phone:before {\n  content: \"\\e145\";\n}\n.glyphicon-pushpin:before {\n  content: \"\\e146\";\n}\n.glyphicon-usd:before {\n  content: \"\\e148\";\n}\n.glyphicon-gbp:before {\n  content: \"\\e149\";\n}\n.glyphicon-sort:before {\n  content: \"\\e150\";\n}\n.glyphicon-sort-by-alphabet:before {\n  content: \"\\e151\";\n}\n.glyphicon-sort-by-alphabet-alt:before {\n  content: \"\\e152\";\n}\n.glyphicon-sort-by-order:before {\n  content: \"\\e153\";\n}\n.glyphicon-sort-by-order-alt:before {\n  content: \"\\e154\";\n}\n.glyphicon-sort-by-attributes:before {\n  content: \"\\e155\";\n}\n.glyphicon-sort-by-attributes-alt:before {\n  content: \"\\e156\";\n}\n.glyphicon-unchecked:before {\n  content: \"\\e157\";\n}\n.glyphicon-expand:before {\n  content: \"\\e158\";\n}\n.glyphicon-collapse-down:before {\n  content: \"\\e159\";\n}\n.glyphicon-collapse-up:before {\n  content: \"\\e160\";\n}\n.glyphicon-log-in:before {\n  content: \"\\e161\";\n}\n.glyphicon-flash:before {\n  content: \"\\e162\";\n}\n.glyphicon-log-out:before {\n  content: \"\\e163\";\n}\n.glyphicon-new-window:before {\n  content: \"\\e164\";\n}\n.glyphicon-record:before {\n  content: \"\\e165\";\n}\n.glyphicon-save:before {\n  content: \"\\e166\";\n}\n.glyphicon-open:before {\n  content: \"\\e167\";\n}\n.glyphicon-saved:before {\n  content: \"\\e168\";\n}\n.glyphicon-import:before {\n  content: \"\\e169\";\n}\n.glyphicon-export:before {\n  content: \"\\e170\";\n}\n.glyphicon-send:before {\n  content: \"\\e171\";\n}\n.glyphicon-floppy-disk:before {\n  content: \"\\e172\";\n}\n.glyphicon-floppy-saved:before {\n  content: \"\\e173\";\n}\n.glyphicon-floppy-remove:before {\n  content: \"\\e174\";\n}\n.glyphicon-floppy-save:before {\n  content: \"\\e175\";\n}\n.glyphicon-floppy-open:before {\n  content: \"\\e176\";\n}\n.glyphicon-credit-card:before {\n  content: \"\\e177\";\n}\n.glyphicon-transfer:before {\n  content: \"\\e178\";\n}\n.glyphicon-cutlery:before {\n  content: \"\\e179\";\n}\n.glyphicon-header:before {\n  content: \"\\e180\";\n}\n.glyphicon-compressed:before {\n  content: \"\\e181\";\n}\n.glyphicon-earphone:before {\n  content: \"\\e182\";\n}\n.glyphicon-phone-alt:before {\n  content: \"\\e183\";\n}\n.glyphicon-tower:before {\n  content: \"\\e184\";\n}\n.glyphicon-stats:before {\n  content: \"\\e185\";\n}\n.glyphicon-sd-video:before {\n  content: \"\\e186\";\n}\n.glyphicon-hd-video:before {\n  content: \"\\e187\";\n}\n.glyphicon-subtitles:before {\n  content: \"\\e188\";\n}\n.glyphicon-sound-stereo:before {\n  content: \"\\e189\";\n}\n.glyphicon-sound-dolby:before {\n  content: \"\\e190\";\n}\n.glyphicon-sound-5-1:before {\n  content: \"\\e191\";\n}\n.glyphicon-sound-6-1:before {\n  content: \"\\e192\";\n}\n.glyphicon-sound-7-1:before {\n  content: \"\\e193\";\n}\n.glyphicon-copyright-mark:before {\n  content: \"\\e194\";\n}\n.glyphicon-registration-mark:before {\n  content: \"\\e195\";\n}\n.glyphicon-cloud-download:before {\n  content: \"\\e197\";\n}\n.glyphicon-cloud-upload:before {\n  content: \"\\e198\";\n}\n.glyphicon-tree-conifer:before {\n  content: \"\\e199\";\n}\n.glyphicon-tree-deciduous:before {\n  content: \"\\e200\";\n}\n.glyphicon-cd:before {\n  content: \"\\e201\";\n}\n.glyphicon-save-file:before {\n  content: \"\\e202\";\n}\n.glyphicon-open-file:before {\n  content: \"\\e203\";\n}\n.glyphicon-level-up:before {\n  content: \"\\e204\";\n}\n.glyphicon-copy:before {\n  content: \"\\e205\";\n}\n.glyphicon-paste:before {\n  content: \"\\e206\";\n}\n.glyphicon-alert:before {\n  content: \"\\e209\";\n}\n.glyphicon-equalizer:before {\n  content: \"\\e210\";\n}\n.glyphicon-king:before {\n  content: \"\\e211\";\n}\n.glyphicon-queen:before {\n  content: \"\\e212\";\n}\n.glyphicon-pawn:before {\n  content: \"\\e213\";\n}\n.glyphicon-bishop:before {\n  content: \"\\e214\";\n}\n.glyphicon-knight:before {\n  content: \"\\e215\";\n}\n.glyphicon-baby-formula:before {\n  content: \"\\e216\";\n}\n.glyphicon-tent:before {\n  content: \"\\26fa\";\n}\n.glyphicon-blackboard:before {\n  content: \"\\e218\";\n}\n.glyphicon-bed:before {\n  content: \"\\e219\";\n}\n.glyphicon-apple:before {\n  content: \"\\f8ff\";\n}\n.glyphicon-erase:before {\n  content: \"\\e221\";\n}\n.glyphicon-hourglass:before {\n  content: \"\\231b\";\n}\n.glyphicon-lamp:before {\n  content: \"\\e223\";\n}\n.glyphicon-duplicate:before {\n  content: \"\\e224\";\n}\n.glyphicon-piggy-bank:before {\n  content: \"\\e225\";\n}\n.glyphicon-scissors:before {\n  content: \"\\e226\";\n}\n.glyphicon-bitcoin:before {\n  content: \"\\e227\";\n}\n.glyphicon-btc:before {\n  content: \"\\e227\";\n}\n.glyphicon-xbt:before {\n  content: \"\\e227\";\n}\n.glyphicon-yen:before {\n  content: \"\\00a5\";\n}\n.glyphicon-jpy:before {\n  content: \"\\00a5\";\n}\n.glyphicon-ruble:before {\n  content: \"\\20bd\";\n}\n.glyphicon-rub:before {\n  content: \"\\20bd\";\n}\n.glyphicon-scale:before {\n  content: \"\\e230\";\n}\n.glyphicon-ice-lolly:before {\n  content: \"\\e231\";\n}\n.glyphicon-ice-lolly-tasted:before {\n  content: \"\\e232\";\n}\n.glyphicon-education:before {\n  content: \"\\e233\";\n}\n.glyphicon-option-horizontal:before {\n  content: \"\\e234\";\n}\n.glyphicon-option-vertical:before {\n  content: \"\\e235\";\n}\n.glyphicon-menu-hamburger:before {\n  content: \"\\e236\";\n}\n.glyphicon-modal-window:before {\n  content: \"\\e237\";\n}\n.glyphicon-oil:before {\n  content: \"\\e238\";\n}\n.glyphicon-grain:before {\n  content: \"\\e239\";\n}\n.glyphicon-sunglasses:before {\n  content: \"\\e240\";\n}\n.glyphicon-text-size:before {\n  content: \"\\e241\";\n}\n.glyphicon-text-color:before {\n  content: \"\\e242\";\n}\n.glyphicon-text-background:before {\n  content: \"\\e243\";\n}\n.glyphicon-object-align-top:before {\n  content: \"\\e244\";\n}\n.glyphicon-object-align-bottom:before {\n  content: \"\\e245\";\n}\n.glyphicon-object-align-horizontal:before {\n  content: \"\\e246\";\n}\n.glyphicon-object-align-left:before {\n  content: \"\\e247\";\n}\n.glyphicon-object-align-vertical:before {\n  content: \"\\e248\";\n}\n.glyphicon-object-align-right:before {\n  content: \"\\e249\";\n}\n.glyphicon-triangle-right:before {\n  content: \"\\e250\";\n}\n.glyphicon-triangle-left:before {\n  content: \"\\e251\";\n}\n.glyphicon-triangle-bottom:before {\n  content: \"\\e252\";\n}\n.glyphicon-triangle-top:before {\n  content: \"\\e253\";\n}\n.glyphicon-console:before {\n  content: \"\\e254\";\n}\n.glyphicon-superscript:before {\n  content: \"\\e255\";\n}\n.glyphicon-subscript:before {\n  content: \"\\e256\";\n}\n.glyphicon-menu-left:before {\n  content: \"\\e257\";\n}\n.glyphicon-menu-right:before {\n  content: \"\\e258\";\n}\n.glyphicon-menu-down:before {\n  content: \"\\e259\";\n}\n.glyphicon-menu-up:before {\n  content: \"\\e260\";\n}\n* {\n  -webkit-box-sizing: border-box;\n     -moz-box-sizing: border-box;\n          box-sizing: border-box;\n}\n*:before,\n*:after {\n  -webkit-box-sizing: border-box;\n     -moz-box-sizing: border-box;\n          box-sizing: border-box;\n}\nhtml {\n  font-size: 10px;\n\n  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n}\nbody {\n  font-family: \"Helvetica Neue\", Helvetica, Arial, sans-serif;\n  font-size: 14px;\n  line-height: 1.42857143;\n  color: #333;\n  background-color: #fff;\n}\ninput,\nbutton,\nselect,\ntextarea {\n  font-family: inherit;\n  font-size: inherit;\n  line-height: inherit;\n}\na {\n  color: #337ab7;\n  text-decoration: none;\n}\na:hover,\na:focus {\n  color: #23527c;\n  text-decoration: underline;\n}\na:focus {\n  outline: 5px auto -webkit-focus-ring-color;\n  outline-offset: -2px;\n}\nfigure {\n  margin: 0;\n}\nimg {\n  vertical-align: middle;\n}\n.img-responsive,\n.thumbnail > img,\n.thumbnail a > img,\n.carousel-inner > .item > img,\n.carousel-inner > .item > a > img {\n  display: block;\n  max-width: 100%;\n  height: auto;\n}\n.img-rounded {\n  border-radius: 6px;\n}\n.img-thumbnail {\n  display: inline-block;\n  max-width: 100%;\n  height: auto;\n  padding: 4px;\n  line-height: 1.42857143;\n  background-color: #fff;\n  border: 1px solid #ddd;\n  border-radius: 4px;\n  -webkit-transition: all .2s ease-in-out;\n       -o-transition: all .2s ease-in-out;\n          transition: all .2s ease-in-out;\n}\n.img-circle {\n  border-radius: 50%;\n}\nhr {\n  margin-top: 20px;\n  margin-bottom: 20px;\n  border: 0;\n  border-top: 1px solid #eee;\n}\n.sr-only {\n  position: absolute;\n  width: 1px;\n  height: 1px;\n  padding: 0;\n  margin: -1px;\n  overflow: hidden;\n  clip: rect(0, 0, 0, 0);\n  border: 0;\n}\n.sr-only-focusable:active,\n.sr-only-focusable:focus {\n  position: static;\n  width: auto;\n  height: auto;\n  margin: 0;\n  overflow: visible;\n  clip: auto;\n}\n[role=\"button\"] {\n  cursor: pointer;\n}\nh1,\nh2,\nh3,\nh4,\nh5,\nh6,\n.h1,\n.h2,\n.h3,\n.h4,\n.h5,\n.h6 {\n  font-family: inherit;\n  font-weight: 500;\n  line-height: 1.1;\n  color: inherit;\n}\nh1 small,\nh2 small,\nh3 small,\nh4 small,\nh5 small,\nh6 small,\n.h1 small,\n.h2 small,\n.h3 small,\n.h4 small,\n.h5 small,\n.h6 small,\nh1 .small,\nh2 .small,\nh3 .small,\nh4 .small,\nh5 .small,\nh6 .small,\n.h1 .small,\n.h2 .small,\n.h3 .small,\n.h4 .small,\n.h5 .small,\n.h6 .small {\n  font-weight: normal;\n  line-height: 1;\n  color: #777;\n}\nh1,\n.h1,\nh2,\n.h2,\nh3,\n.h3 {\n  margin-top: 20px;\n  margin-bottom: 10px;\n}\nh1 small,\n.h1 small,\nh2 small,\n.h2 small,\nh3 small,\n.h3 small,\nh1 .small,\n.h1 .small,\nh2 .small,\n.h2 .small,\nh3 .small,\n.h3 .small {\n  font-size: 65%;\n}\nh4,\n.h4,\nh5,\n.h5,\nh6,\n.h6 {\n  margin-top: 10px;\n  margin-bottom: 10px;\n}\nh4 small,\n.h4 small,\nh5 small,\n.h5 small,\nh6 small,\n.h6 small,\nh4 .small,\n.h4 .small,\nh5 .small,\n.h5 .small,\nh6 .small,\n.h6 .small {\n  font-size: 75%;\n}\nh1,\n.h1 {\n  font-size: 36px;\n}\nh2,\n.h2 {\n  font-size: 30px;\n}\nh3,\n.h3 {\n  font-size: 24px;\n}\nh4,\n.h4 {\n  font-size: 18px;\n}\nh5,\n.h5 {\n  font-size: 14px;\n}\nh6,\n.h6 {\n  font-size: 12px;\n}\np {\n  margin: 0 0 10px;\n}\n.lead {\n  margin-bottom: 20px;\n  font-size: 16px;\n  font-weight: 300;\n  line-height: 1.4;\n}\n@media (min-width: 768px) {\n  .lead {\n    font-size: 21px;\n  }\n}\nsmall,\n.small {\n  font-size: 85%;\n}\nmark,\n.mark {\n  padding: .2em;\n  background-color: #fcf8e3;\n}\n.text-left {\n  text-align: left;\n}\n.text-right {\n  text-align: right;\n}\n.text-center {\n  text-align: center;\n}\n.text-justify {\n  text-align: justify;\n}\n.text-nowrap {\n  white-space: nowrap;\n}\n.text-lowercase {\n  text-transform: lowercase;\n}\n.text-uppercase {\n  text-transform: uppercase;\n}\n.text-capitalize {\n  text-transform: capitalize;\n}\n.text-muted {\n  color: #777;\n}\n.text-primary {\n  color: #337ab7;\n}\na.text-primary:hover,\na.text-primary:focus {\n  color: #286090;\n}\n.text-success {\n  color: #3c763d;\n}\na.text-success:hover,\na.text-success:focus {\n  color: #2b542c;\n}\n.text-info {\n  color: #31708f;\n}\na.text-info:hover,\na.text-info:focus {\n  color: #245269;\n}\n.text-warning {\n  color: #8a6d3b;\n}\na.text-warning:hover,\na.text-warning:focus {\n  color: #66512c;\n}\n.text-danger {\n  color: #a94442;\n}\na.text-danger:hover,\na.text-danger:focus {\n  color: #843534;\n}\n.bg-primary {\n  color: #fff;\n  background-color: #337ab7;\n}\na.bg-primary:hover,\na.bg-primary:focus {\n  background-color: #286090;\n}\n.bg-success {\n  background-color: #dff0d8;\n}\na.bg-success:hover,\na.bg-success:focus {\n  background-color: #c1e2b3;\n}\n.bg-info {\n  background-color: #d9edf7;\n}\na.bg-info:hover,\na.bg-info:focus {\n  background-color: #afd9ee;\n}\n.bg-warning {\n  background-color: #fcf8e3;\n}\na.bg-warning:hover,\na.bg-warning:focus {\n  background-color: #f7ecb5;\n}\n.bg-danger {\n  background-color: #f2dede;\n}\na.bg-danger:hover,\na.bg-danger:focus {\n  background-color: #e4b9b9;\n}\n.page-header {\n  padding-bottom: 9px;\n  margin: 40px 0 20px;\n  border-bottom: 1px solid #eee;\n}\nul,\nol {\n  margin-top: 0;\n  margin-bottom: 10px;\n}\nul ul,\nol ul,\nul ol,\nol ol {\n  margin-bottom: 0;\n}\n.list-unstyled {\n  padding-left: 0;\n  list-style: none;\n}\n.list-inline {\n  padding-left: 0;\n  margin-left: -5px;\n  list-style: none;\n}\n.list-inline > li {\n  display: inline-block;\n  padding-right: 5px;\n  padding-left: 5px;\n}\ndl {\n  margin-top: 0;\n  margin-bottom: 20px;\n}\ndt,\ndd {\n  line-height: 1.42857143;\n}\ndt {\n  font-weight: bold;\n}\ndd {\n  margin-left: 0;\n}\n@media (min-width: 768px) {\n  .dl-horizontal dt {\n    float: left;\n    width: 160px;\n    overflow: hidden;\n    clear: left;\n    text-align: right;\n    text-overflow: ellipsis;\n    white-space: nowrap;\n  }\n  .dl-horizontal dd {\n    margin-left: 180px;\n  }\n}\nabbr[title],\nabbr[data-original-title] {\n  cursor: help;\n  border-bottom: 1px dotted #777;\n}\n.initialism {\n  font-size: 90%;\n  text-transform: uppercase;\n}\nblockquote {\n  padding: 10px 20px;\n  margin: 0 0 20px;\n  font-size: 17.5px;\n  border-left: 5px solid #eee;\n}\nblockquote p:last-child,\nblockquote ul:last-child,\nblockquote ol:last-child {\n  margin-bottom: 0;\n}\nblockquote footer,\nblockquote small,\nblockquote .small {\n  display: block;\n  font-size: 80%;\n  line-height: 1.42857143;\n  color: #777;\n}\nblockquote footer:before,\nblockquote small:before,\nblockquote .small:before {\n  content: '\\2014 \\00A0';\n}\n.blockquote-reverse,\nblockquote.pull-right {\n  padding-right: 15px;\n  padding-left: 0;\n  text-align: right;\n  border-right: 5px solid #eee;\n  border-left: 0;\n}\n.blockquote-reverse footer:before,\nblockquote.pull-right footer:before,\n.blockquote-reverse small:before,\nblockquote.pull-right small:before,\n.blockquote-reverse .small:before,\nblockquote.pull-right .small:before {\n  content: '';\n}\n.blockquote-reverse footer:after,\nblockquote.pull-right footer:after,\n.blockquote-reverse small:after,\nblockquote.pull-right small:after,\n.blockquote-reverse .small:after,\nblockquote.pull-right .small:after {\n  content: '\\00A0 \\2014';\n}\naddress {\n  margin-bottom: 20px;\n  font-style: normal;\n  line-height: 1.42857143;\n}\ncode,\nkbd,\npre,\nsamp {\n  font-family: Menlo, Monaco, Consolas, \"Courier New\", monospace;\n}\ncode {\n  padding: 2px 4px;\n  font-size: 90%;\n  color: #c7254e;\n  background-color: #f9f2f4;\n  border-radius: 4px;\n}\nkbd {\n  padding: 2px 4px;\n  font-size: 90%;\n  color: #fff;\n  background-color: #333;\n  border-radius: 3px;\n  -webkit-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .25);\n          box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .25);\n}\nkbd kbd {\n  padding: 0;\n  font-size: 100%;\n  font-weight: bold;\n  -webkit-box-shadow: none;\n          box-shadow: none;\n}\npre {\n  display: block;\n  padding: 9.5px;\n  margin: 0 0 10px;\n  font-size: 13px;\n  line-height: 1.42857143;\n  color: #333;\n  word-break: break-all;\n  word-wrap: break-word;\n  background-color: #f5f5f5;\n  border: 1px solid #ccc;\n  border-radius: 4px;\n}\npre code {\n  padding: 0;\n  font-size: inherit;\n  color: inherit;\n  white-space: pre-wrap;\n  background-color: transparent;\n  border-radius: 0;\n}\n.pre-scrollable {\n  max-height: 340px;\n  overflow-y: scroll;\n}\n.container {\n  padding-right: 15px;\n  padding-left: 15px;\n  margin-right: auto;\n  margin-left: auto;\n}\n@media (min-width: 768px) {\n  .container {\n    width: 750px;\n  }\n}\n@media (min-width: 992px) {\n  .container {\n    width: 970px;\n  }\n}\n@media (min-width: 1200px) {\n  .container {\n    width: 1170px;\n  }\n}\n.container-fluid {\n  padding-right: 15px;\n  padding-left: 15px;\n  margin-right: auto;\n  margin-left: auto;\n}\n.row {\n  margin-right: -15px;\n  margin-left: -15px;\n}\n.col-xs-1, .col-sm-1, .col-md-1, .col-lg-1, .col-xs-2, .col-sm-2, .col-md-2, .col-lg-2, .col-xs-3, .col-sm-3, .col-md-3, .col-lg-3, .col-xs-4, .col-sm-4, .col-md-4, .col-lg-4, .col-xs-5, .col-sm-5, .col-md-5, .col-lg-5, .col-xs-6, .col-sm-6, .col-md-6, .col-lg-6, .col-xs-7, .col-sm-7, .col-md-7, .col-lg-7, .col-xs-8, .col-sm-8, .col-md-8, .col-lg-8, .col-xs-9, .col-sm-9, .col-md-9, .col-lg-9, .col-xs-10, .col-sm-10, .col-md-10, .col-lg-10, .col-xs-11, .col-sm-11, .col-md-11, .col-lg-11, .col-xs-12, .col-sm-12, .col-md-12, .col-lg-12 {\n  position: relative;\n  min-height: 1px;\n  padding-right: 15px;\n  padding-left: 15px;\n}\n.col-xs-1, .col-xs-2, .col-xs-3, .col-xs-4, .col-xs-5, .col-xs-6, .col-xs-7, .col-xs-8, .col-xs-9, .col-xs-10, .col-xs-11, .col-xs-12 {\n  float: left;\n}\n.col-xs-12 {\n  width: 100%;\n}\n.col-xs-11 {\n  width: 91.66666667%;\n}\n.col-xs-10 {\n  width: 83.33333333%;\n}\n.col-xs-9 {\n  width: 75%;\n}\n.col-xs-8 {\n  width: 66.66666667%;\n}\n.col-xs-7 {\n  width: 58.33333333%;\n}\n.col-xs-6 {\n  width: 50%;\n}\n.col-xs-5 {\n  width: 41.66666667%;\n}\n.col-xs-4 {\n  width: 33.33333333%;\n}\n.col-xs-3 {\n  width: 25%;\n}\n.col-xs-2 {\n  width: 16.66666667%;\n}\n.col-xs-1 {\n  width: 8.33333333%;\n}\n.col-xs-pull-12 {\n  right: 100%;\n}\n.col-xs-pull-11 {\n  right: 91.66666667%;\n}\n.col-xs-pull-10 {\n  right: 83.33333333%;\n}\n.col-xs-pull-9 {\n  right: 75%;\n}\n.col-xs-pull-8 {\n  right: 66.66666667%;\n}\n.col-xs-pull-7 {\n  right: 58.33333333%;\n}\n.col-xs-pull-6 {\n  right: 50%;\n}\n.col-xs-pull-5 {\n  right: 41.66666667%;\n}\n.col-xs-pull-4 {\n  right: 33.33333333%;\n}\n.col-xs-pull-3 {\n  right: 25%;\n}\n.col-xs-pull-2 {\n  right: 16.66666667%;\n}\n.col-xs-pull-1 {\n  right: 8.33333333%;\n}\n.col-xs-pull-0 {\n  right: auto;\n}\n.col-xs-push-12 {\n  left: 100%;\n}\n.col-xs-push-11 {\n  left: 91.66666667%;\n}\n.col-xs-push-10 {\n  left: 83.33333333%;\n}\n.col-xs-push-9 {\n  left: 75%;\n}\n.col-xs-push-8 {\n  left: 66.66666667%;\n}\n.col-xs-push-7 {\n  left: 58.33333333%;\n}\n.col-xs-push-6 {\n  left: 50%;\n}\n.col-xs-push-5 {\n  left: 41.66666667%;\n}\n.col-xs-push-4 {\n  left: 33.33333333%;\n}\n.col-xs-push-3 {\n  left: 25%;\n}\n.col-xs-push-2 {\n  left: 16.66666667%;\n}\n.col-xs-push-1 {\n  left: 8.33333333%;\n}\n.col-xs-push-0 {\n  left: auto;\n}\n.col-xs-offset-12 {\n  margin-left: 100%;\n}\n.col-xs-offset-11 {\n  margin-left: 91.66666667%;\n}\n.col-xs-offset-10 {\n  margin-left: 83.33333333%;\n}\n.col-xs-offset-9 {\n  margin-left: 75%;\n}\n.col-xs-offset-8 {\n  margin-left: 66.66666667%;\n}\n.col-xs-offset-7 {\n  margin-left: 58.33333333%;\n}\n.col-xs-offset-6 {\n  margin-left: 50%;\n}\n.col-xs-offset-5 {\n  margin-left: 41.66666667%;\n}\n.col-xs-offset-4 {\n  margin-left: 33.33333333%;\n}\n.col-xs-offset-3 {\n  margin-left: 25%;\n}\n.col-xs-offset-2 {\n  margin-left: 16.66666667%;\n}\n.col-xs-offset-1 {\n  margin-left: 8.33333333%;\n}\n.col-xs-offset-0 {\n  margin-left: 0;\n}\n@media (min-width: 768px) {\n  .col-sm-1, .col-sm-2, .col-sm-3, .col-sm-4, .col-sm-5, .col-sm-6, .col-sm-7, .col-sm-8, .col-sm-9, .col-sm-10, .col-sm-11, .col-sm-12 {\n    float: left;\n  }\n  .col-sm-12 {\n    width: 100%;\n  }\n  .col-sm-11 {\n    width: 91.66666667%;\n  }\n  .col-sm-10 {\n    width: 83.33333333%;\n  }\n  .col-sm-9 {\n    width: 75%;\n  }\n  .col-sm-8 {\n    width: 66.66666667%;\n  }\n  .col-sm-7 {\n    width: 58.33333333%;\n  }\n  .col-sm-6 {\n    width: 50%;\n  }\n  .col-sm-5 {\n    width: 41.66666667%;\n  }\n  .col-sm-4 {\n    width: 33.33333333%;\n  }\n  .col-sm-3 {\n    width: 25%;\n  }\n  .col-sm-2 {\n    width: 16.66666667%;\n  }\n  .col-sm-1 {\n    width: 8.33333333%;\n  }\n  .col-sm-pull-12 {\n    right: 100%;\n  }\n  .col-sm-pull-11 {\n    right: 91.66666667%;\n  }\n  .col-sm-pull-10 {\n    right: 83.33333333%;\n  }\n  .col-sm-pull-9 {\n    right: 75%;\n  }\n  .col-sm-pull-8 {\n    right: 66.66666667%;\n  }\n  .col-sm-pull-7 {\n    right: 58.33333333%;\n  }\n  .col-sm-pull-6 {\n    right: 50%;\n  }\n  .col-sm-pull-5 {\n    right: 41.66666667%;\n  }\n  .col-sm-pull-4 {\n    right: 33.33333333%;\n  }\n  .col-sm-pull-3 {\n    right: 25%;\n  }\n  .col-sm-pull-2 {\n    right: 16.66666667%;\n  }\n  .col-sm-pull-1 {\n    right: 8.33333333%;\n  }\n  .col-sm-pull-0 {\n    right: auto;\n  }\n  .col-sm-push-12 {\n    left: 100%;\n  }\n  .col-sm-push-11 {\n    left: 91.66666667%;\n  }\n  .col-sm-push-10 {\n    left: 83.33333333%;\n  }\n  .col-sm-push-9 {\n    left: 75%;\n  }\n  .col-sm-push-8 {\n    left: 66.66666667%;\n  }\n  .col-sm-push-7 {\n    left: 58.33333333%;\n  }\n  .col-sm-push-6 {\n    left: 50%;\n  }\n  .col-sm-push-5 {\n    left: 41.66666667%;\n  }\n  .col-sm-push-4 {\n    left: 33.33333333%;\n  }\n  .col-sm-push-3 {\n    left: 25%;\n  }\n  .col-sm-push-2 {\n    left: 16.66666667%;\n  }\n  .col-sm-push-1 {\n    left: 8.33333333%;\n  }\n  .col-sm-push-0 {\n    left: auto;\n  }\n  .col-sm-offset-12 {\n    margin-left: 100%;\n  }\n  .col-sm-offset-11 {\n    margin-left: 91.66666667%;\n  }\n  .col-sm-offset-10 {\n    margin-left: 83.33333333%;\n  }\n  .col-sm-offset-9 {\n    margin-left: 75%;\n  }\n  .col-sm-offset-8 {\n    margin-left: 66.66666667%;\n  }\n  .col-sm-offset-7 {\n    margin-left: 58.33333333%;\n  }\n  .col-sm-offset-6 {\n    margin-left: 50%;\n  }\n  .col-sm-offset-5 {\n    margin-left: 41.66666667%;\n  }\n  .col-sm-offset-4 {\n    margin-left: 33.33333333%;\n  }\n  .col-sm-offset-3 {\n    margin-left: 25%;\n  }\n  .col-sm-offset-2 {\n    margin-left: 16.66666667%;\n  }\n  .col-sm-offset-1 {\n    margin-left: 8.33333333%;\n  }\n  .col-sm-offset-0 {\n    margin-left: 0;\n  }\n}\n@media (min-width: 992px) {\n  .col-md-1, .col-md-2, .col-md-3, .col-md-4, .col-md-5, .col-md-6, .col-md-7, .col-md-8, .col-md-9, .col-md-10, .col-md-11, .col-md-12 {\n    float: left;\n  }\n  .col-md-12 {\n    width: 100%;\n  }\n  .col-md-11 {\n    width: 91.66666667%;\n  }\n  .col-md-10 {\n    width: 83.33333333%;\n  }\n  .col-md-9 {\n    width: 75%;\n  }\n  .col-md-8 {\n    width: 66.66666667%;\n  }\n  .col-md-7 {\n    width: 58.33333333%;\n  }\n  .col-md-6 {\n    width: 50%;\n  }\n  .col-md-5 {\n    width: 41.66666667%;\n  }\n  .col-md-4 {\n    width: 33.33333333%;\n  }\n  .col-md-3 {\n    width: 25%;\n  }\n  .col-md-2 {\n    width: 16.66666667%;\n  }\n  .col-md-1 {\n    width: 8.33333333%;\n  }\n  .col-md-pull-12 {\n    right: 100%;\n  }\n  .col-md-pull-11 {\n    right: 91.66666667%;\n  }\n  .col-md-pull-10 {\n    right: 83.33333333%;\n  }\n  .col-md-pull-9 {\n    right: 75%;\n  }\n  .col-md-pull-8 {\n    right: 66.66666667%;\n  }\n  .col-md-pull-7 {\n    right: 58.33333333%;\n  }\n  .col-md-pull-6 {\n    right: 50%;\n  }\n  .col-md-pull-5 {\n    right: 41.66666667%;\n  }\n  .col-md-pull-4 {\n    right: 33.33333333%;\n  }\n  .col-md-pull-3 {\n    right: 25%;\n  }\n  .col-md-pull-2 {\n    right: 16.66666667%;\n  }\n  .col-md-pull-1 {\n    right: 8.33333333%;\n  }\n  .col-md-pull-0 {\n    right: auto;\n  }\n  .col-md-push-12 {\n    left: 100%;\n  }\n  .col-md-push-11 {\n    left: 91.66666667%;\n  }\n  .col-md-push-10 {\n    left: 83.33333333%;\n  }\n  .col-md-push-9 {\n    left: 75%;\n  }\n  .col-md-push-8 {\n    left: 66.66666667%;\n  }\n  .col-md-push-7 {\n    left: 58.33333333%;\n  }\n  .col-md-push-6 {\n    left: 50%;\n  }\n  .col-md-push-5 {\n    left: 41.66666667%;\n  }\n  .col-md-push-4 {\n    left: 33.33333333%;\n  }\n  .col-md-push-3 {\n    left: 25%;\n  }\n  .col-md-push-2 {\n    left: 16.66666667%;\n  }\n  .col-md-push-1 {\n    left: 8.33333333%;\n  }\n  .col-md-push-0 {\n    left: auto;\n  }\n  .col-md-offset-12 {\n    margin-left: 100%;\n  }\n  .col-md-offset-11 {\n    margin-left: 91.66666667%;\n  }\n  .col-md-offset-10 {\n    margin-left: 83.33333333%;\n  }\n  .col-md-offset-9 {\n    margin-left: 75%;\n  }\n  .col-md-offset-8 {\n    margin-left: 66.66666667%;\n  }\n  .col-md-offset-7 {\n    margin-left: 58.33333333%;\n  }\n  .col-md-offset-6 {\n    margin-left: 50%;\n  }\n  .col-md-offset-5 {\n    margin-left: 41.66666667%;\n  }\n  .col-md-offset-4 {\n    margin-left: 33.33333333%;\n  }\n  .col-md-offset-3 {\n    margin-left: 25%;\n  }\n  .col-md-offset-2 {\n    margin-left: 16.66666667%;\n  }\n  .col-md-offset-1 {\n    margin-left: 8.33333333%;\n  }\n  .col-md-offset-0 {\n    margin-left: 0;\n  }\n}\n@media (min-width: 1200px) {\n  .col-lg-1, .col-lg-2, .col-lg-3, .col-lg-4, .col-lg-5, .col-lg-6, .col-lg-7, .col-lg-8, .col-lg-9, .col-lg-10, .col-lg-11, .col-lg-12 {\n    float: left;\n  }\n  .col-lg-12 {\n    width: 100%;\n  }\n  .col-lg-11 {\n    width: 91.66666667%;\n  }\n  .col-lg-10 {\n    width: 83.33333333%;\n  }\n  .col-lg-9 {\n    width: 75%;\n  }\n  .col-lg-8 {\n    width: 66.66666667%;\n  }\n  .col-lg-7 {\n    width: 58.33333333%;\n  }\n  .col-lg-6 {\n    width: 50%;\n  }\n  .col-lg-5 {\n    width: 41.66666667%;\n  }\n  .col-lg-4 {\n    width: 33.33333333%;\n  }\n  .col-lg-3 {\n    width: 25%;\n  }\n  .col-lg-2 {\n    width: 16.66666667%;\n  }\n  .col-lg-1 {\n    width: 8.33333333%;\n  }\n  .col-lg-pull-12 {\n    right: 100%;\n  }\n  .col-lg-pull-11 {\n    right: 91.66666667%;\n  }\n  .col-lg-pull-10 {\n    right: 83.33333333%;\n  }\n  .col-lg-pull-9 {\n    right: 75%;\n  }\n  .col-lg-pull-8 {\n    right: 66.66666667%;\n  }\n  .col-lg-pull-7 {\n    right: 58.33333333%;\n  }\n  .col-lg-pull-6 {\n    right: 50%;\n  }\n  .col-lg-pull-5 {\n    right: 41.66666667%;\n  }\n  .col-lg-pull-4 {\n    right: 33.33333333%;\n  }\n  .col-lg-pull-3 {\n    right: 25%;\n  }\n  .col-lg-pull-2 {\n    right: 16.66666667%;\n  }\n  .col-lg-pull-1 {\n    right: 8.33333333%;\n  }\n  .col-lg-pull-0 {\n    right: auto;\n  }\n  .col-lg-push-12 {\n    left: 100%;\n  }\n  .col-lg-push-11 {\n    left: 91.66666667%;\n  }\n  .col-lg-push-10 {\n    left: 83.33333333%;\n  }\n  .col-lg-push-9 {\n    left: 75%;\n  }\n  .col-lg-push-8 {\n    left: 66.66666667%;\n  }\n  .col-lg-push-7 {\n    left: 58.33333333%;\n  }\n  .col-lg-push-6 {\n    left: 50%;\n  }\n  .col-lg-push-5 {\n    left: 41.66666667%;\n  }\n  .col-lg-push-4 {\n    left: 33.33333333%;\n  }\n  .col-lg-push-3 {\n    left: 25%;\n  }\n  .col-lg-push-2 {\n    left: 16.66666667%;\n  }\n  .col-lg-push-1 {\n    left: 8.33333333%;\n  }\n  .col-lg-push-0 {\n    left: auto;\n  }\n  .col-lg-offset-12 {\n    margin-left: 100%;\n  }\n  .col-lg-offset-11 {\n    margin-left: 91.66666667%;\n  }\n  .col-lg-offset-10 {\n    margin-left: 83.33333333%;\n  }\n  .col-lg-offset-9 {\n    margin-left: 75%;\n  }\n  .col-lg-offset-8 {\n    margin-left: 66.66666667%;\n  }\n  .col-lg-offset-7 {\n    margin-left: 58.33333333%;\n  }\n  .col-lg-offset-6 {\n    margin-left: 50%;\n  }\n  .col-lg-offset-5 {\n    margin-left: 41.66666667%;\n  }\n  .col-lg-offset-4 {\n    margin-left: 33.33333333%;\n  }\n  .col-lg-offset-3 {\n    margin-left: 25%;\n  }\n  .col-lg-offset-2 {\n    margin-left: 16.66666667%;\n  }\n  .col-lg-offset-1 {\n    margin-left: 8.33333333%;\n  }\n  .col-lg-offset-0 {\n    margin-left: 0;\n  }\n}\ntable {\n  background-color: transparent;\n}\ncaption {\n  padding-top: 8px;\n  padding-bottom: 8px;\n  color: #777;\n  text-align: left;\n}\nth {\n  text-align: left;\n}\n.table {\n  width: 100%;\n  max-width: 100%;\n  margin-bottom: 20px;\n}\n.table > thead > tr > th,\n.table > tbody > tr > th,\n.table > tfoot > tr > th,\n.table > thead > tr > td,\n.table > tbody > tr > td,\n.table > tfoot > tr > td {\n  padding: 8px;\n  line-height: 1.42857143;\n  vertical-align: top;\n  border-top: 1px solid #ddd;\n}\n.table > thead > tr > th {\n  vertical-align: bottom;\n  border-bottom: 2px solid #ddd;\n}\n.table > caption + thead > tr:first-child > th,\n.table > colgroup + thead > tr:first-child > th,\n.table > thead:first-child > tr:first-child > th,\n.table > caption + thead > tr:first-child > td,\n.table > colgroup + thead > tr:first-child > td,\n.table > thead:first-child > tr:first-child > td {\n  border-top: 0;\n}\n.table > tbody + tbody {\n  border-top: 2px solid #ddd;\n}\n.table .table {\n  background-color: #fff;\n}\n.table-condensed > thead > tr > th,\n.table-condensed > tbody > tr > th,\n.table-condensed > tfoot > tr > th,\n.table-condensed > thead > tr > td,\n.table-condensed > tbody > tr > td,\n.table-condensed > tfoot > tr > td {\n  padding: 5px;\n}\n.table-bordered {\n  border: 1px solid #ddd;\n}\n.table-bordered > thead > tr > th,\n.table-bordered > tbody > tr > th,\n.table-bordered > tfoot > tr > th,\n.table-bordered > thead > tr > td,\n.table-bordered > tbody > tr > td,\n.table-bordered > tfoot > tr > td {\n  border: 1px solid #ddd;\n}\n.table-bordered > thead > tr > th,\n.table-bordered > thead > tr > td {\n  border-bottom-width: 2px;\n}\n.table-striped > tbody > tr:nth-of-type(odd) {\n  background-color: #f9f9f9;\n}\n.table-hover > tbody > tr:hover {\n  background-color: #f5f5f5;\n}\ntable col[class*=\"col-\"] {\n  position: static;\n  display: table-column;\n  float: none;\n}\ntable td[class*=\"col-\"],\ntable th[class*=\"col-\"] {\n  position: static;\n  display: table-cell;\n  float: none;\n}\n.table > thead > tr > td.active,\n.table > tbody > tr > td.active,\n.table > tfoot > tr > td.active,\n.table > thead > tr > th.active,\n.table > tbody > tr > th.active,\n.table > tfoot > tr > th.active,\n.table > thead > tr.active > td,\n.table > tbody > tr.active > td,\n.table > tfoot > tr.active > td,\n.table > thead > tr.active > th,\n.table > tbody > tr.active > th,\n.table > tfoot > tr.active > th {\n  background-color: #f5f5f5;\n}\n.table-hover > tbody > tr > td.active:hover,\n.table-hover > tbody > tr > th.active:hover,\n.table-hover > tbody > tr.active:hover > td,\n.table-hover > tbody > tr:hover > .active,\n.table-hover > tbody > tr.active:hover > th {\n  background-color: #e8e8e8;\n}\n.table > thead > tr > td.success,\n.table > tbody > tr > td.success,\n.table > tfoot > tr > td.success,\n.table > thead > tr > th.success,\n.table > tbody > tr > th.success,\n.table > tfoot > tr > th.success,\n.table > thead > tr.success > td,\n.table > tbody > tr.success > td,\n.table > tfoot > tr.success > td,\n.table > thead > tr.success > th,\n.table > tbody > tr.success > th,\n.table > tfoot > tr.success > th {\n  background-color: #dff0d8;\n}\n.table-hover > tbody > tr > td.success:hover,\n.table-hover > tbody > tr > th.success:hover,\n.table-hover > tbody > tr.success:hover > td,\n.table-hover > tbody > tr:hover > .success,\n.table-hover > tbody > tr.success:hover > th {\n  background-color: #d0e9c6;\n}\n.table > thead > tr > td.info,\n.table > tbody > tr > td.info,\n.table > tfoot > tr > td.info,\n.table > thead > tr > th.info,\n.table > tbody > tr > th.info,\n.table > tfoot > tr > th.info,\n.table > thead > tr.info > td,\n.table > tbody > tr.info > td,\n.table > tfoot > tr.info > td,\n.table > thead > tr.info > th,\n.table > tbody > tr.info > th,\n.table > tfoot > tr.info > th {\n  background-color: #d9edf7;\n}\n.table-hover > tbody > tr > td.info:hover,\n.table-hover > tbody > tr > th.info:hover,\n.table-hover > tbody > tr.info:hover > td,\n.table-hover > tbody > tr:hover > .info,\n.table-hover > tbody > tr.info:hover > th {\n  background-color: #c4e3f3;\n}\n.table > thead > tr > td.warning,\n.table > tbody > tr > td.warning,\n.table > tfoot > tr > td.warning,\n.table > thead > tr > th.warning,\n.table > tbody > tr > th.warning,\n.table > tfoot > tr > th.warning,\n.table > thead > tr.warning > td,\n.table > tbody > tr.warning > td,\n.table > tfoot > tr.warning > td,\n.table > thead > tr.warning > th,\n.table > tbody > tr.warning > th,\n.table > tfoot > tr.warning > th {\n  background-color: #fcf8e3;\n}\n.table-hover > tbody > tr > td.warning:hover,\n.table-hover > tbody > tr > th.warning:hover,\n.table-hover > tbody > tr.warning:hover > td,\n.table-hover > tbody > tr:hover > .warning,\n.table-hover > tbody > tr.warning:hover > th {\n  background-color: #faf2cc;\n}\n.table > thead > tr > td.danger,\n.table > tbody > tr > td.danger,\n.table > tfoot > tr > td.danger,\n.table > thead > tr > th.danger,\n.table > tbody > tr > th.danger,\n.table > tfoot > tr > th.danger,\n.table > thead > tr.danger > td,\n.table > tbody > tr.danger > td,\n.table > tfoot > tr.danger > td,\n.table > thead > tr.danger > th,\n.table > tbody > tr.danger > th,\n.table > tfoot > tr.danger > th {\n  background-color: #f2dede;\n}\n.table-hover > tbody > tr > td.danger:hover,\n.table-hover > tbody > tr > th.danger:hover,\n.table-hover > tbody > tr.danger:hover > td,\n.table-hover > tbody > tr:hover > .danger,\n.table-hover > tbody > tr.danger:hover > th {\n  background-color: #ebcccc;\n}\n.table-responsive {\n  min-height: .01%;\n  overflow-x: auto;\n}\n@media screen and (max-width: 767px) {\n  .table-responsive {\n    width: 100%;\n    margin-bottom: 15px;\n    overflow-y: hidden;\n    -ms-overflow-style: -ms-autohiding-scrollbar;\n    border: 1px solid #ddd;\n  }\n  .table-responsive > .table {\n    margin-bottom: 0;\n  }\n  .table-responsive > .table > thead > tr > th,\n  .table-responsive > .table > tbody > tr > th,\n  .table-responsive > .table > tfoot > tr > th,\n  .table-responsive > .table > thead > tr > td,\n  .table-responsive > .table > tbody > tr > td,\n  .table-responsive > .table > tfoot > tr > td {\n    white-space: nowrap;\n  }\n  .table-responsive > .table-bordered {\n    border: 0;\n  }\n  .table-responsive > .table-bordered > thead > tr > th:first-child,\n  .table-responsive > .table-bordered > tbody > tr > th:first-child,\n  .table-responsive > .table-bordered > tfoot > tr > th:first-child,\n  .table-responsive > .table-bordered > thead > tr > td:first-child,\n  .table-responsive > .table-bordered > tbody > tr > td:first-child,\n  .table-responsive > .table-bordered > tfoot > tr > td:first-child {\n    border-left: 0;\n  }\n  .table-responsive > .table-bordered > thead > tr > th:last-child,\n  .table-responsive > .table-bordered > tbody > tr > th:last-child,\n  .table-responsive > .table-bordered > tfoot > tr > th:last-child,\n  .table-responsive > .table-bordered > thead > tr > td:last-child,\n  .table-responsive > .table-bordered > tbody > tr > td:last-child,\n  .table-responsive > .table-bordered > tfoot > tr > td:last-child {\n    border-right: 0;\n  }\n  .table-responsive > .table-bordered > tbody > tr:last-child > th,\n  .table-responsive > .table-bordered > tfoot > tr:last-child > th,\n  .table-responsive > .table-bordered > tbody > tr:last-child > td,\n  .table-responsive > .table-bordered > tfoot > tr:last-child > td {\n    border-bottom: 0;\n  }\n}\nfieldset {\n  min-width: 0;\n  padding: 0;\n  margin: 0;\n  border: 0;\n}\nlegend {\n  display: block;\n  width: 100%;\n  padding: 0;\n  margin-bottom: 20px;\n  font-size: 21px;\n  line-height: inherit;\n  color: #333;\n  border: 0;\n  border-bottom: 1px solid #e5e5e5;\n}\nlabel {\n  display: inline-block;\n  max-width: 100%;\n  margin-bottom: 5px;\n  font-weight: bold;\n}\ninput[type=\"search\"] {\n  -webkit-box-sizing: border-box;\n     -moz-box-sizing: border-box;\n          box-sizing: border-box;\n}\ninput[type=\"radio\"],\ninput[type=\"checkbox\"] {\n  margin: 4px 0 0;\n  margin-top: 1px \\9;\n  line-height: normal;\n}\ninput[type=\"file\"] {\n  display: block;\n}\ninput[type=\"range\"] {\n  display: block;\n  width: 100%;\n}\nselect[multiple],\nselect[size] {\n  height: auto;\n}\ninput[type=\"file\"]:focus,\ninput[type=\"radio\"]:focus,\ninput[type=\"checkbox\"]:focus {\n  outline: 5px auto -webkit-focus-ring-color;\n  outline-offset: -2px;\n}\noutput {\n  display: block;\n  padding-top: 7px;\n  font-size: 14px;\n  line-height: 1.42857143;\n  color: #555;\n}\n.form-control {\n  display: block;\n  width: 100%;\n  height: 34px;\n  padding: 6px 12px;\n  font-size: 14px;\n  line-height: 1.42857143;\n  color: #555;\n  background-color: #fff;\n  background-image: none;\n  border: 1px solid #ccc;\n  border-radius: 4px;\n  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);\n          box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);\n  -webkit-transition: border-color ease-in-out .15s, -webkit-box-shadow ease-in-out .15s;\n       -o-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;\n          transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;\n}\n.form-control:focus {\n  border-color: #66afe9;\n  outline: 0;\n  -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, .6);\n          box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, .6);\n}\n.form-control::-moz-placeholder {\n  color: #999;\n  opacity: 1;\n}\n.form-control:-ms-input-placeholder {\n  color: #999;\n}\n.form-control::-webkit-input-placeholder {\n  color: #999;\n}\n.form-control::-ms-expand {\n  background-color: transparent;\n  border: 0;\n}\n.form-control[disabled],\n.form-control[readonly],\nfieldset[disabled] .form-control {\n  background-color: #eee;\n  opacity: 1;\n}\n.form-control[disabled],\nfieldset[disabled] .form-control {\n  cursor: not-allowed;\n}\ntextarea.form-control {\n  height: auto;\n}\ninput[type=\"search\"] {\n  -webkit-appearance: none;\n}\n@media screen and (-webkit-min-device-pixel-ratio: 0) {\n  input[type=\"date\"].form-control,\n  input[type=\"time\"].form-control,\n  input[type=\"datetime-local\"].form-control,\n  input[type=\"month\"].form-control {\n    line-height: 34px;\n  }\n  input[type=\"date\"].input-sm,\n  input[type=\"time\"].input-sm,\n  input[type=\"datetime-local\"].input-sm,\n  input[type=\"month\"].input-sm,\n  .input-group-sm input[type=\"date\"],\n  .input-group-sm input[type=\"time\"],\n  .input-group-sm input[type=\"datetime-local\"],\n  .input-group-sm input[type=\"month\"] {\n    line-height: 30px;\n  }\n  input[type=\"date\"].input-lg,\n  input[type=\"time\"].input-lg,\n  input[type=\"datetime-local\"].input-lg,\n  input[type=\"month\"].input-lg,\n  .input-group-lg input[type=\"date\"],\n  .input-group-lg input[type=\"time\"],\n  .input-group-lg input[type=\"datetime-local\"],\n  .input-group-lg input[type=\"month\"] {\n    line-height: 46px;\n  }\n}\n.form-group {\n  margin-bottom: 15px;\n}\n.radio,\n.checkbox {\n  position: relative;\n  display: block;\n  margin-top: 10px;\n  margin-bottom: 10px;\n}\n.radio label,\n.checkbox label {\n  min-height: 20px;\n  padding-left: 20px;\n  margin-bottom: 0;\n  font-weight: normal;\n  cursor: pointer;\n}\n.radio input[type=\"radio\"],\n.radio-inline input[type=\"radio\"],\n.checkbox input[type=\"checkbox\"],\n.checkbox-inline input[type=\"checkbox\"] {\n  position: absolute;\n  margin-top: 4px \\9;\n  margin-left: -20px;\n}\n.radio + .radio,\n.checkbox + .checkbox {\n  margin-top: -5px;\n}\n.radio-inline,\n.checkbox-inline {\n  position: relative;\n  display: inline-block;\n  padding-left: 20px;\n  margin-bottom: 0;\n  font-weight: normal;\n  vertical-align: middle;\n  cursor: pointer;\n}\n.radio-inline + .radio-inline,\n.checkbox-inline + .checkbox-inline {\n  margin-top: 0;\n  margin-left: 10px;\n}\ninput[type=\"radio\"][disabled],\ninput[type=\"checkbox\"][disabled],\ninput[type=\"radio\"].disabled,\ninput[type=\"checkbox\"].disabled,\nfieldset[disabled] input[type=\"radio\"],\nfieldset[disabled] input[type=\"checkbox\"] {\n  cursor: not-allowed;\n}\n.radio-inline.disabled,\n.checkbox-inline.disabled,\nfieldset[disabled] .radio-inline,\nfieldset[disabled] .checkbox-inline {\n  cursor: not-allowed;\n}\n.radio.disabled label,\n.checkbox.disabled label,\nfieldset[disabled] .radio label,\nfieldset[disabled] .checkbox label {\n  cursor: not-allowed;\n}\n.form-control-static {\n  min-height: 34px;\n  padding-top: 7px;\n  padding-bottom: 7px;\n  margin-bottom: 0;\n}\n.form-control-static.input-lg,\n.form-control-static.input-sm {\n  padding-right: 0;\n  padding-left: 0;\n}\n.input-sm {\n  height: 30px;\n  padding: 5px 10px;\n  font-size: 12px;\n  line-height: 1.5;\n  border-radius: 3px;\n}\nselect.input-sm {\n  height: 30px;\n  line-height: 30px;\n}\ntextarea.input-sm,\nselect[multiple].input-sm {\n  height: auto;\n}\n.form-group-sm .form-control {\n  height: 30px;\n  padding: 5px 10px;\n  font-size: 12px;\n  line-height: 1.5;\n  border-radius: 3px;\n}\n.form-group-sm select.form-control {\n  height: 30px;\n  line-height: 30px;\n}\n.form-group-sm textarea.form-control,\n.form-group-sm select[multiple].form-control {\n  height: auto;\n}\n.form-group-sm .form-control-static {\n  height: 30px;\n  min-height: 32px;\n  padding: 6px 10px;\n  font-size: 12px;\n  line-height: 1.5;\n}\n.input-lg {\n  height: 46px;\n  padding: 10px 16px;\n  font-size: 18px;\n  line-height: 1.3333333;\n  border-radius: 6px;\n}\nselect.input-lg {\n  height: 46px;\n  line-height: 46px;\n}\ntextarea.input-lg,\nselect[multiple].input-lg {\n  height: auto;\n}\n.form-group-lg .form-control {\n  height: 46px;\n  padding: 10px 16px;\n  font-size: 18px;\n  line-height: 1.3333333;\n  border-radius: 6px;\n}\n.form-group-lg select.form-control {\n  height: 46px;\n  line-height: 46px;\n}\n.form-group-lg textarea.form-control,\n.form-group-lg select[multiple].form-control {\n  height: auto;\n}\n.form-group-lg .form-control-static {\n  height: 46px;\n  min-height: 38px;\n  padding: 11px 16px;\n  font-size: 18px;\n  line-height: 1.3333333;\n}\n.has-feedback {\n  position: relative;\n}\n.has-feedback .form-control {\n  padding-right: 42.5px;\n}\n.form-control-feedback {\n  position: absolute;\n  top: 0;\n  right: 0;\n  z-index: 2;\n  display: block;\n  width: 34px;\n  height: 34px;\n  line-height: 34px;\n  text-align: center;\n  pointer-events: none;\n}\n.input-lg + .form-control-feedback,\n.input-group-lg + .form-control-feedback,\n.form-group-lg .form-control + .form-control-feedback {\n  width: 46px;\n  height: 46px;\n  line-height: 46px;\n}\n.input-sm + .form-control-feedback,\n.input-group-sm + .form-control-feedback,\n.form-group-sm .form-control + .form-control-feedback {\n  width: 30px;\n  height: 30px;\n  line-height: 30px;\n}\n.has-success .help-block,\n.has-success .control-label,\n.has-success .radio,\n.has-success .checkbox,\n.has-success .radio-inline,\n.has-success .checkbox-inline,\n.has-success.radio label,\n.has-success.checkbox label,\n.has-success.radio-inline label,\n.has-success.checkbox-inline label {\n  color: #3c763d;\n}\n.has-success .form-control {\n  border-color: #3c763d;\n  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);\n          box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);\n}\n.has-success .form-control:focus {\n  border-color: #2b542c;\n  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #67b168;\n          box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #67b168;\n}\n.has-success .input-group-addon {\n  color: #3c763d;\n  background-color: #dff0d8;\n  border-color: #3c763d;\n}\n.has-success .form-control-feedback {\n  color: #3c763d;\n}\n.has-warning .help-block,\n.has-warning .control-label,\n.has-warning .radio,\n.has-warning .checkbox,\n.has-warning .radio-inline,\n.has-warning .checkbox-inline,\n.has-warning.radio label,\n.has-warning.checkbox label,\n.has-warning.radio-inline label,\n.has-warning.checkbox-inline label {\n  color: #8a6d3b;\n}\n.has-warning .form-control {\n  border-color: #8a6d3b;\n  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);\n          box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);\n}\n.has-warning .form-control:focus {\n  border-color: #66512c;\n  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #c0a16b;\n          box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #c0a16b;\n}\n.has-warning .input-group-addon {\n  color: #8a6d3b;\n  background-color: #fcf8e3;\n  border-color: #8a6d3b;\n}\n.has-warning .form-control-feedback {\n  color: #8a6d3b;\n}\n.has-error .help-block,\n.has-error .control-label,\n.has-error .radio,\n.has-error .checkbox,\n.has-error .radio-inline,\n.has-error .checkbox-inline,\n.has-error.radio label,\n.has-error.checkbox label,\n.has-error.radio-inline label,\n.has-error.checkbox-inline label {\n  color: #a94442;\n}\n.has-error .form-control {\n  border-color: #a94442;\n  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);\n          box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);\n}\n.has-error .form-control:focus {\n  border-color: #843534;\n  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #ce8483;\n          box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #ce8483;\n}\n.has-error .input-group-addon {\n  color: #a94442;\n  background-color: #f2dede;\n  border-color: #a94442;\n}\n.has-error .form-control-feedback {\n  color: #a94442;\n}\n.has-feedback label ~ .form-control-feedback {\n  top: 25px;\n}\n.has-feedback label.sr-only ~ .form-control-feedback {\n  top: 0;\n}\n.help-block {\n  display: block;\n  margin-top: 5px;\n  margin-bottom: 10px;\n  color: #737373;\n}\n@media (min-width: 768px) {\n  .form-inline .form-group {\n    display: inline-block;\n    margin-bottom: 0;\n    vertical-align: middle;\n  }\n  .form-inline .form-control {\n    display: inline-block;\n    width: auto;\n    vertical-align: middle;\n  }\n  .form-inline .form-control-static {\n    display: inline-block;\n  }\n  .form-inline .input-group {\n    display: inline-table;\n    vertical-align: middle;\n  }\n  .form-inline .input-group .input-group-addon,\n  .form-inline .input-group .input-group-btn,\n  .form-inline .input-group .form-control {\n    width: auto;\n  }\n  .form-inline .input-group > .form-control {\n    width: 100%;\n  }\n  .form-inline .control-label {\n    margin-bottom: 0;\n    vertical-align: middle;\n  }\n  .form-inline .radio,\n  .form-inline .checkbox {\n    display: inline-block;\n    margin-top: 0;\n    margin-bottom: 0;\n    vertical-align: middle;\n  }\n  .form-inline .radio label,\n  .form-inline .checkbox label {\n    padding-left: 0;\n  }\n  .form-inline .radio input[type=\"radio\"],\n  .form-inline .checkbox input[type=\"checkbox\"] {\n    position: relative;\n    margin-left: 0;\n  }\n  .form-inline .has-feedback .form-control-feedback {\n    top: 0;\n  }\n}\n.form-horizontal .radio,\n.form-horizontal .checkbox,\n.form-horizontal .radio-inline,\n.form-horizontal .checkbox-inline {\n  padding-top: 7px;\n  margin-top: 0;\n  margin-bottom: 0;\n}\n.form-horizontal .radio,\n.form-horizontal .checkbox {\n  min-height: 27px;\n}\n.form-horizontal .form-group {\n  margin-right: -15px;\n  margin-left: -15px;\n}\n@media (min-width: 768px) {\n  .form-horizontal .control-label {\n    padding-top: 7px;\n    margin-bottom: 0;\n    text-align: right;\n  }\n}\n.form-horizontal .has-feedback .form-control-feedback {\n  right: 15px;\n}\n@media (min-width: 768px) {\n  .form-horizontal .form-group-lg .control-label {\n    padding-top: 11px;\n    font-size: 18px;\n  }\n}\n@media (min-width: 768px) {\n  .form-horizontal .form-group-sm .control-label {\n    padding-top: 6px;\n    font-size: 12px;\n  }\n}\n.btn {\n  display: inline-block;\n  padding: 6px 12px;\n  margin-bottom: 0;\n  font-size: 14px;\n  font-weight: normal;\n  line-height: 1.42857143;\n  text-align: center;\n  white-space: nowrap;\n  vertical-align: middle;\n  -ms-touch-action: manipulation;\n      touch-action: manipulation;\n  cursor: pointer;\n  -webkit-user-select: none;\n     -moz-user-select: none;\n      -ms-user-select: none;\n          user-select: none;\n  background-image: none;\n  border: 1px solid transparent;\n  border-radius: 4px;\n}\n.btn:focus,\n.btn:active:focus,\n.btn.active:focus,\n.btn.focus,\n.btn:active.focus,\n.btn.active.focus {\n  outline: 5px auto -webkit-focus-ring-color;\n  outline-offset: -2px;\n}\n.btn:hover,\n.btn:focus,\n.btn.focus {\n  color: #333;\n  text-decoration: none;\n}\n.btn:active,\n.btn.active {\n  background-image: none;\n  outline: 0;\n  -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125);\n          box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125);\n}\n.btn.disabled,\n.btn[disabled],\nfieldset[disabled] .btn {\n  cursor: not-allowed;\n  filter: alpha(opacity=65);\n  -webkit-box-shadow: none;\n          box-shadow: none;\n  opacity: .65;\n}\na.btn.disabled,\nfieldset[disabled] a.btn {\n  pointer-events: none;\n}\n.btn-default {\n  color: #333;\n  background-color: #fff;\n  border-color: #ccc;\n}\n.btn-default:focus,\n.btn-default.focus {\n  color: #333;\n  background-color: #e6e6e6;\n  border-color: #8c8c8c;\n}\n.btn-default:hover {\n  color: #333;\n  background-color: #e6e6e6;\n  border-color: #adadad;\n}\n.btn-default:active,\n.btn-default.active,\n.open > .dropdown-toggle.btn-default {\n  color: #333;\n  background-color: #e6e6e6;\n  border-color: #adadad;\n}\n.btn-default:active:hover,\n.btn-default.active:hover,\n.open > .dropdown-toggle.btn-default:hover,\n.btn-default:active:focus,\n.btn-default.active:focus,\n.open > .dropdown-toggle.btn-default:focus,\n.btn-default:active.focus,\n.btn-default.active.focus,\n.open > .dropdown-toggle.btn-default.focus {\n  color: #333;\n  background-color: #d4d4d4;\n  border-color: #8c8c8c;\n}\n.btn-default:active,\n.btn-default.active,\n.open > .dropdown-toggle.btn-default {\n  background-image: none;\n}\n.btn-default.disabled:hover,\n.btn-default[disabled]:hover,\nfieldset[disabled] .btn-default:hover,\n.btn-default.disabled:focus,\n.btn-default[disabled]:focus,\nfieldset[disabled] .btn-default:focus,\n.btn-default.disabled.focus,\n.btn-default[disabled].focus,\nfieldset[disabled] .btn-default.focus {\n  background-color: #fff;\n  border-color: #ccc;\n}\n.btn-default .badge {\n  color: #fff;\n  background-color: #333;\n}\n.btn-primary {\n  color: #fff;\n  background-color: #337ab7;\n  border-color: #2e6da4;\n}\n.btn-primary:focus,\n.btn-primary.focus {\n  color: #fff;\n  background-color: #286090;\n  border-color: #122b40;\n}\n.btn-primary:hover {\n  color: #fff;\n  background-color: #286090;\n  border-color: #204d74;\n}\n.btn-primary:active,\n.btn-primary.active,\n.open > .dropdown-toggle.btn-primary {\n  color: #fff;\n  background-color: #286090;\n  border-color: #204d74;\n}\n.btn-primary:active:hover,\n.btn-primary.active:hover,\n.open > .dropdown-toggle.btn-primary:hover,\n.btn-primary:active:focus,\n.btn-primary.active:focus,\n.open > .dropdown-toggle.btn-primary:focus,\n.btn-primary:active.focus,\n.btn-primary.active.focus,\n.open > .dropdown-toggle.btn-primary.focus {\n  color: #fff;\n  background-color: #204d74;\n  border-color: #122b40;\n}\n.btn-primary:active,\n.btn-primary.active,\n.open > .dropdown-toggle.btn-primary {\n  background-image: none;\n}\n.btn-primary.disabled:hover,\n.btn-primary[disabled]:hover,\nfieldset[disabled] .btn-primary:hover,\n.btn-primary.disabled:focus,\n.btn-primary[disabled]:focus,\nfieldset[disabled] .btn-primary:focus,\n.btn-primary.disabled.focus,\n.btn-primary[disabled].focus,\nfieldset[disabled] .btn-primary.focus {\n  background-color: #337ab7;\n  border-color: #2e6da4;\n}\n.btn-primary .badge {\n  color: #337ab7;\n  background-color: #fff;\n}\n.btn-success {\n  color: #fff;\n  background-color: #5cb85c;\n  border-color: #4cae4c;\n}\n.btn-success:focus,\n.btn-success.focus {\n  color: #fff;\n  background-color: #449d44;\n  border-color: #255625;\n}\n.btn-success:hover {\n  color: #fff;\n  background-color: #449d44;\n  border-color: #398439;\n}\n.btn-success:active,\n.btn-success.active,\n.open > .dropdown-toggle.btn-success {\n  color: #fff;\n  background-color: #449d44;\n  border-color: #398439;\n}\n.btn-success:active:hover,\n.btn-success.active:hover,\n.open > .dropdown-toggle.btn-success:hover,\n.btn-success:active:focus,\n.btn-success.active:focus,\n.open > .dropdown-toggle.btn-success:focus,\n.btn-success:active.focus,\n.btn-success.active.focus,\n.open > .dropdown-toggle.btn-success.focus {\n  color: #fff;\n  background-color: #398439;\n  border-color: #255625;\n}\n.btn-success:active,\n.btn-success.active,\n.open > .dropdown-toggle.btn-success {\n  background-image: none;\n}\n.btn-success.disabled:hover,\n.btn-success[disabled]:hover,\nfieldset[disabled] .btn-success:hover,\n.btn-success.disabled:focus,\n.btn-success[disabled]:focus,\nfieldset[disabled] .btn-success:focus,\n.btn-success.disabled.focus,\n.btn-success[disabled].focus,\nfieldset[disabled] .btn-success.focus {\n  background-color: #5cb85c;\n  border-color: #4cae4c;\n}\n.btn-success .badge {\n  color: #5cb85c;\n  background-color: #fff;\n}\n.btn-info {\n  color: #fff;\n  background-color: #5bc0de;\n  border-color: #46b8da;\n}\n.btn-info:focus,\n.btn-info.focus {\n  color: #fff;\n  background-color: #31b0d5;\n  border-color: #1b6d85;\n}\n.btn-info:hover {\n  color: #fff;\n  background-color: #31b0d5;\n  border-color: #269abc;\n}\n.btn-info:active,\n.btn-info.active,\n.open > .dropdown-toggle.btn-info {\n  color: #fff;\n  background-color: #31b0d5;\n  border-color: #269abc;\n}\n.btn-info:active:hover,\n.btn-info.active:hover,\n.open > .dropdown-toggle.btn-info:hover,\n.btn-info:active:focus,\n.btn-info.active:focus,\n.open > .dropdown-toggle.btn-info:focus,\n.btn-info:active.focus,\n.btn-info.active.focus,\n.open > .dropdown-toggle.btn-info.focus {\n  color: #fff;\n  background-color: #269abc;\n  border-color: #1b6d85;\n}\n.btn-info:active,\n.btn-info.active,\n.open > .dropdown-toggle.btn-info {\n  background-image: none;\n}\n.btn-info.disabled:hover,\n.btn-info[disabled]:hover,\nfieldset[disabled] .btn-info:hover,\n.btn-info.disabled:focus,\n.btn-info[disabled]:focus,\nfieldset[disabled] .btn-info:focus,\n.btn-info.disabled.focus,\n.btn-info[disabled].focus,\nfieldset[disabled] .btn-info.focus {\n  background-color: #5bc0de;\n  border-color: #46b8da;\n}\n.btn-info .badge {\n  color: #5bc0de;\n  background-color: #fff;\n}\n.btn-warning {\n  color: #fff;\n  background-color: #f0ad4e;\n  border-color: #eea236;\n}\n.btn-warning:focus,\n.btn-warning.focus {\n  color: #fff;\n  background-color: #ec971f;\n  border-color: #985f0d;\n}\n.btn-warning:hover {\n  color: #fff;\n  background-color: #ec971f;\n  border-color: #d58512;\n}\n.btn-warning:active,\n.btn-warning.active,\n.open > .dropdown-toggle.btn-warning {\n  color: #fff;\n  background-color: #ec971f;\n  border-color: #d58512;\n}\n.btn-warning:active:hover,\n.btn-warning.active:hover,\n.open > .dropdown-toggle.btn-warning:hover,\n.btn-warning:active:focus,\n.btn-warning.active:focus,\n.open > .dropdown-toggle.btn-warning:focus,\n.btn-warning:active.focus,\n.btn-warning.active.focus,\n.open > .dropdown-toggle.btn-warning.focus {\n  color: #fff;\n  background-color: #d58512;\n  border-color: #985f0d;\n}\n.btn-warning:active,\n.btn-warning.active,\n.open > .dropdown-toggle.btn-warning {\n  background-image: none;\n}\n.btn-warning.disabled:hover,\n.btn-warning[disabled]:hover,\nfieldset[disabled] .btn-warning:hover,\n.btn-warning.disabled:focus,\n.btn-warning[disabled]:focus,\nfieldset[disabled] .btn-warning:focus,\n.btn-warning.disabled.focus,\n.btn-warning[disabled].focus,\nfieldset[disabled] .btn-warning.focus {\n  background-color: #f0ad4e;\n  border-color: #eea236;\n}\n.btn-warning .badge {\n  color: #f0ad4e;\n  background-color: #fff;\n}\n.btn-danger {\n  color: #fff;\n  background-color: #d9534f;\n  border-color: #d43f3a;\n}\n.btn-danger:focus,\n.btn-danger.focus {\n  color: #fff;\n  background-color: #c9302c;\n  border-color: #761c19;\n}\n.btn-danger:hover {\n  color: #fff;\n  background-color: #c9302c;\n  border-color: #ac2925;\n}\n.btn-danger:active,\n.btn-danger.active,\n.open > .dropdown-toggle.btn-danger {\n  color: #fff;\n  background-color: #c9302c;\n  border-color: #ac2925;\n}\n.btn-danger:active:hover,\n.btn-danger.active:hover,\n.open > .dropdown-toggle.btn-danger:hover,\n.btn-danger:active:focus,\n.btn-danger.active:focus,\n.open > .dropdown-toggle.btn-danger:focus,\n.btn-danger:active.focus,\n.btn-danger.active.focus,\n.open > .dropdown-toggle.btn-danger.focus {\n  color: #fff;\n  background-color: #ac2925;\n  border-color: #761c19;\n}\n.btn-danger:active,\n.btn-danger.active,\n.open > .dropdown-toggle.btn-danger {\n  background-image: none;\n}\n.btn-danger.disabled:hover,\n.btn-danger[disabled]:hover,\nfieldset[disabled] .btn-danger:hover,\n.btn-danger.disabled:focus,\n.btn-danger[disabled]:focus,\nfieldset[disabled] .btn-danger:focus,\n.btn-danger.disabled.focus,\n.btn-danger[disabled].focus,\nfieldset[disabled] .btn-danger.focus {\n  background-color: #d9534f;\n  border-color: #d43f3a;\n}\n.btn-danger .badge {\n  color: #d9534f;\n  background-color: #fff;\n}\n.btn-link {\n  font-weight: normal;\n  color: #337ab7;\n  border-radius: 0;\n}\n.btn-link,\n.btn-link:active,\n.btn-link.active,\n.btn-link[disabled],\nfieldset[disabled] .btn-link {\n  background-color: transparent;\n  -webkit-box-shadow: none;\n          box-shadow: none;\n}\n.btn-link,\n.btn-link:hover,\n.btn-link:focus,\n.btn-link:active {\n  border-color: transparent;\n}\n.btn-link:hover,\n.btn-link:focus {\n  color: #23527c;\n  text-decoration: underline;\n  background-color: transparent;\n}\n.btn-link[disabled]:hover,\nfieldset[disabled] .btn-link:hover,\n.btn-link[disabled]:focus,\nfieldset[disabled] .btn-link:focus {\n  color: #777;\n  text-decoration: none;\n}\n.btn-lg,\n.btn-group-lg > .btn {\n  padding: 10px 16px;\n  font-size: 18px;\n  line-height: 1.3333333;\n  border-radius: 6px;\n}\n.btn-sm,\n.btn-group-sm > .btn {\n  padding: 5px 10px;\n  font-size: 12px;\n  line-height: 1.5;\n  border-radius: 3px;\n}\n.btn-xs,\n.btn-group-xs > .btn {\n  padding: 1px 5px;\n  font-size: 12px;\n  line-height: 1.5;\n  border-radius: 3px;\n}\n.btn-block {\n  display: block;\n  width: 100%;\n}\n.btn-block + .btn-block {\n  margin-top: 5px;\n}\ninput[type=\"submit\"].btn-block,\ninput[type=\"reset\"].btn-block,\ninput[type=\"button\"].btn-block {\n  width: 100%;\n}\n.fade {\n  opacity: 0;\n  -webkit-transition: opacity .15s linear;\n       -o-transition: opacity .15s linear;\n          transition: opacity .15s linear;\n}\n.fade.in {\n  opacity: 1;\n}\n.collapse {\n  display: none;\n}\n.collapse.in {\n  display: block;\n}\ntr.collapse.in {\n  display: table-row;\n}\ntbody.collapse.in {\n  display: table-row-group;\n}\n.collapsing {\n  position: relative;\n  height: 0;\n  overflow: hidden;\n  -webkit-transition-timing-function: ease;\n       -o-transition-timing-function: ease;\n          transition-timing-function: ease;\n  -webkit-transition-duration: .35s;\n       -o-transition-duration: .35s;\n          transition-duration: .35s;\n  -webkit-transition-property: height, visibility;\n       -o-transition-property: height, visibility;\n          transition-property: height, visibility;\n}\n.caret {\n  display: inline-block;\n  width: 0;\n  height: 0;\n  margin-left: 2px;\n  vertical-align: middle;\n  border-top: 4px dashed;\n  border-top: 4px solid \\9;\n  border-right: 4px solid transparent;\n  border-left: 4px solid transparent;\n}\n.dropup,\n.dropdown {\n  position: relative;\n}\n.dropdown-toggle:focus {\n  outline: 0;\n}\n.dropdown-menu {\n  position: absolute;\n  top: 100%;\n  left: 0;\n  z-index: 1000;\n  display: none;\n  float: left;\n  min-width: 160px;\n  padding: 5px 0;\n  margin: 2px 0 0;\n  font-size: 14px;\n  text-align: left;\n  list-style: none;\n  background-color: #fff;\n  -webkit-background-clip: padding-box;\n          background-clip: padding-box;\n  border: 1px solid #ccc;\n  border: 1px solid rgba(0, 0, 0, .15);\n  border-radius: 4px;\n  -webkit-box-shadow: 0 6px 12px rgba(0, 0, 0, .175);\n          box-shadow: 0 6px 12px rgba(0, 0, 0, .175);\n}\n.dropdown-menu.pull-right {\n  right: 0;\n  left: auto;\n}\n.dropdown-menu .divider {\n  height: 1px;\n  margin: 9px 0;\n  overflow: hidden;\n  background-color: #e5e5e5;\n}\n.dropdown-menu > li > a {\n  display: block;\n  padding: 3px 20px;\n  clear: both;\n  font-weight: normal;\n  line-height: 1.42857143;\n  color: #333;\n  white-space: nowrap;\n}\n.dropdown-menu > li > a:hover,\n.dropdown-menu > li > a:focus {\n  color: #262626;\n  text-decoration: none;\n  background-color: #f5f5f5;\n}\n.dropdown-menu > .active > a,\n.dropdown-menu > .active > a:hover,\n.dropdown-menu > .active > a:focus {\n  color: #fff;\n  text-decoration: none;\n  background-color: #337ab7;\n  outline: 0;\n}\n.dropdown-menu > .disabled > a,\n.dropdown-menu > .disabled > a:hover,\n.dropdown-menu > .disabled > a:focus {\n  color: #777;\n}\n.dropdown-menu > .disabled > a:hover,\n.dropdown-menu > .disabled > a:focus {\n  text-decoration: none;\n  cursor: not-allowed;\n  background-color: transparent;\n  background-image: none;\n  filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);\n}\n.open > .dropdown-menu {\n  display: block;\n}\n.open > a {\n  outline: 0;\n}\n.dropdown-menu-right {\n  right: 0;\n  left: auto;\n}\n.dropdown-menu-left {\n  right: auto;\n  left: 0;\n}\n.dropdown-header {\n  display: block;\n  padding: 3px 20px;\n  font-size: 12px;\n  line-height: 1.42857143;\n  color: #777;\n  white-space: nowrap;\n}\n.dropdown-backdrop {\n  position: fixed;\n  top: 0;\n  right: 0;\n  bottom: 0;\n  left: 0;\n  z-index: 990;\n}\n.pull-right > .dropdown-menu {\n  right: 0;\n  left: auto;\n}\n.dropup .caret,\n.navbar-fixed-bottom .dropdown .caret {\n  content: \"\";\n  border-top: 0;\n  border-bottom: 4px dashed;\n  border-bottom: 4px solid \\9;\n}\n.dropup .dropdown-menu,\n.navbar-fixed-bottom .dropdown .dropdown-menu {\n  top: auto;\n  bottom: 100%;\n  margin-bottom: 2px;\n}\n@media (min-width: 768px) {\n  .navbar-right .dropdown-menu {\n    right: 0;\n    left: auto;\n  }\n  .navbar-right .dropdown-menu-left {\n    right: auto;\n    left: 0;\n  }\n}\n.btn-group,\n.btn-group-vertical {\n  position: relative;\n  display: inline-block;\n  vertical-align: middle;\n}\n.btn-group > .btn,\n.btn-group-vertical > .btn {\n  position: relative;\n  float: left;\n}\n.btn-group > .btn:hover,\n.btn-group-vertical > .btn:hover,\n.btn-group > .btn:focus,\n.btn-group-vertical > .btn:focus,\n.btn-group > .btn:active,\n.btn-group-vertical > .btn:active,\n.btn-group > .btn.active,\n.btn-group-vertical > .btn.active {\n  z-index: 2;\n}\n.btn-group .btn + .btn,\n.btn-group .btn + .btn-group,\n.btn-group .btn-group + .btn,\n.btn-group .btn-group + .btn-group {\n  margin-left: -1px;\n}\n.btn-toolbar {\n  margin-left: -5px;\n}\n.btn-toolbar .btn,\n.btn-toolbar .btn-group,\n.btn-toolbar .input-group {\n  float: left;\n}\n.btn-toolbar > .btn,\n.btn-toolbar > .btn-group,\n.btn-toolbar > .input-group {\n  margin-left: 5px;\n}\n.btn-group > .btn:not(:first-child):not(:last-child):not(.dropdown-toggle) {\n  border-radius: 0;\n}\n.btn-group > .btn:first-child {\n  margin-left: 0;\n}\n.btn-group > .btn:first-child:not(:last-child):not(.dropdown-toggle) {\n  border-top-right-radius: 0;\n  border-bottom-right-radius: 0;\n}\n.btn-group > .btn:last-child:not(:first-child),\n.btn-group > .dropdown-toggle:not(:first-child) {\n  border-top-left-radius: 0;\n  border-bottom-left-radius: 0;\n}\n.btn-group > .btn-group {\n  float: left;\n}\n.btn-group > .btn-group:not(:first-child):not(:last-child) > .btn {\n  border-radius: 0;\n}\n.btn-group > .btn-group:first-child:not(:last-child) > .btn:last-child,\n.btn-group > .btn-group:first-child:not(:last-child) > .dropdown-toggle {\n  border-top-right-radius: 0;\n  border-bottom-right-radius: 0;\n}\n.btn-group > .btn-group:last-child:not(:first-child) > .btn:first-child {\n  border-top-left-radius: 0;\n  border-bottom-left-radius: 0;\n}\n.btn-group .dropdown-toggle:active,\n.btn-group.open .dropdown-toggle {\n  outline: 0;\n}\n.btn-group > .btn + .dropdown-toggle {\n  padding-right: 8px;\n  padding-left: 8px;\n}\n.btn-group > .btn-lg + .dropdown-toggle {\n  padding-right: 12px;\n  padding-left: 12px;\n}\n.btn-group.open .dropdown-toggle {\n  -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125);\n          box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125);\n}\n.btn-group.open .dropdown-toggle.btn-link {\n  -webkit-box-shadow: none;\n          box-shadow: none;\n}\n.btn .caret {\n  margin-left: 0;\n}\n.btn-lg .caret {\n  border-width: 5px 5px 0;\n  border-bottom-width: 0;\n}\n.dropup .btn-lg .caret {\n  border-width: 0 5px 5px;\n}\n.btn-group-vertical > .btn,\n.btn-group-vertical > .btn-group,\n.btn-group-vertical > .btn-group > .btn {\n  display: block;\n  float: none;\n  width: 100%;\n  max-width: 100%;\n}\n.btn-group-vertical > .btn-group > .btn {\n  float: none;\n}\n.btn-group-vertical > .btn + .btn,\n.btn-group-vertical > .btn + .btn-group,\n.btn-group-vertical > .btn-group + .btn,\n.btn-group-vertical > .btn-group + .btn-group {\n  margin-top: -1px;\n  margin-left: 0;\n}\n.btn-group-vertical > .btn:not(:first-child):not(:last-child) {\n  border-radius: 0;\n}\n.btn-group-vertical > .btn:first-child:not(:last-child) {\n  border-top-left-radius: 4px;\n  border-top-right-radius: 4px;\n  border-bottom-right-radius: 0;\n  border-bottom-left-radius: 0;\n}\n.btn-group-vertical > .btn:last-child:not(:first-child) {\n  border-top-left-radius: 0;\n  border-top-right-radius: 0;\n  border-bottom-right-radius: 4px;\n  border-bottom-left-radius: 4px;\n}\n.btn-group-vertical > .btn-group:not(:first-child):not(:last-child) > .btn {\n  border-radius: 0;\n}\n.btn-group-vertical > .btn-group:first-child:not(:last-child) > .btn:last-child,\n.btn-group-vertical > .btn-group:first-child:not(:last-child) > .dropdown-toggle {\n  border-bottom-right-radius: 0;\n  border-bottom-left-radius: 0;\n}\n.btn-group-vertical > .btn-group:last-child:not(:first-child) > .btn:first-child {\n  border-top-left-radius: 0;\n  border-top-right-radius: 0;\n}\n.btn-group-justified {\n  display: table;\n  width: 100%;\n  table-layout: fixed;\n  border-collapse: separate;\n}\n.btn-group-justified > .btn,\n.btn-group-justified > .btn-group {\n  display: table-cell;\n  float: none;\n  width: 1%;\n}\n.btn-group-justified > .btn-group .btn {\n  width: 100%;\n}\n.btn-group-justified > .btn-group .dropdown-menu {\n  left: auto;\n}\n[data-toggle=\"buttons\"] > .btn input[type=\"radio\"],\n[data-toggle=\"buttons\"] > .btn-group > .btn input[type=\"radio\"],\n[data-toggle=\"buttons\"] > .btn input[type=\"checkbox\"],\n[data-toggle=\"buttons\"] > .btn-group > .btn input[type=\"checkbox\"] {\n  position: absolute;\n  clip: rect(0, 0, 0, 0);\n  pointer-events: none;\n}\n.input-group {\n  position: relative;\n  display: table;\n  border-collapse: separate;\n}\n.input-group[class*=\"col-\"] {\n  float: none;\n  padding-right: 0;\n  padding-left: 0;\n}\n.input-group .form-control {\n  position: relative;\n  z-index: 2;\n  float: left;\n  width: 100%;\n  margin-bottom: 0;\n}\n.input-group .form-control:focus {\n  z-index: 3;\n}\n.input-group-lg > .form-control,\n.input-group-lg > .input-group-addon,\n.input-group-lg > .input-group-btn > .btn {\n  height: 46px;\n  padding: 10px 16px;\n  font-size: 18px;\n  line-height: 1.3333333;\n  border-radius: 6px;\n}\nselect.input-group-lg > .form-control,\nselect.input-group-lg > .input-group-addon,\nselect.input-group-lg > .input-group-btn > .btn {\n  height: 46px;\n  line-height: 46px;\n}\ntextarea.input-group-lg > .form-control,\ntextarea.input-group-lg > .input-group-addon,\ntextarea.input-group-lg > .input-group-btn > .btn,\nselect[multiple].input-group-lg > .form-control,\nselect[multiple].input-group-lg > .input-group-addon,\nselect[multiple].input-group-lg > .input-group-btn > .btn {\n  height: auto;\n}\n.input-group-sm > .form-control,\n.input-group-sm > .input-group-addon,\n.input-group-sm > .input-group-btn > .btn {\n  height: 30px;\n  padding: 5px 10px;\n  font-size: 12px;\n  line-height: 1.5;\n  border-radius: 3px;\n}\nselect.input-group-sm > .form-control,\nselect.input-group-sm > .input-group-addon,\nselect.input-group-sm > .input-group-btn > .btn {\n  height: 30px;\n  line-height: 30px;\n}\ntextarea.input-group-sm > .form-control,\ntextarea.input-group-sm > .input-group-addon,\ntextarea.input-group-sm > .input-group-btn > .btn,\nselect[multiple].input-group-sm > .form-control,\nselect[multiple].input-group-sm > .input-group-addon,\nselect[multiple].input-group-sm > .input-group-btn > .btn {\n  height: auto;\n}\n.input-group-addon,\n.input-group-btn,\n.input-group .form-control {\n  display: table-cell;\n}\n.input-group-addon:not(:first-child):not(:last-child),\n.input-group-btn:not(:first-child):not(:last-child),\n.input-group .form-control:not(:first-child):not(:last-child) {\n  border-radius: 0;\n}\n.input-group-addon,\n.input-group-btn {\n  width: 1%;\n  white-space: nowrap;\n  vertical-align: middle;\n}\n.input-group-addon {\n  padding: 6px 12px;\n  font-size: 14px;\n  font-weight: normal;\n  line-height: 1;\n  color: #555;\n  text-align: center;\n  background-color: #eee;\n  border: 1px solid #ccc;\n  border-radius: 4px;\n}\n.input-group-addon.input-sm {\n  padding: 5px 10px;\n  font-size: 12px;\n  border-radius: 3px;\n}\n.input-group-addon.input-lg {\n  padding: 10px 16px;\n  font-size: 18px;\n  border-radius: 6px;\n}\n.input-group-addon input[type=\"radio\"],\n.input-group-addon input[type=\"checkbox\"] {\n  margin-top: 0;\n}\n.input-group .form-control:first-child,\n.input-group-addon:first-child,\n.input-group-btn:first-child > .btn,\n.input-group-btn:first-child > .btn-group > .btn,\n.input-group-btn:first-child > .dropdown-toggle,\n.input-group-btn:last-child > .btn:not(:last-child):not(.dropdown-toggle),\n.input-group-btn:last-child > .btn-group:not(:last-child) > .btn {\n  border-top-right-radius: 0;\n  border-bottom-right-radius: 0;\n}\n.input-group-addon:first-child {\n  border-right: 0;\n}\n.input-group .form-control:last-child,\n.input-group-addon:last-child,\n.input-group-btn:last-child > .btn,\n.input-group-btn:last-child > .btn-group > .btn,\n.input-group-btn:last-child > .dropdown-toggle,\n.input-group-btn:first-child > .btn:not(:first-child),\n.input-group-btn:first-child > .btn-group:not(:first-child) > .btn {\n  border-top-left-radius: 0;\n  border-bottom-left-radius: 0;\n}\n.input-group-addon:last-child {\n  border-left: 0;\n}\n.input-group-btn {\n  position: relative;\n  font-size: 0;\n  white-space: nowrap;\n}\n.input-group-btn > .btn {\n  position: relative;\n}\n.input-group-btn > .btn + .btn {\n  margin-left: -1px;\n}\n.input-group-btn > .btn:hover,\n.input-group-btn > .btn:focus,\n.input-group-btn > .btn:active {\n  z-index: 2;\n}\n.input-group-btn:first-child > .btn,\n.input-group-btn:first-child > .btn-group {\n  margin-right: -1px;\n}\n.input-group-btn:last-child > .btn,\n.input-group-btn:last-child > .btn-group {\n  z-index: 2;\n  margin-left: -1px;\n}\n.nav {\n  padding-left: 0;\n  margin-bottom: 0;\n  list-style: none;\n}\n.nav > li {\n  position: relative;\n  display: block;\n}\n.nav > li > a {\n  position: relative;\n  display: block;\n  padding: 10px 15px;\n}\n.nav > li > a:hover,\n.nav > li > a:focus {\n  text-decoration: none;\n  background-color: #eee;\n}\n.nav > li.disabled > a {\n  color: #777;\n}\n.nav > li.disabled > a:hover,\n.nav > li.disabled > a:focus {\n  color: #777;\n  text-decoration: none;\n  cursor: not-allowed;\n  background-color: transparent;\n}\n.nav .open > a,\n.nav .open > a:hover,\n.nav .open > a:focus {\n  background-color: #eee;\n  border-color: #337ab7;\n}\n.nav .nav-divider {\n  height: 1px;\n  margin: 9px 0;\n  overflow: hidden;\n  background-color: #e5e5e5;\n}\n.nav > li > a > img {\n  max-width: none;\n}\n.nav-tabs {\n  border-bottom: 1px solid #ddd;\n}\n.nav-tabs > li {\n  float: left;\n  margin-bottom: -1px;\n}\n.nav-tabs > li > a {\n  margin-right: 2px;\n  line-height: 1.42857143;\n  border: 1px solid transparent;\n  border-radius: 4px 4px 0 0;\n}\n.nav-tabs > li > a:hover {\n  border-color: #eee #eee #ddd;\n}\n.nav-tabs > li.active > a,\n.nav-tabs > li.active > a:hover,\n.nav-tabs > li.active > a:focus {\n  color: #555;\n  cursor: default;\n  background-color: #fff;\n  border: 1px solid #ddd;\n  border-bottom-color: transparent;\n}\n.nav-tabs.nav-justified {\n  width: 100%;\n  border-bottom: 0;\n}\n.nav-tabs.nav-justified > li {\n  float: none;\n}\n.nav-tabs.nav-justified > li > a {\n  margin-bottom: 5px;\n  text-align: center;\n}\n.nav-tabs.nav-justified > .dropdown .dropdown-menu {\n  top: auto;\n  left: auto;\n}\n@media (min-width: 768px) {\n  .nav-tabs.nav-justified > li {\n    display: table-cell;\n    width: 1%;\n  }\n  .nav-tabs.nav-justified > li > a {\n    margin-bottom: 0;\n  }\n}\n.nav-tabs.nav-justified > li > a {\n  margin-right: 0;\n  border-radius: 4px;\n}\n.nav-tabs.nav-justified > .active > a,\n.nav-tabs.nav-justified > .active > a:hover,\n.nav-tabs.nav-justified > .active > a:focus {\n  border: 1px solid #ddd;\n}\n@media (min-width: 768px) {\n  .nav-tabs.nav-justified > li > a {\n    border-bottom: 1px solid #ddd;\n    border-radius: 4px 4px 0 0;\n  }\n  .nav-tabs.nav-justified > .active > a,\n  .nav-tabs.nav-justified > .active > a:hover,\n  .nav-tabs.nav-justified > .active > a:focus {\n    border-bottom-color: #fff;\n  }\n}\n.nav-pills > li {\n  float: left;\n}\n.nav-pills > li > a {\n  border-radius: 4px;\n}\n.nav-pills > li + li {\n  margin-left: 2px;\n}\n.nav-pills > li.active > a,\n.nav-pills > li.active > a:hover,\n.nav-pills > li.active > a:focus {\n  color: #fff;\n  background-color: #337ab7;\n}\n.nav-stacked > li {\n  float: none;\n}\n.nav-stacked > li + li {\n  margin-top: 2px;\n  margin-left: 0;\n}\n.nav-justified {\n  width: 100%;\n}\n.nav-justified > li {\n  float: none;\n}\n.nav-justified > li > a {\n  margin-bottom: 5px;\n  text-align: center;\n}\n.nav-justified > .dropdown .dropdown-menu {\n  top: auto;\n  left: auto;\n}\n@media (min-width: 768px) {\n  .nav-justified > li {\n    display: table-cell;\n    width: 1%;\n  }\n  .nav-justified > li > a {\n    margin-bottom: 0;\n  }\n}\n.nav-tabs-justified {\n  border-bottom: 0;\n}\n.nav-tabs-justified > li > a {\n  margin-right: 0;\n  border-radius: 4px;\n}\n.nav-tabs-justified > .active > a,\n.nav-tabs-justified > .active > a:hover,\n.nav-tabs-justified > .active > a:focus {\n  border: 1px solid #ddd;\n}\n@media (min-width: 768px) {\n  .nav-tabs-justified > li > a {\n    border-bottom: 1px solid #ddd;\n    border-radius: 4px 4px 0 0;\n  }\n  .nav-tabs-justified > .active > a,\n  .nav-tabs-justified > .active > a:hover,\n  .nav-tabs-justified > .active > a:focus {\n    border-bottom-color: #fff;\n  }\n}\n.tab-content > .tab-pane {\n  display: none;\n}\n.tab-content > .active {\n  display: block;\n}\n.nav-tabs .dropdown-menu {\n  margin-top: -1px;\n  border-top-left-radius: 0;\n  border-top-right-radius: 0;\n}\n.navbar {\n  position: relative;\n  min-height: 50px;\n  margin-bottom: 20px;\n  border: 1px solid transparent;\n}\n@media (min-width: 768px) {\n  .navbar {\n    border-radius: 4px;\n  }\n}\n@media (min-width: 768px) {\n  .navbar-header {\n    float: left;\n  }\n}\n.navbar-collapse {\n  padding-right: 15px;\n  padding-left: 15px;\n  overflow-x: visible;\n  -webkit-overflow-scrolling: touch;\n  border-top: 1px solid transparent;\n  -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1);\n          box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1);\n}\n.navbar-collapse.in {\n  overflow-y: auto;\n}\n@media (min-width: 768px) {\n  .navbar-collapse {\n    width: auto;\n    border-top: 0;\n    -webkit-box-shadow: none;\n            box-shadow: none;\n  }\n  .navbar-collapse.collapse {\n    display: block !important;\n    height: auto !important;\n    padding-bottom: 0;\n    overflow: visible !important;\n  }\n  .navbar-collapse.in {\n    overflow-y: visible;\n  }\n  .navbar-fixed-top .navbar-collapse,\n  .navbar-static-top .navbar-collapse,\n  .navbar-fixed-bottom .navbar-collapse {\n    padding-right: 0;\n    padding-left: 0;\n  }\n}\n.navbar-fixed-top .navbar-collapse,\n.navbar-fixed-bottom .navbar-collapse {\n  max-height: 340px;\n}\n@media (max-device-width: 480px) and (orientation: landscape) {\n  .navbar-fixed-top .navbar-collapse,\n  .navbar-fixed-bottom .navbar-collapse {\n    max-height: 200px;\n  }\n}\n.container > .navbar-header,\n.container-fluid > .navbar-header,\n.container > .navbar-collapse,\n.container-fluid > .navbar-collapse {\n  margin-right: -15px;\n  margin-left: -15px;\n}\n@media (min-width: 768px) {\n  .container > .navbar-header,\n  .container-fluid > .navbar-header,\n  .container > .navbar-collapse,\n  .container-fluid > .navbar-collapse {\n    margin-right: 0;\n    margin-left: 0;\n  }\n}\n.navbar-static-top {\n  z-index: 1000;\n  border-width: 0 0 1px;\n}\n@media (min-width: 768px) {\n  .navbar-static-top {\n    border-radius: 0;\n  }\n}\n.navbar-fixed-top,\n.navbar-fixed-bottom {\n  position: fixed;\n  right: 0;\n  left: 0;\n  z-index: 1030;\n}\n@media (min-width: 768px) {\n  .navbar-fixed-top,\n  .navbar-fixed-bottom {\n    border-radius: 0;\n  }\n}\n.navbar-fixed-top {\n  top: 0;\n  border-width: 0 0 1px;\n}\n.navbar-fixed-bottom {\n  bottom: 0;\n  margin-bottom: 0;\n  border-width: 1px 0 0;\n}\n.navbar-brand {\n  float: left;\n  height: 50px;\n  padding: 15px 15px;\n  font-size: 18px;\n  line-height: 20px;\n}\n.navbar-brand:hover,\n.navbar-brand:focus {\n  text-decoration: none;\n}\n.navbar-brand > img {\n  display: block;\n}\n@media (min-width: 768px) {\n  .navbar > .container .navbar-brand,\n  .navbar > .container-fluid .navbar-brand {\n    margin-left: -15px;\n  }\n}\n.navbar-toggle {\n  position: relative;\n  float: right;\n  padding: 9px 10px;\n  margin-top: 8px;\n  margin-right: 15px;\n  margin-bottom: 8px;\n  background-color: transparent;\n  background-image: none;\n  border: 1px solid transparent;\n  border-radius: 4px;\n}\n.navbar-toggle:focus {\n  outline: 0;\n}\n.navbar-toggle .icon-bar {\n  display: block;\n  width: 22px;\n  height: 2px;\n  border-radius: 1px;\n}\n.navbar-toggle .icon-bar + .icon-bar {\n  margin-top: 4px;\n}\n@media (min-width: 768px) {\n  .navbar-toggle {\n    display: none;\n  }\n}\n.navbar-nav {\n  margin: 7.5px -15px;\n}\n.navbar-nav > li > a {\n  padding-top: 10px;\n  padding-bottom: 10px;\n  line-height: 20px;\n}\n@media (max-width: 767px) {\n  .navbar-nav .open .dropdown-menu {\n    position: static;\n    float: none;\n    width: auto;\n    margin-top: 0;\n    background-color: transparent;\n    border: 0;\n    -webkit-box-shadow: none;\n            box-shadow: none;\n  }\n  .navbar-nav .open .dropdown-menu > li > a,\n  .navbar-nav .open .dropdown-menu .dropdown-header {\n    padding: 5px 15px 5px 25px;\n  }\n  .navbar-nav .open .dropdown-menu > li > a {\n    line-height: 20px;\n  }\n  .navbar-nav .open .dropdown-menu > li > a:hover,\n  .navbar-nav .open .dropdown-menu > li > a:focus {\n    background-image: none;\n  }\n}\n@media (min-width: 768px) {\n  .navbar-nav {\n    float: left;\n    margin: 0;\n  }\n  .navbar-nav > li {\n    float: left;\n  }\n  .navbar-nav > li > a {\n    padding-top: 15px;\n    padding-bottom: 15px;\n  }\n}\n.navbar-form {\n  padding: 10px 15px;\n  margin-top: 8px;\n  margin-right: -15px;\n  margin-bottom: 8px;\n  margin-left: -15px;\n  border-top: 1px solid transparent;\n  border-bottom: 1px solid transparent;\n  -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1), 0 1px 0 rgba(255, 255, 255, .1);\n          box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1), 0 1px 0 rgba(255, 255, 255, .1);\n}\n@media (min-width: 768px) {\n  .navbar-form .form-group {\n    display: inline-block;\n    margin-bottom: 0;\n    vertical-align: middle;\n  }\n  .navbar-form .form-control {\n    display: inline-block;\n    width: auto;\n    vertical-align: middle;\n  }\n  .navbar-form .form-control-static {\n    display: inline-block;\n  }\n  .navbar-form .input-group {\n    display: inline-table;\n    vertical-align: middle;\n  }\n  .navbar-form .input-group .input-group-addon,\n  .navbar-form .input-group .input-group-btn,\n  .navbar-form .input-group .form-control {\n    width: auto;\n  }\n  .navbar-form .input-group > .form-control {\n    width: 100%;\n  }\n  .navbar-form .control-label {\n    margin-bottom: 0;\n    vertical-align: middle;\n  }\n  .navbar-form .radio,\n  .navbar-form .checkbox {\n    display: inline-block;\n    margin-top: 0;\n    margin-bottom: 0;\n    vertical-align: middle;\n  }\n  .navbar-form .radio label,\n  .navbar-form .checkbox label {\n    padding-left: 0;\n  }\n  .navbar-form .radio input[type=\"radio\"],\n  .navbar-form .checkbox input[type=\"checkbox\"] {\n    position: relative;\n    margin-left: 0;\n  }\n  .navbar-form .has-feedback .form-control-feedback {\n    top: 0;\n  }\n}\n@media (max-width: 767px) {\n  .navbar-form .form-group {\n    margin-bottom: 5px;\n  }\n  .navbar-form .form-group:last-child {\n    margin-bottom: 0;\n  }\n}\n@media (min-width: 768px) {\n  .navbar-form {\n    width: auto;\n    padding-top: 0;\n    padding-bottom: 0;\n    margin-right: 0;\n    margin-left: 0;\n    border: 0;\n    -webkit-box-shadow: none;\n            box-shadow: none;\n  }\n}\n.navbar-nav > li > .dropdown-menu {\n  margin-top: 0;\n  border-top-left-radius: 0;\n  border-top-right-radius: 0;\n}\n.navbar-fixed-bottom .navbar-nav > li > .dropdown-menu {\n  margin-bottom: 0;\n  border-top-left-radius: 4px;\n  border-top-right-radius: 4px;\n  border-bottom-right-radius: 0;\n  border-bottom-left-radius: 0;\n}\n.navbar-btn {\n  margin-top: 8px;\n  margin-bottom: 8px;\n}\n.navbar-btn.btn-sm {\n  margin-top: 10px;\n  margin-bottom: 10px;\n}\n.navbar-btn.btn-xs {\n  margin-top: 14px;\n  margin-bottom: 14px;\n}\n.navbar-text {\n  margin-top: 15px;\n  margin-bottom: 15px;\n}\n@media (min-width: 768px) {\n  .navbar-text {\n    float: left;\n    margin-right: 15px;\n    margin-left: 15px;\n  }\n}\n@media (min-width: 768px) {\n  .navbar-left {\n    float: left !important;\n  }\n  .navbar-right {\n    float: right !important;\n    margin-right: -15px;\n  }\n  .navbar-right ~ .navbar-right {\n    margin-right: 0;\n  }\n}\n.navbar-default {\n  background-color: #f8f8f8;\n  border-color: #e7e7e7;\n}\n.navbar-default .navbar-brand {\n  color: #777;\n}\n.navbar-default .navbar-brand:hover,\n.navbar-default .navbar-brand:focus {\n  color: #5e5e5e;\n  background-color: transparent;\n}\n.navbar-default .navbar-text {\n  color: #777;\n}\n.navbar-default .navbar-nav > li > a {\n  color: #777;\n}\n.navbar-default .navbar-nav > li > a:hover,\n.navbar-default .navbar-nav > li > a:focus {\n  color: #333;\n  background-color: transparent;\n}\n.navbar-default .navbar-nav > .active > a,\n.navbar-default .navbar-nav > .active > a:hover,\n.navbar-default .navbar-nav > .active > a:focus {\n  color: #555;\n  background-color: #e7e7e7;\n}\n.navbar-default .navbar-nav > .disabled > a,\n.navbar-default .navbar-nav > .disabled > a:hover,\n.navbar-default .navbar-nav > .disabled > a:focus {\n  color: #ccc;\n  background-color: transparent;\n}\n.navbar-default .navbar-toggle {\n  border-color: #ddd;\n}\n.navbar-default .navbar-toggle:hover,\n.navbar-default .navbar-toggle:focus {\n  background-color: #ddd;\n}\n.navbar-default .navbar-toggle .icon-bar {\n  background-color: #888;\n}\n.navbar-default .navbar-collapse,\n.navbar-default .navbar-form {\n  border-color: #e7e7e7;\n}\n.navbar-default .navbar-nav > .open > a,\n.navbar-default .navbar-nav > .open > a:hover,\n.navbar-default .navbar-nav > .open > a:focus {\n  color: #555;\n  background-color: #e7e7e7;\n}\n@media (max-width: 767px) {\n  .navbar-default .navbar-nav .open .dropdown-menu > li > a {\n    color: #777;\n  }\n  .navbar-default .navbar-nav .open .dropdown-menu > li > a:hover,\n  .navbar-default .navbar-nav .open .dropdown-menu > li > a:focus {\n    color: #333;\n    background-color: transparent;\n  }\n  .navbar-default .navbar-nav .open .dropdown-menu > .active > a,\n  .navbar-default .navbar-nav .open .dropdown-menu > .active > a:hover,\n  .navbar-default .navbar-nav .open .dropdown-menu > .active > a:focus {\n    color: #555;\n    background-color: #e7e7e7;\n  }\n  .navbar-default .navbar-nav .open .dropdown-menu > .disabled > a,\n  .navbar-default .navbar-nav .open .dropdown-menu > .disabled > a:hover,\n  .navbar-default .navbar-nav .open .dropdown-menu > .disabled > a:focus {\n    color: #ccc;\n    background-color: transparent;\n  }\n}\n.navbar-default .navbar-link {\n  color: #777;\n}\n.navbar-default .navbar-link:hover {\n  color: #333;\n}\n.navbar-default .btn-link {\n  color: #777;\n}\n.navbar-default .btn-link:hover,\n.navbar-default .btn-link:focus {\n  color: #333;\n}\n.navbar-default .btn-link[disabled]:hover,\nfieldset[disabled] .navbar-default .btn-link:hover,\n.navbar-default .btn-link[disabled]:focus,\nfieldset[disabled] .navbar-default .btn-link:focus {\n  color: #ccc;\n}\n.navbar-inverse {\n  background-color: #222;\n  border-color: #080808;\n}\n.navbar-inverse .navbar-brand {\n  color: #9d9d9d;\n}\n.navbar-inverse .navbar-brand:hover,\n.navbar-inverse .navbar-brand:focus {\n  color: #fff;\n  background-color: transparent;\n}\n.navbar-inverse .navbar-text {\n  color: #9d9d9d;\n}\n.navbar-inverse .navbar-nav > li > a {\n  color: #9d9d9d;\n}\n.navbar-inverse .navbar-nav > li > a:hover,\n.navbar-inverse .navbar-nav > li > a:focus {\n  color: #fff;\n  background-color: transparent;\n}\n.navbar-inverse .navbar-nav > .active > a,\n.navbar-inverse .navbar-nav > .active > a:hover,\n.navbar-inverse .navbar-nav > .active > a:focus {\n  color: #fff;\n  background-color: #080808;\n}\n.navbar-inverse .navbar-nav > .disabled > a,\n.navbar-inverse .navbar-nav > .disabled > a:hover,\n.navbar-inverse .navbar-nav > .disabled > a:focus {\n  color: #444;\n  background-color: transparent;\n}\n.navbar-inverse .navbar-toggle {\n  border-color: #333;\n}\n.navbar-inverse .navbar-toggle:hover,\n.navbar-inverse .navbar-toggle:focus {\n  background-color: #333;\n}\n.navbar-inverse .navbar-toggle .icon-bar {\n  background-color: #fff;\n}\n.navbar-inverse .navbar-collapse,\n.navbar-inverse .navbar-form {\n  border-color: #101010;\n}\n.navbar-inverse .navbar-nav > .open > a,\n.navbar-inverse .navbar-nav > .open > a:hover,\n.navbar-inverse .navbar-nav > .open > a:focus {\n  color: #fff;\n  background-color: #080808;\n}\n@media (max-width: 767px) {\n  .navbar-inverse .navbar-nav .open .dropdown-menu > .dropdown-header {\n    border-color: #080808;\n  }\n  .navbar-inverse .navbar-nav .open .dropdown-menu .divider {\n    background-color: #080808;\n  }\n  .navbar-inverse .navbar-nav .open .dropdown-menu > li > a {\n    color: #9d9d9d;\n  }\n  .navbar-inverse .navbar-nav .open .dropdown-menu > li > a:hover,\n  .navbar-inverse .navbar-nav .open .dropdown-menu > li > a:focus {\n    color: #fff;\n    background-color: transparent;\n  }\n  .navbar-inverse .navbar-nav .open .dropdown-menu > .active > a,\n  .navbar-inverse .navbar-nav .open .dropdown-menu > .active > a:hover,\n  .navbar-inverse .navbar-nav .open .dropdown-menu > .active > a:focus {\n    color: #fff;\n    background-color: #080808;\n  }\n  .navbar-inverse .navbar-nav .open .dropdown-menu > .disabled > a,\n  .navbar-inverse .navbar-nav .open .dropdown-menu > .disabled > a:hover,\n  .navbar-inverse .navbar-nav .open .dropdown-menu > .disabled > a:focus {\n    color: #444;\n    background-color: transparent;\n  }\n}\n.navbar-inverse .navbar-link {\n  color: #9d9d9d;\n}\n.navbar-inverse .navbar-link:hover {\n  color: #fff;\n}\n.navbar-inverse .btn-link {\n  color: #9d9d9d;\n}\n.navbar-inverse .btn-link:hover,\n.navbar-inverse .btn-link:focus {\n  color: #fff;\n}\n.navbar-inverse .btn-link[disabled]:hover,\nfieldset[disabled] .navbar-inverse .btn-link:hover,\n.navbar-inverse .btn-link[disabled]:focus,\nfieldset[disabled] .navbar-inverse .btn-link:focus {\n  color: #444;\n}\n.breadcrumb {\n  padding: 8px 15px;\n  margin-bottom: 20px;\n  list-style: none;\n  background-color: #f5f5f5;\n  border-radius: 4px;\n}\n.breadcrumb > li {\n  display: inline-block;\n}\n.breadcrumb > li + li:before {\n  padding: 0 5px;\n  color: #ccc;\n  content: \"/\\00a0\";\n}\n.breadcrumb > .active {\n  color: #777;\n}\n.pagination {\n  display: inline-block;\n  padding-left: 0;\n  margin: 20px 0;\n  border-radius: 4px;\n}\n.pagination > li {\n  display: inline;\n}\n.pagination > li > a,\n.pagination > li > span {\n  position: relative;\n  float: left;\n  padding: 6px 12px;\n  margin-left: -1px;\n  line-height: 1.42857143;\n  color: #337ab7;\n  text-decoration: none;\n  background-color: #fff;\n  border: 1px solid #ddd;\n}\n.pagination > li:first-child > a,\n.pagination > li:first-child > span {\n  margin-left: 0;\n  border-top-left-radius: 4px;\n  border-bottom-left-radius: 4px;\n}\n.pagination > li:last-child > a,\n.pagination > li:last-child > span {\n  border-top-right-radius: 4px;\n  border-bottom-right-radius: 4px;\n}\n.pagination > li > a:hover,\n.pagination > li > span:hover,\n.pagination > li > a:focus,\n.pagination > li > span:focus {\n  z-index: 2;\n  color: #23527c;\n  background-color: #eee;\n  border-color: #ddd;\n}\n.pagination > .active > a,\n.pagination > .active > span,\n.pagination > .active > a:hover,\n.pagination > .active > span:hover,\n.pagination > .active > a:focus,\n.pagination > .active > span:focus {\n  z-index: 3;\n  color: #fff;\n  cursor: default;\n  background-color: #337ab7;\n  border-color: #337ab7;\n}\n.pagination > .disabled > span,\n.pagination > .disabled > span:hover,\n.pagination > .disabled > span:focus,\n.pagination > .disabled > a,\n.pagination > .disabled > a:hover,\n.pagination > .disabled > a:focus {\n  color: #777;\n  cursor: not-allowed;\n  background-color: #fff;\n  border-color: #ddd;\n}\n.pagination-lg > li > a,\n.pagination-lg > li > span {\n  padding: 10px 16px;\n  font-size: 18px;\n  line-height: 1.3333333;\n}\n.pagination-lg > li:first-child > a,\n.pagination-lg > li:first-child > span {\n  border-top-left-radius: 6px;\n  border-bottom-left-radius: 6px;\n}\n.pagination-lg > li:last-child > a,\n.pagination-lg > li:last-child > span {\n  border-top-right-radius: 6px;\n  border-bottom-right-radius: 6px;\n}\n.pagination-sm > li > a,\n.pagination-sm > li > span {\n  padding: 5px 10px;\n  font-size: 12px;\n  line-height: 1.5;\n}\n.pagination-sm > li:first-child > a,\n.pagination-sm > li:first-child > span {\n  border-top-left-radius: 3px;\n  border-bottom-left-radius: 3px;\n}\n.pagination-sm > li:last-child > a,\n.pagination-sm > li:last-child > span {\n  border-top-right-radius: 3px;\n  border-bottom-right-radius: 3px;\n}\n.pager {\n  padding-left: 0;\n  margin: 20px 0;\n  text-align: center;\n  list-style: none;\n}\n.pager li {\n  display: inline;\n}\n.pager li > a,\n.pager li > span {\n  display: inline-block;\n  padding: 5px 14px;\n  background-color: #fff;\n  border: 1px solid #ddd;\n  border-radius: 15px;\n}\n.pager li > a:hover,\n.pager li > a:focus {\n  text-decoration: none;\n  background-color: #eee;\n}\n.pager .next > a,\n.pager .next > span {\n  float: right;\n}\n.pager .previous > a,\n.pager .previous > span {\n  float: left;\n}\n.pager .disabled > a,\n.pager .disabled > a:hover,\n.pager .disabled > a:focus,\n.pager .disabled > span {\n  color: #777;\n  cursor: not-allowed;\n  background-color: #fff;\n}\n.label {\n  display: inline;\n  padding: .2em .6em .3em;\n  font-size: 75%;\n  font-weight: bold;\n  line-height: 1;\n  color: #fff;\n  text-align: center;\n  white-space: nowrap;\n  vertical-align: baseline;\n  border-radius: .25em;\n}\na.label:hover,\na.label:focus {\n  color: #fff;\n  text-decoration: none;\n  cursor: pointer;\n}\n.label:empty {\n  display: none;\n}\n.btn .label {\n  position: relative;\n  top: -1px;\n}\n.label-default {\n  background-color: #777;\n}\n.label-default[href]:hover,\n.label-default[href]:focus {\n  background-color: #5e5e5e;\n}\n.label-primary {\n  background-color: #337ab7;\n}\n.label-primary[href]:hover,\n.label-primary[href]:focus {\n  background-color: #286090;\n}\n.label-success {\n  background-color: #5cb85c;\n}\n.label-success[href]:hover,\n.label-success[href]:focus {\n  background-color: #449d44;\n}\n.label-info {\n  background-color: #5bc0de;\n}\n.label-info[href]:hover,\n.label-info[href]:focus {\n  background-color: #31b0d5;\n}\n.label-warning {\n  background-color: #f0ad4e;\n}\n.label-warning[href]:hover,\n.label-warning[href]:focus {\n  background-color: #ec971f;\n}\n.label-danger {\n  background-color: #d9534f;\n}\n.label-danger[href]:hover,\n.label-danger[href]:focus {\n  background-color: #c9302c;\n}\n.badge {\n  display: inline-block;\n  min-width: 10px;\n  padding: 3px 7px;\n  font-size: 12px;\n  font-weight: bold;\n  line-height: 1;\n  color: #fff;\n  text-align: center;\n  white-space: nowrap;\n  vertical-align: middle;\n  background-color: #777;\n  border-radius: 10px;\n}\n.badge:empty {\n  display: none;\n}\n.btn .badge {\n  position: relative;\n  top: -1px;\n}\n.btn-xs .badge,\n.btn-group-xs > .btn .badge {\n  top: 0;\n  padding: 1px 5px;\n}\na.badge:hover,\na.badge:focus {\n  color: #fff;\n  text-decoration: none;\n  cursor: pointer;\n}\n.list-group-item.active > .badge,\n.nav-pills > .active > a > .badge {\n  color: #337ab7;\n  background-color: #fff;\n}\n.list-group-item > .badge {\n  float: right;\n}\n.list-group-item > .badge + .badge {\n  margin-right: 5px;\n}\n.nav-pills > li > a > .badge {\n  margin-left: 3px;\n}\n.jumbotron {\n  padding-top: 30px;\n  padding-bottom: 30px;\n  margin-bottom: 30px;\n  color: inherit;\n  background-color: #eee;\n}\n.jumbotron h1,\n.jumbotron .h1 {\n  color: inherit;\n}\n.jumbotron p {\n  margin-bottom: 15px;\n  font-size: 21px;\n  font-weight: 200;\n}\n.jumbotron > hr {\n  border-top-color: #d5d5d5;\n}\n.container .jumbotron,\n.container-fluid .jumbotron {\n  padding-right: 15px;\n  padding-left: 15px;\n  border-radius: 6px;\n}\n.jumbotron .container {\n  max-width: 100%;\n}\n@media screen and (min-width: 768px) {\n  .jumbotron {\n    padding-top: 48px;\n    padding-bottom: 48px;\n  }\n  .container .jumbotron,\n  .container-fluid .jumbotron {\n    padding-right: 60px;\n    padding-left: 60px;\n  }\n  .jumbotron h1,\n  .jumbotron .h1 {\n    font-size: 63px;\n  }\n}\n.thumbnail {\n  display: block;\n  padding: 4px;\n  margin-bottom: 20px;\n  line-height: 1.42857143;\n  background-color: #fff;\n  border: 1px solid #ddd;\n  border-radius: 4px;\n  -webkit-transition: border .2s ease-in-out;\n       -o-transition: border .2s ease-in-out;\n          transition: border .2s ease-in-out;\n}\n.thumbnail > img,\n.thumbnail a > img {\n  margin-right: auto;\n  margin-left: auto;\n}\na.thumbnail:hover,\na.thumbnail:focus,\na.thumbnail.active {\n  border-color: #337ab7;\n}\n.thumbnail .caption {\n  padding: 9px;\n  color: #333;\n}\n.alert {\n  padding: 15px;\n  margin-bottom: 20px;\n  border: 1px solid transparent;\n  border-radius: 4px;\n}\n.alert h4 {\n  margin-top: 0;\n  color: inherit;\n}\n.alert .alert-link {\n  font-weight: bold;\n}\n.alert > p,\n.alert > ul {\n  margin-bottom: 0;\n}\n.alert > p + p {\n  margin-top: 5px;\n}\n.alert-dismissable,\n.alert-dismissible {\n  padding-right: 35px;\n}\n.alert-dismissable .close,\n.alert-dismissible .close {\n  position: relative;\n  top: -2px;\n  right: -21px;\n  color: inherit;\n}\n.alert-success {\n  color: #3c763d;\n  background-color: #dff0d8;\n  border-color: #d6e9c6;\n}\n.alert-success hr {\n  border-top-color: #c9e2b3;\n}\n.alert-success .alert-link {\n  color: #2b542c;\n}\n.alert-info {\n  color: #31708f;\n  background-color: #d9edf7;\n  border-color: #bce8f1;\n}\n.alert-info hr {\n  border-top-color: #a6e1ec;\n}\n.alert-info .alert-link {\n  color: #245269;\n}\n.alert-warning {\n  color: #8a6d3b;\n  background-color: #fcf8e3;\n  border-color: #faebcc;\n}\n.alert-warning hr {\n  border-top-color: #f7e1b5;\n}\n.alert-warning .alert-link {\n  color: #66512c;\n}\n.alert-danger {\n  color: #a94442;\n  background-color: #f2dede;\n  border-color: #ebccd1;\n}\n.alert-danger hr {\n  border-top-color: #e4b9c0;\n}\n.alert-danger .alert-link {\n  color: #843534;\n}\n@-webkit-keyframes progress-bar-stripes {\n  from {\n    background-position: 40px 0;\n  }\n  to {\n    background-position: 0 0;\n  }\n}\n@-o-keyframes progress-bar-stripes {\n  from {\n    background-position: 40px 0;\n  }\n  to {\n    background-position: 0 0;\n  }\n}\n@keyframes progress-bar-stripes {\n  from {\n    background-position: 40px 0;\n  }\n  to {\n    background-position: 0 0;\n  }\n}\n.progress {\n  height: 20px;\n  margin-bottom: 20px;\n  overflow: hidden;\n  background-color: #f5f5f5;\n  border-radius: 4px;\n  -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, .1);\n          box-shadow: inset 0 1px 2px rgba(0, 0, 0, .1);\n}\n.progress-bar {\n  float: left;\n  width: 0;\n  height: 100%;\n  font-size: 12px;\n  line-height: 20px;\n  color: #fff;\n  text-align: center;\n  background-color: #337ab7;\n  -webkit-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .15);\n          box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .15);\n  -webkit-transition: width .6s ease;\n       -o-transition: width .6s ease;\n          transition: width .6s ease;\n}\n.progress-striped .progress-bar,\n.progress-bar-striped {\n  background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);\n  background-image:      -o-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);\n  background-image:         linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);\n  -webkit-background-size: 40px 40px;\n          background-size: 40px 40px;\n}\n.progress.active .progress-bar,\n.progress-bar.active {\n  -webkit-animation: progress-bar-stripes 2s linear infinite;\n       -o-animation: progress-bar-stripes 2s linear infinite;\n          animation: progress-bar-stripes 2s linear infinite;\n}\n.progress-bar-success {\n  background-color: #5cb85c;\n}\n.progress-striped .progress-bar-success {\n  background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);\n  background-image:      -o-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);\n  background-image:         linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);\n}\n.progress-bar-info {\n  background-color: #5bc0de;\n}\n.progress-striped .progress-bar-info {\n  background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);\n  background-image:      -o-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);\n  background-image:         linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);\n}\n.progress-bar-warning {\n  background-color: #f0ad4e;\n}\n.progress-striped .progress-bar-warning {\n  background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);\n  background-image:      -o-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);\n  background-image:         linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);\n}\n.progress-bar-danger {\n  background-color: #d9534f;\n}\n.progress-striped .progress-bar-danger {\n  background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);\n  background-image:      -o-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);\n  background-image:         linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);\n}\n.media {\n  margin-top: 15px;\n}\n.media:first-child {\n  margin-top: 0;\n}\n.media,\n.media-body {\n  overflow: hidden;\n  zoom: 1;\n}\n.media-body {\n  width: 10000px;\n}\n.media-object {\n  display: block;\n}\n.media-object.img-thumbnail {\n  max-width: none;\n}\n.media-right,\n.media > .pull-right {\n  padding-left: 10px;\n}\n.media-left,\n.media > .pull-left {\n  padding-right: 10px;\n}\n.media-left,\n.media-right,\n.media-body {\n  display: table-cell;\n  vertical-align: top;\n}\n.media-middle {\n  vertical-align: middle;\n}\n.media-bottom {\n  vertical-align: bottom;\n}\n.media-heading {\n  margin-top: 0;\n  margin-bottom: 5px;\n}\n.media-list {\n  padding-left: 0;\n  list-style: none;\n}\n.list-group {\n  padding-left: 0;\n  margin-bottom: 20px;\n}\n.list-group-item {\n  position: relative;\n  display: block;\n  padding: 10px 15px;\n  margin-bottom: -1px;\n  background-color: #fff;\n  border: 1px solid #ddd;\n}\n.list-group-item:first-child {\n  border-top-left-radius: 4px;\n  border-top-right-radius: 4px;\n}\n.list-group-item:last-child {\n  margin-bottom: 0;\n  border-bottom-right-radius: 4px;\n  border-bottom-left-radius: 4px;\n}\na.list-group-item,\nbutton.list-group-item {\n  color: #555;\n}\na.list-group-item .list-group-item-heading,\nbutton.list-group-item .list-group-item-heading {\n  color: #333;\n}\na.list-group-item:hover,\nbutton.list-group-item:hover,\na.list-group-item:focus,\nbutton.list-group-item:focus {\n  color: #555;\n  text-decoration: none;\n  background-color: #f5f5f5;\n}\nbutton.list-group-item {\n  width: 100%;\n  text-align: left;\n}\n.list-group-item.disabled,\n.list-group-item.disabled:hover,\n.list-group-item.disabled:focus {\n  color: #777;\n  cursor: not-allowed;\n  background-color: #eee;\n}\n.list-group-item.disabled .list-group-item-heading,\n.list-group-item.disabled:hover .list-group-item-heading,\n.list-group-item.disabled:focus .list-group-item-heading {\n  color: inherit;\n}\n.list-group-item.disabled .list-group-item-text,\n.list-group-item.disabled:hover .list-group-item-text,\n.list-group-item.disabled:focus .list-group-item-text {\n  color: #777;\n}\n.list-group-item.active,\n.list-group-item.active:hover,\n.list-group-item.active:focus {\n  z-index: 2;\n  color: #fff;\n  background-color: #337ab7;\n  border-color: #337ab7;\n}\n.list-group-item.active .list-group-item-heading,\n.list-group-item.active:hover .list-group-item-heading,\n.list-group-item.active:focus .list-group-item-heading,\n.list-group-item.active .list-group-item-heading > small,\n.list-group-item.active:hover .list-group-item-heading > small,\n.list-group-item.active:focus .list-group-item-heading > small,\n.list-group-item.active .list-group-item-heading > .small,\n.list-group-item.active:hover .list-group-item-heading > .small,\n.list-group-item.active:focus .list-group-item-heading > .small {\n  color: inherit;\n}\n.list-group-item.active .list-group-item-text,\n.list-group-item.active:hover .list-group-item-text,\n.list-group-item.active:focus .list-group-item-text {\n  color: #c7ddef;\n}\n.list-group-item-success {\n  color: #3c763d;\n  background-color: #dff0d8;\n}\na.list-group-item-success,\nbutton.list-group-item-success {\n  color: #3c763d;\n}\na.list-group-item-success .list-group-item-heading,\nbutton.list-group-item-success .list-group-item-heading {\n  color: inherit;\n}\na.list-group-item-success:hover,\nbutton.list-group-item-success:hover,\na.list-group-item-success:focus,\nbutton.list-group-item-success:focus {\n  color: #3c763d;\n  background-color: #d0e9c6;\n}\na.list-group-item-success.active,\nbutton.list-group-item-success.active,\na.list-group-item-success.active:hover,\nbutton.list-group-item-success.active:hover,\na.list-group-item-success.active:focus,\nbutton.list-group-item-success.active:focus {\n  color: #fff;\n  background-color: #3c763d;\n  border-color: #3c763d;\n}\n.list-group-item-info {\n  color: #31708f;\n  background-color: #d9edf7;\n}\na.list-group-item-info,\nbutton.list-group-item-info {\n  color: #31708f;\n}\na.list-group-item-info .list-group-item-heading,\nbutton.list-group-item-info .list-group-item-heading {\n  color: inherit;\n}\na.list-group-item-info:hover,\nbutton.list-group-item-info:hover,\na.list-group-item-info:focus,\nbutton.list-group-item-info:focus {\n  color: #31708f;\n  background-color: #c4e3f3;\n}\na.list-group-item-info.active,\nbutton.list-group-item-info.active,\na.list-group-item-info.active:hover,\nbutton.list-group-item-info.active:hover,\na.list-group-item-info.active:focus,\nbutton.list-group-item-info.active:focus {\n  color: #fff;\n  background-color: #31708f;\n  border-color: #31708f;\n}\n.list-group-item-warning {\n  color: #8a6d3b;\n  background-color: #fcf8e3;\n}\na.list-group-item-warning,\nbutton.list-group-item-warning {\n  color: #8a6d3b;\n}\na.list-group-item-warning .list-group-item-heading,\nbutton.list-group-item-warning .list-group-item-heading {\n  color: inherit;\n}\na.list-group-item-warning:hover,\nbutton.list-group-item-warning:hover,\na.list-group-item-warning:focus,\nbutton.list-group-item-warning:focus {\n  color: #8a6d3b;\n  background-color: #faf2cc;\n}\na.list-group-item-warning.active,\nbutton.list-group-item-warning.active,\na.list-group-item-warning.active:hover,\nbutton.list-group-item-warning.active:hover,\na.list-group-item-warning.active:focus,\nbutton.list-group-item-warning.active:focus {\n  color: #fff;\n  background-color: #8a6d3b;\n  border-color: #8a6d3b;\n}\n.list-group-item-danger {\n  color: #a94442;\n  background-color: #f2dede;\n}\na.list-group-item-danger,\nbutton.list-group-item-danger {\n  color: #a94442;\n}\na.list-group-item-danger .list-group-item-heading,\nbutton.list-group-item-danger .list-group-item-heading {\n  color: inherit;\n}\na.list-group-item-danger:hover,\nbutton.list-group-item-danger:hover,\na.list-group-item-danger:focus,\nbutton.list-group-item-danger:focus {\n  color: #a94442;\n  background-color: #ebcccc;\n}\na.list-group-item-danger.active,\nbutton.list-group-item-danger.active,\na.list-group-item-danger.active:hover,\nbutton.list-group-item-danger.active:hover,\na.list-group-item-danger.active:focus,\nbutton.list-group-item-danger.active:focus {\n  color: #fff;\n  background-color: #a94442;\n  border-color: #a94442;\n}\n.list-group-item-heading {\n  margin-top: 0;\n  margin-bottom: 5px;\n}\n.list-group-item-text {\n  margin-bottom: 0;\n  line-height: 1.3;\n}\n.panel {\n  margin-bottom: 20px;\n  background-color: #fff;\n  border: 1px solid transparent;\n  border-radius: 4px;\n  -webkit-box-shadow: 0 1px 1px rgba(0, 0, 0, .05);\n          box-shadow: 0 1px 1px rgba(0, 0, 0, .05);\n}\n.panel-body {\n  padding: 15px;\n}\n.panel-heading {\n  padding: 10px 15px;\n  border-bottom: 1px solid transparent;\n  border-top-left-radius: 3px;\n  border-top-right-radius: 3px;\n}\n.panel-heading > .dropdown .dropdown-toggle {\n  color: inherit;\n}\n.panel-title {\n  margin-top: 0;\n  margin-bottom: 0;\n  font-size: 16px;\n  color: inherit;\n}\n.panel-title > a,\n.panel-title > small,\n.panel-title > .small,\n.panel-title > small > a,\n.panel-title > .small > a {\n  color: inherit;\n}\n.panel-footer {\n  padding: 10px 15px;\n  background-color: #f5f5f5;\n  border-top: 1px solid #ddd;\n  border-bottom-right-radius: 3px;\n  border-bottom-left-radius: 3px;\n}\n.panel > .list-group,\n.panel > .panel-collapse > .list-group {\n  margin-bottom: 0;\n}\n.panel > .list-group .list-group-item,\n.panel > .panel-collapse > .list-group .list-group-item {\n  border-width: 1px 0;\n  border-radius: 0;\n}\n.panel > .list-group:first-child .list-group-item:first-child,\n.panel > .panel-collapse > .list-group:first-child .list-group-item:first-child {\n  border-top: 0;\n  border-top-left-radius: 3px;\n  border-top-right-radius: 3px;\n}\n.panel > .list-group:last-child .list-group-item:last-child,\n.panel > .panel-collapse > .list-group:last-child .list-group-item:last-child {\n  border-bottom: 0;\n  border-bottom-right-radius: 3px;\n  border-bottom-left-radius: 3px;\n}\n.panel > .panel-heading + .panel-collapse > .list-group .list-group-item:first-child {\n  border-top-left-radius: 0;\n  border-top-right-radius: 0;\n}\n.panel-heading + .list-group .list-group-item:first-child {\n  border-top-width: 0;\n}\n.list-group + .panel-footer {\n  border-top-width: 0;\n}\n.panel > .table,\n.panel > .table-responsive > .table,\n.panel > .panel-collapse > .table {\n  margin-bottom: 0;\n}\n.panel > .table caption,\n.panel > .table-responsive > .table caption,\n.panel > .panel-collapse > .table caption {\n  padding-right: 15px;\n  padding-left: 15px;\n}\n.panel > .table:first-child,\n.panel > .table-responsive:first-child > .table:first-child {\n  border-top-left-radius: 3px;\n  border-top-right-radius: 3px;\n}\n.panel > .table:first-child > thead:first-child > tr:first-child,\n.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child,\n.panel > .table:first-child > tbody:first-child > tr:first-child,\n.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child {\n  border-top-left-radius: 3px;\n  border-top-right-radius: 3px;\n}\n.panel > .table:first-child > thead:first-child > tr:first-child td:first-child,\n.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child td:first-child,\n.panel > .table:first-child > tbody:first-child > tr:first-child td:first-child,\n.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child td:first-child,\n.panel > .table:first-child > thead:first-child > tr:first-child th:first-child,\n.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child th:first-child,\n.panel > .table:first-child > tbody:first-child > tr:first-child th:first-child,\n.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child th:first-child {\n  border-top-left-radius: 3px;\n}\n.panel > .table:first-child > thead:first-child > tr:first-child td:last-child,\n.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child td:last-child,\n.panel > .table:first-child > tbody:first-child > tr:first-child td:last-child,\n.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child td:last-child,\n.panel > .table:first-child > thead:first-child > tr:first-child th:last-child,\n.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child th:last-child,\n.panel > .table:first-child > tbody:first-child > tr:first-child th:last-child,\n.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child th:last-child {\n  border-top-right-radius: 3px;\n}\n.panel > .table:last-child,\n.panel > .table-responsive:last-child > .table:last-child {\n  border-bottom-right-radius: 3px;\n  border-bottom-left-radius: 3px;\n}\n.panel > .table:last-child > tbody:last-child > tr:last-child,\n.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child,\n.panel > .table:last-child > tfoot:last-child > tr:last-child,\n.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child {\n  border-bottom-right-radius: 3px;\n  border-bottom-left-radius: 3px;\n}\n.panel > .table:last-child > tbody:last-child > tr:last-child td:first-child,\n.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child td:first-child,\n.panel > .table:last-child > tfoot:last-child > tr:last-child td:first-child,\n.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child td:first-child,\n.panel > .table:last-child > tbody:last-child > tr:last-child th:first-child,\n.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child th:first-child,\n.panel > .table:last-child > tfoot:last-child > tr:last-child th:first-child,\n.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child th:first-child {\n  border-bottom-left-radius: 3px;\n}\n.panel > .table:last-child > tbody:last-child > tr:last-child td:last-child,\n.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child td:last-child,\n.panel > .table:last-child > tfoot:last-child > tr:last-child td:last-child,\n.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child td:last-child,\n.panel > .table:last-child > tbody:last-child > tr:last-child th:last-child,\n.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child th:last-child,\n.panel > .table:last-child > tfoot:last-child > tr:last-child th:last-child,\n.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child th:last-child {\n  border-bottom-right-radius: 3px;\n}\n.panel > .panel-body + .table,\n.panel > .panel-body + .table-responsive,\n.panel > .table + .panel-body,\n.panel > .table-responsive + .panel-body {\n  border-top: 1px solid #ddd;\n}\n.panel > .table > tbody:first-child > tr:first-child th,\n.panel > .table > tbody:first-child > tr:first-child td {\n  border-top: 0;\n}\n.panel > .table-bordered,\n.panel > .table-responsive > .table-bordered {\n  border: 0;\n}\n.panel > .table-bordered > thead > tr > th:first-child,\n.panel > .table-responsive > .table-bordered > thead > tr > th:first-child,\n.panel > .table-bordered > tbody > tr > th:first-child,\n.panel > .table-responsive > .table-bordered > tbody > tr > th:first-child,\n.panel > .table-bordered > tfoot > tr > th:first-child,\n.panel > .table-responsive > .table-bordered > tfoot > tr > th:first-child,\n.panel > .table-bordered > thead > tr > td:first-child,\n.panel > .table-responsive > .table-bordered > thead > tr > td:first-child,\n.panel > .table-bordered > tbody > tr > td:first-child,\n.panel > .table-responsive > .table-bordered > tbody > tr > td:first-child,\n.panel > .table-bordered > tfoot > tr > td:first-child,\n.panel > .table-responsive > .table-bordered > tfoot > tr > td:first-child {\n  border-left: 0;\n}\n.panel > .table-bordered > thead > tr > th:last-child,\n.panel > .table-responsive > .table-bordered > thead > tr > th:last-child,\n.panel > .table-bordered > tbody > tr > th:last-child,\n.panel > .table-responsive > .table-bordered > tbody > tr > th:last-child,\n.panel > .table-bordered > tfoot > tr > th:last-child,\n.panel > .table-responsive > .table-bordered > tfoot > tr > th:last-child,\n.panel > .table-bordered > thead > tr > td:last-child,\n.panel > .table-responsive > .table-bordered > thead > tr > td:last-child,\n.panel > .table-bordered > tbody > tr > td:last-child,\n.panel > .table-responsive > .table-bordered > tbody > tr > td:last-child,\n.panel > .table-bordered > tfoot > tr > td:last-child,\n.panel > .table-responsive > .table-bordered > tfoot > tr > td:last-child {\n  border-right: 0;\n}\n.panel > .table-bordered > thead > tr:first-child > td,\n.panel > .table-responsive > .table-bordered > thead > tr:first-child > td,\n.panel > .table-bordered > tbody > tr:first-child > td,\n.panel > .table-responsive > .table-bordered > tbody > tr:first-child > td,\n.panel > .table-bordered > thead > tr:first-child > th,\n.panel > .table-responsive > .table-bordered > thead > tr:first-child > th,\n.panel > .table-bordered > tbody > tr:first-child > th,\n.panel > .table-responsive > .table-bordered > tbody > tr:first-child > th {\n  border-bottom: 0;\n}\n.panel > .table-bordered > tbody > tr:last-child > td,\n.panel > .table-responsive > .table-bordered > tbody > tr:last-child > td,\n.panel > .table-bordered > tfoot > tr:last-child > td,\n.panel > .table-responsive > .table-bordered > tfoot > tr:last-child > td,\n.panel > .table-bordered > tbody > tr:last-child > th,\n.panel > .table-responsive > .table-bordered > tbody > tr:last-child > th,\n.panel > .table-bordered > tfoot > tr:last-child > th,\n.panel > .table-responsive > .table-bordered > tfoot > tr:last-child > th {\n  border-bottom: 0;\n}\n.panel > .table-responsive {\n  margin-bottom: 0;\n  border: 0;\n}\n.panel-group {\n  margin-bottom: 20px;\n}\n.panel-group .panel {\n  margin-bottom: 0;\n  border-radius: 4px;\n}\n.panel-group .panel + .panel {\n  margin-top: 5px;\n}\n.panel-group .panel-heading {\n  border-bottom: 0;\n}\n.panel-group .panel-heading + .panel-collapse > .panel-body,\n.panel-group .panel-heading + .panel-collapse > .list-group {\n  border-top: 1px solid #ddd;\n}\n.panel-group .panel-footer {\n  border-top: 0;\n}\n.panel-group .panel-footer + .panel-collapse .panel-body {\n  border-bottom: 1px solid #ddd;\n}\n.panel-default {\n  border-color: #ddd;\n}\n.panel-default > .panel-heading {\n  color: #333;\n  background-color: #f5f5f5;\n  border-color: #ddd;\n}\n.panel-default > .panel-heading + .panel-collapse > .panel-body {\n  border-top-color: #ddd;\n}\n.panel-default > .panel-heading .badge {\n  color: #f5f5f5;\n  background-color: #333;\n}\n.panel-default > .panel-footer + .panel-collapse > .panel-body {\n  border-bottom-color: #ddd;\n}\n.panel-primary {\n  border-color: #337ab7;\n}\n.panel-primary > .panel-heading {\n  color: #fff;\n  background-color: #337ab7;\n  border-color: #337ab7;\n}\n.panel-primary > .panel-heading + .panel-collapse > .panel-body {\n  border-top-color: #337ab7;\n}\n.panel-primary > .panel-heading .badge {\n  color: #337ab7;\n  background-color: #fff;\n}\n.panel-primary > .panel-footer + .panel-collapse > .panel-body {\n  border-bottom-color: #337ab7;\n}\n.panel-success {\n  border-color: #d6e9c6;\n}\n.panel-success > .panel-heading {\n  color: #3c763d;\n  background-color: #dff0d8;\n  border-color: #d6e9c6;\n}\n.panel-success > .panel-heading + .panel-collapse > .panel-body {\n  border-top-color: #d6e9c6;\n}\n.panel-success > .panel-heading .badge {\n  color: #dff0d8;\n  background-color: #3c763d;\n}\n.panel-success > .panel-footer + .panel-collapse > .panel-body {\n  border-bottom-color: #d6e9c6;\n}\n.panel-info {\n  border-color: #bce8f1;\n}\n.panel-info > .panel-heading {\n  color: #31708f;\n  background-color: #d9edf7;\n  border-color: #bce8f1;\n}\n.panel-info > .panel-heading + .panel-collapse > .panel-body {\n  border-top-color: #bce8f1;\n}\n.panel-info > .panel-heading .badge {\n  color: #d9edf7;\n  background-color: #31708f;\n}\n.panel-info > .panel-footer + .panel-collapse > .panel-body {\n  border-bottom-color: #bce8f1;\n}\n.panel-warning {\n  border-color: #faebcc;\n}\n.panel-warning > .panel-heading {\n  color: #8a6d3b;\n  background-color: #fcf8e3;\n  border-color: #faebcc;\n}\n.panel-warning > .panel-heading + .panel-collapse > .panel-body {\n  border-top-color: #faebcc;\n}\n.panel-warning > .panel-heading .badge {\n  color: #fcf8e3;\n  background-color: #8a6d3b;\n}\n.panel-warning > .panel-footer + .panel-collapse > .panel-body {\n  border-bottom-color: #faebcc;\n}\n.panel-danger {\n  border-color: #ebccd1;\n}\n.panel-danger > .panel-heading {\n  color: #a94442;\n  background-color: #f2dede;\n  border-color: #ebccd1;\n}\n.panel-danger > .panel-heading + .panel-collapse > .panel-body {\n  border-top-color: #ebccd1;\n}\n.panel-danger > .panel-heading .badge {\n  color: #f2dede;\n  background-color: #a94442;\n}\n.panel-danger > .panel-footer + .panel-collapse > .panel-body {\n  border-bottom-color: #ebccd1;\n}\n.embed-responsive {\n  position: relative;\n  display: block;\n  height: 0;\n  padding: 0;\n  overflow: hidden;\n}\n.embed-responsive .embed-responsive-item,\n.embed-responsive iframe,\n.embed-responsive embed,\n.embed-responsive object,\n.embed-responsive video {\n  position: absolute;\n  top: 0;\n  bottom: 0;\n  left: 0;\n  width: 100%;\n  height: 100%;\n  border: 0;\n}\n.embed-responsive-16by9 {\n  padding-bottom: 56.25%;\n}\n.embed-responsive-4by3 {\n  padding-bottom: 75%;\n}\n.well {\n  min-height: 20px;\n  padding: 19px;\n  margin-bottom: 20px;\n  background-color: #f5f5f5;\n  border: 1px solid #e3e3e3;\n  border-radius: 4px;\n  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .05);\n          box-shadow: inset 0 1px 1px rgba(0, 0, 0, .05);\n}\n.well blockquote {\n  border-color: #ddd;\n  border-color: rgba(0, 0, 0, .15);\n}\n.well-lg {\n  padding: 24px;\n  border-radius: 6px;\n}\n.well-sm {\n  padding: 9px;\n  border-radius: 3px;\n}\n.close {\n  float: right;\n  font-size: 21px;\n  font-weight: bold;\n  line-height: 1;\n  color: #000;\n  text-shadow: 0 1px 0 #fff;\n  filter: alpha(opacity=20);\n  opacity: .2;\n}\n.close:hover,\n.close:focus {\n  color: #000;\n  text-decoration: none;\n  cursor: pointer;\n  filter: alpha(opacity=50);\n  opacity: .5;\n}\nbutton.close {\n  -webkit-appearance: none;\n  padding: 0;\n  cursor: pointer;\n  background: transparent;\n  border: 0;\n}\n.modal-open {\n  overflow: hidden;\n}\n.modal {\n  position: fixed;\n  top: 0;\n  right: 0;\n  bottom: 0;\n  left: 0;\n  z-index: 1050;\n  display: none;\n  overflow: hidden;\n  -webkit-overflow-scrolling: touch;\n  outline: 0;\n}\n.modal.fade .modal-dialog {\n  -webkit-transition: -webkit-transform .3s ease-out;\n       -o-transition:      -o-transform .3s ease-out;\n          transition:         transform .3s ease-out;\n  -webkit-transform: translate(0, -25%);\n      -ms-transform: translate(0, -25%);\n       -o-transform: translate(0, -25%);\n          transform: translate(0, -25%);\n}\n.modal.in .modal-dialog {\n  -webkit-transform: translate(0, 0);\n      -ms-transform: translate(0, 0);\n       -o-transform: translate(0, 0);\n          transform: translate(0, 0);\n}\n.modal-open .modal {\n  overflow-x: hidden;\n  overflow-y: auto;\n}\n.modal-dialog {\n  position: relative;\n  width: auto;\n  margin: 10px;\n}\n.modal-content {\n  position: relative;\n  background-color: #fff;\n  -webkit-background-clip: padding-box;\n          background-clip: padding-box;\n  border: 1px solid #999;\n  border: 1px solid rgba(0, 0, 0, .2);\n  border-radius: 6px;\n  outline: 0;\n  -webkit-box-shadow: 0 3px 9px rgba(0, 0, 0, .5);\n          box-shadow: 0 3px 9px rgba(0, 0, 0, .5);\n}\n.modal-backdrop {\n  position: fixed;\n  top: 0;\n  right: 0;\n  bottom: 0;\n  left: 0;\n  z-index: 1040;\n  background-color: #000;\n}\n.modal-backdrop.fade {\n  filter: alpha(opacity=0);\n  opacity: 0;\n}\n.modal-backdrop.in {\n  filter: alpha(opacity=50);\n  opacity: .5;\n}\n.modal-header {\n  padding: 15px;\n  border-bottom: 1px solid #e5e5e5;\n}\n.modal-header .close {\n  margin-top: -2px;\n}\n.modal-title {\n  margin: 0;\n  line-height: 1.42857143;\n}\n.modal-body {\n  position: relative;\n  padding: 15px;\n}\n.modal-footer {\n  padding: 15px;\n  text-align: right;\n  border-top: 1px solid #e5e5e5;\n}\n.modal-footer .btn + .btn {\n  margin-bottom: 0;\n  margin-left: 5px;\n}\n.modal-footer .btn-group .btn + .btn {\n  margin-left: -1px;\n}\n.modal-footer .btn-block + .btn-block {\n  margin-left: 0;\n}\n.modal-scrollbar-measure {\n  position: absolute;\n  top: -9999px;\n  width: 50px;\n  height: 50px;\n  overflow: scroll;\n}\n@media (min-width: 768px) {\n  .modal-dialog {\n    width: 600px;\n    margin: 30px auto;\n  }\n  .modal-content {\n    -webkit-box-shadow: 0 5px 15px rgba(0, 0, 0, .5);\n            box-shadow: 0 5px 15px rgba(0, 0, 0, .5);\n  }\n  .modal-sm {\n    width: 300px;\n  }\n}\n@media (min-width: 992px) {\n  .modal-lg {\n    width: 900px;\n  }\n}\n.tooltip {\n  position: absolute;\n  z-index: 1070;\n  display: block;\n  font-family: \"Helvetica Neue\", Helvetica, Arial, sans-serif;\n  font-size: 12px;\n  font-style: normal;\n  font-weight: normal;\n  line-height: 1.42857143;\n  text-align: left;\n  text-align: start;\n  text-decoration: none;\n  text-shadow: none;\n  text-transform: none;\n  letter-spacing: normal;\n  word-break: normal;\n  word-spacing: normal;\n  word-wrap: normal;\n  white-space: normal;\n  filter: alpha(opacity=0);\n  opacity: 0;\n\n  line-break: auto;\n}\n.tooltip.in {\n  filter: alpha(opacity=90);\n  opacity: .9;\n}\n.tooltip.top {\n  padding: 5px 0;\n  margin-top: -3px;\n}\n.tooltip.right {\n  padding: 0 5px;\n  margin-left: 3px;\n}\n.tooltip.bottom {\n  padding: 5px 0;\n  margin-top: 3px;\n}\n.tooltip.left {\n  padding: 0 5px;\n  margin-left: -3px;\n}\n.tooltip-inner {\n  max-width: 200px;\n  padding: 3px 8px;\n  color: #fff;\n  text-align: center;\n  background-color: #000;\n  border-radius: 4px;\n}\n.tooltip-arrow {\n  position: absolute;\n  width: 0;\n  height: 0;\n  border-color: transparent;\n  border-style: solid;\n}\n.tooltip.top .tooltip-arrow {\n  bottom: 0;\n  left: 50%;\n  margin-left: -5px;\n  border-width: 5px 5px 0;\n  border-top-color: #000;\n}\n.tooltip.top-left .tooltip-arrow {\n  right: 5px;\n  bottom: 0;\n  margin-bottom: -5px;\n  border-width: 5px 5px 0;\n  border-top-color: #000;\n}\n.tooltip.top-right .tooltip-arrow {\n  bottom: 0;\n  left: 5px;\n  margin-bottom: -5px;\n  border-width: 5px 5px 0;\n  border-top-color: #000;\n}\n.tooltip.right .tooltip-arrow {\n  top: 50%;\n  left: 0;\n  margin-top: -5px;\n  border-width: 5px 5px 5px 0;\n  border-right-color: #000;\n}\n.tooltip.left .tooltip-arrow {\n  top: 50%;\n  right: 0;\n  margin-top: -5px;\n  border-width: 5px 0 5px 5px;\n  border-left-color: #000;\n}\n.tooltip.bottom .tooltip-arrow {\n  top: 0;\n  left: 50%;\n  margin-left: -5px;\n  border-width: 0 5px 5px;\n  border-bottom-color: #000;\n}\n.tooltip.bottom-left .tooltip-arrow {\n  top: 0;\n  right: 5px;\n  margin-top: -5px;\n  border-width: 0 5px 5px;\n  border-bottom-color: #000;\n}\n.tooltip.bottom-right .tooltip-arrow {\n  top: 0;\n  left: 5px;\n  margin-top: -5px;\n  border-width: 0 5px 5px;\n  border-bottom-color: #000;\n}\n.popover {\n  position: absolute;\n  top: 0;\n  left: 0;\n  z-index: 1060;\n  display: none;\n  max-width: 276px;\n  padding: 1px;\n  font-family: \"Helvetica Neue\", Helvetica, Arial, sans-serif;\n  font-size: 14px;\n  font-style: normal;\n  font-weight: normal;\n  line-height: 1.42857143;\n  text-align: left;\n  text-align: start;\n  text-decoration: none;\n  text-shadow: none;\n  text-transform: none;\n  letter-spacing: normal;\n  word-break: normal;\n  word-spacing: normal;\n  word-wrap: normal;\n  white-space: normal;\n  background-color: #fff;\n  -webkit-background-clip: padding-box;\n          background-clip: padding-box;\n  border: 1px solid #ccc;\n  border: 1px solid rgba(0, 0, 0, .2);\n  border-radius: 6px;\n  -webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, .2);\n          box-shadow: 0 5px 10px rgba(0, 0, 0, .2);\n\n  line-break: auto;\n}\n.popover.top {\n  margin-top: -10px;\n}\n.popover.right {\n  margin-left: 10px;\n}\n.popover.bottom {\n  margin-top: 10px;\n}\n.popover.left {\n  margin-left: -10px;\n}\n.popover-title {\n  padding: 8px 14px;\n  margin: 0;\n  font-size: 14px;\n  background-color: #f7f7f7;\n  border-bottom: 1px solid #ebebeb;\n  border-radius: 5px 5px 0 0;\n}\n.popover-content {\n  padding: 9px 14px;\n}\n.popover > .arrow,\n.popover > .arrow:after {\n  position: absolute;\n  display: block;\n  width: 0;\n  height: 0;\n  border-color: transparent;\n  border-style: solid;\n}\n.popover > .arrow {\n  border-width: 11px;\n}\n.popover > .arrow:after {\n  content: \"\";\n  border-width: 10px;\n}\n.popover.top > .arrow {\n  bottom: -11px;\n  left: 50%;\n  margin-left: -11px;\n  border-top-color: #999;\n  border-top-color: rgba(0, 0, 0, .25);\n  border-bottom-width: 0;\n}\n.popover.top > .arrow:after {\n  bottom: 1px;\n  margin-left: -10px;\n  content: \" \";\n  border-top-color: #fff;\n  border-bottom-width: 0;\n}\n.popover.right > .arrow {\n  top: 50%;\n  left: -11px;\n  margin-top: -11px;\n  border-right-color: #999;\n  border-right-color: rgba(0, 0, 0, .25);\n  border-left-width: 0;\n}\n.popover.right > .arrow:after {\n  bottom: -10px;\n  left: 1px;\n  content: \" \";\n  border-right-color: #fff;\n  border-left-width: 0;\n}\n.popover.bottom > .arrow {\n  top: -11px;\n  left: 50%;\n  margin-left: -11px;\n  border-top-width: 0;\n  border-bottom-color: #999;\n  border-bottom-color: rgba(0, 0, 0, .25);\n}\n.popover.bottom > .arrow:after {\n  top: 1px;\n  margin-left: -10px;\n  content: \" \";\n  border-top-width: 0;\n  border-bottom-color: #fff;\n}\n.popover.left > .arrow {\n  top: 50%;\n  right: -11px;\n  margin-top: -11px;\n  border-right-width: 0;\n  border-left-color: #999;\n  border-left-color: rgba(0, 0, 0, .25);\n}\n.popover.left > .arrow:after {\n  right: 1px;\n  bottom: -10px;\n  content: \" \";\n  border-right-width: 0;\n  border-left-color: #fff;\n}\n.carousel {\n  position: relative;\n}\n.carousel-inner {\n  position: relative;\n  width: 100%;\n  overflow: hidden;\n}\n.carousel-inner > .item {\n  position: relative;\n  display: none;\n  -webkit-transition: .6s ease-in-out left;\n       -o-transition: .6s ease-in-out left;\n          transition: .6s ease-in-out left;\n}\n.carousel-inner > .item > img,\n.carousel-inner > .item > a > img {\n  line-height: 1;\n}\n@media all and (transform-3d), (-webkit-transform-3d) {\n  .carousel-inner > .item {\n    -webkit-transition: -webkit-transform .6s ease-in-out;\n         -o-transition:      -o-transform .6s ease-in-out;\n            transition:         transform .6s ease-in-out;\n\n    -webkit-backface-visibility: hidden;\n            backface-visibility: hidden;\n    -webkit-perspective: 1000px;\n            perspective: 1000px;\n  }\n  .carousel-inner > .item.next,\n  .carousel-inner > .item.active.right {\n    left: 0;\n    -webkit-transform: translate3d(100%, 0, 0);\n            transform: translate3d(100%, 0, 0);\n  }\n  .carousel-inner > .item.prev,\n  .carousel-inner > .item.active.left {\n    left: 0;\n    -webkit-transform: translate3d(-100%, 0, 0);\n            transform: translate3d(-100%, 0, 0);\n  }\n  .carousel-inner > .item.next.left,\n  .carousel-inner > .item.prev.right,\n  .carousel-inner > .item.active {\n    left: 0;\n    -webkit-transform: translate3d(0, 0, 0);\n            transform: translate3d(0, 0, 0);\n  }\n}\n.carousel-inner > .active,\n.carousel-inner > .next,\n.carousel-inner > .prev {\n  display: block;\n}\n.carousel-inner > .active {\n  left: 0;\n}\n.carousel-inner > .next,\n.carousel-inner > .prev {\n  position: absolute;\n  top: 0;\n  width: 100%;\n}\n.carousel-inner > .next {\n  left: 100%;\n}\n.carousel-inner > .prev {\n  left: -100%;\n}\n.carousel-inner > .next.left,\n.carousel-inner > .prev.right {\n  left: 0;\n}\n.carousel-inner > .active.left {\n  left: -100%;\n}\n.carousel-inner > .active.right {\n  left: 100%;\n}\n.carousel-control {\n  position: absolute;\n  top: 0;\n  bottom: 0;\n  left: 0;\n  width: 15%;\n  font-size: 20px;\n  color: #fff;\n  text-align: center;\n  text-shadow: 0 1px 2px rgba(0, 0, 0, .6);\n  background-color: rgba(0, 0, 0, 0);\n  filter: alpha(opacity=50);\n  opacity: .5;\n}\n.carousel-control.left {\n  background-image: -webkit-linear-gradient(left, rgba(0, 0, 0, .5) 0%, rgba(0, 0, 0, .0001) 100%);\n  background-image:      -o-linear-gradient(left, rgba(0, 0, 0, .5) 0%, rgba(0, 0, 0, .0001) 100%);\n  background-image: -webkit-gradient(linear, left top, right top, from(rgba(0, 0, 0, .5)), to(rgba(0, 0, 0, .0001)));\n  background-image:         linear-gradient(to right, rgba(0, 0, 0, .5) 0%, rgba(0, 0, 0, .0001) 100%);\n  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#80000000', endColorstr='#00000000', GradientType=1);\n  background-repeat: repeat-x;\n}\n.carousel-control.right {\n  right: 0;\n  left: auto;\n  background-image: -webkit-linear-gradient(left, rgba(0, 0, 0, .0001) 0%, rgba(0, 0, 0, .5) 100%);\n  background-image:      -o-linear-gradient(left, rgba(0, 0, 0, .0001) 0%, rgba(0, 0, 0, .5) 100%);\n  background-image: -webkit-gradient(linear, left top, right top, from(rgba(0, 0, 0, .0001)), to(rgba(0, 0, 0, .5)));\n  background-image:         linear-gradient(to right, rgba(0, 0, 0, .0001) 0%, rgba(0, 0, 0, .5) 100%);\n  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#00000000', endColorstr='#80000000', GradientType=1);\n  background-repeat: repeat-x;\n}\n.carousel-control:hover,\n.carousel-control:focus {\n  color: #fff;\n  text-decoration: none;\n  filter: alpha(opacity=90);\n  outline: 0;\n  opacity: .9;\n}\n.carousel-control .icon-prev,\n.carousel-control .icon-next,\n.carousel-control .glyphicon-chevron-left,\n.carousel-control .glyphicon-chevron-right {\n  position: absolute;\n  top: 50%;\n  z-index: 5;\n  display: inline-block;\n  margin-top: -10px;\n}\n.carousel-control .icon-prev,\n.carousel-control .glyphicon-chevron-left {\n  left: 50%;\n  margin-left: -10px;\n}\n.carousel-control .icon-next,\n.carousel-control .glyphicon-chevron-right {\n  right: 50%;\n  margin-right: -10px;\n}\n.carousel-control .icon-prev,\n.carousel-control .icon-next {\n  width: 20px;\n  height: 20px;\n  font-family: serif;\n  line-height: 1;\n}\n.carousel-control .icon-prev:before {\n  content: '\\2039';\n}\n.carousel-control .icon-next:before {\n  content: '\\203a';\n}\n.carousel-indicators {\n  position: absolute;\n  bottom: 10px;\n  left: 50%;\n  z-index: 15;\n  width: 60%;\n  padding-left: 0;\n  margin-left: -30%;\n  text-align: center;\n  list-style: none;\n}\n.carousel-indicators li {\n  display: inline-block;\n  width: 10px;\n  height: 10px;\n  margin: 1px;\n  text-indent: -999px;\n  cursor: pointer;\n  background-color: #000 \\9;\n  background-color: rgba(0, 0, 0, 0);\n  border: 1px solid #fff;\n  border-radius: 10px;\n}\n.carousel-indicators .active {\n  width: 12px;\n  height: 12px;\n  margin: 0;\n  background-color: #fff;\n}\n.carousel-caption {\n  position: absolute;\n  right: 15%;\n  bottom: 20px;\n  left: 15%;\n  z-index: 10;\n  padding-top: 20px;\n  padding-bottom: 20px;\n  color: #fff;\n  text-align: center;\n  text-shadow: 0 1px 2px rgba(0, 0, 0, .6);\n}\n.carousel-caption .btn {\n  text-shadow: none;\n}\n@media screen and (min-width: 768px) {\n  .carousel-control .glyphicon-chevron-left,\n  .carousel-control .glyphicon-chevron-right,\n  .carousel-control .icon-prev,\n  .carousel-control .icon-next {\n    width: 30px;\n    height: 30px;\n    margin-top: -10px;\n    font-size: 30px;\n  }\n  .carousel-control .glyphicon-chevron-left,\n  .carousel-control .icon-prev {\n    margin-left: -10px;\n  }\n  .carousel-control .glyphicon-chevron-right,\n  .carousel-control .icon-next {\n    margin-right: -10px;\n  }\n  .carousel-caption {\n    right: 20%;\n    left: 20%;\n    padding-bottom: 30px;\n  }\n  .carousel-indicators {\n    bottom: 20px;\n  }\n}\n.clearfix:before,\n.clearfix:after,\n.dl-horizontal dd:before,\n.dl-horizontal dd:after,\n.container:before,\n.container:after,\n.container-fluid:before,\n.container-fluid:after,\n.row:before,\n.row:after,\n.form-horizontal .form-group:before,\n.form-horizontal .form-group:after,\n.btn-toolbar:before,\n.btn-toolbar:after,\n.btn-group-vertical > .btn-group:before,\n.btn-group-vertical > .btn-group:after,\n.nav:before,\n.nav:after,\n.navbar:before,\n.navbar:after,\n.navbar-header:before,\n.navbar-header:after,\n.navbar-collapse:before,\n.navbar-collapse:after,\n.pager:before,\n.pager:after,\n.panel-body:before,\n.panel-body:after,\n.modal-header:before,\n.modal-header:after,\n.modal-footer:before,\n.modal-footer:after {\n  display: table;\n  content: \" \";\n}\n.clearfix:after,\n.dl-horizontal dd:after,\n.container:after,\n.container-fluid:after,\n.row:after,\n.form-horizontal .form-group:after,\n.btn-toolbar:after,\n.btn-group-vertical > .btn-group:after,\n.nav:after,\n.navbar:after,\n.navbar-header:after,\n.navbar-collapse:after,\n.pager:after,\n.panel-body:after,\n.modal-header:after,\n.modal-footer:after {\n  clear: both;\n}\n.center-block {\n  display: block;\n  margin-right: auto;\n  margin-left: auto;\n}\n.pull-right {\n  float: right !important;\n}\n.pull-left {\n  float: left !important;\n}\n.hide {\n  display: none !important;\n}\n.show {\n  display: block !important;\n}\n.invisible {\n  visibility: hidden;\n}\n.text-hide {\n  font: 0/0 a;\n  color: transparent;\n  text-shadow: none;\n  background-color: transparent;\n  border: 0;\n}\n.hidden {\n  display: none !important;\n}\n.affix {\n  position: fixed;\n}\n@-ms-viewport {\n  width: device-width;\n}\n.visible-xs,\n.visible-sm,\n.visible-md,\n.visible-lg {\n  display: none !important;\n}\n.visible-xs-block,\n.visible-xs-inline,\n.visible-xs-inline-block,\n.visible-sm-block,\n.visible-sm-inline,\n.visible-sm-inline-block,\n.visible-md-block,\n.visible-md-inline,\n.visible-md-inline-block,\n.visible-lg-block,\n.visible-lg-inline,\n.visible-lg-inline-block {\n  display: none !important;\n}\n@media (max-width: 767px) {\n  .visible-xs {\n    display: block !important;\n  }\n  table.visible-xs {\n    display: table !important;\n  }\n  tr.visible-xs {\n    display: table-row !important;\n  }\n  th.visible-xs,\n  td.visible-xs {\n    display: table-cell !important;\n  }\n}\n@media (max-width: 767px) {\n  .visible-xs-block {\n    display: block !important;\n  }\n}\n@media (max-width: 767px) {\n  .visible-xs-inline {\n    display: inline !important;\n  }\n}\n@media (max-width: 767px) {\n  .visible-xs-inline-block {\n    display: inline-block !important;\n  }\n}\n@media (min-width: 768px) and (max-width: 991px) {\n  .visible-sm {\n    display: block !important;\n  }\n  table.visible-sm {\n    display: table !important;\n  }\n  tr.visible-sm {\n    display: table-row !important;\n  }\n  th.visible-sm,\n  td.visible-sm {\n    display: table-cell !important;\n  }\n}\n@media (min-width: 768px) and (max-width: 991px) {\n  .visible-sm-block {\n    display: block !important;\n  }\n}\n@media (min-width: 768px) and (max-width: 991px) {\n  .visible-sm-inline {\n    display: inline !important;\n  }\n}\n@media (min-width: 768px) and (max-width: 991px) {\n  .visible-sm-inline-block {\n    display: inline-block !important;\n  }\n}\n@media (min-width: 992px) and (max-width: 1199px) {\n  .visible-md {\n    display: block !important;\n  }\n  table.visible-md {\n    display: table !important;\n  }\n  tr.visible-md {\n    display: table-row !important;\n  }\n  th.visible-md,\n  td.visible-md {\n    display: table-cell !important;\n  }\n}\n@media (min-width: 992px) and (max-width: 1199px) {\n  .visible-md-block {\n    display: block !important;\n  }\n}\n@media (min-width: 992px) and (max-width: 1199px) {\n  .visible-md-inline {\n    display: inline !important;\n  }\n}\n@media (min-width: 992px) and (max-width: 1199px) {\n  .visible-md-inline-block {\n    display: inline-block !important;\n  }\n}\n@media (min-width: 1200px) {\n  .visible-lg {\n    display: block !important;\n  }\n  table.visible-lg {\n    display: table !important;\n  }\n  tr.visible-lg {\n    display: table-row !important;\n  }\n  th.visible-lg,\n  td.visible-lg {\n    display: table-cell !important;\n  }\n}\n@media (min-width: 1200px) {\n  .visible-lg-block {\n    display: block !important;\n  }\n}\n@media (min-width: 1200px) {\n  .visible-lg-inline {\n    display: inline !important;\n  }\n}\n@media (min-width: 1200px) {\n  .visible-lg-inline-block {\n    display: inline-block !important;\n  }\n}\n@media (max-width: 767px) {\n  .hidden-xs {\n    display: none !important;\n  }\n}\n@media (min-width: 768px) and (max-width: 991px) {\n  .hidden-sm {\n    display: none !important;\n  }\n}\n@media (min-width: 992px) and (max-width: 1199px) {\n  .hidden-md {\n    display: none !important;\n  }\n}\n@media (min-width: 1200px) {\n  .hidden-lg {\n    display: none !important;\n  }\n}\n.visible-print {\n  display: none !important;\n}\n@media print {\n  .visible-print {\n    display: block !important;\n  }\n  table.visible-print {\n    display: table !important;\n  }\n  tr.visible-print {\n    display: table-row !important;\n  }\n  th.visible-print,\n  td.visible-print {\n    display: table-cell !important;\n  }\n}\n.visible-print-block {\n  display: none !important;\n}\n@media print {\n  .visible-print-block {\n    display: block !important;\n  }\n}\n.visible-print-inline {\n  display: none !important;\n}\n@media print {\n  .visible-print-inline {\n    display: inline !important;\n  }\n}\n.visible-print-inline-block {\n  display: none !important;\n}\n@media print {\n  .visible-print-inline-block {\n    display: inline-block !important;\n  }\n}\n@media print {\n  .hidden-print {\n    display: none !important;\n  }\n}\n/*# sourceMappingURL=bootstrap.css.map */\n"
  },
  {
    "path": "static/bootstrap/js/bootstrap.js",
    "content": "/*!\n * Bootstrap v3.3.7 (http://getbootstrap.com)\n * Copyright 2011-2016 Twitter, Inc.\n * Licensed under the MIT license\n */\n\nif (typeof jQuery === 'undefined') {\n  throw new Error('Bootstrap\\'s JavaScript requires jQuery')\n}\n\n+function ($) {\n  'use strict';\n  var version = $.fn.jquery.split(' ')[0].split('.')\n  if ((version[0] < 2 && version[1] < 9) || (version[0] == 1 && version[1] == 9 && version[2] < 1) || (version[0] > 3)) {\n    throw new Error('Bootstrap\\'s JavaScript requires jQuery version 1.9.1 or higher, but lower than version 4')\n  }\n}(jQuery);\n\n/* ========================================================================\n * Bootstrap: transition.js v3.3.7\n * http://getbootstrap.com/javascript/#transitions\n * ========================================================================\n * Copyright 2011-2016 Twitter, Inc.\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * ======================================================================== */\n\n\n+function ($) {\n  'use strict';\n\n  // CSS TRANSITION SUPPORT (Shoutout: http://www.modernizr.com/)\n  // ============================================================\n\n  function transitionEnd() {\n    var el = document.createElement('bootstrap')\n\n    var transEndEventNames = {\n      WebkitTransition : 'webkitTransitionEnd',\n      MozTransition    : 'transitionend',\n      OTransition      : 'oTransitionEnd otransitionend',\n      transition       : 'transitionend'\n    }\n\n    for (var name in transEndEventNames) {\n      if (el.style[name] !== undefined) {\n        return { end: transEndEventNames[name] }\n      }\n    }\n\n    return false // explicit for ie8 (  ._.)\n  }\n\n  // http://blog.alexmaccaw.com/css-transitions\n  $.fn.emulateTransitionEnd = function (duration) {\n    var called = false\n    var $el = this\n    $(this).one('bsTransitionEnd', function () { called = true })\n    var callback = function () { if (!called) $($el).trigger($.support.transition.end) }\n    setTimeout(callback, duration)\n    return this\n  }\n\n  $(function () {\n    $.support.transition = transitionEnd()\n\n    if (!$.support.transition) return\n\n    $.event.special.bsTransitionEnd = {\n      bindType: $.support.transition.end,\n      delegateType: $.support.transition.end,\n      handle: function (e) {\n        if ($(e.target).is(this)) return e.handleObj.handler.apply(this, arguments)\n      }\n    }\n  })\n\n}(jQuery);\n\n/* ========================================================================\n * Bootstrap: alert.js v3.3.7\n * http://getbootstrap.com/javascript/#alerts\n * ========================================================================\n * Copyright 2011-2016 Twitter, Inc.\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * ======================================================================== */\n\n\n+function ($) {\n  'use strict';\n\n  // ALERT CLASS DEFINITION\n  // ======================\n\n  var dismiss = '[data-dismiss=\"alert\"]'\n  var Alert   = function (el) {\n    $(el).on('click', dismiss, this.close)\n  }\n\n  Alert.VERSION = '3.3.7'\n\n  Alert.TRANSITION_DURATION = 150\n\n  Alert.prototype.close = function (e) {\n    var $this    = $(this)\n    var selector = $this.attr('data-target')\n\n    if (!selector) {\n      selector = $this.attr('href')\n      selector = selector && selector.replace(/.*(?=#[^\\s]*$)/, '') // strip for ie7\n    }\n\n    var $parent = $(selector === '#' ? [] : selector)\n\n    if (e) e.preventDefault()\n\n    if (!$parent.length) {\n      $parent = $this.closest('.alert')\n    }\n\n    $parent.trigger(e = $.Event('close.bs.alert'))\n\n    if (e.isDefaultPrevented()) return\n\n    $parent.removeClass('in')\n\n    function removeElement() {\n      // detach from parent, fire event then clean up data\n      $parent.detach().trigger('closed.bs.alert').remove()\n    }\n\n    $.support.transition && $parent.hasClass('fade') ?\n      $parent\n        .one('bsTransitionEnd', removeElement)\n        .emulateTransitionEnd(Alert.TRANSITION_DURATION) :\n      removeElement()\n  }\n\n\n  // ALERT PLUGIN DEFINITION\n  // =======================\n\n  function Plugin(option) {\n    return this.each(function () {\n      var $this = $(this)\n      var data  = $this.data('bs.alert')\n\n      if (!data) $this.data('bs.alert', (data = new Alert(this)))\n      if (typeof option == 'string') data[option].call($this)\n    })\n  }\n\n  var old = $.fn.alert\n\n  $.fn.alert             = Plugin\n  $.fn.alert.Constructor = Alert\n\n\n  // ALERT NO CONFLICT\n  // =================\n\n  $.fn.alert.noConflict = function () {\n    $.fn.alert = old\n    return this\n  }\n\n\n  // ALERT DATA-API\n  // ==============\n\n  $(document).on('click.bs.alert.data-api', dismiss, Alert.prototype.close)\n\n}(jQuery);\n\n/* ========================================================================\n * Bootstrap: button.js v3.3.7\n * http://getbootstrap.com/javascript/#buttons\n * ========================================================================\n * Copyright 2011-2016 Twitter, Inc.\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * ======================================================================== */\n\n\n+function ($) {\n  'use strict';\n\n  // BUTTON PUBLIC CLASS DEFINITION\n  // ==============================\n\n  var Button = function (element, options) {\n    this.$element  = $(element)\n    this.options   = $.extend({}, Button.DEFAULTS, options)\n    this.isLoading = false\n  }\n\n  Button.VERSION  = '3.3.7'\n\n  Button.DEFAULTS = {\n    loadingText: 'loading...'\n  }\n\n  Button.prototype.setState = function (state) {\n    var d    = 'disabled'\n    var $el  = this.$element\n    var val  = $el.is('input') ? 'val' : 'html'\n    var data = $el.data()\n\n    state += 'Text'\n\n    if (data.resetText == null) $el.data('resetText', $el[val]())\n\n    // push to event loop to allow forms to submit\n    setTimeout($.proxy(function () {\n      $el[val](data[state] == null ? this.options[state] : data[state])\n\n      if (state == 'loadingText') {\n        this.isLoading = true\n        $el.addClass(d).attr(d, d).prop(d, true)\n      } else if (this.isLoading) {\n        this.isLoading = false\n        $el.removeClass(d).removeAttr(d).prop(d, false)\n      }\n    }, this), 0)\n  }\n\n  Button.prototype.toggle = function () {\n    var changed = true\n    var $parent = this.$element.closest('[data-toggle=\"buttons\"]')\n\n    if ($parent.length) {\n      var $input = this.$element.find('input')\n      if ($input.prop('type') == 'radio') {\n        if ($input.prop('checked')) changed = false\n        $parent.find('.active').removeClass('active')\n        this.$element.addClass('active')\n      } else if ($input.prop('type') == 'checkbox') {\n        if (($input.prop('checked')) !== this.$element.hasClass('active')) changed = false\n        this.$element.toggleClass('active')\n      }\n      $input.prop('checked', this.$element.hasClass('active'))\n      if (changed) $input.trigger('change')\n    } else {\n      this.$element.attr('aria-pressed', !this.$element.hasClass('active'))\n      this.$element.toggleClass('active')\n    }\n  }\n\n\n  // BUTTON PLUGIN DEFINITION\n  // ========================\n\n  function Plugin(option) {\n    return this.each(function () {\n      var $this   = $(this)\n      var data    = $this.data('bs.button')\n      var options = typeof option == 'object' && option\n\n      if (!data) $this.data('bs.button', (data = new Button(this, options)))\n\n      if (option == 'toggle') data.toggle()\n      else if (option) data.setState(option)\n    })\n  }\n\n  var old = $.fn.button\n\n  $.fn.button             = Plugin\n  $.fn.button.Constructor = Button\n\n\n  // BUTTON NO CONFLICT\n  // ==================\n\n  $.fn.button.noConflict = function () {\n    $.fn.button = old\n    return this\n  }\n\n\n  // BUTTON DATA-API\n  // ===============\n\n  $(document)\n    .on('click.bs.button.data-api', '[data-toggle^=\"button\"]', function (e) {\n      var $btn = $(e.target).closest('.btn')\n      Plugin.call($btn, 'toggle')\n      if (!($(e.target).is('input[type=\"radio\"], input[type=\"checkbox\"]'))) {\n        // Prevent double click on radios, and the double selections (so cancellation) on checkboxes\n        e.preventDefault()\n        // The target component still receive the focus\n        if ($btn.is('input,button')) $btn.trigger('focus')\n        else $btn.find('input:visible,button:visible').first().trigger('focus')\n      }\n    })\n    .on('focus.bs.button.data-api blur.bs.button.data-api', '[data-toggle^=\"button\"]', function (e) {\n      $(e.target).closest('.btn').toggleClass('focus', /^focus(in)?$/.test(e.type))\n    })\n\n}(jQuery);\n\n/* ========================================================================\n * Bootstrap: carousel.js v3.3.7\n * http://getbootstrap.com/javascript/#carousel\n * ========================================================================\n * Copyright 2011-2016 Twitter, Inc.\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * ======================================================================== */\n\n\n+function ($) {\n  'use strict';\n\n  // CAROUSEL CLASS DEFINITION\n  // =========================\n\n  var Carousel = function (element, options) {\n    this.$element    = $(element)\n    this.$indicators = this.$element.find('.carousel-indicators')\n    this.options     = options\n    this.paused      = null\n    this.sliding     = null\n    this.interval    = null\n    this.$active     = null\n    this.$items      = null\n\n    this.options.keyboard && this.$element.on('keydown.bs.carousel', $.proxy(this.keydown, this))\n\n    this.options.pause == 'hover' && !('ontouchstart' in document.documentElement) && this.$element\n      .on('mouseenter.bs.carousel', $.proxy(this.pause, this))\n      .on('mouseleave.bs.carousel', $.proxy(this.cycle, this))\n  }\n\n  Carousel.VERSION  = '3.3.7'\n\n  Carousel.TRANSITION_DURATION = 600\n\n  Carousel.DEFAULTS = {\n    interval: 5000,\n    pause: 'hover',\n    wrap: true,\n    keyboard: true\n  }\n\n  Carousel.prototype.keydown = function (e) {\n    if (/input|textarea/i.test(e.target.tagName)) return\n    switch (e.which) {\n      case 37: this.prev(); break\n      case 39: this.next(); break\n      default: return\n    }\n\n    e.preventDefault()\n  }\n\n  Carousel.prototype.cycle = function (e) {\n    e || (this.paused = false)\n\n    this.interval && clearInterval(this.interval)\n\n    this.options.interval\n      && !this.paused\n      && (this.interval = setInterval($.proxy(this.next, this), this.options.interval))\n\n    return this\n  }\n\n  Carousel.prototype.getItemIndex = function (item) {\n    this.$items = item.parent().children('.item')\n    return this.$items.index(item || this.$active)\n  }\n\n  Carousel.prototype.getItemForDirection = function (direction, active) {\n    var activeIndex = this.getItemIndex(active)\n    var willWrap = (direction == 'prev' && activeIndex === 0)\n                || (direction == 'next' && activeIndex == (this.$items.length - 1))\n    if (willWrap && !this.options.wrap) return active\n    var delta = direction == 'prev' ? -1 : 1\n    var itemIndex = (activeIndex + delta) % this.$items.length\n    return this.$items.eq(itemIndex)\n  }\n\n  Carousel.prototype.to = function (pos) {\n    var that        = this\n    var activeIndex = this.getItemIndex(this.$active = this.$element.find('.item.active'))\n\n    if (pos > (this.$items.length - 1) || pos < 0) return\n\n    if (this.sliding)       return this.$element.one('slid.bs.carousel', function () { that.to(pos) }) // yes, \"slid\"\n    if (activeIndex == pos) return this.pause().cycle()\n\n    return this.slide(pos > activeIndex ? 'next' : 'prev', this.$items.eq(pos))\n  }\n\n  Carousel.prototype.pause = function (e) {\n    e || (this.paused = true)\n\n    if (this.$element.find('.next, .prev').length && $.support.transition) {\n      this.$element.trigger($.support.transition.end)\n      this.cycle(true)\n    }\n\n    this.interval = clearInterval(this.interval)\n\n    return this\n  }\n\n  Carousel.prototype.next = function () {\n    if (this.sliding) return\n    return this.slide('next')\n  }\n\n  Carousel.prototype.prev = function () {\n    if (this.sliding) return\n    return this.slide('prev')\n  }\n\n  Carousel.prototype.slide = function (type, next) {\n    var $active   = this.$element.find('.item.active')\n    var $next     = next || this.getItemForDirection(type, $active)\n    var isCycling = this.interval\n    var direction = type == 'next' ? 'left' : 'right'\n    var that      = this\n\n    if ($next.hasClass('active')) return (this.sliding = false)\n\n    var relatedTarget = $next[0]\n    var slideEvent = $.Event('slide.bs.carousel', {\n      relatedTarget: relatedTarget,\n      direction: direction\n    })\n    this.$element.trigger(slideEvent)\n    if (slideEvent.isDefaultPrevented()) return\n\n    this.sliding = true\n\n    isCycling && this.pause()\n\n    if (this.$indicators.length) {\n      this.$indicators.find('.active').removeClass('active')\n      var $nextIndicator = $(this.$indicators.children()[this.getItemIndex($next)])\n      $nextIndicator && $nextIndicator.addClass('active')\n    }\n\n    var slidEvent = $.Event('slid.bs.carousel', { relatedTarget: relatedTarget, direction: direction }) // yes, \"slid\"\n    if ($.support.transition && this.$element.hasClass('slide')) {\n      $next.addClass(type)\n      $next[0].offsetWidth // force reflow\n      $active.addClass(direction)\n      $next.addClass(direction)\n      $active\n        .one('bsTransitionEnd', function () {\n          $next.removeClass([type, direction].join(' ')).addClass('active')\n          $active.removeClass(['active', direction].join(' '))\n          that.sliding = false\n          setTimeout(function () {\n            that.$element.trigger(slidEvent)\n          }, 0)\n        })\n        .emulateTransitionEnd(Carousel.TRANSITION_DURATION)\n    } else {\n      $active.removeClass('active')\n      $next.addClass('active')\n      this.sliding = false\n      this.$element.trigger(slidEvent)\n    }\n\n    isCycling && this.cycle()\n\n    return this\n  }\n\n\n  // CAROUSEL PLUGIN DEFINITION\n  // ==========================\n\n  function Plugin(option) {\n    return this.each(function () {\n      var $this   = $(this)\n      var data    = $this.data('bs.carousel')\n      var options = $.extend({}, Carousel.DEFAULTS, $this.data(), typeof option == 'object' && option)\n      var action  = typeof option == 'string' ? option : options.slide\n\n      if (!data) $this.data('bs.carousel', (data = new Carousel(this, options)))\n      if (typeof option == 'number') data.to(option)\n      else if (action) data[action]()\n      else if (options.interval) data.pause().cycle()\n    })\n  }\n\n  var old = $.fn.carousel\n\n  $.fn.carousel             = Plugin\n  $.fn.carousel.Constructor = Carousel\n\n\n  // CAROUSEL NO CONFLICT\n  // ====================\n\n  $.fn.carousel.noConflict = function () {\n    $.fn.carousel = old\n    return this\n  }\n\n\n  // CAROUSEL DATA-API\n  // =================\n\n  var clickHandler = function (e) {\n    var href\n    var $this   = $(this)\n    var $target = $($this.attr('data-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\\s]+$)/, '')) // strip for ie7\n    if (!$target.hasClass('carousel')) return\n    var options = $.extend({}, $target.data(), $this.data())\n    var slideIndex = $this.attr('data-slide-to')\n    if (slideIndex) options.interval = false\n\n    Plugin.call($target, options)\n\n    if (slideIndex) {\n      $target.data('bs.carousel').to(slideIndex)\n    }\n\n    e.preventDefault()\n  }\n\n  $(document)\n    .on('click.bs.carousel.data-api', '[data-slide]', clickHandler)\n    .on('click.bs.carousel.data-api', '[data-slide-to]', clickHandler)\n\n  $(window).on('load', function () {\n    $('[data-ride=\"carousel\"]').each(function () {\n      var $carousel = $(this)\n      Plugin.call($carousel, $carousel.data())\n    })\n  })\n\n}(jQuery);\n\n/* ========================================================================\n * Bootstrap: collapse.js v3.3.7\n * http://getbootstrap.com/javascript/#collapse\n * ========================================================================\n * Copyright 2011-2016 Twitter, Inc.\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * ======================================================================== */\n\n/* jshint latedef: false */\n\n+function ($) {\n  'use strict';\n\n  // COLLAPSE PUBLIC CLASS DEFINITION\n  // ================================\n\n  var Collapse = function (element, options) {\n    this.$element      = $(element)\n    this.options       = $.extend({}, Collapse.DEFAULTS, options)\n    this.$trigger      = $('[data-toggle=\"collapse\"][href=\"#' + element.id + '\"],' +\n                           '[data-toggle=\"collapse\"][data-target=\"#' + element.id + '\"]')\n    this.transitioning = null\n\n    if (this.options.parent) {\n      this.$parent = this.getParent()\n    } else {\n      this.addAriaAndCollapsedClass(this.$element, this.$trigger)\n    }\n\n    if (this.options.toggle) this.toggle()\n  }\n\n  Collapse.VERSION  = '3.3.7'\n\n  Collapse.TRANSITION_DURATION = 350\n\n  Collapse.DEFAULTS = {\n    toggle: true\n  }\n\n  Collapse.prototype.dimension = function () {\n    var hasWidth = this.$element.hasClass('width')\n    return hasWidth ? 'width' : 'height'\n  }\n\n  Collapse.prototype.show = function () {\n    if (this.transitioning || this.$element.hasClass('in')) return\n\n    var activesData\n    var actives = this.$parent && this.$parent.children('.panel').children('.in, .collapsing')\n\n    if (actives && actives.length) {\n      activesData = actives.data('bs.collapse')\n      if (activesData && activesData.transitioning) return\n    }\n\n    var startEvent = $.Event('show.bs.collapse')\n    this.$element.trigger(startEvent)\n    if (startEvent.isDefaultPrevented()) return\n\n    if (actives && actives.length) {\n      Plugin.call(actives, 'hide')\n      activesData || actives.data('bs.collapse', null)\n    }\n\n    var dimension = this.dimension()\n\n    this.$element\n      .removeClass('collapse')\n      .addClass('collapsing')[dimension](0)\n      .attr('aria-expanded', true)\n\n    this.$trigger\n      .removeClass('collapsed')\n      .attr('aria-expanded', true)\n\n    this.transitioning = 1\n\n    var complete = function () {\n      this.$element\n        .removeClass('collapsing')\n        .addClass('collapse in')[dimension]('')\n      this.transitioning = 0\n      this.$element\n        .trigger('shown.bs.collapse')\n    }\n\n    if (!$.support.transition) return complete.call(this)\n\n    var scrollSize = $.camelCase(['scroll', dimension].join('-'))\n\n    this.$element\n      .one('bsTransitionEnd', $.proxy(complete, this))\n      .emulateTransitionEnd(Collapse.TRANSITION_DURATION)[dimension](this.$element[0][scrollSize])\n  }\n\n  Collapse.prototype.hide = function () {\n    if (this.transitioning || !this.$element.hasClass('in')) return\n\n    var startEvent = $.Event('hide.bs.collapse')\n    this.$element.trigger(startEvent)\n    if (startEvent.isDefaultPrevented()) return\n\n    var dimension = this.dimension()\n\n    this.$element[dimension](this.$element[dimension]())[0].offsetHeight\n\n    this.$element\n      .addClass('collapsing')\n      .removeClass('collapse in')\n      .attr('aria-expanded', false)\n\n    this.$trigger\n      .addClass('collapsed')\n      .attr('aria-expanded', false)\n\n    this.transitioning = 1\n\n    var complete = function () {\n      this.transitioning = 0\n      this.$element\n        .removeClass('collapsing')\n        .addClass('collapse')\n        .trigger('hidden.bs.collapse')\n    }\n\n    if (!$.support.transition) return complete.call(this)\n\n    this.$element\n      [dimension](0)\n      .one('bsTransitionEnd', $.proxy(complete, this))\n      .emulateTransitionEnd(Collapse.TRANSITION_DURATION)\n  }\n\n  Collapse.prototype.toggle = function () {\n    this[this.$element.hasClass('in') ? 'hide' : 'show']()\n  }\n\n  Collapse.prototype.getParent = function () {\n    return $(this.options.parent)\n      .find('[data-toggle=\"collapse\"][data-parent=\"' + this.options.parent + '\"]')\n      .each($.proxy(function (i, element) {\n        var $element = $(element)\n        this.addAriaAndCollapsedClass(getTargetFromTrigger($element), $element)\n      }, this))\n      .end()\n  }\n\n  Collapse.prototype.addAriaAndCollapsedClass = function ($element, $trigger) {\n    var isOpen = $element.hasClass('in')\n\n    $element.attr('aria-expanded', isOpen)\n    $trigger\n      .toggleClass('collapsed', !isOpen)\n      .attr('aria-expanded', isOpen)\n  }\n\n  function getTargetFromTrigger($trigger) {\n    var href\n    var target = $trigger.attr('data-target')\n      || (href = $trigger.attr('href')) && href.replace(/.*(?=#[^\\s]+$)/, '') // strip for ie7\n\n    return $(target)\n  }\n\n\n  // COLLAPSE PLUGIN DEFINITION\n  // ==========================\n\n  function Plugin(option) {\n    return this.each(function () {\n      var $this   = $(this)\n      var data    = $this.data('bs.collapse')\n      var options = $.extend({}, Collapse.DEFAULTS, $this.data(), typeof option == 'object' && option)\n\n      if (!data && options.toggle && /show|hide/.test(option)) options.toggle = false\n      if (!data) $this.data('bs.collapse', (data = new Collapse(this, options)))\n      if (typeof option == 'string') data[option]()\n    })\n  }\n\n  var old = $.fn.collapse\n\n  $.fn.collapse             = Plugin\n  $.fn.collapse.Constructor = Collapse\n\n\n  // COLLAPSE NO CONFLICT\n  // ====================\n\n  $.fn.collapse.noConflict = function () {\n    $.fn.collapse = old\n    return this\n  }\n\n\n  // COLLAPSE DATA-API\n  // =================\n\n  $(document).on('click.bs.collapse.data-api', '[data-toggle=\"collapse\"]', function (e) {\n    var $this   = $(this)\n\n    if (!$this.attr('data-target')) e.preventDefault()\n\n    var $target = getTargetFromTrigger($this)\n    var data    = $target.data('bs.collapse')\n    var option  = data ? 'toggle' : $this.data()\n\n    Plugin.call($target, option)\n  })\n\n}(jQuery);\n\n/* ========================================================================\n * Bootstrap: dropdown.js v3.3.7\n * http://getbootstrap.com/javascript/#dropdowns\n * ========================================================================\n * Copyright 2011-2016 Twitter, Inc.\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * ======================================================================== */\n\n\n+function ($) {\n  'use strict';\n\n  // DROPDOWN CLASS DEFINITION\n  // =========================\n\n  var backdrop = '.dropdown-backdrop'\n  var toggle   = '[data-toggle=\"dropdown\"]'\n  var Dropdown = function (element) {\n    $(element).on('click.bs.dropdown', this.toggle)\n  }\n\n  Dropdown.VERSION = '3.3.7'\n\n  function getParent($this) {\n    var selector = $this.attr('data-target')\n\n    if (!selector) {\n      selector = $this.attr('href')\n      selector = selector && /#[A-Za-z]/.test(selector) && selector.replace(/.*(?=#[^\\s]*$)/, '') // strip for ie7\n    }\n\n    var $parent = selector && $(selector)\n\n    return $parent && $parent.length ? $parent : $this.parent()\n  }\n\n  function clearMenus(e) {\n    if (e && e.which === 3) return\n    $(backdrop).remove()\n    $(toggle).each(function () {\n      var $this         = $(this)\n      var $parent       = getParent($this)\n      var relatedTarget = { relatedTarget: this }\n\n      if (!$parent.hasClass('open')) return\n\n      if (e && e.type == 'click' && /input|textarea/i.test(e.target.tagName) && $.contains($parent[0], e.target)) return\n\n      $parent.trigger(e = $.Event('hide.bs.dropdown', relatedTarget))\n\n      if (e.isDefaultPrevented()) return\n\n      $this.attr('aria-expanded', 'false')\n      $parent.removeClass('open').trigger($.Event('hidden.bs.dropdown', relatedTarget))\n    })\n  }\n\n  Dropdown.prototype.toggle = function (e) {\n    var $this = $(this)\n\n    if ($this.is('.disabled, :disabled')) return\n\n    var $parent  = getParent($this)\n    var isActive = $parent.hasClass('open')\n\n    clearMenus()\n\n    if (!isActive) {\n      if ('ontouchstart' in document.documentElement && !$parent.closest('.navbar-nav').length) {\n        // if mobile we use a backdrop because click events don't delegate\n        $(document.createElement('div'))\n          .addClass('dropdown-backdrop')\n          .insertAfter($(this))\n          .on('click', clearMenus)\n      }\n\n      var relatedTarget = { relatedTarget: this }\n      $parent.trigger(e = $.Event('show.bs.dropdown', relatedTarget))\n\n      if (e.isDefaultPrevented()) return\n\n      $this\n        .trigger('focus')\n        .attr('aria-expanded', 'true')\n\n      $parent\n        .toggleClass('open')\n        .trigger($.Event('shown.bs.dropdown', relatedTarget))\n    }\n\n    return false\n  }\n\n  Dropdown.prototype.keydown = function (e) {\n    if (!/(38|40|27|32)/.test(e.which) || /input|textarea/i.test(e.target.tagName)) return\n\n    var $this = $(this)\n\n    e.preventDefault()\n    e.stopPropagation()\n\n    if ($this.is('.disabled, :disabled')) return\n\n    var $parent  = getParent($this)\n    var isActive = $parent.hasClass('open')\n\n    if (!isActive && e.which != 27 || isActive && e.which == 27) {\n      if (e.which == 27) $parent.find(toggle).trigger('focus')\n      return $this.trigger('click')\n    }\n\n    var desc = ' li:not(.disabled):visible a'\n    var $items = $parent.find('.dropdown-menu' + desc)\n\n    if (!$items.length) return\n\n    var index = $items.index(e.target)\n\n    if (e.which == 38 && index > 0)                 index--         // up\n    if (e.which == 40 && index < $items.length - 1) index++         // down\n    if (!~index)                                    index = 0\n\n    $items.eq(index).trigger('focus')\n  }\n\n\n  // DROPDOWN PLUGIN DEFINITION\n  // ==========================\n\n  function Plugin(option) {\n    return this.each(function () {\n      var $this = $(this)\n      var data  = $this.data('bs.dropdown')\n\n      if (!data) $this.data('bs.dropdown', (data = new Dropdown(this)))\n      if (typeof option == 'string') data[option].call($this)\n    })\n  }\n\n  var old = $.fn.dropdown\n\n  $.fn.dropdown             = Plugin\n  $.fn.dropdown.Constructor = Dropdown\n\n\n  // DROPDOWN NO CONFLICT\n  // ====================\n\n  $.fn.dropdown.noConflict = function () {\n    $.fn.dropdown = old\n    return this\n  }\n\n\n  // APPLY TO STANDARD DROPDOWN ELEMENTS\n  // ===================================\n\n  $(document)\n    .on('click.bs.dropdown.data-api', clearMenus)\n    .on('click.bs.dropdown.data-api', '.dropdown form', function (e) { e.stopPropagation() })\n    .on('click.bs.dropdown.data-api', toggle, Dropdown.prototype.toggle)\n    .on('keydown.bs.dropdown.data-api', toggle, Dropdown.prototype.keydown)\n    .on('keydown.bs.dropdown.data-api', '.dropdown-menu', Dropdown.prototype.keydown)\n\n}(jQuery);\n\n/* ========================================================================\n * Bootstrap: modal.js v3.3.7\n * http://getbootstrap.com/javascript/#modals\n * ========================================================================\n * Copyright 2011-2016 Twitter, Inc.\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * ======================================================================== */\n\n\n+function ($) {\n  'use strict';\n\n  // MODAL CLASS DEFINITION\n  // ======================\n\n  var Modal = function (element, options) {\n    this.options             = options\n    this.$body               = $(document.body)\n    this.$element            = $(element)\n    this.$dialog             = this.$element.find('.modal-dialog')\n    this.$backdrop           = null\n    this.isShown             = null\n    this.originalBodyPad     = null\n    this.scrollbarWidth      = 0\n    this.ignoreBackdropClick = false\n\n    if (this.options.remote) {\n      this.$element\n        .find('.modal-content')\n        .load(this.options.remote, $.proxy(function () {\n          this.$element.trigger('loaded.bs.modal')\n        }, this))\n    }\n  }\n\n  Modal.VERSION  = '3.3.7'\n\n  Modal.TRANSITION_DURATION = 300\n  Modal.BACKDROP_TRANSITION_DURATION = 150\n\n  Modal.DEFAULTS = {\n    backdrop: true,\n    keyboard: true,\n    show: true\n  }\n\n  Modal.prototype.toggle = function (_relatedTarget) {\n    return this.isShown ? this.hide() : this.show(_relatedTarget)\n  }\n\n  Modal.prototype.show = function (_relatedTarget) {\n    var that = this\n    var e    = $.Event('show.bs.modal', { relatedTarget: _relatedTarget })\n\n    this.$element.trigger(e)\n\n    if (this.isShown || e.isDefaultPrevented()) return\n\n    this.isShown = true\n\n    this.checkScrollbar()\n    this.setScrollbar()\n    this.$body.addClass('modal-open')\n\n    this.escape()\n    this.resize()\n\n    this.$element.on('click.dismiss.bs.modal', '[data-dismiss=\"modal\"]', $.proxy(this.hide, this))\n\n    this.$dialog.on('mousedown.dismiss.bs.modal', function () {\n      that.$element.one('mouseup.dismiss.bs.modal', function (e) {\n        if ($(e.target).is(that.$element)) that.ignoreBackdropClick = true\n      })\n    })\n\n    this.backdrop(function () {\n      var transition = $.support.transition && that.$element.hasClass('fade')\n\n      if (!that.$element.parent().length) {\n        that.$element.appendTo(that.$body) // don't move modals dom position\n      }\n\n      that.$element\n        .show()\n        .scrollTop(0)\n\n      that.adjustDialog()\n\n      if (transition) {\n        that.$element[0].offsetWidth // force reflow\n      }\n\n      that.$element.addClass('in')\n\n      that.enforceFocus()\n\n      var e = $.Event('shown.bs.modal', { relatedTarget: _relatedTarget })\n\n      transition ?\n        that.$dialog // wait for modal to slide in\n          .one('bsTransitionEnd', function () {\n            that.$element.trigger('focus').trigger(e)\n          })\n          .emulateTransitionEnd(Modal.TRANSITION_DURATION) :\n        that.$element.trigger('focus').trigger(e)\n    })\n  }\n\n  Modal.prototype.hide = function (e) {\n    if (e) e.preventDefault()\n\n    e = $.Event('hide.bs.modal')\n\n    this.$element.trigger(e)\n\n    if (!this.isShown || e.isDefaultPrevented()) return\n\n    this.isShown = false\n\n    this.escape()\n    this.resize()\n\n    $(document).off('focusin.bs.modal')\n\n    this.$element\n      .removeClass('in')\n      .off('click.dismiss.bs.modal')\n      .off('mouseup.dismiss.bs.modal')\n\n    this.$dialog.off('mousedown.dismiss.bs.modal')\n\n    $.support.transition && this.$element.hasClass('fade') ?\n      this.$element\n        .one('bsTransitionEnd', $.proxy(this.hideModal, this))\n        .emulateTransitionEnd(Modal.TRANSITION_DURATION) :\n      this.hideModal()\n  }\n\n  Modal.prototype.enforceFocus = function () {\n    $(document)\n      .off('focusin.bs.modal') // guard against infinite focus loop\n      .on('focusin.bs.modal', $.proxy(function (e) {\n        if (document !== e.target &&\n            this.$element[0] !== e.target &&\n            !this.$element.has(e.target).length) {\n          this.$element.trigger('focus')\n        }\n      }, this))\n  }\n\n  Modal.prototype.escape = function () {\n    if (this.isShown && this.options.keyboard) {\n      this.$element.on('keydown.dismiss.bs.modal', $.proxy(function (e) {\n        e.which == 27 && this.hide()\n      }, this))\n    } else if (!this.isShown) {\n      this.$element.off('keydown.dismiss.bs.modal')\n    }\n  }\n\n  Modal.prototype.resize = function () {\n    if (this.isShown) {\n      $(window).on('resize.bs.modal', $.proxy(this.handleUpdate, this))\n    } else {\n      $(window).off('resize.bs.modal')\n    }\n  }\n\n  Modal.prototype.hideModal = function () {\n    var that = this\n    this.$element.hide()\n    this.backdrop(function () {\n      that.$body.removeClass('modal-open')\n      that.resetAdjustments()\n      that.resetScrollbar()\n      that.$element.trigger('hidden.bs.modal')\n    })\n  }\n\n  Modal.prototype.removeBackdrop = function () {\n    this.$backdrop && this.$backdrop.remove()\n    this.$backdrop = null\n  }\n\n  Modal.prototype.backdrop = function (callback) {\n    var that = this\n    var animate = this.$element.hasClass('fade') ? 'fade' : ''\n\n    if (this.isShown && this.options.backdrop) {\n      var doAnimate = $.support.transition && animate\n\n      this.$backdrop = $(document.createElement('div'))\n        .addClass('modal-backdrop ' + animate)\n        .appendTo(this.$body)\n\n      this.$element.on('click.dismiss.bs.modal', $.proxy(function (e) {\n        if (this.ignoreBackdropClick) {\n          this.ignoreBackdropClick = false\n          return\n        }\n        if (e.target !== e.currentTarget) return\n        this.options.backdrop == 'static'\n          ? this.$element[0].focus()\n          : this.hide()\n      }, this))\n\n      if (doAnimate) this.$backdrop[0].offsetWidth // force reflow\n\n      this.$backdrop.addClass('in')\n\n      if (!callback) return\n\n      doAnimate ?\n        this.$backdrop\n          .one('bsTransitionEnd', callback)\n          .emulateTransitionEnd(Modal.BACKDROP_TRANSITION_DURATION) :\n        callback()\n\n    } else if (!this.isShown && this.$backdrop) {\n      this.$backdrop.removeClass('in')\n\n      var callbackRemove = function () {\n        that.removeBackdrop()\n        callback && callback()\n      }\n      $.support.transition && this.$element.hasClass('fade') ?\n        this.$backdrop\n          .one('bsTransitionEnd', callbackRemove)\n          .emulateTransitionEnd(Modal.BACKDROP_TRANSITION_DURATION) :\n        callbackRemove()\n\n    } else if (callback) {\n      callback()\n    }\n  }\n\n  // these following methods are used to handle overflowing modals\n\n  Modal.prototype.handleUpdate = function () {\n    this.adjustDialog()\n  }\n\n  Modal.prototype.adjustDialog = function () {\n    var modalIsOverflowing = this.$element[0].scrollHeight > document.documentElement.clientHeight\n\n    this.$element.css({\n      paddingLeft:  !this.bodyIsOverflowing && modalIsOverflowing ? this.scrollbarWidth : '',\n      paddingRight: this.bodyIsOverflowing && !modalIsOverflowing ? this.scrollbarWidth : ''\n    })\n  }\n\n  Modal.prototype.resetAdjustments = function () {\n    this.$element.css({\n      paddingLeft: '',\n      paddingRight: ''\n    })\n  }\n\n  Modal.prototype.checkScrollbar = function () {\n    var fullWindowWidth = window.innerWidth\n    if (!fullWindowWidth) { // workaround for missing window.innerWidth in IE8\n      var documentElementRect = document.documentElement.getBoundingClientRect()\n      fullWindowWidth = documentElementRect.right - Math.abs(documentElementRect.left)\n    }\n    this.bodyIsOverflowing = document.body.clientWidth < fullWindowWidth\n    this.scrollbarWidth = this.measureScrollbar()\n  }\n\n  Modal.prototype.setScrollbar = function () {\n    var bodyPad = parseInt((this.$body.css('padding-right') || 0), 10)\n    this.originalBodyPad = document.body.style.paddingRight || ''\n    if (this.bodyIsOverflowing) this.$body.css('padding-right', bodyPad + this.scrollbarWidth)\n  }\n\n  Modal.prototype.resetScrollbar = function () {\n    this.$body.css('padding-right', this.originalBodyPad)\n  }\n\n  Modal.prototype.measureScrollbar = function () { // thx walsh\n    var scrollDiv = document.createElement('div')\n    scrollDiv.className = 'modal-scrollbar-measure'\n    this.$body.append(scrollDiv)\n    var scrollbarWidth = scrollDiv.offsetWidth - scrollDiv.clientWidth\n    this.$body[0].removeChild(scrollDiv)\n    return scrollbarWidth\n  }\n\n\n  // MODAL PLUGIN DEFINITION\n  // =======================\n\n  function Plugin(option, _relatedTarget) {\n    return this.each(function () {\n      var $this   = $(this)\n      var data    = $this.data('bs.modal')\n      var options = $.extend({}, Modal.DEFAULTS, $this.data(), typeof option == 'object' && option)\n\n      if (!data) $this.data('bs.modal', (data = new Modal(this, options)))\n      if (typeof option == 'string') data[option](_relatedTarget)\n      else if (options.show) data.show(_relatedTarget)\n    })\n  }\n\n  var old = $.fn.modal\n\n  $.fn.modal             = Plugin\n  $.fn.modal.Constructor = Modal\n\n\n  // MODAL NO CONFLICT\n  // =================\n\n  $.fn.modal.noConflict = function () {\n    $.fn.modal = old\n    return this\n  }\n\n\n  // MODAL DATA-API\n  // ==============\n\n  $(document).on('click.bs.modal.data-api', '[data-toggle=\"modal\"]', function (e) {\n    var $this   = $(this)\n    var href    = $this.attr('href')\n    var $target = $($this.attr('data-target') || (href && href.replace(/.*(?=#[^\\s]+$)/, ''))) // strip for ie7\n    var option  = $target.data('bs.modal') ? 'toggle' : $.extend({ remote: !/#/.test(href) && href }, $target.data(), $this.data())\n\n    if ($this.is('a')) e.preventDefault()\n\n    $target.one('show.bs.modal', function (showEvent) {\n      if (showEvent.isDefaultPrevented()) return // only register focus restorer if modal will actually get shown\n      $target.one('hidden.bs.modal', function () {\n        $this.is(':visible') && $this.trigger('focus')\n      })\n    })\n    Plugin.call($target, option, this)\n  })\n\n}(jQuery);\n\n/* ========================================================================\n * Bootstrap: tooltip.js v3.3.7\n * http://getbootstrap.com/javascript/#tooltip\n * Inspired by the original jQuery.tipsy by Jason Frame\n * ========================================================================\n * Copyright 2011-2016 Twitter, Inc.\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * ======================================================================== */\n\n\n+function ($) {\n  'use strict';\n\n  // TOOLTIP PUBLIC CLASS DEFINITION\n  // ===============================\n\n  var Tooltip = function (element, options) {\n    this.type       = null\n    this.options    = null\n    this.enabled    = null\n    this.timeout    = null\n    this.hoverState = null\n    this.$element   = null\n    this.inState    = null\n\n    this.init('tooltip', element, options)\n  }\n\n  Tooltip.VERSION  = '3.3.7'\n\n  Tooltip.TRANSITION_DURATION = 150\n\n  Tooltip.DEFAULTS = {\n    animation: true,\n    placement: 'top',\n    selector: false,\n    template: '<div class=\"tooltip\" role=\"tooltip\"><div class=\"tooltip-arrow\"></div><div class=\"tooltip-inner\"></div></div>',\n    trigger: 'hover focus',\n    title: '',\n    delay: 0,\n    html: false,\n    container: false,\n    viewport: {\n      selector: 'body',\n      padding: 0\n    }\n  }\n\n  Tooltip.prototype.init = function (type, element, options) {\n    this.enabled   = true\n    this.type      = type\n    this.$element  = $(element)\n    this.options   = this.getOptions(options)\n    this.$viewport = this.options.viewport && $($.isFunction(this.options.viewport) ? this.options.viewport.call(this, this.$element) : (this.options.viewport.selector || this.options.viewport))\n    this.inState   = { click: false, hover: false, focus: false }\n\n    if (this.$element[0] instanceof document.constructor && !this.options.selector) {\n      throw new Error('`selector` option must be specified when initializing ' + this.type + ' on the window.document object!')\n    }\n\n    var triggers = this.options.trigger.split(' ')\n\n    for (var i = triggers.length; i--;) {\n      var trigger = triggers[i]\n\n      if (trigger == 'click') {\n        this.$element.on('click.' + this.type, this.options.selector, $.proxy(this.toggle, this))\n      } else if (trigger != 'manual') {\n        var eventIn  = trigger == 'hover' ? 'mouseenter' : 'focusin'\n        var eventOut = trigger == 'hover' ? 'mouseleave' : 'focusout'\n\n        this.$element.on(eventIn  + '.' + this.type, this.options.selector, $.proxy(this.enter, this))\n        this.$element.on(eventOut + '.' + this.type, this.options.selector, $.proxy(this.leave, this))\n      }\n    }\n\n    this.options.selector ?\n      (this._options = $.extend({}, this.options, { trigger: 'manual', selector: '' })) :\n      this.fixTitle()\n  }\n\n  Tooltip.prototype.getDefaults = function () {\n    return Tooltip.DEFAULTS\n  }\n\n  Tooltip.prototype.getOptions = function (options) {\n    options = $.extend({}, this.getDefaults(), this.$element.data(), options)\n\n    if (options.delay && typeof options.delay == 'number') {\n      options.delay = {\n        show: options.delay,\n        hide: options.delay\n      }\n    }\n\n    return options\n  }\n\n  Tooltip.prototype.getDelegateOptions = function () {\n    var options  = {}\n    var defaults = this.getDefaults()\n\n    this._options && $.each(this._options, function (key, value) {\n      if (defaults[key] != value) options[key] = value\n    })\n\n    return options\n  }\n\n  Tooltip.prototype.enter = function (obj) {\n    var self = obj instanceof this.constructor ?\n      obj : $(obj.currentTarget).data('bs.' + this.type)\n\n    if (!self) {\n      self = new this.constructor(obj.currentTarget, this.getDelegateOptions())\n      $(obj.currentTarget).data('bs.' + this.type, self)\n    }\n\n    if (obj instanceof $.Event) {\n      self.inState[obj.type == 'focusin' ? 'focus' : 'hover'] = true\n    }\n\n    if (self.tip().hasClass('in') || self.hoverState == 'in') {\n      self.hoverState = 'in'\n      return\n    }\n\n    clearTimeout(self.timeout)\n\n    self.hoverState = 'in'\n\n    if (!self.options.delay || !self.options.delay.show) return self.show()\n\n    self.timeout = setTimeout(function () {\n      if (self.hoverState == 'in') self.show()\n    }, self.options.delay.show)\n  }\n\n  Tooltip.prototype.isInStateTrue = function () {\n    for (var key in this.inState) {\n      if (this.inState[key]) return true\n    }\n\n    return false\n  }\n\n  Tooltip.prototype.leave = function (obj) {\n    var self = obj instanceof this.constructor ?\n      obj : $(obj.currentTarget).data('bs.' + this.type)\n\n    if (!self) {\n      self = new this.constructor(obj.currentTarget, this.getDelegateOptions())\n      $(obj.currentTarget).data('bs.' + this.type, self)\n    }\n\n    if (obj instanceof $.Event) {\n      self.inState[obj.type == 'focusout' ? 'focus' : 'hover'] = false\n    }\n\n    if (self.isInStateTrue()) return\n\n    clearTimeout(self.timeout)\n\n    self.hoverState = 'out'\n\n    if (!self.options.delay || !self.options.delay.hide) return self.hide()\n\n    self.timeout = setTimeout(function () {\n      if (self.hoverState == 'out') self.hide()\n    }, self.options.delay.hide)\n  }\n\n  Tooltip.prototype.show = function () {\n    var e = $.Event('show.bs.' + this.type)\n\n    if (this.hasContent() && this.enabled) {\n      this.$element.trigger(e)\n\n      var inDom = $.contains(this.$element[0].ownerDocument.documentElement, this.$element[0])\n      if (e.isDefaultPrevented() || !inDom) return\n      var that = this\n\n      var $tip = this.tip()\n\n      var tipId = this.getUID(this.type)\n\n      this.setContent()\n      $tip.attr('id', tipId)\n      this.$element.attr('aria-describedby', tipId)\n\n      if (this.options.animation) $tip.addClass('fade')\n\n      var placement = typeof this.options.placement == 'function' ?\n        this.options.placement.call(this, $tip[0], this.$element[0]) :\n        this.options.placement\n\n      var autoToken = /\\s?auto?\\s?/i\n      var autoPlace = autoToken.test(placement)\n      if (autoPlace) placement = placement.replace(autoToken, '') || 'top'\n\n      $tip\n        .detach()\n        .css({ top: 0, left: 0, display: 'block' })\n        .addClass(placement)\n        .data('bs.' + this.type, this)\n\n      this.options.container ? $tip.appendTo(this.options.container) : $tip.insertAfter(this.$element)\n      this.$element.trigger('inserted.bs.' + this.type)\n\n      var pos          = this.getPosition()\n      var actualWidth  = $tip[0].offsetWidth\n      var actualHeight = $tip[0].offsetHeight\n\n      if (autoPlace) {\n        var orgPlacement = placement\n        var viewportDim = this.getPosition(this.$viewport)\n\n        placement = placement == 'bottom' && pos.bottom + actualHeight > viewportDim.bottom ? 'top'    :\n                    placement == 'top'    && pos.top    - actualHeight < viewportDim.top    ? 'bottom' :\n                    placement == 'right'  && pos.right  + actualWidth  > viewportDim.width  ? 'left'   :\n                    placement == 'left'   && pos.left   - actualWidth  < viewportDim.left   ? 'right'  :\n                    placement\n\n        $tip\n          .removeClass(orgPlacement)\n          .addClass(placement)\n      }\n\n      var calculatedOffset = this.getCalculatedOffset(placement, pos, actualWidth, actualHeight)\n\n      this.applyPlacement(calculatedOffset, placement)\n\n      var complete = function () {\n        var prevHoverState = that.hoverState\n        that.$element.trigger('shown.bs.' + that.type)\n        that.hoverState = null\n\n        if (prevHoverState == 'out') that.leave(that)\n      }\n\n      $.support.transition && this.$tip.hasClass('fade') ?\n        $tip\n          .one('bsTransitionEnd', complete)\n          .emulateTransitionEnd(Tooltip.TRANSITION_DURATION) :\n        complete()\n    }\n  }\n\n  Tooltip.prototype.applyPlacement = function (offset, placement) {\n    var $tip   = this.tip()\n    var width  = $tip[0].offsetWidth\n    var height = $tip[0].offsetHeight\n\n    // manually read margins because getBoundingClientRect includes difference\n    var marginTop = parseInt($tip.css('margin-top'), 10)\n    var marginLeft = parseInt($tip.css('margin-left'), 10)\n\n    // we must check for NaN for ie 8/9\n    if (isNaN(marginTop))  marginTop  = 0\n    if (isNaN(marginLeft)) marginLeft = 0\n\n    offset.top  += marginTop\n    offset.left += marginLeft\n\n    // $.fn.offset doesn't round pixel values\n    // so we use setOffset directly with our own function B-0\n    $.offset.setOffset($tip[0], $.extend({\n      using: function (props) {\n        $tip.css({\n          top: Math.round(props.top),\n          left: Math.round(props.left)\n        })\n      }\n    }, offset), 0)\n\n    $tip.addClass('in')\n\n    // check to see if placing tip in new offset caused the tip to resize itself\n    var actualWidth  = $tip[0].offsetWidth\n    var actualHeight = $tip[0].offsetHeight\n\n    if (placement == 'top' && actualHeight != height) {\n      offset.top = offset.top + height - actualHeight\n    }\n\n    var delta = this.getViewportAdjustedDelta(placement, offset, actualWidth, actualHeight)\n\n    if (delta.left) offset.left += delta.left\n    else offset.top += delta.top\n\n    var isVertical          = /top|bottom/.test(placement)\n    var arrowDelta          = isVertical ? delta.left * 2 - width + actualWidth : delta.top * 2 - height + actualHeight\n    var arrowOffsetPosition = isVertical ? 'offsetWidth' : 'offsetHeight'\n\n    $tip.offset(offset)\n    this.replaceArrow(arrowDelta, $tip[0][arrowOffsetPosition], isVertical)\n  }\n\n  Tooltip.prototype.replaceArrow = function (delta, dimension, isVertical) {\n    this.arrow()\n      .css(isVertical ? 'left' : 'top', 50 * (1 - delta / dimension) + '%')\n      .css(isVertical ? 'top' : 'left', '')\n  }\n\n  Tooltip.prototype.setContent = function () {\n    var $tip  = this.tip()\n    var title = this.getTitle()\n\n    $tip.find('.tooltip-inner')[this.options.html ? 'html' : 'text'](title)\n    $tip.removeClass('fade in top bottom left right')\n  }\n\n  Tooltip.prototype.hide = function (callback) {\n    var that = this\n    var $tip = $(this.$tip)\n    var e    = $.Event('hide.bs.' + this.type)\n\n    function complete() {\n      if (that.hoverState != 'in') $tip.detach()\n      if (that.$element) { // TODO: Check whether guarding this code with this `if` is really necessary.\n        that.$element\n          .removeAttr('aria-describedby')\n          .trigger('hidden.bs.' + that.type)\n      }\n      callback && callback()\n    }\n\n    this.$element.trigger(e)\n\n    if (e.isDefaultPrevented()) return\n\n    $tip.removeClass('in')\n\n    $.support.transition && $tip.hasClass('fade') ?\n      $tip\n        .one('bsTransitionEnd', complete)\n        .emulateTransitionEnd(Tooltip.TRANSITION_DURATION) :\n      complete()\n\n    this.hoverState = null\n\n    return this\n  }\n\n  Tooltip.prototype.fixTitle = function () {\n    var $e = this.$element\n    if ($e.attr('title') || typeof $e.attr('data-original-title') != 'string') {\n      $e.attr('data-original-title', $e.attr('title') || '').attr('title', '')\n    }\n  }\n\n  Tooltip.prototype.hasContent = function () {\n    return this.getTitle()\n  }\n\n  Tooltip.prototype.getPosition = function ($element) {\n    $element   = $element || this.$element\n\n    var el     = $element[0]\n    var isBody = el.tagName == 'BODY'\n\n    var elRect    = el.getBoundingClientRect()\n    if (elRect.width == null) {\n      // width and height are missing in IE8, so compute them manually; see https://github.com/twbs/bootstrap/issues/14093\n      elRect = $.extend({}, elRect, { width: elRect.right - elRect.left, height: elRect.bottom - elRect.top })\n    }\n    var isSvg = window.SVGElement && el instanceof window.SVGElement\n    // Avoid using $.offset() on SVGs since it gives incorrect results in jQuery 3.\n    // See https://github.com/twbs/bootstrap/issues/20280\n    var elOffset  = isBody ? { top: 0, left: 0 } : (isSvg ? null : $element.offset())\n    var scroll    = { scroll: isBody ? document.documentElement.scrollTop || document.body.scrollTop : $element.scrollTop() }\n    var outerDims = isBody ? { width: $(window).width(), height: $(window).height() } : null\n\n    return $.extend({}, elRect, scroll, outerDims, elOffset)\n  }\n\n  Tooltip.prototype.getCalculatedOffset = function (placement, pos, actualWidth, actualHeight) {\n    return placement == 'bottom' ? { top: pos.top + pos.height,   left: pos.left + pos.width / 2 - actualWidth / 2 } :\n           placement == 'top'    ? { top: pos.top - actualHeight, left: pos.left + pos.width / 2 - actualWidth / 2 } :\n           placement == 'left'   ? { top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left - actualWidth } :\n        /* placement == 'right' */ { top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left + pos.width }\n\n  }\n\n  Tooltip.prototype.getViewportAdjustedDelta = function (placement, pos, actualWidth, actualHeight) {\n    var delta = { top: 0, left: 0 }\n    if (!this.$viewport) return delta\n\n    var viewportPadding = this.options.viewport && this.options.viewport.padding || 0\n    var viewportDimensions = this.getPosition(this.$viewport)\n\n    if (/right|left/.test(placement)) {\n      var topEdgeOffset    = pos.top - viewportPadding - viewportDimensions.scroll\n      var bottomEdgeOffset = pos.top + viewportPadding - viewportDimensions.scroll + actualHeight\n      if (topEdgeOffset < viewportDimensions.top) { // top overflow\n        delta.top = viewportDimensions.top - topEdgeOffset\n      } else if (bottomEdgeOffset > viewportDimensions.top + viewportDimensions.height) { // bottom overflow\n        delta.top = viewportDimensions.top + viewportDimensions.height - bottomEdgeOffset\n      }\n    } else {\n      var leftEdgeOffset  = pos.left - viewportPadding\n      var rightEdgeOffset = pos.left + viewportPadding + actualWidth\n      if (leftEdgeOffset < viewportDimensions.left) { // left overflow\n        delta.left = viewportDimensions.left - leftEdgeOffset\n      } else if (rightEdgeOffset > viewportDimensions.right) { // right overflow\n        delta.left = viewportDimensions.left + viewportDimensions.width - rightEdgeOffset\n      }\n    }\n\n    return delta\n  }\n\n  Tooltip.prototype.getTitle = function () {\n    var title\n    var $e = this.$element\n    var o  = this.options\n\n    title = $e.attr('data-original-title')\n      || (typeof o.title == 'function' ? o.title.call($e[0]) :  o.title)\n\n    return title\n  }\n\n  Tooltip.prototype.getUID = function (prefix) {\n    do prefix += ~~(Math.random() * 1000000)\n    while (document.getElementById(prefix))\n    return prefix\n  }\n\n  Tooltip.prototype.tip = function () {\n    if (!this.$tip) {\n      this.$tip = $(this.options.template)\n      if (this.$tip.length != 1) {\n        throw new Error(this.type + ' `template` option must consist of exactly 1 top-level element!')\n      }\n    }\n    return this.$tip\n  }\n\n  Tooltip.prototype.arrow = function () {\n    return (this.$arrow = this.$arrow || this.tip().find('.tooltip-arrow'))\n  }\n\n  Tooltip.prototype.enable = function () {\n    this.enabled = true\n  }\n\n  Tooltip.prototype.disable = function () {\n    this.enabled = false\n  }\n\n  Tooltip.prototype.toggleEnabled = function () {\n    this.enabled = !this.enabled\n  }\n\n  Tooltip.prototype.toggle = function (e) {\n    var self = this\n    if (e) {\n      self = $(e.currentTarget).data('bs.' + this.type)\n      if (!self) {\n        self = new this.constructor(e.currentTarget, this.getDelegateOptions())\n        $(e.currentTarget).data('bs.' + this.type, self)\n      }\n    }\n\n    if (e) {\n      self.inState.click = !self.inState.click\n      if (self.isInStateTrue()) self.enter(self)\n      else self.leave(self)\n    } else {\n      self.tip().hasClass('in') ? self.leave(self) : self.enter(self)\n    }\n  }\n\n  Tooltip.prototype.destroy = function () {\n    var that = this\n    clearTimeout(this.timeout)\n    this.hide(function () {\n      that.$element.off('.' + that.type).removeData('bs.' + that.type)\n      if (that.$tip) {\n        that.$tip.detach()\n      }\n      that.$tip = null\n      that.$arrow = null\n      that.$viewport = null\n      that.$element = null\n    })\n  }\n\n\n  // TOOLTIP PLUGIN DEFINITION\n  // =========================\n\n  function Plugin(option) {\n    return this.each(function () {\n      var $this   = $(this)\n      var data    = $this.data('bs.tooltip')\n      var options = typeof option == 'object' && option\n\n      if (!data && /destroy|hide/.test(option)) return\n      if (!data) $this.data('bs.tooltip', (data = new Tooltip(this, options)))\n      if (typeof option == 'string') data[option]()\n    })\n  }\n\n  var old = $.fn.tooltip\n\n  $.fn.tooltip             = Plugin\n  $.fn.tooltip.Constructor = Tooltip\n\n\n  // TOOLTIP NO CONFLICT\n  // ===================\n\n  $.fn.tooltip.noConflict = function () {\n    $.fn.tooltip = old\n    return this\n  }\n\n}(jQuery);\n\n/* ========================================================================\n * Bootstrap: popover.js v3.3.7\n * http://getbootstrap.com/javascript/#popovers\n * ========================================================================\n * Copyright 2011-2016 Twitter, Inc.\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * ======================================================================== */\n\n\n+function ($) {\n  'use strict';\n\n  // POPOVER PUBLIC CLASS DEFINITION\n  // ===============================\n\n  var Popover = function (element, options) {\n    this.init('popover', element, options)\n  }\n\n  if (!$.fn.tooltip) throw new Error('Popover requires tooltip.js')\n\n  Popover.VERSION  = '3.3.7'\n\n  Popover.DEFAULTS = $.extend({}, $.fn.tooltip.Constructor.DEFAULTS, {\n    placement: 'right',\n    trigger: 'click',\n    content: '',\n    template: '<div class=\"popover\" role=\"tooltip\"><div class=\"arrow\"></div><h3 class=\"popover-title\"></h3><div class=\"popover-content\"></div></div>'\n  })\n\n\n  // NOTE: POPOVER EXTENDS tooltip.js\n  // ================================\n\n  Popover.prototype = $.extend({}, $.fn.tooltip.Constructor.prototype)\n\n  Popover.prototype.constructor = Popover\n\n  Popover.prototype.getDefaults = function () {\n    return Popover.DEFAULTS\n  }\n\n  Popover.prototype.setContent = function () {\n    var $tip    = this.tip()\n    var title   = this.getTitle()\n    var content = this.getContent()\n\n    $tip.find('.popover-title')[this.options.html ? 'html' : 'text'](title)\n    $tip.find('.popover-content').children().detach().end()[ // we use append for html objects to maintain js events\n      this.options.html ? (typeof content == 'string' ? 'html' : 'append') : 'text'\n    ](content)\n\n    $tip.removeClass('fade top bottom left right in')\n\n    // IE8 doesn't accept hiding via the `:empty` pseudo selector, we have to do\n    // this manually by checking the contents.\n    if (!$tip.find('.popover-title').html()) $tip.find('.popover-title').hide()\n  }\n\n  Popover.prototype.hasContent = function () {\n    return this.getTitle() || this.getContent()\n  }\n\n  Popover.prototype.getContent = function () {\n    var $e = this.$element\n    var o  = this.options\n\n    return $e.attr('data-content')\n      || (typeof o.content == 'function' ?\n            o.content.call($e[0]) :\n            o.content)\n  }\n\n  Popover.prototype.arrow = function () {\n    return (this.$arrow = this.$arrow || this.tip().find('.arrow'))\n  }\n\n\n  // POPOVER PLUGIN DEFINITION\n  // =========================\n\n  function Plugin(option) {\n    return this.each(function () {\n      var $this   = $(this)\n      var data    = $this.data('bs.popover')\n      var options = typeof option == 'object' && option\n\n      if (!data && /destroy|hide/.test(option)) return\n      if (!data) $this.data('bs.popover', (data = new Popover(this, options)))\n      if (typeof option == 'string') data[option]()\n    })\n  }\n\n  var old = $.fn.popover\n\n  $.fn.popover             = Plugin\n  $.fn.popover.Constructor = Popover\n\n\n  // POPOVER NO CONFLICT\n  // ===================\n\n  $.fn.popover.noConflict = function () {\n    $.fn.popover = old\n    return this\n  }\n\n}(jQuery);\n\n/* ========================================================================\n * Bootstrap: scrollspy.js v3.3.7\n * http://getbootstrap.com/javascript/#scrollspy\n * ========================================================================\n * Copyright 2011-2016 Twitter, Inc.\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * ======================================================================== */\n\n\n+function ($) {\n  'use strict';\n\n  // SCROLLSPY CLASS DEFINITION\n  // ==========================\n\n  function ScrollSpy(element, options) {\n    this.$body          = $(document.body)\n    this.$scrollElement = $(element).is(document.body) ? $(window) : $(element)\n    this.options        = $.extend({}, ScrollSpy.DEFAULTS, options)\n    this.selector       = (this.options.target || '') + ' .nav li > a'\n    this.offsets        = []\n    this.targets        = []\n    this.activeTarget   = null\n    this.scrollHeight   = 0\n\n    this.$scrollElement.on('scroll.bs.scrollspy', $.proxy(this.process, this))\n    this.refresh()\n    this.process()\n  }\n\n  ScrollSpy.VERSION  = '3.3.7'\n\n  ScrollSpy.DEFAULTS = {\n    offset: 10\n  }\n\n  ScrollSpy.prototype.getScrollHeight = function () {\n    return this.$scrollElement[0].scrollHeight || Math.max(this.$body[0].scrollHeight, document.documentElement.scrollHeight)\n  }\n\n  ScrollSpy.prototype.refresh = function () {\n    var that          = this\n    var offsetMethod  = 'offset'\n    var offsetBase    = 0\n\n    this.offsets      = []\n    this.targets      = []\n    this.scrollHeight = this.getScrollHeight()\n\n    if (!$.isWindow(this.$scrollElement[0])) {\n      offsetMethod = 'position'\n      offsetBase   = this.$scrollElement.scrollTop()\n    }\n\n    this.$body\n      .find(this.selector)\n      .map(function () {\n        var $el   = $(this)\n        var href  = $el.data('target') || $el.attr('href')\n        var $href = /^#./.test(href) && $(href)\n\n        return ($href\n          && $href.length\n          && $href.is(':visible')\n          && [[$href[offsetMethod]().top + offsetBase, href]]) || null\n      })\n      .sort(function (a, b) { return a[0] - b[0] })\n      .each(function () {\n        that.offsets.push(this[0])\n        that.targets.push(this[1])\n      })\n  }\n\n  ScrollSpy.prototype.process = function () {\n    var scrollTop    = this.$scrollElement.scrollTop() + this.options.offset\n    var scrollHeight = this.getScrollHeight()\n    var maxScroll    = this.options.offset + scrollHeight - this.$scrollElement.height()\n    var offsets      = this.offsets\n    var targets      = this.targets\n    var activeTarget = this.activeTarget\n    var i\n\n    if (this.scrollHeight != scrollHeight) {\n      this.refresh()\n    }\n\n    if (scrollTop >= maxScroll) {\n      return activeTarget != (i = targets[targets.length - 1]) && this.activate(i)\n    }\n\n    if (activeTarget && scrollTop < offsets[0]) {\n      this.activeTarget = null\n      return this.clear()\n    }\n\n    for (i = offsets.length; i--;) {\n      activeTarget != targets[i]\n        && scrollTop >= offsets[i]\n        && (offsets[i + 1] === undefined || scrollTop < offsets[i + 1])\n        && this.activate(targets[i])\n    }\n  }\n\n  ScrollSpy.prototype.activate = function (target) {\n    this.activeTarget = target\n\n    this.clear()\n\n    var selector = this.selector +\n      '[data-target=\"' + target + '\"],' +\n      this.selector + '[href=\"' + target + '\"]'\n\n    var active = $(selector)\n      .parents('li')\n      .addClass('active')\n\n    if (active.parent('.dropdown-menu').length) {\n      active = active\n        .closest('li.dropdown')\n        .addClass('active')\n    }\n\n    active.trigger('activate.bs.scrollspy')\n  }\n\n  ScrollSpy.prototype.clear = function () {\n    $(this.selector)\n      .parentsUntil(this.options.target, '.active')\n      .removeClass('active')\n  }\n\n\n  // SCROLLSPY PLUGIN DEFINITION\n  // ===========================\n\n  function Plugin(option) {\n    return this.each(function () {\n      var $this   = $(this)\n      var data    = $this.data('bs.scrollspy')\n      var options = typeof option == 'object' && option\n\n      if (!data) $this.data('bs.scrollspy', (data = new ScrollSpy(this, options)))\n      if (typeof option == 'string') data[option]()\n    })\n  }\n\n  var old = $.fn.scrollspy\n\n  $.fn.scrollspy             = Plugin\n  $.fn.scrollspy.Constructor = ScrollSpy\n\n\n  // SCROLLSPY NO CONFLICT\n  // =====================\n\n  $.fn.scrollspy.noConflict = function () {\n    $.fn.scrollspy = old\n    return this\n  }\n\n\n  // SCROLLSPY DATA-API\n  // ==================\n\n  $(window).on('load.bs.scrollspy.data-api', function () {\n    $('[data-spy=\"scroll\"]').each(function () {\n      var $spy = $(this)\n      Plugin.call($spy, $spy.data())\n    })\n  })\n\n}(jQuery);\n\n/* ========================================================================\n * Bootstrap: tab.js v3.3.7\n * http://getbootstrap.com/javascript/#tabs\n * ========================================================================\n * Copyright 2011-2016 Twitter, Inc.\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * ======================================================================== */\n\n\n+function ($) {\n  'use strict';\n\n  // TAB CLASS DEFINITION\n  // ====================\n\n  var Tab = function (element) {\n    // jscs:disable requireDollarBeforejQueryAssignment\n    this.element = $(element)\n    // jscs:enable requireDollarBeforejQueryAssignment\n  }\n\n  Tab.VERSION = '3.3.7'\n\n  Tab.TRANSITION_DURATION = 150\n\n  Tab.prototype.show = function () {\n    var $this    = this.element\n    var $ul      = $this.closest('ul:not(.dropdown-menu)')\n    var selector = $this.data('target')\n\n    if (!selector) {\n      selector = $this.attr('href')\n      selector = selector && selector.replace(/.*(?=#[^\\s]*$)/, '') // strip for ie7\n    }\n\n    if ($this.parent('li').hasClass('active')) return\n\n    var $previous = $ul.find('.active:last a')\n    var hideEvent = $.Event('hide.bs.tab', {\n      relatedTarget: $this[0]\n    })\n    var showEvent = $.Event('show.bs.tab', {\n      relatedTarget: $previous[0]\n    })\n\n    $previous.trigger(hideEvent)\n    $this.trigger(showEvent)\n\n    if (showEvent.isDefaultPrevented() || hideEvent.isDefaultPrevented()) return\n\n    var $target = $(selector)\n\n    this.activate($this.closest('li'), $ul)\n    this.activate($target, $target.parent(), function () {\n      $previous.trigger({\n        type: 'hidden.bs.tab',\n        relatedTarget: $this[0]\n      })\n      $this.trigger({\n        type: 'shown.bs.tab',\n        relatedTarget: $previous[0]\n      })\n    })\n  }\n\n  Tab.prototype.activate = function (element, container, callback) {\n    var $active    = container.find('> .active')\n    var transition = callback\n      && $.support.transition\n      && ($active.length && $active.hasClass('fade') || !!container.find('> .fade').length)\n\n    function next() {\n      $active\n        .removeClass('active')\n        .find('> .dropdown-menu > .active')\n          .removeClass('active')\n        .end()\n        .find('[data-toggle=\"tab\"]')\n          .attr('aria-expanded', false)\n\n      element\n        .addClass('active')\n        .find('[data-toggle=\"tab\"]')\n          .attr('aria-expanded', true)\n\n      if (transition) {\n        element[0].offsetWidth // reflow for transition\n        element.addClass('in')\n      } else {\n        element.removeClass('fade')\n      }\n\n      if (element.parent('.dropdown-menu').length) {\n        element\n          .closest('li.dropdown')\n            .addClass('active')\n          .end()\n          .find('[data-toggle=\"tab\"]')\n            .attr('aria-expanded', true)\n      }\n\n      callback && callback()\n    }\n\n    $active.length && transition ?\n      $active\n        .one('bsTransitionEnd', next)\n        .emulateTransitionEnd(Tab.TRANSITION_DURATION) :\n      next()\n\n    $active.removeClass('in')\n  }\n\n\n  // TAB PLUGIN DEFINITION\n  // =====================\n\n  function Plugin(option) {\n    return this.each(function () {\n      var $this = $(this)\n      var data  = $this.data('bs.tab')\n\n      if (!data) $this.data('bs.tab', (data = new Tab(this)))\n      if (typeof option == 'string') data[option]()\n    })\n  }\n\n  var old = $.fn.tab\n\n  $.fn.tab             = Plugin\n  $.fn.tab.Constructor = Tab\n\n\n  // TAB NO CONFLICT\n  // ===============\n\n  $.fn.tab.noConflict = function () {\n    $.fn.tab = old\n    return this\n  }\n\n\n  // TAB DATA-API\n  // ============\n\n  var clickHandler = function (e) {\n    e.preventDefault()\n    Plugin.call($(this), 'show')\n  }\n\n  $(document)\n    .on('click.bs.tab.data-api', '[data-toggle=\"tab\"]', clickHandler)\n    .on('click.bs.tab.data-api', '[data-toggle=\"pill\"]', clickHandler)\n\n}(jQuery);\n\n/* ========================================================================\n * Bootstrap: affix.js v3.3.7\n * http://getbootstrap.com/javascript/#affix\n * ========================================================================\n * Copyright 2011-2016 Twitter, Inc.\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * ======================================================================== */\n\n\n+function ($) {\n  'use strict';\n\n  // AFFIX CLASS DEFINITION\n  // ======================\n\n  var Affix = function (element, options) {\n    this.options = $.extend({}, Affix.DEFAULTS, options)\n\n    this.$target = $(this.options.target)\n      .on('scroll.bs.affix.data-api', $.proxy(this.checkPosition, this))\n      .on('click.bs.affix.data-api',  $.proxy(this.checkPositionWithEventLoop, this))\n\n    this.$element     = $(element)\n    this.affixed      = null\n    this.unpin        = null\n    this.pinnedOffset = null\n\n    this.checkPosition()\n  }\n\n  Affix.VERSION  = '3.3.7'\n\n  Affix.RESET    = 'affix affix-top affix-bottom'\n\n  Affix.DEFAULTS = {\n    offset: 0,\n    target: window\n  }\n\n  Affix.prototype.getState = function (scrollHeight, height, offsetTop, offsetBottom) {\n    var scrollTop    = this.$target.scrollTop()\n    var position     = this.$element.offset()\n    var targetHeight = this.$target.height()\n\n    if (offsetTop != null && this.affixed == 'top') return scrollTop < offsetTop ? 'top' : false\n\n    if (this.affixed == 'bottom') {\n      if (offsetTop != null) return (scrollTop + this.unpin <= position.top) ? false : 'bottom'\n      return (scrollTop + targetHeight <= scrollHeight - offsetBottom) ? false : 'bottom'\n    }\n\n    var initializing   = this.affixed == null\n    var colliderTop    = initializing ? scrollTop : position.top\n    var colliderHeight = initializing ? targetHeight : height\n\n    if (offsetTop != null && scrollTop <= offsetTop) return 'top'\n    if (offsetBottom != null && (colliderTop + colliderHeight >= scrollHeight - offsetBottom)) return 'bottom'\n\n    return false\n  }\n\n  Affix.prototype.getPinnedOffset = function () {\n    if (this.pinnedOffset) return this.pinnedOffset\n    this.$element.removeClass(Affix.RESET).addClass('affix')\n    var scrollTop = this.$target.scrollTop()\n    var position  = this.$element.offset()\n    return (this.pinnedOffset = position.top - scrollTop)\n  }\n\n  Affix.prototype.checkPositionWithEventLoop = function () {\n    setTimeout($.proxy(this.checkPosition, this), 1)\n  }\n\n  Affix.prototype.checkPosition = function () {\n    if (!this.$element.is(':visible')) return\n\n    var height       = this.$element.height()\n    var offset       = this.options.offset\n    var offsetTop    = offset.top\n    var offsetBottom = offset.bottom\n    var scrollHeight = Math.max($(document).height(), $(document.body).height())\n\n    if (typeof offset != 'object')         offsetBottom = offsetTop = offset\n    if (typeof offsetTop == 'function')    offsetTop    = offset.top(this.$element)\n    if (typeof offsetBottom == 'function') offsetBottom = offset.bottom(this.$element)\n\n    var affix = this.getState(scrollHeight, height, offsetTop, offsetBottom)\n\n    if (this.affixed != affix) {\n      if (this.unpin != null) this.$element.css('top', '')\n\n      var affixType = 'affix' + (affix ? '-' + affix : '')\n      var e         = $.Event(affixType + '.bs.affix')\n\n      this.$element.trigger(e)\n\n      if (e.isDefaultPrevented()) return\n\n      this.affixed = affix\n      this.unpin = affix == 'bottom' ? this.getPinnedOffset() : null\n\n      this.$element\n        .removeClass(Affix.RESET)\n        .addClass(affixType)\n        .trigger(affixType.replace('affix', 'affixed') + '.bs.affix')\n    }\n\n    if (affix == 'bottom') {\n      this.$element.offset({\n        top: scrollHeight - height - offsetBottom\n      })\n    }\n  }\n\n\n  // AFFIX PLUGIN DEFINITION\n  // =======================\n\n  function Plugin(option) {\n    return this.each(function () {\n      var $this   = $(this)\n      var data    = $this.data('bs.affix')\n      var options = typeof option == 'object' && option\n\n      if (!data) $this.data('bs.affix', (data = new Affix(this, options)))\n      if (typeof option == 'string') data[option]()\n    })\n  }\n\n  var old = $.fn.affix\n\n  $.fn.affix             = Plugin\n  $.fn.affix.Constructor = Affix\n\n\n  // AFFIX NO CONFLICT\n  // =================\n\n  $.fn.affix.noConflict = function () {\n    $.fn.affix = old\n    return this\n  }\n\n\n  // AFFIX DATA-API\n  // ==============\n\n  $(window).on('load', function () {\n    $('[data-spy=\"affix\"]').each(function () {\n      var $spy = $(this)\n      var data = $spy.data()\n\n      data.offset = data.offset || {}\n\n      if (data.offsetBottom != null) data.offset.bottom = data.offsetBottom\n      if (data.offsetTop    != null) data.offset.top    = data.offsetTop\n\n      Plugin.call($spy, data)\n    })\n  })\n\n}(jQuery);\n"
  },
  {
    "path": "static/bootstrap/js/npm.js",
    "content": "// This file is autogenerated via the `commonjs` Grunt task. You can require() this file in a CommonJS environment.\nrequire('../../js/transition.js')\nrequire('../../js/alert.js')\nrequire('../../js/button.js')\nrequire('../../js/carousel.js')\nrequire('../../js/collapse.js')\nrequire('../../js/dropdown.js')\nrequire('../../js/modal.js')\nrequire('../../js/tooltip.js')\nrequire('../../js/popover.js')\nrequire('../../js/scrollspy.js')\nrequire('../../js/tab.js')\nrequire('../../js/affix.js')"
  },
  {
    "path": "static/bootstrap/plugins/bootstrap-fileinput/4.4.7/css/fileinput-rtl.css",
    "content": "/*!\n * bootstrap-fileinput v4.4.7\n * http://plugins.krajee.com/file-input\n *\n * Krajee RTL (Right To Left) default styling for bootstrap-fileinput.\n *\n * Author: Kartik Visweswaran\n * Copyright: 2014 - 2018, Kartik Visweswaran, Krajee.com\n *\n * Licensed under the BSD 3-Clause\n * https://github.com/kartik-v/bootstrap-fileinput/blob/master/LICENSE.md\n */\n.kv-rtl .close, .kv-rtl .krajee-default .file-actions, .kv-rtl .krajee-default .file-other-error {\n    float: left;\n}\n\n.kv-rtl .krajee-default.file-preview-frame, .kv-rtl .krajee-default .file-drag-handle, .kv-rtl .krajee-default .file-upload-indicator {\n    float: right;\n}\n\n.kv-rtl .file-zoom-dialog, .kv-rtl .file-error-message pre, .kv-rtl .file-error-message ul {\n    text-align: right;\n}\n\n.kv-rtl {\n    direction: rtl;\n}\n\n.kv-rtl .floating-buttons {\n    left: 10px;\n    right: auto;\n}\n\n.kv-rtl .floating-buttons .btn-kv {\n    margin-left: 0;\n    margin-right: 3px;\n}\n\n.kv-rtl .file-caption-icon {\n    left: auto;\n    right: 8px;\n}\n\n.kv-rtl .file-drop-zone {\n    margin: 12px 12px 12px 15px;\n}\n\n.kv-rtl .btn-prev {\n    right: 1px;\n    left: auto;\n}\n\n.kv-rtl .btn-next {\n    left: 1px;\n    right: auto;\n}\n\n.kv-rtl .pull-right, .kv-rtl .float-right {\n    float: left !important;\n}\n\n.kv-rtl .pull-left, .kv-rtl .float-left {\n    float: right !important;\n}\n\n.kv-rtl .kv-zoom-title {\n    direction: ltr;\n}\n\n.kv-rtl .krajee-default.file-preview-frame {\n    box-shadow: -1px 1px 5px 0 #a2958a;\n}\n\n.kv-rtl .krajee-default.file-preview-frame:not(.file-preview-error):hover {\n    box-shadow: -3px 3px 5px 0 #333;\n}\n\n.kv-rtl .kv-zoom-actions .btn-kv {\n    margin-left: 0;\n    margin-right: 3px;\n}\n\n.kv-rtl .file-caption.icon-visible .file-caption-name {\n    padding-left: 0;\n    padding-right: 15px;\n}\n\n.kv-rtl .input-group-btn:last-child > .btn {\n    border-radius: 4px 0 0 4px;\n}\n\n.kv-rtl .input-group .form-control:first-child {\n    border-radius: 0 4px 4px 0;\n}\n\n.kv-rtl .btn-file input[type=file] {\n    right: auto;\n    left: 0;\n    text-align: left;\n    background: none repeat scroll 100% 0 transparent;\n}"
  },
  {
    "path": "static/bootstrap/plugins/bootstrap-fileinput/4.4.7/css/fileinput.css",
    "content": "/*!\n * bootstrap-fileinput v4.4.7\n * http://plugins.krajee.com/file-input\n *\n * Krajee default styling for bootstrap-fileinput.\n *\n * Author: Kartik Visweswaran\n * Copyright: 2014 - 2018, Kartik Visweswaran, Krajee.com\n *\n * Licensed under the BSD 3-Clause\n * https://github.com/kartik-v/bootstrap-fileinput/blob/master/LICENSE.md\n */\n.file-loading input[type=file], input[type=file].file-loading {\n    width: 0;\n    height: 0;\n}\n\n.kv-hidden, .file-caption-icon, .file-zoom-dialog .modal-header:before, .file-zoom-dialog .modal-header:after, .file-input-new .file-preview, .file-input-new .close, .file-input-new .glyphicon-file, .file-input-new .fileinput-remove-button, .file-input-new .fileinput-upload-button, .file-input-new .no-browse .input-group-btn, .file-input-ajax-new .fileinput-remove-button, .file-input-ajax-new .fileinput-upload-button, .file-input-ajax-new .no-browse .input-group-btn, .hide-content .kv-file-content {\n    display: none;\n}\n\n.btn-file input[type=file], .file-caption-icon, .file-preview .fileinput-remove, .krajee-default .file-thumb-progress, .file-zoom-dialog .btn-navigate, .file-zoom-dialog .floating-buttons {\n    position: absolute;\n}\n\n.file-loading:before, .btn-file, .file-caption, .file-preview, .krajee-default.file-preview-frame, .krajee-default .file-thumbnail-footer, .file-zoom-dialog .modal-dialog {\n    position: relative;\n}\n\n.file-error-message pre, .file-error-message ul, .krajee-default .file-actions, .krajee-default .file-other-error {\n    text-align: left;\n}\n\n.file-error-message pre, .file-error-message ul {\n    margin: 0;\n}\n\n.krajee-default .file-drag-handle, .krajee-default .file-upload-indicator {\n    float: left;\n    margin: 5px 0 -5px;\n    width: 16px;\n    height: 16px;\n}\n\n.krajee-default .file-thumb-progress .progress, .krajee-default .file-thumb-progress .progress-bar {\n    height: 11px;\n    font-size: 9px;\n    line-height: 10px;\n}\n\n.krajee-default .file-caption-info, .krajee-default .file-size-info {\n    display: block;\n    white-space: nowrap;\n    overflow: hidden;\n    text-overflow: ellipsis;\n    width: 160px;\n    height: 15px;\n    margin: auto;\n}\n\n.file-zoom-content > .file-object.type-video, .file-zoom-content > .file-object.type-flash, .file-zoom-content > .file-object.type-image {\n    max-width: 100%;\n    max-height: 100%;\n    width: auto;\n}\n\n.file-zoom-content > .file-object.type-video, .file-zoom-content > .file-object.type-flash {\n    height: 100%;\n}\n\n.file-zoom-content > .file-object.type-pdf, .file-zoom-content > .file-object.type-html, .file-zoom-content > .file-object.type-text, .file-zoom-content > .file-object.type-default {\n    width: 100%;\n}\n\n.rotate-2 {\n    transform: rotateY(180deg);\n}\n\n.rotate-3 {\n    transform: rotate(180deg);\n}\n\n.rotate-4 {\n    transform: rotate(180deg) rotateY(180deg);\n}\n\n.rotate-5 {\n    transform: rotate(270deg) rotateY(180deg);\n}\n\n.rotate-6 {\n    transform: rotate(90deg);\n}\n\n.rotate-7 {\n    transform: rotate(90deg) rotateY(180deg);\n}\n\n.rotate-8 {\n    transform: rotate(270deg);\n}\n\n.file-loading:before {\n    content: \" Loading...\";\n    display: inline-block;\n    padding-left: 20px;\n    line-height: 16px;\n    font-size: 13px;\n    font-variant: small-caps;\n    color: #999;\n    background: transparent url(../img/loading.gif) top left no-repeat;\n}\n\n.file-object {\n    margin: 0 0 -5px 0;\n    padding: 0;\n}\n\n.btn-file {\n    overflow: hidden;\n}\n\n.btn-file input[type=file] {\n    top: 0;\n    right: 0;\n    min-width: 100%;\n    min-height: 100%;\n    text-align: right;\n    opacity: 0;\n    background: none repeat scroll 0 0 transparent;\n    cursor: inherit;\n    display: block;\n}\n\n.btn-file ::-ms-browse {\n    font-size: 10000px;\n    width: 100%;\n    height: 100%;\n}\n\n.file-caption .file-caption-name {\n    width: 100%;\n    margin: 0;\n    padding: 0;\n    box-shadow: none;\n    border: none;\n    background: none;\n    outline: none;\n}\n\n.file-caption.icon-visible .file-caption-icon {\n    display: inline-block;\n}\n\n.file-caption.icon-visible .file-caption-name {\n    padding-left: 15px;\n}\n\n.file-caption-icon {\n    line-height: 1;\n    left: 8px;\n}\n\n.file-error-message {\n    color: #a94442;\n    background-color: #f2dede;\n    margin: 5px;\n    border: 1px solid #ebccd1;\n    border-radius: 4px;\n    padding: 15px;\n}\n\n.file-error-message pre {\n    margin: 5px 0;\n}\n\n.file-caption-disabled {\n    background-color: #eee;\n    cursor: not-allowed;\n    opacity: 1;\n}\n\n.file-preview {\n    border-radius: 5px;\n    border: 1px solid #ddd;\n    padding: 8px;\n    width: 100%;\n    margin-bottom: 5px;\n}\n\n.file-preview .btn-xs {\n    padding: 1px 5px;\n    font-size: 12px;\n    line-height: 1.5;\n    border-radius: 3px;\n}\n\n.file-preview .fileinput-remove {\n    top: 1px;\n    right: 1px;\n    line-height: 10px;\n}\n\n.file-preview .clickable {\n    cursor: pointer;\n}\n\n.file-preview-image {\n    font: 40px Impact, Charcoal, sans-serif;\n    color: #008000;\n}\n\n.krajee-default.file-preview-frame {\n    margin: 8px;\n    border: 1px solid #ddd;\n    box-shadow: 1px 1px 5px 0 #a2958a;\n    padding: 6px;\n    float: left;\n    text-align: center;\n}\n\n.krajee-default.file-preview-frame .kv-file-content {\n    width: 213px;\n    height: 160px;\n}\n\n.krajee-default.file-preview-frame .file-thumbnail-footer {\n    height: 70px;\n}\n\n.krajee-default.file-preview-frame:not(.file-preview-error):hover {\n    box-shadow: 3px 3px 5px 0 #333;\n}\n\n.krajee-default .file-preview-text {\n    display: block;\n    color: #428bca;\n    border: 1px solid #ddd;\n    font-family: Menlo, Monaco, Consolas, \"Courier New\", monospace;\n    outline: none;\n    padding: 8px;\n    resize: none;\n}\n\n.krajee-default .file-preview-html {\n    border: 1px solid #ddd;\n    padding: 8px;\n    overflow: auto;\n}\n\n.krajee-default .file-other-icon {\n    font-size: 6em;\n}\n\n.krajee-default .file-footer-buttons {\n    float: right;\n}\n\n.krajee-default .file-footer-caption {\n    display: block;\n    text-align: center;\n    padding-top: 4px;\n    font-size: 11px;\n    color: #777;\n    margin-bottom: 15px;\n}\n\n.krajee-default .file-preview-error {\n    opacity: 0.65;\n    box-shadow: none;\n}\n\n.krajee-default .file-thumb-progress {\n    height: 11px;\n    top: 37px;\n    left: 0;\n    right: 0;\n}\n\n.krajee-default.kvsortable-ghost {\n    background: #e1edf7;\n    border: 2px solid #a1abff;\n}\n\n.krajee-default .file-preview-other:hover {\n    opacity: 0.8;\n}\n\n.krajee-default .file-preview-frame:not(.file-preview-error) .file-footer-caption:hover {\n    color: #000;\n}\n\n.kv-upload-progress .progress {\n    height: 20px;\n    line-height: 20px;\n    margin: 10px 0;\n    overflow: hidden;\n}\n\n.kv-upload-progress .progress-bar {\n    height: 20px;\n    line-height: 20px;\n}\n\n/*noinspection CssOverwrittenProperties*/\n.file-zoom-dialog .file-other-icon {\n    font-size: 22em;\n    font-size: 50vmin;\n}\n\n.file-zoom-dialog .modal-dialog {\n    width: auto;\n}\n\n.file-zoom-dialog .modal-header {\n    display: flex;\n    align-items: center;\n    justify-content: space-between;\n}\n\n.file-zoom-dialog .btn-navigate {\n    padding: 0;\n    margin: 0;\n    background: transparent;\n    text-decoration: none;\n    outline: none;\n    opacity: 0.7;\n    top: 45%;\n    font-size: 4em;\n    color: #1c94c4;\n}\n\n.file-zoom-dialog .btn-navigate:not([disabled]):hover {\n    outline: none;\n    box-shadow: none;\n    opacity: 0.6;\n}\n\n.file-zoom-dialog .floating-buttons {\n    top: 5px;\n    right: 10px;\n}\n\n.file-zoom-dialog .btn-navigate[disabled] {\n    opacity: 0.3;\n}\n\n.file-zoom-dialog .btn-prev {\n    left: 1px;\n}\n\n.file-zoom-dialog .btn-next {\n    right: 1px;\n}\n\n.file-zoom-dialog .kv-zoom-title {\n    font-weight: 300;\n    color: #999;\n    max-width: 50%;\n    overflow: hidden;\n    white-space: nowrap;\n    text-overflow: ellipsis;\n}\n\n.file-input-new .no-browse .form-control {\n    border-top-right-radius: 4px;\n    border-bottom-right-radius: 4px;\n}\n\n.file-input-ajax-new .no-browse .form-control {\n    border-top-right-radius: 4px;\n    border-bottom-right-radius: 4px;\n}\n\n.file-caption-main {\n    width: 100%;\n}\n\n.file-thumb-loading {\n    background: transparent url(../img/loading.gif) no-repeat scroll center center content-box !important;\n}\n\n.file-drop-zone {\n    border: 1px dashed #aaa;\n    border-radius: 4px;\n    height: 100%;\n    text-align: center;\n    vertical-align: middle;\n    margin: 12px 15px 12px 12px;\n    padding: 5px;\n}\n\n.file-drop-zone.clickable:hover {\n    border: 2px dashed #999;\n}\n\n.file-drop-zone.clickable:focus {\n    border: 2px solid #5acde2;\n}\n\n.file-drop-zone .file-preview-thumbnails {\n    cursor: default;\n}\n\n.file-drop-zone-title {\n    color: #aaa;\n    font-size: 1.6em;\n    padding: 85px 10px;\n    cursor: default;\n}\n\n.file-highlighted {\n    border: 2px dashed #999 !important;\n    background-color: #eee;\n}\n\n.file-uploading {\n    background: url(../img/loading-sm.gif) no-repeat center bottom 10px;\n    opacity: 0.65;\n}\n\n@media (min-width: 576px) {\n    .file-zoom-dialog .modal-dialog {\n        max-width: 500px;\n    }\n}\n\n@media (min-width: 992px) {\n    .file-zoom-dialog .modal-lg {\n        max-width: 800px;\n    }\n}\n\n.file-zoom-fullscreen.modal {\n    position: fixed;\n    top: 0;\n    right: 0;\n    bottom: 0;\n    left: 0;\n}\n\n.file-zoom-fullscreen .modal-dialog {\n    position: fixed;\n    margin: 0;\n    padding: 0;\n    width: 100%;\n    height: 100%;\n    max-width: 100%;\n    max-height: 100%;\n}\n\n.file-zoom-fullscreen .modal-content {\n    border-radius: 0;\n    box-shadow: none;\n}\n\n.file-zoom-fullscreen .modal-body {\n    overflow-y: auto;\n}\n\n.btn-kv {\n    display: inline-block;\n    text-align: center;\n    width: 30px;\n    height: 30px;\n    line-height: 30px;\n    padding: 0;\n    font-size: 90%;\n    border-radius: 0.2rem;\n}\n\n.floating-buttons {\n    z-index: 3000;\n}\n\n.floating-buttons .btn-kv {\n    margin-left: 3px;\n    z-index: 3000;\n}\n\n.file-zoom-content {\n    height: 480px;\n    text-align: center;\n}\n\n.file-zoom-content .file-preview-image {\n    max-height: 100%;\n}\n\n.file-zoom-content .file-preview-video {\n    max-height: 100%;\n}\n\n.file-zoom-content .is-portrait-gt4 {\n    margin-top: 60px;\n}\n\n.file-zoom-content > .file-object.type-image {\n    height: auto;\n    min-height: inherit;\n}\n\n.file-zoom-content > .file-object.type-audio {\n    width: auto;\n    height: 30px;\n}\n\n@media screen and (max-width: 767px) {\n    .file-preview-thumbnails {\n        display: flex;\n        justify-content: center;\n        align-items: center;\n        flex-direction: column;\n    }\n\n    .file-zoom-dialog .modal-header {\n        flex-direction: column;\n    }\n}\n\n@media screen and (max-width: 350px) {\n    .krajee-default.file-preview-frame .kv-file-content {\n        width: 160px;\n    }\n}\n\n.file-loading[dir=rtl]:before {\n    background: transparent url(../img/loading.gif) top right no-repeat;\n    padding-left: 0;\n    padding-right: 20px;\n}\n\n.file-sortable .file-drag-handle {\n    cursor: move;\n    opacity: 1;\n}\n\n.file-sortable .file-drag-handle:hover {\n    opacity: 0.7;\n}\n\n.clickable .file-drop-zone-title {\n    cursor: pointer;\n}\n\n.kv-zoom-actions .btn-kv {\n    margin-left: 3px;\n}\n\n.file-preview-initial.sortable-chosen {\n    background-color: #d9edf7;\n}"
  },
  {
    "path": "static/bootstrap/plugins/bootstrap-fileinput/4.4.7/js/fileinput.js",
    "content": "/*!\n * bootstrap-fileinput v4.4.7\n * http://plugins.krajee.com/file-input\n *\n * Author: Kartik Visweswaran\n * Copyright: 2014 - 2018, Kartik Visweswaran, Krajee.com\n *\n * Licensed under the BSD 3-Clause\n * https://github.com/kartik-v/bootstrap-fileinput/blob/master/LICENSE.md\n */\n(function (factory) {\n    \"use strict\";\n    //noinspection JSUnresolvedVariable\n    if (typeof define === 'function' && define.amd) { // jshint ignore:line\n        // AMD. Register as an anonymous module.\n        define(['jquery'], factory); // jshint ignore:line\n    } else { // noinspection JSUnresolvedVariable\n        if (typeof module === 'object' && module.exports) { // jshint ignore:line\n            // Node/CommonJS\n            // noinspection JSUnresolvedVariable\n            module.exports = factory(require('jquery')); // jshint ignore:line\n        } else {\n            // Browser globals\n            factory(window.jQuery);\n        }\n    }\n}(function ($) {\n    \"use strict\";\n\n    $.fn.fileinputLocales = {};\n    $.fn.fileinputThemes = {};\n\n    String.prototype.setTokens = function (replacePairs) {\n        var str = this.toString(), key, re;\n        for (key in replacePairs) {\n            if (replacePairs.hasOwnProperty(key)) {\n                re = new RegExp(\"\\{\" + key + \"\\}\", \"g\");\n                str = str.replace(re, replacePairs[key]);\n            }\n        }\n        return str;\n    };\n\n    var $h, FileInput;\n\n    // fileinput helper object for all global variables and internal helper methods\n    //noinspection JSUnresolvedVariable\n    $h = {\n        FRAMES: '.kv-preview-thumb',\n        SORT_CSS: 'file-sortable',\n        OBJECT_PARAMS: '<param name=\"controller\" value=\"true\" />\\n' +\n        '<param name=\"allowFullScreen\" value=\"true\" />\\n' +\n        '<param name=\"allowScriptAccess\" value=\"always\" />\\n' +\n        '<param name=\"autoPlay\" value=\"false\" />\\n' +\n        '<param name=\"autoStart\" value=\"false\" />\\n' +\n        '<param name=\"quality\" value=\"high\" />\\n',\n        DEFAULT_PREVIEW: '<div class=\"file-preview-other\">\\n' +\n        '<span class=\"{previewFileIconClass}\">{previewFileIcon}</span>\\n' +\n        '</div>',\n        MODAL_ID: 'kvFileinputModal',\n        MODAL_EVENTS: ['show', 'shown', 'hide', 'hidden', 'loaded'],\n        objUrl: window.URL || window.webkitURL,\n        compare: function (input, str, exact) {\n            return input !== undefined && (exact ? input === str : input.match(str));\n        },\n        isIE: function (ver) {\n            // check for IE versions < 11\n            if (navigator.appName !== 'Microsoft Internet Explorer') {\n                return false;\n            }\n            if (ver === 10) {\n                return new RegExp('msie\\\\s' + ver, 'i').test(navigator.userAgent);\n            }\n            var div = document.createElement(\"div\"), status;\n            div.innerHTML = \"<!--[if IE \" + ver + \"]> <i></i> <![endif]-->\";\n            status = div.getElementsByTagName(\"i\").length;\n            document.body.appendChild(div);\n            div.parentNode.removeChild(div);\n            return status;\n        },\n        initModal: function ($modal) {\n            var $body = $('body');\n            if ($body.length) {\n                $modal.appendTo($body);\n            }\n        },\n        isEmpty: function (value, trim) {\n            return value === undefined || value === null || value.length === 0 || (trim && $.trim(value) === '');\n        },\n        isArray: function (a) {\n            return Array.isArray(a) || Object.prototype.toString.call(a) === '[object Array]';\n        },\n        ifSet: function (needle, haystack, def) {\n            def = def || '';\n            return (haystack && typeof haystack === 'object' && needle in haystack) ? haystack[needle] : def;\n        },\n        cleanArray: function (arr) {\n            if (!(arr instanceof Array)) {\n                arr = [];\n            }\n            return arr.filter(function (e) {\n                return (e !== undefined && e !== null);\n            });\n        },\n        spliceArray: function (arr, index) {\n            var i, j = 0, out = [];\n            if (!(arr instanceof Array)) {\n                return [];\n            }\n            for (i = 0; i < arr.length; i++) {\n                if (i !== index) {\n                    out[j] = arr[i];\n                    j++;\n                }\n            }\n            return out;\n        },\n        getNum: function (num, def) {\n            def = def || 0;\n            if (typeof num === \"number\") {\n                return num;\n            }\n            if (typeof num === \"string\") {\n                num = parseFloat(num);\n            }\n            return isNaN(num) ? def : num;\n        },\n        hasFileAPISupport: function () {\n            return !!(window.File && window.FileReader);\n        },\n        hasDragDropSupport: function () {\n            var div = document.createElement('div');\n            /** @namespace div.draggable */\n            /** @namespace div.ondragstart */\n            /** @namespace div.ondrop */\n            return !$h.isIE(9) &&\n                (div.draggable !== undefined || (div.ondragstart !== undefined && div.ondrop !== undefined));\n        },\n        hasFileUploadSupport: function () {\n            return $h.hasFileAPISupport() && window.FormData;\n        },\n        hasBlobSupport: function () {\n            try {\n                return !!window.Blob && Boolean(new Blob());\n            } catch (e) {\n                return false;\n            }\n        },\n        hasArrayBufferViewSupport: function () {\n            try {\n                return new Blob([new Uint8Array(100)]).size === 100;\n            } catch (e) {\n                return false;\n            }\n        },\n        dataURI2Blob: function (dataURI) {\n            //noinspection JSUnresolvedVariable\n            var BlobBuilder = window.BlobBuilder || window.WebKitBlobBuilder || window.MozBlobBuilder ||\n                window.MSBlobBuilder, canBlob = $h.hasBlobSupport(), byteStr, arrayBuffer, intArray, i, mimeStr, bb,\n                canProceed = (canBlob || BlobBuilder) && window.atob && window.ArrayBuffer && window.Uint8Array;\n            if (!canProceed) {\n                return null;\n            }\n            if (dataURI.split(',')[0].indexOf('base64') >= 0) {\n                byteStr = atob(dataURI.split(',')[1]);\n            } else {\n                byteStr = decodeURIComponent(dataURI.split(',')[1]);\n            }\n            arrayBuffer = new ArrayBuffer(byteStr.length);\n            intArray = new Uint8Array(arrayBuffer);\n            for (i = 0; i < byteStr.length; i += 1) {\n                intArray[i] = byteStr.charCodeAt(i);\n            }\n            mimeStr = dataURI.split(',')[0].split(':')[1].split(';')[0];\n            if (canBlob) {\n                return new Blob([$h.hasArrayBufferViewSupport() ? intArray : arrayBuffer], {type: mimeStr});\n            }\n            bb = new BlobBuilder();\n            bb.append(arrayBuffer);\n            return bb.getBlob(mimeStr);\n        },\n        arrayBuffer2String: function (buffer) {\n            //noinspection JSUnresolvedVariable\n            if (window.TextDecoder) {\n                // noinspection JSUnresolvedFunction\n                return new TextDecoder(\"utf-8\").decode(buffer);\n            }\n            var array = Array.prototype.slice.apply(new Uint8Array(buffer)), out = '', i = 0, len, c, char2, char3;\n            len = array.length;\n            while (i < len) {\n                c = array[i++];\n                switch (c >> 4) { // jshint ignore:line\n                    case 0:\n                    case 1:\n                    case 2:\n                    case 3:\n                    case 4:\n                    case 5:\n                    case 6:\n                    case 7:\n                        // 0xxxxxxx\n                        out += String.fromCharCode(c);\n                        break;\n                    case 12:\n                    case 13:\n                        // 110x xxxx   10xx xxxx\n                        char2 = array[i++];\n                        out += String.fromCharCode(((c & 0x1F) << 6) | (char2 & 0x3F)); // jshint ignore:line\n                        break;\n                    case 14:\n                        // 1110 xxxx  10xx xxxx  10xx xxxx\n                        char2 = array[i++];\n                        char3 = array[i++];\n                        out += String.fromCharCode(((c & 0x0F) << 12) | // jshint ignore:line\n                            ((char2 & 0x3F) << 6) |  // jshint ignore:line\n                            ((char3 & 0x3F) << 0)); // jshint ignore:line\n                        break;\n                }\n            }\n            return out;\n        },\n        isHtml: function (str) {\n            var a = document.createElement('div');\n            a.innerHTML = str;\n            for (var c = a.childNodes, i = c.length; i--;) {\n                if (c[i].nodeType === 1) {\n                    return true;\n                }\n            }\n            return false;\n        },\n        isSvg: function (str) {\n            return str.match(/^\\s*<\\?xml/i) && (str.match(/<!DOCTYPE svg/i) || str.match(/<svg/i));\n        },\n        getMimeType: function (signature, contents, type) {\n            switch (signature) {\n                case \"ffd8ffe0\":\n                case \"ffd8ffe1\":\n                case \"ffd8ffe2\":\n                    return 'image/jpeg';\n                case '89504E47':\n                    return 'image/png';\n                case '47494638':\n                    return 'image/gif';\n                case '49492a00':\n                    return 'image/tiff';\n                case '52494646':\n                    return 'image/webp';\n                case '66747970':\n                    return 'video/3gp';\n                case '4f676753':\n                    return 'video/ogg';\n                case '1a45dfa3':\n                    return 'video/mkv';\n                case '000001ba':\n                case '000001b3':\n                    return 'video/mpeg';\n                case '3026b275':\n                    return 'video/wmv';\n                case '25504446':\n                    return 'application/pdf';\n                case '25215053':\n                    return 'application/ps';\n                case '504b0304':\n                case '504b0506':\n                case '504b0508':\n                    return 'application/zip';\n                case '377abcaf':\n                    return 'application/7z';\n                case '75737461':\n                    return 'application/tar';\n                case '7801730d':\n                    return 'application/dmg';\n                default:\n                    switch (signature.substring(0, 6)) {\n                        case '435753':\n                            return 'application/x-shockwave-flash';\n                        case '494433':\n                            return 'audio/mp3';\n                        case '425a68':\n                            return 'application/bzip';\n                        default:\n                            switch (signature.substring(0, 4)) {\n                                case '424d':\n                                    return 'image/bmp';\n                                case 'fffb':\n                                    return 'audio/mp3';\n                                case '4d5a':\n                                    return 'application/exe';\n                                case '1f9d':\n                                case '1fa0':\n                                    return 'application/zip';\n                                case '1f8b':\n                                    return 'application/gzip';\n                                default:\n                                    return contents && !contents.match(/[^\\u0000-\\u007f]/) ? 'application/text-plain' : type;\n                            }\n                    }\n            }\n        },\n        addCss: function ($el, css) {\n            $el.removeClass(css).addClass(css);\n        },\n        getElement: function (options, param, value) {\n            return ($h.isEmpty(options) || $h.isEmpty(options[param])) ? value : $(options[param]);\n        },\n        uniqId: function () {\n            return Math.round(new Date().getTime()) + '_' + Math.round(Math.random() * 100);\n        },\n        htmlEncode: function (str) {\n            return str.replace(/&/g, '&amp;')\n                .replace(/</g, '&lt;')\n                .replace(/>/g, '&gt;')\n                .replace(/\"/g, '&quot;')\n                .replace(/'/g, '&apos;');\n        },\n        replaceTags: function (str, tags) {\n            var out = str;\n            if (!tags) {\n                return out;\n            }\n            $.each(tags, function (key, value) {\n                if (typeof value === \"function\") {\n                    value = value();\n                }\n                out = out.split(key).join(value);\n            });\n            return out;\n        },\n        cleanMemory: function ($thumb) {\n            var data = $thumb.is('img') ? $thumb.attr('src') : $thumb.find('source').attr('src');\n            /** @namespace $h.objUrl.revokeObjectURL */\n            $h.objUrl.revokeObjectURL(data);\n        },\n        findFileName: function (filePath) {\n            var sepIndex = filePath.lastIndexOf('/');\n            if (sepIndex === -1) {\n                sepIndex = filePath.lastIndexOf('\\\\');\n            }\n            return filePath.split(filePath.substring(sepIndex, sepIndex + 1)).pop();\n        },\n        checkFullScreen: function () {\n            //noinspection JSUnresolvedVariable\n            return document.fullscreenElement || document.mozFullScreenElement || document.webkitFullscreenElement ||\n                document.msFullscreenElement;\n        },\n        toggleFullScreen: function (maximize) {\n            var doc = document, de = doc.documentElement;\n            if (de && maximize && !$h.checkFullScreen()) {\n                /** @namespace document.requestFullscreen */\n                /** @namespace document.msRequestFullscreen */\n                /** @namespace document.mozRequestFullScreen */\n                /** @namespace document.webkitRequestFullscreen */\n                /** @namespace Element.ALLOW_KEYBOARD_INPUT */\n                if (de.requestFullscreen) {\n                    de.requestFullscreen();\n                } else if (de.msRequestFullscreen) {\n                    de.msRequestFullscreen();\n                } else if (de.mozRequestFullScreen) {\n                    de.mozRequestFullScreen();\n                } else if (de.webkitRequestFullscreen) {\n                    de.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT);\n                }\n            } else {\n                /** @namespace document.exitFullscreen */\n                /** @namespace document.msExitFullscreen */\n                /** @namespace document.mozCancelFullScreen */\n                /** @namespace document.webkitExitFullscreen */\n                if (doc.exitFullscreen) {\n                    doc.exitFullscreen();\n                } else if (doc.msExitFullscreen) {\n                    doc.msExitFullscreen();\n                } else if (doc.mozCancelFullScreen) {\n                    doc.mozCancelFullScreen();\n                } else if (doc.webkitExitFullscreen) {\n                    doc.webkitExitFullscreen();\n                }\n            }\n        },\n        moveArray: function (arr, oldIndex, newIndex) {\n            if (newIndex >= arr.length) {\n                var k = newIndex - arr.length;\n                while ((k--) + 1) {\n                    arr.push(undefined);\n                }\n            }\n            arr.splice(newIndex, 0, arr.splice(oldIndex, 1)[0]);\n            return arr;\n        },\n        cleanZoomCache: function ($el) {\n            var $cache = $el.closest('.kv-zoom-cache-theme');\n            if (!$cache.length) {\n                $cache = $el.closest('.kv-zoom-cache');\n            }\n            $cache.remove();\n        },\n        setOrientation: function (buffer, callback) {\n            var scanner = new DataView(buffer), idx = 0, value = 1, // Non-rotated is the default\n                maxBytes, uInt16, exifLength;\n            if (scanner.getUint16(idx) !== 0xFFD8 || buffer.length < 2) { // not a proper JPEG\n                if (callback) {\n                    callback();\n                }\n                return;\n            }\n            idx += 2;\n            maxBytes = scanner.byteLength;\n            while (idx < maxBytes - 2) {\n                uInt16 = scanner.getUint16(idx);\n                idx += 2;\n                switch (uInt16) {\n                    case 0xFFE1: // Start of EXIF\n                        exifLength = scanner.getUint16(idx);\n                        maxBytes = exifLength - idx;\n                        idx += 2;\n                        break;\n                    case 0x0112: // Orientation tag\n                        value = scanner.getUint16(idx + 6, false);\n                        maxBytes = 0; // Stop scanning\n                        break;\n                }\n            }\n            if (callback) {\n                callback(value);\n            }\n        },\n        validateOrientation: function (file, callback) {\n            if (!window.FileReader || !window.DataView) {\n                return; // skip orientation if pre-requisite libraries not supported by browser\n            }\n            var reader = new FileReader(), buffer;\n            reader.onloadend = function () {\n                buffer = reader.result;\n                $h.setOrientation(buffer, callback);\n            };\n            reader.readAsArrayBuffer(file);\n        },\n        adjustOrientedImage: function ($img, isZoom) {\n            var offsetContTop, offsetTop, newTop;\n            if (!$img.hasClass('is-portrait-gt4')) {\n                return;\n            }\n            if (isZoom) {\n                $img.css({width: $img.parent().height()});\n                return;\n            } else {\n                $img.css({height: 'auto', width: $img.height()});\n            }\n            offsetContTop = $img.parent().offset().top;\n            offsetTop = $img.offset().top;\n            newTop = offsetContTop - offsetTop;\n            $img.css('margin-top', newTop);\n        },\n        closeButton: function (css) {\n            css = css ? 'close ' + css : 'close';\n            return '<button type=\"button\" class=\"' + css + '\" aria-label=\"Close\">\\n' +\n                '  <span aria-hidden=\"true\">&times;</span>\\n' +\n                '</button>';\n        }\n    };\n    FileInput = function (element, options) {\n        var self = this;\n        self.$element = $(element);\n        self.$parent = self.$element.parent();\n        if (!self._validate()) {\n            return;\n        }\n        self.isPreviewable = $h.hasFileAPISupport();\n        self.isIE9 = $h.isIE(9);\n        self.isIE10 = $h.isIE(10);\n        if (self.isPreviewable || self.isIE9) {\n            self._init(options);\n            self._listen();\n        }\n        self.$element.removeClass('file-loading');\n    };\n    //noinspection JSUnusedGlobalSymbols\n    FileInput.prototype = {\n        constructor: FileInput,\n        _cleanup: function () {\n            var self = this;\n            self.reader = null;\n            self.formdata = {};\n            self.uploadCount = 0;\n            self.uploadStatus = {};\n            self.uploadLog = [];\n            self.uploadAsyncCount = 0;\n            self.loadedImages = [];\n            self.totalImagesCount = 0;\n            self.ajaxRequests = [];\n            self.clearStack();\n            self.fileInputCleared = false;\n            self.fileBatchCompleted = true;\n            if (!self.isPreviewable) {\n                self.showPreview = false;\n            }\n            self.isError = false;\n            self.ajaxAborted = false;\n            self.cancelling = false;\n        },\n        _init: function (options, refreshMode) {\n            var self = this, f, $el = self.$element, $cont, t, tmp;\n            self.options = options;\n            $.each(options, function (key, value) {\n                switch (key) {\n                    case 'minFileCount':\n                    case 'maxFileCount':\n                    case 'minFileSize':\n                    case 'maxFileSize':\n                    case 'maxFilePreviewSize':\n                    case 'resizeImageQuality':\n                    case 'resizeIfSizeMoreThan':\n                    case 'progressUploadThreshold':\n                    case 'initialPreviewCount':\n                    case 'zoomModalHeight':\n                    case 'minImageHeight':\n                    case 'maxImageHeight':\n                    case 'minImageWidth':\n                    case 'maxImageWidth':\n                        self[key] = $h.getNum(value);\n                        break;\n                    default:\n                        self[key] = value;\n                        break;\n                }\n            });\n            if (self.rtl) { // swap buttons for rtl\n                tmp = self.previewZoomButtonIcons.prev;\n                self.previewZoomButtonIcons.prev = self.previewZoomButtonIcons.next;\n                self.previewZoomButtonIcons.next = tmp;\n            }\n            if (!refreshMode) {\n                self._cleanup();\n            }\n            self.$form = $el.closest('form');\n            self._initTemplateDefaults();\n            self.uploadFileAttr = !$h.isEmpty($el.attr('name')) ? $el.attr('name') : 'file_data';\n            t = self._getLayoutTemplate('progress');\n            self.progressTemplate = t.replace('{class}', self.progressClass);\n            self.progressCompleteTemplate = t.replace('{class}', self.progressCompleteClass);\n            self.progressErrorTemplate = t.replace('{class}', self.progressErrorClass);\n            self.dropZoneEnabled = $h.hasDragDropSupport() && self.dropZoneEnabled;\n            self.isDisabled = $el.attr('disabled') || $el.attr('readonly');\n            if (self.isDisabled) {\n                $el.attr('disabled', true);\n            }\n            self.isAjaxUpload = $h.hasFileUploadSupport() && !$h.isEmpty(self.uploadUrl);\n            self.isClickable = self.browseOnZoneClick && self.showPreview &&\n                (self.isAjaxUpload && self.dropZoneEnabled || !$h.isEmpty(self.defaultPreviewContent));\n            self.slug = typeof options.slugCallback === \"function\" ? options.slugCallback : self._slugDefault;\n            self.mainTemplate = self.showCaption ? self._getLayoutTemplate('main1') : self._getLayoutTemplate('main2');\n            self.captionTemplate = self._getLayoutTemplate('caption');\n            self.previewGenericTemplate = self._getPreviewTemplate('generic');\n            if (!self.imageCanvas && self.resizeImage && (self.maxImageWidth || self.maxImageHeight)) {\n                self.imageCanvas = document.createElement('canvas');\n                self.imageCanvasContext = self.imageCanvas.getContext('2d');\n            }\n            if ($h.isEmpty($el.attr('id'))) {\n                $el.attr('id', $h.uniqId());\n            }\n            self.namespace = '.fileinput_' + $el.attr('id').replace(/-/g, '_');\n            if (self.$container === undefined) {\n                self.$container = self._createContainer();\n            } else {\n                self._refreshContainer();\n            }\n            $cont = self.$container;\n            self.$dropZone = $cont.find('.file-drop-zone');\n            self.$progress = $cont.find('.kv-upload-progress');\n            self.$btnUpload = $cont.find('.fileinput-upload');\n            self.$captionContainer = $h.getElement(options, 'elCaptionContainer', $cont.find('.file-caption'));\n            self.$caption = $h.getElement(options, 'elCaptionText', $cont.find('.file-caption-name'));\n            if (!$h.isEmpty(self.msgPlaceholder)) {\n                f = $el.attr('multiple') ? self.filePlural : self.fileSingle;\n                self.$caption.attr('placeholder', self.msgPlaceholder.replace('{files}', f));\n            }\n            self.$captionIcon = self.$captionContainer.find('.file-caption-icon');\n            self.$previewContainer = $h.getElement(options, 'elPreviewContainer', $cont.find('.file-preview'));\n            self.$preview = $h.getElement(options, 'elPreviewImage', $cont.find('.file-preview-thumbnails'));\n            self.$previewStatus = $h.getElement(options, 'elPreviewStatus', $cont.find('.file-preview-status'));\n            self.$errorContainer = $h.getElement(options, 'elErrorContainer', self.$previewContainer.find('.kv-fileinput-error'));\n            self._validateDisabled();\n            if (!$h.isEmpty(self.msgErrorClass)) {\n                $h.addCss(self.$errorContainer, self.msgErrorClass);\n            }\n            if (!refreshMode) {\n                self.$errorContainer.hide();\n                self.previewInitId = \"preview-\" + $h.uniqId();\n                self._initPreviewCache();\n                self._initPreview(true);\n                self._initPreviewActions();\n                self._setFileDropZoneTitle();\n                if (self.$parent.hasClass('file-loading')) {\n                    self.$container.insertBefore(self.$parent);\n                    self.$parent.remove();\n                }\n            }\n            if ($el.attr('disabled')) {\n                self.disable();\n            }\n            self._initZoom();\n            if (self.hideThumbnailContent) {\n                $h.addCss(self.$preview, 'hide-content');\n            }\n        },\n        _initTemplateDefaults: function () {\n            var self = this, tMain1, tMain2, tPreview, tFileIcon, tClose, tCaption, tBtnDefault, tBtnLink, tBtnBrowse,\n                tModalMain, tModal, tProgress, tSize, tFooter, tActions, tActionDelete, tActionUpload, tActionDownload,\n                tActionZoom, tActionDrag, tIndicator, tTagBef, tTagBef1, tTagBef2, tTagAft, tGeneric, tHtml, tImage,\n                tText, tOffice, tVideo, tAudio, tFlash, tObject, tPdf, tOther, tZoomCache, vDefaultDim;\n            tMain1 = '{preview}\\n' +\n                '<div class=\"kv-upload-progress kv-hidden\"></div><div class=\"clearfix\"></div>\\n' +\n                '<div class=\"input-group {class}\">\\n' +\n                '  {caption}\\n' +\n                '<div class=\"input-group-btn input-group-append\">\\n' +\n                '      {remove}\\n' +\n                '      {cancel}\\n' +\n                '      {upload}\\n' +\n                '      {browse}\\n' +\n                '    </div>\\n' +\n                '</div>';\n            tMain2 = '{preview}\\n<div class=\"kv-upload-progress kv-hidden\"></div>\\n<div class=\"clearfix\"></div>\\n{remove}\\n{cancel}\\n{upload}\\n{browse}\\n';\n            tPreview = '<div class=\"file-preview {class}\">\\n' +\n                '    {close}' +\n                '    <div class=\"{dropClass}\">\\n' +\n                '    <div class=\"file-preview-thumbnails\">\\n' +\n                '    </div>\\n' +\n                '    <div class=\"clearfix\"></div>' +\n                '    <div class=\"file-preview-status text-center text-success\"></div>\\n' +\n                '    <div class=\"kv-fileinput-error\"></div>\\n' +\n                '    </div>\\n' +\n                '</div>';\n            tClose = $h.closeButton('fileinput-remove');\n            tFileIcon = '<i class=\"glyphicon glyphicon-file\"></i>';\n            tCaption = '<div class=\"file-caption form-control {class}\" tabindex=\"500\">\\n' +\n                '  <span class=\"file-caption-icon\"></span>\\n' +\n                '  <input class=\"file-caption-name\" onkeydown=\"return false;\" onpaste=\"return false;\">\\n' +\n                '</div>';\n            //noinspection HtmlUnknownAttribute\n            tBtnDefault = '<button type=\"{type}\" tabindex=\"500\" title=\"{title}\" class=\"{css}\" ' +\n                '{status}>{icon} {label}</button>';\n            //noinspection HtmlUnknownAttribute\n            tBtnLink = '<a href=\"{href}\" tabindex=\"500\" title=\"{title}\" class=\"{css}\" {status}>{icon} {label}</a>';\n            //noinspection HtmlUnknownAttribute\n            tBtnBrowse = '<div tabindex=\"500\" class=\"{css}\" {status}>{icon} {label}</div>';\n            tModalMain = '<div id=\"' + $h.MODAL_ID + '\" class=\"file-zoom-dialog modal fade\" ' +\n                'tabindex=\"-1\" aria-labelledby=\"' + $h.MODAL_ID + 'Label\"></div>';\n            tModal = '<div class=\"modal-dialog modal-lg{rtl}\" role=\"document\">\\n' +\n                '  <div class=\"modal-content\">\\n' +\n                '    <div class=\"modal-header\">\\n' +\n                '      <h5 class=\"modal-title\">{heading}</h5>\\n' +\n                '      <span class=\"kv-zoom-title\"></span>\\n' +\n                '      <div class=\"kv-zoom-actions\">{toggleheader}{fullscreen}{borderless}{close}</div>\\n' +\n                '    </div>\\n' +\n                '    <div class=\"modal-body\">\\n' +\n                '      <div class=\"floating-buttons\"></div>\\n' +\n                '      <div class=\"kv-zoom-body file-zoom-content {zoomFrameClass}\"></div>\\n' + '{prev} {next}\\n' +\n                '    </div>\\n' +\n                '  </div>\\n' +\n                '</div>\\n';\n            tProgress = '<div class=\"progress\">\\n' +\n                '    <div class=\"{class}\" role=\"progressbar\"' +\n                ' aria-valuenow=\"{percent}\" aria-valuemin=\"0\" aria-valuemax=\"100\" style=\"width:{percent}%;\">\\n' +\n                '        {status}\\n' +\n                '     </div>\\n' +\n                '</div>';\n            tSize = ' <samp>({sizeText})</samp>';\n            tFooter = '<div class=\"file-thumbnail-footer\">\\n' +\n                '    <div class=\"file-footer-caption\" title=\"{caption}\">\\n' +\n                '        <div class=\"file-caption-info\">{caption}</div>\\n' +\n                '        <div class=\"file-size-info\">{size}</div>\\n' +\n                '    </div>\\n' +\n                '    {progress}\\n{indicator}\\n{actions}\\n' +\n                '</div>';\n            tActions = '<div class=\"file-actions\">\\n' +\n                '    <div class=\"file-footer-buttons\">\\n' +\n                '        {download} {upload} {delete} {zoom} {other}' +\n                '    </div>\\n' +\n                '</div>\\n' +\n                '{drag}\\n' +\n                '<div class=\"clearfix\"></div>';\n            //noinspection HtmlUnknownAttribute\n            tActionDelete = '<button type=\"button\" class=\"kv-file-remove {removeClass}\" ' +\n                'title=\"{removeTitle}\" {dataUrl}{dataKey}>{removeIcon}</button>\\n';\n            tActionUpload = '<button type=\"button\" class=\"kv-file-upload {uploadClass}\" title=\"{uploadTitle}\">' +\n                '{uploadIcon}</button>';\n            tActionDownload = '<a class=\"kv-file-download {downloadClass}\" title=\"{downloadTitle}\" ' +\n                'href=\"{downloadUrl}\" download=\"{caption}\" target=\"_blank\">{downloadIcon}</a>';\n            tActionZoom = '<button type=\"button\" class=\"kv-file-zoom {zoomClass}\" ' +\n                'title=\"{zoomTitle}\">{zoomIcon}</button>';\n            tActionDrag = '<span class=\"file-drag-handle {dragClass}\" title=\"{dragTitle}\">{dragIcon}</span>';\n            tIndicator = '<div class=\"file-upload-indicator\" title=\"{indicatorTitle}\">{indicator}</div>';\n            tTagBef = '<div class=\"file-preview-frame {frameClass}\" id=\"{previewId}\" data-fileindex=\"{fileindex}\"' +\n                ' data-template=\"{template}\"';\n            tTagBef1 = tTagBef + '><div class=\"kv-file-content\">\\n';\n            tTagBef2 = tTagBef + ' title=\"{caption}\"><div class=\"kv-file-content\">\\n';\n            tTagAft = '</div>{footer}\\n</div>\\n';\n            tGeneric = '{content}\\n';\n            tHtml = '<div class=\"kv-preview-data file-preview-html\" title=\"{caption}\" {style}>{data}</div>\\n';\n            tImage = '<img src=\"{data}\" class=\"file-preview-image kv-preview-data\" title=\"{caption}\" ' +\n                'alt=\"{caption}\" {style}>\\n';\n            tText = '<textarea class=\"kv-preview-data file-preview-text\" title=\"{caption}\" readonly {style}>' +\n                '{data}</textarea>\\n';\n            tOffice = '<iframe class=\"kv-preview-data file-preview-office\" ' +\n                'src=\"https://docs.google.com/gview?url={data}&embedded=true\" {style}></iframe>';\n            tVideo = '<video class=\"kv-preview-data file-preview-video\" controls {style}>\\n' +\n                '<source src=\"{data}\" type=\"{type}\">\\n' + $h.DEFAULT_PREVIEW + '\\n</video>\\n';\n            tAudio = '<audio class=\"kv-preview-data file-preview-audio\" controls {style}>\\n<source src=\"{data}\" ' +\n                'type=\"{type}\">\\n' + $h.DEFAULT_PREVIEW + '\\n</audio>\\n';\n            tFlash = '<embed class=\"kv-preview-data file-preview-flash\" src=\"{data}\" type=\"application/x-shockwave-flash\" {style}>\\n';\n            tPdf = '<embed class=\"kv-preview-data file-preview-pdf\" src=\"{data}\" type=\"application/pdf\" {style}>\\n';\n            tObject = '<object class=\"kv-preview-data file-preview-object file-object {typeCss}\" ' +\n                'data=\"{data}\" type=\"{type}\" {style}>\\n' + '<param name=\"movie\" value=\"{caption}\" />\\n' +\n                $h.OBJECT_PARAMS + ' ' + $h.DEFAULT_PREVIEW + '\\n</object>\\n';\n            tOther = '<div class=\"kv-preview-data file-preview-other-frame\" {style}>\\n' + $h.DEFAULT_PREVIEW + '\\n</div>\\n';\n            tZoomCache = '<div class=\"kv-zoom-cache\" style=\"display:none\">{zoomContent}</div>';\n            vDefaultDim = {width: \"100%\", height: \"100%\", 'min-height': \"480px\"};\n            self.defaults = {\n                layoutTemplates: {\n                    main1: tMain1,\n                    main2: tMain2,\n                    preview: tPreview,\n                    close: tClose,\n                    fileIcon: tFileIcon,\n                    caption: tCaption,\n                    modalMain: tModalMain,\n                    modal: tModal,\n                    progress: tProgress,\n                    size: tSize,\n                    footer: tFooter,\n                    indicator: tIndicator,\n                    actions: tActions,\n                    actionDelete: tActionDelete,\n                    actionUpload: tActionUpload,\n                    actionDownload: tActionDownload,\n                    actionZoom: tActionZoom,\n                    actionDrag: tActionDrag,\n                    btnDefault: tBtnDefault,\n                    btnLink: tBtnLink,\n                    btnBrowse: tBtnBrowse,\n                    zoomCache: tZoomCache\n                },\n                previewMarkupTags: {\n                    tagBefore1: tTagBef1,\n                    tagBefore2: tTagBef2,\n                    tagAfter: tTagAft\n                },\n                previewContentTemplates: {\n                    generic: tGeneric,\n                    html: tHtml,\n                    image: tImage,\n                    text: tText,\n                    office: tOffice,\n                    video: tVideo,\n                    audio: tAudio,\n                    flash: tFlash,\n                    object: tObject,\n                    pdf: tPdf,\n                    other: tOther\n                },\n                allowedPreviewTypes: ['image', 'html', 'text', 'video', 'audio', 'flash', 'pdf', 'object'],\n                previewTemplates: {},\n                previewSettings: {\n                    image: {width: \"auto\", height: \"auto\", 'max-width': \"100%\", 'max-height': \"100%\"},\n                    html: {width: \"213px\", height: \"160px\"},\n                    text: {width: \"213px\", height: \"160px\"},\n                    office: {width: \"213px\", height: \"160px\"},\n                    video: {width: \"213px\", height: \"160px\"},\n                    audio: {width: \"100%\", height: \"30px\"},\n                    flash: {width: \"213px\", height: \"160px\"},\n                    object: {width: \"213px\", height: \"160px\"},\n                    pdf: {width: \"213px\", height: \"160px\"},\n                    other: {width: \"213px\", height: \"160px\"}\n                },\n                previewSettingsSmall: {\n                    image: {width: \"auto\", height: \"auto\", 'max-width': \"100%\", 'max-height': \"100%\"},\n                    html: {width: \"100%\", height: \"160px\"},\n                    text: {width: \"100%\", height: \"160px\"},\n                    office: {width: \"100%\", height: \"160px\"},\n                    video: {width: \"100%\", height: \"auto\"},\n                    audio: {width: \"100%\", height: \"30px\"},\n                    flash: {width: \"100%\", height: \"auto\"},\n                    object: {width: \"100%\", height: \"auto\"},\n                    pdf: {width: \"100%\", height: \"160px\"},\n                    other: {width: \"100%\", height: \"160px\"}\n                },\n                previewZoomSettings: {\n                    image: {width: \"auto\", height: \"auto\", 'max-width': \"100%\", 'max-height': \"100%\"},\n                    html: vDefaultDim,\n                    text: vDefaultDim,\n                    office: {width: \"100%\", height: \"100%\", 'max-width': \"100%\", 'min-height': \"480px\"},\n                    video: {width: \"auto\", height: \"100%\", 'max-width': \"100%\"},\n                    audio: {width: \"100%\", height: \"30px\"},\n                    flash: {width: \"auto\", height: \"480px\"},\n                    object: {width: \"auto\", height: \"100%\", 'max-width': \"100%\", 'min-height': \"480px\"},\n                    pdf: vDefaultDim,\n                    other: {width: \"auto\", height: \"100%\", 'min-height': \"480px\"}\n                },\n                fileTypeSettings: {\n                    image: function (vType, vName) {\n                        return ($h.compare(vType, 'image.*') && !$h.compare(vType, /(tiff?|wmf)$/i) ||\n                            $h.compare(vName, /\\.(gif|png|jpe?g)$/i));\n                    },\n                    html: function (vType, vName) {\n                        return $h.compare(vType, 'text/html') || $h.compare(vName, /\\.(htm|html)$/i);\n                    },\n                    office: function (vType, vName) {\n                        return $h.compare(vType, /(word|excel|powerpoint|office|iwork-pages|tiff?)$/i) ||\n                            $h.compare(vName, /\\.(rtf|docx?|xlsx?|pptx?|pps|potx?|ods|odt|pages|ai|dxf|ttf|tiff?|wmf|e?ps)$/i);\n                    },\n                    text: function (vType, vName) {\n                        return $h.compare(vType, 'text.*') || $h.compare(vName, /\\.(xml|javascript)$/i) ||\n                            $h.compare(vName, /\\.(txt|md|csv|nfo|ini|json|php|js|css)$/i);\n                    },\n                    video: function (vType, vName) {\n                        return $h.compare(vType, 'video.*') && ($h.compare(vType, /(ogg|mp4|mp?g|mov|webm|3gp)$/i) ||\n                            $h.compare(vName, /\\.(og?|mp4|webm|mp?g|mov|3gp)$/i));\n                    },\n                    audio: function (vType, vName) {\n                        return $h.compare(vType, 'audio.*') && ($h.compare(vName, /(ogg|mp3|mp?g|wav)$/i) ||\n                            $h.compare(vName, /\\.(og?|mp3|mp?g|wav)$/i));\n                    },\n                    flash: function (vType, vName) {\n                        return $h.compare(vType, 'application/x-shockwave-flash', true) || $h.compare(vName, /\\.(swf)$/i);\n                    },\n                    pdf: function (vType, vName) {\n                        return $h.compare(vType, 'application/pdf', true) || $h.compare(vName, /\\.(pdf)$/i);\n                    },\n                    object: function () {\n                        return true;\n                    },\n                    other: function () {\n                        return true;\n                    }\n                },\n                fileActionSettings: {\n                    showRemove: true,\n                    showUpload: true,\n                    showDownload: true,\n                    showZoom: true,\n                    showDrag: true,\n                    removeIcon: '<i class=\"glyphicon glyphicon-trash\"></i>',\n                    removeClass: 'btn btn-kv btn-default btn-outline-secondary',\n                    removeErrorClass: 'btn btn-kv btn-danger',\n                    removeTitle: 'Remove file',\n                    uploadIcon: '<i class=\"glyphicon glyphicon-upload\"></i>',\n                    uploadClass: 'btn btn-kv btn-default btn-outline-secondary',\n                    uploadTitle: 'Upload file',\n                    uploadRetryIcon: '<i class=\"glyphicon glyphicon-repeat\"></i>',\n                    uploadRetryTitle: 'Retry upload',\n                    downloadIcon: '<i class=\"glyphicon glyphicon-download\"></i>',\n                    downloadClass: 'btn btn-kv btn-default btn-outline-secondary',\n                    downloadTitle: 'Download file',\n                    zoomIcon: '<i class=\"glyphicon glyphicon-zoom-in\"></i>',\n                    zoomClass: 'btn btn-kv btn-default btn-outline-secondary',\n                    zoomTitle: 'View Details',\n                    dragIcon: '<i class=\"glyphicon glyphicon-move\"></i>',\n                    dragClass: 'text-info',\n                    dragTitle: 'Move / Rearrange',\n                    dragSettings: {},\n                    indicatorNew: '<i class=\"glyphicon glyphicon-plus-sign text-warning\"></i>',\n                    indicatorSuccess: '<i class=\"glyphicon glyphicon-ok-sign text-success\"></i>',\n                    indicatorError: '<i class=\"glyphicon glyphicon-exclamation-sign text-danger\"></i>',\n                    indicatorLoading: '<i class=\"glyphicon glyphicon-hourglass text-muted\"></i>',\n                    indicatorNewTitle: 'Not uploaded yet',\n                    indicatorSuccessTitle: 'Uploaded',\n                    indicatorErrorTitle: 'Upload Error',\n                    indicatorLoadingTitle: 'Uploading ...'\n                }\n            };\n            $.each(self.defaults, function (key, setting) {\n                if (key === 'allowedPreviewTypes') {\n                    if (self.allowedPreviewTypes === undefined) {\n                        self.allowedPreviewTypes = setting;\n                    }\n                    return;\n                }\n                self[key] = $.extend(true, {}, setting, self[key]);\n            });\n            self._initPreviewTemplates();\n        },\n        _initPreviewTemplates: function () {\n            var self = this, cfg = self.defaults, tags = self.previewMarkupTags, tagBef, tagAft = tags.tagAfter;\n            $.each(cfg.previewContentTemplates, function (key, value) {\n                if ($h.isEmpty(self.previewTemplates[key])) {\n                    tagBef = tags.tagBefore2;\n                    if (key === 'generic' || key === 'image' || key === 'html' || key === 'text') {\n                        tagBef = tags.tagBefore1;\n                    }\n                    self.previewTemplates[key] = tagBef + value + tagAft;\n                }\n            });\n        },\n        _initPreviewCache: function () {\n            var self = this;\n            self.previewCache = {\n                data: {},\n                init: function () {\n                    var content = self.initialPreview;\n                    if (content.length > 0 && !$h.isArray(content)) {\n                        content = content.split(self.initialPreviewDelimiter);\n                    }\n                    self.previewCache.data = {\n                        content: content,\n                        config: self.initialPreviewConfig,\n                        tags: self.initialPreviewThumbTags\n                    };\n                },\n                count: function () {\n                    return !!self.previewCache.data && !!self.previewCache.data.content ?\n                        self.previewCache.data.content.length : 0;\n                },\n                get: function (i, isDisabled) {\n                    var ind = 'init_' + i, data = self.previewCache.data, config = data.config[i],\n                        content = data.content[i], previewId = self.previewInitId + '-' + ind, out, $tmp, cat, ftr,\n                        fname, ftype, frameClass, asData = $h.ifSet('previewAsData', config, self.initialPreviewAsData),\n                        parseTemplate = function (cat, dat, fn, ft, id, ftr, ind, fc, t) {\n                            fc = ' file-preview-initial ' + $h.SORT_CSS + (fc ? ' ' + fc : '');\n                            return self._generatePreviewTemplate(cat, dat, fn, ft, id, false, null, fc, ftr, ind, t);\n                        };\n                    if (!content) {\n                        return '';\n                    }\n                    isDisabled = isDisabled === undefined ? true : isDisabled;\n                    cat = $h.ifSet('type', config, self.initialPreviewFileType || 'generic');\n                    fname = $h.ifSet('filename', config, $h.ifSet('caption', config));\n                    ftype = $h.ifSet('filetype', config, cat);\n                    ftr = self.previewCache.footer(i, isDisabled, (config && config.size || null));\n                    frameClass = $h.ifSet('frameClass', config);\n                    if (asData) {\n                        out = parseTemplate(cat, content, fname, ftype, previewId, ftr, ind, frameClass);\n                    } else {\n                        out = parseTemplate('generic', content, fname, ftype, previewId, ftr, ind, frameClass, cat)\n                            .setTokens({'content': data.content[i]});\n                    }\n                    if (data.tags.length && data.tags[i]) {\n                        out = $h.replaceTags(out, data.tags[i]);\n                    }\n                    /** @namespace config.frameAttr */\n                    if (!$h.isEmpty(config) && !$h.isEmpty(config.frameAttr)) {\n                        $tmp = $(document.createElement('div')).html(out);\n                        $tmp.find('.file-preview-initial').attr(config.frameAttr);\n                        out = $tmp.html();\n                        $tmp.remove();\n                    }\n                    return out;\n                },\n                add: function (content, config, tags, append) {\n                    var data = self.previewCache.data, index;\n                    if (!$h.isArray(content)) {\n                        content = content.split(self.initialPreviewDelimiter);\n                    }\n                    if (append) {\n                        index = data.content.push(content) - 1;\n                        data.config[index] = config;\n                        data.tags[index] = tags;\n                    } else {\n                        index = content.length - 1;\n                        data.content = content;\n                        data.config = config;\n                        data.tags = tags;\n                    }\n                    self.previewCache.data = data;\n                    return index;\n                },\n                set: function (content, config, tags, append) {\n                    var data = self.previewCache.data, i, chk;\n                    if (!content || !content.length) {\n                        return;\n                    }\n                    if (!$h.isArray(content)) {\n                        content = content.split(self.initialPreviewDelimiter);\n                    }\n                    chk = content.filter(function (n) {\n                        return n !== null;\n                    });\n                    if (!chk.length) {\n                        return;\n                    }\n                    if (data.content === undefined) {\n                        data.content = [];\n                    }\n                    if (data.config === undefined) {\n                        data.config = [];\n                    }\n                    if (data.tags === undefined) {\n                        data.tags = [];\n                    }\n                    if (append) {\n                        for (i = 0; i < content.length; i++) {\n                            if (content[i]) {\n                                data.content.push(content[i]);\n                            }\n                        }\n                        for (i = 0; i < config.length; i++) {\n                            if (config[i]) {\n                                data.config.push(config[i]);\n                            }\n                        }\n                        for (i = 0; i < tags.length; i++) {\n                            if (tags[i]) {\n                                data.tags.push(tags[i]);\n                            }\n                        }\n                    } else {\n                        data.content = content;\n                        data.config = config;\n                        data.tags = tags;\n                    }\n                    self.previewCache.data = data;\n                },\n                unset: function (index) {\n                    var chk = self.previewCache.count();\n                    if (!chk) {\n                        return;\n                    }\n                    if (chk === 1) {\n                        self.previewCache.data.content = [];\n                        self.previewCache.data.config = [];\n                        self.previewCache.data.tags = [];\n                        self.initialPreview = [];\n                        self.initialPreviewConfig = [];\n                        self.initialPreviewThumbTags = [];\n                        return;\n                    }\n                    self.previewCache.data.content = $h.spliceArray(self.previewCache.data.content, index);\n                    self.previewCache.data.config = $h.spliceArray(self.previewCache.data.config, index);\n                    self.previewCache.data.tags = $h.spliceArray(self.previewCache.data.tags, index);\n                },\n                out: function () {\n                    var html = '', caption, len = self.previewCache.count(), i;\n                    if (len === 0) {\n                        return {content: '', caption: ''};\n                    }\n                    for (i = 0; i < len; i++) {\n                        html += self.previewCache.get(i);\n                    }\n                    caption = self._getMsgSelected(len);\n                    return {content: html, caption: caption};\n                },\n                footer: function (i, isDisabled, size) {\n                    var data = self.previewCache.data || {};\n                    if ($h.isEmpty(data.content)) {\n                        return '';\n                    }\n                    if ($h.isEmpty(data.config) || $h.isEmpty(data.config[i])) {\n                        data.config[i] = {};\n                    }\n                    isDisabled = isDisabled === undefined ? true : isDisabled;\n                    var config = data.config[i], caption = $h.ifSet('caption', config), a,\n                        width = $h.ifSet('width', config, 'auto'), url = $h.ifSet('url', config, false),\n                        key = $h.ifSet('key', config, null), fs = self.fileActionSettings,\n                        initPreviewShowDel = self.initialPreviewShowDelete || false,\n                        dUrl = config.downloadUrl || self.initialPreviewDownloadUrl || '',\n                        dFil = config.filename || config.caption || '',\n                        initPreviewShowDwl = !!(dUrl),\n                        sDel = $h.ifSet('showDelete', config, $h.ifSet('showDelete', fs, initPreviewShowDel)),\n                        sDwl = $h.ifSet('showDownload', config, $h.ifSet('showDownload', fs, initPreviewShowDwl)),\n                        sZm = $h.ifSet('showZoom', config, $h.ifSet('showZoom', fs, true)),\n                        sDrg = $h.ifSet('showDrag', config, $h.ifSet('showDrag', fs, true)),\n                        dis = (url === false) && isDisabled;\n                    sDwl = sDwl && config.downloadUrl !== false && !!dUrl;\n                    a = self._renderFileActions(false, sDwl, sDel, sZm, sDrg, dis, url, key, true, dUrl, dFil);\n                    return self._getLayoutTemplate('footer').setTokens({\n                        'progress': self._renderThumbProgress(),\n                        'actions': a,\n                        'caption': caption,\n                        'size': self._getSize(size),\n                        'width': width,\n                        'indicator': ''\n                    });\n                }\n            };\n            self.previewCache.init();\n        },\n        _handler: function ($el, event, callback) {\n            var self = this, ns = self.namespace, ev = event.split(' ').join(ns + ' ') + ns;\n            if (!$el || !$el.length) {\n                return;\n            }\n            $el.off(ev).on(ev, callback);\n        },\n        _log: function (msg) {\n            var self = this, id = self.$element.attr('id');\n            if (id) {\n                msg = '\"' + id + '\": ' + msg;\n            }\n            if (typeof window.console.log !== \"undefined\") {\n                window.console.log(msg);\n            } else {\n                window.alert(msg);\n            }\n        },\n        _validate: function () {\n            var self = this, status = self.$element.attr('type') === 'file';\n            if (!status) {\n                self._log('The input \"type\" must be set to \"file\" for initializing the \"bootstrap-fileinput\" plugin.');\n            }\n            return status;\n        },\n        _errorsExist: function () {\n            var self = this, $err, $errList = self.$errorContainer.find('li');\n            if ($errList.length) {\n                return true;\n            }\n            $err = $(document.createElement('div')).html(self.$errorContainer.html());\n            $err.find('.kv-error-close').remove();\n            $err.find('ul').remove();\n            return !!$.trim($err.text()).length;\n        },\n        _errorHandler: function (evt, caption) {\n            var self = this, err = evt.target.error, showError = function (msg) {\n                self._showError(msg.replace('{name}', caption));\n            };\n            /** @namespace err.NOT_FOUND_ERR */\n            /** @namespace err.SECURITY_ERR */\n            /** @namespace err.NOT_READABLE_ERR */\n            if (err.code === err.NOT_FOUND_ERR) {\n                showError(self.msgFileNotFound);\n            } else if (err.code === err.SECURITY_ERR) {\n                showError(self.msgFileSecured);\n            } else if (err.code === err.NOT_READABLE_ERR) {\n                showError(self.msgFileNotReadable);\n            } else if (err.code === err.ABORT_ERR) {\n                showError(self.msgFilePreviewAborted);\n            } else {\n                showError(self.msgFilePreviewError);\n            }\n        },\n        _addError: function (msg) {\n            var self = this, $error = self.$errorContainer;\n            if (msg && $error.length) {\n                $error.html(self.errorCloseButton + msg);\n                self._handler($error.find('.kv-error-close'), 'click', function () {\n                    setTimeout(function() {\n                        if (self.showPreview && !self.getFrames().length) {\n                            self.clear();\n                        }\n                        $error.fadeOut('slow');                    \n                    }, 10);\n                });\n            }\n        },\n        _setValidationError: function (css) {\n            var self = this;\n            css = (css ? css + ' ' : '') + 'has-error';\n            self.$container.removeClass(css).addClass('has-error');\n            $h.addCss(self.$captionContainer, 'is-invalid');\n        },\n        _resetErrors: function (fade) {\n            var self = this, $error = self.$errorContainer;\n            self.isError = false;\n            self.$container.removeClass('has-error');\n            self.$captionContainer.removeClass('is-invalid');\n            $error.html('');\n            if (fade) {\n                $error.fadeOut('slow');\n            } else {\n                $error.hide();\n            }\n        },\n        _showFolderError: function (folders) {\n            var self = this, $error = self.$errorContainer, msg;\n            if (!folders) {\n                return;\n            }\n            msg = self.msgFoldersNotAllowed.replace('{n}', folders);\n            self._addError(msg);\n            self._setValidationError();\n            $error.fadeIn(800);\n            self._raise('filefoldererror', [folders, msg]);\n        },\n        _showUploadError: function (msg, params, event) {\n            var self = this, $error = self.$errorContainer, ev = event || 'fileuploaderror', e = params && params.id ?\n                '<li data-file-id=\"' + params.id + '\">' + msg + '</li>' : '<li>' + msg + '</li>';\n            if ($error.find('ul').length === 0) {\n                self._addError('<ul>' + e + '</ul>');\n            } else {\n                $error.find('ul').append(e);\n            }\n            $error.fadeIn(800);\n            self._raise(ev, [params, msg]);\n            self._setValidationError('file-input-new');\n            return true;\n        },\n        _showError: function (msg, params, event) {\n            var self = this, $error = self.$errorContainer, ev = event || 'fileerror';\n            params = params || {};\n            params.reader = self.reader;\n            self._addError(msg);\n            $error.fadeIn(800);\n            self._raise(ev, [params, msg]);\n            if (!self.isAjaxUpload) {\n                self._clearFileInput();\n            }\n            self._setValidationError('file-input-new');\n            self.$btnUpload.attr('disabled', true);\n            return true;\n        },\n        _noFilesError: function (params) {\n            var self = this, label = self.minFileCount > 1 ? self.filePlural : self.fileSingle,\n                msg = self.msgFilesTooLess.replace('{n}', self.minFileCount).replace('{files}', label),\n                $error = self.$errorContainer;\n            self._addError(msg);\n            self.isError = true;\n            self._updateFileDetails(0);\n            $error.fadeIn(800);\n            self._raise('fileerror', [params, msg]);\n            self._clearFileInput();\n            self._setValidationError();\n        },\n        _parseError: function (operation, jqXHR, errorThrown, fileName) {\n            /** @namespace jqXHR.responseJSON */\n            var self = this, errMsg = $.trim(errorThrown + ''), textPre,\n                text = jqXHR.responseJSON !== undefined && jqXHR.responseJSON.error !== undefined ?\n                    jqXHR.responseJSON.error : jqXHR.responseText;\n            if (self.cancelling && self.msgUploadAborted) {\n                errMsg = self.msgUploadAborted;\n            }\n            if (self.showAjaxErrorDetails && text) {\n                text = $.trim(text.replace(/\\n\\s*\\n/g, '\\n'));\n                textPre = text.length ? '<pre>' + text + '</pre>' : '';\n                errMsg += errMsg ? textPre : text;\n            }\n            if (!errMsg) {\n                errMsg = self.msgAjaxError.replace('{operation}', operation);\n            }\n            self.cancelling = false;\n            return fileName ? '<b>' + fileName + ': </b>' + errMsg : errMsg;\n        },\n        _parseFileType: function (type, name) {\n            var self = this, isValid, vType, cat, i, types = self.allowedPreviewTypes || [];\n            if (type === 'application/text-plain') {\n                return 'text';\n            }\n            for (i = 0; i < types.length; i++) {\n                cat = types[i];\n                isValid = self.fileTypeSettings[cat];\n                vType = isValid(type, name) ? cat : '';\n                if (!$h.isEmpty(vType)) {\n                    return vType;\n                }\n            }\n            return 'other';\n        },\n        _getPreviewIcon: function (fname) {\n            var self = this, ext, out = null;\n            if (fname && fname.indexOf('.') > -1) {\n                ext = fname.split('.').pop();\n                if (self.previewFileIconSettings) {\n                    out = self.previewFileIconSettings[ext] || self.previewFileIconSettings[ext.toLowerCase()] || null;\n                }\n                if (self.previewFileExtSettings) {\n                    $.each(self.previewFileExtSettings, function (key, func) {\n                        if (self.previewFileIconSettings[key] && func(ext)) {\n                            out = self.previewFileIconSettings[key];\n                            //noinspection UnnecessaryReturnStatementJS\n                            return;\n                        }\n                    });\n                }\n            }\n            return out;\n        },\n        _parseFilePreviewIcon: function (content, fname) {\n            var self = this, icn = self._getPreviewIcon(fname) || self.previewFileIcon, out = content;\n            if (out.indexOf('{previewFileIcon}') > -1) {\n                out = out.setTokens({'previewFileIconClass': self.previewFileIconClass, 'previewFileIcon': icn});\n            }\n            return out;\n        },\n        _raise: function (event, params) {\n            var self = this, e = $.Event(event);\n            if (params !== undefined) {\n                self.$element.trigger(e, params);\n            } else {\n                self.$element.trigger(e);\n            }\n            if (e.isDefaultPrevented() || e.result === false) {\n                return false;\n            }\n            switch (event) {\n                // ignore these events\n                case 'filebatchuploadcomplete':\n                case 'filebatchuploadsuccess':\n                case 'fileuploaded':\n                case 'fileclear':\n                case 'filecleared':\n                case 'filereset':\n                case 'fileerror':\n                case 'filefoldererror':\n                case 'fileuploaderror':\n                case 'filebatchuploaderror':\n                case 'filedeleteerror':\n                case 'filecustomerror':\n                case 'filesuccessremove':\n                    break;\n                // receive data response via `filecustomerror` event`\n                default:\n                    if (!self.ajaxAborted) {\n                        self.ajaxAborted = e.result;\n                    }\n                    break;\n            }\n            return true;\n        },\n        _listenFullScreen: function (isFullScreen) {\n            var self = this, $modal = self.$modal, $btnFull, $btnBord;\n            if (!$modal || !$modal.length) {\n                return;\n            }\n            $btnFull = $modal && $modal.find('.btn-fullscreen');\n            $btnBord = $modal && $modal.find('.btn-borderless');\n            if (!$btnFull.length || !$btnBord.length) {\n                return;\n            }\n            $btnFull.removeClass('active').attr('aria-pressed', 'false');\n            $btnBord.removeClass('active').attr('aria-pressed', 'false');\n            if (isFullScreen) {\n                $btnFull.addClass('active').attr('aria-pressed', 'true');\n            } else {\n                $btnBord.addClass('active').attr('aria-pressed', 'true');\n            }\n            if ($modal.hasClass('file-zoom-fullscreen')) {\n                self._maximizeZoomDialog();\n            } else {\n                if (isFullScreen) {\n                    self._maximizeZoomDialog();\n                } else {\n                    $btnBord.removeClass('active').attr('aria-pressed', 'false');\n                }\n            }\n        },\n        _listen: function () {\n            var self = this, $el = self.$element, $form = self.$form, $cont = self.$container, fullScreenEvents;\n            self._handler($el, 'change', $.proxy(self._change, self));\n            if (self.showBrowse) {\n                self._handler(self.$btnFile, 'click', $.proxy(self._browse, self));\n            }\n            self._handler($cont.find('.fileinput-remove:not([disabled])'), 'click', $.proxy(self.clear, self));\n            self._handler($cont.find('.fileinput-cancel'), 'click', $.proxy(self.cancel, self));\n            self._initDragDrop();\n            self._handler($form, 'reset', $.proxy(self.clear, self));\n            if (!self.isAjaxUpload) {\n                self._handler($form, 'submit', $.proxy(self._submitForm, self));\n            }\n            self._handler(self.$container.find('.fileinput-upload'), 'click', $.proxy(self._uploadClick, self));\n            self._handler($(window), 'resize', function () {\n                self._listenFullScreen(screen.width === window.innerWidth && screen.height === window.innerHeight);\n            });\n            fullScreenEvents = 'webkitfullscreenchange mozfullscreenchange fullscreenchange MSFullscreenChange';\n            self._handler($(document), fullScreenEvents, function () {\n                self._listenFullScreen($h.checkFullScreen());\n            });\n            self._autoFitContent();\n            self._initClickable();\n        },\n        _autoFitContent: function () {\n            var width = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth,\n                self = this, config = width < 400 ? (self.previewSettingsSmall || self.defaults.previewSettingsSmall) :\n                (self.previewSettings || self.defaults.previewSettings), sel;\n            $.each(config, function (cat, settings) {\n                sel = '.file-preview-frame .file-preview-' + cat;\n                self.$preview.find(sel + '.kv-preview-data,' + sel + ' .kv-preview-data').css(settings);\n            });\n        },\n        _initClickable: function () {\n            var self = this, $zone;\n            if (!self.isClickable) {\n                return;\n            }\n            $zone = self.isAjaxUpload ? self.$dropZone : self.$preview.find('.file-default-preview');\n            $h.addCss($zone, 'clickable');\n            $zone.attr('tabindex', -1);\n            self._handler($zone, 'click', function (e) {\n                var $tar = $(e.target);\n                if (!$zone.find('.kv-fileinput-error:visible').length && \n                    (!$tar.parents('.file-preview-thumbnails').length || $tar.parents('.file-default-preview').length)) {\n                    self.$element.trigger('click');\n                    $zone.blur();\n                }\n            });\n        },\n        _initDragDrop: function () {\n            var self = this, $zone = self.$dropZone;\n            if (self.isAjaxUpload && self.dropZoneEnabled && self.showPreview) {\n                self._handler($zone, 'dragenter dragover', $.proxy(self._zoneDragEnter, self));\n                self._handler($zone, 'dragleave', $.proxy(self._zoneDragLeave, self));\n                self._handler($zone, 'drop', $.proxy(self._zoneDrop, self));\n                self._handler($(document), 'dragenter dragover drop', self._zoneDragDropInit);\n            }\n        },\n        _zoneDragDropInit: function (e) {\n            e.stopPropagation();\n            e.preventDefault();\n        },\n        _zoneDragEnter: function (e) {\n            var self = this, hasFiles = $.inArray('Files', e.originalEvent.dataTransfer.types) > -1;\n            self._zoneDragDropInit(e);\n            if (self.isDisabled || !hasFiles) {\n                e.originalEvent.dataTransfer.effectAllowed = 'none';\n                e.originalEvent.dataTransfer.dropEffect = 'none';\n                return;\n            }\n            $h.addCss(self.$dropZone, 'file-highlighted');\n        },\n        _zoneDragLeave: function (e) {\n            var self = this;\n            self._zoneDragDropInit(e);\n            if (self.isDisabled) {\n                return;\n            }\n            self.$dropZone.removeClass('file-highlighted');\n        },\n        _zoneDrop: function (e) {\n            var self = this;\n            e.preventDefault();\n            /** @namespace e.originalEvent.dataTransfer */\n            if (self.isDisabled || $h.isEmpty(e.originalEvent.dataTransfer.files)) {\n                return;\n            }\n            self._change(e, 'dragdrop');\n            self.$dropZone.removeClass('file-highlighted');\n        },\n        _uploadClick: function (e) {\n            var self = this, $btn = self.$container.find('.fileinput-upload'), $form,\n                isEnabled = !$btn.hasClass('disabled') && $h.isEmpty($btn.attr('disabled'));\n            if (e && e.isDefaultPrevented()) {\n                return;\n            }\n            if (!self.isAjaxUpload) {\n                if (isEnabled && $btn.attr('type') !== 'submit') {\n                    $form = $btn.closest('form');\n                    // downgrade to normal form submit if possible\n                    if ($form.length) {\n                        $form.trigger('submit');\n                    }\n                    e.preventDefault();\n                }\n                return;\n            }\n            e.preventDefault();\n            if (isEnabled) {\n                self.upload();\n            }\n        },\n        _submitForm: function () {\n            var self = this;\n            return self._isFileSelectionValid() && !self._abort({});\n        },\n        _clearPreview: function () {\n            var self = this, $p = self.$preview,\n                $thumbs = self.showUploadedThumbs ? self.getFrames(':not(.file-preview-success)') : self.getFrames();\n            $thumbs.each(function () {\n                var $thumb = $(this);\n                $thumb.remove();\n                $h.cleanZoomCache($p.find('#zoom-' + $thumb.attr('id')));\n            });\n            if (!self.getFrames().length || !self.showPreview) {\n                self._resetUpload();\n            }\n            self._validateDefaultPreview();\n        },\n        _initSortable: function () {\n            var self = this, $el = self.$preview, settings, selector = '.' + $h.SORT_CSS;\n            if (!window.KvSortable || $el.find(selector).length === 0) {\n                return;\n            }\n            //noinspection JSUnusedGlobalSymbols\n            settings = {\n                handle: '.drag-handle-init',\n                dataIdAttr: 'data-preview-id',\n                scroll: false,\n                draggable: selector,\n                onSort: function (e) {\n                    var oldIndex = e.oldIndex, newIndex = e.newIndex, $frame, $dragEl, i = 0;\n                    self.initialPreview = $h.moveArray(self.initialPreview, oldIndex, newIndex);\n                    self.initialPreviewConfig = $h.moveArray(self.initialPreviewConfig, oldIndex, newIndex);\n                    self.previewCache.init();\n                    self.getFrames('.file-preview-initial').each(function() {\n                        $(this).attr('data-fileindex', 'init_' + i);\n                        i++;\n                    });\n                    self._raise('filesorted', {\n                        previewId: $(e.item).attr('id'),\n                        'oldIndex': oldIndex,\n                        'newIndex': newIndex,\n                        stack: self.initialPreviewConfig\n                    });\n                }\n            };\n            if ($el.data('kvsortable')) {\n                $el.kvsortable('destroy');\n            }\n            $.extend(true, settings, self.fileActionSettings.dragSettings);\n            $el.kvsortable(settings);\n        },\n        _setPreviewContent: function (content) {\n            var self = this;\n            self.$preview.html(content);\n            self._autoFitContent();\n        },\n        _initPreview: function (isInit) {\n            var self = this, cap = self.initialCaption || '', out;\n            if (!self.previewCache.count()) {\n                self._clearPreview();\n                if (isInit) {\n                    self._setCaption(cap);\n                } else {\n                    self._initCaption();\n                }\n                return;\n            }\n            out = self.previewCache.out();\n            cap = isInit && self.initialCaption ? self.initialCaption : out.caption;\n            self._setPreviewContent(out.content);\n            self._setInitThumbAttr();\n            self._setCaption(cap);\n            self._initSortable();\n            if (!$h.isEmpty(out.content)) {\n                self.$container.removeClass('file-input-new');\n            }\n        },\n        _getZoomButton: function (type) {\n            var self = this, label = self.previewZoomButtonIcons[type], css = self.previewZoomButtonClasses[type],\n                title = ' title=\"' + (self.previewZoomButtonTitles[type] || '') + '\" ',\n                params = title + (type === 'close' ? ' data-dismiss=\"modal\" aria-hidden=\"true\"' : '');\n            if (type === 'fullscreen' || type === 'borderless' || type === 'toggleheader') {\n                params += ' data-toggle=\"button\" aria-pressed=\"false\" autocomplete=\"off\"';\n            }\n            return '<button type=\"button\" class=\"' + css + ' btn-' + type + '\"' + params + '>' + label + '</button>';\n        },\n        _getModalContent: function () {\n            var self = this;\n            return self._getLayoutTemplate('modal').setTokens({\n                'rtl': self.rtl ? ' kv-rtl' : '',\n                'zoomFrameClass': self.frameClass,\n                'heading': self.msgZoomModalHeading,\n                'prev': self._getZoomButton('prev'),\n                'next': self._getZoomButton('next'),\n                'toggleheader': self._getZoomButton('toggleheader'),\n                'fullscreen': self._getZoomButton('fullscreen'),\n                'borderless': self._getZoomButton('borderless'),\n                'close': self._getZoomButton('close')\n            });\n        },\n        _listenModalEvent: function (event) {\n            var self = this, $modal = self.$modal, getParams = function (e) {\n                return {\n                    sourceEvent: e,\n                    previewId: $modal.data('previewId'),\n                    modal: $modal\n                };\n            };\n            $modal.on(event + '.bs.modal', function (e) {\n                var $btnFull = $modal.find('.btn-fullscreen'), $btnBord = $modal.find('.btn-borderless');\n                self._raise('filezoom' + event, getParams(e));\n                if (event === 'shown') {\n                    $btnBord.removeClass('active').attr('aria-pressed', 'false');\n                    $btnFull.removeClass('active').attr('aria-pressed', 'false');\n                    if ($modal.hasClass('file-zoom-fullscreen')) {\n                        self._maximizeZoomDialog();\n                        if ($h.checkFullScreen()) {\n                            $btnFull.addClass('active').attr('aria-pressed', 'true');\n                        } else {\n                            $btnBord.addClass('active').attr('aria-pressed', 'true');\n                        }\n                    }\n                }\n            });\n        },\n        _initZoom: function () {\n            var self = this, $dialog, modalMain = self._getLayoutTemplate('modalMain'), modalId = '#' + $h.MODAL_ID;\n            if (!self.showPreview) {\n                return;\n            }\n            self.$modal = $(modalId);\n            if (!self.$modal || !self.$modal.length) {\n                $dialog = $(document.createElement('div')).html(modalMain).insertAfter(self.$container);\n                self.$modal = $(modalId).insertBefore($dialog);\n                $dialog.remove();\n            }\n            $h.initModal(self.$modal);\n            self.$modal.html(self._getModalContent());\n            $.each($h.MODAL_EVENTS, function (key, event) {\n                self._listenModalEvent(event);\n            });\n        },\n        _initZoomButtons: function () {\n            var self = this, previewId = self.$modal.data('previewId') || '', $first, $last,\n                thumbs = self.getFrames().toArray(), len = thumbs.length, $prev = self.$modal.find('.btn-prev'),\n                $next = self.$modal.find('.btn-next');\n            if (thumbs.length < 2) {\n                $prev.hide();\n                $next.hide();\n                return;\n            } else {\n                $prev.show();\n                $next.show();\n            }\n            if (!len) {\n                return;\n            }\n            $first = $(thumbs[0]);\n            $last = $(thumbs[len - 1]);\n            $prev.removeAttr('disabled');\n            $next.removeAttr('disabled');\n            if ($first.length && $first.attr('id') === previewId) {\n                $prev.attr('disabled', true);\n            }\n            if ($last.length && $last.attr('id') === previewId) {\n                $next.attr('disabled', true);\n            }\n        },\n        _maximizeZoomDialog: function () {\n            var self = this, $modal = self.$modal, $head = $modal.find('.modal-header:visible'),\n                $foot = $modal.find('.modal-footer:visible'), $body = $modal.find('.modal-body'),\n                h = $(window).height(), diff = 0;\n            $modal.addClass('file-zoom-fullscreen');\n            if ($head && $head.length) {\n                h -= $head.outerHeight(true);\n            }\n            if ($foot && $foot.length) {\n                h -= $foot.outerHeight(true);\n            }\n            if ($body && $body.length) {\n                diff = $body.outerHeight(true) - $body.height();\n                h -= diff;\n            }\n            $modal.find('.kv-zoom-body').height(h);\n        },\n        _resizeZoomDialog: function (fullScreen) {\n            var self = this, $modal = self.$modal, $btnFull = $modal.find('.btn-fullscreen'),\n                $btnBord = $modal.find('.btn-borderless');\n            if ($modal.hasClass('file-zoom-fullscreen')) {\n                $h.toggleFullScreen(false);\n                if (!fullScreen) {\n                    if (!$btnFull.hasClass('active')) {\n                        $modal.removeClass('file-zoom-fullscreen');\n                        self.$modal.find('.kv-zoom-body').css('height', self.zoomModalHeight);\n                    } else {\n                        $btnFull.removeClass('active').attr('aria-pressed', 'false');\n                    }\n                } else {\n                    if (!$btnFull.hasClass('active')) {\n                        $modal.removeClass('file-zoom-fullscreen');\n                        self._resizeZoomDialog(true);\n                        if ($btnBord.hasClass('active')) {\n                            $btnBord.removeClass('active').attr('aria-pressed', 'false');\n                        }\n                    }\n                }\n            } else {\n                if (!fullScreen) {\n                    self._maximizeZoomDialog();\n                    return;\n                }\n                $h.toggleFullScreen(true);\n            }\n            $modal.focus();\n        },\n        _setZoomContent: function ($frame, animate) {\n            var self = this, $content, tmplt, body, title, $body, $dataEl, config, pid = $frame.attr('id'),\n                $modal = self.$modal, $prev = $modal.find('.btn-prev'), $next = $modal.find('.btn-next'), $tmp,\n                $btnFull = $modal.find('.btn-fullscreen'), $btnBord = $modal.find('.btn-borderless'), cap, size,\n                $btnTogh = $modal.find('.btn-toggleheader'), $zoomPreview = self.$preview.find('#zoom-' + pid);\n            tmplt = $zoomPreview.attr('data-template') || 'generic';\n            $content = $zoomPreview.find('.kv-file-content');\n            body = $content.length ? $content.html() : '';\n            cap = $frame.data('caption') || '';\n            size = $frame.data('size') || '';\n            title = cap + ' ' + size;\n            $modal.find('.kv-zoom-title').attr('title', $('<div/>').html(title).text()).html(title);\n            $body = $modal.find('.kv-zoom-body');\n            $modal.removeClass('kv-single-content');\n            if (animate) {\n                $tmp = $body.addClass('file-thumb-loading').clone().insertAfter($body);\n                $body.html(body).hide();\n                $tmp.fadeOut('fast', function () {\n                    $body.fadeIn('fast', function () {\n                        $body.removeClass('file-thumb-loading');\n                    });\n                    $tmp.remove();\n                });\n            } else {\n                $body.html(body);\n            }\n            config = self.previewZoomSettings[tmplt];\n            if (config) {\n                $dataEl = $body.find('.kv-preview-data');\n                $h.addCss($dataEl, 'file-zoom-detail');\n                $.each(config, function (key, value) {\n                    $dataEl.css(key, value);\n                    if (($dataEl.attr('width') && key === 'width') || ($dataEl.attr('height') && key === 'height')) {\n                        $dataEl.removeAttr(key);\n                    }\n                });\n            }\n            $modal.data('previewId', pid);\n            var $img = $body.find('img');\n            if ($img.length) {\n                $h.adjustOrientedImage($img, true);\n            }\n            self._handler($prev, 'click', function () {\n                self._zoomSlideShow('prev', pid);\n            });\n            self._handler($next, 'click', function () {\n                self._zoomSlideShow('next', pid);\n            });\n            self._handler($btnFull, 'click', function () {\n                self._resizeZoomDialog(true);\n            });\n            self._handler($btnBord, 'click', function () {\n                self._resizeZoomDialog(false);\n            });\n            self._handler($btnTogh, 'click', function () {\n                var $header = $modal.find('.modal-header'), $floatBar = $modal.find('.modal-body .floating-buttons'),\n                    ht, $actions = $header.find('.kv-zoom-actions'), resize = function (height) {\n                        var $body = self.$modal.find('.kv-zoom-body'), h = self.zoomModalHeight;\n                        if ($modal.hasClass('file-zoom-fullscreen')) {\n                            h = $body.outerHeight(true);\n                            if (!height) {\n                                h = h - $header.outerHeight(true);\n                            }\n                        }\n                        $body.css('height', height ? h + height : h);\n                    };\n                if ($header.is(':visible')) {\n                    ht = $header.outerHeight(true);\n                    $header.slideUp('slow', function () {\n                        $actions.find('.btn').appendTo($floatBar);\n                        resize(ht);\n                    });\n                } else {\n                    $floatBar.find('.btn').appendTo($actions);\n                    $header.slideDown('slow', function () {\n                        resize();\n                    });\n                }\n                $modal.focus();\n            });\n            self._handler($modal, 'keydown', function (e) {\n                var key = e.which || e.keyCode;\n                if (key === 37 && !$prev.attr('disabled')) {\n                    self._zoomSlideShow('prev', pid);\n                }\n                if (key === 39 && !$next.attr('disabled')) {\n                    self._zoomSlideShow('next', pid);\n                }\n            });\n        },\n        _zoomPreview: function ($btn) {\n            var self = this, $frame, $modal = self.$modal;\n            if (!$btn.length) {\n                throw 'Cannot zoom to detailed preview!';\n            }\n            $h.initModal($modal);\n            $modal.html(self._getModalContent());\n            $frame = $btn.closest($h.FRAMES);\n            self._setZoomContent($frame);\n            $modal.modal('show');\n            self._initZoomButtons();\n        },\n        _zoomSlideShow: function (dir, previewId) {\n            var self = this, $btn = self.$modal.find('.kv-zoom-actions .btn-' + dir), $targFrame, i,\n                thumbs = self.getFrames().toArray(), len = thumbs.length, out;\n            if ($btn.attr('disabled')) {\n                return;\n            }\n            for (i = 0; i < len; i++) {\n                if ($(thumbs[i]).attr('id') === previewId) {\n                    out = dir === 'prev' ? i - 1 : i + 1;\n                    break;\n                }\n            }\n            if (out < 0 || out >= len || !thumbs[out]) {\n                return;\n            }\n            $targFrame = $(thumbs[out]);\n            if ($targFrame.length) {\n                self._setZoomContent($targFrame, true);\n            }\n            self._initZoomButtons();\n            self._raise('filezoom' + dir, {'previewId': previewId, modal: self.$modal});\n        },\n        _initZoomButton: function () {\n            var self = this;\n            self.$preview.find('.kv-file-zoom').each(function () {\n                var $el = $(this);\n                self._handler($el, 'click', function () {\n                    self._zoomPreview($el);\n                });\n            });\n        },\n        _clearObjects: function ($el) {\n            $el.find('video audio').each(function () {\n                this.pause();\n                $(this).remove();\n            });\n            $el.find('img object div').each(function () {\n                $(this).remove();\n            });\n        },\n        _clearFileInput: function () {\n            var self = this, $el = self.$element, $srcFrm, $tmpFrm, $tmpEl;\n            self.fileInputCleared = true;\n            if ($h.isEmpty($el.val())) {\n                return;\n            }\n            // Fix for IE ver < 11, that does not clear file inputs. Requires a sequence of steps to prevent IE\n            // crashing but still allow clearing of the file input.\n            if (self.isIE9 || self.isIE10) {\n                $srcFrm = $el.closest('form');\n                $tmpFrm = $(document.createElement('form'));\n                $tmpEl = $(document.createElement('div'));\n                $el.before($tmpEl);\n                if ($srcFrm.length) {\n                    $srcFrm.after($tmpFrm);\n                } else {\n                    $tmpEl.after($tmpFrm);\n                }\n                $tmpFrm.append($el).trigger('reset');\n                $tmpEl.before($el).remove();\n                $tmpFrm.remove();\n            } else { // normal input clear behavior for other sane browsers\n                $el.val('');\n            }\n        },\n        _resetUpload: function () {\n            var self = this;\n            self.uploadCache = {content: [], config: [], tags: [], append: true};\n            self.uploadCount = 0;\n            self.uploadStatus = {};\n            self.uploadLog = [];\n            self.uploadAsyncCount = 0;\n            self.loadedImages = [];\n            self.totalImagesCount = 0;\n            self.$btnUpload.removeAttr('disabled');\n            self._setProgress(0);\n            self.$progress.hide();\n            self._resetErrors(false);\n            self.ajaxAborted = false;\n            self.ajaxRequests = [];\n            self._resetCanvas();\n            self.cacheInitialPreview = {};\n            if (self.overwriteInitial) {\n                self.initialPreview = [];\n                self.initialPreviewConfig = [];\n                self.initialPreviewThumbTags = [];\n                self.previewCache.data = {\n                    content: [],\n                    config: [],\n                    tags: []\n                };\n            }\n        },\n        _resetCanvas: function () {\n            var self = this;\n            if (self.canvas && self.imageCanvasContext) {\n                self.imageCanvasContext.clearRect(0, 0, self.canvas.width, self.canvas.height);\n            }\n        },\n        _hasInitialPreview: function () {\n            var self = this;\n            return !self.overwriteInitial && self.previewCache.count();\n        },\n        _resetPreview: function () {\n            var self = this, out, cap;\n            if (self.previewCache.count()) {\n                out = self.previewCache.out();\n                self._setPreviewContent(out.content);\n                self._setInitThumbAttr();\n                cap = self.initialCaption ? self.initialCaption : out.caption;\n                self._setCaption(cap);\n            } else {\n                self._clearPreview();\n                self._initCaption();\n            }\n            if (self.showPreview) {\n                self._initZoom();\n                self._initSortable();\n            }\n        },\n        _clearDefaultPreview: function () {\n            var self = this;\n            self.$preview.find('.file-default-preview').remove();\n        },\n        _validateDefaultPreview: function () {\n            var self = this;\n            if (!self.showPreview || $h.isEmpty(self.defaultPreviewContent)) {\n                return;\n            }\n            self._setPreviewContent('<div class=\"file-default-preview\">' + self.defaultPreviewContent + '</div>');\n            self.$container.removeClass('file-input-new');\n            self._initClickable();\n        },\n        _resetPreviewThumbs: function (isAjax) {\n            var self = this, out;\n            if (isAjax) {\n                self._clearPreview();\n                self.clearStack();\n                return;\n            }\n            if (self._hasInitialPreview()) {\n                out = self.previewCache.out();\n                self._setPreviewContent(out.content);\n                self._setInitThumbAttr();\n                self._setCaption(out.caption);\n                self._initPreviewActions();\n            } else {\n                self._clearPreview();\n            }\n        },\n        _getLayoutTemplate: function (t) {\n            var self = this, template = self.layoutTemplates[t];\n            if ($h.isEmpty(self.customLayoutTags)) {\n                return template;\n            }\n            return $h.replaceTags(template, self.customLayoutTags);\n        },\n        _getPreviewTemplate: function (t) {\n            var self = this, template = self.previewTemplates[t];\n            if ($h.isEmpty(self.customPreviewTags)) {\n                return template;\n            }\n            return $h.replaceTags(template, self.customPreviewTags);\n        },\n        _getOutData: function (jqXHR, responseData, filesData) {\n            var self = this;\n            jqXHR = jqXHR || {};\n            responseData = responseData || {};\n            filesData = filesData || self.filestack.slice(0) || {};\n            return {\n                form: self.formdata,\n                files: filesData,\n                filenames: self.filenames,\n                filescount: self.getFilesCount(),\n                extra: self._getExtraData(),\n                response: responseData,\n                reader: self.reader,\n                jqXHR: jqXHR\n            };\n        },\n        _getMsgSelected: function (n) {\n            var self = this, strFiles = n === 1 ? self.fileSingle : self.filePlural;\n            return n > 0 ? self.msgSelected.replace('{n}', n).replace('{files}', strFiles) : self.msgNoFilesSelected;\n        },\n        _getFrame: function (id) {\n            var self = this, $frame = $('#' + id);\n            if (!$frame.length) {\n                self._log('Invalid thumb frame with id: \"' + id + '\".');\n                return null;\n            }\n            return $frame;\n        },\n        _getThumbs: function (css) {\n            css = css || '';\n            return this.getFrames(':not(.file-preview-initial)' + css);\n        },\n        _getExtraData: function (previewId, index) {\n            var self = this, data = self.uploadExtraData;\n            if (typeof self.uploadExtraData === \"function\") {\n                data = self.uploadExtraData(previewId, index);\n            }\n            return data;\n        },\n        _initXhr: function (xhrobj, previewId, fileCount) {\n            var self = this;\n            if (xhrobj.upload) {\n                xhrobj.upload.addEventListener('progress', function (event) {\n                    var pct = 0, total = event.total, position = event.loaded || event.position;\n                    /** @namespace event.lengthComputable */\n                    if (event.lengthComputable) {\n                        pct = Math.floor(position / total * 100);\n                    }\n                    if (previewId) {\n                        self._setAsyncUploadStatus(previewId, pct, fileCount);\n                    } else {\n                        self._setProgress(pct);\n                    }\n                }, false);\n            }\n            return xhrobj;\n        },\n        _mergeAjaxCallback: function (funcName, srcFunc, type) {\n            var self = this, settings = self.ajaxSettings, flag = self.mergeAjaxCallbacks, targFunc;\n            if (type === 'delete') {\n                settings = self.ajaxDeleteSettings;\n                flag = self.mergeAjaxDeleteCallbacks;\n            }\n            targFunc = settings[funcName];\n            if (flag && typeof targFunc === \"function\") {\n                if (flag === 'before') {\n                    settings[funcName] = function () {\n                        targFunc.apply(this, arguments);\n                        srcFunc.apply(this, arguments);\n                    };\n                } else {\n                    settings[funcName] = function () {\n                        srcFunc.apply(this, arguments);\n                        targFunc.apply(this, arguments);\n                    };\n                }\n            } else {\n                settings[funcName] = srcFunc;\n            }\n            if (type === 'delete') {\n                self.ajaxDeleteSettings = settings;\n            } else {\n                self.ajaxSettings = settings;\n            }\n        },\n        _ajaxSubmit: function (fnBefore, fnSuccess, fnComplete, fnError, previewId, index) {\n            var self = this, settings;\n            if (!self._raise('filepreajax', [previewId, index])) {\n                return;\n            }\n            self._uploadExtra(previewId, index);\n            self._mergeAjaxCallback('beforeSend', fnBefore);\n            self._mergeAjaxCallback('success', fnSuccess);\n            self._mergeAjaxCallback('complete', fnComplete);\n            self._mergeAjaxCallback('error', fnError);\n            settings = $.extend(true, {}, {\n                xhr: function () {\n                    var xhrobj = $.ajaxSettings.xhr();\n                    return self._initXhr(xhrobj, previewId, self.getFileStack().length);\n                },\n                url: index && self.uploadUrlThumb ? self.uploadUrlThumb : self.uploadUrl,\n                type: 'POST',\n                dataType: 'json',\n                data: self.formdata,\n                cache: false,\n                processData: false,\n                contentType: false\n            }, self.ajaxSettings);\n            self.ajaxRequests.push($.ajax(settings));\n        },\n        _mergeArray: function (prop, content) {\n            var self = this, arr1 = $h.cleanArray(self[prop]), arr2 = $h.cleanArray(content);\n            self[prop] = arr1.concat(arr2);\n        },\n        _initUploadSuccess: function (out, $thumb, allFiles) {\n            var self = this, append, data, index, $div, $newCache, content, config, tags, i;\n            if (!self.showPreview || typeof out !== 'object' || $.isEmptyObject(out)) {\n                return;\n            }\n            if (out.initialPreview !== undefined && out.initialPreview.length > 0) {\n                self.hasInitData = true;\n                content = out.initialPreview || [];\n                config = out.initialPreviewConfig || [];\n                tags = out.initialPreviewThumbTags || [];\n                append = out.append === undefined || out.append;\n                if (content.length > 0 && !$h.isArray(content)) {\n                    content = content.split(self.initialPreviewDelimiter);\n                }\n                self._mergeArray('initialPreview', content);\n                self._mergeArray('initialPreviewConfig', config);\n                self._mergeArray('initialPreviewThumbTags', tags);\n                if ($thumb !== undefined) {\n                    if (!allFiles) {\n                        index = self.previewCache.add(content, config[0], tags[0], append);\n                        data = self.previewCache.get(index, false);\n                        $div = $(document.createElement('div')).html(data).hide().insertAfter($thumb);\n                        $newCache = $div.find('.kv-zoom-cache');\n                        if ($newCache && $newCache.length) {\n                            $newCache.insertAfter($thumb);\n                        }\n                        $thumb.fadeOut('slow', function () {\n                            var $newThumb = $div.find('.file-preview-frame');\n                            if ($newThumb && $newThumb.length) {\n                                $newThumb.insertBefore($thumb).fadeIn('slow').css('display:inline-block');\n                            }\n                            self._initPreviewActions();\n                            self._clearFileInput();\n                            $h.cleanZoomCache(self.$preview.find('#zoom-' + $thumb.attr('id')));\n                            $thumb.remove();\n                            $div.remove();\n                            self._initSortable();\n                        });\n                    } else {\n                        i = $thumb.attr('data-fileindex');\n                        self.uploadCache.content[i] = content[0];\n                        self.uploadCache.config[i] = config[0] || [];\n                        self.uploadCache.tags[i] = tags[0] || [];\n                        self.uploadCache.append = append;\n                    }\n                } else {\n                    self.previewCache.set(content, config, tags, append);\n                    self._initPreview();\n                    self._initPreviewActions();\n                }\n            }\n        },\n        _initSuccessThumbs: function () {\n            var self = this;\n            if (!self.showPreview) {\n                return;\n            }\n            self._getThumbs($h.FRAMES + '.file-preview-success').each(function () {\n                var $thumb = $(this), $preview = self.$preview, $remove = $thumb.find('.kv-file-remove');\n                $remove.removeAttr('disabled');\n                self._handler($remove, 'click', function () {\n                    var id = $thumb.attr('id'),\n                        out = self._raise('filesuccessremove', [id, $thumb.attr('data-fileindex')]);\n                    $h.cleanMemory($thumb);\n                    if (out === false) {\n                        return;\n                    }\n                    $thumb.fadeOut('slow', function () {\n                        $h.cleanZoomCache($preview.find('#zoom-' + id));\n                        $thumb.remove();\n                        if (!self.getFrames().length) {\n                            self.reset();\n                        }\n                    });\n                });\n            });\n        },\n        _checkAsyncComplete: function () {\n            var self = this, previewId, i;\n            for (i = 0; i < self.filestack.length; i++) {\n                if (self.filestack[i]) {\n                    previewId = self.previewInitId + \"-\" + i;\n                    if ($.inArray(previewId, self.uploadLog) === -1) {\n                        return false;\n                    }\n                }\n            }\n            return (self.uploadAsyncCount === self.uploadLog.length);\n        },\n        _uploadExtra: function (previewId, index) {\n            var self = this, data = self._getExtraData(previewId, index);\n            if (data.length === 0) {\n                return;\n            }\n            $.each(data, function (key, value) {\n                self.formdata.append(key, value);\n            });\n        },\n        _uploadSingle: function (i, isBatch) {\n            var self = this, total = self.getFileStack().length, formdata = new FormData(), outData,\n                previewId = self.previewInitId + \"-\" + i, $thumb, chkComplete, $btnUpload, $btnDelete,\n                hasPostData = self.filestack.length > 0 || !$.isEmptyObject(self.uploadExtraData), uploadFailed,\n                $prog = $('#' + previewId).find('.file-thumb-progress'), fnBefore, fnSuccess, fnComplete, fnError,\n                updateUploadLog, params = {id: previewId, index: i};\n            self.formdata = formdata;\n            if (self.showPreview) {\n                $thumb = $('#' + previewId + ':not(.file-preview-initial)');\n                $btnUpload = $thumb.find('.kv-file-upload');\n                $btnDelete = $thumb.find('.kv-file-remove');\n                $prog.show();\n            }\n            if (total === 0 || !hasPostData || ($btnUpload && $btnUpload.hasClass('disabled')) || self._abort(params)) {\n                return;\n            }\n            updateUploadLog = function (i, previewId) {\n                if (!uploadFailed) {\n                    self.updateStack(i, undefined);\n                }\n                self.uploadLog.push(previewId);\n                if (self._checkAsyncComplete()) {\n                    self.fileBatchCompleted = true;\n                }\n            };\n            chkComplete = function () {\n                var u = self.uploadCache, $initThumbs, i, j, len = 0, data = self.cacheInitialPreview;\n                if (!self.fileBatchCompleted) {\n                    return;\n                }\n                if (data && data.content) {\n                    len = data.content.length;\n                }\n                setTimeout(function () {\n                    var triggerReset = self.getFileStack(true).length === 0;\n                    if (self.showPreview) {\n                        self.previewCache.set(u.content, u.config, u.tags, u.append);\n                        if (len) {\n                            for (i = 0; i < u.content.length; i++) {\n                                j = i + len;\n                                data.content[j] = u.content[i];\n                                //noinspection JSUnresolvedVariable\n                                if (data.config.length) {\n                                    data.config[j] = u.config[i];\n                                }\n                                if (data.tags.length) {\n                                    data.tags[j] = u.tags[i];\n                                }\n                            }\n                            self.initialPreview = $h.cleanArray(data.content);\n                            self.initialPreviewConfig = $h.cleanArray(data.config);\n                            self.initialPreviewThumbTags = $h.cleanArray(data.tags);\n                        } else {\n                            self.initialPreview = u.content;\n                            self.initialPreviewConfig = u.config;\n                            self.initialPreviewThumbTags = u.tags;\n                        }\n                        self.cacheInitialPreview = {};\n                        if (self.hasInitData) {\n                            self._initPreview();\n                            self._initPreviewActions();\n                        }\n                    }\n                    self.unlock(triggerReset);\n                    if (triggerReset) {\n                        self._clearFileInput();\n                    }\n                    $initThumbs = self.$preview.find('.file-preview-initial');\n                    if (self.uploadAsync && $initThumbs.length) {\n                        $h.addCss($initThumbs, $h.SORT_CSS);\n                        self._initSortable();\n                    }\n                    self._raise('filebatchuploadcomplete', [self.filestack, self._getExtraData()]);\n                    self.uploadCount = 0;\n                    self.uploadStatus = {};\n                    self.uploadLog = [];\n                    self._setProgress(101);\n                    self.ajaxAborted = false;\n                }, 100);\n            };\n            fnBefore = function (jqXHR) {\n                outData = self._getOutData(jqXHR);\n                self.fileBatchCompleted = false;\n                if (!isBatch) {\n                    self.ajaxAborted = false;\n                }\n                if (self.showPreview) {\n                    if (!$thumb.hasClass('file-preview-success')) {\n                        self._setThumbStatus($thumb, 'Loading');\n                        $h.addCss($thumb, 'file-uploading');\n                    }\n                    $btnUpload.attr('disabled', true);\n                    $btnDelete.attr('disabled', true);\n                }\n                if (!isBatch) {\n                    self.lock();\n                }\n                self._raise('filepreupload', [outData, previewId, i]);\n                $.extend(true, params, outData);\n                if (self._abort(params)) {\n                    jqXHR.abort();\n                    if (!isBatch) {\n                        self._setThumbStatus($thumb, 'New');\n                        $thumb.removeClass('file-uploading');\n                        $btnUpload.removeAttr('disabled');\n                        $btnDelete.removeAttr('disabled');\n                        self.unlock();\n                    }\n                    self._setProgressCancelled();\n                }\n            };\n            fnSuccess = function (data, textStatus, jqXHR) {\n                var pid = self.showPreview && $thumb.attr('id') ? $thumb.attr('id') : previewId;\n                outData = self._getOutData(jqXHR, data);\n                $.extend(true, params, outData);\n                setTimeout(function () {\n                    if ($h.isEmpty(data) || $h.isEmpty(data.error)) {\n                        if (self.showPreview) {\n                            self._setThumbStatus($thumb, 'Success');\n                            $btnUpload.hide();\n                            self._initUploadSuccess(data, $thumb, isBatch);\n                            self._setProgress(101, $prog);\n                        }\n                        self._raise('fileuploaded', [outData, pid, i]);\n                        if (!isBatch) {\n                            self.updateStack(i, undefined);\n                        } else {\n                            updateUploadLog(i, pid);\n                        }\n                    } else {\n                        uploadFailed = true;\n                        self._showUploadError(data.error, params);\n                        self._setPreviewError($thumb, i, self.filestack[i], self.retryErrorUploads);\n                        if (!self.retryErrorUploads) {\n                            $btnUpload.hide();\n                        }\n                        if (isBatch) {\n                            updateUploadLog(i, pid);\n                        }\n                        self._setProgress(101, $('#' + pid).find('.file-thumb-progress'), self.msgUploadError);\n                    }\n                }, 100);\n            };\n            fnComplete = function () {\n                setTimeout(function () {\n                    if (self.showPreview) {\n                        $btnUpload.removeAttr('disabled');\n                        $btnDelete.removeAttr('disabled');\n                        $thumb.removeClass('file-uploading');\n                    }\n                    if (!isBatch) {\n                        self.unlock(false);\n                        self._clearFileInput();\n                    } else {\n                        chkComplete();\n                    }\n                    self._initSuccessThumbs();\n                }, 100);\n            };\n            fnError = function (jqXHR, textStatus, errorThrown) {\n                var op = self.ajaxOperations.uploadThumb,\n                    errMsg = self._parseError(op, jqXHR, errorThrown, (isBatch && self.filestack[i].name ? self.filestack[i].name : null));\n                uploadFailed = true;\n                setTimeout(function () {\n                    if (isBatch) {\n                        updateUploadLog(i, previewId);\n                    }\n                    self.uploadStatus[previewId] = 100;\n                    self._setPreviewError($thumb, i, self.filestack[i], self.retryErrorUploads);\n                    if (!self.retryErrorUploads) {\n                        $btnUpload.hide();\n                    }\n                    $.extend(true, params, self._getOutData(jqXHR));\n                    self._setProgress(101, $prog, self.msgAjaxProgressError.replace('{operation}', op));\n                    self._setProgress(101, $('#' + previewId).find('.file-thumb-progress'), self.msgUploadError);\n                    self._showUploadError(errMsg, params);\n                }, 100);\n            };\n            formdata.append(self.uploadFileAttr, self.filestack[i], self.filenames[i]);\n            formdata.append('file_id', i);\n            self._ajaxSubmit(fnBefore, fnSuccess, fnComplete, fnError, previewId, i);\n        },\n        _uploadBatch: function () {\n            var self = this, files = self.filestack, total = files.length, params = {}, fnBefore, fnSuccess, fnError,\n                fnComplete, hasPostData = self.filestack.length > 0 || !$.isEmptyObject(self.uploadExtraData),\n                setAllUploaded;\n            self.formdata = new FormData();\n            if (total === 0 || !hasPostData || self._abort(params)) {\n                return;\n            }\n            setAllUploaded = function () {\n                $.each(files, function (key) {\n                    self.updateStack(key, undefined);\n                });\n                self._clearFileInput();\n            };\n            fnBefore = function (jqXHR) {\n                self.lock();\n                var outData = self._getOutData(jqXHR);\n                self.ajaxAborted = false;\n                if (self.showPreview) {\n                    self._getThumbs().each(function () {\n                        var $thumb = $(this), $btnUpload = $thumb.find('.kv-file-upload'),\n                            $btnDelete = $thumb.find('.kv-file-remove');\n                        if (!$thumb.hasClass('file-preview-success')) {\n                            self._setThumbStatus($thumb, 'Loading');\n                            $h.addCss($thumb, 'file-uploading');\n                        }\n                        $btnUpload.attr('disabled', true);\n                        $btnDelete.attr('disabled', true);\n                    });\n                }\n                self._raise('filebatchpreupload', [outData]);\n                if (self._abort(outData)) {\n                    jqXHR.abort();\n                    self._getThumbs().each(function () {\n                        var $thumb = $(this), $btnUpload = $thumb.find('.kv-file-upload'),\n                            $btnDelete = $thumb.find('.kv-file-remove');\n                        if ($thumb.hasClass('file-preview-loading')) {\n                            self._setThumbStatus($thumb, 'New');\n                            $thumb.removeClass('file-uploading');\n                        }\n                        $btnUpload.removeAttr('disabled');\n                        $btnDelete.removeAttr('disabled');\n                    });\n                    self._setProgressCancelled();\n                }\n            };\n            fnSuccess = function (data, textStatus, jqXHR) {\n                /** @namespace data.errorkeys */\n                var outData = self._getOutData(jqXHR, data), key = 0,\n                    $thumbs = self._getThumbs(':not(.file-preview-success)'),\n                    keys = $h.isEmpty(data) || $h.isEmpty(data.errorkeys) ? [] : data.errorkeys;\n\n                if ($h.isEmpty(data) || $h.isEmpty(data.error)) {\n                    self._raise('filebatchuploadsuccess', [outData]);\n                    setAllUploaded();\n                    if (self.showPreview) {\n                        $thumbs.each(function () {\n                            var $thumb = $(this);\n                            self._setThumbStatus($thumb, 'Success');\n                            $thumb.removeClass('file-uploading');\n                            $thumb.find('.kv-file-upload').hide().removeAttr('disabled');\n                        });\n                        self._initUploadSuccess(data);\n                    } else {\n                        self.reset();\n                    }\n                    self._setProgress(101);\n                } else {\n                    if (self.showPreview) {\n                        $thumbs.each(function () {\n                            var $thumb = $(this), i = $thumb.attr('data-fileindex');\n                            $thumb.removeClass('file-uploading');\n                            $thumb.find('.kv-file-upload').removeAttr('disabled');\n                            $thumb.find('.kv-file-remove').removeAttr('disabled');\n                            if (keys.length === 0 || $.inArray(key, keys) !== -1) {\n                                self._setPreviewError($thumb, i, self.filestack[i], self.retryErrorUploads);\n                                if (!self.retryErrorUploads) {\n                                    $thumb.find('.kv-file-upload').hide();\n                                    self.updateStack(i, undefined);\n                                }\n                            } else {\n                                $thumb.find('.kv-file-upload').hide();\n                                self._setThumbStatus($thumb, 'Success');\n                                self.updateStack(i, undefined);\n                            }\n                            if (!$thumb.hasClass('file-preview-error') || self.retryErrorUploads) {\n                                key++;\n                            }\n                        });\n                        self._initUploadSuccess(data);\n                    }\n                    self._showUploadError(data.error, outData, 'filebatchuploaderror');\n                    self._setProgress(101, self.$progress, self.msgUploadError);\n                }\n            };\n            fnComplete = function () {\n                self.unlock();\n                self._initSuccessThumbs();\n                self._clearFileInput();\n                self._raise('filebatchuploadcomplete', [self.filestack, self._getExtraData()]);\n            };\n            fnError = function (jqXHR, textStatus, errorThrown) {\n                var outData = self._getOutData(jqXHR), op = self.ajaxOperations.uploadBatch,\n                    errMsg = self._parseError(op, jqXHR, errorThrown);\n                self._showUploadError(errMsg, outData, 'filebatchuploaderror');\n                self.uploadFileCount = total - 1;\n                if (!self.showPreview) {\n                    return;\n                }\n                self._getThumbs().each(function () {\n                    var $thumb = $(this), key = $thumb.attr('data-fileindex');\n                    $thumb.removeClass('file-uploading');\n                    if (self.filestack[key] !== undefined) {\n                        self._setPreviewError($thumb);\n                    }\n                });\n                self._getThumbs().removeClass('file-uploading');\n                self._getThumbs(' .kv-file-upload').removeAttr('disabled');\n                self._getThumbs(' .kv-file-delete').removeAttr('disabled');\n                self._setProgress(101, self.$progress, self.msgAjaxProgressError.replace('{operation}', op));\n            };\n            $.each(files, function (key, data) {\n                if (!$h.isEmpty(files[key])) {\n                    self.formdata.append(self.uploadFileAttr, data, self.filenames[key]);\n                }\n            });\n            self._ajaxSubmit(fnBefore, fnSuccess, fnComplete, fnError);\n        },\n        _uploadExtraOnly: function () {\n            var self = this, params = {}, fnBefore, fnSuccess, fnComplete, fnError;\n            self.formdata = new FormData();\n            if (self._abort(params)) {\n                return;\n            }\n            fnBefore = function (jqXHR) {\n                self.lock();\n                var outData = self._getOutData(jqXHR);\n                self._raise('filebatchpreupload', [outData]);\n                self._setProgress(50);\n                params.data = outData;\n                params.xhr = jqXHR;\n                if (self._abort(params)) {\n                    jqXHR.abort();\n                    self._setProgressCancelled();\n                }\n            };\n            fnSuccess = function (data, textStatus, jqXHR) {\n                var outData = self._getOutData(jqXHR, data);\n                if ($h.isEmpty(data) || $h.isEmpty(data.error)) {\n                    self._raise('filebatchuploadsuccess', [outData]);\n                    self._clearFileInput();\n                    self._initUploadSuccess(data);\n                    self._setProgress(101);\n                } else {\n                    self._showUploadError(data.error, outData, 'filebatchuploaderror');\n                }\n            };\n            fnComplete = function () {\n                self.unlock();\n                self._clearFileInput();\n                self._raise('filebatchuploadcomplete', [self.filestack, self._getExtraData()]);\n            };\n            fnError = function (jqXHR, textStatus, errorThrown) {\n                var outData = self._getOutData(jqXHR), op = self.ajaxOperations.uploadExtra,\n                    errMsg = self._parseError(op, jqXHR, errorThrown);\n                params.data = outData;\n                self._showUploadError(errMsg, outData, 'filebatchuploaderror');\n                self._setProgress(101, self.$progress, self.msgAjaxProgressError.replace('{operation}', op));\n            };\n            self._ajaxSubmit(fnBefore, fnSuccess, fnComplete, fnError);\n        },\n        _deleteFileIndex: function ($frame) {\n            var self = this, ind = $frame.attr('data-fileindex');\n            if (ind.substring(0, 5) === 'init_') {\n                ind = parseInt(ind.replace('init_', ''));\n                self.initialPreview = $h.spliceArray(self.initialPreview, ind);\n                self.initialPreviewConfig = $h.spliceArray(self.initialPreviewConfig, ind);\n                self.initialPreviewThumbTags = $h.spliceArray(self.initialPreviewThumbTags, ind);\n                self.getFrames().each(function () {\n                    var $nFrame = $(this), nInd = $nFrame.attr('data-fileindex');\n                    if (nInd.substring(0, 5) === 'init_') {\n                        nInd = parseInt(nInd.replace('init_', ''));\n                        if (nInd > ind) {\n                            nInd--;\n                            $nFrame.attr('data-fileindex', 'init_' + nInd);\n                        }\n                    }\n                });\n                if (self.uploadAsync) {\n                    self.cacheInitialPreview = self.getPreview();\n                }\n            }\n        },\n        _initFileActions: function () {\n            var self = this, $preview = self.$preview;\n            if (!self.showPreview) {\n                return;\n            }\n            self._initZoomButton();\n            self.getFrames(' .kv-file-remove').each(function () {\n                var $el = $(this), $frame = $el.closest($h.FRAMES), hasError, id = $frame.attr('id'),\n                    ind = $frame.attr('data-fileindex'), n, cap, status;\n                self._handler($el, 'click', function () {\n                    status = self._raise('filepreremove', [id, ind]);\n                    if (status === false || !self._validateMinCount()) {\n                        return false;\n                    }\n                    hasError = $frame.hasClass('file-preview-error');\n                    $h.cleanMemory($frame);\n                    $frame.fadeOut('slow', function () {\n                        $h.cleanZoomCache($preview.find('#zoom-' + id));\n                        self.updateStack(ind, undefined);\n                        self._clearObjects($frame);\n                        $frame.remove();\n                        if (id && hasError) {\n                            self.$errorContainer.find('li[data-file-id=\"' + id + '\"]').fadeOut('fast', function () {\n                                $(this).remove();\n                                if (!self._errorsExist()) {\n                                    self._resetErrors();\n                                }\n                            });\n                        }\n                        self._clearFileInput();\n                        var filestack = self.getFileStack(true), chk = self.previewCache.count(),\n                            len = filestack.length, hasThumb = self.showPreview && self.getFrames().length;\n                        if (len === 0 && chk === 0 && !hasThumb) {\n                            self.reset();\n                        } else {\n                            n = chk + len;\n                            cap = n > 1 ? self._getMsgSelected(n) : (filestack[0] ? self._getFileNames()[0] : '');\n                            self._setCaption(cap);\n                        }\n                        self._raise('fileremoved', [id, ind]);\n                    });\n                });\n            });\n            self.getFrames(' .kv-file-upload').each(function () {\n                var $el = $(this);\n                self._handler($el, 'click', function () {\n                    var $frame = $el.closest($h.FRAMES), ind = $frame.attr('data-fileindex');\n                    self.$progress.hide();\n                    if ($frame.hasClass('file-preview-error') && !self.retryErrorUploads) {\n                        return;\n                    }\n                    self._uploadSingle(ind, false);\n                });\n            });\n        },\n        _initPreviewActions: function () {\n            var self = this, $preview = self.$preview, deleteExtraData = self.deleteExtraData || {},\n                btnRemove = $h.FRAMES + ' .kv-file-remove', settings = self.fileActionSettings,\n                origClass = settings.removeClass, errClass = settings.removeErrorClass,\n                resetProgress = function () {\n                    var hasFiles = self.isAjaxUpload ? self.previewCache.count() : self.$element.get(0).files.length;\n                    if (!$preview.find($h.FRAMES).length && !hasFiles) {\n                        self._setCaption('');\n                        self.reset();\n                        self.initialCaption = '';\n                    }\n                };\n            self._initZoomButton();\n            $preview.find(btnRemove).each(function () {\n                var $el = $(this), vUrl = $el.data('url') || self.deleteUrl, vKey = $el.data('key'),\n                    fnBefore, fnSuccess, fnError;\n                if ($h.isEmpty(vUrl) || vKey === undefined) {\n                    return;\n                }\n                var $frame = $el.closest($h.FRAMES), cache = self.previewCache.data,\n                    settings, params, index = $frame.attr('data-fileindex'), config, extraData;\n                index = parseInt(index.replace('init_', ''));\n                config = $h.isEmpty(cache.config) && $h.isEmpty(cache.config[index]) ? null : cache.config[index];\n                extraData = $h.isEmpty(config) || $h.isEmpty(config.extra) ? deleteExtraData : config.extra;\n                if (typeof extraData === \"function\") {\n                    extraData = extraData();\n                }\n                params = {id: $el.attr('id'), key: vKey, extra: extraData};\n                fnBefore = function (jqXHR) {\n                    self.ajaxAborted = false;\n                    self._raise('filepredelete', [vKey, jqXHR, extraData]);\n                    if (self._abort()) {\n                        jqXHR.abort();\n                    } else {\n                        $el.removeClass(errClass);\n                        $h.addCss($frame, 'file-uploading');\n                        $h.addCss($el, 'disabled ' + origClass);\n                    }\n                };\n                fnSuccess = function (data, textStatus, jqXHR) {\n                    var n, cap;\n                    if (!$h.isEmpty(data) && !$h.isEmpty(data.error)) {\n                        params.jqXHR = jqXHR;\n                        params.response = data;\n                        self._showError(data.error, params, 'filedeleteerror');\n                        $frame.removeClass('file-uploading');\n                        $el.removeClass('disabled ' + origClass).addClass(errClass);\n                        resetProgress();\n                        return;\n                    }\n                    $frame.removeClass('file-uploading').addClass('file-deleted');\n                    $frame.fadeOut('slow', function () {\n                        index = parseInt(($frame.attr('data-fileindex')).replace('init_', ''));\n                        self.previewCache.unset(index);\n                        self._deleteFileIndex($frame);\n                        n = self.previewCache.count();\n                        cap = n > 0 ? self._getMsgSelected(n) : '';\n                        self._setCaption(cap);\n                        self._raise('filedeleted', [vKey, jqXHR, extraData]);\n                        $h.cleanZoomCache($preview.find('#zoom-' + $frame.attr('id')));\n                        self._clearObjects($frame);\n                        $frame.remove();\n                        resetProgress();\n                    });\n                };\n                fnError = function (jqXHR, textStatus, errorThrown) {\n                    var op = self.ajaxOperations.deleteThumb, errMsg = self._parseError(op, jqXHR, errorThrown);\n                    params.jqXHR = jqXHR;\n                    params.response = {};\n                    self._showError(errMsg, params, 'filedeleteerror');\n                    $frame.removeClass('file-uploading');\n                    $el.removeClass('disabled ' + origClass).addClass(errClass);\n                    resetProgress();\n                };\n                self._mergeAjaxCallback('beforeSend', fnBefore, 'delete');\n                self._mergeAjaxCallback('success', fnSuccess, 'delete');\n                self._mergeAjaxCallback('error', fnError, 'delete');\n                settings = $.extend(true, {}, {\n                    url: vUrl,\n                    type: 'POST',\n                    dataType: 'json',\n                    data: $.extend(true, {}, {key: vKey}, extraData)\n                }, self.ajaxDeleteSettings);\n                self._handler($el, 'click', function () {\n                    if (!self._validateMinCount()) {\n                        return false;\n                    }\n                    self.ajaxAborted = false;\n                    self._raise('filebeforedelete', [vKey, extraData]);\n                    //noinspection JSUnresolvedVariable,JSHint\n                    if (self.ajaxAborted instanceof Promise) {\n                        self.ajaxAborted.then(function (result) {\n                            if (!result) {\n                                $.ajax(settings);\n                            }\n                        });\n                    } else {\n                        if (!self.ajaxAborted) {\n                            $.ajax(settings);\n                        }\n                    }\n                });\n            });\n        },\n        _hideFileIcon: function () {\n            var self = this;\n            if (self.overwriteInitial) {\n                self.$captionContainer.removeClass('icon-visible');\n            }\n        },\n        _showFileIcon: function () {\n            var self = this;\n            $h.addCss(self.$captionContainer, 'icon-visible');\n        },\n        _getSize: function (bytes) {\n            var self = this, size = parseFloat(bytes), i, func = self.fileSizeGetter, sizes, out;\n            if (!$.isNumeric(bytes) || !$.isNumeric(size)) {\n                return '';\n            }\n            if (typeof func === 'function') {\n                out = func(size);\n            } else {\n                if (size === 0) {\n                    out = '0.00 B';\n                } else {\n                    i = Math.floor(Math.log(size) / Math.log(1024));\n                    sizes = ['B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'];\n                    out = (size / Math.pow(1024, i)).toFixed(2) * 1 + ' ' + sizes[i];\n                }\n            }\n            return self._getLayoutTemplate('size').replace('{sizeText}', out);\n        },\n        _generatePreviewTemplate: function (cat, data, fname, ftype, previewId, isError, size, frameClass, foot, ind, templ) {\n            var self = this, caption = self.slug(fname), prevContent, zoomContent = '', styleAttribs = '',\n                screenW = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth,\n                config = screenW < 400 ? (self.previewSettingsSmall[cat] || self.defaults.previewSettingsSmall[cat]) :\n                    (self.previewSettings[cat] || self.defaults.previewSettings[cat]),\n                footer = foot || self._renderFileFooter(caption, size, 'auto', isError),\n                hasIconSetting = self._getPreviewIcon(fname), typeCss = 'type-default',\n                forcePrevIcon = hasIconSetting && self.preferIconicPreview,\n                forceZoomIcon = hasIconSetting && self.preferIconicZoomPreview, getContent;\n            if (config) {\n                $.each(config, function (key, val) {\n                    styleAttribs += key + ':' + val + ';';\n                });\n            }\n            getContent = function (c, d, zoom, frameCss) {\n                var id = zoom ? 'zoom-' + previewId : previewId, tmplt = self._getPreviewTemplate(c),\n                    css = (frameClass || '') + ' ' + frameCss;\n                if (self.frameClass) {\n                    css = self.frameClass + ' ' + css;\n                }\n                if (zoom) {\n                    css = css.replace(' ' + $h.SORT_CSS, '');\n                }\n                tmplt = self._parseFilePreviewIcon(tmplt, fname);\n                if (c === 'text') {\n                    d = $h.htmlEncode(d);\n                }\n                if (cat === 'object' && !ftype) {\n                    $.each(self.defaults.fileTypeSettings, function (key, func) {\n                        if (key === 'object' || key === 'other') {\n                            return;\n                        }\n                        if (func(fname, ftype)) {\n                            typeCss = 'type-' + key;\n                        }\n                    });\n                }\n                return tmplt.setTokens({\n                    'previewId': id,\n                    'caption': caption,\n                    'frameClass': css,\n                    'type': ftype,\n                    'fileindex': ind,\n                    'typeCss': typeCss,\n                    'footer': footer,\n                    'data': d,\n                    'template': templ || cat,\n                    'style': styleAttribs ? 'style=\"' + styleAttribs + '\"' : ''\n                });\n            };\n            ind = ind || previewId.slice(previewId.lastIndexOf('-') + 1);\n            if (self.fileActionSettings.showZoom) {\n                zoomContent = getContent((forceZoomIcon ? 'other' : cat), data, true, 'kv-zoom-thumb');\n            }\n            zoomContent = '\\n' + self._getLayoutTemplate('zoomCache').replace('{zoomContent}', zoomContent);\n            prevContent = getContent((forcePrevIcon ? 'other' : cat), data, false, 'kv-preview-thumb');\n            return prevContent + zoomContent;\n        },\n        _previewDefault: function (file, previewId, isDisabled) {\n            var self = this, $preview = self.$preview;\n            if (!self.showPreview) {\n                return;\n            }\n            var fname = file ? file.name : '', ftype = file ? file.type : '', content, size = file.size || 0,\n                caption = self.slug(fname), isError = isDisabled === true && !self.isAjaxUpload,\n                data = $h.objUrl.createObjectURL(file);\n            self._clearDefaultPreview();\n            content = self._generatePreviewTemplate('other', data, fname, ftype, previewId, isError, size);\n            $preview.append(\"\\n\" + content);\n            self._setThumbAttr(previewId, caption, size);\n            if (isDisabled === true && self.isAjaxUpload) {\n                self._setThumbStatus($('#' + previewId), 'Error');\n            }\n        },\n        _previewFile: function (i, file, theFile, previewId, data, fileInfo) {\n            if (!this.showPreview) {\n                return;\n            }\n            var self = this, fname = file ? file.name : '', ftype = fileInfo.type, caption = fileInfo.name,\n                cat = self._parseFileType(ftype, fname), types = self.allowedPreviewTypes, content,\n                mimes = self.allowedPreviewMimeTypes, $preview = self.$preview, fsize = file.size || 0,\n                chkTypes = types && types.indexOf(cat) >= 0, chkMimes = mimes && mimes.indexOf(ftype) !== -1,\n                iData = (cat === 'text' || cat === 'html' || cat === 'image') ? theFile.target.result : data;\n            /** @namespace window.DOMPurify */\n            if (cat === 'html' && self.purifyHtml && window.DOMPurify) {\n                iData = window.DOMPurify.sanitize(iData);\n            }\n            if (chkTypes || chkMimes) {\n                content = self._generatePreviewTemplate(cat, iData, fname, ftype, previewId, false, fsize);\n                self._clearDefaultPreview();\n                $preview.append(\"\\n\" + content);\n                var $img = $preview.find('#' + previewId + ' img');\n                if ($img.length && self.autoOrientImage) {\n                    $h.validateOrientation(file, function (value) {\n                        if (!value) {\n                            self._validateImage(previewId, caption, ftype, fsize, iData);\n                            return;\n                        }\n                        var $zoomImg = $preview.find('#zoom-' + previewId + ' img'), css = 'rotate-' + value;\n                        if (value > 4) {\n                            css += ($img.width() > $img.height() ? ' is-portrait-gt4' : ' is-landscape-gt4');\n                        }\n                        $h.addCss($img, css);\n                        $h.addCss($zoomImg, css);\n                        self._raise('fileimageoriented', {'$img': $img, 'file': file});\n                        self._validateImage(previewId, caption, ftype, fsize, iData);\n                        $h.adjustOrientedImage($img);\n                    });\n                } else {\n                    self._validateImage(previewId, caption, ftype, fsize, iData);\n                }\n            } else {\n                self._previewDefault(file, previewId);\n            }\n            self._setThumbAttr(previewId, caption, fsize);\n            self._initSortable();\n        },\n        _setThumbAttr: function (id, caption, size) {\n            var self = this, $frame = $('#' + id);\n            if ($frame.length) {\n                size = size && size > 0 ? self._getSize(size) : '';\n                $frame.data({'caption': caption, 'size': size});\n            }\n        },\n        _setInitThumbAttr: function () {\n            var self = this, data = self.previewCache.data, len = self.previewCache.count(), config,\n                caption, size, previewId;\n            if (len === 0) {\n                return;\n            }\n            for (var i = 0; i < len; i++) {\n                config = data.config[i];\n                previewId = self.previewInitId + '-' + 'init_' + i;\n                caption = $h.ifSet('caption', config, $h.ifSet('filename', config));\n                size = $h.ifSet('size', config);\n                self._setThumbAttr(previewId, caption, size);\n            }\n        },\n        _slugDefault: function (text) {\n            return $h.isEmpty(text) ? '' : String(text).replace(/[\\[\\]\\/\\{}:;#%=\\(\\)\\*\\+\\?\\\\\\^\\$\\|<>&\"']/g, '_');\n        },\n        _updateFileDetails: function (numFiles) {\n            var self = this, $el = self.$element, fileStack = self.getFileStack(),\n                name = ($h.isIE(9) && $h.findFileName($el.val())) ||\n                    ($el[0].files[0] && $el[0].files[0].name) || (fileStack.length && fileStack[0].name) || '',\n                label = self.slug(name), n = self.isAjaxUpload ? fileStack.length : numFiles,\n                nFiles = self.previewCache.count() + n, log = n === 1 ? label : self._getMsgSelected(nFiles);\n            if (self.isError) {\n                self.$previewContainer.removeClass('file-thumb-loading');\n                self.$previewStatus.html('');\n                self.$captionContainer.removeClass('icon-visible');\n            } else {\n                self._showFileIcon();\n            }\n            self._setCaption(log, self.isError);\n            self.$container.removeClass('file-input-new file-input-ajax-new');\n            if (arguments.length === 1) {\n                self._raise('fileselect', [numFiles, label]);\n            }\n            if (self.previewCache.count()) {\n                self._initPreviewActions();\n            }\n        },\n        _setThumbStatus: function ($thumb, status) {\n            var self = this;\n            if (!self.showPreview) {\n                return;\n            }\n            var icon = 'indicator' + status, msg = icon + 'Title',\n                css = 'file-preview-' + status.toLowerCase(),\n                $indicator = $thumb.find('.file-upload-indicator'),\n                config = self.fileActionSettings;\n            $thumb.removeClass('file-preview-success file-preview-error file-preview-loading');\n            if (status === 'Success') {\n                $thumb.find('.file-drag-handle').remove();\n            }\n            $indicator.html(config[icon]);\n            $indicator.attr('title', config[msg]);\n            $thumb.addClass(css);\n            if (status === 'Error' && !self.retryErrorUploads) {\n                $thumb.find('.kv-file-upload').attr('disabled', true);\n            }\n        },\n        _setProgressCancelled: function () {\n            var self = this;\n            self._setProgress(101, self.$progress, self.msgCancelled);\n        },\n        _setProgress: function (p, $el, error) {\n            var self = this, pct = Math.min(p, 100), out, pctLimit = self.progressUploadThreshold,\n                t = p <= 100 ? self.progressTemplate : self.progressCompleteTemplate,\n                template = pct < 100 ? self.progressTemplate : (error ? self.progressErrorTemplate : t);\n            $el = $el || self.$progress;\n            if (!$h.isEmpty(template)) {\n                if (pctLimit && pct > pctLimit && p <= 100) {\n                    out = template.setTokens({'percent': pctLimit, 'status': self.msgUploadThreshold});\n                } else {\n                    out = template.setTokens({'percent': pct, 'status': (p > 100 ? self.msgUploadEnd : pct + '%')});\n                }\n                $el.html(out);\n                if (error) {\n                    $el.find('[role=\"progressbar\"]').html(error);\n                }\n            }\n        },\n        _setFileDropZoneTitle: function () {\n            var self = this, $zone = self.$container.find('.file-drop-zone'), title = self.dropZoneTitle, strFiles;\n            if (self.isClickable) {\n                strFiles = $h.isEmpty(self.$element.attr('multiple')) ? self.fileSingle : self.filePlural;\n                title += self.dropZoneClickTitle.replace('{files}', strFiles);\n            }\n            $zone.find('.' + self.dropZoneTitleClass).remove();\n            if (!self.isAjaxUpload || !self.showPreview || $zone.length === 0 || self.getFileStack().length > 0 || !self.dropZoneEnabled) {\n                return;\n            }\n            if ($zone.find($h.FRAMES).length === 0 && $h.isEmpty(self.defaultPreviewContent)) {\n                $zone.prepend('<div class=\"' + self.dropZoneTitleClass + '\">' + title + '</div>');\n            }\n            self.$container.removeClass('file-input-new');\n            $h.addCss(self.$container, 'file-input-ajax-new');\n        },\n        _setAsyncUploadStatus: function (previewId, pct, total) {\n            var self = this, sum = 0;\n            self._setProgress(pct, $('#' + previewId).find('.file-thumb-progress'));\n            self.uploadStatus[previewId] = pct;\n            $.each(self.uploadStatus, function (key, value) {\n                sum += value;\n            });\n            self._setProgress(Math.floor(sum / total));\n        },\n        _validateMinCount: function () {\n            var self = this, len = self.isAjaxUpload ? self.getFileStack().length : self.$element.get(0).files.length;\n            if (self.validateInitialCount && self.minFileCount > 0 && self._getFileCount(len - 1) < self.minFileCount) {\n                self._noFilesError({});\n                return false;\n            }\n            return true;\n        },\n        _getFileCount: function (fileCount) {\n            var self = this, addCount = 0;\n            if (self.validateInitialCount && !self.overwriteInitial) {\n                addCount = self.previewCache.count();\n                fileCount += addCount;\n            }\n            return fileCount;\n        },\n        _getFileId: function (file) {\n            var self = this, custom = self.generateFileId, relativePath;\n            if (typeof custom === 'function') {\n                return custom(file, event);\n            }\n            if (!file) {\n                return null;\n            }\n            /** @namespace file.webkitRelativePath */\n            relativePath = String(file.webkitRelativePath || file.fileName || file.name || null);\n            if (!relativePath) {\n                return null;\n            }\n            return (file.size + '-' + relativePath.replace(/[^0-9a-zA-Z_-]/img, ''));\n        },\n        _getFileName: function (file) {\n            return file && file.name ? this.slug(file.name) : undefined;\n        },\n        _getFileIds: function (skipNull) {\n            var self = this;\n            return self.fileids.filter(function (n) {\n                return (skipNull ? n !== undefined : n !== undefined && n !== null);\n            });\n        },\n        _getFileNames: function (skipNull) {\n            var self = this;\n            return self.filenames.filter(function (n) {\n                return (skipNull ? n !== undefined : n !== undefined && n !== null);\n            });\n        },\n        _setPreviewError: function ($thumb, i, val, repeat) {\n            var self = this;\n            if (i !== undefined) {\n                self.updateStack(i, val);\n            }\n            if (!self.showPreview) {\n                return;\n            }\n            if (self.removeFromPreviewOnError && !repeat) {\n                $thumb.remove();\n                return;\n            } else {\n                self._setThumbStatus($thumb, 'Error');\n            }\n            self._refreshUploadButton($thumb, repeat);\n        },\n        _refreshUploadButton: function ($thumb, repeat) {\n            var self = this, $btn = $thumb.find('.kv-file-upload'), cfg = self.fileActionSettings,\n                icon = cfg.uploadIcon, title = cfg.uploadTitle;\n            if (!$btn.length) {\n                return;\n            }\n            if (repeat) {\n                icon = cfg.uploadRetryIcon;\n                title = cfg.uploadRetryTitle;\n            }\n            $btn.attr('title', title).html(icon);\n        },\n        _checkDimensions: function (i, chk, $img, $thumb, fname, type, params) {\n            var self = this, msg, dim, tag = chk === 'Small' ? 'min' : 'max', limit = self[tag + 'Image' + type],\n                $imgEl, isValid;\n            if ($h.isEmpty(limit) || !$img.length) {\n                return;\n            }\n            $imgEl = $img[0];\n            dim = (type === 'Width') ? $imgEl.naturalWidth || $imgEl.width : $imgEl.naturalHeight || $imgEl.height;\n            isValid = chk === 'Small' ? dim >= limit : dim <= limit;\n            if (isValid) {\n                return;\n            }\n            msg = self['msgImage' + type + chk].setTokens({'name': fname, 'size': limit});\n            self._showUploadError(msg, params);\n            self._setPreviewError($thumb, i, null);\n        },\n        _validateImage: function (previewId, fname, ftype, fsize, iData) {\n            var self = this, $preview = self.$preview, params, w1, w2, $thumb = $preview.find(\"#\" + previewId),\n                i = $thumb.attr('data-fileindex'), $img = $thumb.find('img'), exifObject;\n            fname = fname || 'Untitled';\n            $img.one('load', function () {\n                w1 = $thumb.width();\n                w2 = $preview.width();\n                if (w1 > w2) {\n                    $img.css('width', '100%');\n                }\n                params = {ind: i, id: previewId};\n                self._checkDimensions(i, 'Small', $img, $thumb, fname, 'Width', params);\n                self._checkDimensions(i, 'Small', $img, $thumb, fname, 'Height', params);\n                if (!self.resizeImage) {\n                    self._checkDimensions(i, 'Large', $img, $thumb, fname, 'Width', params);\n                    self._checkDimensions(i, 'Large', $img, $thumb, fname, 'Height', params);\n                }\n                self._raise('fileimageloaded', [previewId]);\n                try {\n                    exifObject = window.piexif ? window.piexif.load(iData) : null;\n                } catch (err) {\n                    exifObject = null;\n                }\n                self.loadedImages.push({\n                    ind: i,\n                    img: $img,\n                    thumb: $thumb,\n                    pid: previewId,\n                    typ: ftype,\n                    siz: fsize,\n                    validated: false,\n                    imgData: iData,\n                    exifObj: exifObject\n                });\n                $thumb.data('exif', exifObject);\n                self._validateAllImages();\n            }).one('error', function () {\n                self._raise('fileimageloaderror', [previewId]);\n            }).each(function () {\n                if (this.complete) {\n                    $(this).trigger('load');\n                } else {\n                    if (this.error) {\n                        $(this).trigger('error');\n                    }\n                }\n            });\n        },\n        _validateAllImages: function () {\n            var self = this, i, counter = {val: 0}, numImgs = self.loadedImages.length, config,\n                fsize, minSize = self.resizeIfSizeMoreThan;\n            if (numImgs !== self.totalImagesCount) {\n                return;\n            }\n            self._raise('fileimagesloaded');\n            if (!self.resizeImage) {\n                return;\n            }\n            for (i = 0; i < self.loadedImages.length; i++) {\n                config = self.loadedImages[i];\n                if (config.validated) {\n                    continue;\n                }\n                fsize = config.siz;\n                if (fsize && fsize > minSize * 1000) {\n                    self._getResizedImage(config, counter, numImgs);\n                }\n                self.loadedImages[i].validated = true;\n            }\n        },\n        _getResizedImage: function (config, counter, numImgs) {\n            var self = this, img = $(config.img)[0], width = img.naturalWidth, height = img.naturalHeight, blob,\n                ratio = 1, maxWidth = self.maxImageWidth || width, maxHeight = self.maxImageHeight || height,\n                isValidImage = !!(width && height), chkWidth, chkHeight, canvas = self.imageCanvas, dataURI,\n                context = self.imageCanvasContext, type = config.typ, pid = config.pid, ind = config.ind,\n                $thumb = config.thumb, throwError, msg, exifObj = config.exifObj, exifStr;\n            throwError = function (msg, params, ev) {\n                if (self.isAjaxUpload) {\n                    self._showUploadError(msg, params, ev);\n                } else {\n                    self._showError(msg, params, ev);\n                }\n                self._setPreviewError($thumb, ind);\n            };\n            if (!self.filestack[ind] || !isValidImage || (width <= maxWidth && height <= maxHeight)) {\n                if (isValidImage && self.filestack[ind]) {\n                    self._raise('fileimageresized', [pid, ind]);\n                }\n                counter.val++;\n                if (counter.val === numImgs) {\n                    self._raise('fileimagesresized');\n                }\n                if (!isValidImage) {\n                    throwError(self.msgImageResizeError, {id: pid, 'index': ind}, 'fileimageresizeerror');\n                    return;\n                }\n            }\n            type = type || self.resizeDefaultImageType;\n            chkWidth = width > maxWidth;\n            chkHeight = height > maxHeight;\n            if (self.resizePreference === 'width') {\n                ratio = chkWidth ? maxWidth / width : (chkHeight ? maxHeight / height : 1);\n            } else {\n                ratio = chkHeight ? maxHeight / height : (chkWidth ? maxWidth / width : 1);\n            }\n            self._resetCanvas();\n            width *= ratio;\n            height *= ratio;\n            canvas.width = width;\n            canvas.height = height;\n            try {\n                context.drawImage(img, 0, 0, width, height);\n                dataURI = canvas.toDataURL(type, self.resizeQuality);\n                if (exifObj) {\n                    exifStr = window.piexif.dump(exifObj);\n                    dataURI = window.piexif.insert(exifStr, dataURI);\n                }\n                blob = $h.dataURI2Blob(dataURI);\n                self.filestack[ind] = blob;\n                self._raise('fileimageresized', [pid, ind]);\n                counter.val++;\n                if (counter.val === numImgs) {\n                    self._raise('fileimagesresized', [undefined, undefined]);\n                }\n                if (!(blob instanceof Blob)) {\n                    throwError(self.msgImageResizeError, {id: pid, 'index': ind}, 'fileimageresizeerror');\n                }\n            }\n            catch (err) {\n                counter.val++;\n                if (counter.val === numImgs) {\n                    self._raise('fileimagesresized', [undefined, undefined]);\n                }\n                msg = self.msgImageResizeException.replace('{errors}', err.message);\n                throwError(msg, {id: pid, 'index': ind}, 'fileimageresizeexception');\n            }\n        },\n        _initBrowse: function ($container) {\n            var self = this;\n            if (self.showBrowse) {\n                self.$btnFile = $container.find('.btn-file');\n                self.$btnFile.append(self.$element);\n            } else {\n                self.$element.hide();\n            }\n        },\n        _initCaption: function () {\n            var self = this, cap = self.initialCaption || '';\n            if (self.overwriteInitial || $h.isEmpty(cap)) {\n                self.$caption.val('');\n                return false;\n            }\n            self._setCaption(cap);\n            return true;\n        },\n        _setCaption: function (content, isError) {\n            var self = this, title, out, icon, n, cap, stack = self.getFileStack();\n            if (!self.$caption.length) {\n                return;\n            }\n            self.$captionContainer.removeClass('icon-visible');\n            if (isError) {\n                title = $('<div>' + self.msgValidationError + '</div>').text();\n                n = stack.length;\n                if (n) {\n                    cap = n === 1 && stack[0] ? self._getFileNames()[0] : self._getMsgSelected(n);\n                } else {\n                    cap = self._getMsgSelected(self.msgNo);\n                }\n                out = $h.isEmpty(content) ? cap : content;\n                icon = '<span class=\"' + self.msgValidationErrorClass + '\">' + self.msgValidationErrorIcon + '</span>';\n            } else {\n                if ($h.isEmpty(content)) {\n                    return;\n                }\n                title = $('<div>' + content + '</div>').text();\n                out = title;\n                icon = self._getLayoutTemplate('fileIcon');\n            }\n            self.$captionContainer.addClass('icon-visible');\n            self.$caption.attr('title', title).val(out);\n            self.$captionIcon.html(icon);\n        },\n        _createContainer: function () {\n            var self = this, attribs = {\"class\": 'file-input file-input-new' + (self.rtl ? ' kv-rtl' : '')},\n                $container = $(document.createElement(\"div\")).attr(attribs).html(self._renderMain());\n            self.$element.before($container);\n            self._initBrowse($container);\n            if (self.theme) {\n                $container.addClass('theme-' + self.theme);\n            }\n            return $container;\n        },\n        _refreshContainer: function () {\n            var self = this, $container = self.$container;\n            $container.before(self.$element);\n            $container.html(self._renderMain());\n            self._initBrowse($container);\n            self._validateDisabled();\n        },\n        _validateDisabled: function () {\n            var self = this;\n            self.$caption.attr({readonly: self.isDisabled});\n        },\n        _renderMain: function () {\n            var self = this,\n                dropCss = (self.isAjaxUpload && self.dropZoneEnabled) ? ' file-drop-zone' : 'file-drop-disabled',\n                close = !self.showClose ? '' : self._getLayoutTemplate('close'),\n                preview = !self.showPreview ? '' : self._getLayoutTemplate('preview')\n                    .setTokens({'class': self.previewClass, 'dropClass': dropCss}),\n                css = self.isDisabled ? self.captionClass + ' file-caption-disabled' : self.captionClass,\n                caption = self.captionTemplate.setTokens({'class': css + ' kv-fileinput-caption'});\n            return self.mainTemplate.setTokens({\n                'class': self.mainClass + (!self.showBrowse && self.showCaption ? ' no-browse' : ''),\n                'preview': preview,\n                'close': close,\n                'caption': caption,\n                'upload': self._renderButton('upload'),\n                'remove': self._renderButton('remove'),\n                'cancel': self._renderButton('cancel'),\n                'browse': self._renderButton('browse')\n            });\n\n        },\n        _renderButton: function (type) {\n            var self = this, tmplt = self._getLayoutTemplate('btnDefault'), css = self[type + 'Class'],\n                title = self[type + 'Title'], icon = self[type + 'Icon'], label = self[type + 'Label'],\n                status = self.isDisabled ? ' disabled' : '', btnType = 'button';\n            switch (type) {\n                case 'remove':\n                    if (!self.showRemove) {\n                        return '';\n                    }\n                    break;\n                case 'cancel':\n                    if (!self.showCancel) {\n                        return '';\n                    }\n                    css += ' kv-hidden';\n                    break;\n                case 'upload':\n                    if (!self.showUpload) {\n                        return '';\n                    }\n                    if (self.isAjaxUpload && !self.isDisabled) {\n                        tmplt = self._getLayoutTemplate('btnLink').replace('{href}', self.uploadUrl);\n                    } else {\n                        btnType = 'submit';\n                    }\n                    break;\n                case 'browse':\n                    if (!self.showBrowse) {\n                        return '';\n                    }\n                    tmplt = self._getLayoutTemplate('btnBrowse');\n                    break;\n                default:\n                    return '';\n            }\n\n            css += type === 'browse' ? ' btn-file' : ' fileinput-' + type + ' fileinput-' + type + '-button';\n            if (!$h.isEmpty(label)) {\n                label = ' <span class=\"' + self.buttonLabelClass + '\">' + label + '</span>';\n            }\n            return tmplt.setTokens({\n                'type': btnType, 'css': css, 'title': title, 'status': status, 'icon': icon, 'label': label\n            });\n        },\n        _renderThumbProgress: function () {\n            var self = this;\n            return '<div class=\"file-thumb-progress kv-hidden\">' +\n                self.progressTemplate.setTokens({'percent': '0', 'status': self.msgUploadBegin}) +\n                '</div>';\n        },\n        _renderFileFooter: function (caption, size, width, isError) {\n            var self = this, config = self.fileActionSettings, rem = config.showRemove, drg = config.showDrag,\n                upl = config.showUpload, zoom = config.showZoom, out,\n                template = self._getLayoutTemplate('footer'), tInd = self._getLayoutTemplate('indicator'),\n                ind = isError ? config.indicatorError : config.indicatorNew,\n                title = isError ? config.indicatorErrorTitle : config.indicatorNewTitle,\n                indicator = tInd.setTokens({'indicator': ind, 'indicatorTitle': title});\n            size = self._getSize(size);\n            if (self.isAjaxUpload) {\n                out = template.setTokens({\n                    'actions': self._renderFileActions(upl, false, rem, zoom, drg, false, false, false),\n                    'caption': caption,\n                    'size': size,\n                    'width': width,\n                    'progress': self._renderThumbProgress(),\n                    'indicator': indicator\n                });\n            } else {\n                out = template.setTokens({\n                    'actions': self._renderFileActions(false, false, false, zoom, drg, false, false, false),\n                    'caption': caption,\n                    'size': size,\n                    'width': width,\n                    'progress': '',\n                    'indicator': indicator\n                });\n            }\n            out = $h.replaceTags(out, self.previewThumbTags);\n            return out;\n        },\n        _renderFileActions: function (showUpl, showDwn, showDel, showZoom, showDrag, disabled, url, key, isInit, dUrl, dFile) {\n            if (!showUpl && !showDwn && !showDel && !showZoom && !showDrag) {\n                return '';\n            }\n            var self = this, vUrl = url === false ? '' : ' data-url=\"' + url + '\"',\n                vKey = key === false ? '' : ' data-key=\"' + key + '\"', btnDelete = '', btnUpload = '', btnDownload = '',\n                btnZoom = '', btnDrag = '', css, template = self._getLayoutTemplate('actions'),\n                config = self.fileActionSettings,\n                otherButtons = self.otherActionButtons.setTokens({'dataKey': vKey, 'key': key}),\n                removeClass = disabled ? config.removeClass + ' disabled' : config.removeClass;\n            if (showDel) {\n                btnDelete = self._getLayoutTemplate('actionDelete').setTokens({\n                    'removeClass': removeClass,\n                    'removeIcon': config.removeIcon,\n                    'removeTitle': config.removeTitle,\n                    'dataUrl': vUrl,\n                    'dataKey': vKey,\n                    'key': key\n                });\n            }\n            if (showUpl) {\n                btnUpload = self._getLayoutTemplate('actionUpload').setTokens({\n                    'uploadClass': config.uploadClass,\n                    'uploadIcon': config.uploadIcon,\n                    'uploadTitle': config.uploadTitle\n                });\n            }\n            if (showDwn) {\n                btnDownload = self._getLayoutTemplate('actionDownload').setTokens({\n                    'downloadClass': config.downloadClass,\n                    'downloadIcon': config.downloadIcon,\n                    'downloadTitle': config.downloadTitle,\n                    'downloadUrl': dUrl || self.initialPreviewDownloadUrl\n                });\n                btnDownload = btnDownload.setTokens({'filename': dFile, 'key': key});\n            }\n            if (showZoom) {\n                btnZoom = self._getLayoutTemplate('actionZoom').setTokens({\n                    'zoomClass': config.zoomClass,\n                    'zoomIcon': config.zoomIcon,\n                    'zoomTitle': config.zoomTitle\n                });\n            }\n            if (showDrag && isInit) {\n                css = 'drag-handle-init ' + config.dragClass;\n                btnDrag = self._getLayoutTemplate('actionDrag').setTokens({\n                    'dragClass': css,\n                    'dragTitle': config.dragTitle,\n                    'dragIcon': config.dragIcon\n                });\n            }\n            return template.setTokens({\n                'delete': btnDelete,\n                'upload': btnUpload,\n                'download': btnDownload,\n                'zoom': btnZoom,\n                'drag': btnDrag,\n                'other': otherButtons\n            });\n        },\n        _browse: function (e) {\n            var self = this;\n            self._raise('filebrowse');\n            if (e && e.isDefaultPrevented()) {\n                return;\n            }\n            if (self.isError && !self.isAjaxUpload) {\n                self.clear();\n            }\n            self.$captionContainer.focus();\n        },\n        _filterDuplicate: function (file, files, fileIds) {\n            var self = this, fileId = self._getFileId(file);\n            if (fileId && fileIds && fileIds.indexOf(fileId) > -1) {\n                return;\n            }\n            if (!fileIds) {\n                fileIds = [];\n            }\n            files.push(file);\n            fileIds.push(fileId);\n        },\n        _change: function (e) {\n            var self = this, $el = self.$element;\n            if (!self.isAjaxUpload && $h.isEmpty($el.val()) && self.fileInputCleared) { // IE 11 fix\n                self.fileInputCleared = false;\n                return;\n            }\n            self.fileInputCleared = false;\n            var tfiles = [], msg, total, isDragDrop = arguments.length > 1, isAjaxUpload = self.isAjaxUpload, n, len,\n                files = isDragDrop ? e.originalEvent.dataTransfer.files : $el.get(0).files, ctr = self.filestack.length,\n                isSingleUpload = $h.isEmpty($el.attr('multiple')), flagSingle = (isSingleUpload && ctr > 0),\n                folders = 0, fileIds = self._getFileIds(), throwError = function (mesg, file, previewId, index) {\n                    var p1 = $.extend(true, {}, self._getOutData({}, {}, files), {id: previewId, index: index}),\n                        p2 = {id: previewId, index: index, file: file, files: files};\n                    return self.isAjaxUpload ? self._showUploadError(mesg, p1) : self._showError(mesg, p2);\n                };\n            self.reader = null;\n            self._resetUpload();\n            self._hideFileIcon();\n            if (self.isAjaxUpload) {\n                self.$container.find('.file-drop-zone .' + self.dropZoneTitleClass).remove();\n            }\n            if (isDragDrop) {\n                $.each(files, function (i, f) {\n                    if (f && !f.type && f.size !== undefined && f.size % 4096 === 0) {\n                        folders++;\n                    } else {\n                        self._filterDuplicate(f, tfiles, fileIds);\n                    }\n                });\n            } else {\n                if (e.target && e.target.files === undefined) {\n                    files = e.target.value ? [{name: e.target.value.replace(/^.+\\\\/, '')}] : [];\n                } else {\n                    files = e.target.files || {};\n                }\n                if (isAjaxUpload) {\n                    $.each(files, function (i, f) {\n                        self._filterDuplicate(f, tfiles, fileIds);\n                    });\n                } else {\n                    tfiles = files;\n                }\n            }\n            if ($h.isEmpty(tfiles) || tfiles.length === 0) {\n                if (!isAjaxUpload) {\n                    self.clear();\n                }\n                self._showFolderError(folders);\n                self._raise('fileselectnone');\n                return;\n            }\n            self._resetErrors();\n            len = tfiles.length;\n            total = self._getFileCount(self.isAjaxUpload ? (self.getFileStack().length + len) : len);\n            if (self.maxFileCount > 0 && total > self.maxFileCount) {\n                if (!self.autoReplace || len > self.maxFileCount) {\n                    n = (self.autoReplace && len > self.maxFileCount) ? len : total;\n                    msg = self.msgFilesTooMany.replace('{m}', self.maxFileCount).replace('{n}', n);\n                    self.isError = throwError(msg, null, null, null);\n                    self.$captionContainer.removeClass('icon-visible');\n                    self._setCaption('', true);\n                    self.$container.removeClass('file-input-new file-input-ajax-new');\n                    return;\n                }\n                if (total > self.maxFileCount) {\n                    self._resetPreviewThumbs(isAjaxUpload);\n                }\n            } else {\n                if (!isAjaxUpload || flagSingle) {\n                    self._resetPreviewThumbs(false);\n                    if (flagSingle) {\n                        self.clearStack();\n                    }\n                } else {\n                    if (isAjaxUpload && ctr === 0 && (!self.previewCache.count() || self.overwriteInitial)) {\n                        self._resetPreviewThumbs(true);\n                    }\n                }\n            }\n            if (self.isPreviewable) {\n                self.readFiles(tfiles);\n            } else {\n                self._updateFileDetails(1);\n            }\n            self._showFolderError(folders);\n        },\n        _abort: function (params) {\n            var self = this, data;\n            if (self.ajaxAborted && typeof self.ajaxAborted === \"object\" && self.ajaxAborted.message !== undefined) {\n                data = $.extend(true, {}, self._getOutData(), params);\n                data.abortData = self.ajaxAborted.data || {};\n                data.abortMessage = self.ajaxAborted.message;\n                self._setProgress(101, self.$progress, self.msgCancelled);\n                self._showUploadError(self.ajaxAborted.message, data, 'filecustomerror');\n                self.cancel();\n                return true;\n            }\n            return !!self.ajaxAborted;\n        },\n        _resetFileStack: function () {\n            var self = this, i = 0, newstack = [], newnames = [], newids = [];\n            self._getThumbs().each(function () {\n                var $thumb = $(this), ind = $thumb.attr('data-fileindex'), file = self.filestack[ind],\n                    pid = $thumb.attr('id'), newId;\n                if (ind === '-1' || ind === -1) {\n                    return;\n                }\n                if (file !== undefined) {\n                    newstack[i] = file;\n                    newnames[i] = self._getFileName(file);\n                    newids[i] = self._getFileId(file);\n                    $thumb.attr({'id': self.previewInitId + '-' + i, 'data-fileindex': i});\n                    i++;\n                } else {\n                    newId = 'uploaded-' + $h.uniqId();\n                    $thumb.attr({'id': newId, 'data-fileindex': '-1'});\n                    self.$preview.find('#zoom-' + pid).attr('id', 'zoom-' + newId);\n                }\n            });\n            self.filestack = newstack;\n            self.filenames = newnames;\n            self.fileids = newids;\n        },\n        _isFileSelectionValid: function (cnt) {\n            var self = this;\n            cnt = cnt || 0;\n            if (self.required && !self.getFilesCount()) {\n                self.$errorContainer.html('');\n                self._showUploadError(self.msgFileRequired);\n                return false;\n            }\n            if (self.minFileCount > 0 && self._getFileCount(cnt) < self.minFileCount) {\n                self._noFilesError({});\n                return false;\n            }\n            return true;\n        },\n        clearStack: function () {\n            var self = this;\n            self.filestack = [];\n            self.filenames = [];\n            self.fileids = [];\n            return self.$element;\n        },\n        updateStack: function (i, file) {\n            var self = this;\n            self.filestack[i] = file;\n            self.filenames[i] = self._getFileName(file);\n            self.fileids[i] = file && self._getFileId(file) || null;\n            return self.$element;\n        },\n        addToStack: function (file) {\n            var self = this;\n            self.filestack.push(file);\n            self.filenames.push(self._getFileName(file));\n            self.fileids.push(self._getFileId(file));\n            return self.$element;\n        },\n        getFileStack: function (skipNull) {\n            var self = this;\n            return self.filestack.filter(function (n) {\n                return (skipNull ? n !== undefined : n !== undefined && n !== null);\n            });\n        },\n        getFilesCount: function () {\n            var self = this, len = self.isAjaxUpload ? self.getFileStack().length : self.$element.get(0).files.length;\n            return self._getFileCount(len);\n        },\n        readFiles: function (files) {\n            this.reader = new FileReader();\n            var self = this, $el = self.$element, $preview = self.$preview, reader = self.reader,\n                $container = self.$previewContainer, $status = self.$previewStatus, msgLoading = self.msgLoading,\n                msgProgress = self.msgProgress, previewInitId = self.previewInitId, numFiles = files.length,\n                settings = self.fileTypeSettings, ctr = self.filestack.length, readFile,\n                fileTypes = self.allowedFileTypes, typLen = fileTypes ? fileTypes.length : 0,\n                fileExt = self.allowedFileExtensions, strExt = $h.isEmpty(fileExt) ? '' : fileExt.join(', '),\n                maxPreviewSize = self.maxFilePreviewSize && parseFloat(self.maxFilePreviewSize),\n                canPreview = $preview.length && (!maxPreviewSize || isNaN(maxPreviewSize)),\n                throwError = function (msg, file, previewId, index) {\n                    var p1 = $.extend(true, {}, self._getOutData({}, {}, files), {id: previewId, index: index}),\n                        p2 = {id: previewId, index: index, file: file, files: files}, $thumb;\n                    self._previewDefault(file, previewId, true);\n                    if (self.isAjaxUpload) {\n                        self.addToStack(undefined);\n                        setTimeout(function () {\n                            readFile(index + 1);\n                        }, 100);\n                    } else {\n                        numFiles = 0;\n                    }\n                    self._initFileActions();\n                    $thumb = $('#' + previewId);\n                    $thumb.find('.kv-file-upload').hide();\n                    if (self.removeFromPreviewOnError) {\n                        $thumb.remove();\n                    }\n                    self.isError = self.isAjaxUpload ? self._showUploadError(msg, p1) : self._showError(msg, p2);\n                    self._updateFileDetails(numFiles);\n                };\n\n            self.loadedImages = [];\n            self.totalImagesCount = 0;\n\n            $.each(files, function (key, file) {\n                var func = self.fileTypeSettings.image;\n                if (func && func(file.type)) {\n                    self.totalImagesCount++;\n                }\n            });\n            readFile = function (i) {\n                if ($h.isEmpty($el.attr('multiple'))) {\n                    numFiles = 1;\n                }\n                if (i >= numFiles) {\n                    if (self.isAjaxUpload && self.filestack.length > 0) {\n                        self._raise('filebatchselected', [self.getFileStack()]);\n                    } else {\n                        self._raise('filebatchselected', [files]);\n                    }\n                    $container.removeClass('file-thumb-loading');\n                    $status.html('');\n                    return;\n                }\n                var node = ctr + i, previewId = previewInitId + \"-\" + node, file = files[i], fSizeKB, j, msg,\n                    fnText = settings.text, fnImage = settings.image, fnHtml = settings.html, typ, chk, typ1, typ2,\n                    caption = file.name ? self.slug(file.name) : '', fileSize = (file.size || 0) / 1000,\n                    fileExtExpr = '', previewData = $h.objUrl.createObjectURL(file), fileCount = 0, strTypes = '',\n                    func, knownTypes = 0, isText, isHtml, isImage, txtFlag, processFileLoaded = function () {\n                        var msg = msgProgress.setTokens({\n                            'index': i + 1,\n                            'files': numFiles,\n                            'percent': 50,\n                            'name': caption\n                        });\n                        setTimeout(function () {\n                            $status.html(msg);\n                            self._updateFileDetails(numFiles);\n                            readFile(i + 1);\n                        }, 100);\n                        self._raise('fileloaded', [file, previewId, i, reader]);\n                    };\n                if (typLen > 0) {\n                    for (j = 0; j < typLen; j++) {\n                        typ1 = fileTypes[j];\n                        typ2 = self.msgFileTypes[typ1] || typ1;\n                        strTypes += j === 0 ? typ2 : ', ' + typ2;\n                    }\n                }\n                if (caption === false) {\n                    readFile(i + 1);\n                    return;\n                }\n                if (caption.length === 0) {\n                    msg = self.msgInvalidFileName.replace('{name}', $h.htmlEncode(file.name));\n                    throwError(msg, file, previewId, i);\n                    return;\n                }\n                if (!$h.isEmpty(fileExt)) {\n                    fileExtExpr = new RegExp('\\\\.(' + fileExt.join('|') + ')$', 'i');\n                }\n                fSizeKB = fileSize.toFixed(2);\n                if (self.maxFileSize > 0 && fileSize > self.maxFileSize) {\n                    msg = self.msgSizeTooLarge.setTokens({\n                        'name': caption,\n                        'size': fSizeKB,\n                        'maxSize': self.maxFileSize\n                    });\n                    throwError(msg, file, previewId, i);\n                    return;\n                }\n                if (self.minFileSize !== null && fileSize <= $h.getNum(self.minFileSize)) {\n                    msg = self.msgSizeTooSmall.setTokens({\n                        'name': caption,\n                        'size': fSizeKB,\n                        'minSize': self.minFileSize\n                    });\n                    throwError(msg, file, previewId, i);\n                    return;\n                }\n                if (!$h.isEmpty(fileTypes) && $h.isArray(fileTypes)) {\n                    for (j = 0; j < fileTypes.length; j += 1) {\n                        typ = fileTypes[j];\n                        func = settings[typ];\n                        fileCount += !func || (typeof func !== 'function') ? 0 : (func(file.type, file.name) ? 1 : 0);\n                    }\n                    if (fileCount === 0) {\n                        msg = self.msgInvalidFileType.setTokens({'name': caption, 'types': strTypes});\n                        throwError(msg, file, previewId, i);\n                        return;\n                    }\n                }\n                if (fileCount === 0 && !$h.isEmpty(fileExt) && $h.isArray(fileExt) && !$h.isEmpty(fileExtExpr)) {\n                    chk = $h.compare(caption, fileExtExpr);\n                    fileCount += $h.isEmpty(chk) ? 0 : chk.length;\n                    if (fileCount === 0) {\n                        msg = self.msgInvalidFileExtension.setTokens({'name': caption, 'extensions': strExt});\n                        throwError(msg, file, previewId, i);\n                        return;\n                    }\n                }\n                if (!self.showPreview) {\n                    if (self.isAjaxUpload) {\n                        self.addToStack(file);\n                    }\n                    setTimeout(function () {\n                        readFile(i + 1);\n                        self._updateFileDetails(numFiles);\n                    }, 100);\n                    self._raise('fileloaded', [file, previewId, i, reader]);\n                    return;\n                }\n                if (!canPreview && fileSize > maxPreviewSize) {\n                    self.addToStack(file);\n                    $container.addClass('file-thumb-loading');\n                    self._previewDefault(file, previewId);\n                    self._initFileActions();\n                    self._updateFileDetails(numFiles);\n                    readFile(i + 1);\n                    return;\n                }\n                if ($preview.length && FileReader !== undefined) {\n                    isText = fnText(file.type, caption);\n                    isHtml = fnHtml(file.type, caption);\n                    isImage = fnImage(file.type, caption);\n                    $status.html(msgLoading.replace('{index}', i + 1).replace('{files}', numFiles));\n                    $container.addClass('file-thumb-loading');\n                    reader.onerror = function (evt) {\n                        self._errorHandler(evt, caption);\n                    };\n                    reader.onload = function (theFile) {\n                        var hex, fileInfo, uint, byte, bytes = [], contents, mime, readTextImage = function (textFlag) {\n                            var newReader = new FileReader();\n                            newReader.onerror = function (theFileNew) {\n                                self._errorHandler(theFileNew, caption);\n                            };\n                            newReader.onload = function (theFileNew) {\n                                self._previewFile(i, file, theFileNew, previewId, previewData, fileInfo);\n                                self._initFileActions();\n                                processFileLoaded();\n                            };\n                            if (textFlag) {\n                                newReader.readAsText(file, self.textEncoding);\n                            } else {\n                                newReader.readAsDataURL(file);\n                            }\n                        };\n                        fileInfo = {'name': caption, 'type': file.type};\n                        $.each(settings, function (key, func) {\n                            if (key !== 'object' && key !== 'other' && func(file.type, caption)) {\n                                knownTypes++;\n                            }\n                        });\n                        if (knownTypes === 0) {// auto detect mime types from content if no known file types detected\n                            uint = new Uint8Array(theFile.target.result);\n                            for (j = 0; j < uint.length; j++) {\n                                byte = uint[j].toString(16);\n                                bytes.push(byte);\n                            }\n                            hex = bytes.join('').toLowerCase().substring(0, 8);\n                            mime = $h.getMimeType(hex, '', '');\n                            if ($h.isEmpty(mime)) { // look for ascii text content\n                                contents = $h.arrayBuffer2String(reader.result);\n                                mime = $h.isSvg(contents) ? 'image/svg+xml' : $h.getMimeType(hex, contents, file.type);\n                            }\n                            fileInfo = {'name': caption, 'type': mime};\n                            isText = fnText(mime, '');\n                            isHtml = fnHtml(mime, '');\n                            isImage = fnImage(mime, '');\n                            txtFlag = isText || isHtml;\n                            if (txtFlag || isImage) {\n                                readTextImage(txtFlag);\n                                return;\n                            }\n                        }\n                        self._previewFile(i, file, theFile, previewId, previewData, fileInfo);\n                        self._initFileActions();\n                        processFileLoaded();\n                    };\n                    reader.onprogress = function (data) {\n                        if (data.lengthComputable) {\n                            var fact = (data.loaded / data.total) * 100, progress = Math.ceil(fact);\n                            msg = msgProgress.setTokens({\n                                'index': i + 1,\n                                'files': numFiles,\n                                'percent': progress,\n                                'name': caption\n                            });\n                            setTimeout(function () {\n                                $status.html(msg);\n                            }, 100);\n                        }\n                    };\n\n                    if (isText || isHtml) {\n                        reader.readAsText(file, self.textEncoding);\n                    } else {\n                        if (isImage) {\n                            reader.readAsDataURL(file);\n                        } else {\n                            reader.readAsArrayBuffer(file);\n                        }\n                    }\n                } else {\n                    self._previewDefault(file, previewId);\n                    setTimeout(function () {\n                        readFile(i + 1);\n                        self._updateFileDetails(numFiles);\n                    }, 100);\n                    self._raise('fileloaded', [file, previewId, i, reader]);\n                }\n                self.addToStack(file);\n            };\n\n            readFile(0);\n            self._updateFileDetails(numFiles, false);\n        },\n        lock: function () {\n            var self = this;\n            self._resetErrors();\n            self.disable();\n            if (self.showRemove) {\n                self.$container.find('.fileinput-remove').hide();\n            }\n            if (self.showCancel) {\n                self.$container.find('.fileinput-cancel').show();\n            }\n            self._raise('filelock', [self.filestack, self._getExtraData()]);\n            return self.$element;\n        },\n        unlock: function (reset) {\n            var self = this;\n            if (reset === undefined) {\n                reset = true;\n            }\n            self.enable();\n            if (self.showCancel) {\n                self.$container.find('.fileinput-cancel').hide();\n            }\n            if (self.showRemove) {\n                self.$container.find('.fileinput-remove').show();\n            }\n            if (reset) {\n                self._resetFileStack();\n            }\n            self._raise('fileunlock', [self.filestack, self._getExtraData()]);\n            return self.$element;\n        },\n        cancel: function () {\n            var self = this, xhr = self.ajaxRequests, len = xhr.length, i;\n            if (len > 0) {\n                for (i = 0; i < len; i += 1) {\n                    self.cancelling = true;\n                    xhr[i].abort();\n                }\n            }\n            self._setProgressCancelled();\n            self._getThumbs().each(function () {\n                var $thumb = $(this), ind = $thumb.attr('data-fileindex');\n                $thumb.removeClass('file-uploading');\n                if (self.filestack[ind] !== undefined) {\n                    $thumb.find('.kv-file-upload').removeClass('disabled').removeAttr('disabled');\n                    $thumb.find('.kv-file-remove').removeClass('disabled').removeAttr('disabled');\n                }\n                self.unlock();\n            });\n            return self.$element;\n        },\n        clear: function () {\n            var self = this, cap;\n            if (!self._raise('fileclear')) {\n                return;\n            }\n            self.$btnUpload.removeAttr('disabled');\n            self._getThumbs().find('video,audio,img').each(function () {\n                $h.cleanMemory($(this));\n            });\n            self._resetUpload();\n            self.clearStack();\n            self._clearFileInput();\n            self._resetErrors(true);\n            if (self._hasInitialPreview()) {\n                self._showFileIcon();\n                self._resetPreview();\n                self._initPreviewActions();\n                self.$container.removeClass('file-input-new');\n            } else {\n                self._getThumbs().each(function () {\n                    self._clearObjects($(this));\n                });\n                if (self.isAjaxUpload) {\n                    self.previewCache.data = {};\n                }\n                self.$preview.html('');\n                cap = (!self.overwriteInitial && self.initialCaption.length > 0) ? self.initialCaption : '';\n                self.$caption.attr('title', '').val(cap);\n                $h.addCss(self.$container, 'file-input-new');\n                self._validateDefaultPreview();\n            }\n            if (self.$container.find($h.FRAMES).length === 0) {\n                if (!self._initCaption()) {\n                    self.$captionContainer.removeClass('icon-visible');\n                }\n            }\n            self._hideFileIcon();\n            self._raise('filecleared');\n            self.$captionContainer.focus();\n            self._setFileDropZoneTitle();\n            return self.$element;\n        },\n        reset: function () {\n            var self = this;\n            if (!self._raise('filereset')) {\n                return;\n            }\n            self._resetPreview();\n            self.$container.find('.fileinput-filename').text('');\n            $h.addCss(self.$container, 'file-input-new');\n            if (self.getFrames().length || self.isAjaxUpload && self.dropZoneEnabled) {\n                self.$container.removeClass('file-input-new');\n            }\n            self.clearStack();\n            self.formdata = {};\n            self._setFileDropZoneTitle();\n            return self.$element;\n        },\n        disable: function () {\n            var self = this;\n            self.isDisabled = true;\n            self._raise('filedisabled');\n            self.$element.attr('disabled', 'disabled');\n            self.$container.find(\".kv-fileinput-caption\").addClass(\"file-caption-disabled\");\n            self.$container.find(\".fileinput-remove, .fileinput-upload, .file-preview-frame button\")\n                .attr(\"disabled\", true);\n            $h.addCss(self.$container.find('.btn-file'), 'disabled');\n            self._initDragDrop();\n            return self.$element;\n        },\n        enable: function () {\n            var self = this;\n            self.isDisabled = false;\n            self._raise('fileenabled');\n            self.$element.removeAttr('disabled');\n            self.$container.find(\".kv-fileinput-caption\").removeClass(\"file-caption-disabled\");\n            self.$container.find(\".fileinput-remove, .fileinput-upload, .file-preview-frame button\")\n                .removeAttr(\"disabled\");\n            self.$container.find('.btn-file').removeClass('disabled');\n            self._initDragDrop();\n            return self.$element;\n        },\n        upload: function () {\n            var self = this, totLen = self.getFileStack().length, i, outData, len,\n                hasExtraData = !$.isEmptyObject(self._getExtraData());\n            if (!self.isAjaxUpload || self.isDisabled || !self._isFileSelectionValid(totLen)) {\n                return;\n            }\n            self._resetUpload();\n            if (totLen === 0 && !hasExtraData) {\n                self._showUploadError(self.msgUploadEmpty);\n                return;\n            }\n            self.$progress.show();\n            self.uploadCount = 0;\n            self.uploadStatus = {};\n            self.uploadLog = [];\n            self.lock();\n            self._setProgress(2);\n            if (totLen === 0 && hasExtraData) {\n                self._uploadExtraOnly();\n                return;\n            }\n            len = self.filestack.length;\n            self.hasInitData = false;\n            if (self.uploadAsync) {\n                outData = self._getOutData();\n                self._raise('filebatchpreupload', [outData]);\n                self.fileBatchCompleted = false;\n                self.uploadCache = {content: [], config: [], tags: [], append: true};\n                self.uploadAsyncCount = self.getFileStack().length;\n                for (i = 0; i < len; i++) {\n                    self.uploadCache.content[i] = null;\n                    self.uploadCache.config[i] = null;\n                    self.uploadCache.tags[i] = null;\n                }\n                self.$preview.find('.file-preview-initial').removeClass($h.SORT_CSS);\n                self._initSortable();\n                self.cacheInitialPreview = self.getPreview();\n\n                for (i = 0; i < len; i++) {\n                    if (self.filestack[i]) {\n                        self._uploadSingle(i, true);\n                    }\n                }\n                return;\n            }\n            self._uploadBatch();\n            return self.$element;\n        },\n        destroy: function () {\n            var self = this, $form = self.$form, $cont = self.$container, $el = self.$element, ns = self.namespace;\n            $(document).off(ns);\n            $(window).off(ns);\n            if ($form && $form.length) {\n                $form.off(ns);\n            }\n            if (self.isAjaxUpload) {\n                self._clearFileInput();\n            }\n            self._cleanup();\n            self._initPreviewCache();\n            $el.insertBefore($cont).off(ns).removeData();\n            $cont.off().remove();\n            return $el;\n        },\n        refresh: function (options, triggerChange) {\n            var self = this, $el = self.$element;\n            if (typeof options !== 'object' || $h.isEmpty(options)) {\n                options = self.options;\n            } else {\n                options = $.extend(true, {}, self.options, options);\n            }\n            self._init(options, true);\n            self._listen();\n            if (triggerChange) {\n                $el.trigger('change' + self.namespace);\n            }\n            return $el;\n        },\n        zoom: function (frameId) {\n            var self = this, $frame = self._getFrame(frameId), $modal = self.$modal;\n            if (!$frame) {\n                return;\n            }\n            $h.initModal($modal);\n            $modal.html(self._getModalContent());\n            self._setZoomContent($frame);\n            $modal.modal('show');\n            self._initZoomButtons();\n        },\n        getExif: function (frameId) {\n            var self = this, $frame = self._getFrame(frameId);\n            return $frame && $frame.data('exif') || null;\n        },\n        getFrames: function (cssFilter) {\n            var self = this;\n            cssFilter = cssFilter || '';\n            return self.$preview.find($h.FRAMES + cssFilter);\n        },\n        getPreview: function () {\n            var self = this;\n            return {\n                content: self.initialPreview,\n                config: self.initialPreviewConfig,\n                tags: self.initialPreviewThumbTags\n            };\n        }\n    };\n\n    $.fn.fileinput = function (option) {\n        if (!$h.hasFileAPISupport() && !$h.isIE(9)) {\n            return;\n        }\n        var args = Array.apply(null, arguments), retvals = [];\n        args.shift();\n        this.each(function () {\n            var self = $(this), data = self.data('fileinput'), options = typeof option === 'object' && option,\n                theme = options.theme || self.data('theme'), l = {}, t = {},\n                lang = options.language || self.data('language') || $.fn.fileinput.defaults.language || 'en', opt;\n            if (!data) {\n                if (theme) {\n                    t = $.fn.fileinputThemes[theme] || {};\n                }\n                if (lang !== 'en' && !$h.isEmpty($.fn.fileinputLocales[lang])) {\n                    l = $.fn.fileinputLocales[lang] || {};\n                }\n                opt = $.extend(true, {}, $.fn.fileinput.defaults, t, $.fn.fileinputLocales.en, l, options, self.data());\n                data = new FileInput(this, opt);\n                self.data('fileinput', data);\n            }\n\n            if (typeof option === 'string') {\n                retvals.push(data[option].apply(data, args));\n            }\n        });\n        switch (retvals.length) {\n            case 0:\n                return this;\n            case 1:\n                return retvals[0];\n            default:\n                return retvals;\n        }\n    };\n\n    $.fn.fileinput.defaults = {\n        language: 'en',\n        showCaption: true,\n        showBrowse: true,\n        showPreview: true,\n        showRemove: true,\n        showUpload: true,\n        showCancel: true,\n        showClose: true,\n        showUploadedThumbs: true,\n        browseOnZoneClick: false,\n        autoReplace: false,\n        autoOrientImage: true, // for JPEG images based on EXIF orientation tag\n        required: false,\n        rtl: false,\n        hideThumbnailContent: false,\n        generateFileId: null,\n        previewClass: '',\n        captionClass: '',\n        frameClass: 'krajee-default',\n        mainClass: 'file-caption-main',\n        mainTemplate: null,\n        purifyHtml: true,\n        fileSizeGetter: null,\n        initialCaption: '',\n        initialPreview: [],\n        initialPreviewDelimiter: '*$$*',\n        initialPreviewAsData: false,\n        initialPreviewFileType: 'image',\n        initialPreviewConfig: [],\n        initialPreviewThumbTags: [],\n        previewThumbTags: {},\n        initialPreviewShowDelete: true,\n        initialPreviewDownloadUrl: '',\n        removeFromPreviewOnError: false,\n        deleteUrl: '',\n        deleteExtraData: {},\n        overwriteInitial: true,\n        previewZoomButtonIcons: {\n            prev: '<i class=\"glyphicon glyphicon-triangle-left\"></i>',\n            next: '<i class=\"glyphicon glyphicon-triangle-right\"></i>',\n            toggleheader: '<i class=\"glyphicon glyphicon-resize-vertical\"></i>',\n            fullscreen: '<i class=\"glyphicon glyphicon-fullscreen\"></i>',\n            borderless: '<i class=\"glyphicon glyphicon-resize-full\"></i>',\n            close: '<i class=\"glyphicon glyphicon-remove\"></i>'\n        },\n        previewZoomButtonClasses: {\n            prev: 'btn btn-navigate',\n            next: 'btn btn-navigate',\n            toggleheader: 'btn btn-kv btn-default btn-outline-secondary',\n            fullscreen: 'btn btn-kv btn-default btn-outline-secondary',\n            borderless: 'btn btn-kv btn-default btn-outline-secondary',\n            close: 'btn btn-kv btn-default btn-outline-secondary'\n        },\n        preferIconicPreview: false,\n        preferIconicZoomPreview: false,\n        allowedPreviewTypes: undefined,\n        allowedPreviewMimeTypes: null,\n        allowedFileTypes: null,\n        allowedFileExtensions: null,\n        defaultPreviewContent: null,\n        customLayoutTags: {},\n        customPreviewTags: {},\n        previewFileIcon: '<i class=\"glyphicon glyphicon-file\"></i>',\n        previewFileIconClass: 'file-other-icon',\n        previewFileIconSettings: {},\n        previewFileExtSettings: {},\n        buttonLabelClass: 'hidden-xs',\n        browseIcon: '<i class=\"glyphicon glyphicon-folder-open\"></i>&nbsp;',\n        browseClass: 'btn btn-primary',\n        removeIcon: '<i class=\"glyphicon glyphicon-trash\"></i>',\n        removeClass: 'btn btn-default btn-secondary',\n        cancelIcon: '<i class=\"glyphicon glyphicon-ban-circle\"></i>',\n        cancelClass: 'btn btn-default btn-secondary',\n        uploadIcon: '<i class=\"glyphicon glyphicon-upload\"></i>',\n        uploadClass: 'btn btn-default btn-secondary',\n        uploadUrl: null,\n        uploadUrlThumb: null,\n        uploadAsync: true,\n        uploadExtraData: {},\n        zoomModalHeight: 480,\n        minImageWidth: null,\n        minImageHeight: null,\n        maxImageWidth: null,\n        maxImageHeight: null,\n        resizeImage: false,\n        resizePreference: 'width',\n        resizeQuality: 0.92,\n        resizeDefaultImageType: 'image/jpeg',\n        resizeIfSizeMoreThan: 0, // in KB\n        minFileSize: 0,\n        maxFileSize: 0,\n        maxFilePreviewSize: 25600, // 25 MB\n        minFileCount: 0,\n        maxFileCount: 0,\n        validateInitialCount: false,\n        msgValidationErrorClass: 'text-danger',\n        msgValidationErrorIcon: '<i class=\"glyphicon glyphicon-exclamation-sign\"></i> ',\n        msgErrorClass: 'file-error-message',\n        progressThumbClass: \"progress-bar bg-success progress-bar-success progress-bar-striped active\",\n        progressClass: \"progress-bar bg-success progress-bar-success progress-bar-striped active\",\n        progressCompleteClass: \"progress-bar bg-success progress-bar-success\",\n        progressErrorClass: \"progress-bar bg-danger progress-bar-danger\",\n        progressUploadThreshold: 99,\n        previewFileType: 'image',\n        elCaptionContainer: null,\n        elCaptionText: null,\n        elPreviewContainer: null,\n        elPreviewImage: null,\n        elPreviewStatus: null,\n        elErrorContainer: null,\n        errorCloseButton: $h.closeButton('kv-error-close'),\n        slugCallback: null,\n        dropZoneEnabled: true,\n        dropZoneTitleClass: 'file-drop-zone-title',\n        fileActionSettings: {},\n        otherActionButtons: '',\n        textEncoding: 'UTF-8',\n        ajaxSettings: {},\n        ajaxDeleteSettings: {},\n        showAjaxErrorDetails: true,\n        mergeAjaxCallbacks: false,\n        mergeAjaxDeleteCallbacks: false,\n        retryErrorUploads: true\n    };\n\n    $.fn.fileinputLocales.en = {\n        fileSingle: 'file',\n        filePlural: 'files',\n        browseLabel: 'Browse &hellip;',\n        removeLabel: 'Remove',\n        removeTitle: 'Clear selected files',\n        cancelLabel: 'Cancel',\n        cancelTitle: 'Abort ongoing upload',\n        uploadLabel: 'Upload',\n        uploadTitle: 'Upload selected files',\n        msgNo: 'No',\n        msgNoFilesSelected: 'No files selected',\n        msgCancelled: 'Cancelled',\n        msgPlaceholder: 'Select {files}...',\n        msgZoomModalHeading: 'Detailed Preview',\n        msgFileRequired: 'You must select a file to upload.',\n        msgSizeTooSmall: 'File \"{name}\" (<b>{size} KB</b>) is too small and must be larger than <b>{minSize} KB</b>.',\n        msgSizeTooLarge: 'File \"{name}\" (<b>{size} KB</b>) exceeds maximum allowed upload size of <b>{maxSize} KB</b>.',\n        msgFilesTooLess: 'You must select at least <b>{n}</b> {files} to upload.',\n        msgFilesTooMany: 'Number of files selected for upload <b>({n})</b> exceeds maximum allowed limit of <b>{m}</b>.',\n        msgFileNotFound: 'File \"{name}\" not found!',\n        msgFileSecured: 'Security restrictions prevent reading the file \"{name}\".',\n        msgFileNotReadable: 'File \"{name}\" is not readable.',\n        msgFilePreviewAborted: 'File preview aborted for \"{name}\".',\n        msgFilePreviewError: 'An error occurred while reading the file \"{name}\".',\n        msgInvalidFileName: 'Invalid or unsupported characters in file name \"{name}\".',\n        msgInvalidFileType: 'Invalid type for file \"{name}\". Only \"{types}\" files are supported.',\n        msgInvalidFileExtension: 'Invalid extension for file \"{name}\". Only \"{extensions}\" files are supported.',\n        msgFileTypes: {\n            'image': 'image',\n            'html': 'HTML',\n            'text': 'text',\n            'video': 'video',\n            'audio': 'audio',\n            'flash': 'flash',\n            'pdf': 'PDF',\n            'object': 'object'\n        },\n        msgUploadAborted: 'The file upload was aborted',\n        msgUploadThreshold: 'Processing...',\n        msgUploadBegin: 'Initializing...',\n        msgUploadEnd: 'Done',\n        msgUploadEmpty: 'No valid data available for upload.',\n        msgUploadError: 'Error',\n        msgValidationError: 'Validation Error',\n        msgLoading: 'Loading file {index} of {files} &hellip;',\n        msgProgress: 'Loading file {index} of {files} - {name} - {percent}% completed.',\n        msgSelected: '{n} {files} selected',\n        msgFoldersNotAllowed: 'Drag & drop files only! {n} folder(s) dropped were skipped.',\n        msgImageWidthSmall: 'Width of image file \"{name}\" must be at least {size} px.',\n        msgImageHeightSmall: 'Height of image file \"{name}\" must be at least {size} px.',\n        msgImageWidthLarge: 'Width of image file \"{name}\" cannot exceed {size} px.',\n        msgImageHeightLarge: 'Height of image file \"{name}\" cannot exceed {size} px.',\n        msgImageResizeError: 'Could not get the image dimensions to resize.',\n        msgImageResizeException: 'Error while resizing the image.<pre>{errors}</pre>',\n        msgAjaxError: 'Something went wrong with the {operation} operation. Please try again later!',\n        msgAjaxProgressError: '{operation} failed',\n        ajaxOperations: {\n            deleteThumb: 'file delete',\n            uploadThumb: 'file upload',\n            uploadBatch: 'batch file upload',\n            uploadExtra: 'form data upload'\n        },\n        dropZoneTitle: 'Drag & drop files here &hellip;',\n        dropZoneClickTitle: '<br>(or click to select {files})',\n        previewZoomButtonTitles: {\n            prev: 'View previous file',\n            next: 'View next file',\n            toggleheader: 'Toggle header',\n            fullscreen: 'Toggle full screen',\n            borderless: 'Toggle borderless mode',\n            close: 'Close detailed preview'\n        }\n    };\n\n    $.fn.fileinput.Constructor = FileInput;\n\n    /**\n     * Convert automatically file inputs with class 'file' into a bootstrap fileinput control.\n     */\n    $(document).ready(function () {\n        var $input = $('input.file[type=file]');\n        if ($input.length) {\n            $input.fileinput();\n        }\n    });\n}));"
  },
  {
    "path": "static/bootstrap/plugins/bootstrap-fileinput/4.4.7/js/locales/LANG.js",
    "content": "/*!\n * FileInput <_LANG_> Translations\n *\n * This file must be loaded after 'fileinput.js'. Patterns in braces '{}', or\n * any HTML markup tags in the messages must not be converted or translated.\n *\n * @see http://github.com/kartik-v/bootstrap-fileinput\n *\n * NOTE: this file must be saved in UTF-8 encoding.\n */\n(function ($) {\n    \"use strict\";\n\n    $.fn.fileinputLocales['_LANG_'] = {\n        fileSingle: 'file',\n        filePlural: 'files',\n        browseLabel: 'Browse &hellip;',\n        removeLabel: 'Remove',\n        removeTitle: 'Clear selected files',\n        cancelLabel: 'Cancel',\n        cancelTitle: 'Abort ongoing upload',\n        uploadLabel: 'Upload',\n        uploadTitle: 'Upload selected files',\n        msgNo: 'No',\n        msgNoFilesSelected: 'No files selected',\n        msgCancelled: 'Cancelled',\n        msgPlaceholder: 'Select {files}...',\n        msgZoomModalHeading: 'Detailed Preview',\n        msgFileRequired: 'You must select a file to upload.',\n        msgSizeTooSmall: 'File \"{name}\" (<b>{size} KB</b>) is too small and must be larger than <b>{minSize} KB</b>.',\n        msgSizeTooLarge: 'File \"{name}\" (<b>{size} KB</b>) exceeds maximum allowed upload size of <b>{maxSize} KB</b>.',\n        msgFilesTooLess: 'You must select at least <b>{n}</b> {files} to upload.',\n        msgFilesTooMany: 'Number of files selected for upload <b>({n})</b> exceeds maximum allowed limit of <b>{m}</b>.',\n        msgFileNotFound: 'File \"{name}\" not found!',\n        msgFileSecured: 'Security restrictions prevent reading the file \"{name}\".',\n        msgFileNotReadable: 'File \"{name}\" is not readable.',\n        msgFilePreviewAborted: 'File preview aborted for \"{name}\".',\n        msgFilePreviewError: 'An error occurred while reading the file \"{name}\".',\n        msgInvalidFileName: 'Invalid or unsupported characters in file name \"{name}\".',\n        msgInvalidFileType: 'Invalid type for file \"{name}\". Only \"{types}\" files are supported.',\n        msgInvalidFileExtension: 'Invalid extension for file \"{name}\". Only \"{extensions}\" files are supported.',\n        msgFileTypes: {\n            'image': 'image',\n            'html': 'HTML',\n            'text': 'text',\n            'video': 'video',\n            'audio': 'audio',\n            'flash': 'flash',\n            'pdf': 'PDF',\n            'object': 'object'\n        },\n        msgUploadAborted: 'The file upload was aborted',\n        msgUploadThreshold: 'Processing...',\n        msgUploadBegin: 'Initializing...',\n        msgUploadEnd: 'Done',\n        msgUploadEmpty: 'No valid data available for upload.',\n        msgUploadError: 'Error',\n        msgValidationError: 'Validation Error',\n        msgLoading: 'Loading file {index} of {files} &hellip;',\n        msgProgress: 'Loading file {index} of {files} - {name} - {percent}% completed.',\n        msgSelected: '{n} {files} selected',\n        msgFoldersNotAllowed: 'Drag & drop files only! Skipped {n} dropped folder(s).',\n        msgImageWidthSmall: 'Width of image file \"{name}\" must be at least {size} px.',\n        msgImageHeightSmall: 'Height of image file \"{name}\" must be at least {size} px.',\n        msgImageWidthLarge: 'Width of image file \"{name}\" cannot exceed {size} px.',\n        msgImageHeightLarge: 'Height of image file \"{name}\" cannot exceed {size} px.',\n        msgImageResizeError: 'Could not get the image dimensions to resize.',\n        msgImageResizeException: 'Error while resizing the image.<pre>{errors}</pre>',\n        msgAjaxError: 'Something went wrong with the {operation} operation. Please try again later!',\n        msgAjaxProgressError: '{operation} failed',\n        ajaxOperations: {\n            deleteThumb: 'file delete',\n            uploadThumb: 'file upload',\n            uploadBatch: 'batch file upload',\n            uploadExtra: 'form data upload'\n        },\n        dropZoneTitle: 'Drag & drop files here &hellip;',\n        dropZoneClickTitle: '<br>(or click to select {files})',\n        fileActionSettings: {\n            removeTitle: 'Remove file',\n            uploadTitle: 'Upload file',\n            uploadRetryTitle: 'Retry upload',\n            downloadTitle: 'Download file',\n            zoomTitle: 'View details',\n            dragTitle: 'Move / Rearrange',\n            indicatorNewTitle: 'Not uploaded yet',\n            indicatorSuccessTitle: 'Uploaded',\n            indicatorErrorTitle: 'Upload Error',\n            indicatorLoadingTitle: 'Uploading ...'\n        },\n        previewZoomButtonTitles: {\n            prev: 'View previous file',\n            next: 'View next file',\n            toggleheader: 'Toggle header',\n            fullscreen: 'Toggle full screen',\n            borderless: 'Toggle borderless mode',\n            close: 'Close detailed preview'\n        }\n    };\n})(window.jQuery);"
  },
  {
    "path": "static/bootstrap/plugins/bootstrap-fileinput/4.4.7/js/locales/ar.js",
    "content": "/*!\n * FileInput Arabic Translations\n *\n * This file must be loaded after 'fileinput.js'. Patterns in braces '{}', or\n * any HTML markup tags in the messages must not be converted or translated.\n *\n * @see http://github.com/kartik-v/bootstrap-fileinput\n * @author Yasser Lotfy <y_l@live.com>\n *\n * NOTE: this file must be saved in UTF-8 encoding.\n */\n(function ($) {\n    \"use strict\";\n\n    $.fn.fileinputLocales['ar'] = {\n        fileSingle: 'ملف',\n        filePlural: 'ملفات',\n        browseLabel: 'تصفح &hellip;',\n        removeLabel: 'إزالة',\n        removeTitle: 'إزالة الملفات المختارة',\n        cancelLabel: 'إلغاء',\n        cancelTitle: 'إنهاء الرفع الحالي',\n        uploadLabel: 'رفع',\n        uploadTitle: 'رفع الملفات المختارة',\n        msgNo: 'لا',\n        msgNoFilesSelected: '',\n        msgCancelled: 'ألغيت',\n        msgPlaceholder: 'Select {files}...',\n        msgZoomModalHeading: 'معاينة تفصيلية',\n        msgFileRequired: 'You must select a file to upload.',\n        msgSizeTooSmall: 'File \"{name}\" (<b>{size} KB</b>) is too small and must be larger than <b>{minSize} KB</b>.',\n        msgSizeTooLarge: 'الملف \"{name}\" (<b>{size} ك.ب</b>) تعدى الحد الأقصى المسموح للرفع <b>{maxSize} ك.ب</b>.',\n        msgFilesTooLess: 'يجب عليك اختيار <b>{n}</b> {files} على الأقل للرفع.',\n        msgFilesTooMany: 'عدد الملفات المختارة للرفع <b>({n})</b> تعدت الحد الأقصى المسموح به لعدد <b>{m}</b>.',\n        msgFileNotFound: 'الملف \"{name}\" غير موجود!',\n        msgFileSecured: 'قيود أمنية تمنع قراءة الملف \"{name}\".',\n        msgFileNotReadable: 'الملف \"{name}\" غير قابل للقراءة.',\n        msgFilePreviewAborted: 'تم إلغاء معاينة الملف \"{name}\".',\n        msgFilePreviewError: 'حدث خطأ أثناء قراءة الملف \"{name}\".',\n        msgInvalidFileName: 'Invalid or unsupported characters in file name \"{name}\".',\n        msgInvalidFileType: 'نوعية غير صالحة للملف \"{name}\". فقط هذه النوعيات مدعومة \"{types}\".',\n        msgInvalidFileExtension: 'امتداد غير صالح للملف \"{name}\". فقط هذه الملفات مدعومة \"{extensions}\".',\n        msgFileTypes: {\n            'image': 'image',\n            'html': 'HTML',\n            'text': 'text',\n            'video': 'video',\n            'audio': 'audio',\n            'flash': 'flash',\n            'pdf': 'PDF',\n            'object': 'object'\n        },\n        msgUploadAborted: 'تم إلغاء رفع الملف',\n        msgUploadThreshold: 'Processing...',\n        msgUploadBegin: 'Initializing...',\n        msgUploadEnd: 'Done',\n        msgUploadEmpty: 'No valid data available for upload.',\n        msgUploadError: 'Error',\n        msgValidationError: 'خطأ التحقق من صحة',\n        msgLoading: 'تحميل ملف {index} من {files} &hellip;',\n        msgProgress: 'تحميل ملف {index} من {files} - {name} - {percent}% منتهي.',\n        msgSelected: '{n} {files} مختار(ة)',\n        msgFoldersNotAllowed: 'اسحب وأفلت الملفات فقط! تم تخطي {n} مجلد(ات).',\n        msgImageWidthSmall: 'عرض ملف الصورة \"{name}\" يجب أن يكون على الأقل {size} px.',\n        msgImageHeightSmall: 'طول ملف الصورة \"{name}\" يجب أن يكون على الأقل {size} px.',\n        msgImageWidthLarge: 'عرض ملف الصورة \"{name}\" لا يمكن أن يتعدى {size} px.',\n        msgImageHeightLarge: 'طول ملف الصورة \"{name}\" لا يمكن أن يتعدى {size} px.',\n        msgImageResizeError: 'لم يتمكن من معرفة أبعاد الصورة لتغييرها.',\n        msgImageResizeException: 'حدث خطأ أثناء تغيير أبعاد الصورة.<pre>{errors}</pre>',\n        msgAjaxError: 'Something went wrong with the {operation} operation. Please try again later!',\n        msgAjaxProgressError: '{operation} failed',\n        ajaxOperations: {\n            deleteThumb: 'file delete',\n            uploadThumb: 'file upload',\n            uploadBatch: 'batch file upload',\n            uploadExtra: 'form data upload'\n        },\n        dropZoneTitle: 'اسحب وأفلت الملفات هنا &hellip;',\n        dropZoneClickTitle: '<br>(or click to select {files})',\n        fileActionSettings: {\n            removeTitle: 'إزالة الملف',\n            uploadTitle: 'رفع الملف',\n            uploadRetryTitle: 'Retry upload',\n            downloadTitle: 'Download file',\n            zoomTitle: 'مشاهدة التفاصيل',\n            dragTitle: 'Move / Rearrange',\n            indicatorNewTitle: 'لم يتم الرفع بعد',\n            indicatorSuccessTitle: 'تم الرفع',\n            indicatorErrorTitle: 'خطأ بالرفع',\n            indicatorLoadingTitle: 'جارٍ الرفع ...'\n        },\n        previewZoomButtonTitles: {\n            prev: 'View previous file',\n            next: 'View next file',\n            toggleheader: 'Toggle header',\n            fullscreen: 'Toggle full screen',\n            borderless: 'Toggle borderless mode',\n            close: 'Close detailed preview'\n        }\n    };\n})(window.jQuery);\n"
  },
  {
    "path": "static/bootstrap/plugins/bootstrap-fileinput/4.4.7/js/locales/az.js",
    "content": "/*!\n * FileInput Azerbaijan Translations\n *\n * This file must be loaded after 'fileinput.js'. Patterns in braces '{}', or\n * any HTML markup tags in the messages must not be converted or translated.\n *\n * @see http://github.com/kartik-v/bootstrap-fileinput\n * @author Elbrus <elbrusnt@gmail.com>\n *\n * NOTE: this file must be saved in UTF-8 encoding.\n */\n(function ($) {\n    \"use strict\";\n\n    $.fn.fileinputLocales['az'] = {\n        fileSingle: 'fayl',\n        filePlural: 'fayl',\n        browseLabel: 'Seç &hellip;',\n        removeLabel: 'Sil',\n        removeTitle: 'Seçilmiş faylları təmizlə',\n        cancelLabel: 'İmtina et',\n        cancelTitle: 'Cari yükləməni dayandır',\n        uploadLabel: 'Yüklə',\n        uploadTitle: 'Seçilmiş faylları yüklə',\n        msgNo: 'xeyir',\n        msgNoFilesSelected: 'Heç bir fayl seçilməmişdir',\n        msgCancelled: 'İmtina edildi',\n        msgPlaceholder: 'Select {files}...',\n        msgZoomModalHeading: 'İlkin baxış',\n        msgFileRequired: 'Yükləmə üçün fayl seçməlisiniz.',\n        msgSizeTooSmall: 'Seçdiyiniz \"{name}\" faylının həcmi (<b>{size} KB</b>)-dır,  minimum <b>{minSize} KB</b> olmalıdır.',\n        msgSizeTooLarge: 'Seçdiyiniz \"{name}\" faylının həcmi (<b>{size} KB</b>)-dır,  maksimum <b>{maxSize} KB</b> olmalıdır.',\n        msgFilesTooLess: 'Yükləmə üçün minimum <b>{n}</b> {files} seçməlisiniz.',\n        msgFilesTooMany: 'Seçilmiş fayl sayı <b>({n})</b>. Maksimum <b>{m}</b> fayl seçmək mümkündür.',\n        msgFileNotFound: 'Fayl \"{name}\" tapılmadı!',\n        msgFileSecured: '\"{name}\" faylının istifadəsinə yetginiz yoxdur.',\n        msgFileNotReadable: '\"{name}\" faylının istifadəsi mümkün deyil.',\n        msgFilePreviewAborted: '\"{name}\" faylı üçün ilkin baxış ləğv olunub.',\n        msgFilePreviewError: '\"{name}\" faylının oxunması mümkün olmadı.',\n        msgInvalidFileName: '\"{name}\" faylının adında qadağan olunmuş simvollardan istifadə olunmuşdur.',\n        msgInvalidFileType: '\"{name}\" faylının tipi dəstəklənmir. Yalnız \"{types}\" tipli faylları yükləmək mümkündür.',\n        msgInvalidFileExtension: '\"{name}\" faylının genişlənməsi yanlışdır. Yalnız \"{extensions}\" fayl genişlənmə(si / ləri) qəbul olunur.',\n        msgFileTypes: {\n            'image': 'image',\n            'html': 'HTML',\n            'text': 'text',\n            'video': 'video',\n            'audio': 'audio',\n            'flash': 'flash',\n            'pdf': 'PDF',\n            'object': 'object'\n        },\n        msgUploadAborted: 'Yükləmə dayandırılmışdır',\n        msgUploadThreshold: 'Yükləmə...',\n        msgUploadBegin: 'Yoxlama...',\n        msgUploadEnd: 'Fayl(lar) yükləndi',\n        msgUploadEmpty: 'Yükləmə üçün verilmiş məlumatlar yanlışdır',\n        msgUploadError: 'Error',\n        msgValidationError: 'Yoxlama nəticəsi səhvir',\n        msgLoading: '{files} fayldan {index} yüklənir &hellip;',\n        msgProgress: '{files} fayldan {index} - {name} - {percent}% yükləndi.',\n        msgSelected: 'Faylların sayı: {n}',\n        msgFoldersNotAllowed: 'Ancaq faylların daşınmasına icazə verilir! {n} qovluq yüklənmədi.',\n        msgImageWidthSmall: '{name} faylının eni {size} px -dən kiçik olmamalıdır.',\n        msgImageHeightSmall: '{name} faylının hündürlüyü {size} px -dən kiçik olmamalıdır.',\n        msgImageWidthLarge: '\"{name}\" faylının eni {size} px -dən böyük olmamalıdır.',\n        msgImageHeightLarge: '\"{name}\" faylının hündürlüyü {size} px -dən böyük olmamalıdır.',\n        msgImageResizeError: 'Faylın ölçülərini dəyişmək üçün ölçüləri hesablamaq mümkün olmadı.',\n        msgImageResizeException: 'Faylın ölçülərini dəyişmək mümkün olmadı.<pre>{errors}</pre>',\n        msgAjaxError: '{operation} əməliyyatı zamanı səhv baş verdi. Təkrar yoxlayın!',\n        msgAjaxProgressError: '{operation} əməliyyatı yerinə yetirmək mümkün olmadı.',\n        ajaxOperations: {\n            deleteThumb: 'faylı sil',\n            uploadThumb: 'faylı yüklə',\n            uploadBatch: 'bir neçə faylı yüklə',\n            uploadExtra: 'məlumatların yüklənməsi'\n        },\n        dropZoneTitle: 'Faylları bura daşıyın &hellip;',\n        dropZoneClickTitle: '<br>(Və ya seçin {files})',\n        fileActionSettings: {\n            removeTitle: 'Faylı sil',\n            uploadTitle: 'Faylı yüklə',\n            uploadRetryTitle: 'Retry upload',\n            downloadTitle: 'Download file',\n            zoomTitle: 'məlumatlara bax',\n            dragTitle: 'Yerini dəyiş və ya sırala',\n            indicatorNewTitle: 'Davam edir',\n            indicatorSuccessTitle: 'Tamamlandı',\n            indicatorErrorTitle: 'Yükləmə xətası',\n            indicatorLoadingTitle: 'Yükləmə ...'\n        },\n        previewZoomButtonTitles: {\n            prev: 'Əvvəlki fayla bax',\n            next: 'Növbəti fayla bax',\n            toggleheader: 'Başlığı dəyiş',\n            fullscreen: 'Tam ekranı dəyiş',\n            borderless: 'Bölmələrsiz rejimi dəyiş',\n            close: 'Ətraflı baxışı bağla'\n        }\n    };\n})(window.jQuery);\n"
  },
  {
    "path": "static/bootstrap/plugins/bootstrap-fileinput/4.4.7/js/locales/bg.js",
    "content": "/*!\n * FileInput Bulgarian Translations\n *\n * This file must be loaded after 'fileinput.js'. Patterns in braces '{}', or\n * any HTML markup tags in the messages must not be converted or translated.\n *\n * @see http://github.com/kartik-v/bootstrap-fileinput\n *\n * NOTE: this file must be saved in UTF-8 encoding.\n */\n(function ($) {\n    \"use strict\";\n\n    $.fn.fileinputLocales['bg'] = {\n        fileSingle: 'файл',\n        filePlural: 'файла',\n        browseLabel: 'Избери &hellip;',\n        removeLabel: 'Премахни',\n        removeTitle: 'Изчисти избраните',\n        cancelLabel: 'Откажи',\n        cancelTitle: 'Откажи качването',\n        uploadLabel: 'Качи',\n        uploadTitle: 'Качи избраните файлове',\n        msgNo: 'Не',\n        msgNoFilesSelected: '',\n        msgCancelled: 'Отменен',\n        msgPlaceholder: 'Select {files}...',\n        msgZoomModalHeading: 'Детайлен преглед',\n        msgFileRequired: 'You must select a file to upload.',\n        msgSizeTooSmall: 'File \"{name}\" (<b>{size} KB</b>) is too small and must be larger than <b>{minSize} KB</b>.',\n        msgSizeTooLarge: 'Файла \"{name}\" (<b>{size} KB</b>) надвишава максималните разрешени <b>{maxSize} KB</b>.',\n        msgFilesTooLess: 'Трябва да изберете поне <b>{n}</b> {files} файла.',\n        msgFilesTooMany: 'Броя файлове избрани за качване <b>({n})</b> надвишава ограниченито от максимум <b>{m}</b>.',\n        msgFileNotFound: 'Файлът \"{name}\" не може да бъде намерен!',\n        msgFileSecured: 'От съображения за сигурност не може да прочетем файла \"{name}\".',\n        msgFileNotReadable: 'Файлът \"{name}\" не е четим.',\n        msgFilePreviewAborted: 'Прегледа на файла е прекратен за \"{name}\".',\n        msgFilePreviewError: 'Грешка при опит за четене на файла \"{name}\".',\n        msgInvalidFileName: 'Invalid or unsupported characters in file name \"{name}\".',\n        msgInvalidFileType: 'Невалиден тип на файла \"{name}\". Разрешени са само \"{types}\".',\n        msgInvalidFileExtension: 'Невалидно разрешение на \"{name}\". Разрешени са само \"{extensions}\".',\n        msgFileTypes: {\n            'image': 'image',\n            'html': 'HTML',\n            'text': 'text',\n            'video': 'video',\n            'audio': 'audio',\n            'flash': 'flash',\n            'pdf': 'PDF',\n            'object': 'object'\n        },\n        msgUploadAborted: 'Качите файла, бе прекратена',\n        msgUploadThreshold: 'Processing...',\n        msgUploadBegin: 'Initializing...',\n        msgUploadEnd: 'Done',\n        msgUploadEmpty: 'No valid data available for upload.',\n        msgUploadError: 'Error',\n        msgValidationError: 'утвърждаване грешка',\n        msgLoading: 'Зареждане на файл {index} от общо {files} &hellip;',\n        msgProgress: 'Зареждане на файл {index} от общо {files} - {name} - {percent}% завършени.',\n        msgSelected: '{n} {files} избрани',\n        msgFoldersNotAllowed: 'Само пуснати файлове! Пропуснати {n} пуснати папки.',\n        msgImageWidthSmall: 'Широчината на изображението \"{name}\" трябва да е поне {size} px.',\n        msgImageHeightSmall: 'Височината на изображението \"{name}\" трябва да е поне {size} px.',\n        msgImageWidthLarge: 'Широчината на изображението \"{name}\" не може да е по-голяма от {size} px.',\n        msgImageHeightLarge: 'Височината на изображението \"{name}\" нее може да е по-голяма от {size} px.',\n        msgImageResizeError: 'Не може да размерите на изображението, за да промените размера.',\n        msgImageResizeException: 'Грешка при промяна на размера на изображението.<pre>{errors}</pre>',\n        msgAjaxError: 'Something went wrong with the {operation} operation. Please try again later!',\n        msgAjaxProgressError: '{operation} failed',\n        ajaxOperations: {\n            deleteThumb: 'file delete',\n            uploadThumb: 'file upload',\n            uploadBatch: 'batch file upload',\n            uploadExtra: 'form data upload'\n        },\n        dropZoneTitle: 'Пуснете файловете тук &hellip;',\n        dropZoneClickTitle: '<br>(or click to select {files})',\n        fileActionSettings: {\n            removeTitle: 'Махни файл',\n            uploadTitle: 'Качване на файл',\n            uploadRetryTitle: 'Retry upload',\n            downloadTitle: 'Download file',\n            zoomTitle: 'Вижте детайли',\n            dragTitle: 'Move / Rearrange',\n            indicatorNewTitle: 'Все още не е качил',\n            indicatorSuccessTitle: 'Качено',\n            indicatorErrorTitle: 'Качи Error',\n            indicatorLoadingTitle: 'Качва се ...'\n        },\n        previewZoomButtonTitles: {\n            prev: 'View previous file',\n            next: 'View next file',\n            toggleheader: 'Toggle header',\n            fullscreen: 'Toggle full screen',\n            borderless: 'Toggle borderless mode',\n            close: 'Close detailed preview'\n        }\n    };\n})(window.jQuery);\n"
  },
  {
    "path": "static/bootstrap/plugins/bootstrap-fileinput/4.4.7/js/locales/ca.js",
    "content": "/*!\n * FileInput Català Translations\n *\n * This file must be loaded after 'fileinput.js'. Patterns in braces '{}', or\n * any HTML markup tags in the messages must not be converted or translated.\n *\n * @see http://github.com/kartik-v/bootstrap-fileinput\n *\n * NOTE: this file must be saved in UTF-8 encoding.\n */\n(function ($) {\n    \"use strict\";\n\n    $.fn.fileinputLocales['ca'] = {\n        fileSingle: 'arxiu',\n        filePlural: 'arxius',\n        browseLabel: 'Examinar &hellip;',\n        removeLabel: 'Treure',\n        removeTitle: 'Treure arxius seleccionats',\n        cancelLabel: 'Cancel',\n        cancelTitle: 'Avortar la pujada en curs',\n        uploadLabel: 'Pujar arxiu',\n        uploadTitle: 'Pujar arxius seleccionats',\n        msgNo: 'No',\n        msgNoFilesSelected: '',\n        msgCancelled: 'cancel·lat',\n        msgPlaceholder: 'Select {files}...',\n        msgZoomModalHeading: 'Vista prèvia detallada',\n        msgFileRequired: 'You must select a file to upload.',\n        msgSizeTooSmall: 'File \"{name}\" (<b>{size} KB</b>) is too small and must be larger than <b>{minSize} KB</b>.',\n        msgSizeTooLarge: 'Arxiu \"{name}\" (<b>{size} KB</b>) excedeix la mida màxima permès de <b>{maxSize} KB</b>.',\n        msgFilesTooLess: 'Heu de seleccionar almenys <b>{n}</b> {files} a carregar.',\n        msgFilesTooMany: 'El nombre d\\'arxius seleccionats a carregar <b>({n})</b> excedeix el límit màxim permès de <b>{m}</b>.',\n        msgFileNotFound: 'Arxiu \"{name}\" no trobat.',\n        msgFileSecured: 'No es pot accedir a l\\'arxiu \"{name}\" perquè estarà sent usat per una altra aplicació o no tinguem permisos de lectura.',\n        msgFileNotReadable: 'No es pot accedir a l\\'arxiu \"{name}\".',\n        msgFilePreviewAborted: 'Previsualització de l\\'arxiu \"{name}\" cancel·lada.',\n        msgFilePreviewError: 'S\\'ha produït un error mentre es llegia el fitxer \"{name}\".',\n        msgInvalidFileName: 'Invalid or unsupported characters in file name \"{name}\".',\n        msgInvalidFileType: 'Tipus de fitxer no vàlid per a \"{name}\". Només arxius \"{types}\" són permesos.',\n        msgInvalidFileExtension: 'Extensió de fitxer no vàlid per a \"{name}\". Només arxius \"{extensions}\" són permesos.',\n        msgFileTypes: {\n            'image': 'image',\n            'html': 'HTML',\n            'text': 'text',\n            'video': 'video',\n            'audio': 'audio',\n            'flash': 'flash',\n            'pdf': 'PDF',\n            'object': 'object'\n        },\n        msgUploadAborted: 'La càrrega d\\'arxius s\\'ha cancel·lat',\n        msgUploadThreshold: 'Processing...',\n        msgUploadBegin: 'Initializing...',\n        msgUploadEnd: 'Done',\n        msgUploadEmpty: 'No valid data available for upload.',\n        msgUploadError: 'Error',\n        msgValidationError: 'Error de validació',\n        msgLoading: 'Pujant fitxer {index} de {files} &hellip;',\n        msgProgress: 'Pujant fitxer {index} de {files} - {name} - {percent}% completat.',\n        msgSelected: '{n} {files} seleccionat(s)',\n        msgFoldersNotAllowed: 'Arrossegueu i deixeu anar únicament arxius. Omesa(es) {n} carpeta(es).',\n        msgImageWidthSmall: 'L\\'ample de la imatge \"{name}\" ha de ser almenys {size} px.',\n        msgImageHeightSmall: 'L\\'alçada de la imatge \"{name}\" ha de ser almenys {size} px.',\n        msgImageWidthLarge: 'L\\'ample de la imatge \"{name}\" no pot excedir de {size} px.',\n        msgImageHeightLarge: 'L\\'alçada de la imatge \"{name}\" no pot excedir de {size} px.',\n        msgImageResizeError: 'No s\\'ha pogut obtenir les dimensions d\\'imatge per canviar la mida.',\n        msgImageResizeException: 'Error en canviar la mida de la imatge.<pre>{errors}</pre>',\n        msgAjaxError: 'Something went wrong with the {operation} operation. Please try again later!',\n        msgAjaxProgressError: '{operation} failed',\n        ajaxOperations: {\n            deleteThumb: 'file delete',\n            uploadThumb: 'file upload',\n            uploadBatch: 'batch file upload',\n            uploadExtra: 'form data upload'\n        },\n        dropZoneTitle: 'Arrossegueu i deixeu anar aquí els arxius &hellip;',\n        dropZoneClickTitle: '<br>(or click to select {files})',\n        fileActionSettings: {\n            removeTitle: 'Eliminar arxiu',\n            uploadTitle: 'Pujar arxiu',\n            uploadRetryTitle: 'Retry upload',\n            downloadTitle: 'Download file',\n            zoomTitle: 'Veure detalls',\n            dragTitle: 'Move / Rearrange',\n            indicatorNewTitle: 'No pujat encara',\n            indicatorSuccessTitle: 'Subido',\n            indicatorErrorTitle: 'Pujar Error',\n            indicatorLoadingTitle: 'Pujant ...'\n        },\n        previewZoomButtonTitles: {\n            prev: 'View previous file',\n            next: 'View next file',\n            toggleheader: 'Toggle header',\n            fullscreen: 'Toggle full screen',\n            borderless: 'Toggle borderless mode',\n            close: 'Close detailed preview'\n        }\n    };\n})(window.jQuery);\n"
  },
  {
    "path": "static/bootstrap/plugins/bootstrap-fileinput/4.4.7/js/locales/cr.js",
    "content": "/*!\n * FileInput Croatian Translations\n *\n * This file must be loaded after 'fileinput.js'. Patterns in braces '{}', or\n * any HTML markup tags in the messages must not be converted or translated.\n *\n * @see http://github.com/kartik-v/bootstrap-fileinput\n * @author Milos Stojanovic <stojanovic.loshmi@gmail.com>\n *\n * NOTE: this file must be saved in UTF-8 encoding.\n */\n(function ($) {\n    \"use strict\";\n\n    $.fn.fileinputLocales['cr'] = {\n        fileSingle: 'datoteka',\n        filePlural: 'datoteke',\n        browseLabel: 'Izaberi &hellip;',\n        removeLabel: 'Ukloni',\n        removeTitle: 'Ukloni označene datoteke',\n        cancelLabel: 'Odustani',\n        cancelTitle: 'Prekini trenutno otpremanje',\n        uploadLabel: 'Otpremi',\n        uploadTitle: 'Otpremi označene datoteke',\n        msgNo: 'Ne',\n        msgNoFilesSelected: '',\n        msgCancelled: 'Otkazan',\n        msgPlaceholder: 'Select {files}...',\n        msgZoomModalHeading: 'Detaljni pregled',\n        msgFileRequired: 'You must select a file to upload.',\n        msgSizeTooSmall: 'File \"{name}\" (<b>{size} KB</b>) is too small and must be larger than <b>{minSize} KB</b>.',\n        msgSizeTooLarge: 'Datoteka \"{name}\" (<b>{size} KB</b>) prekoračuje maksimalnu dozvoljenu veličinu datoteke od <b>{maxSize} KB</b>.',\n        msgFilesTooLess: 'Morate odabrati najmanje <b>{n}</b> {files} za otpremanje.',\n        msgFilesTooMany: 'Broj datoteka označenih za otpremanje <b>({n})</b> prekoračuje maksimalni dozvoljeni limit od <b>{m}</b>.',\n        msgFileNotFound: 'Datoteka \"{name}\" nije pronađena!',\n        msgFileSecured: 'Datoteku \"{name}\" nije moguće pročitati zbog bezbednosnih ograničenja.',\n        msgFileNotReadable: 'Datoteku \"{name}\" nije moguće pročitati.',\n        msgFilePreviewAborted: 'Generisanje prikaza nije moguće za \"{name}\".',\n        msgFilePreviewError: 'Došlo je do greške prilikom čitanja datoteke \"{name}\".',\n        msgInvalidFileName: 'Invalid or unsupported characters in file name \"{name}\".',\n        msgInvalidFileType: 'Datoteka \"{name}\" je pogrešnog formata. Dozvoljeni formati su \"{types}\".',\n        msgInvalidFileExtension: 'Ekstenzija datoteke \"{name}\" nije dozvoljena. Dozvoljene ekstenzije su \"{extensions}\".',\n        msgFileTypes: {\n            'image': 'image',\n            'html': 'HTML',\n            'text': 'text',\n            'video': 'video',\n            'audio': 'audio',\n            'flash': 'flash',\n            'pdf': 'PDF',\n            'object': 'object'\n        },\n        msgUploadAborted: 'Prijenos datoteka je prekinut',\n        msgUploadThreshold: 'Processing...',\n        msgUploadBegin: 'Initializing...',\n        msgUploadEnd: 'Done',\n        msgUploadEmpty: 'No valid data available for upload.',\n        msgUploadError: 'Error',\n        msgValidationError: 'Provjera pogrešaka',\n        msgLoading: 'Učitavanje datoteke {index} od {files} &hellip;',\n        msgProgress: 'Učitavanje datoteke {index} od {files} - {name} - {percent}% završeno.',\n        msgSelected: '{n} {files} je označeno',\n        msgFoldersNotAllowed: 'Moguće je prevlačiti samo datoteke! Preskočeno je {n} fascikla.',\n        msgImageWidthSmall: 'Širina slikovnu datoteku \"{name}\" moraju biti najmanje {size} px.',\n        msgImageHeightSmall: 'Visina slikovnu datoteku \"{name}\" moraju biti najmanje {size} px.',\n        msgImageWidthLarge: 'Širina slikovnu datoteku \"{name}\" ne može prelaziti {size} px.',\n        msgImageHeightLarge: 'Visina slikovnu datoteku \"{name}\" ne može prelaziti {size} px.',\n        msgImageResizeError: 'Nije mogao dobiti dimenzije slike na veličinu.',\n        msgImageResizeException: 'Greška prilikom promjene veličine slike.<pre>{errors}</pre>',\n        msgAjaxError: 'Something went wrong with the {operation} operation. Please try again later!',\n        msgAjaxProgressError: '{operation} failed',\n        ajaxOperations: {\n            deleteThumb: 'file delete',\n            uploadThumb: 'file upload',\n            uploadBatch: 'batch file upload',\n            uploadExtra: 'form data upload'\n        },\n        dropZoneTitle: 'Prevucite datoteke ovde &hellip;',\n        dropZoneClickTitle: '<br>(or click to select {files})',\n        fileActionSettings: {\n            removeTitle: 'Uklonite datoteku',\n            uploadTitle: 'Postavi datoteku',\n            uploadRetryTitle: 'Retry upload',\n            downloadTitle: 'Download file',\n            zoomTitle: 'Pregledavati pojedinosti',\n            dragTitle: 'Move / Rearrange',\n            indicatorNewTitle: 'Još nije učitao',\n            indicatorSuccessTitle: 'Preneseno',\n            indicatorErrorTitle: 'Postavi Greška',\n            indicatorLoadingTitle: 'Prijenos ...'\n        },\n        previewZoomButtonTitles: {\n            prev: 'View previous file',\n            next: 'View next file',\n            toggleheader: 'Toggle header',\n            fullscreen: 'Toggle full screen',\n            borderless: 'Toggle borderless mode',\n            close: 'Close detailed preview'\n        }\n    };\n})(window.jQuery);\n"
  },
  {
    "path": "static/bootstrap/plugins/bootstrap-fileinput/4.4.7/js/locales/cs.js",
    "content": "/*!\n * FileInput Czech Translations\n *\n * This file must be loaded after 'fileinput.js'. Patterns in braces '{}', or\n * any HTML markup tags in the messages must not be converted or translated.\n *\n * @see http://github.com/kartik-v/bootstrap-fileinput\n *\n * NOTE: this file must be saved in UTF-8 encoding.\n */\n(function ($) {\n    \"use strict\";\n\n    $.fn.fileinputLocales['cs'] = {\n        fileSingle: 'soubor',\n        filePlural: 'soubory',\n        browseLabel: 'Vybrat &hellip;',\n        removeLabel: 'Odstranit',\n        removeTitle: 'Vyčistit vybrané soubory',\n        cancelLabel: 'Storno',\n        cancelTitle: 'Přerušit  nahrávání',\n        uploadLabel: 'Nahrát',\n        uploadTitle: 'Nahrát vybrané soubory',\n        msgNo: 'Ne',\n        msgNoFilesSelected: 'Nevybrány žádné soubory',\n        msgCancelled: 'Zrušeno',\n        msgPlaceholder: 'Vybrat {files}...',\n        msgZoomModalHeading: 'Detailní náhled',\n        msgFileRequired: 'Musíte vybrat soubor, který chcete nahrát.',\n        msgSizeTooSmall: 'Soubor \"{name}\" (<b>{size} KB</b>) je příliš malý, musí mít velikost nejméně <b>{minSize} KB</b>.',\n        msgSizeTooLarge: 'Soubor \"{name}\" (<b>{size} KB</b>) je příliš velký, maximální povolená velikost <b>{maxSize} KB</b>.',\n        msgFilesTooLess: 'Musíte vybrat nejméně <b>{n}</b> {files} souborů.',\n        msgFilesTooMany: 'Počet vybraných souborů <b>({n})</b> překročil maximální povolený limit <b>{m}</b>.',\n        msgFileNotFound: 'Soubor \"{name}\" nebyl nalezen!',\n        msgFileSecured: 'Zabezpečení souboru znemožnilo číst soubor \"{name}\".',\n        msgFileNotReadable: 'Soubor \"{name}\" není čitelný.',\n        msgFilePreviewAborted: 'Náhled souboru byl přerušen pro \"{name}\".',\n        msgFilePreviewError: 'Nastala chyba při načtení souboru \"{name}\".',\n        msgInvalidFileName: 'Neplatné nebo nepovolené znaky ve jménu souboru \"{name}\".',\n        msgInvalidFileType: 'Neplatný typ souboru \"{name}\". Pouze \"{types}\" souborů jsou podporovány.',\n        msgInvalidFileExtension: 'Neplatná extenze souboru \"{name}\". Pouze \"{extensions}\" souborů jsou podporovány.',\n        msgFileTypes: {\n            'image': 'obrázek',\n            'html': 'HTML',\n            'text': 'text',\n            'video': 'video',\n            'audio': 'audio',\n            'flash': 'flash',\n            'pdf': 'PDF',\n            'object': 'object'\n        },\n        msgUploadAborted: 'Nahrávání souboru bylo přerušeno',\n        msgUploadThreshold: 'Zpracovávám...',\n        msgUploadBegin: 'Inicializujem...',\n        msgUploadEnd: 'Hotovo',\n        msgUploadEmpty: 'Pro nahrávání nejsou k dispozici žádné platné údaje.',\n        msgUploadError: 'Chyba',\n        msgValidationError: 'Chyba ověření',\n        msgLoading: 'Nahrávání souboru {index} z {files} &hellip;',\n        msgProgress: 'Nahrávání souboru {index} z {files} - {name} - {percent}% dokončeno.',\n        msgSelected: '{n} {files} vybráno',\n        msgFoldersNotAllowed: 'Táhni a pusť pouze soubory! Vynechané {n} pustěné složk(y).',\n        msgImageWidthSmall: 'Šířka obrázku \"{name}\", musí být alespoň {size} px.',\n        msgImageHeightSmall: 'Výška obrázku \"{name}\", musí být alespoň {size} px.',\n        msgImageWidthLarge: 'Šířka obrázku \"{name}\" nesmí být větší než {size} px.',\n        msgImageHeightLarge: 'Výška obrázku \"{name}\" nesmí být větší než {size} px.',\n        msgImageResizeError: 'Nelze získat rozměry obrázku pro změnu velikosti.',\n        msgImageResizeException: 'Chyba při změně velikosti obrázku.<pre>{errors}</pre>',\n        msgAjaxError: 'Došlo k chybě v {operation}. Prosím zkuste to znovu později!',\n        msgAjaxProgressError: '{operation} - neúspěšné',\n        ajaxOperations: {\n            deleteThumb: 'odstranit soubor',\n            uploadThumb: 'nahrát soubor',\n            uploadBatch: 'nahrát várku souborů',\n            uploadExtra: 'odesílání dat formuláře'\n        },\n        dropZoneTitle: 'Přetáhni soubory sem &hellip;',\n        dropZoneClickTitle: '<br>(nebo klikni sem a vyber je)',\n        fileActionSettings: {\n            removeTitle: 'Odstranit soubor',\n            uploadTitle: 'Nahrát soubor',\n            uploadRetryTitle: 'Opakovat nahrávání',\n            downloadTitle: 'Stáhnout soubor',\n            zoomTitle: 'Zobrazit podrobnosti',\n            dragTitle: 'Posunout / Přeskládat',\n            indicatorNewTitle: 'Ještě nenahrál',\n            indicatorSuccessTitle: 'Nahraný',\n            indicatorErrorTitle: 'Chyba nahrávání',\n            indicatorLoadingTitle: 'Nahrávání ...'\n        },\n        previewZoomButtonTitles: {\n            prev: 'Zobrazit předchozí soubor',\n            next: 'Zobrazit následující soubor',\n            toggleheader: 'Přepnout záhlaví',\n            fullscreen: 'Přepnout celoobrazovkové zobrazení',\n            borderless: 'Přepnout bezrámečkové zobrazení',\n            close: 'Zavřít detailní náhled'\n        }\n    };\n})(window.jQuery);\n"
  },
  {
    "path": "static/bootstrap/plugins/bootstrap-fileinput/4.4.7/js/locales/da.js",
    "content": "/*!\n * FileInput Danish Translations\n *\n * This file must be loaded after 'fileinput.js'. Patterns in braces '{}', or\n * any HTML markup tags in the messages must not be converted or translated.\n *\n * @see http://github.com/kartik-v/bootstrap-fileinput\n *\n * NOTE: this file must be saved in UTF-8 encoding.\n */\n(function ($) {\n    \"use strict\";\n    \n    $.fn.fileinputLocales['da'] = {\n        fileSingle: 'fil',\n        filePlural: 'filer',\n        browseLabel: 'Browse &hellip;',\n        removeLabel: 'Fjern',\n        removeTitle: 'Fjern valgte filer',\n        cancelLabel: 'Fortryd',\n        cancelTitle: 'Afbryd nuv&aelig;rende upload',\n        uploadLabel: 'Upload',\n        uploadTitle: 'Upload valgte filer',\n        msgNo: 'Ingen',\n        msgNoFilesSelected: '',\n        msgCancelled: 'aflyst',\n        msgPlaceholder: 'Select {files}...',\n        msgZoomModalHeading: 'Detaljeret visning',\n        msgFileRequired: 'You must select a file to upload.',\n        msgSizeTooSmall: 'File \"{name}\" (<b>{size} KB</b>) is too small and must be larger than <b>{minSize} KB</b>.',\n        msgSizeTooLarge: 'Fil \"{name}\" (<b>{size} KB</b>) er st&oslash;rre end de tilladte <b>{maxSize} KB</b>.',\n        msgFilesTooLess: 'Du skal mindst v&aelig;lge <b>{n}</b> {files} til upload.',\n        msgFilesTooMany: '<b>({n})</b> filer valgt til upload, men maks. <b>{m}</b> er tilladt.',\n        msgFileNotFound: 'Filen \"{name}\" blev ikke fundet!',\n        msgFileSecured: 'Sikkerhedsrestriktioner forhindrer l&aelig;sning af \"{name}\".',\n        msgFileNotReadable: 'Filen \"{name}\" kan ikke indl&aelig;ses.',\n        msgFilePreviewAborted: 'Filpreview annulleret for \"{name}\".',\n        msgFilePreviewError: 'Der skete en fejl under l&aelig;sningen af filen \"{name}\".',\n        msgInvalidFileName: 'Invalid or unsupported characters in file name \"{name}\".',\n        msgInvalidFileType: 'Ukendt type for filen \"{name}\". Kun \"{types}\" kan bruges.',\n        msgInvalidFileExtension: 'Ukendt filtype for filen \"{name}\". Kun \"{extensions}\" filer kan bruges.',\n        msgFileTypes: {\n            'image': 'image',\n            'html': 'HTML',\n            'text': 'text',\n            'video': 'video',\n            'audio': 'audio',\n            'flash': 'flash',\n            'pdf': 'PDF',\n            'object': 'object'\n        },\n        msgUploadAborted: 'Filupload annulleret',\n        msgUploadThreshold: 'Processing...',\n        msgUploadBegin: 'Initializing...',\n        msgUploadEnd: 'Done',\n        msgUploadEmpty: 'No valid data available for upload.',\n        msgUploadError: 'Error',\n        msgValidationError: 'Validering Fejl',\n        msgLoading: 'Henter fil {index} af {files} &hellip;',\n        msgProgress: 'Henter fil {index} af {files} - {name} - {percent}% f&aelig;rdiggjort.',\n        msgSelected: '{n} {files} valgt',\n        msgFoldersNotAllowed: 'Drag & drop kun filer! {n} mappe(r) sprunget over.',\n        msgImageWidthSmall: 'Bredden af billedet \"{name}\" skal v&aelig;re p&aring; mindst {size} px.',\n        msgImageHeightSmall: 'H&oslash;jden af billedet \"{name}\" skal v&aelig;re p&aring; mindst {size} px.',\n        msgImageWidthLarge: 'Bredden af billedet \"{name}\" m&aring; ikke v&aelig;re over {size} px.',\n        msgImageHeightLarge: 'H&oslash;jden af billedet \"{name}\" m&aring; ikke v&aelig;re over {size} px.',\n        msgImageResizeError: 'Kunne ikke få billedets dimensioner for at ændre størrelsen.',\n        msgImageResizeException: 'Fejl ved at ændre størrelsen på billedet.<pre>{errors}</pre>',\n        msgAjaxError: 'Something went wrong with the {operation} operation. Please try again later!',\n        msgAjaxProgressError: '{operation} failed',\n        ajaxOperations: {\n            deleteThumb: 'file delete',\n            uploadThumb: 'file upload',\n            uploadBatch: 'batch file upload',\n            uploadExtra: 'form data upload'\n        },\n        dropZoneTitle: 'Drag & drop filer her &hellip;',\n        dropZoneClickTitle: '<br>(or click to select {files})',\n        fileActionSettings: {\n            removeTitle: 'Fjern fil',\n            uploadTitle: 'Upload fil',\n            uploadRetryTitle: 'Retry upload',\n            downloadTitle: 'Download file',\n            zoomTitle: 'Se detaljer',\n            dragTitle: 'Move / Rearrange',\n            indicatorNewTitle: 'Ikke uploadet endnu',\n            indicatorSuccessTitle: 'Uploadet',\n            indicatorErrorTitle: 'Upload fejl',\n            indicatorLoadingTitle: 'Uploader ...'\n        },\n        previewZoomButtonTitles: {\n            prev: 'View previous file',\n            next: 'View next file',\n            toggleheader: 'Toggle header',\n            fullscreen: 'Toggle full screen',\n            borderless: 'Toggle borderless mode',\n            close: 'Close detailed preview'\n        }\n    };\n})(window.jQuery);"
  },
  {
    "path": "static/bootstrap/plugins/bootstrap-fileinput/4.4.7/js/locales/de.js",
    "content": "/*!\n * FileInput German Translations\n *\n * This file must be loaded after 'fileinput.js'. Patterns in braces '{}', or\n * any HTML markup tags in the messages must not be converted or translated.\n *\n * @see http://github.com/kartik-v/bootstrap-fileinput\n */\n(function ($) {\n    \"use strict\";\n\n    $.fn.fileinputLocales['de'] = {\n        fileSingle: 'Datei',\n        filePlural: 'Dateien',\n        browseLabel: 'Auswählen &hellip;',\n        removeLabel: 'Löschen',\n        removeTitle: 'Ausgewählte löschen',\n        cancelLabel: 'Abbrechen',\n        cancelTitle: 'Hochladen abbrechen',\n        uploadLabel: 'Hochladen',\n        uploadTitle: 'Hochladen der ausgewählten Dateien',\n        msgNo: 'Keine',\n        msgNoFilesSelected: 'Keine Dateien ausgewählt',\n        msgCancelled: 'Abgebrochen',\n        msgPlaceholder: '{files} auswählen...',\n        msgZoomModalHeading: 'ausführliche Vorschau',\n        msgFileRequired: 'Sie müssen eine Datei zum Hochladen auswählen.',\n        msgSizeTooSmall: 'Datei \"{name}\" (<b>{size} KB</b>) unterschreitet mindestens notwendige Upload-Größe von <b>{minSize} KB</b>.',\n        msgSizeTooLarge: 'Datei \"{name}\" (<b>{size} KB</b>) überschreitet maximal zulässige Upload-Größe von <b>{maxSize} KB</b>.',\n        msgFilesTooLess: 'Sie müssen mindestens <b>{n}</b> {files} zum Hochladen auswählen.',\n        msgFilesTooMany: 'Anzahl der zum Hochladen ausgewählten Dateien <b>({n})</b>, überschreitet maximal zulässige Grenze von <b>{m}</b> Stück.',\n        msgFileNotFound: 'Datei \"{name}\" wurde nicht gefunden!',\n        msgFileSecured: 'Sicherheitseinstellungen verhindern das Lesen der Datei \"{name}\".',\n        msgFileNotReadable: 'Die Datei \"{name}\" ist nicht lesbar.',\n        msgFilePreviewAborted: 'Dateivorschau abgebrochen für \"{name}\".',\n        msgFilePreviewError: 'Beim Lesen der Datei \"{name}\" ein Fehler aufgetreten.',\n        msgInvalidFileName: 'Ungültige oder nicht unterstützte Zeichen im Dateinamen \"{name}\".',\n        msgInvalidFileType: 'Ungültiger Typ für Datei \"{name}\". Nur Dateien der Typen \"{types}\" werden unterstützt.',\n        msgInvalidFileExtension: 'Ungültige Erweiterung für Datei \"{name}\". Nur Dateien mit der Endung \"{extensions}\" werden unterstützt.',\n        msgFileTypes: {\n            'image': 'image',\n            'html': 'HTML',\n            'text': 'text',\n            'video': 'video',\n            'audio': 'audio',\n            'flash': 'flash',\n            'pdf': 'PDF',\n            'object': 'object'\n        },\n        msgUploadAborted: 'Der Datei-Upload wurde abgebrochen',\n        msgUploadThreshold: 'Wird bearbeitet ...',\n        msgUploadBegin: 'Wird initialisiert ...',\n        msgUploadEnd: 'Erledigt',\n        msgUploadEmpty: 'Keine gültigen Daten zum Hochladen verfügbar.',\n        msgUploadError: 'Fehler',\n        msgValidationError: 'Validierungsfehler',\n        msgLoading: 'Lade Datei {index} von {files} hoch&hellip;',\n        msgProgress: 'Datei {index} von {files} - {name} - zu {percent}% fertiggestellt.',\n        msgSelected: '{n} {files} ausgewählt',\n        msgFoldersNotAllowed: 'Drag & Drop funktioniert nur bei Dateien! {n} Ordner übersprungen.',\n        msgImageWidthSmall: 'Breite der Bilddatei \"{name}\" muss mindestens {size} px betragen.',\n        msgImageHeightSmall: 'Höhe der Bilddatei \"{name}\" muss mindestens {size} px betragen.',\n        msgImageWidthLarge: 'Breite der Bilddatei \"{name}\" nicht überschreiten {size} px.',\n        msgImageHeightLarge: 'Höhe der Bilddatei \"{name}\" nicht überschreiten {size} px.',\n        msgImageResizeError: 'Konnte nicht die Bildabmessungen zu ändern.',\n        msgImageResizeException: 'Fehler beim Ändern der Größe des Bildes.<pre>{errors}</pre>',\n        msgAjaxError: 'Bei der Aktion {operation} ist ein Fehler aufgetreten. Bitte versuche es später noch einmal!',\n        msgAjaxProgressError: '{operation} fehlgeschlagen',\n        ajaxOperations: {\n            deleteThumb: 'Datei löschen',\n            uploadThumb: 'Datei hochladen',\n            uploadBatch: 'Batch-Datei-Upload',\n            uploadExtra: 'Formular-Datei-Upload'\n        },\n        dropZoneTitle: 'Dateien hierher ziehen &hellip;',\n        dropZoneClickTitle: '<br>(oder klicken um {files} auszuwählen)',\n        fileActionSettings: {\n            removeTitle: 'Datei entfernen',\n            uploadTitle: 'Datei hochladen',\n            uploadRetryTitle: 'Upload erneut versuchen',\n            downloadTitle: 'Datei herunterladen',\n            zoomTitle: 'Details anzeigen',\n            dragTitle: 'Verschieben / Neuordnen',\n            indicatorNewTitle: 'Noch nicht hochgeladen',\n            indicatorSuccessTitle: 'Hochgeladen',\n            indicatorErrorTitle: 'Upload Fehler',\n            indicatorLoadingTitle: 'Hochladen ...'\n        },\n        previewZoomButtonTitles: {\n            prev: 'Vorherige Datei anzeigen',\n            next: 'Nächste Datei anzeigen',\n            toggleheader: 'Header umschalten',\n            fullscreen: 'Vollbildmodus umschalten',\n            borderless: 'Randlosen Modus umschalten',\n            close: 'Detailansicht schließen'\n        }\n    };\n})(window.jQuery);\n"
  },
  {
    "path": "static/bootstrap/plugins/bootstrap-fileinput/4.4.7/js/locales/el.js",
    "content": "/*!\n * FileInput Greek Translations\n *\n * This file must be loaded after 'fileinput.js'. Patterns in braces '{}', or\n * any HTML markup tags in the messages must not be converted or translated.\n *\n * @see http://github.com/kartik-v/bootstrap-fileinput\n *\n * NOTE: this file must be saved in UTF-8 encoding.\n */\n(function ($) {\n    \"use strict\";\n\n    $.fn.fileinputLocales['el'] = {\n        fileSingle: 'αρχείο',\n        filePlural: 'αρχεία',\n        browseLabel: 'Αναζήτηση &hellip;',\n        removeLabel: 'Διαγραφή',\n        removeTitle: 'Εκκαθάριση αρχείων',\n        cancelLabel: 'Ακύρωση',\n        cancelTitle: 'Ακύρωση μεταφόρτωσης',\n        uploadLabel: 'Μεταφόρτωση',\n        uploadTitle: 'Μεταφόρτωση επιλεγμένων αρχείων',\n        msgNo: 'Όχι',\n        msgNoFilesSelected: 'Δεν επιλέχθηκαν αρχεία',\n        msgCancelled: 'Ακυρώθηκε',\n        msgPlaceholder: 'Select {files}...',\n        msgZoomModalHeading: 'Λεπτομερής Προεπισκόπηση',\n        msgFileRequired: 'You must select a file to upload.',\n        msgSizeTooSmall: 'Το \"{name}\" (<b>{size} KB</b>) είναι πολύ μικρό, πρέπει να είναι μεγαλύτερο από <b>{minSize} KB</b>.',\n        msgSizeTooLarge: 'Το αρχείο \"{name}\" (<b>{size} KB</b>) υπερβαίνει το μέγιστο επιτρεπόμενο μέγεθος μεταφόρτωσης <b>{maxSize} KB</b>.',\n        msgFilesTooLess: 'Πρέπει να επιλέξετε τουλάχιστον <b>{n}</b> {files} για να ξεκινήσει η μεταφόρτωση.',\n        msgFilesTooMany: 'Ο αριθμός των αρχείων που έχουν επιλεγεί για μεταφόρτωση <b>({n})</b> υπερβαίνει το μέγιστο επιτρεπόμενο αριθμό <b>{m}</b>.',\n        msgFileNotFound: 'Το αρχείο \"{name}\" δεν βρέθηκε!',\n        msgFileSecured: 'Περιορισμοί ασφαλείας εμπόδισαν την ανάγνωση του αρχείου \"{name}\".',\n        msgFileNotReadable: 'Το αρχείο \"{name}\" δεν είναι αναγνώσιμο.',\n        msgFilePreviewAborted: 'Η προεπισκόπηση του αρχείου \"{name}\" ακυρώθηκε.',\n        msgFilePreviewError: 'Παρουσιάστηκε σφάλμα κατά την ανάγνωση του αρχείου \"{name}\".',\n        msgInvalidFileName: 'Μη έγκυροι χαρακτήρες στο όνομα του αρχείου \"{name}\".',\n        msgInvalidFileType: 'Μη έγκυρος ο τύπος του αρχείου \"{name}\". Οι τύποι αρχείων που υποστηρίζονται είναι : \"{types}\".',\n        msgInvalidFileExtension: 'Μη έγκυρη η επέκταση του αρχείου \"{name}\". Οι επεκτάσεις που υποστηρίζονται είναι : \"{extensions}\".',\n        msgFileTypes: {\n            'image': 'image',\n            'html': 'HTML',\n            'text': 'text',\n            'video': 'video',\n            'audio': 'audio',\n            'flash': 'flash',\n            'pdf': 'PDF',\n            'object': 'object'\n        },\n        msgUploadAborted: 'Η μεταφόρτωση του αρχείου ματαιώθηκε',\n        msgUploadThreshold: 'Μεταφόρτωση ...',\n        msgUploadBegin: 'Initializing...',\n        msgUploadEnd: 'Done',\n        msgUploadEmpty: 'No valid data available for upload.',\n        msgUploadError: 'Error',\n        msgValidationError: 'Σφάλμα Επικύρωσης',\n        msgLoading: 'Φόρτωση αρχείου {index} από {files} &hellip;',\n        msgProgress: 'Φόρτωση αρχείου {index} απο {files} - {name} - {percent}% ολοκληρώθηκε.',\n        msgSelected: '{n} {files} επιλέχθηκαν',\n        msgFoldersNotAllowed: 'Μπορείτε να σύρετε μόνο αρχεία! Παραβλέφθηκαν {n} φάκελος(οι).',\n        msgImageWidthSmall: 'Το πλάτος του αρχείου εικόνας \"{name}\" πρέπει να είναι τουλάχιστον {size} px.',\n        msgImageHeightSmall: 'Το ύψος του αρχείου εικόνας \"{name}\" πρέπει να είναι τουλάχιστον {size} px.',\n        msgImageWidthLarge: 'Το πλάτος του αρχείου εικόνας \"{name}\" δεν μπορεί να υπερβαίνει το {size} px.',\n        msgImageHeightLarge: 'Το ύψος του αρχείου εικόνας \"{name}\" δεν μπορεί να υπερβαίνει το {size} px.',\n        msgImageResizeError: 'Δεν μπορούν να βρεθούν οι διαστάσεις της εικόνας για να αλλάγή μεγέθους.',\n        msgImageResizeException: 'Σφάλμα κατά την αλλαγή μεγέθους της εικόνας. <pre>{errors}</pre>',\n        msgAjaxError: 'Something went wrong with the {operation} operation. Please try again later!',\n        msgAjaxProgressError: '{operation} failed',\n        ajaxOperations: {\n            deleteThumb: 'file delete',\n            uploadThumb: 'file upload',\n            uploadBatch: 'batch file upload',\n            uploadExtra: 'form data upload'\n        },\n        dropZoneTitle: 'Σύρετε τα αρχεία εδώ &hellip;',\n        dropZoneClickTitle: '<br>(ή πατήστε για επιλογή {files})',\n        fileActionSettings: {\n            removeTitle: 'Αφαιρέστε το αρχείο',\n            uploadTitle: 'Μεταφορτώστε το αρχείο',\n            uploadRetryTitle: 'Retry upload',\n            downloadTitle: 'Download file',\n            zoomTitle: 'Δείτε λεπτομέρειες',\n            dragTitle: 'Μετακίνηση/Προσπαρμογή',\n            indicatorNewTitle: 'Δεν μεταφορτώθηκε ακόμα',\n            indicatorSuccessTitle: 'Μεταφορτώθηκε',\n            indicatorErrorTitle: 'Σφάλμα Μεταφόρτωσης',\n            indicatorLoadingTitle: 'Μεταφόρτωση ...'\n        },\n        previewZoomButtonTitles: {\n            prev: 'Προηγούμενο αρχείο',\n            next: 'Επόμενο αρχείο',\n            toggleheader: 'Εμφάνιση/Απόκρυψη τίτλου',\n            fullscreen: 'Εναλλαγή πλήρους οθόνης',\n            borderless: 'Με ή χωρίς πλαίσιο',\n            close: 'Κλείσιμο προβολής'\n        }\n    };\n})(window.jQuery);\n"
  },
  {
    "path": "static/bootstrap/plugins/bootstrap-fileinput/4.4.7/js/locales/es.js",
    "content": "/*!\n * FileInput Spanish Translations\n *\n * This file must be loaded after 'fileinput.js'. Patterns in braces '{}', or\n * any HTML markup tags in the messages must not be converted or translated.\n *\n * @see http://github.com/kartik-v/bootstrap-fileinput\n *\n * NOTE: this file must be saved in UTF-8 encoding.\n */\n(function ($) {\n    \"use strict\";\n\n    $.fn.fileinputLocales['es'] = {\n        fileSingle: 'archivo',\n        filePlural: 'archivos',\n        browseLabel: 'Examinar &hellip;',\n        removeLabel: 'Quitar',\n        removeTitle: 'Quitar archivos seleccionados',\n        cancelLabel: 'Cancelar',\n        cancelTitle: 'Abortar la subida en curso',\n        uploadLabel: 'Subir archivo',\n        uploadTitle: 'Subir archivos seleccionados',\n        msgNo: 'No',\n        msgNoFilesSelected: 'No hay archivos seleccionados',\n        msgCancelled: 'Cancelado',\n        msgPlaceholder: 'Seleccionar {files}...',\n        msgZoomModalHeading: 'Vista previa detallada',\n        msgFileRequired: 'Debes seleccionar un archivo para subir.',\n        msgSizeTooSmall: 'El archivo \"{name}\" (<b>{size} KB</b>) es demasiado pequeño y debe ser mayor de <b>{minSize} KB</b>.',\n        msgSizeTooLarge: 'El archivo \"{name}\" (<b>{size} KB</b>) excede el tamaño máximo permitido de <b>{maxSize} KB</b>.',\n        msgFilesTooLess: 'Debe seleccionar al menos <b>{n}</b> {files} a cargar.',\n        msgFilesTooMany: 'El número de archivos seleccionados a cargar <b>({n})</b> excede el límite máximo permitido de <b>{m}</b>.',\n        msgFileNotFound: 'Archivo \"{name}\" no encontrado.',\n        msgFileSecured: 'No es posible acceder al archivo \"{name}\" porque está siendo usado por otra aplicación o no tiene permisos de lectura.',\n        msgFileNotReadable: 'No es posible acceder al archivo \"{name}\".',\n        msgFilePreviewAborted: 'Previsualización del archivo \"{name}\" cancelada.',\n        msgFilePreviewError: 'Ocurrió un error mientras se leía el archivo \"{name}\".',\n        msgInvalidFileName: 'Caracteres no válidos o no soportados en el nombre del archivo \"{name}\".',\n        msgInvalidFileType: 'Tipo de archivo no válido para \"{name}\". Sólo se permiten archivos de tipo \"{types}\".',\n        msgInvalidFileExtension: 'Extensión de archivo no válida para \"{name}\". Sólo se permiten archivos \"{extensions}\".',\n        msgFileTypes: {\n            'image': 'image',\n            'html': 'HTML',\n            'text': 'text',\n            'video': 'video',\n            'audio': 'audio',\n            'flash': 'flash',\n            'pdf': 'PDF',\n            'object': 'object'\n        },\n        msgUploadAborted: 'La carga de archivos se ha cancelado',\n        msgUploadThreshold: 'Procesando...',\n        msgUploadBegin: 'Inicializando...',\n        msgUploadEnd: 'Hecho',\n        msgUploadEmpty: 'No existen datos válidos para el envío.',\n        msgUploadError: 'Error',\n        msgValidationError: 'Error de validación',\n        msgLoading: 'Subiendo archivo {index} de {files} &hellip;',\n        msgProgress: 'Subiendo archivo {index} de {files} - {name} - {percent}% completado.',\n        msgSelected: '{n} {files} seleccionado(s)',\n        msgFoldersNotAllowed: 'Arrastre y suelte únicamente archivos. Omitida(s) {n} carpeta(s).',\n        msgImageWidthSmall: 'El ancho de la imagen \"{name}\" debe ser de al menos {size} px.',\n        msgImageHeightSmall: 'La altura de la imagen \"{name}\" debe ser de al menos {size} px.',\n        msgImageWidthLarge: 'El ancho de la imagen \"{name}\" no puede exceder de {size} px.',\n        msgImageHeightLarge: 'La altura de la imagen \"{name}\" no puede exceder de {size} px.',\n        msgImageResizeError: 'No se pudieron obtener las dimensiones de la imagen para cambiar el tamaño.',\n        msgImageResizeException: 'Error al cambiar el tamaño de la imagen.<pre>{errors}</pre>',\n        msgAjaxError: 'Algo ha ido mal con la operación {operation}. Por favor, inténtelo de nuevo mas tarde.',\n        msgAjaxProgressError: 'La operación {operation} ha fallado',\n        ajaxOperations: {\n            deleteThumb: 'Archivo borrado',\n            uploadThumb: 'Archivo subido',\n            uploadBatch: 'Datos subidos en lote',\n            uploadExtra: 'Datos del formulario subidos '\n        },\n        dropZoneTitle: 'Arrastre y suelte aquí los archivos &hellip;',\n        dropZoneClickTitle: '<br>(o haga clic para seleccionar {files})',\n        fileActionSettings: {\n            removeTitle: 'Eliminar archivo',\n            uploadTitle: 'Subir archivo',\n            uploadRetryTitle: 'Reintentar subir',\n            downloadTitle: 'Descargar archivo',\n            zoomTitle: 'Ver detalles',\n            dragTitle: 'Mover / Reordenar',\n            indicatorNewTitle: 'No subido todavía',\n            indicatorSuccessTitle: 'Subido',\n            indicatorErrorTitle: 'Error al subir',\n            indicatorLoadingTitle: 'Subiendo...'\n        },\n        previewZoomButtonTitles: {\n            prev: 'Anterior',\n            next: 'Siguiente',\n            toggleheader: 'Mostrar encabezado',\n            fullscreen: 'Pantalla completa',\n            borderless: 'Modo sin bordes',\n            close: 'Cerrar vista detallada'\n        }\n    };\n})(window.jQuery);\n"
  },
  {
    "path": "static/bootstrap/plugins/bootstrap-fileinput/4.4.7/js/locales/et.js",
    "content": "/*!\n * FileInput Estonian Translations\n *\n * This file must be loaded after 'fileinput.js'. Patterns in braces '{}', or\n * any HTML markup tags in the messages must not be converted or translated.\n *\n * @see http://github.com/kartik-v/bootstrap-fileinput\n *\n * NOTE: this file must be saved in UTF-8 encoding.\n */\n(function ($) {\n    \"use strict\";\n\n    $.fn.fileinputLocales['et'] = {\n        fileSingle: 'fail',\n        filePlural: 'failid',\n        browseLabel: 'Sirvi &hellip;',\n        removeLabel: 'Eemalda',\n        removeTitle: 'Clear selected files',\n        cancelLabel: 'Tühista',\n        cancelTitle: 'Abort ongoing upload',\n        uploadLabel: 'Salvesta',\n        uploadTitle: 'Salvesta valitud failid',\n        msgNo: 'No',\n        msgNoFilesSelected: 'No files selected',\n        msgCancelled: 'Cancelled',\n        msgPlaceholder: 'Select {files}...',\n        msgZoomModalHeading: 'Detailed Preview',\n        msgFileRequired: 'You must select a file to upload.',\n        msgSizeTooSmall: 'File \"{name}\" (<b>{size} KB</b>) is too small and must be larger than <b>{minSize} KB</b>.',\n        msgSizeTooLarge: 'Fail \"{name}\" (<b>{size} KB</b>) ületab lubatu suuruse <b>{maxSize} KB</b>.',\n        msgFilesTooLess: 'You must select at least <b>{n}</b> {files} to upload.',\n        msgFilesTooMany: 'Number of files selected for upload <b>({n})</b> exceeds maximum allowed limit of <b>{m}</b>.',\n        msgFileNotFound: 'File \"{name}\" not found!',\n        msgFileSecured: 'Security restrictions prevent reading the file \"{name}\".',\n        msgFileNotReadable: 'File \"{name}\" is not readable.',\n        msgFilePreviewAborted: 'File preview aborted for \"{name}\".',\n        msgFilePreviewError: 'An error occurred while reading the file \"{name}\".',\n        msgInvalidFileName: 'Invalid or unsupported characters in file name \"{name}\".',\n        msgInvalidFileType: '\"{name}\" on vale tüüpi. Ainult \"{types}\" on lubatud.',\n        msgInvalidFileExtension: 'Invalid extension for file \"{name}\". Only \"{extensions}\" files are supported.',\n        msgFileTypes: {\n            'image': 'image',\n            'html': 'HTML',\n            'text': 'text',\n            'video': 'video',\n            'audio': 'audio',\n            'flash': 'flash',\n            'pdf': 'PDF',\n            'object': 'object'\n        },\n        msgUploadAborted: 'The file upload was aborted',\n        msgUploadThreshold: 'Processing...',\n        msgUploadBegin: 'Initializing...',\n        msgUploadEnd: 'Done',\n        msgUploadEmpty: 'No valid data available for upload.',\n        msgUploadError: 'Error',\n        msgValidationError: 'Validation Error',\n        msgLoading: 'Loading file {index} of {files} &hellip;',\n        msgProgress: 'Loading file {index} of {files} - {name} - {percent}% completed.',\n        msgSelected: '{n} {files} selected',\n        msgFoldersNotAllowed: 'Drag & drop files only! Skipped {n} dropped folder(s).',\n        msgImageWidthSmall: 'Pildi laius peab olema vähemalt {size} px.',\n        msgImageHeightSmall: 'Pildi kõrgus peab olema vähemalt {size} px.',\n        msgImageWidthLarge: 'Width of image file \"{name}\" cannot exceed {size} px.',\n        msgImageHeightLarge: 'Height of image file \"{name}\" cannot exceed {size} px.',\n        msgImageResizeError: 'Could not get the image dimensions to resize.',\n        msgImageResizeException: 'Error while resizing the image.<pre>{errors}</pre>',\n        msgAjaxError: 'Something went wrong with the {operation} operation. Please try again later!',\n        msgAjaxProgressError: '{operation} failed',\n        ajaxOperations: {\n            deleteThumb: 'file delete',\n            uploadThumb: 'file upload',\n            uploadBatch: 'batch file upload',\n            uploadExtra: 'form data upload'\n        },\n        dropZoneTitle: 'Lohista failid siia &hellip;',\n        dropZoneClickTitle: '<br>(or click to select {files})',\n        fileActionSettings: {\n            removeTitle: 'Eemalda fail',\n            uploadTitle: 'Salvesta fail',\n            uploadRetryTitle: 'Retry upload',\n            zoomTitle: 'Vaata detaile',\n            dragTitle: 'Liiguta / Korralda',\n            indicatorNewTitle: 'Pole veel salvestatud',\n            indicatorSuccessTitle: 'Uploaded',\n            indicatorErrorTitle: 'Salvestamise viga',\n            indicatorLoadingTitle: 'Salvestan ...'\n        },\n        previewZoomButtonTitles: {\n            prev: 'View previous file',\n            next: 'View next file',\n            toggleheader: 'Toggle header',\n            fullscreen: 'Toggle full screen',\n            borderless: 'Toggle borderless mode',\n            close: 'Close detailed preview'\n        }\n    };\n})(window.jQuery);"
  },
  {
    "path": "static/bootstrap/plugins/bootstrap-fileinput/4.4.7/js/locales/fa.js",
    "content": "/*!\n * FileInput Persian Translations\n *\n * This file must be loaded after 'fileinput.js'. Patterns in braces '{}', or\n * any HTML markup tags in the messages must not be converted or translated.\n *\n * @see http://github.com/kartik-v/bootstrap-fileinput\n * @author Milad Nekofar <milad@nekofar.com>\n *\n * NOTE: this file must be saved in UTF-8 encoding.\n */\n(function ($) {\n    \"use strict\";\n\n    $.fn.fileinputLocales['fa'] = {\n        fileSingle: 'فایل',\n        filePlural: 'فایل‌ها',\n        browseLabel: 'مرور &hellip;',\n        removeLabel: 'حذف',\n        removeTitle: 'پاکسازی فایل‌های انتخاب شده',\n        cancelLabel: 'لغو',\n        cancelTitle: 'لغو بارگزاری جاری',\n        uploadLabel: 'بارگذاری',\n        uploadTitle: 'بارگذاری فایل‌های انتخاب شده',\n        msgNo: 'نه',\n        msgNoFilesSelected: 'هیچ فایلی انتخاب نشده است',\n        msgCancelled: 'لغو شد',\n        msgPlaceholder: 'Select {files}...',\n        msgZoomModalHeading: 'نمایش با جزییات',\n        msgFileRequired: 'You must select a file to upload.',\n        msgSizeTooSmall: 'فایل \"{name}\" (<b>{size} کیلوبایت</b>) خیلی کوچک است و باید از <b>{minSize} کیلوبایت بزرگتر باشد</b>.',\n        msgSizeTooLarge: 'فایل \"{name}\" (<b>{size} کیلوبایت</b>) از حداکثر مجاز <b>{maxSize} کیلوبایت</b> بزرگتر است.',\n        msgFilesTooLess: 'شما باید حداقل <b>{n}</b> {files} فایل برای بارگذاری انتخاب کنید.',\n        msgFilesTooMany: 'تعداد فایل‌های انتخاب شده برای بارگذاری <b>({n})</b> از حداکثر مجاز عبور کرده است <b>{m}</b>.',\n        msgFileNotFound: 'فایل \"{name}\" یافت نشد!',\n        msgFileSecured: 'محدودیت های امنیتی مانع خواندن فایل \"{name}\" است.',\n        msgFileNotReadable: 'فایل \"{name}\" قابل نوشتن نیست.',\n        msgFilePreviewAborted: 'پیش نمایش فایل \"{name}\". به مشکل خورد',\n        msgFilePreviewError: 'در هنگام خواندن فایل \"{name}\" خطایی رخ داد.',\n        msgInvalidFileName: 'کاراکترهای غیرمجاز و یا ناشناخته در نام فایل \"{name}\".',\n        msgInvalidFileType: 'نوع فایل \"{name}\" معتبر نیست. فقط \"{types}\" پشیبانی می‌شوند.',\n        msgInvalidFileExtension: 'پسوند فایل \"{name}\" معتبر نیست. فقط \"{extensions}\" پشتیبانی می‌شوند.',\n        msgFileTypes: {\n            'image': 'عکس',\n            'html': 'اچ تا ام ال',\n            'text': 'متن',\n            'video': 'ویدئو',\n            'audio': 'صدا',\n            'flash': 'فلش',\n            'pdf': 'پی دی اف',\n            'object': 'دیگر'\n        },\n        msgUploadAborted: 'بارگذاری فایل به مشکل خورد.',\n        msgUploadThreshold: 'در حال پردازش...',\n        msgUploadBegin: 'در حال شروع...',\n        msgUploadEnd: 'انجام شد',\n        msgUploadEmpty: 'هیچ داده معتبری برای بارگذاری موجود نیست.',\n        msgUploadError: 'Error',\n        msgValidationError: 'خطای اعتبار سنجی',\n        msgLoading: 'بارگیری فایل {index} از {files} &hellip;',\n        msgProgress: 'بارگیری فایل {index} از {files} - {name} - {percent}% تمام شد.',\n        msgSelected: '{n} {files} انتخاب شده',\n        msgFoldersNotAllowed: 'فقط فایل‌ها را بکشید و رها کنید! {n} پوشه نادیده گرفته شد.',\n        msgImageWidthSmall: 'عرض فایل تصویر \"{name}\" باید حداقل {size} پیکسل باشد.',\n        msgImageHeightSmall: 'ارتفاع فایل تصویر \"{name}\" باید حداقل {size} پیکسل باشد.',\n        msgImageWidthLarge: 'عرض فایل تصویر \"{name}\" نمیتواند از {size} پیکسل بیشتر باشد.',\n        msgImageHeightLarge: 'ارتفاع فایل تصویر \"{name}\" نمی‌تواند از {size} پیکسل بیشتر باشد.',\n        msgImageResizeError: 'یافت نشد ابعاد تصویر را برای تغییر اندازه.',\n        msgImageResizeException: 'خطا در هنگام تغییر اندازه تصویر.<pre>{errors}</pre>',\n        msgAjaxError: 'به نظر مشکلی در حین {operation} روی داده است. لطفا دوباره تلاش کنید!',\n        msgAjaxProgressError: '{operation} لغو شد',\n        ajaxOperations: {\n            deleteThumb: 'حذف فایل',\n            uploadThumb: 'بارگذاری فایل',\n            uploadBatch: 'بارگذاری جمعی فایلها',\n            uploadExtra: 'بارگذاری با کمک فُرم'\n        },\n        dropZoneTitle: 'فایل‌ها را بکشید و در اینجا رها کنید &hellip;',\n        dropZoneClickTitle: '<br>(یا برای انتخاب {files} کلیک کنید)',\n        fileActionSettings: {\n            removeTitle: 'حذف فایل',\n            uploadTitle: 'آپلود فایل',\n            uploadRetryTitle: 'Retry upload',\n            downloadTitle: 'Download file',\n            zoomTitle: 'دیدن جزئیات',\n            dragTitle: 'جابجایی / چیدمان',\n            indicatorNewTitle: 'آپلود نشده است',\n            indicatorSuccessTitle: 'آپلود شده',\n            indicatorErrorTitle: 'بارگذاری خطا',\n            indicatorLoadingTitle: 'آپلود ...'\n        },\n        previewZoomButtonTitles: {\n            prev: 'مشاهده فایل قبلی',\n            next: 'مشاهده فایل بعدی',\n            toggleheader: 'نمایش عنوان',\n            fullscreen: 'نمایش تمام صفحه',\n            borderless: 'نمایش حاشیه',\n            close: 'بستن نمایش با جزییات'\n        }\n    };\n})(window.jQuery);\n"
  },
  {
    "path": "static/bootstrap/plugins/bootstrap-fileinput/4.4.7/js/locales/fi.js",
    "content": "/*!\n * FileInput Finnish Translations\n *\n * This file must be loaded after 'fileinput.js'. Patterns in braces '{}', or\n * any HTML markup tags in the messages must not be converted or translated.\n *\n * @see http://github.com/kartik-v/bootstrap-fileinput\n *\n * NOTE: this file must be saved in UTF-8 encoding.\n */\n(function ($) {\n    \"use strict\";\n\n    $.fn.fileinputLocales.fi = {\n        fileSingle: 'tiedosto',\n        filePlural: 'tiedostot',\n        browseLabel: 'Selaa &hellip;',\n        removeLabel: 'Poista',\n        removeTitle: 'Tyhj&auml;nn&auml; valitut tiedostot',\n        cancelLabel: 'Peruuta',\n        cancelTitle: 'Peruuta lataus',\n        uploadLabel: 'Lataa',\n        uploadTitle: 'Lataa valitut tiedostot',\n        msgNoFilesSelected: '',\n        msgFileRequired: 'You must select a file to upload.',\n        msgSizeTooSmall: 'File \"{name}\" (<b>{size} KB</b>) is too small and must be larger than <b>{minSize} KB</b>.',\n        msgSizeTooLarge: 'Tiedosto \"{name}\" (<b>{size} Kt</b>) ylitt&auml;&auml; suurimman sallitun tiedoston koon, joka on <b>{maxSize} Kt</b>. Yrit&auml; uudelleen!',\n        msgFilesTooLess: 'V&auml;hint&auml;&auml;n <b>{n}</b> {files} tiedostoa on valittava ladattavaksi. Ole hyv&auml; ja yrit&auml; uudelleen!',\n        msgFilesTooMany: 'Valittujen tiedostojen lukum&auml;&auml;r&auml; <b>({n})</b> ylitt&auml;&auml; suurimman sallitun m&auml;&auml;r&auml;n <b>{m}</b>. Ole hyv&auml; ja yrit&auml; uudelleen!',\n        msgFileNotFound: 'Tiedostoa \"{name}\" ei l&ouml;ydy!',\n        msgFileSecured: 'Tietoturvarajoitukset est&auml;v&auml;t tiedoston \"{name}\" lukemisen.',\n        msgFileNotReadable: 'Tiedosto \"{name}\" ei ole luettavissa.',\n        msgFilePreviewAborted: 'Tiedoston \"{name}\" esikatselu keskeytetty.',\n        msgFilePreviewError: 'Virhe on tapahtunut luettaessa tiedostoa \"{name}\".',\n        msgInvalidFileName: 'Invalid or unsupported characters in file name \"{name}\".',\n        msgInvalidFileType: 'Tiedosto \"{name}\" on v&auml;&auml;r&auml;n tyyppinen. Ainoastaan tiedostot tyyppi&auml; \"{types}\" ovat tuettuja.',\n        msgInvalidFileExtension: 'Tiedoston \"{name}\" tarkenne on ep&auml;kelpo. Ainoastaan tarkenteet \"{extensions}\" ovat tuettuja.',\n        msgFileTypes: {\n            'image': 'Kuva',\n            'html': 'HTML',\n            'text': 'Teksti',\n            'video': 'Video',\n            'audio': 'Ääni',\n            'flash': 'Flash',\n            'pdf': 'PDF',\n            'object': 'Olio'\n        },\n        msgUploadThreshold: 'Käsitellään...',\n        msgUploadBegin: 'Initializing...',\n        msgUploadEnd: 'Done',\n        msgUploadEmpty: 'Ei ladattavaa dataa.',\n        msgUploadError: 'Error',\n        msgValidationError: 'Tiedoston latausvirhe',\n        msgLoading: 'Ladataan tiedostoa {index} / {files} &hellip;',\n        msgProgress: 'Ladataan tiedostoa {index} / {files} - {name} - {percent}% valmistunut.',\n        msgSelected: '{n} tiedostoa valittu',\n        msgFoldersNotAllowed: 'Raahaa ja pudota ainoastaan tiedostoja! Ohitettu {n} raahattua kansiota.',\n        msgAjaxError: 'Something went wrong with the {operation} operation. Please try again later!',\n        msgAjaxProgressError: '{operation} failed',\n        ajaxOperations: {\n            deleteThumb: 'file delete',\n            uploadThumb: 'file upload',\n            uploadBatch: 'batch file upload',\n            uploadExtra: 'form data upload'\n        },\n        dropZoneTitle: 'Raahaa ja pudota tiedostot t&auml;h&auml;n &hellip;',\n        dropZoneClickTitle: '<br>(tai valitse hiirellä {files})',\n        fileActionSettings: {\n            removeTitle: 'Poista tiedosto',\n            uploadTitle: 'Upload file',\n            uploadRetryTitle: 'Retry upload',\n            downloadTitle: 'Download file',\n            zoomTitle: 'Yksityiskohdat',\n            dragTitle: 'Siirrä / Järjestele',\n            indicatorNewTitle: 'Ei ladattu',\n            indicatorSuccessTitle: 'Ladattu',\n            indicatorErrorTitle: 'Lataus epäonnistui',\n            indicatorLoadingTitle: 'Ladataan ...'\n        },\n        previewZoomButtonTitles: {\n            prev: 'Seuraava tiedosto',\n            next: 'Edellinen tiedosto',\n            toggleheader: 'Näytä otsikko',\n            fullscreen: 'Kokonäytön tila',\n            borderless: 'Rajaton tila',\n            close: 'Sulje esikatselu'\n        }\n    };\n\n    $.extend($.fn.fileinput.defaults, $.fn.fileinputLocales.fi);\n})(window.jQuery);\n"
  },
  {
    "path": "static/bootstrap/plugins/bootstrap-fileinput/4.4.7/js/locales/fr.js",
    "content": "/*!\n * FileInput French Translations\n *\n * This file must be loaded after 'fileinput.js'. Patterns in braces '{}', or\n * any HTML markup tags in the messages must not be converted or translated.\n *\n * @see http://github.com/kartik-v/bootstrap-fileinput\n *\n * NOTE: this file must be saved in UTF-8 encoding.\n */\n(function ($) {\n    \"use strict\";\n\n    $.fn.fileinputLocales['fr'] = {\n        fileSingle: 'fichier',\n        filePlural: 'fichiers',\n        browseLabel: 'Parcourir&hellip;',\n        removeLabel: 'Retirer',\n        removeTitle: 'Retirer les fichiers sélectionnés',\n        cancelLabel: 'Annuler',\n        cancelTitle: \"Annuler l'envoi en cours\",\n        uploadLabel: 'Transférer',\n        uploadTitle: 'Transférer les fichiers sélectionnés',\n        msgNo: 'Non',\n        msgNoFilesSelected: '',\n        msgCancelled: 'Annulé',\n        msgPlaceholder: 'Sélectionner le(s) {files}...',\n        msgZoomModalHeading: 'Aperçu détaillé',\n        msgFileRequired: 'Vous devez sélectionner un fichier à uploader.',\n        msgSizeTooSmall: 'Le fichier \"{name}\" (<b>{size} KB</b>) est inférieur à la taille minimale de <b>{minSize} KB</b>.',\n        msgSizeTooLarge: 'Le fichier \"{name}\" (<b>{size} Ko</b>) dépasse la taille maximale autorisée qui est de <b>{maxSize} Ko</b>.',\n        msgFilesTooLess: 'Vous devez sélectionner au moins <b>{n}</b> {files} à transmettre.',\n        msgFilesTooMany: 'Le nombre de fichier sélectionné <b>({n})</b> dépasse la quantité maximale autorisée qui est de <b>{m}</b>.',\n        msgFileNotFound: 'Le fichier \"{name}\" est introuvable !',\n        msgFileSecured: \"Des restrictions de sécurité vous empêchent d'accéder au fichier \\\"{name}\\\".\",\n        msgFileNotReadable: 'Le fichier \"{name}\" est illisible.',\n        msgFilePreviewAborted: 'Prévisualisation du fichier \"{name}\" annulée.',\n        msgFilePreviewError: 'Une erreur est survenue lors de la lecture du fichier \"{name}\".',\n        msgInvalidFileName: 'Caractères invalides ou non supportés dans le nom de fichier \"{name}\".',\n        msgInvalidFileType: 'Type de document invalide pour \"{name}\". Seulement les documents de type \"{types}\" sont autorisés.',\n        msgInvalidFileExtension: 'Extension invalide pour le fichier \"{name}\". Seules les extensions \"{extensions}\" sont autorisées.',\n        msgFileTypes: {\n            'image': 'image',\n            'html': 'HTML',\n            'text': 'text',\n            'video': 'video',\n            'audio': 'audio',\n            'flash': 'flash',\n            'pdf': 'PDF',\n            'object': 'object'\n        },\n        msgUploadAborted: 'Le transfert du fichier a été interrompu',\n        msgUploadThreshold: 'En cours...',\n        msgUploadBegin: 'Initialisation...',\n        msgUploadEnd: 'Terminé',\n        msgUploadEmpty: 'Aucune donnée valide disponible pour transmission.',\n        msgUploadError: 'Erreur',\n        msgValidationError: 'Erreur de validation',\n        msgLoading: 'Transmission du fichier {index} sur {files}&hellip;',\n        msgProgress: 'Transmission du fichier {index} sur {files} - {name} - {percent}%.',\n        msgSelected: '{n} {files} sélectionné(s)',\n        msgFoldersNotAllowed: 'Glissez et déposez uniquement des fichiers ! {n} répertoire(s) exclu(s).',\n        msgImageWidthSmall: 'La largeur de l\\'image \"{name}\" doit être d\\'au moins {size} px.',\n        msgImageHeightSmall: 'La hauteur de l\\'image \"{name}\" doit être d\\'au moins {size} px.',\n        msgImageWidthLarge: 'La largeur de l\\'image \"{name}\" ne peut pas dépasser {size} px.',\n        msgImageHeightLarge: 'La hauteur de l\\'image \"{name}\" ne peut pas dépasser {size} px.',\n        msgImageResizeError: \"Impossible d'obtenir les dimensions de l'image à redimensionner.\",\n        msgImageResizeException: \"Erreur lors du redimensionnement de l'image.<pre>{errors}</pre>\",\n        msgAjaxError: \"Une erreur s'est produite pendant l'opération de {operation}. Veuillez réessayer plus tard.\",\n        msgAjaxProgressError: 'L\\'opération \"{operation}\" a échoué',\n        ajaxOperations: {\n            deleteThumb: 'suppression du fichier',\n            uploadThumb: 'transfert du fichier',\n            uploadBatch: 'transfert des fichiers',\n            uploadExtra: 'soumission des données de formulaire'\n        },\n        dropZoneTitle: 'Glissez et déposez les fichiers ici&hellip;',\n        dropZoneClickTitle: '<br>(ou cliquez pour sélectionner manuellement)',\n        fileActionSettings: {\n            removeTitle: 'Supprimer le fichier',\n            uploadTitle: 'Transférer le fichier',\n            uploadRetryTitle: 'Relancer le transfert',\n            zoomTitle: 'Voir les détails',\n            dragTitle: 'Déplacer / Réarranger',\n            indicatorNewTitle: 'Pas encore transféré',\n            indicatorSuccessTitle: 'Posté',\n            indicatorErrorTitle: 'Ajouter erreur',\n            indicatorLoadingTitle: 'En cours...'\n        },\n        previewZoomButtonTitles: {\n            prev: 'Voir le fichier précédent',\n            next: 'Voir le fichier suivant',\n            toggleheader: 'Masquer le titre',\n            fullscreen: 'Mode plein écran',\n            borderless: 'Mode cinéma',\n            close: \"Fermer l'aperçu\"\n        }\n    };\n})(window.jQuery);\n"
  },
  {
    "path": "static/bootstrap/plugins/bootstrap-fileinput/4.4.7/js/locales/gl.js",
    "content": "/*!\n * FileInput Galician Translations\n *\n * This file must be loaded after 'fileinput.js'. Patterns in braces '{}', or\n * any HTML markup tags in the messages must not be converted or translated.\n *\n * @see http://github.com/kartik-v/bootstrap-fileinput\n *\n * NOTE: this file must be saved in UTF-8 encoding.\n */\n(function ($) {\n    \"use strict\";\n\n    $.fn.fileinputLocales['gl'] = {\n        fileSingle: 'arquivo',\n        filePlural: 'arquivos',\n        browseLabel: 'Examinar &hellip;',\n        removeLabel: 'Quitar',\n        removeTitle: 'Quitar aquivos seleccionados',\n        cancelLabel: 'Cancelar',\n        cancelTitle: 'Abortar a subida en curso',\n        uploadLabel: 'Subir arquivo',\n        uploadTitle: 'Subir arquivos seleccionados',\n        msgNo: 'Non',\n        msgNoFilesSelected: 'Non hay arquivos seleccionados',\n        msgCancelled: 'Cancelado',\n        msgPlaceholder: 'Select {files}...',\n        msgZoomModalHeading: 'Vista previa detallada',\n        msgFileRequired: 'You must select a file to upload.',\n        msgSizeTooSmall: 'O arquivo \"{name}\" (<b>{size} KB</b>) é demasiado pequeño e debe ser maior de <b>{minSize} KB</b>.',\n        msgSizeTooLarge: 'El arquivo \"{name}\" (<b>{size} KB</b>) excede o tamaño máximo permitido de <b>{maxSize} KB</b>.',\n        msgFilesTooLess: 'Debe seleccionar al menos <b>{n}</b> {files} a cargar.',\n        msgFilesTooMany: 'O número de arquivos seleccionados a cargar <b>({n})</b> excede do límite máximo permitido de <b>{m}</b>.',\n        msgFileNotFound: 'Arquivo \"{name}\" non encontrado.',\n        msgFileSecured: 'Non é posible acceder o arquivo \"{name}\" porque estará sendo usado por outra aplicación ou non teñamos permisos de lectura.',\n        msgFileNotReadable: 'Non é posible acceder o archivo \"{name}\".',\n        msgFilePreviewAborted: 'Previsualización do arquivo \"{name}\" cancelada.',\n        msgFilePreviewError: 'Ocurriu un erro mentras se lía o arquivo \"{name}\".',\n        msgInvalidFileName: 'Caracteres non válidos o no soportados no nome do arquivos \"{name}\".',\n        msgInvalidFileType: 'Tipo de archivo no válido para \"{name}\". Sólo se permiten arquivos do tipo \"{types}\".',\n        msgInvalidFileExtension: 'Extensión de arquivo non válido para \"{name}\". Só se permiten arquivos \"{extensions}\".',\n        msgFileTypes: {\n            'image': 'imaxe',\n            'html': 'HTML',\n            'text': 'text',\n            'video': 'video',\n            'audio': 'audio',\n            'flash': 'flash',\n            'pdf': 'PDF',\n            'object': 'object'\n        },\n        msgUploadAborted: 'A carga de arquivos cancelouse',\n        msgUploadThreshold: 'Procesando...',\n        msgUploadBegin: 'Inicialicando...',\n        msgUploadEnd: 'Feito',\n        msgUploadEmpty: 'Non existen datos válidos para o envío.',\n        msgUploadError: 'Error',\n        msgValidationError: 'Erro de validación',\n        msgLoading: 'Subindo arquivo {index} de {files} &hellip;',\n        msgProgress: 'Subiendo arquivo {index} de {files} - {name} - {percent}% completado.',\n        msgSelected: '{n} {files} seleccionado(s)',\n        msgFoldersNotAllowed: 'Arrastra e solta únicamente arquivoa. Omitida(s) {n} carpeta(s).',\n        msgImageWidthSmall: 'O ancho da imaxe \"{name}\" debe ser de al menos {size} px.',\n        msgImageHeightSmall: 'A altura de la imaxe \"{name}\" debe ser de al menos {size} px.',\n        msgImageWidthLarge: 'El ancho de la imaxe \"{name}\" no puede exceder de {size} px.',\n        msgImageHeightLarge: 'La altura de la imaxe \"{name}\" no puede exceder de {size} px.',\n        msgImageResizeError: 'No se pudieron obtener las dimensiones de la imaxe para cambiar el tamaño.',\n        msgImageResizeException: 'Erro o cambiar o tamaño da imaxe.<pre>{errors}</pre>',\n        msgAjaxError: 'Algo foi mal ca operación {operation}. Por favor, intentao de novo mais tarde.',\n        msgAjaxProgressError: 'A operación {operation} fallou',\n        ajaxOperations: {\n            deleteThumb: 'Arquivo borrado',\n            uploadThumb: 'Arquivo subido',\n            uploadBatch: 'Datos subidos en lote',\n            uploadExtra: 'Datos do formulario subidos'\n        },\n        dropZoneTitle: 'Arrasta e solte aquí os arquivos &hellip;',\n        dropZoneClickTitle: '<br>(ou fai clic para seleccionar {files})',\n        fileActionSettings: {\n            removeTitle: 'Eliminar arquivo',\n            uploadTitle: 'Subir arquivo',\n            uploadRetryTitle: 'Retry upload',\n            downloadTitle: 'Download file',\n            zoomTitle: 'Ver detalles',\n            dragTitle: 'Mover / Reordenar',\n            indicatorNewTitle: 'Non subido todavía',\n            indicatorSuccessTitle: 'Subido',\n            indicatorErrorTitle: 'Erro o subir',\n            indicatorLoadingTitle: 'Subiendo...'\n        },\n        previewZoomButtonTitles: {\n            prev: 'Ver arquivo anterior',\n            next: 'Ver arquivo siguinte',\n            toggleheader: 'Mostrar encabezado',\n            fullscreen: 'Mostrar a pantalla completa',\n            borderless: 'Activar o modo sen bordes',\n            close: 'Cerrar vista detallada'\n        }\n    };\n})(window.jQuery);\n"
  },
  {
    "path": "static/bootstrap/plugins/bootstrap-fileinput/4.4.7/js/locales/hu.js",
    "content": "/*!\n * FileInput Hungarian Translations\n *\n * This file must be loaded after 'fileinput.js'. Patterns in braces '{}', or\n * any HTML markup tags in the messages must not be converted or translated.\n *\n * @see http://github.com/kartik-v/bootstrap-fileinput\n *\n * NOTE: this file must be saved in UTF-8 encoding.\n */\n(function ($) {\n    \"use strict\";\n\n    $.fn.fileinputLocales['hu'] = {\n        fileSingle: 'fájl',\n        filePlural: 'fájlok',\n        browseLabel: 'Tallóz &hellip;',\n        removeLabel: 'Eltávolít',\n        removeTitle: 'Kijelölt fájlok törlése',\n        cancelLabel: 'Mégse',\n        cancelTitle: 'Feltöltés megszakítása',\n        uploadLabel: 'Feltöltés',\n        uploadTitle: 'Kijelölt fájlok feltöltése',\n        msgNo: 'Nem',\n        msgNoFilesSelected: 'Nincs fájl kiválasztva',\n        msgCancelled: 'Megszakítva',\n        msgPlaceholder: 'Select {files}...',\n        msgZoomModalHeading: 'Részletes Előnézet',\n        msgFileRequired: 'Kötelező fájlt kiválasztani a feltöltéshez.',\n        msgSizeTooSmall: 'A fájl: \"{name}\" (<b>{size} KB</b>) mérete túl kicsi, nagyobbnak kell lennie, mint <b>{minSize} KB</b>.',\n        msgSizeTooLarge: '\"{name}\" fájl (<b>{size} KB</b>) mérete nagyobb a megengedettnél <b>{maxSize} KB</b>.',\n        msgFilesTooLess: 'Legalább <b>{n}</b> {files} ki kell választania a feltöltéshez.',\n        msgFilesTooMany: 'A feltölteni kívánt fájlok száma <b>({n})</b> elérte a megengedett maximumot <b>{m}</b>.',\n        msgFileNotFound: '\"{name}\" fájl nem található!',\n        msgFileSecured: 'Biztonsági beállítások nem engedik olvasni a fájlt \"{name}\".',\n        msgFileNotReadable: '\"{name}\" fájl nem olvasható.',\n        msgFilePreviewAborted: '\"{name}\" fájl feltöltése megszakítva.',\n        msgFilePreviewError: 'Hiba lépett fel a \"{name}\" fájl olvasása közben.',\n        msgInvalidFileName: 'Hibás vagy nem támogatott karakterek a fájl nevében \"{name}\".',\n        msgInvalidFileType: 'Nem megengedett fájl \"{name}\". Csak a \"{types}\" fájl típusok támogatottak.',\n        msgInvalidFileExtension: 'Nem megengedett kiterjesztés / fájltípus \"{name}\". Csak a \"{extensions}\" kiterjesztés(ek) / fájltípus(ok) támogatottak.',\n        msgFileTypes: {\n            'image': 'image',\n            'html': 'HTML',\n            'text': 'text',\n            'video': 'video',\n            'audio': 'audio',\n            'flash': 'flash',\n            'pdf': 'PDF',\n            'object': 'object'\n        },\n        msgUploadAborted: 'A fájl feltöltés megszakítva',\n        msgUploadThreshold: 'Folyamatban...',\n        msgUploadBegin: 'Inicializálás...',\n        msgUploadEnd: 'Kész',\n        msgUploadEmpty: 'Nincs érvényes adat a feltöltéshez.',\n        msgUploadError: 'Error',\n        msgValidationError: 'Érvényesítés hiba',\n        msgLoading: '{index} / {files} töltése &hellip;',\n        msgProgress: 'Feltöltés: {index} / {files} - {name} - {percent}% kész.',\n        msgSelected: '{n} {files} kiválasztva.',\n        msgFoldersNotAllowed: 'Csak fájlokat húzzon ide! Kihagyva {n} könyvtár.',\n        msgImageWidthSmall: 'A kép szélességének \"{name}\" legalább {size} pixelnek kell lennie.',\n        msgImageHeightSmall: 'A kép magasságának \"{name}\" legalább {size} pixelnek kell lennie.',\n        msgImageWidthLarge: 'A kép szélessége \"{name}\" nem haladhatja meg a {size} pixelt.',\n        msgImageHeightLarge: 'A kép magassága \"{name}\" nem haladhatja meg a {size} pixelt.',\n        msgImageResizeError: 'Nem lehet megállapítani a kép méreteit az átméretezéshez.',\n        msgImageResizeException: 'Hiba történt a méretezés közben.<pre>{errors}</pre>',\n        msgAjaxError: 'Hiba történt a művelet közben ({operation}). Kérjük, próbálja később!',\n        msgAjaxProgressError: 'Hiba! ({operation})',\n        ajaxOperations: {\n            deleteThumb: 'fájl törlés',\n            uploadThumb: 'fájl feltöltés',\n            uploadBatch: 'csoportos fájl feltöltés',\n            uploadExtra: 'űrlap adat feltöltés'\n        },\n        dropZoneTitle: 'Húzzon ide fájlokat &hellip;',\n        dropZoneClickTitle: '<br>(vagy kattintson ide a {files} tallózásához...)',\n        fileActionSettings: {\n            removeTitle: 'A fájl eltávolítása',\n            uploadTitle: 'fájl feltöltése',\n            uploadRetryTitle: 'Retry upload',\n            downloadTitle: 'Download file',\n            zoomTitle: 'Részletek megtekintése',\n            dragTitle: 'Mozgatás / Átrendezés',\n            indicatorNewTitle: 'Nem feltöltött',\n            indicatorSuccessTitle: 'Feltöltött',\n            indicatorErrorTitle: 'Feltöltés hiba',\n            indicatorLoadingTitle: 'Feltöltés ...'\n        },\n        previewZoomButtonTitles: {\n            prev: 'Elöző fájl megnézése',\n            next: 'Következő fájl megnézése',\n            toggleheader: 'Fejléc mutatása',\n            fullscreen: 'Teljes képernyős mód bekapcsolása',\n            borderless: 'Keret nélküli ablak mód bekapcsolása',\n            close: 'Részletes előnézet bezárása'\n        }\n    };\n})(window.jQuery);\n"
  },
  {
    "path": "static/bootstrap/plugins/bootstrap-fileinput/4.4.7/js/locales/id.js",
    "content": "/*!\n * FileInput Indonesian Translations\n *\n * This file must be loaded after 'fileinput.js'. Patterns in braces '{}', or\n * any HTML markup tags in the messages must not be converted or translated.\n *\n * @see http://github.com/kartik-v/bootstrap-fileinput\n * @author Bambang Riswanto <bamz3r@gmail.com>\n *\n * NOTE: this file must be saved in UTF-8 encoding.\n */\n(function ($) {\n    \"use strict\";\n\n    $.fn.fileinputLocales['id'] = {\n        fileSingle: 'berkas',\n        filePlural: 'berkas',\n        browseLabel: 'Pilih File &hellip;',\n        removeLabel: 'Hapus',\n        removeTitle: 'Hapus berkas terpilih',\n        cancelLabel: 'Batal',\n        cancelTitle: 'Batalkan proses pengunggahan',\n        uploadLabel: 'Unggah',\n        uploadTitle: 'Unggah berkas terpilih',\n        msgNo: 'Tidak',\n        msgNoFilesSelected: '',\n        msgCancelled: 'Dibatalkan',\n        msgPlaceholder: 'Select {files}...',\n        msgZoomModalHeading: 'Pratinjau terperinci',\n        msgFileRequired: 'You must select a file to upload.',\n        msgSizeTooSmall: 'File \"{name}\" (<b>{size} KB</b>) is too small and must be larger than <b>{minSize} KB</b>.',\n        msgSizeTooLarge: 'Berkas \"{name}\" (<b>{size} KB</b>) melebihi ukuran upload maksimal yaitu <b>{maxSize} KB</b>.',\n        msgFilesTooLess: 'Anda harus memilih setidaknya <b>{n}</b> {files} untuk diunggah.',\n        msgFilesTooMany: '<b>({n})</b> berkas yang dipilih untuk diunggah melebihi ukuran upload maksimal yaitu <b>{m}</b>.',\n        msgFileNotFound: 'Berkas \"{name}\" tak ditemukan!',\n        msgFileSecured: 'Sistem keamanan mencegah untuk membaca berkas \"{name}\".',\n        msgFileNotReadable: 'Berkas \"{name}\" tak dapat dibaca.',\n        msgFilePreviewAborted: 'Pratinjau untuk berkas \"{name}\" dibatalkan.',\n        msgFilePreviewError: 'Kesalahan saat membaca berkas \"{name}\".',\n        msgInvalidFileName: 'Invalid or unsupported characters in file name \"{name}\".',\n        msgInvalidFileType: 'Jenis berkas \"{name}\" tidak sah. Hanya berkas \"{types}\" yang didukung.',\n        msgInvalidFileExtension: 'Ekstensi berkas \"{name}\" tidak sah. Hanya ekstensi \"{extensions}\" yang didukung.',\n        msgFileTypes: {\n            'image': 'image',\n            'html': 'HTML',\n            'text': 'text',\n            'video': 'video',\n            'audio': 'audio',\n            'flash': 'flash',\n            'pdf': 'PDF',\n            'object': 'object'\n        },\n        msgUploadAborted: 'Pengunggahan berkas dibatalkan',\n        msgUploadThreshold: 'Processing...',\n        msgUploadBegin: 'Initializing...',\n        msgUploadEnd: 'Done',\n        msgUploadEmpty: 'No valid data available for upload.',\n        msgUploadError: 'Error',\n        msgValidationError: 'Kesalahan validasi',\n        msgLoading: 'Memuat {index} dari {files} berkas &hellip;',\n        msgProgress: 'Memuat {index} dari {files} berkas - {name} - {percent}% selesai.',\n        msgSelected: '{n} {files} dipilih',\n        msgFoldersNotAllowed: 'Hanya tahan dan lepas file saja! {n} folder diabaikan.',\n        msgImageWidthSmall: 'Lebar dari gambar \"{name}\" harus sekurangnya {size} px.',\n        msgImageHeightSmall: 'Tinggi dari gambar \"{name}\" harus sekurangnya {size} px.',\n        msgImageWidthLarge: 'Lebar dari gambar \"{name}\" tak boleh melebihi {size} px.',\n        msgImageHeightLarge: 'Tinggi dari gambar \"{name}\" tak boleh melebihi {size} px.',\n        msgImageResizeError: 'Tak dapat menentukan dimensi gambar untuk mengubah ukuran.',\n        msgImageResizeException: 'Kesalahan saat mengubah ukuran gambar.<pre>{errors}</pre>',\n        msgAjaxError: 'Something went wrong with the {operation} operation. Please try again later!',\n        msgAjaxProgressError: '{operation} failed',\n        ajaxOperations: {\n            deleteThumb: 'file delete',\n            uploadThumb: 'file upload',\n            uploadBatch: 'batch file upload',\n            uploadExtra: 'form data upload'\n        },\n        dropZoneTitle: 'Tarik dan lepaskan berkas disini &hellip;',\n        dropZoneClickTitle: '<br>(or click to select {files})',\n        fileActionSettings: {\n            removeTitle: 'Hapus berkas',\n            uploadTitle: 'Unggah berkas',\n            uploadRetryTitle: 'Retry upload',\n            downloadTitle: 'Download file',\n            zoomTitle: 'Tampilkan Rincian',\n            dragTitle: 'Move / Rearrange',\n            indicatorNewTitle: 'Belum diunggah',\n            indicatorSuccessTitle: 'Sudah diunggah',\n            indicatorErrorTitle: 'Kesalahan pengunggahan',\n            indicatorLoadingTitle: 'Mengunggah ...'\n        },\n        previewZoomButtonTitles: {\n            prev: 'View previous file',\n            next: 'View next file',\n            toggleheader: 'Toggle header',\n            fullscreen: 'Toggle full screen',\n            borderless: 'Toggle borderless mode',\n            close: 'Close detailed preview'\n        }\n    };\n})(window.jQuery);\n"
  },
  {
    "path": "static/bootstrap/plugins/bootstrap-fileinput/4.4.7/js/locales/it.js",
    "content": "/*!\n * FileInput Italian Translation\n * \n * Author: Lorenzo Milesi <maxxer@yetopen.it>\n *\n * This file must be loaded after 'fileinput.js'. Patterns in braces '{}', or\n * any HTML markup tags in the messages must not be converted or translated.\n *\n * @see http://github.com/kartik-v/bootstrap-fileinput\n *\n * NOTE: this file must be saved in UTF-8 encoding.\n */\n(function ($) {\n    \"use strict\";\n\n    $.fn.fileinputLocales['it'] = {\n        fileSingle: 'file',\n        filePlural: 'file',\n        browseLabel: 'Sfoglia&hellip;',\n        removeLabel: 'Rimuovi',\n        removeTitle: 'Rimuovi i file selezionati',\n        cancelLabel: 'Annulla',\n        cancelTitle: 'Annulla i caricamenti in corso',\n        uploadLabel: 'Carica',\n        uploadTitle: 'Carica i file selezionati',\n        msgNo: 'No',\n        msgNoFilesSelected: 'Nessun file selezionato',\n        msgCancelled: 'Annullato',\n        msgPlaceholder: 'Seleziona {files}...',\n        msgZoomModalHeading: 'Anteprima dettagliata',\n        msgFileRequired: 'Devi selezionare un file da caricare.',\n        msgSizeTooSmall: 'Il file \"{name}\" (<b>{size} KB</b>) è troppo piccolo, deve essere almeno di <b>{minSize} KB</b>.',\n        msgSizeTooLarge: 'Il file \"{name}\" (<b>{size} KB</b>) eccede la dimensione massima di caricamento di <b>{maxSize} KB</b>.',\n        msgFilesTooLess: 'Devi selezionare almeno <b>{n}</b> {files} da caricare.',\n        msgFilesTooMany: 'Il numero di file selezionati per il caricamento <b>({n})</b> eccede il numero massimo di file accettati <b>{m}</b>.',\n        msgFileNotFound: 'File \"{name}\" non trovato!',\n        msgFileSecured: 'Restrizioni di sicurezza impediscono la lettura del file \"{name}\".',\n        msgFileNotReadable: 'Il file \"{name}\" non è leggibile.',\n        msgFilePreviewAborted: 'Generazione anteprima per \"{name}\" annullata.',\n        msgFilePreviewError: 'Errore durante la lettura del file \"{name}\".',\n        msgInvalidFileName: 'Carattere non valido o non supportato nel file \"{name}\".',\n        msgInvalidFileType: 'Tipo non valido per il file \"{name}\". Sono ammessi solo file di tipo \"{types}\".',\n        msgInvalidFileExtension: 'Estensione non valida per il file \"{name}\". Sono ammessi solo file con estensione \"{extensions}\".',\n        msgFileTypes: {\n            'image': 'image',\n            'html': 'HTML',\n            'text': 'text',\n            'video': 'video',\n            'audio': 'audio',\n            'flash': 'flash',\n            'pdf': 'PDF',\n            'object': 'object'\n        },\n        msgUploadAborted: 'Il caricamento del file è stato interrotto',\n        msgUploadThreshold: 'In lavorazione...',\n        msgUploadBegin: 'Inizializzazione...',\n        msgUploadEnd: 'Fatto',\n        msgUploadEmpty: 'Dati non disponibili',\n        msgUploadError: 'Errore',\n        msgValidationError: 'Errore di convalida',\n        msgLoading: 'Caricamento file {index} di {files}&hellip;',\n        msgProgress: 'Caricamento file {index} di {files} - {name} - {percent}% completato.',\n        msgSelected: '{n} {files} selezionati',\n        msgFoldersNotAllowed: 'Trascina solo file! Ignorata/e {n} cartella/e.',\n        msgImageWidthSmall: 'La larghezza dell\\'immagine \"{name}\" deve essere di almeno {size} px.',\n        msgImageHeightSmall: 'L\\'altezza dell\\'immagine \"{name}\" deve essere di almeno {size} px.',\n        msgImageWidthLarge: 'La larghezza dell\\'immagine \"{name}\" non può superare {size} px.',\n        msgImageHeightLarge: 'L\\'altezza dell\\'immagine \"{name}\" non può superare {size} px.',\n        msgImageResizeError: 'Impossibile ottenere le dimensioni dell\\'immagine per ridimensionare.',\n        msgImageResizeException: 'Errore durante il ridimensionamento dell\\'immagine.<pre>{errors}</pre>',\n        msgAjaxError: 'Qualcosa non ha funzionato con l\\'operazione {operation}. Per favore riprova più tardi!',\n        msgAjaxProgressError: '{operation} failed',\n        ajaxOperations: {\n            deleteThumb: 'eliminazione file',\n            uploadThumb: 'caricamento file',\n            uploadBatch: 'caricamento file in batch',\n            uploadExtra: 'upload dati del form'\n        },\n        dropZoneTitle: 'Trascina i file qui&hellip;',\n        dropZoneClickTitle: '<br>(o clicca per selezionare {files})',\n        fileActionSettings: {\n            removeTitle: 'Rimuovere il file',\n            uploadTitle: 'Caricare un file',\n            uploadRetryTitle: 'Riprova il caricamento',\n            downloadTitle: 'Scarica file',\n            zoomTitle: 'Guarda i dettagli',\n            dragTitle: 'Muovi / Riordina',\n            indicatorNewTitle: 'Non ancora caricato',\n            indicatorSuccessTitle: 'Caricati',\n            indicatorErrorTitle: 'Carica Errore',\n            indicatorLoadingTitle: 'Caricamento ...'\n        },\n        previewZoomButtonTitles: {\n            prev: 'Vedi il file precedente',\n            next: 'Vedi il file seguente',\n            toggleheader: 'Attiva header',\n            fullscreen: 'Attiva full screen',\n            borderless: 'Abilita modalità senza bordi',\n            close: 'Chiudi'\n        }\n    };\n})(window.jQuery);\n"
  },
  {
    "path": "static/bootstrap/plugins/bootstrap-fileinput/4.4.7/js/locales/ja.js",
    "content": "/*!\n * FileInput Japanese Translations\n *\n * This file must be loaded after 'fileinput.js'. Patterns in braces '{}', or\n * any HTML markup tags in the messages must not be converted or translated.\n *\n * @see http://github.com/kartik-v/bootstrap-fileinput\n * @author Yuta Hoshina <hoshina@gmail.com>\n *\n * NOTE: this file must be saved in UTF-8 encoding.\n * slugCallback\n *    \\u4e00-\\u9fa5 : Kanji (Chinese characters)\n *    \\u3040-\\u309f : Hiragana (Japanese syllabary)\n *    \\u30a0-\\u30ff\\u31f0-\\u31ff : Katakana (including phonetic extension)\n *    \\u3200-\\u32ff : Enclosed CJK Letters and Months\n *    \\uff00-\\uffef : Halfwidth and Fullwidth Forms\n */\n(function ($) {\n    \"use strict\";\n\n    $.fn.fileinputLocales['ja'] = {\n        fileSingle: 'ファイル',\n        filePlural: 'ファイル',\n        browseLabel: 'ファイルを選択&hellip;',\n        removeLabel: '削除',\n        removeTitle: '選択したファイルを削除',\n        cancelLabel: 'キャンセル',\n        cancelTitle: 'アップロードをキャンセル',\n        uploadLabel: 'アップロード',\n        uploadTitle: '選択したファイルをアップロード',\n        msgNo: 'いいえ',\n        msgNoFilesSelected: 'ファイルが選択されていません',\n        msgCancelled: 'キャンセル',\n        msgPlaceholder: 'Select {files}...',\n        msgZoomModalHeading: 'プレビュー',\n        msgFileRequired: 'ファイルを選択してください',\n        msgSizeTooSmall: 'ファイル\"{name}\" (<b>{size} KB</b>)はアップロード可能な下限容量<b>{minSize} KB</b>より小さいです',\n        msgSizeTooLarge: 'ファイル\"{name}\" (<b>{size} KB</b>)はアップロード可能な上限容量<b>{maxSize} KB</b>を超えています',\n        msgFilesTooLess: '最低<b>{n}</b>個の{files}を選択してください',\n        msgFilesTooMany: '選択したファイルの数<b>({n}個)</b>はアップロード可能な上限数<b>({m}個)</b>を超えています',\n        msgFileNotFound: 'ファイル\"{name}\"はありませんでした',\n        msgFileSecured: 'ファイル\"{name}\"は読み取り権限がないため取得できません',\n        msgFileNotReadable: 'ファイル\"{name}\"は読み込めません',\n        msgFilePreviewAborted: 'ファイル\"{name}\"のプレビューを中止しました',\n        msgFilePreviewError: 'ファイル\"{name}\"の読み込み中にエラーが発生しました',\n        msgInvalidFileName: 'ファイル名に無効な文字が含まれています \"{name}\".',\n        msgInvalidFileType: '\"{name}\"は無効なファイル形式です。\"{types}\"形式のファイルのみサポートしています',\n        msgInvalidFileExtension: '\"{name}\"は無効な拡張子です。拡張子が\"{extensions}\"のファイルのみサポートしています',\n        msgFileTypes: {\n            'image': 'image',\n            'html': 'HTML',\n            'text': 'text',\n            'video': 'video',\n            'audio': 'audio',\n            'flash': 'flash',\n            'pdf': 'PDF',\n            'object': 'object'\n        },\n        msgUploadAborted: 'ファイルのアップロードが中止されました',\n        msgUploadThreshold: '処理中...',\n        msgUploadBegin: '初期化中...',\n        msgUploadEnd: '完了',\n        msgUploadEmpty: 'アップロードに有効なデータがありません',\n        msgUploadError: 'エラー',\n        msgValidationError: '検証エラー',\n        msgLoading: '{files}個中{index}個目のファイルを読み込み中&hellip;',\n        msgProgress: '{files}個中{index}個のファイルを読み込み中 - {name} - {percent}% 完了',\n        msgSelected: '{n}個の{files}を選択',\n        msgFoldersNotAllowed: 'ドラッグ&ドロップが可能なのはファイルのみです。{n}個のフォルダ－は無視されました',\n        msgImageWidthSmall: '画像ファイル\"{name}\"の幅が小さすぎます。画像サイズの幅は少なくとも{size}px必要です',\n        msgImageHeightSmall: '画像ファイル\"{name}\"の高さが小さすぎます。画像サイズの高さは少なくとも{size}px必要です',\n        msgImageWidthLarge: '画像ファイル\"{name}\"の幅がアップロード可能な画像サイズ({size}px)を超えています',\n        msgImageHeightLarge: '画像ファイル\"{name}\"の高さがアップロード可能な画像サイズ({size}px)を超えています',\n        msgImageResizeError: 'リサイズ時に画像サイズが取得できませんでした',\n        msgImageResizeException: '画像のリサイズ時にエラーが発生しました。<pre>{errors}</pre>',\n        msgAjaxError: '{operation}実行中にエラーが発生しました。時間をおいてもう一度お試しください。',\n        msgAjaxProgressError: '{operation} failed',\n        ajaxOperations: {\n            deleteThumb: 'ファイル削除',\n            uploadThumb: 'ファイルアップロード',\n            uploadBatch: '一括ファイルアップロード',\n            uploadExtra: 'フォームデータアップロード'\n        },\n        dropZoneTitle: 'ファイルをドラッグ&ドロップ&hellip;',\n        dropZoneClickTitle: '<br>(または クリックして{files}を選択 )',\n        slugCallback: function(text) {\n            return text ? text.split(/(\\\\|\\/)/g).pop().replace(/[^\\w\\u4e00-\\u9fa5\\u3040-\\u309f\\u30a0-\\u30ff\\u31f0-\\u31ff\\u3200-\\u32ff\\uff00-\\uffef\\-.\\\\\\/ ]+/g, '') : '';\n        },\n        fileActionSettings: {\n            removeTitle: 'ファイルを削除',\n            uploadTitle: 'ファイルをアップロード',\n            uploadRetryTitle: '再アップロード',\n            zoomTitle: 'プレビュー',\n            dragTitle: '移動 / 再配置',\n            indicatorNewTitle: 'まだアップロードされていません',\n            indicatorSuccessTitle: 'アップロード済み',\n            indicatorErrorTitle: 'アップロード失敗',\n            indicatorLoadingTitle: 'アップロード中...'\n        },\n        previewZoomButtonTitles: {\n            prev: '前のファイルを表示',\n            next: '次のファイルを表示',\n            toggleheader: 'ファイル情報の表示/非表示',\n            fullscreen: 'フルスクリーン表示の開始/終了',\n            borderless: 'フルウィンドウ表示の開始/終了',\n            close: 'プレビューを閉じる'\n        }\n    };\n})(window.jQuery);\n"
  },
  {
    "path": "static/bootstrap/plugins/bootstrap-fileinput/4.4.7/js/locales/ka.js",
    "content": "/*!\n * FileInput Georgian Translations\n *\n * This file must be loaded after 'fileinput.js'. Patterns in braces '{}', or\n * any HTML markup tags in the messages must not be converted or translated.\n *\n * @see http://github.com/kartik-v/bootstrap-fileinput\n * @author Avtandil Kikabidze aka LONGMAN <akalongman@gmail.com>\n *\n * NOTE: this file must be saved in UTF-8 encoding.\n */\n(function ($) {\n    \"use strict\";\n\n    $.fn.fileinputLocales['ka'] = {\n        fileSingle: 'ფაილი',\n        filePlural: 'ფაილები',\n        browseLabel: 'არჩევა &hellip;',\n        removeLabel: 'წაშლა',\n        removeTitle: 'არჩეული ფაილების წაშლა',\n        cancelLabel: 'გაუქმება',\n        cancelTitle: 'მიმდინარე ატვირთვის გაუქმება',\n        uploadLabel: 'ატვირთვა',\n        uploadTitle: 'არჩეული ფაილების ატვირთვა',\n        msgNo: 'არა',\n        msgNoFilesSelected: 'ფაილები არ არის არჩეული',\n        msgCancelled: 'გაუქმებულია',\n        msgPlaceholder: 'აირჩიეთ {files}...',\n        msgZoomModalHeading: 'დეტალურად ნახვა',\n        msgFileRequired: 'ატვირთვისთვის აუცილებელია ფაილის არჩევა.',\n        msgSizeTooSmall: 'ფაილი \"{name}\" (<b>{size} KB</b>) არის ძალიან პატარა. მისი ზომა უნდა იყოს არანაკლებ <b>{minSize} KB</b>.',\n        msgSizeTooLarge: 'ფაილი \"{name}\" (<b>{size} KB</b>) აჭარბებს მაქსიმალურ დასაშვებ ზომას <b>{maxSize} KB</b>.',\n        msgFilesTooLess: 'უნდა აირჩიოთ მინიმუმ <b>{n}</b> {file} ატვირთვისთვის.',\n        msgFilesTooMany: 'არჩეული ფაილების რაოდენობა <b>({n})</b> აჭარბებს დასაშვებ ლიმიტს <b>{m}</b>.',\n        msgFileNotFound: 'ფაილი \"{name}\" არ მოიძებნა!',\n        msgFileSecured: 'უსაფრთხოებით გამოწვეული შეზღუდვები კრძალავს ფაილის \"{name}\" წაკითხვას.',\n        msgFileNotReadable: 'ფაილის \"{name}\" წაკითხვა შეუძლებელია.',\n        msgFilePreviewAborted: 'პრევიუ გაუქმებულია ფაილისათვის \"{name}\".',\n        msgFilePreviewError: 'დაფიქსირდა შეცდომა ფაილის \"{name}\" კითხვისას.',\n        msgInvalidFileName: 'ნაპოვნია დაუშვებელი სიმბოლოები ფაილის \"{name}\" სახელში.',\n        msgInvalidFileType: 'ფაილს \"{name}\" გააჩნია დაუშვებელი ტიპი. მხოლოდ \"{types}\" ტიპის ფაილები არის დაშვებული.',\n        msgInvalidFileExtension: 'ფაილს \"{name}\" გააჩნია დაუშვებელი გაფართოება. მხოლოდ \"{extensions}\" გაფართოების ფაილები არის დაშვებული.',\n        msgFileTypes: {\n            'image': 'image',\n            'html': 'HTML',\n            'text': 'text',\n            'video': 'video',\n            'audio': 'audio',\n            'flash': 'flash',\n            'pdf': 'PDF',\n            'object': 'object'\n        },\n        msgUploadAborted: 'ფაილის ატვირთვა შეწყდა',\n        msgUploadThreshold: 'მუშავდება...',\n        msgUploadBegin: 'ინიციალიზაცია...',\n        msgUploadEnd: 'დასრულებულია',\n        msgUploadEmpty: 'ატვირთვისთვის დაუშვებელი მონაცემები.',\n        msgUploadError: 'ატვირთვის შეცდომა',\n        msgValidationError: 'ვალიდაციის შეცდომა',\n        msgLoading: 'ატვირთვა {index} / {files} &hellip;',\n        msgProgress: 'ფაილის ატვირთვა დასრულებულია {index} / {files} - {name} - {percent}%.',\n        msgSelected: 'არჩეულია {n} {file}',\n        msgFoldersNotAllowed: 'დაშვებულია მხოლოდ ფაილების გადმოთრევა! გამოტოვებულია {n} გადმოთრეული ფოლდერი.',\n        msgImageWidthSmall: 'სურათის \"{name}\" სიგანე უნდა იყოს არანაკლებ {size} px.',\n        msgImageHeightSmall: 'სურათის \"{name}\" სიმაღლე უნდა იყოს არანაკლებ {size} px.',\n        msgImageWidthLarge: 'სურათის \"{name}\" სიგანე არ უნდა აღემატებოდეს {size} px-ს.',\n        msgImageHeightLarge: 'სურათის \"{name}\" სიმაღლე არ უნდა აღემატებოდეს {size} px-ს.',\n        msgImageResizeError: 'ვერ მოხერხდა სურათის ზომის შეცვლისთვის საჭირო მონაცემების გარკვევა.',\n        msgImageResizeException: 'შეცდომა სურათის ზომის შეცვლისას.<pre>{errors}</pre>',\n        msgAjaxError: 'დაფიქსირდა შეცდომა ოპერაციის {operation} შესრულებისას. ცადეთ მოგვიანებით!',\n        msgAjaxProgressError: 'ვერ მოხერხდა ოპერაციის {operation} შესრულება',\n        ajaxOperations: {\n            deleteThumb: 'ფაილის წაშლა',\n            uploadThumb: 'ფაილის ატვირთვა',\n            uploadBatch: 'ფაილების ატვირთვა',\n            uploadExtra: 'მონაცემების გაგზავნა ფორმიდან'\n        },\n        dropZoneTitle: 'გადმოათრიეთ ფაილები აქ &hellip;',\n        dropZoneClickTitle: '<br>(ან დააჭირეთ რათა აირჩიოთ {files})',\n        fileActionSettings: {\n            removeTitle: 'ფაილის წაშლა',\n            uploadTitle: 'ფაილის ატვირთვა',\n            uploadRetryTitle: 'ატვირთვის გამეორება',\n            downloadTitle: 'ფაილის ჩამოტვირთვა',\n            zoomTitle: 'დეტალურად ნახვა',\n            dragTitle: 'გადაადგილება / მიმდევრობის შეცვლა',\n            indicatorNewTitle: 'ჯერ არ ატვირთულა',\n            indicatorSuccessTitle: 'ატვირთულია',\n            indicatorErrorTitle: 'ატვირთვის შეცდომა',\n            indicatorLoadingTitle: 'ატვირთვა ...'\n        },\n        previewZoomButtonTitles: {\n            prev: 'წინა ფაილის ნახვა',\n            next: 'შემდეგი ფაილის ნახვა',\n            toggleheader: 'სათაურის დამალვა',\n            fullscreen: 'მთელ ეკრანზე გაშლა',\n            borderless: 'მთელ გვერდზე გაშლა',\n            close: 'დახურვა'\n        }\n    };\n})(window.jQuery);\n"
  },
  {
    "path": "static/bootstrap/plugins/bootstrap-fileinput/4.4.7/js/locales/kr.js",
    "content": "/*!\n * FileInput Korean Translations\n *\n * This file must be loaded after 'fileinput.js'. Patterns in braces '{}', or\n * any HTML markup tags in the messages must not be converted or translated.\n *\n * @see http://github.com/kartik-v/bootstrap-fileinput\n *\n * NOTE: this file must be saved in UTF-8 encoding.\n */\n(function ($) {\n    \"use strict\";\n\n    $.fn.fileinputLocales['kr'] = {\n        fileSingle: '파일',\n        filePlural: '파일들',\n        browseLabel: '찾기 &hellip;',\n        removeLabel: '지우기',\n        removeTitle: '선택한 파일들 지우기',\n        cancelLabel: '취소',\n        cancelTitle: '업로드 중단하기',\n        uploadLabel: '업로드',\n        uploadTitle: '선택한 파일 업로드하기',\n        msgNo: '아니요',\n        msgNoFilesSelected: '선택한 파일이 없습니다.',\n        msgCancelled: '취소되었습니다.',\n        msgPlaceholder: 'Select {files}...',\n        msgZoomModalHeading: '자세한 미리보기',\n        msgFileRequired: 'You must select a file to upload.',\n        msgSizeTooSmall: '파일 \"{name}\" (<b>{size} KB</b>)이 너무 작습니다. <b>{minSize} KB</b>보다 용량이 커야 합니다..',\n        msgSizeTooLarge: '파일 \"{name}\" (<b>{size} KB</b>)이 너무 큽니다. 허용 파일 사이즈는 <b>{maxSize} KB</b>.입니다.',\n        msgFilesTooLess: '업로드하기 위해 최소 <b>{n}</b> {files}개의 파일을 선택해야 합니다.',\n        msgFilesTooMany: '선택한 파일의 수 <b>({n})</b>가 업로드 허용 최고치인 <b>{m}</b>를 넘었습니다..',\n        msgFileNotFound: '파일 \"{name}\"을 찾을 수 없습니다.!',\n        msgFileSecured: '보안상의 이유로 파일 \"{name}\"을/를 읽을 수 없습니다..',\n        msgFileNotReadable: '파일 \"{name}\"은/는 읽을 수 없습니다.',\n        msgFilePreviewAborted: '파일 \"{name}\"의 미리보기가 중단되었습니다.',\n        msgFilePreviewError: '파일 \"{name}\"을/를 읽다가 에러가 발생했습니다.',\n        msgInvalidFileName: '파일 \"{name}\" 중 지원 불가능한 문자가 포함되어 있습니다.',\n        msgInvalidFileType: '파일 \"{name}\"의 타입은 지원하지 않습니다. \"{types}\" 타입의 파일을 선택해 주십시요.',\n        msgInvalidFileExtension: '파일 \"{name}\"의 익스텐션은 지원하지 않습니다. \"{extensions}\" 타입의 익스텐션을 선택해 주십시요.',\n        msgFileTypes: {\n            'image': 'image',\n            'html': 'HTML',\n            'text': 'text',\n            'video': 'video',\n            'audio': 'audio',\n            'flash': 'flash',\n            'pdf': 'PDF',\n            'object': 'object'\n        },\n        msgUploadAborted: '파일 업로드가 중단되었습니다.',\n        msgUploadThreshold: '업로드 중...',\n        msgUploadBegin: 'Initializing...',\n        msgUploadEnd: 'Done',\n        msgUploadEmpty: '업로드 가능 데이터가 존재하지 않습니다.',\n        msgUploadError: 'Error',\n        msgValidationError: '유효성 오류',\n        msgLoading: '파일 {files} 중 {index}번째를 로딩하고 있습니다. &hellip;',\n        msgProgress: '파일 {files}의 {name}이 {percent}% 로딩되었습니다. ',\n        msgSelected: '{n} {files}이 선택 되었습니다.',\n        msgFoldersNotAllowed: '드래그 앤 드랍 파일만 가능합니다! 드랍한 {n}번째 폴더를 건너 뛰었습니다.',\n        msgImageWidthSmall: '이미지 파일 \"{name}\"의 가로는 최소 {size} px가 되어야 합니다.',\n        msgImageHeightSmall: '이미지 파일 \"{name}\"의 세로는 최소 {size} px가 되어야 합니다.',\n        msgImageWidthLarge: '이미지 파일 \"{name}\"의 가로는 최대 {size} px를 넘을수 없습니다.',\n        msgImageHeightLarge: '이미지 파일 \"{name}\"의 세로는 최대 {size} px를 넘을수 없습니다.',\n        msgImageResizeError: '이미지의 사이즈를 재조정을 위한 이미지 사이즈를 가져올 수 없습니다.',\n        msgImageResizeException: '이미지 사이즈 재조정이 다음 이유로 실패했습니다.<pre>{errors}</pre>',\n        msgAjaxError: 'Something went wrong with the {operation} operation. Please try again later!',\n        msgAjaxProgressError: '{operation} failed',\n        ajaxOperations: {\n            deleteThumb: 'file delete',\n            uploadThumb: 'file upload',\n            uploadBatch: 'batch file upload',\n            uploadExtra: 'form data upload'\n        },\n        dropZoneTitle: '파일을 여기에 드래그인 드랍을 하십시요 &hellip;',\n        dropZoneClickTitle: '<br>(또는 {files} 선택을 위해 클릭하십시요)',\n        fileActionSettings: {\n            removeTitle: '파일 지우기',\n            uploadTitle: '파일 업로드 하기',\n            uploadRetryTitle: 'Retry upload',\n            downloadTitle: 'Download file',\n            zoomTitle: '세부 정보 보기',\n            dragTitle: '옭기기 / 재배열하기',\n            indicatorNewTitle: '아직 업로드가 안되었습니다.',\n            indicatorSuccessTitle: '업로드가 성공하였습니다.',\n            indicatorErrorTitle: '업로드 중 에러가 발행했습니다.',\n            indicatorLoadingTitle: '업로드 중 ...'\n        },\n        previewZoomButtonTitles: {\n            prev: '전 파일 보기',\n            next: '다음 파일 보기',\n            toggleheader: '머릿글 토글하기',\n            fullscreen: '전채화면 토글하기',\n            borderless: '무 테두리 토글하기',\n            close: '세부 정보 미리보기 토글하기'\n        }\n    };\n})(window.jQuery);\n"
  },
  {
    "path": "static/bootstrap/plugins/bootstrap-fileinput/4.4.7/js/locales/kz.js",
    "content": "/*!\n * FileInput Kazakh Translations\n *\n * This file must be loaded after 'fileinput.js'. Patterns in braces '{}', or\n * any HTML markup tags in the messages must not be converted or translated.\n *\n * @see http://github.com/kartik-v/bootstrap-fileinput\n * @author Kali Toleugazy <almatytol@gmail.com>\n *\n * NOTE: this file must be saved in UTF-8 encoding.\n */\n(function ($) {\n    \"use strict\";\n\n    $.fn.fileinputLocales['kz'] = {\n        fileSingle: 'файл',\n        filePlural: 'файлдар',\n        browseLabel: 'Таңдау &hellip;',\n        removeLabel: 'Жою',\n        removeTitle: 'Таңдалған файлдарды жою',\n        cancelLabel: 'Күшін жою',\n        cancelTitle: 'Ағымдағы жүктеуді болдырмау',\n        uploadLabel: 'Жүктеу',\n        uploadTitle: 'Таңдалған файлдарды жүктеу',\n        msgNo: 'жоқ',\n        msgNoFilesSelected: 'Файл таңдалмады',\n        msgCancelled: 'Күші жойылған',\n        msgPlaceholder: 'Select {files}...',\n        msgZoomModalHeading: 'Алдын ала толық көру',\n        msgSizeTooLarge: 'Файл \"{name}\" (<b>{size} KB</b>) ең үлкен <b>{maxSize} KB</b> өлшемінен асады.',\n        msgFilesTooLess: 'Жүктеу үшіy кемінде <b>{n}</b> {files} таңдау керек.',\n        msgFilesTooMany: 'Таңдалған <b>({n})</b> файлдардың саны берілген <b>{m}</b> саннан асып кетті.',\n        msgFileNotFound: 'Файл \"{name}\" табылмады!',\n        msgFileSecured: 'Шектеу қауіпсіздігі \"{name}\" файлын оқуға тыйым салады.',\n        msgFileNotReadable: '\"{name}\" файлды оқу мүмкін емес.',\n        msgFilePreviewAborted: '\"{name}\" файл үшін алдын ала қарап көру тыйым салынған.',\n        msgFilePreviewError: '\"{name}\" файлды оқығанда қате пайда болды.',\n        msgInvalidFileType: '\"{name}\" тыйым салынған файл түрі. Тек мынаналарға рұқсат етілген: \"{types}\"',\n        msgInvalidFileExtension: '\"{name}\" тыйым салынған файл кеңейтімі. Тек \"{extensions}\" рұқсат.',\n        msgUploadAborted: 'Файлды жүктеу доғарылды',\n        msgUploadThreshold: 'Өңдеу...',\n        msgUploadBegin: 'Initializing...',\n        msgUploadEnd: 'Done',\n        msgUploadEmpty: 'No valid data available for upload.',\n        msgUploadError: 'Error',\n        msgValidationError: 'Тексеру қатесі',\n        msgLoading: '{index} файлды {files} &hellip; жүктеу',\n        msgProgress: '{index} файлды {files} - {name} - {percent}% жүктеу аяқталды.',\n        msgSelected: 'Таңдалған файлдар саны: {n}',\n        msgFoldersNotAllowed: 'Тек файлдарды сүйреу рұқсат! {n} папка өткізілген.',\n        msgImageWidthSmall: '{name} суреттің ені {size} px. аз болмау керек',\n        msgImageHeightSmall: '{name} суреттің биіктігі {size} px. аз болмау керек',\n        msgImageWidthLarge: '\"{name}\" суреттің ені {size} px. аспау керек',\n        msgImageHeightLarge: '\"{name}\" суреттің биіктігі {size} px. аспау керек',\n        msgImageResizeError: 'Суреттің өлшемін өзгерту үшін, мөлшері алынбады',\n        msgImageResizeException: 'Суреттің мөлшерлерін өзгерткен кезде қателік пайда болды.<pre>{errors}</pre>',\n        msgAjaxError: 'Something went wrong with the {operation} operation. Please try again later!',\n        msgAjaxProgressError: '{operation} failed',\n        ajaxOperations: {\n            deleteThumb: 'file delete',\n            uploadThumb: 'file upload',\n            uploadBatch: 'batch file upload',\n            uploadExtra: 'form data upload'\n        },\n        dropZoneTitle: 'Файлдарды осында сүйреу &hellip;',\n        dropZoneClickTitle: '<br>(or click to select {files})',\n        fileActionSettings: {\n            removeTitle: 'Файлды өшіру',\n            uploadTitle: 'Файлды жүктеу',\n            uploadRetryTitle: 'Retry upload',\n            downloadTitle: 'Download file',\n            zoomTitle: 'мәліметтерді көру',\n            dragTitle: 'Орнын ауыстыру',\n            indicatorNewTitle: 'Жүктелген жоқ',\n            indicatorSuccessTitle: 'Жүктелген',\n            indicatorErrorTitle: 'Жүктелу қатесі ',\n            indicatorLoadingTitle: 'Жүктелу ...'\n        },\n        previewZoomButtonTitles: {\n            prev: 'Алдыңғы файлды қарау',\n            next: 'Келесі файлды қарау',\n            toggleheader: 'Тақырыпты ауыстыру',\n            fullscreen: 'Толық экран режимін қосу',\n            borderless: 'Жиексіз режиміне ауысу',\n            close: 'Толық көрінісін жабу'\n        }\n    };\n})(window.jQuery);\n"
  },
  {
    "path": "static/bootstrap/plugins/bootstrap-fileinput/4.4.7/js/locales/lt.js",
    "content": "/*!\n * FileInput <_LANG_> Translations\n *\n * This file must be loaded after 'fileinput.js'. Patterns in braces '{}', or\n * any HTML markup tags in the messages must not be converted or translated.\n *\n * @see http://github.com/kartik-v/bootstrap-fileinput\n * @author Mindaugas Varkalys <varkalys.mindaugas@gmail.com>\n *\n * NOTE: this file must be saved in UTF-8 encoding.\n */\n(function ($) {\n    \"use strict\";\n\n    $.fn.fileinputLocales['lt'] = {\n        fileSingle: 'failas',\n        filePlural: 'failai',\n        browseLabel: 'Naršyti &hellip;',\n        removeLabel: 'Šalinti',\n        removeTitle: 'Pašalinti pasirinktus failus',\n        cancelLabel: 'Atšaukti',\n        cancelTitle: 'Atšaukti vykstantį įkėlimą',\n        uploadLabel: 'Įkelti',\n        uploadTitle: 'Įkelti pasirinktus failus',\n        msgNo: 'Ne',\n        msgNoFilesSelected: 'Nepasirinkta jokių failų',\n        msgCancelled: 'Atšaukta',\n        msgPlaceholder: 'Select {files}...',\n        msgZoomModalHeading: 'Detali Peržiūra',\n        msgFileRequired: 'Pasirinkite failą įkėlimui.',\n        msgSizeTooSmall: 'Failas \"{name}\" (<b>{size} KB</b>) yra per mažas ir turi būti didesnis nei <b>{minSize} KB</b>.',\n        msgSizeTooLarge: 'Failas \"{name}\" (<b>{size} KB</b>) viršija maksimalų leidžiamą įkeliamo failo dydį <b>{maxSize} KB</b>.',\n        msgFilesTooLess: 'Turite pasirinkti bent <b>{n}</b> failus įkėlimui.',\n        msgFilesTooMany: 'Įkėlimui pasirinktų failų skaičius <b>({n})</b> viršija maksimalų leidžiamą limitą <b>{m}</b>.',\n        msgFileNotFound: 'Failas \"{name}\" nerastas!',\n        msgFileSecured: 'Saugumo apribojimai neleidžia perskaityti failo \"{name}\".',\n        msgFileNotReadable: 'Failas \"{name}\" neperskaitomas.',\n        msgFilePreviewAborted: 'Failo peržiūra nutraukta \"{name}\".',\n        msgFilePreviewError: 'Įvyko klaida skaitant failą \"{name}\".',\n        msgInvalidFileName: 'Klaidingi arba nepalaikomi simboliai failo pavadinime \"{name}\".',\n        msgInvalidFileType: 'Klaidingas failo \"{name}\" tipas. Tik \"{types}\" tipai yra palaikomi.',\n        msgInvalidFileExtension: 'Klaidingas failo \"{name}\" plėtinys. Tik \"{extensions}\" plėtiniai yra palaikomi.',\n        msgFileTypes: {\n            'image': 'paveikslėlis',\n            'html': 'HTML',\n            'text': 'tekstas',\n            'video': 'vaizdo įrašas',\n            'audio': 'garso įrašas',\n            'flash': 'flash',\n            'pdf': 'PDF',\n            'object': 'objektas'\n        },\n        msgUploadAborted: 'Failo įkėlimas buvo nutrauktas',\n        msgUploadThreshold: 'Vykdoma...',\n        msgUploadBegin: 'Inicijuojama...',\n        msgUploadEnd: 'Baigta',\n        msgUploadEmpty: 'Nėra teisingų duomenų įkėlimui.',\n        msgUploadError: 'Klaida',\n        msgValidationError: 'Validacijos Klaida',\n        msgLoading: 'Keliamas failas {index} iš {files} &hellip;',\n        msgProgress: 'Keliamas failas {index} iš {files} - {name} - {percent}% baigta.',\n        msgSelected: 'Pasirinkti {n} {files}',\n        msgFoldersNotAllowed: 'Tempkite tik failus! Praleisti {n} nutempti aplankalas(-i).',\n        msgImageWidthSmall: 'Paveikslėlio \"{name}\" plotis turi būti bent {size} px.',\n        msgImageHeightSmall: 'Paveikslėlio \"{name}\" aukštis turi būti bent {size} px.',\n        msgImageWidthLarge: 'Paveikslėlio \"{name}\" plotis negali viršyti {size} px.',\n        msgImageHeightLarge: 'Paveikslėlio \"{name}\" aukštis negali viršyti {size} px.',\n        msgImageResizeError: 'Nepavyksta gauti paveikslėlio matmetų, kad pakeisti jo matmemis.',\n        msgImageResizeException: 'Klaida keičiant paveikslėlio matmenis.<pre>{errors}</pre>',\n        msgAjaxError: 'Kažkas nutiko vykdant {operation} operaciją. Prašome pabandyti vėliau!',\n        msgAjaxProgressError: '{operation} operacija nesėkminga',\n        ajaxOperations: {\n            deleteThumb: 'failo trynimo',\n            uploadThumb: 'failo įkėlimo',\n            uploadBatch: 'failų rinkinio įkėlimo',\n            uploadExtra: 'formos duomenų įkėlimo'\n        },\n        dropZoneTitle: 'Tempkite failus čia &hellip;',\n        dropZoneClickTitle: '<br>(arba paspauskite, kad pasirinktumėte failus)',\n        fileActionSettings: {\n            removeTitle: 'Šalinti failą',\n            uploadTitle: 'Įkelti failą',\n            uploadRetryTitle: 'Bandyti įkelti vėl',\n            zoomTitle: 'Peržiūrėti detales',\n            dragTitle: 'Perstumti',\n            indicatorNewTitle: 'Dar neįkelta',\n            indicatorSuccessTitle: 'Įkelta',\n            indicatorErrorTitle: 'Įkėlimo Klaida',\n            indicatorLoadingTitle: 'Įkeliama ...'\n        },\n        previewZoomButtonTitles: {\n            prev: 'Peržiūrėti ankstesnį failą',\n            next: 'Peržiūrėti kitą failą',\n            toggleheader: 'Perjungti viršutinę juostą',\n            fullscreen: 'Perjungti pilno ekrano rėžimą',\n            borderless: 'Perjungti berėmį režimą',\n            close: 'Uždaryti detalią peržiūrą'\n        }\n    };\n})(window.jQuery);"
  },
  {
    "path": "static/bootstrap/plugins/bootstrap-fileinput/4.4.7/js/locales/nl.js",
    "content": "/*!\n * FileInput Dutch Translations\n *\n * This file must be loaded after 'fileinput.js'. Patterns in braces '{}', or\n * any HTML markup tags in the messages must not be converted or translated.\n *\n * @see http://github.com/kartik-v/bootstrap-fileinput\n *\n * NOTE: this file must be saved in UTF-8 encoding.\n */\n(function ($) {\n    \"use strict\";\n\n    $.fn.fileinputLocales['nl'] = {\n        fileSingle: 'bestand',\n        filePlural: 'bestanden',\n        browseLabel: 'Zoek &hellip;',\n        removeLabel: 'Verwijder',\n        removeTitle: 'Verwijder geselecteerde bestanden',\n        cancelLabel: 'Annuleren',\n        cancelTitle: 'Annuleer upload',\n        uploadLabel: 'Upload',\n        uploadTitle: 'Upload geselecteerde bestanden',\n        msgNo: 'Nee',\n        msgNoFilesSelected: '',\n        msgCancelled: 'Geannuleerd',\n        msgPlaceholder: 'Select {files}...',\n        msgZoomModalHeading: 'Gedetailleerd voorbeeld',\n        msgFileRequired: 'U moet een bestand kiezen om te uploaden.',\n        msgSizeTooSmall: 'Bestand \"{name}\" (<b>{size} KB</b>) is te klein en moet groter zijn dan <b>{minSize} KB</b>.',\n        msgSizeTooLarge: 'Bestand \"{name}\" (<b>{size} KB</b>) is groter dan de toegestane <b>{maxSize} KB</b>.',\n        msgFilesTooLess: 'U moet minstens <b>{n}</b> {files} selecteren om te uploaden.',\n        msgFilesTooMany: 'Aantal geselecteerde bestanden <b>({n})</b> is meer dan de toegestane <b>{m}</b>.',\n        msgFileNotFound: 'Bestand \"{name}\" niet gevonden!',\n        msgFileSecured: 'Bestand kan niet gelezen worden in verband met beveiligings redenen \"{name}\".',\n        msgFileNotReadable: 'Bestand \"{name}\" is niet leesbaar.',\n        msgFilePreviewAborted: 'Bestand weergaven geannuleerd voor \"{name}\".',\n        msgFilePreviewError: 'Er is een fout opgetreden met het lezen van \"{name}\".',\n        msgInvalidFileName: 'Ongeldige of niet ondersteunde karakters in bestandsnaam \"{name}\".',\n        msgInvalidFileType: 'Geen geldig bestand \"{name}\". Alleen \"{types}\" zijn toegestaan.',\n        msgInvalidFileExtension: 'Geen geldige extensie \"{name}\". Alleen \"{extensions}\" zijn toegestaan.',\n        msgFileTypes: {\n            'image': 'afbeelding',\n            'html': 'HTML',\n            'text': 'tekst',\n            'video': 'video',\n            'audio': 'geluid',\n            'flash': 'flash',\n            'pdf': 'PDF',\n            'object': 'object'\n        },\n        msgUploadAborted: 'Het uploaden van bestanden is afgebroken',\n        msgUploadThreshold: 'Verwerken...',\n        msgUploadBegin: 'Initialiseren...',\n        msgUploadEnd: 'Gedaan',\n        msgUploadEmpty: 'Geen geldige data beschikbaar voor upload.',\n        msgUploadError: 'Error',\n        msgValidationError: 'Bevestiging fout',\n        msgLoading: 'Bestanden laden {index} van de {files} &hellip;',\n        msgProgress: 'Bestanden laden {index} van de {files} - {name} - {percent}% compleet.',\n        msgSelected: '{n} {files} geselecteerd',\n        msgFoldersNotAllowed: 'Drag & drop alleen bestanden! {n} overgeslagen map(pen).',\n        msgImageWidthSmall: 'Breedte van het foto-bestand \"{name}\" moet minstens {size} px zijn.',\n        msgImageHeightSmall: 'Hoogte van het foto-bestand \"{name}\" moet minstens {size} px zijn.',\n        msgImageWidthLarge: 'Breedte van het foto-bestand \"{name}\" kan niet hoger zijn dan {size} px.',\n        msgImageHeightLarge: 'Hoogte van het foto bestand \"{name}\" kan niet hoger zijn dan {size} px.',\n        msgImageResizeError: 'Kon de foto afmetingen niet lezen om te verkleinen.',\n        msgImageResizeException: 'Fout bij het verkleinen van de foto.<pre>{errors}</pre>',\n        msgAjaxError: 'Er ging iets mis met de {operation} actie. Gelieve later opnieuw te proberen!',\n        msgAjaxProgressError: '{operation} mislukt',\n        ajaxOperations: {\n            deleteThumb: 'bestand verwijderen',\n            uploadThumb: 'bestand uploaden',\n            uploadBatch: 'alle bestanden uploaden',\n            uploadExtra: 'form data upload'\n        },\n        dropZoneTitle: 'Drag & drop bestanden hier &hellip;',\n        dropZoneClickTitle: '<br>(of klik hier om {files} te selecteren)',\n        fileActionSettings: {\n            removeTitle: 'Verwijder bestand',\n            uploadTitle: 'bestand uploaden',\n            uploadRetryTitle: 'Retry upload',\n            downloadTitle: 'Download file',\n            zoomTitle: 'Bekijk details',\n            dragTitle: 'Move / Rearrange',\n            indicatorNewTitle: 'Nog niet geupload',\n            indicatorSuccessTitle: 'geupload',\n            indicatorErrorTitle: 'fout uploaden',\n            indicatorLoadingTitle: 'uploaden ...'\n        },\n        previewZoomButtonTitles: {\n            prev: 'Toon vorig bestand',\n            next: 'Toon volgend bestand',\n            toggleheader: 'Toggle header',\n            fullscreen: 'Toggle full screen',\n            borderless: 'Toggle borderless mode',\n            close: 'Close detailed preview'\n        }\n    };\n})(window.jQuery);\n"
  },
  {
    "path": "static/bootstrap/plugins/bootstrap-fileinput/4.4.7/js/locales/no.js",
    "content": "/*!\n * FileInput Norwegian Translations\n *\n * This file must be loaded after 'fileinput.js'. Patterns in braces '{}', or\n * any HTML markup tags in the messages must not be converted or translated.\n *\n * @see http://github.com/kartik-v/bootstrap-fileinput\n *\n * NOTE: this file must be saved in UTF-8 encoding.\n */\n(function ($) {\n    \"use strict\";\n\n    $.fn.fileinputLocales['no'] = {\n        fileSingle: 'fil',\n        filePlural: 'filer',\n        browseLabel: 'Bla gjennom &hellip;',\n        removeLabel: 'Fjern',\n        removeTitle: 'Fjern valgte filer',\n        cancelLabel: 'Avbryt',\n        cancelTitle: 'Stopp pågående opplastninger',\n        uploadLabel: 'Last opp',\n        uploadTitle: 'Last opp valgte filer',\n        msgNo: 'Nei',\n        msgNoFilesSelected: 'Ingen filer er valgt',\n        msgCancelled: 'Avbrutt',\n        msgPlaceholder: 'Select {files}...',\n        msgZoomModalHeading: 'Detaljert visning',\n        msgFileRequired: 'You must select a file to upload.',\n        msgSizeTooSmall: 'Filen \"{name}\" (<b>{size} KB</b>) er for liten og må være større enn <b>{minSize} KB</b>.',\n        msgSizeTooLarge: 'Filen \"{name}\" (<b>{size} KB</b>) er for stor, maksimal filstørrelse er <b>{maxSize} KB</b>.',\n        msgFilesTooLess: 'Du må velge minst <b>{n}</b> {files} for opplastning.',\n        msgFilesTooMany: 'For mange filer til opplastning, <b>({n})</b> overstiger maksantallet som er <b>{m}</b>.',\n        msgFileNotFound: 'Fant ikke filen \"{name}\"!',\n        msgFileSecured: 'Sikkerhetsrestriksjoner hindrer lesing av filen \"{name}\".',\n        msgFileNotReadable: 'Filen \"{name}\" er ikke lesbar.',\n        msgFilePreviewAborted: 'Filvisning avbrutt for \"{name}\".',\n        msgFilePreviewError: 'En feil oppstod under lesing av filen \"{name}\".',\n        msgInvalidFileName: 'Ugyldige tegn i filen \"{name}\".',\n        msgInvalidFileType: 'Ugyldig type for filen \"{name}\". Kun \"{types}\" filer er tillatt.',\n        msgInvalidFileExtension: 'Ugyldig endelse for filen \"{name}\". Kun \"{extensions}\" filer støttes.',\n        msgFileTypes: {\n            'image': 'image',\n            'html': 'HTML',\n            'text': 'text',\n            'video': 'video',\n            'audio': 'audio',\n            'flash': 'flash',\n            'pdf': 'PDF',\n            'object': 'object'\n        },\n        msgUploadAborted: 'Filopplastningen ble avbrutt',\n        msgUploadThreshold: 'Prosesserer...',\n        msgUploadBegin: 'Initialiserer...',\n        msgUploadEnd: 'Ferdig',\n        msgUploadEmpty: 'Ingen gyldige data tilgjengelig for opplastning.',\n        msgUploadError: 'Error',\n        msgValidationError: 'Valideringsfeil',\n        msgLoading: 'Laster fil {index} av {files} &hellip;',\n        msgProgress: 'Laster fil {index} av {files} - {name} - {percent}% fullført.',\n        msgSelected: '{n} {files} valgt',\n        msgFoldersNotAllowed: 'Kun Dra & slipp filer! Hoppet over {n} mappe(r).',\n        msgImageWidthSmall: 'Bredde på bildefilen \"{name}\" må være minst {size} px.',\n        msgImageHeightSmall: 'Høyde på bildefilen \"{name}\" må være minst {size} px.',\n        msgImageWidthLarge: 'Bredde på bildefilen \"{name}\" kan ikke overstige {size} px.',\n        msgImageHeightLarge: 'Høyde på bildefilen \"{name}\" kan ikke overstige {size} px.',\n        msgImageResizeError: 'Fant ikke dimensjonene som skulle resizes.',\n        msgImageResizeException: 'En feil oppstod under endring av størrelse .<pre>{errors}</pre>',\n        msgAjaxError: 'Noe gikk galt med {operation} operasjonen. Vennligst prøv igjen senere!',\n        msgAjaxProgressError: '{operation} feilet',\n        ajaxOperations: {\n            deleteThumb: 'file delete',\n            uploadThumb: 'file upload',\n            uploadBatch: 'batch file upload',\n            uploadExtra: 'form data upload'\n        },\n        dropZoneTitle: 'Dra & slipp filer her &hellip;',\n        dropZoneClickTitle: '<br>(eller klikk for å velge {files})',\n        fileActionSettings: {\n            removeTitle: 'Fjern fil',\n            uploadTitle: 'Last opp fil',\n            uploadRetryTitle: 'Retry upload',\n            zoomTitle: 'Vis detaljer',\n            dragTitle: 'Flytt / endre rekkefølge',\n            indicatorNewTitle: 'Opplastning ikke fullført',\n            indicatorSuccessTitle: 'Opplastet',\n            indicatorErrorTitle: 'Opplastningsfeil',\n            indicatorLoadingTitle: 'Laster opp ...'\n        },\n        previewZoomButtonTitles: {\n            prev: 'Vis forrige fil',\n            next: 'Vis neste fil',\n            toggleheader: 'Vis header',\n            fullscreen: 'Åpne fullskjerm',\n            borderless: 'Åpne uten kanter',\n            close: 'Lukk detaljer'\n        }\n    };\n})(window.jQuery);\n"
  },
  {
    "path": "static/bootstrap/plugins/bootstrap-fileinput/4.4.7/js/locales/pl.js",
    "content": "/*!\n * FileInput Polish Translations\n *\n * This file must be loaded after 'fileinput.js'. Patterns in braces '{}', or\n * any HTML markup tags in the messages must not be converted or translated.\n *\n * @see http://github.com/kartik-v/bootstrap-fileinput\n *\n * NOTE: this file must be saved in UTF-8 encoding.\n */\n(function ($) {\n    \"use strict\";\n\n    $.fn.fileinputLocales['pl'] = {\n        fileSingle: 'plik',\n        filePlural: 'pliki',\n        browseLabel: 'Przeglądaj &hellip;',\n        removeLabel: 'Usuń',\n        removeTitle: 'Usuń zaznaczone pliki',\n        cancelLabel: 'Przerwij',\n        cancelTitle: 'Anuluj wysyłanie',\n        uploadLabel: 'Wgraj',\n        uploadTitle: 'Wgraj zaznaczone pliki',\n        msgNo: 'Nie',\n        msgNoFilesSelected: 'Brak zaznaczonych plików',\n        msgCancelled: 'Odwołany',\n        msgPlaceholder: 'Wybierz {files}...',\n        msgZoomModalHeading: 'Szczegółowy podgląd',\n        msgFileRequired: 'Musisz wybrać plik do wgrania.',\n        msgSizeTooSmall: 'Plik \"{name}\" (<b>{size} KB</b>) jest zbyt mały i musi być większy niż <b>{minSize} KB</b>.',\n        msgSizeTooLarge: 'Plik o nazwie \"{name}\" (<b>{size} KB</b>) przekroczył maksymalną dopuszczalną wielkość pliku wynoszącą <b>{maxSize} KB</b>.',\n        msgFilesTooLess: 'Minimalna liczba plików do wgrania: <b>{n}</b>.',\n        msgFilesTooMany: 'Liczba plików wybranych do wgrania w liczbie <b>({n})</b>, przekracza maksymalny dozwolony limit wynoszący <b>{m}</b>.',\n        msgFileNotFound: 'Plik \"{name}\" nie istnieje!',\n        msgFileSecured: 'Ustawienia zabezpieczeń uniemożliwiają odczyt pliku \"{name}\".',\n        msgFileNotReadable: 'Plik \"{name}\" nie jest plikiem do odczytu.',\n        msgFilePreviewAborted: 'Podgląd pliku \"{name}\" został przerwany.',\n        msgFilePreviewError: 'Wystąpił błąd w czasie odczytu pliku \"{name}\".',\n        msgInvalidFileName: 'Nieprawidłowe lub nieobsługiwane znaki w nazwie pliku \"{name}\".',\n        msgInvalidFileType: 'Nieznany typ pliku \"{name}\". Tylko następujące rodzaje plików są dozwolone: \"{types}\".',\n        msgInvalidFileExtension: 'Złe rozszerzenie dla pliku \"{name}\". Tylko następujące rozszerzenia plików są dozwolone: \"{extensions}\".',\n        msgUploadAborted: 'Przesyłanie pliku zostało przerwane',\n        msgUploadThreshold: 'Przetwarzanie...',\n        msgUploadBegin: 'Rozpoczynanie...',\n        msgUploadEnd: 'Gotowe!',\n        msgUploadEmpty: 'Brak poprawnych danych do przesłania.',\n        msgUploadError: 'Błąd',\n        msgValidationError: 'Błąd walidacji',\n        msgLoading: 'Wczytywanie pliku {index} z {files} &hellip;',\n        msgProgress: 'Wczytywanie pliku {index} z {files} - {name} - {percent}% zakończone.',\n        msgSelected: '{n} Plików zaznaczonych',\n        msgFoldersNotAllowed: 'Metodą przeciągnij i upuść, można przenosić tylko pliki. Pominięto {n} katalogów.',\n        msgImageWidthSmall: 'Szerokość pliku obrazu \"{name}\" musi być co najmniej {size} px.',\n        msgImageHeightSmall: 'Wysokość pliku obrazu \"{name}\" musi być co najmniej {size} px.',\n        msgImageWidthLarge: 'Szerokość pliku obrazu \"{name}\" nie może przekraczać {size} px.',\n        msgImageHeightLarge: 'Wysokość pliku obrazu \"{name}\" nie może przekraczać {size} px.',\n        msgImageResizeError: 'Nie udało się uzyskać wymiaru obrazu, aby zmienić rozmiar.',\n        msgImageResizeException: 'Błąd podczas zmiany rozmiaru obrazu.<pre>{errors}</pre>',\n        msgAjaxError: 'Coś poczło nie tak podczas {operation}. Spróbuj ponownie!',\n        msgAjaxProgressError: '{operation} nie powiodło się',\n        ajaxOperations: {\n            deleteThumb: 'usuwanie pliku',\n            uploadThumb: 'przesyłanie pliku',\n            uploadBatch: 'masowe przesyłanie plików',\n            uploadExtra: 'przesyłanie danych formularza'\n        },\n        dropZoneTitle: 'Przeciągnij i upuść pliki tutaj &hellip;',\n        dropZoneClickTitle: '<br>(lub kliknij tutaj i wybierz {files} z komputera)',\n        fileActionSettings: {\n            removeTitle: 'Usuń plik',\n            uploadTitle: 'Przesyłanie pliku',\n            uploadRetryTitle: 'Ponów',\n            downloadTitle: 'Pobierz plik',\n            zoomTitle: 'Pokaż szczegóły',\n            dragTitle: 'Przenies / Ponownie zaaranżuj',\n            indicatorNewTitle: 'Jeszcze nie przesłany',\n            indicatorSuccessTitle: 'Dodane',\n            indicatorErrorTitle: 'Błąd',\n            indicatorLoadingTitle: 'Przesyłanie ...'\n        },\n        previewZoomButtonTitles: {\n            prev: 'Pokaż poprzedni plik',\n            next: 'Pokaż następny plik',\n            toggleheader: 'Włącz / wyłącz nagłówek',\n            fullscreen: 'Włącz / wyłącz pełny ekran',\n            borderless: 'Włącz / wyłącz tryb bez ramek',\n            close: 'Zamknij szczegółowy widok'\n        }\n    };\n})(window.jQuery);\n"
  },
  {
    "path": "static/bootstrap/plugins/bootstrap-fileinput/4.4.7/js/locales/pt-BR.js",
    "content": "/*!\n * FileInput Brazillian Portuguese Translations\n *\n * This file must be loaded after 'fileinput.js'. Patterns in braces '{}', or\n * any HTML markup tags in the messages must not be converted or translated.\n *\n * @see http://github.com/kartik-v/bootstrap-fileinput\n *\n * NOTE: this file must be saved in UTF-8 encoding.\n */\n(function ($) {\n    \"use strict\";\n\n    $.fn.fileinputLocales['pt-BR'] = {\n        fileSingle: 'arquivo',\n        filePlural: 'arquivos',\n        browseLabel: 'Procurar&hellip;',\n        removeLabel: 'Remover',\n        removeTitle: 'Remover arquivos selecionados',\n        cancelLabel: 'Cancelar',\n        cancelTitle: 'Interromper envio em andamento',\n        uploadLabel: 'Enviar',\n        uploadTitle: 'Enviar arquivos selecionados',\n        msgNo: 'Não',\n        msgNoFilesSelected: 'Nenhum arquivo selecionado',\n        msgCancelled: 'Cancelado',\n        msgPlaceholder: 'Selecionar {files}...',\n        msgZoomModalHeading: 'Pré-visualização detalhada',\n        msgFileRequired: 'Você deve selecionar um arquivo para enviar.',\n        msgSizeTooSmall: 'O arquivo \"{name}\" (<b>{size} KB</b>) é muito pequeno e deve ser maior que <b>{minSize} KB</b>.',\n        msgSizeTooLarge: 'O arquivo \"{name}\" (<b>{size} KB</b>) excede o tamanho máximo permitido de <b>{maxSize} KB</b>.',\n        msgFilesTooLess: 'Você deve selecionar pelo menos <b>{n}</b> {files} para enviar.',\n        msgFilesTooMany: 'O número de arquivos selecionados para o envio <b>({n})</b> excede o limite máximo permitido de <b>{m}</b>.',\n        msgFileNotFound: 'O arquivo \"{name}\" não foi encontrado!',\n        msgFileSecured: 'Restrições de segurança impedem a leitura do arquivo \"{name}\".',\n        msgFileNotReadable: 'O arquivo \"{name}\" não pode ser lido.',\n        msgFilePreviewAborted: 'A pré-visualização do arquivo \"{name}\" foi interrompida.',\n        msgFilePreviewError: 'Ocorreu um erro ao ler o arquivo \"{name}\".',\n        msgInvalidFileName: 'Caracteres inválidos ou não suportados no arquivo \"{name}\".',\n        msgInvalidFileType: 'Tipo inválido para o arquivo \"{name}\". Apenas arquivos \"{types}\" são permitidos.',\n        msgInvalidFileExtension: 'Extensão inválida para o arquivo \"{name}\". Apenas arquivos \"{extensions}\" são permitidos.',\n        msgFileTypes: {\n            'image': 'imagem',\n            'html': 'HTML',\n            'text': 'texto',\n            'video': 'vídeo',\n            'audio': 'audio',\n            'flash': 'flash',\n            'pdf': 'PDF',\n            'object': 'objeto'\n        },\n        msgUploadAborted: 'O envio do arquivo foi abortado',\n        msgUploadThreshold: 'Processando...',\n        msgUploadBegin: 'Inicializando...',\n        msgUploadEnd: 'Concluído',\n        msgUploadEmpty: 'Nenhuma informação válida para upload.',\n        msgUploadError: 'Erro de Upload',\n        msgValidationError: 'Erro de validação',\n        msgLoading: 'Enviando arquivo {index} de {files}&hellip;',\n        msgProgress: 'Enviando arquivo {index} de {files} - {name} - {percent}% completo.',\n        msgSelected: '{n} {files} selecionado(s)',\n        msgFoldersNotAllowed: 'Arraste e solte apenas arquivos! {n} pasta(s) ignoradas.',\n        msgImageWidthSmall: 'Largura do arquivo de imagem \"{name}\" deve ser pelo menos {size} px.',\n        msgImageHeightSmall: 'Altura do arquivo de imagem \"{name}\" deve ser pelo menos {size} px.',\n        msgImageWidthLarge: 'Largura do arquivo de imagem \"{name}\" não pode exceder {size} px.',\n        msgImageHeightLarge: 'Altura do arquivo de imagem \"{name}\" não pode exceder {size} px.',\n        msgImageResizeError: 'Não foi possível obter as dimensões da imagem para redimensionar.',\n        msgImageResizeException: 'Erro ao redimensionar a imagem.<pre>{errors}</pre>',\n        msgAjaxError: 'Algo deu errado com a operação {operation}. Por favor tente novamente mais tarde!',\n        msgAjaxProgressError: '{operation} falhou',\n        ajaxOperations: {\n            deleteThumb: 'Exclusão de arquivo',\n            uploadThumb: 'Upload de arquivos',\n            uploadBatch: 'Carregamento de arquivos em lote',\n            uploadExtra: 'Carregamento de dados do formulário'\n        },\n        dropZoneTitle: 'Arraste e solte os arquivos aqui&hellip;',\n        dropZoneClickTitle: '<br>(ou clique para selecionar o(s) arquivo(s))',\n        fileActionSettings: {\n            removeTitle: 'Remover arquivo',\n            uploadTitle: 'Enviar arquivo',\n            uploadRetryTitle: 'Retry upload',\n            downloadTitle: 'Download file',\n            zoomTitle: 'Ver detalhes',\n            dragTitle: 'Mover / Reordenar',\n            indicatorNewTitle: 'Ainda não enviado',\n            indicatorSuccessTitle: 'Enviado',\n            indicatorErrorTitle: 'Erro',\n            indicatorLoadingTitle: 'Enviando...'\n        },\n        previewZoomButtonTitles: {\n            prev: 'Visualizar arquivo anterior',\n            next: 'Visualizar próximo arquivo',\n            toggleheader: 'Mostrar cabeçalho',\n            fullscreen: 'Ativar tela cheia',\n            borderless: 'Ativar modo sem borda',\n            close: 'Fechar pré-visualização detalhada'\n        }\n    };\n})(window.jQuery);\n"
  },
  {
    "path": "static/bootstrap/plugins/bootstrap-fileinput/4.4.7/js/locales/pt.js",
    "content": "/*!\n * FileInput Portuguese Translations\n *\n * This file must be loaded after 'fileinput.js'. Patterns in braces '{}', or\n * any HTML markup tags in the messages must not be converted or translated.\n *\n * @see http://github.com/kartik-v/bootstrap-fileinput\n *\n * NOTE: this file must be saved in UTF-8 encoding.\n */\n(function ($) {\n    \"use strict\";\n\n    $.fn.fileinputLocales['pt'] = {\n        fileSingle: 'ficheiro',\n        filePlural: 'ficheiros',\n        browseLabel: 'Procurar &hellip;',\n        removeLabel: 'Remover',\n        removeTitle: 'Remover ficheiros seleccionados',\n        cancelLabel: 'Cancelar',\n        cancelTitle: 'Abortar carregamento ',\n        uploadLabel: 'Carregar',\n        uploadTitle: 'Carregar ficheiros seleccionados',\n        msgNo: 'Não',\n        msgNoFilesSelected: '',\n        msgCancelled: 'Cancelado',\n        msgPlaceholder: 'Select {files}...',\n        msgZoomModalHeading: 'Pré-visualização detalhada',\n        msgFileRequired: 'You must select a file to upload.',\n        msgSizeTooSmall: 'File \"{name}\" (<b>{size} KB</b>) is too small and must be larger than <b>{minSize} KB</b>.',\n        msgSizeTooLarge: 'Ficheiro \"{name}\" (<b>{size} KB</b>) excede o tamanho máximo permido de <b>{maxSize} KB</b>.',\n        msgFilesTooLess: 'Deve seleccionar pelo menos <b>{n}</b> {files} para fazer upload.',\n        msgFilesTooMany: 'Número máximo de ficheiros seleccionados <b>({n})</b> excede o limite máximo de <b>{m}</b>.',\n        msgFileNotFound: 'Ficheiro \"{name}\" não encontrado!',\n        msgFileSecured: 'Restrições de segurança preventem a leitura do ficheiro \"{name}\".',\n        msgFileNotReadable: 'Ficheiro \"{name}\" não pode ser lido.',\n        msgFilePreviewAborted: 'Pré-visualização abortado para o ficheiro \"{name}\".',\n        msgFilePreviewError: 'Ocorreu um erro ao ler o ficheiro \"{name}\".',\n        msgInvalidFileName: 'Invalid or unsupported characters in file name \"{name}\".',\n        msgInvalidFileType: 'Tipo inválido para o ficheiro \"{name}\". Apenas ficheiros \"{types}\" são suportados.',\n        msgInvalidFileExtension: 'Extensão inválida para o ficheiro \"{name}\". Apenas ficheiros \"{extensions}\" são suportados.',\n        msgFileTypes: {\n            'image': 'image',\n            'html': 'HTML',\n            'text': 'text',\n            'video': 'video',\n            'audio': 'audio',\n            'flash': 'flash',\n            'pdf': 'PDF',\n            'object': 'object'\n        },\n        msgUploadAborted: 'O upload do arquivo foi abortada',\n        msgUploadThreshold: 'Processing...',\n        msgUploadBegin: 'Initializing...',\n        msgUploadEnd: 'Done',\n        msgUploadEmpty: 'No valid data available for upload.',\n        msgUploadError: 'Error',\n        msgValidationError: 'Erro de validação',\n        msgLoading: 'A carregar ficheiro {index} de {files} &hellip;',\n        msgProgress: 'A carregar ficheiro {index} de {files} - {name} - {percent}% completo.',\n        msgSelected: '{n} {files} seleccionados',\n        msgFoldersNotAllowed: 'Arrastar e largar ficheiros apenas! {n} pasta(s) ignoradas.',\n        msgImageWidthSmall: 'Largura do arquivo de imagem \"{name}\" deve ser pelo menos {size} px.',\n        msgImageHeightSmall: 'Altura do arquivo de imagem \"{name}\" deve ser pelo menos {size} px.',\n        msgImageWidthLarge: 'Largura do arquivo de imagem \"{name}\" não pode exceder {size} px.',\n        msgImageHeightLarge: 'Altura do arquivo de imagem \"{name}\" não pode exceder {size} px.',\n        msgImageResizeError: 'Could not get the image dimensions to resize.',\n        msgImageResizeException: 'Erro ao redimensionar a imagem.<pre>{errors}</pre>',\n        msgAjaxError: 'Something went wrong with the {operation} operation. Please try again later!',\n        msgAjaxProgressError: '{operation} failed',\n        ajaxOperations: {\n            deleteThumb: 'file delete',\n            uploadThumb: 'file upload',\n            uploadBatch: 'batch file upload',\n            uploadExtra: 'form data upload'\n        },\n        dropZoneTitle: 'Arrastar e largar ficheiros aqui &hellip;',\n        dropZoneClickTitle: '<br>(or click to select {files})',\n        fileActionSettings: {\n            removeTitle: 'Remover arquivo',\n            uploadTitle: 'Carregar arquivo',\n            uploadRetryTitle: 'Retry upload',\n            downloadTitle: 'Download file',\n            zoomTitle: 'Ver detalhes',\n            dragTitle: 'Move / Rearrange',\n            indicatorNewTitle: 'Ainda não carregou',\n            indicatorSuccessTitle: 'Carregado',\n            indicatorErrorTitle: 'Carregar Erro',\n            indicatorLoadingTitle: 'A carregar ...'\n        },\n        previewZoomButtonTitles: {\n            prev: 'View previous file',\n            next: 'View next file',\n            toggleheader: 'Toggle header',\n            fullscreen: 'Toggle full screen',\n            borderless: 'Toggle borderless mode',\n            close: 'Close detailed preview'\n        }\n    };\n})(window.jQuery);"
  },
  {
    "path": "static/bootstrap/plugins/bootstrap-fileinput/4.4.7/js/locales/ro.js",
    "content": "/*!\n * FileInput Romanian Translations\n *\n * This file must be loaded after 'fileinput.js'. Patterns in braces '{}', or\n * any HTML markup tags in the messages must not be converted or translated.\n *\n * @see http://github.com/kartik-v/bootstrap-fileinput\n * @author Ciprian Voicu <pictoru@autoportret.ro>\n *\n * NOTE: this file must be saved in UTF-8 encoding.\n */\n(function ($) {\n    \"use strict\";\n\n    $.fn.fileinputLocales['ro'] = {\n        fileSingle: 'fișier',\n        filePlural: 'fișiere',\n        browseLabel: 'Răsfoiește &hellip;',\n        removeLabel: 'Șterge',\n        removeTitle: 'Curăță fișierele selectate',\n        cancelLabel: 'Renunță',\n        cancelTitle: 'Anulează încărcarea curentă',\n        uploadLabel: 'Încarcă',\n        uploadTitle: 'Încarcă fișierele selectate',\n        msgNo: 'Nu',\n        msgNoFilesSelected: '',\n        msgCancelled: 'Anulat',\n        msgPlaceholder: 'Select {files}...',\n        msgZoomModalHeading: 'Previzualizare detaliată',\n        msgFileRequired: 'You must select a file to upload.',\n        msgSizeTooSmall: 'File \"{name}\" (<b>{size} KB</b>) is too small and must be larger than <b>{minSize} KB</b>.',\n        msgSizeTooLarge: 'Fișierul \"{name}\" (<b>{size} KB</b>) depășește limita maximă de încărcare de <b>{maxSize} KB</b>.',\n        msgFilesTooLess: 'Trebuie să selectezi cel puțin <b>{n}</b> {files} pentru a încărca.',\n        msgFilesTooMany: 'Numărul fișierelor pentru încărcare <b>({n})</b> depășește limita maximă de <b>{m}</b>.',\n        msgFileNotFound: 'Fișierul \"{name}\" nu a fost găsit!',\n        msgFileSecured: 'Restricții de securitate previn citirea fișierului \"{name}\".',\n        msgFileNotReadable: 'Fișierul \"{name}\" nu se poate citi.',\n        msgFilePreviewAborted: 'Fișierului \"{name}\" nu poate fi previzualizat.',\n        msgFilePreviewError: 'A intervenit o eroare în încercarea de citire a fișierului \"{name}\".',\n        msgInvalidFileName: 'Invalid or unsupported characters in file name \"{name}\".',\n        msgInvalidFileType: 'Tip de fișier incorect pentru \"{name}\". Sunt suportate doar fișiere de tipurile \"{types}\".',\n        msgInvalidFileExtension: 'Extensie incorectă pentru \"{name}\". Sunt suportate doar extensiile \"{extensions}\".',\n        msgFileTypes: {\n            'image': 'image',\n            'html': 'HTML',\n            'text': 'text',\n            'video': 'video',\n            'audio': 'audio',\n            'flash': 'flash',\n            'pdf': 'PDF',\n            'object': 'object'\n        },\n        msgUploadAborted: 'Fișierul Încărcarea a fost întrerupt',\n        msgUploadThreshold: 'Processing...',\n        msgUploadBegin: 'Initializing...',\n        msgUploadEnd: 'Done',\n        msgUploadEmpty: 'No valid data available for upload.',\n        msgUploadError: 'Error',\n        msgValidationError: 'Eroare de validare',\n        msgLoading: 'Se încarcă fișierul {index} din {files} &hellip;',\n        msgProgress: 'Se încarcă fișierul {index} din {files} - {name} - {percent}% încărcat.',\n        msgSelected: '{n} {files} încărcate',\n        msgFoldersNotAllowed: 'Se poate doar trăgând fișierele! Se renunță la {n} dosar(e).',\n        msgImageWidthSmall: 'Lățimea de fișier de imagine \"{name}\" trebuie să fie de cel puțin {size} px.',\n        msgImageHeightSmall: 'Înălțimea fișier imagine \"{name}\" trebuie să fie de cel puțin {size} px.',\n        msgImageWidthLarge: 'Lățimea de fișier de imagine \"{name}\" nu poate depăși {size} px.',\n        msgImageHeightLarge: 'Înălțimea fișier imagine \"{name}\" nu poate depăși {size} px.',\n        msgImageResizeError: 'Nu a putut obține dimensiunile imaginii pentru a redimensiona.',\n        msgImageResizeException: 'Eroare la redimensionarea imaginii.<pre>{errors}</pre>',\n        msgAjaxError: 'Something went wrong with the {operation} operation. Please try again later!',\n        msgAjaxProgressError: '{operation} failed',\n        ajaxOperations: {\n            deleteThumb: 'file delete',\n            uploadThumb: 'file upload',\n            uploadBatch: 'batch file upload',\n            uploadExtra: 'form data upload'\n        },\n        dropZoneTitle: 'Trage fișierele aici &hellip;',\n        dropZoneClickTitle: '<br>(or click to select {files})',\n        fileActionSettings: {\n            removeTitle: 'Scoateți fișier',\n            uploadTitle: 'Incarca fisier',\n            uploadRetryTitle: 'Retry upload',\n            downloadTitle: 'Download file',\n            zoomTitle: 'Vezi detalii',\n            dragTitle: 'Move / Rearrange',\n            indicatorNewTitle: 'Nu a încărcat încă',\n            indicatorSuccessTitle: 'încărcat',\n            indicatorErrorTitle: 'Încărcați eroare',\n            indicatorLoadingTitle: 'Se încarcă ...'\n        },\n        previewZoomButtonTitles: {\n            prev: 'View previous file',\n            next: 'View next file',\n            toggleheader: 'Toggle header',\n            fullscreen: 'Toggle full screen',\n            borderless: 'Toggle borderless mode',\n            close: 'Close detailed preview'\n        }\n    };\n})(window.jQuery);\n"
  },
  {
    "path": "static/bootstrap/plugins/bootstrap-fileinput/4.4.7/js/locales/ru.js",
    "content": "/*!\n * FileInput Russian Translations\n *\n * This file must be loaded after 'fileinput.js'. Patterns in braces '{}', or\n * any HTML markup tags in the messages must not be converted or translated.\n *\n * @see http://github.com/kartik-v/bootstrap-fileinput\n * @author CyanoFresh <cyanofresh@gmail.com>\n *\n * NOTE: this file must be saved in UTF-8 encoding.\n */\n(function ($) {\n    \"use strict\";\n\n    $.fn.fileinputLocales['ru'] = {\n        fileSingle: 'файл',\n        filePlural: 'файлы',\n        browseLabel: 'Выбрать &hellip;',\n        removeLabel: 'Удалить',\n        removeTitle: 'Очистить выбранные файлы',\n        cancelLabel: 'Отмена',\n        cancelTitle: 'Отменить текущую загрузку',\n        uploadLabel: 'Загрузить',\n        uploadTitle: 'Загрузить выбранные файлы',\n        msgNo: 'нет',\n        msgNoFilesSelected: '',\n        msgCancelled: 'Отменено',\n        msgPlaceholder: 'Выбрать {files}...',\n        msgZoomModalHeading: 'Подробное превью',\n        msgFileRequired: 'Необходимо выбрать файл для загрузки.',\n        msgSizeTooSmall: 'Файл \"{name}\" (<b>{size} KB</b>) имеет слишком маленький размер и должен быть больше <b>{minSize} KB</b>.',\n        msgSizeTooLarge: 'Файл \"{name}\" (<b>{size} KB</b>) превышает максимальный размер <b>{maxSize} KB</b>.',\n        msgFilesTooLess: 'Вы должны выбрать как минимум <b>{n}</b> {files} для загрузки.',\n        msgFilesTooMany: 'Количество выбранных файлов <b>({n})</b> превышает максимально допустимое количество <b>{m}</b>.',\n        msgFileNotFound: 'Файл \"{name}\" не найден!',\n        msgFileSecured: 'Ограничения безопасности запрещают читать файл \"{name}\".',\n        msgFileNotReadable: 'Файл \"{name}\" невозможно прочитать.',\n        msgFilePreviewAborted: 'Предпросмотр отменен для файла \"{name}\".',\n        msgFilePreviewError: 'Произошла ошибка при чтении файла \"{name}\".',\n        msgInvalidFileName: 'Неверные или неподдерживаемые символы в названии файла \"{name}\".',\n        msgInvalidFileType: 'Запрещенный тип файла для \"{name}\". Только \"{types}\" разрешены.',\n        msgInvalidFileExtension: 'Запрещенное расширение для файла \"{name}\". Только \"{extensions}\" разрешены.',\n        msgFileTypes: {\n            'image': 'image',\n            'html': 'HTML',\n            'text': 'text',\n            'video': 'video',\n            'audio': 'audio',\n            'flash': 'flash',\n            'pdf': 'PDF',\n            'object': 'object'\n        },\n        msgUploadAborted: 'Выгрузка файла прервана',\n        msgUploadThreshold: 'Обработка...',\n        msgUploadBegin: 'Инициализация...',\n        msgUploadEnd: 'Готово',\n        msgUploadEmpty: 'Недопустимые данные для загрузки',\n        msgUploadError: 'Ошибка загрузки',\n        msgValidationError: 'Ошибка проверки',\n        msgLoading: 'Загрузка файла {index} из {files} &hellip;',\n        msgProgress: 'Загрузка файла {index} из {files} - {name} - {percent}% завершено.',\n        msgSelected: 'Выбрано файлов: {n}',\n        msgFoldersNotAllowed: 'Разрешено перетаскивание только файлов! Пропущено {n} папок.',\n        msgImageWidthSmall: 'Ширина изображения {name} должна быть не меньше {size} px.',\n        msgImageHeightSmall: 'Высота изображения {name} должна быть не меньше {size} px.',\n        msgImageWidthLarge: 'Ширина изображения \"{name}\" не может превышать {size} px.',\n        msgImageHeightLarge: 'Высота изображения \"{name}\" не может превышать {size} px.',\n        msgImageResizeError: 'Не удалось получить размеры изображения, чтобы изменить размер.',\n        msgImageResizeException: 'Ошибка при изменении размера изображения.<pre>{errors}</pre>',\n        msgAjaxError: 'Произошла ошибка при выполнении операции {operation}. Повторите попытку позже!',\n        msgAjaxProgressError: 'Не удалось выполнить {operation}',\n        ajaxOperations: {\n            deleteThumb: 'удалить файл',\n            uploadThumb: 'загрузить файл',\n            uploadBatch: 'загрузить пакет файлов',\n            uploadExtra: 'загрузка данных с формы'\n        },\n        dropZoneTitle: 'Перетащите файлы сюда &hellip;',\n        dropZoneClickTitle: '<br>(Или щёлкните, чтобы выбрать {files})',\n        fileActionSettings: {\n            removeTitle: 'Удалить файл',\n            uploadTitle: 'Загрузить файл',\n            uploadRetryTitle: 'Повторить загрузку',\n            downloadTitle: 'Загрузить файл',\n            zoomTitle: 'Посмотреть детали',\n            dragTitle: 'Переместить / Изменить порядок',\n            indicatorNewTitle: 'Еще не загружен',\n            indicatorSuccessTitle: 'Загружен',\n            indicatorErrorTitle: 'Ошибка загрузки',\n            indicatorLoadingTitle: 'Загрузка ...'\n        },\n        previewZoomButtonTitles: {\n            prev: 'Посмотреть предыдущий файл',\n            next: 'Посмотреть следующий файл',\n            toggleheader: 'Переключить заголовок',\n            fullscreen: 'Переключить полноэкранный режим',\n            borderless: 'Переключить режим без полей',\n            close: 'Закрыть подробный предпросмотр'\n        }\n    };\n})(window.jQuery);\n"
  },
  {
    "path": "static/bootstrap/plugins/bootstrap-fileinput/4.4.7/js/locales/sk.js",
    "content": "/*!\n * FileInput Slovakian Translations\n *\n * This file must be loaded after 'fileinput.js'. Patterns in braces '{}', or\n * any HTML markup tags in the messages must not be converted or translated.\n *\n * @see http://github.com/kartik-v/bootstrap-fileinput\n *\n * NOTE: this file must be saved in UTF-8 encoding.\n */\n(function ($) {\n    \"use strict\";\n\n    $.fn.fileinputLocales['sk'] = {\n        fileSingle: 'súbor',\n        filePlural: 'súbory',\n        browseLabel: 'Vybrať &hellip;',\n        removeLabel: 'Odstrániť',\n        removeTitle: 'Vyčistiť vybraté súbory',\n        cancelLabel: 'Storno',\n        cancelTitle: 'Prerušiť  nahrávanie',\n        uploadLabel: 'Nahrať',\n        uploadTitle: 'Nahrať vybraté súbory',\n        msgNo: 'Nie',\n        msgNoFilesSelected: '',\n        msgCancelled: 'Zrušené',\n        msgPlaceholder: 'Vybrať {files}...',\n        msgZoomModalHeading: 'Detailný náhľad',\n        msgFileRequired: 'Musíte vybrať súbor, ktorý chcete nahrať.',\n        msgSizeTooSmall: 'Súbor \"{name}\" (<b>{size} KB</b>) je príliš malý, musí mať veľkosť najmenej <b>{minSize} KB</b>.',\n        msgSizeTooLarge: 'Súbor \"{name}\" (<b>{size} KB</b>) je príliš veľký, maximálna povolená veľkosť <b>{maxSize} KB</b>.',\n        msgFilesTooLess: 'Musíte vybrať najmenej <b>{n}</b> {files} pre nahranie.',\n        msgFilesTooMany: 'Počet vybratých súborov <b>({n})</b> prekročil maximálny povolený limit <b>{m}</b>.',\n        msgFileNotFound: 'Súbor \"{name}\" nebol nájdený!',\n        msgFileSecured: 'Zabezpečenie súboru znemožnilo čítať súbor \"{name}\".',\n        msgFileNotReadable: 'Súbor \"{name}\" nie je čitateľný.',\n        msgFilePreviewAborted: 'Náhľad súboru bol prerušený pre \"{name}\".',\n        msgFilePreviewError: 'Nastala chyba pri načítaní súboru \"{name}\".',\n        msgInvalidFileName: 'Invalid or unsupported characters in file name \"{name}\".',\n        msgInvalidFileType: 'Neplatný typ súboru \"{name}\". Iba \"{types}\" súborov sú podporované.',\n        msgInvalidFileExtension: 'Neplatná extenzia súboru \"{name}\". Iba \"{extensions}\" súborov sú podporované.',\n        msgFileTypes: {\n            'image': 'obrázok',\n            'html': 'HTML',\n            'text': 'text',\n            'video': 'video',\n            'audio': 'audio',\n            'flash': 'flash',\n            'pdf': 'PDF',\n            'object': 'object'\n        },\n        msgUploadAborted: 'Nahrávanie súboru bolo prerušené',\n        msgUploadThreshold: 'Spracovávam...',\n        msgUploadBegin: 'Inicializujem...',\n        msgUploadEnd: 'Hotovo',\n        msgUploadEmpty: 'Na nahrávanie nie sú k dispozícii žiadne platné údaje.',\n        msgUploadError: 'Chyba',\n        msgValidationError: 'Chyba overenia',\n        msgLoading: 'Nahrávanie súboru {index} z {files} &hellip;',\n        msgProgress: 'Nahrávanie súboru {index} z {files} - {name} - {percent}% dokončené.',\n        msgSelected: '{n} {files} vybraté',\n        msgFoldersNotAllowed: 'Tiahni a pusť iba súbory! Vynechané {n} pustené prečinok(y).',\n        msgImageWidthSmall: 'Šírka obrázku \"{name}\", musí byť minimálne {size} px.',\n        msgImageHeightSmall: 'Výška obrázku \"{name}\", musí byť minimálne {size} px.',\n        msgImageWidthLarge: 'Šírka obrázku \"{name}\" nemôže presiahnuť {size} px.',\n        msgImageHeightLarge: 'Výška obrázku \"{name}\" nesmie presiahnuť {size} px.',\n        msgImageResizeError: 'Nepodarilo sa získať veľkosť obrázka pre zmenu veľkosti.',\n        msgImageResizeException: 'Chyba pri zmene veľkosti obrázka.<pre>{errors}</pre>',\n        msgAjaxError: 'Pri operácii {operation} sa vyskytla chyba. Skúste to prosím neskôr!',\n        msgAjaxProgressError: '{operation} - neúspešné',\n        ajaxOperations: {\n            deleteThumb: 'odstrániť súbor',\n            uploadThumb: 'nahrať súbor',\n            uploadBatch: 'nahrať várku súborov',\n            uploadExtra: 'odosielanie údajov z formulára'\n        },\n        dropZoneTitle: 'Tiahni a pusť súbory tu &hellip;',\n        dropZoneClickTitle: '<br>(alebo kliknite sem a vyberte {files})',\n        fileActionSettings: {\n            removeTitle: 'Odstrániť súbor',\n            uploadTitle: 'Nahrať súbor',\n            uploadRetryTitle: 'Znova nahrať',\n            downloadTitle: 'Stiahnuť súbor',\n            zoomTitle: 'Zobraziť podrobnosti',\n            dragTitle: 'Posunúť / Preskládať',\n            indicatorNewTitle: 'Ešte nenahral',\n            indicatorSuccessTitle: 'Nahraný',\n            indicatorErrorTitle: 'Chyba pri nahrávaní',\n            indicatorLoadingTitle: 'Nahrávanie ...'\n        },\n        previewZoomButtonTitles: {\n            prev: 'Zobraziť predchádzajúci súbor',\n            next: 'Zobraziť následujúci súbor',\n            toggleheader: 'Prepnúť záhlavie',\n            fullscreen: 'Prepnúť zobrazenie na celú obrazovku',\n            borderless: 'Prepnúť na bezrámikové zobrazenie',\n            close: 'Zatvoriť detailný náhľad'\n        }\n    };\n})(window.jQuery);\n"
  },
  {
    "path": "static/bootstrap/plugins/bootstrap-fileinput/4.4.7/js/locales/sl.js",
    "content": "/*!\n * FileInput Slovenian Translations\n *\n * This file must be loaded after 'fileinput.js'. Patterns in braces '{}', or\n * any HTML markup tags in the messages must not be converted or translated.\n *\n * @see http://github.com/kartik-v/bootstrap-fileinput\n * @author kv1dr <kv1dr.android@gmail.com>\n *\n * NOTE: this file must be saved in UTF-8 encoding.\n */\n(function ($) {\n    \"use strict\";\n\n    $.fn.fileinputLocales['sl'] = {\n        fileSingle: 'datoteka',\n        filePlural: 'datotek',\n        browseLabel: 'Prebrskaj &hellip;',\n        removeLabel: 'Odstrani',\n        removeTitle: 'Počisti izbrane datoteke',\n        cancelLabel: 'Prekliči',\n        cancelTitle: 'Prekliči nalaganje',\n        uploadLabel: 'Naloži',\n        uploadTitle: 'Naloži izbrane datoteke',\n        msgNo: 'Ne',\n        msgNoFilesSelected: 'Nobena datoteka ni izbrana',\n        msgCancelled: 'Preklicano',\n        msgPlaceholder: 'Select {files}...',\n        msgZoomModalHeading: 'Podroben predogled',\n        msgSizeTooLarge: 'Datoteka \"{name}\" (<b>{size} KB</b>) presega največjo dovoljeno velikost za nalaganje <b>{maxSize} KB</b>.',\n        msgFilesTooLess: 'Za nalaganje morate izbrati vsaj <b>{n}</b> {files}.',\n        msgFilesTooMany: 'Število datotek, izbranih za nalaganje <b>({n})</b> je prekoračilo največjo dovoljeno število <b>{m}</b>.',\n        msgFileNotFound: 'Datoteka \"{name}\" ni bila najdena!',\n        msgFileSecured: 'Zaradi varnostnih omejitev nisem mogel prebrati datoteko \"{name}\".',\n        msgFileNotReadable: 'Datoteka \"{name}\" ni berljiva.',\n        msgFilePreviewAborted: 'Predogled datoteke \"{name}\" preklican.',\n        msgFilePreviewError: 'Pri branju datoteke \"{name}\" je prišlo do napake.',\n        msgInvalidFileType: 'Napačen tip datoteke \"{name}\". Samo \"{types}\" datoteke so podprte.',\n        msgInvalidFileExtension: 'Napačna končnica datoteke \"{name}\". Samo \"{extensions}\" datoteke so podprte.',\n        msgFileTypes: {\n            'image': 'image',\n            'html': 'HTML',\n            'text': 'text',\n            'video': 'video',\n            'audio': 'audio',\n            'flash': 'flash',\n            'pdf': 'PDF',\n            'object': 'object'\n        },\n        msgUploadAborted: 'Nalaganje datoteke je bilo preklicano',\n        msgUploadThreshold: 'Procesiram...',\n        msgUploadBegin: 'Initializing...',\n        msgUploadEnd: 'Done',\n        msgUploadEmpty: 'No valid data available for upload.',\n        msgUploadError: 'Error',\n        msgValidationError: 'Napaki pri validiranju',\n        msgLoading: 'Nalaganje datoteke {index} od {files} &hellip;',\n        msgProgress: 'Nalaganje datoteke {index} od {files} - {name} - {percent}% dokončano.',\n        msgSelected: '{n} {files} izbrano',\n        msgFoldersNotAllowed: 'Povlecite in spustite samo datoteke! Izpuščenih je bilo {n} map.',\n        msgImageWidthSmall: 'Širina slike \"{name}\" mora biti vsaj {size} px.',\n        msgImageHeightSmall: 'Višina slike \"{name}\" mora biti vsaj {size} px.',\n        msgImageWidthLarge: 'Širina slike \"{name}\" ne sme preseči {size} px.',\n        msgImageHeightLarge: 'Višina slike \"{name}\" ne sme preseči {size} px.',\n        msgImageResizeError: 'Nisem mogel pridobiti dimenzij slike za spreminjanje velikosti.',\n        msgImageResizeException: 'Napaka pri spreminjanju velikosti slike.<pre>{errors}</pre>',\n        msgAjaxError: 'Something went wrong with the {operation} operation. Please try again later!',\n        msgAjaxProgressError: '{operation} failed',\n        ajaxOperations: {\n            deleteThumb: 'file delete',\n            uploadThumb: 'file upload',\n            uploadBatch: 'batch file upload',\n            uploadExtra: 'form data upload'\n        },\n        dropZoneTitle: 'Povlecite in spustite datoteke sem &hellip;',\n        dropZoneClickTitle: '<br>(ali kliknite sem za izbiro {files})',\n        fileActionSettings: {\n            removeTitle: 'Odstrani datoteko',\n            uploadTitle: 'Naloži datoteko',\n            uploadRetryTitle: 'Retry upload',\n            downloadTitle: 'Download file',\n            zoomTitle: 'Poglej podrobnosti',\n            dragTitle: 'Premaki / Razporedi',\n            indicatorNewTitle: 'Še ni naloženo',\n            indicatorSuccessTitle: 'Naloženo',\n            indicatorErrorTitle: 'Napaka pri nalaganju',\n            indicatorLoadingTitle: 'Nalagam ...'\n        },\n        previewZoomButtonTitles: {\n            prev: 'Poglej prejšno datoteko',\n            next: 'Poglej naslednjo datoteko',\n            toggleheader: 'Preklopi glavo',\n            fullscreen: 'Preklopi celozaslonski način',\n            borderless: 'Preklopi način brez robov',\n            close: 'Zapri predogled podrobnosti'\n        }\n    };\n})(window.jQuery);\n"
  },
  {
    "path": "static/bootstrap/plugins/bootstrap-fileinput/4.4.7/js/locales/sv.js",
    "content": "/*!\n * FileInput <_LANG_> Translations\n *\n * This file must be loaded after 'fileinput.js'. Patterns in braces '{}', or\n * any HTML markup tags in the messages must not be converted or translated.\n *\n * @see http://github.com/kartik-v/bootstrap-fileinput\n *\n * NOTE: this file must be saved in UTF-8 encoding.\n */\n(function ($) {\n    \"use strict\";\n\n    $.fn.fileinputLocales['sv'] = {\n        fileSingle: 'fil',\n        filePlural: 'filer',\n        browseLabel: 'Bläddra &hellip;',\n        removeLabel: 'Ta bort',\n        removeTitle: 'Rensa valda filer',\n        cancelLabel: 'Avbryt',\n        cancelTitle: 'Avbryt pågående uppladdning',\n        uploadLabel: 'Ladda upp',\n        uploadTitle: 'Ladda upp valda filer',\n        msgNo: 'Nej',\n        msgNoFilesSelected: 'Inga filer valda',\n        msgCancelled: 'Avbruten',\n        msgPlaceholder: 'Select {files}...',\n        msgZoomModalHeading: 'detaljerad förhandsgranskning',\n        msgFileRequired: 'You must select a file to upload.',\n        msgSizeTooSmall: 'Filen \"{name}\" (<b>{size} KB</b>) är för liten och måste vara större än <b>{minSize} KB</b>.',\n        msgSizeTooLarge: 'File \"{name}\" (<b>{size} KB</b>) överstiger högsta tillåtna uppladdningsstorlek <b>{maxSize} KB</b>.',\n        msgFilesTooLess: 'Du måste välja minst <b>{n}</b> {files} för att ladda upp.',\n        msgFilesTooMany: 'Antal filer valda för uppladdning <b>({n})</b> överstiger högsta tillåtna gränsen <b>{m}</b>.',\n        msgFileNotFound: 'Filen \"{name}\" kunde inte hittas!',\n        msgFileSecured: 'Säkerhetsbegränsningar förhindrar att läsa filen \"{name}\".',\n        msgFileNotReadable: 'Filen \"{name}\" är inte läsbar.',\n        msgFilePreviewAborted: 'Filförhandsvisning avbröts för \"{name}\".',\n        msgFilePreviewError: 'Ett fel uppstod vid inläsning av filen \"{name}\".',\n        msgInvalidFileName: 'Ogiltiga eller tecken som inte stöds i filnamnet \"{name}\".',\n        msgInvalidFileType: 'Ogiltig typ för filen \"{name}\". Endast \"{types}\" filtyper stöds.',\n        msgInvalidFileExtension: 'Ogiltigt filtillägg för filen \"{name}\". Endast \"{extensions}\" filer stöds.',\n        msgFileTypes: {\n            'image': 'bild',\n            'html': 'HTML',\n            'text': 'text',\n            'video': 'video',\n            'audio': 'ljud',\n            'flash': 'flash',\n            'pdf': 'PDF',\n            'object': 'objekt'\n        },\n        msgUploadAborted: 'Filöverföringen avbröts',\n        msgUploadThreshold: 'Bearbetar...',\n        msgUploadBegin: 'Påbörjar...',\n        msgUploadEnd: 'Färdig',\n        msgUploadEmpty: 'Ingen giltig data tillgänglig för uppladdning.',\n        msgUploadError: 'Error',\n        msgValidationError: 'Valideringsfel',\n        msgLoading: 'Laddar fil {index} av {files} &hellip;',\n        msgProgress: 'Laddar fil {index} av {files} - {name} - {percent}% färdig.',\n        msgSelected: '{n} {files} valda',\n        msgFoldersNotAllowed: 'Endast drag & släppfiler! Skippade {n} släpta mappar.',\n        msgImageWidthSmall: 'Bredd på bildfilen \"{name}\" måste minst vara {size} pixlar.',\n        msgImageHeightSmall: 'Höjden på bildfilen \"{name}\" måste minst vara {size} pixlar.',\n        msgImageWidthLarge: 'Bredd på bildfil \"{name}\" kan inte överstiga {size} pixlar.',\n        msgImageHeightLarge: 'Höjden på bildfilen \"{name}\" kan inte överstiga {size} pixlar.',\n        msgImageResizeError: 'Det gick inte att hämta bildens dimensioner för att ändra storlek.',\n        msgImageResizeException: 'Fel vid storleksändring av bilden.<pre>{errors}</pre>',\n        msgAjaxError: 'Något gick fel med {operation} operationen. Försök igen senare!',\n        msgAjaxProgressError: '{operation} misslyckades',\n        ajaxOperations: {\n            deleteThumb: 'file delete',\n            uploadThumb: 'file upload',\n            uploadBatch: 'batch file upload',\n            uploadExtra: 'form data upload'\n        },\n        dropZoneTitle: 'Drag & släpp filer här &hellip;',\n        dropZoneClickTitle: '<br>(eller klicka för att markera {files})',\n        fileActionSettings: {\n            removeTitle: 'Ta bort fil',\n            uploadTitle: 'Ladda upp fil',\n            uploadRetryTitle: 'Retry upload',\n            zoomTitle: 'Visa detaljer',\n            dragTitle: 'Flytta / Ändra ordning',\n            indicatorNewTitle: 'Inte uppladdat ännu',\n            indicatorSuccessTitle: 'Uppladdad',\n            indicatorErrorTitle: 'Uppladdningsfel',\n            indicatorLoadingTitle: 'Laddar upp...'\n        },\n        previewZoomButtonTitles: {\n            prev: 'Visa föregående fil',\n            next: 'Visa nästa fil',\n            toggleheader: 'Rubrik',\n            fullscreen: 'Fullskärm',\n            borderless: 'Gränslös',\n            close: 'Stäng detaljerad förhandsgranskning'\n        }\n    };\n})(window.jQuery);"
  },
  {
    "path": "static/bootstrap/plugins/bootstrap-fileinput/4.4.7/js/locales/th.js",
    "content": "/*!\n * FileInput Thai Translations\n *\n * This file must be loaded after 'fileinput.js'. Patterns in braces '{}', or\n * any HTML markup tags in the messages must not be converted or translated.\n *\n * @see http://github.com/kartik-v/bootstrap-fileinput\n *\n * NOTE: this file must be saved in UTF-8 encoding.\n */\n(function ($) {\n    \"use strict\";\n\n    $.fn.fileinputLocales['th'] = {\n        fileSingle: 'ไฟล์',\n        filePlural: 'ไฟล์',\n        browseLabel: 'เลือกดู &hellip;',\n        removeLabel: 'ลบทิ้ง',\n        removeTitle: 'ลบไฟล์ที่เลือกทิ้ง',\n        cancelLabel: 'ยกเลิก',\n        cancelTitle: 'ยกเลิกการอัพโหลด',\n        uploadLabel: 'อัพโหลด',\n        uploadTitle: 'อัพโหลดไฟล์ที่เลือก',\n        msgNo: 'ไม่',\n        msgNoFilesSelected: '',\n        msgCancelled: 'ยกเลิก',\n        msgPlaceholder: 'Select {files}...',\n        msgZoomModalHeading: 'ตัวอย่างละเอียด',\n        msgFileRequired: 'You must select a file to upload.',\n        msgSizeTooSmall: 'File \"{name}\" (<b>{size} KB</b>) is too small and must be larger than <b>{minSize} KB</b>.',\n        msgSizeTooLarge: 'ไฟล์ \"{name}\" (<b>{size} KB</b>) มีขนาดเกินที่ระบบอนุญาตที่ <b>{maxSize} KB</b>, กรุณาลองใหม่อีกครั้ง!',\n        msgFilesTooLess: 'คุณต้องเลือกไฟล์จำนวนอย่างน้อย <b>{n}</b> {files} เพื่ออัพโหลด, กรุณาลองใหม่อีกครั้ง!',\n        msgFilesTooMany: 'ไฟล์ที่คุณเลือกมีจำนวน <b>({n})</b> ซึ่งเกินกว่าที่ระบบอนุญาตที่ <b>{m}</b>, กรุณาลองใหม่อีกครั้ง!',\n        msgFileNotFound: 'ไม่พบไฟล์ \"{name}\" !',\n        msgFileSecured: 'ระบบความปลอดภัยไม่อนุญาตให้อ่านไฟล์ \"{name}\".',\n        msgFileNotReadable: 'ไม่สามารถอ่านไฟล์ \"{name}\" ได้',\n        msgFilePreviewAborted: 'ไฟล์ \"{name}\" ไม่อนุญาตให้ดูตัวอย่าง',\n        msgFilePreviewError: 'พบปัญหาในการดูตัวอย่างไฟล์ \"{name}\".',\n        msgInvalidFileName: 'Invalid or unsupported characters in file name \"{name}\".',\n        msgInvalidFileType: 'ไฟล์ \"{name}\" เป็นประเภทไฟล์ที่ไม่ถูกต้อง, อนุญาตเฉพาะไฟล์ประเภท \"{types}\"',\n        msgInvalidFileExtension: 'ไฟล์ \"{name}\" เป็น extension ที่ไมถูกต้อง, อนุญาตเฉพาะไฟล์ extension \"{extensions}\"',\n        msgFileTypes: {\n            'image': 'image',\n            'html': 'HTML',\n            'text': 'text',\n            'video': 'video',\n            'audio': 'audio',\n            'flash': 'flash',\n            'pdf': 'PDF',\n            'object': 'object'\n        },\n        msgUploadAborted: 'อัปโหลดไฟล์ถูกยกเลิก',\n        msgUploadThreshold: 'Processing...',\n        msgUploadBegin: 'Initializing...',\n        msgUploadEnd: 'Done',\n        msgUploadEmpty: 'No valid data available for upload.',\n        msgUploadError: 'Error',\n        msgValidationError: 'ข้อผิดพลาดในการตรวจสอบ',\n        msgLoading: 'กำลังโหลดไฟล์ {index} จาก {files} &hellip;',\n        msgProgress: 'กำลังโหลดไฟล์ {index} จาก {files} - {name} - {percent}%',\n        msgSelected: '{n} {files} ถูกเลือก',\n        msgFoldersNotAllowed: 'Drag & drop เฉพาะไฟล์เท่านั้น! ข้าม dropped folder จำนวน {n}',\n        msgImageWidthSmall: 'ความกว้างของภาพไฟล์ \"{name}\" ต้องมีอย่างน้อย {size} px.',\n        msgImageHeightSmall: 'ความสูงของภาพไฟล์ \"{name}\" ต้องมีอย่างน้อย {size} px.',\n        msgImageWidthLarge: 'ความกว้างของภาพไฟล์ \"{name}\" ไม่เกิน {size} พิกเซล.',\n        msgImageHeightLarge: 'ความสูงของไฟล์ภาพ \"{name}\" ไม่เกิน {size} พิกเซล.',\n        msgImageResizeError: 'ไม่สามารถรับขนาดภาพเพื่อปรับขนาด',\n        msgImageResizeException: 'ข้อผิดพลาดขณะปรับขนาดภาพ<pre>{errors}</pre>',\n        msgAjaxError: 'Something went wrong with the {operation} operation. Please try again later!',\n        msgAjaxProgressError: '{operation} failed',\n        ajaxOperations: {\n            deleteThumb: 'file delete',\n            uploadThumb: 'file upload',\n            uploadBatch: 'batch file upload',\n            uploadExtra: 'form data upload'\n        },\n        dropZoneTitle: 'Drag & drop ไฟล์ตรงนี้ &hellip;',\n        dropZoneClickTitle: '<br>(or click to select {files})',\n        fileActionSettings: {\n            removeTitle: 'ลบไฟล์',\n            uploadTitle: 'อัปโหลดไฟล์',\n            uploadRetryTitle: 'Retry upload',\n            downloadTitle: 'Download file',\n            zoomTitle: 'ดูรายละเอียด',\n            dragTitle: 'Move / Rearrange',\n            indicatorNewTitle: 'ยังไม่ได้อัปโหลด',\n            indicatorSuccessTitle: 'อัพโหลด',\n            indicatorErrorTitle: 'อัปโหลดข้อผิดพลาด',\n            indicatorLoadingTitle: 'อัพโหลด ...'\n        },\n        previewZoomButtonTitles: {\n            prev: 'View previous file',\n            next: 'View next file',\n            toggleheader: 'Toggle header',\n            fullscreen: 'Toggle full screen',\n            borderless: 'Toggle borderless mode',\n            close: 'Close detailed preview'\n        }\n    };\n})(window.jQuery);"
  },
  {
    "path": "static/bootstrap/plugins/bootstrap-fileinput/4.4.7/js/locales/tr.js",
    "content": "/*!\n * FileInput Turkish Translations\n *\n * This file must be loaded after 'fileinput.js'. Patterns in braces '{}', or\n * any HTML markup tags in the messages must not be converted or translated.\n *\n * @see http://github.com/kartik-v/bootstrap-fileinput\n *\n * NOTE: this file must be saved in UTF-8 encoding.\n */\n(function ($) {\n    \"use strict\";\n\n    $.fn.fileinputLocales['tr'] = {\n        fileSingle: 'dosya',\n        filePlural: 'dosyalar',\n        browseLabel: 'Gözat &hellip;',\n        removeLabel: 'Sil',\n        removeTitle: 'Seçilen dosyaları sil',\n        cancelLabel: 'İptal',\n        cancelTitle: 'Devam eden yüklemeyi iptal et',\n        uploadLabel: 'Yükle',\n        uploadTitle: 'Seçilen dosyaları yükle',\n        msgNo: 'Hayır',\n        msgNoFilesSelected: '',\n        msgCancelled: 'İptal edildi',\n        msgPlaceholder: 'Select {files}...',\n        msgZoomModalHeading: 'Detaylı Önizleme',\n        msgFileRequired: 'Yüklemek için bir dosya seçmelisiniz.',\n        msgSizeTooSmall: '\"{name}\"(<b>{size} KB</b>) dosyası çok küçük  ve <b>{minSize} KB</b> boyutundan büyük olmalıdır.',\n        msgSizeTooLarge: '\"{name}\" dosyasının boyutu (<b>{size} KB</b>) izin verilen azami dosya boyutu olan <b>{maxSize} KB</b>\\'tan büyük.',\n        msgFilesTooLess: 'Yüklemek için en az <b>{n}</b> {files} dosya seçmelisiniz.',\n        msgFilesTooMany: 'Yüklemek için seçtiğiniz dosya sayısı <b>({n})</b> azami limitin <b>({m})</b> altında olmalıdır.',\n        msgFileNotFound: '\"{name}\" dosyası bulunamadı!',\n        msgFileSecured: 'Güvenlik kısıtlamaları \"{name}\" dosyasının okunmasını engelliyor.',\n        msgFileNotReadable: '\"{name}\" dosyası okunabilir değil.',\n        msgFilePreviewAborted: '\"{name}\" dosyası için önizleme iptal edildi.',\n        msgFilePreviewError: '\"{name}\" dosyası okunurken bir hata oluştu.',\n        msgInvalidFileName: '\"{name}\" dosya adında geçersiz veya desteklenmeyen karakterler var.',\n        msgInvalidFileType: '\"{name}\" dosyasının türü geçerli değil. Yalnızca \"{types}\" türünde dosyalara izin veriliyor.',\n        msgInvalidFileExtension: '\"{name}\" dosyasının uzantısı geçersiz. Yalnızca \"{extensions}\" uzantılı dosyalara izin veriliyor.',\n        msgFileTypes: {\n            'image': 'image',\n            'html': 'HTML',\n            'text': 'text',\n            'video': 'video',\n            'audio': 'audio',\n            'flash': 'flash',\n            'pdf': 'PDF',\n            'object': 'object'\n        },\n        msgUploadAborted: 'Dosya yükleme iptal edildi',\n        msgUploadThreshold: 'İşlem yapılıyor...',\n        msgUploadBegin: 'Başlıyor...',\n        msgUploadEnd: 'Başarılı',\n        msgUploadEmpty: 'Yüklemek için geçerli veri mevcut değil.',\n        msgUploadError: 'Error',\n        msgValidationError: 'Doğrulama Hatası',\n        msgLoading: 'Dosya yükleniyor {index} / {files} &hellip;',\n        msgProgress: 'Dosya yükleniyor {index} / {files} - {name} - %{percent} tamamlandı.',\n        msgSelected: '{n} {files} seçildi',\n        msgFoldersNotAllowed: 'Yalnızca dosyaları sürükleyip bırakabilirsiniz! {n} dizin(ler) göz ardı edildi.',\n        msgImageWidthSmall: '\"{name}\" adlı görüntü dosyasının genişliği en az {size} piksel olmalıdır.',\n        msgImageHeightSmall: '\"{name}\" adlı görüntü dosyasının yüksekliği en az {size} piksel olmalıdır.',\n        msgImageWidthLarge: '\"{name}\" adlı görüntü dosyasının genişliği {size} pikseli geçemez.',\n        msgImageHeightLarge: '\"{name}\" adlı görüntü dosyasının yüksekliği {size} pikseli geçemez.',\n        msgImageResizeError: 'Görüntü boyutlarını yeniden boyutlandıramadı.',\n        msgImageResizeException: 'Görüntü boyutlandırma sırasında hata.<pre>{errors}</pre>',\n        msgAjaxError: '{operation} işlemi ile ilgili bir şeyler ters gitti. Lütfen daha sonra tekrar deneyiniz!',\n        msgAjaxProgressError: '{operation} işlemi başarısız oldu.',\n        ajaxOperations: {\n            deleteThumb: 'dosya silme',\n            uploadThumb: 'dosya yükleme',\n            uploadBatch: 'toplu dosya yükleme',\n            uploadExtra: 'form verisi yükleme'\n        },\n        dropZoneTitle: 'Dosyaları buraya sürükleyip bırakın',\n        dropZoneClickTitle: '<br>(ya da {files} seçmek için tıklayınız)',\n        fileActionSettings: {\n            removeTitle: 'Dosyayı kaldır',\n            uploadTitle: 'Dosyayı yükle',\n            uploadRetryTitle: 'Retry upload',\n            zoomTitle: 'Ayrıntıları görüntüle',\n            dragTitle: 'Taşı / Yeniden düzenle',\n            indicatorNewTitle: 'Henüz yüklenmedi',\n            indicatorSuccessTitle: 'Yüklendi',\n            indicatorErrorTitle: 'Yükleme Hatası',\n            indicatorLoadingTitle: 'Yükleniyor ...'\n        },\n        previewZoomButtonTitles: {\n            prev: 'Önceki dosyayı göster',\n            next: 'Sonraki dosyayı göster',\n            toggleheader: 'Üst bilgi geçiş',\n            fullscreen: 'Tam ekran geçiş',\n            borderless: 'Çerçevesiz moda geçiş',\n            close: 'Detaylı önizlemeyi kapat'\n        }\n    };\n})(window.jQuery);\n"
  },
  {
    "path": "static/bootstrap/plugins/bootstrap-fileinput/4.4.7/js/locales/uk.js",
    "content": "/*!\n * FileInput Ukrainian Translations\n *\n * This file must be loaded after 'fileinput.js'. Patterns in braces '{}', or\n * any HTML markup tags in the messages must not be converted or translated.\n *\n * @see http://github.com/kartik-v/bootstrap-fileinput\n * @author CyanoFresh <cyanofresh@gmail.com>\n *\n * NOTE: this file must be saved in UTF-8 encoding.\n */\n(function ($) {\n    \"use strict\";\n\n    $.fn.fileinputLocales['uk'] = {\n        fileSingle: 'файл',\n        filePlural: 'файли',\n        browseLabel: 'Вибрати &hellip;',\n        removeLabel: 'Видалити',\n        removeTitle: 'Видалити вибрані файли',\n        cancelLabel: 'Скасувати',\n        cancelTitle: 'Скасувати поточну загрузку',\n        uploadLabel: 'Загрузити',\n        uploadTitle: 'Загрузити вибрані файли',\n        msgNo: 'Немає',\n        msgNoFilesSelected: '',\n        msgCancelled: 'Cкасовано',\n        msgPlaceholder: 'Select {files}...',\n        msgZoomModalHeading: 'Детальний превью',\n        msgFileRequired: 'You must select a file to upload.',\n        msgSizeTooSmall: 'File \"{name}\" (<b>{size} KB</b>) is too small and must be larger than <b>{minSize} KB</b>.',\n        msgSizeTooLarge: 'Файл \"{name}\" (<b>{size} KB</b>) перевищує максимальний розмір <b>{maxSize} KB</b>.',\n        msgFilesTooLess: 'Ви повинні вибрати як мінімум <b>{n}</b> {files} для загрузки.',\n        msgFilesTooMany: 'Кількість вибраних файлів <b>({n})</b> перевищує максимально допустиму кількість <b>{m}</b>.',\n        msgFileNotFound: 'Файл \"{name}\" не знайдено!',\n        msgFileSecured: 'Обмеження безпеки перешкоджають читанню файла \"{name}\".',\n        msgFileNotReadable: 'Файл \"{name}\" неможливо прочитати.',\n        msgFilePreviewAborted: 'Перегляд скасований для файла \"{name}\".',\n        msgFilePreviewError: 'Сталася помилка під час читання файла \"{name}\".',\n        msgInvalidFileName: 'Invalid or unsupported characters in file name \"{name}\".',\n        msgInvalidFileType: 'Заборонений тип файла для \"{name}\". Тільки \"{types}\" дозволені.',\n        msgInvalidFileExtension: 'Заборонене розширення для файла \"{name}\". Тільки \"{extensions}\" дозволені.',\n        msgFileTypes: {\n            'image': 'image',\n            'html': 'HTML',\n            'text': 'text',\n            'video': 'video',\n            'audio': 'audio',\n            'flash': 'flash',\n            'pdf': 'PDF',\n            'object': 'object'\n        },\n        msgUploadAborted: 'Вивантаження файлу перервана',\n        msgUploadThreshold: 'Processing...',\n        msgUploadBegin: 'Initializing...',\n        msgUploadEnd: 'Done',\n        msgUploadEmpty: 'No valid data available for upload.',\n        msgUploadError: 'Error',\n        msgValidationError: 'Помилка перевірки',\n        msgLoading: 'Загрузка файла {index} із {files} &hellip;',\n        msgProgress: 'Загрузка файла {index} із {files} - {name} - {percent}% завершено.',\n        msgSelected: '{n} {files} вибрано',\n        msgFoldersNotAllowed: 'Дозволено перетягувати тільки файли! Пропущено {n} папок.',\n        msgImageWidthSmall: 'Ширина зображення \"{name}\" повинна бути не менше {size} px.',\n        msgImageHeightSmall: 'Висота зображення \"{name}\" повинна бути не менше {size} px.',\n        msgImageWidthLarge: 'Ширина зображення \"{name}\" не може перевищувати {size} px.',\n        msgImageHeightLarge: 'Висота зображення \"{name}\" не може перевищувати {size} px.',\n        msgImageResizeError: 'Не вдалося розміри зображення, щоб змінити розмір.',\n        msgImageResizeException: 'Помилка при зміні розміру зображення.<pre>{errors}</pre>',\n        msgAjaxError: 'Something went wrong with the {operation} operation. Please try again later!',\n        msgAjaxProgressError: '{operation} failed',\n        ajaxOperations: {\n            deleteThumb: 'file delete',\n            uploadThumb: 'file upload',\n            uploadBatch: 'batch file upload',\n            uploadExtra: 'form data upload'\n        },\n        dropZoneTitle: 'Перетягніть файли сюди &hellip;',\n        dropZoneClickTitle: '<br>(or click to select {files})',\n        fileActionSettings: {\n            removeTitle: 'Видалити файл',\n            uploadTitle: 'Загрузити файл',\n            uploadRetryTitle: 'Retry upload',\n            downloadTitle: 'Download file',\n            zoomTitle: 'Подивитися деталі',\n            dragTitle: 'Move / Rearrange',\n            indicatorNewTitle: 'Ще не загружено',\n            indicatorSuccessTitle: 'Загружено',\n            indicatorErrorTitle: 'Помилка при загрузці',\n            indicatorLoadingTitle: 'Загрузка ...'\n        },\n        previewZoomButtonTitles: {\n            prev: 'View previous file',\n            next: 'View next file',\n            toggleheader: 'Toggle header',\n            fullscreen: 'Toggle full screen',\n            borderless: 'Toggle borderless mode',\n            close: 'Close detailed preview'\n        }\n    };\n})(window.jQuery);\n"
  },
  {
    "path": "static/bootstrap/plugins/bootstrap-fileinput/4.4.7/js/locales/vi.js",
    "content": "/*!\n * FileInput Vietnamese Translations\n *\n * This file must be loaded after 'fileinput.js'. Patterns in braces '{}', or\n * any HTML markup tags in the messages must not be converted or translated.\n *\n * @see http://github.com/kartik-v/bootstrap-fileinput\n *\n * NOTE: this file must be saved in UTF-8 encoding.\n */\n \n(function ($) {\n    \"use strict\";\n\n    $.fn.fileinputLocales['vi'] = {\n        fileSingle: 'tập tin',\n        filePlural: 'các tập tin',\n        browseLabel: 'Duyệt &hellip;',\n        removeLabel: 'Gỡ bỏ',\n        removeTitle: 'Bỏ tập tin đã chọn',\n        cancelLabel: 'Hủy',\n        cancelTitle: 'Hủy upload',\n        uploadLabel: 'Upload',\n        uploadTitle: 'Upload tập tin đã chọn',\n        msgNo: 'Không',\n        msgNoFilesSelected: 'Không tập tin nào được chọn',\n        msgCancelled: 'Đã hủy',\n        msgPlaceholder: 'Select {files}...',\n        msgZoomModalHeading: 'Chi tiết xem trước',\n        msgFileRequired: 'You must select a file to upload.',\n        msgSizeTooSmall: 'File \"{name}\" (<b>{size} KB</b>) is too small and must be larger than <b>{minSize} KB</b>.',\n        msgSizeTooLarge: 'Tập tin \"{name}\" (<b>{size} KB</b>) vượt quá kích thước giới hạn cho phép <b>{maxSize} KB</b>.',\n        msgFilesTooLess: 'Bạn phải chọn ít nhất <b>{n}</b> {files} để upload.',\n        msgFilesTooMany: 'Số lượng tập tin upload <b>({n})</b> vượt quá giới hạn cho phép là <b>{m}</b>.',\n        msgFileNotFound: 'Không tìm thấy tập tin \"{name}\"!',\n        msgFileSecured: 'Các hạn chế về bảo mật không cho phép đọc tập tin \"{name}\".',\n        msgFileNotReadable: 'Không đọc được tập tin \"{name}\".',\n        msgFilePreviewAborted: 'Đã dừng xem trước tập tin \"{name}\".',\n        msgFilePreviewError: 'Đã xảy ra lỗi khi đọc tập tin \"{name}\".',\n        msgInvalidFileName: 'Invalid or unsupported characters in file name \"{name}\".',\n        msgInvalidFileType: 'Tập tin \"{name}\" không hợp lệ. Chỉ hỗ trợ loại tập tin \"{types}\".',\n        msgInvalidFileExtension: 'Phần mở rộng của tập tin \"{name}\" không hợp lệ. Chỉ hỗ trợ phần mở rộng \"{extensions}\".',\n        msgFileTypes: {\n            'image': 'image',\n            'html': 'HTML',\n            'text': 'text',\n            'video': 'video',\n            'audio': 'audio',\n            'flash': 'flash',\n            'pdf': 'PDF',\n            'object': 'object'\n        },\n        msgUploadAborted: 'Đã dừng upload',\n        msgUploadThreshold: 'Đang xử lý...',\n        msgUploadBegin: 'Initializing...',\n        msgUploadEnd: 'Done',\n        msgUploadEmpty: 'No valid data available for upload.',\n        msgUploadError: 'Error',\n        msgValidationError: 'Lỗi xác nhận',\n        msgLoading: 'Đang nạp {index} tập tin trong số {files} &hellip;',\n        msgProgress: 'Đang nạp {index} tập tin trong số {files} - {name} - {percent}% hoàn thành.',\n        msgSelected: '{n} {files} được chọn',\n        msgFoldersNotAllowed: 'Chỉ kéo thả tập tin! Đã bỏ qua {n} thư mục.',\n        msgImageWidthSmall: 'Chiều rộng của hình ảnh \"{name}\" phải tối thiểu là {size} px.',\n        msgImageHeightSmall: 'Chiều cao của hình ảnh \"{name}\" phải tối thiểu là {size} px.',\n        msgImageWidthLarge: 'Chiều rộng của hình ảnh \"{name}\" không được quá {size} px.',\n        msgImageHeightLarge: 'Chiều cao của hình ảnh \"{name}\" không được quá {size} px.',\n        msgImageResizeError: 'Không lấy được kích thước của hình ảnh để resize.',\n        msgImageResizeException: 'Resize hình ảnh bị lỗi.<pre>{errors}</pre>',\n        msgAjaxError: 'Something went wrong with the {operation} operation. Please try again later!',\n        msgAjaxProgressError: '{operation} failed',\n        ajaxOperations: {\n            deleteThumb: 'file delete',\n            uploadThumb: 'file upload',\n            uploadBatch: 'batch file upload',\n            uploadExtra: 'form data upload'\n        },\n        dropZoneTitle: 'Kéo thả tập tin vào đây &hellip;',\n        dropZoneClickTitle: '<br>(hoặc click để chọn {files})',\n        fileActionSettings: {\n            removeTitle: 'Gỡ bỏ',\n            uploadTitle: 'Upload tập tin',\n            uploadRetryTitle: 'Retry upload',\n            downloadTitle: 'Download file',\n            zoomTitle: 'Phóng lớn',\n            dragTitle: 'Di chuyển / Sắp xếp lại',\n            indicatorNewTitle: 'Chưa được upload',\n            indicatorSuccessTitle: 'Đã upload',\n            indicatorErrorTitle: 'Upload bị lỗi',\n            indicatorLoadingTitle: 'Đang upload ...'\n        },\n        previewZoomButtonTitles: {\n            prev: 'Xem tập tin phía trước',\n            next: 'Xem tập tin tiếp theo',\n            toggleheader: 'Ẩn/hiện tiêu đề',\n            fullscreen: 'Bật/tắt toàn màn hình',\n            borderless: 'Bật/tắt chế độ không viền',\n            close: 'Đóng'\n        }\n    };\n})(window.jQuery);\n"
  },
  {
    "path": "static/bootstrap/plugins/bootstrap-fileinput/4.4.7/js/locales/zh-TW.js",
    "content": "/*!\n * FileInput Chinese Traditional Translations\n *\n * This file must be loaded after 'fileinput.js'. Patterns in braces '{}', or\n * any HTML markup tags in the messages must not be converted or translated.\n *\n * @see http://github.com/kartik-v/bootstrap-fileinput\n * @author kangqf <kangqingfei@gmail.com>\n *\n * NOTE: this file must be saved in UTF-8 encoding.\n */\n(function ($) {\n    \"use strict\";\n\n    $.fn.fileinputLocales['zh-TW'] = {\n        fileSingle: '單一檔案',\n        filePlural: '複選檔案',\n        browseLabel: '瀏覽 &hellip;',\n        removeLabel: '移除',\n        removeTitle: '清除選取檔案',\n        cancelLabel: '取消',\n        cancelTitle: '取消上傳中檔案',\n        uploadLabel: '上傳',\n        uploadTitle: '上傳選取檔案',\n        msgNo: '沒有',\n        msgNoFilesSelected: '',\n        msgCancelled: '取消',\n        zoomTitle: '詳細資料',\n        msgPlaceholder: 'Select {files}...',\n        msgZoomModalHeading: '內容預覽',\n        msgFileRequired: 'You must select a file to upload.',\n        msgSizeTooSmall: 'File \"{name}\" (<b>{size} KB</b>) is too small and must be larger than <b>{minSize} KB</b>.',\n        msgSizeTooLarge: '檔案 \"{name}\" (<b>{size} KB</b>) 大小超過上限 <b>{maxSize} KB</b>.',\n        msgFilesTooLess: '最少必須選擇 <b>{n}</b> {files} 來上傳. ',\n        msgFilesTooMany: '上傳的檔案數量 <b>({n})</b> 超過最大檔案上傳限制 <b>{m}</b>.',\n        msgFileNotFound: '檔案 \"{name}\" 未發現!',\n        msgFileSecured: '安全限制，禁止讀取檔案 \"{name}\".',\n        msgFileNotReadable: '文件 \"{name}\" 不可讀取.',\n        msgFilePreviewAborted: '檔案 \"{name}\" 預覽中止.',\n        msgFilePreviewError: '讀取 \"{name}\" 發生錯誤.',\n        msgInvalidFileName: 'Invalid or unsupported characters in file name \"{name}\".',\n        msgInvalidFileType: '檔案類型錯誤 \"{name}\". 只能使用 \"{types}\" 類型的檔案.',\n        msgInvalidFileExtension: '附檔名錯誤 \"{name}\". 只能使用 \"{extensions}\" 的檔案.',\n        msgFileTypes: {\n            'image': 'image',\n            'html': 'HTML',\n            'text': 'text',\n            'video': 'video',\n            'audio': 'audio',\n            'flash': 'flash',\n            'pdf': 'PDF',\n            'object': 'object'\n        },\n        msgUploadAborted: '該文件上傳被中止',\n        msgUploadThreshold: 'Processing...',\n        msgUploadBegin: 'Initializing...',\n        msgUploadEnd: 'Done',\n        msgUploadEmpty: 'No valid data available for upload.',\n        msgUploadError: 'Error',\n        msgValidationError: '驗證錯誤',\n        msgLoading: '載入第 {index} 個檔案，共 {files} &hellip;',\n        msgProgress: '載入第 {index} 個檔案，共 {files} - {name} - {percent}% 成功.',\n        msgSelected: '{n} {files} 選取',\n        msgFoldersNotAllowed: '只支援單檔拖曳! 無法使用 {n} 拖拽的資料夹.',\n        msgImageWidthSmall: '圖檔寬度\"{name}\"必須至少為{size}像素(px).',\n        msgImageHeightSmall: '圖檔高度\"{name}\"必須至少為{size}像素(px).',\n        msgImageWidthLarge: '圖檔寬度\"{name}\"不能超過{size}像素(px).',\n        msgImageHeightLarge: '圖檔高度\"{name}\"不能超過{size}像素(px).',\n        msgImageResizeError: '無法獲取的圖像尺寸調整。',\n        msgImageResizeException: '錯誤而調整圖像大小。<pre>{errors}</pre>',\n        msgAjaxError: 'Something went wrong with the {operation} operation. Please try again later!',\n        msgAjaxProgressError: '{operation} failed',\n        ajaxOperations: {\n            deleteThumb: 'file delete',\n            uploadThumb: 'file upload',\n            uploadBatch: 'batch file upload',\n            uploadExtra: 'form data upload'\n        },\n        dropZoneTitle: '拖曳檔案至此 &hellip;',\n        dropZoneClickTitle: '<br>(or click to select {files})',\n        fileActionSettings: {\n            removeTitle: '刪除檔案',\n            uploadTitle: '上傳檔案',\n            uploadRetryTitle: 'Retry upload',\n            downloadTitle: 'Download file',\n            zoomTitle: '詳細資料',\n            dragTitle: 'Move / Rearrange',\n            indicatorNewTitle: '尚未上傳',\n            indicatorSuccessTitle: '上傳成功',\n            indicatorErrorTitle: '上傳失敗',\n            indicatorLoadingTitle: '上傳中 ...'\n        },\n        previewZoomButtonTitles: {\n            prev: 'View previous file',\n            next: 'View next file',\n            toggleheader: 'Toggle header',\n            fullscreen: 'Toggle full screen',\n            borderless: 'Toggle borderless mode',\n            close: 'Close detailed preview'\n        }\n    };\n})(window.jQuery);\n"
  },
  {
    "path": "static/bootstrap/plugins/bootstrap-fileinput/4.4.7/js/locales/zh.js",
    "content": "/*!\n * FileInput Chinese Translations\n *\n * This file must be loaded after 'fileinput.js'. Patterns in braces '{}', or\n * any HTML markup tags in the messages must not be converted or translated.\n *\n * @see http://github.com/kartik-v/bootstrap-fileinput\n * @author kangqf <kangqingfei@gmail.com>\n *\n * NOTE: this file must be saved in UTF-8 encoding.\n */\n(function ($) {\n    \"use strict\";\n\n    $.fn.fileinputLocales['zh'] = {\n        fileSingle: '文件',\n        filePlural: '个文件',\n        browseLabel: '选择 &hellip;',\n        removeLabel: '移除',\n        removeTitle: '清除选中文件',\n        cancelLabel: '取消',\n        cancelTitle: '取消进行中的上传',\n        uploadLabel: '上传',\n        uploadTitle: '上传选中文件',\n        msgNo: '没有',\n        msgNoFilesSelected: '',\n        msgCancelled: '取消',\n        msgPlaceholder: 'Select {files}...',\n        msgZoomModalHeading: '详细预览',\n        msgFileRequired: '必须选择一个文件上传.',\n        msgSizeTooSmall: '文件 \"{name}\" (<b>{size} KB</b>) 必须大于限定大小 <b>{minSize} KB</b>.',\n        msgSizeTooLarge: '文件 \"{name}\" (<b>{size} KB</b>) 超过了允许大小 <b>{maxSize} KB</b>.',\n        msgFilesTooLess: '你必须选择最少 <b>{n}</b> {files} 来上传. ',\n        msgFilesTooMany: '选择的上传文件个数 <b>({n})</b> 超出最大文件的限制个数 <b>{m}</b>.',\n        msgFileNotFound: '文件 \"{name}\" 未找到!',\n        msgFileSecured: '安全限制，为了防止读取文件 \"{name}\".',\n        msgFileNotReadable: '文件 \"{name}\" 不可读.',\n        msgFilePreviewAborted: '取消 \"{name}\" 的预览.',\n        msgFilePreviewError: '读取 \"{name}\" 时出现了一个错误.',\n        msgInvalidFileName: '文件名 \"{name}\" 包含非法字符.',\n        msgInvalidFileType: '不正确的类型 \"{name}\". 只支持 \"{types}\" 类型的文件.',\n        msgInvalidFileExtension: '不正确的文件扩展名 \"{name}\". 只支持 \"{extensions}\" 的文件扩展名.',\n        msgFileTypes: {\n            'image': 'image',\n            'html': 'HTML',\n            'text': 'text',\n            'video': 'video',\n            'audio': 'audio',\n            'flash': 'flash',\n            'pdf': 'PDF',\n            'object': 'object'\n        },\n        msgUploadAborted: '该文件上传被中止',\n        msgUploadThreshold: '处理中...',\n        msgUploadBegin: '正在初始化...',\n        msgUploadEnd: '完成',\n        msgUploadEmpty: '无效的文件上传.',\n        msgUploadError: 'Error',\n        msgValidationError: '验证错误',\n        msgLoading: '加载第 {index} 文件 共 {files} &hellip;',\n        msgProgress: '加载第 {index} 文件 共 {files} - {name} - {percent}% 完成.',\n        msgSelected: '{n} {files} 选中',\n        msgFoldersNotAllowed: '只支持拖拽文件! 跳过 {n} 拖拽的文件夹.',\n        msgImageWidthSmall: '图像文件的\"{name}\"的宽度必须是至少{size}像素.',\n        msgImageHeightSmall: '图像文件的\"{name}\"的高度必须至少为{size}像素.',\n        msgImageWidthLarge: '图像文件\"{name}\"的宽度不能超过{size}像素.',\n        msgImageHeightLarge: '图像文件\"{name}\"的高度不能超过{size}像素.',\n        msgImageResizeError: '无法获取的图像尺寸调整。',\n        msgImageResizeException: '调整图像大小时发生错误。<pre>{errors}</pre>',\n        msgAjaxError: '{operation} 发生错误. 请重试!',\n        msgAjaxProgressError: '{operation} 失败',\n        ajaxOperations: {\n            deleteThumb: '删除文件',\n            uploadThumb: '上传文件',\n            uploadBatch: '批量上传',\n            uploadExtra: '表单数据上传'\n        },\n        dropZoneTitle: '拖拽文件到这里 &hellip;<br>支持多文件同时上传',\n        dropZoneClickTitle: '<br>(或点击{files}按钮选择文件)',\n        fileActionSettings: {\n            removeTitle: '删除文件',\n            uploadTitle: '上传文件',\n            uploadRetryTitle: 'Retry upload',\n            zoomTitle: '查看详情',\n            dragTitle: '移动 / 重置',\n            indicatorNewTitle: '没有上传',\n            indicatorSuccessTitle: '上传',\n            indicatorErrorTitle: '上传错误',\n            indicatorLoadingTitle: '上传 ...'\n        },\n        previewZoomButtonTitles: {\n            prev: '预览上一个文件',\n            next: '预览下一个文件',\n            toggleheader: '缩放',\n            fullscreen: '全屏',\n            borderless: '无边界模式',\n            close: '关闭当前预览'\n        }\n    };\n})(window.jQuery);\n"
  },
  {
    "path": "static/bootstrap/plugins/bootstrap-fileinput/4.4.7/js/plugins/piexif.js",
    "content": "/* piexifjs\n\nThe MIT License (MIT)\n\nCopyright (c) 2014, 2015 hMatoba(https://github.com/hMatoba)\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n*/\n\n(function () {\n    \"use strict\";\n    var that = {};\n    that.version = \"1.03\";\n\n    that.remove = function (jpeg) {\n        var b64 = false;\n        if (jpeg.slice(0, 2) == \"\\xff\\xd8\") {\n        } else if (jpeg.slice(0, 23) == \"data:image/jpeg;base64,\" || jpeg.slice(0, 22) == \"data:image/jpg;base64,\") {\n            jpeg = atob(jpeg.split(\",\")[1]);\n            b64 = true;\n        } else {\n            throw (\"Given data is not jpeg.\");\n        }\n        \n        var segments = splitIntoSegments(jpeg);\n        if (segments[1].slice(0, 2) == \"\\xff\\xe1\" && \n               segments[1].slice(4, 10) == \"Exif\\x00\\x00\") {\n            segments = [segments[0]].concat(segments.slice(2));\n        } else if (segments[2].slice(0, 2) == \"\\xff\\xe1\" &&\n                   segments[2].slice(4, 10) == \"Exif\\x00\\x00\") {\n            segments = segments.slice(0, 2).concat(segments.slice(3));\n        } else {\n            throw(\"Exif not found.\");\n        }\n        \n        var new_data = segments.join(\"\");\n        if (b64) {\n            new_data = \"data:image/jpeg;base64,\" + btoa(new_data);\n        }\n\n        return new_data;\n    };\n\n\n    that.insert = function (exif, jpeg) {\n        var b64 = false;\n        if (exif.slice(0, 6) != \"\\x45\\x78\\x69\\x66\\x00\\x00\") {\n            throw (\"Given data is not exif.\");\n        }\n        if (jpeg.slice(0, 2) == \"\\xff\\xd8\") {\n        } else if (jpeg.slice(0, 23) == \"data:image/jpeg;base64,\" || jpeg.slice(0, 22) == \"data:image/jpg;base64,\") {\n            jpeg = atob(jpeg.split(\",\")[1]);\n            b64 = true;\n        } else {\n            throw (\"Given data is not jpeg.\");\n        }\n\n        var exifStr = \"\\xff\\xe1\" + pack(\">H\", [exif.length + 2]) + exif;\n        var segments = splitIntoSegments(jpeg);\n        var new_data = mergeSegments(segments, exifStr);\n        if (b64) {\n            new_data = \"data:image/jpeg;base64,\" + btoa(new_data);\n        }\n\n        return new_data;\n    };\n\n\n    that.load = function (data) {\n        var input_data;\n        if (typeof (data) == \"string\") {\n            if (data.slice(0, 2) == \"\\xff\\xd8\") {\n                input_data = data;\n            } else if (data.slice(0, 23) == \"data:image/jpeg;base64,\" || data.slice(0, 22) == \"data:image/jpg;base64,\") {\n                input_data = atob(data.split(\",\")[1]);\n            } else if (data.slice(0, 4) == \"Exif\") {\n                input_data = data.slice(6);\n            } else {\n                throw (\"'load' gots invalid file data.\");\n            }\n        } else {\n            throw (\"'load' gots invalid type argument.\");\n        }\n\n        var exifDict = {};\n        var exif_dict = {\n            \"0th\": {},\n            \"Exif\": {},\n            \"GPS\": {},\n            \"Interop\": {},\n            \"1st\": {},\n            \"thumbnail\": null\n        };\n        var exifReader = new ExifReader(input_data);\n        if (exifReader.tiftag === null) {\n            return exif_dict;\n        }\n\n        if (exifReader.tiftag.slice(0, 2) == \"\\x49\\x49\") {\n            exifReader.endian_mark = \"<\";\n        } else {\n            exifReader.endian_mark = \">\";\n        }\n\n        var pointer = unpack(exifReader.endian_mark + \"L\",\n            exifReader.tiftag.slice(4, 8))[0];\n        exif_dict[\"0th\"] = exifReader.get_ifd(pointer, \"0th\");\n\n        var first_ifd_pointer = exif_dict[\"0th\"][\"first_ifd_pointer\"];\n        delete exif_dict[\"0th\"][\"first_ifd_pointer\"];\n\n        if (34665 in exif_dict[\"0th\"]) {\n            pointer = exif_dict[\"0th\"][34665];\n            exif_dict[\"Exif\"] = exifReader.get_ifd(pointer, \"Exif\");\n        }\n        if (34853 in exif_dict[\"0th\"]) {\n            pointer = exif_dict[\"0th\"][34853];\n            exif_dict[\"GPS\"] = exifReader.get_ifd(pointer, \"GPS\");\n        }\n        if (40965 in exif_dict[\"Exif\"]) {\n            pointer = exif_dict[\"Exif\"][40965];\n            exif_dict[\"Interop\"] = exifReader.get_ifd(pointer, \"Interop\");\n        }\n        if (first_ifd_pointer != \"\\x00\\x00\\x00\\x00\") {\n            pointer = unpack(exifReader.endian_mark + \"L\",\n                first_ifd_pointer)[0];\n            exif_dict[\"1st\"] = exifReader.get_ifd(pointer, \"1st\");\n            if ((513 in exif_dict[\"1st\"]) && (514 in exif_dict[\"1st\"])) {\n                var end = exif_dict[\"1st\"][513] + exif_dict[\"1st\"][514];\n                var thumb = exifReader.tiftag.slice(exif_dict[\"1st\"][513], end);\n                exif_dict[\"thumbnail\"] = thumb;\n            }\n        }\n\n        return exif_dict;\n    };\n\n\n    that.dump = function (exif_dict_original) {\n        var TIFF_HEADER_LENGTH = 8;\n\n        var exif_dict = copy(exif_dict_original);\n        var header = \"Exif\\x00\\x00\\x4d\\x4d\\x00\\x2a\\x00\\x00\\x00\\x08\";\n        var exif_is = false;\n        var gps_is = false;\n        var interop_is = false;\n        var first_is = false;\n\n        var zeroth_ifd,\n            exif_ifd,\n            interop_ifd,\n            gps_ifd,\n            first_ifd;\n        \n        if (\"0th\" in exif_dict) {\n            zeroth_ifd = exif_dict[\"0th\"];\n        } else {\n            zeroth_ifd = {};\n        }\n        \n        if (((\"Exif\" in exif_dict) && (Object.keys(exif_dict[\"Exif\"]).length)) ||\n            ((\"Interop\" in exif_dict) && (Object.keys(exif_dict[\"Interop\"]).length))) {\n            zeroth_ifd[34665] = 1;\n            exif_is = true;\n            exif_ifd = exif_dict[\"Exif\"];\n            if ((\"Interop\" in exif_dict) && Object.keys(exif_dict[\"Interop\"]).length) {\n                exif_ifd[40965] = 1;\n                interop_is = true;\n                interop_ifd = exif_dict[\"Interop\"];\n            } else if (Object.keys(exif_ifd).indexOf(that.ExifIFD.InteroperabilityTag.toString()) > -1) {\n                delete exif_ifd[40965];\n            }\n        } else if (Object.keys(zeroth_ifd).indexOf(that.ImageIFD.ExifTag.toString()) > -1) {\n            delete zeroth_ifd[34665];\n        }\n\n        if ((\"GPS\" in exif_dict) && (Object.keys(exif_dict[\"GPS\"]).length)) {\n            zeroth_ifd[that.ImageIFD.GPSTag] = 1;\n            gps_is = true;\n            gps_ifd = exif_dict[\"GPS\"];\n        } else if (Object.keys(zeroth_ifd).indexOf(that.ImageIFD.GPSTag.toString()) > -1) {\n            delete zeroth_ifd[that.ImageIFD.GPSTag];\n        }\n        \n        if ((\"1st\" in exif_dict) &&\n            (\"thumbnail\" in exif_dict) &&\n            (exif_dict[\"thumbnail\"] != null)) {\n            first_is = true;\n            exif_dict[\"1st\"][513] = 1;\n            exif_dict[\"1st\"][514] = 1;\n            first_ifd = exif_dict[\"1st\"];\n        }\n        \n        var zeroth_set = _dict_to_bytes(zeroth_ifd, \"0th\", 0);\n        var zeroth_length = (zeroth_set[0].length + exif_is * 12 + gps_is * 12 + 4 +\n            zeroth_set[1].length);\n\n        var exif_set,\n            exif_bytes = \"\",\n            exif_length = 0,\n            gps_set,\n            gps_bytes = \"\",\n            gps_length = 0,\n            interop_set,\n            interop_bytes = \"\",\n            interop_length = 0,\n            first_set,\n            first_bytes = \"\",\n            thumbnail;\n        if (exif_is) {\n            exif_set = _dict_to_bytes(exif_ifd, \"Exif\", zeroth_length);\n            exif_length = exif_set[0].length + interop_is * 12 + exif_set[1].length;\n        }\n        if (gps_is) {\n            gps_set = _dict_to_bytes(gps_ifd, \"GPS\", zeroth_length + exif_length);\n            gps_bytes = gps_set.join(\"\");\n            gps_length = gps_bytes.length;\n        }\n        if (interop_is) {\n            var offset = zeroth_length + exif_length + gps_length;\n            interop_set = _dict_to_bytes(interop_ifd, \"Interop\", offset);\n            interop_bytes = interop_set.join(\"\");\n            interop_length = interop_bytes.length;\n        }\n        if (first_is) {\n            var offset = zeroth_length + exif_length + gps_length + interop_length;\n            first_set = _dict_to_bytes(first_ifd, \"1st\", offset);\n            thumbnail = _get_thumbnail(exif_dict[\"thumbnail\"]);\n            if (thumbnail.length > 64000) {\n                throw (\"Given thumbnail is too large. max 64kB\");\n            }\n        }\n\n        var exif_pointer = \"\",\n            gps_pointer = \"\",\n            interop_pointer = \"\",\n            first_ifd_pointer = \"\\x00\\x00\\x00\\x00\";\n        if (exif_is) {\n            var pointer_value = TIFF_HEADER_LENGTH + zeroth_length;\n            var pointer_str = pack(\">L\", [pointer_value]);\n            var key = 34665;\n            var key_str = pack(\">H\", [key]);\n            var type_str = pack(\">H\", [TYPES[\"Long\"]]);\n            var length_str = pack(\">L\", [1]);\n            exif_pointer = key_str + type_str + length_str + pointer_str;\n        }\n        if (gps_is) {\n            var pointer_value = TIFF_HEADER_LENGTH + zeroth_length + exif_length;\n            var pointer_str = pack(\">L\", [pointer_value]);\n            var key = 34853;\n            var key_str = pack(\">H\", [key]);\n            var type_str = pack(\">H\", [TYPES[\"Long\"]]);\n            var length_str = pack(\">L\", [1]);\n            gps_pointer = key_str + type_str + length_str + pointer_str;\n        }\n        if (interop_is) {\n            var pointer_value = (TIFF_HEADER_LENGTH +\n                zeroth_length + exif_length + gps_length);\n            var pointer_str = pack(\">L\", [pointer_value]);\n            var key = 40965;\n            var key_str = pack(\">H\", [key]);\n            var type_str = pack(\">H\", [TYPES[\"Long\"]]);\n            var length_str = pack(\">L\", [1]);\n            interop_pointer = key_str + type_str + length_str + pointer_str;\n        }\n        if (first_is) {\n            var pointer_value = (TIFF_HEADER_LENGTH + zeroth_length +\n                exif_length + gps_length + interop_length);\n            first_ifd_pointer = pack(\">L\", [pointer_value]);\n            var thumbnail_pointer = (pointer_value + first_set[0].length + 24 +\n                4 + first_set[1].length);\n            var thumbnail_p_bytes = (\"\\x02\\x01\\x00\\x04\\x00\\x00\\x00\\x01\" +\n                pack(\">L\", [thumbnail_pointer]));\n            var thumbnail_length_bytes = (\"\\x02\\x02\\x00\\x04\\x00\\x00\\x00\\x01\" +\n                pack(\">L\", [thumbnail.length]));\n            first_bytes = (first_set[0] + thumbnail_p_bytes +\n                thumbnail_length_bytes + \"\\x00\\x00\\x00\\x00\" +\n                first_set[1] + thumbnail);\n        }\n\n        var zeroth_bytes = (zeroth_set[0] + exif_pointer + gps_pointer +\n            first_ifd_pointer + zeroth_set[1]);\n        if (exif_is) {\n            exif_bytes = exif_set[0] + interop_pointer + exif_set[1];\n        }\n\n        return (header + zeroth_bytes + exif_bytes + gps_bytes +\n            interop_bytes + first_bytes);\n    };\n\n\n    function copy(obj) {\n        return JSON.parse(JSON.stringify(obj));\n    }\n\n\n    function _get_thumbnail(jpeg) {\n        var segments = splitIntoSegments(jpeg);\n        while ((\"\\xff\\xe0\" <= segments[1].slice(0, 2)) && (segments[1].slice(0, 2) <= \"\\xff\\xef\")) {\n            segments = [segments[0]].concat(segments.slice(2));\n        }\n        return segments.join(\"\");\n    }\n\n\n    function _pack_byte(array) {\n        return pack(\">\" + nStr(\"B\", array.length), array);\n    }\n\n\n    function _pack_short(array) {\n        return pack(\">\" + nStr(\"H\", array.length), array);\n    }\n\n\n    function _pack_long(array) {\n        return pack(\">\" + nStr(\"L\", array.length), array);\n    }\n\n\n    function _value_to_bytes(raw_value, value_type, offset) {\n        var four_bytes_over = \"\";\n        var value_str = \"\";\n        var length,\n            new_value,\n            num,\n            den;\n\n        if (value_type == \"Byte\") {\n            length = raw_value.length;\n            if (length <= 4) {\n                value_str = (_pack_byte(raw_value) +\n                    nStr(\"\\x00\", 4 - length));\n            } else {\n                value_str = pack(\">L\", [offset]);\n                four_bytes_over = _pack_byte(raw_value);\n            }\n        } else if (value_type == \"Short\") {\n            length = raw_value.length;\n            if (length <= 2) {\n                value_str = (_pack_short(raw_value) +\n                    nStr(\"\\x00\\x00\", 2 - length));\n            } else {\n                value_str = pack(\">L\", [offset]);\n                four_bytes_over = _pack_short(raw_value);\n            }\n        } else if (value_type == \"Long\") {\n            length = raw_value.length;\n            if (length <= 1) {\n                value_str = _pack_long(raw_value);\n            } else {\n                value_str = pack(\">L\", [offset]);\n                four_bytes_over = _pack_long(raw_value);\n            }\n        } else if (value_type == \"Ascii\") {\n            new_value = raw_value + \"\\x00\";\n            length = new_value.length;\n            if (length > 4) {\n                value_str = pack(\">L\", [offset]);\n                four_bytes_over = new_value;\n            } else {\n                value_str = new_value + nStr(\"\\x00\", 4 - length);\n            }\n        } else if (value_type == \"Rational\") {\n            if (typeof (raw_value[0]) == \"number\") {\n                length = 1;\n                num = raw_value[0];\n                den = raw_value[1];\n                new_value = pack(\">L\", [num]) + pack(\">L\", [den]);\n            } else {\n                length = raw_value.length;\n                new_value = \"\";\n                for (var n = 0; n < length; n++) {\n                    num = raw_value[n][0];\n                    den = raw_value[n][1];\n                    new_value += (pack(\">L\", [num]) +\n                        pack(\">L\", [den]));\n                }\n            }\n            value_str = pack(\">L\", [offset]);\n            four_bytes_over = new_value;\n        } else if (value_type == \"SRational\") {\n            if (typeof (raw_value[0]) == \"number\") {\n                length = 1;\n                num = raw_value[0];\n                den = raw_value[1];\n                new_value = pack(\">l\", [num]) + pack(\">l\", [den]);\n            } else {\n                length = raw_value.length;\n                new_value = \"\";\n                for (var n = 0; n < length; n++) {\n                    num = raw_value[n][0];\n                    den = raw_value[n][1];\n                    new_value += (pack(\">l\", [num]) +\n                        pack(\">l\", [den]));\n                }\n            }\n            value_str = pack(\">L\", [offset]);\n            four_bytes_over = new_value;\n        } else if (value_type == \"Undefined\") {\n            length = raw_value.length;\n            if (length > 4) {\n                value_str = pack(\">L\", [offset]);\n                four_bytes_over = raw_value;\n            } else {\n                value_str = raw_value + nStr(\"\\x00\", 4 - length);\n            }\n        }\n\n        var length_str = pack(\">L\", [length]);\n\n        return [length_str, value_str, four_bytes_over];\n    }\n\n    function _dict_to_bytes(ifd_dict, ifd, ifd_offset) {\n        var TIFF_HEADER_LENGTH = 8;\n        var tag_count = Object.keys(ifd_dict).length;\n        var entry_header = pack(\">H\", [tag_count]);\n        var entries_length;\n        if ([\"0th\", \"1st\"].indexOf(ifd) > -1) {\n            entries_length = 2 + tag_count * 12 + 4;\n        } else {\n            entries_length = 2 + tag_count * 12;\n        }\n        var entries = \"\";\n        var values = \"\";\n        var key;\n\n        for (var key in ifd_dict) {\n            if (typeof (key) == \"string\") {\n                key = parseInt(key);\n            }\n            if ((ifd == \"0th\") && ([34665, 34853].indexOf(key) > -1)) {\n                continue;\n            } else if ((ifd == \"Exif\") && (key == 40965)) {\n                continue;\n            } else if ((ifd == \"1st\") && ([513, 514].indexOf(key) > -1)) {\n                continue;\n            }\n\n            var raw_value = ifd_dict[key];\n            var key_str = pack(\">H\", [key]);\n            var value_type = TAGS[ifd][key][\"type\"];\n            var type_str = pack(\">H\", [TYPES[value_type]]);\n\n            if (typeof (raw_value) == \"number\") {\n                raw_value = [raw_value];\n            }\n            var offset = TIFF_HEADER_LENGTH + entries_length + ifd_offset + values.length;\n            var b = _value_to_bytes(raw_value, value_type, offset);\n            var length_str = b[0];\n            var value_str = b[1];\n            var four_bytes_over = b[2];\n\n            entries += key_str + type_str + length_str + value_str;\n            values += four_bytes_over;\n        }\n\n        return [entry_header + entries, values];\n    }\n\n\n\n    function ExifReader(data) {\n        var segments,\n            app1;\n        if (data.slice(0, 2) == \"\\xff\\xd8\") { // JPEG\n            segments = splitIntoSegments(data);\n            app1 = getExifSeg(segments);\n            if (app1) {\n                this.tiftag = app1.slice(10);\n            } else {\n                this.tiftag = null;\n            }\n        } else if ([\"\\x49\\x49\", \"\\x4d\\x4d\"].indexOf(data.slice(0, 2)) > -1) { // TIFF\n            this.tiftag = data;\n        } else if (data.slice(0, 4) == \"Exif\") { // Exif\n            this.tiftag = data.slice(6);\n        } else {\n            throw (\"Given file is neither JPEG nor TIFF.\");\n        }\n    }\n\n    ExifReader.prototype = {\n        get_ifd: function (pointer, ifd_name) {\n            var ifd_dict = {};\n            var tag_count = unpack(this.endian_mark + \"H\",\n                this.tiftag.slice(pointer, pointer + 2))[0];\n            var offset = pointer + 2;\n            var t;\n            if ([\"0th\", \"1st\"].indexOf(ifd_name) > -1) {\n                t = \"Image\";\n            } else {\n                t = ifd_name;\n            }\n\n            for (var x = 0; x < tag_count; x++) {\n                pointer = offset + 12 * x;\n                var tag = unpack(this.endian_mark + \"H\",\n                    this.tiftag.slice(pointer, pointer + 2))[0];\n                var value_type = unpack(this.endian_mark + \"H\",\n                    this.tiftag.slice(pointer + 2, pointer + 4))[0];\n                var value_num = unpack(this.endian_mark + \"L\",\n                    this.tiftag.slice(pointer + 4, pointer + 8))[0];\n                var value = this.tiftag.slice(pointer + 8, pointer + 12);\n\n                var v_set = [value_type, value_num, value];\n                if (tag in TAGS[t]) {\n                    ifd_dict[tag] = this.convert_value(v_set);\n                }\n            }\n\n            if (ifd_name == \"0th\") {\n                pointer = offset + 12 * tag_count;\n                ifd_dict[\"first_ifd_pointer\"] = this.tiftag.slice(pointer, pointer + 4);\n            }\n\n            return ifd_dict;\n        },\n\n        convert_value: function (val) {\n            var data = null;\n            var t = val[0];\n            var length = val[1];\n            var value = val[2];\n            var pointer;\n\n            if (t == 1) { // BYTE\n                if (length > 4) {\n                    pointer = unpack(this.endian_mark + \"L\", value)[0];\n                    data = unpack(this.endian_mark + nStr(\"B\", length),\n                        this.tiftag.slice(pointer, pointer + length));\n                } else {\n                    data = unpack(this.endian_mark + nStr(\"B\", length), value.slice(0, length));\n                }\n            } else if (t == 2) { // ASCII\n                if (length > 4) {\n                    pointer = unpack(this.endian_mark + \"L\", value)[0];\n                    data = this.tiftag.slice(pointer, pointer + length - 1);\n                } else {\n                    data = value.slice(0, length - 1);\n                }\n            } else if (t == 3) { // SHORT\n                if (length > 2) {\n                    pointer = unpack(this.endian_mark + \"L\", value)[0];\n                    data = unpack(this.endian_mark + nStr(\"H\", length),\n                        this.tiftag.slice(pointer, pointer + length * 2));\n                } else {\n                    data = unpack(this.endian_mark + nStr(\"H\", length),\n                        value.slice(0, length * 2));\n                }\n            } else if (t == 4) { // LONG\n                if (length > 1) {\n                    pointer = unpack(this.endian_mark + \"L\", value)[0];\n                    data = unpack(this.endian_mark + nStr(\"L\", length),\n                        this.tiftag.slice(pointer, pointer + length * 4));\n                } else {\n                    data = unpack(this.endian_mark + nStr(\"L\", length),\n                        value);\n                }\n            } else if (t == 5) { // RATIONAL\n                pointer = unpack(this.endian_mark + \"L\", value)[0];\n                if (length > 1) {\n                    data = [];\n                    for (var x = 0; x < length; x++) {\n                        data.push([unpack(this.endian_mark + \"L\",\n                                this.tiftag.slice(pointer + x * 8, pointer + 4 + x * 8))[0],\n                                   unpack(this.endian_mark + \"L\",\n                                this.tiftag.slice(pointer + 4 + x * 8, pointer + 8 + x * 8))[0]\n                                   ]);\n                    }\n                } else {\n                    data = [unpack(this.endian_mark + \"L\",\n                            this.tiftag.slice(pointer, pointer + 4))[0],\n                            unpack(this.endian_mark + \"L\",\n                            this.tiftag.slice(pointer + 4, pointer + 8))[0]\n                            ];\n                }\n            } else if (t == 7) { // UNDEFINED BYTES\n                if (length > 4) {\n                    pointer = unpack(this.endian_mark + \"L\", value)[0];\n                    data = this.tiftag.slice(pointer, pointer + length);\n                } else {\n                    data = value.slice(0, length);\n                }\n            } else if (t == 10) { // SRATIONAL\n                pointer = unpack(this.endian_mark + \"L\", value)[0];\n                if (length > 1) {\n                    data = [];\n                    for (var x = 0; x < length; x++) {\n                        data.push([unpack(this.endian_mark + \"l\",\n                                this.tiftag.slice(pointer + x * 8, pointer + 4 + x * 8))[0],\n                                   unpack(this.endian_mark + \"l\",\n                                this.tiftag.slice(pointer + 4 + x * 8, pointer + 8 + x * 8))[0]\n                                  ]);\n                    }\n                } else {\n                    data = [unpack(this.endian_mark + \"l\",\n                            this.tiftag.slice(pointer, pointer + 4))[0],\n                            unpack(this.endian_mark + \"l\",\n                            this.tiftag.slice(pointer + 4, pointer + 8))[0]\n                           ];\n                }\n            } else {\n                throw (\"Exif might be wrong. Got incorrect value \" +\n                    \"type to decode. type:\" + t);\n            }\n\n            if ((data instanceof Array) && (data.length == 1)) {\n                return data[0];\n            } else {\n                return data;\n            }\n        },\n    };\n\n\n    if (typeof window !== \"undefined\" && typeof window.btoa === \"function\") {\n        var btoa = window.btoa;\n    }\n    if (typeof btoa === \"undefined\") {\n        var btoa = function (input) {        var output = \"\";\n            var chr1, chr2, chr3, enc1, enc2, enc3, enc4;\n            var i = 0;\n            var keyStr = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\";\n\n            while (i < input.length) {\n\n                chr1 = input.charCodeAt(i++);\n                chr2 = input.charCodeAt(i++);\n                chr3 = input.charCodeAt(i++);\n\n                enc1 = chr1 >> 2;\n                enc2 = ((chr1 & 3) << 4) | (chr2 >> 4);\n                enc3 = ((chr2 & 15) << 2) | (chr3 >> 6);\n                enc4 = chr3 & 63;\n\n                if (isNaN(chr2)) {\n                    enc3 = enc4 = 64;\n                } else if (isNaN(chr3)) {\n                    enc4 = 64;\n                }\n\n                output = output +\n                keyStr.charAt(enc1) + keyStr.charAt(enc2) +\n                keyStr.charAt(enc3) + keyStr.charAt(enc4);\n\n            }\n\n            return output;\n        };\n    }\n    \n    \n    if (typeof window !== \"undefined\" && typeof window.atob === \"function\") {\n        var atob = window.atob;\n    }\n    if (typeof atob === \"undefined\") {\n        var atob = function (input) {\n            var output = \"\";\n            var chr1, chr2, chr3;\n            var enc1, enc2, enc3, enc4;\n            var i = 0;\n            var keyStr = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\";\n\n            input = input.replace(/[^A-Za-z0-9\\+\\/\\=]/g, \"\");\n\n            while (i < input.length) {\n\n                enc1 = keyStr.indexOf(input.charAt(i++));\n                enc2 = keyStr.indexOf(input.charAt(i++));\n                enc3 = keyStr.indexOf(input.charAt(i++));\n                enc4 = keyStr.indexOf(input.charAt(i++));\n\n                chr1 = (enc1 << 2) | (enc2 >> 4);\n                chr2 = ((enc2 & 15) << 4) | (enc3 >> 2);\n                chr3 = ((enc3 & 3) << 6) | enc4;\n\n                output = output + String.fromCharCode(chr1);\n\n                if (enc3 != 64) {\n                    output = output + String.fromCharCode(chr2);\n                }\n                if (enc4 != 64) {\n                    output = output + String.fromCharCode(chr3);\n                }\n\n            }\n\n            return output;\n        };\n    }\n\n\n    function getImageSize(imageArray) {\n        var segments = slice2Segments(imageArray);\n        var seg,\n            width,\n            height,\n            SOF = [192, 193, 194, 195, 197, 198, 199, 201, 202, 203, 205, 206, 207];\n\n        for (var x = 0; x < segments.length; x++) {\n            seg = segments[x];\n            if (SOF.indexOf(seg[1]) >= 0) {\n                height = seg[5] * 256 + seg[6];\n                width = seg[7] * 256 + seg[8];\n                break;\n            }\n        }\n        return [width, height];\n    }\n\n\n    function pack(mark, array) {\n        if (!(array instanceof Array)) {\n            throw (\"'pack' error. Got invalid type argument.\");\n        }\n        if ((mark.length - 1) != array.length) {\n            throw (\"'pack' error. \" + (mark.length - 1) + \" marks, \" + array.length + \" elements.\");\n        }\n\n        var littleEndian;\n        if (mark[0] == \"<\") {\n            littleEndian = true;\n        } else if (mark[0] == \">\") {\n            littleEndian = false;\n        } else {\n            throw (\"\");\n        }\n        var packed = \"\";\n        var p = 1;\n        var val = null;\n        var c = null;\n        var valStr = null;\n\n        while (c = mark[p]) {\n            if (c.toLowerCase() == \"b\") {\n                val = array[p - 1];\n                if ((c == \"b\") && (val < 0)) {\n                    val += 0x100;\n                }\n                if ((val > 0xff) || (val < 0)) {\n                    throw (\"'pack' error.\");\n                } else {\n                    valStr = String.fromCharCode(val);\n                }\n            } else if (c == \"H\") {\n                val = array[p - 1];\n                if ((val > 0xffff) || (val < 0)) {\n                    throw (\"'pack' error.\");\n                } else {\n                    valStr = String.fromCharCode(Math.floor((val % 0x10000) / 0x100)) +\n                        String.fromCharCode(val % 0x100);\n                    if (littleEndian) {\n                        valStr = valStr.split(\"\").reverse().join(\"\");\n                    }\n                }\n            } else if (c.toLowerCase() == \"l\") {\n                val = array[p - 1];\n                if ((c == \"l\") && (val < 0)) {\n                    val += 0x100000000;\n                }\n                if ((val > 0xffffffff) || (val < 0)) {\n                    throw (\"'pack' error.\");\n                } else {\n                    valStr = String.fromCharCode(Math.floor(val / 0x1000000)) +\n                        String.fromCharCode(Math.floor((val % 0x1000000) / 0x10000)) +\n                        String.fromCharCode(Math.floor((val % 0x10000) / 0x100)) +\n                        String.fromCharCode(val % 0x100);\n                    if (littleEndian) {\n                        valStr = valStr.split(\"\").reverse().join(\"\");\n                    }\n                }\n            } else {\n                throw (\"'pack' error.\");\n            }\n\n            packed += valStr;\n            p += 1;\n        }\n\n        return packed;\n    }\n\n    function unpack(mark, str) {\n        if (typeof (str) != \"string\") {\n            throw (\"'unpack' error. Got invalid type argument.\");\n        }\n        var l = 0;\n        for (var markPointer = 1; markPointer < mark.length; markPointer++) {\n            if (mark[markPointer].toLowerCase() == \"b\") {\n                l += 1;\n            } else if (mark[markPointer].toLowerCase() == \"h\") {\n                l += 2;\n            } else if (mark[markPointer].toLowerCase() == \"l\") {\n                l += 4;\n            } else {\n                throw (\"'unpack' error. Got invalid mark.\");\n            }\n        }\n\n        if (l != str.length) {\n            throw (\"'unpack' error. Mismatch between symbol and string length. \" + l + \":\" + str.length);\n        }\n\n        var littleEndian;\n        if (mark[0] == \"<\") {\n            littleEndian = true;\n        } else if (mark[0] == \">\") {\n            littleEndian = false;\n        } else {\n            throw (\"'unpack' error.\");\n        }\n        var unpacked = [];\n        var strPointer = 0;\n        var p = 1;\n        var val = null;\n        var c = null;\n        var length = null;\n        var sliced = \"\";\n\n        while (c = mark[p]) {\n            if (c.toLowerCase() == \"b\") {\n                length = 1;\n                sliced = str.slice(strPointer, strPointer + length);\n                val = sliced.charCodeAt(0);\n                if ((c == \"b\") && (val >= 0x80)) {\n                    val -= 0x100;\n                }\n            } else if (c == \"H\") {\n                length = 2;\n                sliced = str.slice(strPointer, strPointer + length);\n                if (littleEndian) {\n                    sliced = sliced.split(\"\").reverse().join(\"\");\n                }\n                val = sliced.charCodeAt(0) * 0x100 +\n                    sliced.charCodeAt(1);\n            } else if (c.toLowerCase() == \"l\") {\n                length = 4;\n                sliced = str.slice(strPointer, strPointer + length);\n                if (littleEndian) {\n                    sliced = sliced.split(\"\").reverse().join(\"\");\n                }\n                val = sliced.charCodeAt(0) * 0x1000000 +\n                    sliced.charCodeAt(1) * 0x10000 +\n                    sliced.charCodeAt(2) * 0x100 +\n                    sliced.charCodeAt(3);\n                if ((c == \"l\") && (val >= 0x80000000)) {\n                    val -= 0x100000000;\n                }\n            } else {\n                throw (\"'unpack' error. \" + c);\n            }\n\n            unpacked.push(val);\n            strPointer += length;\n            p += 1;\n        }\n\n        return unpacked;\n    }\n\n    function nStr(ch, num) {\n        var str = \"\";\n        for (var i = 0; i < num; i++) {\n            str += ch;\n        }\n        return str;\n    }\n\n    function splitIntoSegments(data) {\n        if (data.slice(0, 2) != \"\\xff\\xd8\") {\n            throw (\"Given data isn't JPEG.\");\n        }\n\n        var head = 2;\n        var segments = [\"\\xff\\xd8\"];\n        while (true) {\n            if (data.slice(head, head + 2) == \"\\xff\\xda\") {\n                segments.push(data.slice(head));\n                break;\n            } else {\n                var length = unpack(\">H\", data.slice(head + 2, head + 4))[0];\n                var endPoint = head + length + 2;\n                segments.push(data.slice(head, endPoint));\n                head = endPoint;\n            }\n\n            if (head >= data.length) {\n                throw (\"Wrong JPEG data.\");\n            }\n        }\n        return segments;\n    }\n\n\n    function getExifSeg(segments) {\n        var seg;\n        for (var i = 0; i < segments.length; i++) {\n            seg = segments[i];\n            if (seg.slice(0, 2) == \"\\xff\\xe1\" &&\n                   seg.slice(4, 10) == \"Exif\\x00\\x00\") {\n                return seg;\n            }\n        }\n        return null;\n    }\n\n\n    function mergeSegments(segments, exif) {\n        \n        if (segments[1].slice(0, 2) == \"\\xff\\xe0\" &&\n            (segments[2].slice(0, 2) == \"\\xff\\xe1\" &&\n             segments[2].slice(4, 10) == \"Exif\\x00\\x00\")) {\n            if (exif) {\n                segments[2] = exif;\n                segments = [\"\\xff\\xd8\"].concat(segments.slice(2));\n            } else if (exif == null) {\n                segments = segments.slice(0, 2).concat(segments.slice(3));\n            } else {\n                segments = segments.slice(0).concat(segments.slice(2));\n            }\n        } else if (segments[1].slice(0, 2) == \"\\xff\\xe0\") {\n            if (exif) {\n                segments[1] = exif;\n            }\n        } else if (segments[1].slice(0, 2) == \"\\xff\\xe1\" &&\n                   segments[1].slice(4, 10) == \"Exif\\x00\\x00\") {\n            if (exif) {\n                segments[1] = exif;\n            } else if (exif == null) {\n                segments = segments.slice(0).concat(segments.slice(2));\n            }\n        } else {\n            if (exif) {\n                segments = [segments[0], exif].concat(segments.slice(1));\n            }\n        }\n        \n        return segments.join(\"\");\n    }\n\n\n    function toHex(str) {\n        var hexStr = \"\";\n        for (var i = 0; i < str.length; i++) {\n            var h = str.charCodeAt(i);\n            var hex = ((h < 10) ? \"0\" : \"\") + h.toString(16);\n            hexStr += hex + \" \";\n        }\n        return hexStr;\n    }\n\n\n    var TYPES = {\n        \"Byte\": 1,\n        \"Ascii\": 2,\n        \"Short\": 3,\n        \"Long\": 4,\n        \"Rational\": 5,\n        \"Undefined\": 7,\n        \"SLong\": 9,\n        \"SRational\": 10\n    };\n\n\n    var TAGS = {\n        'Image': {\n            11: {\n                'name': 'ProcessingSoftware',\n                'type': 'Ascii'\n            },\n            254: {\n                'name': 'NewSubfileType',\n                'type': 'Long'\n            },\n            255: {\n                'name': 'SubfileType',\n                'type': 'Short'\n            },\n            256: {\n                'name': 'ImageWidth',\n                'type': 'Long'\n            },\n            257: {\n                'name': 'ImageLength',\n                'type': 'Long'\n            },\n            258: {\n                'name': 'BitsPerSample',\n                'type': 'Short'\n            },\n            259: {\n                'name': 'Compression',\n                'type': 'Short'\n            },\n            262: {\n                'name': 'PhotometricInterpretation',\n                'type': 'Short'\n            },\n            263: {\n                'name': 'Threshholding',\n                'type': 'Short'\n            },\n            264: {\n                'name': 'CellWidth',\n                'type': 'Short'\n            },\n            265: {\n                'name': 'CellLength',\n                'type': 'Short'\n            },\n            266: {\n                'name': 'FillOrder',\n                'type': 'Short'\n            },\n            269: {\n                'name': 'DocumentName',\n                'type': 'Ascii'\n            },\n            270: {\n                'name': 'ImageDescription',\n                'type': 'Ascii'\n            },\n            271: {\n                'name': 'Make',\n                'type': 'Ascii'\n            },\n            272: {\n                'name': 'Model',\n                'type': 'Ascii'\n            },\n            273: {\n                'name': 'StripOffsets',\n                'type': 'Long'\n            },\n            274: {\n                'name': 'Orientation',\n                'type': 'Short'\n            },\n            277: {\n                'name': 'SamplesPerPixel',\n                'type': 'Short'\n            },\n            278: {\n                'name': 'RowsPerStrip',\n                'type': 'Long'\n            },\n            279: {\n                'name': 'StripByteCounts',\n                'type': 'Long'\n            },\n            282: {\n                'name': 'XResolution',\n                'type': 'Rational'\n            },\n            283: {\n                'name': 'YResolution',\n                'type': 'Rational'\n            },\n            284: {\n                'name': 'PlanarConfiguration',\n                'type': 'Short'\n            },\n            290: {\n                'name': 'GrayResponseUnit',\n                'type': 'Short'\n            },\n            291: {\n                'name': 'GrayResponseCurve',\n                'type': 'Short'\n            },\n            292: {\n                'name': 'T4Options',\n                'type': 'Long'\n            },\n            293: {\n                'name': 'T6Options',\n                'type': 'Long'\n            },\n            296: {\n                'name': 'ResolutionUnit',\n                'type': 'Short'\n            },\n            301: {\n                'name': 'TransferFunction',\n                'type': 'Short'\n            },\n            305: {\n                'name': 'Software',\n                'type': 'Ascii'\n            },\n            306: {\n                'name': 'DateTime',\n                'type': 'Ascii'\n            },\n            315: {\n                'name': 'Artist',\n                'type': 'Ascii'\n            },\n            316: {\n                'name': 'HostComputer',\n                'type': 'Ascii'\n            },\n            317: {\n                'name': 'Predictor',\n                'type': 'Short'\n            },\n            318: {\n                'name': 'WhitePoint',\n                'type': 'Rational'\n            },\n            319: {\n                'name': 'PrimaryChromaticities',\n                'type': 'Rational'\n            },\n            320: {\n                'name': 'ColorMap',\n                'type': 'Short'\n            },\n            321: {\n                'name': 'HalftoneHints',\n                'type': 'Short'\n            },\n            322: {\n                'name': 'TileWidth',\n                'type': 'Short'\n            },\n            323: {\n                'name': 'TileLength',\n                'type': 'Short'\n            },\n            324: {\n                'name': 'TileOffsets',\n                'type': 'Short'\n            },\n            325: {\n                'name': 'TileByteCounts',\n                'type': 'Short'\n            },\n            330: {\n                'name': 'SubIFDs',\n                'type': 'Long'\n            },\n            332: {\n                'name': 'InkSet',\n                'type': 'Short'\n            },\n            333: {\n                'name': 'InkNames',\n                'type': 'Ascii'\n            },\n            334: {\n                'name': 'NumberOfInks',\n                'type': 'Short'\n            },\n            336: {\n                'name': 'DotRange',\n                'type': 'Byte'\n            },\n            337: {\n                'name': 'TargetPrinter',\n                'type': 'Ascii'\n            },\n            338: {\n                'name': 'ExtraSamples',\n                'type': 'Short'\n            },\n            339: {\n                'name': 'SampleFormat',\n                'type': 'Short'\n            },\n            340: {\n                'name': 'SMinSampleValue',\n                'type': 'Short'\n            },\n            341: {\n                'name': 'SMaxSampleValue',\n                'type': 'Short'\n            },\n            342: {\n                'name': 'TransferRange',\n                'type': 'Short'\n            },\n            343: {\n                'name': 'ClipPath',\n                'type': 'Byte'\n            },\n            344: {\n                'name': 'XClipPathUnits',\n                'type': 'Long'\n            },\n            345: {\n                'name': 'YClipPathUnits',\n                'type': 'Long'\n            },\n            346: {\n                'name': 'Indexed',\n                'type': 'Short'\n            },\n            347: {\n                'name': 'JPEGTables',\n                'type': 'Undefined'\n            },\n            351: {\n                'name': 'OPIProxy',\n                'type': 'Short'\n            },\n            512: {\n                'name': 'JPEGProc',\n                'type': 'Long'\n            },\n            513: {\n                'name': 'JPEGInterchangeFormat',\n                'type': 'Long'\n            },\n            514: {\n                'name': 'JPEGInterchangeFormatLength',\n                'type': 'Long'\n            },\n            515: {\n                'name': 'JPEGRestartInterval',\n                'type': 'Short'\n            },\n            517: {\n                'name': 'JPEGLosslessPredictors',\n                'type': 'Short'\n            },\n            518: {\n                'name': 'JPEGPointTransforms',\n                'type': 'Short'\n            },\n            519: {\n                'name': 'JPEGQTables',\n                'type': 'Long'\n            },\n            520: {\n                'name': 'JPEGDCTables',\n                'type': 'Long'\n            },\n            521: {\n                'name': 'JPEGACTables',\n                'type': 'Long'\n            },\n            529: {\n                'name': 'YCbCrCoefficients',\n                'type': 'Rational'\n            },\n            530: {\n                'name': 'YCbCrSubSampling',\n                'type': 'Short'\n            },\n            531: {\n                'name': 'YCbCrPositioning',\n                'type': 'Short'\n            },\n            532: {\n                'name': 'ReferenceBlackWhite',\n                'type': 'Rational'\n            },\n            700: {\n                'name': 'XMLPacket',\n                'type': 'Byte'\n            },\n            18246: {\n                'name': 'Rating',\n                'type': 'Short'\n            },\n            18249: {\n                'name': 'RatingPercent',\n                'type': 'Short'\n            },\n            32781: {\n                'name': 'ImageID',\n                'type': 'Ascii'\n            },\n            33421: {\n                'name': 'CFARepeatPatternDim',\n                'type': 'Short'\n            },\n            33422: {\n                'name': 'CFAPattern',\n                'type': 'Byte'\n            },\n            33423: {\n                'name': 'BatteryLevel',\n                'type': 'Rational'\n            },\n            33432: {\n                'name': 'Copyright',\n                'type': 'Ascii'\n            },\n            33434: {\n                'name': 'ExposureTime',\n                'type': 'Rational'\n            },\n            34377: {\n                'name': 'ImageResources',\n                'type': 'Byte'\n            },\n            34665: {\n                'name': 'ExifTag',\n                'type': 'Long'\n            },\n            34675: {\n                'name': 'InterColorProfile',\n                'type': 'Undefined'\n            },\n            34853: {\n                'name': 'GPSTag',\n                'type': 'Long'\n            },\n            34857: {\n                'name': 'Interlace',\n                'type': 'Short'\n            },\n            34858: {\n                'name': 'TimeZoneOffset',\n                'type': 'Long'\n            },\n            34859: {\n                'name': 'SelfTimerMode',\n                'type': 'Short'\n            },\n            37387: {\n                'name': 'FlashEnergy',\n                'type': 'Rational'\n            },\n            37388: {\n                'name': 'SpatialFrequencyResponse',\n                'type': 'Undefined'\n            },\n            37389: {\n                'name': 'Noise',\n                'type': 'Undefined'\n            },\n            37390: {\n                'name': 'FocalPlaneXResolution',\n                'type': 'Rational'\n            },\n            37391: {\n                'name': 'FocalPlaneYResolution',\n                'type': 'Rational'\n            },\n            37392: {\n                'name': 'FocalPlaneResolutionUnit',\n                'type': 'Short'\n            },\n            37393: {\n                'name': 'ImageNumber',\n                'type': 'Long'\n            },\n            37394: {\n                'name': 'SecurityClassification',\n                'type': 'Ascii'\n            },\n            37395: {\n                'name': 'ImageHistory',\n                'type': 'Ascii'\n            },\n            37397: {\n                'name': 'ExposureIndex',\n                'type': 'Rational'\n            },\n            37398: {\n                'name': 'TIFFEPStandardID',\n                'type': 'Byte'\n            },\n            37399: {\n                'name': 'SensingMethod',\n                'type': 'Short'\n            },\n            40091: {\n                'name': 'XPTitle',\n                'type': 'Byte'\n            },\n            40092: {\n                'name': 'XPComment',\n                'type': 'Byte'\n            },\n            40093: {\n                'name': 'XPAuthor',\n                'type': 'Byte'\n            },\n            40094: {\n                'name': 'XPKeywords',\n                'type': 'Byte'\n            },\n            40095: {\n                'name': 'XPSubject',\n                'type': 'Byte'\n            },\n            50341: {\n                'name': 'PrintImageMatching',\n                'type': 'Undefined'\n            },\n            50706: {\n                'name': 'DNGVersion',\n                'type': 'Byte'\n            },\n            50707: {\n                'name': 'DNGBackwardVersion',\n                'type': 'Byte'\n            },\n            50708: {\n                'name': 'UniqueCameraModel',\n                'type': 'Ascii'\n            },\n            50709: {\n                'name': 'LocalizedCameraModel',\n                'type': 'Byte'\n            },\n            50710: {\n                'name': 'CFAPlaneColor',\n                'type': 'Byte'\n            },\n            50711: {\n                'name': 'CFALayout',\n                'type': 'Short'\n            },\n            50712: {\n                'name': 'LinearizationTable',\n                'type': 'Short'\n            },\n            50713: {\n                'name': 'BlackLevelRepeatDim',\n                'type': 'Short'\n            },\n            50714: {\n                'name': 'BlackLevel',\n                'type': 'Rational'\n            },\n            50715: {\n                'name': 'BlackLevelDeltaH',\n                'type': 'SRational'\n            },\n            50716: {\n                'name': 'BlackLevelDeltaV',\n                'type': 'SRational'\n            },\n            50717: {\n                'name': 'WhiteLevel',\n                'type': 'Short'\n            },\n            50718: {\n                'name': 'DefaultScale',\n                'type': 'Rational'\n            },\n            50719: {\n                'name': 'DefaultCropOrigin',\n                'type': 'Short'\n            },\n            50720: {\n                'name': 'DefaultCropSize',\n                'type': 'Short'\n            },\n            50721: {\n                'name': 'ColorMatrix1',\n                'type': 'SRational'\n            },\n            50722: {\n                'name': 'ColorMatrix2',\n                'type': 'SRational'\n            },\n            50723: {\n                'name': 'CameraCalibration1',\n                'type': 'SRational'\n            },\n            50724: {\n                'name': 'CameraCalibration2',\n                'type': 'SRational'\n            },\n            50725: {\n                'name': 'ReductionMatrix1',\n                'type': 'SRational'\n            },\n            50726: {\n                'name': 'ReductionMatrix2',\n                'type': 'SRational'\n            },\n            50727: {\n                'name': 'AnalogBalance',\n                'type': 'Rational'\n            },\n            50728: {\n                'name': 'AsShotNeutral',\n                'type': 'Short'\n            },\n            50729: {\n                'name': 'AsShotWhiteXY',\n                'type': 'Rational'\n            },\n            50730: {\n                'name': 'BaselineExposure',\n                'type': 'SRational'\n            },\n            50731: {\n                'name': 'BaselineNoise',\n                'type': 'Rational'\n            },\n            50732: {\n                'name': 'BaselineSharpness',\n                'type': 'Rational'\n            },\n            50733: {\n                'name': 'BayerGreenSplit',\n                'type': 'Long'\n            },\n            50734: {\n                'name': 'LinearResponseLimit',\n                'type': 'Rational'\n            },\n            50735: {\n                'name': 'CameraSerialNumber',\n                'type': 'Ascii'\n            },\n            50736: {\n                'name': 'LensInfo',\n                'type': 'Rational'\n            },\n            50737: {\n                'name': 'ChromaBlurRadius',\n                'type': 'Rational'\n            },\n            50738: {\n                'name': 'AntiAliasStrength',\n                'type': 'Rational'\n            },\n            50739: {\n                'name': 'ShadowScale',\n                'type': 'SRational'\n            },\n            50740: {\n                'name': 'DNGPrivateData',\n                'type': 'Byte'\n            },\n            50741: {\n                'name': 'MakerNoteSafety',\n                'type': 'Short'\n            },\n            50778: {\n                'name': 'CalibrationIlluminant1',\n                'type': 'Short'\n            },\n            50779: {\n                'name': 'CalibrationIlluminant2',\n                'type': 'Short'\n            },\n            50780: {\n                'name': 'BestQualityScale',\n                'type': 'Rational'\n            },\n            50781: {\n                'name': 'RawDataUniqueID',\n                'type': 'Byte'\n            },\n            50827: {\n                'name': 'OriginalRawFileName',\n                'type': 'Byte'\n            },\n            50828: {\n                'name': 'OriginalRawFileData',\n                'type': 'Undefined'\n            },\n            50829: {\n                'name': 'ActiveArea',\n                'type': 'Short'\n            },\n            50830: {\n                'name': 'MaskedAreas',\n                'type': 'Short'\n            },\n            50831: {\n                'name': 'AsShotICCProfile',\n                'type': 'Undefined'\n            },\n            50832: {\n                'name': 'AsShotPreProfileMatrix',\n                'type': 'SRational'\n            },\n            50833: {\n                'name': 'CurrentICCProfile',\n                'type': 'Undefined'\n            },\n            50834: {\n                'name': 'CurrentPreProfileMatrix',\n                'type': 'SRational'\n            },\n            50879: {\n                'name': 'ColorimetricReference',\n                'type': 'Short'\n            },\n            50931: {\n                'name': 'CameraCalibrationSignature',\n                'type': 'Byte'\n            },\n            50932: {\n                'name': 'ProfileCalibrationSignature',\n                'type': 'Byte'\n            },\n            50934: {\n                'name': 'AsShotProfileName',\n                'type': 'Byte'\n            },\n            50935: {\n                'name': 'NoiseReductionApplied',\n                'type': 'Rational'\n            },\n            50936: {\n                'name': 'ProfileName',\n                'type': 'Byte'\n            },\n            50937: {\n                'name': 'ProfileHueSatMapDims',\n                'type': 'Long'\n            },\n            50938: {\n                'name': 'ProfileHueSatMapData1',\n                'type': 'Float'\n            },\n            50939: {\n                'name': 'ProfileHueSatMapData2',\n                'type': 'Float'\n            },\n            50940: {\n                'name': 'ProfileToneCurve',\n                'type': 'Float'\n            },\n            50941: {\n                'name': 'ProfileEmbedPolicy',\n                'type': 'Long'\n            },\n            50942: {\n                'name': 'ProfileCopyright',\n                'type': 'Byte'\n            },\n            50964: {\n                'name': 'ForwardMatrix1',\n                'type': 'SRational'\n            },\n            50965: {\n                'name': 'ForwardMatrix2',\n                'type': 'SRational'\n            },\n            50966: {\n                'name': 'PreviewApplicationName',\n                'type': 'Byte'\n            },\n            50967: {\n                'name': 'PreviewApplicationVersion',\n                'type': 'Byte'\n            },\n            50968: {\n                'name': 'PreviewSettingsName',\n                'type': 'Byte'\n            },\n            50969: {\n                'name': 'PreviewSettingsDigest',\n                'type': 'Byte'\n            },\n            50970: {\n                'name': 'PreviewColorSpace',\n                'type': 'Long'\n            },\n            50971: {\n                'name': 'PreviewDateTime',\n                'type': 'Ascii'\n            },\n            50972: {\n                'name': 'RawImageDigest',\n                'type': 'Undefined'\n            },\n            50973: {\n                'name': 'OriginalRawFileDigest',\n                'type': 'Undefined'\n            },\n            50974: {\n                'name': 'SubTileBlockSize',\n                'type': 'Long'\n            },\n            50975: {\n                'name': 'RowInterleaveFactor',\n                'type': 'Long'\n            },\n            50981: {\n                'name': 'ProfileLookTableDims',\n                'type': 'Long'\n            },\n            50982: {\n                'name': 'ProfileLookTableData',\n                'type': 'Float'\n            },\n            51008: {\n                'name': 'OpcodeList1',\n                'type': 'Undefined'\n            },\n            51009: {\n                'name': 'OpcodeList2',\n                'type': 'Undefined'\n            },\n            51022: {\n                'name': 'OpcodeList3',\n                'type': 'Undefined'\n            }\n        },\n        'Exif': {\n            33434: {\n                'name': 'ExposureTime',\n                'type': 'Rational'\n            },\n            33437: {\n                'name': 'FNumber',\n                'type': 'Rational'\n            },\n            34850: {\n                'name': 'ExposureProgram',\n                'type': 'Short'\n            },\n            34852: {\n                'name': 'SpectralSensitivity',\n                'type': 'Ascii'\n            },\n            34855: {\n                'name': 'ISOSpeedRatings',\n                'type': 'Short'\n            },\n            34856: {\n                'name': 'OECF',\n                'type': 'Undefined'\n            },\n            34864: {\n                'name': 'SensitivityType',\n                'type': 'Short'\n            },\n            34865: {\n                'name': 'StandardOutputSensitivity',\n                'type': 'Long'\n            },\n            34866: {\n                'name': 'RecommendedExposureIndex',\n                'type': 'Long'\n            },\n            34867: {\n                'name': 'ISOSpeed',\n                'type': 'Long'\n            },\n            34868: {\n                'name': 'ISOSpeedLatitudeyyy',\n                'type': 'Long'\n            },\n            34869: {\n                'name': 'ISOSpeedLatitudezzz',\n                'type': 'Long'\n            },\n            36864: {\n                'name': 'ExifVersion',\n                'type': 'Undefined'\n            },\n            36867: {\n                'name': 'DateTimeOriginal',\n                'type': 'Ascii'\n            },\n            36868: {\n                'name': 'DateTimeDigitized',\n                'type': 'Ascii'\n            },\n            37121: {\n                'name': 'ComponentsConfiguration',\n                'type': 'Undefined'\n            },\n            37122: {\n                'name': 'CompressedBitsPerPixel',\n                'type': 'Rational'\n            },\n            37377: {\n                'name': 'ShutterSpeedValue',\n                'type': 'SRational'\n            },\n            37378: {\n                'name': 'ApertureValue',\n                'type': 'Rational'\n            },\n            37379: {\n                'name': 'BrightnessValue',\n                'type': 'SRational'\n            },\n            37380: {\n                'name': 'ExposureBiasValue',\n                'type': 'SRational'\n            },\n            37381: {\n                'name': 'MaxApertureValue',\n                'type': 'Rational'\n            },\n            37382: {\n                'name': 'SubjectDistance',\n                'type': 'Rational'\n            },\n            37383: {\n                'name': 'MeteringMode',\n                'type': 'Short'\n            },\n            37384: {\n                'name': 'LightSource',\n                'type': 'Short'\n            },\n            37385: {\n                'name': 'Flash',\n                'type': 'Short'\n            },\n            37386: {\n                'name': 'FocalLength',\n                'type': 'Rational'\n            },\n            37396: {\n                'name': 'SubjectArea',\n                'type': 'Short'\n            },\n            37500: {\n                'name': 'MakerNote',\n                'type': 'Undefined'\n            },\n            37510: {\n                'name': 'UserComment',\n                'type': 'Ascii'\n            },\n            37520: {\n                'name': 'SubSecTime',\n                'type': 'Ascii'\n            },\n            37521: {\n                'name': 'SubSecTimeOriginal',\n                'type': 'Ascii'\n            },\n            37522: {\n                'name': 'SubSecTimeDigitized',\n                'type': 'Ascii'\n            },\n            40960: {\n                'name': 'FlashpixVersion',\n                'type': 'Undefined'\n            },\n            40961: {\n                'name': 'ColorSpace',\n                'type': 'Short'\n            },\n            40962: {\n                'name': 'PixelXDimension',\n                'type': 'Long'\n            },\n            40963: {\n                'name': 'PixelYDimension',\n                'type': 'Long'\n            },\n            40964: {\n                'name': 'RelatedSoundFile',\n                'type': 'Ascii'\n            },\n            40965: {\n                'name': 'InteroperabilityTag',\n                'type': 'Long'\n            },\n            41483: {\n                'name': 'FlashEnergy',\n                'type': 'Rational'\n            },\n            41484: {\n                'name': 'SpatialFrequencyResponse',\n                'type': 'Undefined'\n            },\n            41486: {\n                'name': 'FocalPlaneXResolution',\n                'type': 'Rational'\n            },\n            41487: {\n                'name': 'FocalPlaneYResolution',\n                'type': 'Rational'\n            },\n            41488: {\n                'name': 'FocalPlaneResolutionUnit',\n                'type': 'Short'\n            },\n            41492: {\n                'name': 'SubjectLocation',\n                'type': 'Short'\n            },\n            41493: {\n                'name': 'ExposureIndex',\n                'type': 'Rational'\n            },\n            41495: {\n                'name': 'SensingMethod',\n                'type': 'Short'\n            },\n            41728: {\n                'name': 'FileSource',\n                'type': 'Undefined'\n            },\n            41729: {\n                'name': 'SceneType',\n                'type': 'Undefined'\n            },\n            41730: {\n                'name': 'CFAPattern',\n                'type': 'Undefined'\n            },\n            41985: {\n                'name': 'CustomRendered',\n                'type': 'Short'\n            },\n            41986: {\n                'name': 'ExposureMode',\n                'type': 'Short'\n            },\n            41987: {\n                'name': 'WhiteBalance',\n                'type': 'Short'\n            },\n            41988: {\n                'name': 'DigitalZoomRatio',\n                'type': 'Rational'\n            },\n            41989: {\n                'name': 'FocalLengthIn35mmFilm',\n                'type': 'Short'\n            },\n            41990: {\n                'name': 'SceneCaptureType',\n                'type': 'Short'\n            },\n            41991: {\n                'name': 'GainControl',\n                'type': 'Short'\n            },\n            41992: {\n                'name': 'Contrast',\n                'type': 'Short'\n            },\n            41993: {\n                'name': 'Saturation',\n                'type': 'Short'\n            },\n            41994: {\n                'name': 'Sharpness',\n                'type': 'Short'\n            },\n            41995: {\n                'name': 'DeviceSettingDescription',\n                'type': 'Undefined'\n            },\n            41996: {\n                'name': 'SubjectDistanceRange',\n                'type': 'Short'\n            },\n            42016: {\n                'name': 'ImageUniqueID',\n                'type': 'Ascii'\n            },\n            42032: {\n                'name': 'CameraOwnerName',\n                'type': 'Ascii'\n            },\n            42033: {\n                'name': 'BodySerialNumber',\n                'type': 'Ascii'\n            },\n            42034: {\n                'name': 'LensSpecification',\n                'type': 'Rational'\n            },\n            42035: {\n                'name': 'LensMake',\n                'type': 'Ascii'\n            },\n            42036: {\n                'name': 'LensModel',\n                'type': 'Ascii'\n            },\n            42037: {\n                'name': 'LensSerialNumber',\n                'type': 'Ascii'\n            },\n            42240: {\n                'name': 'Gamma',\n                'type': 'Rational'\n            }\n        },\n        'GPS': {\n            0: {\n                'name': 'GPSVersionID',\n                'type': 'Byte'\n            },\n            1: {\n                'name': 'GPSLatitudeRef',\n                'type': 'Ascii'\n            },\n            2: {\n                'name': 'GPSLatitude',\n                'type': 'Rational'\n            },\n            3: {\n                'name': 'GPSLongitudeRef',\n                'type': 'Ascii'\n            },\n            4: {\n                'name': 'GPSLongitude',\n                'type': 'Rational'\n            },\n            5: {\n                'name': 'GPSAltitudeRef',\n                'type': 'Byte'\n            },\n            6: {\n                'name': 'GPSAltitude',\n                'type': 'Rational'\n            },\n            7: {\n                'name': 'GPSTimeStamp',\n                'type': 'Rational'\n            },\n            8: {\n                'name': 'GPSSatellites',\n                'type': 'Ascii'\n            },\n            9: {\n                'name': 'GPSStatus',\n                'type': 'Ascii'\n            },\n            10: {\n                'name': 'GPSMeasureMode',\n                'type': 'Ascii'\n            },\n            11: {\n                'name': 'GPSDOP',\n                'type': 'Rational'\n            },\n            12: {\n                'name': 'GPSSpeedRef',\n                'type': 'Ascii'\n            },\n            13: {\n                'name': 'GPSSpeed',\n                'type': 'Rational'\n            },\n            14: {\n                'name': 'GPSTrackRef',\n                'type': 'Ascii'\n            },\n            15: {\n                'name': 'GPSTrack',\n                'type': 'Rational'\n            },\n            16: {\n                'name': 'GPSImgDirectionRef',\n                'type': 'Ascii'\n            },\n            17: {\n                'name': 'GPSImgDirection',\n                'type': 'Rational'\n            },\n            18: {\n                'name': 'GPSMapDatum',\n                'type': 'Ascii'\n            },\n            19: {\n                'name': 'GPSDestLatitudeRef',\n                'type': 'Ascii'\n            },\n            20: {\n                'name': 'GPSDestLatitude',\n                'type': 'Rational'\n            },\n            21: {\n                'name': 'GPSDestLongitudeRef',\n                'type': 'Ascii'\n            },\n            22: {\n                'name': 'GPSDestLongitude',\n                'type': 'Rational'\n            },\n            23: {\n                'name': 'GPSDestBearingRef',\n                'type': 'Ascii'\n            },\n            24: {\n                'name': 'GPSDestBearing',\n                'type': 'Rational'\n            },\n            25: {\n                'name': 'GPSDestDistanceRef',\n                'type': 'Ascii'\n            },\n            26: {\n                'name': 'GPSDestDistance',\n                'type': 'Rational'\n            },\n            27: {\n                'name': 'GPSProcessingMethod',\n                'type': 'Undefined'\n            },\n            28: {\n                'name': 'GPSAreaInformation',\n                'type': 'Undefined'\n            },\n            29: {\n                'name': 'GPSDateStamp',\n                'type': 'Ascii'\n            },\n            30: {\n                'name': 'GPSDifferential',\n                'type': 'Short'\n            },\n            31: {\n                'name': 'GPSHPositioningError',\n                'type': 'Rational'\n            }\n        },\n        'Interop': {\n            1: {\n                'name': 'InteroperabilityIndex',\n                'type': 'Ascii'\n            }\n        },\n    };\n    TAGS[\"0th\"] = TAGS[\"Image\"];\n    TAGS[\"1st\"] = TAGS[\"Image\"];\n    that.TAGS = TAGS;\n\n    \n    that.ImageIFD = {\n        ProcessingSoftware:11,\n        NewSubfileType:254,\n        SubfileType:255,\n        ImageWidth:256,\n        ImageLength:257,\n        BitsPerSample:258,\n        Compression:259,\n        PhotometricInterpretation:262,\n        Threshholding:263,\n        CellWidth:264,\n        CellLength:265,\n        FillOrder:266,\n        DocumentName:269,\n        ImageDescription:270,\n        Make:271,\n        Model:272,\n        StripOffsets:273,\n        Orientation:274,\n        SamplesPerPixel:277,\n        RowsPerStrip:278,\n        StripByteCounts:279,\n        XResolution:282,\n        YResolution:283,\n        PlanarConfiguration:284,\n        GrayResponseUnit:290,\n        GrayResponseCurve:291,\n        T4Options:292,\n        T6Options:293,\n        ResolutionUnit:296,\n        TransferFunction:301,\n        Software:305,\n        DateTime:306,\n        Artist:315,\n        HostComputer:316,\n        Predictor:317,\n        WhitePoint:318,\n        PrimaryChromaticities:319,\n        ColorMap:320,\n        HalftoneHints:321,\n        TileWidth:322,\n        TileLength:323,\n        TileOffsets:324,\n        TileByteCounts:325,\n        SubIFDs:330,\n        InkSet:332,\n        InkNames:333,\n        NumberOfInks:334,\n        DotRange:336,\n        TargetPrinter:337,\n        ExtraSamples:338,\n        SampleFormat:339,\n        SMinSampleValue:340,\n        SMaxSampleValue:341,\n        TransferRange:342,\n        ClipPath:343,\n        XClipPathUnits:344,\n        YClipPathUnits:345,\n        Indexed:346,\n        JPEGTables:347,\n        OPIProxy:351,\n        JPEGProc:512,\n        JPEGInterchangeFormat:513,\n        JPEGInterchangeFormatLength:514,\n        JPEGRestartInterval:515,\n        JPEGLosslessPredictors:517,\n        JPEGPointTransforms:518,\n        JPEGQTables:519,\n        JPEGDCTables:520,\n        JPEGACTables:521,\n        YCbCrCoefficients:529,\n        YCbCrSubSampling:530,\n        YCbCrPositioning:531,\n        ReferenceBlackWhite:532,\n        XMLPacket:700,\n        Rating:18246,\n        RatingPercent:18249,\n        ImageID:32781,\n        CFARepeatPatternDim:33421,\n        CFAPattern:33422,\n        BatteryLevel:33423,\n        Copyright:33432,\n        ExposureTime:33434,\n        ImageResources:34377,\n        ExifTag:34665,\n        InterColorProfile:34675,\n        GPSTag:34853,\n        Interlace:34857,\n        TimeZoneOffset:34858,\n        SelfTimerMode:34859,\n        FlashEnergy:37387,\n        SpatialFrequencyResponse:37388,\n        Noise:37389,\n        FocalPlaneXResolution:37390,\n        FocalPlaneYResolution:37391,\n        FocalPlaneResolutionUnit:37392,\n        ImageNumber:37393,\n        SecurityClassification:37394,\n        ImageHistory:37395,\n        ExposureIndex:37397,\n        TIFFEPStandardID:37398,\n        SensingMethod:37399,\n        XPTitle:40091,\n        XPComment:40092,\n        XPAuthor:40093,\n        XPKeywords:40094,\n        XPSubject:40095,\n        PrintImageMatching:50341,\n        DNGVersion:50706,\n        DNGBackwardVersion:50707,\n        UniqueCameraModel:50708,\n        LocalizedCameraModel:50709,\n        CFAPlaneColor:50710,\n        CFALayout:50711,\n        LinearizationTable:50712,\n        BlackLevelRepeatDim:50713,\n        BlackLevel:50714,\n        BlackLevelDeltaH:50715,\n        BlackLevelDeltaV:50716,\n        WhiteLevel:50717,\n        DefaultScale:50718,\n        DefaultCropOrigin:50719,\n        DefaultCropSize:50720,\n        ColorMatrix1:50721,\n        ColorMatrix2:50722,\n        CameraCalibration1:50723,\n        CameraCalibration2:50724,\n        ReductionMatrix1:50725,\n        ReductionMatrix2:50726,\n        AnalogBalance:50727,\n        AsShotNeutral:50728,\n        AsShotWhiteXY:50729,\n        BaselineExposure:50730,\n        BaselineNoise:50731,\n        BaselineSharpness:50732,\n        BayerGreenSplit:50733,\n        LinearResponseLimit:50734,\n        CameraSerialNumber:50735,\n        LensInfo:50736,\n        ChromaBlurRadius:50737,\n        AntiAliasStrength:50738,\n        ShadowScale:50739,\n        DNGPrivateData:50740,\n        MakerNoteSafety:50741,\n        CalibrationIlluminant1:50778,\n        CalibrationIlluminant2:50779,\n        BestQualityScale:50780,\n        RawDataUniqueID:50781,\n        OriginalRawFileName:50827,\n        OriginalRawFileData:50828,\n        ActiveArea:50829,\n        MaskedAreas:50830,\n        AsShotICCProfile:50831,\n        AsShotPreProfileMatrix:50832,\n        CurrentICCProfile:50833,\n        CurrentPreProfileMatrix:50834,\n        ColorimetricReference:50879,\n        CameraCalibrationSignature:50931,\n        ProfileCalibrationSignature:50932,\n        AsShotProfileName:50934,\n        NoiseReductionApplied:50935,\n        ProfileName:50936,\n        ProfileHueSatMapDims:50937,\n        ProfileHueSatMapData1:50938,\n        ProfileHueSatMapData2:50939,\n        ProfileToneCurve:50940,\n        ProfileEmbedPolicy:50941,\n        ProfileCopyright:50942,\n        ForwardMatrix1:50964,\n        ForwardMatrix2:50965,\n        PreviewApplicationName:50966,\n        PreviewApplicationVersion:50967,\n        PreviewSettingsName:50968,\n        PreviewSettingsDigest:50969,\n        PreviewColorSpace:50970,\n        PreviewDateTime:50971,\n        RawImageDigest:50972,\n        OriginalRawFileDigest:50973,\n        SubTileBlockSize:50974,\n        RowInterleaveFactor:50975,\n        ProfileLookTableDims:50981,\n        ProfileLookTableData:50982,\n        OpcodeList1:51008,\n        OpcodeList2:51009,\n        OpcodeList3:51022,\n        NoiseProfile:51041,\n    };\n\n    \n    that.ExifIFD = {\n        ExposureTime:33434,\n        FNumber:33437,\n        ExposureProgram:34850,\n        SpectralSensitivity:34852,\n        ISOSpeedRatings:34855,\n        OECF:34856,\n        SensitivityType:34864,\n        StandardOutputSensitivity:34865,\n        RecommendedExposureIndex:34866,\n        ISOSpeed:34867,\n        ISOSpeedLatitudeyyy:34868,\n        ISOSpeedLatitudezzz:34869,\n        ExifVersion:36864,\n        DateTimeOriginal:36867,\n        DateTimeDigitized:36868,\n        ComponentsConfiguration:37121,\n        CompressedBitsPerPixel:37122,\n        ShutterSpeedValue:37377,\n        ApertureValue:37378,\n        BrightnessValue:37379,\n        ExposureBiasValue:37380,\n        MaxApertureValue:37381,\n        SubjectDistance:37382,\n        MeteringMode:37383,\n        LightSource:37384,\n        Flash:37385,\n        FocalLength:37386,\n        SubjectArea:37396,\n        MakerNote:37500,\n        UserComment:37510,\n        SubSecTime:37520,\n        SubSecTimeOriginal:37521,\n        SubSecTimeDigitized:37522,\n        FlashpixVersion:40960,\n        ColorSpace:40961,\n        PixelXDimension:40962,\n        PixelYDimension:40963,\n        RelatedSoundFile:40964,\n        InteroperabilityTag:40965,\n        FlashEnergy:41483,\n        SpatialFrequencyResponse:41484,\n        FocalPlaneXResolution:41486,\n        FocalPlaneYResolution:41487,\n        FocalPlaneResolutionUnit:41488,\n        SubjectLocation:41492,\n        ExposureIndex:41493,\n        SensingMethod:41495,\n        FileSource:41728,\n        SceneType:41729,\n        CFAPattern:41730,\n        CustomRendered:41985,\n        ExposureMode:41986,\n        WhiteBalance:41987,\n        DigitalZoomRatio:41988,\n        FocalLengthIn35mmFilm:41989,\n        SceneCaptureType:41990,\n        GainControl:41991,\n        Contrast:41992,\n        Saturation:41993,\n        Sharpness:41994,\n        DeviceSettingDescription:41995,\n        SubjectDistanceRange:41996,\n        ImageUniqueID:42016,\n        CameraOwnerName:42032,\n        BodySerialNumber:42033,\n        LensSpecification:42034,\n        LensMake:42035,\n        LensModel:42036,\n        LensSerialNumber:42037,\n        Gamma:42240,\n    };\n\n\n    that.GPSIFD = {\n        GPSVersionID:0,\n        GPSLatitudeRef:1,\n        GPSLatitude:2,\n        GPSLongitudeRef:3,\n        GPSLongitude:4,\n        GPSAltitudeRef:5,\n        GPSAltitude:6,\n        GPSTimeStamp:7,\n        GPSSatellites:8,\n        GPSStatus:9,\n        GPSMeasureMode:10,\n        GPSDOP:11,\n        GPSSpeedRef:12,\n        GPSSpeed:13,\n        GPSTrackRef:14,\n        GPSTrack:15,\n        GPSImgDirectionRef:16,\n        GPSImgDirection:17,\n        GPSMapDatum:18,\n        GPSDestLatitudeRef:19,\n        GPSDestLatitude:20,\n        GPSDestLongitudeRef:21,\n        GPSDestLongitude:22,\n        GPSDestBearingRef:23,\n        GPSDestBearing:24,\n        GPSDestDistanceRef:25,\n        GPSDestDistance:26,\n        GPSProcessingMethod:27,\n        GPSAreaInformation:28,\n        GPSDateStamp:29,\n        GPSDifferential:30,\n        GPSHPositioningError:31,\n    };\n\n\n    that.InteropIFD = {\n        InteroperabilityIndex:1,\n    };\n\n    that.GPSHelper = {\n        degToDmsRational:function (degFloat) {\n            var minFloat = degFloat % 1 * 60;\n            var secFloat = minFloat % 1 * 60;\n            var deg = Math.floor(degFloat);\n            var min = Math.floor(minFloat);\n            var sec = Math.round(secFloat * 100);\n\n            return [[deg, 1], [min, 1], [sec, 100]];\n        }\n    };\n    \n    \n    if (typeof exports !== 'undefined') {\n        if (typeof module !== 'undefined' && module.exports) {\n            exports = module.exports = that;\n        }\n        exports.piexif = that;\n    } else {\n        window.piexif = that;\n    }\n\n})();\n"
  },
  {
    "path": "static/bootstrap/plugins/bootstrap-fileinput/4.4.7/js/plugins/purify.js",
    "content": ";(function(factory) {\n    'use strict';\n    /* global window: false, define: false, module: false */\n    var root = typeof window === 'undefined' ? null : window;\n\n    if (typeof define === 'function' && define.amd) {\n        define(function(){ return factory(root); });\n    } else if (typeof module !== 'undefined') {\n        module.exports = factory(root);\n    } else {\n        root.DOMPurify = factory(root);\n    }\n}(function factory(window) {\n    'use strict';\n\n    var DOMPurify = function(window) {\n        return factory(window);\n    };\n\n    /**\n     * Version label, exposed for easier checks\n     * if DOMPurify is up to date or not\n     */\n    DOMPurify.version = '0.7.4';\n\n    if (!window || !window.document || window.document.nodeType !== 9) {\n        // not running in a browser, provide a factory function\n        // so that you can pass your own Window\n        DOMPurify.isSupported = false;\n        return DOMPurify;\n    }\n\n    var document = window.document;\n    var originalDocument = document;\n    var DocumentFragment = window.DocumentFragment;\n    var HTMLTemplateElement = window.HTMLTemplateElement;\n    var NodeFilter = window.NodeFilter;\n    var NamedNodeMap = window.NamedNodeMap || window.MozNamedAttrMap;\n    var Text = window.Text;\n    var Comment = window.Comment;\n    var DOMParser = window.DOMParser;\n\n    // As per issue #47, the web-components registry is inherited by a\n    // new document created via createHTMLDocument. As per the spec\n    // (http://w3c.github.io/webcomponents/spec/custom/#creating-and-passing-registries)\n    // a new empty registry is used when creating a template contents owner\n    // document, so we use that as our parent document to ensure nothing\n    // is inherited.\n    if (typeof HTMLTemplateElement === 'function') {\n        var template = document.createElement('template');\n        if (template.content && template.content.ownerDocument) {\n            document = template.content.ownerDocument;\n        }\n    }\n    var implementation = document.implementation;\n    var createNodeIterator = document.createNodeIterator;\n    var getElementsByTagName = document.getElementsByTagName;\n    var createDocumentFragment = document.createDocumentFragment;\n    var importNode = originalDocument.importNode;\n\n    var hooks = {};\n\n    /**\n     * Expose whether this browser supports running the full DOMPurify.\n     */\n    DOMPurify.isSupported =\n        typeof implementation.createHTMLDocument !== 'undefined' &&\n        document.documentMode !== 9;\n\n    /* Add properties to a lookup table */\n    var _addToSet = function(set, array) {\n        var l = array.length;\n        while (l--) {\n            if (typeof array[l] === 'string') {\n                array[l] = array[l].toLowerCase();\n            }\n            set[array[l]] = true;\n        }\n        return set;\n    };\n\n    /* Shallow clone an object */\n    var _cloneObj = function(object) {\n        var newObject = {};\n        var property;\n        for (property in object) {\n            if (object.hasOwnProperty(property)) {\n                newObject[property] = object[property];\n            }\n        }\n        return newObject;\n    };\n\n    /**\n     * We consider the elements and attributes below to be safe. Ideally\n     * don't add any new ones but feel free to remove unwanted ones.\n     */\n\n    /* allowed element names */\n    var ALLOWED_TAGS = null;\n    var DEFAULT_ALLOWED_TAGS = _addToSet({}, [\n\n        // HTML\n        'a','abbr','acronym','address','area','article','aside','audio','b',\n        'bdi','bdo','big','blink','blockquote','body','br','button','canvas',\n        'caption','center','cite','code','col','colgroup','content','data',\n        'datalist','dd','decorator','del','details','dfn','dir','div','dl','dt',\n        'element','em','fieldset','figcaption','figure','font','footer','form',\n        'h1','h2','h3','h4','h5','h6','head','header','hgroup','hr','html','i',\n        'img','input','ins','kbd','label','legend','li','main','map','mark',\n        'marquee','menu','menuitem','meter','nav','nobr','ol','optgroup',\n        'option','output','p','pre','progress','q','rp','rt','ruby','s','samp',\n        'section','select','shadow','small','source','spacer','span','strike',\n        'strong','style','sub','summary','sup','table','tbody','td','template',\n        'textarea','tfoot','th','thead','time','tr','track','tt','u','ul','var',\n        'video','wbr',\n\n        // SVG\n        'svg','altglyph','altglyphdef','altglyphitem','animatecolor',\n        'animatemotion','animatetransform','circle','clippath','defs','desc',\n        'ellipse','filter','font','g','glyph','glyphref','hkern','image','line',\n        'lineargradient','marker','mask','metadata','mpath','path','pattern',\n        'polygon','polyline','radialgradient','rect','stop','switch','symbol',\n        'text','textpath','title','tref','tspan','view','vkern',\n\n        // SVG Filters\n        'feBlend','feColorMatrix','feComponentTransfer','feComposite',\n        'feConvolveMatrix','feDiffuseLighting','feDisplacementMap',\n        'feFlood','feFuncA','feFuncB','feFuncG','feFuncR','feGaussianBlur',\n        'feMerge','feMergeNode','feMorphology','feOffset',\n        'feSpecularLighting','feTile','feTurbulence',\n\n        //MathML\n        'math','menclose','merror','mfenced','mfrac','mglyph','mi','mlabeledtr',\n        'mmuliscripts','mn','mo','mover','mpadded','mphantom','mroot','mrow',\n        'ms','mpspace','msqrt','mystyle','msub','msup','msubsup','mtable','mtd',\n        'mtext','mtr','munder','munderover',\n\n        //Text\n        '#text'\n    ]);\n\n    /* Allowed attribute names */\n    var ALLOWED_ATTR = null;\n    var DEFAULT_ALLOWED_ATTR = _addToSet({}, [\n\n        // HTML\n        'accept','action','align','alt','autocomplete','background','bgcolor',\n        'border','cellpadding','cellspacing','checked','cite','class','clear','color',\n        'cols','colspan','coords','datetime','default','dir','disabled',\n        'download','enctype','face','for','headers','height','hidden','high','href',\n        'hreflang','id','ismap','label','lang','list','loop', 'low','max',\n        'maxlength','media','method','min','multiple','name','noshade','novalidate',\n        'nowrap','open','optimum','pattern','placeholder','poster','preload','pubdate',\n        'radiogroup','readonly','rel','required','rev','reversed','rows',\n        'rowspan','spellcheck','scope','selected','shape','size','span',\n        'srclang','start','src','step','style','summary','tabindex','title',\n        'type','usemap','valign','value','width','xmlns',\n\n        // SVG\n        'accent-height','accumulate','additivive','alignment-baseline',\n        'ascent','attributename','attributetype','azimuth','basefrequency',\n        'baseline-shift','begin','bias','by','clip','clip-path','clip-rule',\n        'color','color-interpolation','color-interpolation-filters','color-profile',\n        'color-rendering','cx','cy','d','dx','dy','diffuseconstant','direction',\n        'display','divisor','dur','edgemode','elevation','end','fill','fill-opacity',\n        'fill-rule','filter','flood-color','flood-opacity','font-family','font-size',\n        'font-size-adjust','font-stretch','font-style','font-variant','font-weight',\n        'fx', 'fy','g1','g2','glyph-name','glyphref','gradientunits','gradienttransform',\n        'image-rendering','in','in2','k','k1','k2','k3','k4','kerning','keypoints',\n        'keysplines','keytimes','lengthadjust','letter-spacing','kernelmatrix',\n        'kernelunitlength','lighting-color','local','marker-end','marker-mid',\n        'marker-start','markerheight','markerunits','markerwidth','maskcontentunits',\n        'maskunits','max','mask','mode','min','numoctaves','offset','operator',\n        'opacity','order','orient','orientation','origin','overflow','paint-order',\n        'path','pathlength','patterncontentunits','patterntransform','patternunits',\n        'points','preservealpha','r','rx','ry','radius','refx','refy','repeatcount',\n        'repeatdur','restart','result','rotate','scale','seed','shape-rendering',\n        'specularconstant','specularexponent','spreadmethod','stddeviation','stitchtiles',\n        'stop-color','stop-opacity','stroke-dasharray','stroke-dashoffset','stroke-linecap',\n        'stroke-linejoin','stroke-miterlimit','stroke-opacity','stroke','stroke-width',\n        'surfacescale','targetx','targety','transform','text-anchor','text-decoration',\n        'text-rendering','textlength','u1','u2','unicode','values','viewbox',\n        'visibility','vert-adv-y','vert-origin-x','vert-origin-y','word-spacing',\n        'wrap','writing-mode','xchannelselector','ychannelselector','x','x1','x2',\n        'y','y1','y2','z','zoomandpan',\n\n        // MathML\n        'accent','accentunder','bevelled','close','columnsalign','columnlines',\n        'columnspan','denomalign','depth','display','displaystyle','fence',\n        'frame','largeop','length','linethickness','lspace','lquote',\n        'mathbackground','mathcolor','mathsize','mathvariant','maxsize',\n        'minsize','movablelimits','notation','numalign','open','rowalign',\n        'rowlines','rowspacing','rowspan','rspace','rquote','scriptlevel',\n        'scriptminsize','scriptsizemultiplier','selection','separator',\n        'separators','stretchy','subscriptshift','supscriptshift','symmetric',\n        'voffset',\n\n        // XML\n        'xlink:href','xml:id','xlink:title','xml:space','xmlns:xlink'\n    ]);\n\n    /* Explicitly forbidden tags (overrides ALLOWED_TAGS/ADD_TAGS) */\n    var FORBID_TAGS = null;\n\n    /* Explicitly forbidden attributes (overrides ALLOWED_ATTR/ADD_ATTR) */\n    var FORBID_ATTR = null;\n\n    /* Decide if custom data attributes are okay */\n    var ALLOW_DATA_ATTR = true;\n\n    /* Decide if unknown protocols are okay */\n    var ALLOW_UNKNOWN_PROTOCOLS = false;\n\n    /* Output should be safe for jQuery's $() factory? */\n    var SAFE_FOR_JQUERY = false;\n\n    /* Output should be safe for common template engines.\n     * This means, DOMPurify removes data attributes, mustaches and ERB\n     */\n    var SAFE_FOR_TEMPLATES = false;\n\n    /* Specify template detection regex for SAFE_FOR_TEMPLATES mode */\n    var MUSTACHE_EXPR = /\\{\\{[\\s\\S]*|[\\s\\S]*\\}\\}/gm;\n    var ERB_EXPR = /<%[\\s\\S]*|[\\s\\S]*%>/gm;\n\n    /* Decide if document with <html>... should be returned */\n    var WHOLE_DOCUMENT = false;\n\n    /* Decide if a DOM `HTMLBodyElement` should be returned, instead of a html string.\n     * If `WHOLE_DOCUMENT` is enabled a `HTMLHtmlElement` will be returned instead\n     */\n    var RETURN_DOM = false;\n\n    /* Decide if a DOM `DocumentFragment` should be returned, instead of a html string */\n    var RETURN_DOM_FRAGMENT = false;\n\n    /* If `RETURN_DOM` or `RETURN_DOM_FRAGMENT` is enabled, decide if the returned DOM\n     * `Node` is imported into the current `Document`. If this flag is not enabled the\n     * `Node` will belong (its ownerDocument) to a fresh `HTMLDocument`, created by\n     * DOMPurify. */\n    var RETURN_DOM_IMPORT = false;\n\n    /* Output should be free from DOM clobbering attacks? */\n    var SANITIZE_DOM = true;\n\n    /* Keep element content when removing element? */\n    var KEEP_CONTENT = true;\n\n    /* Tags to ignore content of when KEEP_CONTENT is true */\n    var FORBID_CONTENTS = _addToSet({}, [\n        'audio', 'head', 'math', 'script', 'style', 'svg', 'video'\n    ]);\n\n    /* Tags that are safe for data: URIs */\n    var DATA_URI_TAGS = _addToSet({}, [\n        'audio', 'video', 'img', 'source'\n    ]);\n\n    /* Attributes safe for values like \"javascript:\" */\n    var URI_SAFE_ATTRIBUTES = _addToSet({}, [\n        'alt','class','for','id','label','name','pattern','placeholder',\n        'summary','title','value','style','xmlns'\n    ]);\n\n    /* Keep a reference to config to pass to hooks */\n    var CONFIG = null;\n\n    /* Ideally, do not touch anything below this line */\n    /* ______________________________________________ */\n\n    var formElement = document.createElement('form');\n\n    /**\n     * _parseConfig\n     *\n     * @param  optional config literal\n     */\n    var _parseConfig = function(cfg) {\n        /* Shield configuration object from tampering */\n        if (typeof cfg !== 'object') {\n            cfg = {};\n        }\n\n        /* Set configuration parameters */\n        ALLOWED_TAGS = 'ALLOWED_TAGS' in cfg ?\n            _addToSet({}, cfg.ALLOWED_TAGS) : DEFAULT_ALLOWED_TAGS;\n        ALLOWED_ATTR = 'ALLOWED_ATTR' in cfg ?\n            _addToSet({}, cfg.ALLOWED_ATTR) : DEFAULT_ALLOWED_ATTR;\n        FORBID_TAGS = 'FORBID_TAGS' in cfg ?\n            _addToSet({}, cfg.FORBID_TAGS) : {};\n        FORBID_ATTR = 'FORBID_ATTR' in cfg ?\n            _addToSet({}, cfg.FORBID_ATTR) : {};\n        ALLOW_DATA_ATTR     = cfg.ALLOW_DATA_ATTR     !== false; // Default true\n        ALLOW_UNKNOWN_PROTOCOLS = cfg.ALLOW_UNKNOWN_PROTOCOLS || false; // Default false\n        SAFE_FOR_JQUERY     = cfg.SAFE_FOR_JQUERY     ||  false; // Default false\n        SAFE_FOR_TEMPLATES  = cfg.SAFE_FOR_TEMPLATES  ||  false; // Default false\n        WHOLE_DOCUMENT      = cfg.WHOLE_DOCUMENT      ||  false; // Default false\n        RETURN_DOM          = cfg.RETURN_DOM          ||  false; // Default false\n        RETURN_DOM_FRAGMENT = cfg.RETURN_DOM_FRAGMENT ||  false; // Default false\n        RETURN_DOM_IMPORT   = cfg.RETURN_DOM_IMPORT   ||  false; // Default false\n        SANITIZE_DOM        = cfg.SANITIZE_DOM        !== false; // Default true\n        KEEP_CONTENT        = cfg.KEEP_CONTENT        !== false; // Default true\n\n        if (SAFE_FOR_TEMPLATES) {\n            ALLOW_DATA_ATTR = false;\n        }\n\n        if (RETURN_DOM_FRAGMENT) {\n            RETURN_DOM = true;\n        }\n\n        /* Merge configuration parameters */\n        if (cfg.ADD_TAGS) {\n            if (ALLOWED_TAGS === DEFAULT_ALLOWED_TAGS) {\n                ALLOWED_TAGS = _cloneObj(ALLOWED_TAGS);\n            }\n            _addToSet(ALLOWED_TAGS, cfg.ADD_TAGS);\n        }\n        if (cfg.ADD_ATTR) {\n            if (ALLOWED_ATTR === DEFAULT_ALLOWED_ATTR) {\n                ALLOWED_ATTR = _cloneObj(ALLOWED_ATTR);\n            }\n            _addToSet(ALLOWED_ATTR, cfg.ADD_ATTR);\n        }\n\n        /* Add #text in case KEEP_CONTENT is set to true */\n        if (KEEP_CONTENT) { ALLOWED_TAGS['#text'] = true; }\n\n        // Prevent further manipulation of configuration.\n        // Not available in IE8, Safari 5, etc.\n        if (Object && 'freeze' in Object) { Object.freeze(cfg); }\n\n        CONFIG = cfg;\n    };\n\n   /**\n     * _forceRemove\n     *\n     * @param  a DOM node\n     */\n    var _forceRemove = function(node) {\n        try {\n            node.parentNode.removeChild(node);\n        } catch (e) {\n            node.outerHTML = '';\n        }\n    };\n\n   /**\n     * _initDocument\n     *\n     * @param  a string of dirty markup\n     * @return a DOM, filled with the dirty markup\n     */\n    var _initDocument = function(dirty) {\n        /* Create a HTML document using DOMParser */\n        var doc, body;\n        try {\n            doc = new DOMParser().parseFromString(dirty, 'text/html');\n        } catch (e) {}\n\n        /* Some browsers throw, some browsers return null for the code above\n           DOMParser with text/html support is only in very recent browsers. */\n        if (!doc) {\n            doc = implementation.createHTMLDocument('');\n            body = doc.body;\n            body.parentNode.removeChild(body.parentNode.firstElementChild);\n            body.outerHTML = dirty;\n        }\n\n        /* Work on whole document or just its body */\n        if (typeof doc.getElementsByTagName === 'function') {\n            return doc.getElementsByTagName(\n                WHOLE_DOCUMENT ? 'html' : 'body')[0];\n        }\n        return getElementsByTagName.call(doc,\n            WHOLE_DOCUMENT ? 'html' : 'body')[0];\n    };\n\n    /**\n     * _createIterator\n     *\n     * @param  document/fragment to create iterator for\n     * @return iterator instance\n     */\n    var _createIterator = function(root) {\n        return createNodeIterator.call(root.ownerDocument || root,\n            root,\n            NodeFilter.SHOW_ELEMENT\n            | NodeFilter.SHOW_COMMENT\n            | NodeFilter.SHOW_TEXT,\n            function() { return NodeFilter.FILTER_ACCEPT; },\n            false\n        );\n    };\n\n    /**\n     * _isClobbered\n     *\n     * @param  element to check for clobbering attacks\n     * @return true if clobbered, false if safe\n     */\n    var _isClobbered = function(elm) {\n        if (elm instanceof Text || elm instanceof Comment) {\n            return false;\n        }\n        if (  typeof elm.nodeName !== 'string'\n           || typeof elm.textContent !== 'string'\n           || typeof elm.removeChild !== 'function'\n           || !(elm.attributes instanceof NamedNodeMap)\n           || typeof elm.removeAttribute !== 'function'\n           || typeof elm.setAttribute !== 'function'\n        ) {\n            return true;\n        }\n        return false;\n    };\n\n    /**\n     * _sanitizeElements\n     *\n     * @protect nodeName\n     * @protect textContent\n     * @protect removeChild\n     *\n     * @param   node to check for permission to exist\n     * @return  true if node was killed, false if left alive\n     */\n    var _sanitizeElements = function(currentNode) {\n        var tagName, content;\n        /* Execute a hook if present */\n        _executeHook('beforeSanitizeElements', currentNode, null);\n\n        /* Check if element is clobbered or can clobber */\n        if (_isClobbered(currentNode)) {\n            _forceRemove(currentNode);\n            return true;\n        }\n\n        /* Now let's check the element's type and name */\n        tagName = currentNode.nodeName.toLowerCase();\n\n        /* Execute a hook if present */\n        _executeHook('uponSanitizeElement', currentNode, {\n            tagName: tagName\n        });\n\n        /* Remove element if anything forbids its presence */\n        if (!ALLOWED_TAGS[tagName] || FORBID_TAGS[tagName]) {\n            /* Keep content except for black-listed elements */\n            if (KEEP_CONTENT && !FORBID_CONTENTS[tagName]\n                    && typeof currentNode.insertAdjacentHTML === 'function') {\n                try {\n                    currentNode.insertAdjacentHTML('AfterEnd', currentNode.innerHTML);\n                } catch (e) {}\n            }\n            _forceRemove(currentNode);\n            return true;\n        }\n\n        /* Convert markup to cover jQuery behavior */\n        if (SAFE_FOR_JQUERY && !currentNode.firstElementChild &&\n                (!currentNode.content || !currentNode.content.firstElementChild)) {\n            currentNode.innerHTML = currentNode.textContent.replace(/</g, '&lt;');\n        }\n\n        /* Sanitize element content to be template-safe */\n        if (SAFE_FOR_TEMPLATES && currentNode.nodeType === 3) {\n            /* Get the element's text content */\n            content = currentNode.textContent;\n            content = content.replace(MUSTACHE_EXPR, ' ');\n            content = content.replace(ERB_EXPR, ' ');\n            currentNode.textContent = content;\n        }\n\n        /* Execute a hook if present */\n        _executeHook('afterSanitizeElements', currentNode, null);\n\n        return false;\n    };\n\n    var DATA_ATTR = /^data-[\\w.\\u00B7-\\uFFFF-]/;\n    var IS_ALLOWED_URI = /^(?:(?:(?:f|ht)tps?|mailto|tel):|[^a-z]|[a-z+.\\-]+(?:[^a-z+.\\-:]|$))/i;\n    var IS_SCRIPT_OR_DATA = /^(?:\\w+script|data):/i;\n    /* This needs to be extensive thanks to Webkit/Blink's behavior */\n    var ATTR_WHITESPACE = /[\\x00-\\x20\\xA0\\u1680\\u180E\\u2000-\\u2029\\u205f\\u3000]/g;\n\n    /**\n     * _sanitizeAttributes\n     *\n     * @protect attributes\n     * @protect nodeName\n     * @protect removeAttribute\n     * @protect setAttribute\n     *\n     * @param   node to sanitize\n     * @return  void\n     */\n    var _sanitizeAttributes = function(currentNode) {\n        var attr, name, value, lcName, idAttr, attributes, hookEvent, l;\n        /* Execute a hook if present */\n        _executeHook('beforeSanitizeAttributes', currentNode, null);\n\n        attributes = currentNode.attributes;\n\n        /* Check if we have attributes; if not we might have a text node */\n        if (!attributes) { return; }\n\n        hookEvent = {\n            attrName: '',\n            attrValue: '',\n            keepAttr: true\n        };\n        l = attributes.length;\n\n        /* Go backwards over all attributes; safely remove bad ones */\n        while (l--) {\n            attr = attributes[l];\n            name = attr.name;\n            value = attr.value;\n            lcName = name.toLowerCase();\n\n            /* Execute a hook if present */\n            hookEvent.attrName = lcName;\n            hookEvent.attrValue = value;\n            hookEvent.keepAttr = true;\n            _executeHook('uponSanitizeAttribute', currentNode, hookEvent );\n            value = hookEvent.attrValue;\n\n            /* Remove attribute */\n            // Safari (iOS + Mac), last tested v8.0.5, crashes if you try to\n            // remove a \"name\" attribute from an <img> tag that has an \"id\"\n            // attribute at the time.\n            if (lcName === 'name'  &&\n                    currentNode.nodeName === 'IMG' && attributes.id) {\n                idAttr = attributes.id;\n                attributes = Array.prototype.slice.apply(attributes);\n                currentNode.removeAttribute('id');\n                currentNode.removeAttribute(name);\n                if (attributes.indexOf(idAttr) > l) {\n                    currentNode.setAttribute('id', idAttr.value);\n                }\n            } else {\n                // This avoids a crash in Safari v9.0 with double-ids.\n                // The trick is to first set the id to be empty and then to\n                // remove the attriubute\n                if (name === 'id') {\n                    currentNode.setAttribute(name, '');\n                }\n                currentNode.removeAttribute(name);\n            }\n\n            /* Did the hooks approve of the attribute? */\n            if (!hookEvent.keepAttr) {\n                continue;\n            }\n\n            /* Make sure attribute cannot clobber */\n            if (SANITIZE_DOM &&\n                    (lcName === 'id' || lcName === 'name') &&\n                    (value in window || value in document || value in formElement)) {\n                continue;\n            }\n\n            /* Sanitize attribute content to be template-safe */\n            if (SAFE_FOR_TEMPLATES) {\n                value = value.replace(MUSTACHE_EXPR, ' ');\n                value = value.replace(ERB_EXPR, ' ');\n            }\n\n            if (\n                /* Check the name is permitted */\n                (ALLOWED_ATTR[lcName] && !FORBID_ATTR[lcName] && (\n                  /* Check no script, data or unknown possibly unsafe URI\n                     unless we know URI values are safe for that attribute */\n                  URI_SAFE_ATTRIBUTES[lcName] ||\n                  IS_ALLOWED_URI.test(value.replace(ATTR_WHITESPACE,'')) ||\n                  /* Keep image data URIs alive if src is allowed */\n                  (lcName === 'src' && value.indexOf('data:') === 0 &&\n                   DATA_URI_TAGS[currentNode.nodeName.toLowerCase()])\n                )) ||\n                /* Allow potentially valid data-* attributes:\n                 * At least one character after \"-\" (https://html.spec.whatwg.org/multipage/dom.html#embedding-custom-non-visible-data-with-the-data-*-attributes)\n                 * XML-compatible (https://html.spec.whatwg.org/multipage/infrastructure.html#xml-compatible and http://www.w3.org/TR/xml/#d0e804)\n                 * We don't need to check the value; it's always URI safe.\n                 */\n                 (ALLOW_DATA_ATTR && DATA_ATTR.test(lcName)) ||\n                 /* Allow unknown protocols:\n                  * This provides support for links that are handled by protocol handlers which may be unknown\n                  * ahead of time, e.g. fb:, spotify:\n                  */\n                 (ALLOW_UNKNOWN_PROTOCOLS && !IS_SCRIPT_OR_DATA.test(value.replace(ATTR_WHITESPACE,'')))\n            ) {\n                /* Handle invalid data-* attribute set by try-catching it */\n                try {\n                    currentNode.setAttribute(name, value);\n                } catch (e) {}\n            }\n        }\n\n        /* Execute a hook if present */\n        _executeHook('afterSanitizeAttributes', currentNode, null);\n    };\n\n    /**\n     * _sanitizeShadowDOM\n     *\n     * @param  fragment to iterate over recursively\n     * @return void\n     */\n    var _sanitizeShadowDOM = function(fragment) {\n        var shadowNode;\n        var shadowIterator = _createIterator(fragment);\n\n        /* Execute a hook if present */\n        _executeHook('beforeSanitizeShadowDOM', fragment, null);\n\n        while ( (shadowNode = shadowIterator.nextNode()) ) {\n            /* Execute a hook if present */\n            _executeHook('uponSanitizeShadowNode', shadowNode, null);\n\n            /* Sanitize tags and elements */\n            if (_sanitizeElements(shadowNode)) {\n                continue;\n            }\n\n            /* Deep shadow DOM detected */\n            if (shadowNode.content instanceof DocumentFragment) {\n                _sanitizeShadowDOM(shadowNode.content);\n            }\n\n            /* Check attributes, sanitize if necessary */\n            _sanitizeAttributes(shadowNode);\n        }\n\n        /* Execute a hook if present */\n        _executeHook('afterSanitizeShadowDOM', fragment, null);\n    };\n\n    /**\n     * _executeHook\n     * Execute user configurable hooks\n     *\n     * @param  {String} entryPoint  Name of the hook's entry point\n     * @param  {Node} currentNode\n     */\n    var _executeHook = function(entryPoint, currentNode, data) {\n        if (!hooks[entryPoint]) { return; }\n\n        hooks[entryPoint].forEach(function(hook) {\n            hook.call(DOMPurify, currentNode, data, CONFIG);\n        });\n    };\n\n    /**\n     * sanitize\n     * Public method providing core sanitation functionality\n     *\n     * @param {String} dirty string\n     * @param {Object} configuration object\n     */\n    DOMPurify.sanitize = function(dirty, cfg) {\n        var body, currentNode, oldNode, nodeIterator, returnNode;\n        /* Make sure we have a string to sanitize.\n           DO NOT return early, as this will return the wrong type if\n           the user has requested a DOM object rather than a string */\n        if (!dirty) {\n            dirty = '';\n        }\n\n        /* Stringify, in case dirty is an object */\n        if (typeof dirty !== 'string') {\n            if (typeof dirty.toString !== 'function') {\n                throw new TypeError('toString is not a function');\n            } else {\n                dirty = dirty.toString();\n            }\n        }\n\n        /* Check we can run. Otherwise fall back or ignore */\n        if (!DOMPurify.isSupported) {\n            if (typeof window.toStaticHTML === 'object'\n                || typeof window.toStaticHTML === 'function') {\n                return window.toStaticHTML(dirty);\n            }\n            return dirty;\n        }\n\n        /* Assign config vars */\n        _parseConfig(cfg);\n\n        /* Exit directly if we have nothing to do */\n        if (!RETURN_DOM && !WHOLE_DOCUMENT && dirty.indexOf('<') === -1) {\n            return dirty;\n        }\n\n        /* Initialize the document to work on */\n        body = _initDocument(dirty);\n\n        /* Check we have a DOM node from the data */\n        if (!body) {\n            return RETURN_DOM ? null : '';\n        }\n\n        /* Get node iterator */\n        nodeIterator = _createIterator(body);\n\n        /* Now start iterating over the created document */\n        while ( (currentNode = nodeIterator.nextNode()) ) {\n\n            /* Fix IE's strange behavior with manipulated textNodes #89 */\n            if (currentNode.nodeType === 3 && currentNode === oldNode) {\n                continue;\n            }\n\n            /* Sanitize tags and elements */\n            if (_sanitizeElements(currentNode)) {\n                continue;\n            }\n\n            /* Shadow DOM detected, sanitize it */\n            if (currentNode.content instanceof DocumentFragment) {\n                _sanitizeShadowDOM(currentNode.content);\n            }\n\n            /* Check attributes, sanitize if necessary */\n            _sanitizeAttributes(currentNode);\n\n            oldNode = currentNode;\n        }\n\n        /* Return sanitized string or DOM */\n        if (RETURN_DOM) {\n\n            if (RETURN_DOM_FRAGMENT) {\n                returnNode = createDocumentFragment.call(body.ownerDocument);\n\n                while (body.firstChild) {\n                    returnNode.appendChild(body.firstChild);\n                }\n            } else {\n                returnNode = body;\n            }\n\n            if (RETURN_DOM_IMPORT) {\n                /* adoptNode() is not used because internal state is not reset\n                   (e.g. the past names map of a HTMLFormElement), this is safe\n                   in theory but we would rather not risk another attack vector.\n                   The state that is cloned by importNode() is explicitly defined\n                   by the specs. */\n                returnNode = importNode.call(originalDocument, returnNode, true);\n            }\n\n            return returnNode;\n        }\n\n        return WHOLE_DOCUMENT ? body.outerHTML : body.innerHTML;\n    };\n\n    /**\n     * addHook\n     * Public method to add DOMPurify hooks\n     *\n     * @param {String} entryPoint\n     * @param {Function} hookFunction\n     */\n    DOMPurify.addHook = function(entryPoint, hookFunction) {\n        if (typeof hookFunction !== 'function') { return; }\n        hooks[entryPoint] = hooks[entryPoint] || [];\n        hooks[entryPoint].push(hookFunction);\n    };\n\n    /**\n     * removeHook\n     * Public method to remove a DOMPurify hook at a given entryPoint\n     * (pops it from the stack of hooks if more are present)\n     *\n     * @param {String} entryPoint\n     * @return void\n     */\n    DOMPurify.removeHook = function(entryPoint) {\n        if (hooks[entryPoint]) {\n            hooks[entryPoint].pop();\n        }\n    };\n\n    /**\n     * removeHooks\n     * Public method to remove all DOMPurify hooks at a given entryPoint\n     *\n     * @param  {String} entryPoint\n     * @return void\n     */\n    DOMPurify.removeHooks = function(entryPoint) {\n        if (hooks[entryPoint]) {\n            hooks[entryPoint] = [];\n        }\n    };\n\n    /**\n     * removeAllHooks\n     * Public method to remove all DOMPurify hooks\n     *\n     * @return void\n     */\n    DOMPurify.removeAllHooks = function() {\n        hooks = [];\n    };\n\n    return DOMPurify;\n}));\n"
  },
  {
    "path": "static/bootstrap/plugins/bootstrap-fileinput/4.4.7/js/plugins/sortable.js",
    "content": "/**!\n * KvSortable\n * @author\tRubaXa   <trash@rubaxa.org>\n * @license MIT\n *\n * Changed kvsortable plugin naming to prevent conflict with JQuery UI Sortable\n * @author Kartik Visweswaran\n */\n\n(function kvsortableModule(factory) {\n\t\"use strict\";\n\n\tif (typeof define === \"function\" && define.amd) {\n\t\tdefine(factory);\n\t}\n\telse if (typeof module != \"undefined\" && typeof module.exports != \"undefined\") {\n\t\tmodule.exports = factory();\n\t}\n\telse {\n\t\t/* jshint sub:true */\n\t\twindow[\"KvSortable\"] = factory();\n\t}\n})(function kvsortableFactory() {\n\t\"use strict\";\n\n\tif (typeof window === \"undefined\" || !window.document) {\n\t\treturn function kvsortableError() {\n\t\t\tthrow new Error(\"KvSortable.js requires a window with a document\");\n\t\t};\n\t}\n\n\tvar dragEl,\n\t\tparentEl,\n\t\tghostEl,\n\t\tcloneEl,\n\t\trootEl,\n\t\tnextEl,\n\t\tlastDownEl,\n\n\t\tscrollEl,\n\t\tscrollParentEl,\n\t\tscrollCustomFn,\n\n\t\tlastEl,\n\t\tlastCSS,\n\t\tlastParentCSS,\n\n\t\toldIndex,\n\t\tnewIndex,\n\n\t\tactiveGroup,\n\t\tputKvSortable,\n\n\t\tautoScroll = {},\n\n\t\ttapEvt,\n\t\ttouchEvt,\n\n\t\tmoved,\n\n\t\t/** @const */\n\t\tR_SPACE = /\\s+/g,\n\t\tR_FLOAT = /left|right|inline/,\n\n\t\texpando = 'KvSortable' + (new Date).getTime(),\n\n\t\twin = window,\n\t\tdocument = win.document,\n\t\tparseInt = win.parseInt,\n\t\tsetTimeout = win.setTimeout,\n\n\t\t$ = win.jQuery || win.Zepto,\n\t\tPolymer = win.Polymer,\n\n\t\tcaptureMode = false,\n\t\tpassiveMode = false,\n\n\t\tsupportDraggable = ('draggable' in document.createElement('div')),\n\t\tsupportCssPointerEvents = (function (el) {\n\t\t\t// false when IE11\n\t\t\tif (!!navigator.userAgent.match(/(?:Trident.*rv[ :]?11\\.|msie)/i)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tel = document.createElement('x');\n\t\t\tel.style.cssText = 'pointer-events:auto';\n\t\t\treturn el.style.pointerEvents === 'auto';\n\t\t})(),\n\n\t\t_silent = false,\n\n\t\tabs = Math.abs,\n\t\tmin = Math.min,\n\n\t\tsavedInputChecked = [],\n\t\ttouchDragOverListeners = [],\n\n\t\t_autoScroll = _throttle(function (/**Event*/evt, /**Object*/options, /**HTMLElement*/rootEl) {\n\t\t\t// Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=505521\n\t\t\tif (rootEl && options.scroll) {\n\t\t\t\tvar _this = rootEl[expando],\n\t\t\t\t\tel,\n\t\t\t\t\trect,\n\t\t\t\t\tsens = options.scrollSensitivity,\n\t\t\t\t\tspeed = options.scrollSpeed,\n\n\t\t\t\t\tx = evt.clientX,\n\t\t\t\t\ty = evt.clientY,\n\n\t\t\t\t\twinWidth = window.innerWidth,\n\t\t\t\t\twinHeight = window.innerHeight,\n\n\t\t\t\t\tvx,\n\t\t\t\t\tvy,\n\n\t\t\t\t\tscrollOffsetX,\n\t\t\t\t\tscrollOffsetY\n\t\t\t\t;\n\n\t\t\t\t// Delect scrollEl\n\t\t\t\tif (scrollParentEl !== rootEl) {\n\t\t\t\t\tscrollEl = options.scroll;\n\t\t\t\t\tscrollParentEl = rootEl;\n\t\t\t\t\tscrollCustomFn = options.scrollFn;\n\n\t\t\t\t\tif (scrollEl === true) {\n\t\t\t\t\t\tscrollEl = rootEl;\n\n\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\tif ((scrollEl.offsetWidth < scrollEl.scrollWidth) ||\n\t\t\t\t\t\t\t\t(scrollEl.offsetHeight < scrollEl.scrollHeight)\n\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t/* jshint boss:true */\n\t\t\t\t\t\t} while (scrollEl = scrollEl.parentNode);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (scrollEl) {\n\t\t\t\t\tel = scrollEl;\n\t\t\t\t\trect = scrollEl.getBoundingClientRect();\n\t\t\t\t\tvx = (abs(rect.right - x) <= sens) - (abs(rect.left - x) <= sens);\n\t\t\t\t\tvy = (abs(rect.bottom - y) <= sens) - (abs(rect.top - y) <= sens);\n\t\t\t\t}\n\n\n\t\t\t\tif (!(vx || vy)) {\n\t\t\t\t\tvx = (winWidth - x <= sens) - (x <= sens);\n\t\t\t\t\tvy = (winHeight - y <= sens) - (y <= sens);\n\n\t\t\t\t\t/* jshint expr:true */\n\t\t\t\t\t(vx || vy) && (el = win);\n\t\t\t\t}\n\n\n\t\t\t\tif (autoScroll.vx !== vx || autoScroll.vy !== vy || autoScroll.el !== el) {\n\t\t\t\t\tautoScroll.el = el;\n\t\t\t\t\tautoScroll.vx = vx;\n\t\t\t\t\tautoScroll.vy = vy;\n\n\t\t\t\t\tclearInterval(autoScroll.pid);\n\n\t\t\t\t\tif (el) {\n\t\t\t\t\t\tautoScroll.pid = setInterval(function () {\n\t\t\t\t\t\t\tscrollOffsetY = vy ? vy * speed : 0;\n\t\t\t\t\t\t\tscrollOffsetX = vx ? vx * speed : 0;\n\n\t\t\t\t\t\t\tif ('function' === typeof(scrollCustomFn)) {\n\t\t\t\t\t\t\t\treturn scrollCustomFn.call(_this, scrollOffsetX, scrollOffsetY, evt);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif (el === win) {\n\t\t\t\t\t\t\t\twin.scrollTo(win.pageXOffset + scrollOffsetX, win.pageYOffset + scrollOffsetY);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tel.scrollTop += scrollOffsetY;\n\t\t\t\t\t\t\t\tel.scrollLeft += scrollOffsetX;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}, 24);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}, 30),\n\n\t\t_prepareGroup = function (options) {\n\t\t\tfunction toFn(value, pull) {\n\t\t\t\tif (value === void 0 || value === true) {\n\t\t\t\t\tvalue = group.name;\n\t\t\t\t}\n\n\t\t\t\tif (typeof value === 'function') {\n\t\t\t\t\treturn value;\n\t\t\t\t} else {\n\t\t\t\t\treturn function (to, from) {\n\t\t\t\t\t\tvar fromGroup = from.options.group.name;\n\n\t\t\t\t\t\treturn pull\n\t\t\t\t\t\t\t? value\n\t\t\t\t\t\t\t: value && (value.join\n\t\t\t\t\t\t\t\t? value.indexOf(fromGroup) > -1\n\t\t\t\t\t\t\t\t: (fromGroup == value)\n\t\t\t\t\t\t\t);\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tvar group = {};\n\t\t\tvar originalGroup = options.group;\n\n\t\t\tif (!originalGroup || typeof originalGroup != 'object') {\n\t\t\t\toriginalGroup = {name: originalGroup};\n\t\t\t}\n\n\t\t\tgroup.name = originalGroup.name;\n\t\t\tgroup.checkPull = toFn(originalGroup.pull, true);\n\t\t\tgroup.checkPut = toFn(originalGroup.put);\n\t\t\tgroup.revertClone = originalGroup.revertClone;\n\n\t\t\toptions.group = group;\n\t\t}\n\t;\n\n\t// Detect support a passive mode\n\ttry {\n\t\twindow.addEventListener('test', null, Object.defineProperty({}, 'passive', {\n\t\t\tget: function () {\n\t\t\t\t// `false`, because everything starts to work incorrectly and instead of d'n'd,\n\t\t\t\t// begins the page has scrolled.\n\t\t\t\tpassiveMode = false;\n\t\t\t\tcaptureMode = {\n\t\t\t\t\tcapture: false,\n\t\t\t\t\tpassive: passiveMode\n\t\t\t\t};\n\t\t\t}\n\t\t}));\n\t} catch (err) {}\n\n\t/**\n\t * @class  KvSortable\n\t * @param  {HTMLElement}  el\n\t * @param  {Object}       [options]\n\t */\n\tfunction KvSortable(el, options) {\n\t\tif (!(el && el.nodeType && el.nodeType === 1)) {\n\t\t\tthrow 'KvSortable: `el` must be HTMLElement, and not ' + {}.toString.call(el);\n\t\t}\n\n\t\tthis.el = el; // root element\n\t\tthis.options = options = _extend({}, options);\n\n\n\t\t// Export instance\n\t\tel[expando] = this;\n\n\t\t// Default options\n\t\tvar defaults = {\n\t\t\tgroup: Math.random(),\n\t\t\tsort: true,\n\t\t\tdisabled: false,\n\t\t\tstore: null,\n\t\t\thandle: null,\n\t\t\tscroll: true,\n\t\t\tscrollSensitivity: 30,\n\t\t\tscrollSpeed: 10,\n\t\t\tdraggable: /[uo]l/i.test(el.nodeName) ? 'li' : '>*',\n\t\t\tghostClass: 'kvsortable-ghost',\n\t\t\tchosenClass: 'kvsortable-chosen',\n\t\t\tdragClass: 'kvsortable-drag',\n\t\t\tignore: 'a, img',\n\t\t\tfilter: null,\n\t\t\tpreventOnFilter: true,\n\t\t\tanimation: 0,\n\t\t\tsetData: function (dataTransfer, dragEl) {\n\t\t\t\tdataTransfer.setData('Text', dragEl.textContent);\n\t\t\t},\n\t\t\tdropBubble: false,\n\t\t\tdragoverBubble: false,\n\t\t\tdataIdAttr: 'data-id',\n\t\t\tdelay: 0,\n\t\t\tforceFallback: false,\n\t\t\tfallbackClass: 'kvsortable-fallback',\n\t\t\tfallbackOnBody: false,\n\t\t\tfallbackTolerance: 0,\n\t\t\tfallbackOffset: {x: 0, y: 0},\n\t\t\tsupportPointer: KvSortable.supportPointer !== false\n\t\t};\n\n\n\t\t// Set default options\n\t\tfor (var name in defaults) {\n\t\t\t!(name in options) && (options[name] = defaults[name]);\n\t\t}\n\n\t\t_prepareGroup(options);\n\n\t\t// Bind all private methods\n\t\tfor (var fn in this) {\n\t\t\tif (fn.charAt(0) === '_' && typeof this[fn] === 'function') {\n\t\t\t\tthis[fn] = this[fn].bind(this);\n\t\t\t}\n\t\t}\n\n\t\t// Setup drag mode\n\t\tthis.nativeDraggable = options.forceFallback ? false : supportDraggable;\n\n\t\t// Bind events\n\t\t_on(el, 'mousedown', this._onTapStart);\n\t\t_on(el, 'touchstart', this._onTapStart);\n\t\toptions.supportPointer && _on(el, 'pointerdown', this._onTapStart);\n\n\t\tif (this.nativeDraggable) {\n\t\t\t_on(el, 'dragover', this);\n\t\t\t_on(el, 'dragenter', this);\n\t\t}\n\n\t\ttouchDragOverListeners.push(this._onDragOver);\n\n\t\t// Restore sorting\n\t\toptions.store && this.sort(options.store.get(this));\n\t}\n\n\n\tKvSortable.prototype = /** @lends KvSortable.prototype */ {\n\t\tconstructor: KvSortable,\n\n\t\t_onTapStart: function (/** Event|TouchEvent */evt) {\n\t\t\tvar _this = this,\n\t\t\t\tel = this.el,\n\t\t\t\toptions = this.options,\n\t\t\t\tpreventOnFilter = options.preventOnFilter,\n\t\t\t\ttype = evt.type,\n\t\t\t\ttouch = evt.touches && evt.touches[0],\n\t\t\t\ttarget = (touch || evt).target,\n\t\t\t\toriginalTarget = evt.target.shadowRoot && (evt.path && evt.path[0]) || target,\n\t\t\t\tfilter = options.filter,\n\t\t\t\tstartIndex;\n\n\t\t\t_saveInputCheckedState(el);\n\n\n\t\t\t// Don't trigger start event when an element is been dragged, otherwise the evt.oldindex always wrong when set option.group.\n\t\t\tif (dragEl) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (/mousedown|pointerdown/.test(type) && evt.button !== 0 || options.disabled) {\n\t\t\t\treturn; // only left button or enabled\n\t\t\t}\n\n\t\t\t// cancel dnd if original target is content editable\n\t\t\tif (originalTarget.isContentEditable) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\ttarget = _closest(target, options.draggable, el);\n\n\t\t\tif (!target) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (lastDownEl === target) {\n\t\t\t\t// Ignoring duplicate `down`\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Get the index of the dragged element within its parent\n\t\t\tstartIndex = _index(target, options.draggable);\n\n\t\t\t// Check filter\n\t\t\tif (typeof filter === 'function') {\n\t\t\t\tif (filter.call(this, evt, target, this)) {\n\t\t\t\t\t_dispatchEvent(_this, originalTarget, 'filter', target, el, el, startIndex);\n\t\t\t\t\tpreventOnFilter && evt.preventDefault();\n\t\t\t\t\treturn; // cancel dnd\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if (filter) {\n\t\t\t\tfilter = filter.split(',').some(function (criteria) {\n\t\t\t\t\tcriteria = _closest(originalTarget, criteria.trim(), el);\n\n\t\t\t\t\tif (criteria) {\n\t\t\t\t\t\t_dispatchEvent(_this, criteria, 'filter', target, el, el, startIndex);\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\tif (filter) {\n\t\t\t\t\tpreventOnFilter && evt.preventDefault();\n\t\t\t\t\treturn; // cancel dnd\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (options.handle && !_closest(originalTarget, options.handle, el)) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Prepare `dragstart`\n\t\t\tthis._prepareDragStart(evt, touch, target, startIndex);\n\t\t},\n\n\t\t_prepareDragStart: function (/** Event */evt, /** Touch */touch, /** HTMLElement */target, /** Number */startIndex) {\n\t\t\tvar _this = this,\n\t\t\t\tel = _this.el,\n\t\t\t\toptions = _this.options,\n\t\t\t\townerDocument = el.ownerDocument,\n\t\t\t\tdragStartFn;\n\n\t\t\tif (target && !dragEl && (target.parentNode === el)) {\n\t\t\t\ttapEvt = evt;\n\n\t\t\t\trootEl = el;\n\t\t\t\tdragEl = target;\n\t\t\t\tparentEl = dragEl.parentNode;\n\t\t\t\tnextEl = dragEl.nextSibling;\n\t\t\t\tlastDownEl = target;\n\t\t\t\tactiveGroup = options.group;\n\t\t\t\toldIndex = startIndex;\n\n\t\t\t\tthis._lastX = (touch || evt).clientX;\n\t\t\t\tthis._lastY = (touch || evt).clientY;\n\n\t\t\t\tdragEl.style['will-change'] = 'all';\n\n\t\t\t\tdragStartFn = function () {\n\t\t\t\t\t// Delayed drag has been triggered\n\t\t\t\t\t// we can re-enable the events: touchmove/mousemove\n\t\t\t\t\t_this._disableDelayedDrag();\n\n\t\t\t\t\t// Make the element draggable\n\t\t\t\t\tdragEl.draggable = _this.nativeDraggable;\n\n\t\t\t\t\t// Chosen item\n\t\t\t\t\t_toggleClass(dragEl, options.chosenClass, true);\n\n\t\t\t\t\t// Bind the events: dragstart/dragend\n\t\t\t\t\t_this._triggerDragStart(evt, touch);\n\n\t\t\t\t\t// Drag start event\n\t\t\t\t\t_dispatchEvent(_this, rootEl, 'choose', dragEl, rootEl, rootEl, oldIndex);\n\t\t\t\t};\n\n\t\t\t\t// Disable \"draggable\"\n\t\t\t\toptions.ignore.split(',').forEach(function (criteria) {\n\t\t\t\t\t_find(dragEl, criteria.trim(), _disableDraggable);\n\t\t\t\t});\n\n\t\t\t\t_on(ownerDocument, 'mouseup', _this._onDrop);\n\t\t\t\t_on(ownerDocument, 'touchend', _this._onDrop);\n\t\t\t\t_on(ownerDocument, 'touchcancel', _this._onDrop);\n\t\t\t\t_on(ownerDocument, 'selectstart', _this);\n\t\t\t\toptions.supportPointer && _on(ownerDocument, 'pointercancel', _this._onDrop);\n\n\t\t\t\tif (options.delay) {\n\t\t\t\t\t// If the user moves the pointer or let go the click or touch\n\t\t\t\t\t// before the delay has been reached:\n\t\t\t\t\t// disable the delayed drag\n\t\t\t\t\t_on(ownerDocument, 'mouseup', _this._disableDelayedDrag);\n\t\t\t\t\t_on(ownerDocument, 'touchend', _this._disableDelayedDrag);\n\t\t\t\t\t_on(ownerDocument, 'touchcancel', _this._disableDelayedDrag);\n\t\t\t\t\t_on(ownerDocument, 'mousemove', _this._disableDelayedDrag);\n\t\t\t\t\t_on(ownerDocument, 'touchmove', _this._disableDelayedDrag);\n\t\t\t\t\toptions.supportPointer && _on(ownerDocument, 'pointermove', _this._disableDelayedDrag);\n\n\t\t\t\t\t_this._dragStartTimer = setTimeout(dragStartFn, options.delay);\n\t\t\t\t} else {\n\t\t\t\t\tdragStartFn();\n\t\t\t\t}\n\n\n\t\t\t}\n\t\t},\n\n\t\t_disableDelayedDrag: function () {\n\t\t\tvar ownerDocument = this.el.ownerDocument;\n\n\t\t\tclearTimeout(this._dragStartTimer);\n\t\t\t_off(ownerDocument, 'mouseup', this._disableDelayedDrag);\n\t\t\t_off(ownerDocument, 'touchend', this._disableDelayedDrag);\n\t\t\t_off(ownerDocument, 'touchcancel', this._disableDelayedDrag);\n\t\t\t_off(ownerDocument, 'mousemove', this._disableDelayedDrag);\n\t\t\t_off(ownerDocument, 'touchmove', this._disableDelayedDrag);\n\t\t\t_off(ownerDocument, 'pointermove', this._disableDelayedDrag);\n\t\t},\n\n\t\t_triggerDragStart: function (/** Event */evt, /** Touch */touch) {\n\t\t\ttouch = touch || (evt.pointerType == 'touch' ? evt : null);\n\n\t\t\tif (touch) {\n\t\t\t\t// Touch device support\n\t\t\t\ttapEvt = {\n\t\t\t\t\ttarget: dragEl,\n\t\t\t\t\tclientX: touch.clientX,\n\t\t\t\t\tclientY: touch.clientY\n\t\t\t\t};\n\n\t\t\t\tthis._onDragStart(tapEvt, 'touch');\n\t\t\t}\n\t\t\telse if (!this.nativeDraggable) {\n\t\t\t\tthis._onDragStart(tapEvt, true);\n\t\t\t}\n\t\t\telse {\n\t\t\t\t_on(dragEl, 'dragend', this);\n\t\t\t\t_on(rootEl, 'dragstart', this._onDragStart);\n\t\t\t}\n\n\t\t\ttry {\n\t\t\t\tif (document.selection) {\n\t\t\t\t\t// Timeout neccessary for IE9\n\t\t\t\t\t_nextTick(function () {\n\t\t\t\t\t\tdocument.selection.empty();\n\t\t\t\t\t});\n\t\t\t\t} else {\n\t\t\t\t\twindow.getSelection().removeAllRanges();\n\t\t\t\t}\n\t\t\t} catch (err) {\n\t\t\t}\n\t\t},\n\n\t\t_dragStarted: function () {\n\t\t\tif (rootEl && dragEl) {\n\t\t\t\tvar options = this.options;\n\n\t\t\t\t// Apply effect\n\t\t\t\t_toggleClass(dragEl, options.ghostClass, true);\n\t\t\t\t_toggleClass(dragEl, options.dragClass, false);\n\n\t\t\t\tKvSortable.active = this;\n\n\t\t\t\t// Drag start event\n\t\t\t\t_dispatchEvent(this, rootEl, 'start', dragEl, rootEl, rootEl, oldIndex);\n\t\t\t} else {\n\t\t\t\tthis._nulling();\n\t\t\t}\n\t\t},\n\n\t\t_emulateDragOver: function () {\n\t\t\tif (touchEvt) {\n\t\t\t\tif (this._lastX === touchEvt.clientX && this._lastY === touchEvt.clientY) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tthis._lastX = touchEvt.clientX;\n\t\t\t\tthis._lastY = touchEvt.clientY;\n\n\t\t\t\tif (!supportCssPointerEvents) {\n\t\t\t\t\t_css(ghostEl, 'display', 'none');\n\t\t\t\t}\n\n\t\t\t\tvar target = document.elementFromPoint(touchEvt.clientX, touchEvt.clientY);\n\t\t\t\tvar parent = target;\n\t\t\t\tvar i = touchDragOverListeners.length;\n\n\t\t\t\tif (target && target.shadowRoot) {\n\t\t\t\t\ttarget = target.shadowRoot.elementFromPoint(touchEvt.clientX, touchEvt.clientY);\n\t\t\t\t\tparent = target;\n\t\t\t\t}\n\n\t\t\t\tif (parent) {\n\t\t\t\t\tdo {\n\t\t\t\t\t\tif (parent[expando]) {\n\t\t\t\t\t\t\twhile (i--) {\n\t\t\t\t\t\t\t\ttouchDragOverListeners[i]({\n\t\t\t\t\t\t\t\t\tclientX: touchEvt.clientX,\n\t\t\t\t\t\t\t\t\tclientY: touchEvt.clientY,\n\t\t\t\t\t\t\t\t\ttarget: target,\n\t\t\t\t\t\t\t\t\trootEl: parent\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\ttarget = parent; // store last element\n\t\t\t\t\t}\n\t\t\t\t\t/* jshint boss:true */\n\t\t\t\t\twhile (parent = parent.parentNode);\n\t\t\t\t}\n\n\t\t\t\tif (!supportCssPointerEvents) {\n\t\t\t\t\t_css(ghostEl, 'display', '');\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\n\n\t\t_onTouchMove: function (/**TouchEvent*/evt) {\n\t\t\tif (tapEvt) {\n\t\t\t\tvar\toptions = this.options,\n\t\t\t\t\tfallbackTolerance = options.fallbackTolerance,\n\t\t\t\t\tfallbackOffset = options.fallbackOffset,\n\t\t\t\t\ttouch = evt.touches ? evt.touches[0] : evt,\n\t\t\t\t\tdx = (touch.clientX - tapEvt.clientX) + fallbackOffset.x,\n\t\t\t\t\tdy = (touch.clientY - tapEvt.clientY) + fallbackOffset.y,\n\t\t\t\t\ttranslate3d = evt.touches ? 'translate3d(' + dx + 'px,' + dy + 'px,0)' : 'translate(' + dx + 'px,' + dy + 'px)';\n\n\t\t\t\t// only set the status to dragging, when we are actually dragging\n\t\t\t\tif (!KvSortable.active) {\n\t\t\t\t\tif (fallbackTolerance &&\n\t\t\t\t\t\tmin(abs(touch.clientX - this._lastX), abs(touch.clientY - this._lastY)) < fallbackTolerance\n\t\t\t\t\t) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tthis._dragStarted();\n\t\t\t\t}\n\n\t\t\t\t// as well as creating the ghost element on the document body\n\t\t\t\tthis._appendGhost();\n\n\t\t\t\tmoved = true;\n\t\t\t\ttouchEvt = touch;\n\n\t\t\t\t_css(ghostEl, 'webkitTransform', translate3d);\n\t\t\t\t_css(ghostEl, 'mozTransform', translate3d);\n\t\t\t\t_css(ghostEl, 'msTransform', translate3d);\n\t\t\t\t_css(ghostEl, 'transform', translate3d);\n\n\t\t\t\tevt.preventDefault();\n\t\t\t}\n\t\t},\n\n\t\t_appendGhost: function () {\n\t\t\tif (!ghostEl) {\n\t\t\t\tvar rect = dragEl.getBoundingClientRect(),\n\t\t\t\t\tcss = _css(dragEl),\n\t\t\t\t\toptions = this.options,\n\t\t\t\t\tghostRect;\n\n\t\t\t\tghostEl = dragEl.cloneNode(true);\n\n\t\t\t\t_toggleClass(ghostEl, options.ghostClass, false);\n\t\t\t\t_toggleClass(ghostEl, options.fallbackClass, true);\n\t\t\t\t_toggleClass(ghostEl, options.dragClass, true);\n\n\t\t\t\t_css(ghostEl, 'top', rect.top - parseInt(css.marginTop, 10));\n\t\t\t\t_css(ghostEl, 'left', rect.left - parseInt(css.marginLeft, 10));\n\t\t\t\t_css(ghostEl, 'width', rect.width);\n\t\t\t\t_css(ghostEl, 'height', rect.height);\n\t\t\t\t_css(ghostEl, 'opacity', '0.8');\n\t\t\t\t_css(ghostEl, 'position', 'fixed');\n\t\t\t\t_css(ghostEl, 'zIndex', '100000');\n\t\t\t\t_css(ghostEl, 'pointerEvents', 'none');\n\n\t\t\t\toptions.fallbackOnBody && document.body.appendChild(ghostEl) || rootEl.appendChild(ghostEl);\n\n\t\t\t\t// Fixing dimensions.\n\t\t\t\tghostRect = ghostEl.getBoundingClientRect();\n\t\t\t\t_css(ghostEl, 'width', rect.width * 2 - ghostRect.width);\n\t\t\t\t_css(ghostEl, 'height', rect.height * 2 - ghostRect.height);\n\t\t\t}\n\t\t},\n\n\t\t_onDragStart: function (/**Event*/evt, /**boolean*/useFallback) {\n\t\t\tvar _this = this;\n\t\t\tvar dataTransfer = evt.dataTransfer;\n\t\t\tvar options = _this.options;\n\n\t\t\t_this._offUpEvents();\n\n\t\t\tif (activeGroup.checkPull(_this, _this, dragEl, evt)) {\n\t\t\t\tcloneEl = _clone(dragEl);\n\n\t\t\t\tcloneEl.draggable = false;\n\t\t\t\tcloneEl.style['will-change'] = '';\n\n\t\t\t\t_css(cloneEl, 'display', 'none');\n\t\t\t\t_toggleClass(cloneEl, _this.options.chosenClass, false);\n\n\t\t\t\t// #1143: IFrame support workaround\n\t\t\t\t_this._cloneId = _nextTick(function () {\n\t\t\t\t\trootEl.insertBefore(cloneEl, dragEl);\n\t\t\t\t\t_dispatchEvent(_this, rootEl, 'clone', dragEl);\n\t\t\t\t});\n\t\t\t}\n\n\t\t\t_toggleClass(dragEl, options.dragClass, true);\n\n\t\t\tif (useFallback) {\n\t\t\t\tif (useFallback === 'touch') {\n\t\t\t\t\t// Bind touch events\n\t\t\t\t\t_on(document, 'touchmove', _this._onTouchMove);\n\t\t\t\t\t_on(document, 'touchend', _this._onDrop);\n\t\t\t\t\t_on(document, 'touchcancel', _this._onDrop);\n\n\t\t\t\t\tif (options.supportPointer) {\n\t\t\t\t\t\t_on(document, 'pointermove', _this._onTouchMove);\n\t\t\t\t\t\t_on(document, 'pointerup', _this._onDrop);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t// Old brwoser\n\t\t\t\t\t_on(document, 'mousemove', _this._onTouchMove);\n\t\t\t\t\t_on(document, 'mouseup', _this._onDrop);\n\t\t\t\t}\n\n\t\t\t\t_this._loopId = setInterval(_this._emulateDragOver, 50);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif (dataTransfer) {\n\t\t\t\t\tdataTransfer.effectAllowed = 'move';\n\t\t\t\t\toptions.setData && options.setData.call(_this, dataTransfer, dragEl);\n\t\t\t\t}\n\n\t\t\t\t_on(document, 'drop', _this);\n\n\t\t\t\t// #1143: Бывает элемент с IFrame внутри блокирует `drop`,\n\t\t\t\t// поэтому если вызвался `mouseover`, значит надо отменять весь d'n'd.\n\t\t\t\t// Breaking Chrome 62+\n\t\t\t\t// _on(document, 'mouseover', _this);\n\n\t\t\t\t_this._dragStartId = _nextTick(_this._dragStarted);\n\t\t\t}\n\t\t},\n\n\t\t_onDragOver: function (/**Event*/evt) {\n\t\t\tvar el = this.el,\n\t\t\t\ttarget,\n\t\t\t\tdragRect,\n\t\t\t\ttargetRect,\n\t\t\t\trevert,\n\t\t\t\toptions = this.options,\n\t\t\t\tgroup = options.group,\n\t\t\t\tactiveKvSortable = KvSortable.active,\n\t\t\t\tisOwner = (activeGroup === group),\n\t\t\t\tisMovingBetweenKvSortable = false,\n\t\t\t\tcanSort = options.sort;\n\n\t\t\tif (evt.preventDefault !== void 0) {\n\t\t\t\tevt.preventDefault();\n\t\t\t\t!options.dragoverBubble && evt.stopPropagation();\n\t\t\t}\n\n\t\t\tif (dragEl.animated) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tmoved = true;\n\n\t\t\tif (activeKvSortable && !options.disabled &&\n\t\t\t\t(isOwner\n\t\t\t\t\t? canSort || (revert = !rootEl.contains(dragEl)) // Reverting item into the original list\n\t\t\t\t\t: (\n\t\t\t\t\t\tputKvSortable === this ||\n\t\t\t\t\t\t(\n\t\t\t\t\t\t\t(activeKvSortable.lastPullMode = activeGroup.checkPull(this, activeKvSortable, dragEl, evt)) &&\n\t\t\t\t\t\t\tgroup.checkPut(this, activeKvSortable, dragEl, evt)\n\t\t\t\t\t\t)\n\t\t\t\t\t)\n\t\t\t\t) &&\n\t\t\t\t(evt.rootEl === void 0 || evt.rootEl === this.el) // touch fallback\n\t\t\t) {\n\t\t\t\t// Smart auto-scrolling\n\t\t\t\t_autoScroll(evt, options, this.el);\n\n\t\t\t\tif (_silent) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\ttarget = _closest(evt.target, options.draggable, el);\n\t\t\t\tdragRect = dragEl.getBoundingClientRect();\n\n\t\t\t\tif (putKvSortable !== this) {\n\t\t\t\t\tputKvSortable = this;\n\t\t\t\t\tisMovingBetweenKvSortable = true;\n\t\t\t\t}\n\n\t\t\t\tif (revert) {\n\t\t\t\t\t_cloneHide(activeKvSortable, true);\n\t\t\t\t\tparentEl = rootEl; // actualization\n\n\t\t\t\t\tif (cloneEl || nextEl) {\n\t\t\t\t\t\trootEl.insertBefore(dragEl, cloneEl || nextEl);\n\t\t\t\t\t}\n\t\t\t\t\telse if (!canSort) {\n\t\t\t\t\t\trootEl.appendChild(dragEl);\n\t\t\t\t\t}\n\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\n\t\t\t\tif ((el.children.length === 0) || (el.children[0] === ghostEl) ||\n\t\t\t\t\t(el === evt.target) && (_ghostIsLast(el, evt))\n\t\t\t\t) {\n\t\t\t\t\t//assign target only if condition is true\n\t\t\t\t\tif (el.children.length !== 0 && el.children[0] !== ghostEl && el === evt.target) {\n\t\t\t\t\t\ttarget = el.lastElementChild;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (target) {\n\t\t\t\t\t\tif (target.animated) {\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\ttargetRect = target.getBoundingClientRect();\n\t\t\t\t\t}\n\n\t\t\t\t\t_cloneHide(activeKvSortable, isOwner);\n\n\t\t\t\t\tif (_onMove(rootEl, el, dragEl, dragRect, target, targetRect, evt) !== false) {\n\t\t\t\t\t\tif (!dragEl.contains(el)) {\n\t\t\t\t\t\t\tel.appendChild(dragEl);\n\t\t\t\t\t\t\tparentEl = el; // actualization\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tthis._animate(dragRect, dragEl);\n\t\t\t\t\t\ttarget && this._animate(targetRect, target);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if (target && !target.animated && target !== dragEl && (target.parentNode[expando] !== void 0)) {\n\t\t\t\t\tif (lastEl !== target) {\n\t\t\t\t\t\tlastEl = target;\n\t\t\t\t\t\tlastCSS = _css(target);\n\t\t\t\t\t\tlastParentCSS = _css(target.parentNode);\n\t\t\t\t\t}\n\n\t\t\t\t\ttargetRect = target.getBoundingClientRect();\n\n\t\t\t\t\tvar width = targetRect.right - targetRect.left,\n\t\t\t\t\t\theight = targetRect.bottom - targetRect.top,\n\t\t\t\t\t\tfloating = R_FLOAT.test(lastCSS.cssFloat + lastCSS.display)\n\t\t\t\t\t\t\t|| (lastParentCSS.display == 'flex' && lastParentCSS['flex-direction'].indexOf('row') === 0),\n\t\t\t\t\t\tisWide = (target.offsetWidth > dragEl.offsetWidth),\n\t\t\t\t\t\tisLong = (target.offsetHeight > dragEl.offsetHeight),\n\t\t\t\t\t\thalfway = (floating ? (evt.clientX - targetRect.left) / width : (evt.clientY - targetRect.top) / height) > 0.5,\n\t\t\t\t\t\tnextSibling = target.nextElementSibling,\n\t\t\t\t\t\tafter = false\n\t\t\t\t\t;\n\n\t\t\t\t\tif (floating) {\n\t\t\t\t\t\tvar elTop = dragEl.offsetTop,\n\t\t\t\t\t\t\ttgTop = target.offsetTop;\n\n\t\t\t\t\t\tif (elTop === tgTop) {\n\t\t\t\t\t\t\tafter = (target.previousElementSibling === dragEl) && !isWide || halfway && isWide;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if (target.previousElementSibling === dragEl || dragEl.previousElementSibling === target) {\n\t\t\t\t\t\t\tafter = (evt.clientY - targetRect.top) / height > 0.5;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tafter = tgTop > elTop;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t} else if (!isMovingBetweenKvSortable) {\n\t\t\t\t\t\tafter = (nextSibling !== dragEl) && !isLong || halfway && isLong;\n\t\t\t\t\t}\n\n\t\t\t\t\tvar moveVector = _onMove(rootEl, el, dragEl, dragRect, target, targetRect, evt, after);\n\n\t\t\t\t\tif (moveVector !== false) {\n\t\t\t\t\t\tif (moveVector === 1 || moveVector === -1) {\n\t\t\t\t\t\t\tafter = (moveVector === 1);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t_silent = true;\n\t\t\t\t\t\tsetTimeout(_unsilent, 30);\n\n\t\t\t\t\t\t_cloneHide(activeKvSortable, isOwner);\n\n\t\t\t\t\t\tif (!dragEl.contains(el)) {\n\t\t\t\t\t\t\tif (after && !nextSibling) {\n\t\t\t\t\t\t\t\tel.appendChild(dragEl);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\ttarget.parentNode.insertBefore(dragEl, after ? nextSibling : target);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tparentEl = dragEl.parentNode; // actualization\n\n\t\t\t\t\t\tthis._animate(dragRect, dragEl);\n\t\t\t\t\t\tthis._animate(targetRect, target);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\n\t\t_animate: function (prevRect, target) {\n\t\t\tvar ms = this.options.animation;\n\n\t\t\tif (ms) {\n\t\t\t\tvar currentRect = target.getBoundingClientRect();\n\n\t\t\t\tif (prevRect.nodeType === 1) {\n\t\t\t\t\tprevRect = prevRect.getBoundingClientRect();\n\t\t\t\t}\n\n\t\t\t\t_css(target, 'transition', 'none');\n\t\t\t\t_css(target, 'transform', 'translate3d('\n\t\t\t\t\t+ (prevRect.left - currentRect.left) + 'px,'\n\t\t\t\t\t+ (prevRect.top - currentRect.top) + 'px,0)'\n\t\t\t\t);\n\n\t\t\t\ttarget.offsetWidth; // repaint\n\n\t\t\t\t_css(target, 'transition', 'all ' + ms + 'ms');\n\t\t\t\t_css(target, 'transform', 'translate3d(0,0,0)');\n\n\t\t\t\tclearTimeout(target.animated);\n\t\t\t\ttarget.animated = setTimeout(function () {\n\t\t\t\t\t_css(target, 'transition', '');\n\t\t\t\t\t_css(target, 'transform', '');\n\t\t\t\t\ttarget.animated = false;\n\t\t\t\t}, ms);\n\t\t\t}\n\t\t},\n\n\t\t_offUpEvents: function () {\n\t\t\tvar ownerDocument = this.el.ownerDocument;\n\n\t\t\t_off(document, 'touchmove', this._onTouchMove);\n\t\t\t_off(document, 'pointermove', this._onTouchMove);\n\t\t\t_off(ownerDocument, 'mouseup', this._onDrop);\n\t\t\t_off(ownerDocument, 'touchend', this._onDrop);\n\t\t\t_off(ownerDocument, 'pointerup', this._onDrop);\n\t\t\t_off(ownerDocument, 'touchcancel', this._onDrop);\n\t\t\t_off(ownerDocument, 'pointercancel', this._onDrop);\n\t\t\t_off(ownerDocument, 'selectstart', this);\n\t\t},\n\n\t\t_onDrop: function (/**Event*/evt) {\n\t\t\tvar el = this.el,\n\t\t\t\toptions = this.options;\n\n\t\t\tclearInterval(this._loopId);\n\t\t\tclearInterval(autoScroll.pid);\n\t\t\tclearTimeout(this._dragStartTimer);\n\n\t\t\t_cancelNextTick(this._cloneId);\n\t\t\t_cancelNextTick(this._dragStartId);\n\n\t\t\t// Unbind events\n\t\t\t_off(document, 'mouseover', this);\n\t\t\t_off(document, 'mousemove', this._onTouchMove);\n\n\t\t\tif (this.nativeDraggable) {\n\t\t\t\t_off(document, 'drop', this);\n\t\t\t\t_off(el, 'dragstart', this._onDragStart);\n\t\t\t}\n\n\t\t\tthis._offUpEvents();\n\n\t\t\tif (evt) {\n\t\t\t\tif (moved) {\n\t\t\t\t\tevt.preventDefault();\n\t\t\t\t\t!options.dropBubble && evt.stopPropagation();\n\t\t\t\t}\n\n\t\t\t\tghostEl && ghostEl.parentNode && ghostEl.parentNode.removeChild(ghostEl);\n\n\t\t\t\tif (rootEl === parentEl || KvSortable.active.lastPullMode !== 'clone') {\n\t\t\t\t\t// Remove clone\n\t\t\t\t\tcloneEl && cloneEl.parentNode && cloneEl.parentNode.removeChild(cloneEl);\n\t\t\t\t}\n\n\t\t\t\tif (dragEl) {\n\t\t\t\t\tif (this.nativeDraggable) {\n\t\t\t\t\t\t_off(dragEl, 'dragend', this);\n\t\t\t\t\t}\n\n\t\t\t\t\t_disableDraggable(dragEl);\n\t\t\t\t\tdragEl.style['will-change'] = '';\n\n\t\t\t\t\t// Remove class's\n\t\t\t\t\t_toggleClass(dragEl, this.options.ghostClass, false);\n\t\t\t\t\t_toggleClass(dragEl, this.options.chosenClass, false);\n\n\t\t\t\t\t// Drag stop event\n\t\t\t\t\t_dispatchEvent(this, rootEl, 'unchoose', dragEl, parentEl, rootEl, oldIndex);\n\n\t\t\t\t\tif (rootEl !== parentEl) {\n\t\t\t\t\t\tnewIndex = _index(dragEl, options.draggable);\n\n\t\t\t\t\t\tif (newIndex >= 0) {\n\t\t\t\t\t\t\t// Add event\n\t\t\t\t\t\t\t_dispatchEvent(null, parentEl, 'add', dragEl, parentEl, rootEl, oldIndex, newIndex);\n\n\t\t\t\t\t\t\t// Remove event\n\t\t\t\t\t\t\t_dispatchEvent(this, rootEl, 'remove', dragEl, parentEl, rootEl, oldIndex, newIndex);\n\n\t\t\t\t\t\t\t// drag from one list and drop into another\n\t\t\t\t\t\t\t_dispatchEvent(null, parentEl, 'sort', dragEl, parentEl, rootEl, oldIndex, newIndex);\n\t\t\t\t\t\t\t_dispatchEvent(this, rootEl, 'sort', dragEl, parentEl, rootEl, oldIndex, newIndex);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tif (dragEl.nextSibling !== nextEl) {\n\t\t\t\t\t\t\t// Get the index of the dragged element within its parent\n\t\t\t\t\t\t\tnewIndex = _index(dragEl, options.draggable);\n\n\t\t\t\t\t\t\tif (newIndex >= 0) {\n\t\t\t\t\t\t\t\t// drag & drop within the same list\n\t\t\t\t\t\t\t\t_dispatchEvent(this, rootEl, 'update', dragEl, parentEl, rootEl, oldIndex, newIndex);\n\t\t\t\t\t\t\t\t_dispatchEvent(this, rootEl, 'sort', dragEl, parentEl, rootEl, oldIndex, newIndex);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tif (KvSortable.active) {\n\t\t\t\t\t\t/* jshint eqnull:true */\n\t\t\t\t\t\tif (newIndex == null || newIndex === -1) {\n\t\t\t\t\t\t\tnewIndex = oldIndex;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t_dispatchEvent(this, rootEl, 'end', dragEl, parentEl, rootEl, oldIndex, newIndex);\n\n\t\t\t\t\t\t// Save sorting\n\t\t\t\t\t\tthis.save();\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tthis._nulling();\n\t\t},\n\n\t\t_nulling: function() {\n\t\t\trootEl =\n\t\t\tdragEl =\n\t\t\tparentEl =\n\t\t\tghostEl =\n\t\t\tnextEl =\n\t\t\tcloneEl =\n\t\t\tlastDownEl =\n\n\t\t\tscrollEl =\n\t\t\tscrollParentEl =\n\n\t\t\ttapEvt =\n\t\t\ttouchEvt =\n\n\t\t\tmoved =\n\t\t\tnewIndex =\n\n\t\t\tlastEl =\n\t\t\tlastCSS =\n\n\t\t\tputKvSortable =\n\t\t\tactiveGroup =\n\t\t\tKvSortable.active = null;\n\n\t\t\tsavedInputChecked.forEach(function (el) {\n\t\t\t\tel.checked = true;\n\t\t\t});\n\t\t\tsavedInputChecked.length = 0;\n\t\t},\n\n\t\thandleEvent: function (/**Event*/evt) {\n\t\t\tswitch (evt.type) {\n\t\t\t\tcase 'drop':\n\t\t\t\tcase 'dragend':\n\t\t\t\t\tthis._onDrop(evt);\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'dragover':\n\t\t\t\tcase 'dragenter':\n\t\t\t\t\tif (dragEl) {\n\t\t\t\t\t\tthis._onDragOver(evt);\n\t\t\t\t\t\t_globalDragOver(evt);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'mouseover':\n\t\t\t\t\tthis._onDrop(evt);\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'selectstart':\n\t\t\t\t\tevt.preventDefault();\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t},\n\n\n\t\t/**\n\t\t * Serializes the item into an array of string.\n\t\t * @returns {String[]}\n\t\t */\n\t\ttoArray: function () {\n\t\t\tvar order = [],\n\t\t\t\tel,\n\t\t\t\tchildren = this.el.children,\n\t\t\t\ti = 0,\n\t\t\t\tn = children.length,\n\t\t\t\toptions = this.options;\n\n\t\t\tfor (; i < n; i++) {\n\t\t\t\tel = children[i];\n\t\t\t\tif (_closest(el, options.draggable, this.el)) {\n\t\t\t\t\torder.push(el.getAttribute(options.dataIdAttr) || _generateId(el));\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn order;\n\t\t},\n\n\n\t\t/**\n\t\t * Sorts the elements according to the array.\n\t\t * @param  {String[]}  order  order of the items\n\t\t */\n\t\tsort: function (order) {\n\t\t\tvar items = {}, rootEl = this.el;\n\n\t\t\tthis.toArray().forEach(function (id, i) {\n\t\t\t\tvar el = rootEl.children[i];\n\n\t\t\t\tif (_closest(el, this.options.draggable, rootEl)) {\n\t\t\t\t\titems[id] = el;\n\t\t\t\t}\n\t\t\t}, this);\n\n\t\t\torder.forEach(function (id) {\n\t\t\t\tif (items[id]) {\n\t\t\t\t\trootEl.removeChild(items[id]);\n\t\t\t\t\trootEl.appendChild(items[id]);\n\t\t\t\t}\n\t\t\t});\n\t\t},\n\n\n\t\t/**\n\t\t * Save the current sorting\n\t\t */\n\t\tsave: function () {\n\t\t\tvar store = this.options.store;\n\t\t\tstore && store.set(this);\n\t\t},\n\n\n\t\t/**\n\t\t * For each element in the set, get the first element that matches the selector by testing the element itself and traversing up through its ancestors in the DOM tree.\n\t\t * @param   {HTMLElement}  el\n\t\t * @param   {String}       [selector]  default: `options.draggable`\n\t\t * @returns {HTMLElement|null}\n\t\t */\n\t\tclosest: function (el, selector) {\n\t\t\treturn _closest(el, selector || this.options.draggable, this.el);\n\t\t},\n\n\n\t\t/**\n\t\t * Set/get option\n\t\t * @param   {string} name\n\t\t * @param   {*}      [value]\n\t\t * @returns {*}\n\t\t */\n\t\toption: function (name, value) {\n\t\t\tvar options = this.options;\n\n\t\t\tif (value === void 0) {\n\t\t\t\treturn options[name];\n\t\t\t} else {\n\t\t\t\toptions[name] = value;\n\n\t\t\t\tif (name === 'group') {\n\t\t\t\t\t_prepareGroup(options);\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\n\n\t\t/**\n\t\t * Destroy\n\t\t */\n\t\tdestroy: function () {\n\t\t\tvar el = this.el;\n\n\t\t\tel[expando] = null;\n\n\t\t\t_off(el, 'mousedown', this._onTapStart);\n\t\t\t_off(el, 'touchstart', this._onTapStart);\n\t\t\t_off(el, 'pointerdown', this._onTapStart);\n\n\t\t\tif (this.nativeDraggable) {\n\t\t\t\t_off(el, 'dragover', this);\n\t\t\t\t_off(el, 'dragenter', this);\n\t\t\t}\n\n\t\t\t// Remove draggable attributes\n\t\t\tArray.prototype.forEach.call(el.querySelectorAll('[draggable]'), function (el) {\n\t\t\t\tel.removeAttribute('draggable');\n\t\t\t});\n\n\t\t\ttouchDragOverListeners.splice(touchDragOverListeners.indexOf(this._onDragOver), 1);\n\n\t\t\tthis._onDrop();\n\n\t\t\tthis.el = el = null;\n\t\t}\n\t};\n\n\n\tfunction _cloneHide(kvsortable, state) {\n\t\tif (kvsortable.lastPullMode !== 'clone') {\n\t\t\tstate = true;\n\t\t}\n\n\t\tif (cloneEl && (cloneEl.state !== state)) {\n\t\t\t_css(cloneEl, 'display', state ? 'none' : '');\n\n\t\t\tif (!state) {\n\t\t\t\tif (cloneEl.state) {\n\t\t\t\t\tif (kvsortable.options.group.revertClone) {\n\t\t\t\t\t\trootEl.insertBefore(cloneEl, nextEl);\n\t\t\t\t\t\tkvsortable._animate(dragEl, cloneEl);\n\t\t\t\t\t} else {\n\t\t\t\t\t\trootEl.insertBefore(cloneEl, dragEl);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tcloneEl.state = state;\n\t\t}\n\t}\n\n\n\tfunction _closest(/**HTMLElement*/el, /**String*/selector, /**HTMLElement*/ctx) {\n\t\tif (el) {\n\t\t\tctx = ctx || document;\n\n\t\t\tdo {\n\t\t\t\tif ((selector === '>*' && el.parentNode === ctx) || _matches(el, selector)) {\n\t\t\t\t\treturn el;\n\t\t\t\t}\n\t\t\t\t/* jshint boss:true */\n\t\t\t} while (el = _getParentOrHost(el));\n\t\t}\n\n\t\treturn null;\n\t}\n\n\n\tfunction _getParentOrHost(el) {\n\t\tvar parent = el.host;\n\n\t\treturn (parent && parent.nodeType) ? parent : el.parentNode;\n\t}\n\n\n\tfunction _globalDragOver(/**Event*/evt) {\n\t\tif (evt.dataTransfer) {\n\t\t\tevt.dataTransfer.dropEffect = 'move';\n\t\t}\n\t\tevt.preventDefault();\n\t}\n\n\n\tfunction _on(el, event, fn) {\n\t\tel.addEventListener(event, fn, captureMode);\n\t}\n\n\n\tfunction _off(el, event, fn) {\n\t\tel.removeEventListener(event, fn, captureMode);\n\t}\n\n\n\tfunction _toggleClass(el, name, state) {\n\t\tif (el) {\n\t\t\tif (el.classList) {\n\t\t\t\tel.classList[state ? 'add' : 'remove'](name);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tvar className = (' ' + el.className + ' ').replace(R_SPACE, ' ').replace(' ' + name + ' ', ' ');\n\t\t\t\tel.className = (className + (state ? ' ' + name : '')).replace(R_SPACE, ' ');\n\t\t\t}\n\t\t}\n\t}\n\n\n\tfunction _css(el, prop, val) {\n\t\tvar style = el && el.style;\n\n\t\tif (style) {\n\t\t\tif (val === void 0) {\n\t\t\t\tif (document.defaultView && document.defaultView.getComputedStyle) {\n\t\t\t\t\tval = document.defaultView.getComputedStyle(el, '');\n\t\t\t\t}\n\t\t\t\telse if (el.currentStyle) {\n\t\t\t\t\tval = el.currentStyle;\n\t\t\t\t}\n\n\t\t\t\treturn prop === void 0 ? val : val[prop];\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif (!(prop in style)) {\n\t\t\t\t\tprop = '-webkit-' + prop;\n\t\t\t\t}\n\n\t\t\t\tstyle[prop] = val + (typeof val === 'string' ? '' : 'px');\n\t\t\t}\n\t\t}\n\t}\n\n\n\tfunction _find(ctx, tagName, iterator) {\n\t\tif (ctx) {\n\t\t\tvar list = ctx.getElementsByTagName(tagName), i = 0, n = list.length;\n\n\t\t\tif (iterator) {\n\t\t\t\tfor (; i < n; i++) {\n\t\t\t\t\titerator(list[i], i);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn list;\n\t\t}\n\n\t\treturn [];\n\t}\n\n\n\n\tfunction _dispatchEvent(kvsortable, rootEl, name, targetEl, toEl, fromEl, startIndex, newIndex) {\n\t\tkvsortable = (kvsortable || rootEl[expando]);\n\n\t\tvar evt = document.createEvent('Event'),\n\t\t\toptions = kvsortable.options,\n\t\t\tonName = 'on' + name.charAt(0).toUpperCase() + name.substr(1);\n\n\t\tevt.initEvent(name, true, true);\n\n\t\tevt.to = toEl || rootEl;\n\t\tevt.from = fromEl || rootEl;\n\t\tevt.item = targetEl || rootEl;\n\t\tevt.clone = cloneEl;\n\n\t\tevt.oldIndex = startIndex;\n\t\tevt.newIndex = newIndex;\n\n\t\trootEl.dispatchEvent(evt);\n\n\t\tif (options[onName]) {\n\t\t\toptions[onName].call(kvsortable, evt);\n\t\t}\n\t}\n\n\n\tfunction _onMove(fromEl, toEl, dragEl, dragRect, targetEl, targetRect, originalEvt, willInsertAfter) {\n\t\tvar evt,\n\t\t\tkvsortable = fromEl[expando],\n\t\t\tonMoveFn = kvsortable.options.onMove,\n\t\t\tretVal;\n\n\t\tevt = document.createEvent('Event');\n\t\tevt.initEvent('move', true, true);\n\n\t\tevt.to = toEl;\n\t\tevt.from = fromEl;\n\t\tevt.dragged = dragEl;\n\t\tevt.draggedRect = dragRect;\n\t\tevt.related = targetEl || toEl;\n\t\tevt.relatedRect = targetRect || toEl.getBoundingClientRect();\n\t\tevt.willInsertAfter = willInsertAfter;\n\n\t\tfromEl.dispatchEvent(evt);\n\n\t\tif (onMoveFn) {\n\t\t\tretVal = onMoveFn.call(kvsortable, evt, originalEvt);\n\t\t}\n\n\t\treturn retVal;\n\t}\n\n\n\tfunction _disableDraggable(el) {\n\t\tel.draggable = false;\n\t}\n\n\n\tfunction _unsilent() {\n\t\t_silent = false;\n\t}\n\n\n\t/** @returns {HTMLElement|false} */\n\tfunction _ghostIsLast(el, evt) {\n\t\tvar lastEl = el.lastElementChild,\n\t\t\trect = lastEl.getBoundingClientRect();\n\n\t\t// 5 — min delta\n\t\t// abs — нельзя добавлять, а то глюки при наведении сверху\n\t\treturn (evt.clientY - (rect.top + rect.height) > 5) ||\n\t\t\t(evt.clientX - (rect.left + rect.width) > 5);\n\t}\n\n\n\t/**\n\t * Generate id\n\t * @param   {HTMLElement} el\n\t * @returns {String}\n\t * @private\n\t */\n\tfunction _generateId(el) {\n\t\tvar str = el.tagName + el.className + el.src + el.href + el.textContent,\n\t\t\ti = str.length,\n\t\t\tsum = 0;\n\n\t\twhile (i--) {\n\t\t\tsum += str.charCodeAt(i);\n\t\t}\n\n\t\treturn sum.toString(36);\n\t}\n\n\t/**\n\t * Returns the index of an element within its parent for a selected set of\n\t * elements\n\t * @param  {HTMLElement} el\n\t * @param  {selector} selector\n\t * @return {number}\n\t */\n\tfunction _index(el, selector) {\n\t\tvar index = 0;\n\n\t\tif (!el || !el.parentNode) {\n\t\t\treturn -1;\n\t\t}\n\n\t\twhile (el && (el = el.previousElementSibling)) {\n\t\t\tif ((el.nodeName.toUpperCase() !== 'TEMPLATE') && (selector === '>*' || _matches(el, selector))) {\n\t\t\t\tindex++;\n\t\t\t}\n\t\t}\n\n\t\treturn index;\n\t}\n\n\tfunction _matches(/**HTMLElement*/el, /**String*/selector) {\n\t\tif (el) {\n\t\t\tselector = selector.split('.');\n\n\t\t\tvar tag = selector.shift().toUpperCase(),\n\t\t\t\tre = new RegExp('\\\\s(' + selector.join('|') + ')(?=\\\\s)', 'g');\n\n\t\t\treturn (\n\t\t\t\t(tag === '' || el.nodeName.toUpperCase() == tag) &&\n\t\t\t\t(!selector.length || ((' ' + el.className + ' ').match(re) || []).length == selector.length)\n\t\t\t);\n\t\t}\n\n\t\treturn false;\n\t}\n\n\tfunction _throttle(callback, ms) {\n\t\tvar args, _this;\n\n\t\treturn function () {\n\t\t\tif (args === void 0) {\n\t\t\t\targs = arguments;\n\t\t\t\t_this = this;\n\n\t\t\t\tsetTimeout(function () {\n\t\t\t\t\tif (args.length === 1) {\n\t\t\t\t\t\tcallback.call(_this, args[0]);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tcallback.apply(_this, args);\n\t\t\t\t\t}\n\n\t\t\t\t\targs = void 0;\n\t\t\t\t}, ms);\n\t\t\t}\n\t\t};\n\t}\n\n\tfunction _extend(dst, src) {\n\t\tif (dst && src) {\n\t\t\tfor (var key in src) {\n\t\t\t\tif (src.hasOwnProperty(key)) {\n\t\t\t\t\tdst[key] = src[key];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn dst;\n\t}\n\n\tfunction _clone(el) {\n\t\tif (Polymer && Polymer.dom) {\n\t\t\treturn Polymer.dom(el).cloneNode(true);\n\t\t}\n\t\telse if ($) {\n\t\t\treturn $(el).clone(true)[0];\n\t\t}\n\t\telse {\n\t\t\treturn el.cloneNode(true);\n\t\t}\n\t}\n\n\tfunction _saveInputCheckedState(root) {\n\t\tvar inputs = root.getElementsByTagName('input');\n\t\tvar idx = inputs.length;\n\n\t\twhile (idx--) {\n\t\t\tvar el = inputs[idx];\n\t\t\tel.checked && savedInputChecked.push(el);\n\t\t}\n\t}\n\n\tfunction _nextTick(fn) {\n\t\treturn setTimeout(fn, 0);\n\t}\n\n\tfunction _cancelNextTick(id) {\n\t\treturn clearTimeout(id);\n\t}\n\n\t// Fixed #973:\n\t_on(document, 'touchmove', function (evt) {\n\t\tif (KvSortable.active) {\n\t\t\tevt.preventDefault();\n\t\t}\n\t});\n\n\t// Export utils\n\tKvSortable.utils = {\n\t\ton: _on,\n\t\toff: _off,\n\t\tcss: _css,\n\t\tfind: _find,\n\t\tis: function (el, selector) {\n\t\t\treturn !!_closest(el, selector, el);\n\t\t},\n\t\textend: _extend,\n\t\tthrottle: _throttle,\n\t\tclosest: _closest,\n\t\ttoggleClass: _toggleClass,\n\t\tclone: _clone,\n\t\tindex: _index,\n\t\tnextTick: _nextTick,\n\t\tcancelNextTick: _cancelNextTick\n\t};\n\n\n\t/**\n\t * Create kvsortable instance\n\t * @param {HTMLElement}  el\n\t * @param {Object}      [options]\n\t */\n\tKvSortable.create = function (el, options) {\n\t\treturn new KvSortable(el, options);\n\t};\n\n\n\t// Export\n\tKvSortable.version = '1.7.0';\n\treturn KvSortable;\n});\n/**\n * jQuery plugin for KvSortable\n */\n(function (factory) {\n    \"use strict\";\n\n    if (typeof define === \"function\" && define.amd) {\n        define([\"jquery\"], factory);\n    }\n    else {\n        /* jshint sub:true */\n        factory(jQuery);\n    }\n})(function ($) {\n    \"use strict\";\n    $.fn.kvsortable = function (options) {\n        var retVal,\n            args = arguments;\n\n        this.each(function () {\n            var $el = $(this), kvsortable = $el.data('kvsortable');\n\n            if (!kvsortable && (options instanceof Object || !options)) {\n                kvsortable = new KvSortable(this, options);\n                $el.data('kvsortable', kvsortable);\n            }\n\n            if (kvsortable) {\n                if (options === 'widget') {\n                    retVal = kvsortable;\n                }\n                else if (options === 'destroy') {\n                    kvsortable.destroy();\n                    $el.removeData('kvsortable');\n                }\n                else if (typeof kvsortable[options] === 'function') {\n                    retVal = kvsortable[options].apply(kvsortable, [].slice.call(args, 1));\n                }\n                else if (options in kvsortable.options) {\n                    retVal = kvsortable.option.apply(kvsortable, args);\n                }\n            }\n        });\n\n        return (retVal === void 0) ? this : retVal;\n    };\n});"
  },
  {
    "path": "static/bootstrap/plugins/bootstrap-fileinput/4.4.7/themes/explorer/theme.css",
    "content": "/*!\n * bootstrap-fileinput v4.4.7\n * http://plugins.krajee.com/file-input\n *\n * Krajee Explorer theme style for bootstrap-fileinput. Load this theme file after loading `fileinput.css`.\n *\n * Author: Kartik Visweswaran\n * Copyright: 2014 - 2018, Kartik Visweswaran, Krajee.com\n *\n * Licensed under the BSD 3-Clause\n * https://github.com/kartik-v/bootstrap-fileinput/blob/master/LICENSE.md\n */\n.theme-explorer .file-upload-indicator, .theme-explorer .file-drag-handle, .theme-explorer .explorer-frame .kv-file-content, .theme-explorer .file-actions, .explorer-frame .file-preview-other {\n    text-align: center;\n}\n\n.theme-explorer .file-thumb-progress .progress, .theme-explorer .file-thumb-progress .progress-bar {\n    height: 13px;\n    font-size: 11px;\n    line-height: 13px;\n}\n\n.theme-explorer .file-upload-indicator, .theme-explorer .file-drag-handle {\n    position: absolute;\n    display: inline-block;\n    top: 0;\n    right: 3px;\n    width: 16px;\n    height: 16px;\n    font-size: 16px;\n}\n\n.theme-explorer .file-thumb-progress .progress, .theme-explorer .explorer-caption {\n    display: block;\n}\n\n.theme-explorer .explorer-frame td {\n    vertical-align: middle;\n    text-align: left;\n}\n\n.theme-explorer .explorer-frame .kv-file-content {\n    width: 80px;\n    height: 80px;\n    padding: 5px;\n}\n\n.theme-explorer .file-actions-cell {\n    position: relative;\n    width: 120px;\n    padding: 0;\n}\n\n.theme-explorer .file-thumb-progress .progress {\n    margin-top: 5px;\n}\n\n.theme-explorer .explorer-caption {\n    color: #777;\n}\n\n.theme-explorer .kvsortable-ghost {\n    opacity: 0.6;\n    background: #e1edf7;\n    border: 2px solid #a1abff;\n}\n\n.theme-explorer .file-preview .table {\n    margin: 0;\n}\n\n.theme-explorer .file-error-message ul {\n    padding: 5px 0 0 20px;\n}\n\n.explorer-frame .file-preview-text {\n    display: inline-block;\n    color: #428bca;\n    border: 1px solid #ddd;\n    font-family: Menlo, Monaco, Consolas, \"Courier New\", monospace;\n    outline: none;\n    padding: 8px;\n    resize: none;\n}\n\n.explorer-frame .file-preview-html {\n    display: inline-block;\n    border: 1px solid #ddd;\n    padding: 8px;\n    overflow: auto;\n}\n\n.explorer-frame .file-other-icon {\n    font-size: 2.6em;\n}\n\n@media only screen and (max-width: 767px) {\n    .theme-explorer .table, .theme-explorer .table tbody, .theme-explorer .table tr, .theme-explorer .table td {\n        display: block;\n        width: 100% !important;\n    }\n\n    .theme-explorer .table {\n        border: none;\n    }\n\n    .theme-explorer .table tr {\n        margin-top: 5px;\n    }\n\n    .theme-explorer .table tr:first-child {\n        margin-top: 0;\n    }\n\n    .theme-explorer .table td {\n        text-align: center;\n    }\n\n    .theme-explorer .table .kv-file-content {\n        border-bottom: none;\n        padding: 4px;\n        margin: 0;\n    }\n\n    .theme-explorer .table .kv-file-content .file-preview-image {\n        max-width: 100%;\n        font-size: 20px;\n    }\n\n    .theme-explorer .file-details-cell {\n        border-top: none;\n        border-bottom: none;\n        padding-top: 0;\n        margin: 0;\n    }\n\n    .theme-explorer .file-actions-cell {\n        border-top: none;\n        padding-bottom: 4px;\n    }\n\n    .theme-explorer .explorer-frame .explorer-caption {\n        white-space: nowrap;\n        text-overflow: ellipsis;\n        overflow: hidden;\n        left: 0;\n        right: 0;\n        margin: auto;\n    }\n}\n\n/*noinspection CssOverwrittenProperties*/\n.file-zoom-dialog .explorer-frame .file-other-icon {\n    font-size: 22em;\n    font-size: 50vmin;\n}\n"
  },
  {
    "path": "static/bootstrap/plugins/bootstrap-fileinput/4.4.7/themes/explorer/theme.js",
    "content": "/*!\n * bootstrap-fileinput v4.4.7\n * http://plugins.krajee.com/file-input\n *\n * Krajee Explorer theme configuration for bootstrap-fileinput. Load this theme file after loading `fileinput.js`.\n *\n * Author: Kartik Visweswaran\n * Copyright: 2014 - 2018, Kartik Visweswaran, Krajee.com\n *\n * Licensed under the BSD 3-Clause\n * https://github.com/kartik-v/bootstrap-fileinput/blob/master/LICENSE.md\n */\n(function ($) {\n    \"use strict\";\n    var teTagBef = '<tr class=\"file-preview-frame {frameClass}\" id=\"{previewId}\" data-fileindex=\"{fileindex}\"' +\n        ' data-template=\"{template}\"', teContent = '<td class=\"kv-file-content\">\\n';\n    $.fn.fileinputThemes.explorer = {\n        layoutTemplates: {\n            preview: '<div class=\"file-preview {class}\">\\n' +\n            '    {close}' +\n            '    <div class=\"{dropClass}\">\\n' +\n            '    <table class=\"table table-bordered table-hover\"><tbody class=\"file-preview-thumbnails\">\\n' +\n            '    </tbody></table>\\n' +\n            '    <div class=\"clearfix\"></div>' +\n            '    <div class=\"file-preview-status text-center text-success\"></div>\\n' +\n            '    <div class=\"kv-fileinput-error\"></div>\\n' +\n            '    </div>\\n' +\n            '</div>',\n            footer: '<td class=\"file-details-cell\"><div class=\"explorer-caption\" title=\"{caption}\">{caption}</div> ' +\n            '{size}{progress}</td><td class=\"file-actions-cell\">{indicator} {actions}</td>',\n            actions: '{drag}\\n' +\n            '<div class=\"file-actions\">\\n' +\n            '    <div class=\"file-footer-buttons\">\\n' +\n            '        {upload} {download} {delete} {zoom} {other} ' +\n            '    </div>\\n' +\n            '</div>',\n            zoomCache: '<tr style=\"display:none\" class=\"kv-zoom-cache-theme\"><td>' +\n            '<table class=\"kv-zoom-cache\">{zoomContent}</table></td></tr>'\n        },\n        previewMarkupTags: {\n            tagBefore1: teTagBef + '>' + teContent,\n            tagBefore2: teTagBef + ' title=\"{caption}\">' + teContent,\n            tagAfter: '</td>\\n{footer}</tr>\\n'\n        },\n        previewSettings: {\n            image: {height: \"60px\"},\n            html: {width: \"100px\", height: \"60px\"},\n            text: {width: \"100px\", height: \"60px\"},\n            video: {width: \"auto\", height: \"60px\"},\n            audio: {width: \"auto\", height: \"60px\"},\n            flash: {width: \"100%\", height: \"60px\"},\n            object: {width: \"100%\", height: \"60px\"},\n            pdf: {width: \"100px\", height: \"60px\"},\n            other: {width: \"100%\", height: \"60px\"}\n        },\n        frameClass: 'explorer-frame'\n    };\n})(window.jQuery);\n"
  },
  {
    "path": "static/bootstrap/plugins/bootstrap-fileinput/4.4.7/themes/explorer-fa/theme.css",
    "content": "/*!\n * bootstrap-fileinput v4.4.7\n * http://plugins.krajee.com/file-input\n *\n * Krajee Explorer Font Awesome theme style for bootstrap-fileinput. Load this theme file after loading `fileinput.css`.\n *\n * Author: Kartik Visweswaran\n * Copyright: 2014 - 2018, Kartik Visweswaran, Krajee.com\n *\n * Licensed under the BSD 3-Clause\n * https://github.com/kartik-v/bootstrap-fileinput/blob/master/LICENSE.md\n */\n.theme-explorer-fa .file-upload-indicator, .theme-explorer-fa .file-drag-handle, .theme-explorer-fa .explorer-frame .kv-file-content, .theme-explorer-fa .file-actions, .explorer-frame .file-preview-other {\n    text-align: center;\n}\n\n.theme-explorer-fa .file-thumb-progress .progress, .theme-explorer-fa .file-thumb-progress .progress-bar {\n    height: 13px;\n    font-size: 11px;\n    line-height: 13px;\n}\n\n.theme-explorer-fa .file-upload-indicator, .theme-explorer-fa .file-drag-handle {\n    position: absolute;\n    display: inline-block;\n    top: 0;\n    right: 3px;\n    width: 16px;\n    height: 16px;\n    font-size: 16px;\n}\n\n.theme-explorer-fa .file-thumb-progress .progress, .theme-explorer-fa .explorer-caption {\n    display: block;\n}\n\n.theme-explorer-fa .explorer-frame td {\n    vertical-align: middle;\n    text-align: left;\n}\n\n.theme-explorer-fa .explorer-frame .kv-file-content {\n    width: 80px;\n    height: 80px;\n    padding: 5px;\n}\n\n.theme-explorer-fa .file-actions-cell {\n    position: relative;\n    width: 120px;\n    padding: 0;\n}\n\n.theme-explorer-fa .file-thumb-progress .progress {\n    margin-top: 5px;\n}\n\n.theme-explorer-fa .explorer-caption {\n    color: #777;\n}\n\n.theme-explorer-fa .kvsortable-ghost {\n    opacity: 0.6;\n    background: #e1edf7;\n    border: 2px solid #a1abff;\n}\n\n.theme-explorer-fa .file-preview .table {\n    margin: 0;\n}\n\n.theme-explorer-fa .file-error-message ul {\n    padding: 5px 0 0 20px;\n}\n\n.explorer-frame .file-preview-text {\n    display: inline-block;\n    color: #428bca;\n    border: 1px solid #ddd;\n    font-family: Menlo, Monaco, Consolas, \"Courier New\", monospace;\n    outline: none;\n    padding: 8px;\n    resize: none;\n}\n\n.explorer-frame .file-preview-html {\n    display: inline-block;\n    border: 1px solid #ddd;\n    padding: 8px;\n    overflow: auto;\n}\n\n.explorer-frame .file-other-icon {\n    font-size: 2.6em;\n}\n\n@media only screen and (max-width: 767px) {\n    .theme-explorer-fa .table, .theme-explorer-fa .table tbody, .theme-explorer-fa .table tr, .theme-explorer-fa .table td {\n        display: block;\n        width: 100% !important;\n    }\n\n    .theme-explorer-fa .table {\n        border: none;\n    }\n\n    .theme-explorer-fa .table tr {\n        margin-top: 5px;\n    }\n\n    .theme-explorer-fa .table tr:first-child {\n        margin-top: 0;\n    }\n\n    .theme-explorer-fa .table td {\n        text-align: center;\n    }\n\n    .theme-explorer-fa .table .kv-file-content {\n        border-bottom: none;\n        padding: 4px;\n        margin: 0;\n    }\n\n    .theme-explorer-fa .table .kv-file-content .file-preview-image {\n        max-width: 100%;\n        font-size: 20px;\n    }\n\n    .theme-explorer-fa .file-details-cell {\n        border-top: none;\n        border-bottom: none;\n        padding-top: 0;\n        margin: 0;\n    }\n\n    .theme-explorer-fa .file-actions-cell {\n        border-top: none;\n        padding-bottom: 4px;\n    }\n\n    .theme-explorer-fa .explorer-frame .explorer-caption {\n        white-space: nowrap;\n        text-overflow: ellipsis;\n        overflow: hidden;\n        left: 0;\n        right: 0;\n        margin: auto;\n    }\n}\n\n/*noinspection CssOverwrittenProperties*/\n.file-zoom-dialog .explorer-frame .file-other-icon {\n    font-size: 22em;\n    font-size: 50vmin;\n}"
  },
  {
    "path": "static/bootstrap/plugins/bootstrap-fileinput/4.4.7/themes/explorer-fa/theme.js",
    "content": "/*!\n * bootstrap-fileinput v4.4.7\n * http://plugins.krajee.com/file-input\n *\n * Krajee Explorer Font Awesome theme configuration for bootstrap-fileinput. \n * Load this theme file after loading `fileinput.js`. Ensure that\n * font awesome assets and CSS are loaded on the page as well.\n *\n * Author: Kartik Visweswaran\n * Copyright: 2014 - 2018, Kartik Visweswaran, Krajee.com\n *\n * Licensed under the BSD 3-Clause\n * https://github.com/kartik-v/bootstrap-fileinput/blob/master/LICENSE.md\n */\n(function ($) {\n    \"use strict\";\n    var teTagBef = '<tr class=\"file-preview-frame {frameClass}\" id=\"{previewId}\" data-fileindex=\"{fileindex}\"' +\n        ' data-template=\"{template}\"', teContent = '<td class=\"kv-file-content\">\\n';\n    $.fn.fileinputThemes['explorer-fa'] = {\n        layoutTemplates: {\n            preview: '<div class=\"file-preview {class}\">\\n' +\n            '    {close}' +\n            '    <div class=\"{dropClass}\">\\n' +\n            '    <table class=\"table table-bordered table-hover\"><tbody class=\"file-preview-thumbnails\">\\n' +\n            '    </tbody></table>\\n' +\n            '    <div class=\"clearfix\"></div>' +\n            '    <div class=\"file-preview-status text-center text-success\"></div>\\n' +\n            '    <div class=\"kv-fileinput-error\"></div>\\n' +\n            '    </div>\\n' +\n            '</div>',\n            footer: '<td class=\"file-details-cell\"><div class=\"explorer-caption\" title=\"{caption}\">{caption}</div> ' +\n            '{size}{progress}</td><td class=\"file-actions-cell\">{indicator} {actions}</td>',\n            actions: '{drag}\\n' +\n            '<div class=\"file-actions\">\\n' +\n            '    <div class=\"file-footer-buttons\">\\n' +\n            '        {upload} {download} {delete} {zoom} {other} ' +\n            '    </div>\\n' +\n            '</div>',\n            zoomCache: '<tr style=\"display:none\" class=\"kv-zoom-cache-theme\"><td>' +\n            '<table class=\"kv-zoom-cache\">{zoomContent}</table></td></tr>',\n            fileIcon: '<i class=\"fa fa-file kv-caption-icon\"></i> '\n        },\n        previewMarkupTags: {\n            tagBefore1: teTagBef + '>' + teContent,\n            tagBefore2: teTagBef + ' title=\"{caption}\">' + teContent,\n            tagAfter: '</td>\\n{footer}</tr>\\n'\n        },\n        previewSettings: {\n            image: {height: \"60px\"},\n            html: {width: \"100px\", height: \"60px\"},\n            text: {width: \"100px\", height: \"60px\"},\n            video: {width: \"auto\", height: \"60px\"},\n            audio: {width: \"auto\", height: \"60px\"},\n            flash: {width: \"100%\", height: \"60px\"},\n            object: {width: \"100%\", height: \"60px\"},\n            pdf: {width: \"100px\", height: \"60px\"},\n            other: {width: \"100%\", height: \"60px\"}\n        },\n        frameClass: 'explorer-frame',\n        fileActionSettings: {\n            removeIcon: '<i class=\"fa fa-trash\"></i>',\n            uploadIcon: '<i class=\"fa fa-upload\"></i>',\n            uploadRetryIcon: '<i class=\"fa fa-repeat\"></i>',\n            zoomIcon: '<i class=\"fa fa-search-plus\"></i>',\n            dragIcon: '<i class=\"fa fa-arrows\"></i>',\n            indicatorNew: '<i class=\"fa fa-plus-circle text-warning\"></i>',\n            indicatorSuccess: '<i class=\"fa fa-check-circle text-success\"></i>',\n            indicatorError: '<i class=\"fa fa-exclamation-circle text-danger\"></i>',\n            indicatorLoading: '<i class=\"fa fa-hourglass text-muted\"></i>'\n        },\n        previewZoomButtonIcons: {\n            prev: '<i class=\"fa fa-caret-left fa-lg\"></i>',\n            next: '<i class=\"fa fa-caret-right fa-lg\"></i>',\n            toggleheader: '<i class=\"fa fa-arrows-v\"></i>',\n            fullscreen: '<i class=\"fa fa-arrows-alt\"></i>',\n            borderless: '<i class=\"fa fa-external-link\"></i>',\n            close: '<i class=\"fa fa-remove\"></i>'\n        },\n        previewFileIcon: '<i class=\"fa fa-file\"></i>',\n        browseIcon: '<i class=\"fa fa-folder-open\"></i>',\n        removeIcon: '<i class=\"fa fa-trash\"></i>',\n        cancelIcon: '<i class=\"fa fa-ban\"></i>',\n        uploadIcon: '<i class=\"fa fa-upload\"></i>',\n        msgValidationErrorIcon: '<i class=\"fa fa-exclamation-circle\"></i> '\n    };\n})(window.jQuery);"
  },
  {
    "path": "static/bootstrap/plugins/bootstrap-fileinput/4.4.7/themes/fa/theme.js",
    "content": "/*!\n * bootstrap-fileinput v4.4.7\n * http://plugins.krajee.com/file-input\n *\n * Font Awesome icon theme configuration for bootstrap-fileinput. Requires font awesome assets to be loaded.\n *\n * Author: Kartik Visweswaran\n * Copyright: 2014 - 2018, Kartik Visweswaran, Krajee.com\n *\n * Licensed under the BSD 3-Clause\n * https://github.com/kartik-v/bootstrap-fileinput/blob/master/LICENSE.md\n */\n(function ($) {\n    \"use strict\";\n\n    $.fn.fileinputThemes.fa = {\n        fileActionSettings: {\n            removeIcon: '<i class=\"fa fa-trash\"></i>',\n            uploadIcon: '<i class=\"fa fa-upload\"></i>',\n            uploadRetryIcon: '<i class=\"fa fa-repeat\"></i>',\n            zoomIcon: '<i class=\"fa fa-search-plus\"></i>',\n            dragIcon: '<i class=\"fa fa-bars\"></i>',\n            indicatorNew: '<i class=\"fa fa-plus-circle text-warning\"></i>',\n            indicatorSuccess: '<i class=\"fa fa-check-circle text-success\"></i>',\n            indicatorError: '<i class=\"fa fa-exclamation-circle text-danger\"></i>',\n            indicatorLoading: '<i class=\"fa fa-hourglass text-muted\"></i>'\n        },\n        layoutTemplates: {\n            fileIcon: '<i class=\"fa fa-file kv-caption-icon\"></i> '\n        },\n        previewZoomButtonIcons: {\n            prev: '<i class=\"fa fa-caret-left fa-lg\"></i>',\n            next: '<i class=\"fa fa-caret-right fa-lg\"></i>',\n            toggleheader: '<i class=\"fa fa-arrows-v\"></i>',\n            fullscreen: '<i class=\"fa fa-arrows-alt\"></i>',\n            borderless: '<i class=\"fa fa-external-link\"></i>',\n            close: '<i class=\"fa fa-remove\"></i>'\n        },\n        previewFileIcon: '<i class=\"fa fa-file\"></i>',\n        browseIcon: '<i class=\"fa fa-folder-open\"></i>',\n        removeIcon: '<i class=\"fa fa-trash\"></i>',\n        cancelIcon: '<i class=\"fa fa-ban\"></i>',\n        uploadIcon: '<i class=\"fa fa-upload\"></i>',\n        msgValidationErrorIcon: '<i class=\"fa fa-exclamation-circle\"></i> '\n    };\n})(window.jQuery);\n"
  },
  {
    "path": "static/bootstrap/plugins/bootstrap-fileinput/4.4.7/themes/gly/theme.js",
    "content": "/*!\n * bootstrap-fileinput v4.4.7\n * http://plugins.krajee.com/file-input\n *\n * Glyphicon (default) theme configuration for bootstrap-fileinput.\n *\n * Author: Kartik Visweswaran\n * Copyright: 2014 - 2018, Kartik Visweswaran, Krajee.com\n *\n * Licensed under the BSD 3-Clause\n * https://github.com/kartik-v/bootstrap-fileinput/blob/master/LICENSE.md\n */\n(function ($) {\n    \"use strict\";\n\n    $.fn.fileinputThemes.gly = {\n        fileActionSettings: {\n            removeIcon: '<i class=\"glyphicon glyphicon-trash\"></i>',\n            uploadIcon: '<i class=\"glyphicon glyphicon-upload\"></i>',\n            zoomIcon: '<i class=\"glyphicon glyphicon-zoom-in\"></i>',\n            dragIcon: '<i class=\"glyphicon glyphicon-move\"></i>',\n            indicatorNew: '<i class=\"glyphicon glyphicon-plus-sign text-warning\"></i>',\n            indicatorSuccess: '<i class=\"glyphicon glyphicon-ok-sign text-success\"></i>',\n            indicatorError: '<i class=\"glyphicon glyphicon-exclamation-sign text-danger\"></i>',\n            indicatorLoading: '<i class=\"glyphicon glyphicon-hourglass text-muted\"></i>'\n        },\n        layoutTemplates: {\n            fileIcon: '<i class=\"glyphicon glyphicon-file kv-caption-icon\"></i>'\n        },\n        previewZoomButtonIcons: {\n            prev: '<i class=\"glyphicon glyphicon-triangle-left\"></i>',\n            next: '<i class=\"glyphicon glyphicon-triangle-right\"></i>',\n            toggleheader: '<i class=\"glyphicon glyphicon-resize-vertical\"></i>',\n            fullscreen: '<i class=\"glyphicon glyphicon-fullscreen\"></i>',\n            borderless: '<i class=\"glyphicon glyphicon-resize-full\"></i>',\n            close: '<i class=\"glyphicon glyphicon-remove\"></i>'\n        },\n        previewFileIcon: '<i class=\"glyphicon glyphicon-file\"></i>',\n        browseIcon: '<i class=\"glyphicon glyphicon-folder-open\"></i>&nbsp;',\n        removeIcon: '<i class=\"glyphicon glyphicon-trash\"></i>',\n        cancelIcon: '<i class=\"glyphicon glyphicon-ban-circle\"></i>',\n        uploadIcon: '<i class=\"glyphicon glyphicon-upload\"></i>',\n        msgValidationErrorIcon: '<i class=\"glyphicon glyphicon-exclamation-sign\"></i> '\n    };\n})(window.jQuery);\n"
  },
  {
    "path": "static/bootstrap/plugins/bootstrap-switch/css/bootstrap2/bootstrap-switch.css",
    "content": "/**\n  * bootstrap-switch - Turn checkboxes and radio buttons into toggle switches.\n  *\n  * @version v3.3.4\n  * @homepage https://bttstrp.github.io/bootstrap-switch\n  * @author Mattia Larentis <mattia@larentis.eu> (http://larentis.eu)\n  * @license Apache-2.0\n  */\n\n.clearfix {\n  *zoom: 1;\n}\n.clearfix:before,\n.clearfix:after {\n  display: table;\n  content: \"\";\n  line-height: 0;\n}\n.clearfix:after {\n  clear: both;\n}\n.hide-text {\n  font: 0/0 a;\n  color: transparent;\n  text-shadow: none;\n  background-color: transparent;\n  border: 0;\n}\n.input-block-level {\n  display: block;\n  width: 100%;\n  min-height: 30px;\n  -webkit-box-sizing: border-box;\n  -moz-box-sizing: border-box;\n  box-sizing: border-box;\n}\n.bootstrap-switch {\n  display: inline-block;\n  direction: ltr;\n  cursor: pointer;\n  -webkit-border-radius: 5px;\n  -moz-border-radius: 5px;\n  border-radius: 5px;\n  border: 1px solid;\n  border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);\n  position: relative;\n  text-align: left;\n  overflow: hidden;\n  line-height: 8px;\n  z-index: 0;\n  -webkit-user-select: none;\n  -moz-user-select: none;\n  -ms-user-select: none;\n  -o-user-select: none;\n  user-select: none;\n  vertical-align: middle;\n  -webkit-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;\n  -moz-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;\n  -o-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;\n  transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;\n}\n.bootstrap-switch .bootstrap-switch-container {\n  display: inline-block;\n  top: 0;\n  -webkit-border-radius: 4px;\n  -moz-border-radius: 4px;\n  border-radius: 4px;\n  -webkit-transform: translate3d(0, 0, 0);\n  -moz-transform: translate3d(0, 0, 0);\n  -o-transform: translate3d(0, 0, 0);\n  transform: translate3d(0, 0, 0);\n}\n.bootstrap-switch .bootstrap-switch-handle-on,\n.bootstrap-switch .bootstrap-switch-handle-off,\n.bootstrap-switch .bootstrap-switch-label {\n  -webkit-box-sizing: border-box;\n  -moz-box-sizing: border-box;\n  box-sizing: border-box;\n  cursor: pointer;\n  display: inline-block !important;\n  padding-top: 4px;\n  padding-bottom: 4px;\n  padding-left: 8px;\n  padding-right: 8px;\n  font-size: 14px;\n  line-height: 20px;\n}\n.bootstrap-switch .bootstrap-switch-handle-on,\n.bootstrap-switch .bootstrap-switch-handle-off {\n  text-align: center;\n  z-index: 1;\n}\n.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-primary,\n.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-primary {\n  color: #fff;\n  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);\n  background-color: #005fcc;\n  background-image: -moz-linear-gradient(top, #0044cc, #08c);\n  background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0044cc), to(#08c));\n  background-image: -webkit-linear-gradient(top, #0044cc, #08c);\n  background-image: -o-linear-gradient(top, #0044cc, #08c);\n  background-image: linear-gradient(to bottom, #0044cc, #08c);\n  background-repeat: repeat-x;\n  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0044cc', endColorstr='#ff0088cc', GradientType=0);\n  border-color: #08c #08c #005580;\n  border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);\n  *background-color: #08c;\n  /* Darken IE7 buttons by default so they stand out more given they won't have borders */\n  filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);\n}\n.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-primary:hover,\n.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-primary:hover,\n.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-primary:focus,\n.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-primary:focus,\n.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-primary:active,\n.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-primary:active,\n.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-primary.active,\n.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-primary.active,\n.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-primary.disabled,\n.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-primary.disabled,\n.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-primary[disabled],\n.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-primary[disabled] {\n  color: #fff;\n  background-color: #08c;\n  *background-color: #0077b3;\n}\n.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-primary:active,\n.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-primary:active,\n.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-primary.active,\n.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-primary.active {\n  background-color: #006699 \\9;\n}\n.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-info,\n.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-info {\n  color: #fff;\n  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);\n  background-color: #41a7c5;\n  background-image: -moz-linear-gradient(top, #2f96b4, #5bc0de);\n  background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#2f96b4), to(#5bc0de));\n  background-image: -webkit-linear-gradient(top, #2f96b4, #5bc0de);\n  background-image: -o-linear-gradient(top, #2f96b4, #5bc0de);\n  background-image: linear-gradient(to bottom, #2f96b4, #5bc0de);\n  background-repeat: repeat-x;\n  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff2f96b4', endColorstr='#ff5bc0de', GradientType=0);\n  border-color: #5bc0de #5bc0de #28a1c5;\n  border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);\n  *background-color: #5bc0de;\n  /* Darken IE7 buttons by default so they stand out more given they won't have borders */\n  filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);\n}\n.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-info:hover,\n.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-info:hover,\n.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-info:focus,\n.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-info:focus,\n.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-info:active,\n.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-info:active,\n.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-info.active,\n.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-info.active,\n.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-info.disabled,\n.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-info.disabled,\n.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-info[disabled],\n.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-info[disabled] {\n  color: #fff;\n  background-color: #5bc0de;\n  *background-color: #46b8da;\n}\n.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-info:active,\n.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-info:active,\n.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-info.active,\n.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-info.active {\n  background-color: #31b0d5 \\9;\n}\n.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-success,\n.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-success {\n  color: #fff;\n  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);\n  background-color: #58b058;\n  background-image: -moz-linear-gradient(top, #51a351, #62c462);\n  background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#51a351), to(#62c462));\n  background-image: -webkit-linear-gradient(top, #51a351, #62c462);\n  background-image: -o-linear-gradient(top, #51a351, #62c462);\n  background-image: linear-gradient(to bottom, #51a351, #62c462);\n  background-repeat: repeat-x;\n  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff51a351', endColorstr='#ff62c462', GradientType=0);\n  border-color: #62c462 #62c462 #3b9e3b;\n  border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);\n  *background-color: #62c462;\n  /* Darken IE7 buttons by default so they stand out more given they won't have borders */\n  filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);\n}\n.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-success:hover,\n.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-success:hover,\n.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-success:focus,\n.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-success:focus,\n.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-success:active,\n.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-success:active,\n.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-success.active,\n.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-success.active,\n.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-success.disabled,\n.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-success.disabled,\n.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-success[disabled],\n.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-success[disabled] {\n  color: #fff;\n  background-color: #62c462;\n  *background-color: #4fbd4f;\n}\n.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-success:active,\n.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-success:active,\n.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-success.active,\n.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-success.active {\n  background-color: #42b142 \\9;\n}\n.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-warning,\n.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-warning {\n  color: #fff;\n  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);\n  background-color: #f9a123;\n  background-image: -moz-linear-gradient(top, #f89406, #fbb450);\n  background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#f89406), to(#fbb450));\n  background-image: -webkit-linear-gradient(top, #f89406, #fbb450);\n  background-image: -o-linear-gradient(top, #f89406, #fbb450);\n  background-image: linear-gradient(to bottom, #f89406, #fbb450);\n  background-repeat: repeat-x;\n  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff89406', endColorstr='#fffbb450', GradientType=0);\n  border-color: #fbb450 #fbb450 #f89406;\n  border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);\n  *background-color: #fbb450;\n  /* Darken IE7 buttons by default so they stand out more given they won't have borders */\n  filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);\n}\n.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-warning:hover,\n.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-warning:hover,\n.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-warning:focus,\n.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-warning:focus,\n.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-warning:active,\n.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-warning:active,\n.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-warning.active,\n.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-warning.active,\n.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-warning.disabled,\n.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-warning.disabled,\n.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-warning[disabled],\n.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-warning[disabled] {\n  color: #fff;\n  background-color: #fbb450;\n  *background-color: #faa937;\n}\n.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-warning:active,\n.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-warning:active,\n.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-warning.active,\n.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-warning.active {\n  background-color: #fa9f1e \\9;\n}\n.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-danger,\n.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-danger {\n  color: #fff;\n  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);\n  background-color: #d14641;\n  background-image: -moz-linear-gradient(top, #bd362f, #ee5f5b);\n  background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#bd362f), to(#ee5f5b));\n  background-image: -webkit-linear-gradient(top, #bd362f, #ee5f5b);\n  background-image: -o-linear-gradient(top, #bd362f, #ee5f5b);\n  background-image: linear-gradient(to bottom, #bd362f, #ee5f5b);\n  background-repeat: repeat-x;\n  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffbd362f', endColorstr='#ffee5f5b', GradientType=0);\n  border-color: #ee5f5b #ee5f5b #e51d18;\n  border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);\n  *background-color: #ee5f5b;\n  /* Darken IE7 buttons by default so they stand out more given they won't have borders */\n  filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);\n}\n.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-danger:hover,\n.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-danger:hover,\n.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-danger:focus,\n.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-danger:focus,\n.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-danger:active,\n.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-danger:active,\n.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-danger.active,\n.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-danger.active,\n.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-danger.disabled,\n.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-danger.disabled,\n.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-danger[disabled],\n.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-danger[disabled] {\n  color: #fff;\n  background-color: #ee5f5b;\n  *background-color: #ec4844;\n}\n.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-danger:active,\n.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-danger:active,\n.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-danger.active,\n.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-danger.active {\n  background-color: #e9322d \\9;\n}\n.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-default,\n.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-default {\n  color: #333;\n  text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75);\n  background-color: #f0f0f0;\n  background-image: -moz-linear-gradient(top, #e6e6e6, #fff);\n  background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#e6e6e6), to(#fff));\n  background-image: -webkit-linear-gradient(top, #e6e6e6, #fff);\n  background-image: -o-linear-gradient(top, #e6e6e6, #fff);\n  background-image: linear-gradient(to bottom, #e6e6e6, #fff);\n  background-repeat: repeat-x;\n  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffe6e6e6', endColorstr='#ffffffff', GradientType=0);\n  border-color: #fff #fff #d9d9d9;\n  border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);\n  *background-color: #fff;\n  /* Darken IE7 buttons by default so they stand out more given they won't have borders */\n  filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);\n}\n.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-default:hover,\n.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-default:hover,\n.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-default:focus,\n.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-default:focus,\n.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-default:active,\n.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-default:active,\n.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-default.active,\n.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-default.active,\n.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-default.disabled,\n.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-default.disabled,\n.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-default[disabled],\n.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-default[disabled] {\n  color: #333;\n  background-color: #fff;\n  *background-color: #f2f2f2;\n}\n.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-default:active,\n.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-default:active,\n.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-default.active,\n.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-default.active {\n  background-color: #e6e6e6 \\9;\n}\n.bootstrap-switch .bootstrap-switch-label {\n  text-align: center;\n  margin-top: -1px;\n  margin-bottom: -1px;\n  z-index: 100;\n  border-left: 1px solid #ccc;\n  border-right: 1px solid #ccc;\n  color: #333;\n  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);\n  background-color: #f5f5f5;\n  background-image: -moz-linear-gradient(top, #fff, #e6e6e6);\n  background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#fff), to(#e6e6e6));\n  background-image: -webkit-linear-gradient(top, #fff, #e6e6e6);\n  background-image: -o-linear-gradient(top, #fff, #e6e6e6);\n  background-image: linear-gradient(to bottom, #fff, #e6e6e6);\n  background-repeat: repeat-x;\n  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe6e6e6', GradientType=0);\n  border-color: #e6e6e6 #e6e6e6 #bfbfbf;\n  border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);\n  *background-color: #e6e6e6;\n  /* Darken IE7 buttons by default so they stand out more given they won't have borders */\n  filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);\n}\n.bootstrap-switch .bootstrap-switch-label:hover,\n.bootstrap-switch .bootstrap-switch-label:focus,\n.bootstrap-switch .bootstrap-switch-label:active,\n.bootstrap-switch .bootstrap-switch-label.active,\n.bootstrap-switch .bootstrap-switch-label.disabled,\n.bootstrap-switch .bootstrap-switch-label[disabled] {\n  color: #333;\n  background-color: #e6e6e6;\n  *background-color: #d9d9d9;\n}\n.bootstrap-switch .bootstrap-switch-label:active,\n.bootstrap-switch .bootstrap-switch-label.active {\n  background-color: #cccccc \\9;\n}\n.bootstrap-switch span::before {\n  content: \"\\200b\";\n}\n.bootstrap-switch .bootstrap-switch-handle-on {\n  -webkit-border-top-left-radius: 4px;\n  -moz-border-radius-topleft: 4px;\n  border-top-left-radius: 4px;\n  -webkit-border-bottom-left-radius: 4px;\n  -moz-border-radius-bottomleft: 4px;\n  border-bottom-left-radius: 4px;\n}\n.bootstrap-switch .bootstrap-switch-handle-off {\n  -webkit-border-top-right-radius: 4px;\n  -moz-border-radius-topright: 4px;\n  border-top-right-radius: 4px;\n  -webkit-border-bottom-right-radius: 4px;\n  -moz-border-radius-bottomright: 4px;\n  border-bottom-right-radius: 4px;\n}\n.bootstrap-switch input[type='radio'],\n.bootstrap-switch input[type='checkbox'] {\n  position: absolute !important;\n  top: 0;\n  left: 0;\n  opacity: 0;\n  filter: alpha(opacity=0);\n  z-index: -1;\n  visibility: hidden;\n}\n.bootstrap-switch input[type='radio'].form-control,\n.bootstrap-switch input[type='checkbox'].form-control {\n  height: auto;\n}\n.bootstrap-switch.bootstrap-switch-mini {\n  min-width: 71px;\n}\n.bootstrap-switch.bootstrap-switch-mini .bootstrap-switch-handle-on,\n.bootstrap-switch.bootstrap-switch-mini .bootstrap-switch-handle-off,\n.bootstrap-switch.bootstrap-switch-mini .bootstrap-switch-label {\n  padding: 3px 6px;\n  font-size: 10px;\n  line-height: 9px;\n}\n.bootstrap-switch.bootstrap-switch-small {\n  min-width: 79px;\n}\n.bootstrap-switch.bootstrap-switch-small .bootstrap-switch-handle-on,\n.bootstrap-switch.bootstrap-switch-small .bootstrap-switch-handle-off,\n.bootstrap-switch.bootstrap-switch-small .bootstrap-switch-label {\n  padding: 3px 6px;\n  font-size: 12px;\n  line-height: 18px;\n}\n.bootstrap-switch.bootstrap-switch-large {\n  min-width: 120px;\n}\n.bootstrap-switch.bootstrap-switch-large .bootstrap-switch-handle-on,\n.bootstrap-switch.bootstrap-switch-large .bootstrap-switch-handle-off,\n.bootstrap-switch.bootstrap-switch-large .bootstrap-switch-label {\n  padding: 9px 12px;\n  font-size: 16px;\n  line-height: normal;\n}\n.bootstrap-switch.bootstrap-switch-disabled,\n.bootstrap-switch.bootstrap-switch-readonly,\n.bootstrap-switch.bootstrap-switch-indeterminate {\n  cursor: default !important;\n}\n.bootstrap-switch.bootstrap-switch-disabled .bootstrap-switch-handle-on,\n.bootstrap-switch.bootstrap-switch-readonly .bootstrap-switch-handle-on,\n.bootstrap-switch.bootstrap-switch-indeterminate .bootstrap-switch-handle-on,\n.bootstrap-switch.bootstrap-switch-disabled .bootstrap-switch-handle-off,\n.bootstrap-switch.bootstrap-switch-readonly .bootstrap-switch-handle-off,\n.bootstrap-switch.bootstrap-switch-indeterminate .bootstrap-switch-handle-off,\n.bootstrap-switch.bootstrap-switch-disabled .bootstrap-switch-label,\n.bootstrap-switch.bootstrap-switch-readonly .bootstrap-switch-label,\n.bootstrap-switch.bootstrap-switch-indeterminate .bootstrap-switch-label {\n  opacity: 0.5;\n  filter: alpha(opacity=50);\n  cursor: default !important;\n}\n.bootstrap-switch.bootstrap-switch-animate .bootstrap-switch-container {\n  -webkit-transition: margin-left 0.5s;\n  -moz-transition: margin-left 0.5s;\n  -o-transition: margin-left 0.5s;\n  transition: margin-left 0.5s;\n}\n.bootstrap-switch.bootstrap-switch-inverse .bootstrap-switch-handle-on {\n  -webkit-border-top-left-radius: 0;\n  -moz-border-radius-topleft: 0;\n  border-top-left-radius: 0;\n  -webkit-border-bottom-left-radius: 0;\n  -moz-border-radius-bottomleft: 0;\n  border-bottom-left-radius: 0;\n  -webkit-border-top-right-radius: 4px;\n  -moz-border-radius-topright: 4px;\n  border-top-right-radius: 4px;\n  -webkit-border-bottom-right-radius: 4px;\n  -moz-border-radius-bottomright: 4px;\n  border-bottom-right-radius: 4px;\n}\n.bootstrap-switch.bootstrap-switch-inverse .bootstrap-switch-handle-off {\n  -webkit-border-top-right-radius: 0;\n  -moz-border-radius-topright: 0;\n  border-top-right-radius: 0;\n  -webkit-border-bottom-right-radius: 0;\n  -moz-border-radius-bottomright: 0;\n  border-bottom-right-radius: 0;\n  -webkit-border-top-left-radius: 4px;\n  -moz-border-radius-topleft: 4px;\n  border-top-left-radius: 4px;\n  -webkit-border-bottom-left-radius: 4px;\n  -moz-border-radius-bottomleft: 4px;\n  border-bottom-left-radius: 4px;\n}\n.bootstrap-switch.bootstrap-switch-focused {\n  border-color: rgba(82, 168, 236, 0.8);\n  outline: 0;\n  outline: thin dotted \\9;\n  -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(82, 168, 236, .6);\n  -moz-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(82, 168, 236, .6);\n  box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(82, 168, 236, .6);\n}\n.bootstrap-switch.bootstrap-switch-on .bootstrap-switch-label,\n.bootstrap-switch.bootstrap-switch-inverse.bootstrap-switch-off .bootstrap-switch-label {\n  -webkit-border-top-right-radius: 4px;\n  -moz-border-radius-topright: 4px;\n  border-top-right-radius: 4px;\n  -webkit-border-bottom-right-radius: 4px;\n  -moz-border-radius-bottomright: 4px;\n  border-bottom-right-radius: 4px;\n}\n.bootstrap-switch.bootstrap-switch-off .bootstrap-switch-label,\n.bootstrap-switch.bootstrap-switch-inverse.bootstrap-switch-on .bootstrap-switch-label {\n  -webkit-border-top-left-radius: 4px;\n  -moz-border-radius-topleft: 4px;\n  border-top-left-radius: 4px;\n  -webkit-border-bottom-left-radius: 4px;\n  -moz-border-radius-bottomleft: 4px;\n  border-bottom-left-radius: 4px;\n}\n"
  },
  {
    "path": "static/bootstrap/plugins/bootstrap-switch/css/bootstrap3/bootstrap-switch.css",
    "content": "/**\n  * bootstrap-switch - Turn checkboxes and radio buttons into toggle switches.\n  *\n  * @version v3.3.4\n  * @homepage https://bttstrp.github.io/bootstrap-switch\n  * @author Mattia Larentis <mattia@larentis.eu> (http://larentis.eu)\n  * @license Apache-2.0\n  */\n\n.bootstrap-switch {\n  display: inline-block;\n  direction: ltr;\n  cursor: pointer;\n  border-radius: 4px;\n  border: 1px solid;\n  border-color: #ccc;\n  position: relative;\n  text-align: left;\n  overflow: hidden;\n  line-height: 8px;\n  z-index: 0;\n  -webkit-user-select: none;\n  -moz-user-select: none;\n  -ms-user-select: none;\n  user-select: none;\n  vertical-align: middle;\n  -webkit-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;\n  -o-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;\n  transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;\n}\n.bootstrap-switch .bootstrap-switch-container {\n  display: inline-block;\n  top: 0;\n  border-radius: 4px;\n  -webkit-transform: translate3d(0, 0, 0);\n  transform: translate3d(0, 0, 0);\n}\n.bootstrap-switch .bootstrap-switch-handle-on,\n.bootstrap-switch .bootstrap-switch-handle-off,\n.bootstrap-switch .bootstrap-switch-label {\n  -webkit-box-sizing: border-box;\n  -moz-box-sizing: border-box;\n  box-sizing: border-box;\n  cursor: pointer;\n  display: table-cell;\n  vertical-align: middle;\n  padding: 6px 12px;\n  font-size: 14px;\n  line-height: 20px;\n}\n.bootstrap-switch .bootstrap-switch-handle-on,\n.bootstrap-switch .bootstrap-switch-handle-off {\n  text-align: center;\n  z-index: 1;\n}\n.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-primary,\n.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-primary {\n  color: #fff;\n  background: #337ab7;\n}\n.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-info,\n.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-info {\n  color: #fff;\n  background: #5bc0de;\n}\n.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-success,\n.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-success {\n  color: #fff;\n  background: #5cb85c;\n}\n.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-warning,\n.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-warning {\n  background: #f0ad4e;\n  color: #fff;\n}\n.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-danger,\n.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-danger {\n  color: #fff;\n  background: #d9534f;\n}\n.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-default,\n.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-default {\n  color: #000;\n  background: #eeeeee;\n}\n.bootstrap-switch .bootstrap-switch-label {\n  text-align: center;\n  margin-top: -1px;\n  margin-bottom: -1px;\n  z-index: 100;\n  color: #333;\n  background: #fff;\n}\n.bootstrap-switch span::before {\n  content: \"\\200b\";\n}\n.bootstrap-switch .bootstrap-switch-handle-on {\n  border-bottom-left-radius: 3px;\n  border-top-left-radius: 3px;\n}\n.bootstrap-switch .bootstrap-switch-handle-off {\n  border-bottom-right-radius: 3px;\n  border-top-right-radius: 3px;\n}\n.bootstrap-switch input[type='radio'],\n.bootstrap-switch input[type='checkbox'] {\n  position: absolute !important;\n  top: 0;\n  left: 0;\n  margin: 0;\n  z-index: -1;\n  opacity: 0;\n  filter: alpha(opacity=0);\n  visibility: hidden;\n}\n.bootstrap-switch.bootstrap-switch-mini .bootstrap-switch-handle-on,\n.bootstrap-switch.bootstrap-switch-mini .bootstrap-switch-handle-off,\n.bootstrap-switch.bootstrap-switch-mini .bootstrap-switch-label {\n  padding: 1px 5px;\n  font-size: 12px;\n  line-height: 1.5;\n}\n.bootstrap-switch.bootstrap-switch-small .bootstrap-switch-handle-on,\n.bootstrap-switch.bootstrap-switch-small .bootstrap-switch-handle-off,\n.bootstrap-switch.bootstrap-switch-small .bootstrap-switch-label {\n  padding: 5px 10px;\n  font-size: 12px;\n  line-height: 1.5;\n}\n.bootstrap-switch.bootstrap-switch-large .bootstrap-switch-handle-on,\n.bootstrap-switch.bootstrap-switch-large .bootstrap-switch-handle-off,\n.bootstrap-switch.bootstrap-switch-large .bootstrap-switch-label {\n  padding: 6px 16px;\n  font-size: 18px;\n  line-height: 1.3333333;\n}\n.bootstrap-switch.bootstrap-switch-disabled,\n.bootstrap-switch.bootstrap-switch-readonly,\n.bootstrap-switch.bootstrap-switch-indeterminate {\n  cursor: default !important;\n}\n.bootstrap-switch.bootstrap-switch-disabled .bootstrap-switch-handle-on,\n.bootstrap-switch.bootstrap-switch-readonly .bootstrap-switch-handle-on,\n.bootstrap-switch.bootstrap-switch-indeterminate .bootstrap-switch-handle-on,\n.bootstrap-switch.bootstrap-switch-disabled .bootstrap-switch-handle-off,\n.bootstrap-switch.bootstrap-switch-readonly .bootstrap-switch-handle-off,\n.bootstrap-switch.bootstrap-switch-indeterminate .bootstrap-switch-handle-off,\n.bootstrap-switch.bootstrap-switch-disabled .bootstrap-switch-label,\n.bootstrap-switch.bootstrap-switch-readonly .bootstrap-switch-label,\n.bootstrap-switch.bootstrap-switch-indeterminate .bootstrap-switch-label {\n  opacity: 0.5;\n  filter: alpha(opacity=50);\n  cursor: default !important;\n}\n.bootstrap-switch.bootstrap-switch-animate .bootstrap-switch-container {\n  -webkit-transition: margin-left 0.5s;\n  -o-transition: margin-left 0.5s;\n  transition: margin-left 0.5s;\n}\n.bootstrap-switch.bootstrap-switch-inverse .bootstrap-switch-handle-on {\n  border-bottom-left-radius: 0;\n  border-top-left-radius: 0;\n  border-bottom-right-radius: 3px;\n  border-top-right-radius: 3px;\n}\n.bootstrap-switch.bootstrap-switch-inverse .bootstrap-switch-handle-off {\n  border-bottom-right-radius: 0;\n  border-top-right-radius: 0;\n  border-bottom-left-radius: 3px;\n  border-top-left-radius: 3px;\n}\n.bootstrap-switch.bootstrap-switch-focused {\n  border-color: #66afe9;\n  outline: 0;\n  -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, 0.6);\n  box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, 0.6);\n}\n.bootstrap-switch.bootstrap-switch-on .bootstrap-switch-label,\n.bootstrap-switch.bootstrap-switch-inverse.bootstrap-switch-off .bootstrap-switch-label {\n  border-bottom-right-radius: 3px;\n  border-top-right-radius: 3px;\n}\n.bootstrap-switch.bootstrap-switch-off .bootstrap-switch-label,\n.bootstrap-switch.bootstrap-switch-inverse.bootstrap-switch-on .bootstrap-switch-label {\n  border-bottom-left-radius: 3px;\n  border-top-left-radius: 3px;\n}\n"
  },
  {
    "path": "static/bootstrap/plugins/bootstrap-switch/js/bootstrap-switch.js",
    "content": "/**\n  * bootstrap-switch - Turn checkboxes and radio buttons into toggle switches.\n  *\n  * @version v3.3.4\n  * @homepage https://bttstrp.github.io/bootstrap-switch\n  * @author Mattia Larentis <mattia@larentis.eu> (http://larentis.eu)\n  * @license Apache-2.0\n  */\n\n(function (global, factory) {\n  if (typeof define === \"function\" && define.amd) {\n    define(['jquery'], factory);\n  } else if (typeof exports !== \"undefined\") {\n    factory(require('jquery'));\n  } else {\n    var mod = {\n      exports: {}\n    };\n    factory(global.jquery);\n    global.bootstrapSwitch = mod.exports;\n  }\n})(this, function (_jquery) {\n  'use strict';\n\n  var _jquery2 = _interopRequireDefault(_jquery);\n\n  function _interopRequireDefault(obj) {\n    return obj && obj.__esModule ? obj : {\n      default: obj\n    };\n  }\n\n  var _extends = Object.assign || function (target) {\n    for (var i = 1; i < arguments.length; i++) {\n      var source = arguments[i];\n\n      for (var key in source) {\n        if (Object.prototype.hasOwnProperty.call(source, key)) {\n          target[key] = source[key];\n        }\n      }\n    }\n\n    return target;\n  };\n\n  function _classCallCheck(instance, Constructor) {\n    if (!(instance instanceof Constructor)) {\n      throw new TypeError(\"Cannot call a class as a function\");\n    }\n  }\n\n  var _createClass = function () {\n    function defineProperties(target, props) {\n      for (var i = 0; i < props.length; i++) {\n        var descriptor = props[i];\n        descriptor.enumerable = descriptor.enumerable || false;\n        descriptor.configurable = true;\n        if (\"value\" in descriptor) descriptor.writable = true;\n        Object.defineProperty(target, descriptor.key, descriptor);\n      }\n    }\n\n    return function (Constructor, protoProps, staticProps) {\n      if (protoProps) defineProperties(Constructor.prototype, protoProps);\n      if (staticProps) defineProperties(Constructor, staticProps);\n      return Constructor;\n    };\n  }();\n\n  var $ = _jquery2.default || window.jQuery || window.$;\n\n  var BootstrapSwitch = function () {\n    function BootstrapSwitch(element) {\n      var _this = this;\n\n      var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n      _classCallCheck(this, BootstrapSwitch);\n\n      this.$element = $(element);\n      this.options = $.extend({}, $.fn.bootstrapSwitch.defaults, this._getElementOptions(), options);\n      this.prevOptions = {};\n      this.$wrapper = $('<div>', {\n        class: function _class() {\n          var classes = [];\n          classes.push(_this.options.state ? 'on' : 'off');\n          if (_this.options.size) {\n            classes.push(_this.options.size);\n          }\n          if (_this.options.disabled) {\n            classes.push('disabled');\n          }\n          if (_this.options.readonly) {\n            classes.push('readonly');\n          }\n          if (_this.options.indeterminate) {\n            classes.push('indeterminate');\n          }\n          if (_this.options.inverse) {\n            classes.push('inverse');\n          }\n          if (_this.$element.attr('id')) {\n            classes.push('id-' + _this.$element.attr('id'));\n          }\n          return classes.map(_this._getClass.bind(_this)).concat([_this.options.baseClass], _this._getClasses(_this.options.wrapperClass)).join(' ');\n        }\n      });\n      this.$container = $('<div>', { class: this._getClass('container') });\n      this.$on = $('<span>', {\n        html: this.options.onText,\n        class: this._getClass('handle-on') + ' ' + this._getClass(this.options.onColor)\n      });\n      this.$off = $('<span>', {\n        html: this.options.offText,\n        class: this._getClass('handle-off') + ' ' + this._getClass(this.options.offColor)\n      });\n      this.$label = $('<span>', {\n        html: this.options.labelText,\n        class: this._getClass('label')\n      });\n\n      this.$element.on('init.bootstrapSwitch', this.options.onInit.bind(this, element));\n      this.$element.on('switchChange.bootstrapSwitch', function () {\n        for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n          args[_key] = arguments[_key];\n        }\n\n        if (_this.options.onSwitchChange.apply(element, args) === false) {\n          if (_this.$element.is(':radio')) {\n            $('[name=\"' + _this.$element.attr('name') + '\"]').trigger('previousState.bootstrapSwitch', true);\n          } else {\n            _this.$element.trigger('previousState.bootstrapSwitch', true);\n          }\n        }\n      });\n\n      this.$container = this.$element.wrap(this.$container).parent();\n      this.$wrapper = this.$container.wrap(this.$wrapper).parent();\n      this.$element.before(this.options.inverse ? this.$off : this.$on).before(this.$label).before(this.options.inverse ? this.$on : this.$off);\n\n      if (this.options.indeterminate) {\n        this.$element.prop('indeterminate', true);\n      }\n\n      this._init();\n      this._elementHandlers();\n      this._handleHandlers();\n      this._labelHandlers();\n      this._formHandler();\n      this._externalLabelHandler();\n      this.$element.trigger('init.bootstrapSwitch', this.options.state);\n    }\n\n    _createClass(BootstrapSwitch, [{\n      key: 'setPrevOptions',\n      value: function setPrevOptions() {\n        this.prevOptions = _extends({}, this.options);\n      }\n    }, {\n      key: 'state',\n      value: function state(value, skip) {\n        if (typeof value === 'undefined') {\n          return this.options.state;\n        }\n        if (this.options.disabled || this.options.readonly || this.options.state && !this.options.radioAllOff && this.$element.is(':radio')) {\n          return this.$element;\n        }\n        if (this.$element.is(':radio')) {\n          $('[name=\"' + this.$element.attr('name') + '\"]').trigger('setPreviousOptions.bootstrapSwitch');\n        } else {\n          this.$element.trigger('setPreviousOptions.bootstrapSwitch');\n        }\n        if (this.options.indeterminate) {\n          this.indeterminate(false);\n        }\n        this.$element.prop('checked', Boolean(value)).trigger('change.bootstrapSwitch', skip);\n        return this.$element;\n      }\n    }, {\n      key: 'toggleState',\n      value: function toggleState(skip) {\n        if (this.options.disabled || this.options.readonly) {\n          return this.$element;\n        }\n        if (this.options.indeterminate) {\n          this.indeterminate(false);\n          return this.state(true);\n        } else {\n          return this.$element.prop('checked', !this.options.state).trigger('change.bootstrapSwitch', skip);\n        }\n      }\n    }, {\n      key: 'size',\n      value: function size(value) {\n        if (typeof value === 'undefined') {\n          return this.options.size;\n        }\n        if (this.options.size != null) {\n          this.$wrapper.removeClass(this._getClass(this.options.size));\n        }\n        if (value) {\n          this.$wrapper.addClass(this._getClass(value));\n        }\n        this._width();\n        this._containerPosition();\n        this.options.size = value;\n        return this.$element;\n      }\n    }, {\n      key: 'animate',\n      value: function animate(value) {\n        if (typeof value === 'undefined') {\n          return this.options.animate;\n        }\n        if (this.options.animate === Boolean(value)) {\n          return this.$element;\n        }\n        return this.toggleAnimate();\n      }\n    }, {\n      key: 'toggleAnimate',\n      value: function toggleAnimate() {\n        this.options.animate = !this.options.animate;\n        this.$wrapper.toggleClass(this._getClass('animate'));\n        return this.$element;\n      }\n    }, {\n      key: 'disabled',\n      value: function disabled(value) {\n        if (typeof value === 'undefined') {\n          return this.options.disabled;\n        }\n        if (this.options.disabled === Boolean(value)) {\n          return this.$element;\n        }\n        return this.toggleDisabled();\n      }\n    }, {\n      key: 'toggleDisabled',\n      value: function toggleDisabled() {\n        this.options.disabled = !this.options.disabled;\n        this.$element.prop('disabled', this.options.disabled);\n        this.$wrapper.toggleClass(this._getClass('disabled'));\n        return this.$element;\n      }\n    }, {\n      key: 'readonly',\n      value: function readonly(value) {\n        if (typeof value === 'undefined') {\n          return this.options.readonly;\n        }\n        if (this.options.readonly === Boolean(value)) {\n          return this.$element;\n        }\n        return this.toggleReadonly();\n      }\n    }, {\n      key: 'toggleReadonly',\n      value: function toggleReadonly() {\n        this.options.readonly = !this.options.readonly;\n        this.$element.prop('readonly', this.options.readonly);\n        this.$wrapper.toggleClass(this._getClass('readonly'));\n        return this.$element;\n      }\n    }, {\n      key: 'indeterminate',\n      value: function indeterminate(value) {\n        if (typeof value === 'undefined') {\n          return this.options.indeterminate;\n        }\n        if (this.options.indeterminate === Boolean(value)) {\n          return this.$element;\n        }\n        return this.toggleIndeterminate();\n      }\n    }, {\n      key: 'toggleIndeterminate',\n      value: function toggleIndeterminate() {\n        this.options.indeterminate = !this.options.indeterminate;\n        this.$element.prop('indeterminate', this.options.indeterminate);\n        this.$wrapper.toggleClass(this._getClass('indeterminate'));\n        this._containerPosition();\n        return this.$element;\n      }\n    }, {\n      key: 'inverse',\n      value: function inverse(value) {\n        if (typeof value === 'undefined') {\n          return this.options.inverse;\n        }\n        if (this.options.inverse === Boolean(value)) {\n          return this.$element;\n        }\n        return this.toggleInverse();\n      }\n    }, {\n      key: 'toggleInverse',\n      value: function toggleInverse() {\n        this.$wrapper.toggleClass(this._getClass('inverse'));\n        var $on = this.$on.clone(true);\n        var $off = this.$off.clone(true);\n        this.$on.replaceWith($off);\n        this.$off.replaceWith($on);\n        this.$on = $off;\n        this.$off = $on;\n        this.options.inverse = !this.options.inverse;\n        return this.$element;\n      }\n    }, {\n      key: 'onColor',\n      value: function onColor(value) {\n        if (typeof value === 'undefined') {\n          return this.options.onColor;\n        }\n        if (this.options.onColor) {\n          this.$on.removeClass(this._getClass(this.options.onColor));\n        }\n        this.$on.addClass(this._getClass(value));\n        this.options.onColor = value;\n        return this.$element;\n      }\n    }, {\n      key: 'offColor',\n      value: function offColor(value) {\n        if (typeof value === 'undefined') {\n          return this.options.offColor;\n        }\n        if (this.options.offColor) {\n          this.$off.removeClass(this._getClass(this.options.offColor));\n        }\n        this.$off.addClass(this._getClass(value));\n        this.options.offColor = value;\n        return this.$element;\n      }\n    }, {\n      key: 'onText',\n      value: function onText(value) {\n        if (typeof value === 'undefined') {\n          return this.options.onText;\n        }\n        this.$on.html(value);\n        this._width();\n        this._containerPosition();\n        this.options.onText = value;\n        return this.$element;\n      }\n    }, {\n      key: 'offText',\n      value: function offText(value) {\n        if (typeof value === 'undefined') {\n          return this.options.offText;\n        }\n        this.$off.html(value);\n        this._width();\n        this._containerPosition();\n        this.options.offText = value;\n        return this.$element;\n      }\n    }, {\n      key: 'labelText',\n      value: function labelText(value) {\n        if (typeof value === 'undefined') {\n          return this.options.labelText;\n        }\n        this.$label.html(value);\n        this._width();\n        this.options.labelText = value;\n        return this.$element;\n      }\n    }, {\n      key: 'handleWidth',\n      value: function handleWidth(value) {\n        if (typeof value === 'undefined') {\n          return this.options.handleWidth;\n        }\n        this.options.handleWidth = value;\n        this._width();\n        this._containerPosition();\n        return this.$element;\n      }\n    }, {\n      key: 'labelWidth',\n      value: function labelWidth(value) {\n        if (typeof value === 'undefined') {\n          return this.options.labelWidth;\n        }\n        this.options.labelWidth = value;\n        this._width();\n        this._containerPosition();\n        return this.$element;\n      }\n    }, {\n      key: 'baseClass',\n      value: function baseClass(value) {\n        return this.options.baseClass;\n      }\n    }, {\n      key: 'wrapperClass',\n      value: function wrapperClass(value) {\n        if (typeof value === 'undefined') {\n          return this.options.wrapperClass;\n        }\n        if (!value) {\n          value = $.fn.bootstrapSwitch.defaults.wrapperClass;\n        }\n        this.$wrapper.removeClass(this._getClasses(this.options.wrapperClass).join(' '));\n        this.$wrapper.addClass(this._getClasses(value).join(' '));\n        this.options.wrapperClass = value;\n        return this.$element;\n      }\n    }, {\n      key: 'radioAllOff',\n      value: function radioAllOff(value) {\n        if (typeof value === 'undefined') {\n          return this.options.radioAllOff;\n        }\n        var val = Boolean(value);\n        if (this.options.radioAllOff === val) {\n          return this.$element;\n        }\n        this.options.radioAllOff = val;\n        return this.$element;\n      }\n    }, {\n      key: 'onInit',\n      value: function onInit(value) {\n        if (typeof value === 'undefined') {\n          return this.options.onInit;\n        }\n        if (!value) {\n          value = $.fn.bootstrapSwitch.defaults.onInit;\n        }\n        this.options.onInit = value;\n        return this.$element;\n      }\n    }, {\n      key: 'onSwitchChange',\n      value: function onSwitchChange(value) {\n        if (typeof value === 'undefined') {\n          return this.options.onSwitchChange;\n        }\n        if (!value) {\n          value = $.fn.bootstrapSwitch.defaults.onSwitchChange;\n        }\n        this.options.onSwitchChange = value;\n        return this.$element;\n      }\n    }, {\n      key: 'destroy',\n      value: function destroy() {\n        var $form = this.$element.closest('form');\n        if ($form.length) {\n          $form.off('reset.bootstrapSwitch').removeData('bootstrap-switch');\n        }\n        this.$container.children().not(this.$element).remove();\n        this.$element.unwrap().unwrap().off('.bootstrapSwitch').removeData('bootstrap-switch');\n        return this.$element;\n      }\n    }, {\n      key: '_getElementOptions',\n      value: function _getElementOptions() {\n        return {\n          state: this.$element.is(':checked'),\n          size: this.$element.data('size'),\n          animate: this.$element.data('animate'),\n          disabled: this.$element.is(':disabled'),\n          readonly: this.$element.is('[readonly]'),\n          indeterminate: this.$element.data('indeterminate'),\n          inverse: this.$element.data('inverse'),\n          radioAllOff: this.$element.data('radio-all-off'),\n          onColor: this.$element.data('on-color'),\n          offColor: this.$element.data('off-color'),\n          onText: this.$element.data('on-text'),\n          offText: this.$element.data('off-text'),\n          labelText: this.$element.data('label-text'),\n          handleWidth: this.$element.data('handle-width'),\n          labelWidth: this.$element.data('label-width'),\n          baseClass: this.$element.data('base-class'),\n          wrapperClass: this.$element.data('wrapper-class')\n        };\n      }\n    }, {\n      key: '_width',\n      value: function _width() {\n        var _this2 = this;\n\n        var $handles = this.$on.add(this.$off).add(this.$label).css('width', '');\n        var handleWidth = this.options.handleWidth === 'auto' ? Math.round(Math.max(this.$on.width(), this.$off.width())) : this.options.handleWidth;\n        $handles.width(handleWidth);\n        this.$label.width(function (index, width) {\n          if (_this2.options.labelWidth !== 'auto') {\n            return _this2.options.labelWidth;\n          }\n          if (width < handleWidth) {\n            return handleWidth;\n          }\n          return width;\n        });\n        this._handleWidth = this.$on.outerWidth();\n        this._labelWidth = this.$label.outerWidth();\n        this.$container.width(this._handleWidth * 2 + this._labelWidth);\n        return this.$wrapper.width(this._handleWidth + this._labelWidth);\n      }\n    }, {\n      key: '_containerPosition',\n      value: function _containerPosition() {\n        var _this3 = this;\n\n        var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.options.state;\n        var callback = arguments[1];\n\n        this.$container.css('margin-left', function () {\n          var values = [0, '-' + _this3._handleWidth + 'px'];\n          if (_this3.options.indeterminate) {\n            return '-' + _this3._handleWidth / 2 + 'px';\n          }\n          if (state) {\n            if (_this3.options.inverse) {\n              return values[1];\n            } else {\n              return values[0];\n            }\n          } else {\n            if (_this3.options.inverse) {\n              return values[0];\n            } else {\n              return values[1];\n            }\n          }\n        });\n      }\n    }, {\n      key: '_init',\n      value: function _init() {\n        var _this4 = this;\n\n        var init = function init() {\n          _this4.setPrevOptions();\n          _this4._width();\n          _this4._containerPosition();\n          setTimeout(function () {\n            if (_this4.options.animate) {\n              return _this4.$wrapper.addClass(_this4._getClass('animate'));\n            }\n          }, 50);\n        };\n        if (this.$wrapper.is(':visible')) {\n          init();\n          return;\n        }\n        var initInterval = window.setInterval(function () {\n          if (_this4.$wrapper.is(':visible')) {\n            init();\n            return window.clearInterval(initInterval);\n          }\n        }, 50);\n      }\n    }, {\n      key: '_elementHandlers',\n      value: function _elementHandlers() {\n        var _this5 = this;\n\n        return this.$element.on({\n          'setPreviousOptions.bootstrapSwitch': this.setPrevOptions.bind(this),\n\n          'previousState.bootstrapSwitch': function previousStateBootstrapSwitch() {\n            _this5.options = _this5.prevOptions;\n            if (_this5.options.indeterminate) {\n              _this5.$wrapper.addClass(_this5._getClass('indeterminate'));\n            }\n            _this5.$element.prop('checked', _this5.options.state).trigger('change.bootstrapSwitch', true);\n          },\n\n          'change.bootstrapSwitch': function changeBootstrapSwitch(event, skip) {\n            event.preventDefault();\n            event.stopImmediatePropagation();\n            var state = _this5.$element.is(':checked');\n            _this5._containerPosition(state);\n            if (state === _this5.options.state) {\n              return;\n            }\n            _this5.options.state = state;\n            _this5.$wrapper.toggleClass(_this5._getClass('off')).toggleClass(_this5._getClass('on'));\n            if (!skip) {\n              if (_this5.$element.is(':radio')) {\n                $('[name=\"' + _this5.$element.attr('name') + '\"]').not(_this5.$element).prop('checked', false).trigger('change.bootstrapSwitch', true);\n              }\n              _this5.$element.trigger('switchChange.bootstrapSwitch', [state]);\n            }\n          },\n\n          'focus.bootstrapSwitch': function focusBootstrapSwitch(event) {\n            event.preventDefault();\n            _this5.$wrapper.addClass(_this5._getClass('focused'));\n          },\n\n          'blur.bootstrapSwitch': function blurBootstrapSwitch(event) {\n            event.preventDefault();\n            _this5.$wrapper.removeClass(_this5._getClass('focused'));\n          },\n\n          'keydown.bootstrapSwitch': function keydownBootstrapSwitch(event) {\n            if (!event.which || _this5.options.disabled || _this5.options.readonly) {\n              return;\n            }\n            if (event.which === 37 || event.which === 39) {\n              event.preventDefault();\n              event.stopImmediatePropagation();\n              _this5.state(event.which === 39);\n            }\n          }\n        });\n      }\n    }, {\n      key: '_handleHandlers',\n      value: function _handleHandlers() {\n        var _this6 = this;\n\n        this.$on.on('click.bootstrapSwitch', function (event) {\n          event.preventDefault();\n          event.stopPropagation();\n          _this6.state(false);\n          return _this6.$element.trigger('focus.bootstrapSwitch');\n        });\n        return this.$off.on('click.bootstrapSwitch', function (event) {\n          event.preventDefault();\n          event.stopPropagation();\n          _this6.state(true);\n          return _this6.$element.trigger('focus.bootstrapSwitch');\n        });\n      }\n    }, {\n      key: '_labelHandlers',\n      value: function _labelHandlers() {\n        var _this7 = this;\n\n        var handlers = {\n          click: function click(event) {\n            event.stopPropagation();\n          },\n\n\n          'mousedown.bootstrapSwitch touchstart.bootstrapSwitch': function mousedownBootstrapSwitchTouchstartBootstrapSwitch(event) {\n            if (_this7._dragStart || _this7.options.disabled || _this7.options.readonly) {\n              return;\n            }\n            event.preventDefault();\n            event.stopPropagation();\n            _this7._dragStart = (event.pageX || event.originalEvent.touches[0].pageX) - parseInt(_this7.$container.css('margin-left'), 10);\n            if (_this7.options.animate) {\n              _this7.$wrapper.removeClass(_this7._getClass('animate'));\n            }\n            _this7.$element.trigger('focus.bootstrapSwitch');\n          },\n\n          'mousemove.bootstrapSwitch touchmove.bootstrapSwitch': function mousemoveBootstrapSwitchTouchmoveBootstrapSwitch(event) {\n            if (_this7._dragStart == null) {\n              return;\n            }\n            var difference = (event.pageX || event.originalEvent.touches[0].pageX) - _this7._dragStart;\n            event.preventDefault();\n            if (difference < -_this7._handleWidth || difference > 0) {\n              return;\n            }\n            _this7._dragEnd = difference;\n            _this7.$container.css('margin-left', _this7._dragEnd + 'px');\n          },\n\n          'mouseup.bootstrapSwitch touchend.bootstrapSwitch': function mouseupBootstrapSwitchTouchendBootstrapSwitch(event) {\n            if (!_this7._dragStart) {\n              return;\n            }\n            event.preventDefault();\n            if (_this7.options.animate) {\n              _this7.$wrapper.addClass(_this7._getClass('animate'));\n            }\n            if (_this7._dragEnd) {\n              var state = _this7._dragEnd > -(_this7._handleWidth / 2);\n              _this7._dragEnd = false;\n              _this7.state(_this7.options.inverse ? !state : state);\n            } else {\n              _this7.state(!_this7.options.state);\n            }\n            _this7._dragStart = false;\n          },\n\n          'mouseleave.bootstrapSwitch': function mouseleaveBootstrapSwitch() {\n            _this7.$label.trigger('mouseup.bootstrapSwitch');\n          }\n        };\n        this.$label.on(handlers);\n      }\n    }, {\n      key: '_externalLabelHandler',\n      value: function _externalLabelHandler() {\n        var _this8 = this;\n\n        var $externalLabel = this.$element.closest('label');\n        $externalLabel.on('click', function (event) {\n          event.preventDefault();\n          event.stopImmediatePropagation();\n          if (event.target === $externalLabel[0]) {\n            _this8.toggleState();\n          }\n        });\n      }\n    }, {\n      key: '_formHandler',\n      value: function _formHandler() {\n        var $form = this.$element.closest('form');\n        if ($form.data('bootstrap-switch')) {\n          return;\n        }\n        $form.on('reset.bootstrapSwitch', function () {\n          window.setTimeout(function () {\n            $form.find('input').filter(function () {\n              return $(this).data('bootstrap-switch');\n            }).each(function () {\n              return $(this).bootstrapSwitch('state', this.checked);\n            });\n          }, 1);\n        }).data('bootstrap-switch', true);\n      }\n    }, {\n      key: '_getClass',\n      value: function _getClass(name) {\n        return this.options.baseClass + '-' + name;\n      }\n    }, {\n      key: '_getClasses',\n      value: function _getClasses(classes) {\n        if (!$.isArray(classes)) {\n          return [this._getClass(classes)];\n        }\n        return classes.map(this._getClass.bind(this));\n      }\n    }]);\n\n    return BootstrapSwitch;\n  }();\n\n  $.fn.bootstrapSwitch = function (option) {\n    for (var _len2 = arguments.length, args = Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n      args[_key2 - 1] = arguments[_key2];\n    }\n\n    function reducer(ret, next) {\n      var $this = $(next);\n      var existingData = $this.data('bootstrap-switch');\n      var data = existingData || new BootstrapSwitch(next, option);\n      if (!existingData) {\n        $this.data('bootstrap-switch', data);\n      }\n      if (typeof option === 'string') {\n        return data[option].apply(data, args);\n      }\n      return ret;\n    }\n    return Array.prototype.reduce.call(this, reducer, this);\n  };\n  $.fn.bootstrapSwitch.Constructor = BootstrapSwitch;\n  $.fn.bootstrapSwitch.defaults = {\n    state: true,\n    size: null,\n    animate: true,\n    disabled: false,\n    readonly: false,\n    indeterminate: false,\n    inverse: false,\n    radioAllOff: false,\n    onColor: 'primary',\n    offColor: 'default',\n    onText: 'ON',\n    offText: 'OFF',\n    labelText: '&nbsp',\n    handleWidth: 'auto',\n    labelWidth: 'auto',\n    baseClass: 'bootstrap-switch',\n    wrapperClass: 'wrapper',\n    onInit: function onInit() {},\n    onSwitchChange: function onSwitchChange() {}\n  };\n});\n"
  },
  {
    "path": "static/bootstrap/plugins/bootstrap-wysiwyg/bootstrap-wysiwyg.js",
    "content": "/* http://github.com/mindmup/bootstrap-wysiwyg */\n/*global jQuery, $, FileReader*/\n/*jslint browser:true*/\n(function ($) {\n\t'use strict';\n\tvar readFileIntoDataUrl = function (fileInfo) {\n\t\tvar loader = $.Deferred(),\n\t\t\tfReader = new FileReader();\n\t\tfReader.onload = function (e) {\n\t\t\tloader.resolve(e.target.result);\n\t\t};\n\t\tfReader.onerror = loader.reject;\n\t\tfReader.onprogress = loader.notify;\n\t\tfReader.readAsDataURL(fileInfo);\n\t\treturn loader.promise();\n\t};\n\t$.fn.cleanHtml = function () {\n\t\tvar html = $(this).html();\n\t\treturn html && html.replace(/(<br>|\\s|<div><br><\\/div>|&nbsp;)*$/, '');\n\t};\n\t$.fn.wysiwyg = function (userOptions) {\n\t\tvar editor = this,\n\t\t\tselectedRange,\n\t\t\toptions,\n\t\t\ttoolbarBtnSelector,\n\t\t\tupdateToolbar = function () {\n\t\t\t\tif (options.activeToolbarClass) {\n\t\t\t\t\tvar selection = window.getSelection();\n\t\t\t\t\ttry {\n                        var tag = 'formatBlock ' + selection.focusNode.parentNode.nodeName.toLowerCase();\n                    }catch (e){\n\t\t\t\t\t\tconsole.log(e);\n\t\t\t\t\t\ttag = '';\n\t\t\t\t\t}\n\t\t\t\t\t$(options.toolbarSelector).find(toolbarBtnSelector).each(function () {\n\t\t\t\t\t\tvar command = $(this).data(options.commandRole);\n\t\t\t\t\t\tif (document.queryCommandState(command) || tag === command) {\n\t\t\t\t\t\t\t$(this).addClass(options.activeToolbarClass);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$(this).removeClass(options.activeToolbarClass);\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t},\n\t\t\texecCommand = function (commandWithArgs, valueArg) {\n\t\t\t\tvar commandArr = commandWithArgs.split(' '),\n\t\t\t\t\tcommand = commandArr.shift(),\n\t\t\t\t\targs = commandArr.join(' ') + (valueArg || '');\n\n\t\t\t\tif(command === 'formatBlock'){\n                    var selection = window.getSelection();\n\n                    if(selection.focusNode.parentNode.nodeName.toLowerCase() === args){\n                    \targs = '<p>';\n\t\t\t\t\t}else{\n                        args = '<' + args + '>';\n\t\t\t\t\t}\n\t\t\t\t}else if(command === 'enterAction'){\n\n\t\t\t\t}\n\n\t\t\t\tdocument.execCommand(command, 0, args);\n\t\t\t\tupdateToolbar();\n                editor.change && editor.change();\n\t\t\t},\n            insertEmpty = function ($selectionElem) {\n\n\t\t\t\tinsertHtml('\\r\\n');\n         \t\treturn true;\n        \t},\n\t\t\tcodeHandler = function () {\n                var selection = window.getSelection();\n                try{\n                    var nodeName = selection.parentNode.nodeName;\n                    console.log(nodeName)\n                    if(nodeName !== 'CODE' && nodeName !== 'PRE'){\n\n                    }\n                    if (!document.queryCommandSupported('insertHTML')) {\n\n                    }\n                }catch (e){\n                    console.log(e)\n                }\n            },\n            enterKeyHandle = function (e) {\n                var selection = getCurrentRange();\n                try {\n                    var nodeName = selection.commonAncestorContainer.parentNode.nodeName;\n                    if(nodeName === 'CODE' || nodeName === 'PRE'){\n                        return insertEmpty(selection.parentNode);\n                    }else if(nodeName === \"DIV\" || nodeName === \"P\"){\n                    \treturn insertHtml('<br/>');\n\t\t\t\t\t}\n\t\t\t\t\tconsole.log(nodeName);\n                }catch (e){\n                \tconsole.log(selection)\n                \tconsole.log(\"enterKeyHandle:\" + e);\n\t\t\t\t}\n            },\n\t\t\tbindHotkeys = function (hotKeys) {\n\t\t\t\t$.each(hotKeys, function (hotkey, command) {\n\t\t\t\t\teditor.keydown(hotkey, function (e) {\n\t\t\t\t\t\tif (editor.attr('contenteditable') && editor.is(':visible')) {\n\t\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t\t\te.stopPropagation();\n\t\t\t\t\t\t\tif(hotkey === 'return'){\n\n\t\t\t\t\t\t\t\treturn enterKeyHandle(e);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\texecCommand(command);\n\t\t\t\t\t\t}\n\t\t\t\t\t}).keyup(hotkey, function (e) {\n\t\t\t\t\t\tif (editor.attr('contenteditable') && editor.is(':visible')) {\n\t\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t\t\te.stopPropagation();\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t\t},\n\t\t\tgetCurrentRange = function () {\n\t\t\t\tvar sel = window.getSelection();\n\t\t\t\tif (sel.getRangeAt && sel.rangeCount) {\n\t\t\t\t\treturn sel.getRangeAt(0);\n\t\t\t\t}\n\t\t\t},\n\t\t\tsaveSelection = function () {\n\t\t\t\tselectedRange = getCurrentRange();\n\t\t\t},\n\t\t\trestoreSelection = function () {\n\t\t\t\tvar selection = window.getSelection();\n\t\t\t\tif (selectedRange) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tselection.removeAllRanges();\n\t\t\t\t\t} catch (ex) {\n\t\t\t\t\t\tdocument.body.createTextRange().select();\n\t\t\t\t\t\tdocument.selection.empty();\n\t\t\t\t\t}\n\n\t\t\t\t\tselection.addRange(selectedRange);\n\t\t\t\t}\n\t\t\t},\n\t\t\tinsertFiles = function (files) {\n\t\t\t\teditor.focus();\n\t\t\t\t$.each(files, function (idx, fileInfo) {\n\t\t\t\t\tif (/^image\\//.test(fileInfo.type)) {\n\t\t\t\t\t\t$.when(readFileIntoDataUrl(fileInfo)).done(function (dataUrl) {\n\t\t\t\t\t\t\texecCommand('insertimage', dataUrl);\n\t\t\t\t\t\t}).fail(function (e) {\n\t\t\t\t\t\t\toptions.fileUploadError(\"file-reader\", e);\n\t\t\t\t\t\t});\n\t\t\t\t\t} else {\n\t\t\t\t\t\toptions.fileUploadError(\"unsupported-file-type\", fileInfo.type);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t},\n\t\t\tmarkSelection = function (input, color) {\n\t\t\t\trestoreSelection();\n\t\t\t\tif (document.queryCommandSupported('hiliteColor')) {\n\t\t\t\t\tdocument.execCommand('hiliteColor', 0, color || 'transparent');\n\t\t\t\t}\n\t\t\t\tsaveSelection();\n\t\t\t\tinput.data(options.selectionMarker, color);\n\t\t\t},\n\t\t\tbindToolbar = function (toolbar, options) {\n\t\t\t\ttoolbar.find(toolbarBtnSelector).click(function () {\n\t\t\t\t\trestoreSelection();\n\t\t\t\t\teditor.focus();\n\t\t\t\t\texecCommand($(this).data(options.commandRole));\n\t\t\t\t\tsaveSelection();\n\t\t\t\t});\n\t\t\t\ttoolbar.find('[data-toggle=dropdown]').click(restoreSelection);\n\n\t\t\t\ttoolbar.find('input[type=text][data-' + options.commandRole + ']').on('webkitspeechchange change', function () {\n\t\t\t\t\tvar newValue = this.value; /* ugly but prevents fake double-calls due to selection restoration */\n\t\t\t\t\tthis.value = '';\n\t\t\t\t\trestoreSelection();\n\t\t\t\t\tif (newValue) {\n\t\t\t\t\t\teditor.focus();\n\t\t\t\t\t\texecCommand($(this).data(options.commandRole), newValue);\n\t\t\t\t\t}\n\t\t\t\t\tsaveSelection();\n\t\t\t\t}).on('focus', function () {\n\t\t\t\t\tvar input = $(this);\n\t\t\t\t\tif (!input.data(options.selectionMarker)) {\n\t\t\t\t\t\tmarkSelection(input, options.selectionColor);\n\t\t\t\t\t\tinput.focus();\n\t\t\t\t\t}\n\t\t\t\t}).on('blur', function () {\n\t\t\t\t\tvar input = $(this);\n\t\t\t\t\tif (input.data(options.selectionMarker)) {\n\t\t\t\t\t\tmarkSelection(input, false);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\ttoolbar.find('input[type=file][data-' + options.commandRole + ']').change(function () {\n\t\t\t\t\trestoreSelection();\n\t\t\t\t\tif (this.type === 'file' && this.files && this.files.length > 0) {\n\t\t\t\t\t\tinsertFiles(this.files);\n\t\t\t\t\t}\n\t\t\t\t\tsaveSelection();\n\t\t\t\t\tthis.value = '';\n\t\t\t\t});\n\t\t\t},\n\t\t\tinitFileDrops = function () {\n\t\t\t\teditor.on('dragenter dragover', false)\n\t\t\t\t\t.on('drop', function (e) {\n\t\t\t\t\t\tvar dataTransfer = e.originalEvent.dataTransfer;\n\t\t\t\t\t\te.stopPropagation();\n\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t\tif (dataTransfer && dataTransfer.files && dataTransfer.files.length > 0) {\n\t\t\t\t\t\t\tinsertFiles(dataTransfer.files);\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t},\n\t\t\tinsertHtml = function (html) {\n                if(!document.queryCommandSupported('insertHTML')){\n                    var range = window.getSelection().getRangeAt(0);\n\n                    if (range.insertNode) {\n                        // IE\n                        range.deleteContents();\n                        range.insertNode($(args)[0]);\n                        updateToolbar();\n                        editor.change && editor.change();\n                    } else if (range.pasteHTML) {\n                        // IE <= 10\n                        range.pasteHTML(args);\n                        updateToolbar();\n                        editor.change && editor.change();\n                    }\n                }else{\n                    console.log(html)\n                \texecCommand('insertHTML',html);\n\t\t\t\t}\n            };\n\t\toptions = $.extend({}, $.fn.wysiwyg.defaults, userOptions);\n\t\ttoolbarBtnSelector = 'a[data-' + options.commandRole + '],button[data-' + options.commandRole + '],input[type=button][data-' + options.commandRole + ']';\n\t\tbindHotkeys(options.hotKeys);\n\t\tif (options.dragAndDropImages) {\n\t\t\tinitFileDrops();\n\t\t}\n\t\tbindToolbar($(options.toolbarSelector), options);\n\t\teditor.attr('contenteditable', true)\n\t\t\t.on('mouseup keyup mouseout', function () {\n\t\t\t\tsaveSelection();\n\t\t\t\tupdateToolbar();\n\t\t\t});\n\t\t$(window).bind('touchend', function (e) {\n\t\t\tvar isInside = (editor.is(e.target) || editor.has(e.target).length > 0),\n\t\t\t\tcurrentRange = getCurrentRange(),\n\t\t\t\tclear = currentRange && (currentRange.startContainer === currentRange.endContainer && currentRange.startOffset === currentRange.endOffset);\n\t\t\tif (!clear || isInside) {\n\t\t\t\tsaveSelection();\n\t\t\t\tupdateToolbar();\n\t\t\t}\n\t\t});\n\t\tthis.insertLink = function (linkUrl,linkTitle) {\n            restoreSelection();\n            editor.focus();\n            var args = '<a href=\"'+linkUrl+'\" target=\"_blank\">'+linkTitle+'</a>';\n\n            insertHtml(args);\n            saveSelection();\n        };\n\t\tthis.insertHtml = insertHtml;\n\t\treturn this;\n\t};\n\t$.fn.wysiwyg.defaults = {\n\t\thotKeys: {\n\t\t\t'ctrl+b meta+b': 'bold',\n\t\t\t'ctrl+i meta+i': 'italic',\n\t\t\t'ctrl+u meta+u': 'underline',\n\t\t\t'ctrl+z meta+z': 'undo',\n\t\t\t'ctrl+y meta+y meta+shift+z': 'redo',\n\t\t\t'ctrl+l meta+l': 'justifyleft',\n\t\t\t'ctrl+r meta+r': 'justifyright',\n\t\t\t'ctrl+e meta+e': 'justifycenter',\n\t\t\t'ctrl+j meta+j': 'justifyfull',\n\t\t\t'shift+tab': 'outdent',\n\t\t\t'tab': 'indent',\n            'return':'enterAction'\n\t\t},\n\t\ttoolbarSelector: '[data-role=editor-toolbar]',\n\t\tcommandRole: 'edit',\n\t\tactiveToolbarClass: 'btn-info',\n\t\tselectionMarker: 'edit-focus-marker',\n\t\tselectionColor: 'darkgrey',\n\t\tdragAndDropImages: true,\n\t\tfileUploadError: function (reason, detail) { console.log(\"File upload error\", reason, detail); }\n\t};\n}(window.jQuery));\n"
  },
  {
    "path": "static/bootstrap/plugins/bootstrap-wysiwyg/external/google-code-prettify/lang-apollo.js",
    "content": "PR.registerLangHandler(PR.createSimpleLexer([[\"com\",/^#[^\\n\\r]*/,null,\"#\"],[\"pln\",/^[\\t\\n\\r \\xa0]+/,null,\"\\t\\n\\r \\u00a0\"],[\"str\",/^\"(?:[^\"\\\\]|\\\\[\\S\\s])*(?:\"|$)/,null,'\"']],[[\"kwd\",/^(?:ADS|AD|AUG|BZF|BZMF|CAE|CAF|CA|CCS|COM|CS|DAS|DCA|DCOM|DCS|DDOUBL|DIM|DOUBLE|DTCB|DTCF|DV|DXCH|EDRUPT|EXTEND|INCR|INDEX|NDX|INHINT|LXCH|MASK|MSK|MP|MSU|NOOP|OVSK|QXCH|RAND|READ|RELINT|RESUME|RETURN|ROR|RXOR|SQUARE|SU|TCR|TCAA|OVSK|TCF|TC|TS|WAND|WOR|WRITE|XCH|XLQ|XXALQ|ZL|ZQ|ADD|ADZ|SUB|SUZ|MPY|MPR|MPZ|DVP|COM|ABS|CLA|CLZ|LDQ|STO|STQ|ALS|LLS|LRS|TRA|TSQ|TMI|TOV|AXT|TIX|DLY|INP|OUT)\\s/,\nnull],[\"typ\",/^(?:-?GENADR|=MINUS|2BCADR|VN|BOF|MM|-?2CADR|-?[1-6]DNADR|ADRES|BBCON|[ES]?BANK=?|BLOCK|BNKSUM|E?CADR|COUNT\\*?|2?DEC\\*?|-?DNCHAN|-?DNPTR|EQUALS|ERASE|MEMORY|2?OCT|REMADR|SETLOC|SUBRO|ORG|BSS|BES|SYN|EQU|DEFINE|END)\\s/,null],[\"lit\",/^'(?:-*(?:\\w|\\\\[!-~])(?:[\\w-]*|\\\\[!-~])[!=?]?)?/],[\"pln\",/^-*(?:[!-z]|\\\\[!-~])(?:[\\w-]*|\\\\[!-~])[!=?]?/],[\"pun\",/^[^\\w\\t\\n\\r \"'-);\\\\\\xa0]+/]]),[\"apollo\",\"agc\",\"aea\"]);\n"
  },
  {
    "path": "static/bootstrap/plugins/bootstrap-wysiwyg/external/google-code-prettify/lang-basic.js",
    "content": "var a=null;\nPR.registerLangHandler(PR.createSimpleLexer([[\"str\",/^\"(?:[^\\n\\r\"\\\\]|\\\\.)*(?:\"|$)/,a,'\"'],[\"pln\",/^\\s+/,a,\" \\r\\n\\t\\u00a0\"]],[[\"com\",/^REM[^\\n\\r]*/,a],[\"kwd\",/^\\b(?:AND|CLOSE|CLR|CMD|CONT|DATA|DEF ?FN|DIM|END|FOR|GET|GOSUB|GOTO|IF|INPUT|LET|LIST|LOAD|NEW|NEXT|NOT|ON|OPEN|OR|POKE|PRINT|READ|RESTORE|RETURN|RUN|SAVE|STEP|STOP|SYS|THEN|TO|VERIFY|WAIT)\\b/,a],[\"pln\",/^[a-z][^\\W_]?(?:\\$|%)?/i,a],[\"lit\",/^(?:\\d+(?:\\.\\d*)?|\\.\\d+)(?:e[+-]?\\d+)?/i,a,\"0123456789\"],[\"pun\",\n/^.[^\\s\\w\"$%.]*/,a]]),[\"basic\",\"cbm\"]);\n"
  },
  {
    "path": "static/bootstrap/plugins/bootstrap-wysiwyg/external/google-code-prettify/lang-clj.js",
    "content": "/*\n Copyright (C) 2011 Google Inc.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n*/\nvar a=null;\nPR.registerLangHandler(PR.createSimpleLexer([[\"opn\",/^[([{]+/,a,\"([{\"],[\"clo\",/^[)\\]}]+/,a,\")]}\"],[\"com\",/^;[^\\n\\r]*/,a,\";\"],[\"pln\",/^[\\t\\n\\r \\xa0]+/,a,\"\\t\\n\\r \\u00a0\"],[\"str\",/^\"(?:[^\"\\\\]|\\\\[\\S\\s])*(?:\"|$)/,a,'\"']],[[\"kwd\",/^(?:def|if|do|let|quote|var|fn|loop|recur|throw|try|monitor-enter|monitor-exit|defmacro|defn|defn-|macroexpand|macroexpand-1|for|doseq|dosync|dotimes|and|or|when|not|assert|doto|proxy|defstruct|first|rest|cons|defprotocol|deftype|defrecord|reify|defmulti|defmethod|meta|with-meta|ns|in-ns|create-ns|import|intern|refer|alias|namespace|resolve|ref|deref|refset|new|set!|memfn|to-array|into-array|aset|gen-class|reduce|map|filter|find|nil?|empty?|hash-map|hash-set|vec|vector|seq|flatten|reverse|assoc|dissoc|list|list?|disj|get|union|difference|intersection|extend|extend-type|extend-protocol|prn)\\b/,a],\n[\"typ\",/^:[\\dA-Za-z-]+/]]),[\"clj\"]);\n"
  },
  {
    "path": "static/bootstrap/plugins/bootstrap-wysiwyg/external/google-code-prettify/lang-css.js",
    "content": "PR.registerLangHandler(PR.createSimpleLexer([[\"pln\",/^[\\t\\n\\f\\r ]+/,null,\" \\t\\r\\n\\u000c\"]],[[\"str\",/^\"(?:[^\\n\\f\\r\"\\\\]|\\\\(?:\\r\\n?|\\n|\\f)|\\\\[\\S\\s])*\"/,null],[\"str\",/^'(?:[^\\n\\f\\r'\\\\]|\\\\(?:\\r\\n?|\\n|\\f)|\\\\[\\S\\s])*'/,null],[\"lang-css-str\",/^url\\(([^\"')]+)\\)/i],[\"kwd\",/^(?:url|rgb|!important|@import|@page|@media|@charset|inherit)(?=[^\\w-]|$)/i,null],[\"lang-css-kw\",/^(-?(?:[_a-z]|\\\\[\\da-f]+ ?)(?:[\\w-]|\\\\\\\\[\\da-f]+ ?)*)\\s*:/i],[\"com\",/^\\/\\*[^*]*\\*+(?:[^*/][^*]*\\*+)*\\//],\n[\"com\",/^(?:<\\!--|--\\>)/],[\"lit\",/^(?:\\d+|\\d*\\.\\d+)(?:%|[a-z]+)?/i],[\"lit\",/^#[\\da-f]{3,6}\\b/i],[\"pln\",/^-?(?:[_a-z]|\\\\[\\da-f]+ ?)(?:[\\w-]|\\\\\\\\[\\da-f]+ ?)*/i],[\"pun\",/^[^\\s\\w\"']+/]]),[\"css\"]);PR.registerLangHandler(PR.createSimpleLexer([],[[\"kwd\",/^-?(?:[_a-z]|\\\\[\\da-f]+ ?)(?:[\\w-]|\\\\\\\\[\\da-f]+ ?)*/i]]),[\"css-kw\"]);PR.registerLangHandler(PR.createSimpleLexer([],[[\"str\",/^[^\"')]+/]]),[\"css-str\"]);\n"
  },
  {
    "path": "static/bootstrap/plugins/bootstrap-wysiwyg/external/google-code-prettify/lang-dart.js",
    "content": "PR.registerLangHandler(PR.createSimpleLexer([[\"pln\",/^[\\t\\n\\r \\xa0]+/,null,\"\\t\\n\\r \\u00a0\"]],[[\"com\",/^#!.*/],[\"kwd\",/^\\b(?:import|library|part of|part|as|show|hide)\\b/i],[\"com\",/^\\/\\/.*/],[\"com\",/^\\/\\*[^*]*\\*+(?:[^*/][^*]*\\*+)*\\//],[\"kwd\",/^\\b(?:class|interface)\\b/i],[\"kwd\",/^\\b(?:assert|break|case|catch|continue|default|do|else|finally|for|if|in|is|new|return|super|switch|this|throw|try|while)\\b/i],[\"kwd\",/^\\b(?:abstract|const|extends|factory|final|get|implements|native|operator|set|static|typedef|var)\\b/i],\n[\"typ\",/^\\b(?:bool|double|dynamic|int|num|object|string|void)\\b/i],[\"kwd\",/^\\b(?:false|null|true)\\b/i],[\"str\",/^r?'''[\\S\\s]*?[^\\\\]'''/],[\"str\",/^r?\"\"\"[\\S\\s]*?[^\\\\]\"\"\"/],[\"str\",/^r?'('|[^\\n\\f\\r]*?[^\\\\]')/],[\"str\",/^r?\"(\"|[^\\n\\f\\r]*?[^\\\\]\")/],[\"pln\",/^[$_a-z]\\w*/i],[\"pun\",/^[!%&*+/:<-?^|~-]/],[\"lit\",/^\\b0x[\\da-f]+/i],[\"lit\",/^\\b\\d+(?:\\.\\d*)?(?:e[+-]?\\d+)?/i],[\"lit\",/^\\b\\.\\d+(?:e[+-]?\\d+)?/i],[\"pun\",/^[(),.;[\\]{}]/]]),\n[\"dart\"]);\n"
  },
  {
    "path": "static/bootstrap/plugins/bootstrap-wysiwyg/external/google-code-prettify/lang-erlang.js",
    "content": "PR.registerLangHandler(PR.createSimpleLexer([[\"pln\",/^[\\t-\\r ]+/,null,\"\\t\\n\\u000b\\u000c\\r \"],[\"str\",/^\"(?:[^\\n\\f\\r\"\\\\]|\\\\[\\S\\s])*(?:\"|$)/,null,'\"'],[\"lit\",/^[a-z]\\w*/],[\"lit\",/^'(?:[^\\n\\f\\r'\\\\]|\\\\[^&])+'?/,null,\"'\"],[\"lit\",/^\\?[^\\t\\n ({]+/,null,\"?\"],[\"lit\",/^(?:0o[0-7]+|0x[\\da-f]+|\\d+(?:\\.\\d+)?(?:e[+-]?\\d+)?)/i,null,\"0123456789\"]],[[\"com\",/^%[^\\n]*/],[\"kwd\",/^(?:module|attributes|do|let|in|letrec|apply|call|primop|case|of|end|when|fun|try|catch|receive|after|char|integer|float,atom,string,var)\\b/],\n[\"kwd\",/^-[_a-z]+/],[\"typ\",/^[A-Z_]\\w*/],[\"pun\",/^[,.;]/]]),[\"erlang\",\"erl\"]);\n"
  },
  {
    "path": "static/bootstrap/plugins/bootstrap-wysiwyg/external/google-code-prettify/lang-go.js",
    "content": "PR.registerLangHandler(PR.createSimpleLexer([[\"pln\",/^[\\t\\n\\r \\xa0]+/,null,\"\\t\\n\\r \\u00a0\"],[\"pln\",/^(?:\"(?:[^\"\\\\]|\\\\[\\S\\s])*(?:\"|$)|'(?:[^'\\\\]|\\\\[\\S\\s])+(?:'|$)|`[^`]*(?:`|$))/,null,\"\\\"'\"]],[[\"com\",/^(?:\\/\\/[^\\n\\r]*|\\/\\*[\\S\\s]*?\\*\\/)/],[\"pln\",/^(?:[^\"'/`]|\\/(?![*/]))+/]]),[\"go\"]);\n"
  },
  {
    "path": "static/bootstrap/plugins/bootstrap-wysiwyg/external/google-code-prettify/lang-hs.js",
    "content": "PR.registerLangHandler(PR.createSimpleLexer([[\"pln\",/^[\\t-\\r ]+/,null,\"\\t\\n\\u000b\\u000c\\r \"],[\"str\",/^\"(?:[^\\n\\f\\r\"\\\\]|\\\\[\\S\\s])*(?:\"|$)/,null,'\"'],[\"str\",/^'(?:[^\\n\\f\\r'\\\\]|\\\\[^&])'?/,null,\"'\"],[\"lit\",/^(?:0o[0-7]+|0x[\\da-f]+|\\d+(?:\\.\\d+)?(?:e[+-]?\\d+)?)/i,null,\"0123456789\"]],[[\"com\",/^(?:--+[^\\n\\f\\r]*|{-(?:[^-]|-+[^}-])*-})/],[\"kwd\",/^(?:case|class|data|default|deriving|do|else|if|import|in|infix|infixl|infixr|instance|let|module|newtype|of|then|type|where|_)(?=[^\\d'A-Za-z]|$)/,\nnull],[\"pln\",/^(?:[A-Z][\\w']*\\.)*[A-Za-z][\\w']*/],[\"pun\",/^[^\\d\\t-\\r \"'A-Za-z]+/]]),[\"hs\"]);\n"
  },
  {
    "path": "static/bootstrap/plugins/bootstrap-wysiwyg/external/google-code-prettify/lang-lisp.js",
    "content": "var a=null;\nPR.registerLangHandler(PR.createSimpleLexer([[\"opn\",/^\\(+/,a,\"(\"],[\"clo\",/^\\)+/,a,\")\"],[\"com\",/^;[^\\n\\r]*/,a,\";\"],[\"pln\",/^[\\t\\n\\r \\xa0]+/,a,\"\\t\\n\\r \\u00a0\"],[\"str\",/^\"(?:[^\"\\\\]|\\\\[\\S\\s])*(?:\"|$)/,a,'\"']],[[\"kwd\",/^(?:block|c[ad]+r|catch|con[ds]|def(?:ine|un)|do|eq|eql|equal|equalp|eval-when|flet|format|go|if|labels|lambda|let|load-time-value|locally|macrolet|multiple-value-call|nil|progn|progv|quote|require|return-from|setq|symbol-macrolet|t|tagbody|the|throw|unwind)\\b/,a],\n[\"lit\",/^[+-]?(?:[#0]x[\\da-f]+|\\d+\\/\\d+|(?:\\.\\d+|\\d+(?:\\.\\d*)?)(?:[de][+-]?\\d+)?)/i],[\"lit\",/^'(?:-*(?:\\w|\\\\[!-~])(?:[\\w-]*|\\\\[!-~])[!=?]?)?/],[\"pln\",/^-*(?:[_a-z]|\\\\[!-~])(?:[\\w-]*|\\\\[!-~])[!=?]?/i],[\"pun\",/^[^\\w\\t\\n\\r \"'-);\\\\\\xa0]+/]]),[\"cl\",\"el\",\"lisp\",\"lsp\",\"scm\",\"ss\",\"rkt\"]);\n"
  },
  {
    "path": "static/bootstrap/plugins/bootstrap-wysiwyg/external/google-code-prettify/lang-llvm.js",
    "content": "PR.registerLangHandler(PR.createSimpleLexer([[\"pln\",/^[\\t\\n\\r \\xa0]+/,null,\"\\t\\n\\r \\u00a0\"],[\"str\",/^!?\"(?:[^\"\\\\]|\\\\[\\S\\s])*(?:\"|$)/,null,'\"'],[\"com\",/^;[^\\n\\r]*/,null,\";\"]],[[\"pln\",/^[!%@](?:[$\\-.A-Z_a-z][\\w$\\-.]*|\\d+)/],[\"kwd\",/^[^\\W\\d]\\w*/,null],[\"lit\",/^\\d+\\.\\d+/],[\"lit\",/^(?:\\d+|0[Xx][\\dA-Fa-f]+)/],[\"pun\",/^[(-*,:<->[\\]{}]|\\.\\.\\.$/]]),[\"llvm\",\"ll\"]);\n"
  },
  {
    "path": "static/bootstrap/plugins/bootstrap-wysiwyg/external/google-code-prettify/lang-lua.js",
    "content": "PR.registerLangHandler(PR.createSimpleLexer([[\"pln\",/^[\\t\\n\\r \\xa0]+/,null,\"\\t\\n\\r \\u00a0\"],[\"str\",/^(?:\"(?:[^\"\\\\]|\\\\[\\S\\s])*(?:\"|$)|'(?:[^'\\\\]|\\\\[\\S\\s])*(?:'|$))/,null,\"\\\"'\"]],[[\"com\",/^--(?:\\[(=*)\\[[\\S\\s]*?(?:]\\1]|$)|[^\\n\\r]*)/],[\"str\",/^\\[(=*)\\[[\\S\\s]*?(?:]\\1]|$)/],[\"kwd\",/^(?:and|break|do|else|elseif|end|false|for|function|if|in|local|nil|not|or|repeat|return|then|true|until|while)\\b/,null],[\"lit\",/^[+-]?(?:0x[\\da-f]+|(?:\\.\\d+|\\d+(?:\\.\\d*)?)(?:e[+-]?\\d+)?)/i],\n[\"pln\",/^[_a-z]\\w*/i],[\"pun\",/^[^\\w\\t\\n\\r \\xa0][^\\w\\t\\n\\r \"'+=\\xa0-]*/]]),[\"lua\"]);\n"
  },
  {
    "path": "static/bootstrap/plugins/bootstrap-wysiwyg/external/google-code-prettify/lang-matlab.js",
    "content": "var a=null,b=window.PR,c=[[b.PR_PLAIN,/^[\\t-\\r \\xa0]+/,a,\" \\t\\r\\n\\u000b\\u000c\\u00a0\"],[b.PR_COMMENT,/^%{[^%]*%+(?:[^%}][^%]*%+)*}/,a],[b.PR_COMMENT,/^%[^\\n\\r]*/,a,\"%\"],[\"syscmd\",/^![^\\n\\r]*/,a,\"!\"]],d=[[\"linecont\",/^\\.\\.\\.\\s*[\\n\\r]/,a],[\"err\",/^\\?\\?\\? [^\\n\\r]*/,a],[\"wrn\",/^Warning: [^\\n\\r]*/,a],[\"codeoutput\",/^>>\\s+/,a],[\"codeoutput\",/^octave:\\d+>\\s+/,a],[\"lang-matlab-operators\",/^((?:[A-Za-z]\\w*(?:\\.[A-Za-z]\\w*)*|[).\\]}])')/,a],[\"lang-matlab-identifiers\",/^([A-Za-z]\\w*(?:\\.[A-Za-z]\\w*)*)(?!')/,a],\n[b.PR_STRING,/^'(?:[^']|'')*'/,a],[b.PR_LITERAL,/^[+-]?\\.?\\d+(?:\\.\\d*)?(?:[Ee][+-]?\\d+)?[ij]?/,a],[b.PR_TAG,/^[()[\\]{}]/,a],[b.PR_PUNCTUATION,/^[!&*-/:->@\\\\^|~]/,a]],e=[[\"lang-matlab-identifiers\",/^([A-Za-z]\\w*(?:\\.[A-Za-z]\\w*)*)/,a],[b.PR_TAG,/^[()[\\]{}]/,a],[b.PR_PUNCTUATION,/^[!&*-/:->@\\\\^|~]/,a],[\"transpose\",/^'/,a]];\nb.registerLangHandler(b.createSimpleLexer([],[[b.PR_KEYWORD,/^\\b(?:break|case|catch|classdef|continue|else|elseif|end|for|function|global|if|otherwise|parfor|persistent|return|spmd|switch|try|while)\\b/,a],[\"const\",/^\\b(?:true|false|inf|Inf|nan|NaN|eps|pi|ans|nargin|nargout|varargin|varargout)\\b/,a],[b.PR_TYPE,/^\\b(?:cell|struct|char|double|single|logical|u?int(?:8|16|32|64)|sparse)\\b/,a],[\"fun\",/^\\b(?:abs|accumarray|acos(?:d|h)?|acot(?:d|h)?|acsc(?:d|h)?|actxcontrol(?:list|select)?|actxGetRunningServer|actxserver|addlistener|addpath|addpref|addtodate|airy|align|alim|all|allchild|alpha|alphamap|amd|ancestor|and|angle|annotation|any|area|arrayfun|asec(?:d|h)?|asin(?:d|h)?|assert|assignin|atan[2dh]?|audiodevinfo|audioplayer|audiorecorder|aufinfo|auread|autumn|auwrite|avifile|aviinfo|aviread|axes|axis|balance|bar(?:3|3h|h)?|base2dec|beep|BeginInvoke|bench|bessel[h-ky]|beta|betainc|betaincinv|betaln|bicg|bicgstab|bicgstabl|bin2dec|bitand|bitcmp|bitget|bitmax|bitnot|bitor|bitset|bitshift|bitxor|blanks|blkdiag|bone|box|brighten|brush|bsxfun|builddocsearchdb|builtin|bvp4c|bvp5c|bvpget|bvpinit|bvpset|bvpxtend|calendar|calllib|callSoapService|camdolly|cameratoolbar|camlight|camlookat|camorbit|campan|campos|camproj|camroll|camtarget|camup|camva|camzoom|cart2pol|cart2sph|cast|cat|caxis|cd|cdf2rdf|cdfepoch|cdfinfo|cdflib(?:.(?:close|closeVar|computeEpoch|computeEpoch16|create|createAttr|createVar|delete|deleteAttr|deleteAttrEntry|deleteAttrgEntry|deleteVar|deleteVarRecords|epoch16Breakdown|epochBreakdown|getAttrEntry|getAttrgEntry|getAttrMaxEntry|getAttrMaxgEntry|getAttrName|getAttrNum|getAttrScope|getCacheSize|getChecksum|getCompression|getCompressionCacheSize|getConstantNames|getConstantValue|getCopyright|getFileBackward|getFormat|getLibraryCopyright|getLibraryVersion|getMajority|getName|getNumAttrEntries|getNumAttrgEntries|getNumAttributes|getNumgAttributes|getReadOnlyMode|getStageCacheSize|getValidate|getVarAllocRecords|getVarBlockingFactor|getVarCacheSize|getVarCompression|getVarData|getVarMaxAllocRecNum|getVarMaxWrittenRecNum|getVarName|getVarNum|getVarNumRecsWritten|getVarPadValue|getVarRecordData|getVarReservePercent|getVarsMaxWrittenRecNum|getVarSparseRecords|getVersion|hyperGetVarData|hyperPutVarData|inquire|inquireAttr|inquireAttrEntry|inquireAttrgEntry|inquireVar|open|putAttrEntry|putAttrgEntry|putVarData|putVarRecordData|renameAttr|renameVar|setCacheSize|setChecksum|setCompression|setCompressionCacheSize|setFileBackward|setFormat|setMajority|setReadOnlyMode|setStageCacheSize|setValidate|setVarAllocBlockRecords|setVarBlockingFactor|setVarCacheSize|setVarCompression|setVarInitialRecs|setVarPadValue|SetVarReservePercent|setVarsCacheSize|setVarSparseRecords))?|cdfread|cdfwrite|ceil|cell2mat|cell2struct|celldisp|cellfun|cellplot|cellstr|cgs|checkcode|checkin|checkout|chol|cholinc|cholupdate|circshift|cla|clabel|class|clc|clear|clearvars|clf|clipboard|clock|close|closereq|cmopts|cmpermute|cmunique|colamd|colon|colorbar|colordef|colormap|colormapeditor|colperm|Combine|comet|comet3|commandhistory|commandwindow|compan|compass|complex|computer|cond|condeig|condest|coneplot|conj|containers.Map|contour(?:[3cf]|slice)?|contrast|conv|conv2|convhull|convhulln|convn|cool|copper|copyfile|copyobj|corrcoef|cos(?:d|h)?|cot(?:d|h)?|cov|cplxpair|cputime|createClassFromWsdl|createSoapMessage|cross|csc(?:d|h)?|csvread|csvwrite|ctranspose|cumprod|cumsum|cumtrapz|curl|customverctrl|cylinder|daqread|daspect|datacursormode|datatipinfo|date|datenum|datestr|datetick|datevec|dbclear|dbcont|dbdown|dblquad|dbmex|dbquit|dbstack|dbstatus|dbstep|dbstop|dbtype|dbup|dde23|ddeget|ddesd|ddeset|deal|deblank|dec2base|dec2bin|dec2hex|decic|deconv|del2|delaunay|delaunay3|delaunayn|DelaunayTri|delete|demo|depdir|depfun|det|detrend|deval|diag|dialog|diary|diff|diffuse|dir|disp|display|dither|divergence|dlmread|dlmwrite|dmperm|doc|docsearch|dos|dot|dragrect|drawnow|dsearch|dsearchn|dynamicprops|echo|echodemo|edit|eig|eigs|ellipj|ellipke|ellipsoid|empty|enableNETfromNetworkDrive|enableservice|EndInvoke|enumeration|eomday|eq|erf|erfc|erfcinv|erfcx|erfinv|error|errorbar|errordlg|etime|etree|etreeplot|eval|evalc|evalin|event.(?:EventData|listener|PropertyEvent|proplistener)|exifread|exist|exit|exp|expint|expm|expm1|export2wsdlg|eye|ezcontour|ezcontourf|ezmesh|ezmeshc|ezplot|ezplot3|ezpolar|ezsurf|ezsurfc|factor|factorial|fclose|feather|feature|feof|ferror|feval|fft|fft2|fftn|fftshift|fftw|fgetl|fgets|fieldnames|figure|figurepalette|fileattrib|filebrowser|filemarker|fileparts|fileread|filesep|fill|fill3|filter|filter2|find|findall|findfigs|findobj|findstr|finish|fitsdisp|fitsinfo|fitsread|fitswrite|fix|flag|flipdim|fliplr|flipud|floor|flow|fminbnd|fminsearch|fopen|format|fplot|fprintf|frame2im|fread|freqspace|frewind|fscanf|fseek|ftell|FTP|full|fullfile|func2str|functions|funm|fwrite|fzero|gallery|gamma|gammainc|gammaincinv|gammaln|gca|gcbf|gcbo|gcd|gcf|gco|ge|genpath|genvarname|get|getappdata|getenv|getfield|getframe|getpixelposition|getpref|ginput|gmres|gplot|grabcode|gradient|gray|graymon|grid|griddata(?:3|n)?|griddedInterpolant|gsvd|gt|gtext|guidata|guide|guihandles|gunzip|gzip|h5create|h5disp|h5info|h5read|h5readatt|h5write|h5writeatt|hadamard|handle|hankel|hdf|hdf5|hdf5info|hdf5read|hdf5write|hdfinfo|hdfread|hdftool|help|helpbrowser|helpdesk|helpdlg|helpwin|hess|hex2dec|hex2num|hgexport|hggroup|hgload|hgsave|hgsetget|hgtransform|hidden|hilb|hist|histc|hold|home|horzcat|hostid|hot|hsv|hsv2rgb|hypot|ichol|idivide|ifft|ifft2|ifftn|ifftshift|ilu|im2frame|im2java|imag|image|imagesc|imapprox|imfinfo|imformats|import|importdata|imread|imwrite|ind2rgb|ind2sub|inferiorto|info|inline|inmem|inpolygon|input|inputdlg|inputname|inputParser|inspect|instrcallback|instrfind|instrfindall|int2str|integral(?:2|3)?|interp(?:1|1q|2|3|ft|n)|interpstreamspeed|intersect|intmax|intmin|inv|invhilb|ipermute|isa|isappdata|iscell|iscellstr|ischar|iscolumn|isdir|isempty|isequal|isequaln|isequalwithequalnans|isfield|isfinite|isfloat|isglobal|ishandle|ishghandle|ishold|isinf|isinteger|isjava|iskeyword|isletter|islogical|ismac|ismatrix|ismember|ismethod|isnan|isnumeric|isobject|isocaps|isocolors|isonormals|isosurface|ispc|ispref|isprime|isprop|isreal|isrow|isscalar|issorted|isspace|issparse|isstr|isstrprop|isstruct|isstudent|isunix|isvarname|isvector|javaaddpath|javaArray|javachk|javaclasspath|javacomponent|javaMethod|javaMethodEDT|javaObject|javaObjectEDT|javarmpath|jet|keyboard|kron|lasterr|lasterror|lastwarn|lcm|ldivide|ldl|le|legend|legendre|length|libfunctions|libfunctionsview|libisloaded|libpointer|libstruct|license|light|lightangle|lighting|lin2mu|line|lines|linkaxes|linkdata|linkprop|linsolve|linspace|listdlg|listfonts|load|loadlibrary|loadobj|log|log10|log1p|log2|loglog|logm|logspace|lookfor|lower|ls|lscov|lsqnonneg|lsqr|lt|lu|luinc|magic|makehgtform|mat2cell|mat2str|material|matfile|matlab.io.MatFile|matlab.mixin.(?:Copyable|Heterogeneous(?:.getDefaultScalarElement)?)|matlabrc|matlabroot|max|maxNumCompThreads|mean|median|membrane|memmapfile|memory|menu|mesh|meshc|meshgrid|meshz|meta.(?:class(?:.fromName)?|DynamicProperty|EnumeratedValue|event|MetaData|method|package(?:.(?:fromName|getAllPackages))?|property)|metaclass|methods|methodsview|mex(?:.getCompilerConfigurations)?|MException|mexext|mfilename|min|minres|minus|mislocked|mkdir|mkpp|mldivide|mlint|mlintrpt|mlock|mmfileinfo|mmreader|mod|mode|more|move|movefile|movegui|movie|movie2avi|mpower|mrdivide|msgbox|mtimes|mu2lin|multibandread|multibandwrite|munlock|namelengthmax|nargchk|narginchk|nargoutchk|native2unicode|nccreate|ncdisp|nchoosek|ncinfo|ncread|ncreadatt|ncwrite|ncwriteatt|ncwriteschema|ndgrid|ndims|ne|NET(?:.(?:addAssembly|Assembly|convertArray|createArray|createGeneric|disableAutoRelease|enableAutoRelease|GenericClass|invokeGenericMethod|NetException|setStaticProperty))?|netcdf.(?:abort|close|copyAtt|create|defDim|defGrp|defVar|defVarChunking|defVarDeflate|defVarFill|defVarFletcher32|delAtt|endDef|getAtt|getChunkCache|getConstant|getConstantNames|getVar|inq|inqAtt|inqAttID|inqAttName|inqDim|inqDimID|inqDimIDs|inqFormat|inqGrpName|inqGrpNameFull|inqGrpParent|inqGrps|inqLibVers|inqNcid|inqUnlimDims|inqVar|inqVarChunking|inqVarDeflate|inqVarFill|inqVarFletcher32|inqVarID|inqVarIDs|open|putAtt|putVar|reDef|renameAtt|renameDim|renameVar|setChunkCache|setDefaultFormat|setFill|sync)|newplot|nextpow2|nnz|noanimate|nonzeros|norm|normest|not|notebook|now|nthroot|null|num2cell|num2hex|num2str|numel|nzmax|ode(?:113|15i|15s|23|23s|23t|23tb|45)|odeget|odeset|odextend|onCleanup|ones|open|openfig|opengl|openvar|optimget|optimset|or|ordeig|orderfields|ordqz|ordschur|orient|orth|pack|padecoef|pagesetupdlg|pan|pareto|parseSoapResponse|pascal|patch|path|path2rc|pathsep|pathtool|pause|pbaspect|pcg|pchip|pcode|pcolor|pdepe|pdeval|peaks|perl|perms|permute|pie|pink|pinv|planerot|playshow|plot|plot3|plotbrowser|plotedit|plotmatrix|plottools|plotyy|plus|pol2cart|polar|poly|polyarea|polyder|polyeig|polyfit|polyint|polyval|polyvalm|pow2|power|ppval|prefdir|preferences|primes|print|printdlg|printopt|printpreview|prod|profile|profsave|propedit|propertyeditor|psi|publish|PutCharArray|PutFullMatrix|PutWorkspaceData|pwd|qhull|qmr|qr|qrdelete|qrinsert|qrupdate|quad|quad2d|quadgk|quadl|quadv|questdlg|quit|quiver|quiver3|qz|rand|randi|randn|randperm|RandStream(?:.(?:create|getDefaultStream|getGlobalStream|list|setDefaultStream|setGlobalStream))?|rank|rat|rats|rbbox|rcond|rdivide|readasync|real|reallog|realmax|realmin|realpow|realsqrt|record|rectangle|rectint|recycle|reducepatch|reducevolume|refresh|refreshdata|regexp|regexpi|regexprep|regexptranslate|rehash|rem|Remove|RemoveAll|repmat|reset|reshape|residue|restoredefaultpath|rethrow|rgb2hsv|rgb2ind|rgbplot|ribbon|rmappdata|rmdir|rmfield|rmpath|rmpref|rng|roots|rose|rosser|rot90|rotate|rotate3d|round|rref|rsf2csf|run|save|saveas|saveobj|savepath|scatter|scatter3|schur|sec|secd|sech|selectmoveresize|semilogx|semilogy|sendmail|serial|set|setappdata|setdiff|setenv|setfield|setpixelposition|setpref|setstr|setxor|shading|shg|shiftdim|showplottool|shrinkfaces|sign|sin(?:d|h)?|size|slice|smooth3|snapnow|sort|sortrows|sound|soundsc|spalloc|spaugment|spconvert|spdiags|specular|speye|spfun|sph2cart|sphere|spinmap|spline|spones|spparms|sprand|sprandn|sprandsym|sprank|spring|sprintf|spy|sqrt|sqrtm|squeeze|ss2tf|sscanf|stairs|startup|std|stem|stem3|stopasync|str2double|str2func|str2mat|str2num|strcat|strcmp|strcmpi|stream2|stream3|streamline|streamparticles|streamribbon|streamslice|streamtube|strfind|strjust|strmatch|strncmp|strncmpi|strread|strrep|strtok|strtrim|struct2cell|structfun|strvcat|sub2ind|subplot|subsasgn|subsindex|subspace|subsref|substruct|subvolume|sum|summer|superclasses|superiorto|support|surf|surf2patch|surface|surfc|surfl|surfnorm|svd|svds|swapbytes|symamd|symbfact|symmlq|symrcm|symvar|system|tan(?:d|h)?|tar|tempdir|tempname|tetramesh|texlabel|text|textread|textscan|textwrap|tfqmr|throw|tic|Tiff(?:.(?:getTagNames|getVersion))?|timer|timerfind|timerfindall|times|timeseries|title|toc|todatenum|toeplitz|toolboxdir|trace|transpose|trapz|treelayout|treeplot|tril|trimesh|triplequad|triplot|TriRep|TriScatteredInterp|trisurf|triu|tscollection|tsearch|tsearchn|tstool|type|typecast|uibuttongroup|uicontextmenu|uicontrol|uigetdir|uigetfile|uigetpref|uiimport|uimenu|uiopen|uipanel|uipushtool|uiputfile|uiresume|uisave|uisetcolor|uisetfont|uisetpref|uistack|uitable|uitoggletool|uitoolbar|uiwait|uminus|undocheckout|unicode2native|union|unique|unix|unloadlibrary|unmesh|unmkpp|untar|unwrap|unzip|uplus|upper|urlread|urlwrite|usejava|userpath|validateattributes|validatestring|vander|var|vectorize|ver|verctrl|verLessThan|version|vertcat|VideoReader(?:.isPlatformSupported)?|VideoWriter(?:.getProfiles)?|view|viewmtx|visdiff|volumebounds|voronoi|voronoin|wait|waitbar|waitfor|waitforbuttonpress|warndlg|warning|waterfall|wavfinfo|wavplay|wavread|wavrecord|wavwrite|web|weekday|what|whatsnew|which|whitebg|who|whos|wilkinson|winopen|winqueryreg|winter|wk1finfo|wk1read|wk1write|workspace|xlabel|xlim|xlsfinfo|xlsread|xlswrite|xmlread|xmlwrite|xor|xslt|ylabel|ylim|zeros|zip|zlabel|zlim|zoom)\\b/,\na],[\"fun_tbx\",/^\\b(?:addedvarplot|andrewsplot|anova[12n]|ansaribradley|aoctool|barttest|bbdesign|beta(?:cdf|fit|inv|like|pdf|rnd|stat)|bino(?:cdf|fit|inv|pdf|rnd|stat)|biplot|bootci|bootstrp|boxplot|candexch|candgen|canoncorr|capability|capaplot|caseread|casewrite|categorical|ccdesign|cdfplot|chi2(?:cdf|gof|inv|pdf|rnd|stat)|cholcov|Classification(?:BaggedEnsemble|Discriminant(?:.(?:fit|make|template))?|Ensemble|KNN(?:.(?:fit|template))?|PartitionedEnsemble|PartitionedModel|Tree(?:.(?:fit|template))?)|classify|classregtree|cluster|clusterdata|cmdscale|combnk|Compact(?:Classification(?:Discriminant|Ensemble|Tree)|Regression(?:Ensemble|Tree)|TreeBagger)|confusionmat|controlchart|controlrules|cophenet|copula(?:cdf|fit|param|pdf|rnd|stat)|cordexch|corr|corrcov|coxphfit|createns|crosstab|crossval|cvpartition|datasample|dataset|daugment|dcovary|dendrogram|dfittool|disttool|dummyvar|dwtest|ecdf|ecdfhist|ev(?:cdf|fit|inv|like|pdf|rnd|stat)|ExhaustiveSearcher|exp(?:cdf|fit|inv|like|pdf|rnd|stat)|factoran|fcdf|ff2n|finv|fitdist|fitensemble|fpdf|fracfact|fracfactgen|friedman|frnd|fstat|fsurfht|fullfact|gagerr|gam(?:cdf|fit|inv|like|pdf|rnd|stat)|GeneralizedLinearModel(?:.fit)?|geo(?:cdf|inv|mean|pdf|rnd|stat)|gev(?:cdf|fit|inv|like|pdf|rnd|stat)|gline|glmfit|glmval|glyphplot|gmdistribution(?:.fit)?|gname|gp(?:cdf|fit|inv|like|pdf|rnd|stat)|gplotmatrix|grp2idx|grpstats|gscatter|haltonset|harmmean|hist3|histfit|hmm(?:decode|estimate|generate|train|viterbi)|hougen|hyge(?:cdf|inv|pdf|rnd|stat)|icdf|inconsistent|interactionplot|invpred|iqr|iwishrnd|jackknife|jbtest|johnsrnd|KDTreeSearcher|kmeans|knnsearch|kruskalwallis|ksdensity|kstest|kstest2|kurtosis|lasso|lassoglm|lassoPlot|leverage|lhsdesign|lhsnorm|lillietest|LinearModel(?:.fit)?|linhyptest|linkage|logn(?:cdf|fit|inv|like|pdf|rnd|stat)|lsline|mad|mahal|maineffectsplot|manova1|manovacluster|mdscale|mhsample|mle|mlecov|mnpdf|mnrfit|mnrnd|mnrval|moment|multcompare|multivarichart|mvn(?:cdf|pdf|rnd)|mvregress|mvregresslike|mvt(?:cdf|pdf|rnd)|NaiveBayes(?:.fit)?|nan(?:cov|max|mean|median|min|std|sum|var)|nbin(?:cdf|fit|inv|pdf|rnd|stat)|ncf(?:cdf|inv|pdf|rnd|stat)|nct(?:cdf|inv|pdf|rnd|stat)|ncx2(?:cdf|inv|pdf|rnd|stat)|NeighborSearcher|nlinfit|nlintool|nlmefit|nlmefitsa|nlparci|nlpredci|nnmf|nominal|NonLinearModel(?:.fit)?|norm(?:cdf|fit|inv|like|pdf|rnd|stat)|normplot|normspec|ordinal|outlierMeasure|parallelcoords|paretotails|partialcorr|pcacov|pcares|pdf|pdist|pdist2|pearsrnd|perfcurve|perms|piecewisedistribution|plsregress|poiss(?:cdf|fit|inv|pdf|rnd|tat)|polyconf|polytool|prctile|princomp|ProbDist(?:Kernel|Parametric|UnivKernel|UnivParam)?|probplot|procrustes|qqplot|qrandset|qrandstream|quantile|randg|random|randsample|randtool|range|rangesearch|ranksum|rayl(?:cdf|fit|inv|pdf|rnd|stat)|rcoplot|refcurve|refline|regress|Regression(?:BaggedEnsemble|Ensemble|PartitionedEnsemble|PartitionedModel|Tree(?:.(?:fit|template))?)|regstats|relieff|ridge|robustdemo|robustfit|rotatefactors|rowexch|rsmdemo|rstool|runstest|sampsizepwr|scatterhist|sequentialfs|signrank|signtest|silhouette|skewness|slicesample|sobolset|squareform|statget|statset|stepwise|stepwisefit|surfht|tabulate|tblread|tblwrite|tcdf|tdfread|tiedrank|tinv|tpdf|TreeBagger|treedisp|treefit|treeprune|treetest|treeval|trimmean|trnd|tstat|ttest|ttest2|unid(?:cdf|inv|pdf|rnd|stat)|unif(?:cdf|inv|it|pdf|rnd|stat)|vartest(?:2|n)?|wbl(?:cdf|fit|inv|like|pdf|rnd|stat)|wblplot|wishrnd|x2fx|xptread|zscore|ztest)\\b/,\na],[\"fun_tbx\",/^\\b(?:adapthisteq|analyze75info|analyze75read|applycform|applylut|axes2pix|bestblk|blockproc|bwarea|bwareaopen|bwboundaries|bwconncomp|bwconvhull|bwdist|bwdistgeodesic|bweuler|bwhitmiss|bwlabel|bwlabeln|bwmorph|bwpack|bwperim|bwselect|bwtraceboundary|bwulterode|bwunpack|checkerboard|col2im|colfilt|conndef|convmtx2|corner|cornermetric|corr2|cp2tform|cpcorr|cpselect|cpstruct2pairs|dct2|dctmtx|deconvblind|deconvlucy|deconvreg|deconvwnr|decorrstretch|demosaic|dicom(?:anon|dict|info|lookup|read|uid|write)|edge|edgetaper|entropy|entropyfilt|fan2para|fanbeam|findbounds|fliptform|freqz2|fsamp2|fspecial|ftrans2|fwind1|fwind2|getheight|getimage|getimagemodel|getline|getneighbors|getnhood|getpts|getrangefromclass|getrect|getsequence|gray2ind|graycomatrix|graycoprops|graydist|grayslice|graythresh|hdrread|hdrwrite|histeq|hough|houghlines|houghpeaks|iccfind|iccread|iccroot|iccwrite|idct2|ifanbeam|im2bw|im2col|im2double|im2int16|im2java2d|im2single|im2uint16|im2uint8|imabsdiff|imadd|imadjust|ImageAdapter|imageinfo|imagemodel|imapplymatrix|imattributes|imbothat|imclearborder|imclose|imcolormaptool|imcomplement|imcontour|imcontrast|imcrop|imdilate|imdisplayrange|imdistline|imdivide|imellipse|imerode|imextendedmax|imextendedmin|imfill|imfilter|imfindcircles|imfreehand|imfuse|imgca|imgcf|imgetfile|imhandles|imhist|imhmax|imhmin|imimposemin|imlincomb|imline|immagbox|immovie|immultiply|imnoise|imopen|imoverview|imoverviewpanel|impixel|impixelinfo|impixelinfoval|impixelregion|impixelregionpanel|implay|impoint|impoly|impositionrect|improfile|imputfile|impyramid|imreconstruct|imrect|imregconfig|imregionalmax|imregionalmin|imregister|imresize|imroi|imrotate|imsave|imscrollpanel|imshow|imshowpair|imsubtract|imtool|imtophat|imtransform|imview|ind2gray|ind2rgb|interfileinfo|interfileread|intlut|ippl|iptaddcallback|iptcheckconn|iptcheckhandle|iptcheckinput|iptcheckmap|iptchecknargin|iptcheckstrs|iptdemos|iptgetapi|iptGetPointerBehavior|iptgetpref|ipticondir|iptnum2ordinal|iptPointerManager|iptprefs|iptremovecallback|iptSetPointerBehavior|iptsetpref|iptwindowalign|iradon|isbw|isflat|isgray|isicc|isind|isnitf|isrgb|isrset|lab2double|lab2uint16|lab2uint8|label2rgb|labelmatrix|makecform|makeConstrainToRectFcn|makehdr|makelut|makeresampler|maketform|mat2gray|mean2|medfilt2|montage|nitfinfo|nitfread|nlfilter|normxcorr2|ntsc2rgb|openrset|ordfilt2|otf2psf|padarray|para2fan|phantom|poly2mask|psf2otf|qtdecomp|qtgetblk|qtsetblk|radon|rangefilt|reflect|regionprops|registration.metric.(?:MattesMutualInformation|MeanSquares)|registration.optimizer.(?:OnePlusOneEvolutionary|RegularStepGradientDescent)|rgb2gray|rgb2ntsc|rgb2ycbcr|roicolor|roifill|roifilt2|roipoly|rsetwrite|std2|stdfilt|strel|stretchlim|subimage|tformarray|tformfwd|tforminv|tonemap|translate|truesize|uintlut|viscircles|warp|watershed|whitepoint|wiener2|xyz2double|xyz2uint16|ycbcr2rgb)\\b/,\na],[\"fun_tbx\",/^\\b(?:bintprog|color|fgoalattain|fminbnd|fmincon|fminimax|fminsearch|fminunc|fseminf|fsolve|fzero|fzmult|gangstr|ktrlink|linprog|lsqcurvefit|lsqlin|lsqnonlin|lsqnonneg|optimget|optimset|optimtool|quadprog)\\b/,a],[\"ident\",/^[A-Za-z]\\w*(?:\\.[A-Za-z]\\w*)*/,a]]),[\"matlab-identifiers\"]);b.registerLangHandler(b.createSimpleLexer([],e),[\"matlab-operators\"]);b.registerLangHandler(b.createSimpleLexer(c,d),[\"matlab\"]);\n"
  },
  {
    "path": "static/bootstrap/plugins/bootstrap-wysiwyg/external/google-code-prettify/lang-ml.js",
    "content": "PR.registerLangHandler(PR.createSimpleLexer([[\"pln\",/^[\\t\\n\\r \\xa0]+/,null,\"\\t\\n\\r \\u00a0\"],[\"com\",/^#(?:if[\\t\\n\\r \\xa0]+(?:[$_a-z][\\w']*|``[^\\t\\n\\r`]*(?:``|$))|else|endif|light)/i,null,\"#\"],[\"str\",/^(?:\"(?:[^\"\\\\]|\\\\[\\S\\s])*(?:\"|$)|'(?:[^'\\\\]|\\\\[\\S\\s])(?:'|$))/,null,\"\\\"'\"]],[[\"com\",/^(?:\\/\\/[^\\n\\r]*|\\(\\*[\\S\\s]*?\\*\\))/],[\"kwd\",/^(?:abstract|and|as|assert|begin|class|default|delegate|do|done|downcast|downto|elif|else|end|exception|extern|false|finally|for|fun|function|if|in|inherit|inline|interface|internal|lazy|let|match|member|module|mutable|namespace|new|null|of|open|or|override|private|public|rec|return|static|struct|then|to|true|try|type|upcast|use|val|void|when|while|with|yield|asr|land|lor|lsl|lsr|lxor|mod|sig|atomic|break|checked|component|const|constraint|constructor|continue|eager|event|external|fixed|functor|global|include|method|mixin|object|parallel|process|protected|pure|sealed|trait|virtual|volatile)\\b/],\n[\"lit\",/^[+-]?(?:0x[\\da-f]+|(?:\\.\\d+|\\d+(?:\\.\\d*)?)(?:e[+-]?\\d+)?)/i],[\"pln\",/^(?:[_a-z][\\w']*[!#?]?|``[^\\t\\n\\r`]*(?:``|$))/i],[\"pun\",/^[^\\w\\t\\n\\r \"'\\xa0]+/]]),[\"fs\",\"ml\"]);\n"
  },
  {
    "path": "static/bootstrap/plugins/bootstrap-wysiwyg/external/google-code-prettify/lang-mumps.js",
    "content": "PR.registerLangHandler(PR.createSimpleLexer([[\"pln\",/^[\\t\\n\\r \\xa0]+/,null,\"\\t\\n\\r \\u00a0\"],[\"str\",/^\"(?:[^\"]|\\\\.)*\"/,null,'\"']],[[\"com\",/^;[^\\n\\r]*/,null,\";\"],[\"dec\",/^\\$(?:d|device|ec|ecode|es|estack|et|etrap|h|horolog|i|io|j|job|k|key|p|principal|q|quit|st|stack|s|storage|sy|system|t|test|tl|tlevel|tr|trestart|x|y|z[a-z]*|a|ascii|c|char|d|data|e|extract|f|find|fn|fnumber|g|get|j|justify|l|length|na|name|o|order|p|piece|ql|qlength|qs|qsubscript|q|query|r|random|re|reverse|s|select|st|stack|t|text|tr|translate|nan)\\b/i,\nnull],[\"kwd\",/^(?:[^$]b|break|c|close|d|do|e|else|f|for|g|goto|h|halt|h|hang|i|if|j|job|k|kill|l|lock|m|merge|n|new|o|open|q|quit|r|read|s|set|tc|tcommit|tre|trestart|tro|trollback|ts|tstart|u|use|v|view|w|write|x|xecute)\\b/i,null],[\"lit\",/^[+-]?(?:\\.\\d+|\\d+(?:\\.\\d*)?)(?:e[+-]?\\d+)?/i],[\"pln\",/^[a-z][^\\W_]*/i],[\"pun\",/^[^\\w\\t\\n\\r\"$%;^\\xa0]|_/]]),[\"mumps\"]);\n"
  },
  {
    "path": "static/bootstrap/plugins/bootstrap-wysiwyg/external/google-code-prettify/lang-n.js",
    "content": "var a=null;\nPR.registerLangHandler(PR.createSimpleLexer([[\"str\",/^(?:'(?:[^\\n\\r'\\\\]|\\\\.)*'|\"(?:[^\\n\\r\"\\\\]|\\\\.)*(?:\"|$))/,a,'\"'],[\"com\",/^#(?:(?:define|elif|else|endif|error|ifdef|include|ifndef|line|pragma|undef|warning)\\b|[^\\n\\r]*)/,a,\"#\"],[\"pln\",/^\\s+/,a,\" \\r\\n\\t\\u00a0\"]],[[\"str\",/^@\"(?:[^\"]|\"\")*(?:\"|$)/,a],[\"str\",/^<#[^#>]*(?:#>|$)/,a],[\"str\",/^<(?:(?:(?:\\.\\.\\/)*|\\/?)(?:[\\w-]+(?:\\/[\\w-]+)+)?[\\w-]+\\.h|[a-z]\\w*)>/,a],[\"com\",/^\\/\\/[^\\n\\r]*/,a],[\"com\",/^\\/\\*[\\S\\s]*?(?:\\*\\/|$)/,\na],[\"kwd\",/^(?:abstract|and|as|base|catch|class|def|delegate|enum|event|extern|false|finally|fun|implements|interface|internal|is|macro|match|matches|module|mutable|namespace|new|null|out|override|params|partial|private|protected|public|ref|sealed|static|struct|syntax|this|throw|true|try|type|typeof|using|variant|virtual|volatile|when|where|with|assert|assert2|async|break|checked|continue|do|else|ensures|for|foreach|if|late|lock|new|nolate|otherwise|regexp|repeat|requires|return|surroundwith|unchecked|unless|using|while|yield)\\b/,\na],[\"typ\",/^(?:array|bool|byte|char|decimal|double|float|int|list|long|object|sbyte|short|string|ulong|uint|ufloat|ulong|ushort|void)\\b/,a],[\"lit\",/^@[$_a-z][\\w$@]*/i,a],[\"typ\",/^@[A-Z]+[a-z][\\w$@]*/,a],[\"pln\",/^'?[$_a-z][\\w$@]*/i,a],[\"lit\",/^(?:0x[\\da-f]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+-]?\\d+)?)[a-z]*/i,a,\"0123456789\"],[\"pun\",/^.[^\\s\\w\"-$'./@`]*/,a]]),[\"n\",\"nemerle\"]);\n"
  },
  {
    "path": "static/bootstrap/plugins/bootstrap-wysiwyg/external/google-code-prettify/lang-pascal.js",
    "content": "var a=null;\nPR.registerLangHandler(PR.createSimpleLexer([[\"str\",/^'(?:[^\\n\\r'\\\\]|\\\\.)*(?:'|$)/,a,\"'\"],[\"pln\",/^\\s+/,a,\" \\r\\n\\t\\u00a0\"]],[[\"com\",/^\\(\\*[\\S\\s]*?(?:\\*\\)|$)|^{[\\S\\s]*?(?:}|$)/,a],[\"kwd\",/^(?:absolute|and|array|asm|assembler|begin|case|const|constructor|destructor|div|do|downto|else|end|external|for|forward|function|goto|if|implementation|in|inline|interface|interrupt|label|mod|not|object|of|or|packed|procedure|program|record|repeat|set|shl|shr|then|to|type|unit|until|uses|var|virtual|while|with|xor)\\b/i,a],\n[\"lit\",/^(?:true|false|self|nil)/i,a],[\"pln\",/^[a-z][^\\W_]*/i,a],[\"lit\",/^(?:\\$[\\da-f]+|(?:\\d+(?:\\.\\d*)?|\\.\\d+)(?:e[+-]?\\d+)?)/i,a,\"0123456789\"],[\"pun\",/^.[^\\s\\w$'./@]*/,a]]),[\"pascal\"]);\n"
  },
  {
    "path": "static/bootstrap/plugins/bootstrap-wysiwyg/external/google-code-prettify/lang-proto.js",
    "content": "PR.registerLangHandler(PR.sourceDecorator({keywords:\"bytes,default,double,enum,extend,extensions,false,group,import,max,message,option,optional,package,repeated,required,returns,rpc,service,syntax,to,true\",types:/^(bool|(double|s?fixed|[su]?int)(32|64)|float|string)\\b/,cStyleComments:!0}),[\"proto\"]);\n"
  },
  {
    "path": "static/bootstrap/plugins/bootstrap-wysiwyg/external/google-code-prettify/lang-r.js",
    "content": "PR.registerLangHandler(PR.createSimpleLexer([[\"pln\",/^[\\t\\n\\r \\xa0]+/,null,\"\\t\\n\\r \\u00a0\"],[\"str\",/^\"(?:[^\"\\\\]|\\\\[\\S\\s])*(?:\"|$)/,null,'\"'],[\"str\",/^'(?:[^'\\\\]|\\\\[\\S\\s])*(?:'|$)/,null,\"'\"]],[[\"com\",/^#.*/],[\"kwd\",/^(?:if|else|for|while|repeat|in|next|break|return|switch|function)(?![\\w.])/],[\"lit\",/^0[Xx][\\dA-Fa-f]+([Pp]\\d+)?[Li]?/],[\"lit\",/^[+-]?(\\d+(\\.\\d+)?|\\.\\d+)([Ee][+-]?\\d+)?[Li]?/],[\"lit\",/^(?:NULL|NA(?:_(?:integer|real|complex|character)_)?|Inf|TRUE|FALSE|NaN|\\.\\.(?:\\.|\\d+))(?![\\w.])/],\n[\"pun\",/^(?:<<?-|->>?|-|==|<=|>=|<|>|&&?|!=|\\|\\|?|[!*+/^]|%.*?%|[$=@~]|:{1,3}|[(),;?[\\]{}])/],[\"pln\",/^(?:[A-Za-z]+[\\w.]*|\\.[^\\W\\d][\\w.]*)(?![\\w.])/],[\"str\",/^`.+`/]]),[\"r\",\"s\",\"R\",\"S\",\"Splus\"]);\n"
  },
  {
    "path": "static/bootstrap/plugins/bootstrap-wysiwyg/external/google-code-prettify/lang-rd.js",
    "content": "PR.registerLangHandler(PR.createSimpleLexer([[\"pln\",/^[\\t\\n\\r \\xa0]+/,null,\"\\t\\n\\r \\u00a0\"],[\"com\",/^%[^\\n\\r]*/,null,\"%\"]],[[\"lit\",/^\\\\(?:cr|l?dots|R|tab)\\b/],[\"kwd\",/^\\\\[@-Za-z]+/],[\"kwd\",/^#(?:ifn?def|endif)/],[\"pln\",/^\\\\[{}]/],[\"pun\",/^[()[\\]{}]+/]]),[\"Rd\",\"rd\"]);\n"
  },
  {
    "path": "static/bootstrap/plugins/bootstrap-wysiwyg/external/google-code-prettify/lang-scala.js",
    "content": "PR.registerLangHandler(PR.createSimpleLexer([[\"pln\",/^[\\t\\n\\r \\xa0]+/,null,\"\\t\\n\\r \\u00a0\"],[\"str\",/^\"(?:\"\"(?:\"\"?(?!\")|[^\"\\\\]|\\\\.)*\"{0,3}|(?:[^\\n\\r\"\\\\]|\\\\.)*\"?)/,null,'\"'],[\"lit\",/^`(?:[^\\n\\r\\\\`]|\\\\.)*`?/,null,\"`\"],[\"pun\",/^[!#%&(--:-@[-^{-~]+/,null,\"!#%&()*+,-:;<=>?@[\\\\]^{|}~\"]],[[\"str\",/^'(?:[^\\n\\r'\\\\]|\\\\(?:'|[^\\n\\r']+))'/],[\"lit\",/^'[$A-Z_a-z][\\w$]*(?![\\w$'])/],[\"kwd\",/^(?:abstract|case|catch|class|def|do|else|extends|final|finally|for|forSome|if|implicit|import|lazy|match|new|object|override|package|private|protected|requires|return|sealed|super|throw|trait|try|type|val|var|while|with|yield)\\b/],\n[\"lit\",/^(?:true|false|null|this)\\b/],[\"lit\",/^(?:0(?:[0-7]+|x[\\da-f]+)l?|(?:0|[1-9]\\d*)(?:(?:\\.\\d+)?(?:e[+-]?\\d+)?f?|l?)|\\\\.\\d+(?:e[+-]?\\d+)?f?)/i],[\"typ\",/^[$_]*[A-Z][\\d$A-Z_]*[a-z][\\w$]*/],[\"pln\",/^[$A-Z_a-z][\\w$]*/],[\"com\",/^\\/(?:\\/.*|\\*(?:\\/|\\**[^*/])*(?:\\*+\\/?)?)/],[\"pun\",/^(?:\\.+|\\/)/]]),[\"scala\"]);\n"
  },
  {
    "path": "static/bootstrap/plugins/bootstrap-wysiwyg/external/google-code-prettify/lang-sql.js",
    "content": "PR.registerLangHandler(PR.createSimpleLexer([[\"pln\",/^[\\t\\n\\r \\xa0]+/,null,\"\\t\\n\\r \\u00a0\"],[\"str\",/^(?:\"(?:[^\"\\\\]|\\\\.)*\"|'(?:[^'\\\\]|\\\\.)*')/,null,\"\\\"'\"]],[[\"com\",/^(?:--[^\\n\\r]*|\\/\\*[\\S\\s]*?(?:\\*\\/|$))/],[\"kwd\",/^(?:add|all|alter|and|any|apply|as|asc|authorization|backup|begin|between|break|browse|bulk|by|cascade|case|check|checkpoint|close|clustered|coalesce|collate|column|commit|compute|connect|constraint|contains|containstable|continue|convert|create|cross|current|current_date|current_time|current_timestamp|current_user|cursor|database|dbcc|deallocate|declare|default|delete|deny|desc|disk|distinct|distributed|double|drop|dummy|dump|else|end|errlvl|escape|except|exec|execute|exists|exit|fetch|file|fillfactor|following|for|foreign|freetext|freetexttable|from|full|function|goto|grant|group|having|holdlock|identity|identitycol|identity_insert|if|in|index|inner|insert|intersect|into|is|join|key|kill|left|like|lineno|load|match|matched|merge|natural|national|nocheck|nonclustered|nocycle|not|null|nullif|of|off|offsets|on|open|opendatasource|openquery|openrowset|openxml|option|or|order|outer|over|partition|percent|pivot|plan|preceding|precision|primary|print|proc|procedure|public|raiserror|read|readtext|reconfigure|references|replication|restore|restrict|return|revoke|right|rollback|rowcount|rowguidcol|rows?|rule|save|schema|select|session_user|set|setuser|shutdown|some|start|statistics|system_user|table|textsize|then|to|top|tran|transaction|trigger|truncate|tsequal|unbounded|union|unique|unpivot|update|updatetext|use|user|using|values|varying|view|waitfor|when|where|while|with|within|writetext|xml)(?=[^\\w-]|$)/i,\nnull],[\"lit\",/^[+-]?(?:0x[\\da-f]+|(?:\\.\\d+|\\d+(?:\\.\\d*)?)(?:e[+-]?\\d+)?)/i],[\"pln\",/^[_a-z][\\w-]*/i],[\"pun\",/^[^\\w\\t\\n\\r \"'\\xa0][^\\w\\t\\n\\r \"'+\\xa0-]*/]]),[\"sql\"]);\n"
  },
  {
    "path": "static/bootstrap/plugins/bootstrap-wysiwyg/external/google-code-prettify/lang-tcl.js",
    "content": "var a=null;\nPR.registerLangHandler(PR.createSimpleLexer([[\"opn\",/^{+/,a,\"{\"],[\"clo\",/^}+/,a,\"}\"],[\"com\",/^#[^\\n\\r]*/,a,\"#\"],[\"pln\",/^[\\t\\n\\r \\xa0]+/,a,\"\\t\\n\\r \\u00a0\"],[\"str\",/^\"(?:[^\"\\\\]|\\\\[\\S\\s])*(?:\"|$)/,a,'\"']],[[\"kwd\",/^(?:after|append|apply|array|break|case|catch|continue|error|eval|exec|exit|expr|for|foreach|if|incr|info|proc|return|set|switch|trace|uplevel|upvar|while)\\b/,a],[\"lit\",/^[+-]?(?:[#0]x[\\da-f]+|\\d+\\/\\d+|(?:\\.\\d+|\\d+(?:\\.\\d*)?)(?:[de][+-]?\\d+)?)/i],[\"lit\",\n/^'(?:-*(?:\\w|\\\\[!-~])(?:[\\w-]*|\\\\[!-~])[!=?]?)?/],[\"pln\",/^-*(?:[_a-z]|\\\\[!-~])(?:[\\w-]*|\\\\[!-~])[!=?]?/i],[\"pun\",/^[^\\w\\t\\n\\r \"'-);\\\\\\xa0]+/]]),[\"tcl\"]);\n"
  },
  {
    "path": "static/bootstrap/plugins/bootstrap-wysiwyg/external/google-code-prettify/lang-tex.js",
    "content": "PR.registerLangHandler(PR.createSimpleLexer([[\"pln\",/^[\\t\\n\\r \\xa0]+/,null,\"\\t\\n\\r \\u00a0\"],[\"com\",/^%[^\\n\\r]*/,null,\"%\"]],[[\"kwd\",/^\\\\[@-Za-z]+/],[\"kwd\",/^\\\\./],[\"typ\",/^[$&]/],[\"lit\",/[+-]?(?:\\.\\d+|\\d+(?:\\.\\d*)?)(cm|em|ex|in|pc|pt|bp|mm)/i],[\"pun\",/^[()=[\\]{}]+/]]),[\"latex\",\"tex\"]);\n"
  },
  {
    "path": "static/bootstrap/plugins/bootstrap-wysiwyg/external/google-code-prettify/lang-vb.js",
    "content": "PR.registerLangHandler(PR.createSimpleLexer([[\"pln\",/^[\\t\\n\\r \\xa0\\u2028\\u2029]+/,null,\"\\t\\n\\r \\u00a0\\u2028\\u2029\"],[\"str\",/^(?:[\"\\u201c\\u201d](?:[^\"\\u201c\\u201d]|[\"\\u201c\\u201d]{2})(?:[\"\\u201c\\u201d]c|$)|[\"\\u201c\\u201d](?:[^\"\\u201c\\u201d]|[\"\\u201c\\u201d]{2})*(?:[\"\\u201c\\u201d]|$))/i,null,'\"\\u201c\\u201d'],[\"com\",/^['\\u2018\\u2019](?:_(?:\\r\\n?|[^\\r]?)|[^\\n\\r_\\u2028\\u2029])*/,null,\"'\\u2018\\u2019\"]],[[\"kwd\",/^(?:addhandler|addressof|alias|and|andalso|ansi|as|assembly|auto|boolean|byref|byte|byval|call|case|catch|cbool|cbyte|cchar|cdate|cdbl|cdec|char|cint|class|clng|cobj|const|cshort|csng|cstr|ctype|date|decimal|declare|default|delegate|dim|directcast|do|double|each|else|elseif|end|endif|enum|erase|error|event|exit|finally|for|friend|function|get|gettype|gosub|goto|handles|if|implements|imports|in|inherits|integer|interface|is|let|lib|like|long|loop|me|mod|module|mustinherit|mustoverride|mybase|myclass|namespace|new|next|not|notinheritable|notoverridable|object|on|option|optional|or|orelse|overloads|overridable|overrides|paramarray|preserve|private|property|protected|public|raiseevent|readonly|redim|removehandler|resume|return|select|set|shadows|shared|short|single|static|step|stop|string|structure|sub|synclock|then|throw|to|try|typeof|unicode|until|variant|wend|when|while|with|withevents|writeonly|xor|endif|gosub|let|variant|wend)\\b/i,\nnull],[\"com\",/^rem\\b.*/i],[\"lit\",/^(?:true\\b|false\\b|nothing\\b|\\d+(?:e[+-]?\\d+[dfr]?|[dfilrs])?|(?:&h[\\da-f]+|&o[0-7]+)[ils]?|\\d*\\.\\d+(?:e[+-]?\\d+)?[dfr]?|#\\s+(?:\\d+[/-]\\d+[/-]\\d+(?:\\s+\\d+:\\d+(?::\\d+)?(\\s*(?:am|pm))?)?|\\d+:\\d+(?::\\d+)?(\\s*(?:am|pm))?)\\s+#)/i],[\"pln\",/^(?:(?:[a-z]|_\\w)\\w*(?:\\[[!#%&@]+])?|\\[(?:[a-z]|_\\w)\\w*])/i],[\"pun\",/^[^\\w\\t\\n\\r \"'[\\]\\xa0\\u2018\\u2019\\u201c\\u201d\\u2028\\u2029]+/],[\"pun\",/^(?:\\[|])/]]),[\"vb\",\"vbs\"]);\n"
  },
  {
    "path": "static/bootstrap/plugins/bootstrap-wysiwyg/external/google-code-prettify/lang-vhdl.js",
    "content": "PR.registerLangHandler(PR.createSimpleLexer([[\"pln\",/^[\\t\\n\\r \\xa0]+/,null,\"\\t\\n\\r \\u00a0\"]],[[\"str\",/^(?:[box]?\"(?:[^\"]|\"\")*\"|'.')/i],[\"com\",/^--[^\\n\\r]*/],[\"kwd\",/^(?:abs|access|after|alias|all|and|architecture|array|assert|attribute|begin|block|body|buffer|bus|case|component|configuration|constant|disconnect|downto|else|elsif|end|entity|exit|file|for|function|generate|generic|group|guarded|if|impure|in|inertial|inout|is|label|library|linkage|literal|loop|map|mod|nand|new|next|nor|not|null|of|on|open|or|others|out|package|port|postponed|procedure|process|pure|range|record|register|reject|rem|report|return|rol|ror|select|severity|shared|signal|sla|sll|sra|srl|subtype|then|to|transport|type|unaffected|units|until|use|variable|wait|when|while|with|xnor|xor)(?=[^\\w-]|$)/i,\nnull],[\"typ\",/^(?:bit|bit_vector|character|boolean|integer|real|time|string|severity_level|positive|natural|signed|unsigned|line|text|std_u?logic(?:_vector)?)(?=[^\\w-]|$)/i,null],[\"typ\",/^'(?:active|ascending|base|delayed|driving|driving_value|event|high|image|instance_name|last_active|last_event|last_value|left|leftof|length|low|path_name|pos|pred|quiet|range|reverse_range|right|rightof|simple_name|stable|succ|transaction|val|value)(?=[^\\w-]|$)/i,null],[\"lit\",/^\\d+(?:_\\d+)*(?:#[\\w.\\\\]+#(?:[+-]?\\d+(?:_\\d+)*)?|(?:\\.\\d+(?:_\\d+)*)?(?:e[+-]?\\d+(?:_\\d+)*)?)/i],\n[\"pln\",/^(?:[a-z]\\w*|\\\\[^\\\\]*\\\\)/i],[\"pun\",/^[^\\w\\t\\n\\r \"'\\xa0][^\\w\\t\\n\\r \"'\\xa0-]*/]]),[\"vhdl\",\"vhd\"]);\n"
  },
  {
    "path": "static/bootstrap/plugins/bootstrap-wysiwyg/external/google-code-prettify/lang-wiki.js",
    "content": "PR.registerLangHandler(PR.createSimpleLexer([[\"pln\",/^[\\d\\t a-gi-z\\xa0]+/,null,\"\\t \\u00a0abcdefgijklmnopqrstuvwxyz0123456789\"],[\"pun\",/^[*=[\\]^~]+/,null,\"=*~^[]\"]],[[\"lang-wiki.meta\",/(?:^^|\\r\\n?|\\n)(#[a-z]+)\\b/],[\"lit\",/^[A-Z][a-z][\\da-z]+[A-Z][a-z][^\\W_]+\\b/],[\"lang-\",/^{{{([\\S\\s]+?)}}}/],[\"lang-\",/^`([^\\n\\r`]+)`/],[\"str\",/^https?:\\/\\/[^\\s#/?]*(?:\\/[^\\s#?]*)?(?:\\?[^\\s#]*)?(?:#\\S*)?/i],[\"pln\",/^(?:\\r\\n|[\\S\\s])[^\\n\\r#*=A-[^`h{~]*/]]),[\"wiki\"]);\nPR.registerLangHandler(PR.createSimpleLexer([[\"kwd\",/^#[a-z]+/i,null,\"#\"]],[]),[\"wiki.meta\"]);\n"
  },
  {
    "path": "static/bootstrap/plugins/bootstrap-wysiwyg/external/google-code-prettify/lang-xq.js",
    "content": "PR.registerLangHandler(PR.createSimpleLexer([[\"var pln\",/^\\$[\\w-]+/,null,\"$\"]],[[\"pln\",/^[\\s=][<>][\\s=]/],[\"lit\",/^@[\\w-]+/],[\"tag\",/^<\\/?[a-z](?:[\\w-.:]*\\w)?|\\/?>$/i],[\"com\",/^\\(:[\\S\\s]*?:\\)/],[\"pln\",/^[(),/;[\\]{}]$/],[\"str\",/^(?:\"(?:[^\"\\\\{]|\\\\[\\S\\s])*(?:\"|$)|'(?:[^'\\\\{]|\\\\[\\S\\s])*(?:'|$))/,null,\"\\\"'\"],[\"kwd\",/^(?:xquery|where|version|variable|union|typeswitch|treat|to|then|text|stable|sortby|some|self|schema|satisfies|returns|return|ref|processing-instruction|preceding-sibling|preceding|precedes|parent|only|of|node|namespace|module|let|item|intersect|instance|in|import|if|function|for|follows|following-sibling|following|external|except|every|else|element|descending|descendant-or-self|descendant|define|default|declare|comment|child|cast|case|before|attribute|assert|ascending|as|ancestor-or-self|ancestor|after|eq|order|by|or|and|schema-element|document-node|node|at)\\b/],\n[\"typ\",/^(?:xs:yearMonthDuration|xs:unsignedLong|xs:time|xs:string|xs:short|xs:QName|xs:Name|xs:long|xs:integer|xs:int|xs:gYearMonth|xs:gYear|xs:gMonthDay|xs:gDay|xs:float|xs:duration|xs:double|xs:decimal|xs:dayTimeDuration|xs:dateTime|xs:date|xs:byte|xs:boolean|xs:anyURI|xf:yearMonthDuration)\\b/,null],[\"fun pln\",/^(?:xp:dereference|xinc:node-expand|xinc:link-references|xinc:link-expand|xhtml:restructure|xhtml:clean|xhtml:add-lists|xdmp:zip-manifest|xdmp:zip-get|xdmp:zip-create|xdmp:xquery-version|xdmp:word-convert|xdmp:with-namespaces|xdmp:version|xdmp:value|xdmp:user-roles|xdmp:user-last-login|xdmp:user|xdmp:url-encode|xdmp:url-decode|xdmp:uri-is-file|xdmp:uri-format|xdmp:uri-content-type|xdmp:unquote|xdmp:unpath|xdmp:triggers-database|xdmp:trace|xdmp:to-json|xdmp:tidy|xdmp:subbinary|xdmp:strftime|xdmp:spawn-in|xdmp:spawn|xdmp:sleep|xdmp:shutdown|xdmp:set-session-field|xdmp:set-response-encoding|xdmp:set-response-content-type|xdmp:set-response-code|xdmp:set-request-time-limit|xdmp:set|xdmp:servers|xdmp:server-status|xdmp:server-name|xdmp:server|xdmp:security-database|xdmp:security-assert|xdmp:schema-database|xdmp:save|xdmp:role-roles|xdmp:role|xdmp:rethrow|xdmp:restart|xdmp:request-timestamp|xdmp:request-status|xdmp:request-cancel|xdmp:request|xdmp:redirect-response|xdmp:random|xdmp:quote|xdmp:query-trace|xdmp:query-meters|xdmp:product-edition|xdmp:privilege-roles|xdmp:privilege|xdmp:pretty-print|xdmp:powerpoint-convert|xdmp:platform|xdmp:permission|xdmp:pdf-convert|xdmp:path|xdmp:octal-to-integer|xdmp:node-uri|xdmp:node-replace|xdmp:node-kind|xdmp:node-insert-child|xdmp:node-insert-before|xdmp:node-insert-after|xdmp:node-delete|xdmp:node-database|xdmp:mul64|xdmp:modules-root|xdmp:modules-database|xdmp:merging|xdmp:merge-cancel|xdmp:merge|xdmp:md5|xdmp:logout|xdmp:login|xdmp:log-level|xdmp:log|xdmp:lock-release|xdmp:lock-acquire|xdmp:load|xdmp:invoke-in|xdmp:invoke|xdmp:integer-to-octal|xdmp:integer-to-hex|xdmp:http-put|xdmp:http-post|xdmp:http-options|xdmp:http-head|xdmp:http-get|xdmp:http-delete|xdmp:hosts|xdmp:host-status|xdmp:host-name|xdmp:host|xdmp:hex-to-integer|xdmp:hash64|xdmp:hash32|xdmp:has-privilege|xdmp:groups|xdmp:group-serves|xdmp:group-servers|xdmp:group-name|xdmp:group-hosts|xdmp:group|xdmp:get-session-field-names|xdmp:get-session-field|xdmp:get-response-encoding|xdmp:get-response-code|xdmp:get-request-username|xdmp:get-request-user|xdmp:get-request-url|xdmp:get-request-protocol|xdmp:get-request-path|xdmp:get-request-method|xdmp:get-request-header-names|xdmp:get-request-header|xdmp:get-request-field-names|xdmp:get-request-field-filename|xdmp:get-request-field-content-type|xdmp:get-request-field|xdmp:get-request-client-certificate|xdmp:get-request-client-address|xdmp:get-request-body|xdmp:get-current-user|xdmp:get-current-roles|xdmp:get|xdmp:function-name|xdmp:function-module|xdmp:function|xdmp:from-json|xdmp:forests|xdmp:forest-status|xdmp:forest-restore|xdmp:forest-restart|xdmp:forest-name|xdmp:forest-delete|xdmp:forest-databases|xdmp:forest-counts|xdmp:forest-clear|xdmp:forest-backup|xdmp:forest|xdmp:filesystem-file|xdmp:filesystem-directory|xdmp:exists|xdmp:excel-convert|xdmp:eval-in|xdmp:eval|xdmp:estimate|xdmp:email|xdmp:element-content-type|xdmp:elapsed-time|xdmp:document-set-quality|xdmp:document-set-property|xdmp:document-set-properties|xdmp:document-set-permissions|xdmp:document-set-collections|xdmp:document-remove-properties|xdmp:document-remove-permissions|xdmp:document-remove-collections|xdmp:document-properties|xdmp:document-locks|xdmp:document-load|xdmp:document-insert|xdmp:document-get-quality|xdmp:document-get-properties|xdmp:document-get-permissions|xdmp:document-get-collections|xdmp:document-get|xdmp:document-forest|xdmp:document-delete|xdmp:document-add-properties|xdmp:document-add-permissions|xdmp:document-add-collections|xdmp:directory-properties|xdmp:directory-locks|xdmp:directory-delete|xdmp:directory-create|xdmp:directory|xdmp:diacritic-less|xdmp:describe|xdmp:default-permissions|xdmp:default-collections|xdmp:databases|xdmp:database-restore-validate|xdmp:database-restore-status|xdmp:database-restore-cancel|xdmp:database-restore|xdmp:database-name|xdmp:database-forests|xdmp:database-backup-validate|xdmp:database-backup-status|xdmp:database-backup-purge|xdmp:database-backup-cancel|xdmp:database-backup|xdmp:database|xdmp:collection-properties|xdmp:collection-locks|xdmp:collection-delete|xdmp:collation-canonical-uri|xdmp:castable-as|xdmp:can-grant-roles|xdmp:base64-encode|xdmp:base64-decode|xdmp:architecture|xdmp:apply|xdmp:amp-roles|xdmp:amp|xdmp:add64|xdmp:add-response-header|xdmp:access|trgr:trigger-set-recursive|trgr:trigger-set-permissions|trgr:trigger-set-name|trgr:trigger-set-module|trgr:trigger-set-event|trgr:trigger-set-description|trgr:trigger-remove-permissions|trgr:trigger-module|trgr:trigger-get-permissions|trgr:trigger-enable|trgr:trigger-disable|trgr:trigger-database-online-event|trgr:trigger-data-event|trgr:trigger-add-permissions|trgr:remove-trigger|trgr:property-content|trgr:pre-commit|trgr:post-commit|trgr:get-trigger-by-id|trgr:get-trigger|trgr:document-scope|trgr:document-content|trgr:directory-scope|trgr:create-trigger|trgr:collection-scope|trgr:any-property-content|thsr:set-entry|thsr:remove-term|thsr:remove-synonym|thsr:remove-entry|thsr:query-lookup|thsr:lookup|thsr:load|thsr:insert|thsr:expand|thsr:add-synonym|spell:suggest-detailed|spell:suggest|spell:remove-word|spell:make-dictionary|spell:load|spell:levenshtein-distance|spell:is-correct|spell:insert|spell:double-metaphone|spell:add-word|sec:users-collection|sec:user-set-roles|sec:user-set-password|sec:user-set-name|sec:user-set-description|sec:user-set-default-permissions|sec:user-set-default-collections|sec:user-remove-roles|sec:user-privileges|sec:user-get-roles|sec:user-get-description|sec:user-get-default-permissions|sec:user-get-default-collections|sec:user-doc-permissions|sec:user-doc-collections|sec:user-add-roles|sec:unprotect-collection|sec:uid-for-name|sec:set-realm|sec:security-version|sec:security-namespace|sec:security-installed|sec:security-collection|sec:roles-collection|sec:role-set-roles|sec:role-set-name|sec:role-set-description|sec:role-set-default-permissions|sec:role-set-default-collections|sec:role-remove-roles|sec:role-privileges|sec:role-get-roles|sec:role-get-description|sec:role-get-default-permissions|sec:role-get-default-collections|sec:role-doc-permissions|sec:role-doc-collections|sec:role-add-roles|sec:remove-user|sec:remove-role-from-users|sec:remove-role-from-role|sec:remove-role-from-privileges|sec:remove-role-from-amps|sec:remove-role|sec:remove-privilege|sec:remove-amp|sec:protect-collection|sec:privileges-collection|sec:privilege-set-roles|sec:privilege-set-name|sec:privilege-remove-roles|sec:privilege-get-roles|sec:privilege-add-roles|sec:priv-doc-permissions|sec:priv-doc-collections|sec:get-user-names|sec:get-unique-elem-id|sec:get-role-names|sec:get-role-ids|sec:get-privilege|sec:get-distinct-permissions|sec:get-collection|sec:get-amp|sec:create-user-with-role|sec:create-user|sec:create-role|sec:create-privilege|sec:create-amp|sec:collections-collection|sec:collection-set-permissions|sec:collection-remove-permissions|sec:collection-get-permissions|sec:collection-add-permissions|sec:check-admin|sec:amps-collection|sec:amp-set-roles|sec:amp-remove-roles|sec:amp-get-roles|sec:amp-doc-permissions|sec:amp-doc-collections|sec:amp-add-roles|search:unparse|search:suggest|search:snippet|search:search|search:resolve-nodes|search:resolve|search:remove-constraint|search:parse|search:get-default-options|search:estimate|search:check-options|prof:value|prof:reset|prof:report|prof:invoke|prof:eval|prof:enable|prof:disable|prof:allowed|ppt:clean|pki:template-set-request|pki:template-set-name|pki:template-set-key-type|pki:template-set-key-options|pki:template-set-description|pki:template-in-use|pki:template-get-version|pki:template-get-request|pki:template-get-name|pki:template-get-key-type|pki:template-get-key-options|pki:template-get-id|pki:template-get-description|pki:need-certificate|pki:is-temporary|pki:insert-trusted-certificates|pki:insert-template|pki:insert-signed-certificates|pki:insert-certificate-revocation-list|pki:get-trusted-certificate-ids|pki:get-template-ids|pki:get-template-certificate-authority|pki:get-template-by-name|pki:get-template|pki:get-pending-certificate-requests-xml|pki:get-pending-certificate-requests-pem|pki:get-pending-certificate-request|pki:get-certificates-for-template-xml|pki:get-certificates-for-template|pki:get-certificates|pki:get-certificate-xml|pki:get-certificate-pem|pki:get-certificate|pki:generate-temporary-certificate-if-necessary|pki:generate-temporary-certificate|pki:generate-template-certificate-authority|pki:generate-certificate-request|pki:delete-template|pki:delete-certificate|pki:create-template|pdf:make-toc|pdf:insert-toc-headers|pdf:get-toc|pdf:clean|p:status-transition|p:state-transition|p:remove|p:pipelines|p:insert|p:get-by-id|p:get|p:execute|p:create|p:condition|p:collection|p:action|ooxml:runs-merge|ooxml:package-uris|ooxml:package-parts-insert|ooxml:package-parts|msword:clean|mcgm:polygon|mcgm:point|mcgm:geospatial-query-from-elements|mcgm:geospatial-query|mcgm:circle|math:tanh|math:tan|math:sqrt|math:sinh|math:sin|math:pow|math:modf|math:log10|math:log|math:ldexp|math:frexp|math:fmod|math:floor|math:fabs|math:exp|math:cosh|math:cos|math:ceil|math:atan2|math:atan|math:asin|math:acos|map:put|map:map|map:keys|map:get|map:delete|map:count|map:clear|lnk:to|lnk:remove|lnk:insert|lnk:get|lnk:from|lnk:create|kml:polygon|kml:point|kml:interior-polygon|kml:geospatial-query-from-elements|kml:geospatial-query|kml:circle|kml:box|gml:polygon|gml:point|gml:interior-polygon|gml:geospatial-query-from-elements|gml:geospatial-query|gml:circle|gml:box|georss:point|georss:geospatial-query|georss:circle|geo:polygon|geo:point|geo:interior-polygon|geo:geospatial-query-from-elements|geo:geospatial-query|geo:circle|geo:box|fn:zero-or-one|fn:years-from-duration|fn:year-from-dateTime|fn:year-from-date|fn:upper-case|fn:unordered|fn:true|fn:translate|fn:trace|fn:tokenize|fn:timezone-from-time|fn:timezone-from-dateTime|fn:timezone-from-date|fn:sum|fn:subtract-dateTimes-yielding-yearMonthDuration|fn:subtract-dateTimes-yielding-dayTimeDuration|fn:substring-before|fn:substring-after|fn:substring|fn:subsequence|fn:string-to-codepoints|fn:string-pad|fn:string-length|fn:string-join|fn:string|fn:static-base-uri|fn:starts-with|fn:seconds-from-time|fn:seconds-from-duration|fn:seconds-from-dateTime|fn:round-half-to-even|fn:round|fn:root|fn:reverse|fn:resolve-uri|fn:resolve-QName|fn:replace|fn:remove|fn:QName|fn:prefix-from-QName|fn:position|fn:one-or-more|fn:number|fn:not|fn:normalize-unicode|fn:normalize-space|fn:node-name|fn:node-kind|fn:nilled|fn:namespace-uri-from-QName|fn:namespace-uri-for-prefix|fn:namespace-uri|fn:name|fn:months-from-duration|fn:month-from-dateTime|fn:month-from-date|fn:minutes-from-time|fn:minutes-from-duration|fn:minutes-from-dateTime|fn:min|fn:max|fn:matches|fn:lower-case|fn:local-name-from-QName|fn:local-name|fn:last|fn:lang|fn:iri-to-uri|fn:insert-before|fn:index-of|fn:in-scope-prefixes|fn:implicit-timezone|fn:idref|fn:id|fn:hours-from-time|fn:hours-from-duration|fn:hours-from-dateTime|fn:floor|fn:false|fn:expanded-QName|fn:exists|fn:exactly-one|fn:escape-uri|fn:escape-html-uri|fn:error|fn:ends-with|fn:encode-for-uri|fn:empty|fn:document-uri|fn:doc-available|fn:doc|fn:distinct-values|fn:distinct-nodes|fn:default-collation|fn:deep-equal|fn:days-from-duration|fn:day-from-dateTime|fn:day-from-date|fn:data|fn:current-time|fn:current-dateTime|fn:current-date|fn:count|fn:contains|fn:concat|fn:compare|fn:collection|fn:codepoints-to-string|fn:codepoint-equal|fn:ceiling|fn:boolean|fn:base-uri|fn:avg|fn:adjust-time-to-timezone|fn:adjust-dateTime-to-timezone|fn:adjust-date-to-timezone|fn:abs|feed:unsubscribe|feed:subscription|feed:subscribe|feed:request|feed:item|feed:description|excel:clean|entity:enrich|dom:set-pipelines|dom:set-permissions|dom:set-name|dom:set-evaluation-context|dom:set-domain-scope|dom:set-description|dom:remove-pipeline|dom:remove-permissions|dom:remove|dom:get|dom:evaluation-context|dom:domains|dom:domain-scope|dom:create|dom:configuration-set-restart-user|dom:configuration-set-permissions|dom:configuration-set-evaluation-context|dom:configuration-set-default-domain|dom:configuration-get|dom:configuration-create|dom:collection|dom:add-pipeline|dom:add-permissions|dls:retention-rules|dls:retention-rule-remove|dls:retention-rule-insert|dls:retention-rule|dls:purge|dls:node-expand|dls:link-references|dls:link-expand|dls:documents-query|dls:document-versions-query|dls:document-version-uri|dls:document-version-query|dls:document-version-delete|dls:document-version-as-of|dls:document-version|dls:document-update|dls:document-unmanage|dls:document-set-quality|dls:document-set-property|dls:document-set-properties|dls:document-set-permissions|dls:document-set-collections|dls:document-retention-rules|dls:document-remove-properties|dls:document-remove-permissions|dls:document-remove-collections|dls:document-purge|dls:document-manage|dls:document-is-managed|dls:document-insert-and-manage|dls:document-include-query|dls:document-history|dls:document-get-permissions|dls:document-extract-part|dls:document-delete|dls:document-checkout-status|dls:document-checkout|dls:document-checkin|dls:document-add-properties|dls:document-add-permissions|dls:document-add-collections|dls:break-checkout|dls:author-query|dls:as-of-query|dbk:convert|dbg:wait|dbg:value|dbg:stopped|dbg:stop|dbg:step|dbg:status|dbg:stack|dbg:out|dbg:next|dbg:line|dbg:invoke|dbg:function|dbg:finish|dbg:expr|dbg:eval|dbg:disconnect|dbg:detach|dbg:continue|dbg:connect|dbg:clear|dbg:breakpoints|dbg:break|dbg:attached|dbg:attach|cvt:save-converted-documents|cvt:part-uri|cvt:destination-uri|cvt:basepath|cvt:basename|cts:words|cts:word-query-weight|cts:word-query-text|cts:word-query-options|cts:word-query|cts:word-match|cts:walk|cts:uris|cts:uri-match|cts:train|cts:tokenize|cts:thresholds|cts:stem|cts:similar-query-weight|cts:similar-query-nodes|cts:similar-query|cts:shortest-distance|cts:search|cts:score|cts:reverse-query-weight|cts:reverse-query-nodes|cts:reverse-query|cts:remainder|cts:registered-query-weight|cts:registered-query-options|cts:registered-query-ids|cts:registered-query|cts:register|cts:query|cts:quality|cts:properties-query-query|cts:properties-query|cts:polygon-vertices|cts:polygon|cts:point-longitude|cts:point-latitude|cts:point|cts:or-query-queries|cts:or-query|cts:not-query-weight|cts:not-query-query|cts:not-query|cts:near-query-weight|cts:near-query-queries|cts:near-query-options|cts:near-query-distance|cts:near-query|cts:highlight|cts:geospatial-co-occurrences|cts:frequency|cts:fitness|cts:field-words|cts:field-word-query-weight|cts:field-word-query-text|cts:field-word-query-options|cts:field-word-query-field-name|cts:field-word-query|cts:field-word-match|cts:entity-highlight|cts:element-words|cts:element-word-query-weight|cts:element-word-query-text|cts:element-word-query-options|cts:element-word-query-element-name|cts:element-word-query|cts:element-word-match|cts:element-values|cts:element-value-ranges|cts:element-value-query-weight|cts:element-value-query-text|cts:element-value-query-options|cts:element-value-query-element-name|cts:element-value-query|cts:element-value-match|cts:element-value-geospatial-co-occurrences|cts:element-value-co-occurrences|cts:element-range-query-weight|cts:element-range-query-value|cts:element-range-query-options|cts:element-range-query-operator|cts:element-range-query-element-name|cts:element-range-query|cts:element-query-query|cts:element-query-element-name|cts:element-query|cts:element-pair-geospatial-values|cts:element-pair-geospatial-value-match|cts:element-pair-geospatial-query-weight|cts:element-pair-geospatial-query-region|cts:element-pair-geospatial-query-options|cts:element-pair-geospatial-query-longitude-name|cts:element-pair-geospatial-query-latitude-name|cts:element-pair-geospatial-query-element-name|cts:element-pair-geospatial-query|cts:element-pair-geospatial-boxes|cts:element-geospatial-values|cts:element-geospatial-value-match|cts:element-geospatial-query-weight|cts:element-geospatial-query-region|cts:element-geospatial-query-options|cts:element-geospatial-query-element-name|cts:element-geospatial-query|cts:element-geospatial-boxes|cts:element-child-geospatial-values|cts:element-child-geospatial-value-match|cts:element-child-geospatial-query-weight|cts:element-child-geospatial-query-region|cts:element-child-geospatial-query-options|cts:element-child-geospatial-query-element-name|cts:element-child-geospatial-query-child-name|cts:element-child-geospatial-query|cts:element-child-geospatial-boxes|cts:element-attribute-words|cts:element-attribute-word-query-weight|cts:element-attribute-word-query-text|cts:element-attribute-word-query-options|cts:element-attribute-word-query-element-name|cts:element-attribute-word-query-attribute-name|cts:element-attribute-word-query|cts:element-attribute-word-match|cts:element-attribute-values|cts:element-attribute-value-ranges|cts:element-attribute-value-query-weight|cts:element-attribute-value-query-text|cts:element-attribute-value-query-options|cts:element-attribute-value-query-element-name|cts:element-attribute-value-query-attribute-name|cts:element-attribute-value-query|cts:element-attribute-value-match|cts:element-attribute-value-geospatial-co-occurrences|cts:element-attribute-value-co-occurrences|cts:element-attribute-range-query-weight|cts:element-attribute-range-query-value|cts:element-attribute-range-query-options|cts:element-attribute-range-query-operator|cts:element-attribute-range-query-element-name|cts:element-attribute-range-query-attribute-name|cts:element-attribute-range-query|cts:element-attribute-pair-geospatial-values|cts:element-attribute-pair-geospatial-value-match|cts:element-attribute-pair-geospatial-query-weight|cts:element-attribute-pair-geospatial-query-region|cts:element-attribute-pair-geospatial-query-options|cts:element-attribute-pair-geospatial-query-longitude-name|cts:element-attribute-pair-geospatial-query-latitude-name|cts:element-attribute-pair-geospatial-query-element-name|cts:element-attribute-pair-geospatial-query|cts:element-attribute-pair-geospatial-boxes|cts:document-query-uris|cts:document-query|cts:distance|cts:directory-query-uris|cts:directory-query-depth|cts:directory-query|cts:destination|cts:deregister|cts:contains|cts:confidence|cts:collections|cts:collection-query-uris|cts:collection-query|cts:collection-match|cts:classify|cts:circle-radius|cts:circle-center|cts:circle|cts:box-west|cts:box-south|cts:box-north|cts:box-east|cts:box|cts:bearing|cts:arc-intersection|cts:and-query-queries|cts:and-query-options|cts:and-query|cts:and-not-query-positive-query|cts:and-not-query-negative-query|cts:and-not-query|css:get|css:convert|cpf:success|cpf:failure|cpf:document-set-state|cpf:document-set-processing-status|cpf:document-set-last-updated|cpf:document-set-error|cpf:document-get-state|cpf:document-get-processing-status|cpf:document-get-last-updated|cpf:document-get-error|cpf:check-transition|alert:spawn-matching-actions|alert:rule-user-id-query|alert:rule-set-user-id|alert:rule-set-query|alert:rule-set-options|alert:rule-set-name|alert:rule-set-description|alert:rule-set-action|alert:rule-remove|alert:rule-name-query|alert:rule-insert|alert:rule-id-query|alert:rule-get-user-id|alert:rule-get-query|alert:rule-get-options|alert:rule-get-name|alert:rule-get-id|alert:rule-get-description|alert:rule-get-action|alert:rule-action-query|alert:remove-triggers|alert:make-rule|alert:make-log-action|alert:make-config|alert:make-action|alert:invoke-matching-actions|alert:get-my-rules|alert:get-all-rules|alert:get-actions|alert:find-matching-rules|alert:create-triggers|alert:config-set-uri|alert:config-set-trigger-ids|alert:config-set-options|alert:config-set-name|alert:config-set-description|alert:config-set-cpf-domain-names|alert:config-set-cpf-domain-ids|alert:config-insert|alert:config-get-uri|alert:config-get-trigger-ids|alert:config-get-options|alert:config-get-name|alert:config-get-id|alert:config-get-description|alert:config-get-cpf-domain-names|alert:config-get-cpf-domain-ids|alert:config-get|alert:config-delete|alert:action-set-options|alert:action-set-name|alert:action-set-module-root|alert:action-set-module-db|alert:action-set-module|alert:action-set-description|alert:action-remove|alert:action-insert|alert:action-get-options|alert:action-get-name|alert:action-get-module-root|alert:action-get-module-db|alert:action-get-module|alert:action-get-description|zero-or-one|years-from-duration|year-from-dateTime|year-from-date|upper-case|unordered|true|translate|trace|tokenize|timezone-from-time|timezone-from-dateTime|timezone-from-date|sum|subtract-dateTimes-yielding-yearMonthDuration|subtract-dateTimes-yielding-dayTimeDuration|substring-before|substring-after|substring|subsequence|string-to-codepoints|string-pad|string-length|string-join|string|static-base-uri|starts-with|seconds-from-time|seconds-from-duration|seconds-from-dateTime|round-half-to-even|round|root|reverse|resolve-uri|resolve-QName|replace|remove|QName|prefix-from-QName|position|one-or-more|number|not|normalize-unicode|normalize-space|node-name|node-kind|nilled|namespace-uri-from-QName|namespace-uri-for-prefix|namespace-uri|name|months-from-duration|month-from-dateTime|month-from-date|minutes-from-time|minutes-from-duration|minutes-from-dateTime|min|max|matches|lower-case|local-name-from-QName|local-name|last|lang|iri-to-uri|insert-before|index-of|in-scope-prefixes|implicit-timezone|idref|id|hours-from-time|hours-from-duration|hours-from-dateTime|floor|false|expanded-QName|exists|exactly-one|escape-uri|escape-html-uri|error|ends-with|encode-for-uri|empty|document-uri|doc-available|doc|distinct-values|distinct-nodes|default-collation|deep-equal|days-from-duration|day-from-dateTime|day-from-date|data|current-time|current-dateTime|current-date|count|contains|concat|compare|collection|codepoints-to-string|codepoint-equal|ceiling|boolean|base-uri|avg|adjust-time-to-timezone|adjust-dateTime-to-timezone|adjust-date-to-timezone|abs)\\b/],\n[\"pln\",/^[\\w:-]+/],[\"pln\",/^[\\t\\n\\r \\xa0]+/]]),[\"xq\",\"xquery\"]);\n"
  },
  {
    "path": "static/bootstrap/plugins/bootstrap-wysiwyg/external/google-code-prettify/lang-yaml.js",
    "content": "var a=null;\nPR.registerLangHandler(PR.createSimpleLexer([[\"pun\",/^[:>?|]+/,a,\":|>?\"],[\"dec\",/^%(?:YAML|TAG)[^\\n\\r#]+/,a,\"%\"],[\"typ\",/^&\\S+/,a,\"&\"],[\"typ\",/^!\\S*/,a,\"!\"],[\"str\",/^\"(?:[^\"\\\\]|\\\\.)*(?:\"|$)/,a,'\"'],[\"str\",/^'(?:[^']|'')*(?:'|$)/,a,\"'\"],[\"com\",/^#[^\\n\\r]*/,a,\"#\"],[\"pln\",/^\\s+/,a,\" \\t\\r\\n\"]],[[\"dec\",/^(?:---|\\.\\.\\.)(?:[\\n\\r]|$)/],[\"pun\",/^-/],[\"kwd\",/^\\w+:[\\n\\r ]/],[\"pln\",/^\\w+/]]),[\"yaml\",\"yml\"]);\n"
  },
  {
    "path": "static/bootstrap/plugins/bootstrap-wysiwyg/external/google-code-prettify/prettify.css",
    "content": ".pln{color:#000}@media screen{.str{color:#080}.kwd{color:#008}.com{color:#800}.typ{color:#606}.lit{color:#066}.pun,.opn,.clo{color:#660}.tag{color:#008}.atn{color:#606}.atv{color:#080}.dec,.var{color:#606}.fun{color:red}}@media print,projection{.str{color:#060}.kwd{color:#006;font-weight:bold}.com{color:#600;font-style:italic}.typ{color:#404;font-weight:bold}.lit{color:#044}.pun,.opn,.clo{color:#440}.tag{color:#006;font-weight:bold}.atn{color:#404}.atv{color:#060}}pre.prettyprint{padding:2px;border:1px solid #888}ol.linenums{margin-top:0;margin-bottom:0}li.L0,li.L1,li.L2,li.L3,li.L5,li.L6,li.L7,li.L8{list-style-type:none}li.L1,li.L3,li.L5,li.L7,li.L9{background:#eee}"
  },
  {
    "path": "static/bootstrap/plugins/bootstrap-wysiwyg/external/google-code-prettify/prettify.js",
    "content": "!function(){var q=null;window.PR_SHOULD_USE_CONTINUATION=!0;\n(function(){function S(a){function d(e){var b=e.charCodeAt(0);if(b!==92)return b;var a=e.charAt(1);return(b=r[a])?b:\"0\"<=a&&a<=\"7\"?parseInt(e.substring(1),8):a===\"u\"||a===\"x\"?parseInt(e.substring(2),16):e.charCodeAt(1)}function g(e){if(e<32)return(e<16?\"\\\\x0\":\"\\\\x\")+e.toString(16);e=String.fromCharCode(e);return e===\"\\\\\"||e===\"-\"||e===\"]\"||e===\"^\"?\"\\\\\"+e:e}function b(e){var b=e.substring(1,e.length-1).match(/\\\\u[\\dA-Fa-f]{4}|\\\\x[\\dA-Fa-f]{2}|\\\\[0-3][0-7]{0,2}|\\\\[0-7]{1,2}|\\\\[\\S\\s]|[^\\\\]/g),e=[],a=\nb[0]===\"^\",c=[\"[\"];a&&c.push(\"^\");for(var a=a?1:0,f=b.length;a<f;++a){var h=b[a];if(/\\\\[bdsw]/i.test(h))c.push(h);else{var h=d(h),l;a+2<f&&\"-\"===b[a+1]?(l=d(b[a+2]),a+=2):l=h;e.push([h,l]);l<65||h>122||(l<65||h>90||e.push([Math.max(65,h)|32,Math.min(l,90)|32]),l<97||h>122||e.push([Math.max(97,h)&-33,Math.min(l,122)&-33]))}}e.sort(function(e,a){return e[0]-a[0]||a[1]-e[1]});b=[];f=[];for(a=0;a<e.length;++a)h=e[a],h[0]<=f[1]+1?f[1]=Math.max(f[1],h[1]):b.push(f=h);for(a=0;a<b.length;++a)h=b[a],c.push(g(h[0])),\nh[1]>h[0]&&(h[1]+1>h[0]&&c.push(\"-\"),c.push(g(h[1])));c.push(\"]\");return c.join(\"\")}function s(e){for(var a=e.source.match(/\\[(?:[^\\\\\\]]|\\\\[\\S\\s])*]|\\\\u[\\dA-Fa-f]{4}|\\\\x[\\dA-Fa-f]{2}|\\\\\\d+|\\\\[^\\dux]|\\(\\?[!:=]|[()^]|[^()[\\\\^]+/g),c=a.length,d=[],f=0,h=0;f<c;++f){var l=a[f];l===\"(\"?++h:\"\\\\\"===l.charAt(0)&&(l=+l.substring(1))&&(l<=h?d[l]=-1:a[f]=g(l))}for(f=1;f<d.length;++f)-1===d[f]&&(d[f]=++x);for(h=f=0;f<c;++f)l=a[f],l===\"(\"?(++h,d[h]||(a[f]=\"(?:\")):\"\\\\\"===l.charAt(0)&&(l=+l.substring(1))&&l<=h&&\n(a[f]=\"\\\\\"+d[l]);for(f=0;f<c;++f)\"^\"===a[f]&&\"^\"!==a[f+1]&&(a[f]=\"\");if(e.ignoreCase&&m)for(f=0;f<c;++f)l=a[f],e=l.charAt(0),l.length>=2&&e===\"[\"?a[f]=b(l):e!==\"\\\\\"&&(a[f]=l.replace(/[A-Za-z]/g,function(a){a=a.charCodeAt(0);return\"[\"+String.fromCharCode(a&-33,a|32)+\"]\"}));return a.join(\"\")}for(var x=0,m=!1,j=!1,k=0,c=a.length;k<c;++k){var i=a[k];if(i.ignoreCase)j=!0;else if(/[a-z]/i.test(i.source.replace(/\\\\u[\\da-f]{4}|\\\\x[\\da-f]{2}|\\\\[^UXux]/gi,\"\"))){m=!0;j=!1;break}}for(var r={b:8,t:9,n:10,v:11,\nf:12,r:13},n=[],k=0,c=a.length;k<c;++k){i=a[k];if(i.global||i.multiline)throw Error(\"\"+i);n.push(\"(?:\"+s(i)+\")\")}return RegExp(n.join(\"|\"),j?\"gi\":\"g\")}function T(a,d){function g(a){var c=a.nodeType;if(c==1){if(!b.test(a.className)){for(c=a.firstChild;c;c=c.nextSibling)g(c);c=a.nodeName.toLowerCase();if(\"br\"===c||\"li\"===c)s[j]=\"\\n\",m[j<<1]=x++,m[j++<<1|1]=a}}else if(c==3||c==4)c=a.nodeValue,c.length&&(c=d?c.replace(/\\r\\n?/g,\"\\n\"):c.replace(/[\\t\\n\\r ]+/g,\" \"),s[j]=c,m[j<<1]=x,x+=c.length,m[j++<<1|1]=\na)}var b=/(?:^|\\s)nocode(?:\\s|$)/,s=[],x=0,m=[],j=0;g(a);return{a:s.join(\"\").replace(/\\n$/,\"\"),d:m}}function H(a,d,g,b){d&&(a={a:d,e:a},g(a),b.push.apply(b,a.g))}function U(a){for(var d=void 0,g=a.firstChild;g;g=g.nextSibling)var b=g.nodeType,d=b===1?d?a:g:b===3?V.test(g.nodeValue)?a:d:d;return d===a?void 0:d}function C(a,d){function g(a){for(var j=a.e,k=[j,\"pln\"],c=0,i=a.a.match(s)||[],r={},n=0,e=i.length;n<e;++n){var z=i[n],w=r[z],t=void 0,f;if(typeof w===\"string\")f=!1;else{var h=b[z.charAt(0)];\nif(h)t=z.match(h[1]),w=h[0];else{for(f=0;f<x;++f)if(h=d[f],t=z.match(h[1])){w=h[0];break}t||(w=\"pln\")}if((f=w.length>=5&&\"lang-\"===w.substring(0,5))&&!(t&&typeof t[1]===\"string\"))f=!1,w=\"src\";f||(r[z]=w)}h=c;c+=z.length;if(f){f=t[1];var l=z.indexOf(f),B=l+f.length;t[2]&&(B=z.length-t[2].length,l=B-f.length);w=w.substring(5);H(j+h,z.substring(0,l),g,k);H(j+h+l,f,I(w,f),k);H(j+h+B,z.substring(B),g,k)}else k.push(j+h,w)}a.g=k}var b={},s;(function(){for(var g=a.concat(d),j=[],k={},c=0,i=g.length;c<i;++c){var r=\ng[c],n=r[3];if(n)for(var e=n.length;--e>=0;)b[n.charAt(e)]=r;r=r[1];n=\"\"+r;k.hasOwnProperty(n)||(j.push(r),k[n]=q)}j.push(/[\\S\\s]/);s=S(j)})();var x=d.length;return g}function v(a){var d=[],g=[];a.tripleQuotedStrings?d.push([\"str\",/^(?:'''(?:[^'\\\\]|\\\\[\\S\\s]|''?(?=[^']))*(?:'''|$)|\"\"\"(?:[^\"\\\\]|\\\\[\\S\\s]|\"\"?(?=[^\"]))*(?:\"\"\"|$)|'(?:[^'\\\\]|\\\\[\\S\\s])*(?:'|$)|\"(?:[^\"\\\\]|\\\\[\\S\\s])*(?:\"|$))/,q,\"'\\\"\"]):a.multiLineStrings?d.push([\"str\",/^(?:'(?:[^'\\\\]|\\\\[\\S\\s])*(?:'|$)|\"(?:[^\"\\\\]|\\\\[\\S\\s])*(?:\"|$)|`(?:[^\\\\`]|\\\\[\\S\\s])*(?:`|$))/,\nq,\"'\\\"`\"]):d.push([\"str\",/^(?:'(?:[^\\n\\r'\\\\]|\\\\.)*(?:'|$)|\"(?:[^\\n\\r\"\\\\]|\\\\.)*(?:\"|$))/,q,\"\\\"'\"]);a.verbatimStrings&&g.push([\"str\",/^@\"(?:[^\"]|\"\")*(?:\"|$)/,q]);var b=a.hashComments;b&&(a.cStyleComments?(b>1?d.push([\"com\",/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,q,\"#\"]):d.push([\"com\",/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\\b|[^\\n\\r]*)/,q,\"#\"]),g.push([\"str\",/^<(?:(?:(?:\\.\\.\\/)*|\\/?)(?:[\\w-]+(?:\\/[\\w-]+)+)?[\\w-]+\\.h(?:h|pp|\\+\\+)?|[a-z]\\w*)>/,q])):d.push([\"com\",\n/^#[^\\n\\r]*/,q,\"#\"]));a.cStyleComments&&(g.push([\"com\",/^\\/\\/[^\\n\\r]*/,q]),g.push([\"com\",/^\\/\\*[\\S\\s]*?(?:\\*\\/|$)/,q]));if(b=a.regexLiterals){var s=(b=b>1?\"\":\"\\n\\r\")?\".\":\"[\\\\S\\\\s]\";g.push([\"lang-regex\",RegExp(\"^(?:^^\\\\.?|[+-]|[!=]=?=?|\\\\#|%=?|&&?=?|\\\\(|\\\\*=?|[+\\\\-]=|->|\\\\/=?|::?|<<?=?|>>?>?=?|,|;|\\\\?|@|\\\\[|~|{|\\\\^\\\\^?=?|\\\\|\\\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\\\s*(\"+(\"/(?=[^/*\"+b+\"])(?:[^/\\\\x5B\\\\x5C\"+b+\"]|\\\\x5C\"+s+\"|\\\\x5B(?:[^\\\\x5C\\\\x5D\"+b+\"]|\\\\x5C\"+\ns+\")*(?:\\\\x5D|$))+/\")+\")\")])}(b=a.types)&&g.push([\"typ\",b]);b=(\"\"+a.keywords).replace(/^ | $/g,\"\");b.length&&g.push([\"kwd\",RegExp(\"^(?:\"+b.replace(/[\\s,]+/g,\"|\")+\")\\\\b\"),q]);d.push([\"pln\",/^\\s+/,q,\" \\r\\n\\t\\u00a0\"]);b=\"^.[^\\\\s\\\\w.$@'\\\"`/\\\\\\\\]*\";a.regexLiterals&&(b+=\"(?!s*/)\");g.push([\"lit\",/^@[$_a-z][\\w$@]*/i,q],[\"typ\",/^(?:[@_]?[A-Z]+[a-z][\\w$@]*|\\w+_t\\b)/,q],[\"pln\",/^[$_a-z][\\w$@]*/i,q],[\"lit\",/^(?:0x[\\da-f]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+-]?\\d+)?)[a-z]*/i,q,\"0123456789\"],[\"pln\",/^\\\\[\\S\\s]?/,\nq],[\"pun\",RegExp(b),q]);return C(d,g)}function J(a,d,g){function b(a){var c=a.nodeType;if(c==1&&!x.test(a.className))if(\"br\"===a.nodeName)s(a),a.parentNode&&a.parentNode.removeChild(a);else for(a=a.firstChild;a;a=a.nextSibling)b(a);else if((c==3||c==4)&&g){var d=a.nodeValue,i=d.match(m);if(i)c=d.substring(0,i.index),a.nodeValue=c,(d=d.substring(i.index+i[0].length))&&a.parentNode.insertBefore(j.createTextNode(d),a.nextSibling),s(a),c||a.parentNode.removeChild(a)}}function s(a){function b(a,c){var d=\nc?a.cloneNode(!1):a,e=a.parentNode;if(e){var e=b(e,1),g=a.nextSibling;e.appendChild(d);for(var i=g;i;i=g)g=i.nextSibling,e.appendChild(i)}return d}for(;!a.nextSibling;)if(a=a.parentNode,!a)return;for(var a=b(a.nextSibling,0),d;(d=a.parentNode)&&d.nodeType===1;)a=d;c.push(a)}for(var x=/(?:^|\\s)nocode(?:\\s|$)/,m=/\\r\\n?|\\n/,j=a.ownerDocument,k=j.createElement(\"li\");a.firstChild;)k.appendChild(a.firstChild);for(var c=[k],i=0;i<c.length;++i)b(c[i]);d===(d|0)&&c[0].setAttribute(\"value\",d);var r=j.createElement(\"ol\");\nr.className=\"linenums\";for(var d=Math.max(0,d-1|0)||0,i=0,n=c.length;i<n;++i)k=c[i],k.className=\"L\"+(i+d)%10,k.firstChild||k.appendChild(j.createTextNode(\"\\u00a0\")),r.appendChild(k);a.appendChild(r)}function p(a,d){for(var g=d.length;--g>=0;){var b=d[g];F.hasOwnProperty(b)?D.console&&console.warn(\"cannot override language handler %s\",b):F[b]=a}}function I(a,d){if(!a||!F.hasOwnProperty(a))a=/^\\s*</.test(d)?\"default-markup\":\"default-code\";return F[a]}function K(a){var d=a.h;try{var g=T(a.c,a.i),b=g.a;\na.a=b;a.d=g.d;a.e=0;I(d,b)(a);var s=/\\bMSIE\\s(\\d+)/.exec(navigator.userAgent),s=s&&+s[1]<=8,d=/\\n/g,x=a.a,m=x.length,g=0,j=a.d,k=j.length,b=0,c=a.g,i=c.length,r=0;c[i]=m;var n,e;for(e=n=0;e<i;)c[e]!==c[e+2]?(c[n++]=c[e++],c[n++]=c[e++]):e+=2;i=n;for(e=n=0;e<i;){for(var p=c[e],w=c[e+1],t=e+2;t+2<=i&&c[t+1]===w;)t+=2;c[n++]=p;c[n++]=w;e=t}c.length=n;var f=a.c,h;if(f)h=f.style.display,f.style.display=\"none\";try{for(;b<k;){var l=j[b+2]||m,B=c[r+2]||m,t=Math.min(l,B),A=j[b+1],G;if(A.nodeType!==1&&(G=x.substring(g,\nt))){s&&(G=G.replace(d,\"\\r\"));A.nodeValue=G;var L=A.ownerDocument,o=L.createElement(\"span\");o.className=c[r+1];var v=A.parentNode;v.replaceChild(o,A);o.appendChild(A);g<l&&(j[b+1]=A=L.createTextNode(x.substring(t,l)),v.insertBefore(A,o.nextSibling))}g=t;g>=l&&(b+=2);g>=B&&(r+=2)}}finally{if(f)f.style.display=h}}catch(u){D.console&&console.log(u&&u.stack||u)}}var D=window,y=[\"break,continue,do,else,for,if,return,while\"],E=[[y,\"auto,case,char,const,default,double,enum,extern,float,goto,inline,int,long,register,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile\"],\n\"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof\"],M=[E,\"alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,delegate,dynamic_cast,explicit,export,friend,generic,late_check,mutable,namespace,nullptr,property,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where\"],N=[E,\"abstract,assert,boolean,byte,extends,final,finally,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient\"],\nO=[N,\"as,base,by,checked,decimal,delegate,descending,dynamic,event,fixed,foreach,from,group,implicit,in,internal,into,is,let,lock,object,out,override,orderby,params,partial,readonly,ref,sbyte,sealed,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,var,virtual,where\"],E=[E,\"debugger,eval,export,function,get,null,set,undefined,var,with,Infinity,NaN\"],P=[y,\"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None\"],\nQ=[y,\"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END\"],W=[y,\"as,assert,const,copy,drop,enum,extern,fail,false,fn,impl,let,log,loop,match,mod,move,mut,priv,pub,pure,ref,self,static,struct,true,trait,type,unsafe,use\"],y=[y,\"case,done,elif,esac,eval,fi,function,in,local,set,then,until\"],R=/^(DIR|FILE|vector|(de|priority_)?queue|list|stack|(const_)?iterator|(multi)?(set|map)|bitset|u?(int|float)\\d*)\\b/,\nV=/\\S/,X=v({keywords:[M,O,E,\"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END\",P,Q,y],hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0}),F={};p(X,[\"default-code\"]);p(C([],[[\"pln\",/^[^<?]+/],[\"dec\",/^<!\\w[^>]*(?:>|$)/],[\"com\",/^<\\!--[\\S\\s]*?(?:--\\>|$)/],[\"lang-\",/^<\\?([\\S\\s]+?)(?:\\?>|$)/],[\"lang-\",/^<%([\\S\\s]+?)(?:%>|$)/],[\"pun\",/^(?:<[%?]|[%?]>)/],[\"lang-\",\n/^<xmp\\b[^>]*>([\\S\\s]+?)<\\/xmp\\b[^>]*>/i],[\"lang-js\",/^<script\\b[^>]*>([\\S\\s]*?)(<\\/script\\b[^>]*>)/i],[\"lang-css\",/^<style\\b[^>]*>([\\S\\s]*?)(<\\/style\\b[^>]*>)/i],[\"lang-in.tag\",/^(<\\/?[a-z][^<>]*>)/i]]),[\"default-markup\",\"htm\",\"html\",\"mxml\",\"xhtml\",\"xml\",\"xsl\"]);p(C([[\"pln\",/^\\s+/,q,\" \\t\\r\\n\"],[\"atv\",/^(?:\"[^\"]*\"?|'[^']*'?)/,q,\"\\\"'\"]],[[\"tag\",/^^<\\/?[a-z](?:[\\w-.:]*\\w)?|\\/?>$/i],[\"atn\",/^(?!style[\\s=]|on)[a-z](?:[\\w:-]*\\w)?/i],[\"lang-uq.val\",/^=\\s*([^\\s\"'>]*(?:[^\\s\"'/>]|\\/(?=\\s)))/],[\"pun\",/^[/<->]+/],\n[\"lang-js\",/^on\\w+\\s*=\\s*\"([^\"]+)\"/i],[\"lang-js\",/^on\\w+\\s*=\\s*'([^']+)'/i],[\"lang-js\",/^on\\w+\\s*=\\s*([^\\s\"'>]+)/i],[\"lang-css\",/^style\\s*=\\s*\"([^\"]+)\"/i],[\"lang-css\",/^style\\s*=\\s*'([^']+)'/i],[\"lang-css\",/^style\\s*=\\s*([^\\s\"'>]+)/i]]),[\"in.tag\"]);p(C([],[[\"atv\",/^[\\S\\s]+/]]),[\"uq.val\"]);p(v({keywords:M,hashComments:!0,cStyleComments:!0,types:R}),[\"c\",\"cc\",\"cpp\",\"cxx\",\"cyc\",\"m\"]);p(v({keywords:\"null,true,false\"}),[\"json\"]);p(v({keywords:O,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:R}),\n[\"cs\"]);p(v({keywords:N,cStyleComments:!0}),[\"java\"]);p(v({keywords:y,hashComments:!0,multiLineStrings:!0}),[\"bash\",\"bsh\",\"csh\",\"sh\"]);p(v({keywords:P,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),[\"cv\",\"py\",\"python\"]);p(v({keywords:\"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END\",hashComments:!0,multiLineStrings:!0,regexLiterals:2}),[\"perl\",\"pl\",\"pm\"]);p(v({keywords:Q,\nhashComments:!0,multiLineStrings:!0,regexLiterals:!0}),[\"rb\",\"ruby\"]);p(v({keywords:E,cStyleComments:!0,regexLiterals:!0}),[\"javascript\",\"js\"]);p(v({keywords:\"all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,throw,true,try,unless,until,when,while,yes\",hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),[\"coffee\"]);p(v({keywords:W,cStyleComments:!0,multilineStrings:!0}),[\"rc\",\"rs\",\"rust\"]);\np(C([],[[\"str\",/^[\\S\\s]+/]]),[\"regex\"]);var Y=D.PR={createSimpleLexer:C,registerLangHandler:p,sourceDecorator:v,PR_ATTRIB_NAME:\"atn\",PR_ATTRIB_VALUE:\"atv\",PR_COMMENT:\"com\",PR_DECLARATION:\"dec\",PR_KEYWORD:\"kwd\",PR_LITERAL:\"lit\",PR_NOCODE:\"nocode\",PR_PLAIN:\"pln\",PR_PUNCTUATION:\"pun\",PR_SOURCE:\"src\",PR_STRING:\"str\",PR_TAG:\"tag\",PR_TYPE:\"typ\",prettyPrintOne:D.prettyPrintOne=function(a,d,g){var b=document.createElement(\"div\");b.innerHTML=\"<pre>\"+a+\"</pre>\";b=b.firstChild;g&&J(b,g,!0);K({h:d,j:g,c:b,i:1});\nreturn b.innerHTML},prettyPrint:D.prettyPrint=function(a,d){function g(){for(var b=D.PR_SHOULD_USE_CONTINUATION?c.now()+250:Infinity;i<p.length&&c.now()<b;i++){for(var d=p[i],j=h,k=d;k=k.previousSibling;){var m=k.nodeType,o=(m===7||m===8)&&k.nodeValue;if(o?!/^\\??prettify\\b/.test(o):m!==3||/\\S/.test(k.nodeValue))break;if(o){j={};o.replace(/\\b(\\w+)=([\\w%+\\-.:]+)/g,function(a,b,c){j[b]=c});break}}k=d.className;if((j!==h||e.test(k))&&!v.test(k)){m=!1;for(o=d.parentNode;o;o=o.parentNode)if(f.test(o.tagName)&&\no.className&&e.test(o.className)){m=!0;break}if(!m){d.className+=\" prettyprinted\";m=j.lang;if(!m){var m=k.match(n),y;if(!m&&(y=U(d))&&t.test(y.tagName))m=y.className.match(n);m&&(m=m[1])}if(w.test(d.tagName))o=1;else var o=d.currentStyle,u=s.defaultView,o=(o=o?o.whiteSpace:u&&u.getComputedStyle?u.getComputedStyle(d,q).getPropertyValue(\"white-space\"):0)&&\"pre\"===o.substring(0,3);u=j.linenums;if(!(u=u===\"true\"||+u))u=(u=k.match(/\\blinenums\\b(?::(\\d+))?/))?u[1]&&u[1].length?+u[1]:!0:!1;u&&J(d,u,o);r=\n{h:m,c:d,j:u,i:o};K(r)}}}i<p.length?setTimeout(g,250):\"function\"===typeof a&&a()}for(var b=d||document.body,s=b.ownerDocument||document,b=[b.getElementsByTagName(\"pre\"),b.getElementsByTagName(\"code\"),b.getElementsByTagName(\"xmp\")],p=[],m=0;m<b.length;++m)for(var j=0,k=b[m].length;j<k;++j)p.push(b[m][j]);var b=q,c=Date;c.now||(c={now:function(){return+new Date}});var i=0,r,n=/\\blang(?:uage)?-([\\w.]+)(?!\\S)/,e=/\\bprettyprint\\b/,v=/\\bprettyprinted\\b/,w=/pre|xmp/i,t=/^code$/i,f=/^(?:pre|code|xmp)$/i,\nh={};g()}};typeof define===\"function\"&&define.amd&&define(\"google-code-prettify\",[],function(){return Y})})();}()\n"
  },
  {
    "path": "static/bootstrap/plugins/bootstrap-wysiwyg/external/google-code-prettify/run_prettify.js",
    "content": "!function(){var r=null;\n(function(){function X(e){function j(){try{J.doScroll(\"left\")}catch(e){P(j,50);return}w(\"poll\")}function w(j){if(!(j.type==\"readystatechange\"&&x.readyState!=\"complete\")&&((j.type==\"load\"?n:x)[z](i+j.type,w,!1),!m&&(m=!0)))e.call(n,j.type||j)}var Y=x.addEventListener,m=!1,C=!0,t=Y?\"addEventListener\":\"attachEvent\",z=Y?\"removeEventListener\":\"detachEvent\",i=Y?\"\":\"on\";if(x.readyState==\"complete\")e.call(n,\"lazy\");else{if(x.createEventObject&&J.doScroll){try{C=!n.frameElement}catch(A){}C&&j()}x[t](i+\"DOMContentLoaded\",\nw,!1);x[t](i+\"readystatechange\",w,!1);n[t](i+\"load\",w,!1)}}function Q(){S&&X(function(){var e=K.length;$(e?function(){for(var j=0;j<e;++j)(function(e){P(function(){n.exports[K[e]].apply(n,arguments)},0)})(j)}:void 0)})}for(var n=window,P=n.setTimeout,x=document,J=x.documentElement,L=x.head||x.getElementsByTagName(\"head\")[0]||J,z=\"\",A=x.scripts,m=A.length;--m>=0;){var M=A[m],T=M.src.match(/^[^#?]*\\/run_prettify\\.js(\\?[^#]*)?(?:#.*)?$/);if(T){z=T[1]||\"\";M.parentNode.removeChild(M);break}}var S=!0,D=\n[],N=[],K=[];z.replace(/[&?]([^&=]+)=([^&]+)/g,function(e,j,w){w=decodeURIComponent(w);j=decodeURIComponent(j);j==\"autorun\"?S=!/^[0fn]/i.test(w):j==\"lang\"?D.push(w):j==\"skin\"?N.push(w):j==\"callback\"&&K.push(w)});m=0;for(z=D.length;m<z;++m)(function(){var e=x.createElement(\"script\");e.onload=e.onerror=e.onreadystatechange=function(){if(e&&(!e.readyState||/loaded|complete/.test(e.readyState)))e.onerror=e.onload=e.onreadystatechange=r,--R,R||P(Q,0),e.parentNode&&e.parentNode.removeChild(e),e=r};e.type=\n\"text/javascript\";e.src=\"https://google-code-prettify.googlecode.com/svn/loader/lang-\"+encodeURIComponent(D[m])+\".js\";L.insertBefore(e,L.firstChild)})(D[m]);for(var R=D.length,A=[],m=0,z=N.length;m<z;++m)A.push(\"https://google-code-prettify.googlecode.com/svn/loader/skins/\"+encodeURIComponent(N[m])+\".css\");A.push(\"https://google-code-prettify.googlecode.com/svn/loader/prettify.css\");(function(e){function j(m){if(m!==w){var n=x.createElement(\"link\");n.rel=\"stylesheet\";n.type=\"text/css\";if(m+1<w)n.error=\nn.onerror=function(){j(m+1)};n.href=e[m];L.appendChild(n)}}var w=e.length;j(0)})(A);var $=function(){window.PR_SHOULD_USE_CONTINUATION=!0;var e;(function(){function j(a){function d(f){var b=f.charCodeAt(0);if(b!==92)return b;var a=f.charAt(1);return(b=i[a])?b:\"0\"<=a&&a<=\"7\"?parseInt(f.substring(1),8):a===\"u\"||a===\"x\"?parseInt(f.substring(2),16):f.charCodeAt(1)}function h(f){if(f<32)return(f<16?\"\\\\x0\":\"\\\\x\")+f.toString(16);f=String.fromCharCode(f);return f===\"\\\\\"||f===\"-\"||f===\"]\"||f===\"^\"?\"\\\\\"+f:\nf}function b(f){var b=f.substring(1,f.length-1).match(/\\\\u[\\dA-Fa-f]{4}|\\\\x[\\dA-Fa-f]{2}|\\\\[0-3][0-7]{0,2}|\\\\[0-7]{1,2}|\\\\[\\S\\s]|[^\\\\]/g),f=[],a=b[0]===\"^\",c=[\"[\"];a&&c.push(\"^\");for(var a=a?1:0,g=b.length;a<g;++a){var k=b[a];if(/\\\\[bdsw]/i.test(k))c.push(k);else{var k=d(k),o;a+2<g&&\"-\"===b[a+1]?(o=d(b[a+2]),a+=2):o=k;f.push([k,o]);o<65||k>122||(o<65||k>90||f.push([Math.max(65,k)|32,Math.min(o,90)|32]),o<97||k>122||f.push([Math.max(97,k)&-33,Math.min(o,122)&-33]))}}f.sort(function(f,a){return f[0]-\na[0]||a[1]-f[1]});b=[];g=[];for(a=0;a<f.length;++a)k=f[a],k[0]<=g[1]+1?g[1]=Math.max(g[1],k[1]):b.push(g=k);for(a=0;a<b.length;++a)k=b[a],c.push(h(k[0])),k[1]>k[0]&&(k[1]+1>k[0]&&c.push(\"-\"),c.push(h(k[1])));c.push(\"]\");return c.join(\"\")}function e(f){for(var a=f.source.match(/\\[(?:[^\\\\\\]]|\\\\[\\S\\s])*]|\\\\u[\\dA-Fa-f]{4}|\\\\x[\\dA-Fa-f]{2}|\\\\\\d+|\\\\[^\\dux]|\\(\\?[!:=]|[()^]|[^()[\\\\^]+/g),c=a.length,d=[],g=0,k=0;g<c;++g){var o=a[g];o===\"(\"?++k:\"\\\\\"===o.charAt(0)&&(o=+o.substring(1))&&(o<=k?d[o]=-1:a[g]=h(o))}for(g=\n1;g<d.length;++g)-1===d[g]&&(d[g]=++j);for(k=g=0;g<c;++g)o=a[g],o===\"(\"?(++k,d[k]||(a[g]=\"(?:\")):\"\\\\\"===o.charAt(0)&&(o=+o.substring(1))&&o<=k&&(a[g]=\"\\\\\"+d[o]);for(g=0;g<c;++g)\"^\"===a[g]&&\"^\"!==a[g+1]&&(a[g]=\"\");if(f.ignoreCase&&F)for(g=0;g<c;++g)o=a[g],f=o.charAt(0),o.length>=2&&f===\"[\"?a[g]=b(o):f!==\"\\\\\"&&(a[g]=o.replace(/[A-Za-z]/g,function(a){a=a.charCodeAt(0);return\"[\"+String.fromCharCode(a&-33,a|32)+\"]\"}));return a.join(\"\")}for(var j=0,F=!1,l=!1,I=0,c=a.length;I<c;++I){var p=a[I];if(p.ignoreCase)l=\n!0;else if(/[a-z]/i.test(p.source.replace(/\\\\u[\\da-f]{4}|\\\\x[\\da-f]{2}|\\\\[^UXux]/gi,\"\"))){F=!0;l=!1;break}}for(var i={b:8,t:9,n:10,v:11,f:12,r:13},q=[],I=0,c=a.length;I<c;++I){p=a[I];if(p.global||p.multiline)throw Error(\"\"+p);q.push(\"(?:\"+e(p)+\")\")}return RegExp(q.join(\"|\"),l?\"gi\":\"g\")}function m(a,d){function h(a){var c=a.nodeType;if(c==1){if(!b.test(a.className)){for(c=a.firstChild;c;c=c.nextSibling)h(c);c=a.nodeName.toLowerCase();if(\"br\"===c||\"li\"===c)e[l]=\"\\n\",F[l<<1]=j++,F[l++<<1|1]=a}}else if(c==\n3||c==4)c=a.nodeValue,c.length&&(c=d?c.replace(/\\r\\n?/g,\"\\n\"):c.replace(/[\\t\\n\\r ]+/g,\" \"),e[l]=c,F[l<<1]=j,j+=c.length,F[l++<<1|1]=a)}var b=/(?:^|\\s)nocode(?:\\s|$)/,e=[],j=0,F=[],l=0;h(a);return{a:e.join(\"\").replace(/\\n$/,\"\"),d:F}}function n(a,d,h,b){d&&(a={a:d,e:a},h(a),b.push.apply(b,a.g))}function x(a){for(var d=void 0,h=a.firstChild;h;h=h.nextSibling)var b=h.nodeType,d=b===1?d?a:h:b===3?S.test(h.nodeValue)?a:d:d;return d===a?void 0:d}function C(a,d){function h(a){for(var l=a.e,j=[l,\"pln\"],c=\n0,p=a.a.match(e)||[],m={},q=0,f=p.length;q<f;++q){var B=p[q],y=m[B],u=void 0,g;if(typeof y===\"string\")g=!1;else{var k=b[B.charAt(0)];if(k)u=B.match(k[1]),y=k[0];else{for(g=0;g<i;++g)if(k=d[g],u=B.match(k[1])){y=k[0];break}u||(y=\"pln\")}if((g=y.length>=5&&\"lang-\"===y.substring(0,5))&&!(u&&typeof u[1]===\"string\"))g=!1,y=\"src\";g||(m[B]=y)}k=c;c+=B.length;if(g){g=u[1];var o=B.indexOf(g),H=o+g.length;u[2]&&(H=B.length-u[2].length,o=H-g.length);y=y.substring(5);n(l+k,B.substring(0,o),h,j);n(l+k+o,g,A(y,\ng),j);n(l+k+H,B.substring(H),h,j)}else j.push(l+k,y)}a.g=j}var b={},e;(function(){for(var h=a.concat(d),l=[],i={},c=0,p=h.length;c<p;++c){var m=h[c],q=m[3];if(q)for(var f=q.length;--f>=0;)b[q.charAt(f)]=m;m=m[1];q=\"\"+m;i.hasOwnProperty(q)||(l.push(m),i[q]=r)}l.push(/[\\S\\s]/);e=j(l)})();var i=d.length;return h}function t(a){var d=[],h=[];a.tripleQuotedStrings?d.push([\"str\",/^(?:'''(?:[^'\\\\]|\\\\[\\S\\s]|''?(?=[^']))*(?:'''|$)|\"\"\"(?:[^\"\\\\]|\\\\[\\S\\s]|\"\"?(?=[^\"]))*(?:\"\"\"|$)|'(?:[^'\\\\]|\\\\[\\S\\s])*(?:'|$)|\"(?:[^\"\\\\]|\\\\[\\S\\s])*(?:\"|$))/,\nr,\"'\\\"\"]):a.multiLineStrings?d.push([\"str\",/^(?:'(?:[^'\\\\]|\\\\[\\S\\s])*(?:'|$)|\"(?:[^\"\\\\]|\\\\[\\S\\s])*(?:\"|$)|`(?:[^\\\\`]|\\\\[\\S\\s])*(?:`|$))/,r,\"'\\\"`\"]):d.push([\"str\",/^(?:'(?:[^\\n\\r'\\\\]|\\\\.)*(?:'|$)|\"(?:[^\\n\\r\"\\\\]|\\\\.)*(?:\"|$))/,r,\"\\\"'\"]);a.verbatimStrings&&h.push([\"str\",/^@\"(?:[^\"]|\"\")*(?:\"|$)/,r]);var b=a.hashComments;b&&(a.cStyleComments?(b>1?d.push([\"com\",/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,r,\"#\"]):d.push([\"com\",/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\\b|[^\\n\\r]*)/,\nr,\"#\"]),h.push([\"str\",/^<(?:(?:(?:\\.\\.\\/)*|\\/?)(?:[\\w-]+(?:\\/[\\w-]+)+)?[\\w-]+\\.h(?:h|pp|\\+\\+)?|[a-z]\\w*)>/,r])):d.push([\"com\",/^#[^\\n\\r]*/,r,\"#\"]));a.cStyleComments&&(h.push([\"com\",/^\\/\\/[^\\n\\r]*/,r]),h.push([\"com\",/^\\/\\*[\\S\\s]*?(?:\\*\\/|$)/,r]));if(b=a.regexLiterals){var e=(b=b>1?\"\":\"\\n\\r\")?\".\":\"[\\\\S\\\\s]\";h.push([\"lang-regex\",RegExp(\"^(?:^^\\\\.?|[+-]|[!=]=?=?|\\\\#|%=?|&&?=?|\\\\(|\\\\*=?|[+\\\\-]=|->|\\\\/=?|::?|<<?=?|>>?>?=?|,|;|\\\\?|@|\\\\[|~|{|\\\\^\\\\^?=?|\\\\|\\\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\\\s*(\"+\n(\"/(?=[^/*\"+b+\"])(?:[^/\\\\x5B\\\\x5C\"+b+\"]|\\\\x5C\"+e+\"|\\\\x5B(?:[^\\\\x5C\\\\x5D\"+b+\"]|\\\\x5C\"+e+\")*(?:\\\\x5D|$))+/\")+\")\")])}(b=a.types)&&h.push([\"typ\",b]);b=(\"\"+a.keywords).replace(/^ | $/g,\"\");b.length&&h.push([\"kwd\",RegExp(\"^(?:\"+b.replace(/[\\s,]+/g,\"|\")+\")\\\\b\"),r]);d.push([\"pln\",/^\\s+/,r,\" \\r\\n\\t\\u00a0\"]);b=\"^.[^\\\\s\\\\w.$@'\\\"`/\\\\\\\\]*\";a.regexLiterals&&(b+=\"(?!s*/)\");h.push([\"lit\",/^@[$_a-z][\\w$@]*/i,r],[\"typ\",/^(?:[@_]?[A-Z]+[a-z][\\w$@]*|\\w+_t\\b)/,r],[\"pln\",/^[$_a-z][\\w$@]*/i,r],[\"lit\",/^(?:0x[\\da-f]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+-]?\\d+)?)[a-z]*/i,\nr,\"0123456789\"],[\"pln\",/^\\\\[\\S\\s]?/,r],[\"pun\",RegExp(b),r]);return C(d,h)}function z(a,d,h){function b(a){var c=a.nodeType;if(c==1&&!j.test(a.className))if(\"br\"===a.nodeName)e(a),a.parentNode&&a.parentNode.removeChild(a);else for(a=a.firstChild;a;a=a.nextSibling)b(a);else if((c==3||c==4)&&h){var d=a.nodeValue,i=d.match(m);if(i)c=d.substring(0,i.index),a.nodeValue=c,(d=d.substring(i.index+i[0].length))&&a.parentNode.insertBefore(l.createTextNode(d),a.nextSibling),e(a),c||a.parentNode.removeChild(a)}}\nfunction e(a){function b(a,c){var d=c?a.cloneNode(!1):a,f=a.parentNode;if(f){var f=b(f,1),h=a.nextSibling;f.appendChild(d);for(var e=h;e;e=h)h=e.nextSibling,f.appendChild(e)}return d}for(;!a.nextSibling;)if(a=a.parentNode,!a)return;for(var a=b(a.nextSibling,0),d;(d=a.parentNode)&&d.nodeType===1;)a=d;c.push(a)}for(var j=/(?:^|\\s)nocode(?:\\s|$)/,m=/\\r\\n?|\\n/,l=a.ownerDocument,i=l.createElement(\"li\");a.firstChild;)i.appendChild(a.firstChild);for(var c=[i],p=0;p<c.length;++p)b(c[p]);d===(d|0)&&c[0].setAttribute(\"value\",\nd);var n=l.createElement(\"ol\");n.className=\"linenums\";for(var d=Math.max(0,d-1|0)||0,p=0,q=c.length;p<q;++p)i=c[p],i.className=\"L\"+(p+d)%10,i.firstChild||i.appendChild(l.createTextNode(\"\\u00a0\")),n.appendChild(i);a.appendChild(n)}function i(a,d){for(var h=d.length;--h>=0;){var b=d[h];U.hasOwnProperty(b)?V.console&&console.warn(\"cannot override language handler %s\",b):U[b]=a}}function A(a,d){if(!a||!U.hasOwnProperty(a))a=/^\\s*</.test(d)?\"default-markup\":\"default-code\";return U[a]}function D(a){var d=\na.h;try{var h=m(a.c,a.i),b=h.a;a.a=b;a.d=h.d;a.e=0;A(d,b)(a);var e=/\\bMSIE\\s(\\d+)/.exec(navigator.userAgent),e=e&&+e[1]<=8,d=/\\n/g,i=a.a,j=i.length,h=0,l=a.d,n=l.length,b=0,c=a.g,p=c.length,t=0;c[p]=j;var q,f;for(f=q=0;f<p;)c[f]!==c[f+2]?(c[q++]=c[f++],c[q++]=c[f++]):f+=2;p=q;for(f=q=0;f<p;){for(var x=c[f],y=c[f+1],u=f+2;u+2<=p&&c[u+1]===y;)u+=2;c[q++]=x;c[q++]=y;f=u}c.length=q;var g=a.c,k;if(g)k=g.style.display,g.style.display=\"none\";try{for(;b<n;){var o=l[b+2]||j,H=c[t+2]||j,u=Math.min(o,H),E=l[b+\n1],W;if(E.nodeType!==1&&(W=i.substring(h,u))){e&&(W=W.replace(d,\"\\r\"));E.nodeValue=W;var Z=E.ownerDocument,s=Z.createElement(\"span\");s.className=c[t+1];var z=E.parentNode;z.replaceChild(s,E);s.appendChild(E);h<o&&(l[b+1]=E=Z.createTextNode(i.substring(u,o)),z.insertBefore(E,s.nextSibling))}h=u;h>=o&&(b+=2);h>=H&&(t+=2)}}finally{if(g)g.style.display=k}}catch(v){V.console&&console.log(v&&v.stack||v)}}var V=window,G=[\"break,continue,do,else,for,if,return,while\"],O=[[G,\"auto,case,char,const,default,double,enum,extern,float,goto,inline,int,long,register,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile\"],\n\"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof\"],J=[O,\"alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,delegate,dynamic_cast,explicit,export,friend,generic,late_check,mutable,namespace,nullptr,property,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where\"],K=[O,\"abstract,assert,boolean,byte,extends,final,finally,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient\"],\nL=[K,\"as,base,by,checked,decimal,delegate,descending,dynamic,event,fixed,foreach,from,group,implicit,in,internal,into,is,let,lock,object,out,override,orderby,params,partial,readonly,ref,sbyte,sealed,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,var,virtual,where\"],O=[O,\"debugger,eval,export,function,get,null,set,undefined,var,with,Infinity,NaN\"],M=[G,\"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None\"],\nN=[G,\"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END\"],R=[G,\"as,assert,const,copy,drop,enum,extern,fail,false,fn,impl,let,log,loop,match,mod,move,mut,priv,pub,pure,ref,self,static,struct,true,trait,type,unsafe,use\"],G=[G,\"case,done,elif,esac,eval,fi,function,in,local,set,then,until\"],Q=/^(DIR|FILE|vector|(de|priority_)?queue|list|stack|(const_)?iterator|(multi)?(set|map)|bitset|u?(int|float)\\d*)\\b/,\nS=/\\S/,T=t({keywords:[J,L,O,\"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END\",M,N,G],hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0}),U={};i(T,[\"default-code\"]);i(C([],[[\"pln\",/^[^<?]+/],[\"dec\",/^<!\\w[^>]*(?:>|$)/],[\"com\",/^<\\!--[\\S\\s]*?(?:--\\>|$)/],[\"lang-\",/^<\\?([\\S\\s]+?)(?:\\?>|$)/],[\"lang-\",/^<%([\\S\\s]+?)(?:%>|$)/],[\"pun\",/^(?:<[%?]|[%?]>)/],[\"lang-\",\n/^<xmp\\b[^>]*>([\\S\\s]+?)<\\/xmp\\b[^>]*>/i],[\"lang-js\",/^<script\\b[^>]*>([\\S\\s]*?)(<\\/script\\b[^>]*>)/i],[\"lang-css\",/^<style\\b[^>]*>([\\S\\s]*?)(<\\/style\\b[^>]*>)/i],[\"lang-in.tag\",/^(<\\/?[a-z][^<>]*>)/i]]),[\"default-markup\",\"htm\",\"html\",\"mxml\",\"xhtml\",\"xml\",\"xsl\"]);i(C([[\"pln\",/^\\s+/,r,\" \\t\\r\\n\"],[\"atv\",/^(?:\"[^\"]*\"?|'[^']*'?)/,r,\"\\\"'\"]],[[\"tag\",/^^<\\/?[a-z](?:[\\w-.:]*\\w)?|\\/?>$/i],[\"atn\",/^(?!style[\\s=]|on)[a-z](?:[\\w:-]*\\w)?/i],[\"lang-uq.val\",/^=\\s*([^\\s\"'>]*(?:[^\\s\"'/>]|\\/(?=\\s)))/],[\"pun\",/^[/<->]+/],\n[\"lang-js\",/^on\\w+\\s*=\\s*\"([^\"]+)\"/i],[\"lang-js\",/^on\\w+\\s*=\\s*'([^']+)'/i],[\"lang-js\",/^on\\w+\\s*=\\s*([^\\s\"'>]+)/i],[\"lang-css\",/^style\\s*=\\s*\"([^\"]+)\"/i],[\"lang-css\",/^style\\s*=\\s*'([^']+)'/i],[\"lang-css\",/^style\\s*=\\s*([^\\s\"'>]+)/i]]),[\"in.tag\"]);i(C([],[[\"atv\",/^[\\S\\s]+/]]),[\"uq.val\"]);i(t({keywords:J,hashComments:!0,cStyleComments:!0,types:Q}),[\"c\",\"cc\",\"cpp\",\"cxx\",\"cyc\",\"m\"]);i(t({keywords:\"null,true,false\"}),[\"json\"]);i(t({keywords:L,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:Q}),\n[\"cs\"]);i(t({keywords:K,cStyleComments:!0}),[\"java\"]);i(t({keywords:G,hashComments:!0,multiLineStrings:!0}),[\"bash\",\"bsh\",\"csh\",\"sh\"]);i(t({keywords:M,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),[\"cv\",\"py\",\"python\"]);i(t({keywords:\"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END\",hashComments:!0,multiLineStrings:!0,regexLiterals:2}),[\"perl\",\"pl\",\"pm\"]);i(t({keywords:N,\nhashComments:!0,multiLineStrings:!0,regexLiterals:!0}),[\"rb\",\"ruby\"]);i(t({keywords:O,cStyleComments:!0,regexLiterals:!0}),[\"javascript\",\"js\"]);i(t({keywords:\"all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,throw,true,try,unless,until,when,while,yes\",hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),[\"coffee\"]);i(t({keywords:R,cStyleComments:!0,multilineStrings:!0}),[\"rc\",\"rs\",\"rust\"]);\ni(C([],[[\"str\",/^[\\S\\s]+/]]),[\"regex\"]);var X=V.PR={createSimpleLexer:C,registerLangHandler:i,sourceDecorator:t,PR_ATTRIB_NAME:\"atn\",PR_ATTRIB_VALUE:\"atv\",PR_COMMENT:\"com\",PR_DECLARATION:\"dec\",PR_KEYWORD:\"kwd\",PR_LITERAL:\"lit\",PR_NOCODE:\"nocode\",PR_PLAIN:\"pln\",PR_PUNCTUATION:\"pun\",PR_SOURCE:\"src\",PR_STRING:\"str\",PR_TAG:\"tag\",PR_TYPE:\"typ\",prettyPrintOne:function(a,d,e){var b=document.createElement(\"div\");b.innerHTML=\"<pre>\"+a+\"</pre>\";b=b.firstChild;e&&z(b,e,!0);D({h:d,j:e,c:b,i:1});return b.innerHTML},\nprettyPrint:e=e=function(a,d){function e(){for(var b=V.PR_SHOULD_USE_CONTINUATION?c.now()+250:Infinity;p<j.length&&c.now()<b;p++){for(var d=j[p],m=k,l=d;l=l.previousSibling;){var n=l.nodeType,s=(n===7||n===8)&&l.nodeValue;if(s?!/^\\??prettify\\b/.test(s):n!==3||/\\S/.test(l.nodeValue))break;if(s){m={};s.replace(/\\b(\\w+)=([\\w%+\\-.:]+)/g,function(a,b,c){m[b]=c});break}}l=d.className;if((m!==k||f.test(l))&&!w.test(l)){n=!1;for(s=d.parentNode;s;s=s.parentNode)if(g.test(s.tagName)&&s.className&&f.test(s.className)){n=\n!0;break}if(!n){d.className+=\" prettyprinted\";n=m.lang;if(!n){var n=l.match(q),A;if(!n&&(A=x(d))&&u.test(A.tagName))n=A.className.match(q);n&&(n=n[1])}if(y.test(d.tagName))s=1;else var s=d.currentStyle,v=i.defaultView,s=(s=s?s.whiteSpace:v&&v.getComputedStyle?v.getComputedStyle(d,r).getPropertyValue(\"white-space\"):0)&&\"pre\"===s.substring(0,3);v=m.linenums;if(!(v=v===\"true\"||+v))v=(v=l.match(/\\blinenums\\b(?::(\\d+))?/))?v[1]&&v[1].length?+v[1]:!0:!1;v&&z(d,v,s);t={h:n,c:d,j:v,i:s};D(t)}}}p<j.length?\nP(e,250):\"function\"===typeof a&&a()}for(var b=d||document.body,i=b.ownerDocument||document,b=[b.getElementsByTagName(\"pre\"),b.getElementsByTagName(\"code\"),b.getElementsByTagName(\"xmp\")],j=[],m=0;m<b.length;++m)for(var l=0,n=b[m].length;l<n;++l)j.push(b[m][l]);var b=r,c=Date;c.now||(c={now:function(){return+new Date}});var p=0,t,q=/\\blang(?:uage)?-([\\w.]+)(?!\\S)/,f=/\\bprettyprint\\b/,w=/\\bprettyprinted\\b/,y=/pre|xmp/i,u=/^code$/i,g=/^(?:pre|code|xmp)$/i,k={};e()}};typeof define===\"function\"&&define.amd&&\ndefine(\"google-code-prettify\",[],function(){return X})})();return e}();R||P(Q,0)})();}()\n"
  },
  {
    "path": "static/bootstrap/plugins/bootstrap-wysiwyg/external/jquery.hotkeys.js",
    "content": "/*\n * jQuery Hotkeys Plugin\n * Copyright 2010, John Resig\n * Dual licensed under the MIT or GPL Version 2 licenses.\n *\n * Based upon the plugin by Tzury Bar Yochay:\n * http://github.com/tzuryby/hotkeys\n *\n * Original idea by:\n * Binny V A, http://www.openjs.com/scripts/events/keyboard_shortcuts/\n*/\n\n(function(jQuery){\n\t\n\tjQuery.hotkeys = {\n\t\tversion: \"0.8\",\n\n\t\tspecialKeys: {\n\t\t\t8: \"backspace\", 9: \"tab\", 13: \"return\", 16: \"shift\", 17: \"ctrl\", 18: \"alt\", 19: \"pause\",\n\t\t\t20: \"capslock\", 27: \"esc\", 32: \"space\", 33: \"pageup\", 34: \"pagedown\", 35: \"end\", 36: \"home\",\n\t\t\t37: \"left\", 38: \"up\", 39: \"right\", 40: \"down\", 45: \"insert\", 46: \"del\", \n\t\t\t96: \"0\", 97: \"1\", 98: \"2\", 99: \"3\", 100: \"4\", 101: \"5\", 102: \"6\", 103: \"7\",\n\t\t\t104: \"8\", 105: \"9\", 106: \"*\", 107: \"+\", 109: \"-\", 110: \".\", 111 : \"/\", \n\t\t\t112: \"f1\", 113: \"f2\", 114: \"f3\", 115: \"f4\", 116: \"f5\", 117: \"f6\", 118: \"f7\", 119: \"f8\", \n\t\t\t120: \"f9\", 121: \"f10\", 122: \"f11\", 123: \"f12\", 144: \"numlock\", 145: \"scroll\", 191: \"/\", 224: \"meta\"\n\t\t},\n\t\n\t\tshiftNums: {\n\t\t\t\"`\": \"~\", \"1\": \"!\", \"2\": \"@\", \"3\": \"#\", \"4\": \"$\", \"5\": \"%\", \"6\": \"^\", \"7\": \"&\", \n\t\t\t\"8\": \"*\", \"9\": \"(\", \"0\": \")\", \"-\": \"_\", \"=\": \"+\", \";\": \": \", \"'\": \"\\\"\", \",\": \"<\", \n\t\t\t\".\": \">\",  \"/\": \"?\",  \"\\\\\": \"|\"\n\t\t}\n\t};\n\n\tfunction keyHandler( handleObj ) {\n\t\t// Only care when a possible input has been specified\n\t\tif ( typeof handleObj.data !== \"string\" ) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tvar origHandler = handleObj.handler,\n\t\t\tkeys = handleObj.data.toLowerCase().split(\" \"),\n\t\t\ttextAcceptingInputTypes = [\"text\", \"password\", \"number\", \"email\", \"url\", \"range\", \"date\", \"month\", \"week\", \"time\", \"datetime\", \"datetime-local\", \"search\", \"color\"];\n\t\n\t\thandleObj.handler = function( event ) {\n\t\t\t// Don't fire in text-accepting inputs that we didn't directly bind to\n\t\t\tif ( this !== event.target && (/textarea|select/i.test( event.target.nodeName ) ||\n\t\t\t\tjQuery.inArray(event.target.type, textAcceptingInputTypes) > -1 ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t\n\t\t\t// Keypress represents characters, not special keys\n\t\t\tvar special = event.type !== \"keypress\" && jQuery.hotkeys.specialKeys[ event.which ],\n\t\t\t\tcharacter = String.fromCharCode( event.which ).toLowerCase(),\n\t\t\t\tkey, modif = \"\", possible = {};\n\n\t\t\t// check combinations (alt|ctrl|shift+anything)\n\t\t\tif ( event.altKey && special !== \"alt\" ) {\n\t\t\t\tmodif += \"alt+\";\n\t\t\t}\n\n\t\t\tif ( event.ctrlKey && special !== \"ctrl\" ) {\n\t\t\t\tmodif += \"ctrl+\";\n\t\t\t}\n\t\t\t\n\t\t\t// TODO: Need to make sure this works consistently across platforms\n\t\t\tif ( event.metaKey && !event.ctrlKey && special !== \"meta\" ) {\n\t\t\t\tmodif += \"meta+\";\n\t\t\t}\n\n\t\t\tif ( event.shiftKey && special !== \"shift\" ) {\n\t\t\t\tmodif += \"shift+\";\n\t\t\t}\n\n\t\t\tif ( special ) {\n\t\t\t\tpossible[ modif + special ] = true;\n\n\t\t\t} else {\n\t\t\t\tpossible[ modif + character ] = true;\n\t\t\t\tpossible[ modif + jQuery.hotkeys.shiftNums[ character ] ] = true;\n\n\t\t\t\t// \"$\" can be triggered as \"Shift+4\" or \"Shift+$\" or just \"$\"\n\t\t\t\tif ( modif === \"shift+\" ) {\n\t\t\t\t\tpossible[ jQuery.hotkeys.shiftNums[ character ] ] = true;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfor ( var i = 0, l = keys.length; i < l; i++ ) {\n\t\t\t\tif ( possible[ keys[i] ] ) {\n\t\t\t\t\treturn origHandler.apply( this, arguments );\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t}\n\n\tjQuery.each([ \"keydown\", \"keyup\", \"keypress\" ], function() {\n\t\tjQuery.event.special[ this ] = { add: keyHandler };\n\t});\n\n})( jQuery );"
  },
  {
    "path": "static/bootstrap/plugins/tagsinput/bootstrap-tagsinput.css",
    "content": ".bootstrap-tagsinput {\n  background-color: #fff;\n  border: 1px solid #ccc;\n  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);\n  display: inline-block;\n  padding: 4px 6px;\n  color: #555;\n  vertical-align: middle;\n  border-radius: 4px;\n  max-width: 100%;\n  line-height: 22px;\n  cursor: text;\n}\n.bootstrap-tagsinput input {\n  border: none;\n  box-shadow: none;\n  outline: none;\n  background-color: transparent;\n  padding: 0 6px;\n  margin: 0;\n  width: auto;\n  max-width: inherit;\n}\n.bootstrap-tagsinput.form-control input::-moz-placeholder {\n  color: #777;\n  opacity: 1;\n}\n.bootstrap-tagsinput.form-control input:-ms-input-placeholder {\n  color: #777;\n}\n.bootstrap-tagsinput.form-control input::-webkit-input-placeholder {\n  color: #777;\n}\n.bootstrap-tagsinput input:focus {\n  border: none;\n  box-shadow: none;\n}\n.bootstrap-tagsinput .tag {\n  margin-right: 2px;\n  color: white;\n}\n.bootstrap-tagsinput .tag [data-role=\"remove\"] {\n  margin-left: 8px;\n  cursor: pointer;\n}\n.bootstrap-tagsinput .tag [data-role=\"remove\"]:after {\n  content: \"x\";\n  padding: 0px 2px;\n}\n.bootstrap-tagsinput .tag [data-role=\"remove\"]:hover {\n  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);\n}\n.bootstrap-tagsinput .tag [data-role=\"remove\"]:hover:active {\n  box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);\n}\n"
  },
  {
    "path": "static/bootstrap/plugins/tagsinput/bootstrap-tagsinput.js",
    "content": "(function ($) {\n  \"use strict\";\n\n  var defaultOptions = {\n    tagClass: function(item) {\n      return 'label label-info';\n    },\n    itemValue: function(item) {\n      return item ? item.toString() : item;\n    },\n    itemText: function(item) {\n      return this.itemValue(item);\n    },\n    itemTitle: function(item) {\n      return null;\n    },\n    freeInput: true,\n    addOnBlur: true,\n    maxTags: undefined,\n    maxChars: undefined,\n    confirmKeys: [13, 44],\n    delimiter: ',',\n    delimiterRegex: null,\n    cancelConfirmKeysOnEmpty: true,\n    onTagExists: function(item, $tag) {\n      $tag.hide().fadeIn();\n    },\n    trimValue: false,\n    allowDuplicates: false\n  };\n\n  /**\n   * Constructor function\n   */\n  function TagsInput(element, options) {\n    this.itemsArray = [];\n\n    this.$element = $(element);\n    this.$element.hide();\n\n    this.isSelect = (element.tagName === 'SELECT');\n    this.multiple = (this.isSelect && element.hasAttribute('multiple'));\n    this.objectItems = options && options.itemValue;\n    this.placeholderText = element.hasAttribute('placeholder') ? this.$element.attr('placeholder') : '';\n    this.inputSize = Math.max(1, this.placeholderText.length);\n\n    this.$container = $('<div class=\"bootstrap-tagsinput\"></div>');\n    this.$input = $('<input type=\"text\" placeholder=\"' + this.placeholderText + '\"/>').appendTo(this.$container);\n\n    this.$element.before(this.$container);\n\n    this.build(options);\n  }\n\n  TagsInput.prototype = {\n    constructor: TagsInput,\n\n    /**\n     * Adds the given item as a new tag. Pass true to dontPushVal to prevent\n     * updating the elements val()\n     */\n    add: function(item, dontPushVal, options) {\n      var self = this;\n\n      if (self.options.maxTags && self.itemsArray.length >= self.options.maxTags)\n        return;\n\n      // Ignore falsey values, except false\n      if (item !== false && !item)\n        return;\n\n      // Trim value\n      if (typeof item === \"string\" && self.options.trimValue) {\n        item = $.trim(item);\n      }\n\n      // Throw an error when trying to add an object while the itemValue option was not set\n      if (typeof item === \"object\" && !self.objectItems)\n        throw(\"Can't add objects when itemValue option is not set\");\n\n      // Ignore strings only containg whitespace\n      if (item.toString().match(/^\\s*$/))\n        return;\n\n      // If SELECT but not multiple, remove current tag\n      if (self.isSelect && !self.multiple && self.itemsArray.length > 0)\n        self.remove(self.itemsArray[0]);\n\n      if (typeof item === \"string\" && this.$element[0].tagName === 'INPUT') {\n        var delimiter = (self.options.delimiterRegex) ? self.options.delimiterRegex : self.options.delimiter;\n        var items = item.split(delimiter);\n        if (items.length > 1) {\n          for (var i = 0; i < items.length; i++) {\n            this.add(items[i], true);\n          }\n\n          if (!dontPushVal)\n            self.pushVal();\n          return;\n        }\n      }\n\n      var itemValue = self.options.itemValue(item),\n          itemText = self.options.itemText(item),\n          tagClass = self.options.tagClass(item),\n          itemTitle = self.options.itemTitle(item);\n\n      // Ignore items allready added\n      var existing = $.grep(self.itemsArray, function(item) { return self.options.itemValue(item) === itemValue; } )[0];\n      if (existing && !self.options.allowDuplicates) {\n        // Invoke onTagExists\n        if (self.options.onTagExists) {\n          var $existingTag = $(\".tag\", self.$container).filter(function() { return $(this).data(\"item\") === existing; });\n          self.options.onTagExists(item, $existingTag);\n        }\n        return;\n      }\n\n      // if length greater than limit\n      if (self.items().toString().length + item.length + 1 > self.options.maxInputLength)\n        return;\n\n      // raise beforeItemAdd arg\n      var beforeItemAddEvent = $.Event('beforeItemAdd', { item: item, cancel: false, options: options});\n      self.$element.trigger(beforeItemAddEvent);\n      if (beforeItemAddEvent.cancel)\n        return;\n\n      // register item in internal array and map\n      self.itemsArray.push(item);\n\n      // add a tag element\n\n      var $tag = $('<span class=\"tag ' + htmlEncode(tagClass) + (itemTitle !== null ? ('\" title=\"' + itemTitle) : '') + '\">' + htmlEncode(itemText) + '<span data-role=\"remove\"></span></span>');\n      $tag.data('item', item);\n      self.findInputWrapper().before($tag);\n      $tag.after(' ');\n\n      // add <option /> if item represents a value not present in one of the <select />'s options\n      if (self.isSelect && !$('option[value=\"' + encodeURIComponent(itemValue) + '\"]',self.$element)[0]) {\n        var $option = $('<option selected>' + htmlEncode(itemText) + '</option>');\n        $option.data('item', item);\n        $option.attr('value', itemValue);\n        self.$element.append($option);\n      }\n\n      if (!dontPushVal)\n        self.pushVal();\n\n      // Add class when reached maxTags\n      if (self.options.maxTags === self.itemsArray.length || self.items().toString().length === self.options.maxInputLength)\n        self.$container.addClass('bootstrap-tagsinput-max');\n\n      self.$element.trigger($.Event('itemAdded', { item: item, options: options }));\n    },\n\n    /**\n     * Removes the given item. Pass true to dontPushVal to prevent updating the\n     * elements val()\n     */\n    remove: function(item, dontPushVal, options) {\n      var self = this;\n\n      if (self.objectItems) {\n        if (typeof item === \"object\")\n          item = $.grep(self.itemsArray, function(other) { return self.options.itemValue(other) ==  self.options.itemValue(item); } );\n        else\n          item = $.grep(self.itemsArray, function(other) { return self.options.itemValue(other) ==  item; } );\n\n        item = item[item.length-1];\n      }\n\n      if (item) {\n        var beforeItemRemoveEvent = $.Event('beforeItemRemove', { item: item, cancel: false, options: options });\n        self.$element.trigger(beforeItemRemoveEvent);\n        if (beforeItemRemoveEvent.cancel)\n          return;\n\n        $('.tag', self.$container).filter(function() { return $(this).data('item') === item; }).remove();\n        $('option', self.$element).filter(function() { return $(this).data('item') === item; }).remove();\n        if($.inArray(item, self.itemsArray) !== -1)\n          self.itemsArray.splice($.inArray(item, self.itemsArray), 1);\n      }\n\n      if (!dontPushVal)\n        self.pushVal();\n\n      // Remove class when reached maxTags\n      if (self.options.maxTags > self.itemsArray.length)\n        self.$container.removeClass('bootstrap-tagsinput-max');\n\n      self.$element.trigger($.Event('itemRemoved',  { item: item, options: options }));\n    },\n\n    /**\n     * Removes all items\n     */\n    removeAll: function() {\n      var self = this;\n\n      $('.tag', self.$container).remove();\n      $('option', self.$element).remove();\n\n      while(self.itemsArray.length > 0)\n        self.itemsArray.pop();\n\n      self.pushVal();\n    },\n\n    /**\n     * Refreshes the tags so they match the text/value of their corresponding\n     * item.\n     */\n    refresh: function() {\n      var self = this;\n      $('.tag', self.$container).each(function() {\n        var $tag = $(this),\n            item = $tag.data('item'),\n            itemValue = self.options.itemValue(item),\n            itemText = self.options.itemText(item),\n            tagClass = self.options.tagClass(item);\n\n          // Update tag's class and inner text\n          $tag.attr('class', null);\n          $tag.addClass('tag ' + htmlEncode(tagClass));\n          $tag.contents().filter(function() {\n            return this.nodeType == 3;\n          })[0].nodeValue = htmlEncode(itemText);\n\n          if (self.isSelect) {\n            var option = $('option', self.$element).filter(function() { return $(this).data('item') === item; });\n            option.attr('value', itemValue);\n          }\n      });\n    },\n\n    /**\n     * Returns the items added as tags\n     */\n    items: function() {\n      return this.itemsArray;\n    },\n\n    /**\n     * Assembly value by retrieving the value of each item, and set it on the\n     * element.\n     */\n    pushVal: function() {\n      var self = this,\n          val = $.map(self.items(), function(item) {\n            return self.options.itemValue(item).toString();\n          });\n\n      self.$element.val(val, true).trigger('change');\n    },\n\n    /**\n     * Initializes the tags input behaviour on the element\n     */\n    build: function(options) {\n      var self = this;\n\n      self.options = $.extend({}, defaultOptions, options);\n      // When itemValue is set, freeInput should always be false\n      if (self.objectItems)\n        self.options.freeInput = false;\n\n      makeOptionItemFunction(self.options, 'itemValue');\n      makeOptionItemFunction(self.options, 'itemText');\n      makeOptionFunction(self.options, 'tagClass');\n\n      // Typeahead Bootstrap version 2.3.2\n      if (self.options.typeahead) {\n        var typeahead = self.options.typeahead || {};\n\n        makeOptionFunction(typeahead, 'source');\n\n        self.$input.typeahead($.extend({}, typeahead, {\n          source: function (query, process) {\n            function processItems(items) {\n              var texts = [];\n\n              for (var i = 0; i < items.length; i++) {\n                var text = self.options.itemText(items[i]);\n                map[text] = items[i];\n                texts.push(text);\n              }\n              process(texts);\n            }\n\n            this.map = {};\n            var map = this.map,\n                data = typeahead.source(query);\n\n            if ($.isFunction(data.success)) {\n              // support for Angular callbacks\n              data.success(processItems);\n            } else if ($.isFunction(data.then)) {\n              // support for Angular promises\n              data.then(processItems);\n            } else {\n              // support for functions and jquery promises\n              $.when(data)\n               .then(processItems);\n            }\n          },\n          updater: function (text) {\n            self.add(this.map[text]);\n            return this.map[text];\n          },\n          matcher: function (text) {\n            return (text.toLowerCase().indexOf(this.query.trim().toLowerCase()) !== -1);\n          },\n          sorter: function (texts) {\n            return texts.sort();\n          },\n          highlighter: function (text) {\n            var regex = new RegExp( '(' + this.query + ')', 'gi' );\n            return text.replace( regex, \"<strong>$1</strong>\" );\n          }\n        }));\n      }\n\n      // typeahead.js\n      if (self.options.typeaheadjs) {\n          var typeaheadConfig = null;\n          var typeaheadDatasets = {};\n\n          // Determine if main configurations were passed or simply a dataset\n          var typeaheadjs = self.options.typeaheadjs;\n          if ($.isArray(typeaheadjs)) {\n            typeaheadConfig = typeaheadjs[0];\n            typeaheadDatasets = typeaheadjs[1];\n          } else {\n            typeaheadDatasets = typeaheadjs;\n          }\n\n          self.$input.typeahead(typeaheadConfig, typeaheadDatasets).on('typeahead:selected', $.proxy(function (obj, datum) {\n            if (typeaheadDatasets.valueKey)\n              self.add(datum[typeaheadDatasets.valueKey]);\n            else\n              self.add(datum);\n            self.$input.typeahead('val', '');\n          }, self));\n      }\n\n      self.$container.on('click', $.proxy(function(event) {\n        if (! self.$element.attr('disabled')) {\n          self.$input.removeAttr('disabled');\n        }\n        self.$input.focus();\n      }, self));\n\n        if (self.options.addOnBlur && self.options.freeInput) {\n          self.$input.on('focusout', $.proxy(function(event) {\n              // HACK: only process on focusout when no typeahead opened, to\n              //       avoid adding the typeahead text as tag\n              if ($('.typeahead, .twitter-typeahead', self.$container).length === 0) {\n                self.add(self.$input.val());\n                self.$input.val('');\n              }\n          }, self));\n        }\n\n\n      self.$container.on('keydown', 'input', $.proxy(function(event) {\n        var $input = $(event.target),\n            $inputWrapper = self.findInputWrapper();\n\n        if (self.$element.attr('disabled')) {\n          self.$input.attr('disabled', 'disabled');\n          return;\n        }\n\n        switch (event.which) {\n          // BACKSPACE\n          case 8:\n            if (doGetCaretPosition($input[0]) === 0) {\n              var prev = $inputWrapper.prev();\n              if (prev.length) {\n                self.remove(prev.data('item'));\n              }\n            }\n            break;\n\n          // DELETE\n          case 46:\n            if (doGetCaretPosition($input[0]) === 0) {\n              var next = $inputWrapper.next();\n              if (next.length) {\n                self.remove(next.data('item'));\n              }\n            }\n            break;\n\n          // LEFT ARROW\n          case 37:\n            // Try to move the input before the previous tag\n            var $prevTag = $inputWrapper.prev();\n            if ($input.val().length === 0 && $prevTag[0]) {\n              $prevTag.before($inputWrapper);\n              $input.focus();\n            }\n            break;\n          // RIGHT ARROW\n          case 39:\n            // Try to move the input after the next tag\n            var $nextTag = $inputWrapper.next();\n            if ($input.val().length === 0 && $nextTag[0]) {\n              $nextTag.after($inputWrapper);\n              $input.focus();\n            }\n            break;\n         default:\n             // ignore\n         }\n\n        // Reset internal input's size\n        var textLength = $input.val().length,\n            wordSpace = Math.ceil(textLength / 5),\n            size = textLength + wordSpace + 1;\n        $input.attr('size', Math.max(this.inputSize, $input.val().length));\n      }, self));\n\n      self.$container.on('keypress', 'input', $.proxy(function(event) {\n         var $input = $(event.target);\n\n         if (self.$element.attr('disabled')) {\n            self.$input.attr('disabled', 'disabled');\n            return;\n         }\n\n         var text = $input.val(),\n         maxLengthReached = self.options.maxChars && text.length >= self.options.maxChars;\n         if (self.options.freeInput && (keyCombinationInList(event, self.options.confirmKeys) || maxLengthReached)) {\n            // Only attempt to add a tag if there is data in the field\n            if (text.length !== 0) {\n               self.add(maxLengthReached ? text.substr(0, self.options.maxChars) : text);\n               $input.val('');\n            }\n\n            // If the field is empty, let the event triggered fire as usual\n            if (self.options.cancelConfirmKeysOnEmpty === false) {\n               event.preventDefault();\n            }\n         }\n\n         // Reset internal input's size\n         var textLength = $input.val().length,\n            wordSpace = Math.ceil(textLength / 5),\n            size = textLength + wordSpace + 1;\n         $input.attr('size', Math.max(this.inputSize, $input.val().length));\n      }, self));\n\n      // Remove icon clicked\n      self.$container.on('click', '[data-role=remove]', $.proxy(function(event) {\n        if (self.$element.attr('disabled')) {\n          return;\n        }\n        self.remove($(event.target).closest('.tag').data('item'));\n      }, self));\n\n      // Only add existing value as tags when using strings as tags\n      if (self.options.itemValue === defaultOptions.itemValue) {\n        if (self.$element[0].tagName === 'INPUT') {\n            self.add(self.$element.val());\n        } else {\n          $('option', self.$element).each(function() {\n            self.add($(this).attr('value'), true);\n          });\n        }\n      }\n    },\n\n    /**\n     * Removes all tagsinput behaviour and unregsiter all event handlers\n     */\n    destroy: function() {\n      var self = this;\n\n      // Unbind events\n      self.$container.off('keypress', 'input');\n      self.$container.off('click', '[role=remove]');\n\n      self.$container.remove();\n      self.$element.removeData('tagsinput');\n      self.$element.show();\n    },\n\n    /**\n     * Sets focus on the tagsinput\n     */\n    focus: function() {\n      this.$input.focus();\n    },\n\n    /**\n     * Returns the internal input element\n     */\n    input: function() {\n      return this.$input;\n    },\n\n    /**\n     * Returns the element which is wrapped around the internal input. This\n     * is normally the $container, but typeahead.js moves the $input element.\n     */\n    findInputWrapper: function() {\n      var elt = this.$input[0],\n          container = this.$container[0];\n      while(elt && elt.parentNode !== container)\n        elt = elt.parentNode;\n\n      return $(elt);\n    }\n  };\n\n  /**\n   * Register JQuery plugin\n   */\n  $.fn.tagsinput = function(arg1, arg2, arg3) {\n    var results = [];\n\n    this.each(function() {\n      var tagsinput = $(this).data('tagsinput');\n      // Initialize a new tags input\n      if (!tagsinput) {\n          tagsinput = new TagsInput(this, arg1);\n          $(this).data('tagsinput', tagsinput);\n          results.push(tagsinput);\n\n          if (this.tagName === 'SELECT') {\n              $('option', $(this)).attr('selected', 'selected');\n          }\n\n          // Init tags from $(this).val()\n          $(this).val($(this).val());\n      } else if (!arg1 && !arg2) {\n          // tagsinput already exists\n          // no function, trying to init\n          results.push(tagsinput);\n      } else if(tagsinput[arg1] !== undefined) {\n          // Invoke function on existing tags input\n            if(tagsinput[arg1].length === 3 && arg3 !== undefined){\n               var retVal = tagsinput[arg1](arg2, null, arg3);\n            }else{\n               var retVal = tagsinput[arg1](arg2);\n            }\n          if (retVal !== undefined)\n              results.push(retVal);\n      }\n    });\n\n    if ( typeof arg1 == 'string') {\n      // Return the results from the invoked function calls\n      return results.length > 1 ? results : results[0];\n    } else {\n      return results;\n    }\n  };\n\n  $.fn.tagsinput.Constructor = TagsInput;\n\n  /**\n   * Most options support both a string or number as well as a function as\n   * option value. This function makes sure that the option with the given\n   * key in the given options is wrapped in a function\n   */\n  function makeOptionItemFunction(options, key) {\n    if (typeof options[key] !== 'function') {\n      var propertyName = options[key];\n      options[key] = function(item) { return item[propertyName]; };\n    }\n  }\n  function makeOptionFunction(options, key) {\n    if (typeof options[key] !== 'function') {\n      var value = options[key];\n      options[key] = function() { return value; };\n    }\n  }\n  /**\n   * HtmlEncodes the given value\n   */\n  var htmlEncodeContainer = $('<div />');\n  function htmlEncode(value) {\n    if (value) {\n      return htmlEncodeContainer.text(value).html();\n    } else {\n      return '';\n    }\n  }\n\n  /**\n   * Returns the position of the caret in the given input field\n   * http://flightschool.acylt.com/devnotes/caret-position-woes/\n   */\n  function doGetCaretPosition(oField) {\n    var iCaretPos = 0;\n    if (document.selection) {\n      oField.focus ();\n      var oSel = document.selection.createRange();\n      oSel.moveStart ('character', -oField.value.length);\n      iCaretPos = oSel.text.length;\n    } else if (oField.selectionStart || oField.selectionStart == '0') {\n      iCaretPos = oField.selectionStart;\n    }\n    return (iCaretPos);\n  }\n\n  /**\n    * Returns boolean indicates whether user has pressed an expected key combination.\n    * @param object keyPressEvent: JavaScript event object, refer\n    *     http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html\n    * @param object lookupList: expected key combinations, as in:\n    *     [13, {which: 188, shiftKey: true}]\n    */\n  function keyCombinationInList(keyPressEvent, lookupList) {\n      var found = false;\n      $.each(lookupList, function (index, keyCombination) {\n          if (typeof (keyCombination) === 'number' && keyPressEvent.which === keyCombination) {\n              found = true;\n              return false;\n          }\n\n          if (keyPressEvent.which === keyCombination.which) {\n              var alt = !keyCombination.hasOwnProperty('altKey') || keyPressEvent.altKey === keyCombination.altKey,\n                  shift = !keyCombination.hasOwnProperty('shiftKey') || keyPressEvent.shiftKey === keyCombination.shiftKey,\n                  ctrl = !keyCombination.hasOwnProperty('ctrlKey') || keyPressEvent.ctrlKey === keyCombination.ctrlKey;\n              if (alt && shift && ctrl) {\n                  found = true;\n                  return false;\n              }\n          }\n      });\n\n      return found;\n  }\n\n  /**\n   * Initialize tagsinput behaviour on inputs and selects which have\n   * data-role=tagsinput\n   */\n  $(function() {\n    $(\"input[data-role=tagsinput], select[multiple][data-role=tagsinput]\").tagsinput();\n  });\n})(window.jQuery);\n"
  },
  {
    "path": "static/bootstrap/plugins/tagsinput/bootstrap-tagsinput.less",
    "content": ".bootstrap-tagsinput {\n  background-color: #fff;\n  border: 1px solid #ccc;\n  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);\n  display: inline-block;\n  padding: 4px 6px;\n  margin-bottom: 10px;\n  color: #555;\n  vertical-align: middle;\n  border-radius: 4px;\n  max-width: 100%;\n  line-height: 22px;\n  cursor: text;\n\n  input {\n    border: none;\n    box-shadow: none;\n    outline: none;\n    background-color: transparent;\n    padding: 0;\n    margin: 0;\n    width: auto !important;\n    max-width: inherit;\n\n    &:focus {\n      border: none;\n      box-shadow: none;\n    }\n  }\n\n  .tag {\n    margin-right: 2px;\n    color: white;\n\n    [data-role=\"remove\"] {\n      margin-left:8px;\n      cursor:pointer;\n      &:after{\n        content: \"x\";\n        padding:0px 2px;\n      }\n      &:hover {\n        box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);\n        &:active {\n          box-shadow: inset 0 3px 5px rgba(0,0,0,0.125);\n        }\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "static/bootstrap-paginator/bootstrap-paginator.js",
    "content": "/**\n * bootstrap-paginator.js v0.5\n * --\n * Copyright 2013 Yun Lai <lyonlai1984@gmail.com>\n * --\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n(function ($) {\n\n    \"use strict\"; // jshint ;_;\n\n\n    /* Paginator PUBLIC CLASS DEFINITION\n     * ================================= */\n\n    /**\n     * Boostrap Paginator Constructor\n     *\n     * @param element element of the paginator\n     * @param options the options to config the paginator\n     *\n     * */\n    var BootstrapPaginator = function (element, options) {\n        this.init(element, options);\n    },\n        old = null;\n\n    BootstrapPaginator.prototype = {\n\n        /**\n         * Initialization function of the paginator, accepting an element and the options as parameters\n         *\n         * @param element element of the paginator\n         * @param options the options to config the paginator\n         *\n         * */\n        init: function (element, options) {\n\n            this.$element = $(element);\n\n            var version = (options && options.bootstrapMajorVersion) ? options.bootstrapMajorVersion : $.fn.bootstrapPaginator.defaults.bootstrapMajorVersion,\n                id = this.$element.attr(\"id\");\n\n            if (version === 2 && !this.$element.is(\"div\")) {\n\n                throw \"in Bootstrap version 2 the pagination must be a div element. Or if you are using Bootstrap pagination 3. Please specify it in bootstrapMajorVersion in the option\";\n            } else if (version > 2 && !this.$element.is(\"ul\")) {\n                throw \"in Bootstrap version 3 the pagination root item must be an ul element.\"\n            }\n\n\n\n            this.currentPage = 1;\n\n            this.lastPage = 1;\n\n            this.setOptions(options);\n\n            this.initialized = true;\n        },\n\n        /**\n         * Update the properties of the paginator element\n         *\n         * @param options options to config the paginator\n         * */\n        setOptions: function (options) {\n\n            this.options = $.extend({}, (this.options || $.fn.bootstrapPaginator.defaults), options);\n\n            this.totalPages = parseInt(this.options.totalPages, 10);  //setup the total pages property.\n            this.numberOfPages = parseInt(this.options.numberOfPages, 10); //setup the numberOfPages to be shown\n\n            //move the set current page after the setting of total pages. otherwise it will cause out of page exception.\n            if (options && typeof (options.currentPage)  !== 'undefined') {\n\n                this.setCurrentPage(options.currentPage);\n            }\n\n            this.listen();\n\n            //render the paginator\n            this.render();\n\n            if (!this.initialized && this.lastPage !== this.currentPage) {\n                this.$element.trigger(\"page-changed\", [this.lastPage, this.currentPage]);\n            }\n\n        },\n\n        /**\n         * Sets up the events listeners. Currently the pageclicked and pagechanged events are linked if available.\n         *\n         * */\n        listen: function () {\n\n            this.$element.off(\"page-clicked\");\n\n            this.$element.off(\"page-changed\");// unload the events for the element\n\n            if (typeof (this.options.onPageClicked) === \"function\") {\n                this.$element.bind(\"page-clicked\", this.options.onPageClicked);\n            }\n\n            if (typeof (this.options.onPageChanged) === \"function\") {\n                this.$element.on(\"page-changed\", this.options.onPageChanged);\n            }\n\n            this.$element.bind(\"page-clicked\", this.onPageClicked);\n        },\n\n\n        /**\n         *\n         *  Destroys the paginator element, it unload the event first, then empty the content inside.\n         *\n         * */\n        destroy: function () {\n\n            this.$element.off(\"page-clicked\");\n\n            this.$element.off(\"page-changed\");\n\n            this.$element.removeData('bootstrapPaginator');\n\n            this.$element.empty();\n\n        },\n\n        /**\n         * Shows the page\n         *\n         * */\n        show: function (page) {\n\n            this.setCurrentPage(page);\n\n            this.render();\n\n            if (this.lastPage !== this.currentPage) {\n                this.$element.trigger(\"page-changed\", [this.lastPage, this.currentPage]);\n            }\n        },\n\n        /**\n         * Shows the next page\n         *\n         * */\n        showNext: function () {\n            var pages = this.getPages();\n\n            if (pages.next) {\n                this.show(pages.next);\n            }\n\n        },\n\n        /**\n         * Shows the previous page\n         *\n         * */\n        showPrevious: function () {\n            var pages = this.getPages();\n\n            if (pages.prev) {\n                this.show(pages.prev);\n            }\n\n        },\n\n        /**\n         * Shows the first page\n         *\n         * */\n        showFirst: function () {\n            var pages = this.getPages();\n\n            if (pages.first) {\n                this.show(pages.first);\n            }\n\n        },\n\n        /**\n         * Shows the last page\n         *\n         * */\n        showLast: function () {\n            var pages = this.getPages();\n\n            if (pages.last) {\n                this.show(pages.last);\n            }\n\n        },\n\n        /**\n         * Internal on page item click handler, when the page item is clicked, change the current page to the corresponding page and\n         * trigger the pageclick event for the listeners.\n         *\n         *\n         * */\n        onPageItemClicked: function (event) {\n\n            var type = event.data.type,\n                page = event.data.page;\n\n            this.$element.trigger(\"page-clicked\", [event, type, page]);\n\n        },\n\n        onPageClicked: function (event, originalEvent, type, page) {\n\n            //show the corresponding page and retrieve the newly built item related to the page clicked before for the event return\n\n            var currentTarget = $(event.currentTarget);\n\n            switch (type) {\n            case \"first\":\n                currentTarget.bootstrapPaginator(\"showFirst\");\n                break;\n            case \"prev\":\n                currentTarget.bootstrapPaginator(\"showPrevious\");\n                break;\n            case \"next\":\n                currentTarget.bootstrapPaginator(\"showNext\");\n                break;\n            case \"last\":\n                currentTarget.bootstrapPaginator(\"showLast\");\n                break;\n            case \"page\":\n                currentTarget.bootstrapPaginator(\"show\", page);\n                break;\n            }\n\n        },\n\n        /**\n         * Renders the paginator according to the internal properties and the settings.\n         *\n         *\n         * */\n        render: function () {\n\n            //fetch the container class and add them to the container\n            var containerClass = this.getValueFromOption(this.options.containerClass, this.$element),\n                size = this.options.size || \"normal\",\n                alignment = this.options.alignment || \"left\",\n                pages = this.getPages(),\n                listContainer = this.options.bootstrapMajorVersion === 2 ? $(\"<ul></ul>\") : this.$element,\n                listContainerClass = this.options.bootstrapMajorVersion === 2 ? this.getValueFromOption(this.options.listContainerClass, listContainer) : null,\n                first = null,\n                prev = null,\n                next = null,\n                last = null,\n                p = null,\n                i = 0;\n\n\n            this.$element.prop(\"class\", \"\");\n\n            this.$element.addClass(\"pagination\");\n\n            switch (size.toLowerCase()) {\n            case \"large\":\n            case \"small\":\n            case \"mini\":\n                this.$element.addClass($.fn.bootstrapPaginator.sizeArray[this.options.bootstrapMajorVersion][size.toLowerCase()]);\n                break;\n            default:\n                break;\n            }\n\n            if (this.options.bootstrapMajorVersion === 2) {\n                switch (alignment.toLowerCase()) {\n                case \"center\":\n                    this.$element.addClass(\"pagination-centered\");\n                    break;\n                case \"right\":\n                    this.$element.addClass(\"pagination-right\");\n                    break;\n                default:\n                    break;\n                }\n            }\n\n\n            this.$element.addClass(containerClass);\n\n            //empty the outter most container then add the listContainer inside.\n            this.$element.empty();\n\n            if (this.options.bootstrapMajorVersion === 2) {\n                this.$element.append(listContainer);\n\n                listContainer.addClass(listContainerClass);\n            }\n\n            //update the page element reference\n            this.pageRef = [];\n\n            if (pages.first) {//if the there is first page element\n                first = this.buildPageItem(\"first\", pages.first);\n\n                if (first) {\n                    listContainer.append(first);\n                }\n\n            }\n\n            if (pages.prev) {//if the there is previous page element\n\n                prev = this.buildPageItem(\"prev\", pages.prev);\n\n                if (prev) {\n                    listContainer.append(prev);\n                }\n\n            }\n\n\n            for (i = 0; i < pages.length; i = i + 1) {//fill the numeric pages.\n\n                p = this.buildPageItem(\"page\", pages[i]);\n\n                if (p) {\n                    listContainer.append(p);\n                }\n            }\n\n            if (pages.next) {//if there is next page\n\n                next = this.buildPageItem(\"next\", pages.next);\n\n                if (next) {\n                    listContainer.append(next);\n                }\n            }\n\n            if (pages.last) {//if there is last page\n\n                last = this.buildPageItem(\"last\", pages.last);\n\n                if (last) {\n                    listContainer.append(last);\n                }\n            }\n        },\n\n        /**\n         *\n         * Creates a page item base on the type and page number given.\n         *\n         * @param page page number\n         * @param type type of the page, whether it is the first, prev, page, next, last\n         *\n         * @return Object the constructed page element\n         * */\n        buildPageItem: function (type, page) {\n\n            var itemContainer = $(\"<li></li>\"),//creates the item container\n                itemContent = $(\"<a></a>\"),//creates the item content\n                text = \"\",\n                title = \"\",\n                itemContainerClass = this.options.itemContainerClass(type, page, this.currentPage),\n                itemContentClass = this.getValueFromOption(this.options.itemContentClass, type, page, this.currentPage),\n                tooltipOpts = null;\n\n\n            switch (type) {\n\n            case \"first\":\n                if (!this.getValueFromOption(this.options.shouldShowPage, type, page, this.currentPage)) { return; }\n                text = this.options.itemTexts(type, page, this.currentPage);\n                title = this.options.tooltipTitles(type, page, this.currentPage);\n                break;\n            case \"last\":\n                if (!this.getValueFromOption(this.options.shouldShowPage, type, page, this.currentPage)) { return; }\n                text = this.options.itemTexts(type, page, this.currentPage);\n                title = this.options.tooltipTitles(type, page, this.currentPage);\n                break;\n            case \"prev\":\n                if (!this.getValueFromOption(this.options.shouldShowPage, type, page, this.currentPage)) { return; }\n                text = this.options.itemTexts(type, page, this.currentPage);\n                title = this.options.tooltipTitles(type, page, this.currentPage);\n                break;\n            case \"next\":\n                if (!this.getValueFromOption(this.options.shouldShowPage, type, page, this.currentPage)) { return; }\n                text = this.options.itemTexts(type, page, this.currentPage);\n                title = this.options.tooltipTitles(type, page, this.currentPage);\n                break;\n            case \"page\":\n                if (!this.getValueFromOption(this.options.shouldShowPage, type, page, this.currentPage)) { return; }\n                text = this.options.itemTexts(type, page, this.currentPage);\n                title = this.options.tooltipTitles(type, page, this.currentPage);\n                break;\n            }\n\n            itemContainer.addClass(itemContainerClass).append(itemContent);\n\n            itemContent.addClass(itemContentClass).html(text).on(\"click\", null, {type: type, page: page}, $.proxy(this.onPageItemClicked, this));\n\n            if (this.options.pageUrl) {\n                itemContent.attr(\"href\", this.getValueFromOption(this.options.pageUrl, type, page, this.currentPage));\n            }\n\n            if (this.options.useBootstrapTooltip) {\n                tooltipOpts = $.extend({}, this.options.bootstrapTooltipOptions, {title: title});\n\n                itemContent.tooltip(tooltipOpts);\n            } else {\n                itemContent.attr(\"title\", title);\n            }\n\n            return itemContainer;\n\n        },\n\n        setCurrentPage: function (page) {\n            if (page > this.totalPages || page < 1) {// if the current page is out of range, throw exception.\n\n                throw \"Page out of range\";\n\n            }\n\n            this.lastPage = this.currentPage;\n\n            this.currentPage = parseInt(page, 10);\n\n        },\n\n        /**\n         * Gets an array that represents the current status of the page object. Numeric pages can be access via array mode. length attributes describes how many numeric pages are there. First, previous, next and last page can be accessed via attributes first, prev, next and last. Current attribute marks the current page within the pages.\n         *\n         * @return object output objects that has first, prev, next, last and also the number of pages in between.\n         * */\n        getPages: function () {\n\n            var totalPages = this.totalPages,// get or calculate the total pages via the total records\n                pageStart = (this.currentPage % this.numberOfPages === 0) ? (parseInt(this.currentPage / this.numberOfPages, 10) - 1) * this.numberOfPages + 1 : parseInt(this.currentPage / this.numberOfPages, 10) * this.numberOfPages + 1,//calculates the start page.\n                output = [],\n                i = 0,\n                counter = 0;\n\n            pageStart = pageStart < 1 ? 1 : pageStart;//check the range of the page start to see if its less than 1.\n\n            for (i = pageStart, counter = 0; counter < this.numberOfPages && i <= totalPages; i = i + 1, counter = counter + 1) {//fill the pages\n                output.push(i);\n            }\n\n            output.first = 1;//add the first when the current page leaves the 1st page.\n\n            if (this.currentPage > 1) {// add the previous when the current page leaves the 1st page\n                output.prev = this.currentPage - 1;\n            } else {\n                output.prev = 1;\n            }\n\n            if (this.currentPage < totalPages) {// add the next page when the current page doesn't reach the last page\n                output.next = this.currentPage + 1;\n            } else {\n                output.next = totalPages;\n            }\n\n            output.last = totalPages;// add the last page when the current page doesn't reach the last page\n\n            output.current = this.currentPage;//mark the current page.\n\n            output.total = totalPages;\n\n            output.numberOfPages = this.options.numberOfPages;\n\n            return output;\n\n        },\n\n        /**\n         * Gets the value from the options, this is made to handle the situation where value is the return value of a function.\n         *\n         * @return mixed value that depends on the type of parameters, if the given parameter is a function, then the evaluated result is returned. Otherwise the parameter itself will get returned.\n         * */\n        getValueFromOption: function (value) {\n\n            var output = null,\n                args = Array.prototype.slice.call(arguments, 1);\n\n            if (typeof value === 'function') {\n                output = value.apply(this, args);\n            } else {\n                output = value;\n            }\n\n            return output;\n\n        }\n\n    };\n\n\n    /* TYPEAHEAD PLUGIN DEFINITION\n     * =========================== */\n\n    old = $.fn.bootstrapPaginator;\n\n    $.fn.bootstrapPaginator = function (option) {\n\n        var args = arguments,\n            result = null;\n\n        $(this).each(function (index, item) {\n            var $this = $(item),\n                data = $this.data('bootstrapPaginator'),\n                options = (typeof option !== 'object') ? null : option;\n\n            if (!data) {\n                data = new BootstrapPaginator(this, options);\n\n                $this = $(data.$element);\n\n                $this.data('bootstrapPaginator', data);\n\n                return;\n            }\n\n            if (typeof option === 'string') {\n\n                if (data[option]) {\n                    result = data[option].apply(data, Array.prototype.slice.call(args, 1));\n                } else {\n                    throw \"Method \" + option + \" does not exist\";\n                }\n\n            } else {\n                result = data.setOptions(option);\n            }\n        });\n\n        return result;\n\n    };\n\n    $.fn.bootstrapPaginator.sizeArray = {\n\n        \"2\": {\n            \"large\": \"pagination-large\",\n            \"small\": \"pagination-small\",\n            \"mini\": \"pagination-mini\"\n        },\n        \"3\": {\n            \"large\": \"pagination-lg\",\n            \"small\": \"pagination-sm\",\n            \"mini\": \"\"\n        }\n\n    };\n\n    $.fn.bootstrapPaginator.defaults = {\n        containerClass: \"\",\n        size: \"normal\",\n        alignment: \"left\",\n        bootstrapMajorVersion: 2,\n        listContainerClass: \"\",\n        itemContainerClass: function (type, page, current) {\n            return (page === current) ? \"active\" : \"\";\n        },\n        itemContentClass: function (type, page, current) {\n            return \"\";\n        },\n        currentPage: 1,\n        numberOfPages: 5,\n        totalPages: 1,\n        pageUrl: function (type, page, current) {\n            return null;\n        },\n        onPageClicked: null,\n        onPageChanged: null,\n        useBootstrapTooltip: false,\n        shouldShowPage: function (type, page, current) {\n\n            var result = true;\n\n            switch (type) {\n            case \"first\":\n                result = (current !== 1);\n                break;\n            case \"prev\":\n                result = (current !== 1);\n                break;\n            case \"next\":\n                result = (current !== this.totalPages);\n                break;\n            case \"last\":\n                result = (current !== this.totalPages);\n                break;\n            case \"page\":\n                result = true;\n                break;\n            }\n\n            return result;\n\n        },\n        itemTexts: function (type, page, current) {\n            switch (type) {\n            case \"first\":\n                return \"&lt;&lt;\";\n            case \"prev\":\n                return \"&lt;\";\n            case \"next\":\n                return \"&gt;\";\n            case \"last\":\n                return \"&gt;&gt;\";\n            case \"page\":\n                return page;\n            }\n        },\n        tooltipTitles: function (type, page, current) {\n\n            switch (type) {\n            case \"first\":\n                return \"Go to first page\";\n            case \"prev\":\n                return \"Go to previous page\";\n            case \"next\":\n                return \"Go to next page\";\n            case \"last\":\n                return \"Go to last page\";\n            case \"page\":\n                return (page === current) ? \"Current page is \" + page : \"Go to page \" + page;\n            }\n        },\n        bootstrapTooltipOptions: {\n            animation: true,\n            html: true,\n            placement: 'top',\n            selector: false,\n            title: \"\",\n            container: false\n        }\n    };\n\n    $.fn.bootstrapPaginator.Constructor = BootstrapPaginator;\n\n\n\n}(window.jQuery));\n"
  },
  {
    "path": "static/cherry/addons/cherry-code-block-mermaid-plugin.d.ts",
    "content": "export default class MermaidCodeEngine {\n    static TYPE: string;\n    static install(cherryOptions: any, ...args: any[]): void;\n    constructor(mermaidOptions?: {});\n    mermaidAPIRefs: any;\n    options: {\n        theme: string;\n        altFontFamily: string;\n        fontFamily: string;\n        themeCSS: string;\n        flowchart: {\n            useMaxWidth: boolean;\n        };\n        sequence: {\n            useMaxWidth: boolean;\n        };\n        startOnLoad: boolean;\n        logLevel: number;\n    };\n    dom: any;\n    mermaidCanvas: any;\n    mountMermaidCanvas($engine: any): void;\n    /**\n     * 转换svg为img，如果出错则直出svg\n     * @param {string} svgCode\n     * @param {string} graphId\n     * @returns {string}\n     */\n    convertMermaidSvgToImg(svgCode: string, graphId: string): string;\n    render(src: any, sign: any, $engine: any): boolean;\n}\n"
  },
  {
    "path": "static/cherry/addons/cherry-code-block-mermaid-plugin.js",
    "content": "!function(t,r){\"object\"==typeof exports&&\"undefined\"!=typeof module?module.exports=r():\"function\"==typeof define&&define.amd?define(r):(t=t||self).CherryCodeBlockMermaidPlugin=r()}(this,(function(){\"use strict\";var t=\"undefined\"!=typeof globalThis?globalThis:\"undefined\"!=typeof window?window:\"undefined\"!=typeof global?global:\"undefined\"!=typeof self?self:{};function r(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,\"default\")?t.default:t}function e(t,r){return t(r={exports:{}},r.exports),r.exports}var n,o,i=function(t){return t&&t.Math==Math&&t},a=i(\"object\"==typeof globalThis&&globalThis)||i(\"object\"==typeof window&&window)||i(\"object\"==typeof self&&self)||i(\"object\"==typeof t&&t)||function(){return this}()||Function(\"return this\")(),u=function(t){try{return!!t()}catch(t){return!0}},c=!u((function(){var t=function(){}.bind();return\"function\"!=typeof t||t.hasOwnProperty(\"prototype\")})),f=Function.prototype,s=f.apply,l=f.call,p=\"object\"==typeof Reflect&&Reflect.apply||(c?l.bind(s):function(){return l.apply(s,arguments)}),v=Function.prototype,y=v.bind,d=v.call,h=c&&y.bind(d,d),b=c?function(t){return t&&h(t)}:function(t){return t&&function(){return d.apply(t,arguments)}},m=function(t){return\"function\"==typeof t},g=!u((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),w=Function.prototype.call,_=c?w.bind(w):function(){return w.apply(w,arguments)},O={}.propertyIsEnumerable,j=Object.getOwnPropertyDescriptor,S={f:j&&!O.call({1:2},1)?function(t){var r=j(this,t);return!!r&&r.enumerable}:O},P=function(t,r){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:r}},x=b({}.toString),A=b(\"\".slice),T=function(t){return A(x(t),8,-1)},E=a.Object,F=b(\"\".split),M=u((function(){return!E(\"z\").propertyIsEnumerable(0)}))?function(t){return\"String\"==T(t)?F(t,\"\"):E(t)}:E,I=a.TypeError,L=function(t){if(null==t)throw I(\"Can't call method on \"+t);return t},C=function(t){return M(L(t))},k=function(t){return\"object\"==typeof t?null!==t:m(t)},R={},z=function(t){return m(t)?t:void 0},D=function(t,r){return arguments.length<2?z(R[t])||z(a[t]):R[t]&&R[t][r]||a[t]&&a[t][r]},B=b({}.isPrototypeOf),N=D(\"navigator\",\"userAgent\")||\"\",G=a.process,U=a.Deno,V=G&&G.versions||U&&U.version,$=V&&V.v8;$&&(o=(n=$.split(\".\"))[0]>0&&n[0]<4?1:+(n[0]+n[1])),!o&&N&&(!(n=N.match(/Edge\\/(\\d+)/))||n[1]>=74)&&(n=N.match(/Chrome\\/(\\d+)/))&&(o=+n[1]);var W=o,q=!!Object.getOwnPropertySymbols&&!u((function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&W&&W<41})),H=q&&!Symbol.sham&&\"symbol\"==typeof Symbol.iterator,Y=a.Object,J=H?function(t){return\"symbol\"==typeof t}:function(t){var r=D(\"Symbol\");return m(r)&&B(r.prototype,Y(t))},X=a.String,K=function(t){try{return X(t)}catch(t){return\"Object\"}},Q=a.TypeError,Z=function(t){if(m(t))return t;throw Q(K(t)+\" is not a function\")},tt=a.TypeError,rt=Object.defineProperty,et=a[\"__core-js_shared__\"]||function(t,r){try{rt(a,t,{value:r,configurable:!0,writable:!0})}catch(e){a[t]=r}return r}(\"__core-js_shared__\",{}),nt=e((function(t){(t.exports=function(t,r){return et[t]||(et[t]=void 0!==r?r:{})})(\"versions\",[]).push({version:\"3.22.6\",mode:\"pure\",copyright:\"© 2014-2022 Denis Pushkarev (zloirock.ru)\",license:\"https://github.com/zloirock/core-js/blob/v3.22.6/LICENSE\",source:\"https://github.com/zloirock/core-js\"})})),ot=a.Object,it=function(t){return ot(L(t))},at=b({}.hasOwnProperty),ut=Object.hasOwn||function(t,r){return at(it(t),r)},ct=0,ft=Math.random(),st=b(1..toString),lt=function(t){return\"Symbol(\"+(void 0===t?\"\":t)+\")_\"+st(++ct+ft,36)},pt=nt(\"wks\"),vt=a.Symbol,yt=vt&&vt.for,dt=H?vt:vt&&vt.withoutSetter||lt,ht=function(t){if(!ut(pt,t)||!q&&\"string\"!=typeof pt[t]){var r=\"Symbol.\"+t;q&&ut(vt,t)?pt[t]=vt[t]:pt[t]=H&&yt?yt(r):dt(r)}return pt[t]},bt=a.TypeError,mt=ht(\"toPrimitive\"),gt=function(t,r){if(!k(t)||J(t))return t;var e,n,o=null==(e=t[mt])?void 0:Z(e);if(o){if(void 0===r&&(r=\"default\"),n=_(o,t,r),!k(n)||J(n))return n;throw bt(\"Can't convert object to primitive value\")}return void 0===r&&(r=\"number\"),function(t,r){var e,n;if(\"string\"===r&&m(e=t.toString)&&!k(n=_(e,t)))return n;if(m(e=t.valueOf)&&!k(n=_(e,t)))return n;if(\"string\"!==r&&m(e=t.toString)&&!k(n=_(e,t)))return n;throw tt(\"Can't convert object to primitive value\")}(t,r)},wt=function(t){var r=gt(t,\"string\");return J(r)?r:r+\"\"},_t=a.document,Ot=k(_t)&&k(_t.createElement),jt=function(t){return Ot?_t.createElement(t):{}},St=!g&&!u((function(){return 7!=Object.defineProperty(jt(\"div\"),\"a\",{get:function(){return 7}}).a})),Pt=Object.getOwnPropertyDescriptor,xt={f:g?Pt:function(t,r){if(t=C(t),r=wt(r),St)try{return Pt(t,r)}catch(t){}if(ut(t,r))return P(!_(S.f,t,r),t[r])}},At=/#|\\.prototype\\./,Tt=function(t,r){var e=Ft[Et(t)];return e==It||e!=Mt&&(m(r)?u(r):!!r)},Et=Tt.normalize=function(t){return String(t).replace(At,\".\").toLowerCase()},Ft=Tt.data={},Mt=Tt.NATIVE=\"N\",It=Tt.POLYFILL=\"P\",Lt=Tt,Ct=b(b.bind),kt=function(t,r){return Z(t),void 0===r?t:c?Ct(t,r):function(){return t.apply(r,arguments)}},Rt=g&&u((function(){return 42!=Object.defineProperty((function(){}),\"prototype\",{value:42,writable:!1}).prototype})),zt=a.String,Dt=a.TypeError,Bt=function(t){if(k(t))return t;throw Dt(zt(t)+\" is not an object\")},Nt=a.TypeError,Gt=Object.defineProperty,Ut=Object.getOwnPropertyDescriptor,Vt={f:g?Rt?function(t,r,e){if(Bt(t),r=wt(r),Bt(e),\"function\"==typeof t&&\"prototype\"===r&&\"value\"in e&&\"writable\"in e&&!e.writable){var n=Ut(t,r);n&&n.writable&&(t[r]=e.value,e={configurable:\"configurable\"in e?e.configurable:n.configurable,enumerable:\"enumerable\"in e?e.enumerable:n.enumerable,writable:!1})}return Gt(t,r,e)}:Gt:function(t,r,e){if(Bt(t),r=wt(r),Bt(e),St)try{return Gt(t,r,e)}catch(t){}if(\"get\"in e||\"set\"in e)throw Nt(\"Accessors not supported\");return\"value\"in e&&(t[r]=e.value),t}},$t=g?function(t,r,e){return Vt.f(t,r,P(1,e))}:function(t,r,e){return t[r]=e,t},Wt=xt.f,qt=function(t){var r=function(e,n,o){if(this instanceof r){switch(arguments.length){case 0:return new t;case 1:return new t(e);case 2:return new t(e,n)}return new t(e,n,o)}return p(t,this,arguments)};return r.prototype=t.prototype,r},Ht=function(t,r){var e,n,o,i,u,c,f,s,l=t.target,p=t.global,v=t.stat,y=t.proto,d=p?a:v?a[l]:(a[l]||{}).prototype,h=p?R:R[l]||$t(R,l,{})[l],g=h.prototype;for(o in r)e=!Lt(p?o:l+(v?\".\":\"#\")+o,t.forced)&&d&&ut(d,o),u=h[o],e&&(c=t.dontCallGetSet?(s=Wt(d,o))&&s.value:d[o]),i=e&&c?c:r[o],e&&typeof u==typeof i||(f=t.bind&&e?kt(i,a):t.wrap&&e?qt(i):y&&m(i)?b(i):i,(t.sham||i&&i.sham||u&&u.sham)&&$t(f,\"sham\",!0),$t(h,o,f),y&&(ut(R,n=l+\"Prototype\")||$t(R,n,{}),$t(R[n],o,i),t.real&&g&&!g[o]&&$t(g,o,i)))},Yt=Math.ceil,Jt=Math.floor,Xt=Math.trunc||function(t){var r=+t;return(r>0?Jt:Yt)(r)},Kt=function(t){var r=+t;return r!=r||0===r?0:Xt(r)},Qt=Math.max,Zt=Math.min,tr=function(t,r){var e=Kt(t);return e<0?Qt(e+r,0):Zt(e,r)},rr=Math.min,er=function(t){return(r=t.length)>0?rr(Kt(r),9007199254740991):0;var r},nr=function(t){return function(r,e,n){var o,i=C(r),a=er(i),u=tr(n,a);if(t&&e!=e){for(;a>u;)if((o=i[u++])!=o)return!0}else for(;a>u;u++)if((t||u in i)&&i[u]===e)return t||u||0;return!t&&-1}},or={includes:nr(!0),indexOf:nr(!1)},ir={},ar=or.indexOf,ur=b([].push),cr=function(t,r){var e,n=C(t),o=0,i=[];for(e in n)!ut(ir,e)&&ut(n,e)&&ur(i,e);for(;r.length>o;)ut(n,e=r[o++])&&(~ar(i,e)||ur(i,e));return i},fr=[\"constructor\",\"hasOwnProperty\",\"isPrototypeOf\",\"propertyIsEnumerable\",\"toLocaleString\",\"toString\",\"valueOf\"],sr=Object.keys||function(t){return cr(t,fr)},lr=u((function(){sr(1)}));Ht({target:\"Object\",stat:!0,forced:lr},{keys:function(t){return sr(it(t))}});var pr=R.Object.keys,vr={};vr[ht(\"toStringTag\")]=\"z\";var yr,dr=\"[object z]\"===String(vr),hr=ht(\"toStringTag\"),br=a.Object,mr=\"Arguments\"==T(function(){return arguments}()),gr=dr?T:function(t){var r,e,n;return void 0===t?\"Undefined\":null===t?\"Null\":\"string\"==typeof(e=function(t,r){try{return t[r]}catch(t){}}(r=br(t),hr))?e:mr?T(r):\"Object\"==(n=T(r))&&m(r.callee)?\"Arguments\":n},wr=a.String,_r=function(t){if(\"Symbol\"===gr(t))throw TypeError(\"Cannot convert a Symbol value to a string\");return wr(t)},Or={f:g&&!Rt?Object.defineProperties:function(t,r){Bt(t);for(var e,n=C(r),o=sr(r),i=o.length,a=0;i>a;)Vt.f(t,e=o[a++],n[e]);return t}},jr=D(\"document\",\"documentElement\"),Sr=nt(\"keys\"),Pr=function(t){return Sr[t]||(Sr[t]=lt(t))},xr=Pr(\"IE_PROTO\"),Ar=function(){},Tr=function(t){return\"<script>\"+t+\"<\\/script>\"},Er=function(t){t.write(Tr(\"\")),t.close();var r=t.parentWindow.Object;return t=null,r},Fr=function(){try{yr=new ActiveXObject(\"htmlfile\")}catch(t){}var t,r;Fr=\"undefined\"!=typeof document?document.domain&&yr?Er(yr):((r=jt(\"iframe\")).style.display=\"none\",jr.appendChild(r),r.src=String(\"javascript:\"),(t=r.contentWindow.document).open(),t.write(Tr(\"document.F=Object\")),t.close(),t.F):Er(yr);for(var e=fr.length;e--;)delete Fr.prototype[fr[e]];return Fr()};ir[xr]=!0;var Mr=Object.create||function(t,r){var e;return null!==t?(Ar.prototype=Bt(t),e=new Ar,Ar.prototype=null,e[xr]=t):e=Fr(),void 0===r?e:Or.f(e,r)},Ir=fr.concat(\"length\",\"prototype\"),Lr={f:Object.getOwnPropertyNames||function(t){return cr(t,Ir)}},Cr=function(t,r,e){var n=wt(r);n in t?Vt.f(t,n,P(0,e)):t[n]=e},kr=a.Array,Rr=Math.max,zr=Lr.f,Dr=\"object\"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],Br=function(t){try{return zr(t)}catch(t){return function(t,r,e){for(var n=er(t),o=tr(r,n),i=tr(void 0===e?n:e,n),a=kr(Rr(i-o,0)),u=0;o<i;o++,u++)Cr(a,u,t[o]);return a.length=u,a}(Dr)}},Nr={f:function(t){return Dr&&\"Window\"==T(t)?Br(t):zr(C(t))}},Gr={f:Object.getOwnPropertySymbols},Ur=function(t,r,e,n){return n&&n.enumerable?t[r]=e:$t(t,r,e),t},Vr={f:ht},$r=Vt.f,Wr=dr?{}.toString:function(){return\"[object \"+gr(this)+\"]\"},qr=Vt.f,Hr=ht(\"toStringTag\"),Yr=function(t,r,e,n){if(t){var o=e?t:t.prototype;ut(o,Hr)||qr(o,Hr,{configurable:!0,value:r}),n&&!dr&&$t(o,\"toString\",Wr)}},Jr=b(Function.toString);m(et.inspectSource)||(et.inspectSource=function(t){return Jr(t)});var Xr,Kr,Qr,Zr=et.inspectSource,te=a.WeakMap,re=m(te)&&/native code/.test(Zr(te)),ee=a.TypeError,ne=a.WeakMap;if(re||et.state){var oe=et.state||(et.state=new ne),ie=b(oe.get),ae=b(oe.has),ue=b(oe.set);Xr=function(t,r){if(ae(oe,t))throw new ee(\"Object already initialized\");return r.facade=t,ue(oe,t,r),r},Kr=function(t){return ie(oe,t)||{}},Qr=function(t){return ae(oe,t)}}else{var ce=Pr(\"state\");ir[ce]=!0,Xr=function(t,r){if(ut(t,ce))throw new ee(\"Object already initialized\");return r.facade=t,$t(t,ce,r),r},Kr=function(t){return ut(t,ce)?t[ce]:{}},Qr=function(t){return ut(t,ce)}}var fe={set:Xr,get:Kr,has:Qr,enforce:function(t){return Qr(t)?Kr(t):Xr(t,{})},getterFor:function(t){return function(r){var e;if(!k(r)||(e=Kr(r)).type!==t)throw ee(\"Incompatible receiver, \"+t+\" required\");return e}}},se=Array.isArray||function(t){return\"Array\"==T(t)},le=function(){},pe=[],ve=D(\"Reflect\",\"construct\"),ye=/^\\s*(?:class|function)\\b/,de=b(ye.exec),he=!ye.exec(le),be=function(t){if(!m(t))return!1;try{return ve(le,pe,t),!0}catch(t){return!1}},me=function(t){if(!m(t))return!1;switch(gr(t)){case\"AsyncFunction\":case\"GeneratorFunction\":case\"AsyncGeneratorFunction\":return!1}try{return he||!!de(ye,Zr(t))}catch(t){return!0}};me.sham=!0;var ge=!ve||u((function(){var t;return be(be.call)||!be(Object)||!be((function(){t=!0}))||t}))?me:be,we=ht(\"species\"),_e=a.Array,Oe=function(t,r){return new(function(t){var r;return se(t)&&(r=t.constructor,(ge(r)&&(r===_e||se(r.prototype))||k(r)&&null===(r=r[we]))&&(r=void 0)),void 0===r?_e:r}(t))(0===r?0:r)},je=b([].push),Se=function(t){var r=1==t,e=2==t,n=3==t,o=4==t,i=6==t,a=7==t,u=5==t||i;return function(c,f,s,l){for(var p,v,y=it(c),d=M(y),h=kt(f,s),b=er(d),m=0,g=l||Oe,w=r?g(c,b):e||a?g(c,0):void 0;b>m;m++)if((u||m in d)&&(v=h(p=d[m],m,y),t))if(r)w[m]=v;else if(v)switch(t){case 3:return!0;case 5:return p;case 6:return m;case 2:je(w,p)}else switch(t){case 4:return!1;case 7:je(w,p)}return i?-1:n||o?o:w}},Pe={forEach:Se(0),map:Se(1),filter:Se(2),some:Se(3),every:Se(4),find:Se(5),findIndex:Se(6),filterReject:Se(7)},xe=Pe.forEach,Ae=Pr(\"hidden\"),Te=fe.set,Ee=fe.getterFor(\"Symbol\"),Fe=Object.prototype,Me=a.Symbol,Ie=Me&&Me.prototype,Le=a.TypeError,Ce=a.QObject,ke=xt.f,Re=Vt.f,ze=Nr.f,De=S.f,Be=b([].push),Ne=nt(\"symbols\"),Ge=nt(\"op-symbols\"),Ue=nt(\"wks\"),Ve=!Ce||!Ce.prototype||!Ce.prototype.findChild,$e=g&&u((function(){return 7!=Mr(Re({},\"a\",{get:function(){return Re(this,\"a\",{value:7}).a}})).a}))?function(t,r,e){var n=ke(Fe,r);n&&delete Fe[r],Re(t,r,e),n&&t!==Fe&&Re(Fe,r,n)}:Re,We=function(t,r){var e=Ne[t]=Mr(Ie);return Te(e,{type:\"Symbol\",tag:t,description:r}),g||(e.description=r),e},qe=function(t,r,e){t===Fe&&qe(Ge,r,e),Bt(t);var n=wt(r);return Bt(e),ut(Ne,n)?(e.enumerable?(ut(t,Ae)&&t[Ae][n]&&(t[Ae][n]=!1),e=Mr(e,{enumerable:P(0,!1)})):(ut(t,Ae)||Re(t,Ae,P(1,{})),t[Ae][n]=!0),$e(t,n,e)):Re(t,n,e)},He=function(t,r){Bt(t);var e=C(r),n=sr(e).concat(Ke(e));return xe(n,(function(r){g&&!_(Ye,e,r)||qe(t,r,e[r])})),t},Ye=function(t){var r=wt(t),e=_(De,this,r);return!(this===Fe&&ut(Ne,r)&&!ut(Ge,r))&&(!(e||!ut(this,r)||!ut(Ne,r)||ut(this,Ae)&&this[Ae][r])||e)},Je=function(t,r){var e=C(t),n=wt(r);if(e!==Fe||!ut(Ne,n)||ut(Ge,n)){var o=ke(e,n);return!o||!ut(Ne,n)||ut(e,Ae)&&e[Ae][n]||(o.enumerable=!0),o}},Xe=function(t){var r=ze(C(t)),e=[];return xe(r,(function(t){ut(Ne,t)||ut(ir,t)||Be(e,t)})),e},Ke=function(t){var r=t===Fe,e=ze(r?Ge:C(t)),n=[];return xe(e,(function(t){!ut(Ne,t)||r&&!ut(Fe,t)||Be(n,Ne[t])})),n};q||(Ie=(Me=function(){if(B(Ie,this))throw Le(\"Symbol is not a constructor\");var t=arguments.length&&void 0!==arguments[0]?_r(arguments[0]):void 0,r=lt(t),e=function(t){this===Fe&&_(e,Ge,t),ut(this,Ae)&&ut(this[Ae],r)&&(this[Ae][r]=!1),$e(this,r,P(1,t))};return g&&Ve&&$e(Fe,r,{configurable:!0,set:e}),We(r,t)}).prototype,Ur(Ie,\"toString\",(function(){return Ee(this).tag})),Ur(Me,\"withoutSetter\",(function(t){return We(lt(t),t)})),S.f=Ye,Vt.f=qe,Or.f=He,xt.f=Je,Lr.f=Nr.f=Xe,Gr.f=Ke,Vr.f=function(t){return We(ht(t),t)},g&&Re(Ie,\"description\",{configurable:!0,get:function(){return Ee(this).description}})),Ht({global:!0,constructor:!0,wrap:!0,forced:!q,sham:!q},{Symbol:Me}),xe(sr(Ue),(function(t){!function(t){var r=R.Symbol||(R.Symbol={});ut(r,t)||$r(r,t,{value:Vr.f(t)})}(t)})),Ht({target:\"Symbol\",stat:!0,forced:!q},{useSetter:function(){Ve=!0},useSimple:function(){Ve=!1}}),Ht({target:\"Object\",stat:!0,forced:!q,sham:!g},{create:function(t,r){return void 0===r?Mr(t):He(Mr(t),r)},defineProperty:qe,defineProperties:He,getOwnPropertyDescriptor:Je}),Ht({target:\"Object\",stat:!0,forced:!q},{getOwnPropertyNames:Xe}),function(){var t=D(\"Symbol\"),r=t&&t.prototype,e=r&&r.valueOf,n=ht(\"toPrimitive\");r&&!r[n]&&Ur(r,n,(function(t){return _(e,this)}),{arity:1})}(),Yr(Me,\"Symbol\"),ir[Ae]=!0;var Qe=q&&!!Symbol.for&&!!Symbol.keyFor,Ze=nt(\"string-to-symbol-registry\"),tn=nt(\"symbol-to-string-registry\");Ht({target:\"Symbol\",stat:!0,forced:!Qe},{for:function(t){var r=_r(t);if(ut(Ze,r))return Ze[r];var e=D(\"Symbol\")(r);return Ze[r]=e,tn[e]=r,e}});var rn=nt(\"symbol-to-string-registry\");Ht({target:\"Symbol\",stat:!0,forced:!Qe},{keyFor:function(t){if(!J(t))throw TypeError(K(t)+\" is not a symbol\");if(ut(rn,t))return rn[t]}});var en=b([].slice),nn=D(\"JSON\",\"stringify\"),on=b(/./.exec),an=b(\"\".charAt),un=b(\"\".charCodeAt),cn=b(\"\".replace),fn=b(1..toString),sn=/[\\uD800-\\uDFFF]/g,ln=/^[\\uD800-\\uDBFF]$/,pn=/^[\\uDC00-\\uDFFF]$/,vn=!q||u((function(){var t=D(\"Symbol\")();return\"[null]\"!=nn([t])||\"{}\"!=nn({a:t})||\"{}\"!=nn(Object(t))})),yn=u((function(){return'\"\\\\udf06\\\\ud834\"'!==nn(\"\\udf06\\ud834\")||'\"\\\\udead\"'!==nn(\"\\udead\")})),dn=function(t,r){var e=en(arguments),n=r;if((k(r)||void 0!==t)&&!J(t))return se(r)||(r=function(t,r){if(m(n)&&(r=_(n,this,t,r)),!J(r))return r}),e[1]=r,p(nn,null,e)},hn=function(t,r,e){var n=an(e,r-1),o=an(e,r+1);return on(ln,t)&&!on(pn,o)||on(pn,t)&&!on(ln,n)?\"\\\\u\"+fn(un(t,0),16):t};nn&&Ht({target:\"JSON\",stat:!0,arity:3,forced:vn||yn},{stringify:function(t,r,e){var n=en(arguments),o=p(vn?dn:nn,null,n);return yn&&\"string\"==typeof o?cn(o,sn,hn):o}});var bn=!q||u((function(){Gr.f(1)}));Ht({target:\"Object\",stat:!0,forced:bn},{getOwnPropertySymbols:function(t){var r=Gr.f;return r?r(it(t)):[]}});var mn=R.Object.getOwnPropertySymbols,gn=ht(\"species\"),wn=function(t){return W>=51||!u((function(){var r=[];return(r.constructor={})[gn]=function(){return{foo:1}},1!==r[t](Boolean).foo}))},_n=Pe.filter,On=wn(\"filter\");Ht({target:\"Array\",proto:!0,forced:!On},{filter:function(t){return _n(this,t,arguments.length>1?arguments[1]:void 0)}});var jn=function(t){return R[t+\"Prototype\"]},Sn=jn(\"Array\").filter,Pn=Array.prototype,xn=function(t){var r=t.filter;return t===Pn||B(Pn,t)&&r===Pn.filter?Sn:r},An=xt.f,Tn=u((function(){An(1)}));Ht({target:\"Object\",stat:!0,forced:!g||Tn,sham:!g},{getOwnPropertyDescriptor:function(t,r){return An(C(t),r)}});var En,Fn,Mn,In=e((function(t){var r=R.Object,e=t.exports=function(t,e){return r.getOwnPropertyDescriptor(t,e)};r.getOwnPropertyDescriptor.sham&&(e.sham=!0)})),Ln=Function.prototype,Cn=g&&Object.getOwnPropertyDescriptor,kn=ut(Ln,\"name\"),Rn={EXISTS:kn,PROPER:kn&&\"something\"===function(){}.name,CONFIGURABLE:kn&&(!g||g&&Cn(Ln,\"name\").configurable)},zn=!u((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype})),Dn=Pr(\"IE_PROTO\"),Bn=a.Object,Nn=Bn.prototype,Gn=zn?Bn.getPrototypeOf:function(t){var r=it(t);if(ut(r,Dn))return r[Dn];var e=r.constructor;return m(e)&&r instanceof e?e.prototype:r instanceof Bn?Nn:null},Un=ht(\"iterator\"),Vn=!1;[].keys&&(\"next\"in(Mn=[].keys())?(Fn=Gn(Gn(Mn)))!==Object.prototype&&(En=Fn):Vn=!0);var $n=null==En||u((function(){var t={};return En[Un].call(t)!==t}));En=$n?{}:Mr(En),m(En[Un])||Ur(En,Un,(function(){return this}));var Wn={IteratorPrototype:En,BUGGY_SAFARI_ITERATORS:Vn},qn=Wn.IteratorPrototype,Hn=a.String,Yn=a.TypeError,Jn=Object.setPrototypeOf||(\"__proto__\"in{}?function(){var t,r=!1,e={};try{(t=b(Object.getOwnPropertyDescriptor(Object.prototype,\"__proto__\").set))(e,[]),r=e instanceof Array}catch(t){}return function(e,n){return Bt(e),function(t){if(\"object\"==typeof t||m(t))return t;throw Yn(\"Can't set \"+Hn(t)+\" as a prototype\")}(n),r?t(e,n):e.__proto__=n,e}}():void 0),Xn=Rn.PROPER,Kn=Wn.BUGGY_SAFARI_ITERATORS,Qn=ht(\"iterator\"),Zn=fe.set,to=fe.getterFor(\"Array Iterator\"),ro=(function(t,r,e,n,o,i,a){!function(t,r,e,n){var o=r+\" Iterator\";t.prototype=Mr(qn,{next:P(+!n,e)}),Yr(t,o,!1,!0)}(e,r,n);var u,c,f,s=function(t){if(t===o&&d)return d;if(!Kn&&t in v)return v[t];switch(t){case\"keys\":case\"values\":case\"entries\":return function(){return new e(this,t)}}return function(){return new e(this)}},l=r+\" Iterator\",p=!1,v=t.prototype,y=v[Qn]||v[\"@@iterator\"]||o&&v[o],d=!Kn&&y||s(o),h=\"Array\"==r&&v.entries||y;if(h&&(u=Gn(h.call(new t)))!==Object.prototype&&u.next&&Yr(u,l,!0,!0),Xn&&\"values\"==o&&y&&\"values\"!==y.name&&(p=!0,d=function(){return _(y,this)}),o)if(c={values:s(\"values\"),keys:i?d:s(\"keys\"),entries:s(\"entries\")},a)for(f in c)(Kn||p||!(f in v))&&Ur(v,f,c[f]);else Ht({target:r,proto:!0,forced:Kn||p},c);a&&v[Qn]!==d&&Ur(v,Qn,d,{name:o})}(Array,\"Array\",(function(t,r){Zn(this,{type:\"Array Iterator\",target:C(t),index:0,kind:r})}),(function(){var t=to(this),r=t.target,e=t.kind,n=t.index++;return!r||n>=r.length?(t.target=void 0,{value:void 0,done:!0}):\"keys\"==e?{value:n,done:!1}:\"values\"==e?{value:r[n],done:!1}:{value:[n,r[n]],done:!1}}),\"values\"),ht(\"toStringTag\"));for(var eo in{CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}){var no=a[eo],oo=no&&no.prototype;oo&&gr(oo)!==ro&&$t(oo,ro,eo)}var io,ao,uo=Pe.forEach,co=!!(ao=[][\"forEach\"])&&u((function(){ao.call(null,io||function(){return 1},1)}))?[].forEach:function(t){return uo(this,t,arguments.length>1?arguments[1]:void 0)};Ht({target:\"Array\",proto:!0,forced:[].forEach!=co},{forEach:co});var fo=jn(\"Array\").forEach,so=Array.prototype,lo={DOMTokenList:!0,NodeList:!0},po=function(t){var r=t.forEach;return t===so||B(so,t)&&r===so.forEach||ut(lo,gr(t))?fo:r},vo=b([].concat),yo=D(\"Reflect\",\"ownKeys\")||function(t){var r=Lr.f(Bt(t)),e=Gr.f;return e?vo(r,e(t)):r};Ht({target:\"Object\",stat:!0,sham:!g},{getOwnPropertyDescriptors:function(t){for(var r,e,n=C(t),o=xt.f,i=yo(n),a={},u=0;i.length>u;)void 0!==(e=o(n,r=i[u++]))&&Cr(a,r,e);return a}});var ho=R.Object.getOwnPropertyDescriptors,bo=Or.f;Ht({target:\"Object\",stat:!0,forced:Object.defineProperties!==bo,sham:!g},{defineProperties:bo});var mo=e((function(t){var r=R.Object,e=t.exports=function(t,e){return r.defineProperties(t,e)};r.defineProperties.sham&&(e.sham=!0)})),go=Vt.f;Ht({target:\"Object\",stat:!0,forced:Object.defineProperty!==go,sham:!g},{defineProperty:go});var wo=e((function(t){var r=R.Object,e=t.exports=function(t,e,n){return r.defineProperty(t,e,n)};r.defineProperty.sham&&(e.sham=!0)})),_o=wo,Oo=a.Function,jo=b([].concat),So=b([].join),Po={},xo=function(t,r,e){if(!ut(Po,r)){for(var n=[],o=0;o<r;o++)n[o]=\"a[\"+o+\"]\";Po[r]=Oo(\"C,a\",\"return new C(\"+So(n,\",\")+\")\")}return Po[r](t,e)},Ao=c?Oo.bind:function(t){var r=Z(this),e=r.prototype,n=en(arguments,1),o=function(){var e=jo(n,en(arguments));return this instanceof o?xo(r,e.length,e):r.apply(t,e)};return k(e)&&(o.prototype=e),o},To=a.TypeError,Eo=function(t){if(ge(t))return t;throw To(K(t)+\" is not a constructor\")},Fo=D(\"Reflect\",\"construct\"),Mo=Object.prototype,Io=[].push,Lo=u((function(){function t(){}return!(Fo((function(){}),[],t)instanceof t)})),Co=!u((function(){Fo((function(){}))})),ko=Lo||Co;Ht({target:\"Reflect\",stat:!0,forced:ko,sham:ko},{construct:function(t,r){Eo(t),Bt(r);var e=arguments.length<3?t:Eo(arguments[2]);if(Co&&!Lo)return Fo(t,r,e);if(t==e){switch(r.length){case 0:return new t;case 1:return new t(r[0]);case 2:return new t(r[0],r[1]);case 3:return new t(r[0],r[1],r[2]);case 4:return new t(r[0],r[1],r[2],r[3])}var n=[null];return p(Io,n,r),new(p(Ao,t,n))}var o=e.prototype,i=Mr(k(o)?o:Mo),a=p(t,i,r);return k(a)?a:i}});var Ro=R.Reflect.construct;Ht({target:\"Function\",proto:!0,forced:Function.bind!==Ao},{bind:Ao});var zo=jn(\"Function\").bind,Do=Function.prototype,Bo=function(t){var r=t.bind;return t===Do||B(Do,t)&&r===Do.bind?zo:r};Ht({target:\"Object\",stat:!0},{setPrototypeOf:Jn});var No=R.Object.setPrototypeOf,Go=e((function(t){function r(e,n){return t.exports=r=No||function(t,r){return t.__proto__=r,t},t.exports.__esModule=!0,t.exports.default=t.exports,r(e,n)}t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports}));r(Go);var Uo=e((function(t){t.exports=function(){if(\"undefined\"==typeof Reflect||!Ro)return!1;if(Ro.sham)return!1;if(\"function\"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Ro(Boolean,[],(function(){}))),!0}catch(t){return!1}},t.exports.__esModule=!0,t.exports.default=t.exports}));r(Uo);var Vo=r(e((function(t){function r(e,n,o){return Uo()?(t.exports=r=Ro,t.exports.__esModule=!0,t.exports.default=t.exports):(t.exports=r=function(t,r,e){var n=[null];n.push.apply(n,r);var o=new(Bo(Function).apply(t,n));return e&&Go(o,e.prototype),o},t.exports.__esModule=!0,t.exports.default=t.exports),r.apply(null,arguments)}t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports}))),$o=r(e((function(t){t.exports=function(t,r){if(!(t instanceof r))throw new TypeError(\"Cannot call a class as a function\")},t.exports.__esModule=!0,t.exports.default=t.exports}))),Wo=wo,qo=r(e((function(t){function r(t,r){for(var e=0;e<r.length;e++){var n=r[e];n.enumerable=n.enumerable||!1,n.configurable=!0,\"value\"in n&&(n.writable=!0),Wo(t,n.key,n)}}t.exports=function(t,e,n){return e&&r(t.prototype,e),n&&r(t,n),Wo(t,\"prototype\",{writable:!1}),t},t.exports.__esModule=!0,t.exports.default=t.exports}))),Ho=r(e((function(t){t.exports=function(t,r,e){return r in t?Wo(t,r,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[r]=e,t},t.exports.__esModule=!0,t.exports.default=t.exports}))),Yo=ht(\"isConcatSpreadable\"),Jo=a.TypeError,Xo=W>=51||!u((function(){var t=[];return t[Yo]=!1,t.concat()[0]!==t})),Ko=wn(\"concat\"),Qo=function(t){if(!k(t))return!1;var r=t[Yo];return void 0!==r?!!r:se(t)};Ht({target:\"Array\",proto:!0,arity:1,forced:!Xo||!Ko},{concat:function(t){var r,e,n,o,i,a=it(this),u=Oe(a,0),c=0;for(r=-1,n=arguments.length;r<n;r++)if(Qo(i=-1===r?a:arguments[r])){if(c+(o=er(i))>9007199254740991)throw Jo(\"Maximum allowed index exceeded\");for(e=0;e<o;e++,c++)e in i&&Cr(u,c,i[e])}else{if(c>=9007199254740991)throw Jo(\"Maximum allowed index exceeded\");Cr(u,c++,i)}return u.length=c,u}});var Zo=jn(\"Array\").concat,ti=Array.prototype,ri=function(t){var r=t.concat;return t===ti||B(ti,t)&&r===ti.concat?Zo:r};var ei=function(){this.__data__=[],this.size=0};var ni=function(t,r){return t===r||t!=t&&r!=r};var oi=function(t,r){for(var e=t.length;e--;)if(ni(t[e][0],r))return e;return-1},ii=Array.prototype.splice;var ai=function(t){var r=this.__data__,e=oi(r,t);return!(e<0)&&(e==r.length-1?r.pop():ii.call(r,e,1),--this.size,!0)};var ui=function(t){var r=this.__data__,e=oi(r,t);return e<0?void 0:r[e][1]};var ci=function(t){return oi(this.__data__,t)>-1};var fi=function(t,r){var e=this.__data__,n=oi(e,t);return n<0?(++this.size,e.push([t,r])):e[n][1]=r,this};function si(t){var r=-1,e=null==t?0:t.length;for(this.clear();++r<e;){var n=t[r];this.set(n[0],n[1])}}si.prototype.clear=ei,si.prototype.delete=ai,si.prototype.get=ui,si.prototype.has=ci,si.prototype.set=fi;var li=si;var pi=function(){this.__data__=new li,this.size=0};var vi=function(t){var r=this.__data__,e=r.delete(t);return this.size=r.size,e};var yi=function(t){return this.__data__.get(t)};var di=function(t){return this.__data__.has(t)},hi=\"object\"==typeof t&&t&&t.Object===Object&&t,bi=\"object\"==typeof self&&self&&self.Object===Object&&self,mi=hi||bi||Function(\"return this\")(),gi=mi.Symbol,wi=Object.prototype,_i=wi.hasOwnProperty,Oi=wi.toString,ji=gi?gi.toStringTag:void 0;var Si=function(t){var r=_i.call(t,ji),e=t[ji];try{t[ji]=void 0;var n=!0}catch(t){}var o=Oi.call(t);return n&&(r?t[ji]=e:delete t[ji]),o},Pi=Object.prototype.toString;var xi=function(t){return Pi.call(t)},Ai=gi?gi.toStringTag:void 0;var Ti=function(t){return null==t?void 0===t?\"[object Undefined]\":\"[object Null]\":Ai&&Ai in Object(t)?Si(t):xi(t)};var Ei=function(t){var r=typeof t;return null!=t&&(\"object\"==r||\"function\"==r)};var Fi=function(t){if(!Ei(t))return!1;var r=Ti(t);return\"[object Function]\"==r||\"[object GeneratorFunction]\"==r||\"[object AsyncFunction]\"==r||\"[object Proxy]\"==r},Mi=mi[\"__core-js_shared__\"],Ii=function(){var t=/[^.]+$/.exec(Mi&&Mi.keys&&Mi.keys.IE_PROTO||\"\");return t?\"Symbol(src)_1.\"+t:\"\"}();var Li=function(t){return!!Ii&&Ii in t},Ci=Function.prototype.toString;var ki=function(t){if(null!=t){try{return Ci.call(t)}catch(t){}try{return t+\"\"}catch(t){}}return\"\"},Ri=/^\\[object .+?Constructor\\]$/,zi=Function.prototype,Di=Object.prototype,Bi=zi.toString,Ni=Di.hasOwnProperty,Gi=RegExp(\"^\"+Bi.call(Ni).replace(/[\\\\^$.*+?()[\\]{}|]/g,\"\\\\$&\").replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g,\"$1.*?\")+\"$\");var Ui=function(t){return!(!Ei(t)||Li(t))&&(Fi(t)?Gi:Ri).test(ki(t))};var Vi=function(t,r){return null==t?void 0:t[r]};var $i=function(t,r){var e=Vi(t,r);return Ui(e)?e:void 0},Wi=$i(mi,\"Map\"),qi=$i(Object,\"create\");var Hi=function(){this.__data__=qi?qi(null):{},this.size=0};var Yi=function(t){var r=this.has(t)&&delete this.__data__[t];return this.size-=r?1:0,r},Ji=Object.prototype.hasOwnProperty;var Xi=function(t){var r=this.__data__;if(qi){var e=r[t];return\"__lodash_hash_undefined__\"===e?void 0:e}return Ji.call(r,t)?r[t]:void 0},Ki=Object.prototype.hasOwnProperty;var Qi=function(t){var r=this.__data__;return qi?void 0!==r[t]:Ki.call(r,t)};var Zi=function(t,r){var e=this.__data__;return this.size+=this.has(t)?0:1,e[t]=qi&&void 0===r?\"__lodash_hash_undefined__\":r,this};function ta(t){var r=-1,e=null==t?0:t.length;for(this.clear();++r<e;){var n=t[r];this.set(n[0],n[1])}}ta.prototype.clear=Hi,ta.prototype.delete=Yi,ta.prototype.get=Xi,ta.prototype.has=Qi,ta.prototype.set=Zi;var ra=ta;var ea=function(){this.size=0,this.__data__={hash:new ra,map:new(Wi||li),string:new ra}};var na=function(t){var r=typeof t;return\"string\"==r||\"number\"==r||\"symbol\"==r||\"boolean\"==r?\"__proto__\"!==t:null===t};var oa=function(t,r){var e=t.__data__;return na(r)?e[\"string\"==typeof r?\"string\":\"hash\"]:e.map};var ia=function(t){var r=oa(this,t).delete(t);return this.size-=r?1:0,r};var aa=function(t){return oa(this,t).get(t)};var ua=function(t){return oa(this,t).has(t)};var ca=function(t,r){var e=oa(this,t),n=e.size;return e.set(t,r),this.size+=e.size==n?0:1,this};function fa(t){var r=-1,e=null==t?0:t.length;for(this.clear();++r<e;){var n=t[r];this.set(n[0],n[1])}}fa.prototype.clear=ea,fa.prototype.delete=ia,fa.prototype.get=aa,fa.prototype.has=ua,fa.prototype.set=ca;var sa=fa;var la=function(t,r){var e=this.__data__;if(e instanceof li){var n=e.__data__;if(!Wi||n.length<199)return n.push([t,r]),this.size=++e.size,this;e=this.__data__=new sa(n)}return e.set(t,r),this.size=e.size,this};function pa(t){var r=this.__data__=new li(t);this.size=r.size}pa.prototype.clear=pi,pa.prototype.delete=vi,pa.prototype.get=yi,pa.prototype.has=di,pa.prototype.set=la;var va=pa,ya=function(){try{var t=$i(Object,\"defineProperty\");return t({},\"\",{}),t}catch(t){}}();var da=function(t,r,e){\"__proto__\"==r&&ya?ya(t,r,{configurable:!0,enumerable:!0,value:e,writable:!0}):t[r]=e};var ha=function(t,r,e){(void 0!==e&&!ni(t[r],e)||void 0===e&&!(r in t))&&da(t,r,e)};var ba=function(t){return function(r,e,n){for(var o=-1,i=Object(r),a=n(r),u=a.length;u--;){var c=a[t?u:++o];if(!1===e(i[c],c,i))break}return r}}(),ma=e((function(t,r){var e=r&&!r.nodeType&&r,n=e&&t&&!t.nodeType&&t,o=n&&n.exports===e?mi.Buffer:void 0,i=o?o.allocUnsafe:void 0;t.exports=function(t,r){if(r)return t.slice();var e=t.length,n=i?i(e):new t.constructor(e);return t.copy(n),n}})),ga=mi.Uint8Array;var wa=function(t){var r=new t.constructor(t.byteLength);return new ga(r).set(new ga(t)),r};var _a=function(t,r){var e=r?wa(t.buffer):t.buffer;return new t.constructor(e,t.byteOffset,t.length)};var Oa=function(t,r){var e=-1,n=t.length;for(r||(r=Array(n));++e<n;)r[e]=t[e];return r},ja=Object.create,Sa=function(){function t(){}return function(r){if(!Ei(r))return{};if(ja)return ja(r);t.prototype=r;var e=new t;return t.prototype=void 0,e}}();var Pa=function(t,r){return function(e){return t(r(e))}}(Object.getPrototypeOf,Object),xa=Object.prototype;var Aa=function(t){var r=t&&t.constructor;return t===(\"function\"==typeof r&&r.prototype||xa)};var Ta=function(t){return\"function\"!=typeof t.constructor||Aa(t)?{}:Sa(Pa(t))};var Ea=function(t){return null!=t&&\"object\"==typeof t};var Fa=function(t){return Ea(t)&&\"[object Arguments]\"==Ti(t)},Ma=Object.prototype,Ia=Ma.hasOwnProperty,La=Ma.propertyIsEnumerable,Ca=Fa(function(){return arguments}())?Fa:function(t){return Ea(t)&&Ia.call(t,\"callee\")&&!La.call(t,\"callee\")},ka=Array.isArray;var Ra=function(t){return\"number\"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991};var za=function(t){return null!=t&&Ra(t.length)&&!Fi(t)};var Da=function(t){return Ea(t)&&za(t)};var Ba=function(){return!1},Na=e((function(t,r){var e=r&&!r.nodeType&&r,n=e&&t&&!t.nodeType&&t,o=n&&n.exports===e?mi.Buffer:void 0,i=(o?o.isBuffer:void 0)||Ba;t.exports=i})),Ga=Function.prototype,Ua=Object.prototype,Va=Ga.toString,$a=Ua.hasOwnProperty,Wa=Va.call(Object);var qa=function(t){if(!Ea(t)||\"[object Object]\"!=Ti(t))return!1;var r=Pa(t);if(null===r)return!0;var e=$a.call(r,\"constructor\")&&r.constructor;return\"function\"==typeof e&&e instanceof e&&Va.call(e)==Wa},Ha={};Ha[\"[object Float32Array]\"]=Ha[\"[object Float64Array]\"]=Ha[\"[object Int8Array]\"]=Ha[\"[object Int16Array]\"]=Ha[\"[object Int32Array]\"]=Ha[\"[object Uint8Array]\"]=Ha[\"[object Uint8ClampedArray]\"]=Ha[\"[object Uint16Array]\"]=Ha[\"[object Uint32Array]\"]=!0,Ha[\"[object Arguments]\"]=Ha[\"[object Array]\"]=Ha[\"[object ArrayBuffer]\"]=Ha[\"[object Boolean]\"]=Ha[\"[object DataView]\"]=Ha[\"[object Date]\"]=Ha[\"[object Error]\"]=Ha[\"[object Function]\"]=Ha[\"[object Map]\"]=Ha[\"[object Number]\"]=Ha[\"[object Object]\"]=Ha[\"[object RegExp]\"]=Ha[\"[object Set]\"]=Ha[\"[object String]\"]=Ha[\"[object WeakMap]\"]=!1;var Ya=function(t){return Ea(t)&&Ra(t.length)&&!!Ha[Ti(t)]};var Ja=function(t){return function(r){return t(r)}},Xa=e((function(t,r){var e=r&&!r.nodeType&&r,n=e&&t&&!t.nodeType&&t,o=n&&n.exports===e&&hi.process,i=function(){try{var t=n&&n.require&&n.require(\"util\").types;return t||o&&o.binding&&o.binding(\"util\")}catch(t){}}();t.exports=i})),Ka=Xa&&Xa.isTypedArray,Qa=Ka?Ja(Ka):Ya;var Za=function(t,r){if((\"constructor\"!==r||\"function\"!=typeof t[r])&&\"__proto__\"!=r)return t[r]},tu=Object.prototype.hasOwnProperty;var ru=function(t,r,e){var n=t[r];tu.call(t,r)&&ni(n,e)&&(void 0!==e||r in t)||da(t,r,e)};var eu=function(t,r,e,n){var o=!e;e||(e={});for(var i=-1,a=r.length;++i<a;){var u=r[i],c=n?n(e[u],t[u],u,e,t):void 0;void 0===c&&(c=t[u]),o?da(e,u,c):ru(e,u,c)}return e};var nu=function(t,r){for(var e=-1,n=Array(t);++e<t;)n[e]=r(e);return n},ou=/^(?:0|[1-9]\\d*)$/;var iu=function(t,r){var e=typeof t;return!!(r=null==r?9007199254740991:r)&&(\"number\"==e||\"symbol\"!=e&&ou.test(t))&&t>-1&&t%1==0&&t<r},au=Object.prototype.hasOwnProperty;var uu=function(t,r){var e=ka(t),n=!e&&Ca(t),o=!e&&!n&&Na(t),i=!e&&!n&&!o&&Qa(t),a=e||n||o||i,u=a?nu(t.length,String):[],c=u.length;for(var f in t)!r&&!au.call(t,f)||a&&(\"length\"==f||o&&(\"offset\"==f||\"parent\"==f)||i&&(\"buffer\"==f||\"byteLength\"==f||\"byteOffset\"==f)||iu(f,c))||u.push(f);return u};var cu=function(t){var r=[];if(null!=t)for(var e in Object(t))r.push(e);return r},fu=Object.prototype.hasOwnProperty;var su=function(t){if(!Ei(t))return cu(t);var r=Aa(t),e=[];for(var n in t)(\"constructor\"!=n||!r&&fu.call(t,n))&&e.push(n);return e};var lu=function(t){return za(t)?uu(t,!0):su(t)};var pu=function(t){return eu(t,lu(t))};var vu=function(t,r,e,n,o,i,a){var u=Za(t,e),c=Za(r,e),f=a.get(c);if(f)ha(t,e,f);else{var s=i?i(u,c,e+\"\",t,r,a):void 0,l=void 0===s;if(l){var p=ka(c),v=!p&&Na(c),y=!p&&!v&&Qa(c);s=c,p||v||y?ka(u)?s=u:Da(u)?s=Oa(u):v?(l=!1,s=ma(c,!0)):y?(l=!1,s=_a(c,!0)):s=[]:qa(c)||Ca(c)?(s=u,Ca(u)?s=pu(u):Ei(u)&&!Fi(u)||(s=Ta(c))):l=!1}l&&(a.set(c,s),o(s,c,n,i,a),a.delete(c)),ha(t,e,s)}};var yu=function t(r,e,n,o,i){r!==e&&ba(e,(function(a,u){if(i||(i=new va),Ei(a))vu(r,e,u,n,t,o,i);else{var c=o?o(Za(r,u),a,u+\"\",r,e,i):void 0;void 0===c&&(c=a),ha(r,u,c)}}),lu)};var du=function(t){return t};var hu=function(t,r,e){switch(e.length){case 0:return t.call(r);case 1:return t.call(r,e[0]);case 2:return t.call(r,e[0],e[1]);case 3:return t.call(r,e[0],e[1],e[2])}return t.apply(r,e)},bu=Math.max;var mu=function(t,r,e){return r=bu(void 0===r?t.length-1:r,0),function(){for(var n=arguments,o=-1,i=bu(n.length-r,0),a=Array(i);++o<i;)a[o]=n[r+o];o=-1;for(var u=Array(r+1);++o<r;)u[o]=n[o];return u[r]=e(a),hu(t,this,u)}};var gu=function(t){return function(){return t}},wu=ya?function(t,r){return ya(t,\"toString\",{configurable:!0,enumerable:!1,value:gu(r),writable:!0})}:du,_u=Date.now;var Ou=function(t){var r=0,e=0;return function(){var n=_u(),o=16-(n-e);if(e=n,o>0){if(++r>=800)return arguments[0]}else r=0;return t.apply(void 0,arguments)}}(wu);var ju=function(t,r){return Ou(mu(t,r,du),t+\"\")};var Su=function(t,r,e){if(!Ei(e))return!1;var n=typeof r;return!!(\"number\"==n?za(e)&&iu(r,e.length):\"string\"==n&&r in e)&&ni(e[r],t)};var Pu=function(t){return ju((function(r,e){var n=-1,o=e.length,i=o>1?e[o-1]:void 0,a=o>2?e[2]:void 0;for(i=t.length>3&&\"function\"==typeof i?(o--,i):void 0,a&&Su(e[0],e[1],a)&&(i=o<3?void 0:i,o=1),r=Object(r);++n<o;){var u=e[n];u&&t(r,u,n,i)}return r}))}((function(t,r,e,n){yu(t,r,e,n)}));function xu(t,r){var e=pr(t);if(mn){var n=mn(t);r&&(n=xn(n).call(n,(function(r){return In(t,r).enumerable}))),e.push.apply(e,n)}return e}function Au(t){for(var r=1;r<arguments.length;r++){var e,n,o=null!=arguments[r]?arguments[r]:{};r%2?po(e=xu(Object(o),!0)).call(e,(function(r){Ho(t,r,o[r])})):ho?mo(t,ho(o)):po(n=xu(Object(o))).call(n,(function(r){_o(t,r,In(o,r))}))}return t}var Tu={theme:\"default\",altFontFamily:\"sans-serif\",fontFamily:\"sans-serif\",themeCSS:\".label foreignObject { font-size: 90%; overflow: visible; } .label { font-family: sans-serif; }\",flowchart:{useMaxWidth:!1},sequence:{useMaxWidth:!1},startOnLoad:!1,logLevel:5},Eu=function(){function t(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};$o(this,t),Ho(this,\"mermaidAPIRefs\",null),Ho(this,\"options\",Tu),Ho(this,\"dom\",null),Ho(this,\"mermaidCanvas\",null);var e=r.mermaid,n=r.mermaidAPI;if(!(n||window.mermaidAPI||e&&e.mermaidAPI||window.mermaid&&window.mermaid.mermaidAPI))throw new Error(\"code-block-mermaid-plugin[init]: Package mermaid or mermaidAPI not found.\");this.options=Au(Au({},Tu),r||{}),this.mermaidAPIRefs=n||window.mermaidAPI||e.mermaidAPI||window.mermaid.mermaidAPI,delete this.options.mermaid,delete this.options.mermaidAPI,this.mermaidAPIRefs.initialize(this.options)}return qo(t,[{key:\"mountMermaidCanvas\",value:function(t){this.mermaidCanvas&&document.body.contains(this.mermaidCanvas)||(this.mermaidCanvas=document.createElement(\"div\"),this.mermaidCanvas.style=\"width:1024px;opacity:0;position:fixed;top:100%;\",(t.$cherry.wrapperDom||document.body).appendChild(this.mermaidCanvas))}},{key:\"convertMermaidSvgToImg\",value:function(t,r){var e,n=new DOMParser,o=function(t){return t.replace(\"<svg \",'<svg style=\"max-width:100%;height:auto;font-family:sans-serif;\" ')};try{var i=n.parseFromString(t,\"image/svg+xml\"),a=i.documentElement;if(\"svg\"===a.tagName.toLowerCase()){a.style.maxWidth=\"100%\",a.style.height=\"auto\",a.style.fontFamily=\"sans-serif\";var u,c=document.getElementById(r).getBBox();if(a.hasAttribute(\"viewBox\"))c=a.viewBox.baseVal;else a.setAttribute(\"viewBox\",ri(u=\"0 0 \".concat(c.width,\" \")).call(u,c.height));\"100%\"===a.getAttribute(\"width\")&&a.setAttribute(\"width\",\"\".concat(c.width)),\"100%\"===a.getAttribute(\"height\")&&a.setAttribute(\"height\",\"\".concat(c.height)),e=i.documentElement.outerHTML}else e=o(t)}catch(r){e=o(t)}return e}},{key:\"render\",value:function(t,r,e){var n,o,i=this,a=r;a||(a=Math.round(1e8*Math.random())),this.mountMermaidCanvas(e);var u=ri(n=\"mermaid-\".concat(a,\"-\")).call(n,(new Date).getTime());try{this.mermaidAPIRefs.render(u,t,(function(t){var r=t.replace(/\\s*markerUnits=\"0\"/g,\"\").replace(/\\s*x=\"NaN\"/g,\"\").replace(/<br>/g,\"<br/>\");o=i.convertMermaidSvgToImg(r,u)}),this.mermaidCanvas)}catch(t){return!1}return o}}],[{key:\"install\",value:function(r){for(var e=arguments.length,n=new Array(e>1?e-1:0),o=1;o<e;o++)n[o-1]=arguments[o];Pu(r,{engine:{syntax:{codeBlock:{customRenderer:{mermaid:Vo(t,n)}}}}})}}]),t}();return Ho(Eu,\"TYPE\",\"figure\"),Eu}));\n"
  },
  {
    "path": "static/cherry/addons/cherry-code-block-plantuml-plugin.d.ts",
    "content": "export default class PlantUMLCodeEngine {\n    static install(cherryOptions: any, args: any): void;\n    constructor(plantUMLOptions?: {});\n    baseUrl: any;\n    render(src: any, sign: any): string;\n}\n"
  },
  {
    "path": "static/cherry/addons/cherry-code-block-plantuml-plugin.js",
    "content": "!function(t,r){\"object\"==typeof exports&&\"undefined\"!=typeof module?module.exports=r():\"function\"==typeof define&&define.amd?define(r):(t=t||self).CherryCodeBlockPlantumlPlugin=r()}(this,(function(){\"use strict\";var t=\"undefined\"!=typeof globalThis?globalThis:\"undefined\"!=typeof window?window:\"undefined\"!=typeof global?global:\"undefined\"!=typeof self?self:{};function r(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,\"default\")?t.default:t}function e(t,r){return t(r={exports:{}},r.exports),r.exports}var n,o,i=function(t){return t&&t.Math==Math&&t},a=i(\"object\"==typeof globalThis&&globalThis)||i(\"object\"==typeof window&&window)||i(\"object\"==typeof self&&self)||i(\"object\"==typeof t&&t)||function(){return this}()||Function(\"return this\")(),u=function(t){try{return!!t()}catch(t){return!0}},c=!u((function(){var t=function(){}.bind();return\"function\"!=typeof t||t.hasOwnProperty(\"prototype\")})),f=Function.prototype,l=f.apply,s=f.call,p=\"object\"==typeof Reflect&&Reflect.apply||(c?s.bind(l):function(){return s.apply(l,arguments)}),v=Function.prototype,y=v.bind,d=v.call,h=c&&y.bind(d,d),b=c?function(t){return t&&h(t)}:function(t){return t&&function(){return d.apply(t,arguments)}},g=function(t){return\"function\"==typeof t},m=!u((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),_=Function.prototype.call,w=c?_.bind(_):function(){return _.apply(_,arguments)},O={}.propertyIsEnumerable,j=Object.getOwnPropertyDescriptor,S={f:j&&!O.call({1:2},1)?function(t){var r=j(this,t);return!!r&&r.enumerable}:O},x=function(t,r){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:r}},A=b({}.toString),P=b(\"\".slice),T=function(t){return P(A(t),8,-1)},E=a.Object,C=b(\"\".split),F=u((function(){return!E(\"z\").propertyIsEnumerable(0)}))?function(t){return\"String\"==T(t)?C(t,\"\"):E(t)}:E,L=a.TypeError,k=function(t){if(null==t)throw L(\"Can't call method on \"+t);return t},M=function(t){return F(k(t))},I=function(t){return\"object\"==typeof t?null!==t:g(t)},z={},D=function(t){return g(t)?t:void 0},R=function(t,r){return arguments.length<2?D(z[t])||D(a[t]):z[t]&&z[t][r]||a[t]&&a[t][r]},N=b({}.isPrototypeOf),G=R(\"navigator\",\"userAgent\")||\"\",U=a.process,B=a.Deno,$=U&&U.versions||B&&B.version,V=$&&$.v8;V&&(o=(n=V.split(\".\"))[0]>0&&n[0]<4?1:+(n[0]+n[1])),!o&&G&&(!(n=G.match(/Edge\\/(\\d+)/))||n[1]>=74)&&(n=G.match(/Chrome\\/(\\d+)/))&&(o=+n[1]);var W=o,q=!!Object.getOwnPropertySymbols&&!u((function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&W&&W<41})),H=q&&!Symbol.sham&&\"symbol\"==typeof Symbol.iterator,Y=a.Object,J=H?function(t){return\"symbol\"==typeof t}:function(t){var r=R(\"Symbol\");return g(r)&&N(r.prototype,Y(t))},X=a.String,K=function(t){try{return X(t)}catch(t){return\"Object\"}},Q=a.TypeError,Z=function(t){if(g(t))return t;throw Q(K(t)+\" is not a function\")},tt=a.TypeError,rt=Object.defineProperty,et=a[\"__core-js_shared__\"]||function(t,r){try{rt(a,t,{value:r,configurable:!0,writable:!0})}catch(e){a[t]=r}return r}(\"__core-js_shared__\",{}),nt=e((function(t){(t.exports=function(t,r){return et[t]||(et[t]=void 0!==r?r:{})})(\"versions\",[]).push({version:\"3.22.6\",mode:\"pure\",copyright:\"© 2014-2022 Denis Pushkarev (zloirock.ru)\",license:\"https://github.com/zloirock/core-js/blob/v3.22.6/LICENSE\",source:\"https://github.com/zloirock/core-js\"})})),ot=a.Object,it=function(t){return ot(k(t))},at=b({}.hasOwnProperty),ut=Object.hasOwn||function(t,r){return at(it(t),r)},ct=0,ft=Math.random(),lt=b(1..toString),st=function(t){return\"Symbol(\"+(void 0===t?\"\":t)+\")_\"+lt(++ct+ft,36)},pt=nt(\"wks\"),vt=a.Symbol,yt=vt&&vt.for,dt=H?vt:vt&&vt.withoutSetter||st,ht=function(t){if(!ut(pt,t)||!q&&\"string\"!=typeof pt[t]){var r=\"Symbol.\"+t;q&&ut(vt,t)?pt[t]=vt[t]:pt[t]=H&&yt?yt(r):dt(r)}return pt[t]},bt=a.TypeError,gt=ht(\"toPrimitive\"),mt=function(t,r){if(!I(t)||J(t))return t;var e,n,o=null==(e=t[gt])?void 0:Z(e);if(o){if(void 0===r&&(r=\"default\"),n=w(o,t,r),!I(n)||J(n))return n;throw bt(\"Can't convert object to primitive value\")}return void 0===r&&(r=\"number\"),function(t,r){var e,n;if(\"string\"===r&&g(e=t.toString)&&!I(n=w(e,t)))return n;if(g(e=t.valueOf)&&!I(n=w(e,t)))return n;if(\"string\"!==r&&g(e=t.toString)&&!I(n=w(e,t)))return n;throw tt(\"Can't convert object to primitive value\")}(t,r)},_t=function(t){var r=mt(t,\"string\");return J(r)?r:r+\"\"},wt=a.document,Ot=I(wt)&&I(wt.createElement),jt=function(t){return Ot?wt.createElement(t):{}},St=!m&&!u((function(){return 7!=Object.defineProperty(jt(\"div\"),\"a\",{get:function(){return 7}}).a})),xt=Object.getOwnPropertyDescriptor,At={f:m?xt:function(t,r){if(t=M(t),r=_t(r),St)try{return xt(t,r)}catch(t){}if(ut(t,r))return x(!w(S.f,t,r),t[r])}},Pt=/#|\\.prototype\\./,Tt=function(t,r){var e=Ct[Et(t)];return e==Lt||e!=Ft&&(g(r)?u(r):!!r)},Et=Tt.normalize=function(t){return String(t).replace(Pt,\".\").toLowerCase()},Ct=Tt.data={},Ft=Tt.NATIVE=\"N\",Lt=Tt.POLYFILL=\"P\",kt=Tt,Mt=b(b.bind),It=function(t,r){return Z(t),void 0===r?t:c?Mt(t,r):function(){return t.apply(r,arguments)}},zt=m&&u((function(){return 42!=Object.defineProperty((function(){}),\"prototype\",{value:42,writable:!1}).prototype})),Dt=a.String,Rt=a.TypeError,Nt=function(t){if(I(t))return t;throw Rt(Dt(t)+\" is not an object\")},Gt=a.TypeError,Ut=Object.defineProperty,Bt=Object.getOwnPropertyDescriptor,$t={f:m?zt?function(t,r,e){if(Nt(t),r=_t(r),Nt(e),\"function\"==typeof t&&\"prototype\"===r&&\"value\"in e&&\"writable\"in e&&!e.writable){var n=Bt(t,r);n&&n.writable&&(t[r]=e.value,e={configurable:\"configurable\"in e?e.configurable:n.configurable,enumerable:\"enumerable\"in e?e.enumerable:n.enumerable,writable:!1})}return Ut(t,r,e)}:Ut:function(t,r,e){if(Nt(t),r=_t(r),Nt(e),St)try{return Ut(t,r,e)}catch(t){}if(\"get\"in e||\"set\"in e)throw Gt(\"Accessors not supported\");return\"value\"in e&&(t[r]=e.value),t}},Vt=m?function(t,r,e){return $t.f(t,r,x(1,e))}:function(t,r,e){return t[r]=e,t},Wt=At.f,qt=function(t){var r=function(e,n,o){if(this instanceof r){switch(arguments.length){case 0:return new t;case 1:return new t(e);case 2:return new t(e,n)}return new t(e,n,o)}return p(t,this,arguments)};return r.prototype=t.prototype,r},Ht=function(t,r){var e,n,o,i,u,c,f,l,s=t.target,p=t.global,v=t.stat,y=t.proto,d=p?a:v?a[s]:(a[s]||{}).prototype,h=p?z:z[s]||Vt(z,s,{})[s],m=h.prototype;for(o in r)e=!kt(p?o:s+(v?\".\":\"#\")+o,t.forced)&&d&&ut(d,o),u=h[o],e&&(c=t.dontCallGetSet?(l=Wt(d,o))&&l.value:d[o]),i=e&&c?c:r[o],e&&typeof u==typeof i||(f=t.bind&&e?It(i,a):t.wrap&&e?qt(i):y&&g(i)?b(i):i,(t.sham||i&&i.sham||u&&u.sham)&&Vt(f,\"sham\",!0),Vt(h,o,f),y&&(ut(z,n=s+\"Prototype\")||Vt(z,n,{}),Vt(z[n],o,i),t.real&&m&&!m[o]&&Vt(m,o,i)))},Yt=Math.ceil,Jt=Math.floor,Xt=Math.trunc||function(t){var r=+t;return(r>0?Jt:Yt)(r)},Kt=function(t){var r=+t;return r!=r||0===r?0:Xt(r)},Qt=Math.max,Zt=Math.min,tr=function(t,r){var e=Kt(t);return e<0?Qt(e+r,0):Zt(e,r)},rr=Math.min,er=function(t){return(r=t.length)>0?rr(Kt(r),9007199254740991):0;var r},nr=function(t){return function(r,e,n){var o,i=M(r),a=er(i),u=tr(n,a);if(t&&e!=e){for(;a>u;)if((o=i[u++])!=o)return!0}else for(;a>u;u++)if((t||u in i)&&i[u]===e)return t||u||0;return!t&&-1}},or={includes:nr(!0),indexOf:nr(!1)},ir={},ar=or.indexOf,ur=b([].push),cr=function(t,r){var e,n=M(t),o=0,i=[];for(e in n)!ut(ir,e)&&ut(n,e)&&ur(i,e);for(;r.length>o;)ut(n,e=r[o++])&&(~ar(i,e)||ur(i,e));return i},fr=[\"constructor\",\"hasOwnProperty\",\"isPrototypeOf\",\"propertyIsEnumerable\",\"toLocaleString\",\"toString\",\"valueOf\"],lr=Object.keys||function(t){return cr(t,fr)},sr=u((function(){lr(1)}));Ht({target:\"Object\",stat:!0,forced:sr},{keys:function(t){return lr(it(t))}});var pr=z.Object.keys,vr={};vr[ht(\"toStringTag\")]=\"z\";var yr,dr=\"[object z]\"===String(vr),hr=ht(\"toStringTag\"),br=a.Object,gr=\"Arguments\"==T(function(){return arguments}()),mr=dr?T:function(t){var r,e,n;return void 0===t?\"Undefined\":null===t?\"Null\":\"string\"==typeof(e=function(t,r){try{return t[r]}catch(t){}}(r=br(t),hr))?e:gr?T(r):\"Object\"==(n=T(r))&&g(r.callee)?\"Arguments\":n},_r=a.String,wr=function(t){if(\"Symbol\"===mr(t))throw TypeError(\"Cannot convert a Symbol value to a string\");return _r(t)},Or={f:m&&!zt?Object.defineProperties:function(t,r){Nt(t);for(var e,n=M(r),o=lr(r),i=o.length,a=0;i>a;)$t.f(t,e=o[a++],n[e]);return t}},jr=R(\"document\",\"documentElement\"),Sr=nt(\"keys\"),xr=function(t){return Sr[t]||(Sr[t]=st(t))},Ar=xr(\"IE_PROTO\"),Pr=function(){},Tr=function(t){return\"<script>\"+t+\"<\\/script>\"},Er=function(t){t.write(Tr(\"\")),t.close();var r=t.parentWindow.Object;return t=null,r},Cr=function(){try{yr=new ActiveXObject(\"htmlfile\")}catch(t){}var t,r;Cr=\"undefined\"!=typeof document?document.domain&&yr?Er(yr):((r=jt(\"iframe\")).style.display=\"none\",jr.appendChild(r),r.src=String(\"javascript:\"),(t=r.contentWindow.document).open(),t.write(Tr(\"document.F=Object\")),t.close(),t.F):Er(yr);for(var e=fr.length;e--;)delete Cr.prototype[fr[e]];return Cr()};ir[Ar]=!0;var Fr=Object.create||function(t,r){var e;return null!==t?(Pr.prototype=Nt(t),e=new Pr,Pr.prototype=null,e[Ar]=t):e=Cr(),void 0===r?e:Or.f(e,r)},Lr=fr.concat(\"length\",\"prototype\"),kr={f:Object.getOwnPropertyNames||function(t){return cr(t,Lr)}},Mr=function(t,r,e){var n=_t(r);n in t?$t.f(t,n,x(0,e)):t[n]=e},Ir=a.Array,zr=Math.max,Dr=kr.f,Rr=\"object\"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],Nr=function(t){try{return Dr(t)}catch(t){return function(t,r,e){for(var n=er(t),o=tr(r,n),i=tr(void 0===e?n:e,n),a=Ir(zr(i-o,0)),u=0;o<i;o++,u++)Mr(a,u,t[o]);return a.length=u,a}(Rr)}},Gr={f:function(t){return Rr&&\"Window\"==T(t)?Nr(t):Dr(M(t))}},Ur={f:Object.getOwnPropertySymbols},Br=function(t,r,e,n){return n&&n.enumerable?t[r]=e:Vt(t,r,e),t},$r={f:ht},Vr=$t.f,Wr=dr?{}.toString:function(){return\"[object \"+mr(this)+\"]\"},qr=$t.f,Hr=ht(\"toStringTag\"),Yr=function(t,r,e,n){if(t){var o=e?t:t.prototype;ut(o,Hr)||qr(o,Hr,{configurable:!0,value:r}),n&&!dr&&Vt(o,\"toString\",Wr)}},Jr=b(Function.toString);g(et.inspectSource)||(et.inspectSource=function(t){return Jr(t)});var Xr,Kr,Qr,Zr=et.inspectSource,te=a.WeakMap,re=g(te)&&/native code/.test(Zr(te)),ee=a.TypeError,ne=a.WeakMap;if(re||et.state){var oe=et.state||(et.state=new ne),ie=b(oe.get),ae=b(oe.has),ue=b(oe.set);Xr=function(t,r){if(ae(oe,t))throw new ee(\"Object already initialized\");return r.facade=t,ue(oe,t,r),r},Kr=function(t){return ie(oe,t)||{}},Qr=function(t){return ae(oe,t)}}else{var ce=xr(\"state\");ir[ce]=!0,Xr=function(t,r){if(ut(t,ce))throw new ee(\"Object already initialized\");return r.facade=t,Vt(t,ce,r),r},Kr=function(t){return ut(t,ce)?t[ce]:{}},Qr=function(t){return ut(t,ce)}}var fe={set:Xr,get:Kr,has:Qr,enforce:function(t){return Qr(t)?Kr(t):Xr(t,{})},getterFor:function(t){return function(r){var e;if(!I(r)||(e=Kr(r)).type!==t)throw ee(\"Incompatible receiver, \"+t+\" required\");return e}}},le=Array.isArray||function(t){return\"Array\"==T(t)},se=function(){},pe=[],ve=R(\"Reflect\",\"construct\"),ye=/^\\s*(?:class|function)\\b/,de=b(ye.exec),he=!ye.exec(se),be=function(t){if(!g(t))return!1;try{return ve(se,pe,t),!0}catch(t){return!1}},ge=function(t){if(!g(t))return!1;switch(mr(t)){case\"AsyncFunction\":case\"GeneratorFunction\":case\"AsyncGeneratorFunction\":return!1}try{return he||!!de(ye,Zr(t))}catch(t){return!0}};ge.sham=!0;var me=!ve||u((function(){var t;return be(be.call)||!be(Object)||!be((function(){t=!0}))||t}))?ge:be,_e=ht(\"species\"),we=a.Array,Oe=function(t,r){return new(function(t){var r;return le(t)&&(r=t.constructor,(me(r)&&(r===we||le(r.prototype))||I(r)&&null===(r=r[_e]))&&(r=void 0)),void 0===r?we:r}(t))(0===r?0:r)},je=b([].push),Se=function(t){var r=1==t,e=2==t,n=3==t,o=4==t,i=6==t,a=7==t,u=5==t||i;return function(c,f,l,s){for(var p,v,y=it(c),d=F(y),h=It(f,l),b=er(d),g=0,m=s||Oe,_=r?m(c,b):e||a?m(c,0):void 0;b>g;g++)if((u||g in d)&&(v=h(p=d[g],g,y),t))if(r)_[g]=v;else if(v)switch(t){case 3:return!0;case 5:return p;case 6:return g;case 2:je(_,p)}else switch(t){case 4:return!1;case 7:je(_,p)}return i?-1:n||o?o:_}},xe={forEach:Se(0),map:Se(1),filter:Se(2),some:Se(3),every:Se(4),find:Se(5),findIndex:Se(6),filterReject:Se(7)},Ae=xe.forEach,Pe=xr(\"hidden\"),Te=fe.set,Ee=fe.getterFor(\"Symbol\"),Ce=Object.prototype,Fe=a.Symbol,Le=Fe&&Fe.prototype,ke=a.TypeError,Me=a.QObject,Ie=At.f,ze=$t.f,De=Gr.f,Re=S.f,Ne=b([].push),Ge=nt(\"symbols\"),Ue=nt(\"op-symbols\"),Be=nt(\"wks\"),$e=!Me||!Me.prototype||!Me.prototype.findChild,Ve=m&&u((function(){return 7!=Fr(ze({},\"a\",{get:function(){return ze(this,\"a\",{value:7}).a}})).a}))?function(t,r,e){var n=Ie(Ce,r);n&&delete Ce[r],ze(t,r,e),n&&t!==Ce&&ze(Ce,r,n)}:ze,We=function(t,r){var e=Ge[t]=Fr(Le);return Te(e,{type:\"Symbol\",tag:t,description:r}),m||(e.description=r),e},qe=function(t,r,e){t===Ce&&qe(Ue,r,e),Nt(t);var n=_t(r);return Nt(e),ut(Ge,n)?(e.enumerable?(ut(t,Pe)&&t[Pe][n]&&(t[Pe][n]=!1),e=Fr(e,{enumerable:x(0,!1)})):(ut(t,Pe)||ze(t,Pe,x(1,{})),t[Pe][n]=!0),Ve(t,n,e)):ze(t,n,e)},He=function(t,r){Nt(t);var e=M(r),n=lr(e).concat(Ke(e));return Ae(n,(function(r){m&&!w(Ye,e,r)||qe(t,r,e[r])})),t},Ye=function(t){var r=_t(t),e=w(Re,this,r);return!(this===Ce&&ut(Ge,r)&&!ut(Ue,r))&&(!(e||!ut(this,r)||!ut(Ge,r)||ut(this,Pe)&&this[Pe][r])||e)},Je=function(t,r){var e=M(t),n=_t(r);if(e!==Ce||!ut(Ge,n)||ut(Ue,n)){var o=Ie(e,n);return!o||!ut(Ge,n)||ut(e,Pe)&&e[Pe][n]||(o.enumerable=!0),o}},Xe=function(t){var r=De(M(t)),e=[];return Ae(r,(function(t){ut(Ge,t)||ut(ir,t)||Ne(e,t)})),e},Ke=function(t){var r=t===Ce,e=De(r?Ue:M(t)),n=[];return Ae(e,(function(t){!ut(Ge,t)||r&&!ut(Ce,t)||Ne(n,Ge[t])})),n};q||(Le=(Fe=function(){if(N(Le,this))throw ke(\"Symbol is not a constructor\");var t=arguments.length&&void 0!==arguments[0]?wr(arguments[0]):void 0,r=st(t),e=function(t){this===Ce&&w(e,Ue,t),ut(this,Pe)&&ut(this[Pe],r)&&(this[Pe][r]=!1),Ve(this,r,x(1,t))};return m&&$e&&Ve(Ce,r,{configurable:!0,set:e}),We(r,t)}).prototype,Br(Le,\"toString\",(function(){return Ee(this).tag})),Br(Fe,\"withoutSetter\",(function(t){return We(st(t),t)})),S.f=Ye,$t.f=qe,Or.f=He,At.f=Je,kr.f=Gr.f=Xe,Ur.f=Ke,$r.f=function(t){return We(ht(t),t)},m&&ze(Le,\"description\",{configurable:!0,get:function(){return Ee(this).description}})),Ht({global:!0,constructor:!0,wrap:!0,forced:!q,sham:!q},{Symbol:Fe}),Ae(lr(Be),(function(t){!function(t){var r=z.Symbol||(z.Symbol={});ut(r,t)||Vr(r,t,{value:$r.f(t)})}(t)})),Ht({target:\"Symbol\",stat:!0,forced:!q},{useSetter:function(){$e=!0},useSimple:function(){$e=!1}}),Ht({target:\"Object\",stat:!0,forced:!q,sham:!m},{create:function(t,r){return void 0===r?Fr(t):He(Fr(t),r)},defineProperty:qe,defineProperties:He,getOwnPropertyDescriptor:Je}),Ht({target:\"Object\",stat:!0,forced:!q},{getOwnPropertyNames:Xe}),function(){var t=R(\"Symbol\"),r=t&&t.prototype,e=r&&r.valueOf,n=ht(\"toPrimitive\");r&&!r[n]&&Br(r,n,(function(t){return w(e,this)}),{arity:1})}(),Yr(Fe,\"Symbol\"),ir[Pe]=!0;var Qe=q&&!!Symbol.for&&!!Symbol.keyFor,Ze=nt(\"string-to-symbol-registry\"),tn=nt(\"symbol-to-string-registry\");Ht({target:\"Symbol\",stat:!0,forced:!Qe},{for:function(t){var r=wr(t);if(ut(Ze,r))return Ze[r];var e=R(\"Symbol\")(r);return Ze[r]=e,tn[e]=r,e}});var rn=nt(\"symbol-to-string-registry\");Ht({target:\"Symbol\",stat:!0,forced:!Qe},{keyFor:function(t){if(!J(t))throw TypeError(K(t)+\" is not a symbol\");if(ut(rn,t))return rn[t]}});var en=b([].slice),nn=R(\"JSON\",\"stringify\"),on=b(/./.exec),an=b(\"\".charAt),un=b(\"\".charCodeAt),cn=b(\"\".replace),fn=b(1..toString),ln=/[\\uD800-\\uDFFF]/g,sn=/^[\\uD800-\\uDBFF]$/,pn=/^[\\uDC00-\\uDFFF]$/,vn=!q||u((function(){var t=R(\"Symbol\")();return\"[null]\"!=nn([t])||\"{}\"!=nn({a:t})||\"{}\"!=nn(Object(t))})),yn=u((function(){return'\"\\\\udf06\\\\ud834\"'!==nn(\"\\udf06\\ud834\")||'\"\\\\udead\"'!==nn(\"\\udead\")})),dn=function(t,r){var e=en(arguments),n=r;if((I(r)||void 0!==t)&&!J(t))return le(r)||(r=function(t,r){if(g(n)&&(r=w(n,this,t,r)),!J(r))return r}),e[1]=r,p(nn,null,e)},hn=function(t,r,e){var n=an(e,r-1),o=an(e,r+1);return on(sn,t)&&!on(pn,o)||on(pn,t)&&!on(sn,n)?\"\\\\u\"+fn(un(t,0),16):t};nn&&Ht({target:\"JSON\",stat:!0,arity:3,forced:vn||yn},{stringify:function(t,r,e){var n=en(arguments),o=p(vn?dn:nn,null,n);return yn&&\"string\"==typeof o?cn(o,ln,hn):o}});var bn=!q||u((function(){Ur.f(1)}));Ht({target:\"Object\",stat:!0,forced:bn},{getOwnPropertySymbols:function(t){var r=Ur.f;return r?r(it(t)):[]}});var gn=z.Object.getOwnPropertySymbols,mn=ht(\"species\"),_n=function(t){return W>=51||!u((function(){var r=[];return(r.constructor={})[mn]=function(){return{foo:1}},1!==r[t](Boolean).foo}))},wn=xe.filter,On=_n(\"filter\");Ht({target:\"Array\",proto:!0,forced:!On},{filter:function(t){return wn(this,t,arguments.length>1?arguments[1]:void 0)}});var jn=function(t){return z[t+\"Prototype\"]},Sn=jn(\"Array\").filter,xn=Array.prototype,An=function(t){var r=t.filter;return t===xn||N(xn,t)&&r===xn.filter?Sn:r},Pn=At.f,Tn=u((function(){Pn(1)}));Ht({target:\"Object\",stat:!0,forced:!m||Tn,sham:!m},{getOwnPropertyDescriptor:function(t,r){return Pn(M(t),r)}});var En,Cn,Fn,Ln=e((function(t){var r=z.Object,e=t.exports=function(t,e){return r.getOwnPropertyDescriptor(t,e)};r.getOwnPropertyDescriptor.sham&&(e.sham=!0)})),kn=Function.prototype,Mn=m&&Object.getOwnPropertyDescriptor,In=ut(kn,\"name\"),zn={EXISTS:In,PROPER:In&&\"something\"===function(){}.name,CONFIGURABLE:In&&(!m||m&&Mn(kn,\"name\").configurable)},Dn=!u((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype})),Rn=xr(\"IE_PROTO\"),Nn=a.Object,Gn=Nn.prototype,Un=Dn?Nn.getPrototypeOf:function(t){var r=it(t);if(ut(r,Rn))return r[Rn];var e=r.constructor;return g(e)&&r instanceof e?e.prototype:r instanceof Nn?Gn:null},Bn=ht(\"iterator\"),$n=!1;[].keys&&(\"next\"in(Fn=[].keys())?(Cn=Un(Un(Fn)))!==Object.prototype&&(En=Cn):$n=!0);var Vn=null==En||u((function(){var t={};return En[Bn].call(t)!==t}));En=Vn?{}:Fr(En),g(En[Bn])||Br(En,Bn,(function(){return this}));var Wn={IteratorPrototype:En,BUGGY_SAFARI_ITERATORS:$n},qn=Wn.IteratorPrototype,Hn=a.String,Yn=a.TypeError,Jn=(Object.setPrototypeOf||\"__proto__\"in{}&&function(){var t,r=!1,e={};try{(t=b(Object.getOwnPropertyDescriptor(Object.prototype,\"__proto__\").set))(e,[]),r=e instanceof Array}catch(t){}}(),zn.PROPER),Xn=Wn.BUGGY_SAFARI_ITERATORS,Kn=ht(\"iterator\"),Qn=fe.set,Zn=fe.getterFor(\"Array Iterator\"),to=(function(t,r,e,n,o,i,a){!function(t,r,e,n){var o=r+\" Iterator\";t.prototype=Fr(qn,{next:x(+!n,e)}),Yr(t,o,!1,!0)}(e,r,n);var u,c,f,l=function(t){if(t===o&&d)return d;if(!Xn&&t in v)return v[t];switch(t){case\"keys\":case\"values\":case\"entries\":return function(){return new e(this,t)}}return function(){return new e(this)}},s=r+\" Iterator\",p=!1,v=t.prototype,y=v[Kn]||v[\"@@iterator\"]||o&&v[o],d=!Xn&&y||l(o),h=\"Array\"==r&&v.entries||y;if(h&&(u=Un(h.call(new t)))!==Object.prototype&&u.next&&Yr(u,s,!0,!0),Jn&&\"values\"==o&&y&&\"values\"!==y.name&&(p=!0,d=function(){return w(y,this)}),o)if(c={values:l(\"values\"),keys:i?d:l(\"keys\"),entries:l(\"entries\")},a)for(f in c)(Xn||p||!(f in v))&&Br(v,f,c[f]);else Ht({target:r,proto:!0,forced:Xn||p},c);a&&v[Kn]!==d&&Br(v,Kn,d,{name:o})}(Array,\"Array\",(function(t,r){Qn(this,{type:\"Array Iterator\",target:M(t),index:0,kind:r})}),(function(){var t=Zn(this),r=t.target,e=t.kind,n=t.index++;return!r||n>=r.length?(t.target=void 0,{value:void 0,done:!0}):\"keys\"==e?{value:n,done:!1}:\"values\"==e?{value:r[n],done:!1}:{value:[n,r[n]],done:!1}}),\"values\"),ht(\"toStringTag\"));for(var ro in{CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}){var eo=a[ro],no=eo&&eo.prototype;no&&mr(no)!==to&&Vt(no,to,ro)}var oo,io,ao=xe.forEach,uo=!!(io=[][\"forEach\"])&&u((function(){io.call(null,oo||function(){return 1},1)}))?[].forEach:function(t){return ao(this,t,arguments.length>1?arguments[1]:void 0)};Ht({target:\"Array\",proto:!0,forced:[].forEach!=uo},{forEach:uo});var co=jn(\"Array\").forEach,fo=Array.prototype,lo={DOMTokenList:!0,NodeList:!0},so=function(t){var r=t.forEach;return t===fo||N(fo,t)&&r===fo.forEach||ut(lo,mr(t))?co:r},po=b([].concat),vo=R(\"Reflect\",\"ownKeys\")||function(t){var r=kr.f(Nt(t)),e=Ur.f;return e?po(r,e(t)):r};Ht({target:\"Object\",stat:!0,sham:!m},{getOwnPropertyDescriptors:function(t){for(var r,e,n=M(t),o=At.f,i=vo(n),a={},u=0;i.length>u;)void 0!==(e=o(n,r=i[u++]))&&Mr(a,r,e);return a}});var yo=z.Object.getOwnPropertyDescriptors,ho=Or.f;Ht({target:\"Object\",stat:!0,forced:Object.defineProperties!==ho,sham:!m},{defineProperties:ho});var bo=e((function(t){var r=z.Object,e=t.exports=function(t,e){return r.defineProperties(t,e)};r.defineProperties.sham&&(e.sham=!0)})),go=$t.f;Ht({target:\"Object\",stat:!0,forced:Object.defineProperty!==go,sham:!m},{defineProperty:go});var mo=e((function(t){var r=z.Object,e=t.exports=function(t,e,n){return r.defineProperty(t,e,n)};r.defineProperty.sham&&(e.sham=!0)})),_o=mo,wo=mo,Oo=r(e((function(t){t.exports=function(t,r,e){return r in t?wo(t,r,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[r]=e,t},t.exports.__esModule=!0,t.exports.default=t.exports}))),jo=r(e((function(t){t.exports=function(t,r){if(!(t instanceof r))throw new TypeError(\"Cannot call a class as a function\")},t.exports.__esModule=!0,t.exports.default=t.exports}))),So=r(e((function(t){function r(t,r){for(var e=0;e<r.length;e++){var n=r[e];n.enumerable=n.enumerable||!1,n.configurable=!0,\"value\"in n&&(n.writable=!0),wo(t,n.key,n)}}t.exports=function(t,e,n){return e&&r(t.prototype,e),n&&r(t,n),wo(t,\"prototype\",{writable:!1}),t},t.exports.__esModule=!0,t.exports.default=t.exports}))),xo=ht(\"isConcatSpreadable\"),Ao=a.TypeError,Po=W>=51||!u((function(){var t=[];return t[xo]=!1,t.concat()[0]!==t})),To=_n(\"concat\"),Eo=function(t){if(!I(t))return!1;var r=t[xo];return void 0!==r?!!r:le(t)};Ht({target:\"Array\",proto:!0,arity:1,forced:!Po||!To},{concat:function(t){var r,e,n,o,i,a=it(this),u=Oe(a,0),c=0;for(r=-1,n=arguments.length;r<n;r++)if(Eo(i=-1===r?a:arguments[r])){if(c+(o=er(i))>9007199254740991)throw Ao(\"Maximum allowed index exceeded\");for(e=0;e<o;e++,c++)e in i&&Mr(u,c,i[e])}else{if(c>=9007199254740991)throw Ao(\"Maximum allowed index exceeded\");Mr(u,c++,i)}return u.length=c,u}});var Co=jn(\"Array\").concat,Fo=Array.prototype,Lo=function(t){var r=t.concat;return t===Fo||N(Fo,t)&&r===Fo.concat?Co:r};var ko=function(){this.__data__=[],this.size=0};var Mo=function(t,r){return t===r||t!=t&&r!=r};var Io=function(t,r){for(var e=t.length;e--;)if(Mo(t[e][0],r))return e;return-1},zo=Array.prototype.splice;var Do=function(t){var r=this.__data__,e=Io(r,t);return!(e<0)&&(e==r.length-1?r.pop():zo.call(r,e,1),--this.size,!0)};var Ro=function(t){var r=this.__data__,e=Io(r,t);return e<0?void 0:r[e][1]};var No=function(t){return Io(this.__data__,t)>-1};var Go=function(t,r){var e=this.__data__,n=Io(e,t);return n<0?(++this.size,e.push([t,r])):e[n][1]=r,this};function Uo(t){var r=-1,e=null==t?0:t.length;for(this.clear();++r<e;){var n=t[r];this.set(n[0],n[1])}}Uo.prototype.clear=ko,Uo.prototype.delete=Do,Uo.prototype.get=Ro,Uo.prototype.has=No,Uo.prototype.set=Go;var Bo=Uo;var $o=function(){this.__data__=new Bo,this.size=0};var Vo=function(t){var r=this.__data__,e=r.delete(t);return this.size=r.size,e};var Wo=function(t){return this.__data__.get(t)};var qo=function(t){return this.__data__.has(t)},Ho=\"object\"==typeof t&&t&&t.Object===Object&&t,Yo=\"object\"==typeof self&&self&&self.Object===Object&&self,Jo=Ho||Yo||Function(\"return this\")(),Xo=Jo.Symbol,Ko=Object.prototype,Qo=Ko.hasOwnProperty,Zo=Ko.toString,ti=Xo?Xo.toStringTag:void 0;var ri=function(t){var r=Qo.call(t,ti),e=t[ti];try{t[ti]=void 0;var n=!0}catch(t){}var o=Zo.call(t);return n&&(r?t[ti]=e:delete t[ti]),o},ei=Object.prototype.toString;var ni=function(t){return ei.call(t)},oi=Xo?Xo.toStringTag:void 0;var ii=function(t){return null==t?void 0===t?\"[object Undefined]\":\"[object Null]\":oi&&oi in Object(t)?ri(t):ni(t)};var ai=function(t){var r=typeof t;return null!=t&&(\"object\"==r||\"function\"==r)};var ui=function(t){if(!ai(t))return!1;var r=ii(t);return\"[object Function]\"==r||\"[object GeneratorFunction]\"==r||\"[object AsyncFunction]\"==r||\"[object Proxy]\"==r},ci=Jo[\"__core-js_shared__\"],fi=function(){var t=/[^.]+$/.exec(ci&&ci.keys&&ci.keys.IE_PROTO||\"\");return t?\"Symbol(src)_1.\"+t:\"\"}();var li=function(t){return!!fi&&fi in t},si=Function.prototype.toString;var pi=function(t){if(null!=t){try{return si.call(t)}catch(t){}try{return t+\"\"}catch(t){}}return\"\"},vi=/^\\[object .+?Constructor\\]$/,yi=Function.prototype,di=Object.prototype,hi=yi.toString,bi=di.hasOwnProperty,gi=RegExp(\"^\"+hi.call(bi).replace(/[\\\\^$.*+?()[\\]{}|]/g,\"\\\\$&\").replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g,\"$1.*?\")+\"$\");var mi=function(t){return!(!ai(t)||li(t))&&(ui(t)?gi:vi).test(pi(t))};var _i=function(t,r){return null==t?void 0:t[r]};var wi=function(t,r){var e=_i(t,r);return mi(e)?e:void 0},Oi=wi(Jo,\"Map\"),ji=wi(Object,\"create\");var Si=function(){this.__data__=ji?ji(null):{},this.size=0};var xi=function(t){var r=this.has(t)&&delete this.__data__[t];return this.size-=r?1:0,r},Ai=Object.prototype.hasOwnProperty;var Pi=function(t){var r=this.__data__;if(ji){var e=r[t];return\"__lodash_hash_undefined__\"===e?void 0:e}return Ai.call(r,t)?r[t]:void 0},Ti=Object.prototype.hasOwnProperty;var Ei=function(t){var r=this.__data__;return ji?void 0!==r[t]:Ti.call(r,t)};var Ci=function(t,r){var e=this.__data__;return this.size+=this.has(t)?0:1,e[t]=ji&&void 0===r?\"__lodash_hash_undefined__\":r,this};function Fi(t){var r=-1,e=null==t?0:t.length;for(this.clear();++r<e;){var n=t[r];this.set(n[0],n[1])}}Fi.prototype.clear=Si,Fi.prototype.delete=xi,Fi.prototype.get=Pi,Fi.prototype.has=Ei,Fi.prototype.set=Ci;var Li=Fi;var ki=function(){this.size=0,this.__data__={hash:new Li,map:new(Oi||Bo),string:new Li}};var Mi=function(t){var r=typeof t;return\"string\"==r||\"number\"==r||\"symbol\"==r||\"boolean\"==r?\"__proto__\"!==t:null===t};var Ii=function(t,r){var e=t.__data__;return Mi(r)?e[\"string\"==typeof r?\"string\":\"hash\"]:e.map};var zi=function(t){var r=Ii(this,t).delete(t);return this.size-=r?1:0,r};var Di=function(t){return Ii(this,t).get(t)};var Ri=function(t){return Ii(this,t).has(t)};var Ni=function(t,r){var e=Ii(this,t),n=e.size;return e.set(t,r),this.size+=e.size==n?0:1,this};function Gi(t){var r=-1,e=null==t?0:t.length;for(this.clear();++r<e;){var n=t[r];this.set(n[0],n[1])}}Gi.prototype.clear=ki,Gi.prototype.delete=zi,Gi.prototype.get=Di,Gi.prototype.has=Ri,Gi.prototype.set=Ni;var Ui=Gi;var Bi=function(t,r){var e=this.__data__;if(e instanceof Bo){var n=e.__data__;if(!Oi||n.length<199)return n.push([t,r]),this.size=++e.size,this;e=this.__data__=new Ui(n)}return e.set(t,r),this.size=e.size,this};function $i(t){var r=this.__data__=new Bo(t);this.size=r.size}$i.prototype.clear=$o,$i.prototype.delete=Vo,$i.prototype.get=Wo,$i.prototype.has=qo,$i.prototype.set=Bi;var Vi=$i,Wi=function(){try{var t=wi(Object,\"defineProperty\");return t({},\"\",{}),t}catch(t){}}();var qi=function(t,r,e){\"__proto__\"==r&&Wi?Wi(t,r,{configurable:!0,enumerable:!0,value:e,writable:!0}):t[r]=e};var Hi=function(t,r,e){(void 0!==e&&!Mo(t[r],e)||void 0===e&&!(r in t))&&qi(t,r,e)};var Yi=function(t){return function(r,e,n){for(var o=-1,i=Object(r),a=n(r),u=a.length;u--;){var c=a[t?u:++o];if(!1===e(i[c],c,i))break}return r}}(),Ji=e((function(t,r){var e=r&&!r.nodeType&&r,n=e&&t&&!t.nodeType&&t,o=n&&n.exports===e?Jo.Buffer:void 0,i=o?o.allocUnsafe:void 0;t.exports=function(t,r){if(r)return t.slice();var e=t.length,n=i?i(e):new t.constructor(e);return t.copy(n),n}})),Xi=Jo.Uint8Array;var Ki=function(t){var r=new t.constructor(t.byteLength);return new Xi(r).set(new Xi(t)),r};var Qi=function(t,r){var e=r?Ki(t.buffer):t.buffer;return new t.constructor(e,t.byteOffset,t.length)};var Zi=function(t,r){var e=-1,n=t.length;for(r||(r=Array(n));++e<n;)r[e]=t[e];return r},ta=Object.create,ra=function(){function t(){}return function(r){if(!ai(r))return{};if(ta)return ta(r);t.prototype=r;var e=new t;return t.prototype=void 0,e}}();var ea=function(t,r){return function(e){return t(r(e))}}(Object.getPrototypeOf,Object),na=Object.prototype;var oa=function(t){var r=t&&t.constructor;return t===(\"function\"==typeof r&&r.prototype||na)};var ia=function(t){return\"function\"!=typeof t.constructor||oa(t)?{}:ra(ea(t))};var aa=function(t){return null!=t&&\"object\"==typeof t};var ua=function(t){return aa(t)&&\"[object Arguments]\"==ii(t)},ca=Object.prototype,fa=ca.hasOwnProperty,la=ca.propertyIsEnumerable,sa=ua(function(){return arguments}())?ua:function(t){return aa(t)&&fa.call(t,\"callee\")&&!la.call(t,\"callee\")},pa=Array.isArray;var va=function(t){return\"number\"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991};var ya=function(t){return null!=t&&va(t.length)&&!ui(t)};var da=function(t){return aa(t)&&ya(t)};var ha=function(){return!1},ba=e((function(t,r){var e=r&&!r.nodeType&&r,n=e&&t&&!t.nodeType&&t,o=n&&n.exports===e?Jo.Buffer:void 0,i=(o?o.isBuffer:void 0)||ha;t.exports=i})),ga=Function.prototype,ma=Object.prototype,_a=ga.toString,wa=ma.hasOwnProperty,Oa=_a.call(Object);var ja=function(t){if(!aa(t)||\"[object Object]\"!=ii(t))return!1;var r=ea(t);if(null===r)return!0;var e=wa.call(r,\"constructor\")&&r.constructor;return\"function\"==typeof e&&e instanceof e&&_a.call(e)==Oa},Sa={};Sa[\"[object Float32Array]\"]=Sa[\"[object Float64Array]\"]=Sa[\"[object Int8Array]\"]=Sa[\"[object Int16Array]\"]=Sa[\"[object Int32Array]\"]=Sa[\"[object Uint8Array]\"]=Sa[\"[object Uint8ClampedArray]\"]=Sa[\"[object Uint16Array]\"]=Sa[\"[object Uint32Array]\"]=!0,Sa[\"[object Arguments]\"]=Sa[\"[object Array]\"]=Sa[\"[object ArrayBuffer]\"]=Sa[\"[object Boolean]\"]=Sa[\"[object DataView]\"]=Sa[\"[object Date]\"]=Sa[\"[object Error]\"]=Sa[\"[object Function]\"]=Sa[\"[object Map]\"]=Sa[\"[object Number]\"]=Sa[\"[object Object]\"]=Sa[\"[object RegExp]\"]=Sa[\"[object Set]\"]=Sa[\"[object String]\"]=Sa[\"[object WeakMap]\"]=!1;var xa=function(t){return aa(t)&&va(t.length)&&!!Sa[ii(t)]};var Aa=function(t){return function(r){return t(r)}},Pa=e((function(t,r){var e=r&&!r.nodeType&&r,n=e&&t&&!t.nodeType&&t,o=n&&n.exports===e&&Ho.process,i=function(){try{var t=n&&n.require&&n.require(\"util\").types;return t||o&&o.binding&&o.binding(\"util\")}catch(t){}}();t.exports=i})),Ta=Pa&&Pa.isTypedArray,Ea=Ta?Aa(Ta):xa;var Ca=function(t,r){if((\"constructor\"!==r||\"function\"!=typeof t[r])&&\"__proto__\"!=r)return t[r]},Fa=Object.prototype.hasOwnProperty;var La=function(t,r,e){var n=t[r];Fa.call(t,r)&&Mo(n,e)&&(void 0!==e||r in t)||qi(t,r,e)};var ka=function(t,r,e,n){var o=!e;e||(e={});for(var i=-1,a=r.length;++i<a;){var u=r[i],c=n?n(e[u],t[u],u,e,t):void 0;void 0===c&&(c=t[u]),o?qi(e,u,c):La(e,u,c)}return e};var Ma=function(t,r){for(var e=-1,n=Array(t);++e<t;)n[e]=r(e);return n},Ia=/^(?:0|[1-9]\\d*)$/;var za=function(t,r){var e=typeof t;return!!(r=null==r?9007199254740991:r)&&(\"number\"==e||\"symbol\"!=e&&Ia.test(t))&&t>-1&&t%1==0&&t<r},Da=Object.prototype.hasOwnProperty;var Ra=function(t,r){var e=pa(t),n=!e&&sa(t),o=!e&&!n&&ba(t),i=!e&&!n&&!o&&Ea(t),a=e||n||o||i,u=a?Ma(t.length,String):[],c=u.length;for(var f in t)!r&&!Da.call(t,f)||a&&(\"length\"==f||o&&(\"offset\"==f||\"parent\"==f)||i&&(\"buffer\"==f||\"byteLength\"==f||\"byteOffset\"==f)||za(f,c))||u.push(f);return u};var Na=function(t){var r=[];if(null!=t)for(var e in Object(t))r.push(e);return r},Ga=Object.prototype.hasOwnProperty;var Ua=function(t){if(!ai(t))return Na(t);var r=oa(t),e=[];for(var n in t)(\"constructor\"!=n||!r&&Ga.call(t,n))&&e.push(n);return e};var Ba=function(t){return ya(t)?Ra(t,!0):Ua(t)};var $a=function(t){return ka(t,Ba(t))};var Va=function(t,r,e,n,o,i,a){var u=Ca(t,e),c=Ca(r,e),f=a.get(c);if(f)Hi(t,e,f);else{var l=i?i(u,c,e+\"\",t,r,a):void 0,s=void 0===l;if(s){var p=pa(c),v=!p&&ba(c),y=!p&&!v&&Ea(c);l=c,p||v||y?pa(u)?l=u:da(u)?l=Zi(u):v?(s=!1,l=Ji(c,!0)):y?(s=!1,l=Qi(c,!0)):l=[]:ja(c)||sa(c)?(l=u,sa(u)?l=$a(u):ai(u)&&!ui(u)||(l=ia(c))):s=!1}s&&(a.set(c,l),o(l,c,n,i,a),a.delete(c)),Hi(t,e,l)}};var Wa=function t(r,e,n,o,i){r!==e&&Yi(e,(function(a,u){if(i||(i=new Vi),ai(a))Va(r,e,u,n,t,o,i);else{var c=o?o(Ca(r,u),a,u+\"\",r,e,i):void 0;void 0===c&&(c=a),Hi(r,u,c)}}),Ba)};var qa=function(t){return t};var Ha=function(t,r,e){switch(e.length){case 0:return t.call(r);case 1:return t.call(r,e[0]);case 2:return t.call(r,e[0],e[1]);case 3:return t.call(r,e[0],e[1],e[2])}return t.apply(r,e)},Ya=Math.max;var Ja=function(t,r,e){return r=Ya(void 0===r?t.length-1:r,0),function(){for(var n=arguments,o=-1,i=Ya(n.length-r,0),a=Array(i);++o<i;)a[o]=n[r+o];o=-1;for(var u=Array(r+1);++o<r;)u[o]=n[o];return u[r]=e(a),Ha(t,this,u)}};var Xa=function(t){return function(){return t}},Ka=Wi?function(t,r){return Wi(t,\"toString\",{configurable:!0,enumerable:!1,value:Xa(r),writable:!0})}:qa,Qa=Date.now;var Za=function(t){var r=0,e=0;return function(){var n=Qa(),o=16-(n-e);if(e=n,o>0){if(++r>=800)return arguments[0]}else r=0;return t.apply(void 0,arguments)}}(Ka);var tu=function(t,r){return Za(Ja(t,r,qa),t+\"\")};var ru=function(t,r,e){if(!ai(e))return!1;var n=typeof r;return!!(\"number\"==n?ya(e)&&za(r,e.length):\"string\"==n&&r in e)&&Mo(e[r],t)};var eu=function(t){return tu((function(r,e){var n=-1,o=e.length,i=o>1?e[o-1]:void 0,a=o>2?e[2]:void 0;for(i=t.length>3&&\"function\"==typeof i?(o--,i):void 0,a&&ru(e[0],e[1],a)&&(i=o<3?void 0:i,o=1),r=Object(r);++n<o;){var u=e[n];u&&t(r,u,n,i)}return r}))}((function(t,r,e,n){Wa(t,r,e,n)})),nu=\"\\t\\n\\v\\f\\r                　\\u2028\\u2029\\ufeff\",ou=b(\"\".replace),iu=\"[\"+nu+\"]\",au=RegExp(\"^\"+iu+iu+\"*\"),uu=RegExp(iu+iu+\"*$\"),cu=function(t){return function(r){var e=wr(k(r));return 1&t&&(e=ou(e,au,\"\")),2&t&&(e=ou(e,uu,\"\")),e}},fu={start:cu(1),end:cu(2),trim:cu(3)}.trim,lu=a.parseInt,su=a.Symbol,pu=su&&su.iterator,vu=/^[+-]?0x/i,yu=b(vu.exec),du=8!==lu(nu+\"08\")||22!==lu(nu+\"0x16\")||pu&&!u((function(){lu(Object(pu))}))?function(t,r){var e=fu(wr(t));return lu(e,r>>>0||(yu(vu,e)?16:10))}:lu;Ht({global:!0,forced:parseInt!=du},{parseInt:du});var hu=z.parseInt,bu=function(){var t,r,e,n,o,i,a,u,c,f,l,s,p,v,y,d,h,b,g,m,_,w,O,j,S,x,A,P,T,E,C,F,L,k,M,I,z,D,R,N,G,U,B,$,V,W,q,H,Y,J,X,K,Q,Z,tt,rt=hu(5),et=null;function nt(){this.fc=0,this.dl=0}function ot(){this.dyn_tree=null,this.static_tree=null,this.extra_bits=null,this.extra_base=0,this.elems=0,this.max_length=0,this.max_code=0}function it(t,r,e,n){this.good_length=t,this.max_lazy=r,this.nice_length=e,this.max_chain=n}function at(){this.next=null,this.len=0,this.ptr=new Array(8192),this.off=0}var ut=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],ct=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],ft=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],lt=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],st=[new it(0,0,0,0),new it(4,4,8,4),new it(4,5,16,8),new it(4,6,32,32),new it(4,4,16,16),new it(8,16,32,32),new it(8,16,128,128),new it(8,32,128,256),new it(32,128,258,1024),new it(32,258,258,4096)];function pt(r){r.next=t,t=r}function vt(t){return l[32768+t]}function yt(t,r){return l[32768+t]=r}function dt(n){et[i+o++]=n,i+o==8192&&function(){if(0!=o){var n,a;for(null!=t?(u=t,t=t.next):u=new at,u.next=null,u.len=u.off=0,n=u,null==r?r=e=n:e=e.next=n,n.len=o-i,a=0;a<n.len;a++)n.ptr[a]=et[i+a];o=i=0}var u}()}function ht(t){t&=65535,i+o<8190?(et[i+o++]=255&t,et[i+o++]=t>>>8):(dt(255&t),dt(t>>>8))}function bt(){y=8191&(y<<rt^255&u[_+3-1]),d=vt(y),l[32767&_]=d,yt(y,_)}function gt(t,r){zt(r[t].fc,r[t].dl)}function mt(t){return 255&(t<256?B[t]:B[256+(t>>7)])}function _t(t,r,e){return t[r].fc<t[e].fc||t[r].fc==t[e].fc&&G[r]<=G[e]}function wt(t,r,e){var n;for(n=0;n<e&&tt<Z.length;n++)t[r+n]=255&Z.charCodeAt(tt++);return n}function Ot(t){var r,e,n=S,o=_,i=m,a=_>32506?_-32506:0,c=_+258,f=u[o+i-1],s=u[o+i];m>=P&&(n>>=2);do{if(u[(r=t)+i]==s&&u[r+i-1]==f&&u[r]==u[o]&&u[++r]==u[o+1]){o+=2,r++;do{}while(u[++o]==u[++r]&&u[++o]==u[++r]&&u[++o]==u[++r]&&u[++o]==u[++r]&&u[++o]==u[++r]&&u[++o]==u[++r]&&u[++o]==u[++r]&&u[++o]==u[++r]&&o<c);if(e=258-(c-o),o=c-258,e>i){if(w=t,i=e,e>=258)break;f=u[o+i-1],s=u[o+i]}}}while((t=l[32767&t])>a&&0!=--n);return i}function jt(){var t,r,e=65536-j-_;if(-1==e)e--;else if(_>=65274){for(t=0;t<32768;t++)u[t]=u[t+32768];for(w-=32768,_-=32768,v-=32768,t=0;t<8192;t++)yt(t,(r=vt(t))>=32768?r-32768:0);for(t=0;t<32768;t++)r=l[t],l[t]=r>=32768?r-32768:0;e+=32768}O||((t=wt(u,_+j,e))<=0?O=!0:j+=t)}function St(){O||(s=0,p=0,function(){var t,r,e,n,o;if(0!=F[0].dl)return;for(k.dyn_tree=T,k.static_tree=C,k.extra_bits=ut,k.extra_base=257,k.elems=286,k.max_length=15,k.max_code=0,M.dyn_tree=E,M.static_tree=F,M.extra_bits=ct,M.extra_base=0,M.elems=30,M.max_length=15,M.max_code=0,I.dyn_tree=L,I.static_tree=null,I.extra_bits=ft,I.extra_base=0,I.elems=19,I.max_length=7,I.max_code=0,e=0,n=0;n<28;n++)for($[n]=e,t=0;t<1<<ut[n];t++)U[e++]=n;for(U[e-1]=n,o=0,n=0;n<16;n++)for(V[n]=o,t=0;t<1<<ct[n];t++)B[o++]=n;for(o>>=7;n<30;n++)for(V[n]=o<<7,t=0;t<1<<ct[n]-7;t++)B[256+o++]=n;for(r=0;r<=15;r++)z[r]=0;t=0;for(;t<=143;)C[t++].dl=8,z[8]++;for(;t<=255;)C[t++].dl=9,z[9]++;for(;t<=279;)C[t++].dl=7,z[7]++;for(;t<=287;)C[t++].dl=8,z[8]++;for(Et(C,287),t=0;t<30;t++)F[t].dl=5,F[t].fc=Dt(t,5);Pt()}(),function(){var t;for(t=0;t<8192;t++)l[32768+t]=0;if(x=st[A].max_lazy,P=st[A].good_length,S=st[A].max_chain,_=0,v=0,(j=wt(u,0,65536))<=0)return O=!0,void(j=0);for(O=!1;j<262&&!O;)jt();for(y=0,t=0;t<2;t++)y=8191&(y<<rt^255&u[t])}(),r=null,o=0,i=0,A<=3?(m=2,g=0):(g=2,b=0),a=!1)}function xt(t,e,o){var i;return n||(St(),n=!0,0!=j)?(i=At(t,e,o))==o?o:a?i:(A<=3?function(){for(;0!=j&&null==r;){var t;if(bt(),0!=d&&_-d<=32506&&(g=Ot(d))>j&&(g=j),g>=3)if(t=Mt(_-w,g-3),j-=g,g<=x){g--;do{_++,bt()}while(0!=--g);_++}else _+=g,g=0,y=8191&((y=255&u[_])<<rt^255&u[_+1]);else t=Mt(0,255&u[_]),j--,_++;for(t&&(kt(0),v=_);j<262&&!O;)jt()}}():function(){for(;0!=j&&null==r;){if(bt(),m=g,h=w,g=2,0!=d&&m<x&&_-d<=32506&&((g=Ot(d))>j&&(g=j),3==g&&_-w>4096&&g--),m>=3&&g<=m){var t;t=Mt(_-1-h,m-3),j-=m-1,m-=2;do{_++,bt()}while(0!=--m);b=0,g=2,_++,t&&(kt(0),v=_)}else 0!=b?(Mt(0,255&u[_-1])&&(kt(0),v=_),_++,j--):(b=1,_++,j--);for(;j<262&&!O;)jt()}}(),0==j&&(0!=b&&Mt(0,255&u[_-1]),kt(1),a=!0),i+At(t,i+e,o-i)):(a=!0,0)}function At(t,e,n){var a,u,c;for(a=0;null!=r&&a<n;){for((u=n-a)>r.len&&(u=r.len),c=0;c<u;c++)t[e+a+c]=r.ptr[r.off+c];var f;if(r.off+=u,r.len-=u,a+=u,0==r.len)f=r,r=r.next,pt(f)}if(a==n)return a;if(i<o){for((u=n-a)>o-i&&(u=o-i),c=0;c<u;c++)t[e+a+c]=et[i+c];a+=u,o==(i+=u)&&(o=i=0)}return a}function Pt(){var t;for(t=0;t<286;t++)T[t].fc=0;for(t=0;t<30;t++)E[t].fc=0;for(t=0;t<19;t++)L[t].fc=0;T[256].fc=1,K=Q=0,q=H=Y=0,J=0,X=1}function Tt(t,r){for(var e=D[r],n=r<<1;n<=R&&(n<R&&_t(t,D[n+1],D[n])&&n++,!_t(t,e,D[n]));)D[r]=D[n],r=n,n<<=1;D[r]=e}function Et(t,r){var e,n,o=new Array(16),i=0;for(e=1;e<=15;e++)i=i+z[e-1]<<1,o[e]=i;for(n=0;n<=r;n++){var a=t[n].dl;0!=a&&(t[n].fc=Dt(o[a]++,a))}}function Ct(t){var r,e,n=t.dyn_tree,o=t.static_tree,i=t.elems,a=-1,u=i;for(R=0,N=573,r=0;r<i;r++)0!=n[r].fc?(D[++R]=a=r,G[r]=0):n[r].dl=0;for(;R<2;){var c=D[++R]=a<2?++a:0;n[c].fc=1,G[c]=0,K--,null!=o&&(Q-=o[c].dl)}for(t.max_code=a,r=R>>1;r>=1;r--)Tt(n,r);do{r=D[1],D[1]=D[R--],Tt(n,1),e=D[1],D[--N]=r,D[--N]=e,n[u].fc=n[r].fc+n[e].fc,G[r]>G[e]+1?G[u]=G[r]:G[u]=G[e]+1,n[r].dl=n[e].dl=u,D[1]=u++,Tt(n,1)}while(R>=2);D[--N]=D[1],function(t){var r,e,n,o,i,a,u=t.dyn_tree,c=t.extra_bits,f=t.extra_base,l=t.max_code,s=t.max_length,p=t.static_tree,v=0;for(o=0;o<=15;o++)z[o]=0;for(u[D[N]].dl=0,r=N+1;r<573;r++)(o=u[u[e=D[r]].dl].dl+1)>s&&(o=s,v++),u[e].dl=o,e>l||(z[o]++,i=0,e>=f&&(i=c[e-f]),a=u[e].fc,K+=a*(o+i),null!=p&&(Q+=a*(p[e].dl+i)));if(0!=v){do{for(o=s-1;0==z[o];)o--;z[o]--,z[o+1]+=2,z[s]--,v-=2}while(v>0);for(o=s;0!=o;o--)for(e=z[o];0!=e;)(n=D[--r])>l||(u[n].dl!=o&&(K+=(o-u[n].dl)*u[n].fc,u[n].fc=o),e--)}}(t),Et(n,a)}function Ft(t,r){var e,n,o=-1,i=t[0].dl,a=0,u=7,c=4;for(0==i&&(u=138,c=3),t[r+1].dl=65535,e=0;e<=r;e++)n=i,i=t[e+1].dl,++a<u&&n==i||(a<c?L[n].fc+=a:0!=n?(n!=o&&L[n].fc++,L[16].fc++):a<=10?L[17].fc++:L[18].fc++,a=0,o=n,0==i?(u=138,c=3):n==i?(u=6,c=3):(u=7,c=4))}function Lt(t,r){var e,n,o=-1,i=t[0].dl,a=0,u=7,c=4;for(0==i&&(u=138,c=3),e=0;e<=r;e++)if(n=i,i=t[e+1].dl,!(++a<u&&n==i)){if(a<c)do{gt(n,L)}while(0!=--a);else 0!=n?(n!=o&&(gt(n,L),a--),gt(16,L),zt(a-3,2)):a<=10?(gt(17,L),zt(a-3,3)):(gt(18,L),zt(a-11,7));a=0,o=n,0==i?(u=138,c=3):n==i?(u=6,c=3):(u=7,c=4)}}function kt(t){var r,e,n,o,i;if(o=_-v,W[Y]=J,Ct(k),Ct(M),n=function(){var t;for(Ft(T,k.max_code),Ft(E,M.max_code),Ct(I),t=18;t>=3&&0==L[lt[t]].dl;t--);return K+=3*(t+1)+5+5+4,t}(),(e=Q+3+7>>3)<=(r=K+3+7>>3)&&(r=e),o+4<=r&&v>=0)for(zt(0+t,3),Rt(),ht(o),ht(~o),i=0;i<o;i++)dt(u[v+i]);else e==r?(zt(2+t,3),It(C,F)):(zt(4+t,3),function(t,r,e){var n;for(zt(t-257,5),zt(r-1,5),zt(e-4,4),n=0;n<e;n++)zt(L[lt[n]].dl,3);Lt(T,t-1),Lt(E,r-1)}(k.max_code+1,M.max_code+1,n+1),It(T,E));Pt(),0!=t&&Rt()}function Mt(t,r){if(f[q++]=r,0==t?T[r].fc++:(t--,T[U[r]+256+1].fc++,E[mt(t)].fc++,c[H++]=t,J|=X),X<<=1,0==(7&q)&&(W[Y++]=J,J=0,X=1),A>2&&0==(4095&q)){var e,n=8*q,o=_-v;for(e=0;e<30;e++)n+=E[e].fc*(5+ct[e]);if(n>>=3,H<hu(q/2)&&n<hu(o/2))return!0}return 8191==q||8192==H}function It(t,r){var e,n,o,i,a=0,u=0,l=0,s=0;if(0!=q)do{0==(7&a)&&(s=W[l++]),n=255&f[a++],0==(1&s)?gt(n,t):(gt((o=U[n])+256+1,t),0!=(i=ut[o])&&zt(n-=$[o],i),gt(o=mt(e=c[u++]),r),0!=(i=ct[o])&&zt(e-=V[o],i)),s>>=1}while(a<q);gt(256,t)}function zt(t,r){p>16-r?(ht(s|=t<<p),s=t>>16-p,p+=r-16):(s|=t<<p,p+=r)}function Dt(t,r){var e=0;do{e|=1&t,t>>=1,e<<=1}while(--r>0);return e>>1}function Rt(){p>8?ht(s):p>0&&dt(s),s=0,p=0}return function(o,i){var a,s;Z=o,tt=0,void 0===i&&(i=6),function(o){var i;if(o?o<1?o=1:o>9&&(o=9):o=6,A=o,n=!1,O=!1,null==et){for(t=r=e=null,et=new Array(8192),u=new Array(65536),c=new Array(8192),f=new Array(32832),l=new Array(65536),T=new Array(573),i=0;i<573;i++)T[i]=new nt;for(E=new Array(61),i=0;i<61;i++)E[i]=new nt;for(C=new Array(288),i=0;i<288;i++)C[i]=new nt;for(F=new Array(30),i=0;i<30;i++)F[i]=new nt;for(L=new Array(39),i=0;i<39;i++)L[i]=new nt;k=new ot,M=new ot,I=new ot,z=new Array(16),D=new Array(573),G=new Array(573),U=new Array(256),B=new Array(512),$=new Array(29),V=new Array(30),W=new Array(hu(1024))}}(i);for(var p=new Array(1024),v=[];(a=xt(p,0,p.length))>0;){var y=new Array(a);for(s=0;s<a;s++)y[s]=String.fromCharCode(p[s]);v[v.length]=y.join(\"\")}return Z=null,v.join(\"\")}}();function gu(t,r){var e=pr(t);if(gn){var n=gn(t);r&&(n=An(n).call(n,(function(r){return Ln(t,r).enumerable}))),e.push.apply(e,n)}return e}function mu(t){for(var r=1;r<arguments.length;r++){var e,n,o=null!=arguments[r]?arguments[r]:{};r%2?so(e=gu(Object(o),!0)).call(e,(function(r){Oo(t,r,o[r])})):yo?bo(t,yo(o)):so(n=gu(Object(o))).call(n,(function(r){_o(t,r,Ln(o,r))}))}return t}function _u(t,r,e){var n=(3&t)<<4|r>>4,o=(15&r)<<2|e>>6,i=63&e,a=\"\";return a+=wu(63&t>>2),a+=wu(63&n),a+=wu(63&o),a+=wu(63&i)}function wu(t){var r=t;return r<10?String.fromCharCode(48+r):(r-=10)<26?String.fromCharCode(65+r):(r-=26)<26?String.fromCharCode(97+r):0===(r-=26)?\"-\":1===r?\"_\":\"?\"}function Ou(t,r){var e,n=unescape(encodeURIComponent(t));return Lo(e=\"\".concat(r,\"/svg/\")).call(e,function(t){for(var r=\"\",e=0;e<t.length;e+=3)e+2===t.length?r+=_u(t.charCodeAt(e),t.charCodeAt(e+1),0):e+1===t.length?r+=_u(t.charCodeAt(e),0,0):r+=_u(t.charCodeAt(e),t.charCodeAt(e+1),t.charCodeAt(e+2));return r}(bu(n,9)))}return function(){function t(){var r,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};jo(this,t);var n=\"http://www.plantuml.com/plantuml\";this.baseUrl=null!==(r=e.baseUrl)&&void 0!==r?r:n}return So(t,[{key:\"render\",value:function(t,r){var e,n,o=r;o||(o=Math.round(1e8*Math.random()));var i=Lo(e=\"plantuml-\".concat(o,\"-\")).call(e,(new Date).getTime());return Lo(n='<img id=\"'.concat(i,'\" src=\"')).call(n,Ou(t,this.baseUrl),'\" />')}}],[{key:\"install\",value:function(r,e){var n;eu(r,{engine:{syntax:{codeBlock:{customRenderer:{plantuml:new t(mu(mu({},e),null!==(n=r.engine.syntax.plantuml)&&void 0!==n?n:{}))}}}}})}}]),t}()}));\n"
  },
  {
    "path": "static/cherry/cherry-markdown.css",
    "content": "@charset \"UTF-8\";\n\n.cherry *::-webkit-scrollbar {\n  height: 7px;\n  width: 7px;\n  background: transparent;\n}\n\n.cherry *::-webkit-scrollbar:hover {\n  background: rgba(128, 128, 128, 0.1);\n}\n\n.cherry *::-webkit-scrollbar-thumb {\n  background: #d3d7da;\n  -webkit-border-radius: 6px;\n}\n\n.cherry *::-webkit-scrollbar-thumb:hover {\n  background: rgba(0, 0, 0, 0.6);\n}\n\n.cherry *::-webkit-scrollbar-corner {\n  background: transparent;\n}\n\n@font-face {\n  font-family: \"ch-icon\";\n  src: url(\"./fonts/ch-icon.eot\");\n  src: url(\"./fonts/ch-icon.eot?#iefix\") format(\"eot\"), url(\"./fonts/ch-icon.woff2\") format(\"woff2\"), url(\"./fonts/ch-icon.woff\") format(\"woff\"), url(\"./fonts/ch-icon.ttf\") format(\"truetype\"), url(\"./fonts/ch-icon.svg#ch-icon\") format(\"svg\");\n  font-weight: normal;\n  font-style: normal;\n}\n\n.ch-icon:before {\n  display: inline-block;\n  font-family: \"ch-icon\";\n  font-style: normal;\n  font-weight: normal;\n  -webkit-font-smoothing: antialiased;\n  -moz-osx-font-smoothing: grayscale;\n}\n\n.ch-icon-list:before {\n  content: \"\\ea03\";\n}\n\n.ch-icon-check:before {\n  content: \"\\ea04\";\n}\n\n.ch-icon-square:before {\n  content: \"\\ea09\";\n}\n\n.ch-icon-bold:before {\n  content: \"\\ea0a\";\n}\n\n.ch-icon-code:before {\n  content: \"\\ea0b\";\n}\n\n.ch-icon-color:before {\n  content: \"\\ea0c\";\n}\n\n.ch-icon-header:before {\n  content: \"\\ea0d\";\n}\n\n.ch-icon-image:before {\n  content: \"\\ea0e\";\n}\n\n.ch-icon-italic:before {\n  content: \"\\ea0f\";\n}\n\n.ch-icon-link:before {\n  content: \"\\ea10\";\n}\n\n.ch-icon-ol:before {\n  content: \"\\ea11\";\n}\n\n.ch-icon-size:before {\n  content: \"\\ea12\";\n}\n\n.ch-icon-strike:before {\n  content: \"\\ea13\";\n}\n\n.ch-icon-table:before {\n  content: \"\\ea14\";\n}\n\n.ch-icon-ul:before {\n  content: \"\\ea15\";\n}\n\n.ch-icon-underline:before {\n  content: \"\\ea16\";\n}\n\n.ch-icon-word:before {\n  content: \"\\ea17\";\n}\n\n.ch-icon-blockquote:before {\n  content: \"\\ea18\";\n}\n\n.ch-icon-font:before {\n  content: \"\\ea19\";\n}\n\n.ch-icon-insertClass:before {\n  content: \"\\ea1f\";\n}\n\n.ch-icon-insertFlow:before {\n  content: \"\\ea20\";\n}\n\n.ch-icon-insertFormula:before {\n  content: \"\\ea21\";\n}\n\n.ch-icon-insertGantt:before {\n  content: \"\\ea22\";\n}\n\n.ch-icon-insertGraph:before {\n  content: \"\\ea23\";\n}\n\n.ch-icon-insertPie:before {\n  content: \"\\ea24\";\n}\n\n.ch-icon-insertSeq:before {\n  content: \"\\ea25\";\n}\n\n.ch-icon-insertState:before {\n  content: \"\\ea26\";\n}\n\n.ch-icon-line:before {\n  content: \"\\ea27\";\n}\n\n.ch-icon-preview:before {\n  content: \"\\ea28\";\n}\n\n.ch-icon-previewClose:before {\n  content: \"\\ea29\";\n}\n\n.ch-icon-toc:before {\n  content: \"\\ea2a\";\n}\n\n.ch-icon-sub:before {\n  content: \"\\ea2d\";\n}\n\n.ch-icon-sup:before {\n  content: \"\\ea2e\";\n}\n\n.ch-icon-h1:before {\n  content: \"\\ea2f\";\n}\n\n.ch-icon-h2:before {\n  content: \"\\ea30\";\n}\n\n.ch-icon-h3:before {\n  content: \"\\ea31\";\n}\n\n.ch-icon-h4:before {\n  content: \"\\ea32\";\n}\n\n.ch-icon-h5:before {\n  content: \"\\ea33\";\n}\n\n.ch-icon-h6:before {\n  content: \"\\ea34\";\n}\n\n.ch-icon-video:before {\n  content: \"\\ea35\";\n}\n\n.ch-icon-insert:before {\n  content: \"\\ea36\";\n}\n\n.ch-icon-little_table:before {\n  content: \"\\ea37\";\n}\n\n.ch-icon-pdf:before {\n  content: \"\\ea38\";\n}\n\n.ch-icon-checklist:before {\n  content: \"\\ea39\";\n}\n\n.ch-icon-close:before {\n  content: \"\\ea40\";\n}\n\n.ch-icon-fullscreen:before {\n  content: \"\\ea41\";\n}\n\n.ch-icon-minscreen:before {\n  content: \"\\ea42\";\n}\n\n.ch-icon-insertChart:before {\n  content: \"\\ea43\";\n}\n\n.ch-icon-question:before {\n  content: \"\\ea44\";\n}\n\n.ch-icon-settings:before {\n  content: \"\\ea45\";\n}\n\n.ch-icon-ok:before {\n  content: \"\\ea46\";\n}\n\n.ch-icon-br:before {\n  content: \"\\ea47\";\n}\n\n.ch-icon-normal:before {\n  content: \"\\ea48\";\n}\n\n.ch-icon-undo:before {\n  content: \"\\ea49\";\n}\n\n.ch-icon-redo:before {\n  content: \"\\ea50\";\n}\n\n.ch-icon-copy:before {\n  content: \"\\ea51\";\n}\n\n.ch-icon-phone:before {\n  content: \"\\ea52\";\n}\n\n.ch-icon-cherry-table-delete:before {\n  content: \"\\ea53\";\n}\n\n.ch-icon-cherry-table-insert-bottom:before {\n  content: \"\\ea54\";\n}\n\n.ch-icon-cherry-table-insert-left:before {\n  content: \"\\ea55\";\n}\n\n.ch-icon-cherry-table-insert-right:before {\n  content: \"\\ea56\";\n}\n\n.ch-icon-cherry-table-insert-top:before {\n  content: \"\\ea57\";\n}\n\n.ch-icon-sort-s:before {\n  content: \"\\ea58\";\n}\n\n.ch-icon-pinyin:before {\n  content: \"\\ea59\";\n}\n\n.ch-icon-create:before {\n  content: \"\\ea5a\";\n}\n\n.ch-icon-download:before {\n  content: \"\\ea5b\";\n}\n\n.ch-icon-edit:before {\n  content: \"\\ea5c\";\n}\n\n.ch-icon-export:before {\n  content: \"\\ea5d\";\n}\n\n.ch-icon-folder-open:before {\n  content: \"\\ea5e\";\n}\n\n.ch-icon-folder:before {\n  content: \"\\ea5f\";\n}\n\n.ch-icon-help:before {\n  content: \"\\ea60\";\n}\n\n.ch-icon-pen-fill:before {\n  content: \"\\ea61\";\n}\n\n.ch-icon-pen:before {\n  content: \"\\ea62\";\n}\n\n.ch-icon-search:before {\n  content: \"\\ea63\";\n}\n\n.ch-icon-tips:before {\n  content: \"\\ea64\";\n}\n\n.ch-icon-warn:before {\n  content: \"\\ea65\";\n}\n\n.ch-icon-mistake:before {\n  content: \"\\ea66\";\n}\n\n.ch-icon-success:before {\n  content: \"\\ea67\";\n}\n\n.ch-icon-danger:before {\n  content: \"\\ea68\";\n}\n\n.ch-icon-info:before {\n  content: \"\\ea69\";\n}\n\n.ch-icon-primary:before {\n  content: \"\\ea6a\";\n}\n\n.ch-icon-warning:before {\n  content: \"\\ea6b\";\n}\n\n.ch-icon-justify:before {\n  content: \"\\ea6c\";\n}\n\n.ch-icon-justifyCenter:before {\n  content: \"\\ea6d\";\n}\n\n.ch-icon-justifyLeft:before {\n  content: \"\\ea6e\";\n}\n\n.ch-icon-justifyRight:before {\n  content: \"\\ea6f\";\n}\n\n.ch-icon-publish:before {\n  content: \"\\ea70\";\n}\n\n.ch-icon-save:before {\n  content: \"\\ea71\";\n}\n\n.ch-icon-back:before {\n  content: \"\\ea72\";\n}\n\n.ch-icon-open-preview:before {\n  content: \"\\ea73\";\n}\n\n.ch-icon-sider:before {\n  content: \"\\ea74\";\n}\n\n.ch-icon-history:before {\n  content: \"\\ea75\";\n}\n\n.ch-icon-code-theme:before {\n  content: \"\\ea76\";\n}\n\n.cherry-markdown {\n  word-break: break-all;\n  /* Specify class=linenums on a pre to get line numbering */\n  /* Inline code */\n  /* 数学表达式展示 */\n}\n\n.cherry-markdown h1,\n.cherry-markdown h2,\n.cherry-markdown h3,\n.cherry-markdown h4,\n.cherry-markdown h5,\n.cherry-markdown h6,\n.cherry-markdown .h1,\n.cherry-markdown .h2,\n.cherry-markdown .h3,\n.cherry-markdown .h4,\n.cherry-markdown .h5,\n.cherry-markdown .h6 {\n  font-family: inherit;\n  font-weight: 700;\n  line-height: 1.1;\n  color: inherit;\n}\n\n.cherry-markdown h1 small,\n.cherry-markdown h2 small,\n.cherry-markdown h3 small,\n.cherry-markdown h4 small,\n.cherry-markdown h5 small,\n.cherry-markdown h6 small,\n.cherry-markdown .h1 small,\n.cherry-markdown .h2 small,\n.cherry-markdown .h3 small,\n.cherry-markdown .h4 small,\n.cherry-markdown .h5 small,\n.cherry-markdown .h6 small,\n.cherry-markdown h1 .small,\n.cherry-markdown h2 .small,\n.cherry-markdown h3 .small,\n.cherry-markdown h4 .small,\n.cherry-markdown h5 .small,\n.cherry-markdown h6 .small,\n.cherry-markdown .h1 .small,\n.cherry-markdown .h2 .small,\n.cherry-markdown .h3 .small,\n.cherry-markdown .h4 .small,\n.cherry-markdown .h5 .small,\n.cherry-markdown .h6 .small {\n  font-weight: normal;\n  line-height: 1;\n  color: #999;\n}\n\n.cherry-markdown h1,\n.cherry-markdown h2,\n.cherry-markdown h3 {\n  margin-top: 30px;\n  margin-bottom: 16px;\n}\n\n.cherry-markdown h1 small,\n.cherry-markdown h2 small,\n.cherry-markdown h3 small,\n.cherry-markdown h1 .small,\n.cherry-markdown h2 .small,\n.cherry-markdown h3 .small {\n  font-size: 65%;\n}\n\n.cherry-markdown h4,\n.cherry-markdown h5,\n.cherry-markdown h6 {\n  margin-top: 12px;\n  margin-bottom: 12px;\n}\n\n.cherry-markdown h4 small,\n.cherry-markdown h5 small,\n.cherry-markdown h6 small,\n.cherry-markdown h4 .small,\n.cherry-markdown h5 .small,\n.cherry-markdown h6 .small {\n  font-size: 75%;\n}\n\n.cherry-markdown h1,\n.cherry-markdown .h1 {\n  font-size: 2em;\n}\n\n.cherry-markdown h2,\n.cherry-markdown .h2 {\n  font-size: 1.5em;\n}\n\n.cherry-markdown h3,\n.cherry-markdown .h3 {\n  font-size: 1.25em;\n}\n\n.cherry-markdown h4,\n.cherry-markdown .h4 {\n  font-size: 1em;\n}\n\n.cherry-markdown h5,\n.cherry-markdown .h5 {\n  font-size: 0.875em;\n}\n\n.cherry-markdown h6,\n.cherry-markdown .h6 {\n  font-size: 0.85em;\n}\n\n.cherry-markdown b,\n.cherry-markdown strong {\n  font-weight: bold;\n}\n\n.cherry-markdown ul,\n.cherry-markdown ol {\n  padding-left: 24px;\n  margin-bottom: 16px;\n}\n\n.cherry-markdown ul ul,\n.cherry-markdown ul ol,\n.cherry-markdown ol ul,\n.cherry-markdown ol ol {\n  margin-bottom: 0;\n}\n\n.cherry-markdown ul li,\n.cherry-markdown ol li {\n  list-style: inherit;\n}\n\n.cherry-markdown ul li p,\n.cherry-markdown ol li p {\n  margin: 0;\n}\n\n.cherry-markdown div ul,\n.cherry-markdown div ol {\n  margin-bottom: 0;\n}\n\n.cherry-markdown hr {\n  height: 0;\n  border: 0;\n  border-top: 1px solid #dfe6ee;\n  margin: 16px 0;\n  box-sizing: content-box;\n  overflow: visible;\n}\n\n.cherry-markdown table {\n  border-collapse: collapse;\n}\n\n.cherry-markdown table th,\n.cherry-markdown table td {\n  border: 1px solid #dfe6ee;\n  padding: 0.2em 0.4em;\n  min-width: 100px;\n}\n\n.cherry-markdown table th {\n  background-color: #eee;\n}\n\n.cherry-markdown .link-quote {\n  color: #3582fb;\n}\n\n.cherry-markdown a {\n  color: #3582fb;\n  position: relative;\n  text-decoration: none;\n}\n\n.cherry-markdown a[target=_blank] {\n  padding: 0 2px;\n}\n\n.cherry-markdown a[target=_blank]::after {\n  content: \"\\ea10\";\n  font-size: 12px;\n  font-family: \"ch-icon\";\n  margin: 0 2px;\n}\n\n.cherry-markdown a:hover {\n  color: #056bad;\n}\n\n.cherry-markdown em {\n  font-style: italic;\n}\n\n.cherry-markdown sup {\n  vertical-align: super;\n}\n\n.cherry-markdown sub {\n  vertical-align: sub;\n}\n\n.cherry-markdown figure {\n  overflow-x: auto;\n}\n\n.cherry-markdown blockquote {\n  color: #6d6e6f;\n  padding: 10px 15px;\n  border-left: 10px solid #D6DBDF;\n  background: rgba(102, 128, 153, 0.05);\n}\n\n.cherry-markdown p,\n.cherry-markdown pre,\n.cherry-markdown blockquote,\n.cherry-markdown table {\n  margin: 0 0 16px;\n}\n\n.cherry-markdown pre {\n  padding: 16px;\n  overflow: auto;\n  font-size: 85%;\n  line-height: 1.45;\n  background-color: #f6f8fa;\n  border-radius: 6px;\n}\n\n.cherry-markdown .prettyprint {\n  min-width: 500px;\n  display: inline-block;\n  background: #00212b;\n  font-family: Menlo, \"Bitstream Vera Sans Mono\", \"DejaVu Sans Mono\", Monaco, Consolas, monospace;\n  border: 0 !important;\n}\n\n.cherry-markdown .pln {\n  color: #dfe6ee;\n}\n\n.cherry-markdown .str {\n  color: #ffaf21;\n}\n\n.cherry-markdown .kwd {\n  color: #f85353;\n}\n\n.cherry-markdown ol.linenums {\n  margin-top: 0;\n  margin-bottom: 0;\n  color: #969896;\n}\n\n.cherry-markdown li.L0,\n.cherry-markdown li.L1,\n.cherry-markdown li.L2,\n.cherry-markdown li.L3,\n.cherry-markdown li.L4,\n.cherry-markdown li.L5,\n.cherry-markdown li.L6,\n.cherry-markdown li.L7,\n.cherry-markdown li.L8,\n.cherry-markdown li.L9 {\n  padding-left: 1em;\n  background-color: #00212b;\n  list-style-type: decimal;\n}\n\n@media screen {\n  .cherry-markdown .cherry-markdown {\n    /* comment */\n    /* type name */\n    /* literal value */\n    /* punctuation */\n    /* lisp open bracket */\n    /* lisp close bracket */\n    /* markup tag name */\n    /* markup attribute name */\n    /* markup attribute value */\n    /* declaration */\n    /* variable name */\n    /* function name */\n  }\n\n  .cherry-markdown .cherry-markdown .com {\n    color: #969896;\n  }\n\n  .cherry-markdown .cherry-markdown .typ {\n    color: #81a2be;\n  }\n\n  .cherry-markdown .cherry-markdown .lit {\n    color: #de935f;\n  }\n\n  .cherry-markdown .cherry-markdown .pun {\n    color: #c5c8c6;\n  }\n\n  .cherry-markdown .cherry-markdown .opn {\n    color: #c5c8c6;\n  }\n\n  .cherry-markdown .cherry-markdown .clo {\n    color: #c5c8c6;\n  }\n\n  .cherry-markdown .cherry-markdown .tag {\n    color: #cc6666;\n  }\n\n  .cherry-markdown .cherry-markdown .atn {\n    color: #de935f;\n  }\n\n  .cherry-markdown .cherry-markdown .atv {\n    color: #8abeb7;\n  }\n\n  .cherry-markdown .cherry-markdown .dec {\n    color: #de935f;\n  }\n\n  .cherry-markdown .cherry-markdown .var {\n    color: #cc6666;\n  }\n\n  .cherry-markdown .cherry-markdown .fun {\n    color: #81a2be;\n  }\n}\n\n.cherry-markdown div[data-type=codeBlock] {\n  display: inline-block;\n  width: 100%;\n  box-sizing: border-box;\n  border-radius: 2px;\n  margin-bottom: 16px;\n  font-size: 14px;\n  overflow-x: auto;\n}\n\n.cherry-markdown div[data-type=codeBlock]>pre {\n  margin: 0;\n}\n\n.cherry-markdown div[data-type=codeBlock]>pre code[class*=language-] {\n  counter-reset: line;\n}\n\n.cherry-markdown div[data-type=codeBlock]>pre code[class*=language-].wrap {\n  white-space: pre-wrap;\n}\n\n.cherry-markdown div[data-type=codeBlock]>pre code[class*=language-] .code-line {\n  display: inline-block;\n  position: relative;\n  padding-left: 3em;\n  height: 1.3em;\n  line-height: 2em;\n}\n\n.cherry-markdown div[data-type=codeBlock]>pre code[class*=language-] .code-line:before {\n  counter-increment: line;\n  content: counter(line);\n  margin-right: 1em;\n  position: absolute;\n  left: 0;\n}\n\n.cherry-markdown div[data-type=codeBlock]>pre code[class*=language-] .code-line:last-child {\n  margin-bottom: 0;\n}\n\n.cherry-markdown :not(pre)>code {\n  padding: 0.1em;\n  border-radius: 0.3em;\n  white-space: normal;\n  color: #f85353;\n  background-color: #e5e5e5;\n}\n\n[data-inline-code-theme=black] .cherry-markdown :not(pre)>code {\n  color: #3f4a56;\n  background-color: #e5e5e5;\n}\n\n.cherry-markdown a.anchor:before {\n  content: \"§\";\n  text-decoration: none;\n  width: 15px;\n  font-size: 0.5em;\n  vertical-align: middle;\n  display: inline-block;\n  text-align: center;\n  margin-left: -15px;\n}\n\n.cherry-markdown .toc {\n  margin-bottom: 16px;\n  padding-left: 0;\n}\n\n.cherry-markdown .toc .toc-title {\n  font-size: 24px;\n  margin-bottom: 5px;\n}\n\n.cherry-markdown .toc .toc-li {\n  border-bottom: 1px ridge #dfe6ee;\n  list-style: none;\n}\n\n.cherry-markdown .toc .toc-li a {\n  text-decoration: none;\n  color: #3f4a56;\n}\n\n.cherry-markdown .toc .toc-li a:hover {\n  color: #056bad;\n}\n\n.cherry-markdown .check-list-item {\n  list-style: none;\n}\n\n.cherry-markdown .check-list-item .ch-icon {\n  margin: 0 6px 0 -20px;\n}\n\n.cherry-markdown .footnote:not(a) {\n  padding-top: 20px;\n  border-top: 1px solid #dfe6ee;\n  margin-top: 50px;\n}\n\n.cherry-markdown .footnote:not(a) .footnote-title {\n  font-size: 20px;\n  margin-top: -38px;\n  background-color: #f8fafb;\n  width: 60px;\n  margin-bottom: 16px;\n}\n\n.cherry-markdown .footnote:not(a) .one-footnote {\n  color: #6d6e6f;\n  margin-bottom: 16px;\n  border-bottom: 1px dotted #dfe6ee;\n}\n\n.cherry-markdown .cherry-table-container {\n  max-width: 100%;\n  overflow-x: auto;\n}\n\n.cherry-markdown .cherry-table-container .cherry-table th,\n.cherry-markdown .cherry-table-container .cherry-table td {\n  border: 1px solid #dfe6ee;\n  padding: 0.2em 0.4em;\n  min-width: 100px;\n}\n\n.cherry-markdown .cherry-table-container .cherry-table th {\n  white-space: nowrap;\n}\n\n.cherry-markdown mjx-assistive-mml {\n  position: absolute;\n  top: 0;\n  left: 0;\n  clip: rect(1px, 1px, 1px, 1px);\n  padding: 1px 0 0 0;\n  border: 0;\n}\n\n.cherry-markdown.head-num {\n  counter-reset: level1;\n}\n\n.cherry-markdown.head-num h1 .anchor:before,\n.cherry-markdown.head-num h2 .anchor:before,\n.cherry-markdown.head-num h3 .anchor:before,\n.cherry-markdown.head-num h4 .anchor:before,\n.cherry-markdown.head-num h5 .anchor:before,\n.cherry-markdown.head-num h6 .anchor:before {\n  width: auto;\n  font-size: inherit;\n  vertical-align: inherit;\n  padding-right: 10px;\n}\n\n.cherry-markdown.head-num h1 {\n  counter-reset: level2;\n}\n\n.cherry-markdown.head-num h2 {\n  counter-reset: level3;\n}\n\n.cherry-markdown.head-num h3 {\n  counter-reset: level4;\n}\n\n.cherry-markdown.head-num h4 {\n  counter-reset: level5;\n}\n\n.cherry-markdown.head-num h5 {\n  counter-reset: level6;\n}\n\n.cherry-markdown.head-num h1 .anchor:before {\n  counter-increment: level1;\n  content: counter(level1) \". \";\n}\n\n.cherry-markdown.head-num h2 .anchor:before {\n  counter-increment: level2;\n  content: counter(level1) \".\" counter(level2) \" \";\n}\n\n.cherry-markdown.head-num h3 .anchor:before {\n  counter-increment: level3;\n  content: counter(level1) \".\" counter(level2) \".\" counter(level3) \" \";\n}\n\n.cherry-markdown.head-num h4 .anchor:before {\n  counter-increment: level4;\n  content: counter(level1) \".\" counter(level2) \".\" counter(level3) \".\" counter(level4) \" \";\n}\n\n.cherry-markdown.head-num h5 .anchor:before {\n  counter-increment: level5;\n  content: counter(level1) \".\" counter(level2) \".\" counter(level3) \".\" counter(level4) \".\" counter(level5) \" \";\n}\n\n.cherry-markdown.head-num h6 .anchor:before {\n  counter-increment: level6;\n  content: counter(level1) \".\" counter(level2) \".\" counter(level3) \".\" counter(level4) \".\" counter(level5) \".\" counter(level6) \" \";\n}\n\ndiv[data-type=codeBlock] {\n  /* PrismJS 1.23.0\n  https://prismjs.com/download.html#themes=prism-tomorrow&languages=markup+css+clike+javascript */\n  /**\n   * prism.js tomorrow night eighties for JavaScript, CoffeeScript, CSS and HTML\n   * Based on https://github.com/chriskempson/tomorrow-theme\n   * @author Rose Pritchard\n   */\n  /* Code blocks */\n  /* Inline code */\n}\n\ndiv[data-type=codeBlock] code[class*=language-],\ndiv[data-type=codeBlock] pre[class*=language-] {\n  color: #ccc;\n  background: none;\n  font-family: Consolas, Monaco, \"Andale Mono\", \"Ubuntu Mono\", monospace;\n  font-size: 1em;\n  text-align: left;\n  white-space: pre;\n  word-spacing: normal;\n  word-break: normal;\n  word-wrap: normal;\n  line-height: 1.5;\n  -moz-tab-size: 4;\n  -o-tab-size: 4;\n  tab-size: 4;\n  -webkit-hyphens: none;\n  -moz-hyphens: none;\n  -ms-hyphens: none;\n  hyphens: none;\n}\n\ndiv[data-type=codeBlock] pre[class*=language-] {\n  padding: 1em;\n  margin: 0.5em 0;\n  overflow: auto;\n}\n\ndiv[data-type=codeBlock] :not(pre)>code[class*=language-],\ndiv[data-type=codeBlock] pre[class*=language-] {\n  background: #2d2d2d;\n}\n\ndiv[data-type=codeBlock] :not(pre)>code[class*=language-] {\n  padding: 0.1em;\n  border-radius: 0.3em;\n  white-space: normal;\n}\n\ndiv[data-type=codeBlock] .token.comment,\ndiv[data-type=codeBlock] .token.block-comment,\ndiv[data-type=codeBlock] .token.prolog,\ndiv[data-type=codeBlock] .token.doctype,\ndiv[data-type=codeBlock] .token.cdata {\n  color: #999;\n}\n\ndiv[data-type=codeBlock] .token.punctuation {\n  color: #ccc;\n}\n\ndiv[data-type=codeBlock] .token.tag,\ndiv[data-type=codeBlock] .token.attr-name,\ndiv[data-type=codeBlock] .token.namespace,\ndiv[data-type=codeBlock] .token.deleted {\n  color: #e2777a;\n}\n\ndiv[data-type=codeBlock] .token.function-name {\n  color: #6196cc;\n}\n\ndiv[data-type=codeBlock] .token.boolean,\ndiv[data-type=codeBlock] .token.number,\ndiv[data-type=codeBlock] .token.function {\n  color: #f08d49;\n}\n\ndiv[data-type=codeBlock] .token.property,\ndiv[data-type=codeBlock] .token.class-name,\ndiv[data-type=codeBlock] .token.constant,\ndiv[data-type=codeBlock] .token.symbol {\n  color: #f8c555;\n}\n\ndiv[data-type=codeBlock] .token.selector,\ndiv[data-type=codeBlock] .token.important,\ndiv[data-type=codeBlock] .token.atrule,\ndiv[data-type=codeBlock] .token.keyword,\ndiv[data-type=codeBlock] .token.builtin {\n  color: #cc99cd;\n}\n\ndiv[data-type=codeBlock] .token.string,\ndiv[data-type=codeBlock] .token.char,\ndiv[data-type=codeBlock] .token.attr-value,\ndiv[data-type=codeBlock] .token.regex,\ndiv[data-type=codeBlock] .token.variable {\n  color: #7ec699;\n}\n\ndiv[data-type=codeBlock] .token.operator,\ndiv[data-type=codeBlock] .token.entity,\ndiv[data-type=codeBlock] .token.url {\n  color: #67cdcc;\n}\n\ndiv[data-type=codeBlock] .token.important,\ndiv[data-type=codeBlock] .token.bold {\n  font-weight: bold;\n}\n\ndiv[data-type=codeBlock] .token.italic {\n  font-style: italic;\n}\n\ndiv[data-type=codeBlock] .token.entity {\n  cursor: help;\n}\n\ndiv[data-type=codeBlock] .token.inserted {\n  color: green;\n}\n\n[data-code-block-theme=default] div[data-type=codeBlock] {\n  /* PrismJS 1.23.0\n  https://prismjs.com/download.html#themes=prism&languages=markup+css+clike+javascript+abap+abnf+actionscript+ada+agda+al+antlr4+apacheconf+apex+apl+applescript+aql+arduino+arff+asciidoc+aspnet+asm6502+autohotkey+autoit+bash+basic+batch+bbcode+birb+bison+bnf+brainfuck+brightscript+bro+bsl+c+csharp+cpp+cfscript+chaiscript+cil+clojure+cmake+cobol+coffeescript+concurnas+csp+coq+crystal+css-extras+csv+cypher+d+dart+dataweave+dax+dhall+diff+django+dns-zone-file+docker+dot+ebnf+editorconfig+eiffel+ejs+elixir+elm+etlua+erb+erlang+excel-formula+fsharp+factor+false+firestore-security-rules+flow+fortran+ftl+gml+gcode+gdscript+gedcom+gherkin+git+glsl+go+graphql+groovy+haml+handlebars+haskell+haxe+hcl+hlsl+http+hpkp+hsts+ichigojam+icon+icu-message-format+idris+ignore+inform7+ini+io+j+java+javadoc+javadoclike+javastacktrace+jexl+jolie+jq+jsdoc+js-extras+json+json5+jsonp+jsstacktrace+js-templates+julia+keyman+kotlin+kumir+latex+latte+less+lilypond+liquid+lisp+livescript+llvm+log+lolcode+lua+makefile+markdown+markup-templating+matlab+mel+mizar+mongodb+monkey+moonscript+n1ql+n4js+nand2tetris-hdl+naniscript+nasm+neon+nevod+nginx+nim+nix+nsis+objectivec+ocaml+opencl+openqasm+oz+parigp+parser+pascal+pascaligo+psl+pcaxis+peoplecode+perl+php+phpdoc+php-extras+plsql+powerquery+powershell+processing+prolog+promql+properties+protobuf+pug+puppet+pure+purebasic+purescript+python+qsharp+q+qml+qore+r+racket+jsx+tsx+reason+regex+rego+renpy+rest+rip+roboconf+robotframework+ruby+rust+sas+sass+scss+scala+scheme+shell-session+smali+smalltalk+smarty+sml+solidity+solution-file+soy+sparql+splunk-spl+sqf+sql+squirrel+stan+iecst+stylus+swift+t4-templating+t4-cs+t4-vb+tap+tcl+tt2+textile+toml+turtle+twig+typescript+typoscript+unrealscript+uri+v+vala+vbnet+velocity+verilog+vhdl+vim+visual-basic+warpscript+wasm+wiki+wolfram+xeora+xml-doc+xojo+xquery+yaml+yang+zig */\n  /**\n   * prism.js default theme for JavaScript, CSS and HTML\n   * Based on dabblet (http://dabblet.com)\n   * @author Lea Verou\n   */\n  /* Code blocks */\n  /* Inline code */\n}\n\n[data-code-block-theme=default] div[data-type=codeBlock] code[class*=language-],\n[data-code-block-theme=default] div[data-type=codeBlock] pre[class*=language-] {\n  color: black;\n  background: none;\n  text-shadow: 0 1px white;\n  font-family: Consolas, Monaco, \"Andale Mono\", \"Ubuntu Mono\", monospace;\n  font-size: 1em;\n  text-align: left;\n  white-space: pre;\n  word-spacing: normal;\n  word-break: normal;\n  word-wrap: normal;\n  line-height: 1.5;\n  -moz-tab-size: 4;\n  -o-tab-size: 4;\n  tab-size: 4;\n  -webkit-hyphens: none;\n  -moz-hyphens: none;\n  -ms-hyphens: none;\n  hyphens: none;\n}\n\n[data-code-block-theme=default] div[data-type=codeBlock] pre[class*=language-]::-moz-selection,\n[data-code-block-theme=default] div[data-type=codeBlock] pre[class*=language-] ::-moz-selection,\n[data-code-block-theme=default] div[data-type=codeBlock] code[class*=language-]::-moz-selection,\n[data-code-block-theme=default] div[data-type=codeBlock] code[class*=language-] ::-moz-selection {\n  text-shadow: none;\n  background: #b3d4fc;\n}\n\n[data-code-block-theme=default] div[data-type=codeBlock] pre[class*=language-]::selection,\n[data-code-block-theme=default] div[data-type=codeBlock] pre[class*=language-] ::selection,\n[data-code-block-theme=default] div[data-type=codeBlock] code[class*=language-]::selection,\n[data-code-block-theme=default] div[data-type=codeBlock] code[class*=language-] ::selection {\n  text-shadow: none;\n  background: #b3d4fc;\n}\n\n@media print {\n\n  [data-code-block-theme=default] div[data-type=codeBlock] code[class*=language-],\n  [data-code-block-theme=default] div[data-type=codeBlock] pre[class*=language-] {\n    text-shadow: none;\n  }\n}\n\n[data-code-block-theme=default] div[data-type=codeBlock] pre[class*=language-] {\n  padding: 1em;\n  margin: 0.5em 0;\n  overflow: auto;\n}\n\n[data-code-block-theme=default] div[data-type=codeBlock] :not(pre)>code[class*=language-],\n[data-code-block-theme=default] div[data-type=codeBlock] pre[class*=language-] {\n  background: #f5f2f0;\n}\n\n[data-code-block-theme=default] div[data-type=codeBlock] :not(pre)>code[class*=language-] {\n  padding: 0.1em;\n  border-radius: 0.3em;\n  white-space: normal;\n}\n\n[data-code-block-theme=default] div[data-type=codeBlock] .token.comment,\n[data-code-block-theme=default] div[data-type=codeBlock] .token.prolog,\n[data-code-block-theme=default] div[data-type=codeBlock] .token.doctype,\n[data-code-block-theme=default] div[data-type=codeBlock] .token.cdata {\n  color: slategray;\n}\n\n[data-code-block-theme=default] div[data-type=codeBlock] .token.punctuation {\n  color: #999;\n}\n\n[data-code-block-theme=default] div[data-type=codeBlock] .token.namespace {\n  opacity: 0.7;\n}\n\n[data-code-block-theme=default] div[data-type=codeBlock] .token.property,\n[data-code-block-theme=default] div[data-type=codeBlock] .token.tag,\n[data-code-block-theme=default] div[data-type=codeBlock] .token.boolean,\n[data-code-block-theme=default] div[data-type=codeBlock] .token.number,\n[data-code-block-theme=default] div[data-type=codeBlock] .token.constant,\n[data-code-block-theme=default] div[data-type=codeBlock] .token.symbol,\n[data-code-block-theme=default] div[data-type=codeBlock] .token.deleted {\n  color: #905;\n}\n\n[data-code-block-theme=default] div[data-type=codeBlock] .token.selector,\n[data-code-block-theme=default] div[data-type=codeBlock] .token.attr-name,\n[data-code-block-theme=default] div[data-type=codeBlock] .token.string,\n[data-code-block-theme=default] div[data-type=codeBlock] .token.char,\n[data-code-block-theme=default] div[data-type=codeBlock] .token.builtin,\n[data-code-block-theme=default] div[data-type=codeBlock] .token.inserted {\n  color: #690;\n}\n\n[data-code-block-theme=default] div[data-type=codeBlock] .token.operator,\n[data-code-block-theme=default] div[data-type=codeBlock] .token.entity,\n[data-code-block-theme=default] div[data-type=codeBlock] .token.url,\n[data-code-block-theme=default] div[data-type=codeBlock] .language-css .token.string,\n[data-code-block-theme=default] div[data-type=codeBlock] .style .token.string {\n  color: #9a6e3a;\n  /* This background color was intended by the author of this theme. */\n  background: hsla(0deg, 0%, 100%, 0.5);\n}\n\n[data-code-block-theme=default] div[data-type=codeBlock] .token.atrule,\n[data-code-block-theme=default] div[data-type=codeBlock] .token.attr-value,\n[data-code-block-theme=default] div[data-type=codeBlock] .token.keyword {\n  color: #07a;\n}\n\n[data-code-block-theme=default] div[data-type=codeBlock] .token.function,\n[data-code-block-theme=default] div[data-type=codeBlock] .token.class-name {\n  color: #DD4A68;\n}\n\n[data-code-block-theme=default] div[data-type=codeBlock] .token.regex,\n[data-code-block-theme=default] div[data-type=codeBlock] .token.important,\n[data-code-block-theme=default] div[data-type=codeBlock] .token.variable {\n  color: #e90;\n}\n\n[data-code-block-theme=default] div[data-type=codeBlock] .token.important,\n[data-code-block-theme=default] div[data-type=codeBlock] .token.bold {\n  font-weight: bold;\n}\n\n[data-code-block-theme=default] div[data-type=codeBlock] .token.italic {\n  font-style: italic;\n}\n\n[data-code-block-theme=default] div[data-type=codeBlock] .token.entity {\n  cursor: help;\n}\n\n[data-code-block-theme=dark] div[data-type=codeBlock] {\n  /* PrismJS 1.23.0\n  https://prismjs.com/download.html#themes=prism-dark&languages=markup+css+clike+javascript+abap+abnf+actionscript+ada+agda+al+antlr4+apacheconf+apex+apl+applescript+aql+arduino+arff+asciidoc+aspnet+asm6502+autohotkey+autoit+bash+basic+batch+bbcode+birb+bison+bnf+brainfuck+brightscript+bro+bsl+c+csharp+cpp+cfscript+chaiscript+cil+clojure+cmake+cobol+coffeescript+concurnas+csp+coq+crystal+css-extras+csv+cypher+d+dart+dataweave+dax+dhall+diff+django+dns-zone-file+docker+dot+ebnf+editorconfig+eiffel+ejs+elixir+elm+etlua+erb+erlang+excel-formula+fsharp+factor+false+firestore-security-rules+flow+fortran+ftl+gml+gcode+gdscript+gedcom+gherkin+git+glsl+go+graphql+groovy+haml+handlebars+haskell+haxe+hcl+hlsl+http+hpkp+hsts+ichigojam+icon+icu-message-format+ignore+inform7+ini+io+j+java+javadoc+javadoclike+javastacktrace+jexl+jolie+jq+jsdoc+js-extras+json+json5+jsonp+jsstacktrace+js-templates+julia+keyman+kotlin+kumir+latte+less+lilypond+liquid+lisp+livescript+llvm+log+lolcode+lua+makefile+markdown+markup-templating+matlab+mel+mizar+mongodb+monkey+moonscript+n1ql+n4js+nand2tetris-hdl+naniscript+nasm+neon+nevod+nginx+nim+nix+nsis+objectivec+ocaml+opencl+openqasm+oz+parigp+parser+pascal+pascaligo+psl+pcaxis+peoplecode+perl+php+phpdoc+php-extras+plsql+powerquery+powershell+processing+prolog+promql+properties+protobuf+pug+puppet+pure+purebasic+purescript+python+qsharp+q+qml+qore+r+racket+jsx+tsx+reason+regex+rego+renpy+rest+rip+roboconf+robotframework+ruby+rust+sas+sass+scss+scala+scheme+shell-session+smali+smalltalk+smarty+sml+solidity+solution-file+soy+sparql+splunk-spl+sqf+sql+squirrel+stan+iecst+stylus+swift+t4-templating+t4-cs+t4-vb+tap+tcl+tt2+textile+toml+turtle+twig+typescript+typoscript+unrealscript+uri+v+vala+vbnet+velocity+verilog+vhdl+vim+visual-basic+warpscript+wasm+wiki+wolfram+xeora+xml-doc+xojo+xquery+yaml+yang+zig */\n  /**\n   * prism.js Dark theme for JavaScript, CSS and HTML\n   * Based on the slides of the talk “/Reg(exp){2}lained/”\n   * @author Lea Verou\n   */\n  /* Code blocks */\n  /* Inline code */\n}\n\n[data-code-block-theme=dark] div[data-type=codeBlock] code[class*=language-],\n[data-code-block-theme=dark] div[data-type=codeBlock] pre[class*=language-] {\n  color: white;\n  background: none;\n  text-shadow: 0 -0.1em 0.2em black;\n  font-family: Consolas, Monaco, \"Andale Mono\", \"Ubuntu Mono\", monospace;\n  font-size: 1em;\n  text-align: left;\n  white-space: pre;\n  word-spacing: normal;\n  word-break: normal;\n  word-wrap: normal;\n  line-height: 1.5;\n  -moz-tab-size: 4;\n  -o-tab-size: 4;\n  tab-size: 4;\n  -webkit-hyphens: none;\n  -moz-hyphens: none;\n  -ms-hyphens: none;\n  hyphens: none;\n}\n\n@media print {\n\n  [data-code-block-theme=dark] div[data-type=codeBlock] code[class*=language-],\n  [data-code-block-theme=dark] div[data-type=codeBlock] pre[class*=language-] {\n    text-shadow: none;\n  }\n}\n\n[data-code-block-theme=dark] div[data-type=codeBlock] pre[class*=language-],\n[data-code-block-theme=dark] div[data-type=codeBlock] :not(pre)>code[class*=language-] {\n  background: hsl(30deg, 20%, 25%);\n}\n\n[data-code-block-theme=dark] div[data-type=codeBlock] pre[class*=language-] {\n  padding: 1em;\n  margin: 0.5em 0;\n  overflow: auto;\n  border: 0.3em solid hsl(30deg, 20%, 40%);\n  border-radius: 0.5em;\n  box-shadow: 1px 1px 0.5em black inset;\n}\n\n[data-code-block-theme=dark] div[data-type=codeBlock] :not(pre)>code[class*=language-] {\n  padding: 0.15em 0.2em 0.05em;\n  border-radius: 0.3em;\n  border: 0.13em solid hsl(30deg, 20%, 40%);\n  box-shadow: 1px 1px 0.3em -0.1em black inset;\n  white-space: normal;\n}\n\n[data-code-block-theme=dark] div[data-type=codeBlock] .token.comment,\n[data-code-block-theme=dark] div[data-type=codeBlock] .token.prolog,\n[data-code-block-theme=dark] div[data-type=codeBlock] .token.doctype,\n[data-code-block-theme=dark] div[data-type=codeBlock] .token.cdata {\n  color: hsl(30deg, 20%, 50%);\n}\n\n[data-code-block-theme=dark] div[data-type=codeBlock] .token.punctuation {\n  opacity: 0.7;\n}\n\n[data-code-block-theme=dark] div[data-type=codeBlock] .token.namespace {\n  opacity: 0.7;\n}\n\n[data-code-block-theme=dark] div[data-type=codeBlock] .token.property,\n[data-code-block-theme=dark] div[data-type=codeBlock] .token.tag,\n[data-code-block-theme=dark] div[data-type=codeBlock] .token.boolean,\n[data-code-block-theme=dark] div[data-type=codeBlock] .token.number,\n[data-code-block-theme=dark] div[data-type=codeBlock] .token.constant,\n[data-code-block-theme=dark] div[data-type=codeBlock] .token.symbol {\n  color: hsl(350deg, 40%, 70%);\n}\n\n[data-code-block-theme=dark] div[data-type=codeBlock] .token.selector,\n[data-code-block-theme=dark] div[data-type=codeBlock] .token.attr-name,\n[data-code-block-theme=dark] div[data-type=codeBlock] .token.string,\n[data-code-block-theme=dark] div[data-type=codeBlock] .token.char,\n[data-code-block-theme=dark] div[data-type=codeBlock] .token.builtin,\n[data-code-block-theme=dark] div[data-type=codeBlock] .token.inserted {\n  color: hsl(75deg, 70%, 60%);\n}\n\n[data-code-block-theme=dark] div[data-type=codeBlock] .token.operator,\n[data-code-block-theme=dark] div[data-type=codeBlock] .token.entity,\n[data-code-block-theme=dark] div[data-type=codeBlock] .token.url,\n[data-code-block-theme=dark] div[data-type=codeBlock] .language-css .token.string,\n[data-code-block-theme=dark] div[data-type=codeBlock] .style .token.string,\n[data-code-block-theme=dark] div[data-type=codeBlock] .token.variable {\n  color: hsl(40deg, 90%, 60%);\n}\n\n[data-code-block-theme=dark] div[data-type=codeBlock] .token.atrule,\n[data-code-block-theme=dark] div[data-type=codeBlock] .token.attr-value,\n[data-code-block-theme=dark] div[data-type=codeBlock] .token.keyword {\n  color: hsl(350deg, 40%, 70%);\n}\n\n[data-code-block-theme=dark] div[data-type=codeBlock] .token.regex,\n[data-code-block-theme=dark] div[data-type=codeBlock] .token.important {\n  color: #e90;\n}\n\n[data-code-block-theme=dark] div[data-type=codeBlock] .token.important,\n[data-code-block-theme=dark] div[data-type=codeBlock] .token.bold {\n  font-weight: bold;\n}\n\n[data-code-block-theme=dark] div[data-type=codeBlock] .token.italic {\n  font-style: italic;\n}\n\n[data-code-block-theme=dark] div[data-type=codeBlock] .token.entity {\n  cursor: help;\n}\n\n[data-code-block-theme=dark] div[data-type=codeBlock] .token.deleted {\n  color: red;\n}\n\n[data-code-block-theme=funky] div[data-type=codeBlock] {\n  /* PrismJS 1.23.0\n  https://prismjs.com/download.html#themes=prism-funky&languages=markup+css+clike+javascript+abap+abnf+actionscript+ada+agda+al+antlr4+apacheconf+apex+apl+applescript+aql+arduino+arff+asciidoc+aspnet+asm6502+autohotkey+autoit+bash+basic+batch+bbcode+birb+bison+bnf+brainfuck+brightscript+bro+bsl+c+csharp+cpp+cfscript+chaiscript+cil+clojure+cmake+cobol+coffeescript+concurnas+csp+coq+crystal+css-extras+csv+cypher+d+dart+dataweave+dax+dhall+diff+django+dns-zone-file+docker+dot+ebnf+editorconfig+eiffel+ejs+elixir+elm+etlua+erb+erlang+excel-formula+fsharp+factor+false+firestore-security-rules+flow+fortran+ftl+gml+gcode+gdscript+gedcom+gherkin+git+glsl+go+graphql+groovy+haml+handlebars+haskell+haxe+hcl+hlsl+http+hpkp+hsts+ichigojam+icon+icu-message-format+ignore+inform7+ini+io+j+java+javadoc+javadoclike+javastacktrace+jexl+jolie+jq+jsdoc+js-extras+json+json5+jsonp+jsstacktrace+js-templates+julia+keyman+kotlin+kumir+latte+less+lilypond+liquid+lisp+livescript+llvm+log+lolcode+lua+makefile+markdown+markup-templating+matlab+mel+mizar+mongodb+monkey+moonscript+n1ql+n4js+nand2tetris-hdl+naniscript+nasm+neon+nevod+nginx+nim+nix+nsis+objectivec+ocaml+opencl+openqasm+oz+parigp+parser+pascal+pascaligo+psl+pcaxis+peoplecode+perl+php+phpdoc+php-extras+plsql+powerquery+powershell+processing+prolog+promql+properties+protobuf+pug+puppet+pure+purebasic+purescript+python+qsharp+q+qml+qore+r+racket+jsx+tsx+reason+regex+rego+renpy+rest+rip+roboconf+robotframework+ruby+rust+sas+sass+scss+scala+scheme+shell-session+smali+smalltalk+smarty+sml+solidity+solution-file+soy+sparql+splunk-spl+sqf+sql+squirrel+stan+iecst+stylus+swift+t4-templating+t4-cs+t4-vb+tap+tcl+tt2+textile+toml+turtle+twig+typescript+typoscript+unrealscript+uri+v+vala+vbnet+velocity+verilog+vhdl+vim+visual-basic+warpscript+wasm+wiki+wolfram+xeora+xml-doc+xojo+xquery+yaml+yang+zig */\n  /**\n   * prism.js Funky theme\n   * Based on “Polyfilling the gaps” talk slides http://lea.verou.me/polyfilling-the-gaps/\n   * @author Lea Verou\n   */\n  /* Code blocks */\n  /* Inline code */\n  /* Plugin styles: Diff Highlight */\n}\n\n[data-code-block-theme=funky] div[data-type=codeBlock] code[class*=language-],\n[data-code-block-theme=funky] div[data-type=codeBlock] pre[class*=language-] {\n  font-family: Consolas, Monaco, \"Andale Mono\", \"Ubuntu Mono\", monospace;\n  font-size: 1em;\n  text-align: left;\n  white-space: pre;\n  word-spacing: normal;\n  word-break: normal;\n  word-wrap: normal;\n  line-height: 1.5;\n  -moz-tab-size: 4;\n  -o-tab-size: 4;\n  tab-size: 4;\n  -webkit-hyphens: none;\n  -moz-hyphens: none;\n  -ms-hyphens: none;\n  hyphens: none;\n}\n\n[data-code-block-theme=funky] div[data-type=codeBlock] pre[class*=language-] {\n  padding: 0.4em 0.8em;\n  margin: 0.5em 0;\n  overflow: auto;\n  background: url('data:image/svg+xml;charset=utf-8,<svg%20version%3D\"1.1\"%20xmlns%3D\"http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg\"%20width%3D\"100\"%20height%3D\"100\"%20fill%3D\"rgba(0%2C0%2C0%2C.2)\">%0D%0A<polygon%20points%3D\"0%2C50%2050%2C0%200%2C0\"%20%2F>%0D%0A<polygon%20points%3D\"0%2C100%2050%2C100%20100%2C50%20100%2C0\"%20%2F>%0D%0A<%2Fsvg>');\n  background-size: 1em 1em;\n}\n\n[data-code-block-theme=funky] div[data-type=codeBlock] code[class*=language-] {\n  background: black;\n  color: white;\n  box-shadow: -0.3em 0 0 0.3em black, 0.3em 0 0 0.3em black;\n}\n\n[data-code-block-theme=funky] div[data-type=codeBlock] :not(pre)>code[class*=language-] {\n  padding: 0.2em;\n  border-radius: 0.3em;\n  box-shadow: none;\n  white-space: normal;\n}\n\n[data-code-block-theme=funky] div[data-type=codeBlock] .token.comment,\n[data-code-block-theme=funky] div[data-type=codeBlock] .token.prolog,\n[data-code-block-theme=funky] div[data-type=codeBlock] .token.doctype,\n[data-code-block-theme=funky] div[data-type=codeBlock] .token.cdata {\n  color: #aaa;\n}\n\n[data-code-block-theme=funky] div[data-type=codeBlock] .token.punctuation {\n  color: #999;\n}\n\n[data-code-block-theme=funky] div[data-type=codeBlock] .token.namespace {\n  opacity: 0.7;\n}\n\n[data-code-block-theme=funky] div[data-type=codeBlock] .token.property,\n[data-code-block-theme=funky] div[data-type=codeBlock] .token.tag,\n[data-code-block-theme=funky] div[data-type=codeBlock] .token.boolean,\n[data-code-block-theme=funky] div[data-type=codeBlock] .token.number,\n[data-code-block-theme=funky] div[data-type=codeBlock] .token.constant,\n[data-code-block-theme=funky] div[data-type=codeBlock] .token.symbol {\n  color: #0cf;\n}\n\n[data-code-block-theme=funky] div[data-type=codeBlock] .token.selector,\n[data-code-block-theme=funky] div[data-type=codeBlock] .token.attr-name,\n[data-code-block-theme=funky] div[data-type=codeBlock] .token.string,\n[data-code-block-theme=funky] div[data-type=codeBlock] .token.char,\n[data-code-block-theme=funky] div[data-type=codeBlock] .token.builtin {\n  color: yellow;\n}\n\n[data-code-block-theme=funky] div[data-type=codeBlock] .token.operator,\n[data-code-block-theme=funky] div[data-type=codeBlock] .token.entity,\n[data-code-block-theme=funky] div[data-type=codeBlock] .token.url,\n[data-code-block-theme=funky] div[data-type=codeBlock] .language-css .token.string,\n[data-code-block-theme=funky] div[data-type=codeBlock] .token.variable,\n[data-code-block-theme=funky] div[data-type=codeBlock] .token.inserted {\n  color: yellowgreen;\n}\n\n[data-code-block-theme=funky] div[data-type=codeBlock] .token.atrule,\n[data-code-block-theme=funky] div[data-type=codeBlock] .token.attr-value,\n[data-code-block-theme=funky] div[data-type=codeBlock] .token.keyword {\n  color: deeppink;\n}\n\n[data-code-block-theme=funky] div[data-type=codeBlock] .token.regex,\n[data-code-block-theme=funky] div[data-type=codeBlock] .token.important {\n  color: orange;\n}\n\n[data-code-block-theme=funky] div[data-type=codeBlock] .token.important,\n[data-code-block-theme=funky] div[data-type=codeBlock] .token.bold {\n  font-weight: bold;\n}\n\n[data-code-block-theme=funky] div[data-type=codeBlock] .token.italic {\n  font-style: italic;\n}\n\n[data-code-block-theme=funky] div[data-type=codeBlock] .token.entity {\n  cursor: help;\n}\n\n[data-code-block-theme=funky] div[data-type=codeBlock] .token.deleted {\n  color: red;\n}\n\n[data-code-block-theme=funky] div[data-type=codeBlock] pre.diff-highlight.diff-highlight>code .token.deleted:not(.prefix),\n[data-code-block-theme=funky] div[data-type=codeBlock] pre>code.diff-highlight.diff-highlight .token.deleted:not(.prefix) {\n  background-color: rgba(255, 0, 0, 0.3);\n  display: inline;\n}\n\n[data-code-block-theme=funky] div[data-type=codeBlock] pre.diff-highlight.diff-highlight>code .token.inserted:not(.prefix),\n[data-code-block-theme=funky] div[data-type=codeBlock] pre>code.diff-highlight.diff-highlight .token.inserted:not(.prefix) {\n  background-color: rgba(0, 255, 128, 0.3);\n  display: inline;\n}\n\n[data-code-block-theme=okaidia] div[data-type=codeBlock] {\n  /* PrismJS 1.23.0\n  https://prismjs.com/download.html#themes=prism-okaidia&languages=markup+css+clike+javascript+abap+abnf+actionscript+ada+agda+al+antlr4+apacheconf+apex+apl+applescript+aql+arduino+arff+asciidoc+aspnet+asm6502+autohotkey+autoit+bash+basic+batch+bbcode+birb+bison+bnf+brainfuck+brightscript+bro+bsl+c+csharp+cpp+cfscript+chaiscript+cil+clojure+cmake+cobol+coffeescript+concurnas+csp+coq+crystal+css-extras+csv+cypher+d+dart+dataweave+dax+dhall+diff+django+dns-zone-file+docker+dot+ebnf+editorconfig+eiffel+ejs+elixir+elm+etlua+erb+erlang+excel-formula+fsharp+factor+false+firestore-security-rules+flow+fortran+ftl+gml+gcode+gdscript+gedcom+gherkin+git+glsl+go+graphql+groovy+haml+handlebars+haskell+haxe+hcl+hlsl+http+hpkp+hsts+ichigojam+icon+icu-message-format+ignore+inform7+ini+io+j+java+javadoc+javadoclike+javastacktrace+jexl+jolie+jq+jsdoc+js-extras+json+json5+jsonp+jsstacktrace+js-templates+julia+keyman+kotlin+kumir+latte+less+lilypond+liquid+lisp+livescript+llvm+log+lolcode+lua+makefile+markdown+markup-templating+matlab+mel+mizar+mongodb+monkey+moonscript+n1ql+n4js+nand2tetris-hdl+naniscript+nasm+neon+nevod+nginx+nim+nix+nsis+objectivec+ocaml+opencl+openqasm+oz+parigp+parser+pascal+pascaligo+psl+pcaxis+peoplecode+perl+php+phpdoc+php-extras+plsql+powerquery+powershell+processing+prolog+promql+properties+protobuf+pug+puppet+pure+purebasic+purescript+python+qsharp+q+qml+qore+r+racket+jsx+tsx+reason+regex+rego+renpy+rest+rip+roboconf+robotframework+ruby+rust+sas+sass+scss+scala+scheme+shell-session+smali+smalltalk+smarty+sml+solidity+solution-file+soy+sparql+splunk-spl+sqf+sql+squirrel+stan+iecst+stylus+swift+t4-templating+t4-cs+t4-vb+tap+tcl+tt2+textile+toml+turtle+twig+typescript+typoscript+unrealscript+uri+v+vala+vbnet+velocity+verilog+vhdl+vim+visual-basic+warpscript+wasm+wiki+wolfram+xeora+xml-doc+xojo+xquery+yaml+yang+zig */\n  /**\n   * okaidia theme for JavaScript, CSS and HTML\n   * Loosely based on Monokai textmate theme by http://www.monokai.nl/\n   * @author ocodia\n   */\n  /* Code blocks */\n  /* Inline code */\n}\n\n[data-code-block-theme=okaidia] div[data-type=codeBlock] code[class*=language-],\n[data-code-block-theme=okaidia] div[data-type=codeBlock] pre[class*=language-] {\n  color: #f8f8f2;\n  background: none;\n  text-shadow: 0 1px rgba(0, 0, 0, 0.3);\n  font-family: Consolas, Monaco, \"Andale Mono\", \"Ubuntu Mono\", monospace;\n  font-size: 1em;\n  text-align: left;\n  white-space: pre;\n  word-spacing: normal;\n  word-break: normal;\n  word-wrap: normal;\n  line-height: 1.5;\n  -moz-tab-size: 4;\n  -o-tab-size: 4;\n  tab-size: 4;\n  -webkit-hyphens: none;\n  -moz-hyphens: none;\n  -ms-hyphens: none;\n  hyphens: none;\n}\n\n[data-code-block-theme=okaidia] div[data-type=codeBlock] pre[class*=language-] {\n  padding: 1em;\n  margin: 0.5em 0;\n  overflow: auto;\n  border-radius: 0.3em;\n}\n\n[data-code-block-theme=okaidia] div[data-type=codeBlock] :not(pre)>code[class*=language-],\n[data-code-block-theme=okaidia] div[data-type=codeBlock] pre[class*=language-] {\n  background: #272822;\n}\n\n[data-code-block-theme=okaidia] div[data-type=codeBlock] :not(pre)>code[class*=language-] {\n  padding: 0.1em;\n  border-radius: 0.3em;\n  white-space: normal;\n}\n\n[data-code-block-theme=okaidia] div[data-type=codeBlock] .token.comment,\n[data-code-block-theme=okaidia] div[data-type=codeBlock] .token.prolog,\n[data-code-block-theme=okaidia] div[data-type=codeBlock] .token.doctype,\n[data-code-block-theme=okaidia] div[data-type=codeBlock] .token.cdata {\n  color: #8292a2;\n}\n\n[data-code-block-theme=okaidia] div[data-type=codeBlock] .token.punctuation {\n  color: #f8f8f2;\n}\n\n[data-code-block-theme=okaidia] div[data-type=codeBlock] .token.namespace {\n  opacity: 0.7;\n}\n\n[data-code-block-theme=okaidia] div[data-type=codeBlock] .token.property,\n[data-code-block-theme=okaidia] div[data-type=codeBlock] .token.tag,\n[data-code-block-theme=okaidia] div[data-type=codeBlock] .token.constant,\n[data-code-block-theme=okaidia] div[data-type=codeBlock] .token.symbol,\n[data-code-block-theme=okaidia] div[data-type=codeBlock] .token.deleted {\n  color: #f92672;\n}\n\n[data-code-block-theme=okaidia] div[data-type=codeBlock] .token.boolean,\n[data-code-block-theme=okaidia] div[data-type=codeBlock] .token.number {\n  color: #ae81ff;\n}\n\n[data-code-block-theme=okaidia] div[data-type=codeBlock] .token.selector,\n[data-code-block-theme=okaidia] div[data-type=codeBlock] .token.attr-name,\n[data-code-block-theme=okaidia] div[data-type=codeBlock] .token.string,\n[data-code-block-theme=okaidia] div[data-type=codeBlock] .token.char,\n[data-code-block-theme=okaidia] div[data-type=codeBlock] .token.builtin,\n[data-code-block-theme=okaidia] div[data-type=codeBlock] .token.inserted {\n  color: #a6e22e;\n}\n\n[data-code-block-theme=okaidia] div[data-type=codeBlock] .token.operator,\n[data-code-block-theme=okaidia] div[data-type=codeBlock] .token.entity,\n[data-code-block-theme=okaidia] div[data-type=codeBlock] .token.url,\n[data-code-block-theme=okaidia] div[data-type=codeBlock] .language-css .token.string,\n[data-code-block-theme=okaidia] div[data-type=codeBlock] .style .token.string,\n[data-code-block-theme=okaidia] div[data-type=codeBlock] .token.variable {\n  color: #f8f8f2;\n}\n\n[data-code-block-theme=okaidia] div[data-type=codeBlock] .token.atrule,\n[data-code-block-theme=okaidia] div[data-type=codeBlock] .token.attr-value,\n[data-code-block-theme=okaidia] div[data-type=codeBlock] .token.function,\n[data-code-block-theme=okaidia] div[data-type=codeBlock] .token.class-name {\n  color: #e6db74;\n}\n\n[data-code-block-theme=okaidia] div[data-type=codeBlock] .token.keyword {\n  color: #66d9ef;\n}\n\n[data-code-block-theme=okaidia] div[data-type=codeBlock] .token.regex,\n[data-code-block-theme=okaidia] div[data-type=codeBlock] .token.important {\n  color: #fd971f;\n}\n\n[data-code-block-theme=okaidia] div[data-type=codeBlock] .token.important,\n[data-code-block-theme=okaidia] div[data-type=codeBlock] .token.bold {\n  font-weight: bold;\n}\n\n[data-code-block-theme=okaidia] div[data-type=codeBlock] .token.italic {\n  font-style: italic;\n}\n\n[data-code-block-theme=okaidia] div[data-type=codeBlock] .token.entity {\n  cursor: help;\n}\n\n[data-code-block-theme=twilight] div[data-type=codeBlock] {\n  /* PrismJS 1.23.0\n  https://prismjs.com/download.html#themes=prism-twilight&languages=markup+css+clike+javascript+abap+abnf+actionscript+ada+agda+al+antlr4+apacheconf+apex+apl+applescript+aql+arduino+arff+asciidoc+aspnet+asm6502+autohotkey+autoit+bash+basic+batch+bbcode+birb+bison+bnf+brainfuck+brightscript+bro+bsl+c+csharp+cpp+cfscript+chaiscript+cil+clojure+cmake+cobol+coffeescript+concurnas+csp+coq+crystal+css-extras+csv+cypher+d+dart+dataweave+dax+dhall+diff+django+dns-zone-file+docker+dot+ebnf+editorconfig+eiffel+ejs+elixir+elm+etlua+erb+erlang+excel-formula+fsharp+factor+false+firestore-security-rules+flow+fortran+ftl+gml+gcode+gdscript+gedcom+gherkin+git+glsl+go+graphql+groovy+haml+handlebars+haskell+haxe+hcl+hlsl+http+hpkp+hsts+ichigojam+icon+icu-message-format+idris+ignore+inform7+ini+io+j+java+javadoc+javadoclike+javastacktrace+jexl+jolie+jq+jsdoc+js-extras+json+json5+jsonp+jsstacktrace+js-templates+julia+keyman+kotlin+kumir+latex+latte+less+lilypond+liquid+lisp+livescript+llvm+log+lolcode+lua+makefile+markdown+markup-templating+matlab+mel+mizar+mongodb+monkey+moonscript+n1ql+n4js+nand2tetris-hdl+naniscript+nasm+neon+nevod+nginx+nim+nix+nsis+objectivec+ocaml+opencl+openqasm+oz+parigp+parser+pascal+pascaligo+psl+pcaxis+peoplecode+perl+php+phpdoc+php-extras+plsql+powerquery+powershell+processing+prolog+promql+properties+protobuf+pug+puppet+pure+purebasic+purescript+python+qsharp+q+qml+qore+r+racket+jsx+tsx+reason+regex+rego+renpy+rest+rip+roboconf+robotframework+ruby+rust+sas+sass+scss+scala+scheme+shell-session+smali+smalltalk+smarty+sml+solidity+solution-file+soy+sparql+splunk-spl+sqf+sql+squirrel+stan+iecst+stylus+swift+t4-templating+t4-cs+t4-vb+tap+tcl+tt2+textile+toml+turtle+twig+typescript+typoscript+unrealscript+uri+v+vala+vbnet+velocity+verilog+vhdl+vim+visual-basic+warpscript+wasm+wiki+wolfram+xeora+xml-doc+xojo+xquery+yaml+yang+zig */\n  /**\n   * prism.js Twilight theme\n   * Based (more or less) on the Twilight theme originally of Textmate fame.\n   * @author Remy Bach\n   */\n  /* Code blocks */\n  /* Text Selection colour */\n  /* Inline code */\n  /* Markup */\n  /* Make the tokens sit above the line highlight so the colours don't look faded. */\n}\n\n[data-code-block-theme=twilight] div[data-type=codeBlock] code[class*=language-],\n[data-code-block-theme=twilight] div[data-type=codeBlock] pre[class*=language-] {\n  color: white;\n  background: none;\n  font-family: Consolas, Monaco, \"Andale Mono\", \"Ubuntu Mono\", monospace;\n  font-size: 1em;\n  text-align: left;\n  text-shadow: 0 -0.1em 0.2em black;\n  white-space: pre;\n  word-spacing: normal;\n  word-break: normal;\n  word-wrap: normal;\n  line-height: 1.5;\n  -moz-tab-size: 4;\n  -o-tab-size: 4;\n  tab-size: 4;\n  -webkit-hyphens: none;\n  -moz-hyphens: none;\n  -ms-hyphens: none;\n  hyphens: none;\n}\n\n[data-code-block-theme=twilight] div[data-type=codeBlock] pre[class*=language-],\n[data-code-block-theme=twilight] div[data-type=codeBlock] :not(pre)>code[class*=language-] {\n  background: hsl(0deg, 0%, 8%);\n  /* #141414 */\n}\n\n[data-code-block-theme=twilight] div[data-type=codeBlock] pre[class*=language-] {\n  border-radius: 0.5em;\n  border: 0.3em solid hsl(0deg, 0%, 33%);\n  /* #282A2B */\n  box-shadow: 1px 1px 0.5em black inset;\n  margin: 0.5em 0;\n  overflow: auto;\n  padding: 1em;\n}\n\n[data-code-block-theme=twilight] div[data-type=codeBlock] pre[class*=language-]::-moz-selection {\n  /* Firefox */\n  background: hsl(200deg, 4%, 16%);\n  /* #282A2B */\n}\n\n[data-code-block-theme=twilight] div[data-type=codeBlock] pre[class*=language-]::selection {\n  /* Safari */\n  background: hsl(200deg, 4%, 16%);\n  /* #282A2B */\n}\n\n[data-code-block-theme=twilight] div[data-type=codeBlock] pre[class*=language-]::-moz-selection,\n[data-code-block-theme=twilight] div[data-type=codeBlock] pre[class*=language-] ::-moz-selection,\n[data-code-block-theme=twilight] div[data-type=codeBlock] code[class*=language-]::-moz-selection,\n[data-code-block-theme=twilight] div[data-type=codeBlock] code[class*=language-] ::-moz-selection {\n  text-shadow: none;\n  background: hsla(0deg, 0%, 93%, 0.15);\n  /* #EDEDED */\n}\n\n[data-code-block-theme=twilight] div[data-type=codeBlock] pre[class*=language-]::selection,\n[data-code-block-theme=twilight] div[data-type=codeBlock] pre[class*=language-] ::selection,\n[data-code-block-theme=twilight] div[data-type=codeBlock] code[class*=language-]::selection,\n[data-code-block-theme=twilight] div[data-type=codeBlock] code[class*=language-] ::selection {\n  text-shadow: none;\n  background: hsla(0deg, 0%, 93%, 0.15);\n  /* #EDEDED */\n}\n\n[data-code-block-theme=twilight] div[data-type=codeBlock] :not(pre)>code[class*=language-] {\n  border-radius: 0.3em;\n  border: 0.13em solid hsl(0deg, 0%, 33%);\n  /* #545454 */\n  box-shadow: 1px 1px 0.3em -0.1em black inset;\n  padding: 0.15em 0.2em 0.05em;\n  white-space: normal;\n}\n\n[data-code-block-theme=twilight] div[data-type=codeBlock] .token.comment,\n[data-code-block-theme=twilight] div[data-type=codeBlock] .token.prolog,\n[data-code-block-theme=twilight] div[data-type=codeBlock] .token.doctype,\n[data-code-block-theme=twilight] div[data-type=codeBlock] .token.cdata {\n  color: hsl(0deg, 0%, 47%);\n  /* #777777 */\n}\n\n[data-code-block-theme=twilight] div[data-type=codeBlock] .token.punctuation {\n  opacity: 0.7;\n}\n\n[data-code-block-theme=twilight] div[data-type=codeBlock] .token.namespace {\n  opacity: 0.7;\n}\n\n[data-code-block-theme=twilight] div[data-type=codeBlock] .token.tag,\n[data-code-block-theme=twilight] div[data-type=codeBlock] .token.boolean,\n[data-code-block-theme=twilight] div[data-type=codeBlock] .token.number,\n[data-code-block-theme=twilight] div[data-type=codeBlock] .token.deleted {\n  color: hsl(14deg, 58%, 55%);\n  /* #CF6A4C */\n}\n\n[data-code-block-theme=twilight] div[data-type=codeBlock] .token.keyword,\n[data-code-block-theme=twilight] div[data-type=codeBlock] .token.property,\n[data-code-block-theme=twilight] div[data-type=codeBlock] .token.selector,\n[data-code-block-theme=twilight] div[data-type=codeBlock] .token.constant,\n[data-code-block-theme=twilight] div[data-type=codeBlock] .token.symbol,\n[data-code-block-theme=twilight] div[data-type=codeBlock] .token.builtin {\n  color: hsl(53deg, 89%, 79%);\n  /* #F9EE98 */\n}\n\n[data-code-block-theme=twilight] div[data-type=codeBlock] .token.attr-name,\n[data-code-block-theme=twilight] div[data-type=codeBlock] .token.attr-value,\n[data-code-block-theme=twilight] div[data-type=codeBlock] .token.string,\n[data-code-block-theme=twilight] div[data-type=codeBlock] .token.char,\n[data-code-block-theme=twilight] div[data-type=codeBlock] .token.operator,\n[data-code-block-theme=twilight] div[data-type=codeBlock] .token.entity,\n[data-code-block-theme=twilight] div[data-type=codeBlock] .token.url,\n[data-code-block-theme=twilight] div[data-type=codeBlock] .language-css .token.string,\n[data-code-block-theme=twilight] div[data-type=codeBlock] .style .token.string,\n[data-code-block-theme=twilight] div[data-type=codeBlock] .token.variable,\n[data-code-block-theme=twilight] div[data-type=codeBlock] .token.inserted {\n  color: hsl(76deg, 21%, 52%);\n  /* #8F9D6A */\n}\n\n[data-code-block-theme=twilight] div[data-type=codeBlock] .token.atrule {\n  color: hsl(218deg, 22%, 55%);\n  /* #7587A6 */\n}\n\n[data-code-block-theme=twilight] div[data-type=codeBlock] .token.regex,\n[data-code-block-theme=twilight] div[data-type=codeBlock] .token.important {\n  color: hsl(42deg, 75%, 65%);\n  /* #E9C062 */\n}\n\n[data-code-block-theme=twilight] div[data-type=codeBlock] .token.important,\n[data-code-block-theme=twilight] div[data-type=codeBlock] .token.bold {\n  font-weight: bold;\n}\n\n[data-code-block-theme=twilight] div[data-type=codeBlock] .token.italic {\n  font-style: italic;\n}\n\n[data-code-block-theme=twilight] div[data-type=codeBlock] .token.entity {\n  cursor: help;\n}\n\n[data-code-block-theme=twilight] div[data-type=codeBlock] pre[data-line] {\n  padding: 1em 0 1em 3em;\n  position: relative;\n}\n\n[data-code-block-theme=twilight] div[data-type=codeBlock] .language-markup .token.tag,\n[data-code-block-theme=twilight] div[data-type=codeBlock] .language-markup .token.attr-name,\n[data-code-block-theme=twilight] div[data-type=codeBlock] .language-markup .token.punctuation {\n  color: hsl(33deg, 33%, 52%);\n  /* #AC885B */\n}\n\n[data-code-block-theme=twilight] div[data-type=codeBlock] .token {\n  position: relative;\n  z-index: 1;\n}\n\n[data-code-block-theme=twilight] div[data-type=codeBlock] .line-highlight {\n  background: hsla(0deg, 0%, 33%, 0.25);\n  /* #545454 */\n  background: linear-gradient(to right, hsla(0deg, 0%, 33%, 0.1) 70%, hsla(0deg, 0%, 33%, 0));\n  /* #545454 */\n  border-bottom: 1px dashed hsl(0deg, 0%, 33%);\n  /* #545454 */\n  border-top: 1px dashed hsl(0deg, 0%, 33%);\n  /* #545454 */\n  left: 0;\n  line-height: inherit;\n  margin-top: 0.75em;\n  /* Same as .prism’s padding-top */\n  padding: inherit 0;\n  pointer-events: none;\n  position: absolute;\n  right: 0;\n  white-space: pre;\n  z-index: 0;\n}\n\n[data-code-block-theme=twilight] div[data-type=codeBlock] .line-highlight:before,\n[data-code-block-theme=twilight] div[data-type=codeBlock] .line-highlight[data-end]:after {\n  background-color: hsl(215deg, 15%, 59%);\n  /* #8794A6 */\n  border-radius: 999px;\n  box-shadow: 0 1px white;\n  color: hsl(24deg, 20%, 95%);\n  /* #F5F2F0 */\n  content: attr(data-start);\n  font: bold 65%/1.5 sans-serif;\n  left: 0.6em;\n  min-width: 1em;\n  padding: 0 0.5em;\n  position: absolute;\n  text-align: center;\n  text-shadow: none;\n  top: 0.4em;\n  vertical-align: 0.3em;\n}\n\n[data-code-block-theme=twilight] div[data-type=codeBlock] .line-highlight[data-end]:after {\n  bottom: 0.4em;\n  content: attr(data-end);\n  top: auto;\n}\n\n[data-code-block-theme=coy] div[data-type=codeBlock] {\n  /* PrismJS 1.23.0\n  https://prismjs.com/download.html#themes=prism-coy&languages=markup+css+clike+javascript+abap+abnf+actionscript+ada+agda+al+antlr4+apacheconf+apex+apl+applescript+aql+arduino+arff+asciidoc+aspnet+asm6502+autohotkey+autoit+bash+basic+batch+bbcode+birb+bison+bnf+brainfuck+brightscript+bro+bsl+c+csharp+cpp+cfscript+chaiscript+cil+clojure+cmake+cobol+coffeescript+concurnas+csp+coq+crystal+css-extras+csv+cypher+d+dart+dataweave+dax+dhall+diff+django+dns-zone-file+docker+dot+ebnf+editorconfig+eiffel+ejs+elixir+elm+etlua+erb+erlang+excel-formula+fsharp+factor+false+firestore-security-rules+flow+fortran+ftl+gml+gcode+gdscript+gedcom+gherkin+git+glsl+go+graphql+groovy+haml+handlebars+haskell+haxe+hcl+hlsl+http+hpkp+hsts+ichigojam+icon+icu-message-format+idris+ignore+inform7+ini+io+j+java+javadoc+javadoclike+javastacktrace+jexl+jolie+jq+jsdoc+js-extras+json+json5+jsonp+jsstacktrace+js-templates+julia+keyman+kotlin+kumir+latex+latte+less+lilypond+liquid+lisp+livescript+llvm+log+lolcode+lua+makefile+markdown+markup-templating+matlab+mel+mizar+mongodb+monkey+moonscript+n1ql+n4js+nand2tetris-hdl+naniscript+nasm+neon+nevod+nginx+nim+nix+nsis+objectivec+ocaml+opencl+openqasm+oz+parigp+parser+pascal+pascaligo+psl+pcaxis+peoplecode+perl+php+phpdoc+php-extras+plsql+powerquery+powershell+processing+prolog+promql+properties+protobuf+pug+puppet+pure+purebasic+purescript+python+qsharp+q+qml+qore+r+racket+jsx+tsx+reason+regex+rego+renpy+rest+rip+roboconf+robotframework+ruby+rust+sas+sass+scss+scala+scheme+shell-session+smali+smalltalk+smarty+sml+solidity+solution-file+soy+sparql+splunk-spl+sqf+sql+squirrel+stan+iecst+stylus+swift+t4-templating+t4-cs+t4-vb+tap+tcl+tt2+textile+toml+turtle+twig+typescript+typoscript+unrealscript+uri+v+vala+vbnet+velocity+verilog+vhdl+vim+visual-basic+warpscript+wasm+wiki+wolfram+xeora+xml-doc+xojo+xquery+yaml+yang+zig */\n  /**\n   * prism.js Coy theme for JavaScript, CoffeeScript, CSS and HTML\n   * Based on https://github.com/tshedor/workshop-wp-theme (Example: http://workshop.kansan.com/category/sessions/basics or http://workshop.timshedor.com/category/sessions/basics);\n   * @author Tim  Shedor\n   */\n  /* Code blocks */\n  /* Margin bottom to accommodate shadow */\n  /* Inline code */\n  /* Plugin styles: Line Numbers */\n  /* Plugin styles: Line Highlight */\n}\n\n[data-code-block-theme=coy] div[data-type=codeBlock] code[class*=language-],\n[data-code-block-theme=coy] div[data-type=codeBlock] pre[class*=language-] {\n  color: black;\n  background: none;\n  font-family: Consolas, Monaco, \"Andale Mono\", \"Ubuntu Mono\", monospace;\n  font-size: 1em;\n  text-align: left;\n  white-space: pre;\n  word-spacing: normal;\n  word-break: normal;\n  word-wrap: normal;\n  line-height: 1.5;\n  -moz-tab-size: 4;\n  -o-tab-size: 4;\n  tab-size: 4;\n  -webkit-hyphens: none;\n  -moz-hyphens: none;\n  -ms-hyphens: none;\n  hyphens: none;\n}\n\n[data-code-block-theme=coy] div[data-type=codeBlock] pre[class*=language-] {\n  position: relative;\n  margin: 0.5em 0;\n  overflow-y: hidden;\n  padding: 0;\n}\n\n[data-code-block-theme=coy] div[data-type=codeBlock] pre[class*=language-]>code {\n  position: relative;\n  border-left: 10px solid #358ccb;\n  box-shadow: -1px 0px 0px 0px #358ccb, 0px 0px 0px 1px #dfdfdf;\n  background-color: #fdfdfd;\n  background-image: linear-gradient(transparent 50%, rgba(69, 142, 209, 0.04) 50%);\n  background-size: 3em 3em;\n  background-origin: content-box;\n  background-attachment: local;\n}\n\n[data-code-block-theme=coy] div[data-type=codeBlock] code[class*=language-] {\n  max-height: inherit;\n  height: inherit;\n  padding: 0 1em;\n  display: block;\n}\n\n[data-code-block-theme=coy] div[data-type=codeBlock] :not(pre)>code[class*=language-],\n[data-code-block-theme=coy] div[data-type=codeBlock] pre[class*=language-] {\n  background-color: #fdfdfd;\n  -webkit-box-sizing: border-box;\n  -moz-box-sizing: border-box;\n  box-sizing: border-box;\n  margin-bottom: 1em;\n}\n\n[data-code-block-theme=coy] div[data-type=codeBlock] :not(pre)>code[class*=language-] {\n  position: relative;\n  padding: 0.2em;\n  border-radius: 0.3em;\n  color: #c92c2c;\n  border: 1px solid rgba(0, 0, 0, 0.1);\n  display: inline;\n  white-space: normal;\n}\n\n[data-code-block-theme=coy] div[data-type=codeBlock] pre[class*=language-]:before,\n[data-code-block-theme=coy] div[data-type=codeBlock] pre[class*=language-]:after {\n  content: \"\";\n  z-index: -2;\n  display: block;\n  position: absolute;\n  bottom: 0.75em;\n  left: 0.18em;\n  width: 40%;\n  height: 20%;\n  max-height: 13em;\n  box-shadow: 0px 13px 8px #979797;\n  -webkit-transform: rotate(-2deg);\n  -moz-transform: rotate(-2deg);\n  -ms-transform: rotate(-2deg);\n  -o-transform: rotate(-2deg);\n  transform: rotate(-2deg);\n}\n\n.whole-article-wrap > div {\n  display: flex;\n  flex-direction: column;\n}\n\n.whole-article-wrap > div > .markdown-article {\n  width: calc(100% - 260px);\n}\n@media screen and (max-width: 839px) {\n  .toc {\n      display: none !important;\n  }\n  .whole-article-wrap > div > .markdown-article {\n    width: 100%;\n  }\n}\n\n[data-code-block-theme=coy] div[data-type=codeBlock] pre[class*=language-]:after {\n  right: 0.75em;\n  left: auto;\n  -webkit-transform: rotate(2deg);\n  -moz-transform: rotate(2deg);\n  -ms-transform: rotate(2deg);\n  -o-transform: rotate(2deg);\n  transform: rotate(2deg);\n}\n\n[data-code-block-theme=coy] div[data-type=codeBlock] .token.comment,\n[data-code-block-theme=coy] div[data-type=codeBlock] .token.block-comment,\n[data-code-block-theme=coy] div[data-type=codeBlock] .token.prolog,\n[data-code-block-theme=coy] div[data-type=codeBlock] .token.doctype,\n[data-code-block-theme=coy] div[data-type=codeBlock] .token.cdata {\n  color: #7D8B99;\n}\n\n[data-code-block-theme=coy] div[data-type=codeBlock] .token.punctuation {\n  color: #5F6364;\n}\n\n[data-code-block-theme=coy] div[data-type=codeBlock] .token.property,\n[data-code-block-theme=coy] div[data-type=codeBlock] .token.tag,\n[data-code-block-theme=coy] div[data-type=codeBlock] .token.boolean,\n[data-code-block-theme=coy] div[data-type=codeBlock] .token.number,\n[data-code-block-theme=coy] div[data-type=codeBlock] .token.function-name,\n[data-code-block-theme=coy] div[data-type=codeBlock] .token.constant,\n[data-code-block-theme=coy] div[data-type=codeBlock] .token.symbol,\n[data-code-block-theme=coy] div[data-type=codeBlock] .token.deleted {\n  color: #c92c2c;\n}\n\n[data-code-block-theme=coy] div[data-type=codeBlock] .token.selector,\n[data-code-block-theme=coy] div[data-type=codeBlock] .token.attr-name,\n[data-code-block-theme=coy] div[data-type=codeBlock] .token.string,\n[data-code-block-theme=coy] div[data-type=codeBlock] .token.char,\n[data-code-block-theme=coy] div[data-type=codeBlock] .token.function,\n[data-code-block-theme=coy] div[data-type=codeBlock] .token.builtin,\n[data-code-block-theme=coy] div[data-type=codeBlock] .token.inserted {\n  color: #2f9c0a;\n}\n\n[data-code-block-theme=coy] div[data-type=codeBlock] .token.operator,\n[data-code-block-theme=coy] div[data-type=codeBlock] .token.entity,\n[data-code-block-theme=coy] div[data-type=codeBlock] .token.url,\n[data-code-block-theme=coy] div[data-type=codeBlock] .token.variable {\n  color: #a67f59;\n  background: rgba(255, 255, 255, 0.5);\n}\n\n[data-code-block-theme=coy] div[data-type=codeBlock] .token.atrule,\n[data-code-block-theme=coy] div[data-type=codeBlock] .token.attr-value,\n[data-code-block-theme=coy] div[data-type=codeBlock] .token.keyword,\n[data-code-block-theme=coy] div[data-type=codeBlock] .token.class-name {\n  color: #1990b8;\n}\n\n[data-code-block-theme=coy] div[data-type=codeBlock] .token.regex,\n[data-code-block-theme=coy] div[data-type=codeBlock] .token.important {\n  color: #e90;\n}\n\n[data-code-block-theme=coy] div[data-type=codeBlock] .language-css .token.string,\n[data-code-block-theme=coy] div[data-type=codeBlock] .style .token.string {\n  color: #a67f59;\n  background: rgba(255, 255, 255, 0.5);\n}\n\n[data-code-block-theme=coy] div[data-type=codeBlock] .token.important {\n  font-weight: normal;\n}\n\n[data-code-block-theme=coy] div[data-type=codeBlock] .token.bold {\n  font-weight: bold;\n}\n\n[data-code-block-theme=coy] div[data-type=codeBlock] .token.italic {\n  font-style: italic;\n}\n\n[data-code-block-theme=coy] div[data-type=codeBlock] .token.entity {\n  cursor: help;\n}\n\n[data-code-block-theme=coy] div[data-type=codeBlock] .token.namespace {\n  opacity: 0.7;\n}\n\n@media screen and (max-width: 767px) {\n\n  [data-code-block-theme=coy] div[data-type=codeBlock] pre[class*=language-]:before,\n  [data-code-block-theme=coy] div[data-type=codeBlock] pre[class*=language-]:after {\n    bottom: 14px;\n    box-shadow: none;\n  }\n}\n\n[data-code-block-theme=coy] div[data-type=codeBlock] pre[class*=language-].line-numbers.line-numbers {\n  padding-left: 0;\n}\n\n[data-code-block-theme=coy] div[data-type=codeBlock] pre[class*=language-].line-numbers.line-numbers code {\n  padding-left: 3.8em;\n}\n\n[data-code-block-theme=coy] div[data-type=codeBlock] pre[class*=language-].line-numbers.line-numbers .line-numbers-rows {\n  left: 0;\n}\n\n[data-code-block-theme=coy] div[data-type=codeBlock] pre[class*=language-][data-line] {\n  padding-top: 0;\n  padding-bottom: 0;\n  padding-left: 0;\n}\n\n[data-code-block-theme=coy] div[data-type=codeBlock] pre[data-line] code {\n  position: relative;\n  padding-left: 4em;\n}\n\n[data-code-block-theme=coy] div[data-type=codeBlock] pre .line-highlight {\n  margin-top: 0;\n}\n\n[data-code-block-theme=solarized-light] div[data-type=codeBlock] {\n  /* PrismJS 1.23.0\n  https://prismjs.com/download.html#themes=prism-solarizedlight&languages=markup+css+clike+javascript */\n  /*\n   Solarized Color Schemes originally by Ethan Schoonover\n   http://ethanschoonover.com/solarized\n\n   Ported for PrismJS by Hector Matos\n   Website: https://krakendev.io\n   Twitter Handle: https://twitter.com/allonsykraken)\n  */\n  /*\n  SOLARIZED HEX\n  --------- -------\n  base03    #002b36\n  base02    #073642\n  base01    #586e75\n  base00    #657b83\n  base0     #839496\n  base1     #93a1a1\n  base2     #eee8d5\n  base3     #fdf6e3\n  yellow    #b58900\n  orange    #cb4b16\n  red       #dc322f\n  magenta   #d33682\n  violet    #6c71c4\n  blue      #268bd2\n  cyan      #2aa198\n  green     #859900\n  */\n  /* Code blocks */\n  /* Inline code */\n}\n\n[data-code-block-theme=solarized-light] div[data-type=codeBlock] code[class*=language-],\n[data-code-block-theme=solarized-light] div[data-type=codeBlock] pre[class*=language-] {\n  color: #657b83;\n  /* base00 */\n  font-family: Consolas, Monaco, \"Andale Mono\", \"Ubuntu Mono\", monospace;\n  font-size: 1em;\n  text-align: left;\n  white-space: pre;\n  word-spacing: normal;\n  word-break: normal;\n  word-wrap: normal;\n  line-height: 1.5;\n  -moz-tab-size: 4;\n  -o-tab-size: 4;\n  tab-size: 4;\n  -webkit-hyphens: none;\n  -moz-hyphens: none;\n  -ms-hyphens: none;\n  hyphens: none;\n}\n\n[data-code-block-theme=solarized-light] div[data-type=codeBlock] pre[class*=language-]::-moz-selection,\n[data-code-block-theme=solarized-light] div[data-type=codeBlock] pre[class*=language-] ::-moz-selection,\n[data-code-block-theme=solarized-light] div[data-type=codeBlock] code[class*=language-]::-moz-selection,\n[data-code-block-theme=solarized-light] div[data-type=codeBlock] code[class*=language-] ::-moz-selection {\n  background: #073642;\n  /* base02 */\n}\n\n[data-code-block-theme=solarized-light] div[data-type=codeBlock] pre[class*=language-]::selection,\n[data-code-block-theme=solarized-light] div[data-type=codeBlock] pre[class*=language-] ::selection,\n[data-code-block-theme=solarized-light] div[data-type=codeBlock] code[class*=language-]::selection,\n[data-code-block-theme=solarized-light] div[data-type=codeBlock] code[class*=language-] ::selection {\n  background: #073642;\n  /* base02 */\n}\n\n[data-code-block-theme=solarized-light] div[data-type=codeBlock] pre[class*=language-] {\n  padding: 1em;\n  margin: 0.5em 0;\n  overflow: auto;\n  border-radius: 0.3em;\n}\n\n[data-code-block-theme=solarized-light] div[data-type=codeBlock] :not(pre)>code[class*=language-],\n[data-code-block-theme=solarized-light] div[data-type=codeBlock] pre[class*=language-] {\n  background-color: #fdf6e3;\n  /* base3 */\n}\n\n[data-code-block-theme=solarized-light] div[data-type=codeBlock] :not(pre)>code[class*=language-] {\n  padding: 0.1em;\n  border-radius: 0.3em;\n}\n\n[data-code-block-theme=solarized-light] div[data-type=codeBlock] .token.comment,\n[data-code-block-theme=solarized-light] div[data-type=codeBlock] .token.prolog,\n[data-code-block-theme=solarized-light] div[data-type=codeBlock] .token.doctype,\n[data-code-block-theme=solarized-light] div[data-type=codeBlock] .token.cdata {\n  color: #93a1a1;\n  /* base1 */\n}\n\n[data-code-block-theme=solarized-light] div[data-type=codeBlock] .token.punctuation {\n  color: #586e75;\n  /* base01 */\n}\n\n[data-code-block-theme=solarized-light] div[data-type=codeBlock] .token.namespace {\n  opacity: 0.7;\n}\n\n[data-code-block-theme=solarized-light] div[data-type=codeBlock] .token.property,\n[data-code-block-theme=solarized-light] div[data-type=codeBlock] .token.tag,\n[data-code-block-theme=solarized-light] div[data-type=codeBlock] .token.boolean,\n[data-code-block-theme=solarized-light] div[data-type=codeBlock] .token.number,\n[data-code-block-theme=solarized-light] div[data-type=codeBlock] .token.constant,\n[data-code-block-theme=solarized-light] div[data-type=codeBlock] .token.symbol,\n[data-code-block-theme=solarized-light] div[data-type=codeBlock] .token.deleted {\n  color: #268bd2;\n  /* blue */\n}\n\n[data-code-block-theme=solarized-light] div[data-type=codeBlock] .token.selector,\n[data-code-block-theme=solarized-light] div[data-type=codeBlock] .token.attr-name,\n[data-code-block-theme=solarized-light] div[data-type=codeBlock] .token.string,\n[data-code-block-theme=solarized-light] div[data-type=codeBlock] .token.char,\n[data-code-block-theme=solarized-light] div[data-type=codeBlock] .token.builtin,\n[data-code-block-theme=solarized-light] div[data-type=codeBlock] .token.url,\n[data-code-block-theme=solarized-light] div[data-type=codeBlock] .token.inserted {\n  color: #2aa198;\n  /* cyan */\n}\n\n[data-code-block-theme=solarized-light] div[data-type=codeBlock] .token.entity {\n  color: #657b83;\n  /* base00 */\n  background: #eee8d5;\n  /* base2 */\n}\n\n[data-code-block-theme=solarized-light] div[data-type=codeBlock] .token.atrule,\n[data-code-block-theme=solarized-light] div[data-type=codeBlock] .token.attr-value,\n[data-code-block-theme=solarized-light] div[data-type=codeBlock] .token.keyword {\n  color: #859900;\n  /* green */\n}\n\n[data-code-block-theme=solarized-light] div[data-type=codeBlock] .token.function,\n[data-code-block-theme=solarized-light] div[data-type=codeBlock] .token.class-name {\n  color: #b58900;\n  /* yellow */\n}\n\n[data-code-block-theme=solarized-light] div[data-type=codeBlock] .token.regex,\n[data-code-block-theme=solarized-light] div[data-type=codeBlock] .token.important,\n[data-code-block-theme=solarized-light] div[data-type=codeBlock] .token.variable {\n  color: #cb4b16;\n  /* orange */\n}\n\n[data-code-block-theme=solarized-light] div[data-type=codeBlock] .token.important,\n[data-code-block-theme=solarized-light] div[data-type=codeBlock] .token.bold {\n  font-weight: bold;\n}\n\n[data-code-block-theme=solarized-light] div[data-type=codeBlock] .token.italic {\n  font-style: italic;\n}\n\n[data-code-block-theme=solarized-light] div[data-type=codeBlock] .token.entity {\n  cursor: help;\n}\n\n.cherry-detail details {\n  background: rgba(248, 249, 250, 0.6666666667);\n  border-radius: 8px;\n  overflow: hidden;\n  margin-bottom: 10px;\n}\n\n.cherry-detail details summary {\n  user-select: none;\n  padding: 5px 10px;\n  background-color: #6c757d;\n  color: #FFF;\n  border-radius: 8px;\n}\n\n.cherry-detail details .cherry-detail-body {\n  padding: 15px 25px 0 25px;\n}\n\n.cherry-detail__multiple {\n  border-radius: 8px;\n  overflow: hidden;\n}\n\n.cherry-detail__multiple details {\n  margin-bottom: 1px;\n  border-radius: 0;\n  border: none;\n}\n\n.cherry-detail__multiple details summary {\n  border-radius: 0;\n}\n\n.cherry-text-align__center table {\n  margin-left: auto;\n  margin-right: auto;\n}\n\n.cherry-text-align__right table {\n  margin-left: auto;\n}\n\n.cherry-panel {\n  margin: 10px 0;\n  overflow: hidden;\n  border-radius: 8px;\n  box-sizing: border-box;\n  border: 0.5px solid;\n}\n\n.cherry-panel .cherry-panel--title {\n  color: #fff;\n  padding: 5px 20px;\n}\n\n.cherry-panel .cherry-panel--title.cherry-panel--title__not-empty::before {\n  font-family: \"ch-icon\";\n  margin: 0 12px 0 -6px;\n  vertical-align: bottom;\n}\n\n.cherry-panel .cherry-panel--body {\n  padding: 5px 20px;\n}\n\n.cherry-panel__primary {\n  background-color: #cfe2ff;\n  color: #0a58ca;\n}\n\n.cherry-panel__primary .cherry-panel--title {\n  background-color: #0d6dfe;\n}\n\n.cherry-panel__primary .cherry-panel--title.cherry-panel--title__not-empty::before {\n  content: \"\\ea6a\";\n}\n\n.cherry-panel__info {\n  background-color: #cff4fc;\n  color: #087990;\n}\n\n.cherry-panel__info .cherry-panel--title {\n  background-color: #099cba;\n}\n\n.cherry-panel__info .cherry-panel--title.cherry-panel--title__not-empty::before {\n  content: \"\\ea69\";\n}\n\n.cherry-panel__warning {\n  background-color: #fff3cd;\n  color: #997404;\n}\n\n.cherry-panel__warning .cherry-panel--title {\n  background-color: #b38806;\n}\n\n.cherry-panel__warning .cherry-panel--title.cherry-panel--title__not-empty::before {\n  content: \"\\ea6b\";\n}\n\n.cherry-panel__danger {\n  background-color: #f8d7da;\n  color: #b02a37;\n}\n\n.cherry-panel__danger .cherry-panel--title {\n  background-color: #dc3545;\n}\n\n.cherry-panel__danger .cherry-panel--title.cherry-panel--title__not-empty::before {\n  content: \"\\ea68\";\n}\n\n.cherry-panel__success {\n  background-color: #d1e7dd;\n  color: #146c43;\n}\n\n.cherry-panel__success .cherry-panel--title {\n  background-color: #198754;\n}\n\n.cherry-panel__success .cherry-panel--title.cherry-panel--title__not-empty::before {\n  content: \"\\ea67\";\n}\n\n.cherry .doing-resize-img {\n  -moz-user-select: none;\n  -webkit-user-select: none;\n  user-select: none;\n}\n\n.cherry .cherry-previewer img {\n  transition: all 0.1s;\n}\n\n.cherry .cherry-previewer-img-size-hander {\n  position: absolute;\n  box-shadow: 0 1px 4px 0 rgba(20, 81, 154, 0.5);\n  border: 1px solid #3582fb;\n  box-sizing: content-box;\n  pointer-events: none;\n}\n\n.cherry .cherry-previewer-img-size-hander .cherry-previewer-img-size-hander__points {\n  position: absolute;\n  height: 10px;\n  width: 10px;\n  margin-top: -7px;\n  margin-left: -7px;\n  border-radius: 9px;\n  background: #3582fb;\n  border: 2px solid #fff;\n  box-sizing: content-box;\n  box-shadow: 0px 2px 2px 0px rgba(20, 81, 154, 0.5);\n  pointer-events: all;\n}\n\n.cherry .cherry-previewer-img-size-hander .cherry-previewer-img-size-hander__background {\n  background-repeat: no-repeat;\n  background-size: 100% 100%;\n  opacity: 0.5;\n  width: 100%;\n  height: 100%;\n}\n\n.cherry .cherry-previewer-img-size-hander .cherry-previewer-img-size-hander__points-leftTop {\n  cursor: nw-resize;\n}\n\n.cherry .cherry-previewer-img-size-hander .cherry-previewer-img-size-hander__points-rightTop {\n  cursor: sw-resize;\n}\n\n.cherry .cherry-previewer-img-size-hander .cherry-previewer-img-size-hander__points-leftBottom {\n  cursor: sw-resize;\n}\n\n.cherry .cherry-previewer-img-size-hander .cherry-previewer-img-size-hander__points-rightBottom {\n  cursor: nw-resize;\n}\n\n.cherry .cherry-previewer-img-size-hander .cherry-previewer-img-size-hander__points-middleTop {\n  cursor: n-resize;\n}\n\n.cherry .cherry-previewer-img-size-hander .cherry-previewer-img-size-hander__points-middleBottom {\n  cursor: n-resize;\n}\n\n.cherry .cherry-previewer-img-size-hander .cherry-previewer-img-size-hander__points-leftMiddle {\n  cursor: e-resize;\n}\n\n.cherry .cherry-previewer-img-size-hander .cherry-previewer-img-size-hander__points-rightMiddle {\n  cursor: e-resize;\n}\n\n.cherry .cherry-previewer-table-content-hander .cherry-previewer-table-content-hander__input {\n  position: absolute;\n}\n\n.cherry .cherry-previewer-table-content-hander .cherry-previewer-table-content-hander__input textarea {\n  width: 100%;\n  height: 100%;\n  border: 0;\n  box-sizing: border-box;\n  resize: none;\n  outline: 1px solid #3582fb;\n  word-break: break-all;\n}\n\n.cherry .cherry-previewer-table-hover-handler {\n  position: absolute;\n  pointer-events: none;\n  z-index: 999;\n}\n\n.cherry .cherry-previewer-table-hover-handler-container {\n  position: relative;\n  height: 100%;\n  padding: 0;\n  margin: 0;\n  list-style-type: none;\n}\n\n.cherry .cherry-previewer-table-hover-handler__symbol {\n  pointer-events: auto;\n  display: flex;\n  justify-content: center;\n  position: absolute;\n  color: #3582fb;\n  width: 12px;\n  height: 12px;\n  line-height: 12px;\n  border: 1px solid rgba(53, 130, 251, 0);\n  background-color: rgba(255, 255, 255, 0);\n  cursor: pointer;\n  transition: all 0.3s;\n}\n\n.cherry .cherry-previewer-table-hover-handler__symbol:hover {\n  background-color: rgba(53, 130, 251, 0.5333333333);\n  color: #FFF;\n}\n\n.cherry .cherry-highlight-line {\n  background-color: rgba(255, 255, 204, 0.5333333333);\n}\n\n@media print {\n\n  img,\n  figure,\n  pre,\n  table {\n    page-break-inside: avoid;\n  }\n\n  .cherry-previewer {\n    width: 100% !important;\n    max-height: none;\n    border-left: none !important;\n  }\n\n  .cherry-toolbar,\n  .cherry-sidebar,\n  .cherry-editor,\n  .cherry-drag {\n    display: none !important;\n  }\n}\n\n.cherry {\n  display: flex;\n  flex-flow: row wrap;\n  align-items: stretch;\n  align-content: flex-start;\n  height: 100%;\n  min-height: 100px;\n  position: relative;\n}\n\n.cherry .cherry-editor,\n.cherry .cherry-previewer {\n  max-height: calc(100% - 48px);\n  min-height: calc(100% - 48px);\n}\n\n.cherry .CodeMirror {\n  height: 100%;\n}\n\n.cherry.cherry--no-toolbar .cherry-toolbar,\n.cherry.cherry--no-toolbar .cherry-sidebar {\n  height: 0;\n  display: none;\n}\n\n.cherry.cherry--no-toolbar .cherry-editor,\n.cherry.cherry--no-toolbar .cherry-previewer {\n  max-height: 100%;\n  min-height: 100%;\n}\n\n.cherry div[data-type=codeBlock]:hover {\n  position: relative;\n}\n\n.cherry div[data-type=codeBlock]:hover .cherry-code-preview-lang-select {\n  display: block !important;\n  position: absolute;\n  transform: translate(2px, 50%);\n}\n\n.cherry .cherry-preview--full div[data-type=codeBlock]:hover {\n  position: unset;\n}\n\n.cherry .cherry-preview--full div[data-type=codeBlock]:hover .cherry-code-preview-lang-select {\n  display: none !important;\n  position: unset;\n}\n\n.cherry {\n  font-family: \"Helvetica Neue\", Arial, \"Hiragino Sans GB\", \"STHeiti\", \"Microsoft YaHei\", \"WenQuanYi Micro Hei\", sans-serif;\n  font-size: 16px;\n  line-height: 27px;\n  color: #3f4a56;\n  background: #f8fafb;\n  box-shadow: 0 0 10px rgba(128, 145, 165, 0.2);\n}\n\n.cherry .ch-icon {\n  vertical-align: middle;\n}\n\n.cherry .clearfix {\n  zoom: 1;\n}\n\n.cherry .clearfix:after {\n  content: \".\";\n  display: block;\n  height: 0;\n  clear: both;\n  visibility: hidden;\n  overflow: hidden;\n  font-size: 0;\n}\n\n.cherry.fullscreen {\n  position: fixed;\n  top: 0;\n  left: 0;\n  right: 0;\n  bottom: 0;\n  z-index: 99;\n}\n\n.cherry .no-select {\n  -webkit-touch-callout: none;\n  -webkit-user-select: none;\n  -khtml-user-select: none;\n  -moz-user-select: none;\n  -ms-user-select: none;\n  user-select: none;\n}\n\n.cherry .cherry-insert-table-menu {\n  display: block;\n  position: fixed;\n  top: 40px;\n  left: 40px;\n  border-collapse: separate;\n  box-shadow: 0 0 10px rgba(128, 145, 165, 0.2);\n  padding: 4px;\n  border-radius: 3px;\n  width: auto;\n  height: auto;\n}\n\n.cherry .cherry-insert-table-menu-item {\n  padding: 7px;\n  border: 1px solid #dfe6ee;\n}\n\n.cherry .cherry-insert-table-menu-item.active {\n  background-color: #ebf3ff;\n}\n\n.cherry[data-toolbar-theme=dark] .cherry-insert-table-menu-item {\n  border-color: rgba(255, 255, 255, 0.2);\n}\n\n.cherry[data-toolbar-theme=dark] .cherry-insert-table-menu-item.active {\n  background-color: #4b4b4b;\n}\n\n.cherry-dropdown {\n  position: absolute;\n  width: 140px;\n  min-height: 40px;\n  background: #fff;\n  box-shadow: 0 5px 15px -5px rgba(0, 0, 0, 0.5);\n  margin-left: -60px;\n  z-index: 11;\n}\n\n.cherry-dropdown-item {\n  width: 100%;\n  padding: 0 15px;\n  text-align: left;\n  display: inline-block;\n  height: 36px;\n  line-height: 36px;\n  font-size: 14px;\n  font-style: normal;\n  cursor: pointer;\n  box-sizing: border-box;\n}\n\n.cherry-dropdown-item:hover {\n  background: #ebf3ff;\n  color: #5d9bfc;\n}\n\n.cherry-dropdown-item .ch-icon {\n  margin-right: 10px;\n}\n\n[data-toolbar-theme=dark] .cherry-dropdown {\n  background: #ffffff;\n}\n\n[data-toolbar-theme=dark] .cherry-dropdown .cherry-dropdown-item {\n  background: transparent;\n  color: #4b4b4b;\n}\n\n[data-toolbar-theme=dark] .cherry-dropdown .cherry-dropdown-item:hover {\n  background: #e4e4e4;\n  color: #0a001f;\n  transition: all .3s;\n}\n\n.cherry-toolbar {\n  position: relative;\n  display: flex;\n  justify-content: space-between;\n  padding: 0 20px;\n  height: 34px;\n  font-size: 16px;\n  line-height: 2.3;\n  flex-basis: 100%;\n  box-sizing: border-box;\n  z-index: 2;\n  user-select: none;\n  box-shadow: 0 0 10px rgba(128, 145, 165, 0.2);\n  background: white;\n  overflow: hidden;\n  align-items: center;\n}\n\n.cherry-toolbar .icon-loading.loading {\n  display: inline-block;\n  width: 8px;\n  height: 8px;\n}\n\n.cherry-toolbar .icon-loading.loading:after {\n  content: \" \";\n  display: block;\n  width: 8px;\n  height: 8px;\n  margin-left: 2px;\n  margin-top: -2px;\n  border-radius: 50%;\n  border: 2px solid #000;\n  border-color: #000 transparent #000 transparent;\n  animation: loading 1.2s linear infinite;\n}\n\n[data-toolbar-theme=dark] .cherry-toolbar {\n  background: #ffffff;\n  box-shadow: 0 0 10px rgba(128, 145, 165, 0.2);\n}\n\n[data-toolbar-theme=dark] .cherry-toolbar .cherry-toolbar-button {\n  color: #4b4b4b;\n  background: transparent;\n}\n\n[data-toolbar-theme=dark] .cherry-toolbar .cherry-toolbar-button:hover {\n  color: #0a001f;\n  transition: all .3s;\n  background: #e4e4e4;\n}\n\n.cherry-toolbar .toolbar-left,\n.cherry-toolbar .toolbar-right {\n  display: flex;\n  align-items: center;\n  overflow: hidden;\n}\n\n.cherry-toolbar .toolbar-left {\n  flex: 0 0 auto;\n  margin-right: 20px;\n}\n\n.cherry-toolbar .toolbar-right {\n  flex: 0 1 auto;\n  flex-direction: row-reverse;\n  margin-left: 10px;\n  box-sizing: border-box;\n}\n\n.cherry-toolbar.preview-only .cherry-toolbar-button {\n  display: none;\n}\n\n.cherry-toolbar.preview-only .cherry-toolbar-switchPreview {\n  display: inline;\n}\n\n.cherry-toolbar-button {\n  float: left;\n  padding: 0 12px;\n  height: 38px;\n  color: #3f4a56;\n  background: transparent;\n  border: 1px solid transparent;\n  -webkit-transition: background-color ease-in-out 0.15s, color ease-in-out 0.15s, border-color ease-in-out 0.15s;\n  transition: background-color ease-in-out 0.15s, color ease-in-out 0.15s, border-color ease-in-out 0.15s;\n  cursor: pointer;\n  font-style: normal;\n}\n\n.cherry-toolbar-button:hover {\n  color: #5d9bfc;\n  background: #ebf3ff;\n}\n\n.cherry-toolbar-button.cherry-toolbar-split {\n  font-size: 0;\n  height: 50%;\n  padding: 0;\n  margin-left: 4px;\n  margin-right: 4px;\n  border: none;\n  border-left: 1px solid #dfe6ee;\n  pointer-events: none;\n  overflow: hidden;\n  opacity: 0.5;\n}\n\n.cherry-toolbar-button.disabled {\n  color: #ccc;\n}\n\n.cherry .ace_search {\n  background: #FFF;\n}\n\n.cherry-sidebar {\n  width: 30px;\n  position: absolute;\n  top: 48px;\n  right: 7px;\n  z-index: 11;\n  bottom: 0;\n  overflow: hidden;\n}\n\n.cherry-sidebar .cherry-toolbar-button {\n  height: 30px;\n  padding: 3px 12px 0 6px;\n}\n\n.cherry-sidebar .cherry-toolbar-button:hover {\n  background: transparent;\n}\n\n.cherry-sidebar .cherry-toolbar-button .icon-loading.loading {\n  display: inline-block;\n  width: 8px;\n  height: 8px;\n}\n\n.cherry-sidebar .cherry-toolbar-button .icon-loading.loading:after {\n  content: \" \";\n  display: block;\n  width: 8px;\n  height: 8px;\n  margin-left: 2px;\n  margin-top: -2px;\n  border-radius: 50%;\n  border: 2px solid #000;\n  border-color: #000 transparent #000 transparent;\n  animation: loading 1.2s linear infinite;\n}\n\n@keyframes loading {\n  0% {\n    transform: rotate(0deg);\n  }\n\n  100% {\n    transform: rotate(360deg);\n  }\n}\n\n.cherry-bubble {\n  position: absolute;\n  display: flex;\n  align-items: center;\n  justify-content: flex-start;\n  flex-wrap: wrap;\n  font-size: 14px;\n  min-height: 35px;\n  min-width: 50px;\n  border: 1px solid #dfe6ee;\n  background-color: #fff;\n  box-shadow: 0 2px 15px -5px rgba(0, 0, 0, 0.5);\n  border-radius: 3px;\n  z-index: 8;\n}\n\n.cherry-bubble.cherry-bubble--centered {\n  left: 50%;\n  transform: translateX(-50%);\n}\n\n.cherry-bubble .cherry-bubble-top,\n.cherry-bubble .cherry-bubble-bottom {\n  position: absolute;\n  left: 50%;\n  width: 0;\n  height: 0;\n  margin-left: -8px;\n  border-left: 8px solid rgba(0, 0, 0, 0);\n  border-right: 8px solid rgba(0, 0, 0, 0);\n}\n\n.cherry-bubble .cherry-bubble-top {\n  top: 0;\n  transform: translateY(-100%);\n  border-bottom: 8px solid #fff;\n}\n\n.cherry-bubble .cherry-bubble-bottom {\n  bottom: 0;\n  transform: translateY(100%);\n  border-top: 8px solid #fff;\n}\n\n.cherry-bubble .cherry-toolbar-button {\n  display: inline-flex;\n  align-items: center;\n  justify-content: center;\n  height: 35px;\n  cursor: pointer;\n  user-select: none;\n}\n\n.cherry-bubble .cherry-toolbar-button:hover {\n  border-color: #dfe6ee;\n  background-color: rgba(89, 128, 166, 0.05);\n}\n\n.cherry-bubble .cherry-toolbar-button.cherry-toolbar-split {\n  height: 65%;\n  min-height: 22.75px;\n}\n\n[data-toolbar-theme=dark] .cherry-bubble {\n  border-color: #ffffff;\n  background: #ffffff;\n}\n\n[data-toolbar-theme=dark] .cherry-bubble .cherry-toolbar-button {\n  color: #4b4b4b;\n  background: transparent;\n}\n\n[data-toolbar-theme=dark] .cherry-bubble .cherry-toolbar-button:hover {\n  color: #fff;\n  background: rgba(255, 255, 255, 0.1);\n}\n\n[data-toolbar-theme=dark] .cherry-bubble .cherry-bubble-top {\n  border-bottom-color: #ffffff;\n}\n\n[data-toolbar-theme=dark] .cherry-bubble .cherry-bubble-bottom {\n  border-top-color: #ffffff;\n}\n\n[data-toolbar-theme=dark] .cherry-bubble .cherry-toolbar-button:hover {\n  border-color: #ffffff;\n}\n\n.cherry-switch-paste .switch-btn--bg {\n  position: absolute;\n  width: 50%;\n  height: 100%;\n  box-sizing: border-box;\n  z-index: -1;\n  left: 0;\n  top: 0;\n  opacity: 0.3;\n  background-color: #5d9bfc;\n  border-radius: 2px;\n  transition: all 0.3s;\n}\n\n.cherry-switch-paste .cherry-toolbar-button {\n  display: inline-flex;\n  align-items: center;\n  justify-content: center;\n  width: 80px;\n  text-align: center;\n}\n\n.cherry-switch-paste .cherry-toolbar-button:hover {\n  border-color: transparent;\n}\n\n.cherry-switch-paste[data-type=text] .cherry-text-btn {\n  color: #3f4a56;\n}\n\n.cherry-switch-paste[data-type=text] .cherry-md-btn {\n  color: #5d9bfc;\n}\n\n.cherry-switch-paste[data-type=md] .cherry-md-btn {\n  color: #3f4a56;\n}\n\n.cherry-switch-paste[data-type=md] .cherry-text-btn {\n  color: #5d9bfc;\n}\n\n.cherry-switch-paste[data-type=md] .switch-btn--bg {\n  left: 50%;\n}\n\n[data-toolbar-theme=dark] .cherry-switch-paste .switch-btn--bg {\n  background-color: #fff;\n}\n\n[data-toolbar-theme=dark] .cherry-switch-paste[data-type=text] .cherry-text-btn {\n  color: #4b4b4b;\n}\n\n[data-toolbar-theme=dark] .cherry-switch-paste[data-type=text] .cherry-md-btn {\n  color: #fff;\n}\n\n[data-toolbar-theme=dark] .cherry-switch-paste[data-type=md] .cherry-md-btn {\n  color: #4b4b4b;\n}\n\n[data-toolbar-theme=dark] .cherry-switch-paste[data-type=md] .cherry-text-btn {\n  color: #fff;\n}\n\n[data-toolbar-theme=dark] .cherry-switch-paste[data-type=md] .switch-btn--bg {\n  left: 50%;\n}\n\n.cherry-floatmenu {\n  z-index: 4;\n  display: none;\n  position: absolute;\n  left: 30px;\n  margin-left: 60px;\n  height: 27px;\n  line-height: 27px;\n  border-radius: 3px;\n  -webkit-user-select: none;\n  -moz-user-select: none;\n  -ms-user-select: none;\n  user-select: none;\n}\n\n.cherry-floatmenu .cherry-toolbar-button {\n  float: left;\n  padding: 0 9px;\n  margin: 0;\n  height: 27px;\n  line-height: 27px;\n  font-size: 14px;\n  color: #3f4a56;\n  overflow: hidden;\n  vertical-align: middle;\n  text-align: center;\n  border: 0;\n  cursor: pointer;\n  font-style: normal;\n}\n\n.cherry-floatmenu .cherry-toolbar-button.cherry-toolbar-split {\n  border-left: 1px solid #dfe6ee;\n  width: 0;\n  padding: 0;\n  overflow: hidden;\n  height: 25px;\n}\n\n.cherry-floatmenu .cherry-toolbar-button .ch-icon {\n  color: #aaa;\n  font-size: 12px;\n}\n\n.cherry-floatmenu .cherry-toolbar-button:hover {\n  background: rgba(0, 0, 0, 0.05);\n}\n\n.cherry-floatmenu .cherry-toolbar-button:hover .ch-icon {\n  color: #3f4a56;\n}\n\n.cherry-editor {\n  position: relative;\n  padding-top: 5px;\n  padding-right: 5px;\n  width: 50%;\n  box-sizing: border-box;\n  overflow: hidden;\n}\n\n.cherry-editor.cherry-editor--full {\n  width: 100%;\n  padding-right: 0;\n}\n\n.cherry-editor.cherry-editor--hidden {\n  display: none;\n}\n\n.cherry-editor-writing-style--focus::before {\n  content: \"\";\n  display: block;\n  width: 100%;\n  position: absolute;\n  top: 0;\n  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.0235294118), rgba(0, 0, 0, 0.2));\n  pointer-events: none;\n  z-index: 11;\n}\n\n.cherry-editor-writing-style--focus::after {\n  content: \"\";\n  display: block;\n  width: 100%;\n  position: absolute;\n  bottom: 0;\n  background: linear-gradient(to top, rgba(0, 0, 0, 0.0235294118), rgba(0, 0, 0, 0.2));\n  pointer-events: none;\n  z-index: 11;\n}\n\n.cherry-editor-writing-style--typewriter .CodeMirror-lines {\n  position: relative;\n}\n\n.cherry-editor-writing-style--typewriter .CodeMirror-lines::before {\n  content: \"\";\n  display: block;\n}\n\n.cherry-editor-writing-style--typewriter .CodeMirror-lines::after {\n  content: \"\";\n  display: block;\n}\n\n.cherry-editor .CodeMirror {\n  font-family: \"Helvetica Neue\", Arial, \"Hiragino Sans GB\", \"STHeiti\", \"Microsoft YaHei\", \"WenQuanYi Micro Hei\", sans-serif;\n  background: #f8fafb;\n  color: #3f4a56;\n}\n\n.cherry-editor .CodeMirror textarea {\n  font-size: 27px;\n}\n\n.cherry-editor .CodeMirror-lines {\n  padding: 15px 34px;\n}\n\n.cherry-editor .CodeMirror-lines .drawio,\n.cherry-editor .CodeMirror-lines .base64 {\n  display: inline-block;\n  overflow: hidden;\n  text-overflow: ellipsis;\n  max-width: 80px;\n  white-space: nowrap;\n  vertical-align: bottom;\n  color: darkmagenta !important;\n  font-size: 12px !important;\n}\n\n.cherry-editor .cm-s-default .cm-header {\n  color: #3f4a56;\n}\n\n.cherry-editor .cm-s-default .cm-string {\n  color: #3f4a56;\n}\n\n.cherry-editor .cm-s-default .cm-comment {\n  color: #3582fb;\n  font-family: \"Menlo\", \"Liberation Mono\", \"Consolas\", \"DejaVu Sans Mono\", \"Ubuntu Mono\", \"Courier New\", \"andale mono\", \"lucida console\", monospace;\n  font-size: 0.9em;\n}\n\n.cherry-editor .cm-s-default .cm-whitespace,\n.cherry-editor .cm-tab {\n  font-family: \"Menlo\", \"Liberation Mono\", \"Consolas\", \"DejaVu Sans Mono\", \"Ubuntu Mono\", \"Courier New\", \"andale mono\", \"lucida console\", monospace;\n  font-size: 0.9em;\n}\n\n.cherry-editor .cm-s-default .cm-quote {\n  color: #3582fb;\n}\n\n.cherry-editor .cm-s-default .cm-link {\n  color: #3582fb;\n}\n\n.cherry-editor .cm-s-default .cm-url {\n  background: #f8fafb;\n  color: #3582fb;\n  font-family: \"Menlo\", \"Liberation Mono\", \"Consolas\", \"DejaVu Sans Mono\", \"Ubuntu Mono\", \"Courier New\", \"andale mono\", \"lucida console\", monospace;\n  font-size: 0.9em;\n}\n\n.cherry-editor .cm-s-default .cm-variable-2 {\n  color: #3f4a56;\n}\n\n.cherry-editor .cm-s-default .cm-variable-3 {\n  color: #3f4a56;\n}\n\n.cherry-editor .cm-s-default .cm-keyword {\n  color: #3f4a56;\n}\n\n.cherry-drag {\n  width: 15px;\n  cursor: ew-resize;\n  position: absolute;\n  z-index: 12;\n  background: transparent;\n}\n\n.cherry-drag.cherry-drag--show {\n  width: 5px;\n  display: block;\n  background: #dfe6ee;\n}\n\n.cherry-drag.cherry-drag--hidden {\n  display: none;\n}\n\n.cherry-editor-mask {\n  z-index: 10;\n  position: absolute;\n  display: none;\n  background: rgba(0, 0, 0, 0.2);\n}\n\n.cherry-editor-mask.cherry-editor-mask--show {\n  display: block;\n}\n\n.cherry-previewer-mask {\n  z-index: 10;\n  position: absolute;\n  display: none;\n  background: rgba(0, 0, 0, 0.4);\n}\n\n.cherry-previewer-mask.cherry-previewer-mask--show {\n  display: block;\n}\n\n.cherry-previewer {\n  padding: 20px 45px 20px 20px;\n  border-left: 2px solid #ebedee;\n  width: 50%;\n  box-sizing: border-box;\n  background-color: #f8fafb;\n  min-height: auto;\n  overflow-y: auto;\n  -webkit-print-color-adjust: exact;\n}\n\n.cherry-previewer .cherry-mobile-previewer-content {\n  width: 375px;\n  height: 100%;\n  margin: 0 auto;\n  padding: 25px 30px;\n  overflow-y: scroll;\n  box-shadow: 0 0 60px rgba(0, 0, 0, 0.1);\n  box-sizing: border-box;\n}\n\n.cherry-previewer.cherry-previewer--hidden {\n  width: 0;\n  display: none;\n}\n\n.cherry-previewer.cherry-previewer--full {\n  width: 100%;\n}\n\n.cherry-previewer .cherry-list__upper-roman {\n  list-style: upper-roman;\n}\n\n.cherry-previewer .cherry-list__lower-greek {\n  list-style: lower-greek;\n}\n\n.cherry-previewer .cherry-list__cjk-ideographic {\n  list-style: cjk-ideographic;\n}\n\n.cherry-previewer .cherry-list__circle {\n  list-style: circle;\n}\n\n.cherry-previewer .cherry-list__square {\n  list-style: square;\n}\n\n.cherry-previewer div[data-type=codeBlock]:hover .cherry-copy-code-block {\n  display: block !important;\n  position: relative;\n  width: 25px;\n  text-align: center;\n  height: 25px;\n  border: 1px solid #DDD;\n  cursor: pointer;\n  float: right;\n  right: 10px;\n  top: 15px;\n  color: #FFF;\n  border-radius: 5px;\n  margin-left: -27px;\n  transition: all 0.3s;\n  z-index: 2;\n}\n\n[data-code-block-theme=default] .cherry-previewer div[data-type=codeBlock]:hover .cherry-copy-code-block,\n[data-code-block-theme=funky] .cherry-previewer div[data-type=codeBlock]:hover .cherry-copy-code-block,\n[data-code-block-theme=solarized-light] .cherry-previewer div[data-type=codeBlock]:hover .cherry-copy-code-block,\n[data-code-block-theme=coy] .cherry-previewer div[data-type=codeBlock]:hover .cherry-copy-code-block {\n  background-color: #3582fb;\n}\n\n.cherry-previewer div[data-type=codeBlock]:hover .cherry-copy-code-block:hover {\n  color: #3582fb;\n  background-color: #eee;\n  border-color: #3582fb;\n}\n\n.cherry-color-wrap {\n  display: none;\n  position: fixed;\n  width: auto;\n  padding: 5px 10px;\n  z-index: 6;\n  background: #fff;\n  box-shadow: 0 0 10px rgba(128, 145, 165, 0.2);\n}\n\n.cherry-color-wrap h3 {\n  font-size: 12px;\n  margin: 0px;\n  font-weight: 400;\n}\n\n[data-toolbar-theme=dark] .cherry-color-wrap h3 {\n  color: #4b4b4b;\n}\n\n.cherry-color-wrap .cherry-color-text {\n  float: left;\n  width: 128px;\n  margin: 0 8px 0 5px;\n}\n\n.cherry-color-wrap .cherry-color-bg {\n  float: left;\n  width: 128px;\n  margin-right: 5px;\n}\n\n.cherry-color-wrap .cherry-color-item {\n  float: left;\n  width: 14px;\n  height: 14px;\n  border: 1px solid #fff;\n  cursor: pointer;\n}\n\n.cherry-color-wrap .cherry-color-item:hover {\n  border: 1px solid #000;\n}\n\n.Cherry-Math svg {\n  max-width: 100%;\n}\n\n.cherry-suggester-panel {\n  display: none;\n  position: absolute;\n  left: 0;\n  top: 0;\n  background: #fff;\n  border-radius: 2px;\n  max-height: 500px;\n  box-shadow: 0 2px 8px 1px rgba(0, 0, 0, 0.2);\n}\n\n.cherry-suggester-panel .cherry-suggester-panel__item {\n  border: none;\n  white-space: nowrap;\n  min-width: 50px;\n  padding: 5px 13px;\n  color: #333;\n  display: block;\n  cursor: pointer;\n}\n\n.cherry-suggester-panel .cherry-suggester-panel__item.cherry-suggester-panel__item--selected {\n  background-color: #f2f2f5;\n  text-decoration: none;\n  color: #eb7350;\n}\n\n.cherry-suggester-panel .cherry-suggester-panel__item>i {\n  display: inline-block;\n  transform: translateY(2px);\n  margin-right: 8px;\n}\n\n.cherry-suggestion {\n  background-color: #ebf3ff;\n  color: #3582fb;\n  padding: 1px 4px;\n  border-radius: 3px;\n  cursor: pointer;\n}\n\n/** 引入自带的主题 */\n/** 编辑器样式 */\n.cherry.theme__default {\n  /** 二级菜单 */\n  /** 选中文字时弹出的按钮 */\n  /** 光标focus到空行时联想出的按钮 */\n}\n\n.cherry.theme__default .cherry-dropdown {\n  /** 选择颜色的按钮 */\n}\n\n.cherry.theme__default .cherry-dropdown .cherry-dropdown-item {\n  /** 图标 */\n}\n\n.cherry.theme__default .cherry-dropdown.cherry-color-wrap .cherry-color-text {\n  /** 色盘的标题 */\n  /** 色盘里的每一个色块 */\n}\n\n.cherry.theme__default .cherry-bubble {\n  /** 粘贴HTML内容时弹出的选择按钮 */\n}\n\n/** 预览区域样式 */\n.cherry-markdown.theme__default {\n  /** 行内代码 */\n  /** \n  * 代码块\n  */\n  /** \n  * 表格\n  */\n  /** 可以理解为上下结构的音标，下部是文字，上部是对应的拼音 */\n  /** 脚注 */\n  /** 行间公式 */\n  /** 段落公式 */\n  /** 目录 */\n}\n\n.cherry-markdown.theme__default h1,\n.cherry-markdown.theme__default h2,\n.cherry-markdown.theme__default h3,\n.cherry-markdown.theme__default h4,\n.cherry-markdown.theme__default h5,\n.cherry-markdown.theme__default h6 {\n  /** 标题前面的锚点或序号 */\n}\n\n.cherry-markdown.theme__default ul {\n  /** checklist 模式，未勾选时 */\n  /** checklist 模式，勾选时 */\n}\n\n.cherry-markdown.theme__default ul.cherry-list__upper-roman {\n  list-style: upper-roman;\n}\n\n.cherry-markdown.theme__default ul.cherry-list__lower-greek {\n  list-style: lower-greek;\n}\n\n.cherry-markdown.theme__default ul.cherry-list__cjk-ideographic {\n  list-style: cjk-ideographic;\n}\n\n.cherry-markdown.theme__default ul.cherry-list__circle {\n  list-style: circle;\n}\n\n.cherry-markdown.theme__default ul.cherry-list__square {\n  list-style: square;\n}\n\n.cherry-markdown.theme__default ruby {\n  /** 上部的拼音 */\n}\n\n/** 色值可以参考：https://yeun.github.io/open-color/ */\n/** 工具栏样式 */\n/** 编辑区域样式 */\n/** 预览区域样式 */\n/** markdown样式 */\n/** 编辑器样式 */\n.cherry.theme__dark {\n  /** 顶部按钮, 选中文字时弹出的按钮, 光标focus到空行时联想出的按钮, 侧边栏按钮 */\n  /** 二级菜单 */\n  /** 选中文字时弹出的按钮 */\n}\n\n.cherry.theme__dark .cherry-toolbar,\n.cherry.theme__dark .cherry-floatmenu,\n.cherry.theme__dark .cherry-bubble,\n.cherry.theme__dark .cherry-sidebar {\n  background: rgb(60, 60, 60);\n  border-color: rgb(60, 60, 60);\n}\n\n.cherry.theme__dark .cherry-toolbar .cherry-toolbar-button,\n.cherry.theme__dark .cherry-floatmenu .cherry-toolbar-button,\n.cherry.theme__dark .cherry-bubble .cherry-toolbar-button,\n.cherry.theme__dark .cherry-sidebar .cherry-toolbar-button {\n  color: #4b4b4b;\n}\n\n.cherry.theme__dark .cherry-toolbar .cherry-toolbar-button:hover,\n.cherry.theme__dark .cherry-floatmenu .cherry-toolbar-button:hover,\n.cherry.theme__dark .cherry-bubble .cherry-toolbar-button:hover,\n.cherry.theme__dark .cherry-sidebar .cherry-toolbar-button:hover {\n  background-color: rgb(69, 70, 70);\n  color: rgb(255, 255, 255) !important;\n  border-color: rgb(60, 60, 60);\n}\n\n.cherry.theme__dark .cherry-toolbar .cherry-toolbar-button:hover i,\n.cherry.theme__dark .cherry-floatmenu .cherry-toolbar-button:hover i,\n.cherry.theme__dark .cherry-bubble .cherry-toolbar-button:hover i,\n.cherry.theme__dark .cherry-sidebar .cherry-toolbar-button:hover i {\n  color: rgb(255, 255, 255) !important;\n}\n\n.cherry.theme__dark .cherry-dropdown {\n  background: rgb(60, 60, 60);\n  /** 选择颜色的按钮 */\n}\n\n.cherry.theme__dark .cherry-dropdown .cherry-dropdown-item {\n  color: #4b4b4b;\n}\n\n.cherry.theme__dark .cherry-dropdown .cherry-dropdown-item:hover {\n  background-color: rgb(69, 70, 70);\n  color: rgb(255, 255, 255);\n}\n\n.cherry.theme__dark .cherry-dropdown.cherry-color-wrap {\n  /** 色盘的标题 */\n  /** 色盘里的每一个色块 */\n}\n\n.cherry.theme__dark .cherry-dropdown.cherry-color-wrap h3 {\n  color: #4b4b4b;\n}\n\n.cherry.theme__dark .cherry-dropdown.cherry-color-wrap .cherry-color-item {\n  border-color: rgb(69, 70, 70);\n}\n\n.cherry.theme__dark .cherry-dropdown.cherry-color-wrap .cherry-color-item:hover {\n  border-color: rgb(247, 133, 83);\n}\n\n.cherry.theme__dark .cherry-bubble {\n  /** 粘贴HTML内容时弹出的选择按钮 */\n}\n\n.cherry.theme__dark .cherry-bubble .cherry-bubble-bottom {\n  border-top-color: rgb(60, 60, 60);\n}\n\n.cherry.theme__dark .cherry-editor {\n  background-color: rgb(37, 37, 38);\n}\n\n.cherry.theme__dark .cherry-editor .CodeMirror {\n  background-color: rgb(37, 37, 38);\n}\n\n.cherry.theme__dark .cherry-editor .CodeMirror .CodeMirror-cursor {\n  border-left: 1px solid rgb(255, 255, 255);\n}\n\n.cherry.theme__dark .cherry-editor .CodeMirror .CodeMirror-scroll span,\n.cherry.theme__dark .cherry-editor .CodeMirror .CodeMirror-scroll .cm-variable-2,\n.cherry.theme__dark .cherry-editor .CodeMirror .CodeMirror-scroll .cm-string,\n.cherry.theme__dark .cherry-editor .CodeMirror .CodeMirror-scroll .cm-strong,\n.cherry.theme__dark .cherry-editor .CodeMirror .CodeMirror-scroll .cm-em,\n.cherry.theme__dark .cherry-editor .CodeMirror .CodeMirror-scroll .cm-meta {\n  color: rgb(200, 200, 200);\n}\n\n.cherry.theme__dark .cherry-editor .CodeMirror .CodeMirror-scroll .cm-image-marker,\n.cherry.theme__dark .cherry-editor .CodeMirror .CodeMirror-scroll .cm-quote,\n.cherry.theme__dark .cherry-editor .CodeMirror .CodeMirror-scroll .cm-header {\n  color: rgb(247, 133, 83);\n}\n\n.cherry.theme__dark .cherry-editor .CodeMirror .CodeMirror-scroll .cm-url {\n  background-color: rgb(0, 0, 0);\n}\n\n.cherry.theme__dark .cherry-editor .CodeMirror .CodeMirror-scroll .cm-comment,\n.cherry.theme__dark .cherry-editor .CodeMirror .CodeMirror-scroll .cm-url {\n  color: rgb(255, 203, 107);\n}\n\n.cherry.theme__dark .cherry-editor .CodeMirror .CodeMirror-selected {\n  background-color: rgb(69, 70, 70);\n}\n\n.cherry.theme__dark .cherry-sidebar {\n  box-shadow: 0 0 10px rgba(128, 145, 165, 0.2);\n}\n\n.cherry.theme__dark .cherry-previewer {\n  background-color: rgb(51, 51, 51);\n}\n\n.manual-article.theme__dark {\n  background-color: rgb(51, 51, 51) !important;\n}\n\n.cherry.theme__dark .cherry-previewer .cherry-mobile-previewer-content {\n  background-color: rgb(37, 37, 38);\n}\n\n.cherry.theme__dark .cherry-previewer-table-content-hander .cherry-previewer-table-content-hander__input textarea {\n  background-color: rgb(37, 37, 38);\n  color: rgb(200, 200, 200);\n  outline-color: rgb(247, 133, 83);\n}\n\n/** 预览区域样式 */\n.cherry-markdown.theme__dark {\n  color: rgb(200, 200, 200);\n  background-color: rgb(51, 51, 51);\n  /** 行内代码 */\n  /** \n  * 代码块\n  */\n  /** \n  * 表格\n  */\n  /** 可以理解为上下结构的音标，下部是文字，上部是对应的拼音 */\n  /** 脚注 */\n  /** 行间公式 */\n  /** 段落公式 */\n  /** 目录 */\n}\n\n.cherry-markdown.theme__dark h1,\n.cherry-markdown.theme__dark h2,\n.cherry-markdown.theme__dark h3,\n.cherry-markdown.theme__dark h4,\n.cherry-markdown.theme__dark h5 {\n  color: rgb(247, 133, 83);\n}\n\n.cherry-markdown.theme__dark h1,\n.cherry-markdown.theme__dark h2,\n.cherry-markdown.theme__dark h3,\n.cherry-markdown.theme__dark h4,\n.cherry-markdown.theme__dark h5,\n.cherry-markdown.theme__dark h6 {\n  /** 标题前面的锚点或序号 */\n}\n\n.cherry-markdown.theme__dark ul {\n  /** checklist 模式，未勾选时 */\n  /** checklist 模式，勾选时 */\n}\n\n.cherry-markdown.theme__dark ul.cherry-list__upper-roman {\n  list-style: upper-roman;\n}\n\n.cherry-markdown.theme__dark ul.cherry-list__lower-greek {\n  list-style: lower-greek;\n}\n\n.cherry-markdown.theme__dark ul.cherry-list__cjk-ideographic {\n  list-style: cjk-ideographic;\n}\n\n.cherry-markdown.theme__dark ul.cherry-list__circle {\n  list-style: circle;\n}\n\n.cherry-markdown.theme__dark ul.cherry-list__square {\n  list-style: square;\n}\n\n.cherry-markdown.theme__dark blockquote {\n  color: rgb(200, 200, 200);\n}\n\n.cherry-markdown.theme__dark a {\n  text-decoration: none;\n  color: rgb(255, 203, 107);\n}\n\n.cherry-markdown.theme__dark a:hover {\n  color: rgb(247, 133, 83);\n}\n\n.cherry-markdown.theme__dark hr {\n  border-color: rgb(105, 105, 105);\n}\n\n.cherry-markdown.theme__dark p code,\n.cherry-markdown.theme__dark li code {\n  background-color: rgb(0, 0, 0);\n  color: rgb(255, 203, 107);\n  border: 1px solid rgb(105, 105, 105);\n}\n\n.cherry-markdown.theme__dark table,\n.cherry-markdown.theme__dark .cherry-table {\n  color: rgb(200, 200, 200);\n}\n\n.cherry-markdown.theme__dark table th,\n.cherry-markdown.theme__dark .cherry-table th {\n  background-color: rgb(0, 0, 0);\n}\n\n.cherry-markdown.theme__dark table tr,\n.cherry-markdown.theme__dark table th,\n.cherry-markdown.theme__dark table td,\n.cherry-markdown.theme__dark .cherry-table tr,\n.cherry-markdown.theme__dark .cherry-table th,\n.cherry-markdown.theme__dark .cherry-table td {\n  border-color: rgb(105, 105, 105);\n}\n\n.cherry-markdown.theme__dark ruby {\n  /** 上部的拼音 */\n}\n\n.cherry-markdown.theme__dark .footnote {\n  border-color: rgb(105, 105, 105);\n}\n\n.cherry-markdown.theme__dark .footnote .footnote-title {\n  background-color: rgb(0, 0, 0);\n}\n\n.cherry-markdown.theme__dark .footnote .one-footnote {\n  color: rgb(200, 200, 200);\n  border-color: rgb(105, 105, 105);\n}\n\n.cherry-markdown.theme__dark .footnote .one-footnote a.footnote-ref {\n  padding: 5px;\n}\n\n.cherry-markdown.theme__dark .toc {\n  border: 1px solid rgb(105, 105, 105);\n  margin-top: 15px;\n  margin-bottom: 15px;\n  margin-right: 15px;\n}\n\n.cherry-markdown.theme__dark .toc .toc-title {\n  padding: 15px;\n  margin-bottom: 15px;\n  border-bottom: 1px solid rgb(105, 105, 105);\n}\n\n.cherry-markdown.theme__dark .toc .toc-li {\n  border: none;\n  padding: 0 20px;\n}\n\n.cherry-markdown.theme__dark .toc .toc-li a {\n  color: rgb(200, 200, 200);\n}\n\n.cherry-markdown.theme__dark .toc .toc-li a:hover {\n  color: rgb(247, 133, 83);\n}\n\n.cherry-markdown.theme__dark figure svg path,\n.cherry-markdown.theme__dark figure svg rect,\n.cherry-markdown.theme__dark figure svg line {\n  stroke: rgb(255, 203, 107) !important;\n}\n\n.cherry-markdown.theme__dark figure svg text {\n  fill: rgb(250, 160, 0) !important;\n  stroke: none !important;\n}\n\n.cherry-markdown.theme__dark figure svg tspan {\n  fill: rgb(250, 160, 0) !important;\n}\n\n.cherry-markdown.theme__dark figure svg circle {\n  fill: rgb(236, 236, 255) !important;\n}\n\n.cherry-markdown.theme__dark figure svg circle.state-start {\n  fill: rgb(250, 160, 0) !important;\n}\n\n.cherry-markdown.theme__dark .cherry-highlight-line {\n  background-color: #151422;\n}\n\n/** 色值可以参考：https://yeun.github.io/open-color/ */\n/** 工具栏样式 */\n/** 编辑区域样式 */\n/** 预览区域样式 */\n/** markdown样式 */\n/** 编辑器样式 */\n.cherry.theme__light {\n  /** 顶部按钮, 选中文字时弹出的按钮, 光标focus到空行时联想出的按钮, 侧边栏按钮 */\n  /** 二级菜单 */\n  /** 选中文字时弹出的按钮 */\n}\n\n.cherry.theme__light .cherry-toolbar,\n.cherry.theme__light .cherry-floatmenu,\n.cherry.theme__light .cherry-bubble,\n.cherry.theme__light .cherry-sidebar {\n  background: white;\n  border-color: white;\n}\n\n.cherry.theme__light .cherry-toolbar .cherry-toolbar-button,\n.cherry.theme__light .cherry-floatmenu .cherry-toolbar-button,\n.cherry.theme__light .cherry-bubble .cherry-toolbar-button,\n.cherry.theme__light .cherry-sidebar .cherry-toolbar-button {\n  color: #3f4a56;\n}\n\n.cherry.theme__light .cherry-toolbar .cherry-toolbar-button:hover,\n.cherry.theme__light .cherry-floatmenu .cherry-toolbar-button:hover,\n.cherry.theme__light .cherry-bubble .cherry-toolbar-button:hover,\n.cherry.theme__light .cherry-sidebar .cherry-toolbar-button:hover {\n  background-color: #ebf3ff;\n  color: #5d9bfc !important;\n  border-color: white;\n}\n\n.cherry.theme__light .cherry-toolbar .cherry-toolbar-button:hover i,\n.cherry.theme__light .cherry-floatmenu .cherry-toolbar-button:hover i,\n.cherry.theme__light .cherry-bubble .cherry-toolbar-button:hover i,\n.cherry.theme__light .cherry-sidebar .cherry-toolbar-button:hover i {\n  color: #5d9bfc !important;\n}\n\n.cherry.theme__light .cherry-dropdown {\n  background: white;\n  /** 选择颜色的按钮 */\n}\n\n.cherry.theme__light .cherry-dropdown .cherry-dropdown-item {\n  color: #3f4a56;\n}\n\n.cherry.theme__light .cherry-dropdown .cherry-dropdown-item:hover {\n  background-color: #ebf3ff;\n  color: #5d9bfc;\n}\n\n.cherry.theme__light .cherry-dropdown.cherry-color-wrap {\n  /** 色盘的标题 */\n  /** 色盘里的每一个色块 */\n}\n\n.cherry.theme__light .cherry-dropdown.cherry-color-wrap h3 {\n  color: #3f4a56;\n}\n\n.cherry.theme__light .cherry-dropdown.cherry-color-wrap .cherry-color-item {\n  border-color: #ebf3ff;\n}\n\n.cherry.theme__light .cherry-dropdown.cherry-color-wrap .cherry-color-item:hover {\n  border-color: rgb(247, 133, 83);\n}\n\n.cherry.theme__light .cherry-bubble {\n  /** 粘贴HTML内容时弹出的选择按钮 */\n}\n\n.cherry.theme__light .cherry-bubble .cherry-bubble-bottom {\n  border-top-color: white;\n}\n\n.cherry.theme__light .cherry-editor {\n  background-color: rgb(255, 255, 255);\n}\n\n.cherry.theme__light .cherry-editor .CodeMirror {\n  background-color: rgb(255, 255, 255);\n}\n\n.cherry.theme__light .cherry-editor .CodeMirror .CodeMirror-cursor {\n  border-left: 1px solid rgb(0, 0, 0);\n}\n\n.cherry.theme__light .cherry-editor .CodeMirror .CodeMirror-scroll span,\n.cherry.theme__light .cherry-editor .CodeMirror .CodeMirror-scroll .cm-variable-2,\n.cherry.theme__light .cherry-editor .CodeMirror .CodeMirror-scroll .cm-string,\n.cherry.theme__light .cherry-editor .CodeMirror .CodeMirror-scroll .cm-strong,\n.cherry.theme__light .cherry-editor .CodeMirror .CodeMirror-scroll .cm-em,\n.cherry.theme__light .cherry-editor .CodeMirror .CodeMirror-scroll .cm-meta {\n  color: rgb(63, 74, 86);\n}\n\n.cherry.theme__light .cherry-editor .CodeMirror .CodeMirror-scroll .cm-image-marker,\n.cherry.theme__light .cherry-editor .CodeMirror .CodeMirror-scroll .cm-quote,\n.cherry.theme__light .cherry-editor .CodeMirror .CodeMirror-scroll .cm-header {\n  color: rgb(34, 139, 230);\n}\n\n.cherry.theme__light .cherry-editor .CodeMirror .CodeMirror-scroll .cm-url {\n  background-color: rgb(215, 230, 254);\n}\n\n.cherry.theme__light .cherry-editor .CodeMirror .CodeMirror-scroll .cm-comment,\n.cherry.theme__light .cherry-editor .CodeMirror .CodeMirror-scroll .cm-url {\n  color: rgb(77, 171, 247);\n}\n\n.cherry.theme__light .cherry-editor .CodeMirror .CodeMirror-selected {\n  background-color: #ebf3ff;\n}\n\n.cherry.theme__light .cherry-sidebar {\n  box-shadow: 0 0 10px rgba(128, 145, 165, 0.2);\n}\n\n.cherry.theme__light .cherry-previewer {\n  background-color: rgb(255, 255, 255);\n}\n\n.cherry.theme__light .cherry-previewer .cherry-mobile-previewer-content {\n  background-color: rgb(255, 255, 255);\n}\n\n.cherry.theme__light .cherry-previewer-table-content-hander .cherry-previewer-table-content-hander__input textarea {\n  background-color: rgb(255, 255, 255);\n  color: rgb(63, 74, 86);\n  outline-color: rgb(34, 139, 230);\n}\n\n.manual-article.theme__light {\n  background-color: rgb(255, 255, 255) !important;\n}\n\n/** 预览区域样式 */\n.cherry-markdown.theme__light {\n  color: rgb(63, 74, 86);\n  background-color: rgb(255, 255, 255);\n  /** 行内代码 */\n  /** \n  * 代码块\n  */\n  /** \n  * 表格\n  */\n  /** 可以理解为上下结构的音标，下部是文字，上部是对应的拼音 */\n  /** 脚注 */\n  /** 行间公式 */\n  /** 段落公式 */\n  /** 目录 */\n}\n\n.cherry-markdown.theme__light h1,\n.cherry-markdown.theme__light h2,\n.cherry-markdown.theme__light h3,\n.cherry-markdown.theme__light h4,\n.cherry-markdown.theme__light h5 {\n  color: rgb(34, 139, 230);\n}\n\n.cherry-markdown.theme__light h1,\n.cherry-markdown.theme__light h2,\n.cherry-markdown.theme__light h3,\n.cherry-markdown.theme__light h4,\n.cherry-markdown.theme__light h5,\n.cherry-markdown.theme__light h6 {\n  /** 标题前面的锚点或序号 */\n}\n\n.cherry-markdown.theme__light ul {\n  /** checklist 模式，未勾选时 */\n  /** checklist 模式，勾选时 */\n}\n\n.cherry-markdown.theme__light ul.cherry-list__upper-roman {\n  list-style: upper-roman;\n}\n\n.cherry-markdown.theme__light ul.cherry-list__lower-greek {\n  list-style: lower-greek;\n}\n\n.cherry-markdown.theme__light ul.cherry-list__cjk-ideographic {\n  list-style: cjk-ideographic;\n}\n\n.cherry-markdown.theme__light ul.cherry-list__circle {\n  list-style: circle;\n}\n\n.cherry-markdown.theme__light ul.cherry-list__square {\n  list-style: square;\n}\n\n.cherry-markdown.theme__light blockquote {\n  color: rgb(63, 74, 86);\n  background-color: rgb(231, 245, 255);\n  border-color: rgb(25, 113, 194);\n}\n\n.cherry-markdown.theme__light a {\n  text-decoration: none;\n  color: rgb(77, 171, 247);\n}\n\n.cherry-markdown.theme__light a:hover {\n  text-decoration: underline;\n  color: rgb(34, 139, 230);\n}\n\n.cherry-markdown.theme__light hr {\n  border-color: rgb(25, 113, 194);\n}\n\n.cherry-markdown.theme__light p code,\n.cherry-markdown.theme__light li code {\n  background-color: rgb(215, 230, 254);\n  color: rgb(77, 171, 247);\n  border: 1px solid rgb(25, 113, 194);\n}\n\n.cherry-markdown.theme__light table,\n.cherry-markdown.theme__light .cherry-table {\n  color: rgb(63, 74, 86);\n}\n\n.cherry-markdown.theme__light table th,\n.cherry-markdown.theme__light .cherry-table th {\n  background-color: rgb(215, 230, 254);\n}\n\n.cherry-markdown.theme__light table tr,\n.cherry-markdown.theme__light table th,\n.cherry-markdown.theme__light table td,\n.cherry-markdown.theme__light .cherry-table tr,\n.cherry-markdown.theme__light .cherry-table th,\n.cherry-markdown.theme__light .cherry-table td {\n  border-color: rgb(25, 113, 194);\n}\n\n.cherry-markdown.theme__light ruby {\n  /** 上部的拼音 */\n}\n\n.cherry-markdown.theme__light .footnote {\n  border-color: rgb(25, 113, 194);\n}\n\n.cherry-markdown.theme__light .footnote .footnote-title {\n  background-color: rgb(215, 230, 254);\n}\n\n.cherry-markdown.theme__light .footnote .one-footnote {\n  color: rgb(63, 74, 86);\n  border-color: rgb(25, 113, 194);\n}\n\n.cherry-markdown.theme__light .footnote .one-footnote a.footnote-ref {\n  padding: 5px;\n}\n\n/** 色值可以参考：https://yeun.github.io/open-color/ */\n/** 工具栏样式 */\n/** 编辑区域样式 */\n/** 预览区域样式 */\n/** markdown样式 */\n/** 编辑器样式 */\n.cherry.theme__green {\n  /** 顶部按钮, 选中文字时弹出的按钮, 光标focus到空行时联想出的按钮, 侧边栏按钮 */\n  /** 二级菜单 */\n  /** 选中文字时弹出的按钮 */\n}\n\n.cherry.theme__green .cherry-toolbar,\n.cherry.theme__green .cherry-floatmenu,\n.cherry.theme__green .cherry-bubble,\n.cherry.theme__green .cherry-sidebar {\n  background: #FFF;\n  border-color: #FFF;\n}\n\n.cherry.theme__green .cherry-toolbar .cherry-toolbar-button,\n.cherry.theme__green .cherry-floatmenu .cherry-toolbar-button,\n.cherry.theme__green .cherry-bubble .cherry-toolbar-button,\n.cherry.theme__green .cherry-sidebar .cherry-toolbar-button {\n  color: #2b8a3e;\n}\n\n.cherry.theme__green .cherry-toolbar .cherry-toolbar-button i,\n.cherry.theme__green .cherry-floatmenu .cherry-toolbar-button i,\n.cherry.theme__green .cherry-bubble .cherry-toolbar-button i,\n.cherry.theme__green .cherry-sidebar .cherry-toolbar-button i {\n  color: #2b8a3e;\n}\n\n.cherry.theme__green .cherry-toolbar .cherry-toolbar-button:hover,\n.cherry.theme__green .cherry-floatmenu .cherry-toolbar-button:hover,\n.cherry.theme__green .cherry-bubble .cherry-toolbar-button:hover,\n.cherry.theme__green .cherry-sidebar .cherry-toolbar-button:hover {\n  background-color: #51cf66;\n  color: #ebfbee !important;\n  border-color: #FFF;\n}\n\n.cherry.theme__green .cherry-toolbar .cherry-toolbar-button:hover i,\n.cherry.theme__green .cherry-floatmenu .cherry-toolbar-button:hover i,\n.cherry.theme__green .cherry-bubble .cherry-toolbar-button:hover i,\n.cherry.theme__green .cherry-sidebar .cherry-toolbar-button:hover i {\n  color: #ebfbee !important;\n}\n\n.cherry.theme__green .cherry-dropdown {\n  background: #FFF;\n  /** 选择颜色的按钮 */\n}\n\n.cherry.theme__green .cherry-dropdown .cherry-dropdown-item {\n  color: #2b8a3e;\n}\n\n.cherry.theme__green .cherry-dropdown .cherry-dropdown-item:hover {\n  background-color: #51cf66;\n  color: #ebfbee;\n}\n\n.cherry.theme__green .cherry-dropdown.cherry-color-wrap {\n  /** 色盘的标题 */\n  /** 色盘里的每一个色块 */\n}\n\n.cherry.theme__green .cherry-dropdown.cherry-color-wrap h3 {\n  color: #2b8a3e;\n}\n\n.cherry.theme__green .cherry-dropdown.cherry-color-wrap .cherry-color-item {\n  border-color: #51cf66;\n}\n\n.cherry.theme__green .cherry-dropdown.cherry-color-wrap .cherry-color-item:hover {\n  border-color: #2b8a3e;\n}\n\n.cherry.theme__green .cherry-bubble {\n  /** 粘贴HTML内容时弹出的选择按钮 */\n}\n\n.cherry.theme__green .cherry-bubble .cherry-bubble-bottom {\n  border-top-color: #FFF;\n}\n\n.cherry.theme__green .cherry-editor {\n  background-color: #FFF;\n}\n\n.cherry.theme__green .cherry-editor .CodeMirror {\n  background-color: #FFF;\n}\n\n.cherry.theme__green .cherry-editor .CodeMirror .CodeMirror-cursor {\n  border-left: 1px solid #2b8a3e;\n}\n\n.cherry.theme__green .cherry-editor .CodeMirror .CodeMirror-scroll span,\n.cherry.theme__green .cherry-editor .CodeMirror .CodeMirror-scroll .cm-variable-2,\n.cherry.theme__green .cherry-editor .CodeMirror .CodeMirror-scroll .cm-string,\n.cherry.theme__green .cherry-editor .CodeMirror .CodeMirror-scroll .cm-strong,\n.cherry.theme__green .cherry-editor .CodeMirror .CodeMirror-scroll .cm-em,\n.cherry.theme__green .cherry-editor .CodeMirror .CodeMirror-scroll .cm-meta {\n  color: #2b8a3e;\n}\n\n.cherry.theme__green .cherry-editor .CodeMirror .CodeMirror-scroll .cm-image-marker,\n.cherry.theme__green .cherry-editor .CodeMirror .CodeMirror-scroll .cm-quote,\n.cherry.theme__green .cherry-editor .CodeMirror .CodeMirror-scroll .cm-header {\n  color: #37b24d;\n}\n\n.cherry.theme__green .cherry-editor .CodeMirror .CodeMirror-scroll .cm-url {\n  background-color: #ebfbee;\n}\n\n.cherry.theme__green .cherry-editor .CodeMirror .CodeMirror-scroll .cm-comment,\n.cherry.theme__green .cherry-editor .CodeMirror .CodeMirror-scroll .cm-url {\n  color: #40c057;\n}\n\n.cherry.theme__green .cherry-editor .CodeMirror .CodeMirror-selected {\n  background-color: #b2f2bb;\n}\n\n.cherry.theme__green .cherry-sidebar {\n  box-shadow: 0 0 10px rgba(128, 145, 165, 0.2);\n}\n\n.cherry.theme__green .cherry-previewer {\n  background-color: #ebfbee;\n}\n\n.manual-article.theme__green {\n  background-color: #ebfbee !important;\n}\n\n.cherry.theme__green .cherry-previewer .cherry-mobile-previewer-content {\n  background-color: #FFF;\n}\n\n.cherry.theme__green .cherry-previewer-table-content-hander .cherry-previewer-table-content-hander__input textarea {\n  background-color: #FFF;\n  color: #2b8a3e;\n  outline-color: #37b24d;\n}\n\n/** 预览区域样式 */\n.cherry-markdown.theme__green {\n  color: #2b8a3e;\n  background-color: #ebfbee;\n  /** 行内代码 */\n  /** \n  * 代码块\n  */\n  /** \n  * 表格\n  */\n  /** 可以理解为上下结构的音标，下部是文字，上部是对应的拼音 */\n  /** 脚注 */\n  /** 行间公式 */\n  /** 段落公式 */\n  /** 目录 */\n}\n\n.cherry-markdown.theme__green h1,\n.cherry-markdown.theme__green h2,\n.cherry-markdown.theme__green h3,\n.cherry-markdown.theme__green h4,\n.cherry-markdown.theme__green h5 {\n  color: #37b24d;\n  text-align: center;\n  margin-bottom: 35px;\n}\n\n.cherry-markdown.theme__green h1,\n.cherry-markdown.theme__green h2,\n.cherry-markdown.theme__green h3,\n.cherry-markdown.theme__green h4,\n.cherry-markdown.theme__green h5,\n.cherry-markdown.theme__green h6 {\n  /** 标题前面的锚点或序号 */\n}\n\n.cherry-markdown.theme__green ul {\n  /** checklist 模式，未勾选时 */\n  /** checklist 模式，勾选时 */\n}\n\n.cherry-markdown.theme__green ul.cherry-list__upper-roman {\n  list-style: upper-roman;\n}\n\n.cherry-markdown.theme__green ul.cherry-list__lower-greek {\n  list-style: lower-greek;\n}\n\n.cherry-markdown.theme__green ul.cherry-list__cjk-ideographic {\n  list-style: cjk-ideographic;\n}\n\n.cherry-markdown.theme__green ul.cherry-list__circle {\n  list-style: circle;\n}\n\n.cherry-markdown.theme__green ul.cherry-list__square {\n  list-style: square;\n}\n\n.cherry-markdown.theme__green blockquote {\n  color: #2b8a3e;\n  background-color: #d3f9d8;\n  border-color: #2f9e44;\n}\n\n.cherry-markdown.theme__green a {\n  text-decoration: none;\n  color: #40c057;\n}\n\n.cherry-markdown.theme__green a:hover {\n  text-decoration: underline;\n  color: #37b24d;\n}\n\n.cherry-markdown.theme__green hr {\n  border-color: #2f9e44;\n}\n\n.cherry-markdown.theme__green p code,\n.cherry-markdown.theme__green li code {\n  background-color: #d3f9d8;\n  color: #40c057;\n  border: 1px solid #2f9e44;\n}\n\n.cherry-markdown.theme__green table,\n.cherry-markdown.theme__green .cherry-table {\n  color: #2b8a3e;\n}\n\n.cherry-markdown.theme__green table th,\n.cherry-markdown.theme__green .cherry-table th {\n  background-color: #d3f9d8;\n}\n\n.cherry-markdown.theme__green table tr,\n.cherry-markdown.theme__green table th,\n.cherry-markdown.theme__green table td,\n.cherry-markdown.theme__green .cherry-table tr,\n.cherry-markdown.theme__green .cherry-table th,\n.cherry-markdown.theme__green .cherry-table td {\n  border-color: #2f9e44;\n}\n\n.cherry-markdown.theme__green ruby {\n  /** 上部的拼音 */\n}\n\n.cherry-markdown.theme__green .footnote {\n  border-color: #2f9e44;\n}\n\n.cherry-markdown.theme__green .footnote .footnote-title {\n  background-color: #d3f9d8;\n}\n\n.cherry-markdown.theme__green .footnote .one-footnote {\n  color: #2b8a3e;\n  border-color: #2f9e44;\n}\n\n.cherry-markdown.theme__green .footnote .one-footnote a.footnote-ref {\n  padding: 5px;\n}\n\n.cherry-markdown.theme__green .toc {\n  border-bottom: 1px solid #2f9e44;\n  padding-bottom: 15px;\n  margin-bottom: 30px;\n}\n\n.cherry-markdown.theme__green .toc .toc-title {\n  text-align: center;\n  padding-bottom: 15px;\n  margin-top: 30px;\n  margin-bottom: 15px;\n  border-bottom: 1px solid #2f9e44;\n}\n\n.cherry-markdown.theme__green .toc .toc-li {\n  border: none;\n}\n\n.cherry-markdown.theme__green .toc .toc-li a {\n  color: #2b8a3e;\n}\n\n.cherry-markdown.theme__green .toc .toc-li a:hover {\n  color: #37b24d;\n}\n\n/** 色值可以参考：https://yeun.github.io/open-color/ */\n/** 工具栏样式 */\n/** 编辑区域样式 */\n/** 预览区域样式 */\n/** markdown样式 */\n/** 编辑器样式 */\n.cherry.theme__red {\n  /** 顶部按钮, 选中文字时弹出的按钮, 光标focus到空行时联想出的按钮, 侧边栏按钮 */\n  /** 二级菜单 */\n  /** 选中文字时弹出的按钮 */\n}\n\n.cherry.theme__red .cherry-toolbar,\n.cherry.theme__red .cherry-floatmenu,\n.cherry.theme__red .cherry-bubble,\n.cherry.theme__red .cherry-sidebar {\n  background: #ffdeeb;\n  border-color: #ffdeeb;\n}\n\n.cherry.theme__red .cherry-toolbar .cherry-toolbar-button,\n.cherry.theme__red .cherry-floatmenu .cherry-toolbar-button,\n.cherry.theme__red .cherry-bubble .cherry-toolbar-button,\n.cherry.theme__red .cherry-sidebar .cherry-toolbar-button {\n  color: #c2255c;\n}\n\n.cherry.theme__red .cherry-toolbar .cherry-toolbar-button i,\n.cherry.theme__red .cherry-floatmenu .cherry-toolbar-button i,\n.cherry.theme__red .cherry-bubble .cherry-toolbar-button i,\n.cherry.theme__red .cherry-sidebar .cherry-toolbar-button i {\n  color: #c2255c;\n}\n\n.cherry.theme__red .cherry-toolbar .cherry-toolbar-button:hover,\n.cherry.theme__red .cherry-floatmenu .cherry-toolbar-button:hover,\n.cherry.theme__red .cherry-bubble .cherry-toolbar-button:hover,\n.cherry.theme__red .cherry-sidebar .cherry-toolbar-button:hover {\n  background-color: #f06595;\n  color: #fff0f6 !important;\n  border-color: #ffdeeb;\n}\n\n.cherry.theme__red .cherry-toolbar .cherry-toolbar-button:hover i,\n.cherry.theme__red .cherry-floatmenu .cherry-toolbar-button:hover i,\n.cherry.theme__red .cherry-bubble .cherry-toolbar-button:hover i,\n.cherry.theme__red .cherry-sidebar .cherry-toolbar-button:hover i {\n  color: #fff0f6 !important;\n}\n\n.cherry.theme__red .cherry-dropdown {\n  background: #ffdeeb;\n  /** 选择颜色的按钮 */\n}\n\n.cherry.theme__red .cherry-dropdown .cherry-dropdown-item {\n  color: #c2255c;\n}\n\n.cherry.theme__red .cherry-dropdown .cherry-dropdown-item:hover {\n  background-color: #f06595;\n  color: #fff0f6;\n}\n\n.cherry.theme__red .cherry-dropdown.cherry-color-wrap {\n  /** 色盘的标题 */\n  /** 色盘里的每一个色块 */\n}\n\n.cherry.theme__red .cherry-dropdown.cherry-color-wrap h3 {\n  color: #c2255c;\n}\n\n.cherry.theme__red .cherry-dropdown.cherry-color-wrap .cherry-color-item {\n  border-color: #f06595;\n}\n\n.cherry.theme__red .cherry-dropdown.cherry-color-wrap .cherry-color-item:hover {\n  border-color: #a61e4d;\n}\n\n.cherry.theme__red .cherry-bubble {\n  /** 粘贴HTML内容时弹出的选择按钮 */\n}\n\n.cherry.theme__red .cherry-bubble .cherry-bubble-bottom {\n  border-top-color: #ffdeeb;\n}\n\n.cherry.theme__red .cherry-editor {\n  background-color: #fff0f6;\n}\n\n.cherry.theme__red .cherry-editor .CodeMirror {\n  background-color: #fff0f6;\n}\n\n.cherry.theme__red .cherry-editor .CodeMirror .CodeMirror-cursor {\n  border-left: 1px solid #a61e4d;\n}\n\n.cherry.theme__red .cherry-editor .CodeMirror .CodeMirror-scroll span,\n.cherry.theme__red .cherry-editor .CodeMirror .CodeMirror-scroll .cm-variable-2,\n.cherry.theme__red .cherry-editor .CodeMirror .CodeMirror-scroll .cm-string,\n.cherry.theme__red .cherry-editor .CodeMirror .CodeMirror-scroll .cm-strong,\n.cherry.theme__red .cherry-editor .CodeMirror .CodeMirror-scroll .cm-em,\n.cherry.theme__red .cherry-editor .CodeMirror .CodeMirror-scroll .cm-meta {\n  color: #a61e4d;\n}\n\n.cherry.theme__red .cherry-editor .CodeMirror .CodeMirror-scroll .cm-image-marker,\n.cherry.theme__red .cherry-editor .CodeMirror .CodeMirror-scroll .cm-quote,\n.cherry.theme__red .cherry-editor .CodeMirror .CodeMirror-scroll .cm-header {\n  color: #d6336c;\n}\n\n.cherry.theme__red .cherry-editor .CodeMirror .CodeMirror-scroll .cm-url {\n  background-color: #ffdeeb;\n}\n\n.cherry.theme__red .cherry-editor .CodeMirror .CodeMirror-scroll .cm-comment,\n.cherry.theme__red .cherry-editor .CodeMirror .CodeMirror-scroll .cm-url {\n  color: #f06595;\n}\n\n.cherry.theme__red .cherry-editor .CodeMirror .CodeMirror-selected {\n  background-color: #fcc2d7;\n}\n\n.cherry.theme__red .cherry-sidebar {\n  box-shadow: 0 0 10px #fcc2d7;\n}\n\n.cherry.theme__red .cherry-previewer {\n  background-color: #fff0f6;\n}\n\n.manual-article.theme__red {\n  background-color: #fff0f6 !important;\n}\n\n.cherry.theme__red .cherry-previewer .cherry-mobile-previewer-content {\n  background-color: #fff0f6;\n}\n\n.cherry.theme__red .cherry-previewer-table-content-hander .cherry-previewer-table-content-hander__input textarea {\n  background-color: #fff0f6;\n  color: #a61e4d;\n  outline-color: #d6336c;\n}\n\n/** 预览区域样式 */\n.cherry-markdown.theme__red {\n  color: #a61e4d;\n  background-color: #fff0f6;\n  /** 行内代码 */\n  /** \n  * 代码块\n  */\n  /** \n  * 表格\n  */\n  /** 可以理解为上下结构的音标，下部是文字，上部是对应的拼音 */\n  /** 脚注 */\n  /** 行间公式 */\n  /** 段落公式 */\n  /** 目录 */\n}\n\n.cherry-markdown.theme__red h1,\n.cherry-markdown.theme__red h2,\n.cherry-markdown.theme__red h3,\n.cherry-markdown.theme__red h4,\n.cherry-markdown.theme__red h5 {\n  color: #d6336c;\n  text-align: center;\n  border-bottom: 1px dashed #c2255c;\n  padding-bottom: 15px;\n  margin-bottom: 25px;\n}\n\n.cherry-markdown.theme__red h1,\n.cherry-markdown.theme__red h2,\n.cherry-markdown.theme__red h3,\n.cherry-markdown.theme__red h4,\n.cherry-markdown.theme__red h5,\n.cherry-markdown.theme__red h6 {\n  /** 标题前面的锚点或序号 */\n}\n\n.cherry-markdown.theme__red ul {\n  /** checklist 模式，未勾选时 */\n  /** checklist 模式，勾选时 */\n}\n\n.cherry-markdown.theme__red ul.cherry-list__upper-roman {\n  list-style: upper-roman;\n}\n\n.cherry-markdown.theme__red ul.cherry-list__lower-greek {\n  list-style: lower-greek;\n}\n\n.cherry-markdown.theme__red ul.cherry-list__cjk-ideographic {\n  list-style: cjk-ideographic;\n}\n\n.cherry-markdown.theme__red ul.cherry-list__circle {\n  list-style: circle;\n}\n\n.cherry-markdown.theme__red ul.cherry-list__square {\n  list-style: square;\n}\n\n.cherry-markdown.theme__red blockquote {\n  color: #a61e4d;\n  background-color: #ffdeeb;\n  border-color: #c2255c;\n}\n\n.cherry-markdown.theme__red a {\n  text-decoration: none;\n  color: #f06595;\n}\n\n.cherry-markdown.theme__red a:hover {\n  text-decoration: underline;\n  color: #d6336c;\n}\n\n.cherry-markdown.theme__red hr {\n  border-color: #c2255c;\n}\n\n.cherry-markdown.theme__red p code,\n.cherry-markdown.theme__red li code {\n  background-color: #ffdeeb;\n  color: #f06595;\n  border: 1px solid #c2255c;\n}\n\n.cherry-markdown.theme__red table,\n.cherry-markdown.theme__red .cherry-table {\n  color: #a61e4d;\n}\n\n.cherry-markdown.theme__red table th,\n.cherry-markdown.theme__red .cherry-table th {\n  background-color: #ffdeeb;\n}\n\n.cherry-markdown.theme__red table tr,\n.cherry-markdown.theme__red table th,\n.cherry-markdown.theme__red table td,\n.cherry-markdown.theme__red .cherry-table tr,\n.cherry-markdown.theme__red .cherry-table th,\n.cherry-markdown.theme__red .cherry-table td {\n  border-color: #c2255c;\n}\n\n.cherry-markdown.theme__red ruby {\n  /** 上部的拼音 */\n}\n\n.cherry-markdown.theme__red .footnote {\n  border-color: #c2255c;\n}\n\n.cherry-markdown.theme__red .footnote .footnote-title {\n  background-color: #ffdeeb;\n}\n\n.cherry-markdown.theme__red .footnote .one-footnote {\n  color: #a61e4d;\n  border-color: #c2255c;\n}\n\n.cherry-markdown.theme__red .footnote .one-footnote a.footnote-ref {\n  padding: 5px;\n}\n\n.cherry-markdown.theme__red .toc {\n  border-bottom: 1px solid #c2255c;\n  padding-bottom: 15px;\n  margin-bottom: 30px;\n}\n\n.cherry-markdown.theme__red .toc .toc-title {\n  text-align: center;\n  padding-bottom: 15px;\n  margin-top: 30px;\n  margin-bottom: 15px;\n  border-bottom: 1px solid #c2255c;\n}\n\n.cherry-markdown.theme__red .toc .toc-li {\n  border: none;\n}\n\n.cherry-markdown.theme__red .toc .toc-li a {\n  color: #a61e4d;\n}\n\n.cherry-markdown.theme__red .toc .toc-li a:hover {\n  color: #d6336c;\n}\n\n/** 工具栏样式 */\n/** 编辑区域样式 */\n/** 预览区域样式 */\n/** markdown样式 */\n/** 编辑器样式 */\n.cherry.theme__violet {\n  /** 顶部按钮, 选中文字时弹出的按钮, 光标focus到空行时联想出的按钮, 侧边栏按钮 */\n  /** 二级菜单 */\n  /** 选中文字时弹出的按钮 */\n  /** 光标focus到空行时联想出的按钮 */\n}\n\n.cherry.theme__violet .cherry-toolbar,\n.cherry.theme__violet .cherry-floatmenu,\n.cherry.theme__violet .cherry-bubble,\n.cherry.theme__violet .cherry-sidebar {\n  background: #FFF;\n  border-color: #FFF;\n}\n\n.cherry.theme__violet .cherry-toolbar .cherry-toolbar-button,\n.cherry.theme__violet .cherry-floatmenu .cherry-toolbar-button,\n.cherry.theme__violet .cherry-bubble .cherry-toolbar-button,\n.cherry.theme__violet .cherry-sidebar .cherry-toolbar-button {\n  color: #5f3dc4;\n}\n\n.cherry.theme__violet .cherry-toolbar .cherry-toolbar-button i,\n.cherry.theme__violet .cherry-floatmenu .cherry-toolbar-button i,\n.cherry.theme__violet .cherry-bubble .cherry-toolbar-button i,\n.cherry.theme__violet .cherry-sidebar .cherry-toolbar-button i {\n  color: #5f3dc4;\n}\n\n.cherry.theme__violet .cherry-toolbar .cherry-toolbar-button:hover,\n.cherry.theme__violet .cherry-floatmenu .cherry-toolbar-button:hover,\n.cherry.theme__violet .cherry-bubble .cherry-toolbar-button:hover,\n.cherry.theme__violet .cherry-sidebar .cherry-toolbar-button:hover {\n  background-color: #845ef7;\n  color: #f3f0ff !important;\n  border-color: #FFF;\n}\n\n.cherry.theme__violet .cherry-toolbar .cherry-toolbar-button:hover i,\n.cherry.theme__violet .cherry-floatmenu .cherry-toolbar-button:hover i,\n.cherry.theme__violet .cherry-bubble .cherry-toolbar-button:hover i,\n.cherry.theme__violet .cherry-sidebar .cherry-toolbar-button:hover i {\n  color: #f3f0ff !important;\n}\n\n.cherry.theme__violet .cherry-dropdown {\n  background: #FFF;\n  /** 选择颜色的按钮 */\n}\n\n.cherry.theme__violet .cherry-dropdown .cherry-dropdown-item {\n  color: #5f3dc4;\n}\n\n.cherry.theme__violet .cherry-dropdown .cherry-dropdown-item:hover {\n  background-color: #845ef7;\n  color: #f3f0ff;\n}\n\n.cherry.theme__violet .cherry-dropdown.cherry-color-wrap {\n  /** 色盘的标题 */\n  /** 色盘里的每一个色块 */\n}\n\n.cherry.theme__violet .cherry-dropdown.cherry-color-wrap h3 {\n  color: #5f3dc4;\n}\n\n.cherry.theme__violet .cherry-dropdown.cherry-color-wrap .cherry-color-item {\n  border-color: #845ef7;\n}\n\n.cherry.theme__violet .cherry-dropdown.cherry-color-wrap .cherry-color-item:hover {\n  border-color: #5f3dc4;\n}\n\n.cherry.theme__violet .cherry-bubble {\n  /** 粘贴HTML内容时弹出的选择按钮 */\n}\n\n.cherry.theme__violet .cherry-bubble .cherry-bubble-bottom {\n  border-top-color: #FFF;\n}\n\n.cherry.theme__violet .cherry-editor {\n  background-color: #FFF;\n}\n\n.cherry.theme__violet .cherry-editor .CodeMirror {\n  background-color: #FFF;\n}\n\n.cherry.theme__violet .cherry-editor .CodeMirror .CodeMirror-cursor {\n  border-left: 1px solid #5f3dc4;\n}\n\n.cherry.theme__violet .cherry-editor .CodeMirror .CodeMirror-scroll span,\n.cherry.theme__violet .cherry-editor .CodeMirror .CodeMirror-scroll .cm-variable-2,\n.cherry.theme__violet .cherry-editor .CodeMirror .CodeMirror-scroll .cm-string,\n.cherry.theme__violet .cherry-editor .CodeMirror .CodeMirror-scroll .cm-strong,\n.cherry.theme__violet .cherry-editor .CodeMirror .CodeMirror-scroll .cm-em,\n.cherry.theme__violet .cherry-editor .CodeMirror .CodeMirror-scroll .cm-meta {\n  color: #5f3dc4;\n}\n\n.cherry.theme__violet .cherry-editor .CodeMirror .CodeMirror-scroll .cm-image-marker,\n.cherry.theme__violet .cherry-editor .CodeMirror .CodeMirror-scroll .cm-quote,\n.cherry.theme__violet .cherry-editor .CodeMirror .CodeMirror-scroll .cm-header {\n  color: #7048e8;\n}\n\n.cherry.theme__violet .cherry-editor .CodeMirror .CodeMirror-scroll .cm-url {\n  background-color: #f3f0ff;\n}\n\n.cherry.theme__violet .cherry-editor .CodeMirror .CodeMirror-scroll .cm-comment,\n.cherry.theme__violet .cherry-editor .CodeMirror .CodeMirror-scroll .cm-url {\n  color: #7950f2;\n}\n\n.cherry.theme__violet .cherry-editor .CodeMirror .CodeMirror-selected {\n  background-color: #d0bfff;\n}\n\n.cherry.theme__violet .cherry-sidebar {\n  box-shadow: 0 0 10px rgba(128, 145, 165, 0.2);\n}\n\n.cherry.theme__violet .cherry-previewer {\n  background-color: #FFF;\n}\n\n.manual-article.theme__violet {\n  background-color: #FFF !important;\n}\n\n.cherry.theme__violet .cherry-previewer .cherry-mobile-previewer-content {\n  background-color: #FFF;\n}\n\n.cherry.theme__violet .cherry-previewer-table-content-hander .cherry-previewer-table-content-hander__input textarea {\n  background-color: #FFF;\n  color: #5f3dc4;\n  outline-color: #7048e8;\n}\n\n/** 预览区域样式 */\n.cherry-markdown.theme__violet {\n  color: #5f3dc4;\n  background-color: #FFF;\n  /** 行内代码 */\n  /** \n  * 代码块\n  */\n  /** \n  * 表格\n  */\n  /** 可以理解为上下结构的音标，下部是文字，上部是对应的拼音 */\n  /** 脚注 */\n  /** 行间公式 */\n  /** 段落公式 */\n  /** 目录 */\n}\n\n.cherry-markdown.theme__violet h1,\n.cherry-markdown.theme__violet h2,\n.cherry-markdown.theme__violet h3,\n.cherry-markdown.theme__violet h4,\n.cherry-markdown.theme__violet h5 {\n  color: #7048e8;\n  text-align: center;\n  margin-bottom: 35px;\n}\n\n.cherry-markdown.theme__violet h1,\n.cherry-markdown.theme__violet h2,\n.cherry-markdown.theme__violet h3,\n.cherry-markdown.theme__violet h4,\n.cherry-markdown.theme__violet h5,\n.cherry-markdown.theme__violet h6 {\n  /** 标题前面的锚点或序号 */\n}\n\n.cherry-markdown.theme__violet ul {\n  /** checklist 模式，未勾选时 */\n  /** checklist 模式，勾选时 */\n}\n\n.cherry-markdown.theme__violet ul.cherry-list__upper-roman {\n  list-style: upper-roman;\n}\n\n.cherry-markdown.theme__violet ul.cherry-list__lower-greek {\n  list-style: lower-greek;\n}\n\n.cherry-markdown.theme__violet ul.cherry-list__cjk-ideographic {\n  list-style: cjk-ideographic;\n}\n\n.cherry-markdown.theme__violet ul.cherry-list__circle {\n  list-style: circle;\n}\n\n.cherry-markdown.theme__violet ul.cherry-list__square {\n  list-style: square;\n}\n\n.cherry-markdown.theme__violet blockquote {\n  color: #5f3dc4;\n  background-color: #e5dbff;\n  border-color: #6741d9;\n}\n\n.cherry-markdown.theme__violet a {\n  text-decoration: none;\n  color: #7950f2;\n}\n\n.cherry-markdown.theme__violet a:hover {\n  text-decoration: underline;\n  color: #7048e8;\n}\n\n.cherry-markdown.theme__violet hr {\n  border-color: #6741d9;\n}\n\n.cherry-markdown.theme__violet p code,\n.cherry-markdown.theme__violet li code {\n  background-color: #e5dbff;\n  color: #7950f2;\n  border: 1px solid #6741d9;\n}\n\n.cherry-markdown.theme__violet table,\n.cherry-markdown.theme__violet .cherry-table {\n  color: #5f3dc4;\n}\n\n.cherry-markdown.theme__violet table th,\n.cherry-markdown.theme__violet .cherry-table th {\n  background-color: #e5dbff;\n}\n\n.cherry-markdown.theme__violet table tr,\n.cherry-markdown.theme__violet table th,\n.cherry-markdown.theme__violet table td,\n.cherry-markdown.theme__violet .cherry-table tr,\n.cherry-markdown.theme__violet .cherry-table th,\n.cherry-markdown.theme__violet .cherry-table td {\n  border-color: #6741d9;\n}\n\n.cherry-markdown.theme__violet ruby {\n  /** 上部的拼音 */\n}\n\n.cherry-markdown.theme__violet .footnote {\n  border-color: #6741d9;\n}\n\n.cherry-markdown.theme__violet .footnote .footnote-title {\n  background-color: #e5dbff;\n}\n\n.cherry-markdown.theme__violet .footnote .one-footnote {\n  color: #5f3dc4;\n  border-color: #6741d9;\n}\n\n.cherry-markdown.theme__violet .footnote .one-footnote a.footnote-ref {\n  padding: 5px;\n}\n\n.cherry-markdown.theme__violet .toc {\n  border-bottom: 1px solid #6741d9;\n  padding-bottom: 15px;\n  margin-bottom: 30px;\n}\n\n.cherry-markdown.theme__violet .toc .toc-title {\n  text-align: center;\n  padding-bottom: 15px;\n  margin-top: 30px;\n  margin-bottom: 15px;\n  border-bottom: 1px solid #6741d9;\n}\n\n.cherry-markdown.theme__violet .toc .toc-li {\n  border: none;\n}\n\n.cherry-markdown.theme__violet .toc .toc-li a {\n  color: #5f3dc4;\n}\n\n.cherry-markdown.theme__violet .toc .toc-li a:hover {\n  color: #7048e8;\n}\n\n/** 色值可以参考：https://yeun.github.io/open-color/ */\n/** 工具栏样式 */\n/** 编辑区域样式 */\n/** 预览区域样式 */\n/** markdown样式 */\n/** 编辑器样式 */\n.cherry.theme__blue {\n  /** 顶部按钮, 选中文字时弹出的按钮, 光标focus到空行时联想出的按钮, 侧边栏按钮 */\n  /** 二级菜单 */\n  /** 选中文字时弹出的按钮 */\n}\n\n.cherry.theme__blue .cherry-toolbar,\n.cherry.theme__blue .cherry-floatmenu,\n.cherry.theme__blue .cherry-bubble,\n.cherry.theme__blue .cherry-sidebar {\n  background: #e5dbff;\n  border-color: #e5dbff;\n}\n\n.cherry.theme__blue .cherry-toolbar .cherry-toolbar-button,\n.cherry.theme__blue .cherry-floatmenu .cherry-toolbar-button,\n.cherry.theme__blue .cherry-bubble .cherry-toolbar-button,\n.cherry.theme__blue .cherry-sidebar .cherry-toolbar-button {\n  color: #3b5bdb;\n}\n\n.cherry.theme__blue .cherry-toolbar .cherry-toolbar-button i,\n.cherry.theme__blue .cherry-floatmenu .cherry-toolbar-button i,\n.cherry.theme__blue .cherry-bubble .cherry-toolbar-button i,\n.cherry.theme__blue .cherry-sidebar .cherry-toolbar-button i {\n  color: #3b5bdb;\n}\n\n.cherry.theme__blue .cherry-toolbar .cherry-toolbar-button:hover,\n.cherry.theme__blue .cherry-floatmenu .cherry-toolbar-button:hover,\n.cherry.theme__blue .cherry-bubble .cherry-toolbar-button:hover,\n.cherry.theme__blue .cherry-sidebar .cherry-toolbar-button:hover {\n  background-color: #845ef7;\n  color: #edf2ff !important;\n  border-color: #e5dbff;\n}\n\n.cherry.theme__blue .cherry-toolbar .cherry-toolbar-button:hover i,\n.cherry.theme__blue .cherry-floatmenu .cherry-toolbar-button:hover i,\n.cherry.theme__blue .cherry-bubble .cherry-toolbar-button:hover i,\n.cherry.theme__blue .cherry-sidebar .cherry-toolbar-button:hover i {\n  color: #edf2ff !important;\n}\n\n.cherry.theme__blue .cherry-dropdown {\n  background: #e5dbff;\n  /** 选择颜色的按钮 */\n}\n\n.cherry.theme__blue .cherry-dropdown .cherry-dropdown-item {\n  color: #3b5bdb;\n}\n\n.cherry.theme__blue .cherry-dropdown .cherry-dropdown-item:hover {\n  background-color: #845ef7;\n  color: #edf2ff;\n}\n\n.cherry.theme__blue .cherry-dropdown.cherry-color-wrap {\n  /** 色盘的标题 */\n  /** 色盘里的每一个色块 */\n}\n\n.cherry.theme__blue .cherry-dropdown.cherry-color-wrap h3 {\n  color: #3b5bdb;\n}\n\n.cherry.theme__blue .cherry-dropdown.cherry-color-wrap .cherry-color-item {\n  border-color: #845ef7;\n}\n\n.cherry.theme__blue .cherry-dropdown.cherry-color-wrap .cherry-color-item:hover {\n  border-color: #364fc7;\n}\n\n.cherry.theme__blue .cherry-bubble {\n  /** 粘贴HTML内容时弹出的选择按钮 */\n}\n\n.cherry.theme__blue .cherry-bubble .cherry-bubble-bottom {\n  border-top-color: #e5dbff;\n}\n\n.cherry.theme__blue .cherry-editor {\n  background-color: #f3f0ff;\n}\n\n.cherry.theme__blue .cherry-editor .CodeMirror {\n  background-color: #f3f0ff;\n}\n\n.cherry.theme__blue .cherry-editor .CodeMirror .CodeMirror-cursor {\n  border-left: 1px solid #364fc7;\n}\n\n.cherry.theme__blue .cherry-editor .CodeMirror .CodeMirror-scroll span,\n.cherry.theme__blue .cherry-editor .CodeMirror .CodeMirror-scroll .cm-variable-2,\n.cherry.theme__blue .cherry-editor .CodeMirror .CodeMirror-scroll .cm-string,\n.cherry.theme__blue .cherry-editor .CodeMirror .CodeMirror-scroll .cm-strong,\n.cherry.theme__blue .cherry-editor .CodeMirror .CodeMirror-scroll .cm-em,\n.cherry.theme__blue .cherry-editor .CodeMirror .CodeMirror-scroll .cm-meta {\n  color: #364fc7;\n}\n\n.cherry.theme__blue .cherry-editor .CodeMirror .CodeMirror-scroll .cm-image-marker,\n.cherry.theme__blue .cherry-editor .CodeMirror .CodeMirror-scroll .cm-quote,\n.cherry.theme__blue .cherry-editor .CodeMirror .CodeMirror-scroll .cm-header {\n  color: #4263eb;\n}\n\n.cherry.theme__blue .cherry-editor .CodeMirror .CodeMirror-scroll .cm-url {\n  background-color: #e5dbff;\n}\n\n.cherry.theme__blue .cherry-editor .CodeMirror .CodeMirror-scroll .cm-comment,\n.cherry.theme__blue .cherry-editor .CodeMirror .CodeMirror-scroll .cm-url {\n  color: #5c7cfa;\n}\n\n.cherry.theme__blue .cherry-editor .CodeMirror .CodeMirror-selected {\n  background-color: #d0bfff;\n}\n\n.cherry.theme__blue .cherry-sidebar {\n  box-shadow: 0 0 10px #bac8ff;\n}\n\n.cherry.theme__blue .cherry-previewer {\n  background-color: #f3f0ff;\n}\n\n.manual-article.theme__blue {\n  background-color: #f3f0ff !important;\n}\n\n.cherry.theme__blue .cherry-previewer .cherry-mobile-previewer-content {\n  background-color: #f3f0ff;\n}\n\n.cherry.theme__blue .cherry-previewer-table-content-hander .cherry-previewer-table-content-hander__input textarea {\n  background-color: #f3f0ff;\n  color: #364fc7;\n  outline-color: #4263eb;\n}\n\n/** 预览区域样式 */\n.cherry-markdown.theme__blue {\n  color: #364fc7;\n  background-color: #f3f0ff;\n  /** 行内代码 */\n  /** \n  * 代码块\n  */\n  /** \n  * 表格\n  */\n  /** 可以理解为上下结构的音标，下部是文字，上部是对应的拼音 */\n  /** 脚注 */\n  /** 行间公式 */\n  /** 段落公式 */\n  /** 目录 */\n}\n\n.cherry-markdown.theme__blue h1,\n.cherry-markdown.theme__blue h2,\n.cherry-markdown.theme__blue h3,\n.cherry-markdown.theme__blue h4,\n.cherry-markdown.theme__blue h5 {\n  color: #4263eb;\n  text-align: center;\n  border-bottom: 1px dashed #3b5bdb;\n  padding-bottom: 15px;\n  margin-bottom: 25px;\n}\n\n.cherry-markdown.theme__blue h1,\n.cherry-markdown.theme__blue h2,\n.cherry-markdown.theme__blue h3,\n.cherry-markdown.theme__blue h4,\n.cherry-markdown.theme__blue h5,\n.cherry-markdown.theme__blue h6 {\n  /** 标题前面的锚点或序号 */\n}\n\n.cherry-markdown.theme__blue ul {\n  /** checklist 模式，未勾选时 */\n  /** checklist 模式，勾选时 */\n}\n\n.cherry-markdown.theme__blue ul.cherry-list__upper-roman {\n  list-style: upper-roman;\n}\n\n.cherry-markdown.theme__blue ul.cherry-list__lower-greek {\n  list-style: lower-greek;\n}\n\n.cherry-markdown.theme__blue ul.cherry-list__cjk-ideographic {\n  list-style: cjk-ideographic;\n}\n\n.cherry-markdown.theme__blue ul.cherry-list__circle {\n  list-style: circle;\n}\n\n.cherry-markdown.theme__blue ul.cherry-list__square {\n  list-style: square;\n}\n\n.cherry-markdown.theme__blue blockquote {\n  color: #364fc7;\n  background-color: #e5dbff;\n  border-color: #3b5bdb;\n}\n\n.cherry-markdown.theme__blue a {\n  text-decoration: none;\n  color: #5c7cfa;\n}\n\n.cherry-markdown.theme__blue a:hover {\n  text-decoration: underline;\n  color: #4263eb;\n}\n\n.cherry-markdown.theme__blue hr {\n  border-color: #3b5bdb;\n}\n\n.cherry-markdown.theme__blue p code,\n.cherry-markdown.theme__blue li code {\n  background-color: #e5dbff;\n  color: #5c7cfa;\n  border: 1px solid #3b5bdb;\n}\n\n.cherry-markdown.theme__blue table,\n.cherry-markdown.theme__blue .cherry-table {\n  color: #364fc7;\n}\n\n.cherry-markdown.theme__blue table th,\n.cherry-markdown.theme__blue .cherry-table th {\n  background-color: #e5dbff;\n}\n\n.cherry-markdown.theme__blue table tr,\n.cherry-markdown.theme__blue table th,\n.cherry-markdown.theme__blue table td,\n.cherry-markdown.theme__blue .cherry-table tr,\n.cherry-markdown.theme__blue .cherry-table th,\n.cherry-markdown.theme__blue .cherry-table td {\n  border-color: #3b5bdb;\n}\n\n.cherry-markdown.theme__blue ruby {\n  /** 上部的拼音 */\n}\n\n.cherry-markdown.theme__blue .footnote {\n  border-color: #3b5bdb;\n}\n\n.cherry-markdown.theme__blue .footnote .footnote-title {\n  background-color: #e5dbff;\n}\n\n.cherry-markdown.theme__blue .footnote .one-footnote {\n  color: #364fc7;\n  border-color: #3b5bdb;\n}\n\n.cherry-markdown.theme__blue .footnote .one-footnote a.footnote-ref {\n  padding: 5px;\n}\n\n.cherry-markdown.theme__blue .toc {\n  border-bottom: 1px solid #3b5bdb;\n  padding-bottom: 15px;\n  margin-bottom: 30px;\n}\n\n.cherry-markdown.theme__blue .toc .toc-title {\n  text-align: center;\n  padding-bottom: 15px;\n  margin-top: 30px;\n  margin-bottom: 15px;\n  border-bottom: 1px solid #3b5bdb;\n}\n\n.cherry-markdown.theme__blue .toc .toc-li {\n  border: none;\n}\n\n.cherry-markdown.theme__blue .toc .toc-li a {\n  color: #364fc7;\n}\n\n.cherry-markdown.theme__blue .toc .toc-li a:hover {\n  color: #4263eb;\n}\n\n/* BASICS */\n.CodeMirror {\n  /* Set height, width, borders, and global font properties here */\n  font-family: monospace;\n  height: 300px;\n  color: black;\n  direction: ltr;\n}\n\n/* PADDING */\n.CodeMirror-lines {\n  padding: 4px 0;\n  /* Vertical padding around content */\n}\n\n.CodeMirror pre.CodeMirror-line,\n.CodeMirror pre.CodeMirror-line-like {\n  padding: 0 4px;\n  /* Horizontal padding of content */\n}\n\n.CodeMirror-scrollbar-filler,\n.CodeMirror-gutter-filler {\n  background-color: white;\n  /* The little square between H and V scrollbars */\n}\n\n/* GUTTER */\n.CodeMirror-gutters {\n  border-right: 1px solid #ddd;\n  background-color: #f7f7f7;\n  white-space: nowrap;\n}\n\n.CodeMirror-linenumber {\n  padding: 0 3px 0 5px;\n  min-width: 20px;\n  text-align: right;\n  color: #999;\n  white-space: nowrap;\n}\n\n.CodeMirror-guttermarker {\n  color: black;\n}\n\n.CodeMirror-guttermarker-subtle {\n  color: #999;\n}\n\n/* CURSOR */\n.CodeMirror-cursor {\n  border-left: 1px solid black;\n  border-right: none;\n  width: 0;\n}\n\n/* Shown when moving in bi-directional text */\n.CodeMirror div.CodeMirror-secondarycursor {\n  border-left: 1px solid silver;\n}\n\n.cm-fat-cursor .CodeMirror-cursor {\n  width: auto;\n  border: 0 !important;\n  background: #7e7;\n}\n\n.cm-fat-cursor div.CodeMirror-cursors {\n  z-index: 1;\n}\n\n.cm-fat-cursor-mark {\n  background-color: rgba(20, 255, 20, 0.5);\n  -webkit-animation: blink 1.06s steps(1) infinite;\n  -moz-animation: blink 1.06s steps(1) infinite;\n  animation: blink 1.06s steps(1) infinite;\n}\n\n.cm-animate-fat-cursor {\n  width: auto;\n  border: 0;\n  -webkit-animation: blink 1.06s steps(1) infinite;\n  -moz-animation: blink 1.06s steps(1) infinite;\n  animation: blink 1.06s steps(1) infinite;\n  background-color: #7e7;\n}\n\n@-moz-keyframes blink {\n  50% {\n    background-color: transparent;\n  }\n}\n\n@-webkit-keyframes blink {\n  50% {\n    background-color: transparent;\n  }\n}\n\n@keyframes blink {\n  50% {\n    background-color: transparent;\n  }\n}\n\n/* Can style cursor different in overwrite (non-insert) mode */\n.cm-tab {\n  display: inline-block;\n  text-decoration: inherit;\n}\n\n.CodeMirror-rulers {\n  position: absolute;\n  left: 0;\n  right: 0;\n  top: -50px;\n  bottom: 0;\n  overflow: hidden;\n}\n\n.CodeMirror-ruler {\n  border-left: 1px solid #ccc;\n  top: 0;\n  bottom: 0;\n  position: absolute;\n}\n\n/* DEFAULT THEME */\n.cm-s-default .cm-header {\n  color: blue;\n}\n\n.cm-s-default .cm-quote {\n  color: #090;\n}\n\n.cm-negative {\n  color: #d44;\n}\n\n.cm-positive {\n  color: #292;\n}\n\n.cm-header,\n.cm-strong {\n  font-weight: bold;\n}\n\n.cm-em {\n  font-style: italic;\n}\n\n.cm-link {\n  text-decoration: underline;\n}\n\n.cm-strikethrough {\n  text-decoration: line-through;\n}\n\n.cm-s-default .cm-keyword {\n  color: #708;\n}\n\n.cm-s-default .cm-atom {\n  color: #219;\n}\n\n.cm-s-default .cm-number {\n  color: #164;\n}\n\n.cm-s-default .cm-def {\n  color: #00f;\n}\n\n.cm-s-default .cm-variable-2 {\n  color: #05a;\n}\n\n.cm-s-default .cm-variable-3,\n.cm-s-default .cm-type {\n  color: #085;\n}\n\n.cm-s-default .cm-comment {\n  color: #a50;\n}\n\n.cm-s-default .cm-string {\n  color: #a11;\n}\n\n.cm-s-default .cm-string-2 {\n  color: #f50;\n}\n\n.cm-s-default .cm-meta {\n  color: #555;\n}\n\n.cm-s-default .cm-qualifier {\n  color: #555;\n}\n\n.cm-s-default .cm-builtin {\n  color: #30a;\n}\n\n.cm-s-default .cm-bracket {\n  color: #997;\n}\n\n.cm-s-default .cm-tag {\n  color: #170;\n}\n\n.cm-s-default .cm-attribute {\n  color: #00c;\n}\n\n.cm-s-default .cm-hr {\n  color: #999;\n}\n\n.cm-s-default .cm-link {\n  color: #00c;\n}\n\n.cm-s-default .cm-error {\n  color: #f00;\n}\n\n.cm-invalidchar {\n  color: #f00;\n}\n\n.CodeMirror-composing {\n  border-bottom: 2px solid;\n}\n\n/* Default styles for common addons */\ndiv.CodeMirror span.CodeMirror-matchingbracket {\n  color: #0b0;\n}\n\ndiv.CodeMirror span.CodeMirror-nonmatchingbracket {\n  color: #a22;\n}\n\n.CodeMirror-matchingtag {\n  background: rgba(255, 150, 0, 0.3);\n}\n\n.CodeMirror-activeline-background {\n  background: #e8f2ff;\n}\n\n/* STOP */\n/* The rest of this file contains styles related to the mechanics of\n   the editor. You probably shouldn't touch them. */\n.CodeMirror {\n  position: relative;\n  overflow: hidden;\n  background: white;\n}\n\n.CodeMirror-scroll {\n  overflow: scroll !important;\n  /* Things will break if this is overridden */\n  /* 50px is the magic margin used to hide the element's real scrollbars */\n  /* See overflow: hidden in .CodeMirror */\n  margin-bottom: -50px;\n  margin-right: -50px;\n  padding-bottom: 50px;\n  height: 100%;\n  outline: none;\n  /* Prevent dragging from highlighting the element */\n  position: relative;\n}\n\n.CodeMirror-sizer {\n  position: relative;\n  border-right: 50px solid transparent;\n}\n\n/* The fake, visible scrollbars. Used to force redraw during scrolling\n   before actual scrolling happens, thus preventing shaking and\n   flickering artifacts. */\n.CodeMirror-vscrollbar,\n.CodeMirror-hscrollbar,\n.CodeMirror-scrollbar-filler,\n.CodeMirror-gutter-filler {\n  position: absolute;\n  z-index: 6;\n  display: none;\n  outline: none;\n}\n\n.CodeMirror-vscrollbar {\n  right: 0;\n  top: 0;\n  overflow-x: hidden;\n  overflow-y: scroll;\n}\n\n.CodeMirror-hscrollbar {\n  bottom: 0;\n  left: 0;\n  overflow-y: hidden;\n  overflow-x: scroll;\n}\n\n.CodeMirror-scrollbar-filler {\n  right: 0;\n  bottom: 0;\n}\n\n.CodeMirror-gutter-filler {\n  left: 0;\n  bottom: 0;\n}\n\n.CodeMirror-gutters {\n  position: absolute;\n  left: 0;\n  top: 0;\n  min-height: 100%;\n  z-index: 3;\n}\n\n.CodeMirror-gutter {\n  white-space: normal;\n  height: 100%;\n  display: inline-block;\n  vertical-align: top;\n  margin-bottom: -50px;\n}\n\n.CodeMirror-gutter-wrapper {\n  position: absolute;\n  z-index: 4;\n  background: none !important;\n  border: none !important;\n}\n\n.CodeMirror-gutter-background {\n  position: absolute;\n  top: 0;\n  bottom: 0;\n  z-index: 4;\n}\n\n.CodeMirror-gutter-elt {\n  position: absolute;\n  cursor: default;\n  z-index: 4;\n}\n\n.CodeMirror-gutter-wrapper ::selection {\n  background-color: transparent;\n}\n\n.CodeMirror-gutter-wrapper ::-moz-selection {\n  background-color: transparent;\n}\n\n.CodeMirror-lines {\n  cursor: text;\n  min-height: 1px;\n  /* prevents collapsing before first draw */\n}\n\n.CodeMirror pre.CodeMirror-line,\n.CodeMirror pre.CodeMirror-line-like {\n  /* Reset some styles that the rest of the page might have set */\n  -moz-border-radius: 0;\n  -webkit-border-radius: 0;\n  border-radius: 0;\n  border-width: 0;\n  background: transparent;\n  font-family: inherit;\n  font-size: inherit;\n  margin: 0;\n  white-space: pre;\n  word-wrap: normal;\n  line-height: inherit;\n  color: inherit;\n  z-index: 2;\n  position: relative;\n  overflow: visible;\n  -webkit-tap-highlight-color: transparent;\n  -webkit-font-variant-ligatures: contextual;\n  font-variant-ligatures: contextual;\n}\n\n.CodeMirror-wrap pre.CodeMirror-line,\n.CodeMirror-wrap pre.CodeMirror-line-like {\n  word-wrap: break-word;\n  white-space: pre-wrap;\n  word-break: normal;\n}\n\n.CodeMirror-linebackground {\n  position: absolute;\n  left: 0;\n  right: 0;\n  top: 0;\n  bottom: 0;\n  z-index: 0;\n}\n\n.CodeMirror-linewidget {\n  position: relative;\n  z-index: 2;\n  padding: 0.1px;\n  /* Force widget margins to stay inside of the container */\n}\n\n.CodeMirror-rtl pre {\n  direction: rtl;\n}\n\n.CodeMirror-code {\n  outline: none;\n}\n\n/* Force content-box sizing for the elements where we expect it */\n.CodeMirror-scroll,\n.CodeMirror-sizer,\n.CodeMirror-gutter,\n.CodeMirror-gutters,\n.CodeMirror-linenumber {\n  -moz-box-sizing: content-box;\n  box-sizing: content-box;\n}\n\n.CodeMirror-measure {\n  position: absolute;\n  width: 100%;\n  height: 0;\n  overflow: hidden;\n  visibility: hidden;\n}\n\n.CodeMirror-cursor {\n  position: absolute;\n  pointer-events: none;\n}\n\n.CodeMirror-measure pre {\n  position: static;\n}\n\ndiv.CodeMirror-cursors {\n  visibility: hidden;\n  position: relative;\n  z-index: 3;\n}\n\ndiv.CodeMirror-dragcursors {\n  visibility: visible;\n}\n\n.CodeMirror-focused div.CodeMirror-cursors {\n  visibility: visible;\n}\n\n.CodeMirror-selected {\n  background: #d9d9d9;\n}\n\n.CodeMirror-focused .CodeMirror-selected {\n  background: #d7d4f0;\n}\n\n.CodeMirror-crosshair {\n  cursor: crosshair;\n}\n\n.CodeMirror-line::selection,\n.CodeMirror-line>span::selection,\n.CodeMirror-line>span>span::selection {\n  background: #d7d4f0;\n}\n\n.CodeMirror-line::-moz-selection,\n.CodeMirror-line>span::-moz-selection,\n.CodeMirror-line>span>span::-moz-selection {\n  background: #d7d4f0;\n}\n\n.cm-searching {\n  background-color: #ffa;\n  background-color: rgba(255, 255, 0, 0.4);\n}\n\n/* Used to force a border model for a node */\n.cm-force-border {\n  padding-right: 0.1px;\n}\n\n@media print {\n\n  /* Hide the cursor when printing */\n  .CodeMirror div.CodeMirror-cursors {\n    visibility: hidden;\n  }\n}\n\n/* See issue #2901 */\n.cm-tab-wrap-hack:after {\n  content: \"\";\n}\n\n/* Help users use markselection to safely style text background */\nspan.CodeMirror-selectedtext {\n  background: none;\n}\n\niframe.cherry-dialog-iframe {\n  width: 100%;\n  height: 100%;\n}\n\n.manual-article.cherry {\n  height: auto !important;\n}\n\n.cherry img {\n  margin: auto;\n  display: block;\n  max-width: 80%;\n}\n\n.tooltipped {\n  position: relative\n}\n\n.tooltipped:after {\n  position: absolute;\n  z-index: 1000000;\n  display: none;\n  padding: 5px 8px;\n  font: normal normal 11px/1.5 Helvetica, arial, nimbussansl, liberationsans, freesans, clean, sans-serif, \"Segoe UI Emoji\", \"Segoe UI Symbol\";\n  color: #fff;\n  text-align: center;\n  text-decoration: none;\n  text-shadow: none;\n  text-transform: none;\n  letter-spacing: normal;\n  word-wrap: break-word;\n  white-space: pre;\n  pointer-events: none;\n  content: attr(aria-label);\n  background: rgba(0, 0, 0, .8);\n  border-radius: 3px;\n  -webkit-font-smoothing: subpixel-antialiased\n}\n\n.tooltipped:before {\n  position: absolute;\n  z-index: 1000001;\n  display: none;\n  width: 0;\n  height: 0;\n  color: rgba(0, 0, 0, .8);\n  pointer-events: none;\n  content: \"\";\n  border: 5px solid transparent\n}\n\n.tooltipped:hover:before,\n.tooltipped:hover:after,\n.tooltipped:active:before,\n.tooltipped:active:after,\n.tooltipped:focus:before,\n.tooltipped:focus:after {\n  display: inline-block;\n  text-decoration: none\n}\n\n.tooltipped-multiline:hover:after,\n.tooltipped-multiline:active:after,\n.tooltipped-multiline:focus:after {\n  display: table-cell\n}\n\n.tooltipped-s:after,\n.tooltipped-se:after,\n.tooltipped-sw:after {\n  top: 100%;\n  right: 50%;\n  margin-top: 5px\n}\n\n.tooltipped-s:before,\n.tooltipped-se:before,\n.tooltipped-sw:before {\n  top: auto;\n  right: 50%;\n  bottom: -5px;\n  margin-right: -5px;\n  border-bottom-color: rgba(0, 0, 0, .8)\n}\n\n.tooltipped-se:after {\n  right: auto;\n  left: 50%;\n  margin-left: -15px\n}\n\n.tooltipped-sw:after {\n  margin-right: -15px\n}\n\n.tooltipped-n:after,\n.tooltipped-ne:after,\n.tooltipped-nw:after {\n  right: 50%;\n  bottom: 100%;\n  margin-bottom: 5px\n}\n\n.tooltipped-n:before,\n.tooltipped-ne:before,\n.tooltipped-nw:before {\n  top: -5px;\n  right: 50%;\n  bottom: auto;\n  margin-right: -5px;\n  border-top-color: rgba(0, 0, 0, .8)\n}\n\n.tooltipped-ne:after {\n  right: auto;\n  left: 50%;\n  margin-left: -15px\n}\n\n.tooltipped-nw:after {\n  margin-right: -15px\n}\n\n.tooltipped-s:after,\n.tooltipped-n:after {\n  -webkit-transform: translateX(50%);\n  -ms-transform: translateX(50%);\n  transform: translateX(50%)\n}\n\n.tooltipped-w:after {\n  right: 100%;\n  bottom: 50%;\n  margin-right: 5px;\n  -webkit-transform: translateY(50%);\n  -ms-transform: translateY(50%);\n  transform: translateY(50%)\n}\n\n.tooltipped-w:before {\n  top: 50%;\n  bottom: 50%;\n  left: -5px;\n  margin-top: -5px;\n  border-left-color: rgba(0, 0, 0, .8)\n}\n\n.tooltipped-e:after {\n  bottom: 50%;\n  left: 100%;\n  margin-left: 5px;\n  -webkit-transform: translateY(50%);\n  -ms-transform: translateY(50%);\n  transform: translateY(50%)\n}\n\n.tooltipped-e:before {\n  top: 50%;\n  right: -5px;\n  bottom: 50%;\n  margin-top: -5px;\n  border-right-color: rgba(0, 0, 0, .8)\n}\n\n.tooltipped-multiline:after {\n  width: -webkit-max-content;\n  width: -moz-max-content;\n  width: max-content;\n  max-width: 250px;\n  word-break: break-word;\n  word-wrap: normal;\n  white-space: pre-line;\n  border-collapse: separate\n}\n\n.tooltipped-multiline.tooltipped-s:after,\n.tooltipped-multiline.tooltipped-n:after {\n  right: auto;\n  left: 50%;\n  -webkit-transform: translateX(-50%);\n  -ms-transform: translateX(-50%);\n  transform: translateX(-50%)\n}\n\n.tooltipped-multiline.tooltipped-w:after,\n.tooltipped-multiline.tooltipped-e:after {\n  right: 100%\n}\n\n/*styles related to snippet copy to clipboard, borrowed from https://clipboardjs.com/assets/styles/main.css*/\n.clippy {\n  margin-top: -3px;\n  position: relative;\n  top: 3px\n}\n\n.codebtn[disabled] .clippy {\n  opacity: .3\n}\n\n.snippet {\n  position: relative;\n  overflow: visible\n}\n\n.snippet .codebtn {\n  -webkit-transition: opacity .3s ease-in-out;\n  -o-transition: opacity .3s ease-in-out;\n  transition: opacity .3s ease-in-out;\n  opacity: 0;\n  padding: 6px 6px;\n  position: absolute;\n  right: 6px;\n  top: 13px\n}\n\n.snippet:hover .codebtn,\n.snippet .codebtn:focus {\n  opacity: 1\n}\n\nspan.change {\n  border-radius: 10px !important;\n  background-color: #b3d4fc !important;\n}\n\n\n@media screen and (max-width: 1400px) {\n  .cherry-toolbar-button {\n    padding: 0;\n  }\n\n  .cherry-toolbar .toolbar-left {\n    justify-content: space-between;\n    width: 95%;\n  }\n}"
  },
  {
    "path": "static/cherry/cherry-markdown.js",
    "content": "(function (global, factory) {\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :\n\ttypeof define === 'function' && define.amd ? define(['exports'], factory) :\n\t(global = global || self, factory(global.Cherry = {}));\n}(this, (function (exports) { 'use strict';\n\n\tvar commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};\n\n\tfunction unwrapExports (x) {\n\t\treturn x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;\n\t}\n\n\tfunction createCommonjsModule(fn, module) {\n\t\treturn module = { exports: {} }, fn(module, module.exports), module.exports;\n\t}\n\n\tfunction getCjsExportFromNamespace (n) {\n\t\treturn n && n['default'] || n;\n\t}\n\n\tvar check = function (it) {\n\t  return it && it.Math == Math && it;\n\t};\n\n\t// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028\n\tvar global_1 =\n\t  // eslint-disable-next-line es-x/no-global-this -- safe\n\t  check(typeof globalThis == 'object' && globalThis) ||\n\t  check(typeof window == 'object' && window) ||\n\t  // eslint-disable-next-line no-restricted-globals -- safe\n\t  check(typeof self == 'object' && self) ||\n\t  check(typeof commonjsGlobal == 'object' && commonjsGlobal) ||\n\t  // eslint-disable-next-line no-new-func -- fallback\n\t  (function () { return this; })() || Function('return this')();\n\n\tvar fails = function (exec) {\n\t  try {\n\t    return !!exec();\n\t  } catch (error) {\n\t    return true;\n\t  }\n\t};\n\n\tvar functionBindNative = !fails(function () {\n\t  // eslint-disable-next-line es-x/no-function-prototype-bind -- safe\n\t  var test = (function () { /* empty */ }).bind();\n\t  // eslint-disable-next-line no-prototype-builtins -- safe\n\t  return typeof test != 'function' || test.hasOwnProperty('prototype');\n\t});\n\n\tvar FunctionPrototype = Function.prototype;\n\tvar apply = FunctionPrototype.apply;\n\tvar call = FunctionPrototype.call;\n\n\t// eslint-disable-next-line es-x/no-reflect -- safe\n\tvar functionApply = typeof Reflect == 'object' && Reflect.apply || (functionBindNative ? call.bind(apply) : function () {\n\t  return call.apply(apply, arguments);\n\t});\n\n\tvar FunctionPrototype$1 = Function.prototype;\n\tvar bind = FunctionPrototype$1.bind;\n\tvar call$1 = FunctionPrototype$1.call;\n\tvar uncurryThis = functionBindNative && bind.bind(call$1, call$1);\n\n\tvar functionUncurryThis = functionBindNative ? function (fn) {\n\t  return fn && uncurryThis(fn);\n\t} : function (fn) {\n\t  return fn && function () {\n\t    return call$1.apply(fn, arguments);\n\t  };\n\t};\n\n\t// `IsCallable` abstract operation\n\t// https://tc39.es/ecma262/#sec-iscallable\n\tvar isCallable = function (argument) {\n\t  return typeof argument == 'function';\n\t};\n\n\t// Detect IE8's incomplete defineProperty implementation\n\tvar descriptors = !fails(function () {\n\t  // eslint-disable-next-line es-x/no-object-defineproperty -- required for testing\n\t  return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7;\n\t});\n\n\tvar call$2 = Function.prototype.call;\n\n\tvar functionCall = functionBindNative ? call$2.bind(call$2) : function () {\n\t  return call$2.apply(call$2, arguments);\n\t};\n\n\tvar $propertyIsEnumerable = {}.propertyIsEnumerable;\n\t// eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe\n\tvar getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\n\n\t// Nashorn ~ JDK8 bug\n\tvar NASHORN_BUG = getOwnPropertyDescriptor && !$propertyIsEnumerable.call({ 1: 2 }, 1);\n\n\t// `Object.prototype.propertyIsEnumerable` method implementation\n\t// https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable\n\tvar f = NASHORN_BUG ? function propertyIsEnumerable(V) {\n\t  var descriptor = getOwnPropertyDescriptor(this, V);\n\t  return !!descriptor && descriptor.enumerable;\n\t} : $propertyIsEnumerable;\n\n\tvar objectPropertyIsEnumerable = {\n\t\tf: f\n\t};\n\n\tvar createPropertyDescriptor = function (bitmap, value) {\n\t  return {\n\t    enumerable: !(bitmap & 1),\n\t    configurable: !(bitmap & 2),\n\t    writable: !(bitmap & 4),\n\t    value: value\n\t  };\n\t};\n\n\tvar toString = functionUncurryThis({}.toString);\n\tvar stringSlice = functionUncurryThis(''.slice);\n\n\tvar classofRaw = function (it) {\n\t  return stringSlice(toString(it), 8, -1);\n\t};\n\n\tvar Object$1 = global_1.Object;\n\tvar split = functionUncurryThis(''.split);\n\n\t// fallback for non-array-like ES3 and non-enumerable old V8 strings\n\tvar indexedObject = fails(function () {\n\t  // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346\n\t  // eslint-disable-next-line no-prototype-builtins -- safe\n\t  return !Object$1('z').propertyIsEnumerable(0);\n\t}) ? function (it) {\n\t  return classofRaw(it) == 'String' ? split(it, '') : Object$1(it);\n\t} : Object$1;\n\n\tvar TypeError$1 = global_1.TypeError;\n\n\t// `RequireObjectCoercible` abstract operation\n\t// https://tc39.es/ecma262/#sec-requireobjectcoercible\n\tvar requireObjectCoercible = function (it) {\n\t  if (it == undefined) throw TypeError$1(\"Can't call method on \" + it);\n\t  return it;\n\t};\n\n\t// toObject with fallback for non-array-like ES3 strings\n\n\n\n\tvar toIndexedObject = function (it) {\n\t  return indexedObject(requireObjectCoercible(it));\n\t};\n\n\tvar isObject = function (it) {\n\t  return typeof it == 'object' ? it !== null : isCallable(it);\n\t};\n\n\tvar path = {};\n\n\tvar aFunction = function (variable) {\n\t  return isCallable(variable) ? variable : undefined;\n\t};\n\n\tvar getBuiltIn = function (namespace, method) {\n\t  return arguments.length < 2 ? aFunction(path[namespace]) || aFunction(global_1[namespace])\n\t    : path[namespace] && path[namespace][method] || global_1[namespace] && global_1[namespace][method];\n\t};\n\n\tvar objectIsPrototypeOf = functionUncurryThis({}.isPrototypeOf);\n\n\tvar engineUserAgent = getBuiltIn('navigator', 'userAgent') || '';\n\n\tvar process$1 = global_1.process;\n\tvar Deno$1 = global_1.Deno;\n\tvar versions = process$1 && process$1.versions || Deno$1 && Deno$1.version;\n\tvar v8 = versions && versions.v8;\n\tvar match, version;\n\n\tif (v8) {\n\t  match = v8.split('.');\n\t  // in old Chrome, versions of V8 isn't V8 = Chrome / 10\n\t  // but their correct versions are not interesting for us\n\t  version = match[0] > 0 && match[0] < 4 ? 1 : +(match[0] + match[1]);\n\t}\n\n\t// BrowserFS NodeJS `process` polyfill incorrectly set `.v8` to `0.0`\n\t// so check `userAgent` even if `.v8` exists, but 0\n\tif (!version && engineUserAgent) {\n\t  match = engineUserAgent.match(/Edge\\/(\\d+)/);\n\t  if (!match || match[1] >= 74) {\n\t    match = engineUserAgent.match(/Chrome\\/(\\d+)/);\n\t    if (match) version = +match[1];\n\t  }\n\t}\n\n\tvar engineV8Version = version;\n\n\t/* eslint-disable es-x/no-symbol -- required for testing */\n\n\n\n\t// eslint-disable-next-line es-x/no-object-getownpropertysymbols -- required for testing\n\tvar nativeSymbol = !!Object.getOwnPropertySymbols && !fails(function () {\n\t  var symbol = Symbol();\n\t  // Chrome 38 Symbol has incorrect toString conversion\n\t  // `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances\n\t  return !String(symbol) || !(Object(symbol) instanceof Symbol) ||\n\t    // Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances\n\t    !Symbol.sham && engineV8Version && engineV8Version < 41;\n\t});\n\n\t/* eslint-disable es-x/no-symbol -- required for testing */\n\n\n\tvar useSymbolAsUid = nativeSymbol\n\t  && !Symbol.sham\n\t  && typeof Symbol.iterator == 'symbol';\n\n\tvar Object$2 = global_1.Object;\n\n\tvar isSymbol = useSymbolAsUid ? function (it) {\n\t  return typeof it == 'symbol';\n\t} : function (it) {\n\t  var $Symbol = getBuiltIn('Symbol');\n\t  return isCallable($Symbol) && objectIsPrototypeOf($Symbol.prototype, Object$2(it));\n\t};\n\n\tvar String$1 = global_1.String;\n\n\tvar tryToString = function (argument) {\n\t  try {\n\t    return String$1(argument);\n\t  } catch (error) {\n\t    return 'Object';\n\t  }\n\t};\n\n\tvar TypeError$2 = global_1.TypeError;\n\n\t// `Assert: IsCallable(argument) is true`\n\tvar aCallable = function (argument) {\n\t  if (isCallable(argument)) return argument;\n\t  throw TypeError$2(tryToString(argument) + ' is not a function');\n\t};\n\n\t// `GetMethod` abstract operation\n\t// https://tc39.es/ecma262/#sec-getmethod\n\tvar getMethod = function (V, P) {\n\t  var func = V[P];\n\t  return func == null ? undefined : aCallable(func);\n\t};\n\n\tvar TypeError$3 = global_1.TypeError;\n\n\t// `OrdinaryToPrimitive` abstract operation\n\t// https://tc39.es/ecma262/#sec-ordinarytoprimitive\n\tvar ordinaryToPrimitive = function (input, pref) {\n\t  var fn, val;\n\t  if (pref === 'string' && isCallable(fn = input.toString) && !isObject(val = functionCall(fn, input))) return val;\n\t  if (isCallable(fn = input.valueOf) && !isObject(val = functionCall(fn, input))) return val;\n\t  if (pref !== 'string' && isCallable(fn = input.toString) && !isObject(val = functionCall(fn, input))) return val;\n\t  throw TypeError$3(\"Can't convert object to primitive value\");\n\t};\n\n\tvar isPure = true;\n\n\t// eslint-disable-next-line es-x/no-object-defineproperty -- safe\n\tvar defineProperty = Object.defineProperty;\n\n\tvar defineGlobalProperty = function (key, value) {\n\t  try {\n\t    defineProperty(global_1, key, { value: value, configurable: true, writable: true });\n\t  } catch (error) {\n\t    global_1[key] = value;\n\t  } return value;\n\t};\n\n\tvar SHARED = '__core-js_shared__';\n\tvar store = global_1[SHARED] || defineGlobalProperty(SHARED, {});\n\n\tvar sharedStore = store;\n\n\tvar shared = createCommonjsModule(function (module) {\n\t(module.exports = function (key, value) {\n\t  return sharedStore[key] || (sharedStore[key] = value !== undefined ? value : {});\n\t})('versions', []).push({\n\t  version: '3.22.6',\n\t  mode:  'pure' ,\n\t  copyright: '© 2014-2022 Denis Pushkarev (zloirock.ru)',\n\t  license: 'https://github.com/zloirock/core-js/blob/v3.22.6/LICENSE',\n\t  source: 'https://github.com/zloirock/core-js'\n\t});\n\t});\n\n\tvar Object$3 = global_1.Object;\n\n\t// `ToObject` abstract operation\n\t// https://tc39.es/ecma262/#sec-toobject\n\tvar toObject = function (argument) {\n\t  return Object$3(requireObjectCoercible(argument));\n\t};\n\n\tvar hasOwnProperty = functionUncurryThis({}.hasOwnProperty);\n\n\t// `HasOwnProperty` abstract operation\n\t// https://tc39.es/ecma262/#sec-hasownproperty\n\t// eslint-disable-next-line es-x/no-object-hasown -- safe\n\tvar hasOwnProperty_1 = Object.hasOwn || function hasOwn(it, key) {\n\t  return hasOwnProperty(toObject(it), key);\n\t};\n\n\tvar id = 0;\n\tvar postfix = Math.random();\n\tvar toString$1 = functionUncurryThis(1.0.toString);\n\n\tvar uid = function (key) {\n\t  return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString$1(++id + postfix, 36);\n\t};\n\n\tvar WellKnownSymbolsStore = shared('wks');\n\tvar Symbol$1 = global_1.Symbol;\n\tvar symbolFor = Symbol$1 && Symbol$1['for'];\n\tvar createWellKnownSymbol = useSymbolAsUid ? Symbol$1 : Symbol$1 && Symbol$1.withoutSetter || uid;\n\n\tvar wellKnownSymbol = function (name) {\n\t  if (!hasOwnProperty_1(WellKnownSymbolsStore, name) || !(nativeSymbol || typeof WellKnownSymbolsStore[name] == 'string')) {\n\t    var description = 'Symbol.' + name;\n\t    if (nativeSymbol && hasOwnProperty_1(Symbol$1, name)) {\n\t      WellKnownSymbolsStore[name] = Symbol$1[name];\n\t    } else if (useSymbolAsUid && symbolFor) {\n\t      WellKnownSymbolsStore[name] = symbolFor(description);\n\t    } else {\n\t      WellKnownSymbolsStore[name] = createWellKnownSymbol(description);\n\t    }\n\t  } return WellKnownSymbolsStore[name];\n\t};\n\n\tvar TypeError$4 = global_1.TypeError;\n\tvar TO_PRIMITIVE = wellKnownSymbol('toPrimitive');\n\n\t// `ToPrimitive` abstract operation\n\t// https://tc39.es/ecma262/#sec-toprimitive\n\tvar toPrimitive = function (input, pref) {\n\t  if (!isObject(input) || isSymbol(input)) return input;\n\t  var exoticToPrim = getMethod(input, TO_PRIMITIVE);\n\t  var result;\n\t  if (exoticToPrim) {\n\t    if (pref === undefined) pref = 'default';\n\t    result = functionCall(exoticToPrim, input, pref);\n\t    if (!isObject(result) || isSymbol(result)) return result;\n\t    throw TypeError$4(\"Can't convert object to primitive value\");\n\t  }\n\t  if (pref === undefined) pref = 'number';\n\t  return ordinaryToPrimitive(input, pref);\n\t};\n\n\t// `ToPropertyKey` abstract operation\n\t// https://tc39.es/ecma262/#sec-topropertykey\n\tvar toPropertyKey = function (argument) {\n\t  var key = toPrimitive(argument, 'string');\n\t  return isSymbol(key) ? key : key + '';\n\t};\n\n\tvar document$1 = global_1.document;\n\t// typeof document.createElement is 'object' in old IE\n\tvar EXISTS = isObject(document$1) && isObject(document$1.createElement);\n\n\tvar documentCreateElement = function (it) {\n\t  return EXISTS ? document$1.createElement(it) : {};\n\t};\n\n\t// Thanks to IE8 for its funny defineProperty\n\tvar ie8DomDefine = !descriptors && !fails(function () {\n\t  // eslint-disable-next-line es-x/no-object-defineproperty -- required for testing\n\t  return Object.defineProperty(documentCreateElement('div'), 'a', {\n\t    get: function () { return 7; }\n\t  }).a != 7;\n\t});\n\n\t// eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe\n\tvar $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\n\n\t// `Object.getOwnPropertyDescriptor` method\n\t// https://tc39.es/ecma262/#sec-object.getownpropertydescriptor\n\tvar f$1 = descriptors ? $getOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) {\n\t  O = toIndexedObject(O);\n\t  P = toPropertyKey(P);\n\t  if (ie8DomDefine) try {\n\t    return $getOwnPropertyDescriptor(O, P);\n\t  } catch (error) { /* empty */ }\n\t  if (hasOwnProperty_1(O, P)) return createPropertyDescriptor(!functionCall(objectPropertyIsEnumerable.f, O, P), O[P]);\n\t};\n\n\tvar objectGetOwnPropertyDescriptor = {\n\t\tf: f$1\n\t};\n\n\tvar replacement = /#|\\.prototype\\./;\n\n\tvar isForced = function (feature, detection) {\n\t  var value = data[normalize(feature)];\n\t  return value == POLYFILL ? true\n\t    : value == NATIVE ? false\n\t    : isCallable(detection) ? fails(detection)\n\t    : !!detection;\n\t};\n\n\tvar normalize = isForced.normalize = function (string) {\n\t  return String(string).replace(replacement, '.').toLowerCase();\n\t};\n\n\tvar data = isForced.data = {};\n\tvar NATIVE = isForced.NATIVE = 'N';\n\tvar POLYFILL = isForced.POLYFILL = 'P';\n\n\tvar isForced_1 = isForced;\n\n\tvar bind$1 = functionUncurryThis(functionUncurryThis.bind);\n\n\t// optional / simple context binding\n\tvar functionBindContext = function (fn, that) {\n\t  aCallable(fn);\n\t  return that === undefined ? fn : functionBindNative ? bind$1(fn, that) : function (/* ...args */) {\n\t    return fn.apply(that, arguments);\n\t  };\n\t};\n\n\t// V8 ~ Chrome 36-\n\t// https://bugs.chromium.org/p/v8/issues/detail?id=3334\n\tvar v8PrototypeDefineBug = descriptors && fails(function () {\n\t  // eslint-disable-next-line es-x/no-object-defineproperty -- required for testing\n\t  return Object.defineProperty(function () { /* empty */ }, 'prototype', {\n\t    value: 42,\n\t    writable: false\n\t  }).prototype != 42;\n\t});\n\n\tvar String$2 = global_1.String;\n\tvar TypeError$5 = global_1.TypeError;\n\n\t// `Assert: Type(argument) is Object`\n\tvar anObject = function (argument) {\n\t  if (isObject(argument)) return argument;\n\t  throw TypeError$5(String$2(argument) + ' is not an object');\n\t};\n\n\tvar TypeError$6 = global_1.TypeError;\n\t// eslint-disable-next-line es-x/no-object-defineproperty -- safe\n\tvar $defineProperty = Object.defineProperty;\n\t// eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe\n\tvar $getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;\n\tvar ENUMERABLE = 'enumerable';\n\tvar CONFIGURABLE = 'configurable';\n\tvar WRITABLE = 'writable';\n\n\t// `Object.defineProperty` method\n\t// https://tc39.es/ecma262/#sec-object.defineproperty\n\tvar f$2 = descriptors ? v8PrototypeDefineBug ? function defineProperty(O, P, Attributes) {\n\t  anObject(O);\n\t  P = toPropertyKey(P);\n\t  anObject(Attributes);\n\t  if (typeof O === 'function' && P === 'prototype' && 'value' in Attributes && WRITABLE in Attributes && !Attributes[WRITABLE]) {\n\t    var current = $getOwnPropertyDescriptor$1(O, P);\n\t    if (current && current[WRITABLE]) {\n\t      O[P] = Attributes.value;\n\t      Attributes = {\n\t        configurable: CONFIGURABLE in Attributes ? Attributes[CONFIGURABLE] : current[CONFIGURABLE],\n\t        enumerable: ENUMERABLE in Attributes ? Attributes[ENUMERABLE] : current[ENUMERABLE],\n\t        writable: false\n\t      };\n\t    }\n\t  } return $defineProperty(O, P, Attributes);\n\t} : $defineProperty : function defineProperty(O, P, Attributes) {\n\t  anObject(O);\n\t  P = toPropertyKey(P);\n\t  anObject(Attributes);\n\t  if (ie8DomDefine) try {\n\t    return $defineProperty(O, P, Attributes);\n\t  } catch (error) { /* empty */ }\n\t  if ('get' in Attributes || 'set' in Attributes) throw TypeError$6('Accessors not supported');\n\t  if ('value' in Attributes) O[P] = Attributes.value;\n\t  return O;\n\t};\n\n\tvar objectDefineProperty = {\n\t\tf: f$2\n\t};\n\n\tvar createNonEnumerableProperty = descriptors ? function (object, key, value) {\n\t  return objectDefineProperty.f(object, key, createPropertyDescriptor(1, value));\n\t} : function (object, key, value) {\n\t  object[key] = value;\n\t  return object;\n\t};\n\n\tvar getOwnPropertyDescriptor$1 = objectGetOwnPropertyDescriptor.f;\n\n\n\n\n\n\n\tvar wrapConstructor = function (NativeConstructor) {\n\t  var Wrapper = function (a, b, c) {\n\t    if (this instanceof Wrapper) {\n\t      switch (arguments.length) {\n\t        case 0: return new NativeConstructor();\n\t        case 1: return new NativeConstructor(a);\n\t        case 2: return new NativeConstructor(a, b);\n\t      } return new NativeConstructor(a, b, c);\n\t    } return functionApply(NativeConstructor, this, arguments);\n\t  };\n\t  Wrapper.prototype = NativeConstructor.prototype;\n\t  return Wrapper;\n\t};\n\n\t/*\n\t  options.target         - name of the target object\n\t  options.global         - target is the global object\n\t  options.stat           - export as static methods of target\n\t  options.proto          - export as prototype methods of target\n\t  options.real           - real prototype method for the `pure` version\n\t  options.forced         - export even if the native feature is available\n\t  options.bind           - bind methods to the target, required for the `pure` version\n\t  options.wrap           - wrap constructors to preventing global pollution, required for the `pure` version\n\t  options.unsafe         - use the simple assignment of property instead of delete + defineProperty\n\t  options.sham           - add a flag to not completely full polyfills\n\t  options.enumerable     - export as enumerable property\n\t  options.dontCallGetSet - prevent calling a getter on target\n\t  options.name           - the .name of the function if it does not match the key\n\t*/\n\tvar _export = function (options, source) {\n\t  var TARGET = options.target;\n\t  var GLOBAL = options.global;\n\t  var STATIC = options.stat;\n\t  var PROTO = options.proto;\n\n\t  var nativeSource = GLOBAL ? global_1 : STATIC ? global_1[TARGET] : (global_1[TARGET] || {}).prototype;\n\n\t  var target = GLOBAL ? path : path[TARGET] || createNonEnumerableProperty(path, TARGET, {})[TARGET];\n\t  var targetPrototype = target.prototype;\n\n\t  var FORCED, USE_NATIVE, VIRTUAL_PROTOTYPE;\n\t  var key, sourceProperty, targetProperty, nativeProperty, resultProperty, descriptor;\n\n\t  for (key in source) {\n\t    FORCED = isForced_1(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);\n\t    // contains in native\n\t    USE_NATIVE = !FORCED && nativeSource && hasOwnProperty_1(nativeSource, key);\n\n\t    targetProperty = target[key];\n\n\t    if (USE_NATIVE) if (options.dontCallGetSet) {\n\t      descriptor = getOwnPropertyDescriptor$1(nativeSource, key);\n\t      nativeProperty = descriptor && descriptor.value;\n\t    } else nativeProperty = nativeSource[key];\n\n\t    // export native or implementation\n\t    sourceProperty = (USE_NATIVE && nativeProperty) ? nativeProperty : source[key];\n\n\t    if (USE_NATIVE && typeof targetProperty == typeof sourceProperty) continue;\n\n\t    // bind timers to global for call from export context\n\t    if (options.bind && USE_NATIVE) resultProperty = functionBindContext(sourceProperty, global_1);\n\t    // wrap global constructors for prevent changs in this version\n\t    else if (options.wrap && USE_NATIVE) resultProperty = wrapConstructor(sourceProperty);\n\t    // make static versions for prototype methods\n\t    else if (PROTO && isCallable(sourceProperty)) resultProperty = functionUncurryThis(sourceProperty);\n\t    // default case\n\t    else resultProperty = sourceProperty;\n\n\t    // add a flag to not completely full polyfills\n\t    if (options.sham || (sourceProperty && sourceProperty.sham) || (targetProperty && targetProperty.sham)) {\n\t      createNonEnumerableProperty(resultProperty, 'sham', true);\n\t    }\n\n\t    createNonEnumerableProperty(target, key, resultProperty);\n\n\t    if (PROTO) {\n\t      VIRTUAL_PROTOTYPE = TARGET + 'Prototype';\n\t      if (!hasOwnProperty_1(path, VIRTUAL_PROTOTYPE)) {\n\t        createNonEnumerableProperty(path, VIRTUAL_PROTOTYPE, {});\n\t      }\n\t      // export virtual prototype methods\n\t      createNonEnumerableProperty(path[VIRTUAL_PROTOTYPE], key, sourceProperty);\n\t      // export real prototype methods\n\t      if (options.real && targetPrototype && !targetPrototype[key]) {\n\t        createNonEnumerableProperty(targetPrototype, key, sourceProperty);\n\t      }\n\t    }\n\t  }\n\t};\n\n\tvar arraySlice = functionUncurryThis([].slice);\n\n\tvar Function$1 = global_1.Function;\n\tvar concat = functionUncurryThis([].concat);\n\tvar join = functionUncurryThis([].join);\n\tvar factories = {};\n\n\tvar construct = function (C, argsLength, args) {\n\t  if (!hasOwnProperty_1(factories, argsLength)) {\n\t    for (var list = [], i = 0; i < argsLength; i++) list[i] = 'a[' + i + ']';\n\t    factories[argsLength] = Function$1('C,a', 'return new C(' + join(list, ',') + ')');\n\t  } return factories[argsLength](C, args);\n\t};\n\n\t// `Function.prototype.bind` method implementation\n\t// https://tc39.es/ecma262/#sec-function.prototype.bind\n\tvar functionBind = functionBindNative ? Function$1.bind : function bind(that /* , ...args */) {\n\t  var F = aCallable(this);\n\t  var Prototype = F.prototype;\n\t  var partArgs = arraySlice(arguments, 1);\n\t  var boundFunction = function bound(/* args... */) {\n\t    var args = concat(partArgs, arraySlice(arguments));\n\t    return this instanceof boundFunction ? construct(F, args.length, args) : F.apply(that, args);\n\t  };\n\t  if (isObject(Prototype)) boundFunction.prototype = Prototype;\n\t  return boundFunction;\n\t};\n\n\tvar TO_STRING_TAG = wellKnownSymbol('toStringTag');\n\tvar test = {};\n\n\ttest[TO_STRING_TAG] = 'z';\n\n\tvar toStringTagSupport = String(test) === '[object z]';\n\n\tvar TO_STRING_TAG$1 = wellKnownSymbol('toStringTag');\n\tvar Object$4 = global_1.Object;\n\n\t// ES3 wrong here\n\tvar CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) == 'Arguments';\n\n\t// fallback for IE11 Script Access Denied error\n\tvar tryGet = function (it, key) {\n\t  try {\n\t    return it[key];\n\t  } catch (error) { /* empty */ }\n\t};\n\n\t// getting tag from ES6+ `Object.prototype.toString`\n\tvar classof = toStringTagSupport ? classofRaw : function (it) {\n\t  var O, tag, result;\n\t  return it === undefined ? 'Undefined' : it === null ? 'Null'\n\t    // @@toStringTag case\n\t    : typeof (tag = tryGet(O = Object$4(it), TO_STRING_TAG$1)) == 'string' ? tag\n\t    // builtinTag case\n\t    : CORRECT_ARGUMENTS ? classofRaw(O)\n\t    // ES3 arguments fallback\n\t    : (result = classofRaw(O)) == 'Object' && isCallable(O.callee) ? 'Arguments' : result;\n\t};\n\n\tvar functionToString = functionUncurryThis(Function.toString);\n\n\t// this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper\n\tif (!isCallable(sharedStore.inspectSource)) {\n\t  sharedStore.inspectSource = function (it) {\n\t    return functionToString(it);\n\t  };\n\t}\n\n\tvar inspectSource = sharedStore.inspectSource;\n\n\tvar noop = function () { /* empty */ };\n\tvar empty = [];\n\tvar construct$1 = getBuiltIn('Reflect', 'construct');\n\tvar constructorRegExp = /^\\s*(?:class|function)\\b/;\n\tvar exec = functionUncurryThis(constructorRegExp.exec);\n\tvar INCORRECT_TO_STRING = !constructorRegExp.exec(noop);\n\n\tvar isConstructorModern = function isConstructor(argument) {\n\t  if (!isCallable(argument)) return false;\n\t  try {\n\t    construct$1(noop, empty, argument);\n\t    return true;\n\t  } catch (error) {\n\t    return false;\n\t  }\n\t};\n\n\tvar isConstructorLegacy = function isConstructor(argument) {\n\t  if (!isCallable(argument)) return false;\n\t  switch (classof(argument)) {\n\t    case 'AsyncFunction':\n\t    case 'GeneratorFunction':\n\t    case 'AsyncGeneratorFunction': return false;\n\t  }\n\t  try {\n\t    // we can't check .prototype since constructors produced by .bind haven't it\n\t    // `Function#toString` throws on some built-it function in some legacy engines\n\t    // (for example, `DOMQuad` and similar in FF41-)\n\t    return INCORRECT_TO_STRING || !!exec(constructorRegExp, inspectSource(argument));\n\t  } catch (error) {\n\t    return true;\n\t  }\n\t};\n\n\tisConstructorLegacy.sham = true;\n\n\t// `IsConstructor` abstract operation\n\t// https://tc39.es/ecma262/#sec-isconstructor\n\tvar isConstructor = !construct$1 || fails(function () {\n\t  var called;\n\t  return isConstructorModern(isConstructorModern.call)\n\t    || !isConstructorModern(Object)\n\t    || !isConstructorModern(function () { called = true; })\n\t    || called;\n\t}) ? isConstructorLegacy : isConstructorModern;\n\n\tvar TypeError$7 = global_1.TypeError;\n\n\t// `Assert: IsConstructor(argument) is true`\n\tvar aConstructor = function (argument) {\n\t  if (isConstructor(argument)) return argument;\n\t  throw TypeError$7(tryToString(argument) + ' is not a constructor');\n\t};\n\n\tvar ceil = Math.ceil;\n\tvar floor = Math.floor;\n\n\t// `Math.trunc` method\n\t// https://tc39.es/ecma262/#sec-math.trunc\n\t// eslint-disable-next-line es-x/no-math-trunc -- safe\n\tvar mathTrunc = Math.trunc || function trunc(x) {\n\t  var n = +x;\n\t  return (n > 0 ? floor : ceil)(n);\n\t};\n\n\t// `ToIntegerOrInfinity` abstract operation\n\t// https://tc39.es/ecma262/#sec-tointegerorinfinity\n\tvar toIntegerOrInfinity = function (argument) {\n\t  var number = +argument;\n\t  // eslint-disable-next-line no-self-compare -- NaN check\n\t  return number !== number || number === 0 ? 0 : mathTrunc(number);\n\t};\n\n\tvar max = Math.max;\n\tvar min = Math.min;\n\n\t// Helper for a popular repeating case of the spec:\n\t// Let integer be ? ToInteger(index).\n\t// If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).\n\tvar toAbsoluteIndex = function (index, length) {\n\t  var integer = toIntegerOrInfinity(index);\n\t  return integer < 0 ? max(integer + length, 0) : min(integer, length);\n\t};\n\n\tvar min$1 = Math.min;\n\n\t// `ToLength` abstract operation\n\t// https://tc39.es/ecma262/#sec-tolength\n\tvar toLength = function (argument) {\n\t  return argument > 0 ? min$1(toIntegerOrInfinity(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991\n\t};\n\n\t// `LengthOfArrayLike` abstract operation\n\t// https://tc39.es/ecma262/#sec-lengthofarraylike\n\tvar lengthOfArrayLike = function (obj) {\n\t  return toLength(obj.length);\n\t};\n\n\t// `Array.prototype.{ indexOf, includes }` methods implementation\n\tvar createMethod = function (IS_INCLUDES) {\n\t  return function ($this, el, fromIndex) {\n\t    var O = toIndexedObject($this);\n\t    var length = lengthOfArrayLike(O);\n\t    var index = toAbsoluteIndex(fromIndex, length);\n\t    var value;\n\t    // Array#includes uses SameValueZero equality algorithm\n\t    // eslint-disable-next-line no-self-compare -- NaN check\n\t    if (IS_INCLUDES && el != el) while (length > index) {\n\t      value = O[index++];\n\t      // eslint-disable-next-line no-self-compare -- NaN check\n\t      if (value != value) return true;\n\t    // Array#indexOf ignores holes, Array#includes - not\n\t    } else for (;length > index; index++) {\n\t      if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;\n\t    } return !IS_INCLUDES && -1;\n\t  };\n\t};\n\n\tvar arrayIncludes = {\n\t  // `Array.prototype.includes` method\n\t  // https://tc39.es/ecma262/#sec-array.prototype.includes\n\t  includes: createMethod(true),\n\t  // `Array.prototype.indexOf` method\n\t  // https://tc39.es/ecma262/#sec-array.prototype.indexof\n\t  indexOf: createMethod(false)\n\t};\n\n\tvar hiddenKeys = {};\n\n\tvar indexOf = arrayIncludes.indexOf;\n\n\n\tvar push = functionUncurryThis([].push);\n\n\tvar objectKeysInternal = function (object, names) {\n\t  var O = toIndexedObject(object);\n\t  var i = 0;\n\t  var result = [];\n\t  var key;\n\t  for (key in O) !hasOwnProperty_1(hiddenKeys, key) && hasOwnProperty_1(O, key) && push(result, key);\n\t  // Don't enum bug & hidden keys\n\t  while (names.length > i) if (hasOwnProperty_1(O, key = names[i++])) {\n\t    ~indexOf(result, key) || push(result, key);\n\t  }\n\t  return result;\n\t};\n\n\t// IE8- don't enum bug keys\n\tvar enumBugKeys = [\n\t  'constructor',\n\t  'hasOwnProperty',\n\t  'isPrototypeOf',\n\t  'propertyIsEnumerable',\n\t  'toLocaleString',\n\t  'toString',\n\t  'valueOf'\n\t];\n\n\t// `Object.keys` method\n\t// https://tc39.es/ecma262/#sec-object.keys\n\t// eslint-disable-next-line es-x/no-object-keys -- safe\n\tvar objectKeys = Object.keys || function keys(O) {\n\t  return objectKeysInternal(O, enumBugKeys);\n\t};\n\n\t// `Object.defineProperties` method\n\t// https://tc39.es/ecma262/#sec-object.defineproperties\n\t// eslint-disable-next-line es-x/no-object-defineproperties -- safe\n\tvar f$3 = descriptors && !v8PrototypeDefineBug ? Object.defineProperties : function defineProperties(O, Properties) {\n\t  anObject(O);\n\t  var props = toIndexedObject(Properties);\n\t  var keys = objectKeys(Properties);\n\t  var length = keys.length;\n\t  var index = 0;\n\t  var key;\n\t  while (length > index) objectDefineProperty.f(O, key = keys[index++], props[key]);\n\t  return O;\n\t};\n\n\tvar objectDefineProperties = {\n\t\tf: f$3\n\t};\n\n\tvar html = getBuiltIn('document', 'documentElement');\n\n\tvar keys = shared('keys');\n\n\tvar sharedKey = function (key) {\n\t  return keys[key] || (keys[key] = uid(key));\n\t};\n\n\t/* global ActiveXObject -- old IE, WSH */\n\n\n\n\n\n\n\n\n\tvar GT = '>';\n\tvar LT = '<';\n\tvar PROTOTYPE = 'prototype';\n\tvar SCRIPT = 'script';\n\tvar IE_PROTO = sharedKey('IE_PROTO');\n\n\tvar EmptyConstructor = function () { /* empty */ };\n\n\tvar scriptTag = function (content) {\n\t  return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT;\n\t};\n\n\t// Create object with fake `null` prototype: use ActiveX Object with cleared prototype\n\tvar NullProtoObjectViaActiveX = function (activeXDocument) {\n\t  activeXDocument.write(scriptTag(''));\n\t  activeXDocument.close();\n\t  var temp = activeXDocument.parentWindow.Object;\n\t  activeXDocument = null; // avoid memory leak\n\t  return temp;\n\t};\n\n\t// Create object with fake `null` prototype: use iframe Object with cleared prototype\n\tvar NullProtoObjectViaIFrame = function () {\n\t  // Thrash, waste and sodomy: IE GC bug\n\t  var iframe = documentCreateElement('iframe');\n\t  var JS = 'java' + SCRIPT + ':';\n\t  var iframeDocument;\n\t  iframe.style.display = 'none';\n\t  html.appendChild(iframe);\n\t  // https://github.com/zloirock/core-js/issues/475\n\t  iframe.src = String(JS);\n\t  iframeDocument = iframe.contentWindow.document;\n\t  iframeDocument.open();\n\t  iframeDocument.write(scriptTag('document.F=Object'));\n\t  iframeDocument.close();\n\t  return iframeDocument.F;\n\t};\n\n\t// Check for document.domain and active x support\n\t// No need to use active x approach when document.domain is not set\n\t// see https://github.com/es-shims/es5-shim/issues/150\n\t// variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346\n\t// avoid IE GC bug\n\tvar activeXDocument;\n\tvar NullProtoObject = function () {\n\t  try {\n\t    activeXDocument = new ActiveXObject('htmlfile');\n\t  } catch (error) { /* ignore */ }\n\t  NullProtoObject = typeof document != 'undefined'\n\t    ? document.domain && activeXDocument\n\t      ? NullProtoObjectViaActiveX(activeXDocument) // old IE\n\t      : NullProtoObjectViaIFrame()\n\t    : NullProtoObjectViaActiveX(activeXDocument); // WSH\n\t  var length = enumBugKeys.length;\n\t  while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]];\n\t  return NullProtoObject();\n\t};\n\n\thiddenKeys[IE_PROTO] = true;\n\n\t// `Object.create` method\n\t// https://tc39.es/ecma262/#sec-object.create\n\t// eslint-disable-next-line es-x/no-object-create -- safe\n\tvar objectCreate = Object.create || function create(O, Properties) {\n\t  var result;\n\t  if (O !== null) {\n\t    EmptyConstructor[PROTOTYPE] = anObject(O);\n\t    result = new EmptyConstructor();\n\t    EmptyConstructor[PROTOTYPE] = null;\n\t    // add \"__proto__\" for Object.getPrototypeOf polyfill\n\t    result[IE_PROTO] = O;\n\t  } else result = NullProtoObject();\n\t  return Properties === undefined ? result : objectDefineProperties.f(result, Properties);\n\t};\n\n\tvar nativeConstruct = getBuiltIn('Reflect', 'construct');\n\tvar ObjectPrototype = Object.prototype;\n\tvar push$1 = [].push;\n\n\t// `Reflect.construct` method\n\t// https://tc39.es/ecma262/#sec-reflect.construct\n\t// MS Edge supports only 2 arguments and argumentsList argument is optional\n\t// FF Nightly sets third argument as `new.target`, but does not create `this` from it\n\tvar NEW_TARGET_BUG = fails(function () {\n\t  function F() { /* empty */ }\n\t  return !(nativeConstruct(function () { /* empty */ }, [], F) instanceof F);\n\t});\n\n\tvar ARGS_BUG = !fails(function () {\n\t  nativeConstruct(function () { /* empty */ });\n\t});\n\n\tvar FORCED = NEW_TARGET_BUG || ARGS_BUG;\n\n\t_export({ target: 'Reflect', stat: true, forced: FORCED, sham: FORCED }, {\n\t  construct: function construct(Target, args /* , newTarget */) {\n\t    aConstructor(Target);\n\t    anObject(args);\n\t    var newTarget = arguments.length < 3 ? Target : aConstructor(arguments[2]);\n\t    if (ARGS_BUG && !NEW_TARGET_BUG) return nativeConstruct(Target, args, newTarget);\n\t    if (Target == newTarget) {\n\t      // w/o altered newTarget, optimization for 0-4 arguments\n\t      switch (args.length) {\n\t        case 0: return new Target();\n\t        case 1: return new Target(args[0]);\n\t        case 2: return new Target(args[0], args[1]);\n\t        case 3: return new Target(args[0], args[1], args[2]);\n\t        case 4: return new Target(args[0], args[1], args[2], args[3]);\n\t      }\n\t      // w/o altered newTarget, lot of arguments case\n\t      var $args = [null];\n\t      functionApply(push$1, $args, args);\n\t      return new (functionApply(functionBind, Target, $args))();\n\t    }\n\t    // with altered newTarget, not support built-in constructors\n\t    var proto = newTarget.prototype;\n\t    var instance = objectCreate(isObject(proto) ? proto : ObjectPrototype);\n\t    var result = functionApply(Target, instance, args);\n\t    return isObject(result) ? result : instance;\n\t  }\n\t});\n\n\tvar construct$2 = path.Reflect.construct;\n\n\tvar construct$3 = construct$2;\n\n\tvar construct$4 = construct$3;\n\n\tvar FAILS_ON_PRIMITIVES = fails(function () { objectKeys(1); });\n\n\t// `Object.keys` method\n\t// https://tc39.es/ecma262/#sec-object.keys\n\t_export({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES }, {\n\t  keys: function keys(it) {\n\t    return objectKeys(toObject(it));\n\t  }\n\t});\n\n\tvar keys$1 = path.Object.keys;\n\n\tvar keys$2 = keys$1;\n\n\tvar keys$3 = keys$2;\n\n\tvar String$3 = global_1.String;\n\n\tvar toString_1 = function (argument) {\n\t  if (classof(argument) === 'Symbol') throw TypeError('Cannot convert a Symbol value to a string');\n\t  return String$3(argument);\n\t};\n\n\tvar hiddenKeys$1 = enumBugKeys.concat('length', 'prototype');\n\n\t// `Object.getOwnPropertyNames` method\n\t// https://tc39.es/ecma262/#sec-object.getownpropertynames\n\t// eslint-disable-next-line es-x/no-object-getownpropertynames -- safe\n\tvar f$4 = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {\n\t  return objectKeysInternal(O, hiddenKeys$1);\n\t};\n\n\tvar objectGetOwnPropertyNames = {\n\t\tf: f$4\n\t};\n\n\tvar createProperty = function (object, key, value) {\n\t  var propertyKey = toPropertyKey(key);\n\t  if (propertyKey in object) objectDefineProperty.f(object, propertyKey, createPropertyDescriptor(0, value));\n\t  else object[propertyKey] = value;\n\t};\n\n\tvar Array$1 = global_1.Array;\n\tvar max$1 = Math.max;\n\n\tvar arraySliceSimple = function (O, start, end) {\n\t  var length = lengthOfArrayLike(O);\n\t  var k = toAbsoluteIndex(start, length);\n\t  var fin = toAbsoluteIndex(end === undefined ? length : end, length);\n\t  var result = Array$1(max$1(fin - k, 0));\n\t  for (var n = 0; k < fin; k++, n++) createProperty(result, n, O[k]);\n\t  result.length = n;\n\t  return result;\n\t};\n\n\t/* eslint-disable es-x/no-object-getownpropertynames -- safe */\n\n\n\tvar $getOwnPropertyNames = objectGetOwnPropertyNames.f;\n\n\n\tvar windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames\n\t  ? Object.getOwnPropertyNames(window) : [];\n\n\tvar getWindowNames = function (it) {\n\t  try {\n\t    return $getOwnPropertyNames(it);\n\t  } catch (error) {\n\t    return arraySliceSimple(windowNames);\n\t  }\n\t};\n\n\t// fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window\n\tvar f$5 = function getOwnPropertyNames(it) {\n\t  return windowNames && classofRaw(it) == 'Window'\n\t    ? getWindowNames(it)\n\t    : $getOwnPropertyNames(toIndexedObject(it));\n\t};\n\n\tvar objectGetOwnPropertyNamesExternal = {\n\t\tf: f$5\n\t};\n\n\t// eslint-disable-next-line es-x/no-object-getownpropertysymbols -- safe\n\tvar f$6 = Object.getOwnPropertySymbols;\n\n\tvar objectGetOwnPropertySymbols = {\n\t\tf: f$6\n\t};\n\n\tvar defineBuiltIn = function (target, key, value, options) {\n\t  if (options && options.enumerable) target[key] = value;\n\t  else createNonEnumerableProperty(target, key, value);\n\t  return target;\n\t};\n\n\tvar f$7 = wellKnownSymbol;\n\n\tvar wellKnownSymbolWrapped = {\n\t\tf: f$7\n\t};\n\n\tvar defineProperty$1 = objectDefineProperty.f;\n\n\tvar defineWellKnownSymbol = function (NAME) {\n\t  var Symbol = path.Symbol || (path.Symbol = {});\n\t  if (!hasOwnProperty_1(Symbol, NAME)) defineProperty$1(Symbol, NAME, {\n\t    value: wellKnownSymbolWrapped.f(NAME)\n\t  });\n\t};\n\n\tvar symbolDefineToPrimitive = function () {\n\t  var Symbol = getBuiltIn('Symbol');\n\t  var SymbolPrototype = Symbol && Symbol.prototype;\n\t  var valueOf = SymbolPrototype && SymbolPrototype.valueOf;\n\t  var TO_PRIMITIVE = wellKnownSymbol('toPrimitive');\n\n\t  if (SymbolPrototype && !SymbolPrototype[TO_PRIMITIVE]) {\n\t    // `Symbol.prototype[@@toPrimitive]` method\n\t    // https://tc39.es/ecma262/#sec-symbol.prototype-@@toprimitive\n\t    // eslint-disable-next-line no-unused-vars -- required for .length\n\t    defineBuiltIn(SymbolPrototype, TO_PRIMITIVE, function (hint) {\n\t      return functionCall(valueOf, this);\n\t    }, { arity: 1 });\n\t  }\n\t};\n\n\t// `Object.prototype.toString` method implementation\n\t// https://tc39.es/ecma262/#sec-object.prototype.tostring\n\tvar objectToString = toStringTagSupport ? {}.toString : function toString() {\n\t  return '[object ' + classof(this) + ']';\n\t};\n\n\tvar defineProperty$2 = objectDefineProperty.f;\n\n\n\n\n\n\tvar TO_STRING_TAG$2 = wellKnownSymbol('toStringTag');\n\n\tvar setToStringTag = function (it, TAG, STATIC, SET_METHOD) {\n\t  if (it) {\n\t    var target = STATIC ? it : it.prototype;\n\t    if (!hasOwnProperty_1(target, TO_STRING_TAG$2)) {\n\t      defineProperty$2(target, TO_STRING_TAG$2, { configurable: true, value: TAG });\n\t    }\n\t    if (SET_METHOD && !toStringTagSupport) {\n\t      createNonEnumerableProperty(target, 'toString', objectToString);\n\t    }\n\t  }\n\t};\n\n\tvar WeakMap = global_1.WeakMap;\n\n\tvar nativeWeakMap = isCallable(WeakMap) && /native code/.test(inspectSource(WeakMap));\n\n\tvar OBJECT_ALREADY_INITIALIZED = 'Object already initialized';\n\tvar TypeError$8 = global_1.TypeError;\n\tvar WeakMap$1 = global_1.WeakMap;\n\tvar set, get, has;\n\n\tvar enforce = function (it) {\n\t  return has(it) ? get(it) : set(it, {});\n\t};\n\n\tvar getterFor = function (TYPE) {\n\t  return function (it) {\n\t    var state;\n\t    if (!isObject(it) || (state = get(it)).type !== TYPE) {\n\t      throw TypeError$8('Incompatible receiver, ' + TYPE + ' required');\n\t    } return state;\n\t  };\n\t};\n\n\tif (nativeWeakMap || sharedStore.state) {\n\t  var store$1 = sharedStore.state || (sharedStore.state = new WeakMap$1());\n\t  var wmget = functionUncurryThis(store$1.get);\n\t  var wmhas = functionUncurryThis(store$1.has);\n\t  var wmset = functionUncurryThis(store$1.set);\n\t  set = function (it, metadata) {\n\t    if (wmhas(store$1, it)) throw new TypeError$8(OBJECT_ALREADY_INITIALIZED);\n\t    metadata.facade = it;\n\t    wmset(store$1, it, metadata);\n\t    return metadata;\n\t  };\n\t  get = function (it) {\n\t    return wmget(store$1, it) || {};\n\t  };\n\t  has = function (it) {\n\t    return wmhas(store$1, it);\n\t  };\n\t} else {\n\t  var STATE = sharedKey('state');\n\t  hiddenKeys[STATE] = true;\n\t  set = function (it, metadata) {\n\t    if (hasOwnProperty_1(it, STATE)) throw new TypeError$8(OBJECT_ALREADY_INITIALIZED);\n\t    metadata.facade = it;\n\t    createNonEnumerableProperty(it, STATE, metadata);\n\t    return metadata;\n\t  };\n\t  get = function (it) {\n\t    return hasOwnProperty_1(it, STATE) ? it[STATE] : {};\n\t  };\n\t  has = function (it) {\n\t    return hasOwnProperty_1(it, STATE);\n\t  };\n\t}\n\n\tvar internalState = {\n\t  set: set,\n\t  get: get,\n\t  has: has,\n\t  enforce: enforce,\n\t  getterFor: getterFor\n\t};\n\n\t// `IsArray` abstract operation\n\t// https://tc39.es/ecma262/#sec-isarray\n\t// eslint-disable-next-line es-x/no-array-isarray -- safe\n\tvar isArray = Array.isArray || function isArray(argument) {\n\t  return classofRaw(argument) == 'Array';\n\t};\n\n\tvar SPECIES = wellKnownSymbol('species');\n\tvar Array$2 = global_1.Array;\n\n\t// a part of `ArraySpeciesCreate` abstract operation\n\t// https://tc39.es/ecma262/#sec-arrayspeciescreate\n\tvar arraySpeciesConstructor = function (originalArray) {\n\t  var C;\n\t  if (isArray(originalArray)) {\n\t    C = originalArray.constructor;\n\t    // cross-realm fallback\n\t    if (isConstructor(C) && (C === Array$2 || isArray(C.prototype))) C = undefined;\n\t    else if (isObject(C)) {\n\t      C = C[SPECIES];\n\t      if (C === null) C = undefined;\n\t    }\n\t  } return C === undefined ? Array$2 : C;\n\t};\n\n\t// `ArraySpeciesCreate` abstract operation\n\t// https://tc39.es/ecma262/#sec-arrayspeciescreate\n\tvar arraySpeciesCreate = function (originalArray, length) {\n\t  return new (arraySpeciesConstructor(originalArray))(length === 0 ? 0 : length);\n\t};\n\n\tvar push$2 = functionUncurryThis([].push);\n\n\t// `Array.prototype.{ forEach, map, filter, some, every, find, findIndex, filterReject }` methods implementation\n\tvar createMethod$1 = function (TYPE) {\n\t  var IS_MAP = TYPE == 1;\n\t  var IS_FILTER = TYPE == 2;\n\t  var IS_SOME = TYPE == 3;\n\t  var IS_EVERY = TYPE == 4;\n\t  var IS_FIND_INDEX = TYPE == 6;\n\t  var IS_FILTER_REJECT = TYPE == 7;\n\t  var NO_HOLES = TYPE == 5 || IS_FIND_INDEX;\n\t  return function ($this, callbackfn, that, specificCreate) {\n\t    var O = toObject($this);\n\t    var self = indexedObject(O);\n\t    var boundFunction = functionBindContext(callbackfn, that);\n\t    var length = lengthOfArrayLike(self);\n\t    var index = 0;\n\t    var create = specificCreate || arraySpeciesCreate;\n\t    var target = IS_MAP ? create($this, length) : IS_FILTER || IS_FILTER_REJECT ? create($this, 0) : undefined;\n\t    var value, result;\n\t    for (;length > index; index++) if (NO_HOLES || index in self) {\n\t      value = self[index];\n\t      result = boundFunction(value, index, O);\n\t      if (TYPE) {\n\t        if (IS_MAP) target[index] = result; // map\n\t        else if (result) switch (TYPE) {\n\t          case 3: return true;              // some\n\t          case 5: return value;             // find\n\t          case 6: return index;             // findIndex\n\t          case 2: push$2(target, value);      // filter\n\t        } else switch (TYPE) {\n\t          case 4: return false;             // every\n\t          case 7: push$2(target, value);      // filterReject\n\t        }\n\t      }\n\t    }\n\t    return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : target;\n\t  };\n\t};\n\n\tvar arrayIteration = {\n\t  // `Array.prototype.forEach` method\n\t  // https://tc39.es/ecma262/#sec-array.prototype.foreach\n\t  forEach: createMethod$1(0),\n\t  // `Array.prototype.map` method\n\t  // https://tc39.es/ecma262/#sec-array.prototype.map\n\t  map: createMethod$1(1),\n\t  // `Array.prototype.filter` method\n\t  // https://tc39.es/ecma262/#sec-array.prototype.filter\n\t  filter: createMethod$1(2),\n\t  // `Array.prototype.some` method\n\t  // https://tc39.es/ecma262/#sec-array.prototype.some\n\t  some: createMethod$1(3),\n\t  // `Array.prototype.every` method\n\t  // https://tc39.es/ecma262/#sec-array.prototype.every\n\t  every: createMethod$1(4),\n\t  // `Array.prototype.find` method\n\t  // https://tc39.es/ecma262/#sec-array.prototype.find\n\t  find: createMethod$1(5),\n\t  // `Array.prototype.findIndex` method\n\t  // https://tc39.es/ecma262/#sec-array.prototype.findIndex\n\t  findIndex: createMethod$1(6),\n\t  // `Array.prototype.filterReject` method\n\t  // https://github.com/tc39/proposal-array-filtering\n\t  filterReject: createMethod$1(7)\n\t};\n\n\tvar $forEach = arrayIteration.forEach;\n\n\tvar HIDDEN = sharedKey('hidden');\n\tvar SYMBOL = 'Symbol';\n\tvar PROTOTYPE$1 = 'prototype';\n\n\tvar setInternalState = internalState.set;\n\tvar getInternalState = internalState.getterFor(SYMBOL);\n\n\tvar ObjectPrototype$1 = Object[PROTOTYPE$1];\n\tvar $Symbol = global_1.Symbol;\n\tvar SymbolPrototype = $Symbol && $Symbol[PROTOTYPE$1];\n\tvar TypeError$9 = global_1.TypeError;\n\tvar QObject = global_1.QObject;\n\tvar nativeGetOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;\n\tvar nativeDefineProperty = objectDefineProperty.f;\n\tvar nativeGetOwnPropertyNames = objectGetOwnPropertyNamesExternal.f;\n\tvar nativePropertyIsEnumerable = objectPropertyIsEnumerable.f;\n\tvar push$3 = functionUncurryThis([].push);\n\n\tvar AllSymbols = shared('symbols');\n\tvar ObjectPrototypeSymbols = shared('op-symbols');\n\tvar WellKnownSymbolsStore$1 = shared('wks');\n\n\t// Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173\n\tvar USE_SETTER = !QObject || !QObject[PROTOTYPE$1] || !QObject[PROTOTYPE$1].findChild;\n\n\t// fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687\n\tvar setSymbolDescriptor = descriptors && fails(function () {\n\t  return objectCreate(nativeDefineProperty({}, 'a', {\n\t    get: function () { return nativeDefineProperty(this, 'a', { value: 7 }).a; }\n\t  })).a != 7;\n\t}) ? function (O, P, Attributes) {\n\t  var ObjectPrototypeDescriptor = nativeGetOwnPropertyDescriptor(ObjectPrototype$1, P);\n\t  if (ObjectPrototypeDescriptor) delete ObjectPrototype$1[P];\n\t  nativeDefineProperty(O, P, Attributes);\n\t  if (ObjectPrototypeDescriptor && O !== ObjectPrototype$1) {\n\t    nativeDefineProperty(ObjectPrototype$1, P, ObjectPrototypeDescriptor);\n\t  }\n\t} : nativeDefineProperty;\n\n\tvar wrap = function (tag, description) {\n\t  var symbol = AllSymbols[tag] = objectCreate(SymbolPrototype);\n\t  setInternalState(symbol, {\n\t    type: SYMBOL,\n\t    tag: tag,\n\t    description: description\n\t  });\n\t  if (!descriptors) symbol.description = description;\n\t  return symbol;\n\t};\n\n\tvar $defineProperty$1 = function defineProperty(O, P, Attributes) {\n\t  if (O === ObjectPrototype$1) $defineProperty$1(ObjectPrototypeSymbols, P, Attributes);\n\t  anObject(O);\n\t  var key = toPropertyKey(P);\n\t  anObject(Attributes);\n\t  if (hasOwnProperty_1(AllSymbols, key)) {\n\t    if (!Attributes.enumerable) {\n\t      if (!hasOwnProperty_1(O, HIDDEN)) nativeDefineProperty(O, HIDDEN, createPropertyDescriptor(1, {}));\n\t      O[HIDDEN][key] = true;\n\t    } else {\n\t      if (hasOwnProperty_1(O, HIDDEN) && O[HIDDEN][key]) O[HIDDEN][key] = false;\n\t      Attributes = objectCreate(Attributes, { enumerable: createPropertyDescriptor(0, false) });\n\t    } return setSymbolDescriptor(O, key, Attributes);\n\t  } return nativeDefineProperty(O, key, Attributes);\n\t};\n\n\tvar $defineProperties = function defineProperties(O, Properties) {\n\t  anObject(O);\n\t  var properties = toIndexedObject(Properties);\n\t  var keys = objectKeys(properties).concat($getOwnPropertySymbols(properties));\n\t  $forEach(keys, function (key) {\n\t    if (!descriptors || functionCall($propertyIsEnumerable$1, properties, key)) $defineProperty$1(O, key, properties[key]);\n\t  });\n\t  return O;\n\t};\n\n\tvar $create = function create(O, Properties) {\n\t  return Properties === undefined ? objectCreate(O) : $defineProperties(objectCreate(O), Properties);\n\t};\n\n\tvar $propertyIsEnumerable$1 = function propertyIsEnumerable(V) {\n\t  var P = toPropertyKey(V);\n\t  var enumerable = functionCall(nativePropertyIsEnumerable, this, P);\n\t  if (this === ObjectPrototype$1 && hasOwnProperty_1(AllSymbols, P) && !hasOwnProperty_1(ObjectPrototypeSymbols, P)) return false;\n\t  return enumerable || !hasOwnProperty_1(this, P) || !hasOwnProperty_1(AllSymbols, P) || hasOwnProperty_1(this, HIDDEN) && this[HIDDEN][P]\n\t    ? enumerable : true;\n\t};\n\n\tvar $getOwnPropertyDescriptor$2 = function getOwnPropertyDescriptor(O, P) {\n\t  var it = toIndexedObject(O);\n\t  var key = toPropertyKey(P);\n\t  if (it === ObjectPrototype$1 && hasOwnProperty_1(AllSymbols, key) && !hasOwnProperty_1(ObjectPrototypeSymbols, key)) return;\n\t  var descriptor = nativeGetOwnPropertyDescriptor(it, key);\n\t  if (descriptor && hasOwnProperty_1(AllSymbols, key) && !(hasOwnProperty_1(it, HIDDEN) && it[HIDDEN][key])) {\n\t    descriptor.enumerable = true;\n\t  }\n\t  return descriptor;\n\t};\n\n\tvar $getOwnPropertyNames$1 = function getOwnPropertyNames(O) {\n\t  var names = nativeGetOwnPropertyNames(toIndexedObject(O));\n\t  var result = [];\n\t  $forEach(names, function (key) {\n\t    if (!hasOwnProperty_1(AllSymbols, key) && !hasOwnProperty_1(hiddenKeys, key)) push$3(result, key);\n\t  });\n\t  return result;\n\t};\n\n\tvar $getOwnPropertySymbols = function (O) {\n\t  var IS_OBJECT_PROTOTYPE = O === ObjectPrototype$1;\n\t  var names = nativeGetOwnPropertyNames(IS_OBJECT_PROTOTYPE ? ObjectPrototypeSymbols : toIndexedObject(O));\n\t  var result = [];\n\t  $forEach(names, function (key) {\n\t    if (hasOwnProperty_1(AllSymbols, key) && (!IS_OBJECT_PROTOTYPE || hasOwnProperty_1(ObjectPrototype$1, key))) {\n\t      push$3(result, AllSymbols[key]);\n\t    }\n\t  });\n\t  return result;\n\t};\n\n\t// `Symbol` constructor\n\t// https://tc39.es/ecma262/#sec-symbol-constructor\n\tif (!nativeSymbol) {\n\t  $Symbol = function Symbol() {\n\t    if (objectIsPrototypeOf(SymbolPrototype, this)) throw TypeError$9('Symbol is not a constructor');\n\t    var description = !arguments.length || arguments[0] === undefined ? undefined : toString_1(arguments[0]);\n\t    var tag = uid(description);\n\t    var setter = function (value) {\n\t      if (this === ObjectPrototype$1) functionCall(setter, ObjectPrototypeSymbols, value);\n\t      if (hasOwnProperty_1(this, HIDDEN) && hasOwnProperty_1(this[HIDDEN], tag)) this[HIDDEN][tag] = false;\n\t      setSymbolDescriptor(this, tag, createPropertyDescriptor(1, value));\n\t    };\n\t    if (descriptors && USE_SETTER) setSymbolDescriptor(ObjectPrototype$1, tag, { configurable: true, set: setter });\n\t    return wrap(tag, description);\n\t  };\n\n\t  SymbolPrototype = $Symbol[PROTOTYPE$1];\n\n\t  defineBuiltIn(SymbolPrototype, 'toString', function toString() {\n\t    return getInternalState(this).tag;\n\t  });\n\n\t  defineBuiltIn($Symbol, 'withoutSetter', function (description) {\n\t    return wrap(uid(description), description);\n\t  });\n\n\t  objectPropertyIsEnumerable.f = $propertyIsEnumerable$1;\n\t  objectDefineProperty.f = $defineProperty$1;\n\t  objectDefineProperties.f = $defineProperties;\n\t  objectGetOwnPropertyDescriptor.f = $getOwnPropertyDescriptor$2;\n\t  objectGetOwnPropertyNames.f = objectGetOwnPropertyNamesExternal.f = $getOwnPropertyNames$1;\n\t  objectGetOwnPropertySymbols.f = $getOwnPropertySymbols;\n\n\t  wellKnownSymbolWrapped.f = function (name) {\n\t    return wrap(wellKnownSymbol(name), name);\n\t  };\n\n\t  if (descriptors) {\n\t    // https://github.com/tc39/proposal-Symbol-description\n\t    nativeDefineProperty(SymbolPrototype, 'description', {\n\t      configurable: true,\n\t      get: function description() {\n\t        return getInternalState(this).description;\n\t      }\n\t    });\n\t  }\n\t}\n\n\t_export({ global: true, constructor: true, wrap: true, forced: !nativeSymbol, sham: !nativeSymbol }, {\n\t  Symbol: $Symbol\n\t});\n\n\t$forEach(objectKeys(WellKnownSymbolsStore$1), function (name) {\n\t  defineWellKnownSymbol(name);\n\t});\n\n\t_export({ target: SYMBOL, stat: true, forced: !nativeSymbol }, {\n\t  useSetter: function () { USE_SETTER = true; },\n\t  useSimple: function () { USE_SETTER = false; }\n\t});\n\n\t_export({ target: 'Object', stat: true, forced: !nativeSymbol, sham: !descriptors }, {\n\t  // `Object.create` method\n\t  // https://tc39.es/ecma262/#sec-object.create\n\t  create: $create,\n\t  // `Object.defineProperty` method\n\t  // https://tc39.es/ecma262/#sec-object.defineproperty\n\t  defineProperty: $defineProperty$1,\n\t  // `Object.defineProperties` method\n\t  // https://tc39.es/ecma262/#sec-object.defineproperties\n\t  defineProperties: $defineProperties,\n\t  // `Object.getOwnPropertyDescriptor` method\n\t  // https://tc39.es/ecma262/#sec-object.getownpropertydescriptors\n\t  getOwnPropertyDescriptor: $getOwnPropertyDescriptor$2\n\t});\n\n\t_export({ target: 'Object', stat: true, forced: !nativeSymbol }, {\n\t  // `Object.getOwnPropertyNames` method\n\t  // https://tc39.es/ecma262/#sec-object.getownpropertynames\n\t  getOwnPropertyNames: $getOwnPropertyNames$1\n\t});\n\n\t// `Symbol.prototype[@@toPrimitive]` method\n\t// https://tc39.es/ecma262/#sec-symbol.prototype-@@toprimitive\n\tsymbolDefineToPrimitive();\n\n\t// `Symbol.prototype[@@toStringTag]` property\n\t// https://tc39.es/ecma262/#sec-symbol.prototype-@@tostringtag\n\tsetToStringTag($Symbol, SYMBOL);\n\n\thiddenKeys[HIDDEN] = true;\n\n\t/* eslint-disable es-x/no-symbol -- safe */\n\tvar nativeSymbolRegistry = nativeSymbol && !!Symbol['for'] && !!Symbol.keyFor;\n\n\tvar StringToSymbolRegistry = shared('string-to-symbol-registry');\n\tvar SymbolToStringRegistry = shared('symbol-to-string-registry');\n\n\t// `Symbol.for` method\n\t// https://tc39.es/ecma262/#sec-symbol.for\n\t_export({ target: 'Symbol', stat: true, forced: !nativeSymbolRegistry }, {\n\t  'for': function (key) {\n\t    var string = toString_1(key);\n\t    if (hasOwnProperty_1(StringToSymbolRegistry, string)) return StringToSymbolRegistry[string];\n\t    var symbol = getBuiltIn('Symbol')(string);\n\t    StringToSymbolRegistry[string] = symbol;\n\t    SymbolToStringRegistry[symbol] = string;\n\t    return symbol;\n\t  }\n\t});\n\n\tvar SymbolToStringRegistry$1 = shared('symbol-to-string-registry');\n\n\t// `Symbol.keyFor` method\n\t// https://tc39.es/ecma262/#sec-symbol.keyfor\n\t_export({ target: 'Symbol', stat: true, forced: !nativeSymbolRegistry }, {\n\t  keyFor: function keyFor(sym) {\n\t    if (!isSymbol(sym)) throw TypeError(tryToString(sym) + ' is not a symbol');\n\t    if (hasOwnProperty_1(SymbolToStringRegistry$1, sym)) return SymbolToStringRegistry$1[sym];\n\t  }\n\t});\n\n\tvar $stringify = getBuiltIn('JSON', 'stringify');\n\tvar exec$1 = functionUncurryThis(/./.exec);\n\tvar charAt = functionUncurryThis(''.charAt);\n\tvar charCodeAt = functionUncurryThis(''.charCodeAt);\n\tvar replace = functionUncurryThis(''.replace);\n\tvar numberToString = functionUncurryThis(1.0.toString);\n\n\tvar tester = /[\\uD800-\\uDFFF]/g;\n\tvar low = /^[\\uD800-\\uDBFF]$/;\n\tvar hi = /^[\\uDC00-\\uDFFF]$/;\n\n\tvar WRONG_SYMBOLS_CONVERSION = !nativeSymbol || fails(function () {\n\t  var symbol = getBuiltIn('Symbol')();\n\t  // MS Edge converts symbol values to JSON as {}\n\t  return $stringify([symbol]) != '[null]'\n\t    // WebKit converts symbol values to JSON as null\n\t    || $stringify({ a: symbol }) != '{}'\n\t    // V8 throws on boxed symbols\n\t    || $stringify(Object(symbol)) != '{}';\n\t});\n\n\t// https://github.com/tc39/proposal-well-formed-stringify\n\tvar ILL_FORMED_UNICODE = fails(function () {\n\t  return $stringify('\\uDF06\\uD834') !== '\"\\\\udf06\\\\ud834\"'\n\t    || $stringify('\\uDEAD') !== '\"\\\\udead\"';\n\t});\n\n\tvar stringifyWithSymbolsFix = function (it, replacer) {\n\t  var args = arraySlice(arguments);\n\t  var $replacer = replacer;\n\t  if (!isObject(replacer) && it === undefined || isSymbol(it)) return; // IE8 returns string on undefined\n\t  if (!isArray(replacer)) replacer = function (key, value) {\n\t    if (isCallable($replacer)) value = functionCall($replacer, this, key, value);\n\t    if (!isSymbol(value)) return value;\n\t  };\n\t  args[1] = replacer;\n\t  return functionApply($stringify, null, args);\n\t};\n\n\tvar fixIllFormed = function (match, offset, string) {\n\t  var prev = charAt(string, offset - 1);\n\t  var next = charAt(string, offset + 1);\n\t  if ((exec$1(low, match) && !exec$1(hi, next)) || (exec$1(hi, match) && !exec$1(low, prev))) {\n\t    return '\\\\u' + numberToString(charCodeAt(match, 0), 16);\n\t  } return match;\n\t};\n\n\tif ($stringify) {\n\t  // `JSON.stringify` method\n\t  // https://tc39.es/ecma262/#sec-json.stringify\n\t  _export({ target: 'JSON', stat: true, arity: 3, forced: WRONG_SYMBOLS_CONVERSION || ILL_FORMED_UNICODE }, {\n\t    // eslint-disable-next-line no-unused-vars -- required for `.length`\n\t    stringify: function stringify(it, replacer, space) {\n\t      var args = arraySlice(arguments);\n\t      var result = functionApply(WRONG_SYMBOLS_CONVERSION ? stringifyWithSymbolsFix : $stringify, null, args);\n\t      return ILL_FORMED_UNICODE && typeof result == 'string' ? replace(result, tester, fixIllFormed) : result;\n\t    }\n\t  });\n\t}\n\n\t// V8 ~ Chrome 38 and 39 `Object.getOwnPropertySymbols` fails on primitives\n\t// https://bugs.chromium.org/p/v8/issues/detail?id=3443\n\tvar FORCED$1 = !nativeSymbol || fails(function () { objectGetOwnPropertySymbols.f(1); });\n\n\t// `Object.getOwnPropertySymbols` method\n\t// https://tc39.es/ecma262/#sec-object.getownpropertysymbols\n\t_export({ target: 'Object', stat: true, forced: FORCED$1 }, {\n\t  getOwnPropertySymbols: function getOwnPropertySymbols(it) {\n\t    var $getOwnPropertySymbols = objectGetOwnPropertySymbols.f;\n\t    return $getOwnPropertySymbols ? $getOwnPropertySymbols(toObject(it)) : [];\n\t  }\n\t});\n\n\tvar getOwnPropertySymbols = path.Object.getOwnPropertySymbols;\n\n\tvar getOwnPropertySymbols$1 = getOwnPropertySymbols;\n\n\tvar getOwnPropertySymbols$2 = getOwnPropertySymbols$1;\n\n\tvar SPECIES$1 = wellKnownSymbol('species');\n\n\tvar arrayMethodHasSpeciesSupport = function (METHOD_NAME) {\n\t  // We can't use this feature detection in V8 since it causes\n\t  // deoptimization and serious performance degradation\n\t  // https://github.com/zloirock/core-js/issues/677\n\t  return engineV8Version >= 51 || !fails(function () {\n\t    var array = [];\n\t    var constructor = array.constructor = {};\n\t    constructor[SPECIES$1] = function () {\n\t      return { foo: 1 };\n\t    };\n\t    return array[METHOD_NAME](Boolean).foo !== 1;\n\t  });\n\t};\n\n\tvar $filter = arrayIteration.filter;\n\n\n\tvar HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('filter');\n\n\t// `Array.prototype.filter` method\n\t// https://tc39.es/ecma262/#sec-array.prototype.filter\n\t// with adding support of @@species\n\t_export({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT }, {\n\t  filter: function filter(callbackfn /* , thisArg */) {\n\t    return $filter(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n\t  }\n\t});\n\n\tvar entryVirtual = function (CONSTRUCTOR) {\n\t  return path[CONSTRUCTOR + 'Prototype'];\n\t};\n\n\tvar filter = entryVirtual('Array').filter;\n\n\tvar ArrayPrototype = Array.prototype;\n\n\tvar filter$1 = function (it) {\n\t  var own = it.filter;\n\t  return it === ArrayPrototype || (objectIsPrototypeOf(ArrayPrototype, it) && own === ArrayPrototype.filter) ? filter : own;\n\t};\n\n\tvar filter$2 = filter$1;\n\n\tvar filter$3 = filter$2;\n\n\tvar nativeGetOwnPropertyDescriptor$1 = objectGetOwnPropertyDescriptor.f;\n\n\n\tvar FAILS_ON_PRIMITIVES$1 = fails(function () { nativeGetOwnPropertyDescriptor$1(1); });\n\tvar FORCED$2 = !descriptors || FAILS_ON_PRIMITIVES$1;\n\n\t// `Object.getOwnPropertyDescriptor` method\n\t// https://tc39.es/ecma262/#sec-object.getownpropertydescriptor\n\t_export({ target: 'Object', stat: true, forced: FORCED$2, sham: !descriptors }, {\n\t  getOwnPropertyDescriptor: function getOwnPropertyDescriptor(it, key) {\n\t    return nativeGetOwnPropertyDescriptor$1(toIndexedObject(it), key);\n\t  }\n\t});\n\n\tvar getOwnPropertyDescriptor_1 = createCommonjsModule(function (module) {\n\tvar Object = path.Object;\n\n\tvar getOwnPropertyDescriptor = module.exports = function getOwnPropertyDescriptor(it, key) {\n\t  return Object.getOwnPropertyDescriptor(it, key);\n\t};\n\n\tif (Object.getOwnPropertyDescriptor.sham) getOwnPropertyDescriptor.sham = true;\n\t});\n\n\tvar getOwnPropertyDescriptor$2 = getOwnPropertyDescriptor_1;\n\n\tvar getOwnPropertyDescriptor$3 = getOwnPropertyDescriptor$2;\n\n\tvar iterators = {};\n\n\tvar FunctionPrototype$2 = Function.prototype;\n\t// eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe\n\tvar getDescriptor = descriptors && Object.getOwnPropertyDescriptor;\n\n\tvar EXISTS$1 = hasOwnProperty_1(FunctionPrototype$2, 'name');\n\t// additional protection from minified / mangled / dropped function names\n\tvar PROPER = EXISTS$1 && (function something() { /* empty */ }).name === 'something';\n\tvar CONFIGURABLE$1 = EXISTS$1 && (!descriptors || (descriptors && getDescriptor(FunctionPrototype$2, 'name').configurable));\n\n\tvar functionName = {\n\t  EXISTS: EXISTS$1,\n\t  PROPER: PROPER,\n\t  CONFIGURABLE: CONFIGURABLE$1\n\t};\n\n\tvar correctPrototypeGetter = !fails(function () {\n\t  function F() { /* empty */ }\n\t  F.prototype.constructor = null;\n\t  // eslint-disable-next-line es-x/no-object-getprototypeof -- required for testing\n\t  return Object.getPrototypeOf(new F()) !== F.prototype;\n\t});\n\n\tvar IE_PROTO$1 = sharedKey('IE_PROTO');\n\tvar Object$5 = global_1.Object;\n\tvar ObjectPrototype$2 = Object$5.prototype;\n\n\t// `Object.getPrototypeOf` method\n\t// https://tc39.es/ecma262/#sec-object.getprototypeof\n\tvar objectGetPrototypeOf = correctPrototypeGetter ? Object$5.getPrototypeOf : function (O) {\n\t  var object = toObject(O);\n\t  if (hasOwnProperty_1(object, IE_PROTO$1)) return object[IE_PROTO$1];\n\t  var constructor = object.constructor;\n\t  if (isCallable(constructor) && object instanceof constructor) {\n\t    return constructor.prototype;\n\t  } return object instanceof Object$5 ? ObjectPrototype$2 : null;\n\t};\n\n\tvar ITERATOR = wellKnownSymbol('iterator');\n\tvar BUGGY_SAFARI_ITERATORS = false;\n\n\t// `%IteratorPrototype%` object\n\t// https://tc39.es/ecma262/#sec-%iteratorprototype%-object\n\tvar IteratorPrototype, PrototypeOfArrayIteratorPrototype, arrayIterator;\n\n\t/* eslint-disable es-x/no-array-prototype-keys -- safe */\n\tif ([].keys) {\n\t  arrayIterator = [].keys();\n\t  // Safari 8 has buggy iterators w/o `next`\n\t  if (!('next' in arrayIterator)) BUGGY_SAFARI_ITERATORS = true;\n\t  else {\n\t    PrototypeOfArrayIteratorPrototype = objectGetPrototypeOf(objectGetPrototypeOf(arrayIterator));\n\t    if (PrototypeOfArrayIteratorPrototype !== Object.prototype) IteratorPrototype = PrototypeOfArrayIteratorPrototype;\n\t  }\n\t}\n\n\tvar NEW_ITERATOR_PROTOTYPE = IteratorPrototype == undefined || fails(function () {\n\t  var test = {};\n\t  // FF44- legacy iterators case\n\t  return IteratorPrototype[ITERATOR].call(test) !== test;\n\t});\n\n\tif (NEW_ITERATOR_PROTOTYPE) IteratorPrototype = {};\n\telse IteratorPrototype = objectCreate(IteratorPrototype);\n\n\t// `%IteratorPrototype%[@@iterator]()` method\n\t// https://tc39.es/ecma262/#sec-%iteratorprototype%-@@iterator\n\tif (!isCallable(IteratorPrototype[ITERATOR])) {\n\t  defineBuiltIn(IteratorPrototype, ITERATOR, function () {\n\t    return this;\n\t  });\n\t}\n\n\tvar iteratorsCore = {\n\t  IteratorPrototype: IteratorPrototype,\n\t  BUGGY_SAFARI_ITERATORS: BUGGY_SAFARI_ITERATORS\n\t};\n\n\tvar IteratorPrototype$1 = iteratorsCore.IteratorPrototype;\n\n\n\n\n\n\tvar returnThis = function () { return this; };\n\n\tvar createIteratorConstructor = function (IteratorConstructor, NAME, next, ENUMERABLE_NEXT) {\n\t  var TO_STRING_TAG = NAME + ' Iterator';\n\t  IteratorConstructor.prototype = objectCreate(IteratorPrototype$1, { next: createPropertyDescriptor(+!ENUMERABLE_NEXT, next) });\n\t  setToStringTag(IteratorConstructor, TO_STRING_TAG, false, true);\n\t  iterators[TO_STRING_TAG] = returnThis;\n\t  return IteratorConstructor;\n\t};\n\n\tvar String$4 = global_1.String;\n\tvar TypeError$a = global_1.TypeError;\n\n\tvar aPossiblePrototype = function (argument) {\n\t  if (typeof argument == 'object' || isCallable(argument)) return argument;\n\t  throw TypeError$a(\"Can't set \" + String$4(argument) + ' as a prototype');\n\t};\n\n\t/* eslint-disable no-proto -- safe */\n\n\n\n\n\t// `Object.setPrototypeOf` method\n\t// https://tc39.es/ecma262/#sec-object.setprototypeof\n\t// Works with __proto__ only. Old v8 can't work with null proto objects.\n\t// eslint-disable-next-line es-x/no-object-setprototypeof -- safe\n\tvar objectSetPrototypeOf = Object.setPrototypeOf || ('__proto__' in {} ? function () {\n\t  var CORRECT_SETTER = false;\n\t  var test = {};\n\t  var setter;\n\t  try {\n\t    // eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe\n\t    setter = functionUncurryThis(Object.getOwnPropertyDescriptor(Object.prototype, '__proto__').set);\n\t    setter(test, []);\n\t    CORRECT_SETTER = test instanceof Array;\n\t  } catch (error) { /* empty */ }\n\t  return function setPrototypeOf(O, proto) {\n\t    anObject(O);\n\t    aPossiblePrototype(proto);\n\t    if (CORRECT_SETTER) setter(O, proto);\n\t    else O.__proto__ = proto;\n\t    return O;\n\t  };\n\t}() : undefined);\n\n\tvar PROPER_FUNCTION_NAME = functionName.PROPER;\n\tvar BUGGY_SAFARI_ITERATORS$1 = iteratorsCore.BUGGY_SAFARI_ITERATORS;\n\tvar ITERATOR$1 = wellKnownSymbol('iterator');\n\tvar KEYS = 'keys';\n\tvar VALUES = 'values';\n\tvar ENTRIES = 'entries';\n\n\tvar returnThis$1 = function () { return this; };\n\n\tvar defineIterator = function (Iterable, NAME, IteratorConstructor, next, DEFAULT, IS_SET, FORCED) {\n\t  createIteratorConstructor(IteratorConstructor, NAME, next);\n\n\t  var getIterationMethod = function (KIND) {\n\t    if (KIND === DEFAULT && defaultIterator) return defaultIterator;\n\t    if (!BUGGY_SAFARI_ITERATORS$1 && KIND in IterablePrototype) return IterablePrototype[KIND];\n\t    switch (KIND) {\n\t      case KEYS: return function keys() { return new IteratorConstructor(this, KIND); };\n\t      case VALUES: return function values() { return new IteratorConstructor(this, KIND); };\n\t      case ENTRIES: return function entries() { return new IteratorConstructor(this, KIND); };\n\t    } return function () { return new IteratorConstructor(this); };\n\t  };\n\n\t  var TO_STRING_TAG = NAME + ' Iterator';\n\t  var INCORRECT_VALUES_NAME = false;\n\t  var IterablePrototype = Iterable.prototype;\n\t  var nativeIterator = IterablePrototype[ITERATOR$1]\n\t    || IterablePrototype['@@iterator']\n\t    || DEFAULT && IterablePrototype[DEFAULT];\n\t  var defaultIterator = !BUGGY_SAFARI_ITERATORS$1 && nativeIterator || getIterationMethod(DEFAULT);\n\t  var anyNativeIterator = NAME == 'Array' ? IterablePrototype.entries || nativeIterator : nativeIterator;\n\t  var CurrentIteratorPrototype, methods, KEY;\n\n\t  // fix native\n\t  if (anyNativeIterator) {\n\t    CurrentIteratorPrototype = objectGetPrototypeOf(anyNativeIterator.call(new Iterable()));\n\t    if (CurrentIteratorPrototype !== Object.prototype && CurrentIteratorPrototype.next) {\n\t      // Set @@toStringTag to native iterators\n\t      setToStringTag(CurrentIteratorPrototype, TO_STRING_TAG, true, true);\n\t      iterators[TO_STRING_TAG] = returnThis$1;\n\t    }\n\t  }\n\n\t  // fix Array.prototype.{ values, @@iterator }.name in V8 / FF\n\t  if (PROPER_FUNCTION_NAME && DEFAULT == VALUES && nativeIterator && nativeIterator.name !== VALUES) {\n\t    {\n\t      INCORRECT_VALUES_NAME = true;\n\t      defaultIterator = function values() { return functionCall(nativeIterator, this); };\n\t    }\n\t  }\n\n\t  // export additional methods\n\t  if (DEFAULT) {\n\t    methods = {\n\t      values: getIterationMethod(VALUES),\n\t      keys: IS_SET ? defaultIterator : getIterationMethod(KEYS),\n\t      entries: getIterationMethod(ENTRIES)\n\t    };\n\t    if (FORCED) for (KEY in methods) {\n\t      if (BUGGY_SAFARI_ITERATORS$1 || INCORRECT_VALUES_NAME || !(KEY in IterablePrototype)) {\n\t        defineBuiltIn(IterablePrototype, KEY, methods[KEY]);\n\t      }\n\t    } else _export({ target: NAME, proto: true, forced: BUGGY_SAFARI_ITERATORS$1 || INCORRECT_VALUES_NAME }, methods);\n\t  }\n\n\t  // define iterator\n\t  if (( FORCED) && IterablePrototype[ITERATOR$1] !== defaultIterator) {\n\t    defineBuiltIn(IterablePrototype, ITERATOR$1, defaultIterator, { name: DEFAULT });\n\t  }\n\t  iterators[NAME] = defaultIterator;\n\n\t  return methods;\n\t};\n\n\tvar ARRAY_ITERATOR = 'Array Iterator';\n\tvar setInternalState$1 = internalState.set;\n\tvar getInternalState$1 = internalState.getterFor(ARRAY_ITERATOR);\n\n\t// `Array.prototype.entries` method\n\t// https://tc39.es/ecma262/#sec-array.prototype.entries\n\t// `Array.prototype.keys` method\n\t// https://tc39.es/ecma262/#sec-array.prototype.keys\n\t// `Array.prototype.values` method\n\t// https://tc39.es/ecma262/#sec-array.prototype.values\n\t// `Array.prototype[@@iterator]` method\n\t// https://tc39.es/ecma262/#sec-array.prototype-@@iterator\n\t// `CreateArrayIterator` internal method\n\t// https://tc39.es/ecma262/#sec-createarrayiterator\n\tvar es_array_iterator = defineIterator(Array, 'Array', function (iterated, kind) {\n\t  setInternalState$1(this, {\n\t    type: ARRAY_ITERATOR,\n\t    target: toIndexedObject(iterated), // target\n\t    index: 0,                          // next index\n\t    kind: kind                         // kind\n\t  });\n\t// `%ArrayIteratorPrototype%.next` method\n\t// https://tc39.es/ecma262/#sec-%arrayiteratorprototype%.next\n\t}, function () {\n\t  var state = getInternalState$1(this);\n\t  var target = state.target;\n\t  var kind = state.kind;\n\t  var index = state.index++;\n\t  if (!target || index >= target.length) {\n\t    state.target = undefined;\n\t    return { value: undefined, done: true };\n\t  }\n\t  if (kind == 'keys') return { value: index, done: false };\n\t  if (kind == 'values') return { value: target[index], done: false };\n\t  return { value: [index, target[index]], done: false };\n\t}, 'values');\n\n\t// argumentsList[@@iterator] is %ArrayProto_values%\n\t// https://tc39.es/ecma262/#sec-createunmappedargumentsobject\n\t// https://tc39.es/ecma262/#sec-createmappedargumentsobject\n\tvar values = iterators.Arguments = iterators.Array;\n\n\t// iterable DOM collections\n\t// flag - `iterable` interface - 'entries', 'keys', 'values', 'forEach' methods\n\tvar domIterables = {\n\t  CSSRuleList: 0,\n\t  CSSStyleDeclaration: 0,\n\t  CSSValueList: 0,\n\t  ClientRectList: 0,\n\t  DOMRectList: 0,\n\t  DOMStringList: 0,\n\t  DOMTokenList: 1,\n\t  DataTransferItemList: 0,\n\t  FileList: 0,\n\t  HTMLAllCollection: 0,\n\t  HTMLCollection: 0,\n\t  HTMLFormElement: 0,\n\t  HTMLSelectElement: 0,\n\t  MediaList: 0,\n\t  MimeTypeArray: 0,\n\t  NamedNodeMap: 0,\n\t  NodeList: 1,\n\t  PaintRequestList: 0,\n\t  Plugin: 0,\n\t  PluginArray: 0,\n\t  SVGLengthList: 0,\n\t  SVGNumberList: 0,\n\t  SVGPathSegList: 0,\n\t  SVGPointList: 0,\n\t  SVGStringList: 0,\n\t  SVGTransformList: 0,\n\t  SourceBufferList: 0,\n\t  StyleSheetList: 0,\n\t  TextTrackCueList: 0,\n\t  TextTrackList: 0,\n\t  TouchList: 0\n\t};\n\n\tvar TO_STRING_TAG$3 = wellKnownSymbol('toStringTag');\n\n\tfor (var COLLECTION_NAME in domIterables) {\n\t  var Collection = global_1[COLLECTION_NAME];\n\t  var CollectionPrototype = Collection && Collection.prototype;\n\t  if (CollectionPrototype && classof(CollectionPrototype) !== TO_STRING_TAG$3) {\n\t    createNonEnumerableProperty(CollectionPrototype, TO_STRING_TAG$3, COLLECTION_NAME);\n\t  }\n\t  iterators[COLLECTION_NAME] = iterators.Array;\n\t}\n\n\tvar arrayMethodIsStrict = function (METHOD_NAME, argument) {\n\t  var method = [][METHOD_NAME];\n\t  return !!method && fails(function () {\n\t    // eslint-disable-next-line no-useless-call -- required for testing\n\t    method.call(null, argument || function () { return 1; }, 1);\n\t  });\n\t};\n\n\tvar $forEach$1 = arrayIteration.forEach;\n\n\n\tvar STRICT_METHOD = arrayMethodIsStrict('forEach');\n\n\t// `Array.prototype.forEach` method implementation\n\t// https://tc39.es/ecma262/#sec-array.prototype.foreach\n\tvar arrayForEach = !STRICT_METHOD ? function forEach(callbackfn /* , thisArg */) {\n\t  return $forEach$1(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n\t// eslint-disable-next-line es-x/no-array-prototype-foreach -- safe\n\t} : [].forEach;\n\n\t// `Array.prototype.forEach` method\n\t// https://tc39.es/ecma262/#sec-array.prototype.foreach\n\t// eslint-disable-next-line es-x/no-array-prototype-foreach -- safe\n\t_export({ target: 'Array', proto: true, forced: [].forEach != arrayForEach }, {\n\t  forEach: arrayForEach\n\t});\n\n\tvar forEach = entryVirtual('Array').forEach;\n\n\tvar forEach$1 = forEach;\n\n\tvar ArrayPrototype$1 = Array.prototype;\n\n\tvar DOMIterables = {\n\t  DOMTokenList: true,\n\t  NodeList: true\n\t};\n\n\tvar forEach$2 = function (it) {\n\t  var own = it.forEach;\n\t  return it === ArrayPrototype$1 || (objectIsPrototypeOf(ArrayPrototype$1, it) && own === ArrayPrototype$1.forEach)\n\t    || hasOwnProperty_1(DOMIterables, classof(it)) ? forEach$1 : own;\n\t};\n\n\tvar forEach$3 = forEach$2;\n\n\tvar concat$1 = functionUncurryThis([].concat);\n\n\t// all object keys, includes non-enumerable and symbols\n\tvar ownKeys = getBuiltIn('Reflect', 'ownKeys') || function ownKeys(it) {\n\t  var keys = objectGetOwnPropertyNames.f(anObject(it));\n\t  var getOwnPropertySymbols = objectGetOwnPropertySymbols.f;\n\t  return getOwnPropertySymbols ? concat$1(keys, getOwnPropertySymbols(it)) : keys;\n\t};\n\n\t// `Object.getOwnPropertyDescriptors` method\n\t// https://tc39.es/ecma262/#sec-object.getownpropertydescriptors\n\t_export({ target: 'Object', stat: true, sham: !descriptors }, {\n\t  getOwnPropertyDescriptors: function getOwnPropertyDescriptors(object) {\n\t    var O = toIndexedObject(object);\n\t    var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;\n\t    var keys = ownKeys(O);\n\t    var result = {};\n\t    var index = 0;\n\t    var key, descriptor;\n\t    while (keys.length > index) {\n\t      descriptor = getOwnPropertyDescriptor(O, key = keys[index++]);\n\t      if (descriptor !== undefined) createProperty(result, key, descriptor);\n\t    }\n\t    return result;\n\t  }\n\t});\n\n\tvar getOwnPropertyDescriptors = path.Object.getOwnPropertyDescriptors;\n\n\tvar getOwnPropertyDescriptors$1 = getOwnPropertyDescriptors;\n\n\tvar getOwnPropertyDescriptors$2 = getOwnPropertyDescriptors$1;\n\n\tvar defineProperties = objectDefineProperties.f;\n\n\t// `Object.defineProperties` method\n\t// https://tc39.es/ecma262/#sec-object.defineproperties\n\t// eslint-disable-next-line es-x/no-object-defineproperties -- safe\n\t_export({ target: 'Object', stat: true, forced: Object.defineProperties !== defineProperties, sham: !descriptors }, {\n\t  defineProperties: defineProperties\n\t});\n\n\tvar defineProperties_1 = createCommonjsModule(function (module) {\n\tvar Object = path.Object;\n\n\tvar defineProperties = module.exports = function defineProperties(T, D) {\n\t  return Object.defineProperties(T, D);\n\t};\n\n\tif (Object.defineProperties.sham) defineProperties.sham = true;\n\t});\n\n\tvar defineProperties$1 = defineProperties_1;\n\n\tvar defineProperties$2 = defineProperties$1;\n\n\tvar defineProperty$3 = objectDefineProperty.f;\n\n\t// `Object.defineProperty` method\n\t// https://tc39.es/ecma262/#sec-object.defineproperty\n\t// eslint-disable-next-line es-x/no-object-defineproperty -- safe\n\t_export({ target: 'Object', stat: true, forced: Object.defineProperty !== defineProperty$3, sham: !descriptors }, {\n\t  defineProperty: defineProperty$3\n\t});\n\n\tvar defineProperty_1 = createCommonjsModule(function (module) {\n\tvar Object = path.Object;\n\n\tvar defineProperty = module.exports = function defineProperty(it, key, desc) {\n\t  return Object.defineProperty(it, key, desc);\n\t};\n\n\tif (Object.defineProperty.sham) defineProperty.sham = true;\n\t});\n\n\tvar defineProperty$4 = defineProperty_1;\n\n\tvar defineProperty$5 = defineProperty$4;\n\n\tvar classCallCheck = createCommonjsModule(function (module) {\n\tfunction _classCallCheck(instance, Constructor) {\n\t  if (!(instance instanceof Constructor)) {\n\t    throw new TypeError(\"Cannot call a class as a function\");\n\t  }\n\t}\n\n\tmodule.exports = _classCallCheck, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n\t});\n\n\tvar _classCallCheck = unwrapExports(classCallCheck);\n\n\tvar defineProperty$6 = defineProperty$4;\n\n\tvar defineProperty$7 = defineProperty$6;\n\n\tvar defineProperty$8 = defineProperty$7;\n\n\tvar defineProperty$9 = defineProperty$8;\n\n\tvar createClass = createCommonjsModule(function (module) {\n\tfunction _defineProperties(target, props) {\n\t  for (var i = 0; i < props.length; i++) {\n\t    var descriptor = props[i];\n\t    descriptor.enumerable = descriptor.enumerable || false;\n\t    descriptor.configurable = true;\n\t    if (\"value\" in descriptor) descriptor.writable = true;\n\n\t    defineProperty$9(target, descriptor.key, descriptor);\n\t  }\n\t}\n\n\tfunction _createClass(Constructor, protoProps, staticProps) {\n\t  if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n\t  if (staticProps) _defineProperties(Constructor, staticProps);\n\n\t  defineProperty$9(Constructor, \"prototype\", {\n\t    writable: false\n\t  });\n\n\t  return Constructor;\n\t}\n\n\tmodule.exports = _createClass, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n\t});\n\n\tvar _createClass = unwrapExports(createClass);\n\n\tvar assertThisInitialized = createCommonjsModule(function (module) {\n\tfunction _assertThisInitialized(self) {\n\t  if (self === void 0) {\n\t    throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n\t  }\n\n\t  return self;\n\t}\n\n\tmodule.exports = _assertThisInitialized, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n\t});\n\n\tvar _assertThisInitialized = unwrapExports(assertThisInitialized);\n\n\t// TODO: Remove from `core-js@4`\n\n\n\n\n\t// `Object.create` method\n\t// https://tc39.es/ecma262/#sec-object.create\n\t_export({ target: 'Object', stat: true, sham: !descriptors }, {\n\t  create: objectCreate\n\t});\n\n\tvar Object$6 = path.Object;\n\n\tvar create = function create(P, D) {\n\t  return Object$6.create(P, D);\n\t};\n\n\tvar create$1 = create;\n\n\tvar create$2 = create$1;\n\n\tvar create$3 = create$2;\n\n\tvar create$4 = create$3;\n\n\tvar create$5 = create$4;\n\n\t// `Object.setPrototypeOf` method\n\t// https://tc39.es/ecma262/#sec-object.setprototypeof\n\t_export({ target: 'Object', stat: true }, {\n\t  setPrototypeOf: objectSetPrototypeOf\n\t});\n\n\tvar setPrototypeOf = path.Object.setPrototypeOf;\n\n\tvar setPrototypeOf$1 = setPrototypeOf;\n\n\tvar setPrototypeOf$2 = setPrototypeOf$1;\n\n\tvar setPrototypeOf$3 = setPrototypeOf$2;\n\n\tvar setPrototypeOf$4 = setPrototypeOf$3;\n\n\tvar setPrototypeOf$5 = setPrototypeOf$4;\n\n\tvar setPrototypeOf$6 = createCommonjsModule(function (module) {\n\tfunction _setPrototypeOf(o, p) {\n\t  module.exports = _setPrototypeOf = setPrototypeOf$5 || function _setPrototypeOf(o, p) {\n\t    o.__proto__ = p;\n\t    return o;\n\t  }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n\t  return _setPrototypeOf(o, p);\n\t}\n\n\tmodule.exports = _setPrototypeOf, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n\t});\n\n\tunwrapExports(setPrototypeOf$6);\n\n\tvar inherits = createCommonjsModule(function (module) {\n\tfunction _inherits(subClass, superClass) {\n\t  if (typeof superClass !== \"function\" && superClass !== null) {\n\t    throw new TypeError(\"Super expression must either be null or a function\");\n\t  }\n\n\t  subClass.prototype = create$5(superClass && superClass.prototype, {\n\t    constructor: {\n\t      value: subClass,\n\t      writable: true,\n\t      configurable: true\n\t    }\n\t  });\n\n\t  defineProperty$9(subClass, \"prototype\", {\n\t    writable: false\n\t  });\n\n\t  if (superClass) setPrototypeOf$6(subClass, superClass);\n\t}\n\n\tmodule.exports = _inherits, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n\t});\n\n\tvar _inherits = unwrapExports(inherits);\n\n\tvar IS_CONCAT_SPREADABLE = wellKnownSymbol('isConcatSpreadable');\n\tvar MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF;\n\tvar MAXIMUM_ALLOWED_INDEX_EXCEEDED = 'Maximum allowed index exceeded';\n\tvar TypeError$b = global_1.TypeError;\n\n\t// We can't use this feature detection in V8 since it causes\n\t// deoptimization and serious performance degradation\n\t// https://github.com/zloirock/core-js/issues/679\n\tvar IS_CONCAT_SPREADABLE_SUPPORT = engineV8Version >= 51 || !fails(function () {\n\t  var array = [];\n\t  array[IS_CONCAT_SPREADABLE] = false;\n\t  return array.concat()[0] !== array;\n\t});\n\n\tvar SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('concat');\n\n\tvar isConcatSpreadable = function (O) {\n\t  if (!isObject(O)) return false;\n\t  var spreadable = O[IS_CONCAT_SPREADABLE];\n\t  return spreadable !== undefined ? !!spreadable : isArray(O);\n\t};\n\n\tvar FORCED$3 = !IS_CONCAT_SPREADABLE_SUPPORT || !SPECIES_SUPPORT;\n\n\t// `Array.prototype.concat` method\n\t// https://tc39.es/ecma262/#sec-array.prototype.concat\n\t// with adding support of @@isConcatSpreadable and @@species\n\t_export({ target: 'Array', proto: true, arity: 1, forced: FORCED$3 }, {\n\t  // eslint-disable-next-line no-unused-vars -- required for `.length`\n\t  concat: function concat(arg) {\n\t    var O = toObject(this);\n\t    var A = arraySpeciesCreate(O, 0);\n\t    var n = 0;\n\t    var i, k, length, len, E;\n\t    for (i = -1, length = arguments.length; i < length; i++) {\n\t      E = i === -1 ? O : arguments[i];\n\t      if (isConcatSpreadable(E)) {\n\t        len = lengthOfArrayLike(E);\n\t        if (n + len > MAX_SAFE_INTEGER) throw TypeError$b(MAXIMUM_ALLOWED_INDEX_EXCEEDED);\n\t        for (k = 0; k < len; k++, n++) if (k in E) createProperty(A, n, E[k]);\n\t      } else {\n\t        if (n >= MAX_SAFE_INTEGER) throw TypeError$b(MAXIMUM_ALLOWED_INDEX_EXCEEDED);\n\t        createProperty(A, n++, E);\n\t      }\n\t    }\n\t    A.length = n;\n\t    return A;\n\t  }\n\t});\n\n\t// `Symbol.asyncIterator` well-known symbol\n\t// https://tc39.es/ecma262/#sec-symbol.asynciterator\n\tdefineWellKnownSymbol('asyncIterator');\n\n\t// `Symbol.hasInstance` well-known symbol\n\t// https://tc39.es/ecma262/#sec-symbol.hasinstance\n\tdefineWellKnownSymbol('hasInstance');\n\n\t// `Symbol.isConcatSpreadable` well-known symbol\n\t// https://tc39.es/ecma262/#sec-symbol.isconcatspreadable\n\tdefineWellKnownSymbol('isConcatSpreadable');\n\n\t// `Symbol.iterator` well-known symbol\n\t// https://tc39.es/ecma262/#sec-symbol.iterator\n\tdefineWellKnownSymbol('iterator');\n\n\t// `Symbol.match` well-known symbol\n\t// https://tc39.es/ecma262/#sec-symbol.match\n\tdefineWellKnownSymbol('match');\n\n\t// `Symbol.matchAll` well-known symbol\n\t// https://tc39.es/ecma262/#sec-symbol.matchall\n\tdefineWellKnownSymbol('matchAll');\n\n\t// `Symbol.replace` well-known symbol\n\t// https://tc39.es/ecma262/#sec-symbol.replace\n\tdefineWellKnownSymbol('replace');\n\n\t// `Symbol.search` well-known symbol\n\t// https://tc39.es/ecma262/#sec-symbol.search\n\tdefineWellKnownSymbol('search');\n\n\t// `Symbol.species` well-known symbol\n\t// https://tc39.es/ecma262/#sec-symbol.species\n\tdefineWellKnownSymbol('species');\n\n\t// `Symbol.split` well-known symbol\n\t// https://tc39.es/ecma262/#sec-symbol.split\n\tdefineWellKnownSymbol('split');\n\n\t// `Symbol.toPrimitive` well-known symbol\n\t// https://tc39.es/ecma262/#sec-symbol.toprimitive\n\tdefineWellKnownSymbol('toPrimitive');\n\n\t// `Symbol.prototype[@@toPrimitive]` method\n\t// https://tc39.es/ecma262/#sec-symbol.prototype-@@toprimitive\n\tsymbolDefineToPrimitive();\n\n\t// `Symbol.toStringTag` well-known symbol\n\t// https://tc39.es/ecma262/#sec-symbol.tostringtag\n\tdefineWellKnownSymbol('toStringTag');\n\n\t// `Symbol.prototype[@@toStringTag]` property\n\t// https://tc39.es/ecma262/#sec-symbol.prototype-@@tostringtag\n\tsetToStringTag(getBuiltIn('Symbol'), 'Symbol');\n\n\t// `Symbol.unscopables` well-known symbol\n\t// https://tc39.es/ecma262/#sec-symbol.unscopables\n\tdefineWellKnownSymbol('unscopables');\n\n\t// JSON[@@toStringTag] property\n\t// https://tc39.es/ecma262/#sec-json-@@tostringtag\n\tsetToStringTag(global_1.JSON, 'JSON', true);\n\n\tvar symbol = path.Symbol;\n\n\tvar symbol$1 = symbol;\n\n\tvar symbol$2 = symbol$1;\n\n\t// `Symbol.asyncDispose` well-known symbol\n\t// https://github.com/tc39/proposal-using-statement\n\tdefineWellKnownSymbol('asyncDispose');\n\n\t// `Symbol.dispose` well-known symbol\n\t// https://github.com/tc39/proposal-using-statement\n\tdefineWellKnownSymbol('dispose');\n\n\t// `Symbol.matcher` well-known symbol\n\t// https://github.com/tc39/proposal-pattern-matching\n\tdefineWellKnownSymbol('matcher');\n\n\t// `Symbol.metadata` well-known symbol\n\t// https://github.com/tc39/proposal-decorators\n\tdefineWellKnownSymbol('metadata');\n\n\t// `Symbol.observable` well-known symbol\n\t// https://github.com/tc39/proposal-observable\n\tdefineWellKnownSymbol('observable');\n\n\t// TODO: remove from `core-js@4`\n\n\n\t// `Symbol.patternMatch` well-known symbol\n\t// https://github.com/tc39/proposal-pattern-matching\n\tdefineWellKnownSymbol('patternMatch');\n\n\t// TODO: remove from `core-js@4`\n\n\n\tdefineWellKnownSymbol('replaceAll');\n\n\t// TODO: Remove from `core-js@4`\n\n\t// TODO: Remove from `core-js@4`\n\n\n\tvar symbol$3 = symbol$2;\n\n\tvar symbol$4 = symbol$3;\n\n\tvar symbol$5 = symbol$4;\n\n\tvar charAt$1 = functionUncurryThis(''.charAt);\n\tvar charCodeAt$1 = functionUncurryThis(''.charCodeAt);\n\tvar stringSlice$1 = functionUncurryThis(''.slice);\n\n\tvar createMethod$2 = function (CONVERT_TO_STRING) {\n\t  return function ($this, pos) {\n\t    var S = toString_1(requireObjectCoercible($this));\n\t    var position = toIntegerOrInfinity(pos);\n\t    var size = S.length;\n\t    var first, second;\n\t    if (position < 0 || position >= size) return CONVERT_TO_STRING ? '' : undefined;\n\t    first = charCodeAt$1(S, position);\n\t    return first < 0xD800 || first > 0xDBFF || position + 1 === size\n\t      || (second = charCodeAt$1(S, position + 1)) < 0xDC00 || second > 0xDFFF\n\t        ? CONVERT_TO_STRING\n\t          ? charAt$1(S, position)\n\t          : first\n\t        : CONVERT_TO_STRING\n\t          ? stringSlice$1(S, position, position + 2)\n\t          : (first - 0xD800 << 10) + (second - 0xDC00) + 0x10000;\n\t  };\n\t};\n\n\tvar stringMultibyte = {\n\t  // `String.prototype.codePointAt` method\n\t  // https://tc39.es/ecma262/#sec-string.prototype.codepointat\n\t  codeAt: createMethod$2(false),\n\t  // `String.prototype.at` method\n\t  // https://github.com/mathiasbynens/String.prototype.at\n\t  charAt: createMethod$2(true)\n\t};\n\n\tvar charAt$2 = stringMultibyte.charAt;\n\n\n\n\n\tvar STRING_ITERATOR = 'String Iterator';\n\tvar setInternalState$2 = internalState.set;\n\tvar getInternalState$2 = internalState.getterFor(STRING_ITERATOR);\n\n\t// `String.prototype[@@iterator]` method\n\t// https://tc39.es/ecma262/#sec-string.prototype-@@iterator\n\tdefineIterator(String, 'String', function (iterated) {\n\t  setInternalState$2(this, {\n\t    type: STRING_ITERATOR,\n\t    string: toString_1(iterated),\n\t    index: 0\n\t  });\n\t// `%StringIteratorPrototype%.next` method\n\t// https://tc39.es/ecma262/#sec-%stringiteratorprototype%.next\n\t}, function next() {\n\t  var state = getInternalState$2(this);\n\t  var string = state.string;\n\t  var index = state.index;\n\t  var point;\n\t  if (index >= string.length) return { value: undefined, done: true };\n\t  point = charAt$2(string, index);\n\t  state.index += point.length;\n\t  return { value: point, done: false };\n\t});\n\n\tvar iterator = wellKnownSymbolWrapped.f('iterator');\n\n\tvar iterator$1 = iterator;\n\n\tvar iterator$2 = iterator$1;\n\n\tvar iterator$3 = iterator$2;\n\n\tvar iterator$4 = iterator$3;\n\n\tvar iterator$5 = iterator$4;\n\n\tvar _typeof_1 = createCommonjsModule(function (module) {\n\tfunction _typeof(obj) {\n\t  \"@babel/helpers - typeof\";\n\n\t  return (module.exports = _typeof = \"function\" == typeof symbol$5 && \"symbol\" == typeof iterator$5 ? function (obj) {\n\t    return typeof obj;\n\t  } : function (obj) {\n\t    return obj && \"function\" == typeof symbol$5 && obj.constructor === symbol$5 && obj !== symbol$5.prototype ? \"symbol\" : typeof obj;\n\t  }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports), _typeof(obj);\n\t}\n\n\tmodule.exports = _typeof, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n\t});\n\n\tvar _typeof = unwrapExports(_typeof_1);\n\n\tvar possibleConstructorReturn = createCommonjsModule(function (module) {\n\tvar _typeof = _typeof_1[\"default\"];\n\n\n\n\tfunction _possibleConstructorReturn(self, call) {\n\t  if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) {\n\t    return call;\n\t  } else if (call !== void 0) {\n\t    throw new TypeError(\"Derived constructors may only return object or undefined\");\n\t  }\n\n\t  return assertThisInitialized(self);\n\t}\n\n\tmodule.exports = _possibleConstructorReturn, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n\t});\n\n\tvar _possibleConstructorReturn = unwrapExports(possibleConstructorReturn);\n\n\tvar FAILS_ON_PRIMITIVES$2 = fails(function () { objectGetPrototypeOf(1); });\n\n\t// `Object.getPrototypeOf` method\n\t// https://tc39.es/ecma262/#sec-object.getprototypeof\n\t_export({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES$2, sham: !correctPrototypeGetter }, {\n\t  getPrototypeOf: function getPrototypeOf(it) {\n\t    return objectGetPrototypeOf(toObject(it));\n\t  }\n\t});\n\n\tvar getPrototypeOf = path.Object.getPrototypeOf;\n\n\tvar getPrototypeOf$1 = getPrototypeOf;\n\n\tvar getPrototypeOf$2 = getPrototypeOf$1;\n\n\tvar getPrototypeOf$3 = getPrototypeOf$2;\n\n\tvar getPrototypeOf$4 = getPrototypeOf$3;\n\n\tvar getPrototypeOf$5 = getPrototypeOf$4;\n\n\tvar getPrototypeOf$6 = createCommonjsModule(function (module) {\n\tfunction _getPrototypeOf(o) {\n\t  module.exports = _getPrototypeOf = setPrototypeOf$5 ? getPrototypeOf$5 : function _getPrototypeOf(o) {\n\t    return o.__proto__ || getPrototypeOf$5(o);\n\t  }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n\t  return _getPrototypeOf(o);\n\t}\n\n\tmodule.exports = _getPrototypeOf, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n\t});\n\n\tvar _getPrototypeOf = unwrapExports(getPrototypeOf$6);\n\n\tvar defineProperty$a = createCommonjsModule(function (module) {\n\tfunction _defineProperty(obj, key, value) {\n\t  if (key in obj) {\n\t    defineProperty$9(obj, key, {\n\t      value: value,\n\t      enumerable: true,\n\t      configurable: true,\n\t      writable: true\n\t    });\n\t  } else {\n\t    obj[key] = value;\n\t  }\n\n\t  return obj;\n\t}\n\n\tmodule.exports = _defineProperty, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n\t});\n\n\tvar _defineProperty = unwrapExports(defineProperty$a);\n\n\tvar concat$2 = entryVirtual('Array').concat;\n\n\tvar ArrayPrototype$2 = Array.prototype;\n\n\tvar concat$3 = function (it) {\n\t  var own = it.concat;\n\t  return it === ArrayPrototype$2 || (objectIsPrototypeOf(ArrayPrototype$2, it) && own === ArrayPrototype$2.concat) ? concat$2 : own;\n\t};\n\n\tvar concat$4 = concat$3;\n\n\tvar concat$5 = concat$4;\n\n\t// TODO: Remove from `core-js@4`\n\n\n\n\t// `Function.prototype.bind` method\n\t// https://tc39.es/ecma262/#sec-function.prototype.bind\n\t_export({ target: 'Function', proto: true, forced: Function.bind !== functionBind }, {\n\t  bind: functionBind\n\t});\n\n\tvar bind$2 = entryVirtual('Function').bind;\n\n\tvar FunctionPrototype$3 = Function.prototype;\n\n\tvar bind$3 = function (it) {\n\t  var own = it.bind;\n\t  return it === FunctionPrototype$3 || (objectIsPrototypeOf(FunctionPrototype$3, it) && own === FunctionPrototype$3.bind) ? bind$2 : own;\n\t};\n\n\tvar bind$4 = bind$3;\n\n\tvar bind$5 = bind$4;\n\n\tvar TypeError$c = global_1.TypeError;\n\n\tvar validateArgumentsLength = function (passed, required) {\n\t  if (passed < required) throw TypeError$c('Not enough arguments');\n\t  return passed;\n\t};\n\n\tvar MSIE = /MSIE .\\./.test(engineUserAgent); // <- dirty ie9- check\n\tvar Function$2 = global_1.Function;\n\n\tvar wrap$1 = function (scheduler) {\n\t  return MSIE ? function (handler, timeout /* , ...arguments */) {\n\t    var boundArgs = validateArgumentsLength(arguments.length, 1) > 2;\n\t    var fn = isCallable(handler) ? handler : Function$2(handler);\n\t    var args = boundArgs ? arraySlice(arguments, 2) : undefined;\n\t    return scheduler(boundArgs ? function () {\n\t      functionApply(fn, this, args);\n\t    } : fn, timeout);\n\t  } : scheduler;\n\t};\n\n\t// ie9- setTimeout & setInterval additional parameters fix\n\t// https://html.spec.whatwg.org/multipage/timers-and-user-prompts.html#timers\n\tvar schedulersFix = {\n\t  // `setTimeout` method\n\t  // https://html.spec.whatwg.org/multipage/timers-and-user-prompts.html#dom-settimeout\n\t  setTimeout: wrap$1(global_1.setTimeout),\n\t  // `setInterval` method\n\t  // https://html.spec.whatwg.org/multipage/timers-and-user-prompts.html#dom-setinterval\n\t  setInterval: wrap$1(global_1.setInterval)\n\t};\n\n\tvar setInterval$1 = schedulersFix.setInterval;\n\n\t// ie9- setInterval additional parameters fix\n\t// https://html.spec.whatwg.org/multipage/timers-and-user-prompts.html#dom-setinterval\n\t_export({ global: true, bind: true, forced: global_1.setInterval !== setInterval$1 }, {\n\t  setInterval: setInterval$1\n\t});\n\n\tvar setTimeout$1 = schedulersFix.setTimeout;\n\n\t// ie9- setTimeout additional parameters fix\n\t// https://html.spec.whatwg.org/multipage/timers-and-user-prompts.html#dom-settimeout\n\t_export({ global: true, bind: true, forced: global_1.setTimeout !== setTimeout$1 }, {\n\t  setTimeout: setTimeout$1\n\t});\n\n\tvar setTimeout$2 = path.setTimeout;\n\n\tvar setTimeout$3 = setTimeout$2;\n\n\t/**\n\t * Removes all key-value entries from the list cache.\n\t *\n\t * @private\n\t * @name clear\n\t * @memberOf ListCache\n\t */\n\tfunction listCacheClear() {\n\t  this.__data__ = [];\n\t  this.size = 0;\n\t}\n\n\tvar _listCacheClear = listCacheClear;\n\n\t/**\n\t * Performs a\n\t * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n\t * comparison between two values to determine if they are equivalent.\n\t *\n\t * @static\n\t * @memberOf _\n\t * @since 4.0.0\n\t * @category Lang\n\t * @param {*} value The value to compare.\n\t * @param {*} other The other value to compare.\n\t * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n\t * @example\n\t *\n\t * var object = { 'a': 1 };\n\t * var other = { 'a': 1 };\n\t *\n\t * _.eq(object, object);\n\t * // => true\n\t *\n\t * _.eq(object, other);\n\t * // => false\n\t *\n\t * _.eq('a', 'a');\n\t * // => true\n\t *\n\t * _.eq('a', Object('a'));\n\t * // => false\n\t *\n\t * _.eq(NaN, NaN);\n\t * // => true\n\t */\n\tfunction eq(value, other) {\n\t  return value === other || (value !== value && other !== other);\n\t}\n\n\tvar eq_1 = eq;\n\n\t/**\n\t * Gets the index at which the `key` is found in `array` of key-value pairs.\n\t *\n\t * @private\n\t * @param {Array} array The array to inspect.\n\t * @param {*} key The key to search for.\n\t * @returns {number} Returns the index of the matched value, else `-1`.\n\t */\n\tfunction assocIndexOf(array, key) {\n\t  var length = array.length;\n\t  while (length--) {\n\t    if (eq_1(array[length][0], key)) {\n\t      return length;\n\t    }\n\t  }\n\t  return -1;\n\t}\n\n\tvar _assocIndexOf = assocIndexOf;\n\n\t/** Used for built-in method references. */\n\tvar arrayProto = Array.prototype;\n\n\t/** Built-in value references. */\n\tvar splice = arrayProto.splice;\n\n\t/**\n\t * Removes `key` and its value from the list cache.\n\t *\n\t * @private\n\t * @name delete\n\t * @memberOf ListCache\n\t * @param {string} key The key of the value to remove.\n\t * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n\t */\n\tfunction listCacheDelete(key) {\n\t  var data = this.__data__,\n\t      index = _assocIndexOf(data, key);\n\n\t  if (index < 0) {\n\t    return false;\n\t  }\n\t  var lastIndex = data.length - 1;\n\t  if (index == lastIndex) {\n\t    data.pop();\n\t  } else {\n\t    splice.call(data, index, 1);\n\t  }\n\t  --this.size;\n\t  return true;\n\t}\n\n\tvar _listCacheDelete = listCacheDelete;\n\n\t/**\n\t * Gets the list cache value for `key`.\n\t *\n\t * @private\n\t * @name get\n\t * @memberOf ListCache\n\t * @param {string} key The key of the value to get.\n\t * @returns {*} Returns the entry value.\n\t */\n\tfunction listCacheGet(key) {\n\t  var data = this.__data__,\n\t      index = _assocIndexOf(data, key);\n\n\t  return index < 0 ? undefined : data[index][1];\n\t}\n\n\tvar _listCacheGet = listCacheGet;\n\n\t/**\n\t * Checks if a list cache value for `key` exists.\n\t *\n\t * @private\n\t * @name has\n\t * @memberOf ListCache\n\t * @param {string} key The key of the entry to check.\n\t * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n\t */\n\tfunction listCacheHas(key) {\n\t  return _assocIndexOf(this.__data__, key) > -1;\n\t}\n\n\tvar _listCacheHas = listCacheHas;\n\n\t/**\n\t * Sets the list cache `key` to `value`.\n\t *\n\t * @private\n\t * @name set\n\t * @memberOf ListCache\n\t * @param {string} key The key of the value to set.\n\t * @param {*} value The value to set.\n\t * @returns {Object} Returns the list cache instance.\n\t */\n\tfunction listCacheSet(key, value) {\n\t  var data = this.__data__,\n\t      index = _assocIndexOf(data, key);\n\n\t  if (index < 0) {\n\t    ++this.size;\n\t    data.push([key, value]);\n\t  } else {\n\t    data[index][1] = value;\n\t  }\n\t  return this;\n\t}\n\n\tvar _listCacheSet = listCacheSet;\n\n\t/**\n\t * Creates an list cache object.\n\t *\n\t * @private\n\t * @constructor\n\t * @param {Array} [entries] The key-value pairs to cache.\n\t */\n\tfunction ListCache(entries) {\n\t  var index = -1,\n\t      length = entries == null ? 0 : entries.length;\n\n\t  this.clear();\n\t  while (++index < length) {\n\t    var entry = entries[index];\n\t    this.set(entry[0], entry[1]);\n\t  }\n\t}\n\n\t// Add methods to `ListCache`.\n\tListCache.prototype.clear = _listCacheClear;\n\tListCache.prototype['delete'] = _listCacheDelete;\n\tListCache.prototype.get = _listCacheGet;\n\tListCache.prototype.has = _listCacheHas;\n\tListCache.prototype.set = _listCacheSet;\n\n\tvar _ListCache = ListCache;\n\n\t/**\n\t * Removes all key-value entries from the stack.\n\t *\n\t * @private\n\t * @name clear\n\t * @memberOf Stack\n\t */\n\tfunction stackClear() {\n\t  this.__data__ = new _ListCache;\n\t  this.size = 0;\n\t}\n\n\tvar _stackClear = stackClear;\n\n\t/**\n\t * Removes `key` and its value from the stack.\n\t *\n\t * @private\n\t * @name delete\n\t * @memberOf Stack\n\t * @param {string} key The key of the value to remove.\n\t * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n\t */\n\tfunction stackDelete(key) {\n\t  var data = this.__data__,\n\t      result = data['delete'](key);\n\n\t  this.size = data.size;\n\t  return result;\n\t}\n\n\tvar _stackDelete = stackDelete;\n\n\t/**\n\t * Gets the stack value for `key`.\n\t *\n\t * @private\n\t * @name get\n\t * @memberOf Stack\n\t * @param {string} key The key of the value to get.\n\t * @returns {*} Returns the entry value.\n\t */\n\tfunction stackGet(key) {\n\t  return this.__data__.get(key);\n\t}\n\n\tvar _stackGet = stackGet;\n\n\t/**\n\t * Checks if a stack value for `key` exists.\n\t *\n\t * @private\n\t * @name has\n\t * @memberOf Stack\n\t * @param {string} key The key of the entry to check.\n\t * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n\t */\n\tfunction stackHas(key) {\n\t  return this.__data__.has(key);\n\t}\n\n\tvar _stackHas = stackHas;\n\n\t/** Detect free variable `global` from Node.js. */\n\tvar freeGlobal = typeof commonjsGlobal == 'object' && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal;\n\n\tvar _freeGlobal = freeGlobal;\n\n\t/** Detect free variable `self`. */\n\tvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n\t/** Used as a reference to the global object. */\n\tvar root = _freeGlobal || freeSelf || Function('return this')();\n\n\tvar _root = root;\n\n\t/** Built-in value references. */\n\tvar Symbol$2 = _root.Symbol;\n\n\tvar _Symbol = Symbol$2;\n\n\t/** Used for built-in method references. */\n\tvar objectProto = Object.prototype;\n\n\t/** Used to check objects for own properties. */\n\tvar hasOwnProperty$1 = objectProto.hasOwnProperty;\n\n\t/**\n\t * Used to resolve the\n\t * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n\t * of values.\n\t */\n\tvar nativeObjectToString = objectProto.toString;\n\n\t/** Built-in value references. */\n\tvar symToStringTag = _Symbol ? _Symbol.toStringTag : undefined;\n\n\t/**\n\t * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n\t *\n\t * @private\n\t * @param {*} value The value to query.\n\t * @returns {string} Returns the raw `toStringTag`.\n\t */\n\tfunction getRawTag(value) {\n\t  var isOwn = hasOwnProperty$1.call(value, symToStringTag),\n\t      tag = value[symToStringTag];\n\n\t  try {\n\t    value[symToStringTag] = undefined;\n\t    var unmasked = true;\n\t  } catch (e) {}\n\n\t  var result = nativeObjectToString.call(value);\n\t  if (unmasked) {\n\t    if (isOwn) {\n\t      value[symToStringTag] = tag;\n\t    } else {\n\t      delete value[symToStringTag];\n\t    }\n\t  }\n\t  return result;\n\t}\n\n\tvar _getRawTag = getRawTag;\n\n\t/** Used for built-in method references. */\n\tvar objectProto$1 = Object.prototype;\n\n\t/**\n\t * Used to resolve the\n\t * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n\t * of values.\n\t */\n\tvar nativeObjectToString$1 = objectProto$1.toString;\n\n\t/**\n\t * Converts `value` to a string using `Object.prototype.toString`.\n\t *\n\t * @private\n\t * @param {*} value The value to convert.\n\t * @returns {string} Returns the converted string.\n\t */\n\tfunction objectToString$1(value) {\n\t  return nativeObjectToString$1.call(value);\n\t}\n\n\tvar _objectToString = objectToString$1;\n\n\t/** `Object#toString` result references. */\n\tvar nullTag = '[object Null]',\n\t    undefinedTag = '[object Undefined]';\n\n\t/** Built-in value references. */\n\tvar symToStringTag$1 = _Symbol ? _Symbol.toStringTag : undefined;\n\n\t/**\n\t * The base implementation of `getTag` without fallbacks for buggy environments.\n\t *\n\t * @private\n\t * @param {*} value The value to query.\n\t * @returns {string} Returns the `toStringTag`.\n\t */\n\tfunction baseGetTag(value) {\n\t  if (value == null) {\n\t    return value === undefined ? undefinedTag : nullTag;\n\t  }\n\t  return (symToStringTag$1 && symToStringTag$1 in Object(value))\n\t    ? _getRawTag(value)\n\t    : _objectToString(value);\n\t}\n\n\tvar _baseGetTag = baseGetTag;\n\n\t/**\n\t * Checks if `value` is the\n\t * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n\t * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n\t *\n\t * @static\n\t * @memberOf _\n\t * @since 0.1.0\n\t * @category Lang\n\t * @param {*} value The value to check.\n\t * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n\t * @example\n\t *\n\t * _.isObject({});\n\t * // => true\n\t *\n\t * _.isObject([1, 2, 3]);\n\t * // => true\n\t *\n\t * _.isObject(_.noop);\n\t * // => true\n\t *\n\t * _.isObject(null);\n\t * // => false\n\t */\n\tfunction isObject$1(value) {\n\t  var type = typeof value;\n\t  return value != null && (type == 'object' || type == 'function');\n\t}\n\n\tvar isObject_1 = isObject$1;\n\n\t/** `Object#toString` result references. */\n\tvar asyncTag = '[object AsyncFunction]',\n\t    funcTag = '[object Function]',\n\t    genTag = '[object GeneratorFunction]',\n\t    proxyTag = '[object Proxy]';\n\n\t/**\n\t * Checks if `value` is classified as a `Function` object.\n\t *\n\t * @static\n\t * @memberOf _\n\t * @since 0.1.0\n\t * @category Lang\n\t * @param {*} value The value to check.\n\t * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n\t * @example\n\t *\n\t * _.isFunction(_);\n\t * // => true\n\t *\n\t * _.isFunction(/abc/);\n\t * // => false\n\t */\n\tfunction isFunction(value) {\n\t  if (!isObject_1(value)) {\n\t    return false;\n\t  }\n\t  // The use of `Object#toString` avoids issues with the `typeof` operator\n\t  // in Safari 9 which returns 'object' for typed arrays and other constructors.\n\t  var tag = _baseGetTag(value);\n\t  return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;\n\t}\n\n\tvar isFunction_1 = isFunction;\n\n\t/** Used to detect overreaching core-js shims. */\n\tvar coreJsData = _root['__core-js_shared__'];\n\n\tvar _coreJsData = coreJsData;\n\n\t/** Used to detect methods masquerading as native. */\n\tvar maskSrcKey = (function() {\n\t  var uid = /[^.]+$/.exec(_coreJsData && _coreJsData.keys && _coreJsData.keys.IE_PROTO || '');\n\t  return uid ? ('Symbol(src)_1.' + uid) : '';\n\t}());\n\n\t/**\n\t * Checks if `func` has its source masked.\n\t *\n\t * @private\n\t * @param {Function} func The function to check.\n\t * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n\t */\n\tfunction isMasked(func) {\n\t  return !!maskSrcKey && (maskSrcKey in func);\n\t}\n\n\tvar _isMasked = isMasked;\n\n\t/** Used for built-in method references. */\n\tvar funcProto = Function.prototype;\n\n\t/** Used to resolve the decompiled source of functions. */\n\tvar funcToString = funcProto.toString;\n\n\t/**\n\t * Converts `func` to its source code.\n\t *\n\t * @private\n\t * @param {Function} func The function to convert.\n\t * @returns {string} Returns the source code.\n\t */\n\tfunction toSource(func) {\n\t  if (func != null) {\n\t    try {\n\t      return funcToString.call(func);\n\t    } catch (e) {}\n\t    try {\n\t      return (func + '');\n\t    } catch (e) {}\n\t  }\n\t  return '';\n\t}\n\n\tvar _toSource = toSource;\n\n\t/**\n\t * Used to match `RegExp`\n\t * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n\t */\n\tvar reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n\n\t/** Used to detect host constructors (Safari). */\n\tvar reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n\t/** Used for built-in method references. */\n\tvar funcProto$1 = Function.prototype,\n\t    objectProto$2 = Object.prototype;\n\n\t/** Used to resolve the decompiled source of functions. */\n\tvar funcToString$1 = funcProto$1.toString;\n\n\t/** Used to check objects for own properties. */\n\tvar hasOwnProperty$2 = objectProto$2.hasOwnProperty;\n\n\t/** Used to detect if a method is native. */\n\tvar reIsNative = RegExp('^' +\n\t  funcToString$1.call(hasOwnProperty$2).replace(reRegExpChar, '\\\\$&')\n\t  .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n\t);\n\n\t/**\n\t * The base implementation of `_.isNative` without bad shim checks.\n\t *\n\t * @private\n\t * @param {*} value The value to check.\n\t * @returns {boolean} Returns `true` if `value` is a native function,\n\t *  else `false`.\n\t */\n\tfunction baseIsNative(value) {\n\t  if (!isObject_1(value) || _isMasked(value)) {\n\t    return false;\n\t  }\n\t  var pattern = isFunction_1(value) ? reIsNative : reIsHostCtor;\n\t  return pattern.test(_toSource(value));\n\t}\n\n\tvar _baseIsNative = baseIsNative;\n\n\t/**\n\t * Gets the value at `key` of `object`.\n\t *\n\t * @private\n\t * @param {Object} [object] The object to query.\n\t * @param {string} key The key of the property to get.\n\t * @returns {*} Returns the property value.\n\t */\n\tfunction getValue(object, key) {\n\t  return object == null ? undefined : object[key];\n\t}\n\n\tvar _getValue = getValue;\n\n\t/**\n\t * Gets the native function at `key` of `object`.\n\t *\n\t * @private\n\t * @param {Object} object The object to query.\n\t * @param {string} key The key of the method to get.\n\t * @returns {*} Returns the function if it's native, else `undefined`.\n\t */\n\tfunction getNative(object, key) {\n\t  var value = _getValue(object, key);\n\t  return _baseIsNative(value) ? value : undefined;\n\t}\n\n\tvar _getNative = getNative;\n\n\t/* Built-in method references that are verified to be native. */\n\tvar Map$1 = _getNative(_root, 'Map');\n\n\tvar _Map = Map$1;\n\n\t/* Built-in method references that are verified to be native. */\n\tvar nativeCreate = _getNative(Object, 'create');\n\n\tvar _nativeCreate = nativeCreate;\n\n\t/**\n\t * Removes all key-value entries from the hash.\n\t *\n\t * @private\n\t * @name clear\n\t * @memberOf Hash\n\t */\n\tfunction hashClear() {\n\t  this.__data__ = _nativeCreate ? _nativeCreate(null) : {};\n\t  this.size = 0;\n\t}\n\n\tvar _hashClear = hashClear;\n\n\t/**\n\t * Removes `key` and its value from the hash.\n\t *\n\t * @private\n\t * @name delete\n\t * @memberOf Hash\n\t * @param {Object} hash The hash to modify.\n\t * @param {string} key The key of the value to remove.\n\t * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n\t */\n\tfunction hashDelete(key) {\n\t  var result = this.has(key) && delete this.__data__[key];\n\t  this.size -= result ? 1 : 0;\n\t  return result;\n\t}\n\n\tvar _hashDelete = hashDelete;\n\n\t/** Used to stand-in for `undefined` hash values. */\n\tvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n\t/** Used for built-in method references. */\n\tvar objectProto$3 = Object.prototype;\n\n\t/** Used to check objects for own properties. */\n\tvar hasOwnProperty$3 = objectProto$3.hasOwnProperty;\n\n\t/**\n\t * Gets the hash value for `key`.\n\t *\n\t * @private\n\t * @name get\n\t * @memberOf Hash\n\t * @param {string} key The key of the value to get.\n\t * @returns {*} Returns the entry value.\n\t */\n\tfunction hashGet(key) {\n\t  var data = this.__data__;\n\t  if (_nativeCreate) {\n\t    var result = data[key];\n\t    return result === HASH_UNDEFINED ? undefined : result;\n\t  }\n\t  return hasOwnProperty$3.call(data, key) ? data[key] : undefined;\n\t}\n\n\tvar _hashGet = hashGet;\n\n\t/** Used for built-in method references. */\n\tvar objectProto$4 = Object.prototype;\n\n\t/** Used to check objects for own properties. */\n\tvar hasOwnProperty$4 = objectProto$4.hasOwnProperty;\n\n\t/**\n\t * Checks if a hash value for `key` exists.\n\t *\n\t * @private\n\t * @name has\n\t * @memberOf Hash\n\t * @param {string} key The key of the entry to check.\n\t * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n\t */\n\tfunction hashHas(key) {\n\t  var data = this.__data__;\n\t  return _nativeCreate ? (data[key] !== undefined) : hasOwnProperty$4.call(data, key);\n\t}\n\n\tvar _hashHas = hashHas;\n\n\t/** Used to stand-in for `undefined` hash values. */\n\tvar HASH_UNDEFINED$1 = '__lodash_hash_undefined__';\n\n\t/**\n\t * Sets the hash `key` to `value`.\n\t *\n\t * @private\n\t * @name set\n\t * @memberOf Hash\n\t * @param {string} key The key of the value to set.\n\t * @param {*} value The value to set.\n\t * @returns {Object} Returns the hash instance.\n\t */\n\tfunction hashSet(key, value) {\n\t  var data = this.__data__;\n\t  this.size += this.has(key) ? 0 : 1;\n\t  data[key] = (_nativeCreate && value === undefined) ? HASH_UNDEFINED$1 : value;\n\t  return this;\n\t}\n\n\tvar _hashSet = hashSet;\n\n\t/**\n\t * Creates a hash object.\n\t *\n\t * @private\n\t * @constructor\n\t * @param {Array} [entries] The key-value pairs to cache.\n\t */\n\tfunction Hash(entries) {\n\t  var index = -1,\n\t      length = entries == null ? 0 : entries.length;\n\n\t  this.clear();\n\t  while (++index < length) {\n\t    var entry = entries[index];\n\t    this.set(entry[0], entry[1]);\n\t  }\n\t}\n\n\t// Add methods to `Hash`.\n\tHash.prototype.clear = _hashClear;\n\tHash.prototype['delete'] = _hashDelete;\n\tHash.prototype.get = _hashGet;\n\tHash.prototype.has = _hashHas;\n\tHash.prototype.set = _hashSet;\n\n\tvar _Hash = Hash;\n\n\t/**\n\t * Removes all key-value entries from the map.\n\t *\n\t * @private\n\t * @name clear\n\t * @memberOf MapCache\n\t */\n\tfunction mapCacheClear() {\n\t  this.size = 0;\n\t  this.__data__ = {\n\t    'hash': new _Hash,\n\t    'map': new (_Map || _ListCache),\n\t    'string': new _Hash\n\t  };\n\t}\n\n\tvar _mapCacheClear = mapCacheClear;\n\n\t/**\n\t * Checks if `value` is suitable for use as unique object key.\n\t *\n\t * @private\n\t * @param {*} value The value to check.\n\t * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n\t */\n\tfunction isKeyable(value) {\n\t  var type = typeof value;\n\t  return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n\t    ? (value !== '__proto__')\n\t    : (value === null);\n\t}\n\n\tvar _isKeyable = isKeyable;\n\n\t/**\n\t * Gets the data for `map`.\n\t *\n\t * @private\n\t * @param {Object} map The map to query.\n\t * @param {string} key The reference key.\n\t * @returns {*} Returns the map data.\n\t */\n\tfunction getMapData(map, key) {\n\t  var data = map.__data__;\n\t  return _isKeyable(key)\n\t    ? data[typeof key == 'string' ? 'string' : 'hash']\n\t    : data.map;\n\t}\n\n\tvar _getMapData = getMapData;\n\n\t/**\n\t * Removes `key` and its value from the map.\n\t *\n\t * @private\n\t * @name delete\n\t * @memberOf MapCache\n\t * @param {string} key The key of the value to remove.\n\t * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n\t */\n\tfunction mapCacheDelete(key) {\n\t  var result = _getMapData(this, key)['delete'](key);\n\t  this.size -= result ? 1 : 0;\n\t  return result;\n\t}\n\n\tvar _mapCacheDelete = mapCacheDelete;\n\n\t/**\n\t * Gets the map value for `key`.\n\t *\n\t * @private\n\t * @name get\n\t * @memberOf MapCache\n\t * @param {string} key The key of the value to get.\n\t * @returns {*} Returns the entry value.\n\t */\n\tfunction mapCacheGet(key) {\n\t  return _getMapData(this, key).get(key);\n\t}\n\n\tvar _mapCacheGet = mapCacheGet;\n\n\t/**\n\t * Checks if a map value for `key` exists.\n\t *\n\t * @private\n\t * @name has\n\t * @memberOf MapCache\n\t * @param {string} key The key of the entry to check.\n\t * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n\t */\n\tfunction mapCacheHas(key) {\n\t  return _getMapData(this, key).has(key);\n\t}\n\n\tvar _mapCacheHas = mapCacheHas;\n\n\t/**\n\t * Sets the map `key` to `value`.\n\t *\n\t * @private\n\t * @name set\n\t * @memberOf MapCache\n\t * @param {string} key The key of the value to set.\n\t * @param {*} value The value to set.\n\t * @returns {Object} Returns the map cache instance.\n\t */\n\tfunction mapCacheSet(key, value) {\n\t  var data = _getMapData(this, key),\n\t      size = data.size;\n\n\t  data.set(key, value);\n\t  this.size += data.size == size ? 0 : 1;\n\t  return this;\n\t}\n\n\tvar _mapCacheSet = mapCacheSet;\n\n\t/**\n\t * Creates a map cache object to store key-value pairs.\n\t *\n\t * @private\n\t * @constructor\n\t * @param {Array} [entries] The key-value pairs to cache.\n\t */\n\tfunction MapCache(entries) {\n\t  var index = -1,\n\t      length = entries == null ? 0 : entries.length;\n\n\t  this.clear();\n\t  while (++index < length) {\n\t    var entry = entries[index];\n\t    this.set(entry[0], entry[1]);\n\t  }\n\t}\n\n\t// Add methods to `MapCache`.\n\tMapCache.prototype.clear = _mapCacheClear;\n\tMapCache.prototype['delete'] = _mapCacheDelete;\n\tMapCache.prototype.get = _mapCacheGet;\n\tMapCache.prototype.has = _mapCacheHas;\n\tMapCache.prototype.set = _mapCacheSet;\n\n\tvar _MapCache = MapCache;\n\n\t/** Used as the size to enable large array optimizations. */\n\tvar LARGE_ARRAY_SIZE = 200;\n\n\t/**\n\t * Sets the stack `key` to `value`.\n\t *\n\t * @private\n\t * @name set\n\t * @memberOf Stack\n\t * @param {string} key The key of the value to set.\n\t * @param {*} value The value to set.\n\t * @returns {Object} Returns the stack cache instance.\n\t */\n\tfunction stackSet(key, value) {\n\t  var data = this.__data__;\n\t  if (data instanceof _ListCache) {\n\t    var pairs = data.__data__;\n\t    if (!_Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {\n\t      pairs.push([key, value]);\n\t      this.size = ++data.size;\n\t      return this;\n\t    }\n\t    data = this.__data__ = new _MapCache(pairs);\n\t  }\n\t  data.set(key, value);\n\t  this.size = data.size;\n\t  return this;\n\t}\n\n\tvar _stackSet = stackSet;\n\n\t/**\n\t * Creates a stack cache object to store key-value pairs.\n\t *\n\t * @private\n\t * @constructor\n\t * @param {Array} [entries] The key-value pairs to cache.\n\t */\n\tfunction Stack(entries) {\n\t  var data = this.__data__ = new _ListCache(entries);\n\t  this.size = data.size;\n\t}\n\n\t// Add methods to `Stack`.\n\tStack.prototype.clear = _stackClear;\n\tStack.prototype['delete'] = _stackDelete;\n\tStack.prototype.get = _stackGet;\n\tStack.prototype.has = _stackHas;\n\tStack.prototype.set = _stackSet;\n\n\tvar _Stack = Stack;\n\n\tvar defineProperty$b = (function() {\n\t  try {\n\t    var func = _getNative(Object, 'defineProperty');\n\t    func({}, '', {});\n\t    return func;\n\t  } catch (e) {}\n\t}());\n\n\tvar _defineProperty$1 = defineProperty$b;\n\n\t/**\n\t * The base implementation of `assignValue` and `assignMergeValue` without\n\t * value checks.\n\t *\n\t * @private\n\t * @param {Object} object The object to modify.\n\t * @param {string} key The key of the property to assign.\n\t * @param {*} value The value to assign.\n\t */\n\tfunction baseAssignValue(object, key, value) {\n\t  if (key == '__proto__' && _defineProperty$1) {\n\t    _defineProperty$1(object, key, {\n\t      'configurable': true,\n\t      'enumerable': true,\n\t      'value': value,\n\t      'writable': true\n\t    });\n\t  } else {\n\t    object[key] = value;\n\t  }\n\t}\n\n\tvar _baseAssignValue = baseAssignValue;\n\n\t/**\n\t * This function is like `assignValue` except that it doesn't assign\n\t * `undefined` values.\n\t *\n\t * @private\n\t * @param {Object} object The object to modify.\n\t * @param {string} key The key of the property to assign.\n\t * @param {*} value The value to assign.\n\t */\n\tfunction assignMergeValue(object, key, value) {\n\t  if ((value !== undefined && !eq_1(object[key], value)) ||\n\t      (value === undefined && !(key in object))) {\n\t    _baseAssignValue(object, key, value);\n\t  }\n\t}\n\n\tvar _assignMergeValue = assignMergeValue;\n\n\t/**\n\t * Creates a base function for methods like `_.forIn` and `_.forOwn`.\n\t *\n\t * @private\n\t * @param {boolean} [fromRight] Specify iterating from right to left.\n\t * @returns {Function} Returns the new base function.\n\t */\n\tfunction createBaseFor(fromRight) {\n\t  return function(object, iteratee, keysFunc) {\n\t    var index = -1,\n\t        iterable = Object(object),\n\t        props = keysFunc(object),\n\t        length = props.length;\n\n\t    while (length--) {\n\t      var key = props[fromRight ? length : ++index];\n\t      if (iteratee(iterable[key], key, iterable) === false) {\n\t        break;\n\t      }\n\t    }\n\t    return object;\n\t  };\n\t}\n\n\tvar _createBaseFor = createBaseFor;\n\n\t/**\n\t * The base implementation of `baseForOwn` which iterates over `object`\n\t * properties returned by `keysFunc` and invokes `iteratee` for each property.\n\t * Iteratee functions may exit iteration early by explicitly returning `false`.\n\t *\n\t * @private\n\t * @param {Object} object The object to iterate over.\n\t * @param {Function} iteratee The function invoked per iteration.\n\t * @param {Function} keysFunc The function to get the keys of `object`.\n\t * @returns {Object} Returns `object`.\n\t */\n\tvar baseFor = _createBaseFor();\n\n\tvar _baseFor = baseFor;\n\n\tvar _cloneBuffer = createCommonjsModule(function (module, exports) {\n\t/** Detect free variable `exports`. */\n\tvar freeExports =  exports && !exports.nodeType && exports;\n\n\t/** Detect free variable `module`. */\n\tvar freeModule = freeExports && 'object' == 'object' && module && !module.nodeType && module;\n\n\t/** Detect the popular CommonJS extension `module.exports`. */\n\tvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n\t/** Built-in value references. */\n\tvar Buffer = moduleExports ? _root.Buffer : undefined,\n\t    allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined;\n\n\t/**\n\t * Creates a clone of  `buffer`.\n\t *\n\t * @private\n\t * @param {Buffer} buffer The buffer to clone.\n\t * @param {boolean} [isDeep] Specify a deep clone.\n\t * @returns {Buffer} Returns the cloned buffer.\n\t */\n\tfunction cloneBuffer(buffer, isDeep) {\n\t  if (isDeep) {\n\t    return buffer.slice();\n\t  }\n\t  var length = buffer.length,\n\t      result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);\n\n\t  buffer.copy(result);\n\t  return result;\n\t}\n\n\tmodule.exports = cloneBuffer;\n\t});\n\n\t/** Built-in value references. */\n\tvar Uint8Array$1 = _root.Uint8Array;\n\n\tvar _Uint8Array = Uint8Array$1;\n\n\t/**\n\t * Creates a clone of `arrayBuffer`.\n\t *\n\t * @private\n\t * @param {ArrayBuffer} arrayBuffer The array buffer to clone.\n\t * @returns {ArrayBuffer} Returns the cloned array buffer.\n\t */\n\tfunction cloneArrayBuffer(arrayBuffer) {\n\t  var result = new arrayBuffer.constructor(arrayBuffer.byteLength);\n\t  new _Uint8Array(result).set(new _Uint8Array(arrayBuffer));\n\t  return result;\n\t}\n\n\tvar _cloneArrayBuffer = cloneArrayBuffer;\n\n\t/**\n\t * Creates a clone of `typedArray`.\n\t *\n\t * @private\n\t * @param {Object} typedArray The typed array to clone.\n\t * @param {boolean} [isDeep] Specify a deep clone.\n\t * @returns {Object} Returns the cloned typed array.\n\t */\n\tfunction cloneTypedArray(typedArray, isDeep) {\n\t  var buffer = isDeep ? _cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;\n\t  return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);\n\t}\n\n\tvar _cloneTypedArray = cloneTypedArray;\n\n\t/**\n\t * Copies the values of `source` to `array`.\n\t *\n\t * @private\n\t * @param {Array} source The array to copy values from.\n\t * @param {Array} [array=[]] The array to copy values to.\n\t * @returns {Array} Returns `array`.\n\t */\n\tfunction copyArray(source, array) {\n\t  var index = -1,\n\t      length = source.length;\n\n\t  array || (array = Array(length));\n\t  while (++index < length) {\n\t    array[index] = source[index];\n\t  }\n\t  return array;\n\t}\n\n\tvar _copyArray = copyArray;\n\n\t/** Built-in value references. */\n\tvar objectCreate$1 = Object.create;\n\n\t/**\n\t * The base implementation of `_.create` without support for assigning\n\t * properties to the created object.\n\t *\n\t * @private\n\t * @param {Object} proto The object to inherit from.\n\t * @returns {Object} Returns the new object.\n\t */\n\tvar baseCreate = (function() {\n\t  function object() {}\n\t  return function(proto) {\n\t    if (!isObject_1(proto)) {\n\t      return {};\n\t    }\n\t    if (objectCreate$1) {\n\t      return objectCreate$1(proto);\n\t    }\n\t    object.prototype = proto;\n\t    var result = new object;\n\t    object.prototype = undefined;\n\t    return result;\n\t  };\n\t}());\n\n\tvar _baseCreate = baseCreate;\n\n\t/**\n\t * Creates a unary function that invokes `func` with its argument transformed.\n\t *\n\t * @private\n\t * @param {Function} func The function to wrap.\n\t * @param {Function} transform The argument transform.\n\t * @returns {Function} Returns the new function.\n\t */\n\tfunction overArg(func, transform) {\n\t  return function(arg) {\n\t    return func(transform(arg));\n\t  };\n\t}\n\n\tvar _overArg = overArg;\n\n\t/** Built-in value references. */\n\tvar getPrototype = _overArg(Object.getPrototypeOf, Object);\n\n\tvar _getPrototype = getPrototype;\n\n\t/** Used for built-in method references. */\n\tvar objectProto$5 = Object.prototype;\n\n\t/**\n\t * Checks if `value` is likely a prototype object.\n\t *\n\t * @private\n\t * @param {*} value The value to check.\n\t * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.\n\t */\n\tfunction isPrototype(value) {\n\t  var Ctor = value && value.constructor,\n\t      proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto$5;\n\n\t  return value === proto;\n\t}\n\n\tvar _isPrototype = isPrototype;\n\n\t/**\n\t * Initializes an object clone.\n\t *\n\t * @private\n\t * @param {Object} object The object to clone.\n\t * @returns {Object} Returns the initialized clone.\n\t */\n\tfunction initCloneObject(object) {\n\t  return (typeof object.constructor == 'function' && !_isPrototype(object))\n\t    ? _baseCreate(_getPrototype(object))\n\t    : {};\n\t}\n\n\tvar _initCloneObject = initCloneObject;\n\n\t/**\n\t * Checks if `value` is object-like. A value is object-like if it's not `null`\n\t * and has a `typeof` result of \"object\".\n\t *\n\t * @static\n\t * @memberOf _\n\t * @since 4.0.0\n\t * @category Lang\n\t * @param {*} value The value to check.\n\t * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n\t * @example\n\t *\n\t * _.isObjectLike({});\n\t * // => true\n\t *\n\t * _.isObjectLike([1, 2, 3]);\n\t * // => true\n\t *\n\t * _.isObjectLike(_.noop);\n\t * // => false\n\t *\n\t * _.isObjectLike(null);\n\t * // => false\n\t */\n\tfunction isObjectLike(value) {\n\t  return value != null && typeof value == 'object';\n\t}\n\n\tvar isObjectLike_1 = isObjectLike;\n\n\t/** `Object#toString` result references. */\n\tvar argsTag = '[object Arguments]';\n\n\t/**\n\t * The base implementation of `_.isArguments`.\n\t *\n\t * @private\n\t * @param {*} value The value to check.\n\t * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n\t */\n\tfunction baseIsArguments(value) {\n\t  return isObjectLike_1(value) && _baseGetTag(value) == argsTag;\n\t}\n\n\tvar _baseIsArguments = baseIsArguments;\n\n\t/** Used for built-in method references. */\n\tvar objectProto$6 = Object.prototype;\n\n\t/** Used to check objects for own properties. */\n\tvar hasOwnProperty$5 = objectProto$6.hasOwnProperty;\n\n\t/** Built-in value references. */\n\tvar propertyIsEnumerable = objectProto$6.propertyIsEnumerable;\n\n\t/**\n\t * Checks if `value` is likely an `arguments` object.\n\t *\n\t * @static\n\t * @memberOf _\n\t * @since 0.1.0\n\t * @category Lang\n\t * @param {*} value The value to check.\n\t * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n\t *  else `false`.\n\t * @example\n\t *\n\t * _.isArguments(function() { return arguments; }());\n\t * // => true\n\t *\n\t * _.isArguments([1, 2, 3]);\n\t * // => false\n\t */\n\tvar isArguments = _baseIsArguments(function() { return arguments; }()) ? _baseIsArguments : function(value) {\n\t  return isObjectLike_1(value) && hasOwnProperty$5.call(value, 'callee') &&\n\t    !propertyIsEnumerable.call(value, 'callee');\n\t};\n\n\tvar isArguments_1 = isArguments;\n\n\t/**\n\t * Checks if `value` is classified as an `Array` object.\n\t *\n\t * @static\n\t * @memberOf _\n\t * @since 0.1.0\n\t * @category Lang\n\t * @param {*} value The value to check.\n\t * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n\t * @example\n\t *\n\t * _.isArray([1, 2, 3]);\n\t * // => true\n\t *\n\t * _.isArray(document.body.children);\n\t * // => false\n\t *\n\t * _.isArray('abc');\n\t * // => false\n\t *\n\t * _.isArray(_.noop);\n\t * // => false\n\t */\n\tvar isArray$1 = Array.isArray;\n\n\tvar isArray_1 = isArray$1;\n\n\t/** Used as references for various `Number` constants. */\n\tvar MAX_SAFE_INTEGER$1 = 9007199254740991;\n\n\t/**\n\t * Checks if `value` is a valid array-like length.\n\t *\n\t * **Note:** This method is loosely based on\n\t * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n\t *\n\t * @static\n\t * @memberOf _\n\t * @since 4.0.0\n\t * @category Lang\n\t * @param {*} value The value to check.\n\t * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n\t * @example\n\t *\n\t * _.isLength(3);\n\t * // => true\n\t *\n\t * _.isLength(Number.MIN_VALUE);\n\t * // => false\n\t *\n\t * _.isLength(Infinity);\n\t * // => false\n\t *\n\t * _.isLength('3');\n\t * // => false\n\t */\n\tfunction isLength(value) {\n\t  return typeof value == 'number' &&\n\t    value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER$1;\n\t}\n\n\tvar isLength_1 = isLength;\n\n\t/**\n\t * Checks if `value` is array-like. A value is considered array-like if it's\n\t * not a function and has a `value.length` that's an integer greater than or\n\t * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\n\t *\n\t * @static\n\t * @memberOf _\n\t * @since 4.0.0\n\t * @category Lang\n\t * @param {*} value The value to check.\n\t * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n\t * @example\n\t *\n\t * _.isArrayLike([1, 2, 3]);\n\t * // => true\n\t *\n\t * _.isArrayLike(document.body.children);\n\t * // => true\n\t *\n\t * _.isArrayLike('abc');\n\t * // => true\n\t *\n\t * _.isArrayLike(_.noop);\n\t * // => false\n\t */\n\tfunction isArrayLike(value) {\n\t  return value != null && isLength_1(value.length) && !isFunction_1(value);\n\t}\n\n\tvar isArrayLike_1 = isArrayLike;\n\n\t/**\n\t * This method is like `_.isArrayLike` except that it also checks if `value`\n\t * is an object.\n\t *\n\t * @static\n\t * @memberOf _\n\t * @since 4.0.0\n\t * @category Lang\n\t * @param {*} value The value to check.\n\t * @returns {boolean} Returns `true` if `value` is an array-like object,\n\t *  else `false`.\n\t * @example\n\t *\n\t * _.isArrayLikeObject([1, 2, 3]);\n\t * // => true\n\t *\n\t * _.isArrayLikeObject(document.body.children);\n\t * // => true\n\t *\n\t * _.isArrayLikeObject('abc');\n\t * // => false\n\t *\n\t * _.isArrayLikeObject(_.noop);\n\t * // => false\n\t */\n\tfunction isArrayLikeObject(value) {\n\t  return isObjectLike_1(value) && isArrayLike_1(value);\n\t}\n\n\tvar isArrayLikeObject_1 = isArrayLikeObject;\n\n\t/**\n\t * This method returns `false`.\n\t *\n\t * @static\n\t * @memberOf _\n\t * @since 4.13.0\n\t * @category Util\n\t * @returns {boolean} Returns `false`.\n\t * @example\n\t *\n\t * _.times(2, _.stubFalse);\n\t * // => [false, false]\n\t */\n\tfunction stubFalse() {\n\t  return false;\n\t}\n\n\tvar stubFalse_1 = stubFalse;\n\n\tvar isBuffer_1 = createCommonjsModule(function (module, exports) {\n\t/** Detect free variable `exports`. */\n\tvar freeExports =  exports && !exports.nodeType && exports;\n\n\t/** Detect free variable `module`. */\n\tvar freeModule = freeExports && 'object' == 'object' && module && !module.nodeType && module;\n\n\t/** Detect the popular CommonJS extension `module.exports`. */\n\tvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n\t/** Built-in value references. */\n\tvar Buffer = moduleExports ? _root.Buffer : undefined;\n\n\t/* Built-in method references for those with the same name as other `lodash` methods. */\n\tvar nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined;\n\n\t/**\n\t * Checks if `value` is a buffer.\n\t *\n\t * @static\n\t * @memberOf _\n\t * @since 4.3.0\n\t * @category Lang\n\t * @param {*} value The value to check.\n\t * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.\n\t * @example\n\t *\n\t * _.isBuffer(new Buffer(2));\n\t * // => true\n\t *\n\t * _.isBuffer(new Uint8Array(2));\n\t * // => false\n\t */\n\tvar isBuffer = nativeIsBuffer || stubFalse_1;\n\n\tmodule.exports = isBuffer;\n\t});\n\n\t/** `Object#toString` result references. */\n\tvar objectTag = '[object Object]';\n\n\t/** Used for built-in method references. */\n\tvar funcProto$2 = Function.prototype,\n\t    objectProto$7 = Object.prototype;\n\n\t/** Used to resolve the decompiled source of functions. */\n\tvar funcToString$2 = funcProto$2.toString;\n\n\t/** Used to check objects for own properties. */\n\tvar hasOwnProperty$6 = objectProto$7.hasOwnProperty;\n\n\t/** Used to infer the `Object` constructor. */\n\tvar objectCtorString = funcToString$2.call(Object);\n\n\t/**\n\t * Checks if `value` is a plain object, that is, an object created by the\n\t * `Object` constructor or one with a `[[Prototype]]` of `null`.\n\t *\n\t * @static\n\t * @memberOf _\n\t * @since 0.8.0\n\t * @category Lang\n\t * @param {*} value The value to check.\n\t * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.\n\t * @example\n\t *\n\t * function Foo() {\n\t *   this.a = 1;\n\t * }\n\t *\n\t * _.isPlainObject(new Foo);\n\t * // => false\n\t *\n\t * _.isPlainObject([1, 2, 3]);\n\t * // => false\n\t *\n\t * _.isPlainObject({ 'x': 0, 'y': 0 });\n\t * // => true\n\t *\n\t * _.isPlainObject(Object.create(null));\n\t * // => true\n\t */\n\tfunction isPlainObject(value) {\n\t  if (!isObjectLike_1(value) || _baseGetTag(value) != objectTag) {\n\t    return false;\n\t  }\n\t  var proto = _getPrototype(value);\n\t  if (proto === null) {\n\t    return true;\n\t  }\n\t  var Ctor = hasOwnProperty$6.call(proto, 'constructor') && proto.constructor;\n\t  return typeof Ctor == 'function' && Ctor instanceof Ctor &&\n\t    funcToString$2.call(Ctor) == objectCtorString;\n\t}\n\n\tvar isPlainObject_1 = isPlainObject;\n\n\t/** `Object#toString` result references. */\n\tvar argsTag$1 = '[object Arguments]',\n\t    arrayTag = '[object Array]',\n\t    boolTag = '[object Boolean]',\n\t    dateTag = '[object Date]',\n\t    errorTag = '[object Error]',\n\t    funcTag$1 = '[object Function]',\n\t    mapTag = '[object Map]',\n\t    numberTag = '[object Number]',\n\t    objectTag$1 = '[object Object]',\n\t    regexpTag = '[object RegExp]',\n\t    setTag = '[object Set]',\n\t    stringTag = '[object String]',\n\t    weakMapTag = '[object WeakMap]';\n\n\tvar arrayBufferTag = '[object ArrayBuffer]',\n\t    dataViewTag = '[object DataView]',\n\t    float32Tag = '[object Float32Array]',\n\t    float64Tag = '[object Float64Array]',\n\t    int8Tag = '[object Int8Array]',\n\t    int16Tag = '[object Int16Array]',\n\t    int32Tag = '[object Int32Array]',\n\t    uint8Tag = '[object Uint8Array]',\n\t    uint8ClampedTag = '[object Uint8ClampedArray]',\n\t    uint16Tag = '[object Uint16Array]',\n\t    uint32Tag = '[object Uint32Array]';\n\n\t/** Used to identify `toStringTag` values of typed arrays. */\n\tvar typedArrayTags = {};\n\ttypedArrayTags[float32Tag] = typedArrayTags[float64Tag] =\n\ttypedArrayTags[int8Tag] = typedArrayTags[int16Tag] =\n\ttypedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =\n\ttypedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =\n\ttypedArrayTags[uint32Tag] = true;\n\ttypedArrayTags[argsTag$1] = typedArrayTags[arrayTag] =\n\ttypedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =\n\ttypedArrayTags[dataViewTag] = typedArrayTags[dateTag] =\n\ttypedArrayTags[errorTag] = typedArrayTags[funcTag$1] =\n\ttypedArrayTags[mapTag] = typedArrayTags[numberTag] =\n\ttypedArrayTags[objectTag$1] = typedArrayTags[regexpTag] =\n\ttypedArrayTags[setTag] = typedArrayTags[stringTag] =\n\ttypedArrayTags[weakMapTag] = false;\n\n\t/**\n\t * The base implementation of `_.isTypedArray` without Node.js optimizations.\n\t *\n\t * @private\n\t * @param {*} value The value to check.\n\t * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n\t */\n\tfunction baseIsTypedArray(value) {\n\t  return isObjectLike_1(value) &&\n\t    isLength_1(value.length) && !!typedArrayTags[_baseGetTag(value)];\n\t}\n\n\tvar _baseIsTypedArray = baseIsTypedArray;\n\n\t/**\n\t * The base implementation of `_.unary` without support for storing metadata.\n\t *\n\t * @private\n\t * @param {Function} func The function to cap arguments for.\n\t * @returns {Function} Returns the new capped function.\n\t */\n\tfunction baseUnary(func) {\n\t  return function(value) {\n\t    return func(value);\n\t  };\n\t}\n\n\tvar _baseUnary = baseUnary;\n\n\tvar _nodeUtil = createCommonjsModule(function (module, exports) {\n\t/** Detect free variable `exports`. */\n\tvar freeExports =  exports && !exports.nodeType && exports;\n\n\t/** Detect free variable `module`. */\n\tvar freeModule = freeExports && 'object' == 'object' && module && !module.nodeType && module;\n\n\t/** Detect the popular CommonJS extension `module.exports`. */\n\tvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n\t/** Detect free variable `process` from Node.js. */\n\tvar freeProcess = moduleExports && _freeGlobal.process;\n\n\t/** Used to access faster Node.js helpers. */\n\tvar nodeUtil = (function() {\n\t  try {\n\t    // Use `util.types` for Node.js 10+.\n\t    var types = freeModule && freeModule.require && freeModule.require('util').types;\n\n\t    if (types) {\n\t      return types;\n\t    }\n\n\t    // Legacy `process.binding('util')` for Node.js < 10.\n\t    return freeProcess && freeProcess.binding && freeProcess.binding('util');\n\t  } catch (e) {}\n\t}());\n\n\tmodule.exports = nodeUtil;\n\t});\n\n\t/* Node.js helper references. */\n\tvar nodeIsTypedArray = _nodeUtil && _nodeUtil.isTypedArray;\n\n\t/**\n\t * Checks if `value` is classified as a typed array.\n\t *\n\t * @static\n\t * @memberOf _\n\t * @since 3.0.0\n\t * @category Lang\n\t * @param {*} value The value to check.\n\t * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n\t * @example\n\t *\n\t * _.isTypedArray(new Uint8Array);\n\t * // => true\n\t *\n\t * _.isTypedArray([]);\n\t * // => false\n\t */\n\tvar isTypedArray = nodeIsTypedArray ? _baseUnary(nodeIsTypedArray) : _baseIsTypedArray;\n\n\tvar isTypedArray_1 = isTypedArray;\n\n\t/**\n\t * Gets the value at `key`, unless `key` is \"__proto__\" or \"constructor\".\n\t *\n\t * @private\n\t * @param {Object} object The object to query.\n\t * @param {string} key The key of the property to get.\n\t * @returns {*} Returns the property value.\n\t */\n\tfunction safeGet(object, key) {\n\t  if (key === 'constructor' && typeof object[key] === 'function') {\n\t    return;\n\t  }\n\n\t  if (key == '__proto__') {\n\t    return;\n\t  }\n\n\t  return object[key];\n\t}\n\n\tvar _safeGet = safeGet;\n\n\t/** Used for built-in method references. */\n\tvar objectProto$8 = Object.prototype;\n\n\t/** Used to check objects for own properties. */\n\tvar hasOwnProperty$7 = objectProto$8.hasOwnProperty;\n\n\t/**\n\t * Assigns `value` to `key` of `object` if the existing value is not equivalent\n\t * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n\t * for equality comparisons.\n\t *\n\t * @private\n\t * @param {Object} object The object to modify.\n\t * @param {string} key The key of the property to assign.\n\t * @param {*} value The value to assign.\n\t */\n\tfunction assignValue(object, key, value) {\n\t  var objValue = object[key];\n\t  if (!(hasOwnProperty$7.call(object, key) && eq_1(objValue, value)) ||\n\t      (value === undefined && !(key in object))) {\n\t    _baseAssignValue(object, key, value);\n\t  }\n\t}\n\n\tvar _assignValue = assignValue;\n\n\t/**\n\t * Copies properties of `source` to `object`.\n\t *\n\t * @private\n\t * @param {Object} source The object to copy properties from.\n\t * @param {Array} props The property identifiers to copy.\n\t * @param {Object} [object={}] The object to copy properties to.\n\t * @param {Function} [customizer] The function to customize copied values.\n\t * @returns {Object} Returns `object`.\n\t */\n\tfunction copyObject(source, props, object, customizer) {\n\t  var isNew = !object;\n\t  object || (object = {});\n\n\t  var index = -1,\n\t      length = props.length;\n\n\t  while (++index < length) {\n\t    var key = props[index];\n\n\t    var newValue = customizer\n\t      ? customizer(object[key], source[key], key, object, source)\n\t      : undefined;\n\n\t    if (newValue === undefined) {\n\t      newValue = source[key];\n\t    }\n\t    if (isNew) {\n\t      _baseAssignValue(object, key, newValue);\n\t    } else {\n\t      _assignValue(object, key, newValue);\n\t    }\n\t  }\n\t  return object;\n\t}\n\n\tvar _copyObject = copyObject;\n\n\t/**\n\t * The base implementation of `_.times` without support for iteratee shorthands\n\t * or max array length checks.\n\t *\n\t * @private\n\t * @param {number} n The number of times to invoke `iteratee`.\n\t * @param {Function} iteratee The function invoked per iteration.\n\t * @returns {Array} Returns the array of results.\n\t */\n\tfunction baseTimes(n, iteratee) {\n\t  var index = -1,\n\t      result = Array(n);\n\n\t  while (++index < n) {\n\t    result[index] = iteratee(index);\n\t  }\n\t  return result;\n\t}\n\n\tvar _baseTimes = baseTimes;\n\n\t/** Used as references for various `Number` constants. */\n\tvar MAX_SAFE_INTEGER$2 = 9007199254740991;\n\n\t/** Used to detect unsigned integer values. */\n\tvar reIsUint = /^(?:0|[1-9]\\d*)$/;\n\n\t/**\n\t * Checks if `value` is a valid array-like index.\n\t *\n\t * @private\n\t * @param {*} value The value to check.\n\t * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n\t * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n\t */\n\tfunction isIndex(value, length) {\n\t  var type = typeof value;\n\t  length = length == null ? MAX_SAFE_INTEGER$2 : length;\n\n\t  return !!length &&\n\t    (type == 'number' ||\n\t      (type != 'symbol' && reIsUint.test(value))) &&\n\t        (value > -1 && value % 1 == 0 && value < length);\n\t}\n\n\tvar _isIndex = isIndex;\n\n\t/** Used for built-in method references. */\n\tvar objectProto$9 = Object.prototype;\n\n\t/** Used to check objects for own properties. */\n\tvar hasOwnProperty$8 = objectProto$9.hasOwnProperty;\n\n\t/**\n\t * Creates an array of the enumerable property names of the array-like `value`.\n\t *\n\t * @private\n\t * @param {*} value The value to query.\n\t * @param {boolean} inherited Specify returning inherited property names.\n\t * @returns {Array} Returns the array of property names.\n\t */\n\tfunction arrayLikeKeys(value, inherited) {\n\t  var isArr = isArray_1(value),\n\t      isArg = !isArr && isArguments_1(value),\n\t      isBuff = !isArr && !isArg && isBuffer_1(value),\n\t      isType = !isArr && !isArg && !isBuff && isTypedArray_1(value),\n\t      skipIndexes = isArr || isArg || isBuff || isType,\n\t      result = skipIndexes ? _baseTimes(value.length, String) : [],\n\t      length = result.length;\n\n\t  for (var key in value) {\n\t    if ((inherited || hasOwnProperty$8.call(value, key)) &&\n\t        !(skipIndexes && (\n\t           // Safari 9 has enumerable `arguments.length` in strict mode.\n\t           key == 'length' ||\n\t           // Node.js 0.10 has enumerable non-index properties on buffers.\n\t           (isBuff && (key == 'offset' || key == 'parent')) ||\n\t           // PhantomJS 2 has enumerable non-index properties on typed arrays.\n\t           (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||\n\t           // Skip index properties.\n\t           _isIndex(key, length)\n\t        ))) {\n\t      result.push(key);\n\t    }\n\t  }\n\t  return result;\n\t}\n\n\tvar _arrayLikeKeys = arrayLikeKeys;\n\n\t/**\n\t * This function is like\n\t * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n\t * except that it includes inherited enumerable properties.\n\t *\n\t * @private\n\t * @param {Object} object The object to query.\n\t * @returns {Array} Returns the array of property names.\n\t */\n\tfunction nativeKeysIn(object) {\n\t  var result = [];\n\t  if (object != null) {\n\t    for (var key in Object(object)) {\n\t      result.push(key);\n\t    }\n\t  }\n\t  return result;\n\t}\n\n\tvar _nativeKeysIn = nativeKeysIn;\n\n\t/** Used for built-in method references. */\n\tvar objectProto$a = Object.prototype;\n\n\t/** Used to check objects for own properties. */\n\tvar hasOwnProperty$9 = objectProto$a.hasOwnProperty;\n\n\t/**\n\t * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.\n\t *\n\t * @private\n\t * @param {Object} object The object to query.\n\t * @returns {Array} Returns the array of property names.\n\t */\n\tfunction baseKeysIn(object) {\n\t  if (!isObject_1(object)) {\n\t    return _nativeKeysIn(object);\n\t  }\n\t  var isProto = _isPrototype(object),\n\t      result = [];\n\n\t  for (var key in object) {\n\t    if (!(key == 'constructor' && (isProto || !hasOwnProperty$9.call(object, key)))) {\n\t      result.push(key);\n\t    }\n\t  }\n\t  return result;\n\t}\n\n\tvar _baseKeysIn = baseKeysIn;\n\n\t/**\n\t * Creates an array of the own and inherited enumerable property names of `object`.\n\t *\n\t * **Note:** Non-object values are coerced to objects.\n\t *\n\t * @static\n\t * @memberOf _\n\t * @since 3.0.0\n\t * @category Object\n\t * @param {Object} object The object to query.\n\t * @returns {Array} Returns the array of property names.\n\t * @example\n\t *\n\t * function Foo() {\n\t *   this.a = 1;\n\t *   this.b = 2;\n\t * }\n\t *\n\t * Foo.prototype.c = 3;\n\t *\n\t * _.keysIn(new Foo);\n\t * // => ['a', 'b', 'c'] (iteration order is not guaranteed)\n\t */\n\tfunction keysIn(object) {\n\t  return isArrayLike_1(object) ? _arrayLikeKeys(object, true) : _baseKeysIn(object);\n\t}\n\n\tvar keysIn_1 = keysIn;\n\n\t/**\n\t * Converts `value` to a plain object flattening inherited enumerable string\n\t * keyed properties of `value` to own properties of the plain object.\n\t *\n\t * @static\n\t * @memberOf _\n\t * @since 3.0.0\n\t * @category Lang\n\t * @param {*} value The value to convert.\n\t * @returns {Object} Returns the converted plain object.\n\t * @example\n\t *\n\t * function Foo() {\n\t *   this.b = 2;\n\t * }\n\t *\n\t * Foo.prototype.c = 3;\n\t *\n\t * _.assign({ 'a': 1 }, new Foo);\n\t * // => { 'a': 1, 'b': 2 }\n\t *\n\t * _.assign({ 'a': 1 }, _.toPlainObject(new Foo));\n\t * // => { 'a': 1, 'b': 2, 'c': 3 }\n\t */\n\tfunction toPlainObject(value) {\n\t  return _copyObject(value, keysIn_1(value));\n\t}\n\n\tvar toPlainObject_1 = toPlainObject;\n\n\t/**\n\t * A specialized version of `baseMerge` for arrays and objects which performs\n\t * deep merges and tracks traversed objects enabling objects with circular\n\t * references to be merged.\n\t *\n\t * @private\n\t * @param {Object} object The destination object.\n\t * @param {Object} source The source object.\n\t * @param {string} key The key of the value to merge.\n\t * @param {number} srcIndex The index of `source`.\n\t * @param {Function} mergeFunc The function to merge values.\n\t * @param {Function} [customizer] The function to customize assigned values.\n\t * @param {Object} [stack] Tracks traversed source values and their merged\n\t *  counterparts.\n\t */\n\tfunction baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) {\n\t  var objValue = _safeGet(object, key),\n\t      srcValue = _safeGet(source, key),\n\t      stacked = stack.get(srcValue);\n\n\t  if (stacked) {\n\t    _assignMergeValue(object, key, stacked);\n\t    return;\n\t  }\n\t  var newValue = customizer\n\t    ? customizer(objValue, srcValue, (key + ''), object, source, stack)\n\t    : undefined;\n\n\t  var isCommon = newValue === undefined;\n\n\t  if (isCommon) {\n\t    var isArr = isArray_1(srcValue),\n\t        isBuff = !isArr && isBuffer_1(srcValue),\n\t        isTyped = !isArr && !isBuff && isTypedArray_1(srcValue);\n\n\t    newValue = srcValue;\n\t    if (isArr || isBuff || isTyped) {\n\t      if (isArray_1(objValue)) {\n\t        newValue = objValue;\n\t      }\n\t      else if (isArrayLikeObject_1(objValue)) {\n\t        newValue = _copyArray(objValue);\n\t      }\n\t      else if (isBuff) {\n\t        isCommon = false;\n\t        newValue = _cloneBuffer(srcValue, true);\n\t      }\n\t      else if (isTyped) {\n\t        isCommon = false;\n\t        newValue = _cloneTypedArray(srcValue, true);\n\t      }\n\t      else {\n\t        newValue = [];\n\t      }\n\t    }\n\t    else if (isPlainObject_1(srcValue) || isArguments_1(srcValue)) {\n\t      newValue = objValue;\n\t      if (isArguments_1(objValue)) {\n\t        newValue = toPlainObject_1(objValue);\n\t      }\n\t      else if (!isObject_1(objValue) || isFunction_1(objValue)) {\n\t        newValue = _initCloneObject(srcValue);\n\t      }\n\t    }\n\t    else {\n\t      isCommon = false;\n\t    }\n\t  }\n\t  if (isCommon) {\n\t    // Recursively merge objects and arrays (susceptible to call stack limits).\n\t    stack.set(srcValue, newValue);\n\t    mergeFunc(newValue, srcValue, srcIndex, customizer, stack);\n\t    stack['delete'](srcValue);\n\t  }\n\t  _assignMergeValue(object, key, newValue);\n\t}\n\n\tvar _baseMergeDeep = baseMergeDeep;\n\n\t/**\n\t * The base implementation of `_.merge` without support for multiple sources.\n\t *\n\t * @private\n\t * @param {Object} object The destination object.\n\t * @param {Object} source The source object.\n\t * @param {number} srcIndex The index of `source`.\n\t * @param {Function} [customizer] The function to customize merged values.\n\t * @param {Object} [stack] Tracks traversed source values and their merged\n\t *  counterparts.\n\t */\n\tfunction baseMerge(object, source, srcIndex, customizer, stack) {\n\t  if (object === source) {\n\t    return;\n\t  }\n\t  _baseFor(source, function(srcValue, key) {\n\t    stack || (stack = new _Stack);\n\t    if (isObject_1(srcValue)) {\n\t      _baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack);\n\t    }\n\t    else {\n\t      var newValue = customizer\n\t        ? customizer(_safeGet(object, key), srcValue, (key + ''), object, source, stack)\n\t        : undefined;\n\n\t      if (newValue === undefined) {\n\t        newValue = srcValue;\n\t      }\n\t      _assignMergeValue(object, key, newValue);\n\t    }\n\t  }, keysIn_1);\n\t}\n\n\tvar _baseMerge = baseMerge;\n\n\t/**\n\t * This method returns the first argument it receives.\n\t *\n\t * @static\n\t * @since 0.1.0\n\t * @memberOf _\n\t * @category Util\n\t * @param {*} value Any value.\n\t * @returns {*} Returns `value`.\n\t * @example\n\t *\n\t * var object = { 'a': 1 };\n\t *\n\t * console.log(_.identity(object) === object);\n\t * // => true\n\t */\n\tfunction identity(value) {\n\t  return value;\n\t}\n\n\tvar identity_1 = identity;\n\n\t/**\n\t * A faster alternative to `Function#apply`, this function invokes `func`\n\t * with the `this` binding of `thisArg` and the arguments of `args`.\n\t *\n\t * @private\n\t * @param {Function} func The function to invoke.\n\t * @param {*} thisArg The `this` binding of `func`.\n\t * @param {Array} args The arguments to invoke `func` with.\n\t * @returns {*} Returns the result of `func`.\n\t */\n\tfunction apply$1(func, thisArg, args) {\n\t  switch (args.length) {\n\t    case 0: return func.call(thisArg);\n\t    case 1: return func.call(thisArg, args[0]);\n\t    case 2: return func.call(thisArg, args[0], args[1]);\n\t    case 3: return func.call(thisArg, args[0], args[1], args[2]);\n\t  }\n\t  return func.apply(thisArg, args);\n\t}\n\n\tvar _apply = apply$1;\n\n\t/* Built-in method references for those with the same name as other `lodash` methods. */\n\tvar nativeMax = Math.max;\n\n\t/**\n\t * A specialized version of `baseRest` which transforms the rest array.\n\t *\n\t * @private\n\t * @param {Function} func The function to apply a rest parameter to.\n\t * @param {number} [start=func.length-1] The start position of the rest parameter.\n\t * @param {Function} transform The rest array transform.\n\t * @returns {Function} Returns the new function.\n\t */\n\tfunction overRest(func, start, transform) {\n\t  start = nativeMax(start === undefined ? (func.length - 1) : start, 0);\n\t  return function() {\n\t    var args = arguments,\n\t        index = -1,\n\t        length = nativeMax(args.length - start, 0),\n\t        array = Array(length);\n\n\t    while (++index < length) {\n\t      array[index] = args[start + index];\n\t    }\n\t    index = -1;\n\t    var otherArgs = Array(start + 1);\n\t    while (++index < start) {\n\t      otherArgs[index] = args[index];\n\t    }\n\t    otherArgs[start] = transform(array);\n\t    return _apply(func, this, otherArgs);\n\t  };\n\t}\n\n\tvar _overRest = overRest;\n\n\t/**\n\t * Creates a function that returns `value`.\n\t *\n\t * @static\n\t * @memberOf _\n\t * @since 2.4.0\n\t * @category Util\n\t * @param {*} value The value to return from the new function.\n\t * @returns {Function} Returns the new constant function.\n\t * @example\n\t *\n\t * var objects = _.times(2, _.constant({ 'a': 1 }));\n\t *\n\t * console.log(objects);\n\t * // => [{ 'a': 1 }, { 'a': 1 }]\n\t *\n\t * console.log(objects[0] === objects[1]);\n\t * // => true\n\t */\n\tfunction constant(value) {\n\t  return function() {\n\t    return value;\n\t  };\n\t}\n\n\tvar constant_1 = constant;\n\n\t/**\n\t * The base implementation of `setToString` without support for hot loop shorting.\n\t *\n\t * @private\n\t * @param {Function} func The function to modify.\n\t * @param {Function} string The `toString` result.\n\t * @returns {Function} Returns `func`.\n\t */\n\tvar baseSetToString = !_defineProperty$1 ? identity_1 : function(func, string) {\n\t  return _defineProperty$1(func, 'toString', {\n\t    'configurable': true,\n\t    'enumerable': false,\n\t    'value': constant_1(string),\n\t    'writable': true\n\t  });\n\t};\n\n\tvar _baseSetToString = baseSetToString;\n\n\t/** Used to detect hot functions by number of calls within a span of milliseconds. */\n\tvar HOT_COUNT = 800,\n\t    HOT_SPAN = 16;\n\n\t/* Built-in method references for those with the same name as other `lodash` methods. */\n\tvar nativeNow = Date.now;\n\n\t/**\n\t * Creates a function that'll short out and invoke `identity` instead\n\t * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN`\n\t * milliseconds.\n\t *\n\t * @private\n\t * @param {Function} func The function to restrict.\n\t * @returns {Function} Returns the new shortable function.\n\t */\n\tfunction shortOut(func) {\n\t  var count = 0,\n\t      lastCalled = 0;\n\n\t  return function() {\n\t    var stamp = nativeNow(),\n\t        remaining = HOT_SPAN - (stamp - lastCalled);\n\n\t    lastCalled = stamp;\n\t    if (remaining > 0) {\n\t      if (++count >= HOT_COUNT) {\n\t        return arguments[0];\n\t      }\n\t    } else {\n\t      count = 0;\n\t    }\n\t    return func.apply(undefined, arguments);\n\t  };\n\t}\n\n\tvar _shortOut = shortOut;\n\n\t/**\n\t * Sets the `toString` method of `func` to return `string`.\n\t *\n\t * @private\n\t * @param {Function} func The function to modify.\n\t * @param {Function} string The `toString` result.\n\t * @returns {Function} Returns `func`.\n\t */\n\tvar setToString = _shortOut(_baseSetToString);\n\n\tvar _setToString = setToString;\n\n\t/**\n\t * The base implementation of `_.rest` which doesn't validate or coerce arguments.\n\t *\n\t * @private\n\t * @param {Function} func The function to apply a rest parameter to.\n\t * @param {number} [start=func.length-1] The start position of the rest parameter.\n\t * @returns {Function} Returns the new function.\n\t */\n\tfunction baseRest(func, start) {\n\t  return _setToString(_overRest(func, start, identity_1), func + '');\n\t}\n\n\tvar _baseRest = baseRest;\n\n\t/**\n\t * Checks if the given arguments are from an iteratee call.\n\t *\n\t * @private\n\t * @param {*} value The potential iteratee value argument.\n\t * @param {*} index The potential iteratee index or key argument.\n\t * @param {*} object The potential iteratee object argument.\n\t * @returns {boolean} Returns `true` if the arguments are from an iteratee call,\n\t *  else `false`.\n\t */\n\tfunction isIterateeCall(value, index, object) {\n\t  if (!isObject_1(object)) {\n\t    return false;\n\t  }\n\t  var type = typeof index;\n\t  if (type == 'number'\n\t        ? (isArrayLike_1(object) && _isIndex(index, object.length))\n\t        : (type == 'string' && index in object)\n\t      ) {\n\t    return eq_1(object[index], value);\n\t  }\n\t  return false;\n\t}\n\n\tvar _isIterateeCall = isIterateeCall;\n\n\t/**\n\t * Creates a function like `_.assign`.\n\t *\n\t * @private\n\t * @param {Function} assigner The function to assign values.\n\t * @returns {Function} Returns the new assigner function.\n\t */\n\tfunction createAssigner(assigner) {\n\t  return _baseRest(function(object, sources) {\n\t    var index = -1,\n\t        length = sources.length,\n\t        customizer = length > 1 ? sources[length - 1] : undefined,\n\t        guard = length > 2 ? sources[2] : undefined;\n\n\t    customizer = (assigner.length > 3 && typeof customizer == 'function')\n\t      ? (length--, customizer)\n\t      : undefined;\n\n\t    if (guard && _isIterateeCall(sources[0], sources[1], guard)) {\n\t      customizer = length < 3 ? undefined : customizer;\n\t      length = 1;\n\t    }\n\t    object = Object(object);\n\t    while (++index < length) {\n\t      var source = sources[index];\n\t      if (source) {\n\t        assigner(object, source, index, customizer);\n\t      }\n\t    }\n\t    return object;\n\t  });\n\t}\n\n\tvar _createAssigner = createAssigner;\n\n\t/**\n\t * This method is like `_.merge` except that it accepts `customizer` which\n\t * is invoked to produce the merged values of the destination and source\n\t * properties. If `customizer` returns `undefined`, merging is handled by the\n\t * method instead. The `customizer` is invoked with six arguments:\n\t * (objValue, srcValue, key, object, source, stack).\n\t *\n\t * **Note:** This method mutates `object`.\n\t *\n\t * @static\n\t * @memberOf _\n\t * @since 4.0.0\n\t * @category Object\n\t * @param {Object} object The destination object.\n\t * @param {...Object} sources The source objects.\n\t * @param {Function} customizer The function to customize assigned values.\n\t * @returns {Object} Returns `object`.\n\t * @example\n\t *\n\t * function customizer(objValue, srcValue) {\n\t *   if (_.isArray(objValue)) {\n\t *     return objValue.concat(srcValue);\n\t *   }\n\t * }\n\t *\n\t * var object = { 'a': [1], 'b': [2] };\n\t * var other = { 'a': [3], 'b': [4] };\n\t *\n\t * _.mergeWith(object, other, customizer);\n\t * // => { 'a': [1, 3], 'b': [2, 4] }\n\t */\n\tvar mergeWith = _createAssigner(function(object, source, srcIndex, customizer) {\n\t  _baseMerge(object, source, srcIndex, customizer);\n\t});\n\n\tvar mergeWith_1 = mergeWith;\n\n\tvar getOwnPropertySymbols$3 = getOwnPropertySymbols$1;\n\n\tvar getOwnPropertySymbols$4 = getOwnPropertySymbols$3;\n\n\tvar getOwnPropertySymbols$5 = getOwnPropertySymbols$4;\n\n\tvar getOwnPropertySymbols$6 = getOwnPropertySymbols$5;\n\n\t/* eslint-disable es-x/no-array-prototype-indexof -- required for testing */\n\n\n\tvar $IndexOf = arrayIncludes.indexOf;\n\n\n\tvar un$IndexOf = functionUncurryThis([].indexOf);\n\n\tvar NEGATIVE_ZERO = !!un$IndexOf && 1 / un$IndexOf([1], 1, -0) < 0;\n\tvar STRICT_METHOD$1 = arrayMethodIsStrict('indexOf');\n\n\t// `Array.prototype.indexOf` method\n\t// https://tc39.es/ecma262/#sec-array.prototype.indexof\n\t_export({ target: 'Array', proto: true, forced: NEGATIVE_ZERO || !STRICT_METHOD$1 }, {\n\t  indexOf: function indexOf(searchElement /* , fromIndex = 0 */) {\n\t    var fromIndex = arguments.length > 1 ? arguments[1] : undefined;\n\t    return NEGATIVE_ZERO\n\t      // convert -0 to +0\n\t      ? un$IndexOf(this, searchElement, fromIndex) || 0\n\t      : $IndexOf(this, searchElement, fromIndex);\n\t  }\n\t});\n\n\tvar indexOf$1 = entryVirtual('Array').indexOf;\n\n\tvar ArrayPrototype$3 = Array.prototype;\n\n\tvar indexOf$2 = function (it) {\n\t  var own = it.indexOf;\n\t  return it === ArrayPrototype$3 || (objectIsPrototypeOf(ArrayPrototype$3, it) && own === ArrayPrototype$3.indexOf) ? indexOf$1 : own;\n\t};\n\n\tvar indexOf$3 = indexOf$2;\n\n\tvar indexOf$4 = indexOf$3;\n\n\tvar indexOf$5 = indexOf$4;\n\n\tvar indexOf$6 = indexOf$5;\n\n\tvar indexOf$7 = indexOf$6;\n\n\tvar keys$4 = keys$2;\n\n\tvar keys$5 = keys$4;\n\n\tvar keys$6 = keys$5;\n\n\tvar keys$7 = keys$6;\n\n\tvar objectWithoutPropertiesLoose = createCommonjsModule(function (module) {\n\tfunction _objectWithoutPropertiesLoose(source, excluded) {\n\t  if (source == null) return {};\n\t  var target = {};\n\n\t  var sourceKeys = keys$7(source);\n\n\t  var key, i;\n\n\t  for (i = 0; i < sourceKeys.length; i++) {\n\t    key = sourceKeys[i];\n\t    if (indexOf$7(excluded).call(excluded, key) >= 0) continue;\n\t    target[key] = source[key];\n\t  }\n\n\t  return target;\n\t}\n\n\tmodule.exports = _objectWithoutPropertiesLoose, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n\t});\n\n\tunwrapExports(objectWithoutPropertiesLoose);\n\n\tvar objectWithoutProperties = createCommonjsModule(function (module) {\n\tfunction _objectWithoutProperties(source, excluded) {\n\t  if (source == null) return {};\n\t  var target = objectWithoutPropertiesLoose(source, excluded);\n\t  var key, i;\n\n\t  if (getOwnPropertySymbols$6) {\n\t    var sourceSymbolKeys = getOwnPropertySymbols$6(source);\n\n\t    for (i = 0; i < sourceSymbolKeys.length; i++) {\n\t      key = sourceSymbolKeys[i];\n\t      if (indexOf$7(excluded).call(excluded, key) >= 0) continue;\n\t      if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;\n\t      target[key] = source[key];\n\t    }\n\t  }\n\n\t  return target;\n\t}\n\n\tmodule.exports = _objectWithoutProperties, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n\t});\n\n\tvar _objectWithoutProperties = unwrapExports(objectWithoutProperties);\n\n\t// eslint-disable-next-line es-x/no-object-assign -- safe\n\tvar $assign = Object.assign;\n\t// eslint-disable-next-line es-x/no-object-defineproperty -- required for testing\n\tvar defineProperty$c = Object.defineProperty;\n\tvar concat$6 = functionUncurryThis([].concat);\n\n\t// `Object.assign` method\n\t// https://tc39.es/ecma262/#sec-object.assign\n\tvar objectAssign = !$assign || fails(function () {\n\t  // should have correct order of operations (Edge bug)\n\t  if (descriptors && $assign({ b: 1 }, $assign(defineProperty$c({}, 'a', {\n\t    enumerable: true,\n\t    get: function () {\n\t      defineProperty$c(this, 'b', {\n\t        value: 3,\n\t        enumerable: false\n\t      });\n\t    }\n\t  }), { b: 2 })).b !== 1) return true;\n\t  // should work with symbols and should have deterministic property order (V8 bug)\n\t  var A = {};\n\t  var B = {};\n\t  // eslint-disable-next-line es-x/no-symbol -- safe\n\t  var symbol = Symbol();\n\t  var alphabet = 'abcdefghijklmnopqrst';\n\t  A[symbol] = 7;\n\t  alphabet.split('').forEach(function (chr) { B[chr] = chr; });\n\t  return $assign({}, A)[symbol] != 7 || objectKeys($assign({}, B)).join('') != alphabet;\n\t}) ? function assign(target, source) { // eslint-disable-line no-unused-vars -- required for `.length`\n\t  var T = toObject(target);\n\t  var argumentsLength = arguments.length;\n\t  var index = 1;\n\t  var getOwnPropertySymbols = objectGetOwnPropertySymbols.f;\n\t  var propertyIsEnumerable = objectPropertyIsEnumerable.f;\n\t  while (argumentsLength > index) {\n\t    var S = indexedObject(arguments[index++]);\n\t    var keys = getOwnPropertySymbols ? concat$6(objectKeys(S), getOwnPropertySymbols(S)) : objectKeys(S);\n\t    var length = keys.length;\n\t    var j = 0;\n\t    var key;\n\t    while (length > j) {\n\t      key = keys[j++];\n\t      if (!descriptors || functionCall(propertyIsEnumerable, S, key)) T[key] = S[key];\n\t    }\n\t  } return T;\n\t} : $assign;\n\n\t// `Object.assign` method\n\t// https://tc39.es/ecma262/#sec-object.assign\n\t// eslint-disable-next-line es-x/no-object-assign -- required for testing\n\t_export({ target: 'Object', stat: true, arity: 2, forced: Object.assign !== objectAssign }, {\n\t  assign: objectAssign\n\t});\n\n\tvar assign = path.Object.assign;\n\n\tvar assign$1 = assign;\n\n\tvar assign$2 = assign$1;\n\n\t// a string of all valid unicode whitespaces\n\tvar whitespaces = '\\u0009\\u000A\\u000B\\u000C\\u000D\\u0020\\u00A0\\u1680\\u2000\\u2001\\u2002' +\n\t  '\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\\uFEFF';\n\n\tvar replace$1 = functionUncurryThis(''.replace);\n\tvar whitespace = '[' + whitespaces + ']';\n\tvar ltrim = RegExp('^' + whitespace + whitespace + '*');\n\tvar rtrim = RegExp(whitespace + whitespace + '*$');\n\n\t// `String.prototype.{ trim, trimStart, trimEnd, trimLeft, trimRight }` methods implementation\n\tvar createMethod$3 = function (TYPE) {\n\t  return function ($this) {\n\t    var string = toString_1(requireObjectCoercible($this));\n\t    if (TYPE & 1) string = replace$1(string, ltrim, '');\n\t    if (TYPE & 2) string = replace$1(string, rtrim, '');\n\t    return string;\n\t  };\n\t};\n\n\tvar stringTrim = {\n\t  // `String.prototype.{ trimLeft, trimStart }` methods\n\t  // https://tc39.es/ecma262/#sec-string.prototype.trimstart\n\t  start: createMethod$3(1),\n\t  // `String.prototype.{ trimRight, trimEnd }` methods\n\t  // https://tc39.es/ecma262/#sec-string.prototype.trimend\n\t  end: createMethod$3(2),\n\t  // `String.prototype.trim` method\n\t  // https://tc39.es/ecma262/#sec-string.prototype.trim\n\t  trim: createMethod$3(3)\n\t};\n\n\tvar PROPER_FUNCTION_NAME$1 = functionName.PROPER;\n\n\n\n\tvar non = '\\u200B\\u0085\\u180E';\n\n\t// check that a method works with the correct list\n\t// of whitespaces and has a correct name\n\tvar stringTrimForced = function (METHOD_NAME) {\n\t  return fails(function () {\n\t    return !!whitespaces[METHOD_NAME]()\n\t      || non[METHOD_NAME]() !== non\n\t      || (PROPER_FUNCTION_NAME$1 && whitespaces[METHOD_NAME].name !== METHOD_NAME);\n\t  });\n\t};\n\n\tvar $trim = stringTrim.trim;\n\n\n\t// `String.prototype.trim` method\n\t// https://tc39.es/ecma262/#sec-string.prototype.trim\n\t_export({ target: 'String', proto: true, forced: stringTrimForced('trim') }, {\n\t  trim: function trim() {\n\t    return $trim(this);\n\t  }\n\t});\n\n\tvar trim = entryVirtual('String').trim;\n\n\tvar StringPrototype = String.prototype;\n\n\tvar trim$1 = function (it) {\n\t  var own = it.trim;\n\t  return typeof it == 'string' || it === StringPrototype\n\t    || (objectIsPrototypeOf(StringPrototype, it) && own === StringPrototype.trim) ? trim : own;\n\t};\n\n\tvar trim$2 = trim$1;\n\n\tvar trim$3 = trim$2;\n\n\tvar iteratorClose = function (iterator, kind, value) {\n\t  var innerResult, innerError;\n\t  anObject(iterator);\n\t  try {\n\t    innerResult = getMethod(iterator, 'return');\n\t    if (!innerResult) {\n\t      if (kind === 'throw') throw value;\n\t      return value;\n\t    }\n\t    innerResult = functionCall(innerResult, iterator);\n\t  } catch (error) {\n\t    innerError = true;\n\t    innerResult = error;\n\t  }\n\t  if (kind === 'throw') throw value;\n\t  if (innerError) throw innerResult;\n\t  anObject(innerResult);\n\t  return value;\n\t};\n\n\t// call something on iterator step with safe closing on error\n\tvar callWithSafeIterationClosing = function (iterator, fn, value, ENTRIES) {\n\t  try {\n\t    return ENTRIES ? fn(anObject(value)[0], value[1]) : fn(value);\n\t  } catch (error) {\n\t    iteratorClose(iterator, 'throw', error);\n\t  }\n\t};\n\n\tvar ITERATOR$2 = wellKnownSymbol('iterator');\n\tvar ArrayPrototype$4 = Array.prototype;\n\n\t// check on default Array iterator\n\tvar isArrayIteratorMethod = function (it) {\n\t  return it !== undefined && (iterators.Array === it || ArrayPrototype$4[ITERATOR$2] === it);\n\t};\n\n\tvar ITERATOR$3 = wellKnownSymbol('iterator');\n\n\tvar getIteratorMethod = function (it) {\n\t  if (it != undefined) return getMethod(it, ITERATOR$3)\n\t    || getMethod(it, '@@iterator')\n\t    || iterators[classof(it)];\n\t};\n\n\tvar TypeError$d = global_1.TypeError;\n\n\tvar getIterator = function (argument, usingIterator) {\n\t  var iteratorMethod = arguments.length < 2 ? getIteratorMethod(argument) : usingIterator;\n\t  if (aCallable(iteratorMethod)) return anObject(functionCall(iteratorMethod, argument));\n\t  throw TypeError$d(tryToString(argument) + ' is not iterable');\n\t};\n\n\tvar Array$3 = global_1.Array;\n\n\t// `Array.from` method implementation\n\t// https://tc39.es/ecma262/#sec-array.from\n\tvar arrayFrom = function from(arrayLike /* , mapfn = undefined, thisArg = undefined */) {\n\t  var O = toObject(arrayLike);\n\t  var IS_CONSTRUCTOR = isConstructor(this);\n\t  var argumentsLength = arguments.length;\n\t  var mapfn = argumentsLength > 1 ? arguments[1] : undefined;\n\t  var mapping = mapfn !== undefined;\n\t  if (mapping) mapfn = functionBindContext(mapfn, argumentsLength > 2 ? arguments[2] : undefined);\n\t  var iteratorMethod = getIteratorMethod(O);\n\t  var index = 0;\n\t  var length, result, step, iterator, next, value;\n\t  // if the target is not iterable or it's an array with the default iterator - use a simple case\n\t  if (iteratorMethod && !(this == Array$3 && isArrayIteratorMethod(iteratorMethod))) {\n\t    iterator = getIterator(O, iteratorMethod);\n\t    next = iterator.next;\n\t    result = IS_CONSTRUCTOR ? new this() : [];\n\t    for (;!(step = functionCall(next, iterator)).done; index++) {\n\t      value = mapping ? callWithSafeIterationClosing(iterator, mapfn, [step.value, index], true) : step.value;\n\t      createProperty(result, index, value);\n\t    }\n\t  } else {\n\t    length = lengthOfArrayLike(O);\n\t    result = IS_CONSTRUCTOR ? new this(length) : Array$3(length);\n\t    for (;length > index; index++) {\n\t      value = mapping ? mapfn(O[index], index) : O[index];\n\t      createProperty(result, index, value);\n\t    }\n\t  }\n\t  result.length = index;\n\t  return result;\n\t};\n\n\tvar ITERATOR$4 = wellKnownSymbol('iterator');\n\tvar SAFE_CLOSING = false;\n\n\ttry {\n\t  var called = 0;\n\t  var iteratorWithReturn = {\n\t    next: function () {\n\t      return { done: !!called++ };\n\t    },\n\t    'return': function () {\n\t      SAFE_CLOSING = true;\n\t    }\n\t  };\n\t  iteratorWithReturn[ITERATOR$4] = function () {\n\t    return this;\n\t  };\n\t  // eslint-disable-next-line es-x/no-array-from, no-throw-literal -- required for testing\n\t  Array.from(iteratorWithReturn, function () { throw 2; });\n\t} catch (error) { /* empty */ }\n\n\tvar checkCorrectnessOfIteration = function (exec, SKIP_CLOSING) {\n\t  if (!SKIP_CLOSING && !SAFE_CLOSING) return false;\n\t  var ITERATION_SUPPORT = false;\n\t  try {\n\t    var object = {};\n\t    object[ITERATOR$4] = function () {\n\t      return {\n\t        next: function () {\n\t          return { done: ITERATION_SUPPORT = true };\n\t        }\n\t      };\n\t    };\n\t    exec(object);\n\t  } catch (error) { /* empty */ }\n\t  return ITERATION_SUPPORT;\n\t};\n\n\tvar INCORRECT_ITERATION = !checkCorrectnessOfIteration(function (iterable) {\n\t  // eslint-disable-next-line es-x/no-array-from -- required for testing\n\t  Array.from(iterable);\n\t});\n\n\t// `Array.from` method\n\t// https://tc39.es/ecma262/#sec-array.from\n\t_export({ target: 'Array', stat: true, forced: INCORRECT_ITERATION }, {\n\t  from: arrayFrom\n\t});\n\n\tvar from_1 = path.Array.from;\n\n\tvar from_1$1 = from_1;\n\n\tvar from_1$2 = from_1$1;\n\n\tvar MATCH = wellKnownSymbol('match');\n\n\t// `IsRegExp` abstract operation\n\t// https://tc39.es/ecma262/#sec-isregexp\n\tvar isRegexp = function (it) {\n\t  var isRegExp;\n\t  return isObject(it) && ((isRegExp = it[MATCH]) !== undefined ? !!isRegExp : classofRaw(it) == 'RegExp');\n\t};\n\n\tvar TypeError$e = global_1.TypeError;\n\n\tvar notARegexp = function (it) {\n\t  if (isRegexp(it)) {\n\t    throw TypeError$e(\"The method doesn't accept regular expressions\");\n\t  } return it;\n\t};\n\n\tvar MATCH$1 = wellKnownSymbol('match');\n\n\tvar correctIsRegexpLogic = function (METHOD_NAME) {\n\t  var regexp = /./;\n\t  try {\n\t    '/./'[METHOD_NAME](regexp);\n\t  } catch (error1) {\n\t    try {\n\t      regexp[MATCH$1] = false;\n\t      return '/./'[METHOD_NAME](regexp);\n\t    } catch (error2) { /* empty */ }\n\t  } return false;\n\t};\n\n\t// eslint-disable-next-line es-x/no-string-prototype-startswith -- safe\n\tvar un$StartsWith = functionUncurryThis(''.startsWith);\n\tvar stringSlice$2 = functionUncurryThis(''.slice);\n\tvar min$2 = Math.min;\n\n\tvar CORRECT_IS_REGEXP_LOGIC = correctIsRegexpLogic('startsWith');\n\n\t// `String.prototype.startsWith` method\n\t// https://tc39.es/ecma262/#sec-string.prototype.startswith\n\t_export({ target: 'String', proto: true, forced:  !CORRECT_IS_REGEXP_LOGIC }, {\n\t  startsWith: function startsWith(searchString /* , position = 0 */) {\n\t    var that = toString_1(requireObjectCoercible(this));\n\t    notARegexp(searchString);\n\t    var index = toLength(min$2(arguments.length > 1 ? arguments[1] : undefined, that.length));\n\t    var search = toString_1(searchString);\n\t    return un$StartsWith\n\t      ? un$StartsWith(that, search, index)\n\t      : stringSlice$2(that, index, index + search.length) === search;\n\t  }\n\t});\n\n\tvar startsWith = entryVirtual('String').startsWith;\n\n\tvar StringPrototype$1 = String.prototype;\n\n\tvar startsWith$1 = function (it) {\n\t  var own = it.startsWith;\n\t  return typeof it == 'string' || it === StringPrototype$1\n\t    || (objectIsPrototypeOf(StringPrototype$1, it) && own === StringPrototype$1.startsWith) ? startsWith : own;\n\t};\n\n\tvar startsWith$2 = startsWith$1;\n\n\tvar startsWith$3 = startsWith$2;\n\n\tvar $find = arrayIteration.find;\n\n\n\tvar FIND = 'find';\n\tvar SKIPS_HOLES = true;\n\n\t// Shouldn't skip holes\n\tif (FIND in []) Array(1)[FIND](function () { SKIPS_HOLES = false; });\n\n\t// `Array.prototype.find` method\n\t// https://tc39.es/ecma262/#sec-array.prototype.find\n\t_export({ target: 'Array', proto: true, forced: SKIPS_HOLES }, {\n\t  find: function find(callbackfn /* , that = undefined */) {\n\t    return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n\t  }\n\t});\n\n\tvar find = entryVirtual('Array').find;\n\n\tvar ArrayPrototype$5 = Array.prototype;\n\n\tvar find$1 = function (it) {\n\t  var own = it.find;\n\t  return it === ArrayPrototype$5 || (objectIsPrototypeOf(ArrayPrototype$5, it) && own === ArrayPrototype$5.find) ? find : own;\n\t};\n\n\tvar find$2 = find$1;\n\n\tvar find$3 = find$2;\n\n\tvar codemirror = createCommonjsModule(function (module, exports) {\n\t// CodeMirror, copyright (c) by Marijn Haverbeke and others\n\t// Distributed under an MIT license: https://codemirror.net/LICENSE\n\n\t// This is CodeMirror (https://codemirror.net), a code editor\n\t// implemented in JavaScript on top of the browser's DOM.\n\t//\n\t// You can find some technical background for some of the code below\n\t// at http://marijnhaverbeke.nl/blog/#cm-internals .\n\n\t(function (global, factory) {\n\t   module.exports = factory() ;\n\t}(commonjsGlobal, (function () {\n\t  // Kludges for bugs and behavior differences that can't be feature\n\t  // detected are enabled based on userAgent etc sniffing.\n\t  var userAgent = navigator.userAgent;\n\t  var platform = navigator.platform;\n\n\t  var gecko = /gecko\\/\\d/i.test(userAgent);\n\t  var ie_upto10 = /MSIE \\d/.test(userAgent);\n\t  var ie_11up = /Trident\\/(?:[7-9]|\\d{2,})\\..*rv:(\\d+)/.exec(userAgent);\n\t  var edge = /Edge\\/(\\d+)/.exec(userAgent);\n\t  var ie = ie_upto10 || ie_11up || edge;\n\t  var ie_version = ie && (ie_upto10 ? document.documentMode || 6 : +(edge || ie_11up)[1]);\n\t  var webkit = !edge && /WebKit\\//.test(userAgent);\n\t  var qtwebkit = webkit && /Qt\\/\\d+\\.\\d+/.test(userAgent);\n\t  var chrome = !edge && /Chrome\\//.test(userAgent);\n\t  var presto = /Opera\\//.test(userAgent);\n\t  var safari = /Apple Computer/.test(navigator.vendor);\n\t  var mac_geMountainLion = /Mac OS X 1\\d\\D([8-9]|\\d\\d)\\D/.test(userAgent);\n\t  var phantom = /PhantomJS/.test(userAgent);\n\n\t  var ios = !edge && /AppleWebKit/.test(userAgent) && /Mobile\\/\\w+/.test(userAgent);\n\t  var android = /Android/.test(userAgent);\n\t  // This is woefully incomplete. Suggestions for alternative methods welcome.\n\t  var mobile = ios || android || /webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(userAgent);\n\t  var mac = ios || /Mac/.test(platform);\n\t  var chromeOS = /\\bCrOS\\b/.test(userAgent);\n\t  var windows = /win/i.test(platform);\n\n\t  var presto_version = presto && userAgent.match(/Version\\/(\\d*\\.\\d*)/);\n\t  if (presto_version) { presto_version = Number(presto_version[1]); }\n\t  if (presto_version && presto_version >= 15) { presto = false; webkit = true; }\n\t  // Some browsers use the wrong event properties to signal cmd/ctrl on OS X\n\t  var flipCtrlCmd = mac && (qtwebkit || presto && (presto_version == null || presto_version < 12.11));\n\t  var captureRightClick = gecko || (ie && ie_version >= 9);\n\n\t  function classTest(cls) { return new RegExp(\"(^|\\\\s)\" + cls + \"(?:$|\\\\s)\\\\s*\") }\n\n\t  var rmClass = function(node, cls) {\n\t    var current = node.className;\n\t    var match = classTest(cls).exec(current);\n\t    if (match) {\n\t      var after = current.slice(match.index + match[0].length);\n\t      node.className = current.slice(0, match.index) + (after ? match[1] + after : \"\");\n\t    }\n\t  };\n\n\t  function removeChildren(e) {\n\t    for (var count = e.childNodes.length; count > 0; --count)\n\t      { e.removeChild(e.firstChild); }\n\t    return e\n\t  }\n\n\t  function removeChildrenAndAdd(parent, e) {\n\t    return removeChildren(parent).appendChild(e)\n\t  }\n\n\t  function elt(tag, content, className, style) {\n\t    var e = document.createElement(tag);\n\t    if (className) { e.className = className; }\n\t    if (style) { e.style.cssText = style; }\n\t    if (typeof content == \"string\") { e.appendChild(document.createTextNode(content)); }\n\t    else if (content) { for (var i = 0; i < content.length; ++i) { e.appendChild(content[i]); } }\n\t    return e\n\t  }\n\t  // wrapper for elt, which removes the elt from the accessibility tree\n\t  function eltP(tag, content, className, style) {\n\t    var e = elt(tag, content, className, style);\n\t    e.setAttribute(\"role\", \"presentation\");\n\t    return e\n\t  }\n\n\t  var range;\n\t  if (document.createRange) { range = function(node, start, end, endNode) {\n\t    var r = document.createRange();\n\t    r.setEnd(endNode || node, end);\n\t    r.setStart(node, start);\n\t    return r\n\t  }; }\n\t  else { range = function(node, start, end) {\n\t    var r = document.body.createTextRange();\n\t    try { r.moveToElementText(node.parentNode); }\n\t    catch(e) { return r }\n\t    r.collapse(true);\n\t    r.moveEnd(\"character\", end);\n\t    r.moveStart(\"character\", start);\n\t    return r\n\t  }; }\n\n\t  function contains(parent, child) {\n\t    if (child.nodeType == 3) // Android browser always returns false when child is a textnode\n\t      { child = child.parentNode; }\n\t    if (parent.contains)\n\t      { return parent.contains(child) }\n\t    do {\n\t      if (child.nodeType == 11) { child = child.host; }\n\t      if (child == parent) { return true }\n\t    } while (child = child.parentNode)\n\t  }\n\n\t  function activeElt() {\n\t    // IE and Edge may throw an \"Unspecified Error\" when accessing document.activeElement.\n\t    // IE < 10 will throw when accessed while the page is loading or in an iframe.\n\t    // IE > 9 and Edge will throw when accessed in an iframe if document.body is unavailable.\n\t    var activeElement;\n\t    try {\n\t      activeElement = document.activeElement;\n\t    } catch(e) {\n\t      activeElement = document.body || null;\n\t    }\n\t    while (activeElement && activeElement.shadowRoot && activeElement.shadowRoot.activeElement)\n\t      { activeElement = activeElement.shadowRoot.activeElement; }\n\t    return activeElement\n\t  }\n\n\t  function addClass(node, cls) {\n\t    var current = node.className;\n\t    if (!classTest(cls).test(current)) { node.className += (current ? \" \" : \"\") + cls; }\n\t  }\n\t  function joinClasses(a, b) {\n\t    var as = a.split(\" \");\n\t    for (var i = 0; i < as.length; i++)\n\t      { if (as[i] && !classTest(as[i]).test(b)) { b += \" \" + as[i]; } }\n\t    return b\n\t  }\n\n\t  var selectInput = function(node) { node.select(); };\n\t  if (ios) // Mobile Safari apparently has a bug where select() is broken.\n\t    { selectInput = function(node) { node.selectionStart = 0; node.selectionEnd = node.value.length; }; }\n\t  else if (ie) // Suppress mysterious IE10 errors\n\t    { selectInput = function(node) { try { node.select(); } catch(_e) {} }; }\n\n\t  function bind(f) {\n\t    var args = Array.prototype.slice.call(arguments, 1);\n\t    return function(){return f.apply(null, args)}\n\t  }\n\n\t  function copyObj(obj, target, overwrite) {\n\t    if (!target) { target = {}; }\n\t    for (var prop in obj)\n\t      { if (obj.hasOwnProperty(prop) && (overwrite !== false || !target.hasOwnProperty(prop)))\n\t        { target[prop] = obj[prop]; } }\n\t    return target\n\t  }\n\n\t  // Counts the column offset in a string, taking tabs into account.\n\t  // Used mostly to find indentation.\n\t  function countColumn(string, end, tabSize, startIndex, startValue) {\n\t    if (end == null) {\n\t      end = string.search(/[^\\s\\u00a0]/);\n\t      if (end == -1) { end = string.length; }\n\t    }\n\t    for (var i = startIndex || 0, n = startValue || 0;;) {\n\t      var nextTab = string.indexOf(\"\\t\", i);\n\t      if (nextTab < 0 || nextTab >= end)\n\t        { return n + (end - i) }\n\t      n += nextTab - i;\n\t      n += tabSize - (n % tabSize);\n\t      i = nextTab + 1;\n\t    }\n\t  }\n\n\t  var Delayed = function() {\n\t    this.id = null;\n\t    this.f = null;\n\t    this.time = 0;\n\t    this.handler = bind(this.onTimeout, this);\n\t  };\n\t  Delayed.prototype.onTimeout = function (self) {\n\t    self.id = 0;\n\t    if (self.time <= +new Date) {\n\t      self.f();\n\t    } else {\n\t      setTimeout(self.handler, self.time - +new Date);\n\t    }\n\t  };\n\t  Delayed.prototype.set = function (ms, f) {\n\t    this.f = f;\n\t    var time = +new Date + ms;\n\t    if (!this.id || time < this.time) {\n\t      clearTimeout(this.id);\n\t      this.id = setTimeout(this.handler, ms);\n\t      this.time = time;\n\t    }\n\t  };\n\n\t  function indexOf(array, elt) {\n\t    for (var i = 0; i < array.length; ++i)\n\t      { if (array[i] == elt) { return i } }\n\t    return -1\n\t  }\n\n\t  // Number of pixels added to scroller and sizer to hide scrollbar\n\t  var scrollerGap = 50;\n\n\t  // Returned or thrown by various protocols to signal 'I'm not\n\t  // handling this'.\n\t  var Pass = {toString: function(){return \"CodeMirror.Pass\"}};\n\n\t  // Reused option objects for setSelection & friends\n\t  var sel_dontScroll = {scroll: false}, sel_mouse = {origin: \"*mouse\"}, sel_move = {origin: \"+move\"};\n\n\t  // The inverse of countColumn -- find the offset that corresponds to\n\t  // a particular column.\n\t  function findColumn(string, goal, tabSize) {\n\t    for (var pos = 0, col = 0;;) {\n\t      var nextTab = string.indexOf(\"\\t\", pos);\n\t      if (nextTab == -1) { nextTab = string.length; }\n\t      var skipped = nextTab - pos;\n\t      if (nextTab == string.length || col + skipped >= goal)\n\t        { return pos + Math.min(skipped, goal - col) }\n\t      col += nextTab - pos;\n\t      col += tabSize - (col % tabSize);\n\t      pos = nextTab + 1;\n\t      if (col >= goal) { return pos }\n\t    }\n\t  }\n\n\t  var spaceStrs = [\"\"];\n\t  function spaceStr(n) {\n\t    while (spaceStrs.length <= n)\n\t      { spaceStrs.push(lst(spaceStrs) + \" \"); }\n\t    return spaceStrs[n]\n\t  }\n\n\t  function lst(arr) { return arr[arr.length-1] }\n\n\t  function map(array, f) {\n\t    var out = [];\n\t    for (var i = 0; i < array.length; i++) { out[i] = f(array[i], i); }\n\t    return out\n\t  }\n\n\t  function insertSorted(array, value, score) {\n\t    var pos = 0, priority = score(value);\n\t    while (pos < array.length && score(array[pos]) <= priority) { pos++; }\n\t    array.splice(pos, 0, value);\n\t  }\n\n\t  function nothing() {}\n\n\t  function createObj(base, props) {\n\t    var inst;\n\t    if (Object.create) {\n\t      inst = Object.create(base);\n\t    } else {\n\t      nothing.prototype = base;\n\t      inst = new nothing();\n\t    }\n\t    if (props) { copyObj(props, inst); }\n\t    return inst\n\t  }\n\n\t  var nonASCIISingleCaseWordChar = /[\\u00df\\u0587\\u0590-\\u05f4\\u0600-\\u06ff\\u3040-\\u309f\\u30a0-\\u30ff\\u3400-\\u4db5\\u4e00-\\u9fcc\\uac00-\\ud7af]/;\n\t  function isWordCharBasic(ch) {\n\t    return /\\w/.test(ch) || ch > \"\\x80\" &&\n\t      (ch.toUpperCase() != ch.toLowerCase() || nonASCIISingleCaseWordChar.test(ch))\n\t  }\n\t  function isWordChar(ch, helper) {\n\t    if (!helper) { return isWordCharBasic(ch) }\n\t    if (helper.source.indexOf(\"\\\\w\") > -1 && isWordCharBasic(ch)) { return true }\n\t    return helper.test(ch)\n\t  }\n\n\t  function isEmpty(obj) {\n\t    for (var n in obj) { if (obj.hasOwnProperty(n) && obj[n]) { return false } }\n\t    return true\n\t  }\n\n\t  // Extending unicode characters. A series of a non-extending char +\n\t  // any number of extending chars is treated as a single unit as far\n\t  // as editing and measuring is concerned. This is not fully correct,\n\t  // since some scripts/fonts/browsers also treat other configurations\n\t  // of code points as a group.\n\t  var extendingChars = /[\\u0300-\\u036f\\u0483-\\u0489\\u0591-\\u05bd\\u05bf\\u05c1\\u05c2\\u05c4\\u05c5\\u05c7\\u0610-\\u061a\\u064b-\\u065e\\u0670\\u06d6-\\u06dc\\u06de-\\u06e4\\u06e7\\u06e8\\u06ea-\\u06ed\\u0711\\u0730-\\u074a\\u07a6-\\u07b0\\u07eb-\\u07f3\\u0816-\\u0819\\u081b-\\u0823\\u0825-\\u0827\\u0829-\\u082d\\u0900-\\u0902\\u093c\\u0941-\\u0948\\u094d\\u0951-\\u0955\\u0962\\u0963\\u0981\\u09bc\\u09be\\u09c1-\\u09c4\\u09cd\\u09d7\\u09e2\\u09e3\\u0a01\\u0a02\\u0a3c\\u0a41\\u0a42\\u0a47\\u0a48\\u0a4b-\\u0a4d\\u0a51\\u0a70\\u0a71\\u0a75\\u0a81\\u0a82\\u0abc\\u0ac1-\\u0ac5\\u0ac7\\u0ac8\\u0acd\\u0ae2\\u0ae3\\u0b01\\u0b3c\\u0b3e\\u0b3f\\u0b41-\\u0b44\\u0b4d\\u0b56\\u0b57\\u0b62\\u0b63\\u0b82\\u0bbe\\u0bc0\\u0bcd\\u0bd7\\u0c3e-\\u0c40\\u0c46-\\u0c48\\u0c4a-\\u0c4d\\u0c55\\u0c56\\u0c62\\u0c63\\u0cbc\\u0cbf\\u0cc2\\u0cc6\\u0ccc\\u0ccd\\u0cd5\\u0cd6\\u0ce2\\u0ce3\\u0d3e\\u0d41-\\u0d44\\u0d4d\\u0d57\\u0d62\\u0d63\\u0dca\\u0dcf\\u0dd2-\\u0dd4\\u0dd6\\u0ddf\\u0e31\\u0e34-\\u0e3a\\u0e47-\\u0e4e\\u0eb1\\u0eb4-\\u0eb9\\u0ebb\\u0ebc\\u0ec8-\\u0ecd\\u0f18\\u0f19\\u0f35\\u0f37\\u0f39\\u0f71-\\u0f7e\\u0f80-\\u0f84\\u0f86\\u0f87\\u0f90-\\u0f97\\u0f99-\\u0fbc\\u0fc6\\u102d-\\u1030\\u1032-\\u1037\\u1039\\u103a\\u103d\\u103e\\u1058\\u1059\\u105e-\\u1060\\u1071-\\u1074\\u1082\\u1085\\u1086\\u108d\\u109d\\u135f\\u1712-\\u1714\\u1732-\\u1734\\u1752\\u1753\\u1772\\u1773\\u17b7-\\u17bd\\u17c6\\u17c9-\\u17d3\\u17dd\\u180b-\\u180d\\u18a9\\u1920-\\u1922\\u1927\\u1928\\u1932\\u1939-\\u193b\\u1a17\\u1a18\\u1a56\\u1a58-\\u1a5e\\u1a60\\u1a62\\u1a65-\\u1a6c\\u1a73-\\u1a7c\\u1a7f\\u1b00-\\u1b03\\u1b34\\u1b36-\\u1b3a\\u1b3c\\u1b42\\u1b6b-\\u1b73\\u1b80\\u1b81\\u1ba2-\\u1ba5\\u1ba8\\u1ba9\\u1c2c-\\u1c33\\u1c36\\u1c37\\u1cd0-\\u1cd2\\u1cd4-\\u1ce0\\u1ce2-\\u1ce8\\u1ced\\u1dc0-\\u1de6\\u1dfd-\\u1dff\\u200c\\u200d\\u20d0-\\u20f0\\u2cef-\\u2cf1\\u2de0-\\u2dff\\u302a-\\u302f\\u3099\\u309a\\ua66f-\\ua672\\ua67c\\ua67d\\ua6f0\\ua6f1\\ua802\\ua806\\ua80b\\ua825\\ua826\\ua8c4\\ua8e0-\\ua8f1\\ua926-\\ua92d\\ua947-\\ua951\\ua980-\\ua982\\ua9b3\\ua9b6-\\ua9b9\\ua9bc\\uaa29-\\uaa2e\\uaa31\\uaa32\\uaa35\\uaa36\\uaa43\\uaa4c\\uaab0\\uaab2-\\uaab4\\uaab7\\uaab8\\uaabe\\uaabf\\uaac1\\uabe5\\uabe8\\uabed\\udc00-\\udfff\\ufb1e\\ufe00-\\ufe0f\\ufe20-\\ufe26\\uff9e\\uff9f]/;\n\t  function isExtendingChar(ch) { return ch.charCodeAt(0) >= 768 && extendingChars.test(ch) }\n\n\t  // Returns a number from the range [`0`; `str.length`] unless `pos` is outside that range.\n\t  function skipExtendingChars(str, pos, dir) {\n\t    while ((dir < 0 ? pos > 0 : pos < str.length) && isExtendingChar(str.charAt(pos))) { pos += dir; }\n\t    return pos\n\t  }\n\n\t  // Returns the value from the range [`from`; `to`] that satisfies\n\t  // `pred` and is closest to `from`. Assumes that at least `to`\n\t  // satisfies `pred`. Supports `from` being greater than `to`.\n\t  function findFirst(pred, from, to) {\n\t    // At any point we are certain `to` satisfies `pred`, don't know\n\t    // whether `from` does.\n\t    var dir = from > to ? -1 : 1;\n\t    for (;;) {\n\t      if (from == to) { return from }\n\t      var midF = (from + to) / 2, mid = dir < 0 ? Math.ceil(midF) : Math.floor(midF);\n\t      if (mid == from) { return pred(mid) ? from : to }\n\t      if (pred(mid)) { to = mid; }\n\t      else { from = mid + dir; }\n\t    }\n\t  }\n\n\t  // BIDI HELPERS\n\n\t  function iterateBidiSections(order, from, to, f) {\n\t    if (!order) { return f(from, to, \"ltr\", 0) }\n\t    var found = false;\n\t    for (var i = 0; i < order.length; ++i) {\n\t      var part = order[i];\n\t      if (part.from < to && part.to > from || from == to && part.to == from) {\n\t        f(Math.max(part.from, from), Math.min(part.to, to), part.level == 1 ? \"rtl\" : \"ltr\", i);\n\t        found = true;\n\t      }\n\t    }\n\t    if (!found) { f(from, to, \"ltr\"); }\n\t  }\n\n\t  var bidiOther = null;\n\t  function getBidiPartAt(order, ch, sticky) {\n\t    var found;\n\t    bidiOther = null;\n\t    for (var i = 0; i < order.length; ++i) {\n\t      var cur = order[i];\n\t      if (cur.from < ch && cur.to > ch) { return i }\n\t      if (cur.to == ch) {\n\t        if (cur.from != cur.to && sticky == \"before\") { found = i; }\n\t        else { bidiOther = i; }\n\t      }\n\t      if (cur.from == ch) {\n\t        if (cur.from != cur.to && sticky != \"before\") { found = i; }\n\t        else { bidiOther = i; }\n\t      }\n\t    }\n\t    return found != null ? found : bidiOther\n\t  }\n\n\t  // Bidirectional ordering algorithm\n\t  // See http://unicode.org/reports/tr9/tr9-13.html for the algorithm\n\t  // that this (partially) implements.\n\n\t  // One-char codes used for character types:\n\t  // L (L):   Left-to-Right\n\t  // R (R):   Right-to-Left\n\t  // r (AL):  Right-to-Left Arabic\n\t  // 1 (EN):  European Number\n\t  // + (ES):  European Number Separator\n\t  // % (ET):  European Number Terminator\n\t  // n (AN):  Arabic Number\n\t  // , (CS):  Common Number Separator\n\t  // m (NSM): Non-Spacing Mark\n\t  // b (BN):  Boundary Neutral\n\t  // s (B):   Paragraph Separator\n\t  // t (S):   Segment Separator\n\t  // w (WS):  Whitespace\n\t  // N (ON):  Other Neutrals\n\n\t  // Returns null if characters are ordered as they appear\n\t  // (left-to-right), or an array of sections ({from, to, level}\n\t  // objects) in the order in which they occur visually.\n\t  var bidiOrdering = (function() {\n\t    // Character types for codepoints 0 to 0xff\n\t    var lowTypes = \"bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN\";\n\t    // Character types for codepoints 0x600 to 0x6f9\n\t    var arabicTypes = \"nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111\";\n\t    function charType(code) {\n\t      if (code <= 0xf7) { return lowTypes.charAt(code) }\n\t      else if (0x590 <= code && code <= 0x5f4) { return \"R\" }\n\t      else if (0x600 <= code && code <= 0x6f9) { return arabicTypes.charAt(code - 0x600) }\n\t      else if (0x6ee <= code && code <= 0x8ac) { return \"r\" }\n\t      else if (0x2000 <= code && code <= 0x200b) { return \"w\" }\n\t      else if (code == 0x200c) { return \"b\" }\n\t      else { return \"L\" }\n\t    }\n\n\t    var bidiRE = /[\\u0590-\\u05f4\\u0600-\\u06ff\\u0700-\\u08ac]/;\n\t    var isNeutral = /[stwN]/, isStrong = /[LRr]/, countsAsLeft = /[Lb1n]/, countsAsNum = /[1n]/;\n\n\t    function BidiSpan(level, from, to) {\n\t      this.level = level;\n\t      this.from = from; this.to = to;\n\t    }\n\n\t    return function(str, direction) {\n\t      var outerType = direction == \"ltr\" ? \"L\" : \"R\";\n\n\t      if (str.length == 0 || direction == \"ltr\" && !bidiRE.test(str)) { return false }\n\t      var len = str.length, types = [];\n\t      for (var i = 0; i < len; ++i)\n\t        { types.push(charType(str.charCodeAt(i))); }\n\n\t      // W1. Examine each non-spacing mark (NSM) in the level run, and\n\t      // change the type of the NSM to the type of the previous\n\t      // character. If the NSM is at the start of the level run, it will\n\t      // get the type of sor.\n\t      for (var i$1 = 0, prev = outerType; i$1 < len; ++i$1) {\n\t        var type = types[i$1];\n\t        if (type == \"m\") { types[i$1] = prev; }\n\t        else { prev = type; }\n\t      }\n\n\t      // W2. Search backwards from each instance of a European number\n\t      // until the first strong type (R, L, AL, or sor) is found. If an\n\t      // AL is found, change the type of the European number to Arabic\n\t      // number.\n\t      // W3. Change all ALs to R.\n\t      for (var i$2 = 0, cur = outerType; i$2 < len; ++i$2) {\n\t        var type$1 = types[i$2];\n\t        if (type$1 == \"1\" && cur == \"r\") { types[i$2] = \"n\"; }\n\t        else if (isStrong.test(type$1)) { cur = type$1; if (type$1 == \"r\") { types[i$2] = \"R\"; } }\n\t      }\n\n\t      // W4. A single European separator between two European numbers\n\t      // changes to a European number. A single common separator between\n\t      // two numbers of the same type changes to that type.\n\t      for (var i$3 = 1, prev$1 = types[0]; i$3 < len - 1; ++i$3) {\n\t        var type$2 = types[i$3];\n\t        if (type$2 == \"+\" && prev$1 == \"1\" && types[i$3+1] == \"1\") { types[i$3] = \"1\"; }\n\t        else if (type$2 == \",\" && prev$1 == types[i$3+1] &&\n\t                 (prev$1 == \"1\" || prev$1 == \"n\")) { types[i$3] = prev$1; }\n\t        prev$1 = type$2;\n\t      }\n\n\t      // W5. A sequence of European terminators adjacent to European\n\t      // numbers changes to all European numbers.\n\t      // W6. Otherwise, separators and terminators change to Other\n\t      // Neutral.\n\t      for (var i$4 = 0; i$4 < len; ++i$4) {\n\t        var type$3 = types[i$4];\n\t        if (type$3 == \",\") { types[i$4] = \"N\"; }\n\t        else if (type$3 == \"%\") {\n\t          var end = (void 0);\n\t          for (end = i$4 + 1; end < len && types[end] == \"%\"; ++end) {}\n\t          var replace = (i$4 && types[i$4-1] == \"!\") || (end < len && types[end] == \"1\") ? \"1\" : \"N\";\n\t          for (var j = i$4; j < end; ++j) { types[j] = replace; }\n\t          i$4 = end - 1;\n\t        }\n\t      }\n\n\t      // W7. Search backwards from each instance of a European number\n\t      // until the first strong type (R, L, or sor) is found. If an L is\n\t      // found, then change the type of the European number to L.\n\t      for (var i$5 = 0, cur$1 = outerType; i$5 < len; ++i$5) {\n\t        var type$4 = types[i$5];\n\t        if (cur$1 == \"L\" && type$4 == \"1\") { types[i$5] = \"L\"; }\n\t        else if (isStrong.test(type$4)) { cur$1 = type$4; }\n\t      }\n\n\t      // N1. A sequence of neutrals takes the direction of the\n\t      // surrounding strong text if the text on both sides has the same\n\t      // direction. European and Arabic numbers act as if they were R in\n\t      // terms of their influence on neutrals. Start-of-level-run (sor)\n\t      // and end-of-level-run (eor) are used at level run boundaries.\n\t      // N2. Any remaining neutrals take the embedding direction.\n\t      for (var i$6 = 0; i$6 < len; ++i$6) {\n\t        if (isNeutral.test(types[i$6])) {\n\t          var end$1 = (void 0);\n\t          for (end$1 = i$6 + 1; end$1 < len && isNeutral.test(types[end$1]); ++end$1) {}\n\t          var before = (i$6 ? types[i$6-1] : outerType) == \"L\";\n\t          var after = (end$1 < len ? types[end$1] : outerType) == \"L\";\n\t          var replace$1 = before == after ? (before ? \"L\" : \"R\") : outerType;\n\t          for (var j$1 = i$6; j$1 < end$1; ++j$1) { types[j$1] = replace$1; }\n\t          i$6 = end$1 - 1;\n\t        }\n\t      }\n\n\t      // Here we depart from the documented algorithm, in order to avoid\n\t      // building up an actual levels array. Since there are only three\n\t      // levels (0, 1, 2) in an implementation that doesn't take\n\t      // explicit embedding into account, we can build up the order on\n\t      // the fly, without following the level-based algorithm.\n\t      var order = [], m;\n\t      for (var i$7 = 0; i$7 < len;) {\n\t        if (countsAsLeft.test(types[i$7])) {\n\t          var start = i$7;\n\t          for (++i$7; i$7 < len && countsAsLeft.test(types[i$7]); ++i$7) {}\n\t          order.push(new BidiSpan(0, start, i$7));\n\t        } else {\n\t          var pos = i$7, at = order.length, isRTL = direction == \"rtl\" ? 1 : 0;\n\t          for (++i$7; i$7 < len && types[i$7] != \"L\"; ++i$7) {}\n\t          for (var j$2 = pos; j$2 < i$7;) {\n\t            if (countsAsNum.test(types[j$2])) {\n\t              if (pos < j$2) { order.splice(at, 0, new BidiSpan(1, pos, j$2)); at += isRTL; }\n\t              var nstart = j$2;\n\t              for (++j$2; j$2 < i$7 && countsAsNum.test(types[j$2]); ++j$2) {}\n\t              order.splice(at, 0, new BidiSpan(2, nstart, j$2));\n\t              at += isRTL;\n\t              pos = j$2;\n\t            } else { ++j$2; }\n\t          }\n\t          if (pos < i$7) { order.splice(at, 0, new BidiSpan(1, pos, i$7)); }\n\t        }\n\t      }\n\t      if (direction == \"ltr\") {\n\t        if (order[0].level == 1 && (m = str.match(/^\\s+/))) {\n\t          order[0].from = m[0].length;\n\t          order.unshift(new BidiSpan(0, 0, m[0].length));\n\t        }\n\t        if (lst(order).level == 1 && (m = str.match(/\\s+$/))) {\n\t          lst(order).to -= m[0].length;\n\t          order.push(new BidiSpan(0, len - m[0].length, len));\n\t        }\n\t      }\n\n\t      return direction == \"rtl\" ? order.reverse() : order\n\t    }\n\t  })();\n\n\t  // Get the bidi ordering for the given line (and cache it). Returns\n\t  // false for lines that are fully left-to-right, and an array of\n\t  // BidiSpan objects otherwise.\n\t  function getOrder(line, direction) {\n\t    var order = line.order;\n\t    if (order == null) { order = line.order = bidiOrdering(line.text, direction); }\n\t    return order\n\t  }\n\n\t  // EVENT HANDLING\n\n\t  // Lightweight event framework. on/off also work on DOM nodes,\n\t  // registering native DOM handlers.\n\n\t  var noHandlers = [];\n\n\t  var on = function(emitter, type, f) {\n\t    if (emitter.addEventListener) {\n\t      emitter.addEventListener(type, f, false);\n\t    } else if (emitter.attachEvent) {\n\t      emitter.attachEvent(\"on\" + type, f);\n\t    } else {\n\t      var map = emitter._handlers || (emitter._handlers = {});\n\t      map[type] = (map[type] || noHandlers).concat(f);\n\t    }\n\t  };\n\n\t  function getHandlers(emitter, type) {\n\t    return emitter._handlers && emitter._handlers[type] || noHandlers\n\t  }\n\n\t  function off(emitter, type, f) {\n\t    if (emitter.removeEventListener) {\n\t      emitter.removeEventListener(type, f, false);\n\t    } else if (emitter.detachEvent) {\n\t      emitter.detachEvent(\"on\" + type, f);\n\t    } else {\n\t      var map = emitter._handlers, arr = map && map[type];\n\t      if (arr) {\n\t        var index = indexOf(arr, f);\n\t        if (index > -1)\n\t          { map[type] = arr.slice(0, index).concat(arr.slice(index + 1)); }\n\t      }\n\t    }\n\t  }\n\n\t  function signal(emitter, type /*, values...*/) {\n\t    var handlers = getHandlers(emitter, type);\n\t    if (!handlers.length) { return }\n\t    var args = Array.prototype.slice.call(arguments, 2);\n\t    for (var i = 0; i < handlers.length; ++i) { handlers[i].apply(null, args); }\n\t  }\n\n\t  // The DOM events that CodeMirror handles can be overridden by\n\t  // registering a (non-DOM) handler on the editor for the event name,\n\t  // and preventDefault-ing the event in that handler.\n\t  function signalDOMEvent(cm, e, override) {\n\t    if (typeof e == \"string\")\n\t      { e = {type: e, preventDefault: function() { this.defaultPrevented = true; }}; }\n\t    signal(cm, override || e.type, cm, e);\n\t    return e_defaultPrevented(e) || e.codemirrorIgnore\n\t  }\n\n\t  function signalCursorActivity(cm) {\n\t    var arr = cm._handlers && cm._handlers.cursorActivity;\n\t    if (!arr) { return }\n\t    var set = cm.curOp.cursorActivityHandlers || (cm.curOp.cursorActivityHandlers = []);\n\t    for (var i = 0; i < arr.length; ++i) { if (indexOf(set, arr[i]) == -1)\n\t      { set.push(arr[i]); } }\n\t  }\n\n\t  function hasHandler(emitter, type) {\n\t    return getHandlers(emitter, type).length > 0\n\t  }\n\n\t  // Add on and off methods to a constructor's prototype, to make\n\t  // registering events on such objects more convenient.\n\t  function eventMixin(ctor) {\n\t    ctor.prototype.on = function(type, f) {on(this, type, f);};\n\t    ctor.prototype.off = function(type, f) {off(this, type, f);};\n\t  }\n\n\t  // Due to the fact that we still support jurassic IE versions, some\n\t  // compatibility wrappers are needed.\n\n\t  function e_preventDefault(e) {\n\t    if (e.preventDefault) { e.preventDefault(); }\n\t    else { e.returnValue = false; }\n\t  }\n\t  function e_stopPropagation(e) {\n\t    if (e.stopPropagation) { e.stopPropagation(); }\n\t    else { e.cancelBubble = true; }\n\t  }\n\t  function e_defaultPrevented(e) {\n\t    return e.defaultPrevented != null ? e.defaultPrevented : e.returnValue == false\n\t  }\n\t  function e_stop(e) {e_preventDefault(e); e_stopPropagation(e);}\n\n\t  function e_target(e) {return e.target || e.srcElement}\n\t  function e_button(e) {\n\t    var b = e.which;\n\t    if (b == null) {\n\t      if (e.button & 1) { b = 1; }\n\t      else if (e.button & 2) { b = 3; }\n\t      else if (e.button & 4) { b = 2; }\n\t    }\n\t    if (mac && e.ctrlKey && b == 1) { b = 3; }\n\t    return b\n\t  }\n\n\t  // Detect drag-and-drop\n\t  var dragAndDrop = function() {\n\t    // There is *some* kind of drag-and-drop support in IE6-8, but I\n\t    // couldn't get it to work yet.\n\t    if (ie && ie_version < 9) { return false }\n\t    var div = elt('div');\n\t    return \"draggable\" in div || \"dragDrop\" in div\n\t  }();\n\n\t  var zwspSupported;\n\t  function zeroWidthElement(measure) {\n\t    if (zwspSupported == null) {\n\t      var test = elt(\"span\", \"\\u200b\");\n\t      removeChildrenAndAdd(measure, elt(\"span\", [test, document.createTextNode(\"x\")]));\n\t      if (measure.firstChild.offsetHeight != 0)\n\t        { zwspSupported = test.offsetWidth <= 1 && test.offsetHeight > 2 && !(ie && ie_version < 8); }\n\t    }\n\t    var node = zwspSupported ? elt(\"span\", \"\\u200b\") :\n\t      elt(\"span\", \"\\u00a0\", null, \"display: inline-block; width: 1px; margin-right: -1px\");\n\t    node.setAttribute(\"cm-text\", \"\");\n\t    return node\n\t  }\n\n\t  // Feature-detect IE's crummy client rect reporting for bidi text\n\t  var badBidiRects;\n\t  function hasBadBidiRects(measure) {\n\t    if (badBidiRects != null) { return badBidiRects }\n\t    var txt = removeChildrenAndAdd(measure, document.createTextNode(\"A\\u062eA\"));\n\t    var r0 = range(txt, 0, 1).getBoundingClientRect();\n\t    var r1 = range(txt, 1, 2).getBoundingClientRect();\n\t    removeChildren(measure);\n\t    if (!r0 || r0.left == r0.right) { return false } // Safari returns null in some cases (#2780)\n\t    return badBidiRects = (r1.right - r0.right < 3)\n\t  }\n\n\t  // See if \"\".split is the broken IE version, if so, provide an\n\t  // alternative way to split lines.\n\t  var splitLinesAuto = \"\\n\\nb\".split(/\\n/).length != 3 ? function (string) {\n\t    var pos = 0, result = [], l = string.length;\n\t    while (pos <= l) {\n\t      var nl = string.indexOf(\"\\n\", pos);\n\t      if (nl == -1) { nl = string.length; }\n\t      var line = string.slice(pos, string.charAt(nl - 1) == \"\\r\" ? nl - 1 : nl);\n\t      var rt = line.indexOf(\"\\r\");\n\t      if (rt != -1) {\n\t        result.push(line.slice(0, rt));\n\t        pos += rt + 1;\n\t      } else {\n\t        result.push(line);\n\t        pos = nl + 1;\n\t      }\n\t    }\n\t    return result\n\t  } : function (string) { return string.split(/\\r\\n?|\\n/); };\n\n\t  var hasSelection = window.getSelection ? function (te) {\n\t    try { return te.selectionStart != te.selectionEnd }\n\t    catch(e) { return false }\n\t  } : function (te) {\n\t    var range;\n\t    try {range = te.ownerDocument.selection.createRange();}\n\t    catch(e) {}\n\t    if (!range || range.parentElement() != te) { return false }\n\t    return range.compareEndPoints(\"StartToEnd\", range) != 0\n\t  };\n\n\t  var hasCopyEvent = (function () {\n\t    var e = elt(\"div\");\n\t    if (\"oncopy\" in e) { return true }\n\t    e.setAttribute(\"oncopy\", \"return;\");\n\t    return typeof e.oncopy == \"function\"\n\t  })();\n\n\t  var badZoomedRects = null;\n\t  function hasBadZoomedRects(measure) {\n\t    if (badZoomedRects != null) { return badZoomedRects }\n\t    var node = removeChildrenAndAdd(measure, elt(\"span\", \"x\"));\n\t    var normal = node.getBoundingClientRect();\n\t    var fromRange = range(node, 0, 1).getBoundingClientRect();\n\t    return badZoomedRects = Math.abs(normal.left - fromRange.left) > 1\n\t  }\n\n\t  // Known modes, by name and by MIME\n\t  var modes = {}, mimeModes = {};\n\n\t  // Extra arguments are stored as the mode's dependencies, which is\n\t  // used by (legacy) mechanisms like loadmode.js to automatically\n\t  // load a mode. (Preferred mechanism is the require/define calls.)\n\t  function defineMode(name, mode) {\n\t    if (arguments.length > 2)\n\t      { mode.dependencies = Array.prototype.slice.call(arguments, 2); }\n\t    modes[name] = mode;\n\t  }\n\n\t  function defineMIME(mime, spec) {\n\t    mimeModes[mime] = spec;\n\t  }\n\n\t  // Given a MIME type, a {name, ...options} config object, or a name\n\t  // string, return a mode config object.\n\t  function resolveMode(spec) {\n\t    if (typeof spec == \"string\" && mimeModes.hasOwnProperty(spec)) {\n\t      spec = mimeModes[spec];\n\t    } else if (spec && typeof spec.name == \"string\" && mimeModes.hasOwnProperty(spec.name)) {\n\t      var found = mimeModes[spec.name];\n\t      if (typeof found == \"string\") { found = {name: found}; }\n\t      spec = createObj(found, spec);\n\t      spec.name = found.name;\n\t    } else if (typeof spec == \"string\" && /^[\\w\\-]+\\/[\\w\\-]+\\+xml$/.test(spec)) {\n\t      return resolveMode(\"application/xml\")\n\t    } else if (typeof spec == \"string\" && /^[\\w\\-]+\\/[\\w\\-]+\\+json$/.test(spec)) {\n\t      return resolveMode(\"application/json\")\n\t    }\n\t    if (typeof spec == \"string\") { return {name: spec} }\n\t    else { return spec || {name: \"null\"} }\n\t  }\n\n\t  // Given a mode spec (anything that resolveMode accepts), find and\n\t  // initialize an actual mode object.\n\t  function getMode(options, spec) {\n\t    spec = resolveMode(spec);\n\t    var mfactory = modes[spec.name];\n\t    if (!mfactory) { return getMode(options, \"text/plain\") }\n\t    var modeObj = mfactory(options, spec);\n\t    if (modeExtensions.hasOwnProperty(spec.name)) {\n\t      var exts = modeExtensions[spec.name];\n\t      for (var prop in exts) {\n\t        if (!exts.hasOwnProperty(prop)) { continue }\n\t        if (modeObj.hasOwnProperty(prop)) { modeObj[\"_\" + prop] = modeObj[prop]; }\n\t        modeObj[prop] = exts[prop];\n\t      }\n\t    }\n\t    modeObj.name = spec.name;\n\t    if (spec.helperType) { modeObj.helperType = spec.helperType; }\n\t    if (spec.modeProps) { for (var prop$1 in spec.modeProps)\n\t      { modeObj[prop$1] = spec.modeProps[prop$1]; } }\n\n\t    return modeObj\n\t  }\n\n\t  // This can be used to attach properties to mode objects from\n\t  // outside the actual mode definition.\n\t  var modeExtensions = {};\n\t  function extendMode(mode, properties) {\n\t    var exts = modeExtensions.hasOwnProperty(mode) ? modeExtensions[mode] : (modeExtensions[mode] = {});\n\t    copyObj(properties, exts);\n\t  }\n\n\t  function copyState(mode, state) {\n\t    if (state === true) { return state }\n\t    if (mode.copyState) { return mode.copyState(state) }\n\t    var nstate = {};\n\t    for (var n in state) {\n\t      var val = state[n];\n\t      if (val instanceof Array) { val = val.concat([]); }\n\t      nstate[n] = val;\n\t    }\n\t    return nstate\n\t  }\n\n\t  // Given a mode and a state (for that mode), find the inner mode and\n\t  // state at the position that the state refers to.\n\t  function innerMode(mode, state) {\n\t    var info;\n\t    while (mode.innerMode) {\n\t      info = mode.innerMode(state);\n\t      if (!info || info.mode == mode) { break }\n\t      state = info.state;\n\t      mode = info.mode;\n\t    }\n\t    return info || {mode: mode, state: state}\n\t  }\n\n\t  function startState(mode, a1, a2) {\n\t    return mode.startState ? mode.startState(a1, a2) : true\n\t  }\n\n\t  // STRING STREAM\n\n\t  // Fed to the mode parsers, provides helper functions to make\n\t  // parsers more succinct.\n\n\t  var StringStream = function(string, tabSize, lineOracle) {\n\t    this.pos = this.start = 0;\n\t    this.string = string;\n\t    this.tabSize = tabSize || 8;\n\t    this.lastColumnPos = this.lastColumnValue = 0;\n\t    this.lineStart = 0;\n\t    this.lineOracle = lineOracle;\n\t  };\n\n\t  StringStream.prototype.eol = function () {return this.pos >= this.string.length};\n\t  StringStream.prototype.sol = function () {return this.pos == this.lineStart};\n\t  StringStream.prototype.peek = function () {return this.string.charAt(this.pos) || undefined};\n\t  StringStream.prototype.next = function () {\n\t    if (this.pos < this.string.length)\n\t      { return this.string.charAt(this.pos++) }\n\t  };\n\t  StringStream.prototype.eat = function (match) {\n\t    var ch = this.string.charAt(this.pos);\n\t    var ok;\n\t    if (typeof match == \"string\") { ok = ch == match; }\n\t    else { ok = ch && (match.test ? match.test(ch) : match(ch)); }\n\t    if (ok) {++this.pos; return ch}\n\t  };\n\t  StringStream.prototype.eatWhile = function (match) {\n\t    var start = this.pos;\n\t    while (this.eat(match)){}\n\t    return this.pos > start\n\t  };\n\t  StringStream.prototype.eatSpace = function () {\n\t    var start = this.pos;\n\t    while (/[\\s\\u00a0]/.test(this.string.charAt(this.pos))) { ++this.pos; }\n\t    return this.pos > start\n\t  };\n\t  StringStream.prototype.skipToEnd = function () {this.pos = this.string.length;};\n\t  StringStream.prototype.skipTo = function (ch) {\n\t    var found = this.string.indexOf(ch, this.pos);\n\t    if (found > -1) {this.pos = found; return true}\n\t  };\n\t  StringStream.prototype.backUp = function (n) {this.pos -= n;};\n\t  StringStream.prototype.column = function () {\n\t    if (this.lastColumnPos < this.start) {\n\t      this.lastColumnValue = countColumn(this.string, this.start, this.tabSize, this.lastColumnPos, this.lastColumnValue);\n\t      this.lastColumnPos = this.start;\n\t    }\n\t    return this.lastColumnValue - (this.lineStart ? countColumn(this.string, this.lineStart, this.tabSize) : 0)\n\t  };\n\t  StringStream.prototype.indentation = function () {\n\t    return countColumn(this.string, null, this.tabSize) -\n\t      (this.lineStart ? countColumn(this.string, this.lineStart, this.tabSize) : 0)\n\t  };\n\t  StringStream.prototype.match = function (pattern, consume, caseInsensitive) {\n\t    if (typeof pattern == \"string\") {\n\t      var cased = function (str) { return caseInsensitive ? str.toLowerCase() : str; };\n\t      var substr = this.string.substr(this.pos, pattern.length);\n\t      if (cased(substr) == cased(pattern)) {\n\t        if (consume !== false) { this.pos += pattern.length; }\n\t        return true\n\t      }\n\t    } else {\n\t      var match = this.string.slice(this.pos).match(pattern);\n\t      if (match && match.index > 0) { return null }\n\t      if (match && consume !== false) { this.pos += match[0].length; }\n\t      return match\n\t    }\n\t  };\n\t  StringStream.prototype.current = function (){return this.string.slice(this.start, this.pos)};\n\t  StringStream.prototype.hideFirstChars = function (n, inner) {\n\t    this.lineStart += n;\n\t    try { return inner() }\n\t    finally { this.lineStart -= n; }\n\t  };\n\t  StringStream.prototype.lookAhead = function (n) {\n\t    var oracle = this.lineOracle;\n\t    return oracle && oracle.lookAhead(n)\n\t  };\n\t  StringStream.prototype.baseToken = function () {\n\t    var oracle = this.lineOracle;\n\t    return oracle && oracle.baseToken(this.pos)\n\t  };\n\n\t  // Find the line object corresponding to the given line number.\n\t  function getLine(doc, n) {\n\t    n -= doc.first;\n\t    if (n < 0 || n >= doc.size) { throw new Error(\"There is no line \" + (n + doc.first) + \" in the document.\") }\n\t    var chunk = doc;\n\t    while (!chunk.lines) {\n\t      for (var i = 0;; ++i) {\n\t        var child = chunk.children[i], sz = child.chunkSize();\n\t        if (n < sz) { chunk = child; break }\n\t        n -= sz;\n\t      }\n\t    }\n\t    return chunk.lines[n]\n\t  }\n\n\t  // Get the part of a document between two positions, as an array of\n\t  // strings.\n\t  function getBetween(doc, start, end) {\n\t    var out = [], n = start.line;\n\t    doc.iter(start.line, end.line + 1, function (line) {\n\t      var text = line.text;\n\t      if (n == end.line) { text = text.slice(0, end.ch); }\n\t      if (n == start.line) { text = text.slice(start.ch); }\n\t      out.push(text);\n\t      ++n;\n\t    });\n\t    return out\n\t  }\n\t  // Get the lines between from and to, as array of strings.\n\t  function getLines(doc, from, to) {\n\t    var out = [];\n\t    doc.iter(from, to, function (line) { out.push(line.text); }); // iter aborts when callback returns truthy value\n\t    return out\n\t  }\n\n\t  // Update the height of a line, propagating the height change\n\t  // upwards to parent nodes.\n\t  function updateLineHeight(line, height) {\n\t    var diff = height - line.height;\n\t    if (diff) { for (var n = line; n; n = n.parent) { n.height += diff; } }\n\t  }\n\n\t  // Given a line object, find its line number by walking up through\n\t  // its parent links.\n\t  function lineNo(line) {\n\t    if (line.parent == null) { return null }\n\t    var cur = line.parent, no = indexOf(cur.lines, line);\n\t    for (var chunk = cur.parent; chunk; cur = chunk, chunk = chunk.parent) {\n\t      for (var i = 0;; ++i) {\n\t        if (chunk.children[i] == cur) { break }\n\t        no += chunk.children[i].chunkSize();\n\t      }\n\t    }\n\t    return no + cur.first\n\t  }\n\n\t  // Find the line at the given vertical position, using the height\n\t  // information in the document tree.\n\t  function lineAtHeight(chunk, h) {\n\t    var n = chunk.first;\n\t    outer: do {\n\t      for (var i$1 = 0; i$1 < chunk.children.length; ++i$1) {\n\t        var child = chunk.children[i$1], ch = child.height;\n\t        if (h < ch) { chunk = child; continue outer }\n\t        h -= ch;\n\t        n += child.chunkSize();\n\t      }\n\t      return n\n\t    } while (!chunk.lines)\n\t    var i = 0;\n\t    for (; i < chunk.lines.length; ++i) {\n\t      var line = chunk.lines[i], lh = line.height;\n\t      if (h < lh) { break }\n\t      h -= lh;\n\t    }\n\t    return n + i\n\t  }\n\n\t  function isLine(doc, l) {return l >= doc.first && l < doc.first + doc.size}\n\n\t  function lineNumberFor(options, i) {\n\t    return String(options.lineNumberFormatter(i + options.firstLineNumber))\n\t  }\n\n\t  // A Pos instance represents a position within the text.\n\t  function Pos(line, ch, sticky) {\n\t    if ( sticky === void 0 ) sticky = null;\n\n\t    if (!(this instanceof Pos)) { return new Pos(line, ch, sticky) }\n\t    this.line = line;\n\t    this.ch = ch;\n\t    this.sticky = sticky;\n\t  }\n\n\t  // Compare two positions, return 0 if they are the same, a negative\n\t  // number when a is less, and a positive number otherwise.\n\t  function cmp(a, b) { return a.line - b.line || a.ch - b.ch }\n\n\t  function equalCursorPos(a, b) { return a.sticky == b.sticky && cmp(a, b) == 0 }\n\n\t  function copyPos(x) {return Pos(x.line, x.ch)}\n\t  function maxPos(a, b) { return cmp(a, b) < 0 ? b : a }\n\t  function minPos(a, b) { return cmp(a, b) < 0 ? a : b }\n\n\t  // Most of the external API clips given positions to make sure they\n\t  // actually exist within the document.\n\t  function clipLine(doc, n) {return Math.max(doc.first, Math.min(n, doc.first + doc.size - 1))}\n\t  function clipPos(doc, pos) {\n\t    if (pos.line < doc.first) { return Pos(doc.first, 0) }\n\t    var last = doc.first + doc.size - 1;\n\t    if (pos.line > last) { return Pos(last, getLine(doc, last).text.length) }\n\t    return clipToLen(pos, getLine(doc, pos.line).text.length)\n\t  }\n\t  function clipToLen(pos, linelen) {\n\t    var ch = pos.ch;\n\t    if (ch == null || ch > linelen) { return Pos(pos.line, linelen) }\n\t    else if (ch < 0) { return Pos(pos.line, 0) }\n\t    else { return pos }\n\t  }\n\t  function clipPosArray(doc, array) {\n\t    var out = [];\n\t    for (var i = 0; i < array.length; i++) { out[i] = clipPos(doc, array[i]); }\n\t    return out\n\t  }\n\n\t  var SavedContext = function(state, lookAhead) {\n\t    this.state = state;\n\t    this.lookAhead = lookAhead;\n\t  };\n\n\t  var Context = function(doc, state, line, lookAhead) {\n\t    this.state = state;\n\t    this.doc = doc;\n\t    this.line = line;\n\t    this.maxLookAhead = lookAhead || 0;\n\t    this.baseTokens = null;\n\t    this.baseTokenPos = 1;\n\t  };\n\n\t  Context.prototype.lookAhead = function (n) {\n\t    var line = this.doc.getLine(this.line + n);\n\t    if (line != null && n > this.maxLookAhead) { this.maxLookAhead = n; }\n\t    return line\n\t  };\n\n\t  Context.prototype.baseToken = function (n) {\n\t    if (!this.baseTokens) { return null }\n\t    while (this.baseTokens[this.baseTokenPos] <= n)\n\t      { this.baseTokenPos += 2; }\n\t    var type = this.baseTokens[this.baseTokenPos + 1];\n\t    return {type: type && type.replace(/( |^)overlay .*/, \"\"),\n\t            size: this.baseTokens[this.baseTokenPos] - n}\n\t  };\n\n\t  Context.prototype.nextLine = function () {\n\t    this.line++;\n\t    if (this.maxLookAhead > 0) { this.maxLookAhead--; }\n\t  };\n\n\t  Context.fromSaved = function (doc, saved, line) {\n\t    if (saved instanceof SavedContext)\n\t      { return new Context(doc, copyState(doc.mode, saved.state), line, saved.lookAhead) }\n\t    else\n\t      { return new Context(doc, copyState(doc.mode, saved), line) }\n\t  };\n\n\t  Context.prototype.save = function (copy) {\n\t    var state = copy !== false ? copyState(this.doc.mode, this.state) : this.state;\n\t    return this.maxLookAhead > 0 ? new SavedContext(state, this.maxLookAhead) : state\n\t  };\n\n\n\t  // Compute a style array (an array starting with a mode generation\n\t  // -- for invalidation -- followed by pairs of end positions and\n\t  // style strings), which is used to highlight the tokens on the\n\t  // line.\n\t  function highlightLine(cm, line, context, forceToEnd) {\n\t    // A styles array always starts with a number identifying the\n\t    // mode/overlays that it is based on (for easy invalidation).\n\t    var st = [cm.state.modeGen], lineClasses = {};\n\t    // Compute the base array of styles\n\t    runMode(cm, line.text, cm.doc.mode, context, function (end, style) { return st.push(end, style); },\n\t            lineClasses, forceToEnd);\n\t    var state = context.state;\n\n\t    // Run overlays, adjust style array.\n\t    var loop = function ( o ) {\n\t      context.baseTokens = st;\n\t      var overlay = cm.state.overlays[o], i = 1, at = 0;\n\t      context.state = true;\n\t      runMode(cm, line.text, overlay.mode, context, function (end, style) {\n\t        var start = i;\n\t        // Ensure there's a token end at the current position, and that i points at it\n\t        while (at < end) {\n\t          var i_end = st[i];\n\t          if (i_end > end)\n\t            { st.splice(i, 1, end, st[i+1], i_end); }\n\t          i += 2;\n\t          at = Math.min(end, i_end);\n\t        }\n\t        if (!style) { return }\n\t        if (overlay.opaque) {\n\t          st.splice(start, i - start, end, \"overlay \" + style);\n\t          i = start + 2;\n\t        } else {\n\t          for (; start < i; start += 2) {\n\t            var cur = st[start+1];\n\t            st[start+1] = (cur ? cur + \" \" : \"\") + \"overlay \" + style;\n\t          }\n\t        }\n\t      }, lineClasses);\n\t      context.state = state;\n\t      context.baseTokens = null;\n\t      context.baseTokenPos = 1;\n\t    };\n\n\t    for (var o = 0; o < cm.state.overlays.length; ++o) loop( o );\n\n\t    return {styles: st, classes: lineClasses.bgClass || lineClasses.textClass ? lineClasses : null}\n\t  }\n\n\t  function getLineStyles(cm, line, updateFrontier) {\n\t    if (!line.styles || line.styles[0] != cm.state.modeGen) {\n\t      var context = getContextBefore(cm, lineNo(line));\n\t      var resetState = line.text.length > cm.options.maxHighlightLength && copyState(cm.doc.mode, context.state);\n\t      var result = highlightLine(cm, line, context);\n\t      if (resetState) { context.state = resetState; }\n\t      line.stateAfter = context.save(!resetState);\n\t      line.styles = result.styles;\n\t      if (result.classes) { line.styleClasses = result.classes; }\n\t      else if (line.styleClasses) { line.styleClasses = null; }\n\t      if (updateFrontier === cm.doc.highlightFrontier)\n\t        { cm.doc.modeFrontier = Math.max(cm.doc.modeFrontier, ++cm.doc.highlightFrontier); }\n\t    }\n\t    return line.styles\n\t  }\n\n\t  function getContextBefore(cm, n, precise) {\n\t    var doc = cm.doc, display = cm.display;\n\t    if (!doc.mode.startState) { return new Context(doc, true, n) }\n\t    var start = findStartLine(cm, n, precise);\n\t    var saved = start > doc.first && getLine(doc, start - 1).stateAfter;\n\t    var context = saved ? Context.fromSaved(doc, saved, start) : new Context(doc, startState(doc.mode), start);\n\n\t    doc.iter(start, n, function (line) {\n\t      processLine(cm, line.text, context);\n\t      var pos = context.line;\n\t      line.stateAfter = pos == n - 1 || pos % 5 == 0 || pos >= display.viewFrom && pos < display.viewTo ? context.save() : null;\n\t      context.nextLine();\n\t    });\n\t    if (precise) { doc.modeFrontier = context.line; }\n\t    return context\n\t  }\n\n\t  // Lightweight form of highlight -- proceed over this line and\n\t  // update state, but don't save a style array. Used for lines that\n\t  // aren't currently visible.\n\t  function processLine(cm, text, context, startAt) {\n\t    var mode = cm.doc.mode;\n\t    var stream = new StringStream(text, cm.options.tabSize, context);\n\t    stream.start = stream.pos = startAt || 0;\n\t    if (text == \"\") { callBlankLine(mode, context.state); }\n\t    while (!stream.eol()) {\n\t      readToken(mode, stream, context.state);\n\t      stream.start = stream.pos;\n\t    }\n\t  }\n\n\t  function callBlankLine(mode, state) {\n\t    if (mode.blankLine) { return mode.blankLine(state) }\n\t    if (!mode.innerMode) { return }\n\t    var inner = innerMode(mode, state);\n\t    if (inner.mode.blankLine) { return inner.mode.blankLine(inner.state) }\n\t  }\n\n\t  function readToken(mode, stream, state, inner) {\n\t    for (var i = 0; i < 10; i++) {\n\t      if (inner) { inner[0] = innerMode(mode, state).mode; }\n\t      var style = mode.token(stream, state);\n\t      if (stream.pos > stream.start) { return style }\n\t    }\n\t    throw new Error(\"Mode \" + mode.name + \" failed to advance stream.\")\n\t  }\n\n\t  var Token = function(stream, type, state) {\n\t    this.start = stream.start; this.end = stream.pos;\n\t    this.string = stream.current();\n\t    this.type = type || null;\n\t    this.state = state;\n\t  };\n\n\t  // Utility for getTokenAt and getLineTokens\n\t  function takeToken(cm, pos, precise, asArray) {\n\t    var doc = cm.doc, mode = doc.mode, style;\n\t    pos = clipPos(doc, pos);\n\t    var line = getLine(doc, pos.line), context = getContextBefore(cm, pos.line, precise);\n\t    var stream = new StringStream(line.text, cm.options.tabSize, context), tokens;\n\t    if (asArray) { tokens = []; }\n\t    while ((asArray || stream.pos < pos.ch) && !stream.eol()) {\n\t      stream.start = stream.pos;\n\t      style = readToken(mode, stream, context.state);\n\t      if (asArray) { tokens.push(new Token(stream, style, copyState(doc.mode, context.state))); }\n\t    }\n\t    return asArray ? tokens : new Token(stream, style, context.state)\n\t  }\n\n\t  function extractLineClasses(type, output) {\n\t    if (type) { for (;;) {\n\t      var lineClass = type.match(/(?:^|\\s+)line-(background-)?(\\S+)/);\n\t      if (!lineClass) { break }\n\t      type = type.slice(0, lineClass.index) + type.slice(lineClass.index + lineClass[0].length);\n\t      var prop = lineClass[1] ? \"bgClass\" : \"textClass\";\n\t      if (output[prop] == null)\n\t        { output[prop] = lineClass[2]; }\n\t      else if (!(new RegExp(\"(?:^|\\\\s)\" + lineClass[2] + \"(?:$|\\\\s)\")).test(output[prop]))\n\t        { output[prop] += \" \" + lineClass[2]; }\n\t    } }\n\t    return type\n\t  }\n\n\t  // Run the given mode's parser over a line, calling f for each token.\n\t  function runMode(cm, text, mode, context, f, lineClasses, forceToEnd) {\n\t    var flattenSpans = mode.flattenSpans;\n\t    if (flattenSpans == null) { flattenSpans = cm.options.flattenSpans; }\n\t    var curStart = 0, curStyle = null;\n\t    var stream = new StringStream(text, cm.options.tabSize, context), style;\n\t    var inner = cm.options.addModeClass && [null];\n\t    if (text == \"\") { extractLineClasses(callBlankLine(mode, context.state), lineClasses); }\n\t    while (!stream.eol()) {\n\t      if (stream.pos > cm.options.maxHighlightLength) {\n\t        flattenSpans = false;\n\t        if (forceToEnd) { processLine(cm, text, context, stream.pos); }\n\t        stream.pos = text.length;\n\t        style = null;\n\t      } else {\n\t        style = extractLineClasses(readToken(mode, stream, context.state, inner), lineClasses);\n\t      }\n\t      if (inner) {\n\t        var mName = inner[0].name;\n\t        if (mName) { style = \"m-\" + (style ? mName + \" \" + style : mName); }\n\t      }\n\t      if (!flattenSpans || curStyle != style) {\n\t        while (curStart < stream.start) {\n\t          curStart = Math.min(stream.start, curStart + 5000);\n\t          f(curStart, curStyle);\n\t        }\n\t        curStyle = style;\n\t      }\n\t      stream.start = stream.pos;\n\t    }\n\t    while (curStart < stream.pos) {\n\t      // Webkit seems to refuse to render text nodes longer than 57444\n\t      // characters, and returns inaccurate measurements in nodes\n\t      // starting around 5000 chars.\n\t      var pos = Math.min(stream.pos, curStart + 5000);\n\t      f(pos, curStyle);\n\t      curStart = pos;\n\t    }\n\t  }\n\n\t  // Finds the line to start with when starting a parse. Tries to\n\t  // find a line with a stateAfter, so that it can start with a\n\t  // valid state. If that fails, it returns the line with the\n\t  // smallest indentation, which tends to need the least context to\n\t  // parse correctly.\n\t  function findStartLine(cm, n, precise) {\n\t    var minindent, minline, doc = cm.doc;\n\t    var lim = precise ? -1 : n - (cm.doc.mode.innerMode ? 1000 : 100);\n\t    for (var search = n; search > lim; --search) {\n\t      if (search <= doc.first) { return doc.first }\n\t      var line = getLine(doc, search - 1), after = line.stateAfter;\n\t      if (after && (!precise || search + (after instanceof SavedContext ? after.lookAhead : 0) <= doc.modeFrontier))\n\t        { return search }\n\t      var indented = countColumn(line.text, null, cm.options.tabSize);\n\t      if (minline == null || minindent > indented) {\n\t        minline = search - 1;\n\t        minindent = indented;\n\t      }\n\t    }\n\t    return minline\n\t  }\n\n\t  function retreatFrontier(doc, n) {\n\t    doc.modeFrontier = Math.min(doc.modeFrontier, n);\n\t    if (doc.highlightFrontier < n - 10) { return }\n\t    var start = doc.first;\n\t    for (var line = n - 1; line > start; line--) {\n\t      var saved = getLine(doc, line).stateAfter;\n\t      // change is on 3\n\t      // state on line 1 looked ahead 2 -- so saw 3\n\t      // test 1 + 2 < 3 should cover this\n\t      if (saved && (!(saved instanceof SavedContext) || line + saved.lookAhead < n)) {\n\t        start = line + 1;\n\t        break\n\t      }\n\t    }\n\t    doc.highlightFrontier = Math.min(doc.highlightFrontier, start);\n\t  }\n\n\t  // Optimize some code when these features are not used.\n\t  var sawReadOnlySpans = false, sawCollapsedSpans = false;\n\n\t  function seeReadOnlySpans() {\n\t    sawReadOnlySpans = true;\n\t  }\n\n\t  function seeCollapsedSpans() {\n\t    sawCollapsedSpans = true;\n\t  }\n\n\t  // TEXTMARKER SPANS\n\n\t  function MarkedSpan(marker, from, to) {\n\t    this.marker = marker;\n\t    this.from = from; this.to = to;\n\t  }\n\n\t  // Search an array of spans for a span matching the given marker.\n\t  function getMarkedSpanFor(spans, marker) {\n\t    if (spans) { for (var i = 0; i < spans.length; ++i) {\n\t      var span = spans[i];\n\t      if (span.marker == marker) { return span }\n\t    } }\n\t  }\n\t  // Remove a span from an array, returning undefined if no spans are\n\t  // left (we don't store arrays for lines without spans).\n\t  function removeMarkedSpan(spans, span) {\n\t    var r;\n\t    for (var i = 0; i < spans.length; ++i)\n\t      { if (spans[i] != span) { (r || (r = [])).push(spans[i]); } }\n\t    return r\n\t  }\n\t  // Add a span to a line.\n\t  function addMarkedSpan(line, span) {\n\t    line.markedSpans = line.markedSpans ? line.markedSpans.concat([span]) : [span];\n\t    span.marker.attachLine(line);\n\t  }\n\n\t  // Used for the algorithm that adjusts markers for a change in the\n\t  // document. These functions cut an array of spans at a given\n\t  // character position, returning an array of remaining chunks (or\n\t  // undefined if nothing remains).\n\t  function markedSpansBefore(old, startCh, isInsert) {\n\t    var nw;\n\t    if (old) { for (var i = 0; i < old.length; ++i) {\n\t      var span = old[i], marker = span.marker;\n\t      var startsBefore = span.from == null || (marker.inclusiveLeft ? span.from <= startCh : span.from < startCh);\n\t      if (startsBefore || span.from == startCh && marker.type == \"bookmark\" && (!isInsert || !span.marker.insertLeft)) {\n\t        var endsAfter = span.to == null || (marker.inclusiveRight ? span.to >= startCh : span.to > startCh)\n\t        ;(nw || (nw = [])).push(new MarkedSpan(marker, span.from, endsAfter ? null : span.to));\n\t      }\n\t    } }\n\t    return nw\n\t  }\n\t  function markedSpansAfter(old, endCh, isInsert) {\n\t    var nw;\n\t    if (old) { for (var i = 0; i < old.length; ++i) {\n\t      var span = old[i], marker = span.marker;\n\t      var endsAfter = span.to == null || (marker.inclusiveRight ? span.to >= endCh : span.to > endCh);\n\t      if (endsAfter || span.from == endCh && marker.type == \"bookmark\" && (!isInsert || span.marker.insertLeft)) {\n\t        var startsBefore = span.from == null || (marker.inclusiveLeft ? span.from <= endCh : span.from < endCh)\n\t        ;(nw || (nw = [])).push(new MarkedSpan(marker, startsBefore ? null : span.from - endCh,\n\t                                              span.to == null ? null : span.to - endCh));\n\t      }\n\t    } }\n\t    return nw\n\t  }\n\n\t  // Given a change object, compute the new set of marker spans that\n\t  // cover the line in which the change took place. Removes spans\n\t  // entirely within the change, reconnects spans belonging to the\n\t  // same marker that appear on both sides of the change, and cuts off\n\t  // spans partially within the change. Returns an array of span\n\t  // arrays with one element for each line in (after) the change.\n\t  function stretchSpansOverChange(doc, change) {\n\t    if (change.full) { return null }\n\t    var oldFirst = isLine(doc, change.from.line) && getLine(doc, change.from.line).markedSpans;\n\t    var oldLast = isLine(doc, change.to.line) && getLine(doc, change.to.line).markedSpans;\n\t    if (!oldFirst && !oldLast) { return null }\n\n\t    var startCh = change.from.ch, endCh = change.to.ch, isInsert = cmp(change.from, change.to) == 0;\n\t    // Get the spans that 'stick out' on both sides\n\t    var first = markedSpansBefore(oldFirst, startCh, isInsert);\n\t    var last = markedSpansAfter(oldLast, endCh, isInsert);\n\n\t    // Next, merge those two ends\n\t    var sameLine = change.text.length == 1, offset = lst(change.text).length + (sameLine ? startCh : 0);\n\t    if (first) {\n\t      // Fix up .to properties of first\n\t      for (var i = 0; i < first.length; ++i) {\n\t        var span = first[i];\n\t        if (span.to == null) {\n\t          var found = getMarkedSpanFor(last, span.marker);\n\t          if (!found) { span.to = startCh; }\n\t          else if (sameLine) { span.to = found.to == null ? null : found.to + offset; }\n\t        }\n\t      }\n\t    }\n\t    if (last) {\n\t      // Fix up .from in last (or move them into first in case of sameLine)\n\t      for (var i$1 = 0; i$1 < last.length; ++i$1) {\n\t        var span$1 = last[i$1];\n\t        if (span$1.to != null) { span$1.to += offset; }\n\t        if (span$1.from == null) {\n\t          var found$1 = getMarkedSpanFor(first, span$1.marker);\n\t          if (!found$1) {\n\t            span$1.from = offset;\n\t            if (sameLine) { (first || (first = [])).push(span$1); }\n\t          }\n\t        } else {\n\t          span$1.from += offset;\n\t          if (sameLine) { (first || (first = [])).push(span$1); }\n\t        }\n\t      }\n\t    }\n\t    // Make sure we didn't create any zero-length spans\n\t    if (first) { first = clearEmptySpans(first); }\n\t    if (last && last != first) { last = clearEmptySpans(last); }\n\n\t    var newMarkers = [first];\n\t    if (!sameLine) {\n\t      // Fill gap with whole-line-spans\n\t      var gap = change.text.length - 2, gapMarkers;\n\t      if (gap > 0 && first)\n\t        { for (var i$2 = 0; i$2 < first.length; ++i$2)\n\t          { if (first[i$2].to == null)\n\t            { (gapMarkers || (gapMarkers = [])).push(new MarkedSpan(first[i$2].marker, null, null)); } } }\n\t      for (var i$3 = 0; i$3 < gap; ++i$3)\n\t        { newMarkers.push(gapMarkers); }\n\t      newMarkers.push(last);\n\t    }\n\t    return newMarkers\n\t  }\n\n\t  // Remove spans that are empty and don't have a clearWhenEmpty\n\t  // option of false.\n\t  function clearEmptySpans(spans) {\n\t    for (var i = 0; i < spans.length; ++i) {\n\t      var span = spans[i];\n\t      if (span.from != null && span.from == span.to && span.marker.clearWhenEmpty !== false)\n\t        { spans.splice(i--, 1); }\n\t    }\n\t    if (!spans.length) { return null }\n\t    return spans\n\t  }\n\n\t  // Used to 'clip' out readOnly ranges when making a change.\n\t  function removeReadOnlyRanges(doc, from, to) {\n\t    var markers = null;\n\t    doc.iter(from.line, to.line + 1, function (line) {\n\t      if (line.markedSpans) { for (var i = 0; i < line.markedSpans.length; ++i) {\n\t        var mark = line.markedSpans[i].marker;\n\t        if (mark.readOnly && (!markers || indexOf(markers, mark) == -1))\n\t          { (markers || (markers = [])).push(mark); }\n\t      } }\n\t    });\n\t    if (!markers) { return null }\n\t    var parts = [{from: from, to: to}];\n\t    for (var i = 0; i < markers.length; ++i) {\n\t      var mk = markers[i], m = mk.find(0);\n\t      for (var j = 0; j < parts.length; ++j) {\n\t        var p = parts[j];\n\t        if (cmp(p.to, m.from) < 0 || cmp(p.from, m.to) > 0) { continue }\n\t        var newParts = [j, 1], dfrom = cmp(p.from, m.from), dto = cmp(p.to, m.to);\n\t        if (dfrom < 0 || !mk.inclusiveLeft && !dfrom)\n\t          { newParts.push({from: p.from, to: m.from}); }\n\t        if (dto > 0 || !mk.inclusiveRight && !dto)\n\t          { newParts.push({from: m.to, to: p.to}); }\n\t        parts.splice.apply(parts, newParts);\n\t        j += newParts.length - 3;\n\t      }\n\t    }\n\t    return parts\n\t  }\n\n\t  // Connect or disconnect spans from a line.\n\t  function detachMarkedSpans(line) {\n\t    var spans = line.markedSpans;\n\t    if (!spans) { return }\n\t    for (var i = 0; i < spans.length; ++i)\n\t      { spans[i].marker.detachLine(line); }\n\t    line.markedSpans = null;\n\t  }\n\t  function attachMarkedSpans(line, spans) {\n\t    if (!spans) { return }\n\t    for (var i = 0; i < spans.length; ++i)\n\t      { spans[i].marker.attachLine(line); }\n\t    line.markedSpans = spans;\n\t  }\n\n\t  // Helpers used when computing which overlapping collapsed span\n\t  // counts as the larger one.\n\t  function extraLeft(marker) { return marker.inclusiveLeft ? -1 : 0 }\n\t  function extraRight(marker) { return marker.inclusiveRight ? 1 : 0 }\n\n\t  // Returns a number indicating which of two overlapping collapsed\n\t  // spans is larger (and thus includes the other). Falls back to\n\t  // comparing ids when the spans cover exactly the same range.\n\t  function compareCollapsedMarkers(a, b) {\n\t    var lenDiff = a.lines.length - b.lines.length;\n\t    if (lenDiff != 0) { return lenDiff }\n\t    var aPos = a.find(), bPos = b.find();\n\t    var fromCmp = cmp(aPos.from, bPos.from) || extraLeft(a) - extraLeft(b);\n\t    if (fromCmp) { return -fromCmp }\n\t    var toCmp = cmp(aPos.to, bPos.to) || extraRight(a) - extraRight(b);\n\t    if (toCmp) { return toCmp }\n\t    return b.id - a.id\n\t  }\n\n\t  // Find out whether a line ends or starts in a collapsed span. If\n\t  // so, return the marker for that span.\n\t  function collapsedSpanAtSide(line, start) {\n\t    var sps = sawCollapsedSpans && line.markedSpans, found;\n\t    if (sps) { for (var sp = (void 0), i = 0; i < sps.length; ++i) {\n\t      sp = sps[i];\n\t      if (sp.marker.collapsed && (start ? sp.from : sp.to) == null &&\n\t          (!found || compareCollapsedMarkers(found, sp.marker) < 0))\n\t        { found = sp.marker; }\n\t    } }\n\t    return found\n\t  }\n\t  function collapsedSpanAtStart(line) { return collapsedSpanAtSide(line, true) }\n\t  function collapsedSpanAtEnd(line) { return collapsedSpanAtSide(line, false) }\n\n\t  function collapsedSpanAround(line, ch) {\n\t    var sps = sawCollapsedSpans && line.markedSpans, found;\n\t    if (sps) { for (var i = 0; i < sps.length; ++i) {\n\t      var sp = sps[i];\n\t      if (sp.marker.collapsed && (sp.from == null || sp.from < ch) && (sp.to == null || sp.to > ch) &&\n\t          (!found || compareCollapsedMarkers(found, sp.marker) < 0)) { found = sp.marker; }\n\t    } }\n\t    return found\n\t  }\n\n\t  // Test whether there exists a collapsed span that partially\n\t  // overlaps (covers the start or end, but not both) of a new span.\n\t  // Such overlap is not allowed.\n\t  function conflictingCollapsedRange(doc, lineNo, from, to, marker) {\n\t    var line = getLine(doc, lineNo);\n\t    var sps = sawCollapsedSpans && line.markedSpans;\n\t    if (sps) { for (var i = 0; i < sps.length; ++i) {\n\t      var sp = sps[i];\n\t      if (!sp.marker.collapsed) { continue }\n\t      var found = sp.marker.find(0);\n\t      var fromCmp = cmp(found.from, from) || extraLeft(sp.marker) - extraLeft(marker);\n\t      var toCmp = cmp(found.to, to) || extraRight(sp.marker) - extraRight(marker);\n\t      if (fromCmp >= 0 && toCmp <= 0 || fromCmp <= 0 && toCmp >= 0) { continue }\n\t      if (fromCmp <= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.to, from) >= 0 : cmp(found.to, from) > 0) ||\n\t          fromCmp >= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.from, to) <= 0 : cmp(found.from, to) < 0))\n\t        { return true }\n\t    } }\n\t  }\n\n\t  // A visual line is a line as drawn on the screen. Folding, for\n\t  // example, can cause multiple logical lines to appear on the same\n\t  // visual line. This finds the start of the visual line that the\n\t  // given line is part of (usually that is the line itself).\n\t  function visualLine(line) {\n\t    var merged;\n\t    while (merged = collapsedSpanAtStart(line))\n\t      { line = merged.find(-1, true).line; }\n\t    return line\n\t  }\n\n\t  function visualLineEnd(line) {\n\t    var merged;\n\t    while (merged = collapsedSpanAtEnd(line))\n\t      { line = merged.find(1, true).line; }\n\t    return line\n\t  }\n\n\t  // Returns an array of logical lines that continue the visual line\n\t  // started by the argument, or undefined if there are no such lines.\n\t  function visualLineContinued(line) {\n\t    var merged, lines;\n\t    while (merged = collapsedSpanAtEnd(line)) {\n\t      line = merged.find(1, true).line\n\t      ;(lines || (lines = [])).push(line);\n\t    }\n\t    return lines\n\t  }\n\n\t  // Get the line number of the start of the visual line that the\n\t  // given line number is part of.\n\t  function visualLineNo(doc, lineN) {\n\t    var line = getLine(doc, lineN), vis = visualLine(line);\n\t    if (line == vis) { return lineN }\n\t    return lineNo(vis)\n\t  }\n\n\t  // Get the line number of the start of the next visual line after\n\t  // the given line.\n\t  function visualLineEndNo(doc, lineN) {\n\t    if (lineN > doc.lastLine()) { return lineN }\n\t    var line = getLine(doc, lineN), merged;\n\t    if (!lineIsHidden(doc, line)) { return lineN }\n\t    while (merged = collapsedSpanAtEnd(line))\n\t      { line = merged.find(1, true).line; }\n\t    return lineNo(line) + 1\n\t  }\n\n\t  // Compute whether a line is hidden. Lines count as hidden when they\n\t  // are part of a visual line that starts with another line, or when\n\t  // they are entirely covered by collapsed, non-widget span.\n\t  function lineIsHidden(doc, line) {\n\t    var sps = sawCollapsedSpans && line.markedSpans;\n\t    if (sps) { for (var sp = (void 0), i = 0; i < sps.length; ++i) {\n\t      sp = sps[i];\n\t      if (!sp.marker.collapsed) { continue }\n\t      if (sp.from == null) { return true }\n\t      if (sp.marker.widgetNode) { continue }\n\t      if (sp.from == 0 && sp.marker.inclusiveLeft && lineIsHiddenInner(doc, line, sp))\n\t        { return true }\n\t    } }\n\t  }\n\t  function lineIsHiddenInner(doc, line, span) {\n\t    if (span.to == null) {\n\t      var end = span.marker.find(1, true);\n\t      return lineIsHiddenInner(doc, end.line, getMarkedSpanFor(end.line.markedSpans, span.marker))\n\t    }\n\t    if (span.marker.inclusiveRight && span.to == line.text.length)\n\t      { return true }\n\t    for (var sp = (void 0), i = 0; i < line.markedSpans.length; ++i) {\n\t      sp = line.markedSpans[i];\n\t      if (sp.marker.collapsed && !sp.marker.widgetNode && sp.from == span.to &&\n\t          (sp.to == null || sp.to != span.from) &&\n\t          (sp.marker.inclusiveLeft || span.marker.inclusiveRight) &&\n\t          lineIsHiddenInner(doc, line, sp)) { return true }\n\t    }\n\t  }\n\n\t  // Find the height above the given line.\n\t  function heightAtLine(lineObj) {\n\t    lineObj = visualLine(lineObj);\n\n\t    var h = 0, chunk = lineObj.parent;\n\t    for (var i = 0; i < chunk.lines.length; ++i) {\n\t      var line = chunk.lines[i];\n\t      if (line == lineObj) { break }\n\t      else { h += line.height; }\n\t    }\n\t    for (var p = chunk.parent; p; chunk = p, p = chunk.parent) {\n\t      for (var i$1 = 0; i$1 < p.children.length; ++i$1) {\n\t        var cur = p.children[i$1];\n\t        if (cur == chunk) { break }\n\t        else { h += cur.height; }\n\t      }\n\t    }\n\t    return h\n\t  }\n\n\t  // Compute the character length of a line, taking into account\n\t  // collapsed ranges (see markText) that might hide parts, and join\n\t  // other lines onto it.\n\t  function lineLength(line) {\n\t    if (line.height == 0) { return 0 }\n\t    var len = line.text.length, merged, cur = line;\n\t    while (merged = collapsedSpanAtStart(cur)) {\n\t      var found = merged.find(0, true);\n\t      cur = found.from.line;\n\t      len += found.from.ch - found.to.ch;\n\t    }\n\t    cur = line;\n\t    while (merged = collapsedSpanAtEnd(cur)) {\n\t      var found$1 = merged.find(0, true);\n\t      len -= cur.text.length - found$1.from.ch;\n\t      cur = found$1.to.line;\n\t      len += cur.text.length - found$1.to.ch;\n\t    }\n\t    return len\n\t  }\n\n\t  // Find the longest line in the document.\n\t  function findMaxLine(cm) {\n\t    var d = cm.display, doc = cm.doc;\n\t    d.maxLine = getLine(doc, doc.first);\n\t    d.maxLineLength = lineLength(d.maxLine);\n\t    d.maxLineChanged = true;\n\t    doc.iter(function (line) {\n\t      var len = lineLength(line);\n\t      if (len > d.maxLineLength) {\n\t        d.maxLineLength = len;\n\t        d.maxLine = line;\n\t      }\n\t    });\n\t  }\n\n\t  // LINE DATA STRUCTURE\n\n\t  // Line objects. These hold state related to a line, including\n\t  // highlighting info (the styles array).\n\t  var Line = function(text, markedSpans, estimateHeight) {\n\t    this.text = text;\n\t    attachMarkedSpans(this, markedSpans);\n\t    this.height = estimateHeight ? estimateHeight(this) : 1;\n\t  };\n\n\t  Line.prototype.lineNo = function () { return lineNo(this) };\n\t  eventMixin(Line);\n\n\t  // Change the content (text, markers) of a line. Automatically\n\t  // invalidates cached information and tries to re-estimate the\n\t  // line's height.\n\t  function updateLine(line, text, markedSpans, estimateHeight) {\n\t    line.text = text;\n\t    if (line.stateAfter) { line.stateAfter = null; }\n\t    if (line.styles) { line.styles = null; }\n\t    if (line.order != null) { line.order = null; }\n\t    detachMarkedSpans(line);\n\t    attachMarkedSpans(line, markedSpans);\n\t    var estHeight = estimateHeight ? estimateHeight(line) : 1;\n\t    if (estHeight != line.height) { updateLineHeight(line, estHeight); }\n\t  }\n\n\t  // Detach a line from the document tree and its markers.\n\t  function cleanUpLine(line) {\n\t    line.parent = null;\n\t    detachMarkedSpans(line);\n\t  }\n\n\t  // Convert a style as returned by a mode (either null, or a string\n\t  // containing one or more styles) to a CSS style. This is cached,\n\t  // and also looks for line-wide styles.\n\t  var styleToClassCache = {}, styleToClassCacheWithMode = {};\n\t  function interpretTokenStyle(style, options) {\n\t    if (!style || /^\\s*$/.test(style)) { return null }\n\t    var cache = options.addModeClass ? styleToClassCacheWithMode : styleToClassCache;\n\t    return cache[style] ||\n\t      (cache[style] = style.replace(/\\S+/g, \"cm-$&\"))\n\t  }\n\n\t  // Render the DOM representation of the text of a line. Also builds\n\t  // up a 'line map', which points at the DOM nodes that represent\n\t  // specific stretches of text, and is used by the measuring code.\n\t  // The returned object contains the DOM node, this map, and\n\t  // information about line-wide styles that were set by the mode.\n\t  function buildLineContent(cm, lineView) {\n\t    // The padding-right forces the element to have a 'border', which\n\t    // is needed on Webkit to be able to get line-level bounding\n\t    // rectangles for it (in measureChar).\n\t    var content = eltP(\"span\", null, null, webkit ? \"padding-right: .1px\" : null);\n\t    var builder = {pre: eltP(\"pre\", [content], \"CodeMirror-line\"), content: content,\n\t                   col: 0, pos: 0, cm: cm,\n\t                   trailingSpace: false,\n\t                   splitSpaces: cm.getOption(\"lineWrapping\")};\n\t    lineView.measure = {};\n\n\t    // Iterate over the logical lines that make up this visual line.\n\t    for (var i = 0; i <= (lineView.rest ? lineView.rest.length : 0); i++) {\n\t      var line = i ? lineView.rest[i - 1] : lineView.line, order = (void 0);\n\t      builder.pos = 0;\n\t      builder.addToken = buildToken;\n\t      // Optionally wire in some hacks into the token-rendering\n\t      // algorithm, to deal with browser quirks.\n\t      if (hasBadBidiRects(cm.display.measure) && (order = getOrder(line, cm.doc.direction)))\n\t        { builder.addToken = buildTokenBadBidi(builder.addToken, order); }\n\t      builder.map = [];\n\t      var allowFrontierUpdate = lineView != cm.display.externalMeasured && lineNo(line);\n\t      insertLineContent(line, builder, getLineStyles(cm, line, allowFrontierUpdate));\n\t      if (line.styleClasses) {\n\t        if (line.styleClasses.bgClass)\n\t          { builder.bgClass = joinClasses(line.styleClasses.bgClass, builder.bgClass || \"\"); }\n\t        if (line.styleClasses.textClass)\n\t          { builder.textClass = joinClasses(line.styleClasses.textClass, builder.textClass || \"\"); }\n\t      }\n\n\t      // Ensure at least a single node is present, for measuring.\n\t      if (builder.map.length == 0)\n\t        { builder.map.push(0, 0, builder.content.appendChild(zeroWidthElement(cm.display.measure))); }\n\n\t      // Store the map and a cache object for the current logical line\n\t      if (i == 0) {\n\t        lineView.measure.map = builder.map;\n\t        lineView.measure.cache = {};\n\t      } else {\n\t  (lineView.measure.maps || (lineView.measure.maps = [])).push(builder.map)\n\t        ;(lineView.measure.caches || (lineView.measure.caches = [])).push({});\n\t      }\n\t    }\n\n\t    // See issue #2901\n\t    if (webkit) {\n\t      var last = builder.content.lastChild;\n\t      if (/\\bcm-tab\\b/.test(last.className) || (last.querySelector && last.querySelector(\".cm-tab\")))\n\t        { builder.content.className = \"cm-tab-wrap-hack\"; }\n\t    }\n\n\t    signal(cm, \"renderLine\", cm, lineView.line, builder.pre);\n\t    if (builder.pre.className)\n\t      { builder.textClass = joinClasses(builder.pre.className, builder.textClass || \"\"); }\n\n\t    return builder\n\t  }\n\n\t  function defaultSpecialCharPlaceholder(ch) {\n\t    var token = elt(\"span\", \"\\u2022\", \"cm-invalidchar\");\n\t    token.title = \"\\\\u\" + ch.charCodeAt(0).toString(16);\n\t    token.setAttribute(\"aria-label\", token.title);\n\t    return token\n\t  }\n\n\t  // Build up the DOM representation for a single token, and add it to\n\t  // the line map. Takes care to render special characters separately.\n\t  function buildToken(builder, text, style, startStyle, endStyle, css, attributes) {\n\t    if (!text) { return }\n\t    var displayText = builder.splitSpaces ? splitSpaces(text, builder.trailingSpace) : text;\n\t    var special = builder.cm.state.specialChars, mustWrap = false;\n\t    var content;\n\t    if (!special.test(text)) {\n\t      builder.col += text.length;\n\t      content = document.createTextNode(displayText);\n\t      builder.map.push(builder.pos, builder.pos + text.length, content);\n\t      if (ie && ie_version < 9) { mustWrap = true; }\n\t      builder.pos += text.length;\n\t    } else {\n\t      content = document.createDocumentFragment();\n\t      var pos = 0;\n\t      while (true) {\n\t        special.lastIndex = pos;\n\t        var m = special.exec(text);\n\t        var skipped = m ? m.index - pos : text.length - pos;\n\t        if (skipped) {\n\t          var txt = document.createTextNode(displayText.slice(pos, pos + skipped));\n\t          if (ie && ie_version < 9) { content.appendChild(elt(\"span\", [txt])); }\n\t          else { content.appendChild(txt); }\n\t          builder.map.push(builder.pos, builder.pos + skipped, txt);\n\t          builder.col += skipped;\n\t          builder.pos += skipped;\n\t        }\n\t        if (!m) { break }\n\t        pos += skipped + 1;\n\t        var txt$1 = (void 0);\n\t        if (m[0] == \"\\t\") {\n\t          var tabSize = builder.cm.options.tabSize, tabWidth = tabSize - builder.col % tabSize;\n\t          txt$1 = content.appendChild(elt(\"span\", spaceStr(tabWidth), \"cm-tab\"));\n\t          txt$1.setAttribute(\"role\", \"presentation\");\n\t          txt$1.setAttribute(\"cm-text\", \"\\t\");\n\t          builder.col += tabWidth;\n\t        } else if (m[0] == \"\\r\" || m[0] == \"\\n\") {\n\t          txt$1 = content.appendChild(elt(\"span\", m[0] == \"\\r\" ? \"\\u240d\" : \"\\u2424\", \"cm-invalidchar\"));\n\t          txt$1.setAttribute(\"cm-text\", m[0]);\n\t          builder.col += 1;\n\t        } else {\n\t          txt$1 = builder.cm.options.specialCharPlaceholder(m[0]);\n\t          txt$1.setAttribute(\"cm-text\", m[0]);\n\t          if (ie && ie_version < 9) { content.appendChild(elt(\"span\", [txt$1])); }\n\t          else { content.appendChild(txt$1); }\n\t          builder.col += 1;\n\t        }\n\t        builder.map.push(builder.pos, builder.pos + 1, txt$1);\n\t        builder.pos++;\n\t      }\n\t    }\n\t    builder.trailingSpace = displayText.charCodeAt(text.length - 1) == 32;\n\t    if (style || startStyle || endStyle || mustWrap || css || attributes) {\n\t      var fullStyle = style || \"\";\n\t      if (startStyle) { fullStyle += startStyle; }\n\t      if (endStyle) { fullStyle += endStyle; }\n\t      var token = elt(\"span\", [content], fullStyle, css);\n\t      if (attributes) {\n\t        for (var attr in attributes) { if (attributes.hasOwnProperty(attr) && attr != \"style\" && attr != \"class\")\n\t          { token.setAttribute(attr, attributes[attr]); } }\n\t      }\n\t      return builder.content.appendChild(token)\n\t    }\n\t    builder.content.appendChild(content);\n\t  }\n\n\t  // Change some spaces to NBSP to prevent the browser from collapsing\n\t  // trailing spaces at the end of a line when rendering text (issue #1362).\n\t  function splitSpaces(text, trailingBefore) {\n\t    if (text.length > 1 && !/  /.test(text)) { return text }\n\t    var spaceBefore = trailingBefore, result = \"\";\n\t    for (var i = 0; i < text.length; i++) {\n\t      var ch = text.charAt(i);\n\t      if (ch == \" \" && spaceBefore && (i == text.length - 1 || text.charCodeAt(i + 1) == 32))\n\t        { ch = \"\\u00a0\"; }\n\t      result += ch;\n\t      spaceBefore = ch == \" \";\n\t    }\n\t    return result\n\t  }\n\n\t  // Work around nonsense dimensions being reported for stretches of\n\t  // right-to-left text.\n\t  function buildTokenBadBidi(inner, order) {\n\t    return function (builder, text, style, startStyle, endStyle, css, attributes) {\n\t      style = style ? style + \" cm-force-border\" : \"cm-force-border\";\n\t      var start = builder.pos, end = start + text.length;\n\t      for (;;) {\n\t        // Find the part that overlaps with the start of this text\n\t        var part = (void 0);\n\t        for (var i = 0; i < order.length; i++) {\n\t          part = order[i];\n\t          if (part.to > start && part.from <= start) { break }\n\t        }\n\t        if (part.to >= end) { return inner(builder, text, style, startStyle, endStyle, css, attributes) }\n\t        inner(builder, text.slice(0, part.to - start), style, startStyle, null, css, attributes);\n\t        startStyle = null;\n\t        text = text.slice(part.to - start);\n\t        start = part.to;\n\t      }\n\t    }\n\t  }\n\n\t  function buildCollapsedSpan(builder, size, marker, ignoreWidget) {\n\t    var widget = !ignoreWidget && marker.widgetNode;\n\t    if (widget) { builder.map.push(builder.pos, builder.pos + size, widget); }\n\t    if (!ignoreWidget && builder.cm.display.input.needsContentAttribute) {\n\t      if (!widget)\n\t        { widget = builder.content.appendChild(document.createElement(\"span\")); }\n\t      widget.setAttribute(\"cm-marker\", marker.id);\n\t    }\n\t    if (widget) {\n\t      builder.cm.display.input.setUneditable(widget);\n\t      builder.content.appendChild(widget);\n\t    }\n\t    builder.pos += size;\n\t    builder.trailingSpace = false;\n\t  }\n\n\t  // Outputs a number of spans to make up a line, taking highlighting\n\t  // and marked text into account.\n\t  function insertLineContent(line, builder, styles) {\n\t    var spans = line.markedSpans, allText = line.text, at = 0;\n\t    if (!spans) {\n\t      for (var i$1 = 1; i$1 < styles.length; i$1+=2)\n\t        { builder.addToken(builder, allText.slice(at, at = styles[i$1]), interpretTokenStyle(styles[i$1+1], builder.cm.options)); }\n\t      return\n\t    }\n\n\t    var len = allText.length, pos = 0, i = 1, text = \"\", style, css;\n\t    var nextChange = 0, spanStyle, spanEndStyle, spanStartStyle, collapsed, attributes;\n\t    for (;;) {\n\t      if (nextChange == pos) { // Update current marker set\n\t        spanStyle = spanEndStyle = spanStartStyle = css = \"\";\n\t        attributes = null;\n\t        collapsed = null; nextChange = Infinity;\n\t        var foundBookmarks = [], endStyles = (void 0);\n\t        for (var j = 0; j < spans.length; ++j) {\n\t          var sp = spans[j], m = sp.marker;\n\t          if (m.type == \"bookmark\" && sp.from == pos && m.widgetNode) {\n\t            foundBookmarks.push(m);\n\t          } else if (sp.from <= pos && (sp.to == null || sp.to > pos || m.collapsed && sp.to == pos && sp.from == pos)) {\n\t            if (sp.to != null && sp.to != pos && nextChange > sp.to) {\n\t              nextChange = sp.to;\n\t              spanEndStyle = \"\";\n\t            }\n\t            if (m.className) { spanStyle += \" \" + m.className; }\n\t            if (m.css) { css = (css ? css + \";\" : \"\") + m.css; }\n\t            if (m.startStyle && sp.from == pos) { spanStartStyle += \" \" + m.startStyle; }\n\t            if (m.endStyle && sp.to == nextChange) { (endStyles || (endStyles = [])).push(m.endStyle, sp.to); }\n\t            // support for the old title property\n\t            // https://github.com/codemirror/CodeMirror/pull/5673\n\t            if (m.title) { (attributes || (attributes = {})).title = m.title; }\n\t            if (m.attributes) {\n\t              for (var attr in m.attributes)\n\t                { (attributes || (attributes = {}))[attr] = m.attributes[attr]; }\n\t            }\n\t            if (m.collapsed && (!collapsed || compareCollapsedMarkers(collapsed.marker, m) < 0))\n\t              { collapsed = sp; }\n\t          } else if (sp.from > pos && nextChange > sp.from) {\n\t            nextChange = sp.from;\n\t          }\n\t        }\n\t        if (endStyles) { for (var j$1 = 0; j$1 < endStyles.length; j$1 += 2)\n\t          { if (endStyles[j$1 + 1] == nextChange) { spanEndStyle += \" \" + endStyles[j$1]; } } }\n\n\t        if (!collapsed || collapsed.from == pos) { for (var j$2 = 0; j$2 < foundBookmarks.length; ++j$2)\n\t          { buildCollapsedSpan(builder, 0, foundBookmarks[j$2]); } }\n\t        if (collapsed && (collapsed.from || 0) == pos) {\n\t          buildCollapsedSpan(builder, (collapsed.to == null ? len + 1 : collapsed.to) - pos,\n\t                             collapsed.marker, collapsed.from == null);\n\t          if (collapsed.to == null) { return }\n\t          if (collapsed.to == pos) { collapsed = false; }\n\t        }\n\t      }\n\t      if (pos >= len) { break }\n\n\t      var upto = Math.min(len, nextChange);\n\t      while (true) {\n\t        if (text) {\n\t          var end = pos + text.length;\n\t          if (!collapsed) {\n\t            var tokenText = end > upto ? text.slice(0, upto - pos) : text;\n\t            builder.addToken(builder, tokenText, style ? style + spanStyle : spanStyle,\n\t                             spanStartStyle, pos + tokenText.length == nextChange ? spanEndStyle : \"\", css, attributes);\n\t          }\n\t          if (end >= upto) {text = text.slice(upto - pos); pos = upto; break}\n\t          pos = end;\n\t          spanStartStyle = \"\";\n\t        }\n\t        text = allText.slice(at, at = styles[i++]);\n\t        style = interpretTokenStyle(styles[i++], builder.cm.options);\n\t      }\n\t    }\n\t  }\n\n\n\t  // These objects are used to represent the visible (currently drawn)\n\t  // part of the document. A LineView may correspond to multiple\n\t  // logical lines, if those are connected by collapsed ranges.\n\t  function LineView(doc, line, lineN) {\n\t    // The starting line\n\t    this.line = line;\n\t    // Continuing lines, if any\n\t    this.rest = visualLineContinued(line);\n\t    // Number of logical lines in this visual line\n\t    this.size = this.rest ? lineNo(lst(this.rest)) - lineN + 1 : 1;\n\t    this.node = this.text = null;\n\t    this.hidden = lineIsHidden(doc, line);\n\t  }\n\n\t  // Create a range of LineView objects for the given lines.\n\t  function buildViewArray(cm, from, to) {\n\t    var array = [], nextPos;\n\t    for (var pos = from; pos < to; pos = nextPos) {\n\t      var view = new LineView(cm.doc, getLine(cm.doc, pos), pos);\n\t      nextPos = pos + view.size;\n\t      array.push(view);\n\t    }\n\t    return array\n\t  }\n\n\t  var operationGroup = null;\n\n\t  function pushOperation(op) {\n\t    if (operationGroup) {\n\t      operationGroup.ops.push(op);\n\t    } else {\n\t      op.ownsGroup = operationGroup = {\n\t        ops: [op],\n\t        delayedCallbacks: []\n\t      };\n\t    }\n\t  }\n\n\t  function fireCallbacksForOps(group) {\n\t    // Calls delayed callbacks and cursorActivity handlers until no\n\t    // new ones appear\n\t    var callbacks = group.delayedCallbacks, i = 0;\n\t    do {\n\t      for (; i < callbacks.length; i++)\n\t        { callbacks[i].call(null); }\n\t      for (var j = 0; j < group.ops.length; j++) {\n\t        var op = group.ops[j];\n\t        if (op.cursorActivityHandlers)\n\t          { while (op.cursorActivityCalled < op.cursorActivityHandlers.length)\n\t            { op.cursorActivityHandlers[op.cursorActivityCalled++].call(null, op.cm); } }\n\t      }\n\t    } while (i < callbacks.length)\n\t  }\n\n\t  function finishOperation(op, endCb) {\n\t    var group = op.ownsGroup;\n\t    if (!group) { return }\n\n\t    try { fireCallbacksForOps(group); }\n\t    finally {\n\t      operationGroup = null;\n\t      endCb(group);\n\t    }\n\t  }\n\n\t  var orphanDelayedCallbacks = null;\n\n\t  // Often, we want to signal events at a point where we are in the\n\t  // middle of some work, but don't want the handler to start calling\n\t  // other methods on the editor, which might be in an inconsistent\n\t  // state or simply not expect any other events to happen.\n\t  // signalLater looks whether there are any handlers, and schedules\n\t  // them to be executed when the last operation ends, or, if no\n\t  // operation is active, when a timeout fires.\n\t  function signalLater(emitter, type /*, values...*/) {\n\t    var arr = getHandlers(emitter, type);\n\t    if (!arr.length) { return }\n\t    var args = Array.prototype.slice.call(arguments, 2), list;\n\t    if (operationGroup) {\n\t      list = operationGroup.delayedCallbacks;\n\t    } else if (orphanDelayedCallbacks) {\n\t      list = orphanDelayedCallbacks;\n\t    } else {\n\t      list = orphanDelayedCallbacks = [];\n\t      setTimeout(fireOrphanDelayed, 0);\n\t    }\n\t    var loop = function ( i ) {\n\t      list.push(function () { return arr[i].apply(null, args); });\n\t    };\n\n\t    for (var i = 0; i < arr.length; ++i)\n\t      loop( i );\n\t  }\n\n\t  function fireOrphanDelayed() {\n\t    var delayed = orphanDelayedCallbacks;\n\t    orphanDelayedCallbacks = null;\n\t    for (var i = 0; i < delayed.length; ++i) { delayed[i](); }\n\t  }\n\n\t  // When an aspect of a line changes, a string is added to\n\t  // lineView.changes. This updates the relevant part of the line's\n\t  // DOM structure.\n\t  function updateLineForChanges(cm, lineView, lineN, dims) {\n\t    for (var j = 0; j < lineView.changes.length; j++) {\n\t      var type = lineView.changes[j];\n\t      if (type == \"text\") { updateLineText(cm, lineView); }\n\t      else if (type == \"gutter\") { updateLineGutter(cm, lineView, lineN, dims); }\n\t      else if (type == \"class\") { updateLineClasses(cm, lineView); }\n\t      else if (type == \"widget\") { updateLineWidgets(cm, lineView, dims); }\n\t    }\n\t    lineView.changes = null;\n\t  }\n\n\t  // Lines with gutter elements, widgets or a background class need to\n\t  // be wrapped, and have the extra elements added to the wrapper div\n\t  function ensureLineWrapped(lineView) {\n\t    if (lineView.node == lineView.text) {\n\t      lineView.node = elt(\"div\", null, null, \"position: relative\");\n\t      if (lineView.text.parentNode)\n\t        { lineView.text.parentNode.replaceChild(lineView.node, lineView.text); }\n\t      lineView.node.appendChild(lineView.text);\n\t      if (ie && ie_version < 8) { lineView.node.style.zIndex = 2; }\n\t    }\n\t    return lineView.node\n\t  }\n\n\t  function updateLineBackground(cm, lineView) {\n\t    var cls = lineView.bgClass ? lineView.bgClass + \" \" + (lineView.line.bgClass || \"\") : lineView.line.bgClass;\n\t    if (cls) { cls += \" CodeMirror-linebackground\"; }\n\t    if (lineView.background) {\n\t      if (cls) { lineView.background.className = cls; }\n\t      else { lineView.background.parentNode.removeChild(lineView.background); lineView.background = null; }\n\t    } else if (cls) {\n\t      var wrap = ensureLineWrapped(lineView);\n\t      lineView.background = wrap.insertBefore(elt(\"div\", null, cls), wrap.firstChild);\n\t      cm.display.input.setUneditable(lineView.background);\n\t    }\n\t  }\n\n\t  // Wrapper around buildLineContent which will reuse the structure\n\t  // in display.externalMeasured when possible.\n\t  function getLineContent(cm, lineView) {\n\t    var ext = cm.display.externalMeasured;\n\t    if (ext && ext.line == lineView.line) {\n\t      cm.display.externalMeasured = null;\n\t      lineView.measure = ext.measure;\n\t      return ext.built\n\t    }\n\t    return buildLineContent(cm, lineView)\n\t  }\n\n\t  // Redraw the line's text. Interacts with the background and text\n\t  // classes because the mode may output tokens that influence these\n\t  // classes.\n\t  function updateLineText(cm, lineView) {\n\t    var cls = lineView.text.className;\n\t    var built = getLineContent(cm, lineView);\n\t    if (lineView.text == lineView.node) { lineView.node = built.pre; }\n\t    lineView.text.parentNode.replaceChild(built.pre, lineView.text);\n\t    lineView.text = built.pre;\n\t    if (built.bgClass != lineView.bgClass || built.textClass != lineView.textClass) {\n\t      lineView.bgClass = built.bgClass;\n\t      lineView.textClass = built.textClass;\n\t      updateLineClasses(cm, lineView);\n\t    } else if (cls) {\n\t      lineView.text.className = cls;\n\t    }\n\t  }\n\n\t  function updateLineClasses(cm, lineView) {\n\t    updateLineBackground(cm, lineView);\n\t    if (lineView.line.wrapClass)\n\t      { ensureLineWrapped(lineView).className = lineView.line.wrapClass; }\n\t    else if (lineView.node != lineView.text)\n\t      { lineView.node.className = \"\"; }\n\t    var textClass = lineView.textClass ? lineView.textClass + \" \" + (lineView.line.textClass || \"\") : lineView.line.textClass;\n\t    lineView.text.className = textClass || \"\";\n\t  }\n\n\t  function updateLineGutter(cm, lineView, lineN, dims) {\n\t    if (lineView.gutter) {\n\t      lineView.node.removeChild(lineView.gutter);\n\t      lineView.gutter = null;\n\t    }\n\t    if (lineView.gutterBackground) {\n\t      lineView.node.removeChild(lineView.gutterBackground);\n\t      lineView.gutterBackground = null;\n\t    }\n\t    if (lineView.line.gutterClass) {\n\t      var wrap = ensureLineWrapped(lineView);\n\t      lineView.gutterBackground = elt(\"div\", null, \"CodeMirror-gutter-background \" + lineView.line.gutterClass,\n\t                                      (\"left: \" + (cm.options.fixedGutter ? dims.fixedPos : -dims.gutterTotalWidth) + \"px; width: \" + (dims.gutterTotalWidth) + \"px\"));\n\t      cm.display.input.setUneditable(lineView.gutterBackground);\n\t      wrap.insertBefore(lineView.gutterBackground, lineView.text);\n\t    }\n\t    var markers = lineView.line.gutterMarkers;\n\t    if (cm.options.lineNumbers || markers) {\n\t      var wrap$1 = ensureLineWrapped(lineView);\n\t      var gutterWrap = lineView.gutter = elt(\"div\", null, \"CodeMirror-gutter-wrapper\", (\"left: \" + (cm.options.fixedGutter ? dims.fixedPos : -dims.gutterTotalWidth) + \"px\"));\n\t      cm.display.input.setUneditable(gutterWrap);\n\t      wrap$1.insertBefore(gutterWrap, lineView.text);\n\t      if (lineView.line.gutterClass)\n\t        { gutterWrap.className += \" \" + lineView.line.gutterClass; }\n\t      if (cm.options.lineNumbers && (!markers || !markers[\"CodeMirror-linenumbers\"]))\n\t        { lineView.lineNumber = gutterWrap.appendChild(\n\t          elt(\"div\", lineNumberFor(cm.options, lineN),\n\t              \"CodeMirror-linenumber CodeMirror-gutter-elt\",\n\t              (\"left: \" + (dims.gutterLeft[\"CodeMirror-linenumbers\"]) + \"px; width: \" + (cm.display.lineNumInnerWidth) + \"px\"))); }\n\t      if (markers) { for (var k = 0; k < cm.display.gutterSpecs.length; ++k) {\n\t        var id = cm.display.gutterSpecs[k].className, found = markers.hasOwnProperty(id) && markers[id];\n\t        if (found)\n\t          { gutterWrap.appendChild(elt(\"div\", [found], \"CodeMirror-gutter-elt\",\n\t                                     (\"left: \" + (dims.gutterLeft[id]) + \"px; width: \" + (dims.gutterWidth[id]) + \"px\"))); }\n\t      } }\n\t    }\n\t  }\n\n\t  function updateLineWidgets(cm, lineView, dims) {\n\t    if (lineView.alignable) { lineView.alignable = null; }\n\t    var isWidget = classTest(\"CodeMirror-linewidget\");\n\t    for (var node = lineView.node.firstChild, next = (void 0); node; node = next) {\n\t      next = node.nextSibling;\n\t      if (isWidget.test(node.className)) { lineView.node.removeChild(node); }\n\t    }\n\t    insertLineWidgets(cm, lineView, dims);\n\t  }\n\n\t  // Build a line's DOM representation from scratch\n\t  function buildLineElement(cm, lineView, lineN, dims) {\n\t    var built = getLineContent(cm, lineView);\n\t    lineView.text = lineView.node = built.pre;\n\t    if (built.bgClass) { lineView.bgClass = built.bgClass; }\n\t    if (built.textClass) { lineView.textClass = built.textClass; }\n\n\t    updateLineClasses(cm, lineView);\n\t    updateLineGutter(cm, lineView, lineN, dims);\n\t    insertLineWidgets(cm, lineView, dims);\n\t    return lineView.node\n\t  }\n\n\t  // A lineView may contain multiple logical lines (when merged by\n\t  // collapsed spans). The widgets for all of them need to be drawn.\n\t  function insertLineWidgets(cm, lineView, dims) {\n\t    insertLineWidgetsFor(cm, lineView.line, lineView, dims, true);\n\t    if (lineView.rest) { for (var i = 0; i < lineView.rest.length; i++)\n\t      { insertLineWidgetsFor(cm, lineView.rest[i], lineView, dims, false); } }\n\t  }\n\n\t  function insertLineWidgetsFor(cm, line, lineView, dims, allowAbove) {\n\t    if (!line.widgets) { return }\n\t    var wrap = ensureLineWrapped(lineView);\n\t    for (var i = 0, ws = line.widgets; i < ws.length; ++i) {\n\t      var widget = ws[i], node = elt(\"div\", [widget.node], \"CodeMirror-linewidget\" + (widget.className ? \" \" + widget.className : \"\"));\n\t      if (!widget.handleMouseEvents) { node.setAttribute(\"cm-ignore-events\", \"true\"); }\n\t      positionLineWidget(widget, node, lineView, dims);\n\t      cm.display.input.setUneditable(node);\n\t      if (allowAbove && widget.above)\n\t        { wrap.insertBefore(node, lineView.gutter || lineView.text); }\n\t      else\n\t        { wrap.appendChild(node); }\n\t      signalLater(widget, \"redraw\");\n\t    }\n\t  }\n\n\t  function positionLineWidget(widget, node, lineView, dims) {\n\t    if (widget.noHScroll) {\n\t  (lineView.alignable || (lineView.alignable = [])).push(node);\n\t      var width = dims.wrapperWidth;\n\t      node.style.left = dims.fixedPos + \"px\";\n\t      if (!widget.coverGutter) {\n\t        width -= dims.gutterTotalWidth;\n\t        node.style.paddingLeft = dims.gutterTotalWidth + \"px\";\n\t      }\n\t      node.style.width = width + \"px\";\n\t    }\n\t    if (widget.coverGutter) {\n\t      node.style.zIndex = 5;\n\t      node.style.position = \"relative\";\n\t      if (!widget.noHScroll) { node.style.marginLeft = -dims.gutterTotalWidth + \"px\"; }\n\t    }\n\t  }\n\n\t  function widgetHeight(widget) {\n\t    if (widget.height != null) { return widget.height }\n\t    var cm = widget.doc.cm;\n\t    if (!cm) { return 0 }\n\t    if (!contains(document.body, widget.node)) {\n\t      var parentStyle = \"position: relative;\";\n\t      if (widget.coverGutter)\n\t        { parentStyle += \"margin-left: -\" + cm.display.gutters.offsetWidth + \"px;\"; }\n\t      if (widget.noHScroll)\n\t        { parentStyle += \"width: \" + cm.display.wrapper.clientWidth + \"px;\"; }\n\t      removeChildrenAndAdd(cm.display.measure, elt(\"div\", [widget.node], null, parentStyle));\n\t    }\n\t    return widget.height = widget.node.parentNode.offsetHeight\n\t  }\n\n\t  // Return true when the given mouse event happened in a widget\n\t  function eventInWidget(display, e) {\n\t    for (var n = e_target(e); n != display.wrapper; n = n.parentNode) {\n\t      if (!n || (n.nodeType == 1 && n.getAttribute(\"cm-ignore-events\") == \"true\") ||\n\t          (n.parentNode == display.sizer && n != display.mover))\n\t        { return true }\n\t    }\n\t  }\n\n\t  // POSITION MEASUREMENT\n\n\t  function paddingTop(display) {return display.lineSpace.offsetTop}\n\t  function paddingVert(display) {return display.mover.offsetHeight - display.lineSpace.offsetHeight}\n\t  function paddingH(display) {\n\t    if (display.cachedPaddingH) { return display.cachedPaddingH }\n\t    var e = removeChildrenAndAdd(display.measure, elt(\"pre\", \"x\", \"CodeMirror-line-like\"));\n\t    var style = window.getComputedStyle ? window.getComputedStyle(e) : e.currentStyle;\n\t    var data = {left: parseInt(style.paddingLeft), right: parseInt(style.paddingRight)};\n\t    if (!isNaN(data.left) && !isNaN(data.right)) { display.cachedPaddingH = data; }\n\t    return data\n\t  }\n\n\t  function scrollGap(cm) { return scrollerGap - cm.display.nativeBarWidth }\n\t  function displayWidth(cm) {\n\t    return cm.display.scroller.clientWidth - scrollGap(cm) - cm.display.barWidth\n\t  }\n\t  function displayHeight(cm) {\n\t    return cm.display.scroller.clientHeight - scrollGap(cm) - cm.display.barHeight\n\t  }\n\n\t  // Ensure the lineView.wrapping.heights array is populated. This is\n\t  // an array of bottom offsets for the lines that make up a drawn\n\t  // line. When lineWrapping is on, there might be more than one\n\t  // height.\n\t  function ensureLineHeights(cm, lineView, rect) {\n\t    var wrapping = cm.options.lineWrapping;\n\t    var curWidth = wrapping && displayWidth(cm);\n\t    if (!lineView.measure.heights || wrapping && lineView.measure.width != curWidth) {\n\t      var heights = lineView.measure.heights = [];\n\t      if (wrapping) {\n\t        lineView.measure.width = curWidth;\n\t        var rects = lineView.text.firstChild.getClientRects();\n\t        for (var i = 0; i < rects.length - 1; i++) {\n\t          var cur = rects[i], next = rects[i + 1];\n\t          if (Math.abs(cur.bottom - next.bottom) > 2)\n\t            { heights.push((cur.bottom + next.top) / 2 - rect.top); }\n\t        }\n\t      }\n\t      heights.push(rect.bottom - rect.top);\n\t    }\n\t  }\n\n\t  // Find a line map (mapping character offsets to text nodes) and a\n\t  // measurement cache for the given line number. (A line view might\n\t  // contain multiple lines when collapsed ranges are present.)\n\t  function mapFromLineView(lineView, line, lineN) {\n\t    if (lineView.line == line)\n\t      { return {map: lineView.measure.map, cache: lineView.measure.cache} }\n\t    for (var i = 0; i < lineView.rest.length; i++)\n\t      { if (lineView.rest[i] == line)\n\t        { return {map: lineView.measure.maps[i], cache: lineView.measure.caches[i]} } }\n\t    for (var i$1 = 0; i$1 < lineView.rest.length; i$1++)\n\t      { if (lineNo(lineView.rest[i$1]) > lineN)\n\t        { return {map: lineView.measure.maps[i$1], cache: lineView.measure.caches[i$1], before: true} } }\n\t  }\n\n\t  // Render a line into the hidden node display.externalMeasured. Used\n\t  // when measurement is needed for a line that's not in the viewport.\n\t  function updateExternalMeasurement(cm, line) {\n\t    line = visualLine(line);\n\t    var lineN = lineNo(line);\n\t    var view = cm.display.externalMeasured = new LineView(cm.doc, line, lineN);\n\t    view.lineN = lineN;\n\t    var built = view.built = buildLineContent(cm, view);\n\t    view.text = built.pre;\n\t    removeChildrenAndAdd(cm.display.lineMeasure, built.pre);\n\t    return view\n\t  }\n\n\t  // Get a {top, bottom, left, right} box (in line-local coordinates)\n\t  // for a given character.\n\t  function measureChar(cm, line, ch, bias) {\n\t    return measureCharPrepared(cm, prepareMeasureForLine(cm, line), ch, bias)\n\t  }\n\n\t  // Find a line view that corresponds to the given line number.\n\t  function findViewForLine(cm, lineN) {\n\t    if (lineN >= cm.display.viewFrom && lineN < cm.display.viewTo)\n\t      { return cm.display.view[findViewIndex(cm, lineN)] }\n\t    var ext = cm.display.externalMeasured;\n\t    if (ext && lineN >= ext.lineN && lineN < ext.lineN + ext.size)\n\t      { return ext }\n\t  }\n\n\t  // Measurement can be split in two steps, the set-up work that\n\t  // applies to the whole line, and the measurement of the actual\n\t  // character. Functions like coordsChar, that need to do a lot of\n\t  // measurements in a row, can thus ensure that the set-up work is\n\t  // only done once.\n\t  function prepareMeasureForLine(cm, line) {\n\t    var lineN = lineNo(line);\n\t    var view = findViewForLine(cm, lineN);\n\t    if (view && !view.text) {\n\t      view = null;\n\t    } else if (view && view.changes) {\n\t      updateLineForChanges(cm, view, lineN, getDimensions(cm));\n\t      cm.curOp.forceUpdate = true;\n\t    }\n\t    if (!view)\n\t      { view = updateExternalMeasurement(cm, line); }\n\n\t    var info = mapFromLineView(view, line, lineN);\n\t    return {\n\t      line: line, view: view, rect: null,\n\t      map: info.map, cache: info.cache, before: info.before,\n\t      hasHeights: false\n\t    }\n\t  }\n\n\t  // Given a prepared measurement object, measures the position of an\n\t  // actual character (or fetches it from the cache).\n\t  function measureCharPrepared(cm, prepared, ch, bias, varHeight) {\n\t    if (prepared.before) { ch = -1; }\n\t    var key = ch + (bias || \"\"), found;\n\t    if (prepared.cache.hasOwnProperty(key)) {\n\t      found = prepared.cache[key];\n\t    } else {\n\t      if (!prepared.rect)\n\t        { prepared.rect = prepared.view.text.getBoundingClientRect(); }\n\t      if (!prepared.hasHeights) {\n\t        ensureLineHeights(cm, prepared.view, prepared.rect);\n\t        prepared.hasHeights = true;\n\t      }\n\t      found = measureCharInner(cm, prepared, ch, bias);\n\t      if (!found.bogus) { prepared.cache[key] = found; }\n\t    }\n\t    return {left: found.left, right: found.right,\n\t            top: varHeight ? found.rtop : found.top,\n\t            bottom: varHeight ? found.rbottom : found.bottom}\n\t  }\n\n\t  var nullRect = {left: 0, right: 0, top: 0, bottom: 0};\n\n\t  function nodeAndOffsetInLineMap(map, ch, bias) {\n\t    var node, start, end, collapse, mStart, mEnd;\n\t    // First, search the line map for the text node corresponding to,\n\t    // or closest to, the target character.\n\t    for (var i = 0; i < map.length; i += 3) {\n\t      mStart = map[i];\n\t      mEnd = map[i + 1];\n\t      if (ch < mStart) {\n\t        start = 0; end = 1;\n\t        collapse = \"left\";\n\t      } else if (ch < mEnd) {\n\t        start = ch - mStart;\n\t        end = start + 1;\n\t      } else if (i == map.length - 3 || ch == mEnd && map[i + 3] > ch) {\n\t        end = mEnd - mStart;\n\t        start = end - 1;\n\t        if (ch >= mEnd) { collapse = \"right\"; }\n\t      }\n\t      if (start != null) {\n\t        node = map[i + 2];\n\t        if (mStart == mEnd && bias == (node.insertLeft ? \"left\" : \"right\"))\n\t          { collapse = bias; }\n\t        if (bias == \"left\" && start == 0)\n\t          { while (i && map[i - 2] == map[i - 3] && map[i - 1].insertLeft) {\n\t            node = map[(i -= 3) + 2];\n\t            collapse = \"left\";\n\t          } }\n\t        if (bias == \"right\" && start == mEnd - mStart)\n\t          { while (i < map.length - 3 && map[i + 3] == map[i + 4] && !map[i + 5].insertLeft) {\n\t            node = map[(i += 3) + 2];\n\t            collapse = \"right\";\n\t          } }\n\t        break\n\t      }\n\t    }\n\t    return {node: node, start: start, end: end, collapse: collapse, coverStart: mStart, coverEnd: mEnd}\n\t  }\n\n\t  function getUsefulRect(rects, bias) {\n\t    var rect = nullRect;\n\t    if (bias == \"left\") { for (var i = 0; i < rects.length; i++) {\n\t      if ((rect = rects[i]).left != rect.right) { break }\n\t    } } else { for (var i$1 = rects.length - 1; i$1 >= 0; i$1--) {\n\t      if ((rect = rects[i$1]).left != rect.right) { break }\n\t    } }\n\t    return rect\n\t  }\n\n\t  function measureCharInner(cm, prepared, ch, bias) {\n\t    var place = nodeAndOffsetInLineMap(prepared.map, ch, bias);\n\t    var node = place.node, start = place.start, end = place.end, collapse = place.collapse;\n\n\t    var rect;\n\t    if (node.nodeType == 3) { // If it is a text node, use a range to retrieve the coordinates.\n\t      for (var i$1 = 0; i$1 < 4; i$1++) { // Retry a maximum of 4 times when nonsense rectangles are returned\n\t        while (start && isExtendingChar(prepared.line.text.charAt(place.coverStart + start))) { --start; }\n\t        while (place.coverStart + end < place.coverEnd && isExtendingChar(prepared.line.text.charAt(place.coverStart + end))) { ++end; }\n\t        if (ie && ie_version < 9 && start == 0 && end == place.coverEnd - place.coverStart)\n\t          { rect = node.parentNode.getBoundingClientRect(); }\n\t        else\n\t          { rect = getUsefulRect(range(node, start, end).getClientRects(), bias); }\n\t        if (rect.left || rect.right || start == 0) { break }\n\t        end = start;\n\t        start = start - 1;\n\t        collapse = \"right\";\n\t      }\n\t      if (ie && ie_version < 11) { rect = maybeUpdateRectForZooming(cm.display.measure, rect); }\n\t    } else { // If it is a widget, simply get the box for the whole widget.\n\t      if (start > 0) { collapse = bias = \"right\"; }\n\t      var rects;\n\t      if (cm.options.lineWrapping && (rects = node.getClientRects()).length > 1)\n\t        { rect = rects[bias == \"right\" ? rects.length - 1 : 0]; }\n\t      else\n\t        { rect = node.getBoundingClientRect(); }\n\t    }\n\t    if (ie && ie_version < 9 && !start && (!rect || !rect.left && !rect.right)) {\n\t      var rSpan = node.parentNode.getClientRects()[0];\n\t      if (rSpan)\n\t        { rect = {left: rSpan.left, right: rSpan.left + charWidth(cm.display), top: rSpan.top, bottom: rSpan.bottom}; }\n\t      else\n\t        { rect = nullRect; }\n\t    }\n\n\t    var rtop = rect.top - prepared.rect.top, rbot = rect.bottom - prepared.rect.top;\n\t    var mid = (rtop + rbot) / 2;\n\t    var heights = prepared.view.measure.heights;\n\t    var i = 0;\n\t    for (; i < heights.length - 1; i++)\n\t      { if (mid < heights[i]) { break } }\n\t    var top = i ? heights[i - 1] : 0, bot = heights[i];\n\t    var result = {left: (collapse == \"right\" ? rect.right : rect.left) - prepared.rect.left,\n\t                  right: (collapse == \"left\" ? rect.left : rect.right) - prepared.rect.left,\n\t                  top: top, bottom: bot};\n\t    if (!rect.left && !rect.right) { result.bogus = true; }\n\t    if (!cm.options.singleCursorHeightPerLine) { result.rtop = rtop; result.rbottom = rbot; }\n\n\t    return result\n\t  }\n\n\t  // Work around problem with bounding client rects on ranges being\n\t  // returned incorrectly when zoomed on IE10 and below.\n\t  function maybeUpdateRectForZooming(measure, rect) {\n\t    if (!window.screen || screen.logicalXDPI == null ||\n\t        screen.logicalXDPI == screen.deviceXDPI || !hasBadZoomedRects(measure))\n\t      { return rect }\n\t    var scaleX = screen.logicalXDPI / screen.deviceXDPI;\n\t    var scaleY = screen.logicalYDPI / screen.deviceYDPI;\n\t    return {left: rect.left * scaleX, right: rect.right * scaleX,\n\t            top: rect.top * scaleY, bottom: rect.bottom * scaleY}\n\t  }\n\n\t  function clearLineMeasurementCacheFor(lineView) {\n\t    if (lineView.measure) {\n\t      lineView.measure.cache = {};\n\t      lineView.measure.heights = null;\n\t      if (lineView.rest) { for (var i = 0; i < lineView.rest.length; i++)\n\t        { lineView.measure.caches[i] = {}; } }\n\t    }\n\t  }\n\n\t  function clearLineMeasurementCache(cm) {\n\t    cm.display.externalMeasure = null;\n\t    removeChildren(cm.display.lineMeasure);\n\t    for (var i = 0; i < cm.display.view.length; i++)\n\t      { clearLineMeasurementCacheFor(cm.display.view[i]); }\n\t  }\n\n\t  function clearCaches(cm) {\n\t    clearLineMeasurementCache(cm);\n\t    cm.display.cachedCharWidth = cm.display.cachedTextHeight = cm.display.cachedPaddingH = null;\n\t    if (!cm.options.lineWrapping) { cm.display.maxLineChanged = true; }\n\t    cm.display.lineNumChars = null;\n\t  }\n\n\t  function pageScrollX() {\n\t    // Work around https://bugs.chromium.org/p/chromium/issues/detail?id=489206\n\t    // which causes page_Offset and bounding client rects to use\n\t    // different reference viewports and invalidate our calculations.\n\t    if (chrome && android) { return -(document.body.getBoundingClientRect().left - parseInt(getComputedStyle(document.body).marginLeft)) }\n\t    return window.pageXOffset || (document.documentElement || document.body).scrollLeft\n\t  }\n\t  function pageScrollY() {\n\t    if (chrome && android) { return -(document.body.getBoundingClientRect().top - parseInt(getComputedStyle(document.body).marginTop)) }\n\t    return window.pageYOffset || (document.documentElement || document.body).scrollTop\n\t  }\n\n\t  function widgetTopHeight(lineObj) {\n\t    var height = 0;\n\t    if (lineObj.widgets) { for (var i = 0; i < lineObj.widgets.length; ++i) { if (lineObj.widgets[i].above)\n\t      { height += widgetHeight(lineObj.widgets[i]); } } }\n\t    return height\n\t  }\n\n\t  // Converts a {top, bottom, left, right} box from line-local\n\t  // coordinates into another coordinate system. Context may be one of\n\t  // \"line\", \"div\" (display.lineDiv), \"local\"./null (editor), \"window\",\n\t  // or \"page\".\n\t  function intoCoordSystem(cm, lineObj, rect, context, includeWidgets) {\n\t    if (!includeWidgets) {\n\t      var height = widgetTopHeight(lineObj);\n\t      rect.top += height; rect.bottom += height;\n\t    }\n\t    if (context == \"line\") { return rect }\n\t    if (!context) { context = \"local\"; }\n\t    var yOff = heightAtLine(lineObj);\n\t    if (context == \"local\") { yOff += paddingTop(cm.display); }\n\t    else { yOff -= cm.display.viewOffset; }\n\t    if (context == \"page\" || context == \"window\") {\n\t      var lOff = cm.display.lineSpace.getBoundingClientRect();\n\t      yOff += lOff.top + (context == \"window\" ? 0 : pageScrollY());\n\t      var xOff = lOff.left + (context == \"window\" ? 0 : pageScrollX());\n\t      rect.left += xOff; rect.right += xOff;\n\t    }\n\t    rect.top += yOff; rect.bottom += yOff;\n\t    return rect\n\t  }\n\n\t  // Coverts a box from \"div\" coords to another coordinate system.\n\t  // Context may be \"window\", \"page\", \"div\", or \"local\"./null.\n\t  function fromCoordSystem(cm, coords, context) {\n\t    if (context == \"div\") { return coords }\n\t    var left = coords.left, top = coords.top;\n\t    // First move into \"page\" coordinate system\n\t    if (context == \"page\") {\n\t      left -= pageScrollX();\n\t      top -= pageScrollY();\n\t    } else if (context == \"local\" || !context) {\n\t      var localBox = cm.display.sizer.getBoundingClientRect();\n\t      left += localBox.left;\n\t      top += localBox.top;\n\t    }\n\n\t    var lineSpaceBox = cm.display.lineSpace.getBoundingClientRect();\n\t    return {left: left - lineSpaceBox.left, top: top - lineSpaceBox.top}\n\t  }\n\n\t  function charCoords(cm, pos, context, lineObj, bias) {\n\t    if (!lineObj) { lineObj = getLine(cm.doc, pos.line); }\n\t    return intoCoordSystem(cm, lineObj, measureChar(cm, lineObj, pos.ch, bias), context)\n\t  }\n\n\t  // Returns a box for a given cursor position, which may have an\n\t  // 'other' property containing the position of the secondary cursor\n\t  // on a bidi boundary.\n\t  // A cursor Pos(line, char, \"before\") is on the same visual line as `char - 1`\n\t  // and after `char - 1` in writing order of `char - 1`\n\t  // A cursor Pos(line, char, \"after\") is on the same visual line as `char`\n\t  // and before `char` in writing order of `char`\n\t  // Examples (upper-case letters are RTL, lower-case are LTR):\n\t  //     Pos(0, 1, ...)\n\t  //     before   after\n\t  // ab     a|b     a|b\n\t  // aB     a|B     aB|\n\t  // Ab     |Ab     A|b\n\t  // AB     B|A     B|A\n\t  // Every position after the last character on a line is considered to stick\n\t  // to the last character on the line.\n\t  function cursorCoords(cm, pos, context, lineObj, preparedMeasure, varHeight) {\n\t    lineObj = lineObj || getLine(cm.doc, pos.line);\n\t    if (!preparedMeasure) { preparedMeasure = prepareMeasureForLine(cm, lineObj); }\n\t    function get(ch, right) {\n\t      var m = measureCharPrepared(cm, preparedMeasure, ch, right ? \"right\" : \"left\", varHeight);\n\t      if (right) { m.left = m.right; } else { m.right = m.left; }\n\t      return intoCoordSystem(cm, lineObj, m, context)\n\t    }\n\t    var order = getOrder(lineObj, cm.doc.direction), ch = pos.ch, sticky = pos.sticky;\n\t    if (ch >= lineObj.text.length) {\n\t      ch = lineObj.text.length;\n\t      sticky = \"before\";\n\t    } else if (ch <= 0) {\n\t      ch = 0;\n\t      sticky = \"after\";\n\t    }\n\t    if (!order) { return get(sticky == \"before\" ? ch - 1 : ch, sticky == \"before\") }\n\n\t    function getBidi(ch, partPos, invert) {\n\t      var part = order[partPos], right = part.level == 1;\n\t      return get(invert ? ch - 1 : ch, right != invert)\n\t    }\n\t    var partPos = getBidiPartAt(order, ch, sticky);\n\t    var other = bidiOther;\n\t    var val = getBidi(ch, partPos, sticky == \"before\");\n\t    if (other != null) { val.other = getBidi(ch, other, sticky != \"before\"); }\n\t    return val\n\t  }\n\n\t  // Used to cheaply estimate the coordinates for a position. Used for\n\t  // intermediate scroll updates.\n\t  function estimateCoords(cm, pos) {\n\t    var left = 0;\n\t    pos = clipPos(cm.doc, pos);\n\t    if (!cm.options.lineWrapping) { left = charWidth(cm.display) * pos.ch; }\n\t    var lineObj = getLine(cm.doc, pos.line);\n\t    var top = heightAtLine(lineObj) + paddingTop(cm.display);\n\t    return {left: left, right: left, top: top, bottom: top + lineObj.height}\n\t  }\n\n\t  // Positions returned by coordsChar contain some extra information.\n\t  // xRel is the relative x position of the input coordinates compared\n\t  // to the found position (so xRel > 0 means the coordinates are to\n\t  // the right of the character position, for example). When outside\n\t  // is true, that means the coordinates lie outside the line's\n\t  // vertical range.\n\t  function PosWithInfo(line, ch, sticky, outside, xRel) {\n\t    var pos = Pos(line, ch, sticky);\n\t    pos.xRel = xRel;\n\t    if (outside) { pos.outside = outside; }\n\t    return pos\n\t  }\n\n\t  // Compute the character position closest to the given coordinates.\n\t  // Input must be lineSpace-local (\"div\" coordinate system).\n\t  function coordsChar(cm, x, y) {\n\t    var doc = cm.doc;\n\t    y += cm.display.viewOffset;\n\t    if (y < 0) { return PosWithInfo(doc.first, 0, null, -1, -1) }\n\t    var lineN = lineAtHeight(doc, y), last = doc.first + doc.size - 1;\n\t    if (lineN > last)\n\t      { return PosWithInfo(doc.first + doc.size - 1, getLine(doc, last).text.length, null, 1, 1) }\n\t    if (x < 0) { x = 0; }\n\n\t    var lineObj = getLine(doc, lineN);\n\t    for (;;) {\n\t      var found = coordsCharInner(cm, lineObj, lineN, x, y);\n\t      var collapsed = collapsedSpanAround(lineObj, found.ch + (found.xRel > 0 || found.outside > 0 ? 1 : 0));\n\t      if (!collapsed) { return found }\n\t      var rangeEnd = collapsed.find(1);\n\t      if (rangeEnd.line == lineN) { return rangeEnd }\n\t      lineObj = getLine(doc, lineN = rangeEnd.line);\n\t    }\n\t  }\n\n\t  function wrappedLineExtent(cm, lineObj, preparedMeasure, y) {\n\t    y -= widgetTopHeight(lineObj);\n\t    var end = lineObj.text.length;\n\t    var begin = findFirst(function (ch) { return measureCharPrepared(cm, preparedMeasure, ch - 1).bottom <= y; }, end, 0);\n\t    end = findFirst(function (ch) { return measureCharPrepared(cm, preparedMeasure, ch).top > y; }, begin, end);\n\t    return {begin: begin, end: end}\n\t  }\n\n\t  function wrappedLineExtentChar(cm, lineObj, preparedMeasure, target) {\n\t    if (!preparedMeasure) { preparedMeasure = prepareMeasureForLine(cm, lineObj); }\n\t    var targetTop = intoCoordSystem(cm, lineObj, measureCharPrepared(cm, preparedMeasure, target), \"line\").top;\n\t    return wrappedLineExtent(cm, lineObj, preparedMeasure, targetTop)\n\t  }\n\n\t  // Returns true if the given side of a box is after the given\n\t  // coordinates, in top-to-bottom, left-to-right order.\n\t  function boxIsAfter(box, x, y, left) {\n\t    return box.bottom <= y ? false : box.top > y ? true : (left ? box.left : box.right) > x\n\t  }\n\n\t  function coordsCharInner(cm, lineObj, lineNo, x, y) {\n\t    // Move y into line-local coordinate space\n\t    y -= heightAtLine(lineObj);\n\t    var preparedMeasure = prepareMeasureForLine(cm, lineObj);\n\t    // When directly calling `measureCharPrepared`, we have to adjust\n\t    // for the widgets at this line.\n\t    var widgetHeight = widgetTopHeight(lineObj);\n\t    var begin = 0, end = lineObj.text.length, ltr = true;\n\n\t    var order = getOrder(lineObj, cm.doc.direction);\n\t    // If the line isn't plain left-to-right text, first figure out\n\t    // which bidi section the coordinates fall into.\n\t    if (order) {\n\t      var part = (cm.options.lineWrapping ? coordsBidiPartWrapped : coordsBidiPart)\n\t                   (cm, lineObj, lineNo, preparedMeasure, order, x, y);\n\t      ltr = part.level != 1;\n\t      // The awkward -1 offsets are needed because findFirst (called\n\t      // on these below) will treat its first bound as inclusive,\n\t      // second as exclusive, but we want to actually address the\n\t      // characters in the part's range\n\t      begin = ltr ? part.from : part.to - 1;\n\t      end = ltr ? part.to : part.from - 1;\n\t    }\n\n\t    // A binary search to find the first character whose bounding box\n\t    // starts after the coordinates. If we run across any whose box wrap\n\t    // the coordinates, store that.\n\t    var chAround = null, boxAround = null;\n\t    var ch = findFirst(function (ch) {\n\t      var box = measureCharPrepared(cm, preparedMeasure, ch);\n\t      box.top += widgetHeight; box.bottom += widgetHeight;\n\t      if (!boxIsAfter(box, x, y, false)) { return false }\n\t      if (box.top <= y && box.left <= x) {\n\t        chAround = ch;\n\t        boxAround = box;\n\t      }\n\t      return true\n\t    }, begin, end);\n\n\t    var baseX, sticky, outside = false;\n\t    // If a box around the coordinates was found, use that\n\t    if (boxAround) {\n\t      // Distinguish coordinates nearer to the left or right side of the box\n\t      var atLeft = x - boxAround.left < boxAround.right - x, atStart = atLeft == ltr;\n\t      ch = chAround + (atStart ? 0 : 1);\n\t      sticky = atStart ? \"after\" : \"before\";\n\t      baseX = atLeft ? boxAround.left : boxAround.right;\n\t    } else {\n\t      // (Adjust for extended bound, if necessary.)\n\t      if (!ltr && (ch == end || ch == begin)) { ch++; }\n\t      // To determine which side to associate with, get the box to the\n\t      // left of the character and compare it's vertical position to the\n\t      // coordinates\n\t      sticky = ch == 0 ? \"after\" : ch == lineObj.text.length ? \"before\" :\n\t        (measureCharPrepared(cm, preparedMeasure, ch - (ltr ? 1 : 0)).bottom + widgetHeight <= y) == ltr ?\n\t        \"after\" : \"before\";\n\t      // Now get accurate coordinates for this place, in order to get a\n\t      // base X position\n\t      var coords = cursorCoords(cm, Pos(lineNo, ch, sticky), \"line\", lineObj, preparedMeasure);\n\t      baseX = coords.left;\n\t      outside = y < coords.top ? -1 : y >= coords.bottom ? 1 : 0;\n\t    }\n\n\t    ch = skipExtendingChars(lineObj.text, ch, 1);\n\t    return PosWithInfo(lineNo, ch, sticky, outside, x - baseX)\n\t  }\n\n\t  function coordsBidiPart(cm, lineObj, lineNo, preparedMeasure, order, x, y) {\n\t    // Bidi parts are sorted left-to-right, and in a non-line-wrapping\n\t    // situation, we can take this ordering to correspond to the visual\n\t    // ordering. This finds the first part whose end is after the given\n\t    // coordinates.\n\t    var index = findFirst(function (i) {\n\t      var part = order[i], ltr = part.level != 1;\n\t      return boxIsAfter(cursorCoords(cm, Pos(lineNo, ltr ? part.to : part.from, ltr ? \"before\" : \"after\"),\n\t                                     \"line\", lineObj, preparedMeasure), x, y, true)\n\t    }, 0, order.length - 1);\n\t    var part = order[index];\n\t    // If this isn't the first part, the part's start is also after\n\t    // the coordinates, and the coordinates aren't on the same line as\n\t    // that start, move one part back.\n\t    if (index > 0) {\n\t      var ltr = part.level != 1;\n\t      var start = cursorCoords(cm, Pos(lineNo, ltr ? part.from : part.to, ltr ? \"after\" : \"before\"),\n\t                               \"line\", lineObj, preparedMeasure);\n\t      if (boxIsAfter(start, x, y, true) && start.top > y)\n\t        { part = order[index - 1]; }\n\t    }\n\t    return part\n\t  }\n\n\t  function coordsBidiPartWrapped(cm, lineObj, _lineNo, preparedMeasure, order, x, y) {\n\t    // In a wrapped line, rtl text on wrapping boundaries can do things\n\t    // that don't correspond to the ordering in our `order` array at\n\t    // all, so a binary search doesn't work, and we want to return a\n\t    // part that only spans one line so that the binary search in\n\t    // coordsCharInner is safe. As such, we first find the extent of the\n\t    // wrapped line, and then do a flat search in which we discard any\n\t    // spans that aren't on the line.\n\t    var ref = wrappedLineExtent(cm, lineObj, preparedMeasure, y);\n\t    var begin = ref.begin;\n\t    var end = ref.end;\n\t    if (/\\s/.test(lineObj.text.charAt(end - 1))) { end--; }\n\t    var part = null, closestDist = null;\n\t    for (var i = 0; i < order.length; i++) {\n\t      var p = order[i];\n\t      if (p.from >= end || p.to <= begin) { continue }\n\t      var ltr = p.level != 1;\n\t      var endX = measureCharPrepared(cm, preparedMeasure, ltr ? Math.min(end, p.to) - 1 : Math.max(begin, p.from)).right;\n\t      // Weigh against spans ending before this, so that they are only\n\t      // picked if nothing ends after\n\t      var dist = endX < x ? x - endX + 1e9 : endX - x;\n\t      if (!part || closestDist > dist) {\n\t        part = p;\n\t        closestDist = dist;\n\t      }\n\t    }\n\t    if (!part) { part = order[order.length - 1]; }\n\t    // Clip the part to the wrapped line.\n\t    if (part.from < begin) { part = {from: begin, to: part.to, level: part.level}; }\n\t    if (part.to > end) { part = {from: part.from, to: end, level: part.level}; }\n\t    return part\n\t  }\n\n\t  var measureText;\n\t  // Compute the default text height.\n\t  function textHeight(display) {\n\t    if (display.cachedTextHeight != null) { return display.cachedTextHeight }\n\t    if (measureText == null) {\n\t      measureText = elt(\"pre\", null, \"CodeMirror-line-like\");\n\t      // Measure a bunch of lines, for browsers that compute\n\t      // fractional heights.\n\t      for (var i = 0; i < 49; ++i) {\n\t        measureText.appendChild(document.createTextNode(\"x\"));\n\t        measureText.appendChild(elt(\"br\"));\n\t      }\n\t      measureText.appendChild(document.createTextNode(\"x\"));\n\t    }\n\t    removeChildrenAndAdd(display.measure, measureText);\n\t    var height = measureText.offsetHeight / 50;\n\t    if (height > 3) { display.cachedTextHeight = height; }\n\t    removeChildren(display.measure);\n\t    return height || 1\n\t  }\n\n\t  // Compute the default character width.\n\t  function charWidth(display) {\n\t    if (display.cachedCharWidth != null) { return display.cachedCharWidth }\n\t    var anchor = elt(\"span\", \"xxxxxxxxxx\");\n\t    var pre = elt(\"pre\", [anchor], \"CodeMirror-line-like\");\n\t    removeChildrenAndAdd(display.measure, pre);\n\t    var rect = anchor.getBoundingClientRect(), width = (rect.right - rect.left) / 10;\n\t    if (width > 2) { display.cachedCharWidth = width; }\n\t    return width || 10\n\t  }\n\n\t  // Do a bulk-read of the DOM positions and sizes needed to draw the\n\t  // view, so that we don't interleave reading and writing to the DOM.\n\t  function getDimensions(cm) {\n\t    var d = cm.display, left = {}, width = {};\n\t    var gutterLeft = d.gutters.clientLeft;\n\t    for (var n = d.gutters.firstChild, i = 0; n; n = n.nextSibling, ++i) {\n\t      var id = cm.display.gutterSpecs[i].className;\n\t      left[id] = n.offsetLeft + n.clientLeft + gutterLeft;\n\t      width[id] = n.clientWidth;\n\t    }\n\t    return {fixedPos: compensateForHScroll(d),\n\t            gutterTotalWidth: d.gutters.offsetWidth,\n\t            gutterLeft: left,\n\t            gutterWidth: width,\n\t            wrapperWidth: d.wrapper.clientWidth}\n\t  }\n\n\t  // Computes display.scroller.scrollLeft + display.gutters.offsetWidth,\n\t  // but using getBoundingClientRect to get a sub-pixel-accurate\n\t  // result.\n\t  function compensateForHScroll(display) {\n\t    return display.scroller.getBoundingClientRect().left - display.sizer.getBoundingClientRect().left\n\t  }\n\n\t  // Returns a function that estimates the height of a line, to use as\n\t  // first approximation until the line becomes visible (and is thus\n\t  // properly measurable).\n\t  function estimateHeight(cm) {\n\t    var th = textHeight(cm.display), wrapping = cm.options.lineWrapping;\n\t    var perLine = wrapping && Math.max(5, cm.display.scroller.clientWidth / charWidth(cm.display) - 3);\n\t    return function (line) {\n\t      if (lineIsHidden(cm.doc, line)) { return 0 }\n\n\t      var widgetsHeight = 0;\n\t      if (line.widgets) { for (var i = 0; i < line.widgets.length; i++) {\n\t        if (line.widgets[i].height) { widgetsHeight += line.widgets[i].height; }\n\t      } }\n\n\t      if (wrapping)\n\t        { return widgetsHeight + (Math.ceil(line.text.length / perLine) || 1) * th }\n\t      else\n\t        { return widgetsHeight + th }\n\t    }\n\t  }\n\n\t  function estimateLineHeights(cm) {\n\t    var doc = cm.doc, est = estimateHeight(cm);\n\t    doc.iter(function (line) {\n\t      var estHeight = est(line);\n\t      if (estHeight != line.height) { updateLineHeight(line, estHeight); }\n\t    });\n\t  }\n\n\t  // Given a mouse event, find the corresponding position. If liberal\n\t  // is false, it checks whether a gutter or scrollbar was clicked,\n\t  // and returns null if it was. forRect is used by rectangular\n\t  // selections, and tries to estimate a character position even for\n\t  // coordinates beyond the right of the text.\n\t  function posFromMouse(cm, e, liberal, forRect) {\n\t    var display = cm.display;\n\t    if (!liberal && e_target(e).getAttribute(\"cm-not-content\") == \"true\") { return null }\n\n\t    var x, y, space = display.lineSpace.getBoundingClientRect();\n\t    // Fails unpredictably on IE[67] when mouse is dragged around quickly.\n\t    try { x = e.clientX - space.left; y = e.clientY - space.top; }\n\t    catch (e$1) { return null }\n\t    var coords = coordsChar(cm, x, y), line;\n\t    if (forRect && coords.xRel > 0 && (line = getLine(cm.doc, coords.line).text).length == coords.ch) {\n\t      var colDiff = countColumn(line, line.length, cm.options.tabSize) - line.length;\n\t      coords = Pos(coords.line, Math.max(0, Math.round((x - paddingH(cm.display).left) / charWidth(cm.display)) - colDiff));\n\t    }\n\t    return coords\n\t  }\n\n\t  // Find the view element corresponding to a given line. Return null\n\t  // when the line isn't visible.\n\t  function findViewIndex(cm, n) {\n\t    if (n >= cm.display.viewTo) { return null }\n\t    n -= cm.display.viewFrom;\n\t    if (n < 0) { return null }\n\t    var view = cm.display.view;\n\t    for (var i = 0; i < view.length; i++) {\n\t      n -= view[i].size;\n\t      if (n < 0) { return i }\n\t    }\n\t  }\n\n\t  // Updates the display.view data structure for a given change to the\n\t  // document. From and to are in pre-change coordinates. Lendiff is\n\t  // the amount of lines added or subtracted by the change. This is\n\t  // used for changes that span multiple lines, or change the way\n\t  // lines are divided into visual lines. regLineChange (below)\n\t  // registers single-line changes.\n\t  function regChange(cm, from, to, lendiff) {\n\t    if (from == null) { from = cm.doc.first; }\n\t    if (to == null) { to = cm.doc.first + cm.doc.size; }\n\t    if (!lendiff) { lendiff = 0; }\n\n\t    var display = cm.display;\n\t    if (lendiff && to < display.viewTo &&\n\t        (display.updateLineNumbers == null || display.updateLineNumbers > from))\n\t      { display.updateLineNumbers = from; }\n\n\t    cm.curOp.viewChanged = true;\n\n\t    if (from >= display.viewTo) { // Change after\n\t      if (sawCollapsedSpans && visualLineNo(cm.doc, from) < display.viewTo)\n\t        { resetView(cm); }\n\t    } else if (to <= display.viewFrom) { // Change before\n\t      if (sawCollapsedSpans && visualLineEndNo(cm.doc, to + lendiff) > display.viewFrom) {\n\t        resetView(cm);\n\t      } else {\n\t        display.viewFrom += lendiff;\n\t        display.viewTo += lendiff;\n\t      }\n\t    } else if (from <= display.viewFrom && to >= display.viewTo) { // Full overlap\n\t      resetView(cm);\n\t    } else if (from <= display.viewFrom) { // Top overlap\n\t      var cut = viewCuttingPoint(cm, to, to + lendiff, 1);\n\t      if (cut) {\n\t        display.view = display.view.slice(cut.index);\n\t        display.viewFrom = cut.lineN;\n\t        display.viewTo += lendiff;\n\t      } else {\n\t        resetView(cm);\n\t      }\n\t    } else if (to >= display.viewTo) { // Bottom overlap\n\t      var cut$1 = viewCuttingPoint(cm, from, from, -1);\n\t      if (cut$1) {\n\t        display.view = display.view.slice(0, cut$1.index);\n\t        display.viewTo = cut$1.lineN;\n\t      } else {\n\t        resetView(cm);\n\t      }\n\t    } else { // Gap in the middle\n\t      var cutTop = viewCuttingPoint(cm, from, from, -1);\n\t      var cutBot = viewCuttingPoint(cm, to, to + lendiff, 1);\n\t      if (cutTop && cutBot) {\n\t        display.view = display.view.slice(0, cutTop.index)\n\t          .concat(buildViewArray(cm, cutTop.lineN, cutBot.lineN))\n\t          .concat(display.view.slice(cutBot.index));\n\t        display.viewTo += lendiff;\n\t      } else {\n\t        resetView(cm);\n\t      }\n\t    }\n\n\t    var ext = display.externalMeasured;\n\t    if (ext) {\n\t      if (to < ext.lineN)\n\t        { ext.lineN += lendiff; }\n\t      else if (from < ext.lineN + ext.size)\n\t        { display.externalMeasured = null; }\n\t    }\n\t  }\n\n\t  // Register a change to a single line. Type must be one of \"text\",\n\t  // \"gutter\", \"class\", \"widget\"\n\t  function regLineChange(cm, line, type) {\n\t    cm.curOp.viewChanged = true;\n\t    var display = cm.display, ext = cm.display.externalMeasured;\n\t    if (ext && line >= ext.lineN && line < ext.lineN + ext.size)\n\t      { display.externalMeasured = null; }\n\n\t    if (line < display.viewFrom || line >= display.viewTo) { return }\n\t    var lineView = display.view[findViewIndex(cm, line)];\n\t    if (lineView.node == null) { return }\n\t    var arr = lineView.changes || (lineView.changes = []);\n\t    if (indexOf(arr, type) == -1) { arr.push(type); }\n\t  }\n\n\t  // Clear the view.\n\t  function resetView(cm) {\n\t    cm.display.viewFrom = cm.display.viewTo = cm.doc.first;\n\t    cm.display.view = [];\n\t    cm.display.viewOffset = 0;\n\t  }\n\n\t  function viewCuttingPoint(cm, oldN, newN, dir) {\n\t    var index = findViewIndex(cm, oldN), diff, view = cm.display.view;\n\t    if (!sawCollapsedSpans || newN == cm.doc.first + cm.doc.size)\n\t      { return {index: index, lineN: newN} }\n\t    var n = cm.display.viewFrom;\n\t    for (var i = 0; i < index; i++)\n\t      { n += view[i].size; }\n\t    if (n != oldN) {\n\t      if (dir > 0) {\n\t        if (index == view.length - 1) { return null }\n\t        diff = (n + view[index].size) - oldN;\n\t        index++;\n\t      } else {\n\t        diff = n - oldN;\n\t      }\n\t      oldN += diff; newN += diff;\n\t    }\n\t    while (visualLineNo(cm.doc, newN) != newN) {\n\t      if (index == (dir < 0 ? 0 : view.length - 1)) { return null }\n\t      newN += dir * view[index - (dir < 0 ? 1 : 0)].size;\n\t      index += dir;\n\t    }\n\t    return {index: index, lineN: newN}\n\t  }\n\n\t  // Force the view to cover a given range, adding empty view element\n\t  // or clipping off existing ones as needed.\n\t  function adjustView(cm, from, to) {\n\t    var display = cm.display, view = display.view;\n\t    if (view.length == 0 || from >= display.viewTo || to <= display.viewFrom) {\n\t      display.view = buildViewArray(cm, from, to);\n\t      display.viewFrom = from;\n\t    } else {\n\t      if (display.viewFrom > from)\n\t        { display.view = buildViewArray(cm, from, display.viewFrom).concat(display.view); }\n\t      else if (display.viewFrom < from)\n\t        { display.view = display.view.slice(findViewIndex(cm, from)); }\n\t      display.viewFrom = from;\n\t      if (display.viewTo < to)\n\t        { display.view = display.view.concat(buildViewArray(cm, display.viewTo, to)); }\n\t      else if (display.viewTo > to)\n\t        { display.view = display.view.slice(0, findViewIndex(cm, to)); }\n\t    }\n\t    display.viewTo = to;\n\t  }\n\n\t  // Count the number of lines in the view whose DOM representation is\n\t  // out of date (or nonexistent).\n\t  function countDirtyView(cm) {\n\t    var view = cm.display.view, dirty = 0;\n\t    for (var i = 0; i < view.length; i++) {\n\t      var lineView = view[i];\n\t      if (!lineView.hidden && (!lineView.node || lineView.changes)) { ++dirty; }\n\t    }\n\t    return dirty\n\t  }\n\n\t  function updateSelection(cm) {\n\t    cm.display.input.showSelection(cm.display.input.prepareSelection());\n\t  }\n\n\t  function prepareSelection(cm, primary) {\n\t    if ( primary === void 0 ) primary = true;\n\n\t    var doc = cm.doc, result = {};\n\t    var curFragment = result.cursors = document.createDocumentFragment();\n\t    var selFragment = result.selection = document.createDocumentFragment();\n\n\t    for (var i = 0; i < doc.sel.ranges.length; i++) {\n\t      if (!primary && i == doc.sel.primIndex) { continue }\n\t      var range = doc.sel.ranges[i];\n\t      if (range.from().line >= cm.display.viewTo || range.to().line < cm.display.viewFrom) { continue }\n\t      var collapsed = range.empty();\n\t      if (collapsed || cm.options.showCursorWhenSelecting)\n\t        { drawSelectionCursor(cm, range.head, curFragment); }\n\t      if (!collapsed)\n\t        { drawSelectionRange(cm, range, selFragment); }\n\t    }\n\t    return result\n\t  }\n\n\t  // Draws a cursor for the given range\n\t  function drawSelectionCursor(cm, head, output) {\n\t    var pos = cursorCoords(cm, head, \"div\", null, null, !cm.options.singleCursorHeightPerLine);\n\n\t    var cursor = output.appendChild(elt(\"div\", \"\\u00a0\", \"CodeMirror-cursor\"));\n\t    cursor.style.left = pos.left + \"px\";\n\t    cursor.style.top = pos.top + \"px\";\n\t    cursor.style.height = Math.max(0, pos.bottom - pos.top) * cm.options.cursorHeight + \"px\";\n\n\t    if (pos.other) {\n\t      // Secondary cursor, shown when on a 'jump' in bi-directional text\n\t      var otherCursor = output.appendChild(elt(\"div\", \"\\u00a0\", \"CodeMirror-cursor CodeMirror-secondarycursor\"));\n\t      otherCursor.style.display = \"\";\n\t      otherCursor.style.left = pos.other.left + \"px\";\n\t      otherCursor.style.top = pos.other.top + \"px\";\n\t      otherCursor.style.height = (pos.other.bottom - pos.other.top) * .85 + \"px\";\n\t    }\n\t  }\n\n\t  function cmpCoords(a, b) { return a.top - b.top || a.left - b.left }\n\n\t  // Draws the given range as a highlighted selection\n\t  function drawSelectionRange(cm, range, output) {\n\t    var display = cm.display, doc = cm.doc;\n\t    var fragment = document.createDocumentFragment();\n\t    var padding = paddingH(cm.display), leftSide = padding.left;\n\t    var rightSide = Math.max(display.sizerWidth, displayWidth(cm) - display.sizer.offsetLeft) - padding.right;\n\t    var docLTR = doc.direction == \"ltr\";\n\n\t    function add(left, top, width, bottom) {\n\t      if (top < 0) { top = 0; }\n\t      top = Math.round(top);\n\t      bottom = Math.round(bottom);\n\t      fragment.appendChild(elt(\"div\", null, \"CodeMirror-selected\", (\"position: absolute; left: \" + left + \"px;\\n                             top: \" + top + \"px; width: \" + (width == null ? rightSide - left : width) + \"px;\\n                             height: \" + (bottom - top) + \"px\")));\n\t    }\n\n\t    function drawForLine(line, fromArg, toArg) {\n\t      var lineObj = getLine(doc, line);\n\t      var lineLen = lineObj.text.length;\n\t      var start, end;\n\t      function coords(ch, bias) {\n\t        return charCoords(cm, Pos(line, ch), \"div\", lineObj, bias)\n\t      }\n\n\t      function wrapX(pos, dir, side) {\n\t        var extent = wrappedLineExtentChar(cm, lineObj, null, pos);\n\t        var prop = (dir == \"ltr\") == (side == \"after\") ? \"left\" : \"right\";\n\t        var ch = side == \"after\" ? extent.begin : extent.end - (/\\s/.test(lineObj.text.charAt(extent.end - 1)) ? 2 : 1);\n\t        return coords(ch, prop)[prop]\n\t      }\n\n\t      var order = getOrder(lineObj, doc.direction);\n\t      iterateBidiSections(order, fromArg || 0, toArg == null ? lineLen : toArg, function (from, to, dir, i) {\n\t        var ltr = dir == \"ltr\";\n\t        var fromPos = coords(from, ltr ? \"left\" : \"right\");\n\t        var toPos = coords(to - 1, ltr ? \"right\" : \"left\");\n\n\t        var openStart = fromArg == null && from == 0, openEnd = toArg == null && to == lineLen;\n\t        var first = i == 0, last = !order || i == order.length - 1;\n\t        if (toPos.top - fromPos.top <= 3) { // Single line\n\t          var openLeft = (docLTR ? openStart : openEnd) && first;\n\t          var openRight = (docLTR ? openEnd : openStart) && last;\n\t          var left = openLeft ? leftSide : (ltr ? fromPos : toPos).left;\n\t          var right = openRight ? rightSide : (ltr ? toPos : fromPos).right;\n\t          add(left, fromPos.top, right - left, fromPos.bottom);\n\t        } else { // Multiple lines\n\t          var topLeft, topRight, botLeft, botRight;\n\t          if (ltr) {\n\t            topLeft = docLTR && openStart && first ? leftSide : fromPos.left;\n\t            topRight = docLTR ? rightSide : wrapX(from, dir, \"before\");\n\t            botLeft = docLTR ? leftSide : wrapX(to, dir, \"after\");\n\t            botRight = docLTR && openEnd && last ? rightSide : toPos.right;\n\t          } else {\n\t            topLeft = !docLTR ? leftSide : wrapX(from, dir, \"before\");\n\t            topRight = !docLTR && openStart && first ? rightSide : fromPos.right;\n\t            botLeft = !docLTR && openEnd && last ? leftSide : toPos.left;\n\t            botRight = !docLTR ? rightSide : wrapX(to, dir, \"after\");\n\t          }\n\t          add(topLeft, fromPos.top, topRight - topLeft, fromPos.bottom);\n\t          if (fromPos.bottom < toPos.top) { add(leftSide, fromPos.bottom, null, toPos.top); }\n\t          add(botLeft, toPos.top, botRight - botLeft, toPos.bottom);\n\t        }\n\n\t        if (!start || cmpCoords(fromPos, start) < 0) { start = fromPos; }\n\t        if (cmpCoords(toPos, start) < 0) { start = toPos; }\n\t        if (!end || cmpCoords(fromPos, end) < 0) { end = fromPos; }\n\t        if (cmpCoords(toPos, end) < 0) { end = toPos; }\n\t      });\n\t      return {start: start, end: end}\n\t    }\n\n\t    var sFrom = range.from(), sTo = range.to();\n\t    if (sFrom.line == sTo.line) {\n\t      drawForLine(sFrom.line, sFrom.ch, sTo.ch);\n\t    } else {\n\t      var fromLine = getLine(doc, sFrom.line), toLine = getLine(doc, sTo.line);\n\t      var singleVLine = visualLine(fromLine) == visualLine(toLine);\n\t      var leftEnd = drawForLine(sFrom.line, sFrom.ch, singleVLine ? fromLine.text.length + 1 : null).end;\n\t      var rightStart = drawForLine(sTo.line, singleVLine ? 0 : null, sTo.ch).start;\n\t      if (singleVLine) {\n\t        if (leftEnd.top < rightStart.top - 2) {\n\t          add(leftEnd.right, leftEnd.top, null, leftEnd.bottom);\n\t          add(leftSide, rightStart.top, rightStart.left, rightStart.bottom);\n\t        } else {\n\t          add(leftEnd.right, leftEnd.top, rightStart.left - leftEnd.right, leftEnd.bottom);\n\t        }\n\t      }\n\t      if (leftEnd.bottom < rightStart.top)\n\t        { add(leftSide, leftEnd.bottom, null, rightStart.top); }\n\t    }\n\n\t    output.appendChild(fragment);\n\t  }\n\n\t  // Cursor-blinking\n\t  function restartBlink(cm) {\n\t    if (!cm.state.focused) { return }\n\t    var display = cm.display;\n\t    clearInterval(display.blinker);\n\t    var on = true;\n\t    display.cursorDiv.style.visibility = \"\";\n\t    if (cm.options.cursorBlinkRate > 0)\n\t      { display.blinker = setInterval(function () {\n\t        if (!cm.hasFocus()) { onBlur(cm); }\n\t        display.cursorDiv.style.visibility = (on = !on) ? \"\" : \"hidden\";\n\t      }, cm.options.cursorBlinkRate); }\n\t    else if (cm.options.cursorBlinkRate < 0)\n\t      { display.cursorDiv.style.visibility = \"hidden\"; }\n\t  }\n\n\t  function ensureFocus(cm) {\n\t    if (!cm.state.focused) { cm.display.input.focus(); onFocus(cm); }\n\t  }\n\n\t  function delayBlurEvent(cm) {\n\t    cm.state.delayingBlurEvent = true;\n\t    setTimeout(function () { if (cm.state.delayingBlurEvent) {\n\t      cm.state.delayingBlurEvent = false;\n\t      onBlur(cm);\n\t    } }, 100);\n\t  }\n\n\t  function onFocus(cm, e) {\n\t    if (cm.state.delayingBlurEvent) { cm.state.delayingBlurEvent = false; }\n\n\t    if (cm.options.readOnly == \"nocursor\") { return }\n\t    if (!cm.state.focused) {\n\t      signal(cm, \"focus\", cm, e);\n\t      cm.state.focused = true;\n\t      addClass(cm.display.wrapper, \"CodeMirror-focused\");\n\t      // This test prevents this from firing when a context\n\t      // menu is closed (since the input reset would kill the\n\t      // select-all detection hack)\n\t      if (!cm.curOp && cm.display.selForContextMenu != cm.doc.sel) {\n\t        cm.display.input.reset();\n\t        if (webkit) { setTimeout(function () { return cm.display.input.reset(true); }, 20); } // Issue #1730\n\t      }\n\t      cm.display.input.receivedFocus();\n\t    }\n\t    restartBlink(cm);\n\t  }\n\t  function onBlur(cm, e) {\n\t    if (cm.state.delayingBlurEvent) { return }\n\n\t    if (cm.state.focused) {\n\t      signal(cm, \"blur\", cm, e);\n\t      cm.state.focused = false;\n\t      rmClass(cm.display.wrapper, \"CodeMirror-focused\");\n\t    }\n\t    clearInterval(cm.display.blinker);\n\t    setTimeout(function () { if (!cm.state.focused) { cm.display.shift = false; } }, 150);\n\t  }\n\n\t  // Read the actual heights of the rendered lines, and update their\n\t  // stored heights to match.\n\t  function updateHeightsInViewport(cm) {\n\t    var display = cm.display;\n\t    var prevBottom = display.lineDiv.offsetTop;\n\t    for (var i = 0; i < display.view.length; i++) {\n\t      var cur = display.view[i], wrapping = cm.options.lineWrapping;\n\t      var height = (void 0), width = 0;\n\t      if (cur.hidden) { continue }\n\t      if (ie && ie_version < 8) {\n\t        var bot = cur.node.offsetTop + cur.node.offsetHeight;\n\t        height = bot - prevBottom;\n\t        prevBottom = bot;\n\t      } else {\n\t        var box = cur.node.getBoundingClientRect();\n\t        height = box.bottom - box.top;\n\t        // Check that lines don't extend past the right of the current\n\t        // editor width\n\t        if (!wrapping && cur.text.firstChild)\n\t          { width = cur.text.firstChild.getBoundingClientRect().right - box.left - 1; }\n\t      }\n\t      var diff = cur.line.height - height;\n\t      if (diff > .005 || diff < -.005) {\n\t        updateLineHeight(cur.line, height);\n\t        updateWidgetHeight(cur.line);\n\t        if (cur.rest) { for (var j = 0; j < cur.rest.length; j++)\n\t          { updateWidgetHeight(cur.rest[j]); } }\n\t      }\n\t      if (width > cm.display.sizerWidth) {\n\t        var chWidth = Math.ceil(width / charWidth(cm.display));\n\t        if (chWidth > cm.display.maxLineLength) {\n\t          cm.display.maxLineLength = chWidth;\n\t          cm.display.maxLine = cur.line;\n\t          cm.display.maxLineChanged = true;\n\t        }\n\t      }\n\t    }\n\t  }\n\n\t  // Read and store the height of line widgets associated with the\n\t  // given line.\n\t  function updateWidgetHeight(line) {\n\t    if (line.widgets) { for (var i = 0; i < line.widgets.length; ++i) {\n\t      var w = line.widgets[i], parent = w.node.parentNode;\n\t      if (parent) { w.height = parent.offsetHeight; }\n\t    } }\n\t  }\n\n\t  // Compute the lines that are visible in a given viewport (defaults\n\t  // the the current scroll position). viewport may contain top,\n\t  // height, and ensure (see op.scrollToPos) properties.\n\t  function visibleLines(display, doc, viewport) {\n\t    var top = viewport && viewport.top != null ? Math.max(0, viewport.top) : display.scroller.scrollTop;\n\t    top = Math.floor(top - paddingTop(display));\n\t    var bottom = viewport && viewport.bottom != null ? viewport.bottom : top + display.wrapper.clientHeight;\n\n\t    var from = lineAtHeight(doc, top), to = lineAtHeight(doc, bottom);\n\t    // Ensure is a {from: {line, ch}, to: {line, ch}} object, and\n\t    // forces those lines into the viewport (if possible).\n\t    if (viewport && viewport.ensure) {\n\t      var ensureFrom = viewport.ensure.from.line, ensureTo = viewport.ensure.to.line;\n\t      if (ensureFrom < from) {\n\t        from = ensureFrom;\n\t        to = lineAtHeight(doc, heightAtLine(getLine(doc, ensureFrom)) + display.wrapper.clientHeight);\n\t      } else if (Math.min(ensureTo, doc.lastLine()) >= to) {\n\t        from = lineAtHeight(doc, heightAtLine(getLine(doc, ensureTo)) - display.wrapper.clientHeight);\n\t        to = ensureTo;\n\t      }\n\t    }\n\t    return {from: from, to: Math.max(to, from + 1)}\n\t  }\n\n\t  // SCROLLING THINGS INTO VIEW\n\n\t  // If an editor sits on the top or bottom of the window, partially\n\t  // scrolled out of view, this ensures that the cursor is visible.\n\t  function maybeScrollWindow(cm, rect) {\n\t    if (signalDOMEvent(cm, \"scrollCursorIntoView\")) { return }\n\n\t    var display = cm.display, box = display.sizer.getBoundingClientRect(), doScroll = null;\n\t    if (rect.top + box.top < 0) { doScroll = true; }\n\t    else if (rect.bottom + box.top > (window.innerHeight || document.documentElement.clientHeight)) { doScroll = false; }\n\t    if (doScroll != null && !phantom) {\n\t      var scrollNode = elt(\"div\", \"\\u200b\", null, (\"position: absolute;\\n                         top: \" + (rect.top - display.viewOffset - paddingTop(cm.display)) + \"px;\\n                         height: \" + (rect.bottom - rect.top + scrollGap(cm) + display.barHeight) + \"px;\\n                         left: \" + (rect.left) + \"px; width: \" + (Math.max(2, rect.right - rect.left)) + \"px;\"));\n\t      cm.display.lineSpace.appendChild(scrollNode);\n\t      scrollNode.scrollIntoView(doScroll);\n\t      cm.display.lineSpace.removeChild(scrollNode);\n\t    }\n\t  }\n\n\t  // Scroll a given position into view (immediately), verifying that\n\t  // it actually became visible (as line heights are accurately\n\t  // measured, the position of something may 'drift' during drawing).\n\t  function scrollPosIntoView(cm, pos, end, margin) {\n\t    if (margin == null) { margin = 0; }\n\t    var rect;\n\t    if (!cm.options.lineWrapping && pos == end) {\n\t      // Set pos and end to the cursor positions around the character pos sticks to\n\t      // If pos.sticky == \"before\", that is around pos.ch - 1, otherwise around pos.ch\n\t      // If pos == Pos(_, 0, \"before\"), pos and end are unchanged\n\t      pos = pos.ch ? Pos(pos.line, pos.sticky == \"before\" ? pos.ch - 1 : pos.ch, \"after\") : pos;\n\t      end = pos.sticky == \"before\" ? Pos(pos.line, pos.ch + 1, \"before\") : pos;\n\t    }\n\t    for (var limit = 0; limit < 5; limit++) {\n\t      var changed = false;\n\t      var coords = cursorCoords(cm, pos);\n\t      var endCoords = !end || end == pos ? coords : cursorCoords(cm, end);\n\t      rect = {left: Math.min(coords.left, endCoords.left),\n\t              top: Math.min(coords.top, endCoords.top) - margin,\n\t              right: Math.max(coords.left, endCoords.left),\n\t              bottom: Math.max(coords.bottom, endCoords.bottom) + margin};\n\t      var scrollPos = calculateScrollPos(cm, rect);\n\t      var startTop = cm.doc.scrollTop, startLeft = cm.doc.scrollLeft;\n\t      if (scrollPos.scrollTop != null) {\n\t        updateScrollTop(cm, scrollPos.scrollTop);\n\t        if (Math.abs(cm.doc.scrollTop - startTop) > 1) { changed = true; }\n\t      }\n\t      if (scrollPos.scrollLeft != null) {\n\t        setScrollLeft(cm, scrollPos.scrollLeft);\n\t        if (Math.abs(cm.doc.scrollLeft - startLeft) > 1) { changed = true; }\n\t      }\n\t      if (!changed) { break }\n\t    }\n\t    return rect\n\t  }\n\n\t  // Scroll a given set of coordinates into view (immediately).\n\t  function scrollIntoView(cm, rect) {\n\t    var scrollPos = calculateScrollPos(cm, rect);\n\t    if (scrollPos.scrollTop != null) { updateScrollTop(cm, scrollPos.scrollTop); }\n\t    if (scrollPos.scrollLeft != null) { setScrollLeft(cm, scrollPos.scrollLeft); }\n\t  }\n\n\t  // Calculate a new scroll position needed to scroll the given\n\t  // rectangle into view. Returns an object with scrollTop and\n\t  // scrollLeft properties. When these are undefined, the\n\t  // vertical/horizontal position does not need to be adjusted.\n\t  function calculateScrollPos(cm, rect) {\n\t    var display = cm.display, snapMargin = textHeight(cm.display);\n\t    if (rect.top < 0) { rect.top = 0; }\n\t    var screentop = cm.curOp && cm.curOp.scrollTop != null ? cm.curOp.scrollTop : display.scroller.scrollTop;\n\t    var screen = displayHeight(cm), result = {};\n\t    if (rect.bottom - rect.top > screen) { rect.bottom = rect.top + screen; }\n\t    var docBottom = cm.doc.height + paddingVert(display);\n\t    var atTop = rect.top < snapMargin, atBottom = rect.bottom > docBottom - snapMargin;\n\t    if (rect.top < screentop) {\n\t      result.scrollTop = atTop ? 0 : rect.top;\n\t    } else if (rect.bottom > screentop + screen) {\n\t      var newTop = Math.min(rect.top, (atBottom ? docBottom : rect.bottom) - screen);\n\t      if (newTop != screentop) { result.scrollTop = newTop; }\n\t    }\n\n\t    var gutterSpace = cm.options.fixedGutter ? 0 : display.gutters.offsetWidth;\n\t    var screenleft = cm.curOp && cm.curOp.scrollLeft != null ? cm.curOp.scrollLeft : display.scroller.scrollLeft - gutterSpace;\n\t    var screenw = displayWidth(cm) - display.gutters.offsetWidth;\n\t    var tooWide = rect.right - rect.left > screenw;\n\t    if (tooWide) { rect.right = rect.left + screenw; }\n\t    if (rect.left < 10)\n\t      { result.scrollLeft = 0; }\n\t    else if (rect.left < screenleft)\n\t      { result.scrollLeft = Math.max(0, rect.left + gutterSpace - (tooWide ? 0 : 10)); }\n\t    else if (rect.right > screenw + screenleft - 3)\n\t      { result.scrollLeft = rect.right + (tooWide ? 0 : 10) - screenw; }\n\t    return result\n\t  }\n\n\t  // Store a relative adjustment to the scroll position in the current\n\t  // operation (to be applied when the operation finishes).\n\t  function addToScrollTop(cm, top) {\n\t    if (top == null) { return }\n\t    resolveScrollToPos(cm);\n\t    cm.curOp.scrollTop = (cm.curOp.scrollTop == null ? cm.doc.scrollTop : cm.curOp.scrollTop) + top;\n\t  }\n\n\t  // Make sure that at the end of the operation the current cursor is\n\t  // shown.\n\t  function ensureCursorVisible(cm) {\n\t    resolveScrollToPos(cm);\n\t    var cur = cm.getCursor();\n\t    cm.curOp.scrollToPos = {from: cur, to: cur, margin: cm.options.cursorScrollMargin};\n\t  }\n\n\t  function scrollToCoords(cm, x, y) {\n\t    if (x != null || y != null) { resolveScrollToPos(cm); }\n\t    if (x != null) { cm.curOp.scrollLeft = x; }\n\t    if (y != null) { cm.curOp.scrollTop = y; }\n\t  }\n\n\t  function scrollToRange(cm, range) {\n\t    resolveScrollToPos(cm);\n\t    cm.curOp.scrollToPos = range;\n\t  }\n\n\t  // When an operation has its scrollToPos property set, and another\n\t  // scroll action is applied before the end of the operation, this\n\t  // 'simulates' scrolling that position into view in a cheap way, so\n\t  // that the effect of intermediate scroll commands is not ignored.\n\t  function resolveScrollToPos(cm) {\n\t    var range = cm.curOp.scrollToPos;\n\t    if (range) {\n\t      cm.curOp.scrollToPos = null;\n\t      var from = estimateCoords(cm, range.from), to = estimateCoords(cm, range.to);\n\t      scrollToCoordsRange(cm, from, to, range.margin);\n\t    }\n\t  }\n\n\t  function scrollToCoordsRange(cm, from, to, margin) {\n\t    var sPos = calculateScrollPos(cm, {\n\t      left: Math.min(from.left, to.left),\n\t      top: Math.min(from.top, to.top) - margin,\n\t      right: Math.max(from.right, to.right),\n\t      bottom: Math.max(from.bottom, to.bottom) + margin\n\t    });\n\t    scrollToCoords(cm, sPos.scrollLeft, sPos.scrollTop);\n\t  }\n\n\t  // Sync the scrollable area and scrollbars, ensure the viewport\n\t  // covers the visible area.\n\t  function updateScrollTop(cm, val) {\n\t    if (Math.abs(cm.doc.scrollTop - val) < 2) { return }\n\t    if (!gecko) { updateDisplaySimple(cm, {top: val}); }\n\t    setScrollTop(cm, val, true);\n\t    if (gecko) { updateDisplaySimple(cm); }\n\t    startWorker(cm, 100);\n\t  }\n\n\t  function setScrollTop(cm, val, forceScroll) {\n\t    val = Math.max(0, Math.min(cm.display.scroller.scrollHeight - cm.display.scroller.clientHeight, val));\n\t    if (cm.display.scroller.scrollTop == val && !forceScroll) { return }\n\t    cm.doc.scrollTop = val;\n\t    cm.display.scrollbars.setScrollTop(val);\n\t    if (cm.display.scroller.scrollTop != val) { cm.display.scroller.scrollTop = val; }\n\t  }\n\n\t  // Sync scroller and scrollbar, ensure the gutter elements are\n\t  // aligned.\n\t  function setScrollLeft(cm, val, isScroller, forceScroll) {\n\t    val = Math.max(0, Math.min(val, cm.display.scroller.scrollWidth - cm.display.scroller.clientWidth));\n\t    if ((isScroller ? val == cm.doc.scrollLeft : Math.abs(cm.doc.scrollLeft - val) < 2) && !forceScroll) { return }\n\t    cm.doc.scrollLeft = val;\n\t    alignHorizontally(cm);\n\t    if (cm.display.scroller.scrollLeft != val) { cm.display.scroller.scrollLeft = val; }\n\t    cm.display.scrollbars.setScrollLeft(val);\n\t  }\n\n\t  // SCROLLBARS\n\n\t  // Prepare DOM reads needed to update the scrollbars. Done in one\n\t  // shot to minimize update/measure roundtrips.\n\t  function measureForScrollbars(cm) {\n\t    var d = cm.display, gutterW = d.gutters.offsetWidth;\n\t    var docH = Math.round(cm.doc.height + paddingVert(cm.display));\n\t    return {\n\t      clientHeight: d.scroller.clientHeight,\n\t      viewHeight: d.wrapper.clientHeight,\n\t      scrollWidth: d.scroller.scrollWidth, clientWidth: d.scroller.clientWidth,\n\t      viewWidth: d.wrapper.clientWidth,\n\t      barLeft: cm.options.fixedGutter ? gutterW : 0,\n\t      docHeight: docH,\n\t      scrollHeight: docH + scrollGap(cm) + d.barHeight,\n\t      nativeBarWidth: d.nativeBarWidth,\n\t      gutterWidth: gutterW\n\t    }\n\t  }\n\n\t  var NativeScrollbars = function(place, scroll, cm) {\n\t    this.cm = cm;\n\t    var vert = this.vert = elt(\"div\", [elt(\"div\", null, null, \"min-width: 1px\")], \"CodeMirror-vscrollbar\");\n\t    var horiz = this.horiz = elt(\"div\", [elt(\"div\", null, null, \"height: 100%; min-height: 1px\")], \"CodeMirror-hscrollbar\");\n\t    vert.tabIndex = horiz.tabIndex = -1;\n\t    place(vert); place(horiz);\n\n\t    on(vert, \"scroll\", function () {\n\t      if (vert.clientHeight) { scroll(vert.scrollTop, \"vertical\"); }\n\t    });\n\t    on(horiz, \"scroll\", function () {\n\t      if (horiz.clientWidth) { scroll(horiz.scrollLeft, \"horizontal\"); }\n\t    });\n\n\t    this.checkedZeroWidth = false;\n\t    // Need to set a minimum width to see the scrollbar on IE7 (but must not set it on IE8).\n\t    if (ie && ie_version < 8) { this.horiz.style.minHeight = this.vert.style.minWidth = \"18px\"; }\n\t  };\n\n\t  NativeScrollbars.prototype.update = function (measure) {\n\t    var needsH = measure.scrollWidth > measure.clientWidth + 1;\n\t    var needsV = measure.scrollHeight > measure.clientHeight + 1;\n\t    var sWidth = measure.nativeBarWidth;\n\n\t    if (needsV) {\n\t      this.vert.style.display = \"block\";\n\t      this.vert.style.bottom = needsH ? sWidth + \"px\" : \"0\";\n\t      var totalHeight = measure.viewHeight - (needsH ? sWidth : 0);\n\t      // A bug in IE8 can cause this value to be negative, so guard it.\n\t      this.vert.firstChild.style.height =\n\t        Math.max(0, measure.scrollHeight - measure.clientHeight + totalHeight) + \"px\";\n\t    } else {\n\t      this.vert.style.display = \"\";\n\t      this.vert.firstChild.style.height = \"0\";\n\t    }\n\n\t    if (needsH) {\n\t      this.horiz.style.display = \"block\";\n\t      this.horiz.style.right = needsV ? sWidth + \"px\" : \"0\";\n\t      this.horiz.style.left = measure.barLeft + \"px\";\n\t      var totalWidth = measure.viewWidth - measure.barLeft - (needsV ? sWidth : 0);\n\t      this.horiz.firstChild.style.width =\n\t        Math.max(0, measure.scrollWidth - measure.clientWidth + totalWidth) + \"px\";\n\t    } else {\n\t      this.horiz.style.display = \"\";\n\t      this.horiz.firstChild.style.width = \"0\";\n\t    }\n\n\t    if (!this.checkedZeroWidth && measure.clientHeight > 0) {\n\t      if (sWidth == 0) { this.zeroWidthHack(); }\n\t      this.checkedZeroWidth = true;\n\t    }\n\n\t    return {right: needsV ? sWidth : 0, bottom: needsH ? sWidth : 0}\n\t  };\n\n\t  NativeScrollbars.prototype.setScrollLeft = function (pos) {\n\t    if (this.horiz.scrollLeft != pos) { this.horiz.scrollLeft = pos; }\n\t    if (this.disableHoriz) { this.enableZeroWidthBar(this.horiz, this.disableHoriz, \"horiz\"); }\n\t  };\n\n\t  NativeScrollbars.prototype.setScrollTop = function (pos) {\n\t    if (this.vert.scrollTop != pos) { this.vert.scrollTop = pos; }\n\t    if (this.disableVert) { this.enableZeroWidthBar(this.vert, this.disableVert, \"vert\"); }\n\t  };\n\n\t  NativeScrollbars.prototype.zeroWidthHack = function () {\n\t    var w = mac && !mac_geMountainLion ? \"12px\" : \"18px\";\n\t    this.horiz.style.height = this.vert.style.width = w;\n\t    this.horiz.style.pointerEvents = this.vert.style.pointerEvents = \"none\";\n\t    this.disableHoriz = new Delayed;\n\t    this.disableVert = new Delayed;\n\t  };\n\n\t  NativeScrollbars.prototype.enableZeroWidthBar = function (bar, delay, type) {\n\t    bar.style.pointerEvents = \"auto\";\n\t    function maybeDisable() {\n\t      // To find out whether the scrollbar is still visible, we\n\t      // check whether the element under the pixel in the bottom\n\t      // right corner of the scrollbar box is the scrollbar box\n\t      // itself (when the bar is still visible) or its filler child\n\t      // (when the bar is hidden). If it is still visible, we keep\n\t      // it enabled, if it's hidden, we disable pointer events.\n\t      var box = bar.getBoundingClientRect();\n\t      var elt = type == \"vert\" ? document.elementFromPoint(box.right - 1, (box.top + box.bottom) / 2)\n\t          : document.elementFromPoint((box.right + box.left) / 2, box.bottom - 1);\n\t      if (elt != bar) { bar.style.pointerEvents = \"none\"; }\n\t      else { delay.set(1000, maybeDisable); }\n\t    }\n\t    delay.set(1000, maybeDisable);\n\t  };\n\n\t  NativeScrollbars.prototype.clear = function () {\n\t    var parent = this.horiz.parentNode;\n\t    parent.removeChild(this.horiz);\n\t    parent.removeChild(this.vert);\n\t  };\n\n\t  var NullScrollbars = function () {};\n\n\t  NullScrollbars.prototype.update = function () { return {bottom: 0, right: 0} };\n\t  NullScrollbars.prototype.setScrollLeft = function () {};\n\t  NullScrollbars.prototype.setScrollTop = function () {};\n\t  NullScrollbars.prototype.clear = function () {};\n\n\t  function updateScrollbars(cm, measure) {\n\t    if (!measure) { measure = measureForScrollbars(cm); }\n\t    var startWidth = cm.display.barWidth, startHeight = cm.display.barHeight;\n\t    updateScrollbarsInner(cm, measure);\n\t    for (var i = 0; i < 4 && startWidth != cm.display.barWidth || startHeight != cm.display.barHeight; i++) {\n\t      if (startWidth != cm.display.barWidth && cm.options.lineWrapping)\n\t        { updateHeightsInViewport(cm); }\n\t      updateScrollbarsInner(cm, measureForScrollbars(cm));\n\t      startWidth = cm.display.barWidth; startHeight = cm.display.barHeight;\n\t    }\n\t  }\n\n\t  // Re-synchronize the fake scrollbars with the actual size of the\n\t  // content.\n\t  function updateScrollbarsInner(cm, measure) {\n\t    var d = cm.display;\n\t    var sizes = d.scrollbars.update(measure);\n\n\t    d.sizer.style.paddingRight = (d.barWidth = sizes.right) + \"px\";\n\t    d.sizer.style.paddingBottom = (d.barHeight = sizes.bottom) + \"px\";\n\t    d.heightForcer.style.borderBottom = sizes.bottom + \"px solid transparent\";\n\n\t    if (sizes.right && sizes.bottom) {\n\t      d.scrollbarFiller.style.display = \"block\";\n\t      d.scrollbarFiller.style.height = sizes.bottom + \"px\";\n\t      d.scrollbarFiller.style.width = sizes.right + \"px\";\n\t    } else { d.scrollbarFiller.style.display = \"\"; }\n\t    if (sizes.bottom && cm.options.coverGutterNextToScrollbar && cm.options.fixedGutter) {\n\t      d.gutterFiller.style.display = \"block\";\n\t      d.gutterFiller.style.height = sizes.bottom + \"px\";\n\t      d.gutterFiller.style.width = measure.gutterWidth + \"px\";\n\t    } else { d.gutterFiller.style.display = \"\"; }\n\t  }\n\n\t  var scrollbarModel = {\"native\": NativeScrollbars, \"null\": NullScrollbars};\n\n\t  function initScrollbars(cm) {\n\t    if (cm.display.scrollbars) {\n\t      cm.display.scrollbars.clear();\n\t      if (cm.display.scrollbars.addClass)\n\t        { rmClass(cm.display.wrapper, cm.display.scrollbars.addClass); }\n\t    }\n\n\t    cm.display.scrollbars = new scrollbarModel[cm.options.scrollbarStyle](function (node) {\n\t      cm.display.wrapper.insertBefore(node, cm.display.scrollbarFiller);\n\t      // Prevent clicks in the scrollbars from killing focus\n\t      on(node, \"mousedown\", function () {\n\t        if (cm.state.focused) { setTimeout(function () { return cm.display.input.focus(); }, 0); }\n\t      });\n\t      node.setAttribute(\"cm-not-content\", \"true\");\n\t    }, function (pos, axis) {\n\t      if (axis == \"horizontal\") { setScrollLeft(cm, pos); }\n\t      else { updateScrollTop(cm, pos); }\n\t    }, cm);\n\t    if (cm.display.scrollbars.addClass)\n\t      { addClass(cm.display.wrapper, cm.display.scrollbars.addClass); }\n\t  }\n\n\t  // Operations are used to wrap a series of changes to the editor\n\t  // state in such a way that each change won't have to update the\n\t  // cursor and display (which would be awkward, slow, and\n\t  // error-prone). Instead, display updates are batched and then all\n\t  // combined and executed at once.\n\n\t  var nextOpId = 0;\n\t  // Start a new operation.\n\t  function startOperation(cm) {\n\t    cm.curOp = {\n\t      cm: cm,\n\t      viewChanged: false,      // Flag that indicates that lines might need to be redrawn\n\t      startHeight: cm.doc.height, // Used to detect need to update scrollbar\n\t      forceUpdate: false,      // Used to force a redraw\n\t      updateInput: 0,       // Whether to reset the input textarea\n\t      typing: false,           // Whether this reset should be careful to leave existing text (for compositing)\n\t      changeObjs: null,        // Accumulated changes, for firing change events\n\t      cursorActivityHandlers: null, // Set of handlers to fire cursorActivity on\n\t      cursorActivityCalled: 0, // Tracks which cursorActivity handlers have been called already\n\t      selectionChanged: false, // Whether the selection needs to be redrawn\n\t      updateMaxLine: false,    // Set when the widest line needs to be determined anew\n\t      scrollLeft: null, scrollTop: null, // Intermediate scroll position, not pushed to DOM yet\n\t      scrollToPos: null,       // Used to scroll to a specific position\n\t      focus: false,\n\t      id: ++nextOpId           // Unique ID\n\t    };\n\t    pushOperation(cm.curOp);\n\t  }\n\n\t  // Finish an operation, updating the display and signalling delayed events\n\t  function endOperation(cm) {\n\t    var op = cm.curOp;\n\t    if (op) { finishOperation(op, function (group) {\n\t      for (var i = 0; i < group.ops.length; i++)\n\t        { group.ops[i].cm.curOp = null; }\n\t      endOperations(group);\n\t    }); }\n\t  }\n\n\t  // The DOM updates done when an operation finishes are batched so\n\t  // that the minimum number of relayouts are required.\n\t  function endOperations(group) {\n\t    var ops = group.ops;\n\t    for (var i = 0; i < ops.length; i++) // Read DOM\n\t      { endOperation_R1(ops[i]); }\n\t    for (var i$1 = 0; i$1 < ops.length; i$1++) // Write DOM (maybe)\n\t      { endOperation_W1(ops[i$1]); }\n\t    for (var i$2 = 0; i$2 < ops.length; i$2++) // Read DOM\n\t      { endOperation_R2(ops[i$2]); }\n\t    for (var i$3 = 0; i$3 < ops.length; i$3++) // Write DOM (maybe)\n\t      { endOperation_W2(ops[i$3]); }\n\t    for (var i$4 = 0; i$4 < ops.length; i$4++) // Read DOM\n\t      { endOperation_finish(ops[i$4]); }\n\t  }\n\n\t  function endOperation_R1(op) {\n\t    var cm = op.cm, display = cm.display;\n\t    maybeClipScrollbars(cm);\n\t    if (op.updateMaxLine) { findMaxLine(cm); }\n\n\t    op.mustUpdate = op.viewChanged || op.forceUpdate || op.scrollTop != null ||\n\t      op.scrollToPos && (op.scrollToPos.from.line < display.viewFrom ||\n\t                         op.scrollToPos.to.line >= display.viewTo) ||\n\t      display.maxLineChanged && cm.options.lineWrapping;\n\t    op.update = op.mustUpdate &&\n\t      new DisplayUpdate(cm, op.mustUpdate && {top: op.scrollTop, ensure: op.scrollToPos}, op.forceUpdate);\n\t  }\n\n\t  function endOperation_W1(op) {\n\t    op.updatedDisplay = op.mustUpdate && updateDisplayIfNeeded(op.cm, op.update);\n\t  }\n\n\t  function endOperation_R2(op) {\n\t    var cm = op.cm, display = cm.display;\n\t    if (op.updatedDisplay) { updateHeightsInViewport(cm); }\n\n\t    op.barMeasure = measureForScrollbars(cm);\n\n\t    // If the max line changed since it was last measured, measure it,\n\t    // and ensure the document's width matches it.\n\t    // updateDisplay_W2 will use these properties to do the actual resizing\n\t    if (display.maxLineChanged && !cm.options.lineWrapping) {\n\t      op.adjustWidthTo = measureChar(cm, display.maxLine, display.maxLine.text.length).left + 3;\n\t      cm.display.sizerWidth = op.adjustWidthTo;\n\t      op.barMeasure.scrollWidth =\n\t        Math.max(display.scroller.clientWidth, display.sizer.offsetLeft + op.adjustWidthTo + scrollGap(cm) + cm.display.barWidth);\n\t      op.maxScrollLeft = Math.max(0, display.sizer.offsetLeft + op.adjustWidthTo - displayWidth(cm));\n\t    }\n\n\t    if (op.updatedDisplay || op.selectionChanged)\n\t      { op.preparedSelection = display.input.prepareSelection(); }\n\t  }\n\n\t  function endOperation_W2(op) {\n\t    var cm = op.cm;\n\n\t    if (op.adjustWidthTo != null) {\n\t      cm.display.sizer.style.minWidth = op.adjustWidthTo + \"px\";\n\t      if (op.maxScrollLeft < cm.doc.scrollLeft)\n\t        { setScrollLeft(cm, Math.min(cm.display.scroller.scrollLeft, op.maxScrollLeft), true); }\n\t      cm.display.maxLineChanged = false;\n\t    }\n\n\t    var takeFocus = op.focus && op.focus == activeElt();\n\t    if (op.preparedSelection)\n\t      { cm.display.input.showSelection(op.preparedSelection, takeFocus); }\n\t    if (op.updatedDisplay || op.startHeight != cm.doc.height)\n\t      { updateScrollbars(cm, op.barMeasure); }\n\t    if (op.updatedDisplay)\n\t      { setDocumentHeight(cm, op.barMeasure); }\n\n\t    if (op.selectionChanged) { restartBlink(cm); }\n\n\t    if (cm.state.focused && op.updateInput)\n\t      { cm.display.input.reset(op.typing); }\n\t    if (takeFocus) { ensureFocus(op.cm); }\n\t  }\n\n\t  function endOperation_finish(op) {\n\t    var cm = op.cm, display = cm.display, doc = cm.doc;\n\n\t    if (op.updatedDisplay) { postUpdateDisplay(cm, op.update); }\n\n\t    // Abort mouse wheel delta measurement, when scrolling explicitly\n\t    if (display.wheelStartX != null && (op.scrollTop != null || op.scrollLeft != null || op.scrollToPos))\n\t      { display.wheelStartX = display.wheelStartY = null; }\n\n\t    // Propagate the scroll position to the actual DOM scroller\n\t    if (op.scrollTop != null) { setScrollTop(cm, op.scrollTop, op.forceScroll); }\n\n\t    if (op.scrollLeft != null) { setScrollLeft(cm, op.scrollLeft, true, true); }\n\t    // If we need to scroll a specific position into view, do so.\n\t    if (op.scrollToPos) {\n\t      var rect = scrollPosIntoView(cm, clipPos(doc, op.scrollToPos.from),\n\t                                   clipPos(doc, op.scrollToPos.to), op.scrollToPos.margin);\n\t      maybeScrollWindow(cm, rect);\n\t    }\n\n\t    // Fire events for markers that are hidden/unidden by editing or\n\t    // undoing\n\t    var hidden = op.maybeHiddenMarkers, unhidden = op.maybeUnhiddenMarkers;\n\t    if (hidden) { for (var i = 0; i < hidden.length; ++i)\n\t      { if (!hidden[i].lines.length) { signal(hidden[i], \"hide\"); } } }\n\t    if (unhidden) { for (var i$1 = 0; i$1 < unhidden.length; ++i$1)\n\t      { if (unhidden[i$1].lines.length) { signal(unhidden[i$1], \"unhide\"); } } }\n\n\t    if (display.wrapper.offsetHeight)\n\t      { doc.scrollTop = cm.display.scroller.scrollTop; }\n\n\t    // Fire change events, and delayed event handlers\n\t    if (op.changeObjs)\n\t      { signal(cm, \"changes\", cm, op.changeObjs); }\n\t    if (op.update)\n\t      { op.update.finish(); }\n\t  }\n\n\t  // Run the given function in an operation\n\t  function runInOp(cm, f) {\n\t    if (cm.curOp) { return f() }\n\t    startOperation(cm);\n\t    try { return f() }\n\t    finally { endOperation(cm); }\n\t  }\n\t  // Wraps a function in an operation. Returns the wrapped function.\n\t  function operation(cm, f) {\n\t    return function() {\n\t      if (cm.curOp) { return f.apply(cm, arguments) }\n\t      startOperation(cm);\n\t      try { return f.apply(cm, arguments) }\n\t      finally { endOperation(cm); }\n\t    }\n\t  }\n\t  // Used to add methods to editor and doc instances, wrapping them in\n\t  // operations.\n\t  function methodOp(f) {\n\t    return function() {\n\t      if (this.curOp) { return f.apply(this, arguments) }\n\t      startOperation(this);\n\t      try { return f.apply(this, arguments) }\n\t      finally { endOperation(this); }\n\t    }\n\t  }\n\t  function docMethodOp(f) {\n\t    return function() {\n\t      var cm = this.cm;\n\t      if (!cm || cm.curOp) { return f.apply(this, arguments) }\n\t      startOperation(cm);\n\t      try { return f.apply(this, arguments) }\n\t      finally { endOperation(cm); }\n\t    }\n\t  }\n\n\t  // HIGHLIGHT WORKER\n\n\t  function startWorker(cm, time) {\n\t    if (cm.doc.highlightFrontier < cm.display.viewTo)\n\t      { cm.state.highlight.set(time, bind(highlightWorker, cm)); }\n\t  }\n\n\t  function highlightWorker(cm) {\n\t    var doc = cm.doc;\n\t    if (doc.highlightFrontier >= cm.display.viewTo) { return }\n\t    var end = +new Date + cm.options.workTime;\n\t    var context = getContextBefore(cm, doc.highlightFrontier);\n\t    var changedLines = [];\n\n\t    doc.iter(context.line, Math.min(doc.first + doc.size, cm.display.viewTo + 500), function (line) {\n\t      if (context.line >= cm.display.viewFrom) { // Visible\n\t        var oldStyles = line.styles;\n\t        var resetState = line.text.length > cm.options.maxHighlightLength ? copyState(doc.mode, context.state) : null;\n\t        var highlighted = highlightLine(cm, line, context, true);\n\t        if (resetState) { context.state = resetState; }\n\t        line.styles = highlighted.styles;\n\t        var oldCls = line.styleClasses, newCls = highlighted.classes;\n\t        if (newCls) { line.styleClasses = newCls; }\n\t        else if (oldCls) { line.styleClasses = null; }\n\t        var ischange = !oldStyles || oldStyles.length != line.styles.length ||\n\t          oldCls != newCls && (!oldCls || !newCls || oldCls.bgClass != newCls.bgClass || oldCls.textClass != newCls.textClass);\n\t        for (var i = 0; !ischange && i < oldStyles.length; ++i) { ischange = oldStyles[i] != line.styles[i]; }\n\t        if (ischange) { changedLines.push(context.line); }\n\t        line.stateAfter = context.save();\n\t        context.nextLine();\n\t      } else {\n\t        if (line.text.length <= cm.options.maxHighlightLength)\n\t          { processLine(cm, line.text, context); }\n\t        line.stateAfter = context.line % 5 == 0 ? context.save() : null;\n\t        context.nextLine();\n\t      }\n\t      if (+new Date > end) {\n\t        startWorker(cm, cm.options.workDelay);\n\t        return true\n\t      }\n\t    });\n\t    doc.highlightFrontier = context.line;\n\t    doc.modeFrontier = Math.max(doc.modeFrontier, context.line);\n\t    if (changedLines.length) { runInOp(cm, function () {\n\t      for (var i = 0; i < changedLines.length; i++)\n\t        { regLineChange(cm, changedLines[i], \"text\"); }\n\t    }); }\n\t  }\n\n\t  // DISPLAY DRAWING\n\n\t  var DisplayUpdate = function(cm, viewport, force) {\n\t    var display = cm.display;\n\n\t    this.viewport = viewport;\n\t    // Store some values that we'll need later (but don't want to force a relayout for)\n\t    this.visible = visibleLines(display, cm.doc, viewport);\n\t    this.editorIsHidden = !display.wrapper.offsetWidth;\n\t    this.wrapperHeight = display.wrapper.clientHeight;\n\t    this.wrapperWidth = display.wrapper.clientWidth;\n\t    this.oldDisplayWidth = displayWidth(cm);\n\t    this.force = force;\n\t    this.dims = getDimensions(cm);\n\t    this.events = [];\n\t  };\n\n\t  DisplayUpdate.prototype.signal = function (emitter, type) {\n\t    if (hasHandler(emitter, type))\n\t      { this.events.push(arguments); }\n\t  };\n\t  DisplayUpdate.prototype.finish = function () {\n\t    for (var i = 0; i < this.events.length; i++)\n\t      { signal.apply(null, this.events[i]); }\n\t  };\n\n\t  function maybeClipScrollbars(cm) {\n\t    var display = cm.display;\n\t    if (!display.scrollbarsClipped && display.scroller.offsetWidth) {\n\t      display.nativeBarWidth = display.scroller.offsetWidth - display.scroller.clientWidth;\n\t      display.heightForcer.style.height = scrollGap(cm) + \"px\";\n\t      display.sizer.style.marginBottom = -display.nativeBarWidth + \"px\";\n\t      display.sizer.style.borderRightWidth = scrollGap(cm) + \"px\";\n\t      display.scrollbarsClipped = true;\n\t    }\n\t  }\n\n\t  function selectionSnapshot(cm) {\n\t    if (cm.hasFocus()) { return null }\n\t    var active = activeElt();\n\t    if (!active || !contains(cm.display.lineDiv, active)) { return null }\n\t    var result = {activeElt: active};\n\t    if (window.getSelection) {\n\t      var sel = window.getSelection();\n\t      if (sel.anchorNode && sel.extend && contains(cm.display.lineDiv, sel.anchorNode)) {\n\t        result.anchorNode = sel.anchorNode;\n\t        result.anchorOffset = sel.anchorOffset;\n\t        result.focusNode = sel.focusNode;\n\t        result.focusOffset = sel.focusOffset;\n\t      }\n\t    }\n\t    return result\n\t  }\n\n\t  function restoreSelection(snapshot) {\n\t    if (!snapshot || !snapshot.activeElt || snapshot.activeElt == activeElt()) { return }\n\t    snapshot.activeElt.focus();\n\t    if (!/^(INPUT|TEXTAREA)$/.test(snapshot.activeElt.nodeName) &&\n\t        snapshot.anchorNode && contains(document.body, snapshot.anchorNode) && contains(document.body, snapshot.focusNode)) {\n\t      var sel = window.getSelection(), range = document.createRange();\n\t      range.setEnd(snapshot.anchorNode, snapshot.anchorOffset);\n\t      range.collapse(false);\n\t      sel.removeAllRanges();\n\t      sel.addRange(range);\n\t      sel.extend(snapshot.focusNode, snapshot.focusOffset);\n\t    }\n\t  }\n\n\t  // Does the actual updating of the line display. Bails out\n\t  // (returning false) when there is nothing to be done and forced is\n\t  // false.\n\t  function updateDisplayIfNeeded(cm, update) {\n\t    var display = cm.display, doc = cm.doc;\n\n\t    if (update.editorIsHidden) {\n\t      resetView(cm);\n\t      return false\n\t    }\n\n\t    // Bail out if the visible area is already rendered and nothing changed.\n\t    if (!update.force &&\n\t        update.visible.from >= display.viewFrom && update.visible.to <= display.viewTo &&\n\t        (display.updateLineNumbers == null || display.updateLineNumbers >= display.viewTo) &&\n\t        display.renderedView == display.view && countDirtyView(cm) == 0)\n\t      { return false }\n\n\t    if (maybeUpdateLineNumberWidth(cm)) {\n\t      resetView(cm);\n\t      update.dims = getDimensions(cm);\n\t    }\n\n\t    // Compute a suitable new viewport (from & to)\n\t    var end = doc.first + doc.size;\n\t    var from = Math.max(update.visible.from - cm.options.viewportMargin, doc.first);\n\t    var to = Math.min(end, update.visible.to + cm.options.viewportMargin);\n\t    if (display.viewFrom < from && from - display.viewFrom < 20) { from = Math.max(doc.first, display.viewFrom); }\n\t    if (display.viewTo > to && display.viewTo - to < 20) { to = Math.min(end, display.viewTo); }\n\t    if (sawCollapsedSpans) {\n\t      from = visualLineNo(cm.doc, from);\n\t      to = visualLineEndNo(cm.doc, to);\n\t    }\n\n\t    var different = from != display.viewFrom || to != display.viewTo ||\n\t      display.lastWrapHeight != update.wrapperHeight || display.lastWrapWidth != update.wrapperWidth;\n\t    adjustView(cm, from, to);\n\n\t    display.viewOffset = heightAtLine(getLine(cm.doc, display.viewFrom));\n\t    // Position the mover div to align with the current scroll position\n\t    cm.display.mover.style.top = display.viewOffset + \"px\";\n\n\t    var toUpdate = countDirtyView(cm);\n\t    if (!different && toUpdate == 0 && !update.force && display.renderedView == display.view &&\n\t        (display.updateLineNumbers == null || display.updateLineNumbers >= display.viewTo))\n\t      { return false }\n\n\t    // For big changes, we hide the enclosing element during the\n\t    // update, since that speeds up the operations on most browsers.\n\t    var selSnapshot = selectionSnapshot(cm);\n\t    if (toUpdate > 4) { display.lineDiv.style.display = \"none\"; }\n\t    patchDisplay(cm, display.updateLineNumbers, update.dims);\n\t    if (toUpdate > 4) { display.lineDiv.style.display = \"\"; }\n\t    display.renderedView = display.view;\n\t    // There might have been a widget with a focused element that got\n\t    // hidden or updated, if so re-focus it.\n\t    restoreSelection(selSnapshot);\n\n\t    // Prevent selection and cursors from interfering with the scroll\n\t    // width and height.\n\t    removeChildren(display.cursorDiv);\n\t    removeChildren(display.selectionDiv);\n\t    display.gutters.style.height = display.sizer.style.minHeight = 0;\n\n\t    if (different) {\n\t      display.lastWrapHeight = update.wrapperHeight;\n\t      display.lastWrapWidth = update.wrapperWidth;\n\t      startWorker(cm, 400);\n\t    }\n\n\t    display.updateLineNumbers = null;\n\n\t    return true\n\t  }\n\n\t  function postUpdateDisplay(cm, update) {\n\t    var viewport = update.viewport;\n\n\t    for (var first = true;; first = false) {\n\t      if (!first || !cm.options.lineWrapping || update.oldDisplayWidth == displayWidth(cm)) {\n\t        // Clip forced viewport to actual scrollable area.\n\t        if (viewport && viewport.top != null)\n\t          { viewport = {top: Math.min(cm.doc.height + paddingVert(cm.display) - displayHeight(cm), viewport.top)}; }\n\t        // Updated line heights might result in the drawn area not\n\t        // actually covering the viewport. Keep looping until it does.\n\t        update.visible = visibleLines(cm.display, cm.doc, viewport);\n\t        if (update.visible.from >= cm.display.viewFrom && update.visible.to <= cm.display.viewTo)\n\t          { break }\n\t      } else if (first) {\n\t        update.visible = visibleLines(cm.display, cm.doc, viewport);\n\t      }\n\t      if (!updateDisplayIfNeeded(cm, update)) { break }\n\t      updateHeightsInViewport(cm);\n\t      var barMeasure = measureForScrollbars(cm);\n\t      updateSelection(cm);\n\t      updateScrollbars(cm, barMeasure);\n\t      setDocumentHeight(cm, barMeasure);\n\t      update.force = false;\n\t    }\n\n\t    update.signal(cm, \"update\", cm);\n\t    if (cm.display.viewFrom != cm.display.reportedViewFrom || cm.display.viewTo != cm.display.reportedViewTo) {\n\t      update.signal(cm, \"viewportChange\", cm, cm.display.viewFrom, cm.display.viewTo);\n\t      cm.display.reportedViewFrom = cm.display.viewFrom; cm.display.reportedViewTo = cm.display.viewTo;\n\t    }\n\t  }\n\n\t  function updateDisplaySimple(cm, viewport) {\n\t    var update = new DisplayUpdate(cm, viewport);\n\t    if (updateDisplayIfNeeded(cm, update)) {\n\t      updateHeightsInViewport(cm);\n\t      postUpdateDisplay(cm, update);\n\t      var barMeasure = measureForScrollbars(cm);\n\t      updateSelection(cm);\n\t      updateScrollbars(cm, barMeasure);\n\t      setDocumentHeight(cm, barMeasure);\n\t      update.finish();\n\t    }\n\t  }\n\n\t  // Sync the actual display DOM structure with display.view, removing\n\t  // nodes for lines that are no longer in view, and creating the ones\n\t  // that are not there yet, and updating the ones that are out of\n\t  // date.\n\t  function patchDisplay(cm, updateNumbersFrom, dims) {\n\t    var display = cm.display, lineNumbers = cm.options.lineNumbers;\n\t    var container = display.lineDiv, cur = container.firstChild;\n\n\t    function rm(node) {\n\t      var next = node.nextSibling;\n\t      // Works around a throw-scroll bug in OS X Webkit\n\t      if (webkit && mac && cm.display.currentWheelTarget == node)\n\t        { node.style.display = \"none\"; }\n\t      else\n\t        { node.parentNode.removeChild(node); }\n\t      return next\n\t    }\n\n\t    var view = display.view, lineN = display.viewFrom;\n\t    // Loop over the elements in the view, syncing cur (the DOM nodes\n\t    // in display.lineDiv) with the view as we go.\n\t    for (var i = 0; i < view.length; i++) {\n\t      var lineView = view[i];\n\t      if (lineView.hidden) ; else if (!lineView.node || lineView.node.parentNode != container) { // Not drawn yet\n\t        var node = buildLineElement(cm, lineView, lineN, dims);\n\t        container.insertBefore(node, cur);\n\t      } else { // Already drawn\n\t        while (cur != lineView.node) { cur = rm(cur); }\n\t        var updateNumber = lineNumbers && updateNumbersFrom != null &&\n\t          updateNumbersFrom <= lineN && lineView.lineNumber;\n\t        if (lineView.changes) {\n\t          if (indexOf(lineView.changes, \"gutter\") > -1) { updateNumber = false; }\n\t          updateLineForChanges(cm, lineView, lineN, dims);\n\t        }\n\t        if (updateNumber) {\n\t          removeChildren(lineView.lineNumber);\n\t          lineView.lineNumber.appendChild(document.createTextNode(lineNumberFor(cm.options, lineN)));\n\t        }\n\t        cur = lineView.node.nextSibling;\n\t      }\n\t      lineN += lineView.size;\n\t    }\n\t    while (cur) { cur = rm(cur); }\n\t  }\n\n\t  function updateGutterSpace(display) {\n\t    var width = display.gutters.offsetWidth;\n\t    display.sizer.style.marginLeft = width + \"px\";\n\t  }\n\n\t  function setDocumentHeight(cm, measure) {\n\t    cm.display.sizer.style.minHeight = measure.docHeight + \"px\";\n\t    cm.display.heightForcer.style.top = measure.docHeight + \"px\";\n\t    cm.display.gutters.style.height = (measure.docHeight + cm.display.barHeight + scrollGap(cm)) + \"px\";\n\t  }\n\n\t  // Re-align line numbers and gutter marks to compensate for\n\t  // horizontal scrolling.\n\t  function alignHorizontally(cm) {\n\t    var display = cm.display, view = display.view;\n\t    if (!display.alignWidgets && (!display.gutters.firstChild || !cm.options.fixedGutter)) { return }\n\t    var comp = compensateForHScroll(display) - display.scroller.scrollLeft + cm.doc.scrollLeft;\n\t    var gutterW = display.gutters.offsetWidth, left = comp + \"px\";\n\t    for (var i = 0; i < view.length; i++) { if (!view[i].hidden) {\n\t      if (cm.options.fixedGutter) {\n\t        if (view[i].gutter)\n\t          { view[i].gutter.style.left = left; }\n\t        if (view[i].gutterBackground)\n\t          { view[i].gutterBackground.style.left = left; }\n\t      }\n\t      var align = view[i].alignable;\n\t      if (align) { for (var j = 0; j < align.length; j++)\n\t        { align[j].style.left = left; } }\n\t    } }\n\t    if (cm.options.fixedGutter)\n\t      { display.gutters.style.left = (comp + gutterW) + \"px\"; }\n\t  }\n\n\t  // Used to ensure that the line number gutter is still the right\n\t  // size for the current document size. Returns true when an update\n\t  // is needed.\n\t  function maybeUpdateLineNumberWidth(cm) {\n\t    if (!cm.options.lineNumbers) { return false }\n\t    var doc = cm.doc, last = lineNumberFor(cm.options, doc.first + doc.size - 1), display = cm.display;\n\t    if (last.length != display.lineNumChars) {\n\t      var test = display.measure.appendChild(elt(\"div\", [elt(\"div\", last)],\n\t                                                 \"CodeMirror-linenumber CodeMirror-gutter-elt\"));\n\t      var innerW = test.firstChild.offsetWidth, padding = test.offsetWidth - innerW;\n\t      display.lineGutter.style.width = \"\";\n\t      display.lineNumInnerWidth = Math.max(innerW, display.lineGutter.offsetWidth - padding) + 1;\n\t      display.lineNumWidth = display.lineNumInnerWidth + padding;\n\t      display.lineNumChars = display.lineNumInnerWidth ? last.length : -1;\n\t      display.lineGutter.style.width = display.lineNumWidth + \"px\";\n\t      updateGutterSpace(cm.display);\n\t      return true\n\t    }\n\t    return false\n\t  }\n\n\t  function getGutters(gutters, lineNumbers) {\n\t    var result = [], sawLineNumbers = false;\n\t    for (var i = 0; i < gutters.length; i++) {\n\t      var name = gutters[i], style = null;\n\t      if (typeof name != \"string\") { style = name.style; name = name.className; }\n\t      if (name == \"CodeMirror-linenumbers\") {\n\t        if (!lineNumbers) { continue }\n\t        else { sawLineNumbers = true; }\n\t      }\n\t      result.push({className: name, style: style});\n\t    }\n\t    if (lineNumbers && !sawLineNumbers) { result.push({className: \"CodeMirror-linenumbers\", style: null}); }\n\t    return result\n\t  }\n\n\t  // Rebuild the gutter elements, ensure the margin to the left of the\n\t  // code matches their width.\n\t  function renderGutters(display) {\n\t    var gutters = display.gutters, specs = display.gutterSpecs;\n\t    removeChildren(gutters);\n\t    display.lineGutter = null;\n\t    for (var i = 0; i < specs.length; ++i) {\n\t      var ref = specs[i];\n\t      var className = ref.className;\n\t      var style = ref.style;\n\t      var gElt = gutters.appendChild(elt(\"div\", null, \"CodeMirror-gutter \" + className));\n\t      if (style) { gElt.style.cssText = style; }\n\t      if (className == \"CodeMirror-linenumbers\") {\n\t        display.lineGutter = gElt;\n\t        gElt.style.width = (display.lineNumWidth || 1) + \"px\";\n\t      }\n\t    }\n\t    gutters.style.display = specs.length ? \"\" : \"none\";\n\t    updateGutterSpace(display);\n\t  }\n\n\t  function updateGutters(cm) {\n\t    renderGutters(cm.display);\n\t    regChange(cm);\n\t    alignHorizontally(cm);\n\t  }\n\n\t  // The display handles the DOM integration, both for input reading\n\t  // and content drawing. It holds references to DOM nodes and\n\t  // display-related state.\n\n\t  function Display(place, doc, input, options) {\n\t    var d = this;\n\t    this.input = input;\n\n\t    // Covers bottom-right square when both scrollbars are present.\n\t    d.scrollbarFiller = elt(\"div\", null, \"CodeMirror-scrollbar-filler\");\n\t    d.scrollbarFiller.setAttribute(\"cm-not-content\", \"true\");\n\t    // Covers bottom of gutter when coverGutterNextToScrollbar is on\n\t    // and h scrollbar is present.\n\t    d.gutterFiller = elt(\"div\", null, \"CodeMirror-gutter-filler\");\n\t    d.gutterFiller.setAttribute(\"cm-not-content\", \"true\");\n\t    // Will contain the actual code, positioned to cover the viewport.\n\t    d.lineDiv = eltP(\"div\", null, \"CodeMirror-code\");\n\t    // Elements are added to these to represent selection and cursors.\n\t    d.selectionDiv = elt(\"div\", null, null, \"position: relative; z-index: 1\");\n\t    d.cursorDiv = elt(\"div\", null, \"CodeMirror-cursors\");\n\t    // A visibility: hidden element used to find the size of things.\n\t    d.measure = elt(\"div\", null, \"CodeMirror-measure\");\n\t    // When lines outside of the viewport are measured, they are drawn in this.\n\t    d.lineMeasure = elt(\"div\", null, \"CodeMirror-measure\");\n\t    // Wraps everything that needs to exist inside the vertically-padded coordinate system\n\t    d.lineSpace = eltP(\"div\", [d.measure, d.lineMeasure, d.selectionDiv, d.cursorDiv, d.lineDiv],\n\t                      null, \"position: relative; outline: none\");\n\t    var lines = eltP(\"div\", [d.lineSpace], \"CodeMirror-lines\");\n\t    // Moved around its parent to cover visible view.\n\t    d.mover = elt(\"div\", [lines], null, \"position: relative\");\n\t    // Set to the height of the document, allowing scrolling.\n\t    d.sizer = elt(\"div\", [d.mover], \"CodeMirror-sizer\");\n\t    d.sizerWidth = null;\n\t    // Behavior of elts with overflow: auto and padding is\n\t    // inconsistent across browsers. This is used to ensure the\n\t    // scrollable area is big enough.\n\t    d.heightForcer = elt(\"div\", null, null, \"position: absolute; height: \" + scrollerGap + \"px; width: 1px;\");\n\t    // Will contain the gutters, if any.\n\t    d.gutters = elt(\"div\", null, \"CodeMirror-gutters\");\n\t    d.lineGutter = null;\n\t    // Actual scrollable element.\n\t    d.scroller = elt(\"div\", [d.sizer, d.heightForcer, d.gutters], \"CodeMirror-scroll\");\n\t    d.scroller.setAttribute(\"tabIndex\", \"-1\");\n\t    // The element in which the editor lives.\n\t    d.wrapper = elt(\"div\", [d.scrollbarFiller, d.gutterFiller, d.scroller], \"CodeMirror\");\n\n\t    // Work around IE7 z-index bug (not perfect, hence IE7 not really being supported)\n\t    if (ie && ie_version < 8) { d.gutters.style.zIndex = -1; d.scroller.style.paddingRight = 0; }\n\t    if (!webkit && !(gecko && mobile)) { d.scroller.draggable = true; }\n\n\t    if (place) {\n\t      if (place.appendChild) { place.appendChild(d.wrapper); }\n\t      else { place(d.wrapper); }\n\t    }\n\n\t    // Current rendered range (may be bigger than the view window).\n\t    d.viewFrom = d.viewTo = doc.first;\n\t    d.reportedViewFrom = d.reportedViewTo = doc.first;\n\t    // Information about the rendered lines.\n\t    d.view = [];\n\t    d.renderedView = null;\n\t    // Holds info about a single rendered line when it was rendered\n\t    // for measurement, while not in view.\n\t    d.externalMeasured = null;\n\t    // Empty space (in pixels) above the view\n\t    d.viewOffset = 0;\n\t    d.lastWrapHeight = d.lastWrapWidth = 0;\n\t    d.updateLineNumbers = null;\n\n\t    d.nativeBarWidth = d.barHeight = d.barWidth = 0;\n\t    d.scrollbarsClipped = false;\n\n\t    // Used to only resize the line number gutter when necessary (when\n\t    // the amount of lines crosses a boundary that makes its width change)\n\t    d.lineNumWidth = d.lineNumInnerWidth = d.lineNumChars = null;\n\t    // Set to true when a non-horizontal-scrolling line widget is\n\t    // added. As an optimization, line widget aligning is skipped when\n\t    // this is false.\n\t    d.alignWidgets = false;\n\n\t    d.cachedCharWidth = d.cachedTextHeight = d.cachedPaddingH = null;\n\n\t    // Tracks the maximum line length so that the horizontal scrollbar\n\t    // can be kept static when scrolling.\n\t    d.maxLine = null;\n\t    d.maxLineLength = 0;\n\t    d.maxLineChanged = false;\n\n\t    // Used for measuring wheel scrolling granularity\n\t    d.wheelDX = d.wheelDY = d.wheelStartX = d.wheelStartY = null;\n\n\t    // True when shift is held down.\n\t    d.shift = false;\n\n\t    // Used to track whether anything happened since the context menu\n\t    // was opened.\n\t    d.selForContextMenu = null;\n\n\t    d.activeTouch = null;\n\n\t    d.gutterSpecs = getGutters(options.gutters, options.lineNumbers);\n\t    renderGutters(d);\n\n\t    input.init(d);\n\t  }\n\n\t  // Since the delta values reported on mouse wheel events are\n\t  // unstandardized between browsers and even browser versions, and\n\t  // generally horribly unpredictable, this code starts by measuring\n\t  // the scroll effect that the first few mouse wheel events have,\n\t  // and, from that, detects the way it can convert deltas to pixel\n\t  // offsets afterwards.\n\t  //\n\t  // The reason we want to know the amount a wheel event will scroll\n\t  // is that it gives us a chance to update the display before the\n\t  // actual scrolling happens, reducing flickering.\n\n\t  var wheelSamples = 0, wheelPixelsPerUnit = null;\n\t  // Fill in a browser-detected starting value on browsers where we\n\t  // know one. These don't have to be accurate -- the result of them\n\t  // being wrong would just be a slight flicker on the first wheel\n\t  // scroll (if it is large enough).\n\t  if (ie) { wheelPixelsPerUnit = -.53; }\n\t  else if (gecko) { wheelPixelsPerUnit = 15; }\n\t  else if (chrome) { wheelPixelsPerUnit = -.7; }\n\t  else if (safari) { wheelPixelsPerUnit = -1/3; }\n\n\t  function wheelEventDelta(e) {\n\t    var dx = e.wheelDeltaX, dy = e.wheelDeltaY;\n\t    if (dx == null && e.detail && e.axis == e.HORIZONTAL_AXIS) { dx = e.detail; }\n\t    if (dy == null && e.detail && e.axis == e.VERTICAL_AXIS) { dy = e.detail; }\n\t    else if (dy == null) { dy = e.wheelDelta; }\n\t    return {x: dx, y: dy}\n\t  }\n\t  function wheelEventPixels(e) {\n\t    var delta = wheelEventDelta(e);\n\t    delta.x *= wheelPixelsPerUnit;\n\t    delta.y *= wheelPixelsPerUnit;\n\t    return delta\n\t  }\n\n\t  function onScrollWheel(cm, e) {\n\t    var delta = wheelEventDelta(e), dx = delta.x, dy = delta.y;\n\n\t    var display = cm.display, scroll = display.scroller;\n\t    // Quit if there's nothing to scroll here\n\t    var canScrollX = scroll.scrollWidth > scroll.clientWidth;\n\t    var canScrollY = scroll.scrollHeight > scroll.clientHeight;\n\t    if (!(dx && canScrollX || dy && canScrollY)) { return }\n\n\t    // Webkit browsers on OS X abort momentum scrolls when the target\n\t    // of the scroll event is removed from the scrollable element.\n\t    // This hack (see related code in patchDisplay) makes sure the\n\t    // element is kept around.\n\t    if (dy && mac && webkit) {\n\t      outer: for (var cur = e.target, view = display.view; cur != scroll; cur = cur.parentNode) {\n\t        for (var i = 0; i < view.length; i++) {\n\t          if (view[i].node == cur) {\n\t            cm.display.currentWheelTarget = cur;\n\t            break outer\n\t          }\n\t        }\n\t      }\n\t    }\n\n\t    // On some browsers, horizontal scrolling will cause redraws to\n\t    // happen before the gutter has been realigned, causing it to\n\t    // wriggle around in a most unseemly way. When we have an\n\t    // estimated pixels/delta value, we just handle horizontal\n\t    // scrolling entirely here. It'll be slightly off from native, but\n\t    // better than glitching out.\n\t    if (dx && !gecko && !presto && wheelPixelsPerUnit != null) {\n\t      if (dy && canScrollY)\n\t        { updateScrollTop(cm, Math.max(0, scroll.scrollTop + dy * wheelPixelsPerUnit)); }\n\t      setScrollLeft(cm, Math.max(0, scroll.scrollLeft + dx * wheelPixelsPerUnit));\n\t      // Only prevent default scrolling if vertical scrolling is\n\t      // actually possible. Otherwise, it causes vertical scroll\n\t      // jitter on OSX trackpads when deltaX is small and deltaY\n\t      // is large (issue #3579)\n\t      if (!dy || (dy && canScrollY))\n\t        { e_preventDefault(e); }\n\t      display.wheelStartX = null; // Abort measurement, if in progress\n\t      return\n\t    }\n\n\t    // 'Project' the visible viewport to cover the area that is being\n\t    // scrolled into view (if we know enough to estimate it).\n\t    if (dy && wheelPixelsPerUnit != null) {\n\t      var pixels = dy * wheelPixelsPerUnit;\n\t      var top = cm.doc.scrollTop, bot = top + display.wrapper.clientHeight;\n\t      if (pixels < 0) { top = Math.max(0, top + pixels - 50); }\n\t      else { bot = Math.min(cm.doc.height, bot + pixels + 50); }\n\t      updateDisplaySimple(cm, {top: top, bottom: bot});\n\t    }\n\n\t    if (wheelSamples < 20) {\n\t      if (display.wheelStartX == null) {\n\t        display.wheelStartX = scroll.scrollLeft; display.wheelStartY = scroll.scrollTop;\n\t        display.wheelDX = dx; display.wheelDY = dy;\n\t        setTimeout(function () {\n\t          if (display.wheelStartX == null) { return }\n\t          var movedX = scroll.scrollLeft - display.wheelStartX;\n\t          var movedY = scroll.scrollTop - display.wheelStartY;\n\t          var sample = (movedY && display.wheelDY && movedY / display.wheelDY) ||\n\t            (movedX && display.wheelDX && movedX / display.wheelDX);\n\t          display.wheelStartX = display.wheelStartY = null;\n\t          if (!sample) { return }\n\t          wheelPixelsPerUnit = (wheelPixelsPerUnit * wheelSamples + sample) / (wheelSamples + 1);\n\t          ++wheelSamples;\n\t        }, 200);\n\t      } else {\n\t        display.wheelDX += dx; display.wheelDY += dy;\n\t      }\n\t    }\n\t  }\n\n\t  // Selection objects are immutable. A new one is created every time\n\t  // the selection changes. A selection is one or more non-overlapping\n\t  // (and non-touching) ranges, sorted, and an integer that indicates\n\t  // which one is the primary selection (the one that's scrolled into\n\t  // view, that getCursor returns, etc).\n\t  var Selection = function(ranges, primIndex) {\n\t    this.ranges = ranges;\n\t    this.primIndex = primIndex;\n\t  };\n\n\t  Selection.prototype.primary = function () { return this.ranges[this.primIndex] };\n\n\t  Selection.prototype.equals = function (other) {\n\t    if (other == this) { return true }\n\t    if (other.primIndex != this.primIndex || other.ranges.length != this.ranges.length) { return false }\n\t    for (var i = 0; i < this.ranges.length; i++) {\n\t      var here = this.ranges[i], there = other.ranges[i];\n\t      if (!equalCursorPos(here.anchor, there.anchor) || !equalCursorPos(here.head, there.head)) { return false }\n\t    }\n\t    return true\n\t  };\n\n\t  Selection.prototype.deepCopy = function () {\n\t    var out = [];\n\t    for (var i = 0; i < this.ranges.length; i++)\n\t      { out[i] = new Range(copyPos(this.ranges[i].anchor), copyPos(this.ranges[i].head)); }\n\t    return new Selection(out, this.primIndex)\n\t  };\n\n\t  Selection.prototype.somethingSelected = function () {\n\t    for (var i = 0; i < this.ranges.length; i++)\n\t      { if (!this.ranges[i].empty()) { return true } }\n\t    return false\n\t  };\n\n\t  Selection.prototype.contains = function (pos, end) {\n\t    if (!end) { end = pos; }\n\t    for (var i = 0; i < this.ranges.length; i++) {\n\t      var range = this.ranges[i];\n\t      if (cmp(end, range.from()) >= 0 && cmp(pos, range.to()) <= 0)\n\t        { return i }\n\t    }\n\t    return -1\n\t  };\n\n\t  var Range = function(anchor, head) {\n\t    this.anchor = anchor; this.head = head;\n\t  };\n\n\t  Range.prototype.from = function () { return minPos(this.anchor, this.head) };\n\t  Range.prototype.to = function () { return maxPos(this.anchor, this.head) };\n\t  Range.prototype.empty = function () { return this.head.line == this.anchor.line && this.head.ch == this.anchor.ch };\n\n\t  // Take an unsorted, potentially overlapping set of ranges, and\n\t  // build a selection out of it. 'Consumes' ranges array (modifying\n\t  // it).\n\t  function normalizeSelection(cm, ranges, primIndex) {\n\t    var mayTouch = cm && cm.options.selectionsMayTouch;\n\t    var prim = ranges[primIndex];\n\t    ranges.sort(function (a, b) { return cmp(a.from(), b.from()); });\n\t    primIndex = indexOf(ranges, prim);\n\t    for (var i = 1; i < ranges.length; i++) {\n\t      var cur = ranges[i], prev = ranges[i - 1];\n\t      var diff = cmp(prev.to(), cur.from());\n\t      if (mayTouch && !cur.empty() ? diff > 0 : diff >= 0) {\n\t        var from = minPos(prev.from(), cur.from()), to = maxPos(prev.to(), cur.to());\n\t        var inv = prev.empty() ? cur.from() == cur.head : prev.from() == prev.head;\n\t        if (i <= primIndex) { --primIndex; }\n\t        ranges.splice(--i, 2, new Range(inv ? to : from, inv ? from : to));\n\t      }\n\t    }\n\t    return new Selection(ranges, primIndex)\n\t  }\n\n\t  function simpleSelection(anchor, head) {\n\t    return new Selection([new Range(anchor, head || anchor)], 0)\n\t  }\n\n\t  // Compute the position of the end of a change (its 'to' property\n\t  // refers to the pre-change end).\n\t  function changeEnd(change) {\n\t    if (!change.text) { return change.to }\n\t    return Pos(change.from.line + change.text.length - 1,\n\t               lst(change.text).length + (change.text.length == 1 ? change.from.ch : 0))\n\t  }\n\n\t  // Adjust a position to refer to the post-change position of the\n\t  // same text, or the end of the change if the change covers it.\n\t  function adjustForChange(pos, change) {\n\t    if (cmp(pos, change.from) < 0) { return pos }\n\t    if (cmp(pos, change.to) <= 0) { return changeEnd(change) }\n\n\t    var line = pos.line + change.text.length - (change.to.line - change.from.line) - 1, ch = pos.ch;\n\t    if (pos.line == change.to.line) { ch += changeEnd(change).ch - change.to.ch; }\n\t    return Pos(line, ch)\n\t  }\n\n\t  function computeSelAfterChange(doc, change) {\n\t    var out = [];\n\t    for (var i = 0; i < doc.sel.ranges.length; i++) {\n\t      var range = doc.sel.ranges[i];\n\t      out.push(new Range(adjustForChange(range.anchor, change),\n\t                         adjustForChange(range.head, change)));\n\t    }\n\t    return normalizeSelection(doc.cm, out, doc.sel.primIndex)\n\t  }\n\n\t  function offsetPos(pos, old, nw) {\n\t    if (pos.line == old.line)\n\t      { return Pos(nw.line, pos.ch - old.ch + nw.ch) }\n\t    else\n\t      { return Pos(nw.line + (pos.line - old.line), pos.ch) }\n\t  }\n\n\t  // Used by replaceSelections to allow moving the selection to the\n\t  // start or around the replaced test. Hint may be \"start\" or \"around\".\n\t  function computeReplacedSel(doc, changes, hint) {\n\t    var out = [];\n\t    var oldPrev = Pos(doc.first, 0), newPrev = oldPrev;\n\t    for (var i = 0; i < changes.length; i++) {\n\t      var change = changes[i];\n\t      var from = offsetPos(change.from, oldPrev, newPrev);\n\t      var to = offsetPos(changeEnd(change), oldPrev, newPrev);\n\t      oldPrev = change.to;\n\t      newPrev = to;\n\t      if (hint == \"around\") {\n\t        var range = doc.sel.ranges[i], inv = cmp(range.head, range.anchor) < 0;\n\t        out[i] = new Range(inv ? to : from, inv ? from : to);\n\t      } else {\n\t        out[i] = new Range(from, from);\n\t      }\n\t    }\n\t    return new Selection(out, doc.sel.primIndex)\n\t  }\n\n\t  // Used to get the editor into a consistent state again when options change.\n\n\t  function loadMode(cm) {\n\t    cm.doc.mode = getMode(cm.options, cm.doc.modeOption);\n\t    resetModeState(cm);\n\t  }\n\n\t  function resetModeState(cm) {\n\t    cm.doc.iter(function (line) {\n\t      if (line.stateAfter) { line.stateAfter = null; }\n\t      if (line.styles) { line.styles = null; }\n\t    });\n\t    cm.doc.modeFrontier = cm.doc.highlightFrontier = cm.doc.first;\n\t    startWorker(cm, 100);\n\t    cm.state.modeGen++;\n\t    if (cm.curOp) { regChange(cm); }\n\t  }\n\n\t  // DOCUMENT DATA STRUCTURE\n\n\t  // By default, updates that start and end at the beginning of a line\n\t  // are treated specially, in order to make the association of line\n\t  // widgets and marker elements with the text behave more intuitive.\n\t  function isWholeLineUpdate(doc, change) {\n\t    return change.from.ch == 0 && change.to.ch == 0 && lst(change.text) == \"\" &&\n\t      (!doc.cm || doc.cm.options.wholeLineUpdateBefore)\n\t  }\n\n\t  // Perform a change on the document data structure.\n\t  function updateDoc(doc, change, markedSpans, estimateHeight) {\n\t    function spansFor(n) {return markedSpans ? markedSpans[n] : null}\n\t    function update(line, text, spans) {\n\t      updateLine(line, text, spans, estimateHeight);\n\t      signalLater(line, \"change\", line, change);\n\t    }\n\t    function linesFor(start, end) {\n\t      var result = [];\n\t      for (var i = start; i < end; ++i)\n\t        { result.push(new Line(text[i], spansFor(i), estimateHeight)); }\n\t      return result\n\t    }\n\n\t    var from = change.from, to = change.to, text = change.text;\n\t    var firstLine = getLine(doc, from.line), lastLine = getLine(doc, to.line);\n\t    var lastText = lst(text), lastSpans = spansFor(text.length - 1), nlines = to.line - from.line;\n\n\t    // Adjust the line structure\n\t    if (change.full) {\n\t      doc.insert(0, linesFor(0, text.length));\n\t      doc.remove(text.length, doc.size - text.length);\n\t    } else if (isWholeLineUpdate(doc, change)) {\n\t      // This is a whole-line replace. Treated specially to make\n\t      // sure line objects move the way they are supposed to.\n\t      var added = linesFor(0, text.length - 1);\n\t      update(lastLine, lastLine.text, lastSpans);\n\t      if (nlines) { doc.remove(from.line, nlines); }\n\t      if (added.length) { doc.insert(from.line, added); }\n\t    } else if (firstLine == lastLine) {\n\t      if (text.length == 1) {\n\t        update(firstLine, firstLine.text.slice(0, from.ch) + lastText + firstLine.text.slice(to.ch), lastSpans);\n\t      } else {\n\t        var added$1 = linesFor(1, text.length - 1);\n\t        added$1.push(new Line(lastText + firstLine.text.slice(to.ch), lastSpans, estimateHeight));\n\t        update(firstLine, firstLine.text.slice(0, from.ch) + text[0], spansFor(0));\n\t        doc.insert(from.line + 1, added$1);\n\t      }\n\t    } else if (text.length == 1) {\n\t      update(firstLine, firstLine.text.slice(0, from.ch) + text[0] + lastLine.text.slice(to.ch), spansFor(0));\n\t      doc.remove(from.line + 1, nlines);\n\t    } else {\n\t      update(firstLine, firstLine.text.slice(0, from.ch) + text[0], spansFor(0));\n\t      update(lastLine, lastText + lastLine.text.slice(to.ch), lastSpans);\n\t      var added$2 = linesFor(1, text.length - 1);\n\t      if (nlines > 1) { doc.remove(from.line + 1, nlines - 1); }\n\t      doc.insert(from.line + 1, added$2);\n\t    }\n\n\t    signalLater(doc, \"change\", doc, change);\n\t  }\n\n\t  // Call f for all linked documents.\n\t  function linkedDocs(doc, f, sharedHistOnly) {\n\t    function propagate(doc, skip, sharedHist) {\n\t      if (doc.linked) { for (var i = 0; i < doc.linked.length; ++i) {\n\t        var rel = doc.linked[i];\n\t        if (rel.doc == skip) { continue }\n\t        var shared = sharedHist && rel.sharedHist;\n\t        if (sharedHistOnly && !shared) { continue }\n\t        f(rel.doc, shared);\n\t        propagate(rel.doc, doc, shared);\n\t      } }\n\t    }\n\t    propagate(doc, null, true);\n\t  }\n\n\t  // Attach a document to an editor.\n\t  function attachDoc(cm, doc) {\n\t    if (doc.cm) { throw new Error(\"This document is already in use.\") }\n\t    cm.doc = doc;\n\t    doc.cm = cm;\n\t    estimateLineHeights(cm);\n\t    loadMode(cm);\n\t    setDirectionClass(cm);\n\t    if (!cm.options.lineWrapping) { findMaxLine(cm); }\n\t    cm.options.mode = doc.modeOption;\n\t    regChange(cm);\n\t  }\n\n\t  function setDirectionClass(cm) {\n\t  (cm.doc.direction == \"rtl\" ? addClass : rmClass)(cm.display.lineDiv, \"CodeMirror-rtl\");\n\t  }\n\n\t  function directionChanged(cm) {\n\t    runInOp(cm, function () {\n\t      setDirectionClass(cm);\n\t      regChange(cm);\n\t    });\n\t  }\n\n\t  function History(startGen) {\n\t    // Arrays of change events and selections. Doing something adds an\n\t    // event to done and clears undo. Undoing moves events from done\n\t    // to undone, redoing moves them in the other direction.\n\t    this.done = []; this.undone = [];\n\t    this.undoDepth = Infinity;\n\t    // Used to track when changes can be merged into a single undo\n\t    // event\n\t    this.lastModTime = this.lastSelTime = 0;\n\t    this.lastOp = this.lastSelOp = null;\n\t    this.lastOrigin = this.lastSelOrigin = null;\n\t    // Used by the isClean() method\n\t    this.generation = this.maxGeneration = startGen || 1;\n\t  }\n\n\t  // Create a history change event from an updateDoc-style change\n\t  // object.\n\t  function historyChangeFromChange(doc, change) {\n\t    var histChange = {from: copyPos(change.from), to: changeEnd(change), text: getBetween(doc, change.from, change.to)};\n\t    attachLocalSpans(doc, histChange, change.from.line, change.to.line + 1);\n\t    linkedDocs(doc, function (doc) { return attachLocalSpans(doc, histChange, change.from.line, change.to.line + 1); }, true);\n\t    return histChange\n\t  }\n\n\t  // Pop all selection events off the end of a history array. Stop at\n\t  // a change event.\n\t  function clearSelectionEvents(array) {\n\t    while (array.length) {\n\t      var last = lst(array);\n\t      if (last.ranges) { array.pop(); }\n\t      else { break }\n\t    }\n\t  }\n\n\t  // Find the top change event in the history. Pop off selection\n\t  // events that are in the way.\n\t  function lastChangeEvent(hist, force) {\n\t    if (force) {\n\t      clearSelectionEvents(hist.done);\n\t      return lst(hist.done)\n\t    } else if (hist.done.length && !lst(hist.done).ranges) {\n\t      return lst(hist.done)\n\t    } else if (hist.done.length > 1 && !hist.done[hist.done.length - 2].ranges) {\n\t      hist.done.pop();\n\t      return lst(hist.done)\n\t    }\n\t  }\n\n\t  // Register a change in the history. Merges changes that are within\n\t  // a single operation, or are close together with an origin that\n\t  // allows merging (starting with \"+\") into a single event.\n\t  function addChangeToHistory(doc, change, selAfter, opId) {\n\t    var hist = doc.history;\n\t    hist.undone.length = 0;\n\t    var time = +new Date, cur;\n\t    var last;\n\n\t    if ((hist.lastOp == opId ||\n\t         hist.lastOrigin == change.origin && change.origin &&\n\t         ((change.origin.charAt(0) == \"+\" && hist.lastModTime > time - (doc.cm ? doc.cm.options.historyEventDelay : 500)) ||\n\t          change.origin.charAt(0) == \"*\")) &&\n\t        (cur = lastChangeEvent(hist, hist.lastOp == opId))) {\n\t      // Merge this change into the last event\n\t      last = lst(cur.changes);\n\t      if (cmp(change.from, change.to) == 0 && cmp(change.from, last.to) == 0) {\n\t        // Optimized case for simple insertion -- don't want to add\n\t        // new changesets for every character typed\n\t        last.to = changeEnd(change);\n\t      } else {\n\t        // Add new sub-event\n\t        cur.changes.push(historyChangeFromChange(doc, change));\n\t      }\n\t    } else {\n\t      // Can not be merged, start a new event.\n\t      var before = lst(hist.done);\n\t      if (!before || !before.ranges)\n\t        { pushSelectionToHistory(doc.sel, hist.done); }\n\t      cur = {changes: [historyChangeFromChange(doc, change)],\n\t             generation: hist.generation};\n\t      hist.done.push(cur);\n\t      while (hist.done.length > hist.undoDepth) {\n\t        hist.done.shift();\n\t        if (!hist.done[0].ranges) { hist.done.shift(); }\n\t      }\n\t    }\n\t    hist.done.push(selAfter);\n\t    hist.generation = ++hist.maxGeneration;\n\t    hist.lastModTime = hist.lastSelTime = time;\n\t    hist.lastOp = hist.lastSelOp = opId;\n\t    hist.lastOrigin = hist.lastSelOrigin = change.origin;\n\n\t    if (!last) { signal(doc, \"historyAdded\"); }\n\t  }\n\n\t  function selectionEventCanBeMerged(doc, origin, prev, sel) {\n\t    var ch = origin.charAt(0);\n\t    return ch == \"*\" ||\n\t      ch == \"+\" &&\n\t      prev.ranges.length == sel.ranges.length &&\n\t      prev.somethingSelected() == sel.somethingSelected() &&\n\t      new Date - doc.history.lastSelTime <= (doc.cm ? doc.cm.options.historyEventDelay : 500)\n\t  }\n\n\t  // Called whenever the selection changes, sets the new selection as\n\t  // the pending selection in the history, and pushes the old pending\n\t  // selection into the 'done' array when it was significantly\n\t  // different (in number of selected ranges, emptiness, or time).\n\t  function addSelectionToHistory(doc, sel, opId, options) {\n\t    var hist = doc.history, origin = options && options.origin;\n\n\t    // A new event is started when the previous origin does not match\n\t    // the current, or the origins don't allow matching. Origins\n\t    // starting with * are always merged, those starting with + are\n\t    // merged when similar and close together in time.\n\t    if (opId == hist.lastSelOp ||\n\t        (origin && hist.lastSelOrigin == origin &&\n\t         (hist.lastModTime == hist.lastSelTime && hist.lastOrigin == origin ||\n\t          selectionEventCanBeMerged(doc, origin, lst(hist.done), sel))))\n\t      { hist.done[hist.done.length - 1] = sel; }\n\t    else\n\t      { pushSelectionToHistory(sel, hist.done); }\n\n\t    hist.lastSelTime = +new Date;\n\t    hist.lastSelOrigin = origin;\n\t    hist.lastSelOp = opId;\n\t    if (options && options.clearRedo !== false)\n\t      { clearSelectionEvents(hist.undone); }\n\t  }\n\n\t  function pushSelectionToHistory(sel, dest) {\n\t    var top = lst(dest);\n\t    if (!(top && top.ranges && top.equals(sel)))\n\t      { dest.push(sel); }\n\t  }\n\n\t  // Used to store marked span information in the history.\n\t  function attachLocalSpans(doc, change, from, to) {\n\t    var existing = change[\"spans_\" + doc.id], n = 0;\n\t    doc.iter(Math.max(doc.first, from), Math.min(doc.first + doc.size, to), function (line) {\n\t      if (line.markedSpans)\n\t        { (existing || (existing = change[\"spans_\" + doc.id] = {}))[n] = line.markedSpans; }\n\t      ++n;\n\t    });\n\t  }\n\n\t  // When un/re-doing restores text containing marked spans, those\n\t  // that have been explicitly cleared should not be restored.\n\t  function removeClearedSpans(spans) {\n\t    if (!spans) { return null }\n\t    var out;\n\t    for (var i = 0; i < spans.length; ++i) {\n\t      if (spans[i].marker.explicitlyCleared) { if (!out) { out = spans.slice(0, i); } }\n\t      else if (out) { out.push(spans[i]); }\n\t    }\n\t    return !out ? spans : out.length ? out : null\n\t  }\n\n\t  // Retrieve and filter the old marked spans stored in a change event.\n\t  function getOldSpans(doc, change) {\n\t    var found = change[\"spans_\" + doc.id];\n\t    if (!found) { return null }\n\t    var nw = [];\n\t    for (var i = 0; i < change.text.length; ++i)\n\t      { nw.push(removeClearedSpans(found[i])); }\n\t    return nw\n\t  }\n\n\t  // Used for un/re-doing changes from the history. Combines the\n\t  // result of computing the existing spans with the set of spans that\n\t  // existed in the history (so that deleting around a span and then\n\t  // undoing brings back the span).\n\t  function mergeOldSpans(doc, change) {\n\t    var old = getOldSpans(doc, change);\n\t    var stretched = stretchSpansOverChange(doc, change);\n\t    if (!old) { return stretched }\n\t    if (!stretched) { return old }\n\n\t    for (var i = 0; i < old.length; ++i) {\n\t      var oldCur = old[i], stretchCur = stretched[i];\n\t      if (oldCur && stretchCur) {\n\t        spans: for (var j = 0; j < stretchCur.length; ++j) {\n\t          var span = stretchCur[j];\n\t          for (var k = 0; k < oldCur.length; ++k)\n\t            { if (oldCur[k].marker == span.marker) { continue spans } }\n\t          oldCur.push(span);\n\t        }\n\t      } else if (stretchCur) {\n\t        old[i] = stretchCur;\n\t      }\n\t    }\n\t    return old\n\t  }\n\n\t  // Used both to provide a JSON-safe object in .getHistory, and, when\n\t  // detaching a document, to split the history in two\n\t  function copyHistoryArray(events, newGroup, instantiateSel) {\n\t    var copy = [];\n\t    for (var i = 0; i < events.length; ++i) {\n\t      var event = events[i];\n\t      if (event.ranges) {\n\t        copy.push(instantiateSel ? Selection.prototype.deepCopy.call(event) : event);\n\t        continue\n\t      }\n\t      var changes = event.changes, newChanges = [];\n\t      copy.push({changes: newChanges});\n\t      for (var j = 0; j < changes.length; ++j) {\n\t        var change = changes[j], m = (void 0);\n\t        newChanges.push({from: change.from, to: change.to, text: change.text});\n\t        if (newGroup) { for (var prop in change) { if (m = prop.match(/^spans_(\\d+)$/)) {\n\t          if (indexOf(newGroup, Number(m[1])) > -1) {\n\t            lst(newChanges)[prop] = change[prop];\n\t            delete change[prop];\n\t          }\n\t        } } }\n\t      }\n\t    }\n\t    return copy\n\t  }\n\n\t  // The 'scroll' parameter given to many of these indicated whether\n\t  // the new cursor position should be scrolled into view after\n\t  // modifying the selection.\n\n\t  // If shift is held or the extend flag is set, extends a range to\n\t  // include a given position (and optionally a second position).\n\t  // Otherwise, simply returns the range between the given positions.\n\t  // Used for cursor motion and such.\n\t  function extendRange(range, head, other, extend) {\n\t    if (extend) {\n\t      var anchor = range.anchor;\n\t      if (other) {\n\t        var posBefore = cmp(head, anchor) < 0;\n\t        if (posBefore != (cmp(other, anchor) < 0)) {\n\t          anchor = head;\n\t          head = other;\n\t        } else if (posBefore != (cmp(head, other) < 0)) {\n\t          head = other;\n\t        }\n\t      }\n\t      return new Range(anchor, head)\n\t    } else {\n\t      return new Range(other || head, head)\n\t    }\n\t  }\n\n\t  // Extend the primary selection range, discard the rest.\n\t  function extendSelection(doc, head, other, options, extend) {\n\t    if (extend == null) { extend = doc.cm && (doc.cm.display.shift || doc.extend); }\n\t    setSelection(doc, new Selection([extendRange(doc.sel.primary(), head, other, extend)], 0), options);\n\t  }\n\n\t  // Extend all selections (pos is an array of selections with length\n\t  // equal the number of selections)\n\t  function extendSelections(doc, heads, options) {\n\t    var out = [];\n\t    var extend = doc.cm && (doc.cm.display.shift || doc.extend);\n\t    for (var i = 0; i < doc.sel.ranges.length; i++)\n\t      { out[i] = extendRange(doc.sel.ranges[i], heads[i], null, extend); }\n\t    var newSel = normalizeSelection(doc.cm, out, doc.sel.primIndex);\n\t    setSelection(doc, newSel, options);\n\t  }\n\n\t  // Updates a single range in the selection.\n\t  function replaceOneSelection(doc, i, range, options) {\n\t    var ranges = doc.sel.ranges.slice(0);\n\t    ranges[i] = range;\n\t    setSelection(doc, normalizeSelection(doc.cm, ranges, doc.sel.primIndex), options);\n\t  }\n\n\t  // Reset the selection to a single range.\n\t  function setSimpleSelection(doc, anchor, head, options) {\n\t    setSelection(doc, simpleSelection(anchor, head), options);\n\t  }\n\n\t  // Give beforeSelectionChange handlers a change to influence a\n\t  // selection update.\n\t  function filterSelectionChange(doc, sel, options) {\n\t    var obj = {\n\t      ranges: sel.ranges,\n\t      update: function(ranges) {\n\t        this.ranges = [];\n\t        for (var i = 0; i < ranges.length; i++)\n\t          { this.ranges[i] = new Range(clipPos(doc, ranges[i].anchor),\n\t                                     clipPos(doc, ranges[i].head)); }\n\t      },\n\t      origin: options && options.origin\n\t    };\n\t    signal(doc, \"beforeSelectionChange\", doc, obj);\n\t    if (doc.cm) { signal(doc.cm, \"beforeSelectionChange\", doc.cm, obj); }\n\t    if (obj.ranges != sel.ranges) { return normalizeSelection(doc.cm, obj.ranges, obj.ranges.length - 1) }\n\t    else { return sel }\n\t  }\n\n\t  function setSelectionReplaceHistory(doc, sel, options) {\n\t    var done = doc.history.done, last = lst(done);\n\t    if (last && last.ranges) {\n\t      done[done.length - 1] = sel;\n\t      setSelectionNoUndo(doc, sel, options);\n\t    } else {\n\t      setSelection(doc, sel, options);\n\t    }\n\t  }\n\n\t  // Set a new selection.\n\t  function setSelection(doc, sel, options) {\n\t    setSelectionNoUndo(doc, sel, options);\n\t    addSelectionToHistory(doc, doc.sel, doc.cm ? doc.cm.curOp.id : NaN, options);\n\t  }\n\n\t  function setSelectionNoUndo(doc, sel, options) {\n\t    if (hasHandler(doc, \"beforeSelectionChange\") || doc.cm && hasHandler(doc.cm, \"beforeSelectionChange\"))\n\t      { sel = filterSelectionChange(doc, sel, options); }\n\n\t    var bias = options && options.bias ||\n\t      (cmp(sel.primary().head, doc.sel.primary().head) < 0 ? -1 : 1);\n\t    setSelectionInner(doc, skipAtomicInSelection(doc, sel, bias, true));\n\n\t    if (!(options && options.scroll === false) && doc.cm)\n\t      { ensureCursorVisible(doc.cm); }\n\t  }\n\n\t  function setSelectionInner(doc, sel) {\n\t    if (sel.equals(doc.sel)) { return }\n\n\t    doc.sel = sel;\n\n\t    if (doc.cm) {\n\t      doc.cm.curOp.updateInput = 1;\n\t      doc.cm.curOp.selectionChanged = true;\n\t      signalCursorActivity(doc.cm);\n\t    }\n\t    signalLater(doc, \"cursorActivity\", doc);\n\t  }\n\n\t  // Verify that the selection does not partially select any atomic\n\t  // marked ranges.\n\t  function reCheckSelection(doc) {\n\t    setSelectionInner(doc, skipAtomicInSelection(doc, doc.sel, null, false));\n\t  }\n\n\t  // Return a selection that does not partially select any atomic\n\t  // ranges.\n\t  function skipAtomicInSelection(doc, sel, bias, mayClear) {\n\t    var out;\n\t    for (var i = 0; i < sel.ranges.length; i++) {\n\t      var range = sel.ranges[i];\n\t      var old = sel.ranges.length == doc.sel.ranges.length && doc.sel.ranges[i];\n\t      var newAnchor = skipAtomic(doc, range.anchor, old && old.anchor, bias, mayClear);\n\t      var newHead = skipAtomic(doc, range.head, old && old.head, bias, mayClear);\n\t      if (out || newAnchor != range.anchor || newHead != range.head) {\n\t        if (!out) { out = sel.ranges.slice(0, i); }\n\t        out[i] = new Range(newAnchor, newHead);\n\t      }\n\t    }\n\t    return out ? normalizeSelection(doc.cm, out, sel.primIndex) : sel\n\t  }\n\n\t  function skipAtomicInner(doc, pos, oldPos, dir, mayClear) {\n\t    var line = getLine(doc, pos.line);\n\t    if (line.markedSpans) { for (var i = 0; i < line.markedSpans.length; ++i) {\n\t      var sp = line.markedSpans[i], m = sp.marker;\n\n\t      // Determine if we should prevent the cursor being placed to the left/right of an atomic marker\n\t      // Historically this was determined using the inclusiveLeft/Right option, but the new way to control it\n\t      // is with selectLeft/Right\n\t      var preventCursorLeft = (\"selectLeft\" in m) ? !m.selectLeft : m.inclusiveLeft;\n\t      var preventCursorRight = (\"selectRight\" in m) ? !m.selectRight : m.inclusiveRight;\n\n\t      if ((sp.from == null || (preventCursorLeft ? sp.from <= pos.ch : sp.from < pos.ch)) &&\n\t          (sp.to == null || (preventCursorRight ? sp.to >= pos.ch : sp.to > pos.ch))) {\n\t        if (mayClear) {\n\t          signal(m, \"beforeCursorEnter\");\n\t          if (m.explicitlyCleared) {\n\t            if (!line.markedSpans) { break }\n\t            else {--i; continue}\n\t          }\n\t        }\n\t        if (!m.atomic) { continue }\n\n\t        if (oldPos) {\n\t          var near = m.find(dir < 0 ? 1 : -1), diff = (void 0);\n\t          if (dir < 0 ? preventCursorRight : preventCursorLeft)\n\t            { near = movePos(doc, near, -dir, near && near.line == pos.line ? line : null); }\n\t          if (near && near.line == pos.line && (diff = cmp(near, oldPos)) && (dir < 0 ? diff < 0 : diff > 0))\n\t            { return skipAtomicInner(doc, near, pos, dir, mayClear) }\n\t        }\n\n\t        var far = m.find(dir < 0 ? -1 : 1);\n\t        if (dir < 0 ? preventCursorLeft : preventCursorRight)\n\t          { far = movePos(doc, far, dir, far.line == pos.line ? line : null); }\n\t        return far ? skipAtomicInner(doc, far, pos, dir, mayClear) : null\n\t      }\n\t    } }\n\t    return pos\n\t  }\n\n\t  // Ensure a given position is not inside an atomic range.\n\t  function skipAtomic(doc, pos, oldPos, bias, mayClear) {\n\t    var dir = bias || 1;\n\t    var found = skipAtomicInner(doc, pos, oldPos, dir, mayClear) ||\n\t        (!mayClear && skipAtomicInner(doc, pos, oldPos, dir, true)) ||\n\t        skipAtomicInner(doc, pos, oldPos, -dir, mayClear) ||\n\t        (!mayClear && skipAtomicInner(doc, pos, oldPos, -dir, true));\n\t    if (!found) {\n\t      doc.cantEdit = true;\n\t      return Pos(doc.first, 0)\n\t    }\n\t    return found\n\t  }\n\n\t  function movePos(doc, pos, dir, line) {\n\t    if (dir < 0 && pos.ch == 0) {\n\t      if (pos.line > doc.first) { return clipPos(doc, Pos(pos.line - 1)) }\n\t      else { return null }\n\t    } else if (dir > 0 && pos.ch == (line || getLine(doc, pos.line)).text.length) {\n\t      if (pos.line < doc.first + doc.size - 1) { return Pos(pos.line + 1, 0) }\n\t      else { return null }\n\t    } else {\n\t      return new Pos(pos.line, pos.ch + dir)\n\t    }\n\t  }\n\n\t  function selectAll(cm) {\n\t    cm.setSelection(Pos(cm.firstLine(), 0), Pos(cm.lastLine()), sel_dontScroll);\n\t  }\n\n\t  // UPDATING\n\n\t  // Allow \"beforeChange\" event handlers to influence a change\n\t  function filterChange(doc, change, update) {\n\t    var obj = {\n\t      canceled: false,\n\t      from: change.from,\n\t      to: change.to,\n\t      text: change.text,\n\t      origin: change.origin,\n\t      cancel: function () { return obj.canceled = true; }\n\t    };\n\t    if (update) { obj.update = function (from, to, text, origin) {\n\t      if (from) { obj.from = clipPos(doc, from); }\n\t      if (to) { obj.to = clipPos(doc, to); }\n\t      if (text) { obj.text = text; }\n\t      if (origin !== undefined) { obj.origin = origin; }\n\t    }; }\n\t    signal(doc, \"beforeChange\", doc, obj);\n\t    if (doc.cm) { signal(doc.cm, \"beforeChange\", doc.cm, obj); }\n\n\t    if (obj.canceled) {\n\t      if (doc.cm) { doc.cm.curOp.updateInput = 2; }\n\t      return null\n\t    }\n\t    return {from: obj.from, to: obj.to, text: obj.text, origin: obj.origin}\n\t  }\n\n\t  // Apply a change to a document, and add it to the document's\n\t  // history, and propagating it to all linked documents.\n\t  function makeChange(doc, change, ignoreReadOnly) {\n\t    if (doc.cm) {\n\t      if (!doc.cm.curOp) { return operation(doc.cm, makeChange)(doc, change, ignoreReadOnly) }\n\t      if (doc.cm.state.suppressEdits) { return }\n\t    }\n\n\t    if (hasHandler(doc, \"beforeChange\") || doc.cm && hasHandler(doc.cm, \"beforeChange\")) {\n\t      change = filterChange(doc, change, true);\n\t      if (!change) { return }\n\t    }\n\n\t    // Possibly split or suppress the update based on the presence\n\t    // of read-only spans in its range.\n\t    var split = sawReadOnlySpans && !ignoreReadOnly && removeReadOnlyRanges(doc, change.from, change.to);\n\t    if (split) {\n\t      for (var i = split.length - 1; i >= 0; --i)\n\t        { makeChangeInner(doc, {from: split[i].from, to: split[i].to, text: i ? [\"\"] : change.text, origin: change.origin}); }\n\t    } else {\n\t      makeChangeInner(doc, change);\n\t    }\n\t  }\n\n\t  function makeChangeInner(doc, change) {\n\t    if (change.text.length == 1 && change.text[0] == \"\" && cmp(change.from, change.to) == 0) { return }\n\t    var selAfter = computeSelAfterChange(doc, change);\n\t    addChangeToHistory(doc, change, selAfter, doc.cm ? doc.cm.curOp.id : NaN);\n\n\t    makeChangeSingleDoc(doc, change, selAfter, stretchSpansOverChange(doc, change));\n\t    var rebased = [];\n\n\t    linkedDocs(doc, function (doc, sharedHist) {\n\t      if (!sharedHist && indexOf(rebased, doc.history) == -1) {\n\t        rebaseHist(doc.history, change);\n\t        rebased.push(doc.history);\n\t      }\n\t      makeChangeSingleDoc(doc, change, null, stretchSpansOverChange(doc, change));\n\t    });\n\t  }\n\n\t  // Revert a change stored in a document's history.\n\t  function makeChangeFromHistory(doc, type, allowSelectionOnly) {\n\t    var suppress = doc.cm && doc.cm.state.suppressEdits;\n\t    if (suppress && !allowSelectionOnly) { return }\n\n\t    var hist = doc.history, event, selAfter = doc.sel;\n\t    var source = type == \"undo\" ? hist.done : hist.undone, dest = type == \"undo\" ? hist.undone : hist.done;\n\n\t    // Verify that there is a useable event (so that ctrl-z won't\n\t    // needlessly clear selection events)\n\t    var i = 0;\n\t    for (; i < source.length; i++) {\n\t      event = source[i];\n\t      if (allowSelectionOnly ? event.ranges && !event.equals(doc.sel) : !event.ranges)\n\t        { break }\n\t    }\n\t    if (i == source.length) { return }\n\t    hist.lastOrigin = hist.lastSelOrigin = null;\n\n\t    for (;;) {\n\t      event = source.pop();\n\t      if (event.ranges) {\n\t        pushSelectionToHistory(event, dest);\n\t        if (allowSelectionOnly && !event.equals(doc.sel)) {\n\t          setSelection(doc, event, {clearRedo: false});\n\t          return\n\t        }\n\t        selAfter = event;\n\t      } else if (suppress) {\n\t        source.push(event);\n\t        return\n\t      } else { break }\n\t    }\n\n\t    // Build up a reverse change object to add to the opposite history\n\t    // stack (redo when undoing, and vice versa).\n\t    var antiChanges = [];\n\t    pushSelectionToHistory(selAfter, dest);\n\t    dest.push({changes: antiChanges, generation: hist.generation});\n\t    hist.generation = event.generation || ++hist.maxGeneration;\n\n\t    var filter = hasHandler(doc, \"beforeChange\") || doc.cm && hasHandler(doc.cm, \"beforeChange\");\n\n\t    var loop = function ( i ) {\n\t      var change = event.changes[i];\n\t      change.origin = type;\n\t      if (filter && !filterChange(doc, change, false)) {\n\t        source.length = 0;\n\t        return {}\n\t      }\n\n\t      antiChanges.push(historyChangeFromChange(doc, change));\n\n\t      var after = i ? computeSelAfterChange(doc, change) : lst(source);\n\t      makeChangeSingleDoc(doc, change, after, mergeOldSpans(doc, change));\n\t      if (!i && doc.cm) { doc.cm.scrollIntoView({from: change.from, to: changeEnd(change)}); }\n\t      var rebased = [];\n\n\t      // Propagate to the linked documents\n\t      linkedDocs(doc, function (doc, sharedHist) {\n\t        if (!sharedHist && indexOf(rebased, doc.history) == -1) {\n\t          rebaseHist(doc.history, change);\n\t          rebased.push(doc.history);\n\t        }\n\t        makeChangeSingleDoc(doc, change, null, mergeOldSpans(doc, change));\n\t      });\n\t    };\n\n\t    for (var i$1 = event.changes.length - 1; i$1 >= 0; --i$1) {\n\t      var returned = loop( i$1 );\n\n\t      if ( returned ) return returned.v;\n\t    }\n\t  }\n\n\t  // Sub-views need their line numbers shifted when text is added\n\t  // above or below them in the parent document.\n\t  function shiftDoc(doc, distance) {\n\t    if (distance == 0) { return }\n\t    doc.first += distance;\n\t    doc.sel = new Selection(map(doc.sel.ranges, function (range) { return new Range(\n\t      Pos(range.anchor.line + distance, range.anchor.ch),\n\t      Pos(range.head.line + distance, range.head.ch)\n\t    ); }), doc.sel.primIndex);\n\t    if (doc.cm) {\n\t      regChange(doc.cm, doc.first, doc.first - distance, distance);\n\t      for (var d = doc.cm.display, l = d.viewFrom; l < d.viewTo; l++)\n\t        { regLineChange(doc.cm, l, \"gutter\"); }\n\t    }\n\t  }\n\n\t  // More lower-level change function, handling only a single document\n\t  // (not linked ones).\n\t  function makeChangeSingleDoc(doc, change, selAfter, spans) {\n\t    if (doc.cm && !doc.cm.curOp)\n\t      { return operation(doc.cm, makeChangeSingleDoc)(doc, change, selAfter, spans) }\n\n\t    if (change.to.line < doc.first) {\n\t      shiftDoc(doc, change.text.length - 1 - (change.to.line - change.from.line));\n\t      return\n\t    }\n\t    if (change.from.line > doc.lastLine()) { return }\n\n\t    // Clip the change to the size of this doc\n\t    if (change.from.line < doc.first) {\n\t      var shift = change.text.length - 1 - (doc.first - change.from.line);\n\t      shiftDoc(doc, shift);\n\t      change = {from: Pos(doc.first, 0), to: Pos(change.to.line + shift, change.to.ch),\n\t                text: [lst(change.text)], origin: change.origin};\n\t    }\n\t    var last = doc.lastLine();\n\t    if (change.to.line > last) {\n\t      change = {from: change.from, to: Pos(last, getLine(doc, last).text.length),\n\t                text: [change.text[0]], origin: change.origin};\n\t    }\n\n\t    change.removed = getBetween(doc, change.from, change.to);\n\n\t    if (!selAfter) { selAfter = computeSelAfterChange(doc, change); }\n\t    if (doc.cm) { makeChangeSingleDocInEditor(doc.cm, change, spans); }\n\t    else { updateDoc(doc, change, spans); }\n\t    setSelectionNoUndo(doc, selAfter, sel_dontScroll);\n\n\t    if (doc.cantEdit && skipAtomic(doc, Pos(doc.firstLine(), 0)))\n\t      { doc.cantEdit = false; }\n\t  }\n\n\t  // Handle the interaction of a change to a document with the editor\n\t  // that this document is part of.\n\t  function makeChangeSingleDocInEditor(cm, change, spans) {\n\t    var doc = cm.doc, display = cm.display, from = change.from, to = change.to;\n\n\t    var recomputeMaxLength = false, checkWidthStart = from.line;\n\t    if (!cm.options.lineWrapping) {\n\t      checkWidthStart = lineNo(visualLine(getLine(doc, from.line)));\n\t      doc.iter(checkWidthStart, to.line + 1, function (line) {\n\t        if (line == display.maxLine) {\n\t          recomputeMaxLength = true;\n\t          return true\n\t        }\n\t      });\n\t    }\n\n\t    if (doc.sel.contains(change.from, change.to) > -1)\n\t      { signalCursorActivity(cm); }\n\n\t    updateDoc(doc, change, spans, estimateHeight(cm));\n\n\t    if (!cm.options.lineWrapping) {\n\t      doc.iter(checkWidthStart, from.line + change.text.length, function (line) {\n\t        var len = lineLength(line);\n\t        if (len > display.maxLineLength) {\n\t          display.maxLine = line;\n\t          display.maxLineLength = len;\n\t          display.maxLineChanged = true;\n\t          recomputeMaxLength = false;\n\t        }\n\t      });\n\t      if (recomputeMaxLength) { cm.curOp.updateMaxLine = true; }\n\t    }\n\n\t    retreatFrontier(doc, from.line);\n\t    startWorker(cm, 400);\n\n\t    var lendiff = change.text.length - (to.line - from.line) - 1;\n\t    // Remember that these lines changed, for updating the display\n\t    if (change.full)\n\t      { regChange(cm); }\n\t    else if (from.line == to.line && change.text.length == 1 && !isWholeLineUpdate(cm.doc, change))\n\t      { regLineChange(cm, from.line, \"text\"); }\n\t    else\n\t      { regChange(cm, from.line, to.line + 1, lendiff); }\n\n\t    var changesHandler = hasHandler(cm, \"changes\"), changeHandler = hasHandler(cm, \"change\");\n\t    if (changeHandler || changesHandler) {\n\t      var obj = {\n\t        from: from, to: to,\n\t        text: change.text,\n\t        removed: change.removed,\n\t        origin: change.origin\n\t      };\n\t      if (changeHandler) { signalLater(cm, \"change\", cm, obj); }\n\t      if (changesHandler) { (cm.curOp.changeObjs || (cm.curOp.changeObjs = [])).push(obj); }\n\t    }\n\t    cm.display.selForContextMenu = null;\n\t  }\n\n\t  function replaceRange(doc, code, from, to, origin) {\n\t    var assign;\n\n\t    if (!to) { to = from; }\n\t    if (cmp(to, from) < 0) { (assign = [to, from], from = assign[0], to = assign[1]); }\n\t    if (typeof code == \"string\") { code = doc.splitLines(code); }\n\t    makeChange(doc, {from: from, to: to, text: code, origin: origin});\n\t  }\n\n\t  // Rebasing/resetting history to deal with externally-sourced changes\n\n\t  function rebaseHistSelSingle(pos, from, to, diff) {\n\t    if (to < pos.line) {\n\t      pos.line += diff;\n\t    } else if (from < pos.line) {\n\t      pos.line = from;\n\t      pos.ch = 0;\n\t    }\n\t  }\n\n\t  // Tries to rebase an array of history events given a change in the\n\t  // document. If the change touches the same lines as the event, the\n\t  // event, and everything 'behind' it, is discarded. If the change is\n\t  // before the event, the event's positions are updated. Uses a\n\t  // copy-on-write scheme for the positions, to avoid having to\n\t  // reallocate them all on every rebase, but also avoid problems with\n\t  // shared position objects being unsafely updated.\n\t  function rebaseHistArray(array, from, to, diff) {\n\t    for (var i = 0; i < array.length; ++i) {\n\t      var sub = array[i], ok = true;\n\t      if (sub.ranges) {\n\t        if (!sub.copied) { sub = array[i] = sub.deepCopy(); sub.copied = true; }\n\t        for (var j = 0; j < sub.ranges.length; j++) {\n\t          rebaseHistSelSingle(sub.ranges[j].anchor, from, to, diff);\n\t          rebaseHistSelSingle(sub.ranges[j].head, from, to, diff);\n\t        }\n\t        continue\n\t      }\n\t      for (var j$1 = 0; j$1 < sub.changes.length; ++j$1) {\n\t        var cur = sub.changes[j$1];\n\t        if (to < cur.from.line) {\n\t          cur.from = Pos(cur.from.line + diff, cur.from.ch);\n\t          cur.to = Pos(cur.to.line + diff, cur.to.ch);\n\t        } else if (from <= cur.to.line) {\n\t          ok = false;\n\t          break\n\t        }\n\t      }\n\t      if (!ok) {\n\t        array.splice(0, i + 1);\n\t        i = 0;\n\t      }\n\t    }\n\t  }\n\n\t  function rebaseHist(hist, change) {\n\t    var from = change.from.line, to = change.to.line, diff = change.text.length - (to - from) - 1;\n\t    rebaseHistArray(hist.done, from, to, diff);\n\t    rebaseHistArray(hist.undone, from, to, diff);\n\t  }\n\n\t  // Utility for applying a change to a line by handle or number,\n\t  // returning the number and optionally registering the line as\n\t  // changed.\n\t  function changeLine(doc, handle, changeType, op) {\n\t    var no = handle, line = handle;\n\t    if (typeof handle == \"number\") { line = getLine(doc, clipLine(doc, handle)); }\n\t    else { no = lineNo(handle); }\n\t    if (no == null) { return null }\n\t    if (op(line, no) && doc.cm) { regLineChange(doc.cm, no, changeType); }\n\t    return line\n\t  }\n\n\t  // The document is represented as a BTree consisting of leaves, with\n\t  // chunk of lines in them, and branches, with up to ten leaves or\n\t  // other branch nodes below them. The top node is always a branch\n\t  // node, and is the document object itself (meaning it has\n\t  // additional methods and properties).\n\t  //\n\t  // All nodes have parent links. The tree is used both to go from\n\t  // line numbers to line objects, and to go from objects to numbers.\n\t  // It also indexes by height, and is used to convert between height\n\t  // and line object, and to find the total height of the document.\n\t  //\n\t  // See also http://marijnhaverbeke.nl/blog/codemirror-line-tree.html\n\n\t  function LeafChunk(lines) {\n\t    this.lines = lines;\n\t    this.parent = null;\n\t    var height = 0;\n\t    for (var i = 0; i < lines.length; ++i) {\n\t      lines[i].parent = this;\n\t      height += lines[i].height;\n\t    }\n\t    this.height = height;\n\t  }\n\n\t  LeafChunk.prototype = {\n\t    chunkSize: function() { return this.lines.length },\n\n\t    // Remove the n lines at offset 'at'.\n\t    removeInner: function(at, n) {\n\t      for (var i = at, e = at + n; i < e; ++i) {\n\t        var line = this.lines[i];\n\t        this.height -= line.height;\n\t        cleanUpLine(line);\n\t        signalLater(line, \"delete\");\n\t      }\n\t      this.lines.splice(at, n);\n\t    },\n\n\t    // Helper used to collapse a small branch into a single leaf.\n\t    collapse: function(lines) {\n\t      lines.push.apply(lines, this.lines);\n\t    },\n\n\t    // Insert the given array of lines at offset 'at', count them as\n\t    // having the given height.\n\t    insertInner: function(at, lines, height) {\n\t      this.height += height;\n\t      this.lines = this.lines.slice(0, at).concat(lines).concat(this.lines.slice(at));\n\t      for (var i = 0; i < lines.length; ++i) { lines[i].parent = this; }\n\t    },\n\n\t    // Used to iterate over a part of the tree.\n\t    iterN: function(at, n, op) {\n\t      for (var e = at + n; at < e; ++at)\n\t        { if (op(this.lines[at])) { return true } }\n\t    }\n\t  };\n\n\t  function BranchChunk(children) {\n\t    this.children = children;\n\t    var size = 0, height = 0;\n\t    for (var i = 0; i < children.length; ++i) {\n\t      var ch = children[i];\n\t      size += ch.chunkSize(); height += ch.height;\n\t      ch.parent = this;\n\t    }\n\t    this.size = size;\n\t    this.height = height;\n\t    this.parent = null;\n\t  }\n\n\t  BranchChunk.prototype = {\n\t    chunkSize: function() { return this.size },\n\n\t    removeInner: function(at, n) {\n\t      this.size -= n;\n\t      for (var i = 0; i < this.children.length; ++i) {\n\t        var child = this.children[i], sz = child.chunkSize();\n\t        if (at < sz) {\n\t          var rm = Math.min(n, sz - at), oldHeight = child.height;\n\t          child.removeInner(at, rm);\n\t          this.height -= oldHeight - child.height;\n\t          if (sz == rm) { this.children.splice(i--, 1); child.parent = null; }\n\t          if ((n -= rm) == 0) { break }\n\t          at = 0;\n\t        } else { at -= sz; }\n\t      }\n\t      // If the result is smaller than 25 lines, ensure that it is a\n\t      // single leaf node.\n\t      if (this.size - n < 25 &&\n\t          (this.children.length > 1 || !(this.children[0] instanceof LeafChunk))) {\n\t        var lines = [];\n\t        this.collapse(lines);\n\t        this.children = [new LeafChunk(lines)];\n\t        this.children[0].parent = this;\n\t      }\n\t    },\n\n\t    collapse: function(lines) {\n\t      for (var i = 0; i < this.children.length; ++i) { this.children[i].collapse(lines); }\n\t    },\n\n\t    insertInner: function(at, lines, height) {\n\t      this.size += lines.length;\n\t      this.height += height;\n\t      for (var i = 0; i < this.children.length; ++i) {\n\t        var child = this.children[i], sz = child.chunkSize();\n\t        if (at <= sz) {\n\t          child.insertInner(at, lines, height);\n\t          if (child.lines && child.lines.length > 50) {\n\t            // To avoid memory thrashing when child.lines is huge (e.g. first view of a large file), it's never spliced.\n\t            // Instead, small slices are taken. They're taken in order because sequential memory accesses are fastest.\n\t            var remaining = child.lines.length % 25 + 25;\n\t            for (var pos = remaining; pos < child.lines.length;) {\n\t              var leaf = new LeafChunk(child.lines.slice(pos, pos += 25));\n\t              child.height -= leaf.height;\n\t              this.children.splice(++i, 0, leaf);\n\t              leaf.parent = this;\n\t            }\n\t            child.lines = child.lines.slice(0, remaining);\n\t            this.maybeSpill();\n\t          }\n\t          break\n\t        }\n\t        at -= sz;\n\t      }\n\t    },\n\n\t    // When a node has grown, check whether it should be split.\n\t    maybeSpill: function() {\n\t      if (this.children.length <= 10) { return }\n\t      var me = this;\n\t      do {\n\t        var spilled = me.children.splice(me.children.length - 5, 5);\n\t        var sibling = new BranchChunk(spilled);\n\t        if (!me.parent) { // Become the parent node\n\t          var copy = new BranchChunk(me.children);\n\t          copy.parent = me;\n\t          me.children = [copy, sibling];\n\t          me = copy;\n\t       } else {\n\t          me.size -= sibling.size;\n\t          me.height -= sibling.height;\n\t          var myIndex = indexOf(me.parent.children, me);\n\t          me.parent.children.splice(myIndex + 1, 0, sibling);\n\t        }\n\t        sibling.parent = me.parent;\n\t      } while (me.children.length > 10)\n\t      me.parent.maybeSpill();\n\t    },\n\n\t    iterN: function(at, n, op) {\n\t      for (var i = 0; i < this.children.length; ++i) {\n\t        var child = this.children[i], sz = child.chunkSize();\n\t        if (at < sz) {\n\t          var used = Math.min(n, sz - at);\n\t          if (child.iterN(at, used, op)) { return true }\n\t          if ((n -= used) == 0) { break }\n\t          at = 0;\n\t        } else { at -= sz; }\n\t      }\n\t    }\n\t  };\n\n\t  // Line widgets are block elements displayed above or below a line.\n\n\t  var LineWidget = function(doc, node, options) {\n\t    if (options) { for (var opt in options) { if (options.hasOwnProperty(opt))\n\t      { this[opt] = options[opt]; } } }\n\t    this.doc = doc;\n\t    this.node = node;\n\t  };\n\n\t  LineWidget.prototype.clear = function () {\n\t    var cm = this.doc.cm, ws = this.line.widgets, line = this.line, no = lineNo(line);\n\t    if (no == null || !ws) { return }\n\t    for (var i = 0; i < ws.length; ++i) { if (ws[i] == this) { ws.splice(i--, 1); } }\n\t    if (!ws.length) { line.widgets = null; }\n\t    var height = widgetHeight(this);\n\t    updateLineHeight(line, Math.max(0, line.height - height));\n\t    if (cm) {\n\t      runInOp(cm, function () {\n\t        adjustScrollWhenAboveVisible(cm, line, -height);\n\t        regLineChange(cm, no, \"widget\");\n\t      });\n\t      signalLater(cm, \"lineWidgetCleared\", cm, this, no);\n\t    }\n\t  };\n\n\t  LineWidget.prototype.changed = function () {\n\t      var this$1 = this;\n\n\t    var oldH = this.height, cm = this.doc.cm, line = this.line;\n\t    this.height = null;\n\t    var diff = widgetHeight(this) - oldH;\n\t    if (!diff) { return }\n\t    if (!lineIsHidden(this.doc, line)) { updateLineHeight(line, line.height + diff); }\n\t    if (cm) {\n\t      runInOp(cm, function () {\n\t        cm.curOp.forceUpdate = true;\n\t        adjustScrollWhenAboveVisible(cm, line, diff);\n\t        signalLater(cm, \"lineWidgetChanged\", cm, this$1, lineNo(line));\n\t      });\n\t    }\n\t  };\n\t  eventMixin(LineWidget);\n\n\t  function adjustScrollWhenAboveVisible(cm, line, diff) {\n\t    if (heightAtLine(line) < ((cm.curOp && cm.curOp.scrollTop) || cm.doc.scrollTop))\n\t      { addToScrollTop(cm, diff); }\n\t  }\n\n\t  function addLineWidget(doc, handle, node, options) {\n\t    var widget = new LineWidget(doc, node, options);\n\t    var cm = doc.cm;\n\t    if (cm && widget.noHScroll) { cm.display.alignWidgets = true; }\n\t    changeLine(doc, handle, \"widget\", function (line) {\n\t      var widgets = line.widgets || (line.widgets = []);\n\t      if (widget.insertAt == null) { widgets.push(widget); }\n\t      else { widgets.splice(Math.min(widgets.length - 1, Math.max(0, widget.insertAt)), 0, widget); }\n\t      widget.line = line;\n\t      if (cm && !lineIsHidden(doc, line)) {\n\t        var aboveVisible = heightAtLine(line) < doc.scrollTop;\n\t        updateLineHeight(line, line.height + widgetHeight(widget));\n\t        if (aboveVisible) { addToScrollTop(cm, widget.height); }\n\t        cm.curOp.forceUpdate = true;\n\t      }\n\t      return true\n\t    });\n\t    if (cm) { signalLater(cm, \"lineWidgetAdded\", cm, widget, typeof handle == \"number\" ? handle : lineNo(handle)); }\n\t    return widget\n\t  }\n\n\t  // TEXTMARKERS\n\n\t  // Created with markText and setBookmark methods. A TextMarker is a\n\t  // handle that can be used to clear or find a marked position in the\n\t  // document. Line objects hold arrays (markedSpans) containing\n\t  // {from, to, marker} object pointing to such marker objects, and\n\t  // indicating that such a marker is present on that line. Multiple\n\t  // lines may point to the same marker when it spans across lines.\n\t  // The spans will have null for their from/to properties when the\n\t  // marker continues beyond the start/end of the line. Markers have\n\t  // links back to the lines they currently touch.\n\n\t  // Collapsed markers have unique ids, in order to be able to order\n\t  // them, which is needed for uniquely determining an outer marker\n\t  // when they overlap (they may nest, but not partially overlap).\n\t  var nextMarkerId = 0;\n\n\t  var TextMarker = function(doc, type) {\n\t    this.lines = [];\n\t    this.type = type;\n\t    this.doc = doc;\n\t    this.id = ++nextMarkerId;\n\t  };\n\n\t  // Clear the marker.\n\t  TextMarker.prototype.clear = function () {\n\t    if (this.explicitlyCleared) { return }\n\t    var cm = this.doc.cm, withOp = cm && !cm.curOp;\n\t    if (withOp) { startOperation(cm); }\n\t    if (hasHandler(this, \"clear\")) {\n\t      var found = this.find();\n\t      if (found) { signalLater(this, \"clear\", found.from, found.to); }\n\t    }\n\t    var min = null, max = null;\n\t    for (var i = 0; i < this.lines.length; ++i) {\n\t      var line = this.lines[i];\n\t      var span = getMarkedSpanFor(line.markedSpans, this);\n\t      if (cm && !this.collapsed) { regLineChange(cm, lineNo(line), \"text\"); }\n\t      else if (cm) {\n\t        if (span.to != null) { max = lineNo(line); }\n\t        if (span.from != null) { min = lineNo(line); }\n\t      }\n\t      line.markedSpans = removeMarkedSpan(line.markedSpans, span);\n\t      if (span.from == null && this.collapsed && !lineIsHidden(this.doc, line) && cm)\n\t        { updateLineHeight(line, textHeight(cm.display)); }\n\t    }\n\t    if (cm && this.collapsed && !cm.options.lineWrapping) { for (var i$1 = 0; i$1 < this.lines.length; ++i$1) {\n\t      var visual = visualLine(this.lines[i$1]), len = lineLength(visual);\n\t      if (len > cm.display.maxLineLength) {\n\t        cm.display.maxLine = visual;\n\t        cm.display.maxLineLength = len;\n\t        cm.display.maxLineChanged = true;\n\t      }\n\t    } }\n\n\t    if (min != null && cm && this.collapsed) { regChange(cm, min, max + 1); }\n\t    this.lines.length = 0;\n\t    this.explicitlyCleared = true;\n\t    if (this.atomic && this.doc.cantEdit) {\n\t      this.doc.cantEdit = false;\n\t      if (cm) { reCheckSelection(cm.doc); }\n\t    }\n\t    if (cm) { signalLater(cm, \"markerCleared\", cm, this, min, max); }\n\t    if (withOp) { endOperation(cm); }\n\t    if (this.parent) { this.parent.clear(); }\n\t  };\n\n\t  // Find the position of the marker in the document. Returns a {from,\n\t  // to} object by default. Side can be passed to get a specific side\n\t  // -- 0 (both), -1 (left), or 1 (right). When lineObj is true, the\n\t  // Pos objects returned contain a line object, rather than a line\n\t  // number (used to prevent looking up the same line twice).\n\t  TextMarker.prototype.find = function (side, lineObj) {\n\t    if (side == null && this.type == \"bookmark\") { side = 1; }\n\t    var from, to;\n\t    for (var i = 0; i < this.lines.length; ++i) {\n\t      var line = this.lines[i];\n\t      var span = getMarkedSpanFor(line.markedSpans, this);\n\t      if (span.from != null) {\n\t        from = Pos(lineObj ? line : lineNo(line), span.from);\n\t        if (side == -1) { return from }\n\t      }\n\t      if (span.to != null) {\n\t        to = Pos(lineObj ? line : lineNo(line), span.to);\n\t        if (side == 1) { return to }\n\t      }\n\t    }\n\t    return from && {from: from, to: to}\n\t  };\n\n\t  // Signals that the marker's widget changed, and surrounding layout\n\t  // should be recomputed.\n\t  TextMarker.prototype.changed = function () {\n\t      var this$1 = this;\n\n\t    var pos = this.find(-1, true), widget = this, cm = this.doc.cm;\n\t    if (!pos || !cm) { return }\n\t    runInOp(cm, function () {\n\t      var line = pos.line, lineN = lineNo(pos.line);\n\t      var view = findViewForLine(cm, lineN);\n\t      if (view) {\n\t        clearLineMeasurementCacheFor(view);\n\t        cm.curOp.selectionChanged = cm.curOp.forceUpdate = true;\n\t      }\n\t      cm.curOp.updateMaxLine = true;\n\t      if (!lineIsHidden(widget.doc, line) && widget.height != null) {\n\t        var oldHeight = widget.height;\n\t        widget.height = null;\n\t        var dHeight = widgetHeight(widget) - oldHeight;\n\t        if (dHeight)\n\t          { updateLineHeight(line, line.height + dHeight); }\n\t      }\n\t      signalLater(cm, \"markerChanged\", cm, this$1);\n\t    });\n\t  };\n\n\t  TextMarker.prototype.attachLine = function (line) {\n\t    if (!this.lines.length && this.doc.cm) {\n\t      var op = this.doc.cm.curOp;\n\t      if (!op.maybeHiddenMarkers || indexOf(op.maybeHiddenMarkers, this) == -1)\n\t        { (op.maybeUnhiddenMarkers || (op.maybeUnhiddenMarkers = [])).push(this); }\n\t    }\n\t    this.lines.push(line);\n\t  };\n\n\t  TextMarker.prototype.detachLine = function (line) {\n\t    this.lines.splice(indexOf(this.lines, line), 1);\n\t    if (!this.lines.length && this.doc.cm) {\n\t      var op = this.doc.cm.curOp\n\t      ;(op.maybeHiddenMarkers || (op.maybeHiddenMarkers = [])).push(this);\n\t    }\n\t  };\n\t  eventMixin(TextMarker);\n\n\t  // Create a marker, wire it up to the right lines, and\n\t  function markText(doc, from, to, options, type) {\n\t    // Shared markers (across linked documents) are handled separately\n\t    // (markTextShared will call out to this again, once per\n\t    // document).\n\t    if (options && options.shared) { return markTextShared(doc, from, to, options, type) }\n\t    // Ensure we are in an operation.\n\t    if (doc.cm && !doc.cm.curOp) { return operation(doc.cm, markText)(doc, from, to, options, type) }\n\n\t    var marker = new TextMarker(doc, type), diff = cmp(from, to);\n\t    if (options) { copyObj(options, marker, false); }\n\t    // Don't connect empty markers unless clearWhenEmpty is false\n\t    if (diff > 0 || diff == 0 && marker.clearWhenEmpty !== false)\n\t      { return marker }\n\t    if (marker.replacedWith) {\n\t      // Showing up as a widget implies collapsed (widget replaces text)\n\t      marker.collapsed = true;\n\t      marker.widgetNode = eltP(\"span\", [marker.replacedWith], \"CodeMirror-widget\");\n\t      if (!options.handleMouseEvents) { marker.widgetNode.setAttribute(\"cm-ignore-events\", \"true\"); }\n\t      if (options.insertLeft) { marker.widgetNode.insertLeft = true; }\n\t    }\n\t    if (marker.collapsed) {\n\t      if (conflictingCollapsedRange(doc, from.line, from, to, marker) ||\n\t          from.line != to.line && conflictingCollapsedRange(doc, to.line, from, to, marker))\n\t        { throw new Error(\"Inserting collapsed marker partially overlapping an existing one\") }\n\t      seeCollapsedSpans();\n\t    }\n\n\t    if (marker.addToHistory)\n\t      { addChangeToHistory(doc, {from: from, to: to, origin: \"markText\"}, doc.sel, NaN); }\n\n\t    var curLine = from.line, cm = doc.cm, updateMaxLine;\n\t    doc.iter(curLine, to.line + 1, function (line) {\n\t      if (cm && marker.collapsed && !cm.options.lineWrapping && visualLine(line) == cm.display.maxLine)\n\t        { updateMaxLine = true; }\n\t      if (marker.collapsed && curLine != from.line) { updateLineHeight(line, 0); }\n\t      addMarkedSpan(line, new MarkedSpan(marker,\n\t                                         curLine == from.line ? from.ch : null,\n\t                                         curLine == to.line ? to.ch : null));\n\t      ++curLine;\n\t    });\n\t    // lineIsHidden depends on the presence of the spans, so needs a second pass\n\t    if (marker.collapsed) { doc.iter(from.line, to.line + 1, function (line) {\n\t      if (lineIsHidden(doc, line)) { updateLineHeight(line, 0); }\n\t    }); }\n\n\t    if (marker.clearOnEnter) { on(marker, \"beforeCursorEnter\", function () { return marker.clear(); }); }\n\n\t    if (marker.readOnly) {\n\t      seeReadOnlySpans();\n\t      if (doc.history.done.length || doc.history.undone.length)\n\t        { doc.clearHistory(); }\n\t    }\n\t    if (marker.collapsed) {\n\t      marker.id = ++nextMarkerId;\n\t      marker.atomic = true;\n\t    }\n\t    if (cm) {\n\t      // Sync editor state\n\t      if (updateMaxLine) { cm.curOp.updateMaxLine = true; }\n\t      if (marker.collapsed)\n\t        { regChange(cm, from.line, to.line + 1); }\n\t      else if (marker.className || marker.startStyle || marker.endStyle || marker.css ||\n\t               marker.attributes || marker.title)\n\t        { for (var i = from.line; i <= to.line; i++) { regLineChange(cm, i, \"text\"); } }\n\t      if (marker.atomic) { reCheckSelection(cm.doc); }\n\t      signalLater(cm, \"markerAdded\", cm, marker);\n\t    }\n\t    return marker\n\t  }\n\n\t  // SHARED TEXTMARKERS\n\n\t  // A shared marker spans multiple linked documents. It is\n\t  // implemented as a meta-marker-object controlling multiple normal\n\t  // markers.\n\t  var SharedTextMarker = function(markers, primary) {\n\t    this.markers = markers;\n\t    this.primary = primary;\n\t    for (var i = 0; i < markers.length; ++i)\n\t      { markers[i].parent = this; }\n\t  };\n\n\t  SharedTextMarker.prototype.clear = function () {\n\t    if (this.explicitlyCleared) { return }\n\t    this.explicitlyCleared = true;\n\t    for (var i = 0; i < this.markers.length; ++i)\n\t      { this.markers[i].clear(); }\n\t    signalLater(this, \"clear\");\n\t  };\n\n\t  SharedTextMarker.prototype.find = function (side, lineObj) {\n\t    return this.primary.find(side, lineObj)\n\t  };\n\t  eventMixin(SharedTextMarker);\n\n\t  function markTextShared(doc, from, to, options, type) {\n\t    options = copyObj(options);\n\t    options.shared = false;\n\t    var markers = [markText(doc, from, to, options, type)], primary = markers[0];\n\t    var widget = options.widgetNode;\n\t    linkedDocs(doc, function (doc) {\n\t      if (widget) { options.widgetNode = widget.cloneNode(true); }\n\t      markers.push(markText(doc, clipPos(doc, from), clipPos(doc, to), options, type));\n\t      for (var i = 0; i < doc.linked.length; ++i)\n\t        { if (doc.linked[i].isParent) { return } }\n\t      primary = lst(markers);\n\t    });\n\t    return new SharedTextMarker(markers, primary)\n\t  }\n\n\t  function findSharedMarkers(doc) {\n\t    return doc.findMarks(Pos(doc.first, 0), doc.clipPos(Pos(doc.lastLine())), function (m) { return m.parent; })\n\t  }\n\n\t  function copySharedMarkers(doc, markers) {\n\t    for (var i = 0; i < markers.length; i++) {\n\t      var marker = markers[i], pos = marker.find();\n\t      var mFrom = doc.clipPos(pos.from), mTo = doc.clipPos(pos.to);\n\t      if (cmp(mFrom, mTo)) {\n\t        var subMark = markText(doc, mFrom, mTo, marker.primary, marker.primary.type);\n\t        marker.markers.push(subMark);\n\t        subMark.parent = marker;\n\t      }\n\t    }\n\t  }\n\n\t  function detachSharedMarkers(markers) {\n\t    var loop = function ( i ) {\n\t      var marker = markers[i], linked = [marker.primary.doc];\n\t      linkedDocs(marker.primary.doc, function (d) { return linked.push(d); });\n\t      for (var j = 0; j < marker.markers.length; j++) {\n\t        var subMarker = marker.markers[j];\n\t        if (indexOf(linked, subMarker.doc) == -1) {\n\t          subMarker.parent = null;\n\t          marker.markers.splice(j--, 1);\n\t        }\n\t      }\n\t    };\n\n\t    for (var i = 0; i < markers.length; i++) loop( i );\n\t  }\n\n\t  var nextDocId = 0;\n\t  var Doc = function(text, mode, firstLine, lineSep, direction) {\n\t    if (!(this instanceof Doc)) { return new Doc(text, mode, firstLine, lineSep, direction) }\n\t    if (firstLine == null) { firstLine = 0; }\n\n\t    BranchChunk.call(this, [new LeafChunk([new Line(\"\", null)])]);\n\t    this.first = firstLine;\n\t    this.scrollTop = this.scrollLeft = 0;\n\t    this.cantEdit = false;\n\t    this.cleanGeneration = 1;\n\t    this.modeFrontier = this.highlightFrontier = firstLine;\n\t    var start = Pos(firstLine, 0);\n\t    this.sel = simpleSelection(start);\n\t    this.history = new History(null);\n\t    this.id = ++nextDocId;\n\t    this.modeOption = mode;\n\t    this.lineSep = lineSep;\n\t    this.direction = (direction == \"rtl\") ? \"rtl\" : \"ltr\";\n\t    this.extend = false;\n\n\t    if (typeof text == \"string\") { text = this.splitLines(text); }\n\t    updateDoc(this, {from: start, to: start, text: text});\n\t    setSelection(this, simpleSelection(start), sel_dontScroll);\n\t  };\n\n\t  Doc.prototype = createObj(BranchChunk.prototype, {\n\t    constructor: Doc,\n\t    // Iterate over the document. Supports two forms -- with only one\n\t    // argument, it calls that for each line in the document. With\n\t    // three, it iterates over the range given by the first two (with\n\t    // the second being non-inclusive).\n\t    iter: function(from, to, op) {\n\t      if (op) { this.iterN(from - this.first, to - from, op); }\n\t      else { this.iterN(this.first, this.first + this.size, from); }\n\t    },\n\n\t    // Non-public interface for adding and removing lines.\n\t    insert: function(at, lines) {\n\t      var height = 0;\n\t      for (var i = 0; i < lines.length; ++i) { height += lines[i].height; }\n\t      this.insertInner(at - this.first, lines, height);\n\t    },\n\t    remove: function(at, n) { this.removeInner(at - this.first, n); },\n\n\t    // From here, the methods are part of the public interface. Most\n\t    // are also available from CodeMirror (editor) instances.\n\n\t    getValue: function(lineSep) {\n\t      var lines = getLines(this, this.first, this.first + this.size);\n\t      if (lineSep === false) { return lines }\n\t      return lines.join(lineSep || this.lineSeparator())\n\t    },\n\t    setValue: docMethodOp(function(code) {\n\t      var top = Pos(this.first, 0), last = this.first + this.size - 1;\n\t      makeChange(this, {from: top, to: Pos(last, getLine(this, last).text.length),\n\t                        text: this.splitLines(code), origin: \"setValue\", full: true}, true);\n\t      if (this.cm) { scrollToCoords(this.cm, 0, 0); }\n\t      setSelection(this, simpleSelection(top), sel_dontScroll);\n\t    }),\n\t    replaceRange: function(code, from, to, origin) {\n\t      from = clipPos(this, from);\n\t      to = to ? clipPos(this, to) : from;\n\t      replaceRange(this, code, from, to, origin);\n\t    },\n\t    getRange: function(from, to, lineSep) {\n\t      var lines = getBetween(this, clipPos(this, from), clipPos(this, to));\n\t      if (lineSep === false) { return lines }\n\t      return lines.join(lineSep || this.lineSeparator())\n\t    },\n\n\t    getLine: function(line) {var l = this.getLineHandle(line); return l && l.text},\n\n\t    getLineHandle: function(line) {if (isLine(this, line)) { return getLine(this, line) }},\n\t    getLineNumber: function(line) {return lineNo(line)},\n\n\t    getLineHandleVisualStart: function(line) {\n\t      if (typeof line == \"number\") { line = getLine(this, line); }\n\t      return visualLine(line)\n\t    },\n\n\t    lineCount: function() {return this.size},\n\t    firstLine: function() {return this.first},\n\t    lastLine: function() {return this.first + this.size - 1},\n\n\t    clipPos: function(pos) {return clipPos(this, pos)},\n\n\t    getCursor: function(start) {\n\t      var range = this.sel.primary(), pos;\n\t      if (start == null || start == \"head\") { pos = range.head; }\n\t      else if (start == \"anchor\") { pos = range.anchor; }\n\t      else if (start == \"end\" || start == \"to\" || start === false) { pos = range.to(); }\n\t      else { pos = range.from(); }\n\t      return pos\n\t    },\n\t    listSelections: function() { return this.sel.ranges },\n\t    somethingSelected: function() {return this.sel.somethingSelected()},\n\n\t    setCursor: docMethodOp(function(line, ch, options) {\n\t      setSimpleSelection(this, clipPos(this, typeof line == \"number\" ? Pos(line, ch || 0) : line), null, options);\n\t    }),\n\t    setSelection: docMethodOp(function(anchor, head, options) {\n\t      setSimpleSelection(this, clipPos(this, anchor), clipPos(this, head || anchor), options);\n\t    }),\n\t    extendSelection: docMethodOp(function(head, other, options) {\n\t      extendSelection(this, clipPos(this, head), other && clipPos(this, other), options);\n\t    }),\n\t    extendSelections: docMethodOp(function(heads, options) {\n\t      extendSelections(this, clipPosArray(this, heads), options);\n\t    }),\n\t    extendSelectionsBy: docMethodOp(function(f, options) {\n\t      var heads = map(this.sel.ranges, f);\n\t      extendSelections(this, clipPosArray(this, heads), options);\n\t    }),\n\t    setSelections: docMethodOp(function(ranges, primary, options) {\n\t      if (!ranges.length) { return }\n\t      var out = [];\n\t      for (var i = 0; i < ranges.length; i++)\n\t        { out[i] = new Range(clipPos(this, ranges[i].anchor),\n\t                           clipPos(this, ranges[i].head)); }\n\t      if (primary == null) { primary = Math.min(ranges.length - 1, this.sel.primIndex); }\n\t      setSelection(this, normalizeSelection(this.cm, out, primary), options);\n\t    }),\n\t    addSelection: docMethodOp(function(anchor, head, options) {\n\t      var ranges = this.sel.ranges.slice(0);\n\t      ranges.push(new Range(clipPos(this, anchor), clipPos(this, head || anchor)));\n\t      setSelection(this, normalizeSelection(this.cm, ranges, ranges.length - 1), options);\n\t    }),\n\n\t    getSelection: function(lineSep) {\n\t      var ranges = this.sel.ranges, lines;\n\t      for (var i = 0; i < ranges.length; i++) {\n\t        var sel = getBetween(this, ranges[i].from(), ranges[i].to());\n\t        lines = lines ? lines.concat(sel) : sel;\n\t      }\n\t      if (lineSep === false) { return lines }\n\t      else { return lines.join(lineSep || this.lineSeparator()) }\n\t    },\n\t    getSelections: function(lineSep) {\n\t      var parts = [], ranges = this.sel.ranges;\n\t      for (var i = 0; i < ranges.length; i++) {\n\t        var sel = getBetween(this, ranges[i].from(), ranges[i].to());\n\t        if (lineSep !== false) { sel = sel.join(lineSep || this.lineSeparator()); }\n\t        parts[i] = sel;\n\t      }\n\t      return parts\n\t    },\n\t    replaceSelection: function(code, collapse, origin) {\n\t      var dup = [];\n\t      for (var i = 0; i < this.sel.ranges.length; i++)\n\t        { dup[i] = code; }\n\t      this.replaceSelections(dup, collapse, origin || \"+input\");\n\t    },\n\t    replaceSelections: docMethodOp(function(code, collapse, origin) {\n\t      var changes = [], sel = this.sel;\n\t      for (var i = 0; i < sel.ranges.length; i++) {\n\t        var range = sel.ranges[i];\n\t        changes[i] = {from: range.from(), to: range.to(), text: this.splitLines(code[i]), origin: origin};\n\t      }\n\t      var newSel = collapse && collapse != \"end\" && computeReplacedSel(this, changes, collapse);\n\t      for (var i$1 = changes.length - 1; i$1 >= 0; i$1--)\n\t        { makeChange(this, changes[i$1]); }\n\t      if (newSel) { setSelectionReplaceHistory(this, newSel); }\n\t      else if (this.cm) { ensureCursorVisible(this.cm); }\n\t    }),\n\t    undo: docMethodOp(function() {makeChangeFromHistory(this, \"undo\");}),\n\t    redo: docMethodOp(function() {makeChangeFromHistory(this, \"redo\");}),\n\t    undoSelection: docMethodOp(function() {makeChangeFromHistory(this, \"undo\", true);}),\n\t    redoSelection: docMethodOp(function() {makeChangeFromHistory(this, \"redo\", true);}),\n\n\t    setExtending: function(val) {this.extend = val;},\n\t    getExtending: function() {return this.extend},\n\n\t    historySize: function() {\n\t      var hist = this.history, done = 0, undone = 0;\n\t      for (var i = 0; i < hist.done.length; i++) { if (!hist.done[i].ranges) { ++done; } }\n\t      for (var i$1 = 0; i$1 < hist.undone.length; i$1++) { if (!hist.undone[i$1].ranges) { ++undone; } }\n\t      return {undo: done, redo: undone}\n\t    },\n\t    clearHistory: function() {\n\t      var this$1 = this;\n\n\t      this.history = new History(this.history.maxGeneration);\n\t      linkedDocs(this, function (doc) { return doc.history = this$1.history; }, true);\n\t    },\n\n\t    markClean: function() {\n\t      this.cleanGeneration = this.changeGeneration(true);\n\t    },\n\t    changeGeneration: function(forceSplit) {\n\t      if (forceSplit)\n\t        { this.history.lastOp = this.history.lastSelOp = this.history.lastOrigin = null; }\n\t      return this.history.generation\n\t    },\n\t    isClean: function (gen) {\n\t      return this.history.generation == (gen || this.cleanGeneration)\n\t    },\n\n\t    getHistory: function() {\n\t      return {done: copyHistoryArray(this.history.done),\n\t              undone: copyHistoryArray(this.history.undone)}\n\t    },\n\t    setHistory: function(histData) {\n\t      var hist = this.history = new History(this.history.maxGeneration);\n\t      hist.done = copyHistoryArray(histData.done.slice(0), null, true);\n\t      hist.undone = copyHistoryArray(histData.undone.slice(0), null, true);\n\t    },\n\n\t    setGutterMarker: docMethodOp(function(line, gutterID, value) {\n\t      return changeLine(this, line, \"gutter\", function (line) {\n\t        var markers = line.gutterMarkers || (line.gutterMarkers = {});\n\t        markers[gutterID] = value;\n\t        if (!value && isEmpty(markers)) { line.gutterMarkers = null; }\n\t        return true\n\t      })\n\t    }),\n\n\t    clearGutter: docMethodOp(function(gutterID) {\n\t      var this$1 = this;\n\n\t      this.iter(function (line) {\n\t        if (line.gutterMarkers && line.gutterMarkers[gutterID]) {\n\t          changeLine(this$1, line, \"gutter\", function () {\n\t            line.gutterMarkers[gutterID] = null;\n\t            if (isEmpty(line.gutterMarkers)) { line.gutterMarkers = null; }\n\t            return true\n\t          });\n\t        }\n\t      });\n\t    }),\n\n\t    lineInfo: function(line) {\n\t      var n;\n\t      if (typeof line == \"number\") {\n\t        if (!isLine(this, line)) { return null }\n\t        n = line;\n\t        line = getLine(this, line);\n\t        if (!line) { return null }\n\t      } else {\n\t        n = lineNo(line);\n\t        if (n == null) { return null }\n\t      }\n\t      return {line: n, handle: line, text: line.text, gutterMarkers: line.gutterMarkers,\n\t              textClass: line.textClass, bgClass: line.bgClass, wrapClass: line.wrapClass,\n\t              widgets: line.widgets}\n\t    },\n\n\t    addLineClass: docMethodOp(function(handle, where, cls) {\n\t      return changeLine(this, handle, where == \"gutter\" ? \"gutter\" : \"class\", function (line) {\n\t        var prop = where == \"text\" ? \"textClass\"\n\t                 : where == \"background\" ? \"bgClass\"\n\t                 : where == \"gutter\" ? \"gutterClass\" : \"wrapClass\";\n\t        if (!line[prop]) { line[prop] = cls; }\n\t        else if (classTest(cls).test(line[prop])) { return false }\n\t        else { line[prop] += \" \" + cls; }\n\t        return true\n\t      })\n\t    }),\n\t    removeLineClass: docMethodOp(function(handle, where, cls) {\n\t      return changeLine(this, handle, where == \"gutter\" ? \"gutter\" : \"class\", function (line) {\n\t        var prop = where == \"text\" ? \"textClass\"\n\t                 : where == \"background\" ? \"bgClass\"\n\t                 : where == \"gutter\" ? \"gutterClass\" : \"wrapClass\";\n\t        var cur = line[prop];\n\t        if (!cur) { return false }\n\t        else if (cls == null) { line[prop] = null; }\n\t        else {\n\t          var found = cur.match(classTest(cls));\n\t          if (!found) { return false }\n\t          var end = found.index + found[0].length;\n\t          line[prop] = cur.slice(0, found.index) + (!found.index || end == cur.length ? \"\" : \" \") + cur.slice(end) || null;\n\t        }\n\t        return true\n\t      })\n\t    }),\n\n\t    addLineWidget: docMethodOp(function(handle, node, options) {\n\t      return addLineWidget(this, handle, node, options)\n\t    }),\n\t    removeLineWidget: function(widget) { widget.clear(); },\n\n\t    markText: function(from, to, options) {\n\t      return markText(this, clipPos(this, from), clipPos(this, to), options, options && options.type || \"range\")\n\t    },\n\t    setBookmark: function(pos, options) {\n\t      var realOpts = {replacedWith: options && (options.nodeType == null ? options.widget : options),\n\t                      insertLeft: options && options.insertLeft,\n\t                      clearWhenEmpty: false, shared: options && options.shared,\n\t                      handleMouseEvents: options && options.handleMouseEvents};\n\t      pos = clipPos(this, pos);\n\t      return markText(this, pos, pos, realOpts, \"bookmark\")\n\t    },\n\t    findMarksAt: function(pos) {\n\t      pos = clipPos(this, pos);\n\t      var markers = [], spans = getLine(this, pos.line).markedSpans;\n\t      if (spans) { for (var i = 0; i < spans.length; ++i) {\n\t        var span = spans[i];\n\t        if ((span.from == null || span.from <= pos.ch) &&\n\t            (span.to == null || span.to >= pos.ch))\n\t          { markers.push(span.marker.parent || span.marker); }\n\t      } }\n\t      return markers\n\t    },\n\t    findMarks: function(from, to, filter) {\n\t      from = clipPos(this, from); to = clipPos(this, to);\n\t      var found = [], lineNo = from.line;\n\t      this.iter(from.line, to.line + 1, function (line) {\n\t        var spans = line.markedSpans;\n\t        if (spans) { for (var i = 0; i < spans.length; i++) {\n\t          var span = spans[i];\n\t          if (!(span.to != null && lineNo == from.line && from.ch >= span.to ||\n\t                span.from == null && lineNo != from.line ||\n\t                span.from != null && lineNo == to.line && span.from >= to.ch) &&\n\t              (!filter || filter(span.marker)))\n\t            { found.push(span.marker.parent || span.marker); }\n\t        } }\n\t        ++lineNo;\n\t      });\n\t      return found\n\t    },\n\t    getAllMarks: function() {\n\t      var markers = [];\n\t      this.iter(function (line) {\n\t        var sps = line.markedSpans;\n\t        if (sps) { for (var i = 0; i < sps.length; ++i)\n\t          { if (sps[i].from != null) { markers.push(sps[i].marker); } } }\n\t      });\n\t      return markers\n\t    },\n\n\t    posFromIndex: function(off) {\n\t      var ch, lineNo = this.first, sepSize = this.lineSeparator().length;\n\t      this.iter(function (line) {\n\t        var sz = line.text.length + sepSize;\n\t        if (sz > off) { ch = off; return true }\n\t        off -= sz;\n\t        ++lineNo;\n\t      });\n\t      return clipPos(this, Pos(lineNo, ch))\n\t    },\n\t    indexFromPos: function (coords) {\n\t      coords = clipPos(this, coords);\n\t      var index = coords.ch;\n\t      if (coords.line < this.first || coords.ch < 0) { return 0 }\n\t      var sepSize = this.lineSeparator().length;\n\t      this.iter(this.first, coords.line, function (line) { // iter aborts when callback returns a truthy value\n\t        index += line.text.length + sepSize;\n\t      });\n\t      return index\n\t    },\n\n\t    copy: function(copyHistory) {\n\t      var doc = new Doc(getLines(this, this.first, this.first + this.size),\n\t                        this.modeOption, this.first, this.lineSep, this.direction);\n\t      doc.scrollTop = this.scrollTop; doc.scrollLeft = this.scrollLeft;\n\t      doc.sel = this.sel;\n\t      doc.extend = false;\n\t      if (copyHistory) {\n\t        doc.history.undoDepth = this.history.undoDepth;\n\t        doc.setHistory(this.getHistory());\n\t      }\n\t      return doc\n\t    },\n\n\t    linkedDoc: function(options) {\n\t      if (!options) { options = {}; }\n\t      var from = this.first, to = this.first + this.size;\n\t      if (options.from != null && options.from > from) { from = options.from; }\n\t      if (options.to != null && options.to < to) { to = options.to; }\n\t      var copy = new Doc(getLines(this, from, to), options.mode || this.modeOption, from, this.lineSep, this.direction);\n\t      if (options.sharedHist) { copy.history = this.history\n\t      ; }(this.linked || (this.linked = [])).push({doc: copy, sharedHist: options.sharedHist});\n\t      copy.linked = [{doc: this, isParent: true, sharedHist: options.sharedHist}];\n\t      copySharedMarkers(copy, findSharedMarkers(this));\n\t      return copy\n\t    },\n\t    unlinkDoc: function(other) {\n\t      if (other instanceof CodeMirror) { other = other.doc; }\n\t      if (this.linked) { for (var i = 0; i < this.linked.length; ++i) {\n\t        var link = this.linked[i];\n\t        if (link.doc != other) { continue }\n\t        this.linked.splice(i, 1);\n\t        other.unlinkDoc(this);\n\t        detachSharedMarkers(findSharedMarkers(this));\n\t        break\n\t      } }\n\t      // If the histories were shared, split them again\n\t      if (other.history == this.history) {\n\t        var splitIds = [other.id];\n\t        linkedDocs(other, function (doc) { return splitIds.push(doc.id); }, true);\n\t        other.history = new History(null);\n\t        other.history.done = copyHistoryArray(this.history.done, splitIds);\n\t        other.history.undone = copyHistoryArray(this.history.undone, splitIds);\n\t      }\n\t    },\n\t    iterLinkedDocs: function(f) {linkedDocs(this, f);},\n\n\t    getMode: function() {return this.mode},\n\t    getEditor: function() {return this.cm},\n\n\t    splitLines: function(str) {\n\t      if (this.lineSep) { return str.split(this.lineSep) }\n\t      return splitLinesAuto(str)\n\t    },\n\t    lineSeparator: function() { return this.lineSep || \"\\n\" },\n\n\t    setDirection: docMethodOp(function (dir) {\n\t      if (dir != \"rtl\") { dir = \"ltr\"; }\n\t      if (dir == this.direction) { return }\n\t      this.direction = dir;\n\t      this.iter(function (line) { return line.order = null; });\n\t      if (this.cm) { directionChanged(this.cm); }\n\t    })\n\t  });\n\n\t  // Public alias.\n\t  Doc.prototype.eachLine = Doc.prototype.iter;\n\n\t  // Kludge to work around strange IE behavior where it'll sometimes\n\t  // re-fire a series of drag-related events right after the drop (#1551)\n\t  var lastDrop = 0;\n\n\t  function onDrop(e) {\n\t    var cm = this;\n\t    clearDragCursor(cm);\n\t    if (signalDOMEvent(cm, e) || eventInWidget(cm.display, e))\n\t      { return }\n\t    e_preventDefault(e);\n\t    if (ie) { lastDrop = +new Date; }\n\t    var pos = posFromMouse(cm, e, true), files = e.dataTransfer.files;\n\t    if (!pos || cm.isReadOnly()) { return }\n\t    // Might be a file drop, in which case we simply extract the text\n\t    // and insert it.\n\t    if (files && files.length && window.FileReader && window.File) {\n\t      var n = files.length, text = Array(n), read = 0;\n\t      var markAsReadAndPasteIfAllFilesAreRead = function () {\n\t        if (++read == n) {\n\t          operation(cm, function () {\n\t            pos = clipPos(cm.doc, pos);\n\t            var change = {from: pos, to: pos,\n\t                          text: cm.doc.splitLines(\n\t                              text.filter(function (t) { return t != null; }).join(cm.doc.lineSeparator())),\n\t                          origin: \"paste\"};\n\t            makeChange(cm.doc, change);\n\t            setSelectionReplaceHistory(cm.doc, simpleSelection(clipPos(cm.doc, pos), clipPos(cm.doc, changeEnd(change))));\n\t          })();\n\t        }\n\t      };\n\t      var readTextFromFile = function (file, i) {\n\t        if (cm.options.allowDropFileTypes &&\n\t            indexOf(cm.options.allowDropFileTypes, file.type) == -1) {\n\t          markAsReadAndPasteIfAllFilesAreRead();\n\t          return\n\t        }\n\t        var reader = new FileReader;\n\t        reader.onerror = function () { return markAsReadAndPasteIfAllFilesAreRead(); };\n\t        reader.onload = function () {\n\t          var content = reader.result;\n\t          if (/[\\x00-\\x08\\x0e-\\x1f]{2}/.test(content)) {\n\t            markAsReadAndPasteIfAllFilesAreRead();\n\t            return\n\t          }\n\t          text[i] = content;\n\t          markAsReadAndPasteIfAllFilesAreRead();\n\t        };\n\t        reader.readAsText(file);\n\t      };\n\t      for (var i = 0; i < files.length; i++) { readTextFromFile(files[i], i); }\n\t    } else { // Normal drop\n\t      // Don't do a replace if the drop happened inside of the selected text.\n\t      if (cm.state.draggingText && cm.doc.sel.contains(pos) > -1) {\n\t        cm.state.draggingText(e);\n\t        // Ensure the editor is re-focused\n\t        setTimeout(function () { return cm.display.input.focus(); }, 20);\n\t        return\n\t      }\n\t      try {\n\t        var text$1 = e.dataTransfer.getData(\"Text\");\n\t        if (text$1) {\n\t          var selected;\n\t          if (cm.state.draggingText && !cm.state.draggingText.copy)\n\t            { selected = cm.listSelections(); }\n\t          setSelectionNoUndo(cm.doc, simpleSelection(pos, pos));\n\t          if (selected) { for (var i$1 = 0; i$1 < selected.length; ++i$1)\n\t            { replaceRange(cm.doc, \"\", selected[i$1].anchor, selected[i$1].head, \"drag\"); } }\n\t          cm.replaceSelection(text$1, \"around\", \"paste\");\n\t          cm.display.input.focus();\n\t        }\n\t      }\n\t      catch(e$1){}\n\t    }\n\t  }\n\n\t  function onDragStart(cm, e) {\n\t    if (ie && (!cm.state.draggingText || +new Date - lastDrop < 100)) { e_stop(e); return }\n\t    if (signalDOMEvent(cm, e) || eventInWidget(cm.display, e)) { return }\n\n\t    e.dataTransfer.setData(\"Text\", cm.getSelection());\n\t    e.dataTransfer.effectAllowed = \"copyMove\";\n\n\t    // Use dummy image instead of default browsers image.\n\t    // Recent Safari (~6.0.2) have a tendency to segfault when this happens, so we don't do it there.\n\t    if (e.dataTransfer.setDragImage && !safari) {\n\t      var img = elt(\"img\", null, null, \"position: fixed; left: 0; top: 0;\");\n\t      img.src = \"data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==\";\n\t      if (presto) {\n\t        img.width = img.height = 1;\n\t        cm.display.wrapper.appendChild(img);\n\t        // Force a relayout, or Opera won't use our image for some obscure reason\n\t        img._top = img.offsetTop;\n\t      }\n\t      e.dataTransfer.setDragImage(img, 0, 0);\n\t      if (presto) { img.parentNode.removeChild(img); }\n\t    }\n\t  }\n\n\t  function onDragOver(cm, e) {\n\t    var pos = posFromMouse(cm, e);\n\t    if (!pos) { return }\n\t    var frag = document.createDocumentFragment();\n\t    drawSelectionCursor(cm, pos, frag);\n\t    if (!cm.display.dragCursor) {\n\t      cm.display.dragCursor = elt(\"div\", null, \"CodeMirror-cursors CodeMirror-dragcursors\");\n\t      cm.display.lineSpace.insertBefore(cm.display.dragCursor, cm.display.cursorDiv);\n\t    }\n\t    removeChildrenAndAdd(cm.display.dragCursor, frag);\n\t  }\n\n\t  function clearDragCursor(cm) {\n\t    if (cm.display.dragCursor) {\n\t      cm.display.lineSpace.removeChild(cm.display.dragCursor);\n\t      cm.display.dragCursor = null;\n\t    }\n\t  }\n\n\t  // These must be handled carefully, because naively registering a\n\t  // handler for each editor will cause the editors to never be\n\t  // garbage collected.\n\n\t  function forEachCodeMirror(f) {\n\t    if (!document.getElementsByClassName) { return }\n\t    var byClass = document.getElementsByClassName(\"CodeMirror\"), editors = [];\n\t    for (var i = 0; i < byClass.length; i++) {\n\t      var cm = byClass[i].CodeMirror;\n\t      if (cm) { editors.push(cm); }\n\t    }\n\t    if (editors.length) { editors[0].operation(function () {\n\t      for (var i = 0; i < editors.length; i++) { f(editors[i]); }\n\t    }); }\n\t  }\n\n\t  var globalsRegistered = false;\n\t  function ensureGlobalHandlers() {\n\t    if (globalsRegistered) { return }\n\t    registerGlobalHandlers();\n\t    globalsRegistered = true;\n\t  }\n\t  function registerGlobalHandlers() {\n\t    // When the window resizes, we need to refresh active editors.\n\t    var resizeTimer;\n\t    on(window, \"resize\", function () {\n\t      if (resizeTimer == null) { resizeTimer = setTimeout(function () {\n\t        resizeTimer = null;\n\t        forEachCodeMirror(onResize);\n\t      }, 100); }\n\t    });\n\t    // When the window loses focus, we want to show the editor as blurred\n\t    on(window, \"blur\", function () { return forEachCodeMirror(onBlur); });\n\t  }\n\t  // Called when the window resizes\n\t  function onResize(cm) {\n\t    var d = cm.display;\n\t    // Might be a text scaling operation, clear size caches.\n\t    d.cachedCharWidth = d.cachedTextHeight = d.cachedPaddingH = null;\n\t    d.scrollbarsClipped = false;\n\t    cm.setSize();\n\t  }\n\n\t  var keyNames = {\n\t    3: \"Pause\", 8: \"Backspace\", 9: \"Tab\", 13: \"Enter\", 16: \"Shift\", 17: \"Ctrl\", 18: \"Alt\",\n\t    19: \"Pause\", 20: \"CapsLock\", 27: \"Esc\", 32: \"Space\", 33: \"PageUp\", 34: \"PageDown\", 35: \"End\",\n\t    36: \"Home\", 37: \"Left\", 38: \"Up\", 39: \"Right\", 40: \"Down\", 44: \"PrintScrn\", 45: \"Insert\",\n\t    46: \"Delete\", 59: \";\", 61: \"=\", 91: \"Mod\", 92: \"Mod\", 93: \"Mod\",\n\t    106: \"*\", 107: \"=\", 109: \"-\", 110: \".\", 111: \"/\", 145: \"ScrollLock\",\n\t    173: \"-\", 186: \";\", 187: \"=\", 188: \",\", 189: \"-\", 190: \".\", 191: \"/\", 192: \"`\", 219: \"[\", 220: \"\\\\\",\n\t    221: \"]\", 222: \"'\", 224: \"Mod\", 63232: \"Up\", 63233: \"Down\", 63234: \"Left\", 63235: \"Right\", 63272: \"Delete\",\n\t    63273: \"Home\", 63275: \"End\", 63276: \"PageUp\", 63277: \"PageDown\", 63302: \"Insert\"\n\t  };\n\n\t  // Number keys\n\t  for (var i = 0; i < 10; i++) { keyNames[i + 48] = keyNames[i + 96] = String(i); }\n\t  // Alphabetic keys\n\t  for (var i$1 = 65; i$1 <= 90; i$1++) { keyNames[i$1] = String.fromCharCode(i$1); }\n\t  // Function keys\n\t  for (var i$2 = 1; i$2 <= 12; i$2++) { keyNames[i$2 + 111] = keyNames[i$2 + 63235] = \"F\" + i$2; }\n\n\t  var keyMap = {};\n\n\t  keyMap.basic = {\n\t    \"Left\": \"goCharLeft\", \"Right\": \"goCharRight\", \"Up\": \"goLineUp\", \"Down\": \"goLineDown\",\n\t    \"End\": \"goLineEnd\", \"Home\": \"goLineStartSmart\", \"PageUp\": \"goPageUp\", \"PageDown\": \"goPageDown\",\n\t    \"Delete\": \"delCharAfter\", \"Backspace\": \"delCharBefore\", \"Shift-Backspace\": \"delCharBefore\",\n\t    \"Tab\": \"defaultTab\", \"Shift-Tab\": \"indentAuto\",\n\t    \"Enter\": \"newlineAndIndent\", \"Insert\": \"toggleOverwrite\",\n\t    \"Esc\": \"singleSelection\"\n\t  };\n\t  // Note that the save and find-related commands aren't defined by\n\t  // default. User code or addons can define them. Unknown commands\n\t  // are simply ignored.\n\t  keyMap.pcDefault = {\n\t    \"Ctrl-A\": \"selectAll\", \"Ctrl-D\": \"deleteLine\", \"Ctrl-Z\": \"undo\", \"Shift-Ctrl-Z\": \"redo\", \"Ctrl-Y\": \"redo\",\n\t    \"Ctrl-Home\": \"goDocStart\", \"Ctrl-End\": \"goDocEnd\", \"Ctrl-Up\": \"goLineUp\", \"Ctrl-Down\": \"goLineDown\",\n\t    \"Ctrl-Left\": \"goGroupLeft\", \"Ctrl-Right\": \"goGroupRight\", \"Alt-Left\": \"goLineStart\", \"Alt-Right\": \"goLineEnd\",\n\t    \"Ctrl-Backspace\": \"delGroupBefore\", \"Ctrl-Delete\": \"delGroupAfter\", \"Ctrl-S\": \"save\", \"Ctrl-F\": \"find\",\n\t    \"Ctrl-G\": \"findNext\", \"Shift-Ctrl-G\": \"findPrev\", \"Shift-Ctrl-F\": \"replace\", \"Shift-Ctrl-R\": \"replaceAll\",\n\t    \"Ctrl-[\": \"indentLess\", \"Ctrl-]\": \"indentMore\",\n\t    \"Ctrl-U\": \"undoSelection\", \"Shift-Ctrl-U\": \"redoSelection\", \"Alt-U\": \"redoSelection\",\n\t    \"fallthrough\": \"basic\"\n\t  };\n\t  // Very basic readline/emacs-style bindings, which are standard on Mac.\n\t  keyMap.emacsy = {\n\t    \"Ctrl-F\": \"goCharRight\", \"Ctrl-B\": \"goCharLeft\", \"Ctrl-P\": \"goLineUp\", \"Ctrl-N\": \"goLineDown\",\n\t    \"Alt-F\": \"goWordRight\", \"Alt-B\": \"goWordLeft\", \"Ctrl-A\": \"goLineStart\", \"Ctrl-E\": \"goLineEnd\",\n\t    \"Ctrl-V\": \"goPageDown\", \"Shift-Ctrl-V\": \"goPageUp\", \"Ctrl-D\": \"delCharAfter\", \"Ctrl-H\": \"delCharBefore\",\n\t    \"Alt-D\": \"delWordAfter\", \"Alt-Backspace\": \"delWordBefore\", \"Ctrl-K\": \"killLine\", \"Ctrl-T\": \"transposeChars\",\n\t    \"Ctrl-O\": \"openLine\"\n\t  };\n\t  keyMap.macDefault = {\n\t    \"Cmd-A\": \"selectAll\", \"Cmd-D\": \"deleteLine\", \"Cmd-Z\": \"undo\", \"Shift-Cmd-Z\": \"redo\", \"Cmd-Y\": \"redo\",\n\t    \"Cmd-Home\": \"goDocStart\", \"Cmd-Up\": \"goDocStart\", \"Cmd-End\": \"goDocEnd\", \"Cmd-Down\": \"goDocEnd\", \"Alt-Left\": \"goGroupLeft\",\n\t    \"Alt-Right\": \"goGroupRight\", \"Cmd-Left\": \"goLineLeft\", \"Cmd-Right\": \"goLineRight\", \"Alt-Backspace\": \"delGroupBefore\",\n\t    \"Ctrl-Alt-Backspace\": \"delGroupAfter\", \"Alt-Delete\": \"delGroupAfter\", \"Cmd-S\": \"save\", \"Cmd-F\": \"find\",\n\t    \"Cmd-G\": \"findNext\", \"Shift-Cmd-G\": \"findPrev\", \"Cmd-Alt-F\": \"replace\", \"Shift-Cmd-Alt-F\": \"replaceAll\",\n\t    \"Cmd-[\": \"indentLess\", \"Cmd-]\": \"indentMore\", \"Cmd-Backspace\": \"delWrappedLineLeft\", \"Cmd-Delete\": \"delWrappedLineRight\",\n\t    \"Cmd-U\": \"undoSelection\", \"Shift-Cmd-U\": \"redoSelection\", \"Ctrl-Up\": \"goDocStart\", \"Ctrl-Down\": \"goDocEnd\",\n\t    \"fallthrough\": [\"basic\", \"emacsy\"]\n\t  };\n\t  keyMap[\"default\"] = mac ? keyMap.macDefault : keyMap.pcDefault;\n\n\t  // KEYMAP DISPATCH\n\n\t  function normalizeKeyName(name) {\n\t    var parts = name.split(/-(?!$)/);\n\t    name = parts[parts.length - 1];\n\t    var alt, ctrl, shift, cmd;\n\t    for (var i = 0; i < parts.length - 1; i++) {\n\t      var mod = parts[i];\n\t      if (/^(cmd|meta|m)$/i.test(mod)) { cmd = true; }\n\t      else if (/^a(lt)?$/i.test(mod)) { alt = true; }\n\t      else if (/^(c|ctrl|control)$/i.test(mod)) { ctrl = true; }\n\t      else if (/^s(hift)?$/i.test(mod)) { shift = true; }\n\t      else { throw new Error(\"Unrecognized modifier name: \" + mod) }\n\t    }\n\t    if (alt) { name = \"Alt-\" + name; }\n\t    if (ctrl) { name = \"Ctrl-\" + name; }\n\t    if (cmd) { name = \"Cmd-\" + name; }\n\t    if (shift) { name = \"Shift-\" + name; }\n\t    return name\n\t  }\n\n\t  // This is a kludge to keep keymaps mostly working as raw objects\n\t  // (backwards compatibility) while at the same time support features\n\t  // like normalization and multi-stroke key bindings. It compiles a\n\t  // new normalized keymap, and then updates the old object to reflect\n\t  // this.\n\t  function normalizeKeyMap(keymap) {\n\t    var copy = {};\n\t    for (var keyname in keymap) { if (keymap.hasOwnProperty(keyname)) {\n\t      var value = keymap[keyname];\n\t      if (/^(name|fallthrough|(de|at)tach)$/.test(keyname)) { continue }\n\t      if (value == \"...\") { delete keymap[keyname]; continue }\n\n\t      var keys = map(keyname.split(\" \"), normalizeKeyName);\n\t      for (var i = 0; i < keys.length; i++) {\n\t        var val = (void 0), name = (void 0);\n\t        if (i == keys.length - 1) {\n\t          name = keys.join(\" \");\n\t          val = value;\n\t        } else {\n\t          name = keys.slice(0, i + 1).join(\" \");\n\t          val = \"...\";\n\t        }\n\t        var prev = copy[name];\n\t        if (!prev) { copy[name] = val; }\n\t        else if (prev != val) { throw new Error(\"Inconsistent bindings for \" + name) }\n\t      }\n\t      delete keymap[keyname];\n\t    } }\n\t    for (var prop in copy) { keymap[prop] = copy[prop]; }\n\t    return keymap\n\t  }\n\n\t  function lookupKey(key, map, handle, context) {\n\t    map = getKeyMap(map);\n\t    var found = map.call ? map.call(key, context) : map[key];\n\t    if (found === false) { return \"nothing\" }\n\t    if (found === \"...\") { return \"multi\" }\n\t    if (found != null && handle(found)) { return \"handled\" }\n\n\t    if (map.fallthrough) {\n\t      if (Object.prototype.toString.call(map.fallthrough) != \"[object Array]\")\n\t        { return lookupKey(key, map.fallthrough, handle, context) }\n\t      for (var i = 0; i < map.fallthrough.length; i++) {\n\t        var result = lookupKey(key, map.fallthrough[i], handle, context);\n\t        if (result) { return result }\n\t      }\n\t    }\n\t  }\n\n\t  // Modifier key presses don't count as 'real' key presses for the\n\t  // purpose of keymap fallthrough.\n\t  function isModifierKey(value) {\n\t    var name = typeof value == \"string\" ? value : keyNames[value.keyCode];\n\t    return name == \"Ctrl\" || name == \"Alt\" || name == \"Shift\" || name == \"Mod\"\n\t  }\n\n\t  function addModifierNames(name, event, noShift) {\n\t    var base = name;\n\t    if (event.altKey && base != \"Alt\") { name = \"Alt-\" + name; }\n\t    if ((flipCtrlCmd ? event.metaKey : event.ctrlKey) && base != \"Ctrl\") { name = \"Ctrl-\" + name; }\n\t    if ((flipCtrlCmd ? event.ctrlKey : event.metaKey) && base != \"Mod\") { name = \"Cmd-\" + name; }\n\t    if (!noShift && event.shiftKey && base != \"Shift\") { name = \"Shift-\" + name; }\n\t    return name\n\t  }\n\n\t  // Look up the name of a key as indicated by an event object.\n\t  function keyName(event, noShift) {\n\t    if (presto && event.keyCode == 34 && event[\"char\"]) { return false }\n\t    var name = keyNames[event.keyCode];\n\t    if (name == null || event.altGraphKey) { return false }\n\t    // Ctrl-ScrollLock has keyCode 3, same as Ctrl-Pause,\n\t    // so we'll use event.code when available (Chrome 48+, FF 38+, Safari 10.1+)\n\t    if (event.keyCode == 3 && event.code) { name = event.code; }\n\t    return addModifierNames(name, event, noShift)\n\t  }\n\n\t  function getKeyMap(val) {\n\t    return typeof val == \"string\" ? keyMap[val] : val\n\t  }\n\n\t  // Helper for deleting text near the selection(s), used to implement\n\t  // backspace, delete, and similar functionality.\n\t  function deleteNearSelection(cm, compute) {\n\t    var ranges = cm.doc.sel.ranges, kill = [];\n\t    // Build up a set of ranges to kill first, merging overlapping\n\t    // ranges.\n\t    for (var i = 0; i < ranges.length; i++) {\n\t      var toKill = compute(ranges[i]);\n\t      while (kill.length && cmp(toKill.from, lst(kill).to) <= 0) {\n\t        var replaced = kill.pop();\n\t        if (cmp(replaced.from, toKill.from) < 0) {\n\t          toKill.from = replaced.from;\n\t          break\n\t        }\n\t      }\n\t      kill.push(toKill);\n\t    }\n\t    // Next, remove those actual ranges.\n\t    runInOp(cm, function () {\n\t      for (var i = kill.length - 1; i >= 0; i--)\n\t        { replaceRange(cm.doc, \"\", kill[i].from, kill[i].to, \"+delete\"); }\n\t      ensureCursorVisible(cm);\n\t    });\n\t  }\n\n\t  function moveCharLogically(line, ch, dir) {\n\t    var target = skipExtendingChars(line.text, ch + dir, dir);\n\t    return target < 0 || target > line.text.length ? null : target\n\t  }\n\n\t  function moveLogically(line, start, dir) {\n\t    var ch = moveCharLogically(line, start.ch, dir);\n\t    return ch == null ? null : new Pos(start.line, ch, dir < 0 ? \"after\" : \"before\")\n\t  }\n\n\t  function endOfLine(visually, cm, lineObj, lineNo, dir) {\n\t    if (visually) {\n\t      if (cm.doc.direction == \"rtl\") { dir = -dir; }\n\t      var order = getOrder(lineObj, cm.doc.direction);\n\t      if (order) {\n\t        var part = dir < 0 ? lst(order) : order[0];\n\t        var moveInStorageOrder = (dir < 0) == (part.level == 1);\n\t        var sticky = moveInStorageOrder ? \"after\" : \"before\";\n\t        var ch;\n\t        // With a wrapped rtl chunk (possibly spanning multiple bidi parts),\n\t        // it could be that the last bidi part is not on the last visual line,\n\t        // since visual lines contain content order-consecutive chunks.\n\t        // Thus, in rtl, we are looking for the first (content-order) character\n\t        // in the rtl chunk that is on the last line (that is, the same line\n\t        // as the last (content-order) character).\n\t        if (part.level > 0 || cm.doc.direction == \"rtl\") {\n\t          var prep = prepareMeasureForLine(cm, lineObj);\n\t          ch = dir < 0 ? lineObj.text.length - 1 : 0;\n\t          var targetTop = measureCharPrepared(cm, prep, ch).top;\n\t          ch = findFirst(function (ch) { return measureCharPrepared(cm, prep, ch).top == targetTop; }, (dir < 0) == (part.level == 1) ? part.from : part.to - 1, ch);\n\t          if (sticky == \"before\") { ch = moveCharLogically(lineObj, ch, 1); }\n\t        } else { ch = dir < 0 ? part.to : part.from; }\n\t        return new Pos(lineNo, ch, sticky)\n\t      }\n\t    }\n\t    return new Pos(lineNo, dir < 0 ? lineObj.text.length : 0, dir < 0 ? \"before\" : \"after\")\n\t  }\n\n\t  function moveVisually(cm, line, start, dir) {\n\t    var bidi = getOrder(line, cm.doc.direction);\n\t    if (!bidi) { return moveLogically(line, start, dir) }\n\t    if (start.ch >= line.text.length) {\n\t      start.ch = line.text.length;\n\t      start.sticky = \"before\";\n\t    } else if (start.ch <= 0) {\n\t      start.ch = 0;\n\t      start.sticky = \"after\";\n\t    }\n\t    var partPos = getBidiPartAt(bidi, start.ch, start.sticky), part = bidi[partPos];\n\t    if (cm.doc.direction == \"ltr\" && part.level % 2 == 0 && (dir > 0 ? part.to > start.ch : part.from < start.ch)) {\n\t      // Case 1: We move within an ltr part in an ltr editor. Even with wrapped lines,\n\t      // nothing interesting happens.\n\t      return moveLogically(line, start, dir)\n\t    }\n\n\t    var mv = function (pos, dir) { return moveCharLogically(line, pos instanceof Pos ? pos.ch : pos, dir); };\n\t    var prep;\n\t    var getWrappedLineExtent = function (ch) {\n\t      if (!cm.options.lineWrapping) { return {begin: 0, end: line.text.length} }\n\t      prep = prep || prepareMeasureForLine(cm, line);\n\t      return wrappedLineExtentChar(cm, line, prep, ch)\n\t    };\n\t    var wrappedLineExtent = getWrappedLineExtent(start.sticky == \"before\" ? mv(start, -1) : start.ch);\n\n\t    if (cm.doc.direction == \"rtl\" || part.level == 1) {\n\t      var moveInStorageOrder = (part.level == 1) == (dir < 0);\n\t      var ch = mv(start, moveInStorageOrder ? 1 : -1);\n\t      if (ch != null && (!moveInStorageOrder ? ch >= part.from && ch >= wrappedLineExtent.begin : ch <= part.to && ch <= wrappedLineExtent.end)) {\n\t        // Case 2: We move within an rtl part or in an rtl editor on the same visual line\n\t        var sticky = moveInStorageOrder ? \"before\" : \"after\";\n\t        return new Pos(start.line, ch, sticky)\n\t      }\n\t    }\n\n\t    // Case 3: Could not move within this bidi part in this visual line, so leave\n\t    // the current bidi part\n\n\t    var searchInVisualLine = function (partPos, dir, wrappedLineExtent) {\n\t      var getRes = function (ch, moveInStorageOrder) { return moveInStorageOrder\n\t        ? new Pos(start.line, mv(ch, 1), \"before\")\n\t        : new Pos(start.line, ch, \"after\"); };\n\n\t      for (; partPos >= 0 && partPos < bidi.length; partPos += dir) {\n\t        var part = bidi[partPos];\n\t        var moveInStorageOrder = (dir > 0) == (part.level != 1);\n\t        var ch = moveInStorageOrder ? wrappedLineExtent.begin : mv(wrappedLineExtent.end, -1);\n\t        if (part.from <= ch && ch < part.to) { return getRes(ch, moveInStorageOrder) }\n\t        ch = moveInStorageOrder ? part.from : mv(part.to, -1);\n\t        if (wrappedLineExtent.begin <= ch && ch < wrappedLineExtent.end) { return getRes(ch, moveInStorageOrder) }\n\t      }\n\t    };\n\n\t    // Case 3a: Look for other bidi parts on the same visual line\n\t    var res = searchInVisualLine(partPos + dir, dir, wrappedLineExtent);\n\t    if (res) { return res }\n\n\t    // Case 3b: Look for other bidi parts on the next visual line\n\t    var nextCh = dir > 0 ? wrappedLineExtent.end : mv(wrappedLineExtent.begin, -1);\n\t    if (nextCh != null && !(dir > 0 && nextCh == line.text.length)) {\n\t      res = searchInVisualLine(dir > 0 ? 0 : bidi.length - 1, dir, getWrappedLineExtent(nextCh));\n\t      if (res) { return res }\n\t    }\n\n\t    // Case 4: Nowhere to move\n\t    return null\n\t  }\n\n\t  // Commands are parameter-less actions that can be performed on an\n\t  // editor, mostly used for keybindings.\n\t  var commands = {\n\t    selectAll: selectAll,\n\t    singleSelection: function (cm) { return cm.setSelection(cm.getCursor(\"anchor\"), cm.getCursor(\"head\"), sel_dontScroll); },\n\t    killLine: function (cm) { return deleteNearSelection(cm, function (range) {\n\t      if (range.empty()) {\n\t        var len = getLine(cm.doc, range.head.line).text.length;\n\t        if (range.head.ch == len && range.head.line < cm.lastLine())\n\t          { return {from: range.head, to: Pos(range.head.line + 1, 0)} }\n\t        else\n\t          { return {from: range.head, to: Pos(range.head.line, len)} }\n\t      } else {\n\t        return {from: range.from(), to: range.to()}\n\t      }\n\t    }); },\n\t    deleteLine: function (cm) { return deleteNearSelection(cm, function (range) { return ({\n\t      from: Pos(range.from().line, 0),\n\t      to: clipPos(cm.doc, Pos(range.to().line + 1, 0))\n\t    }); }); },\n\t    delLineLeft: function (cm) { return deleteNearSelection(cm, function (range) { return ({\n\t      from: Pos(range.from().line, 0), to: range.from()\n\t    }); }); },\n\t    delWrappedLineLeft: function (cm) { return deleteNearSelection(cm, function (range) {\n\t      var top = cm.charCoords(range.head, \"div\").top + 5;\n\t      var leftPos = cm.coordsChar({left: 0, top: top}, \"div\");\n\t      return {from: leftPos, to: range.from()}\n\t    }); },\n\t    delWrappedLineRight: function (cm) { return deleteNearSelection(cm, function (range) {\n\t      var top = cm.charCoords(range.head, \"div\").top + 5;\n\t      var rightPos = cm.coordsChar({left: cm.display.lineDiv.offsetWidth + 100, top: top}, \"div\");\n\t      return {from: range.from(), to: rightPos }\n\t    }); },\n\t    undo: function (cm) { return cm.undo(); },\n\t    redo: function (cm) { return cm.redo(); },\n\t    undoSelection: function (cm) { return cm.undoSelection(); },\n\t    redoSelection: function (cm) { return cm.redoSelection(); },\n\t    goDocStart: function (cm) { return cm.extendSelection(Pos(cm.firstLine(), 0)); },\n\t    goDocEnd: function (cm) { return cm.extendSelection(Pos(cm.lastLine())); },\n\t    goLineStart: function (cm) { return cm.extendSelectionsBy(function (range) { return lineStart(cm, range.head.line); },\n\t      {origin: \"+move\", bias: 1}\n\t    ); },\n\t    goLineStartSmart: function (cm) { return cm.extendSelectionsBy(function (range) { return lineStartSmart(cm, range.head); },\n\t      {origin: \"+move\", bias: 1}\n\t    ); },\n\t    goLineEnd: function (cm) { return cm.extendSelectionsBy(function (range) { return lineEnd(cm, range.head.line); },\n\t      {origin: \"+move\", bias: -1}\n\t    ); },\n\t    goLineRight: function (cm) { return cm.extendSelectionsBy(function (range) {\n\t      var top = cm.cursorCoords(range.head, \"div\").top + 5;\n\t      return cm.coordsChar({left: cm.display.lineDiv.offsetWidth + 100, top: top}, \"div\")\n\t    }, sel_move); },\n\t    goLineLeft: function (cm) { return cm.extendSelectionsBy(function (range) {\n\t      var top = cm.cursorCoords(range.head, \"div\").top + 5;\n\t      return cm.coordsChar({left: 0, top: top}, \"div\")\n\t    }, sel_move); },\n\t    goLineLeftSmart: function (cm) { return cm.extendSelectionsBy(function (range) {\n\t      var top = cm.cursorCoords(range.head, \"div\").top + 5;\n\t      var pos = cm.coordsChar({left: 0, top: top}, \"div\");\n\t      if (pos.ch < cm.getLine(pos.line).search(/\\S/)) { return lineStartSmart(cm, range.head) }\n\t      return pos\n\t    }, sel_move); },\n\t    goLineUp: function (cm) { return cm.moveV(-1, \"line\"); },\n\t    goLineDown: function (cm) { return cm.moveV(1, \"line\"); },\n\t    goPageUp: function (cm) { return cm.moveV(-1, \"page\"); },\n\t    goPageDown: function (cm) { return cm.moveV(1, \"page\"); },\n\t    goCharLeft: function (cm) { return cm.moveH(-1, \"char\"); },\n\t    goCharRight: function (cm) { return cm.moveH(1, \"char\"); },\n\t    goColumnLeft: function (cm) { return cm.moveH(-1, \"column\"); },\n\t    goColumnRight: function (cm) { return cm.moveH(1, \"column\"); },\n\t    goWordLeft: function (cm) { return cm.moveH(-1, \"word\"); },\n\t    goGroupRight: function (cm) { return cm.moveH(1, \"group\"); },\n\t    goGroupLeft: function (cm) { return cm.moveH(-1, \"group\"); },\n\t    goWordRight: function (cm) { return cm.moveH(1, \"word\"); },\n\t    delCharBefore: function (cm) { return cm.deleteH(-1, \"codepoint\"); },\n\t    delCharAfter: function (cm) { return cm.deleteH(1, \"char\"); },\n\t    delWordBefore: function (cm) { return cm.deleteH(-1, \"word\"); },\n\t    delWordAfter: function (cm) { return cm.deleteH(1, \"word\"); },\n\t    delGroupBefore: function (cm) { return cm.deleteH(-1, \"group\"); },\n\t    delGroupAfter: function (cm) { return cm.deleteH(1, \"group\"); },\n\t    indentAuto: function (cm) { return cm.indentSelection(\"smart\"); },\n\t    indentMore: function (cm) { return cm.indentSelection(\"add\"); },\n\t    indentLess: function (cm) { return cm.indentSelection(\"subtract\"); },\n\t    insertTab: function (cm) { return cm.replaceSelection(\"\\t\"); },\n\t    insertSoftTab: function (cm) {\n\t      var spaces = [], ranges = cm.listSelections(), tabSize = cm.options.tabSize;\n\t      for (var i = 0; i < ranges.length; i++) {\n\t        var pos = ranges[i].from();\n\t        var col = countColumn(cm.getLine(pos.line), pos.ch, tabSize);\n\t        spaces.push(spaceStr(tabSize - col % tabSize));\n\t      }\n\t      cm.replaceSelections(spaces);\n\t    },\n\t    defaultTab: function (cm) {\n\t      if (cm.somethingSelected()) { cm.indentSelection(\"add\"); }\n\t      else { cm.execCommand(\"insertTab\"); }\n\t    },\n\t    // Swap the two chars left and right of each selection's head.\n\t    // Move cursor behind the two swapped characters afterwards.\n\t    //\n\t    // Doesn't consider line feeds a character.\n\t    // Doesn't scan more than one line above to find a character.\n\t    // Doesn't do anything on an empty line.\n\t    // Doesn't do anything with non-empty selections.\n\t    transposeChars: function (cm) { return runInOp(cm, function () {\n\t      var ranges = cm.listSelections(), newSel = [];\n\t      for (var i = 0; i < ranges.length; i++) {\n\t        if (!ranges[i].empty()) { continue }\n\t        var cur = ranges[i].head, line = getLine(cm.doc, cur.line).text;\n\t        if (line) {\n\t          if (cur.ch == line.length) { cur = new Pos(cur.line, cur.ch - 1); }\n\t          if (cur.ch > 0) {\n\t            cur = new Pos(cur.line, cur.ch + 1);\n\t            cm.replaceRange(line.charAt(cur.ch - 1) + line.charAt(cur.ch - 2),\n\t                            Pos(cur.line, cur.ch - 2), cur, \"+transpose\");\n\t          } else if (cur.line > cm.doc.first) {\n\t            var prev = getLine(cm.doc, cur.line - 1).text;\n\t            if (prev) {\n\t              cur = new Pos(cur.line, 1);\n\t              cm.replaceRange(line.charAt(0) + cm.doc.lineSeparator() +\n\t                              prev.charAt(prev.length - 1),\n\t                              Pos(cur.line - 1, prev.length - 1), cur, \"+transpose\");\n\t            }\n\t          }\n\t        }\n\t        newSel.push(new Range(cur, cur));\n\t      }\n\t      cm.setSelections(newSel);\n\t    }); },\n\t    newlineAndIndent: function (cm) { return runInOp(cm, function () {\n\t      var sels = cm.listSelections();\n\t      for (var i = sels.length - 1; i >= 0; i--)\n\t        { cm.replaceRange(cm.doc.lineSeparator(), sels[i].anchor, sels[i].head, \"+input\"); }\n\t      sels = cm.listSelections();\n\t      for (var i$1 = 0; i$1 < sels.length; i$1++)\n\t        { cm.indentLine(sels[i$1].from().line, null, true); }\n\t      ensureCursorVisible(cm);\n\t    }); },\n\t    openLine: function (cm) { return cm.replaceSelection(\"\\n\", \"start\"); },\n\t    toggleOverwrite: function (cm) { return cm.toggleOverwrite(); }\n\t  };\n\n\n\t  function lineStart(cm, lineN) {\n\t    var line = getLine(cm.doc, lineN);\n\t    var visual = visualLine(line);\n\t    if (visual != line) { lineN = lineNo(visual); }\n\t    return endOfLine(true, cm, visual, lineN, 1)\n\t  }\n\t  function lineEnd(cm, lineN) {\n\t    var line = getLine(cm.doc, lineN);\n\t    var visual = visualLineEnd(line);\n\t    if (visual != line) { lineN = lineNo(visual); }\n\t    return endOfLine(true, cm, line, lineN, -1)\n\t  }\n\t  function lineStartSmart(cm, pos) {\n\t    var start = lineStart(cm, pos.line);\n\t    var line = getLine(cm.doc, start.line);\n\t    var order = getOrder(line, cm.doc.direction);\n\t    if (!order || order[0].level == 0) {\n\t      var firstNonWS = Math.max(start.ch, line.text.search(/\\S/));\n\t      var inWS = pos.line == start.line && pos.ch <= firstNonWS && pos.ch;\n\t      return Pos(start.line, inWS ? 0 : firstNonWS, start.sticky)\n\t    }\n\t    return start\n\t  }\n\n\t  // Run a handler that was bound to a key.\n\t  function doHandleBinding(cm, bound, dropShift) {\n\t    if (typeof bound == \"string\") {\n\t      bound = commands[bound];\n\t      if (!bound) { return false }\n\t    }\n\t    // Ensure previous input has been read, so that the handler sees a\n\t    // consistent view of the document\n\t    cm.display.input.ensurePolled();\n\t    var prevShift = cm.display.shift, done = false;\n\t    try {\n\t      if (cm.isReadOnly()) { cm.state.suppressEdits = true; }\n\t      if (dropShift) { cm.display.shift = false; }\n\t      done = bound(cm) != Pass;\n\t    } finally {\n\t      cm.display.shift = prevShift;\n\t      cm.state.suppressEdits = false;\n\t    }\n\t    return done\n\t  }\n\n\t  function lookupKeyForEditor(cm, name, handle) {\n\t    for (var i = 0; i < cm.state.keyMaps.length; i++) {\n\t      var result = lookupKey(name, cm.state.keyMaps[i], handle, cm);\n\t      if (result) { return result }\n\t    }\n\t    return (cm.options.extraKeys && lookupKey(name, cm.options.extraKeys, handle, cm))\n\t      || lookupKey(name, cm.options.keyMap, handle, cm)\n\t  }\n\n\t  // Note that, despite the name, this function is also used to check\n\t  // for bound mouse clicks.\n\n\t  var stopSeq = new Delayed;\n\n\t  function dispatchKey(cm, name, e, handle) {\n\t    var seq = cm.state.keySeq;\n\t    if (seq) {\n\t      if (isModifierKey(name)) { return \"handled\" }\n\t      if (/\\'$/.test(name))\n\t        { cm.state.keySeq = null; }\n\t      else\n\t        { stopSeq.set(50, function () {\n\t          if (cm.state.keySeq == seq) {\n\t            cm.state.keySeq = null;\n\t            cm.display.input.reset();\n\t          }\n\t        }); }\n\t      if (dispatchKeyInner(cm, seq + \" \" + name, e, handle)) { return true }\n\t    }\n\t    return dispatchKeyInner(cm, name, e, handle)\n\t  }\n\n\t  function dispatchKeyInner(cm, name, e, handle) {\n\t    var result = lookupKeyForEditor(cm, name, handle);\n\n\t    if (result == \"multi\")\n\t      { cm.state.keySeq = name; }\n\t    if (result == \"handled\")\n\t      { signalLater(cm, \"keyHandled\", cm, name, e); }\n\n\t    if (result == \"handled\" || result == \"multi\") {\n\t      e_preventDefault(e);\n\t      restartBlink(cm);\n\t    }\n\n\t    return !!result\n\t  }\n\n\t  // Handle a key from the keydown event.\n\t  function handleKeyBinding(cm, e) {\n\t    var name = keyName(e, true);\n\t    if (!name) { return false }\n\n\t    if (e.shiftKey && !cm.state.keySeq) {\n\t      // First try to resolve full name (including 'Shift-'). Failing\n\t      // that, see if there is a cursor-motion command (starting with\n\t      // 'go') bound to the keyname without 'Shift-'.\n\t      return dispatchKey(cm, \"Shift-\" + name, e, function (b) { return doHandleBinding(cm, b, true); })\n\t          || dispatchKey(cm, name, e, function (b) {\n\t               if (typeof b == \"string\" ? /^go[A-Z]/.test(b) : b.motion)\n\t                 { return doHandleBinding(cm, b) }\n\t             })\n\t    } else {\n\t      return dispatchKey(cm, name, e, function (b) { return doHandleBinding(cm, b); })\n\t    }\n\t  }\n\n\t  // Handle a key from the keypress event\n\t  function handleCharBinding(cm, e, ch) {\n\t    return dispatchKey(cm, \"'\" + ch + \"'\", e, function (b) { return doHandleBinding(cm, b, true); })\n\t  }\n\n\t  var lastStoppedKey = null;\n\t  function onKeyDown(e) {\n\t    var cm = this;\n\t    if (e.target && e.target != cm.display.input.getField()) { return }\n\t    cm.curOp.focus = activeElt();\n\t    if (signalDOMEvent(cm, e)) { return }\n\t    // IE does strange things with escape.\n\t    if (ie && ie_version < 11 && e.keyCode == 27) { e.returnValue = false; }\n\t    var code = e.keyCode;\n\t    cm.display.shift = code == 16 || e.shiftKey;\n\t    var handled = handleKeyBinding(cm, e);\n\t    if (presto) {\n\t      lastStoppedKey = handled ? code : null;\n\t      // Opera has no cut event... we try to at least catch the key combo\n\t      if (!handled && code == 88 && !hasCopyEvent && (mac ? e.metaKey : e.ctrlKey))\n\t        { cm.replaceSelection(\"\", null, \"cut\"); }\n\t    }\n\t    if (gecko && !mac && !handled && code == 46 && e.shiftKey && !e.ctrlKey && document.execCommand)\n\t      { document.execCommand(\"cut\"); }\n\n\t    // Turn mouse into crosshair when Alt is held on Mac.\n\t    if (code == 18 && !/\\bCodeMirror-crosshair\\b/.test(cm.display.lineDiv.className))\n\t      { showCrossHair(cm); }\n\t  }\n\n\t  function showCrossHair(cm) {\n\t    var lineDiv = cm.display.lineDiv;\n\t    addClass(lineDiv, \"CodeMirror-crosshair\");\n\n\t    function up(e) {\n\t      if (e.keyCode == 18 || !e.altKey) {\n\t        rmClass(lineDiv, \"CodeMirror-crosshair\");\n\t        off(document, \"keyup\", up);\n\t        off(document, \"mouseover\", up);\n\t      }\n\t    }\n\t    on(document, \"keyup\", up);\n\t    on(document, \"mouseover\", up);\n\t  }\n\n\t  function onKeyUp(e) {\n\t    if (e.keyCode == 16) { this.doc.sel.shift = false; }\n\t    signalDOMEvent(this, e);\n\t  }\n\n\t  function onKeyPress(e) {\n\t    var cm = this;\n\t    if (e.target && e.target != cm.display.input.getField()) { return }\n\t    if (eventInWidget(cm.display, e) || signalDOMEvent(cm, e) || e.ctrlKey && !e.altKey || mac && e.metaKey) { return }\n\t    var keyCode = e.keyCode, charCode = e.charCode;\n\t    if (presto && keyCode == lastStoppedKey) {lastStoppedKey = null; e_preventDefault(e); return}\n\t    if ((presto && (!e.which || e.which < 10)) && handleKeyBinding(cm, e)) { return }\n\t    var ch = String.fromCharCode(charCode == null ? keyCode : charCode);\n\t    // Some browsers fire keypress events for backspace\n\t    if (ch == \"\\x08\") { return }\n\t    if (handleCharBinding(cm, e, ch)) { return }\n\t    cm.display.input.onKeyPress(e);\n\t  }\n\n\t  var DOUBLECLICK_DELAY = 400;\n\n\t  var PastClick = function(time, pos, button) {\n\t    this.time = time;\n\t    this.pos = pos;\n\t    this.button = button;\n\t  };\n\n\t  PastClick.prototype.compare = function (time, pos, button) {\n\t    return this.time + DOUBLECLICK_DELAY > time &&\n\t      cmp(pos, this.pos) == 0 && button == this.button\n\t  };\n\n\t  var lastClick, lastDoubleClick;\n\t  function clickRepeat(pos, button) {\n\t    var now = +new Date;\n\t    if (lastDoubleClick && lastDoubleClick.compare(now, pos, button)) {\n\t      lastClick = lastDoubleClick = null;\n\t      return \"triple\"\n\t    } else if (lastClick && lastClick.compare(now, pos, button)) {\n\t      lastDoubleClick = new PastClick(now, pos, button);\n\t      lastClick = null;\n\t      return \"double\"\n\t    } else {\n\t      lastClick = new PastClick(now, pos, button);\n\t      lastDoubleClick = null;\n\t      return \"single\"\n\t    }\n\t  }\n\n\t  // A mouse down can be a single click, double click, triple click,\n\t  // start of selection drag, start of text drag, new cursor\n\t  // (ctrl-click), rectangle drag (alt-drag), or xwin\n\t  // middle-click-paste. Or it might be a click on something we should\n\t  // not interfere with, such as a scrollbar or widget.\n\t  function onMouseDown(e) {\n\t    var cm = this, display = cm.display;\n\t    if (signalDOMEvent(cm, e) || display.activeTouch && display.input.supportsTouch()) { return }\n\t    display.input.ensurePolled();\n\t    display.shift = e.shiftKey;\n\n\t    if (eventInWidget(display, e)) {\n\t      if (!webkit) {\n\t        // Briefly turn off draggability, to allow widgets to do\n\t        // normal dragging things.\n\t        display.scroller.draggable = false;\n\t        setTimeout(function () { return display.scroller.draggable = true; }, 100);\n\t      }\n\t      return\n\t    }\n\t    if (clickInGutter(cm, e)) { return }\n\t    var pos = posFromMouse(cm, e), button = e_button(e), repeat = pos ? clickRepeat(pos, button) : \"single\";\n\t    window.focus();\n\n\t    // #3261: make sure, that we're not starting a second selection\n\t    if (button == 1 && cm.state.selectingText)\n\t      { cm.state.selectingText(e); }\n\n\t    if (pos && handleMappedButton(cm, button, pos, repeat, e)) { return }\n\n\t    if (button == 1) {\n\t      if (pos) { leftButtonDown(cm, pos, repeat, e); }\n\t      else if (e_target(e) == display.scroller) { e_preventDefault(e); }\n\t    } else if (button == 2) {\n\t      if (pos) { extendSelection(cm.doc, pos); }\n\t      setTimeout(function () { return display.input.focus(); }, 20);\n\t    } else if (button == 3) {\n\t      if (captureRightClick) { cm.display.input.onContextMenu(e); }\n\t      else { delayBlurEvent(cm); }\n\t    }\n\t  }\n\n\t  function handleMappedButton(cm, button, pos, repeat, event) {\n\t    var name = \"Click\";\n\t    if (repeat == \"double\") { name = \"Double\" + name; }\n\t    else if (repeat == \"triple\") { name = \"Triple\" + name; }\n\t    name = (button == 1 ? \"Left\" : button == 2 ? \"Middle\" : \"Right\") + name;\n\n\t    return dispatchKey(cm,  addModifierNames(name, event), event, function (bound) {\n\t      if (typeof bound == \"string\") { bound = commands[bound]; }\n\t      if (!bound) { return false }\n\t      var done = false;\n\t      try {\n\t        if (cm.isReadOnly()) { cm.state.suppressEdits = true; }\n\t        done = bound(cm, pos) != Pass;\n\t      } finally {\n\t        cm.state.suppressEdits = false;\n\t      }\n\t      return done\n\t    })\n\t  }\n\n\t  function configureMouse(cm, repeat, event) {\n\t    var option = cm.getOption(\"configureMouse\");\n\t    var value = option ? option(cm, repeat, event) : {};\n\t    if (value.unit == null) {\n\t      var rect = chromeOS ? event.shiftKey && event.metaKey : event.altKey;\n\t      value.unit = rect ? \"rectangle\" : repeat == \"single\" ? \"char\" : repeat == \"double\" ? \"word\" : \"line\";\n\t    }\n\t    if (value.extend == null || cm.doc.extend) { value.extend = cm.doc.extend || event.shiftKey; }\n\t    if (value.addNew == null) { value.addNew = mac ? event.metaKey : event.ctrlKey; }\n\t    if (value.moveOnDrag == null) { value.moveOnDrag = !(mac ? event.altKey : event.ctrlKey); }\n\t    return value\n\t  }\n\n\t  function leftButtonDown(cm, pos, repeat, event) {\n\t    if (ie) { setTimeout(bind(ensureFocus, cm), 0); }\n\t    else { cm.curOp.focus = activeElt(); }\n\n\t    var behavior = configureMouse(cm, repeat, event);\n\n\t    var sel = cm.doc.sel, contained;\n\t    if (cm.options.dragDrop && dragAndDrop && !cm.isReadOnly() &&\n\t        repeat == \"single\" && (contained = sel.contains(pos)) > -1 &&\n\t        (cmp((contained = sel.ranges[contained]).from(), pos) < 0 || pos.xRel > 0) &&\n\t        (cmp(contained.to(), pos) > 0 || pos.xRel < 0))\n\t      { leftButtonStartDrag(cm, event, pos, behavior); }\n\t    else\n\t      { leftButtonSelect(cm, event, pos, behavior); }\n\t  }\n\n\t  // Start a text drag. When it ends, see if any dragging actually\n\t  // happen, and treat as a click if it didn't.\n\t  function leftButtonStartDrag(cm, event, pos, behavior) {\n\t    var display = cm.display, moved = false;\n\t    var dragEnd = operation(cm, function (e) {\n\t      if (webkit) { display.scroller.draggable = false; }\n\t      cm.state.draggingText = false;\n\t      off(display.wrapper.ownerDocument, \"mouseup\", dragEnd);\n\t      off(display.wrapper.ownerDocument, \"mousemove\", mouseMove);\n\t      off(display.scroller, \"dragstart\", dragStart);\n\t      off(display.scroller, \"drop\", dragEnd);\n\t      if (!moved) {\n\t        e_preventDefault(e);\n\t        if (!behavior.addNew)\n\t          { extendSelection(cm.doc, pos, null, null, behavior.extend); }\n\t        // Work around unexplainable focus problem in IE9 (#2127) and Chrome (#3081)\n\t        if ((webkit && !safari) || ie && ie_version == 9)\n\t          { setTimeout(function () {display.wrapper.ownerDocument.body.focus({preventScroll: true}); display.input.focus();}, 20); }\n\t        else\n\t          { display.input.focus(); }\n\t      }\n\t    });\n\t    var mouseMove = function(e2) {\n\t      moved = moved || Math.abs(event.clientX - e2.clientX) + Math.abs(event.clientY - e2.clientY) >= 10;\n\t    };\n\t    var dragStart = function () { return moved = true; };\n\t    // Let the drag handler handle this.\n\t    if (webkit) { display.scroller.draggable = true; }\n\t    cm.state.draggingText = dragEnd;\n\t    dragEnd.copy = !behavior.moveOnDrag;\n\t    // IE's approach to draggable\n\t    if (display.scroller.dragDrop) { display.scroller.dragDrop(); }\n\t    on(display.wrapper.ownerDocument, \"mouseup\", dragEnd);\n\t    on(display.wrapper.ownerDocument, \"mousemove\", mouseMove);\n\t    on(display.scroller, \"dragstart\", dragStart);\n\t    on(display.scroller, \"drop\", dragEnd);\n\n\t    delayBlurEvent(cm);\n\t    setTimeout(function () { return display.input.focus(); }, 20);\n\t  }\n\n\t  function rangeForUnit(cm, pos, unit) {\n\t    if (unit == \"char\") { return new Range(pos, pos) }\n\t    if (unit == \"word\") { return cm.findWordAt(pos) }\n\t    if (unit == \"line\") { return new Range(Pos(pos.line, 0), clipPos(cm.doc, Pos(pos.line + 1, 0))) }\n\t    var result = unit(cm, pos);\n\t    return new Range(result.from, result.to)\n\t  }\n\n\t  // Normal selection, as opposed to text dragging.\n\t  function leftButtonSelect(cm, event, start, behavior) {\n\t    var display = cm.display, doc = cm.doc;\n\t    e_preventDefault(event);\n\n\t    var ourRange, ourIndex, startSel = doc.sel, ranges = startSel.ranges;\n\t    if (behavior.addNew && !behavior.extend) {\n\t      ourIndex = doc.sel.contains(start);\n\t      if (ourIndex > -1)\n\t        { ourRange = ranges[ourIndex]; }\n\t      else\n\t        { ourRange = new Range(start, start); }\n\t    } else {\n\t      ourRange = doc.sel.primary();\n\t      ourIndex = doc.sel.primIndex;\n\t    }\n\n\t    if (behavior.unit == \"rectangle\") {\n\t      if (!behavior.addNew) { ourRange = new Range(start, start); }\n\t      start = posFromMouse(cm, event, true, true);\n\t      ourIndex = -1;\n\t    } else {\n\t      var range = rangeForUnit(cm, start, behavior.unit);\n\t      if (behavior.extend)\n\t        { ourRange = extendRange(ourRange, range.anchor, range.head, behavior.extend); }\n\t      else\n\t        { ourRange = range; }\n\t    }\n\n\t    if (!behavior.addNew) {\n\t      ourIndex = 0;\n\t      setSelection(doc, new Selection([ourRange], 0), sel_mouse);\n\t      startSel = doc.sel;\n\t    } else if (ourIndex == -1) {\n\t      ourIndex = ranges.length;\n\t      setSelection(doc, normalizeSelection(cm, ranges.concat([ourRange]), ourIndex),\n\t                   {scroll: false, origin: \"*mouse\"});\n\t    } else if (ranges.length > 1 && ranges[ourIndex].empty() && behavior.unit == \"char\" && !behavior.extend) {\n\t      setSelection(doc, normalizeSelection(cm, ranges.slice(0, ourIndex).concat(ranges.slice(ourIndex + 1)), 0),\n\t                   {scroll: false, origin: \"*mouse\"});\n\t      startSel = doc.sel;\n\t    } else {\n\t      replaceOneSelection(doc, ourIndex, ourRange, sel_mouse);\n\t    }\n\n\t    var lastPos = start;\n\t    function extendTo(pos) {\n\t      if (cmp(lastPos, pos) == 0) { return }\n\t      lastPos = pos;\n\n\t      if (behavior.unit == \"rectangle\") {\n\t        var ranges = [], tabSize = cm.options.tabSize;\n\t        var startCol = countColumn(getLine(doc, start.line).text, start.ch, tabSize);\n\t        var posCol = countColumn(getLine(doc, pos.line).text, pos.ch, tabSize);\n\t        var left = Math.min(startCol, posCol), right = Math.max(startCol, posCol);\n\t        for (var line = Math.min(start.line, pos.line), end = Math.min(cm.lastLine(), Math.max(start.line, pos.line));\n\t             line <= end; line++) {\n\t          var text = getLine(doc, line).text, leftPos = findColumn(text, left, tabSize);\n\t          if (left == right)\n\t            { ranges.push(new Range(Pos(line, leftPos), Pos(line, leftPos))); }\n\t          else if (text.length > leftPos)\n\t            { ranges.push(new Range(Pos(line, leftPos), Pos(line, findColumn(text, right, tabSize)))); }\n\t        }\n\t        if (!ranges.length) { ranges.push(new Range(start, start)); }\n\t        setSelection(doc, normalizeSelection(cm, startSel.ranges.slice(0, ourIndex).concat(ranges), ourIndex),\n\t                     {origin: \"*mouse\", scroll: false});\n\t        cm.scrollIntoView(pos);\n\t      } else {\n\t        var oldRange = ourRange;\n\t        var range = rangeForUnit(cm, pos, behavior.unit);\n\t        var anchor = oldRange.anchor, head;\n\t        if (cmp(range.anchor, anchor) > 0) {\n\t          head = range.head;\n\t          anchor = minPos(oldRange.from(), range.anchor);\n\t        } else {\n\t          head = range.anchor;\n\t          anchor = maxPos(oldRange.to(), range.head);\n\t        }\n\t        var ranges$1 = startSel.ranges.slice(0);\n\t        ranges$1[ourIndex] = bidiSimplify(cm, new Range(clipPos(doc, anchor), head));\n\t        setSelection(doc, normalizeSelection(cm, ranges$1, ourIndex), sel_mouse);\n\t      }\n\t    }\n\n\t    var editorSize = display.wrapper.getBoundingClientRect();\n\t    // Used to ensure timeout re-tries don't fire when another extend\n\t    // happened in the meantime (clearTimeout isn't reliable -- at\n\t    // least on Chrome, the timeouts still happen even when cleared,\n\t    // if the clear happens after their scheduled firing time).\n\t    var counter = 0;\n\n\t    function extend(e) {\n\t      var curCount = ++counter;\n\t      var cur = posFromMouse(cm, e, true, behavior.unit == \"rectangle\");\n\t      if (!cur) { return }\n\t      if (cmp(cur, lastPos) != 0) {\n\t        cm.curOp.focus = activeElt();\n\t        extendTo(cur);\n\t        var visible = visibleLines(display, doc);\n\t        if (cur.line >= visible.to || cur.line < visible.from)\n\t          { setTimeout(operation(cm, function () {if (counter == curCount) { extend(e); }}), 150); }\n\t      } else {\n\t        var outside = e.clientY < editorSize.top ? -20 : e.clientY > editorSize.bottom ? 20 : 0;\n\t        if (outside) { setTimeout(operation(cm, function () {\n\t          if (counter != curCount) { return }\n\t          display.scroller.scrollTop += outside;\n\t          extend(e);\n\t        }), 50); }\n\t      }\n\t    }\n\n\t    function done(e) {\n\t      cm.state.selectingText = false;\n\t      counter = Infinity;\n\t      // If e is null or undefined we interpret this as someone trying\n\t      // to explicitly cancel the selection rather than the user\n\t      // letting go of the mouse button.\n\t      if (e) {\n\t        e_preventDefault(e);\n\t        display.input.focus();\n\t      }\n\t      off(display.wrapper.ownerDocument, \"mousemove\", move);\n\t      off(display.wrapper.ownerDocument, \"mouseup\", up);\n\t      doc.history.lastSelOrigin = null;\n\t    }\n\n\t    var move = operation(cm, function (e) {\n\t      if (e.buttons === 0 || !e_button(e)) { done(e); }\n\t      else { extend(e); }\n\t    });\n\t    var up = operation(cm, done);\n\t    cm.state.selectingText = up;\n\t    on(display.wrapper.ownerDocument, \"mousemove\", move);\n\t    on(display.wrapper.ownerDocument, \"mouseup\", up);\n\t  }\n\n\t  // Used when mouse-selecting to adjust the anchor to the proper side\n\t  // of a bidi jump depending on the visual position of the head.\n\t  function bidiSimplify(cm, range) {\n\t    var anchor = range.anchor;\n\t    var head = range.head;\n\t    var anchorLine = getLine(cm.doc, anchor.line);\n\t    if (cmp(anchor, head) == 0 && anchor.sticky == head.sticky) { return range }\n\t    var order = getOrder(anchorLine);\n\t    if (!order) { return range }\n\t    var index = getBidiPartAt(order, anchor.ch, anchor.sticky), part = order[index];\n\t    if (part.from != anchor.ch && part.to != anchor.ch) { return range }\n\t    var boundary = index + ((part.from == anchor.ch) == (part.level != 1) ? 0 : 1);\n\t    if (boundary == 0 || boundary == order.length) { return range }\n\n\t    // Compute the relative visual position of the head compared to the\n\t    // anchor (<0 is to the left, >0 to the right)\n\t    var leftSide;\n\t    if (head.line != anchor.line) {\n\t      leftSide = (head.line - anchor.line) * (cm.doc.direction == \"ltr\" ? 1 : -1) > 0;\n\t    } else {\n\t      var headIndex = getBidiPartAt(order, head.ch, head.sticky);\n\t      var dir = headIndex - index || (head.ch - anchor.ch) * (part.level == 1 ? -1 : 1);\n\t      if (headIndex == boundary - 1 || headIndex == boundary)\n\t        { leftSide = dir < 0; }\n\t      else\n\t        { leftSide = dir > 0; }\n\t    }\n\n\t    var usePart = order[boundary + (leftSide ? -1 : 0)];\n\t    var from = leftSide == (usePart.level == 1);\n\t    var ch = from ? usePart.from : usePart.to, sticky = from ? \"after\" : \"before\";\n\t    return anchor.ch == ch && anchor.sticky == sticky ? range : new Range(new Pos(anchor.line, ch, sticky), head)\n\t  }\n\n\n\t  // Determines whether an event happened in the gutter, and fires the\n\t  // handlers for the corresponding event.\n\t  function gutterEvent(cm, e, type, prevent) {\n\t    var mX, mY;\n\t    if (e.touches) {\n\t      mX = e.touches[0].clientX;\n\t      mY = e.touches[0].clientY;\n\t    } else {\n\t      try { mX = e.clientX; mY = e.clientY; }\n\t      catch(e$1) { return false }\n\t    }\n\t    if (mX >= Math.floor(cm.display.gutters.getBoundingClientRect().right)) { return false }\n\t    if (prevent) { e_preventDefault(e); }\n\n\t    var display = cm.display;\n\t    var lineBox = display.lineDiv.getBoundingClientRect();\n\n\t    if (mY > lineBox.bottom || !hasHandler(cm, type)) { return e_defaultPrevented(e) }\n\t    mY -= lineBox.top - display.viewOffset;\n\n\t    for (var i = 0; i < cm.display.gutterSpecs.length; ++i) {\n\t      var g = display.gutters.childNodes[i];\n\t      if (g && g.getBoundingClientRect().right >= mX) {\n\t        var line = lineAtHeight(cm.doc, mY);\n\t        var gutter = cm.display.gutterSpecs[i];\n\t        signal(cm, type, cm, line, gutter.className, e);\n\t        return e_defaultPrevented(e)\n\t      }\n\t    }\n\t  }\n\n\t  function clickInGutter(cm, e) {\n\t    return gutterEvent(cm, e, \"gutterClick\", true)\n\t  }\n\n\t  // CONTEXT MENU HANDLING\n\n\t  // To make the context menu work, we need to briefly unhide the\n\t  // textarea (making it as unobtrusive as possible) to let the\n\t  // right-click take effect on it.\n\t  function onContextMenu(cm, e) {\n\t    if (eventInWidget(cm.display, e) || contextMenuInGutter(cm, e)) { return }\n\t    if (signalDOMEvent(cm, e, \"contextmenu\")) { return }\n\t    if (!captureRightClick) { cm.display.input.onContextMenu(e); }\n\t  }\n\n\t  function contextMenuInGutter(cm, e) {\n\t    if (!hasHandler(cm, \"gutterContextMenu\")) { return false }\n\t    return gutterEvent(cm, e, \"gutterContextMenu\", false)\n\t  }\n\n\t  function themeChanged(cm) {\n\t    cm.display.wrapper.className = cm.display.wrapper.className.replace(/\\s*cm-s-\\S+/g, \"\") +\n\t      cm.options.theme.replace(/(^|\\s)\\s*/g, \" cm-s-\");\n\t    clearCaches(cm);\n\t  }\n\n\t  var Init = {toString: function(){return \"CodeMirror.Init\"}};\n\n\t  var defaults = {};\n\t  var optionHandlers = {};\n\n\t  function defineOptions(CodeMirror) {\n\t    var optionHandlers = CodeMirror.optionHandlers;\n\n\t    function option(name, deflt, handle, notOnInit) {\n\t      CodeMirror.defaults[name] = deflt;\n\t      if (handle) { optionHandlers[name] =\n\t        notOnInit ? function (cm, val, old) {if (old != Init) { handle(cm, val, old); }} : handle; }\n\t    }\n\n\t    CodeMirror.defineOption = option;\n\n\t    // Passed to option handlers when there is no old value.\n\t    CodeMirror.Init = Init;\n\n\t    // These two are, on init, called from the constructor because they\n\t    // have to be initialized before the editor can start at all.\n\t    option(\"value\", \"\", function (cm, val) { return cm.setValue(val); }, true);\n\t    option(\"mode\", null, function (cm, val) {\n\t      cm.doc.modeOption = val;\n\t      loadMode(cm);\n\t    }, true);\n\n\t    option(\"indentUnit\", 2, loadMode, true);\n\t    option(\"indentWithTabs\", false);\n\t    option(\"smartIndent\", true);\n\t    option(\"tabSize\", 4, function (cm) {\n\t      resetModeState(cm);\n\t      clearCaches(cm);\n\t      regChange(cm);\n\t    }, true);\n\n\t    option(\"lineSeparator\", null, function (cm, val) {\n\t      cm.doc.lineSep = val;\n\t      if (!val) { return }\n\t      var newBreaks = [], lineNo = cm.doc.first;\n\t      cm.doc.iter(function (line) {\n\t        for (var pos = 0;;) {\n\t          var found = line.text.indexOf(val, pos);\n\t          if (found == -1) { break }\n\t          pos = found + val.length;\n\t          newBreaks.push(Pos(lineNo, found));\n\t        }\n\t        lineNo++;\n\t      });\n\t      for (var i = newBreaks.length - 1; i >= 0; i--)\n\t        { replaceRange(cm.doc, val, newBreaks[i], Pos(newBreaks[i].line, newBreaks[i].ch + val.length)); }\n\t    });\n\t    option(\"specialChars\", /[\\u0000-\\u001f\\u007f-\\u009f\\u00ad\\u061c\\u200b-\\u200c\\u200e\\u200f\\u2028\\u2029\\ufeff\\ufff9-\\ufffc]/g, function (cm, val, old) {\n\t      cm.state.specialChars = new RegExp(val.source + (val.test(\"\\t\") ? \"\" : \"|\\t\"), \"g\");\n\t      if (old != Init) { cm.refresh(); }\n\t    });\n\t    option(\"specialCharPlaceholder\", defaultSpecialCharPlaceholder, function (cm) { return cm.refresh(); }, true);\n\t    option(\"electricChars\", true);\n\t    option(\"inputStyle\", mobile ? \"contenteditable\" : \"textarea\", function () {\n\t      throw new Error(\"inputStyle can not (yet) be changed in a running editor\") // FIXME\n\t    }, true);\n\t    option(\"spellcheck\", false, function (cm, val) { return cm.getInputField().spellcheck = val; }, true);\n\t    option(\"autocorrect\", false, function (cm, val) { return cm.getInputField().autocorrect = val; }, true);\n\t    option(\"autocapitalize\", false, function (cm, val) { return cm.getInputField().autocapitalize = val; }, true);\n\t    option(\"rtlMoveVisually\", !windows);\n\t    option(\"wholeLineUpdateBefore\", true);\n\n\t    option(\"theme\", \"default\", function (cm) {\n\t      themeChanged(cm);\n\t      updateGutters(cm);\n\t    }, true);\n\t    option(\"keyMap\", \"default\", function (cm, val, old) {\n\t      var next = getKeyMap(val);\n\t      var prev = old != Init && getKeyMap(old);\n\t      if (prev && prev.detach) { prev.detach(cm, next); }\n\t      if (next.attach) { next.attach(cm, prev || null); }\n\t    });\n\t    option(\"extraKeys\", null);\n\t    option(\"configureMouse\", null);\n\n\t    option(\"lineWrapping\", false, wrappingChanged, true);\n\t    option(\"gutters\", [], function (cm, val) {\n\t      cm.display.gutterSpecs = getGutters(val, cm.options.lineNumbers);\n\t      updateGutters(cm);\n\t    }, true);\n\t    option(\"fixedGutter\", true, function (cm, val) {\n\t      cm.display.gutters.style.left = val ? compensateForHScroll(cm.display) + \"px\" : \"0\";\n\t      cm.refresh();\n\t    }, true);\n\t    option(\"coverGutterNextToScrollbar\", false, function (cm) { return updateScrollbars(cm); }, true);\n\t    option(\"scrollbarStyle\", \"native\", function (cm) {\n\t      initScrollbars(cm);\n\t      updateScrollbars(cm);\n\t      cm.display.scrollbars.setScrollTop(cm.doc.scrollTop);\n\t      cm.display.scrollbars.setScrollLeft(cm.doc.scrollLeft);\n\t    }, true);\n\t    option(\"lineNumbers\", false, function (cm, val) {\n\t      cm.display.gutterSpecs = getGutters(cm.options.gutters, val);\n\t      updateGutters(cm);\n\t    }, true);\n\t    option(\"firstLineNumber\", 1, updateGutters, true);\n\t    option(\"lineNumberFormatter\", function (integer) { return integer; }, updateGutters, true);\n\t    option(\"showCursorWhenSelecting\", false, updateSelection, true);\n\n\t    option(\"resetSelectionOnContextMenu\", true);\n\t    option(\"lineWiseCopyCut\", true);\n\t    option(\"pasteLinesPerSelection\", true);\n\t    option(\"selectionsMayTouch\", false);\n\n\t    option(\"readOnly\", false, function (cm, val) {\n\t      if (val == \"nocursor\") {\n\t        onBlur(cm);\n\t        cm.display.input.blur();\n\t      }\n\t      cm.display.input.readOnlyChanged(val);\n\t    });\n\n\t    option(\"screenReaderLabel\", null, function (cm, val) {\n\t      val = (val === '') ? null : val;\n\t      cm.display.input.screenReaderLabelChanged(val);\n\t    });\n\n\t    option(\"disableInput\", false, function (cm, val) {if (!val) { cm.display.input.reset(); }}, true);\n\t    option(\"dragDrop\", true, dragDropChanged);\n\t    option(\"allowDropFileTypes\", null);\n\n\t    option(\"cursorBlinkRate\", 530);\n\t    option(\"cursorScrollMargin\", 0);\n\t    option(\"cursorHeight\", 1, updateSelection, true);\n\t    option(\"singleCursorHeightPerLine\", true, updateSelection, true);\n\t    option(\"workTime\", 100);\n\t    option(\"workDelay\", 100);\n\t    option(\"flattenSpans\", true, resetModeState, true);\n\t    option(\"addModeClass\", false, resetModeState, true);\n\t    option(\"pollInterval\", 100);\n\t    option(\"undoDepth\", 200, function (cm, val) { return cm.doc.history.undoDepth = val; });\n\t    option(\"historyEventDelay\", 1250);\n\t    option(\"viewportMargin\", 10, function (cm) { return cm.refresh(); }, true);\n\t    option(\"maxHighlightLength\", 10000, resetModeState, true);\n\t    option(\"moveInputWithCursor\", true, function (cm, val) {\n\t      if (!val) { cm.display.input.resetPosition(); }\n\t    });\n\n\t    option(\"tabindex\", null, function (cm, val) { return cm.display.input.getField().tabIndex = val || \"\"; });\n\t    option(\"autofocus\", null);\n\t    option(\"direction\", \"ltr\", function (cm, val) { return cm.doc.setDirection(val); }, true);\n\t    option(\"phrases\", null);\n\t  }\n\n\t  function dragDropChanged(cm, value, old) {\n\t    var wasOn = old && old != Init;\n\t    if (!value != !wasOn) {\n\t      var funcs = cm.display.dragFunctions;\n\t      var toggle = value ? on : off;\n\t      toggle(cm.display.scroller, \"dragstart\", funcs.start);\n\t      toggle(cm.display.scroller, \"dragenter\", funcs.enter);\n\t      toggle(cm.display.scroller, \"dragover\", funcs.over);\n\t      toggle(cm.display.scroller, \"dragleave\", funcs.leave);\n\t      toggle(cm.display.scroller, \"drop\", funcs.drop);\n\t    }\n\t  }\n\n\t  function wrappingChanged(cm) {\n\t    if (cm.options.lineWrapping) {\n\t      addClass(cm.display.wrapper, \"CodeMirror-wrap\");\n\t      cm.display.sizer.style.minWidth = \"\";\n\t      cm.display.sizerWidth = null;\n\t    } else {\n\t      rmClass(cm.display.wrapper, \"CodeMirror-wrap\");\n\t      findMaxLine(cm);\n\t    }\n\t    estimateLineHeights(cm);\n\t    regChange(cm);\n\t    clearCaches(cm);\n\t    setTimeout(function () { return updateScrollbars(cm); }, 100);\n\t  }\n\n\t  // A CodeMirror instance represents an editor. This is the object\n\t  // that user code is usually dealing with.\n\n\t  function CodeMirror(place, options) {\n\t    var this$1 = this;\n\n\t    if (!(this instanceof CodeMirror)) { return new CodeMirror(place, options) }\n\n\t    this.options = options = options ? copyObj(options) : {};\n\t    // Determine effective options based on given values and defaults.\n\t    copyObj(defaults, options, false);\n\n\t    var doc = options.value;\n\t    if (typeof doc == \"string\") { doc = new Doc(doc, options.mode, null, options.lineSeparator, options.direction); }\n\t    else if (options.mode) { doc.modeOption = options.mode; }\n\t    this.doc = doc;\n\n\t    var input = new CodeMirror.inputStyles[options.inputStyle](this);\n\t    var display = this.display = new Display(place, doc, input, options);\n\t    display.wrapper.CodeMirror = this;\n\t    themeChanged(this);\n\t    if (options.lineWrapping)\n\t      { this.display.wrapper.className += \" CodeMirror-wrap\"; }\n\t    initScrollbars(this);\n\n\t    this.state = {\n\t      keyMaps: [],  // stores maps added by addKeyMap\n\t      overlays: [], // highlighting overlays, as added by addOverlay\n\t      modeGen: 0,   // bumped when mode/overlay changes, used to invalidate highlighting info\n\t      overwrite: false,\n\t      delayingBlurEvent: false,\n\t      focused: false,\n\t      suppressEdits: false, // used to disable editing during key handlers when in readOnly mode\n\t      pasteIncoming: -1, cutIncoming: -1, // help recognize paste/cut edits in input.poll\n\t      selectingText: false,\n\t      draggingText: false,\n\t      highlight: new Delayed(), // stores highlight worker timeout\n\t      keySeq: null,  // Unfinished key sequence\n\t      specialChars: null\n\t    };\n\n\t    if (options.autofocus && !mobile) { display.input.focus(); }\n\n\t    // Override magic textarea content restore that IE sometimes does\n\t    // on our hidden textarea on reload\n\t    if (ie && ie_version < 11) { setTimeout(function () { return this$1.display.input.reset(true); }, 20); }\n\n\t    registerEventHandlers(this);\n\t    ensureGlobalHandlers();\n\n\t    startOperation(this);\n\t    this.curOp.forceUpdate = true;\n\t    attachDoc(this, doc);\n\n\t    if ((options.autofocus && !mobile) || this.hasFocus())\n\t      { setTimeout(function () {\n\t        if (this$1.hasFocus() && !this$1.state.focused) { onFocus(this$1); }\n\t      }, 20); }\n\t    else\n\t      { onBlur(this); }\n\n\t    for (var opt in optionHandlers) { if (optionHandlers.hasOwnProperty(opt))\n\t      { optionHandlers[opt](this, options[opt], Init); } }\n\t    maybeUpdateLineNumberWidth(this);\n\t    if (options.finishInit) { options.finishInit(this); }\n\t    for (var i = 0; i < initHooks.length; ++i) { initHooks[i](this); }\n\t    endOperation(this);\n\t    // Suppress optimizelegibility in Webkit, since it breaks text\n\t    // measuring on line wrapping boundaries.\n\t    if (webkit && options.lineWrapping &&\n\t        getComputedStyle(display.lineDiv).textRendering == \"optimizelegibility\")\n\t      { display.lineDiv.style.textRendering = \"auto\"; }\n\t  }\n\n\t  // The default configuration options.\n\t  CodeMirror.defaults = defaults;\n\t  // Functions to run when options are changed.\n\t  CodeMirror.optionHandlers = optionHandlers;\n\n\t  // Attach the necessary event handlers when initializing the editor\n\t  function registerEventHandlers(cm) {\n\t    var d = cm.display;\n\t    on(d.scroller, \"mousedown\", operation(cm, onMouseDown));\n\t    // Older IE's will not fire a second mousedown for a double click\n\t    if (ie && ie_version < 11)\n\t      { on(d.scroller, \"dblclick\", operation(cm, function (e) {\n\t        if (signalDOMEvent(cm, e)) { return }\n\t        var pos = posFromMouse(cm, e);\n\t        if (!pos || clickInGutter(cm, e) || eventInWidget(cm.display, e)) { return }\n\t        e_preventDefault(e);\n\t        var word = cm.findWordAt(pos);\n\t        extendSelection(cm.doc, word.anchor, word.head);\n\t      })); }\n\t    else\n\t      { on(d.scroller, \"dblclick\", function (e) { return signalDOMEvent(cm, e) || e_preventDefault(e); }); }\n\t    // Some browsers fire contextmenu *after* opening the menu, at\n\t    // which point we can't mess with it anymore. Context menu is\n\t    // handled in onMouseDown for these browsers.\n\t    on(d.scroller, \"contextmenu\", function (e) { return onContextMenu(cm, e); });\n\t    on(d.input.getField(), \"contextmenu\", function (e) {\n\t      if (!d.scroller.contains(e.target)) { onContextMenu(cm, e); }\n\t    });\n\n\t    // Used to suppress mouse event handling when a touch happens\n\t    var touchFinished, prevTouch = {end: 0};\n\t    function finishTouch() {\n\t      if (d.activeTouch) {\n\t        touchFinished = setTimeout(function () { return d.activeTouch = null; }, 1000);\n\t        prevTouch = d.activeTouch;\n\t        prevTouch.end = +new Date;\n\t      }\n\t    }\n\t    function isMouseLikeTouchEvent(e) {\n\t      if (e.touches.length != 1) { return false }\n\t      var touch = e.touches[0];\n\t      return touch.radiusX <= 1 && touch.radiusY <= 1\n\t    }\n\t    function farAway(touch, other) {\n\t      if (other.left == null) { return true }\n\t      var dx = other.left - touch.left, dy = other.top - touch.top;\n\t      return dx * dx + dy * dy > 20 * 20\n\t    }\n\t    on(d.scroller, \"touchstart\", function (e) {\n\t      if (!signalDOMEvent(cm, e) && !isMouseLikeTouchEvent(e) && !clickInGutter(cm, e)) {\n\t        d.input.ensurePolled();\n\t        clearTimeout(touchFinished);\n\t        var now = +new Date;\n\t        d.activeTouch = {start: now, moved: false,\n\t                         prev: now - prevTouch.end <= 300 ? prevTouch : null};\n\t        if (e.touches.length == 1) {\n\t          d.activeTouch.left = e.touches[0].pageX;\n\t          d.activeTouch.top = e.touches[0].pageY;\n\t        }\n\t      }\n\t    });\n\t    on(d.scroller, \"touchmove\", function () {\n\t      if (d.activeTouch) { d.activeTouch.moved = true; }\n\t    });\n\t    on(d.scroller, \"touchend\", function (e) {\n\t      var touch = d.activeTouch;\n\t      if (touch && !eventInWidget(d, e) && touch.left != null &&\n\t          !touch.moved && new Date - touch.start < 300) {\n\t        var pos = cm.coordsChar(d.activeTouch, \"page\"), range;\n\t        if (!touch.prev || farAway(touch, touch.prev)) // Single tap\n\t          { range = new Range(pos, pos); }\n\t        else if (!touch.prev.prev || farAway(touch, touch.prev.prev)) // Double tap\n\t          { range = cm.findWordAt(pos); }\n\t        else // Triple tap\n\t          { range = new Range(Pos(pos.line, 0), clipPos(cm.doc, Pos(pos.line + 1, 0))); }\n\t        cm.setSelection(range.anchor, range.head);\n\t        cm.focus();\n\t        e_preventDefault(e);\n\t      }\n\t      finishTouch();\n\t    });\n\t    on(d.scroller, \"touchcancel\", finishTouch);\n\n\t    // Sync scrolling between fake scrollbars and real scrollable\n\t    // area, ensure viewport is updated when scrolling.\n\t    on(d.scroller, \"scroll\", function () {\n\t      if (d.scroller.clientHeight) {\n\t        updateScrollTop(cm, d.scroller.scrollTop);\n\t        setScrollLeft(cm, d.scroller.scrollLeft, true);\n\t        signal(cm, \"scroll\", cm);\n\t      }\n\t    });\n\n\t    // Listen to wheel events in order to try and update the viewport on time.\n\t    on(d.scroller, \"mousewheel\", function (e) { return onScrollWheel(cm, e); });\n\t    on(d.scroller, \"DOMMouseScroll\", function (e) { return onScrollWheel(cm, e); });\n\n\t    // Prevent wrapper from ever scrolling\n\t    on(d.wrapper, \"scroll\", function () { return d.wrapper.scrollTop = d.wrapper.scrollLeft = 0; });\n\n\t    d.dragFunctions = {\n\t      enter: function (e) {if (!signalDOMEvent(cm, e)) { e_stop(e); }},\n\t      over: function (e) {if (!signalDOMEvent(cm, e)) { onDragOver(cm, e); e_stop(e); }},\n\t      start: function (e) { return onDragStart(cm, e); },\n\t      drop: operation(cm, onDrop),\n\t      leave: function (e) {if (!signalDOMEvent(cm, e)) { clearDragCursor(cm); }}\n\t    };\n\n\t    var inp = d.input.getField();\n\t    on(inp, \"keyup\", function (e) { return onKeyUp.call(cm, e); });\n\t    on(inp, \"keydown\", operation(cm, onKeyDown));\n\t    on(inp, \"keypress\", operation(cm, onKeyPress));\n\t    on(inp, \"focus\", function (e) { return onFocus(cm, e); });\n\t    on(inp, \"blur\", function (e) { return onBlur(cm, e); });\n\t  }\n\n\t  var initHooks = [];\n\t  CodeMirror.defineInitHook = function (f) { return initHooks.push(f); };\n\n\t  // Indent the given line. The how parameter can be \"smart\",\n\t  // \"add\"/null, \"subtract\", or \"prev\". When aggressive is false\n\t  // (typically set to true for forced single-line indents), empty\n\t  // lines are not indented, and places where the mode returns Pass\n\t  // are left alone.\n\t  function indentLine(cm, n, how, aggressive) {\n\t    var doc = cm.doc, state;\n\t    if (how == null) { how = \"add\"; }\n\t    if (how == \"smart\") {\n\t      // Fall back to \"prev\" when the mode doesn't have an indentation\n\t      // method.\n\t      if (!doc.mode.indent) { how = \"prev\"; }\n\t      else { state = getContextBefore(cm, n).state; }\n\t    }\n\n\t    var tabSize = cm.options.tabSize;\n\t    var line = getLine(doc, n), curSpace = countColumn(line.text, null, tabSize);\n\t    if (line.stateAfter) { line.stateAfter = null; }\n\t    var curSpaceString = line.text.match(/^\\s*/)[0], indentation;\n\t    if (!aggressive && !/\\S/.test(line.text)) {\n\t      indentation = 0;\n\t      how = \"not\";\n\t    } else if (how == \"smart\") {\n\t      indentation = doc.mode.indent(state, line.text.slice(curSpaceString.length), line.text);\n\t      if (indentation == Pass || indentation > 150) {\n\t        if (!aggressive) { return }\n\t        how = \"prev\";\n\t      }\n\t    }\n\t    if (how == \"prev\") {\n\t      if (n > doc.first) { indentation = countColumn(getLine(doc, n-1).text, null, tabSize); }\n\t      else { indentation = 0; }\n\t    } else if (how == \"add\") {\n\t      indentation = curSpace + cm.options.indentUnit;\n\t    } else if (how == \"subtract\") {\n\t      indentation = curSpace - cm.options.indentUnit;\n\t    } else if (typeof how == \"number\") {\n\t      indentation = curSpace + how;\n\t    }\n\t    indentation = Math.max(0, indentation);\n\n\t    var indentString = \"\", pos = 0;\n\t    if (cm.options.indentWithTabs)\n\t      { for (var i = Math.floor(indentation / tabSize); i; --i) {pos += tabSize; indentString += \"\\t\";} }\n\t    if (pos < indentation) { indentString += spaceStr(indentation - pos); }\n\n\t    if (indentString != curSpaceString) {\n\t      replaceRange(doc, indentString, Pos(n, 0), Pos(n, curSpaceString.length), \"+input\");\n\t      line.stateAfter = null;\n\t      return true\n\t    } else {\n\t      // Ensure that, if the cursor was in the whitespace at the start\n\t      // of the line, it is moved to the end of that space.\n\t      for (var i$1 = 0; i$1 < doc.sel.ranges.length; i$1++) {\n\t        var range = doc.sel.ranges[i$1];\n\t        if (range.head.line == n && range.head.ch < curSpaceString.length) {\n\t          var pos$1 = Pos(n, curSpaceString.length);\n\t          replaceOneSelection(doc, i$1, new Range(pos$1, pos$1));\n\t          break\n\t        }\n\t      }\n\t    }\n\t  }\n\n\t  // This will be set to a {lineWise: bool, text: [string]} object, so\n\t  // that, when pasting, we know what kind of selections the copied\n\t  // text was made out of.\n\t  var lastCopied = null;\n\n\t  function setLastCopied(newLastCopied) {\n\t    lastCopied = newLastCopied;\n\t  }\n\n\t  function applyTextInput(cm, inserted, deleted, sel, origin) {\n\t    var doc = cm.doc;\n\t    cm.display.shift = false;\n\t    if (!sel) { sel = doc.sel; }\n\n\t    var recent = +new Date - 200;\n\t    var paste = origin == \"paste\" || cm.state.pasteIncoming > recent;\n\t    var textLines = splitLinesAuto(inserted), multiPaste = null;\n\t    // When pasting N lines into N selections, insert one line per selection\n\t    if (paste && sel.ranges.length > 1) {\n\t      if (lastCopied && lastCopied.text.join(\"\\n\") == inserted) {\n\t        if (sel.ranges.length % lastCopied.text.length == 0) {\n\t          multiPaste = [];\n\t          for (var i = 0; i < lastCopied.text.length; i++)\n\t            { multiPaste.push(doc.splitLines(lastCopied.text[i])); }\n\t        }\n\t      } else if (textLines.length == sel.ranges.length && cm.options.pasteLinesPerSelection) {\n\t        multiPaste = map(textLines, function (l) { return [l]; });\n\t      }\n\t    }\n\n\t    var updateInput = cm.curOp.updateInput;\n\t    // Normal behavior is to insert the new text into every selection\n\t    for (var i$1 = sel.ranges.length - 1; i$1 >= 0; i$1--) {\n\t      var range = sel.ranges[i$1];\n\t      var from = range.from(), to = range.to();\n\t      if (range.empty()) {\n\t        if (deleted && deleted > 0) // Handle deletion\n\t          { from = Pos(from.line, from.ch - deleted); }\n\t        else if (cm.state.overwrite && !paste) // Handle overwrite\n\t          { to = Pos(to.line, Math.min(getLine(doc, to.line).text.length, to.ch + lst(textLines).length)); }\n\t        else if (paste && lastCopied && lastCopied.lineWise && lastCopied.text.join(\"\\n\") == textLines.join(\"\\n\"))\n\t          { from = to = Pos(from.line, 0); }\n\t      }\n\t      var changeEvent = {from: from, to: to, text: multiPaste ? multiPaste[i$1 % multiPaste.length] : textLines,\n\t                         origin: origin || (paste ? \"paste\" : cm.state.cutIncoming > recent ? \"cut\" : \"+input\")};\n\t      makeChange(cm.doc, changeEvent);\n\t      signalLater(cm, \"inputRead\", cm, changeEvent);\n\t    }\n\t    if (inserted && !paste)\n\t      { triggerElectric(cm, inserted); }\n\n\t    ensureCursorVisible(cm);\n\t    if (cm.curOp.updateInput < 2) { cm.curOp.updateInput = updateInput; }\n\t    cm.curOp.typing = true;\n\t    cm.state.pasteIncoming = cm.state.cutIncoming = -1;\n\t  }\n\n\t  function handlePaste(e, cm) {\n\t    var pasted = e.clipboardData && e.clipboardData.getData(\"Text\");\n\t    if (pasted) {\n\t      e.preventDefault();\n\t      if (!cm.isReadOnly() && !cm.options.disableInput)\n\t        { runInOp(cm, function () { return applyTextInput(cm, pasted, 0, null, \"paste\"); }); }\n\t      return true\n\t    }\n\t  }\n\n\t  function triggerElectric(cm, inserted) {\n\t    // When an 'electric' character is inserted, immediately trigger a reindent\n\t    if (!cm.options.electricChars || !cm.options.smartIndent) { return }\n\t    var sel = cm.doc.sel;\n\n\t    for (var i = sel.ranges.length - 1; i >= 0; i--) {\n\t      var range = sel.ranges[i];\n\t      if (range.head.ch > 100 || (i && sel.ranges[i - 1].head.line == range.head.line)) { continue }\n\t      var mode = cm.getModeAt(range.head);\n\t      var indented = false;\n\t      if (mode.electricChars) {\n\t        for (var j = 0; j < mode.electricChars.length; j++)\n\t          { if (inserted.indexOf(mode.electricChars.charAt(j)) > -1) {\n\t            indented = indentLine(cm, range.head.line, \"smart\");\n\t            break\n\t          } }\n\t      } else if (mode.electricInput) {\n\t        if (mode.electricInput.test(getLine(cm.doc, range.head.line).text.slice(0, range.head.ch)))\n\t          { indented = indentLine(cm, range.head.line, \"smart\"); }\n\t      }\n\t      if (indented) { signalLater(cm, \"electricInput\", cm, range.head.line); }\n\t    }\n\t  }\n\n\t  function copyableRanges(cm) {\n\t    var text = [], ranges = [];\n\t    for (var i = 0; i < cm.doc.sel.ranges.length; i++) {\n\t      var line = cm.doc.sel.ranges[i].head.line;\n\t      var lineRange = {anchor: Pos(line, 0), head: Pos(line + 1, 0)};\n\t      ranges.push(lineRange);\n\t      text.push(cm.getRange(lineRange.anchor, lineRange.head));\n\t    }\n\t    return {text: text, ranges: ranges}\n\t  }\n\n\t  function disableBrowserMagic(field, spellcheck, autocorrect, autocapitalize) {\n\t    field.setAttribute(\"autocorrect\", autocorrect ? \"\" : \"off\");\n\t    field.setAttribute(\"autocapitalize\", autocapitalize ? \"\" : \"off\");\n\t    field.setAttribute(\"spellcheck\", !!spellcheck);\n\t  }\n\n\t  function hiddenTextarea() {\n\t    var te = elt(\"textarea\", null, null, \"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none\");\n\t    var div = elt(\"div\", [te], null, \"overflow: hidden; position: relative; width: 3px; height: 0px;\");\n\t    // The textarea is kept positioned near the cursor to prevent the\n\t    // fact that it'll be scrolled into view on input from scrolling\n\t    // our fake cursor out of view. On webkit, when wrap=off, paste is\n\t    // very slow. So make the area wide instead.\n\t    if (webkit) { te.style.width = \"1000px\"; }\n\t    else { te.setAttribute(\"wrap\", \"off\"); }\n\t    // If border: 0; -- iOS fails to open keyboard (issue #1287)\n\t    if (ios) { te.style.border = \"1px solid black\"; }\n\t    disableBrowserMagic(te);\n\t    return div\n\t  }\n\n\t  // The publicly visible API. Note that methodOp(f) means\n\t  // 'wrap f in an operation, performed on its `this` parameter'.\n\n\t  // This is not the complete set of editor methods. Most of the\n\t  // methods defined on the Doc type are also injected into\n\t  // CodeMirror.prototype, for backwards compatibility and\n\t  // convenience.\n\n\t  function addEditorMethods(CodeMirror) {\n\t    var optionHandlers = CodeMirror.optionHandlers;\n\n\t    var helpers = CodeMirror.helpers = {};\n\n\t    CodeMirror.prototype = {\n\t      constructor: CodeMirror,\n\t      focus: function(){window.focus(); this.display.input.focus();},\n\n\t      setOption: function(option, value) {\n\t        var options = this.options, old = options[option];\n\t        if (options[option] == value && option != \"mode\") { return }\n\t        options[option] = value;\n\t        if (optionHandlers.hasOwnProperty(option))\n\t          { operation(this, optionHandlers[option])(this, value, old); }\n\t        signal(this, \"optionChange\", this, option);\n\t      },\n\n\t      getOption: function(option) {return this.options[option]},\n\t      getDoc: function() {return this.doc},\n\n\t      addKeyMap: function(map, bottom) {\n\t        this.state.keyMaps[bottom ? \"push\" : \"unshift\"](getKeyMap(map));\n\t      },\n\t      removeKeyMap: function(map) {\n\t        var maps = this.state.keyMaps;\n\t        for (var i = 0; i < maps.length; ++i)\n\t          { if (maps[i] == map || maps[i].name == map) {\n\t            maps.splice(i, 1);\n\t            return true\n\t          } }\n\t      },\n\n\t      addOverlay: methodOp(function(spec, options) {\n\t        var mode = spec.token ? spec : CodeMirror.getMode(this.options, spec);\n\t        if (mode.startState) { throw new Error(\"Overlays may not be stateful.\") }\n\t        insertSorted(this.state.overlays,\n\t                     {mode: mode, modeSpec: spec, opaque: options && options.opaque,\n\t                      priority: (options && options.priority) || 0},\n\t                     function (overlay) { return overlay.priority; });\n\t        this.state.modeGen++;\n\t        regChange(this);\n\t      }),\n\t      removeOverlay: methodOp(function(spec) {\n\t        var overlays = this.state.overlays;\n\t        for (var i = 0; i < overlays.length; ++i) {\n\t          var cur = overlays[i].modeSpec;\n\t          if (cur == spec || typeof spec == \"string\" && cur.name == spec) {\n\t            overlays.splice(i, 1);\n\t            this.state.modeGen++;\n\t            regChange(this);\n\t            return\n\t          }\n\t        }\n\t      }),\n\n\t      indentLine: methodOp(function(n, dir, aggressive) {\n\t        if (typeof dir != \"string\" && typeof dir != \"number\") {\n\t          if (dir == null) { dir = this.options.smartIndent ? \"smart\" : \"prev\"; }\n\t          else { dir = dir ? \"add\" : \"subtract\"; }\n\t        }\n\t        if (isLine(this.doc, n)) { indentLine(this, n, dir, aggressive); }\n\t      }),\n\t      indentSelection: methodOp(function(how) {\n\t        var ranges = this.doc.sel.ranges, end = -1;\n\t        for (var i = 0; i < ranges.length; i++) {\n\t          var range = ranges[i];\n\t          if (!range.empty()) {\n\t            var from = range.from(), to = range.to();\n\t            var start = Math.max(end, from.line);\n\t            end = Math.min(this.lastLine(), to.line - (to.ch ? 0 : 1)) + 1;\n\t            for (var j = start; j < end; ++j)\n\t              { indentLine(this, j, how); }\n\t            var newRanges = this.doc.sel.ranges;\n\t            if (from.ch == 0 && ranges.length == newRanges.length && newRanges[i].from().ch > 0)\n\t              { replaceOneSelection(this.doc, i, new Range(from, newRanges[i].to()), sel_dontScroll); }\n\t          } else if (range.head.line > end) {\n\t            indentLine(this, range.head.line, how, true);\n\t            end = range.head.line;\n\t            if (i == this.doc.sel.primIndex) { ensureCursorVisible(this); }\n\t          }\n\t        }\n\t      }),\n\n\t      // Fetch the parser token for a given character. Useful for hacks\n\t      // that want to inspect the mode state (say, for completion).\n\t      getTokenAt: function(pos, precise) {\n\t        return takeToken(this, pos, precise)\n\t      },\n\n\t      getLineTokens: function(line, precise) {\n\t        return takeToken(this, Pos(line), precise, true)\n\t      },\n\n\t      getTokenTypeAt: function(pos) {\n\t        pos = clipPos(this.doc, pos);\n\t        var styles = getLineStyles(this, getLine(this.doc, pos.line));\n\t        var before = 0, after = (styles.length - 1) / 2, ch = pos.ch;\n\t        var type;\n\t        if (ch == 0) { type = styles[2]; }\n\t        else { for (;;) {\n\t          var mid = (before + after) >> 1;\n\t          if ((mid ? styles[mid * 2 - 1] : 0) >= ch) { after = mid; }\n\t          else if (styles[mid * 2 + 1] < ch) { before = mid + 1; }\n\t          else { type = styles[mid * 2 + 2]; break }\n\t        } }\n\t        var cut = type ? type.indexOf(\"overlay \") : -1;\n\t        return cut < 0 ? type : cut == 0 ? null : type.slice(0, cut - 1)\n\t      },\n\n\t      getModeAt: function(pos) {\n\t        var mode = this.doc.mode;\n\t        if (!mode.innerMode) { return mode }\n\t        return CodeMirror.innerMode(mode, this.getTokenAt(pos).state).mode\n\t      },\n\n\t      getHelper: function(pos, type) {\n\t        return this.getHelpers(pos, type)[0]\n\t      },\n\n\t      getHelpers: function(pos, type) {\n\t        var found = [];\n\t        if (!helpers.hasOwnProperty(type)) { return found }\n\t        var help = helpers[type], mode = this.getModeAt(pos);\n\t        if (typeof mode[type] == \"string\") {\n\t          if (help[mode[type]]) { found.push(help[mode[type]]); }\n\t        } else if (mode[type]) {\n\t          for (var i = 0; i < mode[type].length; i++) {\n\t            var val = help[mode[type][i]];\n\t            if (val) { found.push(val); }\n\t          }\n\t        } else if (mode.helperType && help[mode.helperType]) {\n\t          found.push(help[mode.helperType]);\n\t        } else if (help[mode.name]) {\n\t          found.push(help[mode.name]);\n\t        }\n\t        for (var i$1 = 0; i$1 < help._global.length; i$1++) {\n\t          var cur = help._global[i$1];\n\t          if (cur.pred(mode, this) && indexOf(found, cur.val) == -1)\n\t            { found.push(cur.val); }\n\t        }\n\t        return found\n\t      },\n\n\t      getStateAfter: function(line, precise) {\n\t        var doc = this.doc;\n\t        line = clipLine(doc, line == null ? doc.first + doc.size - 1: line);\n\t        return getContextBefore(this, line + 1, precise).state\n\t      },\n\n\t      cursorCoords: function(start, mode) {\n\t        var pos, range = this.doc.sel.primary();\n\t        if (start == null) { pos = range.head; }\n\t        else if (typeof start == \"object\") { pos = clipPos(this.doc, start); }\n\t        else { pos = start ? range.from() : range.to(); }\n\t        return cursorCoords(this, pos, mode || \"page\")\n\t      },\n\n\t      charCoords: function(pos, mode) {\n\t        return charCoords(this, clipPos(this.doc, pos), mode || \"page\")\n\t      },\n\n\t      coordsChar: function(coords, mode) {\n\t        coords = fromCoordSystem(this, coords, mode || \"page\");\n\t        return coordsChar(this, coords.left, coords.top)\n\t      },\n\n\t      lineAtHeight: function(height, mode) {\n\t        height = fromCoordSystem(this, {top: height, left: 0}, mode || \"page\").top;\n\t        return lineAtHeight(this.doc, height + this.display.viewOffset)\n\t      },\n\t      heightAtLine: function(line, mode, includeWidgets) {\n\t        var end = false, lineObj;\n\t        if (typeof line == \"number\") {\n\t          var last = this.doc.first + this.doc.size - 1;\n\t          if (line < this.doc.first) { line = this.doc.first; }\n\t          else if (line > last) { line = last; end = true; }\n\t          lineObj = getLine(this.doc, line);\n\t        } else {\n\t          lineObj = line;\n\t        }\n\t        return intoCoordSystem(this, lineObj, {top: 0, left: 0}, mode || \"page\", includeWidgets || end).top +\n\t          (end ? this.doc.height - heightAtLine(lineObj) : 0)\n\t      },\n\n\t      defaultTextHeight: function() { return textHeight(this.display) },\n\t      defaultCharWidth: function() { return charWidth(this.display) },\n\n\t      getViewport: function() { return {from: this.display.viewFrom, to: this.display.viewTo}},\n\n\t      addWidget: function(pos, node, scroll, vert, horiz) {\n\t        var display = this.display;\n\t        pos = cursorCoords(this, clipPos(this.doc, pos));\n\t        var top = pos.bottom, left = pos.left;\n\t        node.style.position = \"absolute\";\n\t        node.setAttribute(\"cm-ignore-events\", \"true\");\n\t        this.display.input.setUneditable(node);\n\t        display.sizer.appendChild(node);\n\t        if (vert == \"over\") {\n\t          top = pos.top;\n\t        } else if (vert == \"above\" || vert == \"near\") {\n\t          var vspace = Math.max(display.wrapper.clientHeight, this.doc.height),\n\t          hspace = Math.max(display.sizer.clientWidth, display.lineSpace.clientWidth);\n\t          // Default to positioning above (if specified and possible); otherwise default to positioning below\n\t          if ((vert == 'above' || pos.bottom + node.offsetHeight > vspace) && pos.top > node.offsetHeight)\n\t            { top = pos.top - node.offsetHeight; }\n\t          else if (pos.bottom + node.offsetHeight <= vspace)\n\t            { top = pos.bottom; }\n\t          if (left + node.offsetWidth > hspace)\n\t            { left = hspace - node.offsetWidth; }\n\t        }\n\t        node.style.top = top + \"px\";\n\t        node.style.left = node.style.right = \"\";\n\t        if (horiz == \"right\") {\n\t          left = display.sizer.clientWidth - node.offsetWidth;\n\t          node.style.right = \"0px\";\n\t        } else {\n\t          if (horiz == \"left\") { left = 0; }\n\t          else if (horiz == \"middle\") { left = (display.sizer.clientWidth - node.offsetWidth) / 2; }\n\t          node.style.left = left + \"px\";\n\t        }\n\t        if (scroll)\n\t          { scrollIntoView(this, {left: left, top: top, right: left + node.offsetWidth, bottom: top + node.offsetHeight}); }\n\t      },\n\n\t      triggerOnKeyDown: methodOp(onKeyDown),\n\t      triggerOnKeyPress: methodOp(onKeyPress),\n\t      triggerOnKeyUp: onKeyUp,\n\t      triggerOnMouseDown: methodOp(onMouseDown),\n\n\t      execCommand: function(cmd) {\n\t        if (commands.hasOwnProperty(cmd))\n\t          { return commands[cmd].call(null, this) }\n\t      },\n\n\t      triggerElectric: methodOp(function(text) { triggerElectric(this, text); }),\n\n\t      findPosH: function(from, amount, unit, visually) {\n\t        var dir = 1;\n\t        if (amount < 0) { dir = -1; amount = -amount; }\n\t        var cur = clipPos(this.doc, from);\n\t        for (var i = 0; i < amount; ++i) {\n\t          cur = findPosH(this.doc, cur, dir, unit, visually);\n\t          if (cur.hitSide) { break }\n\t        }\n\t        return cur\n\t      },\n\n\t      moveH: methodOp(function(dir, unit) {\n\t        var this$1 = this;\n\n\t        this.extendSelectionsBy(function (range) {\n\t          if (this$1.display.shift || this$1.doc.extend || range.empty())\n\t            { return findPosH(this$1.doc, range.head, dir, unit, this$1.options.rtlMoveVisually) }\n\t          else\n\t            { return dir < 0 ? range.from() : range.to() }\n\t        }, sel_move);\n\t      }),\n\n\t      deleteH: methodOp(function(dir, unit) {\n\t        var sel = this.doc.sel, doc = this.doc;\n\t        if (sel.somethingSelected())\n\t          { doc.replaceSelection(\"\", null, \"+delete\"); }\n\t        else\n\t          { deleteNearSelection(this, function (range) {\n\t            var other = findPosH(doc, range.head, dir, unit, false);\n\t            return dir < 0 ? {from: other, to: range.head} : {from: range.head, to: other}\n\t          }); }\n\t      }),\n\n\t      findPosV: function(from, amount, unit, goalColumn) {\n\t        var dir = 1, x = goalColumn;\n\t        if (amount < 0) { dir = -1; amount = -amount; }\n\t        var cur = clipPos(this.doc, from);\n\t        for (var i = 0; i < amount; ++i) {\n\t          var coords = cursorCoords(this, cur, \"div\");\n\t          if (x == null) { x = coords.left; }\n\t          else { coords.left = x; }\n\t          cur = findPosV(this, coords, dir, unit);\n\t          if (cur.hitSide) { break }\n\t        }\n\t        return cur\n\t      },\n\n\t      moveV: methodOp(function(dir, unit) {\n\t        var this$1 = this;\n\n\t        var doc = this.doc, goals = [];\n\t        var collapse = !this.display.shift && !doc.extend && doc.sel.somethingSelected();\n\t        doc.extendSelectionsBy(function (range) {\n\t          if (collapse)\n\t            { return dir < 0 ? range.from() : range.to() }\n\t          var headPos = cursorCoords(this$1, range.head, \"div\");\n\t          if (range.goalColumn != null) { headPos.left = range.goalColumn; }\n\t          goals.push(headPos.left);\n\t          var pos = findPosV(this$1, headPos, dir, unit);\n\t          if (unit == \"page\" && range == doc.sel.primary())\n\t            { addToScrollTop(this$1, charCoords(this$1, pos, \"div\").top - headPos.top); }\n\t          return pos\n\t        }, sel_move);\n\t        if (goals.length) { for (var i = 0; i < doc.sel.ranges.length; i++)\n\t          { doc.sel.ranges[i].goalColumn = goals[i]; } }\n\t      }),\n\n\t      // Find the word at the given position (as returned by coordsChar).\n\t      findWordAt: function(pos) {\n\t        var doc = this.doc, line = getLine(doc, pos.line).text;\n\t        var start = pos.ch, end = pos.ch;\n\t        if (line) {\n\t          var helper = this.getHelper(pos, \"wordChars\");\n\t          if ((pos.sticky == \"before\" || end == line.length) && start) { --start; } else { ++end; }\n\t          var startChar = line.charAt(start);\n\t          var check = isWordChar(startChar, helper)\n\t            ? function (ch) { return isWordChar(ch, helper); }\n\t            : /\\s/.test(startChar) ? function (ch) { return /\\s/.test(ch); }\n\t            : function (ch) { return (!/\\s/.test(ch) && !isWordChar(ch)); };\n\t          while (start > 0 && check(line.charAt(start - 1))) { --start; }\n\t          while (end < line.length && check(line.charAt(end))) { ++end; }\n\t        }\n\t        return new Range(Pos(pos.line, start), Pos(pos.line, end))\n\t      },\n\n\t      toggleOverwrite: function(value) {\n\t        if (value != null && value == this.state.overwrite) { return }\n\t        if (this.state.overwrite = !this.state.overwrite)\n\t          { addClass(this.display.cursorDiv, \"CodeMirror-overwrite\"); }\n\t        else\n\t          { rmClass(this.display.cursorDiv, \"CodeMirror-overwrite\"); }\n\n\t        signal(this, \"overwriteToggle\", this, this.state.overwrite);\n\t      },\n\t      hasFocus: function() { return this.display.input.getField() == activeElt() },\n\t      isReadOnly: function() { return !!(this.options.readOnly || this.doc.cantEdit) },\n\n\t      scrollTo: methodOp(function (x, y) { scrollToCoords(this, x, y); }),\n\t      getScrollInfo: function() {\n\t        var scroller = this.display.scroller;\n\t        return {left: scroller.scrollLeft, top: scroller.scrollTop,\n\t                height: scroller.scrollHeight - scrollGap(this) - this.display.barHeight,\n\t                width: scroller.scrollWidth - scrollGap(this) - this.display.barWidth,\n\t                clientHeight: displayHeight(this), clientWidth: displayWidth(this)}\n\t      },\n\n\t      scrollIntoView: methodOp(function(range, margin) {\n\t        if (range == null) {\n\t          range = {from: this.doc.sel.primary().head, to: null};\n\t          if (margin == null) { margin = this.options.cursorScrollMargin; }\n\t        } else if (typeof range == \"number\") {\n\t          range = {from: Pos(range, 0), to: null};\n\t        } else if (range.from == null) {\n\t          range = {from: range, to: null};\n\t        }\n\t        if (!range.to) { range.to = range.from; }\n\t        range.margin = margin || 0;\n\n\t        if (range.from.line != null) {\n\t          scrollToRange(this, range);\n\t        } else {\n\t          scrollToCoordsRange(this, range.from, range.to, range.margin);\n\t        }\n\t      }),\n\n\t      setSize: methodOp(function(width, height) {\n\t        var this$1 = this;\n\n\t        var interpret = function (val) { return typeof val == \"number\" || /^\\d+$/.test(String(val)) ? val + \"px\" : val; };\n\t        if (width != null) { this.display.wrapper.style.width = interpret(width); }\n\t        if (height != null) { this.display.wrapper.style.height = interpret(height); }\n\t        if (this.options.lineWrapping) { clearLineMeasurementCache(this); }\n\t        var lineNo = this.display.viewFrom;\n\t        this.doc.iter(lineNo, this.display.viewTo, function (line) {\n\t          if (line.widgets) { for (var i = 0; i < line.widgets.length; i++)\n\t            { if (line.widgets[i].noHScroll) { regLineChange(this$1, lineNo, \"widget\"); break } } }\n\t          ++lineNo;\n\t        });\n\t        this.curOp.forceUpdate = true;\n\t        signal(this, \"refresh\", this);\n\t      }),\n\n\t      operation: function(f){return runInOp(this, f)},\n\t      startOperation: function(){return startOperation(this)},\n\t      endOperation: function(){return endOperation(this)},\n\n\t      refresh: methodOp(function() {\n\t        var oldHeight = this.display.cachedTextHeight;\n\t        regChange(this);\n\t        this.curOp.forceUpdate = true;\n\t        clearCaches(this);\n\t        scrollToCoords(this, this.doc.scrollLeft, this.doc.scrollTop);\n\t        updateGutterSpace(this.display);\n\t        if (oldHeight == null || Math.abs(oldHeight - textHeight(this.display)) > .5 || this.options.lineWrapping)\n\t          { estimateLineHeights(this); }\n\t        signal(this, \"refresh\", this);\n\t      }),\n\n\t      swapDoc: methodOp(function(doc) {\n\t        var old = this.doc;\n\t        old.cm = null;\n\t        // Cancel the current text selection if any (#5821)\n\t        if (this.state.selectingText) { this.state.selectingText(); }\n\t        attachDoc(this, doc);\n\t        clearCaches(this);\n\t        this.display.input.reset();\n\t        scrollToCoords(this, doc.scrollLeft, doc.scrollTop);\n\t        this.curOp.forceScroll = true;\n\t        signalLater(this, \"swapDoc\", this, old);\n\t        return old\n\t      }),\n\n\t      phrase: function(phraseText) {\n\t        var phrases = this.options.phrases;\n\t        return phrases && Object.prototype.hasOwnProperty.call(phrases, phraseText) ? phrases[phraseText] : phraseText\n\t      },\n\n\t      getInputField: function(){return this.display.input.getField()},\n\t      getWrapperElement: function(){return this.display.wrapper},\n\t      getScrollerElement: function(){return this.display.scroller},\n\t      getGutterElement: function(){return this.display.gutters}\n\t    };\n\t    eventMixin(CodeMirror);\n\n\t    CodeMirror.registerHelper = function(type, name, value) {\n\t      if (!helpers.hasOwnProperty(type)) { helpers[type] = CodeMirror[type] = {_global: []}; }\n\t      helpers[type][name] = value;\n\t    };\n\t    CodeMirror.registerGlobalHelper = function(type, name, predicate, value) {\n\t      CodeMirror.registerHelper(type, name, value);\n\t      helpers[type]._global.push({pred: predicate, val: value});\n\t    };\n\t  }\n\n\t  // Used for horizontal relative motion. Dir is -1 or 1 (left or\n\t  // right), unit can be \"codepoint\", \"char\", \"column\" (like char, but\n\t  // doesn't cross line boundaries), \"word\" (across next word), or\n\t  // \"group\" (to the start of next group of word or\n\t  // non-word-non-whitespace chars). The visually param controls\n\t  // whether, in right-to-left text, direction 1 means to move towards\n\t  // the next index in the string, or towards the character to the right\n\t  // of the current position. The resulting position will have a\n\t  // hitSide=true property if it reached the end of the document.\n\t  function findPosH(doc, pos, dir, unit, visually) {\n\t    var oldPos = pos;\n\t    var origDir = dir;\n\t    var lineObj = getLine(doc, pos.line);\n\t    var lineDir = visually && doc.direction == \"rtl\" ? -dir : dir;\n\t    function findNextLine() {\n\t      var l = pos.line + lineDir;\n\t      if (l < doc.first || l >= doc.first + doc.size) { return false }\n\t      pos = new Pos(l, pos.ch, pos.sticky);\n\t      return lineObj = getLine(doc, l)\n\t    }\n\t    function moveOnce(boundToLine) {\n\t      var next;\n\t      if (unit == \"codepoint\") {\n\t        var ch = lineObj.text.charCodeAt(pos.ch + (unit > 0 ? 0 : -1));\n\t        if (isNaN(ch)) { next = null; }\n\t        else { next = new Pos(pos.line, Math.max(0, Math.min(lineObj.text.length, pos.ch + dir * (ch >= 0xD800 && ch < 0xDC00 ? 2 : 1))),\n\t                            -dir); }\n\t      } else if (visually) {\n\t        next = moveVisually(doc.cm, lineObj, pos, dir);\n\t      } else {\n\t        next = moveLogically(lineObj, pos, dir);\n\t      }\n\t      if (next == null) {\n\t        if (!boundToLine && findNextLine())\n\t          { pos = endOfLine(visually, doc.cm, lineObj, pos.line, lineDir); }\n\t        else\n\t          { return false }\n\t      } else {\n\t        pos = next;\n\t      }\n\t      return true\n\t    }\n\n\t    if (unit == \"char\" || unit == \"codepoint\") {\n\t      moveOnce();\n\t    } else if (unit == \"column\") {\n\t      moveOnce(true);\n\t    } else if (unit == \"word\" || unit == \"group\") {\n\t      var sawType = null, group = unit == \"group\";\n\t      var helper = doc.cm && doc.cm.getHelper(pos, \"wordChars\");\n\t      for (var first = true;; first = false) {\n\t        if (dir < 0 && !moveOnce(!first)) { break }\n\t        var cur = lineObj.text.charAt(pos.ch) || \"\\n\";\n\t        var type = isWordChar(cur, helper) ? \"w\"\n\t          : group && cur == \"\\n\" ? \"n\"\n\t          : !group || /\\s/.test(cur) ? null\n\t          : \"p\";\n\t        if (group && !first && !type) { type = \"s\"; }\n\t        if (sawType && sawType != type) {\n\t          if (dir < 0) {dir = 1; moveOnce(); pos.sticky = \"after\";}\n\t          break\n\t        }\n\n\t        if (type) { sawType = type; }\n\t        if (dir > 0 && !moveOnce(!first)) { break }\n\t      }\n\t    }\n\t    var result = skipAtomic(doc, pos, oldPos, origDir, true);\n\t    if (equalCursorPos(oldPos, result)) { result.hitSide = true; }\n\t    return result\n\t  }\n\n\t  // For relative vertical movement. Dir may be -1 or 1. Unit can be\n\t  // \"page\" or \"line\". The resulting position will have a hitSide=true\n\t  // property if it reached the end of the document.\n\t  function findPosV(cm, pos, dir, unit) {\n\t    var doc = cm.doc, x = pos.left, y;\n\t    if (unit == \"page\") {\n\t      var pageSize = Math.min(cm.display.wrapper.clientHeight, window.innerHeight || document.documentElement.clientHeight);\n\t      var moveAmount = Math.max(pageSize - .5 * textHeight(cm.display), 3);\n\t      y = (dir > 0 ? pos.bottom : pos.top) + dir * moveAmount;\n\n\t    } else if (unit == \"line\") {\n\t      y = dir > 0 ? pos.bottom + 3 : pos.top - 3;\n\t    }\n\t    var target;\n\t    for (;;) {\n\t      target = coordsChar(cm, x, y);\n\t      if (!target.outside) { break }\n\t      if (dir < 0 ? y <= 0 : y >= doc.height) { target.hitSide = true; break }\n\t      y += dir * 5;\n\t    }\n\t    return target\n\t  }\n\n\t  // CONTENTEDITABLE INPUT STYLE\n\n\t  var ContentEditableInput = function(cm) {\n\t    this.cm = cm;\n\t    this.lastAnchorNode = this.lastAnchorOffset = this.lastFocusNode = this.lastFocusOffset = null;\n\t    this.polling = new Delayed();\n\t    this.composing = null;\n\t    this.gracePeriod = false;\n\t    this.readDOMTimeout = null;\n\t  };\n\n\t  ContentEditableInput.prototype.init = function (display) {\n\t      var this$1 = this;\n\n\t    var input = this, cm = input.cm;\n\t    var div = input.div = display.lineDiv;\n\t    disableBrowserMagic(div, cm.options.spellcheck, cm.options.autocorrect, cm.options.autocapitalize);\n\n\t    function belongsToInput(e) {\n\t      for (var t = e.target; t; t = t.parentNode) {\n\t        if (t == div) { return true }\n\t        if (/\\bCodeMirror-(?:line)?widget\\b/.test(t.className)) { break }\n\t      }\n\t      return false\n\t    }\n\n\t    on(div, \"paste\", function (e) {\n\t      if (!belongsToInput(e) || signalDOMEvent(cm, e) || handlePaste(e, cm)) { return }\n\t      // IE doesn't fire input events, so we schedule a read for the pasted content in this way\n\t      if (ie_version <= 11) { setTimeout(operation(cm, function () { return this$1.updateFromDOM(); }), 20); }\n\t    });\n\n\t    on(div, \"compositionstart\", function (e) {\n\t      this$1.composing = {data: e.data, done: false};\n\t    });\n\t    on(div, \"compositionupdate\", function (e) {\n\t      if (!this$1.composing) { this$1.composing = {data: e.data, done: false}; }\n\t    });\n\t    on(div, \"compositionend\", function (e) {\n\t      if (this$1.composing) {\n\t        if (e.data != this$1.composing.data) { this$1.readFromDOMSoon(); }\n\t        this$1.composing.done = true;\n\t      }\n\t    });\n\n\t    on(div, \"touchstart\", function () { return input.forceCompositionEnd(); });\n\n\t    on(div, \"input\", function () {\n\t      if (!this$1.composing) { this$1.readFromDOMSoon(); }\n\t    });\n\n\t    function onCopyCut(e) {\n\t      if (!belongsToInput(e) || signalDOMEvent(cm, e)) { return }\n\t      if (cm.somethingSelected()) {\n\t        setLastCopied({lineWise: false, text: cm.getSelections()});\n\t        if (e.type == \"cut\") { cm.replaceSelection(\"\", null, \"cut\"); }\n\t      } else if (!cm.options.lineWiseCopyCut) {\n\t        return\n\t      } else {\n\t        var ranges = copyableRanges(cm);\n\t        setLastCopied({lineWise: true, text: ranges.text});\n\t        if (e.type == \"cut\") {\n\t          cm.operation(function () {\n\t            cm.setSelections(ranges.ranges, 0, sel_dontScroll);\n\t            cm.replaceSelection(\"\", null, \"cut\");\n\t          });\n\t        }\n\t      }\n\t      if (e.clipboardData) {\n\t        e.clipboardData.clearData();\n\t        var content = lastCopied.text.join(\"\\n\");\n\t        // iOS exposes the clipboard API, but seems to discard content inserted into it\n\t        e.clipboardData.setData(\"Text\", content);\n\t        if (e.clipboardData.getData(\"Text\") == content) {\n\t          e.preventDefault();\n\t          return\n\t        }\n\t      }\n\t      // Old-fashioned briefly-focus-a-textarea hack\n\t      var kludge = hiddenTextarea(), te = kludge.firstChild;\n\t      cm.display.lineSpace.insertBefore(kludge, cm.display.lineSpace.firstChild);\n\t      te.value = lastCopied.text.join(\"\\n\");\n\t      var hadFocus = document.activeElement;\n\t      selectInput(te);\n\t      setTimeout(function () {\n\t        cm.display.lineSpace.removeChild(kludge);\n\t        hadFocus.focus();\n\t        if (hadFocus == div) { input.showPrimarySelection(); }\n\t      }, 50);\n\t    }\n\t    on(div, \"copy\", onCopyCut);\n\t    on(div, \"cut\", onCopyCut);\n\t  };\n\n\t  ContentEditableInput.prototype.screenReaderLabelChanged = function (label) {\n\t    // Label for screenreaders, accessibility\n\t    if(label) {\n\t      this.div.setAttribute('aria-label', label);\n\t    } else {\n\t      this.div.removeAttribute('aria-label');\n\t    }\n\t  };\n\n\t  ContentEditableInput.prototype.prepareSelection = function () {\n\t    var result = prepareSelection(this.cm, false);\n\t    result.focus = document.activeElement == this.div;\n\t    return result\n\t  };\n\n\t  ContentEditableInput.prototype.showSelection = function (info, takeFocus) {\n\t    if (!info || !this.cm.display.view.length) { return }\n\t    if (info.focus || takeFocus) { this.showPrimarySelection(); }\n\t    this.showMultipleSelections(info);\n\t  };\n\n\t  ContentEditableInput.prototype.getSelection = function () {\n\t    return this.cm.display.wrapper.ownerDocument.getSelection()\n\t  };\n\n\t  ContentEditableInput.prototype.showPrimarySelection = function () {\n\t    var sel = this.getSelection(), cm = this.cm, prim = cm.doc.sel.primary();\n\t    var from = prim.from(), to = prim.to();\n\n\t    if (cm.display.viewTo == cm.display.viewFrom || from.line >= cm.display.viewTo || to.line < cm.display.viewFrom) {\n\t      sel.removeAllRanges();\n\t      return\n\t    }\n\n\t    var curAnchor = domToPos(cm, sel.anchorNode, sel.anchorOffset);\n\t    var curFocus = domToPos(cm, sel.focusNode, sel.focusOffset);\n\t    if (curAnchor && !curAnchor.bad && curFocus && !curFocus.bad &&\n\t        cmp(minPos(curAnchor, curFocus), from) == 0 &&\n\t        cmp(maxPos(curAnchor, curFocus), to) == 0)\n\t      { return }\n\n\t    var view = cm.display.view;\n\t    var start = (from.line >= cm.display.viewFrom && posToDOM(cm, from)) ||\n\t        {node: view[0].measure.map[2], offset: 0};\n\t    var end = to.line < cm.display.viewTo && posToDOM(cm, to);\n\t    if (!end) {\n\t      var measure = view[view.length - 1].measure;\n\t      var map = measure.maps ? measure.maps[measure.maps.length - 1] : measure.map;\n\t      end = {node: map[map.length - 1], offset: map[map.length - 2] - map[map.length - 3]};\n\t    }\n\n\t    if (!start || !end) {\n\t      sel.removeAllRanges();\n\t      return\n\t    }\n\n\t    var old = sel.rangeCount && sel.getRangeAt(0), rng;\n\t    try { rng = range(start.node, start.offset, end.offset, end.node); }\n\t    catch(e) {} // Our model of the DOM might be outdated, in which case the range we try to set can be impossible\n\t    if (rng) {\n\t      if (!gecko && cm.state.focused) {\n\t        sel.collapse(start.node, start.offset);\n\t        if (!rng.collapsed) {\n\t          sel.removeAllRanges();\n\t          sel.addRange(rng);\n\t        }\n\t      } else {\n\t        sel.removeAllRanges();\n\t        sel.addRange(rng);\n\t      }\n\t      if (old && sel.anchorNode == null) { sel.addRange(old); }\n\t      else if (gecko) { this.startGracePeriod(); }\n\t    }\n\t    this.rememberSelection();\n\t  };\n\n\t  ContentEditableInput.prototype.startGracePeriod = function () {\n\t      var this$1 = this;\n\n\t    clearTimeout(this.gracePeriod);\n\t    this.gracePeriod = setTimeout(function () {\n\t      this$1.gracePeriod = false;\n\t      if (this$1.selectionChanged())\n\t        { this$1.cm.operation(function () { return this$1.cm.curOp.selectionChanged = true; }); }\n\t    }, 20);\n\t  };\n\n\t  ContentEditableInput.prototype.showMultipleSelections = function (info) {\n\t    removeChildrenAndAdd(this.cm.display.cursorDiv, info.cursors);\n\t    removeChildrenAndAdd(this.cm.display.selectionDiv, info.selection);\n\t  };\n\n\t  ContentEditableInput.prototype.rememberSelection = function () {\n\t    var sel = this.getSelection();\n\t    this.lastAnchorNode = sel.anchorNode; this.lastAnchorOffset = sel.anchorOffset;\n\t    this.lastFocusNode = sel.focusNode; this.lastFocusOffset = sel.focusOffset;\n\t  };\n\n\t  ContentEditableInput.prototype.selectionInEditor = function () {\n\t    var sel = this.getSelection();\n\t    if (!sel.rangeCount) { return false }\n\t    var node = sel.getRangeAt(0).commonAncestorContainer;\n\t    return contains(this.div, node)\n\t  };\n\n\t  ContentEditableInput.prototype.focus = function () {\n\t    if (this.cm.options.readOnly != \"nocursor\") {\n\t      if (!this.selectionInEditor() || document.activeElement != this.div)\n\t        { this.showSelection(this.prepareSelection(), true); }\n\t      this.div.focus();\n\t    }\n\t  };\n\t  ContentEditableInput.prototype.blur = function () { this.div.blur(); };\n\t  ContentEditableInput.prototype.getField = function () { return this.div };\n\n\t  ContentEditableInput.prototype.supportsTouch = function () { return true };\n\n\t  ContentEditableInput.prototype.receivedFocus = function () {\n\t    var input = this;\n\t    if (this.selectionInEditor())\n\t      { this.pollSelection(); }\n\t    else\n\t      { runInOp(this.cm, function () { return input.cm.curOp.selectionChanged = true; }); }\n\n\t    function poll() {\n\t      if (input.cm.state.focused) {\n\t        input.pollSelection();\n\t        input.polling.set(input.cm.options.pollInterval, poll);\n\t      }\n\t    }\n\t    this.polling.set(this.cm.options.pollInterval, poll);\n\t  };\n\n\t  ContentEditableInput.prototype.selectionChanged = function () {\n\t    var sel = this.getSelection();\n\t    return sel.anchorNode != this.lastAnchorNode || sel.anchorOffset != this.lastAnchorOffset ||\n\t      sel.focusNode != this.lastFocusNode || sel.focusOffset != this.lastFocusOffset\n\t  };\n\n\t  ContentEditableInput.prototype.pollSelection = function () {\n\t    if (this.readDOMTimeout != null || this.gracePeriod || !this.selectionChanged()) { return }\n\t    var sel = this.getSelection(), cm = this.cm;\n\t    // On Android Chrome (version 56, at least), backspacing into an\n\t    // uneditable block element will put the cursor in that element,\n\t    // and then, because it's not editable, hide the virtual keyboard.\n\t    // Because Android doesn't allow us to actually detect backspace\n\t    // presses in a sane way, this code checks for when that happens\n\t    // and simulates a backspace press in this case.\n\t    if (android && chrome && this.cm.display.gutterSpecs.length && isInGutter(sel.anchorNode)) {\n\t      this.cm.triggerOnKeyDown({type: \"keydown\", keyCode: 8, preventDefault: Math.abs});\n\t      this.blur();\n\t      this.focus();\n\t      return\n\t    }\n\t    if (this.composing) { return }\n\t    this.rememberSelection();\n\t    var anchor = domToPos(cm, sel.anchorNode, sel.anchorOffset);\n\t    var head = domToPos(cm, sel.focusNode, sel.focusOffset);\n\t    if (anchor && head) { runInOp(cm, function () {\n\t      setSelection(cm.doc, simpleSelection(anchor, head), sel_dontScroll);\n\t      if (anchor.bad || head.bad) { cm.curOp.selectionChanged = true; }\n\t    }); }\n\t  };\n\n\t  ContentEditableInput.prototype.pollContent = function () {\n\t    if (this.readDOMTimeout != null) {\n\t      clearTimeout(this.readDOMTimeout);\n\t      this.readDOMTimeout = null;\n\t    }\n\n\t    var cm = this.cm, display = cm.display, sel = cm.doc.sel.primary();\n\t    var from = sel.from(), to = sel.to();\n\t    if (from.ch == 0 && from.line > cm.firstLine())\n\t      { from = Pos(from.line - 1, getLine(cm.doc, from.line - 1).length); }\n\t    if (to.ch == getLine(cm.doc, to.line).text.length && to.line < cm.lastLine())\n\t      { to = Pos(to.line + 1, 0); }\n\t    if (from.line < display.viewFrom || to.line > display.viewTo - 1) { return false }\n\n\t    var fromIndex, fromLine, fromNode;\n\t    if (from.line == display.viewFrom || (fromIndex = findViewIndex(cm, from.line)) == 0) {\n\t      fromLine = lineNo(display.view[0].line);\n\t      fromNode = display.view[0].node;\n\t    } else {\n\t      fromLine = lineNo(display.view[fromIndex].line);\n\t      fromNode = display.view[fromIndex - 1].node.nextSibling;\n\t    }\n\t    var toIndex = findViewIndex(cm, to.line);\n\t    var toLine, toNode;\n\t    if (toIndex == display.view.length - 1) {\n\t      toLine = display.viewTo - 1;\n\t      toNode = display.lineDiv.lastChild;\n\t    } else {\n\t      toLine = lineNo(display.view[toIndex + 1].line) - 1;\n\t      toNode = display.view[toIndex + 1].node.previousSibling;\n\t    }\n\n\t    if (!fromNode) { return false }\n\t    var newText = cm.doc.splitLines(domTextBetween(cm, fromNode, toNode, fromLine, toLine));\n\t    var oldText = getBetween(cm.doc, Pos(fromLine, 0), Pos(toLine, getLine(cm.doc, toLine).text.length));\n\t    while (newText.length > 1 && oldText.length > 1) {\n\t      if (lst(newText) == lst(oldText)) { newText.pop(); oldText.pop(); toLine--; }\n\t      else if (newText[0] == oldText[0]) { newText.shift(); oldText.shift(); fromLine++; }\n\t      else { break }\n\t    }\n\n\t    var cutFront = 0, cutEnd = 0;\n\t    var newTop = newText[0], oldTop = oldText[0], maxCutFront = Math.min(newTop.length, oldTop.length);\n\t    while (cutFront < maxCutFront && newTop.charCodeAt(cutFront) == oldTop.charCodeAt(cutFront))\n\t      { ++cutFront; }\n\t    var newBot = lst(newText), oldBot = lst(oldText);\n\t    var maxCutEnd = Math.min(newBot.length - (newText.length == 1 ? cutFront : 0),\n\t                             oldBot.length - (oldText.length == 1 ? cutFront : 0));\n\t    while (cutEnd < maxCutEnd &&\n\t           newBot.charCodeAt(newBot.length - cutEnd - 1) == oldBot.charCodeAt(oldBot.length - cutEnd - 1))\n\t      { ++cutEnd; }\n\t    // Try to move start of change to start of selection if ambiguous\n\t    if (newText.length == 1 && oldText.length == 1 && fromLine == from.line) {\n\t      while (cutFront && cutFront > from.ch &&\n\t             newBot.charCodeAt(newBot.length - cutEnd - 1) == oldBot.charCodeAt(oldBot.length - cutEnd - 1)) {\n\t        cutFront--;\n\t        cutEnd++;\n\t      }\n\t    }\n\n\t    newText[newText.length - 1] = newBot.slice(0, newBot.length - cutEnd).replace(/^\\u200b+/, \"\");\n\t    newText[0] = newText[0].slice(cutFront).replace(/\\u200b+$/, \"\");\n\n\t    var chFrom = Pos(fromLine, cutFront);\n\t    var chTo = Pos(toLine, oldText.length ? lst(oldText).length - cutEnd : 0);\n\t    if (newText.length > 1 || newText[0] || cmp(chFrom, chTo)) {\n\t      replaceRange(cm.doc, newText, chFrom, chTo, \"+input\");\n\t      return true\n\t    }\n\t  };\n\n\t  ContentEditableInput.prototype.ensurePolled = function () {\n\t    this.forceCompositionEnd();\n\t  };\n\t  ContentEditableInput.prototype.reset = function () {\n\t    this.forceCompositionEnd();\n\t  };\n\t  ContentEditableInput.prototype.forceCompositionEnd = function () {\n\t    if (!this.composing) { return }\n\t    clearTimeout(this.readDOMTimeout);\n\t    this.composing = null;\n\t    this.updateFromDOM();\n\t    this.div.blur();\n\t    this.div.focus();\n\t  };\n\t  ContentEditableInput.prototype.readFromDOMSoon = function () {\n\t      var this$1 = this;\n\n\t    if (this.readDOMTimeout != null) { return }\n\t    this.readDOMTimeout = setTimeout(function () {\n\t      this$1.readDOMTimeout = null;\n\t      if (this$1.composing) {\n\t        if (this$1.composing.done) { this$1.composing = null; }\n\t        else { return }\n\t      }\n\t      this$1.updateFromDOM();\n\t    }, 80);\n\t  };\n\n\t  ContentEditableInput.prototype.updateFromDOM = function () {\n\t      var this$1 = this;\n\n\t    if (this.cm.isReadOnly() || !this.pollContent())\n\t      { runInOp(this.cm, function () { return regChange(this$1.cm); }); }\n\t  };\n\n\t  ContentEditableInput.prototype.setUneditable = function (node) {\n\t    node.contentEditable = \"false\";\n\t  };\n\n\t  ContentEditableInput.prototype.onKeyPress = function (e) {\n\t    if (e.charCode == 0 || this.composing) { return }\n\t    e.preventDefault();\n\t    if (!this.cm.isReadOnly())\n\t      { operation(this.cm, applyTextInput)(this.cm, String.fromCharCode(e.charCode == null ? e.keyCode : e.charCode), 0); }\n\t  };\n\n\t  ContentEditableInput.prototype.readOnlyChanged = function (val) {\n\t    this.div.contentEditable = String(val != \"nocursor\");\n\t  };\n\n\t  ContentEditableInput.prototype.onContextMenu = function () {};\n\t  ContentEditableInput.prototype.resetPosition = function () {};\n\n\t  ContentEditableInput.prototype.needsContentAttribute = true;\n\n\t  function posToDOM(cm, pos) {\n\t    var view = findViewForLine(cm, pos.line);\n\t    if (!view || view.hidden) { return null }\n\t    var line = getLine(cm.doc, pos.line);\n\t    var info = mapFromLineView(view, line, pos.line);\n\n\t    var order = getOrder(line, cm.doc.direction), side = \"left\";\n\t    if (order) {\n\t      var partPos = getBidiPartAt(order, pos.ch);\n\t      side = partPos % 2 ? \"right\" : \"left\";\n\t    }\n\t    var result = nodeAndOffsetInLineMap(info.map, pos.ch, side);\n\t    result.offset = result.collapse == \"right\" ? result.end : result.start;\n\t    return result\n\t  }\n\n\t  function isInGutter(node) {\n\t    for (var scan = node; scan; scan = scan.parentNode)\n\t      { if (/CodeMirror-gutter-wrapper/.test(scan.className)) { return true } }\n\t    return false\n\t  }\n\n\t  function badPos(pos, bad) { if (bad) { pos.bad = true; } return pos }\n\n\t  function domTextBetween(cm, from, to, fromLine, toLine) {\n\t    var text = \"\", closing = false, lineSep = cm.doc.lineSeparator(), extraLinebreak = false;\n\t    function recognizeMarker(id) { return function (marker) { return marker.id == id; } }\n\t    function close() {\n\t      if (closing) {\n\t        text += lineSep;\n\t        if (extraLinebreak) { text += lineSep; }\n\t        closing = extraLinebreak = false;\n\t      }\n\t    }\n\t    function addText(str) {\n\t      if (str) {\n\t        close();\n\t        text += str;\n\t      }\n\t    }\n\t    function walk(node) {\n\t      if (node.nodeType == 1) {\n\t        var cmText = node.getAttribute(\"cm-text\");\n\t        if (cmText) {\n\t          addText(cmText);\n\t          return\n\t        }\n\t        var markerID = node.getAttribute(\"cm-marker\"), range;\n\t        if (markerID) {\n\t          var found = cm.findMarks(Pos(fromLine, 0), Pos(toLine + 1, 0), recognizeMarker(+markerID));\n\t          if (found.length && (range = found[0].find(0)))\n\t            { addText(getBetween(cm.doc, range.from, range.to).join(lineSep)); }\n\t          return\n\t        }\n\t        if (node.getAttribute(\"contenteditable\") == \"false\") { return }\n\t        var isBlock = /^(pre|div|p|li|table|br)$/i.test(node.nodeName);\n\t        if (!/^br$/i.test(node.nodeName) && node.textContent.length == 0) { return }\n\n\t        if (isBlock) { close(); }\n\t        for (var i = 0; i < node.childNodes.length; i++)\n\t          { walk(node.childNodes[i]); }\n\n\t        if (/^(pre|p)$/i.test(node.nodeName)) { extraLinebreak = true; }\n\t        if (isBlock) { closing = true; }\n\t      } else if (node.nodeType == 3) {\n\t        addText(node.nodeValue.replace(/\\u200b/g, \"\").replace(/\\u00a0/g, \" \"));\n\t      }\n\t    }\n\t    for (;;) {\n\t      walk(from);\n\t      if (from == to) { break }\n\t      from = from.nextSibling;\n\t      extraLinebreak = false;\n\t    }\n\t    return text\n\t  }\n\n\t  function domToPos(cm, node, offset) {\n\t    var lineNode;\n\t    if (node == cm.display.lineDiv) {\n\t      lineNode = cm.display.lineDiv.childNodes[offset];\n\t      if (!lineNode) { return badPos(cm.clipPos(Pos(cm.display.viewTo - 1)), true) }\n\t      node = null; offset = 0;\n\t    } else {\n\t      for (lineNode = node;; lineNode = lineNode.parentNode) {\n\t        if (!lineNode || lineNode == cm.display.lineDiv) { return null }\n\t        if (lineNode.parentNode && lineNode.parentNode == cm.display.lineDiv) { break }\n\t      }\n\t    }\n\t    for (var i = 0; i < cm.display.view.length; i++) {\n\t      var lineView = cm.display.view[i];\n\t      if (lineView.node == lineNode)\n\t        { return locateNodeInLineView(lineView, node, offset) }\n\t    }\n\t  }\n\n\t  function locateNodeInLineView(lineView, node, offset) {\n\t    var wrapper = lineView.text.firstChild, bad = false;\n\t    if (!node || !contains(wrapper, node)) { return badPos(Pos(lineNo(lineView.line), 0), true) }\n\t    if (node == wrapper) {\n\t      bad = true;\n\t      node = wrapper.childNodes[offset];\n\t      offset = 0;\n\t      if (!node) {\n\t        var line = lineView.rest ? lst(lineView.rest) : lineView.line;\n\t        return badPos(Pos(lineNo(line), line.text.length), bad)\n\t      }\n\t    }\n\n\t    var textNode = node.nodeType == 3 ? node : null, topNode = node;\n\t    if (!textNode && node.childNodes.length == 1 && node.firstChild.nodeType == 3) {\n\t      textNode = node.firstChild;\n\t      if (offset) { offset = textNode.nodeValue.length; }\n\t    }\n\t    while (topNode.parentNode != wrapper) { topNode = topNode.parentNode; }\n\t    var measure = lineView.measure, maps = measure.maps;\n\n\t    function find(textNode, topNode, offset) {\n\t      for (var i = -1; i < (maps ? maps.length : 0); i++) {\n\t        var map = i < 0 ? measure.map : maps[i];\n\t        for (var j = 0; j < map.length; j += 3) {\n\t          var curNode = map[j + 2];\n\t          if (curNode == textNode || curNode == topNode) {\n\t            var line = lineNo(i < 0 ? lineView.line : lineView.rest[i]);\n\t            var ch = map[j] + offset;\n\t            if (offset < 0 || curNode != textNode) { ch = map[j + (offset ? 1 : 0)]; }\n\t            return Pos(line, ch)\n\t          }\n\t        }\n\t      }\n\t    }\n\t    var found = find(textNode, topNode, offset);\n\t    if (found) { return badPos(found, bad) }\n\n\t    // FIXME this is all really shaky. might handle the few cases it needs to handle, but likely to cause problems\n\t    for (var after = topNode.nextSibling, dist = textNode ? textNode.nodeValue.length - offset : 0; after; after = after.nextSibling) {\n\t      found = find(after, after.firstChild, 0);\n\t      if (found)\n\t        { return badPos(Pos(found.line, found.ch - dist), bad) }\n\t      else\n\t        { dist += after.textContent.length; }\n\t    }\n\t    for (var before = topNode.previousSibling, dist$1 = offset; before; before = before.previousSibling) {\n\t      found = find(before, before.firstChild, -1);\n\t      if (found)\n\t        { return badPos(Pos(found.line, found.ch + dist$1), bad) }\n\t      else\n\t        { dist$1 += before.textContent.length; }\n\t    }\n\t  }\n\n\t  // TEXTAREA INPUT STYLE\n\n\t  var TextareaInput = function(cm) {\n\t    this.cm = cm;\n\t    // See input.poll and input.reset\n\t    this.prevInput = \"\";\n\n\t    // Flag that indicates whether we expect input to appear real soon\n\t    // now (after some event like 'keypress' or 'input') and are\n\t    // polling intensively.\n\t    this.pollingFast = false;\n\t    // Self-resetting timeout for the poller\n\t    this.polling = new Delayed();\n\t    // Used to work around IE issue with selection being forgotten when focus moves away from textarea\n\t    this.hasSelection = false;\n\t    this.composing = null;\n\t  };\n\n\t  TextareaInput.prototype.init = function (display) {\n\t      var this$1 = this;\n\n\t    var input = this, cm = this.cm;\n\t    this.createField(display);\n\t    var te = this.textarea;\n\n\t    display.wrapper.insertBefore(this.wrapper, display.wrapper.firstChild);\n\n\t    // Needed to hide big blue blinking cursor on Mobile Safari (doesn't seem to work in iOS 8 anymore)\n\t    if (ios) { te.style.width = \"0px\"; }\n\n\t    on(te, \"input\", function () {\n\t      if (ie && ie_version >= 9 && this$1.hasSelection) { this$1.hasSelection = null; }\n\t      input.poll();\n\t    });\n\n\t    on(te, \"paste\", function (e) {\n\t      if (signalDOMEvent(cm, e) || handlePaste(e, cm)) { return }\n\n\t      cm.state.pasteIncoming = +new Date;\n\t      input.fastPoll();\n\t    });\n\n\t    function prepareCopyCut(e) {\n\t      if (signalDOMEvent(cm, e)) { return }\n\t      if (cm.somethingSelected()) {\n\t        setLastCopied({lineWise: false, text: cm.getSelections()});\n\t      } else if (!cm.options.lineWiseCopyCut) {\n\t        return\n\t      } else {\n\t        var ranges = copyableRanges(cm);\n\t        setLastCopied({lineWise: true, text: ranges.text});\n\t        if (e.type == \"cut\") {\n\t          cm.setSelections(ranges.ranges, null, sel_dontScroll);\n\t        } else {\n\t          input.prevInput = \"\";\n\t          te.value = ranges.text.join(\"\\n\");\n\t          selectInput(te);\n\t        }\n\t      }\n\t      if (e.type == \"cut\") { cm.state.cutIncoming = +new Date; }\n\t    }\n\t    on(te, \"cut\", prepareCopyCut);\n\t    on(te, \"copy\", prepareCopyCut);\n\n\t    on(display.scroller, \"paste\", function (e) {\n\t      if (eventInWidget(display, e) || signalDOMEvent(cm, e)) { return }\n\t      if (!te.dispatchEvent) {\n\t        cm.state.pasteIncoming = +new Date;\n\t        input.focus();\n\t        return\n\t      }\n\n\t      // Pass the `paste` event to the textarea so it's handled by its event listener.\n\t      var event = new Event(\"paste\");\n\t      event.clipboardData = e.clipboardData;\n\t      te.dispatchEvent(event);\n\t    });\n\n\t    // Prevent normal selection in the editor (we handle our own)\n\t    on(display.lineSpace, \"selectstart\", function (e) {\n\t      if (!eventInWidget(display, e)) { e_preventDefault(e); }\n\t    });\n\n\t    on(te, \"compositionstart\", function () {\n\t      var start = cm.getCursor(\"from\");\n\t      if (input.composing) { input.composing.range.clear(); }\n\t      input.composing = {\n\t        start: start,\n\t        range: cm.markText(start, cm.getCursor(\"to\"), {className: \"CodeMirror-composing\"})\n\t      };\n\t    });\n\t    on(te, \"compositionend\", function () {\n\t      if (input.composing) {\n\t        input.poll();\n\t        input.composing.range.clear();\n\t        input.composing = null;\n\t      }\n\t    });\n\t  };\n\n\t  TextareaInput.prototype.createField = function (_display) {\n\t    // Wraps and hides input textarea\n\t    this.wrapper = hiddenTextarea();\n\t    // The semihidden textarea that is focused when the editor is\n\t    // focused, and receives input.\n\t    this.textarea = this.wrapper.firstChild;\n\t  };\n\n\t  TextareaInput.prototype.screenReaderLabelChanged = function (label) {\n\t    // Label for screenreaders, accessibility\n\t    if(label) {\n\t      this.textarea.setAttribute('aria-label', label);\n\t    } else {\n\t      this.textarea.removeAttribute('aria-label');\n\t    }\n\t  };\n\n\t  TextareaInput.prototype.prepareSelection = function () {\n\t    // Redraw the selection and/or cursor\n\t    var cm = this.cm, display = cm.display, doc = cm.doc;\n\t    var result = prepareSelection(cm);\n\n\t    // Move the hidden textarea near the cursor to prevent scrolling artifacts\n\t    if (cm.options.moveInputWithCursor) {\n\t      var headPos = cursorCoords(cm, doc.sel.primary().head, \"div\");\n\t      var wrapOff = display.wrapper.getBoundingClientRect(), lineOff = display.lineDiv.getBoundingClientRect();\n\t      result.teTop = Math.max(0, Math.min(display.wrapper.clientHeight - 10,\n\t                                          headPos.top + lineOff.top - wrapOff.top));\n\t      result.teLeft = Math.max(0, Math.min(display.wrapper.clientWidth - 10,\n\t                                           headPos.left + lineOff.left - wrapOff.left));\n\t    }\n\n\t    return result\n\t  };\n\n\t  TextareaInput.prototype.showSelection = function (drawn) {\n\t    var cm = this.cm, display = cm.display;\n\t    removeChildrenAndAdd(display.cursorDiv, drawn.cursors);\n\t    removeChildrenAndAdd(display.selectionDiv, drawn.selection);\n\t    if (drawn.teTop != null) {\n\t      this.wrapper.style.top = drawn.teTop + \"px\";\n\t      this.wrapper.style.left = drawn.teLeft + \"px\";\n\t    }\n\t  };\n\n\t  // Reset the input to correspond to the selection (or to be empty,\n\t  // when not typing and nothing is selected)\n\t  TextareaInput.prototype.reset = function (typing) {\n\t    if (this.contextMenuPending || this.composing) { return }\n\t    var cm = this.cm;\n\t    if (cm.somethingSelected()) {\n\t      this.prevInput = \"\";\n\t      var content = cm.getSelection();\n\t      this.textarea.value = content;\n\t      if (cm.state.focused) { selectInput(this.textarea); }\n\t      if (ie && ie_version >= 9) { this.hasSelection = content; }\n\t    } else if (!typing) {\n\t      this.prevInput = this.textarea.value = \"\";\n\t      if (ie && ie_version >= 9) { this.hasSelection = null; }\n\t    }\n\t  };\n\n\t  TextareaInput.prototype.getField = function () { return this.textarea };\n\n\t  TextareaInput.prototype.supportsTouch = function () { return false };\n\n\t  TextareaInput.prototype.focus = function () {\n\t    if (this.cm.options.readOnly != \"nocursor\" && (!mobile || activeElt() != this.textarea)) {\n\t      try { this.textarea.focus(); }\n\t      catch (e) {} // IE8 will throw if the textarea is display: none or not in DOM\n\t    }\n\t  };\n\n\t  TextareaInput.prototype.blur = function () { this.textarea.blur(); };\n\n\t  TextareaInput.prototype.resetPosition = function () {\n\t    this.wrapper.style.top = this.wrapper.style.left = 0;\n\t  };\n\n\t  TextareaInput.prototype.receivedFocus = function () { this.slowPoll(); };\n\n\t  // Poll for input changes, using the normal rate of polling. This\n\t  // runs as long as the editor is focused.\n\t  TextareaInput.prototype.slowPoll = function () {\n\t      var this$1 = this;\n\n\t    if (this.pollingFast) { return }\n\t    this.polling.set(this.cm.options.pollInterval, function () {\n\t      this$1.poll();\n\t      if (this$1.cm.state.focused) { this$1.slowPoll(); }\n\t    });\n\t  };\n\n\t  // When an event has just come in that is likely to add or change\n\t  // something in the input textarea, we poll faster, to ensure that\n\t  // the change appears on the screen quickly.\n\t  TextareaInput.prototype.fastPoll = function () {\n\t    var missed = false, input = this;\n\t    input.pollingFast = true;\n\t    function p() {\n\t      var changed = input.poll();\n\t      if (!changed && !missed) {missed = true; input.polling.set(60, p);}\n\t      else {input.pollingFast = false; input.slowPoll();}\n\t    }\n\t    input.polling.set(20, p);\n\t  };\n\n\t  // Read input from the textarea, and update the document to match.\n\t  // When something is selected, it is present in the textarea, and\n\t  // selected (unless it is huge, in which case a placeholder is\n\t  // used). When nothing is selected, the cursor sits after previously\n\t  // seen text (can be empty), which is stored in prevInput (we must\n\t  // not reset the textarea when typing, because that breaks IME).\n\t  TextareaInput.prototype.poll = function () {\n\t      var this$1 = this;\n\n\t    var cm = this.cm, input = this.textarea, prevInput = this.prevInput;\n\t    // Since this is called a *lot*, try to bail out as cheaply as\n\t    // possible when it is clear that nothing happened. hasSelection\n\t    // will be the case when there is a lot of text in the textarea,\n\t    // in which case reading its value would be expensive.\n\t    if (this.contextMenuPending || !cm.state.focused ||\n\t        (hasSelection(input) && !prevInput && !this.composing) ||\n\t        cm.isReadOnly() || cm.options.disableInput || cm.state.keySeq)\n\t      { return false }\n\n\t    var text = input.value;\n\t    // If nothing changed, bail.\n\t    if (text == prevInput && !cm.somethingSelected()) { return false }\n\t    // Work around nonsensical selection resetting in IE9/10, and\n\t    // inexplicable appearance of private area unicode characters on\n\t    // some key combos in Mac (#2689).\n\t    if (ie && ie_version >= 9 && this.hasSelection === text ||\n\t        mac && /[\\uf700-\\uf7ff]/.test(text)) {\n\t      cm.display.input.reset();\n\t      return false\n\t    }\n\n\t    if (cm.doc.sel == cm.display.selForContextMenu) {\n\t      var first = text.charCodeAt(0);\n\t      if (first == 0x200b && !prevInput) { prevInput = \"\\u200b\"; }\n\t      if (first == 0x21da) { this.reset(); return this.cm.execCommand(\"undo\") }\n\t    }\n\t    // Find the part of the input that is actually new\n\t    var same = 0, l = Math.min(prevInput.length, text.length);\n\t    while (same < l && prevInput.charCodeAt(same) == text.charCodeAt(same)) { ++same; }\n\n\t    runInOp(cm, function () {\n\t      applyTextInput(cm, text.slice(same), prevInput.length - same,\n\t                     null, this$1.composing ? \"*compose\" : null);\n\n\t      // Don't leave long text in the textarea, since it makes further polling slow\n\t      if (text.length > 1000 || text.indexOf(\"\\n\") > -1) { input.value = this$1.prevInput = \"\"; }\n\t      else { this$1.prevInput = text; }\n\n\t      if (this$1.composing) {\n\t        this$1.composing.range.clear();\n\t        this$1.composing.range = cm.markText(this$1.composing.start, cm.getCursor(\"to\"),\n\t                                           {className: \"CodeMirror-composing\"});\n\t      }\n\t    });\n\t    return true\n\t  };\n\n\t  TextareaInput.prototype.ensurePolled = function () {\n\t    if (this.pollingFast && this.poll()) { this.pollingFast = false; }\n\t  };\n\n\t  TextareaInput.prototype.onKeyPress = function () {\n\t    if (ie && ie_version >= 9) { this.hasSelection = null; }\n\t    this.fastPoll();\n\t  };\n\n\t  TextareaInput.prototype.onContextMenu = function (e) {\n\t    var input = this, cm = input.cm, display = cm.display, te = input.textarea;\n\t    if (input.contextMenuPending) { input.contextMenuPending(); }\n\t    var pos = posFromMouse(cm, e), scrollPos = display.scroller.scrollTop;\n\t    if (!pos || presto) { return } // Opera is difficult.\n\n\t    // Reset the current text selection only if the click is done outside of the selection\n\t    // and 'resetSelectionOnContextMenu' option is true.\n\t    var reset = cm.options.resetSelectionOnContextMenu;\n\t    if (reset && cm.doc.sel.contains(pos) == -1)\n\t      { operation(cm, setSelection)(cm.doc, simpleSelection(pos), sel_dontScroll); }\n\n\t    var oldCSS = te.style.cssText, oldWrapperCSS = input.wrapper.style.cssText;\n\t    var wrapperBox = input.wrapper.offsetParent.getBoundingClientRect();\n\t    input.wrapper.style.cssText = \"position: static\";\n\t    te.style.cssText = \"position: absolute; width: 30px; height: 30px;\\n      top: \" + (e.clientY - wrapperBox.top - 5) + \"px; left: \" + (e.clientX - wrapperBox.left - 5) + \"px;\\n      z-index: 1000; background: \" + (ie ? \"rgba(255, 255, 255, .05)\" : \"transparent\") + \";\\n      outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);\";\n\t    var oldScrollY;\n\t    if (webkit) { oldScrollY = window.scrollY; } // Work around Chrome issue (#2712)\n\t    display.input.focus();\n\t    if (webkit) { window.scrollTo(null, oldScrollY); }\n\t    display.input.reset();\n\t    // Adds \"Select all\" to context menu in FF\n\t    if (!cm.somethingSelected()) { te.value = input.prevInput = \" \"; }\n\t    input.contextMenuPending = rehide;\n\t    display.selForContextMenu = cm.doc.sel;\n\t    clearTimeout(display.detectingSelectAll);\n\n\t    // Select-all will be greyed out if there's nothing to select, so\n\t    // this adds a zero-width space so that we can later check whether\n\t    // it got selected.\n\t    function prepareSelectAllHack() {\n\t      if (te.selectionStart != null) {\n\t        var selected = cm.somethingSelected();\n\t        var extval = \"\\u200b\" + (selected ? te.value : \"\");\n\t        te.value = \"\\u21da\"; // Used to catch context-menu undo\n\t        te.value = extval;\n\t        input.prevInput = selected ? \"\" : \"\\u200b\";\n\t        te.selectionStart = 1; te.selectionEnd = extval.length;\n\t        // Re-set this, in case some other handler touched the\n\t        // selection in the meantime.\n\t        display.selForContextMenu = cm.doc.sel;\n\t      }\n\t    }\n\t    function rehide() {\n\t      if (input.contextMenuPending != rehide) { return }\n\t      input.contextMenuPending = false;\n\t      input.wrapper.style.cssText = oldWrapperCSS;\n\t      te.style.cssText = oldCSS;\n\t      if (ie && ie_version < 9) { display.scrollbars.setScrollTop(display.scroller.scrollTop = scrollPos); }\n\n\t      // Try to detect the user choosing select-all\n\t      if (te.selectionStart != null) {\n\t        if (!ie || (ie && ie_version < 9)) { prepareSelectAllHack(); }\n\t        var i = 0, poll = function () {\n\t          if (display.selForContextMenu == cm.doc.sel && te.selectionStart == 0 &&\n\t              te.selectionEnd > 0 && input.prevInput == \"\\u200b\") {\n\t            operation(cm, selectAll)(cm);\n\t          } else if (i++ < 10) {\n\t            display.detectingSelectAll = setTimeout(poll, 500);\n\t          } else {\n\t            display.selForContextMenu = null;\n\t            display.input.reset();\n\t          }\n\t        };\n\t        display.detectingSelectAll = setTimeout(poll, 200);\n\t      }\n\t    }\n\n\t    if (ie && ie_version >= 9) { prepareSelectAllHack(); }\n\t    if (captureRightClick) {\n\t      e_stop(e);\n\t      var mouseup = function () {\n\t        off(window, \"mouseup\", mouseup);\n\t        setTimeout(rehide, 20);\n\t      };\n\t      on(window, \"mouseup\", mouseup);\n\t    } else {\n\t      setTimeout(rehide, 50);\n\t    }\n\t  };\n\n\t  TextareaInput.prototype.readOnlyChanged = function (val) {\n\t    if (!val) { this.reset(); }\n\t    this.textarea.disabled = val == \"nocursor\";\n\t    this.textarea.readOnly = !!val;\n\t  };\n\n\t  TextareaInput.prototype.setUneditable = function () {};\n\n\t  TextareaInput.prototype.needsContentAttribute = false;\n\n\t  function fromTextArea(textarea, options) {\n\t    options = options ? copyObj(options) : {};\n\t    options.value = textarea.value;\n\t    if (!options.tabindex && textarea.tabIndex)\n\t      { options.tabindex = textarea.tabIndex; }\n\t    if (!options.placeholder && textarea.placeholder)\n\t      { options.placeholder = textarea.placeholder; }\n\t    // Set autofocus to true if this textarea is focused, or if it has\n\t    // autofocus and no other element is focused.\n\t    if (options.autofocus == null) {\n\t      var hasFocus = activeElt();\n\t      options.autofocus = hasFocus == textarea ||\n\t        textarea.getAttribute(\"autofocus\") != null && hasFocus == document.body;\n\t    }\n\n\t    function save() {textarea.value = cm.getValue();}\n\n\t    var realSubmit;\n\t    if (textarea.form) {\n\t      on(textarea.form, \"submit\", save);\n\t      // Deplorable hack to make the submit method do the right thing.\n\t      if (!options.leaveSubmitMethodAlone) {\n\t        var form = textarea.form;\n\t        realSubmit = form.submit;\n\t        try {\n\t          var wrappedSubmit = form.submit = function () {\n\t            save();\n\t            form.submit = realSubmit;\n\t            form.submit();\n\t            form.submit = wrappedSubmit;\n\t          };\n\t        } catch(e) {}\n\t      }\n\t    }\n\n\t    options.finishInit = function (cm) {\n\t      cm.save = save;\n\t      cm.getTextArea = function () { return textarea; };\n\t      cm.toTextArea = function () {\n\t        cm.toTextArea = isNaN; // Prevent this from being ran twice\n\t        save();\n\t        textarea.parentNode.removeChild(cm.getWrapperElement());\n\t        textarea.style.display = \"\";\n\t        if (textarea.form) {\n\t          off(textarea.form, \"submit\", save);\n\t          if (!options.leaveSubmitMethodAlone && typeof textarea.form.submit == \"function\")\n\t            { textarea.form.submit = realSubmit; }\n\t        }\n\t      };\n\t    };\n\n\t    textarea.style.display = \"none\";\n\t    var cm = CodeMirror(function (node) { return textarea.parentNode.insertBefore(node, textarea.nextSibling); },\n\t      options);\n\t    return cm\n\t  }\n\n\t  function addLegacyProps(CodeMirror) {\n\t    CodeMirror.off = off;\n\t    CodeMirror.on = on;\n\t    CodeMirror.wheelEventPixels = wheelEventPixels;\n\t    CodeMirror.Doc = Doc;\n\t    CodeMirror.splitLines = splitLinesAuto;\n\t    CodeMirror.countColumn = countColumn;\n\t    CodeMirror.findColumn = findColumn;\n\t    CodeMirror.isWordChar = isWordCharBasic;\n\t    CodeMirror.Pass = Pass;\n\t    CodeMirror.signal = signal;\n\t    CodeMirror.Line = Line;\n\t    CodeMirror.changeEnd = changeEnd;\n\t    CodeMirror.scrollbarModel = scrollbarModel;\n\t    CodeMirror.Pos = Pos;\n\t    CodeMirror.cmpPos = cmp;\n\t    CodeMirror.modes = modes;\n\t    CodeMirror.mimeModes = mimeModes;\n\t    CodeMirror.resolveMode = resolveMode;\n\t    CodeMirror.getMode = getMode;\n\t    CodeMirror.modeExtensions = modeExtensions;\n\t    CodeMirror.extendMode = extendMode;\n\t    CodeMirror.copyState = copyState;\n\t    CodeMirror.startState = startState;\n\t    CodeMirror.innerMode = innerMode;\n\t    CodeMirror.commands = commands;\n\t    CodeMirror.keyMap = keyMap;\n\t    CodeMirror.keyName = keyName;\n\t    CodeMirror.isModifierKey = isModifierKey;\n\t    CodeMirror.lookupKey = lookupKey;\n\t    CodeMirror.normalizeKeyMap = normalizeKeyMap;\n\t    CodeMirror.StringStream = StringStream;\n\t    CodeMirror.SharedTextMarker = SharedTextMarker;\n\t    CodeMirror.TextMarker = TextMarker;\n\t    CodeMirror.LineWidget = LineWidget;\n\t    CodeMirror.e_preventDefault = e_preventDefault;\n\t    CodeMirror.e_stopPropagation = e_stopPropagation;\n\t    CodeMirror.e_stop = e_stop;\n\t    CodeMirror.addClass = addClass;\n\t    CodeMirror.contains = contains;\n\t    CodeMirror.rmClass = rmClass;\n\t    CodeMirror.keyNames = keyNames;\n\t  }\n\n\t  // EDITOR CONSTRUCTOR\n\n\t  defineOptions(CodeMirror);\n\n\t  addEditorMethods(CodeMirror);\n\n\t  // Set up methods on CodeMirror's prototype to redirect to the editor's document.\n\t  var dontDelegate = \"iter insert remove copy getEditor constructor\".split(\" \");\n\t  for (var prop in Doc.prototype) { if (Doc.prototype.hasOwnProperty(prop) && indexOf(dontDelegate, prop) < 0)\n\t    { CodeMirror.prototype[prop] = (function(method) {\n\t      return function() {return method.apply(this.doc, arguments)}\n\t    })(Doc.prototype[prop]); } }\n\n\t  eventMixin(Doc);\n\t  CodeMirror.inputStyles = {\"textarea\": TextareaInput, \"contenteditable\": ContentEditableInput};\n\n\t  // Extra arguments are stored as the mode's dependencies, which is\n\t  // used by (legacy) mechanisms like loadmode.js to automatically\n\t  // load a mode. (Preferred mechanism is the require/define calls.)\n\t  CodeMirror.defineMode = function(name/*, mode, …*/) {\n\t    if (!CodeMirror.defaults.mode && name != \"null\") { CodeMirror.defaults.mode = name; }\n\t    defineMode.apply(this, arguments);\n\t  };\n\n\t  CodeMirror.defineMIME = defineMIME;\n\n\t  // Minimal default mode.\n\t  CodeMirror.defineMode(\"null\", function () { return ({token: function (stream) { return stream.skipToEnd(); }}); });\n\t  CodeMirror.defineMIME(\"text/plain\", \"null\");\n\n\t  // EXTENSIONS\n\n\t  CodeMirror.defineExtension = function (name, func) {\n\t    CodeMirror.prototype[name] = func;\n\t  };\n\t  CodeMirror.defineDocExtension = function (name, func) {\n\t    Doc.prototype[name] = func;\n\t  };\n\n\t  CodeMirror.fromTextArea = fromTextArea;\n\n\t  addLegacyProps(CodeMirror);\n\n\t  CodeMirror.version = \"5.58.2\";\n\n\t  return CodeMirror;\n\n\t})));\n\t});\n\n\tvar xml = createCommonjsModule(function (module, exports) {\n\t// CodeMirror, copyright (c) by Marijn Haverbeke and others\n\t// Distributed under an MIT license: https://codemirror.net/LICENSE\n\n\t(function(mod) {\n\t  mod(codemirror);\n\t})(function(CodeMirror) {\n\n\tvar htmlConfig = {\n\t  autoSelfClosers: {'area': true, 'base': true, 'br': true, 'col': true, 'command': true,\n\t                    'embed': true, 'frame': true, 'hr': true, 'img': true, 'input': true,\n\t                    'keygen': true, 'link': true, 'meta': true, 'param': true, 'source': true,\n\t                    'track': true, 'wbr': true, 'menuitem': true},\n\t  implicitlyClosed: {'dd': true, 'li': true, 'optgroup': true, 'option': true, 'p': true,\n\t                     'rp': true, 'rt': true, 'tbody': true, 'td': true, 'tfoot': true,\n\t                     'th': true, 'tr': true},\n\t  contextGrabbers: {\n\t    'dd': {'dd': true, 'dt': true},\n\t    'dt': {'dd': true, 'dt': true},\n\t    'li': {'li': true},\n\t    'option': {'option': true, 'optgroup': true},\n\t    'optgroup': {'optgroup': true},\n\t    'p': {'address': true, 'article': true, 'aside': true, 'blockquote': true, 'dir': true,\n\t          'div': true, 'dl': true, 'fieldset': true, 'footer': true, 'form': true,\n\t          'h1': true, 'h2': true, 'h3': true, 'h4': true, 'h5': true, 'h6': true,\n\t          'header': true, 'hgroup': true, 'hr': true, 'menu': true, 'nav': true, 'ol': true,\n\t          'p': true, 'pre': true, 'section': true, 'table': true, 'ul': true},\n\t    'rp': {'rp': true, 'rt': true},\n\t    'rt': {'rp': true, 'rt': true},\n\t    'tbody': {'tbody': true, 'tfoot': true},\n\t    'td': {'td': true, 'th': true},\n\t    'tfoot': {'tbody': true},\n\t    'th': {'td': true, 'th': true},\n\t    'thead': {'tbody': true, 'tfoot': true},\n\t    'tr': {'tr': true}\n\t  },\n\t  doNotIndent: {\"pre\": true},\n\t  allowUnquoted: true,\n\t  allowMissing: true,\n\t  caseFold: true\n\t};\n\n\tvar xmlConfig = {\n\t  autoSelfClosers: {},\n\t  implicitlyClosed: {},\n\t  contextGrabbers: {},\n\t  doNotIndent: {},\n\t  allowUnquoted: false,\n\t  allowMissing: false,\n\t  allowMissingTagName: false,\n\t  caseFold: false\n\t};\n\n\tCodeMirror.defineMode(\"xml\", function(editorConf, config_) {\n\t  var indentUnit = editorConf.indentUnit;\n\t  var config = {};\n\t  var defaults = config_.htmlMode ? htmlConfig : xmlConfig;\n\t  for (var prop in defaults) config[prop] = defaults[prop];\n\t  for (var prop in config_) config[prop] = config_[prop];\n\n\t  // Return variables for tokenizers\n\t  var type, setStyle;\n\n\t  function inText(stream, state) {\n\t    function chain(parser) {\n\t      state.tokenize = parser;\n\t      return parser(stream, state);\n\t    }\n\n\t    var ch = stream.next();\n\t    if (ch == \"<\") {\n\t      if (stream.eat(\"!\")) {\n\t        if (stream.eat(\"[\")) {\n\t          if (stream.match(\"CDATA[\")) return chain(inBlock(\"atom\", \"]]>\"));\n\t          else return null;\n\t        } else if (stream.match(\"--\")) {\n\t          return chain(inBlock(\"comment\", \"-->\"));\n\t        } else if (stream.match(\"DOCTYPE\", true, true)) {\n\t          stream.eatWhile(/[\\w\\._\\-]/);\n\t          return chain(doctype(1));\n\t        } else {\n\t          return null;\n\t        }\n\t      } else if (stream.eat(\"?\")) {\n\t        stream.eatWhile(/[\\w\\._\\-]/);\n\t        state.tokenize = inBlock(\"meta\", \"?>\");\n\t        return \"meta\";\n\t      } else {\n\t        type = stream.eat(\"/\") ? \"closeTag\" : \"openTag\";\n\t        state.tokenize = inTag;\n\t        return \"tag bracket\";\n\t      }\n\t    } else if (ch == \"&\") {\n\t      var ok;\n\t      if (stream.eat(\"#\")) {\n\t        if (stream.eat(\"x\")) {\n\t          ok = stream.eatWhile(/[a-fA-F\\d]/) && stream.eat(\";\");\n\t        } else {\n\t          ok = stream.eatWhile(/[\\d]/) && stream.eat(\";\");\n\t        }\n\t      } else {\n\t        ok = stream.eatWhile(/[\\w\\.\\-:]/) && stream.eat(\";\");\n\t      }\n\t      return ok ? \"atom\" : \"error\";\n\t    } else {\n\t      stream.eatWhile(/[^&<]/);\n\t      return null;\n\t    }\n\t  }\n\t  inText.isInText = true;\n\n\t  function inTag(stream, state) {\n\t    var ch = stream.next();\n\t    if (ch == \">\" || (ch == \"/\" && stream.eat(\">\"))) {\n\t      state.tokenize = inText;\n\t      type = ch == \">\" ? \"endTag\" : \"selfcloseTag\";\n\t      return \"tag bracket\";\n\t    } else if (ch == \"=\") {\n\t      type = \"equals\";\n\t      return null;\n\t    } else if (ch == \"<\") {\n\t      state.tokenize = inText;\n\t      state.state = baseState;\n\t      state.tagName = state.tagStart = null;\n\t      var next = state.tokenize(stream, state);\n\t      return next ? next + \" tag error\" : \"tag error\";\n\t    } else if (/[\\'\\\"]/.test(ch)) {\n\t      state.tokenize = inAttribute(ch);\n\t      state.stringStartCol = stream.column();\n\t      return state.tokenize(stream, state);\n\t    } else {\n\t      stream.match(/^[^\\s\\u00a0=<>\\\"\\']*[^\\s\\u00a0=<>\\\"\\'\\/]/);\n\t      return \"word\";\n\t    }\n\t  }\n\n\t  function inAttribute(quote) {\n\t    var closure = function(stream, state) {\n\t      while (!stream.eol()) {\n\t        if (stream.next() == quote) {\n\t          state.tokenize = inTag;\n\t          break;\n\t        }\n\t      }\n\t      return \"string\";\n\t    };\n\t    closure.isInAttribute = true;\n\t    return closure;\n\t  }\n\n\t  function inBlock(style, terminator) {\n\t    return function(stream, state) {\n\t      while (!stream.eol()) {\n\t        if (stream.match(terminator)) {\n\t          state.tokenize = inText;\n\t          break;\n\t        }\n\t        stream.next();\n\t      }\n\t      return style;\n\t    }\n\t  }\n\n\t  function doctype(depth) {\n\t    return function(stream, state) {\n\t      var ch;\n\t      while ((ch = stream.next()) != null) {\n\t        if (ch == \"<\") {\n\t          state.tokenize = doctype(depth + 1);\n\t          return state.tokenize(stream, state);\n\t        } else if (ch == \">\") {\n\t          if (depth == 1) {\n\t            state.tokenize = inText;\n\t            break;\n\t          } else {\n\t            state.tokenize = doctype(depth - 1);\n\t            return state.tokenize(stream, state);\n\t          }\n\t        }\n\t      }\n\t      return \"meta\";\n\t    };\n\t  }\n\n\t  function Context(state, tagName, startOfLine) {\n\t    this.prev = state.context;\n\t    this.tagName = tagName;\n\t    this.indent = state.indented;\n\t    this.startOfLine = startOfLine;\n\t    if (config.doNotIndent.hasOwnProperty(tagName) || (state.context && state.context.noIndent))\n\t      this.noIndent = true;\n\t  }\n\t  function popContext(state) {\n\t    if (state.context) state.context = state.context.prev;\n\t  }\n\t  function maybePopContext(state, nextTagName) {\n\t    var parentTagName;\n\t    while (true) {\n\t      if (!state.context) {\n\t        return;\n\t      }\n\t      parentTagName = state.context.tagName;\n\t      if (!config.contextGrabbers.hasOwnProperty(parentTagName) ||\n\t          !config.contextGrabbers[parentTagName].hasOwnProperty(nextTagName)) {\n\t        return;\n\t      }\n\t      popContext(state);\n\t    }\n\t  }\n\n\t  function baseState(type, stream, state) {\n\t    if (type == \"openTag\") {\n\t      state.tagStart = stream.column();\n\t      return tagNameState;\n\t    } else if (type == \"closeTag\") {\n\t      return closeTagNameState;\n\t    } else {\n\t      return baseState;\n\t    }\n\t  }\n\t  function tagNameState(type, stream, state) {\n\t    if (type == \"word\") {\n\t      state.tagName = stream.current();\n\t      setStyle = \"tag\";\n\t      return attrState;\n\t    } else if (config.allowMissingTagName && type == \"endTag\") {\n\t      setStyle = \"tag bracket\";\n\t      return attrState(type, stream, state);\n\t    } else {\n\t      setStyle = \"error\";\n\t      return tagNameState;\n\t    }\n\t  }\n\t  function closeTagNameState(type, stream, state) {\n\t    if (type == \"word\") {\n\t      var tagName = stream.current();\n\t      if (state.context && state.context.tagName != tagName &&\n\t          config.implicitlyClosed.hasOwnProperty(state.context.tagName))\n\t        popContext(state);\n\t      if ((state.context && state.context.tagName == tagName) || config.matchClosing === false) {\n\t        setStyle = \"tag\";\n\t        return closeState;\n\t      } else {\n\t        setStyle = \"tag error\";\n\t        return closeStateErr;\n\t      }\n\t    } else if (config.allowMissingTagName && type == \"endTag\") {\n\t      setStyle = \"tag bracket\";\n\t      return closeState(type, stream, state);\n\t    } else {\n\t      setStyle = \"error\";\n\t      return closeStateErr;\n\t    }\n\t  }\n\n\t  function closeState(type, _stream, state) {\n\t    if (type != \"endTag\") {\n\t      setStyle = \"error\";\n\t      return closeState;\n\t    }\n\t    popContext(state);\n\t    return baseState;\n\t  }\n\t  function closeStateErr(type, stream, state) {\n\t    setStyle = \"error\";\n\t    return closeState(type, stream, state);\n\t  }\n\n\t  function attrState(type, _stream, state) {\n\t    if (type == \"word\") {\n\t      setStyle = \"attribute\";\n\t      return attrEqState;\n\t    } else if (type == \"endTag\" || type == \"selfcloseTag\") {\n\t      var tagName = state.tagName, tagStart = state.tagStart;\n\t      state.tagName = state.tagStart = null;\n\t      if (type == \"selfcloseTag\" ||\n\t          config.autoSelfClosers.hasOwnProperty(tagName)) {\n\t        maybePopContext(state, tagName);\n\t      } else {\n\t        maybePopContext(state, tagName);\n\t        state.context = new Context(state, tagName, tagStart == state.indented);\n\t      }\n\t      return baseState;\n\t    }\n\t    setStyle = \"error\";\n\t    return attrState;\n\t  }\n\t  function attrEqState(type, stream, state) {\n\t    if (type == \"equals\") return attrValueState;\n\t    if (!config.allowMissing) setStyle = \"error\";\n\t    return attrState(type, stream, state);\n\t  }\n\t  function attrValueState(type, stream, state) {\n\t    if (type == \"string\") return attrContinuedState;\n\t    if (type == \"word\" && config.allowUnquoted) {setStyle = \"string\"; return attrState;}\n\t    setStyle = \"error\";\n\t    return attrState(type, stream, state);\n\t  }\n\t  function attrContinuedState(type, stream, state) {\n\t    if (type == \"string\") return attrContinuedState;\n\t    return attrState(type, stream, state);\n\t  }\n\n\t  return {\n\t    startState: function(baseIndent) {\n\t      var state = {tokenize: inText,\n\t                   state: baseState,\n\t                   indented: baseIndent || 0,\n\t                   tagName: null, tagStart: null,\n\t                   context: null};\n\t      if (baseIndent != null) state.baseIndent = baseIndent;\n\t      return state\n\t    },\n\n\t    token: function(stream, state) {\n\t      if (!state.tagName && stream.sol())\n\t        state.indented = stream.indentation();\n\n\t      if (stream.eatSpace()) return null;\n\t      type = null;\n\t      var style = state.tokenize(stream, state);\n\t      if ((style || type) && style != \"comment\") {\n\t        setStyle = null;\n\t        state.state = state.state(type || style, stream, state);\n\t        if (setStyle)\n\t          style = setStyle == \"error\" ? style + \" error\" : setStyle;\n\t      }\n\t      return style;\n\t    },\n\n\t    indent: function(state, textAfter, fullLine) {\n\t      var context = state.context;\n\t      // Indent multi-line strings (e.g. css).\n\t      if (state.tokenize.isInAttribute) {\n\t        if (state.tagStart == state.indented)\n\t          return state.stringStartCol + 1;\n\t        else\n\t          return state.indented + indentUnit;\n\t      }\n\t      if (context && context.noIndent) return CodeMirror.Pass;\n\t      if (state.tokenize != inTag && state.tokenize != inText)\n\t        return fullLine ? fullLine.match(/^(\\s*)/)[0].length : 0;\n\t      // Indent the starts of attribute names.\n\t      if (state.tagName) {\n\t        if (config.multilineTagIndentPastTag !== false)\n\t          return state.tagStart + state.tagName.length + 2;\n\t        else\n\t          return state.tagStart + indentUnit * (config.multilineTagIndentFactor || 1);\n\t      }\n\t      if (config.alignCDATA && /<!\\[CDATA\\[/.test(textAfter)) return 0;\n\t      var tagAfter = textAfter && /^<(\\/)?([\\w_:\\.-]*)/.exec(textAfter);\n\t      if (tagAfter && tagAfter[1]) { // Closing tag spotted\n\t        while (context) {\n\t          if (context.tagName == tagAfter[2]) {\n\t            context = context.prev;\n\t            break;\n\t          } else if (config.implicitlyClosed.hasOwnProperty(context.tagName)) {\n\t            context = context.prev;\n\t          } else {\n\t            break;\n\t          }\n\t        }\n\t      } else if (tagAfter) { // Opening tag spotted\n\t        while (context) {\n\t          var grabbers = config.contextGrabbers[context.tagName];\n\t          if (grabbers && grabbers.hasOwnProperty(tagAfter[2]))\n\t            context = context.prev;\n\t          else\n\t            break;\n\t        }\n\t      }\n\t      while (context && context.prev && !context.startOfLine)\n\t        context = context.prev;\n\t      if (context) return context.indent + indentUnit;\n\t      else return state.baseIndent || 0;\n\t    },\n\n\t    electricInput: /<\\/[\\s\\w:]+>$/,\n\t    blockCommentStart: \"<!--\",\n\t    blockCommentEnd: \"-->\",\n\n\t    configuration: config.htmlMode ? \"html\" : \"xml\",\n\t    helperType: config.htmlMode ? \"html\" : \"xml\",\n\n\t    skipAttribute: function(state) {\n\t      if (state.state == attrValueState)\n\t        state.state = attrState;\n\t    },\n\n\t    xmlCurrentTag: function(state) {\n\t      return state.tagName ? {name: state.tagName, close: state.type == \"closeTag\"} : null\n\t    },\n\n\t    xmlCurrentContext: function(state) {\n\t      var context = [];\n\t      for (var cx = state.context; cx; cx = cx.prev)\n\t        if (cx.tagName) context.push(cx.tagName);\n\t      return context.reverse()\n\t    }\n\t  };\n\t});\n\n\tCodeMirror.defineMIME(\"text/xml\", \"xml\");\n\tCodeMirror.defineMIME(\"application/xml\", \"xml\");\n\tif (!CodeMirror.mimeModes.hasOwnProperty(\"text/html\"))\n\t  CodeMirror.defineMIME(\"text/html\", {name: \"xml\", htmlMode: true});\n\n\t});\n\t});\n\n\tvar meta = createCommonjsModule(function (module, exports) {\n\t// CodeMirror, copyright (c) by Marijn Haverbeke and others\n\t// Distributed under an MIT license: https://codemirror.net/LICENSE\n\n\t(function(mod) {\n\t  mod(codemirror);\n\t})(function(CodeMirror) {\n\n\t  CodeMirror.modeInfo = [\n\t    {name: \"APL\", mime: \"text/apl\", mode: \"apl\", ext: [\"dyalog\", \"apl\"]},\n\t    {name: \"PGP\", mimes: [\"application/pgp\", \"application/pgp-encrypted\", \"application/pgp-keys\", \"application/pgp-signature\"], mode: \"asciiarmor\", ext: [\"asc\", \"pgp\", \"sig\"]},\n\t    {name: \"ASN.1\", mime: \"text/x-ttcn-asn\", mode: \"asn.1\", ext: [\"asn\", \"asn1\"]},\n\t    {name: \"Asterisk\", mime: \"text/x-asterisk\", mode: \"asterisk\", file: /^extensions\\.conf$/i},\n\t    {name: \"Brainfuck\", mime: \"text/x-brainfuck\", mode: \"brainfuck\", ext: [\"b\", \"bf\"]},\n\t    {name: \"C\", mime: \"text/x-csrc\", mode: \"clike\", ext: [\"c\", \"h\", \"ino\"]},\n\t    {name: \"C++\", mime: \"text/x-c++src\", mode: \"clike\", ext: [\"cpp\", \"c++\", \"cc\", \"cxx\", \"hpp\", \"h++\", \"hh\", \"hxx\"], alias: [\"cpp\"]},\n\t    {name: \"Cobol\", mime: \"text/x-cobol\", mode: \"cobol\", ext: [\"cob\", \"cpy\"]},\n\t    {name: \"C#\", mime: \"text/x-csharp\", mode: \"clike\", ext: [\"cs\"], alias: [\"csharp\", \"cs\"]},\n\t    {name: \"Clojure\", mime: \"text/x-clojure\", mode: \"clojure\", ext: [\"clj\", \"cljc\", \"cljx\"]},\n\t    {name: \"ClojureScript\", mime: \"text/x-clojurescript\", mode: \"clojure\", ext: [\"cljs\"]},\n\t    {name: \"Closure Stylesheets (GSS)\", mime: \"text/x-gss\", mode: \"css\", ext: [\"gss\"]},\n\t    {name: \"CMake\", mime: \"text/x-cmake\", mode: \"cmake\", ext: [\"cmake\", \"cmake.in\"], file: /^CMakeLists\\.txt$/},\n\t    {name: \"CoffeeScript\", mimes: [\"application/vnd.coffeescript\", \"text/coffeescript\", \"text/x-coffeescript\"], mode: \"coffeescript\", ext: [\"coffee\"], alias: [\"coffee\", \"coffee-script\"]},\n\t    {name: \"Common Lisp\", mime: \"text/x-common-lisp\", mode: \"commonlisp\", ext: [\"cl\", \"lisp\", \"el\"], alias: [\"lisp\"]},\n\t    {name: \"Cypher\", mime: \"application/x-cypher-query\", mode: \"cypher\", ext: [\"cyp\", \"cypher\"]},\n\t    {name: \"Cython\", mime: \"text/x-cython\", mode: \"python\", ext: [\"pyx\", \"pxd\", \"pxi\"]},\n\t    {name: \"Crystal\", mime: \"text/x-crystal\", mode: \"crystal\", ext: [\"cr\"]},\n\t    {name: \"CSS\", mime: \"text/css\", mode: \"css\", ext: [\"css\"]},\n\t    {name: \"CQL\", mime: \"text/x-cassandra\", mode: \"sql\", ext: [\"cql\"]},\n\t    {name: \"D\", mime: \"text/x-d\", mode: \"d\", ext: [\"d\"]},\n\t    {name: \"Dart\", mimes: [\"application/dart\", \"text/x-dart\"], mode: \"dart\", ext: [\"dart\"]},\n\t    {name: \"diff\", mime: \"text/x-diff\", mode: \"diff\", ext: [\"diff\", \"patch\"]},\n\t    {name: \"Django\", mime: \"text/x-django\", mode: \"django\"},\n\t    {name: \"Dockerfile\", mime: \"text/x-dockerfile\", mode: \"dockerfile\", file: /^Dockerfile$/},\n\t    {name: \"DTD\", mime: \"application/xml-dtd\", mode: \"dtd\", ext: [\"dtd\"]},\n\t    {name: \"Dylan\", mime: \"text/x-dylan\", mode: \"dylan\", ext: [\"dylan\", \"dyl\", \"intr\"]},\n\t    {name: \"EBNF\", mime: \"text/x-ebnf\", mode: \"ebnf\"},\n\t    {name: \"ECL\", mime: \"text/x-ecl\", mode: \"ecl\", ext: [\"ecl\"]},\n\t    {name: \"edn\", mime: \"application/edn\", mode: \"clojure\", ext: [\"edn\"]},\n\t    {name: \"Eiffel\", mime: \"text/x-eiffel\", mode: \"eiffel\", ext: [\"e\"]},\n\t    {name: \"Elm\", mime: \"text/x-elm\", mode: \"elm\", ext: [\"elm\"]},\n\t    {name: \"Embedded Javascript\", mime: \"application/x-ejs\", mode: \"htmlembedded\", ext: [\"ejs\"]},\n\t    {name: \"Embedded Ruby\", mime: \"application/x-erb\", mode: \"htmlembedded\", ext: [\"erb\"]},\n\t    {name: \"Erlang\", mime: \"text/x-erlang\", mode: \"erlang\", ext: [\"erl\"]},\n\t    {name: \"Esper\", mime: \"text/x-esper\", mode: \"sql\"},\n\t    {name: \"Factor\", mime: \"text/x-factor\", mode: \"factor\", ext: [\"factor\"]},\n\t    {name: \"FCL\", mime: \"text/x-fcl\", mode: \"fcl\"},\n\t    {name: \"Forth\", mime: \"text/x-forth\", mode: \"forth\", ext: [\"forth\", \"fth\", \"4th\"]},\n\t    {name: \"Fortran\", mime: \"text/x-fortran\", mode: \"fortran\", ext: [\"f\", \"for\", \"f77\", \"f90\", \"f95\"]},\n\t    {name: \"F#\", mime: \"text/x-fsharp\", mode: \"mllike\", ext: [\"fs\"], alias: [\"fsharp\"]},\n\t    {name: \"Gas\", mime: \"text/x-gas\", mode: \"gas\", ext: [\"s\"]},\n\t    {name: \"Gherkin\", mime: \"text/x-feature\", mode: \"gherkin\", ext: [\"feature\"]},\n\t    {name: \"GitHub Flavored Markdown\", mime: \"text/x-gfm\", mode: \"gfm\", file: /^(readme|contributing|history)\\.md$/i},\n\t    {name: \"Go\", mime: \"text/x-go\", mode: \"go\", ext: [\"go\"]},\n\t    {name: \"Groovy\", mime: \"text/x-groovy\", mode: \"groovy\", ext: [\"groovy\", \"gradle\"], file: /^Jenkinsfile$/},\n\t    {name: \"HAML\", mime: \"text/x-haml\", mode: \"haml\", ext: [\"haml\"]},\n\t    {name: \"Haskell\", mime: \"text/x-haskell\", mode: \"haskell\", ext: [\"hs\"]},\n\t    {name: \"Haskell (Literate)\", mime: \"text/x-literate-haskell\", mode: \"haskell-literate\", ext: [\"lhs\"]},\n\t    {name: \"Haxe\", mime: \"text/x-haxe\", mode: \"haxe\", ext: [\"hx\"]},\n\t    {name: \"HXML\", mime: \"text/x-hxml\", mode: \"haxe\", ext: [\"hxml\"]},\n\t    {name: \"ASP.NET\", mime: \"application/x-aspx\", mode: \"htmlembedded\", ext: [\"aspx\"], alias: [\"asp\", \"aspx\"]},\n\t    {name: \"HTML\", mime: \"text/html\", mode: \"htmlmixed\", ext: [\"html\", \"htm\", \"handlebars\", \"hbs\"], alias: [\"xhtml\"]},\n\t    {name: \"HTTP\", mime: \"message/http\", mode: \"http\"},\n\t    {name: \"IDL\", mime: \"text/x-idl\", mode: \"idl\", ext: [\"pro\"]},\n\t    {name: \"Pug\", mime: \"text/x-pug\", mode: \"pug\", ext: [\"jade\", \"pug\"], alias: [\"jade\"]},\n\t    {name: \"Java\", mime: \"text/x-java\", mode: \"clike\", ext: [\"java\"]},\n\t    {name: \"Java Server Pages\", mime: \"application/x-jsp\", mode: \"htmlembedded\", ext: [\"jsp\"], alias: [\"jsp\"]},\n\t    {name: \"JavaScript\", mimes: [\"text/javascript\", \"text/ecmascript\", \"application/javascript\", \"application/x-javascript\", \"application/ecmascript\"],\n\t     mode: \"javascript\", ext: [\"js\"], alias: [\"ecmascript\", \"js\", \"node\"]},\n\t    {name: \"JSON\", mimes: [\"application/json\", \"application/x-json\"], mode: \"javascript\", ext: [\"json\", \"map\"], alias: [\"json5\"]},\n\t    {name: \"JSON-LD\", mime: \"application/ld+json\", mode: \"javascript\", ext: [\"jsonld\"], alias: [\"jsonld\"]},\n\t    {name: \"JSX\", mime: \"text/jsx\", mode: \"jsx\", ext: [\"jsx\"]},\n\t    {name: \"Jinja2\", mime: \"text/jinja2\", mode: \"jinja2\", ext: [\"j2\", \"jinja\", \"jinja2\"]},\n\t    {name: \"Julia\", mime: \"text/x-julia\", mode: \"julia\", ext: [\"jl\"]},\n\t    {name: \"Kotlin\", mime: \"text/x-kotlin\", mode: \"clike\", ext: [\"kt\"]},\n\t    {name: \"LESS\", mime: \"text/x-less\", mode: \"css\", ext: [\"less\"]},\n\t    {name: \"LiveScript\", mime: \"text/x-livescript\", mode: \"livescript\", ext: [\"ls\"], alias: [\"ls\"]},\n\t    {name: \"Lua\", mime: \"text/x-lua\", mode: \"lua\", ext: [\"lua\"]},\n\t    {name: \"Markdown\", mime: \"text/x-markdown\", mode: \"markdown\", ext: [\"markdown\", \"md\", \"mkd\"]},\n\t    {name: \"mIRC\", mime: \"text/mirc\", mode: \"mirc\"},\n\t    {name: \"MariaDB SQL\", mime: \"text/x-mariadb\", mode: \"sql\"},\n\t    {name: \"Mathematica\", mime: \"text/x-mathematica\", mode: \"mathematica\", ext: [\"m\", \"nb\", \"wl\", \"wls\"]},\n\t    {name: \"Modelica\", mime: \"text/x-modelica\", mode: \"modelica\", ext: [\"mo\"]},\n\t    {name: \"MUMPS\", mime: \"text/x-mumps\", mode: \"mumps\", ext: [\"mps\"]},\n\t    {name: \"MS SQL\", mime: \"text/x-mssql\", mode: \"sql\"},\n\t    {name: \"mbox\", mime: \"application/mbox\", mode: \"mbox\", ext: [\"mbox\"]},\n\t    {name: \"MySQL\", mime: \"text/x-mysql\", mode: \"sql\"},\n\t    {name: \"Nginx\", mime: \"text/x-nginx-conf\", mode: \"nginx\", file: /nginx.*\\.conf$/i},\n\t    {name: \"NSIS\", mime: \"text/x-nsis\", mode: \"nsis\", ext: [\"nsh\", \"nsi\"]},\n\t    {name: \"NTriples\", mimes: [\"application/n-triples\", \"application/n-quads\", \"text/n-triples\"],\n\t     mode: \"ntriples\", ext: [\"nt\", \"nq\"]},\n\t    {name: \"Objective-C\", mime: \"text/x-objectivec\", mode: \"clike\", ext: [\"m\"], alias: [\"objective-c\", \"objc\"]},\n\t    {name: \"Objective-C++\", mime: \"text/x-objectivec++\", mode: \"clike\", ext: [\"mm\"], alias: [\"objective-c++\", \"objc++\"]},\n\t    {name: \"OCaml\", mime: \"text/x-ocaml\", mode: \"mllike\", ext: [\"ml\", \"mli\", \"mll\", \"mly\"]},\n\t    {name: \"Octave\", mime: \"text/x-octave\", mode: \"octave\", ext: [\"m\"]},\n\t    {name: \"Oz\", mime: \"text/x-oz\", mode: \"oz\", ext: [\"oz\"]},\n\t    {name: \"Pascal\", mime: \"text/x-pascal\", mode: \"pascal\", ext: [\"p\", \"pas\"]},\n\t    {name: \"PEG.js\", mime: \"null\", mode: \"pegjs\", ext: [\"jsonld\"]},\n\t    {name: \"Perl\", mime: \"text/x-perl\", mode: \"perl\", ext: [\"pl\", \"pm\"]},\n\t    {name: \"PHP\", mimes: [\"text/x-php\", \"application/x-httpd-php\", \"application/x-httpd-php-open\"], mode: \"php\", ext: [\"php\", \"php3\", \"php4\", \"php5\", \"php7\", \"phtml\"]},\n\t    {name: \"Pig\", mime: \"text/x-pig\", mode: \"pig\", ext: [\"pig\"]},\n\t    {name: \"Plain Text\", mime: \"text/plain\", mode: \"null\", ext: [\"txt\", \"text\", \"conf\", \"def\", \"list\", \"log\"]},\n\t    {name: \"PLSQL\", mime: \"text/x-plsql\", mode: \"sql\", ext: [\"pls\"]},\n\t    {name: \"PostgreSQL\", mime: \"text/x-pgsql\", mode: \"sql\"},\n\t    {name: \"PowerShell\", mime: \"application/x-powershell\", mode: \"powershell\", ext: [\"ps1\", \"psd1\", \"psm1\"]},\n\t    {name: \"Properties files\", mime: \"text/x-properties\", mode: \"properties\", ext: [\"properties\", \"ini\", \"in\"], alias: [\"ini\", \"properties\"]},\n\t    {name: \"ProtoBuf\", mime: \"text/x-protobuf\", mode: \"protobuf\", ext: [\"proto\"]},\n\t    {name: \"Python\", mime: \"text/x-python\", mode: \"python\", ext: [\"BUILD\", \"bzl\", \"py\", \"pyw\"], file: /^(BUCK|BUILD)$/},\n\t    {name: \"Puppet\", mime: \"text/x-puppet\", mode: \"puppet\", ext: [\"pp\"]},\n\t    {name: \"Q\", mime: \"text/x-q\", mode: \"q\", ext: [\"q\"]},\n\t    {name: \"R\", mime: \"text/x-rsrc\", mode: \"r\", ext: [\"r\", \"R\"], alias: [\"rscript\"]},\n\t    {name: \"reStructuredText\", mime: \"text/x-rst\", mode: \"rst\", ext: [\"rst\"], alias: [\"rst\"]},\n\t    {name: \"RPM Changes\", mime: \"text/x-rpm-changes\", mode: \"rpm\"},\n\t    {name: \"RPM Spec\", mime: \"text/x-rpm-spec\", mode: \"rpm\", ext: [\"spec\"]},\n\t    {name: \"Ruby\", mime: \"text/x-ruby\", mode: \"ruby\", ext: [\"rb\"], alias: [\"jruby\", \"macruby\", \"rake\", \"rb\", \"rbx\"]},\n\t    {name: \"Rust\", mime: \"text/x-rustsrc\", mode: \"rust\", ext: [\"rs\"]},\n\t    {name: \"SAS\", mime: \"text/x-sas\", mode: \"sas\", ext: [\"sas\"]},\n\t    {name: \"Sass\", mime: \"text/x-sass\", mode: \"sass\", ext: [\"sass\"]},\n\t    {name: \"Scala\", mime: \"text/x-scala\", mode: \"clike\", ext: [\"scala\"]},\n\t    {name: \"Scheme\", mime: \"text/x-scheme\", mode: \"scheme\", ext: [\"scm\", \"ss\"]},\n\t    {name: \"SCSS\", mime: \"text/x-scss\", mode: \"css\", ext: [\"scss\"]},\n\t    {name: \"Shell\", mimes: [\"text/x-sh\", \"application/x-sh\"], mode: \"shell\", ext: [\"sh\", \"ksh\", \"bash\"], alias: [\"bash\", \"sh\", \"zsh\"], file: /^PKGBUILD$/},\n\t    {name: \"Sieve\", mime: \"application/sieve\", mode: \"sieve\", ext: [\"siv\", \"sieve\"]},\n\t    {name: \"Slim\", mimes: [\"text/x-slim\", \"application/x-slim\"], mode: \"slim\", ext: [\"slim\"]},\n\t    {name: \"Smalltalk\", mime: \"text/x-stsrc\", mode: \"smalltalk\", ext: [\"st\"]},\n\t    {name: \"Smarty\", mime: \"text/x-smarty\", mode: \"smarty\", ext: [\"tpl\"]},\n\t    {name: \"Solr\", mime: \"text/x-solr\", mode: \"solr\"},\n\t    {name: \"SML\", mime: \"text/x-sml\", mode: \"mllike\", ext: [\"sml\", \"sig\", \"fun\", \"smackspec\"]},\n\t    {name: \"Soy\", mime: \"text/x-soy\", mode: \"soy\", ext: [\"soy\"], alias: [\"closure template\"]},\n\t    {name: \"SPARQL\", mime: \"application/sparql-query\", mode: \"sparql\", ext: [\"rq\", \"sparql\"], alias: [\"sparul\"]},\n\t    {name: \"Spreadsheet\", mime: \"text/x-spreadsheet\", mode: \"spreadsheet\", alias: [\"excel\", \"formula\"]},\n\t    {name: \"SQL\", mime: \"text/x-sql\", mode: \"sql\", ext: [\"sql\"]},\n\t    {name: \"SQLite\", mime: \"text/x-sqlite\", mode: \"sql\"},\n\t    {name: \"Squirrel\", mime: \"text/x-squirrel\", mode: \"clike\", ext: [\"nut\"]},\n\t    {name: \"Stylus\", mime: \"text/x-styl\", mode: \"stylus\", ext: [\"styl\"]},\n\t    {name: \"Swift\", mime: \"text/x-swift\", mode: \"swift\", ext: [\"swift\"]},\n\t    {name: \"sTeX\", mime: \"text/x-stex\", mode: \"stex\"},\n\t    {name: \"LaTeX\", mime: \"text/x-latex\", mode: \"stex\", ext: [\"text\", \"ltx\", \"tex\"], alias: [\"tex\"]},\n\t    {name: \"SystemVerilog\", mime: \"text/x-systemverilog\", mode: \"verilog\", ext: [\"v\", \"sv\", \"svh\"]},\n\t    {name: \"Tcl\", mime: \"text/x-tcl\", mode: \"tcl\", ext: [\"tcl\"]},\n\t    {name: \"Textile\", mime: \"text/x-textile\", mode: \"textile\", ext: [\"textile\"]},\n\t    {name: \"TiddlyWiki\", mime: \"text/x-tiddlywiki\", mode: \"tiddlywiki\"},\n\t    {name: \"Tiki wiki\", mime: \"text/tiki\", mode: \"tiki\"},\n\t    {name: \"TOML\", mime: \"text/x-toml\", mode: \"toml\", ext: [\"toml\"]},\n\t    {name: \"Tornado\", mime: \"text/x-tornado\", mode: \"tornado\"},\n\t    {name: \"troff\", mime: \"text/troff\", mode: \"troff\", ext: [\"1\", \"2\", \"3\", \"4\", \"5\", \"6\", \"7\", \"8\", \"9\"]},\n\t    {name: \"TTCN\", mime: \"text/x-ttcn\", mode: \"ttcn\", ext: [\"ttcn\", \"ttcn3\", \"ttcnpp\"]},\n\t    {name: \"TTCN_CFG\", mime: \"text/x-ttcn-cfg\", mode: \"ttcn-cfg\", ext: [\"cfg\"]},\n\t    {name: \"Turtle\", mime: \"text/turtle\", mode: \"turtle\", ext: [\"ttl\"]},\n\t    {name: \"TypeScript\", mime: \"application/typescript\", mode: \"javascript\", ext: [\"ts\"], alias: [\"ts\"]},\n\t    {name: \"TypeScript-JSX\", mime: \"text/typescript-jsx\", mode: \"jsx\", ext: [\"tsx\"], alias: [\"tsx\"]},\n\t    {name: \"Twig\", mime: \"text/x-twig\", mode: \"twig\"},\n\t    {name: \"Web IDL\", mime: \"text/x-webidl\", mode: \"webidl\", ext: [\"webidl\"]},\n\t    {name: \"VB.NET\", mime: \"text/x-vb\", mode: \"vb\", ext: [\"vb\"]},\n\t    {name: \"VBScript\", mime: \"text/vbscript\", mode: \"vbscript\", ext: [\"vbs\"]},\n\t    {name: \"Velocity\", mime: \"text/velocity\", mode: \"velocity\", ext: [\"vtl\"]},\n\t    {name: \"Verilog\", mime: \"text/x-verilog\", mode: \"verilog\", ext: [\"v\"]},\n\t    {name: \"VHDL\", mime: \"text/x-vhdl\", mode: \"vhdl\", ext: [\"vhd\", \"vhdl\"]},\n\t    {name: \"Vue.js Component\", mimes: [\"script/x-vue\", \"text/x-vue\"], mode: \"vue\", ext: [\"vue\"]},\n\t    {name: \"XML\", mimes: [\"application/xml\", \"text/xml\"], mode: \"xml\", ext: [\"xml\", \"xsl\", \"xsd\", \"svg\"], alias: [\"rss\", \"wsdl\", \"xsd\"]},\n\t    {name: \"XQuery\", mime: \"application/xquery\", mode: \"xquery\", ext: [\"xy\", \"xquery\"]},\n\t    {name: \"Yacas\", mime: \"text/x-yacas\", mode: \"yacas\", ext: [\"ys\"]},\n\t    {name: \"YAML\", mimes: [\"text/x-yaml\", \"text/yaml\"], mode: \"yaml\", ext: [\"yaml\", \"yml\"], alias: [\"yml\"]},\n\t    {name: \"Z80\", mime: \"text/x-z80\", mode: \"z80\", ext: [\"z80\"]},\n\t    {name: \"mscgen\", mime: \"text/x-mscgen\", mode: \"mscgen\", ext: [\"mscgen\", \"mscin\", \"msc\"]},\n\t    {name: \"xu\", mime: \"text/x-xu\", mode: \"mscgen\", ext: [\"xu\"]},\n\t    {name: \"msgenny\", mime: \"text/x-msgenny\", mode: \"mscgen\", ext: [\"msgenny\"]},\n\t    {name: \"WebAssembly\", mime: \"text/webassembly\", mode: \"wast\", ext: [\"wat\", \"wast\"]},\n\t  ];\n\t  // Ensure all modes have a mime property for backwards compatibility\n\t  for (var i = 0; i < CodeMirror.modeInfo.length; i++) {\n\t    var info = CodeMirror.modeInfo[i];\n\t    if (info.mimes) info.mime = info.mimes[0];\n\t  }\n\n\t  CodeMirror.findModeByMIME = function(mime) {\n\t    mime = mime.toLowerCase();\n\t    for (var i = 0; i < CodeMirror.modeInfo.length; i++) {\n\t      var info = CodeMirror.modeInfo[i];\n\t      if (info.mime == mime) return info;\n\t      if (info.mimes) for (var j = 0; j < info.mimes.length; j++)\n\t        if (info.mimes[j] == mime) return info;\n\t    }\n\t    if (/\\+xml$/.test(mime)) return CodeMirror.findModeByMIME(\"application/xml\")\n\t    if (/\\+json$/.test(mime)) return CodeMirror.findModeByMIME(\"application/json\")\n\t  };\n\n\t  CodeMirror.findModeByExtension = function(ext) {\n\t    ext = ext.toLowerCase();\n\t    for (var i = 0; i < CodeMirror.modeInfo.length; i++) {\n\t      var info = CodeMirror.modeInfo[i];\n\t      if (info.ext) for (var j = 0; j < info.ext.length; j++)\n\t        if (info.ext[j] == ext) return info;\n\t    }\n\t  };\n\n\t  CodeMirror.findModeByFileName = function(filename) {\n\t    for (var i = 0; i < CodeMirror.modeInfo.length; i++) {\n\t      var info = CodeMirror.modeInfo[i];\n\t      if (info.file && info.file.test(filename)) return info;\n\t    }\n\t    var dot = filename.lastIndexOf(\".\");\n\t    var ext = dot > -1 && filename.substring(dot + 1, filename.length);\n\t    if (ext) return CodeMirror.findModeByExtension(ext);\n\t  };\n\n\t  CodeMirror.findModeByName = function(name) {\n\t    name = name.toLowerCase();\n\t    for (var i = 0; i < CodeMirror.modeInfo.length; i++) {\n\t      var info = CodeMirror.modeInfo[i];\n\t      if (info.name.toLowerCase() == name) return info;\n\t      if (info.alias) for (var j = 0; j < info.alias.length; j++)\n\t        if (info.alias[j].toLowerCase() == name) return info;\n\t    }\n\t  };\n\t});\n\t});\n\n\tvar markdown = createCommonjsModule(function (module, exports) {\n\t// CodeMirror, copyright (c) by Marijn Haverbeke and others\n\t// Distributed under an MIT license: https://codemirror.net/LICENSE\n\n\t(function(mod) {\n\t  mod(codemirror, xml, meta);\n\t})(function(CodeMirror) {\n\n\tCodeMirror.defineMode(\"markdown\", function(cmCfg, modeCfg) {\n\n\t  var htmlMode = CodeMirror.getMode(cmCfg, \"text/html\");\n\t  var htmlModeMissing = htmlMode.name == \"null\";\n\n\t  function getMode(name) {\n\t    if (CodeMirror.findModeByName) {\n\t      var found = CodeMirror.findModeByName(name);\n\t      if (found) name = found.mime || found.mimes[0];\n\t    }\n\t    var mode = CodeMirror.getMode(cmCfg, name);\n\t    return mode.name == \"null\" ? null : mode;\n\t  }\n\n\t  // Should characters that affect highlighting be highlighted separate?\n\t  // Does not include characters that will be output (such as `1.` and `-` for lists)\n\t  if (modeCfg.highlightFormatting === undefined)\n\t    modeCfg.highlightFormatting = false;\n\n\t  // Maximum number of nested blockquotes. Set to 0 for infinite nesting.\n\t  // Excess `>` will emit `error` token.\n\t  if (modeCfg.maxBlockquoteDepth === undefined)\n\t    modeCfg.maxBlockquoteDepth = 0;\n\n\t  // Turn on task lists? (\"- [ ] \" and \"- [x] \")\n\t  if (modeCfg.taskLists === undefined) modeCfg.taskLists = false;\n\n\t  // Turn on strikethrough syntax\n\t  if (modeCfg.strikethrough === undefined)\n\t    modeCfg.strikethrough = false;\n\n\t  if (modeCfg.emoji === undefined)\n\t    modeCfg.emoji = false;\n\n\t  if (modeCfg.fencedCodeBlockHighlighting === undefined)\n\t    modeCfg.fencedCodeBlockHighlighting = true;\n\n\t  if (modeCfg.fencedCodeBlockDefaultMode === undefined)\n\t    modeCfg.fencedCodeBlockDefaultMode = 'text/plain';\n\n\t  if (modeCfg.xml === undefined)\n\t    modeCfg.xml = true;\n\n\t  // Allow token types to be overridden by user-provided token types.\n\t  if (modeCfg.tokenTypeOverrides === undefined)\n\t    modeCfg.tokenTypeOverrides = {};\n\n\t  var tokenTypes = {\n\t    header: \"header\",\n\t    code: \"comment\",\n\t    quote: \"quote\",\n\t    list1: \"variable-2\",\n\t    list2: \"variable-3\",\n\t    list3: \"keyword\",\n\t    hr: \"hr\",\n\t    image: \"image\",\n\t    imageAltText: \"image-alt-text\",\n\t    imageMarker: \"image-marker\",\n\t    formatting: \"formatting\",\n\t    linkInline: \"link\",\n\t    linkEmail: \"link\",\n\t    linkText: \"link\",\n\t    linkHref: \"string\",\n\t    em: \"em\",\n\t    strong: \"strong\",\n\t    strikethrough: \"strikethrough\",\n\t    emoji: \"builtin\"\n\t  };\n\n\t  for (var tokenType in tokenTypes) {\n\t    if (tokenTypes.hasOwnProperty(tokenType) && modeCfg.tokenTypeOverrides[tokenType]) {\n\t      tokenTypes[tokenType] = modeCfg.tokenTypeOverrides[tokenType];\n\t    }\n\t  }\n\n\t  var hrRE = /^([*\\-_])(?:\\s*\\1){2,}\\s*$/\n\t  ,   listRE = /^(?:[*\\-+]|^[0-9]+([.)]))\\s+/\n\t  ,   taskListRE = /^\\[(x| )\\](?=\\s)/i // Must follow listRE\n\t  ,   atxHeaderRE = modeCfg.allowAtxHeaderWithoutSpace ? /^(#+)/ : /^(#+)(?: |$)/\n\t  ,   setextHeaderRE = /^ {0,3}(?:\\={1,}|-{2,})\\s*$/\n\t  ,   textRE = /^[^#!\\[\\]*_\\\\<>` \"'(~:]+/\n\t  ,   fencedCodeRE = /^(~~~+|```+)[ \\t]*([\\w\\/+#-]*)[^\\n`]*$/\n\t  ,   linkDefRE = /^\\s*\\[[^\\]]+?\\]:.*$/ // naive link-definition\n\t  ,   punctuation = /[!\"#$%&'()*+,\\-.\\/:;<=>?@\\[\\\\\\]^_`{|}~\\xA1\\xA7\\xAB\\xB6\\xB7\\xBB\\xBF\\u037E\\u0387\\u055A-\\u055F\\u0589\\u058A\\u05BE\\u05C0\\u05C3\\u05C6\\u05F3\\u05F4\\u0609\\u060A\\u060C\\u060D\\u061B\\u061E\\u061F\\u066A-\\u066D\\u06D4\\u0700-\\u070D\\u07F7-\\u07F9\\u0830-\\u083E\\u085E\\u0964\\u0965\\u0970\\u0AF0\\u0DF4\\u0E4F\\u0E5A\\u0E5B\\u0F04-\\u0F12\\u0F14\\u0F3A-\\u0F3D\\u0F85\\u0FD0-\\u0FD4\\u0FD9\\u0FDA\\u104A-\\u104F\\u10FB\\u1360-\\u1368\\u1400\\u166D\\u166E\\u169B\\u169C\\u16EB-\\u16ED\\u1735\\u1736\\u17D4-\\u17D6\\u17D8-\\u17DA\\u1800-\\u180A\\u1944\\u1945\\u1A1E\\u1A1F\\u1AA0-\\u1AA6\\u1AA8-\\u1AAD\\u1B5A-\\u1B60\\u1BFC-\\u1BFF\\u1C3B-\\u1C3F\\u1C7E\\u1C7F\\u1CC0-\\u1CC7\\u1CD3\\u2010-\\u2027\\u2030-\\u2043\\u2045-\\u2051\\u2053-\\u205E\\u207D\\u207E\\u208D\\u208E\\u2308-\\u230B\\u2329\\u232A\\u2768-\\u2775\\u27C5\\u27C6\\u27E6-\\u27EF\\u2983-\\u2998\\u29D8-\\u29DB\\u29FC\\u29FD\\u2CF9-\\u2CFC\\u2CFE\\u2CFF\\u2D70\\u2E00-\\u2E2E\\u2E30-\\u2E42\\u3001-\\u3003\\u3008-\\u3011\\u3014-\\u301F\\u3030\\u303D\\u30A0\\u30FB\\uA4FE\\uA4FF\\uA60D-\\uA60F\\uA673\\uA67E\\uA6F2-\\uA6F7\\uA874-\\uA877\\uA8CE\\uA8CF\\uA8F8-\\uA8FA\\uA8FC\\uA92E\\uA92F\\uA95F\\uA9C1-\\uA9CD\\uA9DE\\uA9DF\\uAA5C-\\uAA5F\\uAADE\\uAADF\\uAAF0\\uAAF1\\uABEB\\uFD3E\\uFD3F\\uFE10-\\uFE19\\uFE30-\\uFE52\\uFE54-\\uFE61\\uFE63\\uFE68\\uFE6A\\uFE6B\\uFF01-\\uFF03\\uFF05-\\uFF0A\\uFF0C-\\uFF0F\\uFF1A\\uFF1B\\uFF1F\\uFF20\\uFF3B-\\uFF3D\\uFF3F\\uFF5B\\uFF5D\\uFF5F-\\uFF65]|\\uD800[\\uDD00-\\uDD02\\uDF9F\\uDFD0]|\\uD801\\uDD6F|\\uD802[\\uDC57\\uDD1F\\uDD3F\\uDE50-\\uDE58\\uDE7F\\uDEF0-\\uDEF6\\uDF39-\\uDF3F\\uDF99-\\uDF9C]|\\uD804[\\uDC47-\\uDC4D\\uDCBB\\uDCBC\\uDCBE-\\uDCC1\\uDD40-\\uDD43\\uDD74\\uDD75\\uDDC5-\\uDDC9\\uDDCD\\uDDDB\\uDDDD-\\uDDDF\\uDE38-\\uDE3D\\uDEA9]|\\uD805[\\uDCC6\\uDDC1-\\uDDD7\\uDE41-\\uDE43\\uDF3C-\\uDF3E]|\\uD809[\\uDC70-\\uDC74]|\\uD81A[\\uDE6E\\uDE6F\\uDEF5\\uDF37-\\uDF3B\\uDF44]|\\uD82F\\uDC9F|\\uD836[\\uDE87-\\uDE8B]/\n\t  ,   expandedTab = \"    \"; // CommonMark specifies tab as 4 spaces\n\n\t  function switchInline(stream, state, f) {\n\t    state.f = state.inline = f;\n\t    return f(stream, state);\n\t  }\n\n\t  function switchBlock(stream, state, f) {\n\t    state.f = state.block = f;\n\t    return f(stream, state);\n\t  }\n\n\t  function lineIsEmpty(line) {\n\t    return !line || !/\\S/.test(line.string)\n\t  }\n\n\t  // Blocks\n\n\t  function blankLine(state) {\n\t    // Reset linkTitle state\n\t    state.linkTitle = false;\n\t    state.linkHref = false;\n\t    state.linkText = false;\n\t    // Reset EM state\n\t    state.em = false;\n\t    // Reset STRONG state\n\t    state.strong = false;\n\t    // Reset strikethrough state\n\t    state.strikethrough = false;\n\t    // Reset state.quote\n\t    state.quote = 0;\n\t    // Reset state.indentedCode\n\t    state.indentedCode = false;\n\t    if (state.f == htmlBlock) {\n\t      var exit = htmlModeMissing;\n\t      if (!exit) {\n\t        var inner = CodeMirror.innerMode(htmlMode, state.htmlState);\n\t        exit = inner.mode.name == \"xml\" && inner.state.tagStart === null &&\n\t          (!inner.state.context && inner.state.tokenize.isInText);\n\t      }\n\t      if (exit) {\n\t        state.f = inlineNormal;\n\t        state.block = blockNormal;\n\t        state.htmlState = null;\n\t      }\n\t    }\n\t    // Reset state.trailingSpace\n\t    state.trailingSpace = 0;\n\t    state.trailingSpaceNewLine = false;\n\t    // Mark this line as blank\n\t    state.prevLine = state.thisLine;\n\t    state.thisLine = {stream: null};\n\t    return null;\n\t  }\n\n\t  function blockNormal(stream, state) {\n\t    var firstTokenOnLine = stream.column() === state.indentation;\n\t    var prevLineLineIsEmpty = lineIsEmpty(state.prevLine.stream);\n\t    var prevLineIsIndentedCode = state.indentedCode;\n\t    var prevLineIsHr = state.prevLine.hr;\n\t    var prevLineIsList = state.list !== false;\n\t    var maxNonCodeIndentation = (state.listStack[state.listStack.length - 1] || 0) + 3;\n\n\t    state.indentedCode = false;\n\n\t    var lineIndentation = state.indentation;\n\t    // compute once per line (on first token)\n\t    if (state.indentationDiff === null) {\n\t      state.indentationDiff = state.indentation;\n\t      if (prevLineIsList) {\n\t        state.list = null;\n\t        // While this list item's marker's indentation is less than the deepest\n\t        //  list item's content's indentation,pop the deepest list item\n\t        //  indentation off the stack, and update block indentation state\n\t        while (lineIndentation < state.listStack[state.listStack.length - 1]) {\n\t          state.listStack.pop();\n\t          if (state.listStack.length) {\n\t            state.indentation = state.listStack[state.listStack.length - 1];\n\t          // less than the first list's indent -> the line is no longer a list\n\t          } else {\n\t            state.list = false;\n\t          }\n\t        }\n\t        if (state.list !== false) {\n\t          state.indentationDiff = lineIndentation - state.listStack[state.listStack.length - 1];\n\t        }\n\t      }\n\t    }\n\n\t    // not comprehensive (currently only for setext detection purposes)\n\t    var allowsInlineContinuation = (\n\t        !prevLineLineIsEmpty && !prevLineIsHr && !state.prevLine.header &&\n\t        (!prevLineIsList || !prevLineIsIndentedCode) &&\n\t        !state.prevLine.fencedCodeEnd\n\t    );\n\n\t    var isHr = (state.list === false || prevLineIsHr || prevLineLineIsEmpty) &&\n\t      state.indentation <= maxNonCodeIndentation && stream.match(hrRE);\n\n\t    var match = null;\n\t    if (state.indentationDiff >= 4 && (prevLineIsIndentedCode || state.prevLine.fencedCodeEnd ||\n\t         state.prevLine.header || prevLineLineIsEmpty)) {\n\t      stream.skipToEnd();\n\t      state.indentedCode = true;\n\t      return tokenTypes.code;\n\t    } else if (stream.eatSpace()) {\n\t      return null;\n\t    } else if (firstTokenOnLine && state.indentation <= maxNonCodeIndentation && (match = stream.match(atxHeaderRE)) && match[1].length <= 6) {\n\t      state.quote = 0;\n\t      state.header = match[1].length;\n\t      state.thisLine.header = true;\n\t      if (modeCfg.highlightFormatting) state.formatting = \"header\";\n\t      state.f = state.inline;\n\t      return getType(state);\n\t    } else if (state.indentation <= maxNonCodeIndentation && stream.eat('>')) {\n\t      state.quote = firstTokenOnLine ? 1 : state.quote + 1;\n\t      if (modeCfg.highlightFormatting) state.formatting = \"quote\";\n\t      stream.eatSpace();\n\t      return getType(state);\n\t    } else if (!isHr && !state.setext && firstTokenOnLine && state.indentation <= maxNonCodeIndentation && (match = stream.match(listRE))) {\n\t      var listType = match[1] ? \"ol\" : \"ul\";\n\n\t      state.indentation = lineIndentation + stream.current().length;\n\t      state.list = true;\n\t      state.quote = 0;\n\n\t      // Add this list item's content's indentation to the stack\n\t      state.listStack.push(state.indentation);\n\t      // Reset inline styles which shouldn't propagate aross list items\n\t      state.em = false;\n\t      state.strong = false;\n\t      state.code = false;\n\t      state.strikethrough = false;\n\n\t      if (modeCfg.taskLists && stream.match(taskListRE, false)) {\n\t        state.taskList = true;\n\t      }\n\t      state.f = state.inline;\n\t      if (modeCfg.highlightFormatting) state.formatting = [\"list\", \"list-\" + listType];\n\t      return getType(state);\n\t    } else if (firstTokenOnLine && state.indentation <= maxNonCodeIndentation && (match = stream.match(fencedCodeRE, true))) {\n\t      state.quote = 0;\n\t      state.fencedEndRE = new RegExp(match[1] + \"+ *$\");\n\t      // try switching mode\n\t      state.localMode = modeCfg.fencedCodeBlockHighlighting && getMode(match[2] || modeCfg.fencedCodeBlockDefaultMode );\n\t      if (state.localMode) state.localState = CodeMirror.startState(state.localMode);\n\t      state.f = state.block = local;\n\t      if (modeCfg.highlightFormatting) state.formatting = \"code-block\";\n\t      state.code = -1;\n\t      return getType(state);\n\t    // SETEXT has lowest block-scope precedence after HR, so check it after\n\t    //  the others (code, blockquote, list...)\n\t    } else if (\n\t      // if setext set, indicates line after ---/===\n\t      state.setext || (\n\t        // line before ---/===\n\t        (!allowsInlineContinuation || !prevLineIsList) && !state.quote && state.list === false &&\n\t        !state.code && !isHr && !linkDefRE.test(stream.string) &&\n\t        (match = stream.lookAhead(1)) && (match = match.match(setextHeaderRE))\n\t      )\n\t    ) {\n\t      if ( !state.setext ) {\n\t        state.header = match[0].charAt(0) == '=' ? 1 : 2;\n\t        state.setext = state.header;\n\t      } else {\n\t        state.header = state.setext;\n\t        // has no effect on type so we can reset it now\n\t        state.setext = 0;\n\t        stream.skipToEnd();\n\t        if (modeCfg.highlightFormatting) state.formatting = \"header\";\n\t      }\n\t      state.thisLine.header = true;\n\t      state.f = state.inline;\n\t      return getType(state);\n\t    } else if (isHr) {\n\t      stream.skipToEnd();\n\t      state.hr = true;\n\t      state.thisLine.hr = true;\n\t      return tokenTypes.hr;\n\t    } else if (stream.peek() === '[') {\n\t      return switchInline(stream, state, footnoteLink);\n\t    }\n\n\t    return switchInline(stream, state, state.inline);\n\t  }\n\n\t  function htmlBlock(stream, state) {\n\t    var style = htmlMode.token(stream, state.htmlState);\n\t    if (!htmlModeMissing) {\n\t      var inner = CodeMirror.innerMode(htmlMode, state.htmlState);\n\t      if ((inner.mode.name == \"xml\" && inner.state.tagStart === null &&\n\t           (!inner.state.context && inner.state.tokenize.isInText)) ||\n\t          (state.md_inside && stream.current().indexOf(\">\") > -1)) {\n\t        state.f = inlineNormal;\n\t        state.block = blockNormal;\n\t        state.htmlState = null;\n\t      }\n\t    }\n\t    return style;\n\t  }\n\n\t  function local(stream, state) {\n\t    var currListInd = state.listStack[state.listStack.length - 1] || 0;\n\t    var hasExitedList = state.indentation < currListInd;\n\t    var maxFencedEndInd = currListInd + 3;\n\t    if (state.fencedEndRE && state.indentation <= maxFencedEndInd && (hasExitedList || stream.match(state.fencedEndRE))) {\n\t      if (modeCfg.highlightFormatting) state.formatting = \"code-block\";\n\t      var returnType;\n\t      if (!hasExitedList) returnType = getType(state);\n\t      state.localMode = state.localState = null;\n\t      state.block = blockNormal;\n\t      state.f = inlineNormal;\n\t      state.fencedEndRE = null;\n\t      state.code = 0;\n\t      state.thisLine.fencedCodeEnd = true;\n\t      if (hasExitedList) return switchBlock(stream, state, state.block);\n\t      return returnType;\n\t    } else if (state.localMode) {\n\t      return state.localMode.token(stream, state.localState);\n\t    } else {\n\t      stream.skipToEnd();\n\t      return tokenTypes.code;\n\t    }\n\t  }\n\n\t  // Inline\n\t  function getType(state) {\n\t    var styles = [];\n\n\t    if (state.formatting) {\n\t      styles.push(tokenTypes.formatting);\n\n\t      if (typeof state.formatting === \"string\") state.formatting = [state.formatting];\n\n\t      for (var i = 0; i < state.formatting.length; i++) {\n\t        styles.push(tokenTypes.formatting + \"-\" + state.formatting[i]);\n\n\t        if (state.formatting[i] === \"header\") {\n\t          styles.push(tokenTypes.formatting + \"-\" + state.formatting[i] + \"-\" + state.header);\n\t        }\n\n\t        // Add `formatting-quote` and `formatting-quote-#` for blockquotes\n\t        // Add `error` instead if the maximum blockquote nesting depth is passed\n\t        if (state.formatting[i] === \"quote\") {\n\t          if (!modeCfg.maxBlockquoteDepth || modeCfg.maxBlockquoteDepth >= state.quote) {\n\t            styles.push(tokenTypes.formatting + \"-\" + state.formatting[i] + \"-\" + state.quote);\n\t          } else {\n\t            styles.push(\"error\");\n\t          }\n\t        }\n\t      }\n\t    }\n\n\t    if (state.taskOpen) {\n\t      styles.push(\"meta\");\n\t      return styles.length ? styles.join(' ') : null;\n\t    }\n\t    if (state.taskClosed) {\n\t      styles.push(\"property\");\n\t      return styles.length ? styles.join(' ') : null;\n\t    }\n\n\t    if (state.linkHref) {\n\t      styles.push(tokenTypes.linkHref, \"url\");\n\t    } else { // Only apply inline styles to non-url text\n\t      if (state.strong) { styles.push(tokenTypes.strong); }\n\t      if (state.em) { styles.push(tokenTypes.em); }\n\t      if (state.strikethrough) { styles.push(tokenTypes.strikethrough); }\n\t      if (state.emoji) { styles.push(tokenTypes.emoji); }\n\t      if (state.linkText) { styles.push(tokenTypes.linkText); }\n\t      if (state.code) { styles.push(tokenTypes.code); }\n\t      if (state.image) { styles.push(tokenTypes.image); }\n\t      if (state.imageAltText) { styles.push(tokenTypes.imageAltText, \"link\"); }\n\t      if (state.imageMarker) { styles.push(tokenTypes.imageMarker); }\n\t    }\n\n\t    if (state.header) { styles.push(tokenTypes.header, tokenTypes.header + \"-\" + state.header); }\n\n\t    if (state.quote) {\n\t      styles.push(tokenTypes.quote);\n\n\t      // Add `quote-#` where the maximum for `#` is modeCfg.maxBlockquoteDepth\n\t      if (!modeCfg.maxBlockquoteDepth || modeCfg.maxBlockquoteDepth >= state.quote) {\n\t        styles.push(tokenTypes.quote + \"-\" + state.quote);\n\t      } else {\n\t        styles.push(tokenTypes.quote + \"-\" + modeCfg.maxBlockquoteDepth);\n\t      }\n\t    }\n\n\t    if (state.list !== false) {\n\t      var listMod = (state.listStack.length - 1) % 3;\n\t      if (!listMod) {\n\t        styles.push(tokenTypes.list1);\n\t      } else if (listMod === 1) {\n\t        styles.push(tokenTypes.list2);\n\t      } else {\n\t        styles.push(tokenTypes.list3);\n\t      }\n\t    }\n\n\t    if (state.trailingSpaceNewLine) {\n\t      styles.push(\"trailing-space-new-line\");\n\t    } else if (state.trailingSpace) {\n\t      styles.push(\"trailing-space-\" + (state.trailingSpace % 2 ? \"a\" : \"b\"));\n\t    }\n\n\t    return styles.length ? styles.join(' ') : null;\n\t  }\n\n\t  function handleText(stream, state) {\n\t    if (stream.match(textRE, true)) {\n\t      return getType(state);\n\t    }\n\t    return undefined;\n\t  }\n\n\t  function inlineNormal(stream, state) {\n\t    var style = state.text(stream, state);\n\t    if (typeof style !== 'undefined')\n\t      return style;\n\n\t    if (state.list) { // List marker (*, +, -, 1., etc)\n\t      state.list = null;\n\t      return getType(state);\n\t    }\n\n\t    if (state.taskList) {\n\t      var taskOpen = stream.match(taskListRE, true)[1] === \" \";\n\t      if (taskOpen) state.taskOpen = true;\n\t      else state.taskClosed = true;\n\t      if (modeCfg.highlightFormatting) state.formatting = \"task\";\n\t      state.taskList = false;\n\t      return getType(state);\n\t    }\n\n\t    state.taskOpen = false;\n\t    state.taskClosed = false;\n\n\t    if (state.header && stream.match(/^#+$/, true)) {\n\t      if (modeCfg.highlightFormatting) state.formatting = \"header\";\n\t      return getType(state);\n\t    }\n\n\t    var ch = stream.next();\n\n\t    // Matches link titles present on next line\n\t    if (state.linkTitle) {\n\t      state.linkTitle = false;\n\t      var matchCh = ch;\n\t      if (ch === '(') {\n\t        matchCh = ')';\n\t      }\n\t      matchCh = (matchCh+'').replace(/([.?*+^\\[\\]\\\\(){}|-])/g, \"\\\\$1\");\n\t      var regex = '^\\\\s*(?:[^' + matchCh + '\\\\\\\\]+|\\\\\\\\\\\\\\\\|\\\\\\\\.)' + matchCh;\n\t      if (stream.match(new RegExp(regex), true)) {\n\t        return tokenTypes.linkHref;\n\t      }\n\t    }\n\n\t    // If this block is changed, it may need to be updated in GFM mode\n\t    if (ch === '`') {\n\t      var previousFormatting = state.formatting;\n\t      if (modeCfg.highlightFormatting) state.formatting = \"code\";\n\t      stream.eatWhile('`');\n\t      var count = stream.current().length;\n\t      if (state.code == 0 && (!state.quote || count == 1)) {\n\t        state.code = count;\n\t        return getType(state)\n\t      } else if (count == state.code) { // Must be exact\n\t        var t = getType(state);\n\t        state.code = 0;\n\t        return t\n\t      } else {\n\t        state.formatting = previousFormatting;\n\t        return getType(state)\n\t      }\n\t    } else if (state.code) {\n\t      return getType(state);\n\t    }\n\n\t    if (ch === '\\\\') {\n\t      stream.next();\n\t      if (modeCfg.highlightFormatting) {\n\t        var type = getType(state);\n\t        var formattingEscape = tokenTypes.formatting + \"-escape\";\n\t        return type ? type + \" \" + formattingEscape : formattingEscape;\n\t      }\n\t    }\n\n\t    if (ch === '!' && stream.match(/\\[[^\\]]*\\] ?(?:\\(|\\[)/, false)) {\n\t      state.imageMarker = true;\n\t      state.image = true;\n\t      if (modeCfg.highlightFormatting) state.formatting = \"image\";\n\t      return getType(state);\n\t    }\n\n\t    if (ch === '[' && state.imageMarker && stream.match(/[^\\]]*\\](\\(.*?\\)| ?\\[.*?\\])/, false)) {\n\t      state.imageMarker = false;\n\t      state.imageAltText = true;\n\t      if (modeCfg.highlightFormatting) state.formatting = \"image\";\n\t      return getType(state);\n\t    }\n\n\t    if (ch === ']' && state.imageAltText) {\n\t      if (modeCfg.highlightFormatting) state.formatting = \"image\";\n\t      var type = getType(state);\n\t      state.imageAltText = false;\n\t      state.image = false;\n\t      state.inline = state.f = linkHref;\n\t      return type;\n\t    }\n\n\t    if (ch === '[' && !state.image) {\n\t      if (state.linkText && stream.match(/^.*?\\]/)) return getType(state)\n\t      state.linkText = true;\n\t      if (modeCfg.highlightFormatting) state.formatting = \"link\";\n\t      return getType(state);\n\t    }\n\n\t    if (ch === ']' && state.linkText) {\n\t      if (modeCfg.highlightFormatting) state.formatting = \"link\";\n\t      var type = getType(state);\n\t      state.linkText = false;\n\t      state.inline = state.f = stream.match(/\\(.*?\\)| ?\\[.*?\\]/, false) ? linkHref : inlineNormal;\n\t      return type;\n\t    }\n\n\t    if (ch === '<' && stream.match(/^(https?|ftps?):\\/\\/(?:[^\\\\>]|\\\\.)+>/, false)) {\n\t      state.f = state.inline = linkInline;\n\t      if (modeCfg.highlightFormatting) state.formatting = \"link\";\n\t      var type = getType(state);\n\t      if (type){\n\t        type += \" \";\n\t      } else {\n\t        type = \"\";\n\t      }\n\t      return type + tokenTypes.linkInline;\n\t    }\n\n\t    if (ch === '<' && stream.match(/^[^> \\\\]+@(?:[^\\\\>]|\\\\.)+>/, false)) {\n\t      state.f = state.inline = linkInline;\n\t      if (modeCfg.highlightFormatting) state.formatting = \"link\";\n\t      var type = getType(state);\n\t      if (type){\n\t        type += \" \";\n\t      } else {\n\t        type = \"\";\n\t      }\n\t      return type + tokenTypes.linkEmail;\n\t    }\n\n\t    if (modeCfg.xml && ch === '<' && stream.match(/^(!--|\\?|!\\[CDATA\\[|[a-z][a-z0-9-]*(?:\\s+[a-z_:.\\-]+(?:\\s*=\\s*[^>]+)?)*\\s*(?:>|$))/i, false)) {\n\t      var end = stream.string.indexOf(\">\", stream.pos);\n\t      if (end != -1) {\n\t        var atts = stream.string.substring(stream.start, end);\n\t        if (/markdown\\s*=\\s*('|\"){0,1}1('|\"){0,1}/.test(atts)) state.md_inside = true;\n\t      }\n\t      stream.backUp(1);\n\t      state.htmlState = CodeMirror.startState(htmlMode);\n\t      return switchBlock(stream, state, htmlBlock);\n\t    }\n\n\t    if (modeCfg.xml && ch === '<' && stream.match(/^\\/\\w*?>/)) {\n\t      state.md_inside = false;\n\t      return \"tag\";\n\t    } else if (ch === \"*\" || ch === \"_\") {\n\t      var len = 1, before = stream.pos == 1 ? \" \" : stream.string.charAt(stream.pos - 2);\n\t      while (len < 3 && stream.eat(ch)) len++;\n\t      var after = stream.peek() || \" \";\n\t      // See http://spec.commonmark.org/0.27/#emphasis-and-strong-emphasis\n\t      var leftFlanking = !/\\s/.test(after) && (!punctuation.test(after) || /\\s/.test(before) || punctuation.test(before));\n\t      var rightFlanking = !/\\s/.test(before) && (!punctuation.test(before) || /\\s/.test(after) || punctuation.test(after));\n\t      var setEm = null, setStrong = null;\n\t      if (len % 2) { // Em\n\t        if (!state.em && leftFlanking && (ch === \"*\" || !rightFlanking || punctuation.test(before)))\n\t          setEm = true;\n\t        else if (state.em == ch && rightFlanking && (ch === \"*\" || !leftFlanking || punctuation.test(after)))\n\t          setEm = false;\n\t      }\n\t      if (len > 1) { // Strong\n\t        if (!state.strong && leftFlanking && (ch === \"*\" || !rightFlanking || punctuation.test(before)))\n\t          setStrong = true;\n\t        else if (state.strong == ch && rightFlanking && (ch === \"*\" || !leftFlanking || punctuation.test(after)))\n\t          setStrong = false;\n\t      }\n\t      if (setStrong != null || setEm != null) {\n\t        if (modeCfg.highlightFormatting) state.formatting = setEm == null ? \"strong\" : setStrong == null ? \"em\" : \"strong em\";\n\t        if (setEm === true) state.em = ch;\n\t        if (setStrong === true) state.strong = ch;\n\t        var t = getType(state);\n\t        if (setEm === false) state.em = false;\n\t        if (setStrong === false) state.strong = false;\n\t        return t\n\t      }\n\t    } else if (ch === ' ') {\n\t      if (stream.eat('*') || stream.eat('_')) { // Probably surrounded by spaces\n\t        if (stream.peek() === ' ') { // Surrounded by spaces, ignore\n\t          return getType(state);\n\t        } else { // Not surrounded by spaces, back up pointer\n\t          stream.backUp(1);\n\t        }\n\t      }\n\t    }\n\n\t    if (modeCfg.strikethrough) {\n\t      if (ch === '~' && stream.eatWhile(ch)) {\n\t        if (state.strikethrough) {// Remove strikethrough\n\t          if (modeCfg.highlightFormatting) state.formatting = \"strikethrough\";\n\t          var t = getType(state);\n\t          state.strikethrough = false;\n\t          return t;\n\t        } else if (stream.match(/^[^\\s]/, false)) {// Add strikethrough\n\t          state.strikethrough = true;\n\t          if (modeCfg.highlightFormatting) state.formatting = \"strikethrough\";\n\t          return getType(state);\n\t        }\n\t      } else if (ch === ' ') {\n\t        if (stream.match(/^~~/, true)) { // Probably surrounded by space\n\t          if (stream.peek() === ' ') { // Surrounded by spaces, ignore\n\t            return getType(state);\n\t          } else { // Not surrounded by spaces, back up pointer\n\t            stream.backUp(2);\n\t          }\n\t        }\n\t      }\n\t    }\n\n\t    if (modeCfg.emoji && ch === \":\" && stream.match(/^(?:[a-z_\\d+][a-z_\\d+-]*|\\-[a-z_\\d+][a-z_\\d+-]*):/)) {\n\t      state.emoji = true;\n\t      if (modeCfg.highlightFormatting) state.formatting = \"emoji\";\n\t      var retType = getType(state);\n\t      state.emoji = false;\n\t      return retType;\n\t    }\n\n\t    if (ch === ' ') {\n\t      if (stream.match(/^ +$/, false)) {\n\t        state.trailingSpace++;\n\t      } else if (state.trailingSpace) {\n\t        state.trailingSpaceNewLine = true;\n\t      }\n\t    }\n\n\t    return getType(state);\n\t  }\n\n\t  function linkInline(stream, state) {\n\t    var ch = stream.next();\n\n\t    if (ch === \">\") {\n\t      state.f = state.inline = inlineNormal;\n\t      if (modeCfg.highlightFormatting) state.formatting = \"link\";\n\t      var type = getType(state);\n\t      if (type){\n\t        type += \" \";\n\t      } else {\n\t        type = \"\";\n\t      }\n\t      return type + tokenTypes.linkInline;\n\t    }\n\n\t    stream.match(/^[^>]+/, true);\n\n\t    return tokenTypes.linkInline;\n\t  }\n\n\t  function linkHref(stream, state) {\n\t    // Check if space, and return NULL if so (to avoid marking the space)\n\t    if(stream.eatSpace()){\n\t      return null;\n\t    }\n\t    var ch = stream.next();\n\t    if (ch === '(' || ch === '[') {\n\t      state.f = state.inline = getLinkHrefInside(ch === \"(\" ? \")\" : \"]\");\n\t      if (modeCfg.highlightFormatting) state.formatting = \"link-string\";\n\t      state.linkHref = true;\n\t      return getType(state);\n\t    }\n\t    return 'error';\n\t  }\n\n\t  var linkRE = {\n\t    \")\": /^(?:[^\\\\\\(\\)]|\\\\.|\\((?:[^\\\\\\(\\)]|\\\\.)*\\))*?(?=\\))/,\n\t    \"]\": /^(?:[^\\\\\\[\\]]|\\\\.|\\[(?:[^\\\\\\[\\]]|\\\\.)*\\])*?(?=\\])/\n\t  };\n\n\t  function getLinkHrefInside(endChar) {\n\t    return function(stream, state) {\n\t      var ch = stream.next();\n\n\t      if (ch === endChar) {\n\t        state.f = state.inline = inlineNormal;\n\t        if (modeCfg.highlightFormatting) state.formatting = \"link-string\";\n\t        var returnState = getType(state);\n\t        state.linkHref = false;\n\t        return returnState;\n\t      }\n\n\t      stream.match(linkRE[endChar]);\n\t      state.linkHref = true;\n\t      return getType(state);\n\t    };\n\t  }\n\n\t  function footnoteLink(stream, state) {\n\t    if (stream.match(/^([^\\]\\\\]|\\\\.)*\\]:/, false)) {\n\t      state.f = footnoteLinkInside;\n\t      stream.next(); // Consume [\n\t      if (modeCfg.highlightFormatting) state.formatting = \"link\";\n\t      state.linkText = true;\n\t      return getType(state);\n\t    }\n\t    return switchInline(stream, state, inlineNormal);\n\t  }\n\n\t  function footnoteLinkInside(stream, state) {\n\t    if (stream.match(/^\\]:/, true)) {\n\t      state.f = state.inline = footnoteUrl;\n\t      if (modeCfg.highlightFormatting) state.formatting = \"link\";\n\t      var returnType = getType(state);\n\t      state.linkText = false;\n\t      return returnType;\n\t    }\n\n\t    stream.match(/^([^\\]\\\\]|\\\\.)+/, true);\n\n\t    return tokenTypes.linkText;\n\t  }\n\n\t  function footnoteUrl(stream, state) {\n\t    // Check if space, and return NULL if so (to avoid marking the space)\n\t    if(stream.eatSpace()){\n\t      return null;\n\t    }\n\t    // Match URL\n\t    stream.match(/^[^\\s]+/, true);\n\t    // Check for link title\n\t    if (stream.peek() === undefined) { // End of line, set flag to check next line\n\t      state.linkTitle = true;\n\t    } else { // More content on line, check if link title\n\t      stream.match(/^(?:\\s+(?:\"(?:[^\"\\\\]|\\\\\\\\|\\\\.)+\"|'(?:[^'\\\\]|\\\\\\\\|\\\\.)+'|\\((?:[^)\\\\]|\\\\\\\\|\\\\.)+\\)))?/, true);\n\t    }\n\t    state.f = state.inline = inlineNormal;\n\t    return tokenTypes.linkHref + \" url\";\n\t  }\n\n\t  var mode = {\n\t    startState: function() {\n\t      return {\n\t        f: blockNormal,\n\n\t        prevLine: {stream: null},\n\t        thisLine: {stream: null},\n\n\t        block: blockNormal,\n\t        htmlState: null,\n\t        indentation: 0,\n\n\t        inline: inlineNormal,\n\t        text: handleText,\n\n\t        formatting: false,\n\t        linkText: false,\n\t        linkHref: false,\n\t        linkTitle: false,\n\t        code: 0,\n\t        em: false,\n\t        strong: false,\n\t        header: 0,\n\t        setext: 0,\n\t        hr: false,\n\t        taskList: false,\n\t        list: false,\n\t        listStack: [],\n\t        quote: 0,\n\t        trailingSpace: 0,\n\t        trailingSpaceNewLine: false,\n\t        strikethrough: false,\n\t        emoji: false,\n\t        fencedEndRE: null\n\t      };\n\t    },\n\n\t    copyState: function(s) {\n\t      return {\n\t        f: s.f,\n\n\t        prevLine: s.prevLine,\n\t        thisLine: s.thisLine,\n\n\t        block: s.block,\n\t        htmlState: s.htmlState && CodeMirror.copyState(htmlMode, s.htmlState),\n\t        indentation: s.indentation,\n\n\t        localMode: s.localMode,\n\t        localState: s.localMode ? CodeMirror.copyState(s.localMode, s.localState) : null,\n\n\t        inline: s.inline,\n\t        text: s.text,\n\t        formatting: false,\n\t        linkText: s.linkText,\n\t        linkTitle: s.linkTitle,\n\t        linkHref: s.linkHref,\n\t        code: s.code,\n\t        em: s.em,\n\t        strong: s.strong,\n\t        strikethrough: s.strikethrough,\n\t        emoji: s.emoji,\n\t        header: s.header,\n\t        setext: s.setext,\n\t        hr: s.hr,\n\t        taskList: s.taskList,\n\t        list: s.list,\n\t        listStack: s.listStack.slice(0),\n\t        quote: s.quote,\n\t        indentedCode: s.indentedCode,\n\t        trailingSpace: s.trailingSpace,\n\t        trailingSpaceNewLine: s.trailingSpaceNewLine,\n\t        md_inside: s.md_inside,\n\t        fencedEndRE: s.fencedEndRE\n\t      };\n\t    },\n\n\t    token: function(stream, state) {\n\n\t      // Reset state.formatting\n\t      state.formatting = false;\n\n\t      if (stream != state.thisLine.stream) {\n\t        state.header = 0;\n\t        state.hr = false;\n\n\t        if (stream.match(/^\\s*$/, true)) {\n\t          blankLine(state);\n\t          return null;\n\t        }\n\n\t        state.prevLine = state.thisLine;\n\t        state.thisLine = {stream: stream};\n\n\t        // Reset state.taskList\n\t        state.taskList = false;\n\n\t        // Reset state.trailingSpace\n\t        state.trailingSpace = 0;\n\t        state.trailingSpaceNewLine = false;\n\n\t        if (!state.localState) {\n\t          state.f = state.block;\n\t          if (state.f != htmlBlock) {\n\t            var indentation = stream.match(/^\\s*/, true)[0].replace(/\\t/g, expandedTab).length;\n\t            state.indentation = indentation;\n\t            state.indentationDiff = null;\n\t            if (indentation > 0) return null;\n\t          }\n\t        }\n\t      }\n\t      return state.f(stream, state);\n\t    },\n\n\t    innerMode: function(state) {\n\t      if (state.block == htmlBlock) return {state: state.htmlState, mode: htmlMode};\n\t      if (state.localState) return {state: state.localState, mode: state.localMode};\n\t      return {state: state, mode: mode};\n\t    },\n\n\t    indent: function(state, textAfter, line) {\n\t      if (state.block == htmlBlock && htmlMode.indent) return htmlMode.indent(state.htmlState, textAfter, line)\n\t      if (state.localState && state.localMode.indent) return state.localMode.indent(state.localState, textAfter, line)\n\t      return CodeMirror.Pass\n\t    },\n\n\t    blankLine: blankLine,\n\n\t    getType: getType,\n\n\t    blockCommentStart: \"<!--\",\n\t    blockCommentEnd: \"-->\",\n\t    closeBrackets: \"()[]{}''\\\"\\\"``\",\n\t    fold: \"markdown\"\n\t  };\n\t  return mode;\n\t}, \"xml\");\n\n\tCodeMirror.defineMIME(\"text/markdown\", \"markdown\");\n\n\tCodeMirror.defineMIME(\"text/x-markdown\", \"markdown\");\n\n\t});\n\t});\n\n\tvar overlay = createCommonjsModule(function (module, exports) {\n\t// CodeMirror, copyright (c) by Marijn Haverbeke and others\n\t// Distributed under an MIT license: https://codemirror.net/LICENSE\n\n\t// Utility function that allows modes to be combined. The mode given\n\t// as the base argument takes care of most of the normal mode\n\t// functionality, but a second (typically simple) mode is used, which\n\t// can override the style of text. Both modes get to parse all of the\n\t// text, but when both assign a non-null style to a piece of code, the\n\t// overlay wins, unless the combine argument was true and not overridden,\n\t// or state.overlay.combineTokens was true, in which case the styles are\n\t// combined.\n\n\t(function(mod) {\n\t  mod(codemirror);\n\t})(function(CodeMirror) {\n\n\tCodeMirror.overlayMode = function(base, overlay, combine) {\n\t  return {\n\t    startState: function() {\n\t      return {\n\t        base: CodeMirror.startState(base),\n\t        overlay: CodeMirror.startState(overlay),\n\t        basePos: 0, baseCur: null,\n\t        overlayPos: 0, overlayCur: null,\n\t        streamSeen: null\n\t      };\n\t    },\n\t    copyState: function(state) {\n\t      return {\n\t        base: CodeMirror.copyState(base, state.base),\n\t        overlay: CodeMirror.copyState(overlay, state.overlay),\n\t        basePos: state.basePos, baseCur: null,\n\t        overlayPos: state.overlayPos, overlayCur: null\n\t      };\n\t    },\n\n\t    token: function(stream, state) {\n\t      if (stream != state.streamSeen ||\n\t          Math.min(state.basePos, state.overlayPos) < stream.start) {\n\t        state.streamSeen = stream;\n\t        state.basePos = state.overlayPos = stream.start;\n\t      }\n\n\t      if (stream.start == state.basePos) {\n\t        state.baseCur = base.token(stream, state.base);\n\t        state.basePos = stream.pos;\n\t      }\n\t      if (stream.start == state.overlayPos) {\n\t        stream.pos = stream.start;\n\t        state.overlayCur = overlay.token(stream, state.overlay);\n\t        state.overlayPos = stream.pos;\n\t      }\n\t      stream.pos = Math.min(state.basePos, state.overlayPos);\n\n\t      // state.overlay.combineTokens always takes precedence over combine,\n\t      // unless set to null\n\t      if (state.overlayCur == null) return state.baseCur;\n\t      else if (state.baseCur != null &&\n\t               state.overlay.combineTokens ||\n\t               combine && state.overlay.combineTokens == null)\n\t        return state.baseCur + \" \" + state.overlayCur;\n\t      else return state.overlayCur;\n\t    },\n\n\t    indent: base.indent && function(state, textAfter, line) {\n\t      return base.indent(state.base, textAfter, line);\n\t    },\n\t    electricChars: base.electricChars,\n\n\t    innerMode: function(state) { return {state: state.base, mode: base}; },\n\n\t    blankLine: function(state) {\n\t      var baseToken, overlayToken;\n\t      if (base.blankLine) baseToken = base.blankLine(state.base);\n\t      if (overlay.blankLine) overlayToken = overlay.blankLine(state.overlay);\n\n\t      return overlayToken == null ?\n\t        baseToken :\n\t        (combine && baseToken != null ? baseToken + \" \" + overlayToken : overlayToken);\n\t    }\n\t  };\n\t};\n\n\t});\n\t});\n\n\tvar gfm = createCommonjsModule(function (module, exports) {\n\t// CodeMirror, copyright (c) by Marijn Haverbeke and others\n\t// Distributed under an MIT license: https://codemirror.net/LICENSE\n\n\t(function(mod) {\n\t  mod(codemirror, markdown, overlay);\n\t})(function(CodeMirror) {\n\n\tvar urlRE = /^((?:(?:aaas?|about|acap|adiumxtra|af[ps]|aim|apt|attachment|aw|beshare|bitcoin|bolo|callto|cap|chrome(?:-extension)?|cid|coap|com-eventbrite-attendee|content|crid|cvs|data|dav|dict|dlna-(?:playcontainer|playsingle)|dns|doi|dtn|dvb|ed2k|facetime|feed|file|finger|fish|ftp|geo|gg|git|gizmoproject|go|gopher|gtalk|h323|hcp|https?|iax|icap|icon|im|imap|info|ipn|ipp|irc[6s]?|iris(?:\\.beep|\\.lwz|\\.xpc|\\.xpcs)?|itms|jar|javascript|jms|keyparc|lastfm|ldaps?|magnet|mailto|maps|market|message|mid|mms|ms-help|msnim|msrps?|mtqp|mumble|mupdate|mvn|news|nfs|nih?|nntp|notes|oid|opaquelocktoken|palm|paparazzi|platform|pop|pres|proxy|psyc|query|res(?:ource)?|rmi|rsync|rtmp|rtsp|secondlife|service|session|sftp|sgn|shttp|sieve|sips?|skype|sm[bs]|snmp|soap\\.beeps?|soldat|spotify|ssh|steam|svn|tag|teamspeak|tel(?:net)?|tftp|things|thismessage|tip|tn3270|tv|udp|unreal|urn|ut2004|vemmi|ventrilo|view-source|webcal|wss?|wtai|wyciwyg|xcon(?:-userid)?|xfire|xmlrpc\\.beeps?|xmpp|xri|ymsgr|z39\\.50[rs]?):(?:\\/{1,3}|[a-z0-9%])|www\\d{0,3}[.]|[a-z0-9.\\-]+[.][a-z]{2,4}\\/)(?:[^\\s()<>]|\\([^\\s()<>]*\\))+(?:\\([^\\s()<>]*\\)|[^\\s`*!()\\[\\]{};:'\".,<>?«»“”‘’]))/i;\n\n\tCodeMirror.defineMode(\"gfm\", function(config, modeConfig) {\n\t  var codeDepth = 0;\n\t  function blankLine(state) {\n\t    state.code = false;\n\t    return null;\n\t  }\n\t  var gfmOverlay = {\n\t    startState: function() {\n\t      return {\n\t        code: false,\n\t        codeBlock: false,\n\t        ateSpace: false\n\t      };\n\t    },\n\t    copyState: function(s) {\n\t      return {\n\t        code: s.code,\n\t        codeBlock: s.codeBlock,\n\t        ateSpace: s.ateSpace\n\t      };\n\t    },\n\t    token: function(stream, state) {\n\t      state.combineTokens = null;\n\n\t      // Hack to prevent formatting override inside code blocks (block and inline)\n\t      if (state.codeBlock) {\n\t        if (stream.match(/^```+/)) {\n\t          state.codeBlock = false;\n\t          return null;\n\t        }\n\t        stream.skipToEnd();\n\t        return null;\n\t      }\n\t      if (stream.sol()) {\n\t        state.code = false;\n\t      }\n\t      if (stream.sol() && stream.match(/^```+/)) {\n\t        stream.skipToEnd();\n\t        state.codeBlock = true;\n\t        return null;\n\t      }\n\t      // If this block is changed, it may need to be updated in Markdown mode\n\t      if (stream.peek() === '`') {\n\t        stream.next();\n\t        var before = stream.pos;\n\t        stream.eatWhile('`');\n\t        var difference = 1 + stream.pos - before;\n\t        if (!state.code) {\n\t          codeDepth = difference;\n\t          state.code = true;\n\t        } else {\n\t          if (difference === codeDepth) { // Must be exact\n\t            state.code = false;\n\t          }\n\t        }\n\t        return null;\n\t      } else if (state.code) {\n\t        stream.next();\n\t        return null;\n\t      }\n\t      // Check if space. If so, links can be formatted later on\n\t      if (stream.eatSpace()) {\n\t        state.ateSpace = true;\n\t        return null;\n\t      }\n\t      if (stream.sol() || state.ateSpace) {\n\t        state.ateSpace = false;\n\t        if (modeConfig.gitHubSpice !== false) {\n\t          if(stream.match(/^(?:[a-zA-Z0-9\\-_]+\\/)?(?:[a-zA-Z0-9\\-_]+@)?(?=.{0,6}\\d)(?:[a-f0-9]{7,40}\\b)/)) {\n\t            // User/Project@SHA\n\t            // User@SHA\n\t            // SHA\n\t            state.combineTokens = true;\n\t            return \"link\";\n\t          } else if (stream.match(/^(?:[a-zA-Z0-9\\-_]+\\/)?(?:[a-zA-Z0-9\\-_]+)?#[0-9]+\\b/)) {\n\t            // User/Project#Num\n\t            // User#Num\n\t            // #Num\n\t            state.combineTokens = true;\n\t            return \"link\";\n\t          }\n\t        }\n\t      }\n\t      if (stream.match(urlRE) &&\n\t          stream.string.slice(stream.start - 2, stream.start) != \"](\" &&\n\t          (stream.start == 0 || /\\W/.test(stream.string.charAt(stream.start - 1)))) {\n\t        // URLs\n\t        // Taken from http://daringfireball.net/2010/07/improved_regex_for_matching_urls\n\t        // And then (issue #1160) simplified to make it not crash the Chrome Regexp engine\n\t        // And then limited url schemes to the CommonMark list, so foo:bar isn't matched as a URL\n\t        state.combineTokens = true;\n\t        return \"link\";\n\t      }\n\t      stream.next();\n\t      return null;\n\t    },\n\t    blankLine: blankLine\n\t  };\n\n\t  var markdownConfig = {\n\t    taskLists: true,\n\t    strikethrough: true,\n\t    emoji: true\n\t  };\n\t  for (var attr in modeConfig) {\n\t    markdownConfig[attr] = modeConfig[attr];\n\t  }\n\t  markdownConfig.name = \"markdown\";\n\t  return CodeMirror.overlayMode(CodeMirror.getMode(config, markdownConfig), gfmOverlay);\n\n\t}, \"markdown\");\n\n\t  CodeMirror.defineMIME(\"text/x-gfm\", \"gfm\");\n\t});\n\t});\n\n\tvar continuelist = createCommonjsModule(function (module, exports) {\n\t// CodeMirror, copyright (c) by Marijn Haverbeke and others\n\t// Distributed under an MIT license: https://codemirror.net/LICENSE\n\n\t(function(mod) {\n\t  mod(codemirror);\n\t})(function(CodeMirror) {\n\n\t  var listRE = /^(\\s*)(>[> ]*|[*+-] \\[[x ]\\]\\s|[*+-]\\s|(\\d+)([.)]))(\\s*)/,\n\t      emptyListRE = /^(\\s*)(>[> ]*|[*+-] \\[[x ]\\]|[*+-]|(\\d+)[.)])(\\s*)$/,\n\t      unorderedListRE = /[*+-]\\s/;\n\n\t  CodeMirror.commands.newlineAndIndentContinueMarkdownList = function(cm) {\n\t    if (cm.getOption(\"disableInput\")) return CodeMirror.Pass;\n\t    var ranges = cm.listSelections(), replacements = [];\n\t    for (var i = 0; i < ranges.length; i++) {\n\t      var pos = ranges[i].head;\n\n\t      // If we're not in Markdown mode, fall back to normal newlineAndIndent\n\t      var eolState = cm.getStateAfter(pos.line);\n\t      var inner = CodeMirror.innerMode(cm.getMode(), eolState);\n\t      if (inner.mode.name !== \"markdown\") {\n\t        cm.execCommand(\"newlineAndIndent\");\n\t        return;\n\t      } else {\n\t        eolState = inner.state;\n\t      }\n\n\t      var inList = eolState.list !== false;\n\t      var inQuote = eolState.quote !== 0;\n\n\t      var line = cm.getLine(pos.line), match = listRE.exec(line);\n\t      var cursorBeforeBullet = /^\\s*$/.test(line.slice(0, pos.ch));\n\t      if (!ranges[i].empty() || (!inList && !inQuote) || !match || cursorBeforeBullet) {\n\t        cm.execCommand(\"newlineAndIndent\");\n\t        return;\n\t      }\n\t      if (emptyListRE.test(line)) {\n\t        var endOfQuote = inQuote && />\\s*$/.test(line);\n\t        var endOfList = !/>\\s*$/.test(line);\n\t        if (endOfQuote || endOfList) cm.replaceRange(\"\", {\n\t          line: pos.line, ch: 0\n\t        }, {\n\t          line: pos.line, ch: pos.ch + 1\n\t        });\n\t        replacements[i] = \"\\n\";\n\t      } else {\n\t        var indent = match[1], after = match[5];\n\t        var numbered = !(unorderedListRE.test(match[2]) || match[2].indexOf(\">\") >= 0);\n\t        var bullet = numbered ? (parseInt(match[3], 10) + 1) + match[4] : match[2].replace(\"x\", \" \");\n\t        replacements[i] = \"\\n\" + indent + bullet + after;\n\n\t        if (numbered) incrementRemainingMarkdownListNumbers(cm, pos);\n\t      }\n\t    }\n\n\t    cm.replaceSelections(replacements);\n\t  };\n\n\t  // Auto-updating Markdown list numbers when a new item is added to the\n\t  // middle of a list\n\t  function incrementRemainingMarkdownListNumbers(cm, pos) {\n\t    var startLine = pos.line, lookAhead = 0, skipCount = 0;\n\t    var startItem = listRE.exec(cm.getLine(startLine)), startIndent = startItem[1];\n\n\t    do {\n\t      lookAhead += 1;\n\t      var nextLineNumber = startLine + lookAhead;\n\t      var nextLine = cm.getLine(nextLineNumber), nextItem = listRE.exec(nextLine);\n\n\t      if (nextItem) {\n\t        var nextIndent = nextItem[1];\n\t        var newNumber = (parseInt(startItem[3], 10) + lookAhead - skipCount);\n\t        var nextNumber = (parseInt(nextItem[3], 10)), itemNumber = nextNumber;\n\n\t        if (startIndent === nextIndent && !isNaN(nextNumber)) {\n\t          if (newNumber === nextNumber) itemNumber = nextNumber + 1;\n\t          if (newNumber > nextNumber) itemNumber = newNumber + 1;\n\t          cm.replaceRange(\n\t            nextLine.replace(listRE, nextIndent + itemNumber + nextItem[4] + nextItem[5]),\n\t          {\n\t            line: nextLineNumber, ch: 0\n\t          }, {\n\t            line: nextLineNumber, ch: nextLine.length\n\t          });\n\t        } else {\n\t          if (startIndent.length > nextIndent.length) return;\n\t          // This doesn't run if the next line immediatley indents, as it is\n\t          // not clear of the users intention (new indented item or same level)\n\t          if ((startIndent.length < nextIndent.length) && (lookAhead === 1)) return;\n\t          skipCount += 1;\n\t        }\n\t      }\n\t    } while (nextItem);\n\t  }\n\t});\n\t});\n\n\tvar xmlFold = createCommonjsModule(function (module, exports) {\n\t// CodeMirror, copyright (c) by Marijn Haverbeke and others\n\t// Distributed under an MIT license: https://codemirror.net/LICENSE\n\n\t(function(mod) {\n\t  mod(codemirror);\n\t})(function(CodeMirror) {\n\n\t  var Pos = CodeMirror.Pos;\n\t  function cmp(a, b) { return a.line - b.line || a.ch - b.ch; }\n\n\t  var nameStartChar = \"A-Z_a-z\\\\u00C0-\\\\u00D6\\\\u00D8-\\\\u00F6\\\\u00F8-\\\\u02FF\\\\u0370-\\\\u037D\\\\u037F-\\\\u1FFF\\\\u200C-\\\\u200D\\\\u2070-\\\\u218F\\\\u2C00-\\\\u2FEF\\\\u3001-\\\\uD7FF\\\\uF900-\\\\uFDCF\\\\uFDF0-\\\\uFFFD\";\n\t  var nameChar = nameStartChar + \"\\-\\:\\.0-9\\\\u00B7\\\\u0300-\\\\u036F\\\\u203F-\\\\u2040\";\n\t  var xmlTagStart = new RegExp(\"<(/?)([\" + nameStartChar + \"][\" + nameChar + \"]*)\", \"g\");\n\n\t  function Iter(cm, line, ch, range) {\n\t    this.line = line; this.ch = ch;\n\t    this.cm = cm; this.text = cm.getLine(line);\n\t    this.min = range ? Math.max(range.from, cm.firstLine()) : cm.firstLine();\n\t    this.max = range ? Math.min(range.to - 1, cm.lastLine()) : cm.lastLine();\n\t  }\n\n\t  function tagAt(iter, ch) {\n\t    var type = iter.cm.getTokenTypeAt(Pos(iter.line, ch));\n\t    return type && /\\btag\\b/.test(type);\n\t  }\n\n\t  function nextLine(iter) {\n\t    if (iter.line >= iter.max) return;\n\t    iter.ch = 0;\n\t    iter.text = iter.cm.getLine(++iter.line);\n\t    return true;\n\t  }\n\t  function prevLine(iter) {\n\t    if (iter.line <= iter.min) return;\n\t    iter.text = iter.cm.getLine(--iter.line);\n\t    iter.ch = iter.text.length;\n\t    return true;\n\t  }\n\n\t  function toTagEnd(iter) {\n\t    for (;;) {\n\t      var gt = iter.text.indexOf(\">\", iter.ch);\n\t      if (gt == -1) { if (nextLine(iter)) continue; else return; }\n\t      if (!tagAt(iter, gt + 1)) { iter.ch = gt + 1; continue; }\n\t      var lastSlash = iter.text.lastIndexOf(\"/\", gt);\n\t      var selfClose = lastSlash > -1 && !/\\S/.test(iter.text.slice(lastSlash + 1, gt));\n\t      iter.ch = gt + 1;\n\t      return selfClose ? \"selfClose\" : \"regular\";\n\t    }\n\t  }\n\t  function toTagStart(iter) {\n\t    for (;;) {\n\t      var lt = iter.ch ? iter.text.lastIndexOf(\"<\", iter.ch - 1) : -1;\n\t      if (lt == -1) { if (prevLine(iter)) continue; else return; }\n\t      if (!tagAt(iter, lt + 1)) { iter.ch = lt; continue; }\n\t      xmlTagStart.lastIndex = lt;\n\t      iter.ch = lt;\n\t      var match = xmlTagStart.exec(iter.text);\n\t      if (match && match.index == lt) return match;\n\t    }\n\t  }\n\n\t  function toNextTag(iter) {\n\t    for (;;) {\n\t      xmlTagStart.lastIndex = iter.ch;\n\t      var found = xmlTagStart.exec(iter.text);\n\t      if (!found) { if (nextLine(iter)) continue; else return; }\n\t      if (!tagAt(iter, found.index + 1)) { iter.ch = found.index + 1; continue; }\n\t      iter.ch = found.index + found[0].length;\n\t      return found;\n\t    }\n\t  }\n\t  function toPrevTag(iter) {\n\t    for (;;) {\n\t      var gt = iter.ch ? iter.text.lastIndexOf(\">\", iter.ch - 1) : -1;\n\t      if (gt == -1) { if (prevLine(iter)) continue; else return; }\n\t      if (!tagAt(iter, gt + 1)) { iter.ch = gt; continue; }\n\t      var lastSlash = iter.text.lastIndexOf(\"/\", gt);\n\t      var selfClose = lastSlash > -1 && !/\\S/.test(iter.text.slice(lastSlash + 1, gt));\n\t      iter.ch = gt + 1;\n\t      return selfClose ? \"selfClose\" : \"regular\";\n\t    }\n\t  }\n\n\t  function findMatchingClose(iter, tag) {\n\t    var stack = [];\n\t    for (;;) {\n\t      var next = toNextTag(iter), end, startLine = iter.line, startCh = iter.ch - (next ? next[0].length : 0);\n\t      if (!next || !(end = toTagEnd(iter))) return;\n\t      if (end == \"selfClose\") continue;\n\t      if (next[1]) { // closing tag\n\t        for (var i = stack.length - 1; i >= 0; --i) if (stack[i] == next[2]) {\n\t          stack.length = i;\n\t          break;\n\t        }\n\t        if (i < 0 && (!tag || tag == next[2])) return {\n\t          tag: next[2],\n\t          from: Pos(startLine, startCh),\n\t          to: Pos(iter.line, iter.ch)\n\t        };\n\t      } else { // opening tag\n\t        stack.push(next[2]);\n\t      }\n\t    }\n\t  }\n\t  function findMatchingOpen(iter, tag) {\n\t    var stack = [];\n\t    for (;;) {\n\t      var prev = toPrevTag(iter);\n\t      if (!prev) return;\n\t      if (prev == \"selfClose\") { toTagStart(iter); continue; }\n\t      var endLine = iter.line, endCh = iter.ch;\n\t      var start = toTagStart(iter);\n\t      if (!start) return;\n\t      if (start[1]) { // closing tag\n\t        stack.push(start[2]);\n\t      } else { // opening tag\n\t        for (var i = stack.length - 1; i >= 0; --i) if (stack[i] == start[2]) {\n\t          stack.length = i;\n\t          break;\n\t        }\n\t        if (i < 0 && (!tag || tag == start[2])) return {\n\t          tag: start[2],\n\t          from: Pos(iter.line, iter.ch),\n\t          to: Pos(endLine, endCh)\n\t        };\n\t      }\n\t    }\n\t  }\n\n\t  CodeMirror.registerHelper(\"fold\", \"xml\", function(cm, start) {\n\t    var iter = new Iter(cm, start.line, 0);\n\t    for (;;) {\n\t      var openTag = toNextTag(iter);\n\t      if (!openTag || iter.line != start.line) return\n\t      var end = toTagEnd(iter);\n\t      if (!end) return\n\t      if (!openTag[1] && end != \"selfClose\") {\n\t        var startPos = Pos(iter.line, iter.ch);\n\t        var endPos = findMatchingClose(iter, openTag[2]);\n\t        return endPos && cmp(endPos.from, startPos) > 0 ? {from: startPos, to: endPos.from} : null\n\t      }\n\t    }\n\t  });\n\t  CodeMirror.findMatchingTag = function(cm, pos, range) {\n\t    var iter = new Iter(cm, pos.line, pos.ch, range);\n\t    if (iter.text.indexOf(\">\") == -1 && iter.text.indexOf(\"<\") == -1) return;\n\t    var end = toTagEnd(iter), to = end && Pos(iter.line, iter.ch);\n\t    var start = end && toTagStart(iter);\n\t    if (!end || !start || cmp(iter, pos) > 0) return;\n\t    var here = {from: Pos(iter.line, iter.ch), to: to, tag: start[2]};\n\t    if (end == \"selfClose\") return {open: here, close: null, at: \"open\"};\n\n\t    if (start[1]) { // closing tag\n\t      return {open: findMatchingOpen(iter, start[2]), close: here, at: \"close\"};\n\t    } else { // opening tag\n\t      iter = new Iter(cm, to.line, to.ch, range);\n\t      return {open: here, close: findMatchingClose(iter, start[2]), at: \"open\"};\n\t    }\n\t  };\n\n\t  CodeMirror.findEnclosingTag = function(cm, pos, range, tag) {\n\t    var iter = new Iter(cm, pos.line, pos.ch, range);\n\t    for (;;) {\n\t      var open = findMatchingOpen(iter, tag);\n\t      if (!open) break;\n\t      var forward = new Iter(cm, pos.line, pos.ch, range);\n\t      var close = findMatchingClose(forward, open.tag);\n\t      if (close) return {open: open, close: close};\n\t    }\n\t  };\n\n\t  // Used by addon/edit/closetag.js\n\t  CodeMirror.scanForClosingTag = function(cm, pos, name, end) {\n\t    var iter = new Iter(cm, pos.line, pos.ch, end ? {from: 0, to: end} : null);\n\t    return findMatchingClose(iter, name);\n\t  };\n\t});\n\t});\n\n\tvar closetag = createCommonjsModule(function (module, exports) {\n\t// CodeMirror, copyright (c) by Marijn Haverbeke and others\n\t// Distributed under an MIT license: https://codemirror.net/LICENSE\n\n\t/**\n\t * Tag-closer extension for CodeMirror.\n\t *\n\t * This extension adds an \"autoCloseTags\" option that can be set to\n\t * either true to get the default behavior, or an object to further\n\t * configure its behavior.\n\t *\n\t * These are supported options:\n\t *\n\t * `whenClosing` (default true)\n\t *   Whether to autoclose when the '/' of a closing tag is typed.\n\t * `whenOpening` (default true)\n\t *   Whether to autoclose the tag when the final '>' of an opening\n\t *   tag is typed.\n\t * `dontCloseTags` (default is empty tags for HTML, none for XML)\n\t *   An array of tag names that should not be autoclosed.\n\t * `indentTags` (default is block tags for HTML, none for XML)\n\t *   An array of tag names that should, when opened, cause a\n\t *   blank line to be added inside the tag, and the blank line and\n\t *   closing line to be indented.\n\t * `emptyTags` (default is none)\n\t *   An array of XML tag names that should be autoclosed with '/>'.\n\t *\n\t * See demos/closetag.html for a usage example.\n\t */\n\n\t(function(mod) {\n\t  mod(codemirror, xmlFold);\n\t})(function(CodeMirror) {\n\t  CodeMirror.defineOption(\"autoCloseTags\", false, function(cm, val, old) {\n\t    if (old != CodeMirror.Init && old)\n\t      cm.removeKeyMap(\"autoCloseTags\");\n\t    if (!val) return;\n\t    var map = {name: \"autoCloseTags\"};\n\t    if (typeof val != \"object\" || val.whenClosing !== false)\n\t      map[\"'/'\"] = function(cm) { return autoCloseSlash(cm); };\n\t    if (typeof val != \"object\" || val.whenOpening !== false)\n\t      map[\"'>'\"] = function(cm) { return autoCloseGT(cm); };\n\t    cm.addKeyMap(map);\n\t  });\n\n\t  var htmlDontClose = [\"area\", \"base\", \"br\", \"col\", \"command\", \"embed\", \"hr\", \"img\", \"input\", \"keygen\", \"link\", \"meta\", \"param\",\n\t                       \"source\", \"track\", \"wbr\"];\n\t  var htmlIndent = [\"applet\", \"blockquote\", \"body\", \"button\", \"div\", \"dl\", \"fieldset\", \"form\", \"frameset\", \"h1\", \"h2\", \"h3\", \"h4\",\n\t                    \"h5\", \"h6\", \"head\", \"html\", \"iframe\", \"layer\", \"legend\", \"object\", \"ol\", \"p\", \"select\", \"table\", \"ul\"];\n\n\t  function autoCloseGT(cm) {\n\t    if (cm.getOption(\"disableInput\")) return CodeMirror.Pass;\n\t    var ranges = cm.listSelections(), replacements = [];\n\t    var opt = cm.getOption(\"autoCloseTags\");\n\t    for (var i = 0; i < ranges.length; i++) {\n\t      if (!ranges[i].empty()) return CodeMirror.Pass;\n\t      var pos = ranges[i].head, tok = cm.getTokenAt(pos);\n\t      var inner = CodeMirror.innerMode(cm.getMode(), tok.state), state = inner.state;\n\t      var tagInfo = inner.mode.xmlCurrentTag && inner.mode.xmlCurrentTag(state);\n\t      var tagName = tagInfo && tagInfo.name;\n\t      if (!tagName) return CodeMirror.Pass\n\n\t      var html = inner.mode.configuration == \"html\";\n\t      var dontCloseTags = (typeof opt == \"object\" && opt.dontCloseTags) || (html && htmlDontClose);\n\t      var indentTags = (typeof opt == \"object\" && opt.indentTags) || (html && htmlIndent);\n\n\t      if (tok.end > pos.ch) tagName = tagName.slice(0, tagName.length - tok.end + pos.ch);\n\t      var lowerTagName = tagName.toLowerCase();\n\t      // Don't process the '>' at the end of an end-tag or self-closing tag\n\t      if (!tagName ||\n\t          tok.type == \"string\" && (tok.end != pos.ch || !/[\\\"\\']/.test(tok.string.charAt(tok.string.length - 1)) || tok.string.length == 1) ||\n\t          tok.type == \"tag\" && tagInfo.close ||\n\t          tok.string.indexOf(\"/\") == (pos.ch - tok.start - 1) || // match something like <someTagName />\n\t          dontCloseTags && indexOf(dontCloseTags, lowerTagName) > -1 ||\n\t          closingTagExists(cm, inner.mode.xmlCurrentContext && inner.mode.xmlCurrentContext(state) || [], tagName, pos, true))\n\t        return CodeMirror.Pass;\n\n\t      var emptyTags = typeof opt == \"object\" && opt.emptyTags;\n\t      if (emptyTags && indexOf(emptyTags, tagName) > -1) {\n\t        replacements[i] = { text: \"/>\", newPos: CodeMirror.Pos(pos.line, pos.ch + 2) };\n\t        continue;\n\t      }\n\n\t      var indent = indentTags && indexOf(indentTags, lowerTagName) > -1;\n\t      replacements[i] = {indent: indent,\n\t                         text: \">\" + (indent ? \"\\n\\n\" : \"\") + \"</\" + tagName + \">\",\n\t                         newPos: indent ? CodeMirror.Pos(pos.line + 1, 0) : CodeMirror.Pos(pos.line, pos.ch + 1)};\n\t    }\n\n\t    var dontIndentOnAutoClose = (typeof opt == \"object\" && opt.dontIndentOnAutoClose);\n\t    for (var i = ranges.length - 1; i >= 0; i--) {\n\t      var info = replacements[i];\n\t      cm.replaceRange(info.text, ranges[i].head, ranges[i].anchor, \"+insert\");\n\t      var sel = cm.listSelections().slice(0);\n\t      sel[i] = {head: info.newPos, anchor: info.newPos};\n\t      cm.setSelections(sel);\n\t      if (!dontIndentOnAutoClose && info.indent) {\n\t        cm.indentLine(info.newPos.line, null, true);\n\t        cm.indentLine(info.newPos.line + 1, null, true);\n\t      }\n\t    }\n\t  }\n\n\t  function autoCloseCurrent(cm, typingSlash) {\n\t    var ranges = cm.listSelections(), replacements = [];\n\t    var head = typingSlash ? \"/\" : \"</\";\n\t    var opt = cm.getOption(\"autoCloseTags\");\n\t    var dontIndentOnAutoClose = (typeof opt == \"object\" && opt.dontIndentOnSlash);\n\t    for (var i = 0; i < ranges.length; i++) {\n\t      if (!ranges[i].empty()) return CodeMirror.Pass;\n\t      var pos = ranges[i].head, tok = cm.getTokenAt(pos);\n\t      var inner = CodeMirror.innerMode(cm.getMode(), tok.state), state = inner.state;\n\t      if (typingSlash && (tok.type == \"string\" || tok.string.charAt(0) != \"<\" ||\n\t                          tok.start != pos.ch - 1))\n\t        return CodeMirror.Pass;\n\t      // Kludge to get around the fact that we are not in XML mode\n\t      // when completing in JS/CSS snippet in htmlmixed mode. Does not\n\t      // work for other XML embedded languages (there is no general\n\t      // way to go from a mixed mode to its current XML state).\n\t      var replacement, mixed = inner.mode.name != \"xml\" && cm.getMode().name == \"htmlmixed\";\n\t      if (mixed && inner.mode.name == \"javascript\") {\n\t        replacement = head + \"script\";\n\t      } else if (mixed && inner.mode.name == \"css\") {\n\t        replacement = head + \"style\";\n\t      } else {\n\t        var context = inner.mode.xmlCurrentContext && inner.mode.xmlCurrentContext(state);\n\t        if (!context || (context.length && closingTagExists(cm, context, context[context.length - 1], pos)))\n\t          return CodeMirror.Pass;\n\t        replacement = head + context[context.length - 1];\n\t      }\n\t      if (cm.getLine(pos.line).charAt(tok.end) != \">\") replacement += \">\";\n\t      replacements[i] = replacement;\n\t    }\n\t    cm.replaceSelections(replacements);\n\t    ranges = cm.listSelections();\n\t    if (!dontIndentOnAutoClose) {\n\t        for (var i = 0; i < ranges.length; i++)\n\t            if (i == ranges.length - 1 || ranges[i].head.line < ranges[i + 1].head.line)\n\t                cm.indentLine(ranges[i].head.line);\n\t    }\n\t  }\n\n\t  function autoCloseSlash(cm) {\n\t    if (cm.getOption(\"disableInput\")) return CodeMirror.Pass;\n\t    return autoCloseCurrent(cm, true);\n\t  }\n\n\t  CodeMirror.commands.closeTag = function(cm) { return autoCloseCurrent(cm); };\n\n\t  function indexOf(collection, elt) {\n\t    if (collection.indexOf) return collection.indexOf(elt);\n\t    for (var i = 0, e = collection.length; i < e; ++i)\n\t      if (collection[i] == elt) return i;\n\t    return -1;\n\t  }\n\n\t  // If xml-fold is loaded, we use its functionality to try and verify\n\t  // whether a given tag is actually unclosed.\n\t  function closingTagExists(cm, context, tagName, pos, newTag) {\n\t    if (!CodeMirror.scanForClosingTag) return false;\n\t    var end = Math.min(cm.lastLine() + 1, pos.line + 500);\n\t    var nextClose = CodeMirror.scanForClosingTag(cm, pos, null, end);\n\t    if (!nextClose || nextClose.tag != tagName) return false;\n\t    // If the immediate wrapping context contains onCx instances of\n\t    // the same tag, a closing tag only exists if there are at least\n\t    // that many closing tags of that type following.\n\t    var onCx = newTag ? 1 : 0;\n\t    for (var i = context.length - 1; i >= 0; i--) {\n\t      if (context[i] == tagName) ++onCx;\n\t      else break\n\t    }\n\t    pos = nextClose.to;\n\t    for (var i = 1; i < onCx; i++) {\n\t      var next = CodeMirror.scanForClosingTag(cm, pos, null, end);\n\t      if (!next || next.tag != tagName) return false;\n\t      pos = next.to;\n\t    }\n\t    return true;\n\t  }\n\t});\n\t});\n\n\tvar matchtags = createCommonjsModule(function (module, exports) {\n\t// CodeMirror, copyright (c) by Marijn Haverbeke and others\n\t// Distributed under an MIT license: https://codemirror.net/LICENSE\n\n\t(function(mod) {\n\t  mod(codemirror, xmlFold);\n\t})(function(CodeMirror) {\n\n\t  CodeMirror.defineOption(\"matchTags\", false, function(cm, val, old) {\n\t    if (old && old != CodeMirror.Init) {\n\t      cm.off(\"cursorActivity\", doMatchTags);\n\t      cm.off(\"viewportChange\", maybeUpdateMatch);\n\t      clear(cm);\n\t    }\n\t    if (val) {\n\t      cm.state.matchBothTags = typeof val == \"object\" && val.bothTags;\n\t      cm.on(\"cursorActivity\", doMatchTags);\n\t      cm.on(\"viewportChange\", maybeUpdateMatch);\n\t      doMatchTags(cm);\n\t    }\n\t  });\n\n\t  function clear(cm) {\n\t    if (cm.state.tagHit) cm.state.tagHit.clear();\n\t    if (cm.state.tagOther) cm.state.tagOther.clear();\n\t    cm.state.tagHit = cm.state.tagOther = null;\n\t  }\n\n\t  function doMatchTags(cm) {\n\t    cm.state.failedTagMatch = false;\n\t    cm.operation(function() {\n\t      clear(cm);\n\t      if (cm.somethingSelected()) return;\n\t      var cur = cm.getCursor(), range = cm.getViewport();\n\t      range.from = Math.min(range.from, cur.line); range.to = Math.max(cur.line + 1, range.to);\n\t      var match = CodeMirror.findMatchingTag(cm, cur, range);\n\t      if (!match) return;\n\t      if (cm.state.matchBothTags) {\n\t        var hit = match.at == \"open\" ? match.open : match.close;\n\t        if (hit) cm.state.tagHit = cm.markText(hit.from, hit.to, {className: \"CodeMirror-matchingtag\"});\n\t      }\n\t      var other = match.at == \"close\" ? match.open : match.close;\n\t      if (other)\n\t        cm.state.tagOther = cm.markText(other.from, other.to, {className: \"CodeMirror-matchingtag\"});\n\t      else\n\t        cm.state.failedTagMatch = true;\n\t    });\n\t  }\n\n\t  function maybeUpdateMatch(cm) {\n\t    if (cm.state.failedTagMatch) doMatchTags(cm);\n\t  }\n\n\t  CodeMirror.commands.toMatchingTag = function(cm) {\n\t    var found = CodeMirror.findMatchingTag(cm, cm.getCursor());\n\t    if (found) {\n\t      var other = found.at == \"close\" ? found.open : found.close;\n\t      if (other) cm.extendSelection(other.to, other.from);\n\t    }\n\t  };\n\t});\n\t});\n\n\tvar searchcursor = createCommonjsModule(function (module, exports) {\n\t// CodeMirror, copyright (c) by Marijn Haverbeke and others\n\t// Distributed under an MIT license: https://codemirror.net/LICENSE\n\n\t(function(mod) {\n\t  mod(codemirror);\n\t})(function(CodeMirror) {\n\t  var Pos = CodeMirror.Pos;\n\n\t  function regexpFlags(regexp) {\n\t    var flags = regexp.flags;\n\t    return flags != null ? flags : (regexp.ignoreCase ? \"i\" : \"\")\n\t      + (regexp.global ? \"g\" : \"\")\n\t      + (regexp.multiline ? \"m\" : \"\")\n\t  }\n\n\t  function ensureFlags(regexp, flags) {\n\t    var current = regexpFlags(regexp), target = current;\n\t    for (var i = 0; i < flags.length; i++) if (target.indexOf(flags.charAt(i)) == -1)\n\t      target += flags.charAt(i);\n\t    return current == target ? regexp : new RegExp(regexp.source, target)\n\t  }\n\n\t  function maybeMultiline(regexp) {\n\t    return /\\\\s|\\\\n|\\n|\\\\W|\\\\D|\\[\\^/.test(regexp.source)\n\t  }\n\n\t  function searchRegexpForward(doc, regexp, start) {\n\t    regexp = ensureFlags(regexp, \"g\");\n\t    for (var line = start.line, ch = start.ch, last = doc.lastLine(); line <= last; line++, ch = 0) {\n\t      regexp.lastIndex = ch;\n\t      var string = doc.getLine(line), match = regexp.exec(string);\n\t      if (match)\n\t        return {from: Pos(line, match.index),\n\t                to: Pos(line, match.index + match[0].length),\n\t                match: match}\n\t    }\n\t  }\n\n\t  function searchRegexpForwardMultiline(doc, regexp, start) {\n\t    if (!maybeMultiline(regexp)) return searchRegexpForward(doc, regexp, start)\n\n\t    regexp = ensureFlags(regexp, \"gm\");\n\t    var string, chunk = 1;\n\t    for (var line = start.line, last = doc.lastLine(); line <= last;) {\n\t      // This grows the search buffer in exponentially-sized chunks\n\t      // between matches, so that nearby matches are fast and don't\n\t      // require concatenating the whole document (in case we're\n\t      // searching for something that has tons of matches), but at the\n\t      // same time, the amount of retries is limited.\n\t      for (var i = 0; i < chunk; i++) {\n\t        if (line > last) break\n\t        var curLine = doc.getLine(line++);\n\t        string = string == null ? curLine : string + \"\\n\" + curLine;\n\t      }\n\t      chunk = chunk * 2;\n\t      regexp.lastIndex = start.ch;\n\t      var match = regexp.exec(string);\n\t      if (match) {\n\t        var before = string.slice(0, match.index).split(\"\\n\"), inside = match[0].split(\"\\n\");\n\t        var startLine = start.line + before.length - 1, startCh = before[before.length - 1].length;\n\t        return {from: Pos(startLine, startCh),\n\t                to: Pos(startLine + inside.length - 1,\n\t                        inside.length == 1 ? startCh + inside[0].length : inside[inside.length - 1].length),\n\t                match: match}\n\t      }\n\t    }\n\t  }\n\n\t  function lastMatchIn(string, regexp, endMargin) {\n\t    var match, from = 0;\n\t    while (from <= string.length) {\n\t      regexp.lastIndex = from;\n\t      var newMatch = regexp.exec(string);\n\t      if (!newMatch) break\n\t      var end = newMatch.index + newMatch[0].length;\n\t      if (end > string.length - endMargin) break\n\t      if (!match || end > match.index + match[0].length)\n\t        match = newMatch;\n\t      from = newMatch.index + 1;\n\t    }\n\t    return match\n\t  }\n\n\t  function searchRegexpBackward(doc, regexp, start) {\n\t    regexp = ensureFlags(regexp, \"g\");\n\t    for (var line = start.line, ch = start.ch, first = doc.firstLine(); line >= first; line--, ch = -1) {\n\t      var string = doc.getLine(line);\n\t      var match = lastMatchIn(string, regexp, ch < 0 ? 0 : string.length - ch);\n\t      if (match)\n\t        return {from: Pos(line, match.index),\n\t                to: Pos(line, match.index + match[0].length),\n\t                match: match}\n\t    }\n\t  }\n\n\t  function searchRegexpBackwardMultiline(doc, regexp, start) {\n\t    if (!maybeMultiline(regexp)) return searchRegexpBackward(doc, regexp, start)\n\t    regexp = ensureFlags(regexp, \"gm\");\n\t    var string, chunkSize = 1, endMargin = doc.getLine(start.line).length - start.ch;\n\t    for (var line = start.line, first = doc.firstLine(); line >= first;) {\n\t      for (var i = 0; i < chunkSize && line >= first; i++) {\n\t        var curLine = doc.getLine(line--);\n\t        string = string == null ? curLine : curLine + \"\\n\" + string;\n\t      }\n\t      chunkSize *= 2;\n\n\t      var match = lastMatchIn(string, regexp, endMargin);\n\t      if (match) {\n\t        var before = string.slice(0, match.index).split(\"\\n\"), inside = match[0].split(\"\\n\");\n\t        var startLine = line + before.length, startCh = before[before.length - 1].length;\n\t        return {from: Pos(startLine, startCh),\n\t                to: Pos(startLine + inside.length - 1,\n\t                        inside.length == 1 ? startCh + inside[0].length : inside[inside.length - 1].length),\n\t                match: match}\n\t      }\n\t    }\n\t  }\n\n\t  var doFold, noFold;\n\t  if (String.prototype.normalize) {\n\t    doFold = function(str) { return str.normalize(\"NFD\").toLowerCase() };\n\t    noFold = function(str) { return str.normalize(\"NFD\") };\n\t  } else {\n\t    doFold = function(str) { return str.toLowerCase() };\n\t    noFold = function(str) { return str };\n\t  }\n\n\t  // Maps a position in a case-folded line back to a position in the original line\n\t  // (compensating for codepoints increasing in number during folding)\n\t  function adjustPos(orig, folded, pos, foldFunc) {\n\t    if (orig.length == folded.length) return pos\n\t    for (var min = 0, max = pos + Math.max(0, orig.length - folded.length);;) {\n\t      if (min == max) return min\n\t      var mid = (min + max) >> 1;\n\t      var len = foldFunc(orig.slice(0, mid)).length;\n\t      if (len == pos) return mid\n\t      else if (len > pos) max = mid;\n\t      else min = mid + 1;\n\t    }\n\t  }\n\n\t  function searchStringForward(doc, query, start, caseFold) {\n\t    // Empty string would match anything and never progress, so we\n\t    // define it to match nothing instead.\n\t    if (!query.length) return null\n\t    var fold = caseFold ? doFold : noFold;\n\t    var lines = fold(query).split(/\\r|\\n\\r?/);\n\n\t    search: for (var line = start.line, ch = start.ch, last = doc.lastLine() + 1 - lines.length; line <= last; line++, ch = 0) {\n\t      var orig = doc.getLine(line).slice(ch), string = fold(orig);\n\t      if (lines.length == 1) {\n\t        var found = string.indexOf(lines[0]);\n\t        if (found == -1) continue search\n\t        var start = adjustPos(orig, string, found, fold) + ch;\n\t        return {from: Pos(line, adjustPos(orig, string, found, fold) + ch),\n\t                to: Pos(line, adjustPos(orig, string, found + lines[0].length, fold) + ch)}\n\t      } else {\n\t        var cutFrom = string.length - lines[0].length;\n\t        if (string.slice(cutFrom) != lines[0]) continue search\n\t        for (var i = 1; i < lines.length - 1; i++)\n\t          if (fold(doc.getLine(line + i)) != lines[i]) continue search\n\t        var end = doc.getLine(line + lines.length - 1), endString = fold(end), lastLine = lines[lines.length - 1];\n\t        if (endString.slice(0, lastLine.length) != lastLine) continue search\n\t        return {from: Pos(line, adjustPos(orig, string, cutFrom, fold) + ch),\n\t                to: Pos(line + lines.length - 1, adjustPos(end, endString, lastLine.length, fold))}\n\t      }\n\t    }\n\t  }\n\n\t  function searchStringBackward(doc, query, start, caseFold) {\n\t    if (!query.length) return null\n\t    var fold = caseFold ? doFold : noFold;\n\t    var lines = fold(query).split(/\\r|\\n\\r?/);\n\n\t    search: for (var line = start.line, ch = start.ch, first = doc.firstLine() - 1 + lines.length; line >= first; line--, ch = -1) {\n\t      var orig = doc.getLine(line);\n\t      if (ch > -1) orig = orig.slice(0, ch);\n\t      var string = fold(orig);\n\t      if (lines.length == 1) {\n\t        var found = string.lastIndexOf(lines[0]);\n\t        if (found == -1) continue search\n\t        return {from: Pos(line, adjustPos(orig, string, found, fold)),\n\t                to: Pos(line, adjustPos(orig, string, found + lines[0].length, fold))}\n\t      } else {\n\t        var lastLine = lines[lines.length - 1];\n\t        if (string.slice(0, lastLine.length) != lastLine) continue search\n\t        for (var i = 1, start = line - lines.length + 1; i < lines.length - 1; i++)\n\t          if (fold(doc.getLine(start + i)) != lines[i]) continue search\n\t        var top = doc.getLine(line + 1 - lines.length), topString = fold(top);\n\t        if (topString.slice(topString.length - lines[0].length) != lines[0]) continue search\n\t        return {from: Pos(line + 1 - lines.length, adjustPos(top, topString, top.length - lines[0].length, fold)),\n\t                to: Pos(line, adjustPos(orig, string, lastLine.length, fold))}\n\t      }\n\t    }\n\t  }\n\n\t  function SearchCursor(doc, query, pos, options) {\n\t    this.atOccurrence = false;\n\t    this.doc = doc;\n\t    pos = pos ? doc.clipPos(pos) : Pos(0, 0);\n\t    this.pos = {from: pos, to: pos};\n\n\t    var caseFold;\n\t    if (typeof options == \"object\") {\n\t      caseFold = options.caseFold;\n\t    } else { // Backwards compat for when caseFold was the 4th argument\n\t      caseFold = options;\n\t      options = null;\n\t    }\n\n\t    if (typeof query == \"string\") {\n\t      if (caseFold == null) caseFold = false;\n\t      this.matches = function(reverse, pos) {\n\t        return (reverse ? searchStringBackward : searchStringForward)(doc, query, pos, caseFold)\n\t      };\n\t    } else {\n\t      query = ensureFlags(query, \"gm\");\n\t      if (!options || options.multiline !== false)\n\t        this.matches = function(reverse, pos) {\n\t          return (reverse ? searchRegexpBackwardMultiline : searchRegexpForwardMultiline)(doc, query, pos)\n\t        };\n\t      else\n\t        this.matches = function(reverse, pos) {\n\t          return (reverse ? searchRegexpBackward : searchRegexpForward)(doc, query, pos)\n\t        };\n\t    }\n\t  }\n\n\t  SearchCursor.prototype = {\n\t    findNext: function() {return this.find(false)},\n\t    findPrevious: function() {return this.find(true)},\n\n\t    find: function(reverse) {\n\t      var result = this.matches(reverse, this.doc.clipPos(reverse ? this.pos.from : this.pos.to));\n\n\t      // Implements weird auto-growing behavior on null-matches for\n\t      // backwards-compatibility with the vim code (unfortunately)\n\t      while (result && CodeMirror.cmpPos(result.from, result.to) == 0) {\n\t        if (reverse) {\n\t          if (result.from.ch) result.from = Pos(result.from.line, result.from.ch - 1);\n\t          else if (result.from.line == this.doc.firstLine()) result = null;\n\t          else result = this.matches(reverse, this.doc.clipPos(Pos(result.from.line - 1)));\n\t        } else {\n\t          if (result.to.ch < this.doc.getLine(result.to.line).length) result.to = Pos(result.to.line, result.to.ch + 1);\n\t          else if (result.to.line == this.doc.lastLine()) result = null;\n\t          else result = this.matches(reverse, Pos(result.to.line + 1, 0));\n\t        }\n\t      }\n\n\t      if (result) {\n\t        this.pos = result;\n\t        this.atOccurrence = true;\n\t        return this.pos.match || true\n\t      } else {\n\t        var end = Pos(reverse ? this.doc.firstLine() : this.doc.lastLine() + 1, 0);\n\t        this.pos = {from: end, to: end};\n\t        return this.atOccurrence = false\n\t      }\n\t    },\n\n\t    from: function() {if (this.atOccurrence) return this.pos.from},\n\t    to: function() {if (this.atOccurrence) return this.pos.to},\n\n\t    replace: function(newText, origin) {\n\t      if (!this.atOccurrence) return\n\t      var lines = CodeMirror.splitLines(newText);\n\t      this.doc.replaceRange(lines, this.pos.from, this.pos.to, origin);\n\t      this.pos.to = Pos(this.pos.from.line + lines.length - 1,\n\t                        lines[lines.length - 1].length + (lines.length == 1 ? this.pos.from.ch : 0));\n\t    }\n\t  };\n\n\t  CodeMirror.defineExtension(\"getSearchCursor\", function(query, pos, caseFold) {\n\t    return new SearchCursor(this.doc, query, pos, caseFold)\n\t  });\n\t  CodeMirror.defineDocExtension(\"getSearchCursor\", function(query, pos, caseFold) {\n\t    return new SearchCursor(this, query, pos, caseFold)\n\t  });\n\n\t  CodeMirror.defineExtension(\"selectMatches\", function(query, caseFold) {\n\t    var ranges = [];\n\t    var cur = this.getSearchCursor(query, this.getCursor(\"from\"), caseFold);\n\t    while (cur.findNext()) {\n\t      if (CodeMirror.cmpPos(cur.to(), this.getCursor(\"to\")) > 0) break\n\t      ranges.push({anchor: cur.from(), head: cur.to()});\n\t    }\n\t    if (ranges.length)\n\t      this.setSelections(ranges, 0);\n\t  });\n\t});\n\t});\n\n\tvar placeholder = createCommonjsModule(function (module, exports) {\n\t// CodeMirror, copyright (c) by Marijn Haverbeke and others\n\t// Distributed under an MIT license: https://codemirror.net/LICENSE\n\n\t(function(mod) {\n\t  mod(codemirror);\n\t})(function(CodeMirror) {\n\t  CodeMirror.defineOption(\"placeholder\", \"\", function(cm, val, old) {\n\t    var prev = old && old != CodeMirror.Init;\n\t    if (val && !prev) {\n\t      cm.on(\"blur\", onBlur);\n\t      cm.on(\"change\", onChange);\n\t      cm.on(\"swapDoc\", onChange);\n\t      CodeMirror.on(cm.getInputField(), \"compositionupdate\", cm.state.placeholderCompose = function() { onComposition(cm); });\n\t      onChange(cm);\n\t    } else if (!val && prev) {\n\t      cm.off(\"blur\", onBlur);\n\t      cm.off(\"change\", onChange);\n\t      cm.off(\"swapDoc\", onChange);\n\t      CodeMirror.off(cm.getInputField(), \"compositionupdate\", cm.state.placeholderCompose);\n\t      clearPlaceholder(cm);\n\t      var wrapper = cm.getWrapperElement();\n\t      wrapper.className = wrapper.className.replace(\" CodeMirror-empty\", \"\");\n\t    }\n\n\t    if (val && !cm.hasFocus()) onBlur(cm);\n\t  });\n\n\t  function clearPlaceholder(cm) {\n\t    if (cm.state.placeholder) {\n\t      cm.state.placeholder.parentNode.removeChild(cm.state.placeholder);\n\t      cm.state.placeholder = null;\n\t    }\n\t  }\n\t  function setPlaceholder(cm) {\n\t    clearPlaceholder(cm);\n\t    var elt = cm.state.placeholder = document.createElement(\"pre\");\n\t    elt.style.cssText = \"height: 0; overflow: visible\";\n\t    elt.style.direction = cm.getOption(\"direction\");\n\t    elt.className = \"CodeMirror-placeholder CodeMirror-line-like\";\n\t    var placeHolder = cm.getOption(\"placeholder\");\n\t    if (typeof placeHolder == \"string\") placeHolder = document.createTextNode(placeHolder);\n\t    elt.appendChild(placeHolder);\n\t    cm.display.lineSpace.insertBefore(elt, cm.display.lineSpace.firstChild);\n\t  }\n\n\t  function onComposition(cm) {\n\t    setTimeout(function() {\n\t      var empty = false, input = cm.getInputField();\n\t      if (input.nodeName == \"TEXTAREA\")\n\t        empty = !input.value;\n\t      else if (cm.lineCount() == 1)\n\t        empty = !/[^\\u200b]/.test(input.querySelector(\".CodeMirror-line\").textContent);\n\t      if (empty) setPlaceholder(cm);\n\t      else clearPlaceholder(cm);\n\t    }, 20);\n\t  }\n\n\t  function onBlur(cm) {\n\t    if (isEmpty(cm)) setPlaceholder(cm);\n\t  }\n\t  function onChange(cm) {\n\t    var wrapper = cm.getWrapperElement(), empty = isEmpty(cm);\n\t    wrapper.className = wrapper.className.replace(\" CodeMirror-empty\", \"\") + (empty ? \" CodeMirror-empty\" : \"\");\n\n\t    if (empty) setPlaceholder(cm);\n\t    else clearPlaceholder(cm);\n\t  }\n\n\t  function isEmpty(cm) {\n\t    return (cm.lineCount() === 1) && (cm.getLine(0) === \"\");\n\t  }\n\t});\n\t});\n\n\tvar matchbrackets = createCommonjsModule(function (module, exports) {\n\t// CodeMirror, copyright (c) by Marijn Haverbeke and others\n\t// Distributed under an MIT license: https://codemirror.net/LICENSE\n\n\t(function(mod) {\n\t  mod(codemirror);\n\t})(function(CodeMirror) {\n\t  var ie_lt8 = /MSIE \\d/.test(navigator.userAgent) &&\n\t    (document.documentMode == null || document.documentMode < 8);\n\n\t  var Pos = CodeMirror.Pos;\n\n\t  var matching = {\"(\": \")>\", \")\": \"(<\", \"[\": \"]>\", \"]\": \"[<\", \"{\": \"}>\", \"}\": \"{<\", \"<\": \">>\", \">\": \"<<\"};\n\n\t  function bracketRegex(config) {\n\t    return config && config.bracketRegex || /[(){}[\\]]/\n\t  }\n\n\t  function findMatchingBracket(cm, where, config) {\n\t    var line = cm.getLineHandle(where.line), pos = where.ch - 1;\n\t    var afterCursor = config && config.afterCursor;\n\t    if (afterCursor == null)\n\t      afterCursor = /(^| )cm-fat-cursor($| )/.test(cm.getWrapperElement().className);\n\t    var re = bracketRegex(config);\n\n\t    // A cursor is defined as between two characters, but in in vim command mode\n\t    // (i.e. not insert mode), the cursor is visually represented as a\n\t    // highlighted box on top of the 2nd character. Otherwise, we allow matches\n\t    // from before or after the cursor.\n\t    var match = (!afterCursor && pos >= 0 && re.test(line.text.charAt(pos)) && matching[line.text.charAt(pos)]) ||\n\t        re.test(line.text.charAt(pos + 1)) && matching[line.text.charAt(++pos)];\n\t    if (!match) return null;\n\t    var dir = match.charAt(1) == \">\" ? 1 : -1;\n\t    if (config && config.strict && (dir > 0) != (pos == where.ch)) return null;\n\t    var style = cm.getTokenTypeAt(Pos(where.line, pos + 1));\n\n\t    var found = scanForBracket(cm, Pos(where.line, pos + (dir > 0 ? 1 : 0)), dir, style || null, config);\n\t    if (found == null) return null;\n\t    return {from: Pos(where.line, pos), to: found && found.pos,\n\t            match: found && found.ch == match.charAt(0), forward: dir > 0};\n\t  }\n\n\t  // bracketRegex is used to specify which type of bracket to scan\n\t  // should be a regexp, e.g. /[[\\]]/\n\t  //\n\t  // Note: If \"where\" is on an open bracket, then this bracket is ignored.\n\t  //\n\t  // Returns false when no bracket was found, null when it reached\n\t  // maxScanLines and gave up\n\t  function scanForBracket(cm, where, dir, style, config) {\n\t    var maxScanLen = (config && config.maxScanLineLength) || 10000;\n\t    var maxScanLines = (config && config.maxScanLines) || 1000;\n\n\t    var stack = [];\n\t    var re = bracketRegex(config);\n\t    var lineEnd = dir > 0 ? Math.min(where.line + maxScanLines, cm.lastLine() + 1)\n\t                          : Math.max(cm.firstLine() - 1, where.line - maxScanLines);\n\t    for (var lineNo = where.line; lineNo != lineEnd; lineNo += dir) {\n\t      var line = cm.getLine(lineNo);\n\t      if (!line) continue;\n\t      var pos = dir > 0 ? 0 : line.length - 1, end = dir > 0 ? line.length : -1;\n\t      if (line.length > maxScanLen) continue;\n\t      if (lineNo == where.line) pos = where.ch - (dir < 0 ? 1 : 0);\n\t      for (; pos != end; pos += dir) {\n\t        var ch = line.charAt(pos);\n\t        if (re.test(ch) && (style === undefined || cm.getTokenTypeAt(Pos(lineNo, pos + 1)) == style)) {\n\t          var match = matching[ch];\n\t          if (match && (match.charAt(1) == \">\") == (dir > 0)) stack.push(ch);\n\t          else if (!stack.length) return {pos: Pos(lineNo, pos), ch: ch};\n\t          else stack.pop();\n\t        }\n\t      }\n\t    }\n\t    return lineNo - dir == (dir > 0 ? cm.lastLine() : cm.firstLine()) ? false : null;\n\t  }\n\n\t  function matchBrackets(cm, autoclear, config) {\n\t    // Disable brace matching in long lines, since it'll cause hugely slow updates\n\t    var maxHighlightLen = cm.state.matchBrackets.maxHighlightLineLength || 1000;\n\t    var marks = [], ranges = cm.listSelections();\n\t    for (var i = 0; i < ranges.length; i++) {\n\t      var match = ranges[i].empty() && findMatchingBracket(cm, ranges[i].head, config);\n\t      if (match && cm.getLine(match.from.line).length <= maxHighlightLen) {\n\t        var style = match.match ? \"CodeMirror-matchingbracket\" : \"CodeMirror-nonmatchingbracket\";\n\t        marks.push(cm.markText(match.from, Pos(match.from.line, match.from.ch + 1), {className: style}));\n\t        if (match.to && cm.getLine(match.to.line).length <= maxHighlightLen)\n\t          marks.push(cm.markText(match.to, Pos(match.to.line, match.to.ch + 1), {className: style}));\n\t      }\n\t    }\n\n\t    if (marks.length) {\n\t      // Kludge to work around the IE bug from issue #1193, where text\n\t      // input stops going to the textare whever this fires.\n\t      if (ie_lt8 && cm.state.focused) cm.focus();\n\n\t      var clear = function() {\n\t        cm.operation(function() {\n\t          for (var i = 0; i < marks.length; i++) marks[i].clear();\n\t        });\n\t      };\n\t      if (autoclear) setTimeout(clear, 800);\n\t      else return clear;\n\t    }\n\t  }\n\n\t  function doMatchBrackets(cm) {\n\t    cm.operation(function() {\n\t      if (cm.state.matchBrackets.currentlyHighlighted) {\n\t        cm.state.matchBrackets.currentlyHighlighted();\n\t        cm.state.matchBrackets.currentlyHighlighted = null;\n\t      }\n\t      cm.state.matchBrackets.currentlyHighlighted = matchBrackets(cm, false, cm.state.matchBrackets);\n\t    });\n\t  }\n\n\t  CodeMirror.defineOption(\"matchBrackets\", false, function(cm, val, old) {\n\t    function clear(cm) {\n\t      if (cm.state.matchBrackets && cm.state.matchBrackets.currentlyHighlighted) {\n\t        cm.state.matchBrackets.currentlyHighlighted();\n\t        cm.state.matchBrackets.currentlyHighlighted = null;\n\t      }\n\t    }\n\n\t    if (old && old != CodeMirror.Init) {\n\t      cm.off(\"cursorActivity\", doMatchBrackets);\n\t      cm.off(\"focus\", doMatchBrackets);\n\t      cm.off(\"blur\", clear);\n\t      clear(cm);\n\t    }\n\t    if (val) {\n\t      cm.state.matchBrackets = typeof val == \"object\" ? val : {};\n\t      cm.on(\"cursorActivity\", doMatchBrackets);\n\t      cm.on(\"focus\", doMatchBrackets);\n\t      cm.on(\"blur\", clear);\n\t    }\n\t  });\n\n\t  CodeMirror.defineExtension(\"matchBrackets\", function() {matchBrackets(this, true);});\n\t  CodeMirror.defineExtension(\"findMatchingBracket\", function(pos, config, oldConfig){\n\t    // Backwards-compatibility kludge\n\t    if (oldConfig || typeof config == \"boolean\") {\n\t      if (!oldConfig) {\n\t        config = config ? {strict: true} : null;\n\t      } else {\n\t        oldConfig.strict = config;\n\t        config = oldConfig;\n\t      }\n\t    }\n\t    return findMatchingBracket(this, pos, config)\n\t  });\n\t  CodeMirror.defineExtension(\"scanForBracket\", function(pos, dir, style, config){\n\t    return scanForBracket(this, pos, dir, style, config);\n\t  });\n\t});\n\t});\n\n\tvar sublime = createCommonjsModule(function (module, exports) {\n\t// CodeMirror, copyright (c) by Marijn Haverbeke and others\n\t// Distributed under an MIT license: https://codemirror.net/LICENSE\n\n\t// A rough approximation of Sublime Text's keybindings\n\t// Depends on addon/search/searchcursor.js and optionally addon/dialog/dialogs.js\n\n\t(function(mod) {\n\t  mod(codemirror, searchcursor, matchbrackets);\n\t})(function(CodeMirror) {\n\n\t  var cmds = CodeMirror.commands;\n\t  var Pos = CodeMirror.Pos;\n\n\t  // This is not exactly Sublime's algorithm. I couldn't make heads or tails of that.\n\t  function findPosSubword(doc, start, dir) {\n\t    if (dir < 0 && start.ch == 0) return doc.clipPos(Pos(start.line - 1));\n\t    var line = doc.getLine(start.line);\n\t    if (dir > 0 && start.ch >= line.length) return doc.clipPos(Pos(start.line + 1, 0));\n\t    var state = \"start\", type, startPos = start.ch;\n\t    for (var pos = startPos, e = dir < 0 ? 0 : line.length, i = 0; pos != e; pos += dir, i++) {\n\t      var next = line.charAt(dir < 0 ? pos - 1 : pos);\n\t      var cat = next != \"_\" && CodeMirror.isWordChar(next) ? \"w\" : \"o\";\n\t      if (cat == \"w\" && next.toUpperCase() == next) cat = \"W\";\n\t      if (state == \"start\") {\n\t        if (cat != \"o\") { state = \"in\"; type = cat; }\n\t        else startPos = pos + dir;\n\t      } else if (state == \"in\") {\n\t        if (type != cat) {\n\t          if (type == \"w\" && cat == \"W\" && dir < 0) pos--;\n\t          if (type == \"W\" && cat == \"w\" && dir > 0) { // From uppercase to lowercase\n\t            if (pos == startPos + 1) { type = \"w\"; continue; }\n\t            else pos--;\n\t          }\n\t          break;\n\t        }\n\t      }\n\t    }\n\t    return Pos(start.line, pos);\n\t  }\n\n\t  function moveSubword(cm, dir) {\n\t    cm.extendSelectionsBy(function(range) {\n\t      if (cm.display.shift || cm.doc.extend || range.empty())\n\t        return findPosSubword(cm.doc, range.head, dir);\n\t      else\n\t        return dir < 0 ? range.from() : range.to();\n\t    });\n\t  }\n\n\t  cmds.goSubwordLeft = function(cm) { moveSubword(cm, -1); };\n\t  cmds.goSubwordRight = function(cm) { moveSubword(cm, 1); };\n\n\t  cmds.scrollLineUp = function(cm) {\n\t    var info = cm.getScrollInfo();\n\t    if (!cm.somethingSelected()) {\n\t      var visibleBottomLine = cm.lineAtHeight(info.top + info.clientHeight, \"local\");\n\t      if (cm.getCursor().line >= visibleBottomLine)\n\t        cm.execCommand(\"goLineUp\");\n\t    }\n\t    cm.scrollTo(null, info.top - cm.defaultTextHeight());\n\t  };\n\t  cmds.scrollLineDown = function(cm) {\n\t    var info = cm.getScrollInfo();\n\t    if (!cm.somethingSelected()) {\n\t      var visibleTopLine = cm.lineAtHeight(info.top, \"local\")+1;\n\t      if (cm.getCursor().line <= visibleTopLine)\n\t        cm.execCommand(\"goLineDown\");\n\t    }\n\t    cm.scrollTo(null, info.top + cm.defaultTextHeight());\n\t  };\n\n\t  cmds.splitSelectionByLine = function(cm) {\n\t    var ranges = cm.listSelections(), lineRanges = [];\n\t    for (var i = 0; i < ranges.length; i++) {\n\t      var from = ranges[i].from(), to = ranges[i].to();\n\t      for (var line = from.line; line <= to.line; ++line)\n\t        if (!(to.line > from.line && line == to.line && to.ch == 0))\n\t          lineRanges.push({anchor: line == from.line ? from : Pos(line, 0),\n\t                           head: line == to.line ? to : Pos(line)});\n\t    }\n\t    cm.setSelections(lineRanges, 0);\n\t  };\n\n\t  cmds.singleSelectionTop = function(cm) {\n\t    var range = cm.listSelections()[0];\n\t    cm.setSelection(range.anchor, range.head, {scroll: false});\n\t  };\n\n\t  cmds.selectLine = function(cm) {\n\t    var ranges = cm.listSelections(), extended = [];\n\t    for (var i = 0; i < ranges.length; i++) {\n\t      var range = ranges[i];\n\t      extended.push({anchor: Pos(range.from().line, 0),\n\t                     head: Pos(range.to().line + 1, 0)});\n\t    }\n\t    cm.setSelections(extended);\n\t  };\n\n\t  function insertLine(cm, above) {\n\t    if (cm.isReadOnly()) return CodeMirror.Pass\n\t    cm.operation(function() {\n\t      var len = cm.listSelections().length, newSelection = [], last = -1;\n\t      for (var i = 0; i < len; i++) {\n\t        var head = cm.listSelections()[i].head;\n\t        if (head.line <= last) continue;\n\t        var at = Pos(head.line + (above ? 0 : 1), 0);\n\t        cm.replaceRange(\"\\n\", at, null, \"+insertLine\");\n\t        cm.indentLine(at.line, null, true);\n\t        newSelection.push({head: at, anchor: at});\n\t        last = head.line + 1;\n\t      }\n\t      cm.setSelections(newSelection);\n\t    });\n\t    cm.execCommand(\"indentAuto\");\n\t  }\n\n\t  cmds.insertLineAfter = function(cm) { return insertLine(cm, false); };\n\n\t  cmds.insertLineBefore = function(cm) { return insertLine(cm, true); };\n\n\t  function wordAt(cm, pos) {\n\t    var start = pos.ch, end = start, line = cm.getLine(pos.line);\n\t    while (start && CodeMirror.isWordChar(line.charAt(start - 1))) --start;\n\t    while (end < line.length && CodeMirror.isWordChar(line.charAt(end))) ++end;\n\t    return {from: Pos(pos.line, start), to: Pos(pos.line, end), word: line.slice(start, end)};\n\t  }\n\n\t  cmds.selectNextOccurrence = function(cm) {\n\t    var from = cm.getCursor(\"from\"), to = cm.getCursor(\"to\");\n\t    var fullWord = cm.state.sublimeFindFullWord == cm.doc.sel;\n\t    if (CodeMirror.cmpPos(from, to) == 0) {\n\t      var word = wordAt(cm, from);\n\t      if (!word.word) return;\n\t      cm.setSelection(word.from, word.to);\n\t      fullWord = true;\n\t    } else {\n\t      var text = cm.getRange(from, to);\n\t      var query = fullWord ? new RegExp(\"\\\\b\" + text + \"\\\\b\") : text;\n\t      var cur = cm.getSearchCursor(query, to);\n\t      var found = cur.findNext();\n\t      if (!found) {\n\t        cur = cm.getSearchCursor(query, Pos(cm.firstLine(), 0));\n\t        found = cur.findNext();\n\t      }\n\t      if (!found || isSelectedRange(cm.listSelections(), cur.from(), cur.to())) return\n\t      cm.addSelection(cur.from(), cur.to());\n\t    }\n\t    if (fullWord)\n\t      cm.state.sublimeFindFullWord = cm.doc.sel;\n\t  };\n\n\t  cmds.skipAndSelectNextOccurrence = function(cm) {\n\t    var prevAnchor = cm.getCursor(\"anchor\"), prevHead = cm.getCursor(\"head\");\n\t    cmds.selectNextOccurrence(cm);\n\t    if (CodeMirror.cmpPos(prevAnchor, prevHead) != 0) {\n\t      cm.doc.setSelections(cm.doc.listSelections()\n\t          .filter(function (sel) {\n\t            return sel.anchor != prevAnchor || sel.head != prevHead;\n\t          }));\n\t    }\n\t  };\n\n\t  function addCursorToSelection(cm, dir) {\n\t    var ranges = cm.listSelections(), newRanges = [];\n\t    for (var i = 0; i < ranges.length; i++) {\n\t      var range = ranges[i];\n\t      var newAnchor = cm.findPosV(\n\t          range.anchor, dir, \"line\", range.anchor.goalColumn);\n\t      var newHead = cm.findPosV(\n\t          range.head, dir, \"line\", range.head.goalColumn);\n\t      newAnchor.goalColumn = range.anchor.goalColumn != null ?\n\t          range.anchor.goalColumn : cm.cursorCoords(range.anchor, \"div\").left;\n\t      newHead.goalColumn = range.head.goalColumn != null ?\n\t          range.head.goalColumn : cm.cursorCoords(range.head, \"div\").left;\n\t      var newRange = {anchor: newAnchor, head: newHead};\n\t      newRanges.push(range);\n\t      newRanges.push(newRange);\n\t    }\n\t    cm.setSelections(newRanges);\n\t  }\n\t  cmds.addCursorToPrevLine = function(cm) { addCursorToSelection(cm, -1); };\n\t  cmds.addCursorToNextLine = function(cm) { addCursorToSelection(cm, 1); };\n\n\t  function isSelectedRange(ranges, from, to) {\n\t    for (var i = 0; i < ranges.length; i++)\n\t      if (CodeMirror.cmpPos(ranges[i].from(), from) == 0 &&\n\t          CodeMirror.cmpPos(ranges[i].to(), to) == 0) return true\n\t    return false\n\t  }\n\n\t  var mirror = \"(){}[]\";\n\t  function selectBetweenBrackets(cm) {\n\t    var ranges = cm.listSelections(), newRanges = [];\n\t    for (var i = 0; i < ranges.length; i++) {\n\t      var range = ranges[i], pos = range.head, opening = cm.scanForBracket(pos, -1);\n\t      if (!opening) return false;\n\t      for (;;) {\n\t        var closing = cm.scanForBracket(pos, 1);\n\t        if (!closing) return false;\n\t        if (closing.ch == mirror.charAt(mirror.indexOf(opening.ch) + 1)) {\n\t          var startPos = Pos(opening.pos.line, opening.pos.ch + 1);\n\t          if (CodeMirror.cmpPos(startPos, range.from()) == 0 &&\n\t              CodeMirror.cmpPos(closing.pos, range.to()) == 0) {\n\t            opening = cm.scanForBracket(opening.pos, -1);\n\t            if (!opening) return false;\n\t          } else {\n\t            newRanges.push({anchor: startPos, head: closing.pos});\n\t            break;\n\t          }\n\t        }\n\t        pos = Pos(closing.pos.line, closing.pos.ch + 1);\n\t      }\n\t    }\n\t    cm.setSelections(newRanges);\n\t    return true;\n\t  }\n\n\t  cmds.selectScope = function(cm) {\n\t    selectBetweenBrackets(cm) || cm.execCommand(\"selectAll\");\n\t  };\n\t  cmds.selectBetweenBrackets = function(cm) {\n\t    if (!selectBetweenBrackets(cm)) return CodeMirror.Pass;\n\t  };\n\n\t  function puncType(type) {\n\t    return !type ? null : /\\bpunctuation\\b/.test(type) ? type : undefined\n\t  }\n\n\t  cmds.goToBracket = function(cm) {\n\t    cm.extendSelectionsBy(function(range) {\n\t      var next = cm.scanForBracket(range.head, 1, puncType(cm.getTokenTypeAt(range.head)));\n\t      if (next && CodeMirror.cmpPos(next.pos, range.head) != 0) return next.pos;\n\t      var prev = cm.scanForBracket(range.head, -1, puncType(cm.getTokenTypeAt(Pos(range.head.line, range.head.ch + 1))));\n\t      return prev && Pos(prev.pos.line, prev.pos.ch + 1) || range.head;\n\t    });\n\t  };\n\n\t  cmds.swapLineUp = function(cm) {\n\t    if (cm.isReadOnly()) return CodeMirror.Pass\n\t    var ranges = cm.listSelections(), linesToMove = [], at = cm.firstLine() - 1, newSels = [];\n\t    for (var i = 0; i < ranges.length; i++) {\n\t      var range = ranges[i], from = range.from().line - 1, to = range.to().line;\n\t      newSels.push({anchor: Pos(range.anchor.line - 1, range.anchor.ch),\n\t                    head: Pos(range.head.line - 1, range.head.ch)});\n\t      if (range.to().ch == 0 && !range.empty()) --to;\n\t      if (from > at) linesToMove.push(from, to);\n\t      else if (linesToMove.length) linesToMove[linesToMove.length - 1] = to;\n\t      at = to;\n\t    }\n\t    cm.operation(function() {\n\t      for (var i = 0; i < linesToMove.length; i += 2) {\n\t        var from = linesToMove[i], to = linesToMove[i + 1];\n\t        var line = cm.getLine(from);\n\t        cm.replaceRange(\"\", Pos(from, 0), Pos(from + 1, 0), \"+swapLine\");\n\t        if (to > cm.lastLine())\n\t          cm.replaceRange(\"\\n\" + line, Pos(cm.lastLine()), null, \"+swapLine\");\n\t        else\n\t          cm.replaceRange(line + \"\\n\", Pos(to, 0), null, \"+swapLine\");\n\t      }\n\t      cm.setSelections(newSels);\n\t      cm.scrollIntoView();\n\t    });\n\t  };\n\n\t  cmds.swapLineDown = function(cm) {\n\t    if (cm.isReadOnly()) return CodeMirror.Pass\n\t    var ranges = cm.listSelections(), linesToMove = [], at = cm.lastLine() + 1;\n\t    for (var i = ranges.length - 1; i >= 0; i--) {\n\t      var range = ranges[i], from = range.to().line + 1, to = range.from().line;\n\t      if (range.to().ch == 0 && !range.empty()) from--;\n\t      if (from < at) linesToMove.push(from, to);\n\t      else if (linesToMove.length) linesToMove[linesToMove.length - 1] = to;\n\t      at = to;\n\t    }\n\t    cm.operation(function() {\n\t      for (var i = linesToMove.length - 2; i >= 0; i -= 2) {\n\t        var from = linesToMove[i], to = linesToMove[i + 1];\n\t        var line = cm.getLine(from);\n\t        if (from == cm.lastLine())\n\t          cm.replaceRange(\"\", Pos(from - 1), Pos(from), \"+swapLine\");\n\t        else\n\t          cm.replaceRange(\"\", Pos(from, 0), Pos(from + 1, 0), \"+swapLine\");\n\t        cm.replaceRange(line + \"\\n\", Pos(to, 0), null, \"+swapLine\");\n\t      }\n\t      cm.scrollIntoView();\n\t    });\n\t  };\n\n\t  cmds.toggleCommentIndented = function(cm) {\n\t    cm.toggleComment({ indent: true });\n\t  };\n\n\t  cmds.joinLines = function(cm) {\n\t    var ranges = cm.listSelections(), joined = [];\n\t    for (var i = 0; i < ranges.length; i++) {\n\t      var range = ranges[i], from = range.from();\n\t      var start = from.line, end = range.to().line;\n\t      while (i < ranges.length - 1 && ranges[i + 1].from().line == end)\n\t        end = ranges[++i].to().line;\n\t      joined.push({start: start, end: end, anchor: !range.empty() && from});\n\t    }\n\t    cm.operation(function() {\n\t      var offset = 0, ranges = [];\n\t      for (var i = 0; i < joined.length; i++) {\n\t        var obj = joined[i];\n\t        var anchor = obj.anchor && Pos(obj.anchor.line - offset, obj.anchor.ch), head;\n\t        for (var line = obj.start; line <= obj.end; line++) {\n\t          var actual = line - offset;\n\t          if (line == obj.end) head = Pos(actual, cm.getLine(actual).length + 1);\n\t          if (actual < cm.lastLine()) {\n\t            cm.replaceRange(\" \", Pos(actual), Pos(actual + 1, /^\\s*/.exec(cm.getLine(actual + 1))[0].length));\n\t            ++offset;\n\t          }\n\t        }\n\t        ranges.push({anchor: anchor || head, head: head});\n\t      }\n\t      cm.setSelections(ranges, 0);\n\t    });\n\t  };\n\n\t  cmds.duplicateLine = function(cm) {\n\t    cm.operation(function() {\n\t      var rangeCount = cm.listSelections().length;\n\t      for (var i = 0; i < rangeCount; i++) {\n\t        var range = cm.listSelections()[i];\n\t        if (range.empty())\n\t          cm.replaceRange(cm.getLine(range.head.line) + \"\\n\", Pos(range.head.line, 0));\n\t        else\n\t          cm.replaceRange(cm.getRange(range.from(), range.to()), range.from());\n\t      }\n\t      cm.scrollIntoView();\n\t    });\n\t  };\n\n\n\t  function sortLines(cm, caseSensitive) {\n\t    if (cm.isReadOnly()) return CodeMirror.Pass\n\t    var ranges = cm.listSelections(), toSort = [], selected;\n\t    for (var i = 0; i < ranges.length; i++) {\n\t      var range = ranges[i];\n\t      if (range.empty()) continue;\n\t      var from = range.from().line, to = range.to().line;\n\t      while (i < ranges.length - 1 && ranges[i + 1].from().line == to)\n\t        to = ranges[++i].to().line;\n\t      if (!ranges[i].to().ch) to--;\n\t      toSort.push(from, to);\n\t    }\n\t    if (toSort.length) selected = true;\n\t    else toSort.push(cm.firstLine(), cm.lastLine());\n\n\t    cm.operation(function() {\n\t      var ranges = [];\n\t      for (var i = 0; i < toSort.length; i += 2) {\n\t        var from = toSort[i], to = toSort[i + 1];\n\t        var start = Pos(from, 0), end = Pos(to);\n\t        var lines = cm.getRange(start, end, false);\n\t        if (caseSensitive)\n\t          lines.sort();\n\t        else\n\t          lines.sort(function(a, b) {\n\t            var au = a.toUpperCase(), bu = b.toUpperCase();\n\t            if (au != bu) { a = au; b = bu; }\n\t            return a < b ? -1 : a == b ? 0 : 1;\n\t          });\n\t        cm.replaceRange(lines, start, end);\n\t        if (selected) ranges.push({anchor: start, head: Pos(to + 1, 0)});\n\t      }\n\t      if (selected) cm.setSelections(ranges, 0);\n\t    });\n\t  }\n\n\t  cmds.sortLines = function(cm) { sortLines(cm, true); };\n\t  cmds.sortLinesInsensitive = function(cm) { sortLines(cm, false); };\n\n\t  cmds.nextBookmark = function(cm) {\n\t    var marks = cm.state.sublimeBookmarks;\n\t    if (marks) while (marks.length) {\n\t      var current = marks.shift();\n\t      var found = current.find();\n\t      if (found) {\n\t        marks.push(current);\n\t        return cm.setSelection(found.from, found.to);\n\t      }\n\t    }\n\t  };\n\n\t  cmds.prevBookmark = function(cm) {\n\t    var marks = cm.state.sublimeBookmarks;\n\t    if (marks) while (marks.length) {\n\t      marks.unshift(marks.pop());\n\t      var found = marks[marks.length - 1].find();\n\t      if (!found)\n\t        marks.pop();\n\t      else\n\t        return cm.setSelection(found.from, found.to);\n\t    }\n\t  };\n\n\t  cmds.toggleBookmark = function(cm) {\n\t    var ranges = cm.listSelections();\n\t    var marks = cm.state.sublimeBookmarks || (cm.state.sublimeBookmarks = []);\n\t    for (var i = 0; i < ranges.length; i++) {\n\t      var from = ranges[i].from(), to = ranges[i].to();\n\t      var found = ranges[i].empty() ? cm.findMarksAt(from) : cm.findMarks(from, to);\n\t      for (var j = 0; j < found.length; j++) {\n\t        if (found[j].sublimeBookmark) {\n\t          found[j].clear();\n\t          for (var k = 0; k < marks.length; k++)\n\t            if (marks[k] == found[j])\n\t              marks.splice(k--, 1);\n\t          break;\n\t        }\n\t      }\n\t      if (j == found.length)\n\t        marks.push(cm.markText(from, to, {sublimeBookmark: true, clearWhenEmpty: false}));\n\t    }\n\t  };\n\n\t  cmds.clearBookmarks = function(cm) {\n\t    var marks = cm.state.sublimeBookmarks;\n\t    if (marks) for (var i = 0; i < marks.length; i++) marks[i].clear();\n\t    marks.length = 0;\n\t  };\n\n\t  cmds.selectBookmarks = function(cm) {\n\t    var marks = cm.state.sublimeBookmarks, ranges = [];\n\t    if (marks) for (var i = 0; i < marks.length; i++) {\n\t      var found = marks[i].find();\n\t      if (!found)\n\t        marks.splice(i--, 0);\n\t      else\n\t        ranges.push({anchor: found.from, head: found.to});\n\t    }\n\t    if (ranges.length)\n\t      cm.setSelections(ranges, 0);\n\t  };\n\n\t  function modifyWordOrSelection(cm, mod) {\n\t    cm.operation(function() {\n\t      var ranges = cm.listSelections(), indices = [], replacements = [];\n\t      for (var i = 0; i < ranges.length; i++) {\n\t        var range = ranges[i];\n\t        if (range.empty()) { indices.push(i); replacements.push(\"\"); }\n\t        else replacements.push(mod(cm.getRange(range.from(), range.to())));\n\t      }\n\t      cm.replaceSelections(replacements, \"around\", \"case\");\n\t      for (var i = indices.length - 1, at; i >= 0; i--) {\n\t        var range = ranges[indices[i]];\n\t        if (at && CodeMirror.cmpPos(range.head, at) > 0) continue;\n\t        var word = wordAt(cm, range.head);\n\t        at = word.from;\n\t        cm.replaceRange(mod(word.word), word.from, word.to);\n\t      }\n\t    });\n\t  }\n\n\t  cmds.smartBackspace = function(cm) {\n\t    if (cm.somethingSelected()) return CodeMirror.Pass;\n\n\t    cm.operation(function() {\n\t      var cursors = cm.listSelections();\n\t      var indentUnit = cm.getOption(\"indentUnit\");\n\n\t      for (var i = cursors.length - 1; i >= 0; i--) {\n\t        var cursor = cursors[i].head;\n\t        var toStartOfLine = cm.getRange({line: cursor.line, ch: 0}, cursor);\n\t        var column = CodeMirror.countColumn(toStartOfLine, null, cm.getOption(\"tabSize\"));\n\n\t        // Delete by one character by default\n\t        var deletePos = cm.findPosH(cursor, -1, \"char\", false);\n\n\t        if (toStartOfLine && !/\\S/.test(toStartOfLine) && column % indentUnit == 0) {\n\t          var prevIndent = new Pos(cursor.line,\n\t            CodeMirror.findColumn(toStartOfLine, column - indentUnit, indentUnit));\n\n\t          // Smart delete only if we found a valid prevIndent location\n\t          if (prevIndent.ch != cursor.ch) deletePos = prevIndent;\n\t        }\n\n\t        cm.replaceRange(\"\", deletePos, cursor, \"+delete\");\n\t      }\n\t    });\n\t  };\n\n\t  cmds.delLineRight = function(cm) {\n\t    cm.operation(function() {\n\t      var ranges = cm.listSelections();\n\t      for (var i = ranges.length - 1; i >= 0; i--)\n\t        cm.replaceRange(\"\", ranges[i].anchor, Pos(ranges[i].to().line), \"+delete\");\n\t      cm.scrollIntoView();\n\t    });\n\t  };\n\n\t  cmds.upcaseAtCursor = function(cm) {\n\t    modifyWordOrSelection(cm, function(str) { return str.toUpperCase(); });\n\t  };\n\t  cmds.downcaseAtCursor = function(cm) {\n\t    modifyWordOrSelection(cm, function(str) { return str.toLowerCase(); });\n\t  };\n\n\t  cmds.setSublimeMark = function(cm) {\n\t    if (cm.state.sublimeMark) cm.state.sublimeMark.clear();\n\t    cm.state.sublimeMark = cm.setBookmark(cm.getCursor());\n\t  };\n\t  cmds.selectToSublimeMark = function(cm) {\n\t    var found = cm.state.sublimeMark && cm.state.sublimeMark.find();\n\t    if (found) cm.setSelection(cm.getCursor(), found);\n\t  };\n\t  cmds.deleteToSublimeMark = function(cm) {\n\t    var found = cm.state.sublimeMark && cm.state.sublimeMark.find();\n\t    if (found) {\n\t      var from = cm.getCursor(), to = found;\n\t      if (CodeMirror.cmpPos(from, to) > 0) { var tmp = to; to = from; from = tmp; }\n\t      cm.state.sublimeKilled = cm.getRange(from, to);\n\t      cm.replaceRange(\"\", from, to);\n\t    }\n\t  };\n\t  cmds.swapWithSublimeMark = function(cm) {\n\t    var found = cm.state.sublimeMark && cm.state.sublimeMark.find();\n\t    if (found) {\n\t      cm.state.sublimeMark.clear();\n\t      cm.state.sublimeMark = cm.setBookmark(cm.getCursor());\n\t      cm.setCursor(found);\n\t    }\n\t  };\n\t  cmds.sublimeYank = function(cm) {\n\t    if (cm.state.sublimeKilled != null)\n\t      cm.replaceSelection(cm.state.sublimeKilled, null, \"paste\");\n\t  };\n\n\t  cmds.showInCenter = function(cm) {\n\t    var pos = cm.cursorCoords(null, \"local\");\n\t    cm.scrollTo(null, (pos.top + pos.bottom) / 2 - cm.getScrollInfo().clientHeight / 2);\n\t  };\n\n\t  function getTarget(cm) {\n\t    var from = cm.getCursor(\"from\"), to = cm.getCursor(\"to\");\n\t    if (CodeMirror.cmpPos(from, to) == 0) {\n\t      var word = wordAt(cm, from);\n\t      if (!word.word) return;\n\t      from = word.from;\n\t      to = word.to;\n\t    }\n\t    return {from: from, to: to, query: cm.getRange(from, to), word: word};\n\t  }\n\n\t  function findAndGoTo(cm, forward) {\n\t    var target = getTarget(cm);\n\t    if (!target) return;\n\t    var query = target.query;\n\t    var cur = cm.getSearchCursor(query, forward ? target.to : target.from);\n\n\t    if (forward ? cur.findNext() : cur.findPrevious()) {\n\t      cm.setSelection(cur.from(), cur.to());\n\t    } else {\n\t      cur = cm.getSearchCursor(query, forward ? Pos(cm.firstLine(), 0)\n\t                                              : cm.clipPos(Pos(cm.lastLine())));\n\t      if (forward ? cur.findNext() : cur.findPrevious())\n\t        cm.setSelection(cur.from(), cur.to());\n\t      else if (target.word)\n\t        cm.setSelection(target.from, target.to);\n\t    }\n\t  }  cmds.findUnder = function(cm) { findAndGoTo(cm, true); };\n\t  cmds.findUnderPrevious = function(cm) { findAndGoTo(cm,false); };\n\t  cmds.findAllUnder = function(cm) {\n\t    var target = getTarget(cm);\n\t    if (!target) return;\n\t    var cur = cm.getSearchCursor(target.query);\n\t    var matches = [];\n\t    var primaryIndex = -1;\n\t    while (cur.findNext()) {\n\t      matches.push({anchor: cur.from(), head: cur.to()});\n\t      if (cur.from().line <= target.from.line && cur.from().ch <= target.from.ch)\n\t        primaryIndex++;\n\t    }\n\t    cm.setSelections(matches, primaryIndex);\n\t  };\n\n\n\t  var keyMap = CodeMirror.keyMap;\n\t  keyMap.macSublime = {\n\t    \"Cmd-Left\": \"goLineStartSmart\",\n\t    \"Shift-Tab\": \"indentLess\",\n\t    \"Shift-Ctrl-K\": \"deleteLine\",\n\t    \"Alt-Q\": \"wrapLines\",\n\t    \"Ctrl-Left\": \"goSubwordLeft\",\n\t    \"Ctrl-Right\": \"goSubwordRight\",\n\t    \"Ctrl-Alt-Up\": \"scrollLineUp\",\n\t    \"Ctrl-Alt-Down\": \"scrollLineDown\",\n\t    \"Cmd-L\": \"selectLine\",\n\t    \"Shift-Cmd-L\": \"splitSelectionByLine\",\n\t    \"Esc\": \"singleSelectionTop\",\n\t    \"Cmd-Enter\": \"insertLineAfter\",\n\t    \"Shift-Cmd-Enter\": \"insertLineBefore\",\n\t    \"Cmd-D\": \"selectNextOccurrence\",\n\t    \"Shift-Cmd-Space\": \"selectScope\",\n\t    \"Shift-Cmd-M\": \"selectBetweenBrackets\",\n\t    \"Cmd-M\": \"goToBracket\",\n\t    \"Cmd-Ctrl-Up\": \"swapLineUp\",\n\t    \"Cmd-Ctrl-Down\": \"swapLineDown\",\n\t    \"Cmd-/\": \"toggleCommentIndented\",\n\t    \"Cmd-J\": \"joinLines\",\n\t    \"Shift-Cmd-D\": \"duplicateLine\",\n\t    \"F5\": \"sortLines\",\n\t    \"Cmd-F5\": \"sortLinesInsensitive\",\n\t    \"F2\": \"nextBookmark\",\n\t    \"Shift-F2\": \"prevBookmark\",\n\t    \"Cmd-F2\": \"toggleBookmark\",\n\t    \"Shift-Cmd-F2\": \"clearBookmarks\",\n\t    \"Alt-F2\": \"selectBookmarks\",\n\t    \"Backspace\": \"smartBackspace\",\n\t    \"Cmd-K Cmd-D\": \"skipAndSelectNextOccurrence\",\n\t    \"Cmd-K Cmd-K\": \"delLineRight\",\n\t    \"Cmd-K Cmd-U\": \"upcaseAtCursor\",\n\t    \"Cmd-K Cmd-L\": \"downcaseAtCursor\",\n\t    \"Cmd-K Cmd-Space\": \"setSublimeMark\",\n\t    \"Cmd-K Cmd-A\": \"selectToSublimeMark\",\n\t    \"Cmd-K Cmd-W\": \"deleteToSublimeMark\",\n\t    \"Cmd-K Cmd-X\": \"swapWithSublimeMark\",\n\t    \"Cmd-K Cmd-Y\": \"sublimeYank\",\n\t    \"Cmd-K Cmd-C\": \"showInCenter\",\n\t    \"Cmd-K Cmd-G\": \"clearBookmarks\",\n\t    \"Cmd-K Cmd-Backspace\": \"delLineLeft\",\n\t    \"Cmd-K Cmd-1\": \"foldAll\",\n\t    \"Cmd-K Cmd-0\": \"unfoldAll\",\n\t    \"Cmd-K Cmd-J\": \"unfoldAll\",\n\t    \"Ctrl-Shift-Up\": \"addCursorToPrevLine\",\n\t    \"Ctrl-Shift-Down\": \"addCursorToNextLine\",\n\t    \"Cmd-F3\": \"findUnder\",\n\t    \"Shift-Cmd-F3\": \"findUnderPrevious\",\n\t    \"Alt-F3\": \"findAllUnder\",\n\t    \"Shift-Cmd-[\": \"fold\",\n\t    \"Shift-Cmd-]\": \"unfold\",\n\t    \"Cmd-I\": \"findIncremental\",\n\t    \"Shift-Cmd-I\": \"findIncrementalReverse\",\n\t    \"Cmd-H\": \"replace\",\n\t    \"F3\": \"findNext\",\n\t    \"Shift-F3\": \"findPrev\",\n\t    \"fallthrough\": \"macDefault\"\n\t  };\n\t  CodeMirror.normalizeKeyMap(keyMap.macSublime);\n\n\t  keyMap.pcSublime = {\n\t    \"Shift-Tab\": \"indentLess\",\n\t    \"Shift-Ctrl-K\": \"deleteLine\",\n\t    \"Alt-Q\": \"wrapLines\",\n\t    \"Ctrl-T\": \"transposeChars\",\n\t    \"Alt-Left\": \"goSubwordLeft\",\n\t    \"Alt-Right\": \"goSubwordRight\",\n\t    \"Ctrl-Up\": \"scrollLineUp\",\n\t    \"Ctrl-Down\": \"scrollLineDown\",\n\t    \"Ctrl-L\": \"selectLine\",\n\t    \"Shift-Ctrl-L\": \"splitSelectionByLine\",\n\t    \"Esc\": \"singleSelectionTop\",\n\t    \"Ctrl-Enter\": \"insertLineAfter\",\n\t    \"Shift-Ctrl-Enter\": \"insertLineBefore\",\n\t    \"Ctrl-D\": \"selectNextOccurrence\",\n\t    \"Shift-Ctrl-Space\": \"selectScope\",\n\t    \"Shift-Ctrl-M\": \"selectBetweenBrackets\",\n\t    \"Ctrl-M\": \"goToBracket\",\n\t    \"Shift-Ctrl-Up\": \"swapLineUp\",\n\t    \"Shift-Ctrl-Down\": \"swapLineDown\",\n\t    \"Ctrl-/\": \"toggleCommentIndented\",\n\t    \"Ctrl-J\": \"joinLines\",\n\t    \"Shift-Ctrl-D\": \"duplicateLine\",\n\t    \"F9\": \"sortLines\",\n\t    \"Ctrl-F9\": \"sortLinesInsensitive\",\n\t    \"F2\": \"nextBookmark\",\n\t    \"Shift-F2\": \"prevBookmark\",\n\t    \"Ctrl-F2\": \"toggleBookmark\",\n\t    \"Shift-Ctrl-F2\": \"clearBookmarks\",\n\t    \"Alt-F2\": \"selectBookmarks\",\n\t    \"Backspace\": \"smartBackspace\",\n\t    \"Ctrl-K Ctrl-D\": \"skipAndSelectNextOccurrence\",\n\t    \"Ctrl-K Ctrl-K\": \"delLineRight\",\n\t    \"Ctrl-K Ctrl-U\": \"upcaseAtCursor\",\n\t    \"Ctrl-K Ctrl-L\": \"downcaseAtCursor\",\n\t    \"Ctrl-K Ctrl-Space\": \"setSublimeMark\",\n\t    \"Ctrl-K Ctrl-A\": \"selectToSublimeMark\",\n\t    \"Ctrl-K Ctrl-W\": \"deleteToSublimeMark\",\n\t    \"Ctrl-K Ctrl-X\": \"swapWithSublimeMark\",\n\t    \"Ctrl-K Ctrl-Y\": \"sublimeYank\",\n\t    \"Ctrl-K Ctrl-C\": \"showInCenter\",\n\t    \"Ctrl-K Ctrl-G\": \"clearBookmarks\",\n\t    \"Ctrl-K Ctrl-Backspace\": \"delLineLeft\",\n\t    \"Ctrl-K Ctrl-1\": \"foldAll\",\n\t    \"Ctrl-K Ctrl-0\": \"unfoldAll\",\n\t    \"Ctrl-K Ctrl-J\": \"unfoldAll\",\n\t    \"Ctrl-Alt-Up\": \"addCursorToPrevLine\",\n\t    \"Ctrl-Alt-Down\": \"addCursorToNextLine\",\n\t    \"Ctrl-F3\": \"findUnder\",\n\t    \"Shift-Ctrl-F3\": \"findUnderPrevious\",\n\t    \"Alt-F3\": \"findAllUnder\",\n\t    \"Shift-Ctrl-[\": \"fold\",\n\t    \"Shift-Ctrl-]\": \"unfold\",\n\t    \"Ctrl-I\": \"findIncremental\",\n\t    \"Shift-Ctrl-I\": \"findIncrementalReverse\",\n\t    \"Ctrl-H\": \"replace\",\n\t    \"F3\": \"findNext\",\n\t    \"Shift-F3\": \"findPrev\",\n\t    \"fallthrough\": \"pcDefault\"\n\t  };\n\t  CodeMirror.normalizeKeyMap(keyMap.pcSublime);\n\n\t  var mac = keyMap.default == keyMap.macDefault;\n\t  keyMap.sublime = mac ? keyMap.macSublime : keyMap.pcSublime;\n\t});\n\t});\n\n\tvar search = createCommonjsModule(function (module, exports) {\n\t(function (mod) {\n\n\t  mod(codemirror);\n\t})(function (CodeMirror) {\n\n\t  var Search;\n\n\t  CodeMirror.defineOption(\"searchbox\", false, function (cm) {\n\t    cm.addKeyMap({\n\t      \"Ctrl-F\": function () {\n\t        var cmEle = cm.display.wrapper;\n\t        if (!Search || !cmEle.parentElement.contains(Search.searchBox)) {\n\t          Search = new SearchBox(cm);\n\t        }\n\t        var isReplace = false;\n\t        if (cmEle.parentElement.querySelector(\"[action=toggleReplace]\")) {\n\t          isReplace =\n\t            cmEle.parentElement.querySelector(\"[action=toggleReplace]\")\n\t              .innerText === \"-\";\n\t        }\n\t        Search.show(cm.getSelection(), isReplace);\n\t      },\n\n\t      Esc: function () {\n\t        if (!Search || !Search.isVisible()) return CodeMirror.Pass;\n\n\t        Search.hide();\n\n\t        if (typeof event !== \"undefined\") event.stopPropagation();\n\t      },\n\n\t      \"Cmd-F\": function () {\n\t        if (!Search) Search = new SearchBox(cm);\n\t        Search.show();\n\t      },\n\t    });\n\t  });\n\n\t  function SearchBox(cm) {\n\t    var self = this;\n\n\t    init();\n\n\t    function initElements(el) {\n\t      self.searchBox = el.querySelector(\".ace_search_form\");\n\t      self.replaceBox = el.querySelector(\".ace_replace_form\");\n\t      self.searchOptions = el.querySelector(\".ace_search_options\");\n\n\t      self.regExpOption = el.querySelector(\"[action=toggleRegexpMode]\");\n\t      self.caseSensitiveOption = el.querySelector(\n\t        \"[action=toggleCaseSensitive]\"\n\t      );\n\t      self.wholeWordOption = el.querySelector(\"[action=toggleWholeWords]\");\n\n\t      self.searchInput = self.searchBox.querySelector(\".ace_search_field\");\n\t      self.replaceInput = self.replaceBox.querySelector(\".ace_search_field\");\n\t    }\n\n\t    function init() {\n\t      var el = (self.element = addHtml());\n\n\t      addStyle();\n\n\t      initElements(el);\n\t      bindKeys();\n\n\t      el.addEventListener(\"mousedown\", function (e) {\n\t        setTimeout(function () {\n\t          self.activeInput.focus();\n\t        }, 0);\n\n\t        e.stopPropagation();\n\t      });\n\n\t      el.addEventListener(\"click\", function (e) {\n\t        var t = e.target || e.srcElement;\n\t        var action = t.getAttribute(\"action\");\n\t        if (action && self[action]) self[action]();\n\t        else if (self.commands[action]) self.commands[action]();\n\t        e.stopPropagation();\n\t      });\n\n\t      self.searchInput.addEventListener(\"input\", function () {\n\t        self.$onChange.schedule(20);\n\t      });\n\n\t      self.searchInput.addEventListener(\"focus\", function () {\n\t        self.activeInput = self.searchInput;\n\t      });\n\n\t      self.replaceInput.addEventListener(\"focus\", function () {\n\t        self.activeInput = self.replaceInput;\n\t      });\n\n\t      self.$onChange = delayedCall(function () {\n\t        self.find(false, false);\n\t      });\n\t    }\n\n\t    function bindKeys() {\n\t      var sb = self,\n\t        obj = {\n\t          \"Ctrl-F|Cmd-F|Ctrl-H|Command-Alt-F\": function () {\n\t            var isReplace = (sb.isReplace = !sb.isReplace);\n\t            sb.replaceBox.style.display = isReplace ? \"\" : \"none\";\n\t            sb[isReplace ? \"replaceInput\" : \"searchInput\"].focus();\n\t          },\n\t          \"Ctrl-G|Cmd-G\": function () {\n\t            sb.findNext();\n\t          },\n\t          \"Ctrl-Shift-G|Cmd-Shift-G\": function () {\n\t            sb.findPrev();\n\t          },\n\t          Esc: function () {\n\t            setTimeout(function () {\n\t              sb.hide();\n\t            });\n\t          },\n\t          Enter: function () {\n\t            if (sb.activeInput === sb.replaceInput) sb.replace();\n\t            sb.findNext();\n\t          },\n\t          \"Shift-Enter\": function () {\n\t            if (sb.activeInput === sb.replaceInput) sb.replace();\n\t            sb.findPrev();\n\t          },\n\t          \"Alt-Enter\": function () {\n\t            if (sb.activeInput === sb.replaceInput) sb.replaceAll();\n\t            sb.findAll();\n\t          },\n\t          Tab: function () {\n\t            if (self.activeInput === self.replaceInput)\n\t              self.searchInput.focus();\n\t            else self.replaceInput.focus();\n\t          },\n\t        };\n\n\t      self.element.addEventListener(\"keydown\", function (event) {\n\t        Object.keys(obj).some(function (name) {\n\t          var is = key(name, event);\n\n\t          if (is) {\n\t            event.stopPropagation();\n\t            event.preventDefault();\n\t            obj[name](event);\n\t          }\n\n\t          return is;\n\t        });\n\t      });\n\t    }\n\n\t    this.commands = {\n\t      toggleRegexpMode: function () {\n\t        self.regExpOption.checked = !self.regExpOption.checked;\n\t        self.$syncOptions();\n\t      },\n\n\t      toggleCaseSensitive: function () {\n\t        self.caseSensitiveOption.checked = !self.caseSensitiveOption.checked;\n\t        self.$syncOptions();\n\t      },\n\n\t      toggleWholeWords: function () {\n\t        self.wholeWordOption.checked = !self.wholeWordOption.checked;\n\t        self.$syncOptions();\n\t      },\n\t    };\n\n\t    this.$syncOptions = function () {\n\t      setCssClass(this.regExpOption, \"checked\", this.regExpOption.checked);\n\t      setCssClass(\n\t        this.wholeWordOption,\n\t        \"checked\",\n\t        this.wholeWordOption.checked\n\t      );\n\t      setCssClass(\n\t        this.caseSensitiveOption,\n\t        \"checked\",\n\t        this.caseSensitiveOption.checked\n\t      );\n\n\t      this.find(false, false);\n\t    };\n\n\t    this.find = function (skipCurrent, backwards) {\n\t      var value = this.searchInput.value,\n\t        options = {\n\t          skipCurrent: skipCurrent,\n\t          backwards: backwards,\n\t          regExp: this.regExpOption.checked,\n\t          caseSensitive: this.caseSensitiveOption.checked,\n\t          wholeWord: this.wholeWordOption.checked,\n\t        };\n\n\t      find(value, options, function (searchCursor) {\n\t        var current = searchCursor.matches(false, searchCursor.from());\n\t        cm.setSelection(current.from, current.to);\n\t      });\n\t    };\n\n\t    function find(value, options, callback) {\n\t      if (!value) {\n\t        clearSearch(cm);\n\t        updateCount();\n\t        return;\n\t      }\n\t      var done,\n\t        noMatch,\n\t        searchCursor,\n\t        next,\n\t        prev,\n\t        matches,\n\t        cursor,\n\t        position,\n\t        val = value,\n\t        o = options,\n\t        is = true,\n\t        caseSensitive = o.caseSensitive,\n\t        regExp = o.regExp,\n\t        wholeWord = o.wholeWord;\n\n\t      if (regExp) {\n\t        val = val.replace(/[\\-\\[\\]\\/\\{\\}\\(\\)\\*\\+\\?\\.\\\\\\^\\$\\|]/g, \"\\\\$&\");\n\t      }\n\t      if (wholeWord) {\n\t        if (caseSensitive) {\n\t          val = val = RegExp(\"\\\\b\" + val + \"\\\\b\");\n\t        } else {\n\t          val = RegExp(\"\\\\b\" + val + \"\\\\b\", \"i\");\n\t        }\n\t      }\n\t      if (regExp) {\n\t        val = RegExp(val);\n\t      }\n\t      clearSearch(cm);\n\t      doSearch(cm, val, caseSensitive);\n\t      updateCount();\n\t      if (o.backwards) position = o.skipCurrent ? \"from\" : \"to\";\n\t      else position = o.skipCurrent ? \"to\" : \"from\";\n\n\t      cursor = cm.getCursor(position);\n\t      searchCursor = cm.getSearchCursor(val, cursor, !caseSensitive);\n\n\t      (next = searchCursor.findNext.bind(searchCursor)),\n\t        (prev = searchCursor.findPrevious.bind(searchCursor)),\n\t        (matches = searchCursor.matches.bind(searchCursor));\n\n\t      if (o.backwards && !prev()) {\n\t        is = next();\n\n\t        if (is) {\n\t          cm.setCursor(cm.doc.size - 1, 0);\n\t          find(value, options, callback);\n\t          done = true;\n\t        }\n\t      } else if (!o.backwards && !next()) {\n\t        is = prev();\n\n\t        if (is) {\n\t          cm.setCursor(0, 0);\n\t          find(value, options, callback);\n\t          done = true;\n\t        }\n\t      }\n\n\t      noMatch = !is && self.searchInput.value;\n\t      setCssClass(self.searchBox, \"ace_nomatch\", noMatch);\n\n\t      if (!done && is) callback(searchCursor);\n\t    }\n\n\t    this.findNext = function () {\n\t      this.find(true, false);\n\t    };\n\n\t    this.findPrev = function () {\n\t      this.find(true, true);\n\t    };\n\n\t    this.findAll = function () {\n\t      var value = this.searchInput.value,\n\t        noMatch =  this.searchInput.value;\n\n\t      setCssClass(this.searchBox, \"ace_nomatch\", noMatch);\n\n\t      if (cm.showMatchesOnScrollbar) cm.showMatchesOnScrollbar(value);\n\n\t      this.hide();\n\t    };\n\n\t    this.replace = function () {\n\t      var readOnly = cm.getOption(\"readOnly\"),\n\t        isSelection = !!cm.getSelection();\n\t      if (!readOnly && isSelection)\n\t        cm.replaceSelection(this.replaceInput.value, \"start\");\n\t      updateCount();\n\t    };\n\n\t    this.replaceAndFindNext = function () {\n\t      var readOnly = cm.getOption(\"readOnly\");\n\n\t      if (!readOnly) {\n\t        this.replace();\n\t        this.findNext();\n\t      }\n\t    };\n\n\t    this.replaceAll = function () {\n\t      var value,\n\t        cursor,\n\t        from = this.searchInput.value,\n\t        to = this.replaceInput.value,\n\t        reg = RegExp(from, this.caseSensitiveOption.checked ? \"g\" : \"gi\");\n\n\t      if (this.wholeWordOption.checked && !this.regExpOption.checked) {\n\t        if (this.caseSensitiveOption.checked) {\n\t          reg = RegExp(\"\\\\b\" + from + \"\\\\b\", 'g');\n\t        } else {\n\t          reg = RegExp(\"\\\\b\" + from + \"\\\\b\", \"gi\");\n\t        }\n\t      }\n\n\t      if (!cm.getOption(\"readOnly\") && cm.getSelection()) {\n\t        cursor = cm.getCursor();\n\t        value = cm.getValue();\n\t        value = value.replace(reg, to);\n\n\t        cm.setValue(value);\n\t        cm.setCursor(cursor);\n\t      }\n\t      updateCount();\n\t    };\n\n\t    this.toggleReplace = function () {\n\t      var cmEle = cm.display.wrapper;\n\t      if (\n\t        cmEle.parentElement.querySelector(\"[action=toggleReplace]\")\n\t          .innerText === \"+\"\n\t      ) {\n\t        cmEle.parentElement.querySelector(\"[action=toggleReplace]\").innerText =\n\t          \"-\";\n\t        this.replaceBox.style.display = \"\";\n\t        this.isReplace = true;\n\t      } else {\n\t        cmEle.parentElement.querySelector(\"[action=toggleReplace]\").innerText =\n\t          \"+\";\n\t        this.replaceBox.style.display = \"none\";\n\t        this.isReplace = false;\n\t      }\n\t    };\n\n\t    this.hide = function () {\n\t      clearSearch(cm);\n\t      var cmEle = cm.getWrapperElement();\n\t      Search = null;\n\t      cmEle.removeChild(this.element);\n\t      cm.focus();\n\t    };\n\n\t    this.isVisible = function () {\n\t      var is = this.element.style.display === \"\";\n\t      return is;\n\t    };\n\n\t    this.show = function (value, isReplace) {\n\t      this.element.style.display = \"\";\n\t      if (!isReplace) {\n\t        this.replaceBox.style.display = isReplace ? \"\" : \"none\";\n\t      }\n\t      this.isReplace = isReplace;\n\t      if (value) {\n\t        this.searchInput.value = value;\n\t        this.find(false, false);\n\t      }\n\t      this.searchInput.focus();\n\t      this.searchInput.select();\n\t    };\n\n\t    this.isFocused = function () {\n\t      var el = document.activeElement;\n\t      return el === this.searchInput || el === this.replaceInput;\n\t    };\n\n\t    function doSearch(cm, value, caseSensitive) {\n\t      var state = getSearchState(cm);\n\t      var query = value;\n\t      if (query && query !== state.queryText) {\n\t        startSearch(cm, state, query, caseSensitive);\n\t        state.posFrom = state.posTo = cm.getCursor();\n\t      }\n\t    }\n\n\t    function parseString(string) {\n\t      return string.replace(/\\\\([nrt\\\\])/g, function (match, ch) {\n\t        if (ch == \"n\") return \"\\n\";\n\t        if (ch == \"r\") return \"\\r\";\n\t        if (ch == \"t\") return \"\\t\";\n\t        if (ch == \"\\\\\") return \"\\\\\";\n\t        return match;\n\t      });\n\t    }\n\n\t    function parseQuery(query) {\n\t      var reStr = typeof query === \"object\" ? query.toString() : query;\n\t      var isRE = reStr.match(/^\\/(.*)\\/([a-z]*)$/);\n\t      if (isRE) {\n\t        try {\n\t          query = new RegExp(isRE[1], isRE[2].indexOf(\"i\") == -1 ? \"\" : \"i\");\n\t        } catch (e) {} // Not a regular expression after all, do a string search\n\t      } else {\n\t        query = parseString(query);\n\t      }\n\t      if (typeof query == \"string\" ? query == \"\" : query.test(\"\")) query = /x^/;\n\t      return query;\n\t    }\n\n\t    function startSearch(cm, state, query, caseSensitive) {\n\t      state.queryText = query;\n\t      state.query = parseQuery(query);\n\t      cm.removeOverlay(\n\t        state.overlay,\n\t        queryCaseInsensitive(state.query, caseSensitive)\n\t      );\n\t      state.overlay = searchOverlay(\n\t        state.query,\n\t        queryCaseInsensitive(state.query, caseSensitive)\n\t      );\n\t      cm.addOverlay(state.overlay);\n\t      if (cm.showMatchesOnScrollbar) {\n\t        if (state.annotate) {\n\t          state.annotate.clear();\n\t          state.annotate = null;\n\t        }\n\t        state.annotate = cm.showMatchesOnScrollbar(\n\t          state.query,\n\t          queryCaseInsensitive(state.query, caseSensitive)\n\t        );\n\t      }\n\t    }\n\n\t    function queryCaseInsensitive(query, caseSensitive) {\n\t      return typeof query == \"string\" && !caseSensitive;\n\t    }\n\n\t    function searchOverlay(query, caseInsensitive) {\n\t      if (typeof query == \"string\")\n\t        query = new RegExp(\n\t          query.replace(/[\\-\\[\\]\\/\\{\\}\\(\\)\\*\\+\\?\\.\\\\\\^\\$\\|]/g, \"\\\\$&\"),\n\t          caseInsensitive ? \"gi\" : \"g\"\n\t        );\n\t      else if (!query.global)\n\t        query = new RegExp(query.source, query.ignoreCase ? \"gi\" : \"g\");\n\n\t      return {\n\t        token: function (stream) {\n\t          query.lastIndex = stream.pos;\n\t          var match = query.exec(stream.string);\n\t          if (match && match.index == stream.pos) {\n\t            stream.pos += match[0].length || 1;\n\t            return \"searching\";\n\t          } else if (match) {\n\t            stream.pos = match.index;\n\t          } else {\n\t            stream.skipToEnd();\n\t          }\n\t        },\n\t      };\n\t    }\n\n\t    function SearchState() {\n\t      this.posFrom = this.posTo = this.lastQuery = this.query = null;\n\t      this.overlay = null;\n\t    }\n\n\t    function getSearchState(cm) {\n\t      return cm.state.search || (cm.state.search = new SearchState());\n\t    }\n\n\t    function clearSearch(cm) {\n\t      cm.operation(function () {\n\t        var state = getSearchState(cm);\n\t        state.lastQuery = state.query;\n\t        if (!state.query) return;\n\t        state.query = state.queryText = null;\n\t        cm.removeOverlay(state.overlay);\n\t        if (state.annotate) {\n\t          state.annotate.clear();\n\t          state.annotate = null;\n\t        }\n\t      });\n\t    }\n\n\t    function updateCount() {\n\t      var val = self.searchInput.value;\n\t      var matches = [];\n\t      if (val) {\n\t        val = val.replace(/[\\-\\[\\]\\/\\{\\}\\(\\)\\*\\+\\?\\.\\\\\\^\\$\\|]/g, \"\\\\$&\");\n\t        var reg;\n\t        if (self.caseSensitiveOption.checked) {\n\t          reg = RegExp(val, \"g\");\n\t        } else {\n\t          reg = RegExp(val, \"gi\");\n\t        }\n\t        if (self.wholeWordOption.checked) {\n\t          if (self.caseSensitiveOption.checked) {\n\t            reg = RegExp(\"\\\\b\" + val + \"\\\\b\", \"g\");\n\t          } else {\n\t            reg = RegExp(\"\\\\b\" + val + \"\\\\b\", \"gi\");\n\t          }\n\t        }\n\t        if (self.regExpOption.checked) {\n\t          reg = RegExp(val, \"gi\");\n\t        }\n\t        matches = cm.getValue().match(reg);\n\t      }\n\t      var count = matches ? matches.length : 0;\n\t      var cmEle = cm.display.wrapper;\n\t      var countEle = cmEle.parentElement.querySelector(\".ace_search_counter\");\n\t      if (countEle) {\n\t        countEle.innerText = count + \" matches found.\";\n\t      }\n\t      if (count === 0){\n\t        cm.setSelection({ch: 0, line: 0},{ch: 0, line: 0});\n\t      }\n\t    }\n\n\t    function addStyle() {\n\t      var style = document.createElement(\"style\"),\n\t        css = [\n\t          \".ace_search {\",\n\t          \"color: black;\",\n\t          \"background-color: #ddd;\",\n\t          \"border: 1px solid #cbcbcb;\",\n\t          \"border-top: 0 none;\",\n\t          \"max-width: 325px;\",\n\t          \"overflow: hidden;\",\n\t          \"margin: 0;\",\n\t          \"padding: 4px;\",\n\t          \"padding-right: 6px;\",\n\t          \"padding-bottom: 0;\",\n\t          \"position: absolute;\",\n\t          \"top: 0px;\",\n\t          \"z-index: 99;\",\n\t          \"white-space: normal;\",\n\t          \"font-size: 12px;\",\n\t          \"}\",\n\t          \".ace_search.left {\",\n\t          \"border-left: 0 none;\",\n\t          \"border-radius: 0px 0px 5px 0px;\",\n\t          \"left: 0;\",\n\t          \"}\",\n\t          \".ace_search.right {\",\n\t          \"border-radius: 0px 0px 0px 5px;\",\n\t          \"border-right: 0 none;\",\n\t          \"right: 0;\",\n\t          \"}\",\n\t          \".ace_search_form, .ace_replace_form {\",\n\t          \"border-radius: 3px;\",\n\t          \"border: 1px solid #cbcbcb;\",\n\t          \"float: left;\",\n\t          \"margin-bottom: 4px;\",\n\t          \"overflow: hidden;\",\n\t          \"}\",\n\t          \".ace_search_form.ace_nomatch {\",\n\t          \"outline: 1px solid red;\",\n\t          \"}\",\n\t          \".ace_search_field {\",\n\t          \"background-color: white;\",\n\t          \"border-right: 1px solid #cbcbcb;\",\n\t          \"border: 0 none;\",\n\t          \"-webkit-box-sizing: border-box;\",\n\t          \"-moz-box-sizing: border-box;\",\n\t          \"box-sizing: border-box;\",\n\t          \"float: left;\",\n\t          \"height: 22px;\",\n\t          \"outline: 0;\",\n\t          \"padding: 0 7px;\",\n\t          \"width: 238px;\",\n\t          \"margin: 0;\",\n\t          \"}\",\n\t          \".ace_searchbtn,\",\n\t          \".ace_replacebtn {\",\n\t          \"background: #fff;\",\n\t          \"border: 0 none;\",\n\t          \"border-left: 1px solid #dcdcdc;\",\n\t          \"cursor: pointer;\",\n\t          \"float: left;\",\n\t          \"height: 22px;\",\n\t          \"padding: 0 5px;\",\n\t          \"margin: 0;\",\n\t          \"position: relative;\",\n\t          \"}\",\n\t          \".ace_searchbtn:last-child,\",\n\t          \".ace_replacebtn:last-child {\",\n\t          \"border-top-right-radius: 3px;\",\n\t          \"border-bottom-right-radius: 3px;\",\n\t          \"}\",\n\t          \".ace_searchbtn:disabled {\",\n\t          \"background: none;\",\n\t          \"cursor: default;\",\n\t          \"}\",\n\t          \".ace_searchbtn {\",\n\t          \"background-position: 50% 50%;\",\n\t          \"background-repeat: no-repeat;\",\n\t          \"width: 27px;\",\n\t          \"}\",\n\t          \".ace_searchbtn.prev {\",\n\t          \"background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAFCAYAAAB4ka1VAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAADFJREFUeNpiSU1NZUAC/6E0I0yACYskCpsJiySKIiY0SUZk40FyTEgCjGgKwTRAgAEAQJUIPCE+qfkAAAAASUVORK5CYII=);    \",\n\t          \"}\",\n\t          \".ace_searchbtn.next {\",\n\t          \"background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAFCAYAAAB4ka1VAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAADRJREFUeNpiTE1NZQCC/0DMyIAKwGJMUAYDEo3M/s+EpvM/mkKwCQxYjIeLMaELoLMBAgwAU7UJObTKsvAAAAAASUVORK5CYII=);    \",\n\t          \"}\",\n\t          \".ace_searchbtn_close {\",\n\t          \"background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAcCAYAAABRVo5BAAAAZ0lEQVR42u2SUQrAMAhDvazn8OjZBilCkYVVxiis8H4CT0VrAJb4WHT3C5xU2a2IQZXJjiQIRMdkEoJ5Q2yMqpfDIo+XY4k6h+YXOyKqTIj5REaxloNAd0xiKmAtsTHqW8sR2W5f7gCu5nWFUpVjZwAAAABJRU5ErkJggg==) no-repeat 50% 0;\",\n\t          \"border-radius: 50%;\",\n\t          \"border: 0 none;\",\n\t          \"color: #656565;\",\n\t          \"cursor: pointer;\",\n\t          \"float: right;\",\n\t          \"font: 16px/16px Arial;\",\n\t          \"height: 14px;\",\n\t          \"margin: 5px 1px 9px 5px;\",\n\t          \"padding: 0;\",\n\t          \"text-align: center;\",\n\t          \"width: 14px;\",\n\t          \"}\",\n\t          \".ace_searchbtn_close:hover {\",\n\t          \"background-color: #656565;\",\n\t          \"background-position: 50% 100%;\",\n\t          \"color: white;\",\n\t          \"}\",\n\t          \".ace_replacebtn.prev {\",\n\t          \"width: 54px\",\n\t          \"}\",\n\t          \".ace_replacebtn.next {\",\n\t          \"width: 27px\",\n\t          \"}\",\n\t          \".ace_button {\",\n\t          \"margin-left: 2px;\",\n\t          \"cursor: pointer;\",\n\t          \"-webkit-user-select: none;\",\n\t          \"-moz-user-select: none;\",\n\t          \"-o-user-select: none;\",\n\t          \"-ms-user-select: none;\",\n\t          \"user-select: none;\",\n\t          \"overflow: hidden;\",\n\t          \"opacity: 0.7;\",\n\t          \"border: 1px solid rgba(100,100,100,0.23);\",\n\t          \"padding: 1px;\",\n\t          \"-moz-box-sizing: border-box;\",\n\t          \"box-sizing:    border-box;\",\n\t          \"color: black;\",\n\t          \"}\",\n\t          \".ace_button:hover {\",\n\t          \"background-color: #eee;\",\n\t          \"opacity:1;\",\n\t          \"}\",\n\t          \".ace_button:active {\",\n\t          \"background-color: #ddd;\",\n\t          \"}\",\n\t          \".ace_button.checked {\",\n\t          \"border-color: #3399ff;\",\n\t          \"opacity:1;\",\n\t          \"}\",\n\t          \".ace_search_options{\",\n\t          \"clear: both;\",\n\t          \"margin: 4px 0;\",\n\t          \"text-align: right;\",\n\t          \"-webkit-user-select: none;\",\n\t          \"-moz-user-select: none;\",\n\t          \"-o-user-select: none;\",\n\t          \"-ms-user-select: none;\",\n\t          \"user-select: none;\",\n\t          \"}\",\n\t          \".replace_toggle{\",\n\t          \"float: left;\",\n\t          \"margin-top: -2px;\",\n\t          \"padding: 0 5px;\",\n\t          \" }\",\n\t          \".ace_search_counter{\",\n\t          \"float: left;\",\n\t          \"font-family: arial;\",\n\t          \"padding: 0 8px;\",\n\t          \"}\",\n\t          \"button svg,path {\",\n\t          \"pointer-events: none;\",\n\t          \"}\",\n\t        ].join(\"\");\n\n\t      style.setAttribute(\"data-name\", \"js-searchbox\");\n\n\t      style.textContent = css;\n\n\t      document.head.appendChild(style);\n\t    }\n\n\t    function addHtml() {\n\t      var elSearch,\n\t        el = cm.getWrapperElement(),\n\t        div = document.createElement(\"div\"),\n\t        html = [\n\t          '<div class=\"ace_search right\">',\n\t          '<button type=\"button\" action=\"hide\" class=\"ace_searchbtn_close\"></button>',\n\t          '<div class=\"ace_search_form\">',\n\t          '<input class=\"ace_search_field\" placeholder=\"Search for\" spellcheck=\"false\"></input>',\n\t          '<button type=\"button\" action=\"findNext\" class=\"ace_searchbtn next\"></button>',\n\t          '<button type=\"button\" action=\"findPrev\" class=\"ace_searchbtn prev\"></button>',\n\t          \"</div>\",\n\t          '<div class=\"ace_replace_form\">',\n\t          '<input class=\"ace_search_field\" placeholder=\"Replace with\" spellcheck=\"false\"></input>',\n\t          '<button type=\"button\" action=\"replaceAndFindNext\" title=\"Replace\" class=\"ace_replacebtn\">',\n\t          '<svg width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">',\n\t          '<path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M3.221 3.739L5.482 6.008L7.7 3.784L7 3.084L5.988 4.091L5.98 2.491C5.97909 2.35567 6.03068 2.22525 6.12392 2.12716C6.21716 2.02908 6.3448 1.97095 6.48 1.965H8V1H6.48C6.28496 1.00026 6.09189 1.03902 5.91186 1.11405C5.73183 1.18908 5.56838 1.29892 5.43088 1.43725C5.29338 1.57558 5.18455 1.73969 5.11061 1.92018C5.03667 2.10066 4.99908 2.29396 5 2.489V4.1L3.927 3.033L3.221 3.739ZM9.89014 5.53277H9.90141C10.0836 5.84426 10.3521 6 10.707 6C11.0995 6 11.4131 5.83236 11.6479 5.49708C11.8826 5.1618 12 4.71728 12 4.16353C12 3.65304 11.8995 3.2507 11.6986 2.95652C11.4977 2.66234 11.2113 2.51525 10.8394 2.51525C10.4338 2.51525 10.1211 2.70885 9.90141 3.09604H9.89014V1H9V5.91888H9.89014V5.53277ZM9.87606 4.47177V4.13108C9.87606 3.88449 9.93427 3.6844 10.0507 3.53082C10.169 3.37724 10.3174 3.30045 10.4958 3.30045C10.6854 3.30045 10.831 3.37833 10.9324 3.53407C11.0357 3.68765 11.0873 3.9018 11.0873 4.17651C11.0873 4.50746 11.031 4.76379 10.9183 4.94549C10.8075 5.12503 10.6507 5.2148 10.4479 5.2148C10.2808 5.2148 10.1437 5.14449 10.0366 5.00389C9.92958 4.86329 9.87606 4.68592 9.87606 4.47177ZM9 12.7691C8.74433 12.923 8.37515 13 7.89247 13C7.32855 13 6.87216 12.8225 6.5233 12.4674C6.17443 12.1124 6 11.6543 6 11.0931C6 10.4451 6.18638 9.93484 6.55914 9.5624C6.93429 9.18747 7.43489 9.00001 8.06093 9.00001C8.49343 9.00001 8.80645 9.0596 9 9.17878V10.1769C8.76344 9.99319 8.4994 9.90132 8.20789 9.90132C7.88292 9.90132 7.62485 10.0006 7.43369 10.1993C7.24492 10.3954 7.15054 10.6673 7.15054 11.0149C7.15054 11.3526 7.24134 11.6183 7.42294 11.8119C7.60454 12.0031 7.85424 12.0987 8.17204 12.0987C8.454 12.0987 8.72999 12.0068 9 11.8231V12.7691ZM4 7L3 8V14L4 15H11L12 14V8L11 7H4ZM4 8H5H10H11V9V13V14H10H5H4V13V9V8Z\" fill=\"#656565\"/>',\n\t          \"</svg></button>\",\n\t          '<button type=\"button\" action=\"replaceAll\" title=\"Replace All\" class=\"ace_replacebtn\">',\n\t          '<svg width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">',\n\t          '<path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M11.6009 2.67683C11.7474 2.36708 11.9559 2.2122 12.2263 2.2122C12.4742 2.2122 12.6651 2.32987 12.7991 2.56522C12.933 2.80056 13 3.12243 13 3.53082C13 3.97383 12.9218 4.32944 12.7653 4.59766C12.6088 4.86589 12.3997 5 12.138 5C11.9014 5 11.7224 4.87541 11.6009 4.62622H11.5934V4.93511H11V1H11.5934V2.67683H11.6009ZM11.584 3.77742C11.584 3.94873 11.6197 4.09063 11.6911 4.20311C11.7624 4.3156 11.8538 4.37184 11.9653 4.37184C12.1005 4.37184 12.205 4.30002 12.2789 4.15639C12.354 4.01103 12.3915 3.80597 12.3915 3.54121C12.3915 3.32144 12.3571 3.15012 12.2883 3.02726C12.2207 2.90266 12.1236 2.84036 11.9972 2.84036C11.8782 2.84036 11.7793 2.9018 11.7005 3.02466C11.6228 3.14752 11.584 3.30759 11.584 3.50487V3.77742ZM4.11969 7.695L2 5.56781L2.66188 4.90594L3.66781 5.90625V4.39594C3.66695 4.21309 3.70219 4.03187 3.7715 3.86266C3.84082 3.69346 3.94286 3.53961 4.07176 3.40992C4.20066 3.28023 4.3539 3.17727 4.52268 3.10692C4.69146 3.03658 4.87246 3.00024 5.05531 3H7.39906V3.90469H5.05531C4.92856 3.91026 4.8089 3.96476 4.72149 4.05672C4.63408 4.14868 4.58571 4.27094 4.58656 4.39781L4.59406 5.89781L5.54281 4.95375L6.19906 5.61L4.11969 7.695ZM9.3556 4.93017H10V3.22067C10 2.40689 9.68534 2 9.05603 2C8.92098 2 8.77083 2.02421 8.6056 2.07263C8.44181 2.12104 8.3125 2.17691 8.21767 2.24022V2.90503C8.45474 2.70205 8.70474 2.60056 8.96767 2.60056C9.22917 2.60056 9.35991 2.75698 9.35991 3.06983L8.76078 3.17318C8.25359 3.25885 8 3.57914 8 4.13408C8 4.39665 8.06106 4.60708 8.18319 4.76536C8.30675 4.92179 8.47557 5 8.68966 5C8.97989 5 9.19899 4.83985 9.34698 4.51955H9.3556V4.93017ZM9.35991 3.57542V3.76816C9.35991 3.9432 9.31968 4.08845 9.23922 4.20391C9.15876 4.3175 9.0546 4.3743 8.92672 4.3743C8.83477 4.3743 8.76149 4.34264 8.7069 4.27933C8.65374 4.21415 8.62716 4.13128 8.62716 4.03073C8.62716 3.80912 8.73779 3.6797 8.95905 3.64246L9.35991 3.57542ZM7 12.9302H6.3556V12.5196H6.34698C6.19899 12.8399 5.97989 13 5.68966 13C5.47557 13 5.30675 12.9218 5.18319 12.7654C5.06106 12.6071 5 12.3966 5 12.1341C5 11.5791 5.25359 11.2588 5.76078 11.1732L6.35991 11.0698C6.35991 10.757 6.22917 10.6006 5.96767 10.6006C5.70474 10.6006 5.45474 10.702 5.21767 10.905V10.2402C5.3125 10.1769 5.44181 10.121 5.6056 10.0726C5.77083 10.0242 5.92098 10 6.05603 10C6.68534 10 7 10.4069 7 11.2207V12.9302ZM6.35991 11.7682V11.5754L5.95905 11.6425C5.73779 11.6797 5.62716 11.8091 5.62716 12.0307C5.62716 12.1313 5.65374 12.2142 5.7069 12.2793C5.76149 12.3426 5.83477 12.3743 5.92672 12.3743C6.0546 12.3743 6.15876 12.3175 6.23922 12.2039C6.31968 12.0885 6.35991 11.9432 6.35991 11.7682ZM9.26165 13C9.58343 13 9.82955 12.9423 10 12.8268V12.1173C9.81999 12.2551 9.636 12.324 9.44803 12.324C9.23616 12.324 9.06969 12.2523 8.94863 12.1089C8.82756 11.9637 8.76702 11.7644 8.76702 11.5112C8.76702 11.2505 8.82995 11.0466 8.95579 10.8994C9.08323 10.7505 9.25528 10.676 9.47192 10.676C9.66627 10.676 9.84229 10.7449 10 10.8827V10.1341C9.87097 10.0447 9.66229 10 9.37395 10C8.95659 10 8.62286 10.1406 8.37276 10.4218C8.12425 10.7011 8 11.0838 8 11.5698C8 11.9907 8.11629 12.3343 8.34887 12.6006C8.58144 12.8669 8.8857 13 9.26165 13ZM2 9L3 8H12L13 9V14L12 15H3L2 14V9ZM3 9V14H12V9H3ZM6 7L7 6H14L15 7V12L14 13V12V7H7H6Z\" fill=\"#656565\"/>',\n\t          \"</svg></button>\",\n\t          \"</div>\",\n\t          '<div class=\"ace_search_options\">',\n\t          '<span action=\"toggleReplace\" class=\"ace_button replace_toggle\">+</span>',\n\t          '<span class=\"ace_search_counter\">0 matches found.</span>',\n\t          '<span action=\"toggleRegexpMode\" title=\"RegExp Search\"></span>',\n\t          '<span action=\"toggleCaseSensitive\" class=\"ace_button\" title=\"CaseSensitive Search\">Aa</span>',\n\t          '<span action=\"toggleWholeWords\" title=\"Whole Word Search\"></span>',\n\t          \"</div>\",\n\t          \"</div>\",\n\t        ].join(\"\");\n\n\t      div.innerHTML = html;\n\n\t      elSearch = div.firstChild;\n\n\t      el.appendChild(elSearch);\n\n\t      return elSearch;\n\t    }\n\t  }\n\n\t  function setCssClass(el, className, condition) {\n\t    var list = el.classList;\n\n\t    list[condition ? \"add\" : \"remove\"](className);\n\t  }\n\n\t  function delayedCall(fcn, defaultTimeout) {\n\t    var timer,\n\t      callback = function () {\n\t        timer = null;\n\t        fcn();\n\t      },\n\t      _self = function (timeout) {\n\t        if (!timer) timer = setTimeout(callback, timeout || defaultTimeout);\n\t      };\n\n\t    _self.delay = function (timeout) {\n\t      timer && clearTimeout(timer);\n\t      timer = setTimeout(callback, timeout || defaultTimeout);\n\t    };\n\t    _self.schedule = _self;\n\n\t    _self.call = function () {\n\t      this.cancel();\n\t      fcn();\n\t    };\n\n\t    _self.cancel = function () {\n\t      timer && clearTimeout(timer);\n\t      timer = null;\n\t    };\n\n\t    _self.isPending = function () {\n\t      return timer;\n\t    };\n\n\t    return _self;\n\t  }\n\n\t  /* https://github.com/coderaiser/key */\n\t  function key(str, event) {\n\t    var right,\n\t      KEY = {\n\t        BACKSPACE: 8,\n\t        TAB: 9,\n\t        ENTER: 13,\n\t        ESC: 27,\n\n\t        SPACE: 32,\n\t        PAGE_UP: 33,\n\t        PAGE_DOWN: 34,\n\t        END: 35,\n\t        HOME: 36,\n\t        UP: 38,\n\t        DOWN: 40,\n\n\t        INSERT: 45,\n\t        DELETE: 46,\n\n\t        INSERT_MAC: 96,\n\n\t        ASTERISK: 106,\n\t        PLUS: 107,\n\t        MINUS: 109,\n\n\t        F1: 112,\n\t        F2: 113,\n\t        F3: 114,\n\t        F4: 115,\n\t        F5: 116,\n\t        F6: 117,\n\t        F7: 118,\n\t        F8: 119,\n\t        F9: 120,\n\t        F10: 121,\n\n\t        SLASH: 191,\n\t        TRA: 192 /* Typewritten Reverse Apostrophe (`) */,\n\t        BACKSLASH: 220,\n\t      };\n\n\t    keyCheck(str, event);\n\n\t    right = str.split(\"|\").some(function (combination) {\n\t      var wrong;\n\n\t      wrong = combination.split(\"-\").some(function (key) {\n\t        var right;\n\n\t        switch (key) {\n\t          case \"Ctrl\":\n\t            right = event.ctrlKey;\n\t            break;\n\n\t          case \"Shift\":\n\t            right = event.shiftKey;\n\t            break;\n\n\t          case \"Alt\":\n\t            right = event.altKey;\n\t            break;\n\n\t          case \"Cmd\":\n\t            right = event.metaKey;\n\t            break;\n\n\t          default:\n\t            if (key.length === 1) right = event.keyCode === key.charCodeAt(0);\n\t            else\n\t              Object.keys(KEY).some(function (name) {\n\t                var up = key.toUpperCase();\n\n\t                if (up === name) right = event.keyCode === KEY[name];\n\t              });\n\t            break;\n\t        }\n\n\t        return !right;\n\t      });\n\n\t      return !wrong;\n\t    });\n\n\t    return right;\n\t  }\n\n\t  function keyCheck(str, event) {\n\t    if (typeof str !== \"string\") throw Error(\"str should be string!\");\n\n\t    if (typeof event !== \"object\") throw Error(\"event should be object!\");\n\t  }\n\t});\n\t});\n\n\tvar annotatescrollbar = createCommonjsModule(function (module, exports) {\n\t// CodeMirror, copyright (c) by Marijn Haverbeke and others\n\t// Distributed under an MIT license: https://codemirror.net/LICENSE\n\n\t(function(mod) {\n\t  mod(codemirror);\n\t})(function(CodeMirror) {\n\n\t  CodeMirror.defineExtension(\"annotateScrollbar\", function(options) {\n\t    if (typeof options == \"string\") options = {className: options};\n\t    return new Annotation(this, options);\n\t  });\n\n\t  CodeMirror.defineOption(\"scrollButtonHeight\", 0);\n\n\t  function Annotation(cm, options) {\n\t    this.cm = cm;\n\t    this.options = options;\n\t    this.buttonHeight = options.scrollButtonHeight || cm.getOption(\"scrollButtonHeight\");\n\t    this.annotations = [];\n\t    this.doRedraw = this.doUpdate = null;\n\t    this.div = cm.getWrapperElement().appendChild(document.createElement(\"div\"));\n\t    this.div.style.cssText = \"position: absolute; right: 0; top: 0; z-index: 7; pointer-events: none\";\n\t    this.computeScale();\n\n\t    function scheduleRedraw(delay) {\n\t      clearTimeout(self.doRedraw);\n\t      self.doRedraw = setTimeout(function() { self.redraw(); }, delay);\n\t    }\n\n\t    var self = this;\n\t    cm.on(\"refresh\", this.resizeHandler = function() {\n\t      clearTimeout(self.doUpdate);\n\t      self.doUpdate = setTimeout(function() {\n\t        if (self.computeScale()) scheduleRedraw(20);\n\t      }, 100);\n\t    });\n\t    cm.on(\"markerAdded\", this.resizeHandler);\n\t    cm.on(\"markerCleared\", this.resizeHandler);\n\t    if (options.listenForChanges !== false)\n\t      cm.on(\"changes\", this.changeHandler = function() {\n\t        scheduleRedraw(250);\n\t      });\n\t  }\n\n\t  Annotation.prototype.computeScale = function() {\n\t    var cm = this.cm;\n\t    var hScale = (cm.getWrapperElement().clientHeight - cm.display.barHeight - this.buttonHeight * 2) /\n\t      cm.getScrollerElement().scrollHeight;\n\t    if (hScale != this.hScale) {\n\t      this.hScale = hScale;\n\t      return true;\n\t    }\n\t  };\n\n\t  Annotation.prototype.update = function(annotations) {\n\t    this.annotations = annotations;\n\t    this.redraw();\n\t  };\n\n\t  Annotation.prototype.redraw = function(compute) {\n\t    if (compute !== false) this.computeScale();\n\t    var cm = this.cm, hScale = this.hScale;\n\n\t    var frag = document.createDocumentFragment(), anns = this.annotations;\n\n\t    var wrapping = cm.getOption(\"lineWrapping\");\n\t    var singleLineH = wrapping && cm.defaultTextHeight() * 1.5;\n\t    var curLine = null, curLineObj = null;\n\n\t    function getY(pos, top) {\n\t      if (curLine != pos.line) {\n\t        curLine = pos.line;\n\t        curLineObj = cm.getLineHandle(pos.line);\n\t        var visual = cm.getLineHandleVisualStart(curLineObj);\n\t        if (visual != curLineObj) {\n\t          curLine = cm.getLineNumber(visual);\n\t          curLineObj = visual;\n\t        }\n\t      }\n\t      if ((curLineObj.widgets && curLineObj.widgets.length) ||\n\t          (wrapping && curLineObj.height > singleLineH))\n\t        return cm.charCoords(pos, \"local\")[top ? \"top\" : \"bottom\"];\n\t      var topY = cm.heightAtLine(curLineObj, \"local\");\n\t      return topY + (top ? 0 : curLineObj.height);\n\t    }\n\n\t    var lastLine = cm.lastLine();\n\t    if (cm.display.barWidth) for (var i = 0, nextTop; i < anns.length; i++) {\n\t      var ann = anns[i];\n\t      if (ann.to.line > lastLine) continue;\n\t      var top = nextTop || getY(ann.from, true) * hScale;\n\t      var bottom = getY(ann.to, false) * hScale;\n\t      while (i < anns.length - 1) {\n\t        if (anns[i + 1].to.line > lastLine) break;\n\t        nextTop = getY(anns[i + 1].from, true) * hScale;\n\t        if (nextTop > bottom + .9) break;\n\t        ann = anns[++i];\n\t        bottom = getY(ann.to, false) * hScale;\n\t      }\n\t      if (bottom == top) continue;\n\t      var height = Math.max(bottom - top, 3);\n\n\t      var elt = frag.appendChild(document.createElement(\"div\"));\n\t      elt.style.cssText = \"position: absolute; right: 0px; width: \" + Math.max(cm.display.barWidth - 1, 2) + \"px; top: \"\n\t        + (top + this.buttonHeight) + \"px; height: \" + height + \"px\";\n\t      elt.className = this.options.className;\n\t      if (ann.id) {\n\t        elt.setAttribute(\"annotation-id\", ann.id);\n\t      }\n\t    }\n\t    this.div.textContent = \"\";\n\t    this.div.appendChild(frag);\n\t  };\n\n\t  Annotation.prototype.clear = function() {\n\t    this.cm.off(\"refresh\", this.resizeHandler);\n\t    this.cm.off(\"markerAdded\", this.resizeHandler);\n\t    this.cm.off(\"markerCleared\", this.resizeHandler);\n\t    if (this.changeHandler) this.cm.off(\"changes\", this.changeHandler);\n\t    this.div.parentNode.removeChild(this.div);\n\t  };\n\t});\n\t});\n\n\tvar matchesonscrollbar = createCommonjsModule(function (module, exports) {\n\t// CodeMirror, copyright (c) by Marijn Haverbeke and others\n\t// Distributed under an MIT license: https://codemirror.net/LICENSE\n\n\t(function(mod) {\n\t  mod(codemirror, searchcursor, annotatescrollbar);\n\t})(function(CodeMirror) {\n\n\t  CodeMirror.defineExtension(\"showMatchesOnScrollbar\", function(query, caseFold, options) {\n\t    if (typeof options == \"string\") options = {className: options};\n\t    if (!options) options = {};\n\t    return new SearchAnnotation(this, query, caseFold, options);\n\t  });\n\n\t  function SearchAnnotation(cm, query, caseFold, options) {\n\t    this.cm = cm;\n\t    this.options = options;\n\t    var annotateOptions = {listenForChanges: false};\n\t    for (var prop in options) annotateOptions[prop] = options[prop];\n\t    if (!annotateOptions.className) annotateOptions.className = \"CodeMirror-search-match\";\n\t    this.annotation = cm.annotateScrollbar(annotateOptions);\n\t    this.query = query;\n\t    this.caseFold = caseFold;\n\t    this.gap = {from: cm.firstLine(), to: cm.lastLine() + 1};\n\t    this.matches = [];\n\t    this.update = null;\n\n\t    this.findMatches();\n\t    this.annotation.update(this.matches);\n\n\t    var self = this;\n\t    cm.on(\"change\", this.changeHandler = function(_cm, change) { self.onChange(change); });\n\t  }\n\n\t  var MAX_MATCHES = 1000;\n\n\t  SearchAnnotation.prototype.findMatches = function() {\n\t    if (!this.gap) return;\n\t    for (var i = 0; i < this.matches.length; i++) {\n\t      var match = this.matches[i];\n\t      if (match.from.line >= this.gap.to) break;\n\t      if (match.to.line >= this.gap.from) this.matches.splice(i--, 1);\n\t    }\n\t    var cursor = this.cm.getSearchCursor(this.query, CodeMirror.Pos(this.gap.from, 0), {caseFold: this.caseFold, multiline: this.options.multiline});\n\t    var maxMatches = this.options && this.options.maxMatches || MAX_MATCHES;\n\t    while (cursor.findNext()) {\n\t      var match = {from: cursor.from(), to: cursor.to()};\n\t      if (match.from.line >= this.gap.to) break;\n\t      this.matches.splice(i++, 0, match);\n\t      if (this.matches.length > maxMatches) break;\n\t    }\n\t    this.gap = null;\n\t  };\n\n\t  function offsetLine(line, changeStart, sizeChange) {\n\t    if (line <= changeStart) return line;\n\t    return Math.max(changeStart, line + sizeChange);\n\t  }\n\n\t  SearchAnnotation.prototype.onChange = function(change) {\n\t    var startLine = change.from.line;\n\t    var endLine = CodeMirror.changeEnd(change).line;\n\t    var sizeChange = endLine - change.to.line;\n\t    if (this.gap) {\n\t      this.gap.from = Math.min(offsetLine(this.gap.from, startLine, sizeChange), change.from.line);\n\t      this.gap.to = Math.max(offsetLine(this.gap.to, startLine, sizeChange), change.from.line);\n\t    } else {\n\t      this.gap = {from: change.from.line, to: endLine + 1};\n\t    }\n\n\t    if (sizeChange) for (var i = 0; i < this.matches.length; i++) {\n\t      var match = this.matches[i];\n\t      var newFrom = offsetLine(match.from.line, startLine, sizeChange);\n\t      if (newFrom != match.from.line) match.from = CodeMirror.Pos(newFrom, match.from.ch);\n\t      var newTo = offsetLine(match.to.line, startLine, sizeChange);\n\t      if (newTo != match.to.line) match.to = CodeMirror.Pos(newTo, match.to.ch);\n\t    }\n\t    clearTimeout(this.update);\n\t    var self = this;\n\t    this.update = setTimeout(function() { self.updateAfterChange(); }, 250);\n\t  };\n\n\t  SearchAnnotation.prototype.updateAfterChange = function() {\n\t    this.findMatches();\n\t    this.annotation.update(this.matches);\n\t  };\n\n\t  SearchAnnotation.prototype.clear = function() {\n\t    this.cm.off(\"change\", this.changeHandler);\n\t    this.annotation.clear();\n\t  };\n\t});\n\t});\n\n\t// `Array.isArray` method\n\t// https://tc39.es/ecma262/#sec-array.isarray\n\t_export({ target: 'Array', stat: true }, {\n\t  isArray: isArray\n\t});\n\n\tvar isArray$2 = path.Array.isArray;\n\n\tvar isArray$3 = isArray$2;\n\n\tvar isArray$4 = isArray$3;\n\n\tvar isArray$5 = isArray$4;\n\n\tvar isArray$6 = isArray$5;\n\n\tvar isArray$7 = isArray$6;\n\n\tvar arrayWithHoles = createCommonjsModule(function (module) {\n\tfunction _arrayWithHoles(arr) {\n\t  if (isArray$7(arr)) return arr;\n\t}\n\n\tmodule.exports = _arrayWithHoles, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n\t});\n\n\tunwrapExports(arrayWithHoles);\n\n\tvar getIteratorMethod_1 = getIteratorMethod;\n\n\tvar getIteratorMethod$1 = getIteratorMethod_1;\n\n\tvar getIteratorMethod$2 = getIteratorMethod$1;\n\n\tvar getIteratorMethod$3 = getIteratorMethod$2;\n\n\tvar getIteratorMethod$4 = getIteratorMethod$3;\n\n\tvar getIteratorMethod$5 = getIteratorMethod$4;\n\n\tvar iterableToArrayLimit = createCommonjsModule(function (module) {\n\tfunction _iterableToArrayLimit(arr, i) {\n\t  var _i = arr == null ? null : typeof symbol$5 !== \"undefined\" && getIteratorMethod$5(arr) || arr[\"@@iterator\"];\n\n\t  if (_i == null) return;\n\t  var _arr = [];\n\t  var _n = true;\n\t  var _d = false;\n\n\t  var _s, _e;\n\n\t  try {\n\t    for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {\n\t      _arr.push(_s.value);\n\n\t      if (i && _arr.length === i) break;\n\t    }\n\t  } catch (err) {\n\t    _d = true;\n\t    _e = err;\n\t  } finally {\n\t    try {\n\t      if (!_n && _i[\"return\"] != null) _i[\"return\"]();\n\t    } finally {\n\t      if (_d) throw _e;\n\t    }\n\t  }\n\n\t  return _arr;\n\t}\n\n\tmodule.exports = _iterableToArrayLimit, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n\t});\n\n\tunwrapExports(iterableToArrayLimit);\n\n\tvar HAS_SPECIES_SUPPORT$1 = arrayMethodHasSpeciesSupport('slice');\n\n\tvar SPECIES$2 = wellKnownSymbol('species');\n\tvar Array$4 = global_1.Array;\n\tvar max$2 = Math.max;\n\n\t// `Array.prototype.slice` method\n\t// https://tc39.es/ecma262/#sec-array.prototype.slice\n\t// fallback for not array-like ES3 strings and DOM objects\n\t_export({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT$1 }, {\n\t  slice: function slice(start, end) {\n\t    var O = toIndexedObject(this);\n\t    var length = lengthOfArrayLike(O);\n\t    var k = toAbsoluteIndex(start, length);\n\t    var fin = toAbsoluteIndex(end === undefined ? length : end, length);\n\t    // inline `ArraySpeciesCreate` for usage native `Array#slice` where it's possible\n\t    var Constructor, result, n;\n\t    if (isArray(O)) {\n\t      Constructor = O.constructor;\n\t      // cross-realm fallback\n\t      if (isConstructor(Constructor) && (Constructor === Array$4 || isArray(Constructor.prototype))) {\n\t        Constructor = undefined;\n\t      } else if (isObject(Constructor)) {\n\t        Constructor = Constructor[SPECIES$2];\n\t        if (Constructor === null) Constructor = undefined;\n\t      }\n\t      if (Constructor === Array$4 || Constructor === undefined) {\n\t        return arraySlice(O, k, fin);\n\t      }\n\t    }\n\t    result = new (Constructor === undefined ? Array$4 : Constructor)(max$2(fin - k, 0));\n\t    for (n = 0; k < fin; k++, n++) if (k in O) createProperty(result, n, O[k]);\n\t    result.length = n;\n\t    return result;\n\t  }\n\t});\n\n\tvar slice = entryVirtual('Array').slice;\n\n\tvar ArrayPrototype$6 = Array.prototype;\n\n\tvar slice$1 = function (it) {\n\t  var own = it.slice;\n\t  return it === ArrayPrototype$6 || (objectIsPrototypeOf(ArrayPrototype$6, it) && own === ArrayPrototype$6.slice) ? slice : own;\n\t};\n\n\tvar slice$2 = slice$1;\n\n\tvar slice$3 = slice$2;\n\n\tvar slice$4 = slice$3;\n\n\tvar slice$5 = slice$4;\n\n\tvar slice$6 = slice$5;\n\n\tvar from_1$3 = from_1$1;\n\n\tvar from_1$4 = from_1$3;\n\n\tvar from_1$5 = from_1$4;\n\n\tvar from_1$6 = from_1$5;\n\n\tvar arrayLikeToArray = createCommonjsModule(function (module) {\n\tfunction _arrayLikeToArray(arr, len) {\n\t  if (len == null || len > arr.length) len = arr.length;\n\n\t  for (var i = 0, arr2 = new Array(len); i < len; i++) {\n\t    arr2[i] = arr[i];\n\t  }\n\n\t  return arr2;\n\t}\n\n\tmodule.exports = _arrayLikeToArray, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n\t});\n\n\tunwrapExports(arrayLikeToArray);\n\n\tvar unsupportedIterableToArray = createCommonjsModule(function (module) {\n\tfunction _unsupportedIterableToArray(o, minLen) {\n\t  var _context;\n\n\t  if (!o) return;\n\t  if (typeof o === \"string\") return arrayLikeToArray(o, minLen);\n\n\t  var n = slice$6(_context = Object.prototype.toString.call(o)).call(_context, 8, -1);\n\n\t  if (n === \"Object\" && o.constructor) n = o.constructor.name;\n\t  if (n === \"Map\" || n === \"Set\") return from_1$6(o);\n\t  if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen);\n\t}\n\n\tmodule.exports = _unsupportedIterableToArray, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n\t});\n\n\tunwrapExports(unsupportedIterableToArray);\n\n\tvar nonIterableRest = createCommonjsModule(function (module) {\n\tfunction _nonIterableRest() {\n\t  throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n\t}\n\n\tmodule.exports = _nonIterableRest, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n\t});\n\n\tunwrapExports(nonIterableRest);\n\n\tvar slicedToArray = createCommonjsModule(function (module) {\n\tfunction _slicedToArray(arr, i) {\n\t  return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || unsupportedIterableToArray(arr, i) || nonIterableRest();\n\t}\n\n\tmodule.exports = _slicedToArray, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n\t});\n\n\tvar _slicedToArray = unwrapExports(slicedToArray);\n\n\tvar indexOf$8 = indexOf$3;\n\n\tvar create$6 = create$1;\n\n\tvar slice$7 = slice$2;\n\n\tvar trim$4 = stringTrim.trim;\n\n\n\tvar $parseInt = global_1.parseInt;\n\tvar Symbol$3 = global_1.Symbol;\n\tvar ITERATOR$5 = Symbol$3 && Symbol$3.iterator;\n\tvar hex = /^[+-]?0x/i;\n\tvar exec$2 = functionUncurryThis(hex.exec);\n\tvar FORCED$4 = $parseInt(whitespaces + '08') !== 8 || $parseInt(whitespaces + '0x16') !== 22\n\t  // MS Edge 18- broken with boxed symbols\n\t  || (ITERATOR$5 && !fails(function () { $parseInt(Object(ITERATOR$5)); }));\n\n\t// `parseInt` method\n\t// https://tc39.es/ecma262/#sec-parseint-string-radix\n\tvar numberParseInt = FORCED$4 ? function parseInt(string, radix) {\n\t  var S = trim$4(toString_1(string));\n\t  return $parseInt(S, (radix >>> 0) || (exec$2(hex, S) ? 16 : 10));\n\t} : $parseInt;\n\n\t// `parseInt` method\n\t// https://tc39.es/ecma262/#sec-parseint-string-radix\n\t_export({ global: true, forced: parseInt != numberParseInt }, {\n\t  parseInt: numberParseInt\n\t});\n\n\tvar _parseInt = path.parseInt;\n\n\tvar _parseInt$1 = _parseInt;\n\n\tvar _parseInt$2 = _parseInt$1;\n\n\t/**\n\t * Copyright (C) 2021 THL A29 Limited, a Tencent company.\n\t *\n\t * Licensed under the Apache License, Version 2.0 (the \"License\");\n\t * you may not use this file except in compliance with the License.\n\t * You may obtain a copy of the License at\n\t *\n\t *     http://www.apache.org/licenses/LICENSE-2.0\n\t *\n\t * Unless required by applicable law or agreed to in writing, software\n\t * distributed under the License is distributed on an \"AS IS\" BASIS,\n\t * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n\t * See the License for the specific language governing permissions and\n\t * limitations under the License.\n\t */\n\t// @ts-nocheck\n\n\t/**\n\t * 将html内容转换成md内容的工具\n\t * 调用方式为：htmlParser.run(htmlStr)\n\t * 主要流程为：\n\t *    1、接收html字符串\n\t *    2、根据html字符串生成html语法树\n\t *    3、递归遍历语法树，将标签替换为对应的markdown语法\n\t **/\n\tvar htmlParser = {\n\t  /**\n\t   * 入口函数，负责将传入的html字符串转成对应的markdown源码\n\t   * @param {string} htmlStr\n\t   * @returns {string} 对应的markdown源码\n\t   */\n\t  run: function run(htmlStr) {\n\t    var _context;\n\n\t    var $htmlStr = \"<div>\".concat(htmlStr, \"</div>\"); // 挂载对应的格式化引擎，这里挂载的是markdown逆向引擎，后续可以扩展支持其他标记语言\n\n\t    this.tagParser.formatEngine = this.mdFormatEngine; // 去掉注释\n\n\t    $htmlStr = $htmlStr.replace(/<!--[\\s\\S]*?-->/g, ''); // 将html字符串解析成html语法树\n\n\t    var htmlparsedArrays = this.htmlParser.parseHtml($htmlStr); // 预处理，去掉一些不需要的样式、属性\n\n\t    htmlparsedArrays = this.paragraphStyleClear(htmlparsedArrays); // 核心逻辑，遍历html语法树，生成对应的markdown源码\n\n\t    return trim$3(_context = this.$dealHtml(htmlparsedArrays).replace(/\\n{3,}/g, '\\n\\n\\n').replace(/&gt;/g, '>').replace(/&lt;/g, '<').replace(/&amp;/g, '&')).call(_context, '\\n');\n\t  },\n\n\t  /**\n\t   * 解析html语法树\n\t   * @param {Array} arr\n\t   * @returns {string} 对应的markdown源码\n\t   */\n\t  $dealHtml: function $dealHtml(arr) {\n\t    var ret = '';\n\n\t    for (var i = 0; i < arr.length; i++) {\n\t      var temObj = arr[i];\n\t      if (temObj.type === 'tag') ret = this.$handleTagObject(temObj, ret);else if (temObj.type === 'text' && temObj.content.length > 0) {\n\t        ret += temObj.content.replace(/&nbsp;/g, ' ').replace(/[\\n]+/g, '\\n').replace(/^[ \\t\\n]+\\n\\s*$/, '\\n');\n\t      }\n\t    }\n\n\t    return ret;\n\t  },\n\n\t  /**\n\t   * 处理html标签内容\n\t   * @param {object} temObj\n\t   * @param {string} returnString\n\t   */\n\t  $handleTagObject: function $handleTagObject(temObj, returnString) {\n\t    var ret = returnString;\n\n\t    if (temObj.attrs[\"class\"] && /(ch-icon-square|ch-icon-check)/.test(temObj.attrs[\"class\"])) {\n\t      var _context2;\n\n\t      // 针对checklist\n\t      if (indexOf$8(_context2 = temObj.attrs[\"class\"]).call(_context2, 'ch-icon-check') >= 0) {\n\t        ret += '[x]';\n\t      } else {\n\t        ret += '[ ]';\n\t      }\n\t    } else if (temObj.attrs[\"class\"] && /cherry-code-preview-lang-select/.test(temObj.attrs[\"class\"])) {\n\t      // 如果是代码块的选择语言标签，则不做任何处理\n\t      ret += '';\n\t    } else {\n\t      // 如果是标签\n\t      ret += this.$dealTag(temObj);\n\t    }\n\n\t    return ret;\n\t  },\n\n\t  /**\n\t   * 解析具体的html标签\n\t   * @param {HTMLElement} obj\n\t   * @returns {string} 对应的markdown源码\n\t   */\n\t  $dealTag: function $dealTag(obj) {\n\t    var self = this;\n\t    var tmpText = '';\n\n\t    if (obj.children) {\n\t      // 递归每一个子元素\n\t      tmpText = self.$dealHtml(obj.children);\n\t    }\n\n\t    if (obj.name === 'style') {\n\t      // 不解析样式属性，只处理行内样式\n\t      return '';\n\t    }\n\n\t    if (obj.name === 'code' || obj.name === 'pre') {\n\t      // 解析代码块 或 行内代码\n\t      // pre时，强制转成代码块\n\t      return self.tagParser.codeParser(obj, self.$dealCodeTag(obj), obj.name === 'pre');\n\t    }\n\n\t    if (typeof self.tagParser[\"\".concat(obj.name, \"Parser\")] === 'function') {\n\t      // 解析对应的具体标签\n\t      return self.tagParser[\"\".concat(obj.name, \"Parser\")](obj, tmpText);\n\t    }\n\n\t    return tmpText;\n\t  },\n\n\t  /**\n\t   * 解析代码块\n\t   * 本函数认为代码块是由text标签和li标签组成的\n\t   * @param {HTMLElement} obj\n\t   * @returns {string} 对应的markdown源码\n\t   */\n\t  $dealCodeTag: function $dealCodeTag(obj) {\n\t    var self = this;\n\n\t    if (obj.children.length < 0) {\n\t      return '';\n\t    }\n\n\t    var ret = '';\n\n\t    for (var i = 0; i < obj.children.length; i++) {\n\t      var temObj = obj.children[i];\n\n\t      if (temObj.type !== 'text') {\n\t        // 如果是非text标签，则需要处理换行逻辑\n\t        if (temObj.name === 'li') {\n\t          ret += '\\n';\n\t        }\n\n\t        if (temObj.name === 'br') {\n\t          ret += '\\n';\n\t        } // 递归找到对应的代码文本\n\n\n\t        ret += self.$dealCodeTag(temObj);\n\t      } else {\n\t        ret += temObj.content;\n\t      }\n\t    }\n\n\t    return ret;\n\t  },\n\n\t  /** **\n\t   * html解析器\n\t   * 将html解析成对象数组\n\t   * https://github.com/HenrikJoreteg/html-parse-stringify\n\t   **/\n\t  htmlParser: {\n\t    attrRE: /([\\w-]+)|['\"]{1}([^'\"]*)['\"]{1}/g,\n\t    lookup: {\n\t      area: true,\n\t      base: true,\n\t      br: true,\n\t      col: true,\n\t      embed: true,\n\t      hr: true,\n\t      img: true,\n\t      video: true,\n\t      input: true,\n\t      keygen: true,\n\t      link: true,\n\t      menuitem: true,\n\t      meta: true,\n\t      param: true,\n\t      source: true,\n\t      track: true,\n\t      wbr: true\n\t    },\n\t    tagRE: /<(?:\"[^\"]*\"['\"]*|'[^']*'['\"]*|[^'\">])+>/g,\n\t    empty: create$6 ? create$6(null) : {},\n\t    parseTags: function parseTags(tag) {\n\t      var self = this;\n\t      var i = 0;\n\t      var key;\n\t      var res = {\n\t        type: 'tag',\n\t        name: '',\n\t        voidElement: false,\n\t        attrs: {},\n\t        children: []\n\t      };\n\t      tag.replace(this.attrRE, function (match) {\n\t        if (i % 2) {\n\t          key = match;\n\t        } else {\n\t          if (i === 0) {\n\t            if (self.lookup[match] || tag.charAt(tag.length - 2) === '/') {\n\t              res.voidElement = true;\n\t            }\n\n\t            res.name = match;\n\t          } else {\n\t            res.attrs[key] = match.replace(/['\"]/g, '');\n\t          }\n\t        }\n\n\t        i += 1;\n\t      });\n\t      return res;\n\t    },\n\t    parseHtml: function parseHtml(html, options) {\n\t      var self = this;\n\t      var $options = options || {};\n\t      $options.components || ($options.components = this.empty);\n\t      var result = [];\n\t      var current;\n\t      var level = -1;\n\t      var arr = [];\n\t      var byTag = {};\n\t      var inComponent = false;\n\t      html.replace(this.tagRE, function (tag, index) {\n\t        if (inComponent) {\n\t          if (tag !== \"</\".concat(current.name, \">\")) {\n\t            return;\n\t          }\n\n\t          inComponent = false;\n\t        }\n\n\t        var isOpen = tag.charAt(1) !== '/';\n\t        var start = index + tag.length;\n\t        var nextChar = html.charAt(start);\n\t        var parent;\n\n\t        if (isOpen) {\n\t          level += 1;\n\t          current = self.parseTags(tag);\n\n\t          if (current.type === 'tag' && $options.components[current.name]) {\n\t            current.type = 'component';\n\t            inComponent = true;\n\t          }\n\n\t          if (!current.voidElement && !inComponent && nextChar && nextChar !== '<') {\n\t            current.children.push({\n\t              type: 'text',\n\t              content: slice$7(html).call(html, start, indexOf$8(html).call(html, '<', start))\n\t            });\n\t          }\n\n\t          byTag[current.tagName] = current; // if we're at root, push new base node\n\n\t          if (level === 0) {\n\t            result.push(current);\n\t          }\n\n\t          parent = arr[level - 1];\n\n\t          if (parent) {\n\t            parent.children.push(current);\n\t          }\n\n\t          arr[level] = current;\n\t        }\n\n\t        if (!isOpen || current.voidElement) {\n\t          level -= 1;\n\n\t          if (!inComponent && nextChar !== '<' && nextChar) {\n\t            // trailing text node\n\t            if (arr[level]) {\n\t              arr[level].children.push({\n\t                type: 'text',\n\t                content: slice$7(html).call(html, start, indexOf$8(html).call(html, '<', start))\n\t              });\n\t            }\n\t          }\n\t        }\n\t      });\n\t      return result;\n\t    }\n\t  },\n\n\t  /** **\n\t   * 标签解析器\n\t   * 解析对应的标签，并调用格式化引擎生成对应格式内容\n\t   **/\n\t  tagParser: {\n\t    // 挂载的解析引擎，一次只能挂在一个解析引擎，目前只实现和挂载了markdown解析引擎\n\t    formatEngine: {},\n\n\t    /**\n\t     * 解析p标签\n\t     * @param {HTMLElement} obj\n\t     * @param {string} str 需要回填的字符串\n\t     * @returns {string} str\n\t     */\n\t    pParser: function pParser(obj, str) {\n\t      var $str = str;\n\n\t      if (/\\n$/.test($str)) {\n\t        return $str;\n\t      }\n\n\t      return \"\".concat($str, \"\\n\");\n\t    },\n\n\t    /**\n\t     * 解析div标签\n\t     * @param {HTMLElement} obj\n\t     * @param {string} str 需要回填的字符串\n\t     * @returns {string} str\n\t     */\n\t    divParser: function divParser(obj, str) {\n\t      var $str = str;\n\n\t      if (/\\n$/.test($str)) {\n\t        return $str;\n\t      }\n\n\t      return \"\".concat($str, \"\\n\");\n\t    },\n\n\t    /**\n\t     * 解析span标签\n\t     * @param {HTMLElement} obj\n\t     * @param {string} str 需要回填的字符串\n\t     * @returns {string} str\n\t     */\n\t    spanParser: function spanParser(obj, str) {\n\t      var $str = str.replace(/\\t/g, '').replace(/\\n/g, ' '); // span标签里不应该有\\n的，有的话就转化成空格\n\n\t      if (obj.attrs && obj.attrs.style) ;\n\n\t      return $str;\n\t    },\n\n\t    /**\n\t     * 解析code标签\n\t     * @param {HTMLElement} obj\n\t     * @param {string} str 需要回填的字符串\n\t     * @param {boolean} isBlock 是否强制为代码块\n\t     * @returns {string} str\n\t     */\n\t    codeParser: function codeParser(obj, str) {\n\t      var isBlock = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n\t      return this.formatEngine.convertCode(str, isBlock);\n\t    },\n\n\t    /**\n\t     * 解析br标签\n\t     * @param {HTMLElement} obj\n\t     * @param {string} str 需要回填的字符串\n\t     * @returns {string} str\n\t     */\n\t    brParser: function brParser(obj, str) {\n\t      return this.formatEngine.convertBr(str, '\\n');\n\t    },\n\n\t    /**\n\t     * 解析img标签\n\t     * @param {HTMLElement} obj\n\t     * @param {string} str 需要回填的字符串\n\t     * @returns {string} str\n\t     */\n\t    imgParser: function imgParser(obj, str) {\n\t      if (obj.attrs && obj.attrs['data-control'] === 'tapd-graph') {\n\t        return this.formatEngine.convertGraph(obj.attrs.title, obj.attrs.src, obj.attrs['data-origin-xml'], obj);\n\t      }\n\n\t      if (obj.attrs && obj.attrs.src) {\n\t        return this.formatEngine.convertImg(obj.attrs.alt, obj.attrs.src);\n\t      }\n\t    },\n\n\t    /**\n\t     * 解析video标签\n\t     * @param {HTMLElement} obj\n\t     * @param {string} str 需要回填的字符串\n\t     * @returns {string} str\n\t     */\n\t    videoParser: function videoParser(obj, str) {\n\t      if (obj.attrs && obj.attrs.src) {\n\t        return this.formatEngine.convertVideo(str, obj.attrs.src, obj.attrs.poster, obj.attrs.title);\n\t      }\n\t    },\n\n\t    /**\n\t     * 解析b标签\n\t     * @param {HTMLElement} obj\n\t     * @param {string} str 需要回填的字符串\n\t     * @returns {string} str\n\t     */\n\t    bParser: function bParser(obj, str) {\n\t      var strArr = str.split('\\n');\n\t      var ret = [];\n\n\t      for (var i = 0; i < strArr.length; i++) {\n\t        ret.push(this.formatEngine.convertB(strArr[i]));\n\t      }\n\n\t      return ret.join('\\n');\n\t    },\n\n\t    /**\n\t     * 解析i标签\n\t     * @param {HTMLElement} obj\n\t     * @param {string} str 需要回填的字符串\n\t     * @returns {string} str\n\t     */\n\t    iParser: function iParser(obj, str) {\n\t      var strArr = str.split('\\n');\n\t      var ret = [];\n\n\t      for (var i = 0; i < strArr.length; i++) {\n\t        ret.push(this.formatEngine.convertI(strArr[i]));\n\t      }\n\n\t      return ret.join('\\n');\n\t    },\n\n\t    /**\n\t     * 解析strike标签\n\t     * @param {HTMLElement} obj\n\t     * @param {string} str 需要回填的字符串\n\t     * @returns {string} str\n\t     */\n\t    strikeParser: function strikeParser(obj, str) {\n\t      var strArr = str.split('\\n');\n\t      var ret = [];\n\n\t      for (var i = 0; i < strArr.length; i++) {\n\t        ret.push(this.formatEngine.convertStrike(strArr[i]));\n\t      }\n\n\t      return ret.join('\\n');\n\t    },\n\n\t    /**\n\t     * 解析del标签\n\t     * @param {HTMLElement} obj\n\t     * @param {string} str 需要回填的字符串\n\t     * @returns {string} str\n\t     */\n\t    delParser: function delParser(obj, str) {\n\t      var strArr = str.split('\\n');\n\t      var ret = [];\n\n\t      for (var i = 0; i < strArr.length; i++) {\n\t        ret.push(this.formatEngine.convertDel(strArr[i]));\n\t      }\n\n\t      return ret.join('\\n');\n\t    },\n\n\t    /**\n\t     * 解析u标签\n\t     * @param {HTMLElement} obj\n\t     * @param {string} str 需要回填的字符串\n\t     * @returns {string} str\n\t     */\n\t    uParser: function uParser(obj, str) {\n\t      var strArr = str.split('\\n');\n\t      var ret = [];\n\n\t      for (var i = 0; i < strArr.length; i++) {\n\t        ret.push(this.formatEngine.convertU(strArr[i]));\n\t      }\n\n\t      return ret.join('\\n');\n\t    },\n\n\t    /**\n\t     * 解析a标签\n\t     * @param {HTMLElement} obj\n\t     * @param {string} str 需要回填的字符串\n\t     * @returns {string} str\n\t     */\n\t    aParser: function aParser(obj, str) {\n\t      if (obj.attrs && obj.attrs.href) {\n\t        return this.formatEngine.convertA(str, obj.attrs.href);\n\t      }\n\n\t      return '';\n\t    },\n\n\t    /**\n\t     * 解析sup标签\n\t     * @param {HTMLElement} obj\n\t     * @param {string} str 需要回填的字符串\n\t     * @returns {string} str\n\t     */\n\t    supParser: function supParser(obj, str) {\n\t      return this.formatEngine.convertSup(str);\n\t    },\n\n\t    /**\n\t     * 解析sub标签\n\t     * @param {HTMLElement} obj\n\t     * @param {string} str 需要回填的字符串\n\t     * @returns {string} str\n\t     */\n\t    subParser: function subParser(obj, str) {\n\t      return this.formatEngine.convertSub(str);\n\t    },\n\n\t    /**\n\t     * 解析td标签\n\t     * @param {HTMLElement} obj\n\t     * @param {string} str 需要回填的字符串\n\t     * @returns {string} str\n\t     */\n\t    tdParser: function tdParser(obj, str) {\n\t      return this.formatEngine.convertTd(str);\n\t    },\n\n\t    /**\n\t     * 解析tr标签\n\t     * @param {HTMLElement} obj\n\t     * @param {string} str 需要回填的字符串\n\t     * @returns {string} str\n\t     */\n\t    trParser: function trParser(obj, str) {\n\t      return this.formatEngine.convertTr(str);\n\t    },\n\n\t    /**\n\t     * 解析th标签\n\t     * @param {HTMLElement} obj\n\t     * @param {string} str 需要回填的字符串\n\t     * @returns {string} str\n\t     */\n\t    thParser: function thParser(obj, str) {\n\t      return this.formatEngine.convertTh(str);\n\t    },\n\n\t    /**\n\t     * 解析thead标签\n\t     * @param {HTMLElement} obj\n\t     * @param {string} str 需要回填的字符串\n\t     * @returns {string} str\n\t     */\n\t    theadParser: function theadParser(obj, str) {\n\t      return this.formatEngine.convertThead(str);\n\t    },\n\n\t    /**\n\t     * 解析table标签\n\t     * @param {HTMLElement} obj\n\t     * @param {string} str 需要回填的字符串\n\t     * @returns {string} str\n\t     */\n\t    tableParser: function tableParser(obj, str) {\n\t      return this.formatEngine.convertTable(str);\n\t    },\n\n\t    /**\n\t     * 解析li标签\n\t     * @param {HTMLElement} obj\n\t     * @param {string} str 需要回填的字符串\n\t     * @returns {string} str\n\t     */\n\t    liParser: function liParser(obj, str) {\n\t      return this.formatEngine.convertLi(str);\n\t    },\n\n\t    /**\n\t     * 解析ul标签\n\t     * @param {HTMLElement} obj\n\t     * @param {string} str 需要回填的字符串\n\t     * @returns {string} str\n\t     */\n\t    ulParser: function ulParser(obj, str) {\n\t      return this.formatEngine.convertUl(str);\n\t    },\n\n\t    /**\n\t     * 解析ol标签\n\t     * @param {HTMLElement} obj\n\t     * @param {string} str 需要回填的字符串\n\t     * @returns {string} str\n\t     */\n\t    olParser: function olParser(obj, str) {\n\t      return this.formatEngine.convertOl(str);\n\t    },\n\n\t    /**\n\t     * 解析strong标签\n\t     * @param {HTMLElement} obj\n\t     * @param {string} str 需要回填的字符串\n\t     * @returns {string} str\n\t     */\n\t    strongParser: function strongParser(obj, str) {\n\t      return this.formatEngine.convertStrong(str);\n\t    },\n\n\t    /**\n\t     * 解析hr标签\n\t     * @param {HTMLElement} obj\n\t     * @param {string} str 需要回填的字符串\n\t     * @returns {string} str\n\t     */\n\t    hrParser: function hrParser(obj, str) {\n\t      return this.formatEngine.convertHr(str);\n\t    },\n\n\t    /**\n\t     * 解析h1标签\n\t     * @param {HTMLElement} obj\n\t     * @param {string} str 需要回填的字符串\n\t     * @returns {string} str\n\t     */\n\t    h1Parser: function h1Parser(obj, str) {\n\t      return this.formatEngine.convertH1(str);\n\t    },\n\n\t    /**\n\t     * 解析h2标签\n\t     * @param {HTMLElement} obj\n\t     * @param {string} str 需要回填的字符串\n\t     * @returns {string} str\n\t     */\n\t    h2Parser: function h2Parser(obj, str) {\n\t      return this.formatEngine.convertH2(str);\n\t    },\n\n\t    /**\n\t     * 解析h3标签\n\t     * @param {HTMLElement} obj\n\t     * @param {string} str 需要回填的字符串\n\t     * @returns {string} str\n\t     */\n\t    h3Parser: function h3Parser(obj, str) {\n\t      return this.formatEngine.convertH3(str);\n\t    },\n\n\t    /**\n\t     * 解析h4标签\n\t     * @param {HTMLElement} obj\n\t     * @param {string} str 需要回填的字符串\n\t     * @returns {string} str\n\t     */\n\t    h4Parser: function h4Parser(obj, str) {\n\t      return this.formatEngine.convertH4(str);\n\t    },\n\n\t    /**\n\t     * 解析h5标签\n\t     * @param {HTMLElement} obj\n\t     * @param {string} str 需要回填的字符串\n\t     * @returns {string} str\n\t     */\n\t    h5Parser: function h5Parser(obj, str) {\n\t      return this.formatEngine.convertH5(str);\n\t    },\n\n\t    /**\n\t     * 解析h6标签\n\t     * @param {HTMLElement} obj\n\t     * @param {string} str 需要回填的字符串\n\t     * @returns {string} str\n\t     */\n\t    h6Parser: function h6Parser(obj, str) {\n\t      return this.formatEngine.convertH6(str);\n\t    },\n\n\t    /**\n\t     * 解析blockquote标签\n\t     * @param {HTMLElement} obj\n\t     * @param {string} str 需要回填的字符串\n\t     * @returns {string} str\n\t     */\n\t    blockquoteParser: function blockquoteParser(obj, str) {\n\t      return this.formatEngine.convertBlockquote(str.replace(/\\n+/g, '\\n'));\n\t    },\n\n\t    /**\n\t     * 解析address标签\n\t     * @param {HTMLElement} obj\n\t     * @param {string} str 需要回填的字符串\n\t     * @returns {string} str\n\t     */\n\t    addressParser: function addressParser(obj, str) {\n\t      return this.formatEngine.convertAddress(str.replace(/\\n+/g, '\\n'));\n\t    },\n\t    // 样式解析器\n\t    styleParser: {\n\t      // 识别字体颜色 color\n\t      colorAttrParser: function colorAttrParser(style) {\n\t        var color = style.match(/color:\\s*(#[a-zA-Z0-9]{3,6});/);\n\n\t        if (color && color[1]) {\n\t          return color[1];\n\t        }\n\n\t        return '';\n\t      },\n\t      // 识别字体大小 font-size\n\t      sizeAttrParser: function sizeAttrParser(style) {\n\t        var fontSize = style.match(/font-size:\\s*([a-zA-Z0-9-]+?);/);\n\n\t        if (fontSize && fontSize[1]) {\n\t          var size = 0;\n\n\t          if (/[0-9]+px/.test(fontSize[1])) {\n\t            var _context3;\n\n\t            size = trim$3(_context3 = fontSize[1].replace(/px/, '')).call(_context3);\n\t          } else {\n\t            switch (fontSize[1]) {\n\t              case 'x-small':\n\t                size = 10;\n\t                break;\n\n\t              case 'small':\n\t                size = 12;\n\t                break;\n\n\t              case 'medium':\n\t                size = 16;\n\t                break;\n\n\t              case 'large':\n\t                size = 18;\n\t                break;\n\n\t              case 'x-large':\n\t                size = 24;\n\t                break;\n\n\t              case 'xx-large':\n\t                size = 32;\n\t                break;\n\n\t              default:\n\t                size = '';\n\t            }\n\t          }\n\n\t          return size > 0 ? size : '';\n\t        }\n\n\t        return '';\n\t      },\n\t      // 识别字体背景颜色 background-color\n\t      bgColorAttrParser: function bgColorAttrParser(style) {\n\t        var color = style.match(/background-color:\\s*([^;]+?);/);\n\n\t        if (color && color[1]) {\n\t          var bgColor = '';\n\n\t          if (/rgb\\([ 0-9]+,[ 0-9]+,[ 0-9]+\\)/.test(color[1])) {\n\t            var values = color[1].match(/rgb\\(([ 0-9]+),([ 0-9]+),([ 0-9]+)\\)/);\n\n\t            if (values[1] && values[2] && values[3]) {\n\t              var _context4, _context5, _context6, _context7, _context8;\n\n\t              values[1] = _parseInt$2(trim$3(_context4 = values[1]).call(_context4), 10);\n\t              values[2] = _parseInt$2(trim$3(_context5 = values[2]).call(_context5), 10);\n\t              values[3] = _parseInt$2(trim$3(_context6 = values[3]).call(_context6), 10);\n\t              bgColor = concat$5(_context7 = concat$5(_context8 = \"#\".concat(values[1].toString(16))).call(_context8, values[2].toString(16))).call(_context7, values[3].toString(16));\n\t            }\n\t          } else {\n\t            var _color = _slicedToArray(color, 2);\n\n\t            bgColor = _color[1];\n\t          }\n\n\t          return bgColor;\n\t        }\n\n\t        return '';\n\t      }\n\t    }\n\t  },\n\n\t  /**\n\t   * 一个格式化引擎\n\t   * 将字符串格式化成markdown语法的引擎\n\t   **/\n\t  mdFormatEngine: {\n\t    convertColor: function convertColor(str, attr) {\n\t      var _context9;\n\n\t      var $str = trim$3(str).call(str);\n\n\t      if (!$str || /\\n/.test($str)) {\n\t        return $str;\n\t      }\n\n\t      return attr ? concat$5(_context9 = \"!!\".concat(attr, \" \")).call(_context9, $str, \"!!\") : $str;\n\t    },\n\t    convertSize: function convertSize(str, attr) {\n\t      var _context10;\n\n\t      var $str = trim$3(str).call(str);\n\n\t      if (!$str || /\\n/.test($str)) {\n\t        return $str;\n\t      }\n\n\t      return attr ? concat$5(_context10 = \"!\".concat(attr, \" \")).call(_context10, $str, \"!\") : $str;\n\t    },\n\t    convertBgColor: function convertBgColor(str, attr) {\n\t      var _context11;\n\n\t      var $str = trim$3(str).call(str);\n\n\t      if (!$str || /\\n/.test($str)) {\n\t        return $str;\n\t      }\n\n\t      return attr ? concat$5(_context11 = \"!!!\".concat(attr, \" \")).call(_context11, $str, \"!!!\") : $str;\n\t    },\n\t    convertBr: function convertBr(str, attr) {\n\t      return str + attr;\n\t    },\n\t    convertCode: function convertCode(str) {\n\t      var isBlock = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n\n\t      if (/\\n/.test(str) || isBlock) {\n\t        return \"```\\n\".concat(str.replace(/\\n+$/, ''), \"\\n```\");\n\t      }\n\n\t      return \"`\".concat(str.replace(/`/g, '\\\\`'), \"`\");\n\t    },\n\t    convertB: function convertB(str) {\n\t      return /^\\s*$/.test(str) ? '' : \"**\".concat(str, \"**\");\n\t    },\n\t    convertI: function convertI(str) {\n\t      return /^\\s*$/.test(str) ? '' : \"*\".concat(str, \"*\");\n\t    },\n\t    convertU: function convertU(str) {\n\t      return /^\\s*$/.test(str) ? '' : \" /\".concat(str, \"/ \");\n\t    },\n\t    convertImg: function convertImg(alt, src) {\n\t      var _context12;\n\n\t      var $alt = alt && alt.length > 0 ? alt : 'image';\n\t      return concat$5(_context12 = \"![\".concat($alt, \"](\")).call(_context12, src, \")\");\n\t    },\n\t    convertGraph: function convertGraph(str, attr, data, obj) {\n\t      var _context15, _context16, _context17;\n\n\t      var $str = str && str.length > 0 ? str : 'graph';\n\t      var moreAttrs = '';\n\n\t      if (obj) {\n\t        try {\n\t          var _context13;\n\n\t          var attrs = obj.attrs;\n\n\t          forEach$3(_context13 = keys$3(attrs)).call(_context13, function (prop) {\n\t            if (Object.prototype.hasOwnProperty.call(attrs, prop)) {\n\t              if (indexOf$8(prop).call(prop, 'data-graph-') >= 0 && attrs[prop]) {\n\t                var _context14;\n\n\t                moreAttrs += concat$5(_context14 = \" \".concat(prop, \"=\")).call(_context14, attrs[prop]);\n\t              }\n\t            }\n\t          });\n\t        } catch (error) {// console.log('error', error)\n\t        }\n\t      }\n\n\t      return concat$5(_context15 = concat$5(_context16 = concat$5(_context17 = \"![\".concat($str, \"](\")).call(_context17, attr, \"){data-control=tapd-graph data-origin-xml=\")).call(_context16, data)).call(_context15, moreAttrs, \"}\");\n\t    },\n\t    convertVideo: function convertVideo(str, src, poster, title) {\n\t      var _context18, _context19;\n\n\t      var $title = title && title.length > 0 ? title : 'video';\n\t      return concat$5(_context18 = concat$5(_context19 = \"!video[\".concat($title, \"](\")).call(_context19, src, \"){poster=\")).call(_context18, poster, \"}\");\n\t    },\n\t    convertA: function convertA(str, attr) {\n\t      var _context20;\n\n\t      if (str === attr) {\n\t        return \"\".concat(str, \" \");\n\t      }\n\n\t      var $str = trim$3(str).call(str);\n\n\t      if (!$str) {\n\t        return $str;\n\t      }\n\n\t      return concat$5(_context20 = \"[\".concat($str, \"](\")).call(_context20, attr, \")\");\n\t    },\n\t    convertSup: function convertSup(str) {\n\t      return \"^\".concat(trim$3(str).call(str).replace(/\\^/g, '\\\\^'), \"^\");\n\t    },\n\t    convertSub: function convertSub(str) {\n\t      return \"^^\".concat(trim$3(str).call(str).replace(/\\^\\^/g, '\\\\^\\\\^'), \"^^\");\n\t    },\n\t    convertTd: function convertTd(str) {\n\t      return \"~|\".concat(trim$3(str).call(str).replace(/\\n{1,}/g, '<br>'), \" ~|\");\n\t    },\n\t    convertTh: function convertTh(str) {\n\t      return \"~|\".concat(trim$3(str).call(str).replace(/\\n{1,}/g, '<br>'), \" ~|\");\n\t    },\n\t    convertTr: function convertTr(str) {\n\t      return \"\".concat(str.replace(/\\n/g, ''), \"\\n\");\n\t    },\n\t    convertThead: function convertThead(str) {\n\t      return \"\".concat(str.replace(/~\\|~\\|/g, '~|').replace(/~\\|/g, '|'), \"|:--|\\n\");\n\t    },\n\t    convertTable: function convertTable(str) {\n\t      var ret = \"\\n\".concat(str.replace(/~\\|~\\|/g, '~|').replace(/~\\|/g, '|'), \"\\n\").replace(/\\n{2,}/g, '\\n');\n\n\t      if (/\\|:--\\|/.test(ret)) {\n\t        return ret;\n\t      }\n\n\t      return \"\\n| |\\n|:--|\".concat(ret);\n\t    },\n\t    convertLi: function convertLi(str) {\n\t      return \"- \".concat(str.replace(/^\\n/, '').replace(/\\n+$/, '').replace(/\\n+/g, '\\n\\t'), \"\\n\");\n\t    },\n\t    convertUl: function convertUl(str) {\n\t      return \"\".concat(str, \"\\n\");\n\t    },\n\t    convertOl: function convertOl(str) {\n\t      var arr = str.split('\\n');\n\t      var index = 1;\n\n\t      for (var i = 0; i < arr.length; i++) {\n\t        if (/^- /.test(arr[i])) {\n\t          arr[i] = arr[i].replace(/^- /, \"\".concat(index, \". \"));\n\t          index += 1;\n\t        }\n\t      }\n\n\t      var $str = arr.join('\\n');\n\t      return \"\".concat($str, \"\\n\");\n\t    },\n\t    convertStrong: function convertStrong(str) {\n\t      return /^\\s*$/.test(str) ? '' : \"**\".concat(str, \"**\");\n\t    },\n\t    convertStrike: function convertStrike(str) {\n\t      return /^\\s*$/.test(str) ? '' : \"~~\".concat(str, \"~~\");\n\t    },\n\t    convertDel: function convertDel(str) {\n\t      return /^\\s*$/.test(str) ? '' : \"~~\".concat(str, \"~~\");\n\t    },\n\t    convertHr: function convertHr(str) {\n\t      return /^\\s*$/.test(str) ? '\\n\\n----\\n' : \"\\n\\n----\\n\".concat(str);\n\t    },\n\t    convertH1: function convertH1(str) {\n\t      return \"# \".concat(trim$3(str).call(str).replace(/\\n+$/, ''), \"\\n\\n\");\n\t    },\n\t    convertH2: function convertH2(str) {\n\t      return \"## \".concat(trim$3(str).call(str).replace(/\\n+$/, ''), \"\\n\\n\");\n\t    },\n\t    convertH3: function convertH3(str) {\n\t      return \"### \".concat(trim$3(str).call(str).replace(/\\n+$/, ''), \"\\n\\n\");\n\t    },\n\t    convertH4: function convertH4(str) {\n\t      return \"#### \".concat(trim$3(str).call(str).replace(/\\n+$/, ''), \"\\n\\n\");\n\t    },\n\t    convertH5: function convertH5(str) {\n\t      return \"##### \".concat(trim$3(str).call(str).replace(/\\n+$/, ''), \"\\n\\n\");\n\t    },\n\t    convertH6: function convertH6(str) {\n\t      return \"###### \".concat(trim$3(str).call(str).replace(/\\n+$/, ''), \"\\n\\n\");\n\t    },\n\t    convertBlockquote: function convertBlockquote(str) {\n\t      return \">\".concat(trim$3(str).call(str), \"\\n\\n\");\n\t    },\n\t    convertAddress: function convertAddress(str) {\n\t      return \">\".concat(trim$3(str).call(str), \"\\n\\n\");\n\t    }\n\t  },\n\n\t  /**\n\t   * 清除整段的样式、方便编辑\n\t   * 暂时先屏蔽字体色和背景色\n\t   * @param {Array} htmlparsedArrays 由HTMLElement组成的数组\n\t   */\n\t  paragraphStyleClear: function paragraphStyleClear(htmlparsedArrays) {\n\t    for (var index = 0; index < htmlparsedArrays[0].children.length; index++) {\n\t      var htmlItem = htmlparsedArrays[0].children[index];\n\t      var stack = [htmlItem];\n\t      var paragraphs = [];\n\n\t      while (stack.length) {\n\t        var temp = stack.shift();\n\t        var childCount = this.notEmptyTagCount(temp);\n\n\t        if (childCount === 1) {\n\t          paragraphs.push(temp);\n\t        } else if (childCount > 1) {\n\t          for (var k = 0; k < temp.children.length; k++) {\n\t            stack.push(temp.children[k]);\n\t          }\n\t        } else {\n\t          if (paragraphs.length === 1) {\n\t            this.clearChildColorAttrs(paragraphs.pop());\n\t          }\n\n\t          paragraphs = [];\n\t        }\n\t      }\n\n\t      if (paragraphs.length === 1) {\n\t        this.clearChildColorAttrs(paragraphs.pop());\n\t      }\n\t    }\n\n\t    return htmlparsedArrays;\n\t  },\n\n\t  /**\n\t   * 非空子元素数量\n\t   */\n\t  notEmptyTagCount: function notEmptyTagCount(htmlItem) {\n\t    if (!htmlItem || htmlItem.voidElement || htmlItem.type === 'tag' && !htmlItem.children.length || htmlItem.type === 'text' && !htmlItem.content.replace(/(\\r|\\n|\\s)+/g, '')) {\n\t      return 0;\n\t    }\n\n\t    if (htmlItem.children && htmlItem.children.length) {\n\t      var res = 0;\n\n\t      for (var index = 0; index < htmlItem.children.length; index++) {\n\t        res += this.notEmptyTagCount(htmlItem.children[index]);\n\t      }\n\n\t      return res;\n\t    }\n\n\t    return 1;\n\t  },\n\t  clearChildColorAttrs: function clearChildColorAttrs(htmlItems) {\n\t    var self = this;\n\t    this.forEachHtmlParsedItems(htmlItems, function (htmlItem) {\n\t      self.clearSelfNodeColorAttrs(htmlItem);\n\t    });\n\t  },\n\t  clearSelfNodeColorAttrs: function clearSelfNodeColorAttrs(htmlItem) {\n\t    if (htmlItem.attrs && htmlItem.attrs.style) {\n\t      var styles = htmlItem.attrs.style.split(';');\n\t      var newStyles = [];\n\n\t      for (var index = 0; index < styles.length; index++) {\n\t        var _context21;\n\n\t        if (styles[index] && indexOf$8(_context21 = styles[index]).call(_context21, 'color') === -1) {\n\t          newStyles.push(styles[index]);\n\t        }\n\t      }\n\n\t      if (newStyles.length) {\n\t        htmlItem.attrs.style = \"\".concat(newStyles.join(';'), \";\");\n\t      } else {\n\t        delete htmlItem.attrs.style;\n\t      }\n\t    }\n\t  },\n\t  forEachHtmlParsedItems: function forEachHtmlParsedItems(htmlItems, cb) {\n\t    if (htmlItems) {\n\t      cb(htmlItems);\n\n\t      if (htmlItems.children && htmlItems.children.length) {\n\t        for (var index = 0; index < htmlItems.children.length; index++) {\n\t          this.forEachHtmlParsedItems(htmlItems.children[index], cb);\n\t        }\n\t      }\n\t    }\n\t  }\n\t};\n\n\tvar assign$3 = assign$1;\n\n\tvar assign$4 = assign$3;\n\n\tvar assign$5 = assign$4;\n\n\tvar assign$6 = assign$5;\n\n\tvar _extends_1 = createCommonjsModule(function (module) {\n\tfunction _extends() {\n\t  module.exports = _extends = assign$6 || function (target) {\n\t    for (var i = 1; i < arguments.length; i++) {\n\t      var source = arguments[i];\n\n\t      for (var key in source) {\n\t        if (Object.prototype.hasOwnProperty.call(source, key)) {\n\t          target[key] = source[key];\n\t        }\n\t      }\n\t    }\n\n\t    return target;\n\t  }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n\t  return _extends.apply(this, arguments);\n\t}\n\n\tmodule.exports = _extends, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n\t});\n\n\tvar _extends = unwrapExports(_extends_1);\n\n\tvar trim$5 = stringTrim.trim;\n\n\n\tvar charAt$3 = functionUncurryThis(''.charAt);\n\tvar n$ParseFloat = global_1.parseFloat;\n\tvar Symbol$4 = global_1.Symbol;\n\tvar ITERATOR$6 = Symbol$4 && Symbol$4.iterator;\n\tvar FORCED$5 = 1 / n$ParseFloat(whitespaces + '-0') !== -Infinity\n\t  // MS Edge 18- broken with boxed symbols\n\t  || (ITERATOR$6 && !fails(function () { n$ParseFloat(Object(ITERATOR$6)); }));\n\n\t// `parseFloat` method\n\t// https://tc39.es/ecma262/#sec-parsefloat-string\n\tvar numberParseFloat = FORCED$5 ? function parseFloat(string) {\n\t  var trimmedString = trim$5(toString_1(string));\n\t  var result = n$ParseFloat(trimmedString);\n\t  return result === 0 && charAt$3(trimmedString, 0) == '-' ? -0 : result;\n\t} : n$ParseFloat;\n\n\t// `parseFloat` method\n\t// https://tc39.es/ecma262/#sec-parsefloat-string\n\t_export({ global: true, forced: parseFloat != numberParseFloat }, {\n\t  parseFloat: numberParseFloat\n\t});\n\n\tvar _parseFloat = path.parseFloat;\n\n\tvar _parseFloat$1 = _parseFloat;\n\n\tvar _parseFloat$2 = _parseFloat$1;\n\n\t/**\n\t * Copyright (C) 2021 THL A29 Limited, a Tencent company.\n\t *\n\t * Licensed under the Apache License, Version 2.0 (the \"License\");\n\t * you may not use this file except in compliance with the License.\n\t * You may obtain a copy of the License at\n\t *\n\t *     http://www.apache.org/licenses/LICENSE-2.0\n\t *\n\t * Unless required by applicable law or agreed to in writing, software\n\t * distributed under the License is distributed on an \"AS IS\" BASIS,\n\t * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n\t * See the License for the specific language governing permissions and\n\t * limitations under the License.\n\t */\n\tfunction mergeMarginBottom(bottom, top) {\n\t  var currentBottom = _parseFloat$2(bottom);\n\n\t  var nextTop = _parseFloat$2(top);\n\n\t  if (nextTop >= 0) {\n\t    // 不受合并影响\n\t    return currentBottom;\n\t  }\n\n\t  if (currentBottom >= 0) {\n\t    return currentBottom + nextTop;\n\t  } // 同时为负数，取最小的\n\n\n\t  return Math.min(currentBottom, nextTop);\n\t}\n\n\tfunction mergeMarginTop(bottom, top) {\n\t  var prevBottom = _parseFloat$2(bottom);\n\n\t  var currentTop = _parseFloat$2(top);\n\n\t  if (currentTop < 0) {\n\t    // 负数的margin都被上一个区块吸收了\n\t    return 0;\n\t  }\n\n\t  if (prevBottom >= 0) {\n\t    // 如果当前margin-top比上一个margin-bottom要大，则只合并部分；反之合并全部，归属于上一个区块\n\t    return Math.max(currentTop - prevBottom, 0);\n\t  } // 上一个margin-bottom为负数不受影响\n\n\n\t  return currentTop;\n\t}\n\t/**\n\t * 用于解决块级元素边距合并问题\n\t * @param {HTMLElement} element\n\t */\n\n\n\tfunction getBlockTopAndHeightWithMargin(element) {\n\t  var prevSibling = element.previousElementSibling;\n\t  var nextSibling = element.nextElementSibling;\n\n\t  if (!prevSibling) {\n\t    var _style = getComputedStyle(element);\n\n\t    var _rect = element.getBoundingClientRect();\n\n\t    if (!nextSibling) {\n\t      return {\n\t        // marginBottom可能为负数\n\t        height: Math.max(_parseFloat$2(_style.marginTop) + _rect.height + _parseFloat$2(_style.marginBottom), 0),\n\t        offsetTop: element.offsetTop - Math.abs(_parseFloat$2(_style.marginTop))\n\t      };\n\t    }\n\n\t    var _nextSibStyle = getComputedStyle(nextSibling);\n\n\t    var _marginBottom = mergeMarginBottom(_style.marginBottom, _nextSibStyle.marginTop);\n\n\t    return {\n\t      height: Math.max(_parseFloat$2(_style.marginTop) + _rect.height + _marginBottom, 0),\n\t      // marginBottom可能为负数\n\t      offsetTop: element.offsetTop - Math.abs(_parseFloat$2(_style.marginTop))\n\t    };\n\t  }\n\n\t  var style = getComputedStyle(element);\n\t  var rect = element.getBoundingClientRect();\n\t  var prevSibStyle = getComputedStyle(prevSibling);\n\t  var marginTop = mergeMarginTop(prevSibStyle.marginBottom, style.marginTop);\n\n\t  if (!nextSibling) {\n\t    return {\n\t      height: Math.max(marginTop + rect.height + _parseFloat$2(style.marginBottom), 0),\n\t      // marginBottom可能为负数\n\t      offsetTop: element.offsetTop - Math.abs(_parseFloat$2(style.marginTop))\n\t    };\n\t  }\n\n\t  var nextSibStyle = getComputedStyle(nextSibling);\n\t  var marginBottom = mergeMarginBottom(style.marginBottom, nextSibStyle.marginTop);\n\t  return {\n\t    height: Math.max(marginTop + rect.height + marginBottom, 0),\n\t    // marginBottom可能为负数\n\t    offsetTop: element.offsetTop - Math.abs(marginTop)\n\t  };\n\t}\n\t/**\n\t * document.elementsFromPoint polyfill\n\t * ref: https://github.com/JSmith01/elementsfrompoint-polyfill/blob/master/index.js\n\t * @param {number} x\n\t * @param {number} y\n\t */\n\n\tfunction elementsFromPoint(x, y) {\n\t  // see https://caniuse.com/#search=elementsFromPoint\n\t  if (typeof document.elementsFromPoint === 'function') {\n\t    return document.elementsFromPoint(x, y);\n\t  }\n\n\t  if (typeof\n\t  /** @type {any}*/\n\t  document.msElementsFromPoint === 'function') {\n\t    var nodeList =\n\t    /** @type {any}*/\n\t    document.msElementsFromPoint(x, y);\n\t    return nodeList !== null ? from_1$2(nodeList) : nodeList;\n\t  }\n\n\t  var elements = [];\n\t  var pointerEvents = [];\n\t  /** @type {HTMLElement} */\n\n\t  var ele;\n\n\t  do {\n\t    var currentElement =\n\t    /** @type {HTMLElement} */\n\t    document.elementFromPoint(x, y);\n\n\t    if (ele !== currentElement) {\n\t      ele = currentElement;\n\t      elements.push(ele);\n\t      pointerEvents.push(ele.style.pointerEvents);\n\t      ele.style.pointerEvents = 'none';\n\t    } else {\n\t      ele = null;\n\t    }\n\t  } while (ele);\n\n\t  forEach$3(elements).call(elements, function (e, index) {\n\t    e.style.pointerEvents = pointerEvents[index];\n\t  });\n\n\t  return elements;\n\t}\n\tfunction getHTML(who, deep) {\n\t  if (!who || !who.tagName) {\n\t    return '';\n\t  }\n\n\t  var txt;\n\t  var ax;\n\t  var el = document.createElement('div');\n\t  el.appendChild(who.cloneNode(false));\n\t  txt = el.innerHTML;\n\n\t  if (deep) {\n\t    ax = indexOf$8(txt).call(txt, '>') + 1;\n\t    txt = txt.substring(0, ax) + who.innerHTML + txt.substring(ax);\n\t  }\n\n\t  el = null;\n\t  return txt;\n\t}\n\t/**\n\t * @template {keyof HTMLElementTagNameMap} K\n\t * @param {K} tagName 标签名\n\t * @param {string} className 元素类名\n\t * @param {Record<string,string>} attributes 附加属性\n\t * @returns {HTMLElementTagNameMap[K]}\n\t */\n\n\tfunction createElement(tagName) {\n\t  var className = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';\n\t  var attributes = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n\t  var element = document.createElement(tagName);\n\t  element.className = className;\n\n\t  if (typeof attributes !== 'undefined') {\n\t    var _context;\n\n\t    forEach$3(_context = keys$3(attributes)).call(_context, function (key) {\n\t      var value = attributes[key];\n\n\t      if (startsWith$3(key).call(key, 'data-')) {\n\t        var dataName = key.replace(/^data-/, '');\n\t        element.dataset[dataName] = value;\n\t        return;\n\t      }\n\n\t      element.setAttribute(key, value);\n\t    });\n\t  }\n\n\t  return element;\n\t}\n\n\tvar SAFE_AREA_MARGIN = 15;\n\t/**\n\t * Cherry实现了将粘贴的html内容转成对应的markdown源码的功能\n\t * 本工具主要实现将粘贴html转成的markdown源码在编辑器中选中，并给出切换按钮\n\t * 可以切换为纯文本内容，或者markdown内容\n\t */\n\n\tvar pasteHelper = {\n\t  /**\n\t   * 核心方法，粘贴后展示切换按钮\n\t   * 只有粘贴html时才会出现切换按钮\n\t   * @param {Object} currentCursor 当前的光标位置\n\t   * @param {Object} editor 编辑器对象\n\t   * @param {string} html html里的纯文本内容\n\t   * @param {string} md html对应的markdown源码\n\t   * @returns\n\t   */\n\t  showSwitchBtnAfterPasteHtml: function showSwitchBtnAfterPasteHtml($cherry, currentCursor, editor, html, md) {\n\t    if (trim$3(html).call(html) === trim$3(md).call(md)) {\n\t      return;\n\t    }\n\n\t    this.init($cherry, currentCursor, editor, html, md);\n\t    this.setSelection();\n\t    this.bindListener();\n\t    this.initBubble();\n\t    this.showBubble(); // 默认粘贴成markdown格式，如果用户上次选择粘贴为纯文本，则需要切换为text\n\n\t    if (this.getTypeFromLocalStorage() === 'text') {\n\t      this.switchTextClick();\n\t    }\n\t  },\n\t  init: function init($cherry, currentCursor, editor, html, md) {\n\t    this.$cherry = $cherry;\n\t    this.html = html;\n\t    this.md = md;\n\t    this.codemirror = editor;\n\t    this.currentCursor = currentCursor;\n\t    this.locale = $cherry.locale;\n\t  },\n\n\t  /**\n\t   * 获取缓存中的复制粘贴类型\n\t   */\n\t  getTypeFromLocalStorage: function getTypeFromLocalStorage() {\n\t    if (typeof localStorage === 'undefined') {\n\t      return 'md';\n\t    }\n\n\t    return localStorage.getItem('cherry-paste-type') || 'md';\n\t  },\n\n\t  /**\n\t   * 记忆最近一次用户选择的粘贴类型\n\t   */\n\t  setTypeToLocalStorage: function setTypeToLocalStorage(type) {\n\t    if (typeof localStorage === 'undefined') {\n\t      return;\n\t    }\n\n\t    localStorage.setItem('cherry-paste-type', type);\n\t  },\n\n\t  /**\n\t   * 在编辑器中自动选中刚刚粘贴的内容\n\t   */\n\t  setSelection: function setSelection() {\n\t    var _this$codemirror$getC = this.codemirror.getCursor(),\n\t        end = _extends({}, _this$codemirror$getC);\n\n\t    var begin = this.currentCursor;\n\t    this.codemirror.setSelection(begin, end);\n\t  },\n\n\t  /**\n\t   * 绑定事件\n\t   * 当编辑器选中区域改变、内容改变时，隐藏切换按钮\n\t   * 当编辑器滚动时，实时更新切换按钮的位置\n\t   * @returns null\n\t   */\n\t  bindListener: function bindListener() {\n\t    var _this = this;\n\n\t    if (!this.hasBindListener) {\n\t      this.hasBindListener = true;\n\t    } else {\n\t      return true;\n\t    }\n\n\t    this.codemirror.on('beforeSelectionChange', function (codemirror, info) {\n\t      _this.hideBubble();\n\t    });\n\t    this.codemirror.on('beforeChange', function (codemirror, info) {\n\t      _this.hideBubble();\n\t    });\n\t    this.codemirror.on('scroll', function (codemirror) {\n\t      _this.updatePositionWhenScroll();\n\t    });\n\t  },\n\t  isHidden: function isHidden() {\n\t    return this.bubbleDom.style.display === 'none';\n\t  },\n\t  toggleBubbleDisplay: function toggleBubbleDisplay() {\n\t    if (this.isHidden()) {\n\t      this.bubbleDom.style.display = '';\n\t      return;\n\t    }\n\n\t    this.bubbleDom.style.display = 'none';\n\t    return;\n\t  },\n\t  hideBubble: function hideBubble() {\n\t    if (this.noHide) {\n\t      return true;\n\t    }\n\n\t    if (this.isHidden()) {\n\t      return;\n\t    }\n\n\t    this.toggleBubbleDisplay();\n\t  },\n\t  updatePositionWhenScroll: function updatePositionWhenScroll() {\n\t    if (this.isHidden()) {\n\t      return;\n\t    } // FIXME: update position when stick to the bottom\n\t    // const isStickToBottom = !this.bubbleDom.style.top;\n\n\n\t    var offset = this.bubbleDom.dataset.scrollTop - this.getScrollTop();\n\t    this.bubbleDom.style.marginTop = \"\".concat(offset, \"px\");\n\t  },\n\t  getScrollTop: function getScrollTop() {\n\t    return this.codemirror.getScrollInfo().top;\n\t  },\n\t  showBubble: function showBubble() {\n\t    var _this$getLastSelected = this.getLastSelectedPosition(),\n\t        top = _this$getLastSelected.top;\n\n\t    if (this.isHidden()) {\n\t      this.toggleBubbleDisplay();\n\t      this.bubbleDom.style.marginTop = '0';\n\t      this.bubbleDom.dataset.scrollTop = this.getScrollTop();\n\t    }\n\t    /**\n\t     * @type {HTMLDivElement}\n\t     */\n\n\n\t    var codemirrorWrapper = this.codemirror.getWrapperElement();\n\t    var maxTop = codemirrorWrapper.clientHeight - this.bubbleDom.getBoundingClientRect().height - SAFE_AREA_MARGIN;\n\n\t    if (top > maxTop) {\n\t      this.bubbleDom.style.top = '';\n\t      this.bubbleDom.style.bottom = \"\".concat(SAFE_AREA_MARGIN, \"px\");\n\t    } else {\n\t      this.bubbleDom.style.top = \"\".concat(top, \"px\");\n\t      this.bubbleDom.style.bottom = '';\n\t    }\n\t  },\n\t  initBubble: function initBubble() {\n\t    var _context, _context2;\n\n\t    if (this.bubbleDom) {\n\t      this.bubbleDom.setAttribute('data-type', 'md');\n\t      return true;\n\t    }\n\n\t    var dom = createElement('div', 'cherry-bubble cherry-bubble--centered cherry-switch-paste');\n\t    dom.style.display = 'none';\n\t    var switchText = createElement('span', 'cherry-toolbar-button cherry-text-btn', {\n\t      title: this.locale.pastePlain\n\t    });\n\t    switchText.innerText = 'TEXT';\n\t    var switchMd = createElement('span', 'cherry-toolbar-button cherry-md-btn', {\n\t      title: this.locale.pasteMarkdown\n\t    });\n\t    switchMd.innerText = 'Markdown';\n\t    var switchBG = createElement('span', 'switch-btn--bg');\n\t    this.bubbleDom = dom;\n\t    this.switchText = switchText;\n\t    this.switchMd = switchMd;\n\t    this.switchBG = switchBG;\n\t    this.bubbleDom.appendChild(switchText);\n\t    this.bubbleDom.appendChild(switchMd);\n\t    this.bubbleDom.appendChild(switchBG);\n\t    this.bubbleDom.setAttribute('data-type', 'md');\n\t    this.codemirror.getWrapperElement().appendChild(this.bubbleDom);\n\t    this.switchMd.addEventListener('click', bind$5(_context = this.switchMDClick).call(_context, this));\n\t    this.switchText.addEventListener('click', bind$5(_context2 = this.switchTextClick).call(_context2, this));\n\t  },\n\t  switchMDClick: function switchMDClick(event) {\n\t    this.setTypeToLocalStorage('md');\n\n\t    if (this.bubbleDom.getAttribute('data-type') === 'md') {\n\t      return;\n\t    }\n\n\t    this.noHide = true;\n\t    this.bubbleDom.setAttribute('data-type', 'md');\n\t    this.codemirror.doc.replaceSelection(this.md);\n\t    this.setSelection();\n\t    this.showBubble();\n\t    this.noHide = false;\n\t  },\n\t  switchTextClick: function switchTextClick(event) {\n\t    this.setTypeToLocalStorage('text');\n\n\t    if (this.bubbleDom.getAttribute('data-type') === 'text') {\n\t      return;\n\t    }\n\n\t    this.noHide = true;\n\t    this.bubbleDom.setAttribute('data-type', 'text');\n\t    this.codemirror.doc.replaceSelection(this.html);\n\t    this.setSelection();\n\t    this.showBubble();\n\t    this.noHide = false;\n\t  },\n\t  getLastSelectedPosition: function getLastSelectedPosition() {\n\t    var selectedObjs = from_1$2(this.codemirror.getWrapperElement().getElementsByClassName('CodeMirror-selected'));\n\n\t    var width = 0;\n\t    var top = 0;\n\n\t    if (selectedObjs.length <= 0) {\n\t      this.hideBubble();\n\t      return {};\n\t    } // FIXME: remove redundant width calculation\n\n\n\t    for (var key = 0; key < selectedObjs.length; key++) {\n\t      var item = selectedObjs[key];\n\t      var position = item.getBoundingClientRect();\n\t      var tmpWidth = position.left + position.width / 2;\n\t      var tmpTop = position.top + position.height;\n\n\t      if (tmpTop > top && tmpWidth >= width) {\n\t        top = tmpTop;\n\t      }\n\n\t      if (tmpWidth > width) {\n\t        width = tmpWidth;\n\t      }\n\t    }\n\n\t    return {\n\t      top: top\n\t    };\n\t  }\n\t};\n\n\t/**\n\t * Copyright (C) 2021 THL A29 Limited, a Tencent company.\n\t *\n\t * Licensed under the Apache License, Version 2.0 (the \"License\");\n\t * you may not use this file except in compliance with the License.\n\t * You may obtain a copy of the License at\n\t *\n\t *     http://www.apache.org/licenses/LICENSE-2.0\n\t *\n\t * Unless required by applicable law or agreed to in writing, software\n\t * distributed under the License is distributed on an \"AS IS\" BASIS,\n\t * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n\t * See the License for the specific language governing permissions and\n\t * limitations under the License.\n\t */\n\tfunction addEvent(elm, evType, fn, useCapture) {\n\t  if (elm.addEventListener) {\n\t    elm.addEventListener(evType, fn, useCapture); // DOM2.0\n\n\t    return true;\n\t  }\n\n\t  if (elm.attachEvent) {\n\t    var r = elm.attachEvent(\"on\".concat(evType), fn); // IE5+\n\n\t    return r;\n\t  }\n\n\t  elm[\"on\".concat(evType)] = fn; // DOM 0\n\t}\n\tfunction removeEvent(elm, evType, fn, useCapture) {\n\t  if (elm.removeEventListener) {\n\t    elm.removeEventListener(evType, fn, useCapture); // DOM2.0\n\t  } else if (elm.detachEvent) {\n\t    var r = elm.detachEvent(\"on\".concat(evType), fn); // IE5+\n\n\t    return r;\n\t  } else {\n\t    elm[\"on\".concat(evType)] = null; // DOM 0\n\t  }\n\t}\n\n\t/**\n\t * Copyright (C) 2021 THL A29 Limited, a Tencent company.\n\t *\n\t * Licensed under the Apache License, Version 2.0 (the \"License\");\n\t * you may not use this file except in compliance with the License.\n\t * You may obtain a copy of the License at\n\t *\n\t *     http://www.apache.org/licenses/LICENSE-2.0\n\t *\n\t * Unless required by applicable law or agreed to in writing, software\n\t * distributed under the License is distributed on an \"AS IS\" BASIS,\n\t * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n\t * See the License for the specific language governing permissions and\n\t * limitations under the License.\n\t */\n\t// @ts-check\n\n\t/** @type {Partial<Console>} */\n\tvar Logger = new Proxy({}, {\n\t  get: function get(target, prop, receiver) {\n\t    // @ts-ignore\n\t    if ( typeof console !== 'undefined' && prop in console) {\n\t      return console[prop];\n\t    }\n\n\t    return function () {};\n\t  }\n\t});\n\n\tfunction mitt(n){return {all:n=n||new Map,on:function(t,e){var i=n.get(t);i?i.push(e):n.set(t,[e]);},off:function(t,e){var i=n.get(t);i&&(e?i.splice(i.indexOf(e)>>>0,1):n.set(t,[]));},emit:function(t,e){var i=n.get(t);i&&i.slice().map(function(n){n(e);}),(i=n.get(\"*\"))&&i.slice().map(function(n){n(t,e);});}}}\n\n\t/**\n\t * 事件管理\n\t */\n\n\tvar Event$1 = new ( /*#__PURE__*/function () {\n\t  function Event() {\n\t    _classCallCheck(this, Event);\n\n\t    _defineProperty(this, \"Events\", {\n\t      previewerClose: 'previewer:close',\n\t      previewerOpen: 'previewer:open',\n\t      editorClose: 'editor:close',\n\t      editorOpen: 'editor:open',\n\t      toolbarHide: 'toolbar:hide',\n\t      toolbarShow: 'toolbar:show',\n\t      cleanAllSubMenus: 'cleanAllSubMenus' // 清除所有子菜单弹窗\n\n\t    });\n\n\t    _defineProperty(this, \"emitter\", mitt());\n\t  }\n\n\t  _createClass(Event, [{\n\t    key: \"on\",\n\t    value:\n\t    /**\n\t     * 注册监听事件\n\t     * @param {string} instanceId 接收消息的频道\n\t     * @param {string} event 要注册监听的事件\n\t     * @param {(event: any) => void} handler 事件回调\n\t     */\n\t    function on(instanceId, event, handler) {\n\t      var _context;\n\n\t      this.emitter.on(concat$5(_context = \"\".concat(instanceId, \":\")).call(_context, event), handler);\n\t    }\n\t    /**\n\t     * 触发事件\n\t     * @param {string} instanceId 发送消息的频道\n\t     * @param {string} event 要触发的事件\n\t     */\n\n\t  }, {\n\t    key: \"emit\",\n\t    value: function emit(instanceId, event) {\n\t      var _context2;\n\n\t      this.emitter.emit(concat$5(_context2 = \"\".concat(instanceId, \":\")).call(_context2, event));\n\t    }\n\t  }]);\n\n\t  return Event;\n\t}())();\n\n\t/**\n\t * Copyright (C) 2021 THL A29 Limited, a Tencent company.\n\t *\n\t * Licensed under the Apache License, Version 2.0 (the \"License\");\n\t * you may not use this file except in compliance with the License.\n\t * You may obtain a copy of the License at\n\t *\n\t *     http://www.apache.org/licenses/LICENSE-2.0\n\t *\n\t * Unless required by applicable law or agreed to in writing, software\n\t * distributed under the License is distributed on an \"AS IS\" BASIS,\n\t * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n\t * See the License for the specific language governing permissions and\n\t * limitations under the License.\n\t */\n\n\t/**\n\t * 上传文件的逻辑，如果有callback，则不再走默认的替换文本的逻辑，而是调用callback\n\t * @param {string} type 上传文件的类型\n\t */\n\tfunction handleUpload(editor) {\n\t  var type = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'image';\n\t  var accept = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '*';\n\t  // var callback = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;\n\t  // type为上传文件类型 image|video|audio|pdf|word\n\t  var input = document.createElement('input');\n\t  input.type = 'file';\n\t  input.id = 'fileUpload';\n\t  input.value = '';\n\t  input.style.display = 'none';\n\t  input.accept = accept; // document.body.appendChild(input);\n\t  input.multiple = 'multiple';\n\n\t  input.addEventListener('change', function (event) {\n\t    // @ts-ignore\n\t    // var _event$target$files = _slicedToArray(event.target.files, 1),\n\t    // file = _event$target$files[0]; // 文件上传后的回调函数可以由调用方自己实现\n\t    // 3xxx 20240607\n\t   \tlet files = event.target.files;\n\t\t\tfor (let i = 0; i < files.length; i++) {\n\t\t\t  var file = files[i]\n\t    editor.options.fileUpload(file, function (url) {\n\t\t\t  \tvar callback = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;\n\t      var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n\t      // 文件上传的默认回调行数，调用方可以完全不使用该函数\n\t      if (typeof url !== 'string' || !url) {\n\t        return;\n\t      }\n\n\t      if (callback) {\n\t        return callback(file.name, url, params);\n\t      }\n\n\t      var code = '';\n\n\t      if (type === 'image') {\n\t        var _context;\n\n\t        // 如果是图片，则返回固定的图片markdown源码\n\t        code = concat$5(_context = \"![\".concat(file.name, \"](\")).call(_context, url, \")\");\n\t      } else if (type === 'video') {\n\t        var _context2;\n\n\t        // 如果是视频，则返回固定的视频markdown源码\n\t        code = concat$5(_context2 = \"!video[\".concat(file.name, \"](\")).call(_context2, url, \")\");\n\t      } else if (type === 'audio') {\n\t        var _context3;\n\n\t        // 如果是音频，则返回固定的音频markdown源码\n\t        code = concat$5(_context3 = \"!audio[\".concat(file.name, \"](\")).call(_context3, url, \")\");\n\t      } else {\n\t        var _context4;\n\n\t        // 默认返回超链接\n\t        code = concat$5(_context4 = \"[\".concat(file.name, \"](\")).call(_context4, url, \")\");\n\t      } // 替换选中区域\n\t      // @ts-ignore\n\n\n\t      editor.editor.doc.replaceSelection(code);\n\t    });\n\t\t\t}\n\t  });\n\t  input.click();\n\t}\n\t/**\n\t * 解析params参数\n\t * @param params?.isBorder 是否有边框样式（图片场景下生效）\n\t * @param params?.isShadow 是否有阴影样式（图片场景下生效）\n\t * @param params?.isRadius 是否有圆角样式（图片场景下生效）\n\t * @param params?.width 设置宽度，可以是像素、也可以是百分比（图片、视频场景下生效）\n\t * @param params?.height 设置高度，可以是像素、也可以是百分比（图片、视频场景下生效）\n\t */\n\n\tfunction handelParams(params) {\n\t  var ret = [];\n\n\t  if (params.isBorder) {\n\t    ret.push('#B');\n\t  }\n\n\t  if (params.isShadow) {\n\t    ret.push('#S');\n\t  }\n\n\t  if (params.isRadius) {\n\t    ret.push('#R');\n\t  }\n\n\t  if (params.width) {\n\t    ret.push(\"#\".concat(params.width));\n\t  }\n\n\t  if (params.height) {\n\t    if (!params.width) {\n\t      ret.push('#auto');\n\t    }\n\n\t    ret.push(\"#\".concat(params.height));\n\t  }\n\n\t  return ret.join(' ');\n\t}\n\n\t/**\n\t * Copyright (C) 2021 THL A29 Limited, a Tencent company.\n\t *\n\t * Licensed under the Apache License, Version 2.0 (the \"License\");\n\t * you may not use this file except in compliance with the License.\n\t * You may obtain a copy of the License at\n\t *\n\t *     http://www.apache.org/licenses/LICENSE-2.0\n\t *\n\t * Unless required by applicable law or agreed to in writing, software\n\t * distributed under the License is distributed on an \"AS IS\" BASIS,\n\t * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n\t * See the License for the specific language governing permissions and\n\t * limitations under the License.\n\t */\n\tfunction compileRegExp(obj, flags, allowExtendedFlags) {\n\t  var source = obj.begin + obj.content + obj.end;\n\n\t  if (allowExtendedFlags) {\n\t    // Extend \\h for horizontal whitespace\n\t    source = source.replace(/\\[\\\\h\\]/g, HORIZONTAL_WHITESPACE).replace(/\\\\h/g, HORIZONTAL_WHITESPACE);\n\t  }\n\n\t  return new RegExp(source, flags || 'g');\n\t}\n\tfunction isLookbehindSupported() {\n\t  try {\n\t    new RegExp('(?<=.)');\n\t    return true;\n\t  } catch (ignore) {}\n\n\t  return false;\n\t}\n\tvar HORIZONTAL_WHITESPACE = \"[ \\\\t\\\\u00a0]\"; // 仅适用非多行模式的正则\n\n\tvar ALLOW_WHITESPACE_MULTILINE = '(?:.*?)(?:(?:\\\\n.*?)*?)';\n\tvar DO_NOT_STARTS_AND_END_WITH_SPACES_MULTILINE_ALLOW_EMPTY = '(?:(?:\\\\S|(?:\\\\S.*?\\\\S))(?:[ \\\\t]*\\\\n.*?)*?)';\n\tvar NOT_ALL_WHITE_SPACES_INLINE = '(?:[^\\\\n]*?\\\\S[^\\\\n]*?)';\n\t// !, \", #, $, %, &, ', (, ), *, +, ,, -, ., / (U+0021–2F),\n\t// :, ;, <, =, >, ?, @ (U+003A–0040),\n\t// [, \\, ], ^, _, ` (U+005B–0060),\n\t// {, |, }, or ~ (U+007B–007E).\n\n\tvar PUNCTUATION = \"[\\\\u0021-\\\\u002F\\\\u003a-\\\\u0040\\\\u005b-\\\\u0060\\\\u007b-\\\\u007e]\"; // extra punctuations\n\n\tvar UNDERSCORE_EMPHASIS_BOUNDARY = '[' + \"\\\\u0021-\\\\u002F\\\\u003a-\\\\u0040\\\\u005b\\\\u005d\\\\u005e\\\\u0060\\\\u007b-\\\\u007e\" + // punctuations defined in commonmark\n\t' ' + '\\\\t\\\\n' + '！“”¥‘’（），。—：；《》？【】「」·～｜' + // chinese punctuations\n\t']'; // https://html.spec.whatwg.org/multipage/input.html#e-mail-state-(type%3Demail)\n\n\tvar EMAIL_INLINE = new RegExp([/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+/.source, '@', /[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*/.source].join(''));\n\tvar EMAIL = new RegExp(\"^\".concat(EMAIL_INLINE.source, \"$\")); // https://gist.github.com/dperini/729294\n\t// [USERNAME[:PASSWORD]@](IP|HOST)[:PORT][/SOURCE_PATH?QUERY_PARAMS#HASH]\n\n\tvar URL_INLINE_NO_SLASH = new RegExp('' + // 针对eslint的特殊处理\n\t'(?:\\\\S+(?::\\\\S*)?@)?' + '(?:' + // IP address exclusion\n\t// IP address dotted notation octets\n\t// excludes loopback network 0.0.0.0\n\t// excludes reserved space >= 224.0.0.0\n\t// excludes network & broadcast addresses\n\t// (first & last IP address of each class)\n\t'(?:1\\\\d\\\\d|2[01]\\\\d|22[0-3]|[1-9]\\\\d?)' + '(?:\\\\.(?:1?\\\\d{1,2}|2[0-4]\\\\d|25[0-5])){2}' + '(?:\\\\.(?:1\\\\d\\\\d|2[0-4]\\\\d|25[0-4]|[1-9]\\\\d?))' + '|' + // host & domain names, may end with dot\n\t'(?![-_])(?:[-\\\\w\\\\xa1-\\\\xff]{0,63}[^-_]\\\\.)+' + // TLD identifier name, may end with dot\n\t'(?:[a-zA-Z\\\\xa1-\\\\xff]{2,}\\\\.?)' + ')' + // port number (optional)\n\t'(?::\\\\d{2,5})?' + // resource path (optional)\n\t'(?:[/?#][^\\\\s<>\\\\x00-\\\\x1f\"\\\\(\\\\)]*)?');\n\tvar URL_INLINE = new RegExp( // eslint特殊处理\n\t// protocol identifier (optional)\n\t// short syntax // still required\n\t// '(?:(?:(?:https?|ftp):)?\\\\/\\\\/)' +\n\t\"(?:\\\\/\\\\/)\".concat(URL_INLINE_NO_SLASH.source));\n\tvar URL_NO_SLASH = new RegExp(\"^\".concat(URL_INLINE_NO_SLASH.source, \"$\"));\n\tvar URL$1 = new RegExp(\"^\".concat(URL_INLINE.source, \"$\"));\n\tfunction getTableRule() {\n\t  var _context;\n\n\t  var merge = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n\t  // ^(\\|[^\\n]+\\|\\r?\\n)((?:\\|:?[-]+:?)+\\|)(\\n(?:\\|[^\\n]+\\|\\r?\\n?)*)?$\n\t  // (\\\\|?[^\\\\n|]+\\\\|?\\\\n)(?:\\\\|?[\\\\s]*:?[-]{2,}:?[\\\\s]*\n\t  // (?:\\\\|[\\\\s]*:?[-]{2,}:?[\\\\s]*)+\\\\|?)(\\\\n\\\\|?(\\\\|[^\\\\n|]+)*\\\\|?)?\n\n\t  /**\n\t   * (\\|[^\\n]+\\|\\n)     Headers\n\t   * ((\\|[\\s]*:?[-]{2,}:?[\\s]*)+\\|)      Column Options\n\t   * ((?:\\n\\|[^\\n]+\\|)*)  Rows\n\t   */\n\t  var strict = {\n\t    begin: '(?:^|\\\\n)(\\\\n*)',\n\t    content: ['(\\\\h*\\\\|[^\\\\n]+\\\\|?\\\\h*)', // Header\n\t    '\\\\n', '(?:(?:\\\\h*\\\\|\\\\h*:?[-]{1,}:?\\\\h*)+\\\\|?\\\\h*)', // Column Options\n\t    '((\\\\n\\\\h*\\\\|[^\\\\n]+\\\\|?\\\\h*)*)' // Rows\n\t    ].join(''),\n\t    end: '(?=$|\\\\n)'\n\t  };\n\t  strict.reg = compileRegExp(strict, 'g', true);\n\t  var loose = {\n\t    begin: '(?:^|\\\\n)(\\\\n*)',\n\t    content: ['(\\\\|?[^\\\\n|]+(\\\\|[^\\\\n|]+)+\\\\|?)', // Header\n\t    '\\\\n', '(?:\\\\|?\\\\h*:?[-]{1,}:?[\\\\h]*(?:\\\\|[\\\\h]*:?[-]{1,}:?\\\\h*)+\\\\|?)', // Column Options\n\t    '((\\\\n\\\\|?([^\\\\n|]+(\\\\|[^\\\\n|]*)+)\\\\|?)*)' // Rows\n\t    ].join(''),\n\t    end: '(?=$|\\\\n)'\n\t  };\n\t  loose.reg = compileRegExp(loose, 'g', true);\n\n\t  if (merge === false) {\n\t    return {\n\t      strict: strict,\n\t      loose: loose\n\t    };\n\t  }\n\n\t  var regStr = concat$5(_context = \"(?:\".concat(strict.begin + strict.content + strict.end, \"|\")).call(_context, loose.begin + loose.content + loose.end, \")\");\n\n\t  return compileRegExp({\n\t    begin: '',\n\t    content: regStr,\n\t    end: ''\n\t  }, 'g', true);\n\t}\n\tfunction getCodeBlockRule() {\n\t  var codeBlock = {\n\t    /**\n\t     * (?:^|\\n)是区块的通用开头\n\t     * (\\n*)捕获区块前的所有换行\n\t     * ((?:>\\s*)*) 捕获代码块前面的引用（\"> > > \" 这种东西）\n\t     * (?:[^\\S\\n]*)捕获```前置的空格字符\n\t     * 只要有连续3个及以上`并且前后`的数量相等，则认为是代码快语法\n\t     */\n\t    begin: /(?:^|\\n)(\\n*((?:>[\\t ]*)*)(?:[^\\S\\n]*))(`{3,})([^`]*?)\\n/,\n\t    content: /([\\w\\W]*?)/,\n\t    // '([\\\\w\\\\W]*?)',\n\t    end: /[^\\S\\n]*\\3[ \\t]*(?=$|\\n+)/ // '\\\\s*```[ \\\\t]*(?=$|\\\\n+)',\n\n\t  };\n\t  codeBlock.reg = new RegExp(codeBlock.begin.source + codeBlock.content.source + codeBlock.end.source, 'g');\n\t  return codeBlock;\n\t}\n\t/**\n\t * 从selection里获取列表语法\n\t * @param {*} selection\n\t * @param {('ol'|'ul'|'checklist')} type  列表类型\n\t * @returns {String}\n\t */\n\n\tfunction getListFromStr(selection, type) {\n\t  var $selection = selection ? selection : 'Item 1\\n    Item 1.1\\nItem 2';\n\t  $selection = $selection.replace(/^\\n+/, '').replace(/\\n+$/, '');\n\t  var pre = '1.';\n\n\t  switch (type) {\n\t    case 'ol':\n\t      pre = '1.';\n\t      break;\n\n\t    case 'ul':\n\t      pre = '-';\n\t      break;\n\n\t    case 'checklist':\n\t      pre = '- [x]';\n\t      break;\n\t  }\n\n\t  $selection = $selection.replace(/^(\\s*)([0-9a-zA-Z]+\\.|- \\[x\\]|- \\[ \\]|-) /gm, '$1'); // 对有序列表进行序号自增处理\n\n\t  if (pre === '1.') {\n\t    var listNum = {};\n\t    $selection = $selection.replace(/^(\\s*)(\\S[\\s\\S]*?)$/gm, function (match, p1, p2) {\n\t      var _p1$match, _context2, _context3;\n\n\t      var space = ((_p1$match = p1.match(/[ \\t]/g)) === null || _p1$match === void 0 ? void 0 : _p1$match.length) || 0;\n\t      listNum[space] = listNum[space] ? listNum[space] + 1 : 1;\n\t      return concat$5(_context2 = concat$5(_context3 = \"\".concat(p1)).call(_context3, listNum[space], \". \")).call(_context2, p2);\n\t    });\n\t  } else {\n\t    $selection = $selection.replace(/^(\\s*)(\\S[\\s\\S]*?)$/gm, \"$1\".concat(pre, \" $2\"));\n\t  }\n\n\t  return $selection;\n\t}\n\t/**\n\t * 信息面板的识别正则\n\t * @returns {object}\n\t */\n\n\tfunction getPanelRule() {\n\t  var ret = {\n\t    begin: /(?:^|\\n)(\\n*(?:[^\\S\\n]*)):::([^:][^\\n]+?)\\s*\\n/,\n\t    content: /([\\w\\W]*?)/,\n\t    end: /\\n[ \\t]*:::[ \\t]*(?=$|\\n+)/\n\t  };\n\t  ret.reg = new RegExp(ret.begin.source + ret.content.source + ret.end.source, 'g');\n\t  return ret;\n\t}\n\t/**\n\t * 手风琴/detail语法的识别正则\n\t * 例：\n\t * +++(-) 点击查看详情\n\t * body\n\t * body\n\t * ++ 标题（默认收起内容）\n\t * 内容\n\t * ++- 标题（默认展开内容）\n\t * 内容2\n\t * +++\n\t * @returns {object}\n\t */\n\n\tfunction getDetailRule() {\n\t  var ret = {\n\t    begin: /(?:^|\\n)(\\n*(?:[^\\S\\n]*))\\+\\+\\+([-]{0,1})\\s+([^\\n]+)\\n/,\n\t    content: /([\\w\\W]+?)/,\n\t    end: /\\n[ \\t]*\\+\\+\\+[ \\t]*(?=$|\\n+)/\n\t  };\n\t  ret.reg = new RegExp(ret.begin.source + ret.content.source + ret.end.source, 'g');\n\t  return ret;\n\t} // 匹配图片URL里的base64\n\n\tvar imgBase64Reg = /(!\\[[^\\n]*?\\]\\(data:image\\/png;base64,)([^)]+)\\)/g; // 匹配图片{}里的data-xml属性\n\n\tvar imgDrawioXmlReg = /(!\\[[^\\n]*?\\]\\([^)]+\\)\\{[^}]* data-xml=)([^}]+)\\}/g;\n\t/**\n\t * 匹配draw.io的图片语法\n\t * 图片的语法为 ![alt](${base64}){data-type=drawio data-xml=${xml}}\n\t */\n\n\tvar imgDrawioReg = /(!\\[[^\\n]*?\\]\\(data:image\\/png;base64,[^)]+\\)\\{data-type=drawio data-xml=[^}]+\\})/g;\n\n\t/**\n\t * Copyright (C) 2021 THL A29 Limited, a Tencent company.\n\t *\n\t * Licensed under the Apache License, Version 2.0 (the \"License\");\n\t * you may not use this file except in compliance with the License.\n\t * You may obtain a copy of the License at\n\t *\n\t *     http://www.apache.org/licenses/LICENSE-2.0\n\t *\n\t * Unless required by applicable law or agreed to in writing, software\n\t * distributed under the License is distributed on an \"AS IS\" BASIS,\n\t * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n\t * See the License for the specific language governing permissions and\n\t * limitations under the License.\n\t */\n\n\t/**\n\t * @param {CodeMirror.Editor} cm\n\t */\n\tfunction handleNewlineIndentList(cm) {\n\t  if (handleCherryList(cm)) return;\n\t  cm.execCommand('newlineAndIndentContinueMarkdownList');\n\t}\n\n\tfunction handleCherryList(cm) {\n\t  var cherryListRE = /^(\\s*)([I一二三四五六七八九十]+)\\.(\\s+)/;\n\t  var cherryListEmptyRE = /^(\\s*)([I一二三四五六七八九十]+)\\.(\\s+)$/;\n\t  if (cm.getOption('disableInput')) return false;\n\t  var ranges = cm.listSelections();\n\t  var replacements = [];\n\n\t  for (var i = 0; i < ranges.length; i++) {\n\t    var pos = ranges[i].head;\n\t    var line = cm.getLine(pos.line);\n\t    var match = cherryListRE.exec(line);\n\t    var cursorBeforeBullet = /^\\s*$/.test(slice$7(line).call(line, 0, pos.ch));\n\t    if (!ranges[i].empty() || cursorBeforeBullet || !match) return;\n\n\t    if (cherryListEmptyRE.test(line)) {\n\t      cm.replaceRange('', {\n\t        line: pos.line,\n\t        ch: 0\n\t      }, {\n\t        line: pos.line,\n\t        ch: pos.ch + 1\n\t      });\n\t      replacements[i] = '\\n';\n\t    } else {\n\t      var _context;\n\n\t      var indent = match[1];\n\t      var after = match[3];\n\t      replacements[i] = concat$5(_context = \"\\n\".concat(indent, \"I.\")).call(_context, after);\n\t    }\n\t  }\n\n\t  cm.replaceSelections(replacements);\n\t  return true;\n\t}\n\n\tvar _excluded = [\"codemirror\"];\n\t/**\n\t * @typedef {import('~types/editor').EditorConfiguration} EditorConfiguration\n\t * @typedef {import('~types/editor').EditorEventCallback} EditorEventCallback\n\t * @typedef {import('codemirror')} CodeMirror\n\t */\n\n\t/** @type {import('~types/editor')} */\n\n\tvar Editor = /*#__PURE__*/function () {\n\t  /**\n\t   * @constructor\n\t   * @param {Partial<EditorConfiguration>} options\n\t   */\n\t  function Editor(options) {\n\t    var _this = this;\n\n\t    _classCallCheck(this, Editor);\n\n\t    _defineProperty(this, \"dealBigData\", function () {\n\t      if (_this.noChange) {\n\t        _this.noChange = false;\n\t        return;\n\t      }\n\n\t      _this.formatBigData2Mark(imgBase64Reg, 'cm-url base64');\n\n\t      _this.formatBigData2Mark(imgDrawioXmlReg, 'cm-url drawio');\n\t    });\n\n\t    _defineProperty(this, \"formatBigData2Mark\", function (reg, className) {\n\t      var codemirror = _this.editor;\n\t      var searcher = codemirror.getSearchCursor(reg);\n\t      var oneSearch = searcher.findNext();\n\n\t      for (; oneSearch !== false; oneSearch = searcher.findNext()) {\n\t        var _oneSearch$, _oneSearch$2;\n\n\t        var target = searcher.from();\n\n\t        if (!target) {\n\t          continue;\n\t        }\n\n\t        var bigString = (_oneSearch$ = oneSearch[2]) !== null && _oneSearch$ !== void 0 ? _oneSearch$ : '';\n\t        var targetChFrom = target.ch + ((_oneSearch$2 = oneSearch[1]) === null || _oneSearch$2 === void 0 ? void 0 : _oneSearch$2.length);\n\t        var targetChTo = targetChFrom + bigString.length;\n\t        var targetLine = target.line;\n\t        var begin = {\n\t          line: targetLine,\n\t          ch: targetChFrom\n\t        };\n\t        var end = {\n\t          line: targetLine,\n\t          ch: targetChTo\n\t        }; // 如果所在区域已经有mark了，则不再增加mark\n\n\t        if (codemirror.findMarks(begin, end).length > 0) {\n\t          continue;\n\t        }\n\n\t        var newSpan = createElement('span', \"cm-string \".concat(className), {\n\t          title: bigString\n\t        });\n\t        newSpan.textContent = bigString;\n\t        _this.noChange = true;\n\t        codemirror.markText(begin, end, {\n\t          replacedWith: newSpan,\n\t          atomic: true\n\t        });\n\t      }\n\t    });\n\n\t    _defineProperty(this, \"onKeyup\", function (e, codemirror) {\n\t      var _codemirror$getCursor = codemirror.getCursor(),\n\t          targetLine = _codemirror$getCursor.line;\n\n\t      _this.previewer.highlightLine(targetLine + 1);\n\t    });\n\n\t    _defineProperty(this, \"onScroll\", function (codemirror) {\n\t      Event$1.emit(_this.instanceId, Event$1.Events.cleanAllSubMenus); // 滚动时清除所有子菜单，这不应该在Bubble中处理，我们关注的是编辑器的滚动  add by ufec\n\n\t      if (_this.disableScrollListener) {\n\t        _this.disableScrollListener = false;\n\t        return;\n\t      }\n\n\t      var scroller = codemirror.getScrollerElement();\n\n\t      if (scroller.scrollTop <= 0) {\n\t        _this.previewer.scrollToLineNum(0);\n\n\t        return;\n\t      }\n\n\t      if (scroller.scrollTop + scroller.clientHeight >= scroller.scrollHeight - 20) {\n\t        _this.previewer.scrollToLineNum(null); // 滚动到底\n\n\n\t        return;\n\t      }\n\n\t      var currentTop = codemirror.getScrollInfo().top;\n\t      var targetLine = codemirror.lineAtHeight(currentTop, 'local');\n\t      var lineRect = codemirror.charCoords({\n\t        line: targetLine,\n\t        ch: 0\n\t      }, 'local');\n\t      var lineHeight = codemirror.getLineHandle(targetLine).height;\n\t      var lineTop = lineRect.bottom - lineHeight; // 直接用lineRect.top在自动折行时计算的是最后一行的top\n\n\t      var percent = 100 * (currentTop - lineTop) / lineHeight / 100; // console.log(percent);\n\t      // codemirror中行号以0开始，所以需要+1\n\n\t      _this.previewer.scrollToLineNum(targetLine + 1, percent);\n\t    });\n\n\t    _defineProperty(this, \"onMouseDown\", function (codemirror, evt) {\n\t      Event$1.emit(_this.instanceId, Event$1.Events.cleanAllSubMenus); // Bubble中处理需要考虑太多，直接在编辑器中处理可包括Bubble中所有情况，因为产生Bubble的前提是光标在编辑器中 add by ufec\n\n\t      var _codemirror$getCursor2 = codemirror.getCursor(),\n\t          targetLine = _codemirror$getCursor2.line;\n\n\t      var top = Math.abs(evt.y - codemirror.getWrapperElement().getBoundingClientRect().y);\n\n\t      _this.previewer.scrollToLineNumWithOffset(targetLine + 1, top);\n\t    });\n\n\t    _defineProperty(this, \"onCursorActivity\", function () {\n\t      _this.refreshWritingStatus();\n\t    });\n\n\t    /**\n\t     * @property\n\t     * @type {EditorConfiguration}\n\t     */\n\t    this.options = {\n\t      id: 'code',\n\t      // textarea 的id属性值\n\t      name: 'code',\n\t      // textarea 的name属性值\n\t      autoSave2Textarea: false,\n\t      editorDom: document.createElement('div'),\n\t      wrapperDom: null,\n\t      autoScrollByCursor: true,\n\t      convertWhenPaste: true,\n\t      codemirror: {\n\t        lineNumbers: false,\n\t        // 显示行数\n\t        cursorHeight: 0.85,\n\t        // 光标高度，0.85好看一些\n\t        indentUnit: 4,\n\t        // 缩进单位为4\n\t        tabSize: 4,\n\t        // 一个tab转换成的空格数量\n\t        // styleActiveLine: false, // 当前行背景高亮\n\t        // matchBrackets: true, // 括号匹配\n\t        mode: 'gfm',\n\t        // 从markdown模式改成gfm模式，以使用默认高亮规则\n\t        lineWrapping: true,\n\t        // 自动换行\n\t        indentWithTabs: true,\n\t        // 缩进用tab表示\n\t        autofocus: true,\n\t        theme: 'default',\n\t        autoCloseTags: true,\n\t        // 输入html标签时自动补充闭合标签\n\t        extraKeys: {\n\t          Enter: handleNewlineIndentList\n\t        },\n\t        // 增加markdown回车自动补全\n\t        matchTags: {\n\t          bothTags: true\n\t        },\n\t        // 自动高亮选中的闭合html标签\n\t        placeholder: '',\n\t        // 设置为 contenteditable 对输入法定位更友好\n\t        // 但已知会影响某些悬浮菜单的定位，如粘贴选择文本或markdown模式的菜单\n\t        // inputStyle: 'contenteditable',\n\t        keyMap: 'sublime'\n\t      },\n\t      toolbars: {},\n\t      onKeydown: function onKeydown() {},\n\t      onChange: function onChange() {},\n\t      onFocus: function onFocus() {},\n\t      onBlur: function onBlur() {},\n\t      onPaste: this.onPaste,\n\t      onScroll: this.onScroll\n\t    };\n\t    /**\n\t     * @property\n\t     * @private\n\t     * @type {{ timer?: number; destinationTop?: number }}\n\t     */\n\n\t    this.animation = {};\n\n\t    var _codemirror = options.codemirror,\n\t        restOptions = _objectWithoutProperties(options, _excluded);\n\n\t    if (_codemirror) {\n\t      assign$2(this.options.codemirror, _codemirror);\n\t    }\n\n\t    assign$2(this.options, restOptions);\n\n\t    this.$cherry = this.options.$cherry;\n\t    this.instanceId = this.$cherry.getInstanceId();\n\t  }\n\t  /**\n\t   * 处理draw.io的xml数据和图片的base64数据，对这种超大的数据增加省略号\n\t   */\n\n\n\t  _createClass(Editor, [{\n\t    key: \"onPaste\",\n\t    value:\n\t    /**\n\t     *\n\t     * @param {ClipboardEvent} e\n\t     * @param {CodeMirror.Editor} codemirror\n\t     */\n\t    function onPaste(e, codemirror) {\n\t      var clipboardData = e.clipboardData;\n\n\t      if (clipboardData) {\n\t        this.handlePaste(e, clipboardData, codemirror);\n\t      } else {\n\t        var _window = window;\n\t        clipboardData = _window.clipboardData;\n\t        this.handlePaste(e, clipboardData, codemirror);\n\t      }\n\t    }\n\t    /**\n\t     *\n\t     * @param {ClipboardEvent} event\n\t     * @param {ClipboardEvent['clipboardData']} clipboardData\n\t     * @param {CodeMirror.Editor} codemirror\n\t     * @returns {boolean | void}\n\t     */\n\n\t  }, {\n\t    key: \"handlePaste\",\n\t    value: function handlePaste(event, clipboardData, codemirror) {\n\t      var _test$match;\n\n\t      var items = clipboardData.items;\n\t      var types = clipboardData.types || [];\n\t      var codemirrorDoc = codemirror.getDoc();\n\n\t      for (var i = 0; i < types.length; i++) {\n\t        var item = items[i]; // 判断是否为图片数据\n\n\t        if (item && item.kind === 'file' && item.type.match(/^image\\//i)) {\n\t          // 读取该图片\n\t          var file = item.getAsFile();\n\t          this.options.fileUpload(file, function (url) {\n\t            if (typeof url !== 'string') {\n\t              return;\n\t            }\n\n\t            codemirrorDoc.replaceSelection(\"![enter image description here](\".concat(url, \")\"));\n\t          });\n\t          event.preventDefault();\n\t        }\n\t      } // 复制html转换markdown\n\n\n\t      var htmlText = clipboardData.getData('text/plain');\n\t      var html = clipboardData.getData('Text/Html');\n\n\t      if (!html || !this.options.convertWhenPaste) {\n\t        return true;\n\t      }\n\t      /**\n\t       * 这里需要处理一个特殊逻辑：\n\t       *    从excel中复制而来的内容，剪切板里会有一张图片（一个<img>元素）和一段纯文本，在这种场景下，需要丢掉图片，直接粘贴纯文本\n\t       * 与此同时，当剪切板里有图片和其他html标签时（从web页面上复制的内容），则需要走下面的html转md的逻辑\n\t       * 基于上述两个场景，才有了下面四行奇葩的代码\n\t       */\n\n\n\t      var test = html.replace(/<(html|head|body|!)/g, '');\n\n\t      if (((_test$match = test.match(/<[a-zA-Z]/g)) === null || _test$match === void 0 ? void 0 : _test$match.length) <= 1 && /<img/.test(test)) {\n\t        return true;\n\t      }\n\n\t      var divObj = document.createElement('DIV');\n\t      divObj.innerHTML = html;\n\t      html = divObj.innerHTML;\n\t      var mdText = htmlParser.run(html);\n\n\t      if (typeof mdText === 'string' && trim$3(mdText).call(mdText).length > 0) {\n\t        var range = codemirror.listSelections();\n\n\t        if (codemirror.getSelections().length <= 1 && range[0] && range[0].anchor) {\n\t          var currentCursor = {};\n\t          currentCursor.line = range[0].anchor.line;\n\t          currentCursor.ch = range[0].anchor.ch;\n\t          codemirrorDoc.replaceSelection(mdText);\n\t          pasteHelper.showSwitchBtnAfterPasteHtml(this.$cherry, currentCursor, codemirror, htmlText, mdText);\n\t        } else {\n\t          codemirrorDoc.replaceSelection(mdText);\n\t        }\n\n\t        event.preventDefault();\n\t      }\n\n\t      divObj = null;\n\t    }\n\t    /**\n\t     *\n\t     * @param {CodeMirror.Editor} codemirror\n\t     */\n\n\t  }, {\n\t    key: \"init\",\n\t    value:\n\t    /**\n\t     *\n\t     * @param {*} previewer\n\t     */\n\t    function init(previewer) {\n\t      var _this2 = this;\n\n\t      var textArea = this.options.editorDom.querySelector(\"#\".concat(this.options.id));\n\n\t      if (!(textArea instanceof HTMLTextAreaElement)) {\n\t        throw new Error('The specific element is not a textarea.');\n\t      }\n\n\t      var editor = codemirror.fromTextArea(textArea, this.options.codemirror);\n\t      editor.addOverlay({\n\t        name: 'invisibles',\n\t        token: function nextToken(stream) {\n\t          var tokenClass;\n\t          var spaces = 0;\n\t          var peek = stream.peek() === ' ';\n\n\t          if (peek) {\n\t            while (peek && spaces < Number.MAX_VALUE) {\n\t              spaces += 1;\n\t              stream.next();\n\t              peek = stream.peek() === ' ';\n\t            }\n\n\t            tokenClass = \"whitespace whitespace-\".concat(spaces);\n\t          } else {\n\t            while (!stream.eol()) {\n\t              stream.next();\n\t            }\n\n\t            tokenClass = '';\n\t          }\n\n\t          return tokenClass;\n\t        }\n\t      });\n\t      this.previewer = previewer;\n\t      this.disableScrollListener = false;\n\n\t      if (this.options.value) {\n\t        editor.setOption('value', this.options.value);\n\t      }\n\n\t      editor.on('blur', function (codemirror, evt) {\n\t        _this2.options.onBlur(evt, codemirror);\n\t      });\n\t      editor.on('focus', function (codemirror, evt) {\n\t        _this2.options.onFocus(evt, codemirror);\n\t      });\n\t      editor.on('change', function (codemirror, evt) {\n\t        _this2.options.onChange(evt, codemirror);\n\n\t        _this2.dealBigData();\n\n\t        if (_this2.options.autoSave2Textarea) {\n\t          // @ts-ignore\n\t          // 将codemirror里的内容回写到textarea里\n\t          codemirror.save();\n\t        }\n\t      });\n\t      editor.on('keydown', function (codemirror, evt) {\n\t        _this2.options.onKeydown(evt, codemirror);\n\t      });\n\t      editor.on('keyup', function (codemirror, evt) {\n\t        _this2.onKeyup(evt, codemirror);\n\t      });\n\t      editor.on('paste', function (codemirror, evt) {\n\t        _this2.options.onPaste.call(_this2, evt, codemirror);\n\t      });\n\n\t      if (this.options.autoScrollByCursor) {\n\t        editor.on('mousedown', function (codemirror, evt) {\n\t          setTimeout$3(function () {\n\t            _this2.onMouseDown(codemirror, evt);\n\t          });\n\t        });\n\t      }\n\n\t      editor.on('drop', function (codemirror, evt) {\n\t        var files = evt.dataTransfer.files || [];\n\n\t        if (files && files.length > 0) {\n\t          // 增加延时，让drop的位置变成codemirror的光标位置\n\t          setTimeout$3(function () {\n\t            var _loop = function _loop(i, _needBr) {\n\t              var file = files[i];\n\t              var fileType = file.type || ''; // 文本类型或者无类型的，直接读取内容，不做上传文件的操作\n\n\t              if (fileType === '' || /^text/i.test(fileType)) {\n\t                needBr = _needBr;\n\t                return \"continue\";\n\t              }\n\n\t              _this2.options.fileUpload(file, function (url) {\n\t                var _context, _context2, _context3, _context4;\n\n\t                var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n\t                if (typeof url !== 'string') {\n\t                  needBr = _needBr;\n\t                  return;\n\t                } // 拖拽上传文件时，强制改成没有文字选择区的状态\n\n\n\t                codemirror.setSelection(codemirror.getCursor());\n\t                var name = params.name ? params.name : file.name;\n\t                var type = '';\n\t                var poster = '';\n\n\t                if (/video/i.test(file.type)) {\n\t                  type = '!video';\n\t                  poster = params.poster ? \"{poster=\".concat(params.poster, \"}\") : '';\n\t                }\n\n\t                if (/audio/i.test(file.type)) {\n\t                  type = '!audio';\n\t                }\n\n\t                if (/image/i.test(file.type)) {\n\t                  type = '!';\n\t                }\n\n\t                var style = type ? handelParams(params) : '';\n\t                type = _needBr ? \"\\n\".concat(type) : type;\n\n\t                var insertValue = concat$5(_context = concat$5(_context2 = concat$5(_context3 = concat$5(_context4 = \"\".concat(type, \"[\")).call(_context4, name)).call(_context3, style, \"](\")).call(_context2, url, \")\")).call(_context, poster); // 当批量上传文件时，每个被插入的文件中间需要加个换行，但单个上传文件的时候不需要加换行\n\n\n\t                _needBr = true;\n\t                codemirror.replaceSelection(insertValue);\n\t              });\n\n\t              needBr = _needBr;\n\t            };\n\n\t            for (var i = 0, needBr = false; i < files.length; i++) {\n\t              var _ret = _loop(i, needBr);\n\n\t              if (_ret === \"continue\") continue;\n\t            }\n\t          }, 50);\n\t        }\n\t      });\n\t      editor.on('scroll', function (codemirror) {\n\t        _this2.options.onScroll(codemirror);\n\n\t        _this2.options.writingStyle === 'focus' && _this2.refreshWritingStatus();\n\t      });\n\t      editor.on('cursorActivity', function () {\n\t        _this2.onCursorActivity();\n\t      });\n\t      addEvent(this.getEditorDom(), 'wheel', function () {\n\t        // 鼠标滚轮滚动时，强制监听滚动事件\n\t        _this2.disableScrollListener = false; // 打断滚动动画\n\n\t        cancelAnimationFrame(_this2.animation.timer);\n\t        _this2.animation.timer = 0;\n\t      }, false);\n\t      /**\n\t       * @property\n\t       * @type {CodeMirror.Editor}\n\t       */\n\n\t      this.editor = editor;\n\n\t      if (this.options.writingStyle !== 'normal') {\n\t        this.initWritingStyle();\n\t      }\n\t    }\n\t    /**\n\t     *\n\t     * @param {number | null} beginLine 起始行，传入null时跳转到文档尾部\n\t     * @param {number} [endLine] 终止行\n\t     * @param {number} [percent] 百分比，取值0~1\n\t     */\n\n\t  }, {\n\t    key: \"jumpToLine\",\n\t    value: function jumpToLine(beginLine, endLine, percent) {\n\t      var _this3 = this;\n\n\t      if (beginLine === null) {\n\t        cancelAnimationFrame(this.animation.timer);\n\t        this.disableScrollListener = true;\n\t        this.editor.scrollIntoView({\n\t          line: this.editor.lineCount() - 1,\n\t          ch: 1\n\t        });\n\t        this.animation.timer = 0;\n\t        return;\n\t      }\n\n\t      var position = this.editor.charCoords({\n\t        line: beginLine,\n\t        ch: 0\n\t      }, 'local');\n\t      var top = position.top;\n\t      var positionEnd = this.editor.charCoords({\n\t        line: beginLine + endLine,\n\t        ch: 0\n\t      }, 'local');\n\t      var height = positionEnd.top - position.top;\n\t      top += height * percent;\n\t      this.animation.destinationTop = Math.ceil(top - 15);\n\n\t      if (this.animation.timer) {\n\t        return;\n\t      }\n\n\t      var animationHandler = function animationHandler() {\n\t        var currentTop = _this3.editor.getScrollInfo().top;\n\n\t        var delta = _this3.animation.destinationTop - currentTop; // 100毫秒内完成动画\n\n\t        var move = Math.ceil(Math.min(Math.abs(delta), Math.max(1, Math.abs(delta) / (100 / 16.7)))); // console.log('should scroll: ', move, delta, currentTop, this.animation.destinationTop);\n\n\t        if (delta > 0) {\n\t          if (currentTop >= _this3.animation.destinationTop) {\n\t            _this3.animation.timer = 0;\n\t            return;\n\t          }\n\n\t          _this3.disableScrollListener = true;\n\n\t          _this3.editor.scrollTo(null, currentTop + move);\n\t        } else if (delta < 0) {\n\t          if (currentTop <= _this3.animation.destinationTop || currentTop <= 0) {\n\t            _this3.animation.timer = 0;\n\t            return;\n\t          }\n\n\t          _this3.disableScrollListener = true;\n\n\t          _this3.editor.scrollTo(null, currentTop - move);\n\t        } else {\n\t          _this3.animation.timer = 0;\n\t          return;\n\t        } // 无法再继续滚动\n\n\n\t        if (currentTop === _this3.editor.getScrollInfo().top || move >= Math.abs(delta)) {\n\t          _this3.animation.timer = 0;\n\t          return;\n\t        }\n\n\t        _this3.animation.timer = requestAnimationFrame(animationHandler);\n\t      };\n\n\t      this.animation.timer = requestAnimationFrame(animationHandler);\n\t    }\n\t    /**\n\t     *\n\t     * @param {number | null} lineNum\n\t     * @param {number} [endLine]\n\t     * @param {number} [percent]\n\t     */\n\n\t  }, {\n\t    key: \"scrollToLineNum\",\n\t    value: function scrollToLineNum(lineNum, endLine, percent) {\n\t      if (lineNum === null) {\n\t        this.jumpToLine(null);\n\t        return;\n\t      }\n\n\t      var $lineNum = Math.max(0, lineNum);\n\t      this.jumpToLine($lineNum, endLine, percent);\n\t      // Logger.log('滚动预览区域，左侧应scroll to ', $lineNum);\n\t    }\n\t    /**\n\t     *\n\t     * @returns {HTMLElement}\n\t     */\n\n\t  }, {\n\t    key: \"getEditorDom\",\n\t    value: function getEditorDom() {\n\t      return this.options.editorDom;\n\t    }\n\t    /**\n\t     *\n\t     * @param {string} event 事件名\n\t     * @param {EditorEventCallback} callback 回调函数\n\t     */\n\n\t  }, {\n\t    key: \"addListener\",\n\t    value: function addListener(event, callback) {\n\t      this.editor.on(event, callback);\n\t    }\n\t    /**\n\t     * 初始化书写风格\n\t     */\n\n\t  }, {\n\t    key: \"initWritingStyle\",\n\t    value: function initWritingStyle() {\n\t      var _context5, _context6;\n\n\t      var writingStyle = this.options.writingStyle;\n\t      var className = \"cherry-editor-writing-style--\".concat(writingStyle);\n\t      var editorDom = this.getEditorDom(); // 重置状态\n\n\t      forEach$3(_context5 = filter$3(_context6 = from_1$2(editorDom.classList)).call(_context6, function (className) {\n\t        return startsWith$3(className).call(className, 'cherry-editor-writing-style--');\n\t      })).call(_context5, function (className) {\n\t        return editorDom.classList.remove(className);\n\t      });\n\n\t      if (writingStyle === 'normal') {\n\t        return;\n\t      }\n\n\t      editorDom.classList.add(className);\n\t      this.refreshWritingStatus();\n\t    }\n\t    /**\n\t     * 刷新书写状态\n\t     */\n\n\t  }, {\n\t    key: \"refreshWritingStatus\",\n\t    value: function refreshWritingStatus() {\n\t      var _context7, _context8;\n\n\t      var writingStyle = this.options.writingStyle;\n\t      var className = \"cherry-editor-writing-style--\".concat(writingStyle);\n\t      /**\n\t       * @type {HTMLStyleElement}\n\t       */\n\n\t      var style = document.querySelector('#cherry-editor-writing-style') || document.createElement('style');\n\t      style.id = 'cherry-editor-writing-style';\n\t      find$3(_context7 = from_1$2(document.head.childNodes)).call(_context7, function (node) {\n\t        return node === style;\n\t      }) || document.head.appendChild(style);\n\t      var sheet = style.sheet;\n\n\t      forEach$3(_context8 = from_1$2(Array(sheet.cssRules.length))).call(_context8, function () {\n\t        return sheet.deleteRule(0);\n\t      });\n\n\t      if (writingStyle === 'focus') {\n\t        var _context9, _context10;\n\n\t        var editorDomRect = this.getEditorDom().getBoundingClientRect(); // 获取光标所在位置\n\n\t        var _this$editor$charCoor = this.editor.charCoords(this.editor.getCursor()),\n\t            top = _this$editor$charCoor.top,\n\t            bottom = _this$editor$charCoor.bottom; // 光标上部距离编辑器顶部距离（不包含菜单）\n\n\n\t        var topHeight = top - editorDomRect.top; // 光标下部距离编辑器底部距离\n\n\t        var bottomHeight = editorDomRect.height - (bottom - editorDomRect.top);\n\t        sheet.insertRule(concat$5(_context9 = \".\".concat(className, \"::before { height: \")).call(_context9, topHeight > 0 ? topHeight : 0, \"px; }\"), 0);\n\t        sheet.insertRule(concat$5(_context10 = \".\".concat(className, \"::after { height: \")).call(_context10, bottomHeight > 0 ? bottomHeight : 0, \"px; }\"), 0);\n\t      }\n\n\t      if (writingStyle === 'typewriter') {\n\t        var _context11, _context12;\n\n\t        // 编辑器顶/底部填充的空白高度 (用于内容不足时使光标所在行滚动到编辑器中央)\n\t        var height = this.editor.getScrollInfo().clientHeight / 2;\n\t        sheet.insertRule(concat$5(_context11 = \".\".concat(className, \" .CodeMirror-lines::before { height: \")).call(_context11, height, \"px; }\"), 0);\n\t        sheet.insertRule(concat$5(_context12 = \".\".concat(className, \" .CodeMirror-lines::after { height: \")).call(_context12, height, \"px; }\"), 0);\n\t        this.editor.scrollTo(null, this.editor.cursorCoords(null, 'local').top - height);\n\t      }\n\t    }\n\t    /**\n\t     * 修改书写风格\n\t     */\n\n\t  }, {\n\t    key: \"setWritingStyle\",\n\t    value: function setWritingStyle(writingStyle) {\n\t      this.options.writingStyle = writingStyle;\n\t      this.initWritingStyle();\n\t    }\n\t  }]);\n\n\t  return Editor;\n\t}();\n\n\tvar $findIndex = arrayIteration.findIndex;\n\n\n\tvar FIND_INDEX = 'findIndex';\n\tvar SKIPS_HOLES$1 = true;\n\n\t// Shouldn't skip holes\n\tif (FIND_INDEX in []) Array(1)[FIND_INDEX](function () { SKIPS_HOLES$1 = false; });\n\n\t// `Array.prototype.findIndex` method\n\t// https://tc39.es/ecma262/#sec-array.prototype.findindex\n\t_export({ target: 'Array', proto: true, forced: SKIPS_HOLES$1 }, {\n\t  findIndex: function findIndex(callbackfn /* , that = undefined */) {\n\t    return $findIndex(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n\t  }\n\t});\n\n\tvar findIndex = entryVirtual('Array').findIndex;\n\n\tvar ArrayPrototype$7 = Array.prototype;\n\n\tvar findIndex$1 = function (it) {\n\t  var own = it.findIndex;\n\t  return it === ArrayPrototype$7 || (objectIsPrototypeOf(ArrayPrototype$7, it) && own === ArrayPrototype$7.findIndex) ? findIndex : own;\n\t};\n\n\tvar findIndex$2 = findIndex$1;\n\n\tvar findIndex$3 = findIndex$2;\n\n\tvar HAS_SPECIES_SUPPORT$2 = arrayMethodHasSpeciesSupport('splice');\n\n\tvar TypeError$f = global_1.TypeError;\n\tvar max$3 = Math.max;\n\tvar min$3 = Math.min;\n\tvar MAX_SAFE_INTEGER$3 = 0x1FFFFFFFFFFFFF;\n\tvar MAXIMUM_ALLOWED_LENGTH_EXCEEDED = 'Maximum allowed length exceeded';\n\n\t// `Array.prototype.splice` method\n\t// https://tc39.es/ecma262/#sec-array.prototype.splice\n\t// with adding support of @@species\n\t_export({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT$2 }, {\n\t  splice: function splice(start, deleteCount /* , ...items */) {\n\t    var O = toObject(this);\n\t    var len = lengthOfArrayLike(O);\n\t    var actualStart = toAbsoluteIndex(start, len);\n\t    var argumentsLength = arguments.length;\n\t    var insertCount, actualDeleteCount, A, k, from, to;\n\t    if (argumentsLength === 0) {\n\t      insertCount = actualDeleteCount = 0;\n\t    } else if (argumentsLength === 1) {\n\t      insertCount = 0;\n\t      actualDeleteCount = len - actualStart;\n\t    } else {\n\t      insertCount = argumentsLength - 2;\n\t      actualDeleteCount = min$3(max$3(toIntegerOrInfinity(deleteCount), 0), len - actualStart);\n\t    }\n\t    if (len + insertCount - actualDeleteCount > MAX_SAFE_INTEGER$3) {\n\t      throw TypeError$f(MAXIMUM_ALLOWED_LENGTH_EXCEEDED);\n\t    }\n\t    A = arraySpeciesCreate(O, actualDeleteCount);\n\t    for (k = 0; k < actualDeleteCount; k++) {\n\t      from = actualStart + k;\n\t      if (from in O) createProperty(A, k, O[from]);\n\t    }\n\t    A.length = actualDeleteCount;\n\t    if (insertCount < actualDeleteCount) {\n\t      for (k = actualStart; k < len - actualDeleteCount; k++) {\n\t        from = k + actualDeleteCount;\n\t        to = k + insertCount;\n\t        if (from in O) O[to] = O[from];\n\t        else delete O[to];\n\t      }\n\t      for (k = len; k > len - actualDeleteCount + insertCount; k--) delete O[k - 1];\n\t    } else if (insertCount > actualDeleteCount) {\n\t      for (k = len - actualDeleteCount; k > actualStart; k--) {\n\t        from = k + actualDeleteCount - 1;\n\t        to = k + insertCount - 1;\n\t        if (from in O) O[to] = O[from];\n\t        else delete O[to];\n\t      }\n\t    }\n\t    for (k = 0; k < insertCount; k++) {\n\t      O[k + actualStart] = arguments[k + 2];\n\t    }\n\t    O.length = len - actualDeleteCount + insertCount;\n\t    return A;\n\t  }\n\t});\n\n\tvar splice$1 = entryVirtual('Array').splice;\n\n\tvar ArrayPrototype$8 = Array.prototype;\n\n\tvar splice$2 = function (it) {\n\t  var own = it.splice;\n\t  return it === ArrayPrototype$8 || (objectIsPrototypeOf(ArrayPrototype$8, it) && own === ArrayPrototype$8.splice) ? splice$1 : own;\n\t};\n\n\tvar splice$3 = splice$2;\n\n\tvar splice$4 = splice$3;\n\n\t/**\n\t * Copyright (C) 2021 THL A29 Limited, a Tencent company.\n\t *\n\t * Licensed under the Apache License, Version 2.0 (the \"License\");\n\t * you may not use this file except in compliance with the License.\n\t * You may obtain a copy of the License at\n\t *\n\t *     http://www.apache.org/licenses/LICENSE-2.0\n\t *\n\t * Unless required by applicable law or agreed to in writing, software\n\t * distributed under the License is distributed on an \"AS IS\" BASIS,\n\t * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n\t * See the License for the specific language governing permissions and\n\t * limitations under the License.\n\t */\n\n\t/**\n\t * @typedef {import('~types/syntax').HookType} HookType\n\t * @typedef {import('~types/syntax').HookTypesList} HookTypesList\n\t * @typedef {import('~types/syntax').EditorConfig} EditorConfig\n\t * @typedef {import('~types/syntax').HookRegexpRule} HookRegexpRule\n\t */\n\n\t/** @type {boolean} */\n\tvar isMathjaxConfig = false;\n\t/**\n\t * @type {HookTypesList}\n\t */\n\n\tvar HOOKS_TYPE_LIST = {\n\t  SEN: 'sentence',\n\t  PAR: 'paragraph',\n\t  DEFAULT: 'sentence'\n\t};\n\n\tvar SyntaxBase = /*#__PURE__*/function () {\n\t  /**\n\t   * @static\n\t   * @type {string}\n\t   */\n\n\t  /**\n\t   * @static\n\t   * @type {HookType}\n\t   */\n\n\t  /**\n\t   * @protected\n\t   * @type {import('../Engine').default}\n\t   */\n\n\t  /**\n\t   * @constructor\n\t   * @param {Partial<EditorConfig>} editorConfig\n\t   */\n\t  function SyntaxBase(editorConfig) {\n\t    _classCallCheck(this, SyntaxBase);\n\n\t    _defineProperty(this, \"$engine\", void 0);\n\n\t    _defineProperty(this, \"$locale\", void 0);\n\n\t    // editorConfig.pageHooks: 已实例化的页面级hook\n\t    // editorConfig.syntaxOptions: 当前Hook的用户配置\n\t    // editorConfig.externals: 第三方库\n\t    this.RULE = this.rule(editorConfig);\n\t  }\n\n\t  _createClass(SyntaxBase, [{\n\t    key: \"getType\",\n\t    value: function getType() {\n\t      return (\n\t        /** @type {typeof SyntaxBase} */\n\t        this.constructor.HOOK_TYPE || HOOKS_TYPE_LIST.DEFAULT\n\t      );\n\t    }\n\t  }, {\n\t    key: \"getName\",\n\t    value: function getName() {\n\t      return (\n\t        /** @type {typeof SyntaxBase} */\n\t        this.constructor.HOOK_NAME\n\t      );\n\t    }\n\t  }, {\n\t    key: \"afterInit\",\n\t    value: function afterInit(callback) {\n\t      if (typeof callback === 'function') {\n\t        callback();\n\t      }\n\t    }\n\t  }, {\n\t    key: \"setLocale\",\n\t    value: function setLocale(locale) {\n\t      this.$locale = locale;\n\t    }\n\t    /**\n\t     * 生命周期函数\n\t     * @param {string} str 待处理的markdown文本\n\t     * @returns {string} 处理后的文本，一般为html\n\t     */\n\n\t  }, {\n\t    key: \"beforeMakeHtml\",\n\t    value: function beforeMakeHtml(str) {\n\t      return str;\n\t    }\n\t    /**\n\t     * 生命周期函数\n\t     * @param {string} str 待处理的markdown文本\n\t     * @returns {string} 处理后的文本，一般为html\n\t     */\n\n\t  }, {\n\t    key: \"makeHtml\",\n\t    value: function makeHtml(str) {\n\t      return str;\n\t    }\n\t    /**\n\t     * 生命周期函数\n\t     * @param {string} str 待处理的markdown文本\n\t     * @returns {string} 处理后的文本，一般为html\n\t     */\n\n\t  }, {\n\t    key: \"afterMakeHtml\",\n\t    value: function afterMakeHtml(str) {\n\t      return str;\n\t    } // getMakeHtml() {\n\t    //     return this.makeHtml || false;\n\t    // }\n\n\t    /**\n\t     *\n\t     * @param {KeyboardEvent} e 触发事件\n\t     * @param {*} str\n\t     */\n\n\t  }, {\n\t    key: \"onKeyDown\",\n\t    value: function onKeyDown(e, str) {}\n\t  }, {\n\t    key: \"getOnKeyDown\",\n\t    value: function getOnKeyDown() {\n\t      return this.onKeyDown || false;\n\t    }\n\t  }, {\n\t    key: \"getAttributesTest\",\n\t    value: function getAttributesTest() {\n\t      return /^(color|fontSize|font-size|id|title|class|target|underline|line-through|overline|sub|super)$/;\n\t    }\n\t    /**\n\t     *\n\t     * @param {string} attr\n\t     * @param {() => {}} func 回调函数\n\t     */\n\n\t  }, {\n\t    key: \"$testAttributes\",\n\t    value: function $testAttributes(attr, func) {\n\t      if (this.getAttributesTest().test(attr)) {\n\t        func();\n\t      }\n\t    }\n\t    /**\n\t     * 提取属性\n\t     * @param {string} str 待提取字符串\n\t     * @returns {{attrs: Record<string,any>; str: string}}\n\t     */\n\n\t  }, {\n\t    key: \"getAttributes\",\n\t    value: function getAttributes(str) {\n\t      var ret = {\n\t        attrs: {},\n\t        str: str\n\t      }; // if(/(?<=[^\\\\]){([a-zA-Z-]+=[0-9a-z-]+(?=;|\\||}))+}$/.test(str)) {\n\t      //     str.match(/(?<=[^\\\\]){[^\\n]+?}$/)[0]\n\t      //         .match(/([a-zA-Z-]+=[0-9a-z-]+(?=;|\\||}))+/g)\n\t      //         .foreach((one) => {\n\t      //             one = one.split('=');\n\t      //             this._testAttributes(one[0], ()=>{\n\t      //                 ret.attrs[one[0]] = one[1];\n\t      //             });\n\t      //         });\n\t      //     ret.str = str.replace(/(?<=[^\\\\]){[^\\n]+?}$/, '');\n\t      // }\n\n\t      return ret;\n\t    }\n\t  }, {\n\t    key: \"test\",\n\t    value:\n\t    /**\n\t     * 测试输入的字符串是否匹配当前Hook规则\n\t     * @param {string} str 待匹配文本\n\t     * @returns {boolean}\n\t     */\n\t    function test(str) {\n\t      return this.RULE.reg ? this.RULE.reg.test(str) : false;\n\t    }\n\t    /**\n\t     *\n\t     * @param {Partial<EditorConfig>} editorConfig\n\t     * @returns {HookRegexpRule}\n\t     */\n\n\t  }, {\n\t    key: \"rule\",\n\t    value: function rule(editorConfig) {\n\t      return {\n\t        begin: '',\n\t        end: '',\n\t        content: '',\n\t        reg: new RegExp('')\n\t      };\n\t    }\n\t  }, {\n\t    key: \"mounted\",\n\t    value: function mounted() {// console.log('base mounted');\n\t    }\n\t  }], [{\n\t    key: \"getMathJaxConfig\",\n\t    value: function getMathJaxConfig() {\n\t      return isMathjaxConfig;\n\t    }\n\t    /**\n\t     *\n\t     * @param {boolean} version 指定mathJax是否使用MathJax\n\t     */\n\n\t  }, {\n\t    key: \"setMathJaxConfig\",\n\t    value: function setMathJaxConfig(version) {\n\t      isMathjaxConfig = version;\n\t    }\n\t  }]);\n\n\t  return SyntaxBase;\n\t}();\n\n\t_defineProperty(SyntaxBase, \"HOOK_NAME\", 'default');\n\n\t_defineProperty(SyntaxBase, \"HOOK_TYPE\", HOOKS_TYPE_LIST.DEFAULT);\n\n\tvar $map = arrayIteration.map;\n\n\n\tvar HAS_SPECIES_SUPPORT$3 = arrayMethodHasSpeciesSupport('map');\n\n\t// `Array.prototype.map` method\n\t// https://tc39.es/ecma262/#sec-array.prototype.map\n\t// with adding support of @@species\n\t_export({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT$3 }, {\n\t  map: function map(callbackfn /* , thisArg */) {\n\t    return $map(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n\t  }\n\t});\n\n\tvar map = entryVirtual('Array').map;\n\n\tvar ArrayPrototype$9 = Array.prototype;\n\n\tvar map$1 = function (it) {\n\t  var own = it.map;\n\t  return it === ArrayPrototype$9 || (objectIsPrototypeOf(ArrayPrototype$9, it) && own === ArrayPrototype$9.map) ? map : own;\n\t};\n\n\tvar map$2 = map$1;\n\n\tvar map$3 = map$2;\n\n\t/**\n\t * Copyright (C) 2021 THL A29 Limited, a Tencent company.\n\t *\n\t * Licensed under the Apache License, Version 2.0 (the \"License\");\n\t * you may not use this file except in compliance with the License.\n\t * You may obtain a copy of the License at\n\t *\n\t *     http://www.apache.org/licenses/LICENSE-2.0\n\t *\n\t * Unless required by applicable law or agreed to in writing, software\n\t * distributed under the License is distributed on an \"AS IS\" BASIS,\n\t * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n\t * See the License for the specific language governing permissions and\n\t * limitations under the License.\n\t */\n\n\t/**\n\t * 为段落前加换行符\n\t * @param {string} match    匹配全文\n\t * @param {string} processedContent 加入的内容\n\t */\n\tfunction prependLineFeedForParagraph(match, processedContent) {\n\t  var canNestedInList = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n\n\t  if (!/^\\n/.test(match)) {\n\t    return processedContent;\n\t  }\n\n\t  if (canNestedInList) {\n\t    var _match$match$0$length, _match$match, _match$match$;\n\n\t    var leadingLinesCount = (_match$match$0$length = (_match$match = match.match(/^\\n+/g)) === null || _match$match === void 0 ? void 0 : (_match$match$ = _match$match[0]) === null || _match$match$ === void 0 ? void 0 : _match$match$.length) !== null && _match$match$0$length !== void 0 ? _match$match$0$length : 0; // 前置换行符数量大于2时，补充两个换行符，否则只补充一个\n\n\t    if (leadingLinesCount > 1) {\n\t      return \"\\n\\n\".concat(processedContent);\n\t    }\n\n\t    return \"\\n\".concat(processedContent);\n\t  }\n\n\t  return \"\\n\\n\".concat(processedContent);\n\t}\n\t/**\n\t * 计算段落所占行数，必须传入通过 prependLineFeedForParagraph 方法处理后的内容，才能计算准确\n\t * @param {string} preLinesMatch 前置匹配行\n\t * @param {number} contentLines 实际内容行数\n\t */\n\n\tfunction calculateLinesOfParagraph(preLinesMatch, contentLines) {\n\t  var preLineCount = (preLinesMatch.match(/\\n/g) || []).length; // 前置行匹配文本为空，说明是全文开头\n\t  // 非全文开头前面必有两个从 prependLineFeed 方法新增加的换行符\n\n\t  if (preLinesMatch !== '') {\n\t    preLineCount -= 2;\n\t  }\n\n\t  return preLineCount + contentLines;\n\t}\n\n\tvar isArray$8 = isArray$3;\n\n\t/**\n\t * Copyright (C) 2021 THL A29 Limited, a Tencent company.\n\t *\n\t * Licensed under the Apache License, Version 2.0 (the \"License\");\n\t * you may not use this file except in compliance with the License.\n\t * You may obtain a copy of the License at\n\t *\n\t *     http://www.apache.org/licenses/LICENSE-2.0\n\t *\n\t * Unless required by applicable law or agreed to in writing, software\n\t * distributed under the License is distributed on an \"AS IS\" BASIS,\n\t * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n\t * See the License for the specific language governing permissions and\n\t * limitations under the License.\n\t */\n\n\t/**\n\t * 用于lodash.mergeWith的customizer\n\t * @param {any} objValue\n\t * @param {any} srcValue\n\t * @returns\n\t */\n\tfunction customizer(objValue, srcValue) {\n\t  if (isArray$8(srcValue)) {\n\t    return srcValue;\n\t  }\n\t}\n\t/**\n\t * 检查本地有没有值\n\t * @param {string} key\n\t */\n\n\tfunction testKeyInLocal(key) {\n\t  if (typeof localStorage !== 'undefined') {\n\t    return localStorage.getItem(\"cherry-\".concat(key)) !== null;\n\t  }\n\n\t  return false;\n\t}\n\t/**\n\t * 保存是否经典换行\n\t * @param {boolean} isClassicBr\n\t */\n\n\tfunction saveIsClassicBrToLocal(isClassicBr) {\n\t  if (typeof localStorage !== 'undefined') {\n\t    localStorage.setItem('cherry-classicBr', isClassicBr ? 'true' : 'false');\n\t  }\n\t}\n\t/**\n\t * 是否经典换行\n\t */\n\n\tfunction getIsClassicBrFromLocal() {\n\t  var ret = 'false';\n\n\t  if (typeof localStorage !== 'undefined') {\n\t    ret = localStorage.getItem('cherry-classicBr');\n\t  }\n\n\t  return ret === 'true';\n\t}\n\t/**\n\t * 保存当前主题\n\t * @param {string} theme\n\t */\n\n\tfunction saveThemeToLocal(theme) {\n\t  if (typeof localStorage !== 'undefined') {\n\t    localStorage.setItem('cherry-theme', theme);\n\t  }\n\t}\n\t/**\n\t * 获取当前主题\n\t * @returns {string} 主题名\n\t */\n\n\n\tfunction getThemeFromLocal() {\n\t  var fullClass = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n\t  var ret = 'default';\n\n\t  if (typeof localStorage !== 'undefined') {\n\t    var localTheme = localStorage.getItem('cherry-theme');\n\n\t    if (localTheme) {\n\t      ret = localTheme;\n\t    }\n\t  }\n\n\t  return fullClass ? \"theme__\".concat(ret) : ret;\n\t}\n\t/**\n\t * 修改主题\n\t * @param {object} $cherry\n\t * @param {string} theme 如果没有传theme，则从本地缓存里取\n\t */\n\n\tfunction changeTheme($cherry) {\n\t  var theme = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';\n\t  var newTheme = (theme ? theme : getThemeFromLocal()).replace(/^.*theme__/, '');\n\t  var newClass = \" theme__\".concat(newTheme);\n\t  $cherry.wrapperDom.className = $cherry.wrapperDom.className.replace(/ theme__[^ $]+?( |$)/g, '') + newClass;\n\t  $cherry.previewer.getDomContainer().className = $cherry.previewer.getDomContainer().className.replace(/ theme__[^ $]+?( |$)/g, '') + newClass;\n\t  saveThemeToLocal(newTheme);\n\t}\n\n\tvar RangeError$1 = global_1.RangeError;\n\tvar fromCharCode = String.fromCharCode;\n\t// eslint-disable-next-line es-x/no-string-fromcodepoint -- required for testing\n\tvar $fromCodePoint = String.fromCodePoint;\n\tvar join$1 = functionUncurryThis([].join);\n\n\t// length should be 1, old FF problem\n\tvar INCORRECT_LENGTH = !!$fromCodePoint && $fromCodePoint.length != 1;\n\n\t// `String.fromCodePoint` method\n\t// https://tc39.es/ecma262/#sec-string.fromcodepoint\n\t_export({ target: 'String', stat: true, arity: 1, forced: INCORRECT_LENGTH }, {\n\t  // eslint-disable-next-line no-unused-vars -- required for `.length`\n\t  fromCodePoint: function fromCodePoint(x) {\n\t    var elements = [];\n\t    var length = arguments.length;\n\t    var i = 0;\n\t    var code;\n\t    while (length > i) {\n\t      code = +arguments[i++];\n\t      if (toAbsoluteIndex(code, 0x10FFFF) !== code) throw RangeError$1(code + ' is not a valid code point');\n\t      elements[i] = code < 0x10000\n\t        ? fromCharCode(code)\n\t        : fromCharCode(((code -= 0x10000) >> 10) + 0xD800, code % 0x400 + 0xDC00);\n\t    } return join$1(elements, '');\n\t  }\n\t});\n\n\tvar fromCodePoint = path.String.fromCodePoint;\n\n\tvar fromCodePoint$1 = fromCodePoint;\n\n\tvar fromCodePoint$2 = fromCodePoint$1;\n\n\tvar _context, _context2;\n\n\tfunction ownKeys$1(object, enumerableOnly) { var keys = keys$3(object); if (getOwnPropertySymbols$2) { var symbols = getOwnPropertySymbols$2(object); enumerableOnly && (symbols = filter$3(symbols).call(symbols, function (sym) { return getOwnPropertyDescriptor$3(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\n\n\tfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var _context3, _context4; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? forEach$3(_context3 = ownKeys$1(Object(source), !0)).call(_context3, function (key) { _defineProperty(target, key, source[key]); }) : getOwnPropertyDescriptors$2 ? defineProperties$2(target, getOwnPropertyDescriptors$2(source)) : forEach$3(_context4 = ownKeys$1(Object(source))).call(_context4, function (key) { defineProperty$5(target, key, getOwnPropertyDescriptor$3(source, key)); }); } return target; }\n\n\t/**\n\t * Copyright (C) 2021 THL A29 Limited, a Tencent company.\n\t *\n\t * Licensed under the Apache License, Version 2.0 (the \"License\");\n\t * you may not use this file except in compliance with the License.\n\t * You may obtain a copy of the License at\n\t *\n\t *     http://www.apache.org/licenses/LICENSE-2.0\n\t *\n\t * Unless required by applicable law or agreed to in writing, software\n\t * distributed under the License is distributed on an \"AS IS\" BASIS,\n\t * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n\t * See the License for the specific language governing permissions and\n\t * limitations under the License.\n\t */\n\tvar escapeMap = {\n\t  '<': '&lt;',\n\t  '>': '&gt;',\n\t  '&': '&amp;',\n\t  '\"': '&quot;',\n\t  \"'\": '&#x27;'\n\t};\n\tvar unescapeMap = {\n\t  lt: '<',\n\t  gt: '>',\n\t  amp: '&',\n\t  quot: '\"',\n\t  apos: \"'\"\n\t}; // refs: https://www.freeformatter.com/html-entities.html\n\n\tvar ASCIICharacters = {\n\t  34: '&quot;',\n\t  38: '&amp;',\n\t  39: '&apos;',\n\t  60: '&lt;',\n\t  62: '&gt;'\n\t};\n\tvar ISO88591Characters = {\n\t  192: '&Agrave;',\n\t  193: '&Aacute;',\n\t  194: '&Acirc;',\n\t  195: '&Atilde;',\n\t  196: '&Auml;',\n\t  197: '&Aring;',\n\t  198: '&AElig;',\n\t  199: '&Ccedil;',\n\t  200: '&Egrave;',\n\t  201: '&Eacute;',\n\t  202: '&Ecirc;',\n\t  203: '&Euml;',\n\t  204: '&Igrave;',\n\t  205: '&Iacute;',\n\t  206: '&Icirc;',\n\t  207: '&Iuml;',\n\t  208: '&ETH;',\n\t  209: '&Ntilde;',\n\t  210: '&Ograve;',\n\t  211: '&Oacute;',\n\t  212: '&Ocirc;',\n\t  213: '&Otilde;',\n\t  214: '&Ouml;',\n\t  216: '&Oslash;',\n\t  217: '&Ugrave;',\n\t  218: '&Uacute;',\n\t  219: '&Ucirc;',\n\t  220: '&Uuml;',\n\t  221: '&Yacute;',\n\t  222: '&THORN;',\n\t  223: '&szlig;',\n\t  224: '&agrave;',\n\t  225: '&aacute;',\n\t  226: '&acirc;',\n\t  227: '&atilde;',\n\t  228: '&auml;',\n\t  229: '&aring;',\n\t  230: '&aelig;',\n\t  231: '&ccedil;',\n\t  232: '&egrave;',\n\t  233: '&eacute;',\n\t  234: '&ecirc;',\n\t  235: '&euml;',\n\t  236: '&igrave;',\n\t  237: '&iacute;',\n\t  238: '&icirc;',\n\t  239: '&iuml;',\n\t  240: '&eth;',\n\t  241: '&ntilde;',\n\t  242: '&ograve;',\n\t  243: '&oacute;',\n\t  244: '&ocirc;',\n\t  245: '&otilde;',\n\t  246: '&ouml;',\n\t  248: '&oslash;',\n\t  249: '&ugrave;',\n\t  250: '&uacute;',\n\t  251: '&ucirc;',\n\t  252: '&uuml;',\n\t  253: '&yacute;',\n\t  254: '&thorn;',\n\t  255: '&yuml;'\n\t};\n\tvar ISO88591Symbols = {\n\t  160: '&nbsp;',\n\t  161: '&iexcl;',\n\t  162: '&cent;',\n\t  163: '&pound;',\n\t  164: '&curren;',\n\t  165: '&yen;',\n\t  166: '&brvbar;',\n\t  167: '&sect;',\n\t  168: '&uml;',\n\t  169: '&copy;',\n\t  170: '&ordf;',\n\t  171: '&laquo;',\n\t  172: '&not;',\n\t  173: '&shy;',\n\t  174: '&reg;',\n\t  175: '&macr;',\n\t  176: '&deg;',\n\t  177: '&plusmn;',\n\t  178: '&sup2;',\n\t  179: '&sup3;',\n\t  180: '&acute;',\n\t  181: '&micro;',\n\t  182: '&para;',\n\t  184: '&cedil;',\n\t  185: '&sup1;',\n\t  186: '&ordm;',\n\t  187: '&raquo;',\n\t  188: '&frac14;',\n\t  189: '&frac12;',\n\t  190: '&frac34;',\n\t  191: '&iquest;',\n\t  215: '&times;',\n\t  247: '&divide;'\n\t};\n\tvar MathSymbols = {\n\t  8704: '&forall;',\n\t  8706: '&part;',\n\t  8707: '&exist;',\n\t  8709: '&empty;',\n\t  8711: '&nabla;',\n\t  8712: '&isin;',\n\t  8713: '&notin;',\n\t  8715: '&ni;',\n\t  8719: '&prod;',\n\t  8721: '&sum;',\n\t  8722: '&minus;',\n\t  8727: '&lowast;',\n\t  8730: '&radic;',\n\t  8733: '&prop;',\n\t  8734: '&infin;',\n\t  8736: '&ang;',\n\t  8743: '&and;',\n\t  8744: '&or;',\n\t  8745: '&cap;',\n\t  8746: '&cup;',\n\t  8747: '&int;',\n\t  8756: '&there4;',\n\t  8764: '&sim;',\n\t  8773: '&cong;',\n\t  8776: '&asymp;',\n\t  8800: '&ne;',\n\t  8801: '&equiv;',\n\t  8804: '&le;',\n\t  8805: '&ge;',\n\t  8834: '&sub;',\n\t  8835: '&sup;',\n\t  8836: '&nsub;',\n\t  8838: '&sube;',\n\t  8839: '&supe;',\n\t  8853: '&oplus;',\n\t  8855: '&otimes;',\n\t  8869: '&perp;',\n\t  8901: '&sdot;'\n\t};\n\tvar GreekLetters = {\n\t  913: '&Alpha;',\n\t  914: '&Beta;',\n\t  915: '&Gamma;',\n\t  916: '&Delta;',\n\t  917: '&Epsilon;',\n\t  918: '&Zeta;',\n\t  919: '&Eta;',\n\t  920: '&Theta;',\n\t  921: '&Iota;',\n\t  922: '&Kappa;',\n\t  923: '&Lambda;',\n\t  924: '&Mu;',\n\t  925: '&Nu;',\n\t  926: '&Xi;',\n\t  927: '&Omicron;',\n\t  928: '&Pi;',\n\t  929: '&Rho;',\n\t  931: '&Sigma;',\n\t  932: '&Tau;',\n\t  933: '&Upsilon;',\n\t  934: '&Phi;',\n\t  935: '&Chi;',\n\t  936: '&Psi;',\n\t  937: '&Omega;',\n\t  945: '&alpha;',\n\t  946: '&beta;',\n\t  947: '&gamma;',\n\t  948: '&delta;',\n\t  949: '&epsilon;',\n\t  950: '&zeta;',\n\t  951: '&eta;',\n\t  952: '&theta;',\n\t  953: '&iota;',\n\t  954: '&kappa;',\n\t  955: '&lambda;',\n\t  956: '&mu;',\n\t  957: '&nu;',\n\t  958: '&xi;',\n\t  959: '&omicron;',\n\t  960: '&pi;',\n\t  961: '&rho;',\n\t  962: '&sigmaf;',\n\t  963: '&sigma;',\n\t  964: '&tau;',\n\t  965: '&upsilon;',\n\t  966: '&phi;',\n\t  967: '&chi;',\n\t  968: '&psi;',\n\t  969: '&omega;',\n\t  977: '&thetasym;',\n\t  978: '&upsih;',\n\t  982: '&piv;'\n\t};\n\tvar MiscellaneousHTMLEntities = {\n\t  338: '&OElig;',\n\t  339: '&oelig;',\n\t  352: '&Scaron;',\n\t  353: '&scaron;',\n\t  376: '&Yuml;',\n\t  402: '&fnof;',\n\t  710: '&circ;',\n\t  732: '&tilde;',\n\t  8194: '&ensp;',\n\t  8195: '&emsp;',\n\t  8201: '&thinsp;',\n\t  8204: '&zwnj;',\n\t  8205: '&zwj;',\n\t  8206: '&lrm;',\n\t  8207: '&rlm;',\n\t  8211: '&ndash;',\n\t  8212: '&mdash;',\n\t  8216: '&lsquo;',\n\t  8217: '&rsquo;',\n\t  8218: '&sbquo;',\n\t  8220: '&ldquo;',\n\t  8221: '&rdquo;',\n\t  8222: '&bdquo;',\n\t  8224: '&dagger;',\n\t  8225: '&Dagger;',\n\t  8226: '&bull;',\n\t  8230: '&hellip;',\n\t  8240: '&permil;',\n\t  8242: '&prime;',\n\t  8243: '&Prime;',\n\t  8249: '&lsaquo;',\n\t  8250: '&rsaquo;',\n\t  8254: '&oline;',\n\t  8364: '&euro;',\n\t  8482: '&trade;',\n\t  8592: '&larr;',\n\t  8593: '&uarr;',\n\t  8594: '&rarr;',\n\t  8595: '&darr;',\n\t  8596: '&harr;',\n\t  8629: '&crarr;',\n\t  8968: '&lceil;',\n\t  8969: '&rceil;',\n\t  8970: '&lfloor;',\n\t  8971: '&rfloor;',\n\t  9674: '&loz;',\n\t  9824: '&spades;',\n\t  9827: '&clubs;',\n\t  9829: '&hearts;',\n\t  9830: '&diams;'\n\t}; // TODO: 使用whatwg的entities.json\n\n\tvar htmlEntitiesMap = _objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({}, ASCIICharacters), ISO88591Characters), ISO88591Symbols), MathSymbols), GreekLetters), MiscellaneousHTMLEntities);\n\n\tvar htmlEntitiesCodePoint = keys$3(htmlEntitiesMap);\n\n\tvar htmlEntitiesWithoutSemicolon = map$3(htmlEntitiesCodePoint).call(htmlEntitiesCodePoint, function (code) {\n\t  return htmlEntitiesMap[code].replace(/^&(\\w+);$/g, function (match, name) {\n\t    return name.toLowerCase();\n\t  });\n\t});\n\t/**\n\t * 非字符串类型与长度为0的字符串都认为是空串\n\t * @param {any} str 需要判断的字符串\n\t * @returns {boolean}\n\t */\n\n\n\tvar isEmptyString = function isEmptyString(str) {\n\t  return typeof str !== 'string' || str.length <= 0;\n\t};\n\n\tvar isValidStringCodePoint = function isValidStringCodePoint(codePoint) {\n\t  try {\n\t    var string = fromCodePoint$2(codePoint);\n\n\t    return !isEmptyString(string); // 如果转换的为空串，说明CodePoint不合法\n\t  } catch (e) {\n\t    // 转换出错，也是不合法的CodePoint\n\t    return false;\n\t  }\n\t};\n\n\tfunction escapeHTMLEntitiesWithoutSemicolon(content) {\n\t  if (typeof content !== 'string') {\n\t    return '';\n\t  } // 先处理字符实体\n\n\n\t  var namedRegex = /&(\\w+);?/g;\n\t  var escaped = content.replace(namedRegex, function (match, name) {\n\t    // 不在合法列表里的全部转义，无分号的情况也转义\n\t    if (indexOf$8(match).call(match, ';') === -1 || indexOf$8(htmlEntitiesWithoutSemicolon).call(htmlEntitiesWithoutSemicolon, name.toLowerCase()) === -1) {\n\t      return match.replace(/&/g, '&amp;');\n\t    }\n\n\t    return match;\n\t  }); // 处理十进制数字实体，需要防止误匹配16进制\n\n\t  var numericRegex = /&#(?!x)(\\d*);?/gi;\n\t  escaped = escaped.replace(numericRegex, function (match, decimalCodePoint) {\n\t    // 不在合法列表里的全部转义，无分号的情况也转义\n\t    // 且位数不能大于7，否则可能导致溢出: https://spec.commonmark.org/0.29/#decimal-numeric-character\n\t    if (isEmptyString(decimalCodePoint) || indexOf$8(match).call(match, ';') === -1 || decimalCodePoint.lenth > 7 || // Object.keys(htmlEntitiesMap).indexOf(+decimalCodePoint) === -1 ||\n\t    !isValidStringCodePoint(decimalCodePoint)) {\n\t      return match.replace(/&/g, '&amp;');\n\t    }\n\n\t    return match;\n\t  }); // 处理十六进制数字实体\n\n\t  var hexRegex = /&#x([0-9a-f]*);?/gi;\n\t  escaped = escaped.replace(hexRegex, function (match, hexCodePoint) {\n\t    if (isEmptyString(hexCodePoint)) {\n\t      return match.replace(/&/g, '&amp;');\n\t    }\n\n\t    var hexCode = \"0x\".concat(hexCodePoint);\n\n\t    var decimalCodePoint = _parseInt$2(hexCode, 16); // parseInt非数字、不在合法列表里、无分号的情况全部转义\n\t    // 且位数不能大于6: https://spec.commonmark.org/0.29/#hexadecimal-numeric-character\n\n\n\t    if (isNaN(decimalCodePoint) || indexOf$8(match).call(match, ';') === -1 || hexCodePoint.lenth > 6 || // Object.keys(htmlEntitiesMap).indexOf(decimalCodePoint) === -1\n\t    !isValidStringCodePoint(hexCode)) {\n\t      return match.replace(/&/g, '&amp;');\n\t    }\n\n\t    return match;\n\t  });\n\t  return escaped;\n\t}\n\tvar blockNames = ['h1|h2|h3|h4|h5|h6', 'ul|ol|li|dd|dl|dt', 'table|thead|tbody|tfoot|col|colgroup|th|td|tr', 'div|article|section|footer|aside|details|summary|code|audio|video|canvas|figure', 'address|center|cite|p|pre|blockquote|marquee|caption|figcaption|track|source|output|svg'].join('|');\n\tvar inlineNames = ['span|a|link|b|s|i|del|u|em|strong|sup|sub|kbd', 'nav|font|bdi|samp|map|area|small|time|bdo|var|wbr|meter|dfn', 'ruby|rt|rp|mark|q|progress|input|textarea|select|ins'].join('|');\n\tvar inlineBlock = 'br|img|hr';\n\tvar whiteList = new RegExp(concat$5(_context = concat$5(_context2 = \"^(\".concat(blockNames, \"|\")).call(_context2, inlineNames, \"|\")).call(_context, inlineBlock, \")( |$|/)\"), 'i');\n\tfunction escapeHTMLSpecialChar(content, enableQuote) {\n\t  if (typeof content !== 'string') {\n\t    return '';\n\t  }\n\n\t  if (enableQuote) {\n\t    return content.replace(/[<>&]/g, function (_char) {\n\t      return escapeMap[_char] || _char;\n\t    });\n\t  }\n\n\t  return content.replace(/[<>&\"']/g, function (_char2) {\n\t    return escapeMap[_char2] || _char2;\n\t  });\n\t}\n\tfunction unescapeHTMLSpecialChar(content) {\n\t  if (typeof content !== 'string') {\n\t    return '';\n\t  }\n\n\t  return content.replace(/&(\\w+);?/g, function (escaped, name) {\n\t    return unescapeMap[name] || escaped;\n\t  });\n\t}\n\tfunction escapeHTMLSpecialCharOnce(content, enableQuote) {\n\t  if (typeof content !== 'string') {\n\t    return '';\n\t  }\n\n\t  var str = convertHTMLNumberToName(content);\n\t  str = unescapeHTMLSpecialChar(str);\n\t  return escapeHTMLSpecialChar(str, enableQuote);\n\t}\n\tfunction convertHTMLNumberToName(html) {\n\t  var entities = /&#(\\d+);?/g;\n\t  return html.replace(entities, function (match, codePoint) {\n\t    return htmlEntitiesMap[codePoint] || match;\n\t  });\n\t}\n\tfunction unescapeHTMLNumberEntities(html) {\n\t  var entities = /&#(\\d+);?/g;\n\t  return html.replace(entities, function (match, codePoint) {\n\t    try {\n\t      var escaped = fromCodePoint$2(codePoint);\n\n\t      return escaped;\n\t    } catch (e) {\n\t      return match;\n\t    }\n\t  });\n\t}\n\tfunction unescapeHTMLHexEntities(html) {\n\t  var entities = /&#x([0-9a-f]+);?/gi;\n\t  return html.replace(entities, function (match, codePoint) {\n\t    var hexCode = _parseInt$2(\"0x\".concat(codePoint), 16);\n\n\t    try {\n\t      var escaped = fromCodePoint$2(hexCode);\n\n\t      return escaped;\n\t    } catch (e) {\n\t      return match;\n\t    }\n\t  });\n\t}\n\tfunction isValidScheme(url) {\n\t  var regex = /^\\s*([\\w\\W]+?)(?=:)/i;\n\t  var match = unescapeHTMLHexEntities(unescapeHTMLNumberEntities(url)).match(regex);\n\n\t  if (!match) {\n\t    return true;\n\t  }\n\n\t  var SCHEME_BLACKLIST = ['javascript', 'data'];\n\t  var scheme = match[1].replace(/[\\s]/g, ''); // 协议中间可能会出现空白字符绕过检查\n\n\t  if (indexOf$8(SCHEME_BLACKLIST).call(SCHEME_BLACKLIST, scheme.toLowerCase()) !== -1) {\n\t    return false;\n\t  }\n\n\t  return true;\n\t}\n\t/**\n\t * ref: https://stackoverflow.com/questions/9245333/should-encodeuri-ever-be-used\n\t * @param {string} str\n\t */\n\n\tfunction encodeURIOnce(str) {\n\t  return encodeURI(str).replace(/[!'()*]/g, function (_char4) {\n\t    return \"%\".concat(_char4.charCodeAt(0).toString(16));\n\t  }).replace(/%25/g, '%');\n\t}\n\n\tfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = construct$4(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\n\tfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !construct$4) return false; if (construct$4.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(construct$4(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\tvar cacheCounter = 0; // ~~C${cacheCounter}I${cacheIndex}$\n\t// let cacheMap = {};\n\n\tvar ParagraphBase = /*#__PURE__*/function (_SyntaxBase) {\n\t  _inherits(ParagraphBase, _SyntaxBase);\n\n\t  var _super = _createSuper(ParagraphBase);\n\n\t  // 不需要排他的sign前缀，如~~C0I${IN_PARAGRAPH_CACHE_KEY_PREFIX}sign$\n\t  function ParagraphBase() {\n\t    var _this;\n\n\t    var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {\n\t      needCache: false\n\t    },\n\t        needCache = _ref.needCache,\n\t        _ref$defaultCache = _ref.defaultCache,\n\t        defaultCache = _ref$defaultCache === void 0 ? {} : _ref$defaultCache;\n\n\t    _classCallCheck(this, ParagraphBase);\n\n\t    _this = _super.call(this, {});\n\t    _this.needCache = !!needCache;\n\t    _this.sign = '';\n\n\t    if (needCache) {\n\t      _this.cache = defaultCache || {};\n\t      _this.cacheKey = \"~~C\".concat(cacheCounter);\n\t      cacheCounter += 1;\n\t    }\n\n\t    return _this;\n\t  }\n\n\t  _createClass(ParagraphBase, [{\n\t    key: \"initBrReg\",\n\t    value: function initBrReg() {\n\t      var classicBr = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n\t      // 是否启用经典换行逻辑\n\t      // true：一个换行会被忽略，两个以上连续换行会分割成段落，\n\t      // false： 一个换行会转成<br>，两个连续换行会分割成段落，三个以上连续换行会转成<br>并分割段落\n\t      this.classicBr = testKeyInLocal('classicBr') ? getIsClassicBrFromLocal() : classicBr;\n\t      this.removeBrAfterBlock = null;\n\t      this.removeBrBeforeBlock = null;\n\t      this.removeNewlinesBetweenTags = null;\n\t    }\n\t    /**\n\t     * 处理经典换行问题\n\t     * @param {string} str markdown源码\n\t     * @returns markdown源码\n\t     */\n\n\t  }, {\n\t    key: \"$cleanParagraph\",\n\t    value: function $cleanParagraph(str) {\n\t      // remove leading and trailing newlines\n\t      var trimedPar = str.replace(/^\\n+/, '').replace(/\\n+$/, '');\n\n\t      if (this.classicBr) {\n\t        return trimedPar;\n\t      }\n\n\t      var minifiedPar = this.joinRawHtml(trimedPar);\n\t      return minifiedPar.replace(/\\n/g, '<br>').replace(/\\r/g, '\\n'); // recover \\n from \\r\n\t    }\n\t    /**\n\t     * remove all newlines in html text\n\t     *\n\t     * @param {string} textContainsHtml\n\t     */\n\n\t  }, {\n\t    key: \"joinRawHtml\",\n\t    value: function joinRawHtml(textContainsHtml) {\n\t      if (!this.removeBrAfterBlock) {\n\t        var _this$$engine$htmlWhi, _this$$engine$htmlWhi2, _context, _context2;\n\n\t        // preprocess custom white list\n\t        var customTagWhiteList = (_this$$engine$htmlWhi = (_this$$engine$htmlWhi2 = this.$engine.htmlWhiteListAppend) === null || _this$$engine$htmlWhi2 === void 0 ? void 0 : _this$$engine$htmlWhi2.split('|')) !== null && _this$$engine$htmlWhi !== void 0 ? _this$$engine$htmlWhi : [];\n\t        customTagWhiteList = filter$3(_context = map$3(customTagWhiteList).call(customTagWhiteList, function (tag) {\n\t          if (/[a-z-]+/gi.test(tag)) {\n\t            return tag;\n\t          }\n\n\t          return null;\n\t        })).call(_context, function (tag) {\n\t          return tag !== null;\n\t        }); // concat all white list\n\n\t        var allBlockNames = concat$5(customTagWhiteList).call(customTagWhiteList, blockNames).join('|'); // 段落标签自然换行，所以去掉段落标签两边的换行符\n\n\t        /**\n\t         * remove newlines after start tag, and remove whitespaces before newline\n\t         * e.g.\n\t         * <p> \\n  text</p> => <p>  text</p>\n\t         *  ^^\n\t         * $1$2\n\t         */\n\n\n\t        this.removeBrAfterBlock = new RegExp(\"<(\".concat(allBlockNames, \")(>| [^>]*?>)[^\\\\S\\\\n]*?\\\\n\"), 'ig');\n\t        /**\n\t         * remove newlines before end tag, and whitespaces before end tag will be preserved\n\t         * e.g.\n\t         * <p>  text\\n  </p> => <p>  text  </p>\n\t         *                ^\n\t         *               $1\n\t         */\n\n\t        this.removeBrBeforeBlock = new RegExp(\"\\\\n[^\\\\S\\\\n]*?<\\\\/(\".concat(allBlockNames, \")>[^\\\\S\\\\n]*?\\\\n\"), 'ig');\n\t        /**\n\t         * remove newlines between end tag & start tag\n\t         * e.g.\n\t         * </p> \\n  <p   foo=\"bar\"> => </p>\\r  <p foo=\"bar\">\n\t         *   ^    ^^ ^ ^^^^^^^^^^^^\n\t         *  $1    $2 $3  $4\n\t         */\n\n\t        this.removeNewlinesBetweenTags = new RegExp(concat$5(_context2 = \"<\\\\/(\".concat(allBlockNames, \")>[^\\\\S\\\\n]*?\\\\n([^\\\\S\\\\n]*?)<(\")).call(_context2, allBlockNames, \")(>| [^>]*?>)\"), 'ig');\n\t      }\n\n\t      return textContainsHtml.replace(this.removeBrAfterBlock, '<$1$2').replace(this.removeBrBeforeBlock, '</$1>').replace(this.removeNewlinesBetweenTags, '</$1>\\r$2<$3$4'); // replace \\n to \\r\n\t    }\n\t  }, {\n\t    key: \"toHtml\",\n\t    value: function toHtml(str, sentenceMakeFunc) {\n\t      return str;\n\t    }\n\t  }, {\n\t    key: \"makeHtml\",\n\t    value: function makeHtml(str, sentenceMakeFunc) {\n\t      return sentenceMakeFunc(str).html;\n\t    }\n\t  }, {\n\t    key: \"afterMakeHtml\",\n\t    value: function afterMakeHtml(html) {\n\t      return this.restoreCache(html);\n\t    }\n\t  }, {\n\t    key: \"isContainsCache\",\n\t    value: function isContainsCache(str, fullMatch) {\n\t      if (fullMatch) {\n\t        // 如果是全匹配：不能包含CherryINPRAGRAPH\n\t        var containsParagraphCache = /^(\\s*~~C\\d+I\\w+\\$\\s*)+$/g.test(str);\n\t        var containsInParagraphCache = new RegExp(\"~~C\\\\d+I\".concat(ParagraphBase.IN_PARAGRAPH_CACHE_KEY_PREFIX_REGEX, \"\\\\w+\\\\$\"), 'g').test(str);\n\t        return containsParagraphCache && !containsInParagraphCache;\n\t      } // 如果是局部匹配： 不能只包含CherryINPRAGRAPH\n\t      // const containsParagraphCache = /~~C\\d+I\\w+\\$/g.test(str);\n\t      // const containsInParagraphCache = new RegExp(\n\t      //    `~~C\\\\d+I${ParagraphBase.IN_PARAGRAPH_CACHE_KEY_PREFIX}\\\\w+\\\\$`, 'g').test(str);\n\n\n\t      var containsNonInParagraphCache = new RegExp(\"~~C\\\\d+I(?!\".concat(ParagraphBase.IN_PARAGRAPH_CACHE_KEY_PREFIX_REGEX, \")\\\\w+\\\\$\"), 'g').test(str);\n\t      return containsNonInParagraphCache; // return fullMatch ?\n\t      //    /^(\\s*~~C\\d+I\\w+\\$\\s*)+$/g.test(str) && !/^(\\s*~~C\\d+ICherryINPRAGRAPH\\w+\\$\\s*)+$/g.test(str) :\n\t      //    /~~C\\d+I\\w+\\$/g.test(str) && !(/~~C\\d+ICherryINPRAGRAPH\\w+\\$/g.test(str)\n\t      //        && !/~~C\\d+I(?!CherryINPRAGRAPH)\\w+\\$/g.test(str));\n\t    }\n\t    /**\n\t     *\n\t     * @param {string} html\n\t     * @return\n\t     */\n\n\t  }, {\n\t    key: \"$splitHtmlByCache\",\n\t    value: function $splitHtmlByCache(html) {\n\t      // ~~C0I(?!prefix)sign$\n\t      var regex = new RegExp(\"\\\\n*~~C\\\\d+I(?!\".concat(ParagraphBase.IN_PARAGRAPH_CACHE_KEY_PREFIX_REGEX, \")\\\\w+\\\\$\\\\n?\"), 'g');\n\t      return {\n\t        caches: html.match(regex),\n\t        contents: html.split(regex)\n\t      };\n\t    }\n\t  }, {\n\t    key: \"makeExcludingCached\",\n\t    value: function makeExcludingCached(content, processor) {\n\t      var _this$$splitHtmlByCac = this.$splitHtmlByCache(content),\n\t          caches = _this$$splitHtmlByCac.caches,\n\t          contents = _this$$splitHtmlByCac.contents;\n\n\t      var paragraphs = map$3(contents).call(contents, processor);\n\n\t      var ret = '';\n\n\t      for (var i = 0; i < paragraphs.length; i++) {\n\t        ret += paragraphs[i];\n\n\t        if (caches && caches[i]) {\n\t          var _context3;\n\n\t          ret += trim$3(_context3 = caches[i]).call(_context3);\n\t        }\n\t      }\n\n\t      return ret;\n\t    }\n\t    /**\n\t     * 获取非捕获匹配丢掉的换行，适用于能被【嵌套】的段落语法\n\t     *\n\t     * @param {string} cache 需要返回的cache\n\t     * @param {string} md 原始的md字符串\n\t     * @param {boolean} alwaysAlone 是否能被【嵌套】，true：不能被嵌套，如标题、注释等；false：能被嵌套，如代码块、有序列表等\n\t     * @return {string} str\n\t     */\n\n\t  }, {\n\t    key: \"getCacheWithSpace\",\n\t    value: function getCacheWithSpace(cache, md) {\n\t      var _md$match$, _md$match, _md$match$2, _md$match2, _context4, _context5;\n\n\t      var alwaysAlone = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n\t      var preSpace = (_md$match$ = (_md$match = md.match(/^\\n+/)) === null || _md$match === void 0 ? void 0 : _md$match[0]) !== null && _md$match$ !== void 0 ? _md$match$ : '';\n\t      var afterSpace = (_md$match$2 = (_md$match2 = md.match(/\\n+$/)) === null || _md$match2 === void 0 ? void 0 : _md$match2[0]) !== null && _md$match$2 !== void 0 ? _md$match$2 : '';\n\n\t      if (alwaysAlone) {\n\t        return prependLineFeedForParagraph(md, cache);\n\t      }\n\n\t      return concat$5(_context4 = concat$5(_context5 = \"\".concat(preSpace)).call(_context5, cache)).call(_context4, afterSpace);\n\t    }\n\t    /**\n\t     * 获取行号，只负责向上计算\\n\n\t     * 会计算cache的行号\n\t     *\n\t     * @param {string} md md内容\n\t     * @param {string} preSpace 前置换行\n\t     * @return {number} 行数\n\t     */\n\n\t  }, {\n\t    key: \"getLineCount\",\n\t    value: function getLineCount(md) {\n\t      var _preSpace$match$0$len, _preSpace$match, _preSpace$match$;\n\n\t      var preSpace = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';\n\t      var content = md;\n\t      /**\n\t       * 前置换行个数，【注意】：前置换行个数不包括上文的最后一个\\n\n\t       *    例：\n\t       *      - aa\\n\n\t       *      - bb\\n\n\t       *      \\n\n\t       *      cc\\n\n\t       *\n\t       *    cc的前置换行个数为 1，bb后的\\n不计算在内\n\t       *    cc的正则为：/(?:^|\\n)(\\n*)xxxxxx/\n\t       */\n\n\t      var preLineCount = (_preSpace$match$0$len = (_preSpace$match = preSpace.match(/^\\n+/g)) === null || _preSpace$match === void 0 ? void 0 : (_preSpace$match$ = _preSpace$match[0]) === null || _preSpace$match$ === void 0 ? void 0 : _preSpace$match$.length) !== null && _preSpace$match$0$len !== void 0 ? _preSpace$match$0$len : 0;\n\t      preLineCount = preLineCount === 1 ? 1 : 0; // 前置换行超过2个就交给BR进行渲染\n\n\t      content = content.replace(/^\\n+/g, '');\n\t      var regex = new RegExp(\"\\n*~~C\\\\d+I(?:\".concat(ParagraphBase.IN_PARAGRAPH_CACHE_KEY_PREFIX_REGEX, \")?\\\\w+?_L(\\\\d+)\\\\$\"), 'g');\n\t      var cacheLineCount = 0;\n\t      content = content.replace(regex, function (match, lineCount) {\n\t        cacheLineCount += _parseInt$2(lineCount, 10);\n\t        return match.replace(/^\\n+/g, '');\n\t      });\n\t      return preLineCount + cacheLineCount + (content.match(/\\n/g) || []).length + 1; // 实际内容所占行数，至少为1行\n\t    }\n\t    /**\n\t     *\n\t     * @param {string} str 渲染后的内容\n\t     * @param {string} sign 签名\n\t     * @param {number} lineCount md原文的行数\n\t     * @return {string} cacheKey ~~C0I0_L1$\n\t     */\n\n\t  }, {\n\t    key: \"pushCache\",\n\t    value: function pushCache(str) {\n\t      var _context6, _context7;\n\n\t      var sign = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';\n\t      var lineCount = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;\n\n\t      if (!this.needCache) {\n\t        return;\n\t      }\n\n\t      var $sign = sign || this.$engine.md5(str);\n\t      this.cache[$sign] = {\n\t        content: str,\n\t        using: true\n\t      };\n\t      return concat$5(_context6 = concat$5(_context7 = \"\".concat(this.cacheKey, \"I\")).call(_context7, $sign, \"_L\")).call(_context6, lineCount, \"$\");\n\t    }\n\t  }, {\n\t    key: \"popCache\",\n\t    value: function popCache(sign) {\n\t      if (!this.needCache) {\n\t        return;\n\t      }\n\n\t      return this.cache[sign].content || '';\n\t    }\n\t  }, {\n\t    key: \"resetCache\",\n\t    value: function resetCache() {\n\t      if (!this.needCache) {\n\t        return;\n\t      }\n\n\t      for (var _i = 0, _Object$keys = keys$3(this.cache); _i < _Object$keys.length; _i++) {\n\t        var key = _Object$keys[_i];\n\t        if (!this.cache[key].using) delete this.cache[key];\n\t      }\n\n\t      for (var _i2 = 0, _Object$keys3 = keys$3(this.cache); _i2 < _Object$keys3.length; _i2++) {\n\t        var _key = _Object$keys3[_i2];\n\t        this.cache[_key].using = false;\n\t      }\n\t    }\n\t  }, {\n\t    key: \"restoreCache\",\n\t    value: function restoreCache(html) {\n\t      var _context8,\n\t          _this2 = this;\n\n\t      // restore cached content\n\t      if (!this.needCache) {\n\t        return html;\n\t      }\n\n\t      var regex = new RegExp(concat$5(_context8 = \"\".concat(this.cacheKey, \"I((?:\")).call(_context8, ParagraphBase.IN_PARAGRAPH_CACHE_KEY_PREFIX_REGEX, \")?\\\\w+)\\\\$\"), 'g');\n\t      var $html = html.replace(regex, function (match, cacheSign) {\n\t        return _this2.popCache(cacheSign.replace(/_L\\d+$/, ''));\n\t      });\n\t      this.resetCache();\n\t      return $html;\n\t    }\n\t    /**\n\t     *\n\t     * @param {string} wholeMatch whole match\n\t     */\n\n\t  }, {\n\t    key: \"checkCache\",\n\t    value: function checkCache(wholeMatch, sentenceMakeFunc) {\n\t      var _context9, _context10;\n\n\t      var lineCount = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;\n\t      this.sign = this.$engine.md5(wholeMatch); // miss cache\n\n\t      if (!this.cache[this.sign]) {\n\t        return this.toHtml(wholeMatch, sentenceMakeFunc);\n\t      } // hit & mark cache\n\n\n\t      this.cache[this.sign].using = true;\n\t      return concat$5(_context9 = concat$5(_context10 = \"\".concat(this.cacheKey, \"I\")).call(_context10, this.sign, \"_L\")).call(_context9, lineCount, \"$\");\n\t    }\n\t  }, {\n\t    key: \"mounted\",\n\t    value: function mounted() {// console.log('base mounted');\n\t    }\n\t  }, {\n\t    key: \"signWithCache\",\n\t    value: function signWithCache(html) {\n\t      return false;\n\t    }\n\t  }]);\n\n\t  return ParagraphBase;\n\t}(SyntaxBase);\n\n\t_defineProperty(ParagraphBase, \"HOOK_TYPE\", HOOKS_TYPE_LIST.PAR);\n\n\t_defineProperty(ParagraphBase, \"IN_PARAGRAPH_CACHE_KEY_PREFIX\", '!');\n\n\t_defineProperty(ParagraphBase, \"IN_PARAGRAPH_CACHE_KEY_PREFIX_REGEX\", '\\\\!');\n\n\t// FF26- bug: ArrayBuffers are non-extensible, but Object.isExtensible does not report it\n\n\n\tvar arrayBufferNonExtensible = fails(function () {\n\t  if (typeof ArrayBuffer == 'function') {\n\t    var buffer = new ArrayBuffer(8);\n\t    // eslint-disable-next-line es-x/no-object-isextensible, es-x/no-object-defineproperty -- safe\n\t    if (Object.isExtensible(buffer)) Object.defineProperty(buffer, 'a', { value: 8 });\n\t  }\n\t});\n\n\t// eslint-disable-next-line es-x/no-object-isextensible -- safe\n\tvar $isExtensible = Object.isExtensible;\n\tvar FAILS_ON_PRIMITIVES$3 = fails(function () { $isExtensible(1); });\n\n\t// `Object.isExtensible` method\n\t// https://tc39.es/ecma262/#sec-object.isextensible\n\tvar objectIsExtensible = (FAILS_ON_PRIMITIVES$3 || arrayBufferNonExtensible) ? function isExtensible(it) {\n\t  if (!isObject(it)) return false;\n\t  if (arrayBufferNonExtensible && classofRaw(it) == 'ArrayBuffer') return false;\n\t  return $isExtensible ? $isExtensible(it) : true;\n\t} : $isExtensible;\n\n\tvar freezing = !fails(function () {\n\t  // eslint-disable-next-line es-x/no-object-isextensible, es-x/no-object-preventextensions -- required for testing\n\t  return Object.isExtensible(Object.preventExtensions({}));\n\t});\n\n\tvar internalMetadata = createCommonjsModule(function (module) {\n\tvar defineProperty = objectDefineProperty.f;\n\n\n\n\n\n\n\tvar REQUIRED = false;\n\tvar METADATA = uid('meta');\n\tvar id = 0;\n\n\tvar setMetadata = function (it) {\n\t  defineProperty(it, METADATA, { value: {\n\t    objectID: 'O' + id++, // object ID\n\t    weakData: {}          // weak collections IDs\n\t  } });\n\t};\n\n\tvar fastKey = function (it, create) {\n\t  // return a primitive with prefix\n\t  if (!isObject(it)) return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it;\n\t  if (!hasOwnProperty_1(it, METADATA)) {\n\t    // can't set metadata to uncaught frozen object\n\t    if (!objectIsExtensible(it)) return 'F';\n\t    // not necessary to add metadata\n\t    if (!create) return 'E';\n\t    // add missing metadata\n\t    setMetadata(it);\n\t  // return object ID\n\t  } return it[METADATA].objectID;\n\t};\n\n\tvar getWeakData = function (it, create) {\n\t  if (!hasOwnProperty_1(it, METADATA)) {\n\t    // can't set metadata to uncaught frozen object\n\t    if (!objectIsExtensible(it)) return true;\n\t    // not necessary to add metadata\n\t    if (!create) return false;\n\t    // add missing metadata\n\t    setMetadata(it);\n\t  // return the store of weak collections IDs\n\t  } return it[METADATA].weakData;\n\t};\n\n\t// add metadata on freeze-family methods calling\n\tvar onFreeze = function (it) {\n\t  if (freezing && REQUIRED && objectIsExtensible(it) && !hasOwnProperty_1(it, METADATA)) setMetadata(it);\n\t  return it;\n\t};\n\n\tvar enable = function () {\n\t  meta.enable = function () { /* empty */ };\n\t  REQUIRED = true;\n\t  var getOwnPropertyNames = objectGetOwnPropertyNames.f;\n\t  var splice = functionUncurryThis([].splice);\n\t  var test = {};\n\t  test[METADATA] = 1;\n\n\t  // prevent exposing of metadata key\n\t  if (getOwnPropertyNames(test).length) {\n\t    objectGetOwnPropertyNames.f = function (it) {\n\t      var result = getOwnPropertyNames(it);\n\t      for (var i = 0, length = result.length; i < length; i++) {\n\t        if (result[i] === METADATA) {\n\t          splice(result, i, 1);\n\t          break;\n\t        }\n\t      } return result;\n\t    };\n\n\t    _export({ target: 'Object', stat: true, forced: true }, {\n\t      getOwnPropertyNames: objectGetOwnPropertyNamesExternal.f\n\t    });\n\t  }\n\t};\n\n\tvar meta = module.exports = {\n\t  enable: enable,\n\t  fastKey: fastKey,\n\t  getWeakData: getWeakData,\n\t  onFreeze: onFreeze\n\t};\n\n\thiddenKeys[METADATA] = true;\n\t});\n\tvar internalMetadata_1 = internalMetadata.enable;\n\tvar internalMetadata_2 = internalMetadata.fastKey;\n\tvar internalMetadata_3 = internalMetadata.getWeakData;\n\tvar internalMetadata_4 = internalMetadata.onFreeze;\n\n\tvar TypeError$g = global_1.TypeError;\n\n\tvar Result = function (stopped, result) {\n\t  this.stopped = stopped;\n\t  this.result = result;\n\t};\n\n\tvar ResultPrototype = Result.prototype;\n\n\tvar iterate = function (iterable, unboundFunction, options) {\n\t  var that = options && options.that;\n\t  var AS_ENTRIES = !!(options && options.AS_ENTRIES);\n\t  var IS_ITERATOR = !!(options && options.IS_ITERATOR);\n\t  var INTERRUPTED = !!(options && options.INTERRUPTED);\n\t  var fn = functionBindContext(unboundFunction, that);\n\t  var iterator, iterFn, index, length, result, next, step;\n\n\t  var stop = function (condition) {\n\t    if (iterator) iteratorClose(iterator, 'normal', condition);\n\t    return new Result(true, condition);\n\t  };\n\n\t  var callFn = function (value) {\n\t    if (AS_ENTRIES) {\n\t      anObject(value);\n\t      return INTERRUPTED ? fn(value[0], value[1], stop) : fn(value[0], value[1]);\n\t    } return INTERRUPTED ? fn(value, stop) : fn(value);\n\t  };\n\n\t  if (IS_ITERATOR) {\n\t    iterator = iterable;\n\t  } else {\n\t    iterFn = getIteratorMethod(iterable);\n\t    if (!iterFn) throw TypeError$g(tryToString(iterable) + ' is not iterable');\n\t    // optimisation for array iterators\n\t    if (isArrayIteratorMethod(iterFn)) {\n\t      for (index = 0, length = lengthOfArrayLike(iterable); length > index; index++) {\n\t        result = callFn(iterable[index]);\n\t        if (result && objectIsPrototypeOf(ResultPrototype, result)) return result;\n\t      } return new Result(false);\n\t    }\n\t    iterator = getIterator(iterable, iterFn);\n\t  }\n\n\t  next = iterator.next;\n\t  while (!(step = functionCall(next, iterator)).done) {\n\t    try {\n\t      result = callFn(step.value);\n\t    } catch (error) {\n\t      iteratorClose(iterator, 'throw', error);\n\t    }\n\t    if (typeof result == 'object' && result && objectIsPrototypeOf(ResultPrototype, result)) return result;\n\t  } return new Result(false);\n\t};\n\n\tvar TypeError$h = global_1.TypeError;\n\n\tvar anInstance = function (it, Prototype) {\n\t  if (objectIsPrototypeOf(Prototype, it)) return it;\n\t  throw TypeError$h('Incorrect invocation');\n\t};\n\n\tvar defineProperty$d = objectDefineProperty.f;\n\tvar forEach$4 = arrayIteration.forEach;\n\n\n\n\tvar setInternalState$3 = internalState.set;\n\tvar internalStateGetterFor = internalState.getterFor;\n\n\tvar collection = function (CONSTRUCTOR_NAME, wrapper, common) {\n\t  var IS_MAP = CONSTRUCTOR_NAME.indexOf('Map') !== -1;\n\t  var IS_WEAK = CONSTRUCTOR_NAME.indexOf('Weak') !== -1;\n\t  var ADDER = IS_MAP ? 'set' : 'add';\n\t  var NativeConstructor = global_1[CONSTRUCTOR_NAME];\n\t  var NativePrototype = NativeConstructor && NativeConstructor.prototype;\n\t  var exported = {};\n\t  var Constructor;\n\n\t  if (!descriptors || !isCallable(NativeConstructor)\n\t    || !(IS_WEAK || NativePrototype.forEach && !fails(function () { new NativeConstructor().entries().next(); }))\n\t  ) {\n\t    // create collection constructor\n\t    Constructor = common.getConstructor(wrapper, CONSTRUCTOR_NAME, IS_MAP, ADDER);\n\t    internalMetadata.enable();\n\t  } else {\n\t    Constructor = wrapper(function (target, iterable) {\n\t      setInternalState$3(anInstance(target, Prototype), {\n\t        type: CONSTRUCTOR_NAME,\n\t        collection: new NativeConstructor()\n\t      });\n\t      if (iterable != undefined) iterate(iterable, target[ADDER], { that: target, AS_ENTRIES: IS_MAP });\n\t    });\n\n\t    var Prototype = Constructor.prototype;\n\n\t    var getInternalState = internalStateGetterFor(CONSTRUCTOR_NAME);\n\n\t    forEach$4(['add', 'clear', 'delete', 'forEach', 'get', 'has', 'set', 'keys', 'values', 'entries'], function (KEY) {\n\t      var IS_ADDER = KEY == 'add' || KEY == 'set';\n\t      if (KEY in NativePrototype && !(IS_WEAK && KEY == 'clear')) {\n\t        createNonEnumerableProperty(Prototype, KEY, function (a, b) {\n\t          var collection = getInternalState(this).collection;\n\t          if (!IS_ADDER && IS_WEAK && !isObject(a)) return KEY == 'get' ? undefined : false;\n\t          var result = collection[KEY](a === 0 ? 0 : a, b);\n\t          return IS_ADDER ? this : result;\n\t        });\n\t      }\n\t    });\n\n\t    IS_WEAK || defineProperty$d(Prototype, 'size', {\n\t      configurable: true,\n\t      get: function () {\n\t        return getInternalState(this).collection.size;\n\t      }\n\t    });\n\t  }\n\n\t  setToStringTag(Constructor, CONSTRUCTOR_NAME, false, true);\n\n\t  exported[CONSTRUCTOR_NAME] = Constructor;\n\t  _export({ global: true, forced: true }, exported);\n\n\t  if (!IS_WEAK) common.setStrong(Constructor, CONSTRUCTOR_NAME, IS_MAP);\n\n\t  return Constructor;\n\t};\n\n\tvar defineBuiltIns = function (target, src, options) {\n\t  for (var key in src) {\n\t    if (options && options.unsafe && target[key]) target[key] = src[key];\n\t    else defineBuiltIn(target, key, src[key], options);\n\t  } return target;\n\t};\n\n\tvar SPECIES$3 = wellKnownSymbol('species');\n\n\tvar setSpecies = function (CONSTRUCTOR_NAME) {\n\t  var Constructor = getBuiltIn(CONSTRUCTOR_NAME);\n\t  var defineProperty = objectDefineProperty.f;\n\n\t  if (descriptors && Constructor && !Constructor[SPECIES$3]) {\n\t    defineProperty(Constructor, SPECIES$3, {\n\t      configurable: true,\n\t      get: function () { return this; }\n\t    });\n\t  }\n\t};\n\n\tvar defineProperty$e = objectDefineProperty.f;\n\n\n\n\n\n\n\n\n\tvar fastKey = internalMetadata.fastKey;\n\n\n\tvar setInternalState$4 = internalState.set;\n\tvar internalStateGetterFor$1 = internalState.getterFor;\n\n\tvar collectionStrong = {\n\t  getConstructor: function (wrapper, CONSTRUCTOR_NAME, IS_MAP, ADDER) {\n\t    var Constructor = wrapper(function (that, iterable) {\n\t      anInstance(that, Prototype);\n\t      setInternalState$4(that, {\n\t        type: CONSTRUCTOR_NAME,\n\t        index: objectCreate(null),\n\t        first: undefined,\n\t        last: undefined,\n\t        size: 0\n\t      });\n\t      if (!descriptors) that.size = 0;\n\t      if (iterable != undefined) iterate(iterable, that[ADDER], { that: that, AS_ENTRIES: IS_MAP });\n\t    });\n\n\t    var Prototype = Constructor.prototype;\n\n\t    var getInternalState = internalStateGetterFor$1(CONSTRUCTOR_NAME);\n\n\t    var define = function (that, key, value) {\n\t      var state = getInternalState(that);\n\t      var entry = getEntry(that, key);\n\t      var previous, index;\n\t      // change existing entry\n\t      if (entry) {\n\t        entry.value = value;\n\t      // create new entry\n\t      } else {\n\t        state.last = entry = {\n\t          index: index = fastKey(key, true),\n\t          key: key,\n\t          value: value,\n\t          previous: previous = state.last,\n\t          next: undefined,\n\t          removed: false\n\t        };\n\t        if (!state.first) state.first = entry;\n\t        if (previous) previous.next = entry;\n\t        if (descriptors) state.size++;\n\t        else that.size++;\n\t        // add to index\n\t        if (index !== 'F') state.index[index] = entry;\n\t      } return that;\n\t    };\n\n\t    var getEntry = function (that, key) {\n\t      var state = getInternalState(that);\n\t      // fast case\n\t      var index = fastKey(key);\n\t      var entry;\n\t      if (index !== 'F') return state.index[index];\n\t      // frozen object case\n\t      for (entry = state.first; entry; entry = entry.next) {\n\t        if (entry.key == key) return entry;\n\t      }\n\t    };\n\n\t    defineBuiltIns(Prototype, {\n\t      // `{ Map, Set }.prototype.clear()` methods\n\t      // https://tc39.es/ecma262/#sec-map.prototype.clear\n\t      // https://tc39.es/ecma262/#sec-set.prototype.clear\n\t      clear: function clear() {\n\t        var that = this;\n\t        var state = getInternalState(that);\n\t        var data = state.index;\n\t        var entry = state.first;\n\t        while (entry) {\n\t          entry.removed = true;\n\t          if (entry.previous) entry.previous = entry.previous.next = undefined;\n\t          delete data[entry.index];\n\t          entry = entry.next;\n\t        }\n\t        state.first = state.last = undefined;\n\t        if (descriptors) state.size = 0;\n\t        else that.size = 0;\n\t      },\n\t      // `{ Map, Set }.prototype.delete(key)` methods\n\t      // https://tc39.es/ecma262/#sec-map.prototype.delete\n\t      // https://tc39.es/ecma262/#sec-set.prototype.delete\n\t      'delete': function (key) {\n\t        var that = this;\n\t        var state = getInternalState(that);\n\t        var entry = getEntry(that, key);\n\t        if (entry) {\n\t          var next = entry.next;\n\t          var prev = entry.previous;\n\t          delete state.index[entry.index];\n\t          entry.removed = true;\n\t          if (prev) prev.next = next;\n\t          if (next) next.previous = prev;\n\t          if (state.first == entry) state.first = next;\n\t          if (state.last == entry) state.last = prev;\n\t          if (descriptors) state.size--;\n\t          else that.size--;\n\t        } return !!entry;\n\t      },\n\t      // `{ Map, Set }.prototype.forEach(callbackfn, thisArg = undefined)` methods\n\t      // https://tc39.es/ecma262/#sec-map.prototype.foreach\n\t      // https://tc39.es/ecma262/#sec-set.prototype.foreach\n\t      forEach: function forEach(callbackfn /* , that = undefined */) {\n\t        var state = getInternalState(this);\n\t        var boundFunction = functionBindContext(callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n\t        var entry;\n\t        while (entry = entry ? entry.next : state.first) {\n\t          boundFunction(entry.value, entry.key, this);\n\t          // revert to the last existing entry\n\t          while (entry && entry.removed) entry = entry.previous;\n\t        }\n\t      },\n\t      // `{ Map, Set}.prototype.has(key)` methods\n\t      // https://tc39.es/ecma262/#sec-map.prototype.has\n\t      // https://tc39.es/ecma262/#sec-set.prototype.has\n\t      has: function has(key) {\n\t        return !!getEntry(this, key);\n\t      }\n\t    });\n\n\t    defineBuiltIns(Prototype, IS_MAP ? {\n\t      // `Map.prototype.get(key)` method\n\t      // https://tc39.es/ecma262/#sec-map.prototype.get\n\t      get: function get(key) {\n\t        var entry = getEntry(this, key);\n\t        return entry && entry.value;\n\t      },\n\t      // `Map.prototype.set(key, value)` method\n\t      // https://tc39.es/ecma262/#sec-map.prototype.set\n\t      set: function set(key, value) {\n\t        return define(this, key === 0 ? 0 : key, value);\n\t      }\n\t    } : {\n\t      // `Set.prototype.add(value)` method\n\t      // https://tc39.es/ecma262/#sec-set.prototype.add\n\t      add: function add(value) {\n\t        return define(this, value = value === 0 ? 0 : value, value);\n\t      }\n\t    });\n\t    if (descriptors) defineProperty$e(Prototype, 'size', {\n\t      get: function () {\n\t        return getInternalState(this).size;\n\t      }\n\t    });\n\t    return Constructor;\n\t  },\n\t  setStrong: function (Constructor, CONSTRUCTOR_NAME, IS_MAP) {\n\t    var ITERATOR_NAME = CONSTRUCTOR_NAME + ' Iterator';\n\t    var getInternalCollectionState = internalStateGetterFor$1(CONSTRUCTOR_NAME);\n\t    var getInternalIteratorState = internalStateGetterFor$1(ITERATOR_NAME);\n\t    // `{ Map, Set }.prototype.{ keys, values, entries, @@iterator }()` methods\n\t    // https://tc39.es/ecma262/#sec-map.prototype.entries\n\t    // https://tc39.es/ecma262/#sec-map.prototype.keys\n\t    // https://tc39.es/ecma262/#sec-map.prototype.values\n\t    // https://tc39.es/ecma262/#sec-map.prototype-@@iterator\n\t    // https://tc39.es/ecma262/#sec-set.prototype.entries\n\t    // https://tc39.es/ecma262/#sec-set.prototype.keys\n\t    // https://tc39.es/ecma262/#sec-set.prototype.values\n\t    // https://tc39.es/ecma262/#sec-set.prototype-@@iterator\n\t    defineIterator(Constructor, CONSTRUCTOR_NAME, function (iterated, kind) {\n\t      setInternalState$4(this, {\n\t        type: ITERATOR_NAME,\n\t        target: iterated,\n\t        state: getInternalCollectionState(iterated),\n\t        kind: kind,\n\t        last: undefined\n\t      });\n\t    }, function () {\n\t      var state = getInternalIteratorState(this);\n\t      var kind = state.kind;\n\t      var entry = state.last;\n\t      // revert to the last existing entry\n\t      while (entry && entry.removed) entry = entry.previous;\n\t      // get next entry\n\t      if (!state.target || !(state.last = entry = entry ? entry.next : state.state.first)) {\n\t        // or finish the iteration\n\t        state.target = undefined;\n\t        return { value: undefined, done: true };\n\t      }\n\t      // return step by kind\n\t      if (kind == 'keys') return { value: entry.key, done: false };\n\t      if (kind == 'values') return { value: entry.value, done: false };\n\t      return { value: [entry.key, entry.value], done: false };\n\t    }, IS_MAP ? 'entries' : 'values', !IS_MAP, true);\n\n\t    // `{ Map, Set }.prototype[@@species]` accessors\n\t    // https://tc39.es/ecma262/#sec-get-map-@@species\n\t    // https://tc39.es/ecma262/#sec-get-set-@@species\n\t    setSpecies(CONSTRUCTOR_NAME);\n\t  }\n\t};\n\n\t// `Map` constructor\n\t// https://tc39.es/ecma262/#sec-map-objects\n\tcollection('Map', function (init) {\n\t  return function Map() { return init(this, arguments.length ? arguments[0] : undefined); };\n\t}, collectionStrong);\n\n\tvar map$4 = path.Map;\n\n\tvar map$5 = map$4;\n\n\tvar map$6 = map$5;\n\n\t// https://tc39.github.io/proposal-setmap-offrom/\n\n\n\n\n\n\n\tvar push$4 = [].push;\n\n\tvar collectionFrom = function from(source /* , mapFn, thisArg */) {\n\t  var length = arguments.length;\n\t  var mapFn = length > 1 ? arguments[1] : undefined;\n\t  var mapping, array, n, boundFunction;\n\t  aConstructor(this);\n\t  mapping = mapFn !== undefined;\n\t  if (mapping) aCallable(mapFn);\n\t  if (source == undefined) return new this();\n\t  array = [];\n\t  if (mapping) {\n\t    n = 0;\n\t    boundFunction = functionBindContext(mapFn, length > 2 ? arguments[2] : undefined);\n\t    iterate(source, function (nextItem) {\n\t      functionCall(push$4, array, boundFunction(nextItem, n++));\n\t    });\n\t  } else {\n\t    iterate(source, push$4, { that: array });\n\t  }\n\t  return new this(array);\n\t};\n\n\t// `Map.from` method\n\t// https://tc39.github.io/proposal-setmap-offrom/#sec-map.from\n\t_export({ target: 'Map', stat: true, forced: true }, {\n\t  from: collectionFrom\n\t});\n\n\t// https://tc39.github.io/proposal-setmap-offrom/\n\tvar collectionOf = function of() {\n\t  return new this(arraySlice(arguments));\n\t};\n\n\t// `Map.of` method\n\t// https://tc39.github.io/proposal-setmap-offrom/#sec-map.of\n\t_export({ target: 'Map', stat: true, forced: true }, {\n\t  of: collectionOf\n\t});\n\n\t// https://github.com/tc39/collection-methods\n\tvar collectionDeleteAll = function deleteAll(/* ...elements */) {\n\t  var collection = anObject(this);\n\t  var remover = aCallable(collection['delete']);\n\t  var allDeleted = true;\n\t  var wasDeleted;\n\t  for (var k = 0, len = arguments.length; k < len; k++) {\n\t    wasDeleted = functionCall(remover, collection, arguments[k]);\n\t    allDeleted = allDeleted && wasDeleted;\n\t  }\n\t  return !!allDeleted;\n\t};\n\n\t// `Map.prototype.deleteAll` method\n\t// https://github.com/tc39/proposal-collection-methods\n\t_export({ target: 'Map', proto: true, real: true, forced: true }, {\n\t  deleteAll: collectionDeleteAll\n\t});\n\n\t// `Map.prototype.emplace` method\n\t// https://github.com/thumbsupep/proposal-upsert\n\tvar mapEmplace = function emplace(key, handler) {\n\t  var map = anObject(this);\n\t  var get = aCallable(map.get);\n\t  var has = aCallable(map.has);\n\t  var set = aCallable(map.set);\n\t  var value = (functionCall(has, map, key) && 'update' in handler)\n\t    ? handler.update(functionCall(get, map, key), key, map)\n\t    : handler.insert(key, map);\n\t  functionCall(set, map, key, value);\n\t  return value;\n\t};\n\n\t// `Map.prototype.emplace` method\n\t// https://github.com/thumbsupep/proposal-upsert\n\t_export({ target: 'Map', proto: true, real: true, forced: true }, {\n\t  emplace: mapEmplace\n\t});\n\n\tvar getMapIterator = getIterator;\n\n\t// `Map.prototype.every` method\n\t// https://github.com/tc39/proposal-collection-methods\n\t_export({ target: 'Map', proto: true, real: true, forced: true }, {\n\t  every: function every(callbackfn /* , thisArg */) {\n\t    var map = anObject(this);\n\t    var iterator = getMapIterator(map);\n\t    var boundFunction = functionBindContext(callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n\t    return !iterate(iterator, function (key, value, stop) {\n\t      if (!boundFunction(value, key, map)) return stop();\n\t    }, { AS_ENTRIES: true, IS_ITERATOR: true, INTERRUPTED: true }).stopped;\n\t  }\n\t});\n\n\tvar SPECIES$4 = wellKnownSymbol('species');\n\n\t// `SpeciesConstructor` abstract operation\n\t// https://tc39.es/ecma262/#sec-speciesconstructor\n\tvar speciesConstructor = function (O, defaultConstructor) {\n\t  var C = anObject(O).constructor;\n\t  var S;\n\t  return C === undefined || (S = anObject(C)[SPECIES$4]) == undefined ? defaultConstructor : aConstructor(S);\n\t};\n\n\t// `Map.prototype.filter` method\n\t// https://github.com/tc39/proposal-collection-methods\n\t_export({ target: 'Map', proto: true, real: true, forced: true }, {\n\t  filter: function filter(callbackfn /* , thisArg */) {\n\t    var map = anObject(this);\n\t    var iterator = getMapIterator(map);\n\t    var boundFunction = functionBindContext(callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n\t    var newMap = new (speciesConstructor(map, getBuiltIn('Map')))();\n\t    var setter = aCallable(newMap.set);\n\t    iterate(iterator, function (key, value) {\n\t      if (boundFunction(value, key, map)) functionCall(setter, newMap, key, value);\n\t    }, { AS_ENTRIES: true, IS_ITERATOR: true });\n\t    return newMap;\n\t  }\n\t});\n\n\t// `Map.prototype.find` method\n\t// https://github.com/tc39/proposal-collection-methods\n\t_export({ target: 'Map', proto: true, real: true, forced: true }, {\n\t  find: function find(callbackfn /* , thisArg */) {\n\t    var map = anObject(this);\n\t    var iterator = getMapIterator(map);\n\t    var boundFunction = functionBindContext(callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n\t    return iterate(iterator, function (key, value, stop) {\n\t      if (boundFunction(value, key, map)) return stop(value);\n\t    }, { AS_ENTRIES: true, IS_ITERATOR: true, INTERRUPTED: true }).result;\n\t  }\n\t});\n\n\t// `Map.prototype.findKey` method\n\t// https://github.com/tc39/proposal-collection-methods\n\t_export({ target: 'Map', proto: true, real: true, forced: true }, {\n\t  findKey: function findKey(callbackfn /* , thisArg */) {\n\t    var map = anObject(this);\n\t    var iterator = getMapIterator(map);\n\t    var boundFunction = functionBindContext(callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n\t    return iterate(iterator, function (key, value, stop) {\n\t      if (boundFunction(value, key, map)) return stop(key);\n\t    }, { AS_ENTRIES: true, IS_ITERATOR: true, INTERRUPTED: true }).result;\n\t  }\n\t});\n\n\tvar push$5 = functionUncurryThis([].push);\n\n\t// `Map.groupBy` method\n\t// https://github.com/tc39/proposal-collection-methods\n\t_export({ target: 'Map', stat: true, forced: true }, {\n\t  groupBy: function groupBy(iterable, keyDerivative) {\n\t    aCallable(keyDerivative);\n\t    var iterator = getIterator(iterable);\n\t    var newMap = new this();\n\t    var has = aCallable(newMap.has);\n\t    var get = aCallable(newMap.get);\n\t    var set = aCallable(newMap.set);\n\t    iterate(iterator, function (element) {\n\t      var derivedKey = keyDerivative(element);\n\t      if (!functionCall(has, newMap, derivedKey)) functionCall(set, newMap, derivedKey, [element]);\n\t      else push$5(functionCall(get, newMap, derivedKey), element);\n\t    }, { IS_ITERATOR: true });\n\t    return newMap;\n\t  }\n\t});\n\n\t// `SameValueZero` abstract operation\n\t// https://tc39.es/ecma262/#sec-samevaluezero\n\tvar sameValueZero = function (x, y) {\n\t  // eslint-disable-next-line no-self-compare -- NaN check\n\t  return x === y || x != x && y != y;\n\t};\n\n\t// `Map.prototype.includes` method\n\t// https://github.com/tc39/proposal-collection-methods\n\t_export({ target: 'Map', proto: true, real: true, forced: true }, {\n\t  includes: function includes(searchElement) {\n\t    return iterate(getMapIterator(anObject(this)), function (key, value, stop) {\n\t      if (sameValueZero(value, searchElement)) return stop();\n\t    }, { AS_ENTRIES: true, IS_ITERATOR: true, INTERRUPTED: true }).stopped;\n\t  }\n\t});\n\n\t// `Map.keyBy` method\n\t// https://github.com/tc39/proposal-collection-methods\n\t_export({ target: 'Map', stat: true, forced: true }, {\n\t  keyBy: function keyBy(iterable, keyDerivative) {\n\t    var newMap = new this();\n\t    aCallable(keyDerivative);\n\t    var setter = aCallable(newMap.set);\n\t    iterate(iterable, function (element) {\n\t      functionCall(setter, newMap, keyDerivative(element), element);\n\t    });\n\t    return newMap;\n\t  }\n\t});\n\n\t// `Map.prototype.keyOf` method\n\t// https://github.com/tc39/proposal-collection-methods\n\t_export({ target: 'Map', proto: true, real: true, forced: true }, {\n\t  keyOf: function keyOf(searchElement) {\n\t    return iterate(getMapIterator(anObject(this)), function (key, value, stop) {\n\t      if (value === searchElement) return stop(key);\n\t    }, { AS_ENTRIES: true, IS_ITERATOR: true, INTERRUPTED: true }).result;\n\t  }\n\t});\n\n\t// `Map.prototype.mapKeys` method\n\t// https://github.com/tc39/proposal-collection-methods\n\t_export({ target: 'Map', proto: true, real: true, forced: true }, {\n\t  mapKeys: function mapKeys(callbackfn /* , thisArg */) {\n\t    var map = anObject(this);\n\t    var iterator = getMapIterator(map);\n\t    var boundFunction = functionBindContext(callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n\t    var newMap = new (speciesConstructor(map, getBuiltIn('Map')))();\n\t    var setter = aCallable(newMap.set);\n\t    iterate(iterator, function (key, value) {\n\t      functionCall(setter, newMap, boundFunction(value, key, map), value);\n\t    }, { AS_ENTRIES: true, IS_ITERATOR: true });\n\t    return newMap;\n\t  }\n\t});\n\n\t// `Map.prototype.mapValues` method\n\t// https://github.com/tc39/proposal-collection-methods\n\t_export({ target: 'Map', proto: true, real: true, forced: true }, {\n\t  mapValues: function mapValues(callbackfn /* , thisArg */) {\n\t    var map = anObject(this);\n\t    var iterator = getMapIterator(map);\n\t    var boundFunction = functionBindContext(callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n\t    var newMap = new (speciesConstructor(map, getBuiltIn('Map')))();\n\t    var setter = aCallable(newMap.set);\n\t    iterate(iterator, function (key, value) {\n\t      functionCall(setter, newMap, key, boundFunction(value, key, map));\n\t    }, { AS_ENTRIES: true, IS_ITERATOR: true });\n\t    return newMap;\n\t  }\n\t});\n\n\t// `Map.prototype.merge` method\n\t// https://github.com/tc39/proposal-collection-methods\n\t_export({ target: 'Map', proto: true, real: true, arity: 1, forced: true }, {\n\t  // eslint-disable-next-line no-unused-vars -- required for `.length`\n\t  merge: function merge(iterable /* ...iterables */) {\n\t    var map = anObject(this);\n\t    var setter = aCallable(map.set);\n\t    var argumentsLength = arguments.length;\n\t    var i = 0;\n\t    while (i < argumentsLength) {\n\t      iterate(arguments[i++], setter, { that: map, AS_ENTRIES: true });\n\t    }\n\t    return map;\n\t  }\n\t});\n\n\tvar TypeError$i = global_1.TypeError;\n\n\t// `Map.prototype.reduce` method\n\t// https://github.com/tc39/proposal-collection-methods\n\t_export({ target: 'Map', proto: true, real: true, forced: true }, {\n\t  reduce: function reduce(callbackfn /* , initialValue */) {\n\t    var map = anObject(this);\n\t    var iterator = getMapIterator(map);\n\t    var noInitial = arguments.length < 2;\n\t    var accumulator = noInitial ? undefined : arguments[1];\n\t    aCallable(callbackfn);\n\t    iterate(iterator, function (key, value) {\n\t      if (noInitial) {\n\t        noInitial = false;\n\t        accumulator = value;\n\t      } else {\n\t        accumulator = callbackfn(accumulator, value, key, map);\n\t      }\n\t    }, { AS_ENTRIES: true, IS_ITERATOR: true });\n\t    if (noInitial) throw TypeError$i('Reduce of empty map with no initial value');\n\t    return accumulator;\n\t  }\n\t});\n\n\t// `Set.prototype.some` method\n\t// https://github.com/tc39/proposal-collection-methods\n\t_export({ target: 'Map', proto: true, real: true, forced: true }, {\n\t  some: function some(callbackfn /* , thisArg */) {\n\t    var map = anObject(this);\n\t    var iterator = getMapIterator(map);\n\t    var boundFunction = functionBindContext(callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n\t    return iterate(iterator, function (key, value, stop) {\n\t      if (boundFunction(value, key, map)) return stop();\n\t    }, { AS_ENTRIES: true, IS_ITERATOR: true, INTERRUPTED: true }).stopped;\n\t  }\n\t});\n\n\tvar TypeError$j = global_1.TypeError;\n\n\t// `Set.prototype.update` method\n\t// https://github.com/tc39/proposal-collection-methods\n\t_export({ target: 'Map', proto: true, real: true, forced: true }, {\n\t  update: function update(key, callback /* , thunk */) {\n\t    var map = anObject(this);\n\t    var get = aCallable(map.get);\n\t    var has = aCallable(map.has);\n\t    var set = aCallable(map.set);\n\t    var length = arguments.length;\n\t    aCallable(callback);\n\t    var isPresentInMap = functionCall(has, map, key);\n\t    if (!isPresentInMap && length < 3) {\n\t      throw TypeError$j('Updating absent value');\n\t    }\n\t    var value = isPresentInMap ? functionCall(get, map, key) : aCallable(length > 2 ? arguments[2] : undefined)(key, map);\n\t    functionCall(set, map, key, callback(value, key, map));\n\t    return map;\n\t  }\n\t});\n\n\tvar TypeError$k = global_1.TypeError;\n\n\t// `Map.prototype.upsert` method\n\t// https://github.com/thumbsupep/proposal-upsert\n\tvar mapUpsert = function upsert(key, updateFn /* , insertFn */) {\n\t  var map = anObject(this);\n\t  var get = aCallable(map.get);\n\t  var has = aCallable(map.has);\n\t  var set = aCallable(map.set);\n\t  var insertFn = arguments.length > 2 ? arguments[2] : undefined;\n\t  var value;\n\t  if (!isCallable(updateFn) && !isCallable(insertFn)) {\n\t    throw TypeError$k('At least one callback required');\n\t  }\n\t  if (functionCall(has, map, key)) {\n\t    value = functionCall(get, map, key);\n\t    if (isCallable(updateFn)) {\n\t      value = updateFn(value);\n\t      functionCall(set, map, key, value);\n\t    }\n\t  } else if (isCallable(insertFn)) {\n\t    value = insertFn();\n\t    functionCall(set, map, key, value);\n\t  } return value;\n\t};\n\n\t// TODO: remove from `core-js@4`\n\n\n\n\t// `Map.prototype.upsert` method (replaced by `Map.prototype.emplace`)\n\t// https://github.com/thumbsupep/proposal-upsert\n\t_export({ target: 'Map', proto: true, real: true, forced: true }, {\n\t  upsert: mapUpsert\n\t});\n\n\t// TODO: remove from `core-js@4`\n\n\n\n\t// `Map.prototype.updateOrInsert` method (replaced by `Map.prototype.emplace`)\n\t// https://github.com/thumbsupep/proposal-upsert\n\t_export({ target: 'Map', proto: true, real: true, name: 'upsert', forced: true }, {\n\t  updateOrInsert: mapUpsert\n\t});\n\n\t// TODO: remove from `core-js@4`\n\n\t// TODO: remove from `core-js@4`\n\n\n\tvar map$7 = map$6;\n\n\tvar map$8 = map$7;\n\n\tvar map$9 = map$8;\n\n\tvar isNativeFunction = createCommonjsModule(function (module) {\n\tfunction _isNativeFunction(fn) {\n\t  var _context;\n\n\t  return indexOf$7(_context = Function.toString.call(fn)).call(_context, \"[native code]\") !== -1;\n\t}\n\n\tmodule.exports = _isNativeFunction, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n\t});\n\n\tunwrapExports(isNativeFunction);\n\n\tvar construct$5 = construct$3;\n\n\tvar construct$6 = construct$5;\n\n\tvar construct$7 = construct$6;\n\n\tvar construct$8 = construct$7;\n\n\tvar bind$6 = bind$4;\n\n\tvar bind$7 = bind$6;\n\n\tvar bind$8 = bind$7;\n\n\tvar bind$9 = bind$8;\n\n\tvar isNativeReflectConstruct = createCommonjsModule(function (module) {\n\tfunction _isNativeReflectConstruct() {\n\t  if (typeof Reflect === \"undefined\" || !construct$8) return false;\n\t  if (construct$8.sham) return false;\n\t  if (typeof Proxy === \"function\") return true;\n\n\t  try {\n\t    Boolean.prototype.valueOf.call(construct$8(Boolean, [], function () {}));\n\t    return true;\n\t  } catch (e) {\n\t    return false;\n\t  }\n\t}\n\n\tmodule.exports = _isNativeReflectConstruct, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n\t});\n\n\tunwrapExports(isNativeReflectConstruct);\n\n\tvar construct$9 = createCommonjsModule(function (module) {\n\tfunction _construct(Parent, args, Class) {\n\t  if (isNativeReflectConstruct()) {\n\t    module.exports = _construct = construct$8, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n\t  } else {\n\t    module.exports = _construct = function _construct(Parent, args, Class) {\n\t      var a = [null];\n\t      a.push.apply(a, args);\n\n\t      var Constructor = bind$9(Function).apply(Parent, a);\n\n\t      var instance = new Constructor();\n\t      if (Class) setPrototypeOf$6(instance, Class.prototype);\n\t      return instance;\n\t    }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n\t  }\n\n\t  return _construct.apply(null, arguments);\n\t}\n\n\tmodule.exports = _construct, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n\t});\n\n\tvar _construct = unwrapExports(construct$9);\n\n\tvar wrapNativeSuper = createCommonjsModule(function (module) {\n\tfunction _wrapNativeSuper(Class) {\n\t  var _cache = typeof map$9 === \"function\" ? new map$9() : undefined;\n\n\t  module.exports = _wrapNativeSuper = function _wrapNativeSuper(Class) {\n\t    if (Class === null || !isNativeFunction(Class)) return Class;\n\n\t    if (typeof Class !== \"function\") {\n\t      throw new TypeError(\"Super expression must either be null or a function\");\n\t    }\n\n\t    if (typeof _cache !== \"undefined\") {\n\t      if (_cache.has(Class)) return _cache.get(Class);\n\n\t      _cache.set(Class, Wrapper);\n\t    }\n\n\t    function Wrapper() {\n\t      return construct$9(Class, arguments, getPrototypeOf$6(this).constructor);\n\t    }\n\n\t    Wrapper.prototype = create$5(Class.prototype, {\n\t      constructor: {\n\t        value: Wrapper,\n\t        enumerable: false,\n\t        writable: true,\n\t        configurable: true\n\t      }\n\t    });\n\t    return setPrototypeOf$6(Wrapper, Class);\n\t  }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n\t  return _wrapNativeSuper(Class);\n\t}\n\n\tmodule.exports = _wrapNativeSuper, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n\t});\n\n\tvar _wrapNativeSuper = unwrapExports(wrapNativeSuper);\n\n\tfunction _createSuper$1(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$1(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = construct$4(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\n\tfunction _isNativeReflectConstruct$1() { if (typeof Reflect === \"undefined\" || !construct$4) return false; if (construct$4.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(construct$4(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\n\t/**\n\t * Copyright (C) 2021 THL A29 Limited, a Tencent company.\n\t *\n\t * Licensed under the Apache License, Version 2.0 (the \"License\");\n\t * you may not use this file except in compliance with the License.\n\t * You may obtain a copy of the License at\n\t *\n\t *     http://www.apache.org/licenses/LICENSE-2.0\n\t *\n\t * Unless required by applicable law or agreed to in writing, software\n\t * distributed under the License is distributed on an \"AS IS\" BASIS,\n\t * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n\t * See the License for the specific language governing permissions and\n\t * limitations under the License.\n\t */\n\n\t/**\n\t * 三个地方的错误异常校验\n\t *  1. markdown 对象参数校验\n\t *  2. editText 用户输入校验，执行engine过程以防异常\n\t *  3. 自定义hook校验 对外开发者开发标准校验\n\t */\n\tvar $expectTarget = function $expectTarget(target, Constructor) {\n\t  if (!isArray$8(target) && _typeof(target) !== Constructor.name.toLowerCase() || !isArray$8(target) && Constructor.name.toLowerCase() === 'array') {\n\t    throw new TypeError(\"parameter given must be \".concat(Constructor.name));\n\t  }\n\n\t  return true;\n\t};\n\tvar $expectInherit = function $expectInherit(target, parent) {\n\t  if (!(target instanceof parent)) {\n\t    throw new Error('the hook does not correctly inherit');\n\t  }\n\n\t  return true;\n\t};\n\tvar $expectInstance = function $expectInstance(target) {\n\t  if (_typeof(target) !== 'object') {\n\t    throw new Error('the hook must be a instance, not a class');\n\t  }\n\n\t  return true;\n\t}; // ref: https://github.com/mdlavin/nested-error-stacks\n\n\tvar NestedError = /*#__PURE__*/function (_Error) {\n\t  _inherits(NestedError, _Error);\n\n\t  var _super = _createSuper$1(NestedError);\n\n\t  function NestedError(message, nested) {\n\t    var _this;\n\n\t    _classCallCheck(this, NestedError);\n\n\t    _this = _super.call(this, message);\n\t    _this.name = 'Error';\n\t    _this.stack = _this.buildStackTrace(nested);\n\t    return _this;\n\t  }\n\n\t  _createClass(NestedError, [{\n\t    key: \"buildStackTrace\",\n\t    value: function buildStackTrace(nested) {\n\t      var _context;\n\n\t      var stack = nested && nested.stack ? nested.stack : '';\n\n\t      var newStack = concat$5(_context = \"\".concat(this.stack, \"\\nCaused By: \")).call(_context, stack);\n\n\t      return newStack;\n\t    }\n\t  }]);\n\n\t  return NestedError;\n\t}( /*#__PURE__*/_wrapNativeSuper(Error));\n\n\t/**\n\t * @typedef {import('~types/cherry').CherryOptions} CherryOptions\n\t * @typedef {import('~types/cherry').CherryEngineOptions} CherryEngineOptions\n\t * @typedef {import('~types/cherry').CustomSyntaxRegConfig} CustomSyntaxRegConfig\n\t * @typedef { (SyntaxBase | ParagraphBase) & { Cherry$$CUSTOM: true } } CustomSyntax\n\t * @typedef { (typeof SyntaxBase | typeof ParagraphBase) & { Cherry$$CUSTOM: true } } CustomSyntaxClass\n\t */\n\n\tvar WARN_DUPLICATED = -1;\n\tvar WARN_NOT_A_VALID_HOOK = -2;\n\t/**\n\t * 处理报错信息，在dev模式下才会输出报错信息\n\t * @param {number} type\n\t * @param {any} objClass\n\t * @param {number} index\n\t */\n\n\tfunction processWarning(type, objClass, index) {\n\t  if (type === WARN_DUPLICATED) {\n\t    var _context, _context2;\n\n\t    Logger.warn(concat$5(_context = concat$5(_context2 = \"Duplicate hook name [\".concat(objClass.HOOK_NAME, \"] found, hook [\")).call(_context2, objClass.toString(), \"] \")).call(_context, isNaN(index) ? '' : \"at index [\".concat(index, \"] \"), \"will not take effect.\"));\n\t  } else if (type === WARN_NOT_A_VALID_HOOK) {\n\t    var _context3;\n\n\t    Logger.warn(concat$5(_context3 = \"Hook [\".concat(objClass.toString(), \"] \")).call(_context3, isNaN(index) ? '' : \"at index [\".concat(index, \"] \"), \"is not a valid hook, and will not take effect.\"));\n\t  }\n\t}\n\t/**\n\t * 是否一个合法的 HookClass\n\t * @param {any} HookClass\n\t * @returns { HookClass is (typeof SyntaxBase | typeof ParagraphBase) }\n\t */\n\n\n\tfunction isHookValid(HookClass) {\n\t  return isProtoOfSyntaxBase(HookClass) || isProtoOfParagraphBase(HookClass);\n\t}\n\t/**\n\t * 传入的类是否 SyntaxBase 的子类\n\t * @param {any} value\n\t * @returns { value is typeof SyntaxBase }\n\t */\n\n\n\tfunction isProtoOfSyntaxBase(value) {\n\t  return Object.prototype.isPrototypeOf.call(SyntaxBase, value);\n\t}\n\t/**\n\t * 传入的类是否 ParagraphBase 的子类\n\t * @param {any} value\n\t * @returns { value is typeof ParagraphBase }\n\t */\n\n\n\tfunction isProtoOfParagraphBase(value) {\n\t  return Object.prototype.isPrototypeOf.call(ParagraphBase, value);\n\t}\n\t/**\n\t * 是否一个配置型的自定义语法\n\t * @param {any} value\n\t * @returns { value is CustomSyntaxRegConfig }\n\t */\n\n\n\tfunction isCustomSyntaxConfig(value) {\n\t  var syntaxClass =\n\t  /** @type {any} */\n\n\t  /** @type {CustomSyntaxRegConfig} */\n\t  value === null || value === void 0 ? void 0 : value.syntaxClass;\n\t  return isProtoOfSyntaxBase(syntaxClass) || isProtoOfParagraphBase(syntaxClass);\n\t}\n\t/**\n\t * 是否一个已注册的自定义语法hook类\n\t * @param {any} value\n\t * @returns { value is CustomSyntaxClass }\n\t */\n\n\n\tfunction isRegisteredCustomSyntaxClass(value) {\n\t  return isHookValid(value) &&\n\t  /** @type {CustomSyntaxClass} */\n\t  (value === null || value === void 0 ? void 0 : value.Cherry$$CUSTOM) === true;\n\t}\n\t/**\n\t * 语法注册中心\n\t */\n\n\n\tvar HookCenter = /*#__PURE__*/function () {\n\t  /**\n\t   *\n\t   * @param {(typeof SyntaxBase)[]} hooksConfig\n\t   * @param {Partial<CherryOptions>} editorConfig\n\t   */\n\t  function HookCenter(hooksConfig, editorConfig, cherry) {\n\t    _classCallCheck(this, HookCenter);\n\n\t    this.$locale = cherry.locale;\n\t    /**\n\t     * @property\n\t     * @type {Record<import('./SyntaxBase').HookType, SyntaxBase[]>} hookList hook 名称 -> hook 类型的映射\n\t     */\n\n\t    this.hookList =\n\t    /** @type {any} */\n\t    {};\n\t    /**\n\t     * @property\n\t     * @type {Record<string, { type: import('./SyntaxBase').HookType }>} hookNameList hook 名称 -> hook 类型的映射\n\t     */\n\n\t    this.hookNameList = {};\n\t    $expectTarget(hooksConfig, Array);\n\t    this.registerInternalHooks(hooksConfig, editorConfig);\n\t    this.registerCustomHooks(editorConfig.engine.customSyntax, editorConfig);\n\t  }\n\t  /**\n\t   * 注册系统默认的语法hook\n\t   * @param {any[]} hooksConfig 在hookconfig.js里定义的配置\n\t   * @param {Partial<CherryOptions>} editorConfig 编辑器配置\n\t   */\n\n\n\t  _createClass(HookCenter, [{\n\t    key: \"registerInternalHooks\",\n\t    value: function registerInternalHooks(hooksConfig, editorConfig) {\n\t      var _this = this;\n\n\t      forEach$3(hooksConfig).call(hooksConfig,\n\t      /**\n\t       *\n\t       * @param {typeof SyntaxBase} HookClass\n\t       * @param {number} index\n\t       */\n\t      function (HookClass, index) {\n\t        var result = _this.register(HookClass, editorConfig);\n\n\t        processWarning(result, HookClass, index);\n\t      });\n\t    }\n\t    /**\n\t     * 注册第三方的语法hook\n\t     * @param {CherryEngineOptions['customSyntax']} customHooks 用户传入的配置\n\t     * @param {Partial<CherryOptions>} editorConfig 编辑器配置\n\t     */\n\n\t  }, {\n\t    key: \"registerCustomHooks\",\n\t    value: function registerCustomHooks(customHooks, editorConfig) {\n\t      var _this2 = this;\n\n\t      if (!customHooks) {\n\t        return;\n\t      }\n\n\t      var hookNames = keys$3(customHooks);\n\n\t      forEach$3(hookNames).call(hookNames, function (hookName) {\n\t        /** @type {number} */\n\t        var result;\n\t        /** @type {typeof SyntaxBase} */\n\n\t        var HookClass;\n\t        var customHookConfig = {};\n\t        var hookClassOrConfig = customHooks[hookName];\n\n\t        if (isProtoOfSyntaxBase(hookClassOrConfig)) {\n\t          HookClass = hookClassOrConfig;\n\t        } else if (isCustomSyntaxConfig(hookClassOrConfig)) {\n\t          HookClass = hookClassOrConfig.syntaxClass;\n\t          customHookConfig.force = Boolean(hookClassOrConfig.force);\n\n\t          if (hookClassOrConfig.before) {\n\t            customHookConfig.before = hookClassOrConfig.before;\n\t          } else if (hookClassOrConfig.after) {\n\t            customHookConfig.after = hookClassOrConfig.after;\n\t          }\n\t        } else {\n\t          return;\n\t        }\n\n\t        if (isHookValid(HookClass)) {\n\t          // 自定义Hook标识\n\t          defineProperty$5(HookClass, 'Cherry$$CUSTOM', {\n\t            enumerable: false,\n\t            configurable: false,\n\t            writable: false,\n\t            value: true\n\t          });\n\n\t          result = _this2.register(HookClass, editorConfig, customHookConfig);\n\t        } else {\n\t          result = WARN_NOT_A_VALID_HOOK;\n\t        }\n\n\t        processWarning(result, HookClass, undefined);\n\t      });\n\t    }\n\t  }, {\n\t    key: \"getHookList\",\n\t    value: function getHookList() {\n\t      return this.hookList;\n\t    }\n\t  }, {\n\t    key: \"getHookNameList\",\n\t    value: function getHookNameList() {\n\t      return this.hookNameList;\n\t    }\n\t    /**\n\t     *\n\t     * @param {((...args: any[]) => any) | typeof SyntaxBase} HookClass\n\t     * @param {Partial<CherryOptions>} editorConfig\n\t     * @param {Omit<CustomSyntaxRegConfig, 'syntaxClass'>} [customHookConfig]\n\t     * @returns\n\t     */\n\n\t  }, {\n\t    key: \"register\",\n\t    value: function register(HookClass, editorConfig, customHookConfig) {\n\t      var _this3 = this;\n\n\t      // filter Configs Here\n\t      var externals = editorConfig.externals,\n\t          engine = editorConfig.engine;\n\t      var syntax = engine.syntax;\n\t      /** @type {SyntaxBase | CustomSyntax} */\n\n\t      var instance;\n\t      /** @type {string} */\n\n\t      var hookName; // 首先校验Hook是否合法\n\n\t      if (!isHookValid(HookClass)) {\n\t        // 可能是一个function hook\n\t        if (typeof HookClass === 'function') {\n\t          var funcHook = HookClass;\n\t          instance = funcHook(editorConfig);\n\n\t          if (!instance || !isHookValid(instance.constructor)) {\n\t            return WARN_NOT_A_VALID_HOOK;\n\t          }\n\n\t          hookName = instance.getName();\n\t        } else {\n\t          return WARN_NOT_A_VALID_HOOK;\n\t        }\n\t      } else {\n\t        hookName = HookClass.HOOK_NAME; // TODO: 需要考虑自定义 hook 配置的传入方式\n\n\t        var config = (syntax === null || syntax === void 0 ? void 0 : syntax[hookName]) || {};\n\t        instance = new HookClass({\n\t          externals: externals,\n\t          config: config,\n\t          globalConfig: engine.global\n\t        });\n\t        instance.afterInit(function () {\n\t          instance.setLocale(_this3.$locale);\n\t        });\n\t      } // TODO: 待校验是否需要跳过禁用的自定义 hook\n\t      // Skip Disabled Internal Hooks\n\n\n\t      if (syntax[hookName] === false && !isRegisteredCustomSyntaxClass(HookClass)) {\n\t        return;\n\t      } // 下面处理的都是 CustomSyntax\n\n\n\t      var hookType = instance.getType();\n\n\t      if (this.hookNameList[hookName]) {\n\t        var _context4;\n\n\t        // 内置 hook 重名\n\t        if (!isRegisteredCustomSyntaxClass(HookClass)) {\n\t          return WARN_DUPLICATED;\n\t        } // 自定义 hook 重名且没有开启覆盖的选项\n\n\n\t        if (!customHookConfig.force) {\n\t          return WARN_DUPLICATED;\n\t        } // 强制覆盖以前的Hook，所以需要移除\n\n\n\t        var duplicateHookType = this.hookNameList[hookName].type;\n\t        this.hookList[duplicateHookType] = filter$3(_context4 = this.hookList[duplicateHookType]).call(_context4, function (hook) {\n\t          return hook.getName() !== hookName;\n\t        });\n\t      }\n\n\t      this.hookNameList[hookName] = {\n\t        type: hookType\n\t      };\n\t      this.hookList[hookType] = this.hookList[hookType] || []; // 内置Hook直接push到结尾\n\n\t      if (!isRegisteredCustomSyntaxClass(HookClass)) {\n\t        this.hookList[hookType].push(instance);\n\t        return;\n\t      } // 插入自定义Hook\n\n\n\t      var insertIndex = -1;\n\n\t      if (customHookConfig.before) {\n\t        var _context5;\n\n\t        insertIndex = findIndex$3(_context5 = this.hookList[hookType]).call(_context5, function (hook) {\n\t          return hook.getName() === customHookConfig.before;\n\t        });\n\n\t        if (insertIndex === -1) {\n\t          var _context6;\n\n\t          Logger.warn(concat$5(_context6 = \"Cannot find hook named [\".concat(customHookConfig.before, \"],\\n            custom hook [\")).call(_context6, hookName, \"] will append to the end of the hooks.\"));\n\t        }\n\t      } else if (customHookConfig.after) {\n\t        var _context7, _context8;\n\n\t        insertIndex = findIndex$3(_context7 = this.hookList[hookType]).call(_context7, function (hook) {\n\t          return hook.getName() === customHookConfig.after;\n\t        });\n\t        insertIndex === -1 ? Logger.warn(concat$5(_context8 = \"Cannot find hook named [\".concat(customHookConfig.after, \"],\\n              custom hook [\")).call(_context8, hookName, \"] will append to the end of the hooks.\")) : insertIndex += 1; // 统一处理往前插入的逻辑，所以要插入某Hook之后，索引需要加一\n\t      } // 无需插入或目标索引为数组结尾\n\n\n\t      if (insertIndex < 0 || insertIndex >= this.hookList[hookType].length) {\n\t        this.hookList[hookType].push(instance);\n\t      } else {\n\t        var _context9;\n\n\t        splice$4(_context9 = this.hookList[hookType]).call(_context9, insertIndex, 0, instance);\n\t      } // console.log(this.hookList[hookType]);\n\n\t    }\n\t  }]);\n\n\t  return HookCenter;\n\t}();\n\n\tvar arrayWithoutHoles = createCommonjsModule(function (module) {\n\tfunction _arrayWithoutHoles(arr) {\n\t  if (isArray$7(arr)) return arrayLikeToArray(arr);\n\t}\n\n\tmodule.exports = _arrayWithoutHoles, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n\t});\n\n\tunwrapExports(arrayWithoutHoles);\n\n\tvar iterableToArray = createCommonjsModule(function (module) {\n\tfunction _iterableToArray(iter) {\n\t  if (typeof symbol$5 !== \"undefined\" && getIteratorMethod$5(iter) != null || iter[\"@@iterator\"] != null) return from_1$6(iter);\n\t}\n\n\tmodule.exports = _iterableToArray, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n\t});\n\n\tunwrapExports(iterableToArray);\n\n\tvar nonIterableSpread = createCommonjsModule(function (module) {\n\tfunction _nonIterableSpread() {\n\t  throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n\t}\n\n\tmodule.exports = _nonIterableSpread, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n\t});\n\n\tunwrapExports(nonIterableSpread);\n\n\tvar toConsumableArray = createCommonjsModule(function (module) {\n\tfunction _toConsumableArray(arr) {\n\t  return arrayWithoutHoles(arr) || iterableToArray(arr) || unsupportedIterableToArray(arr) || nonIterableSpread();\n\t}\n\n\tmodule.exports = _toConsumableArray, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n\t});\n\n\tvar _toConsumableArray = unwrapExports(toConsumableArray);\n\n\tvar toArray = createCommonjsModule(function (module) {\n\tfunction _toArray(arr) {\n\t  return arrayWithHoles(arr) || iterableToArray(arr) || unsupportedIterableToArray(arr) || nonIterableRest();\n\t}\n\n\tmodule.exports = _toArray, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n\t});\n\n\tvar _toArray = unwrapExports(toArray);\n\n\tfunction ownKeys$2(object, enumerableOnly) { var keys = keys$3(object); if (getOwnPropertySymbols$2) { var symbols = getOwnPropertySymbols$2(object); enumerableOnly && (symbols = filter$3(symbols).call(symbols, function (sym) { return getOwnPropertyDescriptor$3(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\n\n\tfunction _objectSpread$1(target) { for (var i = 1; i < arguments.length; i++) { var _context2, _context3; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? forEach$3(_context2 = ownKeys$2(Object(source), !0)).call(_context2, function (key) { _defineProperty(target, key, source[key]); }) : getOwnPropertyDescriptors$2 ? defineProperties$2(target, getOwnPropertyDescriptors$2(source)) : forEach$3(_context3 = ownKeys$2(Object(source))).call(_context3, function (key) { defineProperty$5(target, key, getOwnPropertyDescriptor$3(source, key)); }); } return target; }\n\n\t/**\n\t * Copyright (C) 2021 THL A29 Limited, a Tencent company.\n\t *\n\t * Licensed under the Apache License, Version 2.0 (the \"License\");\n\t * you may not use this file except in compliance with the License.\n\t * You may obtain a copy of the License at\n\t *\n\t *     http://www.apache.org/licenses/LICENSE-2.0\n\t *\n\t * Unless required by applicable law or agreed to in writing, software\n\t * distributed under the License is distributed on an \"AS IS\" BASIS,\n\t * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n\t * See the License for the specific language governing permissions and\n\t * limitations under the License.\n\t */\n\n\t/**\n\t *\n\t * @param {string} str\n\t * @param {{replacedText:string;begin:number;length:number;}[]} buffer\n\t */\n\tfunction replaceStringByBuffer(str, buffer) {\n\t  if (!buffer.length) {\n\t    return str;\n\t  }\n\n\t  var slicedString = [];\n\t  var offset = 0;\n\n\t  forEach$3(buffer).call(buffer, function (buf, index) {\n\t    slicedString.push(slice$7(str).call(str, offset, buf.begin));\n\t    slicedString.push(buf.replacedText);\n\t    offset = buf.begin + buf.length;\n\n\t    if (index === buffer.length - 1) {\n\t      slicedString.push(slice$7(str).call(str, offset));\n\t    }\n\t  }); // console.log(slicedString, slicedString.join(''));\n\n\n\t  return slicedString.join('');\n\t}\n\t/**\n\t * @param {string} str 原始字符串\n\t * @param {RegExp} regex 正则\n\t * @param {(...args: any[])=>string} replacer 字符串替换函数\n\t * @param {boolean} [continuousMatch=false] 是否连续匹配，主要用于需要后向断言的连续语法匹配\n\t * @param {number} [rollbackLength=1] 连续匹配时，每次指针回退的长度，默认为 1\n\t */\n\n\n\tfunction replaceLookbehind(str, regex, replacer) {\n\t  var continuousMatch = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;\n\t  var rollbackLength = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;\n\n\t  if (!regex) {\n\t    return str;\n\t  } // 从头开始匹配\n\n\n\t  regex.lastIndex = 0;\n\t  var args;\n\t  var lastIndex = 0;\n\t  var replaceBuffer = [];\n\n\t  while ((args = regex.exec(str)) !== null) {\n\t    var replaceInfo = {\n\t      begin: args.index,\n\t      length: args[0].length\n\t    };\n\n\t    if (continuousMatch && args.index === lastIndex - rollbackLength) {\n\t      var _context;\n\n\t      var _args = args,\n\t          _args2 = _toArray(_args),\n\t          match = _args2[0],\n\t          restArgs = slice$7(_args2).call(_args2, 2); // 丢弃 leadingChar，需要调整begin和length\n\n\n\t      replaceBuffer.push({\n\t        begin: replaceInfo.begin + rollbackLength,\n\t        length: replaceInfo.length - rollbackLength,\n\t        replacedText: replacer.apply(void 0, concat$5(_context = [slice$7(match).call(match, rollbackLength), '']).call(_context, _toConsumableArray(restArgs)))\n\t      });\n\t    } else {\n\t      replaceBuffer.push(_objectSpread$1(_objectSpread$1({}, replaceInfo), {}, {\n\t        replacedText: replacer.apply(void 0, _toConsumableArray(args))\n\t      }));\n\t    } // console.log(args);\n\n\n\t    lastIndex = regex.lastIndex;\n\t    regex.lastIndex -= rollbackLength;\n\t  } // 正则复位，避免影响其他逻辑\n\n\n\t  regex.lastIndex = 0;\n\t  return replaceStringByBuffer(str, replaceBuffer);\n\t}\n\n\tfunction _createSuper$2(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$2(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = construct$4(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\n\tfunction _isNativeReflectConstruct$2() { if (typeof Reflect === \"undefined\" || !construct$4) return false; if (construct$4.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(construct$4(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\n\tvar Color = /*#__PURE__*/function (_SyntaxBase) {\n\t  _inherits(Color, _SyntaxBase);\n\n\t  var _super = _createSuper$2(Color);\n\n\t  function Color() {\n\t    _classCallCheck(this, Color);\n\n\t    return _super.apply(this, arguments);\n\t  }\n\n\t  _createClass(Color, [{\n\t    key: \"toHtml\",\n\t    value: // constructor() {\n\t    //     super();\n\t    // }\n\t    function toHtml(whole, leadingChar, m1, m2) {\n\t      var _context, _context2;\n\n\t      return concat$5(_context = concat$5(_context2 = \"\".concat(leadingChar, \"<span style=\\\"color:\")).call(_context2, m1, \"\\\">\")).call(_context, m2, \"</span>\");\n\t    }\n\t  }, {\n\t    key: \"makeHtml\",\n\t    value: function makeHtml(str) {\n\t      if (isLookbehindSupported()) {\n\t        return str.replace(this.RULE.reg, this.toHtml);\n\t      }\n\n\t      return replaceLookbehind(str, this.RULE.reg, this.toHtml, true, 1);\n\t    }\n\t  }, {\n\t    key: \"rule\",\n\t    value: function rule() {\n\t      var ret = {\n\t        begin: isLookbehindSupported() ? '((?<!\\\\\\\\))!!' : '(^|[^\\\\\\\\])!!',\n\t        end: '!!',\n\t        content: '(#[0-9a-zA-Z]{3,6}|[a-z]{3,20})[\\\\s]([\\\\w\\\\W]+?)'\n\t      };\n\t      ret.reg = new RegExp(ret.begin + ret.content + ret.end, 'g');\n\t      return ret;\n\t    }\n\t  }]);\n\n\t  return Color;\n\t}(SyntaxBase);\n\n\t_defineProperty(Color, \"HOOK_NAME\", 'fontColor');\n\n\tfunction _createSuper$3(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$3(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = construct$4(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\n\tfunction _isNativeReflectConstruct$3() { if (typeof Reflect === \"undefined\" || !construct$4) return false; if (construct$4.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(construct$4(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\n\tvar BackgroundColor = /*#__PURE__*/function (_SyntaxBase) {\n\t  _inherits(BackgroundColor, _SyntaxBase);\n\n\t  var _super = _createSuper$3(BackgroundColor);\n\n\t  function BackgroundColor() {\n\t    _classCallCheck(this, BackgroundColor);\n\n\t    return _super.apply(this, arguments);\n\t  }\n\n\t  _createClass(BackgroundColor, [{\n\t    key: \"toHtml\",\n\t    value: // constructor() {\n\t    //     super();\n\t    // }\n\t    function toHtml(whole, leadingChar, m1, m2) {\n\t      var _context, _context2;\n\n\t      return concat$5(_context = concat$5(_context2 = \"\".concat(leadingChar, \"<span style=\\\"background-color:\")).call(_context2, m1, \"\\\">\")).call(_context, m2, \"</span>\");\n\t    }\n\t  }, {\n\t    key: \"makeHtml\",\n\t    value: function makeHtml(str) {\n\t      if (isLookbehindSupported()) {\n\t        return str.replace(this.RULE.reg, this.toHtml);\n\t      }\n\n\t      return replaceLookbehind(str, this.RULE.reg, this.toHtml, true, 1);\n\t    }\n\t  }, {\n\t    key: \"rule\",\n\t    value: function rule() {\n\t      var ret = {\n\t        begin: isLookbehindSupported() ? '((?<!\\\\\\\\))!!!' : '(^|[^\\\\\\\\])!!!',\n\t        end: '!!!',\n\t        content: '(#[0-9a-zA-Z]{3,6}|[a-z]{3,10})[\\\\s]([\\\\w\\\\W]+?)'\n\t      };\n\t      ret.reg = new RegExp(ret.begin + ret.content + ret.end, 'g');\n\t      return ret;\n\t    }\n\t  }]);\n\n\t  return BackgroundColor;\n\t}(SyntaxBase);\n\n\t_defineProperty(BackgroundColor, \"HOOK_NAME\", 'bgColor');\n\n\tfunction _createSuper$4(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$4(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = construct$4(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\n\tfunction _isNativeReflectConstruct$4() { if (typeof Reflect === \"undefined\" || !construct$4) return false; if (construct$4.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(construct$4(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\n\tvar Size = /*#__PURE__*/function (_SyntaxBase) {\n\t  _inherits(Size, _SyntaxBase);\n\n\t  var _super = _createSuper$4(Size);\n\n\t  function Size() {\n\t    _classCallCheck(this, Size);\n\n\t    return _super.apply(this, arguments);\n\t  }\n\n\t  _createClass(Size, [{\n\t    key: \"toHtml\",\n\t    value: // constructor() {\n\t    //     super();\n\t    // }\n\t    function toHtml(whole, m1, m2, m3) {\n\t      var _context, _context2;\n\n\t      return concat$5(_context = concat$5(_context2 = \"\".concat(m1, \"<span style=\\\"font-size:\")).call(_context2, m2, \"px;line-height:1em;\\\">\")).call(_context, m3, \"</span>\");\n\t    }\n\t  }, {\n\t    key: \"makeHtml\",\n\t    value: function makeHtml(str) {\n\t      if (!this.test(str)) {\n\t        return str;\n\t      }\n\n\t      if (isLookbehindSupported()) {\n\t        return str.replace(this.RULE.reg, this.toHtml);\n\t      }\n\n\t      return replaceLookbehind(str, this.RULE.reg, this.toHtml, true, 1);\n\t    }\n\t  }, {\n\t    key: \"rule\",\n\t    value: function rule() {\n\t      var ret = {\n\t        begin: isLookbehindSupported() ? '((?<!\\\\\\\\))!' : '(^|[^\\\\\\\\])!',\n\t        end: '!',\n\t        content: '([0-9]{1,2})[\\\\s]([\\\\w\\\\W]*?)'\n\t      };\n\t      ret.reg = new RegExp(ret.begin + ret.content + ret.end, 'g');\n\t      return ret;\n\t    }\n\t  }]);\n\n\t  return Size;\n\t}(SyntaxBase);\n\n\t_defineProperty(Size, \"HOOK_NAME\", 'fontSize');\n\n\tfunction _createSuper$5(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$5(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = construct$4(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\n\tfunction _isNativeReflectConstruct$5() { if (typeof Reflect === \"undefined\" || !construct$4) return false; if (construct$4.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(construct$4(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\t/**\n\t * 删除线语法\n\t */\n\n\tvar Strikethrough = /*#__PURE__*/function (_SyntaxBase) {\n\t  _inherits(Strikethrough, _SyntaxBase);\n\n\t  var _super = _createSuper$5(Strikethrough);\n\n\t  function Strikethrough() {\n\t    var _this;\n\n\t    var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {\n\t      config: undefined\n\t    },\n\t        config = _ref.config;\n\n\t    _classCallCheck(this, Strikethrough);\n\n\t    _this = _super.call(this, {\n\t      config: config\n\t    });\n\n\t    if (!config) {\n\t      return _possibleConstructorReturn(_this);\n\t    }\n\n\t    _this.needWhitespace = !!config.needWhitespace;\n\t    return _this;\n\t  }\n\t  /**\n\t   * 主要逻辑\n\t   * @param {string} str markdown源码\n\t   * @returns {string} html内容\n\t   */\n\n\n\t  _createClass(Strikethrough, [{\n\t    key: \"makeHtml\",\n\t    value: function makeHtml(str) {\n\t      if (!this.test(str)) {\n\t        return str;\n\t      }\n\n\t      return str.replace(this.RULE.reg, '$1<del>$2</del>');\n\t    }\n\t  }, {\n\t    key: \"rule\",\n\t    value: function rule() {\n\t      var _ref2 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {\n\t        config: undefined\n\t      },\n\t          config = _ref2.config;\n\n\t      /** @type {Partial<import('~types/syntax').BasicHookRegexpRule>} */\n\t      var ret = {};\n\n\t      if (!!config.needWhitespace) {\n\t        ret = {\n\t          begin: '(^|[\\\\s])\\\\~T\\\\~T',\n\t          end: '\\\\~T\\\\~T(?=\\\\s|$)',\n\t          content: '([\\\\w\\\\W]+?)'\n\t        };\n\t      } else {\n\t        ret = {\n\t          begin: '(^|[^\\\\\\\\])\\\\~T\\\\~T',\n\t          end: '\\\\~T\\\\~T',\n\t          content: '([\\\\w\\\\W]+?)'\n\t        };\n\t      }\n\n\t      ret.reg = new RegExp(ret.begin + ret.content + ret.end, 'g');\n\t      return ret;\n\t    }\n\t  }]);\n\n\t  return Strikethrough;\n\t}(SyntaxBase);\n\n\t_defineProperty(Strikethrough, \"HOOK_NAME\", 'strikethrough');\n\n\tfunction _createSuper$6(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$6(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = construct$4(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\n\tfunction _isNativeReflectConstruct$6() { if (typeof Reflect === \"undefined\" || !construct$4) return false; if (construct$4.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(construct$4(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\n\tvar Sup = /*#__PURE__*/function (_SyntaxBase) {\n\t  _inherits(Sup, _SyntaxBase);\n\n\t  var _super = _createSuper$6(Sup);\n\n\t  function Sup() {\n\t    _classCallCheck(this, Sup);\n\n\t    return _super.apply(this, arguments);\n\t  }\n\n\t  _createClass(Sup, [{\n\t    key: \"toHtml\",\n\t    value: // constructor() {\n\t    //     super();\n\t    // }\n\t    function toHtml(whole, leadingChar, m1) {\n\t      var _context;\n\n\t      return concat$5(_context = \"\".concat(leadingChar, \"<sup>\")).call(_context, m1, \"</sup>\");\n\t    }\n\t  }, {\n\t    key: \"makeHtml\",\n\t    value: function makeHtml(str) {\n\t      if (isLookbehindSupported()) {\n\t        return str.replace(this.RULE.reg, this.toHtml);\n\t      }\n\n\t      return replaceLookbehind(str, this.RULE.reg, this.toHtml, true, 1);\n\t    }\n\t  }, {\n\t    key: \"rule\",\n\t    value: function rule() {\n\t      var ret = {\n\t        begin: isLookbehindSupported() ? '((?<!\\\\\\\\))\\\\^' : '(^|[^\\\\\\\\])\\\\^',\n\t        end: '\\\\^',\n\t        content: '([\\\\w\\\\W]+?)'\n\t      };\n\t      ret.reg = new RegExp(ret.begin + ret.content + ret.end, 'g');\n\t      return ret;\n\t    }\n\t  }]);\n\n\t  return Sup;\n\t}(SyntaxBase);\n\n\t_defineProperty(Sup, \"HOOK_NAME\", 'sup');\n\n\tfunction _createSuper$7(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$7(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = construct$4(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\n\tfunction _isNativeReflectConstruct$7() { if (typeof Reflect === \"undefined\" || !construct$4) return false; if (construct$4.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(construct$4(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\n\tvar Sub = /*#__PURE__*/function (_SyntaxBase) {\n\t  _inherits(Sub, _SyntaxBase);\n\n\t  var _super = _createSuper$7(Sub);\n\n\t  function Sub() {\n\t    _classCallCheck(this, Sub);\n\n\t    return _super.apply(this, arguments);\n\t  }\n\n\t  _createClass(Sub, [{\n\t    key: \"toHtml\",\n\t    value: // constructor() {\n\t    //     super();\n\t    // }\n\t    function toHtml(whole, leadingChar, m1) {\n\t      var _context;\n\n\t      return concat$5(_context = \"\".concat(leadingChar, \"<sub>\")).call(_context, m1, \"</sub>\");\n\t    }\n\t  }, {\n\t    key: \"makeHtml\",\n\t    value: function makeHtml(str) {\n\t      if (isLookbehindSupported()) {\n\t        return str.replace(this.RULE.reg, this.toHtml);\n\t      }\n\n\t      return replaceLookbehind(str, this.RULE.reg, this.toHtml, true, 1);\n\t    }\n\t  }, {\n\t    key: \"rule\",\n\t    value: function rule() {\n\t      var ret = {\n\t        begin: isLookbehindSupported() ? '((?<!\\\\\\\\))\\\\^\\\\^' : '(^|[^\\\\\\\\])\\\\^\\\\^',\n\t        end: '\\\\^\\\\^',\n\t        content: '([\\\\w\\\\W]+?)'\n\t      };\n\t      ret.reg = new RegExp(ret.begin + ret.content + ret.end, 'g');\n\t      return ret;\n\t    }\n\t  }]);\n\n\t  return Sub;\n\t}(SyntaxBase);\n\n\t_defineProperty(Sub, \"HOOK_NAME\", 'sub');\n\n\tvar prismCore = createCommonjsModule(function (module) {\n\t/// <reference lib=\"WebWorker\"/>\n\n\tvar _self = (typeof window !== 'undefined')\n\t\t? window   // if in browser\n\t\t: (\n\t\t\t(typeof WorkerGlobalScope !== 'undefined' && self instanceof WorkerGlobalScope)\n\t\t\t\t? self // if in worker\n\t\t\t\t: {}   // if in node js\n\t\t);\n\n\t/**\n\t * Prism: Lightweight, robust, elegant syntax highlighting\n\t *\n\t * @license MIT <https://opensource.org/licenses/MIT>\n\t * @author Lea Verou <https://lea.verou.me>\n\t * @namespace\n\t * @public\n\t */\n\tvar Prism = (function (_self) {\n\n\t\t// Private helper vars\n\t\tvar lang = /(?:^|\\s)lang(?:uage)?-([\\w-]+)(?=\\s|$)/i;\n\t\tvar uniqueId = 0;\n\n\t\t// The grammar object for plaintext\n\t\tvar plainTextGrammar = {};\n\n\n\t\tvar _ = {\n\t\t\t/**\n\t\t\t * By default, Prism will attempt to highlight all code elements (by calling {@link Prism.highlightAll}) on the\n\t\t\t * current page after the page finished loading. This might be a problem if e.g. you wanted to asynchronously load\n\t\t\t * additional languages or plugins yourself.\n\t\t\t *\n\t\t\t * By setting this value to `true`, Prism will not automatically highlight all code elements on the page.\n\t\t\t *\n\t\t\t * You obviously have to change this value before the automatic highlighting started. To do this, you can add an\n\t\t\t * empty Prism object into the global scope before loading the Prism script like this:\n\t\t\t *\n\t\t\t * ```js\n\t\t\t * window.Prism = window.Prism || {};\n\t\t\t * Prism.manual = true;\n\t\t\t * // add a new <script> to load Prism's script\n\t\t\t * ```\n\t\t\t *\n\t\t\t * @default false\n\t\t\t * @type {boolean}\n\t\t\t * @memberof Prism\n\t\t\t * @public\n\t\t\t */\n\t\t\tmanual: _self.Prism && _self.Prism.manual,\n\t\t\t/**\n\t\t\t * By default, if Prism is in a web worker, it assumes that it is in a worker it created itself, so it uses\n\t\t\t * `addEventListener` to communicate with its parent instance. However, if you're using Prism manually in your\n\t\t\t * own worker, you don't want it to do this.\n\t\t\t *\n\t\t\t * By setting this value to `true`, Prism will not add its own listeners to the worker.\n\t\t\t *\n\t\t\t * You obviously have to change this value before Prism executes. To do this, you can add an\n\t\t\t * empty Prism object into the global scope before loading the Prism script like this:\n\t\t\t *\n\t\t\t * ```js\n\t\t\t * window.Prism = window.Prism || {};\n\t\t\t * Prism.disableWorkerMessageHandler = true;\n\t\t\t * // Load Prism's script\n\t\t\t * ```\n\t\t\t *\n\t\t\t * @default false\n\t\t\t * @type {boolean}\n\t\t\t * @memberof Prism\n\t\t\t * @public\n\t\t\t */\n\t\t\tdisableWorkerMessageHandler: _self.Prism && _self.Prism.disableWorkerMessageHandler,\n\n\t\t\t/**\n\t\t\t * A namespace for utility methods.\n\t\t\t *\n\t\t\t * All function in this namespace that are not explicitly marked as _public_ are for __internal use only__ and may\n\t\t\t * change or disappear at any time.\n\t\t\t *\n\t\t\t * @namespace\n\t\t\t * @memberof Prism\n\t\t\t */\n\t\t\tutil: {\n\t\t\t\tencode: function encode(tokens) {\n\t\t\t\t\tif (tokens instanceof Token) {\n\t\t\t\t\t\treturn new Token(tokens.type, encode(tokens.content), tokens.alias);\n\t\t\t\t\t} else if (Array.isArray(tokens)) {\n\t\t\t\t\t\treturn tokens.map(encode);\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn tokens.replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/\\u00a0/g, ' ');\n\t\t\t\t\t}\n\t\t\t\t},\n\n\t\t\t\t/**\n\t\t\t\t * Returns the name of the type of the given value.\n\t\t\t\t *\n\t\t\t\t * @param {any} o\n\t\t\t\t * @returns {string}\n\t\t\t\t * @example\n\t\t\t\t * type(null)      === 'Null'\n\t\t\t\t * type(undefined) === 'Undefined'\n\t\t\t\t * type(123)       === 'Number'\n\t\t\t\t * type('foo')     === 'String'\n\t\t\t\t * type(true)      === 'Boolean'\n\t\t\t\t * type([1, 2])    === 'Array'\n\t\t\t\t * type({})        === 'Object'\n\t\t\t\t * type(String)    === 'Function'\n\t\t\t\t * type(/abc+/)    === 'RegExp'\n\t\t\t\t */\n\t\t\t\ttype: function (o) {\n\t\t\t\t\treturn Object.prototype.toString.call(o).slice(8, -1);\n\t\t\t\t},\n\n\t\t\t\t/**\n\t\t\t\t * Returns a unique number for the given object. Later calls will still return the same number.\n\t\t\t\t *\n\t\t\t\t * @param {Object} obj\n\t\t\t\t * @returns {number}\n\t\t\t\t */\n\t\t\t\tobjId: function (obj) {\n\t\t\t\t\tif (!obj['__id']) {\n\t\t\t\t\t\tObject.defineProperty(obj, '__id', { value: ++uniqueId });\n\t\t\t\t\t}\n\t\t\t\t\treturn obj['__id'];\n\t\t\t\t},\n\n\t\t\t\t/**\n\t\t\t\t * Creates a deep clone of the given object.\n\t\t\t\t *\n\t\t\t\t * The main intended use of this function is to clone language definitions.\n\t\t\t\t *\n\t\t\t\t * @param {T} o\n\t\t\t\t * @param {Record<number, any>} [visited]\n\t\t\t\t * @returns {T}\n\t\t\t\t * @template T\n\t\t\t\t */\n\t\t\t\tclone: function deepClone(o, visited) {\n\t\t\t\t\tvisited = visited || {};\n\n\t\t\t\t\tvar clone; var id;\n\t\t\t\t\tswitch (_.util.type(o)) {\n\t\t\t\t\t\tcase 'Object':\n\t\t\t\t\t\t\tid = _.util.objId(o);\n\t\t\t\t\t\t\tif (visited[id]) {\n\t\t\t\t\t\t\t\treturn visited[id];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tclone = /** @type {Record<string, any>} */ ({});\n\t\t\t\t\t\t\tvisited[id] = clone;\n\n\t\t\t\t\t\t\tfor (var key in o) {\n\t\t\t\t\t\t\t\tif (o.hasOwnProperty(key)) {\n\t\t\t\t\t\t\t\t\tclone[key] = deepClone(o[key], visited);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\treturn /** @type {any} */ (clone);\n\n\t\t\t\t\t\tcase 'Array':\n\t\t\t\t\t\t\tid = _.util.objId(o);\n\t\t\t\t\t\t\tif (visited[id]) {\n\t\t\t\t\t\t\t\treturn visited[id];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tclone = [];\n\t\t\t\t\t\t\tvisited[id] = clone;\n\n\t\t\t\t\t\t\t(/** @type {Array} */(/** @type {any} */(o))).forEach(function (v, i) {\n\t\t\t\t\t\t\t\tclone[i] = deepClone(v, visited);\n\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t\treturn /** @type {any} */ (clone);\n\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\treturn o;\n\t\t\t\t\t}\n\t\t\t\t},\n\n\t\t\t\t/**\n\t\t\t\t * Returns the Prism language of the given element set by a `language-xxxx` or `lang-xxxx` class.\n\t\t\t\t *\n\t\t\t\t * If no language is set for the element or the element is `null` or `undefined`, `none` will be returned.\n\t\t\t\t *\n\t\t\t\t * @param {Element} element\n\t\t\t\t * @returns {string}\n\t\t\t\t */\n\t\t\t\tgetLanguage: function (element) {\n\t\t\t\t\twhile (element) {\n\t\t\t\t\t\tvar m = lang.exec(element.className);\n\t\t\t\t\t\tif (m) {\n\t\t\t\t\t\t\treturn m[1].toLowerCase();\n\t\t\t\t\t\t}\n\t\t\t\t\t\telement = element.parentElement;\n\t\t\t\t\t}\n\t\t\t\t\treturn 'none';\n\t\t\t\t},\n\n\t\t\t\t/**\n\t\t\t\t * Sets the Prism `language-xxxx` class of the given element.\n\t\t\t\t *\n\t\t\t\t * @param {Element} element\n\t\t\t\t * @param {string} language\n\t\t\t\t * @returns {void}\n\t\t\t\t */\n\t\t\t\tsetLanguage: function (element, language) {\n\t\t\t\t\t// remove all `language-xxxx` classes\n\t\t\t\t\t// (this might leave behind a leading space)\n\t\t\t\t\telement.className = element.className.replace(RegExp(lang, 'gi'), '');\n\n\t\t\t\t\t// add the new `language-xxxx` class\n\t\t\t\t\t// (using `classList` will automatically clean up spaces for us)\n\t\t\t\t\telement.classList.add('language-' + language);\n\t\t\t\t},\n\n\t\t\t\t/**\n\t\t\t\t * Returns the script element that is currently executing.\n\t\t\t\t *\n\t\t\t\t * This does __not__ work for line script element.\n\t\t\t\t *\n\t\t\t\t * @returns {HTMLScriptElement | null}\n\t\t\t\t */\n\t\t\t\tcurrentScript: function () {\n\t\t\t\t\tif (typeof document === 'undefined') {\n\t\t\t\t\t\treturn null;\n\t\t\t\t\t}\n\t\t\t\t\tif ('currentScript' in document && 1 < 2 /* hack to trip TS' flow analysis */) {\n\t\t\t\t\t\treturn /** @type {any} */ (document.currentScript);\n\t\t\t\t\t}\n\n\t\t\t\t\t// IE11 workaround\n\t\t\t\t\t// we'll get the src of the current script by parsing IE11's error stack trace\n\t\t\t\t\t// this will not work for inline scripts\n\n\t\t\t\t\ttry {\n\t\t\t\t\t\tthrow new Error();\n\t\t\t\t\t} catch (err) {\n\t\t\t\t\t\t// Get file src url from stack. Specifically works with the format of stack traces in IE.\n\t\t\t\t\t\t// A stack will look like this:\n\t\t\t\t\t\t//\n\t\t\t\t\t\t// Error\n\t\t\t\t\t\t//    at _.util.currentScript (http://localhost/components/prism-core.js:119:5)\n\t\t\t\t\t\t//    at Global code (http://localhost/components/prism-core.js:606:1)\n\n\t\t\t\t\t\tvar src = (/at [^(\\r\\n]*\\((.*):[^:]+:[^:]+\\)$/i.exec(err.stack) || [])[1];\n\t\t\t\t\t\tif (src) {\n\t\t\t\t\t\t\tvar scripts = document.getElementsByTagName('script');\n\t\t\t\t\t\t\tfor (var i in scripts) {\n\t\t\t\t\t\t\t\tif (scripts[i].src == src) {\n\t\t\t\t\t\t\t\t\treturn scripts[i];\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn null;\n\t\t\t\t\t}\n\t\t\t\t},\n\n\t\t\t\t/**\n\t\t\t\t * Returns whether a given class is active for `element`.\n\t\t\t\t *\n\t\t\t\t * The class can be activated if `element` or one of its ancestors has the given class and it can be deactivated\n\t\t\t\t * if `element` or one of its ancestors has the negated version of the given class. The _negated version_ of the\n\t\t\t\t * given class is just the given class with a `no-` prefix.\n\t\t\t\t *\n\t\t\t\t * Whether the class is active is determined by the closest ancestor of `element` (where `element` itself is\n\t\t\t\t * closest ancestor) that has the given class or the negated version of it. If neither `element` nor any of its\n\t\t\t\t * ancestors have the given class or the negated version of it, then the default activation will be returned.\n\t\t\t\t *\n\t\t\t\t * In the paradoxical situation where the closest ancestor contains __both__ the given class and the negated\n\t\t\t\t * version of it, the class is considered active.\n\t\t\t\t *\n\t\t\t\t * @param {Element} element\n\t\t\t\t * @param {string} className\n\t\t\t\t * @param {boolean} [defaultActivation=false]\n\t\t\t\t * @returns {boolean}\n\t\t\t\t */\n\t\t\t\tisActive: function (element, className, defaultActivation) {\n\t\t\t\t\tvar no = 'no-' + className;\n\n\t\t\t\t\twhile (element) {\n\t\t\t\t\t\tvar classList = element.classList;\n\t\t\t\t\t\tif (classList.contains(className)) {\n\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (classList.contains(no)) {\n\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telement = element.parentElement;\n\t\t\t\t\t}\n\t\t\t\t\treturn !!defaultActivation;\n\t\t\t\t}\n\t\t\t},\n\n\t\t\t/**\n\t\t\t * This namespace contains all currently loaded languages and the some helper functions to create and modify languages.\n\t\t\t *\n\t\t\t * @namespace\n\t\t\t * @memberof Prism\n\t\t\t * @public\n\t\t\t */\n\t\t\tlanguages: {\n\t\t\t\t/**\n\t\t\t\t * The grammar for plain, unformatted text.\n\t\t\t\t */\n\t\t\t\tplain: plainTextGrammar,\n\t\t\t\tplaintext: plainTextGrammar,\n\t\t\t\ttext: plainTextGrammar,\n\t\t\t\ttxt: plainTextGrammar,\n\n\t\t\t\t/**\n\t\t\t\t * Creates a deep copy of the language with the given id and appends the given tokens.\n\t\t\t\t *\n\t\t\t\t * If a token in `redef` also appears in the copied language, then the existing token in the copied language\n\t\t\t\t * will be overwritten at its original position.\n\t\t\t\t *\n\t\t\t\t * ## Best practices\n\t\t\t\t *\n\t\t\t\t * Since the position of overwriting tokens (token in `redef` that overwrite tokens in the copied language)\n\t\t\t\t * doesn't matter, they can technically be in any order. However, this can be confusing to others that trying to\n\t\t\t\t * understand the language definition because, normally, the order of tokens matters in Prism grammars.\n\t\t\t\t *\n\t\t\t\t * Therefore, it is encouraged to order overwriting tokens according to the positions of the overwritten tokens.\n\t\t\t\t * Furthermore, all non-overwriting tokens should be placed after the overwriting ones.\n\t\t\t\t *\n\t\t\t\t * @param {string} id The id of the language to extend. This has to be a key in `Prism.languages`.\n\t\t\t\t * @param {Grammar} redef The new tokens to append.\n\t\t\t\t * @returns {Grammar} The new language created.\n\t\t\t\t * @public\n\t\t\t\t * @example\n\t\t\t\t * Prism.languages['css-with-colors'] = Prism.languages.extend('css', {\n\t\t\t\t *     // Prism.languages.css already has a 'comment' token, so this token will overwrite CSS' 'comment' token\n\t\t\t\t *     // at its original position\n\t\t\t\t *     'comment': { ... },\n\t\t\t\t *     // CSS doesn't have a 'color' token, so this token will be appended\n\t\t\t\t *     'color': /\\b(?:red|green|blue)\\b/\n\t\t\t\t * });\n\t\t\t\t */\n\t\t\t\textend: function (id, redef) {\n\t\t\t\t\tvar lang = _.util.clone(_.languages[id]);\n\n\t\t\t\t\tfor (var key in redef) {\n\t\t\t\t\t\tlang[key] = redef[key];\n\t\t\t\t\t}\n\n\t\t\t\t\treturn lang;\n\t\t\t\t},\n\n\t\t\t\t/**\n\t\t\t\t * Inserts tokens _before_ another token in a language definition or any other grammar.\n\t\t\t\t *\n\t\t\t\t * ## Usage\n\t\t\t\t *\n\t\t\t\t * This helper method makes it easy to modify existing languages. For example, the CSS language definition\n\t\t\t\t * not only defines CSS highlighting for CSS documents, but also needs to define highlighting for CSS embedded\n\t\t\t\t * in HTML through `<style>` elements. To do this, it needs to modify `Prism.languages.markup` and add the\n\t\t\t\t * appropriate tokens. However, `Prism.languages.markup` is a regular JavaScript object literal, so if you do\n\t\t\t\t * this:\n\t\t\t\t *\n\t\t\t\t * ```js\n\t\t\t\t * Prism.languages.markup.style = {\n\t\t\t\t *     // token\n\t\t\t\t * };\n\t\t\t\t * ```\n\t\t\t\t *\n\t\t\t\t * then the `style` token will be added (and processed) at the end. `insertBefore` allows you to insert tokens\n\t\t\t\t * before existing tokens. For the CSS example above, you would use it like this:\n\t\t\t\t *\n\t\t\t\t * ```js\n\t\t\t\t * Prism.languages.insertBefore('markup', 'cdata', {\n\t\t\t\t *     'style': {\n\t\t\t\t *         // token\n\t\t\t\t *     }\n\t\t\t\t * });\n\t\t\t\t * ```\n\t\t\t\t *\n\t\t\t\t * ## Special cases\n\t\t\t\t *\n\t\t\t\t * If the grammars of `inside` and `insert` have tokens with the same name, the tokens in `inside`'s grammar\n\t\t\t\t * will be ignored.\n\t\t\t\t *\n\t\t\t\t * This behavior can be used to insert tokens after `before`:\n\t\t\t\t *\n\t\t\t\t * ```js\n\t\t\t\t * Prism.languages.insertBefore('markup', 'comment', {\n\t\t\t\t *     'comment': Prism.languages.markup.comment,\n\t\t\t\t *     // tokens after 'comment'\n\t\t\t\t * });\n\t\t\t\t * ```\n\t\t\t\t *\n\t\t\t\t * ## Limitations\n\t\t\t\t *\n\t\t\t\t * The main problem `insertBefore` has to solve is iteration order. Since ES2015, the iteration order for object\n\t\t\t\t * properties is guaranteed to be the insertion order (except for integer keys) but some browsers behave\n\t\t\t\t * differently when keys are deleted and re-inserted. So `insertBefore` can't be implemented by temporarily\n\t\t\t\t * deleting properties which is necessary to insert at arbitrary positions.\n\t\t\t\t *\n\t\t\t\t * To solve this problem, `insertBefore` doesn't actually insert the given tokens into the target object.\n\t\t\t\t * Instead, it will create a new object and replace all references to the target object with the new one. This\n\t\t\t\t * can be done without temporarily deleting properties, so the iteration order is well-defined.\n\t\t\t\t *\n\t\t\t\t * However, only references that can be reached from `Prism.languages` or `insert` will be replaced. I.e. if\n\t\t\t\t * you hold the target object in a variable, then the value of the variable will not change.\n\t\t\t\t *\n\t\t\t\t * ```js\n\t\t\t\t * var oldMarkup = Prism.languages.markup;\n\t\t\t\t * var newMarkup = Prism.languages.insertBefore('markup', 'comment', { ... });\n\t\t\t\t *\n\t\t\t\t * assert(oldMarkup !== Prism.languages.markup);\n\t\t\t\t * assert(newMarkup === Prism.languages.markup);\n\t\t\t\t * ```\n\t\t\t\t *\n\t\t\t\t * @param {string} inside The property of `root` (e.g. a language id in `Prism.languages`) that contains the\n\t\t\t\t * object to be modified.\n\t\t\t\t * @param {string} before The key to insert before.\n\t\t\t\t * @param {Grammar} insert An object containing the key-value pairs to be inserted.\n\t\t\t\t * @param {Object<string, any>} [root] The object containing `inside`, i.e. the object that contains the\n\t\t\t\t * object to be modified.\n\t\t\t\t *\n\t\t\t\t * Defaults to `Prism.languages`.\n\t\t\t\t * @returns {Grammar} The new grammar object.\n\t\t\t\t * @public\n\t\t\t\t */\n\t\t\t\tinsertBefore: function (inside, before, insert, root) {\n\t\t\t\t\troot = root || /** @type {any} */ (_.languages);\n\t\t\t\t\tvar grammar = root[inside];\n\t\t\t\t\t/** @type {Grammar} */\n\t\t\t\t\tvar ret = {};\n\n\t\t\t\t\tfor (var token in grammar) {\n\t\t\t\t\t\tif (grammar.hasOwnProperty(token)) {\n\n\t\t\t\t\t\t\tif (token == before) {\n\t\t\t\t\t\t\t\tfor (var newToken in insert) {\n\t\t\t\t\t\t\t\t\tif (insert.hasOwnProperty(newToken)) {\n\t\t\t\t\t\t\t\t\t\tret[newToken] = insert[newToken];\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// Do not insert token which also occur in insert. See #1525\n\t\t\t\t\t\t\tif (!insert.hasOwnProperty(token)) {\n\t\t\t\t\t\t\t\tret[token] = grammar[token];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tvar old = root[inside];\n\t\t\t\t\troot[inside] = ret;\n\n\t\t\t\t\t// Update references in other language definitions\n\t\t\t\t\t_.languages.DFS(_.languages, function (key, value) {\n\t\t\t\t\t\tif (value === old && key != inside) {\n\t\t\t\t\t\t\tthis[key] = ret;\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\n\t\t\t\t\treturn ret;\n\t\t\t\t},\n\n\t\t\t\t// Traverse a language definition with Depth First Search\n\t\t\t\tDFS: function DFS(o, callback, type, visited) {\n\t\t\t\t\tvisited = visited || {};\n\n\t\t\t\t\tvar objId = _.util.objId;\n\n\t\t\t\t\tfor (var i in o) {\n\t\t\t\t\t\tif (o.hasOwnProperty(i)) {\n\t\t\t\t\t\t\tcallback.call(o, i, o[i], type || i);\n\n\t\t\t\t\t\t\tvar property = o[i];\n\t\t\t\t\t\t\tvar propertyType = _.util.type(property);\n\n\t\t\t\t\t\t\tif (propertyType === 'Object' && !visited[objId(property)]) {\n\t\t\t\t\t\t\t\tvisited[objId(property)] = true;\n\t\t\t\t\t\t\t\tDFS(property, callback, null, visited);\n\t\t\t\t\t\t\t} else if (propertyType === 'Array' && !visited[objId(property)]) {\n\t\t\t\t\t\t\t\tvisited[objId(property)] = true;\n\t\t\t\t\t\t\t\tDFS(property, callback, i, visited);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\n\t\t\tplugins: {},\n\n\t\t\t/**\n\t\t\t * This is the most high-level function in Prism’s API.\n\t\t\t * It fetches all the elements that have a `.language-xxxx` class and then calls {@link Prism.highlightElement} on\n\t\t\t * each one of them.\n\t\t\t *\n\t\t\t * This is equivalent to `Prism.highlightAllUnder(document, async, callback)`.\n\t\t\t *\n\t\t\t * @param {boolean} [async=false] Same as in {@link Prism.highlightAllUnder}.\n\t\t\t * @param {HighlightCallback} [callback] Same as in {@link Prism.highlightAllUnder}.\n\t\t\t * @memberof Prism\n\t\t\t * @public\n\t\t\t */\n\t\t\thighlightAll: function (async, callback) {\n\t\t\t\t_.highlightAllUnder(document, async, callback);\n\t\t\t},\n\n\t\t\t/**\n\t\t\t * Fetches all the descendants of `container` that have a `.language-xxxx` class and then calls\n\t\t\t * {@link Prism.highlightElement} on each one of them.\n\t\t\t *\n\t\t\t * The following hooks will be run:\n\t\t\t * 1. `before-highlightall`\n\t\t\t * 2. `before-all-elements-highlight`\n\t\t\t * 3. All hooks of {@link Prism.highlightElement} for each element.\n\t\t\t *\n\t\t\t * @param {ParentNode} container The root element, whose descendants that have a `.language-xxxx` class will be highlighted.\n\t\t\t * @param {boolean} [async=false] Whether each element is to be highlighted asynchronously using Web Workers.\n\t\t\t * @param {HighlightCallback} [callback] An optional callback to be invoked on each element after its highlighting is done.\n\t\t\t * @memberof Prism\n\t\t\t * @public\n\t\t\t */\n\t\t\thighlightAllUnder: function (container, async, callback) {\n\t\t\t\tvar env = {\n\t\t\t\t\tcallback: callback,\n\t\t\t\t\tcontainer: container,\n\t\t\t\t\tselector: 'code[class*=\"language-\"], [class*=\"language-\"] code, code[class*=\"lang-\"], [class*=\"lang-\"] code'\n\t\t\t\t};\n\n\t\t\t\t_.hooks.run('before-highlightall', env);\n\n\t\t\t\tenv.elements = Array.prototype.slice.apply(env.container.querySelectorAll(env.selector));\n\n\t\t\t\t_.hooks.run('before-all-elements-highlight', env);\n\n\t\t\t\tfor (var i = 0, element; (element = env.elements[i++]);) {\n\t\t\t\t\t_.highlightElement(element, async === true, env.callback);\n\t\t\t\t}\n\t\t\t},\n\n\t\t\t/**\n\t\t\t * Highlights the code inside a single element.\n\t\t\t *\n\t\t\t * The following hooks will be run:\n\t\t\t * 1. `before-sanity-check`\n\t\t\t * 2. `before-highlight`\n\t\t\t * 3. All hooks of {@link Prism.highlight}. These hooks will be run by an asynchronous worker if `async` is `true`.\n\t\t\t * 4. `before-insert`\n\t\t\t * 5. `after-highlight`\n\t\t\t * 6. `complete`\n\t\t\t *\n\t\t\t * Some the above hooks will be skipped if the element doesn't contain any text or there is no grammar loaded for\n\t\t\t * the element's language.\n\t\t\t *\n\t\t\t * @param {Element} element The element containing the code.\n\t\t\t * It must have a class of `language-xxxx` to be processed, where `xxxx` is a valid language identifier.\n\t\t\t * @param {boolean} [async=false] Whether the element is to be highlighted asynchronously using Web Workers\n\t\t\t * to improve performance and avoid blocking the UI when highlighting very large chunks of code. This option is\n\t\t\t * [disabled by default](https://prismjs.com/faq.html#why-is-asynchronous-highlighting-disabled-by-default).\n\t\t\t *\n\t\t\t * Note: All language definitions required to highlight the code must be included in the main `prism.js` file for\n\t\t\t * asynchronous highlighting to work. You can build your own bundle on the\n\t\t\t * [Download page](https://prismjs.com/download.html).\n\t\t\t * @param {HighlightCallback} [callback] An optional callback to be invoked after the highlighting is done.\n\t\t\t * Mostly useful when `async` is `true`, since in that case, the highlighting is done asynchronously.\n\t\t\t * @memberof Prism\n\t\t\t * @public\n\t\t\t */\n\t\t\thighlightElement: function (element, async, callback) {\n\t\t\t\t// Find language\n\t\t\t\tvar language = _.util.getLanguage(element);\n\t\t\t\tvar grammar = _.languages[language];\n\n\t\t\t\t// Set language on the element, if not present\n\t\t\t\t_.util.setLanguage(element, language);\n\n\t\t\t\t// Set language on the parent, for styling\n\t\t\t\tvar parent = element.parentElement;\n\t\t\t\tif (parent && parent.nodeName.toLowerCase() === 'pre') {\n\t\t\t\t\t_.util.setLanguage(parent, language);\n\t\t\t\t}\n\n\t\t\t\tvar code = element.textContent;\n\n\t\t\t\tvar env = {\n\t\t\t\t\telement: element,\n\t\t\t\t\tlanguage: language,\n\t\t\t\t\tgrammar: grammar,\n\t\t\t\t\tcode: code\n\t\t\t\t};\n\n\t\t\t\tfunction insertHighlightedCode(highlightedCode) {\n\t\t\t\t\tenv.highlightedCode = highlightedCode;\n\n\t\t\t\t\t_.hooks.run('before-insert', env);\n\n\t\t\t\t\tenv.element.innerHTML = env.highlightedCode;\n\n\t\t\t\t\t_.hooks.run('after-highlight', env);\n\t\t\t\t\t_.hooks.run('complete', env);\n\t\t\t\t\tcallback && callback.call(env.element);\n\t\t\t\t}\n\n\t\t\t\t_.hooks.run('before-sanity-check', env);\n\n\t\t\t\t// plugins may change/add the parent/element\n\t\t\t\tparent = env.element.parentElement;\n\t\t\t\tif (parent && parent.nodeName.toLowerCase() === 'pre' && !parent.hasAttribute('tabindex')) {\n\t\t\t\t\tparent.setAttribute('tabindex', '0');\n\t\t\t\t}\n\n\t\t\t\tif (!env.code) {\n\t\t\t\t\t_.hooks.run('complete', env);\n\t\t\t\t\tcallback && callback.call(env.element);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t_.hooks.run('before-highlight', env);\n\n\t\t\t\tif (!env.grammar) {\n\t\t\t\t\tinsertHighlightedCode(_.util.encode(env.code));\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tif (async && _self.Worker) {\n\t\t\t\t\tvar worker = new Worker(_.filename);\n\n\t\t\t\t\tworker.onmessage = function (evt) {\n\t\t\t\t\t\tinsertHighlightedCode(evt.data);\n\t\t\t\t\t};\n\n\t\t\t\t\tworker.postMessage(JSON.stringify({\n\t\t\t\t\t\tlanguage: env.language,\n\t\t\t\t\t\tcode: env.code,\n\t\t\t\t\t\timmediateClose: true\n\t\t\t\t\t}));\n\t\t\t\t} else {\n\t\t\t\t\tinsertHighlightedCode(_.highlight(env.code, env.grammar, env.language));\n\t\t\t\t}\n\t\t\t},\n\n\t\t\t/**\n\t\t\t * Low-level function, only use if you know what you’re doing. It accepts a string of text as input\n\t\t\t * and the language definitions to use, and returns a string with the HTML produced.\n\t\t\t *\n\t\t\t * The following hooks will be run:\n\t\t\t * 1. `before-tokenize`\n\t\t\t * 2. `after-tokenize`\n\t\t\t * 3. `wrap`: On each {@link Token}.\n\t\t\t *\n\t\t\t * @param {string} text A string with the code to be highlighted.\n\t\t\t * @param {Grammar} grammar An object containing the tokens to use.\n\t\t\t *\n\t\t\t * Usually a language definition like `Prism.languages.markup`.\n\t\t\t * @param {string} language The name of the language definition passed to `grammar`.\n\t\t\t * @returns {string} The highlighted HTML.\n\t\t\t * @memberof Prism\n\t\t\t * @public\n\t\t\t * @example\n\t\t\t * Prism.highlight('var foo = true;', Prism.languages.javascript, 'javascript');\n\t\t\t */\n\t\t\thighlight: function (text, grammar, language) {\n\t\t\t\tvar env = {\n\t\t\t\t\tcode: text,\n\t\t\t\t\tgrammar: grammar,\n\t\t\t\t\tlanguage: language\n\t\t\t\t};\n\t\t\t\t_.hooks.run('before-tokenize', env);\n\t\t\t\tif (!env.grammar) {\n\t\t\t\t\tthrow new Error('The language \"' + env.language + '\" has no grammar.');\n\t\t\t\t}\n\t\t\t\tenv.tokens = _.tokenize(env.code, env.grammar);\n\t\t\t\t_.hooks.run('after-tokenize', env);\n\t\t\t\treturn Token.stringify(_.util.encode(env.tokens), env.language);\n\t\t\t},\n\n\t\t\t/**\n\t\t\t * This is the heart of Prism, and the most low-level function you can use. It accepts a string of text as input\n\t\t\t * and the language definitions to use, and returns an array with the tokenized code.\n\t\t\t *\n\t\t\t * When the language definition includes nested tokens, the function is called recursively on each of these tokens.\n\t\t\t *\n\t\t\t * This method could be useful in other contexts as well, as a very crude parser.\n\t\t\t *\n\t\t\t * @param {string} text A string with the code to be highlighted.\n\t\t\t * @param {Grammar} grammar An object containing the tokens to use.\n\t\t\t *\n\t\t\t * Usually a language definition like `Prism.languages.markup`.\n\t\t\t * @returns {TokenStream} An array of strings and tokens, a token stream.\n\t\t\t * @memberof Prism\n\t\t\t * @public\n\t\t\t * @example\n\t\t\t * let code = `var foo = 0;`;\n\t\t\t * let tokens = Prism.tokenize(code, Prism.languages.javascript);\n\t\t\t * tokens.forEach(token => {\n\t\t\t *     if (token instanceof Prism.Token && token.type === 'number') {\n\t\t\t *         console.log(`Found numeric literal: ${token.content}`);\n\t\t\t *     }\n\t\t\t * });\n\t\t\t */\n\t\t\ttokenize: function (text, grammar) {\n\t\t\t\tvar rest = grammar.rest;\n\t\t\t\tif (rest) {\n\t\t\t\t\tfor (var token in rest) {\n\t\t\t\t\t\tgrammar[token] = rest[token];\n\t\t\t\t\t}\n\n\t\t\t\t\tdelete grammar.rest;\n\t\t\t\t}\n\n\t\t\t\tvar tokenList = new LinkedList();\n\t\t\t\taddAfter(tokenList, tokenList.head, text);\n\n\t\t\t\tmatchGrammar(text, tokenList, grammar, tokenList.head, 0);\n\n\t\t\t\treturn toArray(tokenList);\n\t\t\t},\n\n\t\t\t/**\n\t\t\t * @namespace\n\t\t\t * @memberof Prism\n\t\t\t * @public\n\t\t\t */\n\t\t\thooks: {\n\t\t\t\tall: {},\n\n\t\t\t\t/**\n\t\t\t\t * Adds the given callback to the list of callbacks for the given hook.\n\t\t\t\t *\n\t\t\t\t * The callback will be invoked when the hook it is registered for is run.\n\t\t\t\t * Hooks are usually directly run by a highlight function but you can also run hooks yourself.\n\t\t\t\t *\n\t\t\t\t * One callback function can be registered to multiple hooks and the same hook multiple times.\n\t\t\t\t *\n\t\t\t\t * @param {string} name The name of the hook.\n\t\t\t\t * @param {HookCallback} callback The callback function which is given environment variables.\n\t\t\t\t * @public\n\t\t\t\t */\n\t\t\t\tadd: function (name, callback) {\n\t\t\t\t\tvar hooks = _.hooks.all;\n\n\t\t\t\t\thooks[name] = hooks[name] || [];\n\n\t\t\t\t\thooks[name].push(callback);\n\t\t\t\t},\n\n\t\t\t\t/**\n\t\t\t\t * Runs a hook invoking all registered callbacks with the given environment variables.\n\t\t\t\t *\n\t\t\t\t * Callbacks will be invoked synchronously and in the order in which they were registered.\n\t\t\t\t *\n\t\t\t\t * @param {string} name The name of the hook.\n\t\t\t\t * @param {Object<string, any>} env The environment variables of the hook passed to all callbacks registered.\n\t\t\t\t * @public\n\t\t\t\t */\n\t\t\t\trun: function (name, env) {\n\t\t\t\t\tvar callbacks = _.hooks.all[name];\n\n\t\t\t\t\tif (!callbacks || !callbacks.length) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tfor (var i = 0, callback; (callback = callbacks[i++]);) {\n\t\t\t\t\t\tcallback(env);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\n\t\t\tToken: Token\n\t\t};\n\t\t_self.Prism = _;\n\n\n\t\t// Typescript note:\n\t\t// The following can be used to import the Token type in JSDoc:\n\t\t//\n\t\t//   @typedef {InstanceType<import(\"./prism-core\")[\"Token\"]>} Token\n\n\t\t/**\n\t\t * Creates a new token.\n\t\t *\n\t\t * @param {string} type See {@link Token#type type}\n\t\t * @param {string | TokenStream} content See {@link Token#content content}\n\t\t * @param {string|string[]} [alias] The alias(es) of the token.\n\t\t * @param {string} [matchedStr=\"\"] A copy of the full string this token was created from.\n\t\t * @class\n\t\t * @global\n\t\t * @public\n\t\t */\n\t\tfunction Token(type, content, alias, matchedStr) {\n\t\t\t/**\n\t\t\t * The type of the token.\n\t\t\t *\n\t\t\t * This is usually the key of a pattern in a {@link Grammar}.\n\t\t\t *\n\t\t\t * @type {string}\n\t\t\t * @see GrammarToken\n\t\t\t * @public\n\t\t\t */\n\t\t\tthis.type = type;\n\t\t\t/**\n\t\t\t * The strings or tokens contained by this token.\n\t\t\t *\n\t\t\t * This will be a token stream if the pattern matched also defined an `inside` grammar.\n\t\t\t *\n\t\t\t * @type {string | TokenStream}\n\t\t\t * @public\n\t\t\t */\n\t\t\tthis.content = content;\n\t\t\t/**\n\t\t\t * The alias(es) of the token.\n\t\t\t *\n\t\t\t * @type {string|string[]}\n\t\t\t * @see GrammarToken\n\t\t\t * @public\n\t\t\t */\n\t\t\tthis.alias = alias;\n\t\t\t// Copy of the full string this token was created from\n\t\t\tthis.length = (matchedStr || '').length | 0;\n\t\t}\n\n\t\t/**\n\t\t * A token stream is an array of strings and {@link Token Token} objects.\n\t\t *\n\t\t * Token streams have to fulfill a few properties that are assumed by most functions (mostly internal ones) that process\n\t\t * them.\n\t\t *\n\t\t * 1. No adjacent strings.\n\t\t * 2. No empty strings.\n\t\t *\n\t\t *    The only exception here is the token stream that only contains the empty string and nothing else.\n\t\t *\n\t\t * @typedef {Array<string | Token>} TokenStream\n\t\t * @global\n\t\t * @public\n\t\t */\n\n\t\t/**\n\t\t * Converts the given token or token stream to an HTML representation.\n\t\t *\n\t\t * The following hooks will be run:\n\t\t * 1. `wrap`: On each {@link Token}.\n\t\t *\n\t\t * @param {string | Token | TokenStream} o The token or token stream to be converted.\n\t\t * @param {string} language The name of current language.\n\t\t * @returns {string} The HTML representation of the token or token stream.\n\t\t * @memberof Token\n\t\t * @static\n\t\t */\n\t\tToken.stringify = function stringify(o, language) {\n\t\t\tif (typeof o == 'string') {\n\t\t\t\treturn o;\n\t\t\t}\n\t\t\tif (Array.isArray(o)) {\n\t\t\t\tvar s = '';\n\t\t\t\to.forEach(function (e) {\n\t\t\t\t\ts += stringify(e, language);\n\t\t\t\t});\n\t\t\t\treturn s;\n\t\t\t}\n\n\t\t\tvar env = {\n\t\t\t\ttype: o.type,\n\t\t\t\tcontent: stringify(o.content, language),\n\t\t\t\ttag: 'span',\n\t\t\t\tclasses: ['token', o.type],\n\t\t\t\tattributes: {},\n\t\t\t\tlanguage: language\n\t\t\t};\n\n\t\t\tvar aliases = o.alias;\n\t\t\tif (aliases) {\n\t\t\t\tif (Array.isArray(aliases)) {\n\t\t\t\t\tArray.prototype.push.apply(env.classes, aliases);\n\t\t\t\t} else {\n\t\t\t\t\tenv.classes.push(aliases);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t_.hooks.run('wrap', env);\n\n\t\t\tvar attributes = '';\n\t\t\tfor (var name in env.attributes) {\n\t\t\t\tattributes += ' ' + name + '=\"' + (env.attributes[name] || '').replace(/\"/g, '&quot;') + '\"';\n\t\t\t}\n\n\t\t\treturn '<' + env.tag + ' class=\"' + env.classes.join(' ') + '\"' + attributes + '>' + env.content + '</' + env.tag + '>';\n\t\t};\n\n\t\t/**\n\t\t * @param {RegExp} pattern\n\t\t * @param {number} pos\n\t\t * @param {string} text\n\t\t * @param {boolean} lookbehind\n\t\t * @returns {RegExpExecArray | null}\n\t\t */\n\t\tfunction matchPattern(pattern, pos, text, lookbehind) {\n\t\t\tpattern.lastIndex = pos;\n\t\t\tvar match = pattern.exec(text);\n\t\t\tif (match && lookbehind && match[1]) {\n\t\t\t\t// change the match to remove the text matched by the Prism lookbehind group\n\t\t\t\tvar lookbehindLength = match[1].length;\n\t\t\t\tmatch.index += lookbehindLength;\n\t\t\t\tmatch[0] = match[0].slice(lookbehindLength);\n\t\t\t}\n\t\t\treturn match;\n\t\t}\n\n\t\t/**\n\t\t * @param {string} text\n\t\t * @param {LinkedList<string | Token>} tokenList\n\t\t * @param {any} grammar\n\t\t * @param {LinkedListNode<string | Token>} startNode\n\t\t * @param {number} startPos\n\t\t * @param {RematchOptions} [rematch]\n\t\t * @returns {void}\n\t\t * @private\n\t\t *\n\t\t * @typedef RematchOptions\n\t\t * @property {string} cause\n\t\t * @property {number} reach\n\t\t */\n\t\tfunction matchGrammar(text, tokenList, grammar, startNode, startPos, rematch) {\n\t\t\tfor (var token in grammar) {\n\t\t\t\tif (!grammar.hasOwnProperty(token) || !grammar[token]) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tvar patterns = grammar[token];\n\t\t\t\tpatterns = Array.isArray(patterns) ? patterns : [patterns];\n\n\t\t\t\tfor (var j = 0; j < patterns.length; ++j) {\n\t\t\t\t\tif (rematch && rematch.cause == token + ',' + j) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tvar patternObj = patterns[j];\n\t\t\t\t\tvar inside = patternObj.inside;\n\t\t\t\t\tvar lookbehind = !!patternObj.lookbehind;\n\t\t\t\t\tvar greedy = !!patternObj.greedy;\n\t\t\t\t\tvar alias = patternObj.alias;\n\n\t\t\t\t\tif (greedy && !patternObj.pattern.global) {\n\t\t\t\t\t\t// Without the global flag, lastIndex won't work\n\t\t\t\t\t\tvar flags = patternObj.pattern.toString().match(/[imsuy]*$/)[0];\n\t\t\t\t\t\tpatternObj.pattern = RegExp(patternObj.pattern.source, flags + 'g');\n\t\t\t\t\t}\n\n\t\t\t\t\t/** @type {RegExp} */\n\t\t\t\t\tvar pattern = patternObj.pattern || patternObj;\n\n\t\t\t\t\tfor ( // iterate the token list and keep track of the current token/string position\n\t\t\t\t\t\tvar currentNode = startNode.next, pos = startPos;\n\t\t\t\t\t\tcurrentNode !== tokenList.tail;\n\t\t\t\t\t\tpos += currentNode.value.length, currentNode = currentNode.next\n\t\t\t\t\t) {\n\n\t\t\t\t\t\tif (rematch && pos >= rematch.reach) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tvar str = currentNode.value;\n\n\t\t\t\t\t\tif (tokenList.length > text.length) {\n\t\t\t\t\t\t\t// Something went terribly wrong, ABORT, ABORT!\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (str instanceof Token) {\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tvar removeCount = 1; // this is the to parameter of removeBetween\n\t\t\t\t\t\tvar match;\n\n\t\t\t\t\t\tif (greedy) {\n\t\t\t\t\t\t\tmatch = matchPattern(pattern, pos, text, lookbehind);\n\t\t\t\t\t\t\tif (!match || match.index >= text.length) {\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tvar from = match.index;\n\t\t\t\t\t\t\tvar to = match.index + match[0].length;\n\t\t\t\t\t\t\tvar p = pos;\n\n\t\t\t\t\t\t\t// find the node that contains the match\n\t\t\t\t\t\t\tp += currentNode.value.length;\n\t\t\t\t\t\t\twhile (from >= p) {\n\t\t\t\t\t\t\t\tcurrentNode = currentNode.next;\n\t\t\t\t\t\t\t\tp += currentNode.value.length;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t// adjust pos (and p)\n\t\t\t\t\t\t\tp -= currentNode.value.length;\n\t\t\t\t\t\t\tpos = p;\n\n\t\t\t\t\t\t\t// the current node is a Token, then the match starts inside another Token, which is invalid\n\t\t\t\t\t\t\tif (currentNode.value instanceof Token) {\n\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// find the last node which is affected by this match\n\t\t\t\t\t\t\tfor (\n\t\t\t\t\t\t\t\tvar k = currentNode;\n\t\t\t\t\t\t\t\tk !== tokenList.tail && (p < to || typeof k.value === 'string');\n\t\t\t\t\t\t\t\tk = k.next\n\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\tremoveCount++;\n\t\t\t\t\t\t\t\tp += k.value.length;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tremoveCount--;\n\n\t\t\t\t\t\t\t// replace with the new match\n\t\t\t\t\t\t\tstr = text.slice(pos, p);\n\t\t\t\t\t\t\tmatch.index -= pos;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tmatch = matchPattern(pattern, 0, str, lookbehind);\n\t\t\t\t\t\t\tif (!match) {\n\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// eslint-disable-next-line no-redeclare\n\t\t\t\t\t\tvar from = match.index;\n\t\t\t\t\t\tvar matchStr = match[0];\n\t\t\t\t\t\tvar before = str.slice(0, from);\n\t\t\t\t\t\tvar after = str.slice(from + matchStr.length);\n\n\t\t\t\t\t\tvar reach = pos + str.length;\n\t\t\t\t\t\tif (rematch && reach > rematch.reach) {\n\t\t\t\t\t\t\trematch.reach = reach;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tvar removeFrom = currentNode.prev;\n\n\t\t\t\t\t\tif (before) {\n\t\t\t\t\t\t\tremoveFrom = addAfter(tokenList, removeFrom, before);\n\t\t\t\t\t\t\tpos += before.length;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tremoveRange(tokenList, removeFrom, removeCount);\n\n\t\t\t\t\t\tvar wrapped = new Token(token, inside ? _.tokenize(matchStr, inside) : matchStr, alias, matchStr);\n\t\t\t\t\t\tcurrentNode = addAfter(tokenList, removeFrom, wrapped);\n\n\t\t\t\t\t\tif (after) {\n\t\t\t\t\t\t\taddAfter(tokenList, currentNode, after);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (removeCount > 1) {\n\t\t\t\t\t\t\t// at least one Token object was removed, so we have to do some rematching\n\t\t\t\t\t\t\t// this can only happen if the current pattern is greedy\n\n\t\t\t\t\t\t\t/** @type {RematchOptions} */\n\t\t\t\t\t\t\tvar nestedRematch = {\n\t\t\t\t\t\t\t\tcause: token + ',' + j,\n\t\t\t\t\t\t\t\treach: reach\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\tmatchGrammar(text, tokenList, grammar, currentNode.prev, pos, nestedRematch);\n\n\t\t\t\t\t\t\t// the reach might have been extended because of the rematching\n\t\t\t\t\t\t\tif (rematch && nestedRematch.reach > rematch.reach) {\n\t\t\t\t\t\t\t\trematch.reach = nestedRematch.reach;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * @typedef LinkedListNode\n\t\t * @property {T} value\n\t\t * @property {LinkedListNode<T> | null} prev The previous node.\n\t\t * @property {LinkedListNode<T> | null} next The next node.\n\t\t * @template T\n\t\t * @private\n\t\t */\n\n\t\t/**\n\t\t * @template T\n\t\t * @private\n\t\t */\n\t\tfunction LinkedList() {\n\t\t\t/** @type {LinkedListNode<T>} */\n\t\t\tvar head = { value: null, prev: null, next: null };\n\t\t\t/** @type {LinkedListNode<T>} */\n\t\t\tvar tail = { value: null, prev: head, next: null };\n\t\t\thead.next = tail;\n\n\t\t\t/** @type {LinkedListNode<T>} */\n\t\t\tthis.head = head;\n\t\t\t/** @type {LinkedListNode<T>} */\n\t\t\tthis.tail = tail;\n\t\t\tthis.length = 0;\n\t\t}\n\n\t\t/**\n\t\t * Adds a new node with the given value to the list.\n\t\t *\n\t\t * @param {LinkedList<T>} list\n\t\t * @param {LinkedListNode<T>} node\n\t\t * @param {T} value\n\t\t * @returns {LinkedListNode<T>} The added node.\n\t\t * @template T\n\t\t */\n\t\tfunction addAfter(list, node, value) {\n\t\t\t// assumes that node != list.tail && values.length >= 0\n\t\t\tvar next = node.next;\n\n\t\t\tvar newNode = { value: value, prev: node, next: next };\n\t\t\tnode.next = newNode;\n\t\t\tnext.prev = newNode;\n\t\t\tlist.length++;\n\n\t\t\treturn newNode;\n\t\t}\n\t\t/**\n\t\t * Removes `count` nodes after the given node. The given node will not be removed.\n\t\t *\n\t\t * @param {LinkedList<T>} list\n\t\t * @param {LinkedListNode<T>} node\n\t\t * @param {number} count\n\t\t * @template T\n\t\t */\n\t\tfunction removeRange(list, node, count) {\n\t\t\tvar next = node.next;\n\t\t\tfor (var i = 0; i < count && next !== list.tail; i++) {\n\t\t\t\tnext = next.next;\n\t\t\t}\n\t\t\tnode.next = next;\n\t\t\tnext.prev = node;\n\t\t\tlist.length -= i;\n\t\t}\n\t\t/**\n\t\t * @param {LinkedList<T>} list\n\t\t * @returns {T[]}\n\t\t * @template T\n\t\t */\n\t\tfunction toArray(list) {\n\t\t\tvar array = [];\n\t\t\tvar node = list.head.next;\n\t\t\twhile (node !== list.tail) {\n\t\t\t\tarray.push(node.value);\n\t\t\t\tnode = node.next;\n\t\t\t}\n\t\t\treturn array;\n\t\t}\n\n\n\t\tif (!_self.document) {\n\t\t\tif (!_self.addEventListener) {\n\t\t\t\t// in Node.js\n\t\t\t\treturn _;\n\t\t\t}\n\n\t\t\tif (!_.disableWorkerMessageHandler) {\n\t\t\t\t// In worker\n\t\t\t\t_self.addEventListener('message', function (evt) {\n\t\t\t\t\tvar message = JSON.parse(evt.data);\n\t\t\t\t\tvar lang = message.language;\n\t\t\t\t\tvar code = message.code;\n\t\t\t\t\tvar immediateClose = message.immediateClose;\n\n\t\t\t\t\t_self.postMessage(_.highlight(code, _.languages[lang], lang));\n\t\t\t\t\tif (immediateClose) {\n\t\t\t\t\t\t_self.close();\n\t\t\t\t\t}\n\t\t\t\t}, false);\n\t\t\t}\n\n\t\t\treturn _;\n\t\t}\n\n\t\t// Get current script and highlight\n\t\tvar script = _.util.currentScript();\n\n\t\tif (script) {\n\t\t\t_.filename = script.src;\n\n\t\t\tif (script.hasAttribute('data-manual')) {\n\t\t\t\t_.manual = true;\n\t\t\t}\n\t\t}\n\n\t\tfunction highlightAutomaticallyCallback() {\n\t\t\tif (!_.manual) {\n\t\t\t\t_.highlightAll();\n\t\t\t}\n\t\t}\n\n\t\tif (!_.manual) {\n\t\t\t// If the document state is \"loading\", then we'll use DOMContentLoaded.\n\t\t\t// If the document state is \"interactive\" and the prism.js script is deferred, then we'll also use the\n\t\t\t// DOMContentLoaded event because there might be some plugins or languages which have also been deferred and they\n\t\t\t// might take longer one animation frame to execute which can create a race condition where only some plugins have\n\t\t\t// been loaded when Prism.highlightAll() is executed, depending on how fast resources are loaded.\n\t\t\t// See https://github.com/PrismJS/prism/issues/2102\n\t\t\tvar readyState = document.readyState;\n\t\t\tif (readyState === 'loading' || readyState === 'interactive' && script && script.defer) {\n\t\t\t\tdocument.addEventListener('DOMContentLoaded', highlightAutomaticallyCallback);\n\t\t\t} else {\n\t\t\t\tif (window.requestAnimationFrame) {\n\t\t\t\t\twindow.requestAnimationFrame(highlightAutomaticallyCallback);\n\t\t\t\t} else {\n\t\t\t\t\twindow.setTimeout(highlightAutomaticallyCallback, 16);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn _;\n\n\t}(_self));\n\n\tif ( module.exports) {\n\t\tmodule.exports = Prism;\n\t}\n\n\t// hack for components to work correctly in node.js\n\tif (typeof commonjsGlobal !== 'undefined') {\n\t\tcommonjsGlobal.Prism = Prism;\n\t}\n\n\t// some additional documentation/types\n\n\t/**\n\t * The expansion of a simple `RegExp` literal to support additional properties.\n\t *\n\t * @typedef GrammarToken\n\t * @property {RegExp} pattern The regular expression of the token.\n\t * @property {boolean} [lookbehind=false] If `true`, then the first capturing group of `pattern` will (effectively)\n\t * behave as a lookbehind group meaning that the captured text will not be part of the matched text of the new token.\n\t * @property {boolean} [greedy=false] Whether the token is greedy.\n\t * @property {string|string[]} [alias] An optional alias or list of aliases.\n\t * @property {Grammar} [inside] The nested grammar of this token.\n\t *\n\t * The `inside` grammar will be used to tokenize the text value of each token of this kind.\n\t *\n\t * This can be used to make nested and even recursive language definitions.\n\t *\n\t * Note: This can cause infinite recursion. Be careful when you embed different languages or even the same language into\n\t * each another.\n\t * @global\n\t * @public\n\t */\n\n\t/**\n\t * @typedef Grammar\n\t * @type {Object<string, RegExp | GrammarToken | Array<RegExp | GrammarToken>>}\n\t * @property {Grammar} [rest] An optional grammar object that will be appended to this grammar.\n\t * @global\n\t * @public\n\t */\n\n\t/**\n\t * A function which will invoked after an element was successfully highlighted.\n\t *\n\t * @callback HighlightCallback\n\t * @param {Element} element The element successfully highlighted.\n\t * @returns {void}\n\t * @global\n\t * @public\n\t */\n\n\t/**\n\t * @callback HookCallback\n\t * @param {Object<string, any>} env The environment variables of the hook.\n\t * @returns {void}\n\t * @global\n\t * @public\n\t */\n\t});\n\n\tPrism.languages.clike = {\n\t\t'comment': [\n\t\t\t{\n\t\t\t\tpattern: /(^|[^\\\\])\\/\\*[\\s\\S]*?(?:\\*\\/|$)/,\n\t\t\t\tlookbehind: true,\n\t\t\t\tgreedy: true\n\t\t\t},\n\t\t\t{\n\t\t\t\tpattern: /(^|[^\\\\:])\\/\\/.*/,\n\t\t\t\tlookbehind: true,\n\t\t\t\tgreedy: true\n\t\t\t}\n\t\t],\n\t\t'string': {\n\t\t\tpattern: /([\"'])(?:\\\\(?:\\r\\n|[\\s\\S])|(?!\\1)[^\\\\\\r\\n])*\\1/,\n\t\t\tgreedy: true\n\t\t},\n\t\t'class-name': {\n\t\t\tpattern: /(\\b(?:class|extends|implements|instanceof|interface|new|trait)\\s+|\\bcatch\\s+\\()[\\w.\\\\]+/i,\n\t\t\tlookbehind: true,\n\t\t\tinside: {\n\t\t\t\t'punctuation': /[.\\\\]/\n\t\t\t}\n\t\t},\n\t\t'keyword': /\\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\\b/,\n\t\t'boolean': /\\b(?:false|true)\\b/,\n\t\t'function': /\\b\\w+(?=\\()/,\n\t\t'number': /\\b0x[\\da-f]+\\b|(?:\\b\\d+(?:\\.\\d*)?|\\B\\.\\d+)(?:e[+-]?\\d+)?/i,\n\t\t'operator': /[<>]=?|[!=]=?=?|--?|\\+\\+?|&&?|\\|\\|?|[?*/~^%]/,\n\t\t'punctuation': /[{}[\\];(),.:]/\n\t};\n\n\tPrism.languages.c = Prism.languages.extend('clike', {\n\t\t'comment': {\n\t\t\tpattern: /\\/\\/(?:[^\\r\\n\\\\]|\\\\(?:\\r\\n?|\\n|(?![\\r\\n])))*|\\/\\*[\\s\\S]*?(?:\\*\\/|$)/,\n\t\t\tgreedy: true\n\t\t},\n\t\t'string': {\n\t\t\t// https://en.cppreference.com/w/c/language/string_literal\n\t\t\tpattern: /\"(?:\\\\(?:\\r\\n|[\\s\\S])|[^\"\\\\\\r\\n])*\"/,\n\t\t\tgreedy: true\n\t\t},\n\t\t'class-name': {\n\t\t\tpattern: /(\\b(?:enum|struct)\\s+(?:__attribute__\\s*\\(\\([\\s\\S]*?\\)\\)\\s*)?)\\w+|\\b[a-z]\\w*_t\\b/,\n\t\t\tlookbehind: true\n\t\t},\n\t\t'keyword': /\\b(?:_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|__attribute__|asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|inline|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|typeof|union|unsigned|void|volatile|while)\\b/,\n\t\t'function': /\\b[a-z_]\\w*(?=\\s*\\()/i,\n\t\t'number': /(?:\\b0x(?:[\\da-f]+(?:\\.[\\da-f]*)?|\\.[\\da-f]+)(?:p[+-]?\\d+)?|(?:\\b\\d+(?:\\.\\d*)?|\\B\\.\\d+)(?:e[+-]?\\d+)?)[ful]{0,4}/i,\n\t\t'operator': />>=?|<<=?|->|([-+&|:])\\1|[?:~]|[-+*/%&|^!=<>]=?/\n\t});\n\n\tPrism.languages.insertBefore('c', 'string', {\n\t\t'char': {\n\t\t\t// https://en.cppreference.com/w/c/language/character_constant\n\t\t\tpattern: /'(?:\\\\(?:\\r\\n|[\\s\\S])|[^'\\\\\\r\\n]){0,32}'/,\n\t\t\tgreedy: true\n\t\t}\n\t});\n\n\tPrism.languages.insertBefore('c', 'string', {\n\t\t'macro': {\n\t\t\t// allow for multiline macro definitions\n\t\t\t// spaces after the # character compile fine with gcc\n\t\t\tpattern: /(^[\\t ]*)#\\s*[a-z](?:[^\\r\\n\\\\/]|\\/(?!\\*)|\\/\\*(?:[^*]|\\*(?!\\/))*\\*\\/|\\\\(?:\\r\\n|[\\s\\S]))*/im,\n\t\t\tlookbehind: true,\n\t\t\tgreedy: true,\n\t\t\talias: 'property',\n\t\t\tinside: {\n\t\t\t\t'string': [\n\t\t\t\t\t{\n\t\t\t\t\t\t// highlight the path of the include statement as a string\n\t\t\t\t\t\tpattern: /^(#\\s*include\\s*)<[^>]+>/,\n\t\t\t\t\t\tlookbehind: true\n\t\t\t\t\t},\n\t\t\t\t\tPrism.languages.c['string']\n\t\t\t\t],\n\t\t\t\t'char': Prism.languages.c['char'],\n\t\t\t\t'comment': Prism.languages.c['comment'],\n\t\t\t\t'macro-name': [\n\t\t\t\t\t{\n\t\t\t\t\t\tpattern: /(^#\\s*define\\s+)\\w+\\b(?!\\()/i,\n\t\t\t\t\t\tlookbehind: true\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tpattern: /(^#\\s*define\\s+)\\w+\\b(?=\\()/i,\n\t\t\t\t\t\tlookbehind: true,\n\t\t\t\t\t\talias: 'function'\n\t\t\t\t\t}\n\t\t\t\t],\n\t\t\t\t// highlight macro directives as keywords\n\t\t\t\t'directive': {\n\t\t\t\t\tpattern: /^(#\\s*)[a-z]+/,\n\t\t\t\t\tlookbehind: true,\n\t\t\t\t\talias: 'keyword'\n\t\t\t\t},\n\t\t\t\t'directive-hash': /^#/,\n\t\t\t\t'punctuation': /##|\\\\(?=[\\r\\n])/,\n\t\t\t\t'expression': {\n\t\t\t\t\tpattern: /\\S[\\s\\S]*/,\n\t\t\t\t\tinside: Prism.languages.c\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t});\n\n\tPrism.languages.insertBefore('c', 'function', {\n\t\t// highlight predefined macros as constants\n\t\t'constant': /\\b(?:EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|__DATE__|__FILE__|__LINE__|__TIMESTAMP__|__TIME__|__func__|stderr|stdin|stdout)\\b/\n\t});\n\n\tdelete Prism.languages.c['boolean'];\n\n\t(function (Prism) {\n\n\t\t/**\n\t\t * Replaces all placeholders \"<<n>>\" of given pattern with the n-th replacement (zero based).\n\t\t *\n\t\t * Note: This is a simple text based replacement. Be careful when using backreferences!\n\t\t *\n\t\t * @param {string} pattern the given pattern.\n\t\t * @param {string[]} replacements a list of replacement which can be inserted into the given pattern.\n\t\t * @returns {string} the pattern with all placeholders replaced with their corresponding replacements.\n\t\t * @example replace(/a<<0>>a/.source, [/b+/.source]) === /a(?:b+)a/.source\n\t\t */\n\t\tfunction replace(pattern, replacements) {\n\t\t\treturn pattern.replace(/<<(\\d+)>>/g, function (m, index) {\n\t\t\t\treturn '(?:' + replacements[+index] + ')';\n\t\t\t});\n\t\t}\n\t\t/**\n\t\t * @param {string} pattern\n\t\t * @param {string[]} replacements\n\t\t * @param {string} [flags]\n\t\t * @returns {RegExp}\n\t\t */\n\t\tfunction re(pattern, replacements, flags) {\n\t\t\treturn RegExp(replace(pattern, replacements), flags || '');\n\t\t}\n\n\t\t/**\n\t\t * Creates a nested pattern where all occurrences of the string `<<self>>` are replaced with the pattern itself.\n\t\t *\n\t\t * @param {string} pattern\n\t\t * @param {number} depthLog2\n\t\t * @returns {string}\n\t\t */\n\t\tfunction nested(pattern, depthLog2) {\n\t\t\tfor (var i = 0; i < depthLog2; i++) {\n\t\t\t\tpattern = pattern.replace(/<<self>>/g, function () { return '(?:' + pattern + ')'; });\n\t\t\t}\n\t\t\treturn pattern.replace(/<<self>>/g, '[^\\\\s\\\\S]');\n\t\t}\n\n\t\t// https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/keywords/\n\t\tvar keywordKinds = {\n\t\t\t// keywords which represent a return or variable type\n\t\t\ttype: 'bool byte char decimal double dynamic float int long object sbyte short string uint ulong ushort var void',\n\t\t\t// keywords which are used to declare a type\n\t\t\ttypeDeclaration: 'class enum interface record struct',\n\t\t\t// contextual keywords\n\t\t\t// (\"var\" and \"dynamic\" are missing because they are used like types)\n\t\t\tcontextual: 'add alias and ascending async await by descending from(?=\\\\s*(?:\\\\w|$)) get global group into init(?=\\\\s*;) join let nameof not notnull on or orderby partial remove select set unmanaged value when where with(?=\\\\s*{)',\n\t\t\t// all other keywords\n\t\t\tother: 'abstract as base break case catch checked const continue default delegate do else event explicit extern finally fixed for foreach goto if implicit in internal is lock namespace new null operator out override params private protected public readonly ref return sealed sizeof stackalloc static switch this throw try typeof unchecked unsafe using virtual volatile while yield'\n\t\t};\n\n\t\t// keywords\n\t\tfunction keywordsToPattern(words) {\n\t\t\treturn '\\\\b(?:' + words.trim().replace(/ /g, '|') + ')\\\\b';\n\t\t}\n\t\tvar typeDeclarationKeywords = keywordsToPattern(keywordKinds.typeDeclaration);\n\t\tvar keywords = RegExp(keywordsToPattern(keywordKinds.type + ' ' + keywordKinds.typeDeclaration + ' ' + keywordKinds.contextual + ' ' + keywordKinds.other));\n\t\tvar nonTypeKeywords = keywordsToPattern(keywordKinds.typeDeclaration + ' ' + keywordKinds.contextual + ' ' + keywordKinds.other);\n\t\tvar nonContextualKeywords = keywordsToPattern(keywordKinds.type + ' ' + keywordKinds.typeDeclaration + ' ' + keywordKinds.other);\n\n\t\t// types\n\t\tvar generic = nested(/<(?:[^<>;=+\\-*/%&|^]|<<self>>)*>/.source, 2); // the idea behind the other forbidden characters is to prevent false positives. Same for tupleElement.\n\t\tvar nestedRound = nested(/\\((?:[^()]|<<self>>)*\\)/.source, 2);\n\t\tvar name = /@?\\b[A-Za-z_]\\w*\\b/.source;\n\t\tvar genericName = replace(/<<0>>(?:\\s*<<1>>)?/.source, [name, generic]);\n\t\tvar identifier = replace(/(?!<<0>>)<<1>>(?:\\s*\\.\\s*<<1>>)*/.source, [nonTypeKeywords, genericName]);\n\t\tvar array = /\\[\\s*(?:,\\s*)*\\]/.source;\n\t\tvar typeExpressionWithoutTuple = replace(/<<0>>(?:\\s*(?:\\?\\s*)?<<1>>)*(?:\\s*\\?)?/.source, [identifier, array]);\n\t\tvar tupleElement = replace(/[^,()<>[\\];=+\\-*/%&|^]|<<0>>|<<1>>|<<2>>/.source, [generic, nestedRound, array]);\n\t\tvar tuple = replace(/\\(<<0>>+(?:,<<0>>+)+\\)/.source, [tupleElement]);\n\t\tvar typeExpression = replace(/(?:<<0>>|<<1>>)(?:\\s*(?:\\?\\s*)?<<2>>)*(?:\\s*\\?)?/.source, [tuple, identifier, array]);\n\n\t\tvar typeInside = {\n\t\t\t'keyword': keywords,\n\t\t\t'punctuation': /[<>()?,.:[\\]]/\n\t\t};\n\n\t\t// strings & characters\n\t\t// https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/language-specification/lexical-structure#character-literals\n\t\t// https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/language-specification/lexical-structure#string-literals\n\t\tvar character = /'(?:[^\\r\\n'\\\\]|\\\\.|\\\\[Uux][\\da-fA-F]{1,8})'/.source; // simplified pattern\n\t\tvar regularString = /\"(?:\\\\.|[^\\\\\"\\r\\n])*\"/.source;\n\t\tvar verbatimString = /@\"(?:\"\"|\\\\[\\s\\S]|[^\\\\\"])*\"(?!\")/.source;\n\n\n\t\tPrism.languages.csharp = Prism.languages.extend('clike', {\n\t\t\t'string': [\n\t\t\t\t{\n\t\t\t\t\tpattern: re(/(^|[^$\\\\])<<0>>/.source, [verbatimString]),\n\t\t\t\t\tlookbehind: true,\n\t\t\t\t\tgreedy: true\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tpattern: re(/(^|[^@$\\\\])<<0>>/.source, [regularString]),\n\t\t\t\t\tlookbehind: true,\n\t\t\t\t\tgreedy: true\n\t\t\t\t}\n\t\t\t],\n\t\t\t'class-name': [\n\t\t\t\t{\n\t\t\t\t\t// Using static\n\t\t\t\t\t// using static System.Math;\n\t\t\t\t\tpattern: re(/(\\busing\\s+static\\s+)<<0>>(?=\\s*;)/.source, [identifier]),\n\t\t\t\t\tlookbehind: true,\n\t\t\t\t\tinside: typeInside\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t// Using alias (type)\n\t\t\t\t\t// using Project = PC.MyCompany.Project;\n\t\t\t\t\tpattern: re(/(\\busing\\s+<<0>>\\s*=\\s*)<<1>>(?=\\s*;)/.source, [name, typeExpression]),\n\t\t\t\t\tlookbehind: true,\n\t\t\t\t\tinside: typeInside\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t// Using alias (alias)\n\t\t\t\t\t// using Project = PC.MyCompany.Project;\n\t\t\t\t\tpattern: re(/(\\busing\\s+)<<0>>(?=\\s*=)/.source, [name]),\n\t\t\t\t\tlookbehind: true\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t// Type declarations\n\t\t\t\t\t// class Foo<A, B>\n\t\t\t\t\t// interface Foo<out A, B>\n\t\t\t\t\tpattern: re(/(\\b<<0>>\\s+)<<1>>/.source, [typeDeclarationKeywords, genericName]),\n\t\t\t\t\tlookbehind: true,\n\t\t\t\t\tinside: typeInside\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t// Single catch exception declaration\n\t\t\t\t\t// catch(Foo)\n\t\t\t\t\t// (things like catch(Foo e) is covered by variable declaration)\n\t\t\t\t\tpattern: re(/(\\bcatch\\s*\\(\\s*)<<0>>/.source, [identifier]),\n\t\t\t\t\tlookbehind: true,\n\t\t\t\t\tinside: typeInside\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t// Name of the type parameter of generic constraints\n\t\t\t\t\t// where Foo : class\n\t\t\t\t\tpattern: re(/(\\bwhere\\s+)<<0>>/.source, [name]),\n\t\t\t\t\tlookbehind: true\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t// Casts and checks via as and is.\n\t\t\t\t\t// as Foo<A>, is Bar<B>\n\t\t\t\t\t// (things like if(a is Foo b) is covered by variable declaration)\n\t\t\t\t\tpattern: re(/(\\b(?:is(?:\\s+not)?|as)\\s+)<<0>>/.source, [typeExpressionWithoutTuple]),\n\t\t\t\t\tlookbehind: true,\n\t\t\t\t\tinside: typeInside\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t// Variable, field and parameter declaration\n\t\t\t\t\t// (Foo bar, Bar baz, Foo[,,] bay, Foo<Bar, FooBar<Bar>> bax)\n\t\t\t\t\tpattern: re(/\\b<<0>>(?=\\s+(?!<<1>>|with\\s*\\{)<<2>>(?:\\s*[=,;:{)\\]]|\\s+(?:in|when)\\b))/.source, [typeExpression, nonContextualKeywords, name]),\n\t\t\t\t\tinside: typeInside\n\t\t\t\t}\n\t\t\t],\n\t\t\t'keyword': keywords,\n\t\t\t// https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/language-specification/lexical-structure#literals\n\t\t\t'number': /(?:\\b0(?:x[\\da-f_]*[\\da-f]|b[01_]*[01])|(?:\\B\\.\\d+(?:_+\\d+)*|\\b\\d+(?:_+\\d+)*(?:\\.\\d+(?:_+\\d+)*)?)(?:e[-+]?\\d+(?:_+\\d+)*)?)(?:[dflmu]|lu|ul)?\\b/i,\n\t\t\t'operator': />>=?|<<=?|[-=]>|([-+&|])\\1|~|\\?\\?=?|[-+*/%&|^!=<>]=?/,\n\t\t\t'punctuation': /\\?\\.?|::|[{}[\\];(),.:]/\n\t\t});\n\n\t\tPrism.languages.insertBefore('csharp', 'number', {\n\t\t\t'range': {\n\t\t\t\tpattern: /\\.\\./,\n\t\t\t\talias: 'operator'\n\t\t\t}\n\t\t});\n\n\t\tPrism.languages.insertBefore('csharp', 'punctuation', {\n\t\t\t'named-parameter': {\n\t\t\t\tpattern: re(/([(,]\\s*)<<0>>(?=\\s*:)/.source, [name]),\n\t\t\t\tlookbehind: true,\n\t\t\t\talias: 'punctuation'\n\t\t\t}\n\t\t});\n\n\t\tPrism.languages.insertBefore('csharp', 'class-name', {\n\t\t\t'namespace': {\n\t\t\t\t// namespace Foo.Bar {}\n\t\t\t\t// using Foo.Bar;\n\t\t\t\tpattern: re(/(\\b(?:namespace|using)\\s+)<<0>>(?:\\s*\\.\\s*<<0>>)*(?=\\s*[;{])/.source, [name]),\n\t\t\t\tlookbehind: true,\n\t\t\t\tinside: {\n\t\t\t\t\t'punctuation': /\\./\n\t\t\t\t}\n\t\t\t},\n\t\t\t'type-expression': {\n\t\t\t\t// default(Foo), typeof(Foo<Bar>), sizeof(int)\n\t\t\t\tpattern: re(/(\\b(?:default|sizeof|typeof)\\s*\\(\\s*(?!\\s))(?:[^()\\s]|\\s(?!\\s)|<<0>>)*(?=\\s*\\))/.source, [nestedRound]),\n\t\t\t\tlookbehind: true,\n\t\t\t\talias: 'class-name',\n\t\t\t\tinside: typeInside\n\t\t\t},\n\t\t\t'return-type': {\n\t\t\t\t// Foo<Bar> ForBar(); Foo IFoo.Bar() => 0\n\t\t\t\t// int this[int index] => 0; T IReadOnlyList<T>.this[int index] => this[index];\n\t\t\t\t// int Foo => 0; int Foo { get; set } = 0;\n\t\t\t\tpattern: re(/<<0>>(?=\\s+(?:<<1>>\\s*(?:=>|[({]|\\.\\s*this\\s*\\[)|this\\s*\\[))/.source, [typeExpression, identifier]),\n\t\t\t\tinside: typeInside,\n\t\t\t\talias: 'class-name'\n\t\t\t},\n\t\t\t'constructor-invocation': {\n\t\t\t\t// new List<Foo<Bar[]>> { }\n\t\t\t\tpattern: re(/(\\bnew\\s+)<<0>>(?=\\s*[[({])/.source, [typeExpression]),\n\t\t\t\tlookbehind: true,\n\t\t\t\tinside: typeInside,\n\t\t\t\talias: 'class-name'\n\t\t\t},\n\t\t\t/*'explicit-implementation': {\n\t\t\t\t// int IFoo<Foo>.Bar => 0; void IFoo<Foo<Foo>>.Foo<T>();\n\t\t\t\tpattern: replace(/\\b<<0>>(?=\\.<<1>>)/, className, methodOrPropertyDeclaration),\n\t\t\t\tinside: classNameInside,\n\t\t\t\talias: 'class-name'\n\t\t\t},*/\n\t\t\t'generic-method': {\n\t\t\t\t// foo<Bar>()\n\t\t\t\tpattern: re(/<<0>>\\s*<<1>>(?=\\s*\\()/.source, [name, generic]),\n\t\t\t\tinside: {\n\t\t\t\t\t'function': re(/^<<0>>/.source, [name]),\n\t\t\t\t\t'generic': {\n\t\t\t\t\t\tpattern: RegExp(generic),\n\t\t\t\t\t\talias: 'class-name',\n\t\t\t\t\t\tinside: typeInside\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\t\t\t'type-list': {\n\t\t\t\t// The list of types inherited or of generic constraints\n\t\t\t\t// class Foo<F> : Bar, IList<FooBar>\n\t\t\t\t// where F : Bar, IList<int>\n\t\t\t\tpattern: re(\n\t\t\t\t\t/\\b((?:<<0>>\\s+<<1>>|record\\s+<<1>>\\s*<<5>>|where\\s+<<2>>)\\s*:\\s*)(?:<<3>>|<<4>>|<<1>>\\s*<<5>>|<<6>>)(?:\\s*,\\s*(?:<<3>>|<<4>>|<<6>>))*(?=\\s*(?:where|[{;]|=>|$))/.source,\n\t\t\t\t\t[typeDeclarationKeywords, genericName, name, typeExpression, keywords.source, nestedRound, /\\bnew\\s*\\(\\s*\\)/.source]\n\t\t\t\t),\n\t\t\t\tlookbehind: true,\n\t\t\t\tinside: {\n\t\t\t\t\t'record-arguments': {\n\t\t\t\t\t\tpattern: re(/(^(?!new\\s*\\()<<0>>\\s*)<<1>>/.source, [genericName, nestedRound]),\n\t\t\t\t\t\tlookbehind: true,\n\t\t\t\t\t\tgreedy: true,\n\t\t\t\t\t\tinside: Prism.languages.csharp\n\t\t\t\t\t},\n\t\t\t\t\t'keyword': keywords,\n\t\t\t\t\t'class-name': {\n\t\t\t\t\t\tpattern: RegExp(typeExpression),\n\t\t\t\t\t\tgreedy: true,\n\t\t\t\t\t\tinside: typeInside\n\t\t\t\t\t},\n\t\t\t\t\t'punctuation': /[,()]/\n\t\t\t\t}\n\t\t\t},\n\t\t\t'preprocessor': {\n\t\t\t\tpattern: /(^[\\t ]*)#.*/m,\n\t\t\t\tlookbehind: true,\n\t\t\t\talias: 'property',\n\t\t\t\tinside: {\n\t\t\t\t\t// highlight preprocessor directives as keywords\n\t\t\t\t\t'directive': {\n\t\t\t\t\t\tpattern: /(#)\\b(?:define|elif|else|endif|endregion|error|if|line|nullable|pragma|region|undef|warning)\\b/,\n\t\t\t\t\t\tlookbehind: true,\n\t\t\t\t\t\talias: 'keyword'\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\t// attributes\n\t\tvar regularStringOrCharacter = regularString + '|' + character;\n\t\tvar regularStringCharacterOrComment = replace(/\\/(?![*/])|\\/\\/[^\\r\\n]*[\\r\\n]|\\/\\*(?:[^*]|\\*(?!\\/))*\\*\\/|<<0>>/.source, [regularStringOrCharacter]);\n\t\tvar roundExpression = nested(replace(/[^\"'/()]|<<0>>|\\(<<self>>*\\)/.source, [regularStringCharacterOrComment]), 2);\n\n\t\t// https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/concepts/attributes/#attribute-targets\n\t\tvar attrTarget = /\\b(?:assembly|event|field|method|module|param|property|return|type)\\b/.source;\n\t\tvar attr = replace(/<<0>>(?:\\s*\\(<<1>>*\\))?/.source, [identifier, roundExpression]);\n\n\t\tPrism.languages.insertBefore('csharp', 'class-name', {\n\t\t\t'attribute': {\n\t\t\t\t// Attributes\n\t\t\t\t// [Foo], [Foo(1), Bar(2, Prop = \"foo\")], [return: Foo(1), Bar(2)], [assembly: Foo(Bar)]\n\t\t\t\tpattern: re(/((?:^|[^\\s\\w>)?])\\s*\\[\\s*)(?:<<0>>\\s*:\\s*)?<<1>>(?:\\s*,\\s*<<1>>)*(?=\\s*\\])/.source, [attrTarget, attr]),\n\t\t\t\tlookbehind: true,\n\t\t\t\tgreedy: true,\n\t\t\t\tinside: {\n\t\t\t\t\t'target': {\n\t\t\t\t\t\tpattern: re(/^<<0>>(?=\\s*:)/.source, [attrTarget]),\n\t\t\t\t\t\talias: 'keyword'\n\t\t\t\t\t},\n\t\t\t\t\t'attribute-arguments': {\n\t\t\t\t\t\tpattern: re(/\\(<<0>>*\\)/.source, [roundExpression]),\n\t\t\t\t\t\tinside: Prism.languages.csharp\n\t\t\t\t\t},\n\t\t\t\t\t'class-name': {\n\t\t\t\t\t\tpattern: RegExp(identifier),\n\t\t\t\t\t\tinside: {\n\t\t\t\t\t\t\t'punctuation': /\\./\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\t'punctuation': /[:,]/\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\n\t\t// string interpolation\n\t\tvar formatString = /:[^}\\r\\n]+/.source;\n\t\t// multi line\n\t\tvar mInterpolationRound = nested(replace(/[^\"'/()]|<<0>>|\\(<<self>>*\\)/.source, [regularStringCharacterOrComment]), 2);\n\t\tvar mInterpolation = replace(/\\{(?!\\{)(?:(?![}:])<<0>>)*<<1>>?\\}/.source, [mInterpolationRound, formatString]);\n\t\t// single line\n\t\tvar sInterpolationRound = nested(replace(/[^\"'/()]|\\/(?!\\*)|\\/\\*(?:[^*]|\\*(?!\\/))*\\*\\/|<<0>>|\\(<<self>>*\\)/.source, [regularStringOrCharacter]), 2);\n\t\tvar sInterpolation = replace(/\\{(?!\\{)(?:(?![}:])<<0>>)*<<1>>?\\}/.source, [sInterpolationRound, formatString]);\n\n\t\tfunction createInterpolationInside(interpolation, interpolationRound) {\n\t\t\treturn {\n\t\t\t\t'interpolation': {\n\t\t\t\t\tpattern: re(/((?:^|[^{])(?:\\{\\{)*)<<0>>/.source, [interpolation]),\n\t\t\t\t\tlookbehind: true,\n\t\t\t\t\tinside: {\n\t\t\t\t\t\t'format-string': {\n\t\t\t\t\t\t\tpattern: re(/(^\\{(?:(?![}:])<<0>>)*)<<1>>(?=\\}$)/.source, [interpolationRound, formatString]),\n\t\t\t\t\t\t\tlookbehind: true,\n\t\t\t\t\t\t\tinside: {\n\t\t\t\t\t\t\t\t'punctuation': /^:/\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t},\n\t\t\t\t\t\t'punctuation': /^\\{|\\}$/,\n\t\t\t\t\t\t'expression': {\n\t\t\t\t\t\t\tpattern: /[\\s\\S]+/,\n\t\t\t\t\t\t\talias: 'language-csharp',\n\t\t\t\t\t\t\tinside: Prism.languages.csharp\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t'string': /[\\s\\S]+/\n\t\t\t};\n\t\t}\n\n\t\tPrism.languages.insertBefore('csharp', 'string', {\n\t\t\t'interpolation-string': [\n\t\t\t\t{\n\t\t\t\t\tpattern: re(/(^|[^\\\\])(?:\\$@|@\\$)\"(?:\"\"|\\\\[\\s\\S]|\\{\\{|<<0>>|[^\\\\{\"])*\"/.source, [mInterpolation]),\n\t\t\t\t\tlookbehind: true,\n\t\t\t\t\tgreedy: true,\n\t\t\t\t\tinside: createInterpolationInside(mInterpolation, mInterpolationRound),\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tpattern: re(/(^|[^@\\\\])\\$\"(?:\\\\.|\\{\\{|<<0>>|[^\\\\\"{])*\"/.source, [sInterpolation]),\n\t\t\t\t\tlookbehind: true,\n\t\t\t\t\tgreedy: true,\n\t\t\t\t\tinside: createInterpolationInside(sInterpolation, sInterpolationRound),\n\t\t\t\t}\n\t\t\t],\n\t\t\t'char': {\n\t\t\t\tpattern: RegExp(character),\n\t\t\t\tgreedy: true\n\t\t\t}\n\t\t});\n\n\t\tPrism.languages.dotnet = Prism.languages.cs = Prism.languages.csharp;\n\n\t}(Prism));\n\n\t(function (Prism) {\n\n\t\tvar keyword = /\\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|char8_t|class|co_await|co_return|co_yield|compl|concept|const|const_cast|consteval|constexpr|constinit|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|final|float|for|friend|goto|if|import|inline|int|int16_t|int32_t|int64_t|int8_t|long|module|mutable|namespace|new|noexcept|nullptr|operator|override|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|uint16_t|uint32_t|uint64_t|uint8_t|union|unsigned|using|virtual|void|volatile|wchar_t|while)\\b/;\n\t\tvar modName = /\\b(?!<keyword>)\\w+(?:\\s*\\.\\s*\\w+)*\\b/.source.replace(/<keyword>/g, function () { return keyword.source; });\n\n\t\tPrism.languages.cpp = Prism.languages.extend('c', {\n\t\t\t'class-name': [\n\t\t\t\t{\n\t\t\t\t\tpattern: RegExp(/(\\b(?:class|concept|enum|struct|typename)\\s+)(?!<keyword>)\\w+/.source\n\t\t\t\t\t\t.replace(/<keyword>/g, function () { return keyword.source; })),\n\t\t\t\t\tlookbehind: true\n\t\t\t\t},\n\t\t\t\t// This is intended to capture the class name of method implementations like:\n\t\t\t\t//   void foo::bar() const {}\n\t\t\t\t// However! The `foo` in the above example could also be a namespace, so we only capture the class name if\n\t\t\t\t// it starts with an uppercase letter. This approximation should give decent results.\n\t\t\t\t/\\b[A-Z]\\w*(?=\\s*::\\s*\\w+\\s*\\()/,\n\t\t\t\t// This will capture the class name before destructors like:\n\t\t\t\t//   Foo::~Foo() {}\n\t\t\t\t/\\b[A-Z_]\\w*(?=\\s*::\\s*~\\w+\\s*\\()/i,\n\t\t\t\t// This also intends to capture the class name of method implementations but here the class has template\n\t\t\t\t// parameters, so it can't be a namespace (until C++ adds generic namespaces).\n\t\t\t\t/\\b\\w+(?=\\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>\\s*::\\s*\\w+\\s*\\()/\n\t\t\t],\n\t\t\t'keyword': keyword,\n\t\t\t'number': {\n\t\t\t\tpattern: /(?:\\b0b[01']+|\\b0x(?:[\\da-f']+(?:\\.[\\da-f']*)?|\\.[\\da-f']+)(?:p[+-]?[\\d']+)?|(?:\\b[\\d']+(?:\\.[\\d']*)?|\\B\\.[\\d']+)(?:e[+-]?[\\d']+)?)[ful]{0,4}/i,\n\t\t\t\tgreedy: true\n\t\t\t},\n\t\t\t'operator': />>=?|<<=?|->|--|\\+\\+|&&|\\|\\||[?:~]|<=>|[-+*/%&|^!=<>]=?|\\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\\b/,\n\t\t\t'boolean': /\\b(?:false|true)\\b/\n\t\t});\n\n\t\tPrism.languages.insertBefore('cpp', 'string', {\n\t\t\t'module': {\n\t\t\t\t// https://en.cppreference.com/w/cpp/language/modules\n\t\t\t\tpattern: RegExp(\n\t\t\t\t\t/(\\b(?:import|module)\\s+)/.source +\n\t\t\t\t\t'(?:' +\n\t\t\t\t\t// header-name\n\t\t\t\t\t/\"(?:\\\\(?:\\r\\n|[\\s\\S])|[^\"\\\\\\r\\n])*\"|<[^<>\\r\\n]*>/.source +\n\t\t\t\t\t'|' +\n\t\t\t\t\t// module name or partition or both\n\t\t\t\t\t/<mod-name>(?:\\s*:\\s*<mod-name>)?|:\\s*<mod-name>/.source.replace(/<mod-name>/g, function () { return modName; }) +\n\t\t\t\t\t')'\n\t\t\t\t),\n\t\t\t\tlookbehind: true,\n\t\t\t\tgreedy: true,\n\t\t\t\tinside: {\n\t\t\t\t\t'string': /^[<\"][\\s\\S]+/,\n\t\t\t\t\t'operator': /:/,\n\t\t\t\t\t'punctuation': /\\./\n\t\t\t\t}\n\t\t\t},\n\t\t\t'raw-string': {\n\t\t\t\tpattern: /R\"([^()\\\\ ]{0,16})\\([\\s\\S]*?\\)\\1\"/,\n\t\t\t\talias: 'string',\n\t\t\t\tgreedy: true\n\t\t\t}\n\t\t});\n\n\t\tPrism.languages.insertBefore('cpp', 'keyword', {\n\t\t\t'generic-function': {\n\t\t\t\tpattern: /\\b(?!operator\\b)[a-z_]\\w*\\s*<(?:[^<>]|<[^<>]*>)*>(?=\\s*\\()/i,\n\t\t\t\tinside: {\n\t\t\t\t\t'function': /^\\w+/,\n\t\t\t\t\t'generic': {\n\t\t\t\t\t\tpattern: /<[\\s\\S]+/,\n\t\t\t\t\t\talias: 'class-name',\n\t\t\t\t\t\tinside: Prism.languages.cpp\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\tPrism.languages.insertBefore('cpp', 'operator', {\n\t\t\t'double-colon': {\n\t\t\t\tpattern: /::/,\n\t\t\t\talias: 'punctuation'\n\t\t\t}\n\t\t});\n\n\t\tPrism.languages.insertBefore('cpp', 'class-name', {\n\t\t\t// the base clause is an optional list of parent classes\n\t\t\t// https://en.cppreference.com/w/cpp/language/class\n\t\t\t'base-clause': {\n\t\t\t\tpattern: /(\\b(?:class|struct)\\s+\\w+\\s*:\\s*)[^;{}\"'\\s]+(?:\\s+[^;{}\"'\\s]+)*(?=\\s*[;{])/,\n\t\t\t\tlookbehind: true,\n\t\t\t\tgreedy: true,\n\t\t\t\tinside: Prism.languages.extend('cpp', {})\n\t\t\t}\n\t\t});\n\n\t\tPrism.languages.insertBefore('inside', 'double-colon', {\n\t\t\t// All untokenized words that are not namespaces should be class names\n\t\t\t'class-name': /\\b[a-z_]\\w*\\b(?!\\s*::)/i\n\t\t}, Prism.languages.cpp['base-clause']);\n\n\t}(Prism));\n\n\tPrism.languages.markup = {\n\t\t'comment': {\n\t\t\tpattern: /<!--(?:(?!<!--)[\\s\\S])*?-->/,\n\t\t\tgreedy: true\n\t\t},\n\t\t'prolog': {\n\t\t\tpattern: /<\\?[\\s\\S]+?\\?>/,\n\t\t\tgreedy: true\n\t\t},\n\t\t'doctype': {\n\t\t\t// https://www.w3.org/TR/xml/#NT-doctypedecl\n\t\t\tpattern: /<!DOCTYPE(?:[^>\"'[\\]]|\"[^\"]*\"|'[^']*')+(?:\\[(?:[^<\"'\\]]|\"[^\"]*\"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\\]\\s*)?>/i,\n\t\t\tgreedy: true,\n\t\t\tinside: {\n\t\t\t\t'internal-subset': {\n\t\t\t\t\tpattern: /(^[^\\[]*\\[)[\\s\\S]+(?=\\]>$)/,\n\t\t\t\t\tlookbehind: true,\n\t\t\t\t\tgreedy: true,\n\t\t\t\t\tinside: null // see below\n\t\t\t\t},\n\t\t\t\t'string': {\n\t\t\t\t\tpattern: /\"[^\"]*\"|'[^']*'/,\n\t\t\t\t\tgreedy: true\n\t\t\t\t},\n\t\t\t\t'punctuation': /^<!|>$|[[\\]]/,\n\t\t\t\t'doctype-tag': /^DOCTYPE/i,\n\t\t\t\t'name': /[^\\s<>'\"]+/\n\t\t\t}\n\t\t},\n\t\t'cdata': {\n\t\t\tpattern: /<!\\[CDATA\\[[\\s\\S]*?\\]\\]>/i,\n\t\t\tgreedy: true\n\t\t},\n\t\t'tag': {\n\t\t\tpattern: /<\\/?(?!\\d)[^\\s>\\/=$<%]+(?:\\s(?:\\s*[^\\s>\\/=]+(?:\\s*=\\s*(?:\"[^\"]*\"|'[^']*'|[^\\s'\">=]+(?=[\\s>]))|(?=[\\s/>])))+)?\\s*\\/?>/,\n\t\t\tgreedy: true,\n\t\t\tinside: {\n\t\t\t\t'tag': {\n\t\t\t\t\tpattern: /^<\\/?[^\\s>\\/]+/,\n\t\t\t\t\tinside: {\n\t\t\t\t\t\t'punctuation': /^<\\/?/,\n\t\t\t\t\t\t'namespace': /^[^\\s>\\/:]+:/\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t'special-attr': [],\n\t\t\t\t'attr-value': {\n\t\t\t\t\tpattern: /=\\s*(?:\"[^\"]*\"|'[^']*'|[^\\s'\">=]+)/,\n\t\t\t\t\tinside: {\n\t\t\t\t\t\t'punctuation': [\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tpattern: /^=/,\n\t\t\t\t\t\t\t\talias: 'attr-equals'\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t/\"|'/\n\t\t\t\t\t\t]\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t'punctuation': /\\/?>/,\n\t\t\t\t'attr-name': {\n\t\t\t\t\tpattern: /[^\\s>\\/]+/,\n\t\t\t\t\tinside: {\n\t\t\t\t\t\t'namespace': /^[^\\s>\\/:]+:/\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t}\n\t\t},\n\t\t'entity': [\n\t\t\t{\n\t\t\t\tpattern: /&[\\da-z]{1,8};/i,\n\t\t\t\talias: 'named-entity'\n\t\t\t},\n\t\t\t/&#x?[\\da-f]{1,8};/i\n\t\t]\n\t};\n\n\tPrism.languages.markup['tag'].inside['attr-value'].inside['entity'] =\n\t\tPrism.languages.markup['entity'];\n\tPrism.languages.markup['doctype'].inside['internal-subset'].inside = Prism.languages.markup;\n\n\t// Plugin to make entity title show the real entity, idea by Roman Komarov\n\tPrism.hooks.add('wrap', function (env) {\n\n\t\tif (env.type === 'entity') {\n\t\t\tenv.attributes['title'] = env.content.replace(/&amp;/, '&');\n\t\t}\n\t});\n\n\tObject.defineProperty(Prism.languages.markup.tag, 'addInlined', {\n\t\t/**\n\t\t * Adds an inlined language to markup.\n\t\t *\n\t\t * An example of an inlined language is CSS with `<style>` tags.\n\t\t *\n\t\t * @param {string} tagName The name of the tag that contains the inlined language. This name will be treated as\n\t\t * case insensitive.\n\t\t * @param {string} lang The language key.\n\t\t * @example\n\t\t * addInlined('style', 'css');\n\t\t */\n\t\tvalue: function addInlined(tagName, lang) {\n\t\t\tvar includedCdataInside = {};\n\t\t\tincludedCdataInside['language-' + lang] = {\n\t\t\t\tpattern: /(^<!\\[CDATA\\[)[\\s\\S]+?(?=\\]\\]>$)/i,\n\t\t\t\tlookbehind: true,\n\t\t\t\tinside: Prism.languages[lang]\n\t\t\t};\n\t\t\tincludedCdataInside['cdata'] = /^<!\\[CDATA\\[|\\]\\]>$/i;\n\n\t\t\tvar inside = {\n\t\t\t\t'included-cdata': {\n\t\t\t\t\tpattern: /<!\\[CDATA\\[[\\s\\S]*?\\]\\]>/i,\n\t\t\t\t\tinside: includedCdataInside\n\t\t\t\t}\n\t\t\t};\n\t\t\tinside['language-' + lang] = {\n\t\t\t\tpattern: /[\\s\\S]+/,\n\t\t\t\tinside: Prism.languages[lang]\n\t\t\t};\n\n\t\t\tvar def = {};\n\t\t\tdef[tagName] = {\n\t\t\t\tpattern: RegExp(/(<__[^>]*>)(?:<!\\[CDATA\\[(?:[^\\]]|\\](?!\\]>))*\\]\\]>|(?!<!\\[CDATA\\[)[\\s\\S])*?(?=<\\/__>)/.source.replace(/__/g, function () { return tagName; }), 'i'),\n\t\t\t\tlookbehind: true,\n\t\t\t\tgreedy: true,\n\t\t\t\tinside: inside\n\t\t\t};\n\n\t\t\tPrism.languages.insertBefore('markup', 'cdata', def);\n\t\t}\n\t});\n\tObject.defineProperty(Prism.languages.markup.tag, 'addAttribute', {\n\t\t/**\n\t\t * Adds an pattern to highlight languages embedded in HTML attributes.\n\t\t *\n\t\t * An example of an inlined language is CSS with `style` attributes.\n\t\t *\n\t\t * @param {string} attrName The name of the tag that contains the inlined language. This name will be treated as\n\t\t * case insensitive.\n\t\t * @param {string} lang The language key.\n\t\t * @example\n\t\t * addAttribute('style', 'css');\n\t\t */\n\t\tvalue: function (attrName, lang) {\n\t\t\tPrism.languages.markup.tag.inside['special-attr'].push({\n\t\t\t\tpattern: RegExp(\n\t\t\t\t\t/(^|[\"'\\s])/.source + '(?:' + attrName + ')' + /\\s*=\\s*(?:\"[^\"]*\"|'[^']*'|[^\\s'\">=]+(?=[\\s>]))/.source,\n\t\t\t\t\t'i'\n\t\t\t\t),\n\t\t\t\tlookbehind: true,\n\t\t\t\tinside: {\n\t\t\t\t\t'attr-name': /^[^\\s=]+/,\n\t\t\t\t\t'attr-value': {\n\t\t\t\t\t\tpattern: /=[\\s\\S]+/,\n\t\t\t\t\t\tinside: {\n\t\t\t\t\t\t\t'value': {\n\t\t\t\t\t\t\t\tpattern: /(^=\\s*([\"']|(?![\"'])))\\S[\\s\\S]*(?=\\2$)/,\n\t\t\t\t\t\t\t\tlookbehind: true,\n\t\t\t\t\t\t\t\talias: [lang, 'language-' + lang],\n\t\t\t\t\t\t\t\tinside: Prism.languages[lang]\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t'punctuation': [\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tpattern: /^=/,\n\t\t\t\t\t\t\t\t\talias: 'attr-equals'\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t/\"|'/\n\t\t\t\t\t\t\t]\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t});\n\n\tPrism.languages.html = Prism.languages.markup;\n\tPrism.languages.mathml = Prism.languages.markup;\n\tPrism.languages.svg = Prism.languages.markup;\n\n\tPrism.languages.xml = Prism.languages.extend('markup', {});\n\tPrism.languages.ssml = Prism.languages.xml;\n\tPrism.languages.atom = Prism.languages.xml;\n\tPrism.languages.rss = Prism.languages.xml;\n\n\t(function (Prism) {\n\n\t\tvar string = /(?:\"(?:\\\\(?:\\r\\n|[\\s\\S])|[^\"\\\\\\r\\n])*\"|'(?:\\\\(?:\\r\\n|[\\s\\S])|[^'\\\\\\r\\n])*')/;\n\n\t\tPrism.languages.css = {\n\t\t\t'comment': /\\/\\*[\\s\\S]*?\\*\\//,\n\t\t\t'atrule': {\n\t\t\t\tpattern: /@[\\w-](?:[^;{\\s]|\\s+(?![\\s{]))*(?:;|(?=\\s*\\{))/,\n\t\t\t\tinside: {\n\t\t\t\t\t'rule': /^@[\\w-]+/,\n\t\t\t\t\t'selector-function-argument': {\n\t\t\t\t\t\tpattern: /(\\bselector\\s*\\(\\s*(?![\\s)]))(?:[^()\\s]|\\s+(?![\\s)])|\\((?:[^()]|\\([^()]*\\))*\\))+(?=\\s*\\))/,\n\t\t\t\t\t\tlookbehind: true,\n\t\t\t\t\t\talias: 'selector'\n\t\t\t\t\t},\n\t\t\t\t\t'keyword': {\n\t\t\t\t\t\tpattern: /(^|[^\\w-])(?:and|not|only|or)(?![\\w-])/,\n\t\t\t\t\t\tlookbehind: true\n\t\t\t\t\t}\n\t\t\t\t\t// See rest below\n\t\t\t\t}\n\t\t\t},\n\t\t\t'url': {\n\t\t\t\t// https://drafts.csswg.org/css-values-3/#urls\n\t\t\t\tpattern: RegExp('\\\\burl\\\\((?:' + string.source + '|' + /(?:[^\\\\\\r\\n()\"']|\\\\[\\s\\S])*/.source + ')\\\\)', 'i'),\n\t\t\t\tgreedy: true,\n\t\t\t\tinside: {\n\t\t\t\t\t'function': /^url/i,\n\t\t\t\t\t'punctuation': /^\\(|\\)$/,\n\t\t\t\t\t'string': {\n\t\t\t\t\t\tpattern: RegExp('^' + string.source + '$'),\n\t\t\t\t\t\talias: 'url'\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\t\t\t'selector': {\n\t\t\t\tpattern: RegExp('(^|[{}\\\\s])[^{}\\\\s](?:[^{};\"\\'\\\\s]|\\\\s+(?![\\\\s{])|' + string.source + ')*(?=\\\\s*\\\\{)'),\n\t\t\t\tlookbehind: true\n\t\t\t},\n\t\t\t'string': {\n\t\t\t\tpattern: string,\n\t\t\t\tgreedy: true\n\t\t\t},\n\t\t\t'property': {\n\t\t\t\tpattern: /(^|[^-\\w\\xA0-\\uFFFF])(?!\\s)[-_a-z\\xA0-\\uFFFF](?:(?!\\s)[-\\w\\xA0-\\uFFFF])*(?=\\s*:)/i,\n\t\t\t\tlookbehind: true\n\t\t\t},\n\t\t\t'important': /!important\\b/i,\n\t\t\t'function': {\n\t\t\t\tpattern: /(^|[^-a-z0-9])[-a-z0-9]+(?=\\()/i,\n\t\t\t\tlookbehind: true\n\t\t\t},\n\t\t\t'punctuation': /[(){};:,]/\n\t\t};\n\n\t\tPrism.languages.css['atrule'].inside.rest = Prism.languages.css;\n\n\t\tvar markup = Prism.languages.markup;\n\t\tif (markup) {\n\t\t\tmarkup.tag.addInlined('style', 'css');\n\t\t\tmarkup.tag.addAttribute('style', 'css');\n\t\t}\n\n\t}(Prism));\n\n\t(function (Prism) {\n\t\tvar keywords = [\n\t\t\t/\\b(?:async|sync|yield)\\*/,\n\t\t\t/\\b(?:abstract|assert|async|await|break|case|catch|class|const|continue|covariant|default|deferred|do|dynamic|else|enum|export|extends|extension|external|factory|final|finally|for|get|hide|if|implements|import|in|interface|library|mixin|new|null|on|operator|part|rethrow|return|set|show|static|super|switch|sync|this|throw|try|typedef|var|void|while|with|yield)\\b/\n\t\t];\n\n\t\t// Handles named imports, such as http.Client\n\t\tvar packagePrefix = /(^|[^\\w.])(?:[a-z]\\w*\\s*\\.\\s*)*(?:[A-Z]\\w*\\s*\\.\\s*)*/.source;\n\n\t\t// based on the dart naming conventions\n\t\tvar className = {\n\t\t\tpattern: RegExp(packagePrefix + /[A-Z](?:[\\d_A-Z]*[a-z]\\w*)?\\b/.source),\n\t\t\tlookbehind: true,\n\t\t\tinside: {\n\t\t\t\t'namespace': {\n\t\t\t\t\tpattern: /^[a-z]\\w*(?:\\s*\\.\\s*[a-z]\\w*)*(?:\\s*\\.)?/,\n\t\t\t\t\tinside: {\n\t\t\t\t\t\t'punctuation': /\\./\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t}\n\t\t};\n\n\t\tPrism.languages.dart = Prism.languages.extend('clike', {\n\t\t\t'class-name': [\n\t\t\t\tclassName,\n\t\t\t\t{\n\t\t\t\t\t// variables and parameters\n\t\t\t\t\t// this to support class names (or generic parameters) which do not contain a lower case letter (also works for methods)\n\t\t\t\t\tpattern: RegExp(packagePrefix + /[A-Z]\\w*(?=\\s+\\w+\\s*[;,=()])/.source),\n\t\t\t\t\tlookbehind: true,\n\t\t\t\t\tinside: className.inside\n\t\t\t\t}\n\t\t\t],\n\t\t\t'keyword': keywords,\n\t\t\t'operator': /\\bis!|\\b(?:as|is)\\b|\\+\\+|--|&&|\\|\\||<<=?|>>=?|~(?:\\/=?)?|[+\\-*\\/%&^|=!<>]=?|\\?/\n\t\t});\n\n\t\tPrism.languages.insertBefore('dart', 'string', {\n\t\t\t'string-literal': {\n\t\t\t\tpattern: /r?(?:(\"\"\"|''')[\\s\\S]*?\\1|([\"'])(?:\\\\.|(?!\\2)[^\\\\\\r\\n])*\\2(?!\\2))/,\n\t\t\t\tgreedy: true,\n\t\t\t\tinside: {\n\t\t\t\t\t'interpolation': {\n\t\t\t\t\t\tpattern: /((?:^|[^\\\\])(?:\\\\{2})*)\\$(?:\\w+|\\{(?:[^{}]|\\{[^{}]*\\})*\\})/,\n\t\t\t\t\t\tlookbehind: true,\n\t\t\t\t\t\tinside: {\n\t\t\t\t\t\t\t'punctuation': /^\\$\\{?|\\}$/,\n\t\t\t\t\t\t\t'expression': {\n\t\t\t\t\t\t\t\tpattern: /[\\s\\S]+/,\n\t\t\t\t\t\t\t\tinside: Prism.languages.dart\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\t'string': /[\\s\\S]+/\n\t\t\t\t}\n\t\t\t},\n\t\t\t'string': undefined\n\t\t});\n\n\t\tPrism.languages.insertBefore('dart', 'class-name', {\n\t\t\t'metadata': {\n\t\t\t\tpattern: /@\\w+/,\n\t\t\t\talias: 'function'\n\t\t\t}\n\t\t});\n\n\t\tPrism.languages.insertBefore('dart', 'class-name', {\n\t\t\t'generics': {\n\t\t\t\tpattern: /<(?:[\\w\\s,.&?]|<(?:[\\w\\s,.&?]|<(?:[\\w\\s,.&?]|<[\\w\\s,.&?]*>)*>)*>)*>/,\n\t\t\t\tinside: {\n\t\t\t\t\t'class-name': className,\n\t\t\t\t\t'keyword': keywords,\n\t\t\t\t\t'punctuation': /[<>(),.:]/,\n\t\t\t\t\t'operator': /[?&|]/\n\t\t\t\t}\n\t\t\t},\n\t\t});\n\t}(Prism));\n\n\t(function (Prism) {\n\n\t\tPrism.languages.diff = {\n\t\t\t'coord': [\n\t\t\t\t// Match all kinds of coord lines (prefixed by \"+++\", \"---\" or \"***\").\n\t\t\t\t/^(?:\\*{3}|-{3}|\\+{3}).*$/m,\n\t\t\t\t// Match \"@@ ... @@\" coord lines in unified diff.\n\t\t\t\t/^@@.*@@$/m,\n\t\t\t\t// Match coord lines in normal diff (starts with a number).\n\t\t\t\t/^\\d.*$/m\n\t\t\t]\n\n\t\t\t// deleted, inserted, unchanged, diff\n\t\t};\n\n\t\t/**\n\t\t * A map from the name of a block to its line prefix.\n\t\t *\n\t\t * @type {Object<string, string>}\n\t\t */\n\t\tvar PREFIXES = {\n\t\t\t'deleted-sign': '-',\n\t\t\t'deleted-arrow': '<',\n\t\t\t'inserted-sign': '+',\n\t\t\t'inserted-arrow': '>',\n\t\t\t'unchanged': ' ',\n\t\t\t'diff': '!',\n\t\t};\n\n\t\t// add a token for each prefix\n\t\tObject.keys(PREFIXES).forEach(function (name) {\n\t\t\tvar prefix = PREFIXES[name];\n\n\t\t\tvar alias = [];\n\t\t\tif (!/^\\w+$/.test(name)) { // \"deleted-sign\" -> \"deleted\"\n\t\t\t\talias.push(/\\w+/.exec(name)[0]);\n\t\t\t}\n\t\t\tif (name === 'diff') {\n\t\t\t\talias.push('bold');\n\t\t\t}\n\n\t\t\tPrism.languages.diff[name] = {\n\t\t\t\tpattern: RegExp('^(?:[' + prefix + '].*(?:\\r\\n?|\\n|(?![\\\\s\\\\S])))+', 'm'),\n\t\t\t\talias: alias,\n\t\t\t\tinside: {\n\t\t\t\t\t'line': {\n\t\t\t\t\t\tpattern: /(.)(?=[\\s\\S]).*(?:\\r\\n?|\\n)?/,\n\t\t\t\t\t\tlookbehind: true\n\t\t\t\t\t},\n\t\t\t\t\t'prefix': {\n\t\t\t\t\t\tpattern: /[\\s\\S]/,\n\t\t\t\t\t\talias: /\\w+/.exec(name)[0]\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t};\n\n\t\t});\n\n\t\t// make prefixes available to Diff plugin\n\t\tObject.defineProperty(Prism.languages.diff, 'PREFIXES', {\n\t\t\tvalue: PREFIXES\n\t\t});\n\n\t}(Prism));\n\n\t(function (Prism) {\n\n\t\t// Many of the following regexes will contain negated lookaheads like `[ \\t]+(?![ \\t])`. This is a trick to ensure\n\t\t// that quantifiers behave *atomically*. Atomic quantifiers are necessary to prevent exponential backtracking.\n\n\t\tvar spaceAfterBackSlash = /\\\\[\\r\\n](?:\\s|\\\\[\\r\\n]|#.*(?!.))*(?![\\s#]|\\\\[\\r\\n])/.source;\n\t\t// At least one space, comment, or line break\n\t\tvar space = /(?:[ \\t]+(?![ \\t])(?:<SP_BS>)?|<SP_BS>)/.source\n\t\t\t.replace(/<SP_BS>/g, function () { return spaceAfterBackSlash; });\n\n\t\tvar string = /\"(?:[^\"\\\\\\r\\n]|\\\\(?:\\r\\n|[\\s\\S]))*\"|'(?:[^'\\\\\\r\\n]|\\\\(?:\\r\\n|[\\s\\S]))*'/.source;\n\t\tvar option = /--[\\w-]+=(?:<STR>|(?![\"'])(?:[^\\s\\\\]|\\\\.)+)/.source.replace(/<STR>/g, function () { return string; });\n\n\t\tvar stringRule = {\n\t\t\tpattern: RegExp(string),\n\t\t\tgreedy: true\n\t\t};\n\t\tvar commentRule = {\n\t\t\tpattern: /(^[ \\t]*)#.*/m,\n\t\t\tlookbehind: true,\n\t\t\tgreedy: true\n\t\t};\n\n\t\t/**\n\t\t * @param {string} source\n\t\t * @param {string} flags\n\t\t * @returns {RegExp}\n\t\t */\n\t\tfunction re(source, flags) {\n\t\t\tsource = source\n\t\t\t\t.replace(/<OPT>/g, function () { return option; })\n\t\t\t\t.replace(/<SP>/g, function () { return space; });\n\n\t\t\treturn RegExp(source, flags);\n\t\t}\n\n\t\tPrism.languages.docker = {\n\t\t\t'instruction': {\n\t\t\t\tpattern: /(^[ \\t]*)(?:ADD|ARG|CMD|COPY|ENTRYPOINT|ENV|EXPOSE|FROM|HEALTHCHECK|LABEL|MAINTAINER|ONBUILD|RUN|SHELL|STOPSIGNAL|USER|VOLUME|WORKDIR)(?=\\s)(?:\\\\.|[^\\r\\n\\\\])*(?:\\\\$(?:\\s|#.*$)*(?![\\s#])(?:\\\\.|[^\\r\\n\\\\])*)*/im,\n\t\t\t\tlookbehind: true,\n\t\t\t\tgreedy: true,\n\t\t\t\tinside: {\n\t\t\t\t\t'options': {\n\t\t\t\t\t\tpattern: re(/(^(?:ONBUILD<SP>)?\\w+<SP>)<OPT>(?:<SP><OPT>)*/.source, 'i'),\n\t\t\t\t\t\tlookbehind: true,\n\t\t\t\t\t\tgreedy: true,\n\t\t\t\t\t\tinside: {\n\t\t\t\t\t\t\t'property': {\n\t\t\t\t\t\t\t\tpattern: /(^|\\s)--[\\w-]+/,\n\t\t\t\t\t\t\t\tlookbehind: true\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t'string': [\n\t\t\t\t\t\t\t\tstringRule,\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tpattern: /(=)(?![\"'])(?:[^\\s\\\\]|\\\\.)+/,\n\t\t\t\t\t\t\t\t\tlookbehind: true\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t'operator': /\\\\$/m,\n\t\t\t\t\t\t\t'punctuation': /=/\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\t'keyword': [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t// https://docs.docker.com/engine/reference/builder/#healthcheck\n\t\t\t\t\t\t\tpattern: re(/(^(?:ONBUILD<SP>)?HEALTHCHECK<SP>(?:<OPT><SP>)*)(?:CMD|NONE)\\b/.source, 'i'),\n\t\t\t\t\t\t\tlookbehind: true,\n\t\t\t\t\t\t\tgreedy: true\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t// https://docs.docker.com/engine/reference/builder/#from\n\t\t\t\t\t\t\tpattern: re(/(^(?:ONBUILD<SP>)?FROM<SP>(?:<OPT><SP>)*(?!--)[^ \\t\\\\]+<SP>)AS/.source, 'i'),\n\t\t\t\t\t\t\tlookbehind: true,\n\t\t\t\t\t\t\tgreedy: true\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t// https://docs.docker.com/engine/reference/builder/#onbuild\n\t\t\t\t\t\t\tpattern: re(/(^ONBUILD<SP>)\\w+/.source, 'i'),\n\t\t\t\t\t\t\tlookbehind: true,\n\t\t\t\t\t\t\tgreedy: true\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tpattern: /^\\w+/,\n\t\t\t\t\t\t\tgreedy: true\n\t\t\t\t\t\t}\n\t\t\t\t\t],\n\t\t\t\t\t'comment': commentRule,\n\t\t\t\t\t'string': stringRule,\n\t\t\t\t\t'variable': /\\$(?:\\w+|\\{[^{}\"'\\\\]*\\})/,\n\t\t\t\t\t'operator': /\\\\$/m\n\t\t\t\t}\n\t\t\t},\n\t\t\t'comment': commentRule\n\t\t};\n\n\t\tPrism.languages.dockerfile = Prism.languages.docker;\n\n\t}(Prism));\n\n\tPrism.languages.git = {\n\t\t/*\n\t\t * A simple one line comment like in a git status command\n\t\t * For instance:\n\t\t * $ git status\n\t\t * # On branch infinite-scroll\n\t\t * # Your branch and 'origin/sharedBranches/frontendTeam/infinite-scroll' have diverged,\n\t\t * # and have 1 and 2 different commits each, respectively.\n\t\t * nothing to commit (working directory clean)\n\t\t */\n\t\t'comment': /^#.*/m,\n\n\t\t/*\n\t\t * Regexp to match the changed lines in a git diff output. Check the example below.\n\t\t */\n\t\t'deleted': /^[-–].*/m,\n\t\t'inserted': /^\\+.*/m,\n\n\t\t/*\n\t\t * a string (double and simple quote)\n\t\t */\n\t\t'string': /(\"|')(?:\\\\.|(?!\\1)[^\\\\\\r\\n])*\\1/,\n\n\t\t/*\n\t\t * a git command. It starts with a random prompt finishing by a $, then \"git\" then some other parameters\n\t\t * For instance:\n\t\t * $ git add file.txt\n\t\t */\n\t\t'command': {\n\t\t\tpattern: /^.*\\$ git .*$/m,\n\t\t\tinside: {\n\t\t\t\t/*\n\t\t\t\t * A git command can contain a parameter starting by a single or a double dash followed by a string\n\t\t\t\t * For instance:\n\t\t\t\t * $ git diff --cached\n\t\t\t\t * $ git log -p\n\t\t\t\t */\n\t\t\t\t'parameter': /\\s--?\\w+/\n\t\t\t}\n\t\t},\n\n\t\t/*\n\t\t * Coordinates displayed in a git diff command\n\t\t * For instance:\n\t\t * $ git diff\n\t\t * diff --git file.txt file.txt\n\t\t * index 6214953..1d54a52 100644\n\t\t * --- file.txt\n\t\t * +++ file.txt\n\t\t * @@ -1 +1,2 @@\n\t\t * -Here's my tetx file\n\t\t * +Here's my text file\n\t\t * +And this is the second line\n\t\t */\n\t\t'coord': /^@@.*@@$/m,\n\n\t\t/*\n\t\t * Match a \"commit [SHA1]\" line in a git log output.\n\t\t * For instance:\n\t\t * $ git log\n\t\t * commit a11a14ef7e26f2ca62d4b35eac455ce636d0dc09\n\t\t * Author: lgiraudel\n\t\t * Date:   Mon Feb 17 11:18:34 2014 +0100\n\t\t *\n\t\t *     Add of a new line\n\t\t */\n\t\t'commit-sha1': /^commit \\w{40}$/m\n\t};\n\n\tPrism.languages.glsl = Prism.languages.extend('c', {\n\t\t'keyword': /\\b(?:active|asm|atomic_uint|attribute|[ibdu]?vec[234]|bool|break|buffer|case|cast|centroid|class|coherent|common|const|continue|d?mat[234](?:x[234])?|default|discard|do|double|else|enum|extern|external|false|filter|fixed|flat|float|for|fvec[234]|goto|half|highp|hvec[234]|[iu]?sampler2DMS(?:Array)?|[iu]?sampler2DRect|[iu]?samplerBuffer|[iu]?samplerCube|[iu]?samplerCubeArray|[iu]?sampler[123]D|[iu]?sampler[12]DArray|[iu]?image2DMS(?:Array)?|[iu]?image2DRect|[iu]?imageBuffer|[iu]?imageCube|[iu]?imageCubeArray|[iu]?image[123]D|[iu]?image[12]DArray|if|in|inline|inout|input|int|interface|invariant|layout|long|lowp|mediump|namespace|noinline|noperspective|out|output|partition|patch|precise|precision|public|readonly|resource|restrict|return|sample|sampler[12]DArrayShadow|sampler[12]DShadow|sampler2DRectShadow|sampler3DRect|samplerCubeArrayShadow|samplerCubeShadow|shared|short|sizeof|smooth|static|struct|subroutine|superp|switch|template|this|true|typedef|uint|uniform|union|unsigned|using|varying|void|volatile|while|writeonly)\\b/\n\t});\n\n\tPrism.languages.go = Prism.languages.extend('clike', {\n\t\t'string': {\n\t\t\tpattern: /(^|[^\\\\])\"(?:\\\\.|[^\"\\\\\\r\\n])*\"|`[^`]*`/,\n\t\t\tlookbehind: true,\n\t\t\tgreedy: true\n\t\t},\n\t\t'keyword': /\\b(?:break|case|chan|const|continue|default|defer|else|fallthrough|for|func|go(?:to)?|if|import|interface|map|package|range|return|select|struct|switch|type|var)\\b/,\n\t\t'boolean': /\\b(?:_|false|iota|nil|true)\\b/,\n\t\t'number': [\n\t\t\t// binary and octal integers\n\t\t\t/\\b0(?:b[01_]+|o[0-7_]+)i?\\b/i,\n\t\t\t// hexadecimal integers and floats\n\t\t\t/\\b0x(?:[a-f\\d_]+(?:\\.[a-f\\d_]*)?|\\.[a-f\\d_]+)(?:p[+-]?\\d+(?:_\\d+)*)?i?(?!\\w)/i,\n\t\t\t// decimal integers and floats\n\t\t\t/(?:\\b\\d[\\d_]*(?:\\.[\\d_]*)?|\\B\\.\\d[\\d_]*)(?:e[+-]?[\\d_]+)?i?(?!\\w)/i\n\t\t],\n\t\t'operator': /[*\\/%^!=]=?|\\+[=+]?|-[=-]?|\\|[=|]?|&(?:=|&|\\^=?)?|>(?:>=?|=)?|<(?:<=?|=|-)?|:=|\\.\\.\\./,\n\t\t'builtin': /\\b(?:append|bool|byte|cap|close|complex|complex(?:64|128)|copy|delete|error|float(?:32|64)|u?int(?:8|16|32|64)?|imag|len|make|new|panic|print(?:ln)?|real|recover|rune|string|uintptr)\\b/\n\t});\n\n\tPrism.languages.insertBefore('go', 'string', {\n\t\t'char': {\n\t\t\tpattern: /'(?:\\\\.|[^'\\\\\\r\\n]){0,10}'/,\n\t\t\tgreedy: true\n\t\t}\n\t});\n\n\tdelete Prism.languages.go['class-name'];\n\n\t// https://go.dev/ref/mod#go-mod-file-module\n\n\tPrism.languages['go-mod'] = Prism.languages['go-module'] = {\n\t\t'comment': {\n\t\t\tpattern: /\\/\\/.*/,\n\t\t\tgreedy: true\n\t\t},\n\t\t'version': {\n\t\t\tpattern: /(^|[\\s()[\\],])v\\d+\\.\\d+\\.\\d+(?:[+-][-+.\\w]*)?(?![^\\s()[\\],])/,\n\t\t\tlookbehind: true,\n\t\t\talias: 'number'\n\t\t},\n\t\t'go-version': {\n\t\t\tpattern: /((?:^|\\s)go\\s+)\\d+(?:\\.\\d+){1,2}/,\n\t\t\tlookbehind: true,\n\t\t\talias: 'number'\n\t\t},\n\t\t'keyword': {\n\t\t\tpattern: /^([ \\t]*)(?:exclude|go|module|replace|require|retract)\\b/m,\n\t\t\tlookbehind: true\n\t\t},\n\t\t'operator': /=>/,\n\t\t'punctuation': /[()[\\],]/\n\t};\n\n\t(function (Prism) {\n\n\t\t// https://yaml.org/spec/1.2/spec.html#c-ns-anchor-property\n\t\t// https://yaml.org/spec/1.2/spec.html#c-ns-alias-node\n\t\tvar anchorOrAlias = /[*&][^\\s[\\]{},]+/;\n\t\t// https://yaml.org/spec/1.2/spec.html#c-ns-tag-property\n\t\tvar tag = /!(?:<[\\w\\-%#;/?:@&=+$,.!~*'()[\\]]+>|(?:[a-zA-Z\\d-]*!)?[\\w\\-%#;/?:@&=+$.~*'()]+)?/;\n\t\t// https://yaml.org/spec/1.2/spec.html#c-ns-properties(n,c)\n\t\tvar properties = '(?:' + tag.source + '(?:[ \\t]+' + anchorOrAlias.source + ')?|'\n\t\t\t+ anchorOrAlias.source + '(?:[ \\t]+' + tag.source + ')?)';\n\t\t// https://yaml.org/spec/1.2/spec.html#ns-plain(n,c)\n\t\t// This is a simplified version that doesn't support \"#\" and multiline keys\n\t\t// All these long scarry character classes are simplified versions of YAML's characters\n\t\tvar plainKey = /(?:[^\\s\\x00-\\x08\\x0e-\\x1f!\"#%&'*,\\-:>?@[\\]`{|}\\x7f-\\x84\\x86-\\x9f\\ud800-\\udfff\\ufffe\\uffff]|[?:-]<PLAIN>)(?:[ \\t]*(?:(?![#:])<PLAIN>|:<PLAIN>))*/.source\n\t\t\t.replace(/<PLAIN>/g, function () { return /[^\\s\\x00-\\x08\\x0e-\\x1f,[\\]{}\\x7f-\\x84\\x86-\\x9f\\ud800-\\udfff\\ufffe\\uffff]/.source; });\n\t\tvar string = /\"(?:[^\"\\\\\\r\\n]|\\\\.)*\"|'(?:[^'\\\\\\r\\n]|\\\\.)*'/.source;\n\n\t\t/**\n\t\t *\n\t\t * @param {string} value\n\t\t * @param {string} [flags]\n\t\t * @returns {RegExp}\n\t\t */\n\t\tfunction createValuePattern(value, flags) {\n\t\t\tflags = (flags || '').replace(/m/g, '') + 'm'; // add m flag\n\t\t\tvar pattern = /([:\\-,[{]\\s*(?:\\s<<prop>>[ \\t]+)?)(?:<<value>>)(?=[ \\t]*(?:$|,|\\]|\\}|(?:[\\r\\n]\\s*)?#))/.source\n\t\t\t\t.replace(/<<prop>>/g, function () { return properties; }).replace(/<<value>>/g, function () { return value; });\n\t\t\treturn RegExp(pattern, flags);\n\t\t}\n\n\t\tPrism.languages.yaml = {\n\t\t\t'scalar': {\n\t\t\t\tpattern: RegExp(/([\\-:]\\s*(?:\\s<<prop>>[ \\t]+)?[|>])[ \\t]*(?:((?:\\r?\\n|\\r)[ \\t]+)\\S[^\\r\\n]*(?:\\2[^\\r\\n]+)*)/.source\n\t\t\t\t\t.replace(/<<prop>>/g, function () { return properties; })),\n\t\t\t\tlookbehind: true,\n\t\t\t\talias: 'string'\n\t\t\t},\n\t\t\t'comment': /#.*/,\n\t\t\t'key': {\n\t\t\t\tpattern: RegExp(/((?:^|[:\\-,[{\\r\\n?])[ \\t]*(?:<<prop>>[ \\t]+)?)<<key>>(?=\\s*:\\s)/.source\n\t\t\t\t\t.replace(/<<prop>>/g, function () { return properties; })\n\t\t\t\t\t.replace(/<<key>>/g, function () { return '(?:' + plainKey + '|' + string + ')'; })),\n\t\t\t\tlookbehind: true,\n\t\t\t\tgreedy: true,\n\t\t\t\talias: 'atrule'\n\t\t\t},\n\t\t\t'directive': {\n\t\t\t\tpattern: /(^[ \\t]*)%.+/m,\n\t\t\t\tlookbehind: true,\n\t\t\t\talias: 'important'\n\t\t\t},\n\t\t\t'datetime': {\n\t\t\t\tpattern: createValuePattern(/\\d{4}-\\d\\d?-\\d\\d?(?:[tT]|[ \\t]+)\\d\\d?:\\d{2}:\\d{2}(?:\\.\\d*)?(?:[ \\t]*(?:Z|[-+]\\d\\d?(?::\\d{2})?))?|\\d{4}-\\d{2}-\\d{2}|\\d\\d?:\\d{2}(?::\\d{2}(?:\\.\\d*)?)?/.source),\n\t\t\t\tlookbehind: true,\n\t\t\t\talias: 'number'\n\t\t\t},\n\t\t\t'boolean': {\n\t\t\t\tpattern: createValuePattern(/false|true/.source, 'i'),\n\t\t\t\tlookbehind: true,\n\t\t\t\talias: 'important'\n\t\t\t},\n\t\t\t'null': {\n\t\t\t\tpattern: createValuePattern(/null|~/.source, 'i'),\n\t\t\t\tlookbehind: true,\n\t\t\t\talias: 'important'\n\t\t\t},\n\t\t\t'string': {\n\t\t\t\tpattern: createValuePattern(string),\n\t\t\t\tlookbehind: true,\n\t\t\t\tgreedy: true\n\t\t\t},\n\t\t\t'number': {\n\t\t\t\tpattern: createValuePattern(/[+-]?(?:0x[\\da-f]+|0o[0-7]+|(?:\\d+(?:\\.\\d*)?|\\.\\d+)(?:e[+-]?\\d+)?|\\.inf|\\.nan)/.source, 'i'),\n\t\t\t\tlookbehind: true\n\t\t\t},\n\t\t\t'tag': tag,\n\t\t\t'important': anchorOrAlias,\n\t\t\t'punctuation': /---|[:[\\]{}\\-,|>?]|\\.\\.\\./\n\t\t};\n\n\t\tPrism.languages.yml = Prism.languages.yaml;\n\n\t}(Prism));\n\n\t(function (Prism) {\n\n\t\t// Allow only one line break\n\t\tvar inner = /(?:\\\\.|[^\\\\\\n\\r]|(?:\\n|\\r\\n?)(?![\\r\\n]))/.source;\n\n\t\t/**\n\t\t * This function is intended for the creation of the bold or italic pattern.\n\t\t *\n\t\t * This also adds a lookbehind group to the given pattern to ensure that the pattern is not backslash-escaped.\n\t\t *\n\t\t * _Note:_ Keep in mind that this adds a capturing group.\n\t\t *\n\t\t * @param {string} pattern\n\t\t * @returns {RegExp}\n\t\t */\n\t\tfunction createInline(pattern) {\n\t\t\tpattern = pattern.replace(/<inner>/g, function () { return inner; });\n\t\t\treturn RegExp(/((?:^|[^\\\\])(?:\\\\{2})*)/.source + '(?:' + pattern + ')');\n\t\t}\n\n\n\t\tvar tableCell = /(?:\\\\.|``(?:[^`\\r\\n]|`(?!`))+``|`[^`\\r\\n]+`|[^\\\\|\\r\\n`])+/.source;\n\t\tvar tableRow = /\\|?__(?:\\|__)+\\|?(?:(?:\\n|\\r\\n?)|(?![\\s\\S]))/.source.replace(/__/g, function () { return tableCell; });\n\t\tvar tableLine = /\\|?[ \\t]*:?-{3,}:?[ \\t]*(?:\\|[ \\t]*:?-{3,}:?[ \\t]*)+\\|?(?:\\n|\\r\\n?)/.source;\n\n\n\t\tPrism.languages.markdown = Prism.languages.extend('markup', {});\n\t\tPrism.languages.insertBefore('markdown', 'prolog', {\n\t\t\t'front-matter-block': {\n\t\t\t\tpattern: /(^(?:\\s*[\\r\\n])?)---(?!.)[\\s\\S]*?[\\r\\n]---(?!.)/,\n\t\t\t\tlookbehind: true,\n\t\t\t\tgreedy: true,\n\t\t\t\tinside: {\n\t\t\t\t\t'punctuation': /^---|---$/,\n\t\t\t\t\t'front-matter': {\n\t\t\t\t\t\tpattern: /\\S+(?:\\s+\\S+)*/,\n\t\t\t\t\t\talias: ['yaml', 'language-yaml'],\n\t\t\t\t\t\tinside: Prism.languages.yaml\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\t\t\t'blockquote': {\n\t\t\t\t// > ...\n\t\t\t\tpattern: /^>(?:[\\t ]*>)*/m,\n\t\t\t\talias: 'punctuation'\n\t\t\t},\n\t\t\t'table': {\n\t\t\t\tpattern: RegExp('^' + tableRow + tableLine + '(?:' + tableRow + ')*', 'm'),\n\t\t\t\tinside: {\n\t\t\t\t\t'table-data-rows': {\n\t\t\t\t\t\tpattern: RegExp('^(' + tableRow + tableLine + ')(?:' + tableRow + ')*$'),\n\t\t\t\t\t\tlookbehind: true,\n\t\t\t\t\t\tinside: {\n\t\t\t\t\t\t\t'table-data': {\n\t\t\t\t\t\t\t\tpattern: RegExp(tableCell),\n\t\t\t\t\t\t\t\tinside: Prism.languages.markdown\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t'punctuation': /\\|/\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\t'table-line': {\n\t\t\t\t\t\tpattern: RegExp('^(' + tableRow + ')' + tableLine + '$'),\n\t\t\t\t\t\tlookbehind: true,\n\t\t\t\t\t\tinside: {\n\t\t\t\t\t\t\t'punctuation': /\\||:?-{3,}:?/\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\t'table-header-row': {\n\t\t\t\t\t\tpattern: RegExp('^' + tableRow + '$'),\n\t\t\t\t\t\tinside: {\n\t\t\t\t\t\t\t'table-header': {\n\t\t\t\t\t\t\t\tpattern: RegExp(tableCell),\n\t\t\t\t\t\t\t\talias: 'important',\n\t\t\t\t\t\t\t\tinside: Prism.languages.markdown\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t'punctuation': /\\|/\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\t\t\t'code': [\n\t\t\t\t{\n\t\t\t\t\t// Prefixed by 4 spaces or 1 tab and preceded by an empty line\n\t\t\t\t\tpattern: /((?:^|\\n)[ \\t]*\\n|(?:^|\\r\\n?)[ \\t]*\\r\\n?)(?: {4}|\\t).+(?:(?:\\n|\\r\\n?)(?: {4}|\\t).+)*/,\n\t\t\t\t\tlookbehind: true,\n\t\t\t\t\talias: 'keyword'\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t// ```optional language\n\t\t\t\t\t// code block\n\t\t\t\t\t// ```\n\t\t\t\t\tpattern: /^```[\\s\\S]*?^```$/m,\n\t\t\t\t\tgreedy: true,\n\t\t\t\t\tinside: {\n\t\t\t\t\t\t'code-block': {\n\t\t\t\t\t\t\tpattern: /^(```.*(?:\\n|\\r\\n?))[\\s\\S]+?(?=(?:\\n|\\r\\n?)^```$)/m,\n\t\t\t\t\t\t\tlookbehind: true\n\t\t\t\t\t\t},\n\t\t\t\t\t\t'code-language': {\n\t\t\t\t\t\t\tpattern: /^(```).+/,\n\t\t\t\t\t\t\tlookbehind: true\n\t\t\t\t\t\t},\n\t\t\t\t\t\t'punctuation': /```/\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t],\n\t\t\t'title': [\n\t\t\t\t{\n\t\t\t\t\t// title 1\n\t\t\t\t\t// =======\n\n\t\t\t\t\t// title 2\n\t\t\t\t\t// -------\n\t\t\t\t\tpattern: /\\S.*(?:\\n|\\r\\n?)(?:==+|--+)(?=[ \\t]*$)/m,\n\t\t\t\t\talias: 'important',\n\t\t\t\t\tinside: {\n\t\t\t\t\t\tpunctuation: /==+$|--+$/\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t// # title 1\n\t\t\t\t\t// ###### title 6\n\t\t\t\t\tpattern: /(^\\s*)#.+/m,\n\t\t\t\t\tlookbehind: true,\n\t\t\t\t\talias: 'important',\n\t\t\t\t\tinside: {\n\t\t\t\t\t\tpunctuation: /^#+|#+$/\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t],\n\t\t\t'hr': {\n\t\t\t\t// ***\n\t\t\t\t// ---\n\t\t\t\t// * * *\n\t\t\t\t// -----------\n\t\t\t\tpattern: /(^\\s*)([*-])(?:[\\t ]*\\2){2,}(?=\\s*$)/m,\n\t\t\t\tlookbehind: true,\n\t\t\t\talias: 'punctuation'\n\t\t\t},\n\t\t\t'list': {\n\t\t\t\t// * item\n\t\t\t\t// + item\n\t\t\t\t// - item\n\t\t\t\t// 1. item\n\t\t\t\tpattern: /(^\\s*)(?:[*+-]|\\d+\\.)(?=[\\t ].)/m,\n\t\t\t\tlookbehind: true,\n\t\t\t\talias: 'punctuation'\n\t\t\t},\n\t\t\t'url-reference': {\n\t\t\t\t// [id]: http://example.com \"Optional title\"\n\t\t\t\t// [id]: http://example.com 'Optional title'\n\t\t\t\t// [id]: http://example.com (Optional title)\n\t\t\t\t// [id]: <http://example.com> \"Optional title\"\n\t\t\t\tpattern: /!?\\[[^\\]]+\\]:[\\t ]+(?:\\S+|<(?:\\\\.|[^>\\\\])+>)(?:[\\t ]+(?:\"(?:\\\\.|[^\"\\\\])*\"|'(?:\\\\.|[^'\\\\])*'|\\((?:\\\\.|[^)\\\\])*\\)))?/,\n\t\t\t\tinside: {\n\t\t\t\t\t'variable': {\n\t\t\t\t\t\tpattern: /^(!?\\[)[^\\]]+/,\n\t\t\t\t\t\tlookbehind: true\n\t\t\t\t\t},\n\t\t\t\t\t'string': /(?:\"(?:\\\\.|[^\"\\\\])*\"|'(?:\\\\.|[^'\\\\])*'|\\((?:\\\\.|[^)\\\\])*\\))$/,\n\t\t\t\t\t'punctuation': /^[\\[\\]!:]|[<>]/\n\t\t\t\t},\n\t\t\t\talias: 'url'\n\t\t\t},\n\t\t\t'bold': {\n\t\t\t\t// **strong**\n\t\t\t\t// __strong__\n\n\t\t\t\t// allow one nested instance of italic text using the same delimiter\n\t\t\t\tpattern: createInline(/\\b__(?:(?!_)<inner>|_(?:(?!_)<inner>)+_)+__\\b|\\*\\*(?:(?!\\*)<inner>|\\*(?:(?!\\*)<inner>)+\\*)+\\*\\*/.source),\n\t\t\t\tlookbehind: true,\n\t\t\t\tgreedy: true,\n\t\t\t\tinside: {\n\t\t\t\t\t'content': {\n\t\t\t\t\t\tpattern: /(^..)[\\s\\S]+(?=..$)/,\n\t\t\t\t\t\tlookbehind: true,\n\t\t\t\t\t\tinside: {} // see below\n\t\t\t\t\t},\n\t\t\t\t\t'punctuation': /\\*\\*|__/\n\t\t\t\t}\n\t\t\t},\n\t\t\t'italic': {\n\t\t\t\t// *em*\n\t\t\t\t// _em_\n\n\t\t\t\t// allow one nested instance of bold text using the same delimiter\n\t\t\t\tpattern: createInline(/\\b_(?:(?!_)<inner>|__(?:(?!_)<inner>)+__)+_\\b|\\*(?:(?!\\*)<inner>|\\*\\*(?:(?!\\*)<inner>)+\\*\\*)+\\*/.source),\n\t\t\t\tlookbehind: true,\n\t\t\t\tgreedy: true,\n\t\t\t\tinside: {\n\t\t\t\t\t'content': {\n\t\t\t\t\t\tpattern: /(^.)[\\s\\S]+(?=.$)/,\n\t\t\t\t\t\tlookbehind: true,\n\t\t\t\t\t\tinside: {} // see below\n\t\t\t\t\t},\n\t\t\t\t\t'punctuation': /[*_]/\n\t\t\t\t}\n\t\t\t},\n\t\t\t'strike': {\n\t\t\t\t// ~~strike through~~\n\t\t\t\t// ~strike~\n\t\t\t\t// eslint-disable-next-line regexp/strict\n\t\t\t\tpattern: createInline(/(~~?)(?:(?!~)<inner>)+\\2/.source),\n\t\t\t\tlookbehind: true,\n\t\t\t\tgreedy: true,\n\t\t\t\tinside: {\n\t\t\t\t\t'content': {\n\t\t\t\t\t\tpattern: /(^~~?)[\\s\\S]+(?=\\1$)/,\n\t\t\t\t\t\tlookbehind: true,\n\t\t\t\t\t\tinside: {} // see below\n\t\t\t\t\t},\n\t\t\t\t\t'punctuation': /~~?/\n\t\t\t\t}\n\t\t\t},\n\t\t\t'code-snippet': {\n\t\t\t\t// `code`\n\t\t\t\t// ``code``\n\t\t\t\tpattern: /(^|[^\\\\`])(?:``[^`\\r\\n]+(?:`[^`\\r\\n]+)*``(?!`)|`[^`\\r\\n]+`(?!`))/,\n\t\t\t\tlookbehind: true,\n\t\t\t\tgreedy: true,\n\t\t\t\talias: ['code', 'keyword']\n\t\t\t},\n\t\t\t'url': {\n\t\t\t\t// [example](http://example.com \"Optional title\")\n\t\t\t\t// [example][id]\n\t\t\t\t// [example] [id]\n\t\t\t\tpattern: createInline(/!?\\[(?:(?!\\])<inner>)+\\](?:\\([^\\s)]+(?:[\\t ]+\"(?:\\\\.|[^\"\\\\])*\")?\\)|[ \\t]?\\[(?:(?!\\])<inner>)+\\])/.source),\n\t\t\t\tlookbehind: true,\n\t\t\t\tgreedy: true,\n\t\t\t\tinside: {\n\t\t\t\t\t'operator': /^!/,\n\t\t\t\t\t'content': {\n\t\t\t\t\t\tpattern: /(^\\[)[^\\]]+(?=\\])/,\n\t\t\t\t\t\tlookbehind: true,\n\t\t\t\t\t\tinside: {} // see below\n\t\t\t\t\t},\n\t\t\t\t\t'variable': {\n\t\t\t\t\t\tpattern: /(^\\][ \\t]?\\[)[^\\]]+(?=\\]$)/,\n\t\t\t\t\t\tlookbehind: true\n\t\t\t\t\t},\n\t\t\t\t\t'url': {\n\t\t\t\t\t\tpattern: /(^\\]\\()[^\\s)]+/,\n\t\t\t\t\t\tlookbehind: true\n\t\t\t\t\t},\n\t\t\t\t\t'string': {\n\t\t\t\t\t\tpattern: /(^[ \\t]+)\"(?:\\\\.|[^\"\\\\])*\"(?=\\)$)/,\n\t\t\t\t\t\tlookbehind: true\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\t['url', 'bold', 'italic', 'strike'].forEach(function (token) {\n\t\t\t['url', 'bold', 'italic', 'strike', 'code-snippet'].forEach(function (inside) {\n\t\t\t\tif (token !== inside) {\n\t\t\t\t\tPrism.languages.markdown[token].inside.content.inside[inside] = Prism.languages.markdown[inside];\n\t\t\t\t}\n\t\t\t});\n\t\t});\n\n\t\tPrism.hooks.add('after-tokenize', function (env) {\n\t\t\tif (env.language !== 'markdown' && env.language !== 'md') {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tfunction walkTokens(tokens) {\n\t\t\t\tif (!tokens || typeof tokens === 'string') {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tfor (var i = 0, l = tokens.length; i < l; i++) {\n\t\t\t\t\tvar token = tokens[i];\n\n\t\t\t\t\tif (token.type !== 'code') {\n\t\t\t\t\t\twalkTokens(token.content);\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\n\t\t\t\t\t/*\n\t\t\t\t\t * Add the correct `language-xxxx` class to this code block. Keep in mind that the `code-language` token\n\t\t\t\t\t * is optional. But the grammar is defined so that there is only one case we have to handle:\n\t\t\t\t\t *\n\t\t\t\t\t * token.content = [\n\t\t\t\t\t *     <span class=\"punctuation\">```</span>,\n\t\t\t\t\t *     <span class=\"code-language\">xxxx</span>,\n\t\t\t\t\t *     '\\n', // exactly one new lines (\\r or \\n or \\r\\n)\n\t\t\t\t\t *     <span class=\"code-block\">...</span>,\n\t\t\t\t\t *     '\\n', // exactly one new lines again\n\t\t\t\t\t *     <span class=\"punctuation\">```</span>\n\t\t\t\t\t * ];\n\t\t\t\t\t */\n\n\t\t\t\t\tvar codeLang = token.content[1];\n\t\t\t\t\tvar codeBlock = token.content[3];\n\n\t\t\t\t\tif (codeLang && codeBlock &&\n\t\t\t\t\t\tcodeLang.type === 'code-language' && codeBlock.type === 'code-block' &&\n\t\t\t\t\t\ttypeof codeLang.content === 'string') {\n\n\t\t\t\t\t\t// this might be a language that Prism does not support\n\n\t\t\t\t\t\t// do some replacements to support C++, C#, and F#\n\t\t\t\t\t\tvar lang = codeLang.content.replace(/\\b#/g, 'sharp').replace(/\\b\\+\\+/g, 'pp');\n\t\t\t\t\t\t// only use the first word\n\t\t\t\t\t\tlang = (/[a-z][\\w-]*/i.exec(lang) || [''])[0].toLowerCase();\n\t\t\t\t\t\tvar alias = 'language-' + lang;\n\n\t\t\t\t\t\t// add alias\n\t\t\t\t\t\tif (!codeBlock.alias) {\n\t\t\t\t\t\t\tcodeBlock.alias = [alias];\n\t\t\t\t\t\t} else if (typeof codeBlock.alias === 'string') {\n\t\t\t\t\t\t\tcodeBlock.alias = [codeBlock.alias, alias];\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tcodeBlock.alias.push(alias);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\twalkTokens(env.tokens);\n\t\t});\n\n\t\tPrism.hooks.add('wrap', function (env) {\n\t\t\tif (env.type !== 'code-block') {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tvar codeLang = '';\n\t\t\tfor (var i = 0, l = env.classes.length; i < l; i++) {\n\t\t\t\tvar cls = env.classes[i];\n\t\t\t\tvar match = /language-(.+)/.exec(cls);\n\t\t\t\tif (match) {\n\t\t\t\t\tcodeLang = match[1];\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tvar grammar = Prism.languages[codeLang];\n\n\t\t\tif (!grammar) {\n\t\t\t\tif (codeLang && codeLang !== 'none' && Prism.plugins.autoloader) {\n\t\t\t\t\tvar id = 'md-' + new Date().valueOf() + '-' + Math.floor(Math.random() * 1e16);\n\t\t\t\t\tenv.attributes['id'] = id;\n\n\t\t\t\t\tPrism.plugins.autoloader.loadLanguages(codeLang, function () {\n\t\t\t\t\t\tvar ele = document.getElementById(id);\n\t\t\t\t\t\tif (ele) {\n\t\t\t\t\t\t\tele.innerHTML = Prism.highlight(ele.textContent, Prism.languages[codeLang], codeLang);\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tenv.content = Prism.highlight(textContent(env.content), grammar, codeLang);\n\t\t\t}\n\t\t});\n\n\t\tvar tagPattern = RegExp(Prism.languages.markup.tag.pattern.source, 'gi');\n\n\t\t/**\n\t\t * A list of known entity names.\n\t\t *\n\t\t * This will always be incomplete to save space. The current list is the one used by lowdash's unescape function.\n\t\t *\n\t\t * @see {@link https://github.com/lodash/lodash/blob/2da024c3b4f9947a48517639de7560457cd4ec6c/unescape.js#L2}\n\t\t */\n\t\tvar KNOWN_ENTITY_NAMES = {\n\t\t\t'amp': '&',\n\t\t\t'lt': '<',\n\t\t\t'gt': '>',\n\t\t\t'quot': '\"',\n\t\t};\n\n\t\t// IE 11 doesn't support `String.fromCodePoint`\n\t\tvar fromCodePoint = String.fromCodePoint || String.fromCharCode;\n\n\t\t/**\n\t\t * Returns the text content of a given HTML source code string.\n\t\t *\n\t\t * @param {string} html\n\t\t * @returns {string}\n\t\t */\n\t\tfunction textContent(html) {\n\t\t\t// remove all tags\n\t\t\tvar text = html.replace(tagPattern, '');\n\n\t\t\t// decode known entities\n\t\t\ttext = text.replace(/&(\\w{1,8}|#x?[\\da-f]{1,8});/gi, function (m, code) {\n\t\t\t\tcode = code.toLowerCase();\n\n\t\t\t\tif (code[0] === '#') {\n\t\t\t\t\tvar value;\n\t\t\t\t\tif (code[1] === 'x') {\n\t\t\t\t\t\tvalue = parseInt(code.slice(2), 16);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tvalue = Number(code.slice(1));\n\t\t\t\t\t}\n\n\t\t\t\t\treturn fromCodePoint(value);\n\t\t\t\t} else {\n\t\t\t\t\tvar known = KNOWN_ENTITY_NAMES[code];\n\t\t\t\t\tif (known) {\n\t\t\t\t\t\treturn known;\n\t\t\t\t\t}\n\n\t\t\t\t\t// unable to decode\n\t\t\t\t\treturn m;\n\t\t\t\t}\n\t\t\t});\n\n\t\t\treturn text;\n\t\t}\n\n\t\tPrism.languages.md = Prism.languages.markdown;\n\n\t}(Prism));\n\n\tPrism.languages.graphql = {\n\t\t'comment': /#.*/,\n\t\t'description': {\n\t\t\tpattern: /(?:\"\"\"(?:[^\"]|(?!\"\"\")\")*\"\"\"|\"(?:\\\\.|[^\\\\\"\\r\\n])*\")(?=\\s*[a-z_])/i,\n\t\t\tgreedy: true,\n\t\t\talias: 'string',\n\t\t\tinside: {\n\t\t\t\t'language-markdown': {\n\t\t\t\t\tpattern: /(^\"(?:\"\")?)(?!\\1)[\\s\\S]+(?=\\1$)/,\n\t\t\t\t\tlookbehind: true,\n\t\t\t\t\tinside: Prism.languages.markdown\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t'string': {\n\t\t\tpattern: /\"\"\"(?:[^\"]|(?!\"\"\")\")*\"\"\"|\"(?:\\\\.|[^\\\\\"\\r\\n])*\"/,\n\t\t\tgreedy: true\n\t\t},\n\t\t'number': /(?:\\B-|\\b)\\d+(?:\\.\\d+)?(?:e[+-]?\\d+)?\\b/i,\n\t\t'boolean': /\\b(?:false|true)\\b/,\n\t\t'variable': /\\$[a-z_]\\w*/i,\n\t\t'directive': {\n\t\t\tpattern: /@[a-z_]\\w*/i,\n\t\t\talias: 'function'\n\t\t},\n\t\t'attr-name': {\n\t\t\tpattern: /\\b[a-z_]\\w*(?=\\s*(?:\\((?:[^()\"]|\"(?:\\\\.|[^\\\\\"\\r\\n])*\")*\\))?:)/i,\n\t\t\tgreedy: true\n\t\t},\n\t\t'atom-input': {\n\t\t\tpattern: /\\b[A-Z]\\w*Input\\b/,\n\t\t\talias: 'class-name'\n\t\t},\n\t\t'scalar': /\\b(?:Boolean|Float|ID|Int|String)\\b/,\n\t\t'constant': /\\b[A-Z][A-Z_\\d]*\\b/,\n\t\t'class-name': {\n\t\t\tpattern: /(\\b(?:enum|implements|interface|on|scalar|type|union)\\s+|&\\s*|:\\s*|\\[)[A-Z_]\\w*/,\n\t\t\tlookbehind: true\n\t\t},\n\t\t'fragment': {\n\t\t\tpattern: /(\\bfragment\\s+|\\.{3}\\s*(?!on\\b))[a-zA-Z_]\\w*/,\n\t\t\tlookbehind: true,\n\t\t\talias: 'function'\n\t\t},\n\t\t'definition-mutation': {\n\t\t\tpattern: /(\\bmutation\\s+)[a-zA-Z_]\\w*/,\n\t\t\tlookbehind: true,\n\t\t\talias: 'function'\n\t\t},\n\t\t'definition-query': {\n\t\t\tpattern: /(\\bquery\\s+)[a-zA-Z_]\\w*/,\n\t\t\tlookbehind: true,\n\t\t\talias: 'function'\n\t\t},\n\t\t'keyword': /\\b(?:directive|enum|extend|fragment|implements|input|interface|mutation|on|query|repeatable|scalar|schema|subscription|type|union)\\b/,\n\t\t'operator': /[!=|&]|\\.{3}/,\n\t\t'property-query': /\\w+(?=\\s*\\()/,\n\t\t'object': /\\w+(?=\\s*\\{)/,\n\t\t'punctuation': /[!(){}\\[\\]:=,]/,\n\t\t'property': /\\w+/\n\t};\n\n\tPrism.hooks.add('after-tokenize', function afterTokenizeGraphql(env) {\n\t\tif (env.language !== 'graphql') {\n\t\t\treturn;\n\t\t}\n\n\t\t/**\n\t\t * get the graphql token stream that we want to customize\n\t\t *\n\t\t * @typedef {InstanceType<import(\"./prism-core\")[\"Token\"]>} Token\n\t\t * @type {Token[]}\n\t\t */\n\t\tvar validTokens = env.tokens.filter(function (token) {\n\t\t\treturn typeof token !== 'string' && token.type !== 'comment' && token.type !== 'scalar';\n\t\t});\n\n\t\tvar currentIndex = 0;\n\n\t\t/**\n\t\t * Returns whether the token relative to the current index has the given type.\n\t\t *\n\t\t * @param {number} offset\n\t\t * @returns {Token | undefined}\n\t\t */\n\t\tfunction getToken(offset) {\n\t\t\treturn validTokens[currentIndex + offset];\n\t\t}\n\n\t\t/**\n\t\t * Returns whether the token relative to the current index has the given type.\n\t\t *\n\t\t * @param {readonly string[]} types\n\t\t * @param {number} [offset=0]\n\t\t * @returns {boolean}\n\t\t */\n\t\tfunction isTokenType(types, offset) {\n\t\t\toffset = offset || 0;\n\t\t\tfor (var i = 0; i < types.length; i++) {\n\t\t\t\tvar token = getToken(i + offset);\n\t\t\t\tif (!token || token.type !== types[i]) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\n\t\t/**\n\t\t * Returns the index of the closing bracket to an opening bracket.\n\t\t *\n\t\t * It is assumed that `token[currentIndex - 1]` is an opening bracket.\n\t\t *\n\t\t * If no closing bracket could be found, `-1` will be returned.\n\t\t *\n\t\t * @param {RegExp} open\n\t\t * @param {RegExp} close\n\t\t * @returns {number}\n\t\t */\n\t\tfunction findClosingBracket(open, close) {\n\t\t\tvar stackHeight = 1;\n\n\t\t\tfor (var i = currentIndex; i < validTokens.length; i++) {\n\t\t\t\tvar token = validTokens[i];\n\t\t\t\tvar content = token.content;\n\n\t\t\t\tif (token.type === 'punctuation' && typeof content === 'string') {\n\t\t\t\t\tif (open.test(content)) {\n\t\t\t\t\t\tstackHeight++;\n\t\t\t\t\t} else if (close.test(content)) {\n\t\t\t\t\t\tstackHeight--;\n\n\t\t\t\t\t\tif (stackHeight === 0) {\n\t\t\t\t\t\t\treturn i;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn -1;\n\t\t}\n\n\t\t/**\n\t\t * Adds an alias to the given token.\n\t\t *\n\t\t * @param {Token} token\n\t\t * @param {string} alias\n\t\t * @returns {void}\n\t\t */\n\t\tfunction addAlias(token, alias) {\n\t\t\tvar aliases = token.alias;\n\t\t\tif (!aliases) {\n\t\t\t\ttoken.alias = aliases = [];\n\t\t\t} else if (!Array.isArray(aliases)) {\n\t\t\t\ttoken.alias = aliases = [aliases];\n\t\t\t}\n\t\t\taliases.push(alias);\n\t\t}\n\n\t\tfor (; currentIndex < validTokens.length;) {\n\t\t\tvar startToken = validTokens[currentIndex++];\n\n\t\t\t// add special aliases for mutation tokens\n\t\t\tif (startToken.type === 'keyword' && startToken.content === 'mutation') {\n\t\t\t\t// any array of the names of all input variables (if any)\n\t\t\t\tvar inputVariables = [];\n\n\t\t\t\tif (isTokenType(['definition-mutation', 'punctuation']) && getToken(1).content === '(') {\n\t\t\t\t\t// definition\n\n\t\t\t\t\tcurrentIndex += 2; // skip 'definition-mutation' and 'punctuation'\n\n\t\t\t\t\tvar definitionEnd = findClosingBracket(/^\\($/, /^\\)$/);\n\t\t\t\t\tif (definitionEnd === -1) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\n\t\t\t\t\t// find all input variables\n\t\t\t\t\tfor (; currentIndex < definitionEnd; currentIndex++) {\n\t\t\t\t\t\tvar t = getToken(0);\n\t\t\t\t\t\tif (t.type === 'variable') {\n\t\t\t\t\t\t\taddAlias(t, 'variable-input');\n\t\t\t\t\t\t\tinputVariables.push(t.content);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tcurrentIndex = definitionEnd + 1;\n\t\t\t\t}\n\n\t\t\t\tif (isTokenType(['punctuation', 'property-query']) && getToken(0).content === '{') {\n\t\t\t\t\tcurrentIndex++; // skip opening bracket\n\n\t\t\t\t\taddAlias(getToken(0), 'property-mutation');\n\n\t\t\t\t\tif (inputVariables.length > 0) {\n\t\t\t\t\t\tvar mutationEnd = findClosingBracket(/^\\{$/, /^\\}$/);\n\t\t\t\t\t\tif (mutationEnd === -1) {\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// give references to input variables a special alias\n\t\t\t\t\t\tfor (var i = currentIndex; i < mutationEnd; i++) {\n\t\t\t\t\t\t\tvar varToken = validTokens[i];\n\t\t\t\t\t\t\tif (varToken.type === 'variable' && inputVariables.indexOf(varToken.content) >= 0) {\n\t\t\t\t\t\t\t\taddAlias(varToken, 'variable-input');\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t});\n\n\t/**\n\t * Original by Samuel Flores\n\t *\n\t * Adds the following new token classes:\n\t *     constant, builtin, variable, symbol, regex\n\t */\n\t(function (Prism) {\n\t\tPrism.languages.ruby = Prism.languages.extend('clike', {\n\t\t\t'comment': {\n\t\t\t\tpattern: /#.*|^=begin\\s[\\s\\S]*?^=end/m,\n\t\t\t\tgreedy: true\n\t\t\t},\n\t\t\t'class-name': {\n\t\t\t\tpattern: /(\\b(?:class|module)\\s+|\\bcatch\\s+\\()[\\w.\\\\]+|\\b[A-Z_]\\w*(?=\\s*\\.\\s*new\\b)/,\n\t\t\t\tlookbehind: true,\n\t\t\t\tinside: {\n\t\t\t\t\t'punctuation': /[.\\\\]/\n\t\t\t\t}\n\t\t\t},\n\t\t\t'keyword': /\\b(?:BEGIN|END|alias|and|begin|break|case|class|def|define_method|defined|do|each|else|elsif|end|ensure|extend|for|if|in|include|module|new|next|nil|not|or|prepend|private|protected|public|raise|redo|require|rescue|retry|return|self|super|then|throw|undef|unless|until|when|while|yield)\\b/,\n\t\t\t'operator': /\\.{2,3}|&\\.|===|<?=>|[!=]?~|(?:&&|\\|\\||<<|>>|\\*\\*|[+\\-*/%<>!^&|=])=?|[?:]/,\n\t\t\t'punctuation': /[(){}[\\].,;]/,\n\t\t});\n\n\t\tPrism.languages.insertBefore('ruby', 'operator', {\n\t\t\t'double-colon': {\n\t\t\t\tpattern: /::/,\n\t\t\t\talias: 'punctuation'\n\t\t\t},\n\t\t});\n\n\t\tvar interpolation = {\n\t\t\tpattern: /((?:^|[^\\\\])(?:\\\\{2})*)#\\{(?:[^{}]|\\{[^{}]*\\})*\\}/,\n\t\t\tlookbehind: true,\n\t\t\tinside: {\n\t\t\t\t'content': {\n\t\t\t\t\tpattern: /^(#\\{)[\\s\\S]+(?=\\}$)/,\n\t\t\t\t\tlookbehind: true,\n\t\t\t\t\tinside: Prism.languages.ruby\n\t\t\t\t},\n\t\t\t\t'delimiter': {\n\t\t\t\t\tpattern: /^#\\{|\\}$/,\n\t\t\t\t\talias: 'punctuation'\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\tdelete Prism.languages.ruby.function;\n\n\t\tvar percentExpression = '(?:' + [\n\t\t\t/([^a-zA-Z0-9\\s{(\\[<=])(?:(?!\\1)[^\\\\]|\\\\[\\s\\S])*\\1/.source,\n\t\t\t/\\((?:[^()\\\\]|\\\\[\\s\\S]|\\((?:[^()\\\\]|\\\\[\\s\\S])*\\))*\\)/.source,\n\t\t\t/\\{(?:[^{}\\\\]|\\\\[\\s\\S]|\\{(?:[^{}\\\\]|\\\\[\\s\\S])*\\})*\\}/.source,\n\t\t\t/\\[(?:[^\\[\\]\\\\]|\\\\[\\s\\S]|\\[(?:[^\\[\\]\\\\]|\\\\[\\s\\S])*\\])*\\]/.source,\n\t\t\t/<(?:[^<>\\\\]|\\\\[\\s\\S]|<(?:[^<>\\\\]|\\\\[\\s\\S])*>)*>/.source\n\t\t].join('|') + ')';\n\n\t\tvar symbolName = /(?:\"(?:\\\\.|[^\"\\\\\\r\\n])*\"|(?:\\b[a-zA-Z_]\\w*|[^\\s\\0-\\x7F]+)[?!]?|\\$.)/.source;\n\n\t\tPrism.languages.insertBefore('ruby', 'keyword', {\n\t\t\t'regex-literal': [\n\t\t\t\t{\n\t\t\t\t\tpattern: RegExp(/%r/.source + percentExpression + /[egimnosux]{0,6}/.source),\n\t\t\t\t\tgreedy: true,\n\t\t\t\t\tinside: {\n\t\t\t\t\t\t'interpolation': interpolation,\n\t\t\t\t\t\t'regex': /[\\s\\S]+/\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tpattern: /(^|[^/])\\/(?!\\/)(?:\\[[^\\r\\n\\]]+\\]|\\\\.|[^[/\\\\\\r\\n])+\\/[egimnosux]{0,6}(?=\\s*(?:$|[\\r\\n,.;})#]))/,\n\t\t\t\t\tlookbehind: true,\n\t\t\t\t\tgreedy: true,\n\t\t\t\t\tinside: {\n\t\t\t\t\t\t'interpolation': interpolation,\n\t\t\t\t\t\t'regex': /[\\s\\S]+/\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t],\n\t\t\t'variable': /[@$]+[a-zA-Z_]\\w*(?:[?!]|\\b)/,\n\t\t\t'symbol': [\n\t\t\t\t{\n\t\t\t\t\tpattern: RegExp(/(^|[^:]):/.source + symbolName),\n\t\t\t\t\tlookbehind: true,\n\t\t\t\t\tgreedy: true\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tpattern: RegExp(/([\\r\\n{(,][ \\t]*)/.source + symbolName + /(?=:(?!:))/.source),\n\t\t\t\t\tlookbehind: true,\n\t\t\t\t\tgreedy: true\n\t\t\t\t},\n\t\t\t],\n\t\t\t'method-definition': {\n\t\t\t\tpattern: /(\\bdef\\s+)\\w+(?:\\s*\\.\\s*\\w+)?/,\n\t\t\t\tlookbehind: true,\n\t\t\t\tinside: {\n\t\t\t\t\t'function': /\\b\\w+$/,\n\t\t\t\t\t'keyword': /^self\\b/,\n\t\t\t\t\t'class-name': /^\\w+/,\n\t\t\t\t\t'punctuation': /\\./\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\tPrism.languages.insertBefore('ruby', 'string', {\n\t\t\t'string-literal': [\n\t\t\t\t{\n\t\t\t\t\tpattern: RegExp(/%[qQiIwWs]?/.source + percentExpression),\n\t\t\t\t\tgreedy: true,\n\t\t\t\t\tinside: {\n\t\t\t\t\t\t'interpolation': interpolation,\n\t\t\t\t\t\t'string': /[\\s\\S]+/\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tpattern: /(\"|')(?:#\\{[^}]+\\}|#(?!\\{)|\\\\(?:\\r\\n|[\\s\\S])|(?!\\1)[^\\\\#\\r\\n])*\\1/,\n\t\t\t\t\tgreedy: true,\n\t\t\t\t\tinside: {\n\t\t\t\t\t\t'interpolation': interpolation,\n\t\t\t\t\t\t'string': /[\\s\\S]+/\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tpattern: /<<[-~]?([a-z_]\\w*)[\\r\\n](?:.*[\\r\\n])*?[\\t ]*\\1/i,\n\t\t\t\t\talias: 'heredoc-string',\n\t\t\t\t\tgreedy: true,\n\t\t\t\t\tinside: {\n\t\t\t\t\t\t'delimiter': {\n\t\t\t\t\t\t\tpattern: /^<<[-~]?[a-z_]\\w*|\\b[a-z_]\\w*$/i,\n\t\t\t\t\t\t\tinside: {\n\t\t\t\t\t\t\t\t'symbol': /\\b\\w+/,\n\t\t\t\t\t\t\t\t'punctuation': /^<<[-~]?/\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t},\n\t\t\t\t\t\t'interpolation': interpolation,\n\t\t\t\t\t\t'string': /[\\s\\S]+/\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tpattern: /<<[-~]?'([a-z_]\\w*)'[\\r\\n](?:.*[\\r\\n])*?[\\t ]*\\1/i,\n\t\t\t\t\talias: 'heredoc-string',\n\t\t\t\t\tgreedy: true,\n\t\t\t\t\tinside: {\n\t\t\t\t\t\t'delimiter': {\n\t\t\t\t\t\t\tpattern: /^<<[-~]?'[a-z_]\\w*'|\\b[a-z_]\\w*$/i,\n\t\t\t\t\t\t\tinside: {\n\t\t\t\t\t\t\t\t'symbol': /\\b\\w+/,\n\t\t\t\t\t\t\t\t'punctuation': /^<<[-~]?'|'$/,\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t},\n\t\t\t\t\t\t'string': /[\\s\\S]+/\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t],\n\t\t\t'command-literal': [\n\t\t\t\t{\n\t\t\t\t\tpattern: RegExp(/%x/.source + percentExpression),\n\t\t\t\t\tgreedy: true,\n\t\t\t\t\tinside: {\n\t\t\t\t\t\t'interpolation': interpolation,\n\t\t\t\t\t\t'command': {\n\t\t\t\t\t\t\tpattern: /[\\s\\S]+/,\n\t\t\t\t\t\t\talias: 'string'\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tpattern: /`(?:#\\{[^}]+\\}|#(?!\\{)|\\\\(?:\\r\\n|[\\s\\S])|[^\\\\`#\\r\\n])*`/,\n\t\t\t\t\tgreedy: true,\n\t\t\t\t\tinside: {\n\t\t\t\t\t\t'interpolation': interpolation,\n\t\t\t\t\t\t'command': {\n\t\t\t\t\t\t\tpattern: /[\\s\\S]+/,\n\t\t\t\t\t\t\talias: 'string'\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t]\n\t\t});\n\n\t\tdelete Prism.languages.ruby.string;\n\n\t\tPrism.languages.insertBefore('ruby', 'number', {\n\t\t\t'builtin': /\\b(?:Array|Bignum|Binding|Class|Continuation|Dir|Exception|FalseClass|File|Fixnum|Float|Hash|IO|Integer|MatchData|Method|Module|NilClass|Numeric|Object|Proc|Range|Regexp|Stat|String|Struct|Symbol|TMS|Thread|ThreadGroup|Time|TrueClass)\\b/,\n\t\t\t'constant': /\\b[A-Z][A-Z0-9_]*(?:[?!]|\\b)/\n\t\t});\n\n\t\tPrism.languages.rb = Prism.languages.ruby;\n\t}(Prism));\n\n\t(function (Prism) {\n\n\t\tvar specialEscape = {\n\t\t\tpattern: /\\\\[\\\\(){}[\\]^$+*?|.]/,\n\t\t\talias: 'escape'\n\t\t};\n\t\tvar escape = /\\\\(?:x[\\da-fA-F]{2}|u[\\da-fA-F]{4}|u\\{[\\da-fA-F]+\\}|0[0-7]{0,2}|[123][0-7]{2}|c[a-zA-Z]|.)/;\n\t\tvar charSet = {\n\t\t\tpattern: /\\.|\\\\[wsd]|\\\\p\\{[^{}]+\\}/i,\n\t\t\talias: 'class-name'\n\t\t};\n\t\tvar charSetWithoutDot = {\n\t\t\tpattern: /\\\\[wsd]|\\\\p\\{[^{}]+\\}/i,\n\t\t\talias: 'class-name'\n\t\t};\n\n\t\tvar rangeChar = '(?:[^\\\\\\\\-]|' + escape.source + ')';\n\t\tvar range = RegExp(rangeChar + '-' + rangeChar);\n\n\t\t// the name of a capturing group\n\t\tvar groupName = {\n\t\t\tpattern: /(<|')[^<>']+(?=[>']$)/,\n\t\t\tlookbehind: true,\n\t\t\talias: 'variable'\n\t\t};\n\n\t\tPrism.languages.regex = {\n\t\t\t'char-class': {\n\t\t\t\tpattern: /((?:^|[^\\\\])(?:\\\\\\\\)*)\\[(?:[^\\\\\\]]|\\\\[\\s\\S])*\\]/,\n\t\t\t\tlookbehind: true,\n\t\t\t\tinside: {\n\t\t\t\t\t'char-class-negation': {\n\t\t\t\t\t\tpattern: /(^\\[)\\^/,\n\t\t\t\t\t\tlookbehind: true,\n\t\t\t\t\t\talias: 'operator'\n\t\t\t\t\t},\n\t\t\t\t\t'char-class-punctuation': {\n\t\t\t\t\t\tpattern: /^\\[|\\]$/,\n\t\t\t\t\t\talias: 'punctuation'\n\t\t\t\t\t},\n\t\t\t\t\t'range': {\n\t\t\t\t\t\tpattern: range,\n\t\t\t\t\t\tinside: {\n\t\t\t\t\t\t\t'escape': escape,\n\t\t\t\t\t\t\t'range-punctuation': {\n\t\t\t\t\t\t\t\tpattern: /-/,\n\t\t\t\t\t\t\t\talias: 'operator'\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\t'special-escape': specialEscape,\n\t\t\t\t\t'char-set': charSetWithoutDot,\n\t\t\t\t\t'escape': escape\n\t\t\t\t}\n\t\t\t},\n\t\t\t'special-escape': specialEscape,\n\t\t\t'char-set': charSet,\n\t\t\t'backreference': [\n\t\t\t\t{\n\t\t\t\t\t// a backreference which is not an octal escape\n\t\t\t\t\tpattern: /\\\\(?![123][0-7]{2})[1-9]/,\n\t\t\t\t\talias: 'keyword'\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tpattern: /\\\\k<[^<>']+>/,\n\t\t\t\t\talias: 'keyword',\n\t\t\t\t\tinside: {\n\t\t\t\t\t\t'group-name': groupName\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t],\n\t\t\t'anchor': {\n\t\t\t\tpattern: /[$^]|\\\\[ABbGZz]/,\n\t\t\t\talias: 'function'\n\t\t\t},\n\t\t\t'escape': escape,\n\t\t\t'group': [\n\t\t\t\t{\n\t\t\t\t\t// https://docs.oracle.com/javase/10/docs/api/java/util/regex/Pattern.html\n\t\t\t\t\t// https://docs.microsoft.com/en-us/dotnet/standard/base-types/regular-expression-language-quick-reference?view=netframework-4.7.2#grouping-constructs\n\n\t\t\t\t\t// (), (?<name>), (?'name'), (?>), (?:), (?=), (?!), (?<=), (?<!), (?is-m), (?i-m:)\n\t\t\t\t\tpattern: /\\((?:\\?(?:<[^<>']+>|'[^<>']+'|[>:]|<?[=!]|[idmnsuxU]+(?:-[idmnsuxU]+)?:?))?/,\n\t\t\t\t\talias: 'punctuation',\n\t\t\t\t\tinside: {\n\t\t\t\t\t\t'group-name': groupName\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tpattern: /\\)/,\n\t\t\t\t\talias: 'punctuation'\n\t\t\t\t}\n\t\t\t],\n\t\t\t'quantifier': {\n\t\t\t\tpattern: /(?:[+*?]|\\{\\d+(?:,\\d*)?\\})[?+]?/,\n\t\t\t\talias: 'number'\n\t\t\t},\n\t\t\t'alternation': {\n\t\t\t\tpattern: /\\|/,\n\t\t\t\talias: 'keyword'\n\t\t\t}\n\t\t};\n\n\t}(Prism));\n\n\tPrism.languages.javascript = Prism.languages.extend('clike', {\n\t\t'class-name': [\n\t\t\tPrism.languages.clike['class-name'],\n\t\t\t{\n\t\t\t\tpattern: /(^|[^$\\w\\xA0-\\uFFFF])(?!\\s)[_$A-Z\\xA0-\\uFFFF](?:(?!\\s)[$\\w\\xA0-\\uFFFF])*(?=\\.(?:constructor|prototype))/,\n\t\t\t\tlookbehind: true\n\t\t\t}\n\t\t],\n\t\t'keyword': [\n\t\t\t{\n\t\t\t\tpattern: /((?:^|\\})\\s*)catch\\b/,\n\t\t\t\tlookbehind: true\n\t\t\t},\n\t\t\t{\n\t\t\t\tpattern: /(^|[^.]|\\.\\.\\.\\s*)\\b(?:as|assert(?=\\s*\\{)|async(?=\\s*(?:function\\b|\\(|[$\\w\\xA0-\\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\\s*(?:\\{|$))|for|from(?=\\s*(?:['\"]|$))|function|(?:get|set)(?=\\s*(?:[#\\[$\\w\\xA0-\\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\\b/,\n\t\t\t\tlookbehind: true\n\t\t\t},\n\t\t],\n\t\t// Allow for all non-ASCII characters (See http://stackoverflow.com/a/2008444)\n\t\t'function': /#?(?!\\s)[_$a-zA-Z\\xA0-\\uFFFF](?:(?!\\s)[$\\w\\xA0-\\uFFFF])*(?=\\s*(?:\\.\\s*(?:apply|bind|call)\\s*)?\\()/,\n\t\t'number': {\n\t\t\tpattern: RegExp(\n\t\t\t\t/(^|[^\\w$])/.source +\n\t\t\t\t'(?:' +\n\t\t\t\t(\n\t\t\t\t\t// constant\n\t\t\t\t\t/NaN|Infinity/.source +\n\t\t\t\t\t'|' +\n\t\t\t\t\t// binary integer\n\t\t\t\t\t/0[bB][01]+(?:_[01]+)*n?/.source +\n\t\t\t\t\t'|' +\n\t\t\t\t\t// octal integer\n\t\t\t\t\t/0[oO][0-7]+(?:_[0-7]+)*n?/.source +\n\t\t\t\t\t'|' +\n\t\t\t\t\t// hexadecimal integer\n\t\t\t\t\t/0[xX][\\dA-Fa-f]+(?:_[\\dA-Fa-f]+)*n?/.source +\n\t\t\t\t\t'|' +\n\t\t\t\t\t// decimal bigint\n\t\t\t\t\t/\\d+(?:_\\d+)*n/.source +\n\t\t\t\t\t'|' +\n\t\t\t\t\t// decimal number (integer or float) but no bigint\n\t\t\t\t\t/(?:\\d+(?:_\\d+)*(?:\\.(?:\\d+(?:_\\d+)*)?)?|\\.\\d+(?:_\\d+)*)(?:[Ee][+-]?\\d+(?:_\\d+)*)?/.source\n\t\t\t\t) +\n\t\t\t\t')' +\n\t\t\t\t/(?![\\w$])/.source\n\t\t\t),\n\t\t\tlookbehind: true\n\t\t},\n\t\t'operator': /--|\\+\\+|\\*\\*=?|=>|&&=?|\\|\\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\\.{3}|\\?\\?=?|\\?\\.?|[~:]/\n\t});\n\n\tPrism.languages.javascript['class-name'][0].pattern = /(\\b(?:class|extends|implements|instanceof|interface|new)\\s+)[\\w.\\\\]+/;\n\n\tPrism.languages.insertBefore('javascript', 'keyword', {\n\t\t'regex': {\n\t\t\tpattern: RegExp(\n\t\t\t\t// lookbehind\n\t\t\t\t// eslint-disable-next-line regexp/no-dupe-characters-character-class\n\t\t\t\t/((?:^|[^$\\w\\xA0-\\uFFFF.\"'\\])\\s]|\\b(?:return|yield))\\s*)/.source +\n\t\t\t\t// Regex pattern:\n\t\t\t\t// There are 2 regex patterns here. The RegExp set notation proposal added support for nested character\n\t\t\t\t// classes if the `v` flag is present. Unfortunately, nested CCs are both context-free and incompatible\n\t\t\t\t// with the only syntax, so we have to define 2 different regex patterns.\n\t\t\t\t/\\//.source +\n\t\t\t\t'(?:' +\n\t\t\t\t/(?:\\[(?:[^\\]\\\\\\r\\n]|\\\\.)*\\]|\\\\.|[^/\\\\\\[\\r\\n])+\\/[dgimyus]{0,7}/.source +\n\t\t\t\t'|' +\n\t\t\t\t// `v` flag syntax. This supports 3 levels of nested character classes.\n\t\t\t\t/(?:\\[(?:[^[\\]\\\\\\r\\n]|\\\\.|\\[(?:[^[\\]\\\\\\r\\n]|\\\\.|\\[(?:[^[\\]\\\\\\r\\n]|\\\\.)*\\])*\\])*\\]|\\\\.|[^/\\\\\\[\\r\\n])+\\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source +\n\t\t\t\t')' +\n\t\t\t\t// lookahead\n\t\t\t\t/(?=(?:\\s|\\/\\*(?:[^*]|\\*(?!\\/))*\\*\\/)*(?:$|[\\r\\n,.;:})\\]]|\\/\\/))/.source\n\t\t\t),\n\t\t\tlookbehind: true,\n\t\t\tgreedy: true,\n\t\t\tinside: {\n\t\t\t\t'regex-source': {\n\t\t\t\t\tpattern: /^(\\/)[\\s\\S]+(?=\\/[a-z]*$)/,\n\t\t\t\t\tlookbehind: true,\n\t\t\t\t\talias: 'language-regex',\n\t\t\t\t\tinside: Prism.languages.regex\n\t\t\t\t},\n\t\t\t\t'regex-delimiter': /^\\/|\\/$/,\n\t\t\t\t'regex-flags': /^[a-z]+$/,\n\t\t\t}\n\t\t},\n\t\t// This must be declared before keyword because we use \"function\" inside the look-forward\n\t\t'function-variable': {\n\t\t\tpattern: /#?(?!\\s)[_$a-zA-Z\\xA0-\\uFFFF](?:(?!\\s)[$\\w\\xA0-\\uFFFF])*(?=\\s*[=:]\\s*(?:async\\s*)?(?:\\bfunction\\b|(?:\\((?:[^()]|\\([^()]*\\))*\\)|(?!\\s)[_$a-zA-Z\\xA0-\\uFFFF](?:(?!\\s)[$\\w\\xA0-\\uFFFF])*)\\s*=>))/,\n\t\t\talias: 'function'\n\t\t},\n\t\t'parameter': [\n\t\t\t{\n\t\t\t\tpattern: /(function(?:\\s+(?!\\s)[_$a-zA-Z\\xA0-\\uFFFF](?:(?!\\s)[$\\w\\xA0-\\uFFFF])*)?\\s*\\(\\s*)(?!\\s)(?:[^()\\s]|\\s+(?![\\s)])|\\([^()]*\\))+(?=\\s*\\))/,\n\t\t\t\tlookbehind: true,\n\t\t\t\tinside: Prism.languages.javascript\n\t\t\t},\n\t\t\t{\n\t\t\t\tpattern: /(^|[^$\\w\\xA0-\\uFFFF])(?!\\s)[_$a-z\\xA0-\\uFFFF](?:(?!\\s)[$\\w\\xA0-\\uFFFF])*(?=\\s*=>)/i,\n\t\t\t\tlookbehind: true,\n\t\t\t\tinside: Prism.languages.javascript\n\t\t\t},\n\t\t\t{\n\t\t\t\tpattern: /(\\(\\s*)(?!\\s)(?:[^()\\s]|\\s+(?![\\s)])|\\([^()]*\\))+(?=\\s*\\)\\s*=>)/,\n\t\t\t\tlookbehind: true,\n\t\t\t\tinside: Prism.languages.javascript\n\t\t\t},\n\t\t\t{\n\t\t\t\tpattern: /((?:\\b|\\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\\w\\xA0-\\uFFFF]))(?:(?!\\s)[_$a-zA-Z\\xA0-\\uFFFF](?:(?!\\s)[$\\w\\xA0-\\uFFFF])*\\s*)\\(\\s*|\\]\\s*\\(\\s*)(?!\\s)(?:[^()\\s]|\\s+(?![\\s)])|\\([^()]*\\))+(?=\\s*\\)\\s*\\{)/,\n\t\t\t\tlookbehind: true,\n\t\t\t\tinside: Prism.languages.javascript\n\t\t\t}\n\t\t],\n\t\t'constant': /\\b[A-Z](?:[A-Z_]|\\dx?)*\\b/\n\t});\n\n\tPrism.languages.insertBefore('javascript', 'string', {\n\t\t'hashbang': {\n\t\t\tpattern: /^#!.*/,\n\t\t\tgreedy: true,\n\t\t\talias: 'comment'\n\t\t},\n\t\t'template-string': {\n\t\t\tpattern: /`(?:\\\\[\\s\\S]|\\$\\{(?:[^{}]|\\{(?:[^{}]|\\{[^}]*\\})*\\})+\\}|(?!\\$\\{)[^\\\\`])*`/,\n\t\t\tgreedy: true,\n\t\t\tinside: {\n\t\t\t\t'template-punctuation': {\n\t\t\t\t\tpattern: /^`|`$/,\n\t\t\t\t\talias: 'string'\n\t\t\t\t},\n\t\t\t\t'interpolation': {\n\t\t\t\t\tpattern: /((?:^|[^\\\\])(?:\\\\{2})*)\\$\\{(?:[^{}]|\\{(?:[^{}]|\\{[^}]*\\})*\\})+\\}/,\n\t\t\t\t\tlookbehind: true,\n\t\t\t\t\tinside: {\n\t\t\t\t\t\t'interpolation-punctuation': {\n\t\t\t\t\t\t\tpattern: /^\\$\\{|\\}$/,\n\t\t\t\t\t\t\talias: 'punctuation'\n\t\t\t\t\t\t},\n\t\t\t\t\t\trest: Prism.languages.javascript\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t'string': /[\\s\\S]+/\n\t\t\t}\n\t\t},\n\t\t'string-property': {\n\t\t\tpattern: /((?:^|[,{])[ \\t]*)([\"'])(?:\\\\(?:\\r\\n|[\\s\\S])|(?!\\2)[^\\\\\\r\\n])*\\2(?=\\s*:)/m,\n\t\t\tlookbehind: true,\n\t\t\tgreedy: true,\n\t\t\talias: 'property'\n\t\t}\n\t});\n\n\tPrism.languages.insertBefore('javascript', 'operator', {\n\t\t'literal-property': {\n\t\t\tpattern: /((?:^|[,{])[ \\t]*)(?!\\s)[_$a-zA-Z\\xA0-\\uFFFF](?:(?!\\s)[$\\w\\xA0-\\uFFFF])*(?=\\s*:)/m,\n\t\t\tlookbehind: true,\n\t\t\talias: 'property'\n\t\t},\n\t});\n\n\tif (Prism.languages.markup) {\n\t\tPrism.languages.markup.tag.addInlined('script', 'javascript');\n\n\t\t// add attribute support for all DOM events.\n\t\t// https://developer.mozilla.org/en-US/docs/Web/Events#Standard_events\n\t\tPrism.languages.markup.tag.addAttribute(\n\t\t\t/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,\n\t\t\t'javascript'\n\t\t);\n\t}\n\n\tPrism.languages.js = Prism.languages.javascript;\n\n\t(function (Prism) {\n\n\t\t/**\n\t\t * Returns the placeholder for the given language id and index.\n\t\t *\n\t\t * @param {string} language\n\t\t * @param {string|number} index\n\t\t * @returns {string}\n\t\t */\n\t\tfunction getPlaceholder(language, index) {\n\t\t\treturn '___' + language.toUpperCase() + index + '___';\n\t\t}\n\n\t\tObject.defineProperties(Prism.languages['markup-templating'] = {}, {\n\t\t\tbuildPlaceholders: {\n\t\t\t\t/**\n\t\t\t\t * Tokenize all inline templating expressions matching `placeholderPattern`.\n\t\t\t\t *\n\t\t\t\t * If `replaceFilter` is provided, only matches of `placeholderPattern` for which `replaceFilter` returns\n\t\t\t\t * `true` will be replaced.\n\t\t\t\t *\n\t\t\t\t * @param {object} env The environment of the `before-tokenize` hook.\n\t\t\t\t * @param {string} language The language id.\n\t\t\t\t * @param {RegExp} placeholderPattern The matches of this pattern will be replaced by placeholders.\n\t\t\t\t * @param {(match: string) => boolean} [replaceFilter]\n\t\t\t\t */\n\t\t\t\tvalue: function (env, language, placeholderPattern, replaceFilter) {\n\t\t\t\t\tif (env.language !== language) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tvar tokenStack = env.tokenStack = [];\n\n\t\t\t\t\tenv.code = env.code.replace(placeholderPattern, function (match) {\n\t\t\t\t\t\tif (typeof replaceFilter === 'function' && !replaceFilter(match)) {\n\t\t\t\t\t\t\treturn match;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tvar i = tokenStack.length;\n\t\t\t\t\t\tvar placeholder;\n\n\t\t\t\t\t\t// Check for existing strings\n\t\t\t\t\t\twhile (env.code.indexOf(placeholder = getPlaceholder(language, i)) !== -1) {\n\t\t\t\t\t\t\t++i;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Create a sparse array\n\t\t\t\t\t\ttokenStack[i] = match;\n\n\t\t\t\t\t\treturn placeholder;\n\t\t\t\t\t});\n\n\t\t\t\t\t// Switch the grammar to markup\n\t\t\t\t\tenv.grammar = Prism.languages.markup;\n\t\t\t\t}\n\t\t\t},\n\t\t\ttokenizePlaceholders: {\n\t\t\t\t/**\n\t\t\t\t * Replace placeholders with proper tokens after tokenizing.\n\t\t\t\t *\n\t\t\t\t * @param {object} env The environment of the `after-tokenize` hook.\n\t\t\t\t * @param {string} language The language id.\n\t\t\t\t */\n\t\t\t\tvalue: function (env, language) {\n\t\t\t\t\tif (env.language !== language || !env.tokenStack) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Switch the grammar back\n\t\t\t\t\tenv.grammar = Prism.languages[language];\n\n\t\t\t\t\tvar j = 0;\n\t\t\t\t\tvar keys = Object.keys(env.tokenStack);\n\n\t\t\t\t\tfunction walkTokens(tokens) {\n\t\t\t\t\t\tfor (var i = 0; i < tokens.length; i++) {\n\t\t\t\t\t\t\t// all placeholders are replaced already\n\t\t\t\t\t\t\tif (j >= keys.length) {\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tvar token = tokens[i];\n\t\t\t\t\t\t\tif (typeof token === 'string' || (token.content && typeof token.content === 'string')) {\n\t\t\t\t\t\t\t\tvar k = keys[j];\n\t\t\t\t\t\t\t\tvar t = env.tokenStack[k];\n\t\t\t\t\t\t\t\tvar s = typeof token === 'string' ? token : token.content;\n\t\t\t\t\t\t\t\tvar placeholder = getPlaceholder(language, k);\n\n\t\t\t\t\t\t\t\tvar index = s.indexOf(placeholder);\n\t\t\t\t\t\t\t\tif (index > -1) {\n\t\t\t\t\t\t\t\t\t++j;\n\n\t\t\t\t\t\t\t\t\tvar before = s.substring(0, index);\n\t\t\t\t\t\t\t\t\tvar middle = new Prism.Token(language, Prism.tokenize(t, env.grammar), 'language-' + language, t);\n\t\t\t\t\t\t\t\t\tvar after = s.substring(index + placeholder.length);\n\n\t\t\t\t\t\t\t\t\tvar replacement = [];\n\t\t\t\t\t\t\t\t\tif (before) {\n\t\t\t\t\t\t\t\t\t\treplacement.push.apply(replacement, walkTokens([before]));\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\treplacement.push(middle);\n\t\t\t\t\t\t\t\t\tif (after) {\n\t\t\t\t\t\t\t\t\t\treplacement.push.apply(replacement, walkTokens([after]));\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\tif (typeof token === 'string') {\n\t\t\t\t\t\t\t\t\t\ttokens.splice.apply(tokens, [i, 1].concat(replacement));\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\ttoken.content = replacement;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else if (token.content /* && typeof token.content !== 'string' */) {\n\t\t\t\t\t\t\t\twalkTokens(token.content);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\treturn tokens;\n\t\t\t\t\t}\n\n\t\t\t\t\twalkTokens(env.tokens);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t}(Prism));\n\n\t/* FIXME :\n\t :extend() is not handled specifically : its highlighting is buggy.\n\t Mixin usage must be inside a ruleset to be highlighted.\n\t At-rules (e.g. import) containing interpolations are buggy.\n\t Detached rulesets are highlighted as at-rules.\n\t A comment before a mixin usage prevents the latter to be properly highlighted.\n\t */\n\n\tPrism.languages.less = Prism.languages.extend('css', {\n\t\t'comment': [\n\t\t\t/\\/\\*[\\s\\S]*?\\*\\//,\n\t\t\t{\n\t\t\t\tpattern: /(^|[^\\\\])\\/\\/.*/,\n\t\t\t\tlookbehind: true\n\t\t\t}\n\t\t],\n\t\t'atrule': {\n\t\t\tpattern: /@[\\w-](?:\\((?:[^(){}]|\\([^(){}]*\\))*\\)|[^(){};\\s]|\\s+(?!\\s))*?(?=\\s*\\{)/,\n\t\t\tinside: {\n\t\t\t\t'punctuation': /[:()]/\n\t\t\t}\n\t\t},\n\t\t// selectors and mixins are considered the same\n\t\t'selector': {\n\t\t\tpattern: /(?:@\\{[\\w-]+\\}|[^{};\\s@])(?:@\\{[\\w-]+\\}|\\((?:[^(){}]|\\([^(){}]*\\))*\\)|[^(){};@\\s]|\\s+(?!\\s))*?(?=\\s*\\{)/,\n\t\t\tinside: {\n\t\t\t\t// mixin parameters\n\t\t\t\t'variable': /@+[\\w-]+/\n\t\t\t}\n\t\t},\n\n\t\t'property': /(?:@\\{[\\w-]+\\}|[\\w-])+(?:\\+_?)?(?=\\s*:)/,\n\t\t'operator': /[+\\-*\\/]/\n\t});\n\n\tPrism.languages.insertBefore('less', 'property', {\n\t\t'variable': [\n\t\t\t// Variable declaration (the colon must be consumed!)\n\t\t\t{\n\t\t\t\tpattern: /@[\\w-]+\\s*:/,\n\t\t\t\tinside: {\n\t\t\t\t\t'punctuation': /:/\n\t\t\t\t}\n\t\t\t},\n\n\t\t\t// Variable usage\n\t\t\t/@@?[\\w-]+/\n\t\t],\n\t\t'mixin-usage': {\n\t\t\tpattern: /([{;]\\s*)[.#](?!\\d)[\\w-].*?(?=[(;])/,\n\t\t\tlookbehind: true,\n\t\t\talias: 'function'\n\t\t}\n\t});\n\n\tPrism.languages.scss = Prism.languages.extend('css', {\n\t\t'comment': {\n\t\t\tpattern: /(^|[^\\\\])(?:\\/\\*[\\s\\S]*?\\*\\/|\\/\\/.*)/,\n\t\t\tlookbehind: true\n\t\t},\n\t\t'atrule': {\n\t\t\tpattern: /@[\\w-](?:\\([^()]+\\)|[^()\\s]|\\s+(?!\\s))*?(?=\\s+[{;])/,\n\t\t\tinside: {\n\t\t\t\t'rule': /@[\\w-]+/\n\t\t\t\t// See rest below\n\t\t\t}\n\t\t},\n\t\t// url, compassified\n\t\t'url': /(?:[-a-z]+-)?url(?=\\()/i,\n\t\t// CSS selector regex is not appropriate for Sass\n\t\t// since there can be lot more things (var, @ directive, nesting..)\n\t\t// a selector must start at the end of a property or after a brace (end of other rules or nesting)\n\t\t// it can contain some characters that aren't used for defining rules or end of selector, & (parent selector), or interpolated variable\n\t\t// the end of a selector is found when there is no rules in it ( {} or {\\s}) or if there is a property (because an interpolated var\n\t\t// can \"pass\" as a selector- e.g: proper#{$erty})\n\t\t// this one was hard to do, so please be careful if you edit this one :)\n\t\t'selector': {\n\t\t\t// Initial look-ahead is used to prevent matching of blank selectors\n\t\t\tpattern: /(?=\\S)[^@;{}()]?(?:[^@;{}()\\s]|\\s+(?!\\s)|#\\{\\$[-\\w]+\\})+(?=\\s*\\{(?:\\}|\\s|[^}][^:{}]*[:{][^}]))/,\n\t\t\tinside: {\n\t\t\t\t'parent': {\n\t\t\t\t\tpattern: /&/,\n\t\t\t\t\talias: 'important'\n\t\t\t\t},\n\t\t\t\t'placeholder': /%[-\\w]+/,\n\t\t\t\t'variable': /\\$[-\\w]+|#\\{\\$[-\\w]+\\}/\n\t\t\t}\n\t\t},\n\t\t'property': {\n\t\t\tpattern: /(?:[-\\w]|\\$[-\\w]|#\\{\\$[-\\w]+\\})+(?=\\s*:)/,\n\t\t\tinside: {\n\t\t\t\t'variable': /\\$[-\\w]+|#\\{\\$[-\\w]+\\}/\n\t\t\t}\n\t\t}\n\t});\n\n\tPrism.languages.insertBefore('scss', 'atrule', {\n\t\t'keyword': [\n\t\t\t/@(?:content|debug|each|else(?: if)?|extend|for|forward|function|if|import|include|mixin|return|use|warn|while)\\b/i,\n\t\t\t{\n\t\t\t\tpattern: /( )(?:from|through)(?= )/,\n\t\t\t\tlookbehind: true\n\t\t\t}\n\t\t]\n\t});\n\n\tPrism.languages.insertBefore('scss', 'important', {\n\t\t// var and interpolated vars\n\t\t'variable': /\\$[-\\w]+|#\\{\\$[-\\w]+\\}/\n\t});\n\n\tPrism.languages.insertBefore('scss', 'function', {\n\t\t'module-modifier': {\n\t\t\tpattern: /\\b(?:as|hide|show|with)\\b/i,\n\t\t\talias: 'keyword'\n\t\t},\n\t\t'placeholder': {\n\t\t\tpattern: /%[-\\w]+/,\n\t\t\talias: 'selector'\n\t\t},\n\t\t'statement': {\n\t\t\tpattern: /\\B!(?:default|optional)\\b/i,\n\t\t\talias: 'keyword'\n\t\t},\n\t\t'boolean': /\\b(?:false|true)\\b/,\n\t\t'null': {\n\t\t\tpattern: /\\bnull\\b/,\n\t\t\talias: 'keyword'\n\t\t},\n\t\t'operator': {\n\t\t\tpattern: /(\\s)(?:[-+*\\/%]|[=!]=|<=?|>=?|and|not|or)(?=\\s)/,\n\t\t\tlookbehind: true\n\t\t}\n\t});\n\n\tPrism.languages.scss['atrule'].inside.rest = Prism.languages.scss;\n\n\t/* TODO\n\t\tHandle multiline code after tag\n\t\t    %foo= some |\n\t\t\t\tmultiline |\n\t\t\t\tcode |\n\t*/\n\n\t(function (Prism) {\n\n\t\tPrism.languages.haml = {\n\t\t\t// Multiline stuff should appear before the rest\n\n\t\t\t'multiline-comment': {\n\t\t\t\tpattern: /((?:^|\\r?\\n|\\r)([\\t ]*))(?:\\/|-#).*(?:(?:\\r?\\n|\\r)\\2[\\t ].+)*/,\n\t\t\t\tlookbehind: true,\n\t\t\t\talias: 'comment'\n\t\t\t},\n\n\t\t\t'multiline-code': [\n\t\t\t\t{\n\t\t\t\t\tpattern: /((?:^|\\r?\\n|\\r)([\\t ]*)(?:[~-]|[&!]?=)).*,[\\t ]*(?:(?:\\r?\\n|\\r)\\2[\\t ].*,[\\t ]*)*(?:(?:\\r?\\n|\\r)\\2[\\t ].+)/,\n\t\t\t\t\tlookbehind: true,\n\t\t\t\t\tinside: Prism.languages.ruby\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tpattern: /((?:^|\\r?\\n|\\r)([\\t ]*)(?:[~-]|[&!]?=)).*\\|[\\t ]*(?:(?:\\r?\\n|\\r)\\2[\\t ].*\\|[\\t ]*)*/,\n\t\t\t\t\tlookbehind: true,\n\t\t\t\t\tinside: Prism.languages.ruby\n\t\t\t\t}\n\t\t\t],\n\n\t\t\t// See at the end of the file for known filters\n\t\t\t'filter': {\n\t\t\t\tpattern: /((?:^|\\r?\\n|\\r)([\\t ]*)):[\\w-]+(?:(?:\\r?\\n|\\r)(?:\\2[\\t ].+|\\s*?(?=\\r?\\n|\\r)))+/,\n\t\t\t\tlookbehind: true,\n\t\t\t\tinside: {\n\t\t\t\t\t'filter-name': {\n\t\t\t\t\t\tpattern: /^:[\\w-]+/,\n\t\t\t\t\t\talias: 'symbol'\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\n\t\t\t'markup': {\n\t\t\t\tpattern: /((?:^|\\r?\\n|\\r)[\\t ]*)<.+/,\n\t\t\t\tlookbehind: true,\n\t\t\t\tinside: Prism.languages.markup\n\t\t\t},\n\t\t\t'doctype': {\n\t\t\t\tpattern: /((?:^|\\r?\\n|\\r)[\\t ]*)!!!(?: .+)?/,\n\t\t\t\tlookbehind: true\n\t\t\t},\n\t\t\t'tag': {\n\t\t\t\t// Allows for one nested group of braces\n\t\t\t\tpattern: /((?:^|\\r?\\n|\\r)[\\t ]*)[%.#][\\w\\-#.]*[\\w\\-](?:\\([^)]+\\)|\\{(?:\\{[^}]+\\}|[^{}])+\\}|\\[[^\\]]+\\])*[\\/<>]*/,\n\t\t\t\tlookbehind: true,\n\t\t\t\tinside: {\n\t\t\t\t\t'attributes': [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t// Lookbehind tries to prevent interpolations from breaking it all\n\t\t\t\t\t\t\t// Allows for one nested group of braces\n\t\t\t\t\t\t\tpattern: /(^|[^#])\\{(?:\\{[^}]+\\}|[^{}])+\\}/,\n\t\t\t\t\t\t\tlookbehind: true,\n\t\t\t\t\t\t\tinside: Prism.languages.ruby\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tpattern: /\\([^)]+\\)/,\n\t\t\t\t\t\t\tinside: {\n\t\t\t\t\t\t\t\t'attr-value': {\n\t\t\t\t\t\t\t\t\tpattern: /(=\\s*)(?:\"(?:\\\\.|[^\\\\\"\\r\\n])*\"|[^)\\s]+)/,\n\t\t\t\t\t\t\t\t\tlookbehind: true\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t'attr-name': /[\\w:-]+(?=\\s*!?=|\\s*[,)])/,\n\t\t\t\t\t\t\t\t'punctuation': /[=(),]/\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tpattern: /\\[[^\\]]+\\]/,\n\t\t\t\t\t\t\tinside: Prism.languages.ruby\n\t\t\t\t\t\t}\n\t\t\t\t\t],\n\t\t\t\t\t'punctuation': /[<>]/\n\t\t\t\t}\n\t\t\t},\n\t\t\t'code': {\n\t\t\t\tpattern: /((?:^|\\r?\\n|\\r)[\\t ]*(?:[~-]|[&!]?=)).+/,\n\t\t\t\tlookbehind: true,\n\t\t\t\tinside: Prism.languages.ruby\n\t\t\t},\n\t\t\t// Interpolations in plain text\n\t\t\t'interpolation': {\n\t\t\t\tpattern: /#\\{[^}]+\\}/,\n\t\t\t\tinside: {\n\t\t\t\t\t'delimiter': {\n\t\t\t\t\t\tpattern: /^#\\{|\\}$/,\n\t\t\t\t\t\talias: 'punctuation'\n\t\t\t\t\t},\n\t\t\t\t\t'ruby': {\n\t\t\t\t\t\tpattern: /[\\s\\S]+/,\n\t\t\t\t\t\tinside: Prism.languages.ruby\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\t\t\t'punctuation': {\n\t\t\t\tpattern: /((?:^|\\r?\\n|\\r)[\\t ]*)[~=\\-&!]+/,\n\t\t\t\tlookbehind: true\n\t\t\t}\n\t\t};\n\n\t\tvar filter_pattern = '((?:^|\\\\r?\\\\n|\\\\r)([\\\\t ]*)):{{filter_name}}(?:(?:\\\\r?\\\\n|\\\\r)(?:\\\\2[\\\\t ].+|\\\\s*?(?=\\\\r?\\\\n|\\\\r)))+';\n\n\t\t// Non exhaustive list of available filters and associated languages\n\t\tvar filters = [\n\t\t\t'css',\n\t\t\t{ filter: 'coffee', language: 'coffeescript' },\n\t\t\t'erb',\n\t\t\t'javascript',\n\t\t\t'less',\n\t\t\t'markdown',\n\t\t\t'ruby',\n\t\t\t'scss',\n\t\t\t'textile'\n\t\t];\n\t\tvar all_filters = {};\n\t\tfor (var i = 0, l = filters.length; i < l; i++) {\n\t\t\tvar filter = filters[i];\n\t\t\tfilter = typeof filter === 'string' ? { filter: filter, language: filter } : filter;\n\t\t\tif (Prism.languages[filter.language]) {\n\t\t\t\tall_filters['filter-' + filter.filter] = {\n\t\t\t\t\tpattern: RegExp(filter_pattern.replace('{{filter_name}}', function () { return filter.filter; })),\n\t\t\t\t\tlookbehind: true,\n\t\t\t\t\tinside: {\n\t\t\t\t\t\t'filter-name': {\n\t\t\t\t\t\t\tpattern: /^:[\\w-]+/,\n\t\t\t\t\t\t\talias: 'symbol'\n\t\t\t\t\t\t},\n\t\t\t\t\t\t'text': {\n\t\t\t\t\t\t\tpattern: /[\\s\\S]+/,\n\t\t\t\t\t\t\talias: [filter.language, 'language-' + filter.language],\n\t\t\t\t\t\t\tinside: Prism.languages[filter.language]\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\n\t\tPrism.languages.insertBefore('haml', 'filter', all_filters);\n\n\t}(Prism));\n\n\tPrism.languages.ini = {\n\n\t\t/**\n\t\t * The component mimics the behavior of the Win32 API parser.\n\t\t *\n\t\t * @see {@link https://github.com/PrismJS/prism/issues/2775#issuecomment-787477723}\n\t\t */\n\n\t\t'comment': {\n\t\t\tpattern: /(^[ \\f\\t\\v]*)[#;][^\\n\\r]*/m,\n\t\t\tlookbehind: true\n\t\t},\n\t\t'section': {\n\t\t\tpattern: /(^[ \\f\\t\\v]*)\\[[^\\n\\r\\]]*\\]?/m,\n\t\t\tlookbehind: true,\n\t\t\tinside: {\n\t\t\t\t'section-name': {\n\t\t\t\t\tpattern: /(^\\[[ \\f\\t\\v]*)[^ \\f\\t\\v\\]]+(?:[ \\f\\t\\v]+[^ \\f\\t\\v\\]]+)*/,\n\t\t\t\t\tlookbehind: true,\n\t\t\t\t\talias: 'selector'\n\t\t\t\t},\n\t\t\t\t'punctuation': /\\[|\\]/\n\t\t\t}\n\t\t},\n\t\t'key': {\n\t\t\tpattern: /(^[ \\f\\t\\v]*)[^ \\f\\n\\r\\t\\v=]+(?:[ \\f\\t\\v]+[^ \\f\\n\\r\\t\\v=]+)*(?=[ \\f\\t\\v]*=)/m,\n\t\t\tlookbehind: true,\n\t\t\talias: 'attr-name'\n\t\t},\n\t\t'value': {\n\t\t\tpattern: /(=[ \\f\\t\\v]*)[^ \\f\\n\\r\\t\\v]+(?:[ \\f\\t\\v]+[^ \\f\\n\\r\\t\\v]+)*/,\n\t\t\tlookbehind: true,\n\t\t\talias: 'attr-value',\n\t\t\tinside: {\n\t\t\t\t'inner-value': {\n\t\t\t\t\tpattern: /^(\"|').+(?=\\1$)/,\n\t\t\t\t\tlookbehind: true\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t'punctuation': /=/\n\t};\n\n\t(function (Prism) {\n\n\t\tvar keywords = /\\b(?:abstract|assert|boolean|break|byte|case|catch|char|class|const|continue|default|do|double|else|enum|exports|extends|final|finally|float|for|goto|if|implements|import|instanceof|int|interface|long|module|native|new|non-sealed|null|open|opens|package|permits|private|protected|provides|public|record(?!\\s*[(){}[\\]<>=%~.:,;?+\\-*/&|^])|requires|return|sealed|short|static|strictfp|super|switch|synchronized|this|throw|throws|to|transient|transitive|try|uses|var|void|volatile|while|with|yield)\\b/;\n\n\t\t// full package (optional) + parent classes (optional)\n\t\tvar classNamePrefix = /(?:[a-z]\\w*\\s*\\.\\s*)*(?:[A-Z]\\w*\\s*\\.\\s*)*/.source;\n\n\t\t// based on the java naming conventions\n\t\tvar className = {\n\t\t\tpattern: RegExp(/(^|[^\\w.])/.source + classNamePrefix + /[A-Z](?:[\\d_A-Z]*[a-z]\\w*)?\\b/.source),\n\t\t\tlookbehind: true,\n\t\t\tinside: {\n\t\t\t\t'namespace': {\n\t\t\t\t\tpattern: /^[a-z]\\w*(?:\\s*\\.\\s*[a-z]\\w*)*(?:\\s*\\.)?/,\n\t\t\t\t\tinside: {\n\t\t\t\t\t\t'punctuation': /\\./\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t'punctuation': /\\./\n\t\t\t}\n\t\t};\n\n\t\tPrism.languages.java = Prism.languages.extend('clike', {\n\t\t\t'string': {\n\t\t\t\tpattern: /(^|[^\\\\])\"(?:\\\\.|[^\"\\\\\\r\\n])*\"/,\n\t\t\t\tlookbehind: true,\n\t\t\t\tgreedy: true\n\t\t\t},\n\t\t\t'class-name': [\n\t\t\t\tclassName,\n\t\t\t\t{\n\t\t\t\t\t// variables, parameters, and constructor references\n\t\t\t\t\t// this to support class names (or generic parameters) which do not contain a lower case letter (also works for methods)\n\t\t\t\t\tpattern: RegExp(/(^|[^\\w.])/.source + classNamePrefix + /[A-Z]\\w*(?=\\s+\\w+\\s*[;,=()]|\\s*(?:\\[[\\s,]*\\]\\s*)?::\\s*new\\b)/.source),\n\t\t\t\t\tlookbehind: true,\n\t\t\t\t\tinside: className.inside\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t// class names based on keyword\n\t\t\t\t\t// this to support class names (or generic parameters) which do not contain a lower case letter (also works for methods)\n\t\t\t\t\tpattern: RegExp(/(\\b(?:class|enum|extends|implements|instanceof|interface|new|record|throws)\\s+)/.source + classNamePrefix + /[A-Z]\\w*\\b/.source),\n\t\t\t\t\tlookbehind: true,\n\t\t\t\t\tinside: className.inside\n\t\t\t\t}\n\t\t\t],\n\t\t\t'keyword': keywords,\n\t\t\t'function': [\n\t\t\t\tPrism.languages.clike.function,\n\t\t\t\t{\n\t\t\t\t\tpattern: /(::\\s*)[a-z_]\\w*/,\n\t\t\t\t\tlookbehind: true\n\t\t\t\t}\n\t\t\t],\n\t\t\t'number': /\\b0b[01][01_]*L?\\b|\\b0x(?:\\.[\\da-f_p+-]+|[\\da-f_]+(?:\\.[\\da-f_p+-]+)?)\\b|(?:\\b\\d[\\d_]*(?:\\.[\\d_]*)?|\\B\\.\\d[\\d_]*)(?:e[+-]?\\d[\\d_]*)?[dfl]?/i,\n\t\t\t'operator': {\n\t\t\t\tpattern: /(^|[^.])(?:<<=?|>>>?=?|->|--|\\+\\+|&&|\\|\\||::|[?:~]|[-+*/%&|^!=<>]=?)/m,\n\t\t\t\tlookbehind: true\n\t\t\t}\n\t\t});\n\n\t\tPrism.languages.insertBefore('java', 'string', {\n\t\t\t'triple-quoted-string': {\n\t\t\t\t// http://openjdk.java.net/jeps/355#Description\n\t\t\t\tpattern: /\"\"\"[ \\t]*[\\r\\n](?:(?:\"|\"\")?(?:\\\\.|[^\"\\\\]))*\"\"\"/,\n\t\t\t\tgreedy: true,\n\t\t\t\talias: 'string'\n\t\t\t},\n\t\t\t'char': {\n\t\t\t\tpattern: /'(?:\\\\.|[^'\\\\\\r\\n]){1,6}'/,\n\t\t\t\tgreedy: true\n\t\t\t}\n\t\t});\n\n\t\tPrism.languages.insertBefore('java', 'class-name', {\n\t\t\t'annotation': {\n\t\t\t\tpattern: /(^|[^.])@\\w+(?:\\s*\\.\\s*\\w+)*/,\n\t\t\t\tlookbehind: true,\n\t\t\t\talias: 'punctuation'\n\t\t\t},\n\t\t\t'generics': {\n\t\t\t\tpattern: /<(?:[\\w\\s,.?]|&(?!&)|<(?:[\\w\\s,.?]|&(?!&)|<(?:[\\w\\s,.?]|&(?!&)|<(?:[\\w\\s,.?]|&(?!&))*>)*>)*>)*>/,\n\t\t\t\tinside: {\n\t\t\t\t\t'class-name': className,\n\t\t\t\t\t'keyword': keywords,\n\t\t\t\t\t'punctuation': /[<>(),.:]/,\n\t\t\t\t\t'operator': /[?&|]/\n\t\t\t\t}\n\t\t\t},\n\t\t\t'import': [\n\t\t\t\t{\n\t\t\t\t\tpattern: RegExp(/(\\bimport\\s+)/.source + classNamePrefix + /(?:[A-Z]\\w*|\\*)(?=\\s*;)/.source),\n\t\t\t\t\tlookbehind: true,\n\t\t\t\t\tinside: {\n\t\t\t\t\t\t'namespace': className.inside.namespace,\n\t\t\t\t\t\t'punctuation': /\\./,\n\t\t\t\t\t\t'operator': /\\*/,\n\t\t\t\t\t\t'class-name': /\\w+/\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tpattern: RegExp(/(\\bimport\\s+static\\s+)/.source + classNamePrefix + /(?:\\w+|\\*)(?=\\s*;)/.source),\n\t\t\t\t\tlookbehind: true,\n\t\t\t\t\talias: 'static',\n\t\t\t\t\tinside: {\n\t\t\t\t\t\t'namespace': className.inside.namespace,\n\t\t\t\t\t\t'static': /\\b\\w+$/,\n\t\t\t\t\t\t'punctuation': /\\./,\n\t\t\t\t\t\t'operator': /\\*/,\n\t\t\t\t\t\t'class-name': /\\w+/\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t],\n\t\t\t'namespace': {\n\t\t\t\tpattern: RegExp(\n\t\t\t\t\t/(\\b(?:exports|import(?:\\s+static)?|module|open|opens|package|provides|requires|to|transitive|uses|with)\\s+)(?!<keyword>)[a-z]\\w*(?:\\.[a-z]\\w*)*\\.?/\n\t\t\t\t\t\t.source.replace(/<keyword>/g, function () { return keywords.source; })),\n\t\t\t\tlookbehind: true,\n\t\t\t\tinside: {\n\t\t\t\t\t'punctuation': /\\./,\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}(Prism));\n\n\t// https://www.json.org/json-en.html\n\tPrism.languages.json = {\n\t\t'property': {\n\t\t\tpattern: /(^|[^\\\\])\"(?:\\\\.|[^\\\\\"\\r\\n])*\"(?=\\s*:)/,\n\t\t\tlookbehind: true,\n\t\t\tgreedy: true\n\t\t},\n\t\t'string': {\n\t\t\tpattern: /(^|[^\\\\])\"(?:\\\\.|[^\\\\\"\\r\\n])*\"(?!\\s*:)/,\n\t\t\tlookbehind: true,\n\t\t\tgreedy: true\n\t\t},\n\t\t'comment': {\n\t\t\tpattern: /\\/\\/.*|\\/\\*[\\s\\S]*?(?:\\*\\/|$)/,\n\t\t\tgreedy: true\n\t\t},\n\t\t'number': /-?\\b\\d+(?:\\.\\d+)?(?:e[+-]?\\d+)?\\b/i,\n\t\t'punctuation': /[{}[\\],]/,\n\t\t'operator': /:/,\n\t\t'boolean': /\\b(?:false|true)\\b/,\n\t\t'null': {\n\t\t\tpattern: /\\bnull\\b/,\n\t\t\talias: 'keyword'\n\t\t}\n\t};\n\n\tPrism.languages.webmanifest = Prism.languages.json;\n\n\t(function (Prism) {\n\n\t\tvar string = /(\"|')(?:\\\\(?:\\r\\n?|\\n|.)|(?!\\1)[^\\\\\\r\\n])*\\1/;\n\n\t\tPrism.languages.json5 = Prism.languages.extend('json', {\n\t\t\t'property': [\n\t\t\t\t{\n\t\t\t\t\tpattern: RegExp(string.source + '(?=\\\\s*:)'),\n\t\t\t\t\tgreedy: true\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tpattern: /(?!\\s)[_$a-zA-Z\\xA0-\\uFFFF](?:(?!\\s)[$\\w\\xA0-\\uFFFF])*(?=\\s*:)/,\n\t\t\t\t\talias: 'unquoted'\n\t\t\t\t}\n\t\t\t],\n\t\t\t'string': {\n\t\t\t\tpattern: string,\n\t\t\t\tgreedy: true\n\t\t\t},\n\t\t\t'number': /[+-]?\\b(?:NaN|Infinity|0x[a-fA-F\\d]+)\\b|[+-]?(?:\\b\\d+(?:\\.\\d*)?|\\B\\.\\d+)(?:[eE][+-]?\\d+\\b)?/\n\t\t});\n\n\t}(Prism));\n\n\tPrism.languages.lua = {\n\t\t'comment': /^#!.+|--(?:\\[(=*)\\[[\\s\\S]*?\\]\\1\\]|.*)/m,\n\t\t// \\z may be used to skip the following space\n\t\t'string': {\n\t\t\tpattern: /([\"'])(?:(?!\\1)[^\\\\\\r\\n]|\\\\z(?:\\r\\n|\\s)|\\\\(?:\\r\\n|[^z]))*\\1|\\[(=*)\\[[\\s\\S]*?\\]\\2\\]/,\n\t\t\tgreedy: true\n\t\t},\n\t\t'number': /\\b0x[a-f\\d]+(?:\\.[a-f\\d]*)?(?:p[+-]?\\d+)?\\b|\\b\\d+(?:\\.\\B|(?:\\.\\d*)?(?:e[+-]?\\d+)?\\b)|\\B\\.\\d+(?:e[+-]?\\d+)?\\b/i,\n\t\t'keyword': /\\b(?:and|break|do|else|elseif|end|false|for|function|goto|if|in|local|nil|not|or|repeat|return|then|true|until|while)\\b/,\n\t\t'function': /(?!\\d)\\w+(?=\\s*(?:[({]))/,\n\t\t'operator': [\n\t\t\t/[-+*%^&|#]|\\/\\/?|<[<=]?|>[>=]?|[=~]=?/,\n\t\t\t{\n\t\t\t\t// Match \"..\" but don't break \"...\"\n\t\t\t\tpattern: /(^|[^.])\\.\\.(?!\\.)/,\n\t\t\t\tlookbehind: true\n\t\t\t}\n\t\t],\n\t\t'punctuation': /[\\[\\](){},;]|\\.+|:+/\n\t};\n\n\tPrism.languages.matlab = {\n\t\t'comment': [\n\t\t\t/%\\{[\\s\\S]*?\\}%/,\n\t\t\t/%.+/\n\t\t],\n\t\t'string': {\n\t\t\tpattern: /\\B'(?:''|[^'\\r\\n])*'/,\n\t\t\tgreedy: true\n\t\t},\n\t\t// FIXME We could handle imaginary numbers as a whole\n\t\t'number': /(?:\\b\\d+(?:\\.\\d*)?|\\B\\.\\d+)(?:[eE][+-]?\\d+)?(?:[ij])?|\\b[ij]\\b/,\n\t\t'keyword': /\\b(?:NaN|break|case|catch|continue|else|elseif|end|for|function|if|inf|otherwise|parfor|pause|pi|return|switch|try|while)\\b/,\n\t\t'function': /\\b(?!\\d)\\w+(?=\\s*\\()/,\n\t\t'operator': /\\.?[*^\\/\\\\']|[+\\-:@]|[<>=~]=?|&&?|\\|\\|?/,\n\t\t'punctuation': /\\.{3}|[.,;\\[\\](){}!]/\n\t};\n\n\t(function (Prism) {\n\n\t\tvar operators = [\n\t\t\t// query and projection\n\t\t\t'$eq', '$gt', '$gte', '$in', '$lt', '$lte', '$ne', '$nin', '$and', '$not', '$nor', '$or',\n\t\t\t'$exists', '$type', '$expr', '$jsonSchema', '$mod', '$regex', '$text', '$where', '$geoIntersects',\n\t\t\t'$geoWithin', '$near', '$nearSphere', '$all', '$elemMatch', '$size', '$bitsAllClear', '$bitsAllSet',\n\t\t\t'$bitsAnyClear', '$bitsAnySet', '$comment', '$elemMatch', '$meta', '$slice',\n\n\t\t\t// update\n\t\t\t'$currentDate', '$inc', '$min', '$max', '$mul', '$rename', '$set', '$setOnInsert', '$unset',\n\t\t\t'$addToSet', '$pop', '$pull', '$push', '$pullAll', '$each', '$position', '$slice', '$sort', '$bit',\n\n\t\t\t// aggregation pipeline stages\n\t\t\t'$addFields', '$bucket', '$bucketAuto', '$collStats', '$count', '$currentOp', '$facet', '$geoNear',\n\t\t\t'$graphLookup', '$group', '$indexStats', '$limit', '$listLocalSessions', '$listSessions', '$lookup',\n\t\t\t'$match', '$merge', '$out', '$planCacheStats', '$project', '$redact', '$replaceRoot', '$replaceWith',\n\t\t\t'$sample', '$set', '$skip', '$sort', '$sortByCount', '$unionWith', '$unset', '$unwind', '$setWindowFields',\n\n\t\t\t// aggregation pipeline operators\n\t\t\t'$abs', '$accumulator', '$acos', '$acosh', '$add', '$addToSet', '$allElementsTrue', '$and',\n\t\t\t'$anyElementTrue', '$arrayElemAt', '$arrayToObject', '$asin', '$asinh', '$atan', '$atan2',\n\t\t\t'$atanh', '$avg', '$binarySize', '$bsonSize', '$ceil', '$cmp', '$concat', '$concatArrays', '$cond',\n\t\t\t'$convert', '$cos', '$dateFromParts', '$dateToParts', '$dateFromString', '$dateToString', '$dayOfMonth',\n\t\t\t'$dayOfWeek', '$dayOfYear', '$degreesToRadians', '$divide', '$eq', '$exp', '$filter', '$first',\n\t\t\t'$floor', '$function', '$gt', '$gte', '$hour', '$ifNull', '$in', '$indexOfArray', '$indexOfBytes',\n\t\t\t'$indexOfCP', '$isArray', '$isNumber', '$isoDayOfWeek', '$isoWeek', '$isoWeekYear', '$last',\n\t\t\t'$last', '$let', '$literal', '$ln', '$log', '$log10', '$lt', '$lte', '$ltrim', '$map', '$max',\n\t\t\t'$mergeObjects', '$meta', '$min', '$millisecond', '$minute', '$mod', '$month', '$multiply', '$ne',\n\t\t\t'$not', '$objectToArray', '$or', '$pow', '$push', '$radiansToDegrees', '$range', '$reduce',\n\t\t\t'$regexFind', '$regexFindAll', '$regexMatch', '$replaceOne', '$replaceAll', '$reverseArray', '$round',\n\t\t\t'$rtrim', '$second', '$setDifference', '$setEquals', '$setIntersection', '$setIsSubset', '$setUnion',\n\t\t\t'$size', '$sin', '$slice', '$split', '$sqrt', '$stdDevPop', '$stdDevSamp', '$strcasecmp', '$strLenBytes',\n\t\t\t'$strLenCP', '$substr', '$substrBytes', '$substrCP', '$subtract', '$sum', '$switch', '$tan',\n\t\t\t'$toBool', '$toDate', '$toDecimal', '$toDouble', '$toInt', '$toLong', '$toObjectId', '$toString',\n\t\t\t'$toLower', '$toUpper', '$trim', '$trunc', '$type', '$week', '$year', '$zip', '$count', '$dateAdd',\n\t\t\t'$dateDiff', '$dateSubtract', '$dateTrunc', '$getField', '$rand', '$sampleRate', '$setField', '$unsetField',\n\n\t\t\t// aggregation pipeline query modifiers\n\t\t\t'$comment', '$explain', '$hint', '$max', '$maxTimeMS', '$min', '$orderby', '$query',\n\t\t\t'$returnKey', '$showDiskLoc', '$natural',\n\t\t];\n\n\t\tvar builtinFunctions = [\n\t\t\t'ObjectId',\n\t\t\t'Code',\n\t\t\t'BinData',\n\t\t\t'DBRef',\n\t\t\t'Timestamp',\n\t\t\t'NumberLong',\n\t\t\t'NumberDecimal',\n\t\t\t'MaxKey',\n\t\t\t'MinKey',\n\t\t\t'RegExp',\n\t\t\t'ISODate',\n\t\t\t'UUID',\n\t\t];\n\n\t\toperators = operators.map(function (operator) {\n\t\t\treturn operator.replace('$', '\\\\$');\n\t\t});\n\n\t\tvar operatorsSource = '(?:' + operators.join('|') + ')\\\\b';\n\n\t\tPrism.languages.mongodb = Prism.languages.extend('javascript', {});\n\n\t\tPrism.languages.insertBefore('mongodb', 'string', {\n\t\t\t'property': {\n\t\t\t\tpattern: /(?:([\"'])(?:\\\\(?:\\r\\n|[\\s\\S])|(?!\\1)[^\\\\\\r\\n])*\\1|(?!\\s)[_$a-zA-Z\\xA0-\\uFFFF](?:(?!\\s)[$\\w\\xA0-\\uFFFF])*)(?=\\s*:)/,\n\t\t\t\tgreedy: true,\n\t\t\t\tinside: {\n\t\t\t\t\t'keyword': RegExp('^([\\'\"])?' + operatorsSource + '(?:\\\\1)?$')\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\tPrism.languages.mongodb.string.inside = {\n\t\t\turl: {\n\t\t\t\t// url pattern\n\t\t\t\tpattern: /https?:\\/\\/[-\\w@:%.+~#=]{1,256}\\.[a-z0-9()]{1,6}\\b[-\\w()@:%+.~#?&/=]*/i,\n\t\t\t\tgreedy: true\n\t\t\t},\n\t\t\tentity: {\n\t\t\t\t// ipv4\n\t\t\t\tpattern: /\\b(?:(?:[01]?\\d\\d?|2[0-4]\\d|25[0-5])\\.){3}(?:[01]?\\d\\d?|2[0-4]\\d|25[0-5])\\b/,\n\t\t\t\tgreedy: true\n\t\t\t}\n\t\t};\n\n\t\tPrism.languages.insertBefore('mongodb', 'constant', {\n\t\t\t'builtin': {\n\t\t\t\tpattern: RegExp('\\\\b(?:' + builtinFunctions.join('|') + ')\\\\b'),\n\t\t\t\talias: 'keyword'\n\t\t\t}\n\t\t});\n\n\t}(Prism));\n\n\t(function (Prism) {\n\n\t\tvar variable = /\\$(?:\\w[a-z\\d]*(?:_[^\\x00-\\x1F\\s\"'\\\\()$]*)?|\\{[^}\\s\"'\\\\]+\\})/i;\n\n\t\tPrism.languages.nginx = {\n\t\t\t'comment': {\n\t\t\t\tpattern: /(^|[\\s{};])#.*/,\n\t\t\t\tlookbehind: true,\n\t\t\t\tgreedy: true\n\t\t\t},\n\t\t\t'directive': {\n\t\t\t\tpattern: /(^|\\s)\\w(?:[^;{}\"'\\\\\\s]|\\\\.|\"(?:[^\"\\\\]|\\\\.)*\"|'(?:[^'\\\\]|\\\\.)*'|\\s+(?:#.*(?!.)|(?![#\\s])))*?(?=\\s*[;{])/,\n\t\t\t\tlookbehind: true,\n\t\t\t\tgreedy: true,\n\t\t\t\tinside: {\n\t\t\t\t\t'string': {\n\t\t\t\t\t\tpattern: /((?:^|[^\\\\])(?:\\\\\\\\)*)(?:\"(?:[^\"\\\\]|\\\\.)*\"|'(?:[^'\\\\]|\\\\.)*')/,\n\t\t\t\t\t\tlookbehind: true,\n\t\t\t\t\t\tgreedy: true,\n\t\t\t\t\t\tinside: {\n\t\t\t\t\t\t\t'escape': {\n\t\t\t\t\t\t\t\tpattern: /\\\\[\"'\\\\nrt]/,\n\t\t\t\t\t\t\t\talias: 'entity'\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t'variable': variable\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\t'comment': {\n\t\t\t\t\t\tpattern: /(\\s)#.*/,\n\t\t\t\t\t\tlookbehind: true,\n\t\t\t\t\t\tgreedy: true\n\t\t\t\t\t},\n\t\t\t\t\t'keyword': {\n\t\t\t\t\t\tpattern: /^\\S+/,\n\t\t\t\t\t\tgreedy: true\n\t\t\t\t\t},\n\n\t\t\t\t\t// other patterns\n\n\t\t\t\t\t'boolean': {\n\t\t\t\t\t\tpattern: /(\\s)(?:off|on)(?!\\S)/,\n\t\t\t\t\t\tlookbehind: true\n\t\t\t\t\t},\n\t\t\t\t\t'number': {\n\t\t\t\t\t\tpattern: /(\\s)\\d+[a-z]*(?!\\S)/i,\n\t\t\t\t\t\tlookbehind: true\n\t\t\t\t\t},\n\t\t\t\t\t'variable': variable\n\t\t\t\t}\n\t\t\t},\n\t\t\t'punctuation': /[{};]/\n\t\t};\n\n\t}(Prism));\n\n\tPrism.languages.objectivec = Prism.languages.extend('c', {\n\t\t'string': {\n\t\t\tpattern: /@?\"(?:\\\\(?:\\r\\n|[\\s\\S])|[^\"\\\\\\r\\n])*\"/,\n\t\t\tgreedy: true\n\t\t},\n\t\t'keyword': /\\b(?:asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|in|inline|int|long|register|return|self|short|signed|sizeof|static|struct|super|switch|typedef|typeof|union|unsigned|void|volatile|while)\\b|(?:@interface|@end|@implementation|@protocol|@class|@public|@protected|@private|@property|@try|@catch|@finally|@throw|@synthesize|@dynamic|@selector)\\b/,\n\t\t'operator': /-[->]?|\\+\\+?|!=?|<<?=?|>>?=?|==?|&&?|\\|\\|?|[~^%?*\\/@]/\n\t});\n\n\tdelete Prism.languages.objectivec['class-name'];\n\n\tPrism.languages.objc = Prism.languages.objectivec;\n\n\t// Based on Free Pascal\n\n\t/* TODO\n\t\tSupport inline asm ?\n\t*/\n\n\tPrism.languages.pascal = {\n\t\t'directive': {\n\t\t\tpattern: /\\{\\$[\\s\\S]*?\\}/,\n\t\t\tgreedy: true,\n\t\t\talias: ['marco', 'property']\n\t\t},\n\t\t'comment': {\n\t\t\tpattern: /\\(\\*[\\s\\S]*?\\*\\)|\\{[\\s\\S]*?\\}|\\/\\/.*/,\n\t\t\tgreedy: true\n\t\t},\n\t\t'string': {\n\t\t\tpattern: /(?:'(?:''|[^'\\r\\n])*'(?!')|#[&$%]?[a-f\\d]+)+|\\^[a-z]/i,\n\t\t\tgreedy: true\n\t\t},\n\t\t'asm': {\n\t\t\tpattern: /(\\basm\\b)[\\s\\S]+?(?=\\bend\\s*[;[])/i,\n\t\t\tlookbehind: true,\n\t\t\tgreedy: true,\n\t\t\tinside: null // see below\n\t\t},\n\t\t'keyword': [\n\t\t\t{\n\t\t\t\t// Turbo Pascal\n\t\t\t\tpattern: /(^|[^&])\\b(?:absolute|array|asm|begin|case|const|constructor|destructor|do|downto|else|end|file|for|function|goto|if|implementation|inherited|inline|interface|label|nil|object|of|operator|packed|procedure|program|record|reintroduce|repeat|self|set|string|then|to|type|unit|until|uses|var|while|with)\\b/i,\n\t\t\t\tlookbehind: true\n\t\t\t},\n\t\t\t{\n\t\t\t\t// Free Pascal\n\t\t\t\tpattern: /(^|[^&])\\b(?:dispose|exit|false|new|true)\\b/i,\n\t\t\t\tlookbehind: true\n\t\t\t},\n\t\t\t{\n\t\t\t\t// Object Pascal\n\t\t\t\tpattern: /(^|[^&])\\b(?:class|dispinterface|except|exports|finalization|finally|initialization|inline|library|on|out|packed|property|raise|resourcestring|threadvar|try)\\b/i,\n\t\t\t\tlookbehind: true\n\t\t\t},\n\t\t\t{\n\t\t\t\t// Modifiers\n\t\t\t\tpattern: /(^|[^&])\\b(?:absolute|abstract|alias|assembler|bitpacked|break|cdecl|continue|cppdecl|cvar|default|deprecated|dynamic|enumerator|experimental|export|external|far|far16|forward|generic|helper|implements|index|interrupt|iochecks|local|message|name|near|nodefault|noreturn|nostackframe|oldfpccall|otherwise|overload|override|pascal|platform|private|protected|public|published|read|register|reintroduce|result|safecall|saveregisters|softfloat|specialize|static|stdcall|stored|strict|unaligned|unimplemented|varargs|virtual|write)\\b/i,\n\t\t\t\tlookbehind: true\n\t\t\t}\n\t\t],\n\t\t'number': [\n\t\t\t// Hexadecimal, octal and binary\n\t\t\t/(?:[&%]\\d+|\\$[a-f\\d]+)/i,\n\t\t\t// Decimal\n\t\t\t/\\b\\d+(?:\\.\\d+)?(?:e[+-]?\\d+)?/i\n\t\t],\n\t\t'operator': [\n\t\t\t/\\.\\.|\\*\\*|:=|<[<=>]?|>[>=]?|[+\\-*\\/]=?|[@^=]/,\n\t\t\t{\n\t\t\t\tpattern: /(^|[^&])\\b(?:and|as|div|exclude|in|include|is|mod|not|or|shl|shr|xor)\\b/,\n\t\t\t\tlookbehind: true\n\t\t\t}\n\t\t],\n\t\t'punctuation': /\\(\\.|\\.\\)|[()\\[\\]:;,.]/\n\t};\n\n\tPrism.languages.pascal.asm.inside = Prism.languages.extend('pascal', {\n\t\t'asm': undefined,\n\t\t'keyword': undefined,\n\t\t'operator': undefined\n\t});\n\n\tPrism.languages.objectpascal = Prism.languages.pascal;\n\n\t/**\n\t * Original by Aaron Harun: http://aahacreative.com/2012/07/31/php-syntax-highlighting-prism/\n\t * Modified by Miles Johnson: http://milesj.me\n\t * Rewritten by Tom Pavelec\n\t *\n\t * Supports PHP 5.3 - 8.0\n\t */\n\t(function (Prism) {\n\t\tvar comment = /\\/\\*[\\s\\S]*?\\*\\/|\\/\\/.*|#(?!\\[).*/;\n\t\tvar constant = [\n\t\t\t{\n\t\t\t\tpattern: /\\b(?:false|true)\\b/i,\n\t\t\t\talias: 'boolean'\n\t\t\t},\n\t\t\t{\n\t\t\t\tpattern: /(::\\s*)\\b[a-z_]\\w*\\b(?!\\s*\\()/i,\n\t\t\t\tgreedy: true,\n\t\t\t\tlookbehind: true,\n\t\t\t},\n\t\t\t{\n\t\t\t\tpattern: /(\\b(?:case|const)\\s+)\\b[a-z_]\\w*(?=\\s*[;=])/i,\n\t\t\t\tgreedy: true,\n\t\t\t\tlookbehind: true,\n\t\t\t},\n\t\t\t/\\b(?:null)\\b/i,\n\t\t\t/\\b[A-Z_][A-Z0-9_]*\\b(?!\\s*\\()/,\n\t\t];\n\t\tvar number = /\\b0b[01]+(?:_[01]+)*\\b|\\b0o[0-7]+(?:_[0-7]+)*\\b|\\b0x[\\da-f]+(?:_[\\da-f]+)*\\b|(?:\\b\\d+(?:_\\d+)*\\.?(?:\\d+(?:_\\d+)*)?|\\B\\.\\d+)(?:e[+-]?\\d+)?/i;\n\t\tvar operator = /<?=>|\\?\\?=?|\\.{3}|\\??->|[!=]=?=?|::|\\*\\*=?|--|\\+\\+|&&|\\|\\||<<|>>|[?~]|[/^|%*&<>.+-]=?/;\n\t\tvar punctuation = /[{}\\[\\](),:;]/;\n\n\t\tPrism.languages.php = {\n\t\t\t'delimiter': {\n\t\t\t\tpattern: /\\?>$|^<\\?(?:php(?=\\s)|=)?/i,\n\t\t\t\talias: 'important'\n\t\t\t},\n\t\t\t'comment': comment,\n\t\t\t'variable': /\\$+(?:\\w+\\b|(?=\\{))/,\n\t\t\t'package': {\n\t\t\t\tpattern: /(namespace\\s+|use\\s+(?:function\\s+)?)(?:\\\\?\\b[a-z_]\\w*)+\\b(?!\\\\)/i,\n\t\t\t\tlookbehind: true,\n\t\t\t\tinside: {\n\t\t\t\t\t'punctuation': /\\\\/\n\t\t\t\t}\n\t\t\t},\n\t\t\t'class-name-definition': {\n\t\t\t\tpattern: /(\\b(?:class|enum|interface|trait)\\s+)\\b[a-z_]\\w*(?!\\\\)\\b/i,\n\t\t\t\tlookbehind: true,\n\t\t\t\talias: 'class-name'\n\t\t\t},\n\t\t\t'function-definition': {\n\t\t\t\tpattern: /(\\bfunction\\s+)[a-z_]\\w*(?=\\s*\\()/i,\n\t\t\t\tlookbehind: true,\n\t\t\t\talias: 'function'\n\t\t\t},\n\t\t\t'keyword': [\n\t\t\t\t{\n\t\t\t\t\tpattern: /(\\(\\s*)\\b(?:array|bool|boolean|float|int|integer|object|string)\\b(?=\\s*\\))/i,\n\t\t\t\t\talias: 'type-casting',\n\t\t\t\t\tgreedy: true,\n\t\t\t\t\tlookbehind: true\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tpattern: /([(,?]\\s*)\\b(?:array(?!\\s*\\()|bool|callable|(?:false|null)(?=\\s*\\|)|float|int|iterable|mixed|object|self|static|string)\\b(?=\\s*\\$)/i,\n\t\t\t\t\talias: 'type-hint',\n\t\t\t\t\tgreedy: true,\n\t\t\t\t\tlookbehind: true\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tpattern: /(\\)\\s*:\\s*(?:\\?\\s*)?)\\b(?:array(?!\\s*\\()|bool|callable|(?:false|null)(?=\\s*\\|)|float|int|iterable|mixed|never|object|self|static|string|void)\\b/i,\n\t\t\t\t\talias: 'return-type',\n\t\t\t\t\tgreedy: true,\n\t\t\t\t\tlookbehind: true\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tpattern: /\\b(?:array(?!\\s*\\()|bool|float|int|iterable|mixed|object|string|void)\\b/i,\n\t\t\t\t\talias: 'type-declaration',\n\t\t\t\t\tgreedy: true\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tpattern: /(\\|\\s*)(?:false|null)\\b|\\b(?:false|null)(?=\\s*\\|)/i,\n\t\t\t\t\talias: 'type-declaration',\n\t\t\t\t\tgreedy: true,\n\t\t\t\t\tlookbehind: true\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tpattern: /\\b(?:parent|self|static)(?=\\s*::)/i,\n\t\t\t\t\talias: 'static-context',\n\t\t\t\t\tgreedy: true\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t// yield from\n\t\t\t\t\tpattern: /(\\byield\\s+)from\\b/i,\n\t\t\t\t\tlookbehind: true\n\t\t\t\t},\n\t\t\t\t// `class` is always a keyword unlike other keywords\n\t\t\t\t/\\bclass\\b/i,\n\t\t\t\t{\n\t\t\t\t\t// https://www.php.net/manual/en/reserved.keywords.php\n\t\t\t\t\t//\n\t\t\t\t\t// keywords cannot be preceded by \"->\"\n\t\t\t\t\t// the complex lookbehind means `(?<!(?:->|::)\\s*)`\n\t\t\t\t\tpattern: /((?:^|[^\\s>:]|(?:^|[^-])>|(?:^|[^:]):)\\s*)\\b(?:abstract|and|array|as|break|callable|case|catch|clone|const|continue|declare|default|die|do|echo|else|elseif|empty|enddeclare|endfor|endforeach|endif|endswitch|endwhile|enum|eval|exit|extends|final|finally|fn|for|foreach|function|global|goto|if|implements|include|include_once|instanceof|insteadof|interface|isset|list|match|namespace|never|new|or|parent|print|private|protected|public|readonly|require|require_once|return|self|static|switch|throw|trait|try|unset|use|var|while|xor|yield|__halt_compiler)\\b/i,\n\t\t\t\t\tlookbehind: true\n\t\t\t\t}\n\t\t\t],\n\t\t\t'argument-name': {\n\t\t\t\tpattern: /([(,]\\s*)\\b[a-z_]\\w*(?=\\s*:(?!:))/i,\n\t\t\t\tlookbehind: true\n\t\t\t},\n\t\t\t'class-name': [\n\t\t\t\t{\n\t\t\t\t\tpattern: /(\\b(?:extends|implements|instanceof|new(?!\\s+self|\\s+static))\\s+|\\bcatch\\s*\\()\\b[a-z_]\\w*(?!\\\\)\\b/i,\n\t\t\t\t\tgreedy: true,\n\t\t\t\t\tlookbehind: true\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tpattern: /(\\|\\s*)\\b[a-z_]\\w*(?!\\\\)\\b/i,\n\t\t\t\t\tgreedy: true,\n\t\t\t\t\tlookbehind: true\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tpattern: /\\b[a-z_]\\w*(?!\\\\)\\b(?=\\s*\\|)/i,\n\t\t\t\t\tgreedy: true\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tpattern: /(\\|\\s*)(?:\\\\?\\b[a-z_]\\w*)+\\b/i,\n\t\t\t\t\talias: 'class-name-fully-qualified',\n\t\t\t\t\tgreedy: true,\n\t\t\t\t\tlookbehind: true,\n\t\t\t\t\tinside: {\n\t\t\t\t\t\t'punctuation': /\\\\/\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tpattern: /(?:\\\\?\\b[a-z_]\\w*)+\\b(?=\\s*\\|)/i,\n\t\t\t\t\talias: 'class-name-fully-qualified',\n\t\t\t\t\tgreedy: true,\n\t\t\t\t\tinside: {\n\t\t\t\t\t\t'punctuation': /\\\\/\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tpattern: /(\\b(?:extends|implements|instanceof|new(?!\\s+self\\b|\\s+static\\b))\\s+|\\bcatch\\s*\\()(?:\\\\?\\b[a-z_]\\w*)+\\b(?!\\\\)/i,\n\t\t\t\t\talias: 'class-name-fully-qualified',\n\t\t\t\t\tgreedy: true,\n\t\t\t\t\tlookbehind: true,\n\t\t\t\t\tinside: {\n\t\t\t\t\t\t'punctuation': /\\\\/\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tpattern: /\\b[a-z_]\\w*(?=\\s*\\$)/i,\n\t\t\t\t\talias: 'type-declaration',\n\t\t\t\t\tgreedy: true\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tpattern: /(?:\\\\?\\b[a-z_]\\w*)+(?=\\s*\\$)/i,\n\t\t\t\t\talias: ['class-name-fully-qualified', 'type-declaration'],\n\t\t\t\t\tgreedy: true,\n\t\t\t\t\tinside: {\n\t\t\t\t\t\t'punctuation': /\\\\/\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tpattern: /\\b[a-z_]\\w*(?=\\s*::)/i,\n\t\t\t\t\talias: 'static-context',\n\t\t\t\t\tgreedy: true\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tpattern: /(?:\\\\?\\b[a-z_]\\w*)+(?=\\s*::)/i,\n\t\t\t\t\talias: ['class-name-fully-qualified', 'static-context'],\n\t\t\t\t\tgreedy: true,\n\t\t\t\t\tinside: {\n\t\t\t\t\t\t'punctuation': /\\\\/\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tpattern: /([(,?]\\s*)[a-z_]\\w*(?=\\s*\\$)/i,\n\t\t\t\t\talias: 'type-hint',\n\t\t\t\t\tgreedy: true,\n\t\t\t\t\tlookbehind: true\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tpattern: /([(,?]\\s*)(?:\\\\?\\b[a-z_]\\w*)+(?=\\s*\\$)/i,\n\t\t\t\t\talias: ['class-name-fully-qualified', 'type-hint'],\n\t\t\t\t\tgreedy: true,\n\t\t\t\t\tlookbehind: true,\n\t\t\t\t\tinside: {\n\t\t\t\t\t\t'punctuation': /\\\\/\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tpattern: /(\\)\\s*:\\s*(?:\\?\\s*)?)\\b[a-z_]\\w*(?!\\\\)\\b/i,\n\t\t\t\t\talias: 'return-type',\n\t\t\t\t\tgreedy: true,\n\t\t\t\t\tlookbehind: true\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tpattern: /(\\)\\s*:\\s*(?:\\?\\s*)?)(?:\\\\?\\b[a-z_]\\w*)+\\b(?!\\\\)/i,\n\t\t\t\t\talias: ['class-name-fully-qualified', 'return-type'],\n\t\t\t\t\tgreedy: true,\n\t\t\t\t\tlookbehind: true,\n\t\t\t\t\tinside: {\n\t\t\t\t\t\t'punctuation': /\\\\/\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t],\n\t\t\t'constant': constant,\n\t\t\t'function': {\n\t\t\t\tpattern: /(^|[^\\\\\\w])\\\\?[a-z_](?:[\\w\\\\]*\\w)?(?=\\s*\\()/i,\n\t\t\t\tlookbehind: true,\n\t\t\t\tinside: {\n\t\t\t\t\t'punctuation': /\\\\/\n\t\t\t\t}\n\t\t\t},\n\t\t\t'property': {\n\t\t\t\tpattern: /(->\\s*)\\w+/,\n\t\t\t\tlookbehind: true\n\t\t\t},\n\t\t\t'number': number,\n\t\t\t'operator': operator,\n\t\t\t'punctuation': punctuation\n\t\t};\n\n\t\tvar string_interpolation = {\n\t\t\tpattern: /\\{\\$(?:\\{(?:\\{[^{}]+\\}|[^{}]+)\\}|[^{}])+\\}|(^|[^\\\\{])\\$+(?:\\w+(?:\\[[^\\r\\n\\[\\]]+\\]|->\\w+)?)/,\n\t\t\tlookbehind: true,\n\t\t\tinside: Prism.languages.php\n\t\t};\n\n\t\tvar string = [\n\t\t\t{\n\t\t\t\tpattern: /<<<'([^']+)'[\\r\\n](?:.*[\\r\\n])*?\\1;/,\n\t\t\t\talias: 'nowdoc-string',\n\t\t\t\tgreedy: true,\n\t\t\t\tinside: {\n\t\t\t\t\t'delimiter': {\n\t\t\t\t\t\tpattern: /^<<<'[^']+'|[a-z_]\\w*;$/i,\n\t\t\t\t\t\talias: 'symbol',\n\t\t\t\t\t\tinside: {\n\t\t\t\t\t\t\t'punctuation': /^<<<'?|[';]$/\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\t\t\t{\n\t\t\t\tpattern: /<<<(?:\"([^\"]+)\"[\\r\\n](?:.*[\\r\\n])*?\\1;|([a-z_]\\w*)[\\r\\n](?:.*[\\r\\n])*?\\2;)/i,\n\t\t\t\talias: 'heredoc-string',\n\t\t\t\tgreedy: true,\n\t\t\t\tinside: {\n\t\t\t\t\t'delimiter': {\n\t\t\t\t\t\tpattern: /^<<<(?:\"[^\"]+\"|[a-z_]\\w*)|[a-z_]\\w*;$/i,\n\t\t\t\t\t\talias: 'symbol',\n\t\t\t\t\t\tinside: {\n\t\t\t\t\t\t\t'punctuation': /^<<<\"?|[\";]$/\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\t'interpolation': string_interpolation\n\t\t\t\t}\n\t\t\t},\n\t\t\t{\n\t\t\t\tpattern: /`(?:\\\\[\\s\\S]|[^\\\\`])*`/,\n\t\t\t\talias: 'backtick-quoted-string',\n\t\t\t\tgreedy: true\n\t\t\t},\n\t\t\t{\n\t\t\t\tpattern: /'(?:\\\\[\\s\\S]|[^\\\\'])*'/,\n\t\t\t\talias: 'single-quoted-string',\n\t\t\t\tgreedy: true\n\t\t\t},\n\t\t\t{\n\t\t\t\tpattern: /\"(?:\\\\[\\s\\S]|[^\\\\\"])*\"/,\n\t\t\t\talias: 'double-quoted-string',\n\t\t\t\tgreedy: true,\n\t\t\t\tinside: {\n\t\t\t\t\t'interpolation': string_interpolation\n\t\t\t\t}\n\t\t\t}\n\t\t];\n\n\t\tPrism.languages.insertBefore('php', 'variable', {\n\t\t\t'string': string,\n\t\t\t'attribute': {\n\t\t\t\tpattern: /#\\[(?:[^\"'\\/#]|\\/(?![*/])|\\/\\/.*$|#(?!\\[).*$|\\/\\*(?:[^*]|\\*(?!\\/))*\\*\\/|\"(?:\\\\[\\s\\S]|[^\\\\\"])*\"|'(?:\\\\[\\s\\S]|[^\\\\'])*')+\\](?=\\s*[a-z$#])/im,\n\t\t\t\tgreedy: true,\n\t\t\t\tinside: {\n\t\t\t\t\t'attribute-content': {\n\t\t\t\t\t\tpattern: /^(#\\[)[\\s\\S]+(?=\\]$)/,\n\t\t\t\t\t\tlookbehind: true,\n\t\t\t\t\t\t// inside can appear subset of php\n\t\t\t\t\t\tinside: {\n\t\t\t\t\t\t\t'comment': comment,\n\t\t\t\t\t\t\t'string': string,\n\t\t\t\t\t\t\t'attribute-class-name': [\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tpattern: /([^:]|^)\\b[a-z_]\\w*(?!\\\\)\\b/i,\n\t\t\t\t\t\t\t\t\talias: 'class-name',\n\t\t\t\t\t\t\t\t\tgreedy: true,\n\t\t\t\t\t\t\t\t\tlookbehind: true\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tpattern: /([^:]|^)(?:\\\\?\\b[a-z_]\\w*)+/i,\n\t\t\t\t\t\t\t\t\talias: [\n\t\t\t\t\t\t\t\t\t\t'class-name',\n\t\t\t\t\t\t\t\t\t\t'class-name-fully-qualified'\n\t\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t\t\tgreedy: true,\n\t\t\t\t\t\t\t\t\tlookbehind: true,\n\t\t\t\t\t\t\t\t\tinside: {\n\t\t\t\t\t\t\t\t\t\t'punctuation': /\\\\/\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t'constant': constant,\n\t\t\t\t\t\t\t'number': number,\n\t\t\t\t\t\t\t'operator': operator,\n\t\t\t\t\t\t\t'punctuation': punctuation\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\t'delimiter': {\n\t\t\t\t\t\tpattern: /^#\\[|\\]$/,\n\t\t\t\t\t\talias: 'punctuation'\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\t\t});\n\n\t\tPrism.hooks.add('before-tokenize', function (env) {\n\t\t\tif (!/<\\?/.test(env.code)) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tvar phpPattern = /<\\?(?:[^\"'/#]|\\/(?![*/])|(\"|')(?:\\\\[\\s\\S]|(?!\\1)[^\\\\])*\\1|(?:\\/\\/|#(?!\\[))(?:[^?\\n\\r]|\\?(?!>))*(?=$|\\?>|[\\r\\n])|#\\[|\\/\\*(?:[^*]|\\*(?!\\/))*(?:\\*\\/|$))*?(?:\\?>|$)/g;\n\t\t\tPrism.languages['markup-templating'].buildPlaceholders(env, 'php', phpPattern);\n\t\t});\n\n\t\tPrism.hooks.add('after-tokenize', function (env) {\n\t\t\tPrism.languages['markup-templating'].tokenizePlaceholders(env, 'php');\n\t\t});\n\n\t}(Prism));\n\n\t(function (Prism) {\n\n\t\tvar builtinTypes = /\\b(?:bool|bytes|double|s?fixed(?:32|64)|float|[su]?int(?:32|64)|string)\\b/;\n\n\t\tPrism.languages.protobuf = Prism.languages.extend('clike', {\n\t\t\t'class-name': [\n\t\t\t\t{\n\t\t\t\t\tpattern: /(\\b(?:enum|extend|message|service)\\s+)[A-Za-z_]\\w*(?=\\s*\\{)/,\n\t\t\t\t\tlookbehind: true\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tpattern: /(\\b(?:rpc\\s+\\w+|returns)\\s*\\(\\s*(?:stream\\s+)?)\\.?[A-Za-z_]\\w*(?:\\.[A-Za-z_]\\w*)*(?=\\s*\\))/,\n\t\t\t\t\tlookbehind: true\n\t\t\t\t}\n\t\t\t],\n\t\t\t'keyword': /\\b(?:enum|extend|extensions|import|message|oneof|option|optional|package|public|repeated|required|reserved|returns|rpc(?=\\s+\\w)|service|stream|syntax|to)\\b(?!\\s*=\\s*\\d)/,\n\t\t\t'function': /\\b[a-z_]\\w*(?=\\s*\\()/i\n\t\t});\n\n\t\tPrism.languages.insertBefore('protobuf', 'operator', {\n\t\t\t'map': {\n\t\t\t\tpattern: /\\bmap<\\s*[\\w.]+\\s*,\\s*[\\w.]+\\s*>(?=\\s+[a-z_]\\w*\\s*[=;])/i,\n\t\t\t\talias: 'class-name',\n\t\t\t\tinside: {\n\t\t\t\t\t'punctuation': /[<>.,]/,\n\t\t\t\t\t'builtin': builtinTypes\n\t\t\t\t}\n\t\t\t},\n\t\t\t'builtin': builtinTypes,\n\t\t\t'positional-class-name': {\n\t\t\t\tpattern: /(?:\\b|\\B\\.)[a-z_]\\w*(?:\\.[a-z_]\\w*)*(?=\\s+[a-z_]\\w*\\s*[=;])/i,\n\t\t\t\talias: 'class-name',\n\t\t\t\tinside: {\n\t\t\t\t\t'punctuation': /\\./\n\t\t\t\t}\n\t\t\t},\n\t\t\t'annotation': {\n\t\t\t\tpattern: /(\\[\\s*)[a-z_]\\w*(?=\\s*=)/i,\n\t\t\t\tlookbehind: true\n\t\t\t}\n\t\t});\n\n\t}(Prism));\n\n\tPrism.languages.python = {\n\t\t'comment': {\n\t\t\tpattern: /(^|[^\\\\])#.*/,\n\t\t\tlookbehind: true,\n\t\t\tgreedy: true\n\t\t},\n\t\t'string-interpolation': {\n\t\t\tpattern: /(?:f|fr|rf)(?:(\"\"\"|''')[\\s\\S]*?\\1|(\"|')(?:\\\\.|(?!\\2)[^\\\\\\r\\n])*\\2)/i,\n\t\t\tgreedy: true,\n\t\t\tinside: {\n\t\t\t\t'interpolation': {\n\t\t\t\t\t// \"{\" <expression> <optional \"!s\", \"!r\", or \"!a\"> <optional \":\" format specifier> \"}\"\n\t\t\t\t\tpattern: /((?:^|[^{])(?:\\{\\{)*)\\{(?!\\{)(?:[^{}]|\\{(?!\\{)(?:[^{}]|\\{(?!\\{)(?:[^{}])+\\})+\\})+\\}/,\n\t\t\t\t\tlookbehind: true,\n\t\t\t\t\tinside: {\n\t\t\t\t\t\t'format-spec': {\n\t\t\t\t\t\t\tpattern: /(:)[^:(){}]+(?=\\}$)/,\n\t\t\t\t\t\t\tlookbehind: true\n\t\t\t\t\t\t},\n\t\t\t\t\t\t'conversion-option': {\n\t\t\t\t\t\t\tpattern: /![sra](?=[:}]$)/,\n\t\t\t\t\t\t\talias: 'punctuation'\n\t\t\t\t\t\t},\n\t\t\t\t\t\trest: null\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t'string': /[\\s\\S]+/\n\t\t\t}\n\t\t},\n\t\t'triple-quoted-string': {\n\t\t\tpattern: /(?:[rub]|br|rb)?(\"\"\"|''')[\\s\\S]*?\\1/i,\n\t\t\tgreedy: true,\n\t\t\talias: 'string'\n\t\t},\n\t\t'string': {\n\t\t\tpattern: /(?:[rub]|br|rb)?(\"|')(?:\\\\.|(?!\\1)[^\\\\\\r\\n])*\\1/i,\n\t\t\tgreedy: true\n\t\t},\n\t\t'function': {\n\t\t\tpattern: /((?:^|\\s)def[ \\t]+)[a-zA-Z_]\\w*(?=\\s*\\()/g,\n\t\t\tlookbehind: true\n\t\t},\n\t\t'class-name': {\n\t\t\tpattern: /(\\bclass\\s+)\\w+/i,\n\t\t\tlookbehind: true\n\t\t},\n\t\t'decorator': {\n\t\t\tpattern: /(^[\\t ]*)@\\w+(?:\\.\\w+)*/m,\n\t\t\tlookbehind: true,\n\t\t\talias: ['annotation', 'punctuation'],\n\t\t\tinside: {\n\t\t\t\t'punctuation': /\\./\n\t\t\t}\n\t\t},\n\t\t'keyword': /\\b(?:_(?=\\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\\b/,\n\t\t'builtin': /\\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\\b/,\n\t\t'boolean': /\\b(?:False|None|True)\\b/,\n\t\t'number': /\\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\\b|(?:\\b\\d+(?:_\\d+)*(?:\\.(?:\\d+(?:_\\d+)*)?)?|\\B\\.\\d+(?:_\\d+)*)(?:e[+-]?\\d+(?:_\\d+)*)?j?(?!\\w)/i,\n\t\t'operator': /[-+%=]=?|!=|:=|\\*\\*?=?|\\/\\/?=?|<[<=>]?|>[=>]?|[&|^~]/,\n\t\t'punctuation': /[{}[\\];(),.:]/\n\t};\n\n\tPrism.languages.python['string-interpolation'].inside['interpolation'].inside.rest = Prism.languages.python;\n\n\tPrism.languages.py = Prism.languages.python;\n\n\tPrism.languages.r = {\n\t\t'comment': /#.*/,\n\t\t'string': {\n\t\t\tpattern: /(['\"])(?:\\\\.|(?!\\1)[^\\\\\\r\\n])*\\1/,\n\t\t\tgreedy: true\n\t\t},\n\t\t'percent-operator': {\n\t\t\t// Includes user-defined operators\n\t\t\t// and %%, %*%, %/%, %in%, %o%, %x%\n\t\t\tpattern: /%[^%\\s]*%/,\n\t\t\talias: 'operator'\n\t\t},\n\t\t'boolean': /\\b(?:FALSE|TRUE)\\b/,\n\t\t'ellipsis': /\\.\\.(?:\\.|\\d+)/,\n\t\t'number': [\n\t\t\t/\\b(?:Inf|NaN)\\b/,\n\t\t\t/(?:\\b0x[\\dA-Fa-f]+(?:\\.\\d*)?|\\b\\d+(?:\\.\\d*)?|\\B\\.\\d+)(?:[EePp][+-]?\\d+)?[iL]?/\n\t\t],\n\t\t'keyword': /\\b(?:NA|NA_character_|NA_complex_|NA_integer_|NA_real_|NULL|break|else|for|function|if|in|next|repeat|while)\\b/,\n\t\t'operator': /->?>?|<(?:=|<?-)?|[>=!]=?|::?|&&?|\\|\\|?|[+*\\/^$@~]/,\n\t\t'punctuation': /[(){}\\[\\],;]/\n\t};\n\n\t(function (Prism) {\n\n\t\tvar multilineComment = /\\/\\*(?:[^*/]|\\*(?!\\/)|\\/(?!\\*)|<self>)*\\*\\//.source;\n\t\tfor (var i = 0; i < 2; i++) {\n\t\t\t// support 4 levels of nested comments\n\t\t\tmultilineComment = multilineComment.replace(/<self>/g, function () { return multilineComment; });\n\t\t}\n\t\tmultilineComment = multilineComment.replace(/<self>/g, function () { return /[^\\s\\S]/.source; });\n\n\n\t\tPrism.languages.rust = {\n\t\t\t'comment': [\n\t\t\t\t{\n\t\t\t\t\tpattern: RegExp(/(^|[^\\\\])/.source + multilineComment),\n\t\t\t\t\tlookbehind: true,\n\t\t\t\t\tgreedy: true\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tpattern: /(^|[^\\\\:])\\/\\/.*/,\n\t\t\t\t\tlookbehind: true,\n\t\t\t\t\tgreedy: true\n\t\t\t\t}\n\t\t\t],\n\t\t\t'string': {\n\t\t\t\tpattern: /b?\"(?:\\\\[\\s\\S]|[^\\\\\"])*\"|b?r(#*)\"(?:[^\"]|\"(?!\\1))*\"\\1/,\n\t\t\t\tgreedy: true\n\t\t\t},\n\t\t\t'char': {\n\t\t\t\tpattern: /b?'(?:\\\\(?:x[0-7][\\da-fA-F]|u\\{(?:[\\da-fA-F]_*){1,6}\\}|.)|[^\\\\\\r\\n\\t'])'/,\n\t\t\t\tgreedy: true\n\t\t\t},\n\t\t\t'attribute': {\n\t\t\t\tpattern: /#!?\\[(?:[^\\[\\]\"]|\"(?:\\\\[\\s\\S]|[^\\\\\"])*\")*\\]/,\n\t\t\t\tgreedy: true,\n\t\t\t\talias: 'attr-name',\n\t\t\t\tinside: {\n\t\t\t\t\t'string': null // see below\n\t\t\t\t}\n\t\t\t},\n\n\t\t\t// Closure params should not be confused with bitwise OR |\n\t\t\t'closure-params': {\n\t\t\t\tpattern: /([=(,:]\\s*|\\bmove\\s*)\\|[^|]*\\||\\|[^|]*\\|(?=\\s*(?:\\{|->))/,\n\t\t\t\tlookbehind: true,\n\t\t\t\tgreedy: true,\n\t\t\t\tinside: {\n\t\t\t\t\t'closure-punctuation': {\n\t\t\t\t\t\tpattern: /^\\||\\|$/,\n\t\t\t\t\t\talias: 'punctuation'\n\t\t\t\t\t},\n\t\t\t\t\trest: null // see below\n\t\t\t\t}\n\t\t\t},\n\n\t\t\t'lifetime-annotation': {\n\t\t\t\tpattern: /'\\w+/,\n\t\t\t\talias: 'symbol'\n\t\t\t},\n\n\t\t\t'fragment-specifier': {\n\t\t\t\tpattern: /(\\$\\w+:)[a-z]+/,\n\t\t\t\tlookbehind: true,\n\t\t\t\talias: 'punctuation'\n\t\t\t},\n\t\t\t'variable': /\\$\\w+/,\n\n\t\t\t'function-definition': {\n\t\t\t\tpattern: /(\\bfn\\s+)\\w+/,\n\t\t\t\tlookbehind: true,\n\t\t\t\talias: 'function'\n\t\t\t},\n\t\t\t'type-definition': {\n\t\t\t\tpattern: /(\\b(?:enum|struct|trait|type|union)\\s+)\\w+/,\n\t\t\t\tlookbehind: true,\n\t\t\t\talias: 'class-name'\n\t\t\t},\n\t\t\t'module-declaration': [\n\t\t\t\t{\n\t\t\t\t\tpattern: /(\\b(?:crate|mod)\\s+)[a-z][a-z_\\d]*/,\n\t\t\t\t\tlookbehind: true,\n\t\t\t\t\talias: 'namespace'\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tpattern: /(\\b(?:crate|self|super)\\s*)::\\s*[a-z][a-z_\\d]*\\b(?:\\s*::(?:\\s*[a-z][a-z_\\d]*\\s*::)*)?/,\n\t\t\t\t\tlookbehind: true,\n\t\t\t\t\talias: 'namespace',\n\t\t\t\t\tinside: {\n\t\t\t\t\t\t'punctuation': /::/\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t],\n\t\t\t'keyword': [\n\t\t\t\t// https://github.com/rust-lang/reference/blob/master/src/keywords.md\n\t\t\t\t/\\b(?:Self|abstract|as|async|await|become|box|break|const|continue|crate|do|dyn|else|enum|extern|final|fn|for|if|impl|in|let|loop|macro|match|mod|move|mut|override|priv|pub|ref|return|self|static|struct|super|trait|try|type|typeof|union|unsafe|unsized|use|virtual|where|while|yield)\\b/,\n\t\t\t\t// primitives and str\n\t\t\t\t// https://doc.rust-lang.org/stable/rust-by-example/primitives.html\n\t\t\t\t/\\b(?:bool|char|f(?:32|64)|[ui](?:8|16|32|64|128|size)|str)\\b/\n\t\t\t],\n\n\t\t\t// functions can technically start with an upper-case letter, but this will introduce a lot of false positives\n\t\t\t// and Rust's naming conventions recommend snake_case anyway.\n\t\t\t// https://doc.rust-lang.org/1.0.0/style/style/naming/README.html\n\t\t\t'function': /\\b[a-z_]\\w*(?=\\s*(?:::\\s*<|\\())/,\n\t\t\t'macro': {\n\t\t\t\tpattern: /\\b\\w+!/,\n\t\t\t\talias: 'property'\n\t\t\t},\n\t\t\t'constant': /\\b[A-Z_][A-Z_\\d]+\\b/,\n\t\t\t'class-name': /\\b[A-Z]\\w*\\b/,\n\n\t\t\t'namespace': {\n\t\t\t\tpattern: /(?:\\b[a-z][a-z_\\d]*\\s*::\\s*)*\\b[a-z][a-z_\\d]*\\s*::(?!\\s*<)/,\n\t\t\t\tinside: {\n\t\t\t\t\t'punctuation': /::/\n\t\t\t\t}\n\t\t\t},\n\n\t\t\t// Hex, oct, bin, dec numbers with visual separators and type suffix\n\t\t\t'number': /\\b(?:0x[\\dA-Fa-f](?:_?[\\dA-Fa-f])*|0o[0-7](?:_?[0-7])*|0b[01](?:_?[01])*|(?:(?:\\d(?:_?\\d)*)?\\.)?\\d(?:_?\\d)*(?:[Ee][+-]?\\d+)?)(?:_?(?:f32|f64|[iu](?:8|16|32|64|size)?))?\\b/,\n\t\t\t'boolean': /\\b(?:false|true)\\b/,\n\t\t\t'punctuation': /->|\\.\\.=|\\.{1,3}|::|[{}[\\];(),:]/,\n\t\t\t'operator': /[-+*\\/%!^]=?|=[=>]?|&[&=]?|\\|[|=]?|<<?=?|>>?=?|[@?]/\n\t\t};\n\n\t\tPrism.languages.rust['closure-params'].inside.rest = Prism.languages.rust;\n\t\tPrism.languages.rust['attribute'].inside['string'] = Prism.languages.rust['string'];\n\n\t}(Prism));\n\n\tPrism.languages.sql = {\n\t\t'comment': {\n\t\t\tpattern: /(^|[^\\\\])(?:\\/\\*[\\s\\S]*?\\*\\/|(?:--|\\/\\/|#).*)/,\n\t\t\tlookbehind: true\n\t\t},\n\t\t'variable': [\n\t\t\t{\n\t\t\t\tpattern: /@([\"'`])(?:\\\\[\\s\\S]|(?!\\1)[^\\\\])+\\1/,\n\t\t\t\tgreedy: true\n\t\t\t},\n\t\t\t/@[\\w.$]+/\n\t\t],\n\t\t'string': {\n\t\t\tpattern: /(^|[^@\\\\])(\"|')(?:\\\\[\\s\\S]|(?!\\2)[^\\\\]|\\2\\2)*\\2/,\n\t\t\tgreedy: true,\n\t\t\tlookbehind: true\n\t\t},\n\t\t'identifier': {\n\t\t\tpattern: /(^|[^@\\\\])`(?:\\\\[\\s\\S]|[^`\\\\]|``)*`/,\n\t\t\tgreedy: true,\n\t\t\tlookbehind: true,\n\t\t\tinside: {\n\t\t\t\t'punctuation': /^`|`$/\n\t\t\t}\n\t\t},\n\t\t'function': /\\b(?:AVG|COUNT|FIRST|FORMAT|LAST|LCASE|LEN|MAX|MID|MIN|MOD|NOW|ROUND|SUM|UCASE)(?=\\s*\\()/i, // Should we highlight user defined functions too?\n\t\t'keyword': /\\b(?:ACTION|ADD|AFTER|ALGORITHM|ALL|ALTER|ANALYZE|ANY|APPLY|AS|ASC|AUTHORIZATION|AUTO_INCREMENT|BACKUP|BDB|BEGIN|BERKELEYDB|BIGINT|BINARY|BIT|BLOB|BOOL|BOOLEAN|BREAK|BROWSE|BTREE|BULK|BY|CALL|CASCADED?|CASE|CHAIN|CHAR(?:ACTER|SET)?|CHECK(?:POINT)?|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMNS?|COMMENT|COMMIT(?:TED)?|COMPUTE|CONNECT|CONSISTENT|CONSTRAINT|CONTAINS(?:TABLE)?|CONTINUE|CONVERT|CREATE|CROSS|CURRENT(?:_DATE|_TIME|_TIMESTAMP|_USER)?|CURSOR|CYCLE|DATA(?:BASES?)?|DATE(?:TIME)?|DAY|DBCC|DEALLOCATE|DEC|DECIMAL|DECLARE|DEFAULT|DEFINER|DELAYED|DELETE|DELIMITERS?|DENY|DESC|DESCRIBE|DETERMINISTIC|DISABLE|DISCARD|DISK|DISTINCT|DISTINCTROW|DISTRIBUTED|DO|DOUBLE|DROP|DUMMY|DUMP(?:FILE)?|DUPLICATE|ELSE(?:IF)?|ENABLE|ENCLOSED|END|ENGINE|ENUM|ERRLVL|ERRORS|ESCAPED?|EXCEPT|EXEC(?:UTE)?|EXISTS|EXIT|EXPLAIN|EXTENDED|FETCH|FIELDS|FILE|FILLFACTOR|FIRST|FIXED|FLOAT|FOLLOWING|FOR(?: EACH ROW)?|FORCE|FOREIGN|FREETEXT(?:TABLE)?|FROM|FULL|FUNCTION|GEOMETRY(?:COLLECTION)?|GLOBAL|GOTO|GRANT|GROUP|HANDLER|HASH|HAVING|HOLDLOCK|HOUR|IDENTITY(?:COL|_INSERT)?|IF|IGNORE|IMPORT|INDEX|INFILE|INNER|INNODB|INOUT|INSERT|INT|INTEGER|INTERSECT|INTERVAL|INTO|INVOKER|ISOLATION|ITERATE|JOIN|KEYS?|KILL|LANGUAGE|LAST|LEAVE|LEFT|LEVEL|LIMIT|LINENO|LINES|LINESTRING|LOAD|LOCAL|LOCK|LONG(?:BLOB|TEXT)|LOOP|MATCH(?:ED)?|MEDIUM(?:BLOB|INT|TEXT)|MERGE|MIDDLEINT|MINUTE|MODE|MODIFIES|MODIFY|MONTH|MULTI(?:LINESTRING|POINT|POLYGON)|NATIONAL|NATURAL|NCHAR|NEXT|NO|NONCLUSTERED|NULLIF|NUMERIC|OFF?|OFFSETS?|ON|OPEN(?:DATASOURCE|QUERY|ROWSET)?|OPTIMIZE|OPTION(?:ALLY)?|ORDER|OUT(?:ER|FILE)?|OVER|PARTIAL|PARTITION|PERCENT|PIVOT|PLAN|POINT|POLYGON|PRECEDING|PRECISION|PREPARE|PREV|PRIMARY|PRINT|PRIVILEGES|PROC(?:EDURE)?|PUBLIC|PURGE|QUICK|RAISERROR|READS?|REAL|RECONFIGURE|REFERENCES|RELEASE|RENAME|REPEAT(?:ABLE)?|REPLACE|REPLICATION|REQUIRE|RESIGNAL|RESTORE|RESTRICT|RETURN(?:ING|S)?|REVOKE|RIGHT|ROLLBACK|ROUTINE|ROW(?:COUNT|GUIDCOL|S)?|RTREE|RULE|SAVE(?:POINT)?|SCHEMA|SECOND|SELECT|SERIAL(?:IZABLE)?|SESSION(?:_USER)?|SET(?:USER)?|SHARE|SHOW|SHUTDOWN|SIMPLE|SMALLINT|SNAPSHOT|SOME|SONAME|SQL|START(?:ING)?|STATISTICS|STATUS|STRIPED|SYSTEM_USER|TABLES?|TABLESPACE|TEMP(?:ORARY|TABLE)?|TERMINATED|TEXT(?:SIZE)?|THEN|TIME(?:STAMP)?|TINY(?:BLOB|INT|TEXT)|TOP?|TRAN(?:SACTIONS?)?|TRIGGER|TRUNCATE|TSEQUAL|TYPES?|UNBOUNDED|UNCOMMITTED|UNDEFINED|UNION|UNIQUE|UNLOCK|UNPIVOT|UNSIGNED|UPDATE(?:TEXT)?|USAGE|USE|USER|USING|VALUES?|VAR(?:BINARY|CHAR|CHARACTER|YING)|VIEW|WAITFOR|WARNINGS|WHEN|WHERE|WHILE|WITH(?: ROLLUP|IN)?|WORK|WRITE(?:TEXT)?|YEAR)\\b/i,\n\t\t'boolean': /\\b(?:FALSE|NULL|TRUE)\\b/i,\n\t\t'number': /\\b0x[\\da-f]+\\b|\\b\\d+(?:\\.\\d*)?|\\B\\.\\d+\\b/i,\n\t\t'operator': /[-+*\\/=%^~]|&&?|\\|\\|?|!=?|<(?:=>?|<|>)?|>[>=]?|\\b(?:AND|BETWEEN|DIV|ILIKE|IN|IS|LIKE|NOT|OR|REGEXP|RLIKE|SOUNDS LIKE|XOR)\\b/i,\n\t\t'punctuation': /[;[\\]()`,.]/\n\t};\n\n\t(function (Prism) {\n\n\t\tPrism.languages.typescript = Prism.languages.extend('javascript', {\n\t\t\t'class-name': {\n\t\t\t\tpattern: /(\\b(?:class|extends|implements|instanceof|interface|new|type)\\s+)(?!keyof\\b)(?!\\s)[_$a-zA-Z\\xA0-\\uFFFF](?:(?!\\s)[$\\w\\xA0-\\uFFFF])*(?:\\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,\n\t\t\t\tlookbehind: true,\n\t\t\t\tgreedy: true,\n\t\t\t\tinside: null // see below\n\t\t\t},\n\t\t\t'builtin': /\\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\\b/,\n\t\t});\n\n\t\t// The keywords TypeScript adds to JavaScript\n\t\tPrism.languages.typescript.keyword.push(\n\t\t\t/\\b(?:abstract|declare|is|keyof|readonly|require)\\b/,\n\t\t\t// keywords that have to be followed by an identifier\n\t\t\t/\\b(?:asserts|infer|interface|module|namespace|type)\\b(?=\\s*(?:[{_$a-zA-Z\\xA0-\\uFFFF]|$))/,\n\t\t\t// This is for `import type *, {}`\n\t\t\t/\\btype\\b(?=\\s*(?:[\\{*]|$))/\n\t\t);\n\n\t\t// doesn't work with TS because TS is too complex\n\t\tdelete Prism.languages.typescript['parameter'];\n\t\tdelete Prism.languages.typescript['literal-property'];\n\n\t\t// a version of typescript specifically for highlighting types\n\t\tvar typeInside = Prism.languages.extend('typescript', {});\n\t\tdelete typeInside['class-name'];\n\n\t\tPrism.languages.typescript['class-name'].inside = typeInside;\n\n\t\tPrism.languages.insertBefore('typescript', 'function', {\n\t\t\t'decorator': {\n\t\t\t\tpattern: /@[$\\w\\xA0-\\uFFFF]+/,\n\t\t\t\tinside: {\n\t\t\t\t\t'at': {\n\t\t\t\t\t\tpattern: /^@/,\n\t\t\t\t\t\talias: 'operator'\n\t\t\t\t\t},\n\t\t\t\t\t'function': /^[\\s\\S]+/\n\t\t\t\t}\n\t\t\t},\n\t\t\t'generic-function': {\n\t\t\t\t// e.g. foo<T extends \"bar\" | \"baz\">( ...\n\t\t\t\tpattern: /#?(?!\\s)[_$a-zA-Z\\xA0-\\uFFFF](?:(?!\\s)[$\\w\\xA0-\\uFFFF])*\\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\\s*\\()/,\n\t\t\t\tgreedy: true,\n\t\t\t\tinside: {\n\t\t\t\t\t'function': /^#?(?!\\s)[_$a-zA-Z\\xA0-\\uFFFF](?:(?!\\s)[$\\w\\xA0-\\uFFFF])*/,\n\t\t\t\t\t'generic': {\n\t\t\t\t\t\tpattern: /<[\\s\\S]+/, // everything after the first <\n\t\t\t\t\t\talias: 'class-name',\n\t\t\t\t\t\tinside: typeInside\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\tPrism.languages.ts = Prism.languages.typescript;\n\n\t}(Prism));\n\n\t(function (Prism) {\n\n\t\tvar javascript = Prism.util.clone(Prism.languages.javascript);\n\n\t\tvar space = /(?:\\s|\\/\\/.*(?!.)|\\/\\*(?:[^*]|\\*(?!\\/))\\*\\/)/.source;\n\t\tvar braces = /(?:\\{(?:\\{(?:\\{[^{}]*\\}|[^{}])*\\}|[^{}])*\\})/.source;\n\t\tvar spread = /(?:\\{<S>*\\.{3}(?:[^{}]|<BRACES>)*\\})/.source;\n\n\t\t/**\n\t\t * @param {string} source\n\t\t * @param {string} [flags]\n\t\t */\n\t\tfunction re(source, flags) {\n\t\t\tsource = source\n\t\t\t\t.replace(/<S>/g, function () { return space; })\n\t\t\t\t.replace(/<BRACES>/g, function () { return braces; })\n\t\t\t\t.replace(/<SPREAD>/g, function () { return spread; });\n\t\t\treturn RegExp(source, flags);\n\t\t}\n\n\t\tspread = re(spread).source;\n\n\n\t\tPrism.languages.jsx = Prism.languages.extend('markup', javascript);\n\t\tPrism.languages.jsx.tag.pattern = re(\n\t\t\t/<\\/?(?:[\\w.:-]+(?:<S>+(?:[\\w.:$-]+(?:=(?:\"(?:\\\\[\\s\\S]|[^\\\\\"])*\"|'(?:\\\\[\\s\\S]|[^\\\\'])*'|[^\\s{'\"/>=]+|<BRACES>))?|<SPREAD>))*<S>*\\/?)?>/.source\n\t\t);\n\n\t\tPrism.languages.jsx.tag.inside['tag'].pattern = /^<\\/?[^\\s>\\/]*/;\n\t\tPrism.languages.jsx.tag.inside['attr-value'].pattern = /=(?!\\{)(?:\"(?:\\\\[\\s\\S]|[^\\\\\"])*\"|'(?:\\\\[\\s\\S]|[^\\\\'])*'|[^\\s'\">]+)/;\n\t\tPrism.languages.jsx.tag.inside['tag'].inside['class-name'] = /^[A-Z]\\w*(?:\\.[A-Z]\\w*)*$/;\n\t\tPrism.languages.jsx.tag.inside['comment'] = javascript['comment'];\n\n\t\tPrism.languages.insertBefore('inside', 'attr-name', {\n\t\t\t'spread': {\n\t\t\t\tpattern: re(/<SPREAD>/.source),\n\t\t\t\tinside: Prism.languages.jsx\n\t\t\t}\n\t\t}, Prism.languages.jsx.tag);\n\n\t\tPrism.languages.insertBefore('inside', 'special-attr', {\n\t\t\t'script': {\n\t\t\t\t// Allow for two levels of nesting\n\t\t\t\tpattern: re(/=<BRACES>/.source),\n\t\t\t\talias: 'language-javascript',\n\t\t\t\tinside: {\n\t\t\t\t\t'script-punctuation': {\n\t\t\t\t\t\tpattern: /^=(?=\\{)/,\n\t\t\t\t\t\talias: 'punctuation'\n\t\t\t\t\t},\n\t\t\t\t\trest: Prism.languages.jsx\n\t\t\t\t},\n\t\t\t}\n\t\t}, Prism.languages.jsx.tag);\n\n\t\t// The following will handle plain text inside tags\n\t\tvar stringifyToken = function (token) {\n\t\t\tif (!token) {\n\t\t\t\treturn '';\n\t\t\t}\n\t\t\tif (typeof token === 'string') {\n\t\t\t\treturn token;\n\t\t\t}\n\t\t\tif (typeof token.content === 'string') {\n\t\t\t\treturn token.content;\n\t\t\t}\n\t\t\treturn token.content.map(stringifyToken).join('');\n\t\t};\n\n\t\tvar walkTokens = function (tokens) {\n\t\t\tvar openedTags = [];\n\t\t\tfor (var i = 0; i < tokens.length; i++) {\n\t\t\t\tvar token = tokens[i];\n\t\t\t\tvar notTagNorBrace = false;\n\n\t\t\t\tif (typeof token !== 'string') {\n\t\t\t\t\tif (token.type === 'tag' && token.content[0] && token.content[0].type === 'tag') {\n\t\t\t\t\t\t// We found a tag, now find its kind\n\n\t\t\t\t\t\tif (token.content[0].content[0].content === '</') {\n\t\t\t\t\t\t\t// Closing tag\n\t\t\t\t\t\t\tif (openedTags.length > 0 && openedTags[openedTags.length - 1].tagName === stringifyToken(token.content[0].content[1])) {\n\t\t\t\t\t\t\t\t// Pop matching opening tag\n\t\t\t\t\t\t\t\topenedTags.pop();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tif (token.content[token.content.length - 1].content === '/>') ; else {\n\t\t\t\t\t\t\t\t// Opening tag\n\t\t\t\t\t\t\t\topenedTags.push({\n\t\t\t\t\t\t\t\t\ttagName: stringifyToken(token.content[0].content[1]),\n\t\t\t\t\t\t\t\t\topenedBraces: 0\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if (openedTags.length > 0 && token.type === 'punctuation' && token.content === '{') {\n\n\t\t\t\t\t\t// Here we might have entered a JSX context inside a tag\n\t\t\t\t\t\topenedTags[openedTags.length - 1].openedBraces++;\n\n\t\t\t\t\t} else if (openedTags.length > 0 && openedTags[openedTags.length - 1].openedBraces > 0 && token.type === 'punctuation' && token.content === '}') {\n\n\t\t\t\t\t\t// Here we might have left a JSX context inside a tag\n\t\t\t\t\t\topenedTags[openedTags.length - 1].openedBraces--;\n\n\t\t\t\t\t} else {\n\t\t\t\t\t\tnotTagNorBrace = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (notTagNorBrace || typeof token === 'string') {\n\t\t\t\t\tif (openedTags.length > 0 && openedTags[openedTags.length - 1].openedBraces === 0) {\n\t\t\t\t\t\t// Here we are inside a tag, and not inside a JSX context.\n\t\t\t\t\t\t// That's plain text: drop any tokens matched.\n\t\t\t\t\t\tvar plainText = stringifyToken(token);\n\n\t\t\t\t\t\t// And merge text with adjacent text\n\t\t\t\t\t\tif (i < tokens.length - 1 && (typeof tokens[i + 1] === 'string' || tokens[i + 1].type === 'plain-text')) {\n\t\t\t\t\t\t\tplainText += stringifyToken(tokens[i + 1]);\n\t\t\t\t\t\t\ttokens.splice(i + 1, 1);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (i > 0 && (typeof tokens[i - 1] === 'string' || tokens[i - 1].type === 'plain-text')) {\n\t\t\t\t\t\t\tplainText = stringifyToken(tokens[i - 1]) + plainText;\n\t\t\t\t\t\t\ttokens.splice(i - 1, 1);\n\t\t\t\t\t\t\ti--;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\ttokens[i] = new Prism.Token('plain-text', plainText, null, plainText);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (token.content && typeof token.content !== 'string') {\n\t\t\t\t\twalkTokens(token.content);\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\tPrism.hooks.add('after-tokenize', function (env) {\n\t\t\tif (env.language !== 'jsx' && env.language !== 'tsx') {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\twalkTokens(env.tokens);\n\t\t});\n\n\t}(Prism));\n\n\t(function (Prism) {\n\t\tvar typescript = Prism.util.clone(Prism.languages.typescript);\n\t\tPrism.languages.tsx = Prism.languages.extend('jsx', typescript);\n\n\t\t// doesn't work with TS because TS is too complex\n\t\tdelete Prism.languages.tsx['parameter'];\n\t\tdelete Prism.languages.tsx['literal-property'];\n\n\t\t// This will prevent collisions between TSX tags and TS generic types.\n\t\t// Idea by https://github.com/karlhorky\n\t\t// Discussion: https://github.com/PrismJS/prism/issues/2594#issuecomment-710666928\n\t\tvar tag = Prism.languages.tsx.tag;\n\t\ttag.pattern = RegExp(/(^|[^\\w$]|(?=<\\/))/.source + '(?:' + tag.pattern.source + ')', tag.pattern.flags);\n\t\ttag.lookbehind = true;\n\t}(Prism));\n\n\t(function (Prism) {\n\t\tPrism.languages.sass = Prism.languages.extend('css', {\n\t\t\t// Sass comments don't need to be closed, only indented\n\t\t\t'comment': {\n\t\t\t\tpattern: /^([ \\t]*)\\/[\\/*].*(?:(?:\\r?\\n|\\r)\\1[ \\t].+)*/m,\n\t\t\t\tlookbehind: true,\n\t\t\t\tgreedy: true\n\t\t\t}\n\t\t});\n\n\t\tPrism.languages.insertBefore('sass', 'atrule', {\n\t\t\t// We want to consume the whole line\n\t\t\t'atrule-line': {\n\t\t\t\t// Includes support for = and + shortcuts\n\t\t\t\tpattern: /^(?:[ \\t]*)[@+=].+/m,\n\t\t\t\tgreedy: true,\n\t\t\t\tinside: {\n\t\t\t\t\t'atrule': /(?:@[\\w-]+|[+=])/\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tdelete Prism.languages.sass.atrule;\n\n\n\t\tvar variable = /\\$[-\\w]+|#\\{\\$[-\\w]+\\}/;\n\t\tvar operator = [\n\t\t\t/[+*\\/%]|[=!]=|<=?|>=?|\\b(?:and|not|or)\\b/,\n\t\t\t{\n\t\t\t\tpattern: /(\\s)-(?=\\s)/,\n\t\t\t\tlookbehind: true\n\t\t\t}\n\t\t];\n\n\t\tPrism.languages.insertBefore('sass', 'property', {\n\t\t\t// We want to consume the whole line\n\t\t\t'variable-line': {\n\t\t\t\tpattern: /^[ \\t]*\\$.+/m,\n\t\t\t\tgreedy: true,\n\t\t\t\tinside: {\n\t\t\t\t\t'punctuation': /:/,\n\t\t\t\t\t'variable': variable,\n\t\t\t\t\t'operator': operator\n\t\t\t\t}\n\t\t\t},\n\t\t\t// We want to consume the whole line\n\t\t\t'property-line': {\n\t\t\t\tpattern: /^[ \\t]*(?:[^:\\s]+ *:.*|:[^:\\s].*)/m,\n\t\t\t\tgreedy: true,\n\t\t\t\tinside: {\n\t\t\t\t\t'property': [\n\t\t\t\t\t\t/[^:\\s]+(?=\\s*:)/,\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tpattern: /(:)[^:\\s]+/,\n\t\t\t\t\t\t\tlookbehind: true\n\t\t\t\t\t\t}\n\t\t\t\t\t],\n\t\t\t\t\t'punctuation': /:/,\n\t\t\t\t\t'variable': variable,\n\t\t\t\t\t'operator': operator,\n\t\t\t\t\t'important': Prism.languages.sass.important\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tdelete Prism.languages.sass.property;\n\t\tdelete Prism.languages.sass.important;\n\n\t\t// Now that whole lines for other patterns are consumed,\n\t\t// what's left should be selectors\n\t\tPrism.languages.insertBefore('sass', 'punctuation', {\n\t\t\t'selector': {\n\t\t\t\tpattern: /^([ \\t]*)\\S(?:,[^,\\r\\n]+|[^,\\r\\n]*)(?:,[^,\\r\\n]+)*(?:,(?:\\r?\\n|\\r)\\1[ \\t]+\\S(?:,[^,\\r\\n]+|[^,\\r\\n]*)(?:,[^,\\r\\n]+)*)*/m,\n\t\t\t\tlookbehind: true,\n\t\t\t\tgreedy: true\n\t\t\t}\n\t\t});\n\n\t}(Prism));\n\n\t(function (Prism) {\n\t\t// $ set | grep '^[A-Z][^[:space:]]*=' | cut -d= -f1 | tr '\\n' '|'\n\t\t// + LC_ALL, RANDOM, REPLY, SECONDS.\n\t\t// + make sure PS1..4 are here as they are not always set,\n\t\t// - some useless things.\n\t\tvar envVars = '\\\\b(?:BASH|BASHOPTS|BASH_ALIASES|BASH_ARGC|BASH_ARGV|BASH_CMDS|BASH_COMPLETION_COMPAT_DIR|BASH_LINENO|BASH_REMATCH|BASH_SOURCE|BASH_VERSINFO|BASH_VERSION|COLORTERM|COLUMNS|COMP_WORDBREAKS|DBUS_SESSION_BUS_ADDRESS|DEFAULTS_PATH|DESKTOP_SESSION|DIRSTACK|DISPLAY|EUID|GDMSESSION|GDM_LANG|GNOME_KEYRING_CONTROL|GNOME_KEYRING_PID|GPG_AGENT_INFO|GROUPS|HISTCONTROL|HISTFILE|HISTFILESIZE|HISTSIZE|HOME|HOSTNAME|HOSTTYPE|IFS|INSTANCE|JOB|LANG|LANGUAGE|LC_ADDRESS|LC_ALL|LC_IDENTIFICATION|LC_MEASUREMENT|LC_MONETARY|LC_NAME|LC_NUMERIC|LC_PAPER|LC_TELEPHONE|LC_TIME|LESSCLOSE|LESSOPEN|LINES|LOGNAME|LS_COLORS|MACHTYPE|MAILCHECK|MANDATORY_PATH|NO_AT_BRIDGE|OLDPWD|OPTERR|OPTIND|ORBIT_SOCKETDIR|OSTYPE|PAPERSIZE|PATH|PIPESTATUS|PPID|PS1|PS2|PS3|PS4|PWD|RANDOM|REPLY|SECONDS|SELINUX_INIT|SESSION|SESSIONTYPE|SESSION_MANAGER|SHELL|SHELLOPTS|SHLVL|SSH_AUTH_SOCK|TERM|UID|UPSTART_EVENTS|UPSTART_INSTANCE|UPSTART_JOB|UPSTART_SESSION|USER|WINDOWID|XAUTHORITY|XDG_CONFIG_DIRS|XDG_CURRENT_DESKTOP|XDG_DATA_DIRS|XDG_GREETER_DATA_DIR|XDG_MENU_PREFIX|XDG_RUNTIME_DIR|XDG_SEAT|XDG_SEAT_PATH|XDG_SESSION_DESKTOP|XDG_SESSION_ID|XDG_SESSION_PATH|XDG_SESSION_TYPE|XDG_VTNR|XMODIFIERS)\\\\b';\n\n\t\tvar commandAfterHeredoc = {\n\t\t\tpattern: /(^([\"']?)\\w+\\2)[ \\t]+\\S.*/,\n\t\t\tlookbehind: true,\n\t\t\talias: 'punctuation', // this looks reasonably well in all themes\n\t\t\tinside: null // see below\n\t\t};\n\n\t\tvar insideString = {\n\t\t\t'bash': commandAfterHeredoc,\n\t\t\t'environment': {\n\t\t\t\tpattern: RegExp('\\\\$' + envVars),\n\t\t\t\talias: 'constant'\n\t\t\t},\n\t\t\t'variable': [\n\t\t\t\t// [0]: Arithmetic Environment\n\t\t\t\t{\n\t\t\t\t\tpattern: /\\$?\\(\\([\\s\\S]+?\\)\\)/,\n\t\t\t\t\tgreedy: true,\n\t\t\t\t\tinside: {\n\t\t\t\t\t\t// If there is a $ sign at the beginning highlight $(( and )) as variable\n\t\t\t\t\t\t'variable': [\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tpattern: /(^\\$\\(\\([\\s\\S]+)\\)\\)/,\n\t\t\t\t\t\t\t\tlookbehind: true\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t/^\\$\\(\\(/\n\t\t\t\t\t\t],\n\t\t\t\t\t\t'number': /\\b0x[\\dA-Fa-f]+\\b|(?:\\b\\d+(?:\\.\\d*)?|\\B\\.\\d+)(?:[Ee]-?\\d+)?/,\n\t\t\t\t\t\t// Operators according to https://www.gnu.org/software/bash/manual/bashref.html#Shell-Arithmetic\n\t\t\t\t\t\t'operator': /--|\\+\\+|\\*\\*=?|<<=?|>>=?|&&|\\|\\||[=!+\\-*/%<>^&|]=?|[?~:]/,\n\t\t\t\t\t\t// If there is no $ sign at the beginning highlight (( and )) as punctuation\n\t\t\t\t\t\t'punctuation': /\\(\\(?|\\)\\)?|,|;/\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t// [1]: Command Substitution\n\t\t\t\t{\n\t\t\t\t\tpattern: /\\$\\((?:\\([^)]+\\)|[^()])+\\)|`[^`]+`/,\n\t\t\t\t\tgreedy: true,\n\t\t\t\t\tinside: {\n\t\t\t\t\t\t'variable': /^\\$\\(|^`|\\)$|`$/\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t// [2]: Brace expansion\n\t\t\t\t{\n\t\t\t\t\tpattern: /\\$\\{[^}]+\\}/,\n\t\t\t\t\tgreedy: true,\n\t\t\t\t\tinside: {\n\t\t\t\t\t\t'operator': /:[-=?+]?|[!\\/]|##?|%%?|\\^\\^?|,,?/,\n\t\t\t\t\t\t'punctuation': /[\\[\\]]/,\n\t\t\t\t\t\t'environment': {\n\t\t\t\t\t\t\tpattern: RegExp('(\\\\{)' + envVars),\n\t\t\t\t\t\t\tlookbehind: true,\n\t\t\t\t\t\t\talias: 'constant'\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t/\\$(?:\\w+|[#?*!@$])/\n\t\t\t],\n\t\t\t// Escape sequences from echo and printf's manuals, and escaped quotes.\n\t\t\t'entity': /\\\\(?:[abceEfnrtv\\\\\"]|O?[0-7]{1,3}|U[0-9a-fA-F]{8}|u[0-9a-fA-F]{4}|x[0-9a-fA-F]{1,2})/\n\t\t};\n\n\t\tPrism.languages.bash = {\n\t\t\t'shebang': {\n\t\t\t\tpattern: /^#!\\s*\\/.*/,\n\t\t\t\talias: 'important'\n\t\t\t},\n\t\t\t'comment': {\n\t\t\t\tpattern: /(^|[^\"{\\\\$])#.*/,\n\t\t\t\tlookbehind: true\n\t\t\t},\n\t\t\t'function-name': [\n\t\t\t\t// a) function foo {\n\t\t\t\t// b) foo() {\n\t\t\t\t// c) function foo() {\n\t\t\t\t// but not “foo {”\n\t\t\t\t{\n\t\t\t\t\t// a) and c)\n\t\t\t\t\tpattern: /(\\bfunction\\s+)[\\w-]+(?=(?:\\s*\\(?:\\s*\\))?\\s*\\{)/,\n\t\t\t\t\tlookbehind: true,\n\t\t\t\t\talias: 'function'\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t// b)\n\t\t\t\t\tpattern: /\\b[\\w-]+(?=\\s*\\(\\s*\\)\\s*\\{)/,\n\t\t\t\t\talias: 'function'\n\t\t\t\t}\n\t\t\t],\n\t\t\t// Highlight variable names as variables in for and select beginnings.\n\t\t\t'for-or-select': {\n\t\t\t\tpattern: /(\\b(?:for|select)\\s+)\\w+(?=\\s+in\\s)/,\n\t\t\t\talias: 'variable',\n\t\t\t\tlookbehind: true\n\t\t\t},\n\t\t\t// Highlight variable names as variables in the left-hand part\n\t\t\t// of assignments (“=” and “+=”).\n\t\t\t'assign-left': {\n\t\t\t\tpattern: /(^|[\\s;|&]|[<>]\\()\\w+(?=\\+?=)/,\n\t\t\t\tinside: {\n\t\t\t\t\t'environment': {\n\t\t\t\t\t\tpattern: RegExp('(^|[\\\\s;|&]|[<>]\\\\()' + envVars),\n\t\t\t\t\t\tlookbehind: true,\n\t\t\t\t\t\talias: 'constant'\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\talias: 'variable',\n\t\t\t\tlookbehind: true\n\t\t\t},\n\t\t\t'string': [\n\t\t\t\t// Support for Here-documents https://en.wikipedia.org/wiki/Here_document\n\t\t\t\t{\n\t\t\t\t\tpattern: /((?:^|[^<])<<-?\\s*)(\\w+)\\s[\\s\\S]*?(?:\\r?\\n|\\r)\\2/,\n\t\t\t\t\tlookbehind: true,\n\t\t\t\t\tgreedy: true,\n\t\t\t\t\tinside: insideString\n\t\t\t\t},\n\t\t\t\t// Here-document with quotes around the tag\n\t\t\t\t// → No expansion (so no “inside”).\n\t\t\t\t{\n\t\t\t\t\tpattern: /((?:^|[^<])<<-?\\s*)([\"'])(\\w+)\\2\\s[\\s\\S]*?(?:\\r?\\n|\\r)\\3/,\n\t\t\t\t\tlookbehind: true,\n\t\t\t\t\tgreedy: true,\n\t\t\t\t\tinside: {\n\t\t\t\t\t\t'bash': commandAfterHeredoc\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t// “Normal” string\n\t\t\t\t{\n\t\t\t\t\t// https://www.gnu.org/software/bash/manual/html_node/Double-Quotes.html\n\t\t\t\t\tpattern: /(^|[^\\\\](?:\\\\\\\\)*)\"(?:\\\\[\\s\\S]|\\$\\([^)]+\\)|\\$(?!\\()|`[^`]+`|[^\"\\\\`$])*\"/,\n\t\t\t\t\tlookbehind: true,\n\t\t\t\t\tgreedy: true,\n\t\t\t\t\tinside: insideString\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t// https://www.gnu.org/software/bash/manual/html_node/Single-Quotes.html\n\t\t\t\t\tpattern: /(^|[^$\\\\])'[^']*'/,\n\t\t\t\t\tlookbehind: true,\n\t\t\t\t\tgreedy: true\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t// https://www.gnu.org/software/bash/manual/html_node/ANSI_002dC-Quoting.html\n\t\t\t\t\tpattern: /\\$'(?:[^'\\\\]|\\\\[\\s\\S])*'/,\n\t\t\t\t\tgreedy: true,\n\t\t\t\t\tinside: {\n\t\t\t\t\t\t'entity': insideString.entity\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t],\n\t\t\t'environment': {\n\t\t\t\tpattern: RegExp('\\\\$?' + envVars),\n\t\t\t\talias: 'constant'\n\t\t\t},\n\t\t\t'variable': insideString.variable,\n\t\t\t'function': {\n\t\t\t\tpattern: /(^|[\\s;|&]|[<>]\\()(?:add|apropos|apt|apt-cache|apt-get|aptitude|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|bzip2|cal|cat|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|column|comm|composer|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|docker|docker-compose|du|egrep|eject|env|ethtool|expand|expect|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|head|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|jobs|join|kill|killall|less|link|ln|locate|logname|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|node|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|pnpm|podman|podman-compose|popd|pr|printcap|printenv|ps|pushd|pv|quota|quotacheck|quotactl|ram|rar|rcp|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|sh|shellcheck|shuf|shutdown|sleep|slocate|sort|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|tac|tail|tar|tee|time|timeout|top|touch|tr|traceroute|tsort|tty|umount|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|v|vcpkg|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zenity|zip|zsh|zypper)(?=$|[)\\s;|&])/,\n\t\t\t\tlookbehind: true\n\t\t\t},\n\t\t\t'keyword': {\n\t\t\t\tpattern: /(^|[\\s;|&]|[<>]\\()(?:case|do|done|elif|else|esac|fi|for|function|if|in|select|then|until|while)(?=$|[)\\s;|&])/,\n\t\t\t\tlookbehind: true\n\t\t\t},\n\t\t\t// https://www.gnu.org/software/bash/manual/html_node/Shell-Builtin-Commands.html\n\t\t\t'builtin': {\n\t\t\t\tpattern: /(^|[\\s;|&]|[<>]\\()(?:\\.|:|alias|bind|break|builtin|caller|cd|command|continue|declare|echo|enable|eval|exec|exit|export|getopts|hash|help|let|local|logout|mapfile|printf|pwd|read|readarray|readonly|return|set|shift|shopt|source|test|times|trap|type|typeset|ulimit|umask|unalias|unset)(?=$|[)\\s;|&])/,\n\t\t\t\tlookbehind: true,\n\t\t\t\t// Alias added to make those easier to distinguish from strings.\n\t\t\t\talias: 'class-name'\n\t\t\t},\n\t\t\t'boolean': {\n\t\t\t\tpattern: /(^|[\\s;|&]|[<>]\\()(?:false|true)(?=$|[)\\s;|&])/,\n\t\t\t\tlookbehind: true\n\t\t\t},\n\t\t\t'file-descriptor': {\n\t\t\t\tpattern: /\\B&\\d\\b/,\n\t\t\t\talias: 'important'\n\t\t\t},\n\t\t\t'operator': {\n\t\t\t\t// Lots of redirections here, but not just that.\n\t\t\t\tpattern: /\\d?<>|>\\||\\+=|=[=~]?|!=?|<<[<-]?|[&\\d]?>>|\\d[<>]&?|[<>][&=]?|&[>&]?|\\|[&|]?/,\n\t\t\t\tinside: {\n\t\t\t\t\t'file-descriptor': {\n\t\t\t\t\t\tpattern: /^\\d/,\n\t\t\t\t\t\talias: 'important'\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\t\t\t'punctuation': /\\$?\\(\\(?|\\)\\)?|\\.\\.|[{}[\\];\\\\]/,\n\t\t\t'number': {\n\t\t\t\tpattern: /(^|\\s)(?:[1-9]\\d*|0)(?:[.,]\\d+)?\\b/,\n\t\t\t\tlookbehind: true\n\t\t\t}\n\t\t};\n\n\t\tcommandAfterHeredoc.inside = Prism.languages.bash;\n\n\t\t/* Patterns in command substitution. */\n\t\tvar toBeCopied = [\n\t\t\t'comment',\n\t\t\t'function-name',\n\t\t\t'for-or-select',\n\t\t\t'assign-left',\n\t\t\t'string',\n\t\t\t'environment',\n\t\t\t'function',\n\t\t\t'keyword',\n\t\t\t'builtin',\n\t\t\t'boolean',\n\t\t\t'file-descriptor',\n\t\t\t'operator',\n\t\t\t'punctuation',\n\t\t\t'number'\n\t\t];\n\t\tvar inside = insideString.variable[1].inside;\n\t\tfor (var i = 0; i < toBeCopied.length; i++) {\n\t\t\tinside[toBeCopied[i]] = Prism.languages.bash[toBeCopied[i]];\n\t\t}\n\n\t\tPrism.languages.shell = Prism.languages.bash;\n\t}(Prism));\n\n\tPrism.languages.swift = {\n\t\t'comment': {\n\t\t\t// Nested comments are supported up to 2 levels\n\t\t\tpattern: /(^|[^\\\\:])(?:\\/\\/.*|\\/\\*(?:[^/*]|\\/(?!\\*)|\\*(?!\\/)|\\/\\*(?:[^*]|\\*(?!\\/))*\\*\\/)*\\*\\/)/,\n\t\t\tlookbehind: true,\n\t\t\tgreedy: true\n\t\t},\n\t\t'string-literal': [\n\t\t\t// https://docs.swift.org/swift-book/LanguageGuide/StringsAndCharacters.html\n\t\t\t{\n\t\t\t\tpattern: RegExp(\n\t\t\t\t\t/(^|[^\"#])/.source\n\t\t\t\t\t+ '(?:'\n\t\t\t\t\t// single-line string\n\t\t\t\t\t+ /\"(?:\\\\(?:\\((?:[^()]|\\([^()]*\\))*\\)|\\r\\n|[^(])|[^\\\\\\r\\n\"])*\"/.source\n\t\t\t\t\t+ '|'\n\t\t\t\t\t// multi-line string\n\t\t\t\t\t+ /\"\"\"(?:\\\\(?:\\((?:[^()]|\\([^()]*\\))*\\)|[^(])|[^\\\\\"]|\"(?!\"\"))*\"\"\"/.source\n\t\t\t\t\t+ ')'\n\t\t\t\t\t+ /(?![\"#])/.source\n\t\t\t\t),\n\t\t\t\tlookbehind: true,\n\t\t\t\tgreedy: true,\n\t\t\t\tinside: {\n\t\t\t\t\t'interpolation': {\n\t\t\t\t\t\tpattern: /(\\\\\\()(?:[^()]|\\([^()]*\\))*(?=\\))/,\n\t\t\t\t\t\tlookbehind: true,\n\t\t\t\t\t\tinside: null // see below\n\t\t\t\t\t},\n\t\t\t\t\t'interpolation-punctuation': {\n\t\t\t\t\t\tpattern: /^\\)|\\\\\\($/,\n\t\t\t\t\t\talias: 'punctuation'\n\t\t\t\t\t},\n\t\t\t\t\t'punctuation': /\\\\(?=[\\r\\n])/,\n\t\t\t\t\t'string': /[\\s\\S]+/\n\t\t\t\t}\n\t\t\t},\n\t\t\t{\n\t\t\t\tpattern: RegExp(\n\t\t\t\t\t/(^|[^\"#])(#+)/.source\n\t\t\t\t\t+ '(?:'\n\t\t\t\t\t// single-line string\n\t\t\t\t\t+ /\"(?:\\\\(?:#+\\((?:[^()]|\\([^()]*\\))*\\)|\\r\\n|[^#])|[^\\\\\\r\\n])*?\"/.source\n\t\t\t\t\t+ '|'\n\t\t\t\t\t// multi-line string\n\t\t\t\t\t+ /\"\"\"(?:\\\\(?:#+\\((?:[^()]|\\([^()]*\\))*\\)|[^#])|[^\\\\])*?\"\"\"/.source\n\t\t\t\t\t+ ')'\n\t\t\t\t\t+ '\\\\2'\n\t\t\t\t),\n\t\t\t\tlookbehind: true,\n\t\t\t\tgreedy: true,\n\t\t\t\tinside: {\n\t\t\t\t\t'interpolation': {\n\t\t\t\t\t\tpattern: /(\\\\#+\\()(?:[^()]|\\([^()]*\\))*(?=\\))/,\n\t\t\t\t\t\tlookbehind: true,\n\t\t\t\t\t\tinside: null // see below\n\t\t\t\t\t},\n\t\t\t\t\t'interpolation-punctuation': {\n\t\t\t\t\t\tpattern: /^\\)|\\\\#+\\($/,\n\t\t\t\t\t\talias: 'punctuation'\n\t\t\t\t\t},\n\t\t\t\t\t'string': /[\\s\\S]+/\n\t\t\t\t}\n\t\t\t},\n\t\t],\n\n\t\t'directive': {\n\t\t\t// directives with conditions\n\t\t\tpattern: RegExp(\n\t\t\t\t/#/.source\n\t\t\t\t+ '(?:'\n\t\t\t\t+ (\n\t\t\t\t\t/(?:elseif|if)\\b/.source\n\t\t\t\t\t+ '(?:[ \\t]*'\n\t\t\t\t\t// This regex is a little complex. It's equivalent to this:\n\t\t\t\t\t//   (?:![ \\t]*)?(?:\\b\\w+\\b(?:[ \\t]*<round>)?|<round>)(?:[ \\t]*(?:&&|\\|\\|))?\n\t\t\t\t\t// where <round> is a general parentheses expression.\n\t\t\t\t\t+ /(?:![ \\t]*)?(?:\\b\\w+\\b(?:[ \\t]*\\((?:[^()]|\\([^()]*\\))*\\))?|\\((?:[^()]|\\([^()]*\\))*\\))(?:[ \\t]*(?:&&|\\|\\|))?/.source\n\t\t\t\t\t+ ')+'\n\t\t\t\t)\n\t\t\t\t+ '|'\n\t\t\t\t+ /(?:else|endif)\\b/.source\n\t\t\t\t+ ')'\n\t\t\t),\n\t\t\talias: 'property',\n\t\t\tinside: {\n\t\t\t\t'directive-name': /^#\\w+/,\n\t\t\t\t'boolean': /\\b(?:false|true)\\b/,\n\t\t\t\t'number': /\\b\\d+(?:\\.\\d+)*\\b/,\n\t\t\t\t'operator': /!|&&|\\|\\||[<>]=?/,\n\t\t\t\t'punctuation': /[(),]/\n\t\t\t}\n\t\t},\n\t\t'literal': {\n\t\t\tpattern: /#(?:colorLiteral|column|dsohandle|file(?:ID|Literal|Path)?|function|imageLiteral|line)\\b/,\n\t\t\talias: 'constant'\n\t\t},\n\t\t'other-directive': {\n\t\t\tpattern: /#\\w+\\b/,\n\t\t\talias: 'property'\n\t\t},\n\n\t\t'attribute': {\n\t\t\tpattern: /@\\w+/,\n\t\t\talias: 'atrule'\n\t\t},\n\n\t\t'function-definition': {\n\t\t\tpattern: /(\\bfunc\\s+)\\w+/,\n\t\t\tlookbehind: true,\n\t\t\talias: 'function'\n\t\t},\n\t\t'label': {\n\t\t\t// https://docs.swift.org/swift-book/LanguageGuide/ControlFlow.html#ID141\n\t\t\tpattern: /\\b(break|continue)\\s+\\w+|\\b[a-zA-Z_]\\w*(?=\\s*:\\s*(?:for|repeat|while)\\b)/,\n\t\t\tlookbehind: true,\n\t\t\talias: 'important'\n\t\t},\n\n\t\t'keyword': /\\b(?:Any|Protocol|Self|Type|actor|as|assignment|associatedtype|associativity|async|await|break|case|catch|class|continue|convenience|default|defer|deinit|didSet|do|dynamic|else|enum|extension|fallthrough|fileprivate|final|for|func|get|guard|higherThan|if|import|in|indirect|infix|init|inout|internal|is|isolated|lazy|left|let|lowerThan|mutating|none|nonisolated|nonmutating|open|operator|optional|override|postfix|precedencegroup|prefix|private|protocol|public|repeat|required|rethrows|return|right|safe|self|set|some|static|struct|subscript|super|switch|throw|throws|try|typealias|unowned|unsafe|var|weak|where|while|willSet)\\b/,\n\t\t'boolean': /\\b(?:false|true)\\b/,\n\t\t'nil': {\n\t\t\tpattern: /\\bnil\\b/,\n\t\t\talias: 'constant'\n\t\t},\n\n\t\t'short-argument': /\\$\\d+\\b/,\n\t\t'omit': {\n\t\t\tpattern: /\\b_\\b/,\n\t\t\talias: 'keyword'\n\t\t},\n\t\t'number': /\\b(?:[\\d_]+(?:\\.[\\de_]+)?|0x[a-f0-9_]+(?:\\.[a-f0-9p_]+)?|0b[01_]+|0o[0-7_]+)\\b/i,\n\n\t\t// A class name must start with an upper-case letter and be either 1 letter long or contain a lower-case letter.\n\t\t'class-name': /\\b[A-Z](?:[A-Z_\\d]*[a-z]\\w*)?\\b/,\n\t\t'function': /\\b[a-z_]\\w*(?=\\s*\\()/i,\n\t\t'constant': /\\b(?:[A-Z_]{2,}|k[A-Z][A-Za-z_]+)\\b/,\n\n\t\t// Operators are generic in Swift. Developers can even create new operators (e.g. +++).\n\t\t// https://docs.swift.org/swift-book/ReferenceManual/zzSummaryOfTheGrammar.html#ID481\n\t\t// This regex only supports ASCII operators.\n\t\t'operator': /[-+*/%=!<>&|^~?]+|\\.[.\\-+*/%=!<>&|^~?]+/,\n\t\t'punctuation': /[{}[\\]();,.:\\\\]/\n\t};\n\n\tPrism.languages.swift['string-literal'].forEach(function (rule) {\n\t\trule.inside['interpolation'].inside = Prism.languages.swift;\n\t});\n\n\tPrism.languages['visual-basic'] = {\n\t\t'comment': {\n\t\t\tpattern: /(?:['‘’]|REM\\b)(?:[^\\r\\n_]|_(?:\\r\\n?|\\n)?)*/i,\n\t\t\tinside: {\n\t\t\t\t'keyword': /^REM/i\n\t\t\t}\n\t\t},\n\t\t'directive': {\n\t\t\tpattern: /#(?:Const|Else|ElseIf|End|ExternalChecksum|ExternalSource|If|Region)(?:\\b_[ \\t]*(?:\\r\\n?|\\n)|.)+/i,\n\t\t\talias: 'property',\n\t\t\tgreedy: true\n\t\t},\n\t\t'string': {\n\t\t\tpattern: /\\$?[\"“”](?:[\"“”]{2}|[^\"“”])*[\"“”]C?/i,\n\t\t\tgreedy: true\n\t\t},\n\t\t'date': {\n\t\t\tpattern: /#[ \\t]*(?:\\d+([/-])\\d+\\1\\d+(?:[ \\t]+(?:\\d+[ \\t]*(?:AM|PM)|\\d+:\\d+(?::\\d+)?(?:[ \\t]*(?:AM|PM))?))?|\\d+[ \\t]*(?:AM|PM)|\\d+:\\d+(?::\\d+)?(?:[ \\t]*(?:AM|PM))?)[ \\t]*#/i,\n\t\t\talias: 'number'\n\t\t},\n\t\t'number': /(?:(?:\\b\\d+(?:\\.\\d+)?|\\.\\d+)(?:E[+-]?\\d+)?|&[HO][\\dA-F]+)(?:[FRD]|U?[ILS])?/i,\n\t\t'boolean': /\\b(?:False|Nothing|True)\\b/i,\n\t\t'keyword': /\\b(?:AddHandler|AddressOf|Alias|And(?:Also)?|As|Boolean|ByRef|Byte|ByVal|Call|Case|Catch|C(?:Bool|Byte|Char|Date|Dbl|Dec|Int|Lng|Obj|SByte|Short|Sng|Str|Type|UInt|ULng|UShort)|Char|Class|Const|Continue|Currency|Date|Decimal|Declare|Default|Delegate|Dim|DirectCast|Do|Double|Each|Else(?:If)?|End(?:If)?|Enum|Erase|Error|Event|Exit|Finally|For|Friend|Function|Get(?:Type|XMLNamespace)?|Global|GoSub|GoTo|Handles|If|Implements|Imports|In|Inherits|Integer|Interface|Is|IsNot|Let|Lib|Like|Long|Loop|Me|Mod|Module|Must(?:Inherit|Override)|My(?:Base|Class)|Namespace|Narrowing|New|Next|Not(?:Inheritable|Overridable)?|Object|Of|On|Operator|Option(?:al)?|Or(?:Else)?|Out|Overloads|Overridable|Overrides|ParamArray|Partial|Private|Property|Protected|Public|RaiseEvent|ReadOnly|ReDim|RemoveHandler|Resume|Return|SByte|Select|Set|Shadows|Shared|short|Single|Static|Step|Stop|String|Structure|Sub|SyncLock|Then|Throw|To|Try|TryCast|Type|TypeOf|U(?:Integer|Long|Short)|Until|Using|Variant|Wend|When|While|Widening|With(?:Events)?|WriteOnly|Xor)\\b/i,\n\t\t'operator': /[+\\-*/\\\\^<=>&#@$%!]|\\b_(?=[ \\t]*[\\r\\n])/,\n\t\t'punctuation': /[{}().,:?]/\n\t};\n\n\tPrism.languages.vb = Prism.languages['visual-basic'];\n\tPrism.languages.vba = Prism.languages['visual-basic'];\n\n\tPrism.languages.wasm = {\n\t\t'comment': [\n\t\t\t/\\(;[\\s\\S]*?;\\)/,\n\t\t\t{\n\t\t\t\tpattern: /;;.*/,\n\t\t\t\tgreedy: true\n\t\t\t}\n\t\t],\n\t\t'string': {\n\t\t\tpattern: /\"(?:\\\\[\\s\\S]|[^\"\\\\])*\"/,\n\t\t\tgreedy: true\n\t\t},\n\t\t'keyword': [\n\t\t\t{\n\t\t\t\tpattern: /\\b(?:align|offset)=/,\n\t\t\t\tinside: {\n\t\t\t\t\t'operator': /=/\n\t\t\t\t}\n\t\t\t},\n\t\t\t{\n\t\t\t\tpattern: /\\b(?:(?:f32|f64|i32|i64)(?:\\.(?:abs|add|and|ceil|clz|const|convert_[su]\\/i(?:32|64)|copysign|ctz|demote\\/f64|div(?:_[su])?|eqz?|extend_[su]\\/i32|floor|ge(?:_[su])?|gt(?:_[su])?|le(?:_[su])?|load(?:(?:8|16|32)_[su])?|lt(?:_[su])?|max|min|mul|neg?|nearest|or|popcnt|promote\\/f32|reinterpret\\/[fi](?:32|64)|rem_[su]|rot[lr]|shl|shr_[su]|sqrt|store(?:8|16|32)?|sub|trunc(?:_[su]\\/f(?:32|64))?|wrap\\/i64|xor))?|memory\\.(?:grow|size))\\b/,\n\t\t\t\tinside: {\n\t\t\t\t\t'punctuation': /\\./\n\t\t\t\t}\n\t\t\t},\n\t\t\t/\\b(?:anyfunc|block|br(?:_if|_table)?|call(?:_indirect)?|data|drop|elem|else|end|export|func|get_(?:global|local)|global|if|import|local|loop|memory|module|mut|nop|offset|param|result|return|select|set_(?:global|local)|start|table|tee_local|then|type|unreachable)\\b/\n\t\t],\n\t\t'variable': /\\$[\\w!#$%&'*+\\-./:<=>?@\\\\^`|~]+/,\n\t\t'number': /[+-]?\\b(?:\\d(?:_?\\d)*(?:\\.\\d(?:_?\\d)*)?(?:[eE][+-]?\\d(?:_?\\d)*)?|0x[\\da-fA-F](?:_?[\\da-fA-F])*(?:\\.[\\da-fA-F](?:_?[\\da-fA-D])*)?(?:[pP][+-]?\\d(?:_?\\d)*)?)\\b|\\binf\\b|\\bnan(?::0x[\\da-fA-F](?:_?[\\da-fA-D])*)?\\b/,\n\t\t'punctuation': /[()]/\n\t};\n\n\t// 预览区域代码块可切换语言功能: https://github.com/Tencent/cherry-markdown/issues/433;\n\tvar CODE_PREVIEWER_LANG_SELECT_CLASS_NAME = 'cherry-code-preview-lang-select';\n\t/**\n\t * 生成preview区域的代码语言设置区域\n\t */\n\n\tvar getCodePreviewLangSelectElement = function getCodePreviewLangSelectElement(lang) {\n\t  var optionsElement = map$3(codePreviewLangSelectList).call(codePreviewLangSelectList, function (item) {\n\t    var _context2;\n\n\t    if (lang === item) {\n\t      var _context;\n\n\t      return concat$5(_context = \"<option value=\\\"\".concat(item, \"\\\" selected=\\\"selected\\\">\")).call(_context, item, \"</option>\");\n\t    }\n\n\t    return concat$5(_context2 = \"<option value=\\\"\".concat(item, \"\\\">\")).call(_context2, item, \"</option>\");\n\t  });\n\n\t  return \"<select id=\\\"code-preview-lang-select\\\"  style=\\\"display:none;\\\" class=\\\"\".concat(CODE_PREVIEWER_LANG_SELECT_CLASS_NAME, \"\\\">\\n      <option value=\\\"\\\" selected disabled hidden>Choose here</option>\\n      \").concat(optionsElement.join(''), \"\\n    </select>\");\n\t}; // program language list:\n\n\tvar codePreviewLangSelectList = ['javascript', 'typescript', 'html', 'css', 'shell', 'python', 'golang', 'java', 'c', 'c++', 'c#', 'php', 'ruby', 'swift', 'kotlin', 'scala', 'rust', 'dart', 'elixir', 'haskell', 'lua', 'perl', 'r', 'sql'];\n\n\tfunction ownKeys$3(object, enumerableOnly) { var keys = keys$3(object); if (getOwnPropertySymbols$2) { var symbols = getOwnPropertySymbols$2(object); enumerableOnly && (symbols = filter$3(symbols).call(symbols, function (sym) { return getOwnPropertyDescriptor$3(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\n\n\tfunction _objectSpread$2(target) { for (var i = 1; i < arguments.length; i++) { var _context22, _context23; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? forEach$3(_context22 = ownKeys$3(Object(source), !0)).call(_context22, function (key) { _defineProperty(target, key, source[key]); }) : getOwnPropertyDescriptors$2 ? defineProperties$2(target, getOwnPropertyDescriptors$2(source)) : forEach$3(_context23 = ownKeys$3(Object(source))).call(_context23, function (key) { defineProperty$5(target, key, getOwnPropertyDescriptor$3(source, key)); }); } return target; }\n\n\tfunction _createSuper$8(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$8(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = construct$4(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\n\tfunction _isNativeReflectConstruct$8() { if (typeof Reflect === \"undefined\" || !construct$4) return false; if (construct$4.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(construct$4(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\tprismCore.manual = true;\n\tvar CUSTOM_WRAPPER = {\n\t  figure: 'figure'\n\t};\n\n\tvar CodeBlock = /*#__PURE__*/function (_ParagraphBase) {\n\t  _inherits(CodeBlock, _ParagraphBase);\n\n\t  var _super = _createSuper$8(CodeBlock);\n\n\t  function CodeBlock(_ref) {\n\t    var _this;\n\n\t    var externals = _ref.externals,\n\t        config = _ref.config;\n\n\t    _classCallCheck(this, CodeBlock);\n\n\t    _this = _super.call(this, {\n\t      needCache: true\n\t    });\n\t    CodeBlock.inlineCodeCache = {};\n\t    _this.codeCache = {};\n\t    _this.customLang = [];\n\t    _this.customParser = {};\n\t    _this.wrap = config.wrap; // 超出是否换行\n\n\t    _this.lineNumber = config.lineNumber; // 是否显示行号\n\n\t    _this.copyCode = config.copyCode; // 是否显示“复制”按钮\n\n\t    _this.mermaid = config.mermaid; // mermaid的配置，目前仅支持格式设置，svg2img=true 展示成图片，false 展示成svg\n\n\t    _this.indentedCodeBlock = typeof config.indentedCodeBlock === 'undefined' ? true : config.indentedCodeBlock; // 是否支持缩进代码块\n\n\t    _this.INLINE_CODE_REGEX = /(`+)(.+?(?:\\n.+?)*?)\\1/g;\n\n\t    if (config && config.customRenderer) {\n\t      var _context;\n\n\t      _this.customLang = map$3(_context = keys$3(config.customRenderer)).call(_context, function (lang) {\n\t        return lang.toLowerCase();\n\t      });\n\t      _this.customParser = _objectSpread$2({}, config.customRenderer);\n\t    }\n\n\t    _this.customHighlighter = config.highlighter;\n\t    return _this;\n\t  }\n\n\t  _createClass(CodeBlock, [{\n\t    key: \"$codeCache\",\n\t    value: function $codeCache(sign, str) {\n\t      if (sign && str) {\n\t        this.codeCache[sign] = str;\n\t      }\n\n\t      if (this.codeCache[sign]) {\n\t        return this.codeCache[sign];\n\t      }\n\n\t      if (this.codeCache.length > 40) {\n\t        this.codeCache.length = 0;\n\t      }\n\n\t      return false;\n\t    } // 渲染特定语言代码块\n\n\t  }, {\n\t    key: \"parseCustomLanguage\",\n\t    value: function parseCustomLanguage(lang, codeSrc, props) {\n\t      var _context2, _context3, _context4, _context5, _context6;\n\n\t      var engine = this.customParser[lang];\n\n\t      if (!engine || typeof engine.render !== 'function') {\n\t        return false;\n\t      }\n\n\t      var html = engine.render(codeSrc, props.sign, this.$engine, this.mermaid);\n\n\t      if (!html) {\n\t        return false;\n\t      }\n\n\t      var tag = CUSTOM_WRAPPER[engine.constructor.TYPE] || 'div';\n\t      return concat$5(_context2 = concat$5(_context3 = concat$5(_context4 = concat$5(_context5 = concat$5(_context6 = \"<\".concat(tag, \" data-sign=\\\"\")).call(_context6, props.sign, \"\\\" data-type=\\\"\")).call(_context5, lang, \"\\\" data-lines=\\\"\")).call(_context4, props.lines, \"\\\">\")).call(_context3, html, \"</\")).call(_context2, tag, \">\");\n\t    } // 修复渲染行号时打散的标签\n\n\t  }, {\n\t    key: \"fillTag\",\n\t    value: function fillTag(lines) {\n\t      var tagStack = []; // 存储未闭合标签\n\n\t      return map$3(lines).call(lines, function (rawLine) {\n\t        if (!rawLine) return '';\n\t        var line = rawLine; // 补全上一行未闭合标签\n\n\t        while (tagStack.length) {\n\t          var _context7;\n\n\t          var tag = tagStack.pop();\n\t          line = concat$5(_context7 = \"\".concat(tag)).call(_context7, line);\n\t        } // 计算未闭合标签\n\n\n\t        var tags = line.match(/<span class=\"(.+?)\">|<\\/span>/g);\n\t        var close = 0;\n\t        if (!tags) return line;\n\n\t        while (tags.length) {\n\t          var _tag = tags.pop();\n\n\t          if (/<\\/span>/.test(_tag)) close += 1;else if (!close) {\n\t            tagStack.unshift(_tag.match(/<span class=\"(.+?)\">/)[0]);\n\t          } else {\n\t            close -= 1;\n\t          }\n\t        } // 补全未闭合标签\n\n\n\t        for (var i = 0; i < tagStack.length; i++) {\n\t          line = \"\".concat(line, \"</span>\");\n\t        }\n\n\t        return line;\n\t      });\n\t    } // 渲染行号\n\n\t  }, {\n\t    key: \"renderLineNumber\",\n\t    value: function renderLineNumber(code) {\n\t      if (!this.lineNumber) return code;\n\t      var codeLines = code.split('\\n');\n\t      codeLines.pop(); // 末尾回车不增加行号\n\n\t      codeLines = this.fillTag(codeLines);\n\t      return \"<span class=\\\"code-line\\\">\".concat(codeLines.join('</span>\\n<span class=\"code-line\">'), \"</span>\");\n\t    }\n\t    /**\n\t     * 判断内置转换语法是否被覆盖\n\t     * @param {string} lang\n\t     */\n\n\t  }, {\n\t    key: \"isInternalCustomLangCovered\",\n\t    value: function isInternalCustomLangCovered(lang) {\n\t      var _context8;\n\n\t      return indexOf$8(_context8 = this.customLang).call(_context8, lang) !== -1;\n\t    }\n\t    /**\n\t     * 预处理代码块\n\t     * @param {string} match\n\t     * @param {string} leadingContent\n\t     * @param {string} code\n\t     */\n\n\t  }, {\n\t    key: \"computeLines\",\n\t    value: function computeLines(match, leadingContent, code) {\n\t      var leadingSpaces = leadingContent;\n\t      var lines = this.getLineCount(match, leadingSpaces);\n\t      var sign = this.$engine.md5(match.replace(/^\\n+/, '') + lines);\n\t      return {\n\t        sign: sign,\n\t        lines: lines\n\t      };\n\t    }\n\t    /**\n\t     * 补齐用codeBlock承载的mermaid\n\t     * @param {string} $code\n\t     * @param {string} $lang\n\t     */\n\n\t  }, {\n\t    key: \"appendMermaid\",\n\t    value: function appendMermaid($code, $lang) {\n\t      var code = $code,\n\t          lang = $lang; // 临时实现流程图、时序图缩略写法\n\n\t      if (/^flow([ ](TD|LR))?$/i.test(lang) && !this.isInternalCustomLangCovered(lang)) {\n\t        var _context9;\n\n\t        var suffix = lang.match(/^flow(?:[ ](TD|LR))?$/i) || [];\n\t        code = concat$5(_context9 = \"graph \".concat(suffix[1] || 'TD', \"\\n\")).call(_context9, code);\n\t        lang = 'mermaid';\n\t      }\n\n\t      if (/^seq$/i.test(lang) && !this.isInternalCustomLangCovered(lang)) {\n\t        code = \"sequenceDiagram\\n\".concat(code);\n\t        lang = 'mermaid';\n\t      }\n\n\t      if (lang === 'mermaid') {\n\t        // 8.4.8版本兼容8.5.2版本的语法\n\t        code = code.replace(/(^[\\s]*)stateDiagram-v2\\n/, '$1stateDiagram\\n'); // code = code.replace(/(^[\\s]*)sequenceDiagram[ \\t]*\\n[\\s]*autonumber[ \\t]*\\n/, '$1sequenceDiagram\\n');\n\t      }\n\n\t      return [code, lang];\n\t    }\n\t    /**\n\t     * 包裹代码块，解决单行代码超出长度\n\t     * @param {string} $code\n\t     * @param {string} lang\n\t     */\n\n\t  }, {\n\t    key: \"wrapCode\",\n\t    value: function wrapCode($code, lang) {\n\t      var _context10, _context11;\n\n\t      return concat$5(_context10 = concat$5(_context11 = \"<code class=\\\"language-\".concat(lang)).call(_context11, this.wrap ? ' wrap' : '', \"\\\">\")).call(_context10, $code, \"</code>\");\n\t    }\n\t    /**\n\t     * 使用渲染引擎处理代码块\n\t     * @param {string} $code\n\t     * @param {string} $lang\n\t     * @param {string} sign\n\t     * @param {number} lines\n\t     */\n\n\t  }, {\n\t    key: \"renderCodeBlock\",\n\t    value: function renderCodeBlock($code, $lang, sign, lines) {\n\t      var _context12, _context13, _context14, _context15, _context16;\n\n\t      var cacheCode = $code;\n\t      var lang = $lang;\n\n\t      if (this.customHighlighter) {\n\t        // 平台自定义代码块样式\n\t        cacheCode = this.customHighlighter(cacheCode, lang);\n\t      } else {\n\t        // 默认使用prism渲染代码块\n\t        if (!lang || !prismCore.languages[lang]) lang = 'javascript'; // 如果没有写语言，默认用js样式渲染\n\n\t        cacheCode = prismCore.highlight(cacheCode, prismCore.languages[lang], lang);\n\t        cacheCode = this.renderLineNumber(cacheCode);\n\t      }\n\n\t      cacheCode = concat$5(_context12 = concat$5(_context13 = concat$5(_context14 = concat$5(_context15 = concat$5(_context16 = \"<div data-sign=\\\"\".concat(sign, \"\\\" data-type=\\\"codeBlock\\\" data-lines=\\\"\")).call(_context16, lines, \"\\\">\\n      \")).call(_context15, getCodePreviewLangSelectElement($lang), \"\\n      \")).call(_context14, this.copyCode ? '<div class=\"cherry-copy-code-block\" style=\"display:none;\"><i class=\"ch-icon ch-icon-copy\" title=\"copy\"></i></div>' : '', \"\\n      <pre class=\\\"language-\")).call(_context13, lang, \"\\\">\")).call(_context12, this.wrapCode(cacheCode, lang), \"</pre>\\n    </div>\");\n\t      return cacheCode;\n\t    }\n\t    /**\n\t     * 获取缩进代码块语法的正则\n\t     * 缩进代码块必须要以连续两个以上的换行符开头\n\t     */\n\n\t  }, {\n\t    key: \"$getIndentedCodeReg\",\n\t    value: function $getIndentedCodeReg() {\n\t      var ret = {\n\t        begin: '(?:^|\\\\n\\\\s*\\\\n)(?: {4}|\\\\t)',\n\t        end: '(?=$|\\\\n( {0,3}[^ \\\\t\\\\n]|\\\\n[^ \\\\t\\\\n]))',\n\t        content: '([\\\\s\\\\S]+?)'\n\t      };\n\t      return new RegExp(ret.begin + ret.content + ret.end, 'g');\n\t    }\n\t    /**\n\t     * 生成缩进代码块（没有行号、没有代码高亮）\n\t     */\n\n\t  }, {\n\t    key: \"$getIndentCodeBlock\",\n\t    value: function $getIndentCodeBlock(str) {\n\t      var _this2 = this;\n\n\t      if (!this.indentedCodeBlock) {\n\t        return str;\n\t      }\n\n\t      return this.$recoverCodeInIndent(str).replace(this.$getIndentedCodeReg(), function (match, code) {\n\t        var _context17, _context18;\n\n\t        var lineCount = (match.match(/\\n/g) || []).length;\n\n\t        var sign = _this2.$engine.md5(match);\n\n\t        var html = concat$5(_context17 = concat$5(_context18 = \"<pre data-sign=\\\"\".concat(sign, \"\\\" data-lines=\\\"\")).call(_context18, lineCount, \"\\\"><code>\")).call(_context17, escapeHTMLSpecialChar(code.replace(/\\n( {4}|\\t)/g, '\\n')), \"</code></pre>\"); // return this.getCacheWithSpace(this.pushCache(html), match, true);\n\n\n\t        return prependLineFeedForParagraph(match, _this2.pushCache(html, sign, lineCount));\n\t      });\n\t    }\n\t    /**\n\t     * 预处理缩进代码块，将缩进代码块里的高亮代码块和行内代码进行占位处理\n\t     */\n\n\t  }, {\n\t    key: \"$replaceCodeInIndent\",\n\t    value: function $replaceCodeInIndent(str) {\n\t      if (!this.indentedCodeBlock) {\n\t        return str;\n\t      }\n\n\t      return str.replace(this.$getIndentedCodeReg(), function (match) {\n\t        return match.replace(/`/g, '~~~IndentCode');\n\t      });\n\t    }\n\t    /**\n\t     * 恢复预处理的内容\n\t     */\n\n\t  }, {\n\t    key: \"$recoverCodeInIndent\",\n\t    value: function $recoverCodeInIndent(str) {\n\t      if (!this.indentedCodeBlock) {\n\t        return str;\n\t      }\n\n\t      return str.replace(this.$getIndentedCodeReg(), function (match) {\n\t        return match.replace(/~~~IndentCode/g, '`');\n\t      });\n\t    }\n\t  }, {\n\t    key: \"beforeMakeHtml\",\n\t    value: function beforeMakeHtml(str, sentenceMakeFunc, markdownParams) {\n\t      var _this3 = this;\n\n\t      var $str = str; // 预处理缩进代码块\n\n\t      $str = this.$replaceCodeInIndent($str);\n\t      $str = $str.replace(this.RULE.reg, function (match, leadingContent, leadingContentBlockQuote, begin, lang, code) {\n\t        var _leadingContent$match, _leadingContent$match2, _context20;\n\n\t        function addBlockQuoteSignToResult(result) {\n\t          if (leadingContentBlockQuote) {\n\t            var regex = new RegExp(\"^\\n*\", '');\n\t            var leadingNewline = result.match(regex)[0]; // eslint-disable-next-line no-param-reassign\n\n\t            result = leadingNewline + leadingContentBlockQuote + result.replace(regex, function (_) {\n\t              return '';\n\t            });\n\t          }\n\n\t          return result;\n\t        }\n\n\t        var $code = code;\n\n\t        var _this3$computeLines = _this3.computeLines(match, leadingContent, code),\n\t            sign = _this3$computeLines.sign,\n\t            lines = _this3$computeLines.lines; // 从缓存中获取html\n\n\n\t        var cacheCode = _this3.$codeCache(sign);\n\n\t        if (cacheCode && cacheCode !== '') {\n\t          // 别忘了把 \">\"（引用块）加回来\n\t          var _result = _this3.getCacheWithSpace(_this3.pushCache(cacheCode, sign, lines), match);\n\n\t          return addBlockQuoteSignToResult(_result);\n\t        }\n\n\t        $code = _this3.$recoverCodeInIndent($code);\n\t        $code = $code.replace(/~D/g, '$');\n\t        $code = $code.replace(/~T/g, '~');\n\t        /** 处理缩进 - start: 当首行反引号前存在多个空格缩进时，代码内容要相应去除相同数量的空格 */\n\n\t        var indentSpaces = (_leadingContent$match = leadingContent === null || leadingContent === void 0 ? void 0 : (_leadingContent$match2 = leadingContent.match(/[ ]/g)) === null || _leadingContent$match2 === void 0 ? void 0 : _leadingContent$match2.length) !== null && _leadingContent$match !== void 0 ? _leadingContent$match : 0;\n\n\t        if (indentSpaces > 0) {\n\t          var regex = new RegExp(\"(^|\\\\n)[ ]{1,\".concat(indentSpaces, \"}\"), 'g');\n\t          $code = $code.replace(regex, '$1');\n\t        }\n\t        /** 处理缩进 - end */\n\t        // 如果本代码块处于一个引用块（形如 \"> \" 或 \"> > \"）中，那么需要从代码中每一行去掉引用块的符号\n\n\n\t        if (leadingContentBlockQuote) {\n\t          var _regex = new RegExp(\"(^|\\\\n)\".concat(leadingContentBlockQuote), 'g');\n\n\t          $code = $code.replace(_regex, '$1');\n\t        } // 未命中缓存，执行渲染\n\n\n\t        var $lang = trim$3(lang).call(lang); // 如果是公式关键字，则直接返回\n\n\n\t        if (/^(math|katex|latex)$/i.test($lang) && !_this3.isInternalCustomLangCovered($lang)) {\n\t          var _context19;\n\n\t          var prefix = match.match(/^\\s*/g); // ~D为经编辑器中间转义后的$，code结尾包含结束```前的所有换行符，所以不需要补换行\n\n\t          return concat$5(_context19 = \"\".concat(prefix, \"~D~D\\n\")).call(_context19, $code, \"~D~D\"); // 提供公式语法供公式钩子解析\n\t        }\n\n\t        var _this3$appendMermaid = _this3.appendMermaid($code, $lang);\n\n\t        var _this3$appendMermaid2 = _slicedToArray(_this3$appendMermaid, 2);\n\n\t        $code = _this3$appendMermaid2[0];\n\t        $lang = _this3$appendMermaid2[1];\n\n\t        // 自定义语言渲染，可覆盖内置的自定义语言逻辑\n\t        if (indexOf$8(_context20 = _this3.customLang).call(_context20, $lang.toLowerCase()) !== -1) {\n\t          cacheCode = _this3.parseCustomLanguage($lang, $code, {\n\t            lines: lines,\n\t            sign: sign\n\t          });\n\n\t          if (cacheCode && cacheCode !== '') {\n\t            _this3.$codeCache(sign, cacheCode);\n\n\t            return _this3.getCacheWithSpace(_this3.pushCache(cacheCode, sign, lines), match);\n\t          } // 渲染出错则按正常code进行渲染\n\n\t        } // $code = this.$replaceSpecialChar($code);\n\n\n\t        $code = $code.replace(/~X/g, '\\\\`');\n\t        cacheCode = _this3.renderCodeBlock($code, $lang, sign, lines);\n\t        cacheCode = cacheCode.replace(/\\\\/g, '\\\\\\\\');\n\t        cacheCode = _this3.$codeCache(sign, cacheCode);\n\n\t        var result = _this3.getCacheWithSpace(_this3.pushCache(cacheCode, sign, lines), match);\n\n\t        return addBlockQuoteSignToResult(result);\n\t      }); // 表格里处理行内代码，让一个td里的行内代码语法生效，让跨td的行内代码语法失效\n\n\t      $str = $str.replace(getTableRule(true), function (whole) {\n\t        var _context21;\n\n\t        return map$3(_context21 = whole.split('|')).call(_context21, function (oneTd) {\n\t          return _this3.makeInlineCode(oneTd);\n\t        }).join('|').replace(/`/g, '\\\\`');\n\t      }); // 为了避免InlineCode被HtmlBlock转义，需要在这里提前缓存\n\t      // InlineBlock只需要在afterMakeHtml还原即可\n\n\t      $str = this.makeInlineCode($str); // 处理缩进代码块\n\n\t      $str = this.$getIndentCodeBlock($str);\n\t      return $str;\n\t    }\n\t  }, {\n\t    key: \"makeInlineCode\",\n\t    value: function makeInlineCode(str) {\n\t      var _this4 = this;\n\n\t      var $str = str;\n\n\t      if (this.INLINE_CODE_REGEX.test($str)) {\n\t        $str = $str.replace(/\\\\`/g, '~~not~inlineCode');\n\t        $str = $str.replace(this.INLINE_CODE_REGEX, function (match, syntax, code) {\n\t          if (trim$3(code).call(code) === '`') {\n\t            return match;\n\t          }\n\n\t          var $code = code.replace(/~~not~inlineCode/g, '\\\\`');\n\t          $code = _this4.$replaceSpecialChar($code);\n\t          $code = $code.replace(/\\\\/g, '\\\\\\\\');\n\t          var html = \"<code>\".concat(escapeHTMLSpecialChar($code), \"</code>\");\n\n\t          var sign = _this4.$engine.md5(html);\n\n\t          CodeBlock.inlineCodeCache[sign] = html;\n\t          return \"~~CODE\".concat(sign, \"$\");\n\t        });\n\t        $str = $str.replace(/~~not~inlineCode/g, '\\\\`');\n\t      }\n\n\t      return $str;\n\t    }\n\t  }, {\n\t    key: \"makeHtml\",\n\t    value: function makeHtml(str) {\n\t      return str;\n\t    }\n\t  }, {\n\t    key: \"$replaceSpecialChar\",\n\t    value: function $replaceSpecialChar(str) {\n\t      var $str = str.replace(/~Q/g, '\\\\~');\n\t      $str = $str.replace(/~Y/g, '\\\\!');\n\t      $str = $str.replace(/~Z/g, '\\\\#');\n\t      $str = $str.replace(/~&/g, '\\\\&');\n\t      $str = $str.replace(/~K/g, '\\\\/'); // $str = $str.replace(/~D/g, '$');\n\t      // $str = $str.replace(/~T/g, '~');\n\n\t      return $str;\n\t    }\n\t  }, {\n\t    key: \"rule\",\n\t    value: function rule() {\n\t      return getCodeBlockRule();\n\t    }\n\t  }, {\n\t    key: \"mounted\",\n\t    value: function mounted(dom) {// prettyPrint.prettyPrint();\n\t    }\n\t  }]);\n\n\t  return CodeBlock;\n\t}(ParagraphBase);\n\n\t_defineProperty(CodeBlock, \"HOOK_NAME\", 'codeBlock');\n\n\t_defineProperty(CodeBlock, \"inlineCodeCache\", {});\n\n\tfunction _createSuper$9(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$9(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = construct$4(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\n\tfunction _isNativeReflectConstruct$9() { if (typeof Reflect === \"undefined\" || !construct$4) return false; if (construct$4.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(construct$4(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\n\tvar InlineCode = /*#__PURE__*/function (_ParagraphBase) {\n\t  _inherits(InlineCode, _ParagraphBase);\n\n\t  var _super = _createSuper$9(InlineCode);\n\n\t  function InlineCode() {\n\t    _classCallCheck(this, InlineCode);\n\n\t    return _super.apply(this, arguments);\n\t  }\n\n\t  _createClass(InlineCode, [{\n\t    key: \"makeHtml\",\n\t    value: // constructor() {\n\t    //     super();\n\t    // }\n\t    function makeHtml(str) {\n\t      return str;\n\t    }\n\t  }, {\n\t    key: \"afterMakeHtml\",\n\t    value: function afterMakeHtml(str) {\n\t      var $str = str;\n\n\t      if (keys$3(CodeBlock.inlineCodeCache).length > 0) {\n\t        $str = $str.replace(/~~CODE([0-9a-zA-Z]+)\\$/g, function (match, sign) {\n\t          return CodeBlock.inlineCodeCache[sign];\n\t        });\n\t        CodeBlock.inlineCodeCache = {};\n\t      }\n\n\t      return $str;\n\t    }\n\t  }, {\n\t    key: \"rule\",\n\t    value: function rule() {\n\t      var ret = {\n\t        begin: '(`+)[ ]*',\n\t        end: '[ ]*\\\\1',\n\t        content: '(.+?(?:\\\\n.+?)*?)'\n\t      };\n\t      ret.reg = compileRegExp(ret, 'g');\n\t      return ret;\n\t    }\n\t  }]);\n\n\t  return InlineCode;\n\t}(ParagraphBase);\n\n\t_defineProperty(InlineCode, \"HOOK_NAME\", 'inlineCode');\n\n\tvar crypt = createCommonjsModule(function (module) {\n\t(function() {\n\t  var base64map\n\t      = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/',\n\n\t  crypt = {\n\t    // Bit-wise rotation left\n\t    rotl: function(n, b) {\n\t      return (n << b) | (n >>> (32 - b));\n\t    },\n\n\t    // Bit-wise rotation right\n\t    rotr: function(n, b) {\n\t      return (n << (32 - b)) | (n >>> b);\n\t    },\n\n\t    // Swap big-endian to little-endian and vice versa\n\t    endian: function(n) {\n\t      // If number given, swap endian\n\t      if (n.constructor == Number) {\n\t        return crypt.rotl(n, 8) & 0x00FF00FF | crypt.rotl(n, 24) & 0xFF00FF00;\n\t      }\n\n\t      // Else, assume array and swap all items\n\t      for (var i = 0; i < n.length; i++)\n\t        n[i] = crypt.endian(n[i]);\n\t      return n;\n\t    },\n\n\t    // Generate an array of any length of random bytes\n\t    randomBytes: function(n) {\n\t      for (var bytes = []; n > 0; n--)\n\t        bytes.push(Math.floor(Math.random() * 256));\n\t      return bytes;\n\t    },\n\n\t    // Convert a byte array to big-endian 32-bit words\n\t    bytesToWords: function(bytes) {\n\t      for (var words = [], i = 0, b = 0; i < bytes.length; i++, b += 8)\n\t        words[b >>> 5] |= bytes[i] << (24 - b % 32);\n\t      return words;\n\t    },\n\n\t    // Convert big-endian 32-bit words to a byte array\n\t    wordsToBytes: function(words) {\n\t      for (var bytes = [], b = 0; b < words.length * 32; b += 8)\n\t        bytes.push((words[b >>> 5] >>> (24 - b % 32)) & 0xFF);\n\t      return bytes;\n\t    },\n\n\t    // Convert a byte array to a hex string\n\t    bytesToHex: function(bytes) {\n\t      for (var hex = [], i = 0; i < bytes.length; i++) {\n\t        hex.push((bytes[i] >>> 4).toString(16));\n\t        hex.push((bytes[i] & 0xF).toString(16));\n\t      }\n\t      return hex.join('');\n\t    },\n\n\t    // Convert a hex string to a byte array\n\t    hexToBytes: function(hex) {\n\t      for (var bytes = [], c = 0; c < hex.length; c += 2)\n\t        bytes.push(parseInt(hex.substr(c, 2), 16));\n\t      return bytes;\n\t    },\n\n\t    // Convert a byte array to a base-64 string\n\t    bytesToBase64: function(bytes) {\n\t      for (var base64 = [], i = 0; i < bytes.length; i += 3) {\n\t        var triplet = (bytes[i] << 16) | (bytes[i + 1] << 8) | bytes[i + 2];\n\t        for (var j = 0; j < 4; j++)\n\t          if (i * 8 + j * 6 <= bytes.length * 8)\n\t            base64.push(base64map.charAt((triplet >>> 6 * (3 - j)) & 0x3F));\n\t          else\n\t            base64.push('=');\n\t      }\n\t      return base64.join('');\n\t    },\n\n\t    // Convert a base-64 string to a byte array\n\t    base64ToBytes: function(base64) {\n\t      // Remove non-base-64 characters\n\t      base64 = base64.replace(/[^A-Z0-9+\\/]/ig, '');\n\n\t      for (var bytes = [], i = 0, imod4 = 0; i < base64.length;\n\t          imod4 = ++i % 4) {\n\t        if (imod4 == 0) continue;\n\t        bytes.push(((base64map.indexOf(base64.charAt(i - 1))\n\t            & (Math.pow(2, -2 * imod4 + 8) - 1)) << (imod4 * 2))\n\t            | (base64map.indexOf(base64.charAt(i)) >>> (6 - imod4 * 2)));\n\t      }\n\t      return bytes;\n\t    }\n\t  };\n\n\t  module.exports = crypt;\n\t})();\n\t});\n\n\tvar charenc = {\n\t  // UTF-8 encoding\n\t  utf8: {\n\t    // Convert a string to a byte array\n\t    stringToBytes: function(str) {\n\t      return charenc.bin.stringToBytes(unescape(encodeURIComponent(str)));\n\t    },\n\n\t    // Convert a byte array to a string\n\t    bytesToString: function(bytes) {\n\t      return decodeURIComponent(escape(charenc.bin.bytesToString(bytes)));\n\t    }\n\t  },\n\n\t  // Binary encoding\n\t  bin: {\n\t    // Convert a string to a byte array\n\t    stringToBytes: function(str) {\n\t      for (var bytes = [], i = 0; i < str.length; i++)\n\t        bytes.push(str.charCodeAt(i) & 0xFF);\n\t      return bytes;\n\t    },\n\n\t    // Convert a byte array to a string\n\t    bytesToString: function(bytes) {\n\t      for (var str = [], i = 0; i < bytes.length; i++)\n\t        str.push(String.fromCharCode(bytes[i]));\n\t      return str.join('');\n\t    }\n\t  }\n\t};\n\n\tvar charenc_1 = charenc;\n\n\t/*!\n\t * Determine if an object is a Buffer\n\t *\n\t * @author   Feross Aboukhadijeh <https://feross.org>\n\t * @license  MIT\n\t */\n\n\t// The _isBuffer check is for Safari 5-7 support, because it's missing\n\t// Object.prototype.constructor. Remove this eventually\n\tvar isBuffer_1$1 = function (obj) {\n\t  return obj != null && (isBuffer(obj) || isSlowBuffer(obj) || !!obj._isBuffer)\n\t};\n\n\tfunction isBuffer (obj) {\n\t  return !!obj.constructor && typeof obj.constructor.isBuffer === 'function' && obj.constructor.isBuffer(obj)\n\t}\n\n\t// For Node v0.10 support. Remove this eventually.\n\tfunction isSlowBuffer (obj) {\n\t  return typeof obj.readFloatLE === 'function' && typeof obj.slice === 'function' && isBuffer(obj.slice(0, 0))\n\t}\n\n\tvar md5 = createCommonjsModule(function (module) {\n\t(function(){\n\t  var crypt$1 = crypt,\n\t      utf8 = charenc_1.utf8,\n\t      isBuffer = isBuffer_1$1,\n\t      bin = charenc_1.bin,\n\n\t  // The core\n\t  md5 = function (message, options) {\n\t    // Convert to byte array\n\t    if (message.constructor == String)\n\t      if (options && options.encoding === 'binary')\n\t        message = bin.stringToBytes(message);\n\t      else\n\t        message = utf8.stringToBytes(message);\n\t    else if (isBuffer(message))\n\t      message = Array.prototype.slice.call(message, 0);\n\t    else if (!Array.isArray(message) && message.constructor !== Uint8Array)\n\t      message = message.toString();\n\t    // else, assume byte array already\n\n\t    var m = crypt$1.bytesToWords(message),\n\t        l = message.length * 8,\n\t        a =  1732584193,\n\t        b = -271733879,\n\t        c = -1732584194,\n\t        d =  271733878;\n\n\t    // Swap endian\n\t    for (var i = 0; i < m.length; i++) {\n\t      m[i] = ((m[i] <<  8) | (m[i] >>> 24)) & 0x00FF00FF |\n\t             ((m[i] << 24) | (m[i] >>>  8)) & 0xFF00FF00;\n\t    }\n\n\t    // Padding\n\t    m[l >>> 5] |= 0x80 << (l % 32);\n\t    m[(((l + 64) >>> 9) << 4) + 14] = l;\n\n\t    // Method shortcuts\n\t    var FF = md5._ff,\n\t        GG = md5._gg,\n\t        HH = md5._hh,\n\t        II = md5._ii;\n\n\t    for (var i = 0; i < m.length; i += 16) {\n\n\t      var aa = a,\n\t          bb = b,\n\t          cc = c,\n\t          dd = d;\n\n\t      a = FF(a, b, c, d, m[i+ 0],  7, -680876936);\n\t      d = FF(d, a, b, c, m[i+ 1], 12, -389564586);\n\t      c = FF(c, d, a, b, m[i+ 2], 17,  606105819);\n\t      b = FF(b, c, d, a, m[i+ 3], 22, -1044525330);\n\t      a = FF(a, b, c, d, m[i+ 4],  7, -176418897);\n\t      d = FF(d, a, b, c, m[i+ 5], 12,  1200080426);\n\t      c = FF(c, d, a, b, m[i+ 6], 17, -1473231341);\n\t      b = FF(b, c, d, a, m[i+ 7], 22, -45705983);\n\t      a = FF(a, b, c, d, m[i+ 8],  7,  1770035416);\n\t      d = FF(d, a, b, c, m[i+ 9], 12, -1958414417);\n\t      c = FF(c, d, a, b, m[i+10], 17, -42063);\n\t      b = FF(b, c, d, a, m[i+11], 22, -1990404162);\n\t      a = FF(a, b, c, d, m[i+12],  7,  1804603682);\n\t      d = FF(d, a, b, c, m[i+13], 12, -40341101);\n\t      c = FF(c, d, a, b, m[i+14], 17, -1502002290);\n\t      b = FF(b, c, d, a, m[i+15], 22,  1236535329);\n\n\t      a = GG(a, b, c, d, m[i+ 1],  5, -165796510);\n\t      d = GG(d, a, b, c, m[i+ 6],  9, -1069501632);\n\t      c = GG(c, d, a, b, m[i+11], 14,  643717713);\n\t      b = GG(b, c, d, a, m[i+ 0], 20, -373897302);\n\t      a = GG(a, b, c, d, m[i+ 5],  5, -701558691);\n\t      d = GG(d, a, b, c, m[i+10],  9,  38016083);\n\t      c = GG(c, d, a, b, m[i+15], 14, -660478335);\n\t      b = GG(b, c, d, a, m[i+ 4], 20, -405537848);\n\t      a = GG(a, b, c, d, m[i+ 9],  5,  568446438);\n\t      d = GG(d, a, b, c, m[i+14],  9, -1019803690);\n\t      c = GG(c, d, a, b, m[i+ 3], 14, -187363961);\n\t      b = GG(b, c, d, a, m[i+ 8], 20,  1163531501);\n\t      a = GG(a, b, c, d, m[i+13],  5, -1444681467);\n\t      d = GG(d, a, b, c, m[i+ 2],  9, -51403784);\n\t      c = GG(c, d, a, b, m[i+ 7], 14,  1735328473);\n\t      b = GG(b, c, d, a, m[i+12], 20, -1926607734);\n\n\t      a = HH(a, b, c, d, m[i+ 5],  4, -378558);\n\t      d = HH(d, a, b, c, m[i+ 8], 11, -2022574463);\n\t      c = HH(c, d, a, b, m[i+11], 16,  1839030562);\n\t      b = HH(b, c, d, a, m[i+14], 23, -35309556);\n\t      a = HH(a, b, c, d, m[i+ 1],  4, -1530992060);\n\t      d = HH(d, a, b, c, m[i+ 4], 11,  1272893353);\n\t      c = HH(c, d, a, b, m[i+ 7], 16, -155497632);\n\t      b = HH(b, c, d, a, m[i+10], 23, -1094730640);\n\t      a = HH(a, b, c, d, m[i+13],  4,  681279174);\n\t      d = HH(d, a, b, c, m[i+ 0], 11, -358537222);\n\t      c = HH(c, d, a, b, m[i+ 3], 16, -722521979);\n\t      b = HH(b, c, d, a, m[i+ 6], 23,  76029189);\n\t      a = HH(a, b, c, d, m[i+ 9],  4, -640364487);\n\t      d = HH(d, a, b, c, m[i+12], 11, -421815835);\n\t      c = HH(c, d, a, b, m[i+15], 16,  530742520);\n\t      b = HH(b, c, d, a, m[i+ 2], 23, -995338651);\n\n\t      a = II(a, b, c, d, m[i+ 0],  6, -198630844);\n\t      d = II(d, a, b, c, m[i+ 7], 10,  1126891415);\n\t      c = II(c, d, a, b, m[i+14], 15, -1416354905);\n\t      b = II(b, c, d, a, m[i+ 5], 21, -57434055);\n\t      a = II(a, b, c, d, m[i+12],  6,  1700485571);\n\t      d = II(d, a, b, c, m[i+ 3], 10, -1894986606);\n\t      c = II(c, d, a, b, m[i+10], 15, -1051523);\n\t      b = II(b, c, d, a, m[i+ 1], 21, -2054922799);\n\t      a = II(a, b, c, d, m[i+ 8],  6,  1873313359);\n\t      d = II(d, a, b, c, m[i+15], 10, -30611744);\n\t      c = II(c, d, a, b, m[i+ 6], 15, -1560198380);\n\t      b = II(b, c, d, a, m[i+13], 21,  1309151649);\n\t      a = II(a, b, c, d, m[i+ 4],  6, -145523070);\n\t      d = II(d, a, b, c, m[i+11], 10, -1120210379);\n\t      c = II(c, d, a, b, m[i+ 2], 15,  718787259);\n\t      b = II(b, c, d, a, m[i+ 9], 21, -343485551);\n\n\t      a = (a + aa) >>> 0;\n\t      b = (b + bb) >>> 0;\n\t      c = (c + cc) >>> 0;\n\t      d = (d + dd) >>> 0;\n\t    }\n\n\t    return crypt$1.endian([a, b, c, d]);\n\t  };\n\n\t  // Auxiliary functions\n\t  md5._ff  = function (a, b, c, d, x, s, t) {\n\t    var n = a + (b & c | ~b & d) + (x >>> 0) + t;\n\t    return ((n << s) | (n >>> (32 - s))) + b;\n\t  };\n\t  md5._gg  = function (a, b, c, d, x, s, t) {\n\t    var n = a + (b & d | c & ~d) + (x >>> 0) + t;\n\t    return ((n << s) | (n >>> (32 - s))) + b;\n\t  };\n\t  md5._hh  = function (a, b, c, d, x, s, t) {\n\t    var n = a + (b ^ c ^ d) + (x >>> 0) + t;\n\t    return ((n << s) | (n >>> (32 - s))) + b;\n\t  };\n\t  md5._ii  = function (a, b, c, d, x, s, t) {\n\t    var n = a + (c ^ (b | ~d)) + (x >>> 0) + t;\n\t    return ((n << s) | (n >>> (32 - s))) + b;\n\t  };\n\n\t  // Package private blocksize\n\t  md5._blocksize = 16;\n\t  md5._digestsize = 16;\n\n\t  module.exports = function (message, options) {\n\t    if (message === undefined || message === null)\n\t      throw new Error('Illegal argument ' + message);\n\n\t    var digestbytes = crypt$1.wordsToBytes(md5(message, options));\n\t    return options && options.asBytes ? digestbytes :\n\t        options && options.asString ? bin.bytesToString(digestbytes) :\n\t        crypt$1.bytesToHex(digestbytes);\n\t  };\n\n\t})();\n\t});\n\n\tvar urlCache = {};\n\tvar cherryInnerLinkRegex = /^cherry-inner:\\/\\/([0-9a-f]+)$/i;\n\tfunction urlProcessorProxy(urlProcessor) {\n\t  return function (url, srcType) {\n\t    if (UrlCache.isInnerLink(url)) {\n\t      var newUrl = urlProcessor(UrlCache.get(url), srcType);\n\t      return UrlCache.replace(url, newUrl);\n\t    }\n\n\t    return urlProcessor(url, srcType);\n\t  };\n\t}\n\n\tvar UrlCache = /*#__PURE__*/function () {\n\t  function UrlCache() {\n\t    _classCallCheck(this, UrlCache);\n\t  }\n\n\t  _createClass(UrlCache, null, [{\n\t    key: \"isInnerLink\",\n\t    value:\n\t    /**\n\t     * 判断url是否Cherry的内部链接\n\t     * @param {string} url 要检测的URL\n\t     * @returns\n\t     */\n\t    function isInnerLink(url) {\n\t      return cherryInnerLinkRegex.test(url);\n\t    }\n\t    /**\n\t     * 缓存url为内部链接，主要用于缩短超长链接，避免正则超时\n\t     * @param {string} url 要转换为内部链接的URL\n\t     * @returns\n\t     */\n\n\t  }, {\n\t    key: \"set\",\n\t    value: function set(url) {\n\t      var urlSign = md5(url);\n\t      urlCache[urlSign] = url;\n\t      return \"cherry-inner://\".concat(urlSign);\n\t    }\n\t    /**\n\t     * 获取原始链接\n\t     * @param {string} innerUrl 内部链接\n\t     * @returns\n\t     */\n\n\t  }, {\n\t    key: \"get\",\n\t    value: function get(innerUrl) {\n\t      var _innerUrl$match;\n\n\t      var _ref = (_innerUrl$match = innerUrl.match(cherryInnerLinkRegex)) !== null && _innerUrl$match !== void 0 ? _innerUrl$match : [],\n\t          _ref2 = _slicedToArray(_ref, 2),\n\t          urlSign = _ref2[1];\n\n\t      if (!urlSign) {\n\t        return;\n\t      }\n\n\t      return urlCache[urlSign];\n\t    }\n\t    /**\n\t     * 替换指定内部链接的真实地址\n\t     * @param {string} innerUrl 原始内部链接\n\t     * @param {string} newUrl 需要替换的链接\n\t     */\n\n\t  }, {\n\t    key: \"replace\",\n\t    value: function replace(innerUrl, newUrl) {\n\t      var _innerUrl$match2;\n\n\t      var _ref3 = (_innerUrl$match2 = innerUrl.match(cherryInnerLinkRegex)) !== null && _innerUrl$match2 !== void 0 ? _innerUrl$match2 : [],\n\t          _ref4 = _slicedToArray(_ref3, 2),\n\t          urlSign = _ref4[1];\n\n\t      if (!urlSign) {\n\t        return;\n\t      }\n\n\t      urlCache[urlSign] = newUrl;\n\t      return innerUrl;\n\t    }\n\t    /**\n\t     * 替换所有内部链接为原始的真实地址\n\t     * @param {string} html 包含 cherry-inner 协议地址的 html 文本\n\t     */\n\n\t  }, {\n\t    key: \"restoreAll\",\n\t    value: function restoreAll(html) {\n\t      var cherryInnerLinkRegex = /cherry-inner:\\/\\/([0-9a-f]+)/gi;\n\t      var $html = html.replace(cherryInnerLinkRegex, function (match) {\n\t        var originalUrl = UrlCache.get(match);\n\t        return originalUrl || match;\n\t      });\n\t      return $html;\n\t    }\n\t    /**\n\t     * 清空缓存\n\t     */\n\n\t  }, {\n\t    key: \"clear\",\n\t    value: function clear() {\n\t      urlCache = {};\n\t    }\n\t  }]);\n\n\t  return UrlCache;\n\t}();\n\n\tfunction _createSuper$a(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$a(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = construct$4(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\n\tfunction _isNativeReflectConstruct$a() { if (typeof Reflect === \"undefined\" || !construct$4) return false; if (construct$4.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(construct$4(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\n\tvar Link = /*#__PURE__*/function (_SyntaxBase) {\n\t  _inherits(Link, _SyntaxBase);\n\n\t  var _super = _createSuper$a(Link);\n\n\t  function Link(_ref) {\n\t    var _this;\n\n\t    var config = _ref.config,\n\t        globalConfig = _ref.globalConfig;\n\n\t    _classCallCheck(this, Link);\n\n\t    _this = _super.call(this, {\n\t      config: config\n\t    });\n\t    _this.urlProcessor = globalConfig.urlProcessor; // eslint-disable-next-line no-nested-ternary\n\n\t    _this.target = config.target ? \"target=\\\"\".concat(config.target, \"\\\"\") : !!config.openNewPage ? 'target=\"_blank\"' : '';\n\t    _this.rel = config.rel ? \"rel=\\\"\".concat(config.rel, \"\\\"\") : '';\n\t    return _this;\n\t  }\n\t  /**\n\t   * 校验link中text的方括号是否符合规则\n\t   * @param {string} rawText\n\t   */\n\n\n\t  _createClass(Link, [{\n\t    key: \"checkBrackets\",\n\t    value: function checkBrackets(rawText) {\n\t      var stack = [];\n\t      var text = \"[\".concat(rawText, \"]\"); // 前方有奇数个\\当前字符被转义\n\n\t      var checkEscape = function checkEscape(place) {\n\t        return slice$7(text).call(text, 0, place).match(/\\\\*$/)[0].length & 1;\n\t      };\n\n\t      for (var i = text.length - 1; text[i]; i--) {\n\t        if (i === text.length - 1 && checkEscape(i)) break;\n\t        if (text[i] === ']' && !checkEscape(i)) stack.push(']');\n\n\t        if (text[i] === '[' && !checkEscape(i)) {\n\t          stack.pop();\n\n\t          if (!stack.length) {\n\t            return {\n\t              isValid: true,\n\t              coreText: slice$7(text).call(text, i + 1, text.length - 1),\n\t              extraLeadingChar: slice$7(text).call(text, 0, i)\n\t            };\n\t          }\n\t        }\n\t      }\n\n\t      return {\n\t        isValid: false,\n\t        // 方括号匹配不上\n\t        coreText: rawText,\n\t        extraLeadingChar: ''\n\t      };\n\t    }\n\t    /**\n\t     *\n\t     * @param {string} match 匹配的完整字符串\n\t     * @param {string} leadingChar 正则分组一：前置字符\n\t     * @param {string} text 正则分组二：链接文字\n\t     * @param {string|undefined} link 正则分组三：链接URL\n\t     * @param {string|undefined} title 正则分组四：链接title\n\t     * @param {string|undefined} ref 正则分组五：链接引用\n\t     * @param {string|undefined} target 正则分组六：新窗口打开\n\t     * @returns\n\t     */\n\n\t  }, {\n\t    key: \"toHtml\",\n\t    value: function toHtml(match, leadingChar, text, link, title, ref, target) {\n\t      var refType = typeof link === 'undefined' ? 'ref' : 'url';\n\t      var attrs = '';\n\n\t      if (refType === 'ref') {\n\t        // 全局引用，理应在CommentReference中被替换，没有被替换说明没有定义引用项\n\t        return match;\n\t      }\n\n\t      if (refType === 'url') {\n\t        var _context5;\n\n\t        var _this$checkBrackets = this.checkBrackets(text),\n\t            isValid = _this$checkBrackets.isValid,\n\t            coreText = _this$checkBrackets.coreText,\n\t            extraLeadingChar = _this$checkBrackets.extraLeadingChar;\n\n\t        if (!isValid) return match;\n\t        attrs = title && trim$3(title).call(title) !== '' ? \" title=\\\"\".concat(escapeHTMLSpecialChar(title.replace(/[\"']/g, '')), \"\\\"\") : '';\n\n\t        if (target) {\n\t          attrs += \" target=\\\"\".concat(target.replace(/{target\\s*=\\s*(.*?)}/, '$1'), \"\\\"\");\n\t        } else if (this.target) {\n\t          attrs += \" \".concat(this.target);\n\t        }\n\n\t        var processedURL = trim$3(link).call(link).replace(/~1D/g, '~D'); // 还原替换的$符号\n\n\n\t        var processedText = coreText.replace(/~1D/g, '~D'); // 还原替换的$符号\n\t        // text可能是html标签，依赖htmlBlock进行处理\n\n\t        if (isValidScheme(processedURL)) {\n\t          var _context, _context2, _context3, _context4;\n\n\t          processedURL = this.urlProcessor(processedURL, 'link');\n\t          processedURL = encodeURIOnce(processedURL);\n\t          return concat$5(_context = concat$5(_context2 = concat$5(_context3 = concat$5(_context4 = \"\".concat(leadingChar + extraLeadingChar, \"<a href=\\\"\")).call(_context4, UrlCache.set(processedURL), \"\\\" \")).call(_context3, this.rel, \" \")).call(_context2, attrs, \">\")).call(_context, processedText, \"</a>\");\n\t        }\n\n\t        return concat$5(_context5 = \"\".concat(leadingChar + extraLeadingChar, \"<span>\")).call(_context5, text, \"</span>\");\n\t      } // should never happen\n\n\n\t      return match;\n\t    }\n\t  }, {\n\t    key: \"toStdMarkdown\",\n\t    value: function toStdMarkdown(match) {\n\t      return match;\n\t    }\n\t  }, {\n\t    key: \"makeHtml\",\n\t    value: function makeHtml(str) {\n\t      var $str = str.replace(this.RULE.reg, function (match) {\n\t        return match.replace(/~D/g, '~1D');\n\t      });\n\n\t      if (isLookbehindSupported()) {\n\t        var _context6;\n\n\t        $str = $str.replace(this.RULE.reg, bind$5(_context6 = this.toHtml).call(_context6, this));\n\t      } else {\n\t        var _context7;\n\n\t        $str = replaceLookbehind($str, this.RULE.reg, bind$5(_context7 = this.toHtml).call(_context7, this), true, 1);\n\t      }\n\n\t      $str = $str.replace(this.RULE.reg, function (match) {\n\t        return match.replace(/~1D/g, '~D');\n\t      });\n\t      return $str;\n\t    }\n\t  }, {\n\t    key: \"rule\",\n\t    value: function rule() {\n\t      // (?<protocol>\\\\w+:)\\\\/\\\\/\n\t      var ret = {\n\t        // lookbehind启用分组是为了和不兼容lookbehind的场景共用一个回调\n\t        begin: isLookbehindSupported() ? '((?<!\\\\\\\\))' : '(^|[^\\\\\\\\])',\n\t        content: ['\\\\[([^\\\\n]+?)\\\\]', // ?<text>\n\t        '[ \\\\t]*', // any spaces\n\t        \"\".concat('(?:' + '\\\\(' +\n\t        /**\n\t         * allow double quotes\n\t         * e.g.\n\t         * [link](\") ⭕️ valid\n\t         * [link](\"\") ⭕️ valid\n\t         * [link](\" \") ❌ invalid\n\t         */\n\t        '([^\\\\s)]+)' + // ?<link> url\n\t        '(?:[ \\\\t]((?:\".*?\")|(?:\\'.*?\\')))?' + // ?<title> optional\n\t        '\\\\)' + '|' + // or\n\t        '\\\\[(').concat(NOT_ALL_WHITE_SPACES_INLINE, \")\\\\]\") + // ?<ref> global ref\n\t        ')', '(\\\\{target\\\\s*=\\\\s*(_blank|_parent|_self|_top)\\\\})?'].join(''),\n\t        end: ''\n\t      }; // let ret = {begin:'((^|[^\\\\\\\\])\\\\*\\\\*|([\\\\s]|^)__)',\n\t      // end:'(\\\\*\\\\*([\\\\s\\\\S]|$)|__([\\\\s]|$))', content:'([^\\\\n]+?)'};\n\n\t      ret.reg = compileRegExp(ret, 'g');\n\t      return ret;\n\t    }\n\t  }]);\n\n\t  return Link;\n\t}(SyntaxBase);\n\n\t_defineProperty(Link, \"HOOK_NAME\", 'link');\n\n\tvar RangeError$2 = global_1.RangeError;\n\n\t// `String.prototype.repeat` method implementation\n\t// https://tc39.es/ecma262/#sec-string.prototype.repeat\n\tvar stringRepeat = function repeat(count) {\n\t  var str = toString_1(requireObjectCoercible(this));\n\t  var result = '';\n\t  var n = toIntegerOrInfinity(count);\n\t  if (n < 0 || n == Infinity) throw RangeError$2('Wrong number of repetitions');\n\t  for (;n > 0; (n >>>= 1) && (str += str)) if (n & 1) result += str;\n\t  return result;\n\t};\n\n\t// `String.prototype.repeat` method\n\t// https://tc39.es/ecma262/#sec-string.prototype.repeat\n\t_export({ target: 'String', proto: true }, {\n\t  repeat: stringRepeat\n\t});\n\n\tvar repeat = entryVirtual('String').repeat;\n\n\tvar StringPrototype$2 = String.prototype;\n\n\tvar repeat$1 = function (it) {\n\t  var own = it.repeat;\n\t  return typeof it == 'string' || it === StringPrototype$2\n\t    || (objectIsPrototypeOf(StringPrototype$2, it) && own === StringPrototype$2.repeat) ? repeat : own;\n\t};\n\n\tvar repeat$2 = repeat$1;\n\n\tvar repeat$3 = repeat$2;\n\n\tfunction _createSuper$b(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$b(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = construct$4(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\n\tfunction _isNativeReflectConstruct$b() { if (typeof Reflect === \"undefined\" || !construct$4) return false; if (construct$4.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(construct$4(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\n\tvar Emphasis = /*#__PURE__*/function (_SyntaxBase) {\n\t  _inherits(Emphasis, _SyntaxBase);\n\n\t  var _super = _createSuper$b(Emphasis);\n\n\t  function Emphasis() {\n\t    var _this;\n\n\t    var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {\n\t      config: undefined\n\t    },\n\t        config = _ref.config;\n\n\t    _classCallCheck(this, Emphasis);\n\n\t    _this = _super.call(this, {\n\t      config: config\n\t    });\n\n\t    if (!config) {\n\t      return _possibleConstructorReturn(_this);\n\t    }\n\n\t    _this.allowWhitespace = !!config.allowWhitespace;\n\t    return _this;\n\t  }\n\n\t  _createClass(Emphasis, [{\n\t    key: \"makeHtml\",\n\t    value: function makeHtml(str, sentenceMakeFunc) {\n\t      var converAsterisk = function converAsterisk(match, leading, symbol, text) {\n\t        var _context, _context2, _context3, _context4, _context5;\n\n\t        var tagType = symbol.length % 2 === 1 ? 'em' : 'strong';\n\t        var repeat = Math.floor(symbol.length / 2);\n\n\t        var prefix = repeat$3(_context = '<strong>').call(_context, repeat);\n\n\t        var suffix = repeat$3(_context2 = '</strong>').call(_context2, repeat);\n\n\t        if (tagType === 'em') {\n\t          prefix += '<em>';\n\t          suffix = \"</em>\".concat(suffix);\n\t        } // 这里转义_是为了避免跨标签识别\n\n\n\t        var result = concat$5(_context3 = concat$5(_context4 = concat$5(_context5 = \"\".concat(leading)).call(_context5, prefix)).call(_context4, sentenceMakeFunc(text).html.replace(/_/g, '~U'))).call(_context3, suffix);\n\n\t        return result;\n\t      };\n\n\t      var $str = str;\n\n\t      if (this.allowWhitespace) {\n\t        $str = $str.replace(/(^|\\n[\\s]*)(\\*)([^\\s*](?:.*?)(?:(?:\\n.*?)*?))\\*/g, converAsterisk);\n\t        $str = $str.replace(/(^|\\n[\\s]*)(\\*{2,})((?:.*?)(?:(?:\\n.*?)*?))\\2/g, converAsterisk);\n\t        $str = $str.replace(/([^\\n*\\\\\\s][ ]*)(\\*+)((?:.*?)(?:(?:\\n.*?)*?))\\2/g, converAsterisk);\n\t      } else {\n\t        $str = $str.replace(this.RULE.asterisk.reg, converAsterisk);\n\t      }\n\n\t      $str = $str.replace(this.RULE.underscore.reg, function (match, leading, symbol, text, index, string) {\n\t        var _context6, _context7, _context8, _context9, _context10;\n\n\t        if (trim$3(text).call(text) === '') {\n\t          return match;\n\t        }\n\n\t        var tagType = symbol.length % 2 === 1 ? 'em' : 'strong';\n\t        var repeat = Math.floor(symbol.length / 2);\n\n\t        var prefix = repeat$3(_context6 = '<strong>').call(_context6, repeat);\n\n\t        var suffix = repeat$3(_context7 = '</strong>').call(_context7, repeat);\n\n\t        var innerText = sentenceMakeFunc(text).html;\n\n\t        if (tagType === 'em') {\n\t          // if(/<em>.*?<\\/em>/.test(innerText)) {\n\t          //     prefix += symbol;\n\t          //     suffix = symbol + suffix;\n\t          // } else {\n\t          prefix += '<em>';\n\t          suffix = \"</em>\".concat(suffix); // }\n\t        }\n\n\t        var result = concat$5(_context8 = concat$5(_context9 = concat$5(_context10 = \"\".concat(leading)).call(_context10, prefix)).call(_context9, innerText)).call(_context8, suffix);\n\n\t        return result;\n\t      });\n\t      return $str.replace(/~U/g, '_');\n\t    }\n\t  }, {\n\t    key: \"test\",\n\t    value: function test(str, flavor) {\n\t      return this.RULE[flavor].reg && this.RULE[flavor].reg.test(str);\n\t    }\n\t  }, {\n\t    key: \"rule\",\n\t    value: function rule() {\n\t      var _ref2 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {\n\t        config: undefined\n\t      },\n\t          config = _ref2.config;\n\n\t      var allowWhitespace = config ? !!config.allowWhitespace : false;\n\t      var REGEX = allowWhitespace ? ALLOW_WHITESPACE_MULTILINE : DO_NOT_STARTS_AND_END_WITH_SPACES_MULTILINE_ALLOW_EMPTY;\n\t      var asterisk = {\n\t        begin: '(^|[^\\\\\\\\])(\\\\*+)',\n\t        // ?<leading>, ?<symbol>\n\t        content: \"(\".concat(REGEX, \")\"),\n\t        // ?<text>\n\t        end: '\\\\2'\n\t      }; // UNDERSCORE_EMPHASIS_BORDER：允许除下划线以外的「标点符号」和空格出现，使用[^\\w\\S \\t]或[\\W\\s]会有性能问题\n\n\t      var underscore = {\n\t        begin: \"(^|\".concat(UNDERSCORE_EMPHASIS_BOUNDARY, \")(_+)\"),\n\t        // ?<leading>, ?<symbol>\n\t        content: \"(\".concat(REGEX, \")\"),\n\t        // ?<text>\n\t        end: \"\\\\2(?=\".concat(UNDERSCORE_EMPHASIS_BOUNDARY, \"|$)\")\n\t      };\n\t      asterisk.reg = compileRegExp(asterisk, 'g');\n\t      underscore.reg = compileRegExp(underscore, 'g');\n\t      return {\n\t        asterisk: asterisk,\n\t        underscore: underscore\n\t      };\n\t    }\n\t  }]);\n\n\t  return Emphasis;\n\t}(SyntaxBase);\n\n\t_defineProperty(Emphasis, \"HOOK_NAME\", 'fontEmphasis');\n\n\tfunction _createSuper$c(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$c(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = construct$4(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\n\tfunction _isNativeReflectConstruct$c() { if (typeof Reflect === \"undefined\" || !construct$4) return false; if (construct$4.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(construct$4(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\t/**\n\t * 段落级语法\n\t * 段落级语法可以具备以下特性：\n\t *  1、排他性，可以排除将当前语法之后的所有段落语法\n\t *  2、可排序，在../HooksConfig.js里设置排序，顺序在前面的段落语法先渲染\n\t *  3、可嵌套行内语法\n\t *\n\t * 段落级语法有以下义务：\n\t *  1、维护签名，签名用来实现预览区域的局部更新功能\n\t *  2、维护行号，行号用来实现编辑区和预览区同步滚动\n\t *     每个段落语法负责计算上文的行号，上文行号不是0就是1，大于1会由BR语法计算行号\n\t */\n\n\tvar Paragraph = /*#__PURE__*/function (_ParagraphBase) {\n\t  _inherits(Paragraph, _ParagraphBase);\n\n\t  var _super = _createSuper$c(Paragraph);\n\n\t  function Paragraph(options) {\n\t    var _this;\n\n\t    _classCallCheck(this, Paragraph);\n\n\t    _this = _super.call(this);\n\n\t    _this.initBrReg(options.globalConfig.classicBr);\n\n\t    return _this;\n\t  }\n\t  /**\n\t   * 段落语法的核心渲染函数\n\t   * @param {string} str markdown源码\n\t   * @param {Function} sentenceMakeFunc 行内语法渲染器\n\t   * @returns {string} html内容\n\t   */\n\n\n\t  _createClass(Paragraph, [{\n\t    key: \"makeHtml\",\n\t    value: function makeHtml(str, sentenceMakeFunc) {\n\t      var _this2 = this;\n\n\t      if (!this.test(str)) {\n\t        return str;\n\t      }\n\n\t      return str.replace(this.RULE.reg, function (match, preLines, content) {\n\t        var _context8;\n\n\t        if (_this2.isContainsCache(match, true)) {\n\t          return match;\n\t        } // 判断当前内容里是否包含段落渲染引擎暂存缓存关键字\n\n\n\t        var cacheMixedInMatches = _this2.isContainsCache(content);\n\n\t        var processor = function processor(p) {\n\t          var _context, _context2, _context3, _context4, _context5, _context6;\n\n\t          if (trim$3(p).call(p) === '') {\n\t            return '';\n\t          } // 调用行内语法，获得段落的签名和对应html内容\n\n\n\t          var _sentenceMakeFunc = sentenceMakeFunc(p),\n\t              sign = _sentenceMakeFunc.sign,\n\t              html = _sentenceMakeFunc.html;\n\n\t          var domName = 'p'; // 如果包含html块级标签（比如div、blockquote等），则当前段落外层用div包裹，反之用p包裹\n\n\t          var isContainBlockTest = new RegExp(\"<(\".concat(blockNames, \")[^>]*>\"), 'i');\n\n\t          if (isContainBlockTest.test(html)) {\n\t            domName = 'div';\n\t          } // 计算行号\n\n\n\t          var lines = _this2.getLineCount(p, p);\n\n\t          return concat$5(_context = concat$5(_context2 = concat$5(_context3 = concat$5(_context4 = concat$5(_context5 = concat$5(_context6 = \"<\".concat(domName, \" data-sign=\\\"\")).call(_context6, sign)).call(_context5, lines, \"\\\" data-type=\\\"\")).call(_context4, domName, \"\\\" data-lines=\\\"\")).call(_context3, lines, \"\\\">\")).call(_context2, _this2.$cleanParagraph(html), \"</\")).call(_context, domName, \">\");\n\t        };\n\n\t        if (cacheMixedInMatches) {\n\t          var _context7;\n\n\t          return _this2.makeExcludingCached(concat$5(_context7 = \"\".concat(preLines)).call(_context7, content), processor);\n\t        }\n\n\t        return processor(concat$5(_context8 = \"\".concat(preLines)).call(_context8, content));\n\t      });\n\t    }\n\t  }, {\n\t    key: \"rule\",\n\t    value: function rule() {\n\t      var ret = {\n\t        begin: '(?:^|\\\\n)(\\\\n*)',\n\t        end: '(?=\\\\s*$|\\\\n\\\\n)',\n\t        content: '([\\\\s\\\\S]+?)'\n\t      };\n\t      ret.reg = new RegExp(ret.begin + ret.content + ret.end, 'g');\n\t      return ret;\n\t    }\n\t  }]);\n\n\t  return Paragraph;\n\t}(ParagraphBase);\n\n\t_defineProperty(Paragraph, \"HOOK_NAME\", 'normalParagraph');\n\n\tvar isDataDescriptor = function (descriptor) {\n\t  return descriptor !== undefined && (hasOwnProperty_1(descriptor, 'value') || hasOwnProperty_1(descriptor, 'writable'));\n\t};\n\n\t// `Reflect.get` method\n\t// https://tc39.es/ecma262/#sec-reflect.get\n\tfunction get$1(target, propertyKey /* , receiver */) {\n\t  var receiver = arguments.length < 3 ? target : arguments[2];\n\t  var descriptor, prototype;\n\t  if (anObject(target) === receiver) return target[propertyKey];\n\t  descriptor = objectGetOwnPropertyDescriptor.f(target, propertyKey);\n\t  if (descriptor) return isDataDescriptor(descriptor)\n\t    ? descriptor.value\n\t    : descriptor.get === undefined ? undefined : functionCall(descriptor.get, receiver);\n\t  if (isObject(prototype = objectGetPrototypeOf(target))) return get$1(prototype, propertyKey, receiver);\n\t}\n\n\t_export({ target: 'Reflect', stat: true }, {\n\t  get: get$1\n\t});\n\n\tvar get$2 = path.Reflect.get;\n\n\tvar get$3 = get$2;\n\n\tvar get$4 = get$3;\n\n\tvar get$5 = get$4;\n\n\tvar get$6 = get$5;\n\n\tvar get$7 = get$6;\n\n\tvar getOwnPropertyDescriptor$4 = getOwnPropertyDescriptor$2;\n\n\tvar getOwnPropertyDescriptor$5 = getOwnPropertyDescriptor$4;\n\n\tvar getOwnPropertyDescriptor$6 = getOwnPropertyDescriptor$5;\n\n\tvar getOwnPropertyDescriptor$7 = getOwnPropertyDescriptor$6;\n\n\tvar superPropBase = createCommonjsModule(function (module) {\n\tfunction _superPropBase(object, property) {\n\t  while (!Object.prototype.hasOwnProperty.call(object, property)) {\n\t    object = getPrototypeOf$6(object);\n\t    if (object === null) break;\n\t  }\n\n\t  return object;\n\t}\n\n\tmodule.exports = _superPropBase, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n\t});\n\n\tunwrapExports(superPropBase);\n\n\tvar get$8 = createCommonjsModule(function (module) {\n\tfunction _get() {\n\t  if (typeof Reflect !== \"undefined\" && get$7) {\n\t    module.exports = _get = get$7, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n\t  } else {\n\t    module.exports = _get = function _get(target, property, receiver) {\n\t      var base = superPropBase(target, property);\n\t      if (!base) return;\n\n\t      var desc = getOwnPropertyDescriptor$7(base, property);\n\n\t      if (desc.get) {\n\t        return desc.get.call(arguments.length < 3 ? target : receiver);\n\t      }\n\n\t      return desc.value;\n\t    }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n\t  }\n\n\t  return _get.apply(this, arguments);\n\t}\n\n\tmodule.exports = _get, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n\t});\n\n\tvar _get = unwrapExports(get$8);\n\n\tfunction _createSuper$d(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$d(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = construct$4(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\n\tfunction _isNativeReflectConstruct$d() { if (typeof Reflect === \"undefined\" || !construct$4) return false; if (construct$4.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(construct$4(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\tvar ATX_HEADER = 'atx';\n\tvar SETEXT_HEADER = 'setext';\n\tvar toDashChars = /[\\s\\-_]/;\n\tvar alphabetic = /[A-Za-z]/;\n\tvar numeric = /[0-9]/;\n\n\tvar Header = /*#__PURE__*/function (_ParagraphBase) {\n\t  _inherits(Header, _ParagraphBase);\n\n\t  var _super = _createSuper$d(Header);\n\n\t  function Header() {\n\t    var _this;\n\n\t    var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {\n\t      config: undefined,\n\t      externals: undefined\n\t    },\n\t        externals = _ref.externals,\n\t        config = _ref.config;\n\n\t    _classCallCheck(this, Header);\n\n\t    _this = _super.call(this, {\n\t      needCache: true\n\t    });\n\t    _this.strict = config ? !!config.strict : true;\n\t    _this.RULE = _this.rule();\n\t    _this.headerIDCache = [];\n\t    _this.headerIDCounter = {};\n\t    _this.config = config || {}; // TODO: AllowCustomID\n\n\t    return _this;\n\t  }\n\n\t  _createClass(Header, [{\n\t    key: \"$parseTitleText\",\n\t    value: function $parseTitleText() {\n\t      var html = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';\n\n\t      if (typeof html !== 'string') {\n\t        return '';\n\t      }\n\n\t      return html.replace(/<.*?>/g, '').replace(/&#60;/g, '<').replace(/&#62;/g, '>');\n\t    }\n\t    /**\n\t     * refer:\n\t     * @see https://github.com/vsch/flexmark-java/blob/8bf621924158dfed8b84120479c82704020a6927/flexmark\n\t     * /src/main/java/com/vladsch/flexmark/html/renderer/HeaderIdGenerator.java#L90-L113\n\t     *\n\t     * @param {string} headerText\n\t     * @param {boolean} [toLowerCase]\n\t     * @returns\n\t     */\n\n\t  }, {\n\t    key: \"$generateId\",\n\t    value: function $generateId(headerText) {\n\t      var toLowerCase = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n\t      var len = headerText.length;\n\t      var id = '';\n\n\t      for (var i = 0; i < len; i++) {\n\t        var c = headerText.charAt(i);\n\n\t        if (alphabetic.test(c)) {\n\t          id += toLowerCase ? c.toLowerCase() : c;\n\t        } else if (numeric.test(c)) {\n\t          id += c;\n\t        } else if (toDashChars.test(c)) {\n\t          id += id.length < 1 || id.charAt(id.length - 1) !== '-' ? '-' : '';\n\t        } else if (c.charCodeAt(0) > 255) {\n\t          // unicode\n\t          try {\n\t            id += encodeURIComponent(c);\n\t          } catch (error) {// empty\n\t          }\n\t        }\n\t      }\n\n\t      return id;\n\t    }\n\t  }, {\n\t    key: \"generateIDNoDup\",\n\t    value: function generateIDNoDup(headerText) {\n\t      var _context;\n\n\t      // 处理被引擎转换过的实体字符\n\t      var unescapedHeaderText = headerText.replace(/&#60;/g, '<').replace(/&#62;/g, '>');\n\t      var newId = this.$generateId(unescapedHeaderText, true);\n\n\t      var idIndex = indexOf$8(_context = this.headerIDCache).call(_context, newId);\n\n\t      if (idIndex !== -1) {\n\t        this.headerIDCounter[idIndex] += 1;\n\t        newId += \"-\".concat(this.headerIDCounter[idIndex] + 1);\n\t      } else {\n\t        var newIndex = this.headerIDCache.push(newId);\n\t        this.headerIDCounter[newIndex - 1] = 1;\n\t      }\n\n\t      return newId;\n\t    }\n\t  }, {\n\t    key: \"$wrapHeader\",\n\t    value: function $wrapHeader(text, level, dataLines, sentenceMakeFunc) {\n\t      var _context2, _context3, _context4, _context5, _context6, _context7;\n\n\t      // 需要经过一次escape\n\t      var processedText = sentenceMakeFunc(trim$3(text).call(text));\n\t      var html = processedText.html; // TODO: allowCustomID开关\n\t      // let htmlAttr = this.getAttributes(html);\n\t      // html = htmlAttr.str;\n\t      // let attrs = htmlAttr.attrs;\n\t      // console.log(attrs);\n\n\t      var customIDRegex = /\\s+\\{#([A-Za-z0-9-]+)\\}$/; // ?<id>\n\n\t      var idMatch = html.match(customIDRegex);\n\t      var anchorID;\n\n\t      if (idMatch !== null) {\n\t        html = html.substring(0, idMatch.index);\n\n\t        var _idMatch = _slicedToArray(idMatch, 2);\n\n\t        anchorID = _idMatch[1];\n\t      }\n\n\t      var headerTextRaw = this.$parseTitleText(html);\n\n\t      if (!anchorID) {\n\t        var replaceFootNote = /~fn#([0-9]+)#/g;\n\t        anchorID = this.generateIDNoDup(headerTextRaw.replace(replaceFootNote, ''));\n\t      }\n\n\t      var safeAnchorID = \"safe_\".concat(anchorID); // transform header id to avoid being sanitized\n\n\t      var sign = this.$engine.md5(concat$5(_context2 = concat$5(_context3 = concat$5(_context4 = \"\".concat(level, \"-\")).call(_context4, processedText.sign, \"-\")).call(_context3, anchorID, \"-\")).call(_context2, dataLines));\n\t      var result = [concat$5(_context5 = concat$5(_context6 = concat$5(_context7 = \"<h\".concat(level, \" id=\\\"\")).call(_context7, safeAnchorID, \"\\\" data-sign=\\\"\")).call(_context6, sign, \"\\\" data-lines=\\\"\")).call(_context5, dataLines, \"\\\">\"), this.$getAnchor(anchorID), \"\".concat(html), \"</h\".concat(level, \">\")].join('');\n\t      return {\n\t        html: result,\n\t        sign: \"\".concat(sign)\n\t      };\n\t    }\n\t  }, {\n\t    key: \"$getAnchor\",\n\t    value: function $getAnchor(anchorID) {\n\t      var anchorStyle = this.config.anchorStyle || 'default';\n\n\t      if (anchorStyle === 'none') {\n\t        return '';\n\t      }\n\n\t      return \"<a class=\\\"anchor\\\" href=\\\"#\".concat(anchorID, \"\\\"></a>\");\n\t    }\n\t  }, {\n\t    key: \"beforeMakeHtml\",\n\t    value: function beforeMakeHtml(str) {\n\t      var _this2 = this;\n\n\t      var $str = str; // atx 优先\n\n\t      if (this.test($str, ATX_HEADER)) {\n\t        $str = $str.replace(this.RULE[ATX_HEADER].reg, function (match, lines, level, text) {\n\t          if (trim$3(text).call(text) === '') {\n\t            return match;\n\t          }\n\n\t          return _this2.getCacheWithSpace(_this2.pushCache(match), match, true);\n\t        });\n\t      } // 按照目前的引擎，每个hook只会执行一次，所以需要并行执行替换\n\n\n\t      if (this.test($str, SETEXT_HEADER)) {\n\t        $str = $str.replace(this.RULE[SETEXT_HEADER].reg, function (match, lines, text) {\n\t          if (trim$3(text).call(text) === '' || _this2.isContainsCache(text)) {\n\t            return match;\n\t          }\n\n\t          return _this2.getCacheWithSpace(_this2.pushCache(match), match, true);\n\t        });\n\t      }\n\n\t      return $str;\n\t    }\n\t  }, {\n\t    key: \"makeHtml\",\n\t    value: function makeHtml(str, sentenceMakeFunc) {\n\t      var _this3 = this;\n\n\t      // 先还原\n\t      var $str = this.restoreCache(str); // atx 优先\n\n\t      if (this.test($str, ATX_HEADER)) {\n\t        $str = $str.replace(this.RULE[ATX_HEADER].reg, function (match, lines, level, text) {\n\t          // 其中有两行是beforeMake加上的\n\t          var lineCount = calculateLinesOfParagraph(lines, _this3.getLineCount(match.replace(/^\\n+/, '')));\n\t          var $text = text.replace(/\\s+#+\\s*$/, ''); // close tag\n\n\t          var _this3$$wrapHeader = _this3.$wrapHeader($text, level.length, lineCount, sentenceMakeFunc),\n\t              result = _this3$$wrapHeader.html,\n\t              sign = _this3$$wrapHeader.sign; // 文章的开头不加换行\n\n\n\t          return _this3.getCacheWithSpace(_this3.pushCache(result, sign, lineCount), match, true);\n\t        });\n\t      } // 按照目前的引擎，每个hook只会执行一次，所以需要并行执行替换\n\n\n\t      if (this.test($str, SETEXT_HEADER)) {\n\t        $str = $str.replace(this.RULE[SETEXT_HEADER].reg, function (match, lines, text, level) {\n\t          if (_this3.isContainsCache(text)) {\n\t            return match;\n\t          } // 其中有两行是beforeMake加上的\n\n\n\t          var lineCount = calculateLinesOfParagraph(lines, _this3.getLineCount(match.replace(/^\\n+/, '')));\n\t          var headerLevel = level[0] === '-' ? 2 : 1; // =: H1, -: H2\n\n\t          var _this3$$wrapHeader2 = _this3.$wrapHeader(text, headerLevel, lineCount, sentenceMakeFunc),\n\t              result = _this3$$wrapHeader2.html,\n\t              sign = _this3$$wrapHeader2.sign; // 文章的开头不加换行\n\n\n\t          return _this3.getCacheWithSpace(_this3.pushCache(result, sign, lineCount), match, true);\n\t        });\n\t      }\n\n\t      return $str;\n\t    }\n\t  }, {\n\t    key: \"afterMakeHtml\",\n\t    value: function afterMakeHtml(html) {\n\t      var $html = _get(_getPrototypeOf(Header.prototype), \"afterMakeHtml\", this).call(this, html);\n\n\t      this.headerIDCache = [];\n\t      this.headerIDCounter = {};\n\t      return $html;\n\t    }\n\t  }, {\n\t    key: \"test\",\n\t    value: function test(str, flavor) {\n\t      return this.RULE[flavor].reg && this.RULE[flavor].reg.test(str);\n\t    }\n\t  }, {\n\t    key: \"rule\",\n\t    value: function rule() {\n\t      // setext Header\n\t      // TODO: 支持多行标题\n\t      var setext = {\n\t        begin: '(?:^|\\\\n)(\\\\n*)',\n\t        // (?<lines>\\\\n*)\n\t        content: ['(?:\\\\h*', '(.+)', // (?<text>.+)\n\t        ')\\\\n', '(?:\\\\h*', '([=]+|[-]+)', // (?<level>[=]+|[-]+)\n\t        ')'].join(''),\n\t        end: '(?=$|\\\\n)'\n\t      };\n\t      setext.reg = compileRegExp(setext, 'g', true); // atx header\n\n\t      var atx = {\n\t        begin: '(?:^|\\\\n)(\\\\n*)(?:\\\\h*(#{1,6}))',\n\t        // (?<lines>\\\\n*), (?<level>#{1,6})\n\t        content: '(.+?)',\n\t        // '(?<text>.+?)'\n\t        end: '(?=$|\\\\n)'\n\t      };\n\t      this.strict && (atx.begin += '(?=\\\\h+)'); // (?=\\\\s+) for strict mode\n\n\t      atx.reg = compileRegExp(atx, 'g', true);\n\t      return {\n\t        setext: setext,\n\t        atx: atx\n\t      };\n\t    }\n\t  }]);\n\n\t  return Header;\n\t}(ParagraphBase);\n\n\t_defineProperty(Header, \"HOOK_NAME\", 'header');\n\n\tfunction _createSuper$e(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$e(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = construct$4(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\n\tfunction _isNativeReflectConstruct$e() { if (typeof Reflect === \"undefined\" || !construct$4) return false; if (construct$4.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(construct$4(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\n\tvar Transfer = /*#__PURE__*/function (_SyntaxBase) {\n\t  _inherits(Transfer, _SyntaxBase);\n\n\t  var _super = _createSuper$e(Transfer);\n\n\t  function Transfer() {\n\t    _classCallCheck(this, Transfer);\n\n\t    return _super.apply(this, arguments);\n\t  }\n\n\t  _createClass(Transfer, [{\n\t    key: \"rule\",\n\t    value: // constructor() {\n\t    //     super();\n\t    // }\n\t    function rule() {\n\t      var ret = {};\n\t      ret.reg = new RegExp('');\n\t      return ret;\n\t    }\n\t  }, {\n\t    key: \"beforeMakeHtml\",\n\t    value: function beforeMakeHtml(str) {\n\t      return str.replace(/\\\\\\n/g, '\\\\ \\n');\n\t    }\n\t  }, {\n\t    key: \"afterMakeHtml\",\n\t    value: function afterMakeHtml(str) {\n\t      var $str = str.replace(/~Q/g, '~');\n\t      $str = $str.replace(/~X/g, '`');\n\t      $str = $str.replace(/~Y/g, '!');\n\t      $str = $str.replace(/~Z/g, '#');\n\t      $str = $str.replace(/~&/g, '&');\n\t      $str = $str.replace(/~K/g, '/');\n\t      return $str;\n\t    }\n\t  }]);\n\n\t  return Transfer;\n\t}(SyntaxBase);\n\n\t_defineProperty(Transfer, \"HOOK_NAME\", 'transfer');\n\n\tvar TypeError$l = global_1.TypeError;\n\n\t// `Array.prototype.{ reduce, reduceRight }` methods implementation\n\tvar createMethod$4 = function (IS_RIGHT) {\n\t  return function (that, callbackfn, argumentsLength, memo) {\n\t    aCallable(callbackfn);\n\t    var O = toObject(that);\n\t    var self = indexedObject(O);\n\t    var length = lengthOfArrayLike(O);\n\t    var index = IS_RIGHT ? length - 1 : 0;\n\t    var i = IS_RIGHT ? -1 : 1;\n\t    if (argumentsLength < 2) while (true) {\n\t      if (index in self) {\n\t        memo = self[index];\n\t        index += i;\n\t        break;\n\t      }\n\t      index += i;\n\t      if (IS_RIGHT ? index < 0 : length <= index) {\n\t        throw TypeError$l('Reduce of empty array with no initial value');\n\t      }\n\t    }\n\t    for (;IS_RIGHT ? index >= 0 : length > index; index += i) if (index in self) {\n\t      memo = callbackfn(memo, self[index], index, O);\n\t    }\n\t    return memo;\n\t  };\n\t};\n\n\tvar arrayReduce = {\n\t  // `Array.prototype.reduce` method\n\t  // https://tc39.es/ecma262/#sec-array.prototype.reduce\n\t  left: createMethod$4(false),\n\t  // `Array.prototype.reduceRight` method\n\t  // https://tc39.es/ecma262/#sec-array.prototype.reduceright\n\t  right: createMethod$4(true)\n\t};\n\n\tvar engineIsNode = classofRaw(global_1.process) == 'process';\n\n\tvar $reduce = arrayReduce.left;\n\n\n\n\n\tvar STRICT_METHOD$2 = arrayMethodIsStrict('reduce');\n\t// Chrome 80-82 has a critical bug\n\t// https://bugs.chromium.org/p/chromium/issues/detail?id=1049982\n\tvar CHROME_BUG = !engineIsNode && engineV8Version > 79 && engineV8Version < 83;\n\n\t// `Array.prototype.reduce` method\n\t// https://tc39.es/ecma262/#sec-array.prototype.reduce\n\t_export({ target: 'Array', proto: true, forced: !STRICT_METHOD$2 || CHROME_BUG }, {\n\t  reduce: function reduce(callbackfn /* , initialValue */) {\n\t    var length = arguments.length;\n\t    return $reduce(this, callbackfn, length, length > 1 ? arguments[1] : undefined);\n\t  }\n\t});\n\n\tvar reduce = entryVirtual('Array').reduce;\n\n\tvar ArrayPrototype$a = Array.prototype;\n\n\tvar reduce$1 = function (it) {\n\t  var own = it.reduce;\n\t  return it === ArrayPrototype$a || (objectIsPrototypeOf(ArrayPrototype$a, it) && own === ArrayPrototype$a.reduce) ? reduce : own;\n\t};\n\n\tvar reduce$2 = reduce$1;\n\n\tvar reduce$3 = reduce$2;\n\n\tfunction ownKeys$4(object, enumerableOnly) { var keys = keys$3(object); if (getOwnPropertySymbols$2) { var symbols = getOwnPropertySymbols$2(object); enumerableOnly && (symbols = filter$3(symbols).call(symbols, function (sym) { return getOwnPropertyDescriptor$3(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\n\n\tfunction _objectSpread$3(target) { for (var i = 1; i < arguments.length; i++) { var _context21, _context22; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? forEach$3(_context21 = ownKeys$4(Object(source), !0)).call(_context21, function (key) { _defineProperty(target, key, source[key]); }) : getOwnPropertyDescriptors$2 ? defineProperties$2(target, getOwnPropertyDescriptors$2(source)) : forEach$3(_context22 = ownKeys$4(Object(source))).call(_context22, function (key) { defineProperty$5(target, key, getOwnPropertyDescriptor$3(source, key)); }); } return target; }\n\n\tfunction _createSuper$f(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$f(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = construct$4(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\n\tfunction _isNativeReflectConstruct$f() { if (typeof Reflect === \"undefined\" || !construct$4) return false; if (construct$4.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(construct$4(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\tvar TABLE_LOOSE = 'loose';\n\tvar TABLE_STRICT = 'strict';\n\n\tvar Table = /*#__PURE__*/function (_ParagraphBase) {\n\t  _inherits(Table, _ParagraphBase);\n\n\t  var _super = _createSuper$f(Table);\n\n\t  function Table(_ref) {\n\t    var _this;\n\n\t    var externals = _ref.externals,\n\t        config = _ref.config;\n\n\t    _classCallCheck(this, Table);\n\n\t    _this = _super.call(this, {\n\t      needCache: true\n\t    });\n\t    var enableChart = config.enableChart,\n\t        ChartRenderEngine = config.chartRenderEngine,\n\t        requiredPackages = config.externals,\n\t        _config$chartEngineOp = config.chartEngineOptions,\n\t        chartEngineOptions = _config$chartEngineOp === void 0 ? {} : _config$chartEngineOp;\n\t    _this.chartRenderEngine = null;\n\n\t    if (enableChart === true) {\n\t      try {\n\t        _this.chartRenderEngine = new ChartRenderEngine(_objectSpread$3(_objectSpread$3({}, externals && requiredPackages instanceof Array && reduce$3(requiredPackages).call(requiredPackages, function (acc, pkg) {\n\t          delete chartEngineOptions[pkg]; // 过滤第三方包选项\n\n\t          return _objectSpread$3(_objectSpread$3({}, acc), {}, _defineProperty({}, pkg, externals[pkg]));\n\t        }, {})), {}, {\n\t          renderer: 'svg',\n\t          width: 500,\n\t          height: 300\n\t        }, chartEngineOptions));\n\t      } catch (error) {\n\t        console.warn(error);\n\t      }\n\t    }\n\n\t    return _this;\n\t  } // 保持每列长度一致\n\n\n\t  _createClass(Table, [{\n\t    key: \"$extendColumns\",\n\t    value: function $extendColumns(row, colCount) {\n\t      var _context;\n\n\t      var delta = colCount - row.length;\n\n\t      if (delta < 1) {\n\t        return row;\n\t      }\n\n\t      return concat$5(row).call(row, repeat$3(_context = '&nbsp;|').call(_context, delta).split('|', delta));\n\t    }\n\t  }, {\n\t    key: \"$parseChartOptions\",\n\t    value: function $parseChartOptions(cell) {\n\t      // 初始化失败\n\t      if (!this.chartRenderEngine) {\n\t        return null;\n\t      }\n\n\t      var CHART_REGEX = /^[ ]*:(\\w+):(?:[ ]*{(.*?)}[ ]*)?$/;\n\n\t      if (!CHART_REGEX.test(cell)) {\n\t        return null;\n\t      }\n\n\t      var match = cell.match(CHART_REGEX);\n\n\t      var _match = _slicedToArray(match, 3),\n\t          chartType = _match[1],\n\t          axisOptions = _match[2];\n\n\t      var DEFAULT_AXIS_OPTIONS = ['x', 'y'];\n\t      return {\n\t        type: chartType,\n\t        options: axisOptions ? axisOptions.split(/\\s*,\\s*/) : DEFAULT_AXIS_OPTIONS\n\t      };\n\t    }\n\t  }, {\n\t    key: \"$parseColumnAlignRules\",\n\t    value: function $parseColumnAlignRules(row) {\n\t      var COLUMN_ALIGN_MAP = {\n\t        L: 'left',\n\t        R: 'right',\n\t        C: 'center'\n\t      };\n\t      var COLUMN_ALIGN_CACHE_SIGN = ['U', 'L', 'R', 'C']; // U for undefined\n\n\t      var textAlignRules = map$3(row).call(row, function (rule) {\n\t        var $rule = trim$3(rule).call(rule);\n\n\t        var index = 0;\n\n\t        if (/^:/.test($rule)) {\n\t          index += 1;\n\t        }\n\n\t        if (/:$/.test($rule)) {\n\t          index += 2;\n\t        }\n\n\t        return COLUMN_ALIGN_CACHE_SIGN[index];\n\t      });\n\n\t      return {\n\t        textAlignRules: textAlignRules,\n\t        COLUMN_ALIGN_MAP: COLUMN_ALIGN_MAP\n\t      };\n\t    }\n\t  }, {\n\t    key: \"$parseTable\",\n\t    value: function $parseTable(lines, sentenceMakeFunc, dataLines) {\n\t      var _context2,\n\t          _this2 = this,\n\t          _context8,\n\t          _context9,\n\t          _context10,\n\t          _context11,\n\t          _context12;\n\n\t      var maxCol = 0;\n\n\t      var rows = map$3(lines).call(lines, function (line, index) {\n\t        var cols = line.replace(/\\\\\\|/g, '~CS').split('|');\n\n\t        if (cols[0] === '') {\n\t          cols.shift();\n\t        }\n\n\t        if (cols[cols.length - 1] === '') {\n\t          cols.pop();\n\t        } // 文本对齐相关列，不作为最多列数的参考依据\n\n\n\t        index !== 1 && (maxCol = Math.max(maxCol, cols.length));\n\t        return cols;\n\t      });\n\n\t      var _this$$parseColumnAli = this.$parseColumnAlignRules(rows[1]),\n\t          textAlignRules = _this$$parseColumnAli.textAlignRules,\n\t          COLUMN_ALIGN_MAP = _this$$parseColumnAli.COLUMN_ALIGN_MAP;\n\n\t      var tableObject = {\n\t        header: [],\n\t        rows: [],\n\t        colLength: maxCol,\n\t        rowLength: rows.length - 2 // 去除表头和控制行\n\n\t      };\n\t      var chartOptions = this.$parseChartOptions(rows[0][0]);\n\t      var chartOptionsSign = this.$engine.md5(rows[0][0]); // 如果需要生成图表，\n\n\t      if (chartOptions) {\n\t        rows[0][0] = '';\n\t      }\n\t      /**\n\t       * ~CTHD: <thead>\n\t       * ~CTHD$: </thead>\n\t       * ~CTBD: <tbody>\n\t       * ~CTBD$: </tbody>\n\t       * ~CTR: <tr>\n\t       * ~CTR$: </tr>\n\t       * ~CTH(L|R|C|U): <th>\n\t       * ~CTH$: </th>\n\t       * ~CTD(L|R|C|U): <td>\n\t       * ~CTD$: </td>\n\t       */\n\n\n\t      var tableHeader = map$3(_context2 = this.$extendColumns(rows[0], maxCol)).call(_context2, function (cell, col) {\n\t        var _context3, _context4;\n\n\t        tableObject.header.push(cell.replace(/~CS/g, '\\\\|'));\n\n\t        var _sentenceMakeFunc = sentenceMakeFunc(trim$3(_context3 = cell.replace(/~CS/g, '\\\\|')).call(_context3)),\n\t            cellHtml = _sentenceMakeFunc.html; // 前后补一个空格，否则自动链接会将缓存的内容全部收入链接内部\n\n\n\t        return concat$5(_context4 = \"~CTH\".concat(textAlignRules[col] || 'U', \" \")).call(_context4, cellHtml, \" ~CTH$\");\n\t      }).join('');\n\n\t      var tableRows = reduce$3(rows).call(rows, function (table, row, line) {\n\t        var _context5;\n\n\t        if (line <= 1) {\n\t          return table;\n\t        }\n\n\t        var currentRowCountWithoutHeader = line - 2;\n\t        tableObject.rows[currentRowCountWithoutHeader] = [];\n\n\t        var $extendedColumns = map$3(_context5 = _this2.$extendColumns(row, maxCol)).call(_context5, function (cell, col) {\n\t          var _context6, _context7;\n\n\t          tableObject.rows[currentRowCountWithoutHeader].push(cell.replace(/~CS/g, '\\\\|'));\n\n\t          var _sentenceMakeFunc2 = sentenceMakeFunc(trim$3(_context6 = cell.replace(/~CS/g, '\\\\|')).call(_context6)),\n\t              cellHtml = _sentenceMakeFunc2.html; // 前后补一个空格，否则自动链接会将缓存的内容全部收入链接内部\n\n\n\t          return concat$5(_context7 = \"~CTD\".concat(textAlignRules[col] || 'U', \" \")).call(_context7, cellHtml, \" ~CTD$\");\n\t        });\n\n\t        table.push(\"~CTR\".concat($extendedColumns.join(''), \"~CTR$\"));\n\t        return table;\n\t      }, []).join(''); // console.log('obj', tableObject);\n\n\n\t      var tableResult = this.$renderTable(COLUMN_ALIGN_MAP, tableHeader, tableRows, dataLines);\n\n\t      if (!chartOptions) {\n\t        return tableResult;\n\t      }\n\n\t      var chart = this.chartRenderEngine.render(chartOptions.type, chartOptions.options, tableObject);\n\n\t      var chartHtml = concat$5(_context8 = concat$5(_context9 = concat$5(_context10 = concat$5(_context11 = \"<figure id=\\\"table_chart_\".concat(chartOptionsSign, \"_\")).call(_context11, tableResult.sign, \"\\\"\\n      data-sign=\\\"table_chart_\")).call(_context10, chartOptionsSign, \"_\")).call(_context9, tableResult.sign, \"\\\" data-lines=\\\"0\\\">\")).call(_context8, chart, \"</figure>\");\n\n\t      return {\n\t        html: concat$5(_context12 = \"\".concat(chartHtml)).call(_context12, tableResult.html),\n\t        sign: chartOptionsSign + tableResult.sign\n\t      };\n\t    }\n\t    /**\n\t     * 如果table.head是空的，就不渲染<thead>了\n\t     * @param {String} str\n\t     * @returns {Boolean}\n\t     */\n\n\t  }, {\n\t    key: \"$testHeadEmpty\",\n\t    value: function $testHeadEmpty(str) {\n\t      var test = str.replace(/&nbsp;/g, '').replace(/\\s/g, '').replace(/(~CTH\\$|~CTHU|~CTHL|~CTHR|~CTHC)/g, '');\n\t      return (test === null || test === void 0 ? void 0 : test.length) > 0;\n\t    }\n\t  }, {\n\t    key: \"$renderTable\",\n\t    value: function $renderTable(COLUMN_ALIGN_MAP, tableHeader, tableRows, dataLines) {\n\t      var _context13, _context14, _context15, _context16;\n\n\t      var cacheSrc = this.$testHeadEmpty(tableHeader) ? concat$5(_context13 = \"~CTHD\".concat(tableHeader, \"~CTHD$~CTBD\")).call(_context13, tableRows, \"~CTBD$\") : \"~CTBD\".concat(tableRows, \"~CTBD$\");\n\t      var html = cacheSrc;\n\t      var sign = this.$engine.md5(html);\n\t      var renderHtml = html.replace(/~CTHD\\$/g, '</thead>').replace(/~CTHD/g, '<thead>').replace(/~CTBD\\$/g, '</tbody>').replace(/~CTBD/g, '</tbody>').replace(/~CTR\\$/g, '</tr>').replace(/~CTR/g, '<tr>').replace(/[ ]?~CTH\\$/g, '</th>').replace(/[ ]?~CTD\\$/g, '</td>') // 在这里将加上的空格还原回来\n\t      .replace(/~CT(D|H)(L|R|C|U)[ ]?/g, function (match, type, align) {\n\t        var tag = \"<t\".concat(type);\n\n\t        if (align === 'U') {\n\t          tag += '>';\n\t        } else {\n\t          tag += \" align=\\\"\".concat(COLUMN_ALIGN_MAP[align], \"\\\">\");\n\t        }\n\n\t        return tag;\n\t      }).replace(/\\\\\\|/g, '|'); // escape \\|\n\n\t      return {\n\t        html: concat$5(_context14 = concat$5(_context15 = concat$5(_context16 = \"<div class=\\\"cherry-table-container\\\" data-sign=\\\"\".concat(sign)).call(_context16, dataLines, \"\\\" data-lines=\\\"\")).call(_context15, dataLines, \"\\\">\\n        <table class=\\\"cherry-table\\\">\")).call(_context14, renderHtml, \"</table></div>\"),\n\t        sign: sign\n\t      };\n\t    }\n\t  }, {\n\t    key: \"makeHtml\",\n\t    value: function makeHtml(str, sentenceMakeFunc) {\n\t      var _this3 = this;\n\n\t      var $str = str; // strict fenced mode\n\n\t      if (this.test($str, TABLE_STRICT)) {\n\t        $str = $str.replace(this.RULE[TABLE_STRICT].reg, function (match, leading) {\n\t          var _context17;\n\n\t          var dataLines = _this3.getLineCount(match, leading); // 必须先trim，否则分割出来的结果不对\n\t          // 将fenced mode转换为loose mode\n\n\n\t          var lines = map$3(_context17 = trim$3(match).call(match).split(/\\n/)).call(_context17, function (line) {\n\t            var _context18;\n\n\t            return trim$3(_context18 = String(line)).call(_context18);\n\t          });\n\n\t          var _this3$$parseTable = _this3.$parseTable(lines, sentenceMakeFunc, dataLines),\n\t              table = _this3$$parseTable.html,\n\t              sign = _this3$$parseTable.sign;\n\n\t          return _this3.getCacheWithSpace(_this3.pushCache(table, sign, dataLines), match);\n\t        });\n\t      } // loose mode\n\n\n\t      if (this.test($str, TABLE_LOOSE)) {\n\t        // console.log(TABLE_LOOSE);\n\t        $str = $str.replace(this.RULE[TABLE_LOOSE].reg, function (match, leading) {\n\t          var _context19;\n\n\t          var dataLines = _this3.getLineCount(match, leading); // 必须先trim，否则分割出来的结果不对\n\n\n\t          var lines = map$3(_context19 = trim$3(match).call(match).split(/\\n/)).call(_context19, function (line) {\n\t            var _context20;\n\n\t            return trim$3(_context20 = String(line)).call(_context20);\n\t          });\n\n\t          var _this3$$parseTable2 = _this3.$parseTable(lines, sentenceMakeFunc, dataLines),\n\t              table = _this3$$parseTable2.html,\n\t              sign = _this3$$parseTable2.sign;\n\n\t          return _this3.getCacheWithSpace(_this3.pushCache(table, sign, dataLines), match);\n\t        });\n\t      }\n\n\t      return $str;\n\t    }\n\t  }, {\n\t    key: \"test\",\n\t    value: function test(str, flavor) {\n\t      return this.RULE[flavor].reg && this.RULE[flavor].reg.test(str);\n\t    }\n\t  }, {\n\t    key: \"rule\",\n\t    value: function rule() {\n\t      return getTableRule();\n\t    }\n\t  }]);\n\n\t  return Table;\n\t}(ParagraphBase);\n\n\t_defineProperty(Table, \"HOOK_NAME\", 'table');\n\n\t/**\n\t * Copyright (C) 2021 THL A29 Limited, a Tencent company.\n\t *\n\t * Licensed under the Apache License, Version 2.0 (the \"License\");\n\t * you may not use this file except in compliance with the License.\n\t * You may obtain a copy of the License at\n\t *\n\t *     http://www.apache.org/licenses/LICENSE-2.0\n\t *\n\t * Unless required by applicable law or agreed to in writing, software\n\t * distributed under the License is distributed on an \"AS IS\" BASIS,\n\t * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n\t * See the License for the specific language governing permissions and\n\t * limitations under the License.\n\t */\n\n\t/**\n\t * 判断当前是否浏览器环境\n\t * @returns\n\t */\n\tfunction isBrowser() {\n\t  return (typeof window === \"undefined\" ? \"undefined\" : _typeof(window)) === 'object';\n\t}\n\n\tfunction _createSuper$g(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$g(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = construct$4(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\n\tfunction _isNativeReflectConstruct$g() { if (typeof Reflect === \"undefined\" || !construct$4) return false; if (construct$4.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(construct$4(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\n\tvar Br = /*#__PURE__*/function (_ParagraphBase) {\n\t  _inherits(Br, _ParagraphBase);\n\n\t  var _super = _createSuper$g(Br);\n\n\t  function Br(options) {\n\t    var _this;\n\n\t    _classCallCheck(this, Br);\n\n\t    _this = _super.call(this, {\n\t      needCache: true\n\t    });\n\t    _this.classicBr = testKeyInLocal('classicBr') ? getIsClassicBrFromLocal() : options.globalConfig.classicBr;\n\t    return _this;\n\t  }\n\n\t  _createClass(Br, [{\n\t    key: \"beforeMakeHtml\",\n\t    value: function beforeMakeHtml(str) {\n\t      var _this2 = this;\n\n\t      if (!this.test(str)) {\n\t        return str;\n\t      }\n\n\t      return str.replace(this.RULE.reg, function (match, lines, index) {\n\t        var _lines$match$length, _lines$match;\n\n\t        // 不处理全文开头的连续空行\n\t        if (index === 0) {\n\t          return match;\n\t        }\n\n\t        var lineCount = (_lines$match$length = (_lines$match = lines.match(/\\n/g)) === null || _lines$match === void 0 ? void 0 : _lines$match.length) !== null && _lines$match$length !== void 0 ? _lines$match$length : 0;\n\t        var sign = \"br\".concat(lineCount);\n\t        var html = '';\n\n\t        if (isBrowser()) {\n\t          // 为了同步滚动\n\t          if (_this2.classicBr) {\n\t            var _context;\n\n\t            html = concat$5(_context = \"<span data-sign=\\\"\".concat(sign, \"\\\" data-type=\\\"br\\\" data-lines=\\\"\")).call(_context, lineCount, \"\\\"></span>\");\n\t          } else {\n\t            var _context2;\n\n\t            html = concat$5(_context2 = \"<p data-sign=\\\"\".concat(sign, \"\\\" data-type=\\\"br\\\" data-lines=\\\"\")).call(_context2, lineCount, \"\\\">&nbsp;</p>\");\n\t          }\n\t        } else {\n\t          // node环境下直接输出br\n\t          html = _this2.classicBr ? '' : '<br/>';\n\t        }\n\n\t        var placeHolder = _this2.pushCache(html, sign, lineCount); // 结尾只补充一个\\n是因为Br将下一个段落中间的所有换行都替换掉了，而两个换行符会导致下一个区块行数计算错误\n\n\n\t        return \"\\n\\n\".concat(placeHolder, \"\\n\");\n\t      });\n\t    }\n\t  }, {\n\t    key: \"makeHtml\",\n\t    value: function makeHtml(str, sentenceMakeFunc) {\n\t      return str;\n\t    } // afterMakeHtml(str) {\n\t    //     return str.replace(/~~B/g, (match) => {\n\t    //         let lines = that.brCache.shift() - 1;\n\t    //         return '<p data-sign=\"br' + lines + '\" data-type=\"br\" data-lines=\"' + lines + '\">&nbsp;</p>';\n\t    //     });\n\t    // }\n\t    // default: this.restoreCache();\n\n\t  }, {\n\t    key: \"rule\",\n\t    value: function rule() {\n\t      /**\n\t       * 样例：\n\t       * block1\\n\n\t       * \\n\n\t       * \\n\n\t       * block2\n\t       *\n\t       * 匹配逻辑：\n\t       * 开头必为一个换行符，所以后续只需要匹配至少两个空行即可生成一个换行，行数即content匹配到的换行符个数\n\t       */\n\t      var ret = {\n\t        begin: '(?:\\\\n)',\n\t        end: '',\n\t        content: '((?:\\\\h*\\\\n){2,})'\n\t      };\n\t      ret.reg = compileRegExp(ret, 'g', true);\n\t      return ret;\n\t    }\n\t  }]);\n\n\t  return Br;\n\t}(ParagraphBase);\n\n\t_defineProperty(Br, \"HOOK_NAME\", 'br');\n\n\tfunction _createSuper$h(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$h(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = construct$4(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\n\tfunction _isNativeReflectConstruct$h() { if (typeof Reflect === \"undefined\" || !construct$4) return false; if (construct$4.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(construct$4(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\t/**\n\t * 分割线语法\n\t */\n\n\tvar Hr = /*#__PURE__*/function (_ParagraphBase) {\n\t  _inherits(Hr, _ParagraphBase);\n\n\t  var _super = _createSuper$h(Hr);\n\n\t  function Hr() {\n\t    _classCallCheck(this, Hr);\n\n\t    return _super.call(this, {\n\t      needCache: true\n\t    });\n\t  }\n\n\t  _createClass(Hr, [{\n\t    key: \"beforeMakeHtml\",\n\t    value: function beforeMakeHtml(str) {\n\t      var _this = this;\n\n\t      return str.replace(this.RULE.reg, function (match, preLines) {\n\t        var _context;\n\n\t        var lineCount = (preLines.match(/\\n/g) || []).length + 1; // 计算签名，签名可能会重复，符合预期\n\n\t        var sign = \"hr\".concat(lineCount);\n\n\t        var placeHolder = _this.pushCache(concat$5(_context = \"<hr data-sign=\\\"\".concat(sign, \"\\\" data-lines=\\\"\")).call(_context, lineCount, \"\\\" />\"), sign);\n\n\t        return prependLineFeedForParagraph(match, placeHolder);\n\t      });\n\t    }\n\t  }, {\n\t    key: \"makeHtml\",\n\t    value: function makeHtml(str, sentenceMakeFunc) {\n\t      return str;\n\t    }\n\t  }, {\n\t    key: \"rule\",\n\t    value: function rule() {\n\t      // 分割线必须有从新行开始，比如以换行结束\n\t      var ret = {\n\t        begin: '(?:^|\\\\n)(\\\\n*)[ ]*',\n\t        end: '(?=$|\\\\n)',\n\t        content: '((?:-[ \\\\t]*){3,}|(?:\\\\*[ \\\\t]*){3,}|(?:_[ \\\\t]*){3,})'\n\t      };\n\t      ret.reg = new RegExp(ret.begin + ret.content + ret.end, 'g');\n\t      return ret;\n\t    }\n\t  }]);\n\n\t  return Hr;\n\t}(ParagraphBase);\n\n\t_defineProperty(Hr, \"HOOK_NAME\", 'hr');\n\n\t/**\n\t * Copyright (C) 2021 THL A29 Limited, a Tencent company.\n\t *\n\t * Licensed under the Apache License, Version 2.0 (the \"License\");\n\t * you may not use this file except in compliance with the License.\n\t * You may obtain a copy of the License at\n\t *\n\t *     http://www.apache.org/licenses/LICENSE-2.0\n\t *\n\t * Unless required by applicable law or agreed to in writing, software\n\t * distributed under the License is distributed on an \"AS IS\" BASIS,\n\t * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n\t * See the License for the specific language governing permissions and\n\t * limitations under the License.\n\t */\n\tvar imgAltHelper = {\n\t  /**\n\t   * 提取alt部分的扩展属性\n\t   * @param {string} alt 图片引用中的alt部分\n\t   * @returns\n\t   */\n\t  processExtendAttributesInAlt: function processExtendAttributesInAlt(alt) {\n\t    var attrRegex = /#([0-9]+(px|em|pt|pc|in|mm|cm|ex|%)|auto)/g;\n\t    var info = alt.match(attrRegex);\n\n\t    if (!info) {\n\t      return '';\n\t    }\n\n\t    var extendAttrs = '';\n\n\t    var _info = _slicedToArray(info, 2),\n\t        width = _info[0],\n\t        height = _info[1];\n\n\t    if (width) {\n\t      extendAttrs = \" width=\\\"\".concat(width.replace(/[ #]*/g, ''), \"\\\"\");\n\t    }\n\n\t    if (height) {\n\t      extendAttrs += \" height=\\\"\".concat(height.replace(/[ #]*/g, ''), \"\\\"\");\n\t    }\n\n\t    return extendAttrs;\n\t  },\n\n\t  /**\n\t   * 提取alt部分的扩展样式\n\t   * @param {string} alt 图片引用中的alt部分\n\t   * @returns {{extendStyles:string, extendClasses:string}}\n\t   */\n\t  processExtendStyleInAlt: function processExtendStyleInAlt(alt) {\n\t    var extendStyles = this.$getAlignment(alt);\n\t    var extendClasses = '';\n\t    var info = alt.match(/#(border|shadow|radius|B|S|R)/g);\n\n\t    if (info) {\n\t      for (var i = 0; i < info.length; i++) {\n\t        switch (info[i]) {\n\t          case '#border':\n\t          case '#B':\n\t            extendStyles += 'border:1px solid #888888;padding: 2px;box-sizing: border-box;';\n\t            extendClasses += ' cherry-img-border';\n\t            break;\n\n\t          case '#shadow':\n\t          case '#S':\n\t            extendStyles += 'box-shadow:0 2px 15px -5px rgb(0 0 0 / 50%);';\n\t            extendClasses += ' cherry-img-shadow';\n\t            break;\n\n\t          case '#radius':\n\t          case '#R':\n\t            extendStyles += 'border-radius: 15px;';\n\t            extendClasses += ' cherry-img-radius';\n\t            break;\n\t        }\n\t      }\n\t    }\n\n\t    return {\n\t      extendStyles: extendStyles,\n\t      extendClasses: extendClasses\n\t    };\n\t  },\n\n\t  /**\n\t   * 从alt中提取对齐方式信息\n\t   * @param {string} alt\n\t   * @returns {string}\n\t   */\n\t  $getAlignment: function $getAlignment(alt) {\n\t    var styleRegex = /#(center|right|left|float-right|float-left)/i;\n\t    var info = alt.match(styleRegex);\n\n\t    if (!info) {\n\t      return '';\n\t    }\n\n\t    var _info2 = _slicedToArray(info, 2),\n\t        alignment = _info2[1];\n\n\t    switch (alignment) {\n\t      case 'center':\n\t        return 'transform:translateX(-50%);margin-left:50%;display:block;';\n\n\t      case 'right':\n\t        return 'transform:translateX(-100%);margin-left:100%;margin-right:-100%;display:block;';\n\n\t      case 'left':\n\t        return 'transform:translateX(0);margin-left:0;display:block;';\n\n\t      case 'float-right':\n\t        return 'float:right;transform:translateX(0);margin-left:0;display:block;';\n\n\t      case 'float-left':\n\t        return 'float:left;transform:translateX(0);margin-left:0;display:block;';\n\t    }\n\t  }\n\t};\n\n\tfunction ownKeys$5(object, enumerableOnly) { var keys = keys$3(object); if (getOwnPropertySymbols$2) { var symbols = getOwnPropertySymbols$2(object); enumerableOnly && (symbols = filter$3(symbols).call(symbols, function (sym) { return getOwnPropertyDescriptor$3(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\n\n\tfunction _objectSpread$4(target) { for (var i = 1; i < arguments.length; i++) { var _context22, _context23; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? forEach$3(_context22 = ownKeys$5(Object(source), !0)).call(_context22, function (key) { _defineProperty(target, key, source[key]); }) : getOwnPropertyDescriptors$2 ? defineProperties$2(target, getOwnPropertyDescriptors$2(source)) : forEach$3(_context23 = ownKeys$5(Object(source))).call(_context23, function (key) { defineProperty$5(target, key, getOwnPropertyDescriptor$3(source, key)); }); } return target; }\n\n\tfunction _createSuper$i(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$i(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = construct$4(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\n\tfunction _isNativeReflectConstruct$i() { if (typeof Reflect === \"undefined\" || !construct$4) return false; if (construct$4.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(construct$4(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\n\tvar replacerFactory = function replacerFactory(type, match, leadingChar, alt, link, title, posterContent, config, globalConfig) {\n\t  var refType = typeof link === 'undefined' ? 'ref' : 'url';\n\t  var attrs = '';\n\n\t  if (refType === 'ref') {\n\t    // TODO: 全局引用\n\t    return match;\n\t  }\n\n\t  if (refType === 'url') {\n\t    var _context, _context2, _context3, _context4, _context5, _context6, _context7, _context8;\n\n\t    var extent = imgAltHelper.processExtendAttributesInAlt(alt);\n\n\t    var _imgAltHelper$process = imgAltHelper.processExtendStyleInAlt(alt),\n\t        style = _imgAltHelper$process.extendStyles,\n\t        classes = _imgAltHelper$process.extendClasses;\n\n\t    if (style) {\n\t      style = \" style=\\\"\".concat(style, \"\\\" \");\n\t    }\n\n\t    if (classes) {\n\t      classes = \" class=\\\"\".concat(classes, \"\\\" \");\n\t    }\n\n\t    attrs = title && trim$3(title).call(title) !== '' ? \" title=\\\"\".concat(escapeHTMLSpecialCharOnce(title), \"\\\"\") : '';\n\n\t    if (posterContent) {\n\t      attrs += \" poster=\".concat(encodeURIOnce(posterContent));\n\t    }\n\n\t    var processedURL = globalConfig.urlProcessor(link, type);\n\n\t    var defaultWrapper = concat$5(_context = concat$5(_context2 = concat$5(_context3 = concat$5(_context4 = concat$5(_context5 = concat$5(_context6 = concat$5(_context7 = \"<\".concat(type, \" src=\\\"\")).call(_context7, UrlCache.set(encodeURIOnce(processedURL)), \"\\\"\")).call(_context6, attrs, \" \")).call(_context5, extent, \" \")).call(_context4, style, \" \")).call(_context3, classes, \" controls=\\\"controls\\\">\")).call(_context2, escapeHTMLSpecialCharOnce(alt || ''), \"</\")).call(_context, type, \">\");\n\n\t    return concat$5(_context8 = \"\".concat(leadingChar)).call(_context8, config.videoWrapper ? config.videoWrapper(link) : defaultWrapper);\n\t  } // should never happen\n\n\n\t  return match;\n\t};\n\n\tvar Image$1 = /*#__PURE__*/function (_SyntaxBase) {\n\t  _inherits(Image, _SyntaxBase);\n\n\t  var _super = _createSuper$i(Image);\n\n\t  function Image(_ref) {\n\t    var _this;\n\n\t    var config = _ref.config,\n\t        globalConfig = _ref.globalConfig;\n\n\t    _classCallCheck(this, Image);\n\n\t    _this = _super.call(this, null);\n\t    _this.urlProcessor = globalConfig.urlProcessor; // TODO: URL Validator\n\n\t    _this.extendMedia = {\n\t      tag: ['video', 'audio'],\n\t      replacer: {\n\t        video: function video(match, leadingChar, alt, link, title, poster) {\n\t          return replacerFactory('video', match, leadingChar, alt, link, title, poster, config, globalConfig);\n\t        },\n\t        audio: function audio(match, leadingChar, alt, link, title, poster) {\n\t          return replacerFactory('audio', match, leadingChar, alt, link, title, poster, config, globalConfig);\n\t        }\n\t      }\n\t    };\n\t    _this.RULE = _this.rule(_this.extendMedia);\n\t    return _this;\n\t  }\n\n\t  _createClass(Image, [{\n\t    key: \"toHtml\",\n\t    value: function toHtml(match, leadingChar, alt, link, title, ref, extendAttrs) {\n\t      // console.log(match, alt, link, ref, title);\n\t      var refType = typeof link === 'undefined' ? 'ref' : 'url';\n\t      var attrs = '';\n\n\t      if (refType === 'ref') {\n\t        // 全局引用，理应在CommentReference中被替换，没有被替换说明没有定义引用项\n\t        return match;\n\t      }\n\n\t      if (refType === 'url') {\n\t        var _context9, _context10, _context11, _context12, _context13, _context14, _context15, _context16;\n\n\t        var extent = imgAltHelper.processExtendAttributesInAlt(alt);\n\n\t        var _imgAltHelper$process2 = imgAltHelper.processExtendStyleInAlt(alt),\n\t            style = _imgAltHelper$process2.extendStyles,\n\t            classes = _imgAltHelper$process2.extendClasses;\n\n\t        if (style) {\n\t          style = \" style=\\\"\".concat(style, \"\\\" \");\n\t        }\n\n\t        if (classes) {\n\t          classes = \" class=\\\"\".concat(classes, \"\\\" \");\n\t        }\n\n\t        attrs = title && trim$3(title).call(title) !== '' ? \" title=\\\"\".concat(escapeHTMLSpecialCharOnce(title.replace(/[\"']/g, '')), \"\\\"\") : '';\n\t        var srcProp = 'src';\n\t        var srcValue;\n\t        var cherryOptions = this.$engine.$cherry.options;\n\n\t        if (cherryOptions.callback && cherryOptions.callback.beforeImageMounted) {\n\t          var imgAttrs = cherryOptions.callback.beforeImageMounted(srcProp, link);\n\t          srcProp = imgAttrs.srcProp || srcProp;\n\t          srcValue = imgAttrs.src || link;\n\t        }\n\n\t        var extendAttrStr = extendAttrs ? extendAttrs.replace(/[{}]/g, '').replace(/([^=\\s]+)=([^\\s]+)/g, '$1=\"$2\"').replace(/&/g, '&amp;') // 对&多做一次转义，cherry现有的机制会自动把&amp;转成&，只有多做一次转义才能抵消cherry的机制\n\t        : '';\n\t        return concat$5(_context9 = concat$5(_context10 = concat$5(_context11 = concat$5(_context12 = concat$5(_context13 = concat$5(_context14 = concat$5(_context15 = concat$5(_context16 = \"\".concat(leadingChar, \"<img \")).call(_context16, srcProp, \"=\\\"\")).call(_context15, UrlCache.set(encodeURIOnce(this.urlProcessor(srcValue, 'image'))), \"\\\" \")).call(_context14, extent, \" \")).call(_context13, style, \" \")).call(_context12, classes, \" alt=\\\"\")).call(_context11, escapeHTMLSpecialCharOnce(alt || ''), \"\\\"\")).call(_context10, attrs, \" \")).call(_context9, extendAttrStr, \"/>\");\n\t      } // should never happen\n\n\n\t      return match;\n\t    }\n\t  }, {\n\t    key: \"toMediaHtml\",\n\t    value: function toMediaHtml(match, leadingChar, mediaType, alt, link, title, ref, posterWrap, poster) {\n\t      var _this$extendMedia$rep, _context17;\n\n\t      if (!this.extendMedia.replacer[mediaType]) {\n\t        return match;\n\t      }\n\n\t      for (var _len = arguments.length, args = new Array(_len > 9 ? _len - 9 : 0), _key = 9; _key < _len; _key++) {\n\t        args[_key - 9] = arguments[_key];\n\t      }\n\n\t      return (_this$extendMedia$rep = this.extendMedia.replacer[mediaType]).call.apply(_this$extendMedia$rep, concat$5(_context17 = [this, match, leadingChar, alt, link, title, poster]).call(_context17, args));\n\t    }\n\t  }, {\n\t    key: \"makeHtml\",\n\t    value: function makeHtml(str) {\n\t      var $str = str;\n\n\t      if (this.test($str)) {\n\t        if (isLookbehindSupported()) {\n\t          var _context18;\n\n\t          $str = $str.replace(this.RULE.reg, bind$5(_context18 = this.toHtml).call(_context18, this));\n\t        } else {\n\t          var _context19;\n\n\t          $str = replaceLookbehind($str, this.RULE.reg, bind$5(_context19 = this.toHtml).call(_context19, this), true, 1);\n\t        }\n\t      }\n\n\t      if (this.testMedia($str)) {\n\t        if (isLookbehindSupported()) {\n\t          var _context20;\n\n\t          $str = $str.replace(this.RULE.regExtend, bind$5(_context20 = this.toMediaHtml).call(_context20, this));\n\t        } else {\n\t          var _context21;\n\n\t          $str = replaceLookbehind($str, this.RULE.regExtend, bind$5(_context21 = this.toMediaHtml).call(_context21, this), true, 1);\n\t        }\n\t      }\n\n\t      return $str;\n\t    } // afterMakeHtml(str) {\n\t    //   return UrlCache.restoreAll(str);\n\t    // }\n\n\t  }, {\n\t    key: \"testMedia\",\n\t    value: function testMedia(str) {\n\t      return this.RULE.regExtend && this.RULE.regExtend.test(str);\n\t    }\n\t  }, {\n\t    key: \"rule\",\n\t    value: function rule(extendMedia) {\n\t      var ret = {\n\t        // lookbehind启用分组是为了和不兼容lookbehind的场景共用一个回调\n\t        begin: isLookbehindSupported() ? '((?<!\\\\\\\\))!' : '(^|[^\\\\\\\\])!',\n\t        content: ['\\\\[([^\\\\n]*?)\\\\]', // ?<alt>\n\t        '[ \\\\t]*', // any spaces\n\t        \"\".concat('(?:' + '\\\\(' + '([^\"][^\\\\s]+?)' + // ?<link> url\n\t        '(?:[ \\\\t]((?:\".*?\")|(?:\\'.*?\\')))?' + // ?<title> optional\n\t        '\\\\)' + '|' + // or\n\t        '\\\\[(').concat(NOT_ALL_WHITE_SPACES_INLINE, \")\\\\]\") + // ?<ref> global ref\n\t        ')'].join(''),\n\t        end: '({[^{}]+?})?' // extend attrs e.g. {width=50 height=60}\n\n\t      };\n\n\t      if (extendMedia) {\n\t        var extend = _objectSpread$4({}, ret); // TODO: 支持Lookbehind\n\n\n\t        extend.begin = isLookbehindSupported() ? \"((?<!\\\\\\\\))!(\".concat(extendMedia.tag.join('|'), \")\") : \"(^|[^\\\\\\\\])!(\".concat(extendMedia.tag.join('|'), \")\");\n\t        extend.end = '({poster=(.*)})?';\n\t        ret.regExtend = compileRegExp(extend, 'g');\n\t      }\n\n\t      ret.reg = compileRegExp(ret, 'g');\n\t      return ret;\n\t    }\n\t  }]);\n\n\t  return Image;\n\t}(SyntaxBase);\n\n\t_defineProperty(Image$1, \"HOOK_NAME\", 'image');\n\n\tfunction ownKeys$6(object, enumerableOnly) { var keys = keys$3(object); if (getOwnPropertySymbols$2) { var symbols = getOwnPropertySymbols$2(object); enumerableOnly && (symbols = filter$3(symbols).call(symbols, function (sym) { return getOwnPropertyDescriptor$3(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\n\n\tfunction _objectSpread$5(target) { for (var i = 1; i < arguments.length; i++) { var _context10, _context11; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? forEach$3(_context10 = ownKeys$6(Object(source), !0)).call(_context10, function (key) { _defineProperty(target, key, source[key]); }) : getOwnPropertyDescriptors$2 ? defineProperties$2(target, getOwnPropertyDescriptors$2(source)) : forEach$3(_context11 = ownKeys$6(Object(source))).call(_context11, function (key) { defineProperty$5(target, key, getOwnPropertyDescriptor$3(source, key)); }); } return target; }\n\n\tfunction _createSuper$j(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$j(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = construct$4(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\n\tfunction _isNativeReflectConstruct$j() { if (typeof Reflect === \"undefined\" || !construct$4) return false; if (construct$4.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(construct$4(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\tvar INDENT_SPACE_NUM = 4; // commonmark default use 1~4 spaces for indent\n\n\tvar TAB_SPACE_NUM = 4; // 1 tab === 4 space\n\n\tfunction attrsToAttributeString(object) {\n\t  var _context;\n\n\t  if (_typeof(object) !== 'object' && keys$3(object).length < 1) {\n\t    return '';\n\t  }\n\n\t  var attrs = ['']; // 为了join一步到位\n\n\t  forEach$3(_context = keys$3(object)).call(_context, function (key) {\n\t    var _context2;\n\n\t    attrs.push(concat$5(_context2 = \"\".concat(key, \"=\\\"\")).call(_context2, object[key], \"\\\"\"));\n\t  });\n\n\t  return attrs.join(' ');\n\t}\n\n\tfunction makeChecklist(text) {\n\t  return text.replace(/^((?:|[\\t ]+)[*+-]\\s+)\\[(\\s|x)\\]/gm, function (whole, pre, test) {\n\t    var _context3;\n\n\t    var checkHtml = /\\s/.test(test) ? '<span class=\"ch-icon ch-icon-square\"></span>' : '<span class=\"ch-icon ch-icon-check\"></span>';\n\t    return concat$5(_context3 = \"\".concat(pre)).call(_context3, checkHtml);\n\t  });\n\t} // 缩进处理\n\n\tfunction handleIndent(str, node) {\n\t  var indentRegex = /^(\\t|[ ])/;\n\t  var $str = str;\n\n\t  while (indentRegex.test($str)) {\n\t    node.space += $str[0] === '\\t' ? TAB_SPACE_NUM : 1;\n\t    $str = $str.replace(indentRegex, '');\n\t  }\n\n\t  return $str;\n\t} // 序号样式处理\n\n\n\tfunction getListStyle(m2) {\n\t  if (/^[a-z]/.test(m2)) {\n\t    return 'lower-greek';\n\t  }\n\n\t  if (/^[一二三四五六七八九十]/.test(m2)) {\n\t    return 'cjk-ideographic';\n\t  }\n\n\t  if (/^I/.test(m2)) {\n\t    return 'upper-roman';\n\t  }\n\n\t  if (/^\\+/.test(m2)) {\n\t    return 'circle';\n\t  }\n\n\t  if (/^\\*/.test(m2)) {\n\t    return 'square';\n\t  }\n\n\t  return 'default';\n\t} // 标识符处理\n\n\n\tfunction handleMark(str, node) {\n\t  var listRegex = /^((([*+-]|\\d+[.]|[a-z]\\.|[I一二三四五六七八九十]+\\.)[ \\t]+)([^\\r]*?)($|\\n{2,}(?=\\S)(?![ \\t]*(?:[*+-]|\\d+[.]|[a-z]\\.|[I一二三四五六七八九十]+\\.)[ \\t]+)))/;\n\n\t  if (!listRegex.test(str)) {\n\t    node.type = 'blank';\n\t    return str;\n\t  }\n\n\t  return str.replace(listRegex, function (wholeMatch, m1, m2, m3, m4) {\n\t    node.type = m2.search(/[*+-]/g) > -1 ? 'ul' : 'ol';\n\t    node.listStyle = getListStyle(m2);\n\t    node.start = Number(m2.replace('.', '')) ? Number(m2.replace('.', '')) : 1;\n\t    return m4;\n\t  });\n\t}\n\n\tvar Node$1 = /*#__PURE__*/_createClass( // 列表树节点\n\tfunction Node() {\n\t  _classCallCheck(this, Node);\n\n\t  this.index = 0;\n\t  this.space = 0;\n\t  this.type = '';\n\t  this.start = 1;\n\t  this.listStyle = '';\n\t  this.strs = [];\n\t  this.children = [];\n\t  this.lines = 0;\n\t});\n\n\tvar List = /*#__PURE__*/function (_ParagraphBase) {\n\t  _inherits(List, _ParagraphBase);\n\n\t  var _super = _createSuper$j(List);\n\n\t  function List(_ref) {\n\t    var _this;\n\n\t    var config = _ref.config;\n\n\t    _classCallCheck(this, List);\n\n\t    _this = _super.call(this, {\n\t      needCache: true\n\t    });\n\t    _this.config = config || {};\n\t    _this.tree = [];\n\t    _this.emptyLines = 0;\n\t    _this.indentSpace = Math.max(_this.config.indentSpace, 2);\n\t    return _this;\n\t  }\n\n\t  _createClass(List, [{\n\t    key: \"addNode\",\n\t    value: function addNode(node, current, parent, last) {\n\t      if (node.type === 'blank') {\n\t        this.tree[last].strs.push(node.strs[0]);\n\t      } else {\n\t        this.tree[parent].children.push(current);\n\t        this.tree[current] = _objectSpread$5(_objectSpread$5({}, node), {}, {\n\t          parent: parent\n\t        });\n\t      }\n\t    }\n\t  }, {\n\t    key: \"buildTree\",\n\t    value: function buildTree(html, sentenceMakeFunc) {\n\t      var items = html.split('\\n');\n\t      this.tree = [];\n\t      items.unshift(''); // 列表结尾换行符个数\n\n\t      var endLineFlagLength = html.match(/\\n*$/g)[0].length;\n\n\t      for (var i = 0; i < items.length - endLineFlagLength; i++) {\n\t        var node = new Node$1();\n\t        items[i] = handleIndent(items[i], node);\n\t        items[i] = handleMark(items[i], node);\n\t        node.strs.push(sentenceMakeFunc(items[i]).html);\n\t        node.index = i;\n\n\t        if (i === 0) {\n\t          // 根节点\n\t          node.space = -2;\n\t          this.tree.push(node);\n\t          continue;\n\t        }\n\n\t        var last = i - 1;\n\n\t        while (!this.tree[last]) {\n\t          last -= 1;\n\t        }\n\n\t        if (node.type === 'blank') {\n\t          this.addNode(node, i, this.tree[last].parent, last);\n\t        } else {\n\t          while (!this.tree[last] || this.tree[last].space > node.space) {\n\t            last -= 1;\n\t          }\n\n\t          var space = node.space;\n\t          var lastSpace = this.tree[last].space;\n\n\t          if (space < lastSpace + this.indentSpace) {\n\t            // 成为同级节点\n\t            if (this.config.listNested && this.tree[last].type !== node.type) {\n\t              this.addNode(node, i, last);\n\t            } else {\n\t              this.addNode(node, i, this.tree[last].parent);\n\t            }\n\t          } else if (space < lastSpace + this.indentSpace + INDENT_SPACE_NUM) {\n\t            // 成为子节点\n\t            this.addNode(node, i, last);\n\t          } else {\n\t            // 纯文本\n\t            node.type = 'blank';\n\t            this.addNode(node, i, this.tree[last].parent, last);\n\t          }\n\t        }\n\t      }\n\t    }\n\t  }, {\n\t    key: \"renderSubTree\",\n\t    value: function renderSubTree(node, children, type) {\n\t      var _this2 = this,\n\t          _context7,\n\t          _context8,\n\t          _context9;\n\n\t      var lines = 0;\n\t      var attr = {};\n\n\t      var content = reduce$3(children).call(children, function (html, item) {\n\t        var _context4, _context5, _context6;\n\n\t        var child = _this2.tree[item];\n\t        var itemAttr = {};\n\t        var str = \"<p>\".concat(child.strs.join('<br>'), \"</p>\");\n\t        child.lines += _this2.getLineCount(child.strs.join('\\n'));\n\t        var children = child.children.length ? _this2.renderTree(item) : '';\n\t        node.lines += child.lines;\n\t        lines += child.lines; // checklist 样式适配\n\n\t        var checklistRegex = /<span class=\"ch-icon ch-icon-(square|check)\"><\\/span>/;\n\n\t        if (checklistRegex.test(str)) {\n\t          itemAttr[\"class\"] = 'check-list-item';\n\t        }\n\n\t        return concat$5(_context4 = concat$5(_context5 = concat$5(_context6 = \"\".concat(html, \"<li\")).call(_context6, attrsToAttributeString(itemAttr), \">\")).call(_context5, str)).call(_context4, children, \"</li>\");\n\t      }, '');\n\n\t      if (node.parent === undefined) {\n\t        // 根节点增加属性\n\t        attr['data-lines'] = node.index === 0 ? lines + this.emptyLines : lines;\n\t        attr['data-sign'] = this.sign;\n\t      }\n\n\t      if (children[0] && type === 'ol') {\n\t        attr.start = this.tree[children[0]].start;\n\t      }\n\n\t      attr[\"class\"] = \"cherry-list__\".concat(this.tree[children[0]].listStyle);\n\t      return concat$5(_context7 = concat$5(_context8 = concat$5(_context9 = \"<\".concat(type)).call(_context9, attrsToAttributeString(attr), \">\")).call(_context8, content, \"</\")).call(_context7, type, \">\");\n\t    }\n\t  }, {\n\t    key: \"renderTree\",\n\t    value: function renderTree(current) {\n\t      var _this3 = this;\n\n\t      var from = 0;\n\t      var node = this.tree[current];\n\t      var children = node.children;\n\n\t      var html = reduce$3(children).call(children, function (html, item, index) {\n\t        if (index === 0) return html;\n\n\t        if (_this3.tree[children[index]].type === _this3.tree[children[index - 1]].type) {\n\t          return html;\n\t        }\n\n\t        var subTree = _this3.renderSubTree(node, slice$7(children).call(children, from, index), _this3.tree[children[index - 1]].type);\n\n\t        from = index;\n\t        return html + subTree;\n\t      }, '');\n\n\t      var childrenHtml = children.length ? this.renderSubTree(node, slice$7(children).call(children, from, children.length), this.tree[children[children.length - 1]].type) : '';\n\t      return html + childrenHtml;\n\t    }\n\t  }, {\n\t    key: \"toHtml\",\n\t    value: function toHtml(wholeMatch, sentenceMakeFunc) {\n\t      var _wholeMatch$match$len, _wholeMatch$match;\n\n\t      // 行数计算吸收的空行\n\t      this.emptyLines = (_wholeMatch$match$len = (_wholeMatch$match = wholeMatch.match(/^\\n\\n/)) === null || _wholeMatch$match === void 0 ? void 0 : _wholeMatch$match.length) !== null && _wholeMatch$match$len !== void 0 ? _wholeMatch$match$len : 0;\n\t      var text = wholeMatch.replace(/~0$/g, '').replace(/^\\n+/, '');\n\t      this.buildTree(makeChecklist(text), sentenceMakeFunc);\n\t      var result = this.renderTree(0);\n\t      return this.pushCache(result, this.sign, this.$getLineNum(wholeMatch));\n\t    }\n\t  }, {\n\t    key: \"$getLineNum\",\n\t    value: function $getLineNum(str) {\n\t      var _str$match$length, _str$match, _$str$match$length, _$str$match;\n\n\t      var beginLine = (_str$match$length = (_str$match = str.match(/^\\n\\n/)) === null || _str$match === void 0 ? void 0 : _str$match.length) !== null && _str$match$length !== void 0 ? _str$match$length : 0;\n\t      var $str = str.replace(/^\\n+/, '').replace(/\\n+$/, '\\n');\n\t      return (_$str$match$length = (_$str$match = $str.match(/\\n/g)) === null || _$str$match === void 0 ? void 0 : _$str$match.length) !== null && _$str$match$length !== void 0 ? _$str$match$length : 0 + beginLine;\n\t    }\n\t  }, {\n\t    key: \"makeHtml\",\n\t    value: function makeHtml(str, sentenceMakeFunc) {\n\t      var _this4 = this;\n\n\t      var $str = \"\".concat(str, \"~0\");\n\n\t      if (this.test($str)) {\n\t        $str = $str.replace(this.RULE.reg, function (wholeMatch) {\n\t          return _this4.getCacheWithSpace(_this4.checkCache(wholeMatch, sentenceMakeFunc, _this4.$getLineNum(wholeMatch)), wholeMatch);\n\t        });\n\t      }\n\n\t      $str = $str.replace(/~0$/g, '');\n\t      return $str;\n\t    }\n\t  }, {\n\t    key: \"rule\",\n\t    value: function rule() {\n\t      var ret = {\n\t        begin: '(?:^|\\n)(\\n*)(([ ]{0,3}([*+-]|\\\\d+[.]|[a-z]\\\\.|[I一二三四五六七八九十]+\\\\.)[ \\\\t]+)',\n\t        content: '([^\\\\r]+?)',\n\t        end: '(~0|\\\\n{2,}(?=\\\\S)(?![ \\\\t]*(?:[*+-]|\\\\d+[.]|[a-z]\\\\.|[I一二三四五六七八九十]+\\\\.)[ \\\\t]+)))'\n\t      };\n\t      ret.reg = new RegExp(ret.begin + ret.content + ret.end, 'gm');\n\t      return ret;\n\t    }\n\t  }]);\n\n\t  return List;\n\t}(ParagraphBase);\n\n\t_defineProperty(List, \"HOOK_NAME\", 'list');\n\n\tfunction _createSuper$k(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$k(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = construct$4(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\n\tfunction _isNativeReflectConstruct$k() { if (typeof Reflect === \"undefined\" || !construct$4) return false; if (construct$4.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(construct$4(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\n\tfunction computeLeadingSpaces(leadingChars) {\n\t  var indentRegex = /^(\\t|[ ]{1,4})/;\n\t  var leadingCharsTemp = leadingChars;\n\t  var indent = 0;\n\n\t  while (indentRegex.test(leadingCharsTemp)) {\n\t    leadingCharsTemp = leadingCharsTemp.replace(/^(\\t|[ ]{1,4})/g, '');\n\t    indent += 1;\n\t  }\n\n\t  return indent;\n\t}\n\n\tvar Blockquote = /*#__PURE__*/function (_ParagraphBase) {\n\t  _inherits(Blockquote, _ParagraphBase);\n\n\t  var _super = _createSuper$k(Blockquote);\n\n\t  function Blockquote() {\n\t    _classCallCheck(this, Blockquote);\n\n\t    return _super.call(this, {\n\t      needCache: true\n\t    }); // TODO: String.prototype.repeat polyfill\n\t  }\n\n\t  _createClass(Blockquote, [{\n\t    key: \"handleMatch\",\n\t    value: function handleMatch(str, sentenceMakeFunc) {\n\t      var _this = this;\n\n\t      return str.replace(this.RULE.reg, function (match, lines, content) {\n\t        var _context, _context2, _context4;\n\n\t        var _sentenceMakeFunc = sentenceMakeFunc(content),\n\t            contentSign = _sentenceMakeFunc.sign,\n\t            parsedHtml = _sentenceMakeFunc.html;\n\n\t        var sign = _this.signWithCache(parsedHtml) || contentSign;\n\n\t        var lineCount = _this.getLineCount(match, lines); // 段落所占行数\n\n\n\t        var listRegex = /^(([ \\t]{0,3}([*+-]|\\d+[.]|[a-z]\\.|[I一二三四五六七八九十]+\\.)[ \\t]+)([^\\r]+?)($|\\n{2,}(?=\\S)(?![ \\t]*(?:[*+-]|\\d+[.]|[a-z]\\.|[I一二三四五六七八九十]+\\.)[ \\t]+)))/;\n\t        var lastIndent = computeLeadingSpaces(lines); // 逐行处理\n\n\t        var contentLines = parsedHtml.split('\\n');\n\t        var replaceReg = /^[>\\s]+/;\n\t        var countReg = />/g;\n\t        var lastLevel = 1;\n\t        var level = 0;\n\n\t        var handledHtml = concat$5(_context = concat$5(_context2 = \"<blockquote data-sign=\\\"\".concat(sign, \"_\")).call(_context2, lineCount, \"\\\" data-lines=\\\"\")).call(_context, lineCount, \"\\\">\");\n\n\t        for (var i = 0; contentLines[i]; i++) {\n\t          if (i !== 0) {\n\t            var leadIndent = computeLeadingSpaces(contentLines[i]);\n\n\t            if (leadIndent <= lastIndent && listRegex.test(contentLines[i])) {\n\t              break;\n\t            }\n\n\t            lastIndent = leadIndent;\n\t          }\n\t          /* eslint-disable no-loop-func */\n\n\n\t          var $line = contentLines[i].replace(replaceReg, function (leadSymbol) {\n\t            var leadSymbols = leadSymbol.match(countReg); // 本行引用嵌套层级比上层要多\n\n\t            if (leadSymbols && leadSymbols.length > lastLevel) {\n\t              level = leadSymbols.length;\n\t            } else {\n\t              // 否则保持当前缩进层级\n\t              level = lastLevel;\n\t            }\n\n\t            return '';\n\t          }); // 同层级，且不为首行时补充一个换行\n\n\t          if (lastLevel === level && i !== 0) {\n\t            handledHtml += '<br>';\n\t          } // 补充缩进\n\n\n\t          if (lastLevel < level) {\n\t            var _context3;\n\n\t            handledHtml += repeat$3(_context3 = '<blockquote>').call(_context3, level - lastLevel);\n\t            lastLevel = level;\n\t          } // 插入当前行内容\n\n\n\t          handledHtml += $line;\n\t        } // 标签闭合\n\n\n\t        handledHtml += repeat$3(_context4 = '</blockquote>').call(_context4, lastLevel);\n\t        return _this.getCacheWithSpace(_this.pushCache(handledHtml, sign, lineCount), match);\n\t      });\n\t    }\n\t  }, {\n\t    key: \"makeHtml\",\n\t    value: function makeHtml(str, sentenceMakeFunc) {\n\t      if (!this.test(str)) {\n\t        return str;\n\t      }\n\n\t      return this.handleMatch(str, sentenceMakeFunc);\n\t    }\n\t  }, {\n\t    key: \"rule\",\n\t    value: function rule() {\n\t      var ret = {\n\t        begin: '(?:^|\\\\n)(\\\\s*)',\n\t        content: ['(', '>(?:.+?\\\\n(?![*+-]|\\\\d+[.]|[a-z]\\\\.))(?:>*.+?\\\\n(?![*+-]|\\\\d+[.]|[a-z]\\\\.))*(?:>*.+?)', // multiline\n\t        '|', // or\n\t        '>(?:.+?)', // single line\n\t        ')'].join(''),\n\t        end: '(?=(\\\\n)|$)'\n\t      };\n\t      ret.reg = compileRegExp(ret, 'g');\n\t      return ret;\n\t    }\n\t  }]);\n\n\t  return Blockquote;\n\t}(ParagraphBase);\n\n\t_defineProperty(Blockquote, \"HOOK_NAME\", 'blockquote');\n\n\tfunction _createSuper$l(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$l(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = construct$4(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\n\tfunction _isNativeReflectConstruct$l() { if (typeof Reflect === \"undefined\" || !construct$4) return false; if (construct$4.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(construct$4(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\n\tvar AutoLink = /*#__PURE__*/function (_SyntaxBase) {\n\t  _inherits(AutoLink, _SyntaxBase);\n\n\t  var _super = _createSuper$l(AutoLink);\n\n\t  function AutoLink(_ref) {\n\t    var _this;\n\n\t    var config = _ref.config,\n\t        globalConfig = _ref.globalConfig;\n\n\t    _classCallCheck(this, AutoLink);\n\n\t    _this = _super.call(this, {\n\t      config: config\n\t    });\n\t    _this.urlProcessor = globalConfig.urlProcessor;\n\t    _this.enableShortLink = !!config.enableShortLink;\n\t    _this.shortLinkLength = config.shortLinkLength; // eslint-disable-next-line no-nested-ternary\n\n\t    _this.target = config.target ? \"target=\\\"\".concat(config.target, \"\\\"\") : !!config.openNewPage ? 'target=\"_blank\"' : '';\n\t    _this.rel = config.rel ? \"rel=\\\"\".concat(config.rel, \"\\\"\") : '';\n\t    return _this;\n\t  }\n\n\t  _createClass(AutoLink, [{\n\t    key: \"isLinkInHtmlAttribute\",\n\t    value: function isLinkInHtmlAttribute(str, index, linkLength) {\n\t      var xmlTagRegex = new RegExp(['<', // tag start\n\t      '([a-zA-Z][a-zA-Z0-9-]*)', // tagName\n\t      '(', // attrs start\n\t      ['\\\\s+[a-zA-Z_:][a-zA-Z0-9_.:-]*', // attr name\n\t      '(', // attr value start\n\t      ['\\\\s*=\\\\s*', '(', ['([^\\\\s\"\\'=<>`]+)', // unquoted value\n\t      \"('[^']*')\", // single-quoted value\n\t      '(\"[^\"]*\")' // double-quoted value\n\t      ].join('|'), // either is ok\n\t      ')'].join(''), ')?' // attr value end\n\t      ].join(''), ')*', // attrs end\n\t      '\\\\s*[/]?>' // tag end\n\t      ].join(''), 'g');\n\t      var match;\n\n\t      while ((match = xmlTagRegex.exec(str)) !== null) {\n\t        // 搜索范围超过了字符串匹配到的位置\n\t        if (match.index > index + linkLength) {\n\t          break;\n\t        } // 正好在范围内，说明是HTML的属性，取等号是因为AutoLink的正则可能会匹配到标签的结束符号，如<img src=\"http://www.google.com\">\n\n\n\t        if (match.index < index && match.index + match[0].length >= index + linkLength) {\n\t          return true;\n\t        }\n\t      }\n\n\t      return false;\n\t    }\n\t    /**\n\t     * 判断链接是否被包裹在a标签内部，如果被包裹，则不识别为自动链接\n\t     * @param {string} str\n\t     * @param {number} index\n\t     * @param {number} linkLength\n\t     */\n\n\t  }, {\n\t    key: \"isLinkInATag\",\n\t    value: function isLinkInATag(str, index, linkLength) {\n\t      var aTagRegex = /<a.*>[^<]*<\\/a>/g;\n\t      var match;\n\n\t      while ((match = aTagRegex.exec(str)) !== null) {\n\t        // 搜索范围超过了字符串匹配到的位置\n\t        if (match.index > index + linkLength) {\n\t          break;\n\t        } // 正好在范围内，说明是HTML的属性，取等号是因为AutoLink的正则可能会匹配到标签的结束符号\n\t        // 如<a href=\"http://www.google.com\">http://www.google.com</a>\n\n\n\t        if (match.index < index && match.index + match[0].length >= index + linkLength) {\n\t          return true;\n\t        }\n\t      }\n\n\t      return false;\n\t    }\n\t  }, {\n\t    key: \"makeHtml\",\n\t    value: function makeHtml(str, sentenceMakeFunc) {\n\t      var _this2 = this;\n\n\t      if (!(this.test(str) && (EMAIL_INLINE.test(str) || URL_INLINE_NO_SLASH.test(str)))) {\n\t        return str;\n\t      }\n\n\t      return str.replace(this.RULE.reg, function (match, left, protocol, address, right, index, str) {\n\t        var _context17, _context18, _context19;\n\n\t        // 数字实体字符系临时处理方法，详情参见HTMLBlock注释\n\t        // maybe a html attr, skip it\n\t        if ( // ((left !== '<' || left !== '&#60;') && (right !== '>' || right !== '&#62;')) ||\n\t        _this2.isLinkInHtmlAttribute(str, index, protocol.length + address.length) || _this2.isLinkInATag(str, index, protocol.length + address.length)) {\n\t          return match;\n\t        }\n\n\t        var $protocol = protocol.toLowerCase();\n\t        var prefix = '';\n\t        var suffix = '';\n\t        var isWrappedByBracket = true; // not a pair\n\n\t        if (!((left === '<' || left === '&#60;') && (right === '>' || right === '&#62;'))) {\n\t          prefix = left;\n\t          suffix = right;\n\t          isWrappedByBracket = false;\n\t        } // not a valid address\n\t        // 不被尖括号包裹，不带协议头，且不以www.开头的不识别\n\n\n\t        if (trim$3(address).call(address) === '' || !isWrappedByBracket && $protocol === '' && !/www\\./.test(address)) {\n\t          return match;\n\t        }\n\n\t        switch ($protocol) {\n\t          case 'javascript:':\n\t            return match;\n\n\t          case 'mailto:':\n\t            // email\n\t            if (EMAIL.test(address)) {\n\t              var _context, _context2, _context3, _context4, _context5, _context6;\n\n\t              return concat$5(_context = concat$5(_context2 = concat$5(_context3 = concat$5(_context4 = concat$5(_context5 = \"\".concat(prefix, \"<a href=\\\"\")).call(_context5, encodeURIOnce(concat$5(_context6 = \"\".concat($protocol)).call(_context6, address)), \"\\\" \")).call(_context4, _this2.target, \" \")).call(_context3, _this2.rel, \">\")).call(_context2, escapeHTMLSpecialCharOnce(address), \"</a>\")).call(_context, suffix);\n\t            }\n\n\t            return match;\n\n\t          case '':\n\t            // 协议为空\n\t            // 不被<>包裹或单边无效包裹，prefix === suffix 时都为空串\n\t            if (prefix === suffix || !isWrappedByBracket) {\n\t              // mailto\n\t              if (EMAIL.test(address)) {\n\t                var _context7, _context8, _context9, _context10, _context11;\n\n\t                return concat$5(_context7 = concat$5(_context8 = concat$5(_context9 = concat$5(_context10 = concat$5(_context11 = \"\".concat(prefix, \"<a href=\\\"mailto:\")).call(_context11, encodeURIOnce(address), \"\\\" \")).call(_context10, _this2.target, \" \")).call(_context9, _this2.rel, \">\")).call(_context8, escapeHTMLSpecialCharOnce(address), \"</a>\")).call(_context7, suffix);\n\t              } // 不识别无协议头的URL，且开头不应该含有斜杠\n\n\n\t              if (URL_NO_SLASH.test(address)) {\n\t                var _context12, _context13;\n\n\t                return concat$5(_context12 = concat$5(_context13 = \"\".concat(prefix)).call(_context13, _this2.renderLink(\"//\".concat(address), address))).call(_context12, suffix);\n\t              } // 其他的属于非法情况\n\n\n\t              return match;\n\t            } // 被<>包裹\n\n\n\t            if (isWrappedByBracket) {\n\t              // mailto\n\t              if (EMAIL.test(address)) {\n\t                var _context14, _context15, _context16;\n\n\t                return concat$5(_context14 = concat$5(_context15 = concat$5(_context16 = \"<a href=\\\"mailto:\".concat(encodeURIOnce(address), \"\\\" \")).call(_context16, _this2.target, \" \")).call(_context15, _this2.rel, \">\")).call(_context14, escapeHTMLSpecialCharOnce(address), \"</a>\");\n\t              } // 可识别任意协议的URL，或不以斜杠开头的URL\n\n\n\t              if (URL$1.test(address) || URL_NO_SLASH.test(address)) {\n\t                return _this2.renderLink(address);\n\t              } // 其他非法\n\n\n\t              return match;\n\t            }\n\n\t          default:\n\t            // 协议头不为空时的非法URL\n\t            if (!URL$1.test(address)) {\n\t              return match;\n\t            } // TODO: Url Validator\n\n\n\t            return concat$5(_context17 = concat$5(_context18 = \"\".concat(prefix)).call(_context18, _this2.renderLink(concat$5(_context19 = \"\".concat($protocol)).call(_context19, address)))).call(_context17, suffix);\n\t        } // this should never happen\n\n\n\t        return match;\n\t      });\n\t    }\n\t  }, {\n\t    key: \"rule\",\n\t    value: function rule() {\n\t      var _context20;\n\n\t      // (?<protocol>\\\\w+:)\\\\/\\\\/\n\t      var ret = {\n\t        // ?<left>\n\t        begin: '(<?)',\n\t        content: [// ?<protocol>\n\t        '((?:[a-z][a-z0-9+.-]{1,31}:)?)', // protocol is any seq of 2-32 chars beginning with letter\n\t        // '(?<slash>(?:\\\\/{2})?)',\n\t        // ?<address>\n\t        // '([^\\\\s\\\\x00-\\\\x1f\"<>]+)',\n\t        concat$5(_context20 = \"((?:\".concat(URL_INLINE.source, \")|(?:\")).call(_context20, EMAIL_INLINE.source, \"))\") // [\n\t        //     `(?<url>${ URL_INLINE.source })`,\n\t        //     `(?<email>${ EMAIL_INLINE.source })`, // email\n\t        // ].join('|'),\n\t        // ')'\n\t        ].join(''),\n\t        // ?<right>\n\t        end: '(>?)' // TODO: extend attrs e.g. {target=_blank}\n\n\t      };\n\t      ret.reg = compileRegExp(ret, 'ig');\n\t      return ret;\n\t    }\n\t    /**\n\t     * 渲染链接为a标签，返回html\n\t     * @param {string} url src链接\n\t     * @param {string} [text] 展示的链接文本，不传默认使用url\n\t     * @returns 渲染的a标签\n\t     */\n\n\t  }, {\n\t    key: \"renderLink\",\n\t    value: function renderLink(url, text) {\n\t      var _context22, _context23, _context24, _context25;\n\n\t      var linkText = text;\n\n\t      if (typeof linkText !== 'string') {\n\t        if (this.enableShortLink) {\n\t          var _context21;\n\n\t          var Url = url.replace(/^https?:\\/\\//i, '');\n\t          linkText = concat$5(_context21 = \"\".concat(Url.substring(0, this.shortLinkLength))).call(_context21, Url.length > this.shortLinkLength ? '...' : '');\n\t        } else {\n\t          linkText = url;\n\t        }\n\t      }\n\n\t      var processedURL = this.urlProcessor(url, 'autolink');\n\t      return concat$5(_context22 = concat$5(_context23 = concat$5(_context24 = concat$5(_context25 = \"<a \".concat(this.target, \" \")).call(_context25, this.rel, \" title=\\\"\")).call(_context24, escapeHTMLSpecialCharOnce(url).replace(/_/g, '\\\\_'), \"\\\"  href=\\\"\")).call(_context23, encodeURIOnce(processedURL).replace(/_/g, '\\\\_'), \"\\\">\")).call(_context22, escapeHTMLSpecialCharOnce(linkText).replace(/_/g, '\\\\_'), \"</a>\");\n\t    }\n\t  }]);\n\n\t  return AutoLink;\n\t}(SyntaxBase);\n\n\t_defineProperty(AutoLink, \"HOOK_NAME\", 'autoLink');\n\n\t/**\n\t * 装饰器，挂载对应的模块到实例上\n\t */\n\n\tfunction LoadMathModule() {\n\t  var _this$externals$katex, _this$externals, _this$externals$MathJ, _this$externals2;\n\n\t  if (!isBrowser()) {\n\t    return;\n\t  } // @ts-ignore\n\n\n\t  this.katex = (_this$externals$katex = (_this$externals = this.externals) === null || _this$externals === void 0 ? void 0 : _this$externals.katex) !== null && _this$externals$katex !== void 0 ? _this$externals$katex : window.katex; // @ts-ignore\n\n\t  this.MathJax = (_this$externals$MathJ = (_this$externals2 = this.externals) === null || _this$externals2 === void 0 ? void 0 : _this$externals2.MathJax) !== null && _this$externals$MathJ !== void 0 ? _this$externals$MathJ : window.MathJax;\n\t}\n\tvar configureMathJax = function configureMathJax(usePlugins) {\n\t  if (!isBrowser()) {\n\t    console.log('mathjax disabled');\n\t    return;\n\t  }\n\n\t  var plugins = usePlugins ? ['input/asciimath', '[tex]/noerrors', '[tex]/cancel', '[tex]/color', '[tex]/boldsymbol'] : []; // @ts-ignore\n\n\t  window.MathJax = {\n\t    startup: {\n\t      elements: ['.Cherry-Math', '.Cherry-InlineMath'],\n\t      typeset: true\n\t    },\n\t    tex: {\n\t      inlineMath: [['$', '$'], ['\\\\(', '\\\\)']],\n\t      displayMath: [['$$', '$$'], ['\\\\[', '\\\\]']],\n\t      tags: 'ams',\n\t      packages: {\n\t        '[+]': ['noerrors', 'cancel', 'color']\n\t      },\n\t      macros: {\n\t        bm: ['{\\\\boldsymbol{#1}}', 1]\n\t      }\n\t    },\n\t    options: {\n\t      skipHtmlTags: ['script', 'noscript', 'style', 'textarea', 'pre', 'code', 'a'],\n\t      ignoreHtmlClass: 'tex2jax_ignore',\n\t      processHtmlClass: 'tex2jax_process',\n\t      // 关闭 mathjax 菜单\n\t      enableMenu: false\n\t    },\n\t    loader: {\n\t      load: plugins\n\t    }\n\t  };\n\t};\n\tvar noEscape = ['&', '<', '>', '\"', \"'\"]; // 需要转换为HTML实体字符的符号\n\t// 用于预处理会在Markdown中被反转义的字符，如：\\\\ 会被反转义为 \\\n\n\tvar escapeFormulaPunctuations = function escapeFormulaPunctuations(formula) {\n\t  var $formula = formula.replace(new RegExp(PUNCTUATION, 'g'), function (match) {\n\t    if (indexOf$8(noEscape).call(noEscape, match) !== -1) {\n\t      // HTML特殊字符需要转换为实体字符，防XSS注入\n\t      return escapeHTMLSpecialChar(match);\n\t    }\n\n\t    return \"\\\\\".concat(match); // 先转义特殊字符，防止在afterMakeHtml中被反转义\n\t  });\n\t  return $formula;\n\t};\n\n\tfunction _createSuper$m(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$m(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = construct$4(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\n\tfunction _isNativeReflectConstruct$m() { if (typeof Reflect === \"undefined\" || !construct$4) return false; if (construct$4.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(construct$4(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\n\tvar MathBlock = /*#__PURE__*/function (_ParagraphBase) {\n\t  _inherits(MathBlock, _ParagraphBase);\n\n\t  var _super = _createSuper$m(MathBlock);\n\n\t  /**\n\t   * 块级公式语法\n\t   * 该语法具有排他性，并且需要优先其他段落级语法进行渲染\n\t   * @type {'katex' | 'MathJax' | 'node'}\n\t   */\n\t  // 渲染引擎，默认为MathJax，MathJax支持2.x与3.x版本\n\t  function MathBlock(_ref) {\n\t    var _config$engine;\n\n\t    var _this;\n\n\t    var config = _ref.config;\n\n\t    _classCallCheck(this, MathBlock);\n\n\t    _this = _super.call(this, {\n\t      needCache: true\n\t    }); // 非浏览器环境下配置为 node\n\n\t    _defineProperty(_assertThisInitialized(_this), \"engine\", 'MathJax');\n\n\t    _defineProperty(_assertThisInitialized(_this), \"katex\", void 0);\n\n\t    _defineProperty(_assertThisInitialized(_this), \"MathJax\", void 0);\n\n\t    _this.engine = isBrowser() ? (_config$engine = config.engine) !== null && _config$engine !== void 0 ? _config$engine : 'MathJax' : 'node';\n\t    return _this;\n\t  }\n\n\t  _createClass(MathBlock, [{\n\t    key: \"toHtml\",\n\t    value: function toHtml(wholeMatch, lineSpace, leadingChar, content) {\n\t      var _this$MathJax, _context5, _context6;\n\n\t      bind$5(LoadMathModule).call(LoadMathModule, this)('engine'); // 去掉开头的空字符，去掉结尾的换行符\n\n\n\t      var wholeMatchWithoutSpace = wholeMatch.replace(/^[ \\f\\r\\t\\v]*/, '').replace(/\\s*$/, ''); // 去掉匹配到的第一个换行符\n\n\t      var lineSpaceWithoutPreSpace = lineSpace.replace(/^[ \\f\\r\\t\\v]*\\n/, '');\n\t      var sign = this.$engine.md5(wholeMatch);\n\t      var lines = this.getLineCount(wholeMatchWithoutSpace, lineSpaceWithoutPreSpace); // 判断公式是不是新行输入，如果不是新行，则行号减1\n\n\t      if (!/\\n/.test(lineSpace)) {\n\t        lines -= 1;\n\t      } // 判断公式后面有没有尾接内容，如果尾接了内容，则行号减1\n\n\n\t      if (!/\\n\\s*$/.test(wholeMatch)) {\n\t        lines -= 1;\n\t      } // 目前的机制还没有测过lines为负数的情况，先不处理\n\n\n\t      lines = lines > 0 ? lines : 0;\n\n\t      if (this.engine === 'katex') {\n\t        var _context, _context2;\n\n\t        // katex渲染\n\t        var html = this.katex.renderToString(content, {\n\t          throwOnError: false,\n\t          displayMode: true\n\t        });\n\n\t        var _result = concat$5(_context = concat$5(_context2 = \"<div data-sign=\\\"\".concat(sign, \"\\\" class=\\\"Cherry-Math\\\" data-type=\\\"mathBlock\\\"\\n            data-lines=\\\"\")).call(_context2, lines, \"\\\">\")).call(_context, html, \"</div>\");\n\n\t        return leadingChar + this.getCacheWithSpace(this.pushCache(_result, sign, lines), wholeMatch);\n\t      }\n\n\t      if ((_this$MathJax = this.MathJax) !== null && _this$MathJax !== void 0 && _this$MathJax.tex2svg) {\n\t        var _context3, _context4;\n\n\t        // MathJax渲染\n\t        var svg = getHTML(this.MathJax.tex2svg(content), true);\n\n\t        var _result2 = concat$5(_context3 = concat$5(_context4 = \"<div data-sign=\\\"\".concat(sign, \"\\\" class=\\\"Cherry-Math\\\" data-type=\\\"mathBlock\\\"\\n            data-lines=\\\"\")).call(_context4, lines, \"\\\">\")).call(_context3, svg, \"</div>\");\n\n\t        return leadingChar + this.getCacheWithSpace(this.pushCache(_result2, sign, lines), wholeMatch);\n\t      } // 既无MathJax又无katex时，原样输出\n\n\n\t      var result = concat$5(_context5 = concat$5(_context6 = \"<div data-sign=\\\"\".concat(sign, \"\\\" class=\\\"Cherry-Math\\\" data-type=\\\"mathBlock\\\"\\n          data-lines=\\\"\")).call(_context6, lines, \"\\\">$$\")).call(_context5, escapeFormulaPunctuations(content), \"$$</div>\");\n\n\t      return leadingChar + this.getCacheWithSpace(this.pushCache(result, sign, lines), wholeMatch);\n\t    }\n\t  }, {\n\t    key: \"beforeMakeHtml\",\n\t    value: function beforeMakeHtml(str) {\n\t      var _context8;\n\n\t      if (isLookbehindSupported()) {\n\t        var _context7;\n\n\t        return str.replace(this.RULE.reg, bind$5(_context7 = this.toHtml).call(_context7, this));\n\t      }\n\n\t      return replaceLookbehind(str, this.RULE.reg, bind$5(_context8 = this.toHtml).call(_context8, this), true, 1);\n\t    }\n\t  }, {\n\t    key: \"makeHtml\",\n\t    value: function makeHtml(str) {\n\t      return str;\n\t    }\n\t  }, {\n\t    key: \"rule\",\n\t    value: function rule() {\n\t      var ret = {\n\t        begin: isLookbehindSupported() ? '(\\\\s*)((?<!\\\\\\\\))~D~D\\\\s*' : '(\\\\s*)(^|[^\\\\\\\\])~D~D\\\\s*',\n\t        content: '([\\\\w\\\\W]*?)',\n\t        end: '(\\\\s*)~D~D(?:\\\\s{0,1})'\n\t      };\n\t      ret.reg = new RegExp(ret.begin + ret.content + ret.end, 'g');\n\t      return ret;\n\t    }\n\t  }]);\n\n\t  return MathBlock;\n\t}(ParagraphBase);\n\n\t_defineProperty(MathBlock, \"HOOK_NAME\", 'mathBlock');\n\n\tfunction _createSuper$n(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$n(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = construct$4(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\n\tfunction _isNativeReflectConstruct$n() { if (typeof Reflect === \"undefined\" || !construct$4) return false; if (construct$4.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(construct$4(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\t/**\n\t * 行内公式的语法\n\t * 虽然叫做行内公式，Cherry依然将其视为“段落级语法”，因为其具备排他性并且需要优先渲染\n\t */\n\n\tvar InlineMath = /*#__PURE__*/function (_ParagraphBase) {\n\t  _inherits(InlineMath, _ParagraphBase);\n\n\t  var _super = _createSuper$n(InlineMath);\n\n\t  /** @type {'katex' | 'MathJax' | 'node'} */\n\t  // 渲染引擎，默认为MathJax，MathJax支持2.x与3.x版本\n\t  function InlineMath(_ref) {\n\t    var _config$engine;\n\n\t    var _this;\n\n\t    var config = _ref.config;\n\n\t    _classCallCheck(this, InlineMath);\n\n\t    _this = _super.call(this, {\n\t      needCache: true\n\t    }); // 非浏览器环境下配置为 node\n\n\t    _defineProperty(_assertThisInitialized(_this), \"engine\", 'MathJax');\n\n\t    _defineProperty(_assertThisInitialized(_this), \"katex\", void 0);\n\n\t    _defineProperty(_assertThisInitialized(_this), \"MathJax\", void 0);\n\n\t    _this.engine = isBrowser() ? (_config$engine = config.engine) !== null && _config$engine !== void 0 ? _config$engine : 'MathJax' : 'node';\n\t    return _this;\n\t  }\n\n\t  _createClass(InlineMath, [{\n\t    key: \"toHtml\",\n\t    value: function toHtml(wholeMatch, leadingChar, m1) {\n\t      var _this$katex, _this$MathJax, _context5, _context6;\n\n\t      if (!m1) {\n\t        return wholeMatch;\n\t      }\n\n\t      bind$5(LoadMathModule).call(LoadMathModule, this)('engine');\n\n\t      var linesArr = m1.match(/\\n/g);\n\t      var lines = linesArr ? linesArr.length + 2 : 2;\n\t      var sign = this.$engine.md5(wholeMatch);\n\n\t      if (this.engine === 'katex' && (_this$katex = this.katex) !== null && _this$katex !== void 0 && _this$katex.renderToString) {\n\t        var _context, _context2;\n\n\t        // katex渲染\n\t        var html = this.katex.renderToString(m1, {\n\t          throwOnError: false\n\t        });\n\n\t        var _result = concat$5(_context = concat$5(_context2 = \"\".concat(leadingChar, \"<span class=\\\"Cherry-InlineMath\\\" data-type=\\\"mathBlock\\\" data-lines=\\\"\")).call(_context2, lines, \"\\\">\")).call(_context, html, \"</span>\");\n\n\t        return this.pushCache(_result, ParagraphBase.IN_PARAGRAPH_CACHE_KEY_PREFIX + sign);\n\t      }\n\n\t      if ((_this$MathJax = this.MathJax) !== null && _this$MathJax !== void 0 && _this$MathJax.tex2svg) {\n\t        var _context3, _context4;\n\n\t        // MathJax渲染\n\t        var svg = getHTML(this.MathJax.tex2svg(m1, {\n\t          em: 12,\n\t          ex: 6,\n\t          display: false\n\t        }), true);\n\n\t        var _result2 = concat$5(_context3 = concat$5(_context4 = \"\".concat(leadingChar, \"<span class=\\\"Cherry-InlineMath\\\" data-type=\\\"mathBlock\\\" data-lines=\\\"\")).call(_context4, lines, \"\\\">\")).call(_context3, svg, \"</span>\");\n\n\t        return this.pushCache(_result2, ParagraphBase.IN_PARAGRAPH_CACHE_KEY_PREFIX + sign);\n\t      } // 既无MathJax又无katex时，原样输出\n\n\n\t      var result = concat$5(_context5 = concat$5(_context6 = \"\".concat(leadingChar, \"<span class=\\\"Cherry-InlineMath\\\" data-type=\\\"mathBlock\\\"\\n        data-lines=\\\"\")).call(_context6, lines, \"\\\">$\")).call(_context5, escapeFormulaPunctuations(m1), \"$</span>\");\n\n\t      return this.pushCache(result, ParagraphBase.IN_PARAGRAPH_CACHE_KEY_PREFIX + sign);\n\t    }\n\t  }, {\n\t    key: \"beforeMakeHtml\",\n\t    value: function beforeMakeHtml(str) {\n\t      var _this2 = this;\n\n\t      var $str = str; // 格里处理行内公式，让一个td里的行内公式语法生效，让跨td的行内公式语法失效\n\n\t      $str = $str.replace(getTableRule(true), function (whole) {\n\t        var _context7;\n\n\t        return map$3(_context7 = whole.split('|')).call(_context7, function (oneTd) {\n\t          return _this2.makeInlineMath(oneTd);\n\t        }).join('|').replace(/\\\\~D/g, '~D') // 出现反斜杠的情况（如/$e=m^2$）会导致多一个反斜杠，这里替换掉\n\t        .replace(/~D/g, '\\\\~D');\n\t      });\n\t      return this.makeInlineMath($str);\n\t    }\n\t  }, {\n\t    key: \"makeInlineMath\",\n\t    value: function makeInlineMath(str) {\n\t      var _context9;\n\n\t      if (!this.test(str)) {\n\t        return str;\n\t      }\n\n\t      if (isLookbehindSupported()) {\n\t        var _context8;\n\n\t        return str.replace(this.RULE.reg, bind$5(_context8 = this.toHtml).call(_context8, this));\n\t      }\n\n\t      return replaceLookbehind(str, this.RULE.reg, bind$5(_context9 = this.toHtml).call(_context9, this), true, 1);\n\t    }\n\t  }, {\n\t    key: \"makeHtml\",\n\t    value: function makeHtml(str) {\n\t      return str;\n\t    }\n\t  }, {\n\t    key: \"rule\",\n\t    value: function rule() {\n\t      var ret = {\n\t        begin: isLookbehindSupported() ? '((?<!\\\\\\\\))~D\\\\n?' : '(^|[^\\\\\\\\])~D\\\\n?',\n\t        content: '(.*?)\\\\n?',\n\t        end: '~D'\n\t      };\n\t      ret.reg = new RegExp(ret.begin + ret.content + ret.end, 'g');\n\t      return ret;\n\t    }\n\t  }]);\n\n\t  return InlineMath;\n\t}(ParagraphBase);\n\n\t_defineProperty(InlineMath, \"HOOK_NAME\", 'inlineMath');\n\n\t// `Array.prototype.fill` method implementation\n\t// https://tc39.es/ecma262/#sec-array.prototype.fill\n\tvar arrayFill = function fill(value /* , start = 0, end = @length */) {\n\t  var O = toObject(this);\n\t  var length = lengthOfArrayLike(O);\n\t  var argumentsLength = arguments.length;\n\t  var index = toAbsoluteIndex(argumentsLength > 1 ? arguments[1] : undefined, length);\n\t  var end = argumentsLength > 2 ? arguments[2] : undefined;\n\t  var endPos = end === undefined ? length : toAbsoluteIndex(end, length);\n\t  while (endPos > index) O[index++] = value;\n\t  return O;\n\t};\n\n\t// `Array.prototype.fill` method\n\t// https://tc39.es/ecma262/#sec-array.prototype.fill\n\t_export({ target: 'Array', proto: true }, {\n\t  fill: arrayFill\n\t});\n\n\tvar fill = entryVirtual('Array').fill;\n\n\tvar ArrayPrototype$b = Array.prototype;\n\n\tvar fill$1 = function (it) {\n\t  var own = it.fill;\n\t  return it === ArrayPrototype$b || (objectIsPrototypeOf(ArrayPrototype$b, it) && own === ArrayPrototype$b.fill) ? fill : own;\n\t};\n\n\tvar fill$2 = fill$1;\n\n\tvar fill$3 = fill$2;\n\n\tfunction _createSuper$o(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$o(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = construct$4(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\n\tfunction _isNativeReflectConstruct$o() { if (typeof Reflect === \"undefined\" || !construct$4) return false; if (construct$4.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(construct$4(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\n\tfunction defaultLinkProcessor(link) {\n\t  return link;\n\t}\n\n\tvar defaultOptions = {\n\t  tocStyle: 'plain',\n\t  // plain or nested\n\t  tocNodeClass: 'toc-li',\n\t  tocContainerClass: 'toc',\n\t  tocTitleClass: 'toc-title',\n\t  linkProcessor: defaultLinkProcessor\n\t};\n\tvar emptyLinePlaceholder = '<p data-sign=\"empty-toc\" data-lines=\"1\">&nbsp;</p>';\n\n\tvar Toc = /*#__PURE__*/function (_ParagraphBase) {\n\t  _inherits(Toc, _ParagraphBase);\n\n\t  var _super = _createSuper$o(Toc);\n\n\t  // plain or nested\n\n\t  /** 标记当前是否处于第一个toc，且仅渲染一个toc */\n\n\t  /** 允许渲染多个TOC */\n\t  function Toc(_ref) {\n\t    var _context;\n\n\t    var _this;\n\n\t    var externals = _ref.externals,\n\t        config = _ref.config;\n\n\t    _classCallCheck(this, Toc);\n\n\t    _this = _super.call(this, {\n\t      needCache: true\n\t    });\n\n\t    _defineProperty(_assertThisInitialized(_this), \"tocStyle\", 'nested');\n\n\t    _defineProperty(_assertThisInitialized(_this), \"tocNodeClass\", 'toc-li');\n\n\t    _defineProperty(_assertThisInitialized(_this), \"tocContainerClass\", 'toc');\n\n\t    _defineProperty(_assertThisInitialized(_this), \"tocTitleClass\", 'toc-title');\n\n\t    _defineProperty(_assertThisInitialized(_this), \"linkProcessor\", defaultLinkProcessor);\n\n\t    _defineProperty(_assertThisInitialized(_this), \"baseLevel\", 1);\n\n\t    _defineProperty(_assertThisInitialized(_this), \"isFirstTocToken\", true);\n\n\t    _defineProperty(_assertThisInitialized(_this), \"allowMultiToc\", false);\n\n\t    forEach$3(_context = keys$3(defaultOptions)).call(_context, function (key) {\n\t      _this[key] = config[key] || defaultOptions[key];\n\t    });\n\n\t    return _this;\n\t  }\n\n\t  _createClass(Toc, [{\n\t    key: \"beforeMakeHtml\",\n\t    value: function beforeMakeHtml(str) {\n\t      var _this2 = this;\n\n\t      var $str = str;\n\n\t      if (this.test($str, 'extend')) {\n\t        $str = $str.replace(this.RULE.extend.reg, function (match, lines, toc) {\n\t          if (!_this2.allowMultiToc && !_this2.isFirstTocToken) {\n\t            var _context2;\n\n\t            // 需要补齐非捕获的\\n，以及第一个分组中的\\n\n\t            return concat$5(_context2 = \"\\n\".concat(lines)).call(_context2, emptyLinePlaceholder);\n\t          }\n\n\t          var placeHolder = _this2.pushCache(match);\n\n\t          _this2.isFirstTocToken = false;\n\t          return prependLineFeedForParagraph(match, placeHolder);\n\t        });\n\t      }\n\n\t      if (this.test($str, 'standard')) {\n\t        $str = $str.replace(this.RULE.standard.reg, function (match, lines, toc) {\n\t          if (!_this2.allowMultiToc && !_this2.isFirstTocToken) {\n\t            var _context3;\n\n\t            // 需要补齐非捕获的\\n，以及第一个分组中的\\n\n\t            return concat$5(_context3 = \"\\n\".concat(lines)).call(_context3, emptyLinePlaceholder);\n\t          }\n\n\t          _this2.isFirstTocToken = false;\n\n\t          var placeHolder = _this2.pushCache(match);\n\n\t          return prependLineFeedForParagraph(match, placeHolder);\n\t        });\n\t      }\n\n\t      return $str;\n\t    }\n\t  }, {\n\t    key: \"makeHtml\",\n\t    value: function makeHtml(str) {\n\t      return str;\n\t    }\n\t  }, {\n\t    key: \"$makeLevel\",\n\t    value: function $makeLevel(num) {\n\t      var ret = '';\n\n\t      for (var i = this.baseLevel; i < num; i++) {\n\t        ret += '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;';\n\t      }\n\n\t      return ret;\n\t    }\n\t    /**\n\t     * 生成TOC节点HTML\n\t     * @param {{ level: number; id: string; text: string }} node Toc节点对象\n\t     * @param {boolean} prependWhitespaceIndent 是否在文本前插入缩进空格\n\t     * @param {boolean} [closeTag=true] 是否闭合标签\n\t     * @returns {string}\n\t     */\n\n\t  }, {\n\t    key: \"$makeTocItem\",\n\t    value: function $makeTocItem(node, prependWhitespaceIndent) {\n\t      var _context4, _context5, _context6, _context7, _context8;\n\n\t      var closeTag = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;\n\t      var nodePrefix = '';\n\n\t      if (prependWhitespaceIndent) {\n\t        nodePrefix = this.$makeLevel(node.level);\n\t      }\n\n\t      var tocLink = this.linkProcessor(\"#\".concat(node.id).replace(/safe_/g, '')); // transform header id to avoid being sanitized\n\n\t      return concat$5(_context4 = concat$5(_context5 = concat$5(_context6 = concat$5(_context7 = concat$5(_context8 = \"<li class=\\\"\".concat(this.tocNodeClass, \"\\\">\")).call(_context8, nodePrefix, \"<a href=\\\"\")).call(_context7, tocLink, \"\\\" class=\\\"level-\")).call(_context6, node.level, \"\\\">\")).call(_context5, node.text, \"</a>\")).call(_context4, closeTag ? '</li>' : '');\n\t    }\n\t  }, {\n\t    key: \"$makePlainToc\",\n\t    value: function $makePlainToc(tocNodeList) {\n\t      var _this3 = this;\n\n\t      // this.baseLevel = Math.min(...tocNodeList.map((node) => node.level));\n\t      var items = map$3(tocNodeList).call(tocNodeList, function (node) {\n\t        return _this3.$makeTocItem(node, true);\n\t      });\n\n\t      return items.join('');\n\t    }\n\t    /**\n\t     * 生成嵌套的TOC列表，算法思路参考flexmark\n\t     * @see https://github.com/vsch/flexmark-java/blob/master/flexmark-ext-toc/\n\t     * src/main/java/com/vladsch/flexmark/ext/toc/TocUtils.java#L140-L227\n\t     *\n\t     * @param {{ level:number; id:string; text:string }[]} nodeList 节点列表\n\t     * @returns {string}\n\t     */\n\n\t  }, {\n\t    key: \"$makeNestedToc\",\n\t    value: function $makeNestedToc(nodeList) {\n\t      var _context9,\n\t          _context10,\n\t          _this4 = this;\n\n\t      var lastLevel = 0;\n\n\t      var unclosedItem = fill$3(_context9 = new Array(7)).call(_context9, false);\n\n\t      var unclosedList = fill$3(_context10 = new Array(7)).call(_context10, false); // lists nodes for debug\n\t      // const lists = [];\n\t      // const nodes = [];\n\n\n\t      var html = '';\n\n\t      forEach$3(nodeList).call(nodeList, function (node) {\n\t        var nodeLevel = node.level;\n\n\t        if (lastLevel === 0) {\n\t          for (var i = nodeLevel; i >= _this4.baseLevel; i--) {\n\t            html += '<ul>'; // lists.push('ul');\n\t            // nodes.push(null);\n\n\t            unclosedList[i] = true;\n\t          }\n\n\t          html += _this4.$makeTocItem(node, false, false); // lists.push('li');\n\t          // nodes.push(node);\n\n\t          unclosedItem[nodeLevel] = true;\n\t          lastLevel = nodeLevel;\n\t          return;\n\t        }\n\n\t        if (nodeLevel < lastLevel) {\n\t          // 减少层级\n\t          for (var _i = lastLevel; _i >= nodeLevel; _i--) {\n\t            if (unclosedItem[_i]) {\n\t              html += '</li>'; // lists.push('/li');\n\t              // nodes.push(null);\n\n\t              unclosedItem[_i] = false;\n\t            } // 减少层级时，不闭合当前层级的列表，只闭合同层级的列表项\n\n\n\t            if (unclosedList[_i] && _i > nodeLevel) {\n\t              html += '</ul>'; // lists.push('/ul');\n\t              // nodes.push(null);\n\n\t              unclosedList[_i] = false;\n\t            }\n\t          }\n\n\t          unclosedItem[nodeLevel] = true;\n\t          html += _this4.$makeTocItem(node, false, false); // lists.push('li');\n\t          // nodes.push(node);\n\n\t          lastLevel = nodeLevel;\n\t        } else if (nodeLevel === lastLevel) {\n\t          if (unclosedItem[lastLevel]) {\n\t            html += '</li>'; // lists.push('/li');\n\t            // nodes.push(null);\n\t          }\n\n\t          html += _this4.$makeTocItem(node, false, false); // lists.push('li');\n\t          // nodes.push(node);\n\n\t          unclosedItem[nodeLevel] = true;\n\t          unclosedList[nodeLevel] = true;\n\t        } else {\n\t          // 增加层级\n\t          for (var _i2 = lastLevel + 1; _i2 <= nodeLevel; _i2++) {\n\t            html += '<ul>'; // lists.push('ul');\n\t            // nodes.push(null);\n\n\t            unclosedList[_i2] = true;\n\t          }\n\n\t          unclosedItem[nodeLevel] = true;\n\t          html += _this4.$makeTocItem(node, false, false); // lists.push('li');\n\t          // nodes.push(node);\n\n\t          lastLevel = nodeLevel;\n\t        }\n\t      });\n\n\t      for (var i = lastLevel; i >= this.baseLevel; i--) {\n\t        if (unclosedItem[i]) {\n\t          html += '</li>'; // lists.push('/li');\n\t          // nodes.push(null);\n\n\t          unclosedItem[i] = false;\n\t        }\n\n\t        if (unclosedList[i]) {\n\t          html += '</ul>'; // lists.push('/ul');\n\t          // nodes.push(null);\n\n\t          unclosedList[i] = false;\n\t        }\n\t      } // console.log(lists, nodes);\n\t      // console.log(html);\n\n\n\t      return html;\n\t    }\n\t  }, {\n\t    key: \"$makeToc\",\n\t    value: function $makeToc(arr, dataSign, preLinesMatch) {\n\t      var _context11, _context12, _context13;\n\n\t      var lines = calculateLinesOfParagraph(preLinesMatch, 1);\n\n\t      var ret = concat$5(_context11 = concat$5(_context12 = concat$5(_context13 = \"<dir class=\\\"\".concat(this.tocContainerClass, \"\\\" data-sign=\\\"\")).call(_context13, dataSign, \"-\")).call(_context12, lines, \"\\\" data-lines=\\\"\")).call(_context11, lines, \"\\\">\");\n\n\t      ret += \"<p class=\\\"\".concat(this.tocTitleClass, \"\\\">\\u76EE\\u5F55</p>\");\n\n\t      if (arr.length <= 0) {\n\t        return '';\n\t      }\n\n\t      this.baseLevel = Math.min.apply(Math, _toConsumableArray(map$3(arr).call(arr, function (node) {\n\t        return node.level;\n\t      })));\n\n\t      if (this.tocStyle === 'nested') {\n\t        ret += this.$makeNestedToc(arr);\n\t      } else {\n\t        ret += this.$makePlainToc(arr);\n\t      }\n\n\t      ret += '</dir>';\n\t      return ret;\n\t    }\n\t  }, {\n\t    key: \"afterMakeHtml\",\n\t    value: function afterMakeHtml(str) {\n\t      var _this5 = this;\n\n\t      var $str = _get(_getPrototypeOf(Toc.prototype), \"afterMakeHtml\", this).call(this, str);\n\n\t      var headerList = [];\n\t      var headerRegex = /<h([1-6])[^>]*? id=\"([^\"]+?)\"[^>]*?>(?:<a[^/]+?\\/a>|)(.+?)<\\/h\\1>/g;\n\t      var str2Md5 = '';\n\t      $str.replace(headerRegex, function (match, level, id, text) {\n\t        var _context14;\n\n\t        var $text = text.replace(/~fn#[0-9]+#/g, '');\n\t        headerList.push({\n\t          level: +level,\n\t          id: id,\n\t          text: $text\n\t        });\n\t        str2Md5 += concat$5(_context14 = \"\".concat(level)).call(_context14, id);\n\t      });\n\t      str2Md5 = this.$engine.md5(str2Md5);\n\t      $str = $str.replace(/(?:^|\\n)(\\[\\[|\\[|【【)(toc|TOC)(\\]\\]|\\]|】】)([<~])/, function (match) {\n\t        return match.replace(/(\\]\\]|\\]|】】)([<~])/, '$1\\n$2');\n\t      }); // 首先识别扩展语法\n\n\t      $str = $str.replace(this.RULE.extend.reg, function (match, preLinesMatch) {\n\t        return _this5.$makeToc(headerList, str2Md5, preLinesMatch);\n\t      }); // 处理标准语法\n\n\t      $str = $str.replace(this.RULE.standard.reg, function (match, preLinesMatch) {\n\t        return _this5.$makeToc(headerList, str2Md5, preLinesMatch);\n\t      }); // 重置toc状态\n\n\t      this.isFirstTocToken = true;\n\t      return $str;\n\t    }\n\t  }, {\n\t    key: \"test\",\n\t    value: function test(str, flavor) {\n\t      return this.RULE[flavor].reg ? this.RULE[flavor].reg.test(str) : false;\n\t    }\n\t  }, {\n\t    key: \"rule\",\n\t    value: function rule() {\n\t      var extend = {\n\t        begin: '(?:^|\\\\n)(\\\\n*)',\n\t        end: '(?=$|\\\\n)',\n\t        content: '[ ]*((?:【【|\\\\[\\\\[)(?:toc|TOC)(?:\\\\]\\\\]|】】))[ ]*'\n\t      };\n\t      extend.reg = new RegExp(extend.begin + extend.content + extend.end, 'g');\n\t      var standard = {\n\t        begin: '(?:^|\\\\n)(\\\\n*)',\n\t        end: '(?=$|\\\\n)',\n\t        content: '[ ]*(\\\\[(?:toc|TOC)\\\\])[ ]*'\n\t      };\n\t      standard.reg = new RegExp(standard.begin + standard.content + standard.end, 'g');\n\t      return {\n\t        extend: extend,\n\t        standard: standard\n\t      };\n\t    }\n\t  }]);\n\n\t  return Toc;\n\t}(ParagraphBase);\n\n\t_defineProperty(Toc, \"HOOK_NAME\", 'toc');\n\n\tfunction _createSuper$p(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$p(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = construct$4(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\n\tfunction _isNativeReflectConstruct$p() { if (typeof Reflect === \"undefined\" || !construct$4) return false; if (construct$4.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(construct$4(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\n\tvar Footnote = /*#__PURE__*/function (_ParagraphBase) {\n\t  _inherits(Footnote, _ParagraphBase);\n\n\t  var _super = _createSuper$p(Footnote);\n\n\t  function Footnote(_ref) {\n\t    var _this;\n\n\t    var externals = _ref.externals,\n\t        config = _ref.config;\n\n\t    _classCallCheck(this, Footnote);\n\n\t    _this = _super.call(this);\n\t    _this.footnoteCache = {};\n\t    _this.footnoteMap = {}; // 角标缓存索引\n\n\t    _this.footnote = [];\n\t    return _this;\n\t  }\n\n\t  _createClass(Footnote, [{\n\t    key: \"$cleanCache\",\n\t    value: function $cleanCache() {\n\t      this.footnoteCache = {};\n\t      this.footnoteMap = {}; // 角标缓存索引\n\n\t      this.footnote = [];\n\t    }\n\t  }, {\n\t    key: \"pushFootnoteCache\",\n\t    value: function pushFootnoteCache(key, cache) {\n\t      this.footnoteCache[key] = cache;\n\t    }\n\t  }, {\n\t    key: \"getFootnoteCache\",\n\t    value: function getFootnoteCache(key) {\n\t      return this.footnoteCache[key] || null;\n\t    }\n\t  }, {\n\t    key: \"pushFootNote\",\n\t    value: function pushFootNote(key, note) {\n\t      var _context, _context2, _context3, _context4, _context5, _context6;\n\n\t      if (this.footnoteMap[key]) {\n\t        // 重复引用时返回已缓存下标\n\t        return this.footnoteMap[key];\n\t      }\n\n\t      var num = this.footnote.length + 1;\n\t      var fn = {};\n\t      fn.fn = concat$5(_context = concat$5(_context2 = concat$5(_context3 = \"<sup><a href=\\\"#fn:\".concat(num, \"\\\" id=\\\"fnref:\")).call(_context3, num, \"\\\" title=\\\"\")).call(_context2, key, \"\\\" class=\\\"footnote\\\">[\")).call(_context, num, \"]</a></sup>\");\n\t      fn.fnref = concat$5(_context4 = concat$5(_context5 = concat$5(_context6 = \"<a href=\\\"#fnref:\".concat(num, \"\\\" id=\\\"fn:\")).call(_context6, num, \"\\\" title=\\\"\")).call(_context5, key, \"\\\" class=\\\"footnote-ref\\\">[\")).call(_context4, num, \"]</a>\");\n\t      fn.num = num;\n\t      fn.note = trim$3(note).call(note);\n\t      this.footnote.push(fn);\n\t      var replaceKey = \"\\0~fn#\".concat(num - 1, \"#\\0\");\n\t      this.footnoteMap[key] = replaceKey;\n\t      return replaceKey;\n\t    }\n\t  }, {\n\t    key: \"getFootNote\",\n\t    value: function getFootNote() {\n\t      return this.footnote;\n\t    }\n\t  }, {\n\t    key: \"formatFootNote\",\n\t    value: function formatFootNote() {\n\t      var _context8;\n\n\t      var footnote = this.getFootNote();\n\n\t      if (footnote.length <= 0) {\n\t        return '';\n\t      }\n\n\t      var html = map$3(footnote).call(footnote, function (note) {\n\t        var _context7;\n\n\t        return concat$5(_context7 = \"<div class=\\\"one-footnote\\\">\\n\".concat(note.fnref)).call(_context7, note.note, \"\\n</div>\");\n\t      }).join('');\n\n\t      var sign = this.$engine.md5(html);\n\t      html = concat$5(_context8 = \"<div class=\\\"footnote\\\" data-sign=\\\"\".concat(sign, \"\\\" data-lines=\\\"0\\\"><div class=\\\"footnote-title\\\">\\u811A\\u6CE8</div>\")).call(_context8, html, \"</div>\");\n\t      return html;\n\t    } // getParagraphHook() {\n\t    //     return this.commentPAR;\n\t    // }\n\n\t  }, {\n\t    key: \"beforeMakeHtml\",\n\t    value: function beforeMakeHtml(str) {\n\t      var _this2 = this;\n\n\t      // 单行注释，TODO: 替换为引用\n\t      // str = str.replace(/(^|\\n)\\[([^^][^\\]]*?)\\]:([^\\n]+?)(?=$|\\n)/g, '$1');\n\t      var $str = str;\n\n\t      if (this.test($str)) {\n\t        $str = $str.replace(this.RULE.reg, function (match, leading, key, content) {\n\t          _this2.pushFootnoteCache(key, content);\n\n\t          var LF = match.match(/\\n/g) || [];\n\t          return LF.join('');\n\t        }); // 替换实际引用\n\n\t        $str = $str.replace(/\\[\\^([^\\]]+?)\\](?!:)/g, function (match, key) {\n\t          var cache = _this2.getFootnoteCache(key);\n\n\t          if (cache) {\n\t            return _this2.pushFootNote(key, cache);\n\t          }\n\n\t          return match;\n\t        });\n\t        $str += this.formatFootNote();\n\t      }\n\n\t      return $str;\n\t    }\n\t  }, {\n\t    key: \"makeHtml\",\n\t    value: function makeHtml(str, sentenceMakeFunc) {\n\t      return str;\n\t    }\n\t  }, {\n\t    key: \"afterMakeHtml\",\n\t    value: function afterMakeHtml(str) {\n\t      var footNotes = this.getFootNote();\n\t      var $str = str.replace(/\\0~fn#([0-9]+)#\\0/g, function (match, num) {\n\t        return footNotes[num].fn;\n\t      });\n\t      this.$cleanCache();\n\t      return $str;\n\t    }\n\t  }, {\n\t    key: \"rule\",\n\t    value: function rule() {\n\t      var ret = {\n\t        begin: '(^|\\\\n)[ \\t]*',\n\t        content: ['\\\\[\\\\^([^\\\\]]+?)\\\\]:\\\\h*', // footnote key\n\t        '([\\\\s\\\\S]+?)' // footnote content\n\t        ].join(''),\n\t        end: '(?=\\\\s*$|\\\\n\\\\n)'\n\t      };\n\t      ret.reg = compileRegExp(ret, 'g', true);\n\t      return ret;\n\t    }\n\t  }]);\n\n\t  return Footnote;\n\t}(ParagraphBase);\n\n\t_defineProperty(Footnote, \"HOOK_NAME\", 'footnote');\n\n\tfunction _createSuper$q(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$q(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = construct$4(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\n\tfunction _isNativeReflectConstruct$q() { if (typeof Reflect === \"undefined\" || !construct$4) return false; if (construct$4.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(construct$4(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\t/**\n\t * 脚注和引用语法\n\t * 示例：\n\t *    这里需要一个脚注[^脚注别名1]，另外这里也需要一个脚注[^another]。\n\t *    [^脚注别名1]: 无论脚注内容写在哪里，脚注的内容总会显示在页面最底部\n\t *    以两次回车结束\n\t *\n\t *    [^another]: 另外，脚注里也可以使用一些简单的markdown语法\n\t *    >比如 !!#ff0000 这里!!有一段**引用**\n\t */\n\n\tvar CommentReference = /*#__PURE__*/function (_ParagraphBase) {\n\t  _inherits(CommentReference, _ParagraphBase);\n\n\t  var _super = _createSuper$q(CommentReference);\n\n\t  function CommentReference(_ref) {\n\t    var _this;\n\n\t    var externals = _ref.externals,\n\t        config = _ref.config;\n\n\t    _classCallCheck(this, CommentReference);\n\n\t    _this = _super.call(this);\n\t    _this.commentCache = {};\n\t    return _this;\n\t  }\n\n\t  _createClass(CommentReference, [{\n\t    key: \"$cleanCache\",\n\t    value: function $cleanCache() {\n\t      this.commentCache = {};\n\t    }\n\t  }, {\n\t    key: \"pushCommentReferenceCache\",\n\t    value: function pushCommentReferenceCache(key, cache) {\n\t      var _context;\n\n\t      var _cache$split = cache.split(/[ ]+/g),\n\t          _cache$split2 = _toArray(_cache$split),\n\t          url = _cache$split2[0],\n\t          args = slice$7(_cache$split2).call(_cache$split2, 1);\n\n\t      var innerUrl = UrlCache.set(url);\n\t      this.commentCache[\"\".concat(key).toLowerCase()] = concat$5(_context = [innerUrl]).call(_context, _toConsumableArray(args)).join(' ');\n\t    }\n\t  }, {\n\t    key: \"getCommentReferenceCache\",\n\t    value: function getCommentReferenceCache(key) {\n\t      return this.commentCache[\"\".concat(key).toLowerCase()] || null;\n\t    }\n\t  }, {\n\t    key: \"beforeMakeHtml\",\n\t    value: function beforeMakeHtml(str) {\n\t      var _this2 = this;\n\n\t      var $str = str;\n\n\t      if (this.test($str)) {\n\t        $str = $str.replace(this.RULE.reg, function (match, leading, key, content) {\n\t          var _match$match;\n\n\t          _this2.pushCommentReferenceCache(key, content);\n\n\t          var lineFeeds = (_match$match = match.match(/\\n/g)) !== null && _match$match !== void 0 ? _match$match : [];\n\t          return lineFeeds.join('');\n\t        }); // 替换实际引用\n\n\t        var refRegex = /(\\[[^\\]\\n]+?\\])?(?:\\[([^\\]\\n]+?)\\])/g; // 匹配[xxx][ref]形式的内容，不严格大小写\n\n\t        $str = $str.replace(refRegex, function (match, leadingContent, key) {\n\t          var cache = _this2.getCommentReferenceCache(key);\n\n\t          if (cache) {\n\t            var _context3;\n\n\t            if (leadingContent) {\n\t              var _context2;\n\n\t              return concat$5(_context2 = \"\".concat(leadingContent, \"(\")).call(_context2, cache, \")\"); // 替换为[xx](cache)形式，交给Link或多媒体标签处理\n\t            }\n\n\t            return concat$5(_context3 = \"[\".concat(key, \"](\")).call(_context3, cache, \")\"); // 替换为[ref](cache)形式，交给Link或多媒体标签处理\n\t          }\n\n\t          return match;\n\t        });\n\t        this.$cleanCache();\n\t      }\n\n\t      return $str;\n\t    }\n\t  }, {\n\t    key: \"makeHtml\",\n\t    value: function makeHtml(str, sentenceMakeFunc) {\n\t      return str;\n\t    }\n\t  }, {\n\t    key: \"afterMakeHtml\",\n\t    value: function afterMakeHtml(str) {\n\t      return UrlCache.restoreAll(str);\n\t    }\n\t  }, {\n\t    key: \"rule\",\n\t    value: function rule() {\n\t      var ret = {\n\t        begin: '(^|\\\\n)[ \\t]*',\n\t        content: ['\\\\[([^^][^\\\\]]*?)\\\\]:\\\\h*', // comment key\n\t        '([^\\\\n]+?)' // comment content\n\t        ].join(''),\n\t        end: '(?=$|\\\\n)'\n\t      };\n\t      ret.reg = compileRegExp(ret, 'g', true);\n\t      return ret;\n\t    }\n\t  }]);\n\n\t  return CommentReference;\n\t}(ParagraphBase);\n\n\t_defineProperty(CommentReference, \"HOOK_NAME\", 'commentReference');\n\n\tvar $some = arrayIteration.some;\n\n\n\tvar STRICT_METHOD$3 = arrayMethodIsStrict('some');\n\n\t// `Array.prototype.some` method\n\t// https://tc39.es/ecma262/#sec-array.prototype.some\n\t_export({ target: 'Array', proto: true, forced: !STRICT_METHOD$3 }, {\n\t  some: function some(callbackfn /* , thisArg */) {\n\t    return $some(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n\t  }\n\t});\n\n\tvar some = entryVirtual('Array').some;\n\n\tvar ArrayPrototype$c = Array.prototype;\n\n\tvar some$1 = function (it) {\n\t  var own = it.some;\n\t  return it === ArrayPrototype$c || (objectIsPrototypeOf(ArrayPrototype$c, it) && own === ArrayPrototype$c.some) ? some : own;\n\t};\n\n\tvar some$2 = some$1;\n\n\tvar some$3 = some$2;\n\n\tvar purify = createCommonjsModule(function (module, exports) {\n\t/*! @license DOMPurify 2.4.0 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/2.4.0/LICENSE */\n\n\t(function (global, factory) {\n\t   module.exports = factory() ;\n\t})(commonjsGlobal, (function () {\n\t  function _typeof(obj) {\n\t    \"@babel/helpers - typeof\";\n\n\t    return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) {\n\t      return typeof obj;\n\t    } : function (obj) {\n\t      return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n\t    }, _typeof(obj);\n\t  }\n\n\t  function _setPrototypeOf(o, p) {\n\t    _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n\t      o.__proto__ = p;\n\t      return o;\n\t    };\n\n\t    return _setPrototypeOf(o, p);\n\t  }\n\n\t  function _isNativeReflectConstruct() {\n\t    if (typeof Reflect === \"undefined\" || !Reflect.construct) return false;\n\t    if (Reflect.construct.sham) return false;\n\t    if (typeof Proxy === \"function\") return true;\n\n\t    try {\n\t      Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));\n\t      return true;\n\t    } catch (e) {\n\t      return false;\n\t    }\n\t  }\n\n\t  function _construct(Parent, args, Class) {\n\t    if (_isNativeReflectConstruct()) {\n\t      _construct = Reflect.construct;\n\t    } else {\n\t      _construct = function _construct(Parent, args, Class) {\n\t        var a = [null];\n\t        a.push.apply(a, args);\n\t        var Constructor = Function.bind.apply(Parent, a);\n\t        var instance = new Constructor();\n\t        if (Class) _setPrototypeOf(instance, Class.prototype);\n\t        return instance;\n\t      };\n\t    }\n\n\t    return _construct.apply(null, arguments);\n\t  }\n\n\t  function _toConsumableArray(arr) {\n\t    return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();\n\t  }\n\n\t  function _arrayWithoutHoles(arr) {\n\t    if (Array.isArray(arr)) return _arrayLikeToArray(arr);\n\t  }\n\n\t  function _iterableToArray(iter) {\n\t    if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter);\n\t  }\n\n\t  function _unsupportedIterableToArray(o, minLen) {\n\t    if (!o) return;\n\t    if (typeof o === \"string\") return _arrayLikeToArray(o, minLen);\n\t    var n = Object.prototype.toString.call(o).slice(8, -1);\n\t    if (n === \"Object\" && o.constructor) n = o.constructor.name;\n\t    if (n === \"Map\" || n === \"Set\") return Array.from(o);\n\t    if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);\n\t  }\n\n\t  function _arrayLikeToArray(arr, len) {\n\t    if (len == null || len > arr.length) len = arr.length;\n\n\t    for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];\n\n\t    return arr2;\n\t  }\n\n\t  function _nonIterableSpread() {\n\t    throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n\t  }\n\n\t  var hasOwnProperty = Object.hasOwnProperty,\n\t      setPrototypeOf = Object.setPrototypeOf,\n\t      isFrozen = Object.isFrozen,\n\t      getPrototypeOf = Object.getPrototypeOf,\n\t      getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\n\t  var freeze = Object.freeze,\n\t      seal = Object.seal,\n\t      create = Object.create; // eslint-disable-line import/no-mutable-exports\n\n\t  var _ref = typeof Reflect !== 'undefined' && Reflect,\n\t      apply = _ref.apply,\n\t      construct = _ref.construct;\n\n\t  if (!apply) {\n\t    apply = function apply(fun, thisValue, args) {\n\t      return fun.apply(thisValue, args);\n\t    };\n\t  }\n\n\t  if (!freeze) {\n\t    freeze = function freeze(x) {\n\t      return x;\n\t    };\n\t  }\n\n\t  if (!seal) {\n\t    seal = function seal(x) {\n\t      return x;\n\t    };\n\t  }\n\n\t  if (!construct) {\n\t    construct = function construct(Func, args) {\n\t      return _construct(Func, _toConsumableArray(args));\n\t    };\n\t  }\n\n\t  var arrayForEach = unapply(Array.prototype.forEach);\n\t  var arrayPop = unapply(Array.prototype.pop);\n\t  var arrayPush = unapply(Array.prototype.push);\n\t  var stringToLowerCase = unapply(String.prototype.toLowerCase);\n\t  var stringMatch = unapply(String.prototype.match);\n\t  var stringReplace = unapply(String.prototype.replace);\n\t  var stringIndexOf = unapply(String.prototype.indexOf);\n\t  var stringTrim = unapply(String.prototype.trim);\n\t  var regExpTest = unapply(RegExp.prototype.test);\n\t  var typeErrorCreate = unconstruct(TypeError);\n\t  function unapply(func) {\n\t    return function (thisArg) {\n\t      for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n\t        args[_key - 1] = arguments[_key];\n\t      }\n\n\t      return apply(func, thisArg, args);\n\t    };\n\t  }\n\t  function unconstruct(func) {\n\t    return function () {\n\t      for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n\t        args[_key2] = arguments[_key2];\n\t      }\n\n\t      return construct(func, args);\n\t    };\n\t  }\n\t  /* Add properties to a lookup table */\n\n\t  function addToSet(set, array, transformCaseFunc) {\n\t    transformCaseFunc = transformCaseFunc ? transformCaseFunc : stringToLowerCase;\n\n\t    if (setPrototypeOf) {\n\t      // Make 'in' and truthy checks like Boolean(set.constructor)\n\t      // independent of any properties defined on Object.prototype.\n\t      // Prevent prototype setters from intercepting set as a this value.\n\t      setPrototypeOf(set, null);\n\t    }\n\n\t    var l = array.length;\n\n\t    while (l--) {\n\t      var element = array[l];\n\n\t      if (typeof element === 'string') {\n\t        var lcElement = transformCaseFunc(element);\n\n\t        if (lcElement !== element) {\n\t          // Config presets (e.g. tags.js, attrs.js) are immutable.\n\t          if (!isFrozen(array)) {\n\t            array[l] = lcElement;\n\t          }\n\n\t          element = lcElement;\n\t        }\n\t      }\n\n\t      set[element] = true;\n\t    }\n\n\t    return set;\n\t  }\n\t  /* Shallow clone an object */\n\n\t  function clone(object) {\n\t    var newObject = create(null);\n\t    var property;\n\n\t    for (property in object) {\n\t      if (apply(hasOwnProperty, object, [property])) {\n\t        newObject[property] = object[property];\n\t      }\n\t    }\n\n\t    return newObject;\n\t  }\n\t  /* IE10 doesn't support __lookupGetter__ so lets'\n\t   * simulate it. It also automatically checks\n\t   * if the prop is function or getter and behaves\n\t   * accordingly. */\n\n\t  function lookupGetter(object, prop) {\n\t    while (object !== null) {\n\t      var desc = getOwnPropertyDescriptor(object, prop);\n\n\t      if (desc) {\n\t        if (desc.get) {\n\t          return unapply(desc.get);\n\t        }\n\n\t        if (typeof desc.value === 'function') {\n\t          return unapply(desc.value);\n\t        }\n\t      }\n\n\t      object = getPrototypeOf(object);\n\t    }\n\n\t    function fallbackValue(element) {\n\t      console.warn('fallback value for', element);\n\t      return null;\n\t    }\n\n\t    return fallbackValue;\n\t  }\n\n\t  var html$1 = freeze(['a', 'abbr', 'acronym', 'address', 'area', 'article', 'aside', 'audio', 'b', 'bdi', 'bdo', 'big', 'blink', 'blockquote', 'body', 'br', 'button', 'canvas', 'caption', 'center', 'cite', 'code', 'col', 'colgroup', 'content', 'data', 'datalist', 'dd', 'decorator', 'del', 'details', 'dfn', 'dialog', 'dir', 'div', 'dl', 'dt', 'element', 'em', 'fieldset', 'figcaption', 'figure', 'font', 'footer', 'form', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'header', 'hgroup', 'hr', 'html', 'i', 'img', 'input', 'ins', 'kbd', 'label', 'legend', 'li', 'main', 'map', 'mark', 'marquee', 'menu', 'menuitem', 'meter', 'nav', 'nobr', 'ol', 'optgroup', 'option', 'output', 'p', 'picture', 'pre', 'progress', 'q', 'rp', 'rt', 'ruby', 's', 'samp', 'section', 'select', 'shadow', 'small', 'source', 'spacer', 'span', 'strike', 'strong', 'style', 'sub', 'summary', 'sup', 'table', 'tbody', 'td', 'template', 'textarea', 'tfoot', 'th', 'thead', 'time', 'tr', 'track', 'tt', 'u', 'ul', 'var', 'video', 'wbr']); // SVG\n\n\t  var svg$1 = freeze(['svg', 'a', 'altglyph', 'altglyphdef', 'altglyphitem', 'animatecolor', 'animatemotion', 'animatetransform', 'circle', 'clippath', 'defs', 'desc', 'ellipse', 'filter', 'font', 'g', 'glyph', 'glyphref', 'hkern', 'image', 'line', 'lineargradient', 'marker', 'mask', 'metadata', 'mpath', 'path', 'pattern', 'polygon', 'polyline', 'radialgradient', 'rect', 'stop', 'style', 'switch', 'symbol', 'text', 'textpath', 'title', 'tref', 'tspan', 'view', 'vkern']);\n\t  var svgFilters = freeze(['feBlend', 'feColorMatrix', 'feComponentTransfer', 'feComposite', 'feConvolveMatrix', 'feDiffuseLighting', 'feDisplacementMap', 'feDistantLight', 'feFlood', 'feFuncA', 'feFuncB', 'feFuncG', 'feFuncR', 'feGaussianBlur', 'feImage', 'feMerge', 'feMergeNode', 'feMorphology', 'feOffset', 'fePointLight', 'feSpecularLighting', 'feSpotLight', 'feTile', 'feTurbulence']); // List of SVG elements that are disallowed by default.\n\t  // We still need to know them so that we can do namespace\n\t  // checks properly in case one wants to add them to\n\t  // allow-list.\n\n\t  var svgDisallowed = freeze(['animate', 'color-profile', 'cursor', 'discard', 'fedropshadow', 'font-face', 'font-face-format', 'font-face-name', 'font-face-src', 'font-face-uri', 'foreignobject', 'hatch', 'hatchpath', 'mesh', 'meshgradient', 'meshpatch', 'meshrow', 'missing-glyph', 'script', 'set', 'solidcolor', 'unknown', 'use']);\n\t  var mathMl$1 = freeze(['math', 'menclose', 'merror', 'mfenced', 'mfrac', 'mglyph', 'mi', 'mlabeledtr', 'mmultiscripts', 'mn', 'mo', 'mover', 'mpadded', 'mphantom', 'mroot', 'mrow', 'ms', 'mspace', 'msqrt', 'mstyle', 'msub', 'msup', 'msubsup', 'mtable', 'mtd', 'mtext', 'mtr', 'munder', 'munderover']); // Similarly to SVG, we want to know all MathML elements,\n\t  // even those that we disallow by default.\n\n\t  var mathMlDisallowed = freeze(['maction', 'maligngroup', 'malignmark', 'mlongdiv', 'mscarries', 'mscarry', 'msgroup', 'mstack', 'msline', 'msrow', 'semantics', 'annotation', 'annotation-xml', 'mprescripts', 'none']);\n\t  var text = freeze(['#text']);\n\n\t  var html = freeze(['accept', 'action', 'align', 'alt', 'autocapitalize', 'autocomplete', 'autopictureinpicture', 'autoplay', 'background', 'bgcolor', 'border', 'capture', 'cellpadding', 'cellspacing', 'checked', 'cite', 'class', 'clear', 'color', 'cols', 'colspan', 'controls', 'controlslist', 'coords', 'crossorigin', 'datetime', 'decoding', 'default', 'dir', 'disabled', 'disablepictureinpicture', 'disableremoteplayback', 'download', 'draggable', 'enctype', 'enterkeyhint', 'face', 'for', 'headers', 'height', 'hidden', 'high', 'href', 'hreflang', 'id', 'inputmode', 'integrity', 'ismap', 'kind', 'label', 'lang', 'list', 'loading', 'loop', 'low', 'max', 'maxlength', 'media', 'method', 'min', 'minlength', 'multiple', 'muted', 'name', 'nonce', 'noshade', 'novalidate', 'nowrap', 'open', 'optimum', 'pattern', 'placeholder', 'playsinline', 'poster', 'preload', 'pubdate', 'radiogroup', 'readonly', 'rel', 'required', 'rev', 'reversed', 'role', 'rows', 'rowspan', 'spellcheck', 'scope', 'selected', 'shape', 'size', 'sizes', 'span', 'srclang', 'start', 'src', 'srcset', 'step', 'style', 'summary', 'tabindex', 'title', 'translate', 'type', 'usemap', 'valign', 'value', 'width', 'xmlns', 'slot']);\n\t  var svg = freeze(['accent-height', 'accumulate', 'additive', 'alignment-baseline', 'ascent', 'attributename', 'attributetype', 'azimuth', 'basefrequency', 'baseline-shift', 'begin', 'bias', 'by', 'class', 'clip', 'clippathunits', 'clip-path', 'clip-rule', 'color', 'color-interpolation', 'color-interpolation-filters', 'color-profile', 'color-rendering', 'cx', 'cy', 'd', 'dx', 'dy', 'diffuseconstant', 'direction', 'display', 'divisor', 'dur', 'edgemode', 'elevation', 'end', 'fill', 'fill-opacity', 'fill-rule', 'filter', 'filterunits', 'flood-color', 'flood-opacity', 'font-family', 'font-size', 'font-size-adjust', 'font-stretch', 'font-style', 'font-variant', 'font-weight', 'fx', 'fy', 'g1', 'g2', 'glyph-name', 'glyphref', 'gradientunits', 'gradienttransform', 'height', 'href', 'id', 'image-rendering', 'in', 'in2', 'k', 'k1', 'k2', 'k3', 'k4', 'kerning', 'keypoints', 'keysplines', 'keytimes', 'lang', 'lengthadjust', 'letter-spacing', 'kernelmatrix', 'kernelunitlength', 'lighting-color', 'local', 'marker-end', 'marker-mid', 'marker-start', 'markerheight', 'markerunits', 'markerwidth', 'maskcontentunits', 'maskunits', 'max', 'mask', 'media', 'method', 'mode', 'min', 'name', 'numoctaves', 'offset', 'operator', 'opacity', 'order', 'orient', 'orientation', 'origin', 'overflow', 'paint-order', 'path', 'pathlength', 'patterncontentunits', 'patterntransform', 'patternunits', 'points', 'preservealpha', 'preserveaspectratio', 'primitiveunits', 'r', 'rx', 'ry', 'radius', 'refx', 'refy', 'repeatcount', 'repeatdur', 'restart', 'result', 'rotate', 'scale', 'seed', 'shape-rendering', 'specularconstant', 'specularexponent', 'spreadmethod', 'startoffset', 'stddeviation', 'stitchtiles', 'stop-color', 'stop-opacity', 'stroke-dasharray', 'stroke-dashoffset', 'stroke-linecap', 'stroke-linejoin', 'stroke-miterlimit', 'stroke-opacity', 'stroke', 'stroke-width', 'style', 'surfacescale', 'systemlanguage', 'tabindex', 'targetx', 'targety', 'transform', 'transform-origin', 'text-anchor', 'text-decoration', 'text-rendering', 'textlength', 'type', 'u1', 'u2', 'unicode', 'values', 'viewbox', 'visibility', 'version', 'vert-adv-y', 'vert-origin-x', 'vert-origin-y', 'width', 'word-spacing', 'wrap', 'writing-mode', 'xchannelselector', 'ychannelselector', 'x', 'x1', 'x2', 'xmlns', 'y', 'y1', 'y2', 'z', 'zoomandpan']);\n\t  var mathMl = freeze(['accent', 'accentunder', 'align', 'bevelled', 'close', 'columnsalign', 'columnlines', 'columnspan', 'denomalign', 'depth', 'dir', 'display', 'displaystyle', 'encoding', 'fence', 'frame', 'height', 'href', 'id', 'largeop', 'length', 'linethickness', 'lspace', 'lquote', 'mathbackground', 'mathcolor', 'mathsize', 'mathvariant', 'maxsize', 'minsize', 'movablelimits', 'notation', 'numalign', 'open', 'rowalign', 'rowlines', 'rowspacing', 'rowspan', 'rspace', 'rquote', 'scriptlevel', 'scriptminsize', 'scriptsizemultiplier', 'selection', 'separator', 'separators', 'stretchy', 'subscriptshift', 'supscriptshift', 'symmetric', 'voffset', 'width', 'xmlns']);\n\t  var xml = freeze(['xlink:href', 'xml:id', 'xlink:title', 'xml:space', 'xmlns:xlink']);\n\n\t  var MUSTACHE_EXPR = seal(/\\{\\{[\\w\\W]*|[\\w\\W]*\\}\\}/gm); // Specify template detection regex for SAFE_FOR_TEMPLATES mode\n\n\t  var ERB_EXPR = seal(/<%[\\w\\W]*|[\\w\\W]*%>/gm);\n\t  var DATA_ATTR = seal(/^data-[\\-\\w.\\u00B7-\\uFFFF]/); // eslint-disable-line no-useless-escape\n\n\t  var ARIA_ATTR = seal(/^aria-[\\-\\w]+$/); // eslint-disable-line no-useless-escape\n\n\t  var IS_ALLOWED_URI = seal(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\\-]+(?:[^a-z+.\\-:]|$))/i // eslint-disable-line no-useless-escape\n\t  );\n\t  var IS_SCRIPT_OR_DATA = seal(/^(?:\\w+script|data):/i);\n\t  var ATTR_WHITESPACE = seal(/[\\u0000-\\u0020\\u00A0\\u1680\\u180E\\u2000-\\u2029\\u205F\\u3000]/g // eslint-disable-line no-control-regex\n\t  );\n\t  var DOCTYPE_NAME = seal(/^html$/i);\n\n\t  var getGlobal = function getGlobal() {\n\t    return typeof window === 'undefined' ? null : window;\n\t  };\n\t  /**\n\t   * Creates a no-op policy for internal use only.\n\t   * Don't export this function outside this module!\n\t   * @param {?TrustedTypePolicyFactory} trustedTypes The policy factory.\n\t   * @param {Document} document The document object (to determine policy name suffix)\n\t   * @return {?TrustedTypePolicy} The policy created (or null, if Trusted Types\n\t   * are not supported).\n\t   */\n\n\n\t  var _createTrustedTypesPolicy = function _createTrustedTypesPolicy(trustedTypes, document) {\n\t    if (_typeof(trustedTypes) !== 'object' || typeof trustedTypes.createPolicy !== 'function') {\n\t      return null;\n\t    } // Allow the callers to control the unique policy name\n\t    // by adding a data-tt-policy-suffix to the script element with the DOMPurify.\n\t    // Policy creation with duplicate names throws in Trusted Types.\n\n\n\t    var suffix = null;\n\t    var ATTR_NAME = 'data-tt-policy-suffix';\n\n\t    if (document.currentScript && document.currentScript.hasAttribute(ATTR_NAME)) {\n\t      suffix = document.currentScript.getAttribute(ATTR_NAME);\n\t    }\n\n\t    var policyName = 'dompurify' + (suffix ? '#' + suffix : '');\n\n\t    try {\n\t      return trustedTypes.createPolicy(policyName, {\n\t        createHTML: function createHTML(html) {\n\t          return html;\n\t        },\n\t        createScriptURL: function createScriptURL(scriptUrl) {\n\t          return scriptUrl;\n\t        }\n\t      });\n\t    } catch (_) {\n\t      // Policy creation failed (most likely another DOMPurify script has\n\t      // already run). Skip creating the policy, as this will only cause errors\n\t      // if TT are enforced.\n\t      console.warn('TrustedTypes policy ' + policyName + ' could not be created.');\n\t      return null;\n\t    }\n\t  };\n\n\t  function createDOMPurify() {\n\t    var window = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : getGlobal();\n\n\t    var DOMPurify = function DOMPurify(root) {\n\t      return createDOMPurify(root);\n\t    };\n\t    /**\n\t     * Version label, exposed for easier checks\n\t     * if DOMPurify is up to date or not\n\t     */\n\n\n\t    DOMPurify.version = '2.4.0';\n\t    /**\n\t     * Array of elements that DOMPurify removed during sanitation.\n\t     * Empty if nothing was removed.\n\t     */\n\n\t    DOMPurify.removed = [];\n\n\t    if (!window || !window.document || window.document.nodeType !== 9) {\n\t      // Not running in a browser, provide a factory function\n\t      // so that you can pass your own Window\n\t      DOMPurify.isSupported = false;\n\t      return DOMPurify;\n\t    }\n\n\t    var originalDocument = window.document;\n\t    var document = window.document;\n\t    var DocumentFragment = window.DocumentFragment,\n\t        HTMLTemplateElement = window.HTMLTemplateElement,\n\t        Node = window.Node,\n\t        Element = window.Element,\n\t        NodeFilter = window.NodeFilter,\n\t        _window$NamedNodeMap = window.NamedNodeMap,\n\t        NamedNodeMap = _window$NamedNodeMap === void 0 ? window.NamedNodeMap || window.MozNamedAttrMap : _window$NamedNodeMap,\n\t        HTMLFormElement = window.HTMLFormElement,\n\t        DOMParser = window.DOMParser,\n\t        trustedTypes = window.trustedTypes;\n\t    var ElementPrototype = Element.prototype;\n\t    var cloneNode = lookupGetter(ElementPrototype, 'cloneNode');\n\t    var getNextSibling = lookupGetter(ElementPrototype, 'nextSibling');\n\t    var getChildNodes = lookupGetter(ElementPrototype, 'childNodes');\n\t    var getParentNode = lookupGetter(ElementPrototype, 'parentNode'); // As per issue #47, the web-components registry is inherited by a\n\t    // new document created via createHTMLDocument. As per the spec\n\t    // (http://w3c.github.io/webcomponents/spec/custom/#creating-and-passing-registries)\n\t    // a new empty registry is used when creating a template contents owner\n\t    // document, so we use that as our parent document to ensure nothing\n\t    // is inherited.\n\n\t    if (typeof HTMLTemplateElement === 'function') {\n\t      var template = document.createElement('template');\n\n\t      if (template.content && template.content.ownerDocument) {\n\t        document = template.content.ownerDocument;\n\t      }\n\t    }\n\n\t    var trustedTypesPolicy = _createTrustedTypesPolicy(trustedTypes, originalDocument);\n\n\t    var emptyHTML = trustedTypesPolicy ? trustedTypesPolicy.createHTML('') : '';\n\t    var _document = document,\n\t        implementation = _document.implementation,\n\t        createNodeIterator = _document.createNodeIterator,\n\t        createDocumentFragment = _document.createDocumentFragment,\n\t        getElementsByTagName = _document.getElementsByTagName;\n\t    var importNode = originalDocument.importNode;\n\t    var documentMode = {};\n\n\t    try {\n\t      documentMode = clone(document).documentMode ? document.documentMode : {};\n\t    } catch (_) {}\n\n\t    var hooks = {};\n\t    /**\n\t     * Expose whether this browser supports running the full DOMPurify.\n\t     */\n\n\t    DOMPurify.isSupported = typeof getParentNode === 'function' && implementation && typeof implementation.createHTMLDocument !== 'undefined' && documentMode !== 9;\n\t    var MUSTACHE_EXPR$1 = MUSTACHE_EXPR,\n\t        ERB_EXPR$1 = ERB_EXPR,\n\t        DATA_ATTR$1 = DATA_ATTR,\n\t        ARIA_ATTR$1 = ARIA_ATTR,\n\t        IS_SCRIPT_OR_DATA$1 = IS_SCRIPT_OR_DATA,\n\t        ATTR_WHITESPACE$1 = ATTR_WHITESPACE;\n\t    var IS_ALLOWED_URI$1 = IS_ALLOWED_URI;\n\t    /**\n\t     * We consider the elements and attributes below to be safe. Ideally\n\t     * don't add any new ones but feel free to remove unwanted ones.\n\t     */\n\n\t    /* allowed element names */\n\n\t    var ALLOWED_TAGS = null;\n\t    var DEFAULT_ALLOWED_TAGS = addToSet({}, [].concat(_toConsumableArray(html$1), _toConsumableArray(svg$1), _toConsumableArray(svgFilters), _toConsumableArray(mathMl$1), _toConsumableArray(text)));\n\t    /* Allowed attribute names */\n\n\t    var ALLOWED_ATTR = null;\n\t    var DEFAULT_ALLOWED_ATTR = addToSet({}, [].concat(_toConsumableArray(html), _toConsumableArray(svg), _toConsumableArray(mathMl), _toConsumableArray(xml)));\n\t    /*\n\t     * Configure how DOMPUrify should handle custom elements and their attributes as well as customized built-in elements.\n\t     * @property {RegExp|Function|null} tagNameCheck one of [null, regexPattern, predicate]. Default: `null` (disallow any custom elements)\n\t     * @property {RegExp|Function|null} attributeNameCheck one of [null, regexPattern, predicate]. Default: `null` (disallow any attributes not on the allow list)\n\t     * @property {boolean} allowCustomizedBuiltInElements allow custom elements derived from built-ins if they pass CUSTOM_ELEMENT_HANDLING.tagNameCheck. Default: `false`.\n\t     */\n\n\t    var CUSTOM_ELEMENT_HANDLING = Object.seal(Object.create(null, {\n\t      tagNameCheck: {\n\t        writable: true,\n\t        configurable: false,\n\t        enumerable: true,\n\t        value: null\n\t      },\n\t      attributeNameCheck: {\n\t        writable: true,\n\t        configurable: false,\n\t        enumerable: true,\n\t        value: null\n\t      },\n\t      allowCustomizedBuiltInElements: {\n\t        writable: true,\n\t        configurable: false,\n\t        enumerable: true,\n\t        value: false\n\t      }\n\t    }));\n\t    /* Explicitly forbidden tags (overrides ALLOWED_TAGS/ADD_TAGS) */\n\n\t    var FORBID_TAGS = null;\n\t    /* Explicitly forbidden attributes (overrides ALLOWED_ATTR/ADD_ATTR) */\n\n\t    var FORBID_ATTR = null;\n\t    /* Decide if ARIA attributes are okay */\n\n\t    var ALLOW_ARIA_ATTR = true;\n\t    /* Decide if custom data attributes are okay */\n\n\t    var ALLOW_DATA_ATTR = true;\n\t    /* Decide if unknown protocols are okay */\n\n\t    var ALLOW_UNKNOWN_PROTOCOLS = false;\n\t    /* Output should be safe for common template engines.\n\t     * This means, DOMPurify removes data attributes, mustaches and ERB\n\t     */\n\n\t    var SAFE_FOR_TEMPLATES = false;\n\t    /* Decide if document with <html>... should be returned */\n\n\t    var WHOLE_DOCUMENT = false;\n\t    /* Track whether config is already set on this instance of DOMPurify. */\n\n\t    var SET_CONFIG = false;\n\t    /* Decide if all elements (e.g. style, script) must be children of\n\t     * document.body. By default, browsers might move them to document.head */\n\n\t    var FORCE_BODY = false;\n\t    /* Decide if a DOM `HTMLBodyElement` should be returned, instead of a html\n\t     * string (or a TrustedHTML object if Trusted Types are supported).\n\t     * If `WHOLE_DOCUMENT` is enabled a `HTMLHtmlElement` will be returned instead\n\t     */\n\n\t    var RETURN_DOM = false;\n\t    /* Decide if a DOM `DocumentFragment` should be returned, instead of a html\n\t     * string  (or a TrustedHTML object if Trusted Types are supported) */\n\n\t    var RETURN_DOM_FRAGMENT = false;\n\t    /* Try to return a Trusted Type object instead of a string, return a string in\n\t     * case Trusted Types are not supported  */\n\n\t    var RETURN_TRUSTED_TYPE = false;\n\t    /* Output should be free from DOM clobbering attacks?\n\t     * This sanitizes markups named with colliding, clobberable built-in DOM APIs.\n\t     */\n\n\t    var SANITIZE_DOM = true;\n\t    /* Achieve full DOM Clobbering protection by isolating the namespace of named\n\t     * properties and JS variables, mitigating attacks that abuse the HTML/DOM spec rules.\n\t     *\n\t     * HTML/DOM spec rules that enable DOM Clobbering:\n\t     *   - Named Access on Window (§7.3.3)\n\t     *   - DOM Tree Accessors (§3.1.5)\n\t     *   - Form Element Parent-Child Relations (§4.10.3)\n\t     *   - Iframe srcdoc / Nested WindowProxies (§4.8.5)\n\t     *   - HTMLCollection (§4.2.10.2)\n\t     *\n\t     * Namespace isolation is implemented by prefixing `id` and `name` attributes\n\t     * with a constant string, i.e., `user-content-`\n\t     */\n\n\t    var SANITIZE_NAMED_PROPS = false;\n\t    var SANITIZE_NAMED_PROPS_PREFIX = 'user-content-';\n\t    /* Keep element content when removing element? */\n\n\t    var KEEP_CONTENT = true;\n\t    /* If a `Node` is passed to sanitize(), then performs sanitization in-place instead\n\t     * of importing it into a new Document and returning a sanitized copy */\n\n\t    var IN_PLACE = false;\n\t    /* Allow usage of profiles like html, svg and mathMl */\n\n\t    var USE_PROFILES = {};\n\t    /* Tags to ignore content of when KEEP_CONTENT is true */\n\n\t    var FORBID_CONTENTS = null;\n\t    var DEFAULT_FORBID_CONTENTS = addToSet({}, ['annotation-xml', 'audio', 'colgroup', 'desc', 'foreignobject', 'head', 'iframe', 'math', 'mi', 'mn', 'mo', 'ms', 'mtext', 'noembed', 'noframes', 'noscript', 'plaintext', 'script', 'style', 'svg', 'template', 'thead', 'title', 'video', 'xmp']);\n\t    /* Tags that are safe for data: URIs */\n\n\t    var DATA_URI_TAGS = null;\n\t    var DEFAULT_DATA_URI_TAGS = addToSet({}, ['audio', 'video', 'img', 'source', 'image', 'track']);\n\t    /* Attributes safe for values like \"javascript:\" */\n\n\t    var URI_SAFE_ATTRIBUTES = null;\n\t    var DEFAULT_URI_SAFE_ATTRIBUTES = addToSet({}, ['alt', 'class', 'for', 'id', 'label', 'name', 'pattern', 'placeholder', 'role', 'summary', 'title', 'value', 'style', 'xmlns']);\n\t    var MATHML_NAMESPACE = 'http://www.w3.org/1998/Math/MathML';\n\t    var SVG_NAMESPACE = 'http://www.w3.org/2000/svg';\n\t    var HTML_NAMESPACE = 'http://www.w3.org/1999/xhtml';\n\t    /* Document namespace */\n\n\t    var NAMESPACE = HTML_NAMESPACE;\n\t    var IS_EMPTY_INPUT = false;\n\t    /* Parsing of strict XHTML documents */\n\n\t    var PARSER_MEDIA_TYPE;\n\t    var SUPPORTED_PARSER_MEDIA_TYPES = ['application/xhtml+xml', 'text/html'];\n\t    var DEFAULT_PARSER_MEDIA_TYPE = 'text/html';\n\t    var transformCaseFunc;\n\t    /* Keep a reference to config to pass to hooks */\n\n\t    var CONFIG = null;\n\t    /* Ideally, do not touch anything below this line */\n\n\t    /* ______________________________________________ */\n\n\t    var formElement = document.createElement('form');\n\n\t    var isRegexOrFunction = function isRegexOrFunction(testValue) {\n\t      return testValue instanceof RegExp || testValue instanceof Function;\n\t    };\n\t    /**\n\t     * _parseConfig\n\t     *\n\t     * @param  {Object} cfg optional config literal\n\t     */\n\t    // eslint-disable-next-line complexity\n\n\n\t    var _parseConfig = function _parseConfig(cfg) {\n\t      if (CONFIG && CONFIG === cfg) {\n\t        return;\n\t      }\n\t      /* Shield configuration object from tampering */\n\n\n\t      if (!cfg || _typeof(cfg) !== 'object') {\n\t        cfg = {};\n\t      }\n\t      /* Shield configuration object from prototype pollution */\n\n\n\t      cfg = clone(cfg);\n\t      PARSER_MEDIA_TYPE = // eslint-disable-next-line unicorn/prefer-includes\n\t      SUPPORTED_PARSER_MEDIA_TYPES.indexOf(cfg.PARSER_MEDIA_TYPE) === -1 ? PARSER_MEDIA_TYPE = DEFAULT_PARSER_MEDIA_TYPE : PARSER_MEDIA_TYPE = cfg.PARSER_MEDIA_TYPE; // HTML tags and attributes are not case-sensitive, converting to lowercase. Keeping XHTML as is.\n\n\t      transformCaseFunc = PARSER_MEDIA_TYPE === 'application/xhtml+xml' ? function (x) {\n\t        return x;\n\t      } : stringToLowerCase;\n\t      /* Set configuration parameters */\n\n\t      ALLOWED_TAGS = 'ALLOWED_TAGS' in cfg ? addToSet({}, cfg.ALLOWED_TAGS, transformCaseFunc) : DEFAULT_ALLOWED_TAGS;\n\t      ALLOWED_ATTR = 'ALLOWED_ATTR' in cfg ? addToSet({}, cfg.ALLOWED_ATTR, transformCaseFunc) : DEFAULT_ALLOWED_ATTR;\n\t      URI_SAFE_ATTRIBUTES = 'ADD_URI_SAFE_ATTR' in cfg ? addToSet(clone(DEFAULT_URI_SAFE_ATTRIBUTES), // eslint-disable-line indent\n\t      cfg.ADD_URI_SAFE_ATTR, // eslint-disable-line indent\n\t      transformCaseFunc // eslint-disable-line indent\n\t      ) // eslint-disable-line indent\n\t      : DEFAULT_URI_SAFE_ATTRIBUTES;\n\t      DATA_URI_TAGS = 'ADD_DATA_URI_TAGS' in cfg ? addToSet(clone(DEFAULT_DATA_URI_TAGS), // eslint-disable-line indent\n\t      cfg.ADD_DATA_URI_TAGS, // eslint-disable-line indent\n\t      transformCaseFunc // eslint-disable-line indent\n\t      ) // eslint-disable-line indent\n\t      : DEFAULT_DATA_URI_TAGS;\n\t      FORBID_CONTENTS = 'FORBID_CONTENTS' in cfg ? addToSet({}, cfg.FORBID_CONTENTS, transformCaseFunc) : DEFAULT_FORBID_CONTENTS;\n\t      FORBID_TAGS = 'FORBID_TAGS' in cfg ? addToSet({}, cfg.FORBID_TAGS, transformCaseFunc) : {};\n\t      FORBID_ATTR = 'FORBID_ATTR' in cfg ? addToSet({}, cfg.FORBID_ATTR, transformCaseFunc) : {};\n\t      USE_PROFILES = 'USE_PROFILES' in cfg ? cfg.USE_PROFILES : false;\n\t      ALLOW_ARIA_ATTR = cfg.ALLOW_ARIA_ATTR !== false; // Default true\n\n\t      ALLOW_DATA_ATTR = cfg.ALLOW_DATA_ATTR !== false; // Default true\n\n\t      ALLOW_UNKNOWN_PROTOCOLS = cfg.ALLOW_UNKNOWN_PROTOCOLS || false; // Default false\n\n\t      SAFE_FOR_TEMPLATES = cfg.SAFE_FOR_TEMPLATES || false; // Default false\n\n\t      WHOLE_DOCUMENT = cfg.WHOLE_DOCUMENT || false; // Default false\n\n\t      RETURN_DOM = cfg.RETURN_DOM || false; // Default false\n\n\t      RETURN_DOM_FRAGMENT = cfg.RETURN_DOM_FRAGMENT || false; // Default false\n\n\t      RETURN_TRUSTED_TYPE = cfg.RETURN_TRUSTED_TYPE || false; // Default false\n\n\t      FORCE_BODY = cfg.FORCE_BODY || false; // Default false\n\n\t      SANITIZE_DOM = cfg.SANITIZE_DOM !== false; // Default true\n\n\t      SANITIZE_NAMED_PROPS = cfg.SANITIZE_NAMED_PROPS || false; // Default false\n\n\t      KEEP_CONTENT = cfg.KEEP_CONTENT !== false; // Default true\n\n\t      IN_PLACE = cfg.IN_PLACE || false; // Default false\n\n\t      IS_ALLOWED_URI$1 = cfg.ALLOWED_URI_REGEXP || IS_ALLOWED_URI$1;\n\t      NAMESPACE = cfg.NAMESPACE || HTML_NAMESPACE;\n\n\t      if (cfg.CUSTOM_ELEMENT_HANDLING && isRegexOrFunction(cfg.CUSTOM_ELEMENT_HANDLING.tagNameCheck)) {\n\t        CUSTOM_ELEMENT_HANDLING.tagNameCheck = cfg.CUSTOM_ELEMENT_HANDLING.tagNameCheck;\n\t      }\n\n\t      if (cfg.CUSTOM_ELEMENT_HANDLING && isRegexOrFunction(cfg.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)) {\n\t        CUSTOM_ELEMENT_HANDLING.attributeNameCheck = cfg.CUSTOM_ELEMENT_HANDLING.attributeNameCheck;\n\t      }\n\n\t      if (cfg.CUSTOM_ELEMENT_HANDLING && typeof cfg.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements === 'boolean') {\n\t        CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements = cfg.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements;\n\t      }\n\n\t      if (SAFE_FOR_TEMPLATES) {\n\t        ALLOW_DATA_ATTR = false;\n\t      }\n\n\t      if (RETURN_DOM_FRAGMENT) {\n\t        RETURN_DOM = true;\n\t      }\n\t      /* Parse profile info */\n\n\n\t      if (USE_PROFILES) {\n\t        ALLOWED_TAGS = addToSet({}, _toConsumableArray(text));\n\t        ALLOWED_ATTR = [];\n\n\t        if (USE_PROFILES.html === true) {\n\t          addToSet(ALLOWED_TAGS, html$1);\n\t          addToSet(ALLOWED_ATTR, html);\n\t        }\n\n\t        if (USE_PROFILES.svg === true) {\n\t          addToSet(ALLOWED_TAGS, svg$1);\n\t          addToSet(ALLOWED_ATTR, svg);\n\t          addToSet(ALLOWED_ATTR, xml);\n\t        }\n\n\t        if (USE_PROFILES.svgFilters === true) {\n\t          addToSet(ALLOWED_TAGS, svgFilters);\n\t          addToSet(ALLOWED_ATTR, svg);\n\t          addToSet(ALLOWED_ATTR, xml);\n\t        }\n\n\t        if (USE_PROFILES.mathMl === true) {\n\t          addToSet(ALLOWED_TAGS, mathMl$1);\n\t          addToSet(ALLOWED_ATTR, mathMl);\n\t          addToSet(ALLOWED_ATTR, xml);\n\t        }\n\t      }\n\t      /* Merge configuration parameters */\n\n\n\t      if (cfg.ADD_TAGS) {\n\t        if (ALLOWED_TAGS === DEFAULT_ALLOWED_TAGS) {\n\t          ALLOWED_TAGS = clone(ALLOWED_TAGS);\n\t        }\n\n\t        addToSet(ALLOWED_TAGS, cfg.ADD_TAGS, transformCaseFunc);\n\t      }\n\n\t      if (cfg.ADD_ATTR) {\n\t        if (ALLOWED_ATTR === DEFAULT_ALLOWED_ATTR) {\n\t          ALLOWED_ATTR = clone(ALLOWED_ATTR);\n\t        }\n\n\t        addToSet(ALLOWED_ATTR, cfg.ADD_ATTR, transformCaseFunc);\n\t      }\n\n\t      if (cfg.ADD_URI_SAFE_ATTR) {\n\t        addToSet(URI_SAFE_ATTRIBUTES, cfg.ADD_URI_SAFE_ATTR, transformCaseFunc);\n\t      }\n\n\t      if (cfg.FORBID_CONTENTS) {\n\t        if (FORBID_CONTENTS === DEFAULT_FORBID_CONTENTS) {\n\t          FORBID_CONTENTS = clone(FORBID_CONTENTS);\n\t        }\n\n\t        addToSet(FORBID_CONTENTS, cfg.FORBID_CONTENTS, transformCaseFunc);\n\t      }\n\t      /* Add #text in case KEEP_CONTENT is set to true */\n\n\n\t      if (KEEP_CONTENT) {\n\t        ALLOWED_TAGS['#text'] = true;\n\t      }\n\t      /* Add html, head and body to ALLOWED_TAGS in case WHOLE_DOCUMENT is true */\n\n\n\t      if (WHOLE_DOCUMENT) {\n\t        addToSet(ALLOWED_TAGS, ['html', 'head', 'body']);\n\t      }\n\t      /* Add tbody to ALLOWED_TAGS in case tables are permitted, see #286, #365 */\n\n\n\t      if (ALLOWED_TAGS.table) {\n\t        addToSet(ALLOWED_TAGS, ['tbody']);\n\t        delete FORBID_TAGS.tbody;\n\t      } // Prevent further manipulation of configuration.\n\t      // Not available in IE8, Safari 5, etc.\n\n\n\t      if (freeze) {\n\t        freeze(cfg);\n\t      }\n\n\t      CONFIG = cfg;\n\t    };\n\n\t    var MATHML_TEXT_INTEGRATION_POINTS = addToSet({}, ['mi', 'mo', 'mn', 'ms', 'mtext']);\n\t    var HTML_INTEGRATION_POINTS = addToSet({}, ['foreignobject', 'desc', 'title', 'annotation-xml']); // Certain elements are allowed in both SVG and HTML\n\t    // namespace. We need to specify them explicitly\n\t    // so that they don't get erroneously deleted from\n\t    // HTML namespace.\n\n\t    var COMMON_SVG_AND_HTML_ELEMENTS = addToSet({}, ['title', 'style', 'font', 'a', 'script']);\n\t    /* Keep track of all possible SVG and MathML tags\n\t     * so that we can perform the namespace checks\n\t     * correctly. */\n\n\t    var ALL_SVG_TAGS = addToSet({}, svg$1);\n\t    addToSet(ALL_SVG_TAGS, svgFilters);\n\t    addToSet(ALL_SVG_TAGS, svgDisallowed);\n\t    var ALL_MATHML_TAGS = addToSet({}, mathMl$1);\n\t    addToSet(ALL_MATHML_TAGS, mathMlDisallowed);\n\t    /**\n\t     *\n\t     *\n\t     * @param  {Element} element a DOM element whose namespace is being checked\n\t     * @returns {boolean} Return false if the element has a\n\t     *  namespace that a spec-compliant parser would never\n\t     *  return. Return true otherwise.\n\t     */\n\n\t    var _checkValidNamespace = function _checkValidNamespace(element) {\n\t      var parent = getParentNode(element); // In JSDOM, if we're inside shadow DOM, then parentNode\n\t      // can be null. We just simulate parent in this case.\n\n\t      if (!parent || !parent.tagName) {\n\t        parent = {\n\t          namespaceURI: HTML_NAMESPACE,\n\t          tagName: 'template'\n\t        };\n\t      }\n\n\t      var tagName = stringToLowerCase(element.tagName);\n\t      var parentTagName = stringToLowerCase(parent.tagName);\n\n\t      if (element.namespaceURI === SVG_NAMESPACE) {\n\t        // The only way to switch from HTML namespace to SVG\n\t        // is via <svg>. If it happens via any other tag, then\n\t        // it should be killed.\n\t        if (parent.namespaceURI === HTML_NAMESPACE) {\n\t          return tagName === 'svg';\n\t        } // The only way to switch from MathML to SVG is via\n\t        // svg if parent is either <annotation-xml> or MathML\n\t        // text integration points.\n\n\n\t        if (parent.namespaceURI === MATHML_NAMESPACE) {\n\t          return tagName === 'svg' && (parentTagName === 'annotation-xml' || MATHML_TEXT_INTEGRATION_POINTS[parentTagName]);\n\t        } // We only allow elements that are defined in SVG\n\t        // spec. All others are disallowed in SVG namespace.\n\n\n\t        return Boolean(ALL_SVG_TAGS[tagName]);\n\t      }\n\n\t      if (element.namespaceURI === MATHML_NAMESPACE) {\n\t        // The only way to switch from HTML namespace to MathML\n\t        // is via <math>. If it happens via any other tag, then\n\t        // it should be killed.\n\t        if (parent.namespaceURI === HTML_NAMESPACE) {\n\t          return tagName === 'math';\n\t        } // The only way to switch from SVG to MathML is via\n\t        // <math> and HTML integration points\n\n\n\t        if (parent.namespaceURI === SVG_NAMESPACE) {\n\t          return tagName === 'math' && HTML_INTEGRATION_POINTS[parentTagName];\n\t        } // We only allow elements that are defined in MathML\n\t        // spec. All others are disallowed in MathML namespace.\n\n\n\t        return Boolean(ALL_MATHML_TAGS[tagName]);\n\t      }\n\n\t      if (element.namespaceURI === HTML_NAMESPACE) {\n\t        // The only way to switch from SVG to HTML is via\n\t        // HTML integration points, and from MathML to HTML\n\t        // is via MathML text integration points\n\t        if (parent.namespaceURI === SVG_NAMESPACE && !HTML_INTEGRATION_POINTS[parentTagName]) {\n\t          return false;\n\t        }\n\n\t        if (parent.namespaceURI === MATHML_NAMESPACE && !MATHML_TEXT_INTEGRATION_POINTS[parentTagName]) {\n\t          return false;\n\t        } // We disallow tags that are specific for MathML\n\t        // or SVG and should never appear in HTML namespace\n\n\n\t        return !ALL_MATHML_TAGS[tagName] && (COMMON_SVG_AND_HTML_ELEMENTS[tagName] || !ALL_SVG_TAGS[tagName]);\n\t      } // The code should never reach this place (this means\n\t      // that the element somehow got namespace that is not\n\t      // HTML, SVG or MathML). Return false just in case.\n\n\n\t      return false;\n\t    };\n\t    /**\n\t     * _forceRemove\n\t     *\n\t     * @param  {Node} node a DOM node\n\t     */\n\n\n\t    var _forceRemove = function _forceRemove(node) {\n\t      arrayPush(DOMPurify.removed, {\n\t        element: node\n\t      });\n\n\t      try {\n\t        // eslint-disable-next-line unicorn/prefer-dom-node-remove\n\t        node.parentNode.removeChild(node);\n\t      } catch (_) {\n\t        try {\n\t          node.outerHTML = emptyHTML;\n\t        } catch (_) {\n\t          node.remove();\n\t        }\n\t      }\n\t    };\n\t    /**\n\t     * _removeAttribute\n\t     *\n\t     * @param  {String} name an Attribute name\n\t     * @param  {Node} node a DOM node\n\t     */\n\n\n\t    var _removeAttribute = function _removeAttribute(name, node) {\n\t      try {\n\t        arrayPush(DOMPurify.removed, {\n\t          attribute: node.getAttributeNode(name),\n\t          from: node\n\t        });\n\t      } catch (_) {\n\t        arrayPush(DOMPurify.removed, {\n\t          attribute: null,\n\t          from: node\n\t        });\n\t      }\n\n\t      node.removeAttribute(name); // We void attribute values for unremovable \"is\"\" attributes\n\n\t      if (name === 'is' && !ALLOWED_ATTR[name]) {\n\t        if (RETURN_DOM || RETURN_DOM_FRAGMENT) {\n\t          try {\n\t            _forceRemove(node);\n\t          } catch (_) {}\n\t        } else {\n\t          try {\n\t            node.setAttribute(name, '');\n\t          } catch (_) {}\n\t        }\n\t      }\n\t    };\n\t    /**\n\t     * _initDocument\n\t     *\n\t     * @param  {String} dirty a string of dirty markup\n\t     * @return {Document} a DOM, filled with the dirty markup\n\t     */\n\n\n\t    var _initDocument = function _initDocument(dirty) {\n\t      /* Create a HTML document */\n\t      var doc;\n\t      var leadingWhitespace;\n\n\t      if (FORCE_BODY) {\n\t        dirty = '<remove></remove>' + dirty;\n\t      } else {\n\t        /* If FORCE_BODY isn't used, leading whitespace needs to be preserved manually */\n\t        var matches = stringMatch(dirty, /^[\\r\\n\\t ]+/);\n\t        leadingWhitespace = matches && matches[0];\n\t      }\n\n\t      if (PARSER_MEDIA_TYPE === 'application/xhtml+xml') {\n\t        // Root of XHTML doc must contain xmlns declaration (see https://www.w3.org/TR/xhtml1/normative.html#strict)\n\t        dirty = '<html xmlns=\"http://www.w3.org/1999/xhtml\"><head></head><body>' + dirty + '</body></html>';\n\t      }\n\n\t      var dirtyPayload = trustedTypesPolicy ? trustedTypesPolicy.createHTML(dirty) : dirty;\n\t      /*\n\t       * Use the DOMParser API by default, fallback later if needs be\n\t       * DOMParser not work for svg when has multiple root element.\n\t       */\n\n\t      if (NAMESPACE === HTML_NAMESPACE) {\n\t        try {\n\t          doc = new DOMParser().parseFromString(dirtyPayload, PARSER_MEDIA_TYPE);\n\t        } catch (_) {}\n\t      }\n\t      /* Use createHTMLDocument in case DOMParser is not available */\n\n\n\t      if (!doc || !doc.documentElement) {\n\t        doc = implementation.createDocument(NAMESPACE, 'template', null);\n\n\t        try {\n\t          doc.documentElement.innerHTML = IS_EMPTY_INPUT ? '' : dirtyPayload;\n\t        } catch (_) {// Syntax error if dirtyPayload is invalid xml\n\t        }\n\t      }\n\n\t      var body = doc.body || doc.documentElement;\n\n\t      if (dirty && leadingWhitespace) {\n\t        body.insertBefore(document.createTextNode(leadingWhitespace), body.childNodes[0] || null);\n\t      }\n\t      /* Work on whole document or just its body */\n\n\n\t      if (NAMESPACE === HTML_NAMESPACE) {\n\t        return getElementsByTagName.call(doc, WHOLE_DOCUMENT ? 'html' : 'body')[0];\n\t      }\n\n\t      return WHOLE_DOCUMENT ? doc.documentElement : body;\n\t    };\n\t    /**\n\t     * _createIterator\n\t     *\n\t     * @param  {Document} root document/fragment to create iterator for\n\t     * @return {Iterator} iterator instance\n\t     */\n\n\n\t    var _createIterator = function _createIterator(root) {\n\t      return createNodeIterator.call(root.ownerDocument || root, root, // eslint-disable-next-line no-bitwise\n\t      NodeFilter.SHOW_ELEMENT | NodeFilter.SHOW_COMMENT | NodeFilter.SHOW_TEXT, null, false);\n\t    };\n\t    /**\n\t     * _isClobbered\n\t     *\n\t     * @param  {Node} elm element to check for clobbering attacks\n\t     * @return {Boolean} true if clobbered, false if safe\n\t     */\n\n\n\t    var _isClobbered = function _isClobbered(elm) {\n\t      return elm instanceof HTMLFormElement && (typeof elm.nodeName !== 'string' || typeof elm.textContent !== 'string' || typeof elm.removeChild !== 'function' || !(elm.attributes instanceof NamedNodeMap) || typeof elm.removeAttribute !== 'function' || typeof elm.setAttribute !== 'function' || typeof elm.namespaceURI !== 'string' || typeof elm.insertBefore !== 'function');\n\t    };\n\t    /**\n\t     * _isNode\n\t     *\n\t     * @param  {Node} obj object to check whether it's a DOM node\n\t     * @return {Boolean} true is object is a DOM node\n\t     */\n\n\n\t    var _isNode = function _isNode(object) {\n\t      return _typeof(Node) === 'object' ? object instanceof Node : object && _typeof(object) === 'object' && typeof object.nodeType === 'number' && typeof object.nodeName === 'string';\n\t    };\n\t    /**\n\t     * _executeHook\n\t     * Execute user configurable hooks\n\t     *\n\t     * @param  {String} entryPoint  Name of the hook's entry point\n\t     * @param  {Node} currentNode node to work on with the hook\n\t     * @param  {Object} data additional hook parameters\n\t     */\n\n\n\t    var _executeHook = function _executeHook(entryPoint, currentNode, data) {\n\t      if (!hooks[entryPoint]) {\n\t        return;\n\t      }\n\n\t      arrayForEach(hooks[entryPoint], function (hook) {\n\t        hook.call(DOMPurify, currentNode, data, CONFIG);\n\t      });\n\t    };\n\t    /**\n\t     * _sanitizeElements\n\t     *\n\t     * @protect nodeName\n\t     * @protect textContent\n\t     * @protect removeChild\n\t     *\n\t     * @param   {Node} currentNode to check for permission to exist\n\t     * @return  {Boolean} true if node was killed, false if left alive\n\t     */\n\n\n\t    var _sanitizeElements = function _sanitizeElements(currentNode) {\n\t      var content;\n\t      /* Execute a hook if present */\n\n\t      _executeHook('beforeSanitizeElements', currentNode, null);\n\t      /* Check if element is clobbered or can clobber */\n\n\n\t      if (_isClobbered(currentNode)) {\n\t        _forceRemove(currentNode);\n\n\t        return true;\n\t      }\n\t      /* Check if tagname contains Unicode */\n\n\n\t      if (regExpTest(/[\\u0080-\\uFFFF]/, currentNode.nodeName)) {\n\t        _forceRemove(currentNode);\n\n\t        return true;\n\t      }\n\t      /* Now let's check the element's type and name */\n\n\n\t      var tagName = transformCaseFunc(currentNode.nodeName);\n\t      /* Execute a hook if present */\n\n\t      _executeHook('uponSanitizeElement', currentNode, {\n\t        tagName: tagName,\n\t        allowedTags: ALLOWED_TAGS\n\t      });\n\t      /* Detect mXSS attempts abusing namespace confusion */\n\n\n\t      if (currentNode.hasChildNodes() && !_isNode(currentNode.firstElementChild) && (!_isNode(currentNode.content) || !_isNode(currentNode.content.firstElementChild)) && regExpTest(/<[/\\w]/g, currentNode.innerHTML) && regExpTest(/<[/\\w]/g, currentNode.textContent)) {\n\t        _forceRemove(currentNode);\n\n\t        return true;\n\t      }\n\t      /* Mitigate a problem with templates inside select */\n\n\n\t      if (tagName === 'select' && regExpTest(/<template/i, currentNode.innerHTML)) {\n\t        _forceRemove(currentNode);\n\n\t        return true;\n\t      }\n\t      /* Remove element if anything forbids its presence */\n\n\n\t      if (!ALLOWED_TAGS[tagName] || FORBID_TAGS[tagName]) {\n\t        /* Check if we have a custom element to handle */\n\t        if (!FORBID_TAGS[tagName] && _basicCustomElementTest(tagName)) {\n\t          if (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, tagName)) return false;\n\t          if (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.tagNameCheck(tagName)) return false;\n\t        }\n\t        /* Keep content except for bad-listed elements */\n\n\n\t        if (KEEP_CONTENT && !FORBID_CONTENTS[tagName]) {\n\t          var parentNode = getParentNode(currentNode) || currentNode.parentNode;\n\t          var childNodes = getChildNodes(currentNode) || currentNode.childNodes;\n\n\t          if (childNodes && parentNode) {\n\t            var childCount = childNodes.length;\n\n\t            for (var i = childCount - 1; i >= 0; --i) {\n\t              parentNode.insertBefore(cloneNode(childNodes[i], true), getNextSibling(currentNode));\n\t            }\n\t          }\n\t        }\n\n\t        _forceRemove(currentNode);\n\n\t        return true;\n\t      }\n\t      /* Check whether element has a valid namespace */\n\n\n\t      if (currentNode instanceof Element && !_checkValidNamespace(currentNode)) {\n\t        _forceRemove(currentNode);\n\n\t        return true;\n\t      }\n\n\t      if ((tagName === 'noscript' || tagName === 'noembed') && regExpTest(/<\\/no(script|embed)/i, currentNode.innerHTML)) {\n\t        _forceRemove(currentNode);\n\n\t        return true;\n\t      }\n\t      /* Sanitize element content to be template-safe */\n\n\n\t      if (SAFE_FOR_TEMPLATES && currentNode.nodeType === 3) {\n\t        /* Get the element's text content */\n\t        content = currentNode.textContent;\n\t        content = stringReplace(content, MUSTACHE_EXPR$1, ' ');\n\t        content = stringReplace(content, ERB_EXPR$1, ' ');\n\n\t        if (currentNode.textContent !== content) {\n\t          arrayPush(DOMPurify.removed, {\n\t            element: currentNode.cloneNode()\n\t          });\n\t          currentNode.textContent = content;\n\t        }\n\t      }\n\t      /* Execute a hook if present */\n\n\n\t      _executeHook('afterSanitizeElements', currentNode, null);\n\n\t      return false;\n\t    };\n\t    /**\n\t     * _isValidAttribute\n\t     *\n\t     * @param  {string} lcTag Lowercase tag name of containing element.\n\t     * @param  {string} lcName Lowercase attribute name.\n\t     * @param  {string} value Attribute value.\n\t     * @return {Boolean} Returns true if `value` is valid, otherwise false.\n\t     */\n\t    // eslint-disable-next-line complexity\n\n\n\t    var _isValidAttribute = function _isValidAttribute(lcTag, lcName, value) {\n\t      /* Make sure attribute cannot clobber */\n\t      if (SANITIZE_DOM && (lcName === 'id' || lcName === 'name') && (value in document || value in formElement)) {\n\t        return false;\n\t      }\n\t      /* Allow valid data-* attributes: At least one character after \"-\"\n\t          (https://html.spec.whatwg.org/multipage/dom.html#embedding-custom-non-visible-data-with-the-data-*-attributes)\n\t          XML-compatible (https://html.spec.whatwg.org/multipage/infrastructure.html#xml-compatible and http://www.w3.org/TR/xml/#d0e804)\n\t          We don't need to check the value; it's always URI safe. */\n\n\n\t      if (ALLOW_DATA_ATTR && !FORBID_ATTR[lcName] && regExpTest(DATA_ATTR$1, lcName)) ; else if (ALLOW_ARIA_ATTR && regExpTest(ARIA_ATTR$1, lcName)) ; else if (!ALLOWED_ATTR[lcName] || FORBID_ATTR[lcName]) {\n\t        if ( // First condition does a very basic check if a) it's basically a valid custom element tagname AND\n\t        // b) if the tagName passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck\n\t        // and c) if the attribute name passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.attributeNameCheck\n\t        _basicCustomElementTest(lcTag) && (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, lcTag) || CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.tagNameCheck(lcTag)) && (CUSTOM_ELEMENT_HANDLING.attributeNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.attributeNameCheck, lcName) || CUSTOM_ELEMENT_HANDLING.attributeNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.attributeNameCheck(lcName)) || // Alternative, second condition checks if it's an `is`-attribute, AND\n\t        // the value passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck\n\t        lcName === 'is' && CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements && (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, value) || CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.tagNameCheck(value))) ; else {\n\t          return false;\n\t        }\n\t        /* Check value is safe. First, is attr inert? If so, is safe */\n\n\t      } else if (URI_SAFE_ATTRIBUTES[lcName]) ; else if (regExpTest(IS_ALLOWED_URI$1, stringReplace(value, ATTR_WHITESPACE$1, ''))) ; else if ((lcName === 'src' || lcName === 'xlink:href' || lcName === 'href') && lcTag !== 'script' && stringIndexOf(value, 'data:') === 0 && DATA_URI_TAGS[lcTag]) ; else if (ALLOW_UNKNOWN_PROTOCOLS && !regExpTest(IS_SCRIPT_OR_DATA$1, stringReplace(value, ATTR_WHITESPACE$1, ''))) ; else if (!value) ; else {\n\t        return false;\n\t      }\n\n\t      return true;\n\t    };\n\t    /**\n\t     * _basicCustomElementCheck\n\t     * checks if at least one dash is included in tagName, and it's not the first char\n\t     * for more sophisticated checking see https://github.com/sindresorhus/validate-element-name\n\t     * @param {string} tagName name of the tag of the node to sanitize\n\t     */\n\n\n\t    var _basicCustomElementTest = function _basicCustomElementTest(tagName) {\n\t      return tagName.indexOf('-') > 0;\n\t    };\n\t    /**\n\t     * _sanitizeAttributes\n\t     *\n\t     * @protect attributes\n\t     * @protect nodeName\n\t     * @protect removeAttribute\n\t     * @protect setAttribute\n\t     *\n\t     * @param  {Node} currentNode to sanitize\n\t     */\n\n\n\t    var _sanitizeAttributes = function _sanitizeAttributes(currentNode) {\n\t      var attr;\n\t      var value;\n\t      var lcName;\n\t      var l;\n\t      /* Execute a hook if present */\n\n\t      _executeHook('beforeSanitizeAttributes', currentNode, null);\n\n\t      var attributes = currentNode.attributes;\n\t      /* Check if we have attributes; if not we might have a text node */\n\n\t      if (!attributes) {\n\t        return;\n\t      }\n\n\t      var hookEvent = {\n\t        attrName: '',\n\t        attrValue: '',\n\t        keepAttr: true,\n\t        allowedAttributes: ALLOWED_ATTR\n\t      };\n\t      l = attributes.length;\n\t      /* Go backwards over all attributes; safely remove bad ones */\n\n\t      while (l--) {\n\t        attr = attributes[l];\n\t        var _attr = attr,\n\t            name = _attr.name,\n\t            namespaceURI = _attr.namespaceURI;\n\t        value = name === 'value' ? attr.value : stringTrim(attr.value);\n\t        lcName = transformCaseFunc(name);\n\t        /* Execute a hook if present */\n\n\t        hookEvent.attrName = lcName;\n\t        hookEvent.attrValue = value;\n\t        hookEvent.keepAttr = true;\n\t        hookEvent.forceKeepAttr = undefined; // Allows developers to see this is a property they can set\n\n\t        _executeHook('uponSanitizeAttribute', currentNode, hookEvent);\n\n\t        value = hookEvent.attrValue;\n\t        /* Did the hooks approve of the attribute? */\n\n\t        if (hookEvent.forceKeepAttr) {\n\t          continue;\n\t        }\n\t        /* Remove attribute */\n\n\n\t        _removeAttribute(name, currentNode);\n\t        /* Did the hooks approve of the attribute? */\n\n\n\t        if (!hookEvent.keepAttr) {\n\t          continue;\n\t        }\n\t        /* Work around a security issue in jQuery 3.0 */\n\n\n\t        if (regExpTest(/\\/>/i, value)) {\n\t          _removeAttribute(name, currentNode);\n\n\t          continue;\n\t        }\n\t        /* Sanitize attribute content to be template-safe */\n\n\n\t        if (SAFE_FOR_TEMPLATES) {\n\t          value = stringReplace(value, MUSTACHE_EXPR$1, ' ');\n\t          value = stringReplace(value, ERB_EXPR$1, ' ');\n\t        }\n\t        /* Is `value` valid for this attribute? */\n\n\n\t        var lcTag = transformCaseFunc(currentNode.nodeName);\n\n\t        if (!_isValidAttribute(lcTag, lcName, value)) {\n\t          continue;\n\t        }\n\t        /* Full DOM Clobbering protection via namespace isolation,\n\t         * Prefix id and name attributes with `user-content-`\n\t         */\n\n\n\t        if (SANITIZE_NAMED_PROPS && (lcName === 'id' || lcName === 'name')) {\n\t          // Remove the attribute with this value\n\t          _removeAttribute(name, currentNode); // Prefix the value and later re-create the attribute with the sanitized value\n\n\n\t          value = SANITIZE_NAMED_PROPS_PREFIX + value;\n\t        }\n\t        /* Handle attributes that require Trusted Types */\n\n\n\t        if (trustedTypesPolicy && _typeof(trustedTypes) === 'object' && typeof trustedTypes.getAttributeType === 'function') {\n\t          if (namespaceURI) ; else {\n\t            switch (trustedTypes.getAttributeType(lcTag, lcName)) {\n\t              case 'TrustedHTML':\n\t                value = trustedTypesPolicy.createHTML(value);\n\t                break;\n\n\t              case 'TrustedScriptURL':\n\t                value = trustedTypesPolicy.createScriptURL(value);\n\t                break;\n\t            }\n\t          }\n\t        }\n\t        /* Handle invalid data-* attribute set by try-catching it */\n\n\n\t        try {\n\t          if (namespaceURI) {\n\t            currentNode.setAttributeNS(namespaceURI, name, value);\n\t          } else {\n\t            /* Fallback to setAttribute() for browser-unrecognized namespaces e.g. \"x-schema\". */\n\t            currentNode.setAttribute(name, value);\n\t          }\n\n\t          arrayPop(DOMPurify.removed);\n\t        } catch (_) {}\n\t      }\n\t      /* Execute a hook if present */\n\n\n\t      _executeHook('afterSanitizeAttributes', currentNode, null);\n\t    };\n\t    /**\n\t     * _sanitizeShadowDOM\n\t     *\n\t     * @param  {DocumentFragment} fragment to iterate over recursively\n\t     */\n\n\n\t    var _sanitizeShadowDOM = function _sanitizeShadowDOM(fragment) {\n\t      var shadowNode;\n\n\t      var shadowIterator = _createIterator(fragment);\n\t      /* Execute a hook if present */\n\n\n\t      _executeHook('beforeSanitizeShadowDOM', fragment, null);\n\n\t      while (shadowNode = shadowIterator.nextNode()) {\n\t        /* Execute a hook if present */\n\t        _executeHook('uponSanitizeShadowNode', shadowNode, null);\n\t        /* Sanitize tags and elements */\n\n\n\t        if (_sanitizeElements(shadowNode)) {\n\t          continue;\n\t        }\n\t        /* Deep shadow DOM detected */\n\n\n\t        if (shadowNode.content instanceof DocumentFragment) {\n\t          _sanitizeShadowDOM(shadowNode.content);\n\t        }\n\t        /* Check attributes, sanitize if necessary */\n\n\n\t        _sanitizeAttributes(shadowNode);\n\t      }\n\t      /* Execute a hook if present */\n\n\n\t      _executeHook('afterSanitizeShadowDOM', fragment, null);\n\t    };\n\t    /**\n\t     * Sanitize\n\t     * Public method providing core sanitation functionality\n\t     *\n\t     * @param {String|Node} dirty string or DOM node\n\t     * @param {Object} configuration object\n\t     */\n\t    // eslint-disable-next-line complexity\n\n\n\t    DOMPurify.sanitize = function (dirty) {\n\t      var cfg = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\t      var body;\n\t      var importedNode;\n\t      var currentNode;\n\t      var oldNode;\n\t      var returnNode;\n\t      /* Make sure we have a string to sanitize.\n\t        DO NOT return early, as this will return the wrong type if\n\t        the user has requested a DOM object rather than a string */\n\n\t      IS_EMPTY_INPUT = !dirty;\n\n\t      if (IS_EMPTY_INPUT) {\n\t        dirty = '<!-->';\n\t      }\n\t      /* Stringify, in case dirty is an object */\n\n\n\t      if (typeof dirty !== 'string' && !_isNode(dirty)) {\n\t        // eslint-disable-next-line no-negated-condition\n\t        if (typeof dirty.toString !== 'function') {\n\t          throw typeErrorCreate('toString is not a function');\n\t        } else {\n\t          dirty = dirty.toString();\n\n\t          if (typeof dirty !== 'string') {\n\t            throw typeErrorCreate('dirty is not a string, aborting');\n\t          }\n\t        }\n\t      }\n\t      /* Check we can run. Otherwise fall back or ignore */\n\n\n\t      if (!DOMPurify.isSupported) {\n\t        if (_typeof(window.toStaticHTML) === 'object' || typeof window.toStaticHTML === 'function') {\n\t          if (typeof dirty === 'string') {\n\t            return window.toStaticHTML(dirty);\n\t          }\n\n\t          if (_isNode(dirty)) {\n\t            return window.toStaticHTML(dirty.outerHTML);\n\t          }\n\t        }\n\n\t        return dirty;\n\t      }\n\t      /* Assign config vars */\n\n\n\t      if (!SET_CONFIG) {\n\t        _parseConfig(cfg);\n\t      }\n\t      /* Clean up removed elements */\n\n\n\t      DOMPurify.removed = [];\n\t      /* Check if dirty is correctly typed for IN_PLACE */\n\n\t      if (typeof dirty === 'string') {\n\t        IN_PLACE = false;\n\t      }\n\n\t      if (IN_PLACE) {\n\t        /* Do some early pre-sanitization to avoid unsafe root nodes */\n\t        if (dirty.nodeName) {\n\t          var tagName = transformCaseFunc(dirty.nodeName);\n\n\t          if (!ALLOWED_TAGS[tagName] || FORBID_TAGS[tagName]) {\n\t            throw typeErrorCreate('root node is forbidden and cannot be sanitized in-place');\n\t          }\n\t        }\n\t      } else if (dirty instanceof Node) {\n\t        /* If dirty is a DOM element, append to an empty document to avoid\n\t           elements being stripped by the parser */\n\t        body = _initDocument('<!---->');\n\t        importedNode = body.ownerDocument.importNode(dirty, true);\n\n\t        if (importedNode.nodeType === 1 && importedNode.nodeName === 'BODY') {\n\t          /* Node is already a body, use as is */\n\t          body = importedNode;\n\t        } else if (importedNode.nodeName === 'HTML') {\n\t          body = importedNode;\n\t        } else {\n\t          // eslint-disable-next-line unicorn/prefer-dom-node-append\n\t          body.appendChild(importedNode);\n\t        }\n\t      } else {\n\t        /* Exit directly if we have nothing to do */\n\t        if (!RETURN_DOM && !SAFE_FOR_TEMPLATES && !WHOLE_DOCUMENT && // eslint-disable-next-line unicorn/prefer-includes\n\t        dirty.indexOf('<') === -1) {\n\t          return trustedTypesPolicy && RETURN_TRUSTED_TYPE ? trustedTypesPolicy.createHTML(dirty) : dirty;\n\t        }\n\t        /* Initialize the document to work on */\n\n\n\t        body = _initDocument(dirty);\n\t        /* Check we have a DOM node from the data */\n\n\t        if (!body) {\n\t          return RETURN_DOM ? null : RETURN_TRUSTED_TYPE ? emptyHTML : '';\n\t        }\n\t      }\n\t      /* Remove first element node (ours) if FORCE_BODY is set */\n\n\n\t      if (body && FORCE_BODY) {\n\t        _forceRemove(body.firstChild);\n\t      }\n\t      /* Get node iterator */\n\n\n\t      var nodeIterator = _createIterator(IN_PLACE ? dirty : body);\n\t      /* Now start iterating over the created document */\n\n\n\t      while (currentNode = nodeIterator.nextNode()) {\n\t        /* Fix IE's strange behavior with manipulated textNodes #89 */\n\t        if (currentNode.nodeType === 3 && currentNode === oldNode) {\n\t          continue;\n\t        }\n\t        /* Sanitize tags and elements */\n\n\n\t        if (_sanitizeElements(currentNode)) {\n\t          continue;\n\t        }\n\t        /* Shadow DOM detected, sanitize it */\n\n\n\t        if (currentNode.content instanceof DocumentFragment) {\n\t          _sanitizeShadowDOM(currentNode.content);\n\t        }\n\t        /* Check attributes, sanitize if necessary */\n\n\n\t        _sanitizeAttributes(currentNode);\n\n\t        oldNode = currentNode;\n\t      }\n\n\t      oldNode = null;\n\t      /* If we sanitized `dirty` in-place, return it. */\n\n\t      if (IN_PLACE) {\n\t        return dirty;\n\t      }\n\t      /* Return sanitized string or DOM */\n\n\n\t      if (RETURN_DOM) {\n\t        if (RETURN_DOM_FRAGMENT) {\n\t          returnNode = createDocumentFragment.call(body.ownerDocument);\n\n\t          while (body.firstChild) {\n\t            // eslint-disable-next-line unicorn/prefer-dom-node-append\n\t            returnNode.appendChild(body.firstChild);\n\t          }\n\t        } else {\n\t          returnNode = body;\n\t        }\n\n\t        if (ALLOWED_ATTR.shadowroot) {\n\t          /*\n\t            AdoptNode() is not used because internal state is not reset\n\t            (e.g. the past names map of a HTMLFormElement), this is safe\n\t            in theory but we would rather not risk another attack vector.\n\t            The state that is cloned by importNode() is explicitly defined\n\t            by the specs.\n\t          */\n\t          returnNode = importNode.call(originalDocument, returnNode, true);\n\t        }\n\n\t        return returnNode;\n\t      }\n\n\t      var serializedHTML = WHOLE_DOCUMENT ? body.outerHTML : body.innerHTML;\n\t      /* Serialize doctype if allowed */\n\n\t      if (WHOLE_DOCUMENT && ALLOWED_TAGS['!doctype'] && body.ownerDocument && body.ownerDocument.doctype && body.ownerDocument.doctype.name && regExpTest(DOCTYPE_NAME, body.ownerDocument.doctype.name)) {\n\t        serializedHTML = '<!DOCTYPE ' + body.ownerDocument.doctype.name + '>\\n' + serializedHTML;\n\t      }\n\t      /* Sanitize final string template-safe */\n\n\n\t      if (SAFE_FOR_TEMPLATES) {\n\t        serializedHTML = stringReplace(serializedHTML, MUSTACHE_EXPR$1, ' ');\n\t        serializedHTML = stringReplace(serializedHTML, ERB_EXPR$1, ' ');\n\t      }\n\n\t      return trustedTypesPolicy && RETURN_TRUSTED_TYPE ? trustedTypesPolicy.createHTML(serializedHTML) : serializedHTML;\n\t    };\n\t    /**\n\t     * Public method to set the configuration once\n\t     * setConfig\n\t     *\n\t     * @param {Object} cfg configuration object\n\t     */\n\n\n\t    DOMPurify.setConfig = function (cfg) {\n\t      _parseConfig(cfg);\n\n\t      SET_CONFIG = true;\n\t    };\n\t    /**\n\t     * Public method to remove the configuration\n\t     * clearConfig\n\t     *\n\t     */\n\n\n\t    DOMPurify.clearConfig = function () {\n\t      CONFIG = null;\n\t      SET_CONFIG = false;\n\t    };\n\t    /**\n\t     * Public method to check if an attribute value is valid.\n\t     * Uses last set config, if any. Otherwise, uses config defaults.\n\t     * isValidAttribute\n\t     *\n\t     * @param  {string} tag Tag name of containing element.\n\t     * @param  {string} attr Attribute name.\n\t     * @param  {string} value Attribute value.\n\t     * @return {Boolean} Returns true if `value` is valid. Otherwise, returns false.\n\t     */\n\n\n\t    DOMPurify.isValidAttribute = function (tag, attr, value) {\n\t      /* Initialize shared config vars if necessary. */\n\t      if (!CONFIG) {\n\t        _parseConfig({});\n\t      }\n\n\t      var lcTag = transformCaseFunc(tag);\n\t      var lcName = transformCaseFunc(attr);\n\t      return _isValidAttribute(lcTag, lcName, value);\n\t    };\n\t    /**\n\t     * AddHook\n\t     * Public method to add DOMPurify hooks\n\t     *\n\t     * @param {String} entryPoint entry point for the hook to add\n\t     * @param {Function} hookFunction function to execute\n\t     */\n\n\n\t    DOMPurify.addHook = function (entryPoint, hookFunction) {\n\t      if (typeof hookFunction !== 'function') {\n\t        return;\n\t      }\n\n\t      hooks[entryPoint] = hooks[entryPoint] || [];\n\t      arrayPush(hooks[entryPoint], hookFunction);\n\t    };\n\t    /**\n\t     * RemoveHook\n\t     * Public method to remove a DOMPurify hook at a given entryPoint\n\t     * (pops it from the stack of hooks if more are present)\n\t     *\n\t     * @param {String} entryPoint entry point for the hook to remove\n\t     * @return {Function} removed(popped) hook\n\t     */\n\n\n\t    DOMPurify.removeHook = function (entryPoint) {\n\t      if (hooks[entryPoint]) {\n\t        return arrayPop(hooks[entryPoint]);\n\t      }\n\t    };\n\t    /**\n\t     * RemoveHooks\n\t     * Public method to remove all DOMPurify hooks at a given entryPoint\n\t     *\n\t     * @param  {String} entryPoint entry point for the hooks to remove\n\t     */\n\n\n\t    DOMPurify.removeHooks = function (entryPoint) {\n\t      if (hooks[entryPoint]) {\n\t        hooks[entryPoint] = [];\n\t      }\n\t    };\n\t    /**\n\t     * RemoveAllHooks\n\t     * Public method to remove all DOMPurify hooks\n\t     *\n\t     */\n\n\n\t    DOMPurify.removeAllHooks = function () {\n\t      hooks = {};\n\t    };\n\n\t    return DOMPurify;\n\t  }\n\n\t  var purify = createDOMPurify();\n\n\t  return purify;\n\n\t}));\n\n\t});\n\n\tvar sanitizer = purify(window);\n\n\tfunction _createSuper$r(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$r(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = construct$4(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\n\tfunction _isNativeReflectConstruct$r() { if (typeof Reflect === \"undefined\" || !construct$4) return false; if (construct$4.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(construct$4(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\n\tvar HtmlBlock = /*#__PURE__*/function (_ParagraphBase) {\n\t  _inherits(HtmlBlock, _ParagraphBase);\n\n\t  var _super = _createSuper$r(HtmlBlock);\n\n\t  function HtmlBlock() {\n\t    _classCallCheck(this, HtmlBlock);\n\n\t    return _super.call(this, {\n\t      needCache: true\n\t    });\n\t  } // ref: http://www.vfmd.org/vfmd-spec/specification/#procedure-for-detecting-automatic-links\n\n\n\t  _createClass(HtmlBlock, [{\n\t    key: \"isAutoLinkTag\",\n\t    value: function isAutoLinkTag(tagMatch) {\n\t      var REGEX_GROUP = [/^<([a-z][a-z0-9+.-]{1,31}:\\/\\/[^<> `]+)>$/i, /^<(mailto:[^<> `]+)>$/i, /^<([^()<>[\\]:'@\\\\,\"\\s`]+@[^()<>[\\]:'@\\\\,\"\\s`.]+\\.[^()<>[\\]:'@\\\\,\"\\s`]+)>$/i];\n\t      return some$3(REGEX_GROUP).call(REGEX_GROUP, function (regex) {\n\t        return regex.test(tagMatch);\n\t      });\n\t    }\n\t  }, {\n\t    key: \"isHtmlComment\",\n\t    value: function isHtmlComment(match) {\n\t      var htmlComment = /^<!--.*?-->$/;\n\t      return htmlComment.test(match);\n\t    }\n\t  }, {\n\t    key: \"beforeMakeHtml\",\n\t    value: function beforeMakeHtml(str, sentenceMakeFunc) {\n\t      var _this = this;\n\n\t      if (this.$engine.htmlWhiteListAppend) {\n\t        /**\n\t         * @property\n\t         * @type {false | RegExp}\n\t         */\n\t        this.htmlWhiteListAppend = new RegExp(\"^(\".concat(this.$engine.htmlWhiteListAppend, \")( |$|/)\"), 'i');\n\t        /**\n\t         * @property\n\t         * @type {string[]}\n\t         */\n\n\t        this.htmlWhiteList = this.$engine.htmlWhiteListAppend.split('|');\n\t      } else {\n\t        this.htmlWhiteListAppend = false;\n\t        this.htmlWhiteList = [];\n\t      }\n\n\t      var $str = str;\n\t      $str = convertHTMLNumberToName($str);\n\t      $str = escapeHTMLEntitiesWithoutSemicolon($str);\n\t      $str = $str.replace(/<[/]?(.*?)>/g, function (whole, m1) {\n\t        // 匹配到非白名单且非AutoLink语法的尖括号会被转义\n\t        // 如果是HTML注释，放行\n\t        if (!whiteList.test(m1) && !_this.isAutoLinkTag(whole) && !_this.isHtmlComment(whole)) {\n\t          if (_this.htmlWhiteListAppend === false || !_this.htmlWhiteListAppend.test(m1)) {\n\t            return whole.replace(/</g, '&#60;').replace(/>/g, '&#62;');\n\t          }\n\t        } // 到达此分支的包含被尖括号包裹的AutoLink语法以及在白名单内的HTML标签\n\t        // 没有被AutoLink解析并渲染的标签会被DOMPurify过滤掉，正常情况下不会出现遗漏\n\t        // 临时替换完整的HTML标签首尾为$#60;和$#62;，供下一步剔除损坏的HTML标签\n\n\n\t        return whole.replace(/</g, '$#60;').replace(/>/g, '$#62;');\n\t      }); // 替换所有形如「<abcd」和「</abcd」的左尖括号\n\n\t      $str = $str.replace(/<(?=\\/?(\\w|\\n|$))/g, '&#60;'); // 还原被替换的尖括号\n\n\t      $str = $str.replace(/\\$#60;/g, '<').replace(/\\$#62;/g, '>');\n\t      return $str;\n\t    } // beforeMakeHtml(str) {\n\t    //     return str;\n\t    // }\n\n\t  }, {\n\t    key: \"makeHtml\",\n\t    value: function makeHtml(str, sentenceMakeFunc) {\n\t      return str;\n\t    }\n\t  }, {\n\t    key: \"afterMakeHtml\",\n\t    value: function afterMakeHtml(str) {\n\t      var $str = str;\n\t      var config = {\n\t        ALLOW_UNKNOWN_PROTOCOLS: true,\n\t        ADD_ATTR: ['target']\n\t      };\n\n\t      if (this.htmlWhiteListAppend !== false) {\n\t        config.ADD_TAGS = this.htmlWhiteList;\n\n\t        if (this.htmlWhiteListAppend.test('style') || this.htmlWhiteListAppend.test('ALL')) {\n\t          $str = $str.replace(/<style(>| [^>]*>).*?<\\/style>/gi, function (match) {\n\t            return match.replace(/<br>/gi, '');\n\t          });\n\t        }\n\n\t        if (this.htmlWhiteListAppend.test('iframe') || this.htmlWhiteListAppend.test('ALL')) {\n\t          var _context;\n\n\t          config.ADD_ATTR = concat$5(_context = config.ADD_ATTR).call(_context, ['align', 'frameborder', 'height', 'longdesc', 'marginheight', 'marginwidth', 'name', 'sandbox', 'scrolling', 'seamless', 'src', 'srcdoc', 'width']);\n\t          config.SANITIZE_DOM = false;\n\t          $str = $str.replace(/<iframe(>| [^>]*>).*?<\\/iframe>/gi, function (match) {\n\t            return match.replace(/<br>/gi, '').replace(/\\n/g, '');\n\t          });\n\t        }\n\n\t        if (this.htmlWhiteListAppend.test('script') || this.htmlWhiteListAppend.test('ALL')) {\n\t          // 如果允许script或者输入了ALL，则不做任何过滤了\n\t          $str = $str.replace(/<script(>| [^>]*>).*?<\\/script>/gi, function (match) {\n\t            return match.replace(/<br>/gi, '');\n\t          });\n\t          return $str;\n\t        }\n\t      } // node 环境下不输出sign和lines\n\n\n\t      if (!isBrowser()) {\n\t        config.FORBID_ATTR = ['data-sign', 'data-lines'];\n\t      }\n\n\t      return sanitizer.sanitize($str, config);\n\t    }\n\t  }]);\n\n\t  return HtmlBlock;\n\t}(ParagraphBase);\n\n\t_defineProperty(HtmlBlock, \"HOOK_NAME\", 'htmlBlock');\n\n\t/**\n\t * Copyright (C) 2021 THL A29 Limited, a Tencent company.\n\t *\n\t * Licensed under the Apache License, Version 2.0 (the \"License\");\n\t * you may not use this file except in compliance with the License.\n\t * You may obtain a copy of the License at\n\t *\n\t *     http://www.apache.org/licenses/LICENSE-2.0\n\t *\n\t * Unless required by applicable law or agreed to in writing, software\n\t * distributed under the License is distributed on an \"AS IS\" BASIS,\n\t * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n\t * See the License for the specific language governing permissions and\n\t * limitations under the License.\n\t */\n\tvar gfmUnicode = {\n\t  defaultURL: 'https://github.githubassets.com/images/icons/emoji/unicode/${code}.png?v8',\n\t  emojis: {\n\t    '+1': '1f44d',\n\t    '-1': '1f44e',\n\t    100: '1f4af',\n\t    1234: '1f522',\n\t    '1st_place_medal': '1f947',\n\t    '2nd_place_medal': '1f948',\n\t    '3rd_place_medal': '1f949',\n\t    '8ball': '1f3b1',\n\t    a: '1f170',\n\t    ab: '1f18e',\n\t    abacus: '1f9ee',\n\t    abc: '1f524',\n\t    abcd: '1f521',\n\t    accept: '1f251',\n\t    adhesive_bandage: '1fa79',\n\t    adult: '1f9d1',\n\t    aerial_tramway: '1f6a1',\n\t    afghanistan: '1f1e6-1f1eb',\n\t    airplane: '2708',\n\t    aland_islands: '1f1e6-1f1fd',\n\t    alarm_clock: '23f0',\n\t    albania: '1f1e6-1f1f1',\n\t    alembic: '2697',\n\t    algeria: '1f1e9-1f1ff',\n\t    alien: '1f47d',\n\t    ambulance: '1f691',\n\t    american_samoa: '1f1e6-1f1f8',\n\t    amphora: '1f3fa',\n\t    anchor: '2693',\n\t    andorra: '1f1e6-1f1e9',\n\t    angel: '1f47c',\n\t    anger: '1f4a2',\n\t    angola: '1f1e6-1f1f4',\n\t    angry: '1f620',\n\t    anguilla: '1f1e6-1f1ee',\n\t    anguished: '1f627',\n\t    ant: '1f41c',\n\t    antarctica: '1f1e6-1f1f6',\n\t    antigua_barbuda: '1f1e6-1f1ec',\n\t    apple: '1f34e',\n\t    aquarius: '2652',\n\t    argentina: '1f1e6-1f1f7',\n\t    aries: '2648',\n\t    armenia: '1f1e6-1f1f2',\n\t    arrow_backward: '25c0',\n\t    arrow_double_down: '23ec',\n\t    arrow_double_up: '23eb',\n\t    arrow_down: '2b07',\n\t    arrow_down_small: '1f53d',\n\t    arrow_forward: '25b6',\n\t    arrow_heading_down: '2935',\n\t    arrow_heading_up: '2934',\n\t    arrow_left: '2b05',\n\t    arrow_lower_left: '2199',\n\t    arrow_lower_right: '2198',\n\t    arrow_right: '27a1',\n\t    arrow_right_hook: '21aa',\n\t    arrow_up: '2b06',\n\t    arrow_up_down: '2195',\n\t    arrow_up_small: '1f53c',\n\t    arrow_upper_left: '2196',\n\t    arrow_upper_right: '2197',\n\t    arrows_clockwise: '1f503',\n\t    arrows_counterclockwise: '1f504',\n\t    art: '1f3a8',\n\t    articulated_lorry: '1f69b',\n\t    artificial_satellite: '1f6f0',\n\t    artist: '1f9d1-1f3a8',\n\t    aruba: '1f1e6-1f1fc',\n\t    ascension_island: '1f1e6-1f1e8',\n\t    asterisk: '002a-20e3',\n\t    astonished: '1f632',\n\t    astronaut: '1f9d1-1f680',\n\t    athletic_shoe: '1f45f',\n\t    atm: '1f3e7',\n\t    atom_symbol: '269b',\n\t    australia: '1f1e6-1f1fa',\n\t    austria: '1f1e6-1f1f9',\n\t    auto_rickshaw: '1f6fa',\n\t    avocado: '1f951',\n\t    axe: '1fa93',\n\t    azerbaijan: '1f1e6-1f1ff',\n\t    b: '1f171',\n\t    baby: '1f476',\n\t    baby_bottle: '1f37c',\n\t    baby_chick: '1f424',\n\t    baby_symbol: '1f6bc',\n\t    back: '1f519',\n\t    bacon: '1f953',\n\t    badger: '1f9a1',\n\t    badminton: '1f3f8',\n\t    bagel: '1f96f',\n\t    baggage_claim: '1f6c4',\n\t    baguette_bread: '1f956',\n\t    bahamas: '1f1e7-1f1f8',\n\t    bahrain: '1f1e7-1f1ed',\n\t    balance_scale: '2696',\n\t    bald_man: '1f468-1f9b2',\n\t    bald_woman: '1f469-1f9b2',\n\t    ballet_shoes: '1fa70',\n\t    balloon: '1f388',\n\t    ballot_box: '1f5f3',\n\t    ballot_box_with_check: '2611',\n\t    bamboo: '1f38d',\n\t    banana: '1f34c',\n\t    bangbang: '203c',\n\t    bangladesh: '1f1e7-1f1e9',\n\t    banjo: '1fa95',\n\t    bank: '1f3e6',\n\t    bar_chart: '1f4ca',\n\t    barbados: '1f1e7-1f1e7',\n\t    barber: '1f488',\n\t    baseball: '26be',\n\t    basket: '1f9fa',\n\t    basketball: '1f3c0',\n\t    basketball_man: '26f9-2642',\n\t    basketball_woman: '26f9-2640',\n\t    bat: '1f987',\n\t    bath: '1f6c0',\n\t    bathtub: '1f6c1',\n\t    battery: '1f50b',\n\t    beach_umbrella: '1f3d6',\n\t    bear: '1f43b',\n\t    bearded_person: '1f9d4',\n\t    bed: '1f6cf',\n\t    bee: '1f41d',\n\t    beer: '1f37a',\n\t    beers: '1f37b',\n\t    beetle: '1f41e',\n\t    beginner: '1f530',\n\t    belarus: '1f1e7-1f1fe',\n\t    belgium: '1f1e7-1f1ea',\n\t    belize: '1f1e7-1f1ff',\n\t    bell: '1f514',\n\t    bellhop_bell: '1f6ce',\n\t    benin: '1f1e7-1f1ef',\n\t    bento: '1f371',\n\t    bermuda: '1f1e7-1f1f2',\n\t    beverage_box: '1f9c3',\n\t    bhutan: '1f1e7-1f1f9',\n\t    bicyclist: '1f6b4',\n\t    bike: '1f6b2',\n\t    biking_man: '1f6b4-2642',\n\t    biking_woman: '1f6b4-2640',\n\t    bikini: '1f459',\n\t    billed_cap: '1f9e2',\n\t    biohazard: '2623',\n\t    bird: '1f426',\n\t    birthday: '1f382',\n\t    black_circle: '26ab',\n\t    black_flag: '1f3f4',\n\t    black_heart: '1f5a4',\n\t    black_joker: '1f0cf',\n\t    black_large_square: '2b1b',\n\t    black_medium_small_square: '25fe',\n\t    black_medium_square: '25fc',\n\t    black_nib: '2712',\n\t    black_small_square: '25aa',\n\t    black_square_button: '1f532',\n\t    blond_haired_man: '1f471-2642',\n\t    blond_haired_person: '1f471',\n\t    blond_haired_woman: '1f471-2640',\n\t    blonde_woman: '1f471-2640',\n\t    blossom: '1f33c',\n\t    blowfish: '1f421',\n\t    blue_book: '1f4d8',\n\t    blue_car: '1f699',\n\t    blue_heart: '1f499',\n\t    blue_square: '1f7e6',\n\t    blush: '1f60a',\n\t    boar: '1f417',\n\t    boat: '26f5',\n\t    bolivia: '1f1e7-1f1f4',\n\t    bomb: '1f4a3',\n\t    bone: '1f9b4',\n\t    book: '1f4d6',\n\t    bookmark: '1f516',\n\t    bookmark_tabs: '1f4d1',\n\t    books: '1f4da',\n\t    boom: '1f4a5',\n\t    boot: '1f462',\n\t    bosnia_herzegovina: '1f1e7-1f1e6',\n\t    botswana: '1f1e7-1f1fc',\n\t    bouncing_ball_man: '26f9-2642',\n\t    bouncing_ball_person: '26f9',\n\t    bouncing_ball_woman: '26f9-2640',\n\t    bouquet: '1f490',\n\t    bouvet_island: '1f1e7-1f1fb',\n\t    bow: '1f647',\n\t    bow_and_arrow: '1f3f9',\n\t    bowing_man: '1f647-2642',\n\t    bowing_woman: '1f647-2640',\n\t    bowl_with_spoon: '1f963',\n\t    bowling: '1f3b3',\n\t    boxing_glove: '1f94a',\n\t    boy: '1f466',\n\t    brain: '1f9e0',\n\t    brazil: '1f1e7-1f1f7',\n\t    bread: '1f35e',\n\t    breast_feeding: '1f931',\n\t    bricks: '1f9f1',\n\t    bride_with_veil: '1f470',\n\t    bridge_at_night: '1f309',\n\t    briefcase: '1f4bc',\n\t    british_indian_ocean_territory: '1f1ee-1f1f4',\n\t    british_virgin_islands: '1f1fb-1f1ec',\n\t    broccoli: '1f966',\n\t    broken_heart: '1f494',\n\t    broom: '1f9f9',\n\t    brown_circle: '1f7e4',\n\t    brown_heart: '1f90e',\n\t    brown_square: '1f7eb',\n\t    brunei: '1f1e7-1f1f3',\n\t    bug: '1f41b',\n\t    building_construction: '1f3d7',\n\t    bulb: '1f4a1',\n\t    bulgaria: '1f1e7-1f1ec',\n\t    bullettrain_front: '1f685',\n\t    bullettrain_side: '1f684',\n\t    burkina_faso: '1f1e7-1f1eb',\n\t    burrito: '1f32f',\n\t    burundi: '1f1e7-1f1ee',\n\t    bus: '1f68c',\n\t    business_suit_levitating: '1f574',\n\t    busstop: '1f68f',\n\t    bust_in_silhouette: '1f464',\n\t    busts_in_silhouette: '1f465',\n\t    butter: '1f9c8',\n\t    butterfly: '1f98b',\n\t    cactus: '1f335',\n\t    cake: '1f370',\n\t    calendar: '1f4c6',\n\t    call_me_hand: '1f919',\n\t    calling: '1f4f2',\n\t    cambodia: '1f1f0-1f1ed',\n\t    camel: '1f42b',\n\t    camera: '1f4f7',\n\t    camera_flash: '1f4f8',\n\t    cameroon: '1f1e8-1f1f2',\n\t    camping: '1f3d5',\n\t    canada: '1f1e8-1f1e6',\n\t    canary_islands: '1f1ee-1f1e8',\n\t    cancer: '264b',\n\t    candle: '1f56f',\n\t    candy: '1f36c',\n\t    canned_food: '1f96b',\n\t    canoe: '1f6f6',\n\t    cape_verde: '1f1e8-1f1fb',\n\t    capital_abcd: '1f520',\n\t    capricorn: '2651',\n\t    car: '1f697',\n\t    card_file_box: '1f5c3',\n\t    card_index: '1f4c7',\n\t    card_index_dividers: '1f5c2',\n\t    caribbean_netherlands: '1f1e7-1f1f6',\n\t    carousel_horse: '1f3a0',\n\t    carrot: '1f955',\n\t    cartwheeling: '1f938',\n\t    cat: '1f431',\n\t    cat2: '1f408',\n\t    cayman_islands: '1f1f0-1f1fe',\n\t    cd: '1f4bf',\n\t    central_african_republic: '1f1e8-1f1eb',\n\t    ceuta_melilla: '1f1ea-1f1e6',\n\t    chad: '1f1f9-1f1e9',\n\t    chains: '26d3',\n\t    chair: '1fa91',\n\t    champagne: '1f37e',\n\t    chart: '1f4b9',\n\t    chart_with_downwards_trend: '1f4c9',\n\t    chart_with_upwards_trend: '1f4c8',\n\t    checkered_flag: '1f3c1',\n\t    cheese: '1f9c0',\n\t    cherries: '1f352',\n\t    cherry_blossom: '1f338',\n\t    chess_pawn: '265f',\n\t    chestnut: '1f330',\n\t    chicken: '1f414',\n\t    child: '1f9d2',\n\t    children_crossing: '1f6b8',\n\t    chile: '1f1e8-1f1f1',\n\t    chipmunk: '1f43f',\n\t    chocolate_bar: '1f36b',\n\t    chopsticks: '1f962',\n\t    christmas_island: '1f1e8-1f1fd',\n\t    christmas_tree: '1f384',\n\t    church: '26ea',\n\t    cinema: '1f3a6',\n\t    circus_tent: '1f3aa',\n\t    city_sunrise: '1f307',\n\t    city_sunset: '1f306',\n\t    cityscape: '1f3d9',\n\t    cl: '1f191',\n\t    clamp: '1f5dc',\n\t    clap: '1f44f',\n\t    clapper: '1f3ac',\n\t    classical_building: '1f3db',\n\t    climbing: '1f9d7',\n\t    climbing_man: '1f9d7-2642',\n\t    climbing_woman: '1f9d7-2640',\n\t    clinking_glasses: '1f942',\n\t    clipboard: '1f4cb',\n\t    clipperton_island: '1f1e8-1f1f5',\n\t    clock1: '1f550',\n\t    clock10: '1f559',\n\t    clock1030: '1f565',\n\t    clock11: '1f55a',\n\t    clock1130: '1f566',\n\t    clock12: '1f55b',\n\t    clock1230: '1f567',\n\t    clock130: '1f55c',\n\t    clock2: '1f551',\n\t    clock230: '1f55d',\n\t    clock3: '1f552',\n\t    clock330: '1f55e',\n\t    clock4: '1f553',\n\t    clock430: '1f55f',\n\t    clock5: '1f554',\n\t    clock530: '1f560',\n\t    clock6: '1f555',\n\t    clock630: '1f561',\n\t    clock7: '1f556',\n\t    clock730: '1f562',\n\t    clock8: '1f557',\n\t    clock830: '1f563',\n\t    clock9: '1f558',\n\t    clock930: '1f564',\n\t    closed_book: '1f4d5',\n\t    closed_lock_with_key: '1f510',\n\t    closed_umbrella: '1f302',\n\t    cloud: '2601',\n\t    cloud_with_lightning: '1f329',\n\t    cloud_with_lightning_and_rain: '26c8',\n\t    cloud_with_rain: '1f327',\n\t    cloud_with_snow: '1f328',\n\t    clown_face: '1f921',\n\t    clubs: '2663',\n\t    cn: '1f1e8-1f1f3',\n\t    coat: '1f9e5',\n\t    cocktail: '1f378',\n\t    coconut: '1f965',\n\t    cocos_islands: '1f1e8-1f1e8',\n\t    coffee: '2615',\n\t    coffin: '26b0',\n\t    cold_face: '1f976',\n\t    cold_sweat: '1f630',\n\t    collision: '1f4a5',\n\t    colombia: '1f1e8-1f1f4',\n\t    comet: '2604',\n\t    comoros: '1f1f0-1f1f2',\n\t    compass: '1f9ed',\n\t    computer: '1f4bb',\n\t    computer_mouse: '1f5b1',\n\t    confetti_ball: '1f38a',\n\t    confounded: '1f616',\n\t    confused: '1f615',\n\t    congo_brazzaville: '1f1e8-1f1ec',\n\t    congo_kinshasa: '1f1e8-1f1e9',\n\t    congratulations: '3297',\n\t    construction: '1f6a7',\n\t    construction_worker: '1f477',\n\t    construction_worker_man: '1f477-2642',\n\t    construction_worker_woman: '1f477-2640',\n\t    control_knobs: '1f39b',\n\t    convenience_store: '1f3ea',\n\t    cook: '1f9d1-1f373',\n\t    cook_islands: '1f1e8-1f1f0',\n\t    cookie: '1f36a',\n\t    cool: '1f192',\n\t    cop: '1f46e',\n\t    copyright: '00a9',\n\t    corn: '1f33d',\n\t    costa_rica: '1f1e8-1f1f7',\n\t    cote_divoire: '1f1e8-1f1ee',\n\t    couch_and_lamp: '1f6cb',\n\t    couple: '1f46b',\n\t    couple_with_heart: '1f491',\n\t    couple_with_heart_man_man: '1f468-2764-1f468',\n\t    couple_with_heart_woman_man: '1f469-2764-1f468',\n\t    couple_with_heart_woman_woman: '1f469-2764-1f469',\n\t    couplekiss: '1f48f',\n\t    couplekiss_man_man: '1f468-2764-1f48b-1f468',\n\t    couplekiss_man_woman: '1f469-2764-1f48b-1f468',\n\t    couplekiss_woman_woman: '1f469-2764-1f48b-1f469',\n\t    cow: '1f42e',\n\t    cow2: '1f404',\n\t    cowboy_hat_face: '1f920',\n\t    crab: '1f980',\n\t    crayon: '1f58d',\n\t    credit_card: '1f4b3',\n\t    crescent_moon: '1f319',\n\t    cricket: '1f997',\n\t    cricket_game: '1f3cf',\n\t    croatia: '1f1ed-1f1f7',\n\t    crocodile: '1f40a',\n\t    croissant: '1f950',\n\t    crossed_fingers: '1f91e',\n\t    crossed_flags: '1f38c',\n\t    crossed_swords: '2694',\n\t    crown: '1f451',\n\t    cry: '1f622',\n\t    crying_cat_face: '1f63f',\n\t    crystal_ball: '1f52e',\n\t    cuba: '1f1e8-1f1fa',\n\t    cucumber: '1f952',\n\t    cup_with_straw: '1f964',\n\t    cupcake: '1f9c1',\n\t    cupid: '1f498',\n\t    curacao: '1f1e8-1f1fc',\n\t    curling_stone: '1f94c',\n\t    curly_haired_man: '1f468-1f9b1',\n\t    curly_haired_woman: '1f469-1f9b1',\n\t    curly_loop: '27b0',\n\t    currency_exchange: '1f4b1',\n\t    curry: '1f35b',\n\t    cursing_face: '1f92c',\n\t    custard: '1f36e',\n\t    customs: '1f6c3',\n\t    cut_of_meat: '1f969',\n\t    cyclone: '1f300',\n\t    cyprus: '1f1e8-1f1fe',\n\t    czech_republic: '1f1e8-1f1ff',\n\t    dagger: '1f5e1',\n\t    dancer: '1f483',\n\t    dancers: '1f46f',\n\t    dancing_men: '1f46f-2642',\n\t    dancing_women: '1f46f-2640',\n\t    dango: '1f361',\n\t    dark_sunglasses: '1f576',\n\t    dart: '1f3af',\n\t    dash: '1f4a8',\n\t    date: '1f4c5',\n\t    de: '1f1e9-1f1ea',\n\t    deaf_man: '1f9cf-2642',\n\t    deaf_person: '1f9cf',\n\t    deaf_woman: '1f9cf-2640',\n\t    deciduous_tree: '1f333',\n\t    deer: '1f98c',\n\t    denmark: '1f1e9-1f1f0',\n\t    department_store: '1f3ec',\n\t    derelict_house: '1f3da',\n\t    desert: '1f3dc',\n\t    desert_island: '1f3dd',\n\t    desktop_computer: '1f5a5',\n\t    detective: '1f575',\n\t    diamond_shape_with_a_dot_inside: '1f4a0',\n\t    diamonds: '2666',\n\t    diego_garcia: '1f1e9-1f1ec',\n\t    disappointed: '1f61e',\n\t    disappointed_relieved: '1f625',\n\t    diving_mask: '1f93f',\n\t    diya_lamp: '1fa94',\n\t    dizzy: '1f4ab',\n\t    dizzy_face: '1f635',\n\t    djibouti: '1f1e9-1f1ef',\n\t    dna: '1f9ec',\n\t    do_not_litter: '1f6af',\n\t    dog: '1f436',\n\t    dog2: '1f415',\n\t    dollar: '1f4b5',\n\t    dolls: '1f38e',\n\t    dolphin: '1f42c',\n\t    dominica: '1f1e9-1f1f2',\n\t    dominican_republic: '1f1e9-1f1f4',\n\t    door: '1f6aa',\n\t    doughnut: '1f369',\n\t    dove: '1f54a',\n\t    dragon: '1f409',\n\t    dragon_face: '1f432',\n\t    dress: '1f457',\n\t    dromedary_camel: '1f42a',\n\t    drooling_face: '1f924',\n\t    drop_of_blood: '1fa78',\n\t    droplet: '1f4a7',\n\t    drum: '1f941',\n\t    duck: '1f986',\n\t    dumpling: '1f95f',\n\t    dvd: '1f4c0',\n\t    'e-mail': '1f4e7',\n\t    eagle: '1f985',\n\t    ear: '1f442',\n\t    ear_of_rice: '1f33e',\n\t    ear_with_hearing_aid: '1f9bb',\n\t    earth_africa: '1f30d',\n\t    earth_americas: '1f30e',\n\t    earth_asia: '1f30f',\n\t    ecuador: '1f1ea-1f1e8',\n\t    egg: '1f95a',\n\t    eggplant: '1f346',\n\t    egypt: '1f1ea-1f1ec',\n\t    eight: '0038-20e3',\n\t    eight_pointed_black_star: '2734',\n\t    eight_spoked_asterisk: '2733',\n\t    eject_button: '23cf',\n\t    el_salvador: '1f1f8-1f1fb',\n\t    electric_plug: '1f50c',\n\t    elephant: '1f418',\n\t    elf: '1f9dd',\n\t    elf_man: '1f9dd-2642',\n\t    elf_woman: '1f9dd-2640',\n\t    email: '2709',\n\t    end: '1f51a',\n\t    england: '1f3f4-e0067-e0062-e0065-e006e-e0067-e007f',\n\t    envelope: '2709',\n\t    envelope_with_arrow: '1f4e9',\n\t    equatorial_guinea: '1f1ec-1f1f6',\n\t    eritrea: '1f1ea-1f1f7',\n\t    es: '1f1ea-1f1f8',\n\t    estonia: '1f1ea-1f1ea',\n\t    ethiopia: '1f1ea-1f1f9',\n\t    eu: '1f1ea-1f1fa',\n\t    euro: '1f4b6',\n\t    european_castle: '1f3f0',\n\t    european_post_office: '1f3e4',\n\t    european_union: '1f1ea-1f1fa',\n\t    evergreen_tree: '1f332',\n\t    exclamation: '2757',\n\t    exploding_head: '1f92f',\n\t    expressionless: '1f611',\n\t    eye: '1f441',\n\t    eye_speech_bubble: '1f441-1f5e8',\n\t    eyeglasses: '1f453',\n\t    eyes: '1f440',\n\t    face_with_head_bandage: '1f915',\n\t    face_with_thermometer: '1f912',\n\t    facepalm: '1f926',\n\t    facepunch: '1f44a',\n\t    factory: '1f3ed',\n\t    factory_worker: '1f9d1-1f3ed',\n\t    fairy: '1f9da',\n\t    fairy_man: '1f9da-2642',\n\t    fairy_woman: '1f9da-2640',\n\t    falafel: '1f9c6',\n\t    falkland_islands: '1f1eb-1f1f0',\n\t    fallen_leaf: '1f342',\n\t    family: '1f46a',\n\t    family_man_boy: '1f468-1f466',\n\t    family_man_boy_boy: '1f468-1f466-1f466',\n\t    family_man_girl: '1f468-1f467',\n\t    family_man_girl_boy: '1f468-1f467-1f466',\n\t    family_man_girl_girl: '1f468-1f467-1f467',\n\t    family_man_man_boy: '1f468-1f468-1f466',\n\t    family_man_man_boy_boy: '1f468-1f468-1f466-1f466',\n\t    family_man_man_girl: '1f468-1f468-1f467',\n\t    family_man_man_girl_boy: '1f468-1f468-1f467-1f466',\n\t    family_man_man_girl_girl: '1f468-1f468-1f467-1f467',\n\t    family_man_woman_boy: '1f468-1f469-1f466',\n\t    family_man_woman_boy_boy: '1f468-1f469-1f466-1f466',\n\t    family_man_woman_girl: '1f468-1f469-1f467',\n\t    family_man_woman_girl_boy: '1f468-1f469-1f467-1f466',\n\t    family_man_woman_girl_girl: '1f468-1f469-1f467-1f467',\n\t    family_woman_boy: '1f469-1f466',\n\t    family_woman_boy_boy: '1f469-1f466-1f466',\n\t    family_woman_girl: '1f469-1f467',\n\t    family_woman_girl_boy: '1f469-1f467-1f466',\n\t    family_woman_girl_girl: '1f469-1f467-1f467',\n\t    family_woman_woman_boy: '1f469-1f469-1f466',\n\t    family_woman_woman_boy_boy: '1f469-1f469-1f466-1f466',\n\t    family_woman_woman_girl: '1f469-1f469-1f467',\n\t    family_woman_woman_girl_boy: '1f469-1f469-1f467-1f466',\n\t    family_woman_woman_girl_girl: '1f469-1f469-1f467-1f467',\n\t    farmer: '1f9d1-1f33e',\n\t    faroe_islands: '1f1eb-1f1f4',\n\t    fast_forward: '23e9',\n\t    fax: '1f4e0',\n\t    fearful: '1f628',\n\t    feet: '1f43e',\n\t    female_detective: '1f575-2640',\n\t    female_sign: '2640',\n\t    ferris_wheel: '1f3a1',\n\t    ferry: '26f4',\n\t    field_hockey: '1f3d1',\n\t    fiji: '1f1eb-1f1ef',\n\t    file_cabinet: '1f5c4',\n\t    file_folder: '1f4c1',\n\t    film_projector: '1f4fd',\n\t    film_strip: '1f39e',\n\t    finland: '1f1eb-1f1ee',\n\t    fire: '1f525',\n\t    fire_engine: '1f692',\n\t    fire_extinguisher: '1f9ef',\n\t    firecracker: '1f9e8',\n\t    firefighter: '1f9d1-1f692',\n\t    fireworks: '1f386',\n\t    first_quarter_moon: '1f313',\n\t    first_quarter_moon_with_face: '1f31b',\n\t    fish: '1f41f',\n\t    fish_cake: '1f365',\n\t    fishing_pole_and_fish: '1f3a3',\n\t    fist: '270a',\n\t    fist_left: '1f91b',\n\t    fist_oncoming: '1f44a',\n\t    fist_raised: '270a',\n\t    fist_right: '1f91c',\n\t    five: '0035-20e3',\n\t    flags: '1f38f',\n\t    flamingo: '1f9a9',\n\t    flashlight: '1f526',\n\t    flat_shoe: '1f97f',\n\t    fleur_de_lis: '269c',\n\t    flight_arrival: '1f6ec',\n\t    flight_departure: '1f6eb',\n\t    flipper: '1f42c',\n\t    floppy_disk: '1f4be',\n\t    flower_playing_cards: '1f3b4',\n\t    flushed: '1f633',\n\t    flying_disc: '1f94f',\n\t    flying_saucer: '1f6f8',\n\t    fog: '1f32b',\n\t    foggy: '1f301',\n\t    foot: '1f9b6',\n\t    football: '1f3c8',\n\t    footprints: '1f463',\n\t    fork_and_knife: '1f374',\n\t    fortune_cookie: '1f960',\n\t    fountain: '26f2',\n\t    fountain_pen: '1f58b',\n\t    four: '0034-20e3',\n\t    four_leaf_clover: '1f340',\n\t    fox_face: '1f98a',\n\t    fr: '1f1eb-1f1f7',\n\t    framed_picture: '1f5bc',\n\t    free: '1f193',\n\t    french_guiana: '1f1ec-1f1eb',\n\t    french_polynesia: '1f1f5-1f1eb',\n\t    french_southern_territories: '1f1f9-1f1eb',\n\t    fried_egg: '1f373',\n\t    fried_shrimp: '1f364',\n\t    fries: '1f35f',\n\t    frog: '1f438',\n\t    frowning: '1f626',\n\t    frowning_face: '2639',\n\t    frowning_man: '1f64d-2642',\n\t    frowning_person: '1f64d',\n\t    frowning_woman: '1f64d-2640',\n\t    fu: '1f595',\n\t    fuelpump: '26fd',\n\t    full_moon: '1f315',\n\t    full_moon_with_face: '1f31d',\n\t    funeral_urn: '26b1',\n\t    gabon: '1f1ec-1f1e6',\n\t    gambia: '1f1ec-1f1f2',\n\t    game_die: '1f3b2',\n\t    garlic: '1f9c4',\n\t    gb: '1f1ec-1f1e7',\n\t    gear: '2699',\n\t    gem: '1f48e',\n\t    gemini: '264a',\n\t    genie: '1f9de',\n\t    genie_man: '1f9de-2642',\n\t    genie_woman: '1f9de-2640',\n\t    georgia: '1f1ec-1f1ea',\n\t    ghana: '1f1ec-1f1ed',\n\t    ghost: '1f47b',\n\t    gibraltar: '1f1ec-1f1ee',\n\t    gift: '1f381',\n\t    gift_heart: '1f49d',\n\t    giraffe: '1f992',\n\t    girl: '1f467',\n\t    globe_with_meridians: '1f310',\n\t    gloves: '1f9e4',\n\t    goal_net: '1f945',\n\t    goat: '1f410',\n\t    goggles: '1f97d',\n\t    golf: '26f3',\n\t    golfing: '1f3cc',\n\t    golfing_man: '1f3cc-2642',\n\t    golfing_woman: '1f3cc-2640',\n\t    gorilla: '1f98d',\n\t    grapes: '1f347',\n\t    greece: '1f1ec-1f1f7',\n\t    green_apple: '1f34f',\n\t    green_book: '1f4d7',\n\t    green_circle: '1f7e2',\n\t    green_heart: '1f49a',\n\t    green_salad: '1f957',\n\t    green_square: '1f7e9',\n\t    greenland: '1f1ec-1f1f1',\n\t    grenada: '1f1ec-1f1e9',\n\t    grey_exclamation: '2755',\n\t    grey_question: '2754',\n\t    grimacing: '1f62c',\n\t    grin: '1f601',\n\t    grinning: '1f600',\n\t    guadeloupe: '1f1ec-1f1f5',\n\t    guam: '1f1ec-1f1fa',\n\t    guard: '1f482',\n\t    guardsman: '1f482-2642',\n\t    guardswoman: '1f482-2640',\n\t    guatemala: '1f1ec-1f1f9',\n\t    guernsey: '1f1ec-1f1ec',\n\t    guide_dog: '1f9ae',\n\t    guinea: '1f1ec-1f1f3',\n\t    guinea_bissau: '1f1ec-1f1fc',\n\t    guitar: '1f3b8',\n\t    gun: '1f52b',\n\t    guyana: '1f1ec-1f1fe',\n\t    haircut: '1f487',\n\t    haircut_man: '1f487-2642',\n\t    haircut_woman: '1f487-2640',\n\t    haiti: '1f1ed-1f1f9',\n\t    hamburger: '1f354',\n\t    hammer: '1f528',\n\t    hammer_and_pick: '2692',\n\t    hammer_and_wrench: '1f6e0',\n\t    hamster: '1f439',\n\t    hand: '270b',\n\t    hand_over_mouth: '1f92d',\n\t    handbag: '1f45c',\n\t    handball_person: '1f93e',\n\t    handshake: '1f91d',\n\t    hankey: '1f4a9',\n\t    hash: '0023-20e3',\n\t    hatched_chick: '1f425',\n\t    hatching_chick: '1f423',\n\t    headphones: '1f3a7',\n\t    health_worker: '1f9d1-2695',\n\t    hear_no_evil: '1f649',\n\t    heard_mcdonald_islands: '1f1ed-1f1f2',\n\t    heart: '2764',\n\t    heart_decoration: '1f49f',\n\t    heart_eyes: '1f60d',\n\t    heart_eyes_cat: '1f63b',\n\t    heartbeat: '1f493',\n\t    heartpulse: '1f497',\n\t    hearts: '2665',\n\t    heavy_check_mark: '2714',\n\t    heavy_division_sign: '2797',\n\t    heavy_dollar_sign: '1f4b2',\n\t    heavy_exclamation_mark: '2757',\n\t    heavy_heart_exclamation: '2763',\n\t    heavy_minus_sign: '2796',\n\t    heavy_multiplication_x: '2716',\n\t    heavy_plus_sign: '2795',\n\t    hedgehog: '1f994',\n\t    helicopter: '1f681',\n\t    herb: '1f33f',\n\t    hibiscus: '1f33a',\n\t    high_brightness: '1f506',\n\t    high_heel: '1f460',\n\t    hiking_boot: '1f97e',\n\t    hindu_temple: '1f6d5',\n\t    hippopotamus: '1f99b',\n\t    hocho: '1f52a',\n\t    hole: '1f573',\n\t    honduras: '1f1ed-1f1f3',\n\t    honey_pot: '1f36f',\n\t    honeybee: '1f41d',\n\t    hong_kong: '1f1ed-1f1f0',\n\t    horse: '1f434',\n\t    horse_racing: '1f3c7',\n\t    hospital: '1f3e5',\n\t    hot_face: '1f975',\n\t    hot_pepper: '1f336',\n\t    hotdog: '1f32d',\n\t    hotel: '1f3e8',\n\t    hotsprings: '2668',\n\t    hourglass: '231b',\n\t    hourglass_flowing_sand: '23f3',\n\t    house: '1f3e0',\n\t    house_with_garden: '1f3e1',\n\t    houses: '1f3d8',\n\t    hugs: '1f917',\n\t    hungary: '1f1ed-1f1fa',\n\t    hushed: '1f62f',\n\t    ice_cream: '1f368',\n\t    ice_cube: '1f9ca',\n\t    ice_hockey: '1f3d2',\n\t    ice_skate: '26f8',\n\t    icecream: '1f366',\n\t    iceland: '1f1ee-1f1f8',\n\t    id: '1f194',\n\t    ideograph_advantage: '1f250',\n\t    imp: '1f47f',\n\t    inbox_tray: '1f4e5',\n\t    incoming_envelope: '1f4e8',\n\t    india: '1f1ee-1f1f3',\n\t    indonesia: '1f1ee-1f1e9',\n\t    infinity: '267e',\n\t    information_desk_person: '1f481',\n\t    information_source: '2139',\n\t    innocent: '1f607',\n\t    interrobang: '2049',\n\t    iphone: '1f4f1',\n\t    iran: '1f1ee-1f1f7',\n\t    iraq: '1f1ee-1f1f6',\n\t    ireland: '1f1ee-1f1ea',\n\t    isle_of_man: '1f1ee-1f1f2',\n\t    israel: '1f1ee-1f1f1',\n\t    it: '1f1ee-1f1f9',\n\t    izakaya_lantern: '1f3ee',\n\t    jack_o_lantern: '1f383',\n\t    jamaica: '1f1ef-1f1f2',\n\t    japan: '1f5fe',\n\t    japanese_castle: '1f3ef',\n\t    japanese_goblin: '1f47a',\n\t    japanese_ogre: '1f479',\n\t    jeans: '1f456',\n\t    jersey: '1f1ef-1f1ea',\n\t    jigsaw: '1f9e9',\n\t    jordan: '1f1ef-1f1f4',\n\t    joy: '1f602',\n\t    joy_cat: '1f639',\n\t    joystick: '1f579',\n\t    jp: '1f1ef-1f1f5',\n\t    judge: '1f9d1-2696',\n\t    juggling_person: '1f939',\n\t    kaaba: '1f54b',\n\t    kangaroo: '1f998',\n\t    kazakhstan: '1f1f0-1f1ff',\n\t    kenya: '1f1f0-1f1ea',\n\t    key: '1f511',\n\t    keyboard: '2328',\n\t    keycap_ten: '1f51f',\n\t    kick_scooter: '1f6f4',\n\t    kimono: '1f458',\n\t    kiribati: '1f1f0-1f1ee',\n\t    kiss: '1f48b',\n\t    kissing: '1f617',\n\t    kissing_cat: '1f63d',\n\t    kissing_closed_eyes: '1f61a',\n\t    kissing_heart: '1f618',\n\t    kissing_smiling_eyes: '1f619',\n\t    kite: '1fa81',\n\t    kiwi_fruit: '1f95d',\n\t    kneeling_man: '1f9ce-2642',\n\t    kneeling_person: '1f9ce',\n\t    kneeling_woman: '1f9ce-2640',\n\t    knife: '1f52a',\n\t    koala: '1f428',\n\t    koko: '1f201',\n\t    kosovo: '1f1fd-1f1f0',\n\t    kr: '1f1f0-1f1f7',\n\t    kuwait: '1f1f0-1f1fc',\n\t    kyrgyzstan: '1f1f0-1f1ec',\n\t    lab_coat: '1f97c',\n\t    label: '1f3f7',\n\t    lacrosse: '1f94d',\n\t    lantern: '1f3ee',\n\t    laos: '1f1f1-1f1e6',\n\t    large_blue_circle: '1f535',\n\t    large_blue_diamond: '1f537',\n\t    large_orange_diamond: '1f536',\n\t    last_quarter_moon: '1f317',\n\t    last_quarter_moon_with_face: '1f31c',\n\t    latin_cross: '271d',\n\t    latvia: '1f1f1-1f1fb',\n\t    laughing: '1f606',\n\t    leafy_green: '1f96c',\n\t    leaves: '1f343',\n\t    lebanon: '1f1f1-1f1e7',\n\t    ledger: '1f4d2',\n\t    left_luggage: '1f6c5',\n\t    left_right_arrow: '2194',\n\t    left_speech_bubble: '1f5e8',\n\t    leftwards_arrow_with_hook: '21a9',\n\t    leg: '1f9b5',\n\t    lemon: '1f34b',\n\t    leo: '264c',\n\t    leopard: '1f406',\n\t    lesotho: '1f1f1-1f1f8',\n\t    level_slider: '1f39a',\n\t    liberia: '1f1f1-1f1f7',\n\t    libra: '264e',\n\t    libya: '1f1f1-1f1fe',\n\t    liechtenstein: '1f1f1-1f1ee',\n\t    light_rail: '1f688',\n\t    link: '1f517',\n\t    lion: '1f981',\n\t    lips: '1f444',\n\t    lipstick: '1f484',\n\t    lithuania: '1f1f1-1f1f9',\n\t    lizard: '1f98e',\n\t    llama: '1f999',\n\t    lobster: '1f99e',\n\t    lock: '1f512',\n\t    lock_with_ink_pen: '1f50f',\n\t    lollipop: '1f36d',\n\t    loop: '27bf',\n\t    lotion_bottle: '1f9f4',\n\t    lotus_position: '1f9d8',\n\t    lotus_position_man: '1f9d8-2642',\n\t    lotus_position_woman: '1f9d8-2640',\n\t    loud_sound: '1f50a',\n\t    loudspeaker: '1f4e2',\n\t    love_hotel: '1f3e9',\n\t    love_letter: '1f48c',\n\t    love_you_gesture: '1f91f',\n\t    low_brightness: '1f505',\n\t    luggage: '1f9f3',\n\t    luxembourg: '1f1f1-1f1fa',\n\t    lying_face: '1f925',\n\t    m: '24c2',\n\t    macau: '1f1f2-1f1f4',\n\t    macedonia: '1f1f2-1f1f0',\n\t    madagascar: '1f1f2-1f1ec',\n\t    mag: '1f50d',\n\t    mag_right: '1f50e',\n\t    mage: '1f9d9',\n\t    mage_man: '1f9d9-2642',\n\t    mage_woman: '1f9d9-2640',\n\t    magnet: '1f9f2',\n\t    mahjong: '1f004',\n\t    mailbox: '1f4eb',\n\t    mailbox_closed: '1f4ea',\n\t    mailbox_with_mail: '1f4ec',\n\t    mailbox_with_no_mail: '1f4ed',\n\t    malawi: '1f1f2-1f1fc',\n\t    malaysia: '1f1f2-1f1fe',\n\t    maldives: '1f1f2-1f1fb',\n\t    male_detective: '1f575-2642',\n\t    male_sign: '2642',\n\t    mali: '1f1f2-1f1f1',\n\t    malta: '1f1f2-1f1f9',\n\t    man: '1f468',\n\t    man_artist: '1f468-1f3a8',\n\t    man_astronaut: '1f468-1f680',\n\t    man_cartwheeling: '1f938-2642',\n\t    man_cook: '1f468-1f373',\n\t    man_dancing: '1f57a',\n\t    man_facepalming: '1f926-2642',\n\t    man_factory_worker: '1f468-1f3ed',\n\t    man_farmer: '1f468-1f33e',\n\t    man_firefighter: '1f468-1f692',\n\t    man_health_worker: '1f468-2695',\n\t    man_in_manual_wheelchair: '1f468-1f9bd',\n\t    man_in_motorized_wheelchair: '1f468-1f9bc',\n\t    man_in_tuxedo: '1f935',\n\t    man_judge: '1f468-2696',\n\t    man_juggling: '1f939-2642',\n\t    man_mechanic: '1f468-1f527',\n\t    man_office_worker: '1f468-1f4bc',\n\t    man_pilot: '1f468-2708',\n\t    man_playing_handball: '1f93e-2642',\n\t    man_playing_water_polo: '1f93d-2642',\n\t    man_scientist: '1f468-1f52c',\n\t    man_shrugging: '1f937-2642',\n\t    man_singer: '1f468-1f3a4',\n\t    man_student: '1f468-1f393',\n\t    man_teacher: '1f468-1f3eb',\n\t    man_technologist: '1f468-1f4bb',\n\t    man_with_gua_pi_mao: '1f472',\n\t    man_with_probing_cane: '1f468-1f9af',\n\t    man_with_turban: '1f473-2642',\n\t    mandarin: '1f34a',\n\t    mango: '1f96d',\n\t    mans_shoe: '1f45e',\n\t    mantelpiece_clock: '1f570',\n\t    manual_wheelchair: '1f9bd',\n\t    maple_leaf: '1f341',\n\t    marshall_islands: '1f1f2-1f1ed',\n\t    martial_arts_uniform: '1f94b',\n\t    martinique: '1f1f2-1f1f6',\n\t    mask: '1f637',\n\t    massage: '1f486',\n\t    massage_man: '1f486-2642',\n\t    massage_woman: '1f486-2640',\n\t    mate: '1f9c9',\n\t    mauritania: '1f1f2-1f1f7',\n\t    mauritius: '1f1f2-1f1fa',\n\t    mayotte: '1f1fe-1f1f9',\n\t    meat_on_bone: '1f356',\n\t    mechanic: '1f9d1-1f527',\n\t    mechanical_arm: '1f9be',\n\t    mechanical_leg: '1f9bf',\n\t    medal_military: '1f396',\n\t    medal_sports: '1f3c5',\n\t    medical_symbol: '2695',\n\t    mega: '1f4e3',\n\t    melon: '1f348',\n\t    memo: '1f4dd',\n\t    men_wrestling: '1f93c-2642',\n\t    menorah: '1f54e',\n\t    mens: '1f6b9',\n\t    mermaid: '1f9dc-2640',\n\t    merman: '1f9dc-2642',\n\t    merperson: '1f9dc',\n\t    metal: '1f918',\n\t    metro: '1f687',\n\t    mexico: '1f1f2-1f1fd',\n\t    microbe: '1f9a0',\n\t    micronesia: '1f1eb-1f1f2',\n\t    microphone: '1f3a4',\n\t    microscope: '1f52c',\n\t    middle_finger: '1f595',\n\t    milk_glass: '1f95b',\n\t    milky_way: '1f30c',\n\t    minibus: '1f690',\n\t    minidisc: '1f4bd',\n\t    mobile_phone_off: '1f4f4',\n\t    moldova: '1f1f2-1f1e9',\n\t    monaco: '1f1f2-1f1e8',\n\t    money_mouth_face: '1f911',\n\t    money_with_wings: '1f4b8',\n\t    moneybag: '1f4b0',\n\t    mongolia: '1f1f2-1f1f3',\n\t    monkey: '1f412',\n\t    monkey_face: '1f435',\n\t    monocle_face: '1f9d0',\n\t    monorail: '1f69d',\n\t    montenegro: '1f1f2-1f1ea',\n\t    montserrat: '1f1f2-1f1f8',\n\t    moon: '1f314',\n\t    moon_cake: '1f96e',\n\t    morocco: '1f1f2-1f1e6',\n\t    mortar_board: '1f393',\n\t    mosque: '1f54c',\n\t    mosquito: '1f99f',\n\t    motor_boat: '1f6e5',\n\t    motor_scooter: '1f6f5',\n\t    motorcycle: '1f3cd',\n\t    motorized_wheelchair: '1f9bc',\n\t    motorway: '1f6e3',\n\t    mount_fuji: '1f5fb',\n\t    mountain: '26f0',\n\t    mountain_bicyclist: '1f6b5',\n\t    mountain_biking_man: '1f6b5-2642',\n\t    mountain_biking_woman: '1f6b5-2640',\n\t    mountain_cableway: '1f6a0',\n\t    mountain_railway: '1f69e',\n\t    mountain_snow: '1f3d4',\n\t    mouse: '1f42d',\n\t    mouse2: '1f401',\n\t    movie_camera: '1f3a5',\n\t    moyai: '1f5ff',\n\t    mozambique: '1f1f2-1f1ff',\n\t    mrs_claus: '1f936',\n\t    muscle: '1f4aa',\n\t    mushroom: '1f344',\n\t    musical_keyboard: '1f3b9',\n\t    musical_note: '1f3b5',\n\t    musical_score: '1f3bc',\n\t    mute: '1f507',\n\t    myanmar: '1f1f2-1f1f2',\n\t    nail_care: '1f485',\n\t    name_badge: '1f4db',\n\t    namibia: '1f1f3-1f1e6',\n\t    national_park: '1f3de',\n\t    nauru: '1f1f3-1f1f7',\n\t    nauseated_face: '1f922',\n\t    nazar_amulet: '1f9ff',\n\t    necktie: '1f454',\n\t    negative_squared_cross_mark: '274e',\n\t    nepal: '1f1f3-1f1f5',\n\t    nerd_face: '1f913',\n\t    netherlands: '1f1f3-1f1f1',\n\t    neutral_face: '1f610',\n\t    \"new\": '1f195',\n\t    new_caledonia: '1f1f3-1f1e8',\n\t    new_moon: '1f311',\n\t    new_moon_with_face: '1f31a',\n\t    new_zealand: '1f1f3-1f1ff',\n\t    newspaper: '1f4f0',\n\t    newspaper_roll: '1f5de',\n\t    next_track_button: '23ed',\n\t    ng: '1f196',\n\t    ng_man: '1f645-2642',\n\t    ng_woman: '1f645-2640',\n\t    nicaragua: '1f1f3-1f1ee',\n\t    niger: '1f1f3-1f1ea',\n\t    nigeria: '1f1f3-1f1ec',\n\t    night_with_stars: '1f303',\n\t    nine: '0039-20e3',\n\t    niue: '1f1f3-1f1fa',\n\t    no_bell: '1f515',\n\t    no_bicycles: '1f6b3',\n\t    no_entry: '26d4',\n\t    no_entry_sign: '1f6ab',\n\t    no_good: '1f645',\n\t    no_good_man: '1f645-2642',\n\t    no_good_woman: '1f645-2640',\n\t    no_mobile_phones: '1f4f5',\n\t    no_mouth: '1f636',\n\t    no_pedestrians: '1f6b7',\n\t    no_smoking: '1f6ad',\n\t    'non-potable_water': '1f6b1',\n\t    norfolk_island: '1f1f3-1f1eb',\n\t    north_korea: '1f1f0-1f1f5',\n\t    northern_mariana_islands: '1f1f2-1f1f5',\n\t    norway: '1f1f3-1f1f4',\n\t    nose: '1f443',\n\t    notebook: '1f4d3',\n\t    notebook_with_decorative_cover: '1f4d4',\n\t    notes: '1f3b6',\n\t    nut_and_bolt: '1f529',\n\t    o: '2b55',\n\t    o2: '1f17e',\n\t    ocean: '1f30a',\n\t    octopus: '1f419',\n\t    oden: '1f362',\n\t    office: '1f3e2',\n\t    office_worker: '1f9d1-1f4bc',\n\t    oil_drum: '1f6e2',\n\t    ok: '1f197',\n\t    ok_hand: '1f44c',\n\t    ok_man: '1f646-2642',\n\t    ok_person: '1f646',\n\t    ok_woman: '1f646-2640',\n\t    old_key: '1f5dd',\n\t    older_adult: '1f9d3',\n\t    older_man: '1f474',\n\t    older_woman: '1f475',\n\t    om: '1f549',\n\t    oman: '1f1f4-1f1f2',\n\t    on: '1f51b',\n\t    oncoming_automobile: '1f698',\n\t    oncoming_bus: '1f68d',\n\t    oncoming_police_car: '1f694',\n\t    oncoming_taxi: '1f696',\n\t    one: '0031-20e3',\n\t    one_piece_swimsuit: '1fa71',\n\t    onion: '1f9c5',\n\t    open_book: '1f4d6',\n\t    open_file_folder: '1f4c2',\n\t    open_hands: '1f450',\n\t    open_mouth: '1f62e',\n\t    open_umbrella: '2602',\n\t    ophiuchus: '26ce',\n\t    orange: '1f34a',\n\t    orange_book: '1f4d9',\n\t    orange_circle: '1f7e0',\n\t    orange_heart: '1f9e1',\n\t    orange_square: '1f7e7',\n\t    orangutan: '1f9a7',\n\t    orthodox_cross: '2626',\n\t    otter: '1f9a6',\n\t    outbox_tray: '1f4e4',\n\t    owl: '1f989',\n\t    ox: '1f402',\n\t    oyster: '1f9aa',\n\t    \"package\": '1f4e6',\n\t    page_facing_up: '1f4c4',\n\t    page_with_curl: '1f4c3',\n\t    pager: '1f4df',\n\t    paintbrush: '1f58c',\n\t    pakistan: '1f1f5-1f1f0',\n\t    palau: '1f1f5-1f1fc',\n\t    palestinian_territories: '1f1f5-1f1f8',\n\t    palm_tree: '1f334',\n\t    palms_up_together: '1f932',\n\t    panama: '1f1f5-1f1e6',\n\t    pancakes: '1f95e',\n\t    panda_face: '1f43c',\n\t    paperclip: '1f4ce',\n\t    paperclips: '1f587',\n\t    papua_new_guinea: '1f1f5-1f1ec',\n\t    parachute: '1fa82',\n\t    paraguay: '1f1f5-1f1fe',\n\t    parasol_on_ground: '26f1',\n\t    parking: '1f17f',\n\t    parrot: '1f99c',\n\t    part_alternation_mark: '303d',\n\t    partly_sunny: '26c5',\n\t    partying_face: '1f973',\n\t    passenger_ship: '1f6f3',\n\t    passport_control: '1f6c2',\n\t    pause_button: '23f8',\n\t    paw_prints: '1f43e',\n\t    peace_symbol: '262e',\n\t    peach: '1f351',\n\t    peacock: '1f99a',\n\t    peanuts: '1f95c',\n\t    pear: '1f350',\n\t    pen: '1f58a',\n\t    pencil: '1f4dd',\n\t    pencil2: '270f',\n\t    penguin: '1f427',\n\t    pensive: '1f614',\n\t    people_holding_hands: '1f9d1-1f91d-1f9d1',\n\t    performing_arts: '1f3ad',\n\t    persevere: '1f623',\n\t    person_bald: '1f9d1-1f9b2',\n\t    person_curly_hair: '1f9d1-1f9b1',\n\t    person_fencing: '1f93a',\n\t    person_in_manual_wheelchair: '1f9d1-1f9bd',\n\t    person_in_motorized_wheelchair: '1f9d1-1f9bc',\n\t    person_red_hair: '1f9d1-1f9b0',\n\t    person_white_hair: '1f9d1-1f9b3',\n\t    person_with_probing_cane: '1f9d1-1f9af',\n\t    person_with_turban: '1f473',\n\t    peru: '1f1f5-1f1ea',\n\t    petri_dish: '1f9eb',\n\t    philippines: '1f1f5-1f1ed',\n\t    phone: '260e',\n\t    pick: '26cf',\n\t    pie: '1f967',\n\t    pig: '1f437',\n\t    pig2: '1f416',\n\t    pig_nose: '1f43d',\n\t    pill: '1f48a',\n\t    pilot: '1f9d1-2708',\n\t    pinching_hand: '1f90f',\n\t    pineapple: '1f34d',\n\t    ping_pong: '1f3d3',\n\t    pirate_flag: '1f3f4-2620',\n\t    pisces: '2653',\n\t    pitcairn_islands: '1f1f5-1f1f3',\n\t    pizza: '1f355',\n\t    place_of_worship: '1f6d0',\n\t    plate_with_cutlery: '1f37d',\n\t    play_or_pause_button: '23ef',\n\t    pleading_face: '1f97a',\n\t    point_down: '1f447',\n\t    point_left: '1f448',\n\t    point_right: '1f449',\n\t    point_up: '261d',\n\t    point_up_2: '1f446',\n\t    poland: '1f1f5-1f1f1',\n\t    police_car: '1f693',\n\t    police_officer: '1f46e',\n\t    policeman: '1f46e-2642',\n\t    policewoman: '1f46e-2640',\n\t    poodle: '1f429',\n\t    poop: '1f4a9',\n\t    popcorn: '1f37f',\n\t    portugal: '1f1f5-1f1f9',\n\t    post_office: '1f3e3',\n\t    postal_horn: '1f4ef',\n\t    postbox: '1f4ee',\n\t    potable_water: '1f6b0',\n\t    potato: '1f954',\n\t    pouch: '1f45d',\n\t    poultry_leg: '1f357',\n\t    pound: '1f4b7',\n\t    pout: '1f621',\n\t    pouting_cat: '1f63e',\n\t    pouting_face: '1f64e',\n\t    pouting_man: '1f64e-2642',\n\t    pouting_woman: '1f64e-2640',\n\t    pray: '1f64f',\n\t    prayer_beads: '1f4ff',\n\t    pregnant_woman: '1f930',\n\t    pretzel: '1f968',\n\t    previous_track_button: '23ee',\n\t    prince: '1f934',\n\t    princess: '1f478',\n\t    printer: '1f5a8',\n\t    probing_cane: '1f9af',\n\t    puerto_rico: '1f1f5-1f1f7',\n\t    punch: '1f44a',\n\t    purple_circle: '1f7e3',\n\t    purple_heart: '1f49c',\n\t    purple_square: '1f7ea',\n\t    purse: '1f45b',\n\t    pushpin: '1f4cc',\n\t    put_litter_in_its_place: '1f6ae',\n\t    qatar: '1f1f6-1f1e6',\n\t    question: '2753',\n\t    rabbit: '1f430',\n\t    rabbit2: '1f407',\n\t    raccoon: '1f99d',\n\t    racehorse: '1f40e',\n\t    racing_car: '1f3ce',\n\t    radio: '1f4fb',\n\t    radio_button: '1f518',\n\t    radioactive: '2622',\n\t    rage: '1f621',\n\t    railway_car: '1f683',\n\t    railway_track: '1f6e4',\n\t    rainbow: '1f308',\n\t    rainbow_flag: '1f3f3-1f308',\n\t    raised_back_of_hand: '1f91a',\n\t    raised_eyebrow: '1f928',\n\t    raised_hand: '270b',\n\t    raised_hand_with_fingers_splayed: '1f590',\n\t    raised_hands: '1f64c',\n\t    raising_hand: '1f64b',\n\t    raising_hand_man: '1f64b-2642',\n\t    raising_hand_woman: '1f64b-2640',\n\t    ram: '1f40f',\n\t    ramen: '1f35c',\n\t    rat: '1f400',\n\t    razor: '1fa92',\n\t    receipt: '1f9fe',\n\t    record_button: '23fa',\n\t    recycle: '267b',\n\t    red_car: '1f697',\n\t    red_circle: '1f534',\n\t    red_envelope: '1f9e7',\n\t    red_haired_man: '1f468-1f9b0',\n\t    red_haired_woman: '1f469-1f9b0',\n\t    red_square: '1f7e5',\n\t    registered: '00ae',\n\t    relaxed: '263a',\n\t    relieved: '1f60c',\n\t    reminder_ribbon: '1f397',\n\t    repeat: '1f501',\n\t    repeat_one: '1f502',\n\t    rescue_worker_helmet: '26d1',\n\t    restroom: '1f6bb',\n\t    reunion: '1f1f7-1f1ea',\n\t    revolving_hearts: '1f49e',\n\t    rewind: '23ea',\n\t    rhinoceros: '1f98f',\n\t    ribbon: '1f380',\n\t    rice: '1f35a',\n\t    rice_ball: '1f359',\n\t    rice_cracker: '1f358',\n\t    rice_scene: '1f391',\n\t    right_anger_bubble: '1f5ef',\n\t    ring: '1f48d',\n\t    ringed_planet: '1fa90',\n\t    robot: '1f916',\n\t    rocket: '1f680',\n\t    rofl: '1f923',\n\t    roll_eyes: '1f644',\n\t    roll_of_paper: '1f9fb',\n\t    roller_coaster: '1f3a2',\n\t    romania: '1f1f7-1f1f4',\n\t    rooster: '1f413',\n\t    rose: '1f339',\n\t    rosette: '1f3f5',\n\t    rotating_light: '1f6a8',\n\t    round_pushpin: '1f4cd',\n\t    rowboat: '1f6a3',\n\t    rowing_man: '1f6a3-2642',\n\t    rowing_woman: '1f6a3-2640',\n\t    ru: '1f1f7-1f1fa',\n\t    rugby_football: '1f3c9',\n\t    runner: '1f3c3',\n\t    running: '1f3c3',\n\t    running_man: '1f3c3-2642',\n\t    running_shirt_with_sash: '1f3bd',\n\t    running_woman: '1f3c3-2640',\n\t    rwanda: '1f1f7-1f1fc',\n\t    sa: '1f202',\n\t    safety_pin: '1f9f7',\n\t    safety_vest: '1f9ba',\n\t    sagittarius: '2650',\n\t    sailboat: '26f5',\n\t    sake: '1f376',\n\t    salt: '1f9c2',\n\t    samoa: '1f1fc-1f1f8',\n\t    san_marino: '1f1f8-1f1f2',\n\t    sandal: '1f461',\n\t    sandwich: '1f96a',\n\t    santa: '1f385',\n\t    sao_tome_principe: '1f1f8-1f1f9',\n\t    sari: '1f97b',\n\t    sassy_man: '1f481-2642',\n\t    sassy_woman: '1f481-2640',\n\t    satellite: '1f4e1',\n\t    satisfied: '1f606',\n\t    saudi_arabia: '1f1f8-1f1e6',\n\t    sauna_man: '1f9d6-2642',\n\t    sauna_person: '1f9d6',\n\t    sauna_woman: '1f9d6-2640',\n\t    sauropod: '1f995',\n\t    saxophone: '1f3b7',\n\t    scarf: '1f9e3',\n\t    school: '1f3eb',\n\t    school_satchel: '1f392',\n\t    scientist: '1f9d1-1f52c',\n\t    scissors: '2702',\n\t    scorpion: '1f982',\n\t    scorpius: '264f',\n\t    scotland: '1f3f4-e0067-e0062-e0073-e0063-e0074-e007f',\n\t    scream: '1f631',\n\t    scream_cat: '1f640',\n\t    scroll: '1f4dc',\n\t    seat: '1f4ba',\n\t    secret: '3299',\n\t    see_no_evil: '1f648',\n\t    seedling: '1f331',\n\t    selfie: '1f933',\n\t    senegal: '1f1f8-1f1f3',\n\t    serbia: '1f1f7-1f1f8',\n\t    service_dog: '1f415-1f9ba',\n\t    seven: '0037-20e3',\n\t    seychelles: '1f1f8-1f1e8',\n\t    shallow_pan_of_food: '1f958',\n\t    shamrock: '2618',\n\t    shark: '1f988',\n\t    shaved_ice: '1f367',\n\t    sheep: '1f411',\n\t    shell: '1f41a',\n\t    shield: '1f6e1',\n\t    shinto_shrine: '26e9',\n\t    ship: '1f6a2',\n\t    shirt: '1f455',\n\t    poo: '1f4a9',\n\t    shoe: '1f45e',\n\t    shopping: '1f6cd',\n\t    shopping_cart: '1f6d2',\n\t    shorts: '1fa73',\n\t    shower: '1f6bf',\n\t    shrimp: '1f990',\n\t    shrug: '1f937',\n\t    shushing_face: '1f92b',\n\t    sierra_leone: '1f1f8-1f1f1',\n\t    signal_strength: '1f4f6',\n\t    singapore: '1f1f8-1f1ec',\n\t    singer: '1f9d1-1f3a4',\n\t    sint_maarten: '1f1f8-1f1fd',\n\t    six: '0036-20e3',\n\t    six_pointed_star: '1f52f',\n\t    skateboard: '1f6f9',\n\t    ski: '1f3bf',\n\t    skier: '26f7',\n\t    skull: '1f480',\n\t    skull_and_crossbones: '2620',\n\t    skunk: '1f9a8',\n\t    sled: '1f6f7',\n\t    sleeping: '1f634',\n\t    sleeping_bed: '1f6cc',\n\t    sleepy: '1f62a',\n\t    slightly_frowning_face: '1f641',\n\t    slightly_smiling_face: '1f642',\n\t    slot_machine: '1f3b0',\n\t    sloth: '1f9a5',\n\t    slovakia: '1f1f8-1f1f0',\n\t    slovenia: '1f1f8-1f1ee',\n\t    small_airplane: '1f6e9',\n\t    small_blue_diamond: '1f539',\n\t    small_orange_diamond: '1f538',\n\t    small_red_triangle: '1f53a',\n\t    small_red_triangle_down: '1f53b',\n\t    smile: '1f604',\n\t    smile_cat: '1f638',\n\t    smiley: '1f603',\n\t    smiley_cat: '1f63a',\n\t    smiling_face_with_three_hearts: '1f970',\n\t    smiling_imp: '1f608',\n\t    smirk: '1f60f',\n\t    smirk_cat: '1f63c',\n\t    smoking: '1f6ac',\n\t    snail: '1f40c',\n\t    snake: '1f40d',\n\t    sneezing_face: '1f927',\n\t    snowboarder: '1f3c2',\n\t    snowflake: '2744',\n\t    snowman: '26c4',\n\t    snowman_with_snow: '2603',\n\t    soap: '1f9fc',\n\t    sob: '1f62d',\n\t    soccer: '26bd',\n\t    socks: '1f9e6',\n\t    softball: '1f94e',\n\t    solomon_islands: '1f1f8-1f1e7',\n\t    somalia: '1f1f8-1f1f4',\n\t    soon: '1f51c',\n\t    sos: '1f198',\n\t    sound: '1f509',\n\t    south_africa: '1f1ff-1f1e6',\n\t    south_georgia_south_sandwich_islands: '1f1ec-1f1f8',\n\t    south_sudan: '1f1f8-1f1f8',\n\t    space_invader: '1f47e',\n\t    spades: '2660',\n\t    spaghetti: '1f35d',\n\t    sparkle: '2747',\n\t    sparkler: '1f387',\n\t    sparkles: '2728',\n\t    sparkling_heart: '1f496',\n\t    speak_no_evil: '1f64a',\n\t    speaker: '1f508',\n\t    speaking_head: '1f5e3',\n\t    speech_balloon: '1f4ac',\n\t    speedboat: '1f6a4',\n\t    spider: '1f577',\n\t    spider_web: '1f578',\n\t    spiral_calendar: '1f5d3',\n\t    spiral_notepad: '1f5d2',\n\t    sponge: '1f9fd',\n\t    spoon: '1f944',\n\t    squid: '1f991',\n\t    sri_lanka: '1f1f1-1f1f0',\n\t    st_barthelemy: '1f1e7-1f1f1',\n\t    st_helena: '1f1f8-1f1ed',\n\t    st_kitts_nevis: '1f1f0-1f1f3',\n\t    st_lucia: '1f1f1-1f1e8',\n\t    st_martin: '1f1f2-1f1eb',\n\t    st_pierre_miquelon: '1f1f5-1f1f2',\n\t    st_vincent_grenadines: '1f1fb-1f1e8',\n\t    stadium: '1f3df',\n\t    standing_man: '1f9cd-2642',\n\t    standing_person: '1f9cd',\n\t    standing_woman: '1f9cd-2640',\n\t    star: '2b50',\n\t    star2: '1f31f',\n\t    star_and_crescent: '262a',\n\t    star_of_david: '2721',\n\t    star_struck: '1f929',\n\t    stars: '1f320',\n\t    station: '1f689',\n\t    statue_of_liberty: '1f5fd',\n\t    steam_locomotive: '1f682',\n\t    stethoscope: '1fa7a',\n\t    stew: '1f372',\n\t    stop_button: '23f9',\n\t    stop_sign: '1f6d1',\n\t    stopwatch: '23f1',\n\t    straight_ruler: '1f4cf',\n\t    strawberry: '1f353',\n\t    stuck_out_tongue: '1f61b',\n\t    stuck_out_tongue_closed_eyes: '1f61d',\n\t    stuck_out_tongue_winking_eye: '1f61c',\n\t    student: '1f9d1-1f393',\n\t    studio_microphone: '1f399',\n\t    stuffed_flatbread: '1f959',\n\t    sudan: '1f1f8-1f1e9',\n\t    sun_behind_large_cloud: '1f325',\n\t    sun_behind_rain_cloud: '1f326',\n\t    sun_behind_small_cloud: '1f324',\n\t    sun_with_face: '1f31e',\n\t    sunflower: '1f33b',\n\t    sunglasses: '1f60e',\n\t    sunny: '2600',\n\t    sunrise: '1f305',\n\t    sunrise_over_mountains: '1f304',\n\t    superhero: '1f9b8',\n\t    superhero_man: '1f9b8-2642',\n\t    superhero_woman: '1f9b8-2640',\n\t    supervillain: '1f9b9',\n\t    supervillain_man: '1f9b9-2642',\n\t    supervillain_woman: '1f9b9-2640',\n\t    surfer: '1f3c4',\n\t    surfing_man: '1f3c4-2642',\n\t    surfing_woman: '1f3c4-2640',\n\t    suriname: '1f1f8-1f1f7',\n\t    sushi: '1f363',\n\t    suspension_railway: '1f69f',\n\t    svalbard_jan_mayen: '1f1f8-1f1ef',\n\t    swan: '1f9a2',\n\t    swaziland: '1f1f8-1f1ff',\n\t    sweat: '1f613',\n\t    sweat_drops: '1f4a6',\n\t    sweat_smile: '1f605',\n\t    sweden: '1f1f8-1f1ea',\n\t    sweet_potato: '1f360',\n\t    swim_brief: '1fa72',\n\t    swimmer: '1f3ca',\n\t    swimming_man: '1f3ca-2642',\n\t    swimming_woman: '1f3ca-2640',\n\t    switzerland: '1f1e8-1f1ed',\n\t    symbols: '1f523',\n\t    synagogue: '1f54d',\n\t    syria: '1f1f8-1f1fe',\n\t    syringe: '1f489',\n\t    't-rex': '1f996',\n\t    taco: '1f32e',\n\t    tada: '1f389',\n\t    taiwan: '1f1f9-1f1fc',\n\t    tajikistan: '1f1f9-1f1ef',\n\t    takeout_box: '1f961',\n\t    tanabata_tree: '1f38b',\n\t    tangerine: '1f34a',\n\t    tanzania: '1f1f9-1f1ff',\n\t    taurus: '2649',\n\t    taxi: '1f695',\n\t    tea: '1f375',\n\t    teacher: '1f9d1-1f3eb',\n\t    technologist: '1f9d1-1f4bb',\n\t    teddy_bear: '1f9f8',\n\t    telephone: '260e',\n\t    telephone_receiver: '1f4de',\n\t    telescope: '1f52d',\n\t    tennis: '1f3be',\n\t    tent: '26fa',\n\t    test_tube: '1f9ea',\n\t    thailand: '1f1f9-1f1ed',\n\t    thermometer: '1f321',\n\t    thinking: '1f914',\n\t    thought_balloon: '1f4ad',\n\t    thread: '1f9f5',\n\t    three: '0033-20e3',\n\t    thumbsdown: '1f44e',\n\t    thumbsup: '1f44d',\n\t    ticket: '1f3ab',\n\t    tickets: '1f39f',\n\t    tiger: '1f42f',\n\t    tiger2: '1f405',\n\t    timer_clock: '23f2',\n\t    timor_leste: '1f1f9-1f1f1',\n\t    tipping_hand_man: '1f481-2642',\n\t    tipping_hand_person: '1f481',\n\t    tipping_hand_woman: '1f481-2640',\n\t    tired_face: '1f62b',\n\t    tm: '2122',\n\t    togo: '1f1f9-1f1ec',\n\t    toilet: '1f6bd',\n\t    tokelau: '1f1f9-1f1f0',\n\t    tokyo_tower: '1f5fc',\n\t    tomato: '1f345',\n\t    tonga: '1f1f9-1f1f4',\n\t    tongue: '1f445',\n\t    toolbox: '1f9f0',\n\t    tooth: '1f9b7',\n\t    top: '1f51d',\n\t    tophat: '1f3a9',\n\t    tornado: '1f32a',\n\t    tr: '1f1f9-1f1f7',\n\t    trackball: '1f5b2',\n\t    tractor: '1f69c',\n\t    traffic_light: '1f6a5',\n\t    train: '1f68b',\n\t    train2: '1f686',\n\t    tram: '1f68a',\n\t    triangular_flag_on_post: '1f6a9',\n\t    triangular_ruler: '1f4d0',\n\t    trident: '1f531',\n\t    trinidad_tobago: '1f1f9-1f1f9',\n\t    tristan_da_cunha: '1f1f9-1f1e6',\n\t    triumph: '1f624',\n\t    trolleybus: '1f68e',\n\t    trophy: '1f3c6',\n\t    tropical_drink: '1f379',\n\t    tropical_fish: '1f420',\n\t    truck: '1f69a',\n\t    trumpet: '1f3ba',\n\t    tshirt: '1f455',\n\t    tulip: '1f337',\n\t    tumbler_glass: '1f943',\n\t    tunisia: '1f1f9-1f1f3',\n\t    turkey: '1f983',\n\t    turkmenistan: '1f1f9-1f1f2',\n\t    turks_caicos_islands: '1f1f9-1f1e8',\n\t    turtle: '1f422',\n\t    tuvalu: '1f1f9-1f1fb',\n\t    tv: '1f4fa',\n\t    twisted_rightwards_arrows: '1f500',\n\t    two: '0032-20e3',\n\t    two_hearts: '1f495',\n\t    two_men_holding_hands: '1f46c',\n\t    two_women_holding_hands: '1f46d',\n\t    u5272: '1f239',\n\t    u5408: '1f234',\n\t    u55b6: '1f23a',\n\t    u6307: '1f22f',\n\t    u6708: '1f237',\n\t    u6709: '1f236',\n\t    u6e80: '1f235',\n\t    u7121: '1f21a',\n\t    u7533: '1f238',\n\t    u7981: '1f232',\n\t    u7a7a: '1f233',\n\t    uganda: '1f1fa-1f1ec',\n\t    uk: '1f1ec-1f1e7',\n\t    ukraine: '1f1fa-1f1e6',\n\t    umbrella: '2614',\n\t    unamused: '1f612',\n\t    underage: '1f51e',\n\t    unicorn: '1f984',\n\t    united_arab_emirates: '1f1e6-1f1ea',\n\t    united_nations: '1f1fa-1f1f3',\n\t    unlock: '1f513',\n\t    up: '1f199',\n\t    upside_down_face: '1f643',\n\t    uruguay: '1f1fa-1f1fe',\n\t    us: '1f1fa-1f1f8',\n\t    us_outlying_islands: '1f1fa-1f1f2',\n\t    us_virgin_islands: '1f1fb-1f1ee',\n\t    uzbekistan: '1f1fa-1f1ff',\n\t    v: '270c',\n\t    vampire: '1f9db',\n\t    vampire_man: '1f9db-2642',\n\t    vampire_woman: '1f9db-2640',\n\t    vanuatu: '1f1fb-1f1fa',\n\t    vatican_city: '1f1fb-1f1e6',\n\t    venezuela: '1f1fb-1f1ea',\n\t    vertical_traffic_light: '1f6a6',\n\t    vhs: '1f4fc',\n\t    vibration_mode: '1f4f3',\n\t    video_camera: '1f4f9',\n\t    video_game: '1f3ae',\n\t    vietnam: '1f1fb-1f1f3',\n\t    violin: '1f3bb',\n\t    virgo: '264d',\n\t    volcano: '1f30b',\n\t    volleyball: '1f3d0',\n\t    vomiting_face: '1f92e',\n\t    vs: '1f19a',\n\t    vulcan_salute: '1f596',\n\t    waffle: '1f9c7',\n\t    wales: '1f3f4-e0067-e0062-e0077-e006c-e0073-e007f',\n\t    walking: '1f6b6',\n\t    walking_man: '1f6b6-2642',\n\t    walking_woman: '1f6b6-2640',\n\t    wallis_futuna: '1f1fc-1f1eb',\n\t    waning_crescent_moon: '1f318',\n\t    waning_gibbous_moon: '1f316',\n\t    warning: '26a0',\n\t    wastebasket: '1f5d1',\n\t    watch: '231a',\n\t    water_buffalo: '1f403',\n\t    water_polo: '1f93d',\n\t    watermelon: '1f349',\n\t    wave: '1f44b',\n\t    wavy_dash: '3030',\n\t    waxing_crescent_moon: '1f312',\n\t    waxing_gibbous_moon: '1f314',\n\t    wc: '1f6be',\n\t    weary: '1f629',\n\t    wedding: '1f492',\n\t    weight_lifting: '1f3cb',\n\t    weight_lifting_man: '1f3cb-2642',\n\t    weight_lifting_woman: '1f3cb-2640',\n\t    western_sahara: '1f1ea-1f1ed',\n\t    whale: '1f433',\n\t    whale2: '1f40b',\n\t    wheel_of_dharma: '2638',\n\t    wheelchair: '267f',\n\t    white_check_mark: '2705',\n\t    white_circle: '26aa',\n\t    white_flag: '1f3f3',\n\t    white_flower: '1f4ae',\n\t    white_haired_man: '1f468-1f9b3',\n\t    white_haired_woman: '1f469-1f9b3',\n\t    white_heart: '1f90d',\n\t    white_large_square: '2b1c',\n\t    white_medium_small_square: '25fd',\n\t    white_medium_square: '25fb',\n\t    white_small_square: '25ab',\n\t    white_square_button: '1f533',\n\t    wilted_flower: '1f940',\n\t    wind_chime: '1f390',\n\t    wind_face: '1f32c',\n\t    wine_glass: '1f377',\n\t    wink: '1f609',\n\t    wolf: '1f43a',\n\t    woman: '1f469',\n\t    woman_artist: '1f469-1f3a8',\n\t    woman_astronaut: '1f469-1f680',\n\t    woman_cartwheeling: '1f938-2640',\n\t    woman_cook: '1f469-1f373',\n\t    woman_dancing: '1f483',\n\t    woman_facepalming: '1f926-2640',\n\t    woman_factory_worker: '1f469-1f3ed',\n\t    woman_farmer: '1f469-1f33e',\n\t    woman_firefighter: '1f469-1f692',\n\t    woman_health_worker: '1f469-2695',\n\t    woman_in_manual_wheelchair: '1f469-1f9bd',\n\t    woman_in_motorized_wheelchair: '1f469-1f9bc',\n\t    woman_judge: '1f469-2696',\n\t    woman_juggling: '1f939-2640',\n\t    woman_mechanic: '1f469-1f527',\n\t    woman_office_worker: '1f469-1f4bc',\n\t    woman_pilot: '1f469-2708',\n\t    woman_playing_handball: '1f93e-2640',\n\t    woman_playing_water_polo: '1f93d-2640',\n\t    woman_scientist: '1f469-1f52c',\n\t    woman_shrugging: '1f937-2640',\n\t    woman_singer: '1f469-1f3a4',\n\t    woman_student: '1f469-1f393',\n\t    woman_teacher: '1f469-1f3eb',\n\t    woman_technologist: '1f469-1f4bb',\n\t    woman_with_headscarf: '1f9d5',\n\t    woman_with_probing_cane: '1f469-1f9af',\n\t    woman_with_turban: '1f473-2640',\n\t    womans_clothes: '1f45a',\n\t    womans_hat: '1f452',\n\t    women_wrestling: '1f93c-2640',\n\t    womens: '1f6ba',\n\t    woozy_face: '1f974',\n\t    world_map: '1f5fa',\n\t    worried: '1f61f',\n\t    wrench: '1f527',\n\t    wrestling: '1f93c',\n\t    writing_hand: '270d',\n\t    x: '274c',\n\t    yarn: '1f9f6',\n\t    yawning_face: '1f971',\n\t    yellow_circle: '1f7e1',\n\t    yellow_heart: '1f49b',\n\t    yellow_square: '1f7e8',\n\t    yemen: '1f1fe-1f1ea',\n\t    yen: '1f4b4',\n\t    yin_yang: '262f',\n\t    yo_yo: '1fa80',\n\t    yum: '1f60b',\n\t    zambia: '1f1ff-1f1f2',\n\t    zany_face: '1f92a',\n\t    zap: '26a1',\n\t    zebra: '1f993',\n\t    zero: '0030-20e3',\n\t    zimbabwe: '1f1ff-1f1fc',\n\t    zipper_mouth_face: '1f910',\n\t    zombie: '1f9df',\n\t    zombie_man: '1f9df-2642',\n\t    zombie_woman: '1f9df-2640',\n\t    zzz: '1f4a4'\n\t  }\n\t};\n\n\tfunction ownKeys$7(object, enumerableOnly) { var keys = keys$3(object); if (getOwnPropertySymbols$2) { var symbols = getOwnPropertySymbols$2(object); enumerableOnly && (symbols = filter$3(symbols).call(symbols, function (sym) { return getOwnPropertyDescriptor$3(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\n\n\tfunction _objectSpread$6(target) { for (var i = 1; i < arguments.length; i++) { var _context3, _context4; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? forEach$3(_context3 = ownKeys$7(Object(source), !0)).call(_context3, function (key) { _defineProperty(target, key, source[key]); }) : getOwnPropertyDescriptors$2 ? defineProperties$2(target, getOwnPropertyDescriptors$2(source)) : forEach$3(_context4 = ownKeys$7(Object(source))).call(_context4, function (key) { defineProperty$5(target, key, getOwnPropertyDescriptor$3(source, key)); }); } return target; }\n\n\tfunction _createSuper$s(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$s(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = construct$4(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\n\tfunction _isNativeReflectConstruct$s() { if (typeof Reflect === \"undefined\" || !construct$4) return false; if (construct$4.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(construct$4(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\n\tfunction fromCodePoint$3() {\n\t  var codeUnits = [];\n\t  var codeLen = 0;\n\t  var result = '';\n\n\t  for (var index = 0, len = arguments.length; index !== len; ++index) {\n\t    var codePoint = +(index < 0 || arguments.length <= index ? undefined : arguments[index]); // correctly handles all cases including `NaN`, `-Infinity`, `+Infinity`\n\t    // The surrounding `!(...)` is required to correctly handle `NaN` cases\n\t    // The (codePoint>>>0) === codePoint clause handles decimals and negatives\n\n\t    if (!(codePoint < 0x10ffff && codePoint >>> 0 === codePoint)) {\n\t      throw new RangeError(\"Invalid code point: \".concat(codePoint));\n\t    }\n\n\t    if (codePoint <= 0xffff) {\n\t      // BMP code point\n\t      codeLen = codeUnits.push(codePoint);\n\t    } else {\n\t      // Astral code point; split in surrogate halves\n\t      // https://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae\n\t      codePoint -= 0x10000;\n\t      codeLen = codeUnits.push((codePoint >> 10) + 0xd800, // highSurrogate\n\t      codePoint % 0x400 + 0xdc00 // lowSurrogate\n\t      );\n\t    }\n\n\t    if (codeLen >= 0x3fff) {\n\t      result += String.fromCharCode.apply(null, codeUnits);\n\t      codeUnits.length = 0;\n\t    }\n\t  }\n\n\t  return result + String.fromCharCode.apply(null, codeUnits);\n\t}\n\n\tvar Emoji = /*#__PURE__*/function (_SyntaxBase) {\n\t  _inherits(Emoji, _SyntaxBase);\n\n\t  var _super = _createSuper$s(Emoji);\n\n\t  function Emoji() {\n\t    var _this;\n\n\t    var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {\n\t      config: undefined\n\t    },\n\t        config = _ref.config;\n\n\t    _classCallCheck(this, Emoji);\n\n\t    _this = _super.call(this, {\n\t      config: config\n\t    });\n\t    _this.options = {\n\t      useUnicode: true,\n\t      upperCase: false,\n\t      customHandled: false,\n\t      resourceURL: 'https://github.githubassets.com/images/icons/emoji/unicode/${code}.png?v8',\n\t      emojis: _objectSpread$6({}, gfmUnicode.emojis)\n\t    };\n\n\t    if (_typeof(config) !== 'object') {\n\t      return _possibleConstructorReturn(_this);\n\t    }\n\n\t    var useUnicode = config.useUnicode,\n\t        customResourceURL = config.customResourceURL,\n\t        customRenderer = config.customRenderer,\n\t        upperCase = config.upperCase;\n\t    _this.options.useUnicode = typeof useUnicode === 'boolean' ? useUnicode : _this.options.useUnicode;\n\t    _this.options.upperCase = typeof useUnicode === 'boolean' ? upperCase : _this.options.upperCase;\n\n\t    if (useUnicode === false && typeof customResourceURL === 'string') {\n\t      _this.options.resourceURL = customResourceURL;\n\t    }\n\n\t    if (typeof customRenderer === 'function') {\n\t      _this.options.customHandled = true;\n\t      _this.options.customRenderer = customRenderer;\n\t    } // TODO: URL Validator\n\n\n\t    return _this;\n\t  }\n\n\t  _createClass(Emoji, [{\n\t    key: \"makeHtml\",\n\t    value: function makeHtml(str, sentenceMakeFunc) {\n\t      var _this2 = this;\n\n\t      if (!this.test(str)) {\n\t        return str;\n\t      }\n\n\t      return str.replace(this.RULE.reg, function (match, emojiKey) {\n\t        var _context2;\n\n\t        // 先走自定义渲染逻辑\n\t        if (_this2.options.customHandled && typeof _this2.options.customRenderer === 'function') {\n\t          return _this2.options.customRenderer(emojiKey);\n\t        }\n\n\t        var emojiCode = _this2.options.emojis[emojiKey];\n\n\t        if (typeof emojiCode !== 'string') {\n\t          return match;\n\t        }\n\n\t        if (_this2.options.useUnicode) {\n\t          var _context;\n\n\t          var codes = map$3(_context = emojiCode.split('-')).call(_context, function (unicode) {\n\t            return \"0x\".concat(unicode);\n\t          }); // convert to hex string\n\n\n\t          return fromCodePoint$3.apply(void 0, _toConsumableArray(codes));\n\t        }\n\n\t        if (_this2.options.upperCase) {\n\t          emojiCode = emojiCode.toUpperCase();\n\t        }\n\n\t        var src = _this2.options.resourceURL.replace(/\\$\\{code\\}/g, emojiCode);\n\n\t        return concat$5(_context2 = \"<img class=\\\"emoji\\\" src=\\\"\".concat(src, \"\\\" alt=\\\"\")).call(_context2, escapeHTMLSpecialCharOnce(emojiKey), \"\\\" />\");\n\t      });\n\t    }\n\t  }, {\n\t    key: \"rule\",\n\t    value: function rule() {\n\t      // (?<protocol>\\\\w+:)\\\\/\\\\/\n\t      var ret = {\n\t        // ?<left>\n\t        begin: ':',\n\t        content: '([a-zA-Z0-9+_]+?)',\n\t        // ?<right>\n\t        end: ':'\n\t      };\n\t      ret.reg = compileRegExp(ret, 'g');\n\t      return ret;\n\t    }\n\t  }]);\n\n\t  return Emoji;\n\t}(SyntaxBase);\n\n\t_defineProperty(Emoji, \"HOOK_NAME\", 'emoji');\n\n\tfunction _createSuper$t(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$t(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = construct$4(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\n\tfunction _isNativeReflectConstruct$t() { if (typeof Reflect === \"undefined\" || !construct$4) return false; if (construct$4.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(construct$4(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\n\tvar Underline = /*#__PURE__*/function (_SyntaxBase) {\n\t  _inherits(Underline, _SyntaxBase);\n\n\t  var _super = _createSuper$t(Underline);\n\n\t  function Underline() {\n\t    _classCallCheck(this, Underline);\n\n\t    return _super.apply(this, arguments);\n\t  }\n\n\t  _createClass(Underline, [{\n\t    key: \"makeHtml\",\n\t    value: // constructor() {\n\t    //     super();\n\t    // }\n\t    function makeHtml(str) {\n\t      if (!this.test(str)) {\n\t        return str;\n\t      }\n\n\t      return str.replace(this.RULE.reg, '$1<span style=\"text-decoration: underline;\">$2</span>$3');\n\t    }\n\t  }, {\n\t    key: \"rule\",\n\t    value: function rule() {\n\t      var ret = {\n\t        begin: '(^| )\\\\/',\n\t        end: '\\\\/( |$)',\n\t        content: '([^\\\\n]+?)'\n\t      };\n\t      ret.reg = new RegExp(ret.begin + ret.content + ret.end, 'g');\n\t      return ret;\n\t    }\n\t  }]);\n\n\t  return Underline;\n\t}(SyntaxBase);\n\n\t_defineProperty(Underline, \"HOOK_NAME\", 'underline');\n\n\tfunction _createSuper$u(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$u(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = construct$4(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\n\tfunction _isNativeReflectConstruct$u() { if (typeof Reflect === \"undefined\" || !construct$4) return false; if (construct$4.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(construct$4(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\n\tvar HighLight = /*#__PURE__*/function (_SyntaxBase) {\n\t  _inherits(HighLight, _SyntaxBase);\n\n\t  var _super = _createSuper$u(HighLight);\n\n\t  function HighLight() {\n\t    _classCallCheck(this, HighLight);\n\n\t    return _super.apply(this, arguments);\n\t  }\n\n\t  _createClass(HighLight, [{\n\t    key: \"makeHtml\",\n\t    value: function makeHtml(str) {\n\t      if (!this.test(str)) {\n\t        return str;\n\t      }\n\n\t      return str.replace(this.RULE.reg, '$1<mark>$2</mark>$3');\n\t    }\n\t  }, {\n\t    key: \"rule\",\n\t    value: function rule() {\n\t      var ret = {\n\t        begin: '(^| )==',\n\t        end: '==( |$|\\\\n)',\n\t        content: '([^\\\\n]+?)'\n\t      };\n\t      ret.reg = new RegExp(ret.begin + ret.content + ret.end, 'g');\n\t      return ret;\n\t    }\n\t  }]);\n\n\t  return HighLight;\n\t}(SyntaxBase);\n\n\t_defineProperty(HighLight, \"HOOK_NAME\", 'highLight');\n\n\t// eslint-disable-next-line es-x/no-json -- safe\n\tif (!path.JSON) path.JSON = { stringify: JSON.stringify };\n\n\t// eslint-disable-next-line no-unused-vars -- required for `.length`\n\tvar stringify = function stringify(it, replacer, space) {\n\t  return functionApply(path.JSON.stringify, null, arguments);\n\t};\n\n\tvar stringify$1 = stringify;\n\n\tvar stringify$2 = stringify$1;\n\n\tvar $includes = arrayIncludes.includes;\n\n\n\n\t// FF99+ bug\n\tvar BROKEN_ON_SPARSE = fails(function () {\n\t  return !Array(1).includes();\n\t});\n\n\t// `Array.prototype.includes` method\n\t// https://tc39.es/ecma262/#sec-array.prototype.includes\n\t_export({ target: 'Array', proto: true, forced: BROKEN_ON_SPARSE }, {\n\t  includes: function includes(el /* , fromIndex = 0 */) {\n\t    return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined);\n\t  }\n\t});\n\n\tvar includes = entryVirtual('Array').includes;\n\n\tvar stringIndexOf = functionUncurryThis(''.indexOf);\n\n\t// `String.prototype.includes` method\n\t// https://tc39.es/ecma262/#sec-string.prototype.includes\n\t_export({ target: 'String', proto: true, forced: !correctIsRegexpLogic('includes') }, {\n\t  includes: function includes(searchString /* , position = 0 */) {\n\t    return !!~stringIndexOf(\n\t      toString_1(requireObjectCoercible(this)),\n\t      toString_1(notARegexp(searchString)),\n\t      arguments.length > 1 ? arguments[1] : undefined\n\t    );\n\t  }\n\t});\n\n\tvar includes$1 = entryVirtual('String').includes;\n\n\tvar ArrayPrototype$d = Array.prototype;\n\tvar StringPrototype$3 = String.prototype;\n\n\tvar includes$2 = function (it) {\n\t  var own = it.includes;\n\t  if (it === ArrayPrototype$d || (objectIsPrototypeOf(ArrayPrototype$d, it) && own === ArrayPrototype$d.includes)) return includes;\n\t  if (typeof it == 'string' || it === StringPrototype$3 || (objectIsPrototypeOf(StringPrototype$3, it) && own === StringPrototype$3.includes)) {\n\t    return includes$1;\n\t  } return own;\n\t};\n\n\tvar includes$3 = includes$2;\n\n\tvar includes$4 = includes$3;\n\n\t/**\n\t * A specialized version of `_.map` for arrays without support for iteratee\n\t * shorthands.\n\t *\n\t * @private\n\t * @param {Array} [array] The array to iterate over.\n\t * @param {Function} iteratee The function invoked per iteration.\n\t * @returns {Array} Returns the new mapped array.\n\t */\n\tfunction arrayMap(array, iteratee) {\n\t  var index = -1,\n\t      length = array == null ? 0 : array.length,\n\t      result = Array(length);\n\n\t  while (++index < length) {\n\t    result[index] = iteratee(array[index], index, array);\n\t  }\n\t  return result;\n\t}\n\n\tvar _arrayMap = arrayMap;\n\n\t/** `Object#toString` result references. */\n\tvar symbolTag = '[object Symbol]';\n\n\t/**\n\t * Checks if `value` is classified as a `Symbol` primitive or object.\n\t *\n\t * @static\n\t * @memberOf _\n\t * @since 4.0.0\n\t * @category Lang\n\t * @param {*} value The value to check.\n\t * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n\t * @example\n\t *\n\t * _.isSymbol(Symbol.iterator);\n\t * // => true\n\t *\n\t * _.isSymbol('abc');\n\t * // => false\n\t */\n\tfunction isSymbol$1(value) {\n\t  return typeof value == 'symbol' ||\n\t    (isObjectLike_1(value) && _baseGetTag(value) == symbolTag);\n\t}\n\n\tvar isSymbol_1 = isSymbol$1;\n\n\t/** Used as references for various `Number` constants. */\n\tvar INFINITY = 1 / 0;\n\n\t/** Used to convert symbols to primitives and strings. */\n\tvar symbolProto = _Symbol ? _Symbol.prototype : undefined,\n\t    symbolToString = symbolProto ? symbolProto.toString : undefined;\n\n\t/**\n\t * The base implementation of `_.toString` which doesn't convert nullish\n\t * values to empty strings.\n\t *\n\t * @private\n\t * @param {*} value The value to process.\n\t * @returns {string} Returns the string.\n\t */\n\tfunction baseToString(value) {\n\t  // Exit early for strings to avoid a performance hit in some environments.\n\t  if (typeof value == 'string') {\n\t    return value;\n\t  }\n\t  if (isArray_1(value)) {\n\t    // Recursively convert values (susceptible to call stack limits).\n\t    return _arrayMap(value, baseToString) + '';\n\t  }\n\t  if (isSymbol_1(value)) {\n\t    return symbolToString ? symbolToString.call(value) : '';\n\t  }\n\t  var result = (value + '');\n\t  return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n\t}\n\n\tvar _baseToString = baseToString;\n\n\t/**\n\t * Converts `value` to a string. An empty string is returned for `null`\n\t * and `undefined` values. The sign of `-0` is preserved.\n\t *\n\t * @static\n\t * @memberOf _\n\t * @since 4.0.0\n\t * @category Lang\n\t * @param {*} value The value to convert.\n\t * @returns {string} Returns the converted string.\n\t * @example\n\t *\n\t * _.toString(null);\n\t * // => ''\n\t *\n\t * _.toString(-0);\n\t * // => '-0'\n\t *\n\t * _.toString([1, 2, 3]);\n\t * // => '1,2,3'\n\t */\n\tfunction toString$2(value) {\n\t  return value == null ? '' : _baseToString(value);\n\t}\n\n\tvar toString_1$1 = toString$2;\n\n\t/**\n\t * Used to match `RegExp`\n\t * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n\t */\n\tvar reRegExpChar$1 = /[\\\\^$.*+?()[\\]{}|]/g,\n\t    reHasRegExpChar = RegExp(reRegExpChar$1.source);\n\n\t/**\n\t * Escapes the `RegExp` special characters \"^\", \"$\", \"\\\", \".\", \"*\", \"+\",\n\t * \"?\", \"(\", \")\", \"[\", \"]\", \"{\", \"}\", and \"|\" in `string`.\n\t *\n\t * @static\n\t * @memberOf _\n\t * @since 3.0.0\n\t * @category String\n\t * @param {string} [string=''] The string to escape.\n\t * @returns {string} Returns the escaped string.\n\t * @example\n\t *\n\t * _.escapeRegExp('[lodash](https://lodash.com/)');\n\t * // => '\\[lodash\\]\\(https://lodash\\.com/\\)'\n\t */\n\tfunction escapeRegExp(string) {\n\t  string = toString_1$1(string);\n\t  return (string && reHasRegExpChar.test(string))\n\t    ? string.replace(reRegExpChar$1, '\\\\$&')\n\t    : string;\n\t}\n\n\tvar escapeRegExp_1 = escapeRegExp;\n\n\t// handling this'.\n\n\tvar Pass = {\n\t  toString: function toString() {\n\t    return \"CodeMirror.Pass\";\n\t  }\n\t}; // Reused option objects for setSelection & friends\n\n\tfunction _createSuper$v(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$v(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = construct$4(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\n\tfunction _isNativeReflectConstruct$v() { if (typeof Reflect === \"undefined\" || !construct$4) return false; if (construct$4.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(construct$4(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\t/**\n\t * @typedef {import('codemirror')} CodeMirror\n\t */\n\n\t/**\n\t * @typedef { Object } SuggestListItemObject 推荐列表项对象\n\t * @property { string } icon 图标\n\t * @property { string } label 候选列表回显的内容\n\t * @property { string } value 点击候选项的时候回填的值\n\t * @property { string } keyword 关键词，通过关键词控制候选项的显隐\n\t * @typedef { SuggestListItemObject | string } SuggestListItem 推荐列表项\n\t * @typedef { Array<SuggestListItem> } SuggestList 推荐列表\n\t */\n\n\t/**\n\t * @typedef {object} SuggesterConfigItem\n\t * @property {function(string, function(SuggestList): void): void} suggestList\n\t * @property {string} keyword\n\t * @property {function} suggestListRender\n\t * @property {function} echo\n\t * @typedef {object} SuggesterConfig\n\t * @property {Array<SuggesterConfigItem>} suggester\n\t */\n\n\tvar Suggester = /*#__PURE__*/function (_SyntaxBase) {\n\t  _inherits(Suggester, _SyntaxBase);\n\n\t  var _super = _createSuper$v(Suggester);\n\n\t  function Suggester(_ref) {\n\t    var _this;\n\n\t    var config = _ref.config;\n\n\t    _classCallCheck(this, Suggester);\n\n\t    /**\n\t     * config.suggester 内容\n\t     * [{\n\t     * 请求url\n\t      suggestList: '',\n\t      唤醒关键字\n\t      keyword: '@',\n\t      建议模板 function\n\t      suggestListRender(valueArray) {\n\t       },\n\t      回填回调 function\n\t      echo(value) {\n\t            \n\t      }]\n\t     * \n\t     */\n\t    _this = _super.call(this, {\n\t      needCache: true\n\t    });\n\t    _this.config = config;\n\t    _this.RULE = _this.rule();\n\t    return _this;\n\t  }\n\n\t  _createClass(Suggester, [{\n\t    key: \"afterInit\",\n\t    value: function afterInit(callback) {\n\t      if (typeof callback === 'function') {\n\t        callback();\n\t      }\n\n\t      this.initConfig(this.config);\n\t    }\n\t    /**\n\t     * 获取系统默认的候选项列表\n\t     * TODO：后面考虑增加层级机制，比如“公式”是一级，“集合、逻辑运算、方程式”是公式的二级候选值\n\t     */\n\n\t  }, {\n\t    key: \"getSystemSuggestList\",\n\t    value: function getSystemSuggestList() {\n\t      var locales = this.$locale;\n\t      var suggestList = [{\n\t        icon: 'h1',\n\t        label: locales['H1 Heading'],\n\t        keyword: 'head1',\n\t        value: '# '\n\t      }, {\n\t        icon: 'h2',\n\t        label: locales['H2 Heading'],\n\t        keyword: 'head2',\n\t        value: '## '\n\t      }, {\n\t        icon: 'h3',\n\t        label: locales['H3 Heading'],\n\t        keyword: 'head3',\n\t        value: '### '\n\t      }, {\n\t        icon: 'table',\n\t        label: locales.table,\n\t        keyword: 'table',\n\t        value: '| Header | Header | Header |\\n| --- | --- | --- |\\n| Content | Content | Content |\\n'\n\t      }, {\n\t        icon: 'code',\n\t        label: locales.code,\n\t        keyword: 'code',\n\t        value: '```\\n\\n```\\n'\n\t      }, {\n\t        icon: 'link',\n\t        label: locales.link,\n\t        keyword: 'link',\n\t        value: \"[title](https://url)\"\n\t      }, {\n\t        icon: 'checklist',\n\t        label: locales.checklist,\n\t        keyword: 'checklist',\n\t        value: \"- [ ] item\\n- [x] item\"\n\t      }, {\n\t        icon: 'tips',\n\t        label: locales.panel,\n\t        keyword: 'panel tips info warning danger success',\n\t        value: \"::: primary title\\ncontent\\n:::\\n\"\n\t      }, {\n\t        icon: 'insertFlow',\n\t        label: locales.detail,\n\t        keyword: 'detail',\n\t        value: \"+++ \\u70B9\\u51FB\\u5C55\\u5F00\\u66F4\\u591A\\n\\u5185\\u5BB9\\n++- \\u9ED8\\u8BA4\\u5C55\\u5F00\\n\\u5185\\u5BB9\\n++ \\u9ED8\\u8BA4\\u6536\\u8D77\\n\\u5185\\u5BB9\\n+++\\n\"\n\t      } // {\n\t      //   icon: 'pen',\n\t      //   label: '续写',\n\t      //   keyword: 'xu xie chatgpt',\n\t      //   value: () => {\n\t      //     if (!this.$engine.$cherry.options.openai.apiKey) {\n\t      //       return '请先配置openai apiKey';\n\t      //     }\n\t      //     this.$engine.$cherry.toolbar.toolbarHandlers.chatgpt('complement');\n\t      //     return `\\n`;\n\t      //   },\n\t      // },\n\t      // {\n\t      //   icon: 'pen',\n\t      //   label: '总结',\n\t      //   keyword: 'zong jie chatgpt',\n\t      //   value: () => {\n\t      //     if (!this.$engine.$cherry.options.openai.apiKey) {\n\t      //       return '请先配置openai apiKey';\n\t      //     }\n\t      //     this.$engine.$cherry.toolbar.toolbarHandlers.chatgpt('summary');\n\t      //     return `\\n`;\n\t      //   },\n\t      // },\n\t      ];\n\t      return suggestList;\n\t    }\n\t    /**\n\t     * 初始化配置\n\t     * @param {SuggesterConfig} config\n\t     */\n\n\t  }, {\n\t    key: \"initConfig\",\n\t    value: function initConfig(config) {\n\t      var _this2 = this;\n\n\t      var suggester = config.suggester;\n\t      this.suggester = {};\n\n\t      if (!suggester) {\n\t        suggester = [];\n\t      }\n\n\t      var systemSuggestList = this.getSystemSuggestList(); // 默认的唤醒关键字\n\n\t      suggester.unshift({\n\t        keyword: '/',\n\t        suggestList: function suggestList(word, callback) {\n\t          var $word = word.replace(/^\\//, ''); // 加个空格就直接退出联想\n\n\t          if (/^\\s$/.test($word)) {\n\t            callback(false);\n\t            return;\n\t          }\n\n\t          var keyword = $word.replace(/\\s+/g, '').split('').join('.*?');\n\t          var test = new RegExp(\"^.*?\".concat(keyword, \".*?$\"), 'i');\n\n\t          var suggestList = filter$3(systemSuggestList).call(systemSuggestList, function (item) {\n\t            // TODO: 首次联想的时候会把所有的候选项列出来，后续可以增加一些机制改成默认拉取一部分候选项\n\t            return !$word || test.test(item.keyword);\n\t          });\n\n\t          callback(suggestList);\n\t        }\n\t      });\n\n\t      forEach$3(suggester).call(suggester, function (configItem) {\n\t        if (!configItem.suggestList) {\n\t          console.warn('[cherry-suggester]: the suggestList of config is missing.');\n\t          return;\n\t        }\n\n\t        if (!configItem.keyword) {\n\t          configItem.keyword = '@';\n\t        }\n\n\t        _this2.suggester[configItem.keyword] = configItem;\n\t      }); // 反复初始化时， 缓存还在， dom 已更新情况\n\n\n\t      if (suggesterPanel.hasEditor()) {\n\t        suggesterPanel.editor = null;\n\t      }\n\t    }\n\t  }, {\n\t    key: \"makeHtml\",\n\t    value: function makeHtml(str) {\n\t      var _context2;\n\n\t      if (!this.RULE.reg) return str;\n\n\t      if (!suggesterPanel.hasEditor() && isBrowser()) {\n\t        var editor = this.$engine.$cherry.editor;\n\t        suggesterPanel.setEditor(editor);\n\t        suggesterPanel.setSuggester(this.suggester);\n\t        suggesterPanel.bindEvent();\n\t      }\n\n\t      if (isLookbehindSupported()) {\n\t        var _context;\n\n\t        return str.replace(this.RULE.reg, bind$5(_context = this.toHtml).call(_context, this));\n\t      }\n\n\t      return replaceLookbehind(str, this.RULE.reg, bind$5(_context2 = this.toHtml).call(_context2, this), true, 1);\n\t    }\n\t  }, {\n\t    key: \"toHtml\",\n\t    value: function toHtml(wholeMatch, leadingChar, keyword, text) {\n\t      var _this$suggester$keywo3;\n\n\t      if (text) {\n\t        var _this$suggester$keywo, _this$suggester$keywo2, _context3, _context4;\n\n\t        return ((_this$suggester$keywo = this.suggester[keyword]) === null || _this$suggester$keywo === void 0 ? void 0 : (_this$suggester$keywo2 = _this$suggester$keywo.echo) === null || _this$suggester$keywo2 === void 0 ? void 0 : _this$suggester$keywo2.call(this, text)) || concat$5(_context3 = concat$5(_context4 = \"\".concat(leadingChar, \"<span class=\\\"cherry-suggestion\\\">\")).call(_context4, keyword)).call(_context3, text, \"</span>\");\n\t      }\n\n\t      if (((_this$suggester$keywo3 = this.suggester[keyword]) === null || _this$suggester$keywo3 === void 0 ? void 0 : _this$suggester$keywo3.echo) === false) {\n\t        return \"\".concat(leadingChar);\n\t      }\n\n\t      if (!this.suggester[keyword]) {\n\t        return leadingChar + text;\n\t      }\n\n\t      return text ? leadingChar + text : \"\".concat(leadingChar);\n\t    }\n\t  }, {\n\t    key: \"rule\",\n\t    value: function rule() {\n\t      var _context5, _context6, _context7;\n\n\t      if (!this.suggester || keys$3(this.suggester).length <= 0) {\n\t        return {};\n\t      }\n\n\t      var keys = map$3(_context5 = keys$3(this.suggester)).call(_context5, function (key) {\n\t        return escapeRegExp_1(key);\n\t      }).join('|');\n\n\t      var reg = new RegExp(concat$5(_context6 = concat$5(_context7 = \"\".concat(isLookbehindSupported() ? '((?<!\\\\\\\\))[ ]' : '(^|[^\\\\\\\\])[ ]', \"(\")).call(_context7, keys, \")(([^\")).call(_context6, keys, \"\\\\s])+)\"), 'g');\n\t      return {\n\t        reg: reg\n\t      };\n\t    }\n\t  }, {\n\t    key: \"mounted\",\n\t    value: function mounted() {\n\t      if (!suggesterPanel.hasEditor() && isBrowser()) {\n\t        var editor = this.$engine.$cherry.editor;\n\t        suggesterPanel.setEditor(editor);\n\t        suggesterPanel.setSuggester(this.suggester);\n\t        suggesterPanel.bindEvent();\n\t      }\n\t    }\n\t  }]);\n\n\t  return Suggester;\n\t}(SyntaxBase);\n\n\t_defineProperty(Suggester, \"HOOK_NAME\", 'suggester');\n\n\tvar SuggesterPanel = /*#__PURE__*/function () {\n\t  function SuggesterPanel() {\n\t    _classCallCheck(this, SuggesterPanel);\n\n\t    this.searchCache = false;\n\t    this.searchKeyCache = [];\n\t    this.optionList = [];\n\t    this.cursorMove = true;\n\t    this.suggesterConfig = {};\n\n\t    if (!this.$suggesterPanel && isBrowser() && document) {\n\t      var _document, _document$body, _document2;\n\n\t      (_document = document) === null || _document === void 0 ? void 0 : (_document$body = _document.body) === null || _document$body === void 0 ? void 0 : _document$body.appendChild(this.createDom(SuggesterPanel.panelWrap));\n\t      this.$suggesterPanel = (_document2 = document) === null || _document2 === void 0 ? void 0 : _document2.querySelector('.cherry-suggester-panel');\n\t    }\n\t  }\n\n\t  _createClass(SuggesterPanel, [{\n\t    key: \"hasEditor\",\n\t    value: function hasEditor() {\n\t      return !!this.editor && !!this.editor.editor.display && !!this.editor.editor.display.wrapper;\n\t    }\n\t    /**\n\t     * 设置编辑器\n\t     * @param {import('@/Editor').default} editor\n\t     */\n\n\t  }, {\n\t    key: \"setEditor\",\n\t    value: function setEditor(editor) {\n\t      this.editor = editor;\n\t    }\n\t  }, {\n\t    key: \"setSuggester\",\n\t    value: function setSuggester(suggester) {\n\t      this.suggesterConfig = suggester;\n\t    }\n\t  }, {\n\t    key: \"bindEvent\",\n\t    value: function bindEvent() {\n\t      var _this3 = this;\n\n\t      var keyAction = false;\n\t      this.editor.editor.on('change', function (codemirror, evt) {\n\t        keyAction = true;\n\n\t        _this3.onCodeMirrorChange(codemirror, evt);\n\t      });\n\t      this.editor.editor.on('keydown', function (codemirror, evt) {\n\t        keyAction = true;\n\n\t        if (_this3.enableRelate()) {\n\t          _this3.onKeyDown(codemirror, evt);\n\t        }\n\t      });\n\t      this.editor.editor.on('cursorActivity', function () {\n\t        // 当编辑区光标位置改变时触发\n\t        if (!keyAction) {\n\t          _this3.stopRelate();\n\t        }\n\n\t        keyAction = false;\n\t      });\n\t      var extraKeys = this.editor.editor.getOption('extraKeys');\n\t      var decorateKeys = ['Up', 'Down', 'Enter'];\n\n\t      forEach$3(decorateKeys).call(decorateKeys, function (key) {\n\t        if (typeof extraKeys[key] === 'function') {\n\t          var proxyTarget = extraKeys[key];\n\n\t          extraKeys[key] = function (codemirror) {\n\t            if (suggesterPanel.cursorMove) {\n\t              var res = proxyTarget.call(codemirror, codemirror);\n\n\t              if (res) {\n\t                return res;\n\t              } // logic to decide whether to move up or not\n\t              // return Pass.toString();\n\n\t            }\n\t          };\n\t        } else if (!extraKeys[key]) {\n\t          extraKeys[key] = function () {\n\t            if (suggesterPanel.cursorMove) {\n\t              // logic to decide whether to move up or not\n\t              return Pass.toString();\n\t            }\n\t          };\n\t        } else if (typeof extraKeys[key] === 'string') {\n\t          var command = extraKeys[key];\n\n\t          extraKeys[key] = function (codemirror) {\n\t            if (suggesterPanel.cursorMove) {\n\t              _this3.editor.editor.execCommand(command); // logic to decide whether to move up or not\n\t              // return Pass.toString();\n\n\t            }\n\t          };\n\t        }\n\t      });\n\n\t      this.editor.editor.setOption('extraKeys', extraKeys);\n\t      this.editor.editor.on('scroll', function (codemirror, evt) {\n\t        if (!_this3.searchCache) {\n\t          return;\n\t        } // 当编辑器滚动时触发\n\n\n\t        _this3.relocatePanel(_this3.editor.editor);\n\t      });\n\t      this.onClickPancelItem();\n\t    }\n\t  }, {\n\t    key: \"onClickPancelItem\",\n\t    value: function onClickPancelItem() {\n\t      var _this4 = this;\n\n\t      this.$suggesterPanel.addEventListener('click', function (evt) {\n\t        var idx = isChildNode(_this4.$suggesterPanel, evt.target);\n\n\t        if (idx > -1) {\n\t          _this4.pasteSelectResult(idx);\n\t        }\n\n\t        _this4.stopRelate();\n\t      }, false);\n\n\t      function isChildNode(parent, node) {\n\t        var _context8;\n\n\t        var res = -1;\n\n\t        forEach$3(_context8 = parent.childNodes).call(_context8, function (item, idx) {\n\t          return item === node ? res = idx : '';\n\t        });\n\n\t        return res;\n\t      }\n\t    }\n\t  }, {\n\t    key: \"showsuggesterPanel\",\n\t    value: function showsuggesterPanel(_ref2) {\n\t      var left = _ref2.left,\n\t          top = _ref2.top,\n\t          items = _ref2.items;\n\n\t      if (!this.$suggesterPanel && isBrowser()) {\n\t        document.body.appendChild(this.createDom(SuggesterPanel.panelWrap));\n\t        this.$suggesterPanel = document.querySelector('.cherry-suggester-panel');\n\t      }\n\n\t      this.updatePanel(items);\n\t      this.$suggesterPanel.style.left = \"\".concat(left, \"px\");\n\t      this.$suggesterPanel.style.top = \"\".concat(top, \"px\");\n\t      this.$suggesterPanel.style.display = 'block';\n\t      this.$suggesterPanel.style.position = 'absolute';\n\t      this.$suggesterPanel.style.zIndex = '100';\n\t    }\n\t  }, {\n\t    key: \"hidesuggesterPanel\",\n\t    value: function hidesuggesterPanel() {\n\t      // const $suggesterPanel = document.querySelector('.cherry-suggester-panel');\n\t      if (this.$suggesterPanel) {\n\t        this.$suggesterPanel.style.display = 'none';\n\t      }\n\t    }\n\t    /**\n\t     * 更新suggesterPanel\n\t     * @param {SuggestList} suggestList\n\t     */\n\n\t  }, {\n\t    key: \"updatePanel\",\n\t    value: function updatePanel(suggestList) {\n\t      var _this5 = this;\n\n\t      var defaultValue = map$3(suggestList).call(suggestList, function (suggest, idx) {\n\t        if (_typeof(suggest) === 'object' && suggest !== null) {\n\t          var renderContent = suggest.label;\n\n\t          if (suggest !== null && suggest !== void 0 && suggest.icon) {\n\t            var _context9;\n\n\t            renderContent = concat$5(_context9 = \"<i class=\\\"ch-icon ch-icon-\".concat(suggest.icon, \"\\\"></i>\")).call(_context9, renderContent);\n\t          }\n\n\t          return _this5.renderPanelItem(renderContent, idx === 0);\n\t        }\n\n\t        return _this5.renderPanelItem(suggest, idx === 0);\n\t      }).join('');\n\t      /**\n\t       * @type { SuggesterConfigItem }\n\t       */\n\n\n\t      var suggesterConfig = this.suggesterConfig[this.keyword]; // 用户自定义渲染逻辑 suggestListRender\n\n\t      if (suggesterConfig && typeof suggesterConfig.suggestListRender === 'function') {\n\t        defaultValue = suggesterConfig.suggestListRender.call(this, suggestList) || defaultValue;\n\t      }\n\n\t      this.$suggesterPanel.innerHTML = ''; // 清空\n\n\t      if (typeof defaultValue === 'string') {\n\t        this.$suggesterPanel.innerHTML = defaultValue;\n\t      } else if (isArray$8(defaultValue) && defaultValue.length > 0) {\n\t        forEach$3(defaultValue).call(defaultValue, function (item) {\n\t          _this5.$suggesterPanel.appendChild(item);\n\t        });\n\t      } else if (_typeof(defaultValue) === 'object' && defaultValue.nodeType === 1) {\n\t        this.$suggesterPanel.appendChild(defaultValue);\n\t      }\n\t    }\n\t    /**\n\t     * 渲染suggesterPanel item\n\t     * @param {string} item 渲染内容\n\t     * @param {boolean} selected 是否选中\n\t     * @returns {string} html\n\t     */\n\n\t  }, {\n\t    key: \"renderPanelItem\",\n\t    value: function renderPanelItem(item, selected) {\n\t      if (selected) {\n\t        return \"<div class=\\\"cherry-suggester-panel__item cherry-suggester-panel__item--selected\\\">\".concat(item, \"</div>\");\n\t      }\n\n\t      return \"<div class=\\\"cherry-suggester-panel__item\\\">\".concat(item, \"</div>\");\n\t    }\n\t  }, {\n\t    key: \"createDom\",\n\t    value: function createDom() {\n\t      var string = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';\n\n\t      if (!this.template) {\n\t        this.template = document.createElement('div');\n\t      }\n\n\t      this.template.innerHTML = trim$3(string).call(string); // Change this to div.childNodes to support multiple top-level nodes\n\n\t      var frag = document.createDocumentFragment();\n\n\t      map$3(Array.prototype).call(this.template.childNodes, function (item, idx) {\n\t        frag.appendChild(item);\n\t      });\n\n\t      return frag;\n\t    } // 面板重定位\n\n\t  }, {\n\t    key: \"relocatePanel\",\n\t    value: function relocatePanel(codemirror) {\n\t      var $cursor = document.querySelector('.CodeMirror-cursors .CodeMirror-cursor');\n\n\t      if (!$cursor) {\n\t        return false;\n\t      }\n\n\t      var pos = codemirror.getCursor();\n\t      var lineHeight = codemirror.lineInfo(pos.line).handle.height;\n\t      var rect = $cursor.getBoundingClientRect();\n\t      var top = rect.top + lineHeight;\n\t      var left = rect.left;\n\t      this.showsuggesterPanel({\n\t        left: left,\n\t        top: top,\n\t        items: this.optionList\n\t      });\n\t    }\n\t    /**\n\t     * 获取光标位置\n\t     * @param {CodeMirror} codemirror\n\t     * @returns {{ left: number, top: number }}\n\t     */\n\n\t  }, {\n\t    key: \"getCursorPos\",\n\t    value: function getCursorPos(codemirror) {\n\t      var $cursor = document.querySelector('.CodeMirror-cursors .CodeMirror-cursor');\n\t      if (!$cursor) return null;\n\t      var pos = codemirror.getCursor();\n\t      var lineHeight = codemirror.lineInfo(pos.line).handle.height;\n\t      var rect = $cursor.getBoundingClientRect();\n\t      var top = rect.top + lineHeight;\n\t      var left = rect.left;\n\t      return {\n\t        left: left,\n\t        top: top\n\t      };\n\t    } // 开启关联\n\n\t  }, {\n\t    key: \"startRelate\",\n\t    value: function startRelate(codemirror, keyword, from) {\n\t      this.cursorFrom = from;\n\t      this.keyword = keyword;\n\t      this.searchCache = true;\n\t      this.relocatePanel(codemirror);\n\t    } // 关闭关联\n\n\t  }, {\n\t    key: \"stopRelate\",\n\t    value: function stopRelate() {\n\t      this.hidesuggesterPanel();\n\t      this.cursorFrom = null;\n\t      this.cursorTo = null;\n\t      this.keyword = '';\n\t      this.searchKeyCache = [];\n\t      this.searchCache = false;\n\t      this.cursorMove = true;\n\t      this.optionList = [];\n\t    }\n\t    /**\n\t     * 粘贴选择结果\n\t     * @param {number} idx 选择的结果索引\n\t     * @param {KeyboardEvent} evt 键盘事件\n\t     */\n\n\t  }, {\n\t    key: \"pasteSelectResult\",\n\t    value: function pasteSelectResult(idx, evt) {\n\t      if (!this.cursorTo) {\n\t        this.cursorTo = JSON.parse(stringify$2(this.cursorFrom));\n\t      }\n\n\t      if (!this.cursorTo) {\n\t        return;\n\t      }\n\n\t      this.cursorTo.ch += 1;\n\t      var cursorFrom = this.cursorFrom,\n\t          cursorTo = this.cursorTo; // 缓存光标位置\n\n\t      if (this.optionList[idx]) {\n\t        var result = '';\n\n\t        if (_typeof(this.optionList[idx]) === 'object' && this.optionList[idx] !== null && typeof this.optionList[idx].value === 'string') {\n\t          result = this.optionList[idx].value;\n\t        }\n\n\t        if (_typeof(this.optionList[idx]) === 'object' && this.optionList[idx] !== null && typeof this.optionList[idx].value === 'function') {\n\t          result = this.optionList[idx].value();\n\t        }\n\n\t        if (typeof this.optionList[idx] === 'string') {\n\t          var _context10;\n\n\t          result = concat$5(_context10 = \" \".concat(this.keyword)).call(_context10, this.optionList[idx], \" \");\n\t        } // this.cursorTo.ch = this.cursorFrom.ch + result.length;\n\n\n\t        if (result) {\n\t          this.editor.editor.replaceRange(result, cursorFrom, cursorTo);\n\t        }\n\t      }\n\t    }\n\t    /**\n\t     * 寻找当前选中项的索引\n\t     * @returns {number}\n\t     */\n\n\t  }, {\n\t    key: \"findSelectedItemIndex\",\n\t    value: function findSelectedItemIndex() {\n\t      return findIndex$3(Array.prototype).call(this.$suggesterPanel.childNodes, function (item) {\n\t        return item.classList.contains('cherry-suggester-panel__item--selected');\n\t      });\n\t    }\n\t  }, {\n\t    key: \"enableRelate\",\n\t    value: function enableRelate() {\n\t      return this.searchCache;\n\t    }\n\t    /**\n\t     *  codeMirror change事件\n\t     * @param {CodeMirror.Editor} codemirror\n\t     * @param {CodeMirror.EditorChange} evt\n\t     * @returns\n\t     */\n\n\t  }, {\n\t    key: \"onCodeMirrorChange\",\n\t    value: function onCodeMirrorChange(codemirror, evt) {\n\t      var _this6 = this;\n\n\t      var text = evt.text,\n\t          from = evt.from,\n\t          to = evt.to,\n\t          origin = evt.origin;\n\t      var changeValue = text.length === 1 ? text[0] : ''; // 首次输入命中关键词的时候开启联想\n\n\t      if (!this.enableRelate() && this.suggesterConfig[changeValue]) {\n\t        this.startRelate(codemirror, changeValue, from);\n\t      }\n\n\t      if (this.enableRelate() && (changeValue || origin === '+delete')) {\n\t        var _this$suggesterConfig;\n\n\t        this.cursorTo = to;\n\n\t        if (changeValue) {\n\t          this.searchKeyCache.push(changeValue);\n\t        } else if (origin === '+delete') {\n\t          this.searchKeyCache.pop();\n\n\t          if (this.searchKeyCache.length === 0) {\n\t            this.stopRelate();\n\t            return;\n\t          }\n\t        } // 展示推荐列表\n\n\n\t        if (typeof ((_this$suggesterConfig = this.suggesterConfig[this.keyword]) === null || _this$suggesterConfig === void 0 ? void 0 : _this$suggesterConfig.suggestList) === 'function') {\n\t          // 请求api 返回结果拼凑\n\t          this.suggesterConfig[this.keyword].suggestList(this.searchKeyCache.join(''), function (res) {\n\t            // 如果返回了false，则强制退出联想\n\t            if (res === false) {\n\t              _this6.stopRelate();\n\n\t              return;\n\t            } // 回显命中的结果\n\n\n\t            _this6.optionList = !res || !res.length ? [] : res;\n\n\t            _this6.updatePanel(_this6.optionList);\n\t          });\n\t        }\n\t      }\n\t    }\n\t    /**\n\t     * 监听方向键选择 options\n\t     * @param {CodeMirror.Editor} codemirror\n\t     * @param {KeyboardEvent} evt\n\t     */\n\n\t  }, {\n\t    key: \"onKeyDown\",\n\t    value: function onKeyDown(codemirror, evt) {\n\t      var _context11,\n\t          _this7 = this;\n\n\t      if (!this.$suggesterPanel) {\n\t        return false;\n\t      }\n\n\t      var keyCode = evt.keyCode; // up down\n\n\t      if (includes$4(_context11 = [38, 40]).call(_context11, keyCode)) {\n\t        this.cursorMove = false;\n\t        var selectedItem = this.$suggesterPanel.querySelector('.cherry-suggester-panel__item--selected');\n\t        var nextElement = null;\n\n\t        if (keyCode === 38 && !selectedItem.previousElementSibling) {\n\t          nextElement = this.$suggesterPanel.lastElementChild; // codemirror.focus();\n\t        } else if (keyCode === 40 && !selectedItem.nextElementSibling) {\n\t          nextElement = this.$suggesterPanel.firstElementChild; // codemirror.focus();\n\t        } else {\n\t          if (keyCode === 38) {\n\t            nextElement = selectedItem.previousElementSibling;\n\t          } else if (keyCode === 40) {\n\t            nextElement = selectedItem.nextElementSibling;\n\t          }\n\t        }\n\n\t        selectedItem.classList.remove('cherry-suggester-panel__item--selected');\n\t        nextElement.classList.add('cherry-suggester-panel__item--selected');\n\t      } else if (keyCode === 13) {\n\t        evt.stopPropagation();\n\t        this.cursorMove = false;\n\t        this.pasteSelectResult(this.findSelectedItemIndex(), evt);\n\t        codemirror.focus(); // const cache = JSON.parse(JSON.stringify(this.cursorTo));\n\t        // setTimeout(() => {\n\t        //   codemirror.setCursor(cache);\n\t        // }, 100);\n\n\t        setTimeout$3(function () {\n\t          _this7.stopRelate();\n\t        }, 0);\n\t      } else if (keyCode === 27) {\n\t        // 按下esc的时候退出联想\n\t        evt.stopPropagation();\n\t        codemirror.focus();\n\n\t        setTimeout$3(function () {\n\t          _this7.stopRelate();\n\t        }, 0);\n\t      }\n\t    }\n\t  }]);\n\n\t  return SuggesterPanel;\n\t}();\n\n\t_defineProperty(SuggesterPanel, \"panelWrap\", \"<div class=\\\"cherry-suggester-panel\\\"></div>\");\n\n\tvar suggesterPanel = new SuggesterPanel();\n\n\tfunction _createSuper$w(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$w(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = construct$4(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\n\tfunction _isNativeReflectConstruct$w() { if (typeof Reflect === \"undefined\" || !construct$4) return false; if (construct$4.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(construct$4(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\n\tvar Ruby = /*#__PURE__*/function (_SyntaxBase) {\n\t  _inherits(Ruby, _SyntaxBase);\n\n\t  var _super = _createSuper$w(Ruby);\n\n\t  function Ruby() {\n\t    _classCallCheck(this, Ruby);\n\n\t    return _super.apply(this, arguments);\n\t  }\n\n\t  _createClass(Ruby, [{\n\t    key: \"makeHtml\",\n\t    value: function makeHtml(str) {\n\t      if (!this.test(str)) {\n\t        return str;\n\t      }\n\n\t      return str.replace(this.RULE.reg, \"$1<ruby>$2<rt>$3</rt></ruby>$4\");\n\t    }\n\t  }, {\n\t    key: \"rule\",\n\t    value: function rule() {\n\t      var ret = {\n\t        begin: '(^| )\\\\{',\n\t        end: '\\\\}( |$)',\n\t        content: '([^\\n]+?)\\\\|([^\\n]+?)'\n\t      };\n\t      ret.reg = new RegExp(ret.begin + ret.content + ret.end, 'g');\n\t      return ret;\n\t    }\n\t  }]);\n\n\t  return Ruby;\n\t}(SyntaxBase);\n\n\t_defineProperty(Ruby, \"HOOK_NAME\", 'ruby');\n\n\tfunction _createSuper$x(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$x(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = construct$4(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\n\tfunction _isNativeReflectConstruct$x() { if (typeof Reflect === \"undefined\" || !construct$4) return false; if (construct$4.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(construct$4(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\t/**\n\t * 面板语法\n\t * 例：\n\t *  :::tip\n\t *  这是一段提示信息\n\t *  :::\n\t *  :::warning\n\t *  这是一段警告信息\n\t *  :::\n\t *  :::danger\n\t *  这是一段危险信息\n\t *  :::\n\t */\n\n\tvar Panel = /*#__PURE__*/function (_ParagraphBase) {\n\t  _inherits(Panel, _ParagraphBase);\n\n\t  var _super = _createSuper$x(Panel);\n\n\t  function Panel(options) {\n\t    var _this;\n\n\t    _classCallCheck(this, Panel);\n\n\t    _this = _super.call(this, {\n\t      needCache: true\n\t    });\n\n\t    _this.initBrReg(options.globalConfig.classicBr);\n\n\t    return _this;\n\t  }\n\n\t  _createClass(Panel, [{\n\t    key: \"makeHtml\",\n\t    value: function makeHtml(str, sentenceMakeFunc) {\n\t      var _this2 = this;\n\n\t      return str.replace(this.RULE.reg, function (match, preLines, name, content) {\n\t        var _context, _context2, _context3, _context4, _context5;\n\n\t        var lineCount = _this2.getLineCount(match, preLines);\n\n\t        var sign = _this2.$engine.md5(match);\n\n\t        var _this2$$getPanelInfo = _this2.$getPanelInfo(name, content, sentenceMakeFunc),\n\t            title = _this2$$getPanelInfo.title,\n\t            body = _this2$$getPanelInfo.body,\n\t            appendStyle = _this2$$getPanelInfo.appendStyle,\n\t            className = _this2$$getPanelInfo.className;\n\n\t        var ret = _this2.pushCache(concat$5(_context = concat$5(_context2 = concat$5(_context3 = concat$5(_context4 = concat$5(_context5 = \"<div class=\\\"\".concat(className, \"\\\" data-sign=\\\"\")).call(_context5, sign, \"\\\" data-lines=\\\"\")).call(_context4, lineCount, \"\\\" \")).call(_context3, appendStyle, \">\")).call(_context2, title)).call(_context, body, \"</div>\"), sign, lineCount);\n\n\t        return prependLineFeedForParagraph(match, ret);\n\t      });\n\t    }\n\t  }, {\n\t    key: \"$getClassByType\",\n\t    value: function $getClassByType(type) {\n\t      if (/(left|right|center)/i.test(type)) {\n\t        return \"cherry-text-align cherry-text-align__\".concat(type);\n\t      }\n\n\t      return \"cherry-panel cherry-panel__\".concat(type);\n\t    }\n\t  }, {\n\t    key: \"$getPanelInfo\",\n\t    value: function $getPanelInfo(name, str, sentenceMakeFunc) {\n\t      var _context6,\n\t          _this3 = this;\n\n\t      var ret = {\n\t        type: this.$getTargetType(name),\n\t        title: sentenceMakeFunc(this.$getTitle(name)).html,\n\t        body: str,\n\t        appendStyle: '',\n\t        className: ''\n\t      };\n\t      ret.className = this.$getClassByType(ret.type);\n\n\t      if (/(left|right|center)/i.test(ret.type)) {\n\t        ret.appendStyle = \"style=\\\"text-align:\".concat(ret.type, \";\\\"\");\n\t      }\n\n\t      ret.title = concat$5(_context6 = \"<div class=\\\"cherry-panel--title \".concat(ret.title ? 'cherry-panel--title__not-empty' : '', \"\\\">\")).call(_context6, ret.title, \"</div>\");\n\n\t      var paragraphProcessor = function paragraphProcessor(str) {\n\t        var _context7, _context8;\n\n\t        if (trim$3(str).call(str) === '') {\n\t          return '';\n\t        } // 调用行内语法，获得段落的签名和对应html内容\n\n\n\t        var _sentenceMakeFunc = sentenceMakeFunc(str),\n\t            html = _sentenceMakeFunc.html;\n\n\t        var domName = 'p'; // 如果包含html块级标签（比如div、blockquote等），则当前段落外层用div包裹，反之用p包裹\n\n\t        var isContainBlockTest = new RegExp(\"<(\".concat(blockNames, \")[^>]*>\"), 'i');\n\n\t        if (isContainBlockTest.test(html)) {\n\t          domName = 'div';\n\t        }\n\n\t        return concat$5(_context7 = concat$5(_context8 = \"<\".concat(domName, \">\")).call(_context8, _this3.$cleanParagraph(html), \"</\")).call(_context7, domName, \">\");\n\t      };\n\n\t      var $body = '';\n\n\t      if (this.isContainsCache(ret.body)) {\n\t        $body = this.makeExcludingCached(ret.body, paragraphProcessor);\n\t      } else {\n\t        $body = paragraphProcessor(ret.body);\n\t      }\n\n\t      ret.body = \"<div class=\\\"cherry-panel--body\\\">\".concat($body, \"</div>\");\n\t      return ret;\n\t    }\n\t  }, {\n\t    key: \"$getTitle\",\n\t    value: function $getTitle(name) {\n\t      var $name = trim$3(name).call(name);\n\n\t      return /\\s/.test($name) ? $name.replace(/[^\\s]+\\s/, '') : '';\n\t    }\n\t  }, {\n\t    key: \"$getTargetType\",\n\t    value: function $getTargetType(name) {\n\t      var $name = /\\s/.test(trim$3(name).call(name)) ? trim$3(name).call(name).replace(/\\s.*$/, '') : name;\n\n\t      switch (trim$3($name).call($name).toLowerCase()) {\n\t        case 'primary':\n\t        case 'p':\n\t          return 'primary';\n\n\t        case 'info':\n\t        case 'i':\n\t          return 'info';\n\n\t        case 'warning':\n\t        case 'w':\n\t          return 'warning';\n\n\t        case 'danger':\n\t        case 'd':\n\t          return 'danger';\n\n\t        case 'success':\n\t        case 's':\n\t          return 'success';\n\n\t        case 'right':\n\t        case 'r':\n\t          return 'right';\n\n\t        case 'center':\n\t        case 'c':\n\t          return 'center';\n\n\t        case 'left':\n\t        case 'l':\n\t          return 'left';\n\n\t        default:\n\t          return 'primary';\n\t      }\n\t    }\n\t  }, {\n\t    key: \"rule\",\n\t    value: function rule() {\n\t      return getPanelRule();\n\t    }\n\t  }]);\n\n\t  return Panel;\n\t}(ParagraphBase);\n\n\t_defineProperty(Panel, \"HOOK_NAME\", 'panel');\n\n\tfunction _createSuper$y(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$y(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = construct$4(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\n\tfunction _isNativeReflectConstruct$y() { if (typeof Reflect === \"undefined\" || !construct$4) return false; if (construct$4.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(construct$4(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\t/**\n\t * +++(-) 点击查看详情\n\t * body\n\t * body\n\t * ++ 标题（默认收起内容）\n\t * 内容\n\t * ++- 标题（默认展开内容）\n\t * 内容2\n\t * +++\n\t */\n\n\tvar Detail = /*#__PURE__*/function (_ParagraphBase) {\n\t  _inherits(Detail, _ParagraphBase);\n\n\t  var _super = _createSuper$y(Detail);\n\n\t  function Detail() {\n\t    _classCallCheck(this, Detail);\n\n\t    return _super.call(this, {\n\t      needCache: true\n\t    });\n\t  }\n\n\t  _createClass(Detail, [{\n\t    key: \"makeHtml\",\n\t    value: function makeHtml(str, sentenceMakeFunc) {\n\t      var _this = this;\n\n\t      return str.replace(this.RULE.reg, function (match, preLines, isOpen, title, content) {\n\t        var _context, _context2, _context3;\n\n\t        var lineCount = _this.getLineCount(match, preLines);\n\n\t        var sign = _this.$engine.md5(match);\n\n\t        var _this$$getDetailInfo = _this.$getDetailInfo(isOpen, title, content, sentenceMakeFunc),\n\t            type = _this$$getDetailInfo.type,\n\t            html = _this$$getDetailInfo.html;\n\n\t        var ret = _this.pushCache(concat$5(_context = concat$5(_context2 = concat$5(_context3 = \"<div class=\\\"cherry-detail cherry-detail__\".concat(type, \"\\\" data-sign=\\\"\")).call(_context3, sign, \"\\\" data-lines=\\\"\")).call(_context2, lineCount, \"\\\" >\")).call(_context, html, \"</div>\"), sign, lineCount);\n\n\t        return prependLineFeedForParagraph(match, ret);\n\t      });\n\t    }\n\t  }, {\n\t    key: \"$getDetailInfo\",\n\t    value: function $getDetailInfo(isOpen, title, str, sentenceMakeFunc) {\n\t      var _this2 = this;\n\n\t      var type = /\\n\\s*(\\+\\+|\\+\\+-)\\s*[^\\n]+\\n/.test(str) ? 'multiple' : 'single';\n\t      var arr = str.split(/\\n\\s*(\\+\\+[-]{0,1}\\s*[^\\n]+)\\n/);\n\t      var defaultOpen = isOpen === '-';\n\t      var currentTitle = title;\n\t      var html = '';\n\n\t      if (type === 'multiple') {\n\t        forEach$3(arr).call(arr, function (item) {\n\t          if (/\\+\\+/.test(item)) {\n\t            defaultOpen = /\\+\\+-/.test(item);\n\t            currentTitle = item.replace(/\\+\\+[-]{0,1}\\s*([^\\n]+)$/, '$1');\n\t            return true;\n\t          }\n\n\t          html += _this2.$getDetailHtml(defaultOpen, currentTitle, item, sentenceMakeFunc);\n\t        });\n\t      } else {\n\t        html = this.$getDetailHtml(defaultOpen, currentTitle, str, sentenceMakeFunc);\n\t      }\n\n\t      return {\n\t        type: type,\n\t        html: html\n\t      };\n\t    }\n\t  }, {\n\t    key: \"$getDetailHtml\",\n\t    value: function $getDetailHtml(defaultOpen, title, str, sentenceMakeFunc) {\n\t      var _this3 = this;\n\n\t      var ret = \"<details \".concat(defaultOpen ? 'open' : '', \">\");\n\n\t      var paragraphProcessor = function paragraphProcessor(str) {\n\t        var _context4, _context5;\n\n\t        if (trim$3(str).call(str) === '') {\n\t          return '';\n\t        } // 调用行内语法，获得段落的签名和对应html内容\n\n\n\t        var _sentenceMakeFunc = sentenceMakeFunc(str),\n\t            html = _sentenceMakeFunc.html;\n\n\t        var domName = 'p'; // 如果包含html块级标签（比如div、blockquote等），则当前段落外层用div包裹，反之用p包裹\n\n\t        var isContainBlockTest = new RegExp(\"<(\".concat(blockNames, \")[^>]*>\"), 'i');\n\n\t        if (isContainBlockTest.test(html)) {\n\t          domName = 'div';\n\t        }\n\n\t        return concat$5(_context4 = concat$5(_context5 = \"<\".concat(domName, \">\")).call(_context5, _this3.$cleanParagraph(html), \"</\")).call(_context4, domName, \">\");\n\t      };\n\n\t      ret += \"<summary>\".concat(sentenceMakeFunc(title).html, \"</summary>\");\n\t      var $body = '';\n\n\t      if (this.isContainsCache(str)) {\n\t        $body = this.makeExcludingCached(str, paragraphProcessor);\n\t      } else {\n\t        $body = paragraphProcessor(str);\n\t      }\n\n\t      ret += \"<div class=\\\"cherry-detail-body\\\">\".concat($body, \"</div>\");\n\t      ret += \"</details>\";\n\t      return ret;\n\t    }\n\t  }, {\n\t    key: \"rule\",\n\t    value: function rule() {\n\t      return getDetailRule();\n\t    }\n\t  }]);\n\n\t  return Detail;\n\t}(ParagraphBase);\n\n\t_defineProperty(Detail, \"HOOK_NAME\", 'detail');\n\n\t/**\n\t * Copyright (C) 2021 THL A29 Limited, a Tencent company.\n\t *\n\t * Licensed under the Apache License, Version 2.0 (the \"License\");\n\t * you may not use this file except in compliance with the License.\n\t * You may obtain a copy of the License at\n\t *\n\t *     http://www.apache.org/licenses/LICENSE-2.0\n\t *\n\t * Unless required by applicable law or agreed to in writing, software\n\t * distributed under the License is distributed on an \"AS IS\" BASIS,\n\t * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n\t * See the License for the specific language governing permissions and\n\t * limitations under the License.\n\t */\n\t/**\n\t * 引擎各语法的配置\n\t * 主要决定支持哪些语法，以及各语法的执行顺序\n\t */\n\n\tvar hooksConfig = [// 段落级 Hook\n\t// 引擎会按当前排序顺序执行beforeMake、makeHtml方法\n\t// 引擎会按当前排序逆序执行afterMake方法\n\tCodeBlock, InlineCode, MathBlock, InlineMath, HtmlBlock, Footnote, CommentReference, Transfer, Br, Table, Blockquote, Toc, Header, // 处理标题, 传入strict属性严格要求ATX风格标题#后带空格\n\tHr, List, Detail, Panel, Paragraph, // 普通段落\n\t// 行内Hook\n\t// 引擎会按当前顺序执行makeHtml方法\n\tEmoji, Image$1, Link, AutoLink, Emphasis, BackgroundColor, Color, Size, Sub, Sup, Ruby, Strikethrough, Underline, HighLight, Suggester];\n\n\tvar Engine = /*#__PURE__*/function () {\n\t  /**\n\t   *\n\t   * @param {Partial<import('./Cherry').CherryOptions>} markdownParams 初始化Cherry时传入的选项\n\t   * @param {import('./Cherry').default} cherry Cherry实例\n\t   */\n\t  function Engine(markdownParams, cherry) {\n\t    _classCallCheck(this, Engine);\n\n\t    this.$cherry = cherry; // Deprecated\n\n\t    defineProperty$5(this, '_cherry', {\n\t      get: function get() {\n\t        Logger.warn('`_engine._cherry` is deprecated. Use `$engine.$cherry` instead.');\n\t        return this.$cherry;\n\t      }\n\t    });\n\n\t    this.initMath(markdownParams);\n\t    this.$configInit(markdownParams);\n\t    this.hookCenter = new HookCenter(hooksConfig, markdownParams, cherry);\n\t    this.hooks = this.hookCenter.getHookList();\n\t    this.md5Cache = {};\n\t    this.md5StrMap = {};\n\t    this.markdownParams = markdownParams;\n\t    this.currentStrMd5 = [];\n\t    this.htmlWhiteListAppend = markdownParams.engine.global.htmlWhiteList;\n\t  }\n\n\t  _createClass(Engine, [{\n\t    key: \"initMath\",\n\t    value: function initMath(opts) {\n\t      // 无论MathJax还是Katex，都可以先进行MathJax配置\n\t      var externals = opts.externals,\n\t          engine = opts.engine;\n\t      var syntax = engine.syntax;\n\t      var plugins = syntax.mathBlock.plugins; // 未开启公式\n\n\t      if (!isBrowser() || !syntax.mathBlock.src && !syntax.inlineMath.src) {\n\t        return;\n\t      } // 已经加载过MathJax\n\n\n\t      if (externals.MathJax || window.MathJax) {\n\t        return;\n\t      }\n\n\t      configureMathJax(plugins); // 等待MathJax各种插件加载\n\n\t      var script = document.createElement('script');\n\t      script.src = syntax.mathBlock.src ? syntax.mathBlock.src : syntax.inlineMath.src;\n\t      script.async = true;\n\t      if (script.src) document.head.appendChild(script);\n\t    }\n\t  }, {\n\t    key: \"$configInit\",\n\t    value: function $configInit(params) {\n\t      if (params.hooksConfig && $expectTarget(params.hooksConfig.hooksList, Array)) {\n\t        for (var key = 0; key < params.hooksConfig.hooksList.length; key++) {\n\t          var hook = params.hooksConfig.hooksList[key];\n\n\t          try {\n\t            if (hook.getType() === 'sentence') {\n\t              $expectInherit(hook, SyntaxBase);\n\t            }\n\n\t            if (hook.getType() === 'paragraph') {\n\t              $expectInherit(hook, ParagraphBase);\n\t            }\n\n\t            $expectInstance(hook);\n\t            hooksConfig.push(hook);\n\t          } catch (e) {\n\t            throw new Error('the hook does not correctly inherit');\n\t          }\n\t        }\n\t      }\n\t    }\n\t  }, {\n\t    key: \"$beforeMakeHtml\",\n\t    value: function $beforeMakeHtml(str) {\n\t      var $str = str.replace(/~/g, '~T');\n\t      $str = $str.replace(/\\$/g, '~D');\n\t      $str = $str.replace(/\\r\\n/g, '\\n'); // DOS to Unix\n\n\t      $str = $str.replace(/\\r/g, '\\n'); // Mac to Unix\n\t      // 避免正则性能问题，如/.+\\n/.test(' '.repeat(99999)), 回溯次数过多\n\t      // 参考文章：http://www.alloyteam.com/2019/07/13574/\n\n\t      if ($str[$str.length - 1] !== '\\n') {\n\t        $str += '\\n';\n\t      }\n\n\t      $str = this.$fireHookAction($str, 'sentence', 'beforeMakeHtml');\n\t      $str = this.$fireHookAction($str, 'paragraph', 'beforeMakeHtml');\n\t      return $str;\n\t    }\n\t  }, {\n\t    key: \"$afterMakeHtml\",\n\t    value: function $afterMakeHtml(str) {\n\t      var $str = this.$fireHookAction(str, 'paragraph', 'afterMakeHtml'); // str = this._fireHookAction(str, 'sentence', 'afterMakeHtml');\n\n\t      $str = $str.replace(/~D/g, '$');\n\t      $str = $str.replace(/~T/g, '~');\n\t      $str = $str.replace(/\\\\<\\//g, '\\\\ </');\n\t      $str = $str.replace(new RegExp(\"\\\\\\\\(\".concat(PUNCTUATION, \")\"), 'g'), function (match, escapeChar) {\n\t        if (escapeChar === '&') {\n\t          // & 字符需要特殊处理\n\t          return match;\n\t        }\n\n\t        return escapeHTMLSpecialChar(escapeChar);\n\t      }).replace(/\\\\&(?!(amp|lt|gt|quot|apos);)/, function () {\n\t        return '&amp;';\n\t      });\n\t      $str = $str.replace(/\\\\ <\\//g, '\\\\</');\n\t      $str = $str.replace(/id=\"safe_(?=.*?\")/g, 'id=\"'); // transform header id to avoid being sanitized\n\n\t      $str = UrlCache.restoreAll($str);\n\t      return $str;\n\t    }\n\t  }, {\n\t    key: \"$dealSentenceByCache\",\n\t    value: function $dealSentenceByCache(md) {\n\t      var _this = this;\n\n\t      return this.$checkCache(md, function (str) {\n\t        return _this.$dealSentence(str);\n\t      });\n\t    }\n\t  }, {\n\t    key: \"$dealSentence\",\n\t    value: function $dealSentence(md) {\n\t      var _context;\n\n\t      return this.$fireHookAction(md, 'sentence', 'makeHtml', bind$5(_context = this.$dealSentenceByCache).call(_context, this));\n\t    }\n\t  }, {\n\t    key: \"$fireHookAction\",\n\t    value: function $fireHookAction(md, type, action, actionArgs) {\n\t      var _this2 = this;\n\n\t      var $md = md;\n\t      var method = action === 'afterMakeHtml' ? 'reduceRight' : 'reduce';\n\n\t      if (!this.hooks && !this.hooks[type] && !this.hooks[type][method]) {\n\t        return $md;\n\t      }\n\n\t      try {\n\t        $md = this.hooks[type][method](function (newMd, oneHook) {\n\t          if (!oneHook.$engine) {\n\t            oneHook.$engine = _this2; // Deprecated\n\n\t            defineProperty$5(oneHook, '_engine', {\n\t              get: function get() {\n\t                Logger.warn('`this._engine` is deprecated. Use `this.$engine` instead.');\n\t                return this.$engine;\n\t              }\n\t            });\n\t          }\n\n\t          if (!oneHook[action]) {\n\t            return newMd;\n\t          }\n\n\t          return oneHook[action](newMd, actionArgs, _this2.markdownParams);\n\t        }, $md);\n\t      } catch (e) {\n\t        throw new NestedError(e);\n\t      }\n\n\t      return $md;\n\t    }\n\t  }, {\n\t    key: \"md5\",\n\t    value: function md5$1(str) {\n\t      if (!this.md5StrMap[str]) {\n\t        this.md5StrMap[str] = md5(str);\n\t      }\n\n\t      return this.md5StrMap[str];\n\t    }\n\t  }, {\n\t    key: \"$checkCache\",\n\t    value: function $checkCache(str, func) {\n\t      var sign = this.md5(str);\n\n\t      if (typeof this.md5Cache[sign] === 'undefined') {\n\t        this.md5Cache[sign] = func(str);\n\n\t        {\n\t          // 生产环境屏蔽\n\t          // Logger.log('markdown引擎渲染了：', str);\n\t        }\n\t      }\n\n\t      return {\n\t        sign: sign,\n\t        html: this.md5Cache[sign]\n\t      };\n\t    }\n\t  }, {\n\t    key: \"$dealParagraph\",\n\t    value: function $dealParagraph(md) {\n\t      var _context2;\n\n\t      return this.$fireHookAction(md, 'paragraph', 'makeHtml', bind$5(_context2 = this.$dealSentenceByCache).call(_context2, this));\n\t    }\n\t  }, {\n\t    key: \"makeHtml\",\n\t    value: function makeHtml(md) {\n\t      var $md = this.$beforeMakeHtml(md);\n\t      $md = this.$dealParagraph($md);\n\t      $md = this.$afterMakeHtml($md);\n\t      return $md;\n\t    }\n\t  }, {\n\t    key: \"mounted\",\n\t    value: function mounted() {\n\t      this.$fireHookAction('', 'sentence', 'mounted');\n\t      this.$fireHookAction('', 'paragraph', 'mounted'); // UrlCache.clear();\n\t    }\n\t  }, {\n\t    key: \"makeMarkdown\",\n\t    value: function makeMarkdown(html) {\n\t      return htmlParser.run(html);\n\t    }\n\t  }]);\n\n\t  return Engine;\n\t}();\n\n\tvar nativeIsArray = Array.isArray;\n\tvar toString$3 = Object.prototype.toString;\n\n\tvar xIsArray = nativeIsArray || isArray$9;\n\n\tfunction isArray$9(obj) {\n\t    return toString$3.call(obj) === \"[object Array]\"\n\t}\n\n\tvar version$1 = \"2\";\n\n\tvar isVnode = isVirtualNode;\n\n\tfunction isVirtualNode(x) {\n\t    return x && x.type === \"VirtualNode\" && x.version === version$1\n\t}\n\n\tvar isWidget_1 = isWidget;\n\n\tfunction isWidget(w) {\n\t    return w && w.type === \"Widget\"\n\t}\n\n\tvar isThunk_1 = isThunk;\n\n\tfunction isThunk(t) {\n\t    return t && t.type === \"Thunk\"\n\t}\n\n\tvar isVhook = isHook;\n\n\tfunction isHook(hook) {\n\t    return hook &&\n\t      (typeof hook.hook === \"function\" && !hook.hasOwnProperty(\"hook\") ||\n\t       typeof hook.unhook === \"function\" && !hook.hasOwnProperty(\"unhook\"))\n\t}\n\n\tvar vnode = VirtualNode;\n\n\tvar noProperties = {};\n\tvar noChildren = [];\n\n\tfunction VirtualNode(tagName, properties, children, key, namespace) {\n\t    this.tagName = tagName;\n\t    this.properties = properties || noProperties;\n\t    this.children = children || noChildren;\n\t    this.key = key != null ? String(key) : undefined;\n\t    this.namespace = (typeof namespace === \"string\") ? namespace : null;\n\n\t    var count = (children && children.length) || 0;\n\t    var descendants = 0;\n\t    var hasWidgets = false;\n\t    var hasThunks = false;\n\t    var descendantHooks = false;\n\t    var hooks;\n\n\t    for (var propName in properties) {\n\t        if (properties.hasOwnProperty(propName)) {\n\t            var property = properties[propName];\n\t            if (isVhook(property) && property.unhook) {\n\t                if (!hooks) {\n\t                    hooks = {};\n\t                }\n\n\t                hooks[propName] = property;\n\t            }\n\t        }\n\t    }\n\n\t    for (var i = 0; i < count; i++) {\n\t        var child = children[i];\n\t        if (isVnode(child)) {\n\t            descendants += child.count || 0;\n\n\t            if (!hasWidgets && child.hasWidgets) {\n\t                hasWidgets = true;\n\t            }\n\n\t            if (!hasThunks && child.hasThunks) {\n\t                hasThunks = true;\n\t            }\n\n\t            if (!descendantHooks && (child.hooks || child.descendantHooks)) {\n\t                descendantHooks = true;\n\t            }\n\t        } else if (!hasWidgets && isWidget_1(child)) {\n\t            if (typeof child.destroy === \"function\") {\n\t                hasWidgets = true;\n\t            }\n\t        } else if (!hasThunks && isThunk_1(child)) {\n\t            hasThunks = true;\n\t        }\n\t    }\n\n\t    this.count = count + descendants;\n\t    this.hasWidgets = hasWidgets;\n\t    this.hasThunks = hasThunks;\n\t    this.hooks = hooks;\n\t    this.descendantHooks = descendantHooks;\n\t}\n\n\tVirtualNode.prototype.version = version$1;\n\tVirtualNode.prototype.type = \"VirtualNode\";\n\n\tvar vtext = VirtualText;\n\n\tfunction VirtualText(text) {\n\t    this.text = String(text);\n\t}\n\n\tVirtualText.prototype.version = version$1;\n\tVirtualText.prototype.type = \"VirtualText\";\n\n\tvar isVtext = isVirtualText;\n\n\tfunction isVirtualText(x) {\n\t    return x && x.type === \"VirtualText\" && x.version === version$1\n\t}\n\n\t/*!\n\t * Cross-Browser Split 1.1.1\n\t * Copyright 2007-2012 Steven Levithan <stevenlevithan.com>\n\t * Available under the MIT License\n\t * ECMAScript compliant, uniform cross-browser split method\n\t */\n\n\t/**\n\t * Splits a string into an array of strings using a regex or string separator. Matches of the\n\t * separator are not included in the result array. However, if `separator` is a regex that contains\n\t * capturing groups, backreferences are spliced into the result each time `separator` is matched.\n\t * Fixes browser bugs compared to the native `String.prototype.split` and can be used reliably\n\t * cross-browser.\n\t * @param {String} str String to split.\n\t * @param {RegExp|String} separator Regex or string to use for separating the string.\n\t * @param {Number} [limit] Maximum number of items to include in the result array.\n\t * @returns {Array} Array of substrings.\n\t * @example\n\t *\n\t * // Basic use\n\t * split('a b c d', ' ');\n\t * // -> ['a', 'b', 'c', 'd']\n\t *\n\t * // With limit\n\t * split('a b c d', ' ', 2);\n\t * // -> ['a', 'b']\n\t *\n\t * // Backreferences in result array\n\t * split('..word1 word2..', /([a-z]+)(\\d+)/i);\n\t * // -> ['..', 'word', '1', ' ', 'word', '2', '..']\n\t */\n\tvar browserSplit = (function split(undef) {\n\n\t  var nativeSplit = String.prototype.split,\n\t    compliantExecNpcg = /()??/.exec(\"\")[1] === undef,\n\t    // NPCG: nonparticipating capturing group\n\t    self;\n\n\t  self = function(str, separator, limit) {\n\t    // If `separator` is not a regex, use `nativeSplit`\n\t    if (Object.prototype.toString.call(separator) !== \"[object RegExp]\") {\n\t      return nativeSplit.call(str, separator, limit);\n\t    }\n\t    var output = [],\n\t      flags = (separator.ignoreCase ? \"i\" : \"\") + (separator.multiline ? \"m\" : \"\") + (separator.extended ? \"x\" : \"\") + // Proposed for ES6\n\t      (separator.sticky ? \"y\" : \"\"),\n\t      // Firefox 3+\n\t      lastLastIndex = 0,\n\t      // Make `global` and avoid `lastIndex` issues by working with a copy\n\t      separator = new RegExp(separator.source, flags + \"g\"),\n\t      separator2, match, lastIndex, lastLength;\n\t    str += \"\"; // Type-convert\n\t    if (!compliantExecNpcg) {\n\t      // Doesn't need flags gy, but they don't hurt\n\t      separator2 = new RegExp(\"^\" + separator.source + \"$(?!\\\\s)\", flags);\n\t    }\n\t    /* Values for `limit`, per the spec:\n\t     * If undefined: 4294967295 // Math.pow(2, 32) - 1\n\t     * If 0, Infinity, or NaN: 0\n\t     * If positive number: limit = Math.floor(limit); if (limit > 4294967295) limit -= 4294967296;\n\t     * If negative number: 4294967296 - Math.floor(Math.abs(limit))\n\t     * If other: Type-convert, then use the above rules\n\t     */\n\t    limit = limit === undef ? -1 >>> 0 : // Math.pow(2, 32) - 1\n\t    limit >>> 0; // ToUint32(limit)\n\t    while (match = separator.exec(str)) {\n\t      // `separator.lastIndex` is not reliable cross-browser\n\t      lastIndex = match.index + match[0].length;\n\t      if (lastIndex > lastLastIndex) {\n\t        output.push(str.slice(lastLastIndex, match.index));\n\t        // Fix browsers whose `exec` methods don't consistently return `undefined` for\n\t        // nonparticipating capturing groups\n\t        if (!compliantExecNpcg && match.length > 1) {\n\t          match[0].replace(separator2, function() {\n\t            for (var i = 1; i < arguments.length - 2; i++) {\n\t              if (arguments[i] === undef) {\n\t                match[i] = undef;\n\t              }\n\t            }\n\t          });\n\t        }\n\t        if (match.length > 1 && match.index < str.length) {\n\t          Array.prototype.push.apply(output, match.slice(1));\n\t        }\n\t        lastLength = match[0].length;\n\t        lastLastIndex = lastIndex;\n\t        if (output.length >= limit) {\n\t          break;\n\t        }\n\t      }\n\t      if (separator.lastIndex === match.index) {\n\t        separator.lastIndex++; // Avoid an infinite loop\n\t      }\n\t    }\n\t    if (lastLastIndex === str.length) {\n\t      if (lastLength || !separator.test(\"\")) {\n\t        output.push(\"\");\n\t      }\n\t    } else {\n\t      output.push(str.slice(lastLastIndex));\n\t    }\n\t    return output.length > limit ? output.slice(0, limit) : output;\n\t  };\n\n\t  return self;\n\t})();\n\n\tvar classIdSplit = /([\\.#]?[a-zA-Z0-9\\u007F-\\uFFFF_:-]+)/;\n\tvar notClassId = /^\\.|#/;\n\n\tvar parseTag_1 = parseTag;\n\n\tfunction parseTag(tag, props) {\n\t    if (!tag) {\n\t        return 'DIV';\n\t    }\n\n\t    var noId = !(props.hasOwnProperty('id'));\n\n\t    var tagParts = browserSplit(tag, classIdSplit);\n\t    var tagName = null;\n\n\t    if (notClassId.test(tagParts[1])) {\n\t        tagName = 'DIV';\n\t    }\n\n\t    var classes, part, type, i;\n\n\t    for (i = 0; i < tagParts.length; i++) {\n\t        part = tagParts[i];\n\n\t        if (!part) {\n\t            continue;\n\t        }\n\n\t        type = part.charAt(0);\n\n\t        if (!tagName) {\n\t            tagName = part;\n\t        } else if (type === '.') {\n\t            classes = classes || [];\n\t            classes.push(part.substring(1, part.length));\n\t        } else if (type === '#' && noId) {\n\t            props.id = part.substring(1, part.length);\n\t        }\n\t    }\n\n\t    if (classes) {\n\t        if (props.className) {\n\t            classes.push(props.className);\n\t        }\n\n\t        props.className = classes.join(' ');\n\t    }\n\n\t    return props.namespace ? tagName : tagName.toUpperCase();\n\t}\n\n\tvar softSetHook = SoftSetHook;\n\n\tfunction SoftSetHook(value) {\n\t    if (!(this instanceof SoftSetHook)) {\n\t        return new SoftSetHook(value);\n\t    }\n\n\t    this.value = value;\n\t}\n\n\tSoftSetHook.prototype.hook = function (node, propertyName) {\n\t    if (node[propertyName] !== this.value) {\n\t        node[propertyName] = this.value;\n\t    }\n\t};\n\n\t/*global window, global*/\n\n\tvar root$1 = typeof window !== 'undefined' ?\n\t    window : typeof commonjsGlobal !== 'undefined' ?\n\t    commonjsGlobal : {};\n\n\tvar individual = Individual;\n\n\tfunction Individual(key, value) {\n\t    if (key in root$1) {\n\t        return root$1[key];\n\t    }\n\n\t    root$1[key] = value;\n\n\t    return value;\n\t}\n\n\tvar oneVersion = OneVersion;\n\n\tfunction OneVersion(moduleName, version, defaultValue) {\n\t    var key = '__INDIVIDUAL_ONE_VERSION_' + moduleName;\n\t    var enforceKey = key + '_ENFORCE_SINGLETON';\n\n\t    var versionValue = individual(enforceKey, version);\n\n\t    if (versionValue !== version) {\n\t        throw new Error('Can only have one copy of ' +\n\t            moduleName + '.\\n' +\n\t            'You already have version ' + versionValue +\n\t            ' installed.\\n' +\n\t            'This means you cannot install version ' + version);\n\t    }\n\n\t    return individual(key, defaultValue);\n\t}\n\n\tvar MY_VERSION = '7';\n\toneVersion('ev-store', MY_VERSION);\n\n\tvar hashKey = '__EV_STORE_KEY@' + MY_VERSION;\n\n\tvar evStore = EvStore;\n\n\tfunction EvStore(elem) {\n\t    var hash = elem[hashKey];\n\n\t    if (!hash) {\n\t        hash = elem[hashKey] = {};\n\t    }\n\n\t    return hash;\n\t}\n\n\tvar evHook = EvHook;\n\n\tfunction EvHook(value) {\n\t    if (!(this instanceof EvHook)) {\n\t        return new EvHook(value);\n\t    }\n\n\t    this.value = value;\n\t}\n\n\tEvHook.prototype.hook = function (node, propertyName) {\n\t    var es = evStore(node);\n\t    var propName = propertyName.substr(3);\n\n\t    es[propName] = this.value;\n\t};\n\n\tEvHook.prototype.unhook = function(node, propertyName) {\n\t    var es = evStore(node);\n\t    var propName = propertyName.substr(3);\n\n\t    es[propName] = undefined;\n\t};\n\n\tvar virtualHyperscript = h;\n\n\tfunction h(tagName, properties, children) {\n\t    var childNodes = [];\n\t    var tag, props, key, namespace;\n\n\t    if (!children && isChildren(properties)) {\n\t        children = properties;\n\t        props = {};\n\t    }\n\n\t    props = props || properties || {};\n\t    tag = parseTag_1(tagName, props);\n\n\t    // support keys\n\t    if (props.hasOwnProperty('key')) {\n\t        key = props.key;\n\t        props.key = undefined;\n\t    }\n\n\t    // support namespace\n\t    if (props.hasOwnProperty('namespace')) {\n\t        namespace = props.namespace;\n\t        props.namespace = undefined;\n\t    }\n\n\t    // fix cursor bug\n\t    if (tag === 'INPUT' &&\n\t        !namespace &&\n\t        props.hasOwnProperty('value') &&\n\t        props.value !== undefined &&\n\t        !isVhook(props.value)\n\t    ) {\n\t        props.value = softSetHook(props.value);\n\t    }\n\n\t    transformProperties(props);\n\n\t    if (children !== undefined && children !== null) {\n\t        addChild(children, childNodes, tag, props);\n\t    }\n\n\n\t    return new vnode(tag, props, childNodes, key, namespace);\n\t}\n\n\tfunction addChild(c, childNodes, tag, props) {\n\t    if (typeof c === 'string') {\n\t        childNodes.push(new vtext(c));\n\t    } else if (typeof c === 'number') {\n\t        childNodes.push(new vtext(String(c)));\n\t    } else if (isChild(c)) {\n\t        childNodes.push(c);\n\t    } else if (xIsArray(c)) {\n\t        for (var i = 0; i < c.length; i++) {\n\t            addChild(c[i], childNodes, tag, props);\n\t        }\n\t    } else if (c === null || c === undefined) {\n\t        return;\n\t    } else {\n\t        throw UnexpectedVirtualElement({\n\t            foreignObject: c,\n\t            parentVnode: {\n\t                tagName: tag,\n\t                properties: props\n\t            }\n\t        });\n\t    }\n\t}\n\n\tfunction transformProperties(props) {\n\t    for (var propName in props) {\n\t        if (props.hasOwnProperty(propName)) {\n\t            var value = props[propName];\n\n\t            if (isVhook(value)) {\n\t                continue;\n\t            }\n\n\t            if (propName.substr(0, 3) === 'ev-') {\n\t                // add ev-foo support\n\t                props[propName] = evHook(value);\n\t            }\n\t        }\n\t    }\n\t}\n\n\tfunction isChild(x) {\n\t    return isVnode(x) || isVtext(x) || isWidget_1(x) || isThunk_1(x);\n\t}\n\n\tfunction isChildren(x) {\n\t    return typeof x === 'string' || xIsArray(x) || isChild(x);\n\t}\n\n\tfunction UnexpectedVirtualElement(data) {\n\t    var err = new Error();\n\n\t    err.type = 'virtual-hyperscript.unexpected.virtual-element';\n\t    err.message = 'Unexpected virtual child passed to h().\\n' +\n\t        'Expected a VNode / Vthunk / VWidget / string but:\\n' +\n\t        'got:\\n' +\n\t        errorString(data.foreignObject) +\n\t        '.\\n' +\n\t        'The parent vnode is:\\n' +\n\t        errorString(data.parentVnode);\n\t    err.foreignObject = data.foreignObject;\n\t    err.parentVnode = data.parentVnode;\n\n\t    return err;\n\t}\n\n\tfunction errorString(obj) {\n\t    try {\n\t        return JSON.stringify(obj, null, '    ');\n\t    } catch (e) {\n\t        return String(obj);\n\t    }\n\t}\n\n\tvar h_1 = virtualHyperscript;\n\n\tVirtualPatch.NONE = 0;\n\tVirtualPatch.VTEXT = 1;\n\tVirtualPatch.VNODE = 2;\n\tVirtualPatch.WIDGET = 3;\n\tVirtualPatch.PROPS = 4;\n\tVirtualPatch.ORDER = 5;\n\tVirtualPatch.INSERT = 6;\n\tVirtualPatch.REMOVE = 7;\n\tVirtualPatch.THUNK = 8;\n\n\tvar vpatch = VirtualPatch;\n\n\tfunction VirtualPatch(type, vNode, patch) {\n\t    this.type = Number(type);\n\t    this.vNode = vNode;\n\t    this.patch = patch;\n\t}\n\n\tVirtualPatch.prototype.version = version$1;\n\tVirtualPatch.prototype.type = \"VirtualPatch\";\n\n\tvar handleThunk_1 = handleThunk;\n\n\tfunction handleThunk(a, b) {\n\t    var renderedA = a;\n\t    var renderedB = b;\n\n\t    if (isThunk_1(b)) {\n\t        renderedB = renderThunk(b, a);\n\t    }\n\n\t    if (isThunk_1(a)) {\n\t        renderedA = renderThunk(a, null);\n\t    }\n\n\t    return {\n\t        a: renderedA,\n\t        b: renderedB\n\t    }\n\t}\n\n\tfunction renderThunk(thunk, previous) {\n\t    var renderedThunk = thunk.vnode;\n\n\t    if (!renderedThunk) {\n\t        renderedThunk = thunk.vnode = thunk.render(previous);\n\t    }\n\n\t    if (!(isVnode(renderedThunk) ||\n\t            isVtext(renderedThunk) ||\n\t            isWidget_1(renderedThunk))) {\n\t        throw new Error(\"thunk did not return a valid node\");\n\t    }\n\n\t    return renderedThunk\n\t}\n\n\tvar isObject$2 = function isObject(x) {\n\t\treturn typeof x === 'object' && x !== null;\n\t};\n\n\tvar diffProps_1 = diffProps;\n\n\tfunction diffProps(a, b) {\n\t    var diff;\n\n\t    for (var aKey in a) {\n\t        if (!(aKey in b)) {\n\t            diff = diff || {};\n\t            diff[aKey] = undefined;\n\t        }\n\n\t        var aValue = a[aKey];\n\t        var bValue = b[aKey];\n\n\t        if (aValue === bValue) {\n\t            continue\n\t        } else if (isObject$2(aValue) && isObject$2(bValue)) {\n\t            if (getPrototype$1(bValue) !== getPrototype$1(aValue)) {\n\t                diff = diff || {};\n\t                diff[aKey] = bValue;\n\t            } else if (isVhook(bValue)) {\n\t                 diff = diff || {};\n\t                 diff[aKey] = bValue;\n\t            } else {\n\t                var objectDiff = diffProps(aValue, bValue);\n\t                if (objectDiff) {\n\t                    diff = diff || {};\n\t                    diff[aKey] = objectDiff;\n\t                }\n\t            }\n\t        } else {\n\t            diff = diff || {};\n\t            diff[aKey] = bValue;\n\t        }\n\t    }\n\n\t    for (var bKey in b) {\n\t        if (!(bKey in a)) {\n\t            diff = diff || {};\n\t            diff[bKey] = b[bKey];\n\t        }\n\t    }\n\n\t    return diff\n\t}\n\n\tfunction getPrototype$1(value) {\n\t  if (Object.getPrototypeOf) {\n\t    return Object.getPrototypeOf(value)\n\t  } else if (value.__proto__) {\n\t    return value.__proto__\n\t  } else if (value.constructor) {\n\t    return value.constructor.prototype\n\t  }\n\t}\n\n\tvar diff_1 = diff;\n\n\tfunction diff(a, b) {\n\t    var patch = { a: a };\n\t    walk(a, b, patch, 0);\n\t    return patch\n\t}\n\n\tfunction walk(a, b, patch, index) {\n\t    if (a === b) {\n\t        return\n\t    }\n\n\t    var apply = patch[index];\n\t    var applyClear = false;\n\n\t    if (isThunk_1(a) || isThunk_1(b)) {\n\t        thunks(a, b, patch, index);\n\t    } else if (b == null) {\n\n\t        // If a is a widget we will add a remove patch for it\n\t        // Otherwise any child widgets/hooks must be destroyed.\n\t        // This prevents adding two remove patches for a widget.\n\t        if (!isWidget_1(a)) {\n\t            clearState(a, patch, index);\n\t            apply = patch[index];\n\t        }\n\n\t        apply = appendPatch(apply, new vpatch(vpatch.REMOVE, a, b));\n\t    } else if (isVnode(b)) {\n\t        if (isVnode(a)) {\n\t            if (a.tagName === b.tagName &&\n\t                a.namespace === b.namespace &&\n\t                a.key === b.key) {\n\t                var propsPatch = diffProps_1(a.properties, b.properties);\n\t                if (propsPatch) {\n\t                    apply = appendPatch(apply,\n\t                        new vpatch(vpatch.PROPS, a, propsPatch));\n\t                }\n\t                apply = diffChildren(a, b, patch, apply, index);\n\t            } else {\n\t                apply = appendPatch(apply, new vpatch(vpatch.VNODE, a, b));\n\t                applyClear = true;\n\t            }\n\t        } else {\n\t            apply = appendPatch(apply, new vpatch(vpatch.VNODE, a, b));\n\t            applyClear = true;\n\t        }\n\t    } else if (isVtext(b)) {\n\t        if (!isVtext(a)) {\n\t            apply = appendPatch(apply, new vpatch(vpatch.VTEXT, a, b));\n\t            applyClear = true;\n\t        } else if (a.text !== b.text) {\n\t            apply = appendPatch(apply, new vpatch(vpatch.VTEXT, a, b));\n\t        }\n\t    } else if (isWidget_1(b)) {\n\t        if (!isWidget_1(a)) {\n\t            applyClear = true;\n\t        }\n\n\t        apply = appendPatch(apply, new vpatch(vpatch.WIDGET, a, b));\n\t    }\n\n\t    if (apply) {\n\t        patch[index] = apply;\n\t    }\n\n\t    if (applyClear) {\n\t        clearState(a, patch, index);\n\t    }\n\t}\n\n\tfunction diffChildren(a, b, patch, apply, index) {\n\t    var aChildren = a.children;\n\t    var orderedSet = reorder(aChildren, b.children);\n\t    var bChildren = orderedSet.children;\n\n\t    var aLen = aChildren.length;\n\t    var bLen = bChildren.length;\n\t    var len = aLen > bLen ? aLen : bLen;\n\n\t    for (var i = 0; i < len; i++) {\n\t        var leftNode = aChildren[i];\n\t        var rightNode = bChildren[i];\n\t        index += 1;\n\n\t        if (!leftNode) {\n\t            if (rightNode) {\n\t                // Excess nodes in b need to be added\n\t                apply = appendPatch(apply,\n\t                    new vpatch(vpatch.INSERT, null, rightNode));\n\t            }\n\t        } else {\n\t            walk(leftNode, rightNode, patch, index);\n\t        }\n\n\t        if (isVnode(leftNode) && leftNode.count) {\n\t            index += leftNode.count;\n\t        }\n\t    }\n\n\t    if (orderedSet.moves) {\n\t        // Reorder nodes last\n\t        apply = appendPatch(apply, new vpatch(\n\t            vpatch.ORDER,\n\t            a,\n\t            orderedSet.moves\n\t        ));\n\t    }\n\n\t    return apply\n\t}\n\n\tfunction clearState(vNode, patch, index) {\n\t    // TODO: Make this a single walk, not two\n\t    unhook(vNode, patch, index);\n\t    destroyWidgets(vNode, patch, index);\n\t}\n\n\t// Patch records for all destroyed widgets must be added because we need\n\t// a DOM node reference for the destroy function\n\tfunction destroyWidgets(vNode, patch, index) {\n\t    if (isWidget_1(vNode)) {\n\t        if (typeof vNode.destroy === \"function\") {\n\t            patch[index] = appendPatch(\n\t                patch[index],\n\t                new vpatch(vpatch.REMOVE, vNode, null)\n\t            );\n\t        }\n\t    } else if (isVnode(vNode) && (vNode.hasWidgets || vNode.hasThunks)) {\n\t        var children = vNode.children;\n\t        var len = children.length;\n\t        for (var i = 0; i < len; i++) {\n\t            var child = children[i];\n\t            index += 1;\n\n\t            destroyWidgets(child, patch, index);\n\n\t            if (isVnode(child) && child.count) {\n\t                index += child.count;\n\t            }\n\t        }\n\t    } else if (isThunk_1(vNode)) {\n\t        thunks(vNode, null, patch, index);\n\t    }\n\t}\n\n\t// Create a sub-patch for thunks\n\tfunction thunks(a, b, patch, index) {\n\t    var nodes = handleThunk_1(a, b);\n\t    var thunkPatch = diff(nodes.a, nodes.b);\n\t    if (hasPatches(thunkPatch)) {\n\t        patch[index] = new vpatch(vpatch.THUNK, null, thunkPatch);\n\t    }\n\t}\n\n\tfunction hasPatches(patch) {\n\t    for (var index in patch) {\n\t        if (index !== \"a\") {\n\t            return true\n\t        }\n\t    }\n\n\t    return false\n\t}\n\n\t// Execute hooks when two nodes are identical\n\tfunction unhook(vNode, patch, index) {\n\t    if (isVnode(vNode)) {\n\t        if (vNode.hooks) {\n\t            patch[index] = appendPatch(\n\t                patch[index],\n\t                new vpatch(\n\t                    vpatch.PROPS,\n\t                    vNode,\n\t                    undefinedKeys(vNode.hooks)\n\t                )\n\t            );\n\t        }\n\n\t        if (vNode.descendantHooks || vNode.hasThunks) {\n\t            var children = vNode.children;\n\t            var len = children.length;\n\t            for (var i = 0; i < len; i++) {\n\t                var child = children[i];\n\t                index += 1;\n\n\t                unhook(child, patch, index);\n\n\t                if (isVnode(child) && child.count) {\n\t                    index += child.count;\n\t                }\n\t            }\n\t        }\n\t    } else if (isThunk_1(vNode)) {\n\t        thunks(vNode, null, patch, index);\n\t    }\n\t}\n\n\tfunction undefinedKeys(obj) {\n\t    var result = {};\n\n\t    for (var key in obj) {\n\t        result[key] = undefined;\n\t    }\n\n\t    return result\n\t}\n\n\t// List diff, naive left to right reordering\n\tfunction reorder(aChildren, bChildren) {\n\t    // O(M) time, O(M) memory\n\t    var bChildIndex = keyIndex(bChildren);\n\t    var bKeys = bChildIndex.keys;\n\t    var bFree = bChildIndex.free;\n\n\t    if (bFree.length === bChildren.length) {\n\t        return {\n\t            children: bChildren,\n\t            moves: null\n\t        }\n\t    }\n\n\t    // O(N) time, O(N) memory\n\t    var aChildIndex = keyIndex(aChildren);\n\t    var aKeys = aChildIndex.keys;\n\t    var aFree = aChildIndex.free;\n\n\t    if (aFree.length === aChildren.length) {\n\t        return {\n\t            children: bChildren,\n\t            moves: null\n\t        }\n\t    }\n\n\t    // O(MAX(N, M)) memory\n\t    var newChildren = [];\n\n\t    var freeIndex = 0;\n\t    var freeCount = bFree.length;\n\t    var deletedItems = 0;\n\n\t    // Iterate through a and match a node in b\n\t    // O(N) time,\n\t    for (var i = 0 ; i < aChildren.length; i++) {\n\t        var aItem = aChildren[i];\n\t        var itemIndex;\n\n\t        if (aItem.key) {\n\t            if (bKeys.hasOwnProperty(aItem.key)) {\n\t                // Match up the old keys\n\t                itemIndex = bKeys[aItem.key];\n\t                newChildren.push(bChildren[itemIndex]);\n\n\t            } else {\n\t                // Remove old keyed items\n\t                itemIndex = i - deletedItems++;\n\t                newChildren.push(null);\n\t            }\n\t        } else {\n\t            // Match the item in a with the next free item in b\n\t            if (freeIndex < freeCount) {\n\t                itemIndex = bFree[freeIndex++];\n\t                newChildren.push(bChildren[itemIndex]);\n\t            } else {\n\t                // There are no free items in b to match with\n\t                // the free items in a, so the extra free nodes\n\t                // are deleted.\n\t                itemIndex = i - deletedItems++;\n\t                newChildren.push(null);\n\t            }\n\t        }\n\t    }\n\n\t    var lastFreeIndex = freeIndex >= bFree.length ?\n\t        bChildren.length :\n\t        bFree[freeIndex];\n\n\t    // Iterate through b and append any new keys\n\t    // O(M) time\n\t    for (var j = 0; j < bChildren.length; j++) {\n\t        var newItem = bChildren[j];\n\n\t        if (newItem.key) {\n\t            if (!aKeys.hasOwnProperty(newItem.key)) {\n\t                // Add any new keyed items\n\t                // We are adding new items to the end and then sorting them\n\t                // in place. In future we should insert new items in place.\n\t                newChildren.push(newItem);\n\t            }\n\t        } else if (j >= lastFreeIndex) {\n\t            // Add any leftover non-keyed items\n\t            newChildren.push(newItem);\n\t        }\n\t    }\n\n\t    var simulate = newChildren.slice();\n\t    var simulateIndex = 0;\n\t    var removes = [];\n\t    var inserts = [];\n\t    var simulateItem;\n\n\t    for (var k = 0; k < bChildren.length;) {\n\t        var wantedItem = bChildren[k];\n\t        simulateItem = simulate[simulateIndex];\n\n\t        // remove items\n\t        while (simulateItem === null && simulate.length) {\n\t            removes.push(remove(simulate, simulateIndex, null));\n\t            simulateItem = simulate[simulateIndex];\n\t        }\n\n\t        if (!simulateItem || simulateItem.key !== wantedItem.key) {\n\t            // if we need a key in this position...\n\t            if (wantedItem.key) {\n\t                if (simulateItem && simulateItem.key) {\n\t                    // if an insert doesn't put this key in place, it needs to move\n\t                    if (bKeys[simulateItem.key] !== k + 1) {\n\t                        removes.push(remove(simulate, simulateIndex, simulateItem.key));\n\t                        simulateItem = simulate[simulateIndex];\n\t                        // if the remove didn't put the wanted item in place, we need to insert it\n\t                        if (!simulateItem || simulateItem.key !== wantedItem.key) {\n\t                            inserts.push({key: wantedItem.key, to: k});\n\t                        }\n\t                        // items are matching, so skip ahead\n\t                        else {\n\t                            simulateIndex++;\n\t                        }\n\t                    }\n\t                    else {\n\t                        inserts.push({key: wantedItem.key, to: k});\n\t                    }\n\t                }\n\t                else {\n\t                    inserts.push({key: wantedItem.key, to: k});\n\t                }\n\t                k++;\n\t            }\n\t            // a key in simulate has no matching wanted key, remove it\n\t            else if (simulateItem && simulateItem.key) {\n\t                removes.push(remove(simulate, simulateIndex, simulateItem.key));\n\t            }\n\t        }\n\t        else {\n\t            simulateIndex++;\n\t            k++;\n\t        }\n\t    }\n\n\t    // remove all the remaining nodes from simulate\n\t    while(simulateIndex < simulate.length) {\n\t        simulateItem = simulate[simulateIndex];\n\t        removes.push(remove(simulate, simulateIndex, simulateItem && simulateItem.key));\n\t    }\n\n\t    // If the only moves we have are deletes then we can just\n\t    // let the delete patch remove these items.\n\t    if (removes.length === deletedItems && !inserts.length) {\n\t        return {\n\t            children: newChildren,\n\t            moves: null\n\t        }\n\t    }\n\n\t    return {\n\t        children: newChildren,\n\t        moves: {\n\t            removes: removes,\n\t            inserts: inserts\n\t        }\n\t    }\n\t}\n\n\tfunction remove(arr, index, key) {\n\t    arr.splice(index, 1);\n\n\t    return {\n\t        from: index,\n\t        key: key\n\t    }\n\t}\n\n\tfunction keyIndex(children) {\n\t    var keys = {};\n\t    var free = [];\n\t    var length = children.length;\n\n\t    for (var i = 0; i < length; i++) {\n\t        var child = children[i];\n\n\t        if (child.key) {\n\t            keys[child.key] = i;\n\t        } else {\n\t            free.push(i);\n\t        }\n\t    }\n\n\t    return {\n\t        keys: keys,     // A hash of key name to index\n\t        free: free      // An array of unkeyed item indices\n\t    }\n\t}\n\n\tfunction appendPatch(apply, patch) {\n\t    if (apply) {\n\t        if (xIsArray(apply)) {\n\t            apply.push(patch);\n\t        } else {\n\t            apply = [apply, patch];\n\t        }\n\n\t        return apply\n\t    } else {\n\t        return patch\n\t    }\n\t}\n\n\tvar diff_1$1 = diff_1;\n\n\tvar _nodeResolve_empty = {};\n\n\tvar _nodeResolve_empty$1 = /*#__PURE__*/Object.freeze({\n\t\t__proto__: null,\n\t\t'default': _nodeResolve_empty\n\t});\n\n\tvar minDoc = getCjsExportFromNamespace(_nodeResolve_empty$1);\n\n\tvar topLevel = typeof commonjsGlobal !== 'undefined' ? commonjsGlobal :\n\t    typeof window !== 'undefined' ? window : {};\n\n\n\tvar doccy;\n\n\tif (typeof document !== 'undefined') {\n\t    doccy = document;\n\t} else {\n\t    doccy = topLevel['__GLOBAL_DOCUMENT_CACHE@4'];\n\n\t    if (!doccy) {\n\t        doccy = topLevel['__GLOBAL_DOCUMENT_CACHE@4'] = minDoc;\n\t    }\n\t}\n\n\tvar document_1 = doccy;\n\n\tvar applyProperties_1 = applyProperties;\n\n\tfunction applyProperties(node, props, previous) {\n\t    for (var propName in props) {\n\t        var propValue = props[propName];\n\n\t        if (propValue === undefined) {\n\t            removeProperty(node, propName, propValue, previous);\n\t        } else if (isVhook(propValue)) {\n\t            removeProperty(node, propName, propValue, previous);\n\t            if (propValue.hook) {\n\t                propValue.hook(node,\n\t                    propName,\n\t                    previous ? previous[propName] : undefined);\n\t            }\n\t        } else {\n\t            if (isObject$2(propValue)) {\n\t                patchObject(node, props, previous, propName, propValue);\n\t            } else {\n\t                node[propName] = propValue;\n\t            }\n\t        }\n\t    }\n\t}\n\n\tfunction removeProperty(node, propName, propValue, previous) {\n\t    if (previous) {\n\t        var previousValue = previous[propName];\n\n\t        if (!isVhook(previousValue)) {\n\t            if (propName === \"attributes\") {\n\t                for (var attrName in previousValue) {\n\t                    node.removeAttribute(attrName);\n\t                }\n\t            } else if (propName === \"style\") {\n\t                for (var i in previousValue) {\n\t                    node.style[i] = \"\";\n\t                }\n\t            } else if (typeof previousValue === \"string\") {\n\t                node[propName] = \"\";\n\t            } else {\n\t                node[propName] = null;\n\t            }\n\t        } else if (previousValue.unhook) {\n\t            previousValue.unhook(node, propName, propValue);\n\t        }\n\t    }\n\t}\n\n\tfunction patchObject(node, props, previous, propName, propValue) {\n\t    var previousValue = previous ? previous[propName] : undefined;\n\n\t    // Set attributes\n\t    if (propName === \"attributes\") {\n\t        for (var attrName in propValue) {\n\t            var attrValue = propValue[attrName];\n\n\t            if (attrValue === undefined) {\n\t                node.removeAttribute(attrName);\n\t            } else {\n\t                node.setAttribute(attrName, attrValue);\n\t            }\n\t        }\n\n\t        return\n\t    }\n\n\t    if(previousValue && isObject$2(previousValue) &&\n\t        getPrototype$2(previousValue) !== getPrototype$2(propValue)) {\n\t        node[propName] = propValue;\n\t        return\n\t    }\n\n\t    if (!isObject$2(node[propName])) {\n\t        node[propName] = {};\n\t    }\n\n\t    var replacer = propName === \"style\" ? \"\" : undefined;\n\n\t    for (var k in propValue) {\n\t        var value = propValue[k];\n\t        node[propName][k] = (value === undefined) ? replacer : value;\n\t    }\n\t}\n\n\tfunction getPrototype$2(value) {\n\t    if (Object.getPrototypeOf) {\n\t        return Object.getPrototypeOf(value)\n\t    } else if (value.__proto__) {\n\t        return value.__proto__\n\t    } else if (value.constructor) {\n\t        return value.constructor.prototype\n\t    }\n\t}\n\n\tvar createElement_1 = createElement$1;\n\n\tfunction createElement$1(vnode, opts) {\n\t    var doc = opts ? opts.document || document_1 : document_1;\n\t    var warn = opts ? opts.warn : null;\n\n\t    vnode = handleThunk_1(vnode).a;\n\n\t    if (isWidget_1(vnode)) {\n\t        return vnode.init()\n\t    } else if (isVtext(vnode)) {\n\t        return doc.createTextNode(vnode.text)\n\t    } else if (!isVnode(vnode)) {\n\t        if (warn) {\n\t            warn(\"Item is not a valid virtual dom node\", vnode);\n\t        }\n\t        return null\n\t    }\n\n\t    var node = (vnode.namespace === null) ?\n\t        doc.createElement(vnode.tagName) :\n\t        doc.createElementNS(vnode.namespace, vnode.tagName);\n\n\t    var props = vnode.properties;\n\t    applyProperties_1(node, props);\n\n\t    var children = vnode.children;\n\n\t    for (var i = 0; i < children.length; i++) {\n\t        var childNode = createElement$1(children[i], opts);\n\t        if (childNode) {\n\t            node.appendChild(childNode);\n\t        }\n\t    }\n\n\t    return node\n\t}\n\n\t// Maps a virtual DOM tree onto a real DOM tree in an efficient manner.\n\t// We don't want to read all of the DOM nodes in the tree so we use\n\t// the in-order tree indexing to eliminate recursion down certain branches.\n\t// We only recurse into a DOM node if we know that it contains a child of\n\t// interest.\n\n\tvar noChild = {};\n\n\tvar domIndex_1 = domIndex;\n\n\tfunction domIndex(rootNode, tree, indices, nodes) {\n\t    if (!indices || indices.length === 0) {\n\t        return {}\n\t    } else {\n\t        indices.sort(ascending);\n\t        return recurse(rootNode, tree, indices, nodes, 0)\n\t    }\n\t}\n\n\tfunction recurse(rootNode, tree, indices, nodes, rootIndex) {\n\t    nodes = nodes || {};\n\n\n\t    if (rootNode) {\n\t        if (indexInRange(indices, rootIndex, rootIndex)) {\n\t            nodes[rootIndex] = rootNode;\n\t        }\n\n\t        var vChildren = tree.children;\n\n\t        if (vChildren) {\n\n\t            var childNodes = rootNode.childNodes;\n\n\t            for (var i = 0; i < tree.children.length; i++) {\n\t                rootIndex += 1;\n\n\t                var vChild = vChildren[i] || noChild;\n\t                var nextIndex = rootIndex + (vChild.count || 0);\n\n\t                // skip recursion down the tree if there are no nodes down here\n\t                if (indexInRange(indices, rootIndex, nextIndex)) {\n\t                    recurse(childNodes[i], vChild, indices, nodes, rootIndex);\n\t                }\n\n\t                rootIndex = nextIndex;\n\t            }\n\t        }\n\t    }\n\n\t    return nodes\n\t}\n\n\t// Binary search for an index in the interval [left, right]\n\tfunction indexInRange(indices, left, right) {\n\t    if (indices.length === 0) {\n\t        return false\n\t    }\n\n\t    var minIndex = 0;\n\t    var maxIndex = indices.length - 1;\n\t    var currentIndex;\n\t    var currentItem;\n\n\t    while (minIndex <= maxIndex) {\n\t        currentIndex = ((maxIndex + minIndex) / 2) >> 0;\n\t        currentItem = indices[currentIndex];\n\n\t        if (minIndex === maxIndex) {\n\t            return currentItem >= left && currentItem <= right\n\t        } else if (currentItem < left) {\n\t            minIndex = currentIndex + 1;\n\t        } else  if (currentItem > right) {\n\t            maxIndex = currentIndex - 1;\n\t        } else {\n\t            return true\n\t        }\n\t    }\n\n\t    return false;\n\t}\n\n\tfunction ascending(a, b) {\n\t    return a > b ? 1 : -1\n\t}\n\n\tvar updateWidget_1 = updateWidget;\n\n\tfunction updateWidget(a, b) {\n\t    if (isWidget_1(a) && isWidget_1(b)) {\n\t        if (\"name\" in a && \"name\" in b) {\n\t            return a.id === b.id\n\t        } else {\n\t            return a.init === b.init\n\t        }\n\t    }\n\n\t    return false\n\t}\n\n\tvar patchOp = applyPatch;\n\n\tfunction applyPatch(vpatch$1, domNode, renderOptions) {\n\t    var type = vpatch$1.type;\n\t    var vNode = vpatch$1.vNode;\n\t    var patch = vpatch$1.patch;\n\n\t    switch (type) {\n\t        case vpatch.REMOVE:\n\t            return removeNode(domNode, vNode)\n\t        case vpatch.INSERT:\n\t            return insertNode(domNode, patch, renderOptions)\n\t        case vpatch.VTEXT:\n\t            return stringPatch(domNode, vNode, patch, renderOptions)\n\t        case vpatch.WIDGET:\n\t            return widgetPatch(domNode, vNode, patch, renderOptions)\n\t        case vpatch.VNODE:\n\t            return vNodePatch(domNode, vNode, patch, renderOptions)\n\t        case vpatch.ORDER:\n\t            reorderChildren(domNode, patch);\n\t            return domNode\n\t        case vpatch.PROPS:\n\t            applyProperties_1(domNode, patch, vNode.properties);\n\t            return domNode\n\t        case vpatch.THUNK:\n\t            return replaceRoot(domNode,\n\t                renderOptions.patch(domNode, patch, renderOptions))\n\t        default:\n\t            return domNode\n\t    }\n\t}\n\n\tfunction removeNode(domNode, vNode) {\n\t    var parentNode = domNode.parentNode;\n\n\t    if (parentNode) {\n\t        parentNode.removeChild(domNode);\n\t    }\n\n\t    destroyWidget(domNode, vNode);\n\n\t    return null\n\t}\n\n\tfunction insertNode(parentNode, vNode, renderOptions) {\n\t    var newNode = renderOptions.render(vNode, renderOptions);\n\n\t    if (parentNode) {\n\t        parentNode.appendChild(newNode);\n\t    }\n\n\t    return parentNode\n\t}\n\n\tfunction stringPatch(domNode, leftVNode, vText, renderOptions) {\n\t    var newNode;\n\n\t    if (domNode.nodeType === 3) {\n\t        domNode.replaceData(0, domNode.length, vText.text);\n\t        newNode = domNode;\n\t    } else {\n\t        var parentNode = domNode.parentNode;\n\t        newNode = renderOptions.render(vText, renderOptions);\n\n\t        if (parentNode && newNode !== domNode) {\n\t            parentNode.replaceChild(newNode, domNode);\n\t        }\n\t    }\n\n\t    return newNode\n\t}\n\n\tfunction widgetPatch(domNode, leftVNode, widget, renderOptions) {\n\t    var updating = updateWidget_1(leftVNode, widget);\n\t    var newNode;\n\n\t    if (updating) {\n\t        newNode = widget.update(leftVNode, domNode) || domNode;\n\t    } else {\n\t        newNode = renderOptions.render(widget, renderOptions);\n\t    }\n\n\t    var parentNode = domNode.parentNode;\n\n\t    if (parentNode && newNode !== domNode) {\n\t        parentNode.replaceChild(newNode, domNode);\n\t    }\n\n\t    if (!updating) {\n\t        destroyWidget(domNode, leftVNode);\n\t    }\n\n\t    return newNode\n\t}\n\n\tfunction vNodePatch(domNode, leftVNode, vNode, renderOptions) {\n\t    var parentNode = domNode.parentNode;\n\t    var newNode = renderOptions.render(vNode, renderOptions);\n\n\t    if (parentNode && newNode !== domNode) {\n\t        parentNode.replaceChild(newNode, domNode);\n\t    }\n\n\t    return newNode\n\t}\n\n\tfunction destroyWidget(domNode, w) {\n\t    if (typeof w.destroy === \"function\" && isWidget_1(w)) {\n\t        w.destroy(domNode);\n\t    }\n\t}\n\n\tfunction reorderChildren(domNode, moves) {\n\t    var childNodes = domNode.childNodes;\n\t    var keyMap = {};\n\t    var node;\n\t    var remove;\n\t    var insert;\n\n\t    for (var i = 0; i < moves.removes.length; i++) {\n\t        remove = moves.removes[i];\n\t        node = childNodes[remove.from];\n\t        if (remove.key) {\n\t            keyMap[remove.key] = node;\n\t        }\n\t        domNode.removeChild(node);\n\t    }\n\n\t    var length = childNodes.length;\n\t    for (var j = 0; j < moves.inserts.length; j++) {\n\t        insert = moves.inserts[j];\n\t        node = keyMap[insert.key];\n\t        // this is the weirdest bug i've ever seen in webkit\n\t        domNode.insertBefore(node, insert.to >= length++ ? null : childNodes[insert.to]);\n\t    }\n\t}\n\n\tfunction replaceRoot(oldRoot, newRoot) {\n\t    if (oldRoot && newRoot && oldRoot !== newRoot && oldRoot.parentNode) {\n\t        oldRoot.parentNode.replaceChild(newRoot, oldRoot);\n\t    }\n\n\t    return newRoot;\n\t}\n\n\tvar patch_1 = patch;\n\n\tfunction patch(rootNode, patches, renderOptions) {\n\t    renderOptions = renderOptions || {};\n\t    renderOptions.patch = renderOptions.patch && renderOptions.patch !== patch\n\t        ? renderOptions.patch\n\t        : patchRecursive;\n\t    renderOptions.render = renderOptions.render || createElement_1;\n\n\t    return renderOptions.patch(rootNode, patches, renderOptions)\n\t}\n\n\tfunction patchRecursive(rootNode, patches, renderOptions) {\n\t    var indices = patchIndices(patches);\n\n\t    if (indices.length === 0) {\n\t        return rootNode\n\t    }\n\n\t    var index = domIndex_1(rootNode, patches.a, indices);\n\t    var ownerDocument = rootNode.ownerDocument;\n\n\t    if (!renderOptions.document && ownerDocument !== document_1) {\n\t        renderOptions.document = ownerDocument;\n\t    }\n\n\t    for (var i = 0; i < indices.length; i++) {\n\t        var nodeIndex = indices[i];\n\t        rootNode = applyPatch$1(rootNode,\n\t            index[nodeIndex],\n\t            patches[nodeIndex],\n\t            renderOptions);\n\t    }\n\n\t    return rootNode\n\t}\n\n\tfunction applyPatch$1(rootNode, domNode, patchList, renderOptions) {\n\t    if (!domNode) {\n\t        return rootNode\n\t    }\n\n\t    var newNode;\n\n\t    if (xIsArray(patchList)) {\n\t        for (var i = 0; i < patchList.length; i++) {\n\t            newNode = patchOp(patchList[i], domNode, renderOptions);\n\n\t            if (domNode === rootNode) {\n\t                rootNode = newNode;\n\t            }\n\t        }\n\t    } else {\n\t        newNode = patchOp(patchList, domNode, renderOptions);\n\n\t        if (domNode === rootNode) {\n\t            rootNode = newNode;\n\t        }\n\t    }\n\n\t    return rootNode\n\t}\n\n\tfunction patchIndices(patches) {\n\t    var indices = [];\n\n\t    for (var key in patches) {\n\t        if (key !== \"a\") {\n\t            indices.push(Number(key));\n\t        }\n\t    }\n\n\t    return indices\n\t}\n\n\tvar patch_1$1 = patch_1;\n\n\tvar MyersDiff = /*#__PURE__*/function () {\n\t  function MyersDiff(newObj, oldObj, getElement) {\n\t    _classCallCheck(this, MyersDiff);\n\n\t    this.options = {\n\t      newObj: newObj,\n\t      // 用于diff的新列表/字符串\n\t      oldObj: oldObj,\n\t      // 用于diff的旧列表/字符串\n\t      getElement: getElement // 获取用于比较的元素的函数\n\n\t    };\n\t  }\n\t  /**\n\t   * 执行diff操作\n\t   */\n\n\n\t  _createClass(MyersDiff, [{\n\t    key: \"doDiff\",\n\t    value: function doDiff() {\n\t      var snakes = this.findSnakes(this.options.newObj, this.options.oldObj);\n\t      var result = this.assembleResult(snakes, this.options.newObj, this.options.oldObj);\n\t      return result;\n\t    }\n\t    /**\n\t     * 用于判断列表/字符串元素是否相等的判据函数\n\t     */\n\n\t  }, {\n\t    key: \"getElement\",\n\t    value: function getElement(obj, index) {\n\t      if (typeof this.options.getElement === 'function') {\n\t        // 支持传入自定义的比较函数\n\t        return this.options.getElement(obj, index);\n\t      }\n\n\t      return obj[index];\n\t    }\n\t    /**\n\t     * 寻找从起点到终点的折线\n\t     */\n\n\t  }, {\n\t    key: \"findSnakes\",\n\t    value: function findSnakes(newObj, oldObj) {\n\t      var newLen = newObj.length || 0; // 新diff对象的长度\n\n\t      var oldLen = oldObj.length || 0; // 旧diff对象的长度\n\n\t      var lengthSum = newLen + oldLen; // 长度之和\n\n\t      var v = {\n\t        1: 0\n\t      }; // \"每个节点的深度值\"的缓存对象\n\n\t      var allSnakes = {\n\t        0: {\n\t          1: 0\n\t        }\n\t      }; // \"每个节点对应的折线\"的缓存对象\n\t      // d是起点到对应节点的编辑距离,简而言之,若把新增一个节点或删除一个节点都视作一次\"操作\",那么通过d次操作可以从起点到达对应节点\n\n\t      for (var d = 0; d <= lengthSum; d++) {\n\t        var tmp = {};\n\n\t        for (var k = -d; k <= d; k += 2) {\n\t          // 转换坐标系,k可以视为对应节点(x,y)的x坐标值减y坐标值\n\t          var down = k === -d || k !== d && v[k - 1] < v[k + 1];\n\t          var kPrev = down ? k + 1 : k - 1;\n\t          var xStart = v[kPrev]; // let yStart = xStart - kPrev;\n\n\t          var xMid = down ? xStart : xStart + 1;\n\t          var yMid = xMid - k;\n\t          var xEnd = xMid;\n\t          var yEnd = yMid;\n\n\t          while (xEnd < oldLen && yEnd < newLen && this.getElement(oldObj, xEnd) === this.getElement(newObj, yEnd)) {\n\t            xEnd += 1;\n\t            yEnd += 1;\n\t          }\n\n\t          v[k] = xEnd;\n\t          tmp[k] = xEnd;\n\n\t          if (xEnd >= oldLen && yEnd >= newLen) {\n\t            // 成功抵达终点\n\t            allSnakes[d] = tmp;\n\t            return this.$backtraceSnakes(allSnakes, newLen, oldLen, d);\n\t          }\n\t        }\n\n\t        allSnakes[d] = tmp;\n\t      }\n\n\t      return [];\n\t    }\n\t    /**\n\t     * 回溯,找出关键路径对应的折线\n\t     */\n\n\t  }, {\n\t    key: \"$backtraceSnakes\",\n\t    value: function $backtraceSnakes(allSnakes, newLen, oldLen, d) {\n\t      var keySnakes = [];\n\t      var p = {\n\t        x: oldLen,\n\t        y: newLen\n\t      }; // 模拟节点,从终点开始\n\t      // 执行回溯,倒回起点,找到并记录关键路径\n\n\t      for (var i = d; i > 0; i--) {\n\t        var v = allSnakes[i];\n\t        var vPrev = allSnakes[i - 1];\n\t        var k = p.x - p.y;\n\t        var xEnd = v[k]; // let yEnd = xEnd - k;\n\n\t        var down = k === -i || k !== i && vPrev[k + 1] > vPrev[k - 1];\n\t        var kPrev = down ? k + 1 : k - 1;\n\t        var xStart = vPrev[kPrev];\n\t        var yStart = xStart - kPrev;\n\t        var xMid = down ? xStart : xStart + 1; // let yMid = xMid - k;\n\n\t        keySnakes.unshift({\n\t          xStart: xStart,\n\t          xMid: xMid,\n\t          xEnd: xEnd\n\t        });\n\t        p.x = xStart;\n\t        p.y = yStart;\n\t      }\n\n\t      return keySnakes;\n\t    }\n\t    /**\n\t     * 组装出返回值\n\t     */\n\n\t  }, {\n\t    key: \"assembleResult\",\n\t    value: function assembleResult(snakes, newObj, oldObj) {\n\t      var _this = this,\n\t          _context;\n\n\t      var grayColor = 'color: gray';\n\t      var redColor = 'color: red';\n\t      var greenColor = 'color: green';\n\t      var blueColor = 'color: blue';\n\t      var consoleStr = '';\n\t      var args = [];\n\t      var yOffset = 0;\n\t      var result = []; // 返回的操作集\n\n\t      var change = {}; // 本次操作\n\n\t      var lastChange = {}; // 缓存上一次操作\n\n\t      var firstDeleteChange = {}; // 连续删除时用来缓存最初的删除\n\n\t      forEach$3(snakes).call(snakes, function (snake, index) {\n\t        var currentPos = snake.xStart;\n\n\t        if (index === 0 && snake.xStart !== 0) {\n\t          for (var j = 0; j < snake.xStart; j++) {\n\t            consoleStr += \"%c\".concat(_this.getElement(oldObj, j), \", \");\n\t            args.push(grayColor);\n\t            yOffset += 1;\n\t          }\n\t        }\n\n\t        if (snake.xMid - snake.xStart === 1) {\n\t          // 删除\n\t          change = {\n\t            type: 'delete',\n\t            oldIndex: snake.xStart,\n\t            newIndex: 0\n\t          };\n\n\t          if (lastChange.type === 'delete' && lastChange.oldIndex === change.oldIndex - 1) {\n\t            // 检测到连续删除,缓存最初的删除\n\t            firstDeleteChange = firstDeleteChange ? lastChange : firstDeleteChange;\n\t          }\n\n\t          result.push(change);\n\t          lastChange = change;\n\t          consoleStr += \"%c\".concat(_this.getElement(oldObj, snake.xStart), \", \");\n\t          args.push(redColor);\n\t          currentPos = snake.xMid;\n\t        } else {\n\t          // 添加\n\t          change = {\n\t            type: 'insert',\n\t            oldIndex: snake.xStart,\n\t            newIndex: yOffset\n\t          };\n\n\t          if (lastChange.type === 'delete' && lastChange.oldIndex === change.oldIndex - 1) {\n\t            // 和上一条删除合并为\"更新\"\n\t            result.pop();\n\t            firstDeleteChange = firstDeleteChange ? lastChange : firstDeleteChange;\n\t            change = {\n\t              type: 'update',\n\t              oldIndex: firstDeleteChange.oldIndex,\n\t              // 合并时,更新目标定位连续删除块中的首个元素\n\t              newIndex: yOffset\n\t            };\n\t            args.push(blueColor);\n\t          } else {\n\t            args.push(greenColor);\n\t          }\n\n\t          firstDeleteChange = {};\n\t          result.push(change);\n\t          lastChange = change;\n\t          consoleStr += \"%c\".concat(_this.getElement(newObj, yOffset), \", \");\n\t          yOffset += 1;\n\t        } // 不变\n\n\n\t        for (var i = 0; i < snake.xEnd - currentPos; i++) {\n\t          consoleStr += \"%c\".concat(_this.getElement(oldObj, currentPos + i), \", \");\n\t          args.push(grayColor);\n\t          yOffset += 1;\n\t        }\n\t      });\n\n\t      Logger.log.apply(Logger, concat$5(_context = [consoleStr]).call(_context, args));\n\t      return result;\n\t    }\n\t  }]);\n\n\t  return MyersDiff;\n\t}();\n\n\tvar ITERATOR$7 = wellKnownSymbol('iterator');\n\n\tvar nativeUrl = !fails(function () {\n\t  // eslint-disable-next-line unicorn/relative-url-style -- required for testing\n\t  var url = new URL('b?a=1&b=2&c=3', 'http://a');\n\t  var searchParams = url.searchParams;\n\t  var result = '';\n\t  url.pathname = 'c%20d';\n\t  searchParams.forEach(function (value, key) {\n\t    searchParams['delete']('b');\n\t    result += key + value;\n\t  });\n\t  return (isPure && !url.toJSON)\n\t    || !searchParams.sort\n\t    || url.href !== 'http://a/c%20d?a=1&c=3'\n\t    || searchParams.get('c') !== '3'\n\t    || String(new URLSearchParams('?a=1')) !== 'a=1'\n\t    || !searchParams[ITERATOR$7]\n\t    // throws in Edge\n\t    || new URL('https://a@b').username !== 'a'\n\t    || new URLSearchParams(new URLSearchParams('a=b')).get('a') !== 'b'\n\t    // not punycoded in Edge\n\t    || new URL('http://тест').host !== 'xn--e1aybc'\n\t    // not escaped in Chrome 62-\n\t    || new URL('http://a#б').hash !== '#%D0%B1'\n\t    // fails in Chrome 66-\n\t    || result !== 'a1c3'\n\t    // throws in Safari\n\t    || new URL('http://x', undefined).host !== 'x';\n\t});\n\n\tvar defineBuiltInAccessor = function (target, name, descriptor) {\n\t  return objectDefineProperty.f(target, name, descriptor);\n\t};\n\n\t// based on https://github.com/bestiejs/punycode.js/blob/master/punycode.js\n\n\n\n\tvar maxInt = 2147483647; // aka. 0x7FFFFFFF or 2^31-1\n\tvar base = 36;\n\tvar tMin = 1;\n\tvar tMax = 26;\n\tvar skew = 38;\n\tvar damp = 700;\n\tvar initialBias = 72;\n\tvar initialN = 128; // 0x80\n\tvar delimiter = '-'; // '\\x2D'\n\tvar regexNonASCII = /[^\\0-\\u007E]/; // non-ASCII chars\n\tvar regexSeparators = /[.\\u3002\\uFF0E\\uFF61]/g; // RFC 3490 separators\n\tvar OVERFLOW_ERROR = 'Overflow: input needs wider integers to process';\n\tvar baseMinusTMin = base - tMin;\n\n\tvar RangeError$3 = global_1.RangeError;\n\tvar exec$3 = functionUncurryThis(regexSeparators.exec);\n\tvar floor$1 = Math.floor;\n\tvar fromCharCode$1 = String.fromCharCode;\n\tvar charCodeAt$2 = functionUncurryThis(''.charCodeAt);\n\tvar join$2 = functionUncurryThis([].join);\n\tvar push$6 = functionUncurryThis([].push);\n\tvar replace$2 = functionUncurryThis(''.replace);\n\tvar split$1 = functionUncurryThis(''.split);\n\tvar toLowerCase = functionUncurryThis(''.toLowerCase);\n\n\t/**\n\t * Creates an array containing the numeric code points of each Unicode\n\t * character in the string. While JavaScript uses UCS-2 internally,\n\t * this function will convert a pair of surrogate halves (each of which\n\t * UCS-2 exposes as separate characters) into a single code point,\n\t * matching UTF-16.\n\t */\n\tvar ucs2decode = function (string) {\n\t  var output = [];\n\t  var counter = 0;\n\t  var length = string.length;\n\t  while (counter < length) {\n\t    var value = charCodeAt$2(string, counter++);\n\t    if (value >= 0xD800 && value <= 0xDBFF && counter < length) {\n\t      // It's a high surrogate, and there is a next character.\n\t      var extra = charCodeAt$2(string, counter++);\n\t      if ((extra & 0xFC00) == 0xDC00) { // Low surrogate.\n\t        push$6(output, ((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000);\n\t      } else {\n\t        // It's an unmatched surrogate; only append this code unit, in case the\n\t        // next code unit is the high surrogate of a surrogate pair.\n\t        push$6(output, value);\n\t        counter--;\n\t      }\n\t    } else {\n\t      push$6(output, value);\n\t    }\n\t  }\n\t  return output;\n\t};\n\n\t/**\n\t * Converts a digit/integer into a basic code point.\n\t */\n\tvar digitToBasic = function (digit) {\n\t  //  0..25 map to ASCII a..z or A..Z\n\t  // 26..35 map to ASCII 0..9\n\t  return digit + 22 + 75 * (digit < 26);\n\t};\n\n\t/**\n\t * Bias adaptation function as per section 3.4 of RFC 3492.\n\t * https://tools.ietf.org/html/rfc3492#section-3.4\n\t */\n\tvar adapt = function (delta, numPoints, firstTime) {\n\t  var k = 0;\n\t  delta = firstTime ? floor$1(delta / damp) : delta >> 1;\n\t  delta += floor$1(delta / numPoints);\n\t  while (delta > baseMinusTMin * tMax >> 1) {\n\t    delta = floor$1(delta / baseMinusTMin);\n\t    k += base;\n\t  }\n\t  return floor$1(k + (baseMinusTMin + 1) * delta / (delta + skew));\n\t};\n\n\t/**\n\t * Converts a string of Unicode symbols (e.g. a domain name label) to a\n\t * Punycode string of ASCII-only symbols.\n\t */\n\tvar encode = function (input) {\n\t  var output = [];\n\n\t  // Convert the input in UCS-2 to an array of Unicode code points.\n\t  input = ucs2decode(input);\n\n\t  // Cache the length.\n\t  var inputLength = input.length;\n\n\t  // Initialize the state.\n\t  var n = initialN;\n\t  var delta = 0;\n\t  var bias = initialBias;\n\t  var i, currentValue;\n\n\t  // Handle the basic code points.\n\t  for (i = 0; i < input.length; i++) {\n\t    currentValue = input[i];\n\t    if (currentValue < 0x80) {\n\t      push$6(output, fromCharCode$1(currentValue));\n\t    }\n\t  }\n\n\t  var basicLength = output.length; // number of basic code points.\n\t  var handledCPCount = basicLength; // number of code points that have been handled;\n\n\t  // Finish the basic string with a delimiter unless it's empty.\n\t  if (basicLength) {\n\t    push$6(output, delimiter);\n\t  }\n\n\t  // Main encoding loop:\n\t  while (handledCPCount < inputLength) {\n\t    // All non-basic code points < n have been handled already. Find the next larger one:\n\t    var m = maxInt;\n\t    for (i = 0; i < input.length; i++) {\n\t      currentValue = input[i];\n\t      if (currentValue >= n && currentValue < m) {\n\t        m = currentValue;\n\t      }\n\t    }\n\n\t    // Increase `delta` enough to advance the decoder's <n,i> state to <m,0>, but guard against overflow.\n\t    var handledCPCountPlusOne = handledCPCount + 1;\n\t    if (m - n > floor$1((maxInt - delta) / handledCPCountPlusOne)) {\n\t      throw RangeError$3(OVERFLOW_ERROR);\n\t    }\n\n\t    delta += (m - n) * handledCPCountPlusOne;\n\t    n = m;\n\n\t    for (i = 0; i < input.length; i++) {\n\t      currentValue = input[i];\n\t      if (currentValue < n && ++delta > maxInt) {\n\t        throw RangeError$3(OVERFLOW_ERROR);\n\t      }\n\t      if (currentValue == n) {\n\t        // Represent delta as a generalized variable-length integer.\n\t        var q = delta;\n\t        var k = base;\n\t        while (true) {\n\t          var t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);\n\t          if (q < t) break;\n\t          var qMinusT = q - t;\n\t          var baseMinusT = base - t;\n\t          push$6(output, fromCharCode$1(digitToBasic(t + qMinusT % baseMinusT)));\n\t          q = floor$1(qMinusT / baseMinusT);\n\t          k += base;\n\t        }\n\n\t        push$6(output, fromCharCode$1(digitToBasic(q)));\n\t        bias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength);\n\t        delta = 0;\n\t        handledCPCount++;\n\t      }\n\t    }\n\n\t    delta++;\n\t    n++;\n\t  }\n\t  return join$2(output, '');\n\t};\n\n\tvar stringPunycodeToAscii = function (input) {\n\t  var encoded = [];\n\t  var labels = split$1(replace$2(toLowerCase(input), regexSeparators, '\\u002E'), '.');\n\t  var i, label;\n\t  for (i = 0; i < labels.length; i++) {\n\t    label = labels[i];\n\t    push$6(encoded, exec$3(regexNonASCII, label) ? 'xn--' + encode(label) : label);\n\t  }\n\t  return join$2(encoded, '.');\n\t};\n\n\tvar floor$2 = Math.floor;\n\n\tvar mergeSort = function (array, comparefn) {\n\t  var length = array.length;\n\t  var middle = floor$2(length / 2);\n\t  return length < 8 ? insertionSort(array, comparefn) : merge(\n\t    array,\n\t    mergeSort(arraySliceSimple(array, 0, middle), comparefn),\n\t    mergeSort(arraySliceSimple(array, middle), comparefn),\n\t    comparefn\n\t  );\n\t};\n\n\tvar insertionSort = function (array, comparefn) {\n\t  var length = array.length;\n\t  var i = 1;\n\t  var element, j;\n\n\t  while (i < length) {\n\t    j = i;\n\t    element = array[i];\n\t    while (j && comparefn(array[j - 1], element) > 0) {\n\t      array[j] = array[--j];\n\t    }\n\t    if (j !== i++) array[j] = element;\n\t  } return array;\n\t};\n\n\tvar merge = function (array, left, right, comparefn) {\n\t  var llength = left.length;\n\t  var rlength = right.length;\n\t  var lindex = 0;\n\t  var rindex = 0;\n\n\t  while (lindex < llength || rindex < rlength) {\n\t    array[lindex + rindex] = (lindex < llength && rindex < rlength)\n\t      ? comparefn(left[lindex], right[rindex]) <= 0 ? left[lindex++] : right[rindex++]\n\t      : lindex < llength ? left[lindex++] : right[rindex++];\n\t  } return array;\n\t};\n\n\tvar arraySort = mergeSort;\n\n\t// TODO: in core-js@4, move /modules/ dependencies to public entries for better optimization by tools like `preset-env`\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\tvar ITERATOR$8 = wellKnownSymbol('iterator');\n\tvar URL_SEARCH_PARAMS = 'URLSearchParams';\n\tvar URL_SEARCH_PARAMS_ITERATOR = URL_SEARCH_PARAMS + 'Iterator';\n\tvar setInternalState$5 = internalState.set;\n\tvar getInternalParamsState = internalState.getterFor(URL_SEARCH_PARAMS);\n\tvar getInternalIteratorState = internalState.getterFor(URL_SEARCH_PARAMS_ITERATOR);\n\t// eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe\n\tvar getOwnPropertyDescriptor$8 = Object.getOwnPropertyDescriptor;\n\n\t// Avoid NodeJS experimental warning\n\tvar safeGetBuiltIn = function (name) {\n\t  if (!descriptors) return global_1[name];\n\t  var descriptor = getOwnPropertyDescriptor$8(global_1, name);\n\t  return descriptor && descriptor.value;\n\t};\n\n\tvar nativeFetch = safeGetBuiltIn('fetch');\n\tvar NativeRequest = safeGetBuiltIn('Request');\n\tvar Headers = safeGetBuiltIn('Headers');\n\tvar RequestPrototype = NativeRequest && NativeRequest.prototype;\n\tvar HeadersPrototype = Headers && Headers.prototype;\n\tvar RegExp$1 = global_1.RegExp;\n\tvar TypeError$m = global_1.TypeError;\n\tvar decodeURIComponent$1 = global_1.decodeURIComponent;\n\tvar encodeURIComponent$1 = global_1.encodeURIComponent;\n\tvar charAt$4 = functionUncurryThis(''.charAt);\n\tvar join$3 = functionUncurryThis([].join);\n\tvar push$7 = functionUncurryThis([].push);\n\tvar replace$3 = functionUncurryThis(''.replace);\n\tvar shift = functionUncurryThis([].shift);\n\tvar splice$5 = functionUncurryThis([].splice);\n\tvar split$2 = functionUncurryThis(''.split);\n\tvar stringSlice$3 = functionUncurryThis(''.slice);\n\n\tvar plus = /\\+/g;\n\tvar sequences = Array(4);\n\n\tvar percentSequence = function (bytes) {\n\t  return sequences[bytes - 1] || (sequences[bytes - 1] = RegExp$1('((?:%[\\\\da-f]{2}){' + bytes + '})', 'gi'));\n\t};\n\n\tvar percentDecode = function (sequence) {\n\t  try {\n\t    return decodeURIComponent$1(sequence);\n\t  } catch (error) {\n\t    return sequence;\n\t  }\n\t};\n\n\tvar deserialize = function (it) {\n\t  var result = replace$3(it, plus, ' ');\n\t  var bytes = 4;\n\t  try {\n\t    return decodeURIComponent$1(result);\n\t  } catch (error) {\n\t    while (bytes) {\n\t      result = replace$3(result, percentSequence(bytes--), percentDecode);\n\t    }\n\t    return result;\n\t  }\n\t};\n\n\tvar find$4 = /[!'()~]|%20/g;\n\n\tvar replacements = {\n\t  '!': '%21',\n\t  \"'\": '%27',\n\t  '(': '%28',\n\t  ')': '%29',\n\t  '~': '%7E',\n\t  '%20': '+'\n\t};\n\n\tvar replacer = function (match) {\n\t  return replacements[match];\n\t};\n\n\tvar serialize = function (it) {\n\t  return replace$3(encodeURIComponent$1(it), find$4, replacer);\n\t};\n\n\tvar URLSearchParamsIterator = createIteratorConstructor(function Iterator(params, kind) {\n\t  setInternalState$5(this, {\n\t    type: URL_SEARCH_PARAMS_ITERATOR,\n\t    iterator: getIterator(getInternalParamsState(params).entries),\n\t    kind: kind\n\t  });\n\t}, 'Iterator', function next() {\n\t  var state = getInternalIteratorState(this);\n\t  var kind = state.kind;\n\t  var step = state.iterator.next();\n\t  var entry = step.value;\n\t  if (!step.done) {\n\t    step.value = kind === 'keys' ? entry.key : kind === 'values' ? entry.value : [entry.key, entry.value];\n\t  } return step;\n\t}, true);\n\n\tvar URLSearchParamsState = function (init) {\n\t  this.entries = [];\n\t  this.url = null;\n\n\t  if (init !== undefined) {\n\t    if (isObject(init)) this.parseObject(init);\n\t    else this.parseQuery(typeof init == 'string' ? charAt$4(init, 0) === '?' ? stringSlice$3(init, 1) : init : toString_1(init));\n\t  }\n\t};\n\n\tURLSearchParamsState.prototype = {\n\t  type: URL_SEARCH_PARAMS,\n\t  bindURL: function (url) {\n\t    this.url = url;\n\t    this.update();\n\t  },\n\t  parseObject: function (object) {\n\t    var iteratorMethod = getIteratorMethod(object);\n\t    var iterator, next, step, entryIterator, entryNext, first, second;\n\n\t    if (iteratorMethod) {\n\t      iterator = getIterator(object, iteratorMethod);\n\t      next = iterator.next;\n\t      while (!(step = functionCall(next, iterator)).done) {\n\t        entryIterator = getIterator(anObject(step.value));\n\t        entryNext = entryIterator.next;\n\t        if (\n\t          (first = functionCall(entryNext, entryIterator)).done ||\n\t          (second = functionCall(entryNext, entryIterator)).done ||\n\t          !functionCall(entryNext, entryIterator).done\n\t        ) throw TypeError$m('Expected sequence with length 2');\n\t        push$7(this.entries, { key: toString_1(first.value), value: toString_1(second.value) });\n\t      }\n\t    } else for (var key in object) if (hasOwnProperty_1(object, key)) {\n\t      push$7(this.entries, { key: key, value: toString_1(object[key]) });\n\t    }\n\t  },\n\t  parseQuery: function (query) {\n\t    if (query) {\n\t      var attributes = split$2(query, '&');\n\t      var index = 0;\n\t      var attribute, entry;\n\t      while (index < attributes.length) {\n\t        attribute = attributes[index++];\n\t        if (attribute.length) {\n\t          entry = split$2(attribute, '=');\n\t          push$7(this.entries, {\n\t            key: deserialize(shift(entry)),\n\t            value: deserialize(join$3(entry, '='))\n\t          });\n\t        }\n\t      }\n\t    }\n\t  },\n\t  serialize: function () {\n\t    var entries = this.entries;\n\t    var result = [];\n\t    var index = 0;\n\t    var entry;\n\t    while (index < entries.length) {\n\t      entry = entries[index++];\n\t      push$7(result, serialize(entry.key) + '=' + serialize(entry.value));\n\t    } return join$3(result, '&');\n\t  },\n\t  update: function () {\n\t    this.entries.length = 0;\n\t    this.parseQuery(this.url.query);\n\t  },\n\t  updateURL: function () {\n\t    if (this.url) this.url.update();\n\t  }\n\t};\n\n\t// `URLSearchParams` constructor\n\t// https://url.spec.whatwg.org/#interface-urlsearchparams\n\tvar URLSearchParamsConstructor = function URLSearchParams(/* init */) {\n\t  anInstance(this, URLSearchParamsPrototype);\n\t  var init = arguments.length > 0 ? arguments[0] : undefined;\n\t  setInternalState$5(this, new URLSearchParamsState(init));\n\t};\n\n\tvar URLSearchParamsPrototype = URLSearchParamsConstructor.prototype;\n\n\tdefineBuiltIns(URLSearchParamsPrototype, {\n\t  // `URLSearchParams.prototype.append` method\n\t  // https://url.spec.whatwg.org/#dom-urlsearchparams-append\n\t  append: function append(name, value) {\n\t    validateArgumentsLength(arguments.length, 2);\n\t    var state = getInternalParamsState(this);\n\t    push$7(state.entries, { key: toString_1(name), value: toString_1(value) });\n\t    state.updateURL();\n\t  },\n\t  // `URLSearchParams.prototype.delete` method\n\t  // https://url.spec.whatwg.org/#dom-urlsearchparams-delete\n\t  'delete': function (name) {\n\t    validateArgumentsLength(arguments.length, 1);\n\t    var state = getInternalParamsState(this);\n\t    var entries = state.entries;\n\t    var key = toString_1(name);\n\t    var index = 0;\n\t    while (index < entries.length) {\n\t      if (entries[index].key === key) splice$5(entries, index, 1);\n\t      else index++;\n\t    }\n\t    state.updateURL();\n\t  },\n\t  // `URLSearchParams.prototype.get` method\n\t  // https://url.spec.whatwg.org/#dom-urlsearchparams-get\n\t  get: function get(name) {\n\t    validateArgumentsLength(arguments.length, 1);\n\t    var entries = getInternalParamsState(this).entries;\n\t    var key = toString_1(name);\n\t    var index = 0;\n\t    for (; index < entries.length; index++) {\n\t      if (entries[index].key === key) return entries[index].value;\n\t    }\n\t    return null;\n\t  },\n\t  // `URLSearchParams.prototype.getAll` method\n\t  // https://url.spec.whatwg.org/#dom-urlsearchparams-getall\n\t  getAll: function getAll(name) {\n\t    validateArgumentsLength(arguments.length, 1);\n\t    var entries = getInternalParamsState(this).entries;\n\t    var key = toString_1(name);\n\t    var result = [];\n\t    var index = 0;\n\t    for (; index < entries.length; index++) {\n\t      if (entries[index].key === key) push$7(result, entries[index].value);\n\t    }\n\t    return result;\n\t  },\n\t  // `URLSearchParams.prototype.has` method\n\t  // https://url.spec.whatwg.org/#dom-urlsearchparams-has\n\t  has: function has(name) {\n\t    validateArgumentsLength(arguments.length, 1);\n\t    var entries = getInternalParamsState(this).entries;\n\t    var key = toString_1(name);\n\t    var index = 0;\n\t    while (index < entries.length) {\n\t      if (entries[index++].key === key) return true;\n\t    }\n\t    return false;\n\t  },\n\t  // `URLSearchParams.prototype.set` method\n\t  // https://url.spec.whatwg.org/#dom-urlsearchparams-set\n\t  set: function set(name, value) {\n\t    validateArgumentsLength(arguments.length, 1);\n\t    var state = getInternalParamsState(this);\n\t    var entries = state.entries;\n\t    var found = false;\n\t    var key = toString_1(name);\n\t    var val = toString_1(value);\n\t    var index = 0;\n\t    var entry;\n\t    for (; index < entries.length; index++) {\n\t      entry = entries[index];\n\t      if (entry.key === key) {\n\t        if (found) splice$5(entries, index--, 1);\n\t        else {\n\t          found = true;\n\t          entry.value = val;\n\t        }\n\t      }\n\t    }\n\t    if (!found) push$7(entries, { key: key, value: val });\n\t    state.updateURL();\n\t  },\n\t  // `URLSearchParams.prototype.sort` method\n\t  // https://url.spec.whatwg.org/#dom-urlsearchparams-sort\n\t  sort: function sort() {\n\t    var state = getInternalParamsState(this);\n\t    arraySort(state.entries, function (a, b) {\n\t      return a.key > b.key ? 1 : -1;\n\t    });\n\t    state.updateURL();\n\t  },\n\t  // `URLSearchParams.prototype.forEach` method\n\t  forEach: function forEach(callback /* , thisArg */) {\n\t    var entries = getInternalParamsState(this).entries;\n\t    var boundFunction = functionBindContext(callback, arguments.length > 1 ? arguments[1] : undefined);\n\t    var index = 0;\n\t    var entry;\n\t    while (index < entries.length) {\n\t      entry = entries[index++];\n\t      boundFunction(entry.value, entry.key, this);\n\t    }\n\t  },\n\t  // `URLSearchParams.prototype.keys` method\n\t  keys: function keys() {\n\t    return new URLSearchParamsIterator(this, 'keys');\n\t  },\n\t  // `URLSearchParams.prototype.values` method\n\t  values: function values() {\n\t    return new URLSearchParamsIterator(this, 'values');\n\t  },\n\t  // `URLSearchParams.prototype.entries` method\n\t  entries: function entries() {\n\t    return new URLSearchParamsIterator(this, 'entries');\n\t  }\n\t}, { enumerable: true });\n\n\t// `URLSearchParams.prototype[@@iterator]` method\n\tdefineBuiltIn(URLSearchParamsPrototype, ITERATOR$8, URLSearchParamsPrototype.entries, { name: 'entries' });\n\n\t// `URLSearchParams.prototype.toString` method\n\t// https://url.spec.whatwg.org/#urlsearchparams-stringification-behavior\n\tdefineBuiltIn(URLSearchParamsPrototype, 'toString', function toString() {\n\t  return getInternalParamsState(this).serialize();\n\t}, { enumerable: true });\n\n\tsetToStringTag(URLSearchParamsConstructor, URL_SEARCH_PARAMS);\n\n\t_export({ global: true, constructor: true, forced: !nativeUrl }, {\n\t  URLSearchParams: URLSearchParamsConstructor\n\t});\n\n\t// Wrap `fetch` and `Request` for correct work with polyfilled `URLSearchParams`\n\tif (!nativeUrl && isCallable(Headers)) {\n\t  var headersHas = functionUncurryThis(HeadersPrototype.has);\n\t  var headersSet = functionUncurryThis(HeadersPrototype.set);\n\n\t  var wrapRequestOptions = function (init) {\n\t    if (isObject(init)) {\n\t      var body = init.body;\n\t      var headers;\n\t      if (classof(body) === URL_SEARCH_PARAMS) {\n\t        headers = init.headers ? new Headers(init.headers) : new Headers();\n\t        if (!headersHas(headers, 'content-type')) {\n\t          headersSet(headers, 'content-type', 'application/x-www-form-urlencoded;charset=UTF-8');\n\t        }\n\t        return objectCreate(init, {\n\t          body: createPropertyDescriptor(0, toString_1(body)),\n\t          headers: createPropertyDescriptor(0, headers)\n\t        });\n\t      }\n\t    } return init;\n\t  };\n\n\t  if (isCallable(nativeFetch)) {\n\t    _export({ global: true, enumerable: true, dontCallGetSet: true, forced: true }, {\n\t      fetch: function fetch(input /* , init */) {\n\t        return nativeFetch(input, arguments.length > 1 ? wrapRequestOptions(arguments[1]) : {});\n\t      }\n\t    });\n\t  }\n\n\t  if (isCallable(NativeRequest)) {\n\t    var RequestConstructor = function Request(input /* , init */) {\n\t      anInstance(this, RequestPrototype);\n\t      return new NativeRequest(input, arguments.length > 1 ? wrapRequestOptions(arguments[1]) : {});\n\t    };\n\n\t    RequestPrototype.constructor = RequestConstructor;\n\t    RequestConstructor.prototype = RequestPrototype;\n\n\t    _export({ global: true, constructor: true, dontCallGetSet: true, forced: true }, {\n\t      Request: RequestConstructor\n\t    });\n\t  }\n\t}\n\n\tvar web_urlSearchParams_constructor = {\n\t  URLSearchParams: URLSearchParamsConstructor,\n\t  getState: getInternalParamsState\n\t};\n\n\t// TODO: in core-js@4, move /modules/ dependencies to public entries for better optimization by tools like `preset-env`\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\tvar codeAt = stringMultibyte.codeAt;\n\n\n\n\n\n\n\n\tvar setInternalState$6 = internalState.set;\n\tvar getInternalURLState = internalState.getterFor('URL');\n\tvar URLSearchParams$1 = web_urlSearchParams_constructor.URLSearchParams;\n\tvar getInternalSearchParamsState = web_urlSearchParams_constructor.getState;\n\n\tvar NativeURL = global_1.URL;\n\tvar TypeError$n = global_1.TypeError;\n\tvar parseInt$1 = global_1.parseInt;\n\tvar floor$3 = Math.floor;\n\tvar pow = Math.pow;\n\tvar charAt$5 = functionUncurryThis(''.charAt);\n\tvar exec$4 = functionUncurryThis(/./.exec);\n\tvar join$4 = functionUncurryThis([].join);\n\tvar numberToString$1 = functionUncurryThis(1.0.toString);\n\tvar pop = functionUncurryThis([].pop);\n\tvar push$8 = functionUncurryThis([].push);\n\tvar replace$4 = functionUncurryThis(''.replace);\n\tvar shift$1 = functionUncurryThis([].shift);\n\tvar split$3 = functionUncurryThis(''.split);\n\tvar stringSlice$4 = functionUncurryThis(''.slice);\n\tvar toLowerCase$1 = functionUncurryThis(''.toLowerCase);\n\tvar unshift = functionUncurryThis([].unshift);\n\n\tvar INVALID_AUTHORITY = 'Invalid authority';\n\tvar INVALID_SCHEME = 'Invalid scheme';\n\tvar INVALID_HOST = 'Invalid host';\n\tvar INVALID_PORT = 'Invalid port';\n\n\tvar ALPHA = /[a-z]/i;\n\t// eslint-disable-next-line regexp/no-obscure-range -- safe\n\tvar ALPHANUMERIC = /[\\d+-.a-z]/i;\n\tvar DIGIT = /\\d/;\n\tvar HEX_START = /^0x/i;\n\tvar OCT = /^[0-7]+$/;\n\tvar DEC = /^\\d+$/;\n\tvar HEX = /^[\\da-f]+$/i;\n\t/* eslint-disable regexp/no-control-character -- safe */\n\tvar FORBIDDEN_HOST_CODE_POINT = /[\\0\\t\\n\\r #%/:<>?@[\\\\\\]^|]/;\n\tvar FORBIDDEN_HOST_CODE_POINT_EXCLUDING_PERCENT = /[\\0\\t\\n\\r #/:<>?@[\\\\\\]^|]/;\n\tvar LEADING_AND_TRAILING_C0_CONTROL_OR_SPACE = /^[\\u0000-\\u0020]+|[\\u0000-\\u0020]+$/g;\n\tvar TAB_AND_NEW_LINE = /[\\t\\n\\r]/g;\n\t/* eslint-enable regexp/no-control-character -- safe */\n\tvar EOF;\n\n\t// https://url.spec.whatwg.org/#ipv4-number-parser\n\tvar parseIPv4 = function (input) {\n\t  var parts = split$3(input, '.');\n\t  var partsLength, numbers, index, part, radix, number, ipv4;\n\t  if (parts.length && parts[parts.length - 1] == '') {\n\t    parts.length--;\n\t  }\n\t  partsLength = parts.length;\n\t  if (partsLength > 4) return input;\n\t  numbers = [];\n\t  for (index = 0; index < partsLength; index++) {\n\t    part = parts[index];\n\t    if (part == '') return input;\n\t    radix = 10;\n\t    if (part.length > 1 && charAt$5(part, 0) == '0') {\n\t      radix = exec$4(HEX_START, part) ? 16 : 8;\n\t      part = stringSlice$4(part, radix == 8 ? 1 : 2);\n\t    }\n\t    if (part === '') {\n\t      number = 0;\n\t    } else {\n\t      if (!exec$4(radix == 10 ? DEC : radix == 8 ? OCT : HEX, part)) return input;\n\t      number = parseInt$1(part, radix);\n\t    }\n\t    push$8(numbers, number);\n\t  }\n\t  for (index = 0; index < partsLength; index++) {\n\t    number = numbers[index];\n\t    if (index == partsLength - 1) {\n\t      if (number >= pow(256, 5 - partsLength)) return null;\n\t    } else if (number > 255) return null;\n\t  }\n\t  ipv4 = pop(numbers);\n\t  for (index = 0; index < numbers.length; index++) {\n\t    ipv4 += numbers[index] * pow(256, 3 - index);\n\t  }\n\t  return ipv4;\n\t};\n\n\t// https://url.spec.whatwg.org/#concept-ipv6-parser\n\t// eslint-disable-next-line max-statements -- TODO\n\tvar parseIPv6 = function (input) {\n\t  var address = [0, 0, 0, 0, 0, 0, 0, 0];\n\t  var pieceIndex = 0;\n\t  var compress = null;\n\t  var pointer = 0;\n\t  var value, length, numbersSeen, ipv4Piece, number, swaps, swap;\n\n\t  var chr = function () {\n\t    return charAt$5(input, pointer);\n\t  };\n\n\t  if (chr() == ':') {\n\t    if (charAt$5(input, 1) != ':') return;\n\t    pointer += 2;\n\t    pieceIndex++;\n\t    compress = pieceIndex;\n\t  }\n\t  while (chr()) {\n\t    if (pieceIndex == 8) return;\n\t    if (chr() == ':') {\n\t      if (compress !== null) return;\n\t      pointer++;\n\t      pieceIndex++;\n\t      compress = pieceIndex;\n\t      continue;\n\t    }\n\t    value = length = 0;\n\t    while (length < 4 && exec$4(HEX, chr())) {\n\t      value = value * 16 + parseInt$1(chr(), 16);\n\t      pointer++;\n\t      length++;\n\t    }\n\t    if (chr() == '.') {\n\t      if (length == 0) return;\n\t      pointer -= length;\n\t      if (pieceIndex > 6) return;\n\t      numbersSeen = 0;\n\t      while (chr()) {\n\t        ipv4Piece = null;\n\t        if (numbersSeen > 0) {\n\t          if (chr() == '.' && numbersSeen < 4) pointer++;\n\t          else return;\n\t        }\n\t        if (!exec$4(DIGIT, chr())) return;\n\t        while (exec$4(DIGIT, chr())) {\n\t          number = parseInt$1(chr(), 10);\n\t          if (ipv4Piece === null) ipv4Piece = number;\n\t          else if (ipv4Piece == 0) return;\n\t          else ipv4Piece = ipv4Piece * 10 + number;\n\t          if (ipv4Piece > 255) return;\n\t          pointer++;\n\t        }\n\t        address[pieceIndex] = address[pieceIndex] * 256 + ipv4Piece;\n\t        numbersSeen++;\n\t        if (numbersSeen == 2 || numbersSeen == 4) pieceIndex++;\n\t      }\n\t      if (numbersSeen != 4) return;\n\t      break;\n\t    } else if (chr() == ':') {\n\t      pointer++;\n\t      if (!chr()) return;\n\t    } else if (chr()) return;\n\t    address[pieceIndex++] = value;\n\t  }\n\t  if (compress !== null) {\n\t    swaps = pieceIndex - compress;\n\t    pieceIndex = 7;\n\t    while (pieceIndex != 0 && swaps > 0) {\n\t      swap = address[pieceIndex];\n\t      address[pieceIndex--] = address[compress + swaps - 1];\n\t      address[compress + --swaps] = swap;\n\t    }\n\t  } else if (pieceIndex != 8) return;\n\t  return address;\n\t};\n\n\tvar findLongestZeroSequence = function (ipv6) {\n\t  var maxIndex = null;\n\t  var maxLength = 1;\n\t  var currStart = null;\n\t  var currLength = 0;\n\t  var index = 0;\n\t  for (; index < 8; index++) {\n\t    if (ipv6[index] !== 0) {\n\t      if (currLength > maxLength) {\n\t        maxIndex = currStart;\n\t        maxLength = currLength;\n\t      }\n\t      currStart = null;\n\t      currLength = 0;\n\t    } else {\n\t      if (currStart === null) currStart = index;\n\t      ++currLength;\n\t    }\n\t  }\n\t  if (currLength > maxLength) {\n\t    maxIndex = currStart;\n\t    maxLength = currLength;\n\t  }\n\t  return maxIndex;\n\t};\n\n\t// https://url.spec.whatwg.org/#host-serializing\n\tvar serializeHost = function (host) {\n\t  var result, index, compress, ignore0;\n\t  // ipv4\n\t  if (typeof host == 'number') {\n\t    result = [];\n\t    for (index = 0; index < 4; index++) {\n\t      unshift(result, host % 256);\n\t      host = floor$3(host / 256);\n\t    } return join$4(result, '.');\n\t  // ipv6\n\t  } else if (typeof host == 'object') {\n\t    result = '';\n\t    compress = findLongestZeroSequence(host);\n\t    for (index = 0; index < 8; index++) {\n\t      if (ignore0 && host[index] === 0) continue;\n\t      if (ignore0) ignore0 = false;\n\t      if (compress === index) {\n\t        result += index ? ':' : '::';\n\t        ignore0 = true;\n\t      } else {\n\t        result += numberToString$1(host[index], 16);\n\t        if (index < 7) result += ':';\n\t      }\n\t    }\n\t    return '[' + result + ']';\n\t  } return host;\n\t};\n\n\tvar C0ControlPercentEncodeSet = {};\n\tvar fragmentPercentEncodeSet = objectAssign({}, C0ControlPercentEncodeSet, {\n\t  ' ': 1, '\"': 1, '<': 1, '>': 1, '`': 1\n\t});\n\tvar pathPercentEncodeSet = objectAssign({}, fragmentPercentEncodeSet, {\n\t  '#': 1, '?': 1, '{': 1, '}': 1\n\t});\n\tvar userinfoPercentEncodeSet = objectAssign({}, pathPercentEncodeSet, {\n\t  '/': 1, ':': 1, ';': 1, '=': 1, '@': 1, '[': 1, '\\\\': 1, ']': 1, '^': 1, '|': 1\n\t});\n\n\tvar percentEncode = function (chr, set) {\n\t  var code = codeAt(chr, 0);\n\t  return code > 0x20 && code < 0x7F && !hasOwnProperty_1(set, chr) ? chr : encodeURIComponent(chr);\n\t};\n\n\t// https://url.spec.whatwg.org/#special-scheme\n\tvar specialSchemes = {\n\t  ftp: 21,\n\t  file: null,\n\t  http: 80,\n\t  https: 443,\n\t  ws: 80,\n\t  wss: 443\n\t};\n\n\t// https://url.spec.whatwg.org/#windows-drive-letter\n\tvar isWindowsDriveLetter = function (string, normalized) {\n\t  var second;\n\t  return string.length == 2 && exec$4(ALPHA, charAt$5(string, 0))\n\t    && ((second = charAt$5(string, 1)) == ':' || (!normalized && second == '|'));\n\t};\n\n\t// https://url.spec.whatwg.org/#start-with-a-windows-drive-letter\n\tvar startsWithWindowsDriveLetter = function (string) {\n\t  var third;\n\t  return string.length > 1 && isWindowsDriveLetter(stringSlice$4(string, 0, 2)) && (\n\t    string.length == 2 ||\n\t    ((third = charAt$5(string, 2)) === '/' || third === '\\\\' || third === '?' || third === '#')\n\t  );\n\t};\n\n\t// https://url.spec.whatwg.org/#single-dot-path-segment\n\tvar isSingleDot = function (segment) {\n\t  return segment === '.' || toLowerCase$1(segment) === '%2e';\n\t};\n\n\t// https://url.spec.whatwg.org/#double-dot-path-segment\n\tvar isDoubleDot = function (segment) {\n\t  segment = toLowerCase$1(segment);\n\t  return segment === '..' || segment === '%2e.' || segment === '.%2e' || segment === '%2e%2e';\n\t};\n\n\t// States:\n\tvar SCHEME_START = {};\n\tvar SCHEME = {};\n\tvar NO_SCHEME = {};\n\tvar SPECIAL_RELATIVE_OR_AUTHORITY = {};\n\tvar PATH_OR_AUTHORITY = {};\n\tvar RELATIVE = {};\n\tvar RELATIVE_SLASH = {};\n\tvar SPECIAL_AUTHORITY_SLASHES = {};\n\tvar SPECIAL_AUTHORITY_IGNORE_SLASHES = {};\n\tvar AUTHORITY = {};\n\tvar HOST = {};\n\tvar HOSTNAME = {};\n\tvar PORT = {};\n\tvar FILE = {};\n\tvar FILE_SLASH = {};\n\tvar FILE_HOST = {};\n\tvar PATH_START = {};\n\tvar PATH = {};\n\tvar CANNOT_BE_A_BASE_URL_PATH = {};\n\tvar QUERY = {};\n\tvar FRAGMENT = {};\n\n\tvar URLState = function (url, isBase, base) {\n\t  var urlString = toString_1(url);\n\t  var baseState, failure, searchParams;\n\t  if (isBase) {\n\t    failure = this.parse(urlString);\n\t    if (failure) throw TypeError$n(failure);\n\t    this.searchParams = null;\n\t  } else {\n\t    if (base !== undefined) baseState = new URLState(base, true);\n\t    failure = this.parse(urlString, null, baseState);\n\t    if (failure) throw TypeError$n(failure);\n\t    searchParams = getInternalSearchParamsState(new URLSearchParams$1());\n\t    searchParams.bindURL(this);\n\t    this.searchParams = searchParams;\n\t  }\n\t};\n\n\tURLState.prototype = {\n\t  type: 'URL',\n\t  // https://url.spec.whatwg.org/#url-parsing\n\t  // eslint-disable-next-line max-statements -- TODO\n\t  parse: function (input, stateOverride, base) {\n\t    var url = this;\n\t    var state = stateOverride || SCHEME_START;\n\t    var pointer = 0;\n\t    var buffer = '';\n\t    var seenAt = false;\n\t    var seenBracket = false;\n\t    var seenPasswordToken = false;\n\t    var codePoints, chr, bufferCodePoints, failure;\n\n\t    input = toString_1(input);\n\n\t    if (!stateOverride) {\n\t      url.scheme = '';\n\t      url.username = '';\n\t      url.password = '';\n\t      url.host = null;\n\t      url.port = null;\n\t      url.path = [];\n\t      url.query = null;\n\t      url.fragment = null;\n\t      url.cannotBeABaseURL = false;\n\t      input = replace$4(input, LEADING_AND_TRAILING_C0_CONTROL_OR_SPACE, '');\n\t    }\n\n\t    input = replace$4(input, TAB_AND_NEW_LINE, '');\n\n\t    codePoints = arrayFrom(input);\n\n\t    while (pointer <= codePoints.length) {\n\t      chr = codePoints[pointer];\n\t      switch (state) {\n\t        case SCHEME_START:\n\t          if (chr && exec$4(ALPHA, chr)) {\n\t            buffer += toLowerCase$1(chr);\n\t            state = SCHEME;\n\t          } else if (!stateOverride) {\n\t            state = NO_SCHEME;\n\t            continue;\n\t          } else return INVALID_SCHEME;\n\t          break;\n\n\t        case SCHEME:\n\t          if (chr && (exec$4(ALPHANUMERIC, chr) || chr == '+' || chr == '-' || chr == '.')) {\n\t            buffer += toLowerCase$1(chr);\n\t          } else if (chr == ':') {\n\t            if (stateOverride && (\n\t              (url.isSpecial() != hasOwnProperty_1(specialSchemes, buffer)) ||\n\t              (buffer == 'file' && (url.includesCredentials() || url.port !== null)) ||\n\t              (url.scheme == 'file' && !url.host)\n\t            )) return;\n\t            url.scheme = buffer;\n\t            if (stateOverride) {\n\t              if (url.isSpecial() && specialSchemes[url.scheme] == url.port) url.port = null;\n\t              return;\n\t            }\n\t            buffer = '';\n\t            if (url.scheme == 'file') {\n\t              state = FILE;\n\t            } else if (url.isSpecial() && base && base.scheme == url.scheme) {\n\t              state = SPECIAL_RELATIVE_OR_AUTHORITY;\n\t            } else if (url.isSpecial()) {\n\t              state = SPECIAL_AUTHORITY_SLASHES;\n\t            } else if (codePoints[pointer + 1] == '/') {\n\t              state = PATH_OR_AUTHORITY;\n\t              pointer++;\n\t            } else {\n\t              url.cannotBeABaseURL = true;\n\t              push$8(url.path, '');\n\t              state = CANNOT_BE_A_BASE_URL_PATH;\n\t            }\n\t          } else if (!stateOverride) {\n\t            buffer = '';\n\t            state = NO_SCHEME;\n\t            pointer = 0;\n\t            continue;\n\t          } else return INVALID_SCHEME;\n\t          break;\n\n\t        case NO_SCHEME:\n\t          if (!base || (base.cannotBeABaseURL && chr != '#')) return INVALID_SCHEME;\n\t          if (base.cannotBeABaseURL && chr == '#') {\n\t            url.scheme = base.scheme;\n\t            url.path = arraySliceSimple(base.path);\n\t            url.query = base.query;\n\t            url.fragment = '';\n\t            url.cannotBeABaseURL = true;\n\t            state = FRAGMENT;\n\t            break;\n\t          }\n\t          state = base.scheme == 'file' ? FILE : RELATIVE;\n\t          continue;\n\n\t        case SPECIAL_RELATIVE_OR_AUTHORITY:\n\t          if (chr == '/' && codePoints[pointer + 1] == '/') {\n\t            state = SPECIAL_AUTHORITY_IGNORE_SLASHES;\n\t            pointer++;\n\t          } else {\n\t            state = RELATIVE;\n\t            continue;\n\t          } break;\n\n\t        case PATH_OR_AUTHORITY:\n\t          if (chr == '/') {\n\t            state = AUTHORITY;\n\t            break;\n\t          } else {\n\t            state = PATH;\n\t            continue;\n\t          }\n\n\t        case RELATIVE:\n\t          url.scheme = base.scheme;\n\t          if (chr == EOF) {\n\t            url.username = base.username;\n\t            url.password = base.password;\n\t            url.host = base.host;\n\t            url.port = base.port;\n\t            url.path = arraySliceSimple(base.path);\n\t            url.query = base.query;\n\t          } else if (chr == '/' || (chr == '\\\\' && url.isSpecial())) {\n\t            state = RELATIVE_SLASH;\n\t          } else if (chr == '?') {\n\t            url.username = base.username;\n\t            url.password = base.password;\n\t            url.host = base.host;\n\t            url.port = base.port;\n\t            url.path = arraySliceSimple(base.path);\n\t            url.query = '';\n\t            state = QUERY;\n\t          } else if (chr == '#') {\n\t            url.username = base.username;\n\t            url.password = base.password;\n\t            url.host = base.host;\n\t            url.port = base.port;\n\t            url.path = arraySliceSimple(base.path);\n\t            url.query = base.query;\n\t            url.fragment = '';\n\t            state = FRAGMENT;\n\t          } else {\n\t            url.username = base.username;\n\t            url.password = base.password;\n\t            url.host = base.host;\n\t            url.port = base.port;\n\t            url.path = arraySliceSimple(base.path);\n\t            url.path.length--;\n\t            state = PATH;\n\t            continue;\n\t          } break;\n\n\t        case RELATIVE_SLASH:\n\t          if (url.isSpecial() && (chr == '/' || chr == '\\\\')) {\n\t            state = SPECIAL_AUTHORITY_IGNORE_SLASHES;\n\t          } else if (chr == '/') {\n\t            state = AUTHORITY;\n\t          } else {\n\t            url.username = base.username;\n\t            url.password = base.password;\n\t            url.host = base.host;\n\t            url.port = base.port;\n\t            state = PATH;\n\t            continue;\n\t          } break;\n\n\t        case SPECIAL_AUTHORITY_SLASHES:\n\t          state = SPECIAL_AUTHORITY_IGNORE_SLASHES;\n\t          if (chr != '/' || charAt$5(buffer, pointer + 1) != '/') continue;\n\t          pointer++;\n\t          break;\n\n\t        case SPECIAL_AUTHORITY_IGNORE_SLASHES:\n\t          if (chr != '/' && chr != '\\\\') {\n\t            state = AUTHORITY;\n\t            continue;\n\t          } break;\n\n\t        case AUTHORITY:\n\t          if (chr == '@') {\n\t            if (seenAt) buffer = '%40' + buffer;\n\t            seenAt = true;\n\t            bufferCodePoints = arrayFrom(buffer);\n\t            for (var i = 0; i < bufferCodePoints.length; i++) {\n\t              var codePoint = bufferCodePoints[i];\n\t              if (codePoint == ':' && !seenPasswordToken) {\n\t                seenPasswordToken = true;\n\t                continue;\n\t              }\n\t              var encodedCodePoints = percentEncode(codePoint, userinfoPercentEncodeSet);\n\t              if (seenPasswordToken) url.password += encodedCodePoints;\n\t              else url.username += encodedCodePoints;\n\t            }\n\t            buffer = '';\n\t          } else if (\n\t            chr == EOF || chr == '/' || chr == '?' || chr == '#' ||\n\t            (chr == '\\\\' && url.isSpecial())\n\t          ) {\n\t            if (seenAt && buffer == '') return INVALID_AUTHORITY;\n\t            pointer -= arrayFrom(buffer).length + 1;\n\t            buffer = '';\n\t            state = HOST;\n\t          } else buffer += chr;\n\t          break;\n\n\t        case HOST:\n\t        case HOSTNAME:\n\t          if (stateOverride && url.scheme == 'file') {\n\t            state = FILE_HOST;\n\t            continue;\n\t          } else if (chr == ':' && !seenBracket) {\n\t            if (buffer == '') return INVALID_HOST;\n\t            failure = url.parseHost(buffer);\n\t            if (failure) return failure;\n\t            buffer = '';\n\t            state = PORT;\n\t            if (stateOverride == HOSTNAME) return;\n\t          } else if (\n\t            chr == EOF || chr == '/' || chr == '?' || chr == '#' ||\n\t            (chr == '\\\\' && url.isSpecial())\n\t          ) {\n\t            if (url.isSpecial() && buffer == '') return INVALID_HOST;\n\t            if (stateOverride && buffer == '' && (url.includesCredentials() || url.port !== null)) return;\n\t            failure = url.parseHost(buffer);\n\t            if (failure) return failure;\n\t            buffer = '';\n\t            state = PATH_START;\n\t            if (stateOverride) return;\n\t            continue;\n\t          } else {\n\t            if (chr == '[') seenBracket = true;\n\t            else if (chr == ']') seenBracket = false;\n\t            buffer += chr;\n\t          } break;\n\n\t        case PORT:\n\t          if (exec$4(DIGIT, chr)) {\n\t            buffer += chr;\n\t          } else if (\n\t            chr == EOF || chr == '/' || chr == '?' || chr == '#' ||\n\t            (chr == '\\\\' && url.isSpecial()) ||\n\t            stateOverride\n\t          ) {\n\t            if (buffer != '') {\n\t              var port = parseInt$1(buffer, 10);\n\t              if (port > 0xFFFF) return INVALID_PORT;\n\t              url.port = (url.isSpecial() && port === specialSchemes[url.scheme]) ? null : port;\n\t              buffer = '';\n\t            }\n\t            if (stateOverride) return;\n\t            state = PATH_START;\n\t            continue;\n\t          } else return INVALID_PORT;\n\t          break;\n\n\t        case FILE:\n\t          url.scheme = 'file';\n\t          if (chr == '/' || chr == '\\\\') state = FILE_SLASH;\n\t          else if (base && base.scheme == 'file') {\n\t            if (chr == EOF) {\n\t              url.host = base.host;\n\t              url.path = arraySliceSimple(base.path);\n\t              url.query = base.query;\n\t            } else if (chr == '?') {\n\t              url.host = base.host;\n\t              url.path = arraySliceSimple(base.path);\n\t              url.query = '';\n\t              state = QUERY;\n\t            } else if (chr == '#') {\n\t              url.host = base.host;\n\t              url.path = arraySliceSimple(base.path);\n\t              url.query = base.query;\n\t              url.fragment = '';\n\t              state = FRAGMENT;\n\t            } else {\n\t              if (!startsWithWindowsDriveLetter(join$4(arraySliceSimple(codePoints, pointer), ''))) {\n\t                url.host = base.host;\n\t                url.path = arraySliceSimple(base.path);\n\t                url.shortenPath();\n\t              }\n\t              state = PATH;\n\t              continue;\n\t            }\n\t          } else {\n\t            state = PATH;\n\t            continue;\n\t          } break;\n\n\t        case FILE_SLASH:\n\t          if (chr == '/' || chr == '\\\\') {\n\t            state = FILE_HOST;\n\t            break;\n\t          }\n\t          if (base && base.scheme == 'file' && !startsWithWindowsDriveLetter(join$4(arraySliceSimple(codePoints, pointer), ''))) {\n\t            if (isWindowsDriveLetter(base.path[0], true)) push$8(url.path, base.path[0]);\n\t            else url.host = base.host;\n\t          }\n\t          state = PATH;\n\t          continue;\n\n\t        case FILE_HOST:\n\t          if (chr == EOF || chr == '/' || chr == '\\\\' || chr == '?' || chr == '#') {\n\t            if (!stateOverride && isWindowsDriveLetter(buffer)) {\n\t              state = PATH;\n\t            } else if (buffer == '') {\n\t              url.host = '';\n\t              if (stateOverride) return;\n\t              state = PATH_START;\n\t            } else {\n\t              failure = url.parseHost(buffer);\n\t              if (failure) return failure;\n\t              if (url.host == 'localhost') url.host = '';\n\t              if (stateOverride) return;\n\t              buffer = '';\n\t              state = PATH_START;\n\t            } continue;\n\t          } else buffer += chr;\n\t          break;\n\n\t        case PATH_START:\n\t          if (url.isSpecial()) {\n\t            state = PATH;\n\t            if (chr != '/' && chr != '\\\\') continue;\n\t          } else if (!stateOverride && chr == '?') {\n\t            url.query = '';\n\t            state = QUERY;\n\t          } else if (!stateOverride && chr == '#') {\n\t            url.fragment = '';\n\t            state = FRAGMENT;\n\t          } else if (chr != EOF) {\n\t            state = PATH;\n\t            if (chr != '/') continue;\n\t          } break;\n\n\t        case PATH:\n\t          if (\n\t            chr == EOF || chr == '/' ||\n\t            (chr == '\\\\' && url.isSpecial()) ||\n\t            (!stateOverride && (chr == '?' || chr == '#'))\n\t          ) {\n\t            if (isDoubleDot(buffer)) {\n\t              url.shortenPath();\n\t              if (chr != '/' && !(chr == '\\\\' && url.isSpecial())) {\n\t                push$8(url.path, '');\n\t              }\n\t            } else if (isSingleDot(buffer)) {\n\t              if (chr != '/' && !(chr == '\\\\' && url.isSpecial())) {\n\t                push$8(url.path, '');\n\t              }\n\t            } else {\n\t              if (url.scheme == 'file' && !url.path.length && isWindowsDriveLetter(buffer)) {\n\t                if (url.host) url.host = '';\n\t                buffer = charAt$5(buffer, 0) + ':'; // normalize windows drive letter\n\t              }\n\t              push$8(url.path, buffer);\n\t            }\n\t            buffer = '';\n\t            if (url.scheme == 'file' && (chr == EOF || chr == '?' || chr == '#')) {\n\t              while (url.path.length > 1 && url.path[0] === '') {\n\t                shift$1(url.path);\n\t              }\n\t            }\n\t            if (chr == '?') {\n\t              url.query = '';\n\t              state = QUERY;\n\t            } else if (chr == '#') {\n\t              url.fragment = '';\n\t              state = FRAGMENT;\n\t            }\n\t          } else {\n\t            buffer += percentEncode(chr, pathPercentEncodeSet);\n\t          } break;\n\n\t        case CANNOT_BE_A_BASE_URL_PATH:\n\t          if (chr == '?') {\n\t            url.query = '';\n\t            state = QUERY;\n\t          } else if (chr == '#') {\n\t            url.fragment = '';\n\t            state = FRAGMENT;\n\t          } else if (chr != EOF) {\n\t            url.path[0] += percentEncode(chr, C0ControlPercentEncodeSet);\n\t          } break;\n\n\t        case QUERY:\n\t          if (!stateOverride && chr == '#') {\n\t            url.fragment = '';\n\t            state = FRAGMENT;\n\t          } else if (chr != EOF) {\n\t            if (chr == \"'\" && url.isSpecial()) url.query += '%27';\n\t            else if (chr == '#') url.query += '%23';\n\t            else url.query += percentEncode(chr, C0ControlPercentEncodeSet);\n\t          } break;\n\n\t        case FRAGMENT:\n\t          if (chr != EOF) url.fragment += percentEncode(chr, fragmentPercentEncodeSet);\n\t          break;\n\t      }\n\n\t      pointer++;\n\t    }\n\t  },\n\t  // https://url.spec.whatwg.org/#host-parsing\n\t  parseHost: function (input) {\n\t    var result, codePoints, index;\n\t    if (charAt$5(input, 0) == '[') {\n\t      if (charAt$5(input, input.length - 1) != ']') return INVALID_HOST;\n\t      result = parseIPv6(stringSlice$4(input, 1, -1));\n\t      if (!result) return INVALID_HOST;\n\t      this.host = result;\n\t    // opaque host\n\t    } else if (!this.isSpecial()) {\n\t      if (exec$4(FORBIDDEN_HOST_CODE_POINT_EXCLUDING_PERCENT, input)) return INVALID_HOST;\n\t      result = '';\n\t      codePoints = arrayFrom(input);\n\t      for (index = 0; index < codePoints.length; index++) {\n\t        result += percentEncode(codePoints[index], C0ControlPercentEncodeSet);\n\t      }\n\t      this.host = result;\n\t    } else {\n\t      input = stringPunycodeToAscii(input);\n\t      if (exec$4(FORBIDDEN_HOST_CODE_POINT, input)) return INVALID_HOST;\n\t      result = parseIPv4(input);\n\t      if (result === null) return INVALID_HOST;\n\t      this.host = result;\n\t    }\n\t  },\n\t  // https://url.spec.whatwg.org/#cannot-have-a-username-password-port\n\t  cannotHaveUsernamePasswordPort: function () {\n\t    return !this.host || this.cannotBeABaseURL || this.scheme == 'file';\n\t  },\n\t  // https://url.spec.whatwg.org/#include-credentials\n\t  includesCredentials: function () {\n\t    return this.username != '' || this.password != '';\n\t  },\n\t  // https://url.spec.whatwg.org/#is-special\n\t  isSpecial: function () {\n\t    return hasOwnProperty_1(specialSchemes, this.scheme);\n\t  },\n\t  // https://url.spec.whatwg.org/#shorten-a-urls-path\n\t  shortenPath: function () {\n\t    var path = this.path;\n\t    var pathSize = path.length;\n\t    if (pathSize && (this.scheme != 'file' || pathSize != 1 || !isWindowsDriveLetter(path[0], true))) {\n\t      path.length--;\n\t    }\n\t  },\n\t  // https://url.spec.whatwg.org/#concept-url-serializer\n\t  serialize: function () {\n\t    var url = this;\n\t    var scheme = url.scheme;\n\t    var username = url.username;\n\t    var password = url.password;\n\t    var host = url.host;\n\t    var port = url.port;\n\t    var path = url.path;\n\t    var query = url.query;\n\t    var fragment = url.fragment;\n\t    var output = scheme + ':';\n\t    if (host !== null) {\n\t      output += '//';\n\t      if (url.includesCredentials()) {\n\t        output += username + (password ? ':' + password : '') + '@';\n\t      }\n\t      output += serializeHost(host);\n\t      if (port !== null) output += ':' + port;\n\t    } else if (scheme == 'file') output += '//';\n\t    output += url.cannotBeABaseURL ? path[0] : path.length ? '/' + join$4(path, '/') : '';\n\t    if (query !== null) output += '?' + query;\n\t    if (fragment !== null) output += '#' + fragment;\n\t    return output;\n\t  },\n\t  // https://url.spec.whatwg.org/#dom-url-href\n\t  setHref: function (href) {\n\t    var failure = this.parse(href);\n\t    if (failure) throw TypeError$n(failure);\n\t    this.searchParams.update();\n\t  },\n\t  // https://url.spec.whatwg.org/#dom-url-origin\n\t  getOrigin: function () {\n\t    var scheme = this.scheme;\n\t    var port = this.port;\n\t    if (scheme == 'blob') try {\n\t      return new URLConstructor(scheme.path[0]).origin;\n\t    } catch (error) {\n\t      return 'null';\n\t    }\n\t    if (scheme == 'file' || !this.isSpecial()) return 'null';\n\t    return scheme + '://' + serializeHost(this.host) + (port !== null ? ':' + port : '');\n\t  },\n\t  // https://url.spec.whatwg.org/#dom-url-protocol\n\t  getProtocol: function () {\n\t    return this.scheme + ':';\n\t  },\n\t  setProtocol: function (protocol) {\n\t    this.parse(toString_1(protocol) + ':', SCHEME_START);\n\t  },\n\t  // https://url.spec.whatwg.org/#dom-url-username\n\t  getUsername: function () {\n\t    return this.username;\n\t  },\n\t  setUsername: function (username) {\n\t    var codePoints = arrayFrom(toString_1(username));\n\t    if (this.cannotHaveUsernamePasswordPort()) return;\n\t    this.username = '';\n\t    for (var i = 0; i < codePoints.length; i++) {\n\t      this.username += percentEncode(codePoints[i], userinfoPercentEncodeSet);\n\t    }\n\t  },\n\t  // https://url.spec.whatwg.org/#dom-url-password\n\t  getPassword: function () {\n\t    return this.password;\n\t  },\n\t  setPassword: function (password) {\n\t    var codePoints = arrayFrom(toString_1(password));\n\t    if (this.cannotHaveUsernamePasswordPort()) return;\n\t    this.password = '';\n\t    for (var i = 0; i < codePoints.length; i++) {\n\t      this.password += percentEncode(codePoints[i], userinfoPercentEncodeSet);\n\t    }\n\t  },\n\t  // https://url.spec.whatwg.org/#dom-url-host\n\t  getHost: function () {\n\t    var host = this.host;\n\t    var port = this.port;\n\t    return host === null ? ''\n\t      : port === null ? serializeHost(host)\n\t      : serializeHost(host) + ':' + port;\n\t  },\n\t  setHost: function (host) {\n\t    if (this.cannotBeABaseURL) return;\n\t    this.parse(host, HOST);\n\t  },\n\t  // https://url.spec.whatwg.org/#dom-url-hostname\n\t  getHostname: function () {\n\t    var host = this.host;\n\t    return host === null ? '' : serializeHost(host);\n\t  },\n\t  setHostname: function (hostname) {\n\t    if (this.cannotBeABaseURL) return;\n\t    this.parse(hostname, HOSTNAME);\n\t  },\n\t  // https://url.spec.whatwg.org/#dom-url-port\n\t  getPort: function () {\n\t    var port = this.port;\n\t    return port === null ? '' : toString_1(port);\n\t  },\n\t  setPort: function (port) {\n\t    if (this.cannotHaveUsernamePasswordPort()) return;\n\t    port = toString_1(port);\n\t    if (port == '') this.port = null;\n\t    else this.parse(port, PORT);\n\t  },\n\t  // https://url.spec.whatwg.org/#dom-url-pathname\n\t  getPathname: function () {\n\t    var path = this.path;\n\t    return this.cannotBeABaseURL ? path[0] : path.length ? '/' + join$4(path, '/') : '';\n\t  },\n\t  setPathname: function (pathname) {\n\t    if (this.cannotBeABaseURL) return;\n\t    this.path = [];\n\t    this.parse(pathname, PATH_START);\n\t  },\n\t  // https://url.spec.whatwg.org/#dom-url-search\n\t  getSearch: function () {\n\t    var query = this.query;\n\t    return query ? '?' + query : '';\n\t  },\n\t  setSearch: function (search) {\n\t    search = toString_1(search);\n\t    if (search == '') {\n\t      this.query = null;\n\t    } else {\n\t      if ('?' == charAt$5(search, 0)) search = stringSlice$4(search, 1);\n\t      this.query = '';\n\t      this.parse(search, QUERY);\n\t    }\n\t    this.searchParams.update();\n\t  },\n\t  // https://url.spec.whatwg.org/#dom-url-searchparams\n\t  getSearchParams: function () {\n\t    return this.searchParams.facade;\n\t  },\n\t  // https://url.spec.whatwg.org/#dom-url-hash\n\t  getHash: function () {\n\t    var fragment = this.fragment;\n\t    return fragment ? '#' + fragment : '';\n\t  },\n\t  setHash: function (hash) {\n\t    hash = toString_1(hash);\n\t    if (hash == '') {\n\t      this.fragment = null;\n\t      return;\n\t    }\n\t    if ('#' == charAt$5(hash, 0)) hash = stringSlice$4(hash, 1);\n\t    this.fragment = '';\n\t    this.parse(hash, FRAGMENT);\n\t  },\n\t  update: function () {\n\t    this.query = this.searchParams.serialize() || null;\n\t  }\n\t};\n\n\t// `URL` constructor\n\t// https://url.spec.whatwg.org/#url-class\n\tvar URLConstructor = function URL(url /* , base */) {\n\t  var that = anInstance(this, URLPrototype);\n\t  var base = validateArgumentsLength(arguments.length, 1) > 1 ? arguments[1] : undefined;\n\t  var state = setInternalState$6(that, new URLState(url, false, base));\n\t  if (!descriptors) {\n\t    that.href = state.serialize();\n\t    that.origin = state.getOrigin();\n\t    that.protocol = state.getProtocol();\n\t    that.username = state.getUsername();\n\t    that.password = state.getPassword();\n\t    that.host = state.getHost();\n\t    that.hostname = state.getHostname();\n\t    that.port = state.getPort();\n\t    that.pathname = state.getPathname();\n\t    that.search = state.getSearch();\n\t    that.searchParams = state.getSearchParams();\n\t    that.hash = state.getHash();\n\t  }\n\t};\n\n\tvar URLPrototype = URLConstructor.prototype;\n\n\tvar accessorDescriptor = function (getter, setter) {\n\t  return {\n\t    get: function () {\n\t      return getInternalURLState(this)[getter]();\n\t    },\n\t    set: setter && function (value) {\n\t      return getInternalURLState(this)[setter](value);\n\t    },\n\t    configurable: true,\n\t    enumerable: true\n\t  };\n\t};\n\n\tif (descriptors) {\n\t  // `URL.prototype.href` accessors pair\n\t  // https://url.spec.whatwg.org/#dom-url-href\n\t  defineBuiltInAccessor(URLPrototype, 'href', accessorDescriptor('serialize', 'setHref'));\n\t  // `URL.prototype.origin` getter\n\t  // https://url.spec.whatwg.org/#dom-url-origin\n\t  defineBuiltInAccessor(URLPrototype, 'origin', accessorDescriptor('getOrigin'));\n\t  // `URL.prototype.protocol` accessors pair\n\t  // https://url.spec.whatwg.org/#dom-url-protocol\n\t  defineBuiltInAccessor(URLPrototype, 'protocol', accessorDescriptor('getProtocol', 'setProtocol'));\n\t  // `URL.prototype.username` accessors pair\n\t  // https://url.spec.whatwg.org/#dom-url-username\n\t  defineBuiltInAccessor(URLPrototype, 'username', accessorDescriptor('getUsername', 'setUsername'));\n\t  // `URL.prototype.password` accessors pair\n\t  // https://url.spec.whatwg.org/#dom-url-password\n\t  defineBuiltInAccessor(URLPrototype, 'password', accessorDescriptor('getPassword', 'setPassword'));\n\t  // `URL.prototype.host` accessors pair\n\t  // https://url.spec.whatwg.org/#dom-url-host\n\t  defineBuiltInAccessor(URLPrototype, 'host', accessorDescriptor('getHost', 'setHost'));\n\t  // `URL.prototype.hostname` accessors pair\n\t  // https://url.spec.whatwg.org/#dom-url-hostname\n\t  defineBuiltInAccessor(URLPrototype, 'hostname', accessorDescriptor('getHostname', 'setHostname'));\n\t  // `URL.prototype.port` accessors pair\n\t  // https://url.spec.whatwg.org/#dom-url-port\n\t  defineBuiltInAccessor(URLPrototype, 'port', accessorDescriptor('getPort', 'setPort'));\n\t  // `URL.prototype.pathname` accessors pair\n\t  // https://url.spec.whatwg.org/#dom-url-pathname\n\t  defineBuiltInAccessor(URLPrototype, 'pathname', accessorDescriptor('getPathname', 'setPathname'));\n\t  // `URL.prototype.search` accessors pair\n\t  // https://url.spec.whatwg.org/#dom-url-search\n\t  defineBuiltInAccessor(URLPrototype, 'search', accessorDescriptor('getSearch', 'setSearch'));\n\t  // `URL.prototype.searchParams` getter\n\t  // https://url.spec.whatwg.org/#dom-url-searchparams\n\t  defineBuiltInAccessor(URLPrototype, 'searchParams', accessorDescriptor('getSearchParams'));\n\t  // `URL.prototype.hash` accessors pair\n\t  // https://url.spec.whatwg.org/#dom-url-hash\n\t  defineBuiltInAccessor(URLPrototype, 'hash', accessorDescriptor('getHash', 'setHash'));\n\t}\n\n\t// `URL.prototype.toJSON` method\n\t// https://url.spec.whatwg.org/#dom-url-tojson\n\tdefineBuiltIn(URLPrototype, 'toJSON', function toJSON() {\n\t  return getInternalURLState(this).serialize();\n\t}, { enumerable: true });\n\n\t// `URL.prototype.toString` method\n\t// https://url.spec.whatwg.org/#URL-stringification-behavior\n\tdefineBuiltIn(URLPrototype, 'toString', function toString() {\n\t  return getInternalURLState(this).serialize();\n\t}, { enumerable: true });\n\n\tif (NativeURL) {\n\t  var nativeCreateObjectURL = NativeURL.createObjectURL;\n\t  var nativeRevokeObjectURL = NativeURL.revokeObjectURL;\n\t  // `URL.createObjectURL` method\n\t  // https://developer.mozilla.org/en-US/docs/Web/API/URL/createObjectURL\n\t  if (nativeCreateObjectURL) defineBuiltIn(URLConstructor, 'createObjectURL', functionBindContext(nativeCreateObjectURL, NativeURL));\n\t  // `URL.revokeObjectURL` method\n\t  // https://developer.mozilla.org/en-US/docs/Web/API/URL/revokeObjectURL\n\t  if (nativeRevokeObjectURL) defineBuiltIn(URLConstructor, 'revokeObjectURL', functionBindContext(nativeRevokeObjectURL, NativeURL));\n\t}\n\n\tsetToStringTag(URLConstructor, 'URL');\n\n\t_export({ global: true, constructor: true, forced: !nativeUrl, sham: !descriptors }, {\n\t  URL: URLConstructor\n\t});\n\n\tvar url = path.URL;\n\n\tvar url$1 = url;\n\n\tvar url$2 = url$1;\n\n\tvar html2canvas = createCommonjsModule(function (module, exports) {\n\t/*!\n\t * html2canvas 1.4.1 <https://html2canvas.hertzen.com>\n\t * Copyright (c) 2022 Niklas von Hertzen <https://hertzen.com>\n\t * Released under MIT License\n\t */\n\t(function (global, factory) {\n\t     module.exports = factory() ;\n\t}(commonjsGlobal, (function () {\n\t    /*! *****************************************************************************\n\t    Copyright (c) Microsoft Corporation.\n\n\t    Permission to use, copy, modify, and/or distribute this software for any\n\t    purpose with or without fee is hereby granted.\n\n\t    THE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\n\t    REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\n\t    AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\n\t    INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\n\t    LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\n\t    OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\n\t    PERFORMANCE OF THIS SOFTWARE.\n\t    ***************************************************************************** */\n\t    /* global Reflect, Promise */\n\n\t    var extendStatics = function(d, b) {\n\t        extendStatics = Object.setPrototypeOf ||\n\t            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n\t            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n\t        return extendStatics(d, b);\n\t    };\n\n\t    function __extends(d, b) {\n\t        if (typeof b !== \"function\" && b !== null)\n\t            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n\t        extendStatics(d, b);\n\t        function __() { this.constructor = d; }\n\t        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n\t    }\n\n\t    var __assign = function() {\n\t        __assign = Object.assign || function __assign(t) {\n\t            for (var s, i = 1, n = arguments.length; i < n; i++) {\n\t                s = arguments[i];\n\t                for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n\t            }\n\t            return t;\n\t        };\n\t        return __assign.apply(this, arguments);\n\t    };\n\n\t    function __awaiter(thisArg, _arguments, P, generator) {\n\t        function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n\t        return new (P || (P = Promise))(function (resolve, reject) {\n\t            function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n\t            function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n\t            function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n\t            step((generator = generator.apply(thisArg, _arguments || [])).next());\n\t        });\n\t    }\n\n\t    function __generator(thisArg, body) {\n\t        var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n\t        return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n\t        function verb(n) { return function (v) { return step([n, v]); }; }\n\t        function step(op) {\n\t            if (f) throw new TypeError(\"Generator is already executing.\");\n\t            while (_) try {\n\t                if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n\t                if (y = 0, t) op = [op[0] & 2, t.value];\n\t                switch (op[0]) {\n\t                    case 0: case 1: t = op; break;\n\t                    case 4: _.label++; return { value: op[1], done: false };\n\t                    case 5: _.label++; y = op[1]; op = [0]; continue;\n\t                    case 7: op = _.ops.pop(); _.trys.pop(); continue;\n\t                    default:\n\t                        if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n\t                        if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n\t                        if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n\t                        if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n\t                        if (t[2]) _.ops.pop();\n\t                        _.trys.pop(); continue;\n\t                }\n\t                op = body.call(thisArg, _);\n\t            } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n\t            if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n\t        }\n\t    }\n\n\t    function __spreadArray(to, from, pack) {\n\t        if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n\t            if (ar || !(i in from)) {\n\t                if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n\t                ar[i] = from[i];\n\t            }\n\t        }\n\t        return to.concat(ar || from);\n\t    }\n\n\t    var Bounds = /** @class */ (function () {\n\t        function Bounds(left, top, width, height) {\n\t            this.left = left;\n\t            this.top = top;\n\t            this.width = width;\n\t            this.height = height;\n\t        }\n\t        Bounds.prototype.add = function (x, y, w, h) {\n\t            return new Bounds(this.left + x, this.top + y, this.width + w, this.height + h);\n\t        };\n\t        Bounds.fromClientRect = function (context, clientRect) {\n\t            return new Bounds(clientRect.left + context.windowBounds.left, clientRect.top + context.windowBounds.top, clientRect.width, clientRect.height);\n\t        };\n\t        Bounds.fromDOMRectList = function (context, domRectList) {\n\t            var domRect = Array.from(domRectList).find(function (rect) { return rect.width !== 0; });\n\t            return domRect\n\t                ? new Bounds(domRect.left + context.windowBounds.left, domRect.top + context.windowBounds.top, domRect.width, domRect.height)\n\t                : Bounds.EMPTY;\n\t        };\n\t        Bounds.EMPTY = new Bounds(0, 0, 0, 0);\n\t        return Bounds;\n\t    }());\n\t    var parseBounds = function (context, node) {\n\t        return Bounds.fromClientRect(context, node.getBoundingClientRect());\n\t    };\n\t    var parseDocumentSize = function (document) {\n\t        var body = document.body;\n\t        var documentElement = document.documentElement;\n\t        if (!body || !documentElement) {\n\t            throw new Error(\"Unable to get document size\");\n\t        }\n\t        var width = Math.max(Math.max(body.scrollWidth, documentElement.scrollWidth), Math.max(body.offsetWidth, documentElement.offsetWidth), Math.max(body.clientWidth, documentElement.clientWidth));\n\t        var height = Math.max(Math.max(body.scrollHeight, documentElement.scrollHeight), Math.max(body.offsetHeight, documentElement.offsetHeight), Math.max(body.clientHeight, documentElement.clientHeight));\n\t        return new Bounds(0, 0, width, height);\n\t    };\n\n\t    /*\n\t     * css-line-break 2.1.0 <https://github.com/niklasvh/css-line-break#readme>\n\t     * Copyright (c) 2022 Niklas von Hertzen <https://hertzen.com>\n\t     * Released under MIT License\n\t     */\n\t    var toCodePoints$1 = function (str) {\n\t        var codePoints = [];\n\t        var i = 0;\n\t        var length = str.length;\n\t        while (i < length) {\n\t            var value = str.charCodeAt(i++);\n\t            if (value >= 0xd800 && value <= 0xdbff && i < length) {\n\t                var extra = str.charCodeAt(i++);\n\t                if ((extra & 0xfc00) === 0xdc00) {\n\t                    codePoints.push(((value & 0x3ff) << 10) + (extra & 0x3ff) + 0x10000);\n\t                }\n\t                else {\n\t                    codePoints.push(value);\n\t                    i--;\n\t                }\n\t            }\n\t            else {\n\t                codePoints.push(value);\n\t            }\n\t        }\n\t        return codePoints;\n\t    };\n\t    var fromCodePoint$1 = function () {\n\t        var codePoints = [];\n\t        for (var _i = 0; _i < arguments.length; _i++) {\n\t            codePoints[_i] = arguments[_i];\n\t        }\n\t        if (String.fromCodePoint) {\n\t            return String.fromCodePoint.apply(String, codePoints);\n\t        }\n\t        var length = codePoints.length;\n\t        if (!length) {\n\t            return '';\n\t        }\n\t        var codeUnits = [];\n\t        var index = -1;\n\t        var result = '';\n\t        while (++index < length) {\n\t            var codePoint = codePoints[index];\n\t            if (codePoint <= 0xffff) {\n\t                codeUnits.push(codePoint);\n\t            }\n\t            else {\n\t                codePoint -= 0x10000;\n\t                codeUnits.push((codePoint >> 10) + 0xd800, (codePoint % 0x400) + 0xdc00);\n\t            }\n\t            if (index + 1 === length || codeUnits.length > 0x4000) {\n\t                result += String.fromCharCode.apply(String, codeUnits);\n\t                codeUnits.length = 0;\n\t            }\n\t        }\n\t        return result;\n\t    };\n\t    var chars$2 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';\n\t    // Use a lookup table to find the index.\n\t    var lookup$2 = typeof Uint8Array === 'undefined' ? [] : new Uint8Array(256);\n\t    for (var i$2 = 0; i$2 < chars$2.length; i$2++) {\n\t        lookup$2[chars$2.charCodeAt(i$2)] = i$2;\n\t    }\n\n\t    /*\n\t     * utrie 1.0.2 <https://github.com/niklasvh/utrie>\n\t     * Copyright (c) 2022 Niklas von Hertzen <https://hertzen.com>\n\t     * Released under MIT License\n\t     */\n\t    var chars$1$1 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';\n\t    // Use a lookup table to find the index.\n\t    var lookup$1$1 = typeof Uint8Array === 'undefined' ? [] : new Uint8Array(256);\n\t    for (var i$1$1 = 0; i$1$1 < chars$1$1.length; i$1$1++) {\n\t        lookup$1$1[chars$1$1.charCodeAt(i$1$1)] = i$1$1;\n\t    }\n\t    var decode$1 = function (base64) {\n\t        var bufferLength = base64.length * 0.75, len = base64.length, i, p = 0, encoded1, encoded2, encoded3, encoded4;\n\t        if (base64[base64.length - 1] === '=') {\n\t            bufferLength--;\n\t            if (base64[base64.length - 2] === '=') {\n\t                bufferLength--;\n\t            }\n\t        }\n\t        var buffer = typeof ArrayBuffer !== 'undefined' &&\n\t            typeof Uint8Array !== 'undefined' &&\n\t            typeof Uint8Array.prototype.slice !== 'undefined'\n\t            ? new ArrayBuffer(bufferLength)\n\t            : new Array(bufferLength);\n\t        var bytes = Array.isArray(buffer) ? buffer : new Uint8Array(buffer);\n\t        for (i = 0; i < len; i += 4) {\n\t            encoded1 = lookup$1$1[base64.charCodeAt(i)];\n\t            encoded2 = lookup$1$1[base64.charCodeAt(i + 1)];\n\t            encoded3 = lookup$1$1[base64.charCodeAt(i + 2)];\n\t            encoded4 = lookup$1$1[base64.charCodeAt(i + 3)];\n\t            bytes[p++] = (encoded1 << 2) | (encoded2 >> 4);\n\t            bytes[p++] = ((encoded2 & 15) << 4) | (encoded3 >> 2);\n\t            bytes[p++] = ((encoded3 & 3) << 6) | (encoded4 & 63);\n\t        }\n\t        return buffer;\n\t    };\n\t    var polyUint16Array$1 = function (buffer) {\n\t        var length = buffer.length;\n\t        var bytes = [];\n\t        for (var i = 0; i < length; i += 2) {\n\t            bytes.push((buffer[i + 1] << 8) | buffer[i]);\n\t        }\n\t        return bytes;\n\t    };\n\t    var polyUint32Array$1 = function (buffer) {\n\t        var length = buffer.length;\n\t        var bytes = [];\n\t        for (var i = 0; i < length; i += 4) {\n\t            bytes.push((buffer[i + 3] << 24) | (buffer[i + 2] << 16) | (buffer[i + 1] << 8) | buffer[i]);\n\t        }\n\t        return bytes;\n\t    };\n\n\t    /** Shift size for getting the index-2 table offset. */\n\t    var UTRIE2_SHIFT_2$1 = 5;\n\t    /** Shift size for getting the index-1 table offset. */\n\t    var UTRIE2_SHIFT_1$1 = 6 + 5;\n\t    /**\n\t     * Shift size for shifting left the index array values.\n\t     * Increases possible data size with 16-bit index values at the cost\n\t     * of compactability.\n\t     * This requires data blocks to be aligned by UTRIE2_DATA_GRANULARITY.\n\t     */\n\t    var UTRIE2_INDEX_SHIFT$1 = 2;\n\t    /**\n\t     * Difference between the two shift sizes,\n\t     * for getting an index-1 offset from an index-2 offset. 6=11-5\n\t     */\n\t    var UTRIE2_SHIFT_1_2$1 = UTRIE2_SHIFT_1$1 - UTRIE2_SHIFT_2$1;\n\t    /**\n\t     * The part of the index-2 table for U+D800..U+DBFF stores values for\n\t     * lead surrogate code _units_ not code _points_.\n\t     * Values for lead surrogate code _points_ are indexed with this portion of the table.\n\t     * Length=32=0x20=0x400>>UTRIE2_SHIFT_2. (There are 1024=0x400 lead surrogates.)\n\t     */\n\t    var UTRIE2_LSCP_INDEX_2_OFFSET$1 = 0x10000 >> UTRIE2_SHIFT_2$1;\n\t    /** Number of entries in a data block. 32=0x20 */\n\t    var UTRIE2_DATA_BLOCK_LENGTH$1 = 1 << UTRIE2_SHIFT_2$1;\n\t    /** Mask for getting the lower bits for the in-data-block offset. */\n\t    var UTRIE2_DATA_MASK$1 = UTRIE2_DATA_BLOCK_LENGTH$1 - 1;\n\t    var UTRIE2_LSCP_INDEX_2_LENGTH$1 = 0x400 >> UTRIE2_SHIFT_2$1;\n\t    /** Count the lengths of both BMP pieces. 2080=0x820 */\n\t    var UTRIE2_INDEX_2_BMP_LENGTH$1 = UTRIE2_LSCP_INDEX_2_OFFSET$1 + UTRIE2_LSCP_INDEX_2_LENGTH$1;\n\t    /**\n\t     * The 2-byte UTF-8 version of the index-2 table follows at offset 2080=0x820.\n\t     * Length 32=0x20 for lead bytes C0..DF, regardless of UTRIE2_SHIFT_2.\n\t     */\n\t    var UTRIE2_UTF8_2B_INDEX_2_OFFSET$1 = UTRIE2_INDEX_2_BMP_LENGTH$1;\n\t    var UTRIE2_UTF8_2B_INDEX_2_LENGTH$1 = 0x800 >> 6; /* U+0800 is the first code point after 2-byte UTF-8 */\n\t    /**\n\t     * The index-1 table, only used for supplementary code points, at offset 2112=0x840.\n\t     * Variable length, for code points up to highStart, where the last single-value range starts.\n\t     * Maximum length 512=0x200=0x100000>>UTRIE2_SHIFT_1.\n\t     * (For 0x100000 supplementary code points U+10000..U+10ffff.)\n\t     *\n\t     * The part of the index-2 table for supplementary code points starts\n\t     * after this index-1 table.\n\t     *\n\t     * Both the index-1 table and the following part of the index-2 table\n\t     * are omitted completely if there is only BMP data.\n\t     */\n\t    var UTRIE2_INDEX_1_OFFSET$1 = UTRIE2_UTF8_2B_INDEX_2_OFFSET$1 + UTRIE2_UTF8_2B_INDEX_2_LENGTH$1;\n\t    /**\n\t     * Number of index-1 entries for the BMP. 32=0x20\n\t     * This part of the index-1 table is omitted from the serialized form.\n\t     */\n\t    var UTRIE2_OMITTED_BMP_INDEX_1_LENGTH$1 = 0x10000 >> UTRIE2_SHIFT_1$1;\n\t    /** Number of entries in an index-2 block. 64=0x40 */\n\t    var UTRIE2_INDEX_2_BLOCK_LENGTH$1 = 1 << UTRIE2_SHIFT_1_2$1;\n\t    /** Mask for getting the lower bits for the in-index-2-block offset. */\n\t    var UTRIE2_INDEX_2_MASK$1 = UTRIE2_INDEX_2_BLOCK_LENGTH$1 - 1;\n\t    var slice16$1 = function (view, start, end) {\n\t        if (view.slice) {\n\t            return view.slice(start, end);\n\t        }\n\t        return new Uint16Array(Array.prototype.slice.call(view, start, end));\n\t    };\n\t    var slice32$1 = function (view, start, end) {\n\t        if (view.slice) {\n\t            return view.slice(start, end);\n\t        }\n\t        return new Uint32Array(Array.prototype.slice.call(view, start, end));\n\t    };\n\t    var createTrieFromBase64$1 = function (base64, _byteLength) {\n\t        var buffer = decode$1(base64);\n\t        var view32 = Array.isArray(buffer) ? polyUint32Array$1(buffer) : new Uint32Array(buffer);\n\t        var view16 = Array.isArray(buffer) ? polyUint16Array$1(buffer) : new Uint16Array(buffer);\n\t        var headerLength = 24;\n\t        var index = slice16$1(view16, headerLength / 2, view32[4] / 2);\n\t        var data = view32[5] === 2\n\t            ? slice16$1(view16, (headerLength + view32[4]) / 2)\n\t            : slice32$1(view32, Math.ceil((headerLength + view32[4]) / 4));\n\t        return new Trie$1(view32[0], view32[1], view32[2], view32[3], index, data);\n\t    };\n\t    var Trie$1 = /** @class */ (function () {\n\t        function Trie(initialValue, errorValue, highStart, highValueIndex, index, data) {\n\t            this.initialValue = initialValue;\n\t            this.errorValue = errorValue;\n\t            this.highStart = highStart;\n\t            this.highValueIndex = highValueIndex;\n\t            this.index = index;\n\t            this.data = data;\n\t        }\n\t        /**\n\t         * Get the value for a code point as stored in the Trie.\n\t         *\n\t         * @param codePoint the code point\n\t         * @return the value\n\t         */\n\t        Trie.prototype.get = function (codePoint) {\n\t            var ix;\n\t            if (codePoint >= 0) {\n\t                if (codePoint < 0x0d800 || (codePoint > 0x0dbff && codePoint <= 0x0ffff)) {\n\t                    // Ordinary BMP code point, excluding leading surrogates.\n\t                    // BMP uses a single level lookup.  BMP index starts at offset 0 in the Trie2 index.\n\t                    // 16 bit data is stored in the index array itself.\n\t                    ix = this.index[codePoint >> UTRIE2_SHIFT_2$1];\n\t                    ix = (ix << UTRIE2_INDEX_SHIFT$1) + (codePoint & UTRIE2_DATA_MASK$1);\n\t                    return this.data[ix];\n\t                }\n\t                if (codePoint <= 0xffff) {\n\t                    // Lead Surrogate Code Point.  A Separate index section is stored for\n\t                    // lead surrogate code units and code points.\n\t                    //   The main index has the code unit data.\n\t                    //   For this function, we need the code point data.\n\t                    // Note: this expression could be refactored for slightly improved efficiency, but\n\t                    //       surrogate code points will be so rare in practice that it's not worth it.\n\t                    ix = this.index[UTRIE2_LSCP_INDEX_2_OFFSET$1 + ((codePoint - 0xd800) >> UTRIE2_SHIFT_2$1)];\n\t                    ix = (ix << UTRIE2_INDEX_SHIFT$1) + (codePoint & UTRIE2_DATA_MASK$1);\n\t                    return this.data[ix];\n\t                }\n\t                if (codePoint < this.highStart) {\n\t                    // Supplemental code point, use two-level lookup.\n\t                    ix = UTRIE2_INDEX_1_OFFSET$1 - UTRIE2_OMITTED_BMP_INDEX_1_LENGTH$1 + (codePoint >> UTRIE2_SHIFT_1$1);\n\t                    ix = this.index[ix];\n\t                    ix += (codePoint >> UTRIE2_SHIFT_2$1) & UTRIE2_INDEX_2_MASK$1;\n\t                    ix = this.index[ix];\n\t                    ix = (ix << UTRIE2_INDEX_SHIFT$1) + (codePoint & UTRIE2_DATA_MASK$1);\n\t                    return this.data[ix];\n\t                }\n\t                if (codePoint <= 0x10ffff) {\n\t                    return this.data[this.highValueIndex];\n\t                }\n\t            }\n\t            // Fall through.  The code point is outside of the legal range of 0..0x10ffff.\n\t            return this.errorValue;\n\t        };\n\t        return Trie;\n\t    }());\n\n\t    /*\n\t     * base64-arraybuffer 1.0.2 <https://github.com/niklasvh/base64-arraybuffer>\n\t     * Copyright (c) 2022 Niklas von Hertzen <https://hertzen.com>\n\t     * Released under MIT License\n\t     */\n\t    var chars$3 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';\n\t    // Use a lookup table to find the index.\n\t    var lookup$3 = typeof Uint8Array === 'undefined' ? [] : new Uint8Array(256);\n\t    for (var i$3 = 0; i$3 < chars$3.length; i$3++) {\n\t        lookup$3[chars$3.charCodeAt(i$3)] = i$3;\n\t    }\n\n\t    var base64$1 = 'KwAAAAAAAAAACA4AUD0AADAgAAACAAAAAAAIABAAGABAAEgAUABYAGAAaABgAGgAYgBqAF8AZwBgAGgAcQB5AHUAfQCFAI0AlQCdAKIAqgCyALoAYABoAGAAaABgAGgAwgDKAGAAaADGAM4A0wDbAOEA6QDxAPkAAQEJAQ8BFwF1AH0AHAEkASwBNAE6AUIBQQFJAVEBWQFhAWgBcAF4ATAAgAGGAY4BlQGXAZ8BpwGvAbUBvQHFAc0B0wHbAeMB6wHxAfkBAQIJAvEBEQIZAiECKQIxAjgCQAJGAk4CVgJeAmQCbAJ0AnwCgQKJApECmQKgAqgCsAK4ArwCxAIwAMwC0wLbAjAA4wLrAvMC+AIAAwcDDwMwABcDHQMlAy0DNQN1AD0DQQNJA0kDSQNRA1EDVwNZA1kDdQB1AGEDdQBpA20DdQN1AHsDdQCBA4kDkQN1AHUAmQOhA3UAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AKYDrgN1AHUAtgO+A8YDzgPWAxcD3gPjA+sD8wN1AHUA+wMDBAkEdQANBBUEHQQlBCoEFwMyBDgEYABABBcDSARQBFgEYARoBDAAcAQzAXgEgASIBJAEdQCXBHUAnwSnBK4EtgS6BMIEyAR1AHUAdQB1AHUAdQCVANAEYABgAGAAYABgAGAAYABgANgEYADcBOQEYADsBPQE/AQEBQwFFAUcBSQFLAU0BWQEPAVEBUsFUwVbBWAAYgVgAGoFcgV6BYIFigWRBWAAmQWfBaYFYABgAGAAYABgAKoFYACxBbAFuQW6BcEFwQXHBcEFwQXPBdMF2wXjBeoF8gX6BQIGCgYSBhoGIgYqBjIGOgZgAD4GRgZMBmAAUwZaBmAAYABgAGAAYABgAGAAYABgAGAAYABgAGIGYABpBnAGYABgAGAAYABgAGAAYABgAGAAYAB4Bn8GhQZgAGAAYAB1AHcDFQSLBmAAYABgAJMGdQA9A3UAmwajBqsGqwaVALMGuwbDBjAAywbSBtIG1QbSBtIG0gbSBtIG0gbdBuMG6wbzBvsGAwcLBxMHAwcbByMHJwcsBywHMQcsB9IGOAdAB0gHTgfSBkgHVgfSBtIG0gbSBtIG0gbSBtIG0gbSBiwHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAdgAGAALAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAdbB2MHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsB2kH0gZwB64EdQB1AHUAdQB1AHUAdQB1AHUHfQdgAIUHjQd1AHUAlQedB2AAYAClB6sHYACzB7YHvgfGB3UAzgfWBzMB3gfmB1EB7gf1B/0HlQENAQUIDQh1ABUIHQglCBcDLQg1CD0IRQhNCEEDUwh1AHUAdQBbCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIcAh3CHoIMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIgggwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAALAcsBywHLAcsBywHLAcsBywHLAcsB4oILAcsB44I0gaWCJ4Ipgh1AHUAqgiyCHUAdQB1AHUAdQB1AHUAdQB1AHUAtwh8AXUAvwh1AMUIyQjRCNkI4AjoCHUAdQB1AO4I9gj+CAYJDgkTCS0HGwkjCYIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiAAIAAAAFAAYABgAGIAXwBgAHEAdQBFAJUAogCyAKAAYABgAEIA4ABGANMA4QDxAMEBDwE1AFwBLAE6AQEBUQF4QkhCmEKoQrhCgAHIQsAB0MLAAcABwAHAAeDC6ABoAHDCwMMAAcABwAHAAdDDGMMAAcAB6MM4wwjDWMNow3jDaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAEjDqABWw6bDqABpg6gAaABoAHcDvwOPA+gAaABfA/8DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DpcPAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcAB9cPKwkyCToJMAB1AHUAdQBCCUoJTQl1AFUJXAljCWcJawkwADAAMAAwAHMJdQB2CX4JdQCECYoJjgmWCXUAngkwAGAAYABxAHUApgn3A64JtAl1ALkJdQDACTAAMAAwADAAdQB1AHUAdQB1AHUAdQB1AHUAowYNBMUIMAAwADAAMADICcsJ0wnZCRUE4QkwAOkJ8An4CTAAMAB1AAAKvwh1AAgKDwoXCh8KdQAwACcKLgp1ADYKqAmICT4KRgowADAAdQB1AE4KMAB1AFYKdQBeCnUAZQowADAAMAAwADAAMAAwADAAMAAVBHUAbQowADAAdQC5CXUKMAAwAHwBxAijBogEMgF9CoQKiASMCpQKmgqIBKIKqgquCogEDQG2Cr4KxgrLCjAAMADTCtsKCgHjCusK8Qr5CgELMAAwADAAMAB1AIsECQsRC3UANAEZCzAAMAAwADAAMAB1ACELKQswAHUANAExCzkLdQBBC0kLMABRC1kLMAAwADAAMAAwADAAdQBhCzAAMAAwAGAAYABpC3ELdwt/CzAAMACHC4sLkwubC58Lpwt1AK4Ltgt1APsDMAAwADAAMAAwADAAMAAwAL4LwwvLC9IL1wvdCzAAMADlC+kL8Qv5C/8LSQswADAAMAAwADAAMAAwADAAMAAHDDAAMAAwADAAMAAODBYMHgx1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1ACYMMAAwADAAdQB1AHUALgx1AHUAdQB1AHUAdQA2DDAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AD4MdQBGDHUAdQB1AHUAdQB1AEkMdQB1AHUAdQB1AFAMMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQBYDHUAdQB1AF8MMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUA+wMVBGcMMAAwAHwBbwx1AHcMfwyHDI8MMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAYABgAJcMMAAwADAAdQB1AJ8MlQClDDAAMACtDCwHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsB7UMLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AA0EMAC9DDAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAsBywHLAcsBywHLAcsBywHLQcwAMEMyAwsBywHLAcsBywHLAcsBywHLAcsBywHzAwwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAHUAdQB1ANQM2QzhDDAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMABgAGAAYABgAGAAYABgAOkMYADxDGAA+AwADQYNYABhCWAAYAAODTAAMAAwADAAFg1gAGAAHg37AzAAMAAwADAAYABgACYNYAAsDTQNPA1gAEMNPg1LDWAAYABgAGAAYABgAGAAYABgAGAAUg1aDYsGVglhDV0NcQBnDW0NdQ15DWAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAlQCBDZUAiA2PDZcNMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAnw2nDTAAMAAwADAAMAAwAHUArw23DTAAMAAwADAAMAAwADAAMAAwADAAMAB1AL8NMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAB1AHUAdQB1AHUAdQDHDTAAYABgAM8NMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAA1w11ANwNMAAwAD0B5A0wADAAMAAwADAAMADsDfQN/A0EDgwOFA4wABsOMAAwADAAMAAwADAAMAAwANIG0gbSBtIG0gbSBtIG0gYjDigOwQUuDsEFMw7SBjoO0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIGQg5KDlIOVg7SBtIGXg5lDm0OdQ7SBtIGfQ6EDooOjQ6UDtIGmg6hDtIG0gaoDqwO0ga0DrwO0gZgAGAAYADEDmAAYAAkBtIGzA5gANIOYADaDokO0gbSBt8O5w7SBu8O0gb1DvwO0gZgAGAAxA7SBtIG0gbSBtIGYABgAGAAYAAED2AAsAUMD9IG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIGFA8sBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAccD9IGLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHJA8sBywHLAcsBywHLAccDywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywPLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAc0D9IG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIGLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAccD9IG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIGFA8sBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHPA/SBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gYUD0QPlQCVAJUAMAAwADAAMACVAJUAlQCVAJUAlQCVAEwPMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAA//8EAAQABAAEAAQABAAEAAQABAANAAMAAQABAAIABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQACgATABcAHgAbABoAHgAXABYAEgAeABsAGAAPABgAHABLAEsASwBLAEsASwBLAEsASwBLABgAGAAeAB4AHgATAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQABYAGwASAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAWAA0AEQAeAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAFAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAJABYAGgAbABsAGwAeAB0AHQAeAE8AFwAeAA0AHgAeABoAGwBPAE8ADgBQAB0AHQAdAE8ATwAXAE8ATwBPABYAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAFAAUABQAFAAUABQAFAAUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAB4AHgAeAFAATwBAAE8ATwBPAEAATwBQAFAATwBQAB4AHgAeAB4AHgAeAB0AHQAdAB0AHgAdAB4ADgBQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgBQAB4AUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAJAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAkACQAJAAkACQAJAAkABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgAeAFAAHgAeAB4AKwArAFAAUABQAFAAGABQACsAKwArACsAHgAeAFAAHgBQAFAAUAArAFAAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAEAAQABAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAUAAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAYAA0AKwArAB4AHgAbACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQADQAEAB4ABAAEAB4ABAAEABMABAArACsAKwArACsAKwArACsAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAKwArACsAKwBWAFYAVgBWAB4AHgArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AGgAaABoAGAAYAB4AHgAEAAQABAAEAAQABAAEAAQABAAEAAQAEwAEACsAEwATAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABLAEsASwBLAEsASwBLAEsASwBLABoAGQAZAB4AUABQAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQABMAUAAEAAQABAAEAAQABAAEAB4AHgAEAAQABAAEAAQABABQAFAABAAEAB4ABAAEAAQABABQAFAASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUAAeAB4AUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAFAABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQAUABQAB4AHgAYABMAUAArACsABAAbABsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAFAABAAEAAQABAAEAFAABAAEAAQAUAAEAAQABAAEAAQAKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAArACsAHgArAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAB4ABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAUAAEAAQABAAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAABAAEAA0ADQBLAEsASwBLAEsASwBLAEsASwBLAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAArAFAAUABQAFAAUABQAFAAUAArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUAArACsAKwBQAFAAUABQACsAKwAEAFAABAAEAAQABAAEAAQABAArACsABAAEACsAKwAEAAQABABQACsAKwArACsAKwArACsAKwAEACsAKwArACsAUABQACsAUABQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAFAAUAAaABoAUABQAFAAUABQAEwAHgAbAFAAHgAEACsAKwAEAAQABAArAFAAUABQAFAAUABQACsAKwArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQACsAUABQACsAKwAEACsABAAEAAQABAAEACsAKwArACsABAAEACsAKwAEAAQABAArACsAKwAEACsAKwArACsAKwArACsAUABQAFAAUAArAFAAKwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLAAQABABQAFAAUAAEAB4AKwArACsAKwArACsAKwArACsAKwAEAAQABAArAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQAFAAUABQACsAKwAEAFAABAAEAAQABAAEAAQABAAEACsABAAEAAQAKwAEAAQABAArACsAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAB4AGwArACsAKwArACsAKwArAFAABAAEAAQABAAEAAQAKwAEAAQABAArAFAAUABQAFAAUABQAFAAUAArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAArACsABAAEACsAKwAEAAQABAArACsAKwArACsAKwArAAQABAAEACsAKwArACsAUABQACsAUABQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAB4AUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArAAQAUAArAFAAUABQAFAAUABQACsAKwArAFAAUABQACsAUABQAFAAUAArACsAKwBQAFAAKwBQACsAUABQACsAKwArAFAAUAArACsAKwBQAFAAUAArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArAAQABAAEAAQABAArACsAKwAEAAQABAArAAQABAAEAAQAKwArAFAAKwArACsAKwArACsABAArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAHgAeAB4AHgAeAB4AGwAeACsAKwArACsAKwAEAAQABAAEAAQAUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAUAAEAAQABAAEAAQABAAEACsABAAEAAQAKwAEAAQABAAEACsAKwArACsAKwArACsABAAEACsAUABQAFAAKwArACsAKwArAFAAUAAEAAQAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAKwAOAFAAUABQAFAAUABQAFAAHgBQAAQABAAEAA4AUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAKwArAAQAUAAEAAQABAAEAAQABAAEACsABAAEAAQAKwAEAAQABAAEACsAKwArACsAKwArACsABAAEACsAKwArACsAKwArACsAUAArAFAAUAAEAAQAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwBQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAFAABAAEAAQABAAEAAQABAArAAQABAAEACsABAAEAAQABABQAB4AKwArACsAKwBQAFAAUAAEAFAAUABQAFAAUABQAFAAUABQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAFAAUABQAFAAUABQAFAAUABQABoAUABQAFAAUABQAFAAKwAEAAQABAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQACsAUAArACsAUABQAFAAUABQAFAAUAArACsAKwAEACsAKwArACsABAAEAAQABAAEAAQAKwAEACsABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArAAQABAAeACsAKwArACsAKwArACsAKwArACsAKwArAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAAqAFwAXAAqACoAKgAqACoAKgAqACsAKwArACsAGwBcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAeAEsASwBLAEsASwBLAEsASwBLAEsADQANACsAKwArACsAKwBcAFwAKwBcACsAXABcAFwAXABcACsAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACsAXAArAFwAXABcAFwAXABcAFwAXABcAFwAKgBcAFwAKgAqACoAKgAqACoAKgAqACoAXAArACsAXABcAFwAXABcACsAXAArACoAKgAqACoAKgAqACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwBcAFwAXABcAFAADgAOAA4ADgAeAA4ADgAJAA4ADgANAAkAEwATABMAEwATAAkAHgATAB4AHgAeAAQABAAeAB4AHgAeAB4AHgBLAEsASwBLAEsASwBLAEsASwBLAFAAUABQAFAAUABQAFAAUABQAFAADQAEAB4ABAAeAAQAFgARABYAEQAEAAQAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQADQAEAAQABAAEAAQADQAEAAQAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArAA0ADQAeAB4AHgAeAB4AHgAEAB4AHgAeAB4AHgAeACsAHgAeAA4ADgANAA4AHgAeAB4AHgAeAAkACQArACsAKwArACsAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgBcAEsASwBLAEsASwBLAEsASwBLAEsADQANAB4AHgAeAB4AXABcAFwAXABcAFwAKgAqACoAKgBcAFwAXABcACoAKgAqAFwAKgAqACoAXABcACoAKgAqACoAKgAqACoAXABcAFwAKgAqACoAKgBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAqACoAKgAqAFwAKgBLAEsASwBLAEsASwBLAEsASwBLACoAKgAqACoAKgAqAFAAUABQAFAAUABQACsAUAArACsAKwArACsAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgBQAFAAUABQAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUAArACsAUABQAFAAUABQAFAAUAArAFAAKwBQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAKwBQACsAUABQAFAAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsABAAEAAQAHgANAB4AHgAeAB4AHgAeAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUAArACsADQBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAANAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAWABEAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAA0ADQANAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAANAA0AKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUAArAAQABAArACsAKwArACsAKwArACsAKwArACsAKwBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqAA0ADQAVAFwADQAeAA0AGwBcACoAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwAeAB4AEwATAA0ADQAOAB4AEwATAB4ABAAEAAQACQArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUAAEAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAHgArACsAKwATABMASwBLAEsASwBLAEsASwBLAEsASwBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAArACsAXABcAFwAXABcACsAKwArACsAKwArACsAKwArACsAKwBcAFwAXABcAFwAXABcAFwAXABcAFwAXAArACsAKwArAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAXAArACsAKwAqACoAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAArACsAHgAeAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAqACoAKwAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKwArAAQASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArACoAKgAqACoAKgAqACoAXAAqACoAKgAqACoAKgArACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsABAAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABABQAFAAUABQAFAAUABQACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwANAA0AHgANAA0ADQANAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAEAAQABAAEAAQAHgAeAB4AHgAeAB4AHgAeAB4AKwArACsABAAEAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwAeAB4AHgAeAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArAA0ADQANAA0ADQBLAEsASwBLAEsASwBLAEsASwBLACsAKwArAFAAUABQAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAA0ADQBQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUAAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArAAQABAAEAB4ABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAAQAUABQAFAAUABQAFAABABQAFAABAAEAAQAUAArACsAKwArACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsABAAEAAQABAAEAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAKwBQACsAUAArAFAAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArAB4AHgAeAB4AHgAeAB4AHgBQAB4AHgAeAFAAUABQACsAHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQACsAKwAeAB4AHgAeAB4AHgArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArAFAAUABQACsAHgAeAB4AHgAeAB4AHgAOAB4AKwANAA0ADQANAA0ADQANAAkADQANAA0ACAAEAAsABAAEAA0ACQANAA0ADAAdAB0AHgAXABcAFgAXABcAFwAWABcAHQAdAB4AHgAUABQAFAANAAEAAQAEAAQABAAEAAQACQAaABoAGgAaABoAGgAaABoAHgAXABcAHQAVABUAHgAeAB4AHgAeAB4AGAAWABEAFQAVABUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ADQAeAA0ADQANAA0AHgANAA0ADQAHAB4AHgAeAB4AKwAEAAQABAAEAAQABAAEAAQABAAEAFAAUAArACsATwBQAFAAUABQAFAAHgAeAB4AFgARAE8AUABPAE8ATwBPAFAAUABQAFAAUAAeAB4AHgAWABEAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArABsAGwAbABsAGwAbABsAGgAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGgAbABsAGwAbABoAGwAbABoAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAHgAeAFAAGgAeAB0AHgBQAB4AGgAeAB4AHgAeAB4AHgAeAB4AHgBPAB4AUAAbAB4AHgBQAFAAUABQAFAAHgAeAB4AHQAdAB4AUAAeAFAAHgBQAB4AUABPAFAAUAAeAB4AHgAeAB4AHgAeAFAAUABQAFAAUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAAHgBQAFAAUABQAE8ATwBQAFAAUABQAFAATwBQAFAATwBQAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAFAAUABQAFAATwBPAE8ATwBPAE8ATwBPAE8ATwBQAFAAUABQAFAAUABQAFAAUAAeAB4AUABQAFAAUABPAB4AHgArACsAKwArAB0AHQAdAB0AHQAdAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB4AHQAdAB4AHgAeAB0AHQAeAB4AHQAeAB4AHgAdAB4AHQAbABsAHgAdAB4AHgAeAB4AHQAeAB4AHQAdAB0AHQAeAB4AHQAeAB0AHgAdAB0AHQAdAB0AHQAeAB0AHgAeAB4AHgAeAB0AHQAdAB0AHgAeAB4AHgAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB4AHgAeAB0AHgAeAB4AHgAeAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHgAeAB0AHQAdAB0AHgAeAB0AHQAeAB4AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHQAeAB4AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHQAeAB4AHgAdAB4AHgAeAB4AHgAeAB4AHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AFAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeABYAEQAWABEAHgAeAB4AHgAeAB4AHQAeAB4AHgAeAB4AHgAeACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAWABEAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAFAAHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHgAeAB4AHgAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAeAB4AHQAdAB0AHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHQAeAB0AHQAdAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB0AHQAeAB4AHQAdAB4AHgAeAB4AHQAdAB4AHgAeAB4AHQAdAB0AHgAeAB0AHgAeAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlAB4AHQAdAB4AHgAdAB4AHgAeAB4AHQAdAB4AHgAeAB4AJQAlAB0AHQAlAB4AJQAlACUAIAAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAeAB4AHgAeAB0AHgAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHgAdAB0AHQAeAB0AJQAdAB0AHgAdAB0AHgAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACUAJQAlACUAJQAdAB0AHQAdACUAHgAlACUAJQAdACUAJQAdAB0AHQAlACUAHQAdACUAHQAdACUAJQAlAB4AHQAeAB4AHgAeAB0AHQAlAB0AHQAdAB0AHQAdACUAJQAlACUAJQAdACUAJQAgACUAHQAdACUAJQAlACUAJQAlACUAJQAeAB4AHgAlACUAIAAgACAAIAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAeAB4AFwAXABcAFwAXABcAHgATABMAJQAeAB4AHgAWABEAFgARABYAEQAWABEAFgARABYAEQAWABEATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeABYAEQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAWABEAFgARABYAEQAWABEAFgARAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AFgARABYAEQAWABEAFgARABYAEQAWABEAFgARABYAEQAWABEAFgARABYAEQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAWABEAFgARAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AFgARAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AUABQAFAAUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAEAAQABAAeAB4AKwArACsAKwArABMADQANAA0AUAATAA0AUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAUAANACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAA0ADQANAA0ADQANAA0ADQAeAA0AFgANAB4AHgAXABcAHgAeABcAFwAWABEAFgARABYAEQAWABEADQANAA0ADQATAFAADQANAB4ADQANAB4AHgAeAB4AHgAMAAwADQANAA0AHgANAA0AFgANAA0ADQANAA0ADQANAA0AHgANAB4ADQANAB4AHgAeACsAKwArACsAKwArACsAKwArACsAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAKwArACsAKwArACsAKwArACsAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAlACUAJQAlACUAJQAlACUAJQAlACUAJQArACsAKwArAA0AEQARACUAJQBHAFcAVwAWABEAFgARABYAEQAWABEAFgARACUAJQAWABEAFgARABYAEQAWABEAFQAWABEAEQAlAFcAVwBXAFcAVwBXAFcAVwBXAAQABAAEAAQABAAEACUAVwBXAFcAVwA2ACUAJQBXAFcAVwBHAEcAJQAlACUAKwBRAFcAUQBXAFEAVwBRAFcAUQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFEAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBRAFcAUQBXAFEAVwBXAFcAVwBXAFcAUQBXAFcAVwBXAFcAVwBRAFEAKwArAAQABAAVABUARwBHAFcAFQBRAFcAUQBXAFEAVwBRAFcAUQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFEAVwBRAFcAUQBXAFcAVwBXAFcAVwBRAFcAVwBXAFcAVwBXAFEAUQBXAFcAVwBXABUAUQBHAEcAVwArACsAKwArACsAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAKwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAKwAlACUAVwBXAFcAVwAlACUAJQAlACUAJQAlACUAJQAlACsAKwArACsAKwArACsAKwArACsAKwArAFEAUQBRAFEAUQBRAFEAUQBRAFEAUQBRAFEAUQBRAFEAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQArAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQBPAE8ATwBPAE8ATwBPAE8AJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQAlAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAEcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAADQATAA0AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABLAEsASwBLAEsASwBLAEsASwBLAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAABAAEAAQABAAeAAQABAAEAAQABAAEAAQABAAEAAQAHgBQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AUABQAAQABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAeAA0ADQANAA0ADQArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAB4AHgAeAB4AHgAeAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAHgAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAeAB4AUABQAFAAUABQAFAAUABQAFAAUABQAAQAUABQAFAABABQAFAAUABQAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAeAB4AHgAeAAQAKwArACsAUABQAFAAUABQAFAAHgAeABoAHgArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAADgAOABMAEwArACsAKwArACsAKwArACsABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwANAA0ASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAFAAUAAeAB4AHgBQAA4AUABQAAQAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAA0ADQBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArACsAKwArACsAKwArAB4AWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYACsAKwArAAQAHgAeAB4AHgAeAB4ADQANAA0AHgAeAB4AHgArAFAASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArAB4AHgBcAFwAXABcAFwAKgBcAFwAXABcAFwAXABcAFwAXABcAEsASwBLAEsASwBLAEsASwBLAEsAXABcAFwAXABcACsAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArAFAAUABQAAQAUABQAFAAUABQAFAAUABQAAQABAArACsASwBLAEsASwBLAEsASwBLAEsASwArACsAHgANAA0ADQBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKgAqACoAXAAqACoAKgBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAAqAFwAKgAqACoAXABcACoAKgBcAFwAXABcAFwAKgAqAFwAKgBcACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFwAXABcACoAKgBQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAA0ADQBQAFAAUAAEAAQAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUAArACsAUABQAFAAUABQAFAAKwArAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQADQAEAAQAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAVABVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBUAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVACsAKwArACsAKwArACsAKwArACsAKwArAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAKwArACsAKwBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAKwArACsAKwAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAKwArACsAKwArAFYABABWAFYAVgBWAFYAVgBWAFYAVgBWAB4AVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgArAFYAVgBWAFYAVgArAFYAKwBWAFYAKwBWAFYAKwBWAFYAVgBWAFYAVgBWAFYAVgBWAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAEQAWAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUAAaAB4AKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAGAARABEAGAAYABMAEwAWABEAFAArACsAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACUAJQAlACUAJQAWABEAFgARABYAEQAWABEAFgARABYAEQAlACUAFgARACUAJQAlACUAJQAlACUAEQAlABEAKwAVABUAEwATACUAFgARABYAEQAWABEAJQAlACUAJQAlACUAJQAlACsAJQAbABoAJQArACsAKwArAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAcAKwATACUAJQAbABoAJQAlABYAEQAlACUAEQAlABEAJQBXAFcAVwBXAFcAVwBXAFcAVwBXABUAFQAlACUAJQATACUAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXABYAJQARACUAJQAlAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwAWACUAEQAlABYAEQARABYAEQARABUAVwBRAFEAUQBRAFEAUQBRAFEAUQBRAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAEcARwArACsAVwBXAFcAVwBXAFcAKwArAFcAVwBXAFcAVwBXACsAKwBXAFcAVwBXAFcAVwArACsAVwBXAFcAKwArACsAGgAbACUAJQAlABsAGwArAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwAEAAQABAAQAB0AKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsADQANAA0AKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAB4AHgAeAB4AHgAeAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAAQAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAA0AUABQAFAAUAArACsAKwArAFAAUABQAFAAUABQAFAAUAANAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwAeACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAKwArAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUAArACsAKwBQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwANAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAB4AUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAA0AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAUABQAFAAUABQAAQABAAEACsABAAEACsAKwArACsAKwAEAAQABAAEAFAAUABQAFAAKwBQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAQABAAEACsAKwArACsABABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAA0ADQANAA0ADQANAA0ADQAeACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAFAAUABQAFAAUABQAFAAUAAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAArACsAKwArAFAAUABQAFAAUAANAA0ADQANAA0ADQAUACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsADQANAA0ADQANAA0ADQBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAAQABAAEAAQAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUAArAAQABAANACsAKwBQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAB4AHgAeAB4AHgArACsAKwArACsAKwAEAAQABAAEAAQABAAEAA0ADQAeAB4AHgAeAB4AKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgANAA0ADQANACsAKwArACsAKwArACsAKwArACsAKwAeACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsASwBLAEsASwBLAEsASwBLAEsASwANAA0ADQANAFAABAAEAFAAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAeAA4AUAArACsAKwArACsAKwArACsAKwAEAFAAUABQAFAADQANAB4ADQAEAAQABAAEAB4ABAAEAEsASwBLAEsASwBLAEsASwBLAEsAUAAOAFAADQANAA0AKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAANAA0AHgANAA0AHgAEACsAUABQAFAAUABQAFAAUAArAFAAKwBQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAA0AKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsABAAEAAQABAArAFAAUABQAFAAUABQAFAAUAArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQAFAAUABQACsABAAEAFAABAAEAAQABAAEAAQABAArACsABAAEACsAKwAEAAQABAArACsAUAArACsAKwArACsAKwAEACsAKwArACsAKwBQAFAAUABQAFAABAAEACsAKwAEAAQABAAEAAQABAAEACsAKwArAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwArACsABAAEAAQABAAEAAQABABQAFAAUABQAA0ADQANAA0AHgBLAEsASwBLAEsASwBLAEsASwBLAA0ADQArAB4ABABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAAQABAAEAFAAUAAeAFAAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAArACsABAAEAAQABAAEAAQABAAEAAQADgANAA0AEwATAB4AHgAeAA0ADQANAA0ADQANAA0ADQANAA0ADQANAA0ADQANAFAAUABQAFAABAAEACsAKwAEAA0ADQAeAFAAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAFAAKwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKwArACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwBcAFwADQANAA0AKgBQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAKwArAFAAKwArAFAAUABQAFAAUABQAFAAUAArAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQAKwAEAAQAKwArAAQABAAEAAQAUAAEAFAABAAEAA0ADQANACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAArACsABAAEAAQABAAEAAQABABQAA4AUAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAFAABAAEAAQABAAOAB4ADQANAA0ADQAOAB4ABAArACsAKwArACsAKwArACsAUAAEAAQABAAEAAQABAAEAAQABAAEAAQAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAA0ADQANAFAADgAOAA4ADQANACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEACsABAAEAAQABAAEAAQABAAEAFAADQANAA0ADQANACsAKwArACsAKwArACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwAOABMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAArACsAKwAEACsABAAEACsABAAEAAQABAAEAAQABABQAAQAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAKwBQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQAKwAEAAQAKwAEAAQABAAEAAQAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAaABoAGgAaAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArACsAKwArAA0AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsADQANAA0ADQANACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAASABIAEgAQwBDAEMAUABQAFAAUABDAFAAUABQAEgAQwBIAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAASABDAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwAJAAkACQAJAAkACQAJABYAEQArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABIAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwANAA0AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAQABAAEAAQABAANACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAA0ADQANAB4AHgAeAB4AHgAeAFAAUABQAFAADQAeACsAKwArACsAKwArACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAANAA0AHgAeACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwAEAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArACsAKwAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAARwBHABUARwAJACsAKwArACsAKwArACsAKwArACsAKwAEAAQAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACsAKwArACsAKwArACsAKwBXAFcAVwBXAFcAVwBXAFcAVwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUQBRAFEAKwArACsAKwArACsAKwArACsAKwArACsAKwBRAFEAUQBRACsAKwArACsAKwArACsAKwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUAArACsAHgAEAAQADQAEAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArAB4AHgAeAB4AHgAeAB4AKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAAQABAAEAAQABAAeAB4AHgAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAB4AHgAEAAQABAAEAAQABAAEAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQAHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwBQAFAAKwArAFAAKwArAFAAUAArACsAUABQAFAAUAArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAUAArAFAAUABQAFAAUABQAFAAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwBQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAHgAeAFAAUABQAFAAUAArAFAAKwArACsAUABQAFAAUABQAFAAUAArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeACsAKwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgAeAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgAeAB4AHgAeAB4ABAAeAB4AHgAeAB4AHgAeAB4AHgAeAAQAHgAeAA0ADQANAA0AHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAAQABAAEAAQAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAEAAQAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArAAQABAAEAAQABAAEAAQAKwAEAAQAKwAEAAQABAAEAAQAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwAEAAQABAAEAAQABAAEAFAAUABQAFAAUABQAFAAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwBQAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArABsAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArAB4AHgAeAB4ABAAEAAQABAAEAAQABABQACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArABYAFgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAGgBQAFAAUAAaAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAKwBQACsAKwBQACsAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAKwBQACsAUAArACsAKwArACsAKwBQACsAKwArACsAUAArAFAAKwBQACsAUABQAFAAKwBQAFAAKwBQACsAKwBQACsAUAArAFAAKwBQACsAUAArAFAAUAArAFAAKwArAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQAFAAUAArAFAAUABQAFAAKwBQACsAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAUABQAFAAKwBQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8AJQAlACUAHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHgAeAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB4AHgAeACUAJQAlAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAJQAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlAB4AHgAlACUAJQAlACUAHgAlACUAJQAlACUAIAAgACAAJQAlACAAJQAlACAAIAAgACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACEAIQAhACEAIQAlACUAIAAgACUAJQAgACAAIAAgACAAIAAgACAAIAAgACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAJQAlACUAIAAlACUAJQAlACAAIAAgACUAIAAgACAAJQAlACUAJQAlACUAJQAgACUAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAlAB4AJQAeACUAJQAlACUAJQAgACUAJQAlACUAHgAlAB4AHgAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAJQAlACUAJQAgACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACAAIAAgACUAJQAlACAAIAAgACAAIAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeABcAFwAXABUAFQAVAB4AHgAeAB4AJQAlACUAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAgACUAJQAlACUAJQAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAgACUAJQAgACUAJQAlACUAJQAlACUAJQAgACAAIAAgACAAIAAgACAAJQAlACUAJQAlACUAIAAlACUAJQAlACUAJQAlACUAJQAgACAAIAAgACAAIAAgACAAIAAgACUAJQAgACAAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAgACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAlACAAIAAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAgACAAIAAlACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAJQAlAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAKwArAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwAlACUAJQAlACUAJQAlACUAJQAlACUAVwBXACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAKwAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAA==';\n\n\t    var LETTER_NUMBER_MODIFIER = 50;\n\t    // Non-tailorable Line Breaking Classes\n\t    var BK = 1; //  Cause a line break (after)\n\t    var CR$1 = 2; //  Cause a line break (after), except between CR and LF\n\t    var LF$1 = 3; //  Cause a line break (after)\n\t    var CM = 4; //  Prohibit a line break between the character and the preceding character\n\t    var NL = 5; //  Cause a line break (after)\n\t    var WJ = 7; //  Prohibit line breaks before and after\n\t    var ZW = 8; //  Provide a break opportunity\n\t    var GL = 9; //  Prohibit line breaks before and after\n\t    var SP = 10; // Enable indirect line breaks\n\t    var ZWJ$1 = 11; // Prohibit line breaks within joiner sequences\n\t    // Break Opportunities\n\t    var B2 = 12; //  Provide a line break opportunity before and after the character\n\t    var BA = 13; //  Generally provide a line break opportunity after the character\n\t    var BB = 14; //  Generally provide a line break opportunity before the character\n\t    var HY = 15; //  Provide a line break opportunity after the character, except in numeric context\n\t    var CB = 16; //   Provide a line break opportunity contingent on additional information\n\t    // Characters Prohibiting Certain Breaks\n\t    var CL = 17; //  Prohibit line breaks before\n\t    var CP = 18; //  Prohibit line breaks before\n\t    var EX = 19; //  Prohibit line breaks before\n\t    var IN = 20; //  Allow only indirect line breaks between pairs\n\t    var NS = 21; //  Allow only indirect line breaks before\n\t    var OP = 22; //  Prohibit line breaks after\n\t    var QU = 23; //  Act like they are both opening and closing\n\t    // Numeric Context\n\t    var IS = 24; //  Prevent breaks after any and before numeric\n\t    var NU = 25; //  Form numeric expressions for line breaking purposes\n\t    var PO = 26; //  Do not break following a numeric expression\n\t    var PR = 27; //  Do not break in front of a numeric expression\n\t    var SY = 28; //  Prevent a break before; and allow a break after\n\t    // Other Characters\n\t    var AI = 29; //  Act like AL when the resolvedEAW is N; otherwise; act as ID\n\t    var AL = 30; //  Are alphabetic characters or symbols that are used with alphabetic characters\n\t    var CJ = 31; //  Treat as NS or ID for strict or normal breaking.\n\t    var EB = 32; //  Do not break from following Emoji Modifier\n\t    var EM = 33; //  Do not break from preceding Emoji Base\n\t    var H2 = 34; //  Form Korean syllable blocks\n\t    var H3 = 35; //  Form Korean syllable blocks\n\t    var HL = 36; //  Do not break around a following hyphen; otherwise act as Alphabetic\n\t    var ID = 37; //  Break before or after; except in some numeric context\n\t    var JL = 38; //  Form Korean syllable blocks\n\t    var JV = 39; //  Form Korean syllable blocks\n\t    var JT = 40; //  Form Korean syllable blocks\n\t    var RI$1 = 41; //  Keep pairs together. For pairs; break before and after other classes\n\t    var SA = 42; //  Provide a line break opportunity contingent on additional, language-specific context analysis\n\t    var XX = 43; //  Have as yet unknown line breaking behavior or unassigned code positions\n\t    var ea_OP = [0x2329, 0xff08];\n\t    var BREAK_MANDATORY = '!';\n\t    var BREAK_NOT_ALLOWED$1 = '×';\n\t    var BREAK_ALLOWED$1 = '÷';\n\t    var UnicodeTrie$1 = createTrieFromBase64$1(base64$1);\n\t    var ALPHABETICS = [AL, HL];\n\t    var HARD_LINE_BREAKS = [BK, CR$1, LF$1, NL];\n\t    var SPACE$1 = [SP, ZW];\n\t    var PREFIX_POSTFIX = [PR, PO];\n\t    var LINE_BREAKS = HARD_LINE_BREAKS.concat(SPACE$1);\n\t    var KOREAN_SYLLABLE_BLOCK = [JL, JV, JT, H2, H3];\n\t    var HYPHEN = [HY, BA];\n\t    var codePointsToCharacterClasses = function (codePoints, lineBreak) {\n\t        if (lineBreak === void 0) { lineBreak = 'strict'; }\n\t        var types = [];\n\t        var indices = [];\n\t        var categories = [];\n\t        codePoints.forEach(function (codePoint, index) {\n\t            var classType = UnicodeTrie$1.get(codePoint);\n\t            if (classType > LETTER_NUMBER_MODIFIER) {\n\t                categories.push(true);\n\t                classType -= LETTER_NUMBER_MODIFIER;\n\t            }\n\t            else {\n\t                categories.push(false);\n\t            }\n\t            if (['normal', 'auto', 'loose'].indexOf(lineBreak) !== -1) {\n\t                // U+2010, – U+2013, 〜 U+301C, ゠ U+30A0\n\t                if ([0x2010, 0x2013, 0x301c, 0x30a0].indexOf(codePoint) !== -1) {\n\t                    indices.push(index);\n\t                    return types.push(CB);\n\t                }\n\t            }\n\t            if (classType === CM || classType === ZWJ$1) {\n\t                // LB10 Treat any remaining combining mark or ZWJ as AL.\n\t                if (index === 0) {\n\t                    indices.push(index);\n\t                    return types.push(AL);\n\t                }\n\t                // LB9 Do not break a combining character sequence; treat it as if it has the line breaking class of\n\t                // the base character in all of the following rules. Treat ZWJ as if it were CM.\n\t                var prev = types[index - 1];\n\t                if (LINE_BREAKS.indexOf(prev) === -1) {\n\t                    indices.push(indices[index - 1]);\n\t                    return types.push(prev);\n\t                }\n\t                indices.push(index);\n\t                return types.push(AL);\n\t            }\n\t            indices.push(index);\n\t            if (classType === CJ) {\n\t                return types.push(lineBreak === 'strict' ? NS : ID);\n\t            }\n\t            if (classType === SA) {\n\t                return types.push(AL);\n\t            }\n\t            if (classType === AI) {\n\t                return types.push(AL);\n\t            }\n\t            // For supplementary characters, a useful default is to treat characters in the range 10000..1FFFD as AL\n\t            // and characters in the ranges 20000..2FFFD and 30000..3FFFD as ID, until the implementation can be revised\n\t            // to take into account the actual line breaking properties for these characters.\n\t            if (classType === XX) {\n\t                if ((codePoint >= 0x20000 && codePoint <= 0x2fffd) || (codePoint >= 0x30000 && codePoint <= 0x3fffd)) {\n\t                    return types.push(ID);\n\t                }\n\t                else {\n\t                    return types.push(AL);\n\t                }\n\t            }\n\t            types.push(classType);\n\t        });\n\t        return [indices, types, categories];\n\t    };\n\t    var isAdjacentWithSpaceIgnored = function (a, b, currentIndex, classTypes) {\n\t        var current = classTypes[currentIndex];\n\t        if (Array.isArray(a) ? a.indexOf(current) !== -1 : a === current) {\n\t            var i = currentIndex;\n\t            while (i <= classTypes.length) {\n\t                i++;\n\t                var next = classTypes[i];\n\t                if (next === b) {\n\t                    return true;\n\t                }\n\t                if (next !== SP) {\n\t                    break;\n\t                }\n\t            }\n\t        }\n\t        if (current === SP) {\n\t            var i = currentIndex;\n\t            while (i > 0) {\n\t                i--;\n\t                var prev = classTypes[i];\n\t                if (Array.isArray(a) ? a.indexOf(prev) !== -1 : a === prev) {\n\t                    var n = currentIndex;\n\t                    while (n <= classTypes.length) {\n\t                        n++;\n\t                        var next = classTypes[n];\n\t                        if (next === b) {\n\t                            return true;\n\t                        }\n\t                        if (next !== SP) {\n\t                            break;\n\t                        }\n\t                    }\n\t                }\n\t                if (prev !== SP) {\n\t                    break;\n\t                }\n\t            }\n\t        }\n\t        return false;\n\t    };\n\t    var previousNonSpaceClassType = function (currentIndex, classTypes) {\n\t        var i = currentIndex;\n\t        while (i >= 0) {\n\t            var type = classTypes[i];\n\t            if (type === SP) {\n\t                i--;\n\t            }\n\t            else {\n\t                return type;\n\t            }\n\t        }\n\t        return 0;\n\t    };\n\t    var _lineBreakAtIndex = function (codePoints, classTypes, indicies, index, forbiddenBreaks) {\n\t        if (indicies[index] === 0) {\n\t            return BREAK_NOT_ALLOWED$1;\n\t        }\n\t        var currentIndex = index - 1;\n\t        if (Array.isArray(forbiddenBreaks) && forbiddenBreaks[currentIndex] === true) {\n\t            return BREAK_NOT_ALLOWED$1;\n\t        }\n\t        var beforeIndex = currentIndex - 1;\n\t        var afterIndex = currentIndex + 1;\n\t        var current = classTypes[currentIndex];\n\t        // LB4 Always break after hard line breaks.\n\t        // LB5 Treat CR followed by LF, as well as CR, LF, and NL as hard line breaks.\n\t        var before = beforeIndex >= 0 ? classTypes[beforeIndex] : 0;\n\t        var next = classTypes[afterIndex];\n\t        if (current === CR$1 && next === LF$1) {\n\t            return BREAK_NOT_ALLOWED$1;\n\t        }\n\t        if (HARD_LINE_BREAKS.indexOf(current) !== -1) {\n\t            return BREAK_MANDATORY;\n\t        }\n\t        // LB6 Do not break before hard line breaks.\n\t        if (HARD_LINE_BREAKS.indexOf(next) !== -1) {\n\t            return BREAK_NOT_ALLOWED$1;\n\t        }\n\t        // LB7 Do not break before spaces or zero width space.\n\t        if (SPACE$1.indexOf(next) !== -1) {\n\t            return BREAK_NOT_ALLOWED$1;\n\t        }\n\t        // LB8 Break before any character following a zero-width space, even if one or more spaces intervene.\n\t        if (previousNonSpaceClassType(currentIndex, classTypes) === ZW) {\n\t            return BREAK_ALLOWED$1;\n\t        }\n\t        // LB8a Do not break after a zero width joiner.\n\t        if (UnicodeTrie$1.get(codePoints[currentIndex]) === ZWJ$1) {\n\t            return BREAK_NOT_ALLOWED$1;\n\t        }\n\t        // zwj emojis\n\t        if ((current === EB || current === EM) && UnicodeTrie$1.get(codePoints[afterIndex]) === ZWJ$1) {\n\t            return BREAK_NOT_ALLOWED$1;\n\t        }\n\t        // LB11 Do not break before or after Word joiner and related characters.\n\t        if (current === WJ || next === WJ) {\n\t            return BREAK_NOT_ALLOWED$1;\n\t        }\n\t        // LB12 Do not break after NBSP and related characters.\n\t        if (current === GL) {\n\t            return BREAK_NOT_ALLOWED$1;\n\t        }\n\t        // LB12a Do not break before NBSP and related characters, except after spaces and hyphens.\n\t        if ([SP, BA, HY].indexOf(current) === -1 && next === GL) {\n\t            return BREAK_NOT_ALLOWED$1;\n\t        }\n\t        // LB13 Do not break before ‘]’ or ‘!’ or ‘;’ or ‘/’, even after spaces.\n\t        if ([CL, CP, EX, IS, SY].indexOf(next) !== -1) {\n\t            return BREAK_NOT_ALLOWED$1;\n\t        }\n\t        // LB14 Do not break after ‘[’, even after spaces.\n\t        if (previousNonSpaceClassType(currentIndex, classTypes) === OP) {\n\t            return BREAK_NOT_ALLOWED$1;\n\t        }\n\t        // LB15 Do not break within ‘”[’, even with intervening spaces.\n\t        if (isAdjacentWithSpaceIgnored(QU, OP, currentIndex, classTypes)) {\n\t            return BREAK_NOT_ALLOWED$1;\n\t        }\n\t        // LB16 Do not break between closing punctuation and a nonstarter (lb=NS), even with intervening spaces.\n\t        if (isAdjacentWithSpaceIgnored([CL, CP], NS, currentIndex, classTypes)) {\n\t            return BREAK_NOT_ALLOWED$1;\n\t        }\n\t        // LB17 Do not break within ‘——’, even with intervening spaces.\n\t        if (isAdjacentWithSpaceIgnored(B2, B2, currentIndex, classTypes)) {\n\t            return BREAK_NOT_ALLOWED$1;\n\t        }\n\t        // LB18 Break after spaces.\n\t        if (current === SP) {\n\t            return BREAK_ALLOWED$1;\n\t        }\n\t        // LB19 Do not break before or after quotation marks, such as ‘ ” ’.\n\t        if (current === QU || next === QU) {\n\t            return BREAK_NOT_ALLOWED$1;\n\t        }\n\t        // LB20 Break before and after unresolved CB.\n\t        if (next === CB || current === CB) {\n\t            return BREAK_ALLOWED$1;\n\t        }\n\t        // LB21 Do not break before hyphen-minus, other hyphens, fixed-width spaces, small kana, and other non-starters, or after acute accents.\n\t        if ([BA, HY, NS].indexOf(next) !== -1 || current === BB) {\n\t            return BREAK_NOT_ALLOWED$1;\n\t        }\n\t        // LB21a Don't break after Hebrew + Hyphen.\n\t        if (before === HL && HYPHEN.indexOf(current) !== -1) {\n\t            return BREAK_NOT_ALLOWED$1;\n\t        }\n\t        // LB21b Don’t break between Solidus and Hebrew letters.\n\t        if (current === SY && next === HL) {\n\t            return BREAK_NOT_ALLOWED$1;\n\t        }\n\t        // LB22 Do not break before ellipsis.\n\t        if (next === IN) {\n\t            return BREAK_NOT_ALLOWED$1;\n\t        }\n\t        // LB23 Do not break between digits and letters.\n\t        if ((ALPHABETICS.indexOf(next) !== -1 && current === NU) || (ALPHABETICS.indexOf(current) !== -1 && next === NU)) {\n\t            return BREAK_NOT_ALLOWED$1;\n\t        }\n\t        // LB23a Do not break between numeric prefixes and ideographs, or between ideographs and numeric postfixes.\n\t        if ((current === PR && [ID, EB, EM].indexOf(next) !== -1) ||\n\t            ([ID, EB, EM].indexOf(current) !== -1 && next === PO)) {\n\t            return BREAK_NOT_ALLOWED$1;\n\t        }\n\t        // LB24 Do not break between numeric prefix/postfix and letters, or between letters and prefix/postfix.\n\t        if ((ALPHABETICS.indexOf(current) !== -1 && PREFIX_POSTFIX.indexOf(next) !== -1) ||\n\t            (PREFIX_POSTFIX.indexOf(current) !== -1 && ALPHABETICS.indexOf(next) !== -1)) {\n\t            return BREAK_NOT_ALLOWED$1;\n\t        }\n\t        // LB25 Do not break between the following pairs of classes relevant to numbers:\n\t        if (\n\t        // (PR | PO) × ( OP | HY )? NU\n\t        ([PR, PO].indexOf(current) !== -1 &&\n\t            (next === NU || ([OP, HY].indexOf(next) !== -1 && classTypes[afterIndex + 1] === NU))) ||\n\t            // ( OP | HY ) × NU\n\t            ([OP, HY].indexOf(current) !== -1 && next === NU) ||\n\t            // NU ×\t(NU | SY | IS)\n\t            (current === NU && [NU, SY, IS].indexOf(next) !== -1)) {\n\t            return BREAK_NOT_ALLOWED$1;\n\t        }\n\t        // NU (NU | SY | IS)* × (NU | SY | IS | CL | CP)\n\t        if ([NU, SY, IS, CL, CP].indexOf(next) !== -1) {\n\t            var prevIndex = currentIndex;\n\t            while (prevIndex >= 0) {\n\t                var type = classTypes[prevIndex];\n\t                if (type === NU) {\n\t                    return BREAK_NOT_ALLOWED$1;\n\t                }\n\t                else if ([SY, IS].indexOf(type) !== -1) {\n\t                    prevIndex--;\n\t                }\n\t                else {\n\t                    break;\n\t                }\n\t            }\n\t        }\n\t        // NU (NU | SY | IS)* (CL | CP)? × (PO | PR))\n\t        if ([PR, PO].indexOf(next) !== -1) {\n\t            var prevIndex = [CL, CP].indexOf(current) !== -1 ? beforeIndex : currentIndex;\n\t            while (prevIndex >= 0) {\n\t                var type = classTypes[prevIndex];\n\t                if (type === NU) {\n\t                    return BREAK_NOT_ALLOWED$1;\n\t                }\n\t                else if ([SY, IS].indexOf(type) !== -1) {\n\t                    prevIndex--;\n\t                }\n\t                else {\n\t                    break;\n\t                }\n\t            }\n\t        }\n\t        // LB26 Do not break a Korean syllable.\n\t        if ((JL === current && [JL, JV, H2, H3].indexOf(next) !== -1) ||\n\t            ([JV, H2].indexOf(current) !== -1 && [JV, JT].indexOf(next) !== -1) ||\n\t            ([JT, H3].indexOf(current) !== -1 && next === JT)) {\n\t            return BREAK_NOT_ALLOWED$1;\n\t        }\n\t        // LB27 Treat a Korean Syllable Block the same as ID.\n\t        if ((KOREAN_SYLLABLE_BLOCK.indexOf(current) !== -1 && [IN, PO].indexOf(next) !== -1) ||\n\t            (KOREAN_SYLLABLE_BLOCK.indexOf(next) !== -1 && current === PR)) {\n\t            return BREAK_NOT_ALLOWED$1;\n\t        }\n\t        // LB28 Do not break between alphabetics (“at”).\n\t        if (ALPHABETICS.indexOf(current) !== -1 && ALPHABETICS.indexOf(next) !== -1) {\n\t            return BREAK_NOT_ALLOWED$1;\n\t        }\n\t        // LB29 Do not break between numeric punctuation and alphabetics (“e.g.”).\n\t        if (current === IS && ALPHABETICS.indexOf(next) !== -1) {\n\t            return BREAK_NOT_ALLOWED$1;\n\t        }\n\t        // LB30 Do not break between letters, numbers, or ordinary symbols and opening or closing parentheses.\n\t        if ((ALPHABETICS.concat(NU).indexOf(current) !== -1 &&\n\t            next === OP &&\n\t            ea_OP.indexOf(codePoints[afterIndex]) === -1) ||\n\t            (ALPHABETICS.concat(NU).indexOf(next) !== -1 && current === CP)) {\n\t            return BREAK_NOT_ALLOWED$1;\n\t        }\n\t        // LB30a Break between two regional indicator symbols if and only if there are an even number of regional\n\t        // indicators preceding the position of the break.\n\t        if (current === RI$1 && next === RI$1) {\n\t            var i = indicies[currentIndex];\n\t            var count = 1;\n\t            while (i > 0) {\n\t                i--;\n\t                if (classTypes[i] === RI$1) {\n\t                    count++;\n\t                }\n\t                else {\n\t                    break;\n\t                }\n\t            }\n\t            if (count % 2 !== 0) {\n\t                return BREAK_NOT_ALLOWED$1;\n\t            }\n\t        }\n\t        // LB30b Do not break between an emoji base and an emoji modifier.\n\t        if (current === EB && next === EM) {\n\t            return BREAK_NOT_ALLOWED$1;\n\t        }\n\t        return BREAK_ALLOWED$1;\n\t    };\n\t    var cssFormattedClasses = function (codePoints, options) {\n\t        if (!options) {\n\t            options = { lineBreak: 'normal', wordBreak: 'normal' };\n\t        }\n\t        var _a = codePointsToCharacterClasses(codePoints, options.lineBreak), indicies = _a[0], classTypes = _a[1], isLetterNumber = _a[2];\n\t        if (options.wordBreak === 'break-all' || options.wordBreak === 'break-word') {\n\t            classTypes = classTypes.map(function (type) { return ([NU, AL, SA].indexOf(type) !== -1 ? ID : type); });\n\t        }\n\t        var forbiddenBreakpoints = options.wordBreak === 'keep-all'\n\t            ? isLetterNumber.map(function (letterNumber, i) {\n\t                return letterNumber && codePoints[i] >= 0x4e00 && codePoints[i] <= 0x9fff;\n\t            })\n\t            : undefined;\n\t        return [indicies, classTypes, forbiddenBreakpoints];\n\t    };\n\t    var Break = /** @class */ (function () {\n\t        function Break(codePoints, lineBreak, start, end) {\n\t            this.codePoints = codePoints;\n\t            this.required = lineBreak === BREAK_MANDATORY;\n\t            this.start = start;\n\t            this.end = end;\n\t        }\n\t        Break.prototype.slice = function () {\n\t            return fromCodePoint$1.apply(void 0, this.codePoints.slice(this.start, this.end));\n\t        };\n\t        return Break;\n\t    }());\n\t    var LineBreaker = function (str, options) {\n\t        var codePoints = toCodePoints$1(str);\n\t        var _a = cssFormattedClasses(codePoints, options), indicies = _a[0], classTypes = _a[1], forbiddenBreakpoints = _a[2];\n\t        var length = codePoints.length;\n\t        var lastEnd = 0;\n\t        var nextIndex = 0;\n\t        return {\n\t            next: function () {\n\t                if (nextIndex >= length) {\n\t                    return { done: true, value: null };\n\t                }\n\t                var lineBreak = BREAK_NOT_ALLOWED$1;\n\t                while (nextIndex < length &&\n\t                    (lineBreak = _lineBreakAtIndex(codePoints, classTypes, indicies, ++nextIndex, forbiddenBreakpoints)) ===\n\t                        BREAK_NOT_ALLOWED$1) { }\n\t                if (lineBreak !== BREAK_NOT_ALLOWED$1 || nextIndex === length) {\n\t                    var value = new Break(codePoints, lineBreak, lastEnd, nextIndex);\n\t                    lastEnd = nextIndex;\n\t                    return { value: value, done: false };\n\t                }\n\t                return { done: true, value: null };\n\t            },\n\t        };\n\t    };\n\n\t    // https://www.w3.org/TR/css-syntax-3\n\t    var FLAG_UNRESTRICTED = 1 << 0;\n\t    var FLAG_ID = 1 << 1;\n\t    var FLAG_INTEGER = 1 << 2;\n\t    var FLAG_NUMBER = 1 << 3;\n\t    var LINE_FEED = 0x000a;\n\t    var SOLIDUS = 0x002f;\n\t    var REVERSE_SOLIDUS = 0x005c;\n\t    var CHARACTER_TABULATION = 0x0009;\n\t    var SPACE = 0x0020;\n\t    var QUOTATION_MARK = 0x0022;\n\t    var EQUALS_SIGN = 0x003d;\n\t    var NUMBER_SIGN = 0x0023;\n\t    var DOLLAR_SIGN = 0x0024;\n\t    var PERCENTAGE_SIGN = 0x0025;\n\t    var APOSTROPHE = 0x0027;\n\t    var LEFT_PARENTHESIS = 0x0028;\n\t    var RIGHT_PARENTHESIS = 0x0029;\n\t    var LOW_LINE = 0x005f;\n\t    var HYPHEN_MINUS = 0x002d;\n\t    var EXCLAMATION_MARK = 0x0021;\n\t    var LESS_THAN_SIGN = 0x003c;\n\t    var GREATER_THAN_SIGN = 0x003e;\n\t    var COMMERCIAL_AT = 0x0040;\n\t    var LEFT_SQUARE_BRACKET = 0x005b;\n\t    var RIGHT_SQUARE_BRACKET = 0x005d;\n\t    var CIRCUMFLEX_ACCENT = 0x003d;\n\t    var LEFT_CURLY_BRACKET = 0x007b;\n\t    var QUESTION_MARK = 0x003f;\n\t    var RIGHT_CURLY_BRACKET = 0x007d;\n\t    var VERTICAL_LINE = 0x007c;\n\t    var TILDE = 0x007e;\n\t    var CONTROL = 0x0080;\n\t    var REPLACEMENT_CHARACTER = 0xfffd;\n\t    var ASTERISK = 0x002a;\n\t    var PLUS_SIGN = 0x002b;\n\t    var COMMA = 0x002c;\n\t    var COLON = 0x003a;\n\t    var SEMICOLON = 0x003b;\n\t    var FULL_STOP = 0x002e;\n\t    var NULL = 0x0000;\n\t    var BACKSPACE = 0x0008;\n\t    var LINE_TABULATION = 0x000b;\n\t    var SHIFT_OUT = 0x000e;\n\t    var INFORMATION_SEPARATOR_ONE = 0x001f;\n\t    var DELETE = 0x007f;\n\t    var EOF = -1;\n\t    var ZERO = 0x0030;\n\t    var a = 0x0061;\n\t    var e = 0x0065;\n\t    var f = 0x0066;\n\t    var u = 0x0075;\n\t    var z = 0x007a;\n\t    var A = 0x0041;\n\t    var E = 0x0045;\n\t    var F = 0x0046;\n\t    var U = 0x0055;\n\t    var Z = 0x005a;\n\t    var isDigit = function (codePoint) { return codePoint >= ZERO && codePoint <= 0x0039; };\n\t    var isSurrogateCodePoint = function (codePoint) { return codePoint >= 0xd800 && codePoint <= 0xdfff; };\n\t    var isHex = function (codePoint) {\n\t        return isDigit(codePoint) || (codePoint >= A && codePoint <= F) || (codePoint >= a && codePoint <= f);\n\t    };\n\t    var isLowerCaseLetter = function (codePoint) { return codePoint >= a && codePoint <= z; };\n\t    var isUpperCaseLetter = function (codePoint) { return codePoint >= A && codePoint <= Z; };\n\t    var isLetter = function (codePoint) { return isLowerCaseLetter(codePoint) || isUpperCaseLetter(codePoint); };\n\t    var isNonASCIICodePoint = function (codePoint) { return codePoint >= CONTROL; };\n\t    var isWhiteSpace = function (codePoint) {\n\t        return codePoint === LINE_FEED || codePoint === CHARACTER_TABULATION || codePoint === SPACE;\n\t    };\n\t    var isNameStartCodePoint = function (codePoint) {\n\t        return isLetter(codePoint) || isNonASCIICodePoint(codePoint) || codePoint === LOW_LINE;\n\t    };\n\t    var isNameCodePoint = function (codePoint) {\n\t        return isNameStartCodePoint(codePoint) || isDigit(codePoint) || codePoint === HYPHEN_MINUS;\n\t    };\n\t    var isNonPrintableCodePoint = function (codePoint) {\n\t        return ((codePoint >= NULL && codePoint <= BACKSPACE) ||\n\t            codePoint === LINE_TABULATION ||\n\t            (codePoint >= SHIFT_OUT && codePoint <= INFORMATION_SEPARATOR_ONE) ||\n\t            codePoint === DELETE);\n\t    };\n\t    var isValidEscape = function (c1, c2) {\n\t        if (c1 !== REVERSE_SOLIDUS) {\n\t            return false;\n\t        }\n\t        return c2 !== LINE_FEED;\n\t    };\n\t    var isIdentifierStart = function (c1, c2, c3) {\n\t        if (c1 === HYPHEN_MINUS) {\n\t            return isNameStartCodePoint(c2) || isValidEscape(c2, c3);\n\t        }\n\t        else if (isNameStartCodePoint(c1)) {\n\t            return true;\n\t        }\n\t        else if (c1 === REVERSE_SOLIDUS && isValidEscape(c1, c2)) {\n\t            return true;\n\t        }\n\t        return false;\n\t    };\n\t    var isNumberStart = function (c1, c2, c3) {\n\t        if (c1 === PLUS_SIGN || c1 === HYPHEN_MINUS) {\n\t            if (isDigit(c2)) {\n\t                return true;\n\t            }\n\t            return c2 === FULL_STOP && isDigit(c3);\n\t        }\n\t        if (c1 === FULL_STOP) {\n\t            return isDigit(c2);\n\t        }\n\t        return isDigit(c1);\n\t    };\n\t    var stringToNumber = function (codePoints) {\n\t        var c = 0;\n\t        var sign = 1;\n\t        if (codePoints[c] === PLUS_SIGN || codePoints[c] === HYPHEN_MINUS) {\n\t            if (codePoints[c] === HYPHEN_MINUS) {\n\t                sign = -1;\n\t            }\n\t            c++;\n\t        }\n\t        var integers = [];\n\t        while (isDigit(codePoints[c])) {\n\t            integers.push(codePoints[c++]);\n\t        }\n\t        var int = integers.length ? parseInt(fromCodePoint$1.apply(void 0, integers), 10) : 0;\n\t        if (codePoints[c] === FULL_STOP) {\n\t            c++;\n\t        }\n\t        var fraction = [];\n\t        while (isDigit(codePoints[c])) {\n\t            fraction.push(codePoints[c++]);\n\t        }\n\t        var fracd = fraction.length;\n\t        var frac = fracd ? parseInt(fromCodePoint$1.apply(void 0, fraction), 10) : 0;\n\t        if (codePoints[c] === E || codePoints[c] === e) {\n\t            c++;\n\t        }\n\t        var expsign = 1;\n\t        if (codePoints[c] === PLUS_SIGN || codePoints[c] === HYPHEN_MINUS) {\n\t            if (codePoints[c] === HYPHEN_MINUS) {\n\t                expsign = -1;\n\t            }\n\t            c++;\n\t        }\n\t        var exponent = [];\n\t        while (isDigit(codePoints[c])) {\n\t            exponent.push(codePoints[c++]);\n\t        }\n\t        var exp = exponent.length ? parseInt(fromCodePoint$1.apply(void 0, exponent), 10) : 0;\n\t        return sign * (int + frac * Math.pow(10, -fracd)) * Math.pow(10, expsign * exp);\n\t    };\n\t    var LEFT_PARENTHESIS_TOKEN = {\n\t        type: 2 /* LEFT_PARENTHESIS_TOKEN */\n\t    };\n\t    var RIGHT_PARENTHESIS_TOKEN = {\n\t        type: 3 /* RIGHT_PARENTHESIS_TOKEN */\n\t    };\n\t    var COMMA_TOKEN = { type: 4 /* COMMA_TOKEN */ };\n\t    var SUFFIX_MATCH_TOKEN = { type: 13 /* SUFFIX_MATCH_TOKEN */ };\n\t    var PREFIX_MATCH_TOKEN = { type: 8 /* PREFIX_MATCH_TOKEN */ };\n\t    var COLUMN_TOKEN = { type: 21 /* COLUMN_TOKEN */ };\n\t    var DASH_MATCH_TOKEN = { type: 9 /* DASH_MATCH_TOKEN */ };\n\t    var INCLUDE_MATCH_TOKEN = { type: 10 /* INCLUDE_MATCH_TOKEN */ };\n\t    var LEFT_CURLY_BRACKET_TOKEN = {\n\t        type: 11 /* LEFT_CURLY_BRACKET_TOKEN */\n\t    };\n\t    var RIGHT_CURLY_BRACKET_TOKEN = {\n\t        type: 12 /* RIGHT_CURLY_BRACKET_TOKEN */\n\t    };\n\t    var SUBSTRING_MATCH_TOKEN = { type: 14 /* SUBSTRING_MATCH_TOKEN */ };\n\t    var BAD_URL_TOKEN = { type: 23 /* BAD_URL_TOKEN */ };\n\t    var BAD_STRING_TOKEN = { type: 1 /* BAD_STRING_TOKEN */ };\n\t    var CDO_TOKEN = { type: 25 /* CDO_TOKEN */ };\n\t    var CDC_TOKEN = { type: 24 /* CDC_TOKEN */ };\n\t    var COLON_TOKEN = { type: 26 /* COLON_TOKEN */ };\n\t    var SEMICOLON_TOKEN = { type: 27 /* SEMICOLON_TOKEN */ };\n\t    var LEFT_SQUARE_BRACKET_TOKEN = {\n\t        type: 28 /* LEFT_SQUARE_BRACKET_TOKEN */\n\t    };\n\t    var RIGHT_SQUARE_BRACKET_TOKEN = {\n\t        type: 29 /* RIGHT_SQUARE_BRACKET_TOKEN */\n\t    };\n\t    var WHITESPACE_TOKEN = { type: 31 /* WHITESPACE_TOKEN */ };\n\t    var EOF_TOKEN = { type: 32 /* EOF_TOKEN */ };\n\t    var Tokenizer = /** @class */ (function () {\n\t        function Tokenizer() {\n\t            this._value = [];\n\t        }\n\t        Tokenizer.prototype.write = function (chunk) {\n\t            this._value = this._value.concat(toCodePoints$1(chunk));\n\t        };\n\t        Tokenizer.prototype.read = function () {\n\t            var tokens = [];\n\t            var token = this.consumeToken();\n\t            while (token !== EOF_TOKEN) {\n\t                tokens.push(token);\n\t                token = this.consumeToken();\n\t            }\n\t            return tokens;\n\t        };\n\t        Tokenizer.prototype.consumeToken = function () {\n\t            var codePoint = this.consumeCodePoint();\n\t            switch (codePoint) {\n\t                case QUOTATION_MARK:\n\t                    return this.consumeStringToken(QUOTATION_MARK);\n\t                case NUMBER_SIGN:\n\t                    var c1 = this.peekCodePoint(0);\n\t                    var c2 = this.peekCodePoint(1);\n\t                    var c3 = this.peekCodePoint(2);\n\t                    if (isNameCodePoint(c1) || isValidEscape(c2, c3)) {\n\t                        var flags = isIdentifierStart(c1, c2, c3) ? FLAG_ID : FLAG_UNRESTRICTED;\n\t                        var value = this.consumeName();\n\t                        return { type: 5 /* HASH_TOKEN */, value: value, flags: flags };\n\t                    }\n\t                    break;\n\t                case DOLLAR_SIGN:\n\t                    if (this.peekCodePoint(0) === EQUALS_SIGN) {\n\t                        this.consumeCodePoint();\n\t                        return SUFFIX_MATCH_TOKEN;\n\t                    }\n\t                    break;\n\t                case APOSTROPHE:\n\t                    return this.consumeStringToken(APOSTROPHE);\n\t                case LEFT_PARENTHESIS:\n\t                    return LEFT_PARENTHESIS_TOKEN;\n\t                case RIGHT_PARENTHESIS:\n\t                    return RIGHT_PARENTHESIS_TOKEN;\n\t                case ASTERISK:\n\t                    if (this.peekCodePoint(0) === EQUALS_SIGN) {\n\t                        this.consumeCodePoint();\n\t                        return SUBSTRING_MATCH_TOKEN;\n\t                    }\n\t                    break;\n\t                case PLUS_SIGN:\n\t                    if (isNumberStart(codePoint, this.peekCodePoint(0), this.peekCodePoint(1))) {\n\t                        this.reconsumeCodePoint(codePoint);\n\t                        return this.consumeNumericToken();\n\t                    }\n\t                    break;\n\t                case COMMA:\n\t                    return COMMA_TOKEN;\n\t                case HYPHEN_MINUS:\n\t                    var e1 = codePoint;\n\t                    var e2 = this.peekCodePoint(0);\n\t                    var e3 = this.peekCodePoint(1);\n\t                    if (isNumberStart(e1, e2, e3)) {\n\t                        this.reconsumeCodePoint(codePoint);\n\t                        return this.consumeNumericToken();\n\t                    }\n\t                    if (isIdentifierStart(e1, e2, e3)) {\n\t                        this.reconsumeCodePoint(codePoint);\n\t                        return this.consumeIdentLikeToken();\n\t                    }\n\t                    if (e2 === HYPHEN_MINUS && e3 === GREATER_THAN_SIGN) {\n\t                        this.consumeCodePoint();\n\t                        this.consumeCodePoint();\n\t                        return CDC_TOKEN;\n\t                    }\n\t                    break;\n\t                case FULL_STOP:\n\t                    if (isNumberStart(codePoint, this.peekCodePoint(0), this.peekCodePoint(1))) {\n\t                        this.reconsumeCodePoint(codePoint);\n\t                        return this.consumeNumericToken();\n\t                    }\n\t                    break;\n\t                case SOLIDUS:\n\t                    if (this.peekCodePoint(0) === ASTERISK) {\n\t                        this.consumeCodePoint();\n\t                        while (true) {\n\t                            var c = this.consumeCodePoint();\n\t                            if (c === ASTERISK) {\n\t                                c = this.consumeCodePoint();\n\t                                if (c === SOLIDUS) {\n\t                                    return this.consumeToken();\n\t                                }\n\t                            }\n\t                            if (c === EOF) {\n\t                                return this.consumeToken();\n\t                            }\n\t                        }\n\t                    }\n\t                    break;\n\t                case COLON:\n\t                    return COLON_TOKEN;\n\t                case SEMICOLON:\n\t                    return SEMICOLON_TOKEN;\n\t                case LESS_THAN_SIGN:\n\t                    if (this.peekCodePoint(0) === EXCLAMATION_MARK &&\n\t                        this.peekCodePoint(1) === HYPHEN_MINUS &&\n\t                        this.peekCodePoint(2) === HYPHEN_MINUS) {\n\t                        this.consumeCodePoint();\n\t                        this.consumeCodePoint();\n\t                        return CDO_TOKEN;\n\t                    }\n\t                    break;\n\t                case COMMERCIAL_AT:\n\t                    var a1 = this.peekCodePoint(0);\n\t                    var a2 = this.peekCodePoint(1);\n\t                    var a3 = this.peekCodePoint(2);\n\t                    if (isIdentifierStart(a1, a2, a3)) {\n\t                        var value = this.consumeName();\n\t                        return { type: 7 /* AT_KEYWORD_TOKEN */, value: value };\n\t                    }\n\t                    break;\n\t                case LEFT_SQUARE_BRACKET:\n\t                    return LEFT_SQUARE_BRACKET_TOKEN;\n\t                case REVERSE_SOLIDUS:\n\t                    if (isValidEscape(codePoint, this.peekCodePoint(0))) {\n\t                        this.reconsumeCodePoint(codePoint);\n\t                        return this.consumeIdentLikeToken();\n\t                    }\n\t                    break;\n\t                case RIGHT_SQUARE_BRACKET:\n\t                    return RIGHT_SQUARE_BRACKET_TOKEN;\n\t                case CIRCUMFLEX_ACCENT:\n\t                    if (this.peekCodePoint(0) === EQUALS_SIGN) {\n\t                        this.consumeCodePoint();\n\t                        return PREFIX_MATCH_TOKEN;\n\t                    }\n\t                    break;\n\t                case LEFT_CURLY_BRACKET:\n\t                    return LEFT_CURLY_BRACKET_TOKEN;\n\t                case RIGHT_CURLY_BRACKET:\n\t                    return RIGHT_CURLY_BRACKET_TOKEN;\n\t                case u:\n\t                case U:\n\t                    var u1 = this.peekCodePoint(0);\n\t                    var u2 = this.peekCodePoint(1);\n\t                    if (u1 === PLUS_SIGN && (isHex(u2) || u2 === QUESTION_MARK)) {\n\t                        this.consumeCodePoint();\n\t                        this.consumeUnicodeRangeToken();\n\t                    }\n\t                    this.reconsumeCodePoint(codePoint);\n\t                    return this.consumeIdentLikeToken();\n\t                case VERTICAL_LINE:\n\t                    if (this.peekCodePoint(0) === EQUALS_SIGN) {\n\t                        this.consumeCodePoint();\n\t                        return DASH_MATCH_TOKEN;\n\t                    }\n\t                    if (this.peekCodePoint(0) === VERTICAL_LINE) {\n\t                        this.consumeCodePoint();\n\t                        return COLUMN_TOKEN;\n\t                    }\n\t                    break;\n\t                case TILDE:\n\t                    if (this.peekCodePoint(0) === EQUALS_SIGN) {\n\t                        this.consumeCodePoint();\n\t                        return INCLUDE_MATCH_TOKEN;\n\t                    }\n\t                    break;\n\t                case EOF:\n\t                    return EOF_TOKEN;\n\t            }\n\t            if (isWhiteSpace(codePoint)) {\n\t                this.consumeWhiteSpace();\n\t                return WHITESPACE_TOKEN;\n\t            }\n\t            if (isDigit(codePoint)) {\n\t                this.reconsumeCodePoint(codePoint);\n\t                return this.consumeNumericToken();\n\t            }\n\t            if (isNameStartCodePoint(codePoint)) {\n\t                this.reconsumeCodePoint(codePoint);\n\t                return this.consumeIdentLikeToken();\n\t            }\n\t            return { type: 6 /* DELIM_TOKEN */, value: fromCodePoint$1(codePoint) };\n\t        };\n\t        Tokenizer.prototype.consumeCodePoint = function () {\n\t            var value = this._value.shift();\n\t            return typeof value === 'undefined' ? -1 : value;\n\t        };\n\t        Tokenizer.prototype.reconsumeCodePoint = function (codePoint) {\n\t            this._value.unshift(codePoint);\n\t        };\n\t        Tokenizer.prototype.peekCodePoint = function (delta) {\n\t            if (delta >= this._value.length) {\n\t                return -1;\n\t            }\n\t            return this._value[delta];\n\t        };\n\t        Tokenizer.prototype.consumeUnicodeRangeToken = function () {\n\t            var digits = [];\n\t            var codePoint = this.consumeCodePoint();\n\t            while (isHex(codePoint) && digits.length < 6) {\n\t                digits.push(codePoint);\n\t                codePoint = this.consumeCodePoint();\n\t            }\n\t            var questionMarks = false;\n\t            while (codePoint === QUESTION_MARK && digits.length < 6) {\n\t                digits.push(codePoint);\n\t                codePoint = this.consumeCodePoint();\n\t                questionMarks = true;\n\t            }\n\t            if (questionMarks) {\n\t                var start_1 = parseInt(fromCodePoint$1.apply(void 0, digits.map(function (digit) { return (digit === QUESTION_MARK ? ZERO : digit); })), 16);\n\t                var end = parseInt(fromCodePoint$1.apply(void 0, digits.map(function (digit) { return (digit === QUESTION_MARK ? F : digit); })), 16);\n\t                return { type: 30 /* UNICODE_RANGE_TOKEN */, start: start_1, end: end };\n\t            }\n\t            var start = parseInt(fromCodePoint$1.apply(void 0, digits), 16);\n\t            if (this.peekCodePoint(0) === HYPHEN_MINUS && isHex(this.peekCodePoint(1))) {\n\t                this.consumeCodePoint();\n\t                codePoint = this.consumeCodePoint();\n\t                var endDigits = [];\n\t                while (isHex(codePoint) && endDigits.length < 6) {\n\t                    endDigits.push(codePoint);\n\t                    codePoint = this.consumeCodePoint();\n\t                }\n\t                var end = parseInt(fromCodePoint$1.apply(void 0, endDigits), 16);\n\t                return { type: 30 /* UNICODE_RANGE_TOKEN */, start: start, end: end };\n\t            }\n\t            else {\n\t                return { type: 30 /* UNICODE_RANGE_TOKEN */, start: start, end: start };\n\t            }\n\t        };\n\t        Tokenizer.prototype.consumeIdentLikeToken = function () {\n\t            var value = this.consumeName();\n\t            if (value.toLowerCase() === 'url' && this.peekCodePoint(0) === LEFT_PARENTHESIS) {\n\t                this.consumeCodePoint();\n\t                return this.consumeUrlToken();\n\t            }\n\t            else if (this.peekCodePoint(0) === LEFT_PARENTHESIS) {\n\t                this.consumeCodePoint();\n\t                return { type: 19 /* FUNCTION_TOKEN */, value: value };\n\t            }\n\t            return { type: 20 /* IDENT_TOKEN */, value: value };\n\t        };\n\t        Tokenizer.prototype.consumeUrlToken = function () {\n\t            var value = [];\n\t            this.consumeWhiteSpace();\n\t            if (this.peekCodePoint(0) === EOF) {\n\t                return { type: 22 /* URL_TOKEN */, value: '' };\n\t            }\n\t            var next = this.peekCodePoint(0);\n\t            if (next === APOSTROPHE || next === QUOTATION_MARK) {\n\t                var stringToken = this.consumeStringToken(this.consumeCodePoint());\n\t                if (stringToken.type === 0 /* STRING_TOKEN */) {\n\t                    this.consumeWhiteSpace();\n\t                    if (this.peekCodePoint(0) === EOF || this.peekCodePoint(0) === RIGHT_PARENTHESIS) {\n\t                        this.consumeCodePoint();\n\t                        return { type: 22 /* URL_TOKEN */, value: stringToken.value };\n\t                    }\n\t                }\n\t                this.consumeBadUrlRemnants();\n\t                return BAD_URL_TOKEN;\n\t            }\n\t            while (true) {\n\t                var codePoint = this.consumeCodePoint();\n\t                if (codePoint === EOF || codePoint === RIGHT_PARENTHESIS) {\n\t                    return { type: 22 /* URL_TOKEN */, value: fromCodePoint$1.apply(void 0, value) };\n\t                }\n\t                else if (isWhiteSpace(codePoint)) {\n\t                    this.consumeWhiteSpace();\n\t                    if (this.peekCodePoint(0) === EOF || this.peekCodePoint(0) === RIGHT_PARENTHESIS) {\n\t                        this.consumeCodePoint();\n\t                        return { type: 22 /* URL_TOKEN */, value: fromCodePoint$1.apply(void 0, value) };\n\t                    }\n\t                    this.consumeBadUrlRemnants();\n\t                    return BAD_URL_TOKEN;\n\t                }\n\t                else if (codePoint === QUOTATION_MARK ||\n\t                    codePoint === APOSTROPHE ||\n\t                    codePoint === LEFT_PARENTHESIS ||\n\t                    isNonPrintableCodePoint(codePoint)) {\n\t                    this.consumeBadUrlRemnants();\n\t                    return BAD_URL_TOKEN;\n\t                }\n\t                else if (codePoint === REVERSE_SOLIDUS) {\n\t                    if (isValidEscape(codePoint, this.peekCodePoint(0))) {\n\t                        value.push(this.consumeEscapedCodePoint());\n\t                    }\n\t                    else {\n\t                        this.consumeBadUrlRemnants();\n\t                        return BAD_URL_TOKEN;\n\t                    }\n\t                }\n\t                else {\n\t                    value.push(codePoint);\n\t                }\n\t            }\n\t        };\n\t        Tokenizer.prototype.consumeWhiteSpace = function () {\n\t            while (isWhiteSpace(this.peekCodePoint(0))) {\n\t                this.consumeCodePoint();\n\t            }\n\t        };\n\t        Tokenizer.prototype.consumeBadUrlRemnants = function () {\n\t            while (true) {\n\t                var codePoint = this.consumeCodePoint();\n\t                if (codePoint === RIGHT_PARENTHESIS || codePoint === EOF) {\n\t                    return;\n\t                }\n\t                if (isValidEscape(codePoint, this.peekCodePoint(0))) {\n\t                    this.consumeEscapedCodePoint();\n\t                }\n\t            }\n\t        };\n\t        Tokenizer.prototype.consumeStringSlice = function (count) {\n\t            var SLICE_STACK_SIZE = 50000;\n\t            var value = '';\n\t            while (count > 0) {\n\t                var amount = Math.min(SLICE_STACK_SIZE, count);\n\t                value += fromCodePoint$1.apply(void 0, this._value.splice(0, amount));\n\t                count -= amount;\n\t            }\n\t            this._value.shift();\n\t            return value;\n\t        };\n\t        Tokenizer.prototype.consumeStringToken = function (endingCodePoint) {\n\t            var value = '';\n\t            var i = 0;\n\t            do {\n\t                var codePoint = this._value[i];\n\t                if (codePoint === EOF || codePoint === undefined || codePoint === endingCodePoint) {\n\t                    value += this.consumeStringSlice(i);\n\t                    return { type: 0 /* STRING_TOKEN */, value: value };\n\t                }\n\t                if (codePoint === LINE_FEED) {\n\t                    this._value.splice(0, i);\n\t                    return BAD_STRING_TOKEN;\n\t                }\n\t                if (codePoint === REVERSE_SOLIDUS) {\n\t                    var next = this._value[i + 1];\n\t                    if (next !== EOF && next !== undefined) {\n\t                        if (next === LINE_FEED) {\n\t                            value += this.consumeStringSlice(i);\n\t                            i = -1;\n\t                            this._value.shift();\n\t                        }\n\t                        else if (isValidEscape(codePoint, next)) {\n\t                            value += this.consumeStringSlice(i);\n\t                            value += fromCodePoint$1(this.consumeEscapedCodePoint());\n\t                            i = -1;\n\t                        }\n\t                    }\n\t                }\n\t                i++;\n\t            } while (true);\n\t        };\n\t        Tokenizer.prototype.consumeNumber = function () {\n\t            var repr = [];\n\t            var type = FLAG_INTEGER;\n\t            var c1 = this.peekCodePoint(0);\n\t            if (c1 === PLUS_SIGN || c1 === HYPHEN_MINUS) {\n\t                repr.push(this.consumeCodePoint());\n\t            }\n\t            while (isDigit(this.peekCodePoint(0))) {\n\t                repr.push(this.consumeCodePoint());\n\t            }\n\t            c1 = this.peekCodePoint(0);\n\t            var c2 = this.peekCodePoint(1);\n\t            if (c1 === FULL_STOP && isDigit(c2)) {\n\t                repr.push(this.consumeCodePoint(), this.consumeCodePoint());\n\t                type = FLAG_NUMBER;\n\t                while (isDigit(this.peekCodePoint(0))) {\n\t                    repr.push(this.consumeCodePoint());\n\t                }\n\t            }\n\t            c1 = this.peekCodePoint(0);\n\t            c2 = this.peekCodePoint(1);\n\t            var c3 = this.peekCodePoint(2);\n\t            if ((c1 === E || c1 === e) && (((c2 === PLUS_SIGN || c2 === HYPHEN_MINUS) && isDigit(c3)) || isDigit(c2))) {\n\t                repr.push(this.consumeCodePoint(), this.consumeCodePoint());\n\t                type = FLAG_NUMBER;\n\t                while (isDigit(this.peekCodePoint(0))) {\n\t                    repr.push(this.consumeCodePoint());\n\t                }\n\t            }\n\t            return [stringToNumber(repr), type];\n\t        };\n\t        Tokenizer.prototype.consumeNumericToken = function () {\n\t            var _a = this.consumeNumber(), number = _a[0], flags = _a[1];\n\t            var c1 = this.peekCodePoint(0);\n\t            var c2 = this.peekCodePoint(1);\n\t            var c3 = this.peekCodePoint(2);\n\t            if (isIdentifierStart(c1, c2, c3)) {\n\t                var unit = this.consumeName();\n\t                return { type: 15 /* DIMENSION_TOKEN */, number: number, flags: flags, unit: unit };\n\t            }\n\t            if (c1 === PERCENTAGE_SIGN) {\n\t                this.consumeCodePoint();\n\t                return { type: 16 /* PERCENTAGE_TOKEN */, number: number, flags: flags };\n\t            }\n\t            return { type: 17 /* NUMBER_TOKEN */, number: number, flags: flags };\n\t        };\n\t        Tokenizer.prototype.consumeEscapedCodePoint = function () {\n\t            var codePoint = this.consumeCodePoint();\n\t            if (isHex(codePoint)) {\n\t                var hex = fromCodePoint$1(codePoint);\n\t                while (isHex(this.peekCodePoint(0)) && hex.length < 6) {\n\t                    hex += fromCodePoint$1(this.consumeCodePoint());\n\t                }\n\t                if (isWhiteSpace(this.peekCodePoint(0))) {\n\t                    this.consumeCodePoint();\n\t                }\n\t                var hexCodePoint = parseInt(hex, 16);\n\t                if (hexCodePoint === 0 || isSurrogateCodePoint(hexCodePoint) || hexCodePoint > 0x10ffff) {\n\t                    return REPLACEMENT_CHARACTER;\n\t                }\n\t                return hexCodePoint;\n\t            }\n\t            if (codePoint === EOF) {\n\t                return REPLACEMENT_CHARACTER;\n\t            }\n\t            return codePoint;\n\t        };\n\t        Tokenizer.prototype.consumeName = function () {\n\t            var result = '';\n\t            while (true) {\n\t                var codePoint = this.consumeCodePoint();\n\t                if (isNameCodePoint(codePoint)) {\n\t                    result += fromCodePoint$1(codePoint);\n\t                }\n\t                else if (isValidEscape(codePoint, this.peekCodePoint(0))) {\n\t                    result += fromCodePoint$1(this.consumeEscapedCodePoint());\n\t                }\n\t                else {\n\t                    this.reconsumeCodePoint(codePoint);\n\t                    return result;\n\t                }\n\t            }\n\t        };\n\t        return Tokenizer;\n\t    }());\n\n\t    var Parser = /** @class */ (function () {\n\t        function Parser(tokens) {\n\t            this._tokens = tokens;\n\t        }\n\t        Parser.create = function (value) {\n\t            var tokenizer = new Tokenizer();\n\t            tokenizer.write(value);\n\t            return new Parser(tokenizer.read());\n\t        };\n\t        Parser.parseValue = function (value) {\n\t            return Parser.create(value).parseComponentValue();\n\t        };\n\t        Parser.parseValues = function (value) {\n\t            return Parser.create(value).parseComponentValues();\n\t        };\n\t        Parser.prototype.parseComponentValue = function () {\n\t            var token = this.consumeToken();\n\t            while (token.type === 31 /* WHITESPACE_TOKEN */) {\n\t                token = this.consumeToken();\n\t            }\n\t            if (token.type === 32 /* EOF_TOKEN */) {\n\t                throw new SyntaxError(\"Error parsing CSS component value, unexpected EOF\");\n\t            }\n\t            this.reconsumeToken(token);\n\t            var value = this.consumeComponentValue();\n\t            do {\n\t                token = this.consumeToken();\n\t            } while (token.type === 31 /* WHITESPACE_TOKEN */);\n\t            if (token.type === 32 /* EOF_TOKEN */) {\n\t                return value;\n\t            }\n\t            throw new SyntaxError(\"Error parsing CSS component value, multiple values found when expecting only one\");\n\t        };\n\t        Parser.prototype.parseComponentValues = function () {\n\t            var values = [];\n\t            while (true) {\n\t                var value = this.consumeComponentValue();\n\t                if (value.type === 32 /* EOF_TOKEN */) {\n\t                    return values;\n\t                }\n\t                values.push(value);\n\t                values.push();\n\t            }\n\t        };\n\t        Parser.prototype.consumeComponentValue = function () {\n\t            var token = this.consumeToken();\n\t            switch (token.type) {\n\t                case 11 /* LEFT_CURLY_BRACKET_TOKEN */:\n\t                case 28 /* LEFT_SQUARE_BRACKET_TOKEN */:\n\t                case 2 /* LEFT_PARENTHESIS_TOKEN */:\n\t                    return this.consumeSimpleBlock(token.type);\n\t                case 19 /* FUNCTION_TOKEN */:\n\t                    return this.consumeFunction(token);\n\t            }\n\t            return token;\n\t        };\n\t        Parser.prototype.consumeSimpleBlock = function (type) {\n\t            var block = { type: type, values: [] };\n\t            var token = this.consumeToken();\n\t            while (true) {\n\t                if (token.type === 32 /* EOF_TOKEN */ || isEndingTokenFor(token, type)) {\n\t                    return block;\n\t                }\n\t                this.reconsumeToken(token);\n\t                block.values.push(this.consumeComponentValue());\n\t                token = this.consumeToken();\n\t            }\n\t        };\n\t        Parser.prototype.consumeFunction = function (functionToken) {\n\t            var cssFunction = {\n\t                name: functionToken.value,\n\t                values: [],\n\t                type: 18 /* FUNCTION */\n\t            };\n\t            while (true) {\n\t                var token = this.consumeToken();\n\t                if (token.type === 32 /* EOF_TOKEN */ || token.type === 3 /* RIGHT_PARENTHESIS_TOKEN */) {\n\t                    return cssFunction;\n\t                }\n\t                this.reconsumeToken(token);\n\t                cssFunction.values.push(this.consumeComponentValue());\n\t            }\n\t        };\n\t        Parser.prototype.consumeToken = function () {\n\t            var token = this._tokens.shift();\n\t            return typeof token === 'undefined' ? EOF_TOKEN : token;\n\t        };\n\t        Parser.prototype.reconsumeToken = function (token) {\n\t            this._tokens.unshift(token);\n\t        };\n\t        return Parser;\n\t    }());\n\t    var isDimensionToken = function (token) { return token.type === 15 /* DIMENSION_TOKEN */; };\n\t    var isNumberToken = function (token) { return token.type === 17 /* NUMBER_TOKEN */; };\n\t    var isIdentToken = function (token) { return token.type === 20 /* IDENT_TOKEN */; };\n\t    var isStringToken = function (token) { return token.type === 0 /* STRING_TOKEN */; };\n\t    var isIdentWithValue = function (token, value) {\n\t        return isIdentToken(token) && token.value === value;\n\t    };\n\t    var nonWhiteSpace = function (token) { return token.type !== 31 /* WHITESPACE_TOKEN */; };\n\t    var nonFunctionArgSeparator = function (token) {\n\t        return token.type !== 31 /* WHITESPACE_TOKEN */ && token.type !== 4 /* COMMA_TOKEN */;\n\t    };\n\t    var parseFunctionArgs = function (tokens) {\n\t        var args = [];\n\t        var arg = [];\n\t        tokens.forEach(function (token) {\n\t            if (token.type === 4 /* COMMA_TOKEN */) {\n\t                if (arg.length === 0) {\n\t                    throw new Error(\"Error parsing function args, zero tokens for arg\");\n\t                }\n\t                args.push(arg);\n\t                arg = [];\n\t                return;\n\t            }\n\t            if (token.type !== 31 /* WHITESPACE_TOKEN */) {\n\t                arg.push(token);\n\t            }\n\t        });\n\t        if (arg.length) {\n\t            args.push(arg);\n\t        }\n\t        return args;\n\t    };\n\t    var isEndingTokenFor = function (token, type) {\n\t        if (type === 11 /* LEFT_CURLY_BRACKET_TOKEN */ && token.type === 12 /* RIGHT_CURLY_BRACKET_TOKEN */) {\n\t            return true;\n\t        }\n\t        if (type === 28 /* LEFT_SQUARE_BRACKET_TOKEN */ && token.type === 29 /* RIGHT_SQUARE_BRACKET_TOKEN */) {\n\t            return true;\n\t        }\n\t        return type === 2 /* LEFT_PARENTHESIS_TOKEN */ && token.type === 3 /* RIGHT_PARENTHESIS_TOKEN */;\n\t    };\n\n\t    var isLength = function (token) {\n\t        return token.type === 17 /* NUMBER_TOKEN */ || token.type === 15 /* DIMENSION_TOKEN */;\n\t    };\n\n\t    var isLengthPercentage = function (token) {\n\t        return token.type === 16 /* PERCENTAGE_TOKEN */ || isLength(token);\n\t    };\n\t    var parseLengthPercentageTuple = function (tokens) {\n\t        return tokens.length > 1 ? [tokens[0], tokens[1]] : [tokens[0]];\n\t    };\n\t    var ZERO_LENGTH = {\n\t        type: 17 /* NUMBER_TOKEN */,\n\t        number: 0,\n\t        flags: FLAG_INTEGER\n\t    };\n\t    var FIFTY_PERCENT = {\n\t        type: 16 /* PERCENTAGE_TOKEN */,\n\t        number: 50,\n\t        flags: FLAG_INTEGER\n\t    };\n\t    var HUNDRED_PERCENT = {\n\t        type: 16 /* PERCENTAGE_TOKEN */,\n\t        number: 100,\n\t        flags: FLAG_INTEGER\n\t    };\n\t    var getAbsoluteValueForTuple = function (tuple, width, height) {\n\t        var x = tuple[0], y = tuple[1];\n\t        return [getAbsoluteValue(x, width), getAbsoluteValue(typeof y !== 'undefined' ? y : x, height)];\n\t    };\n\t    var getAbsoluteValue = function (token, parent) {\n\t        if (token.type === 16 /* PERCENTAGE_TOKEN */) {\n\t            return (token.number / 100) * parent;\n\t        }\n\t        if (isDimensionToken(token)) {\n\t            switch (token.unit) {\n\t                case 'rem':\n\t                case 'em':\n\t                    return 16 * token.number; // TODO use correct font-size\n\t                case 'px':\n\t                default:\n\t                    return token.number;\n\t            }\n\t        }\n\t        return token.number;\n\t    };\n\n\t    var DEG = 'deg';\n\t    var GRAD = 'grad';\n\t    var RAD = 'rad';\n\t    var TURN = 'turn';\n\t    var angle = {\n\t        name: 'angle',\n\t        parse: function (_context, value) {\n\t            if (value.type === 15 /* DIMENSION_TOKEN */) {\n\t                switch (value.unit) {\n\t                    case DEG:\n\t                        return (Math.PI * value.number) / 180;\n\t                    case GRAD:\n\t                        return (Math.PI / 200) * value.number;\n\t                    case RAD:\n\t                        return value.number;\n\t                    case TURN:\n\t                        return Math.PI * 2 * value.number;\n\t                }\n\t            }\n\t            throw new Error(\"Unsupported angle type\");\n\t        }\n\t    };\n\t    var isAngle = function (value) {\n\t        if (value.type === 15 /* DIMENSION_TOKEN */) {\n\t            if (value.unit === DEG || value.unit === GRAD || value.unit === RAD || value.unit === TURN) {\n\t                return true;\n\t            }\n\t        }\n\t        return false;\n\t    };\n\t    var parseNamedSide = function (tokens) {\n\t        var sideOrCorner = tokens\n\t            .filter(isIdentToken)\n\t            .map(function (ident) { return ident.value; })\n\t            .join(' ');\n\t        switch (sideOrCorner) {\n\t            case 'to bottom right':\n\t            case 'to right bottom':\n\t            case 'left top':\n\t            case 'top left':\n\t                return [ZERO_LENGTH, ZERO_LENGTH];\n\t            case 'to top':\n\t            case 'bottom':\n\t                return deg(0);\n\t            case 'to bottom left':\n\t            case 'to left bottom':\n\t            case 'right top':\n\t            case 'top right':\n\t                return [ZERO_LENGTH, HUNDRED_PERCENT];\n\t            case 'to right':\n\t            case 'left':\n\t                return deg(90);\n\t            case 'to top left':\n\t            case 'to left top':\n\t            case 'right bottom':\n\t            case 'bottom right':\n\t                return [HUNDRED_PERCENT, HUNDRED_PERCENT];\n\t            case 'to bottom':\n\t            case 'top':\n\t                return deg(180);\n\t            case 'to top right':\n\t            case 'to right top':\n\t            case 'left bottom':\n\t            case 'bottom left':\n\t                return [HUNDRED_PERCENT, ZERO_LENGTH];\n\t            case 'to left':\n\t            case 'right':\n\t                return deg(270);\n\t        }\n\t        return 0;\n\t    };\n\t    var deg = function (deg) { return (Math.PI * deg) / 180; };\n\n\t    var color$1 = {\n\t        name: 'color',\n\t        parse: function (context, value) {\n\t            if (value.type === 18 /* FUNCTION */) {\n\t                var colorFunction = SUPPORTED_COLOR_FUNCTIONS[value.name];\n\t                if (typeof colorFunction === 'undefined') {\n\t                    throw new Error(\"Attempting to parse an unsupported color function \\\"\" + value.name + \"\\\"\");\n\t                }\n\t                return colorFunction(context, value.values);\n\t            }\n\t            if (value.type === 5 /* HASH_TOKEN */) {\n\t                if (value.value.length === 3) {\n\t                    var r = value.value.substring(0, 1);\n\t                    var g = value.value.substring(1, 2);\n\t                    var b = value.value.substring(2, 3);\n\t                    return pack(parseInt(r + r, 16), parseInt(g + g, 16), parseInt(b + b, 16), 1);\n\t                }\n\t                if (value.value.length === 4) {\n\t                    var r = value.value.substring(0, 1);\n\t                    var g = value.value.substring(1, 2);\n\t                    var b = value.value.substring(2, 3);\n\t                    var a = value.value.substring(3, 4);\n\t                    return pack(parseInt(r + r, 16), parseInt(g + g, 16), parseInt(b + b, 16), parseInt(a + a, 16) / 255);\n\t                }\n\t                if (value.value.length === 6) {\n\t                    var r = value.value.substring(0, 2);\n\t                    var g = value.value.substring(2, 4);\n\t                    var b = value.value.substring(4, 6);\n\t                    return pack(parseInt(r, 16), parseInt(g, 16), parseInt(b, 16), 1);\n\t                }\n\t                if (value.value.length === 8) {\n\t                    var r = value.value.substring(0, 2);\n\t                    var g = value.value.substring(2, 4);\n\t                    var b = value.value.substring(4, 6);\n\t                    var a = value.value.substring(6, 8);\n\t                    return pack(parseInt(r, 16), parseInt(g, 16), parseInt(b, 16), parseInt(a, 16) / 255);\n\t                }\n\t            }\n\t            if (value.type === 20 /* IDENT_TOKEN */) {\n\t                var namedColor = COLORS[value.value.toUpperCase()];\n\t                if (typeof namedColor !== 'undefined') {\n\t                    return namedColor;\n\t                }\n\t            }\n\t            return COLORS.TRANSPARENT;\n\t        }\n\t    };\n\t    var isTransparent = function (color) { return (0xff & color) === 0; };\n\t    var asString = function (color) {\n\t        var alpha = 0xff & color;\n\t        var blue = 0xff & (color >> 8);\n\t        var green = 0xff & (color >> 16);\n\t        var red = 0xff & (color >> 24);\n\t        return alpha < 255 ? \"rgba(\" + red + \",\" + green + \",\" + blue + \",\" + alpha / 255 + \")\" : \"rgb(\" + red + \",\" + green + \",\" + blue + \")\";\n\t    };\n\t    var pack = function (r, g, b, a) {\n\t        return ((r << 24) | (g << 16) | (b << 8) | (Math.round(a * 255) << 0)) >>> 0;\n\t    };\n\t    var getTokenColorValue = function (token, i) {\n\t        if (token.type === 17 /* NUMBER_TOKEN */) {\n\t            return token.number;\n\t        }\n\t        if (token.type === 16 /* PERCENTAGE_TOKEN */) {\n\t            var max = i === 3 ? 1 : 255;\n\t            return i === 3 ? (token.number / 100) * max : Math.round((token.number / 100) * max);\n\t        }\n\t        return 0;\n\t    };\n\t    var rgb = function (_context, args) {\n\t        var tokens = args.filter(nonFunctionArgSeparator);\n\t        if (tokens.length === 3) {\n\t            var _a = tokens.map(getTokenColorValue), r = _a[0], g = _a[1], b = _a[2];\n\t            return pack(r, g, b, 1);\n\t        }\n\t        if (tokens.length === 4) {\n\t            var _b = tokens.map(getTokenColorValue), r = _b[0], g = _b[1], b = _b[2], a = _b[3];\n\t            return pack(r, g, b, a);\n\t        }\n\t        return 0;\n\t    };\n\t    function hue2rgb(t1, t2, hue) {\n\t        if (hue < 0) {\n\t            hue += 1;\n\t        }\n\t        if (hue >= 1) {\n\t            hue -= 1;\n\t        }\n\t        if (hue < 1 / 6) {\n\t            return (t2 - t1) * hue * 6 + t1;\n\t        }\n\t        else if (hue < 1 / 2) {\n\t            return t2;\n\t        }\n\t        else if (hue < 2 / 3) {\n\t            return (t2 - t1) * 6 * (2 / 3 - hue) + t1;\n\t        }\n\t        else {\n\t            return t1;\n\t        }\n\t    }\n\t    var hsl = function (context, args) {\n\t        var tokens = args.filter(nonFunctionArgSeparator);\n\t        var hue = tokens[0], saturation = tokens[1], lightness = tokens[2], alpha = tokens[3];\n\t        var h = (hue.type === 17 /* NUMBER_TOKEN */ ? deg(hue.number) : angle.parse(context, hue)) / (Math.PI * 2);\n\t        var s = isLengthPercentage(saturation) ? saturation.number / 100 : 0;\n\t        var l = isLengthPercentage(lightness) ? lightness.number / 100 : 0;\n\t        var a = typeof alpha !== 'undefined' && isLengthPercentage(alpha) ? getAbsoluteValue(alpha, 1) : 1;\n\t        if (s === 0) {\n\t            return pack(l * 255, l * 255, l * 255, 1);\n\t        }\n\t        var t2 = l <= 0.5 ? l * (s + 1) : l + s - l * s;\n\t        var t1 = l * 2 - t2;\n\t        var r = hue2rgb(t1, t2, h + 1 / 3);\n\t        var g = hue2rgb(t1, t2, h);\n\t        var b = hue2rgb(t1, t2, h - 1 / 3);\n\t        return pack(r * 255, g * 255, b * 255, a);\n\t    };\n\t    var SUPPORTED_COLOR_FUNCTIONS = {\n\t        hsl: hsl,\n\t        hsla: hsl,\n\t        rgb: rgb,\n\t        rgba: rgb\n\t    };\n\t    var parseColor = function (context, value) {\n\t        return color$1.parse(context, Parser.create(value).parseComponentValue());\n\t    };\n\t    var COLORS = {\n\t        ALICEBLUE: 0xf0f8ffff,\n\t        ANTIQUEWHITE: 0xfaebd7ff,\n\t        AQUA: 0x00ffffff,\n\t        AQUAMARINE: 0x7fffd4ff,\n\t        AZURE: 0xf0ffffff,\n\t        BEIGE: 0xf5f5dcff,\n\t        BISQUE: 0xffe4c4ff,\n\t        BLACK: 0x000000ff,\n\t        BLANCHEDALMOND: 0xffebcdff,\n\t        BLUE: 0x0000ffff,\n\t        BLUEVIOLET: 0x8a2be2ff,\n\t        BROWN: 0xa52a2aff,\n\t        BURLYWOOD: 0xdeb887ff,\n\t        CADETBLUE: 0x5f9ea0ff,\n\t        CHARTREUSE: 0x7fff00ff,\n\t        CHOCOLATE: 0xd2691eff,\n\t        CORAL: 0xff7f50ff,\n\t        CORNFLOWERBLUE: 0x6495edff,\n\t        CORNSILK: 0xfff8dcff,\n\t        CRIMSON: 0xdc143cff,\n\t        CYAN: 0x00ffffff,\n\t        DARKBLUE: 0x00008bff,\n\t        DARKCYAN: 0x008b8bff,\n\t        DARKGOLDENROD: 0xb886bbff,\n\t        DARKGRAY: 0xa9a9a9ff,\n\t        DARKGREEN: 0x006400ff,\n\t        DARKGREY: 0xa9a9a9ff,\n\t        DARKKHAKI: 0xbdb76bff,\n\t        DARKMAGENTA: 0x8b008bff,\n\t        DARKOLIVEGREEN: 0x556b2fff,\n\t        DARKORANGE: 0xff8c00ff,\n\t        DARKORCHID: 0x9932ccff,\n\t        DARKRED: 0x8b0000ff,\n\t        DARKSALMON: 0xe9967aff,\n\t        DARKSEAGREEN: 0x8fbc8fff,\n\t        DARKSLATEBLUE: 0x483d8bff,\n\t        DARKSLATEGRAY: 0x2f4f4fff,\n\t        DARKSLATEGREY: 0x2f4f4fff,\n\t        DARKTURQUOISE: 0x00ced1ff,\n\t        DARKVIOLET: 0x9400d3ff,\n\t        DEEPPINK: 0xff1493ff,\n\t        DEEPSKYBLUE: 0x00bfffff,\n\t        DIMGRAY: 0x696969ff,\n\t        DIMGREY: 0x696969ff,\n\t        DODGERBLUE: 0x1e90ffff,\n\t        FIREBRICK: 0xb22222ff,\n\t        FLORALWHITE: 0xfffaf0ff,\n\t        FORESTGREEN: 0x228b22ff,\n\t        FUCHSIA: 0xff00ffff,\n\t        GAINSBORO: 0xdcdcdcff,\n\t        GHOSTWHITE: 0xf8f8ffff,\n\t        GOLD: 0xffd700ff,\n\t        GOLDENROD: 0xdaa520ff,\n\t        GRAY: 0x808080ff,\n\t        GREEN: 0x008000ff,\n\t        GREENYELLOW: 0xadff2fff,\n\t        GREY: 0x808080ff,\n\t        HONEYDEW: 0xf0fff0ff,\n\t        HOTPINK: 0xff69b4ff,\n\t        INDIANRED: 0xcd5c5cff,\n\t        INDIGO: 0x4b0082ff,\n\t        IVORY: 0xfffff0ff,\n\t        KHAKI: 0xf0e68cff,\n\t        LAVENDER: 0xe6e6faff,\n\t        LAVENDERBLUSH: 0xfff0f5ff,\n\t        LAWNGREEN: 0x7cfc00ff,\n\t        LEMONCHIFFON: 0xfffacdff,\n\t        LIGHTBLUE: 0xadd8e6ff,\n\t        LIGHTCORAL: 0xf08080ff,\n\t        LIGHTCYAN: 0xe0ffffff,\n\t        LIGHTGOLDENRODYELLOW: 0xfafad2ff,\n\t        LIGHTGRAY: 0xd3d3d3ff,\n\t        LIGHTGREEN: 0x90ee90ff,\n\t        LIGHTGREY: 0xd3d3d3ff,\n\t        LIGHTPINK: 0xffb6c1ff,\n\t        LIGHTSALMON: 0xffa07aff,\n\t        LIGHTSEAGREEN: 0x20b2aaff,\n\t        LIGHTSKYBLUE: 0x87cefaff,\n\t        LIGHTSLATEGRAY: 0x778899ff,\n\t        LIGHTSLATEGREY: 0x778899ff,\n\t        LIGHTSTEELBLUE: 0xb0c4deff,\n\t        LIGHTYELLOW: 0xffffe0ff,\n\t        LIME: 0x00ff00ff,\n\t        LIMEGREEN: 0x32cd32ff,\n\t        LINEN: 0xfaf0e6ff,\n\t        MAGENTA: 0xff00ffff,\n\t        MAROON: 0x800000ff,\n\t        MEDIUMAQUAMARINE: 0x66cdaaff,\n\t        MEDIUMBLUE: 0x0000cdff,\n\t        MEDIUMORCHID: 0xba55d3ff,\n\t        MEDIUMPURPLE: 0x9370dbff,\n\t        MEDIUMSEAGREEN: 0x3cb371ff,\n\t        MEDIUMSLATEBLUE: 0x7b68eeff,\n\t        MEDIUMSPRINGGREEN: 0x00fa9aff,\n\t        MEDIUMTURQUOISE: 0x48d1ccff,\n\t        MEDIUMVIOLETRED: 0xc71585ff,\n\t        MIDNIGHTBLUE: 0x191970ff,\n\t        MINTCREAM: 0xf5fffaff,\n\t        MISTYROSE: 0xffe4e1ff,\n\t        MOCCASIN: 0xffe4b5ff,\n\t        NAVAJOWHITE: 0xffdeadff,\n\t        NAVY: 0x000080ff,\n\t        OLDLACE: 0xfdf5e6ff,\n\t        OLIVE: 0x808000ff,\n\t        OLIVEDRAB: 0x6b8e23ff,\n\t        ORANGE: 0xffa500ff,\n\t        ORANGERED: 0xff4500ff,\n\t        ORCHID: 0xda70d6ff,\n\t        PALEGOLDENROD: 0xeee8aaff,\n\t        PALEGREEN: 0x98fb98ff,\n\t        PALETURQUOISE: 0xafeeeeff,\n\t        PALEVIOLETRED: 0xdb7093ff,\n\t        PAPAYAWHIP: 0xffefd5ff,\n\t        PEACHPUFF: 0xffdab9ff,\n\t        PERU: 0xcd853fff,\n\t        PINK: 0xffc0cbff,\n\t        PLUM: 0xdda0ddff,\n\t        POWDERBLUE: 0xb0e0e6ff,\n\t        PURPLE: 0x800080ff,\n\t        REBECCAPURPLE: 0x663399ff,\n\t        RED: 0xff0000ff,\n\t        ROSYBROWN: 0xbc8f8fff,\n\t        ROYALBLUE: 0x4169e1ff,\n\t        SADDLEBROWN: 0x8b4513ff,\n\t        SALMON: 0xfa8072ff,\n\t        SANDYBROWN: 0xf4a460ff,\n\t        SEAGREEN: 0x2e8b57ff,\n\t        SEASHELL: 0xfff5eeff,\n\t        SIENNA: 0xa0522dff,\n\t        SILVER: 0xc0c0c0ff,\n\t        SKYBLUE: 0x87ceebff,\n\t        SLATEBLUE: 0x6a5acdff,\n\t        SLATEGRAY: 0x708090ff,\n\t        SLATEGREY: 0x708090ff,\n\t        SNOW: 0xfffafaff,\n\t        SPRINGGREEN: 0x00ff7fff,\n\t        STEELBLUE: 0x4682b4ff,\n\t        TAN: 0xd2b48cff,\n\t        TEAL: 0x008080ff,\n\t        THISTLE: 0xd8bfd8ff,\n\t        TOMATO: 0xff6347ff,\n\t        TRANSPARENT: 0x00000000,\n\t        TURQUOISE: 0x40e0d0ff,\n\t        VIOLET: 0xee82eeff,\n\t        WHEAT: 0xf5deb3ff,\n\t        WHITE: 0xffffffff,\n\t        WHITESMOKE: 0xf5f5f5ff,\n\t        YELLOW: 0xffff00ff,\n\t        YELLOWGREEN: 0x9acd32ff\n\t    };\n\n\t    var backgroundClip = {\n\t        name: 'background-clip',\n\t        initialValue: 'border-box',\n\t        prefix: false,\n\t        type: 1 /* LIST */,\n\t        parse: function (_context, tokens) {\n\t            return tokens.map(function (token) {\n\t                if (isIdentToken(token)) {\n\t                    switch (token.value) {\n\t                        case 'padding-box':\n\t                            return 1 /* PADDING_BOX */;\n\t                        case 'content-box':\n\t                            return 2 /* CONTENT_BOX */;\n\t                    }\n\t                }\n\t                return 0 /* BORDER_BOX */;\n\t            });\n\t        }\n\t    };\n\n\t    var backgroundColor = {\n\t        name: \"background-color\",\n\t        initialValue: 'transparent',\n\t        prefix: false,\n\t        type: 3 /* TYPE_VALUE */,\n\t        format: 'color'\n\t    };\n\n\t    var parseColorStop = function (context, args) {\n\t        var color = color$1.parse(context, args[0]);\n\t        var stop = args[1];\n\t        return stop && isLengthPercentage(stop) ? { color: color, stop: stop } : { color: color, stop: null };\n\t    };\n\t    var processColorStops = function (stops, lineLength) {\n\t        var first = stops[0];\n\t        var last = stops[stops.length - 1];\n\t        if (first.stop === null) {\n\t            first.stop = ZERO_LENGTH;\n\t        }\n\t        if (last.stop === null) {\n\t            last.stop = HUNDRED_PERCENT;\n\t        }\n\t        var processStops = [];\n\t        var previous = 0;\n\t        for (var i = 0; i < stops.length; i++) {\n\t            var stop_1 = stops[i].stop;\n\t            if (stop_1 !== null) {\n\t                var absoluteValue = getAbsoluteValue(stop_1, lineLength);\n\t                if (absoluteValue > previous) {\n\t                    processStops.push(absoluteValue);\n\t                }\n\t                else {\n\t                    processStops.push(previous);\n\t                }\n\t                previous = absoluteValue;\n\t            }\n\t            else {\n\t                processStops.push(null);\n\t            }\n\t        }\n\t        var gapBegin = null;\n\t        for (var i = 0; i < processStops.length; i++) {\n\t            var stop_2 = processStops[i];\n\t            if (stop_2 === null) {\n\t                if (gapBegin === null) {\n\t                    gapBegin = i;\n\t                }\n\t            }\n\t            else if (gapBegin !== null) {\n\t                var gapLength = i - gapBegin;\n\t                var beforeGap = processStops[gapBegin - 1];\n\t                var gapValue = (stop_2 - beforeGap) / (gapLength + 1);\n\t                for (var g = 1; g <= gapLength; g++) {\n\t                    processStops[gapBegin + g - 1] = gapValue * g;\n\t                }\n\t                gapBegin = null;\n\t            }\n\t        }\n\t        return stops.map(function (_a, i) {\n\t            var color = _a.color;\n\t            return { color: color, stop: Math.max(Math.min(1, processStops[i] / lineLength), 0) };\n\t        });\n\t    };\n\t    var getAngleFromCorner = function (corner, width, height) {\n\t        var centerX = width / 2;\n\t        var centerY = height / 2;\n\t        var x = getAbsoluteValue(corner[0], width) - centerX;\n\t        var y = centerY - getAbsoluteValue(corner[1], height);\n\t        return (Math.atan2(y, x) + Math.PI * 2) % (Math.PI * 2);\n\t    };\n\t    var calculateGradientDirection = function (angle, width, height) {\n\t        var radian = typeof angle === 'number' ? angle : getAngleFromCorner(angle, width, height);\n\t        var lineLength = Math.abs(width * Math.sin(radian)) + Math.abs(height * Math.cos(radian));\n\t        var halfWidth = width / 2;\n\t        var halfHeight = height / 2;\n\t        var halfLineLength = lineLength / 2;\n\t        var yDiff = Math.sin(radian - Math.PI / 2) * halfLineLength;\n\t        var xDiff = Math.cos(radian - Math.PI / 2) * halfLineLength;\n\t        return [lineLength, halfWidth - xDiff, halfWidth + xDiff, halfHeight - yDiff, halfHeight + yDiff];\n\t    };\n\t    var distance = function (a, b) { return Math.sqrt(a * a + b * b); };\n\t    var findCorner = function (width, height, x, y, closest) {\n\t        var corners = [\n\t            [0, 0],\n\t            [0, height],\n\t            [width, 0],\n\t            [width, height]\n\t        ];\n\t        return corners.reduce(function (stat, corner) {\n\t            var cx = corner[0], cy = corner[1];\n\t            var d = distance(x - cx, y - cy);\n\t            if (closest ? d < stat.optimumDistance : d > stat.optimumDistance) {\n\t                return {\n\t                    optimumCorner: corner,\n\t                    optimumDistance: d\n\t                };\n\t            }\n\t            return stat;\n\t        }, {\n\t            optimumDistance: closest ? Infinity : -Infinity,\n\t            optimumCorner: null\n\t        }).optimumCorner;\n\t    };\n\t    var calculateRadius = function (gradient, x, y, width, height) {\n\t        var rx = 0;\n\t        var ry = 0;\n\t        switch (gradient.size) {\n\t            case 0 /* CLOSEST_SIDE */:\n\t                // The ending shape is sized so that that it exactly meets the side of the gradient box closest to the gradient’s center.\n\t                // If the shape is an ellipse, it exactly meets the closest side in each dimension.\n\t                if (gradient.shape === 0 /* CIRCLE */) {\n\t                    rx = ry = Math.min(Math.abs(x), Math.abs(x - width), Math.abs(y), Math.abs(y - height));\n\t                }\n\t                else if (gradient.shape === 1 /* ELLIPSE */) {\n\t                    rx = Math.min(Math.abs(x), Math.abs(x - width));\n\t                    ry = Math.min(Math.abs(y), Math.abs(y - height));\n\t                }\n\t                break;\n\t            case 2 /* CLOSEST_CORNER */:\n\t                // The ending shape is sized so that that it passes through the corner of the gradient box closest to the gradient’s center.\n\t                // If the shape is an ellipse, the ending shape is given the same aspect-ratio it would have if closest-side were specified.\n\t                if (gradient.shape === 0 /* CIRCLE */) {\n\t                    rx = ry = Math.min(distance(x, y), distance(x, y - height), distance(x - width, y), distance(x - width, y - height));\n\t                }\n\t                else if (gradient.shape === 1 /* ELLIPSE */) {\n\t                    // Compute the ratio ry/rx (which is to be the same as for \"closest-side\")\n\t                    var c = Math.min(Math.abs(y), Math.abs(y - height)) / Math.min(Math.abs(x), Math.abs(x - width));\n\t                    var _a = findCorner(width, height, x, y, true), cx = _a[0], cy = _a[1];\n\t                    rx = distance(cx - x, (cy - y) / c);\n\t                    ry = c * rx;\n\t                }\n\t                break;\n\t            case 1 /* FARTHEST_SIDE */:\n\t                // Same as closest-side, except the ending shape is sized based on the farthest side(s)\n\t                if (gradient.shape === 0 /* CIRCLE */) {\n\t                    rx = ry = Math.max(Math.abs(x), Math.abs(x - width), Math.abs(y), Math.abs(y - height));\n\t                }\n\t                else if (gradient.shape === 1 /* ELLIPSE */) {\n\t                    rx = Math.max(Math.abs(x), Math.abs(x - width));\n\t                    ry = Math.max(Math.abs(y), Math.abs(y - height));\n\t                }\n\t                break;\n\t            case 3 /* FARTHEST_CORNER */:\n\t                // Same as closest-corner, except the ending shape is sized based on the farthest corner.\n\t                // If the shape is an ellipse, the ending shape is given the same aspect ratio it would have if farthest-side were specified.\n\t                if (gradient.shape === 0 /* CIRCLE */) {\n\t                    rx = ry = Math.max(distance(x, y), distance(x, y - height), distance(x - width, y), distance(x - width, y - height));\n\t                }\n\t                else if (gradient.shape === 1 /* ELLIPSE */) {\n\t                    // Compute the ratio ry/rx (which is to be the same as for \"farthest-side\")\n\t                    var c = Math.max(Math.abs(y), Math.abs(y - height)) / Math.max(Math.abs(x), Math.abs(x - width));\n\t                    var _b = findCorner(width, height, x, y, false), cx = _b[0], cy = _b[1];\n\t                    rx = distance(cx - x, (cy - y) / c);\n\t                    ry = c * rx;\n\t                }\n\t                break;\n\t        }\n\t        if (Array.isArray(gradient.size)) {\n\t            rx = getAbsoluteValue(gradient.size[0], width);\n\t            ry = gradient.size.length === 2 ? getAbsoluteValue(gradient.size[1], height) : rx;\n\t        }\n\t        return [rx, ry];\n\t    };\n\n\t    var linearGradient = function (context, tokens) {\n\t        var angle$1 = deg(180);\n\t        var stops = [];\n\t        parseFunctionArgs(tokens).forEach(function (arg, i) {\n\t            if (i === 0) {\n\t                var firstToken = arg[0];\n\t                if (firstToken.type === 20 /* IDENT_TOKEN */ && firstToken.value === 'to') {\n\t                    angle$1 = parseNamedSide(arg);\n\t                    return;\n\t                }\n\t                else if (isAngle(firstToken)) {\n\t                    angle$1 = angle.parse(context, firstToken);\n\t                    return;\n\t                }\n\t            }\n\t            var colorStop = parseColorStop(context, arg);\n\t            stops.push(colorStop);\n\t        });\n\t        return { angle: angle$1, stops: stops, type: 1 /* LINEAR_GRADIENT */ };\n\t    };\n\n\t    var prefixLinearGradient = function (context, tokens) {\n\t        var angle$1 = deg(180);\n\t        var stops = [];\n\t        parseFunctionArgs(tokens).forEach(function (arg, i) {\n\t            if (i === 0) {\n\t                var firstToken = arg[0];\n\t                if (firstToken.type === 20 /* IDENT_TOKEN */ &&\n\t                    ['top', 'left', 'right', 'bottom'].indexOf(firstToken.value) !== -1) {\n\t                    angle$1 = parseNamedSide(arg);\n\t                    return;\n\t                }\n\t                else if (isAngle(firstToken)) {\n\t                    angle$1 = (angle.parse(context, firstToken) + deg(270)) % deg(360);\n\t                    return;\n\t                }\n\t            }\n\t            var colorStop = parseColorStop(context, arg);\n\t            stops.push(colorStop);\n\t        });\n\t        return {\n\t            angle: angle$1,\n\t            stops: stops,\n\t            type: 1 /* LINEAR_GRADIENT */\n\t        };\n\t    };\n\n\t    var webkitGradient = function (context, tokens) {\n\t        var angle = deg(180);\n\t        var stops = [];\n\t        var type = 1 /* LINEAR_GRADIENT */;\n\t        var shape = 0 /* CIRCLE */;\n\t        var size = 3 /* FARTHEST_CORNER */;\n\t        var position = [];\n\t        parseFunctionArgs(tokens).forEach(function (arg, i) {\n\t            var firstToken = arg[0];\n\t            if (i === 0) {\n\t                if (isIdentToken(firstToken) && firstToken.value === 'linear') {\n\t                    type = 1 /* LINEAR_GRADIENT */;\n\t                    return;\n\t                }\n\t                else if (isIdentToken(firstToken) && firstToken.value === 'radial') {\n\t                    type = 2 /* RADIAL_GRADIENT */;\n\t                    return;\n\t                }\n\t            }\n\t            if (firstToken.type === 18 /* FUNCTION */) {\n\t                if (firstToken.name === 'from') {\n\t                    var color = color$1.parse(context, firstToken.values[0]);\n\t                    stops.push({ stop: ZERO_LENGTH, color: color });\n\t                }\n\t                else if (firstToken.name === 'to') {\n\t                    var color = color$1.parse(context, firstToken.values[0]);\n\t                    stops.push({ stop: HUNDRED_PERCENT, color: color });\n\t                }\n\t                else if (firstToken.name === 'color-stop') {\n\t                    var values = firstToken.values.filter(nonFunctionArgSeparator);\n\t                    if (values.length === 2) {\n\t                        var color = color$1.parse(context, values[1]);\n\t                        var stop_1 = values[0];\n\t                        if (isNumberToken(stop_1)) {\n\t                            stops.push({\n\t                                stop: { type: 16 /* PERCENTAGE_TOKEN */, number: stop_1.number * 100, flags: stop_1.flags },\n\t                                color: color\n\t                            });\n\t                        }\n\t                    }\n\t                }\n\t            }\n\t        });\n\t        return type === 1 /* LINEAR_GRADIENT */\n\t            ? {\n\t                angle: (angle + deg(180)) % deg(360),\n\t                stops: stops,\n\t                type: type\n\t            }\n\t            : { size: size, shape: shape, stops: stops, position: position, type: type };\n\t    };\n\n\t    var CLOSEST_SIDE = 'closest-side';\n\t    var FARTHEST_SIDE = 'farthest-side';\n\t    var CLOSEST_CORNER = 'closest-corner';\n\t    var FARTHEST_CORNER = 'farthest-corner';\n\t    var CIRCLE = 'circle';\n\t    var ELLIPSE = 'ellipse';\n\t    var COVER = 'cover';\n\t    var CONTAIN = 'contain';\n\t    var radialGradient = function (context, tokens) {\n\t        var shape = 0 /* CIRCLE */;\n\t        var size = 3 /* FARTHEST_CORNER */;\n\t        var stops = [];\n\t        var position = [];\n\t        parseFunctionArgs(tokens).forEach(function (arg, i) {\n\t            var isColorStop = true;\n\t            if (i === 0) {\n\t                var isAtPosition_1 = false;\n\t                isColorStop = arg.reduce(function (acc, token) {\n\t                    if (isAtPosition_1) {\n\t                        if (isIdentToken(token)) {\n\t                            switch (token.value) {\n\t                                case 'center':\n\t                                    position.push(FIFTY_PERCENT);\n\t                                    return acc;\n\t                                case 'top':\n\t                                case 'left':\n\t                                    position.push(ZERO_LENGTH);\n\t                                    return acc;\n\t                                case 'right':\n\t                                case 'bottom':\n\t                                    position.push(HUNDRED_PERCENT);\n\t                                    return acc;\n\t                            }\n\t                        }\n\t                        else if (isLengthPercentage(token) || isLength(token)) {\n\t                            position.push(token);\n\t                        }\n\t                    }\n\t                    else if (isIdentToken(token)) {\n\t                        switch (token.value) {\n\t                            case CIRCLE:\n\t                                shape = 0 /* CIRCLE */;\n\t                                return false;\n\t                            case ELLIPSE:\n\t                                shape = 1 /* ELLIPSE */;\n\t                                return false;\n\t                            case 'at':\n\t                                isAtPosition_1 = true;\n\t                                return false;\n\t                            case CLOSEST_SIDE:\n\t                                size = 0 /* CLOSEST_SIDE */;\n\t                                return false;\n\t                            case COVER:\n\t                            case FARTHEST_SIDE:\n\t                                size = 1 /* FARTHEST_SIDE */;\n\t                                return false;\n\t                            case CONTAIN:\n\t                            case CLOSEST_CORNER:\n\t                                size = 2 /* CLOSEST_CORNER */;\n\t                                return false;\n\t                            case FARTHEST_CORNER:\n\t                                size = 3 /* FARTHEST_CORNER */;\n\t                                return false;\n\t                        }\n\t                    }\n\t                    else if (isLength(token) || isLengthPercentage(token)) {\n\t                        if (!Array.isArray(size)) {\n\t                            size = [];\n\t                        }\n\t                        size.push(token);\n\t                        return false;\n\t                    }\n\t                    return acc;\n\t                }, isColorStop);\n\t            }\n\t            if (isColorStop) {\n\t                var colorStop = parseColorStop(context, arg);\n\t                stops.push(colorStop);\n\t            }\n\t        });\n\t        return { size: size, shape: shape, stops: stops, position: position, type: 2 /* RADIAL_GRADIENT */ };\n\t    };\n\n\t    var prefixRadialGradient = function (context, tokens) {\n\t        var shape = 0 /* CIRCLE */;\n\t        var size = 3 /* FARTHEST_CORNER */;\n\t        var stops = [];\n\t        var position = [];\n\t        parseFunctionArgs(tokens).forEach(function (arg, i) {\n\t            var isColorStop = true;\n\t            if (i === 0) {\n\t                isColorStop = arg.reduce(function (acc, token) {\n\t                    if (isIdentToken(token)) {\n\t                        switch (token.value) {\n\t                            case 'center':\n\t                                position.push(FIFTY_PERCENT);\n\t                                return false;\n\t                            case 'top':\n\t                            case 'left':\n\t                                position.push(ZERO_LENGTH);\n\t                                return false;\n\t                            case 'right':\n\t                            case 'bottom':\n\t                                position.push(HUNDRED_PERCENT);\n\t                                return false;\n\t                        }\n\t                    }\n\t                    else if (isLengthPercentage(token) || isLength(token)) {\n\t                        position.push(token);\n\t                        return false;\n\t                    }\n\t                    return acc;\n\t                }, isColorStop);\n\t            }\n\t            else if (i === 1) {\n\t                isColorStop = arg.reduce(function (acc, token) {\n\t                    if (isIdentToken(token)) {\n\t                        switch (token.value) {\n\t                            case CIRCLE:\n\t                                shape = 0 /* CIRCLE */;\n\t                                return false;\n\t                            case ELLIPSE:\n\t                                shape = 1 /* ELLIPSE */;\n\t                                return false;\n\t                            case CONTAIN:\n\t                            case CLOSEST_SIDE:\n\t                                size = 0 /* CLOSEST_SIDE */;\n\t                                return false;\n\t                            case FARTHEST_SIDE:\n\t                                size = 1 /* FARTHEST_SIDE */;\n\t                                return false;\n\t                            case CLOSEST_CORNER:\n\t                                size = 2 /* CLOSEST_CORNER */;\n\t                                return false;\n\t                            case COVER:\n\t                            case FARTHEST_CORNER:\n\t                                size = 3 /* FARTHEST_CORNER */;\n\t                                return false;\n\t                        }\n\t                    }\n\t                    else if (isLength(token) || isLengthPercentage(token)) {\n\t                        if (!Array.isArray(size)) {\n\t                            size = [];\n\t                        }\n\t                        size.push(token);\n\t                        return false;\n\t                    }\n\t                    return acc;\n\t                }, isColorStop);\n\t            }\n\t            if (isColorStop) {\n\t                var colorStop = parseColorStop(context, arg);\n\t                stops.push(colorStop);\n\t            }\n\t        });\n\t        return { size: size, shape: shape, stops: stops, position: position, type: 2 /* RADIAL_GRADIENT */ };\n\t    };\n\n\t    var isLinearGradient = function (background) {\n\t        return background.type === 1 /* LINEAR_GRADIENT */;\n\t    };\n\t    var isRadialGradient = function (background) {\n\t        return background.type === 2 /* RADIAL_GRADIENT */;\n\t    };\n\t    var image = {\n\t        name: 'image',\n\t        parse: function (context, value) {\n\t            if (value.type === 22 /* URL_TOKEN */) {\n\t                var image_1 = { url: value.value, type: 0 /* URL */ };\n\t                context.cache.addImage(value.value);\n\t                return image_1;\n\t            }\n\t            if (value.type === 18 /* FUNCTION */) {\n\t                var imageFunction = SUPPORTED_IMAGE_FUNCTIONS[value.name];\n\t                if (typeof imageFunction === 'undefined') {\n\t                    throw new Error(\"Attempting to parse an unsupported image function \\\"\" + value.name + \"\\\"\");\n\t                }\n\t                return imageFunction(context, value.values);\n\t            }\n\t            throw new Error(\"Unsupported image type \" + value.type);\n\t        }\n\t    };\n\t    function isSupportedImage(value) {\n\t        return (!(value.type === 20 /* IDENT_TOKEN */ && value.value === 'none') &&\n\t            (value.type !== 18 /* FUNCTION */ || !!SUPPORTED_IMAGE_FUNCTIONS[value.name]));\n\t    }\n\t    var SUPPORTED_IMAGE_FUNCTIONS = {\n\t        'linear-gradient': linearGradient,\n\t        '-moz-linear-gradient': prefixLinearGradient,\n\t        '-ms-linear-gradient': prefixLinearGradient,\n\t        '-o-linear-gradient': prefixLinearGradient,\n\t        '-webkit-linear-gradient': prefixLinearGradient,\n\t        'radial-gradient': radialGradient,\n\t        '-moz-radial-gradient': prefixRadialGradient,\n\t        '-ms-radial-gradient': prefixRadialGradient,\n\t        '-o-radial-gradient': prefixRadialGradient,\n\t        '-webkit-radial-gradient': prefixRadialGradient,\n\t        '-webkit-gradient': webkitGradient\n\t    };\n\n\t    var backgroundImage = {\n\t        name: 'background-image',\n\t        initialValue: 'none',\n\t        type: 1 /* LIST */,\n\t        prefix: false,\n\t        parse: function (context, tokens) {\n\t            if (tokens.length === 0) {\n\t                return [];\n\t            }\n\t            var first = tokens[0];\n\t            if (first.type === 20 /* IDENT_TOKEN */ && first.value === 'none') {\n\t                return [];\n\t            }\n\t            return tokens\n\t                .filter(function (value) { return nonFunctionArgSeparator(value) && isSupportedImage(value); })\n\t                .map(function (value) { return image.parse(context, value); });\n\t        }\n\t    };\n\n\t    var backgroundOrigin = {\n\t        name: 'background-origin',\n\t        initialValue: 'border-box',\n\t        prefix: false,\n\t        type: 1 /* LIST */,\n\t        parse: function (_context, tokens) {\n\t            return tokens.map(function (token) {\n\t                if (isIdentToken(token)) {\n\t                    switch (token.value) {\n\t                        case 'padding-box':\n\t                            return 1 /* PADDING_BOX */;\n\t                        case 'content-box':\n\t                            return 2 /* CONTENT_BOX */;\n\t                    }\n\t                }\n\t                return 0 /* BORDER_BOX */;\n\t            });\n\t        }\n\t    };\n\n\t    var backgroundPosition = {\n\t        name: 'background-position',\n\t        initialValue: '0% 0%',\n\t        type: 1 /* LIST */,\n\t        prefix: false,\n\t        parse: function (_context, tokens) {\n\t            return parseFunctionArgs(tokens)\n\t                .map(function (values) { return values.filter(isLengthPercentage); })\n\t                .map(parseLengthPercentageTuple);\n\t        }\n\t    };\n\n\t    var backgroundRepeat = {\n\t        name: 'background-repeat',\n\t        initialValue: 'repeat',\n\t        prefix: false,\n\t        type: 1 /* LIST */,\n\t        parse: function (_context, tokens) {\n\t            return parseFunctionArgs(tokens)\n\t                .map(function (values) {\n\t                return values\n\t                    .filter(isIdentToken)\n\t                    .map(function (token) { return token.value; })\n\t                    .join(' ');\n\t            })\n\t                .map(parseBackgroundRepeat);\n\t        }\n\t    };\n\t    var parseBackgroundRepeat = function (value) {\n\t        switch (value) {\n\t            case 'no-repeat':\n\t                return 1 /* NO_REPEAT */;\n\t            case 'repeat-x':\n\t            case 'repeat no-repeat':\n\t                return 2 /* REPEAT_X */;\n\t            case 'repeat-y':\n\t            case 'no-repeat repeat':\n\t                return 3 /* REPEAT_Y */;\n\t            case 'repeat':\n\t            default:\n\t                return 0 /* REPEAT */;\n\t        }\n\t    };\n\n\t    var BACKGROUND_SIZE;\n\t    (function (BACKGROUND_SIZE) {\n\t        BACKGROUND_SIZE[\"AUTO\"] = \"auto\";\n\t        BACKGROUND_SIZE[\"CONTAIN\"] = \"contain\";\n\t        BACKGROUND_SIZE[\"COVER\"] = \"cover\";\n\t    })(BACKGROUND_SIZE || (BACKGROUND_SIZE = {}));\n\t    var backgroundSize = {\n\t        name: 'background-size',\n\t        initialValue: '0',\n\t        prefix: false,\n\t        type: 1 /* LIST */,\n\t        parse: function (_context, tokens) {\n\t            return parseFunctionArgs(tokens).map(function (values) { return values.filter(isBackgroundSizeInfoToken); });\n\t        }\n\t    };\n\t    var isBackgroundSizeInfoToken = function (value) {\n\t        return isIdentToken(value) || isLengthPercentage(value);\n\t    };\n\n\t    var borderColorForSide = function (side) { return ({\n\t        name: \"border-\" + side + \"-color\",\n\t        initialValue: 'transparent',\n\t        prefix: false,\n\t        type: 3 /* TYPE_VALUE */,\n\t        format: 'color'\n\t    }); };\n\t    var borderTopColor = borderColorForSide('top');\n\t    var borderRightColor = borderColorForSide('right');\n\t    var borderBottomColor = borderColorForSide('bottom');\n\t    var borderLeftColor = borderColorForSide('left');\n\n\t    var borderRadiusForSide = function (side) { return ({\n\t        name: \"border-radius-\" + side,\n\t        initialValue: '0 0',\n\t        prefix: false,\n\t        type: 1 /* LIST */,\n\t        parse: function (_context, tokens) {\n\t            return parseLengthPercentageTuple(tokens.filter(isLengthPercentage));\n\t        }\n\t    }); };\n\t    var borderTopLeftRadius = borderRadiusForSide('top-left');\n\t    var borderTopRightRadius = borderRadiusForSide('top-right');\n\t    var borderBottomRightRadius = borderRadiusForSide('bottom-right');\n\t    var borderBottomLeftRadius = borderRadiusForSide('bottom-left');\n\n\t    var borderStyleForSide = function (side) { return ({\n\t        name: \"border-\" + side + \"-style\",\n\t        initialValue: 'solid',\n\t        prefix: false,\n\t        type: 2 /* IDENT_VALUE */,\n\t        parse: function (_context, style) {\n\t            switch (style) {\n\t                case 'none':\n\t                    return 0 /* NONE */;\n\t                case 'dashed':\n\t                    return 2 /* DASHED */;\n\t                case 'dotted':\n\t                    return 3 /* DOTTED */;\n\t                case 'double':\n\t                    return 4 /* DOUBLE */;\n\t            }\n\t            return 1 /* SOLID */;\n\t        }\n\t    }); };\n\t    var borderTopStyle = borderStyleForSide('top');\n\t    var borderRightStyle = borderStyleForSide('right');\n\t    var borderBottomStyle = borderStyleForSide('bottom');\n\t    var borderLeftStyle = borderStyleForSide('left');\n\n\t    var borderWidthForSide = function (side) { return ({\n\t        name: \"border-\" + side + \"-width\",\n\t        initialValue: '0',\n\t        type: 0 /* VALUE */,\n\t        prefix: false,\n\t        parse: function (_context, token) {\n\t            if (isDimensionToken(token)) {\n\t                return token.number;\n\t            }\n\t            return 0;\n\t        }\n\t    }); };\n\t    var borderTopWidth = borderWidthForSide('top');\n\t    var borderRightWidth = borderWidthForSide('right');\n\t    var borderBottomWidth = borderWidthForSide('bottom');\n\t    var borderLeftWidth = borderWidthForSide('left');\n\n\t    var color = {\n\t        name: \"color\",\n\t        initialValue: 'transparent',\n\t        prefix: false,\n\t        type: 3 /* TYPE_VALUE */,\n\t        format: 'color'\n\t    };\n\n\t    var direction = {\n\t        name: 'direction',\n\t        initialValue: 'ltr',\n\t        prefix: false,\n\t        type: 2 /* IDENT_VALUE */,\n\t        parse: function (_context, direction) {\n\t            switch (direction) {\n\t                case 'rtl':\n\t                    return 1 /* RTL */;\n\t                case 'ltr':\n\t                default:\n\t                    return 0 /* LTR */;\n\t            }\n\t        }\n\t    };\n\n\t    var display = {\n\t        name: 'display',\n\t        initialValue: 'inline-block',\n\t        prefix: false,\n\t        type: 1 /* LIST */,\n\t        parse: function (_context, tokens) {\n\t            return tokens.filter(isIdentToken).reduce(function (bit, token) {\n\t                return bit | parseDisplayValue(token.value);\n\t            }, 0 /* NONE */);\n\t        }\n\t    };\n\t    var parseDisplayValue = function (display) {\n\t        switch (display) {\n\t            case 'block':\n\t            case '-webkit-box':\n\t                return 2 /* BLOCK */;\n\t            case 'inline':\n\t                return 4 /* INLINE */;\n\t            case 'run-in':\n\t                return 8 /* RUN_IN */;\n\t            case 'flow':\n\t                return 16 /* FLOW */;\n\t            case 'flow-root':\n\t                return 32 /* FLOW_ROOT */;\n\t            case 'table':\n\t                return 64 /* TABLE */;\n\t            case 'flex':\n\t            case '-webkit-flex':\n\t                return 128 /* FLEX */;\n\t            case 'grid':\n\t            case '-ms-grid':\n\t                return 256 /* GRID */;\n\t            case 'ruby':\n\t                return 512 /* RUBY */;\n\t            case 'subgrid':\n\t                return 1024 /* SUBGRID */;\n\t            case 'list-item':\n\t                return 2048 /* LIST_ITEM */;\n\t            case 'table-row-group':\n\t                return 4096 /* TABLE_ROW_GROUP */;\n\t            case 'table-header-group':\n\t                return 8192 /* TABLE_HEADER_GROUP */;\n\t            case 'table-footer-group':\n\t                return 16384 /* TABLE_FOOTER_GROUP */;\n\t            case 'table-row':\n\t                return 32768 /* TABLE_ROW */;\n\t            case 'table-cell':\n\t                return 65536 /* TABLE_CELL */;\n\t            case 'table-column-group':\n\t                return 131072 /* TABLE_COLUMN_GROUP */;\n\t            case 'table-column':\n\t                return 262144 /* TABLE_COLUMN */;\n\t            case 'table-caption':\n\t                return 524288 /* TABLE_CAPTION */;\n\t            case 'ruby-base':\n\t                return 1048576 /* RUBY_BASE */;\n\t            case 'ruby-text':\n\t                return 2097152 /* RUBY_TEXT */;\n\t            case 'ruby-base-container':\n\t                return 4194304 /* RUBY_BASE_CONTAINER */;\n\t            case 'ruby-text-container':\n\t                return 8388608 /* RUBY_TEXT_CONTAINER */;\n\t            case 'contents':\n\t                return 16777216 /* CONTENTS */;\n\t            case 'inline-block':\n\t                return 33554432 /* INLINE_BLOCK */;\n\t            case 'inline-list-item':\n\t                return 67108864 /* INLINE_LIST_ITEM */;\n\t            case 'inline-table':\n\t                return 134217728 /* INLINE_TABLE */;\n\t            case 'inline-flex':\n\t                return 268435456 /* INLINE_FLEX */;\n\t            case 'inline-grid':\n\t                return 536870912 /* INLINE_GRID */;\n\t        }\n\t        return 0 /* NONE */;\n\t    };\n\n\t    var float = {\n\t        name: 'float',\n\t        initialValue: 'none',\n\t        prefix: false,\n\t        type: 2 /* IDENT_VALUE */,\n\t        parse: function (_context, float) {\n\t            switch (float) {\n\t                case 'left':\n\t                    return 1 /* LEFT */;\n\t                case 'right':\n\t                    return 2 /* RIGHT */;\n\t                case 'inline-start':\n\t                    return 3 /* INLINE_START */;\n\t                case 'inline-end':\n\t                    return 4 /* INLINE_END */;\n\t            }\n\t            return 0 /* NONE */;\n\t        }\n\t    };\n\n\t    var letterSpacing = {\n\t        name: 'letter-spacing',\n\t        initialValue: '0',\n\t        prefix: false,\n\t        type: 0 /* VALUE */,\n\t        parse: function (_context, token) {\n\t            if (token.type === 20 /* IDENT_TOKEN */ && token.value === 'normal') {\n\t                return 0;\n\t            }\n\t            if (token.type === 17 /* NUMBER_TOKEN */) {\n\t                return token.number;\n\t            }\n\t            if (token.type === 15 /* DIMENSION_TOKEN */) {\n\t                return token.number;\n\t            }\n\t            return 0;\n\t        }\n\t    };\n\n\t    var LINE_BREAK;\n\t    (function (LINE_BREAK) {\n\t        LINE_BREAK[\"NORMAL\"] = \"normal\";\n\t        LINE_BREAK[\"STRICT\"] = \"strict\";\n\t    })(LINE_BREAK || (LINE_BREAK = {}));\n\t    var lineBreak = {\n\t        name: 'line-break',\n\t        initialValue: 'normal',\n\t        prefix: false,\n\t        type: 2 /* IDENT_VALUE */,\n\t        parse: function (_context, lineBreak) {\n\t            switch (lineBreak) {\n\t                case 'strict':\n\t                    return LINE_BREAK.STRICT;\n\t                case 'normal':\n\t                default:\n\t                    return LINE_BREAK.NORMAL;\n\t            }\n\t        }\n\t    };\n\n\t    var lineHeight = {\n\t        name: 'line-height',\n\t        initialValue: 'normal',\n\t        prefix: false,\n\t        type: 4 /* TOKEN_VALUE */\n\t    };\n\t    var computeLineHeight = function (token, fontSize) {\n\t        if (isIdentToken(token) && token.value === 'normal') {\n\t            return 1.2 * fontSize;\n\t        }\n\t        else if (token.type === 17 /* NUMBER_TOKEN */) {\n\t            return fontSize * token.number;\n\t        }\n\t        else if (isLengthPercentage(token)) {\n\t            return getAbsoluteValue(token, fontSize);\n\t        }\n\t        return fontSize;\n\t    };\n\n\t    var listStyleImage = {\n\t        name: 'list-style-image',\n\t        initialValue: 'none',\n\t        type: 0 /* VALUE */,\n\t        prefix: false,\n\t        parse: function (context, token) {\n\t            if (token.type === 20 /* IDENT_TOKEN */ && token.value === 'none') {\n\t                return null;\n\t            }\n\t            return image.parse(context, token);\n\t        }\n\t    };\n\n\t    var listStylePosition = {\n\t        name: 'list-style-position',\n\t        initialValue: 'outside',\n\t        prefix: false,\n\t        type: 2 /* IDENT_VALUE */,\n\t        parse: function (_context, position) {\n\t            switch (position) {\n\t                case 'inside':\n\t                    return 0 /* INSIDE */;\n\t                case 'outside':\n\t                default:\n\t                    return 1 /* OUTSIDE */;\n\t            }\n\t        }\n\t    };\n\n\t    var listStyleType = {\n\t        name: 'list-style-type',\n\t        initialValue: 'none',\n\t        prefix: false,\n\t        type: 2 /* IDENT_VALUE */,\n\t        parse: function (_context, type) {\n\t            switch (type) {\n\t                case 'disc':\n\t                    return 0 /* DISC */;\n\t                case 'circle':\n\t                    return 1 /* CIRCLE */;\n\t                case 'square':\n\t                    return 2 /* SQUARE */;\n\t                case 'decimal':\n\t                    return 3 /* DECIMAL */;\n\t                case 'cjk-decimal':\n\t                    return 4 /* CJK_DECIMAL */;\n\t                case 'decimal-leading-zero':\n\t                    return 5 /* DECIMAL_LEADING_ZERO */;\n\t                case 'lower-roman':\n\t                    return 6 /* LOWER_ROMAN */;\n\t                case 'upper-roman':\n\t                    return 7 /* UPPER_ROMAN */;\n\t                case 'lower-greek':\n\t                    return 8 /* LOWER_GREEK */;\n\t                case 'lower-alpha':\n\t                    return 9 /* LOWER_ALPHA */;\n\t                case 'upper-alpha':\n\t                    return 10 /* UPPER_ALPHA */;\n\t                case 'arabic-indic':\n\t                    return 11 /* ARABIC_INDIC */;\n\t                case 'armenian':\n\t                    return 12 /* ARMENIAN */;\n\t                case 'bengali':\n\t                    return 13 /* BENGALI */;\n\t                case 'cambodian':\n\t                    return 14 /* CAMBODIAN */;\n\t                case 'cjk-earthly-branch':\n\t                    return 15 /* CJK_EARTHLY_BRANCH */;\n\t                case 'cjk-heavenly-stem':\n\t                    return 16 /* CJK_HEAVENLY_STEM */;\n\t                case 'cjk-ideographic':\n\t                    return 17 /* CJK_IDEOGRAPHIC */;\n\t                case 'devanagari':\n\t                    return 18 /* DEVANAGARI */;\n\t                case 'ethiopic-numeric':\n\t                    return 19 /* ETHIOPIC_NUMERIC */;\n\t                case 'georgian':\n\t                    return 20 /* GEORGIAN */;\n\t                case 'gujarati':\n\t                    return 21 /* GUJARATI */;\n\t                case 'gurmukhi':\n\t                    return 22 /* GURMUKHI */;\n\t                case 'hebrew':\n\t                    return 22 /* HEBREW */;\n\t                case 'hiragana':\n\t                    return 23 /* HIRAGANA */;\n\t                case 'hiragana-iroha':\n\t                    return 24 /* HIRAGANA_IROHA */;\n\t                case 'japanese-formal':\n\t                    return 25 /* JAPANESE_FORMAL */;\n\t                case 'japanese-informal':\n\t                    return 26 /* JAPANESE_INFORMAL */;\n\t                case 'kannada':\n\t                    return 27 /* KANNADA */;\n\t                case 'katakana':\n\t                    return 28 /* KATAKANA */;\n\t                case 'katakana-iroha':\n\t                    return 29 /* KATAKANA_IROHA */;\n\t                case 'khmer':\n\t                    return 30 /* KHMER */;\n\t                case 'korean-hangul-formal':\n\t                    return 31 /* KOREAN_HANGUL_FORMAL */;\n\t                case 'korean-hanja-formal':\n\t                    return 32 /* KOREAN_HANJA_FORMAL */;\n\t                case 'korean-hanja-informal':\n\t                    return 33 /* KOREAN_HANJA_INFORMAL */;\n\t                case 'lao':\n\t                    return 34 /* LAO */;\n\t                case 'lower-armenian':\n\t                    return 35 /* LOWER_ARMENIAN */;\n\t                case 'malayalam':\n\t                    return 36 /* MALAYALAM */;\n\t                case 'mongolian':\n\t                    return 37 /* MONGOLIAN */;\n\t                case 'myanmar':\n\t                    return 38 /* MYANMAR */;\n\t                case 'oriya':\n\t                    return 39 /* ORIYA */;\n\t                case 'persian':\n\t                    return 40 /* PERSIAN */;\n\t                case 'simp-chinese-formal':\n\t                    return 41 /* SIMP_CHINESE_FORMAL */;\n\t                case 'simp-chinese-informal':\n\t                    return 42 /* SIMP_CHINESE_INFORMAL */;\n\t                case 'tamil':\n\t                    return 43 /* TAMIL */;\n\t                case 'telugu':\n\t                    return 44 /* TELUGU */;\n\t                case 'thai':\n\t                    return 45 /* THAI */;\n\t                case 'tibetan':\n\t                    return 46 /* TIBETAN */;\n\t                case 'trad-chinese-formal':\n\t                    return 47 /* TRAD_CHINESE_FORMAL */;\n\t                case 'trad-chinese-informal':\n\t                    return 48 /* TRAD_CHINESE_INFORMAL */;\n\t                case 'upper-armenian':\n\t                    return 49 /* UPPER_ARMENIAN */;\n\t                case 'disclosure-open':\n\t                    return 50 /* DISCLOSURE_OPEN */;\n\t                case 'disclosure-closed':\n\t                    return 51 /* DISCLOSURE_CLOSED */;\n\t                case 'none':\n\t                default:\n\t                    return -1 /* NONE */;\n\t            }\n\t        }\n\t    };\n\n\t    var marginForSide = function (side) { return ({\n\t        name: \"margin-\" + side,\n\t        initialValue: '0',\n\t        prefix: false,\n\t        type: 4 /* TOKEN_VALUE */\n\t    }); };\n\t    var marginTop = marginForSide('top');\n\t    var marginRight = marginForSide('right');\n\t    var marginBottom = marginForSide('bottom');\n\t    var marginLeft = marginForSide('left');\n\n\t    var overflow = {\n\t        name: 'overflow',\n\t        initialValue: 'visible',\n\t        prefix: false,\n\t        type: 1 /* LIST */,\n\t        parse: function (_context, tokens) {\n\t            return tokens.filter(isIdentToken).map(function (overflow) {\n\t                switch (overflow.value) {\n\t                    case 'hidden':\n\t                        return 1 /* HIDDEN */;\n\t                    case 'scroll':\n\t                        return 2 /* SCROLL */;\n\t                    case 'clip':\n\t                        return 3 /* CLIP */;\n\t                    case 'auto':\n\t                        return 4 /* AUTO */;\n\t                    case 'visible':\n\t                    default:\n\t                        return 0 /* VISIBLE */;\n\t                }\n\t            });\n\t        }\n\t    };\n\n\t    var overflowWrap = {\n\t        name: 'overflow-wrap',\n\t        initialValue: 'normal',\n\t        prefix: false,\n\t        type: 2 /* IDENT_VALUE */,\n\t        parse: function (_context, overflow) {\n\t            switch (overflow) {\n\t                case 'break-word':\n\t                    return \"break-word\" /* BREAK_WORD */;\n\t                case 'normal':\n\t                default:\n\t                    return \"normal\" /* NORMAL */;\n\t            }\n\t        }\n\t    };\n\n\t    var paddingForSide = function (side) { return ({\n\t        name: \"padding-\" + side,\n\t        initialValue: '0',\n\t        prefix: false,\n\t        type: 3 /* TYPE_VALUE */,\n\t        format: 'length-percentage'\n\t    }); };\n\t    var paddingTop = paddingForSide('top');\n\t    var paddingRight = paddingForSide('right');\n\t    var paddingBottom = paddingForSide('bottom');\n\t    var paddingLeft = paddingForSide('left');\n\n\t    var textAlign = {\n\t        name: 'text-align',\n\t        initialValue: 'left',\n\t        prefix: false,\n\t        type: 2 /* IDENT_VALUE */,\n\t        parse: function (_context, textAlign) {\n\t            switch (textAlign) {\n\t                case 'right':\n\t                    return 2 /* RIGHT */;\n\t                case 'center':\n\t                case 'justify':\n\t                    return 1 /* CENTER */;\n\t                case 'left':\n\t                default:\n\t                    return 0 /* LEFT */;\n\t            }\n\t        }\n\t    };\n\n\t    var position = {\n\t        name: 'position',\n\t        initialValue: 'static',\n\t        prefix: false,\n\t        type: 2 /* IDENT_VALUE */,\n\t        parse: function (_context, position) {\n\t            switch (position) {\n\t                case 'relative':\n\t                    return 1 /* RELATIVE */;\n\t                case 'absolute':\n\t                    return 2 /* ABSOLUTE */;\n\t                case 'fixed':\n\t                    return 3 /* FIXED */;\n\t                case 'sticky':\n\t                    return 4 /* STICKY */;\n\t            }\n\t            return 0 /* STATIC */;\n\t        }\n\t    };\n\n\t    var textShadow = {\n\t        name: 'text-shadow',\n\t        initialValue: 'none',\n\t        type: 1 /* LIST */,\n\t        prefix: false,\n\t        parse: function (context, tokens) {\n\t            if (tokens.length === 1 && isIdentWithValue(tokens[0], 'none')) {\n\t                return [];\n\t            }\n\t            return parseFunctionArgs(tokens).map(function (values) {\n\t                var shadow = {\n\t                    color: COLORS.TRANSPARENT,\n\t                    offsetX: ZERO_LENGTH,\n\t                    offsetY: ZERO_LENGTH,\n\t                    blur: ZERO_LENGTH\n\t                };\n\t                var c = 0;\n\t                for (var i = 0; i < values.length; i++) {\n\t                    var token = values[i];\n\t                    if (isLength(token)) {\n\t                        if (c === 0) {\n\t                            shadow.offsetX = token;\n\t                        }\n\t                        else if (c === 1) {\n\t                            shadow.offsetY = token;\n\t                        }\n\t                        else {\n\t                            shadow.blur = token;\n\t                        }\n\t                        c++;\n\t                    }\n\t                    else {\n\t                        shadow.color = color$1.parse(context, token);\n\t                    }\n\t                }\n\t                return shadow;\n\t            });\n\t        }\n\t    };\n\n\t    var textTransform = {\n\t        name: 'text-transform',\n\t        initialValue: 'none',\n\t        prefix: false,\n\t        type: 2 /* IDENT_VALUE */,\n\t        parse: function (_context, textTransform) {\n\t            switch (textTransform) {\n\t                case 'uppercase':\n\t                    return 2 /* UPPERCASE */;\n\t                case 'lowercase':\n\t                    return 1 /* LOWERCASE */;\n\t                case 'capitalize':\n\t                    return 3 /* CAPITALIZE */;\n\t            }\n\t            return 0 /* NONE */;\n\t        }\n\t    };\n\n\t    var transform$1 = {\n\t        name: 'transform',\n\t        initialValue: 'none',\n\t        prefix: true,\n\t        type: 0 /* VALUE */,\n\t        parse: function (_context, token) {\n\t            if (token.type === 20 /* IDENT_TOKEN */ && token.value === 'none') {\n\t                return null;\n\t            }\n\t            if (token.type === 18 /* FUNCTION */) {\n\t                var transformFunction = SUPPORTED_TRANSFORM_FUNCTIONS[token.name];\n\t                if (typeof transformFunction === 'undefined') {\n\t                    throw new Error(\"Attempting to parse an unsupported transform function \\\"\" + token.name + \"\\\"\");\n\t                }\n\t                return transformFunction(token.values);\n\t            }\n\t            return null;\n\t        }\n\t    };\n\t    var matrix = function (args) {\n\t        var values = args.filter(function (arg) { return arg.type === 17 /* NUMBER_TOKEN */; }).map(function (arg) { return arg.number; });\n\t        return values.length === 6 ? values : null;\n\t    };\n\t    // doesn't support 3D transforms at the moment\n\t    var matrix3d = function (args) {\n\t        var values = args.filter(function (arg) { return arg.type === 17 /* NUMBER_TOKEN */; }).map(function (arg) { return arg.number; });\n\t        var a1 = values[0], b1 = values[1]; values[2]; values[3]; var a2 = values[4], b2 = values[5]; values[6]; values[7]; values[8]; values[9]; values[10]; values[11]; var a4 = values[12], b4 = values[13]; values[14]; values[15];\n\t        return values.length === 16 ? [a1, b1, a2, b2, a4, b4] : null;\n\t    };\n\t    var SUPPORTED_TRANSFORM_FUNCTIONS = {\n\t        matrix: matrix,\n\t        matrix3d: matrix3d\n\t    };\n\n\t    var DEFAULT_VALUE = {\n\t        type: 16 /* PERCENTAGE_TOKEN */,\n\t        number: 50,\n\t        flags: FLAG_INTEGER\n\t    };\n\t    var DEFAULT = [DEFAULT_VALUE, DEFAULT_VALUE];\n\t    var transformOrigin = {\n\t        name: 'transform-origin',\n\t        initialValue: '50% 50%',\n\t        prefix: true,\n\t        type: 1 /* LIST */,\n\t        parse: function (_context, tokens) {\n\t            var origins = tokens.filter(isLengthPercentage);\n\t            if (origins.length !== 2) {\n\t                return DEFAULT;\n\t            }\n\t            return [origins[0], origins[1]];\n\t        }\n\t    };\n\n\t    var visibility = {\n\t        name: 'visible',\n\t        initialValue: 'none',\n\t        prefix: false,\n\t        type: 2 /* IDENT_VALUE */,\n\t        parse: function (_context, visibility) {\n\t            switch (visibility) {\n\t                case 'hidden':\n\t                    return 1 /* HIDDEN */;\n\t                case 'collapse':\n\t                    return 2 /* COLLAPSE */;\n\t                case 'visible':\n\t                default:\n\t                    return 0 /* VISIBLE */;\n\t            }\n\t        }\n\t    };\n\n\t    var WORD_BREAK;\n\t    (function (WORD_BREAK) {\n\t        WORD_BREAK[\"NORMAL\"] = \"normal\";\n\t        WORD_BREAK[\"BREAK_ALL\"] = \"break-all\";\n\t        WORD_BREAK[\"KEEP_ALL\"] = \"keep-all\";\n\t    })(WORD_BREAK || (WORD_BREAK = {}));\n\t    var wordBreak = {\n\t        name: 'word-break',\n\t        initialValue: 'normal',\n\t        prefix: false,\n\t        type: 2 /* IDENT_VALUE */,\n\t        parse: function (_context, wordBreak) {\n\t            switch (wordBreak) {\n\t                case 'break-all':\n\t                    return WORD_BREAK.BREAK_ALL;\n\t                case 'keep-all':\n\t                    return WORD_BREAK.KEEP_ALL;\n\t                case 'normal':\n\t                default:\n\t                    return WORD_BREAK.NORMAL;\n\t            }\n\t        }\n\t    };\n\n\t    var zIndex = {\n\t        name: 'z-index',\n\t        initialValue: 'auto',\n\t        prefix: false,\n\t        type: 0 /* VALUE */,\n\t        parse: function (_context, token) {\n\t            if (token.type === 20 /* IDENT_TOKEN */) {\n\t                return { auto: true, order: 0 };\n\t            }\n\t            if (isNumberToken(token)) {\n\t                return { auto: false, order: token.number };\n\t            }\n\t            throw new Error(\"Invalid z-index number parsed\");\n\t        }\n\t    };\n\n\t    var time = {\n\t        name: 'time',\n\t        parse: function (_context, value) {\n\t            if (value.type === 15 /* DIMENSION_TOKEN */) {\n\t                switch (value.unit.toLowerCase()) {\n\t                    case 's':\n\t                        return 1000 * value.number;\n\t                    case 'ms':\n\t                        return value.number;\n\t                }\n\t            }\n\t            throw new Error(\"Unsupported time type\");\n\t        }\n\t    };\n\n\t    var opacity = {\n\t        name: 'opacity',\n\t        initialValue: '1',\n\t        type: 0 /* VALUE */,\n\t        prefix: false,\n\t        parse: function (_context, token) {\n\t            if (isNumberToken(token)) {\n\t                return token.number;\n\t            }\n\t            return 1;\n\t        }\n\t    };\n\n\t    var textDecorationColor = {\n\t        name: \"text-decoration-color\",\n\t        initialValue: 'transparent',\n\t        prefix: false,\n\t        type: 3 /* TYPE_VALUE */,\n\t        format: 'color'\n\t    };\n\n\t    var textDecorationLine = {\n\t        name: 'text-decoration-line',\n\t        initialValue: 'none',\n\t        prefix: false,\n\t        type: 1 /* LIST */,\n\t        parse: function (_context, tokens) {\n\t            return tokens\n\t                .filter(isIdentToken)\n\t                .map(function (token) {\n\t                switch (token.value) {\n\t                    case 'underline':\n\t                        return 1 /* UNDERLINE */;\n\t                    case 'overline':\n\t                        return 2 /* OVERLINE */;\n\t                    case 'line-through':\n\t                        return 3 /* LINE_THROUGH */;\n\t                    case 'none':\n\t                        return 4 /* BLINK */;\n\t                }\n\t                return 0 /* NONE */;\n\t            })\n\t                .filter(function (line) { return line !== 0 /* NONE */; });\n\t        }\n\t    };\n\n\t    var fontFamily = {\n\t        name: \"font-family\",\n\t        initialValue: '',\n\t        prefix: false,\n\t        type: 1 /* LIST */,\n\t        parse: function (_context, tokens) {\n\t            var accumulator = [];\n\t            var results = [];\n\t            tokens.forEach(function (token) {\n\t                switch (token.type) {\n\t                    case 20 /* IDENT_TOKEN */:\n\t                    case 0 /* STRING_TOKEN */:\n\t                        accumulator.push(token.value);\n\t                        break;\n\t                    case 17 /* NUMBER_TOKEN */:\n\t                        accumulator.push(token.number.toString());\n\t                        break;\n\t                    case 4 /* COMMA_TOKEN */:\n\t                        results.push(accumulator.join(' '));\n\t                        accumulator.length = 0;\n\t                        break;\n\t                }\n\t            });\n\t            if (accumulator.length) {\n\t                results.push(accumulator.join(' '));\n\t            }\n\t            return results.map(function (result) { return (result.indexOf(' ') === -1 ? result : \"'\" + result + \"'\"); });\n\t        }\n\t    };\n\n\t    var fontSize = {\n\t        name: \"font-size\",\n\t        initialValue: '0',\n\t        prefix: false,\n\t        type: 3 /* TYPE_VALUE */,\n\t        format: 'length'\n\t    };\n\n\t    var fontWeight = {\n\t        name: 'font-weight',\n\t        initialValue: 'normal',\n\t        type: 0 /* VALUE */,\n\t        prefix: false,\n\t        parse: function (_context, token) {\n\t            if (isNumberToken(token)) {\n\t                return token.number;\n\t            }\n\t            if (isIdentToken(token)) {\n\t                switch (token.value) {\n\t                    case 'bold':\n\t                        return 700;\n\t                    case 'normal':\n\t                    default:\n\t                        return 400;\n\t                }\n\t            }\n\t            return 400;\n\t        }\n\t    };\n\n\t    var fontVariant = {\n\t        name: 'font-variant',\n\t        initialValue: 'none',\n\t        type: 1 /* LIST */,\n\t        prefix: false,\n\t        parse: function (_context, tokens) {\n\t            return tokens.filter(isIdentToken).map(function (token) { return token.value; });\n\t        }\n\t    };\n\n\t    var fontStyle = {\n\t        name: 'font-style',\n\t        initialValue: 'normal',\n\t        prefix: false,\n\t        type: 2 /* IDENT_VALUE */,\n\t        parse: function (_context, overflow) {\n\t            switch (overflow) {\n\t                case 'oblique':\n\t                    return \"oblique\" /* OBLIQUE */;\n\t                case 'italic':\n\t                    return \"italic\" /* ITALIC */;\n\t                case 'normal':\n\t                default:\n\t                    return \"normal\" /* NORMAL */;\n\t            }\n\t        }\n\t    };\n\n\t    var contains = function (bit, value) { return (bit & value) !== 0; };\n\n\t    var content = {\n\t        name: 'content',\n\t        initialValue: 'none',\n\t        type: 1 /* LIST */,\n\t        prefix: false,\n\t        parse: function (_context, tokens) {\n\t            if (tokens.length === 0) {\n\t                return [];\n\t            }\n\t            var first = tokens[0];\n\t            if (first.type === 20 /* IDENT_TOKEN */ && first.value === 'none') {\n\t                return [];\n\t            }\n\t            return tokens;\n\t        }\n\t    };\n\n\t    var counterIncrement = {\n\t        name: 'counter-increment',\n\t        initialValue: 'none',\n\t        prefix: true,\n\t        type: 1 /* LIST */,\n\t        parse: function (_context, tokens) {\n\t            if (tokens.length === 0) {\n\t                return null;\n\t            }\n\t            var first = tokens[0];\n\t            if (first.type === 20 /* IDENT_TOKEN */ && first.value === 'none') {\n\t                return null;\n\t            }\n\t            var increments = [];\n\t            var filtered = tokens.filter(nonWhiteSpace);\n\t            for (var i = 0; i < filtered.length; i++) {\n\t                var counter = filtered[i];\n\t                var next = filtered[i + 1];\n\t                if (counter.type === 20 /* IDENT_TOKEN */) {\n\t                    var increment = next && isNumberToken(next) ? next.number : 1;\n\t                    increments.push({ counter: counter.value, increment: increment });\n\t                }\n\t            }\n\t            return increments;\n\t        }\n\t    };\n\n\t    var counterReset = {\n\t        name: 'counter-reset',\n\t        initialValue: 'none',\n\t        prefix: true,\n\t        type: 1 /* LIST */,\n\t        parse: function (_context, tokens) {\n\t            if (tokens.length === 0) {\n\t                return [];\n\t            }\n\t            var resets = [];\n\t            var filtered = tokens.filter(nonWhiteSpace);\n\t            for (var i = 0; i < filtered.length; i++) {\n\t                var counter = filtered[i];\n\t                var next = filtered[i + 1];\n\t                if (isIdentToken(counter) && counter.value !== 'none') {\n\t                    var reset = next && isNumberToken(next) ? next.number : 0;\n\t                    resets.push({ counter: counter.value, reset: reset });\n\t                }\n\t            }\n\t            return resets;\n\t        }\n\t    };\n\n\t    var duration = {\n\t        name: 'duration',\n\t        initialValue: '0s',\n\t        prefix: false,\n\t        type: 1 /* LIST */,\n\t        parse: function (context, tokens) {\n\t            return tokens.filter(isDimensionToken).map(function (token) { return time.parse(context, token); });\n\t        }\n\t    };\n\n\t    var quotes = {\n\t        name: 'quotes',\n\t        initialValue: 'none',\n\t        prefix: true,\n\t        type: 1 /* LIST */,\n\t        parse: function (_context, tokens) {\n\t            if (tokens.length === 0) {\n\t                return null;\n\t            }\n\t            var first = tokens[0];\n\t            if (first.type === 20 /* IDENT_TOKEN */ && first.value === 'none') {\n\t                return null;\n\t            }\n\t            var quotes = [];\n\t            var filtered = tokens.filter(isStringToken);\n\t            if (filtered.length % 2 !== 0) {\n\t                return null;\n\t            }\n\t            for (var i = 0; i < filtered.length; i += 2) {\n\t                var open_1 = filtered[i].value;\n\t                var close_1 = filtered[i + 1].value;\n\t                quotes.push({ open: open_1, close: close_1 });\n\t            }\n\t            return quotes;\n\t        }\n\t    };\n\t    var getQuote = function (quotes, depth, open) {\n\t        if (!quotes) {\n\t            return '';\n\t        }\n\t        var quote = quotes[Math.min(depth, quotes.length - 1)];\n\t        if (!quote) {\n\t            return '';\n\t        }\n\t        return open ? quote.open : quote.close;\n\t    };\n\n\t    var boxShadow = {\n\t        name: 'box-shadow',\n\t        initialValue: 'none',\n\t        type: 1 /* LIST */,\n\t        prefix: false,\n\t        parse: function (context, tokens) {\n\t            if (tokens.length === 1 && isIdentWithValue(tokens[0], 'none')) {\n\t                return [];\n\t            }\n\t            return parseFunctionArgs(tokens).map(function (values) {\n\t                var shadow = {\n\t                    color: 0x000000ff,\n\t                    offsetX: ZERO_LENGTH,\n\t                    offsetY: ZERO_LENGTH,\n\t                    blur: ZERO_LENGTH,\n\t                    spread: ZERO_LENGTH,\n\t                    inset: false\n\t                };\n\t                var c = 0;\n\t                for (var i = 0; i < values.length; i++) {\n\t                    var token = values[i];\n\t                    if (isIdentWithValue(token, 'inset')) {\n\t                        shadow.inset = true;\n\t                    }\n\t                    else if (isLength(token)) {\n\t                        if (c === 0) {\n\t                            shadow.offsetX = token;\n\t                        }\n\t                        else if (c === 1) {\n\t                            shadow.offsetY = token;\n\t                        }\n\t                        else if (c === 2) {\n\t                            shadow.blur = token;\n\t                        }\n\t                        else {\n\t                            shadow.spread = token;\n\t                        }\n\t                        c++;\n\t                    }\n\t                    else {\n\t                        shadow.color = color$1.parse(context, token);\n\t                    }\n\t                }\n\t                return shadow;\n\t            });\n\t        }\n\t    };\n\n\t    var paintOrder = {\n\t        name: 'paint-order',\n\t        initialValue: 'normal',\n\t        prefix: false,\n\t        type: 1 /* LIST */,\n\t        parse: function (_context, tokens) {\n\t            var DEFAULT_VALUE = [0 /* FILL */, 1 /* STROKE */, 2 /* MARKERS */];\n\t            var layers = [];\n\t            tokens.filter(isIdentToken).forEach(function (token) {\n\t                switch (token.value) {\n\t                    case 'stroke':\n\t                        layers.push(1 /* STROKE */);\n\t                        break;\n\t                    case 'fill':\n\t                        layers.push(0 /* FILL */);\n\t                        break;\n\t                    case 'markers':\n\t                        layers.push(2 /* MARKERS */);\n\t                        break;\n\t                }\n\t            });\n\t            DEFAULT_VALUE.forEach(function (value) {\n\t                if (layers.indexOf(value) === -1) {\n\t                    layers.push(value);\n\t                }\n\t            });\n\t            return layers;\n\t        }\n\t    };\n\n\t    var webkitTextStrokeColor = {\n\t        name: \"-webkit-text-stroke-color\",\n\t        initialValue: 'currentcolor',\n\t        prefix: false,\n\t        type: 3 /* TYPE_VALUE */,\n\t        format: 'color'\n\t    };\n\n\t    var webkitTextStrokeWidth = {\n\t        name: \"-webkit-text-stroke-width\",\n\t        initialValue: '0',\n\t        type: 0 /* VALUE */,\n\t        prefix: false,\n\t        parse: function (_context, token) {\n\t            if (isDimensionToken(token)) {\n\t                return token.number;\n\t            }\n\t            return 0;\n\t        }\n\t    };\n\n\t    var CSSParsedDeclaration = /** @class */ (function () {\n\t        function CSSParsedDeclaration(context, declaration) {\n\t            var _a, _b;\n\t            this.animationDuration = parse(context, duration, declaration.animationDuration);\n\t            this.backgroundClip = parse(context, backgroundClip, declaration.backgroundClip);\n\t            this.backgroundColor = parse(context, backgroundColor, declaration.backgroundColor);\n\t            this.backgroundImage = parse(context, backgroundImage, declaration.backgroundImage);\n\t            this.backgroundOrigin = parse(context, backgroundOrigin, declaration.backgroundOrigin);\n\t            this.backgroundPosition = parse(context, backgroundPosition, declaration.backgroundPosition);\n\t            this.backgroundRepeat = parse(context, backgroundRepeat, declaration.backgroundRepeat);\n\t            this.backgroundSize = parse(context, backgroundSize, declaration.backgroundSize);\n\t            this.borderTopColor = parse(context, borderTopColor, declaration.borderTopColor);\n\t            this.borderRightColor = parse(context, borderRightColor, declaration.borderRightColor);\n\t            this.borderBottomColor = parse(context, borderBottomColor, declaration.borderBottomColor);\n\t            this.borderLeftColor = parse(context, borderLeftColor, declaration.borderLeftColor);\n\t            this.borderTopLeftRadius = parse(context, borderTopLeftRadius, declaration.borderTopLeftRadius);\n\t            this.borderTopRightRadius = parse(context, borderTopRightRadius, declaration.borderTopRightRadius);\n\t            this.borderBottomRightRadius = parse(context, borderBottomRightRadius, declaration.borderBottomRightRadius);\n\t            this.borderBottomLeftRadius = parse(context, borderBottomLeftRadius, declaration.borderBottomLeftRadius);\n\t            this.borderTopStyle = parse(context, borderTopStyle, declaration.borderTopStyle);\n\t            this.borderRightStyle = parse(context, borderRightStyle, declaration.borderRightStyle);\n\t            this.borderBottomStyle = parse(context, borderBottomStyle, declaration.borderBottomStyle);\n\t            this.borderLeftStyle = parse(context, borderLeftStyle, declaration.borderLeftStyle);\n\t            this.borderTopWidth = parse(context, borderTopWidth, declaration.borderTopWidth);\n\t            this.borderRightWidth = parse(context, borderRightWidth, declaration.borderRightWidth);\n\t            this.borderBottomWidth = parse(context, borderBottomWidth, declaration.borderBottomWidth);\n\t            this.borderLeftWidth = parse(context, borderLeftWidth, declaration.borderLeftWidth);\n\t            this.boxShadow = parse(context, boxShadow, declaration.boxShadow);\n\t            this.color = parse(context, color, declaration.color);\n\t            this.direction = parse(context, direction, declaration.direction);\n\t            this.display = parse(context, display, declaration.display);\n\t            this.float = parse(context, float, declaration.cssFloat);\n\t            this.fontFamily = parse(context, fontFamily, declaration.fontFamily);\n\t            this.fontSize = parse(context, fontSize, declaration.fontSize);\n\t            this.fontStyle = parse(context, fontStyle, declaration.fontStyle);\n\t            this.fontVariant = parse(context, fontVariant, declaration.fontVariant);\n\t            this.fontWeight = parse(context, fontWeight, declaration.fontWeight);\n\t            this.letterSpacing = parse(context, letterSpacing, declaration.letterSpacing);\n\t            this.lineBreak = parse(context, lineBreak, declaration.lineBreak);\n\t            this.lineHeight = parse(context, lineHeight, declaration.lineHeight);\n\t            this.listStyleImage = parse(context, listStyleImage, declaration.listStyleImage);\n\t            this.listStylePosition = parse(context, listStylePosition, declaration.listStylePosition);\n\t            this.listStyleType = parse(context, listStyleType, declaration.listStyleType);\n\t            this.marginTop = parse(context, marginTop, declaration.marginTop);\n\t            this.marginRight = parse(context, marginRight, declaration.marginRight);\n\t            this.marginBottom = parse(context, marginBottom, declaration.marginBottom);\n\t            this.marginLeft = parse(context, marginLeft, declaration.marginLeft);\n\t            this.opacity = parse(context, opacity, declaration.opacity);\n\t            var overflowTuple = parse(context, overflow, declaration.overflow);\n\t            this.overflowX = overflowTuple[0];\n\t            this.overflowY = overflowTuple[overflowTuple.length > 1 ? 1 : 0];\n\t            this.overflowWrap = parse(context, overflowWrap, declaration.overflowWrap);\n\t            this.paddingTop = parse(context, paddingTop, declaration.paddingTop);\n\t            this.paddingRight = parse(context, paddingRight, declaration.paddingRight);\n\t            this.paddingBottom = parse(context, paddingBottom, declaration.paddingBottom);\n\t            this.paddingLeft = parse(context, paddingLeft, declaration.paddingLeft);\n\t            this.paintOrder = parse(context, paintOrder, declaration.paintOrder);\n\t            this.position = parse(context, position, declaration.position);\n\t            this.textAlign = parse(context, textAlign, declaration.textAlign);\n\t            this.textDecorationColor = parse(context, textDecorationColor, (_a = declaration.textDecorationColor) !== null && _a !== void 0 ? _a : declaration.color);\n\t            this.textDecorationLine = parse(context, textDecorationLine, (_b = declaration.textDecorationLine) !== null && _b !== void 0 ? _b : declaration.textDecoration);\n\t            this.textShadow = parse(context, textShadow, declaration.textShadow);\n\t            this.textTransform = parse(context, textTransform, declaration.textTransform);\n\t            this.transform = parse(context, transform$1, declaration.transform);\n\t            this.transformOrigin = parse(context, transformOrigin, declaration.transformOrigin);\n\t            this.visibility = parse(context, visibility, declaration.visibility);\n\t            this.webkitTextStrokeColor = parse(context, webkitTextStrokeColor, declaration.webkitTextStrokeColor);\n\t            this.webkitTextStrokeWidth = parse(context, webkitTextStrokeWidth, declaration.webkitTextStrokeWidth);\n\t            this.wordBreak = parse(context, wordBreak, declaration.wordBreak);\n\t            this.zIndex = parse(context, zIndex, declaration.zIndex);\n\t        }\n\t        CSSParsedDeclaration.prototype.isVisible = function () {\n\t            return this.display > 0 && this.opacity > 0 && this.visibility === 0 /* VISIBLE */;\n\t        };\n\t        CSSParsedDeclaration.prototype.isTransparent = function () {\n\t            return isTransparent(this.backgroundColor);\n\t        };\n\t        CSSParsedDeclaration.prototype.isTransformed = function () {\n\t            return this.transform !== null;\n\t        };\n\t        CSSParsedDeclaration.prototype.isPositioned = function () {\n\t            return this.position !== 0 /* STATIC */;\n\t        };\n\t        CSSParsedDeclaration.prototype.isPositionedWithZIndex = function () {\n\t            return this.isPositioned() && !this.zIndex.auto;\n\t        };\n\t        CSSParsedDeclaration.prototype.isFloating = function () {\n\t            return this.float !== 0 /* NONE */;\n\t        };\n\t        CSSParsedDeclaration.prototype.isInlineLevel = function () {\n\t            return (contains(this.display, 4 /* INLINE */) ||\n\t                contains(this.display, 33554432 /* INLINE_BLOCK */) ||\n\t                contains(this.display, 268435456 /* INLINE_FLEX */) ||\n\t                contains(this.display, 536870912 /* INLINE_GRID */) ||\n\t                contains(this.display, 67108864 /* INLINE_LIST_ITEM */) ||\n\t                contains(this.display, 134217728 /* INLINE_TABLE */));\n\t        };\n\t        return CSSParsedDeclaration;\n\t    }());\n\t    var CSSParsedPseudoDeclaration = /** @class */ (function () {\n\t        function CSSParsedPseudoDeclaration(context, declaration) {\n\t            this.content = parse(context, content, declaration.content);\n\t            this.quotes = parse(context, quotes, declaration.quotes);\n\t        }\n\t        return CSSParsedPseudoDeclaration;\n\t    }());\n\t    var CSSParsedCounterDeclaration = /** @class */ (function () {\n\t        function CSSParsedCounterDeclaration(context, declaration) {\n\t            this.counterIncrement = parse(context, counterIncrement, declaration.counterIncrement);\n\t            this.counterReset = parse(context, counterReset, declaration.counterReset);\n\t        }\n\t        return CSSParsedCounterDeclaration;\n\t    }());\n\t    // eslint-disable-next-line @typescript-eslint/no-explicit-any\n\t    var parse = function (context, descriptor, style) {\n\t        var tokenizer = new Tokenizer();\n\t        var value = style !== null && typeof style !== 'undefined' ? style.toString() : descriptor.initialValue;\n\t        tokenizer.write(value);\n\t        var parser = new Parser(tokenizer.read());\n\t        switch (descriptor.type) {\n\t            case 2 /* IDENT_VALUE */:\n\t                var token = parser.parseComponentValue();\n\t                return descriptor.parse(context, isIdentToken(token) ? token.value : descriptor.initialValue);\n\t            case 0 /* VALUE */:\n\t                return descriptor.parse(context, parser.parseComponentValue());\n\t            case 1 /* LIST */:\n\t                return descriptor.parse(context, parser.parseComponentValues());\n\t            case 4 /* TOKEN_VALUE */:\n\t                return parser.parseComponentValue();\n\t            case 3 /* TYPE_VALUE */:\n\t                switch (descriptor.format) {\n\t                    case 'angle':\n\t                        return angle.parse(context, parser.parseComponentValue());\n\t                    case 'color':\n\t                        return color$1.parse(context, parser.parseComponentValue());\n\t                    case 'image':\n\t                        return image.parse(context, parser.parseComponentValue());\n\t                    case 'length':\n\t                        var length_1 = parser.parseComponentValue();\n\t                        return isLength(length_1) ? length_1 : ZERO_LENGTH;\n\t                    case 'length-percentage':\n\t                        var value_1 = parser.parseComponentValue();\n\t                        return isLengthPercentage(value_1) ? value_1 : ZERO_LENGTH;\n\t                    case 'time':\n\t                        return time.parse(context, parser.parseComponentValue());\n\t                }\n\t                break;\n\t        }\n\t    };\n\n\t    var elementDebuggerAttribute = 'data-html2canvas-debug';\n\t    var getElementDebugType = function (element) {\n\t        var attribute = element.getAttribute(elementDebuggerAttribute);\n\t        switch (attribute) {\n\t            case 'all':\n\t                return 1 /* ALL */;\n\t            case 'clone':\n\t                return 2 /* CLONE */;\n\t            case 'parse':\n\t                return 3 /* PARSE */;\n\t            case 'render':\n\t                return 4 /* RENDER */;\n\t            default:\n\t                return 0 /* NONE */;\n\t        }\n\t    };\n\t    var isDebugging = function (element, type) {\n\t        var elementType = getElementDebugType(element);\n\t        return elementType === 1 /* ALL */ || type === elementType;\n\t    };\n\n\t    var ElementContainer = /** @class */ (function () {\n\t        function ElementContainer(context, element) {\n\t            this.context = context;\n\t            this.textNodes = [];\n\t            this.elements = [];\n\t            this.flags = 0;\n\t            if (isDebugging(element, 3 /* PARSE */)) {\n\t                debugger;\n\t            }\n\t            this.styles = new CSSParsedDeclaration(context, window.getComputedStyle(element, null));\n\t            if (isHTMLElementNode(element)) {\n\t                if (this.styles.animationDuration.some(function (duration) { return duration > 0; })) {\n\t                    element.style.animationDuration = '0s';\n\t                }\n\t                if (this.styles.transform !== null) {\n\t                    // getBoundingClientRect takes transforms into account\n\t                    element.style.transform = 'none';\n\t                }\n\t            }\n\t            this.bounds = parseBounds(this.context, element);\n\t            if (isDebugging(element, 4 /* RENDER */)) {\n\t                this.flags |= 16 /* DEBUG_RENDER */;\n\t            }\n\t        }\n\t        return ElementContainer;\n\t    }());\n\n\t    /*\n\t     * text-segmentation 1.0.3 <https://github.com/niklasvh/text-segmentation>\n\t     * Copyright (c) 2022 Niklas von Hertzen <https://hertzen.com>\n\t     * Released under MIT License\n\t     */\n\t    var base64 = 'AAAAAAAAAAAAEA4AGBkAAFAaAAACAAAAAAAIABAAGAAwADgACAAQAAgAEAAIABAACAAQAAgAEAAIABAACAAQAAgAEAAIABAAQABIAEQATAAIABAACAAQAAgAEAAIABAAVABcAAgAEAAIABAACAAQAGAAaABwAHgAgACIAI4AlgAIABAAmwCjAKgAsAC2AL4AvQDFAMoA0gBPAVYBWgEIAAgACACMANoAYgFkAWwBdAF8AX0BhQGNAZUBlgGeAaMBlQGWAasBswF8AbsBwwF0AcsBYwHTAQgA2wG/AOMBdAF8AekB8QF0AfkB+wHiAHQBfAEIAAMC5gQIAAsCEgIIAAgAFgIeAggAIgIpAggAMQI5AkACygEIAAgASAJQAlgCYAIIAAgACAAKBQoFCgUTBRMFGQUrBSsFCAAIAAgACAAIAAgACAAIAAgACABdAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABoAmgCrwGvAQgAbgJ2AggAHgEIAAgACADnAXsCCAAIAAgAgwIIAAgACAAIAAgACACKAggAkQKZAggAPADJAAgAoQKkAqwCsgK6AsICCADJAggA0AIIAAgACAAIANYC3gIIAAgACAAIAAgACABAAOYCCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAkASoB+QIEAAgACAA8AEMCCABCBQgACABJBVAFCAAIAAgACAAIAAgACAAIAAgACABTBVoFCAAIAFoFCABfBWUFCAAIAAgACAAIAAgAbQUIAAgACAAIAAgACABzBXsFfQWFBYoFigWKBZEFigWKBYoFmAWfBaYFrgWxBbkFCAAIAAgACAAIAAgACAAIAAgACAAIAMEFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAMgFCADQBQgACAAIAAgACAAIAAgACAAIAAgACAAIAO4CCAAIAAgAiQAIAAgACABAAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAD0AggACAD8AggACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIANYFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAMDvwAIAAgAJAIIAAgACAAIAAgACAAIAAgACwMTAwgACAB9BOsEGwMjAwgAKwMyAwsFYgE3A/MEPwMIAEUDTQNRAwgAWQOsAGEDCAAIAAgACAAIAAgACABpAzQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFIQUoBSwFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABtAwgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABMAEwACAAIAAgACAAIABgACAAIAAgACAC/AAgACAAyAQgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACACAAIAAwAAgACAAIAAgACAAIAAgACAAIAAAARABIAAgACAAIABQASAAIAAgAIABwAEAAjgCIABsAqAC2AL0AigDQAtwC+IJIQqVAZUBWQqVAZUBlQGVAZUBlQGrC5UBlQGVAZUBlQGVAZUBlQGVAXsKlQGVAbAK6wsrDGUMpQzlDJUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAfAKAAuZA64AtwCJALoC6ADwAAgAuACgA/oEpgO6AqsD+AAIAAgAswMIAAgACAAIAIkAuwP5AfsBwwPLAwgACAAIAAgACADRA9kDCAAIAOED6QMIAAgACAAIAAgACADuA/YDCAAIAP4DyQAIAAgABgQIAAgAXQAOBAgACAAIAAgACAAIABMECAAIAAgACAAIAAgACAD8AAQBCAAIAAgAGgQiBCoECAExBAgAEAEIAAgACAAIAAgACAAIAAgACAAIAAgACAA4BAgACABABEYECAAIAAgATAQYAQgAVAQIAAgACAAIAAgACAAIAAgACAAIAFoECAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAOQEIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAB+BAcACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAEABhgSMBAgACAAIAAgAlAQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAwAEAAQABAADAAMAAwADAAQABAAEAAQABAAEAAQABHATAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAdQMIAAgACAAIAAgACAAIAMkACAAIAAgAfQMIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACACFA4kDCAAIAAgACAAIAOcBCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAIcDCAAIAAgACAAIAAgACAAIAAgACAAIAJEDCAAIAAgACADFAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABgBAgAZgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAbAQCBXIECAAIAHkECAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABAAJwEQACjBKoEsgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAC6BMIECAAIAAgACAAIAAgACABmBAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAxwQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAGYECAAIAAgAzgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAigWKBYoFigWKBYoFigWKBd0FXwUIAOIF6gXxBYoF3gT5BQAGCAaKBYoFigWKBYoFigWKBYoFigWKBYoFigXWBIoFigWKBYoFigWKBYoFigWKBYsFEAaKBYoFigWKBYoFigWKBRQGCACKBYoFigWKBQgACAAIANEECAAIABgGigUgBggAJgYIAC4GMwaKBYoF0wQ3Bj4GigWKBYoFigWKBYoFigWKBYoFigWKBYoFigUIAAgACAAIAAgACAAIAAgAigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWLBf///////wQABAAEAAQABAAEAAQABAAEAAQAAwAEAAQAAgAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAQADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAUAAAAFAAUAAAAFAAUAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUAAQAAAAUABQAFAAUABQAFAAAAAAAFAAUAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAFAAUAAQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUABQAFAAAABwAHAAcAAAAHAAcABwAFAAEAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAcABwAFAAUAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAAAAQABAAAAAAAAAAAAAAAFAAUABQAFAAAABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABwAHAAcAAAAHAAcAAAAAAAUABQAHAAUAAQAHAAEABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABwABAAUABQAFAAUAAAAAAAAAAAAAAAEAAQABAAEAAQABAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABQANAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAEAAQABAAEAAQABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAABQAHAAUABQAFAAAAAAAAAAcABQAFAAUABQAFAAQABAAEAAQABAAEAAQABAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUAAAAFAAUABQAFAAUAAAAFAAUABQAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAAAAAAAAAAAAUABQAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAUAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABwAHAAcABwAFAAcABwAAAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAUABwAHAAUABQAFAAUAAAAAAAcABwAAAAAABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAABQAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAABwAHAAcABQAFAAAAAAAAAAAABQAFAAAAAAAFAAUABQAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAFAAUABQAFAAUAAAAFAAUABwAAAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAFAAUABwAFAAUABQAFAAAAAAAHAAcAAAAAAAcABwAFAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABwAAAAAAAAAHAAcABwAAAAcABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAABQAHAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAcABwAAAAUABQAFAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABQAHAAcABQAHAAcAAAAFAAcABwAAAAcABwAFAAUAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAFAAcABwAFAAUABQAAAAUAAAAHAAcABwAHAAcABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAHAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAABwAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAUAAAAFAAAAAAAAAAAABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUABQAFAAUAAAAFAAUAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABwAFAAUABQAFAAUABQAAAAUABQAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABQAFAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABQAFAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAHAAUABQAFAAUABQAFAAUABwAHAAcABwAHAAcABwAHAAUABwAHAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABwAHAAcABwAFAAUABwAHAAcAAAAAAAAAAAAHAAcABQAHAAcABwAHAAcABwAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAHAAUABQAFAAUABQAFAAUAAAAFAAAABQAAAAAABQAFAAUABQAFAAUABQAFAAcABwAHAAcABwAHAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAUABQAFAAUABQAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABwAFAAcABwAHAAcABwAFAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAUABQAFAAUABwAHAAUABQAHAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABQAFAAcABwAHAAUABwAFAAUABQAHAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAUABQAFAAUABQAFAAUABQAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAcABQAFAAUABQAFAAUABQAAAAAAAAAAAAUAAAAAAAAAAAAAAAAABQAAAAAABwAFAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUAAAAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAABQAAAAAAAAAFAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAUABQAHAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAHAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABwAFAAUABQAFAAcABwAFAAUABwAHAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAcABwAFAAUABwAHAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAFAAUABQAAAAAABQAFAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAFAAcABwAAAAAAAAAAAAAABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAFAAcABwAFAAcABwAAAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAFAAUABQAAAAUABQAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABwAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABQAFAAUABQAFAAUABQAFAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAHAAcABQAHAAUABQAAAAAAAAAAAAAAAAAFAAAABwAHAAcABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAcABwAAAAAABwAHAAAAAAAHAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABwAHAAUABQAFAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABQAFAAUABQAFAAUABwAFAAcABwAFAAcABQAFAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABQAFAAUABQAAAAAABwAHAAcABwAFAAUABwAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAHAAUABQAFAAUABQAFAAUABQAHAAcABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAFAAcABwAFAAUABQAFAAUABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAcABwAFAAUABQAFAAcABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABQAHAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAAAAAAFAAUABwAHAAcABwAFAAAAAAAAAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABwAHAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAHAAUABQAFAAUABQAFAAUABwAFAAUABwAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAAAAAAAABQAAAAUABQAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAHAAcAAAAFAAUAAAAHAAcABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAAAAAAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAUABQAFAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAABQAFAAUABQAFAAUABQAAAAUABQAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAFAAUABQAFAAUADgAOAA4ADgAOAA4ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAAAAAAAAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAMAAwADAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAAAAAAAAAAAAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAAAAAAAAAAAAsADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwACwAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAADgAOAA4AAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAAAA4ADgAOAA4ADgAOAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAA4AAAAOAAAAAAAAAAAAAAAAAA4AAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAADgAAAAAAAAAAAA4AAAAOAAAAAAAAAAAADgAOAA4AAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4AAAAAAA4ADgAOAA4ADgAOAA4ADgAOAAAADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4AAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAOAA4ADgAOAA4ADgAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAAAAAAA=';\n\n\t    /*\n\t     * utrie 1.0.2 <https://github.com/niklasvh/utrie>\n\t     * Copyright (c) 2022 Niklas von Hertzen <https://hertzen.com>\n\t     * Released under MIT License\n\t     */\n\t    var chars$1 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';\n\t    // Use a lookup table to find the index.\n\t    var lookup$1 = typeof Uint8Array === 'undefined' ? [] : new Uint8Array(256);\n\t    for (var i$1 = 0; i$1 < chars$1.length; i$1++) {\n\t        lookup$1[chars$1.charCodeAt(i$1)] = i$1;\n\t    }\n\t    var decode = function (base64) {\n\t        var bufferLength = base64.length * 0.75, len = base64.length, i, p = 0, encoded1, encoded2, encoded3, encoded4;\n\t        if (base64[base64.length - 1] === '=') {\n\t            bufferLength--;\n\t            if (base64[base64.length - 2] === '=') {\n\t                bufferLength--;\n\t            }\n\t        }\n\t        var buffer = typeof ArrayBuffer !== 'undefined' &&\n\t            typeof Uint8Array !== 'undefined' &&\n\t            typeof Uint8Array.prototype.slice !== 'undefined'\n\t            ? new ArrayBuffer(bufferLength)\n\t            : new Array(bufferLength);\n\t        var bytes = Array.isArray(buffer) ? buffer : new Uint8Array(buffer);\n\t        for (i = 0; i < len; i += 4) {\n\t            encoded1 = lookup$1[base64.charCodeAt(i)];\n\t            encoded2 = lookup$1[base64.charCodeAt(i + 1)];\n\t            encoded3 = lookup$1[base64.charCodeAt(i + 2)];\n\t            encoded4 = lookup$1[base64.charCodeAt(i + 3)];\n\t            bytes[p++] = (encoded1 << 2) | (encoded2 >> 4);\n\t            bytes[p++] = ((encoded2 & 15) << 4) | (encoded3 >> 2);\n\t            bytes[p++] = ((encoded3 & 3) << 6) | (encoded4 & 63);\n\t        }\n\t        return buffer;\n\t    };\n\t    var polyUint16Array = function (buffer) {\n\t        var length = buffer.length;\n\t        var bytes = [];\n\t        for (var i = 0; i < length; i += 2) {\n\t            bytes.push((buffer[i + 1] << 8) | buffer[i]);\n\t        }\n\t        return bytes;\n\t    };\n\t    var polyUint32Array = function (buffer) {\n\t        var length = buffer.length;\n\t        var bytes = [];\n\t        for (var i = 0; i < length; i += 4) {\n\t            bytes.push((buffer[i + 3] << 24) | (buffer[i + 2] << 16) | (buffer[i + 1] << 8) | buffer[i]);\n\t        }\n\t        return bytes;\n\t    };\n\n\t    /** Shift size for getting the index-2 table offset. */\n\t    var UTRIE2_SHIFT_2 = 5;\n\t    /** Shift size for getting the index-1 table offset. */\n\t    var UTRIE2_SHIFT_1 = 6 + 5;\n\t    /**\n\t     * Shift size for shifting left the index array values.\n\t     * Increases possible data size with 16-bit index values at the cost\n\t     * of compactability.\n\t     * This requires data blocks to be aligned by UTRIE2_DATA_GRANULARITY.\n\t     */\n\t    var UTRIE2_INDEX_SHIFT = 2;\n\t    /**\n\t     * Difference between the two shift sizes,\n\t     * for getting an index-1 offset from an index-2 offset. 6=11-5\n\t     */\n\t    var UTRIE2_SHIFT_1_2 = UTRIE2_SHIFT_1 - UTRIE2_SHIFT_2;\n\t    /**\n\t     * The part of the index-2 table for U+D800..U+DBFF stores values for\n\t     * lead surrogate code _units_ not code _points_.\n\t     * Values for lead surrogate code _points_ are indexed with this portion of the table.\n\t     * Length=32=0x20=0x400>>UTRIE2_SHIFT_2. (There are 1024=0x400 lead surrogates.)\n\t     */\n\t    var UTRIE2_LSCP_INDEX_2_OFFSET = 0x10000 >> UTRIE2_SHIFT_2;\n\t    /** Number of entries in a data block. 32=0x20 */\n\t    var UTRIE2_DATA_BLOCK_LENGTH = 1 << UTRIE2_SHIFT_2;\n\t    /** Mask for getting the lower bits for the in-data-block offset. */\n\t    var UTRIE2_DATA_MASK = UTRIE2_DATA_BLOCK_LENGTH - 1;\n\t    var UTRIE2_LSCP_INDEX_2_LENGTH = 0x400 >> UTRIE2_SHIFT_2;\n\t    /** Count the lengths of both BMP pieces. 2080=0x820 */\n\t    var UTRIE2_INDEX_2_BMP_LENGTH = UTRIE2_LSCP_INDEX_2_OFFSET + UTRIE2_LSCP_INDEX_2_LENGTH;\n\t    /**\n\t     * The 2-byte UTF-8 version of the index-2 table follows at offset 2080=0x820.\n\t     * Length 32=0x20 for lead bytes C0..DF, regardless of UTRIE2_SHIFT_2.\n\t     */\n\t    var UTRIE2_UTF8_2B_INDEX_2_OFFSET = UTRIE2_INDEX_2_BMP_LENGTH;\n\t    var UTRIE2_UTF8_2B_INDEX_2_LENGTH = 0x800 >> 6; /* U+0800 is the first code point after 2-byte UTF-8 */\n\t    /**\n\t     * The index-1 table, only used for supplementary code points, at offset 2112=0x840.\n\t     * Variable length, for code points up to highStart, where the last single-value range starts.\n\t     * Maximum length 512=0x200=0x100000>>UTRIE2_SHIFT_1.\n\t     * (For 0x100000 supplementary code points U+10000..U+10ffff.)\n\t     *\n\t     * The part of the index-2 table for supplementary code points starts\n\t     * after this index-1 table.\n\t     *\n\t     * Both the index-1 table and the following part of the index-2 table\n\t     * are omitted completely if there is only BMP data.\n\t     */\n\t    var UTRIE2_INDEX_1_OFFSET = UTRIE2_UTF8_2B_INDEX_2_OFFSET + UTRIE2_UTF8_2B_INDEX_2_LENGTH;\n\t    /**\n\t     * Number of index-1 entries for the BMP. 32=0x20\n\t     * This part of the index-1 table is omitted from the serialized form.\n\t     */\n\t    var UTRIE2_OMITTED_BMP_INDEX_1_LENGTH = 0x10000 >> UTRIE2_SHIFT_1;\n\t    /** Number of entries in an index-2 block. 64=0x40 */\n\t    var UTRIE2_INDEX_2_BLOCK_LENGTH = 1 << UTRIE2_SHIFT_1_2;\n\t    /** Mask for getting the lower bits for the in-index-2-block offset. */\n\t    var UTRIE2_INDEX_2_MASK = UTRIE2_INDEX_2_BLOCK_LENGTH - 1;\n\t    var slice16 = function (view, start, end) {\n\t        if (view.slice) {\n\t            return view.slice(start, end);\n\t        }\n\t        return new Uint16Array(Array.prototype.slice.call(view, start, end));\n\t    };\n\t    var slice32 = function (view, start, end) {\n\t        if (view.slice) {\n\t            return view.slice(start, end);\n\t        }\n\t        return new Uint32Array(Array.prototype.slice.call(view, start, end));\n\t    };\n\t    var createTrieFromBase64 = function (base64, _byteLength) {\n\t        var buffer = decode(base64);\n\t        var view32 = Array.isArray(buffer) ? polyUint32Array(buffer) : new Uint32Array(buffer);\n\t        var view16 = Array.isArray(buffer) ? polyUint16Array(buffer) : new Uint16Array(buffer);\n\t        var headerLength = 24;\n\t        var index = slice16(view16, headerLength / 2, view32[4] / 2);\n\t        var data = view32[5] === 2\n\t            ? slice16(view16, (headerLength + view32[4]) / 2)\n\t            : slice32(view32, Math.ceil((headerLength + view32[4]) / 4));\n\t        return new Trie(view32[0], view32[1], view32[2], view32[3], index, data);\n\t    };\n\t    var Trie = /** @class */ (function () {\n\t        function Trie(initialValue, errorValue, highStart, highValueIndex, index, data) {\n\t            this.initialValue = initialValue;\n\t            this.errorValue = errorValue;\n\t            this.highStart = highStart;\n\t            this.highValueIndex = highValueIndex;\n\t            this.index = index;\n\t            this.data = data;\n\t        }\n\t        /**\n\t         * Get the value for a code point as stored in the Trie.\n\t         *\n\t         * @param codePoint the code point\n\t         * @return the value\n\t         */\n\t        Trie.prototype.get = function (codePoint) {\n\t            var ix;\n\t            if (codePoint >= 0) {\n\t                if (codePoint < 0x0d800 || (codePoint > 0x0dbff && codePoint <= 0x0ffff)) {\n\t                    // Ordinary BMP code point, excluding leading surrogates.\n\t                    // BMP uses a single level lookup.  BMP index starts at offset 0 in the Trie2 index.\n\t                    // 16 bit data is stored in the index array itself.\n\t                    ix = this.index[codePoint >> UTRIE2_SHIFT_2];\n\t                    ix = (ix << UTRIE2_INDEX_SHIFT) + (codePoint & UTRIE2_DATA_MASK);\n\t                    return this.data[ix];\n\t                }\n\t                if (codePoint <= 0xffff) {\n\t                    // Lead Surrogate Code Point.  A Separate index section is stored for\n\t                    // lead surrogate code units and code points.\n\t                    //   The main index has the code unit data.\n\t                    //   For this function, we need the code point data.\n\t                    // Note: this expression could be refactored for slightly improved efficiency, but\n\t                    //       surrogate code points will be so rare in practice that it's not worth it.\n\t                    ix = this.index[UTRIE2_LSCP_INDEX_2_OFFSET + ((codePoint - 0xd800) >> UTRIE2_SHIFT_2)];\n\t                    ix = (ix << UTRIE2_INDEX_SHIFT) + (codePoint & UTRIE2_DATA_MASK);\n\t                    return this.data[ix];\n\t                }\n\t                if (codePoint < this.highStart) {\n\t                    // Supplemental code point, use two-level lookup.\n\t                    ix = UTRIE2_INDEX_1_OFFSET - UTRIE2_OMITTED_BMP_INDEX_1_LENGTH + (codePoint >> UTRIE2_SHIFT_1);\n\t                    ix = this.index[ix];\n\t                    ix += (codePoint >> UTRIE2_SHIFT_2) & UTRIE2_INDEX_2_MASK;\n\t                    ix = this.index[ix];\n\t                    ix = (ix << UTRIE2_INDEX_SHIFT) + (codePoint & UTRIE2_DATA_MASK);\n\t                    return this.data[ix];\n\t                }\n\t                if (codePoint <= 0x10ffff) {\n\t                    return this.data[this.highValueIndex];\n\t                }\n\t            }\n\t            // Fall through.  The code point is outside of the legal range of 0..0x10ffff.\n\t            return this.errorValue;\n\t        };\n\t        return Trie;\n\t    }());\n\n\t    /*\n\t     * base64-arraybuffer 1.0.2 <https://github.com/niklasvh/base64-arraybuffer>\n\t     * Copyright (c) 2022 Niklas von Hertzen <https://hertzen.com>\n\t     * Released under MIT License\n\t     */\n\t    var chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';\n\t    // Use a lookup table to find the index.\n\t    var lookup = typeof Uint8Array === 'undefined' ? [] : new Uint8Array(256);\n\t    for (var i = 0; i < chars.length; i++) {\n\t        lookup[chars.charCodeAt(i)] = i;\n\t    }\n\n\t    var Prepend = 1;\n\t    var CR = 2;\n\t    var LF = 3;\n\t    var Control = 4;\n\t    var Extend = 5;\n\t    var SpacingMark = 7;\n\t    var L = 8;\n\t    var V = 9;\n\t    var T = 10;\n\t    var LV = 11;\n\t    var LVT = 12;\n\t    var ZWJ = 13;\n\t    var Extended_Pictographic = 14;\n\t    var RI = 15;\n\t    var toCodePoints = function (str) {\n\t        var codePoints = [];\n\t        var i = 0;\n\t        var length = str.length;\n\t        while (i < length) {\n\t            var value = str.charCodeAt(i++);\n\t            if (value >= 0xd800 && value <= 0xdbff && i < length) {\n\t                var extra = str.charCodeAt(i++);\n\t                if ((extra & 0xfc00) === 0xdc00) {\n\t                    codePoints.push(((value & 0x3ff) << 10) + (extra & 0x3ff) + 0x10000);\n\t                }\n\t                else {\n\t                    codePoints.push(value);\n\t                    i--;\n\t                }\n\t            }\n\t            else {\n\t                codePoints.push(value);\n\t            }\n\t        }\n\t        return codePoints;\n\t    };\n\t    var fromCodePoint = function () {\n\t        var codePoints = [];\n\t        for (var _i = 0; _i < arguments.length; _i++) {\n\t            codePoints[_i] = arguments[_i];\n\t        }\n\t        if (String.fromCodePoint) {\n\t            return String.fromCodePoint.apply(String, codePoints);\n\t        }\n\t        var length = codePoints.length;\n\t        if (!length) {\n\t            return '';\n\t        }\n\t        var codeUnits = [];\n\t        var index = -1;\n\t        var result = '';\n\t        while (++index < length) {\n\t            var codePoint = codePoints[index];\n\t            if (codePoint <= 0xffff) {\n\t                codeUnits.push(codePoint);\n\t            }\n\t            else {\n\t                codePoint -= 0x10000;\n\t                codeUnits.push((codePoint >> 10) + 0xd800, (codePoint % 0x400) + 0xdc00);\n\t            }\n\t            if (index + 1 === length || codeUnits.length > 0x4000) {\n\t                result += String.fromCharCode.apply(String, codeUnits);\n\t                codeUnits.length = 0;\n\t            }\n\t        }\n\t        return result;\n\t    };\n\t    var UnicodeTrie = createTrieFromBase64(base64);\n\t    var BREAK_NOT_ALLOWED = '×';\n\t    var BREAK_ALLOWED = '÷';\n\t    var codePointToClass = function (codePoint) { return UnicodeTrie.get(codePoint); };\n\t    var _graphemeBreakAtIndex = function (_codePoints, classTypes, index) {\n\t        var prevIndex = index - 2;\n\t        var prev = classTypes[prevIndex];\n\t        var current = classTypes[index - 1];\n\t        var next = classTypes[index];\n\t        // GB3 Do not break between a CR and LF\n\t        if (current === CR && next === LF) {\n\t            return BREAK_NOT_ALLOWED;\n\t        }\n\t        // GB4 Otherwise, break before and after controls.\n\t        if (current === CR || current === LF || current === Control) {\n\t            return BREAK_ALLOWED;\n\t        }\n\t        // GB5\n\t        if (next === CR || next === LF || next === Control) {\n\t            return BREAK_ALLOWED;\n\t        }\n\t        // Do not break Hangul syllable sequences.\n\t        // GB6\n\t        if (current === L && [L, V, LV, LVT].indexOf(next) !== -1) {\n\t            return BREAK_NOT_ALLOWED;\n\t        }\n\t        // GB7\n\t        if ((current === LV || current === V) && (next === V || next === T)) {\n\t            return BREAK_NOT_ALLOWED;\n\t        }\n\t        // GB8\n\t        if ((current === LVT || current === T) && next === T) {\n\t            return BREAK_NOT_ALLOWED;\n\t        }\n\t        // GB9 Do not break before extending characters or ZWJ.\n\t        if (next === ZWJ || next === Extend) {\n\t            return BREAK_NOT_ALLOWED;\n\t        }\n\t        // Do not break before SpacingMarks, or after Prepend characters.\n\t        // GB9a\n\t        if (next === SpacingMark) {\n\t            return BREAK_NOT_ALLOWED;\n\t        }\n\t        // GB9a\n\t        if (current === Prepend) {\n\t            return BREAK_NOT_ALLOWED;\n\t        }\n\t        // GB11 Do not break within emoji modifier sequences or emoji zwj sequences.\n\t        if (current === ZWJ && next === Extended_Pictographic) {\n\t            while (prev === Extend) {\n\t                prev = classTypes[--prevIndex];\n\t            }\n\t            if (prev === Extended_Pictographic) {\n\t                return BREAK_NOT_ALLOWED;\n\t            }\n\t        }\n\t        // GB12 Do not break within emoji flag sequences.\n\t        // That is, do not break between regional indicator (RI) symbols\n\t        // if there is an odd number of RI characters before the break point.\n\t        if (current === RI && next === RI) {\n\t            var countRI = 0;\n\t            while (prev === RI) {\n\t                countRI++;\n\t                prev = classTypes[--prevIndex];\n\t            }\n\t            if (countRI % 2 === 0) {\n\t                return BREAK_NOT_ALLOWED;\n\t            }\n\t        }\n\t        return BREAK_ALLOWED;\n\t    };\n\t    var GraphemeBreaker = function (str) {\n\t        var codePoints = toCodePoints(str);\n\t        var length = codePoints.length;\n\t        var index = 0;\n\t        var lastEnd = 0;\n\t        var classTypes = codePoints.map(codePointToClass);\n\t        return {\n\t            next: function () {\n\t                if (index >= length) {\n\t                    return { done: true, value: null };\n\t                }\n\t                var graphemeBreak = BREAK_NOT_ALLOWED;\n\t                while (index < length &&\n\t                    (graphemeBreak = _graphemeBreakAtIndex(codePoints, classTypes, ++index)) === BREAK_NOT_ALLOWED) { }\n\t                if (graphemeBreak !== BREAK_NOT_ALLOWED || index === length) {\n\t                    var value = fromCodePoint.apply(null, codePoints.slice(lastEnd, index));\n\t                    lastEnd = index;\n\t                    return { value: value, done: false };\n\t                }\n\t                return { done: true, value: null };\n\t            },\n\t        };\n\t    };\n\t    var splitGraphemes = function (str) {\n\t        var breaker = GraphemeBreaker(str);\n\t        var graphemes = [];\n\t        var bk;\n\t        while (!(bk = breaker.next()).done) {\n\t            if (bk.value) {\n\t                graphemes.push(bk.value.slice());\n\t            }\n\t        }\n\t        return graphemes;\n\t    };\n\n\t    var testRangeBounds = function (document) {\n\t        var TEST_HEIGHT = 123;\n\t        if (document.createRange) {\n\t            var range = document.createRange();\n\t            if (range.getBoundingClientRect) {\n\t                var testElement = document.createElement('boundtest');\n\t                testElement.style.height = TEST_HEIGHT + \"px\";\n\t                testElement.style.display = 'block';\n\t                document.body.appendChild(testElement);\n\t                range.selectNode(testElement);\n\t                var rangeBounds = range.getBoundingClientRect();\n\t                var rangeHeight = Math.round(rangeBounds.height);\n\t                document.body.removeChild(testElement);\n\t                if (rangeHeight === TEST_HEIGHT) {\n\t                    return true;\n\t                }\n\t            }\n\t        }\n\t        return false;\n\t    };\n\t    var testIOSLineBreak = function (document) {\n\t        var testElement = document.createElement('boundtest');\n\t        testElement.style.width = '50px';\n\t        testElement.style.display = 'block';\n\t        testElement.style.fontSize = '12px';\n\t        testElement.style.letterSpacing = '0px';\n\t        testElement.style.wordSpacing = '0px';\n\t        document.body.appendChild(testElement);\n\t        var range = document.createRange();\n\t        testElement.innerHTML = typeof ''.repeat === 'function' ? '&#128104;'.repeat(10) : '';\n\t        var node = testElement.firstChild;\n\t        var textList = toCodePoints$1(node.data).map(function (i) { return fromCodePoint$1(i); });\n\t        var offset = 0;\n\t        var prev = {};\n\t        // ios 13 does not handle range getBoundingClientRect line changes correctly #2177\n\t        var supports = textList.every(function (text, i) {\n\t            range.setStart(node, offset);\n\t            range.setEnd(node, offset + text.length);\n\t            var rect = range.getBoundingClientRect();\n\t            offset += text.length;\n\t            var boundAhead = rect.x > prev.x || rect.y > prev.y;\n\t            prev = rect;\n\t            if (i === 0) {\n\t                return true;\n\t            }\n\t            return boundAhead;\n\t        });\n\t        document.body.removeChild(testElement);\n\t        return supports;\n\t    };\n\t    var testCORS = function () { return typeof new Image().crossOrigin !== 'undefined'; };\n\t    var testResponseType = function () { return typeof new XMLHttpRequest().responseType === 'string'; };\n\t    var testSVG = function (document) {\n\t        var img = new Image();\n\t        var canvas = document.createElement('canvas');\n\t        var ctx = canvas.getContext('2d');\n\t        if (!ctx) {\n\t            return false;\n\t        }\n\t        img.src = \"data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg'></svg>\";\n\t        try {\n\t            ctx.drawImage(img, 0, 0);\n\t            canvas.toDataURL();\n\t        }\n\t        catch (e) {\n\t            return false;\n\t        }\n\t        return true;\n\t    };\n\t    var isGreenPixel = function (data) {\n\t        return data[0] === 0 && data[1] === 255 && data[2] === 0 && data[3] === 255;\n\t    };\n\t    var testForeignObject = function (document) {\n\t        var canvas = document.createElement('canvas');\n\t        var size = 100;\n\t        canvas.width = size;\n\t        canvas.height = size;\n\t        var ctx = canvas.getContext('2d');\n\t        if (!ctx) {\n\t            return Promise.reject(false);\n\t        }\n\t        ctx.fillStyle = 'rgb(0, 255, 0)';\n\t        ctx.fillRect(0, 0, size, size);\n\t        var img = new Image();\n\t        var greenImageSrc = canvas.toDataURL();\n\t        img.src = greenImageSrc;\n\t        var svg = createForeignObjectSVG(size, size, 0, 0, img);\n\t        ctx.fillStyle = 'red';\n\t        ctx.fillRect(0, 0, size, size);\n\t        return loadSerializedSVG$1(svg)\n\t            .then(function (img) {\n\t            ctx.drawImage(img, 0, 0);\n\t            var data = ctx.getImageData(0, 0, size, size).data;\n\t            ctx.fillStyle = 'red';\n\t            ctx.fillRect(0, 0, size, size);\n\t            var node = document.createElement('div');\n\t            node.style.backgroundImage = \"url(\" + greenImageSrc + \")\";\n\t            node.style.height = size + \"px\";\n\t            // Firefox 55 does not render inline <img /> tags\n\t            return isGreenPixel(data)\n\t                ? loadSerializedSVG$1(createForeignObjectSVG(size, size, 0, 0, node))\n\t                : Promise.reject(false);\n\t        })\n\t            .then(function (img) {\n\t            ctx.drawImage(img, 0, 0);\n\t            // Edge does not render background-images\n\t            return isGreenPixel(ctx.getImageData(0, 0, size, size).data);\n\t        })\n\t            .catch(function () { return false; });\n\t    };\n\t    var createForeignObjectSVG = function (width, height, x, y, node) {\n\t        var xmlns = 'http://www.w3.org/2000/svg';\n\t        var svg = document.createElementNS(xmlns, 'svg');\n\t        var foreignObject = document.createElementNS(xmlns, 'foreignObject');\n\t        svg.setAttributeNS(null, 'width', width.toString());\n\t        svg.setAttributeNS(null, 'height', height.toString());\n\t        foreignObject.setAttributeNS(null, 'width', '100%');\n\t        foreignObject.setAttributeNS(null, 'height', '100%');\n\t        foreignObject.setAttributeNS(null, 'x', x.toString());\n\t        foreignObject.setAttributeNS(null, 'y', y.toString());\n\t        foreignObject.setAttributeNS(null, 'externalResourcesRequired', 'true');\n\t        svg.appendChild(foreignObject);\n\t        foreignObject.appendChild(node);\n\t        return svg;\n\t    };\n\t    var loadSerializedSVG$1 = function (svg) {\n\t        return new Promise(function (resolve, reject) {\n\t            var img = new Image();\n\t            img.onload = function () { return resolve(img); };\n\t            img.onerror = reject;\n\t            img.src = \"data:image/svg+xml;charset=utf-8,\" + encodeURIComponent(new XMLSerializer().serializeToString(svg));\n\t        });\n\t    };\n\t    var FEATURES = {\n\t        get SUPPORT_RANGE_BOUNDS() {\n\t            var value = testRangeBounds(document);\n\t            Object.defineProperty(FEATURES, 'SUPPORT_RANGE_BOUNDS', { value: value });\n\t            return value;\n\t        },\n\t        get SUPPORT_WORD_BREAKING() {\n\t            var value = FEATURES.SUPPORT_RANGE_BOUNDS && testIOSLineBreak(document);\n\t            Object.defineProperty(FEATURES, 'SUPPORT_WORD_BREAKING', { value: value });\n\t            return value;\n\t        },\n\t        get SUPPORT_SVG_DRAWING() {\n\t            var value = testSVG(document);\n\t            Object.defineProperty(FEATURES, 'SUPPORT_SVG_DRAWING', { value: value });\n\t            return value;\n\t        },\n\t        get SUPPORT_FOREIGNOBJECT_DRAWING() {\n\t            var value = typeof Array.from === 'function' && typeof window.fetch === 'function'\n\t                ? testForeignObject(document)\n\t                : Promise.resolve(false);\n\t            Object.defineProperty(FEATURES, 'SUPPORT_FOREIGNOBJECT_DRAWING', { value: value });\n\t            return value;\n\t        },\n\t        get SUPPORT_CORS_IMAGES() {\n\t            var value = testCORS();\n\t            Object.defineProperty(FEATURES, 'SUPPORT_CORS_IMAGES', { value: value });\n\t            return value;\n\t        },\n\t        get SUPPORT_RESPONSE_TYPE() {\n\t            var value = testResponseType();\n\t            Object.defineProperty(FEATURES, 'SUPPORT_RESPONSE_TYPE', { value: value });\n\t            return value;\n\t        },\n\t        get SUPPORT_CORS_XHR() {\n\t            var value = 'withCredentials' in new XMLHttpRequest();\n\t            Object.defineProperty(FEATURES, 'SUPPORT_CORS_XHR', { value: value });\n\t            return value;\n\t        },\n\t        get SUPPORT_NATIVE_TEXT_SEGMENTATION() {\n\t            // eslint-disable-next-line @typescript-eslint/no-explicit-any\n\t            var value = !!(typeof Intl !== 'undefined' && Intl.Segmenter);\n\t            Object.defineProperty(FEATURES, 'SUPPORT_NATIVE_TEXT_SEGMENTATION', { value: value });\n\t            return value;\n\t        }\n\t    };\n\n\t    var TextBounds = /** @class */ (function () {\n\t        function TextBounds(text, bounds) {\n\t            this.text = text;\n\t            this.bounds = bounds;\n\t        }\n\t        return TextBounds;\n\t    }());\n\t    var parseTextBounds = function (context, value, styles, node) {\n\t        var textList = breakText(value, styles);\n\t        var textBounds = [];\n\t        var offset = 0;\n\t        textList.forEach(function (text) {\n\t            if (styles.textDecorationLine.length || text.trim().length > 0) {\n\t                if (FEATURES.SUPPORT_RANGE_BOUNDS) {\n\t                    var clientRects = createRange(node, offset, text.length).getClientRects();\n\t                    if (clientRects.length > 1) {\n\t                        var subSegments = segmentGraphemes(text);\n\t                        var subOffset_1 = 0;\n\t                        subSegments.forEach(function (subSegment) {\n\t                            textBounds.push(new TextBounds(subSegment, Bounds.fromDOMRectList(context, createRange(node, subOffset_1 + offset, subSegment.length).getClientRects())));\n\t                            subOffset_1 += subSegment.length;\n\t                        });\n\t                    }\n\t                    else {\n\t                        textBounds.push(new TextBounds(text, Bounds.fromDOMRectList(context, clientRects)));\n\t                    }\n\t                }\n\t                else {\n\t                    var replacementNode = node.splitText(text.length);\n\t                    textBounds.push(new TextBounds(text, getWrapperBounds(context, node)));\n\t                    node = replacementNode;\n\t                }\n\t            }\n\t            else if (!FEATURES.SUPPORT_RANGE_BOUNDS) {\n\t                node = node.splitText(text.length);\n\t            }\n\t            offset += text.length;\n\t        });\n\t        return textBounds;\n\t    };\n\t    var getWrapperBounds = function (context, node) {\n\t        var ownerDocument = node.ownerDocument;\n\t        if (ownerDocument) {\n\t            var wrapper = ownerDocument.createElement('html2canvaswrapper');\n\t            wrapper.appendChild(node.cloneNode(true));\n\t            var parentNode = node.parentNode;\n\t            if (parentNode) {\n\t                parentNode.replaceChild(wrapper, node);\n\t                var bounds = parseBounds(context, wrapper);\n\t                if (wrapper.firstChild) {\n\t                    parentNode.replaceChild(wrapper.firstChild, wrapper);\n\t                }\n\t                return bounds;\n\t            }\n\t        }\n\t        return Bounds.EMPTY;\n\t    };\n\t    var createRange = function (node, offset, length) {\n\t        var ownerDocument = node.ownerDocument;\n\t        if (!ownerDocument) {\n\t            throw new Error('Node has no owner document');\n\t        }\n\t        var range = ownerDocument.createRange();\n\t        range.setStart(node, offset);\n\t        range.setEnd(node, offset + length);\n\t        return range;\n\t    };\n\t    var segmentGraphemes = function (value) {\n\t        if (FEATURES.SUPPORT_NATIVE_TEXT_SEGMENTATION) {\n\t            // eslint-disable-next-line @typescript-eslint/no-explicit-any\n\t            var segmenter = new Intl.Segmenter(void 0, { granularity: 'grapheme' });\n\t            // eslint-disable-next-line @typescript-eslint/no-explicit-any\n\t            return Array.from(segmenter.segment(value)).map(function (segment) { return segment.segment; });\n\t        }\n\t        return splitGraphemes(value);\n\t    };\n\t    var segmentWords = function (value, styles) {\n\t        if (FEATURES.SUPPORT_NATIVE_TEXT_SEGMENTATION) {\n\t            // eslint-disable-next-line @typescript-eslint/no-explicit-any\n\t            var segmenter = new Intl.Segmenter(void 0, {\n\t                granularity: 'word'\n\t            });\n\t            // eslint-disable-next-line @typescript-eslint/no-explicit-any\n\t            return Array.from(segmenter.segment(value)).map(function (segment) { return segment.segment; });\n\t        }\n\t        return breakWords(value, styles);\n\t    };\n\t    var breakText = function (value, styles) {\n\t        return styles.letterSpacing !== 0 ? segmentGraphemes(value) : segmentWords(value, styles);\n\t    };\n\t    // https://drafts.csswg.org/css-text/#word-separator\n\t    var wordSeparators = [0x0020, 0x00a0, 0x1361, 0x10100, 0x10101, 0x1039, 0x1091];\n\t    var breakWords = function (str, styles) {\n\t        var breaker = LineBreaker(str, {\n\t            lineBreak: styles.lineBreak,\n\t            wordBreak: styles.overflowWrap === \"break-word\" /* BREAK_WORD */ ? 'break-word' : styles.wordBreak\n\t        });\n\t        var words = [];\n\t        var bk;\n\t        var _loop_1 = function () {\n\t            if (bk.value) {\n\t                var value = bk.value.slice();\n\t                var codePoints = toCodePoints$1(value);\n\t                var word_1 = '';\n\t                codePoints.forEach(function (codePoint) {\n\t                    if (wordSeparators.indexOf(codePoint) === -1) {\n\t                        word_1 += fromCodePoint$1(codePoint);\n\t                    }\n\t                    else {\n\t                        if (word_1.length) {\n\t                            words.push(word_1);\n\t                        }\n\t                        words.push(fromCodePoint$1(codePoint));\n\t                        word_1 = '';\n\t                    }\n\t                });\n\t                if (word_1.length) {\n\t                    words.push(word_1);\n\t                }\n\t            }\n\t        };\n\t        while (!(bk = breaker.next()).done) {\n\t            _loop_1();\n\t        }\n\t        return words;\n\t    };\n\n\t    var TextContainer = /** @class */ (function () {\n\t        function TextContainer(context, node, styles) {\n\t            this.text = transform(node.data, styles.textTransform);\n\t            this.textBounds = parseTextBounds(context, this.text, styles, node);\n\t        }\n\t        return TextContainer;\n\t    }());\n\t    var transform = function (text, transform) {\n\t        switch (transform) {\n\t            case 1 /* LOWERCASE */:\n\t                return text.toLowerCase();\n\t            case 3 /* CAPITALIZE */:\n\t                return text.replace(CAPITALIZE, capitalize);\n\t            case 2 /* UPPERCASE */:\n\t                return text.toUpperCase();\n\t            default:\n\t                return text;\n\t        }\n\t    };\n\t    var CAPITALIZE = /(^|\\s|:|-|\\(|\\))([a-z])/g;\n\t    var capitalize = function (m, p1, p2) {\n\t        if (m.length > 0) {\n\t            return p1 + p2.toUpperCase();\n\t        }\n\t        return m;\n\t    };\n\n\t    var ImageElementContainer = /** @class */ (function (_super) {\n\t        __extends(ImageElementContainer, _super);\n\t        function ImageElementContainer(context, img) {\n\t            var _this = _super.call(this, context, img) || this;\n\t            _this.src = img.currentSrc || img.src;\n\t            _this.intrinsicWidth = img.naturalWidth;\n\t            _this.intrinsicHeight = img.naturalHeight;\n\t            _this.context.cache.addImage(_this.src);\n\t            return _this;\n\t        }\n\t        return ImageElementContainer;\n\t    }(ElementContainer));\n\n\t    var CanvasElementContainer = /** @class */ (function (_super) {\n\t        __extends(CanvasElementContainer, _super);\n\t        function CanvasElementContainer(context, canvas) {\n\t            var _this = _super.call(this, context, canvas) || this;\n\t            _this.canvas = canvas;\n\t            _this.intrinsicWidth = canvas.width;\n\t            _this.intrinsicHeight = canvas.height;\n\t            return _this;\n\t        }\n\t        return CanvasElementContainer;\n\t    }(ElementContainer));\n\n\t    var SVGElementContainer = /** @class */ (function (_super) {\n\t        __extends(SVGElementContainer, _super);\n\t        function SVGElementContainer(context, img) {\n\t            var _this = _super.call(this, context, img) || this;\n\t            var s = new XMLSerializer();\n\t            var bounds = parseBounds(context, img);\n\t            img.setAttribute('width', bounds.width + \"px\");\n\t            img.setAttribute('height', bounds.height + \"px\");\n\t            _this.svg = \"data:image/svg+xml,\" + encodeURIComponent(s.serializeToString(img));\n\t            _this.intrinsicWidth = img.width.baseVal.value;\n\t            _this.intrinsicHeight = img.height.baseVal.value;\n\t            _this.context.cache.addImage(_this.svg);\n\t            return _this;\n\t        }\n\t        return SVGElementContainer;\n\t    }(ElementContainer));\n\n\t    var LIElementContainer = /** @class */ (function (_super) {\n\t        __extends(LIElementContainer, _super);\n\t        function LIElementContainer(context, element) {\n\t            var _this = _super.call(this, context, element) || this;\n\t            _this.value = element.value;\n\t            return _this;\n\t        }\n\t        return LIElementContainer;\n\t    }(ElementContainer));\n\n\t    var OLElementContainer = /** @class */ (function (_super) {\n\t        __extends(OLElementContainer, _super);\n\t        function OLElementContainer(context, element) {\n\t            var _this = _super.call(this, context, element) || this;\n\t            _this.start = element.start;\n\t            _this.reversed = typeof element.reversed === 'boolean' && element.reversed === true;\n\t            return _this;\n\t        }\n\t        return OLElementContainer;\n\t    }(ElementContainer));\n\n\t    var CHECKBOX_BORDER_RADIUS = [\n\t        {\n\t            type: 15 /* DIMENSION_TOKEN */,\n\t            flags: 0,\n\t            unit: 'px',\n\t            number: 3\n\t        }\n\t    ];\n\t    var RADIO_BORDER_RADIUS = [\n\t        {\n\t            type: 16 /* PERCENTAGE_TOKEN */,\n\t            flags: 0,\n\t            number: 50\n\t        }\n\t    ];\n\t    var reformatInputBounds = function (bounds) {\n\t        if (bounds.width > bounds.height) {\n\t            return new Bounds(bounds.left + (bounds.width - bounds.height) / 2, bounds.top, bounds.height, bounds.height);\n\t        }\n\t        else if (bounds.width < bounds.height) {\n\t            return new Bounds(bounds.left, bounds.top + (bounds.height - bounds.width) / 2, bounds.width, bounds.width);\n\t        }\n\t        return bounds;\n\t    };\n\t    var getInputValue = function (node) {\n\t        var value = node.type === PASSWORD ? new Array(node.value.length + 1).join('\\u2022') : node.value;\n\t        return value.length === 0 ? node.placeholder || '' : value;\n\t    };\n\t    var CHECKBOX = 'checkbox';\n\t    var RADIO = 'radio';\n\t    var PASSWORD = 'password';\n\t    var INPUT_COLOR = 0x2a2a2aff;\n\t    var InputElementContainer = /** @class */ (function (_super) {\n\t        __extends(InputElementContainer, _super);\n\t        function InputElementContainer(context, input) {\n\t            var _this = _super.call(this, context, input) || this;\n\t            _this.type = input.type.toLowerCase();\n\t            _this.checked = input.checked;\n\t            _this.value = getInputValue(input);\n\t            if (_this.type === CHECKBOX || _this.type === RADIO) {\n\t                _this.styles.backgroundColor = 0xdededeff;\n\t                _this.styles.borderTopColor =\n\t                    _this.styles.borderRightColor =\n\t                        _this.styles.borderBottomColor =\n\t                            _this.styles.borderLeftColor =\n\t                                0xa5a5a5ff;\n\t                _this.styles.borderTopWidth =\n\t                    _this.styles.borderRightWidth =\n\t                        _this.styles.borderBottomWidth =\n\t                            _this.styles.borderLeftWidth =\n\t                                1;\n\t                _this.styles.borderTopStyle =\n\t                    _this.styles.borderRightStyle =\n\t                        _this.styles.borderBottomStyle =\n\t                            _this.styles.borderLeftStyle =\n\t                                1 /* SOLID */;\n\t                _this.styles.backgroundClip = [0 /* BORDER_BOX */];\n\t                _this.styles.backgroundOrigin = [0 /* BORDER_BOX */];\n\t                _this.bounds = reformatInputBounds(_this.bounds);\n\t            }\n\t            switch (_this.type) {\n\t                case CHECKBOX:\n\t                    _this.styles.borderTopRightRadius =\n\t                        _this.styles.borderTopLeftRadius =\n\t                            _this.styles.borderBottomRightRadius =\n\t                                _this.styles.borderBottomLeftRadius =\n\t                                    CHECKBOX_BORDER_RADIUS;\n\t                    break;\n\t                case RADIO:\n\t                    _this.styles.borderTopRightRadius =\n\t                        _this.styles.borderTopLeftRadius =\n\t                            _this.styles.borderBottomRightRadius =\n\t                                _this.styles.borderBottomLeftRadius =\n\t                                    RADIO_BORDER_RADIUS;\n\t                    break;\n\t            }\n\t            return _this;\n\t        }\n\t        return InputElementContainer;\n\t    }(ElementContainer));\n\n\t    var SelectElementContainer = /** @class */ (function (_super) {\n\t        __extends(SelectElementContainer, _super);\n\t        function SelectElementContainer(context, element) {\n\t            var _this = _super.call(this, context, element) || this;\n\t            var option = element.options[element.selectedIndex || 0];\n\t            _this.value = option ? option.text || '' : '';\n\t            return _this;\n\t        }\n\t        return SelectElementContainer;\n\t    }(ElementContainer));\n\n\t    var TextareaElementContainer = /** @class */ (function (_super) {\n\t        __extends(TextareaElementContainer, _super);\n\t        function TextareaElementContainer(context, element) {\n\t            var _this = _super.call(this, context, element) || this;\n\t            _this.value = element.value;\n\t            return _this;\n\t        }\n\t        return TextareaElementContainer;\n\t    }(ElementContainer));\n\n\t    var IFrameElementContainer = /** @class */ (function (_super) {\n\t        __extends(IFrameElementContainer, _super);\n\t        function IFrameElementContainer(context, iframe) {\n\t            var _this = _super.call(this, context, iframe) || this;\n\t            _this.src = iframe.src;\n\t            _this.width = parseInt(iframe.width, 10) || 0;\n\t            _this.height = parseInt(iframe.height, 10) || 0;\n\t            _this.backgroundColor = _this.styles.backgroundColor;\n\t            try {\n\t                if (iframe.contentWindow &&\n\t                    iframe.contentWindow.document &&\n\t                    iframe.contentWindow.document.documentElement) {\n\t                    _this.tree = parseTree(context, iframe.contentWindow.document.documentElement);\n\t                    // http://www.w3.org/TR/css3-background/#special-backgrounds\n\t                    var documentBackgroundColor = iframe.contentWindow.document.documentElement\n\t                        ? parseColor(context, getComputedStyle(iframe.contentWindow.document.documentElement).backgroundColor)\n\t                        : COLORS.TRANSPARENT;\n\t                    var bodyBackgroundColor = iframe.contentWindow.document.body\n\t                        ? parseColor(context, getComputedStyle(iframe.contentWindow.document.body).backgroundColor)\n\t                        : COLORS.TRANSPARENT;\n\t                    _this.backgroundColor = isTransparent(documentBackgroundColor)\n\t                        ? isTransparent(bodyBackgroundColor)\n\t                            ? _this.styles.backgroundColor\n\t                            : bodyBackgroundColor\n\t                        : documentBackgroundColor;\n\t                }\n\t            }\n\t            catch (e) { }\n\t            return _this;\n\t        }\n\t        return IFrameElementContainer;\n\t    }(ElementContainer));\n\n\t    var LIST_OWNERS = ['OL', 'UL', 'MENU'];\n\t    var parseNodeTree = function (context, node, parent, root) {\n\t        for (var childNode = node.firstChild, nextNode = void 0; childNode; childNode = nextNode) {\n\t            nextNode = childNode.nextSibling;\n\t            if (isTextNode(childNode) && childNode.data.trim().length > 0) {\n\t                parent.textNodes.push(new TextContainer(context, childNode, parent.styles));\n\t            }\n\t            else if (isElementNode(childNode)) {\n\t                if (isSlotElement(childNode) && childNode.assignedNodes) {\n\t                    childNode.assignedNodes().forEach(function (childNode) { return parseNodeTree(context, childNode, parent, root); });\n\t                }\n\t                else {\n\t                    var container = createContainer(context, childNode);\n\t                    if (container.styles.isVisible()) {\n\t                        if (createsRealStackingContext(childNode, container, root)) {\n\t                            container.flags |= 4 /* CREATES_REAL_STACKING_CONTEXT */;\n\t                        }\n\t                        else if (createsStackingContext(container.styles)) {\n\t                            container.flags |= 2 /* CREATES_STACKING_CONTEXT */;\n\t                        }\n\t                        if (LIST_OWNERS.indexOf(childNode.tagName) !== -1) {\n\t                            container.flags |= 8 /* IS_LIST_OWNER */;\n\t                        }\n\t                        parent.elements.push(container);\n\t                        childNode.slot;\n\t                        if (childNode.shadowRoot) {\n\t                            parseNodeTree(context, childNode.shadowRoot, container, root);\n\t                        }\n\t                        else if (!isTextareaElement(childNode) &&\n\t                            !isSVGElement(childNode) &&\n\t                            !isSelectElement(childNode)) {\n\t                            parseNodeTree(context, childNode, container, root);\n\t                        }\n\t                    }\n\t                }\n\t            }\n\t        }\n\t    };\n\t    var createContainer = function (context, element) {\n\t        if (isImageElement(element)) {\n\t            return new ImageElementContainer(context, element);\n\t        }\n\t        if (isCanvasElement(element)) {\n\t            return new CanvasElementContainer(context, element);\n\t        }\n\t        if (isSVGElement(element)) {\n\t            return new SVGElementContainer(context, element);\n\t        }\n\t        if (isLIElement(element)) {\n\t            return new LIElementContainer(context, element);\n\t        }\n\t        if (isOLElement(element)) {\n\t            return new OLElementContainer(context, element);\n\t        }\n\t        if (isInputElement(element)) {\n\t            return new InputElementContainer(context, element);\n\t        }\n\t        if (isSelectElement(element)) {\n\t            return new SelectElementContainer(context, element);\n\t        }\n\t        if (isTextareaElement(element)) {\n\t            return new TextareaElementContainer(context, element);\n\t        }\n\t        if (isIFrameElement(element)) {\n\t            return new IFrameElementContainer(context, element);\n\t        }\n\t        return new ElementContainer(context, element);\n\t    };\n\t    var parseTree = function (context, element) {\n\t        var container = createContainer(context, element);\n\t        container.flags |= 4 /* CREATES_REAL_STACKING_CONTEXT */;\n\t        parseNodeTree(context, element, container, container);\n\t        return container;\n\t    };\n\t    var createsRealStackingContext = function (node, container, root) {\n\t        return (container.styles.isPositionedWithZIndex() ||\n\t            container.styles.opacity < 1 ||\n\t            container.styles.isTransformed() ||\n\t            (isBodyElement(node) && root.styles.isTransparent()));\n\t    };\n\t    var createsStackingContext = function (styles) { return styles.isPositioned() || styles.isFloating(); };\n\t    var isTextNode = function (node) { return node.nodeType === Node.TEXT_NODE; };\n\t    var isElementNode = function (node) { return node.nodeType === Node.ELEMENT_NODE; };\n\t    var isHTMLElementNode = function (node) {\n\t        return isElementNode(node) && typeof node.style !== 'undefined' && !isSVGElementNode(node);\n\t    };\n\t    var isSVGElementNode = function (element) {\n\t        return typeof element.className === 'object';\n\t    };\n\t    var isLIElement = function (node) { return node.tagName === 'LI'; };\n\t    var isOLElement = function (node) { return node.tagName === 'OL'; };\n\t    var isInputElement = function (node) { return node.tagName === 'INPUT'; };\n\t    var isHTMLElement = function (node) { return node.tagName === 'HTML'; };\n\t    var isSVGElement = function (node) { return node.tagName === 'svg'; };\n\t    var isBodyElement = function (node) { return node.tagName === 'BODY'; };\n\t    var isCanvasElement = function (node) { return node.tagName === 'CANVAS'; };\n\t    var isVideoElement = function (node) { return node.tagName === 'VIDEO'; };\n\t    var isImageElement = function (node) { return node.tagName === 'IMG'; };\n\t    var isIFrameElement = function (node) { return node.tagName === 'IFRAME'; };\n\t    var isStyleElement = function (node) { return node.tagName === 'STYLE'; };\n\t    var isScriptElement = function (node) { return node.tagName === 'SCRIPT'; };\n\t    var isTextareaElement = function (node) { return node.tagName === 'TEXTAREA'; };\n\t    var isSelectElement = function (node) { return node.tagName === 'SELECT'; };\n\t    var isSlotElement = function (node) { return node.tagName === 'SLOT'; };\n\t    // https://html.spec.whatwg.org/multipage/custom-elements.html#valid-custom-element-name\n\t    var isCustomElement = function (node) { return node.tagName.indexOf('-') > 0; };\n\n\t    var CounterState = /** @class */ (function () {\n\t        function CounterState() {\n\t            this.counters = {};\n\t        }\n\t        CounterState.prototype.getCounterValue = function (name) {\n\t            var counter = this.counters[name];\n\t            if (counter && counter.length) {\n\t                return counter[counter.length - 1];\n\t            }\n\t            return 1;\n\t        };\n\t        CounterState.prototype.getCounterValues = function (name) {\n\t            var counter = this.counters[name];\n\t            return counter ? counter : [];\n\t        };\n\t        CounterState.prototype.pop = function (counters) {\n\t            var _this = this;\n\t            counters.forEach(function (counter) { return _this.counters[counter].pop(); });\n\t        };\n\t        CounterState.prototype.parse = function (style) {\n\t            var _this = this;\n\t            var counterIncrement = style.counterIncrement;\n\t            var counterReset = style.counterReset;\n\t            var canReset = true;\n\t            if (counterIncrement !== null) {\n\t                counterIncrement.forEach(function (entry) {\n\t                    var counter = _this.counters[entry.counter];\n\t                    if (counter && entry.increment !== 0) {\n\t                        canReset = false;\n\t                        if (!counter.length) {\n\t                            counter.push(1);\n\t                        }\n\t                        counter[Math.max(0, counter.length - 1)] += entry.increment;\n\t                    }\n\t                });\n\t            }\n\t            var counterNames = [];\n\t            if (canReset) {\n\t                counterReset.forEach(function (entry) {\n\t                    var counter = _this.counters[entry.counter];\n\t                    counterNames.push(entry.counter);\n\t                    if (!counter) {\n\t                        counter = _this.counters[entry.counter] = [];\n\t                    }\n\t                    counter.push(entry.reset);\n\t                });\n\t            }\n\t            return counterNames;\n\t        };\n\t        return CounterState;\n\t    }());\n\t    var ROMAN_UPPER = {\n\t        integers: [1000, 900, 500, 400, 100, 90, 50, 40, 10, 9, 5, 4, 1],\n\t        values: ['M', 'CM', 'D', 'CD', 'C', 'XC', 'L', 'XL', 'X', 'IX', 'V', 'IV', 'I']\n\t    };\n\t    var ARMENIAN = {\n\t        integers: [\n\t            9000, 8000, 7000, 6000, 5000, 4000, 3000, 2000, 1000, 900, 800, 700, 600, 500, 400, 300, 200, 100, 90, 80, 70,\n\t            60, 50, 40, 30, 20, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1\n\t        ],\n\t        values: [\n\t            'Ք',\n\t            'Փ',\n\t            'Ւ',\n\t            'Ց',\n\t            'Ր',\n\t            'Տ',\n\t            'Վ',\n\t            'Ս',\n\t            'Ռ',\n\t            'Ջ',\n\t            'Պ',\n\t            'Չ',\n\t            'Ո',\n\t            'Շ',\n\t            'Ն',\n\t            'Յ',\n\t            'Մ',\n\t            'Ճ',\n\t            'Ղ',\n\t            'Ձ',\n\t            'Հ',\n\t            'Կ',\n\t            'Ծ',\n\t            'Խ',\n\t            'Լ',\n\t            'Ի',\n\t            'Ժ',\n\t            'Թ',\n\t            'Ը',\n\t            'Է',\n\t            'Զ',\n\t            'Ե',\n\t            'Դ',\n\t            'Գ',\n\t            'Բ',\n\t            'Ա'\n\t        ]\n\t    };\n\t    var HEBREW = {\n\t        integers: [\n\t            10000, 9000, 8000, 7000, 6000, 5000, 4000, 3000, 2000, 1000, 400, 300, 200, 100, 90, 80, 70, 60, 50, 40, 30, 20,\n\t            19, 18, 17, 16, 15, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1\n\t        ],\n\t        values: [\n\t            'י׳',\n\t            'ט׳',\n\t            'ח׳',\n\t            'ז׳',\n\t            'ו׳',\n\t            'ה׳',\n\t            'ד׳',\n\t            'ג׳',\n\t            'ב׳',\n\t            'א׳',\n\t            'ת',\n\t            'ש',\n\t            'ר',\n\t            'ק',\n\t            'צ',\n\t            'פ',\n\t            'ע',\n\t            'ס',\n\t            'נ',\n\t            'מ',\n\t            'ל',\n\t            'כ',\n\t            'יט',\n\t            'יח',\n\t            'יז',\n\t            'טז',\n\t            'טו',\n\t            'י',\n\t            'ט',\n\t            'ח',\n\t            'ז',\n\t            'ו',\n\t            'ה',\n\t            'ד',\n\t            'ג',\n\t            'ב',\n\t            'א'\n\t        ]\n\t    };\n\t    var GEORGIAN = {\n\t        integers: [\n\t            10000, 9000, 8000, 7000, 6000, 5000, 4000, 3000, 2000, 1000, 900, 800, 700, 600, 500, 400, 300, 200, 100, 90,\n\t            80, 70, 60, 50, 40, 30, 20, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1\n\t        ],\n\t        values: [\n\t            'ჵ',\n\t            'ჰ',\n\t            'ჯ',\n\t            'ჴ',\n\t            'ხ',\n\t            'ჭ',\n\t            'წ',\n\t            'ძ',\n\t            'ც',\n\t            'ჩ',\n\t            'შ',\n\t            'ყ',\n\t            'ღ',\n\t            'ქ',\n\t            'ფ',\n\t            'ჳ',\n\t            'ტ',\n\t            'ს',\n\t            'რ',\n\t            'ჟ',\n\t            'პ',\n\t            'ო',\n\t            'ჲ',\n\t            'ნ',\n\t            'მ',\n\t            'ლ',\n\t            'კ',\n\t            'ი',\n\t            'თ',\n\t            'ჱ',\n\t            'ზ',\n\t            'ვ',\n\t            'ე',\n\t            'დ',\n\t            'გ',\n\t            'ბ',\n\t            'ა'\n\t        ]\n\t    };\n\t    var createAdditiveCounter = function (value, min, max, symbols, fallback, suffix) {\n\t        if (value < min || value > max) {\n\t            return createCounterText(value, fallback, suffix.length > 0);\n\t        }\n\t        return (symbols.integers.reduce(function (string, integer, index) {\n\t            while (value >= integer) {\n\t                value -= integer;\n\t                string += symbols.values[index];\n\t            }\n\t            return string;\n\t        }, '') + suffix);\n\t    };\n\t    var createCounterStyleWithSymbolResolver = function (value, codePointRangeLength, isNumeric, resolver) {\n\t        var string = '';\n\t        do {\n\t            if (!isNumeric) {\n\t                value--;\n\t            }\n\t            string = resolver(value) + string;\n\t            value /= codePointRangeLength;\n\t        } while (value * codePointRangeLength >= codePointRangeLength);\n\t        return string;\n\t    };\n\t    var createCounterStyleFromRange = function (value, codePointRangeStart, codePointRangeEnd, isNumeric, suffix) {\n\t        var codePointRangeLength = codePointRangeEnd - codePointRangeStart + 1;\n\t        return ((value < 0 ? '-' : '') +\n\t            (createCounterStyleWithSymbolResolver(Math.abs(value), codePointRangeLength, isNumeric, function (codePoint) {\n\t                return fromCodePoint$1(Math.floor(codePoint % codePointRangeLength) + codePointRangeStart);\n\t            }) +\n\t                suffix));\n\t    };\n\t    var createCounterStyleFromSymbols = function (value, symbols, suffix) {\n\t        if (suffix === void 0) { suffix = '. '; }\n\t        var codePointRangeLength = symbols.length;\n\t        return (createCounterStyleWithSymbolResolver(Math.abs(value), codePointRangeLength, false, function (codePoint) { return symbols[Math.floor(codePoint % codePointRangeLength)]; }) + suffix);\n\t    };\n\t    var CJK_ZEROS = 1 << 0;\n\t    var CJK_TEN_COEFFICIENTS = 1 << 1;\n\t    var CJK_TEN_HIGH_COEFFICIENTS = 1 << 2;\n\t    var CJK_HUNDRED_COEFFICIENTS = 1 << 3;\n\t    var createCJKCounter = function (value, numbers, multipliers, negativeSign, suffix, flags) {\n\t        if (value < -9999 || value > 9999) {\n\t            return createCounterText(value, 4 /* CJK_DECIMAL */, suffix.length > 0);\n\t        }\n\t        var tmp = Math.abs(value);\n\t        var string = suffix;\n\t        if (tmp === 0) {\n\t            return numbers[0] + string;\n\t        }\n\t        for (var digit = 0; tmp > 0 && digit <= 4; digit++) {\n\t            var coefficient = tmp % 10;\n\t            if (coefficient === 0 && contains(flags, CJK_ZEROS) && string !== '') {\n\t                string = numbers[coefficient] + string;\n\t            }\n\t            else if (coefficient > 1 ||\n\t                (coefficient === 1 && digit === 0) ||\n\t                (coefficient === 1 && digit === 1 && contains(flags, CJK_TEN_COEFFICIENTS)) ||\n\t                (coefficient === 1 && digit === 1 && contains(flags, CJK_TEN_HIGH_COEFFICIENTS) && value > 100) ||\n\t                (coefficient === 1 && digit > 1 && contains(flags, CJK_HUNDRED_COEFFICIENTS))) {\n\t                string = numbers[coefficient] + (digit > 0 ? multipliers[digit - 1] : '') + string;\n\t            }\n\t            else if (coefficient === 1 && digit > 0) {\n\t                string = multipliers[digit - 1] + string;\n\t            }\n\t            tmp = Math.floor(tmp / 10);\n\t        }\n\t        return (value < 0 ? negativeSign : '') + string;\n\t    };\n\t    var CHINESE_INFORMAL_MULTIPLIERS = '十百千萬';\n\t    var CHINESE_FORMAL_MULTIPLIERS = '拾佰仟萬';\n\t    var JAPANESE_NEGATIVE = 'マイナス';\n\t    var KOREAN_NEGATIVE = '마이너스';\n\t    var createCounterText = function (value, type, appendSuffix) {\n\t        var defaultSuffix = appendSuffix ? '. ' : '';\n\t        var cjkSuffix = appendSuffix ? '、' : '';\n\t        var koreanSuffix = appendSuffix ? ', ' : '';\n\t        var spaceSuffix = appendSuffix ? ' ' : '';\n\t        switch (type) {\n\t            case 0 /* DISC */:\n\t                return '•' + spaceSuffix;\n\t            case 1 /* CIRCLE */:\n\t                return '◦' + spaceSuffix;\n\t            case 2 /* SQUARE */:\n\t                return '◾' + spaceSuffix;\n\t            case 5 /* DECIMAL_LEADING_ZERO */:\n\t                var string = createCounterStyleFromRange(value, 48, 57, true, defaultSuffix);\n\t                return string.length < 4 ? \"0\" + string : string;\n\t            case 4 /* CJK_DECIMAL */:\n\t                return createCounterStyleFromSymbols(value, '〇一二三四五六七八九', cjkSuffix);\n\t            case 6 /* LOWER_ROMAN */:\n\t                return createAdditiveCounter(value, 1, 3999, ROMAN_UPPER, 3 /* DECIMAL */, defaultSuffix).toLowerCase();\n\t            case 7 /* UPPER_ROMAN */:\n\t                return createAdditiveCounter(value, 1, 3999, ROMAN_UPPER, 3 /* DECIMAL */, defaultSuffix);\n\t            case 8 /* LOWER_GREEK */:\n\t                return createCounterStyleFromRange(value, 945, 969, false, defaultSuffix);\n\t            case 9 /* LOWER_ALPHA */:\n\t                return createCounterStyleFromRange(value, 97, 122, false, defaultSuffix);\n\t            case 10 /* UPPER_ALPHA */:\n\t                return createCounterStyleFromRange(value, 65, 90, false, defaultSuffix);\n\t            case 11 /* ARABIC_INDIC */:\n\t                return createCounterStyleFromRange(value, 1632, 1641, true, defaultSuffix);\n\t            case 12 /* ARMENIAN */:\n\t            case 49 /* UPPER_ARMENIAN */:\n\t                return createAdditiveCounter(value, 1, 9999, ARMENIAN, 3 /* DECIMAL */, defaultSuffix);\n\t            case 35 /* LOWER_ARMENIAN */:\n\t                return createAdditiveCounter(value, 1, 9999, ARMENIAN, 3 /* DECIMAL */, defaultSuffix).toLowerCase();\n\t            case 13 /* BENGALI */:\n\t                return createCounterStyleFromRange(value, 2534, 2543, true, defaultSuffix);\n\t            case 14 /* CAMBODIAN */:\n\t            case 30 /* KHMER */:\n\t                return createCounterStyleFromRange(value, 6112, 6121, true, defaultSuffix);\n\t            case 15 /* CJK_EARTHLY_BRANCH */:\n\t                return createCounterStyleFromSymbols(value, '子丑寅卯辰巳午未申酉戌亥', cjkSuffix);\n\t            case 16 /* CJK_HEAVENLY_STEM */:\n\t                return createCounterStyleFromSymbols(value, '甲乙丙丁戊己庚辛壬癸', cjkSuffix);\n\t            case 17 /* CJK_IDEOGRAPHIC */:\n\t            case 48 /* TRAD_CHINESE_INFORMAL */:\n\t                return createCJKCounter(value, '零一二三四五六七八九', CHINESE_INFORMAL_MULTIPLIERS, '負', cjkSuffix, CJK_TEN_COEFFICIENTS | CJK_TEN_HIGH_COEFFICIENTS | CJK_HUNDRED_COEFFICIENTS);\n\t            case 47 /* TRAD_CHINESE_FORMAL */:\n\t                return createCJKCounter(value, '零壹貳參肆伍陸柒捌玖', CHINESE_FORMAL_MULTIPLIERS, '負', cjkSuffix, CJK_ZEROS | CJK_TEN_COEFFICIENTS | CJK_TEN_HIGH_COEFFICIENTS | CJK_HUNDRED_COEFFICIENTS);\n\t            case 42 /* SIMP_CHINESE_INFORMAL */:\n\t                return createCJKCounter(value, '零一二三四五六七八九', CHINESE_INFORMAL_MULTIPLIERS, '负', cjkSuffix, CJK_TEN_COEFFICIENTS | CJK_TEN_HIGH_COEFFICIENTS | CJK_HUNDRED_COEFFICIENTS);\n\t            case 41 /* SIMP_CHINESE_FORMAL */:\n\t                return createCJKCounter(value, '零壹贰叁肆伍陆柒捌玖', CHINESE_FORMAL_MULTIPLIERS, '负', cjkSuffix, CJK_ZEROS | CJK_TEN_COEFFICIENTS | CJK_TEN_HIGH_COEFFICIENTS | CJK_HUNDRED_COEFFICIENTS);\n\t            case 26 /* JAPANESE_INFORMAL */:\n\t                return createCJKCounter(value, '〇一二三四五六七八九', '十百千万', JAPANESE_NEGATIVE, cjkSuffix, 0);\n\t            case 25 /* JAPANESE_FORMAL */:\n\t                return createCJKCounter(value, '零壱弐参四伍六七八九', '拾百千万', JAPANESE_NEGATIVE, cjkSuffix, CJK_ZEROS | CJK_TEN_COEFFICIENTS | CJK_TEN_HIGH_COEFFICIENTS);\n\t            case 31 /* KOREAN_HANGUL_FORMAL */:\n\t                return createCJKCounter(value, '영일이삼사오육칠팔구', '십백천만', KOREAN_NEGATIVE, koreanSuffix, CJK_ZEROS | CJK_TEN_COEFFICIENTS | CJK_TEN_HIGH_COEFFICIENTS);\n\t            case 33 /* KOREAN_HANJA_INFORMAL */:\n\t                return createCJKCounter(value, '零一二三四五六七八九', '十百千萬', KOREAN_NEGATIVE, koreanSuffix, 0);\n\t            case 32 /* KOREAN_HANJA_FORMAL */:\n\t                return createCJKCounter(value, '零壹貳參四五六七八九', '拾百千', KOREAN_NEGATIVE, koreanSuffix, CJK_ZEROS | CJK_TEN_COEFFICIENTS | CJK_TEN_HIGH_COEFFICIENTS);\n\t            case 18 /* DEVANAGARI */:\n\t                return createCounterStyleFromRange(value, 0x966, 0x96f, true, defaultSuffix);\n\t            case 20 /* GEORGIAN */:\n\t                return createAdditiveCounter(value, 1, 19999, GEORGIAN, 3 /* DECIMAL */, defaultSuffix);\n\t            case 21 /* GUJARATI */:\n\t                return createCounterStyleFromRange(value, 0xae6, 0xaef, true, defaultSuffix);\n\t            case 22 /* GURMUKHI */:\n\t                return createCounterStyleFromRange(value, 0xa66, 0xa6f, true, defaultSuffix);\n\t            case 22 /* HEBREW */:\n\t                return createAdditiveCounter(value, 1, 10999, HEBREW, 3 /* DECIMAL */, defaultSuffix);\n\t            case 23 /* HIRAGANA */:\n\t                return createCounterStyleFromSymbols(value, 'あいうえおかきくけこさしすせそたちつてとなにぬねのはひふへほまみむめもやゆよらりるれろわゐゑをん');\n\t            case 24 /* HIRAGANA_IROHA */:\n\t                return createCounterStyleFromSymbols(value, 'いろはにほへとちりぬるをわかよたれそつねならむうゐのおくやまけふこえてあさきゆめみしゑひもせす');\n\t            case 27 /* KANNADA */:\n\t                return createCounterStyleFromRange(value, 0xce6, 0xcef, true, defaultSuffix);\n\t            case 28 /* KATAKANA */:\n\t                return createCounterStyleFromSymbols(value, 'アイウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワヰヱヲン', cjkSuffix);\n\t            case 29 /* KATAKANA_IROHA */:\n\t                return createCounterStyleFromSymbols(value, 'イロハニホヘトチリヌルヲワカヨタレソツネナラムウヰノオクヤマケフコエテアサキユメミシヱヒモセス', cjkSuffix);\n\t            case 34 /* LAO */:\n\t                return createCounterStyleFromRange(value, 0xed0, 0xed9, true, defaultSuffix);\n\t            case 37 /* MONGOLIAN */:\n\t                return createCounterStyleFromRange(value, 0x1810, 0x1819, true, defaultSuffix);\n\t            case 38 /* MYANMAR */:\n\t                return createCounterStyleFromRange(value, 0x1040, 0x1049, true, defaultSuffix);\n\t            case 39 /* ORIYA */:\n\t                return createCounterStyleFromRange(value, 0xb66, 0xb6f, true, defaultSuffix);\n\t            case 40 /* PERSIAN */:\n\t                return createCounterStyleFromRange(value, 0x6f0, 0x6f9, true, defaultSuffix);\n\t            case 43 /* TAMIL */:\n\t                return createCounterStyleFromRange(value, 0xbe6, 0xbef, true, defaultSuffix);\n\t            case 44 /* TELUGU */:\n\t                return createCounterStyleFromRange(value, 0xc66, 0xc6f, true, defaultSuffix);\n\t            case 45 /* THAI */:\n\t                return createCounterStyleFromRange(value, 0xe50, 0xe59, true, defaultSuffix);\n\t            case 46 /* TIBETAN */:\n\t                return createCounterStyleFromRange(value, 0xf20, 0xf29, true, defaultSuffix);\n\t            case 3 /* DECIMAL */:\n\t            default:\n\t                return createCounterStyleFromRange(value, 48, 57, true, defaultSuffix);\n\t        }\n\t    };\n\n\t    var IGNORE_ATTRIBUTE = 'data-html2canvas-ignore';\n\t    var DocumentCloner = /** @class */ (function () {\n\t        function DocumentCloner(context, element, options) {\n\t            this.context = context;\n\t            this.options = options;\n\t            this.scrolledElements = [];\n\t            this.referenceElement = element;\n\t            this.counters = new CounterState();\n\t            this.quoteDepth = 0;\n\t            if (!element.ownerDocument) {\n\t                throw new Error('Cloned element does not have an owner document');\n\t            }\n\t            this.documentElement = this.cloneNode(element.ownerDocument.documentElement, false);\n\t        }\n\t        DocumentCloner.prototype.toIFrame = function (ownerDocument, windowSize) {\n\t            var _this = this;\n\t            var iframe = createIFrameContainer(ownerDocument, windowSize);\n\t            if (!iframe.contentWindow) {\n\t                return Promise.reject(\"Unable to find iframe window\");\n\t            }\n\t            var scrollX = ownerDocument.defaultView.pageXOffset;\n\t            var scrollY = ownerDocument.defaultView.pageYOffset;\n\t            var cloneWindow = iframe.contentWindow;\n\t            var documentClone = cloneWindow.document;\n\t            /* Chrome doesn't detect relative background-images assigned in inline <style> sheets when fetched through getComputedStyle\n\t             if window url is about:blank, we can assign the url to current by writing onto the document\n\t             */\n\t            var iframeLoad = iframeLoader(iframe).then(function () { return __awaiter(_this, void 0, void 0, function () {\n\t                var onclone, referenceElement;\n\t                return __generator(this, function (_a) {\n\t                    switch (_a.label) {\n\t                        case 0:\n\t                            this.scrolledElements.forEach(restoreNodeScroll);\n\t                            if (cloneWindow) {\n\t                                cloneWindow.scrollTo(windowSize.left, windowSize.top);\n\t                                if (/(iPad|iPhone|iPod)/g.test(navigator.userAgent) &&\n\t                                    (cloneWindow.scrollY !== windowSize.top || cloneWindow.scrollX !== windowSize.left)) {\n\t                                    this.context.logger.warn('Unable to restore scroll position for cloned document');\n\t                                    this.context.windowBounds = this.context.windowBounds.add(cloneWindow.scrollX - windowSize.left, cloneWindow.scrollY - windowSize.top, 0, 0);\n\t                                }\n\t                            }\n\t                            onclone = this.options.onclone;\n\t                            referenceElement = this.clonedReferenceElement;\n\t                            if (typeof referenceElement === 'undefined') {\n\t                                return [2 /*return*/, Promise.reject(\"Error finding the \" + this.referenceElement.nodeName + \" in the cloned document\")];\n\t                            }\n\t                            if (!(documentClone.fonts && documentClone.fonts.ready)) return [3 /*break*/, 2];\n\t                            return [4 /*yield*/, documentClone.fonts.ready];\n\t                        case 1:\n\t                            _a.sent();\n\t                            _a.label = 2;\n\t                        case 2:\n\t                            if (!/(AppleWebKit)/g.test(navigator.userAgent)) return [3 /*break*/, 4];\n\t                            return [4 /*yield*/, imagesReady(documentClone)];\n\t                        case 3:\n\t                            _a.sent();\n\t                            _a.label = 4;\n\t                        case 4:\n\t                            if (typeof onclone === 'function') {\n\t                                return [2 /*return*/, Promise.resolve()\n\t                                        .then(function () { return onclone(documentClone, referenceElement); })\n\t                                        .then(function () { return iframe; })];\n\t                            }\n\t                            return [2 /*return*/, iframe];\n\t                    }\n\t                });\n\t            }); });\n\t            documentClone.open();\n\t            documentClone.write(serializeDoctype(document.doctype) + \"<html></html>\");\n\t            // Chrome scrolls the parent document for some reason after the write to the cloned window???\n\t            restoreOwnerScroll(this.referenceElement.ownerDocument, scrollX, scrollY);\n\t            documentClone.replaceChild(documentClone.adoptNode(this.documentElement), documentClone.documentElement);\n\t            documentClone.close();\n\t            return iframeLoad;\n\t        };\n\t        DocumentCloner.prototype.createElementClone = function (node) {\n\t            if (isDebugging(node, 2 /* CLONE */)) {\n\t                debugger;\n\t            }\n\t            if (isCanvasElement(node)) {\n\t                return this.createCanvasClone(node);\n\t            }\n\t            if (isVideoElement(node)) {\n\t                return this.createVideoClone(node);\n\t            }\n\t            if (isStyleElement(node)) {\n\t                return this.createStyleClone(node);\n\t            }\n\t            var clone = node.cloneNode(false);\n\t            if (isImageElement(clone)) {\n\t                if (isImageElement(node) && node.currentSrc && node.currentSrc !== node.src) {\n\t                    clone.src = node.currentSrc;\n\t                    clone.srcset = '';\n\t                }\n\t                if (clone.loading === 'lazy') {\n\t                    clone.loading = 'eager';\n\t                }\n\t            }\n\t            if (isCustomElement(clone)) {\n\t                return this.createCustomElementClone(clone);\n\t            }\n\t            return clone;\n\t        };\n\t        DocumentCloner.prototype.createCustomElementClone = function (node) {\n\t            var clone = document.createElement('html2canvascustomelement');\n\t            copyCSSStyles(node.style, clone);\n\t            return clone;\n\t        };\n\t        DocumentCloner.prototype.createStyleClone = function (node) {\n\t            try {\n\t                var sheet = node.sheet;\n\t                if (sheet && sheet.cssRules) {\n\t                    var css = [].slice.call(sheet.cssRules, 0).reduce(function (css, rule) {\n\t                        if (rule && typeof rule.cssText === 'string') {\n\t                            return css + rule.cssText;\n\t                        }\n\t                        return css;\n\t                    }, '');\n\t                    var style = node.cloneNode(false);\n\t                    style.textContent = css;\n\t                    return style;\n\t                }\n\t            }\n\t            catch (e) {\n\t                // accessing node.sheet.cssRules throws a DOMException\n\t                this.context.logger.error('Unable to access cssRules property', e);\n\t                if (e.name !== 'SecurityError') {\n\t                    throw e;\n\t                }\n\t            }\n\t            return node.cloneNode(false);\n\t        };\n\t        DocumentCloner.prototype.createCanvasClone = function (canvas) {\n\t            var _a;\n\t            if (this.options.inlineImages && canvas.ownerDocument) {\n\t                var img = canvas.ownerDocument.createElement('img');\n\t                try {\n\t                    img.src = canvas.toDataURL();\n\t                    return img;\n\t                }\n\t                catch (e) {\n\t                    this.context.logger.info(\"Unable to inline canvas contents, canvas is tainted\", canvas);\n\t                }\n\t            }\n\t            var clonedCanvas = canvas.cloneNode(false);\n\t            try {\n\t                clonedCanvas.width = canvas.width;\n\t                clonedCanvas.height = canvas.height;\n\t                var ctx = canvas.getContext('2d');\n\t                var clonedCtx = clonedCanvas.getContext('2d');\n\t                if (clonedCtx) {\n\t                    if (!this.options.allowTaint && ctx) {\n\t                        clonedCtx.putImageData(ctx.getImageData(0, 0, canvas.width, canvas.height), 0, 0);\n\t                    }\n\t                    else {\n\t                        var gl = (_a = canvas.getContext('webgl2')) !== null && _a !== void 0 ? _a : canvas.getContext('webgl');\n\t                        if (gl) {\n\t                            var attribs = gl.getContextAttributes();\n\t                            if ((attribs === null || attribs === void 0 ? void 0 : attribs.preserveDrawingBuffer) === false) {\n\t                                this.context.logger.warn('Unable to clone WebGL context as it has preserveDrawingBuffer=false', canvas);\n\t                            }\n\t                        }\n\t                        clonedCtx.drawImage(canvas, 0, 0);\n\t                    }\n\t                }\n\t                return clonedCanvas;\n\t            }\n\t            catch (e) {\n\t                this.context.logger.info(\"Unable to clone canvas as it is tainted\", canvas);\n\t            }\n\t            return clonedCanvas;\n\t        };\n\t        DocumentCloner.prototype.createVideoClone = function (video) {\n\t            var canvas = video.ownerDocument.createElement('canvas');\n\t            canvas.width = video.offsetWidth;\n\t            canvas.height = video.offsetHeight;\n\t            var ctx = canvas.getContext('2d');\n\t            try {\n\t                if (ctx) {\n\t                    ctx.drawImage(video, 0, 0, canvas.width, canvas.height);\n\t                    if (!this.options.allowTaint) {\n\t                        ctx.getImageData(0, 0, canvas.width, canvas.height);\n\t                    }\n\t                }\n\t                return canvas;\n\t            }\n\t            catch (e) {\n\t                this.context.logger.info(\"Unable to clone video as it is tainted\", video);\n\t            }\n\t            var blankCanvas = video.ownerDocument.createElement('canvas');\n\t            blankCanvas.width = video.offsetWidth;\n\t            blankCanvas.height = video.offsetHeight;\n\t            return blankCanvas;\n\t        };\n\t        DocumentCloner.prototype.appendChildNode = function (clone, child, copyStyles) {\n\t            if (!isElementNode(child) ||\n\t                (!isScriptElement(child) &&\n\t                    !child.hasAttribute(IGNORE_ATTRIBUTE) &&\n\t                    (typeof this.options.ignoreElements !== 'function' || !this.options.ignoreElements(child)))) {\n\t                if (!this.options.copyStyles || !isElementNode(child) || !isStyleElement(child)) {\n\t                    clone.appendChild(this.cloneNode(child, copyStyles));\n\t                }\n\t            }\n\t        };\n\t        DocumentCloner.prototype.cloneChildNodes = function (node, clone, copyStyles) {\n\t            var _this = this;\n\t            for (var child = node.shadowRoot ? node.shadowRoot.firstChild : node.firstChild; child; child = child.nextSibling) {\n\t                if (isElementNode(child) && isSlotElement(child) && typeof child.assignedNodes === 'function') {\n\t                    var assignedNodes = child.assignedNodes();\n\t                    if (assignedNodes.length) {\n\t                        assignedNodes.forEach(function (assignedNode) { return _this.appendChildNode(clone, assignedNode, copyStyles); });\n\t                    }\n\t                }\n\t                else {\n\t                    this.appendChildNode(clone, child, copyStyles);\n\t                }\n\t            }\n\t        };\n\t        DocumentCloner.prototype.cloneNode = function (node, copyStyles) {\n\t            if (isTextNode(node)) {\n\t                return document.createTextNode(node.data);\n\t            }\n\t            if (!node.ownerDocument) {\n\t                return node.cloneNode(false);\n\t            }\n\t            var window = node.ownerDocument.defaultView;\n\t            if (window && isElementNode(node) && (isHTMLElementNode(node) || isSVGElementNode(node))) {\n\t                var clone = this.createElementClone(node);\n\t                clone.style.transitionProperty = 'none';\n\t                var style = window.getComputedStyle(node);\n\t                var styleBefore = window.getComputedStyle(node, ':before');\n\t                var styleAfter = window.getComputedStyle(node, ':after');\n\t                if (this.referenceElement === node && isHTMLElementNode(clone)) {\n\t                    this.clonedReferenceElement = clone;\n\t                }\n\t                if (isBodyElement(clone)) {\n\t                    createPseudoHideStyles(clone);\n\t                }\n\t                var counters = this.counters.parse(new CSSParsedCounterDeclaration(this.context, style));\n\t                var before = this.resolvePseudoContent(node, clone, styleBefore, PseudoElementType.BEFORE);\n\t                if (isCustomElement(node)) {\n\t                    copyStyles = true;\n\t                }\n\t                if (!isVideoElement(node)) {\n\t                    this.cloneChildNodes(node, clone, copyStyles);\n\t                }\n\t                if (before) {\n\t                    clone.insertBefore(before, clone.firstChild);\n\t                }\n\t                var after = this.resolvePseudoContent(node, clone, styleAfter, PseudoElementType.AFTER);\n\t                if (after) {\n\t                    clone.appendChild(after);\n\t                }\n\t                this.counters.pop(counters);\n\t                if ((style && (this.options.copyStyles || isSVGElementNode(node)) && !isIFrameElement(node)) ||\n\t                    copyStyles) {\n\t                    copyCSSStyles(style, clone);\n\t                }\n\t                if (node.scrollTop !== 0 || node.scrollLeft !== 0) {\n\t                    this.scrolledElements.push([clone, node.scrollLeft, node.scrollTop]);\n\t                }\n\t                if ((isTextareaElement(node) || isSelectElement(node)) &&\n\t                    (isTextareaElement(clone) || isSelectElement(clone))) {\n\t                    clone.value = node.value;\n\t                }\n\t                return clone;\n\t            }\n\t            return node.cloneNode(false);\n\t        };\n\t        DocumentCloner.prototype.resolvePseudoContent = function (node, clone, style, pseudoElt) {\n\t            var _this = this;\n\t            if (!style) {\n\t                return;\n\t            }\n\t            var value = style.content;\n\t            var document = clone.ownerDocument;\n\t            if (!document || !value || value === 'none' || value === '-moz-alt-content' || style.display === 'none') {\n\t                return;\n\t            }\n\t            this.counters.parse(new CSSParsedCounterDeclaration(this.context, style));\n\t            var declaration = new CSSParsedPseudoDeclaration(this.context, style);\n\t            var anonymousReplacedElement = document.createElement('html2canvaspseudoelement');\n\t            copyCSSStyles(style, anonymousReplacedElement);\n\t            declaration.content.forEach(function (token) {\n\t                if (token.type === 0 /* STRING_TOKEN */) {\n\t                    anonymousReplacedElement.appendChild(document.createTextNode(token.value));\n\t                }\n\t                else if (token.type === 22 /* URL_TOKEN */) {\n\t                    var img = document.createElement('img');\n\t                    img.src = token.value;\n\t                    img.style.opacity = '1';\n\t                    anonymousReplacedElement.appendChild(img);\n\t                }\n\t                else if (token.type === 18 /* FUNCTION */) {\n\t                    if (token.name === 'attr') {\n\t                        var attr = token.values.filter(isIdentToken);\n\t                        if (attr.length) {\n\t                            anonymousReplacedElement.appendChild(document.createTextNode(node.getAttribute(attr[0].value) || ''));\n\t                        }\n\t                    }\n\t                    else if (token.name === 'counter') {\n\t                        var _a = token.values.filter(nonFunctionArgSeparator), counter = _a[0], counterStyle = _a[1];\n\t                        if (counter && isIdentToken(counter)) {\n\t                            var counterState = _this.counters.getCounterValue(counter.value);\n\t                            var counterType = counterStyle && isIdentToken(counterStyle)\n\t                                ? listStyleType.parse(_this.context, counterStyle.value)\n\t                                : 3 /* DECIMAL */;\n\t                            anonymousReplacedElement.appendChild(document.createTextNode(createCounterText(counterState, counterType, false)));\n\t                        }\n\t                    }\n\t                    else if (token.name === 'counters') {\n\t                        var _b = token.values.filter(nonFunctionArgSeparator), counter = _b[0], delim = _b[1], counterStyle = _b[2];\n\t                        if (counter && isIdentToken(counter)) {\n\t                            var counterStates = _this.counters.getCounterValues(counter.value);\n\t                            var counterType_1 = counterStyle && isIdentToken(counterStyle)\n\t                                ? listStyleType.parse(_this.context, counterStyle.value)\n\t                                : 3 /* DECIMAL */;\n\t                            var separator = delim && delim.type === 0 /* STRING_TOKEN */ ? delim.value : '';\n\t                            var text = counterStates\n\t                                .map(function (value) { return createCounterText(value, counterType_1, false); })\n\t                                .join(separator);\n\t                            anonymousReplacedElement.appendChild(document.createTextNode(text));\n\t                        }\n\t                    }\n\t                }\n\t                else if (token.type === 20 /* IDENT_TOKEN */) {\n\t                    switch (token.value) {\n\t                        case 'open-quote':\n\t                            anonymousReplacedElement.appendChild(document.createTextNode(getQuote(declaration.quotes, _this.quoteDepth++, true)));\n\t                            break;\n\t                        case 'close-quote':\n\t                            anonymousReplacedElement.appendChild(document.createTextNode(getQuote(declaration.quotes, --_this.quoteDepth, false)));\n\t                            break;\n\t                        default:\n\t                            // safari doesn't parse string tokens correctly because of lack of quotes\n\t                            anonymousReplacedElement.appendChild(document.createTextNode(token.value));\n\t                    }\n\t                }\n\t            });\n\t            anonymousReplacedElement.className = PSEUDO_HIDE_ELEMENT_CLASS_BEFORE + \" \" + PSEUDO_HIDE_ELEMENT_CLASS_AFTER;\n\t            var newClassName = pseudoElt === PseudoElementType.BEFORE\n\t                ? \" \" + PSEUDO_HIDE_ELEMENT_CLASS_BEFORE\n\t                : \" \" + PSEUDO_HIDE_ELEMENT_CLASS_AFTER;\n\t            if (isSVGElementNode(clone)) {\n\t                clone.className.baseValue += newClassName;\n\t            }\n\t            else {\n\t                clone.className += newClassName;\n\t            }\n\t            return anonymousReplacedElement;\n\t        };\n\t        DocumentCloner.destroy = function (container) {\n\t            if (container.parentNode) {\n\t                container.parentNode.removeChild(container);\n\t                return true;\n\t            }\n\t            return false;\n\t        };\n\t        return DocumentCloner;\n\t    }());\n\t    var PseudoElementType;\n\t    (function (PseudoElementType) {\n\t        PseudoElementType[PseudoElementType[\"BEFORE\"] = 0] = \"BEFORE\";\n\t        PseudoElementType[PseudoElementType[\"AFTER\"] = 1] = \"AFTER\";\n\t    })(PseudoElementType || (PseudoElementType = {}));\n\t    var createIFrameContainer = function (ownerDocument, bounds) {\n\t        var cloneIframeContainer = ownerDocument.createElement('iframe');\n\t        cloneIframeContainer.className = 'html2canvas-container';\n\t        cloneIframeContainer.style.visibility = 'hidden';\n\t        cloneIframeContainer.style.position = 'fixed';\n\t        cloneIframeContainer.style.left = '-10000px';\n\t        cloneIframeContainer.style.top = '0px';\n\t        cloneIframeContainer.style.border = '0';\n\t        cloneIframeContainer.width = bounds.width.toString();\n\t        cloneIframeContainer.height = bounds.height.toString();\n\t        cloneIframeContainer.scrolling = 'no'; // ios won't scroll without it\n\t        cloneIframeContainer.setAttribute(IGNORE_ATTRIBUTE, 'true');\n\t        ownerDocument.body.appendChild(cloneIframeContainer);\n\t        return cloneIframeContainer;\n\t    };\n\t    var imageReady = function (img) {\n\t        return new Promise(function (resolve) {\n\t            if (img.complete) {\n\t                resolve();\n\t                return;\n\t            }\n\t            if (!img.src) {\n\t                resolve();\n\t                return;\n\t            }\n\t            img.onload = resolve;\n\t            img.onerror = resolve;\n\t        });\n\t    };\n\t    var imagesReady = function (document) {\n\t        return Promise.all([].slice.call(document.images, 0).map(imageReady));\n\t    };\n\t    var iframeLoader = function (iframe) {\n\t        return new Promise(function (resolve, reject) {\n\t            var cloneWindow = iframe.contentWindow;\n\t            if (!cloneWindow) {\n\t                return reject(\"No window assigned for iframe\");\n\t            }\n\t            var documentClone = cloneWindow.document;\n\t            cloneWindow.onload = iframe.onload = function () {\n\t                cloneWindow.onload = iframe.onload = null;\n\t                var interval = setInterval(function () {\n\t                    if (documentClone.body.childNodes.length > 0 && documentClone.readyState === 'complete') {\n\t                        clearInterval(interval);\n\t                        resolve(iframe);\n\t                    }\n\t                }, 50);\n\t            };\n\t        });\n\t    };\n\t    var ignoredStyleProperties = [\n\t        'all',\n\t        'd',\n\t        'content' // Safari shows pseudoelements if content is set\n\t    ];\n\t    var copyCSSStyles = function (style, target) {\n\t        // Edge does not provide value for cssText\n\t        for (var i = style.length - 1; i >= 0; i--) {\n\t            var property = style.item(i);\n\t            if (ignoredStyleProperties.indexOf(property) === -1) {\n\t                target.style.setProperty(property, style.getPropertyValue(property));\n\t            }\n\t        }\n\t        return target;\n\t    };\n\t    var serializeDoctype = function (doctype) {\n\t        var str = '';\n\t        if (doctype) {\n\t            str += '<!DOCTYPE ';\n\t            if (doctype.name) {\n\t                str += doctype.name;\n\t            }\n\t            if (doctype.internalSubset) {\n\t                str += doctype.internalSubset;\n\t            }\n\t            if (doctype.publicId) {\n\t                str += \"\\\"\" + doctype.publicId + \"\\\"\";\n\t            }\n\t            if (doctype.systemId) {\n\t                str += \"\\\"\" + doctype.systemId + \"\\\"\";\n\t            }\n\t            str += '>';\n\t        }\n\t        return str;\n\t    };\n\t    var restoreOwnerScroll = function (ownerDocument, x, y) {\n\t        if (ownerDocument &&\n\t            ownerDocument.defaultView &&\n\t            (x !== ownerDocument.defaultView.pageXOffset || y !== ownerDocument.defaultView.pageYOffset)) {\n\t            ownerDocument.defaultView.scrollTo(x, y);\n\t        }\n\t    };\n\t    var restoreNodeScroll = function (_a) {\n\t        var element = _a[0], x = _a[1], y = _a[2];\n\t        element.scrollLeft = x;\n\t        element.scrollTop = y;\n\t    };\n\t    var PSEUDO_BEFORE = ':before';\n\t    var PSEUDO_AFTER = ':after';\n\t    var PSEUDO_HIDE_ELEMENT_CLASS_BEFORE = '___html2canvas___pseudoelement_before';\n\t    var PSEUDO_HIDE_ELEMENT_CLASS_AFTER = '___html2canvas___pseudoelement_after';\n\t    var PSEUDO_HIDE_ELEMENT_STYLE = \"{\\n    content: \\\"\\\" !important;\\n    display: none !important;\\n}\";\n\t    var createPseudoHideStyles = function (body) {\n\t        createStyles(body, \".\" + PSEUDO_HIDE_ELEMENT_CLASS_BEFORE + PSEUDO_BEFORE + PSEUDO_HIDE_ELEMENT_STYLE + \"\\n         .\" + PSEUDO_HIDE_ELEMENT_CLASS_AFTER + PSEUDO_AFTER + PSEUDO_HIDE_ELEMENT_STYLE);\n\t    };\n\t    var createStyles = function (body, styles) {\n\t        var document = body.ownerDocument;\n\t        if (document) {\n\t            var style = document.createElement('style');\n\t            style.textContent = styles;\n\t            body.appendChild(style);\n\t        }\n\t    };\n\n\t    var CacheStorage = /** @class */ (function () {\n\t        function CacheStorage() {\n\t        }\n\t        CacheStorage.getOrigin = function (url) {\n\t            var link = CacheStorage._link;\n\t            if (!link) {\n\t                return 'about:blank';\n\t            }\n\t            link.href = url;\n\t            link.href = link.href; // IE9, LOL! - http://jsfiddle.net/niklasvh/2e48b/\n\t            return link.protocol + link.hostname + link.port;\n\t        };\n\t        CacheStorage.isSameOrigin = function (src) {\n\t            return CacheStorage.getOrigin(src) === CacheStorage._origin;\n\t        };\n\t        CacheStorage.setContext = function (window) {\n\t            CacheStorage._link = window.document.createElement('a');\n\t            CacheStorage._origin = CacheStorage.getOrigin(window.location.href);\n\t        };\n\t        CacheStorage._origin = 'about:blank';\n\t        return CacheStorage;\n\t    }());\n\t    var Cache = /** @class */ (function () {\n\t        function Cache(context, _options) {\n\t            this.context = context;\n\t            this._options = _options;\n\t            // eslint-disable-next-line @typescript-eslint/no-explicit-any\n\t            this._cache = {};\n\t        }\n\t        Cache.prototype.addImage = function (src) {\n\t            var result = Promise.resolve();\n\t            if (this.has(src)) {\n\t                return result;\n\t            }\n\t            if (isBlobImage(src) || isRenderable(src)) {\n\t                (this._cache[src] = this.loadImage(src)).catch(function () {\n\t                    // prevent unhandled rejection\n\t                });\n\t                return result;\n\t            }\n\t            return result;\n\t        };\n\t        // eslint-disable-next-line @typescript-eslint/no-explicit-any\n\t        Cache.prototype.match = function (src) {\n\t            return this._cache[src];\n\t        };\n\t        Cache.prototype.loadImage = function (key) {\n\t            return __awaiter(this, void 0, void 0, function () {\n\t                var isSameOrigin, useCORS, useProxy, src;\n\t                var _this = this;\n\t                return __generator(this, function (_a) {\n\t                    switch (_a.label) {\n\t                        case 0:\n\t                            isSameOrigin = CacheStorage.isSameOrigin(key);\n\t                            useCORS = !isInlineImage(key) && this._options.useCORS === true && FEATURES.SUPPORT_CORS_IMAGES && !isSameOrigin;\n\t                            useProxy = !isInlineImage(key) &&\n\t                                !isSameOrigin &&\n\t                                !isBlobImage(key) &&\n\t                                typeof this._options.proxy === 'string' &&\n\t                                FEATURES.SUPPORT_CORS_XHR &&\n\t                                !useCORS;\n\t                            if (!isSameOrigin &&\n\t                                this._options.allowTaint === false &&\n\t                                !isInlineImage(key) &&\n\t                                !isBlobImage(key) &&\n\t                                !useProxy &&\n\t                                !useCORS) {\n\t                                return [2 /*return*/];\n\t                            }\n\t                            src = key;\n\t                            if (!useProxy) return [3 /*break*/, 2];\n\t                            return [4 /*yield*/, this.proxy(src)];\n\t                        case 1:\n\t                            src = _a.sent();\n\t                            _a.label = 2;\n\t                        case 2:\n\t                            this.context.logger.debug(\"Added image \" + key.substring(0, 256));\n\t                            return [4 /*yield*/, new Promise(function (resolve, reject) {\n\t                                    var img = new Image();\n\t                                    img.onload = function () { return resolve(img); };\n\t                                    img.onerror = reject;\n\t                                    //ios safari 10.3 taints canvas with data urls unless crossOrigin is set to anonymous\n\t                                    if (isInlineBase64Image(src) || useCORS) {\n\t                                        img.crossOrigin = 'anonymous';\n\t                                    }\n\t                                    img.src = src;\n\t                                    if (img.complete === true) {\n\t                                        // Inline XML images may fail to parse, throwing an Error later on\n\t                                        setTimeout(function () { return resolve(img); }, 500);\n\t                                    }\n\t                                    if (_this._options.imageTimeout > 0) {\n\t                                        setTimeout(function () { return reject(\"Timed out (\" + _this._options.imageTimeout + \"ms) loading image\"); }, _this._options.imageTimeout);\n\t                                    }\n\t                                })];\n\t                        case 3: return [2 /*return*/, _a.sent()];\n\t                    }\n\t                });\n\t            });\n\t        };\n\t        Cache.prototype.has = function (key) {\n\t            return typeof this._cache[key] !== 'undefined';\n\t        };\n\t        Cache.prototype.keys = function () {\n\t            return Promise.resolve(Object.keys(this._cache));\n\t        };\n\t        Cache.prototype.proxy = function (src) {\n\t            var _this = this;\n\t            var proxy = this._options.proxy;\n\t            if (!proxy) {\n\t                throw new Error('No proxy defined');\n\t            }\n\t            var key = src.substring(0, 256);\n\t            return new Promise(function (resolve, reject) {\n\t                var responseType = FEATURES.SUPPORT_RESPONSE_TYPE ? 'blob' : 'text';\n\t                var xhr = new XMLHttpRequest();\n\t                xhr.onload = function () {\n\t                    if (xhr.status === 200) {\n\t                        if (responseType === 'text') {\n\t                            resolve(xhr.response);\n\t                        }\n\t                        else {\n\t                            var reader_1 = new FileReader();\n\t                            reader_1.addEventListener('load', function () { return resolve(reader_1.result); }, false);\n\t                            reader_1.addEventListener('error', function (e) { return reject(e); }, false);\n\t                            reader_1.readAsDataURL(xhr.response);\n\t                        }\n\t                    }\n\t                    else {\n\t                        reject(\"Failed to proxy resource \" + key + \" with status code \" + xhr.status);\n\t                    }\n\t                };\n\t                xhr.onerror = reject;\n\t                var queryString = proxy.indexOf('?') > -1 ? '&' : '?';\n\t                xhr.open('GET', \"\" + proxy + queryString + \"url=\" + encodeURIComponent(src) + \"&responseType=\" + responseType);\n\t                if (responseType !== 'text' && xhr instanceof XMLHttpRequest) {\n\t                    xhr.responseType = responseType;\n\t                }\n\t                if (_this._options.imageTimeout) {\n\t                    var timeout_1 = _this._options.imageTimeout;\n\t                    xhr.timeout = timeout_1;\n\t                    xhr.ontimeout = function () { return reject(\"Timed out (\" + timeout_1 + \"ms) proxying \" + key); };\n\t                }\n\t                xhr.send();\n\t            });\n\t        };\n\t        return Cache;\n\t    }());\n\t    var INLINE_SVG = /^data:image\\/svg\\+xml/i;\n\t    var INLINE_BASE64 = /^data:image\\/.*;base64,/i;\n\t    var INLINE_IMG = /^data:image\\/.*/i;\n\t    var isRenderable = function (src) { return FEATURES.SUPPORT_SVG_DRAWING || !isSVG(src); };\n\t    var isInlineImage = function (src) { return INLINE_IMG.test(src); };\n\t    var isInlineBase64Image = function (src) { return INLINE_BASE64.test(src); };\n\t    var isBlobImage = function (src) { return src.substr(0, 4) === 'blob'; };\n\t    var isSVG = function (src) { return src.substr(-3).toLowerCase() === 'svg' || INLINE_SVG.test(src); };\n\n\t    var Vector = /** @class */ (function () {\n\t        function Vector(x, y) {\n\t            this.type = 0 /* VECTOR */;\n\t            this.x = x;\n\t            this.y = y;\n\t        }\n\t        Vector.prototype.add = function (deltaX, deltaY) {\n\t            return new Vector(this.x + deltaX, this.y + deltaY);\n\t        };\n\t        return Vector;\n\t    }());\n\n\t    var lerp = function (a, b, t) {\n\t        return new Vector(a.x + (b.x - a.x) * t, a.y + (b.y - a.y) * t);\n\t    };\n\t    var BezierCurve = /** @class */ (function () {\n\t        function BezierCurve(start, startControl, endControl, end) {\n\t            this.type = 1 /* BEZIER_CURVE */;\n\t            this.start = start;\n\t            this.startControl = startControl;\n\t            this.endControl = endControl;\n\t            this.end = end;\n\t        }\n\t        BezierCurve.prototype.subdivide = function (t, firstHalf) {\n\t            var ab = lerp(this.start, this.startControl, t);\n\t            var bc = lerp(this.startControl, this.endControl, t);\n\t            var cd = lerp(this.endControl, this.end, t);\n\t            var abbc = lerp(ab, bc, t);\n\t            var bccd = lerp(bc, cd, t);\n\t            var dest = lerp(abbc, bccd, t);\n\t            return firstHalf ? new BezierCurve(this.start, ab, abbc, dest) : new BezierCurve(dest, bccd, cd, this.end);\n\t        };\n\t        BezierCurve.prototype.add = function (deltaX, deltaY) {\n\t            return new BezierCurve(this.start.add(deltaX, deltaY), this.startControl.add(deltaX, deltaY), this.endControl.add(deltaX, deltaY), this.end.add(deltaX, deltaY));\n\t        };\n\t        BezierCurve.prototype.reverse = function () {\n\t            return new BezierCurve(this.end, this.endControl, this.startControl, this.start);\n\t        };\n\t        return BezierCurve;\n\t    }());\n\t    var isBezierCurve = function (path) { return path.type === 1 /* BEZIER_CURVE */; };\n\n\t    var BoundCurves = /** @class */ (function () {\n\t        function BoundCurves(element) {\n\t            var styles = element.styles;\n\t            var bounds = element.bounds;\n\t            var _a = getAbsoluteValueForTuple(styles.borderTopLeftRadius, bounds.width, bounds.height), tlh = _a[0], tlv = _a[1];\n\t            var _b = getAbsoluteValueForTuple(styles.borderTopRightRadius, bounds.width, bounds.height), trh = _b[0], trv = _b[1];\n\t            var _c = getAbsoluteValueForTuple(styles.borderBottomRightRadius, bounds.width, bounds.height), brh = _c[0], brv = _c[1];\n\t            var _d = getAbsoluteValueForTuple(styles.borderBottomLeftRadius, bounds.width, bounds.height), blh = _d[0], blv = _d[1];\n\t            var factors = [];\n\t            factors.push((tlh + trh) / bounds.width);\n\t            factors.push((blh + brh) / bounds.width);\n\t            factors.push((tlv + blv) / bounds.height);\n\t            factors.push((trv + brv) / bounds.height);\n\t            var maxFactor = Math.max.apply(Math, factors);\n\t            if (maxFactor > 1) {\n\t                tlh /= maxFactor;\n\t                tlv /= maxFactor;\n\t                trh /= maxFactor;\n\t                trv /= maxFactor;\n\t                brh /= maxFactor;\n\t                brv /= maxFactor;\n\t                blh /= maxFactor;\n\t                blv /= maxFactor;\n\t            }\n\t            var topWidth = bounds.width - trh;\n\t            var rightHeight = bounds.height - brv;\n\t            var bottomWidth = bounds.width - brh;\n\t            var leftHeight = bounds.height - blv;\n\t            var borderTopWidth = styles.borderTopWidth;\n\t            var borderRightWidth = styles.borderRightWidth;\n\t            var borderBottomWidth = styles.borderBottomWidth;\n\t            var borderLeftWidth = styles.borderLeftWidth;\n\t            var paddingTop = getAbsoluteValue(styles.paddingTop, element.bounds.width);\n\t            var paddingRight = getAbsoluteValue(styles.paddingRight, element.bounds.width);\n\t            var paddingBottom = getAbsoluteValue(styles.paddingBottom, element.bounds.width);\n\t            var paddingLeft = getAbsoluteValue(styles.paddingLeft, element.bounds.width);\n\t            this.topLeftBorderDoubleOuterBox =\n\t                tlh > 0 || tlv > 0\n\t                    ? getCurvePoints(bounds.left + borderLeftWidth / 3, bounds.top + borderTopWidth / 3, tlh - borderLeftWidth / 3, tlv - borderTopWidth / 3, CORNER.TOP_LEFT)\n\t                    : new Vector(bounds.left + borderLeftWidth / 3, bounds.top + borderTopWidth / 3);\n\t            this.topRightBorderDoubleOuterBox =\n\t                tlh > 0 || tlv > 0\n\t                    ? getCurvePoints(bounds.left + topWidth, bounds.top + borderTopWidth / 3, trh - borderRightWidth / 3, trv - borderTopWidth / 3, CORNER.TOP_RIGHT)\n\t                    : new Vector(bounds.left + bounds.width - borderRightWidth / 3, bounds.top + borderTopWidth / 3);\n\t            this.bottomRightBorderDoubleOuterBox =\n\t                brh > 0 || brv > 0\n\t                    ? getCurvePoints(bounds.left + bottomWidth, bounds.top + rightHeight, brh - borderRightWidth / 3, brv - borderBottomWidth / 3, CORNER.BOTTOM_RIGHT)\n\t                    : new Vector(bounds.left + bounds.width - borderRightWidth / 3, bounds.top + bounds.height - borderBottomWidth / 3);\n\t            this.bottomLeftBorderDoubleOuterBox =\n\t                blh > 0 || blv > 0\n\t                    ? getCurvePoints(bounds.left + borderLeftWidth / 3, bounds.top + leftHeight, blh - borderLeftWidth / 3, blv - borderBottomWidth / 3, CORNER.BOTTOM_LEFT)\n\t                    : new Vector(bounds.left + borderLeftWidth / 3, bounds.top + bounds.height - borderBottomWidth / 3);\n\t            this.topLeftBorderDoubleInnerBox =\n\t                tlh > 0 || tlv > 0\n\t                    ? getCurvePoints(bounds.left + (borderLeftWidth * 2) / 3, bounds.top + (borderTopWidth * 2) / 3, tlh - (borderLeftWidth * 2) / 3, tlv - (borderTopWidth * 2) / 3, CORNER.TOP_LEFT)\n\t                    : new Vector(bounds.left + (borderLeftWidth * 2) / 3, bounds.top + (borderTopWidth * 2) / 3);\n\t            this.topRightBorderDoubleInnerBox =\n\t                tlh > 0 || tlv > 0\n\t                    ? getCurvePoints(bounds.left + topWidth, bounds.top + (borderTopWidth * 2) / 3, trh - (borderRightWidth * 2) / 3, trv - (borderTopWidth * 2) / 3, CORNER.TOP_RIGHT)\n\t                    : new Vector(bounds.left + bounds.width - (borderRightWidth * 2) / 3, bounds.top + (borderTopWidth * 2) / 3);\n\t            this.bottomRightBorderDoubleInnerBox =\n\t                brh > 0 || brv > 0\n\t                    ? getCurvePoints(bounds.left + bottomWidth, bounds.top + rightHeight, brh - (borderRightWidth * 2) / 3, brv - (borderBottomWidth * 2) / 3, CORNER.BOTTOM_RIGHT)\n\t                    : new Vector(bounds.left + bounds.width - (borderRightWidth * 2) / 3, bounds.top + bounds.height - (borderBottomWidth * 2) / 3);\n\t            this.bottomLeftBorderDoubleInnerBox =\n\t                blh > 0 || blv > 0\n\t                    ? getCurvePoints(bounds.left + (borderLeftWidth * 2) / 3, bounds.top + leftHeight, blh - (borderLeftWidth * 2) / 3, blv - (borderBottomWidth * 2) / 3, CORNER.BOTTOM_LEFT)\n\t                    : new Vector(bounds.left + (borderLeftWidth * 2) / 3, bounds.top + bounds.height - (borderBottomWidth * 2) / 3);\n\t            this.topLeftBorderStroke =\n\t                tlh > 0 || tlv > 0\n\t                    ? getCurvePoints(bounds.left + borderLeftWidth / 2, bounds.top + borderTopWidth / 2, tlh - borderLeftWidth / 2, tlv - borderTopWidth / 2, CORNER.TOP_LEFT)\n\t                    : new Vector(bounds.left + borderLeftWidth / 2, bounds.top + borderTopWidth / 2);\n\t            this.topRightBorderStroke =\n\t                tlh > 0 || tlv > 0\n\t                    ? getCurvePoints(bounds.left + topWidth, bounds.top + borderTopWidth / 2, trh - borderRightWidth / 2, trv - borderTopWidth / 2, CORNER.TOP_RIGHT)\n\t                    : new Vector(bounds.left + bounds.width - borderRightWidth / 2, bounds.top + borderTopWidth / 2);\n\t            this.bottomRightBorderStroke =\n\t                brh > 0 || brv > 0\n\t                    ? getCurvePoints(bounds.left + bottomWidth, bounds.top + rightHeight, brh - borderRightWidth / 2, brv - borderBottomWidth / 2, CORNER.BOTTOM_RIGHT)\n\t                    : new Vector(bounds.left + bounds.width - borderRightWidth / 2, bounds.top + bounds.height - borderBottomWidth / 2);\n\t            this.bottomLeftBorderStroke =\n\t                blh > 0 || blv > 0\n\t                    ? getCurvePoints(bounds.left + borderLeftWidth / 2, bounds.top + leftHeight, blh - borderLeftWidth / 2, blv - borderBottomWidth / 2, CORNER.BOTTOM_LEFT)\n\t                    : new Vector(bounds.left + borderLeftWidth / 2, bounds.top + bounds.height - borderBottomWidth / 2);\n\t            this.topLeftBorderBox =\n\t                tlh > 0 || tlv > 0\n\t                    ? getCurvePoints(bounds.left, bounds.top, tlh, tlv, CORNER.TOP_LEFT)\n\t                    : new Vector(bounds.left, bounds.top);\n\t            this.topRightBorderBox =\n\t                trh > 0 || trv > 0\n\t                    ? getCurvePoints(bounds.left + topWidth, bounds.top, trh, trv, CORNER.TOP_RIGHT)\n\t                    : new Vector(bounds.left + bounds.width, bounds.top);\n\t            this.bottomRightBorderBox =\n\t                brh > 0 || brv > 0\n\t                    ? getCurvePoints(bounds.left + bottomWidth, bounds.top + rightHeight, brh, brv, CORNER.BOTTOM_RIGHT)\n\t                    : new Vector(bounds.left + bounds.width, bounds.top + bounds.height);\n\t            this.bottomLeftBorderBox =\n\t                blh > 0 || blv > 0\n\t                    ? getCurvePoints(bounds.left, bounds.top + leftHeight, blh, blv, CORNER.BOTTOM_LEFT)\n\t                    : new Vector(bounds.left, bounds.top + bounds.height);\n\t            this.topLeftPaddingBox =\n\t                tlh > 0 || tlv > 0\n\t                    ? getCurvePoints(bounds.left + borderLeftWidth, bounds.top + borderTopWidth, Math.max(0, tlh - borderLeftWidth), Math.max(0, tlv - borderTopWidth), CORNER.TOP_LEFT)\n\t                    : new Vector(bounds.left + borderLeftWidth, bounds.top + borderTopWidth);\n\t            this.topRightPaddingBox =\n\t                trh > 0 || trv > 0\n\t                    ? getCurvePoints(bounds.left + Math.min(topWidth, bounds.width - borderRightWidth), bounds.top + borderTopWidth, topWidth > bounds.width + borderRightWidth ? 0 : Math.max(0, trh - borderRightWidth), Math.max(0, trv - borderTopWidth), CORNER.TOP_RIGHT)\n\t                    : new Vector(bounds.left + bounds.width - borderRightWidth, bounds.top + borderTopWidth);\n\t            this.bottomRightPaddingBox =\n\t                brh > 0 || brv > 0\n\t                    ? getCurvePoints(bounds.left + Math.min(bottomWidth, bounds.width - borderLeftWidth), bounds.top + Math.min(rightHeight, bounds.height - borderBottomWidth), Math.max(0, brh - borderRightWidth), Math.max(0, brv - borderBottomWidth), CORNER.BOTTOM_RIGHT)\n\t                    : new Vector(bounds.left + bounds.width - borderRightWidth, bounds.top + bounds.height - borderBottomWidth);\n\t            this.bottomLeftPaddingBox =\n\t                blh > 0 || blv > 0\n\t                    ? getCurvePoints(bounds.left + borderLeftWidth, bounds.top + Math.min(leftHeight, bounds.height - borderBottomWidth), Math.max(0, blh - borderLeftWidth), Math.max(0, blv - borderBottomWidth), CORNER.BOTTOM_LEFT)\n\t                    : new Vector(bounds.left + borderLeftWidth, bounds.top + bounds.height - borderBottomWidth);\n\t            this.topLeftContentBox =\n\t                tlh > 0 || tlv > 0\n\t                    ? getCurvePoints(bounds.left + borderLeftWidth + paddingLeft, bounds.top + borderTopWidth + paddingTop, Math.max(0, tlh - (borderLeftWidth + paddingLeft)), Math.max(0, tlv - (borderTopWidth + paddingTop)), CORNER.TOP_LEFT)\n\t                    : new Vector(bounds.left + borderLeftWidth + paddingLeft, bounds.top + borderTopWidth + paddingTop);\n\t            this.topRightContentBox =\n\t                trh > 0 || trv > 0\n\t                    ? getCurvePoints(bounds.left + Math.min(topWidth, bounds.width + borderLeftWidth + paddingLeft), bounds.top + borderTopWidth + paddingTop, topWidth > bounds.width + borderLeftWidth + paddingLeft ? 0 : trh - borderLeftWidth + paddingLeft, trv - (borderTopWidth + paddingTop), CORNER.TOP_RIGHT)\n\t                    : new Vector(bounds.left + bounds.width - (borderRightWidth + paddingRight), bounds.top + borderTopWidth + paddingTop);\n\t            this.bottomRightContentBox =\n\t                brh > 0 || brv > 0\n\t                    ? getCurvePoints(bounds.left + Math.min(bottomWidth, bounds.width - (borderLeftWidth + paddingLeft)), bounds.top + Math.min(rightHeight, bounds.height + borderTopWidth + paddingTop), Math.max(0, brh - (borderRightWidth + paddingRight)), brv - (borderBottomWidth + paddingBottom), CORNER.BOTTOM_RIGHT)\n\t                    : new Vector(bounds.left + bounds.width - (borderRightWidth + paddingRight), bounds.top + bounds.height - (borderBottomWidth + paddingBottom));\n\t            this.bottomLeftContentBox =\n\t                blh > 0 || blv > 0\n\t                    ? getCurvePoints(bounds.left + borderLeftWidth + paddingLeft, bounds.top + leftHeight, Math.max(0, blh - (borderLeftWidth + paddingLeft)), blv - (borderBottomWidth + paddingBottom), CORNER.BOTTOM_LEFT)\n\t                    : new Vector(bounds.left + borderLeftWidth + paddingLeft, bounds.top + bounds.height - (borderBottomWidth + paddingBottom));\n\t        }\n\t        return BoundCurves;\n\t    }());\n\t    var CORNER;\n\t    (function (CORNER) {\n\t        CORNER[CORNER[\"TOP_LEFT\"] = 0] = \"TOP_LEFT\";\n\t        CORNER[CORNER[\"TOP_RIGHT\"] = 1] = \"TOP_RIGHT\";\n\t        CORNER[CORNER[\"BOTTOM_RIGHT\"] = 2] = \"BOTTOM_RIGHT\";\n\t        CORNER[CORNER[\"BOTTOM_LEFT\"] = 3] = \"BOTTOM_LEFT\";\n\t    })(CORNER || (CORNER = {}));\n\t    var getCurvePoints = function (x, y, r1, r2, position) {\n\t        var kappa = 4 * ((Math.sqrt(2) - 1) / 3);\n\t        var ox = r1 * kappa; // control point offset horizontal\n\t        var oy = r2 * kappa; // control point offset vertical\n\t        var xm = x + r1; // x-middle\n\t        var ym = y + r2; // y-middle\n\t        switch (position) {\n\t            case CORNER.TOP_LEFT:\n\t                return new BezierCurve(new Vector(x, ym), new Vector(x, ym - oy), new Vector(xm - ox, y), new Vector(xm, y));\n\t            case CORNER.TOP_RIGHT:\n\t                return new BezierCurve(new Vector(x, y), new Vector(x + ox, y), new Vector(xm, ym - oy), new Vector(xm, ym));\n\t            case CORNER.BOTTOM_RIGHT:\n\t                return new BezierCurve(new Vector(xm, y), new Vector(xm, y + oy), new Vector(x + ox, ym), new Vector(x, ym));\n\t            case CORNER.BOTTOM_LEFT:\n\t            default:\n\t                return new BezierCurve(new Vector(xm, ym), new Vector(xm - ox, ym), new Vector(x, y + oy), new Vector(x, y));\n\t        }\n\t    };\n\t    var calculateBorderBoxPath = function (curves) {\n\t        return [curves.topLeftBorderBox, curves.topRightBorderBox, curves.bottomRightBorderBox, curves.bottomLeftBorderBox];\n\t    };\n\t    var calculateContentBoxPath = function (curves) {\n\t        return [\n\t            curves.topLeftContentBox,\n\t            curves.topRightContentBox,\n\t            curves.bottomRightContentBox,\n\t            curves.bottomLeftContentBox\n\t        ];\n\t    };\n\t    var calculatePaddingBoxPath = function (curves) {\n\t        return [\n\t            curves.topLeftPaddingBox,\n\t            curves.topRightPaddingBox,\n\t            curves.bottomRightPaddingBox,\n\t            curves.bottomLeftPaddingBox\n\t        ];\n\t    };\n\n\t    var TransformEffect = /** @class */ (function () {\n\t        function TransformEffect(offsetX, offsetY, matrix) {\n\t            this.offsetX = offsetX;\n\t            this.offsetY = offsetY;\n\t            this.matrix = matrix;\n\t            this.type = 0 /* TRANSFORM */;\n\t            this.target = 2 /* BACKGROUND_BORDERS */ | 4 /* CONTENT */;\n\t        }\n\t        return TransformEffect;\n\t    }());\n\t    var ClipEffect = /** @class */ (function () {\n\t        function ClipEffect(path, target) {\n\t            this.path = path;\n\t            this.target = target;\n\t            this.type = 1 /* CLIP */;\n\t        }\n\t        return ClipEffect;\n\t    }());\n\t    var OpacityEffect = /** @class */ (function () {\n\t        function OpacityEffect(opacity) {\n\t            this.opacity = opacity;\n\t            this.type = 2 /* OPACITY */;\n\t            this.target = 2 /* BACKGROUND_BORDERS */ | 4 /* CONTENT */;\n\t        }\n\t        return OpacityEffect;\n\t    }());\n\t    var isTransformEffect = function (effect) {\n\t        return effect.type === 0 /* TRANSFORM */;\n\t    };\n\t    var isClipEffect = function (effect) { return effect.type === 1 /* CLIP */; };\n\t    var isOpacityEffect = function (effect) { return effect.type === 2 /* OPACITY */; };\n\n\t    var equalPath = function (a, b) {\n\t        if (a.length === b.length) {\n\t            return a.some(function (v, i) { return v === b[i]; });\n\t        }\n\t        return false;\n\t    };\n\t    var transformPath = function (path, deltaX, deltaY, deltaW, deltaH) {\n\t        return path.map(function (point, index) {\n\t            switch (index) {\n\t                case 0:\n\t                    return point.add(deltaX, deltaY);\n\t                case 1:\n\t                    return point.add(deltaX + deltaW, deltaY);\n\t                case 2:\n\t                    return point.add(deltaX + deltaW, deltaY + deltaH);\n\t                case 3:\n\t                    return point.add(deltaX, deltaY + deltaH);\n\t            }\n\t            return point;\n\t        });\n\t    };\n\n\t    var StackingContext = /** @class */ (function () {\n\t        function StackingContext(container) {\n\t            this.element = container;\n\t            this.inlineLevel = [];\n\t            this.nonInlineLevel = [];\n\t            this.negativeZIndex = [];\n\t            this.zeroOrAutoZIndexOrTransformedOrOpacity = [];\n\t            this.positiveZIndex = [];\n\t            this.nonPositionedFloats = [];\n\t            this.nonPositionedInlineLevel = [];\n\t        }\n\t        return StackingContext;\n\t    }());\n\t    var ElementPaint = /** @class */ (function () {\n\t        function ElementPaint(container, parent) {\n\t            this.container = container;\n\t            this.parent = parent;\n\t            this.effects = [];\n\t            this.curves = new BoundCurves(this.container);\n\t            if (this.container.styles.opacity < 1) {\n\t                this.effects.push(new OpacityEffect(this.container.styles.opacity));\n\t            }\n\t            if (this.container.styles.transform !== null) {\n\t                var offsetX = this.container.bounds.left + this.container.styles.transformOrigin[0].number;\n\t                var offsetY = this.container.bounds.top + this.container.styles.transformOrigin[1].number;\n\t                var matrix = this.container.styles.transform;\n\t                this.effects.push(new TransformEffect(offsetX, offsetY, matrix));\n\t            }\n\t            if (this.container.styles.overflowX !== 0 /* VISIBLE */) {\n\t                var borderBox = calculateBorderBoxPath(this.curves);\n\t                var paddingBox = calculatePaddingBoxPath(this.curves);\n\t                if (equalPath(borderBox, paddingBox)) {\n\t                    this.effects.push(new ClipEffect(borderBox, 2 /* BACKGROUND_BORDERS */ | 4 /* CONTENT */));\n\t                }\n\t                else {\n\t                    this.effects.push(new ClipEffect(borderBox, 2 /* BACKGROUND_BORDERS */));\n\t                    this.effects.push(new ClipEffect(paddingBox, 4 /* CONTENT */));\n\t                }\n\t            }\n\t        }\n\t        ElementPaint.prototype.getEffects = function (target) {\n\t            var inFlow = [2 /* ABSOLUTE */, 3 /* FIXED */].indexOf(this.container.styles.position) === -1;\n\t            var parent = this.parent;\n\t            var effects = this.effects.slice(0);\n\t            while (parent) {\n\t                var croplessEffects = parent.effects.filter(function (effect) { return !isClipEffect(effect); });\n\t                if (inFlow || parent.container.styles.position !== 0 /* STATIC */ || !parent.parent) {\n\t                    effects.unshift.apply(effects, croplessEffects);\n\t                    inFlow = [2 /* ABSOLUTE */, 3 /* FIXED */].indexOf(parent.container.styles.position) === -1;\n\t                    if (parent.container.styles.overflowX !== 0 /* VISIBLE */) {\n\t                        var borderBox = calculateBorderBoxPath(parent.curves);\n\t                        var paddingBox = calculatePaddingBoxPath(parent.curves);\n\t                        if (!equalPath(borderBox, paddingBox)) {\n\t                            effects.unshift(new ClipEffect(paddingBox, 2 /* BACKGROUND_BORDERS */ | 4 /* CONTENT */));\n\t                        }\n\t                    }\n\t                }\n\t                else {\n\t                    effects.unshift.apply(effects, croplessEffects);\n\t                }\n\t                parent = parent.parent;\n\t            }\n\t            return effects.filter(function (effect) { return contains(effect.target, target); });\n\t        };\n\t        return ElementPaint;\n\t    }());\n\t    var parseStackTree = function (parent, stackingContext, realStackingContext, listItems) {\n\t        parent.container.elements.forEach(function (child) {\n\t            var treatAsRealStackingContext = contains(child.flags, 4 /* CREATES_REAL_STACKING_CONTEXT */);\n\t            var createsStackingContext = contains(child.flags, 2 /* CREATES_STACKING_CONTEXT */);\n\t            var paintContainer = new ElementPaint(child, parent);\n\t            if (contains(child.styles.display, 2048 /* LIST_ITEM */)) {\n\t                listItems.push(paintContainer);\n\t            }\n\t            var listOwnerItems = contains(child.flags, 8 /* IS_LIST_OWNER */) ? [] : listItems;\n\t            if (treatAsRealStackingContext || createsStackingContext) {\n\t                var parentStack = treatAsRealStackingContext || child.styles.isPositioned() ? realStackingContext : stackingContext;\n\t                var stack = new StackingContext(paintContainer);\n\t                if (child.styles.isPositioned() || child.styles.opacity < 1 || child.styles.isTransformed()) {\n\t                    var order_1 = child.styles.zIndex.order;\n\t                    if (order_1 < 0) {\n\t                        var index_1 = 0;\n\t                        parentStack.negativeZIndex.some(function (current, i) {\n\t                            if (order_1 > current.element.container.styles.zIndex.order) {\n\t                                index_1 = i;\n\t                                return false;\n\t                            }\n\t                            else if (index_1 > 0) {\n\t                                return true;\n\t                            }\n\t                            return false;\n\t                        });\n\t                        parentStack.negativeZIndex.splice(index_1, 0, stack);\n\t                    }\n\t                    else if (order_1 > 0) {\n\t                        var index_2 = 0;\n\t                        parentStack.positiveZIndex.some(function (current, i) {\n\t                            if (order_1 >= current.element.container.styles.zIndex.order) {\n\t                                index_2 = i + 1;\n\t                                return false;\n\t                            }\n\t                            else if (index_2 > 0) {\n\t                                return true;\n\t                            }\n\t                            return false;\n\t                        });\n\t                        parentStack.positiveZIndex.splice(index_2, 0, stack);\n\t                    }\n\t                    else {\n\t                        parentStack.zeroOrAutoZIndexOrTransformedOrOpacity.push(stack);\n\t                    }\n\t                }\n\t                else {\n\t                    if (child.styles.isFloating()) {\n\t                        parentStack.nonPositionedFloats.push(stack);\n\t                    }\n\t                    else {\n\t                        parentStack.nonPositionedInlineLevel.push(stack);\n\t                    }\n\t                }\n\t                parseStackTree(paintContainer, stack, treatAsRealStackingContext ? stack : realStackingContext, listOwnerItems);\n\t            }\n\t            else {\n\t                if (child.styles.isInlineLevel()) {\n\t                    stackingContext.inlineLevel.push(paintContainer);\n\t                }\n\t                else {\n\t                    stackingContext.nonInlineLevel.push(paintContainer);\n\t                }\n\t                parseStackTree(paintContainer, stackingContext, realStackingContext, listOwnerItems);\n\t            }\n\t            if (contains(child.flags, 8 /* IS_LIST_OWNER */)) {\n\t                processListItems(child, listOwnerItems);\n\t            }\n\t        });\n\t    };\n\t    var processListItems = function (owner, elements) {\n\t        var numbering = owner instanceof OLElementContainer ? owner.start : 1;\n\t        var reversed = owner instanceof OLElementContainer ? owner.reversed : false;\n\t        for (var i = 0; i < elements.length; i++) {\n\t            var item = elements[i];\n\t            if (item.container instanceof LIElementContainer &&\n\t                typeof item.container.value === 'number' &&\n\t                item.container.value !== 0) {\n\t                numbering = item.container.value;\n\t            }\n\t            item.listValue = createCounterText(numbering, item.container.styles.listStyleType, true);\n\t            numbering += reversed ? -1 : 1;\n\t        }\n\t    };\n\t    var parseStackingContexts = function (container) {\n\t        var paintContainer = new ElementPaint(container, null);\n\t        var root = new StackingContext(paintContainer);\n\t        var listItems = [];\n\t        parseStackTree(paintContainer, root, root, listItems);\n\t        processListItems(paintContainer.container, listItems);\n\t        return root;\n\t    };\n\n\t    var parsePathForBorder = function (curves, borderSide) {\n\t        switch (borderSide) {\n\t            case 0:\n\t                return createPathFromCurves(curves.topLeftBorderBox, curves.topLeftPaddingBox, curves.topRightBorderBox, curves.topRightPaddingBox);\n\t            case 1:\n\t                return createPathFromCurves(curves.topRightBorderBox, curves.topRightPaddingBox, curves.bottomRightBorderBox, curves.bottomRightPaddingBox);\n\t            case 2:\n\t                return createPathFromCurves(curves.bottomRightBorderBox, curves.bottomRightPaddingBox, curves.bottomLeftBorderBox, curves.bottomLeftPaddingBox);\n\t            case 3:\n\t            default:\n\t                return createPathFromCurves(curves.bottomLeftBorderBox, curves.bottomLeftPaddingBox, curves.topLeftBorderBox, curves.topLeftPaddingBox);\n\t        }\n\t    };\n\t    var parsePathForBorderDoubleOuter = function (curves, borderSide) {\n\t        switch (borderSide) {\n\t            case 0:\n\t                return createPathFromCurves(curves.topLeftBorderBox, curves.topLeftBorderDoubleOuterBox, curves.topRightBorderBox, curves.topRightBorderDoubleOuterBox);\n\t            case 1:\n\t                return createPathFromCurves(curves.topRightBorderBox, curves.topRightBorderDoubleOuterBox, curves.bottomRightBorderBox, curves.bottomRightBorderDoubleOuterBox);\n\t            case 2:\n\t                return createPathFromCurves(curves.bottomRightBorderBox, curves.bottomRightBorderDoubleOuterBox, curves.bottomLeftBorderBox, curves.bottomLeftBorderDoubleOuterBox);\n\t            case 3:\n\t            default:\n\t                return createPathFromCurves(curves.bottomLeftBorderBox, curves.bottomLeftBorderDoubleOuterBox, curves.topLeftBorderBox, curves.topLeftBorderDoubleOuterBox);\n\t        }\n\t    };\n\t    var parsePathForBorderDoubleInner = function (curves, borderSide) {\n\t        switch (borderSide) {\n\t            case 0:\n\t                return createPathFromCurves(curves.topLeftBorderDoubleInnerBox, curves.topLeftPaddingBox, curves.topRightBorderDoubleInnerBox, curves.topRightPaddingBox);\n\t            case 1:\n\t                return createPathFromCurves(curves.topRightBorderDoubleInnerBox, curves.topRightPaddingBox, curves.bottomRightBorderDoubleInnerBox, curves.bottomRightPaddingBox);\n\t            case 2:\n\t                return createPathFromCurves(curves.bottomRightBorderDoubleInnerBox, curves.bottomRightPaddingBox, curves.bottomLeftBorderDoubleInnerBox, curves.bottomLeftPaddingBox);\n\t            case 3:\n\t            default:\n\t                return createPathFromCurves(curves.bottomLeftBorderDoubleInnerBox, curves.bottomLeftPaddingBox, curves.topLeftBorderDoubleInnerBox, curves.topLeftPaddingBox);\n\t        }\n\t    };\n\t    var parsePathForBorderStroke = function (curves, borderSide) {\n\t        switch (borderSide) {\n\t            case 0:\n\t                return createStrokePathFromCurves(curves.topLeftBorderStroke, curves.topRightBorderStroke);\n\t            case 1:\n\t                return createStrokePathFromCurves(curves.topRightBorderStroke, curves.bottomRightBorderStroke);\n\t            case 2:\n\t                return createStrokePathFromCurves(curves.bottomRightBorderStroke, curves.bottomLeftBorderStroke);\n\t            case 3:\n\t            default:\n\t                return createStrokePathFromCurves(curves.bottomLeftBorderStroke, curves.topLeftBorderStroke);\n\t        }\n\t    };\n\t    var createStrokePathFromCurves = function (outer1, outer2) {\n\t        var path = [];\n\t        if (isBezierCurve(outer1)) {\n\t            path.push(outer1.subdivide(0.5, false));\n\t        }\n\t        else {\n\t            path.push(outer1);\n\t        }\n\t        if (isBezierCurve(outer2)) {\n\t            path.push(outer2.subdivide(0.5, true));\n\t        }\n\t        else {\n\t            path.push(outer2);\n\t        }\n\t        return path;\n\t    };\n\t    var createPathFromCurves = function (outer1, inner1, outer2, inner2) {\n\t        var path = [];\n\t        if (isBezierCurve(outer1)) {\n\t            path.push(outer1.subdivide(0.5, false));\n\t        }\n\t        else {\n\t            path.push(outer1);\n\t        }\n\t        if (isBezierCurve(outer2)) {\n\t            path.push(outer2.subdivide(0.5, true));\n\t        }\n\t        else {\n\t            path.push(outer2);\n\t        }\n\t        if (isBezierCurve(inner2)) {\n\t            path.push(inner2.subdivide(0.5, true).reverse());\n\t        }\n\t        else {\n\t            path.push(inner2);\n\t        }\n\t        if (isBezierCurve(inner1)) {\n\t            path.push(inner1.subdivide(0.5, false).reverse());\n\t        }\n\t        else {\n\t            path.push(inner1);\n\t        }\n\t        return path;\n\t    };\n\n\t    var paddingBox = function (element) {\n\t        var bounds = element.bounds;\n\t        var styles = element.styles;\n\t        return bounds.add(styles.borderLeftWidth, styles.borderTopWidth, -(styles.borderRightWidth + styles.borderLeftWidth), -(styles.borderTopWidth + styles.borderBottomWidth));\n\t    };\n\t    var contentBox = function (element) {\n\t        var styles = element.styles;\n\t        var bounds = element.bounds;\n\t        var paddingLeft = getAbsoluteValue(styles.paddingLeft, bounds.width);\n\t        var paddingRight = getAbsoluteValue(styles.paddingRight, bounds.width);\n\t        var paddingTop = getAbsoluteValue(styles.paddingTop, bounds.width);\n\t        var paddingBottom = getAbsoluteValue(styles.paddingBottom, bounds.width);\n\t        return bounds.add(paddingLeft + styles.borderLeftWidth, paddingTop + styles.borderTopWidth, -(styles.borderRightWidth + styles.borderLeftWidth + paddingLeft + paddingRight), -(styles.borderTopWidth + styles.borderBottomWidth + paddingTop + paddingBottom));\n\t    };\n\n\t    var calculateBackgroundPositioningArea = function (backgroundOrigin, element) {\n\t        if (backgroundOrigin === 0 /* BORDER_BOX */) {\n\t            return element.bounds;\n\t        }\n\t        if (backgroundOrigin === 2 /* CONTENT_BOX */) {\n\t            return contentBox(element);\n\t        }\n\t        return paddingBox(element);\n\t    };\n\t    var calculateBackgroundPaintingArea = function (backgroundClip, element) {\n\t        if (backgroundClip === 0 /* BORDER_BOX */) {\n\t            return element.bounds;\n\t        }\n\t        if (backgroundClip === 2 /* CONTENT_BOX */) {\n\t            return contentBox(element);\n\t        }\n\t        return paddingBox(element);\n\t    };\n\t    var calculateBackgroundRendering = function (container, index, intrinsicSize) {\n\t        var backgroundPositioningArea = calculateBackgroundPositioningArea(getBackgroundValueForIndex(container.styles.backgroundOrigin, index), container);\n\t        var backgroundPaintingArea = calculateBackgroundPaintingArea(getBackgroundValueForIndex(container.styles.backgroundClip, index), container);\n\t        var backgroundImageSize = calculateBackgroundSize(getBackgroundValueForIndex(container.styles.backgroundSize, index), intrinsicSize, backgroundPositioningArea);\n\t        var sizeWidth = backgroundImageSize[0], sizeHeight = backgroundImageSize[1];\n\t        var position = getAbsoluteValueForTuple(getBackgroundValueForIndex(container.styles.backgroundPosition, index), backgroundPositioningArea.width - sizeWidth, backgroundPositioningArea.height - sizeHeight);\n\t        var path = calculateBackgroundRepeatPath(getBackgroundValueForIndex(container.styles.backgroundRepeat, index), position, backgroundImageSize, backgroundPositioningArea, backgroundPaintingArea);\n\t        var offsetX = Math.round(backgroundPositioningArea.left + position[0]);\n\t        var offsetY = Math.round(backgroundPositioningArea.top + position[1]);\n\t        return [path, offsetX, offsetY, sizeWidth, sizeHeight];\n\t    };\n\t    var isAuto = function (token) { return isIdentToken(token) && token.value === BACKGROUND_SIZE.AUTO; };\n\t    var hasIntrinsicValue = function (value) { return typeof value === 'number'; };\n\t    var calculateBackgroundSize = function (size, _a, bounds) {\n\t        var intrinsicWidth = _a[0], intrinsicHeight = _a[1], intrinsicProportion = _a[2];\n\t        var first = size[0], second = size[1];\n\t        if (!first) {\n\t            return [0, 0];\n\t        }\n\t        if (isLengthPercentage(first) && second && isLengthPercentage(second)) {\n\t            return [getAbsoluteValue(first, bounds.width), getAbsoluteValue(second, bounds.height)];\n\t        }\n\t        var hasIntrinsicProportion = hasIntrinsicValue(intrinsicProportion);\n\t        if (isIdentToken(first) && (first.value === BACKGROUND_SIZE.CONTAIN || first.value === BACKGROUND_SIZE.COVER)) {\n\t            if (hasIntrinsicValue(intrinsicProportion)) {\n\t                var targetRatio = bounds.width / bounds.height;\n\t                return targetRatio < intrinsicProportion !== (first.value === BACKGROUND_SIZE.COVER)\n\t                    ? [bounds.width, bounds.width / intrinsicProportion]\n\t                    : [bounds.height * intrinsicProportion, bounds.height];\n\t            }\n\t            return [bounds.width, bounds.height];\n\t        }\n\t        var hasIntrinsicWidth = hasIntrinsicValue(intrinsicWidth);\n\t        var hasIntrinsicHeight = hasIntrinsicValue(intrinsicHeight);\n\t        var hasIntrinsicDimensions = hasIntrinsicWidth || hasIntrinsicHeight;\n\t        // If the background-size is auto or auto auto:\n\t        if (isAuto(first) && (!second || isAuto(second))) {\n\t            // If the image has both horizontal and vertical intrinsic dimensions, it's rendered at that size.\n\t            if (hasIntrinsicWidth && hasIntrinsicHeight) {\n\t                return [intrinsicWidth, intrinsicHeight];\n\t            }\n\t            // If the image has no intrinsic dimensions and has no intrinsic proportions,\n\t            // it's rendered at the size of the background positioning area.\n\t            if (!hasIntrinsicProportion && !hasIntrinsicDimensions) {\n\t                return [bounds.width, bounds.height];\n\t            }\n\t            // TODO If the image has no intrinsic dimensions but has intrinsic proportions, it's rendered as if contain had been specified instead.\n\t            // If the image has only one intrinsic dimension and has intrinsic proportions, it's rendered at the size corresponding to that one dimension.\n\t            // The other dimension is computed using the specified dimension and the intrinsic proportions.\n\t            if (hasIntrinsicDimensions && hasIntrinsicProportion) {\n\t                var width_1 = hasIntrinsicWidth\n\t                    ? intrinsicWidth\n\t                    : intrinsicHeight * intrinsicProportion;\n\t                var height_1 = hasIntrinsicHeight\n\t                    ? intrinsicHeight\n\t                    : intrinsicWidth / intrinsicProportion;\n\t                return [width_1, height_1];\n\t            }\n\t            // If the image has only one intrinsic dimension but has no intrinsic proportions,\n\t            // it's rendered using the specified dimension and the other dimension of the background positioning area.\n\t            var width_2 = hasIntrinsicWidth ? intrinsicWidth : bounds.width;\n\t            var height_2 = hasIntrinsicHeight ? intrinsicHeight : bounds.height;\n\t            return [width_2, height_2];\n\t        }\n\t        // If the image has intrinsic proportions, it's stretched to the specified dimension.\n\t        // The unspecified dimension is computed using the specified dimension and the intrinsic proportions.\n\t        if (hasIntrinsicProportion) {\n\t            var width_3 = 0;\n\t            var height_3 = 0;\n\t            if (isLengthPercentage(first)) {\n\t                width_3 = getAbsoluteValue(first, bounds.width);\n\t            }\n\t            else if (isLengthPercentage(second)) {\n\t                height_3 = getAbsoluteValue(second, bounds.height);\n\t            }\n\t            if (isAuto(first)) {\n\t                width_3 = height_3 * intrinsicProportion;\n\t            }\n\t            else if (!second || isAuto(second)) {\n\t                height_3 = width_3 / intrinsicProportion;\n\t            }\n\t            return [width_3, height_3];\n\t        }\n\t        // If the image has no intrinsic proportions, it's stretched to the specified dimension.\n\t        // The unspecified dimension is computed using the image's corresponding intrinsic dimension,\n\t        // if there is one. If there is no such intrinsic dimension,\n\t        // it becomes the corresponding dimension of the background positioning area.\n\t        var width = null;\n\t        var height = null;\n\t        if (isLengthPercentage(first)) {\n\t            width = getAbsoluteValue(first, bounds.width);\n\t        }\n\t        else if (second && isLengthPercentage(second)) {\n\t            height = getAbsoluteValue(second, bounds.height);\n\t        }\n\t        if (width !== null && (!second || isAuto(second))) {\n\t            height =\n\t                hasIntrinsicWidth && hasIntrinsicHeight\n\t                    ? (width / intrinsicWidth) * intrinsicHeight\n\t                    : bounds.height;\n\t        }\n\t        if (height !== null && isAuto(first)) {\n\t            width =\n\t                hasIntrinsicWidth && hasIntrinsicHeight\n\t                    ? (height / intrinsicHeight) * intrinsicWidth\n\t                    : bounds.width;\n\t        }\n\t        if (width !== null && height !== null) {\n\t            return [width, height];\n\t        }\n\t        throw new Error(\"Unable to calculate background-size for element\");\n\t    };\n\t    var getBackgroundValueForIndex = function (values, index) {\n\t        var value = values[index];\n\t        if (typeof value === 'undefined') {\n\t            return values[0];\n\t        }\n\t        return value;\n\t    };\n\t    var calculateBackgroundRepeatPath = function (repeat, _a, _b, backgroundPositioningArea, backgroundPaintingArea) {\n\t        var x = _a[0], y = _a[1];\n\t        var width = _b[0], height = _b[1];\n\t        switch (repeat) {\n\t            case 2 /* REPEAT_X */:\n\t                return [\n\t                    new Vector(Math.round(backgroundPositioningArea.left), Math.round(backgroundPositioningArea.top + y)),\n\t                    new Vector(Math.round(backgroundPositioningArea.left + backgroundPositioningArea.width), Math.round(backgroundPositioningArea.top + y)),\n\t                    new Vector(Math.round(backgroundPositioningArea.left + backgroundPositioningArea.width), Math.round(height + backgroundPositioningArea.top + y)),\n\t                    new Vector(Math.round(backgroundPositioningArea.left), Math.round(height + backgroundPositioningArea.top + y))\n\t                ];\n\t            case 3 /* REPEAT_Y */:\n\t                return [\n\t                    new Vector(Math.round(backgroundPositioningArea.left + x), Math.round(backgroundPositioningArea.top)),\n\t                    new Vector(Math.round(backgroundPositioningArea.left + x + width), Math.round(backgroundPositioningArea.top)),\n\t                    new Vector(Math.round(backgroundPositioningArea.left + x + width), Math.round(backgroundPositioningArea.height + backgroundPositioningArea.top)),\n\t                    new Vector(Math.round(backgroundPositioningArea.left + x), Math.round(backgroundPositioningArea.height + backgroundPositioningArea.top))\n\t                ];\n\t            case 1 /* NO_REPEAT */:\n\t                return [\n\t                    new Vector(Math.round(backgroundPositioningArea.left + x), Math.round(backgroundPositioningArea.top + y)),\n\t                    new Vector(Math.round(backgroundPositioningArea.left + x + width), Math.round(backgroundPositioningArea.top + y)),\n\t                    new Vector(Math.round(backgroundPositioningArea.left + x + width), Math.round(backgroundPositioningArea.top + y + height)),\n\t                    new Vector(Math.round(backgroundPositioningArea.left + x), Math.round(backgroundPositioningArea.top + y + height))\n\t                ];\n\t            default:\n\t                return [\n\t                    new Vector(Math.round(backgroundPaintingArea.left), Math.round(backgroundPaintingArea.top)),\n\t                    new Vector(Math.round(backgroundPaintingArea.left + backgroundPaintingArea.width), Math.round(backgroundPaintingArea.top)),\n\t                    new Vector(Math.round(backgroundPaintingArea.left + backgroundPaintingArea.width), Math.round(backgroundPaintingArea.height + backgroundPaintingArea.top)),\n\t                    new Vector(Math.round(backgroundPaintingArea.left), Math.round(backgroundPaintingArea.height + backgroundPaintingArea.top))\n\t                ];\n\t        }\n\t    };\n\n\t    var SMALL_IMAGE = 'data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7';\n\n\t    var SAMPLE_TEXT = 'Hidden Text';\n\t    var FontMetrics = /** @class */ (function () {\n\t        function FontMetrics(document) {\n\t            this._data = {};\n\t            this._document = document;\n\t        }\n\t        FontMetrics.prototype.parseMetrics = function (fontFamily, fontSize) {\n\t            var container = this._document.createElement('div');\n\t            var img = this._document.createElement('img');\n\t            var span = this._document.createElement('span');\n\t            var body = this._document.body;\n\t            container.style.visibility = 'hidden';\n\t            container.style.fontFamily = fontFamily;\n\t            container.style.fontSize = fontSize;\n\t            container.style.margin = '0';\n\t            container.style.padding = '0';\n\t            container.style.whiteSpace = 'nowrap';\n\t            body.appendChild(container);\n\t            img.src = SMALL_IMAGE;\n\t            img.width = 1;\n\t            img.height = 1;\n\t            img.style.margin = '0';\n\t            img.style.padding = '0';\n\t            img.style.verticalAlign = 'baseline';\n\t            span.style.fontFamily = fontFamily;\n\t            span.style.fontSize = fontSize;\n\t            span.style.margin = '0';\n\t            span.style.padding = '0';\n\t            span.appendChild(this._document.createTextNode(SAMPLE_TEXT));\n\t            container.appendChild(span);\n\t            container.appendChild(img);\n\t            var baseline = img.offsetTop - span.offsetTop + 2;\n\t            container.removeChild(span);\n\t            container.appendChild(this._document.createTextNode(SAMPLE_TEXT));\n\t            container.style.lineHeight = 'normal';\n\t            img.style.verticalAlign = 'super';\n\t            var middle = img.offsetTop - container.offsetTop + 2;\n\t            body.removeChild(container);\n\t            return { baseline: baseline, middle: middle };\n\t        };\n\t        FontMetrics.prototype.getMetrics = function (fontFamily, fontSize) {\n\t            var key = fontFamily + \" \" + fontSize;\n\t            if (typeof this._data[key] === 'undefined') {\n\t                this._data[key] = this.parseMetrics(fontFamily, fontSize);\n\t            }\n\t            return this._data[key];\n\t        };\n\t        return FontMetrics;\n\t    }());\n\n\t    var Renderer = /** @class */ (function () {\n\t        function Renderer(context, options) {\n\t            this.context = context;\n\t            this.options = options;\n\t        }\n\t        return Renderer;\n\t    }());\n\n\t    var MASK_OFFSET = 10000;\n\t    var CanvasRenderer = /** @class */ (function (_super) {\n\t        __extends(CanvasRenderer, _super);\n\t        function CanvasRenderer(context, options) {\n\t            var _this = _super.call(this, context, options) || this;\n\t            _this._activeEffects = [];\n\t            _this.canvas = options.canvas ? options.canvas : document.createElement('canvas');\n\t            _this.ctx = _this.canvas.getContext('2d');\n\t            if (!options.canvas) {\n\t                _this.canvas.width = Math.floor(options.width * options.scale);\n\t                _this.canvas.height = Math.floor(options.height * options.scale);\n\t                _this.canvas.style.width = options.width + \"px\";\n\t                _this.canvas.style.height = options.height + \"px\";\n\t            }\n\t            _this.fontMetrics = new FontMetrics(document);\n\t            _this.ctx.scale(_this.options.scale, _this.options.scale);\n\t            _this.ctx.translate(-options.x, -options.y);\n\t            _this.ctx.textBaseline = 'bottom';\n\t            _this._activeEffects = [];\n\t            _this.context.logger.debug(\"Canvas renderer initialized (\" + options.width + \"x\" + options.height + \") with scale \" + options.scale);\n\t            return _this;\n\t        }\n\t        CanvasRenderer.prototype.applyEffects = function (effects) {\n\t            var _this = this;\n\t            while (this._activeEffects.length) {\n\t                this.popEffect();\n\t            }\n\t            effects.forEach(function (effect) { return _this.applyEffect(effect); });\n\t        };\n\t        CanvasRenderer.prototype.applyEffect = function (effect) {\n\t            this.ctx.save();\n\t            if (isOpacityEffect(effect)) {\n\t                this.ctx.globalAlpha = effect.opacity;\n\t            }\n\t            if (isTransformEffect(effect)) {\n\t                this.ctx.translate(effect.offsetX, effect.offsetY);\n\t                this.ctx.transform(effect.matrix[0], effect.matrix[1], effect.matrix[2], effect.matrix[3], effect.matrix[4], effect.matrix[5]);\n\t                this.ctx.translate(-effect.offsetX, -effect.offsetY);\n\t            }\n\t            if (isClipEffect(effect)) {\n\t                this.path(effect.path);\n\t                this.ctx.clip();\n\t            }\n\t            this._activeEffects.push(effect);\n\t        };\n\t        CanvasRenderer.prototype.popEffect = function () {\n\t            this._activeEffects.pop();\n\t            this.ctx.restore();\n\t        };\n\t        CanvasRenderer.prototype.renderStack = function (stack) {\n\t            return __awaiter(this, void 0, void 0, function () {\n\t                var styles;\n\t                return __generator(this, function (_a) {\n\t                    switch (_a.label) {\n\t                        case 0:\n\t                            styles = stack.element.container.styles;\n\t                            if (!styles.isVisible()) return [3 /*break*/, 2];\n\t                            return [4 /*yield*/, this.renderStackContent(stack)];\n\t                        case 1:\n\t                            _a.sent();\n\t                            _a.label = 2;\n\t                        case 2: return [2 /*return*/];\n\t                    }\n\t                });\n\t            });\n\t        };\n\t        CanvasRenderer.prototype.renderNode = function (paint) {\n\t            return __awaiter(this, void 0, void 0, function () {\n\t                return __generator(this, function (_a) {\n\t                    switch (_a.label) {\n\t                        case 0:\n\t                            if (contains(paint.container.flags, 16 /* DEBUG_RENDER */)) {\n\t                                debugger;\n\t                            }\n\t                            if (!paint.container.styles.isVisible()) return [3 /*break*/, 3];\n\t                            return [4 /*yield*/, this.renderNodeBackgroundAndBorders(paint)];\n\t                        case 1:\n\t                            _a.sent();\n\t                            return [4 /*yield*/, this.renderNodeContent(paint)];\n\t                        case 2:\n\t                            _a.sent();\n\t                            _a.label = 3;\n\t                        case 3: return [2 /*return*/];\n\t                    }\n\t                });\n\t            });\n\t        };\n\t        CanvasRenderer.prototype.renderTextWithLetterSpacing = function (text, letterSpacing, baseline) {\n\t            var _this = this;\n\t            if (letterSpacing === 0) {\n\t                this.ctx.fillText(text.text, text.bounds.left, text.bounds.top + baseline);\n\t            }\n\t            else {\n\t                var letters = segmentGraphemes(text.text);\n\t                letters.reduce(function (left, letter) {\n\t                    _this.ctx.fillText(letter, left, text.bounds.top + baseline);\n\t                    return left + _this.ctx.measureText(letter).width;\n\t                }, text.bounds.left);\n\t            }\n\t        };\n\t        CanvasRenderer.prototype.createFontStyle = function (styles) {\n\t            var fontVariant = styles.fontVariant\n\t                .filter(function (variant) { return variant === 'normal' || variant === 'small-caps'; })\n\t                .join('');\n\t            var fontFamily = fixIOSSystemFonts(styles.fontFamily).join(', ');\n\t            var fontSize = isDimensionToken(styles.fontSize)\n\t                ? \"\" + styles.fontSize.number + styles.fontSize.unit\n\t                : styles.fontSize.number + \"px\";\n\t            return [\n\t                [styles.fontStyle, fontVariant, styles.fontWeight, fontSize, fontFamily].join(' '),\n\t                fontFamily,\n\t                fontSize\n\t            ];\n\t        };\n\t        CanvasRenderer.prototype.renderTextNode = function (text, styles) {\n\t            return __awaiter(this, void 0, void 0, function () {\n\t                var _a, font, fontFamily, fontSize, _b, baseline, middle, paintOrder;\n\t                var _this = this;\n\t                return __generator(this, function (_c) {\n\t                    _a = this.createFontStyle(styles), font = _a[0], fontFamily = _a[1], fontSize = _a[2];\n\t                    this.ctx.font = font;\n\t                    this.ctx.direction = styles.direction === 1 /* RTL */ ? 'rtl' : 'ltr';\n\t                    this.ctx.textAlign = 'left';\n\t                    this.ctx.textBaseline = 'alphabetic';\n\t                    _b = this.fontMetrics.getMetrics(fontFamily, fontSize), baseline = _b.baseline, middle = _b.middle;\n\t                    paintOrder = styles.paintOrder;\n\t                    text.textBounds.forEach(function (text) {\n\t                        paintOrder.forEach(function (paintOrderLayer) {\n\t                            switch (paintOrderLayer) {\n\t                                case 0 /* FILL */:\n\t                                    _this.ctx.fillStyle = asString(styles.color);\n\t                                    _this.renderTextWithLetterSpacing(text, styles.letterSpacing, baseline);\n\t                                    var textShadows = styles.textShadow;\n\t                                    if (textShadows.length && text.text.trim().length) {\n\t                                        textShadows\n\t                                            .slice(0)\n\t                                            .reverse()\n\t                                            .forEach(function (textShadow) {\n\t                                            _this.ctx.shadowColor = asString(textShadow.color);\n\t                                            _this.ctx.shadowOffsetX = textShadow.offsetX.number * _this.options.scale;\n\t                                            _this.ctx.shadowOffsetY = textShadow.offsetY.number * _this.options.scale;\n\t                                            _this.ctx.shadowBlur = textShadow.blur.number;\n\t                                            _this.renderTextWithLetterSpacing(text, styles.letterSpacing, baseline);\n\t                                        });\n\t                                        _this.ctx.shadowColor = '';\n\t                                        _this.ctx.shadowOffsetX = 0;\n\t                                        _this.ctx.shadowOffsetY = 0;\n\t                                        _this.ctx.shadowBlur = 0;\n\t                                    }\n\t                                    if (styles.textDecorationLine.length) {\n\t                                        _this.ctx.fillStyle = asString(styles.textDecorationColor || styles.color);\n\t                                        styles.textDecorationLine.forEach(function (textDecorationLine) {\n\t                                            switch (textDecorationLine) {\n\t                                                case 1 /* UNDERLINE */:\n\t                                                    // Draws a line at the baseline of the font\n\t                                                    // TODO As some browsers display the line as more than 1px if the font-size is big,\n\t                                                    // need to take that into account both in position and size\n\t                                                    _this.ctx.fillRect(text.bounds.left, Math.round(text.bounds.top + baseline), text.bounds.width, 1);\n\t                                                    break;\n\t                                                case 2 /* OVERLINE */:\n\t                                                    _this.ctx.fillRect(text.bounds.left, Math.round(text.bounds.top), text.bounds.width, 1);\n\t                                                    break;\n\t                                                case 3 /* LINE_THROUGH */:\n\t                                                    // TODO try and find exact position for line-through\n\t                                                    _this.ctx.fillRect(text.bounds.left, Math.ceil(text.bounds.top + middle), text.bounds.width, 1);\n\t                                                    break;\n\t                                            }\n\t                                        });\n\t                                    }\n\t                                    break;\n\t                                case 1 /* STROKE */:\n\t                                    if (styles.webkitTextStrokeWidth && text.text.trim().length) {\n\t                                        _this.ctx.strokeStyle = asString(styles.webkitTextStrokeColor);\n\t                                        _this.ctx.lineWidth = styles.webkitTextStrokeWidth;\n\t                                        // eslint-disable-next-line @typescript-eslint/no-explicit-any\n\t                                        _this.ctx.lineJoin = !!window.chrome ? 'miter' : 'round';\n\t                                        _this.ctx.strokeText(text.text, text.bounds.left, text.bounds.top + baseline);\n\t                                    }\n\t                                    _this.ctx.strokeStyle = '';\n\t                                    _this.ctx.lineWidth = 0;\n\t                                    _this.ctx.lineJoin = 'miter';\n\t                                    break;\n\t                            }\n\t                        });\n\t                    });\n\t                    return [2 /*return*/];\n\t                });\n\t            });\n\t        };\n\t        CanvasRenderer.prototype.renderReplacedElement = function (container, curves, image) {\n\t            if (image && container.intrinsicWidth > 0 && container.intrinsicHeight > 0) {\n\t                var box = contentBox(container);\n\t                var path = calculatePaddingBoxPath(curves);\n\t                this.path(path);\n\t                this.ctx.save();\n\t                this.ctx.clip();\n\t                this.ctx.drawImage(image, 0, 0, container.intrinsicWidth, container.intrinsicHeight, box.left, box.top, box.width, box.height);\n\t                this.ctx.restore();\n\t            }\n\t        };\n\t        CanvasRenderer.prototype.renderNodeContent = function (paint) {\n\t            return __awaiter(this, void 0, void 0, function () {\n\t                var container, curves, styles, _i, _a, child, image, image, iframeRenderer, canvas, size, _b, fontFamily, fontSize, baseline, bounds, x, textBounds, img, image, url, fontFamily, bounds;\n\t                return __generator(this, function (_c) {\n\t                    switch (_c.label) {\n\t                        case 0:\n\t                            this.applyEffects(paint.getEffects(4 /* CONTENT */));\n\t                            container = paint.container;\n\t                            curves = paint.curves;\n\t                            styles = container.styles;\n\t                            _i = 0, _a = container.textNodes;\n\t                            _c.label = 1;\n\t                        case 1:\n\t                            if (!(_i < _a.length)) return [3 /*break*/, 4];\n\t                            child = _a[_i];\n\t                            return [4 /*yield*/, this.renderTextNode(child, styles)];\n\t                        case 2:\n\t                            _c.sent();\n\t                            _c.label = 3;\n\t                        case 3:\n\t                            _i++;\n\t                            return [3 /*break*/, 1];\n\t                        case 4:\n\t                            if (!(container instanceof ImageElementContainer)) return [3 /*break*/, 8];\n\t                            _c.label = 5;\n\t                        case 5:\n\t                            _c.trys.push([5, 7, , 8]);\n\t                            return [4 /*yield*/, this.context.cache.match(container.src)];\n\t                        case 6:\n\t                            image = _c.sent();\n\t                            this.renderReplacedElement(container, curves, image);\n\t                            return [3 /*break*/, 8];\n\t                        case 7:\n\t                            _c.sent();\n\t                            this.context.logger.error(\"Error loading image \" + container.src);\n\t                            return [3 /*break*/, 8];\n\t                        case 8:\n\t                            if (container instanceof CanvasElementContainer) {\n\t                                this.renderReplacedElement(container, curves, container.canvas);\n\t                            }\n\t                            if (!(container instanceof SVGElementContainer)) return [3 /*break*/, 12];\n\t                            _c.label = 9;\n\t                        case 9:\n\t                            _c.trys.push([9, 11, , 12]);\n\t                            return [4 /*yield*/, this.context.cache.match(container.svg)];\n\t                        case 10:\n\t                            image = _c.sent();\n\t                            this.renderReplacedElement(container, curves, image);\n\t                            return [3 /*break*/, 12];\n\t                        case 11:\n\t                            _c.sent();\n\t                            this.context.logger.error(\"Error loading svg \" + container.svg.substring(0, 255));\n\t                            return [3 /*break*/, 12];\n\t                        case 12:\n\t                            if (!(container instanceof IFrameElementContainer && container.tree)) return [3 /*break*/, 14];\n\t                            iframeRenderer = new CanvasRenderer(this.context, {\n\t                                scale: this.options.scale,\n\t                                backgroundColor: container.backgroundColor,\n\t                                x: 0,\n\t                                y: 0,\n\t                                width: container.width,\n\t                                height: container.height\n\t                            });\n\t                            return [4 /*yield*/, iframeRenderer.render(container.tree)];\n\t                        case 13:\n\t                            canvas = _c.sent();\n\t                            if (container.width && container.height) {\n\t                                this.ctx.drawImage(canvas, 0, 0, container.width, container.height, container.bounds.left, container.bounds.top, container.bounds.width, container.bounds.height);\n\t                            }\n\t                            _c.label = 14;\n\t                        case 14:\n\t                            if (container instanceof InputElementContainer) {\n\t                                size = Math.min(container.bounds.width, container.bounds.height);\n\t                                if (container.type === CHECKBOX) {\n\t                                    if (container.checked) {\n\t                                        this.ctx.save();\n\t                                        this.path([\n\t                                            new Vector(container.bounds.left + size * 0.39363, container.bounds.top + size * 0.79),\n\t                                            new Vector(container.bounds.left + size * 0.16, container.bounds.top + size * 0.5549),\n\t                                            new Vector(container.bounds.left + size * 0.27347, container.bounds.top + size * 0.44071),\n\t                                            new Vector(container.bounds.left + size * 0.39694, container.bounds.top + size * 0.5649),\n\t                                            new Vector(container.bounds.left + size * 0.72983, container.bounds.top + size * 0.23),\n\t                                            new Vector(container.bounds.left + size * 0.84, container.bounds.top + size * 0.34085),\n\t                                            new Vector(container.bounds.left + size * 0.39363, container.bounds.top + size * 0.79)\n\t                                        ]);\n\t                                        this.ctx.fillStyle = asString(INPUT_COLOR);\n\t                                        this.ctx.fill();\n\t                                        this.ctx.restore();\n\t                                    }\n\t                                }\n\t                                else if (container.type === RADIO) {\n\t                                    if (container.checked) {\n\t                                        this.ctx.save();\n\t                                        this.ctx.beginPath();\n\t                                        this.ctx.arc(container.bounds.left + size / 2, container.bounds.top + size / 2, size / 4, 0, Math.PI * 2, true);\n\t                                        this.ctx.fillStyle = asString(INPUT_COLOR);\n\t                                        this.ctx.fill();\n\t                                        this.ctx.restore();\n\t                                    }\n\t                                }\n\t                            }\n\t                            if (isTextInputElement(container) && container.value.length) {\n\t                                _b = this.createFontStyle(styles), fontFamily = _b[0], fontSize = _b[1];\n\t                                baseline = this.fontMetrics.getMetrics(fontFamily, fontSize).baseline;\n\t                                this.ctx.font = fontFamily;\n\t                                this.ctx.fillStyle = asString(styles.color);\n\t                                this.ctx.textBaseline = 'alphabetic';\n\t                                this.ctx.textAlign = canvasTextAlign(container.styles.textAlign);\n\t                                bounds = contentBox(container);\n\t                                x = 0;\n\t                                switch (container.styles.textAlign) {\n\t                                    case 1 /* CENTER */:\n\t                                        x += bounds.width / 2;\n\t                                        break;\n\t                                    case 2 /* RIGHT */:\n\t                                        x += bounds.width;\n\t                                        break;\n\t                                }\n\t                                textBounds = bounds.add(x, 0, 0, -bounds.height / 2 + 1);\n\t                                this.ctx.save();\n\t                                this.path([\n\t                                    new Vector(bounds.left, bounds.top),\n\t                                    new Vector(bounds.left + bounds.width, bounds.top),\n\t                                    new Vector(bounds.left + bounds.width, bounds.top + bounds.height),\n\t                                    new Vector(bounds.left, bounds.top + bounds.height)\n\t                                ]);\n\t                                this.ctx.clip();\n\t                                this.renderTextWithLetterSpacing(new TextBounds(container.value, textBounds), styles.letterSpacing, baseline);\n\t                                this.ctx.restore();\n\t                                this.ctx.textBaseline = 'alphabetic';\n\t                                this.ctx.textAlign = 'left';\n\t                            }\n\t                            if (!contains(container.styles.display, 2048 /* LIST_ITEM */)) return [3 /*break*/, 20];\n\t                            if (!(container.styles.listStyleImage !== null)) return [3 /*break*/, 19];\n\t                            img = container.styles.listStyleImage;\n\t                            if (!(img.type === 0 /* URL */)) return [3 /*break*/, 18];\n\t                            image = void 0;\n\t                            url = img.url;\n\t                            _c.label = 15;\n\t                        case 15:\n\t                            _c.trys.push([15, 17, , 18]);\n\t                            return [4 /*yield*/, this.context.cache.match(url)];\n\t                        case 16:\n\t                            image = _c.sent();\n\t                            this.ctx.drawImage(image, container.bounds.left - (image.width + 10), container.bounds.top);\n\t                            return [3 /*break*/, 18];\n\t                        case 17:\n\t                            _c.sent();\n\t                            this.context.logger.error(\"Error loading list-style-image \" + url);\n\t                            return [3 /*break*/, 18];\n\t                        case 18: return [3 /*break*/, 20];\n\t                        case 19:\n\t                            if (paint.listValue && container.styles.listStyleType !== -1 /* NONE */) {\n\t                                fontFamily = this.createFontStyle(styles)[0];\n\t                                this.ctx.font = fontFamily;\n\t                                this.ctx.fillStyle = asString(styles.color);\n\t                                this.ctx.textBaseline = 'middle';\n\t                                this.ctx.textAlign = 'right';\n\t                                bounds = new Bounds(container.bounds.left, container.bounds.top + getAbsoluteValue(container.styles.paddingTop, container.bounds.width), container.bounds.width, computeLineHeight(styles.lineHeight, styles.fontSize.number) / 2 + 1);\n\t                                this.renderTextWithLetterSpacing(new TextBounds(paint.listValue, bounds), styles.letterSpacing, computeLineHeight(styles.lineHeight, styles.fontSize.number) / 2 + 2);\n\t                                this.ctx.textBaseline = 'bottom';\n\t                                this.ctx.textAlign = 'left';\n\t                            }\n\t                            _c.label = 20;\n\t                        case 20: return [2 /*return*/];\n\t                    }\n\t                });\n\t            });\n\t        };\n\t        CanvasRenderer.prototype.renderStackContent = function (stack) {\n\t            return __awaiter(this, void 0, void 0, function () {\n\t                var _i, _a, child, _b, _c, child, _d, _e, child, _f, _g, child, _h, _j, child, _k, _l, child, _m, _o, child;\n\t                return __generator(this, function (_p) {\n\t                    switch (_p.label) {\n\t                        case 0:\n\t                            if (contains(stack.element.container.flags, 16 /* DEBUG_RENDER */)) {\n\t                                debugger;\n\t                            }\n\t                            // https://www.w3.org/TR/css-position-3/#painting-order\n\t                            // 1. the background and borders of the element forming the stacking context.\n\t                            return [4 /*yield*/, this.renderNodeBackgroundAndBorders(stack.element)];\n\t                        case 1:\n\t                            // https://www.w3.org/TR/css-position-3/#painting-order\n\t                            // 1. the background and borders of the element forming the stacking context.\n\t                            _p.sent();\n\t                            _i = 0, _a = stack.negativeZIndex;\n\t                            _p.label = 2;\n\t                        case 2:\n\t                            if (!(_i < _a.length)) return [3 /*break*/, 5];\n\t                            child = _a[_i];\n\t                            return [4 /*yield*/, this.renderStack(child)];\n\t                        case 3:\n\t                            _p.sent();\n\t                            _p.label = 4;\n\t                        case 4:\n\t                            _i++;\n\t                            return [3 /*break*/, 2];\n\t                        case 5: \n\t                        // 3. For all its in-flow, non-positioned, block-level descendants in tree order:\n\t                        return [4 /*yield*/, this.renderNodeContent(stack.element)];\n\t                        case 6:\n\t                            // 3. For all its in-flow, non-positioned, block-level descendants in tree order:\n\t                            _p.sent();\n\t                            _b = 0, _c = stack.nonInlineLevel;\n\t                            _p.label = 7;\n\t                        case 7:\n\t                            if (!(_b < _c.length)) return [3 /*break*/, 10];\n\t                            child = _c[_b];\n\t                            return [4 /*yield*/, this.renderNode(child)];\n\t                        case 8:\n\t                            _p.sent();\n\t                            _p.label = 9;\n\t                        case 9:\n\t                            _b++;\n\t                            return [3 /*break*/, 7];\n\t                        case 10:\n\t                            _d = 0, _e = stack.nonPositionedFloats;\n\t                            _p.label = 11;\n\t                        case 11:\n\t                            if (!(_d < _e.length)) return [3 /*break*/, 14];\n\t                            child = _e[_d];\n\t                            return [4 /*yield*/, this.renderStack(child)];\n\t                        case 12:\n\t                            _p.sent();\n\t                            _p.label = 13;\n\t                        case 13:\n\t                            _d++;\n\t                            return [3 /*break*/, 11];\n\t                        case 14:\n\t                            _f = 0, _g = stack.nonPositionedInlineLevel;\n\t                            _p.label = 15;\n\t                        case 15:\n\t                            if (!(_f < _g.length)) return [3 /*break*/, 18];\n\t                            child = _g[_f];\n\t                            return [4 /*yield*/, this.renderStack(child)];\n\t                        case 16:\n\t                            _p.sent();\n\t                            _p.label = 17;\n\t                        case 17:\n\t                            _f++;\n\t                            return [3 /*break*/, 15];\n\t                        case 18:\n\t                            _h = 0, _j = stack.inlineLevel;\n\t                            _p.label = 19;\n\t                        case 19:\n\t                            if (!(_h < _j.length)) return [3 /*break*/, 22];\n\t                            child = _j[_h];\n\t                            return [4 /*yield*/, this.renderNode(child)];\n\t                        case 20:\n\t                            _p.sent();\n\t                            _p.label = 21;\n\t                        case 21:\n\t                            _h++;\n\t                            return [3 /*break*/, 19];\n\t                        case 22:\n\t                            _k = 0, _l = stack.zeroOrAutoZIndexOrTransformedOrOpacity;\n\t                            _p.label = 23;\n\t                        case 23:\n\t                            if (!(_k < _l.length)) return [3 /*break*/, 26];\n\t                            child = _l[_k];\n\t                            return [4 /*yield*/, this.renderStack(child)];\n\t                        case 24:\n\t                            _p.sent();\n\t                            _p.label = 25;\n\t                        case 25:\n\t                            _k++;\n\t                            return [3 /*break*/, 23];\n\t                        case 26:\n\t                            _m = 0, _o = stack.positiveZIndex;\n\t                            _p.label = 27;\n\t                        case 27:\n\t                            if (!(_m < _o.length)) return [3 /*break*/, 30];\n\t                            child = _o[_m];\n\t                            return [4 /*yield*/, this.renderStack(child)];\n\t                        case 28:\n\t                            _p.sent();\n\t                            _p.label = 29;\n\t                        case 29:\n\t                            _m++;\n\t                            return [3 /*break*/, 27];\n\t                        case 30: return [2 /*return*/];\n\t                    }\n\t                });\n\t            });\n\t        };\n\t        CanvasRenderer.prototype.mask = function (paths) {\n\t            this.ctx.beginPath();\n\t            this.ctx.moveTo(0, 0);\n\t            this.ctx.lineTo(this.canvas.width, 0);\n\t            this.ctx.lineTo(this.canvas.width, this.canvas.height);\n\t            this.ctx.lineTo(0, this.canvas.height);\n\t            this.ctx.lineTo(0, 0);\n\t            this.formatPath(paths.slice(0).reverse());\n\t            this.ctx.closePath();\n\t        };\n\t        CanvasRenderer.prototype.path = function (paths) {\n\t            this.ctx.beginPath();\n\t            this.formatPath(paths);\n\t            this.ctx.closePath();\n\t        };\n\t        CanvasRenderer.prototype.formatPath = function (paths) {\n\t            var _this = this;\n\t            paths.forEach(function (point, index) {\n\t                var start = isBezierCurve(point) ? point.start : point;\n\t                if (index === 0) {\n\t                    _this.ctx.moveTo(start.x, start.y);\n\t                }\n\t                else {\n\t                    _this.ctx.lineTo(start.x, start.y);\n\t                }\n\t                if (isBezierCurve(point)) {\n\t                    _this.ctx.bezierCurveTo(point.startControl.x, point.startControl.y, point.endControl.x, point.endControl.y, point.end.x, point.end.y);\n\t                }\n\t            });\n\t        };\n\t        CanvasRenderer.prototype.renderRepeat = function (path, pattern, offsetX, offsetY) {\n\t            this.path(path);\n\t            this.ctx.fillStyle = pattern;\n\t            this.ctx.translate(offsetX, offsetY);\n\t            this.ctx.fill();\n\t            this.ctx.translate(-offsetX, -offsetY);\n\t        };\n\t        CanvasRenderer.prototype.resizeImage = function (image, width, height) {\n\t            var _a;\n\t            if (image.width === width && image.height === height) {\n\t                return image;\n\t            }\n\t            var ownerDocument = (_a = this.canvas.ownerDocument) !== null && _a !== void 0 ? _a : document;\n\t            var canvas = ownerDocument.createElement('canvas');\n\t            canvas.width = Math.max(1, width);\n\t            canvas.height = Math.max(1, height);\n\t            var ctx = canvas.getContext('2d');\n\t            ctx.drawImage(image, 0, 0, image.width, image.height, 0, 0, width, height);\n\t            return canvas;\n\t        };\n\t        CanvasRenderer.prototype.renderBackgroundImage = function (container) {\n\t            return __awaiter(this, void 0, void 0, function () {\n\t                var index, _loop_1, this_1, _i, _a, backgroundImage;\n\t                return __generator(this, function (_b) {\n\t                    switch (_b.label) {\n\t                        case 0:\n\t                            index = container.styles.backgroundImage.length - 1;\n\t                            _loop_1 = function (backgroundImage) {\n\t                                var image, url, _c, path, x, y, width, height, pattern, _d, path, x, y, width, height, _e, lineLength, x0, x1, y0, y1, canvas, ctx, gradient_1, pattern, _f, path, left, top_1, width, height, position, x, y, _g, rx, ry, radialGradient_1, midX, midY, f, invF;\n\t                                return __generator(this, function (_h) {\n\t                                    switch (_h.label) {\n\t                                        case 0:\n\t                                            if (!(backgroundImage.type === 0 /* URL */)) return [3 /*break*/, 5];\n\t                                            image = void 0;\n\t                                            url = backgroundImage.url;\n\t                                            _h.label = 1;\n\t                                        case 1:\n\t                                            _h.trys.push([1, 3, , 4]);\n\t                                            return [4 /*yield*/, this_1.context.cache.match(url)];\n\t                                        case 2:\n\t                                            image = _h.sent();\n\t                                            return [3 /*break*/, 4];\n\t                                        case 3:\n\t                                            _h.sent();\n\t                                            this_1.context.logger.error(\"Error loading background-image \" + url);\n\t                                            return [3 /*break*/, 4];\n\t                                        case 4:\n\t                                            if (image) {\n\t                                                _c = calculateBackgroundRendering(container, index, [\n\t                                                    image.width,\n\t                                                    image.height,\n\t                                                    image.width / image.height\n\t                                                ]), path = _c[0], x = _c[1], y = _c[2], width = _c[3], height = _c[4];\n\t                                                pattern = this_1.ctx.createPattern(this_1.resizeImage(image, width, height), 'repeat');\n\t                                                this_1.renderRepeat(path, pattern, x, y);\n\t                                            }\n\t                                            return [3 /*break*/, 6];\n\t                                        case 5:\n\t                                            if (isLinearGradient(backgroundImage)) {\n\t                                                _d = calculateBackgroundRendering(container, index, [null, null, null]), path = _d[0], x = _d[1], y = _d[2], width = _d[3], height = _d[4];\n\t                                                _e = calculateGradientDirection(backgroundImage.angle, width, height), lineLength = _e[0], x0 = _e[1], x1 = _e[2], y0 = _e[3], y1 = _e[4];\n\t                                                canvas = document.createElement('canvas');\n\t                                                canvas.width = width;\n\t                                                canvas.height = height;\n\t                                                ctx = canvas.getContext('2d');\n\t                                                gradient_1 = ctx.createLinearGradient(x0, y0, x1, y1);\n\t                                                processColorStops(backgroundImage.stops, lineLength).forEach(function (colorStop) {\n\t                                                    return gradient_1.addColorStop(colorStop.stop, asString(colorStop.color));\n\t                                                });\n\t                                                ctx.fillStyle = gradient_1;\n\t                                                ctx.fillRect(0, 0, width, height);\n\t                                                if (width > 0 && height > 0) {\n\t                                                    pattern = this_1.ctx.createPattern(canvas, 'repeat');\n\t                                                    this_1.renderRepeat(path, pattern, x, y);\n\t                                                }\n\t                                            }\n\t                                            else if (isRadialGradient(backgroundImage)) {\n\t                                                _f = calculateBackgroundRendering(container, index, [\n\t                                                    null,\n\t                                                    null,\n\t                                                    null\n\t                                                ]), path = _f[0], left = _f[1], top_1 = _f[2], width = _f[3], height = _f[4];\n\t                                                position = backgroundImage.position.length === 0 ? [FIFTY_PERCENT] : backgroundImage.position;\n\t                                                x = getAbsoluteValue(position[0], width);\n\t                                                y = getAbsoluteValue(position[position.length - 1], height);\n\t                                                _g = calculateRadius(backgroundImage, x, y, width, height), rx = _g[0], ry = _g[1];\n\t                                                if (rx > 0 && ry > 0) {\n\t                                                    radialGradient_1 = this_1.ctx.createRadialGradient(left + x, top_1 + y, 0, left + x, top_1 + y, rx);\n\t                                                    processColorStops(backgroundImage.stops, rx * 2).forEach(function (colorStop) {\n\t                                                        return radialGradient_1.addColorStop(colorStop.stop, asString(colorStop.color));\n\t                                                    });\n\t                                                    this_1.path(path);\n\t                                                    this_1.ctx.fillStyle = radialGradient_1;\n\t                                                    if (rx !== ry) {\n\t                                                        midX = container.bounds.left + 0.5 * container.bounds.width;\n\t                                                        midY = container.bounds.top + 0.5 * container.bounds.height;\n\t                                                        f = ry / rx;\n\t                                                        invF = 1 / f;\n\t                                                        this_1.ctx.save();\n\t                                                        this_1.ctx.translate(midX, midY);\n\t                                                        this_1.ctx.transform(1, 0, 0, f, 0, 0);\n\t                                                        this_1.ctx.translate(-midX, -midY);\n\t                                                        this_1.ctx.fillRect(left, invF * (top_1 - midY) + midY, width, height * invF);\n\t                                                        this_1.ctx.restore();\n\t                                                    }\n\t                                                    else {\n\t                                                        this_1.ctx.fill();\n\t                                                    }\n\t                                                }\n\t                                            }\n\t                                            _h.label = 6;\n\t                                        case 6:\n\t                                            index--;\n\t                                            return [2 /*return*/];\n\t                                    }\n\t                                });\n\t                            };\n\t                            this_1 = this;\n\t                            _i = 0, _a = container.styles.backgroundImage.slice(0).reverse();\n\t                            _b.label = 1;\n\t                        case 1:\n\t                            if (!(_i < _a.length)) return [3 /*break*/, 4];\n\t                            backgroundImage = _a[_i];\n\t                            return [5 /*yield**/, _loop_1(backgroundImage)];\n\t                        case 2:\n\t                            _b.sent();\n\t                            _b.label = 3;\n\t                        case 3:\n\t                            _i++;\n\t                            return [3 /*break*/, 1];\n\t                        case 4: return [2 /*return*/];\n\t                    }\n\t                });\n\t            });\n\t        };\n\t        CanvasRenderer.prototype.renderSolidBorder = function (color, side, curvePoints) {\n\t            return __awaiter(this, void 0, void 0, function () {\n\t                return __generator(this, function (_a) {\n\t                    this.path(parsePathForBorder(curvePoints, side));\n\t                    this.ctx.fillStyle = asString(color);\n\t                    this.ctx.fill();\n\t                    return [2 /*return*/];\n\t                });\n\t            });\n\t        };\n\t        CanvasRenderer.prototype.renderDoubleBorder = function (color, width, side, curvePoints) {\n\t            return __awaiter(this, void 0, void 0, function () {\n\t                var outerPaths, innerPaths;\n\t                return __generator(this, function (_a) {\n\t                    switch (_a.label) {\n\t                        case 0:\n\t                            if (!(width < 3)) return [3 /*break*/, 2];\n\t                            return [4 /*yield*/, this.renderSolidBorder(color, side, curvePoints)];\n\t                        case 1:\n\t                            _a.sent();\n\t                            return [2 /*return*/];\n\t                        case 2:\n\t                            outerPaths = parsePathForBorderDoubleOuter(curvePoints, side);\n\t                            this.path(outerPaths);\n\t                            this.ctx.fillStyle = asString(color);\n\t                            this.ctx.fill();\n\t                            innerPaths = parsePathForBorderDoubleInner(curvePoints, side);\n\t                            this.path(innerPaths);\n\t                            this.ctx.fill();\n\t                            return [2 /*return*/];\n\t                    }\n\t                });\n\t            });\n\t        };\n\t        CanvasRenderer.prototype.renderNodeBackgroundAndBorders = function (paint) {\n\t            return __awaiter(this, void 0, void 0, function () {\n\t                var styles, hasBackground, borders, backgroundPaintingArea, side, _i, borders_1, border;\n\t                var _this = this;\n\t                return __generator(this, function (_a) {\n\t                    switch (_a.label) {\n\t                        case 0:\n\t                            this.applyEffects(paint.getEffects(2 /* BACKGROUND_BORDERS */));\n\t                            styles = paint.container.styles;\n\t                            hasBackground = !isTransparent(styles.backgroundColor) || styles.backgroundImage.length;\n\t                            borders = [\n\t                                { style: styles.borderTopStyle, color: styles.borderTopColor, width: styles.borderTopWidth },\n\t                                { style: styles.borderRightStyle, color: styles.borderRightColor, width: styles.borderRightWidth },\n\t                                { style: styles.borderBottomStyle, color: styles.borderBottomColor, width: styles.borderBottomWidth },\n\t                                { style: styles.borderLeftStyle, color: styles.borderLeftColor, width: styles.borderLeftWidth }\n\t                            ];\n\t                            backgroundPaintingArea = calculateBackgroundCurvedPaintingArea(getBackgroundValueForIndex(styles.backgroundClip, 0), paint.curves);\n\t                            if (!(hasBackground || styles.boxShadow.length)) return [3 /*break*/, 2];\n\t                            this.ctx.save();\n\t                            this.path(backgroundPaintingArea);\n\t                            this.ctx.clip();\n\t                            if (!isTransparent(styles.backgroundColor)) {\n\t                                this.ctx.fillStyle = asString(styles.backgroundColor);\n\t                                this.ctx.fill();\n\t                            }\n\t                            return [4 /*yield*/, this.renderBackgroundImage(paint.container)];\n\t                        case 1:\n\t                            _a.sent();\n\t                            this.ctx.restore();\n\t                            styles.boxShadow\n\t                                .slice(0)\n\t                                .reverse()\n\t                                .forEach(function (shadow) {\n\t                                _this.ctx.save();\n\t                                var borderBoxArea = calculateBorderBoxPath(paint.curves);\n\t                                var maskOffset = shadow.inset ? 0 : MASK_OFFSET;\n\t                                var shadowPaintingArea = transformPath(borderBoxArea, -maskOffset + (shadow.inset ? 1 : -1) * shadow.spread.number, (shadow.inset ? 1 : -1) * shadow.spread.number, shadow.spread.number * (shadow.inset ? -2 : 2), shadow.spread.number * (shadow.inset ? -2 : 2));\n\t                                if (shadow.inset) {\n\t                                    _this.path(borderBoxArea);\n\t                                    _this.ctx.clip();\n\t                                    _this.mask(shadowPaintingArea);\n\t                                }\n\t                                else {\n\t                                    _this.mask(borderBoxArea);\n\t                                    _this.ctx.clip();\n\t                                    _this.path(shadowPaintingArea);\n\t                                }\n\t                                _this.ctx.shadowOffsetX = shadow.offsetX.number + maskOffset;\n\t                                _this.ctx.shadowOffsetY = shadow.offsetY.number;\n\t                                _this.ctx.shadowColor = asString(shadow.color);\n\t                                _this.ctx.shadowBlur = shadow.blur.number;\n\t                                _this.ctx.fillStyle = shadow.inset ? asString(shadow.color) : 'rgba(0,0,0,1)';\n\t                                _this.ctx.fill();\n\t                                _this.ctx.restore();\n\t                            });\n\t                            _a.label = 2;\n\t                        case 2:\n\t                            side = 0;\n\t                            _i = 0, borders_1 = borders;\n\t                            _a.label = 3;\n\t                        case 3:\n\t                            if (!(_i < borders_1.length)) return [3 /*break*/, 13];\n\t                            border = borders_1[_i];\n\t                            if (!(border.style !== 0 /* NONE */ && !isTransparent(border.color) && border.width > 0)) return [3 /*break*/, 11];\n\t                            if (!(border.style === 2 /* DASHED */)) return [3 /*break*/, 5];\n\t                            return [4 /*yield*/, this.renderDashedDottedBorder(border.color, border.width, side, paint.curves, 2 /* DASHED */)];\n\t                        case 4:\n\t                            _a.sent();\n\t                            return [3 /*break*/, 11];\n\t                        case 5:\n\t                            if (!(border.style === 3 /* DOTTED */)) return [3 /*break*/, 7];\n\t                            return [4 /*yield*/, this.renderDashedDottedBorder(border.color, border.width, side, paint.curves, 3 /* DOTTED */)];\n\t                        case 6:\n\t                            _a.sent();\n\t                            return [3 /*break*/, 11];\n\t                        case 7:\n\t                            if (!(border.style === 4 /* DOUBLE */)) return [3 /*break*/, 9];\n\t                            return [4 /*yield*/, this.renderDoubleBorder(border.color, border.width, side, paint.curves)];\n\t                        case 8:\n\t                            _a.sent();\n\t                            return [3 /*break*/, 11];\n\t                        case 9: return [4 /*yield*/, this.renderSolidBorder(border.color, side, paint.curves)];\n\t                        case 10:\n\t                            _a.sent();\n\t                            _a.label = 11;\n\t                        case 11:\n\t                            side++;\n\t                            _a.label = 12;\n\t                        case 12:\n\t                            _i++;\n\t                            return [3 /*break*/, 3];\n\t                        case 13: return [2 /*return*/];\n\t                    }\n\t                });\n\t            });\n\t        };\n\t        CanvasRenderer.prototype.renderDashedDottedBorder = function (color, width, side, curvePoints, style) {\n\t            return __awaiter(this, void 0, void 0, function () {\n\t                var strokePaths, boxPaths, startX, startY, endX, endY, length, dashLength, spaceLength, useLineDash, multiplier, numberOfDashes, minSpace, maxSpace, path1, path2, path1, path2;\n\t                return __generator(this, function (_a) {\n\t                    this.ctx.save();\n\t                    strokePaths = parsePathForBorderStroke(curvePoints, side);\n\t                    boxPaths = parsePathForBorder(curvePoints, side);\n\t                    if (style === 2 /* DASHED */) {\n\t                        this.path(boxPaths);\n\t                        this.ctx.clip();\n\t                    }\n\t                    if (isBezierCurve(boxPaths[0])) {\n\t                        startX = boxPaths[0].start.x;\n\t                        startY = boxPaths[0].start.y;\n\t                    }\n\t                    else {\n\t                        startX = boxPaths[0].x;\n\t                        startY = boxPaths[0].y;\n\t                    }\n\t                    if (isBezierCurve(boxPaths[1])) {\n\t                        endX = boxPaths[1].end.x;\n\t                        endY = boxPaths[1].end.y;\n\t                    }\n\t                    else {\n\t                        endX = boxPaths[1].x;\n\t                        endY = boxPaths[1].y;\n\t                    }\n\t                    if (side === 0 || side === 2) {\n\t                        length = Math.abs(startX - endX);\n\t                    }\n\t                    else {\n\t                        length = Math.abs(startY - endY);\n\t                    }\n\t                    this.ctx.beginPath();\n\t                    if (style === 3 /* DOTTED */) {\n\t                        this.formatPath(strokePaths);\n\t                    }\n\t                    else {\n\t                        this.formatPath(boxPaths.slice(0, 2));\n\t                    }\n\t                    dashLength = width < 3 ? width * 3 : width * 2;\n\t                    spaceLength = width < 3 ? width * 2 : width;\n\t                    if (style === 3 /* DOTTED */) {\n\t                        dashLength = width;\n\t                        spaceLength = width;\n\t                    }\n\t                    useLineDash = true;\n\t                    if (length <= dashLength * 2) {\n\t                        useLineDash = false;\n\t                    }\n\t                    else if (length <= dashLength * 2 + spaceLength) {\n\t                        multiplier = length / (2 * dashLength + spaceLength);\n\t                        dashLength *= multiplier;\n\t                        spaceLength *= multiplier;\n\t                    }\n\t                    else {\n\t                        numberOfDashes = Math.floor((length + spaceLength) / (dashLength + spaceLength));\n\t                        minSpace = (length - numberOfDashes * dashLength) / (numberOfDashes - 1);\n\t                        maxSpace = (length - (numberOfDashes + 1) * dashLength) / numberOfDashes;\n\t                        spaceLength =\n\t                            maxSpace <= 0 || Math.abs(spaceLength - minSpace) < Math.abs(spaceLength - maxSpace)\n\t                                ? minSpace\n\t                                : maxSpace;\n\t                    }\n\t                    if (useLineDash) {\n\t                        if (style === 3 /* DOTTED */) {\n\t                            this.ctx.setLineDash([0, dashLength + spaceLength]);\n\t                        }\n\t                        else {\n\t                            this.ctx.setLineDash([dashLength, spaceLength]);\n\t                        }\n\t                    }\n\t                    if (style === 3 /* DOTTED */) {\n\t                        this.ctx.lineCap = 'round';\n\t                        this.ctx.lineWidth = width;\n\t                    }\n\t                    else {\n\t                        this.ctx.lineWidth = width * 2 + 1.1;\n\t                    }\n\t                    this.ctx.strokeStyle = asString(color);\n\t                    this.ctx.stroke();\n\t                    this.ctx.setLineDash([]);\n\t                    // dashed round edge gap\n\t                    if (style === 2 /* DASHED */) {\n\t                        if (isBezierCurve(boxPaths[0])) {\n\t                            path1 = boxPaths[3];\n\t                            path2 = boxPaths[0];\n\t                            this.ctx.beginPath();\n\t                            this.formatPath([new Vector(path1.end.x, path1.end.y), new Vector(path2.start.x, path2.start.y)]);\n\t                            this.ctx.stroke();\n\t                        }\n\t                        if (isBezierCurve(boxPaths[1])) {\n\t                            path1 = boxPaths[1];\n\t                            path2 = boxPaths[2];\n\t                            this.ctx.beginPath();\n\t                            this.formatPath([new Vector(path1.end.x, path1.end.y), new Vector(path2.start.x, path2.start.y)]);\n\t                            this.ctx.stroke();\n\t                        }\n\t                    }\n\t                    this.ctx.restore();\n\t                    return [2 /*return*/];\n\t                });\n\t            });\n\t        };\n\t        CanvasRenderer.prototype.render = function (element) {\n\t            return __awaiter(this, void 0, void 0, function () {\n\t                var stack;\n\t                return __generator(this, function (_a) {\n\t                    switch (_a.label) {\n\t                        case 0:\n\t                            if (this.options.backgroundColor) {\n\t                                this.ctx.fillStyle = asString(this.options.backgroundColor);\n\t                                this.ctx.fillRect(this.options.x, this.options.y, this.options.width, this.options.height);\n\t                            }\n\t                            stack = parseStackingContexts(element);\n\t                            return [4 /*yield*/, this.renderStack(stack)];\n\t                        case 1:\n\t                            _a.sent();\n\t                            this.applyEffects([]);\n\t                            return [2 /*return*/, this.canvas];\n\t                    }\n\t                });\n\t            });\n\t        };\n\t        return CanvasRenderer;\n\t    }(Renderer));\n\t    var isTextInputElement = function (container) {\n\t        if (container instanceof TextareaElementContainer) {\n\t            return true;\n\t        }\n\t        else if (container instanceof SelectElementContainer) {\n\t            return true;\n\t        }\n\t        else if (container instanceof InputElementContainer && container.type !== RADIO && container.type !== CHECKBOX) {\n\t            return true;\n\t        }\n\t        return false;\n\t    };\n\t    var calculateBackgroundCurvedPaintingArea = function (clip, curves) {\n\t        switch (clip) {\n\t            case 0 /* BORDER_BOX */:\n\t                return calculateBorderBoxPath(curves);\n\t            case 2 /* CONTENT_BOX */:\n\t                return calculateContentBoxPath(curves);\n\t            case 1 /* PADDING_BOX */:\n\t            default:\n\t                return calculatePaddingBoxPath(curves);\n\t        }\n\t    };\n\t    var canvasTextAlign = function (textAlign) {\n\t        switch (textAlign) {\n\t            case 1 /* CENTER */:\n\t                return 'center';\n\t            case 2 /* RIGHT */:\n\t                return 'right';\n\t            case 0 /* LEFT */:\n\t            default:\n\t                return 'left';\n\t        }\n\t    };\n\t    // see https://github.com/niklasvh/html2canvas/pull/2645\n\t    var iOSBrokenFonts = ['-apple-system', 'system-ui'];\n\t    var fixIOSSystemFonts = function (fontFamilies) {\n\t        return /iPhone OS 15_(0|1)/.test(window.navigator.userAgent)\n\t            ? fontFamilies.filter(function (fontFamily) { return iOSBrokenFonts.indexOf(fontFamily) === -1; })\n\t            : fontFamilies;\n\t    };\n\n\t    var ForeignObjectRenderer = /** @class */ (function (_super) {\n\t        __extends(ForeignObjectRenderer, _super);\n\t        function ForeignObjectRenderer(context, options) {\n\t            var _this = _super.call(this, context, options) || this;\n\t            _this.canvas = options.canvas ? options.canvas : document.createElement('canvas');\n\t            _this.ctx = _this.canvas.getContext('2d');\n\t            _this.options = options;\n\t            _this.canvas.width = Math.floor(options.width * options.scale);\n\t            _this.canvas.height = Math.floor(options.height * options.scale);\n\t            _this.canvas.style.width = options.width + \"px\";\n\t            _this.canvas.style.height = options.height + \"px\";\n\t            _this.ctx.scale(_this.options.scale, _this.options.scale);\n\t            _this.ctx.translate(-options.x, -options.y);\n\t            _this.context.logger.debug(\"EXPERIMENTAL ForeignObject renderer initialized (\" + options.width + \"x\" + options.height + \" at \" + options.x + \",\" + options.y + \") with scale \" + options.scale);\n\t            return _this;\n\t        }\n\t        ForeignObjectRenderer.prototype.render = function (element) {\n\t            return __awaiter(this, void 0, void 0, function () {\n\t                var svg, img;\n\t                return __generator(this, function (_a) {\n\t                    switch (_a.label) {\n\t                        case 0:\n\t                            svg = createForeignObjectSVG(this.options.width * this.options.scale, this.options.height * this.options.scale, this.options.scale, this.options.scale, element);\n\t                            return [4 /*yield*/, loadSerializedSVG(svg)];\n\t                        case 1:\n\t                            img = _a.sent();\n\t                            if (this.options.backgroundColor) {\n\t                                this.ctx.fillStyle = asString(this.options.backgroundColor);\n\t                                this.ctx.fillRect(0, 0, this.options.width * this.options.scale, this.options.height * this.options.scale);\n\t                            }\n\t                            this.ctx.drawImage(img, -this.options.x * this.options.scale, -this.options.y * this.options.scale);\n\t                            return [2 /*return*/, this.canvas];\n\t                    }\n\t                });\n\t            });\n\t        };\n\t        return ForeignObjectRenderer;\n\t    }(Renderer));\n\t    var loadSerializedSVG = function (svg) {\n\t        return new Promise(function (resolve, reject) {\n\t            var img = new Image();\n\t            img.onload = function () {\n\t                resolve(img);\n\t            };\n\t            img.onerror = reject;\n\t            img.src = \"data:image/svg+xml;charset=utf-8,\" + encodeURIComponent(new XMLSerializer().serializeToString(svg));\n\t        });\n\t    };\n\n\t    var Logger = /** @class */ (function () {\n\t        function Logger(_a) {\n\t            var id = _a.id, enabled = _a.enabled;\n\t            this.id = id;\n\t            this.enabled = enabled;\n\t            this.start = Date.now();\n\t        }\n\t        // eslint-disable-next-line @typescript-eslint/no-explicit-any\n\t        Logger.prototype.debug = function () {\n\t            var args = [];\n\t            for (var _i = 0; _i < arguments.length; _i++) {\n\t                args[_i] = arguments[_i];\n\t            }\n\t            if (this.enabled) {\n\t                // eslint-disable-next-line no-console\n\t                if (typeof window !== 'undefined' && window.console && typeof console.debug === 'function') {\n\t                    // eslint-disable-next-line no-console\n\t                    console.debug.apply(console, __spreadArray([this.id, this.getTime() + \"ms\"], args));\n\t                }\n\t                else {\n\t                    this.info.apply(this, args);\n\t                }\n\t            }\n\t        };\n\t        Logger.prototype.getTime = function () {\n\t            return Date.now() - this.start;\n\t        };\n\t        // eslint-disable-next-line @typescript-eslint/no-explicit-any\n\t        Logger.prototype.info = function () {\n\t            var args = [];\n\t            for (var _i = 0; _i < arguments.length; _i++) {\n\t                args[_i] = arguments[_i];\n\t            }\n\t            if (this.enabled) {\n\t                // eslint-disable-next-line no-console\n\t                if (typeof window !== 'undefined' && window.console && typeof console.info === 'function') {\n\t                    // eslint-disable-next-line no-console\n\t                    console.info.apply(console, __spreadArray([this.id, this.getTime() + \"ms\"], args));\n\t                }\n\t            }\n\t        };\n\t        // eslint-disable-next-line @typescript-eslint/no-explicit-any\n\t        Logger.prototype.warn = function () {\n\t            var args = [];\n\t            for (var _i = 0; _i < arguments.length; _i++) {\n\t                args[_i] = arguments[_i];\n\t            }\n\t            if (this.enabled) {\n\t                // eslint-disable-next-line no-console\n\t                if (typeof window !== 'undefined' && window.console && typeof console.warn === 'function') {\n\t                    // eslint-disable-next-line no-console\n\t                    console.warn.apply(console, __spreadArray([this.id, this.getTime() + \"ms\"], args));\n\t                }\n\t                else {\n\t                    this.info.apply(this, args);\n\t                }\n\t            }\n\t        };\n\t        // eslint-disable-next-line @typescript-eslint/no-explicit-any\n\t        Logger.prototype.error = function () {\n\t            var args = [];\n\t            for (var _i = 0; _i < arguments.length; _i++) {\n\t                args[_i] = arguments[_i];\n\t            }\n\t            if (this.enabled) {\n\t                // eslint-disable-next-line no-console\n\t                if (typeof window !== 'undefined' && window.console && typeof console.error === 'function') {\n\t                    // eslint-disable-next-line no-console\n\t                    console.error.apply(console, __spreadArray([this.id, this.getTime() + \"ms\"], args));\n\t                }\n\t                else {\n\t                    this.info.apply(this, args);\n\t                }\n\t            }\n\t        };\n\t        Logger.instances = {};\n\t        return Logger;\n\t    }());\n\n\t    var Context = /** @class */ (function () {\n\t        function Context(options, windowBounds) {\n\t            var _a;\n\t            this.windowBounds = windowBounds;\n\t            this.instanceName = \"#\" + Context.instanceCount++;\n\t            this.logger = new Logger({ id: this.instanceName, enabled: options.logging });\n\t            this.cache = (_a = options.cache) !== null && _a !== void 0 ? _a : new Cache(this, options);\n\t        }\n\t        Context.instanceCount = 1;\n\t        return Context;\n\t    }());\n\n\t    var html2canvas = function (element, options) {\n\t        if (options === void 0) { options = {}; }\n\t        return renderElement(element, options);\n\t    };\n\t    if (typeof window !== 'undefined') {\n\t        CacheStorage.setContext(window);\n\t    }\n\t    var renderElement = function (element, opts) { return __awaiter(void 0, void 0, void 0, function () {\n\t        var ownerDocument, defaultView, resourceOptions, contextOptions, windowOptions, windowBounds, context, foreignObjectRendering, cloneOptions, documentCloner, clonedElement, container, _a, width, height, left, top, backgroundColor, renderOptions, canvas, renderer, root, renderer;\n\t        var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;\n\t        return __generator(this, function (_u) {\n\t            switch (_u.label) {\n\t                case 0:\n\t                    if (!element || typeof element !== 'object') {\n\t                        return [2 /*return*/, Promise.reject('Invalid element provided as first argument')];\n\t                    }\n\t                    ownerDocument = element.ownerDocument;\n\t                    if (!ownerDocument) {\n\t                        throw new Error(\"Element is not attached to a Document\");\n\t                    }\n\t                    defaultView = ownerDocument.defaultView;\n\t                    if (!defaultView) {\n\t                        throw new Error(\"Document is not attached to a Window\");\n\t                    }\n\t                    resourceOptions = {\n\t                        allowTaint: (_b = opts.allowTaint) !== null && _b !== void 0 ? _b : false,\n\t                        imageTimeout: (_c = opts.imageTimeout) !== null && _c !== void 0 ? _c : 15000,\n\t                        proxy: opts.proxy,\n\t                        useCORS: (_d = opts.useCORS) !== null && _d !== void 0 ? _d : false\n\t                    };\n\t                    contextOptions = __assign({ logging: (_e = opts.logging) !== null && _e !== void 0 ? _e : true, cache: opts.cache }, resourceOptions);\n\t                    windowOptions = {\n\t                        windowWidth: (_f = opts.windowWidth) !== null && _f !== void 0 ? _f : defaultView.innerWidth,\n\t                        windowHeight: (_g = opts.windowHeight) !== null && _g !== void 0 ? _g : defaultView.innerHeight,\n\t                        scrollX: (_h = opts.scrollX) !== null && _h !== void 0 ? _h : defaultView.pageXOffset,\n\t                        scrollY: (_j = opts.scrollY) !== null && _j !== void 0 ? _j : defaultView.pageYOffset\n\t                    };\n\t                    windowBounds = new Bounds(windowOptions.scrollX, windowOptions.scrollY, windowOptions.windowWidth, windowOptions.windowHeight);\n\t                    context = new Context(contextOptions, windowBounds);\n\t                    foreignObjectRendering = (_k = opts.foreignObjectRendering) !== null && _k !== void 0 ? _k : false;\n\t                    cloneOptions = {\n\t                        allowTaint: (_l = opts.allowTaint) !== null && _l !== void 0 ? _l : false,\n\t                        onclone: opts.onclone,\n\t                        ignoreElements: opts.ignoreElements,\n\t                        inlineImages: foreignObjectRendering,\n\t                        copyStyles: foreignObjectRendering\n\t                    };\n\t                    context.logger.debug(\"Starting document clone with size \" + windowBounds.width + \"x\" + windowBounds.height + \" scrolled to \" + -windowBounds.left + \",\" + -windowBounds.top);\n\t                    documentCloner = new DocumentCloner(context, element, cloneOptions);\n\t                    clonedElement = documentCloner.clonedReferenceElement;\n\t                    if (!clonedElement) {\n\t                        return [2 /*return*/, Promise.reject(\"Unable to find element in cloned iframe\")];\n\t                    }\n\t                    return [4 /*yield*/, documentCloner.toIFrame(ownerDocument, windowBounds)];\n\t                case 1:\n\t                    container = _u.sent();\n\t                    _a = isBodyElement(clonedElement) || isHTMLElement(clonedElement)\n\t                        ? parseDocumentSize(clonedElement.ownerDocument)\n\t                        : parseBounds(context, clonedElement), width = _a.width, height = _a.height, left = _a.left, top = _a.top;\n\t                    backgroundColor = parseBackgroundColor(context, clonedElement, opts.backgroundColor);\n\t                    renderOptions = {\n\t                        canvas: opts.canvas,\n\t                        backgroundColor: backgroundColor,\n\t                        scale: (_o = (_m = opts.scale) !== null && _m !== void 0 ? _m : defaultView.devicePixelRatio) !== null && _o !== void 0 ? _o : 1,\n\t                        x: ((_p = opts.x) !== null && _p !== void 0 ? _p : 0) + left,\n\t                        y: ((_q = opts.y) !== null && _q !== void 0 ? _q : 0) + top,\n\t                        width: (_r = opts.width) !== null && _r !== void 0 ? _r : Math.ceil(width),\n\t                        height: (_s = opts.height) !== null && _s !== void 0 ? _s : Math.ceil(height)\n\t                    };\n\t                    if (!foreignObjectRendering) return [3 /*break*/, 3];\n\t                    context.logger.debug(\"Document cloned, using foreign object rendering\");\n\t                    renderer = new ForeignObjectRenderer(context, renderOptions);\n\t                    return [4 /*yield*/, renderer.render(clonedElement)];\n\t                case 2:\n\t                    canvas = _u.sent();\n\t                    return [3 /*break*/, 5];\n\t                case 3:\n\t                    context.logger.debug(\"Document cloned, element located at \" + left + \",\" + top + \" with size \" + width + \"x\" + height + \" using computed rendering\");\n\t                    context.logger.debug(\"Starting DOM parsing\");\n\t                    root = parseTree(context, clonedElement);\n\t                    if (backgroundColor === root.styles.backgroundColor) {\n\t                        root.styles.backgroundColor = COLORS.TRANSPARENT;\n\t                    }\n\t                    context.logger.debug(\"Starting renderer for element at \" + renderOptions.x + \",\" + renderOptions.y + \" with size \" + renderOptions.width + \"x\" + renderOptions.height);\n\t                    renderer = new CanvasRenderer(context, renderOptions);\n\t                    return [4 /*yield*/, renderer.render(root)];\n\t                case 4:\n\t                    canvas = _u.sent();\n\t                    _u.label = 5;\n\t                case 5:\n\t                    if ((_t = opts.removeContainer) !== null && _t !== void 0 ? _t : true) {\n\t                        if (!DocumentCloner.destroy(container)) {\n\t                            context.logger.error(\"Cannot detach cloned iframe as it is not in the DOM anymore\");\n\t                        }\n\t                    }\n\t                    context.logger.debug(\"Finished rendering\");\n\t                    return [2 /*return*/, canvas];\n\t            }\n\t        });\n\t    }); };\n\t    var parseBackgroundColor = function (context, element, backgroundColorOverride) {\n\t        var ownerDocument = element.ownerDocument;\n\t        // http://www.w3.org/TR/css3-background/#special-backgrounds\n\t        var documentBackgroundColor = ownerDocument.documentElement\n\t            ? parseColor(context, getComputedStyle(ownerDocument.documentElement).backgroundColor)\n\t            : COLORS.TRANSPARENT;\n\t        var bodyBackgroundColor = ownerDocument.body\n\t            ? parseColor(context, getComputedStyle(ownerDocument.body).backgroundColor)\n\t            : COLORS.TRANSPARENT;\n\t        var defaultBackgroundColor = typeof backgroundColorOverride === 'string'\n\t            ? parseColor(context, backgroundColorOverride)\n\t            : backgroundColorOverride === null\n\t                ? COLORS.TRANSPARENT\n\t                : 0xffffffff;\n\t        return element === ownerDocument.documentElement\n\t            ? isTransparent(documentBackgroundColor)\n\t                ? isTransparent(bodyBackgroundColor)\n\t                    ? defaultBackgroundColor\n\t                    : bodyBackgroundColor\n\t                : documentBackgroundColor\n\t            : defaultBackgroundColor;\n\t    };\n\n\t    return html2canvas;\n\n\t})));\n\n\t});\n\n\t/**\n\t * 先把body上的内容隐藏起来\n\t * @returns {Array} displayList 记录body子元素原始的显隐信息\n\t */\n\n\tvar hideBodyChildren = function hideBodyChildren() {\n\t  var _context;\n\n\t  var displayList = [];\n\t  /** @type {HTMLElement[]}*/\n\n\t  forEach$3(_context = from_1$2(document.body.children)).call(_context, function (dom, index) {\n\t    displayList[index] = dom.style.display;\n\t    dom.style.display = 'none';\n\t  });\n\n\t  return displayList;\n\t};\n\t/**\n\t * 复原body上被隐藏的内容\n\t * @param {Array} displayList 记录body子元素原始的显隐信息\n\t */\n\n\n\tvar undoHideBodyChildren = function undoHideBodyChildren() {\n\t  var _context2;\n\n\t  var displayList = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];\n\n\t  /** @type {HTMLElement[]}*/\n\t  forEach$3(_context2 = from_1$2(document.body.children)).call(_context2, function (dom, index) {\n\t    if (typeof displayList[index] !== 'undefined') {\n\t      dom.style.display = displayList[index];\n\t    }\n\t  });\n\t};\n\t/**\n\t * 将预览区域的内容放在body上准备后续导出操作\n\t * @param {HTMLElement} previeweDom 预览区域的dom\n\t * @param {function} cb 准备好导出后开始执行导出操作\n\t */\n\n\n\tvar getReadyToExport = function getReadyToExport(previeweDom, cb) {\n\t  var cherryPreviewer =\n\t  /** @type {HTMLElement}*/\n\t  previeweDom.cloneNode(true); // 强制去掉预览区的隐藏class\n\n\t  cherryPreviewer.className = cherryPreviewer.className.replace('cherry-previewer--hidden', '');\n\t  cherryPreviewer.style.width = '100%';\n\t  var mmls = cherryPreviewer.querySelectorAll('mjx-assistive-mml'); // a fix for html2canvas\n\n\t  forEach$3(mmls).call(mmls, function (e) {\n\t    if (e instanceof HTMLElement) e.style.setProperty('visibility', 'hidden');\n\t  });\n\n\t  var cherryWrapper = document.createElement('div');\n\t  cherryWrapper.appendChild(cherryPreviewer);\n\t  var displayList = hideBodyChildren();\n\t  document.body.appendChild(cherryWrapper);\n\t  var bodyOverflow = document.body.style.overflow;\n\t  document.body.style.overflow = 'visible';\n\t  cb(cherryPreviewer, function () {\n\t    cherryWrapper.remove();\n\t    undoHideBodyChildren(displayList);\n\t    document.body.style.overflow = bodyOverflow;\n\t  });\n\t};\n\t/**\n\t * 下载文件\n\t * @param {String} downloadUrl 图片本地地址\n\t * @param {String} fileName 导出图片文件名\n\t */\n\n\n\tvar fileDownload = function fileDownload(downloadUrl, fileName) {\n\t  var aLink = document.createElement('a');\n\t  aLink.style.display = 'none';\n\t  aLink.href = downloadUrl;\n\t  aLink.download = \"\".concat(fileName, \".png\");\n\t  document.body.appendChild(aLink);\n\t  aLink.click();\n\t  document.body.removeChild(aLink);\n\t};\n\t/**\n\t * 利用window.print导出成PDF\n\t * @param {HTMLElement} previeweDom 预览区域的dom\n\t * @param {String} fileName 导出PDF文件名\n\t */\n\n\n\tfunction exportPDF(previeweDom, fileName) {\n\t  var oldTitle = document.title;\n\t  document.title = fileName;\n\t  getReadyToExport(previeweDom, function (\n\t  /** @type {HTMLElement}*/\n\t  cherryPreviewer,\n\t  /** @type {function}*/\n\t  thenFinish) {\n\t    window.print();\n\t    thenFinish();\n\t    document.title = oldTitle;\n\t  });\n\t}\n\t/**\n\t * 利用canvas将html内容导出成图片\n\t * @param {HTMLElement} previeweDom 预览区域的dom\n\t * @param {String} fileName 导出图片文件名\n\t */\n\n\tfunction exportScreenShot(previeweDom, fileName) {\n\t  getReadyToExport(previeweDom, function (\n\t  /** @type {HTMLElement}*/\n\t  cherryPreviewer,\n\t  /** @type {function}*/\n\t  thenFinish) {\n\t    window.scrollTo(0, 0);\n\t    html2canvas(cherryPreviewer, {\n\t      allowTaint: true,\n\t      height: cherryPreviewer.clientHeight,\n\t      width: cherryPreviewer.clientWidth,\n\t      scrollY: 0,\n\t      scrollX: 0\n\t    }).then(function (canvas) {\n\t      var imgData = canvas.toDataURL('image/jpeg');\n\t      fileDownload(imgData, fileName);\n\t      thenFinish();\n\t    });\n\t  });\n\t}\n\t/**\n\t * 导出 markdown 文件\n\t * @param {String} markdownText markdown文本\n\t * @param {String} fileName 导出markdown文件名\n\t */\n\n\tfunction exportMarkdownFile(markdownText, fileName) {\n\t  var blob = new Blob([markdownText], {\n\t    type: 'text/markdown;charset=utf-8'\n\t  });\n\t  var aLink = document.createElement('a');\n\t  aLink.style.display = 'none';\n\t  aLink.href = url$2.createObjectURL(blob);\n\t  aLink.download = \"\".concat(fileName, \".md\");\n\t  document.body.appendChild(aLink);\n\t  aLink.click();\n\t  document.body.removeChild(aLink);\n\t}\n\t/**\n\t * 导出预览区 HTML 文件\n\t * @param {String} HTMLText HTML文本\n\t * @param {String} fileName 导出HTML文件名\n\t */\n\n\tfunction exportHTMLFile(HTMLText, fileName) {\n\t  var blob = new Blob([HTMLText], {\n\t    type: 'text/markdown;charset=utf-8'\n\t  });\n\t  var aLink = document.createElement('a');\n\t  aLink.style.display = 'none';\n\t  aLink.href = url$2.createObjectURL(blob);\n\t  aLink.download = \"\".concat(fileName, \".html\");\n\t  document.body.appendChild(aLink);\n\t  aLink.click();\n\t  document.body.removeChild(aLink);\n\t}\n\n\tvar $propertyIsEnumerable$2 = objectPropertyIsEnumerable.f;\n\n\tvar propertyIsEnumerable$1 = functionUncurryThis($propertyIsEnumerable$2);\n\tvar push$9 = functionUncurryThis([].push);\n\n\t// `Object.{ entries, values }` methods implementation\n\tvar createMethod$5 = function (TO_ENTRIES) {\n\t  return function (it) {\n\t    var O = toIndexedObject(it);\n\t    var keys = objectKeys(O);\n\t    var length = keys.length;\n\t    var i = 0;\n\t    var result = [];\n\t    var key;\n\t    while (length > i) {\n\t      key = keys[i++];\n\t      if (!descriptors || propertyIsEnumerable$1(O, key)) {\n\t        push$9(result, TO_ENTRIES ? [key, O[key]] : O[key]);\n\t      }\n\t    }\n\t    return result;\n\t  };\n\t};\n\n\tvar objectToArray = {\n\t  // `Object.entries` method\n\t  // https://tc39.es/ecma262/#sec-object.entries\n\t  entries: createMethod$5(true),\n\t  // `Object.values` method\n\t  // https://tc39.es/ecma262/#sec-object.values\n\t  values: createMethod$5(false)\n\t};\n\n\tvar $values = objectToArray.values;\n\n\t// `Object.values` method\n\t// https://tc39.es/ecma262/#sec-object.values\n\t_export({ target: 'Object', stat: true }, {\n\t  values: function values(O) {\n\t    return $values(O);\n\t  }\n\t});\n\n\tvar values$1 = path.Object.values;\n\n\tvar values$2 = values$1;\n\n\tvar values$3 = values$2;\n\n\tvar $entries = objectToArray.entries;\n\n\t// `Object.entries` method\n\t// https://tc39.es/ecma262/#sec-object.entries\n\t_export({ target: 'Object', stat: true }, {\n\t  entries: function entries(O) {\n\t    return $entries(O);\n\t  }\n\t});\n\n\tvar entries = path.Object.entries;\n\n\tvar entries$1 = entries;\n\n\tvar entries$2 = entries$1;\n\n\t/**\n\t * Copyright (C) 2021 THL A29 Limited, a Tencent company.\n\t *\n\t * Licensed under the Apache License, Version 2.0 (the \"License\");\n\t * you may not use this file except in compliance with the License.\n\t * You may obtain a copy of the License at\n\t *\n\t *     http://www.apache.org/licenses/LICENSE-2.0\n\t *\n\t * Unless required by applicable law or agreed to in writing, software\n\t * distributed under the License is distributed on an \"AS IS\" BASIS,\n\t * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n\t * See the License for the specific language governing permissions and\n\t * limitations under the License.\n\t */\n\n\t/**\n\t * 用于在图片四周画出调整图片尺寸的边框\n\t */\n\tvar imgSizeHander = {\n\t  mouseResize: {},\n\t  getImgPosition: function getImgPosition() {\n\t    var position = this.img.getBoundingClientRect();\n\t    var editorPosition = this.previewerDom.parentNode.getBoundingClientRect();\n\t    var padding = _parseFloat$2(this.img.style.padding) || 0;\n\t    return {\n\t      bottom: position.bottom - editorPosition.bottom,\n\t      top: position.top - editorPosition.top + padding * 1.5,\n\t      height: position.height,\n\t      width: position.width,\n\t      right: position.right - editorPosition.right,\n\t      left: position.left - editorPosition.left + padding * 1.5,\n\t      x: position.x - editorPosition.x,\n\t      y: position.y - editorPosition.y\n\t    };\n\t  },\n\t  initBubbleButtons: function initBubbleButtons() {\n\t    var position = this.getImgPosition();\n\t    return {\n\t      points: {\n\t        arr: ['leftTop', 'leftBottom', 'rightTop', 'rightBottom', 'leftMiddle', 'middleBottom', 'middleTop', 'rightMiddle'],\n\t        arrInfo: {\n\t          leftTop: {\n\t            name: '20',\n\t            left: 0,\n\t            top: 0\n\t          },\n\t          leftBottom: {\n\t            name: '00',\n\t            left: 0,\n\t            top: 0\n\t          },\n\t          rightTop: {\n\t            name: '22',\n\t            left: 0,\n\t            top: 0\n\t          },\n\t          rightBottom: {\n\t            name: '02',\n\t            left: 0,\n\t            top: 0\n\t          },\n\t          leftMiddle: {\n\t            name: '10',\n\t            left: 0,\n\t            top: 0\n\t          },\n\t          middleBottom: {\n\t            name: '01',\n\t            left: 0,\n\t            top: 0\n\t          },\n\t          middleTop: {\n\t            name: '21',\n\t            left: 0,\n\t            top: 0\n\t          },\n\t          rightMiddle: {\n\t            name: '12',\n\t            left: 0,\n\t            top: 0\n\t          }\n\t        }\n\t      },\n\t      imgSrc: this.img.src,\n\t      style: {\n\t        width: this.img.width,\n\t        height: this.img.height,\n\t        left: position.left - 1,\n\t        top: position.top - 1,\n\t        marginTop: 0,\n\t        marginLeft: 0\n\t      },\n\t      scrollTop: this.previewerDom.scrollTop,\n\t      position: position\n\t    };\n\t  },\n\t  showBubble: function showBubble(img, container, previewerDom) {\n\t    if (this.$isResizing()) {\n\t      return;\n\t    }\n\n\t    this.img = img;\n\t    this.previewerDom = previewerDom;\n\t    this.container = container;\n\t    this.buts = this.initBubbleButtons();\n\t    this.drawBubbleButs();\n\t  },\n\t  emit: function emit(type) {\n\t    var event = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n\t    switch (type) {\n\t      case 'mousedown':\n\t        return this.resizeBegin(event);\n\n\t      case 'mouseup':\n\t        return this.resizeStop(event);\n\n\t      case 'mousemove':\n\t        return this.resizeWorking(event);\n\n\t      case 'scroll':\n\t        return this.dealScroll(event);\n\n\t      case 'remove':\n\t        return this.remove();\n\n\t      case 'previewUpdate':\n\t        return this.previewUpdate(event);\n\t    }\n\t  },\n\t  previewUpdate: function previewUpdate(callback) {\n\t    if (this.$isResizing()) {\n\t      return;\n\t    }\n\n\t    this.remove();\n\t    callback();\n\t  },\n\t  drawBubbleButs: function drawBubbleButs() {\n\t    var _context,\n\t        _this = this;\n\n\t    if (this.butsLayout) {\n\t      return this.updateBubbleButs();\n\t    }\n\n\t    this.butsLayout = this.container;\n\t    this.butsImg = document.createElement('div');\n\t    this.butsImg.className = 'cherry-previewer-img-size-hander__background';\n\t    this.butsImg.style.backgroundImage = \"url(\".concat(this.buts.imgSrc, \")\");\n\t    this.butsLayout.appendChild(this.butsImg);\n\t    this.butsPoints = {};\n\n\t    forEach$3(_context = keys$3(this.buts.points.arr)).call(_context, function (index) {\n\t      var name = _this.buts.points.arr[index];\n\t      var tmp = document.createElement('div');\n\t      tmp.className = ['cherry-previewer-img-size-hander__points', \"cherry-previewer-img-size-hander__points-\".concat(name)].join(' ');\n\t      tmp.dataset.name = name;\n\n\t      _this.butsLayout.appendChild(tmp);\n\n\t      _this.butsPoints[\"pints-\".concat(name)] = tmp;\n\t    });\n\n\t    return this.updateBubbleButs();\n\t  },\n\t  remove: function remove() {\n\t    this.butsLayout = false;\n\t  },\n\t  updateBubbleButs: function updateBubbleButs() {\n\t    var _context2,\n\t        _this2 = this,\n\t        _context3;\n\n\t    this.$updatePointsInfo();\n\n\t    forEach$3(_context2 = keys$3(this.buts.style)).call(_context2, function (name) {\n\t      _this2.butsLayout.style[name] = \"\".concat(_this2.buts.style[name], \"px\");\n\t    });\n\n\t    forEach$3(_context3 = keys$3(this.buts.points.arr)).call(_context3, function (index) {\n\t      var name = _this2.buts.points.arr[index];\n\t      _this2.butsPoints[\"pints-\".concat(name)].style.top = \"\".concat(_this2.buts.points.arrInfo[name].top, \"px\");\n\t      _this2.butsPoints[\"pints-\".concat(name)].style.left = \"\".concat(_this2.buts.points.arrInfo[name].left, \"px\");\n\t    });\n\t  },\n\t  $updatePointsInfo: function $updatePointsInfo() {\n\t    var _context4,\n\t        _this3 = this;\n\n\t    var pointLeft = this.buts.style.width;\n\t    var pointTop = this.buts.style.height;\n\t    var newPointsInfo = this.$getPointsInfo(pointLeft, pointTop);\n\n\t    forEach$3(_context4 = keys$3(this.buts.points.arr)).call(_context4, function (index) {\n\t      var name = _this3.buts.points.arr[index];\n\n\t      if (_this3.buts.points.arrInfo[name].left !== newPointsInfo[name].left) {\n\t        _this3.buts.points.arrInfo[name].left = newPointsInfo[name].left;\n\t      }\n\n\t      if (_this3.buts.points.arrInfo[name].top !== newPointsInfo[name].top) {\n\t        _this3.buts.points.arrInfo[name].top = newPointsInfo[name].top;\n\t      }\n\t    });\n\t  },\n\t  $getPointsInfo: function $getPointsInfo(left, top) {\n\t    return {\n\t      leftTop: {\n\t        left: 0,\n\t        top: 0\n\t      },\n\t      leftBottom: {\n\t        left: 0,\n\t        top: top\n\t      },\n\t      rightTop: {\n\t        left: left,\n\t        top: 0\n\t      },\n\t      rightBottom: {\n\t        left: left,\n\t        top: top\n\t      },\n\t      leftMiddle: {\n\t        left: 0,\n\t        top: top / 2\n\t      },\n\t      middleBottom: {\n\t        left: left / 2,\n\t        top: top\n\t      },\n\t      middleTop: {\n\t        left: left / 2,\n\t        top: 0\n\t      },\n\t      rightMiddle: {\n\t        left: left,\n\t        top: top / 2\n\t      }\n\t    };\n\t  },\n\t  $isResizing: function $isResizing() {\n\t    return this.mouseResize.resize;\n\t  },\n\t  dealScroll: function dealScroll(event) {\n\t    var position = this.getImgPosition();\n\n\t    if (this.butsLayout.style.marginTop !== position.top - this.buts.position.top) {\n\t      this.butsLayout.style.marginTop = \"\".concat(position.top - this.buts.position.top, \"px\");\n\t      this.buts.style.marginTop = \"\".concat(position.top - this.buts.position.top, \"px\");\n\t    }\n\n\t    if (this.butsLayout.style.marginLeft !== position.left - this.buts.position.left) {\n\t      this.butsLayout.style.marginLeft = \"\".concat(position.left - this.buts.position.left, \"px\");\n\t      this.buts.style.marginLeft = \"\".concat(position.left - this.buts.position.left, \"px\");\n\t    }\n\t  },\n\t  initMouse: function initMouse() {\n\t    return {\n\t      left: 0,\n\t      top: 0,\n\t      resize: false,\n\t      name: ''\n\t    };\n\t  },\n\t  resizeBegin: function resizeBegin(event) {\n\t    var point = event.target;\n\n\t    if (!point.classList.contains('cherry-previewer-img-size-hander__points')) {\n\t      return false;\n\t    }\n\n\t    this.mouseResize.left = event.clientX;\n\t    this.mouseResize.top = event.clientY;\n\t    this.mouseResize.resize = true;\n\t    this.mouseResize.name = point.getAttribute('data-name');\n\t    this.previewerDom.classList.add('doing-resize-img');\n\t  },\n\t  resizeStop: function resizeStop(event, buts, editor, menu) {\n\t    if (!this.$isResizing()) {\n\t      return false;\n\t    }\n\n\t    this.img.style.width = \"\".concat(this.buts.style.width, \"px\");\n\t    this.img.style.height = \"\".concat(this.buts.style.height, \"px\");\n\t    this.buts.style.marginTop = 0;\n\t    this.buts.style.marginLeft = 0;\n\t    this.updateBubbleButs();\n\t    this.mouseResize.resize = false;\n\t    this.previewerDom.classList.remove('doing-resize-img');\n\t    this.change();\n\t  },\n\t  resizeWorking: function resizeWorking(event, buts) {\n\t    if (!this.$isResizing()) {\n\t      return;\n\t    }\n\n\t    var changeX = event.clientX - this.mouseResize.left;\n\t    var changeY = event.clientY - this.mouseResize.top;\n\t    var change = {};\n\n\t    switch (this.mouseResize.name) {\n\t      case 'leftTop':\n\t      case 'leftBottom':\n\t      case 'leftMiddle':\n\t        change = this.$getChange(changeX, changeY, 'x');\n\t        this.buts.style.width = this.buts.position.width - change.changeX;\n\n\t        if (this.mouseResize.name !== 'leftMiddle') {\n\t          this.buts.style.height = this.buts.position.height - change.changeY;\n\t        }\n\n\t        break;\n\n\t      case 'rightTop':\n\t      case 'rightBottom':\n\t      case 'rightMiddle':\n\t        change = this.$getChange(changeX, changeY, 'x');\n\t        this.buts.style.width = this.buts.position.width + change.changeX;\n\n\t        if (this.mouseResize.name !== 'rightMiddle') {\n\t          this.buts.style.height = this.buts.position.height + change.changeY;\n\t        }\n\n\t        break;\n\n\t      case 'middleTop':\n\t        change = this.$getChange(changeX, changeY, 'y');\n\t        this.buts.style.height = this.buts.position.height - change.changeY;\n\t        break;\n\n\t      case 'middleBottom':\n\t        change = this.$getChange(changeX, changeY, 'y');\n\t        this.buts.style.height = this.buts.position.height + change.changeY;\n\t        break;\n\t    }\n\n\t    this.updateBubbleButs();\n\t    this.change();\n\t  },\n\t  change: function change() {\n\t    this.emitChange(this.img, {\n\t      width: this.buts.style.width,\n\t      height: this.buts.style.height\n\t    });\n\t  },\n\t  bindChange: function bindChange(func) {\n\t    this.emitChange = func;\n\t  },\n\n\t  /**\n\t   * 根据宽（x）或高（y）来进行等比例缩放\n\t   * @param {number} x 宽度\n\t   * @param {number} y 高度\n\t   * @param {string} type 类型，以宽/高为基准做等比例缩放\n\t   * @returns\n\t   */\n\t  $getChange: function $getChange(x, y, type) {\n\t    var ret = {\n\t      changeX: 0,\n\t      changeY: 0\n\t    };\n\n\t    switch (type) {\n\t      case 'y':\n\t        ret.changeY = y;\n\t        ret.changeX = y * this.buts.position.width / this.buts.position.height;\n\t        break;\n\n\t      default:\n\t        ret.changeX = x;\n\t        ret.changeY = x * this.buts.position.height / this.buts.position.width;\n\t        break;\n\t    }\n\n\t    return ret;\n\t  }\n\t};\n\n\tvar $every = arrayIteration.every;\n\n\n\tvar STRICT_METHOD$4 = arrayMethodIsStrict('every');\n\n\t// `Array.prototype.every` method\n\t// https://tc39.es/ecma262/#sec-array.prototype.every\n\t_export({ target: 'Array', proto: true, forced: !STRICT_METHOD$4 }, {\n\t  every: function every(callbackfn /* , thisArg */) {\n\t    return $every(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n\t  }\n\t});\n\n\tvar every = entryVirtual('Array').every;\n\n\tvar ArrayPrototype$e = Array.prototype;\n\n\tvar every$1 = function (it) {\n\t  var own = it.every;\n\t  return it === ArrayPrototype$e || (objectIsPrototypeOf(ArrayPrototype$e, it) && own === ArrayPrototype$e.every) ? every : own;\n\t};\n\n\tvar every$2 = every$1;\n\n\tvar every$3 = every$2;\n\n\tvar TypeError$o = global_1.TypeError;\n\n\t// `FlattenIntoArray` abstract operation\n\t// https://tc39.github.io/proposal-flatMap/#sec-FlattenIntoArray\n\tvar flattenIntoArray = function (target, original, source, sourceLen, start, depth, mapper, thisArg) {\n\t  var targetIndex = start;\n\t  var sourceIndex = 0;\n\t  var mapFn = mapper ? functionBindContext(mapper, thisArg) : false;\n\t  var element, elementLen;\n\n\t  while (sourceIndex < sourceLen) {\n\t    if (sourceIndex in source) {\n\t      element = mapFn ? mapFn(source[sourceIndex], sourceIndex, original) : source[sourceIndex];\n\n\t      if (depth > 0 && isArray(element)) {\n\t        elementLen = lengthOfArrayLike(element);\n\t        targetIndex = flattenIntoArray(target, original, element, elementLen, targetIndex, depth - 1) - 1;\n\t      } else {\n\t        if (targetIndex >= 0x1FFFFFFFFFFFFF) throw TypeError$o('Exceed the acceptable array length');\n\t        target[targetIndex] = element;\n\t      }\n\n\t      targetIndex++;\n\t    }\n\t    sourceIndex++;\n\t  }\n\t  return targetIndex;\n\t};\n\n\tvar flattenIntoArray_1 = flattenIntoArray;\n\n\t// `Array.prototype.flat` method\n\t// https://tc39.es/ecma262/#sec-array.prototype.flat\n\t_export({ target: 'Array', proto: true }, {\n\t  flat: function flat(/* depthArg = 1 */) {\n\t    var depthArg = arguments.length ? arguments[0] : undefined;\n\t    var O = toObject(this);\n\t    var sourceLen = lengthOfArrayLike(O);\n\t    var A = arraySpeciesCreate(O, 0);\n\t    A.length = flattenIntoArray_1(A, O, O, sourceLen, 0, depthArg === undefined ? 1 : toIntegerOrInfinity(depthArg));\n\t    return A;\n\t  }\n\t});\n\n\tvar flat = entryVirtual('Array').flat;\n\n\tvar ArrayPrototype$f = Array.prototype;\n\n\tvar flat$1 = function (it) {\n\t  var own = it.flat;\n\t  return it === ArrayPrototype$f || (objectIsPrototypeOf(ArrayPrototype$f, it) && own === ArrayPrototype$f.flat) ? flat : own;\n\t};\n\n\tvar flat$2 = flat$1;\n\n\tvar flat$3 = flat$2;\n\n\t/**\n\t * 用于在表格上出现编辑区，并提供拖拽行列的功能\n\t */\n\n\tvar TableHandler = /*#__PURE__*/function () {\n\t  /**\n\t   * 用来存放所有的数据\n\t   */\n\t  function TableHandler(trigger, target, container, previewerDom, codeMirror) {\n\t    _classCallCheck(this, TableHandler);\n\n\t    _defineProperty(this, \"tableEditor\", {\n\t      info: {},\n\t      // 当前点击的预览区域table的相关信息\n\t      tableCodes: [],\n\t      // 编辑器内所有的表格语法\n\t      editorDom: {} // 编辑器容器\n\n\t    });\n\n\t    // 触发方式 click / hover\n\t    this.trigger = trigger;\n\t    this.target = target;\n\t    this.previewerDom = previewerDom;\n\t    this.container = container;\n\t    this.codeMirror = codeMirror;\n\t    this.$initReg();\n\t    this.$findTableInEditor();\n\t  }\n\n\t  _createClass(TableHandler, [{\n\t    key: \"emit\",\n\t    value: function emit(type) {\n\t      var event = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\t      var callback = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : function () {};\n\n\t      switch (type) {\n\t        case 'keyup':\n\t          return this.trigger === 'click' && this.$onInputChange(event);\n\n\t        case 'remove':\n\t          return this.$remove();\n\n\t        case 'scroll':\n\t          return this.$refreshPosition();\n\n\t        case 'previewUpdate':\n\t          return this.$refreshPosition();\n\n\t        case 'mouseup':\n\t          return this.trigger === 'click' && this.$tryRemoveMe(event, callback);\n\t      }\n\t    }\n\t  }, {\n\t    key: \"$tryRemoveMe\",\n\t    value: function $tryRemoveMe(event, callback) {\n\t      if (!/textarea/i.test(event.target.tagName)) {\n\t        this.$remove();\n\t        callback();\n\t      }\n\t    }\n\t    /**\n\t     * 获取目标dom的位置信息和尺寸信息\n\t     */\n\n\t  }, {\n\t    key: \"$getPosition\",\n\t    value: function $getPosition() {\n\t      var node = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.tableEditor.info.tdNode;\n\t      var position = node.getBoundingClientRect();\n\t      var editorPosition = this.previewerDom.parentNode.getBoundingClientRect();\n\t      return {\n\t        top: position.top - editorPosition.top,\n\t        height: position.height,\n\t        width: position.width,\n\t        left: position.left - editorPosition.left,\n\t        maxHeight: editorPosition.height\n\t      };\n\t    }\n\t  }, {\n\t    key: \"setStyle\",\n\t    value: function setStyle(element, property, value) {\n\t      var info = element.getBoundingClientRect();\n\n\t      if (info[property] !== value) {\n\t        element.style[property] = value;\n\t      }\n\t    }\n\t    /**\n\t     * TODO: 这里是分别对文本框、操作符号和选项设置偏移，应该作为一个整体来设置\n\t     */\n\n\t  }, {\n\t    key: \"$setInputOffset\",\n\t    value: function $setInputOffset() {\n\t      var tdInfo = this.$getPosition();\n\t      var inputDiv = this.tableEditor.editorDom.inputDiv; // 设置文本框的偏移及大小\n\n\t      this.setStyle(inputDiv, 'width', \"\".concat(tdInfo.width, \"px\"));\n\t      this.setStyle(inputDiv, 'height', \"\".concat(tdInfo.height, \"px\"));\n\t      this.setStyle(inputDiv, 'top', \"\".concat(tdInfo.top, \"px\"));\n\t      this.setStyle(inputDiv, 'left', \"\".concat(tdInfo.left, \"px\")); // 根据是否超出边界来显示或者隐藏元素\n\n\t      var isWithinBounds = tdInfo.top >= 0 && tdInfo.top + tdInfo.height <= tdInfo.maxHeight;\n\t      this.setStyle(inputDiv, 'display', isWithinBounds ? '' : 'none');\n\t    }\n\t    /**\n\t     * 刷新操作符位置\n\t     */\n\n\t  }, {\n\t    key: \"$setSymbolOffset\",\n\t    value: function $setSymbolOffset() {\n\t      var _context2,\n\t          _this = this;\n\n\t      var container = this.tableEditor.editorDom.symbolContainer;\n\t      var _this$tableEditor$inf = this.tableEditor.info,\n\t          tableNode = _this$tableEditor$inf.tableNode,\n\t          trNode = _this$tableEditor$inf.trNode,\n\t          isTHead = _this$tableEditor$inf.isTHead;\n\t      var tableInfo = this.$getPosition(tableNode);\n\t      var trInfo = this.$getPosition(trNode);\n\t      var tdInfo = this.$getPosition();\n\t      var previewerRect = this.previewerDom.getBoundingClientRect(); // 设置容器宽高\n\n\t      this.setStyle(this.container, 'width', \"\".concat(tableInfo.width, \"px\"));\n\t      this.setStyle(this.container, 'height', \"\".concat(tableInfo.height, \"px\"));\n\t      this.setStyle(this.container, 'top', \"\".concat(tableInfo.top, \"px\"));\n\t      this.setStyle(this.container, 'left', \"\".concat(tableInfo.left, \"px\")); // 判断是否在预览区内\n\n\t      var isWithinBounds = function isWithinBounds(symbol) {\n\t        var _context;\n\n\t        var symbolRect = symbol.getBoundingClientRect();\n\t        var boundMap = {\n\t          top: [previewerRect.top, previewerRect.top + previewerRect.height - symbolRect.height],\n\t          left: [previewerRect.left, previewerRect.left + previewerRect.width - symbolRect.width]\n\t        };\n\t        return every$3(_context = entries$2(boundMap)).call(_context, function (_ref) {\n\t          var _ref2 = _slicedToArray(_ref, 2),\n\t              key = _ref2[0],\n\t              _ref2$ = _slicedToArray(_ref2[1], 2),\n\t              min = _ref2$[0],\n\t              max = _ref2$[1];\n\n\t          return symbolRect[key] >= min && symbolRect[key] <= max;\n\t        });\n\t      }; // 设置操作符位置与控制显隐\n\n\n\t      forEach$3(_context2 = container.childNodes).call(_context2, function (node) {\n\t        var _context3;\n\n\t        var _node$dataset = node.dataset,\n\t            index = _node$dataset.index,\n\t            type = _node$dataset.type,\n\t            dir = _node$dataset.dir;\n\t        var propDict = {\n\t          Row: ['left', 'right'],\n\t          Col: ['top', 'bottom']\n\t        };\n\t        var offset = {\n\t          outer: 20,\n\t          radius: 7\n\t        };\n\n\t        _this.setStyle(node, propDict[dir][index], \"-\".concat(offset.outer, \"px\"));\n\n\t        _this.setStyle(node, 'display', '');\n\n\t        var refreshMap = {\n\t          LastRow: function LastRow() {\n\t            return _this.setStyle(node, 'top', \"\".concat(trInfo.top - tableInfo.top - offset.radius, \"px\"));\n\t          },\n\t          NextRow: function NextRow() {\n\t            return _this.setStyle(node, 'top', \"\".concat(trInfo.top - tableInfo.top + trInfo.height - offset.radius, \"px\"));\n\t          },\n\t          LastCol: function LastCol() {\n\t            return _this.setStyle(node, 'left', \"\".concat(tdInfo.left - tableInfo.left - offset.radius, \"px\"));\n\t          },\n\t          NextCol: function NextCol() {\n\t            return _this.setStyle(node, 'left', \"\".concat(tdInfo.left - tableInfo.left + tdInfo.width - offset.radius, \"px\"));\n\t          }\n\t        };\n\n\t        var oper = concat$5(_context3 = \"\".concat(type)).call(_context3, dir);\n\n\t        refreshMap[oper]();\n\n\t        _this.setStyle(node, 'display', isWithinBounds(node) ? '' : 'none');\n\n\t        if (isTHead && oper === 'LastRow') {\n\t          _this.setStyle(node, 'display', 'none');\n\t        }\n\t      });\n\t    }\n\t    /**\n\t     * 刷新定位\n\t     */\n\n\t  }, {\n\t    key: \"$refreshPosition\",\n\t    value: function $refreshPosition() {\n\t      if (this.trigger === 'click') {\n\t        this.$setInputOffset();\n\t        return;\n\t      }\n\n\t      this.$setSymbolOffset();\n\t    }\n\t  }, {\n\t    key: \"$remove\",\n\t    value: function $remove() {\n\t      this.tableEditor = {\n\t        info: {},\n\t        tableCodes: [],\n\t        editorDom: {}\n\t      };\n\t    }\n\t    /**\n\t     * 收集编辑器中的表格语法，并记录表格语法的开始的offset\n\t     */\n\n\t  }, {\n\t    key: \"$collectTableCode\",\n\t    value: function $collectTableCode() {\n\t      var tableCodes = [];\n\t      this.codeMirror.getValue().replace(this.codeBlockReg, function (whole) {\n\t        // 先把代码块里的表格语法关键字干掉\n\t        return whole.replace(/\\|/g, '.');\n\t      }).replace(this.tableReg, function (whole) {\n\t        var _ref3;\n\n\t        var match = whole.replace(/^\\n*/, '');\n\t        var offsetBegin = (_ref3 = (arguments.length <= 1 ? 0 : arguments.length - 1) - 2 + 1, _ref3 < 1 || arguments.length <= _ref3 ? undefined : arguments[_ref3]) + whole.match(/^\\n*/)[0].length;\n\t        tableCodes.push({\n\t          code: match,\n\t          offset: offsetBegin\n\t        });\n\t      });\n\t      this.tableEditor.tableCodes = tableCodes;\n\t    }\n\t    /**\n\t     * 获取预览区域被点击的table对象，并记录table的顺位\n\t     */\n\n\t  }, {\n\t    key: \"$collectTableDom\",\n\t    value: function $collectTableDom() {\n\t      var _context4, _context5, _context6;\n\n\t      var list = from_1$2(this.previewerDom.querySelectorAll('table.cherry-table'));\n\n\t      var tableNode = this.$getClosestNode(this.target, 'TABLE');\n\n\t      if (tableNode === false) {\n\t        return false;\n\t      }\n\n\t      var columns = filter$3(_context4 = from_1$2(this.target.parentElement.childNodes)).call(_context4, function (child) {\n\t        // 计算列数\n\t        return child.tagName.toLowerCase() === 'td';\n\t      }).length;\n\n\t      this.tableEditor.info = {\n\t        tableNode: tableNode,\n\t        tdNode: this.target,\n\t        trNode: this.target.parentElement,\n\t        tdIndex: indexOf$8(_context5 = from_1$2(this.target.parentElement.childNodes)).call(_context5, this.target),\n\t        trIndex: indexOf$8(_context6 = from_1$2(this.target.parentElement.parentElement.childNodes)).call(_context6, this.target.parentElement),\n\t        isTHead: this.target.parentElement.parentElement.tagName !== 'TBODY',\n\t        totalTables: list.length,\n\t        tableIndex: indexOf$8(list).call(list, tableNode),\n\t        tableText: tableNode.textContent.replace(/[\\s]/g, ''),\n\t        columns: columns\n\t      };\n\t    }\n\t    /**\n\t     * 选中对应单元格、所在行、所在列的内容\n\t     * @param {Number} index\n\t     * @param {String} type 'td': 当前单元格, 'table': 当前表格\n\t     * @param {Boolean} select 是否选中编辑器中的代码\n\t     */\n\n\t  }, {\n\t    key: \"$setSelection\",\n\t    value: function $setSelection(index) {\n\t      var _whole$slice$match$le, _whole$slice$match, _this$codeMirror;\n\n\t      var type = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'table';\n\t      var select = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;\n\t      var tableCode = this.tableEditor.tableCodes[index];\n\t      var whole = this.codeMirror.getValue();\n\t      var selectTdInfo = this.tableEditor.info;\n\t      var beginLine = (_whole$slice$match$le = (_whole$slice$match = slice$7(whole).call(whole, 0, tableCode.offset).match(/\\n/g)) === null || _whole$slice$match === void 0 ? void 0 : _whole$slice$match.length) !== null && _whole$slice$match$le !== void 0 ? _whole$slice$match$le : 0;\n\n\t      var _this$$getTdOffset = this.$getTdOffset(tableCode.code, selectTdInfo.isTHead, selectTdInfo.trIndex, selectTdInfo.tdIndex),\n\t          preLine = _this$$getTdOffset.preLine,\n\t          preCh = _this$$getTdOffset.preCh,\n\t          plusCh = _this$$getTdOffset.plusCh,\n\t          currentTd = _this$$getTdOffset.currentTd;\n\n\t      if (type === 'table') {\n\t        var endLine = beginLine + tableCode.code.match(/\\n/g).length;\n\t        var endCh = tableCode.code.match(/[^\\n]+\\n*$/)[0].length;\n\t        this.tableEditor.info.selection = [{\n\t          line: beginLine,\n\t          ch: 0\n\t        }, {\n\t          line: endLine,\n\t          ch: endCh\n\t        }];\n\t      } else {\n\t        this.tableEditor.info.selection = [{\n\t          line: beginLine + preLine,\n\t          ch: preCh\n\t        }, {\n\t          line: beginLine + preLine,\n\t          ch: preCh + plusCh\n\t        }];\n\t      }\n\n\t      select && (_this$codeMirror = this.codeMirror).setSelection.apply(_this$codeMirror, _toConsumableArray(this.tableEditor.info.selection));\n\t      this.tableEditor.info.code = currentTd;\n\t    }\n\t    /**\n\t     * 获取对应单元格的偏移量\n\t     * @param {String} tableCode\n\t     * @param {Boolean} isTHead\n\t     * @param {Number} trIndex\n\t     * @param {Number} tdIndex\n\t     */\n\n\t  }, {\n\t    key: \"$getTdOffset\",\n\t    value: function $getTdOffset(tableCode, isTHead, trIndex, tdIndex) {\n\t      var codes = tableCode.split(/\\n/);\n\t      var targetTr = isTHead ? 0 : trIndex + 2;\n\t      var tds = codes[targetTr].split(/\\|/);\n\t      var needPlus1 = /^\\s*$/.test(tds[0]);\n\t      var targetTd = needPlus1 ? tdIndex + 1 : tdIndex;\n\t      var current = tds[targetTd];\n\t      var pre = [];\n\n\t      for (var i = 0; i < targetTd; i++) {\n\t        pre.push(tds[i]);\n\t      }\n\n\t      return {\n\t        preLine: targetTr,\n\t        preCh: needPlus1 ? pre.join('|').length + 1 : pre.join('|').length,\n\t        plusCh: current.length,\n\t        currentTd: current\n\t      };\n\t    }\n\t    /**\n\t     * 在编辑器里找到对应的表格源码，并让编辑器选中\n\t     */\n\n\t  }, {\n\t    key: \"$findTableInEditor\",\n\t    value: function $findTableInEditor() {\n\t      this.$collectTableDom();\n\t      this.$collectTableCode(); // 暂时不考虑代码块中包含表格、人为输入表格html语法、tapd特色表格语法的情况\n\t      // 也就是说，出现上述情况时，表格的所见即所得编辑功能失效\n\n\t      if (this.tableEditor.info.totalTables !== this.tableEditor.tableCodes.length) {\n\t        return false;\n\t      }\n\n\t      this.$setSelection(this.tableEditor.info.tableIndex, 'td', this.trigger === 'click');\n\t    }\n\t  }, {\n\t    key: \"$initReg\",\n\t    value: function $initReg() {\n\t      this.tableReg = this.tableReg ? this.tableReg : getTableRule(true);\n\t      this.codeBlockReg = this.codeBlockReg ? this.codeBlockReg : getCodeBlockRule().reg;\n\t    }\n\t  }, {\n\t    key: \"showBubble\",\n\t    value: function showBubble() {\n\t      if (this.trigger === 'click') {\n\t        this.$drawEditor();\n\t        return;\n\t      }\n\n\t      this.$drawSymbol();\n\t    }\n\t    /**\n\t     * 判断是否处于编辑状态\n\t     * @returns {boolean}\n\t     */\n\n\t  }, {\n\t    key: \"$isEditing\",\n\t    value: function $isEditing() {\n\t      return this.tableEditor.editing;\n\t    }\n\t    /**\n\t     * 把表格上的input单行文本框和操作符号画出来\n\t     */\n\n\t  }, {\n\t    key: \"$drawEditor\",\n\t    value: function $drawEditor() {\n\t      var dom = document.createElement('div');\n\t      dom.className = 'cherry-previewer-table-content-hander__input';\n\t      var input = document.createElement('textarea');\n\t      dom.appendChild(input);\n\t      this.tableEditor.editorDom.inputDiv = dom;\n\t      this.tableEditor.editorDom.inputDom = input;\n\t      this.$updateEditorPosition();\n\t      this.container.appendChild(this.tableEditor.editorDom.inputDiv);\n\t      this.tableEditor.editorDom.inputDom.value = this.tableEditor.info.code.replace(/<br>/g, '\\n');\n\t      this.tableEditor.editorDom.inputDom.focus();\n\t    }\n\t  }, {\n\t    key: \"$onInputChange\",\n\t    value: function $onInputChange(e) {\n\t      if (e.target.tagName !== 'TEXTAREA') {\n\t        return;\n\t      }\n\n\t      this.codeMirror.replaceSelection(e.target.value.replace(/\\n/g, '<br>'), 'around');\n\t    }\n\t    /**\n\t     * 更新编辑器的位置（尺寸和位置）\n\t     */\n\n\t  }, {\n\t    key: \"$updateEditorPosition\",\n\t    value: function $updateEditorPosition() {\n\t      this.$setInputOffset();\n\t      var tdStyle = getComputedStyle(this.tableEditor.info.tdNode);\n\t      this.tableEditor.editorDom.inputDom.style.textAlign = tdStyle.textAlign || 'left';\n\t      this.tableEditor.editorDom.inputDom.style.fontSize = tdStyle.fontSize || '16px';\n\t      this.tableEditor.editorDom.inputDom.style.fontFamily = tdStyle.fontFamily;\n\t      this.tableEditor.editorDom.inputDom.style.lineHeight = tdStyle.lineHeight;\n\t      this.tableEditor.editorDom.inputDom.style.padding = tdStyle.padding; // 左对齐的时候，paddingRight设置成0，反之paddingLeft设置成0\n\n\t      if (/left/.test(tdStyle.textAlign)) {\n\t        this.tableEditor.editorDom.inputDom.style.paddingRight = '0px';\n\t      }\n\n\t      if (/right/.test(tdStyle.textAlign)) {\n\t        this.tableEditor.editorDom.inputDom.style.paddingLeft = '0px';\n\t      }\n\n\t      if (/center/.test(tdStyle.textAlign)) {\n\t        this.tableEditor.editorDom.inputDom.style.paddingLeft = '0px';\n\t        this.tableEditor.editorDom.inputDom.style.paddingRight = '0px';\n\t      }\n\n\t      this.tableEditor.editorDom.inputDom.style.paddingBottom = '0px';\n\t    }\n\t  }, {\n\t    key: \"$getClosestNode\",\n\t    value: function $getClosestNode(node, targetNodeName) {\n\t      if (node.tagName === targetNodeName) {\n\t        return node;\n\t      }\n\n\t      if (node.parentNode.tagName === 'BODY') {\n\t        return false;\n\t      }\n\n\t      return this.$getClosestNode(node.parentNode, targetNodeName);\n\t    }\n\t    /**\n\t     * 绘制操作符号\n\t     */\n\n\t  }, {\n\t    key: \"$drawSymbol\",\n\t    value: function $drawSymbol() {\n\t      var _context7,\n\t          _this2 = this;\n\n\t      var types = ['Last', 'Next'];\n\t      var dirs = ['Row', 'Col'];\n\t      var textDict = {\n\t        Row: '行',\n\t        Col: '列'\n\t      };\n\n\t      var symbols = flat$3(_context7 = map$3(dirs).call(dirs, function (_, index) {\n\t        return map$3(types).call(types, function (type) {\n\t          return map$3(dirs).call(dirs, function (dir) {\n\t            return [\"\".concat(index), type, dir];\n\t          });\n\t        });\n\t      })).call(_context7, 2);\n\n\t      var container = document.createElement('ul');\n\t      container.className = 'cherry-previewer-table-hover-handler-container';\n\n\t      forEach$3(symbols).call(symbols, function (_ref4) {\n\t        var _ref5 = _slicedToArray(_ref4, 3),\n\t            index = _ref5[0],\n\t            type = _ref5[1],\n\t            dir = _ref5[2];\n\n\t        var li = document.createElement('li');\n\t        li.setAttribute('data-index', index);\n\t        li.setAttribute('data-type', type);\n\t        li.setAttribute('data-dir', dir);\n\t        li.className = 'cherry-previewer-table-hover-handler__symbol';\n\t        li.title = \"\\u6DFB\\u52A0\".concat(textDict[dir]);\n\t        li.innerHTML = '+';\n\t        li.addEventListener('click', function (e) {\n\t          var _context8;\n\n\t          var target = e.target;\n\n\t          if (!(target instanceof HTMLElement)) {\n\t            return;\n\t          }\n\n\t          var _target$dataset = target.dataset,\n\t              type = _target$dataset.type,\n\t              dir = _target$dataset.dir;\n\n\t          _this2[concat$5(_context8 = \"$add\".concat(type)).call(_context8, dir)]();\n\t        });\n\t        container.appendChild(li);\n\t      }, true);\n\n\t      this.tableEditor.editorDom.symbolContainer = container;\n\t      this.container.appendChild(this.tableEditor.editorDom.symbolContainer);\n\t      this.$setSymbolOffset();\n\t    }\n\t    /**\n\t     * 添加上一行\n\t     */\n\n\t  }, {\n\t    key: \"$addLastRow\",\n\t    value: function $addLastRow() {\n\t      var _context9;\n\n\t      var _this$tableEditor$inf2 = _slicedToArray(this.tableEditor.info.selection, 1),\n\t          line = _this$tableEditor$inf2[0].line;\n\n\t      var newRow = \"\".concat(repeat$3(_context9 = '|').call(_context9, this.tableEditor.info.columns), \"\\n\");\n\t      this.codeMirror.replaceRange(newRow, {\n\t        line: line,\n\t        ch: 0\n\t      });\n\t      this.$findTableInEditor();\n\t      this.$setSelection(this.tableEditor.info.tableIndex, 'td');\n\t    }\n\t    /**\n\t     * 添加下一行\n\t     */\n\n\t  }, {\n\t    key: \"$addNextRow\",\n\t    value: function $addNextRow() {\n\t      var _context10;\n\n\t      var _this$tableEditor$inf3 = _slicedToArray(this.tableEditor.info.selection, 2),\n\t          line = _this$tableEditor$inf3[1].line;\n\n\t      var newRow = \"\".concat(repeat$3(_context10 = '|').call(_context10, this.tableEditor.info.columns), \"\\n\");\n\t      this.codeMirror.replaceRange(newRow, {\n\t        line: line + 1,\n\t        ch: 0\n\t      });\n\t      this.$findTableInEditor();\n\t      this.$setSelection(this.tableEditor.info.tableIndex, 'td');\n\t    }\n\t    /**\n\t     * 添加上一列\n\t     */\n\n\t  }, {\n\t    key: \"$addLastCol\",\n\t    value: function $addLastCol() {\n\t      var _this3 = this;\n\n\t      this.$setSelection(this.tableEditor.info.tableIndex, 'table');\n\t      var selection = this.codeMirror.getSelection();\n\t      var lines = selection.split('\\n');\n\n\t      var newLines = map$3(lines).call(lines, function (line, index) {\n\t        var cells = line.split('|');\n\t        var replaceItem = 1 === index ? ':-:' : '';\n\n\t        splice$4(cells).call(cells, _this3.tableEditor.info.tdIndex + 1, 0, replaceItem);\n\n\t        return cells.join('|');\n\t      });\n\n\t      var newText = newLines.join('\\n');\n\t      this.codeMirror.replaceSelection(newText);\n\t      this.$findTableInEditor();\n\t      this.$setSelection(this.tableEditor.info.tableIndex, 'table');\n\t    }\n\t    /**\n\t     * 添加下一列\n\t     */\n\n\t  }, {\n\t    key: \"$addNextCol\",\n\t    value: function $addNextCol() {\n\t      var _this4 = this;\n\n\t      this.$setSelection(this.tableEditor.info.tableIndex, 'table');\n\t      var selection = this.codeMirror.getSelection();\n\t      var lines = selection.split('\\n');\n\n\t      var newLines = map$3(lines).call(lines, function (line, index) {\n\t        var cells = line.split('|');\n\t        var replaceItem = 1 === index ? ':-:' : '';\n\n\t        splice$4(cells).call(cells, _this4.tableEditor.info.tdIndex + 2, 0, replaceItem);\n\n\t        return cells.join('|');\n\t      });\n\n\t      var newText = newLines.join('\\n');\n\t      this.codeMirror.replaceSelection(newText);\n\t      this.$findTableInEditor();\n\t      this.$setSelection(this.tableEditor.info.tableIndex, 'table');\n\t    }\n\t  }]);\n\n\t  return TableHandler;\n\t}();\n\n\t/**\n\t * Copyright (C) 2021 THL A29 Limited, a Tencent company.\n\t *\n\t * Licensed under the Apache License, Version 2.0 (the \"License\");\n\t * you may not use this file except in compliance with the License.\n\t * You may obtain a copy of the License at\n\t *\n\t *     http://www.apache.org/licenses/LICENSE-2.0\n\t *\n\t * Unless required by applicable law or agreed to in writing, software\n\t * distributed under the License is distributed on an \"AS IS\" BASIS,\n\t * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n\t * See the License for the specific language governing permissions and\n\t * limitations under the License.\n\t */\n\t/**\n\t * 对话框基操集合\n\t */\n\n\tvar dialog = {\n\t  open: function open() {\n\t    this.dom.style.display = 'block';\n\t    this.postMessage('ready?');\n\t  },\n\t  close: function close() {\n\t    this.dom.style.display = 'none';\n\t  },\n\t  postMessage: function postMessage(messageName) {\n\t    var _this$iframeDom, _this$iframeDom$conte;\n\n\t    var value = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';\n\t    (_this$iframeDom = this.iframeDom) === null || _this$iframeDom === void 0 ? void 0 : (_this$iframeDom$conte = _this$iframeDom.contentWindow) === null || _this$iframeDom$conte === void 0 ? void 0 : _this$iframeDom$conte.postMessage({\n\t      eventName: messageName,\n\t      value: value\n\t    }, '*');\n\t  },\n\t  draw: function draw(params, onReady, onSubmit) {\n\t    var _this = this;\n\n\t    var iframeSrc = params.iframeSrc,\n\t        title = params.title;\n\t    this.onSubmit = onSubmit;\n\t    this.onReady = onReady;\n\n\t    if (this.dom) {\n\t      var test = new RegExp(\"\".concat(iframeSrc, \"$\"), 'i');\n\n\t      if (!test.test(this.iframeDom.src)) {\n\t        this.iframeDom.src = iframeSrc;\n\t      }\n\n\t      this.open();\n\t      return;\n\t    } // 添加通信事件\n\n\n\t    window.addEventListener('message', function (event) {\n\t      // @ts-ignore\n\t      if (!event.data || !event.data.eventName) {\n\t        return;\n\t      } // @ts-ignore\n\n\n\t      switch (event.data.eventName) {\n\t        case 'getData:success':\n\t          // @ts-ignore\n\t          _this.onSubmit(event.data.value);\n\n\t          _this.close();\n\n\t        case 'ready':\n\t          _this.onReady();\n\n\t      }\n\t    }); // 构造页面元素\n\n\t    this.iframeDom = createElement('iframe', 'cherry-dialog-iframe', {\n\t      src: iframeSrc,\n\t      style: 'border: none;'\n\t    });\n\t    this.dom = createElement('div', 'cherry-dialog', {\n\t      style: ['z-index:9999', 'display: block', 'position: absolute', 'top: 10%;left: 10%;bottom: 10%;right: 10%', 'background-color: #FFF', 'box-shadow: 0px 50px 100px -12px rgba(0,0,0,.05),0px 30px 60px -30px rgba(0,0,0,.1)', 'border-radius: 6px', 'border: 1px solid #ddd;'].join(';')\n\t    });\n\t    this.head = createElement('div', 'cherry-dialog--head', {\n\t      style: ['height: 30px', 'line-height: 30px', 'padding-left: 10px', 'padding-right: 10px'].join(';')\n\t    });\n\t    this.body = createElement('div', 'cherry-dialog--body', {\n\t      style: ['position: absolute', 'bottom: 30px', 'top: 30px', 'left: 0', 'right: 0', 'overflow: hidden'].join(';')\n\t    });\n\t    this.foot = createElement('div', 'cherry-dialog--foot', {\n\t      style: ['height: 30px', 'line-height: 18px', 'padding-left: 10px', 'padding-right: 10px', 'position: absolute', 'bottom: 0', 'left: 0', 'right: 0'].join(';')\n\t    });\n\t    this.headTitle = createElement('span', 'cherry-dialog--title', {\n\t      style: 'user-select:none;'\n\t    });\n\t    this.headCloseButton = createElement('i', 'cherry-dialog--close ch-icon ch-icon-close', {\n\t      style: 'float: right;font-size: 12px;cursor: pointer;'\n\t    });\n\t    this.footSureButton = createElement('button', 'cherry-dialog--sure', {\n\t      style: ['float: right', 'cursor: pointer', 'margin: 3px', 'background-color: #4d90fe', 'color: #FFF', 'border: 1px solid #4d90fe', 'border-radius: 2px', 'padding: 2px 15px', 'user-select:none'].join(';')\n\t    });\n\t    this.headCloseButton.title = '关闭';\n\t    this.footSureButton.textContent = '确定';\n\t    this.headTitle.textContent = title;\n\t    this.head.appendChild(this.headTitle);\n\t    this.head.appendChild(this.headCloseButton);\n\t    this.foot.appendChild(this.footSureButton);\n\t    this.body.appendChild(this.iframeDom);\n\t    this.dom.appendChild(this.head);\n\t    this.dom.appendChild(this.body);\n\t    this.dom.appendChild(this.foot);\n\t    this.headCloseButton.addEventListener('click', function () {\n\t      _this.close();\n\t    });\n\t    this.footSureButton.addEventListener('click', function () {\n\t      _this.postMessage('getData');\n\t    });\n\t    document.body.appendChild(this.dom);\n\t  }\n\t};\n\t/**\n\t * draw.io的对话框\n\t * @param {string} xml draw.io的xml格式的字符串数据\n\t * @param {*} callback 回调\n\t */\n\n\tfunction drawioDialog() {\n\t  var iframeSrc = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';\n\t  var xml = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';\n\t  var callback = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;\n\t  var dialogParam = {\n\t    iframeSrc: iframeSrc,\n\t    title: 'draw.io'\n\t  };\n\t  dialog.draw(dialogParam, function () {\n\t    dialog.postMessage('setData', xml);\n\t  }, function (data) {\n\t    callback(data);\n\t  });\n\t}\n\n\t/**\n\t * Copyright (C) 2021 THL A29 Limited, a Tencent company.\n\t *\n\t * Licensed under the Apache License, Version 2.0 (the \"License\");\n\t * you may not use this file except in compliance with the License.\n\t * You may obtain a copy of the License at\n\t *\n\t *     http://www.apache.org/licenses/LICENSE-2.0\n\t *\n\t * Unless required by applicable law or agreed to in writing, software\n\t * distributed under the License is distributed on an \"AS IS\" BASIS,\n\t * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n\t * See the License for the specific language governing permissions and\n\t * limitations under the License.\n\t */\n\n\t/**\n\t * 复制内容到剪贴板\n\t * @returns null\n\t */\n\tfunction copyToClip(str) {\n\t  function listener(e) {\n\t    e.clipboardData.setData('text/html', str);\n\t    e.clipboardData.setData('text/plain', str);\n\t    e.preventDefault();\n\t  }\n\n\t  document.addEventListener('copy', listener);\n\t  document.execCommand('copy');\n\t  document.removeEventListener('copy', listener);\n\t}\n\n\t/**\n\t * Gets the timestamp of the number of milliseconds that have elapsed since\n\t * the Unix epoch (1 January 1970 00:00:00 UTC).\n\t *\n\t * @static\n\t * @memberOf _\n\t * @since 2.4.0\n\t * @category Date\n\t * @returns {number} Returns the timestamp.\n\t * @example\n\t *\n\t * _.defer(function(stamp) {\n\t *   console.log(_.now() - stamp);\n\t * }, _.now());\n\t * // => Logs the number of milliseconds it took for the deferred invocation.\n\t */\n\tvar now = function() {\n\t  return _root.Date.now();\n\t};\n\n\tvar now_1 = now;\n\n\t/** Used to match a single whitespace character. */\n\tvar reWhitespace = /\\s/;\n\n\t/**\n\t * Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace\n\t * character of `string`.\n\t *\n\t * @private\n\t * @param {string} string The string to inspect.\n\t * @returns {number} Returns the index of the last non-whitespace character.\n\t */\n\tfunction trimmedEndIndex(string) {\n\t  var index = string.length;\n\n\t  while (index-- && reWhitespace.test(string.charAt(index))) {}\n\t  return index;\n\t}\n\n\tvar _trimmedEndIndex = trimmedEndIndex;\n\n\t/** Used to match leading whitespace. */\n\tvar reTrimStart = /^\\s+/;\n\n\t/**\n\t * The base implementation of `_.trim`.\n\t *\n\t * @private\n\t * @param {string} string The string to trim.\n\t * @returns {string} Returns the trimmed string.\n\t */\n\tfunction baseTrim(string) {\n\t  return string\n\t    ? string.slice(0, _trimmedEndIndex(string) + 1).replace(reTrimStart, '')\n\t    : string;\n\t}\n\n\tvar _baseTrim = baseTrim;\n\n\t/** Used as references for various `Number` constants. */\n\tvar NAN = 0 / 0;\n\n\t/** Used to detect bad signed hexadecimal string values. */\n\tvar reIsBadHex = /^[-+]0x[0-9a-f]+$/i;\n\n\t/** Used to detect binary string values. */\n\tvar reIsBinary = /^0b[01]+$/i;\n\n\t/** Used to detect octal string values. */\n\tvar reIsOctal = /^0o[0-7]+$/i;\n\n\t/** Built-in method references without a dependency on `root`. */\n\tvar freeParseInt = parseInt;\n\n\t/**\n\t * Converts `value` to a number.\n\t *\n\t * @static\n\t * @memberOf _\n\t * @since 4.0.0\n\t * @category Lang\n\t * @param {*} value The value to process.\n\t * @returns {number} Returns the number.\n\t * @example\n\t *\n\t * _.toNumber(3.2);\n\t * // => 3.2\n\t *\n\t * _.toNumber(Number.MIN_VALUE);\n\t * // => 5e-324\n\t *\n\t * _.toNumber(Infinity);\n\t * // => Infinity\n\t *\n\t * _.toNumber('3.2');\n\t * // => 3.2\n\t */\n\tfunction toNumber(value) {\n\t  if (typeof value == 'number') {\n\t    return value;\n\t  }\n\t  if (isSymbol_1(value)) {\n\t    return NAN;\n\t  }\n\t  if (isObject_1(value)) {\n\t    var other = typeof value.valueOf == 'function' ? value.valueOf() : value;\n\t    value = isObject_1(other) ? (other + '') : other;\n\t  }\n\t  if (typeof value != 'string') {\n\t    return value === 0 ? value : +value;\n\t  }\n\t  value = _baseTrim(value);\n\t  var isBinary = reIsBinary.test(value);\n\t  return (isBinary || reIsOctal.test(value))\n\t    ? freeParseInt(value.slice(2), isBinary ? 2 : 8)\n\t    : (reIsBadHex.test(value) ? NAN : +value);\n\t}\n\n\tvar toNumber_1 = toNumber;\n\n\t/** Error message constants. */\n\tvar FUNC_ERROR_TEXT = 'Expected a function';\n\n\t/* Built-in method references for those with the same name as other `lodash` methods. */\n\tvar nativeMax$1 = Math.max,\n\t    nativeMin = Math.min;\n\n\t/**\n\t * Creates a debounced function that delays invoking `func` until after `wait`\n\t * milliseconds have elapsed since the last time the debounced function was\n\t * invoked. The debounced function comes with a `cancel` method to cancel\n\t * delayed `func` invocations and a `flush` method to immediately invoke them.\n\t * Provide `options` to indicate whether `func` should be invoked on the\n\t * leading and/or trailing edge of the `wait` timeout. The `func` is invoked\n\t * with the last arguments provided to the debounced function. Subsequent\n\t * calls to the debounced function return the result of the last `func`\n\t * invocation.\n\t *\n\t * **Note:** If `leading` and `trailing` options are `true`, `func` is\n\t * invoked on the trailing edge of the timeout only if the debounced function\n\t * is invoked more than once during the `wait` timeout.\n\t *\n\t * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n\t * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n\t *\n\t * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n\t * for details over the differences between `_.debounce` and `_.throttle`.\n\t *\n\t * @static\n\t * @memberOf _\n\t * @since 0.1.0\n\t * @category Function\n\t * @param {Function} func The function to debounce.\n\t * @param {number} [wait=0] The number of milliseconds to delay.\n\t * @param {Object} [options={}] The options object.\n\t * @param {boolean} [options.leading=false]\n\t *  Specify invoking on the leading edge of the timeout.\n\t * @param {number} [options.maxWait]\n\t *  The maximum time `func` is allowed to be delayed before it's invoked.\n\t * @param {boolean} [options.trailing=true]\n\t *  Specify invoking on the trailing edge of the timeout.\n\t * @returns {Function} Returns the new debounced function.\n\t * @example\n\t *\n\t * // Avoid costly calculations while the window size is in flux.\n\t * jQuery(window).on('resize', _.debounce(calculateLayout, 150));\n\t *\n\t * // Invoke `sendMail` when clicked, debouncing subsequent calls.\n\t * jQuery(element).on('click', _.debounce(sendMail, 300, {\n\t *   'leading': true,\n\t *   'trailing': false\n\t * }));\n\t *\n\t * // Ensure `batchLog` is invoked once after 1 second of debounced calls.\n\t * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });\n\t * var source = new EventSource('/stream');\n\t * jQuery(source).on('message', debounced);\n\t *\n\t * // Cancel the trailing debounced invocation.\n\t * jQuery(window).on('popstate', debounced.cancel);\n\t */\n\tfunction debounce(func, wait, options) {\n\t  var lastArgs,\n\t      lastThis,\n\t      maxWait,\n\t      result,\n\t      timerId,\n\t      lastCallTime,\n\t      lastInvokeTime = 0,\n\t      leading = false,\n\t      maxing = false,\n\t      trailing = true;\n\n\t  if (typeof func != 'function') {\n\t    throw new TypeError(FUNC_ERROR_TEXT);\n\t  }\n\t  wait = toNumber_1(wait) || 0;\n\t  if (isObject_1(options)) {\n\t    leading = !!options.leading;\n\t    maxing = 'maxWait' in options;\n\t    maxWait = maxing ? nativeMax$1(toNumber_1(options.maxWait) || 0, wait) : maxWait;\n\t    trailing = 'trailing' in options ? !!options.trailing : trailing;\n\t  }\n\n\t  function invokeFunc(time) {\n\t    var args = lastArgs,\n\t        thisArg = lastThis;\n\n\t    lastArgs = lastThis = undefined;\n\t    lastInvokeTime = time;\n\t    result = func.apply(thisArg, args);\n\t    return result;\n\t  }\n\n\t  function leadingEdge(time) {\n\t    // Reset any `maxWait` timer.\n\t    lastInvokeTime = time;\n\t    // Start the timer for the trailing edge.\n\t    timerId = setTimeout(timerExpired, wait);\n\t    // Invoke the leading edge.\n\t    return leading ? invokeFunc(time) : result;\n\t  }\n\n\t  function remainingWait(time) {\n\t    var timeSinceLastCall = time - lastCallTime,\n\t        timeSinceLastInvoke = time - lastInvokeTime,\n\t        timeWaiting = wait - timeSinceLastCall;\n\n\t    return maxing\n\t      ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke)\n\t      : timeWaiting;\n\t  }\n\n\t  function shouldInvoke(time) {\n\t    var timeSinceLastCall = time - lastCallTime,\n\t        timeSinceLastInvoke = time - lastInvokeTime;\n\n\t    // Either this is the first call, activity has stopped and we're at the\n\t    // trailing edge, the system time has gone backwards and we're treating\n\t    // it as the trailing edge, or we've hit the `maxWait` limit.\n\t    return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||\n\t      (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));\n\t  }\n\n\t  function timerExpired() {\n\t    var time = now_1();\n\t    if (shouldInvoke(time)) {\n\t      return trailingEdge(time);\n\t    }\n\t    // Restart the timer.\n\t    timerId = setTimeout(timerExpired, remainingWait(time));\n\t  }\n\n\t  function trailingEdge(time) {\n\t    timerId = undefined;\n\n\t    // Only invoke if we have `lastArgs` which means `func` has been\n\t    // debounced at least once.\n\t    if (trailing && lastArgs) {\n\t      return invokeFunc(time);\n\t    }\n\t    lastArgs = lastThis = undefined;\n\t    return result;\n\t  }\n\n\t  function cancel() {\n\t    if (timerId !== undefined) {\n\t      clearTimeout(timerId);\n\t    }\n\t    lastInvokeTime = 0;\n\t    lastArgs = lastCallTime = lastThis = timerId = undefined;\n\t  }\n\n\t  function flush() {\n\t    return timerId === undefined ? result : trailingEdge(now_1());\n\t  }\n\n\t  function debounced() {\n\t    var time = now_1(),\n\t        isInvoking = shouldInvoke(time);\n\n\t    lastArgs = arguments;\n\t    lastThis = this;\n\t    lastCallTime = time;\n\n\t    if (isInvoking) {\n\t      if (timerId === undefined) {\n\t        return leadingEdge(lastCallTime);\n\t      }\n\t      if (maxing) {\n\t        // Handle invocations in a tight loop.\n\t        clearTimeout(timerId);\n\t        timerId = setTimeout(timerExpired, wait);\n\t        return invokeFunc(lastCallTime);\n\t      }\n\t    }\n\t    if (timerId === undefined) {\n\t      timerId = setTimeout(timerExpired, wait);\n\t    }\n\t    return result;\n\t  }\n\t  debounced.cancel = cancel;\n\t  debounced.flush = flush;\n\t  return debounced;\n\t}\n\n\tvar debounce_1 = debounce;\n\n\t/**\n\t * 预览区域的响应式工具栏\n\t */\n\n\tvar PreviewerBubble = /*#__PURE__*/function () {\n\t  /**\n\t   *\n\t   * @param {import('../Previewer').default} previewer\n\t   */\n\t  function PreviewerBubble(previewer) {\n\t    _classCallCheck(this, PreviewerBubble);\n\n\t    /**\n\t     * @property\n\t     * @type {import('../Previewer').default}\n\t     */\n\t    this.previewer = previewer;\n\t    /**\n\t     * @property\n\t     * @type {import('../Editor').default}\n\t     */\n\n\t    this.editor = previewer.editor;\n\t    this.previewerDom = this.previewer.getDom();\n\t    this.enablePreviewerBubble = this.previewer.options.enablePreviewerBubble;\n\t    /**\n\t     * @property\n\t     * @type {{ [key: string]: HTMLDivElement}}\n\t     */\n\n\t    this.bubble = {};\n\t    /**\n\t     * @property\n\t     * @type {{ [key: string]: { emit: (...args: any[]) => any, [key:string]: any }}}\n\t     */\n\n\t    this.bubbleHandler = {};\n\t    this.init();\n\t  }\n\n\t  _createClass(PreviewerBubble, [{\n\t    key: \"init\",\n\t    value: function init() {\n\t      var _context,\n\t          _context2,\n\t          _context3,\n\t          _this = this,\n\t          _context10;\n\n\t      this.previewerDom.addEventListener('click', bind$5(_context = this.$onClick).call(_context, this));\n\t      this.previewerDom.addEventListener('mouseover', bind$5(_context2 = this.$onMouseOver).call(_context2, this));\n\t      this.previewerDom.addEventListener('mouseout', bind$5(_context3 = this.$onMouseOut).call(_context3, this));\n\t      document.addEventListener('mousedown', function (event) {\n\t        var _context4;\n\n\t        forEach$3(_context4 = values$3(_this.bubbleHandler)).call(_context4, function (handler) {\n\t          return handler.emit('mousedown', event);\n\t        });\n\t      });\n\t      document.addEventListener('mouseup', function (event) {\n\t        var _context5;\n\n\t        forEach$3(_context5 = values$3(_this.bubbleHandler)).call(_context5, function (handler) {\n\t          return handler.emit('mouseup', event, function () {\n\t            return _this.$removeAllPreviewerBubbles('click');\n\t          });\n\t        });\n\t      });\n\t      document.addEventListener('mousemove', function (event) {\n\t        var _context6;\n\n\t        forEach$3(_context6 = values$3(_this.bubbleHandler)).call(_context6, function (handler) {\n\t          return handler.emit('mousemove', event);\n\t        });\n\t      });\n\t      document.addEventListener('keyup', function (event) {\n\t        var _context7;\n\n\t        forEach$3(_context7 = values$3(_this.bubbleHandler)).call(_context7, function (handler) {\n\t          return handler.emit('keyup', event);\n\t        });\n\t      });\n\t      this.previewerDom.addEventListener('scroll', function (event) {\n\t        var _context8;\n\n\t        forEach$3(_context8 = values$3(_this.bubbleHandler)).call(_context8, function (handler) {\n\t          return handler.emit('scroll', event);\n\t        });\n\t      }, true);\n\t      Event$1.on(this.previewer.instanceId, Event$1.Events.previewerClose, function () {\n\t        return _this.$removeAllPreviewerBubbles();\n\t      });\n\t      this.previewer.options.afterUpdateCallBack.push(function () {\n\t        var _context9;\n\n\t        forEach$3(_context9 = values$3(_this.bubbleHandler)).call(_context9, function (handler) {\n\t          return handler.emit('previewUpdate', function () {\n\t            return _this.$removeAllPreviewerBubbles();\n\t          });\n\t        });\n\t      });\n\t      this.previewerDom.addEventListener('change', bind$5(_context10 = this.$onChange).call(_context10, this));\n\t      this.removeHoverBubble = debounce_1(function () {\n\t        return _this.$removeAllPreviewerBubbles('hover');\n\t      }, 400);\n\t    }\n\t    /**\n\t     * 是否为由cherry生成的表格，且不是简单表格\n\t     * @param {HTMLElement} element\n\t     * @returns {boolean}\n\t     */\n\n\t  }, {\n\t    key: \"isCherryTable\",\n\t    value: function isCherryTable(element) {\n\t      var container = this.$getClosestNode(element, 'DIV');\n\n\t      if (container === false) {\n\t        return false;\n\t      }\n\n\t      if (/simple-table/.test(container.className) || !/cherry-table-container/.test(container.className)) {\n\t        return false;\n\t      }\n\n\t      return true;\n\t    }\n\t  }, {\n\t    key: \"$onMouseOver\",\n\t    value: function $onMouseOver(e) {\n\t      if (!this.enablePreviewerBubble) {\n\t        return;\n\t      }\n\n\t      var cherryStatus = this.previewer.$cherry.getStatus(); // 左侧编辑器被隐藏时不再提供后续功能\n\n\t      if (cherryStatus.editor === 'hide') {\n\t        return;\n\t      }\n\n\t      var target = e.target;\n\n\t      if (typeof target.tagName === 'undefined') {\n\t        return;\n\t      }\n\n\t      switch (target.tagName) {\n\t        case 'TD':\n\t        case 'TH':\n\t          if (!this.isCherryTable(e.target)) {\n\t            return;\n\t          }\n\n\t          this.removeHoverBubble.cancel();\n\t          this.$removeAllPreviewerBubbles('hover');\n\t          this.$showTablePreviewerBubbles('hover', e.target);\n\t          return;\n\t      }\n\t    }\n\t  }, {\n\t    key: \"$onMouseOut\",\n\t    value: function $onMouseOut() {\n\t      if (!this.enablePreviewerBubble) {\n\t        return;\n\t      }\n\n\t      var cherryStatus = this.previewer.$cherry.getStatus(); // 左侧编辑器被隐藏时不再提供后续功能\n\n\t      if (cherryStatus.editor === 'hide') {\n\t        return;\n\t      }\n\n\t      this.removeHoverBubble();\n\t    }\n\t  }, {\n\t    key: \"$dealCheckboxClick\",\n\t    value: function $dealCheckboxClick(e) {\n\t      var _this2 = this;\n\n\t      var target = e.target; // 先计算是previewer中第几个checkbox\n\n\t      var list = from_1$2(this.previewerDom.querySelectorAll('.ch-icon-square, .ch-icon-check'));\n\n\t      this.checkboxIdx = indexOf$8(list).call(list, target); // 然后找到Editor中对应的`- []`或者`- [ ]`进行修改\n\n\t      var contents = this.getValueWithoutCode().split('\\n');\n\t      var editorCheckboxCount = 0; // [ ]中的空格，或者[x]中的x的位置\n\n\t      var targetLine = -1;\n\t      var targetCh = -1;\n\n\t      forEach$3(contents).call(contents, function (lineContent, lineIdx) {\n\t        var tmp = trim$3(lineContent).call(lineContent); // 去掉句首的空格和制表符\n\n\n\t        if (startsWith$3(tmp).call(tmp, '- [ ]') || startsWith$3(tmp).call(tmp, '- [x]')) {\n\t          // 如果是个checkbox\n\t          if (editorCheckboxCount === _this2.checkboxIdx) {\n\t            targetLine = lineIdx;\n\t            targetCh = indexOf$8(lineContent).call(lineContent, '- [') + 3;\n\t          }\n\n\t          editorCheckboxCount += 1;\n\t        }\n\t      });\n\n\t      if (targetLine === -1) {\n\t        // 无法找到对应的checkbox\n\t        return;\n\t      }\n\n\t      this.editor.editor.setSelection({\n\t        line: targetLine,\n\t        ch: targetCh\n\t      }, {\n\t        line: targetLine,\n\t        ch: targetCh + 1\n\t      });\n\t      this.editor.editor.replaceSelection(this.editor.editor.getSelection() === ' ' ? 'x' : ' ', 'around');\n\t    }\n\t  }, {\n\t    key: \"$onClick\",\n\t    value: function $onClick(e) {\n\t      var _this3 = this;\n\n\t      var target = e.target; // 复制代码块操作不关心编辑器的状态\n\n\t      this.$dealCopyCodeBlock(e);\n\t      var cherryStatus = this.previewer.$cherry.getStatus(); // 纯预览模式下，支持点击放大图片功能（以回调的形式实现，需要业务侧实现图片放大功能）\n\n\t      if (cherryStatus.editor === 'hide') {\n\t        if (cherryStatus.previewer === 'show') {\n\t          this.previewer.$cherry.options.callback.onClickPreview && this.previewer.$cherry.options.callback.onClickPreview(e);\n\t        }\n\n\t        return;\n\t      } // 编辑draw.io不受enablePreviewerBubble配置的影响\n\n\n\t      if (target.tagName === 'IMG' && target.getAttribute('data-type') === 'drawio') {\n\t        if (!this.beginChangeDrawioImg(target)) {\n\t          return;\n\t        }\n\n\t        var xmlData = decodeURI(target.getAttribute('data-xml'));\n\t        drawioDialog(this.previewer.$cherry.options.drawioIframeUrl, xmlData, function (newData) {\n\t          var _context11;\n\n\t          var xmlData = newData.xmlData,\n\t              base64 = newData.base64;\n\n\t          _this3.editor.editor.replaceSelection(concat$5(_context11 = \"(\".concat(base64, \"){data-type=drawio data-xml=\")).call(_context11, encodeURI(xmlData), \"}\"), 'around');\n\t        });\n\t        return;\n\t      }\n\n\t      if (!this.enablePreviewerBubble) {\n\t        return;\n\t      } // 只有双栏编辑模式才出现下面的功能\n\t      // checkbox所见即所得编辑操作\n\n\n\t      if (target.className === 'ch-icon ch-icon-square' || target.className === 'ch-icon ch-icon-check') {\n\t        this.$dealCheckboxClick(e);\n\t      }\n\n\t      this.$removeAllPreviewerBubbles();\n\n\t      if (typeof target.tagName === 'undefined') {\n\t        return;\n\t      }\n\n\t      switch (target.tagName) {\n\t        case 'IMG':\n\t          this.$showImgPreviewerBubbles(target);\n\t          break;\n\n\t        case 'TD':\n\t        case 'TH':\n\t          if (!this.isCherryTable(e.target)) {\n\t            return;\n\t          }\n\n\t          this.$showTablePreviewerBubbles('click', e.target);\n\t          break;\n\t      }\n\t    }\n\t  }, {\n\t    key: \"$onChange\",\n\t    value: function $onChange(e) {\n\t      var target = e.target; // code预览区域，修改语言设置项事件处理\n\n\t      if (target.className === CODE_PREVIEWER_LANG_SELECT_CLASS_NAME) {\n\t        this.$codePreviewLangSelectEventHandler(e);\n\t      }\n\t    }\n\t  }, {\n\t    key: \"$getClosestNode\",\n\t    value: function $getClosestNode(node, targetNodeName) {\n\t      if (node.tagName === targetNodeName) {\n\t        return node;\n\t      }\n\n\t      if (node.parentNode.tagName === 'BODY') {\n\t        return false;\n\t      }\n\n\t      return this.$getClosestNode(node.parentNode, targetNodeName);\n\t    }\n\t    /**\n\t     * 处理复制代码块的操作\n\t     */\n\n\t  }, {\n\t    key: \"$dealCopyCodeBlock\",\n\t    value: function $dealCopyCodeBlock(e) {\n\t      var _target$parentNode;\n\n\t      var target = e.target;\n\n\t      if (target.className === 'cherry-copy-code-block' || ((_target$parentNode = target.parentNode) === null || _target$parentNode === void 0 ? void 0 : _target$parentNode.className) === 'cherry-copy-code-block') {\n\t        var parentNode = target.className === 'cherry-copy-code-block' ? target.parentNode : target.parentNode.parentNode;\n\t        var codeContent = parentNode.innerText;\n\n\t        var _final = this.previewer.$cherry.options.callback.onCopyCode(e, codeContent);\n\n\t        if (_final === false) {\n\t          return false;\n\t        }\n\n\t        var iconNode = parentNode.querySelector('i.ch-icon-copy');\n\n\t        if (iconNode) {\n\t          iconNode.className = iconNode.className.replace('copy', 'ok');\n\n\t          setTimeout$3(function () {\n\t            iconNode.className = iconNode.className.replace('ok', 'copy');\n\t          }, 1500);\n\t        }\n\n\t        copyToClip(_final);\n\t      }\n\t    }\n\t    /**\n\t     * 隐藏预览区域已经激活的工具栏\n\t     * @param {string} trigger 移除指定的触发方式，不传默认全部移除\n\t     */\n\n\t  }, {\n\t    key: \"$removeAllPreviewerBubbles\",\n\t    value: function $removeAllPreviewerBubbles() {\n\t      var _context12,\n\t          _context13,\n\t          _this4 = this,\n\t          _context14,\n\t          _context15;\n\n\t      var trigger = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';\n\n\t      forEach$3(_context12 = filter$3(_context13 = entries$2(this.bubble)).call(_context13, function (_ref) {\n\t        var _ref2 = _slicedToArray(_ref, 1),\n\t            key = _ref2[0];\n\n\t        return !trigger || trigger === key;\n\t      })).call(_context12, function (_ref3) {\n\t        var _ref4 = _slicedToArray(_ref3, 2),\n\t            key = _ref4[0],\n\t            value = _ref4[1];\n\n\t        value.remove();\n\t        delete _this4.bubble[key];\n\t      });\n\n\t      forEach$3(_context14 = filter$3(_context15 = entries$2(this.bubbleHandler)).call(_context15, function (_ref5) {\n\t        var _ref6 = _slicedToArray(_ref5, 1),\n\t            key = _ref6[0];\n\n\t        return !trigger || trigger === key;\n\t      })).call(_context14, function (_ref7) {\n\t        var _ref8 = _slicedToArray(_ref7, 2),\n\t            key = _ref8[0],\n\t            value = _ref8[1];\n\n\t        value.emit('remove');\n\t        delete _this4.bubbleHandler[key];\n\t      });\n\t    }\n\t    /**\n\t     * 为触发的table增加操作工具栏\n\t     * @param {string} trigger 触发方式\n\t     * @param {HTMLElement} htmlElement 用户触发的table dom\n\t     */\n\n\t  }, {\n\t    key: \"$showTablePreviewerBubbles\",\n\t    value: function $showTablePreviewerBubbles(trigger, htmlElement) {\n\t      this.$createPreviewerBubbles(trigger, trigger === 'click' ? 'table-content-hander' : 'table-hover-handler');\n\t      var handler = new TableHandler(trigger, htmlElement, this.bubble[trigger], this.previewerDom, this.editor.editor);\n\t      handler.showBubble();\n\t      this.bubbleHandler[trigger] = handler;\n\t    }\n\t    /**\n\t     * 为选中的图片增加操作工具栏\n\t     * @param {HTMLImageElement} htmlElement 用户点击的图片dom\n\t     */\n\n\t  }, {\n\t    key: \"$showImgPreviewerBubbles\",\n\t    value: function $showImgPreviewerBubbles(htmlElement) {\n\t      var _context16;\n\n\t      this.$createPreviewerBubbles();\n\n\t      var list = from_1$2(this.previewerDom.querySelectorAll('img'));\n\n\t      this.totalImgs = list.length;\n\t      this.imgIndex = indexOf$8(list).call(list, htmlElement);\n\n\t      if (!this.beginChangeImgValue(htmlElement)) {\n\t        return {\n\t          emit: function emit() {}\n\t        };\n\t      }\n\n\t      imgSizeHander.showBubble(htmlElement, this.bubble.click, this.previewerDom);\n\t      imgSizeHander.bindChange(bind$5(_context16 = this.changeImgValue).call(_context16, this));\n\t      this.bubbleHandler.click = imgSizeHander;\n\t    }\n\t  }, {\n\t    key: \"getValueWithoutCode\",\n\t    value: function getValueWithoutCode() {\n\t      return this.editor.editor.getValue().replace(getCodeBlockRule().reg, function (whole) {\n\t        // 把代码块里的内容干掉\n\t        return whole.replace(/^.*$/gm, '/n');\n\t      }).replace(/(`+)(.+?(?:\\n.+?)*?)\\1/g, function (whole) {\n\t        // 把行内代码的符号去掉\n\t        return whole.replace(/[![\\]()]/g, '.');\n\t      });\n\t    }\n\t    /**\n\t     * TODO: beginChangeDrawioImg 和 beginChangeImgValue 代码高度重合，后面有时间重构下，抽成一个可以复用的，可以避开代码块、行内代码影响的通用方法\n\t     * 修改draw.io图片时选中编辑区域的对应文本\n\t     * @param {*} htmlElement 图片node\n\t     */\n\n\t  }, {\n\t    key: \"beginChangeDrawioImg\",\n\t    value: function beginChangeDrawioImg(htmlElement) {\n\t      var _context17;\n\n\t      var allDrawioImgs = from_1$2(this.previewerDom.querySelectorAll('img[data-type=\"drawio\"]'));\n\n\t      var totalDrawioImgs = allDrawioImgs.length;\n\n\t      var drawioImgIndex = indexOf$8(allDrawioImgs).call(allDrawioImgs, htmlElement);\n\n\t      var content = this.getValueWithoutCode();\n\t      var drawioImgsCode = content.match(imgDrawioReg);\n\t      var testSrc = drawioImgsCode[drawioImgIndex] ? trim$3(_context17 = drawioImgsCode[drawioImgIndex].replace(/^!\\[.*?\\]\\((.*?)\\)/, '$1')).call(_context17) : '';\n\n\t      if (drawioImgsCode.length === totalDrawioImgs || htmlElement.getAttribute('src') === testSrc) {\n\t        // 如果drawio语法数量和预览区域的一样多\n\t        var totalValue = content.split(imgDrawioReg);\n\t        var line = 0;\n\t        var beginCh = 0;\n\t        var endCh = 0;\n\t        var testIndex = 0;\n\n\t        for (var i = 0; i < totalValue.length; i++) {\n\t          var targetString = totalValue[i];\n\n\t          if (targetString === drawioImgsCode[testIndex]) {\n\t            // 如果找到目标代码\n\t            if (testIndex === drawioImgIndex) {\n\t              endCh = beginCh + targetString.length;\n\t              beginCh += targetString.replace(/^(!\\[[^\\]]*])[^\\n]*$/, '$1').length;\n\t              this.editor.editor.setSelection({\n\t                line: line,\n\t                ch: beginCh\n\t              }, {\n\t                line: line,\n\t                ch: endCh\n\t              }); // 更新后需要再调用一次markText机制\n\n\t              this.editor.dealBigData();\n\t              return true;\n\t            }\n\n\t            testIndex += 1;\n\t          } else {\n\t            var _targetString$match$l, _targetString$match;\n\n\t            line += (_targetString$match$l = (_targetString$match = targetString.match(/\\n/g)) === null || _targetString$match === void 0 ? void 0 : _targetString$match.length) !== null && _targetString$match$l !== void 0 ? _targetString$match$l : 0;\n\n\t            if (/\\n/.test(targetString)) {\n\t              // 如果有换行，则开始位置的字符计数从最后一个换行开始计数\n\t              beginCh = targetString.replace(/^[\\w\\W]*\\n([^\\n]*)$/, '$1').length;\n\t            } else {\n\t              // 如果没有换行，则继续按上次的beginCh为起始开始计数\n\t              beginCh += targetString.length;\n\t            }\n\t          }\n\t        }\n\t      }\n\n\t      return false;\n\t    }\n\t    /**\n\t     * 选中图片对应的MD语法\n\t     * @param {*} htmlElement 图片node\n\t     * @returns {boolean}\n\t     */\n\n\t  }, {\n\t    key: \"beginChangeImgValue\",\n\t    value: function beginChangeImgValue(htmlElement) {\n\t      var _context18;\n\n\t      var content = this.getValueWithoutCode();\n\t      var src = htmlElement.getAttribute('src');\n\t      var imgReg = /(!\\[[^\\n]*?\\]\\([^)]+\\))/g;\n\t      var contentImgs = content.match(imgReg);\n\t      var testSrc = contentImgs[this.imgIndex] ? trim$3(_context18 = contentImgs[this.imgIndex].replace(/^!\\[.*?\\]\\((.*?)\\)/, '$1')).call(_context18) : '';\n\n\t      if (contentImgs.length === this.totalImgs || src === testSrc) {\n\t        // 如果图片语法数量和预览区域的一样多\n\t        // 暂时不需要考虑手动输入img标签的场景 和 引用图片的场景\n\t        var totalValue = content.split(imgReg);\n\t        var imgAppendReg = /^!\\[.*?((?:#center|#right|#left|#float-right|#float-left|#border|#B|#shadow|#S|#radius|#R)+).*?\\].*$/;\n\t        var line = 0;\n\t        var beginCh = 0;\n\t        var endCh = 0;\n\t        var testIndex = 0;\n\n\t        for (var i = 0; i < totalValue.length; i++) {\n\t          var _targetString$match$l2, _targetString$match2;\n\n\t          var targetString = totalValue[i];\n\n\t          if (targetString === contentImgs[testIndex]) {\n\t            // 如果找到目标代码\n\t            if (testIndex === this.imgIndex) {\n\t              this.imgAppend = imgAppendReg.test(targetString) ? targetString.replace(imgAppendReg, '$1') : false;\n\t              beginCh += targetString.replace(/^(!\\[[^#\\]]*).*$/, '$1').length;\n\t              endCh = beginCh + targetString.replace(/^(!\\[[^#\\]]*)([^\\]]*?)\\].*$/, '$2').length;\n\t              this.editor.editor.setSelection({\n\t                line: line,\n\t                ch: beginCh\n\t              }, {\n\t                line: line,\n\t                ch: endCh\n\t              });\n\t              return true;\n\t            }\n\n\t            testIndex += 1;\n\t          }\n\n\t          line += (_targetString$match$l2 = (_targetString$match2 = targetString.match(/\\n/g)) === null || _targetString$match2 === void 0 ? void 0 : _targetString$match2.length) !== null && _targetString$match$l2 !== void 0 ? _targetString$match$l2 : 0;\n\n\t          if (/\\n/.test(targetString)) {\n\t            // 如果有换行，则开始位置的字符计数从最后一个换行开始计数\n\t            beginCh = targetString.replace(/^[\\w\\W]*\\n([^\\n]*)$/, '$1').length;\n\t          } else {\n\t            // 如果没有换行，则继续按上次的beginCh为起始开始计数\n\t            beginCh += targetString.length;\n\t          }\n\t        }\n\t      }\n\n\t      return false;\n\t    }\n\t    /**\n\t     * 修改图片尺寸时的回调\n\t     * @param {HTMLElement} htmlElement 被拖拽的图片标签\n\t     * @param {Object} style 图片的属性（宽高、对齐方式）\n\t     */\n\n\t  }, {\n\t    key: \"changeImgValue\",\n\t    value: function changeImgValue(htmlElement, style) {\n\t      var _context19, _context20;\n\n\t      var append = this.imgAppend ? \" \".concat(this.imgAppend) : '';\n\t      this.editor.editor.replaceSelection(concat$5(_context19 = concat$5(_context20 = \"#\".concat(Math.round(style.width), \"px #\")).call(_context20, Math.round(style.height), \"px\")).call(_context19, append), 'around');\n\t    }\n\t    /**\n\t     * 预览区域编辑器的容器\n\t     * @param {string} trigger 触发方式\n\t     * @param {string} type 容器类型（用作样式名：cherry-previewer-{type}）\n\t     */\n\n\t  }, {\n\t    key: \"$createPreviewerBubbles\",\n\t    value: function $createPreviewerBubbles() {\n\t      var trigger = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'click';\n\t      var type = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'img-size-hander';\n\n\t      if (!this.bubble[trigger]) {\n\t        this.bubble[trigger] = document.createElement('div');\n\t        this.bubble[trigger].className = \"cherry-previewer-\".concat(type);\n\t        this.previewerDom.after(this.bubble[trigger]);\n\n\t        if (trigger === 'hover') {\n\t          this.bubble[trigger].addEventListener('mouseover', this.removeHoverBubble.cancel);\n\t          this.bubble[trigger].addEventListener('mouseout', this.removeHoverBubble);\n\t        }\n\t      }\n\t    }\n\t  }, {\n\t    key: \"$showBorderBubbles\",\n\t    value: function $showBorderBubbles() {}\n\t  }, {\n\t    key: \"$showBtnBubbles\",\n\t    value: function $showBtnBubbles() {}\n\t    /**\n\t     * 修改预览区域代码语言设置的回调\n\t     */\n\n\t  }, {\n\t    key: \"$codePreviewLangSelectEventHandler\",\n\t    value: function $codePreviewLangSelectEventHandler(event) {\n\t      var list = from_1$2(this.previewerDom.querySelectorAll(\".\".concat(CODE_PREVIEWER_LANG_SELECT_CLASS_NAME)));\n\n\t      var codePreviewIndex = indexOf$8(list).call(list, event.target);\n\n\t      var contentList = this.editor.editor.getValue().split('\\n');\n\t      var targetCodePreviewSelectLine = -1;\n\t      var findCodeArea = -1; // 相互匹配的`的数量\n\n\t      var matchedSignalNum = 0; // 查找选择设置的代码块在哪一行:\n\n\t      var left = 0;\n\n\t      while (left < contentList.length) {\n\t        if (findCodeArea >= codePreviewIndex) {\n\t          break;\n\t        }\n\n\t        var right = left + 1;\n\n\t        if (/^`{3,}[\\s\\S]*$/.test(contentList[left])) {\n\t          var _contentList$left$mat, _contentList$left$mat2;\n\n\t          // 起始的`的数量\n\t          var topSignalNum = (_contentList$left$mat = (_contentList$left$mat2 = contentList[left].match(/^(`*)/g)) === null || _contentList$left$mat2 === void 0 ? void 0 : _contentList$left$mat2[0].length) !== null && _contentList$left$mat !== void 0 ? _contentList$left$mat : 0;\n\n\t          while (right < contentList.length) {\n\t            var _contentList$right$ma, _contentList$right$ma2;\n\n\t            var isMatched = false;\n\t            var bottomSignalNum = (_contentList$right$ma = (_contentList$right$ma2 = contentList[right].match(/^(`*)/g)) === null || _contentList$right$ma2 === void 0 ? void 0 : _contentList$right$ma2[0].length) !== null && _contentList$right$ma !== void 0 ? _contentList$right$ma : 0; // 支持: 3个及以上的`的相互匹配\n\n\t            if (/^`{3,}$/.test(contentList[right]) && bottomSignalNum === topSignalNum) {\n\t              isMatched = true;\n\t              findCodeArea = findCodeArea + 1;\n\n\t              if (findCodeArea === codePreviewIndex) {\n\t                targetCodePreviewSelectLine = left;\n\t                matchedSignalNum = topSignalNum;\n\t              }\n\t            }\n\n\t            right = right + 1;\n\n\t            if (isMatched) {\n\t              break;\n\t            }\n\t          }\n\t        }\n\n\t        left = right;\n\t      } // 只有匹配了代码块才进行替换\n\n\n\t      if (matchedSignalNum) {\n\t        this.editor.editor.setSelection({\n\t          line: targetCodePreviewSelectLine,\n\t          ch: matchedSignalNum\n\t        }, {\n\t          line: targetCodePreviewSelectLine,\n\t          ch: contentList[targetCodePreviewSelectLine].length\n\t        });\n\t        this.editor.editor.replaceSelection(event.target.value || '');\n\t      }\n\t    }\n\t  }]);\n\n\t  return PreviewerBubble;\n\t}();\n\n\tvar setInterval$2 = path.setInterval;\n\n\tvar setInterval$3 = setInterval$2;\n\n\t/**\n\t * Copyright (C) 2021 THL A29 Limited, a Tencent company.\n\t *\n\t * Licensed under the Apache License, Version 2.0 (the \"License\");\n\t * you may not use this file except in compliance with the License.\n\t * You may obtain a copy of the License at\n\t *\n\t *     http://www.apache.org/licenses/LICENSE-2.0\n\t *\n\t * Unless required by applicable law or agreed to in writing, software\n\t * distributed under the License is distributed on an \"AS IS\" BASIS,\n\t * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n\t * See the License for the specific language governing permissions and\n\t * limitations under the License.\n\t */\n\n\t/**\n\t * 懒加载图片\n\t *\n\t * - 只缓存图片的src的原因\n\t *    - 1、因为浏览器的图片缓存机制，相同的src第二次请求时，会浏览器会直接返回缓存的图片\n\t *    - 2、编辑状态时预览区域dom结构不稳定，并不能准确的缓存到img dom对象\n\t *\n\t * - 当浏览器**禁用**了图片缓存时，本机制效果有限\n\t *    - 依然还是可以实现懒加载的效果\n\t *    - 但是会把图片请求次数翻倍\n\t */\n\tvar LazyLoadImg = /*#__PURE__*/function () {\n\t  function LazyLoadImg(options, previewer) {\n\t    _classCallCheck(this, LazyLoadImg);\n\n\t    _defineProperty(this, \"options\", {\n\t      // 加载图片时如果需要展示loading图，则配置loading图的地址\n\t      loadingImgPath: '',\n\t      // 同一时间最多有几个图片请求，最大同时加载6张图片\n\t      maxNumPerTime: 2,\n\t      // 不进行懒加载处理的图片数量，如果为0，即所有图片都进行懒加载处理， 如果设置为-1，则所有图片都不进行懒加载处理\n\t      noLoadImgNum: 5,\n\t      // 首次自动加载几张图片（不论图片是否滚动到视野内），autoLoadImgNum = -1 表示会自动加载完所有图片\n\t      autoLoadImgNum: 5,\n\t      // 针对加载失败的图片 或 beforeLoadOneImgCallback 返回false 的图片，最多尝试加载几次，为了防止死循环，最多5次。以图片的src为纬度统计重试次数\n\t      maxTryTimesPerSrc: 2,\n\t      // 加载一张图片之前的回调函数，函数return false 会终止加载操作\n\t      beforeLoadOneImgCallback: function beforeLoadOneImgCallback(img) {},\n\t      // 加载一张图片失败之后的回调函数\n\t      failLoadOneImgCallback: function failLoadOneImgCallback(img) {},\n\t      // 加载一张图片之后的回调函数，如果图片加载失败，则不会回调该函数\n\t      afterLoadOneImgCallback: function afterLoadOneImgCallback(img) {},\n\t      // 加载完所有图片后调用的回调函数，只表示某一个时刻所有图片都加在完时的回调，如果预览区域又有了新图片，当新图片加载完后还会产生这个回调\n\t      afterLoadAllImgCallback: function afterLoadAllImgCallback() {}\n\t    });\n\n\t    assign$2(this.options, options);\n\n\t    this.previewer = previewer; // 记录已经加载过的图片src\n\n\t    this.srcLoadedList = []; // 记录加载失败的图片src，key是src，value是失败次数\n\n\t    this.srcFailLoadedList = {}; // 记录正在加载的图片src\n\n\t    this.srcLoadingList = []; // 记录所有懒加载的图片src\n\n\t    this.srcList = []; // 记录当前时刻有多少图片正在加载\n\n\t    this.loadingImgNum = 0; // 记录上次加载完所有图片的个数\n\n\t    this.lastLoadAllNum = 0;\n\t    this.previewerDom = this.previewer.getDomContainer();\n\t  }\n\t  /**\n\t   * 判断图片的src是否加载过\n\t   * @param {String} src\n\t   * @return {Boolean}\n\t   */\n\n\n\t  _createClass(LazyLoadImg, [{\n\t    key: \"isLoaded\",\n\t    value: function isLoaded(src) {\n\t      var _context;\n\n\t      return includes$4(_context = this.srcLoadedList).call(_context, src);\n\t    }\n\t    /**\n\t     * 判断图片是否正在加载\n\t     * @param {String} src\n\t     * @return {Boolean}\n\t     */\n\n\t  }, {\n\t    key: \"isLoading\",\n\t    value: function isLoading(src) {\n\t      var _context2;\n\n\t      return includes$4(_context2 = this.srcLoadingList).call(_context2, src);\n\t    }\n\t    /**\n\t     * 加载失败时，把src加入到失败队列中，并记录失败次数\n\t     * @param {*} src\n\t     */\n\n\t  }, {\n\t    key: \"loadFailed\",\n\t    value: function loadFailed(src) {\n\t      this.srcFailLoadedList[src] = this.srcFailLoadedList[src] ? this.srcFailLoadedList[src] + 1 : 1;\n\t    }\n\t    /**\n\t     * 判断图片失败次数是否超过最大次数\n\t     * @param {*} src\n\t     * @return {Boolean}\n\t     */\n\n\t  }, {\n\t    key: \"isFailLoadedMax\",\n\t    value: function isFailLoadedMax(src) {\n\t      return this.srcFailLoadedList[src] && this.srcFailLoadedList[src] > this.options.maxTryTimesPerSrc;\n\t    }\n\t    /**\n\t     * 判断当前时刻所有图片是否都完成过加载\n\t     * 当出现新图片后，完成加载后，当前函数还是会再次触发加载完的回调函数（afterLoadAllImgCallback）\n\t     * 该函数并不是实时返回的，最大有1s的延时\n\t     */\n\n\t  }, {\n\t    key: \"isLoadedAllDone\",\n\t    value: function isLoadedAllDone() {\n\t      var imgs = this.previewerDom.querySelectorAll('img[data-src]');\n\t      var allLoadedNum = this.srcLoadedList.length; // const dataSrcRemain = allLoadNum - this.srcLoadedList.length;\n\n\t      if (imgs.length <= 0 && this.lastLoadAllNum < allLoadedNum) {\n\t        this.lastLoadAllNum = allLoadedNum;\n\t        this.options.afterLoadAllImgCallback();\n\t        return true;\n\t      }\n\n\t      return false;\n\t    }\n\t    /**\n\t     * 当向下滚动时，提前100px加载图片\n\t     * 当向上滚动时，不提前加载图片，一定要图片完全进入可视区域（top > 0）再加载图片，否则当锚点定位时，会由于上面的图片加载出现定位不准的情况\n\t     *\n\t     */\n\n\t  }, {\n\t    key: \"loadOneImg\",\n\t    value: function loadOneImg() {\n\t      var _window$innerHeight,\n\t          _window,\n\t          _this = this;\n\n\t      var imgs = this.previewerDom.querySelectorAll('img[data-src]');\n\n\t      var _this$previewerDom$ge = this.previewerDom.getBoundingClientRect(),\n\t          height = _this$previewerDom$ge.height,\n\t          top = _this$previewerDom$ge.top;\n\n\t      var previewerHeight = height + top + 100; // 冗余一定高度用于提前加载\n\n\t      var windowsHeight = (_window$innerHeight = (_window = window) === null || _window === void 0 ? void 0 : _window.innerHeight) !== null && _window$innerHeight !== void 0 ? _window$innerHeight : 0 + 100; // 浏览器的视口高度\n\n\t      var maxHeight = Math.min(previewerHeight, windowsHeight); // 目标视区高度一定是小于浏览器视口高度的，也一定是小于预览区高度的\n\n\t      var minHeight = top - 30; // 计算顶部高度时，需要预加载一行高\n\n\t      var autoLoadImgNum = this.options.autoLoadImgNum;\n\n\t      var _loop = function _loop(i) {\n\t        var img = imgs[i];\n\t        var position = img.getBoundingClientRect(); // 判断是否在视区内\n\n\t        var testPosition = position.top >= minHeight && position.top <= maxHeight; // 判断是否需要自动加载\n\n\t        var testAutoLoad = _this.srcList.length < autoLoadImgNum;\n\n\t        if (!testPosition && !testAutoLoad) {\n\t          return \"continue\";\n\t        }\n\n\t        var originSrc = img.getAttribute('data-src');\n\n\t        if (!originSrc) {\n\t          return \"continue\";\n\t        }\n\n\t        if (_this.isLoaded(originSrc) || _this.isFailLoadedMax(originSrc)) {\n\t          // 如果已经加载过相同的图片，或者已经超过失败最大重试次数，则直接加载\n\t          img.setAttribute('src', originSrc);\n\t          img.removeAttribute('data-src');\n\t        } // 如果当前src正在加载，则忽略这个src，继续找下个符合条件的src\n\n\n\t        if (_this.isLoading(originSrc)) {\n\t          return \"continue\";\n\t        } // 超过最大并发量时停止加载\n\n\n\t        if (_this.loadingImgNum >= _this.options.maxNumPerTime) {\n\t          return {\n\t            v: false\n\t          };\n\t        }\n\n\t        var test = _this.options.beforeLoadOneImgCallback(img);\n\n\t        if (typeof test === 'undefined' || test) {\n\t          var _img$getAttribute;\n\n\t          originSrc = (_img$getAttribute = img.getAttribute('data-src')) !== null && _img$getAttribute !== void 0 ? _img$getAttribute : originSrc;\n\t        } else {\n\t          _this.loadFailed(originSrc);\n\n\t          return \"continue\";\n\t        }\n\n\t        _this.loadingImgNum += 1;\n\n\t        _this.srcList.push(originSrc);\n\n\t        _this.srcLoadingList.push(originSrc);\n\n\t        _this.tryLoadOneImg(originSrc, function () {\n\t          var _context3, _context4;\n\n\t          img.setAttribute('src', originSrc);\n\t          img.removeAttribute('data-src');\n\n\t          _this.srcLoadedList.push(originSrc);\n\n\t          _this.loadingImgNum -= 1;\n\n\t          splice$4(_context3 = _this.srcLoadingList).call(_context3, indexOf$8(_context4 = _this.srcLoadingList).call(_context4, originSrc), 1);\n\n\t          _this.options.afterLoadOneImgCallback(img);\n\n\t          _this.loadOneImg();\n\t        }, function () {\n\t          var _context5, _context6;\n\n\t          _this.loadFailed(originSrc);\n\n\t          _this.loadingImgNum -= 1;\n\n\t          splice$4(_context5 = _this.srcLoadingList).call(_context5, indexOf$8(_context6 = _this.srcLoadingList).call(_context6, originSrc), 1);\n\n\t          _this.options.failLoadOneImgCallback(img);\n\n\t          _this.loadOneImg();\n\t        });\n\t      };\n\n\t      for (var i = 0; i < imgs.length; i++) {\n\t        var _ret = _loop(i);\n\n\t        if (_ret === \"continue\") continue;\n\t        if (_typeof(_ret) === \"object\") return _ret.v;\n\t      }\n\n\t      return false;\n\t    }\n\t    /**\n\t     * 尝试加载src\n\t     * @param {String} src\n\t     */\n\n\t  }, {\n\t    key: \"tryLoadOneImg\",\n\t    value: function tryLoadOneImg(src, successCallback, failCallback) {\n\t      var img = document.createElement('img');\n\n\t      img.onload = function () {\n\t        successCallback();\n\t        img.remove();\n\t      };\n\n\t      img.onerror = function () {\n\t        failCallback();\n\t        img.remove();\n\t      };\n\n\t      img.setAttribute('src', src);\n\t    }\n\t    /**\n\t     * 开始进行懒加载\n\t     *\n\t     * **关于实现方式的思考**\n\t     * 实现图片懒加载一般有三种方式：\n\t     *  1、监听滚动事件，滚动到视野内的图片开始加载\n\t     *  2、定时检测当前视窗内是否有图片需要加载\n\t     *  3、当前一张图片加载完成后，自动加载下一张图片\n\t     *\n\t     * 方式1监听滚动事件的弊端：\n\t     *  1、需要限频率\n\t     *  2、不能实现自动加载所有图片的功能（autoLoadImgNum = -1）\n\t     *  3、如果业务方对预览区域做了个性化加工，有可能导致监听不到滚动事件\n\t     *  4、在自动滚动到锚点的场景，会在页面滚动时加载图片，图片的加载会导致锚点上方的元素高度发生变化，最终导致锚点定位失败\n\t     *      （所以在这个场景下，需要特殊处理图片加载的时机，但并不好判断是否锚点引发的滚动）\n\t     *  5、浏览器尺寸发生变化或者浏览器缩放比例发生变化的场景（当然还有横屏竖屏切换、系统分辨率改变等）不好监听和响应\n\t     *\n\t     * 方式2轮询的弊端：\n\t     *  1、需要额外的逻辑来控制并发\n\t     *  2、消耗计算资源，所以需要尽量优化单次计算量，并尽量避免在轮询里进行大范围dom操作\n\t     *  3、两次图片加载中间可能有最大轮询间隔的空闲时间浪费\n\t     *\n\t     * 方式3依次加载的弊端：\n\t     *  1、没办法实现滚动到视野内再加载图片\n\t     *\n\t     * 综合考虑决定用方式2（轮询）+方式3（依次加载）的组合方式，并且每次只做一次dom写操作\n\t     * 轮询带来的性能开销就让受摩尔定律加持的硬件和每月都会更新版本的浏览器们愁去吧\n\t     */\n\n\t  }, {\n\t    key: \"doLazyLoad\",\n\t    value: function doLazyLoad() {\n\t      var _this2 = this;\n\n\t      // 防止重复调用\n\t      if (this.isRunning) {\n\t        return;\n\t      }\n\n\t      this.isRunning = true;\n\t      var maxNumPerTime = this.options.maxNumPerTime;\n\n\t      var polling = function polling() {\n\t        // 保证至少有一次自动加载\n\t        _this2.loadOneImg();\n\n\t        for (var i = 1; i < maxNumPerTime; i++) {\n\t          _this2.loadOneImg();\n\t        }\n\n\t        setTimeout$3(polling, 200);\n\t      };\n\n\t      polling(); // setTimeout(polling, 200);\n\n\t      setInterval$3(function () {\n\t        _this2.isLoadedAllDone();\n\t      }, 1000);\n\t    }\n\t    /**\n\t     * 把图片里的data-src替换为src\n\t     * @param {*} content\n\t     * @returns {String}\n\t     */\n\n\t  }, {\n\t    key: \"changeDataSrc2Src\",\n\t    value: function changeDataSrc2Src(content) {\n\t      var _this3 = this;\n\n\t      return content.replace(/<img ([^>]*?)data-src=\"([^\"]+)\"([^>]*?)>/g, function (match, m1, src, m3) {\n\t        var _context7, _context8;\n\n\t        return concat$5(_context7 = concat$5(_context8 = \"<img \".concat(_this3.$removeSrc(m1), \" src=\\\"\")).call(_context8, src, \"\\\" \")).call(_context7, _this3.$removeSrc(m3), \">\").replace(/ {2,}/g, ' ');\n\t      });\n\t    }\n\t    /**\n\t     * 把已经加载的图片里的data-src替换为src\n\t     * @param {*} content\n\t     * @returns {String}\n\t     */\n\n\t  }, {\n\t    key: \"changeLoadedDataSrc2Src\",\n\t    value: function changeLoadedDataSrc2Src(content) {\n\t      var _this4 = this;\n\n\t      return content.replace(/<img ([^>]*?)data-src=\"([^\"]+)\"([^>]*?)>/g, function (match, m1, src, m3) {\n\t        var _context9, _context10;\n\n\t        if (!_this4.isLoaded(src)) {\n\t          return match;\n\t        }\n\n\t        return concat$5(_context9 = concat$5(_context10 = \"<img \".concat(_this4.$removeSrc(m1), \" src=\\\"\")).call(_context10, src, \"\\\" \")).call(_context9, _this4.$removeSrc(m3), \">\").replace(/ {2,}/g, ' ');\n\t      });\n\t    }\n\t    /**\n\t     * 移除图片的src属性\n\t     * @param {String} img\n\t     * @returns {String}\n\t     */\n\n\t  }, {\n\t    key: \"$removeSrc\",\n\t    value: function $removeSrc(img) {\n\t      return \" \".concat(img).replace(/^(.*?) src=\".*?\"(.*?$)/, '$1$2');\n\t    }\n\t    /**\n\t     * 把图片里的src替换为data-src，如果src已经加载过，则不替换\n\t     * @param {String} content\n\t     * @param {Boolean} focus 强制替换\n\t     * @returns {String}\n\t     */\n\n\t  }, {\n\t    key: \"changeSrc2DataSrc\",\n\t    value: function changeSrc2DataSrc(content) {\n\t      var _this5 = this;\n\n\t      var focus = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n\t      var loadingImgPath = this.options.loadingImgPath;\n\t      var noLoadImgNum = this.options.noLoadImgNum;\n\t      var currentNoLoadImgNum = 0;\n\t      return content.replace(/<img ([^>]*?)src=\"([^\"]+)\"([^>]*?)>/g, function (match, m1, src, m3) {\n\t        var _context14, _context15;\n\n\t        // 如果已经替换过data-src了，或者没有src属性，或者关闭了懒加载功能，则不替换\n\t        if (/data-src=\"/.test(match) || !/ src=\"/.test(match) || noLoadImgNum < 0) {\n\t          return match;\n\t        }\n\n\t        if (focus === false) {\n\t          // 前noLoadImgNum张图片不替换\n\t          if (currentNoLoadImgNum < noLoadImgNum) {\n\t            currentNoLoadImgNum += 1;\n\t            return match;\n\t          } // 如果src已经加载过，则不替换\n\n\n\t          if (_this5.isLoaded(src)) {\n\t            return match;\n\t          }\n\t        } // 如果配置了loadingImgPath，则替换src为loadingImgPath\n\n\n\t        if (loadingImgPath) {\n\t          var _context11, _context12, _context13;\n\n\t          return concat$5(_context11 = concat$5(_context12 = concat$5(_context13 = \"<img \".concat(m1, \"src=\\\"\")).call(_context13, loadingImgPath, \"\\\" data-src=\\\"\")).call(_context12, src, \"\\\"\")).call(_context11, m3, \">\");\n\t        }\n\n\t        return concat$5(_context14 = concat$5(_context15 = \"<img \".concat(m1, \"data-src=\\\"\")).call(_context15, src, \"\\\"\")).call(_context14, m3, \">\");\n\t      });\n\t    }\n\t  }]);\n\n\t  return LazyLoadImg;\n\t}();\n\n\tvar onScroll = function onScroll() {}; // store in memory for remove event\n\n\t/**\n\t * 解析第一个节点\n\t * @param {Node} node 经过DOMParser转换的HTML\n\t * @returns {String | null}\n\t */\n\n\n\tvar findNonEmptyNode = function findNonEmptyNode(node) {\n\t  var _context;\n\n\t  // 如果节点是文本节点且内容不为空，则返回该节点\n\t  if (node.nodeType === Node.TEXT_NODE && trim$3(_context = node.textContent).call(_context) !== '') {\n\t    var _context2;\n\n\t    return trim$3(_context2 = node.textContent).call(_context2);\n\t  }\n\n\t  for (var i = 0; i < node.childNodes.length; i++) {\n\t    var childNode = node.childNodes[i];\n\t    var result = findNonEmptyNode(childNode);\n\n\t    if (result) {\n\t      return result;\n\t    }\n\t  }\n\n\t  return null;\n\t};\n\t/**\n\t * 作用：\n\t *  dom更新\n\t *  局部加载（分片）\n\t *  与左侧输入区域滚动同步\n\t */\n\n\n\tvar Previewer = /*#__PURE__*/function () {\n\t  /**\n\t   * @property\n\t   * @private\n\t   * @type {boolean} 等待预览区域更新。预览区域更新时，预览区的滚动不会引起编辑器滚动，避免因插入的元素高度变化导致编辑区域跳动\n\t   */\n\n\t  /**\n\t   * @property\n\t   * @private\n\t   * @type {number} 释放同步滚动锁定的定时器ID\n\t   */\n\n\t  /**\n\t   * @property\n\t   * @public\n\t   * @type {boolean} 是否为移动端预览模式\n\t   */\n\n\t  /**\n\t   *\n\t   * @param {Partial<import('~types/previewer').PreviewerOptions>} options 预览区域设置\n\t   */\n\t  function Previewer(options) {\n\t    _classCallCheck(this, Previewer);\n\n\t    _defineProperty(this, \"applyingDomChanges\", false);\n\n\t    _defineProperty(this, \"syncScrollLockTimer\", 0);\n\n\t    _defineProperty(this, \"isMobilePreview\", false);\n\n\t    /**\n\t     * @property\n\t     * @type {import('~types/previewer').PreviewerOptions}\n\t     */\n\t    this.options = {\n\t      previewerDom: document.createElement('div'),\n\t      virtualDragLineDom: document.createElement('div'),\n\t      editorMaskDom: document.createElement('div'),\n\t      previewerMaskDom: document.createElement('div'),\n\t      minBlockPercentage: 0.2,\n\t      // editor或previewer所占宽度比例的最小值\n\t      value: '',\n\t      enablePreviewerBubble: true,\n\t      afterUpdateCallBack: [],\n\t      isPreviewOnly: false,\n\t      previewerCache: {\n\t        // 关闭/开启预览区时缓存的previewer数据\n\t        html: '',\n\t        htmlChanged: false,\n\t        layout: {}\n\t      },\n\n\t      /**\n\t       * 配置图片懒加载的逻辑\n\t       * 如果不希望图片懒加载，可配置成 lazyLoadImg = {maxNumPerTime: 6, autoLoadImgNum: -1}\n\t       */\n\t      lazyLoadImg: {\n\t        // 加载图片时如果需要展示loading图，则配置loading图的地址\n\t        loadingImgPath: '',\n\t        // 同一时间最多有几个图片请求，最大同时加载6张图片\n\t        maxNumPerTime: 2,\n\t        // 不进行懒加载处理的图片数量，如果为0，即所有图片都进行懒加载处理， 如果设置为-1，则所有图片都不进行懒加载处理\n\t        noLoadImgNum: 5,\n\t        // 首次自动加载几张图片（不论图片是否滚动到视野内），autoLoadImgNum = -1 表示会自动加载完所有图片\n\t        autoLoadImgNum: 5,\n\t        // 针对加载失败的图片 或 beforeLoadOneImgCallback 返回false 的图片，最多尝试加载几次，为了防止死循环，最多5次。以图片的src为纬度统计重试次数\n\t        maxTryTimesPerSrc: 2,\n\t        // 加载一张图片之前的回调函数，函数return false 会终止加载操作\n\t        beforeLoadOneImgCallback: function beforeLoadOneImgCallback(img) {},\n\t        // 加载一张图片失败之后的回调函数\n\t        failLoadOneImgCallback: function failLoadOneImgCallback(img) {},\n\t        // 加载一张图片之后的回调函数，如果图片加载失败，则不会回调该函数\n\t        afterLoadOneImgCallback: function afterLoadOneImgCallback(img) {},\n\t        // 加载完所有图片后调用的回调函数\n\t        afterLoadAllImgCallback: function afterLoadAllImgCallback() {}\n\t      }\n\t    };\n\n\t    assign$2(this.options, options);\n\n\t    this.$cherry = this.options.$cherry;\n\t    this.instanceId = this.$cherry.getInstanceId();\n\t    /**\n\t     * @property\n\t     * @private\n\t     * @type {{ timer?: number; destinationTop?: number }}\n\t     */\n\n\t    this.animation = {};\n\t  }\n\n\t  _createClass(Previewer, [{\n\t    key: \"init\",\n\t    value: function init(editor) {\n\t      /**\n\t       * @property\n\t       * @private\n\t       * @type {boolean} 禁用滚动事件监听\n\t       */\n\t      this.disableScrollListener = false;\n\t      this.bindScroll();\n\t      this.editor = editor;\n\t      this.bindDrag();\n\t      this.$initPreviewerBubble();\n\t      this.lazyLoadImg = new LazyLoadImg(this.options.lazyLoadImg, this);\n\t      this.lazyLoadImg.doLazyLoad();\n\t      this.onMouseDown();\n\t    }\n\t  }, {\n\t    key: \"$initPreviewerBubble\",\n\t    value: function $initPreviewerBubble() {\n\t      this.previewerBubble = new PreviewerBubble(this);\n\t    }\n\t    /**\n\t     * @returns {HTMLElement}\n\t     */\n\n\t  }, {\n\t    key: \"getDomContainer\",\n\t    value: function getDomContainer() {\n\t      return this.isMobilePreview ? this.options.previewerDom.querySelector('.cherry-mobile-previewer-content') : this.options.previewerDom;\n\t    }\n\t  }, {\n\t    key: \"getDom\",\n\t    value: function getDom() {\n\t      return this.options.previewerDom;\n\t    }\n\t    /**\n\t     * 获取预览区内的html内容\n\t     * @param {boolean} wrapTheme 是否在外层包裹主题class\n\t     * @returns html内容\n\t     */\n\n\t  }, {\n\t    key: \"getValue\",\n\t    value: function getValue() {\n\t      var _context3, _context4;\n\n\t      var wrapTheme = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;\n\t      var html = '';\n\n\t      if (this.isPreviewerHidden()) {\n\t        html = this.options.previewerCache.html;\n\t      } else {\n\t        html = this.getDomContainer().innerHTML;\n\t      } // 需要未加载的图片替换成原始图片\n\n\n\t      html = this.lazyLoadImg.changeDataSrc2Src(html);\n\n\t      if (!wrapTheme || !this.$cherry.wrapperDom) {\n\t        return html;\n\t      }\n\n\t      var inlineCodeTheme = this.$cherry.wrapperDom.getAttribute('data-inline-code-theme');\n\t      var codeBlockTheme = this.$cherry.wrapperDom.getAttribute('data-code-block-theme');\n\t      return concat$5(_context3 = concat$5(_context4 = \"<div data-inline-code-theme=\\\"\".concat(inlineCodeTheme, \"\\\" data-code-block-theme=\\\"\")).call(_context4, codeBlockTheme, \"\\\">\")).call(_context3, html, \"</div>\");\n\t    }\n\t  }, {\n\t    key: \"isPreviewerHidden\",\n\t    value: function isPreviewerHidden() {\n\t      return this.options.previewerDom.classList.contains('cherry-previewer--hidden');\n\t    }\n\t  }, {\n\t    key: \"calculateRealLayout\",\n\t    value: function calculateRealLayout(editorWidth) {\n\t      // 根据editor的绝对宽度计算editor和previewer的百分比宽度\n\t      var editorDomWidth = this.editor.options.editorDom.getBoundingClientRect().width;\n\t      var previewerDomWidth = this.options.previewerDom.getBoundingClientRect().width;\n\t      var totalWidth = editorDomWidth + previewerDomWidth;\n\t      var editorPercentage = +(editorWidth / totalWidth).toFixed(3);\n\n\t      if (editorPercentage < this.options.minBlockPercentage) {\n\t        editorPercentage = +this.options.minBlockPercentage.toFixed(3);\n\t      } else if (editorPercentage > 1 - this.options.minBlockPercentage) {\n\t        editorPercentage = +(1 - this.options.minBlockPercentage).toFixed(3);\n\t      }\n\n\t      var previewerPercentage = +(1 - editorPercentage).toFixed(3);\n\t      var res = {\n\t        editorPercentage: \"\".concat(editorPercentage * 100, \"%\"),\n\t        previewerPercentage: \"\".concat(previewerPercentage * 100, \"%\")\n\t      };\n\t      return res;\n\t    }\n\t  }, {\n\t    key: \"setRealLayout\",\n\t    value: function setRealLayout(editorPercentage, previewerPercentage) {\n\t      // 主动设置editor,previewer宽度,按百分比计算\n\t      var $editorPercentage = editorPercentage;\n\t      var $previewerPercentage = previewerPercentage;\n\n\t      if (!$editorPercentage || !$previewerPercentage) {\n\t        $editorPercentage = '50%';\n\t        $previewerPercentage = '50%';\n\t      }\n\n\t      this.editor.options.editorDom.style.width = $editorPercentage;\n\t      this.options.previewerDom.style.width = $previewerPercentage;\n\t      this.syncVirtualLayoutFromReal();\n\t    }\n\t  }, {\n\t    key: \"syncVirtualLayoutFromReal\",\n\t    value: function syncVirtualLayoutFromReal() {\n\t      // 通过editor和previewer的百分比宽度,同步更新mask和dragLine的px宽度及位置\n\t      var editorPos = this.editor.options.editorDom.getBoundingClientRect();\n\t      var previewerPos = this.options.previewerDom.getBoundingClientRect();\n\t      var editorHeight = editorPos.height;\n\t      var editorTop = this.editor.options.editorDom.offsetTop;\n\t      var editorLeft = editorPos.left;\n\t      var editorWidth = editorPos.width;\n\t      var previewerLeft = previewerPos.left ? previewerPos.left - editorLeft : 0;\n\t      var previewerWidth = previewerPos.width || 0;\n\t      var _this$options = this.options,\n\t          editorMaskDom = _this$options.editorMaskDom,\n\t          previewerMaskDom = _this$options.previewerMaskDom,\n\t          virtualLineDom = _this$options.virtualDragLineDom;\n\t      virtualLineDom.style.top = \"\".concat(editorTop, \"px\");\n\t      virtualLineDom.style.left = \"\".concat(previewerLeft, \"px\");\n\t      virtualLineDom.style.bottom = '0px';\n\t      editorMaskDom.style.height = \"\".concat(editorHeight, \"px\");\n\t      editorMaskDom.style.top = \"\".concat(editorTop, \"px\");\n\t      editorMaskDom.style.left = '0px';\n\t      editorMaskDom.style.width = \"\".concat(editorWidth, \"px\");\n\t      previewerMaskDom.style.height = \"\".concat(editorHeight, \"px\");\n\t      previewerMaskDom.style.top = \"\".concat(editorTop, \"px\");\n\t      previewerMaskDom.style.left = \"\".concat(previewerLeft, \"px\");\n\t      previewerMaskDom.style.width = \"\".concat(previewerWidth, \"px\");\n\t    }\n\t  }, {\n\t    key: \"calculateVirtualLayout\",\n\t    value: function calculateVirtualLayout(editorLeft, editorRight) {\n\t      // 计算mask和dragline应处在的位置,按px计算\n\t      var editorDomWidth = this.editor.options.editorDom.getBoundingClientRect().width;\n\t      var previewerDomWidth = this.options.previewerDom.getBoundingClientRect().width;\n\t      var totalWidth = editorDomWidth + previewerDomWidth;\n\t      var startWidth = editorLeft.toFixed(0);\n\t      var leftWidth = editorRight - editorLeft;\n\n\t      if (leftWidth < totalWidth * this.options.minBlockPercentage) {\n\t        leftWidth = +(totalWidth * this.options.minBlockPercentage).toFixed(0);\n\t      } else if (leftWidth > totalWidth * (1 - this.options.minBlockPercentage)) {\n\t        leftWidth = +(totalWidth * (1 - this.options.minBlockPercentage)).toFixed(0);\n\t      }\n\n\t      var rightWidth = totalWidth - leftWidth;\n\t      var ret = {\n\t        startWidth: _parseInt$2(startWidth, 10),\n\t        // 起始位置(左侧留白)\n\t        leftWidth: leftWidth,\n\t        // 左侧mask宽度\n\t        rightWidth: rightWidth // 右侧mask宽度\n\n\t      };\n\t      return ret;\n\t    }\n\t  }, {\n\t    key: \"setVirtualLayout\",\n\t    value: function setVirtualLayout(startWidth, leftWidth, rightWidth) {\n\t      // 主动设置mask和dragLine位置,按px计算\n\t      var _this$options2 = this.options,\n\t          editorMaskDom = _this$options2.editorMaskDom,\n\t          previewerMaskDom = _this$options2.previewerMaskDom,\n\t          virtualLineDom = _this$options2.virtualDragLineDom;\n\t      var $startWidth = 0; // =startWidth\n\n\t      editorMaskDom.style.left = \"\".concat($startWidth, \"px\");\n\t      editorMaskDom.style.width = \"\".concat(leftWidth, \"px\");\n\t      virtualLineDom.style.left = \"\".concat($startWidth + leftWidth, \"px\");\n\t      previewerMaskDom.style.left = \"\".concat($startWidth + leftWidth, \"px\");\n\t      previewerMaskDom.style.width = \"\".concat(rightWidth, \"px\");\n\t    }\n\t  }, {\n\t    key: \"bindDrag\",\n\t    value: function bindDrag() {\n\t      var _this = this,\n\t          _context5;\n\n\t      var dragLineMouseMove = function dragLineMouseMove(mouseMoveEvent) {\n\t        // 阻止事件冒泡\n\t        if (mouseMoveEvent && mouseMoveEvent.stopPropagation) {\n\t          mouseMoveEvent.stopPropagation();\n\t        } else {\n\t          mouseMoveEvent.cancelBubble = true;\n\t        } // 取消默认事件\n\n\n\t        if (mouseMoveEvent.preventDefault) {\n\t          mouseMoveEvent.preventDefault();\n\t        } else {\n\t          window.event.returnValue = false;\n\t        }\n\n\t        var editorLeft = _this.editor.options.editorDom.getBoundingClientRect().left;\n\n\t        var editorRight = mouseMoveEvent.clientX;\n\n\t        var virtualLayout = _this.calculateVirtualLayout(editorLeft, editorRight);\n\n\t        _this.setVirtualLayout(virtualLayout.startWidth, virtualLayout.leftWidth, virtualLayout.rightWidth);\n\n\t        return false;\n\t      };\n\n\t      var dragLineMouseUp = function dragLineMouseUp(mouseUpEvent) {\n\t        // 阻止事件冒泡\n\t        if (mouseUpEvent && mouseUpEvent.stopPropagation) {\n\t          mouseUpEvent.stopPropagation();\n\t        } else {\n\t          mouseUpEvent.cancelBubble = true;\n\t        } // 取消默认事件\n\n\n\t        if (mouseUpEvent.preventDefault) {\n\t          mouseUpEvent.preventDefault();\n\t        } else {\n\t          window.event.returnValue = false;\n\t        } // 重新设置editor和previewer宽度占比\n\n\n\t        var editorLeft = _this.editor.options.editorDom.getBoundingClientRect().left;\n\n\t        var editorRight = mouseUpEvent.clientX;\n\n\t        var layout = _this.calculateRealLayout(editorRight - editorLeft);\n\n\t        _this.setRealLayout(layout.editorPercentage, layout.previewerPercentage); // 去掉蒙层和虚拟拖动条\n\n\n\t        _this.editor.options.editorDom.classList.remove('no-select');\n\n\t        _this.options.previewerDom.classList.remove('no-select');\n\n\t        _this.options.editorMaskDom.classList.remove('cherry-editor-mask--show');\n\n\t        _this.options.previewerMaskDom.classList.remove('cherry-previewer-mask--show');\n\n\t        _this.options.virtualDragLineDom.classList.remove('cherry-drag--show'); // 刷新codemirror宽度\n\n\n\t        _this.editor.editor.refresh(); // 取消事件绑定\n\n\n\t        removeEvent(document, 'mousemove', dragLineMouseMove, false);\n\t        removeEvent(document, 'mouseup', dragLineMouseUp, false);\n\t        return false;\n\t      };\n\n\t      var dragLineMouseDown = function dragLineMouseDown(mouseDownEvent) {\n\t        // 阻止事件冒泡\n\t        if (mouseDownEvent && mouseDownEvent.stopPropagation) {\n\t          mouseDownEvent.stopPropagation();\n\t        } else {\n\t          mouseDownEvent.cancelBubble = true;\n\t        } // 取消默认事件\n\n\n\t        if (mouseDownEvent.preventDefault) {\n\t          mouseDownEvent.preventDefault();\n\t        } else {\n\t          window.event.returnValue = false;\n\t        }\n\n\t        _this.syncVirtualLayoutFromReal();\n\n\t        var editorLeft = _this.editor.options.editorDom.getBoundingClientRect().left;\n\n\t        var editorRight = mouseDownEvent.clientX;\n\n\t        var virtualLayout = _this.calculateVirtualLayout(editorLeft, editorRight);\n\n\t        _this.setVirtualLayout(virtualLayout.startWidth, virtualLayout.leftWidth, virtualLayout.rightWidth);\n\n\t        if (!_this.options.virtualDragLineDom.classList.contains('cherry-drag--show')) {\n\t          // 增加蒙层防止选中editor或previewer内容\n\t          _this.options.virtualDragLineDom.classList.add('cherry-drag--show');\n\n\t          _this.options.editorMaskDom.classList.add('cherry-editor-mask--show');\n\n\t          _this.options.previewerMaskDom.classList.add('cherry-previewer-mask--show');\n\n\t          _this.options.previewerDom.classList.add('no-select');\n\n\t          _this.editor.options.editorDom.classList.add('no-select'); // 绑定事件\n\n\n\t          addEvent(document, 'mousemove', dragLineMouseMove, false);\n\t          addEvent(document, 'mouseup', dragLineMouseUp, false);\n\t        }\n\n\t        return false;\n\t      };\n\n\t      addEvent(this.options.virtualDragLineDom, 'mousedown', dragLineMouseDown, false);\n\t      addEvent(window, 'resize', bind$5(_context5 = this.syncVirtualLayoutFromReal).call(_context5, this), false);\n\t      this.setRealLayout();\n\t    }\n\t  }, {\n\t    key: \"bindScroll\",\n\t    value: function bindScroll() {\n\t      var _this2 = this;\n\n\t      var domContainer = this.getDomContainer();\n\n\t      onScroll = function onScroll() {\n\t        if (_this2.applyingDomChanges) {\n\t          // Logger.log(new Date(), 'sync scroll locked');\n\t          return;\n\t        }\n\n\t        if (_this2.disableScrollListener) {\n\t          _this2.disableScrollListener = false;\n\t          return;\n\t        }\n\n\t        if (domContainer.scrollTop <= 0) {\n\t          _this2.editor.scrollToLineNum(0, 0, 1);\n\n\t          return;\n\t        } // 判定预览区域是否滚动到底部的逻辑，增加10px的冗余\n\n\n\t        if (domContainer.scrollTop + domContainer.offsetHeight + 10 > domContainer.scrollHeight) {\n\t          _this2.editor.scrollToLineNum(null);\n\n\t          return;\n\t        } // 获取预览容器基准坐标\n\n\n\t        var basePoint = domContainer.getBoundingClientRect(); // 观察点坐标，取容器中轴线\n\n\t        var watchPoint = {\n\t          x: basePoint.left + basePoint.width / 2,\n\t          y: basePoint.top + 1\n\t        }; // 获取观察点处的DOM\n\n\t        var targetElements = elementsFromPoint(watchPoint.x, watchPoint.y);\n\t        var targetElement;\n\n\t        for (var i = 0; i < targetElements.length; i++) {\n\t          if (domContainer.contains(targetElements[i])) {\n\t            targetElement = targetElements[i];\n\t            break;\n\t          }\n\t        }\n\n\t        if (!targetElement || targetElement === domContainer) {\n\t          return;\n\t        } // 获取观察点处最近的markdown元素\n\n\n\t        var mdElement = targetElement.closest('[data-sign]'); // 由于新增脚注，内部容器也有可能存在data-sign，所以需要循环往父级找\n\n\t        while (mdElement && mdElement.parentElement && mdElement.parentElement !== domContainer) {\n\t          mdElement = mdElement.parentElement.closest('[data-sign]');\n\t        }\n\n\t        if (!mdElement) {\n\t          return;\n\t        } // 计算当前焦点容器的所在行数\n\n\n\t        var lines = 0;\n\t        var element = mdElement;\n\n\t        while (element) {\n\t          lines += +element.getAttribute('data-lines');\n\t          element = element.previousElementSibling; // 取上一个兄弟节点，直到为null\n\t        } // markdown元素存在margin，getBoundingRect不能获取到margin\n\n\n\t        var mdElementStyle = getComputedStyle(mdElement);\n\n\t        var marginTop = _parseFloat$2(mdElementStyle.marginTop);\n\n\t        var marginBottom = _parseFloat$2(mdElementStyle.marginBottom); // markdown元素基于当前页面的矩形模型\n\n\n\t        var mdRect = mdElement.getBoundingClientRect();\n\t        var mdActualHeight = mdRect.height + marginTop + marginBottom; // (mdRect.y - marginTop)为顶部触达区域，basePoint.y为预览区域的顶部，故可视范围应减去预览区域的偏移\n\n\t        var mdOffsetTop = mdRect.y - marginTop - basePoint.y;\n\t        var lineNum = +mdElement.getAttribute('data-lines'); // 当前markdown元素所占行数\n\n\t        var percent = 100 * Math.abs(mdOffsetTop) / mdActualHeight / 100; // console.log('destLine:', lines, percent,\n\t        //  mdRect.height + marginTop + marginBottom, mdOffsetTop, mdElement);\n\t        // if(mdOffsetTop < 0) {\n\n\t        return _this2.editor.scrollToLineNum(lines - lineNum, lineNum, percent); // }\n\t        // return this.editor.scrollToLineNum(lines - lineNum, 0, 0);\n\t      };\n\n\t      addEvent(domContainer, 'scroll', onScroll, false);\n\t      addEvent(domContainer, 'wheel', function () {\n\t        // 鼠标滚轮滚动时，强制监听滚动事件\n\t        _this2.disableScrollListener = false; // 打断滚动动画\n\n\t        cancelAnimationFrame(_this2.animation.timer);\n\t        _this2.animation.timer = 0;\n\t      }, false);\n\t    }\n\t  }, {\n\t    key: \"removeScroll\",\n\t    value: function removeScroll() {\n\t      var domContainer = this.getDomContainer();\n\t      removeEvent(domContainer, 'scroll', onScroll, false);\n\t    }\n\t  }, {\n\t    key: \"$html2H\",\n\t    value: function $html2H(dom) {\n\t      if (typeof dom === 'undefined') {\n\t        return h_1('span', {}, []);\n\t      }\n\n\t      if (!dom.tagName) {\n\t        return dom.textContent;\n\t      }\n\n\t      var tagName = dom.tagName; // skip all children if data-cm-atomic attribute is set\n\n\t      var isAtomic = 'true' === dom.getAttribute('data-cm-atomic');\n\t      var myAttrs = this.$getAttrsForH(dom.attributes);\n\t      var children = [];\n\n\t      if (!isAtomic && dom.childNodes && dom.childNodes.length > 0) {\n\t        for (var i = 0; i < dom.childNodes.length; i++) {\n\t          children.push(this.$html2H(dom.childNodes[i]));\n\t        }\n\t      }\n\n\t      return h_1(tagName, myAttrs, children);\n\t    }\n\t  }, {\n\t    key: \"$getAttrsForH\",\n\t    value: function $getAttrsForH(obj) {\n\t      if (!obj) {\n\t        return {};\n\t      }\n\n\t      var ret = {\n\t        dataset: {}\n\t      };\n\n\t      for (var i = 0; i < obj.length; i++) {\n\t        var name = obj[i].name;\n\t        var value = obj[i].value;\n\n\t        if (/^(width|height)$/i.test(name)) {\n\t          if (isNaN(value)) {\n\t            var _context6;\n\n\t            ret.style = ret.style ? ret.style : [];\n\t            ret.style.push(concat$5(_context6 = \"\".concat(name, \":\")).call(_context6, value));\n\t            continue;\n\t          }\n\t        }\n\n\t        if (/^(class|id|href|rel|target|src|title|controls|align|width|height|style|open)$/i.test(name)) {\n\t          name = name === 'class' ? 'className' : name;\n\n\t          if (name === 'style') {\n\t            ret.style = ret.style ? ret.style : [];\n\t            ret.style.push(value);\n\t          } else if (name === 'open') {\n\t            // 只要有open这个属性，就一定是true\n\t            ret[name] = true;\n\t          } else {\n\t            ret[name] = value;\n\t          }\n\t        } else {\n\t          // jsDom属性里面rowspan的S要大写,否则应用到html的dom节点会变成data-rowspan\n\t          // https://stackoverflow.com/q/29774686\n\t          if ('colspan' === name) {\n\t            name = 'colSpan';\n\t          } else if ('rowspan' === name) {\n\t            name = 'rowSpan';\n\t          }\n\n\t          if (/^data-/i.test(name)) {\n\t            name = name.replace(/^data-/i, '');\n\t          } else {\n\t            ret[name] = value;\n\t          }\n\n\t          ret.dataset[name] = value;\n\t        }\n\t      }\n\n\t      if (ret.style) {\n\t        ret.style = {\n\t          cssText: ret.style.join(';')\n\t        }; // see virtual-dom implementation\n\t      }\n\n\t      return ret;\n\t    }\n\t  }, {\n\t    key: \"$updateDom\",\n\t    value: function $updateDom(newDom, oldDom) {\n\t      var diff = diff_1$1(this.$html2H(oldDom), this.$html2H(newDom));\n\t      return patch_1$1(oldDom, diff);\n\t    }\n\t  }, {\n\t    key: \"$testChild\",\n\t    value: function $testChild(dom) {\n\t      if (!dom.parentNode) {\n\t        return true;\n\t      }\n\n\t      if (dom.parentNode.classList.contains('cherry-previewer')) {\n\t        return true;\n\t      }\n\n\t      if (dom.parentNode.getAttribute('data-sign')) {\n\t        return false;\n\t      }\n\n\t      return this.$testChild(dom.parentNode);\n\t    }\n\t  }, {\n\t    key: \"_testMaxIndex\",\n\t    value: function _testMaxIndex(index, arr) {\n\t      if (!arr) {\n\t        return false;\n\t      }\n\n\t      for (var i = 0; i < arr.length; i++) {\n\t        if (index <= arr[i]) {\n\t          return true;\n\t        }\n\t      }\n\n\t      return false;\n\t    }\n\t  }, {\n\t    key: \"$getSignData\",\n\t    value: function $getSignData(dom) {\n\t      var list = dom.querySelectorAll('[data-sign]');\n\t      var ret = {\n\t        list: [],\n\t        signs: {}\n\t      };\n\n\t      for (var i = 0; i < list.length; i++) {\n\t        if (!this.$testChild(list[i])) {\n\t          continue;\n\t        }\n\n\t        var sign = list[i].getAttribute('data-sign');\n\t        ret.list.push({\n\t          sign: sign,\n\t          dom: list[i]\n\t        });\n\n\t        if (!ret.signs[sign]) {\n\t          ret.signs[sign] = [];\n\t        }\n\n\t        ret.signs[sign].push(i);\n\t      }\n\n\t      return ret;\n\t    }\n\t  }, {\n\t    key: \"_hasNewSign\",\n\t    value: function _hasNewSign(list, sign, signIndex) {\n\t      if (list.length > 0) {\n\t        var resSign;\n\n\t        forEach$3(list).call(list, function (listItem, i) {\n\t          var _context7;\n\n\t          // hash精度校准\n\t          if (slice$7(_context7 = listItem.sign).call(_context7, 0, 12) === slice$7(sign).call(sign, 0, 12) && i > signIndex) {\n\t            resSign = {\n\t              index: i > signIndex ? i : signIndex,\n\t              sign: sign\n\t            };\n\t          }\n\t        });\n\n\t        return resSign;\n\t      }\n\n\t      return false;\n\t    }\n\t  }, {\n\t    key: \"$dealWithMyersDiffResult\",\n\t    value: function $dealWithMyersDiffResult(result, oldContent, newContent, domContainer) {\n\t      var _this3 = this;\n\n\t      forEach$3(result).call(result, function (change) {\n\t        if (newContent[change.newIndex].dom) {\n\t          // 把已经加载过的图片的data-src变成src\n\t          newContent[change.newIndex].dom.innerHTML = _this3.lazyLoadImg.changeLoadedDataSrc2Src(newContent[change.newIndex].dom.innerHTML);\n\t        }\n\n\t        switch (change.type) {\n\t          case 'delete':\n\t            domContainer.removeChild(oldContent[change.oldIndex].dom);\n\t            break;\n\n\t          case 'insert':\n\t            if (oldContent[change.oldIndex]) {\n\t              domContainer.insertBefore(newContent[change.newIndex].dom, oldContent[change.oldIndex].dom);\n\t            } else {\n\t              domContainer.appendChild(newContent[change.newIndex].dom);\n\t            }\n\n\t            break;\n\n\t          case 'update':\n\t            try {\n\t              if (newContent[change.newIndex].dom.querySelector('svg')) {\n\t                throw new Error(); // SVG暂不使用patch更新\n\t              }\n\n\t              _this3.$updateDom(newContent[change.newIndex].dom, oldContent[change.oldIndex].dom);\n\t            } catch (e) {\n\t              domContainer.insertBefore(newContent[change.newIndex].dom, oldContent[change.oldIndex].dom);\n\t              domContainer.removeChild(oldContent[change.oldIndex].dom);\n\t            }\n\n\t        }\n\t      });\n\t    }\n\t  }, {\n\t    key: \"$dealUpdate\",\n\t    value: function $dealUpdate(domContainer, oldHtmlList, newHtmlList) {\n\t      if (newHtmlList.list !== oldHtmlList.list) {\n\t        if (newHtmlList.list.length && oldHtmlList.list.length) {\n\t          var myersDiff = new MyersDiff(newHtmlList.list, oldHtmlList.list, function (obj, index) {\n\t            return obj[index].sign;\n\t          });\n\t          var res = myersDiff.doDiff();\n\t          // Logger.log(res);\n\t          this.$dealWithMyersDiffResult(res, oldHtmlList.list, newHtmlList.list, domContainer);\n\t        } else if (newHtmlList.list.length && !oldHtmlList.list.length) {\n\t          var _context8;\n\n\t          // 全新增\n\t          // Logger.log('add all');\n\n\t          forEach$3(_context8 = newHtmlList.list).call(_context8, function (piece) {\n\t            domContainer.appendChild(piece.dom);\n\t          });\n\t        } else if (!newHtmlList.list.length && oldHtmlList.list.length) {\n\t          var _context9;\n\n\t          // 全删除\n\t          // Logger.log('delete all');\n\n\t          forEach$3(_context9 = oldHtmlList.list).call(_context9, function (piece) {\n\t            domContainer.removeChild(piece.dom);\n\t          });\n\t        }\n\t      }\n\t    }\n\t    /**\n\t     * 强制重新渲染预览区域\n\t     */\n\n\t  }, {\n\t    key: \"refresh\",\n\t    value: function refresh(html) {\n\t      var domContainer = this.getDomContainer();\n\t      domContainer.innerHTML = html;\n\t    }\n\t  }, {\n\t    key: \"update\",\n\t    value: function update(html) {\n\t      var _this4 = this;\n\n\t      // 更新时保留图片懒加载逻辑\n\t      var newHtml = this.lazyLoadImg.changeSrc2DataSrc(html);\n\n\t      if (!this.isPreviewerHidden()) {\n\t        // 标记当前正在更新预览区域，锁定同步滚动功能\n\t        window.clearTimeout(this.syncScrollLockTimer);\n\t        this.applyingDomChanges = true; // 预览区未隐藏时，直接更新\n\n\t        var tmpDiv = document.createElement('div');\n\t        var domContainer = this.getDomContainer();\n\t        tmpDiv.innerHTML = newHtml;\n\t        var newHtmlList = this.$getSignData(tmpDiv);\n\t        var oldHtmlList = this.$getSignData(domContainer);\n\n\t        try {\n\t          this.$dealUpdate(domContainer, oldHtmlList, newHtmlList);\n\t          this.afterUpdate();\n\t        } finally {\n\t          // 延时释放同步滚动功能，在DOM更新完成后执行\n\t          this.syncScrollLockTimer = setTimeout$3(function () {\n\t            _this4.applyingDomChanges = false;\n\t          }, 50);\n\t        }\n\t      } else {\n\t        // 预览区隐藏时，先缓存起来，等到预览区打开再一次性更新\n\t        this.doHtmlCache(newHtml);\n\t      }\n\t    }\n\t  }, {\n\t    key: \"$dealEditAndPreviewOnly\",\n\t    value: function $dealEditAndPreviewOnly() {\n\t      var _this5 = this;\n\n\t      var isEditOnly = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;\n\t      var fullEditorLayout = {\n\t        editorPercentage: '0%',\n\t        previewerPercentage: '100%'\n\t      };\n\n\t      if (isEditOnly) {\n\t        fullEditorLayout = {\n\t          editorPercentage: '100%',\n\t          previewerPercentage: '0%'\n\t        };\n\t      }\n\n\t      var editorWidth = this.editor.options.editorDom.getBoundingClientRect().width;\n\t      var layout = this.calculateRealLayout(editorWidth);\n\t      this.options.previewerCache.layout = layout;\n\t      this.setRealLayout(fullEditorLayout.editorPercentage, fullEditorLayout.previewerPercentage);\n\t      this.options.virtualDragLineDom.classList.add('cherry-drag--hidden');\n\t      var previewerDom = this.options.previewerDom;\n\t      var editorDom = this.editor.options.editorDom;\n\n\t      if (isEditOnly) {\n\t        previewerDom.classList.add('cherry-previewer--hidden');\n\t        editorDom.classList.add('cherry-editor--full');\n\t        previewerDom.classList.remove('cherry-preview--full');\n\t        editorDom.classList.remove('cherry-editor--hidden');\n\t      } else {\n\t        previewerDom.classList.add('cherry-preview--full');\n\t        editorDom.classList.add('cherry-editor--hidden');\n\t        previewerDom.classList.remove('cherry-previewer--hidden');\n\t        editorDom.classList.remove('cherry-editor--full');\n\t      }\n\n\t      setTimeout$3(function () {\n\t        return _this5.editor.editor.refresh();\n\t      }, 0);\n\t    }\n\t  }, {\n\t    key: \"previewOnly\",\n\t    value: function previewOnly() {\n\t      this.$dealEditAndPreviewOnly(false);\n\n\t      if (this.options.previewerCache.htmlChanged) {\n\t        this.update(this.options.previewerCache.html);\n\t      }\n\n\t      this.cleanHtmlCache();\n\t      Event$1.emit(this.instanceId, Event$1.Events.previewerOpen);\n\t      Event$1.emit(this.instanceId, Event$1.Events.editorClose);\n\t    }\n\t  }, {\n\t    key: \"editOnly\",\n\t    value: function editOnly() {\n\t      this.$dealEditAndPreviewOnly(true);\n\t      this.cleanHtmlCache();\n\t      Event$1.emit(this.instanceId, Event$1.Events.previewerClose);\n\t      Event$1.emit(this.instanceId, Event$1.Events.editorOpen);\n\t    }\n\t  }, {\n\t    key: \"recoverPreviewer\",\n\t    value: function recoverPreviewer() {\n\t      var _this6 = this;\n\t      this.options.previewerDom.classList.remove('cherry-previewer--hidden');\n\t      this.options.virtualDragLineDom.classList.remove('cherry-drag--hidden');\n\t      this.editor.options.editorDom.classList.remove('cherry-editor--full'); // 恢复现场\n\n\t      if (this.options.previewerCache.layout !== {}) {\n\t        var layout = this.options.previewerCache.layout;\n\t        this.setRealLayout(layout.editorPercentage, layout.previewerPercentage);\n\t      }\n\n\t      if (this.options.previewerCache.htmlChanged) {\n\t        this.update(this.options.previewerCache.html);\n\t      }\n\n\t      this.cleanHtmlCache();\n\t      Event$1.emit(this.instanceId, Event$1.Events.previewerOpen);\n\t      Event$1.emit(this.instanceId, Event$1.Events.editorOpen);\n\n\t      setTimeout$3(function () {\n\t        return _this6.editor.editor.refresh();\n\t      }, 0);\n\t    }\n\t  }, {\n\t    key: \"doHtmlCache\",\n\t    value: function doHtmlCache(html) {\n\t      this.options.previewerCache.html = html;\n\t      this.options.previewerCache.htmlChanged = true;\n\t    }\n\t  }, {\n\t    key: \"cleanHtmlCache\",\n\t    value: function cleanHtmlCache() {\n\t      this.options.previewerCache.html = '';\n\t      this.options.previewerCache.htmlChanged = false;\n\t      this.options.previewerCache.layout = {};\n\t    }\n\t  }, {\n\t    key: \"afterUpdate\",\n\t    value: function afterUpdate() {\n\t      var _context10;\n\n\t      map$3(_context10 = this.options.afterUpdateCallBack).call(_context10, function (fn) {\n\t        return fn();\n\t      });\n\n\t      if (this.highlightLineNum === undefined) {\n\t        this.highlightLineNum = 0;\n\t      }\n\n\t      this.highlightLine(this.highlightLineNum);\n\t    }\n\t  }, {\n\t    key: \"registerAfterUpdate\",\n\t    value: function registerAfterUpdate(fn) {\n\t      if (isArray$8(fn)) {\n\t        var _context11;\n\n\t        this.options.afterUpdateCallBack = concat$5(_context11 = this.options.afterUpdateCallBack).call(_context11, fn);\n\t      } else if (!fn) {\n\t        throw new Error('[markdown error]: Previewer registerAfterUpdate params are undefined');\n\t      } else {\n\t        this.options.afterUpdateCallBack.push(fn);\n\t      }\n\t    }\n\t    /**\n\t     * 根据行号计算出top值\n\t     * @param {Number} lineNum\n\t     * @param {Number} linePercent\n\t     * @return {Number} top\n\t     */\n\n\t  }, {\n\t    key: \"$getTopByLineNum\",\n\t    value: function $getTopByLineNum(lineNum) {\n\t      var linePercent = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n\t      var domContainer = this.getDomContainer();\n\n\t      if (lineNum === null) {\n\t        return domContainer.scrollHeight;\n\t      }\n\n\t      var $lineNum = typeof lineNum === 'number' ? lineNum : _parseInt$2(lineNum, 10);\n\t      var doms =\n\t      /** @type {NodeListOf<HTMLElement>}*/\n\t      domContainer.querySelectorAll('[data-sign]');\n\t      var lines = 0;\n\t      var containerY = domContainer.offsetTop;\n\n\t      for (var index = 0; index < doms.length; index++) {\n\t        if (doms[index].parentNode !== domContainer) {\n\t          continue;\n\t        }\n\n\t        var blockLines = _parseInt$2(doms[index].getAttribute('data-lines'), 10);\n\n\t        if (lines + blockLines < $lineNum) {\n\t          lines += blockLines;\n\t          continue;\n\t        } else {\n\t          // 基础定位，区块高度及offsetTop会受到block margin合并的影响\n\t          var _getBlockTopAndHeight = getBlockTopAndHeightWithMargin(doms[index]),\n\t              blockHeight = _getBlockTopAndHeight.height,\n\t              offsetTop = _getBlockTopAndHeight.offsetTop;\n\n\t          var blockY = offsetTop - containerY;\n\t          var scrollTo = blockY + blockHeight * linePercent; // 区块多于1行\n\n\t          if (blockLines > 1) {\n\t            // 高度百分比计算\n\t            // 该区块已经滚动过的行，不包括当前行，减一\n\t            var overScrolledLines = blockLines - Math.abs($lineNum - (lines + blockLines)) - 1;\n\t            var overScrolledHeight = overScrolledLines / blockLines * blockHeight; // 已经滚过的高度\n\n\t            var blockLineHeight = blockHeight / blockLines; // 该区块每一行的高度\n\t            // 应该滚动到的位置\n\n\t            scrollTo = blockY + overScrolledHeight + blockLineHeight * linePercent; // console.log('overscrolled:', overScrolledHeight, blockLineHeight, linePercent);\n\t          } // console.log('滚动编辑区域，左侧应scroll to ', lineNum, '::',scrollTo);\n\n\n\t          return scrollTo;\n\t        }\n\t      } // 如果计算完预览区域所有的行号依然＜左侧光标所在的行号，则预览区域直接滚到最低部\n\n\n\t      return domContainer.scrollHeight;\n\t    }\n\t    /**\n\t     * 高亮预览区域对应的行\n\t     * @param {Number} lineNum\n\t     */\n\n\t  }, {\n\t    key: \"highlightLine\",\n\t    value: function highlightLine(lineNum) {\n\t      var _context12, _this$$cherry, _this$$cherry$status, _this$$cherry2, _this$$cherry2$status;\n\n\t      var domContainer = this.getDomContainer(); // 先取消所有行的高亮效果\n\n\t      forEach$3(_context12 = domContainer.querySelectorAll('.cherry-highlight-line')).call(_context12, function (element) {\n\t        element.classList.remove('cherry-highlight-line');\n\t      }); // 只有双栏模式下才需要高亮光标对应的预览区域\n\n\n\t      if (((_this$$cherry = this.$cherry) === null || _this$$cherry === void 0 ? void 0 : (_this$$cherry$status = _this$$cherry.status) === null || _this$$cherry$status === void 0 ? void 0 : _this$$cherry$status.previewer) !== 'show' || ((_this$$cherry2 = this.$cherry) === null || _this$$cherry2 === void 0 ? void 0 : (_this$$cherry2$status = _this$$cherry2.status) === null || _this$$cherry2$status === void 0 ? void 0 : _this$$cherry2$status.editor) !== 'show') {\n\t        return;\n\t      }\n\n\t      var doms =\n\t      /** @type {NodeListOf<HTMLElement>}*/\n\t      domContainer.querySelectorAll('[data-sign]');\n\t      var lines = 0;\n\n\t      for (var index = 0; index < doms.length; index++) {\n\t        if (doms[index].parentNode !== domContainer) {\n\t          continue;\n\t        }\n\n\t        var blockLines = _parseInt$2(doms[index].getAttribute('data-lines'), 10);\n\n\t        if (lines + blockLines < lineNum) {\n\t          lines += blockLines;\n\t          continue;\n\t        } else {\n\t          this.highlightLineNum = lineNum;\n\t          doms[index].classList.add('cherry-highlight-line');\n\t          return;\n\t        }\n\t      }\n\t    }\n\t    /**\n\t     * 滚动到对应行号位置并加上偏移量\n\t     * @param {Number} lineNum\n\t     * @param {Number} offset\n\t     */\n\n\t  }, {\n\t    key: \"scrollToLineNumWithOffset\",\n\t    value: function scrollToLineNumWithOffset(lineNum, offset) {\n\t      var top = this.$getTopByLineNum(lineNum) - offset;\n\t      this.$scrollAnimation(top);\n\t      this.highlightLine(lineNum);\n\t    }\n\t    /**\n\t     * 实现滚动动画\n\t     * @param { Number } targetY 目标位置\n\t     */\n\n\t  }, {\n\t    key: \"$scrollAnimation\",\n\t    value: function $scrollAnimation(targetY) {\n\t      var _this7 = this;\n\n\t      this.animation.destinationTop = targetY;\n\n\t      if (this.animation.timer) {\n\t        return;\n\t      }\n\n\t      var animationHandler = function animationHandler() {\n\t        var dom = _this7.getDomContainer();\n\n\t        var currentTop = dom.scrollTop;\n\t        var delta = _this7.animation.destinationTop - currentTop; // 100毫秒内完成动画\n\n\t        var move = Math.ceil(Math.min(Math.abs(delta), Math.max(1, Math.abs(delta) / (100 / 16.7))));\n\n\t        if (delta === 0 || currentTop >= dom.scrollHeight || move > Math.abs(delta)) {\n\t          cancelAnimationFrame(_this7.animation.timer);\n\t          _this7.animation.timer = 0;\n\t          return;\n\t        }\n\n\t        _this7.disableScrollListener = true;\n\n\t        _this7.getDomContainer().scrollTo(null, currentTop + delta / Math.abs(delta) * move);\n\n\t        _this7.animation.timer = requestAnimationFrame(animationHandler);\n\t      };\n\n\t      this.animation.timer = requestAnimationFrame(animationHandler);\n\t    }\n\t  }, {\n\t    key: \"scrollToLineNum\",\n\t    value: function scrollToLineNum(lineNum, linePercent) {\n\t      var top = this.$getTopByLineNum(lineNum, linePercent);\n\t      this.$scrollAnimation(top);\n\t    }\n\t  }, {\n\t    key: \"onMouseDown\",\n\t    value: function onMouseDown() {\n\t      var _this8 = this;\n\n\t      addEvent(this.getDomContainer(), 'mousedown', function () {\n\t        setTimeout$3(function () {\n\t          Event$1.emit(_this8.instanceId, Event$1.Events.cleanAllSubMenus);\n\t        });\n\t      });\n\t    }\n\t    /**\n\t     * 导出预览区域内容\n\t     * @public\n\t     * @param {String} type 'pdf'：导出成pdf文件; 'img'：导出成图片\n\t     * @param {String |Function} fileName 导出文件名\n\t     */\n\n\t  }, {\n\t    key: \"export\",\n\t    value: function _export() {\n\t      var type = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'pdf';\n\t      var fileName = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';\n\t      // console.log(this.options);\n\t      var name;\n\n\t      if (!fileName) {\n\t        var parser = new DOMParser();\n\t        var domTree = parser.parseFromString(this.getValue(), 'text/html');\n\t        var firstNodeText = findNonEmptyNode(domTree);\n\t        firstNodeText ? name = firstNodeText : name = 'cherry';\n\t      } // if (typeof fileName === 'function') {\n\t      //   name = fileName();\n\t      // } else {\n\t      //   name = fileName;\n\t      // }\n\n\n\t      if (type === 'pdf') {\n\t        exportPDF(this.getDomContainer(), name);\n\t      } else if (type === 'screenShot') {\n\t        exportScreenShot(this.getDomContainer(), name);\n\t      } else if (type === 'markdown') {\n\t        exportMarkdownFile(this.$cherry.getMarkdown(), name);\n\t      } else if (type === 'html') {\n\t        exportHTMLFile(this.getValue(), name);\n\t      }\n\t    }\n\t  }]);\n\n\t  return Previewer;\n\t}();\n\n\t// Kludges for bugs and behavior differences that can't be feature\n\t// detected are enabled based on userAgent etc sniffing.\n\tvar userAgent = navigator.userAgent;\n\tvar platform = navigator.platform;\n\tvar gecko = /gecko\\/\\d/i.test(userAgent);\n\tvar ie_upto10 = /MSIE \\d/.test(userAgent);\n\tvar ie_11up = /Trident\\/(?:[7-9]|\\d{2,})\\..*rv:(\\d+)/.exec(userAgent);\n\tvar edge = /Edge\\/(\\d+)/.exec(userAgent);\n\tvar ie = ie_upto10 || ie_11up || edge;\n\tvar ie_version = ie && (ie_upto10 ? document.documentMode || 6 : +(edge || ie_11up)[1]);\n\tvar webkit = !edge && /WebKit\\//.test(userAgent);\n\tvar qtwebkit = webkit && /Qt\\/\\d+\\.\\d+/.test(userAgent);\n\tvar chrome = !edge && /Chrome\\//.test(userAgent);\n\tvar presto = /Opera\\//.test(userAgent);\n\tvar safari = /Apple Computer/.test(navigator.vendor);\n\tvar mac_geMountainLion = /Mac OS X 1\\d\\D([8-9]|\\d\\d)\\D/.test(userAgent);\n\tvar phantom = /PhantomJS/.test(userAgent);\n\tvar ios = !edge && /AppleWebKit/.test(userAgent) && /Mobile\\/\\w+/.test(userAgent);\n\tvar android = /Android/.test(userAgent); // This is woefully incomplete. Suggestions for alternative methods welcome.\n\n\tvar mobile = ios || android || /webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(userAgent);\n\tvar mac = ios || /Mac/.test(platform);\n\tvar chromeOS = /\\bCrOS\\b/.test(userAgent);\n\tvar windows = /win/i.test(platform);\n\tvar presto_version = presto && userAgent.match(/Version\\/(\\d*\\.\\d*)/);\n\tif (presto_version) presto_version = Number(presto_version[1]);\n\n\tif (presto_version && presto_version >= 15) {\n\t  presto = false;\n\t  webkit = true;\n\t} // Some browsers use the wrong event properties to signal cmd/ctrl on OS X\n\n\t/**\n\t * @typedef {Object} SubMenuConfigItem\n\t * @property {string} name - 子菜单项名称\n\t * @property {string=} iconName - 子菜单项图标名称\n\t * @property {function} onclick - 子菜单项点击事件\n\t */\n\n\t/**\n\t *\n\t * @param {HTMLElement} targetDom\n\t * @param {'absolute' | 'fixed' | 'sidebar'} [positionModel = 'absolute']\n\t * @returns {Pick<DOMRect, 'left' | 'top' | 'width' | 'height'>}\n\t */\n\n\tfunction getPosition(targetDom) {\n\t  var positionModel = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'absolute';\n\t  var pos = targetDom.getBoundingClientRect();\n\n\t  if (positionModel === 'fixed') {\n\t    return pos;\n\t  } // 侧边栏按钮做个特殊处理\n\n\n\t  if (positionModel === 'sidebar') {\n\t    var parent = MenuBase.getTargetParentByButton(targetDom);\n\t    return {\n\t      left: parent.offsetLeft - 130 + pos.width,\n\t      top: targetDom.offsetTop + pos.height / 2,\n\t      width: pos.width,\n\t      height: pos.height\n\t    };\n\t  }\n\n\t  return {\n\t    left: targetDom.offsetLeft,\n\t    top: targetDom.offsetTop,\n\t    width: pos.width,\n\t    height: pos.height\n\t  };\n\t}\n\t/**\n\t * @typedef {import('@/Editor').default} Editor\n\t */\n\n\t/**\n\t * @class MenuBase\n\t */\n\n\n\tvar MenuBase = /*#__PURE__*/function () {\n\t  /**\n\t   * @deprecated\n\t   * @type {MenuBase['fire']}\n\t   */\n\n\t  /**\n\t   *\n\t   * @param {*} $cherry\n\t   */\n\t  function MenuBase($cherry) {\n\t    _classCallCheck(this, MenuBase);\n\n\t    _defineProperty(this, \"_onClick\", void 0);\n\n\t    this.$cherry = $cherry;\n\t    this.bubbleMenu = false;\n\t    this.subMenu = null; // 子菜单实例\n\n\t    this.name = ''; // 菜单项Name\n\n\t    this.editor = $cherry.editor; // markdown实例\n\n\t    this.locale = $cherry.locale;\n\t    this.dom = null;\n\t    this.updateMarkdown = true; // 是否更新markdown原文\n\n\t    /** @type {SubMenuConfigItem[]} */\n\n\t    this.subMenuConfig = []; // 子菜单配置\n\n\t    this.noIcon = false; // 是否不显示图标\n\n\t    this.cacheOnce = false; // 是否保存一次点击事件生成的内容\n\n\t    /**\n\t     * 子菜单的定位方式\n\t     * @property\n\t     * @type {'absolute' | 'fixed' | 'sidebar'}\n\t     */\n\n\t    this.positionModel = 'absolute'; // eslint-disable-next-line no-underscore-dangle\n\n\t    if (typeof this._onClick === 'function') {\n\t      Logger.warn('`MenuBase._onClick` is deprecated. Override `fire` instead'); // eslint-disable-next-line no-underscore-dangle\n\n\t      this.fire = this._onClick;\n\t    }\n\t  }\n\n\t  _createClass(MenuBase, [{\n\t    key: \"getSubMenuConfig\",\n\t    value: function getSubMenuConfig() {\n\t      return this.subMenuConfig;\n\t    }\n\t    /**\n\t     * 设置菜单\n\t     * @param {string} name 菜单名称\n\t     * @param {string} [iconName] 菜单图标名\n\t     */\n\n\t  }, {\n\t    key: \"setName\",\n\t    value: function setName(name, iconName) {\n\t      this.name = name;\n\t      this.iconName = iconName;\n\t    }\n\t}, {\n\t\tkey: \"setId\",\n\t\tvalue: function setId(id) {\n\t\t\tthis.id = id;\n\t\t}\n\t    /**\n\t     * 设置一个一次性缓存\n\t     * 使用场景：\n\t     *  当需要异步操作是，比如上传视频、选择字体颜色、通过棋盘插入表格等\n\t     * 实现原理：\n\t     *  1、第一次点击按钮时触发fire()方法，触发选择文件、选择颜色、选择棋盘格的操作。此时onClick()不返回任何数据。\n\t     *  2、当异步操作完成后（如提交了文件、选择了颜色等），调用本方法（setCacheOnce）实现缓存，最后调用fire()方法\n\t     *  3、当fire()方法再次调用onClick()方法时，onClick()方法会返回缓存的数据（getAndCleanCacheOnce）\n\t     *\n\t     * 这么设计的原因：\n\t     *  1、可以复用MenuBase的相关方法\n\t     *  2、避免异步操作直接与codemirror交互\n\t     * @param {*} info\n\t     */\n\n\t  }, {\n\t    key: \"setCacheOnce\",\n\t    value: function setCacheOnce(info) {\n\t      this.cacheOnce = info;\n\t    }\n\t  }, {\n\t    key: \"getAndCleanCacheOnce\",\n\t    value: function getAndCleanCacheOnce() {\n\t      this.updateMarkdown = true;\n\t      var ret = this.cacheOnce;\n\t      this.cacheOnce = false;\n\t      return ret;\n\t    }\n\t  }, {\n\t    key: \"hasCacheOnce\",\n\t    value: function hasCacheOnce() {\n\t      return this.cacheOnce !== false;\n\t    }\n\t    /**\n\t     * 创建一个一级菜单\n\t     * @param {boolean} asSubMenu 是否以子菜单的形式创建\n\t     */\n\n\t  }, {\n\t    key: \"createBtn\",\n\t    value: function createBtn() {\n\t      var asSubMenu = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n\t      var classNames = asSubMenu ? 'cherry-dropdown-item' : \"cherry-toolbar-button cherry-toolbar-\".concat(this.iconName ? this.iconName : this.name);\n\t      var span = createElement('span', classNames, {\n\t        title: this.locale[this.name] || escapeHTMLSpecialCharOnce(this.name)\n\t      }); // 如果有图标，则添加图标\n\n\t      if (this.iconName && !this.noIcon) {\n\t        var icon = createElement('i', \"ch-icon ch-icon-\".concat(this.iconName));\n\t        span.appendChild(icon);\n\t      } // 二级菜单强制显示文字，没有图标的按钮也显示文字\n\n\t\t  if (this.id) {\n\t\t\tspan.id = this.id;\n\t\t  }\n\n\n\t      if (asSubMenu || this.noIcon) {\n\t        span.innerHTML += this.locale[this.name] || escapeHTMLSpecialCharOnce(this.name);\n\t      } // 只有一级菜单才保存dom，且只保存一次\n\n\n\t      if (!asSubMenu && !this.dom) {\n\t        this.dom = span;\n\t      }\n\n\t      return span;\n\t    }\n\t  }, {\n\t    key: \"createSubBtnByConfig\",\n\t    value: function createSubBtnByConfig(config) {\n\t      var name = config.name,\n\t          iconName = config.iconName,\n\t\t\t  id = config.id,\n\t          onclick = config.onclick;\n\t      var span = createElement('span', 'cherry-dropdown-item', {\n\t        title: this.locale[name] || escapeHTMLSpecialCharOnce(name)\n\t      });\n\n\t      if (iconName) {\n\t        var icon = createElement('i', \"ch-icon ch-icon-\".concat(iconName));\n\t        span.appendChild(icon);\n\t      }\n\n\t\t  if (id) {\n\t\t\tspan.id = id;\n\t\t  }\n\n\t      span.innerHTML += this.locale[name] || escapeHTMLSpecialCharOnce(name);\n\t      span.addEventListener('click', onclick, false);\n\t      return span;\n\t    }\n\t    /**\n\t     * 处理菜单项点击事件\n\t     * @param {MouseEvent | KeyboardEvent | undefined} [event] 点击事件\n\t     * @returns {void}\n\t     */\n\n\t  }, {\n\t    key: \"fire\",\n\t    value: function fire(event) {\n\t      var _this = this;\n\n\t      var shortKey = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';\n\t      event === null || event === void 0 ? void 0 : event.stopPropagation();\n\n\t      if (typeof this.onClick === 'function') {\n\t        var selections = this.editor.editor.getSelections(); // 判断是不是多选\n\n\t        this.isSelections = selections.length > 1; // 当onClick返回null、undefined、false时，维持原样\n\n\t        var ret = map$3(selections).call(selections, function (selection, index, srcArray) {\n\t          return _this.onClick(selection, shortKey, event) || srcArray[index];\n\t        });\n\n\t        if (!this.bubbleMenu && this.updateMarkdown) {\n\t          // 非下拉菜单按钮保留selection\n\t          this.editor.editor.replaceSelections(ret, 'around');\n\t          this.editor.editor.focus();\n\t          this.$afterClick();\n\t        }\n\t      }\n\t    }\n\t    /**\n\t     * 获取当前选择区域的range\n\t     */\n\n\t  }, {\n\t    key: \"$getSelectionRange\",\n\t    value: function $getSelectionRange() {\n\t      var _this$editor$editor$l = this.editor.editor.listSelections()[0],\n\t          anchor = _this$editor$editor$l.anchor,\n\t          head = _this$editor$editor$l.head; // 如果begin在end的后面\n\n\t      if (anchor.line === head.line && anchor.ch > head.ch || anchor.line > head.line) {\n\t        return {\n\t          begin: head,\n\t          end: anchor\n\t        };\n\t      }\n\n\t      return {\n\t        begin: anchor,\n\t        end: head\n\t      };\n\t    }\n\t    /**\n\t     * 注册点击事件渲染后的回调函数\n\t     * @param {function} cb\n\t     */\n\n\t  }, {\n\t    key: \"registerAfterClickCb\",\n\t    value: function registerAfterClickCb(cb) {\n\t      this.afterClickCb = cb;\n\t    }\n\t    /**\n\t     * 点击事件渲染后的回调函数\n\t     */\n\n\t  }, {\n\t    key: \"$afterClick\",\n\t    value: function $afterClick() {\n\t      if (typeof this.afterClickCb === 'function' && !this.isSelections) {\n\t        this.afterClickCb();\n\t        this.afterClickCb = null;\n\t      }\n\t    }\n\t    /**\n\t     * 选中除了前后语法后的内容\n\t     * @param {String} lessBefore\n\t     * @param {String} lessAfter\n\t     */\n\n\t  }, {\n\t    key: \"setLessSelection\",\n\t    value: function setLessSelection(lessBefore, lessAfter) {\n\t      var _lessBefore$match, _lessBefore$match2, _lessAfter$match, _lessAfter$match2;\n\n\t      var cm = this.editor.editor;\n\n\t      var _this$$getSelectionRa = this.$getSelectionRange(),\n\t          begin = _this$$getSelectionRa.begin,\n\t          end = _this$$getSelectionRa.end;\n\n\t      var newBeginLine = ((_lessBefore$match = lessBefore.match(/\\n/g)) === null || _lessBefore$match === void 0 ? void 0 : _lessBefore$match.length) > 0 ? begin.line + lessBefore.match(/\\n/g).length : begin.line;\n\t      var newBeginCh = ((_lessBefore$match2 = lessBefore.match(/\\n/g)) === null || _lessBefore$match2 === void 0 ? void 0 : _lessBefore$match2.length) > 0 ? lessBefore.replace(/^[\\s\\S]*?\\n([^\\n]*)$/, '$1').length : begin.ch + lessBefore.length;\n\t      var newBegin = {\n\t        line: newBeginLine,\n\t        ch: newBeginCh\n\t      };\n\t      var newEndLine = ((_lessAfter$match = lessAfter.match(/\\n/g)) === null || _lessAfter$match === void 0 ? void 0 : _lessAfter$match.length) > 0 ? end.line - lessAfter.match(/\\n/g).length : end.line;\n\t      var newEndCh = ((_lessAfter$match2 = lessAfter.match(/\\n/g)) === null || _lessAfter$match2 === void 0 ? void 0 : _lessAfter$match2.length) > 0 ? cm.getLine(newEndLine).length : end.ch - lessAfter.length;\n\t      var newEnd = {\n\t        line: newEndLine,\n\t        ch: newEndCh\n\t      };\n\t      cm.setSelection(newBegin, newEnd);\n\t    }\n\t    /**\n\t     * 基于当前已选择区域，获取更多的选择区\n\t     * @param {string} [appendBefore] 选择区前面追加的内容\n\t     * @param {string} [appendAfter] 选择区后面追加的内容\n\t     * @param {function} [cb] 回调函数，如果返回false，则恢复原来的选取\n\t     */\n\n\t  }, {\n\t    key: \"getMoreSelection\",\n\t    value: function getMoreSelection(appendBefore, appendAfter, cb) {\n\t      var cm = this.editor.editor;\n\n\t      var _this$$getSelectionRa2 = this.$getSelectionRange(),\n\t          begin = _this$$getSelectionRa2.begin,\n\t          end = _this$$getSelectionRa2.end;\n\n\t      var newBeginCh = // 如果只包含换行，则起始位置一定是0\n\t      /\\n/.test(appendBefore) ? 0 : begin.ch - appendBefore.length;\n\t      newBeginCh = newBeginCh < 0 ? 0 : newBeginCh;\n\t      var newBeginLine = /\\n/.test(appendBefore) ? begin.line - appendBefore.match(/\\n/g).length : begin.line;\n\t      newBeginLine = newBeginLine < 0 ? 0 : newBeginLine;\n\t      var newBegin = {\n\t        line: newBeginLine,\n\t        ch: newBeginCh\n\t      };\n\t      var newEndLine = end.line;\n\t      var newEndCh = end.ch;\n\n\t      if (/\\n/.test(appendAfter)) {\n\t        var _cm$getLine;\n\n\t        newEndLine = end.line + appendAfter.match(/\\n/g).length;\n\t        newEndCh = (_cm$getLine = cm.getLine(newEndLine)) === null || _cm$getLine === void 0 ? void 0 : _cm$getLine.length;\n\t      } else {\n\t        newEndCh = cm.getLine(end.line).length < end.ch + appendAfter.length ? cm.getLine(end.line).length : end.ch + appendAfter.length;\n\t      }\n\n\t      var newEnd = {\n\t        line: newEndLine,\n\t        ch: newEndCh\n\t      };\n\t      cm.setSelection(newBegin, newEnd);\n\n\t      if (cb() === false) {\n\t        cm.setSelection(begin, end);\n\t      }\n\t    }\n\t    /**\n\t     * 获取用户选中的文本内容，如果没有选中文本，则返回光标所在的位置的内容\n\t     * @param {string} selection 当前选中的文本内容\n\t     * @param {string} type  'line': 当没有选择文本时，获取光标所在行的内容； 'word': 当没有选择文本时，获取光标所在单词的内容\n\t     * @param {boolean} focus true；强行选中光标处的内容，否则只获取选中的内容\n\t     * @returns {string}\n\t     */\n\n\t  }, {\n\t    key: \"getSelection\",\n\t    value: function getSelection(selection) {\n\t      var type = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'word';\n\t      var focus = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n\t      var cm = this.editor.editor; // 多光标模式下不做处理\n\n\t      if (this.isSelections) {\n\t        return selection;\n\t      }\n\n\t      if (selection && !focus) {\n\t        return selection;\n\t      } // 获取光标所在行的内容，同时选中所在行\n\n\n\t      if (type === 'line') {\n\t        var _this$$getSelectionRa3 = this.$getSelectionRange(),\n\t            begin = _this$$getSelectionRa3.begin,\n\t            end = _this$$getSelectionRa3.end;\n\n\t        cm.setSelection({\n\t          line: begin.line,\n\t          ch: 0\n\t        }, {\n\t          line: end.line,\n\t          ch: cm.getLine(end.line).length\n\t        });\n\t        return cm.getSelection();\n\t      } // 获取光标所在单词的内容，同时选中所在单词\n\n\n\t      if (type === 'word') {\n\t        var _cm$findWordAt = cm.findWordAt(cm.getCursor()),\n\t            _begin = _cm$findWordAt.anchor,\n\t            _end = _cm$findWordAt.head;\n\n\t        cm.setSelection(_begin, _end);\n\t        return cm.getSelection();\n\t      }\n\t    }\n\t    /**\n\t     * 反转子菜单点击事件参数顺序\n\t     * @deprecated\n\t     */\n\n\t  }, {\n\t    key: \"bindSubClick\",\n\t    value: function bindSubClick(shortcut, selection) {\n\t      return this.fire(null, shortcut);\n\t    }\n\t  }, {\n\t    key: \"onClick\",\n\t    value: function onClick(selection, shortcut, callback) {\n\t      return selection;\n\t    }\n\t  }, {\n\t    key: \"shortcutKeys\",\n\t    get: function get() {\n\t      return [];\n\t    }\n\t    /**\n\t     * 获取当前菜单的位置\n\t     */\n\n\t  }, {\n\t    key: \"getMenuPosition\",\n\t    value: function getMenuPosition() {\n\t      var parent = MenuBase.getTargetParentByButton(this.dom);\n\t      var isFromSidebar = /cherry-sidebar/.test(parent.className);\n\n\t      if (/cherry-bubble/.test(parent.className) || /cherry-floatmenu/.test(parent.className)) {\n\t        this.positionModel = 'fixed';\n\t      } else if (isFromSidebar) {\n\t        this.positionModel = 'sidebar';\n\t      } else {\n\t        this.positionModel = 'absolute';\n\t      }\n\n\t      return getPosition(this.dom, this.positionModel);\n\t    }\n\t    /**\n\t     * 根据按钮获取按钮的父元素，这里父元素要绕过toolbar-(left|right)那一层\n\t     * @param {HTMLElement} dom 按钮元素\n\t     * @returns {HTMLElement} 父元素\n\t     */\n\n\t  }], [{\n\t    key: \"getTargetParentByButton\",\n\t    value: function getTargetParentByButton(dom) {\n\t      var parent = dom.parentElement;\n\n\t      if (/toolbar-(left|right)/.test(parent.className)) {\n\t        parent = parent.parentElement;\n\t      }\n\n\t      return parent;\n\t    }\n\t  }]);\n\n\t  return MenuBase;\n\t}();\n\n\tfunction _createSuper$z(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$z(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = construct$4(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\n\tfunction _isNativeReflectConstruct$z() { if (typeof Reflect === \"undefined\" || !construct$4) return false; if (construct$4.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(construct$4(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\t/**\n\t * 加粗按钮\n\t */\n\n\tvar Bold = /*#__PURE__*/function (_MenuBase) {\n\t  _inherits(Bold, _MenuBase);\n\n\t  var _super = _createSuper$z(Bold);\n\n\t  function Bold($cherry) {\n\t    var _this;\n\n\t    _classCallCheck(this, Bold);\n\n\t    _this = _super.call(this, $cherry);\n\n\t    _this.setName('bold', 'bold');\n\n\t    return _this;\n\t  }\n\t  /**\n\t   * 是不是包含加粗语法\n\t   * @param {String} selection\n\t   * @returns {Boolean}\n\t   */\n\n\n\t  _createClass(Bold, [{\n\t    key: \"$testIsBold\",\n\t    value: function $testIsBold(selection) {\n\t      return /^\\s*(\\*\\*|__)[\\s\\S]+(\\1)/.test(selection);\n\t    }\n\t    /**\n\t     * 响应点击事件\n\t     * @param {string} selection 被用户选中的文本内容\n\t     * @param {string} shortKey 快捷键参数，本函数不处理这个参数\n\t     * @returns {string} 回填到编辑器光标位置/选中文本区域的内容\n\t     */\n\n\t  }, {\n\t    key: \"onClick\",\n\t    value: function onClick(selection) {\n\t      var _this2 = this;\n\t      var $selection = this.getSelection(selection) || this.locale.bold; // 如果是单选，并且选中内容的开始结束内没有加粗语法，则扩大选中范围\n\n\t      if (!this.isSelections && !this.$testIsBold($selection)) {\n\t        this.getMoreSelection('**', '**', function () {\n\t          var newSelection = _this2.editor.editor.getSelection();\n\n\t          var isBold = _this2.$testIsBold(newSelection);\n\n\t          if (isBold) {\n\t            $selection = newSelection;\n\t          }\n\n\t          return isBold;\n\t        });\n\t      } // 如果选中的文本中已经有加粗语法了，则去掉加粗语法\n\n\n\t      if (this.$testIsBold($selection)) {\n\t        return $selection.replace(/(^)(\\s*)(\\*\\*|__)([^\\n]+)(\\3)(\\s*)($)/gm, '$1$4$7');\n\t      }\n\n\t      this.registerAfterClickCb(function () {\n\t        _this2.setLessSelection('**', '**');\n\t      });\n\t      return $selection.replace(/(^)([^\\n]+)($)/gm, '$1**$2**$3');\n\t    }\n\t    /**\n\t     * 声明绑定的快捷键，快捷键触发onClick\n\t     */\n\n\t  }, {\n\t    key: \"shortcutKeys\",\n\t    get: function get() {\n\t      return ['Ctrl-b'];\n\t    }\n\t  }]);\n\n\t  return Bold;\n\t}(MenuBase);\n\n\tfunction _createSuper$A(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$A(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = construct$4(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\n\tfunction _isNativeReflectConstruct$A() { if (typeof Reflect === \"undefined\" || !construct$4) return false; if (construct$4.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(construct$4(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\t/**\n\t * 插入斜体的按钮\n\t */\n\n\tvar Italic = /*#__PURE__*/function (_MenuBase) {\n\t  _inherits(Italic, _MenuBase);\n\n\t  var _super = _createSuper$A(Italic);\n\n\t  function Italic($cherry) {\n\t    var _this;\n\n\t    _classCallCheck(this, Italic);\n\n\t    _this = _super.call(this, $cherry);\n\n\t    _this.setName('italic', 'italic');\n\n\t    return _this;\n\t  }\n\t  /**\n\t   * 是不是包含加粗语法\n\t   * @param {String} selection\n\t   * @returns {Boolean}\n\t   */\n\n\n\t  _createClass(Italic, [{\n\t    key: \"$testIsItalic\",\n\t    value: function $testIsItalic(selection) {\n\t      return /^\\s*(\\*|_)[\\s\\S]+(\\1)/.test(selection);\n\t    }\n\t    /**\n\t     * 响应点击事件\n\t     * @param {string} selection 被用户选中的文本内容\n\t     * @param {string} shortKey 快捷键参数，本函数不处理这个参数\n\t     * @returns {string} 回填到编辑器光标位置/选中文本区域的内容\n\t     */\n\n\t  }, {\n\t    key: \"onClick\",\n\t    value: function onClick(selection) {\n\t      var _this2 = this;\n\t      var $selection = this.getSelection(selection) || this.locale.italic; // 如果是单选，并且选中内容的开始结束内没有加粗语法，则扩大选中范围\n\n\t      if (!this.isSelections && !this.$testIsItalic($selection)) {\n\t        this.getMoreSelection('*', '*', function () {\n\t          var newSelection = _this2.editor.editor.getSelection();\n\n\t          var isItalic = _this2.$testIsItalic(newSelection);\n\n\t          if (isItalic) {\n\t            $selection = newSelection;\n\t          }\n\n\t          return isItalic;\n\t        });\n\t      }\n\n\t      if (this.$testIsItalic($selection)) {\n\t        return $selection.replace(/(^)(\\s*)(\\*|_)([^\\n]+)(\\3)(\\s*)($)/gm, '$1$4$7');\n\t      }\n\n\t      this.registerAfterClickCb(function () {\n\t        _this2.setLessSelection('*', '*');\n\t      });\n\t      return $selection.replace(/(^)([^\\n]+)($)/gm, '$1*$2*$3');\n\t    }\n\t    /**\n\t     * 获得监听的快捷键\n\t     * 在windows下是Ctrl+i，在mac下是cmd+i\n\t     */\n\n\t  }, {\n\t    key: \"shortcutKeys\",\n\t    get: function get() {\n\t      return ['Ctrl-i'];\n\t    }\n\t  }]);\n\n\t  return Italic;\n\t}(MenuBase);\n\n\tfunction _createSuper$B(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$B(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = construct$4(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\n\tfunction _isNativeReflectConstruct$B() { if (typeof Reflect === \"undefined\" || !construct$4) return false; if (construct$4.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(construct$4(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\t/**\n\t * 工具栏里的分割线，用来切分不同类型按钮的区域\n\t * 一个实例中可以配置多个分割线\n\t */\n\n\tvar Split = /*#__PURE__*/function (_MenuBase) {\n\t  _inherits(Split, _MenuBase);\n\n\t  var _super = _createSuper$B(Split);\n\n\t  function Split($cherry) {\n\t    var _this;\n\n\t    _classCallCheck(this, Split);\n\n\t    _this = _super.call(this, $cherry);\n\n\t    _this.setName('split', '|');\n\n\t    return _this;\n\t  }\n\t  /**\n\t   * 重载创建按钮逻辑\n\t   * @returns {HTMLElement} 分割线标签\n\t   */\n\n\n\t  _createClass(Split, [{\n\t    key: \"createBtn\",\n\t    value: function createBtn() {\n\t      var className = 'cherry-toolbar-button cherry-toolbar-split';\n\t      var i = document.createElement('i');\n\t      i.className = className;\n\t      return i;\n\t    }\n\t  }]);\n\n\t  return Split;\n\t}(MenuBase);\n\n\t/**\n\t * Copyright (C) 2021 THL A29 Limited, a Tencent company.\n\t *\n\t * Licensed under the Apache License, Version 2.0 (the \"License\");\n\t * you may not use this file except in compliance with the License.\n\t * You may obtain a copy of the License at\n\t *\n\t *     http://www.apache.org/licenses/LICENSE-2.0\n\t *\n\t * Unless required by applicable law or agreed to in writing, software\n\t * distributed under the License is distributed on an \"AS IS\" BASIS,\n\t * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n\t * See the License for the specific language governing permissions and\n\t * limitations under the License.\n\t */\n\n\t/**\n\t * 获取用户选中的文本内容，如果没有选中文本，则返回光标所在的位置的内容\n\t * @param {Object} cm Codemirror实例\n\t * @param {string} selection 当前选中的文本内容\n\t * @param {string} type  'line': 当没有选择文本时，获取光标所在行的内容； 'word': 当没有选择文本时，获取光标所在单词的内容\n\t * @param {boolean} focus true；强行选中光标处的内容，否则只获取选中的内容\n\t * @returns {string}\n\t */\n\tfunction getSelection(cm, selection) {\n\t  var type = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'word';\n\t  var focus = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;\n\n\t  // 多光标模式下不做处理\n\t  if (cm.getSelections().length > 1) {\n\t    return selection;\n\t  }\n\n\t  if (selection && !focus) {\n\t    return selection;\n\t  } // 获取光标所在行的内容，同时选中所在行\n\n\n\t  if (type === 'line') {\n\t    var _cm$listSelections$ = cm.listSelections()[0],\n\t        anchor = _cm$listSelections$.anchor,\n\t        head = _cm$listSelections$.head; // 如果begin在end的后面\n\n\t    if (anchor.line === head.line && anchor.ch > head.ch || anchor.line > head.line) {\n\t      cm.setSelection({\n\t        line: head.line,\n\t        ch: 0\n\t      }, {\n\t        line: anchor.line,\n\t        ch: cm.getLine(anchor.line).length\n\t      });\n\t    } else {\n\t      cm.setSelection({\n\t        line: anchor.line,\n\t        ch: 0\n\t      }, {\n\t        line: head.line,\n\t        ch: cm.getLine(head.line).length\n\t      });\n\t    }\n\n\t    return cm.getSelection();\n\t  } // 获取光标所在单词的内容，同时选中所在单词\n\n\n\t  if (type === 'word') {\n\t    var _cm$findWordAt = cm.findWordAt(cm.getCursor()),\n\t        begin = _cm$findWordAt.anchor,\n\t        end = _cm$findWordAt.head;\n\n\t    cm.setSelection(begin, end);\n\t    return cm.getSelection();\n\t  }\n\t}\n\n\tfunction _createSuper$C(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$C(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = construct$4(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\n\tfunction _isNativeReflectConstruct$C() { if (typeof Reflect === \"undefined\" || !construct$4) return false; if (construct$4.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(construct$4(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\t/**\n\t * 删除线的按钮\n\t */\n\n\tvar Strikethrough$1 = /*#__PURE__*/function (_MenuBase) {\n\t  _inherits(Strikethrough, _MenuBase);\n\n\t  var _super = _createSuper$C(Strikethrough);\n\n\t  function Strikethrough($cherry) {\n\t    var _this;\n\n\t    _classCallCheck(this, Strikethrough);\n\n\t    _this = _super.call(this, $cherry);\n\n\t    _this.setName('strikethrough', 'strike');\n\n\t    return _this;\n\t  }\n\n\t  _createClass(Strikethrough, [{\n\t    key: \"$testIsStrike\",\n\t    value: function $testIsStrike(selection) {\n\t      return /(~~)[\\s\\S]+(\\1)/.test(selection);\n\t    }\n\t    /**\n\t     *\n\t     * @param {string} selection 被用户选中的文本内容\n\t     * @param {string} shortKey 快捷键参数，本函数不处理这个参数\n\t     * @returns {string} 回填到编辑器光标位置/选中文本区域的内容\n\t     */\n\n\t  }, {\n\t    key: \"onClick\",\n\t    value: function onClick(selection) {\n\t      var _this$$cherry,\n\t          _this$$cherry$options,\n\t          _this$$cherry$options2,\n\t          _this$$cherry$options3,\n\t          _this$$cherry$options4,\n\t          _this2 = this,\n\t          _context;\n\t      var $selection = getSelection(this.editor.editor, selection) || this.locale.strikethrough; // @ts-ignore\n\n\t      var needWhitespace = (_this$$cherry = this.$cherry) === null || _this$$cherry === void 0 ? void 0 : (_this$$cherry$options = _this$$cherry.options) === null || _this$$cherry$options === void 0 ? void 0 : (_this$$cherry$options2 = _this$$cherry$options.engine) === null || _this$$cherry$options2 === void 0 ? void 0 : (_this$$cherry$options3 = _this$$cherry$options2.syntax) === null || _this$$cherry$options3 === void 0 ? void 0 : (_this$$cherry$options4 = _this$$cherry$options3.strikethrough) === null || _this$$cherry$options4 === void 0 ? void 0 : _this$$cherry$options4.needWhitespace;\n\t      var space = needWhitespace ? ' ' : ''; // 如果被选中的文本中包含删除线语法，则去掉删除线语法\n\n\t      if (!this.isSelections && !this.$testIsStrike($selection)) {\n\t        this.getMoreSelection(\"\".concat(space, \"~~\"), \"~~\".concat(space), function () {\n\t          var newSelection = _this2.editor.editor.getSelection();\n\n\t          var isStrike = _this2.$testIsStrike(newSelection);\n\n\t          if (isStrike) {\n\t            $selection = newSelection;\n\t          }\n\n\t          return isStrike;\n\t        });\n\t      }\n\n\t      if (this.$testIsStrike($selection)) {\n\t        return selection.replace(/[\\s]*(~~)([\\s\\S]+)(\\1)[\\s]*/g, '$2');\n\t      }\n\n\t      this.registerAfterClickCb(function () {\n\t        _this2.setLessSelection(\"\".concat(space, \"~~\"), \"~~\".concat(space));\n\t      });\n\t      return $selection.replace(/(^)[\\s]*([\\s\\S]+?)[\\s]*($)/g, concat$5(_context = \"$1\".concat(space, \"~~$2~~\")).call(_context, space, \"$3\"));\n\t    }\n\t  }, {\n\t    key: \"shortcutKeys\",\n\t    get: function get() {\n\t      return ['Ctrl-d'];\n\t    }\n\t  }]);\n\n\t  return Strikethrough;\n\t}(MenuBase);\n\n\tfunction _createSuper$D(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$D(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = construct$4(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\n\tfunction _isNativeReflectConstruct$D() { if (typeof Reflect === \"undefined\" || !construct$4) return false; if (construct$4.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(construct$4(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\t/**\n\t * 下标的按钮\n\t **/\n\n\tvar Sub$1 = /*#__PURE__*/function (_MenuBase) {\n\t  _inherits(Sub, _MenuBase);\n\n\t  var _super = _createSuper$D(Sub);\n\n\t  function Sub($cherry) {\n\t    var _this;\n\n\t    _classCallCheck(this, Sub);\n\n\t    _this = _super.call(this, $cherry);\n\n\t    _this.setName('sub', 'sub');\n\n\t    return _this;\n\t  }\n\n\t  _createClass(Sub, [{\n\t    key: \"$testIsSub\",\n\t    value: function $testIsSub(selection) {\n\t      return /^\\s*(\\^\\^)[\\s\\S]+(\\1)/.test(selection);\n\t    }\n\t    /**\n\t     *\n\t     * @param {string} selection 被用户选中的文本内容\n\t     * @param {string} shortKey 快捷键参数，本函数不处理这个参数\n\t     * @returns {string} 回填到编辑器光标位置/选中文本区域的内容\n\t     */\n\n\t  }, {\n\t    key: \"onClick\",\n\t    value: function onClick(selection) {\n\t      var _this2 = this;\n\t      var $selection = getSelection(this.editor.editor, selection) || this.locale.sub; // 如果选中的内容里有下标的语法，则认为是要去掉下标语法\n\n\t      if (!this.isSelections && !this.$testIsSub($selection)) {\n\t        this.getMoreSelection('^^', '^^', function () {\n\t          var newSelection = _this2.editor.editor.getSelection();\n\n\t          var isSub = _this2.$testIsSub(newSelection);\n\n\t          if (isSub) {\n\t            $selection = newSelection;\n\t          }\n\n\t          return isSub;\n\t        });\n\t      }\n\n\t      if (this.$testIsSub($selection)) {\n\t        return $selection.replace(/(^)(\\s*)(\\^\\^)([^\\n]+)(\\3)(\\s*)($)/gm, '$1$4$7');\n\t      }\n\n\t      this.registerAfterClickCb(function () {\n\t        _this2.setLessSelection('^^', '^^');\n\t      });\n\t      return $selection.replace(/(^)([^\\n]+)($)/gm, '$1^^$2^^$3');\n\t    }\n\t  }]);\n\n\t  return Sub;\n\t}(MenuBase);\n\n\tfunction _createSuper$E(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$E(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = construct$4(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\n\tfunction _isNativeReflectConstruct$E() { if (typeof Reflect === \"undefined\" || !construct$4) return false; if (construct$4.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(construct$4(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\t/**\n\t * 上标的按钮\n\t **/\n\n\tvar Sup$1 = /*#__PURE__*/function (_MenuBase) {\n\t  _inherits(Sup, _MenuBase);\n\n\t  var _super = _createSuper$E(Sup);\n\n\t  function Sup($cherry) {\n\t    var _this;\n\n\t    _classCallCheck(this, Sup);\n\n\t    _this = _super.call(this, $cherry);\n\n\t    _this.setName('sup', 'sup');\n\n\t    return _this;\n\t  }\n\n\t  _createClass(Sup, [{\n\t    key: \"$testIsSup\",\n\t    value: function $testIsSup(selection) {\n\t      return /^\\s*(\\^)[\\s\\S]+(\\1)/.test(selection);\n\t    }\n\t    /**\n\t     *\n\t     * @param {string} selection 被用户选中的文本内容\n\t     * @param {string} shortKey 快捷键参数，本函数不处理这个参数\n\t     * @returns {string} 回填到编辑器光标位置/选中文本区域的内容\n\t     */\n\n\t  }, {\n\t    key: \"onClick\",\n\t    value: function onClick(selection) {\n\t      var _this2 = this;\n\t      var $selection = getSelection(this.editor.editor, selection) || this.locale.sup; // 如果选中的内容里有上标的语法，则认为是要去掉上标语法\n\n\t      if (!this.isSelections && !this.$testIsSup($selection)) {\n\t        this.getMoreSelection('^', '^', function () {\n\t          var newSelection = _this2.editor.editor.getSelection();\n\n\t          var isSup = _this2.$testIsSup(newSelection);\n\n\t          if (isSup) {\n\t            $selection = newSelection;\n\t          }\n\n\t          return isSup;\n\t        });\n\t      }\n\n\t      if (this.$testIsSup($selection)) {\n\t        return selection.replace(/(^)(\\s*)(\\^)([^\\n]+)(\\3)(\\s*)($)/gm, '$1$4$7');\n\t      }\n\n\t      this.registerAfterClickCb(function () {\n\t        _this2.setLessSelection('^', '^');\n\t      });\n\t      return $selection.replace(/(^)([^\\n]+)($)/gm, '$1^$2^$3');\n\t    }\n\t  }]);\n\n\t  return Sup;\n\t}(MenuBase);\n\n\tfunction _createSuper$F(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$F(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = construct$4(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\n\tfunction _isNativeReflectConstruct$F() { if (typeof Reflect === \"undefined\" || !construct$4) return false; if (construct$4.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(construct$4(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\t/**\n\t * 插入字体颜色或者字体背景颜色的按钮\n\t */\n\n\tvar Color$1 = /*#__PURE__*/function (_MenuBase) {\n\t  _inherits(Color, _MenuBase);\n\n\t  var _super = _createSuper$F(Color);\n\n\t  function Color($cherry) {\n\t    var _this;\n\n\t    _classCallCheck(this, Color);\n\n\t    _this = _super.call(this, $cherry);\n\n\t    _this.setName('color', 'color'); // this.bubbleMenu = true;\n\n\n\t    _this.bubbleColor = new BubbleColor($cherry);\n\t    return _this;\n\t  }\n\n\t  _createClass(Color, [{\n\t    key: \"$testIsColor\",\n\t    value: function $testIsColor(type, selection) {\n\t      var textReg = /^\\s*!![^\\s]+ [\\s\\S]+!!\\s*$/;\n\t      var bgReg = /^\\s*!!![^\\s]+ [\\s\\S]+!!!\\s*$/;\n\n\t      if (type === 'text') {\n\t        return textReg.test(selection) && !bgReg.test(selection);\n\t      }\n\n\t      return bgReg.test(selection);\n\t    }\n\t    /**\n\t     * 响应点击事件\n\t     * @param {string} selection 被用户选中的文本内容\n\t     * @param {string} shortKey 快捷键参数，本函数不处理这个参数\n\t     * @param {Event & {target:HTMLElement}} event 点击事件，用来从被点击的调色盘中获得对应的颜色\n\t     * @returns 回填到编辑器光标位置/选中文本区域的内容\n\t     */\n\n\t  }, {\n\t    key: \"onClick\",\n\t    value: function onClick(selection) {\n\t      var _this2 = this;\n\t      var event = arguments.length > 2 ? arguments[2] : undefined;\n\t      var $selection = getSelection(this.editor.editor, selection) || this.locale.color;\n\n\t      if (this.hasCacheOnce()) {\n\t        var _context4, _context5;\n\n\t        // @ts-ignore\n\t        var _this$getAndCleanCach = this.getAndCleanCacheOnce(),\n\t            type = _this$getAndCleanCach.type,\n\t            color = _this$getAndCleanCach.color;\n\n\t        var begin = type === 'text' ? \"!!\".concat(color, \" \") : \"!!!\".concat(color, \" \");\n\t        var end = type === 'text' ? '!!' : '!!!';\n\n\t        if (!this.isSelections && !this.$testIsColor(type, $selection)) {\n\t          this.getMoreSelection(begin, end, function () {\n\t            var newSelection = _this2.editor.editor.getSelection();\n\n\t            if (_this2.$testIsColor(type, newSelection)) {\n\t              $selection = newSelection;\n\t              return true;\n\t            }\n\n\t            return false;\n\t          });\n\t        }\n\n\t        if (this.$testIsColor(type, $selection)) {\n\t          var _context;\n\n\t          var reg = new RegExp(concat$5(_context = \"(^\\\\s*\".concat(end, \")([^\\\\s]+) ([\\\\s\\\\S]+\")).call(_context, end, \"\\\\s*$)\"), 'gm');\n\t          var needClean = true;\n\t          var tmp = $selection.replace(reg, function (w, m1, m2, m3) {\n\t            var _context2, _context3;\n\n\t            needClean = needClean ? m2 === color : false;\n\t            return concat$5(_context2 = concat$5(_context3 = \"\".concat(m1)).call(_context3, color, \" \")).call(_context2, m3);\n\t          });\n\n\t          if (needClean) {\n\t            return $selection.replace(reg, '$3').replace(/!+\\s*$/gm, '');\n\t          }\n\n\t          this.registerAfterClickCb(function () {\n\t            _this2.setLessSelection(begin, end);\n\t          });\n\t          return tmp;\n\t        }\n\n\t        this.registerAfterClickCb(function () {\n\t          _this2.setLessSelection(begin, end);\n\t        });\n\t        return concat$5(_context4 = concat$5(_context5 = \"\".concat(begin)).call(_context5, $selection)).call(_context4, end);\n\t      } // 定位调色盘应该出现的位置\n\t      // 该按钮可能出现在顶部工具栏，\n\t      // 也可能出现在选中文字时出现的bubble工具栏，\n\t      // 也可能出现在新行出现的float工具栏\n\n\n\t      var top = 0;\n\t      var left = 0;\n\n\t      if (event.target.closest('.cherry-bubble')) {\n\t        var $colorDom =\n\t        /** @type {HTMLElement}*/\n\t        event.target.closest('.cherry-bubble');\n\t        var clientRect = $colorDom.getBoundingClientRect();\n\t        top = clientRect.top + $colorDom.offsetHeight;\n\t        left =\n\t        /** @type {HTMLElement}*/\n\t        event.target.closest('.cherry-toolbar-color').offsetLeft + clientRect.left;\n\t      } else {\n\t        var _$colorDom =\n\t        /** @type {HTMLElement}*/\n\t        event.target.closest('.cherry-toolbar-color');\n\n\t        var _clientRect = _$colorDom.getBoundingClientRect();\n\n\t        top = _clientRect.top + _$colorDom.offsetHeight;\n\t        left = _clientRect.left;\n\t      }\n\n\t      this.updateMarkdown = false; // 【TODO】需要增加getMoreSelection的逻辑\n\n\t      this.bubbleColor.show({\n\t        left: left,\n\t        top: top,\n\t        $color: this\n\t      });\n\t    }\n\t  }]);\n\n\t  return Color;\n\t}(MenuBase);\n\n\tvar BubbleColor = /*#__PURE__*/function () {\n\t  function BubbleColor($cherry) {\n\t    _classCallCheck(this, BubbleColor);\n\n\t    _defineProperty(this, \"colorStack\", ['#000000', '#444444', '#666666', '#999999', '#cccccc', '#eeeeee', '#f3f3f3', '#ffffff', '#ff0000', '#ff9900', '#ffff00', '#00ff00', '#00ffff', '#0000ff', '#9900ff', '#ff00ff', '#f4cccc', '#fce5cd', '#fff2cc', '#d9ead3', '#d0e0e3', '#cfe2f3', '#d9d2e9', '#ead1dc', '#ea9999', '#f9cb9c', '#ffe599', '#b6d7a8', '#a2c4c9', '#9fc5e8', '#b4a7d6', '#d5a6bd', '#e06666', '#f6b26b', '#ffd966', '#93c47d', '#76a5af', '#6fa8dc', '#8e7cc3', '#c27ba0', '#cc0000', '#e69138', '#f1c232', '#6aa84f', '#45818e', '#3d85c6', '#674ea7', '#a64d79', '#990000', '#b45f06', '#bf9000', '#38761d', '#134f5c', '#0b5394', '#351c75', '#741b47', '#660000', '#783f04', '#7f6000', '#274e13', '#0c343d', '#073763', '#20124d', '#4c1130']);\n\n\t    this.editor = $cherry.editor;\n\t    this.init();\n\t    this.initAction();\n\t  }\n\t  /**\n\t   * 定义调色盘每个色块的颜色值\n\t   */\n\n\n\t  _createClass(BubbleColor, [{\n\t    key: \"setSelection\",\n\t    value:\n\t    /**\n\t     * 用来暂存选中的内容\n\t     * @param {string} selection 编辑区选中的文本内容\n\t     */\n\t    function setSelection(selection) {\n\t      this.selection = selection;\n\t    }\n\t  }, {\n\t    key: \"getFontColorDom\",\n\t    value: function getFontColorDom(title) {\n\t      var _context6, _context9;\n\n\t      var colorStackDOM = map$3(_context6 = this.colorStack).call(_context6, function (color) {\n\t        var _context7, _context8;\n\n\t        return concat$5(_context7 = concat$5(_context8 = \"<span class=\\\"cherry-color-item cherry-color-item__\".concat(color.replace('#', ''), \"\\\" unselectable=\\\"on\\\" data-val=\\\"\")).call(_context8, color, \"\\\"\\n                  style=\\\"background-color:\")).call(_context7, color, \"\\\"></span>\");\n\t      }).join('');\n\n\t      return concat$5(_context9 = \"<h3>\".concat(title, \"</h3>\")).call(_context9, colorStackDOM);\n\t    }\n\t  }, {\n\t    key: \"getDom\",\n\t    value: function getDom() {\n\t      var $colorWrap = document.createElement('div');\n\t      $colorWrap.classList.add('cherry-color-wrap');\n\t      $colorWrap.classList.add('cherry-dropdown');\n\t      var $textWrap = document.createElement('div');\n\t      $textWrap.classList.add('cherry-color-text');\n\t      $textWrap.innerHTML = this.getFontColorDom('文本颜色');\n\t      $colorWrap.appendChild($textWrap);\n\t      var $bgWrap = document.createElement('div');\n\t      $bgWrap.classList.add('cherry-color-bg');\n\t      $bgWrap.innerHTML = this.getFontColorDom('背景颜色');\n\t      $colorWrap.appendChild($bgWrap);\n\t      return $colorWrap;\n\t    }\n\t  }, {\n\t    key: \"init\",\n\t    value: function init() {\n\t      this.dom = this.getDom();\n\t      this.editor.options.wrapperDom.appendChild(this.dom);\n\t    }\n\t  }, {\n\t    key: \"onClick\",\n\t    value: function onClick() {\n\t      var _context11;\n\n\t      if (this.type === 'text') {\n\t        var _context10;\n\n\t        if (/^!!#\\S+ [\\s\\S]+?!!/.test(this.selection)) {\n\t          return this.selection.replace(/^!!#\\S+ ([\\s\\S]+?)!!/, \"!!\".concat(this.colorValue, \" $1!!\"));\n\t        }\n\n\t        return concat$5(_context10 = \"!!\".concat(this.colorValue, \" \")).call(_context10, this.selection, \"!!\");\n\t      }\n\n\t      if (/^!!!#\\S+ [\\s\\S]+?!!!/.test(this.selection)) {\n\t        return this.selection.replace(/^!!!#\\S+ ([\\s\\S]+?)!!!/, \"!!!\".concat(this.colorValue, \" $1!!!\"));\n\t      }\n\n\t      return concat$5(_context11 = \"!!!\".concat(this.colorValue, \" \")).call(_context11, this.selection, \"!!!\");\n\t    }\n\t  }, {\n\t    key: \"initAction\",\n\t    value: function initAction() {\n\t      var _this3 = this;\n\n\t      // const self = this;\n\t      this.dom.addEventListener('click', function (evt) {\n\t        var target =\n\t        /** @type {MouseEvent & {target:HTMLElement}}*/\n\t        evt.target;\n\t        _this3.colorValue = target.getAttribute('data-val');\n\n\t        if (!_this3.colorValue) {\n\t          return false;\n\t        }\n\n\t        _this3.type = target.closest('.cherry-color-text') ? 'text' : 'bg';\n\n\t        _this3.$color.setCacheOnce({\n\t          type: _this3.type,\n\t          color: _this3.colorValue\n\t        });\n\n\t        _this3.$color.fire(null);\n\t      }, false);\n\t      this.dom.addEventListener('EditorHideToolbarSubMenu', function () {\n\t        if (_this3.dom.style.display !== 'none') {\n\t          _this3.dom.style.display = 'none';\n\t        }\n\t      });\n\t    }\n\t    /**\n\t     * 在对应的坐标展示调色盘\n\t     * @param {Object} 坐标\n\t     */\n\n\t  }, {\n\t    key: \"show\",\n\t    value: function show(_ref) {\n\t      var left = _ref.left,\n\t          top = _ref.top,\n\t          $color = _ref.$color;\n\t      this.dom.style.left = \"\".concat(left, \"px\");\n\t      this.dom.style.top = \"\".concat(top, \"px\");\n\t      this.dom.style.display = 'block';\n\t      this.$color = $color;\n\t    }\n\t  }]);\n\n\t  return BubbleColor;\n\t}();\n\n\tfunction _createSuper$G(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$G(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = construct$4(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\n\tfunction _isNativeReflectConstruct$G() { if (typeof Reflect === \"undefined\" || !construct$4) return false; if (construct$4.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(construct$4(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\t/**\n\t * 插入1级~5级标题\n\t */\n\n\tvar Header$1 = /*#__PURE__*/function (_MenuBase) {\n\t  _inherits(Header, _MenuBase);\n\n\t  var _super = _createSuper$G(Header);\n\n\t  function Header($cherry) {\n\t    var _context, _context2, _context3, _context4, _context5;\n\n\t    var _this;\n\n\t    _classCallCheck(this, Header);\n\n\t    _this = _super.call(this, $cherry);\n\n\t    _this.setName('header', 'header');\n\n\t    _this.subMenuConfig = [{\n\t      iconName: 'h1',\n\t      name: 'h1',\n\t      onclick: bind$5(_context = _this.bindSubClick).call(_context, _assertThisInitialized(_this), '1')\n\t    }, {\n\t      iconName: 'h2',\n\t      name: 'h2',\n\t      onclick: bind$5(_context2 = _this.bindSubClick).call(_context2, _assertThisInitialized(_this), '2')\n\t    }, {\n\t      iconName: 'h3',\n\t      name: 'h3',\n\t      onclick: bind$5(_context3 = _this.bindSubClick).call(_context3, _assertThisInitialized(_this), '3')\n\t    }, {\n\t      iconName: 'h4',\n\t      name: 'h4',\n\t      onclick: bind$5(_context4 = _this.bindSubClick).call(_context4, _assertThisInitialized(_this), '4')\n\t    }, {\n\t      iconName: 'h5',\n\t      name: 'h5',\n\t      onclick: bind$5(_context5 = _this.bindSubClick).call(_context5, _assertThisInitialized(_this), '5')\n\t    }];\n\t    return _this;\n\t  }\n\n\t  _createClass(Header, [{\n\t    key: \"getSubMenuConfig\",\n\t    value: function getSubMenuConfig() {\n\t      return this.subMenuConfig;\n\t    }\n\t    /**\n\t     * 解析快捷键，判断插入的标题级别\n\t     * @param {string} shortKey 快捷键\n\t     * @returns\n\t     */\n\n\t  }, {\n\t    key: \"$getFlagStr\",\n\t    value: function $getFlagStr(shortKey) {\n\t      var _context6;\n\n\t      var test = +(typeof shortKey === 'string' ? shortKey.replace(/[^0-9]+([0-9])/g, '$1') : shortKey);\n\t      return repeat$3(_context6 = '#').call(_context6, test ? test : 1);\n\t    }\n\t  }, {\n\t    key: \"$testIsHead\",\n\t    value: function $testIsHead(selection) {\n\t      return /^\\s*(#+)\\s*.+/.test(selection);\n\t    }\n\t    /**\n\t     * 响应点击事件\n\t     * @param {string} selection 被用户选中的文本内容\n\t     * @param {string} shortKey 快捷键参数\n\t     * @returns {string} 回填到编辑器光标位置/选中文本区域的内容\n\t     */\n\n\t  }, {\n\t    key: \"onClick\",\n\t    value: function onClick(selection) {\n\t      var _this2 = this;\n\n\t      var shortKey = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';\n\t      var $selection = getSelection(this.editor.editor, selection, 'line', true) || this.locale.header;\n\t      var header = this.$getFlagStr(shortKey);\n\n\t      if (!this.isSelections && !this.$testIsHead($selection)) {\n\t        this.getMoreSelection('\\n', '', function () {\n\t          var newSelection = _this2.editor.editor.getSelection();\n\n\t          var isHead = _this2.$testIsHead(newSelection);\n\n\t          if (isHead) {\n\t            $selection = newSelection;\n\t          }\n\n\t          return isHead;\n\t        });\n\t      }\n\n\t      if (this.$testIsHead($selection)) {\n\t        // 如果选中的内容里有标题语法，并且标记级别与目标一致，则去掉标题语法\n\t        // 反之，修改标题级别与目标一致\n\t        var needClean = true;\n\t        var tmp = $selection.replace(/(^\\s*)(#+)(\\s*)(.+$)/gm, function (w, m1, m2, m3, m4) {\n\t          var _context7, _context8, _context9;\n\n\t          needClean = needClean ? m2.length === header.length : false;\n\t          return concat$5(_context7 = concat$5(_context8 = concat$5(_context9 = \"\".concat(m1)).call(_context9, header)).call(_context8, m3)).call(_context7, m4);\n\t        });\n\n\t        if (needClean) {\n\t          return $selection.replace(/(^\\s*)(#+)(\\s*)(.+$)/gm, '$1$4');\n\t        }\n\n\t        this.registerAfterClickCb(function () {\n\t          _this2.setLessSelection(\"\".concat(header, \" \"), '');\n\t        });\n\t        return tmp;\n\t      }\n\n\t      this.registerAfterClickCb(function () {\n\t        _this2.setLessSelection(\"\".concat(header, \" \"), '');\n\t      });\n\t      return $selection.replace(/(^)([\\s]*)([^\\n]+)($)/gm, \"$1\".concat(header, \" $3$4\"));\n\t    }\n\t    /**\n\t     * 获得监听的快捷键\n\t     * 在windows下是Ctrl+1，在mac下是cmd+1\n\t     */\n\n\t  }, {\n\t    key: \"shortcutKeys\",\n\t    get: function get() {\n\t      return ['Ctrl-1', 'Ctrl-2', 'Ctrl-3', 'Ctrl-4', 'Ctrl-5', 'Ctrl-6'];\n\t    }\n\t  }]);\n\n\t  return Header;\n\t}(MenuBase);\n\n\t/**\n\t * Copyright (C) 2021 THL A29 Limited, a Tencent company.\n\t *\n\t * Licensed under the Apache License, Version 2.0 (the \"License\");\n\t * you may not use this file except in compliance with the License.\n\t * You may obtain a copy of the License at\n\t *\n\t *     http://www.apache.org/licenses/LICENSE-2.0\n\t *\n\t * Unless required by applicable law or agreed to in writing, software\n\t * distributed under the License is distributed on an \"AS IS\" BASIS,\n\t * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n\t * See the License for the specific language governing permissions and\n\t * limitations under the License.\n\t */\n\tvar createTableItem = function createTableItem(dataset, className) {\n\t  var _context;\n\n\t  var dom = document.createElement('td');\n\t  dom.className = className || 'table-item';\n\n\t  forEach$3(_context = keys$3(dataset)).call(_context, function (prop) {\n\t    dom.dataset[prop] = dataset[prop];\n\t  });\n\n\t  return dom;\n\t};\n\t/**\n\t * 插入表格的辅助面板\n\t */\n\n\n\tvar BubbleTableMenu = /*#__PURE__*/function () {\n\t  function BubbleTableMenu(_ref, className) {\n\t    var row = _ref.row,\n\t        col = _ref.col;\n\n\t    _classCallCheck(this, BubbleTableMenu);\n\n\t    this.init(row, col, className);\n\t    this.initEventListeners();\n\n\t    this.afterClick = function () {};\n\t  }\n\n\t  _createClass(BubbleTableMenu, [{\n\t    key: \"init\",\n\t    value: function init(row, col, className) {\n\t      var _this = this;\n\n\t      var container = document.createElement('table');\n\t      var cellArr = [];\n\t      var classNames = ['cherry-insert-table-menu', 'cherry-dropdown'];\n\t      container.className = classNames.join(' ');\n\n\t      for (var r = 1; r <= row; r++) {\n\t        var rowContainer = document.createElement('tr');\n\t        rowContainer.className = 'cherry-insert-table-menu-row';\n\t        cellArr[r - 1] = [];\n\n\t        for (var c = 1; c <= col; c++) {\n\t          var cell = createTableItem({\n\t            row: r,\n\t            col: c\n\t          }, 'cherry-insert-table-menu-item');\n\t          rowContainer.appendChild(cell);\n\t          cellArr[r - 1][c - 1] = cell;\n\t        }\n\n\t        container.appendChild(rowContainer);\n\t      }\n\n\t      container.style.display = 'none';\n\t      container.addEventListener('EditorHideToolbarSubMenu', function () {\n\t        _this.hide();\n\t      });\n\t      this.dom = container;\n\t      this.cell = cellArr;\n\t      this.maxRow = row;\n\t      this.maxCol = col;\n\t      this.activeRow = 0;\n\t      this.activeCol = 0;\n\t      return this.dom;\n\t    }\n\t  }, {\n\t    key: \"initEventListeners\",\n\t    value: function initEventListeners() {\n\t      var _context2, _context3;\n\n\t      this.dom.addEventListener('mousemove', bind$5(_context2 = this.handleMouseMove).call(_context2, this), false); // 不能用click\n\n\t      this.dom.addEventListener('mouseup', bind$5(_context3 = this.handleMouseUp).call(_context3, this));\n\t    }\n\t  }, {\n\t    key: \"setActiveCell\",\n\t    value: function setActiveCell(row, col) {\n\t      if (this.activeRow === row && this.activeCol === col) {\n\t        return;\n\t      }\n\n\t      var minRow = Math.min(this.activeRow, row);\n\t      var maxRow = Math.max(this.activeRow, row);\n\n\t      if (minRow !== maxRow) {\n\t        // 先清空或按照历史列数增减active类\n\t        for (var r = maxRow; r > minRow; r--) {\n\t          for (var c = 1; c <= this.activeCol; c++) {\n\t            this.cell[r - 1][c - 1].classList.toggle('active');\n\t          }\n\t        }\n\t      }\n\n\t      var minCol = Math.min(this.activeCol, col);\n\t      var maxCol = Math.max(this.activeCol, col);\n\n\t      if (minCol !== maxCol) {\n\t        for (var _c = maxCol; _c > minCol; _c--) {\n\t          for (var _r = 1; _r <= row; _r++) {\n\t            this.cell[_r - 1][_c - 1].classList.toggle('active');\n\t          }\n\t        }\n\t      }\n\n\t      this.activeRow = row;\n\t      this.activeCol = col;\n\t    }\n\t  }, {\n\t    key: \"handleMouseMove\",\n\t    value: function handleMouseMove(event) {\n\t      var target = event.target;\n\n\t      if (target === this.dom) {\n\t        return;\n\t      }\n\n\t      if (!target.classList.contains('cherry-insert-table-menu-item')) {\n\t        target = target.querySelector('.cherry-insert-table-menu-item');\n\t      }\n\n\t      if (!target) {\n\t        return;\n\t      }\n\n\t      this.setActiveCell(target.dataset.row, target.dataset.col);\n\t    }\n\t  }, {\n\t    key: \"handleMouseUp\",\n\t    value: function handleMouseUp(event) {\n\t      var target = event.target;\n\n\t      if (target === this.dom) {\n\t        this.afterClick(this.activeRow, this.activeCol);\n\t        this.hide();\n\t        return;\n\t      }\n\n\t      if (!target.classList.contains('cherry-insert-table-menu-item')) {\n\t        target = target.querySelector('.cherry-insert-table-menu-item');\n\t      }\n\n\t      if (!target) {\n\t        this.afterClick(this.activeRow, this.activeCol);\n\t        this.hide();\n\t        return;\n\t      } // 正中单元格时才使用target的dataset\n\n\n\t      this.afterClick(this.activeRow, this.activeCol);\n\t      this.hide();\n\t    }\n\t  }, {\n\t    key: \"show\",\n\t    value: function show(callback) {\n\t      this.dom.style.display = 'block';\n\t      this.afterClick = callback;\n\t    }\n\t  }, {\n\t    key: \"hide\",\n\t    value: function hide() {\n\t      this.dom.style.display = 'none'; // reset active status\n\n\t      for (var r = 0; r < this.maxRow; r++) {\n\t        for (var c = 0; c < this.maxCol; c++) {\n\t          this.cell[r][c].classList.remove('active');\n\t        }\n\t      }\n\n\t      this.activeRow = 0;\n\t      this.activeCol = 0;\n\t    }\n\t  }]);\n\n\t  return BubbleTableMenu;\n\t}();\n\n\tfunction _createSuper$H(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$H(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = construct$4(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\n\tfunction _isNativeReflectConstruct$H() { if (typeof Reflect === \"undefined\" || !construct$4) return false; if (construct$4.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(construct$4(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\t/**\n\t * \"插入\"按钮\n\t */\n\n\tvar Insert = /*#__PURE__*/function (_MenuBase) {\n\t  _inherits(Insert, _MenuBase);\n\n\t  var _super = _createSuper$H(Insert);\n\n\t  // TODO: 需要优化参数传入方式\n\t  function Insert($cherry) {\n\t    var _this;\n\n\t    _classCallCheck(this, Insert);\n\n\t    _this = _super.call(this, $cherry);\n\n\t    _this.setName('insert', 'insert');\n\n\t    _this.noIcon = true;\n\t    _this.subBubbleTableMenu = new BubbleTableMenu({\n\t      row: 9,\n\t      col: 9\n\t    });\n\t    $cherry.editor.options.wrapperDom.appendChild(_this.subBubbleTableMenu.dom);\n\t    return _this;\n\t  }\n\t  /**\n\t   * 上传文件的逻辑\n\t   * @param {string} type 上传文件的类型\n\t   */\n\n\n\t  _createClass(Insert, [{\n\t    key: \"handleUpload\",\n\t    value: function handleUpload() {\n\t      var _this2 = this;\n\n\t      var type = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'image';\n\t      // type为上传文件类型 image|video|audio|pdf|word\n\t      var input = document.createElement('input');\n\t      input.type = 'file';\n\t      input.id = 'fileUpload';\n\t      input.value = '';\n\t      input.style.display = 'none'; // document.body.appendChild(input);\n\n\t      input.addEventListener('change', function (event) {\n\t        // @ts-ignore\n\t        var _event$target$files = _slicedToArray(event.target.files, 1),\n\t            file = _event$target$files[0]; // 文件上传后的回调函数可以由调用方自己实现\n\n\n\t        _this2.$cherry.options.fileUpload(file, function (url) {\n\t          // 文件上传的默认回调行数，调用方可以完全不使用该函数\n\t          if (typeof url !== 'string' || !url) {\n\t            return;\n\t          }\n\n\t          var code = '';\n\n\t          if (type === 'image') {\n\t            var _context;\n\n\t            // 如果是图片，则返回固定的图片markdown源码\n\t            code = concat$5(_context = \"![\".concat(file.name, \"](\")).call(_context, url, \")\");\n\t          } else if (type === 'video') {\n\t            var _context2;\n\n\t            // 如果是视频，则返回固定的视频markdown源码\n\t            code = concat$5(_context2 = \"!video[\".concat(file.name, \"](\")).call(_context2, url, \")\");\n\t          } else if (type === 'audio') {\n\t            var _context3;\n\n\t            // 如果是音频，则返回固定的音频markdown源码\n\t            code = concat$5(_context3 = \"!audio[\".concat(file.name, \"](\")).call(_context3, url, \")\");\n\t          } else {\n\t            var _context4;\n\n\t            // 默认返回超链接\n\t            code = concat$5(_context4 = \"[\".concat(file.name, \"](\")).call(_context4, url, \")\");\n\t          } // 替换选中区域\n\t          // @ts-ignore\n\n\n\t          _this2.$cherry.$cherry.doc.replaceSelection(code);\n\t        });\n\t      });\n\t      input.click();\n\t    }\n\t    /**\n\t     * 响应点击事件\n\t     * @param {string} selection 被用户选中的文本内容\n\t     * @param {string} shortKey 快捷键参数\n\t     * @param {Function} [callback] 回调函数\n\t     * @returns {string} 回填到编辑器光标位置/选中文本区域的内容\n\t     */\n\n\t  }, {\n\t    key: \"onClick\",\n\t    value: function onClick(selection) {\n\t      var _context11, _context18, _context19, _context25, _context26;\n\n\t      var shortKey = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';\n\t      var callback = arguments.length > 2 ? arguments[2] : undefined;\n\n\t      if (/normal-table/.test(shortKey)) {\n\t        var _context5, _context6, _context7, _context8, _context9, _context10;\n\n\t        // 如果是插入markdown标准表格\n\t        // 根据shortKey获取想插入表格的行号和列号\n\t        // shortKey形如：`normal-table-2*4`，表示插入2行(包含表头是3行)4列的表格\n\t        var rowAndCol = shortKey.match(/([0-9]+)[^0-9]([0-9]+)/);\n\t        var row = rowAndCol ? +rowAndCol[1] : 3;\n\t        var col = rowAndCol ? +rowAndCol[2] : 5;\n\n\t        var headerText = repeat$3(_context5 = ' Header |').call(_context5, col);\n\n\t        var controlText = repeat$3(_context6 = ' ------ |').call(_context6, col);\n\n\t        var rowText = \"\\n|\".concat(repeat$3(_context7 = ' Sample |').call(_context7, col));\n\n\t        var text = concat$5(_context8 = concat$5(_context9 = concat$5(_context10 = \"\".concat(selection, \"\\n\\n|\")).call(_context10, headerText, \"\\n|\")).call(_context9, controlText)).call(_context8, repeat$3(rowText).call(rowText, row), \"\\n\\n\");\n\n\t        return text;\n\t      }\n\n\t      var $selection = getSelection(this.editor.editor, selection);\n\n\t      switch (shortKey) {\n\t        case 'hr':\n\t          // 插入分割线\n\t          return \"\".concat(selection, \"\\n\\n---\\n\");\n\n\t        case 'br':\n\t          // 插入换行，在cherry里约定一个回车是一个换行，两个连续回车是一个空行，三个及以上连续回车是两个空行\n\t          return \"\".concat(selection, \"<br>\");\n\n\t        case 'code':\n\t          // 插入代码块\n\t          return \"\\n``` \\n\".concat(selection ? selection : 'code...', \"\\n```\\n\");\n\n\t        case 'formula':\n\t          // 插入行内公式\n\t          return \"\".concat(selection, \"\\n\\n$ e=mc^2 $\\n\\n\");\n\n\t        case 'checklist':\n\t          // 插入检查项\n\t          return \"\".concat(selection, \"\\n\\n- [x] Item 1\\n- [ ] Item 2\\n- [ ] Item 3\\n\");\n\n\t        case 'toc':\n\t          // 插入目录\n\t          return \"\".concat(selection, \"\\n\\n[[toc]]\\n\");\n\n\t        case 'link':\n\t          // 插入超链接\n\t          return concat$5(_context11 = \"\".concat(selection, \"[\")).call(_context11, this.locale.link, \"](http://url.com) \");\n\n\t        case 'image':\n\t          // 插入图片，调用上传文件逻辑\n\t          this.handleUpload('image');\n\t          return selection;\n\n\t        case 'video':\n\t          // 插入视频，调用上传文件逻辑\n\t          this.handleUpload('video');\n\t          return selection;\n\n\t        case 'audio':\n\t          // 插入音频，调用上传文件逻辑\n\t          this.handleUpload('audio');\n\t          return selection;\n\n\t        case 'table':\n\t          // 插入表格，会出现一个二维面板，用户可以通过点击决定插入表格的行号和列号\n\t          // TODO: 菜单定位方式调整，空行判断\n\t          this.subBubbleTableMenu.dom.style.left = this.subMenu.dom.style.left;\n\t          this.subBubbleTableMenu.dom.style.top = this.subMenu.dom.style.top;\n\t          this.subBubbleTableMenu.show(function (row, col) {\n\t            var _context12, _context13, _context14, _context15, _context16, _context17;\n\n\t            var headerText = repeat$3(_context12 = ' Header |').call(_context12, col);\n\n\t            var controlText = repeat$3(_context13 = ' ------ |').call(_context13, col);\n\n\t            var rowText = \"\\n|\".concat(repeat$3(_context14 = ' Sample |').call(_context14, col));\n\n\t            var text = concat$5(_context15 = concat$5(_context16 = concat$5(_context17 = \"\".concat(selection, \"\\n\\n|\")).call(_context17, headerText, \"\\n|\")).call(_context16, controlText)).call(_context15, repeat$3(rowText).call(rowText, row), \"\\n\\n\");\n\n\t            callback(text);\n\t          });\n\t          return;\n\n\t        case 'line-table':\n\t          // 插入带折线图的表格\n\t          return concat$5(_context18 = \"\".concat(selection, \"\\n\\n\")).call(_context18, ['| :line: {x,y} | a | b | c |', '| :-: | :-: | :-: | :-: |', '| x | 1 | 2 | 3 |', '| y | 2 | 4 | 6 |', '| z | 7 | 5 | 3 |'].join('\\n'), \"\\n\\n\");\n\n\t        case 'bar-table':\n\t          // 插入带柱状图的表格\n\t          return concat$5(_context19 = \"\".concat(selection, \"\\n\\n\")).call(_context19, ['| :bar: {x,y} | a | b | c |', '| :-: | :-: | :-: | :-: |', '| x | 1 | 2 | 3 |', '| y | 2 | 4 | 6 |', '| z | 7 | 5 | 3 |'].join('\\n'), \"\\n\\n\");\n\n\t        case 'headlessTable':\n\t          // 插入没有表头的表格\n\t          // 该表格语法是源于[TAPD](https://tapd.cn) wiki应用里的一种表格语法\n\t          // 该表格语法不是markdown通用语法，请慎用\n\t          // TODO: 菜单定位方式调整, 空行判断\n\t          this.subBubbleTableMenu.dom.style.left = this.subMenu.dom.style.left;\n\t          this.subBubbleTableMenu.dom.style.top = this.subMenu.dom.style.top;\n\t          this.subBubbleTableMenu.show(function (row, col) {\n\t            var _context20, _context21, _context22, _context23, _context24;\n\n\t            var text = concat$5(_context20 = concat$5(_context21 = \"\".concat(selection, \"\\n\\n||\")).call(_context21, repeat$3(_context22 = ' ~Header ||').call(_context22, col))).call(_context20, repeat$3(_context23 = \"\\n||\".concat(repeat$3(_context24 = ' SampleT ||').call(_context24, col))).call(_context23, row - 1), \"\\n\\n\");\n\n\t            callback(text);\n\t          });\n\t          return;\n\n\t        case 'pdf':\n\t          // 插入pdf文件，调用上传文件逻辑\n\t          this.handleUpload('pdf');\n\t          return selection;\n\n\t        case 'word':\n\t          // 插入word，调用上传文件逻辑\n\t          // 可以在文件上传逻辑里做处理，word上传后通过后台服务转成html再返回，前端接受后进行处理并回填\n\t          this.handleUpload('word');\n\t          return selection;\n\n\t        case 'ruby':\n\t          // 如果选中的文本中已经有ruby语法了，则去掉该语法\n\t          if (/^\\s*\\{[\\s\\S]+\\|[\\s\\S]+\\}/.test($selection)) {\n\t            return $selection.replace(/^\\s*\\{\\s*([\\s\\S]+?)\\s*\\|[\\s\\S]+\\}\\s*/gm, '$1');\n\t          }\n\n\t          return concat$5(_context25 = \" { \".concat($selection, \" | \")).call(_context25, trim$3(_context26 = this.editor.$cherry.options.callback.changeString2Pinyin($selection)).call(_context26), \" } \");\n\t      }\n\t    }\n\t  }]);\n\n\t  return Insert;\n\t}(MenuBase);\n\n\tfunction _createSuper$I(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$I(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = construct$4(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\n\tfunction _isNativeReflectConstruct$I() { if (typeof Reflect === \"undefined\" || !construct$4) return false; if (construct$4.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(construct$4(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\t/**\n\t * 插入有序/无序/checklist列表的按钮\n\t */\n\n\tvar List$1 = /*#__PURE__*/function (_MenuBase) {\n\t  _inherits(List, _MenuBase);\n\n\t  var _super = _createSuper$I(List);\n\n\t  function List($cherry) {\n\t    var _context, _context2, _context3;\n\n\t    var _this;\n\n\t    _classCallCheck(this, List);\n\n\t    _this = _super.call(this, $cherry);\n\n\t    _this.setName('list', 'list');\n\n\t    _this.subMenuConfig = [{\n\t      iconName: 'ol',\n\t      name: 'ol',\n\t      onclick: bind$5(_context = _this.bindSubClick).call(_context, _assertThisInitialized(_this), '1')\n\t    }, {\n\t      iconName: 'ul',\n\t      name: 'ul',\n\t      onclick: bind$5(_context2 = _this.bindSubClick).call(_context2, _assertThisInitialized(_this), '2')\n\t    }, {\n\t      iconName: 'checklist',\n\t      name: 'checklist',\n\t      onclick: bind$5(_context3 = _this.bindSubClick).call(_context3, _assertThisInitialized(_this), '3')\n\t    }];\n\t    return _this;\n\t  }\n\n\t  _createClass(List, [{\n\t    key: \"getSubMenuConfig\",\n\t    value: function getSubMenuConfig() {\n\t      return this.subMenuConfig;\n\t    }\n\t    /**\n\t     * 响应点击事件\n\t     * @param {string} selection 编辑区选中的文本内容\n\t     * @param {string} shortKey 快捷键：ol 有序列表，ul 无序列表，checklist 检查项\n\t     * @returns 对应markdown的源码\n\t     */\n\n\t  }, {\n\t    key: \"onClick\",\n\t    value: function onClick(selection) {\n\t      var shortKey = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';\n\t      var listType = [null, 'ol', 'ul', 'checklist']; // 下标1, 2, 3生效\n\n\t      var $selection = getSelection(this.editor.editor, selection, 'line', true);\n\n\t      var _$selection$match = $selection.match(/^\\n*/),\n\t          _$selection$match2 = _slicedToArray(_$selection$match, 1),\n\t          before = _$selection$match2[0];\n\n\t      var _$selection$match3 = $selection.match(/\\n*$/),\n\t          _$selection$match4 = _slicedToArray(_$selection$match3, 1),\n\t          after = _$selection$match4[0];\n\n\t      if (listType[shortKey] !== null) {\n\t        var _context4, _context5;\n\n\t        return concat$5(_context4 = concat$5(_context5 = \"\".concat(before)).call(_context5, getListFromStr($selection, listType[shortKey]))).call(_context4, after);\n\t      }\n\n\t      return $selection;\n\t    }\n\t  }]);\n\n\t  return List;\n\t}(MenuBase);\n\n\tfunction _createSuper$J(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$J(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = construct$4(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\n\tfunction _isNativeReflectConstruct$J() { if (typeof Reflect === \"undefined\" || !construct$4) return false; if (construct$4.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(construct$4(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\t/**\n\t * 下标的按钮\n\t **/\n\n\tvar Ol = /*#__PURE__*/function (_MenuBase) {\n\t  _inherits(Ol, _MenuBase);\n\n\t  var _super = _createSuper$J(Ol);\n\n\t  function Ol($cherry) {\n\t    var _this;\n\n\t    _classCallCheck(this, Ol);\n\n\t    _this = _super.call(this, $cherry);\n\n\t    _this.setName('ol', 'ol');\n\n\t    return _this;\n\t  }\n\t  /**\n\t   *\n\t   * @param {string} selection 被用户选中的文本内容\n\t   * @param {string} shortKey 快捷键参数，本函数不处理这个参数\n\t   * @returns {string} 回填到编辑器光标位置/选中文本区域的内容\n\t   */\n\n\n\t  _createClass(Ol, [{\n\t    key: \"onClick\",\n\t    value: function onClick(selection) {\n\t      var _context, _context2;\n\t      var $selection = getSelection(this.editor.editor, selection, 'line', true) || 'Item 1\\n    Item 1.1\\nItem 2';\n\n\t      var _$selection$match = $selection.match(/^\\n*/),\n\t          _$selection$match2 = _slicedToArray(_$selection$match, 1),\n\t          before = _$selection$match2[0];\n\n\t      var _$selection$match3 = $selection.match(/\\n*$/),\n\t          _$selection$match4 = _slicedToArray(_$selection$match3, 1),\n\t          after = _$selection$match4[0];\n\n\t      return concat$5(_context = concat$5(_context2 = \"\".concat(before)).call(_context2, getListFromStr($selection, 'ol'))).call(_context, after);\n\t    }\n\t  }]);\n\n\t  return Ol;\n\t}(MenuBase);\n\n\tfunction _createSuper$K(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$K(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = construct$4(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\n\tfunction _isNativeReflectConstruct$K() { if (typeof Reflect === \"undefined\" || !construct$4) return false; if (construct$4.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(construct$4(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\t/**\n\t * 下标的按钮\n\t **/\n\n\tvar Ul = /*#__PURE__*/function (_MenuBase) {\n\t  _inherits(Ul, _MenuBase);\n\n\t  var _super = _createSuper$K(Ul);\n\n\t  function Ul($cherry) {\n\t    var _this;\n\n\t    _classCallCheck(this, Ul);\n\n\t    _this = _super.call(this, $cherry);\n\n\t    _this.setName('ul', 'ul');\n\n\t    return _this;\n\t  }\n\t  /**\n\t   *\n\t   * @param {string} selection 被用户选中的文本内容\n\t   * @param {string} shortKey 快捷键参数，本函数不处理这个参数\n\t   * @returns {string} 回填到编辑器光标位置/选中文本区域的内容\n\t   */\n\n\n\t  _createClass(Ul, [{\n\t    key: \"onClick\",\n\t    value: function onClick(selection) {\n\t      var _context, _context2;\n\t      var $selection = getSelection(this.editor.editor, selection, 'line', true) || 'Item 1\\n    Item 1.1\\nItem 2';\n\n\t      var _$selection$match = $selection.match(/^\\n*/),\n\t          _$selection$match2 = _slicedToArray(_$selection$match, 1),\n\t          before = _$selection$match2[0];\n\n\t      var _$selection$match3 = $selection.match(/\\n*$/),\n\t          _$selection$match4 = _slicedToArray(_$selection$match3, 1),\n\t          after = _$selection$match4[0];\n\n\t      return concat$5(_context = concat$5(_context2 = \"\".concat(before)).call(_context2, getListFromStr($selection, 'ul'))).call(_context, after);\n\t    }\n\t  }]);\n\n\t  return Ul;\n\t}(MenuBase);\n\n\tfunction _createSuper$L(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$L(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = construct$4(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\n\tfunction _isNativeReflectConstruct$L() { if (typeof Reflect === \"undefined\" || !construct$4) return false; if (construct$4.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(construct$4(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\t/**\n\t * 下标的按钮\n\t **/\n\n\tvar Checklist = /*#__PURE__*/function (_MenuBase) {\n\t  _inherits(Checklist, _MenuBase);\n\n\t  var _super = _createSuper$L(Checklist);\n\n\t  function Checklist($cherry) {\n\t    var _this;\n\n\t    _classCallCheck(this, Checklist);\n\n\t    _this = _super.call(this, $cherry);\n\n\t    _this.setName('checklist', 'checklist');\n\n\t    return _this;\n\t  }\n\t  /**\n\t   *\n\t   * @param {string} selection 被用户选中的文本内容\n\t   * @param {string} shortKey 快捷键参数，本函数不处理这个参数\n\t   * @returns {string} 回填到编辑器光标位置/选中文本区域的内容\n\t   */\n\n\n\t  _createClass(Checklist, [{\n\t    key: \"onClick\",\n\t    value: function onClick(selection) {\n\t      var _context, _context2;\n\t      var $selection = getSelection(this.editor.editor, selection, 'line', true) || 'Item 1\\n    Item 1.1\\nItem 2';\n\n\t      var _$selection$match = $selection.match(/^\\n*/),\n\t          _$selection$match2 = _slicedToArray(_$selection$match, 1),\n\t          before = _$selection$match2[0];\n\n\t      var _$selection$match3 = $selection.match(/\\n*$/),\n\t          _$selection$match4 = _slicedToArray(_$selection$match3, 1),\n\t          after = _$selection$match4[0];\n\n\t      return concat$5(_context = concat$5(_context2 = \"\".concat(before)).call(_context2, getListFromStr($selection, 'checklist'))).call(_context, after);\n\t    }\n\t  }]);\n\n\t  return Checklist;\n\t}(MenuBase);\n\n\tfunction _createSuper$M(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$M(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = construct$4(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\n\tfunction _isNativeReflectConstruct$M() { if (typeof Reflect === \"undefined\" || !construct$4) return false; if (construct$4.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(construct$4(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\n\tfunction generateExample(title, mermaidCode) {\n\t  return [title, '```mermaid', mermaidCode, '```'].join('\\n');\n\t}\n\n\tvar flowChartContent = ['\\tA[公司] -->| 下 班 | B(菜市场)', '\\tB --> C{看见<br>卖西瓜的}', '\\tC -->|Yes| D[买一个包子]', '\\tC -->|No| E[买一斤包子]'].join('\\n');\n\tvar sample = {\n\t  flow: ['FlowChart', generateExample('左右结构', \"graph LR\\n\".concat(flowChartContent)), generateExample('上下结构', \"graph TD\\n\".concat(flowChartContent))].join('\\n'),\n\t  sequence: generateExample('SequenceDiagram', ['sequenceDiagram', 'autonumber', 'A-->A: 文本1', 'A->>B: 文本2', 'loop 循环1', 'loop 循环2', 'A->B: 文本3', 'end', 'loop 循环3', 'B -->>A: 文本4', 'end', 'B -->> B: 文本5', 'end'].join('\\n')),\n\t  state: generateExample('StateDiagram', ['stateDiagram-v2', '[*] --> A', 'A --> B', 'A --> C', 'state A {', '  \\t[*] --> D', '  \\tD --> [*]', '}', 'B --> [*]', 'C --> [*]'].join('\\n')),\n\t  \"class\": generateExample('ClassDiagram', ['classDiagram', 'Base <|-- One', 'Base <|-- Two', 'Base : +String name', 'Base: +getName()', 'Base: +setName(String name)', 'class One{', '  \\t+String newName', '  \\t+getNewName()', '}', 'class Two{', '  \\t-int id', '  \\t-getId()', '}'].join('\\n')),\n\t  pie: generateExample('PieChart', ['pie', 'title 饼图', '\"A\" : 100', '\"B\" : 80', '\"C\" : 40', '\"D\" : 30'].join('\\n')),\n\t  gantt: generateExample('GanttChart', ['gantt', '\\ttitle 敏捷研发流程', '\\tsection 迭代前', '\\t\\t交互设计     :a1, 2020-03-01, 4d', '\\t\\tUI设计        :after a1, 5d', '\\t\\t需求评审     : 1d', '\\tsection 迭代中', '\\t\\t详细设计      :a2, 2020-03-11, 2d', '\\t\\t开发          :2020-03-15, 7d', '\\t\\t测试          :2020-03-22, 5d', '\\tsection 迭代后', '\\t\\t发布: 1d', '\\t\\t验收: 2d', '\\t\\t回顾: 1d'].join('\\n'))\n\t};\n\t/**\n\t * 插入“画图”的按钮\n\t * 本功能依赖[Mermaid.js](https://mermaid-js.github.io)组件，请保证调用CherryMarkdown前已加载mermaid.js组件\n\t */\n\n\tvar Graph = /*#__PURE__*/function (_MenuBase) {\n\t  _inherits(Graph, _MenuBase);\n\n\t  var _super = _createSuper$M(Graph);\n\n\t  function Graph($cherry) {\n\t    var _context, _context2, _context3, _context4, _context5, _context6;\n\n\t    var _this;\n\n\t    _classCallCheck(this, Graph);\n\n\t    _this = _super.call(this, $cherry);\n\n\t    _this.setName('graph', 'insertChart');\n\n\t    _this.noIcon = true;\n\t    _this.subMenuConfig = [// 流程图\n\t    // 访问[Mermaid 流程图](https://mermaid-js.github.io/mermaid/#/flowchart)参考具体使用方法。\n\t    {\n\t      iconName: 'insertFlow',\n\t      name: 'insertFlow',\n\t      onclick: bind$5(_context = _this.bindSubClick).call(_context, _assertThisInitialized(_this), '1')\n\t    }, // 时序图\n\t    // 访问[Mermaid 时序图](https://mermaid-js.github.io/mermaid/#/sequenceDiagram)参考具体使用方法\n\t    {\n\t      iconName: 'insertSeq',\n\t      name: 'insertSeq',\n\t      onclick: bind$5(_context2 = _this.bindSubClick).call(_context2, _assertThisInitialized(_this), '2')\n\t    }, // 状态图\n\t    // 访问[Mermaid 状态图](https://mermaid-js.github.io/mermaid/#/stateDiagram)参考具体使用方法\n\t    {\n\t      iconName: 'insertState',\n\t      name: 'insertState',\n\t      onclick: bind$5(_context3 = _this.bindSubClick).call(_context3, _assertThisInitialized(_this), '3')\n\t    }, // 类图\n\t    // 访问[Mermaid UML图](https://mermaid-js.github.io/mermaid/#/classDiagram)参考具体使用方法\n\t    {\n\t      iconName: 'insertClass',\n\t      name: 'insertClass',\n\t      onclick: bind$5(_context4 = _this.bindSubClick).call(_context4, _assertThisInitialized(_this), '4')\n\t    }, // 饼图\n\t    // 访问[Mermaid 饼图](https://mermaid-js.github.io/mermaid/#/pie)参考具体使用方法\n\t    {\n\t      iconName: 'insertPie',\n\t      name: 'insertPie',\n\t      onclick: bind$5(_context5 = _this.bindSubClick).call(_context5, _assertThisInitialized(_this), '5')\n\t    }, // 甘特图\n\t    {\n\t      iconName: 'insertGantt',\n\t      name: 'insertGantt',\n\t      onclick: bind$5(_context6 = _this.bindSubClick).call(_context6, _assertThisInitialized(_this), '6')\n\t    }];\n\t    return _this;\n\t  }\n\n\t  _createClass(Graph, [{\n\t    key: \"getSubMenuConfig\",\n\t    value: function getSubMenuConfig() {\n\t      return this.subMenuConfig;\n\t    }\n\t    /**\n\t     * 响应点击事件\n\t     * @param {string} selection 被用户选中的文本内容，本函数不处理选中的内容，会直接清空用户选中的内容\n\t     * @param {string} shortKey 快捷键参数\n\t     * @returns {string} 回填到编辑器光标位置/选中文本区域的内容\n\t     */\n\n\t  }, {\n\t    key: \"onClick\",\n\t    value: function onClick(selection) {\n\t      var _this2 = this;\n\n\t      var shortKey = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';\n\t      var shortcut = \"\".concat(shortKey);\n\t      var shortcutKeyMap = [, 'flow', 'sequence', 'state', 'class', 'pie', 'gantt'];\n\t      var selectedExample = shortcutKeyMap[+shortcut];\n\n\t      if (!shortcutKeyMap[+shortcut]) {\n\t        return;\n\t      }\n\n\t      this.registerAfterClickCb(function () {\n\t        _this2.setLessSelection('\\n\\n\\n\\n\\n', '\\n\\n');\n\t      });\n\t      return \"\\n\\n\".concat(this.$getSampleCode(selectedExample), \"\\n\");\n\t    }\n\t    /**\n\t     * 画图的markdown源码模版\n\t     * @param {string} type 画图的类型\n\t     * @returns\n\t     */\n\n\t  }, {\n\t    key: \"$getSampleCode\",\n\t    value: function $getSampleCode(type) {\n\t      return sample[type].replace(/\\t/g, '    ');\n\t    }\n\t  }]);\n\n\t  return Graph;\n\t}(MenuBase);\n\n\tfunction _createSuper$N(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$N(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = construct$4(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\n\tfunction _isNativeReflectConstruct$N() { if (typeof Reflect === \"undefined\" || !construct$4) return false; if (construct$4.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(construct$4(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\n\tvar Size$1 = /*#__PURE__*/function (_MenuBase) {\n\t  _inherits(Size, _MenuBase);\n\n\t  var _super = _createSuper$N(Size);\n\n\t  function Size($cherry) {\n\t    var _context, _context2, _context3, _context4;\n\n\t    var _this;\n\n\t    _classCallCheck(this, Size);\n\n\t    _this = _super.call(this, $cherry);\n\n\t    _this.setName('size', 'size');\n\n\t    _this.subMenuConfig = [{\n\t      name: '小',\n\t      noIcon: true,\n\t      onclick: bind$5(_context = _this.bindSubClick).call(_context, _assertThisInitialized(_this), '12')\n\t    }, {\n\t      name: '中',\n\t      noIcon: true,\n\t      onclick: bind$5(_context2 = _this.bindSubClick).call(_context2, _assertThisInitialized(_this), '17')\n\t    }, {\n\t      name: '大',\n\t      noIcon: true,\n\t      onclick: bind$5(_context3 = _this.bindSubClick).call(_context3, _assertThisInitialized(_this), '24')\n\t    }, {\n\t      name: '特大',\n\t      noIcon: true,\n\t      onclick: bind$5(_context4 = _this.bindSubClick).call(_context4, _assertThisInitialized(_this), '32')\n\t    }];\n\t    _this.shortKeyMap = {\n\t      'Alt-1': '12',\n\t      'Alt-2': '17',\n\t      'Alt-3': '24',\n\t      'Alt-4': '32'\n\t    };\n\t    return _this;\n\t  }\n\n\t  _createClass(Size, [{\n\t    key: \"getSubMenuConfig\",\n\t    value: function getSubMenuConfig() {\n\t      return this.subMenuConfig;\n\t    }\n\t  }, {\n\t    key: \"_getFlagStr\",\n\t    value: function _getFlagStr(shortKey) {\n\t      var test = shortKey.replace(/[^0-9]+([0-9])/g, '$1');\n\t      var header = '#';\n\n\t      for (var i = 1; i < test; i++) {\n\t        header += '#';\n\t      }\n\n\t      return header;\n\t    }\n\t  }, {\n\t    key: \"$testIsSize\",\n\t    value: function $testIsSize(selection) {\n\t      return /^\\s*(![0-9]+) [\\s\\S]+!/.test(selection);\n\t    }\n\t  }, {\n\t    key: \"$getSizeByShortKey\",\n\t    value: function $getSizeByShortKey(shortKey) {\n\t      if (/^[0-9]+$/.test(shortKey)) {\n\t        return shortKey;\n\t      }\n\n\t      return this.shortKeyMap[shortKey] || '17';\n\t    }\n\t  }, {\n\t    key: \"onClick\",\n\t    value: function onClick(selection) {\n\t      var _this2 = this;\n\n\t      var shortKey = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '17';\n\t      var size = this.$getSizeByShortKey(shortKey);\n\t      var $selection = getSelection(this.editor.editor, selection) || '字号'; // 如果选中的内容里有字号语法，则直接去掉该语法\n\n\t      if (!this.isSelections && !this.$testIsSize($selection)) {\n\t        this.getMoreSelection('!32 ', '!', function () {\n\t          var newSelection = _this2.editor.editor.getSelection();\n\n\t          if (_this2.$testIsSize(newSelection)) {\n\t            $selection = newSelection;\n\t            return true;\n\t          }\n\n\t          return false;\n\t        });\n\t      }\n\n\t      if (this.$testIsSize($selection)) {\n\t        // 如果选中的内容里有字号语法，并且字号与目标一致，则去掉字号语法\n\t        // 反之，修改字号与目标一致\n\t        var needClean = true;\n\t        var tmp = $selection.replace(/(^)(\\s*)(![0-9]+)([^\\n]+)(!)(\\s*)($)/gm, function (w, m1, m2, m3, m4, m5, m6, m7) {\n\t          var _context5, _context6, _context7, _context8, _context9, _context10;\n\n\t          needClean = needClean ? m3 === \"!\".concat(size) : false;\n\t          return concat$5(_context5 = concat$5(_context6 = concat$5(_context7 = concat$5(_context8 = concat$5(_context9 = concat$5(_context10 = \"\".concat(m1)).call(_context10, m2, \"!\")).call(_context9, size)).call(_context8, m4)).call(_context7, m5)).call(_context6, m6)).call(_context5, m7);\n\t        });\n\n\t        if (needClean) {\n\t          return $selection.replace(/(^)(\\s*)(![0-9]+\\s*)([^\\n]+)(!)(\\s*)($)/gm, '$1$4$7');\n\t        }\n\n\t        this.registerAfterClickCb(function () {\n\t          _this2.setLessSelection(\"!\".concat(size, \" \"), '!');\n\t        });\n\t        return tmp;\n\t      }\n\n\t      this.registerAfterClickCb(function () {\n\t        _this2.setLessSelection(\"!\".concat(size, \" \"), '!');\n\t      });\n\t      return $selection.replace(/(^)([^\\n]+)($)/gm, \"$1!\".concat(size, \" $2!$3\"));\n\t    }\n\t  }, {\n\t    key: \"shortcutKeys\",\n\t    get: function get() {\n\t      return ['Alt-1', 'Alt-2', 'Alt-3', 'Alt-4'];\n\t    }\n\t  }]);\n\n\t  return Size;\n\t}(MenuBase);\n\n\tfunction _createSuper$O(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$O(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = construct$4(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\n\tfunction _isNativeReflectConstruct$O() { if (typeof Reflect === \"undefined\" || !construct$4) return false; if (construct$4.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(construct$4(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\t/**\n\t * 插入1级标题\n\t */\n\n\tvar H1 = /*#__PURE__*/function (_MenuBase) {\n\t  _inherits(H1, _MenuBase);\n\n\t  var _super = _createSuper$O(H1);\n\n\t  function H1($cherry) {\n\t    var _this;\n\n\t    _classCallCheck(this, H1);\n\n\t    _this = _super.call(this, $cherry);\n\n\t    _this.setName('h1', 'h1');\n\n\t    return _this;\n\t  }\n\n\t  _createClass(H1, [{\n\t    key: \"$testIsHead\",\n\t    value: function $testIsHead(selection) {\n\t      return /^\\s*(#+)\\s*.+/.test(selection);\n\t    }\n\t    /**\n\t     * 响应点击事件\n\t     * @param {string} selection 被用户选中的文本内容\n\t     * @param {string} shortKey 快捷键参数，本函数不处理这个参数\n\t     * @returns {string} 回填到编辑器光标位置/选中文本区域的内容\n\t     */\n\n\t  }, {\n\t    key: \"onClick\",\n\t    value: function onClick(selection) {\n\t      var _this2 = this;\n\t      var $selection = getSelection(this.editor.editor, selection, 'line', true) || this.locale.h1;\n\t      var header = '#';\n\n\t      if (!this.isSelections && !this.$testIsHead($selection)) {\n\t        this.getMoreSelection('\\n', '', function () {\n\t          var newSelection = _this2.editor.editor.getSelection();\n\n\t          var isHead = _this2.$testIsHead(newSelection);\n\n\t          if (isHead) {\n\t            $selection = newSelection;\n\t          }\n\n\t          return isHead;\n\t        });\n\t      }\n\n\t      if (this.$testIsHead($selection)) {\n\t        // 如果选中的内容里有标题语法，并且标记级别与目标一致，则去掉标题语法\n\t        // 反之，修改标题级别与目标一致\n\t        var needClean = true;\n\t        var tmp = $selection.replace(/(^\\s*)(#+)(\\s*)(.+$)/gm, function (w, m1, m2, m3, m4) {\n\t          var _context, _context2, _context3;\n\n\t          needClean = needClean ? m2.length === header.length : false;\n\t          return concat$5(_context = concat$5(_context2 = concat$5(_context3 = \"\".concat(m1)).call(_context3, header)).call(_context2, m3)).call(_context, m4);\n\t        });\n\n\t        if (needClean) {\n\t          return $selection.replace(/(^\\s*)(#+)(\\s*)(.+$)/gm, '$1$4');\n\t        }\n\n\t        this.registerAfterClickCb(function () {\n\t          _this2.setLessSelection(\"\".concat(header, \" \"), '');\n\t        });\n\t        return tmp;\n\t      }\n\n\t      this.registerAfterClickCb(function () {\n\t        _this2.setLessSelection(\"\".concat(header, \" \"), '');\n\t      });\n\t      return $selection.replace(/(^)([\\s]*)([^\\n]+)($)/gm, \"$1\".concat(header, \" $3$4\"));\n\t    }\n\t  }]);\n\n\t  return H1;\n\t}(MenuBase);\n\n\tfunction _createSuper$P(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$P(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = construct$4(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\n\tfunction _isNativeReflectConstruct$P() { if (typeof Reflect === \"undefined\" || !construct$4) return false; if (construct$4.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(construct$4(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\t/**\n\t * 插入2级标题\n\t */\n\n\tvar H2 = /*#__PURE__*/function (_MenuBase) {\n\t  _inherits(H2, _MenuBase);\n\n\t  var _super = _createSuper$P(H2);\n\n\t  function H2($cherry) {\n\t    var _this;\n\n\t    _classCallCheck(this, H2);\n\n\t    _this = _super.call(this, $cherry);\n\n\t    _this.setName('h2', 'h2');\n\n\t    return _this;\n\t  }\n\n\t  _createClass(H2, [{\n\t    key: \"$testIsHead\",\n\t    value: function $testIsHead(selection) {\n\t      return /^\\s*(#+)\\s*.+/.test(selection);\n\t    }\n\t    /**\n\t     * 响应点击事件\n\t     * @param {string} selection 被用户选中的文本内容\n\t     * @param {string} shortKey 快捷键参数，本函数不处理这个参数\n\t     * @returns {string} 回填到编辑器光标位置/选中文本区域的内容\n\t     */\n\n\t  }, {\n\t    key: \"onClick\",\n\t    value: function onClick(selection) {\n\t      var _this2 = this;\n\t      var $selection = getSelection(this.editor.editor, selection, 'line', true) || this.locale.h2;\n\t      var header = '##';\n\n\t      if (!this.isSelections && !this.$testIsHead($selection)) {\n\t        this.getMoreSelection('\\n', '', function () {\n\t          var newSelection = _this2.editor.editor.getSelection();\n\n\t          var isHead = _this2.$testIsHead(newSelection);\n\n\t          if (isHead) {\n\t            $selection = newSelection;\n\t          }\n\n\t          return isHead;\n\t        });\n\t      }\n\n\t      if (this.$testIsHead($selection)) {\n\t        // 如果选中的内容里有标题语法，并且标记级别与目标一致，则去掉标题语法\n\t        // 反之，修改标题级别与目标一致\n\t        var needClean = true;\n\t        var tmp = $selection.replace(/(^\\s*)(#+)(\\s*)(.+$)/gm, function (w, m1, m2, m3, m4) {\n\t          var _context, _context2, _context3;\n\n\t          needClean = needClean ? m2.length === header.length : false;\n\t          return concat$5(_context = concat$5(_context2 = concat$5(_context3 = \"\".concat(m1)).call(_context3, header)).call(_context2, m3)).call(_context, m4);\n\t        });\n\n\t        if (needClean) {\n\t          return $selection.replace(/(^\\s*)(#+)(\\s*)(.+$)/gm, '$1$4');\n\t        }\n\n\t        this.registerAfterClickCb(function () {\n\t          _this2.setLessSelection(\"\".concat(header, \" \"), '');\n\t        });\n\t        return tmp;\n\t      }\n\n\t      this.registerAfterClickCb(function () {\n\t        _this2.setLessSelection(\"\".concat(header, \" \"), '');\n\t      });\n\t      return $selection.replace(/(^)([\\s]*)([^\\n]+)($)/gm, \"$1\".concat(header, \" $3$4\"));\n\t    }\n\t  }]);\n\n\t  return H2;\n\t}(MenuBase);\n\n\tfunction _createSuper$Q(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$Q(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = construct$4(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\n\tfunction _isNativeReflectConstruct$Q() { if (typeof Reflect === \"undefined\" || !construct$4) return false; if (construct$4.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(construct$4(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\t/**\n\t * 插入3级标题\n\t */\n\n\tvar H3 = /*#__PURE__*/function (_MenuBase) {\n\t  _inherits(H3, _MenuBase);\n\n\t  var _super = _createSuper$Q(H3);\n\n\t  function H3($cherry) {\n\t    var _this;\n\n\t    _classCallCheck(this, H3);\n\n\t    _this = _super.call(this, $cherry);\n\n\t    _this.setName('h3', 'h3');\n\n\t    return _this;\n\t  }\n\n\t  _createClass(H3, [{\n\t    key: \"$testIsHead\",\n\t    value: function $testIsHead(selection) {\n\t      return /^\\s*(#+)\\s*.+/.test(selection);\n\t    }\n\t    /**\n\t     * 响应点击事件\n\t     * @param {string} selection 被用户选中的文本内容\n\t     * @param {string} shortKey 快捷键参数，本函数不处理这个参数\n\t     * @returns {string} 回填到编辑器光标位置/选中文本区域的内容\n\t     */\n\n\t  }, {\n\t    key: \"onClick\",\n\t    value: function onClick(selection) {\n\t      var _this2 = this;\n\t      var $selection = getSelection(this.editor.editor, selection, 'line', true) || this.locale.h3;\n\t      var header = '###';\n\n\t      if (!this.isSelections && !this.$testIsHead($selection)) {\n\t        this.getMoreSelection('\\n', '', function () {\n\t          var newSelection = _this2.editor.editor.getSelection();\n\n\t          var isHead = _this2.$testIsHead(newSelection);\n\n\t          if (isHead) {\n\t            $selection = newSelection;\n\t          }\n\n\t          return isHead;\n\t        });\n\t      }\n\n\t      if (this.$testIsHead($selection)) {\n\t        // 如果选中的内容里有标题语法，并且标记级别与目标一致，则去掉标题语法\n\t        // 反之，修改标题级别与目标一致\n\t        var needClean = true;\n\t        var tmp = $selection.replace(/(^\\s*)(#+)(\\s*)(.+$)/gm, function (w, m1, m2, m3, m4) {\n\t          var _context, _context2, _context3;\n\n\t          needClean = needClean ? m2.length === header.length : false;\n\t          return concat$5(_context = concat$5(_context2 = concat$5(_context3 = \"\".concat(m1)).call(_context3, header)).call(_context2, m3)).call(_context, m4);\n\t        });\n\n\t        if (needClean) {\n\t          return $selection.replace(/(^\\s*)(#+)(\\s*)(.+$)/gm, '$1$4');\n\t        }\n\n\t        this.registerAfterClickCb(function () {\n\t          _this2.setLessSelection(\"\".concat(header, \" \"), '');\n\t        });\n\t        return tmp;\n\t      }\n\n\t      this.registerAfterClickCb(function () {\n\t        _this2.setLessSelection(\"\".concat(header, \" \"), '');\n\t      });\n\t      return $selection.replace(/(^)([\\s]*)([^\\n]+)($)/gm, \"$1\".concat(header, \" $3$4\"));\n\t    }\n\t  }]);\n\n\t  return H3;\n\t}(MenuBase);\n\n\tfunction _createSuper$R(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$R(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = construct$4(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\n\tfunction _isNativeReflectConstruct$R() { if (typeof Reflect === \"undefined\" || !construct$4) return false; if (construct$4.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(construct$4(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\t/**\n\t * 插入“引用”的按钮\n\t */\n\n\tvar Quote = /*#__PURE__*/function (_MenuBase) {\n\t  _inherits(Quote, _MenuBase);\n\n\t  var _super = _createSuper$R(Quote);\n\n\t  function Quote($cherry) {\n\t    var _this;\n\n\t    _classCallCheck(this, Quote);\n\n\t    _this = _super.call(this, $cherry);\n\n\t    _this.setName('quote', 'blockquote');\n\n\t    return _this;\n\t  }\n\t  /**\n\t   * click handler\n\t   * @param {string} selection selection in editor\n\t   * @returns\n\t   */\n\n\n\t  _createClass(Quote, [{\n\t    key: \"onClick\",\n\t    value: function onClick(selection) {\n\t      var _context,\n\t          _this2 = this;\n\n\t      var $selection = getSelection(this.editor.editor, selection, 'line', true) || this.locale.quote;\n\n\t      var isWrapped = every$3(_context = $selection.split('\\n')).call(_context, function (text) {\n\t        return /^\\s*>[^\\n]+$/.exec(text);\n\t      });\n\n\t      if (isWrapped) {\n\t        // 去掉>号\n\t        return $selection.replace(/(^\\s*)>\\s*([^\\n]+)($)/gm, '$1$2$3').replace(/\\n+$/, '\\n\\n');\n\t      }\n\n\t      this.registerAfterClickCb(function () {\n\t        _this2.setLessSelection('> ', '');\n\t      }); // 给每一行增加>号\n\n\t      return $selection.replace(/(^)([^\\n]+)($)/gm, '$1> $2$3').replace(/\\n+$/, '\\n\\n');\n\t    }\n\t  }]);\n\n\t  return Quote;\n\t}(MenuBase);\n\n\tfunction _createSuper$S(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$S(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = construct$4(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\n\tfunction _isNativeReflectConstruct$S() { if (typeof Reflect === \"undefined\" || !construct$4) return false; if (construct$4.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(construct$4(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\t/**\n\t * 插入“简单表格”的按钮\n\t * 所谓简单表格，是源于[TAPD](https://tapd.cn) wiki应用里的一种表格语法\n\t * 该表格语法不是markdown通用语法，请慎用\n\t */\n\n\tvar QuickTable = /*#__PURE__*/function (_MenuBase) {\n\t  _inherits(QuickTable, _MenuBase);\n\n\t  var _super = _createSuper$S(QuickTable);\n\n\t  function QuickTable($cherry) {\n\t    var _this;\n\n\t    _classCallCheck(this, QuickTable);\n\n\t    _this = _super.call(this, $cherry);\n\n\t    _this.setName('quickTable', 'table');\n\n\t    return _this;\n\t  }\n\t  /**\n\t   * 响应点击事件\n\t   * @param {string} selection 编辑器里选中的内容\n\t   * @param {string} shortKey 本函数不处理快捷键\n\t   * @returns\n\t   */\n\n\n\t  _createClass(QuickTable, [{\n\t    key: \"onClick\",\n\t    value: function onClick(selection) {\n\t      // TODO：可以尝试解析下selection里的内容，按\\s、\\t区分列，按\\n区分行\n\t      return \"\".concat(selection, \"| LeftAlignedCol | CenterAlignedCol | RightAlignedCol |\\n\") + '| :--- | :---: | ---: |\\n' + '| sampleText | sampleText | sampleText |\\n' + '| **left**Text | centered Text | *right*Text |\\n';\n\t    }\n\t  }]);\n\n\t  return QuickTable;\n\t}(MenuBase);\n\n\tfunction _createSuper$T(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$T(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = construct$4(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\n\tfunction _isNativeReflectConstruct$T() { if (typeof Reflect === \"undefined\" || !construct$4) return false; if (construct$4.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(construct$4(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\t/**\n\t * 关闭/展示预览区域的按钮\n\t */\n\n\tvar TogglePreview = /*#__PURE__*/function (_MenuBase) {\n\t  _inherits(TogglePreview, _MenuBase);\n\n\t  var _super = _createSuper$T(TogglePreview);\n\n\t  /** @type {boolean} 当前预览状态 */\n\t  function TogglePreview($cherry) {\n\t    var _this;\n\n\t    _classCallCheck(this, TogglePreview);\n\n\t    _this = _super.call(this, $cherry);\n\n\t    _defineProperty(_assertThisInitialized(_this), \"$previewerHidden\", false);\n\n\t    _this.setName('previewClose', 'previewClose');\n\n\t    _this.instanceId = $cherry.instanceId;\n\t    _this.updateMarkdown = false;\n\n\t    _this.attachEventListeners();\n\n\t    return _this;\n\t  }\n\t  /**\n\t   * 绑定预览事件\n\t   */\n\n\n\t  _createClass(TogglePreview, [{\n\t    key: \"attachEventListeners\",\n\t    value: function attachEventListeners() {\n\t      var _this2 = this;\n\n\t      Event$1.on(this.instanceId, Event$1.Events.previewerClose, function () {\n\t        _this2.isHidden = true;\n\t      });\n\t      Event$1.on(this.instanceId, Event$1.Events.previewerOpen, function () {\n\t        _this2.isHidden = false;\n\t      });\n\t    }\n\t  }, {\n\t    key: \"isHidden\",\n\t    get: function get() {\n\t      return this.$previewerHidden;\n\t    },\n\t    set: function set(state) {\n\t      // 节流\n\t      if (state === this.$previewerHidden) {\n\t        return;\n\t      }\n\n\t      var icon = this.dom.querySelector('i'); // 隐藏预览，按钮状态为打开预览\n\n\t      if (state) {\n\t        icon.classList.toggle('ch-icon-previewClose', false);\n\t        icon.classList.toggle('ch-icon-preview', true);\n\t        icon.title = this.locale.togglePreview;\n\t      } else {\n\t        icon.classList.toggle('ch-icon-previewClose', true);\n\t        icon.classList.toggle('ch-icon-preview', false);\n\t        icon.title = this.locale.previewClose;\n\t      }\n\n\t      this.$previewerHidden = state;\n\t    }\n\t    /**\n\t     * 响应点击事件\n\t     */\n\n\t  }, {\n\t    key: \"onClick\",\n\t    value: function onClick() {\n\t      if (this.editor.previewer.isPreviewerHidden()) {\n\t        this.editor.previewer.recoverPreviewer(true);\n\t        this.isHidden = false;\n\t      } else {\n\t        this.editor.previewer.editOnly(true);\n\t        this.isHidden = true;\n\t      }\n\t    }\n\t  }]);\n\n\t  return TogglePreview;\n\t}(MenuBase);\n\n\tfunction _createSuper$U(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$U(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = construct$4(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\n\tfunction _isNativeReflectConstruct$U() { if (typeof Reflect === \"undefined\" || !construct$4) return false; if (construct$4.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(construct$4(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\t/**\n\t * 全屏按钮\n\t */\n\n\tvar FullScreen = /*#__PURE__*/function (_MenuBase) {\n\t  _inherits(FullScreen, _MenuBase);\n\n\t  var _super = _createSuper$U(FullScreen);\n\n\t  function FullScreen($cherry) {\n\t    var _this;\n\n\t    _classCallCheck(this, FullScreen);\n\n\t    _this = _super.call(this, $cherry);\n\t    _this.updateMarkdown = false;\n\n\t    _this.setName('fullScreen', 'fullscreen');\n\n\t    return _this;\n\t  }\n\t  /**\n\t   * 响应点击事件\n\t   */\n\n\n\t  _createClass(FullScreen, [{\n\t    key: \"onClick\",\n\t    value: function onClick() {\n\t      var cherryClass = this.editor.options.editorDom.parentElement.classList;\n\t      var cherryToolbarFullscreen = document.querySelector('.cherry-toolbar-fullscreen');\n\n\t      while (cherryToolbarFullscreen.firstChild) {\n\t        // 循环删除父元素下的第一个子元素，直到父元素下没有子元素\n\t        cherryToolbarFullscreen.removeChild(cherryToolbarFullscreen.firstChild);\n\t      }\n\n\t      if (cherryClass.contains('fullscreen')) {\n\t        var fullScreen = createElement('i', 'ch-icon ch-icon-fullscreen');\n\t        cherryToolbarFullscreen.appendChild(fullScreen);\n\t        cherryClass.remove('fullscreen');\n\t      } else {\n\t        var minScreen = createElement('i', 'ch-icon ch-icon-minscreen');\n\t        cherryToolbarFullscreen.appendChild(minScreen);\n\t        cherryClass.add('fullscreen');\n\t      }\n\n\t      this.editor.editor.refresh();\n\t    }\n\t  }]);\n\n\t  return FullScreen;\n\t}(MenuBase);\n\n\tfunction _createSuper$V(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$V(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = construct$4(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\n\tfunction _isNativeReflectConstruct$V() { if (typeof Reflect === \"undefined\" || !construct$4) return false; if (construct$4.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(construct$4(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\t/**\n\t * 撤销回退按钮，点击后触发编辑器的undo操作\n\t * 依赖codemirror的undo接口\n\t **/\n\n\tvar Undo = /*#__PURE__*/function (_MenuBase) {\n\t  _inherits(Undo, _MenuBase);\n\n\t  var _super = _createSuper$V(Undo);\n\n\t  function Undo($cherry) {\n\t    var _this;\n\n\t    _classCallCheck(this, Undo);\n\n\t    _this = _super.call(this, $cherry);\n\n\t    _this.setName('undo', 'undo');\n\n\t    return _this;\n\t  }\n\n\t  _createClass(Undo, [{\n\t    key: \"onClick\",\n\t    value: function onClick() {\n\t      this.editor.editor.undo();\n\t    }\n\t  }]);\n\n\t  return Undo;\n\t}(MenuBase);\n\n\tfunction _createSuper$W(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$W(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = construct$4(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\n\tfunction _isNativeReflectConstruct$W() { if (typeof Reflect === \"undefined\" || !construct$4) return false; if (construct$4.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(construct$4(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\t/**\n\t * 撤销/重做 里的“重做”按键\n\t * 依赖codemirror的undo接口\n\t */\n\n\tvar Redo = /*#__PURE__*/function (_MenuBase) {\n\t  _inherits(Redo, _MenuBase);\n\n\t  var _super = _createSuper$W(Redo);\n\n\t  function Redo($cherry) {\n\t    var _this;\n\n\t    _classCallCheck(this, Redo);\n\n\t    _this = _super.call(this, $cherry);\n\n\t    _this.setName('redo', 'redo');\n\n\t    return _this;\n\t  }\n\t  /**\n\t   * 直接调用codemirror的redo方法就好了\n\t   */\n\n\n\t  _createClass(Redo, [{\n\t    key: \"onClick\",\n\t    value: function onClick() {\n\t      this.editor.editor.redo();\n\t    }\n\t  }]);\n\n\t  return Redo;\n\t}(MenuBase);\n\n\tfunction _createSuper$X(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$X(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = construct$4(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\n\tfunction _isNativeReflectConstruct$X() { if (typeof Reflect === \"undefined\" || !construct$4) return false; if (construct$4.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(construct$4(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\t/**\n\t * 插入代码块的按钮\n\t */\n\n\tvar Code = /*#__PURE__*/function (_MenuBase) {\n\t  _inherits(Code, _MenuBase);\n\n\t  var _super = _createSuper$X(Code);\n\n\t  function Code($cherry) {\n\t    var _this;\n\n\t    _classCallCheck(this, Code);\n\n\t    _this = _super.call(this, $cherry);\n\n\t    _this.setName('code', 'code');\n\n\t    return _this;\n\t  }\n\t  /**\n\t   * 响应点击事件\n\t   * @param {string} selection 被用户选中的文本内容\n\t   * @param {string} shortKey 快捷键参数，本函数不处理这个参数\n\t   * @returns {string} 回填到编辑器光标位置/选中文本区域的内容\n\t   */\n\n\n\t  _createClass(Code, [{\n\t    key: \"onClick\",\n\t    value: function onClick(selection) {\n\t      var _this2 = this;\n\t      var code = selection ? selection : 'code...';\n\t      this.registerAfterClickCb(function () {\n\t        _this2.setLessSelection(\"\\n``` \\n\", \"\\n```\\n\");\n\t      });\n\t      return \"\\n``` \\n\".concat(code, \"\\n```\\n\");\n\t    }\n\t    /**\n\t     * 声明绑定的快捷键，快捷键触发onClick\n\t     */\n\n\t  }, {\n\t    key: \"shortcutKeys\",\n\t    get: function get() {\n\t      return ['Ctrl-k'];\n\t    }\n\t  }]);\n\n\t  return Code;\n\t}(MenuBase);\n\n\tfunction _createSuper$Y(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$Y(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = construct$4(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\n\tfunction _isNativeReflectConstruct$Y() { if (typeof Reflect === \"undefined\" || !construct$4) return false; if (construct$4.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(construct$4(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\t/**\n\t * 设置代码块的主题\n\t * 本功能依赖[prism组件](https://github.com/PrismJS/prism)\n\t */\n\n\tvar CodeTheme = /*#__PURE__*/function (_MenuBase) {\n\t  _inherits(CodeTheme, _MenuBase);\n\n\t  var _super = _createSuper$Y(CodeTheme);\n\n\t  function CodeTheme($cherry) {\n\t    var _context, _context2, _context3, _context4, _context5, _context6, _context7, _context8;\n\n\t    var _this;\n\n\t    _classCallCheck(this, CodeTheme);\n\n\t    _this = _super.call(this, $cherry);\n\n\t    _this.setName('codeTheme');\n        _this.iconName = \"code-theme\";\n\n\t    _this.updateMarkdown = false;\n\t    _this.subMenuConfig = [{\n\t      noIcon: true,\n\t      name: 'default',\n\t      onclick: bind$5(_context = _this.bindSubClick).call(_context, _assertThisInitialized(_this), 'default')\n\t    }, {\n\t      noIcon: true,\n\t      name: 'dark',\n\t      onclick: bind$5(_context2 = _this.bindSubClick).call(_context2, _assertThisInitialized(_this), 'dark')\n\t    }, {\n\t      noIcon: true,\n\t      name: 'funky',\n\t      onclick: bind$5(_context3 = _this.bindSubClick).call(_context3, _assertThisInitialized(_this), 'funky')\n\t    }, {\n\t      noIcon: true,\n\t      name: 'okaidia',\n\t      onclick: bind$5(_context4 = _this.bindSubClick).call(_context4, _assertThisInitialized(_this), 'okaidia')\n\t    }, {\n\t      noIcon: true,\n\t      name: 'twilight',\n\t      onclick: bind$5(_context5 = _this.bindSubClick).call(_context5, _assertThisInitialized(_this), 'twilight')\n\t    }, {\n\t      noIcon: true,\n\t      name: 'coy',\n\t      onclick: bind$5(_context6 = _this.bindSubClick).call(_context6, _assertThisInitialized(_this), 'coy')\n\t    }, {\n\t      noIcon: true,\n\t      name: 'solarized light',\n\t      onclick: bind$5(_context7 = _this.bindSubClick).call(_context7, _assertThisInitialized(_this), 'solarized-light')\n\t    }, {\n\t      noIcon: true,\n\t      name: 'tomorrow night',\n\t      onclick: bind$5(_context8 = _this.bindSubClick).call(_context8, _assertThisInitialized(_this), 'tomorrow-night')\n\t    }];\n\t    return _this;\n\t  }\n\t  /**\n\t   * 响应点击事件\n\t   * @param {string} shortKey 快捷键参数，本函数不处理这个参数\n\t   * @param {string} theme 具体的代码块主题\n\t   * @returns 回填到编辑器光标位置/选中文本区域的内容\n\t   */\n\n\n\t  _createClass(CodeTheme, [{\n\t    key: \"onClick\",\n\t    value: function onClick() {\n\t      var theme = arguments.length > 1 ? arguments[1] : undefined;\n\t      document.querySelector('.cherry').setAttribute('data-code-block-theme', theme);\n\t    }\n\t  }]);\n\n\t  return CodeTheme;\n\t}(MenuBase);\n\n\tfunction _createSuper$Z(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$Z(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = construct$4(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\n\tfunction _isNativeReflectConstruct$Z() { if (typeof Reflect === \"undefined\" || !construct$4) return false; if (construct$4.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(construct$4(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\n\tvar Export = /*#__PURE__*/function (_MenuBase) {\n\t  _inherits(Export, _MenuBase);\n\n\t  var _super = _createSuper$Z(Export);\n\n\t  function Export($cherry) {\n\t    var _context, _context2, _context3, _context4;\n\n\t    var _this;\n\n\t    _classCallCheck(this, Export);\n\n\t    _this = _super.call(this, $cherry);\n\n\t    _this.setName('export');\n\n\t    _this.iconName = \"export\";\n\t    _this.updateMarkdown = false;\n\t    _this.subMenuConfig = [{\n\t      noIcon: true,\n\t      name: 'exportToPdf',\n\t      onclick: bind$5(_context = _this.bindSubClick).call(_context, _assertThisInitialized(_this), 'pdf')\n\t    }, {\n\t      noIcon: true,\n\t      name: 'exportScreenshot',\n\t      onclick: bind$5(_context2 = _this.bindSubClick).call(_context2, _assertThisInitialized(_this), 'screenShot')\n\t    }, {\n\t      noIcon: true,\n\t      name: 'exportMarkdownFile',\n\t      onclick: bind$5(_context3 = _this.bindSubClick).call(_context3, _assertThisInitialized(_this), 'markdown')\n\t    }, {\n\t      noIcon: true,\n\t      name: 'exportHTMLFile',\n\t      onclick: bind$5(_context4 = _this.bindSubClick).call(_context4, _assertThisInitialized(_this), 'html')\n\t    }];\n\t    return _this;\n\t  }\n\n\t  _createClass(Export, [{\n\t    key: \"onClick\",\n\t    value: function onClick() {\n\t      var type = arguments.length > 1 ? arguments[1] : undefined;\n\n\t      if (document.querySelector('.cherry-dropdown[name=export]')) {\n\t        /** @type {HTMLElement}*/\n\t        document.querySelector('.cherry-dropdown[name=export]').style.display = 'none';\n\t      } // 强制刷新一下预览区域的内容\n\n\n\t      var previewer = this.$cherry.previewer;\n\t      var html = '';\n\n\t      if (previewer.isPreviewerHidden()) {\n\t        html = previewer.options.previewerCache.html;\n\t      } else {\n\t        html = previewer.getDomContainer().innerHTML;\n\t      } // 需要未加载的图片替换成原始图片\n\n\n\t      html = previewer.lazyLoadImg.changeDataSrc2Src(html);\n\t      previewer.refresh(html);\n\t      previewer[\"export\"](type);\n\t    }\n\t  }]);\n\n\t  return Export;\n\t}(MenuBase);\n\n\tfunction _createSuper$_(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$_(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = construct$4(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\n\tfunction _isNativeReflectConstruct$_() { if (typeof Reflect === \"undefined\" || !construct$4) return false; if (construct$4.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(construct$4(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\t/**\n\t * 设置按钮\n\t */\n\n\tvar Settings = /*#__PURE__*/function (_MenuBase) {\n\t  _inherits(Settings, _MenuBase);\n\n\t  var _super = _createSuper$_(Settings);\n\n\t  /**\n\t   * TODO: 需要优化参数传入方式\n\t   */\n\t  function Settings($cherry) {\n\t    var _this$engine$$cherry$, _context, _context2, _context3;\n\n\t    var _this;\n\n\t    _classCallCheck(this, Settings);\n\n\t    _this = _super.call(this, $cherry);\n\n\t    _this.setName('settings', 'settings');\n\n\t    _this.updateMarkdown = false;\n\t    _this.engine = $cherry.engine;\n\t    var classicBr = testKeyInLocal('classicBr') ? getIsClassicBrFromLocal() : (_this$engine$$cherry$ = _this.engine.$cherry.options.engine.global) === null || _this$engine$$cherry$ === void 0 ? void 0 : _this$engine$$cherry$.classicBr;\n\t    var defaultModel = $cherry.editor.options.defaultModel;\n\t    var classicBrIconName = classicBr ? 'br' : 'normal';\n\t    var classicBrName = classicBr ? 'classicBr' : 'normalBr';\n\t    var previewIcon = defaultModel === 'editOnly' ? 'preview' : 'previewClose';\n\t    var previewName = defaultModel === 'editOnly' ? 'togglePreview' : 'previewClose';\n\t    _this.instanceId = $cherry.instanceId;\n\t    _this.subMenuConfig = [{\n\t      iconName: classicBrIconName,\n\t      name: classicBrName,\n\t      onclick: bind$5(_context = _this.bindSubClick).call(_context, _assertThisInitialized(_this), 'classicBr')\n\t    }, {\n\t      iconName: previewIcon,\n\t      name: previewName,\n\t      onclick: bind$5(_context2 = _this.bindSubClick).call(_context2, _assertThisInitialized(_this), 'previewClose')\n\t    }, {\n\t      iconName: '',\n\t      name: 'hide',\n\t      onclick: bind$5(_context3 = _this.bindSubClick).call(_context3, _assertThisInitialized(_this), 'toggleToolbar')\n\t    }];\n\n\t    _this.attachEventListeners();\n\n\t    _this.shortcutKeyMaps = [{\n\t      shortKey: 'toggleToolbar',\n\t      shortcutKey: 'Ctrl-0'\n\t    }];\n\t    return _this;\n\t  }\n\t  /**\n\t   * 获取子菜单数组\n\t   * @returns {Array} 返回子菜单\n\t   */\n\n\n\t  _createClass(Settings, [{\n\t    key: \"getSubMenuConfig\",\n\t    value: function getSubMenuConfig() {\n\t      return this.subMenuConfig;\n\t    }\n\t    /**\n\t     * 监听快捷键，并触发回调\n\t     * @param {string} shortCut 快捷键\n\t     * @param {string} selection 编辑区选中的内容\n\t     * @param {boolean} [async] 是否异步\n\t     * @param {Function} [callback] 回调函数\n\t     * @returns\n\t     */\n\n\t  }, {\n\t    key: \"bindSubClick\",\n\t    value: function bindSubClick(shortCut, selection, async, callback) {\n\t      if (async) {\n\t        return this.onClick(selection, shortCut, callback);\n\t      }\n\n\t      return this.onClick(selection, shortCut);\n\t    }\n\t    /**\n\t     * 切换预览按钮\n\t     * @param {boolean} isOpen 预览模式是否打开\n\t     */\n\n\t  }, {\n\t    key: \"togglePreviewBtn\",\n\t    value: function togglePreviewBtn(isOpen) {\n\t      var _this2 = this;\n\n\t      var previewIcon = isOpen ? 'previewClose' : 'preview';\n\t      var previewName = isOpen ? 'previewClose' : 'togglePreview';\n\n\t      if (this.subMenu) {\n\t        var dropdown = document.querySelector('.cherry-dropdown[name=\"settings\"]');\n\n\t        if (dropdown) {\n\t          var icon =\n\t          /** @type {HTMLElement} */\n\t          dropdown.querySelector('.ch-icon-previewClose,.ch-icon-preview');\n\t          icon.classList.toggle('ch-icon-previewClose');\n\t          icon.classList.toggle('ch-icon-preview');\n\t          icon.title = this.locale[previewName];\n\t          icon.parentElement.innerHTML = icon.parentElement.innerHTML.replace(/<\\/i>.+$/, \"</i>\".concat(this.locale[previewName]));\n\t        }\n\t      } else {\n\t        var _context4;\n\n\t        this.subMenuConfig = map$3(_context4 = this.subMenuConfig).call(_context4, function (item) {\n\t          if (item.iconName === 'previewClose' || item.iconName === 'preview') {\n\t            var _context5;\n\n\t            return {\n\t              iconName: previewIcon,\n\t              name: previewName,\n\t              onclick: bind$5(_context5 = _this2.bindSubClick).call(_context5, _this2, 'previewClose')\n\t            };\n\t          }\n\n\t          return item;\n\t        });\n\t      }\n\t    }\n\t    /**\n\t     * 绑定预览事件\n\t     */\n\n\t  }, {\n\t    key: \"attachEventListeners\",\n\t    value: function attachEventListeners() {\n\t      var _this3 = this;\n\n\t      Event$1.on(this.instanceId, Event$1.Events.previewerClose, function () {\n\t        _this3.togglePreviewBtn(false);\n\t      });\n\t      Event$1.on(this.instanceId, Event$1.Events.previewerOpen, function () {\n\t        _this3.togglePreviewBtn(true);\n\t      });\n\t    }\n\t    /**\n\t     * 响应点击事件\n\t     * @param {string} selection 编辑区选中的内容\n\t     * @param {string} shortKey 快捷键\n\t     * @param {Function} [callback] 回调函数\n\t     * @returns\n\t     */\n\n\t  }, {\n\t    key: \"onClick\",\n\t    value: function onClick(selection) {\n\t      var shortKey = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';\n\t      // eslint-disable-next-line no-param-reassign\n\t      shortKey = this.matchShortcutKey(shortKey);\n\n\t      if (shortKey === 'classicBr') {\n\t        var _context6;\n\n\t        var targetIsClassicBr = !getIsClassicBrFromLocal();\n\t        saveIsClassicBrToLocal(targetIsClassicBr);\n\t        this.engine.$cherry.options.engine.global.classicBr = targetIsClassicBr;\n\n\t        forEach$3(_context6 = this.engine.hookCenter.hookList.paragraph).call(_context6, function (item) {\n\t          item.classicBr = targetIsClassicBr;\n\t        });\n\n\t        var i = this.$cherry.wrapperDom.querySelector('.cherry-dropdown .ch-icon-normal');\n\t        i = i ? i : this.$cherry.wrapperDom.querySelector('.cherry-dropdown .ch-icon-br');\n\n\t        if (targetIsClassicBr) {\n\t          i.classList.replace('ch-icon-normal', 'ch-icon-br');\n\t          i.parentElement.childNodes[1].textContent = this.locale.classicBr;\n\t        } else {\n\t          i.classList.replace('ch-icon-br', 'ch-icon-normal');\n\t          i.parentElement.childNodes[1].textContent = this.locale.normalBr;\n\t        }\n\n\t        this.engine.$cherry.previewer.update('');\n\t        this.engine.$cherry.initText(this.engine.$cherry.editor.editor);\n\t      } else if (shortKey === 'previewClose') {\n\t        if (this.editor.previewer.isPreviewerHidden()) {\n\t          this.editor.previewer.recoverPreviewer(true);\n\t        } else {\n\t          this.editor.previewer.editOnly(true);\n\t        }\n\t      } else if (shortKey === 'toggleToolbar') {\n\t        this.toggleToolbar();\n\t      }\n\n\t      return selection;\n\t    }\n\t    /**\n\t     * 解析快捷键\n\t     * @param {string} shortcutKey 快捷键\n\t     * @returns\n\t     */\n\n\t  }, {\n\t    key: \"matchShortcutKey\",\n\t    value: function matchShortcutKey(shortcutKey) {\n\t      var _context7;\n\n\t      var shortcutKeyMap = find$3(_context7 = this.shortcutKeyMaps).call(_context7, function (item) {\n\t        return item.shortcutKey === shortcutKey;\n\t      });\n\n\t      return shortcutKeyMap !== undefined ? shortcutKeyMap.shortKey : shortcutKey;\n\t    }\n\t    /**\n\t     * 切换Toolbar显示状态\n\t     */\n\n\t  }, {\n\t    key: \"toggleToolbar\",\n\t    value: function toggleToolbar() {\n\t      var wrapperDom = this.engine.$cherry.wrapperDom;\n\n\t      if (wrapperDom instanceof HTMLDivElement) {\n\t        var _context8;\n\n\t        var toolbarInstanceId = this.engine.$cherry.toolbar.instanceId;\n\n\t        if (indexOf$8(_context8 = wrapperDom.className).call(_context8, 'cherry--no-toolbar') > -1) {\n\t          wrapperDom.classList.remove('cherry--no-toolbar');\n\t          Event$1.emit(toolbarInstanceId, Event$1.Events.toolbarShow);\n\t        } else {\n\t          wrapperDom.classList.add('cherry--no-toolbar');\n\t          Event$1.emit(toolbarInstanceId, Event$1.Events.toolbarHide);\n\t        }\n\t      }\n\t    }\n\t  }, {\n\t    key: \"shortcutKeys\",\n\t    get: function get() {\n\t      var _context9;\n\n\t      return map$3(_context9 = this.shortcutKeyMaps).call(_context9, function (item) {\n\t        return item.shortcutKey;\n\t      });\n\t    }\n\t  }]);\n\n\t  return Settings;\n\t}(MenuBase);\n\n\tfunction _createSuper$$(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$$(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = construct$4(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\n\tfunction _isNativeReflectConstruct$$() { if (typeof Reflect === \"undefined\" || !construct$4) return false; if (construct$4.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(construct$4(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\t/**\n\t * 下划线按钮\n\t **/\n\n\tvar Underline$1 = /*#__PURE__*/function (_MenuBase) {\n\t  _inherits(Underline, _MenuBase);\n\n\t  var _super = _createSuper$$(Underline);\n\n\t  function Underline($cherry) {\n\t    var _this;\n\n\t    _classCallCheck(this, Underline);\n\n\t    _this = _super.call(this, $cherry);\n\n\t    _this.setName('underline', 'underline');\n\n\t    return _this;\n\t  }\n\n\t  _createClass(Underline, [{\n\t    key: \"$testIsUnderline\",\n\t    value: function $testIsUnderline(selection) {\n\t      return /^\\s*(\\/)[\\s\\S]+(\\1)/.test(selection);\n\t    }\n\t    /**\n\t     *\n\t     * @param {string} selection 被用户选中的文本内容\n\t     * @param {string} shortKey 快捷键参数，本函数不处理这个参数\n\t     * @returns {string} 回填到编辑器光标位置/选中文本区域的内容\n\t     */\n\n\t  }, {\n\t    key: \"onClick\",\n\t    value: function onClick(selection) {\n\t      var _this2 = this;\n\t      var $selection = selection ? selection : this.locale.underline; // 如果选中的内容里有下划线语法，则认为是要去掉下划线语法\n\n\t      if (!this.isSelections && !this.$testIsUnderline($selection)) {\n\t        this.getMoreSelection(' /', '/ ', function () {\n\t          var newSelection = _this2.editor.editor.getSelection();\n\n\t          var isUnderline = _this2.$testIsUnderline(newSelection);\n\n\t          if (isUnderline) {\n\t            $selection = newSelection;\n\t          }\n\n\t          return isUnderline;\n\t        });\n\t      }\n\n\t      if (this.$testIsUnderline($selection)) {\n\t        return $selection.replace(/(^)(\\s*)(\\/)([^\\n]+)(\\3)(\\s*)($)/gm, '$1$4$7');\n\t      }\n\n\t      this.registerAfterClickCb(function () {\n\t        _this2.setLessSelection(' /', '/ ');\n\t      }); // 如果选中的内容里没有下划线语法，则加上下划线\n\n\t      return $selection.replace(/(^)([^\\n]+)($)/gm, '$1 /$2/ $3');\n\t    }\n\t    /**\n\t     * 声明绑定的快捷键，快捷键触发onClick\n\t     */\n\n\t  }, {\n\t    key: \"shortcutKeys\",\n\t    get: function get() {\n\t      return ['Ctrl-u'];\n\t    }\n\t  }]);\n\n\t  return Underline;\n\t}(MenuBase);\n\n\tfunction _createSuper$10(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$10(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = construct$4(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\n\tfunction _isNativeReflectConstruct$10() { if (typeof Reflect === \"undefined\" || !construct$4) return false; if (construct$4.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(construct$4(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\t/**\n\t * 切换预览/编辑模式的按钮\n\t * 该按钮不支持切换到双栏编辑模式\n\t * 只能切换成纯编辑模式和纯预览模式\n\t **/\n\n\tvar SwitchModel = /*#__PURE__*/function (_MenuBase) {\n\t  _inherits(SwitchModel, _MenuBase);\n\n\t  var _super = _createSuper$10(SwitchModel);\n\n\t  function SwitchModel($cherry) {\n\t    var _this;\n\n\t    _classCallCheck(this, SwitchModel);\n\n\t    _this = _super.call(this, $cherry);\n\n\t    _this.setName('switchPreview');\n\n\t    _this.instanceId = $cherry.instanceId;\n\n\t    _this.attachEventListeners();\n\n\t    return _this;\n\t  }\n\n\t  _createClass(SwitchModel, [{\n\t    key: \"attachEventListeners\",\n\t    value: function attachEventListeners() {\n\t      var _this2 = this;\n\n\t      Event$1.on(this.instanceId, Event$1.Events.toolbarHide, function () {\n\t        // 当收到工具栏隐藏事件后，修改工具栏的内容为切换到编辑模式的内容\n\t        _this2.dom.textContent = _this2.locale.switchEdit;\n\t      });\n\t      Event$1.on(this.instanceId, Event$1.Events.toolbarShow, function () {\n\t        // 当收到工具栏显示事件后，修改工具栏的内容为切换到预览模式的内容\n\t        _this2.dom.textContent = _this2.locale.switchPreview;\n\t      });\n\t    }\n\t  }, {\n\t    key: \"onClick\",\n\t    value: function onClick() {\n\t      if (this.editor.previewer.isPreviewerHidden()) {\n\t        // 从编辑模式切换到预览模式\n\t        this.editor.previewer.previewOnly();\n\t        var toolbar = this.dom.parentElement.parentElement;\n\t        toolbar.classList.add('preview-only');\n\t        this.dom.textContent = this.locale.switchEdit;\n\t      } else {\n\t        // 从预览模式切换到编辑模式\n\t        this.editor.previewer.editOnly(true);\n\t        var _toolbar = this.dom.parentElement.parentElement;\n\n\t        _toolbar.classList.remove('preview-only');\n\n\t        this.dom.textContent = this.locale.switchPreview;\n\t      }\n\t    }\n\t  }]);\n\n\t  return SwitchModel;\n\t}(MenuBase);\n\n\tfunction _createSuper$11(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$11(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = construct$4(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\n\tfunction _isNativeReflectConstruct$11() { if (typeof Reflect === \"undefined\" || !construct$4) return false; if (construct$4.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(construct$4(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\t/**\n\t * 插入图片\n\t */\n\n\tvar Image$2 = /*#__PURE__*/function (_MenuBase) {\n\t  _inherits(Image, _MenuBase);\n\n\t  var _super = _createSuper$11(Image);\n\n\t  function Image($cherry) {\n\t    var _this;\n\n\t    _classCallCheck(this, Image);\n\n\t    _this = _super.call(this, $cherry);\n\n\t    _this.setName('image', 'image');\n\n\t    return _this;\n\t  }\n\t  /**\n\t   * 响应点击事件\n\t   * @param {string} selection 被用户选中的文本内容\n\t   * @returns {string} 回填到编辑器光标位置/选中文本区域的内容\n\t   */\n\n\n\t  _createClass(Image, [{\n\t    key: \"onClick\",\n\t    value: function onClick(selection) {\n\t      var _this2 = this,\n\t          _this$$cherry$options,\n\t          _this$$cherry$options2,\n\t          _this$$cherry$options3;\n\n\t      if (this.hasCacheOnce()) {\n\t        var _context, _context2;\n\n\t        // @ts-ignore\n\t        var _this$getAndCleanCach = this.getAndCleanCacheOnce(),\n\t            name = _this$getAndCleanCach.name,\n\t            url = _this$getAndCleanCach.url,\n\t            params = _this$getAndCleanCach.params;\n\n\t        var begin = '![';\n\t        var end = \"](\".concat(url, \")\");\n\t        this.registerAfterClickCb(function () {\n\t          _this2.setLessSelection(begin, end);\n\t        });\n\t        var finalName = params.name ? params.name : name;\n\t        return concat$5(_context = concat$5(_context2 = \"\".concat(begin).concat(finalName)).call(_context2, handelParams(params))).call(_context, end);\n\t      }\n\n\t      var accept = (_this$$cherry$options = (_this$$cherry$options2 = this.$cherry.options) === null || _this$$cherry$options2 === void 0 ? void 0 : (_this$$cherry$options3 = _this$$cherry$options2.fileTypeLimitMap) === null || _this$$cherry$options3 === void 0 ? void 0 : _this$$cherry$options3.image) !== null && _this$$cherry$options !== void 0 ? _this$$cherry$options : '*'; // 插入图片，调用上传文件逻辑\n\n\t      handleUpload(this.editor, 'image', accept, function (name, url, params) {\n\t        _this2.setCacheOnce({\n\t          name: name,\n\t          url: url,\n\t          params: params\n\t        });\n\n\t        _this2.fire(null);\n\t      });\n\t      this.updateMarkdown = false;\n\t      return selection;\n\t    }\n\t    /**\n\t     * 声明绑定的快捷键，快捷键触发onClick\n\t     */\n\n\t  }, {\n\t    key: \"shortcutKeys\",\n\t    get: function get() {\n\t      return ['Ctrl-g'];\n\t    }\n\t  }]);\n\n\t  return Image;\n\t}(MenuBase);\n\n\tfunction _createSuper$12(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$12(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = construct$4(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\n\tfunction _isNativeReflectConstruct$12() { if (typeof Reflect === \"undefined\" || !construct$4) return false; if (construct$4.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(construct$4(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\t/**\n\t * 插入音频\n\t */\n\n\tvar Audio = /*#__PURE__*/function (_MenuBase) {\n\t  _inherits(Audio, _MenuBase);\n\n\t  var _super = _createSuper$12(Audio);\n\n\t  function Audio($cherry) {\n\t    var _this;\n\n\t    _classCallCheck(this, Audio);\n\n\t    _this = _super.call(this, $cherry);\n\n\t    _this.setName('audio', 'video');\n\n\t    return _this;\n\t  }\n\t  /**\n\t   * 响应点击事件\n\t   * @param {string} selection 被用户选中的文本内容\n\t   * @returns {string} 回填到编辑器光标位置/选中文本区域的内容\n\t   */\n\n\n\t  _createClass(Audio, [{\n\t    key: \"onClick\",\n\t    value: function onClick(selection) {\n\t      var _this2 = this,\n\t          _this$$cherry$options,\n\t          _this$$cherry$options2,\n\t          _this$$cherry$options3;\n\n\t      if (this.hasCacheOnce()) {\n\t        var _context, _context2;\n\n\t        // @ts-ignore\n\t        var _this$getAndCleanCach = this.getAndCleanCacheOnce(),\n\t            name = _this$getAndCleanCach.name,\n\t            url = _this$getAndCleanCach.url,\n\t            params = _this$getAndCleanCach.params;\n\n\t        var begin = '!audio[';\n\t        var end = \"](\".concat(url, \")\");\n\t        this.registerAfterClickCb(function () {\n\t          _this2.setLessSelection(begin, end);\n\t        });\n\t        var finalName = params.name ? params.name : name;\n\t        return concat$5(_context = concat$5(_context2 = \"\".concat(begin).concat(finalName)).call(_context2, handelParams(params))).call(_context, end);\n\t      }\n\n\t      var accept = (_this$$cherry$options = (_this$$cherry$options2 = this.$cherry.options) === null || _this$$cherry$options2 === void 0 ? void 0 : (_this$$cherry$options3 = _this$$cherry$options2.fileTypeLimitMap) === null || _this$$cherry$options3 === void 0 ? void 0 : _this$$cherry$options3.audio) !== null && _this$$cherry$options !== void 0 ? _this$$cherry$options : '*'; // 插入图片，调用上传文件逻辑\n\n\t      handleUpload(this.editor, 'audio', accept, function (name, url, params) {\n\t        _this2.setCacheOnce({\n\t          name: name,\n\t          url: url,\n\t          params: params\n\t        });\n\n\t        _this2.fire(null);\n\t      });\n\t      this.updateMarkdown = false;\n\t      return selection;\n\t    }\n\t  }]);\n\n\t  return Audio;\n\t}(MenuBase);\n\n\tfunction _createSuper$13(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$13(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = construct$4(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\n\tfunction _isNativeReflectConstruct$13() { if (typeof Reflect === \"undefined\" || !construct$4) return false; if (construct$4.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(construct$4(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\t/**\n\t * 插入视频\n\t */\n\n\tvar Video = /*#__PURE__*/function (_MenuBase) {\n\t  _inherits(Video, _MenuBase);\n\n\t  var _super = _createSuper$13(Video);\n\n\t  function Video($cherry) {\n\t    var _this;\n\n\t    _classCallCheck(this, Video);\n\n\t    _this = _super.call(this, $cherry);\n\n\t    _this.setName('video', 'video');\n\n\t    return _this;\n\t  }\n\t  /**\n\t   * 响应点击事件\n\t   * @param {string} selection 被用户选中的文本内容\n\t   * @returns {string} 回填到编辑器光标位置/选中文本区域的内容\n\t   */\n\n\n\t  _createClass(Video, [{\n\t    key: \"onClick\",\n\t    value: function onClick(selection) {\n\t      var _this2 = this,\n\t          _this$$cherry$options,\n\t          _this$$cherry$options2,\n\t          _this$$cherry$options3;\n\n\t      if (this.hasCacheOnce()) {\n\t        var _context, _context2, _context3;\n\n\t        // @ts-ignore\n\t        var _this$getAndCleanCach = this.getAndCleanCacheOnce(),\n\t            name = _this$getAndCleanCach.name,\n\t            url = _this$getAndCleanCach.url,\n\t            params = _this$getAndCleanCach.params;\n\n\t        var begin = '!video[';\n\t        var end = params.poster ? concat$5(_context = \"](\".concat(url, \"){poster=\")).call(_context, params.poster, \"}\") : \"](\".concat(url, \")\");\n\t        this.registerAfterClickCb(function () {\n\t          _this2.setLessSelection(begin, end);\n\t        });\n\t        var finalName = params.name ? params.name : name;\n\t        return concat$5(_context2 = concat$5(_context3 = \"\".concat(begin).concat(finalName)).call(_context3, handelParams(params))).call(_context2, end);\n\t      }\n\n\t      var accept = (_this$$cherry$options = (_this$$cherry$options2 = this.$cherry.options) === null || _this$$cherry$options2 === void 0 ? void 0 : (_this$$cherry$options3 = _this$$cherry$options2.fileTypeLimitMap) === null || _this$$cherry$options3 === void 0 ? void 0 : _this$$cherry$options3.video) !== null && _this$$cherry$options !== void 0 ? _this$$cherry$options : '*'; // 插入图片，调用上传文件逻辑\n\n\t      handleUpload(this.editor, 'video', accept, function (name, url, params) {\n\t        _this2.setCacheOnce({\n\t          name: name,\n\t          url: url,\n\t          params: params\n\t        });\n\n\t        _this2.fire(null);\n\t      });\n\t      this.updateMarkdown = false;\n\t      return selection;\n\t    }\n\t  }]);\n\n\t  return Video;\n\t}(MenuBase);\n\n\tfunction _createSuper$14(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$14(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = construct$4(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\n\tfunction _isNativeReflectConstruct$14() { if (typeof Reflect === \"undefined\" || !construct$4) return false; if (construct$4.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(construct$4(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\t/**\n\t * 插入换行\n\t */\n\n\tvar Br$1 = /*#__PURE__*/function (_MenuBase) {\n\t  _inherits(Br, _MenuBase);\n\n\t  var _super = _createSuper$14(Br);\n\n\t  function Br($cherry) {\n\t    var _this;\n\n\t    _classCallCheck(this, Br);\n\n\t    _this = _super.call(this, $cherry);\n\n\t    _this.setName('br', 'br');\n\n\t    return _this;\n\t  }\n\t  /**\n\t   * 响应点击事件\n\t   * @param {string} selection 被用户选中的文本内容\n\t   * @returns {string} 回填到编辑器光标位置/选中文本区域的内容\n\t   */\n\n\n\t  _createClass(Br, [{\n\t    key: \"onClick\",\n\t    value: function onClick(selection) {\n\t      return \"\".concat(selection, \"<br>\");\n\t    }\n\t  }]);\n\n\t  return Br;\n\t}(MenuBase);\n\n\tfunction _createSuper$15(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$15(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = construct$4(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\n\tfunction _isNativeReflectConstruct$15() { if (typeof Reflect === \"undefined\" || !construct$4) return false; if (construct$4.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(construct$4(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\t/**\n\t * 插入分割线\n\t */\n\n\tvar Hr$1 = /*#__PURE__*/function (_MenuBase) {\n\t  _inherits(Hr, _MenuBase);\n\n\t  var _super = _createSuper$15(Hr);\n\n\t  function Hr($cherry) {\n\t    var _this;\n\n\t    _classCallCheck(this, Hr);\n\n\t    _this = _super.call(this, $cherry);\n\n\t    _this.setName('hr', 'line');\n\n\t    return _this;\n\t  }\n\t  /**\n\t   * 响应点击事件\n\t   * @param {string} selection 被用户选中的文本内容\n\t   * @returns {string} 回填到编辑器光标位置/选中文本区域的内容\n\t   */\n\n\n\t  _createClass(Hr, [{\n\t    key: \"onClick\",\n\t    value: function onClick(selection) {\n\t      // 插入分割线\n\t      return \"\".concat(selection, \"\\n\\n---\\n\");\n\t    }\n\t  }]);\n\n\t  return Hr;\n\t}(MenuBase);\n\n\tfunction _createSuper$16(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$16(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = construct$4(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\n\tfunction _isNativeReflectConstruct$16() { if (typeof Reflect === \"undefined\" || !construct$4) return false; if (construct$4.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(construct$4(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\t/**\n\t * 插入行内公式\n\t */\n\n\tvar Formula = /*#__PURE__*/function (_MenuBase) {\n\t  _inherits(Formula, _MenuBase);\n\n\t  var _super = _createSuper$16(Formula);\n\n\t  function Formula($cherry) {\n\t    var _this;\n\n\t    _classCallCheck(this, Formula);\n\n\t    _this = _super.call(this, $cherry);\n\n\t    _this.setName('formula', 'insertFormula');\n\n\t    return _this;\n\t  }\n\t  /**\n\t   * 响应点击事件\n\t   * @param {string} selection 被用户选中的文本内容\n\t   * @returns {string} 回填到编辑器光标位置/选中文本区域的内容\n\t   */\n\n\n\t  _createClass(Formula, [{\n\t    key: \"onClick\",\n\t    value: function onClick(selection) {\n\t      var _this2 = this,\n\t          _context;\n\t      var before = \"\".concat(selection, \" $ \");\n\t      var after = ' $ ';\n\t      this.registerAfterClickCb(function () {\n\t        _this2.setLessSelection(before, after);\n\t      }); // 插入行内公式\n\n\t      return concat$5(_context = \"\".concat(before, \"e=mc^2\")).call(_context, after);\n\t    }\n\t    /**\n\t     * 声明绑定的快捷键，快捷键触发onClick\n\t     */\n\n\t  }, {\n\t    key: \"shortcutKeys\",\n\t    get: function get() {\n\t      return ['Ctrl-m'];\n\t    }\n\t  }]);\n\n\t  return Formula;\n\t}(MenuBase);\n\n\tfunction _createSuper$17(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$17(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = construct$4(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\n\tfunction _isNativeReflectConstruct$17() { if (typeof Reflect === \"undefined\" || !construct$4) return false; if (construct$4.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(construct$4(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\t/**\n\t * 插入超链接\n\t */\n\n\tvar Link$1 = /*#__PURE__*/function (_MenuBase) {\n\t  _inherits(Link, _MenuBase);\n\n\t  var _super = _createSuper$17(Link);\n\n\t  function Link($cherry) {\n\t    var _this;\n\n\t    _classCallCheck(this, Link);\n\n\t    _this = _super.call(this, $cherry);\n\n\t    _this.setName('link', 'link');\n\n\t    return _this;\n\t  }\n\t  /**\n\t   * 响应点击事件\n\t   * @param {string} selection 被用户选中的文本内容\n\t   * @returns {string} 回填到编辑器光标位置/选中文本区域的内容\n\t   */\n\n\n\t  _createClass(Link, [{\n\t    key: \"onClick\",\n\t    value: function onClick(selection) {\n\n\t      // 插入图片，调用上传文件逻辑\n\t      if (/^http/.test(selection)) {\n\t        var _context;\n\n\t        return concat$5(_context = \"[\".concat(this.locale.link, \"](\")).call(_context, selection, \")\");\n\t      }\n\n\t      var title = selection ? selection : this.locale.link;\n\t      return \"[\".concat(title, \"](http://url.com) \");\n\t    }\n\t    /**\n\t     * 声明绑定的快捷键，快捷键触发onClick\n\t     */\n\n\t  }, {\n\t    key: \"shortcutKeys\",\n\t    get: function get() {\n\t      return ['Ctrl-l'];\n\t    }\n\t  }]);\n\n\t  return Link;\n\t}(MenuBase);\n\n\tfunction _createSuper$18(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$18(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = construct$4(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\n\tfunction _isNativeReflectConstruct$18() { if (typeof Reflect === \"undefined\" || !construct$4) return false; if (construct$4.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(construct$4(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\t/**\n\t * 插入普通表格\n\t */\n\n\tvar Table$1 = /*#__PURE__*/function (_MenuBase) {\n\t  _inherits(Table, _MenuBase);\n\n\t  var _super = _createSuper$18(Table);\n\n\t  function Table($cherry) {\n\t    var _this;\n\n\t    _classCallCheck(this, Table);\n\n\t    _this = _super.call(this, $cherry);\n\n\t    _this.setName('table', 'table');\n\n\t    _this.subBubbleTableMenu = new BubbleTableMenu({\n\t      row: 9,\n\t      col: 9\n\t    });\n\t    $cherry.editor.options.wrapperDom.appendChild(_this.subBubbleTableMenu.dom);\n\t    _this.catchOnce = '';\n\t    return _this;\n\t  }\n\t  /**\n\t   * 响应点击事件\n\t   * @param {string} selection 被用户选中的文本内容\n\t   * @returns {*} 回填到编辑器光标位置/选中文本区域的内容\n\t   */\n\n\n\t  _createClass(Table, [{\n\t    key: \"onClick\",\n\t    value: function onClick(selection) {\n\t      var _this2 = this;\n\n\t      // 如果二维面板处于隐藏状态，说明是第一次点击\n\t      if (this.subBubbleTableMenu.dom.style.display === 'none' || !this.hasCacheOnce()) {\n\t        // 插入表格，会出现一个二维面板，用户可以通过点击决定插入表格的行号和列号\n\t        var pos = this.dom.getBoundingClientRect();\n\t        this.subBubbleTableMenu.dom.style.left = \"\".concat(pos.left + pos.width, \"px\");\n\t        this.subBubbleTableMenu.dom.style.top = \"\".concat(pos.top + pos.height, \"px\");\n\t        this.subBubbleTableMenu.show(function (row, col) {\n\t          var _context, _context2, _context3, _context4, _context5, _context6;\n\n\t          var headerText = repeat$3(_context = ' Header |').call(_context, col);\n\n\t          var controlText = repeat$3(_context2 = ' ------ |').call(_context2, col);\n\n\t          var rowText = \"\\n|\".concat(repeat$3(_context3 = ' Sample |').call(_context3, col));\n\n\t          var _final = concat$5(_context4 = concat$5(_context5 = concat$5(_context6 = \"\".concat(selection, \"\\n\\n|\")).call(_context6, headerText, \"\\n|\")).call(_context5, controlText)).call(_context4, repeat$3(rowText).call(rowText, row), \"\\n\\n\");\n\n\t          _this2.setCacheOnce(_final);\n\n\t          _this2.fire(null);\n\t        });\n\t        this.updateMarkdown = false;\n\t        return false;\n\t      }\n\n\t      return this.getAndCleanCacheOnce();\n\t    }\n\t  }]);\n\n\t  return Table;\n\t}(MenuBase);\n\n\tfunction _createSuper$19(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$19(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = construct$4(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\n\tfunction _isNativeReflectConstruct$19() { if (typeof Reflect === \"undefined\" || !construct$4) return false; if (construct$4.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(construct$4(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\t/**\n\t * 插入目录\n\t */\n\n\tvar Toc$1 = /*#__PURE__*/function (_MenuBase) {\n\t  _inherits(Toc, _MenuBase);\n\n\t  var _super = _createSuper$19(Toc);\n\n\t  function Toc($cherry) {\n\t    var _this;\n\n\t    _classCallCheck(this, Toc);\n\n\t    _this = _super.call(this, $cherry);\n\n\t    _this.setName('toc', 'toc');\n\n\t    return _this;\n\t  }\n\t  /**\n\t   * 响应点击事件\n\t   * @param {string} selection 被用户选中的文本内容\n\t   * @returns {string} 回填到编辑器光标位置/选中文本区域的内容\n\t   */\n\n\n\t  _createClass(Toc, [{\n\t    key: \"onClick\",\n\t    value: function onClick(selection) {\n\t      // 插入目录\n\t      return \"\".concat(selection, \"\\n\\n[[toc]]\\n\");\n\t    }\n\t  }]);\n\n\t  return Toc;\n\t}(MenuBase);\n\n\tfunction _createSuper$1a(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$1a(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = construct$4(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\n\tfunction _isNativeReflectConstruct$1a() { if (typeof Reflect === \"undefined\" || !construct$4) return false; if (construct$4.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(construct$4(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\t/**\n\t * 插入折线图+表格\n\t */\n\n\tvar LineTable = /*#__PURE__*/function (_MenuBase) {\n\t  _inherits(LineTable, _MenuBase);\n\n\t  var _super = _createSuper$1a(LineTable);\n\n\t  function LineTable($cherry) {\n\t    var _this;\n\n\t    _classCallCheck(this, LineTable);\n\n\t    _this = _super.call(this, $cherry);\n\n\t    _this.setName('lineTable', 'table');\n\n\t    return _this;\n\t  }\n\t  /**\n\t   * 响应点击事件\n\t   * @param {string} selection 被用户选中的文本内容\n\t   * @returns {string} 回填到编辑器光标位置/选中文本区域的内容\n\t   */\n\n\n\t  _createClass(LineTable, [{\n\t    key: \"onClick\",\n\t    value: function onClick(selection) {\n\t      var _context;\n\t      // 插入带折线图的表格\n\t      return concat$5(_context = \"\".concat(selection, \"\\n\\n\")).call(_context, ['| :line: {x,y} | a | b | c |', '| :-: | :-: | :-: | :-: |', '| x | 1 | 2 | 3 |', '| y | 2 | 4 | 6 |', '| z | 7 | 5 | 3 |'].join('\\n'), \"\\n\\n\");\n\t    }\n\t  }]);\n\n\t  return LineTable;\n\t}(MenuBase);\n\n\tfunction _createSuper$1b(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$1b(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = construct$4(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\n\tfunction _isNativeReflectConstruct$1b() { if (typeof Reflect === \"undefined\" || !construct$4) return false; if (construct$4.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(construct$4(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\t/**\n\t * 插入柱状图图+表格\n\t */\n\n\tvar BrTable = /*#__PURE__*/function (_MenuBase) {\n\t  _inherits(BrTable, _MenuBase);\n\n\t  var _super = _createSuper$1b(BrTable);\n\n\t  function BrTable($cherry) {\n\t    var _this;\n\n\t    _classCallCheck(this, BrTable);\n\n\t    _this = _super.call(this, $cherry);\n\n\t    _this.setName('brTable', 'table');\n\n\t    return _this;\n\t  }\n\t  /**\n\t   * 响应点击事件\n\t   * @param {string} selection 被用户选中的文本内容\n\t   * @returns {string} 回填到编辑器光标位置/选中文本区域的内容\n\t   */\n\n\n\t  _createClass(BrTable, [{\n\t    key: \"onClick\",\n\t    value: function onClick(selection) {\n\t      var _context;\n\t      // 插入带折线图的表格\n\t      return concat$5(_context = \"\".concat(selection, \"\\n\\n\")).call(_context, ['| :bar: {x,y} | a | b | c |', '| :-: | :-: | :-: | :-: |', '| x | 1 | 2 | 3 |', '| y | 2 | 4 | 6 |', '| z | 7 | 5 | 3 |'].join('\\n'), \"\\n\\n\");\n\t    }\n\t  }]);\n\n\t  return BrTable;\n\t}(MenuBase);\n\n\tfunction _createSuper$1c(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$1c(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = construct$4(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\n\tfunction _isNativeReflectConstruct$1c() { if (typeof Reflect === \"undefined\" || !construct$4) return false; if (construct$4.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(construct$4(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\t/**\n\t * 插入pdf\n\t */\n\n\tvar Pdf = /*#__PURE__*/function (_MenuBase) {\n\t  _inherits(Pdf, _MenuBase);\n\n\t  var _super = _createSuper$1c(Pdf);\n\n\t  function Pdf($cherry) {\n\t    var _this;\n\n\t    _classCallCheck(this, Pdf);\n\n\t    _this = _super.call(this, $cherry);\n\n\t    _this.setName('pdf', 'pdf');\n\n\t    return _this;\n\t  }\n\t  /**\n\t   * 响应点击事件\n\t   * @param {string} selection 被用户选中的文本内容\n\t   * @returns {string} 回填到编辑器光标位置/选中文本区域的内容\n\t   */\n\n\n\t  _createClass(Pdf, [{\n\t    key: \"onClick\",\n\t    value: function onClick(selection) {\n\t      var _this2 = this,\n\t          _this$$cherry$options,\n\t          _this$$cherry$options2,\n\t          _this$$cherry$options3;\n\n\t      if (this.hasCacheOnce()) {\n\t        var _context;\n\n\t        // @ts-ignore\n\t        var _this$getAndCleanCach = this.getAndCleanCacheOnce(),\n\t            name = _this$getAndCleanCach.name,\n\t            url = _this$getAndCleanCach.url,\n\t            params = _this$getAndCleanCach.params;\n\n\t        var begin = '[';\n\t        var end = \"](\".concat(url, \")\");\n\t        this.registerAfterClickCb(function () {\n\t          _this2.setLessSelection(begin, end);\n\t        });\n\t        var finalName = params.name ? params.name : name;\n\t        return concat$5(_context = \"\".concat(begin).concat(finalName)).call(_context, end);\n\t      }\n\n\t      var accept = (_this$$cherry$options = (_this$$cherry$options2 = this.$cherry.options) === null || _this$$cherry$options2 === void 0 ? void 0 : (_this$$cherry$options3 = _this$$cherry$options2.fileTypeLimitMap) === null || _this$$cherry$options3 === void 0 ? void 0 : _this$$cherry$options3.pdf) !== null && _this$$cherry$options !== void 0 ? _this$$cherry$options : '*'; // 插入图片，调用上传文件逻辑\n\n\t      handleUpload(this.editor, 'pdf', accept, function (name, url, params) {\n\t        _this2.setCacheOnce({\n\t          name: name,\n\t          url: url,\n\t          params: params\n\t        });\n\n\t        _this2.fire(null);\n\t      });\n\t      this.updateMarkdown = false;\n\t      return selection;\n\t    }\n\t  }]);\n\n\t  return Pdf;\n\t}(MenuBase);\n\n\tfunction _createSuper$1d(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$1d(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = construct$4(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\n\tfunction _isNativeReflectConstruct$1d() { if (typeof Reflect === \"undefined\" || !construct$4) return false; if (construct$4.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(construct$4(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\t/**\n\t * 插入pdf\n\t */\n\n\tvar File = /*#__PURE__*/function (_MenuBase) {\n\t  _inherits(File, _MenuBase);\n\n\t  var _super = _createSuper$1d(File);\n\n\t  function File($cherry) {\n\t    var _this;\n\n\t    _classCallCheck(this, File);\n\n\t    _this = _super.call(this, $cherry);\n\n\t    _this.setName('file', 'phone');\n\n\t    return _this;\n\t  }\n\t  /**\n\t   * 响应点击事件\n\t   * @param {string} selection 被用户选中的文本内容\n\t   * @returns {string} 回填到编辑器光标位置/选中文本区域的内容\n\t   */\n\n\n\t  _createClass(File, [{\n\t    key: \"onClick\",\n\t    value: function onClick(selection) {\n\t      var _this2 = this,\n\t          _this$$cherry$options,\n\t          _this$$cherry$options2,\n\t          _this$$cherry$options3;\n\n\t      if (this.hasCacheOnce()) {\n\t        var _context;\n\n\t        // @ts-ignore\n\t        var _this$getAndCleanCach = this.getAndCleanCacheOnce(),\n\t            name = _this$getAndCleanCach.name,\n\t            url = _this$getAndCleanCach.url,\n\t            params = _this$getAndCleanCach.params;\n\n\t        var begin = '[';\n\t        var end = \"](\".concat(url, \")\");\n\t        this.registerAfterClickCb(function () {\n\t          _this2.setLessSelection(begin, end);\n\t        });\n\t        var finalName = params.name ? params.name : name;\n\t        return concat$5(_context = \"\".concat(begin).concat(finalName)).call(_context, end);\n\t      }\n\n\t      var accept = (_this$$cherry$options = (_this$$cherry$options2 = this.$cherry.options) === null || _this$$cherry$options2 === void 0 ? void 0 : (_this$$cherry$options3 = _this$$cherry$options2.fileTypeLimitMap) === null || _this$$cherry$options3 === void 0 ? void 0 : _this$$cherry$options3.file) !== null && _this$$cherry$options !== void 0 ? _this$$cherry$options : '*'; // 插入图片，调用上传文件逻辑\n\n\t      handleUpload(this.editor, 'file', accept, function (name, url, params) {\n\t        _this2.setCacheOnce({\n\t          name: name,\n\t          url: url,\n\t          params: params\n\t        });\n\n\t        _this2.fire(null);\n\t      });\n\t      this.updateMarkdown = false;\n\t      return selection;\n\t    }\n\t  }]);\n\n\t  return File;\n\t}(MenuBase);\n\n\tfunction _createSuper$1e(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$1e(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = construct$4(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\n\tfunction _isNativeReflectConstruct$1e() { if (typeof Reflect === \"undefined\" || !construct$4) return false; if (construct$4.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(construct$4(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\t/**\n\t * 插入word\n\t */\n\n\tvar Word = /*#__PURE__*/function (_MenuBase) {\n\t  _inherits(Word, _MenuBase);\n\n\t  var _super = _createSuper$1e(Word);\n\n\t  function Word($cherry) {\n\t    var _this;\n\n\t    _classCallCheck(this, Word);\n\n\t    _this = _super.call(this, $cherry);\n\n\t    _this.setName('word', 'word');\n\n\t    return _this;\n\t  }\n\t  /**\n\t   * 响应点击事件\n\t   * @param {string} selection 被用户选中的文本内容\n\t   * @returns {string} 回填到编辑器光标位置/选中文本区域的内容\n\t   */\n\n\n\t  _createClass(Word, [{\n\t    key: \"onClick\",\n\t    value: function onClick(selection) {\n\t      var _this2 = this,\n\t          _this$$cherry$options,\n\t          _this$$cherry$options2,\n\t          _this$$cherry$options3;\n\n\t      if (this.hasCacheOnce()) {\n\t        var _context;\n\n\t        // @ts-ignore\n\t        var _this$getAndCleanCach = this.getAndCleanCacheOnce(),\n\t            name = _this$getAndCleanCach.name,\n\t            url = _this$getAndCleanCach.url,\n\t            params = _this$getAndCleanCach.params;\n\n\t        var begin = '[';\n\t        var end = \"](\".concat(url, \")\");\n\t        this.registerAfterClickCb(function () {\n\t          _this2.setLessSelection(begin, end);\n\t        });\n\t        var finalName = params.name ? params.name : name;\n\t        return concat$5(_context = \"\".concat(begin).concat(finalName)).call(_context, end);\n\t      }\n\n\t      var accept = (_this$$cherry$options = (_this$$cherry$options2 = this.$cherry.options) === null || _this$$cherry$options2 === void 0 ? void 0 : (_this$$cherry$options3 = _this$$cherry$options2.fileTypeLimitMap) === null || _this$$cherry$options3 === void 0 ? void 0 : _this$$cherry$options3.word) !== null && _this$$cherry$options !== void 0 ? _this$$cherry$options : '*'; // 插入图片，调用上传文件逻辑\n\n\t      handleUpload(this.editor, 'word', accept, function (name, url, params) {\n\t        _this2.setCacheOnce({\n\t          name: name,\n\t          url: url,\n\t          params: params\n\t        });\n\n\t        _this2.fire(null);\n\t      });\n\t      this.updateMarkdown = false;\n\t      return selection;\n\t    }\n\t  }]);\n\n\t  return Word;\n\t}(MenuBase);\n\n\tfunction _createSuper$1f(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$1f(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = construct$4(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\n\tfunction _isNativeReflectConstruct$1f() { if (typeof Reflect === \"undefined\" || !construct$4) return false; if (construct$4.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(construct$4(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\t/**\n\t * 生成ruby，使用场景：给中文增加拼音、给中文增加英文、给英文增加中文等等\n\t */\n\n\tvar Ruby$1 = /*#__PURE__*/function (_MenuBase) {\n\t  _inherits(Ruby, _MenuBase);\n\n\t  var _super = _createSuper$1f(Ruby);\n\n\t  function Ruby($cherry) {\n\t    var _this;\n\n\t    _classCallCheck(this, Ruby);\n\n\t    _this = _super.call(this, $cherry);\n\n\t    _this.setName('pinyin', 'pinyin');\n\n\t    return _this;\n\t  }\n\n\t  _createClass(Ruby, [{\n\t    key: \"$testIsRuby\",\n\t    value: function $testIsRuby(selection) {\n\t      return /^\\s*\\{[\\s\\S]+\\|[\\s\\S]+\\}/.test(selection);\n\t    }\n\t    /**\n\t     * 响应点击事件\n\t     * @param {string} selection 被用户选中的文本内容\n\t     * @param {string} shortKey 快捷键参数，本函数不处理这个参数\n\t     * @returns {string} 回填到编辑器光标位置/选中文本区域的内容\n\t     */\n\n\t  }, {\n\t    key: \"onClick\",\n\t    value: function onClick(selection) {\n\t      var _this2 = this,\n\t          _context,\n\t          _context2;\n\t      var $selection = getSelection(this.editor.editor, selection) || '拼音'; // 如果选中的文本中已经有ruby语法了，则去掉该语法\n\n\t      if (!this.isSelections && !this.$testIsRuby($selection)) {\n\t        this.getMoreSelection(' { ', ' } ', function () {\n\t          var newSelection = _this2.editor.editor.getSelection();\n\n\t          var isRuby = _this2.$testIsRuby(newSelection);\n\n\t          if (isRuby) {\n\t            $selection = newSelection;\n\t          }\n\n\t          return isRuby;\n\t        });\n\t      }\n\n\t      if (this.$testIsRuby($selection)) {\n\t        return $selection.replace(/^\\s*\\{\\s*([\\s\\S]+?)\\s*\\|[\\s\\S]+\\}\\s*/gm, '$1');\n\t      }\n\n\t      var pinyin = trim$3(_context = this.editor.$cherry.options.callback.changeString2Pinyin($selection) || 'pin yin').call(_context);\n\n\t      this.registerAfterClickCb(function () {\n\t        _this2.setLessSelection(' { ', ' } ');\n\t      });\n\t      return concat$5(_context2 = \" { \".concat($selection, \" | \")).call(_context2, pinyin, \" } \");\n\t    }\n\t  }]);\n\n\t  return Ruby;\n\t}(MenuBase);\n\n\tfunction _createSuper$1g(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$1g(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = construct$4(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\n\tfunction _isNativeReflectConstruct$1g() { if (typeof Reflect === \"undefined\" || !construct$4) return false; if (construct$4.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(construct$4(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\t/**\n\t * 修改主题\n\t */\n\n\tvar Theme = /*#__PURE__*/function (_MenuBase) {\n\t  _inherits(Theme, _MenuBase);\n\n\t  var _super = _createSuper$1g(Theme);\n\n\t  function Theme($cherry) {\n\t    var _context;\n\n\t    var _this;\n\n\t    _classCallCheck(this, Theme);\n\n\t    _this = _super.call(this, $cherry);\n\n\t    _this.setName('theme', 'insertChart');\n\n\t    _this.subMenuConfig = [];\n\n\t    var self = _assertThisInitialized(_this);\n\n\t    forEach$3(_context = $cherry.options.theme).call(_context, function (one) {\n\t      var _context2;\n\n\t      self.subMenuConfig.push({\n\t        iconName: one.className,\n\t        name: one.label,\n\t        onclick: bind$5(_context2 = self.bindSubClick).call(_context2, self, one.className)\n\t      });\n\t    });\n\n\t    return _this;\n\t  }\n\t  /**\n\t   * 响应点击事件\n\t   * @param {string} selection 被用户选中的文本内容\n\t   * @param {string} shortKey 快捷键参数\n\t   * @returns {string} 回填到编辑器光标位置/选中文本区域的内容\n\t   */\n\n\n\t  _createClass(Theme, [{\n\t    key: \"onClick\",\n\t    value: function onClick(selection) {\n\t      var shortKey = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';\n\t      changeTheme(this.$cherry, shortKey);\n\t      this.updateMarkdown = false;\n\t      return '';\n\t    }\n\t  }]);\n\n\t  return Theme;\n\t}(MenuBase);\n\n\tvar bind$a = function bind(fn, thisArg) {\n\t  return function wrap() {\n\t    var args = new Array(arguments.length);\n\t    for (var i = 0; i < args.length; i++) {\n\t      args[i] = arguments[i];\n\t    }\n\t    return fn.apply(thisArg, args);\n\t  };\n\t};\n\n\t// utils is a library of generic helper functions non-specific to axios\n\n\tvar toString$4 = Object.prototype.toString;\n\n\t/**\n\t * Determine if a value is an Array\n\t *\n\t * @param {Object} val The value to test\n\t * @returns {boolean} True if value is an Array, otherwise false\n\t */\n\tfunction isArray$a(val) {\n\t  return Array.isArray(val);\n\t}\n\n\t/**\n\t * Determine if a value is undefined\n\t *\n\t * @param {Object} val The value to test\n\t * @returns {boolean} True if the value is undefined, otherwise false\n\t */\n\tfunction isUndefined(val) {\n\t  return typeof val === 'undefined';\n\t}\n\n\t/**\n\t * Determine if a value is a Buffer\n\t *\n\t * @param {Object} val The value to test\n\t * @returns {boolean} True if value is a Buffer, otherwise false\n\t */\n\tfunction isBuffer$1(val) {\n\t  return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor)\n\t    && typeof val.constructor.isBuffer === 'function' && val.constructor.isBuffer(val);\n\t}\n\n\t/**\n\t * Determine if a value is an ArrayBuffer\n\t *\n\t * @param {Object} val The value to test\n\t * @returns {boolean} True if value is an ArrayBuffer, otherwise false\n\t */\n\tfunction isArrayBuffer(val) {\n\t  return toString$4.call(val) === '[object ArrayBuffer]';\n\t}\n\n\t/**\n\t * Determine if a value is a FormData\n\t *\n\t * @param {Object} val The value to test\n\t * @returns {boolean} True if value is an FormData, otherwise false\n\t */\n\tfunction isFormData(val) {\n\t  return toString$4.call(val) === '[object FormData]';\n\t}\n\n\t/**\n\t * Determine if a value is a view on an ArrayBuffer\n\t *\n\t * @param {Object} val The value to test\n\t * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false\n\t */\n\tfunction isArrayBufferView(val) {\n\t  var result;\n\t  if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) {\n\t    result = ArrayBuffer.isView(val);\n\t  } else {\n\t    result = (val) && (val.buffer) && (isArrayBuffer(val.buffer));\n\t  }\n\t  return result;\n\t}\n\n\t/**\n\t * Determine if a value is a String\n\t *\n\t * @param {Object} val The value to test\n\t * @returns {boolean} True if value is a String, otherwise false\n\t */\n\tfunction isString(val) {\n\t  return typeof val === 'string';\n\t}\n\n\t/**\n\t * Determine if a value is a Number\n\t *\n\t * @param {Object} val The value to test\n\t * @returns {boolean} True if value is a Number, otherwise false\n\t */\n\tfunction isNumber(val) {\n\t  return typeof val === 'number';\n\t}\n\n\t/**\n\t * Determine if a value is an Object\n\t *\n\t * @param {Object} val The value to test\n\t * @returns {boolean} True if value is an Object, otherwise false\n\t */\n\tfunction isObject$3(val) {\n\t  return val !== null && typeof val === 'object';\n\t}\n\n\t/**\n\t * Determine if a value is a plain Object\n\t *\n\t * @param {Object} val The value to test\n\t * @return {boolean} True if value is a plain Object, otherwise false\n\t */\n\tfunction isPlainObject$1(val) {\n\t  if (toString$4.call(val) !== '[object Object]') {\n\t    return false;\n\t  }\n\n\t  var prototype = Object.getPrototypeOf(val);\n\t  return prototype === null || prototype === Object.prototype;\n\t}\n\n\t/**\n\t * Determine if a value is a Date\n\t *\n\t * @param {Object} val The value to test\n\t * @returns {boolean} True if value is a Date, otherwise false\n\t */\n\tfunction isDate(val) {\n\t  return toString$4.call(val) === '[object Date]';\n\t}\n\n\t/**\n\t * Determine if a value is a File\n\t *\n\t * @param {Object} val The value to test\n\t * @returns {boolean} True if value is a File, otherwise false\n\t */\n\tfunction isFile(val) {\n\t  return toString$4.call(val) === '[object File]';\n\t}\n\n\t/**\n\t * Determine if a value is a Blob\n\t *\n\t * @param {Object} val The value to test\n\t * @returns {boolean} True if value is a Blob, otherwise false\n\t */\n\tfunction isBlob(val) {\n\t  return toString$4.call(val) === '[object Blob]';\n\t}\n\n\t/**\n\t * Determine if a value is a Function\n\t *\n\t * @param {Object} val The value to test\n\t * @returns {boolean} True if value is a Function, otherwise false\n\t */\n\tfunction isFunction$1(val) {\n\t  return toString$4.call(val) === '[object Function]';\n\t}\n\n\t/**\n\t * Determine if a value is a Stream\n\t *\n\t * @param {Object} val The value to test\n\t * @returns {boolean} True if value is a Stream, otherwise false\n\t */\n\tfunction isStream(val) {\n\t  return isObject$3(val) && isFunction$1(val.pipe);\n\t}\n\n\t/**\n\t * Determine if a value is a URLSearchParams object\n\t *\n\t * @param {Object} val The value to test\n\t * @returns {boolean} True if value is a URLSearchParams object, otherwise false\n\t */\n\tfunction isURLSearchParams(val) {\n\t  return toString$4.call(val) === '[object URLSearchParams]';\n\t}\n\n\t/**\n\t * Trim excess whitespace off the beginning and end of a string\n\t *\n\t * @param {String} str The String to trim\n\t * @returns {String} The String freed of excess whitespace\n\t */\n\tfunction trim$6(str) {\n\t  return str.trim ? str.trim() : str.replace(/^\\s+|\\s+$/g, '');\n\t}\n\n\t/**\n\t * Determine if we're running in a standard browser environment\n\t *\n\t * This allows axios to run in a web worker, and react-native.\n\t * Both environments support XMLHttpRequest, but not fully standard globals.\n\t *\n\t * web workers:\n\t *  typeof window -> undefined\n\t *  typeof document -> undefined\n\t *\n\t * react-native:\n\t *  navigator.product -> 'ReactNative'\n\t * nativescript\n\t *  navigator.product -> 'NativeScript' or 'NS'\n\t */\n\tfunction isStandardBrowserEnv() {\n\t  if (typeof navigator !== 'undefined' && (navigator.product === 'ReactNative' ||\n\t                                           navigator.product === 'NativeScript' ||\n\t                                           navigator.product === 'NS')) {\n\t    return false;\n\t  }\n\t  return (\n\t    typeof window !== 'undefined' &&\n\t    typeof document !== 'undefined'\n\t  );\n\t}\n\n\t/**\n\t * Iterate over an Array or an Object invoking a function for each item.\n\t *\n\t * If `obj` is an Array callback will be called passing\n\t * the value, index, and complete array for each item.\n\t *\n\t * If 'obj' is an Object callback will be called passing\n\t * the value, key, and complete object for each property.\n\t *\n\t * @param {Object|Array} obj The object to iterate\n\t * @param {Function} fn The callback to invoke for each item\n\t */\n\tfunction forEach$5(obj, fn) {\n\t  // Don't bother if no value provided\n\t  if (obj === null || typeof obj === 'undefined') {\n\t    return;\n\t  }\n\n\t  // Force an array if not already something iterable\n\t  if (typeof obj !== 'object') {\n\t    /*eslint no-param-reassign:0*/\n\t    obj = [obj];\n\t  }\n\n\t  if (isArray$a(obj)) {\n\t    // Iterate over array values\n\t    for (var i = 0, l = obj.length; i < l; i++) {\n\t      fn.call(null, obj[i], i, obj);\n\t    }\n\t  } else {\n\t    // Iterate over object keys\n\t    for (var key in obj) {\n\t      if (Object.prototype.hasOwnProperty.call(obj, key)) {\n\t        fn.call(null, obj[key], key, obj);\n\t      }\n\t    }\n\t  }\n\t}\n\n\t/**\n\t * Accepts varargs expecting each argument to be an object, then\n\t * immutably merges the properties of each object and returns result.\n\t *\n\t * When multiple objects contain the same key the later object in\n\t * the arguments list will take precedence.\n\t *\n\t * Example:\n\t *\n\t * ```js\n\t * var result = merge({foo: 123}, {foo: 456});\n\t * console.log(result.foo); // outputs 456\n\t * ```\n\t *\n\t * @param {Object} obj1 Object to merge\n\t * @returns {Object} Result of all merge properties\n\t */\n\tfunction merge$1(/* obj1, obj2, obj3, ... */) {\n\t  var result = {};\n\t  function assignValue(val, key) {\n\t    if (isPlainObject$1(result[key]) && isPlainObject$1(val)) {\n\t      result[key] = merge$1(result[key], val);\n\t    } else if (isPlainObject$1(val)) {\n\t      result[key] = merge$1({}, val);\n\t    } else if (isArray$a(val)) {\n\t      result[key] = val.slice();\n\t    } else {\n\t      result[key] = val;\n\t    }\n\t  }\n\n\t  for (var i = 0, l = arguments.length; i < l; i++) {\n\t    forEach$5(arguments[i], assignValue);\n\t  }\n\t  return result;\n\t}\n\n\t/**\n\t * Extends object a by mutably adding to it the properties of object b.\n\t *\n\t * @param {Object} a The object to be extended\n\t * @param {Object} b The object to copy properties from\n\t * @param {Object} thisArg The object to bind function to\n\t * @return {Object} The resulting value of object a\n\t */\n\tfunction extend(a, b, thisArg) {\n\t  forEach$5(b, function assignValue(val, key) {\n\t    if (thisArg && typeof val === 'function') {\n\t      a[key] = bind$a(val, thisArg);\n\t    } else {\n\t      a[key] = val;\n\t    }\n\t  });\n\t  return a;\n\t}\n\n\t/**\n\t * Remove byte order marker. This catches EF BB BF (the UTF-8 BOM)\n\t *\n\t * @param {string} content with BOM\n\t * @return {string} content value without BOM\n\t */\n\tfunction stripBOM(content) {\n\t  if (content.charCodeAt(0) === 0xFEFF) {\n\t    content = content.slice(1);\n\t  }\n\t  return content;\n\t}\n\n\tvar utils = {\n\t  isArray: isArray$a,\n\t  isArrayBuffer: isArrayBuffer,\n\t  isBuffer: isBuffer$1,\n\t  isFormData: isFormData,\n\t  isArrayBufferView: isArrayBufferView,\n\t  isString: isString,\n\t  isNumber: isNumber,\n\t  isObject: isObject$3,\n\t  isPlainObject: isPlainObject$1,\n\t  isUndefined: isUndefined,\n\t  isDate: isDate,\n\t  isFile: isFile,\n\t  isBlob: isBlob,\n\t  isFunction: isFunction$1,\n\t  isStream: isStream,\n\t  isURLSearchParams: isURLSearchParams,\n\t  isStandardBrowserEnv: isStandardBrowserEnv,\n\t  forEach: forEach$5,\n\t  merge: merge$1,\n\t  extend: extend,\n\t  trim: trim$6,\n\t  stripBOM: stripBOM\n\t};\n\n\tfunction encode$1(val) {\n\t  return encodeURIComponent(val).\n\t    replace(/%3A/gi, ':').\n\t    replace(/%24/g, '$').\n\t    replace(/%2C/gi, ',').\n\t    replace(/%20/g, '+').\n\t    replace(/%5B/gi, '[').\n\t    replace(/%5D/gi, ']');\n\t}\n\n\t/**\n\t * Build a URL by appending params to the end\n\t *\n\t * @param {string} url The base of the url (e.g., http://www.google.com)\n\t * @param {object} [params] The params to be appended\n\t * @returns {string} The formatted url\n\t */\n\tvar buildURL = function buildURL(url, params, paramsSerializer) {\n\t  /*eslint no-param-reassign:0*/\n\t  if (!params) {\n\t    return url;\n\t  }\n\n\t  var serializedParams;\n\t  if (paramsSerializer) {\n\t    serializedParams = paramsSerializer(params);\n\t  } else if (utils.isURLSearchParams(params)) {\n\t    serializedParams = params.toString();\n\t  } else {\n\t    var parts = [];\n\n\t    utils.forEach(params, function serialize(val, key) {\n\t      if (val === null || typeof val === 'undefined') {\n\t        return;\n\t      }\n\n\t      if (utils.isArray(val)) {\n\t        key = key + '[]';\n\t      } else {\n\t        val = [val];\n\t      }\n\n\t      utils.forEach(val, function parseValue(v) {\n\t        if (utils.isDate(v)) {\n\t          v = v.toISOString();\n\t        } else if (utils.isObject(v)) {\n\t          v = JSON.stringify(v);\n\t        }\n\t        parts.push(encode$1(key) + '=' + encode$1(v));\n\t      });\n\t    });\n\n\t    serializedParams = parts.join('&');\n\t  }\n\n\t  if (serializedParams) {\n\t    var hashmarkIndex = url.indexOf('#');\n\t    if (hashmarkIndex !== -1) {\n\t      url = url.slice(0, hashmarkIndex);\n\t    }\n\n\t    url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;\n\t  }\n\n\t  return url;\n\t};\n\n\tfunction InterceptorManager() {\n\t  this.handlers = [];\n\t}\n\n\t/**\n\t * Add a new interceptor to the stack\n\t *\n\t * @param {Function} fulfilled The function to handle `then` for a `Promise`\n\t * @param {Function} rejected The function to handle `reject` for a `Promise`\n\t *\n\t * @return {Number} An ID used to remove interceptor later\n\t */\n\tInterceptorManager.prototype.use = function use(fulfilled, rejected, options) {\n\t  this.handlers.push({\n\t    fulfilled: fulfilled,\n\t    rejected: rejected,\n\t    synchronous: options ? options.synchronous : false,\n\t    runWhen: options ? options.runWhen : null\n\t  });\n\t  return this.handlers.length - 1;\n\t};\n\n\t/**\n\t * Remove an interceptor from the stack\n\t *\n\t * @param {Number} id The ID that was returned by `use`\n\t */\n\tInterceptorManager.prototype.eject = function eject(id) {\n\t  if (this.handlers[id]) {\n\t    this.handlers[id] = null;\n\t  }\n\t};\n\n\t/**\n\t * Iterate over all the registered interceptors\n\t *\n\t * This method is particularly useful for skipping over any\n\t * interceptors that may have become `null` calling `eject`.\n\t *\n\t * @param {Function} fn The function to call for each interceptor\n\t */\n\tInterceptorManager.prototype.forEach = function forEach(fn) {\n\t  utils.forEach(this.handlers, function forEachHandler(h) {\n\t    if (h !== null) {\n\t      fn(h);\n\t    }\n\t  });\n\t};\n\n\tvar InterceptorManager_1 = InterceptorManager;\n\n\tvar normalizeHeaderName = function normalizeHeaderName(headers, normalizedName) {\n\t  utils.forEach(headers, function processHeader(value, name) {\n\t    if (name !== normalizedName && name.toUpperCase() === normalizedName.toUpperCase()) {\n\t      headers[normalizedName] = value;\n\t      delete headers[name];\n\t    }\n\t  });\n\t};\n\n\t/**\n\t * Update an Error with the specified config, error code, and response.\n\t *\n\t * @param {Error} error The error to update.\n\t * @param {Object} config The config.\n\t * @param {string} [code] The error code (for example, 'ECONNABORTED').\n\t * @param {Object} [request] The request.\n\t * @param {Object} [response] The response.\n\t * @returns {Error} The error.\n\t */\n\tvar enhanceError = function enhanceError(error, config, code, request, response) {\n\t  error.config = config;\n\t  if (code) {\n\t    error.code = code;\n\t  }\n\n\t  error.request = request;\n\t  error.response = response;\n\t  error.isAxiosError = true;\n\n\t  error.toJSON = function toJSON() {\n\t    return {\n\t      // Standard\n\t      message: this.message,\n\t      name: this.name,\n\t      // Microsoft\n\t      description: this.description,\n\t      number: this.number,\n\t      // Mozilla\n\t      fileName: this.fileName,\n\t      lineNumber: this.lineNumber,\n\t      columnNumber: this.columnNumber,\n\t      stack: this.stack,\n\t      // Axios\n\t      config: this.config,\n\t      code: this.code,\n\t      status: this.response && this.response.status ? this.response.status : null\n\t    };\n\t  };\n\t  return error;\n\t};\n\n\tvar transitional = {\n\t  silentJSONParsing: true,\n\t  forcedJSONParsing: true,\n\t  clarifyTimeoutError: false\n\t};\n\n\t/**\n\t * Create an Error with the specified message, config, error code, request and response.\n\t *\n\t * @param {string} message The error message.\n\t * @param {Object} config The config.\n\t * @param {string} [code] The error code (for example, 'ECONNABORTED').\n\t * @param {Object} [request] The request.\n\t * @param {Object} [response] The response.\n\t * @returns {Error} The created error.\n\t */\n\tvar createError = function createError(message, config, code, request, response) {\n\t  var error = new Error(message);\n\t  return enhanceError(error, config, code, request, response);\n\t};\n\n\t/**\n\t * Resolve or reject a Promise based on response status.\n\t *\n\t * @param {Function} resolve A function that resolves the promise.\n\t * @param {Function} reject A function that rejects the promise.\n\t * @param {object} response The response.\n\t */\n\tvar settle = function settle(resolve, reject, response) {\n\t  var validateStatus = response.config.validateStatus;\n\t  if (!response.status || !validateStatus || validateStatus(response.status)) {\n\t    resolve(response);\n\t  } else {\n\t    reject(createError(\n\t      'Request failed with status code ' + response.status,\n\t      response.config,\n\t      null,\n\t      response.request,\n\t      response\n\t    ));\n\t  }\n\t};\n\n\tvar cookies = (\n\t  utils.isStandardBrowserEnv() ?\n\n\t  // Standard browser envs support document.cookie\n\t    (function standardBrowserEnv() {\n\t      return {\n\t        write: function write(name, value, expires, path, domain, secure) {\n\t          var cookie = [];\n\t          cookie.push(name + '=' + encodeURIComponent(value));\n\n\t          if (utils.isNumber(expires)) {\n\t            cookie.push('expires=' + new Date(expires).toGMTString());\n\t          }\n\n\t          if (utils.isString(path)) {\n\t            cookie.push('path=' + path);\n\t          }\n\n\t          if (utils.isString(domain)) {\n\t            cookie.push('domain=' + domain);\n\t          }\n\n\t          if (secure === true) {\n\t            cookie.push('secure');\n\t          }\n\n\t          document.cookie = cookie.join('; ');\n\t        },\n\n\t        read: function read(name) {\n\t          var match = document.cookie.match(new RegExp('(^|;\\\\s*)(' + name + ')=([^;]*)'));\n\t          return (match ? decodeURIComponent(match[3]) : null);\n\t        },\n\n\t        remove: function remove(name) {\n\t          this.write(name, '', Date.now() - 86400000);\n\t        }\n\t      };\n\t    })() :\n\n\t  // Non standard browser env (web workers, react-native) lack needed support.\n\t    (function nonStandardBrowserEnv() {\n\t      return {\n\t        write: function write() {},\n\t        read: function read() { return null; },\n\t        remove: function remove() {}\n\t      };\n\t    })()\n\t);\n\n\t/**\n\t * Determines whether the specified URL is absolute\n\t *\n\t * @param {string} url The URL to test\n\t * @returns {boolean} True if the specified URL is absolute, otherwise false\n\t */\n\tvar isAbsoluteURL = function isAbsoluteURL(url) {\n\t  // A URL is considered absolute if it begins with \"<scheme>://\" or \"//\" (protocol-relative URL).\n\t  // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed\n\t  // by any combination of letters, digits, plus, period, or hyphen.\n\t  return /^([a-z][a-z\\d+\\-.]*:)?\\/\\//i.test(url);\n\t};\n\n\t/**\n\t * Creates a new URL by combining the specified URLs\n\t *\n\t * @param {string} baseURL The base URL\n\t * @param {string} relativeURL The relative URL\n\t * @returns {string} The combined URL\n\t */\n\tvar combineURLs = function combineURLs(baseURL, relativeURL) {\n\t  return relativeURL\n\t    ? baseURL.replace(/\\/+$/, '') + '/' + relativeURL.replace(/^\\/+/, '')\n\t    : baseURL;\n\t};\n\n\t/**\n\t * Creates a new URL by combining the baseURL with the requestedURL,\n\t * only when the requestedURL is not already an absolute URL.\n\t * If the requestURL is absolute, this function returns the requestedURL untouched.\n\t *\n\t * @param {string} baseURL The base URL\n\t * @param {string} requestedURL Absolute or relative URL to combine\n\t * @returns {string} The combined full path\n\t */\n\tvar buildFullPath = function buildFullPath(baseURL, requestedURL) {\n\t  if (baseURL && !isAbsoluteURL(requestedURL)) {\n\t    return combineURLs(baseURL, requestedURL);\n\t  }\n\t  return requestedURL;\n\t};\n\n\t// Headers whose duplicates are ignored by node\n\t// c.f. https://nodejs.org/api/http.html#http_message_headers\n\tvar ignoreDuplicateOf = [\n\t  'age', 'authorization', 'content-length', 'content-type', 'etag',\n\t  'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since',\n\t  'last-modified', 'location', 'max-forwards', 'proxy-authorization',\n\t  'referer', 'retry-after', 'user-agent'\n\t];\n\n\t/**\n\t * Parse headers into an object\n\t *\n\t * ```\n\t * Date: Wed, 27 Aug 2014 08:58:49 GMT\n\t * Content-Type: application/json\n\t * Connection: keep-alive\n\t * Transfer-Encoding: chunked\n\t * ```\n\t *\n\t * @param {String} headers Headers needing to be parsed\n\t * @returns {Object} Headers parsed into an object\n\t */\n\tvar parseHeaders = function parseHeaders(headers) {\n\t  var parsed = {};\n\t  var key;\n\t  var val;\n\t  var i;\n\n\t  if (!headers) { return parsed; }\n\n\t  utils.forEach(headers.split('\\n'), function parser(line) {\n\t    i = line.indexOf(':');\n\t    key = utils.trim(line.substr(0, i)).toLowerCase();\n\t    val = utils.trim(line.substr(i + 1));\n\n\t    if (key) {\n\t      if (parsed[key] && ignoreDuplicateOf.indexOf(key) >= 0) {\n\t        return;\n\t      }\n\t      if (key === 'set-cookie') {\n\t        parsed[key] = (parsed[key] ? parsed[key] : []).concat([val]);\n\t      } else {\n\t        parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;\n\t      }\n\t    }\n\t  });\n\n\t  return parsed;\n\t};\n\n\tvar isURLSameOrigin = (\n\t  utils.isStandardBrowserEnv() ?\n\n\t  // Standard browser envs have full support of the APIs needed to test\n\t  // whether the request URL is of the same origin as current location.\n\t    (function standardBrowserEnv() {\n\t      var msie = /(msie|trident)/i.test(navigator.userAgent);\n\t      var urlParsingNode = document.createElement('a');\n\t      var originURL;\n\n\t      /**\n\t    * Parse a URL to discover it's components\n\t    *\n\t    * @param {String} url The URL to be parsed\n\t    * @returns {Object}\n\t    */\n\t      function resolveURL(url) {\n\t        var href = url;\n\n\t        if (msie) {\n\t        // IE needs attribute set twice to normalize properties\n\t          urlParsingNode.setAttribute('href', href);\n\t          href = urlParsingNode.href;\n\t        }\n\n\t        urlParsingNode.setAttribute('href', href);\n\n\t        // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils\n\t        return {\n\t          href: urlParsingNode.href,\n\t          protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',\n\t          host: urlParsingNode.host,\n\t          search: urlParsingNode.search ? urlParsingNode.search.replace(/^\\?/, '') : '',\n\t          hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',\n\t          hostname: urlParsingNode.hostname,\n\t          port: urlParsingNode.port,\n\t          pathname: (urlParsingNode.pathname.charAt(0) === '/') ?\n\t            urlParsingNode.pathname :\n\t            '/' + urlParsingNode.pathname\n\t        };\n\t      }\n\n\t      originURL = resolveURL(window.location.href);\n\n\t      /**\n\t    * Determine if a URL shares the same origin as the current location\n\t    *\n\t    * @param {String} requestURL The URL to test\n\t    * @returns {boolean} True if URL shares the same origin, otherwise false\n\t    */\n\t      return function isURLSameOrigin(requestURL) {\n\t        var parsed = (utils.isString(requestURL)) ? resolveURL(requestURL) : requestURL;\n\t        return (parsed.protocol === originURL.protocol &&\n\t            parsed.host === originURL.host);\n\t      };\n\t    })() :\n\n\t  // Non standard browser envs (web workers, react-native) lack needed support.\n\t    (function nonStandardBrowserEnv() {\n\t      return function isURLSameOrigin() {\n\t        return true;\n\t      };\n\t    })()\n\t);\n\n\t/**\n\t * A `Cancel` is an object that is thrown when an operation is canceled.\n\t *\n\t * @class\n\t * @param {string=} message The message.\n\t */\n\tfunction Cancel(message) {\n\t  this.message = message;\n\t}\n\n\tCancel.prototype.toString = function toString() {\n\t  return 'Cancel' + (this.message ? ': ' + this.message : '');\n\t};\n\n\tCancel.prototype.__CANCEL__ = true;\n\n\tvar Cancel_1 = Cancel;\n\n\tvar xhr = function xhrAdapter(config) {\n\t  return new Promise(function dispatchXhrRequest(resolve, reject) {\n\t    var requestData = config.data;\n\t    var requestHeaders = config.headers;\n\t    var responseType = config.responseType;\n\t    var onCanceled;\n\t    function done() {\n\t      if (config.cancelToken) {\n\t        config.cancelToken.unsubscribe(onCanceled);\n\t      }\n\n\t      if (config.signal) {\n\t        config.signal.removeEventListener('abort', onCanceled);\n\t      }\n\t    }\n\n\t    if (utils.isFormData(requestData)) {\n\t      delete requestHeaders['Content-Type']; // Let the browser set it\n\t    }\n\n\t    var request = new XMLHttpRequest();\n\n\t    // HTTP basic authentication\n\t    if (config.auth) {\n\t      var username = config.auth.username || '';\n\t      var password = config.auth.password ? unescape(encodeURIComponent(config.auth.password)) : '';\n\t      requestHeaders.Authorization = 'Basic ' + btoa(username + ':' + password);\n\t    }\n\n\t    var fullPath = buildFullPath(config.baseURL, config.url);\n\t    request.open(config.method.toUpperCase(), buildURL(fullPath, config.params, config.paramsSerializer), true);\n\n\t    // Set the request timeout in MS\n\t    request.timeout = config.timeout;\n\n\t    function onloadend() {\n\t      if (!request) {\n\t        return;\n\t      }\n\t      // Prepare the response\n\t      var responseHeaders = 'getAllResponseHeaders' in request ? parseHeaders(request.getAllResponseHeaders()) : null;\n\t      var responseData = !responseType || responseType === 'text' ||  responseType === 'json' ?\n\t        request.responseText : request.response;\n\t      var response = {\n\t        data: responseData,\n\t        status: request.status,\n\t        statusText: request.statusText,\n\t        headers: responseHeaders,\n\t        config: config,\n\t        request: request\n\t      };\n\n\t      settle(function _resolve(value) {\n\t        resolve(value);\n\t        done();\n\t      }, function _reject(err) {\n\t        reject(err);\n\t        done();\n\t      }, response);\n\n\t      // Clean up request\n\t      request = null;\n\t    }\n\n\t    if ('onloadend' in request) {\n\t      // Use onloadend if available\n\t      request.onloadend = onloadend;\n\t    } else {\n\t      // Listen for ready state to emulate onloadend\n\t      request.onreadystatechange = function handleLoad() {\n\t        if (!request || request.readyState !== 4) {\n\t          return;\n\t        }\n\n\t        // The request errored out and we didn't get a response, this will be\n\t        // handled by onerror instead\n\t        // With one exception: request that using file: protocol, most browsers\n\t        // will return status as 0 even though it's a successful request\n\t        if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) {\n\t          return;\n\t        }\n\t        // readystate handler is calling before onerror or ontimeout handlers,\n\t        // so we should call onloadend on the next 'tick'\n\t        setTimeout(onloadend);\n\t      };\n\t    }\n\n\t    // Handle browser request cancellation (as opposed to a manual cancellation)\n\t    request.onabort = function handleAbort() {\n\t      if (!request) {\n\t        return;\n\t      }\n\n\t      reject(createError('Request aborted', config, 'ECONNABORTED', request));\n\n\t      // Clean up request\n\t      request = null;\n\t    };\n\n\t    // Handle low level network errors\n\t    request.onerror = function handleError() {\n\t      // Real errors are hidden from us by the browser\n\t      // onerror should only fire if it's a network error\n\t      reject(createError('Network Error', config, null, request));\n\n\t      // Clean up request\n\t      request = null;\n\t    };\n\n\t    // Handle timeout\n\t    request.ontimeout = function handleTimeout() {\n\t      var timeoutErrorMessage = config.timeout ? 'timeout of ' + config.timeout + 'ms exceeded' : 'timeout exceeded';\n\t      var transitional$1 = config.transitional || transitional;\n\t      if (config.timeoutErrorMessage) {\n\t        timeoutErrorMessage = config.timeoutErrorMessage;\n\t      }\n\t      reject(createError(\n\t        timeoutErrorMessage,\n\t        config,\n\t        transitional$1.clarifyTimeoutError ? 'ETIMEDOUT' : 'ECONNABORTED',\n\t        request));\n\n\t      // Clean up request\n\t      request = null;\n\t    };\n\n\t    // Add xsrf header\n\t    // This is only done if running in a standard browser environment.\n\t    // Specifically not if we're in a web worker, or react-native.\n\t    if (utils.isStandardBrowserEnv()) {\n\t      // Add xsrf header\n\t      var xsrfValue = (config.withCredentials || isURLSameOrigin(fullPath)) && config.xsrfCookieName ?\n\t        cookies.read(config.xsrfCookieName) :\n\t        undefined;\n\n\t      if (xsrfValue) {\n\t        requestHeaders[config.xsrfHeaderName] = xsrfValue;\n\t      }\n\t    }\n\n\t    // Add headers to the request\n\t    if ('setRequestHeader' in request) {\n\t      utils.forEach(requestHeaders, function setRequestHeader(val, key) {\n\t        if (typeof requestData === 'undefined' && key.toLowerCase() === 'content-type') {\n\t          // Remove Content-Type if data is undefined\n\t          delete requestHeaders[key];\n\t        } else {\n\t          // Otherwise add header to the request\n\t          request.setRequestHeader(key, val);\n\t        }\n\t      });\n\t    }\n\n\t    // Add withCredentials to request if needed\n\t    if (!utils.isUndefined(config.withCredentials)) {\n\t      request.withCredentials = !!config.withCredentials;\n\t    }\n\n\t    // Add responseType to request if needed\n\t    if (responseType && responseType !== 'json') {\n\t      request.responseType = config.responseType;\n\t    }\n\n\t    // Handle progress if needed\n\t    if (typeof config.onDownloadProgress === 'function') {\n\t      request.addEventListener('progress', config.onDownloadProgress);\n\t    }\n\n\t    // Not all browsers support upload events\n\t    if (typeof config.onUploadProgress === 'function' && request.upload) {\n\t      request.upload.addEventListener('progress', config.onUploadProgress);\n\t    }\n\n\t    if (config.cancelToken || config.signal) {\n\t      // Handle cancellation\n\t      // eslint-disable-next-line func-names\n\t      onCanceled = function(cancel) {\n\t        if (!request) {\n\t          return;\n\t        }\n\t        reject(!cancel || (cancel && cancel.type) ? new Cancel_1('canceled') : cancel);\n\t        request.abort();\n\t        request = null;\n\t      };\n\n\t      config.cancelToken && config.cancelToken.subscribe(onCanceled);\n\t      if (config.signal) {\n\t        config.signal.aborted ? onCanceled() : config.signal.addEventListener('abort', onCanceled);\n\t      }\n\t    }\n\n\t    if (!requestData) {\n\t      requestData = null;\n\t    }\n\n\t    // Send the request\n\t    request.send(requestData);\n\t  });\n\t};\n\n\tvar DEFAULT_CONTENT_TYPE = {\n\t  'Content-Type': 'application/x-www-form-urlencoded'\n\t};\n\n\tfunction setContentTypeIfUnset(headers, value) {\n\t  if (!utils.isUndefined(headers) && utils.isUndefined(headers['Content-Type'])) {\n\t    headers['Content-Type'] = value;\n\t  }\n\t}\n\n\tfunction getDefaultAdapter() {\n\t  var adapter;\n\t  if (typeof XMLHttpRequest !== 'undefined') {\n\t    // For browsers use XHR adapter\n\t    adapter = xhr;\n\t  } else if (typeof process !== 'undefined' && Object.prototype.toString.call(process) === '[object process]') {\n\t    // For node use HTTP adapter\n\t    adapter = xhr;\n\t  }\n\t  return adapter;\n\t}\n\n\tfunction stringifySafely(rawValue, parser, encoder) {\n\t  if (utils.isString(rawValue)) {\n\t    try {\n\t      (parser || JSON.parse)(rawValue);\n\t      return utils.trim(rawValue);\n\t    } catch (e) {\n\t      if (e.name !== 'SyntaxError') {\n\t        throw e;\n\t      }\n\t    }\n\t  }\n\n\t  return (encoder || JSON.stringify)(rawValue);\n\t}\n\n\tvar defaults = {\n\n\t  transitional: transitional,\n\n\t  adapter: getDefaultAdapter(),\n\n\t  transformRequest: [function transformRequest(data, headers) {\n\t    normalizeHeaderName(headers, 'Accept');\n\t    normalizeHeaderName(headers, 'Content-Type');\n\n\t    if (utils.isFormData(data) ||\n\t      utils.isArrayBuffer(data) ||\n\t      utils.isBuffer(data) ||\n\t      utils.isStream(data) ||\n\t      utils.isFile(data) ||\n\t      utils.isBlob(data)\n\t    ) {\n\t      return data;\n\t    }\n\t    if (utils.isArrayBufferView(data)) {\n\t      return data.buffer;\n\t    }\n\t    if (utils.isURLSearchParams(data)) {\n\t      setContentTypeIfUnset(headers, 'application/x-www-form-urlencoded;charset=utf-8');\n\t      return data.toString();\n\t    }\n\t    if (utils.isObject(data) || (headers && headers['Content-Type'] === 'application/json')) {\n\t      setContentTypeIfUnset(headers, 'application/json');\n\t      return stringifySafely(data);\n\t    }\n\t    return data;\n\t  }],\n\n\t  transformResponse: [function transformResponse(data) {\n\t    var transitional = this.transitional || defaults.transitional;\n\t    var silentJSONParsing = transitional && transitional.silentJSONParsing;\n\t    var forcedJSONParsing = transitional && transitional.forcedJSONParsing;\n\t    var strictJSONParsing = !silentJSONParsing && this.responseType === 'json';\n\n\t    if (strictJSONParsing || (forcedJSONParsing && utils.isString(data) && data.length)) {\n\t      try {\n\t        return JSON.parse(data);\n\t      } catch (e) {\n\t        if (strictJSONParsing) {\n\t          if (e.name === 'SyntaxError') {\n\t            throw enhanceError(e, this, 'E_JSON_PARSE');\n\t          }\n\t          throw e;\n\t        }\n\t      }\n\t    }\n\n\t    return data;\n\t  }],\n\n\t  /**\n\t   * A timeout in milliseconds to abort a request. If set to 0 (default) a\n\t   * timeout is not created.\n\t   */\n\t  timeout: 0,\n\n\t  xsrfCookieName: 'XSRF-TOKEN',\n\t  xsrfHeaderName: 'X-XSRF-TOKEN',\n\n\t  maxContentLength: -1,\n\t  maxBodyLength: -1,\n\n\t  validateStatus: function validateStatus(status) {\n\t    return status >= 200 && status < 300;\n\t  },\n\n\t  headers: {\n\t    common: {\n\t      'Accept': 'application/json, text/plain, */*'\n\t    }\n\t  }\n\t};\n\n\tutils.forEach(['delete', 'get', 'head'], function forEachMethodNoData(method) {\n\t  defaults.headers[method] = {};\n\t});\n\n\tutils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {\n\t  defaults.headers[method] = utils.merge(DEFAULT_CONTENT_TYPE);\n\t});\n\n\tvar defaults_1 = defaults;\n\n\t/**\n\t * Transform the data for a request or a response\n\t *\n\t * @param {Object|String} data The data to be transformed\n\t * @param {Array} headers The headers for the request or response\n\t * @param {Array|Function} fns A single function or Array of functions\n\t * @returns {*} The resulting transformed data\n\t */\n\tvar transformData = function transformData(data, headers, fns) {\n\t  var context = this || defaults_1;\n\t  /*eslint no-param-reassign:0*/\n\t  utils.forEach(fns, function transform(fn) {\n\t    data = fn.call(context, data, headers);\n\t  });\n\n\t  return data;\n\t};\n\n\tvar isCancel = function isCancel(value) {\n\t  return !!(value && value.__CANCEL__);\n\t};\n\n\t/**\n\t * Throws a `Cancel` if cancellation has been requested.\n\t */\n\tfunction throwIfCancellationRequested(config) {\n\t  if (config.cancelToken) {\n\t    config.cancelToken.throwIfRequested();\n\t  }\n\n\t  if (config.signal && config.signal.aborted) {\n\t    throw new Cancel_1('canceled');\n\t  }\n\t}\n\n\t/**\n\t * Dispatch a request to the server using the configured adapter.\n\t *\n\t * @param {object} config The config that is to be used for the request\n\t * @returns {Promise} The Promise to be fulfilled\n\t */\n\tvar dispatchRequest = function dispatchRequest(config) {\n\t  throwIfCancellationRequested(config);\n\n\t  // Ensure headers exist\n\t  config.headers = config.headers || {};\n\n\t  // Transform request data\n\t  config.data = transformData.call(\n\t    config,\n\t    config.data,\n\t    config.headers,\n\t    config.transformRequest\n\t  );\n\n\t  // Flatten headers\n\t  config.headers = utils.merge(\n\t    config.headers.common || {},\n\t    config.headers[config.method] || {},\n\t    config.headers\n\t  );\n\n\t  utils.forEach(\n\t    ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],\n\t    function cleanHeaderConfig(method) {\n\t      delete config.headers[method];\n\t    }\n\t  );\n\n\t  var adapter = config.adapter || defaults_1.adapter;\n\n\t  return adapter(config).then(function onAdapterResolution(response) {\n\t    throwIfCancellationRequested(config);\n\n\t    // Transform response data\n\t    response.data = transformData.call(\n\t      config,\n\t      response.data,\n\t      response.headers,\n\t      config.transformResponse\n\t    );\n\n\t    return response;\n\t  }, function onAdapterRejection(reason) {\n\t    if (!isCancel(reason)) {\n\t      throwIfCancellationRequested(config);\n\n\t      // Transform response data\n\t      if (reason && reason.response) {\n\t        reason.response.data = transformData.call(\n\t          config,\n\t          reason.response.data,\n\t          reason.response.headers,\n\t          config.transformResponse\n\t        );\n\t      }\n\t    }\n\n\t    return Promise.reject(reason);\n\t  });\n\t};\n\n\t/**\n\t * Config-specific merge-function which creates a new config-object\n\t * by merging two configuration objects together.\n\t *\n\t * @param {Object} config1\n\t * @param {Object} config2\n\t * @returns {Object} New object resulting from merging config2 to config1\n\t */\n\tvar mergeConfig = function mergeConfig(config1, config2) {\n\t  // eslint-disable-next-line no-param-reassign\n\t  config2 = config2 || {};\n\t  var config = {};\n\n\t  function getMergedValue(target, source) {\n\t    if (utils.isPlainObject(target) && utils.isPlainObject(source)) {\n\t      return utils.merge(target, source);\n\t    } else if (utils.isPlainObject(source)) {\n\t      return utils.merge({}, source);\n\t    } else if (utils.isArray(source)) {\n\t      return source.slice();\n\t    }\n\t    return source;\n\t  }\n\n\t  // eslint-disable-next-line consistent-return\n\t  function mergeDeepProperties(prop) {\n\t    if (!utils.isUndefined(config2[prop])) {\n\t      return getMergedValue(config1[prop], config2[prop]);\n\t    } else if (!utils.isUndefined(config1[prop])) {\n\t      return getMergedValue(undefined, config1[prop]);\n\t    }\n\t  }\n\n\t  // eslint-disable-next-line consistent-return\n\t  function valueFromConfig2(prop) {\n\t    if (!utils.isUndefined(config2[prop])) {\n\t      return getMergedValue(undefined, config2[prop]);\n\t    }\n\t  }\n\n\t  // eslint-disable-next-line consistent-return\n\t  function defaultToConfig2(prop) {\n\t    if (!utils.isUndefined(config2[prop])) {\n\t      return getMergedValue(undefined, config2[prop]);\n\t    } else if (!utils.isUndefined(config1[prop])) {\n\t      return getMergedValue(undefined, config1[prop]);\n\t    }\n\t  }\n\n\t  // eslint-disable-next-line consistent-return\n\t  function mergeDirectKeys(prop) {\n\t    if (prop in config2) {\n\t      return getMergedValue(config1[prop], config2[prop]);\n\t    } else if (prop in config1) {\n\t      return getMergedValue(undefined, config1[prop]);\n\t    }\n\t  }\n\n\t  var mergeMap = {\n\t    'url': valueFromConfig2,\n\t    'method': valueFromConfig2,\n\t    'data': valueFromConfig2,\n\t    'baseURL': defaultToConfig2,\n\t    'transformRequest': defaultToConfig2,\n\t    'transformResponse': defaultToConfig2,\n\t    'paramsSerializer': defaultToConfig2,\n\t    'timeout': defaultToConfig2,\n\t    'timeoutMessage': defaultToConfig2,\n\t    'withCredentials': defaultToConfig2,\n\t    'adapter': defaultToConfig2,\n\t    'responseType': defaultToConfig2,\n\t    'xsrfCookieName': defaultToConfig2,\n\t    'xsrfHeaderName': defaultToConfig2,\n\t    'onUploadProgress': defaultToConfig2,\n\t    'onDownloadProgress': defaultToConfig2,\n\t    'decompress': defaultToConfig2,\n\t    'maxContentLength': defaultToConfig2,\n\t    'maxBodyLength': defaultToConfig2,\n\t    'transport': defaultToConfig2,\n\t    'httpAgent': defaultToConfig2,\n\t    'httpsAgent': defaultToConfig2,\n\t    'cancelToken': defaultToConfig2,\n\t    'socketPath': defaultToConfig2,\n\t    'responseEncoding': defaultToConfig2,\n\t    'validateStatus': mergeDirectKeys\n\t  };\n\n\t  utils.forEach(Object.keys(config1).concat(Object.keys(config2)), function computeConfigValue(prop) {\n\t    var merge = mergeMap[prop] || mergeDeepProperties;\n\t    var configValue = merge(prop);\n\t    (utils.isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue);\n\t  });\n\n\t  return config;\n\t};\n\n\tvar data$1 = {\n\t  \"version\": \"0.26.1\"\n\t};\n\n\tvar VERSION = data$1.version;\n\n\tvar validators = {};\n\n\t// eslint-disable-next-line func-names\n\t['object', 'boolean', 'number', 'function', 'string', 'symbol'].forEach(function(type, i) {\n\t  validators[type] = function validator(thing) {\n\t    return typeof thing === type || 'a' + (i < 1 ? 'n ' : ' ') + type;\n\t  };\n\t});\n\n\tvar deprecatedWarnings = {};\n\n\t/**\n\t * Transitional option validator\n\t * @param {function|boolean?} validator - set to false if the transitional option has been removed\n\t * @param {string?} version - deprecated version / removed since version\n\t * @param {string?} message - some message with additional info\n\t * @returns {function}\n\t */\n\tvalidators.transitional = function transitional(validator, version, message) {\n\t  function formatMessage(opt, desc) {\n\t    return '[Axios v' + VERSION + '] Transitional option \\'' + opt + '\\'' + desc + (message ? '. ' + message : '');\n\t  }\n\n\t  // eslint-disable-next-line func-names\n\t  return function(value, opt, opts) {\n\t    if (validator === false) {\n\t      throw new Error(formatMessage(opt, ' has been removed' + (version ? ' in ' + version : '')));\n\t    }\n\n\t    if (version && !deprecatedWarnings[opt]) {\n\t      deprecatedWarnings[opt] = true;\n\t      // eslint-disable-next-line no-console\n\t      console.warn(\n\t        formatMessage(\n\t          opt,\n\t          ' has been deprecated since v' + version + ' and will be removed in the near future'\n\t        )\n\t      );\n\t    }\n\n\t    return validator ? validator(value, opt, opts) : true;\n\t  };\n\t};\n\n\t/**\n\t * Assert object's properties type\n\t * @param {object} options\n\t * @param {object} schema\n\t * @param {boolean?} allowUnknown\n\t */\n\n\tfunction assertOptions(options, schema, allowUnknown) {\n\t  if (typeof options !== 'object') {\n\t    throw new TypeError('options must be an object');\n\t  }\n\t  var keys = Object.keys(options);\n\t  var i = keys.length;\n\t  while (i-- > 0) {\n\t    var opt = keys[i];\n\t    var validator = schema[opt];\n\t    if (validator) {\n\t      var value = options[opt];\n\t      var result = value === undefined || validator(value, opt, options);\n\t      if (result !== true) {\n\t        throw new TypeError('option ' + opt + ' must be ' + result);\n\t      }\n\t      continue;\n\t    }\n\t    if (allowUnknown !== true) {\n\t      throw Error('Unknown option ' + opt);\n\t    }\n\t  }\n\t}\n\n\tvar validator = {\n\t  assertOptions: assertOptions,\n\t  validators: validators\n\t};\n\n\tvar validators$1 = validator.validators;\n\t/**\n\t * Create a new instance of Axios\n\t *\n\t * @param {Object} instanceConfig The default config for the instance\n\t */\n\tfunction Axios(instanceConfig) {\n\t  this.defaults = instanceConfig;\n\t  this.interceptors = {\n\t    request: new InterceptorManager_1(),\n\t    response: new InterceptorManager_1()\n\t  };\n\t}\n\n\t/**\n\t * Dispatch a request\n\t *\n\t * @param {Object} config The config specific for this request (merged with this.defaults)\n\t */\n\tAxios.prototype.request = function request(configOrUrl, config) {\n\t  /*eslint no-param-reassign:0*/\n\t  // Allow for axios('example/url'[, config]) a la fetch API\n\t  if (typeof configOrUrl === 'string') {\n\t    config = config || {};\n\t    config.url = configOrUrl;\n\t  } else {\n\t    config = configOrUrl || {};\n\t  }\n\n\t  config = mergeConfig(this.defaults, config);\n\n\t  // Set config.method\n\t  if (config.method) {\n\t    config.method = config.method.toLowerCase();\n\t  } else if (this.defaults.method) {\n\t    config.method = this.defaults.method.toLowerCase();\n\t  } else {\n\t    config.method = 'get';\n\t  }\n\n\t  var transitional = config.transitional;\n\n\t  if (transitional !== undefined) {\n\t    validator.assertOptions(transitional, {\n\t      silentJSONParsing: validators$1.transitional(validators$1.boolean),\n\t      forcedJSONParsing: validators$1.transitional(validators$1.boolean),\n\t      clarifyTimeoutError: validators$1.transitional(validators$1.boolean)\n\t    }, false);\n\t  }\n\n\t  // filter out skipped interceptors\n\t  var requestInterceptorChain = [];\n\t  var synchronousRequestInterceptors = true;\n\t  this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {\n\t    if (typeof interceptor.runWhen === 'function' && interceptor.runWhen(config) === false) {\n\t      return;\n\t    }\n\n\t    synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous;\n\n\t    requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected);\n\t  });\n\n\t  var responseInterceptorChain = [];\n\t  this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {\n\t    responseInterceptorChain.push(interceptor.fulfilled, interceptor.rejected);\n\t  });\n\n\t  var promise;\n\n\t  if (!synchronousRequestInterceptors) {\n\t    var chain = [dispatchRequest, undefined];\n\n\t    Array.prototype.unshift.apply(chain, requestInterceptorChain);\n\t    chain = chain.concat(responseInterceptorChain);\n\n\t    promise = Promise.resolve(config);\n\t    while (chain.length) {\n\t      promise = promise.then(chain.shift(), chain.shift());\n\t    }\n\n\t    return promise;\n\t  }\n\n\n\t  var newConfig = config;\n\t  while (requestInterceptorChain.length) {\n\t    var onFulfilled = requestInterceptorChain.shift();\n\t    var onRejected = requestInterceptorChain.shift();\n\t    try {\n\t      newConfig = onFulfilled(newConfig);\n\t    } catch (error) {\n\t      onRejected(error);\n\t      break;\n\t    }\n\t  }\n\n\t  try {\n\t    promise = dispatchRequest(newConfig);\n\t  } catch (error) {\n\t    return Promise.reject(error);\n\t  }\n\n\t  while (responseInterceptorChain.length) {\n\t    promise = promise.then(responseInterceptorChain.shift(), responseInterceptorChain.shift());\n\t  }\n\n\t  return promise;\n\t};\n\n\tAxios.prototype.getUri = function getUri(config) {\n\t  config = mergeConfig(this.defaults, config);\n\t  return buildURL(config.url, config.params, config.paramsSerializer).replace(/^\\?/, '');\n\t};\n\n\t// Provide aliases for supported request methods\n\tutils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {\n\t  /*eslint func-names:0*/\n\t  Axios.prototype[method] = function(url, config) {\n\t    return this.request(mergeConfig(config || {}, {\n\t      method: method,\n\t      url: url,\n\t      data: (config || {}).data\n\t    }));\n\t  };\n\t});\n\n\tutils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {\n\t  /*eslint func-names:0*/\n\t  Axios.prototype[method] = function(url, data, config) {\n\t    return this.request(mergeConfig(config || {}, {\n\t      method: method,\n\t      url: url,\n\t      data: data\n\t    }));\n\t  };\n\t});\n\n\tvar Axios_1 = Axios;\n\n\t/**\n\t * A `CancelToken` is an object that can be used to request cancellation of an operation.\n\t *\n\t * @class\n\t * @param {Function} executor The executor function.\n\t */\n\tfunction CancelToken(executor) {\n\t  if (typeof executor !== 'function') {\n\t    throw new TypeError('executor must be a function.');\n\t  }\n\n\t  var resolvePromise;\n\n\t  this.promise = new Promise(function promiseExecutor(resolve) {\n\t    resolvePromise = resolve;\n\t  });\n\n\t  var token = this;\n\n\t  // eslint-disable-next-line func-names\n\t  this.promise.then(function(cancel) {\n\t    if (!token._listeners) return;\n\n\t    var i;\n\t    var l = token._listeners.length;\n\n\t    for (i = 0; i < l; i++) {\n\t      token._listeners[i](cancel);\n\t    }\n\t    token._listeners = null;\n\t  });\n\n\t  // eslint-disable-next-line func-names\n\t  this.promise.then = function(onfulfilled) {\n\t    var _resolve;\n\t    // eslint-disable-next-line func-names\n\t    var promise = new Promise(function(resolve) {\n\t      token.subscribe(resolve);\n\t      _resolve = resolve;\n\t    }).then(onfulfilled);\n\n\t    promise.cancel = function reject() {\n\t      token.unsubscribe(_resolve);\n\t    };\n\n\t    return promise;\n\t  };\n\n\t  executor(function cancel(message) {\n\t    if (token.reason) {\n\t      // Cancellation has already been requested\n\t      return;\n\t    }\n\n\t    token.reason = new Cancel_1(message);\n\t    resolvePromise(token.reason);\n\t  });\n\t}\n\n\t/**\n\t * Throws a `Cancel` if cancellation has been requested.\n\t */\n\tCancelToken.prototype.throwIfRequested = function throwIfRequested() {\n\t  if (this.reason) {\n\t    throw this.reason;\n\t  }\n\t};\n\n\t/**\n\t * Subscribe to the cancel signal\n\t */\n\n\tCancelToken.prototype.subscribe = function subscribe(listener) {\n\t  if (this.reason) {\n\t    listener(this.reason);\n\t    return;\n\t  }\n\n\t  if (this._listeners) {\n\t    this._listeners.push(listener);\n\t  } else {\n\t    this._listeners = [listener];\n\t  }\n\t};\n\n\t/**\n\t * Unsubscribe from the cancel signal\n\t */\n\n\tCancelToken.prototype.unsubscribe = function unsubscribe(listener) {\n\t  if (!this._listeners) {\n\t    return;\n\t  }\n\t  var index = this._listeners.indexOf(listener);\n\t  if (index !== -1) {\n\t    this._listeners.splice(index, 1);\n\t  }\n\t};\n\n\t/**\n\t * Returns an object that contains a new `CancelToken` and a function that, when called,\n\t * cancels the `CancelToken`.\n\t */\n\tCancelToken.source = function source() {\n\t  var cancel;\n\t  var token = new CancelToken(function executor(c) {\n\t    cancel = c;\n\t  });\n\t  return {\n\t    token: token,\n\t    cancel: cancel\n\t  };\n\t};\n\n\tvar CancelToken_1 = CancelToken;\n\n\t/**\n\t * Syntactic sugar for invoking a function and expanding an array for arguments.\n\t *\n\t * Common use case would be to use `Function.prototype.apply`.\n\t *\n\t *  ```js\n\t *  function f(x, y, z) {}\n\t *  var args = [1, 2, 3];\n\t *  f.apply(null, args);\n\t *  ```\n\t *\n\t * With `spread` this example can be re-written.\n\t *\n\t *  ```js\n\t *  spread(function(x, y, z) {})([1, 2, 3]);\n\t *  ```\n\t *\n\t * @param {Function} callback\n\t * @returns {Function}\n\t */\n\tvar spread = function spread(callback) {\n\t  return function wrap(arr) {\n\t    return callback.apply(null, arr);\n\t  };\n\t};\n\n\t/**\n\t * Determines whether the payload is an error thrown by Axios\n\t *\n\t * @param {*} payload The value to test\n\t * @returns {boolean} True if the payload is an error thrown by Axios, otherwise false\n\t */\n\tvar isAxiosError = function isAxiosError(payload) {\n\t  return utils.isObject(payload) && (payload.isAxiosError === true);\n\t};\n\n\t/**\n\t * Create an instance of Axios\n\t *\n\t * @param {Object} defaultConfig The default config for the instance\n\t * @return {Axios} A new instance of Axios\n\t */\n\tfunction createInstance(defaultConfig) {\n\t  var context = new Axios_1(defaultConfig);\n\t  var instance = bind$a(Axios_1.prototype.request, context);\n\n\t  // Copy axios.prototype to instance\n\t  utils.extend(instance, Axios_1.prototype, context);\n\n\t  // Copy context to instance\n\t  utils.extend(instance, context);\n\n\t  // Factory for creating new instances\n\t  instance.create = function create(instanceConfig) {\n\t    return createInstance(mergeConfig(defaultConfig, instanceConfig));\n\t  };\n\n\t  return instance;\n\t}\n\n\t// Create the default instance to be exported\n\tvar axios = createInstance(defaults_1);\n\n\t// Expose Axios class to allow class inheritance\n\taxios.Axios = Axios_1;\n\n\t// Expose Cancel & CancelToken\n\taxios.Cancel = Cancel_1;\n\taxios.CancelToken = CancelToken_1;\n\taxios.isCancel = isCancel;\n\taxios.VERSION = data$1.version;\n\n\t// Expose all/spread\n\taxios.all = function all(promises) {\n\t  return Promise.all(promises);\n\t};\n\taxios.spread = spread;\n\n\t// Expose isAxiosError\n\taxios.isAxiosError = isAxiosError;\n\n\tvar axios_1 = axios;\n\n\t// Allow use of default import syntax in TypeScript\n\tvar _default = axios;\n\taxios_1.default = _default;\n\n\tvar axios$1 = axios_1;\n\n\tvar base$1 = createCommonjsModule(function (module, exports) {\n\t/* tslint:disable */\n\t/* eslint-disable */\n\t/**\n\t * OpenAI API\n\t * APIs for sampling from and fine-tuning language models\n\t *\n\t * The version of the OpenAPI document: 1.3.0\n\t *\n\t *\n\t * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n\t * https://openapi-generator.tech\n\t * Do not edit the class manually.\n\t */\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\texports.RequiredError = exports.BaseAPI = exports.COLLECTION_FORMATS = exports.BASE_PATH = void 0;\n\n\texports.BASE_PATH = \"https://api.openai.com/v1\".replace(/\\/+$/, \"\");\n\t/**\n\t *\n\t * @export\n\t */\n\texports.COLLECTION_FORMATS = {\n\t    csv: \",\",\n\t    ssv: \" \",\n\t    tsv: \"\\t\",\n\t    pipes: \"|\",\n\t};\n\t/**\n\t *\n\t * @export\n\t * @class BaseAPI\n\t */\n\tclass BaseAPI {\n\t    constructor(configuration, basePath = exports.BASE_PATH, axios = axios$1.default) {\n\t        this.basePath = basePath;\n\t        this.axios = axios;\n\t        if (configuration) {\n\t            this.configuration = configuration;\n\t            this.basePath = configuration.basePath || this.basePath;\n\t        }\n\t    }\n\t}\n\texports.BaseAPI = BaseAPI;\n\t/**\n\t *\n\t * @export\n\t * @class RequiredError\n\t * @extends {Error}\n\t */\n\tclass RequiredError extends Error {\n\t    constructor(field, msg) {\n\t        super(msg);\n\t        this.field = field;\n\t        this.name = \"RequiredError\";\n\t    }\n\t}\n\texports.RequiredError = RequiredError;\n\t});\n\n\tunwrapExports(base$1);\n\tvar base_1 = base$1.RequiredError;\n\tvar base_2 = base$1.BaseAPI;\n\tvar base_3 = base$1.COLLECTION_FORMATS;\n\tvar base_4 = base$1.BASE_PATH;\n\n\tvar common = createCommonjsModule(function (module, exports) {\n\t/* tslint:disable */\n\t/* eslint-disable */\n\t/**\n\t * OpenAI API\n\t * APIs for sampling from and fine-tuning language models\n\t *\n\t * The version of the OpenAPI document: 1.3.0\n\t *\n\t *\n\t * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n\t * https://openapi-generator.tech\n\t * Do not edit the class manually.\n\t */\n\tvar __awaiter = (commonjsGlobal && commonjsGlobal.__awaiter) || function (thisArg, _arguments, P, generator) {\n\t    function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n\t    return new (P || (P = Promise))(function (resolve, reject) {\n\t        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n\t        function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n\t        function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n\t        step((generator = generator.apply(thisArg, _arguments || [])).next());\n\t    });\n\t};\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\texports.createRequestFunction = exports.toPathString = exports.serializeDataIfNeeded = exports.setSearchParams = exports.setOAuthToObject = exports.setBearerAuthToObject = exports.setBasicAuthToObject = exports.setApiKeyToObject = exports.assertParamExists = exports.DUMMY_BASE_URL = void 0;\n\n\t/**\n\t *\n\t * @export\n\t */\n\texports.DUMMY_BASE_URL = 'https://example.com';\n\t/**\n\t *\n\t * @throws {RequiredError}\n\t * @export\n\t */\n\texports.assertParamExists = function (functionName, paramName, paramValue) {\n\t    if (paramValue === null || paramValue === undefined) {\n\t        throw new base$1.RequiredError(paramName, `Required parameter ${paramName} was null or undefined when calling ${functionName}.`);\n\t    }\n\t};\n\t/**\n\t *\n\t * @export\n\t */\n\texports.setApiKeyToObject = function (object, keyParamName, configuration) {\n\t    return __awaiter(this, void 0, void 0, function* () {\n\t        if (configuration && configuration.apiKey) {\n\t            const localVarApiKeyValue = typeof configuration.apiKey === 'function'\n\t                ? yield configuration.apiKey(keyParamName)\n\t                : yield configuration.apiKey;\n\t            object[keyParamName] = localVarApiKeyValue;\n\t        }\n\t    });\n\t};\n\t/**\n\t *\n\t * @export\n\t */\n\texports.setBasicAuthToObject = function (object, configuration) {\n\t    if (configuration && (configuration.username || configuration.password)) {\n\t        object[\"auth\"] = { username: configuration.username, password: configuration.password };\n\t    }\n\t};\n\t/**\n\t *\n\t * @export\n\t */\n\texports.setBearerAuthToObject = function (object, configuration) {\n\t    return __awaiter(this, void 0, void 0, function* () {\n\t        if (configuration && configuration.accessToken) {\n\t            const accessToken = typeof configuration.accessToken === 'function'\n\t                ? yield configuration.accessToken()\n\t                : yield configuration.accessToken;\n\t            object[\"Authorization\"] = \"Bearer \" + accessToken;\n\t        }\n\t    });\n\t};\n\t/**\n\t *\n\t * @export\n\t */\n\texports.setOAuthToObject = function (object, name, scopes, configuration) {\n\t    return __awaiter(this, void 0, void 0, function* () {\n\t        if (configuration && configuration.accessToken) {\n\t            const localVarAccessTokenValue = typeof configuration.accessToken === 'function'\n\t                ? yield configuration.accessToken(name, scopes)\n\t                : yield configuration.accessToken;\n\t            object[\"Authorization\"] = \"Bearer \" + localVarAccessTokenValue;\n\t        }\n\t    });\n\t};\n\tfunction setFlattenedQueryParams(urlSearchParams, parameter, key = \"\") {\n\t    if (parameter == null)\n\t        return;\n\t    if (typeof parameter === \"object\") {\n\t        if (Array.isArray(parameter)) {\n\t            parameter.forEach(item => setFlattenedQueryParams(urlSearchParams, item, key));\n\t        }\n\t        else {\n\t            Object.keys(parameter).forEach(currentKey => setFlattenedQueryParams(urlSearchParams, parameter[currentKey], `${key}${key !== '' ? '.' : ''}${currentKey}`));\n\t        }\n\t    }\n\t    else {\n\t        if (urlSearchParams.has(key)) {\n\t            urlSearchParams.append(key, parameter);\n\t        }\n\t        else {\n\t            urlSearchParams.set(key, parameter);\n\t        }\n\t    }\n\t}\n\t/**\n\t *\n\t * @export\n\t */\n\texports.setSearchParams = function (url, ...objects) {\n\t    const searchParams = new URLSearchParams(url.search);\n\t    setFlattenedQueryParams(searchParams, objects);\n\t    url.search = searchParams.toString();\n\t};\n\t/**\n\t *\n\t * @export\n\t */\n\texports.serializeDataIfNeeded = function (value, requestOptions, configuration) {\n\t    const nonString = typeof value !== 'string';\n\t    const needsSerialization = nonString && configuration && configuration.isJsonMime\n\t        ? configuration.isJsonMime(requestOptions.headers['Content-Type'])\n\t        : nonString;\n\t    return needsSerialization\n\t        ? JSON.stringify(value !== undefined ? value : {})\n\t        : (value || \"\");\n\t};\n\t/**\n\t *\n\t * @export\n\t */\n\texports.toPathString = function (url) {\n\t    return url.pathname + url.search + url.hash;\n\t};\n\t/**\n\t *\n\t * @export\n\t */\n\texports.createRequestFunction = function (axiosArgs, globalAxios, BASE_PATH, configuration) {\n\t    return (axios = globalAxios, basePath = BASE_PATH) => {\n\t        const axiosRequestArgs = Object.assign(Object.assign({}, axiosArgs.options), { url: ((configuration === null || configuration === void 0 ? void 0 : configuration.basePath) || basePath) + axiosArgs.url });\n\t        return axios.request(axiosRequestArgs);\n\t    };\n\t};\n\t});\n\n\tunwrapExports(common);\n\tvar common_1 = common.createRequestFunction;\n\tvar common_2 = common.toPathString;\n\tvar common_3 = common.serializeDataIfNeeded;\n\tvar common_4 = common.setSearchParams;\n\tvar common_5 = common.setOAuthToObject;\n\tvar common_6 = common.setBearerAuthToObject;\n\tvar common_7 = common.setBasicAuthToObject;\n\tvar common_8 = common.setApiKeyToObject;\n\tvar common_9 = common.assertParamExists;\n\tvar common_10 = common.DUMMY_BASE_URL;\n\n\tvar api = createCommonjsModule(function (module, exports) {\n\t/* tslint:disable */\n\t/* eslint-disable */\n\t/**\n\t * OpenAI API\n\t * APIs for sampling from and fine-tuning language models\n\t *\n\t * The version of the OpenAPI document: 1.3.0\n\t *\n\t *\n\t * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n\t * https://openapi-generator.tech\n\t * Do not edit the class manually.\n\t */\n\tvar __awaiter = (commonjsGlobal && commonjsGlobal.__awaiter) || function (thisArg, _arguments, P, generator) {\n\t    function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n\t    return new (P || (P = Promise))(function (resolve, reject) {\n\t        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n\t        function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n\t        function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n\t        step((generator = generator.apply(thisArg, _arguments || [])).next());\n\t    });\n\t};\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\texports.OpenAIApi = exports.OpenAIApiFactory = exports.OpenAIApiFp = exports.OpenAIApiAxiosParamCreator = exports.CreateImageRequestResponseFormatEnum = exports.CreateImageRequestSizeEnum = exports.ChatCompletionResponseMessageRoleEnum = exports.ChatCompletionRequestMessageRoleEnum = void 0;\n\n\t// Some imports not used depending on template conditions\n\t// @ts-ignore\n\n\t// @ts-ignore\n\n\texports.ChatCompletionRequestMessageRoleEnum = {\n\t    System: 'system',\n\t    User: 'user',\n\t    Assistant: 'assistant',\n\t    Function: 'function'\n\t};\n\texports.ChatCompletionResponseMessageRoleEnum = {\n\t    System: 'system',\n\t    User: 'user',\n\t    Assistant: 'assistant',\n\t    Function: 'function'\n\t};\n\texports.CreateImageRequestSizeEnum = {\n\t    _256x256: '256x256',\n\t    _512x512: '512x512',\n\t    _1024x1024: '1024x1024'\n\t};\n\texports.CreateImageRequestResponseFormatEnum = {\n\t    Url: 'url',\n\t    B64Json: 'b64_json'\n\t};\n\t/**\n\t * OpenAIApi - axios parameter creator\n\t * @export\n\t */\n\texports.OpenAIApiAxiosParamCreator = function (configuration) {\n\t    return {\n\t        /**\n\t         *\n\t         * @summary Immediately cancel a fine-tune job.\n\t         * @param {string} fineTuneId The ID of the fine-tune job to cancel\n\t         * @param {*} [options] Override http request option.\n\t         * @throws {RequiredError}\n\t         */\n\t        cancelFineTune: (fineTuneId, options = {}) => __awaiter(this, void 0, void 0, function* () {\n\t            // verify required parameter 'fineTuneId' is not null or undefined\n\t            common.assertParamExists('cancelFineTune', 'fineTuneId', fineTuneId);\n\t            const localVarPath = `/fine-tunes/{fine_tune_id}/cancel`\n\t                .replace(`{${\"fine_tune_id\"}}`, encodeURIComponent(String(fineTuneId)));\n\t            // use dummy base URL string because the URL constructor only accepts absolute URLs.\n\t            const localVarUrlObj = new URL(localVarPath, common.DUMMY_BASE_URL);\n\t            let baseOptions;\n\t            if (configuration) {\n\t                baseOptions = configuration.baseOptions;\n\t            }\n\t            const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);\n\t            const localVarHeaderParameter = {};\n\t            const localVarQueryParameter = {};\n\t            common.setSearchParams(localVarUrlObj, localVarQueryParameter);\n\t            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};\n\t            localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);\n\t            return {\n\t                url: common.toPathString(localVarUrlObj),\n\t                options: localVarRequestOptions,\n\t            };\n\t        }),\n\t        /**\n\t         *\n\t         * @summary Answers the specified question using the provided documents and examples.  The endpoint first [searches](/docs/api-reference/searches) over provided documents or files to find relevant context. The relevant context is combined with the provided examples and question to create the prompt for [completion](/docs/api-reference/completions).\n\t         * @param {CreateAnswerRequest} createAnswerRequest\n\t         * @param {*} [options] Override http request option.\n\t         * @deprecated\n\t         * @throws {RequiredError}\n\t         */\n\t        createAnswer: (createAnswerRequest, options = {}) => __awaiter(this, void 0, void 0, function* () {\n\t            // verify required parameter 'createAnswerRequest' is not null or undefined\n\t            common.assertParamExists('createAnswer', 'createAnswerRequest', createAnswerRequest);\n\t            const localVarPath = `/answers`;\n\t            // use dummy base URL string because the URL constructor only accepts absolute URLs.\n\t            const localVarUrlObj = new URL(localVarPath, common.DUMMY_BASE_URL);\n\t            let baseOptions;\n\t            if (configuration) {\n\t                baseOptions = configuration.baseOptions;\n\t            }\n\t            const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);\n\t            const localVarHeaderParameter = {};\n\t            const localVarQueryParameter = {};\n\t            localVarHeaderParameter['Content-Type'] = 'application/json';\n\t            common.setSearchParams(localVarUrlObj, localVarQueryParameter);\n\t            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};\n\t            localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);\n\t            localVarRequestOptions.data = common.serializeDataIfNeeded(createAnswerRequest, localVarRequestOptions, configuration);\n\t            return {\n\t                url: common.toPathString(localVarUrlObj),\n\t                options: localVarRequestOptions,\n\t            };\n\t        }),\n\t        /**\n\t         *\n\t         * @summary Creates a model response for the given chat conversation.\n\t         * @param {CreateChatCompletionRequest} createChatCompletionRequest\n\t         * @param {*} [options] Override http request option.\n\t         * @throws {RequiredError}\n\t         */\n\t        createChatCompletion: (createChatCompletionRequest, options = {}) => __awaiter(this, void 0, void 0, function* () {\n\t            // verify required parameter 'createChatCompletionRequest' is not null or undefined\n\t            common.assertParamExists('createChatCompletion', 'createChatCompletionRequest', createChatCompletionRequest);\n\t            const localVarPath = `/chat/completions`;\n\t            // use dummy base URL string because the URL constructor only accepts absolute URLs.\n\t            const localVarUrlObj = new URL(localVarPath, common.DUMMY_BASE_URL);\n\t            let baseOptions;\n\t            if (configuration) {\n\t                baseOptions = configuration.baseOptions;\n\t            }\n\t            const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);\n\t            const localVarHeaderParameter = {};\n\t            const localVarQueryParameter = {};\n\t            localVarHeaderParameter['Content-Type'] = 'application/json';\n\t            common.setSearchParams(localVarUrlObj, localVarQueryParameter);\n\t            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};\n\t            localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);\n\t            localVarRequestOptions.data = common.serializeDataIfNeeded(createChatCompletionRequest, localVarRequestOptions, configuration);\n\t            return {\n\t                url: common.toPathString(localVarUrlObj),\n\t                options: localVarRequestOptions,\n\t            };\n\t        }),\n\t        /**\n\t         *\n\t         * @summary Classifies the specified `query` using provided examples.  The endpoint first [searches](/docs/api-reference/searches) over the labeled examples to select the ones most relevant for the particular query. Then, the relevant examples are combined with the query to construct a prompt to produce the final label via the [completions](/docs/api-reference/completions) endpoint.  Labeled examples can be provided via an uploaded `file`, or explicitly listed in the request using the `examples` parameter for quick tests and small scale use cases.\n\t         * @param {CreateClassificationRequest} createClassificationRequest\n\t         * @param {*} [options] Override http request option.\n\t         * @deprecated\n\t         * @throws {RequiredError}\n\t         */\n\t        createClassification: (createClassificationRequest, options = {}) => __awaiter(this, void 0, void 0, function* () {\n\t            // verify required parameter 'createClassificationRequest' is not null or undefined\n\t            common.assertParamExists('createClassification', 'createClassificationRequest', createClassificationRequest);\n\t            const localVarPath = `/classifications`;\n\t            // use dummy base URL string because the URL constructor only accepts absolute URLs.\n\t            const localVarUrlObj = new URL(localVarPath, common.DUMMY_BASE_URL);\n\t            let baseOptions;\n\t            if (configuration) {\n\t                baseOptions = configuration.baseOptions;\n\t            }\n\t            const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);\n\t            const localVarHeaderParameter = {};\n\t            const localVarQueryParameter = {};\n\t            localVarHeaderParameter['Content-Type'] = 'application/json';\n\t            common.setSearchParams(localVarUrlObj, localVarQueryParameter);\n\t            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};\n\t            localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);\n\t            localVarRequestOptions.data = common.serializeDataIfNeeded(createClassificationRequest, localVarRequestOptions, configuration);\n\t            return {\n\t                url: common.toPathString(localVarUrlObj),\n\t                options: localVarRequestOptions,\n\t            };\n\t        }),\n\t        /**\n\t         *\n\t         * @summary Creates a completion for the provided prompt and parameters.\n\t         * @param {CreateCompletionRequest} createCompletionRequest\n\t         * @param {*} [options] Override http request option.\n\t         * @throws {RequiredError}\n\t         */\n\t        createCompletion: (createCompletionRequest, options = {}) => __awaiter(this, void 0, void 0, function* () {\n\t            // verify required parameter 'createCompletionRequest' is not null or undefined\n\t            common.assertParamExists('createCompletion', 'createCompletionRequest', createCompletionRequest);\n\t            const localVarPath = `/completions`;\n\t            // use dummy base URL string because the URL constructor only accepts absolute URLs.\n\t            const localVarUrlObj = new URL(localVarPath, common.DUMMY_BASE_URL);\n\t            let baseOptions;\n\t            if (configuration) {\n\t                baseOptions = configuration.baseOptions;\n\t            }\n\t            const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);\n\t            const localVarHeaderParameter = {};\n\t            const localVarQueryParameter = {};\n\t            localVarHeaderParameter['Content-Type'] = 'application/json';\n\t            common.setSearchParams(localVarUrlObj, localVarQueryParameter);\n\t            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};\n\t            localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);\n\t            localVarRequestOptions.data = common.serializeDataIfNeeded(createCompletionRequest, localVarRequestOptions, configuration);\n\t            return {\n\t                url: common.toPathString(localVarUrlObj),\n\t                options: localVarRequestOptions,\n\t            };\n\t        }),\n\t        /**\n\t         *\n\t         * @summary Creates a new edit for the provided input, instruction, and parameters.\n\t         * @param {CreateEditRequest} createEditRequest\n\t         * @param {*} [options] Override http request option.\n\t         * @throws {RequiredError}\n\t         */\n\t        createEdit: (createEditRequest, options = {}) => __awaiter(this, void 0, void 0, function* () {\n\t            // verify required parameter 'createEditRequest' is not null or undefined\n\t            common.assertParamExists('createEdit', 'createEditRequest', createEditRequest);\n\t            const localVarPath = `/edits`;\n\t            // use dummy base URL string because the URL constructor only accepts absolute URLs.\n\t            const localVarUrlObj = new URL(localVarPath, common.DUMMY_BASE_URL);\n\t            let baseOptions;\n\t            if (configuration) {\n\t                baseOptions = configuration.baseOptions;\n\t            }\n\t            const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);\n\t            const localVarHeaderParameter = {};\n\t            const localVarQueryParameter = {};\n\t            localVarHeaderParameter['Content-Type'] = 'application/json';\n\t            common.setSearchParams(localVarUrlObj, localVarQueryParameter);\n\t            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};\n\t            localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);\n\t            localVarRequestOptions.data = common.serializeDataIfNeeded(createEditRequest, localVarRequestOptions, configuration);\n\t            return {\n\t                url: common.toPathString(localVarUrlObj),\n\t                options: localVarRequestOptions,\n\t            };\n\t        }),\n\t        /**\n\t         *\n\t         * @summary Creates an embedding vector representing the input text.\n\t         * @param {CreateEmbeddingRequest} createEmbeddingRequest\n\t         * @param {*} [options] Override http request option.\n\t         * @throws {RequiredError}\n\t         */\n\t        createEmbedding: (createEmbeddingRequest, options = {}) => __awaiter(this, void 0, void 0, function* () {\n\t            // verify required parameter 'createEmbeddingRequest' is not null or undefined\n\t            common.assertParamExists('createEmbedding', 'createEmbeddingRequest', createEmbeddingRequest);\n\t            const localVarPath = `/embeddings`;\n\t            // use dummy base URL string because the URL constructor only accepts absolute URLs.\n\t            const localVarUrlObj = new URL(localVarPath, common.DUMMY_BASE_URL);\n\t            let baseOptions;\n\t            if (configuration) {\n\t                baseOptions = configuration.baseOptions;\n\t            }\n\t            const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);\n\t            const localVarHeaderParameter = {};\n\t            const localVarQueryParameter = {};\n\t            localVarHeaderParameter['Content-Type'] = 'application/json';\n\t            common.setSearchParams(localVarUrlObj, localVarQueryParameter);\n\t            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};\n\t            localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);\n\t            localVarRequestOptions.data = common.serializeDataIfNeeded(createEmbeddingRequest, localVarRequestOptions, configuration);\n\t            return {\n\t                url: common.toPathString(localVarUrlObj),\n\t                options: localVarRequestOptions,\n\t            };\n\t        }),\n\t        /**\n\t         *\n\t         * @summary Upload a file that contains document(s) to be used across various endpoints/features. Currently, the size of all the files uploaded by one organization can be up to 1 GB. Please contact us if you need to increase the storage limit.\n\t         * @param {File} file Name of the [JSON Lines](https://jsonlines.readthedocs.io/en/latest/) file to be uploaded.  If the &#x60;purpose&#x60; is set to \\\\\\&quot;fine-tune\\\\\\&quot;, each line is a JSON record with \\\\\\&quot;prompt\\\\\\&quot; and \\\\\\&quot;completion\\\\\\&quot; fields representing your [training examples](/docs/guides/fine-tuning/prepare-training-data).\n\t         * @param {string} purpose The intended purpose of the uploaded documents.  Use \\\\\\&quot;fine-tune\\\\\\&quot; for [Fine-tuning](/docs/api-reference/fine-tunes). This allows us to validate the format of the uploaded file.\n\t         * @param {*} [options] Override http request option.\n\t         * @throws {RequiredError}\n\t         */\n\t        createFile: (file, purpose, options = {}) => __awaiter(this, void 0, void 0, function* () {\n\t            // verify required parameter 'file' is not null or undefined\n\t            common.assertParamExists('createFile', 'file', file);\n\t            // verify required parameter 'purpose' is not null or undefined\n\t            common.assertParamExists('createFile', 'purpose', purpose);\n\t            const localVarPath = `/files`;\n\t            // use dummy base URL string because the URL constructor only accepts absolute URLs.\n\t            const localVarUrlObj = new URL(localVarPath, common.DUMMY_BASE_URL);\n\t            let baseOptions;\n\t            if (configuration) {\n\t                baseOptions = configuration.baseOptions;\n\t            }\n\t            const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);\n\t            const localVarHeaderParameter = {};\n\t            const localVarQueryParameter = {};\n\t            const localVarFormParams = new ((configuration && configuration.formDataCtor) || FormData)();\n\t            if (file !== undefined) {\n\t                localVarFormParams.append('file', file);\n\t            }\n\t            if (purpose !== undefined) {\n\t                localVarFormParams.append('purpose', purpose);\n\t            }\n\t            localVarHeaderParameter['Content-Type'] = 'multipart/form-data';\n\t            common.setSearchParams(localVarUrlObj, localVarQueryParameter);\n\t            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};\n\t            localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), localVarFormParams.getHeaders()), headersFromBaseOptions), options.headers);\n\t            localVarRequestOptions.data = localVarFormParams;\n\t            return {\n\t                url: common.toPathString(localVarUrlObj),\n\t                options: localVarRequestOptions,\n\t            };\n\t        }),\n\t        /**\n\t         *\n\t         * @summary Creates a job that fine-tunes a specified model from a given dataset.  Response includes details of the enqueued job including job status and the name of the fine-tuned models once complete.  [Learn more about Fine-tuning](/docs/guides/fine-tuning)\n\t         * @param {CreateFineTuneRequest} createFineTuneRequest\n\t         * @param {*} [options] Override http request option.\n\t         * @throws {RequiredError}\n\t         */\n\t        createFineTune: (createFineTuneRequest, options = {}) => __awaiter(this, void 0, void 0, function* () {\n\t            // verify required parameter 'createFineTuneRequest' is not null or undefined\n\t            common.assertParamExists('createFineTune', 'createFineTuneRequest', createFineTuneRequest);\n\t            const localVarPath = `/fine-tunes`;\n\t            // use dummy base URL string because the URL constructor only accepts absolute URLs.\n\t            const localVarUrlObj = new URL(localVarPath, common.DUMMY_BASE_URL);\n\t            let baseOptions;\n\t            if (configuration) {\n\t                baseOptions = configuration.baseOptions;\n\t            }\n\t            const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);\n\t            const localVarHeaderParameter = {};\n\t            const localVarQueryParameter = {};\n\t            localVarHeaderParameter['Content-Type'] = 'application/json';\n\t            common.setSearchParams(localVarUrlObj, localVarQueryParameter);\n\t            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};\n\t            localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);\n\t            localVarRequestOptions.data = common.serializeDataIfNeeded(createFineTuneRequest, localVarRequestOptions, configuration);\n\t            return {\n\t                url: common.toPathString(localVarUrlObj),\n\t                options: localVarRequestOptions,\n\t            };\n\t        }),\n\t        /**\n\t         *\n\t         * @summary Creates an image given a prompt.\n\t         * @param {CreateImageRequest} createImageRequest\n\t         * @param {*} [options] Override http request option.\n\t         * @throws {RequiredError}\n\t         */\n\t        createImage: (createImageRequest, options = {}) => __awaiter(this, void 0, void 0, function* () {\n\t            // verify required parameter 'createImageRequest' is not null or undefined\n\t            common.assertParamExists('createImage', 'createImageRequest', createImageRequest);\n\t            const localVarPath = `/images/generations`;\n\t            // use dummy base URL string because the URL constructor only accepts absolute URLs.\n\t            const localVarUrlObj = new URL(localVarPath, common.DUMMY_BASE_URL);\n\t            let baseOptions;\n\t            if (configuration) {\n\t                baseOptions = configuration.baseOptions;\n\t            }\n\t            const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);\n\t            const localVarHeaderParameter = {};\n\t            const localVarQueryParameter = {};\n\t            localVarHeaderParameter['Content-Type'] = 'application/json';\n\t            common.setSearchParams(localVarUrlObj, localVarQueryParameter);\n\t            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};\n\t            localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);\n\t            localVarRequestOptions.data = common.serializeDataIfNeeded(createImageRequest, localVarRequestOptions, configuration);\n\t            return {\n\t                url: common.toPathString(localVarUrlObj),\n\t                options: localVarRequestOptions,\n\t            };\n\t        }),\n\t        /**\n\t         *\n\t         * @summary Creates an edited or extended image given an original image and a prompt.\n\t         * @param {File} image The image to edit. Must be a valid PNG file, less than 4MB, and square. If mask is not provided, image must have transparency, which will be used as the mask.\n\t         * @param {string} prompt A text description of the desired image(s). The maximum length is 1000 characters.\n\t         * @param {File} [mask] An additional image whose fully transparent areas (e.g. where alpha is zero) indicate where &#x60;image&#x60; should be edited. Must be a valid PNG file, less than 4MB, and have the same dimensions as &#x60;image&#x60;.\n\t         * @param {number} [n] The number of images to generate. Must be between 1 and 10.\n\t         * @param {string} [size] The size of the generated images. Must be one of &#x60;256x256&#x60;, &#x60;512x512&#x60;, or &#x60;1024x1024&#x60;.\n\t         * @param {string} [responseFormat] The format in which the generated images are returned. Must be one of &#x60;url&#x60; or &#x60;b64_json&#x60;.\n\t         * @param {string} [user] A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. [Learn more](/docs/guides/safety-best-practices/end-user-ids).\n\t         * @param {*} [options] Override http request option.\n\t         * @throws {RequiredError}\n\t         */\n\t        createImageEdit: (image, prompt, mask, n, size, responseFormat, user, options = {}) => __awaiter(this, void 0, void 0, function* () {\n\t            // verify required parameter 'image' is not null or undefined\n\t            common.assertParamExists('createImageEdit', 'image', image);\n\t            // verify required parameter 'prompt' is not null or undefined\n\t            common.assertParamExists('createImageEdit', 'prompt', prompt);\n\t            const localVarPath = `/images/edits`;\n\t            // use dummy base URL string because the URL constructor only accepts absolute URLs.\n\t            const localVarUrlObj = new URL(localVarPath, common.DUMMY_BASE_URL);\n\t            let baseOptions;\n\t            if (configuration) {\n\t                baseOptions = configuration.baseOptions;\n\t            }\n\t            const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);\n\t            const localVarHeaderParameter = {};\n\t            const localVarQueryParameter = {};\n\t            const localVarFormParams = new ((configuration && configuration.formDataCtor) || FormData)();\n\t            if (image !== undefined) {\n\t                localVarFormParams.append('image', image);\n\t            }\n\t            if (mask !== undefined) {\n\t                localVarFormParams.append('mask', mask);\n\t            }\n\t            if (prompt !== undefined) {\n\t                localVarFormParams.append('prompt', prompt);\n\t            }\n\t            if (n !== undefined) {\n\t                localVarFormParams.append('n', n);\n\t            }\n\t            if (size !== undefined) {\n\t                localVarFormParams.append('size', size);\n\t            }\n\t            if (responseFormat !== undefined) {\n\t                localVarFormParams.append('response_format', responseFormat);\n\t            }\n\t            if (user !== undefined) {\n\t                localVarFormParams.append('user', user);\n\t            }\n\t            localVarHeaderParameter['Content-Type'] = 'multipart/form-data';\n\t            common.setSearchParams(localVarUrlObj, localVarQueryParameter);\n\t            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};\n\t            localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), localVarFormParams.getHeaders()), headersFromBaseOptions), options.headers);\n\t            localVarRequestOptions.data = localVarFormParams;\n\t            return {\n\t                url: common.toPathString(localVarUrlObj),\n\t                options: localVarRequestOptions,\n\t            };\n\t        }),\n\t        /**\n\t         *\n\t         * @summary Creates a variation of a given image.\n\t         * @param {File} image The image to use as the basis for the variation(s). Must be a valid PNG file, less than 4MB, and square.\n\t         * @param {number} [n] The number of images to generate. Must be between 1 and 10.\n\t         * @param {string} [size] The size of the generated images. Must be one of &#x60;256x256&#x60;, &#x60;512x512&#x60;, or &#x60;1024x1024&#x60;.\n\t         * @param {string} [responseFormat] The format in which the generated images are returned. Must be one of &#x60;url&#x60; or &#x60;b64_json&#x60;.\n\t         * @param {string} [user] A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. [Learn more](/docs/guides/safety-best-practices/end-user-ids).\n\t         * @param {*} [options] Override http request option.\n\t         * @throws {RequiredError}\n\t         */\n\t        createImageVariation: (image, n, size, responseFormat, user, options = {}) => __awaiter(this, void 0, void 0, function* () {\n\t            // verify required parameter 'image' is not null or undefined\n\t            common.assertParamExists('createImageVariation', 'image', image);\n\t            const localVarPath = `/images/variations`;\n\t            // use dummy base URL string because the URL constructor only accepts absolute URLs.\n\t            const localVarUrlObj = new URL(localVarPath, common.DUMMY_BASE_URL);\n\t            let baseOptions;\n\t            if (configuration) {\n\t                baseOptions = configuration.baseOptions;\n\t            }\n\t            const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);\n\t            const localVarHeaderParameter = {};\n\t            const localVarQueryParameter = {};\n\t            const localVarFormParams = new ((configuration && configuration.formDataCtor) || FormData)();\n\t            if (image !== undefined) {\n\t                localVarFormParams.append('image', image);\n\t            }\n\t            if (n !== undefined) {\n\t                localVarFormParams.append('n', n);\n\t            }\n\t            if (size !== undefined) {\n\t                localVarFormParams.append('size', size);\n\t            }\n\t            if (responseFormat !== undefined) {\n\t                localVarFormParams.append('response_format', responseFormat);\n\t            }\n\t            if (user !== undefined) {\n\t                localVarFormParams.append('user', user);\n\t            }\n\t            localVarHeaderParameter['Content-Type'] = 'multipart/form-data';\n\t            common.setSearchParams(localVarUrlObj, localVarQueryParameter);\n\t            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};\n\t            localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), localVarFormParams.getHeaders()), headersFromBaseOptions), options.headers);\n\t            localVarRequestOptions.data = localVarFormParams;\n\t            return {\n\t                url: common.toPathString(localVarUrlObj),\n\t                options: localVarRequestOptions,\n\t            };\n\t        }),\n\t        /**\n\t         *\n\t         * @summary Classifies if text violates OpenAI\\'s Content Policy\n\t         * @param {CreateModerationRequest} createModerationRequest\n\t         * @param {*} [options] Override http request option.\n\t         * @throws {RequiredError}\n\t         */\n\t        createModeration: (createModerationRequest, options = {}) => __awaiter(this, void 0, void 0, function* () {\n\t            // verify required parameter 'createModerationRequest' is not null or undefined\n\t            common.assertParamExists('createModeration', 'createModerationRequest', createModerationRequest);\n\t            const localVarPath = `/moderations`;\n\t            // use dummy base URL string because the URL constructor only accepts absolute URLs.\n\t            const localVarUrlObj = new URL(localVarPath, common.DUMMY_BASE_URL);\n\t            let baseOptions;\n\t            if (configuration) {\n\t                baseOptions = configuration.baseOptions;\n\t            }\n\t            const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);\n\t            const localVarHeaderParameter = {};\n\t            const localVarQueryParameter = {};\n\t            localVarHeaderParameter['Content-Type'] = 'application/json';\n\t            common.setSearchParams(localVarUrlObj, localVarQueryParameter);\n\t            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};\n\t            localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);\n\t            localVarRequestOptions.data = common.serializeDataIfNeeded(createModerationRequest, localVarRequestOptions, configuration);\n\t            return {\n\t                url: common.toPathString(localVarUrlObj),\n\t                options: localVarRequestOptions,\n\t            };\n\t        }),\n\t        /**\n\t         *\n\t         * @summary The search endpoint computes similarity scores between provided query and documents. Documents can be passed directly to the API if there are no more than 200 of them.  To go beyond the 200 document limit, documents can be processed offline and then used for efficient retrieval at query time. When `file` is set, the search endpoint searches over all the documents in the given file and returns up to the `max_rerank` number of documents. These documents will be returned along with their search scores.  The similarity score is a positive score that usually ranges from 0 to 300 (but can sometimes go higher), where a score above 200 usually means the document is semantically similar to the query.\n\t         * @param {string} engineId The ID of the engine to use for this request.  You can select one of &#x60;ada&#x60;, &#x60;babbage&#x60;, &#x60;curie&#x60;, or &#x60;davinci&#x60;.\n\t         * @param {CreateSearchRequest} createSearchRequest\n\t         * @param {*} [options] Override http request option.\n\t         * @deprecated\n\t         * @throws {RequiredError}\n\t         */\n\t        createSearch: (engineId, createSearchRequest, options = {}) => __awaiter(this, void 0, void 0, function* () {\n\t            // verify required parameter 'engineId' is not null or undefined\n\t            common.assertParamExists('createSearch', 'engineId', engineId);\n\t            // verify required parameter 'createSearchRequest' is not null or undefined\n\t            common.assertParamExists('createSearch', 'createSearchRequest', createSearchRequest);\n\t            const localVarPath = `/engines/{engine_id}/search`\n\t                .replace(`{${\"engine_id\"}}`, encodeURIComponent(String(engineId)));\n\t            // use dummy base URL string because the URL constructor only accepts absolute URLs.\n\t            const localVarUrlObj = new URL(localVarPath, common.DUMMY_BASE_URL);\n\t            let baseOptions;\n\t            if (configuration) {\n\t                baseOptions = configuration.baseOptions;\n\t            }\n\t            const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);\n\t            const localVarHeaderParameter = {};\n\t            const localVarQueryParameter = {};\n\t            localVarHeaderParameter['Content-Type'] = 'application/json';\n\t            common.setSearchParams(localVarUrlObj, localVarQueryParameter);\n\t            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};\n\t            localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);\n\t            localVarRequestOptions.data = common.serializeDataIfNeeded(createSearchRequest, localVarRequestOptions, configuration);\n\t            return {\n\t                url: common.toPathString(localVarUrlObj),\n\t                options: localVarRequestOptions,\n\t            };\n\t        }),\n\t        /**\n\t         *\n\t         * @summary Transcribes audio into the input language.\n\t         * @param {File} file The audio file object (not file name) to transcribe, in one of these formats: mp3, mp4, mpeg, mpga, m4a, wav, or webm.\n\t         * @param {string} model ID of the model to use. Only &#x60;whisper-1&#x60; is currently available.\n\t         * @param {string} [prompt] An optional text to guide the model\\\\\\&#39;s style or continue a previous audio segment. The [prompt](/docs/guides/speech-to-text/prompting) should match the audio language.\n\t         * @param {string} [responseFormat] The format of the transcript output, in one of these options: json, text, srt, verbose_json, or vtt.\n\t         * @param {number} [temperature] The sampling temperature, between 0 and 1. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. If set to 0, the model will use [log probability](https://en.wikipedia.org/wiki/Log_probability) to automatically increase the temperature until certain thresholds are hit.\n\t         * @param {string} [language] The language of the input audio. Supplying the input language in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format will improve accuracy and latency.\n\t         * @param {*} [options] Override http request option.\n\t         * @throws {RequiredError}\n\t         */\n\t        createTranscription: (file, model, prompt, responseFormat, temperature, language, options = {}) => __awaiter(this, void 0, void 0, function* () {\n\t            // verify required parameter 'file' is not null or undefined\n\t            common.assertParamExists('createTranscription', 'file', file);\n\t            // verify required parameter 'model' is not null or undefined\n\t            common.assertParamExists('createTranscription', 'model', model);\n\t            const localVarPath = `/audio/transcriptions`;\n\t            // use dummy base URL string because the URL constructor only accepts absolute URLs.\n\t            const localVarUrlObj = new URL(localVarPath, common.DUMMY_BASE_URL);\n\t            let baseOptions;\n\t            if (configuration) {\n\t                baseOptions = configuration.baseOptions;\n\t            }\n\t            const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);\n\t            const localVarHeaderParameter = {};\n\t            const localVarQueryParameter = {};\n\t            const localVarFormParams = new ((configuration && configuration.formDataCtor) || FormData)();\n\t            if (file !== undefined) {\n\t                localVarFormParams.append('file', file);\n\t            }\n\t            if (model !== undefined) {\n\t                localVarFormParams.append('model', model);\n\t            }\n\t            if (prompt !== undefined) {\n\t                localVarFormParams.append('prompt', prompt);\n\t            }\n\t            if (responseFormat !== undefined) {\n\t                localVarFormParams.append('response_format', responseFormat);\n\t            }\n\t            if (temperature !== undefined) {\n\t                localVarFormParams.append('temperature', temperature);\n\t            }\n\t            if (language !== undefined) {\n\t                localVarFormParams.append('language', language);\n\t            }\n\t            localVarHeaderParameter['Content-Type'] = 'multipart/form-data';\n\t            common.setSearchParams(localVarUrlObj, localVarQueryParameter);\n\t            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};\n\t            localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), localVarFormParams.getHeaders()), headersFromBaseOptions), options.headers);\n\t            localVarRequestOptions.data = localVarFormParams;\n\t            return {\n\t                url: common.toPathString(localVarUrlObj),\n\t                options: localVarRequestOptions,\n\t            };\n\t        }),\n\t        /**\n\t         *\n\t         * @summary Translates audio into into English.\n\t         * @param {File} file The audio file object (not file name) translate, in one of these formats: mp3, mp4, mpeg, mpga, m4a, wav, or webm.\n\t         * @param {string} model ID of the model to use. Only &#x60;whisper-1&#x60; is currently available.\n\t         * @param {string} [prompt] An optional text to guide the model\\\\\\&#39;s style or continue a previous audio segment. The [prompt](/docs/guides/speech-to-text/prompting) should be in English.\n\t         * @param {string} [responseFormat] The format of the transcript output, in one of these options: json, text, srt, verbose_json, or vtt.\n\t         * @param {number} [temperature] The sampling temperature, between 0 and 1. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. If set to 0, the model will use [log probability](https://en.wikipedia.org/wiki/Log_probability) to automatically increase the temperature until certain thresholds are hit.\n\t         * @param {*} [options] Override http request option.\n\t         * @throws {RequiredError}\n\t         */\n\t        createTranslation: (file, model, prompt, responseFormat, temperature, options = {}) => __awaiter(this, void 0, void 0, function* () {\n\t            // verify required parameter 'file' is not null or undefined\n\t            common.assertParamExists('createTranslation', 'file', file);\n\t            // verify required parameter 'model' is not null or undefined\n\t            common.assertParamExists('createTranslation', 'model', model);\n\t            const localVarPath = `/audio/translations`;\n\t            // use dummy base URL string because the URL constructor only accepts absolute URLs.\n\t            const localVarUrlObj = new URL(localVarPath, common.DUMMY_BASE_URL);\n\t            let baseOptions;\n\t            if (configuration) {\n\t                baseOptions = configuration.baseOptions;\n\t            }\n\t            const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);\n\t            const localVarHeaderParameter = {};\n\t            const localVarQueryParameter = {};\n\t            const localVarFormParams = new ((configuration && configuration.formDataCtor) || FormData)();\n\t            if (file !== undefined) {\n\t                localVarFormParams.append('file', file);\n\t            }\n\t            if (model !== undefined) {\n\t                localVarFormParams.append('model', model);\n\t            }\n\t            if (prompt !== undefined) {\n\t                localVarFormParams.append('prompt', prompt);\n\t            }\n\t            if (responseFormat !== undefined) {\n\t                localVarFormParams.append('response_format', responseFormat);\n\t            }\n\t            if (temperature !== undefined) {\n\t                localVarFormParams.append('temperature', temperature);\n\t            }\n\t            localVarHeaderParameter['Content-Type'] = 'multipart/form-data';\n\t            common.setSearchParams(localVarUrlObj, localVarQueryParameter);\n\t            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};\n\t            localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), localVarFormParams.getHeaders()), headersFromBaseOptions), options.headers);\n\t            localVarRequestOptions.data = localVarFormParams;\n\t            return {\n\t                url: common.toPathString(localVarUrlObj),\n\t                options: localVarRequestOptions,\n\t            };\n\t        }),\n\t        /**\n\t         *\n\t         * @summary Delete a file.\n\t         * @param {string} fileId The ID of the file to use for this request\n\t         * @param {*} [options] Override http request option.\n\t         * @throws {RequiredError}\n\t         */\n\t        deleteFile: (fileId, options = {}) => __awaiter(this, void 0, void 0, function* () {\n\t            // verify required parameter 'fileId' is not null or undefined\n\t            common.assertParamExists('deleteFile', 'fileId', fileId);\n\t            const localVarPath = `/files/{file_id}`\n\t                .replace(`{${\"file_id\"}}`, encodeURIComponent(String(fileId)));\n\t            // use dummy base URL string because the URL constructor only accepts absolute URLs.\n\t            const localVarUrlObj = new URL(localVarPath, common.DUMMY_BASE_URL);\n\t            let baseOptions;\n\t            if (configuration) {\n\t                baseOptions = configuration.baseOptions;\n\t            }\n\t            const localVarRequestOptions = Object.assign(Object.assign({ method: 'DELETE' }, baseOptions), options);\n\t            const localVarHeaderParameter = {};\n\t            const localVarQueryParameter = {};\n\t            common.setSearchParams(localVarUrlObj, localVarQueryParameter);\n\t            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};\n\t            localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);\n\t            return {\n\t                url: common.toPathString(localVarUrlObj),\n\t                options: localVarRequestOptions,\n\t            };\n\t        }),\n\t        /**\n\t         *\n\t         * @summary Delete a fine-tuned model. You must have the Owner role in your organization.\n\t         * @param {string} model The model to delete\n\t         * @param {*} [options] Override http request option.\n\t         * @throws {RequiredError}\n\t         */\n\t        deleteModel: (model, options = {}) => __awaiter(this, void 0, void 0, function* () {\n\t            // verify required parameter 'model' is not null or undefined\n\t            common.assertParamExists('deleteModel', 'model', model);\n\t            const localVarPath = `/models/{model}`\n\t                .replace(`{${\"model\"}}`, encodeURIComponent(String(model)));\n\t            // use dummy base URL string because the URL constructor only accepts absolute URLs.\n\t            const localVarUrlObj = new URL(localVarPath, common.DUMMY_BASE_URL);\n\t            let baseOptions;\n\t            if (configuration) {\n\t                baseOptions = configuration.baseOptions;\n\t            }\n\t            const localVarRequestOptions = Object.assign(Object.assign({ method: 'DELETE' }, baseOptions), options);\n\t            const localVarHeaderParameter = {};\n\t            const localVarQueryParameter = {};\n\t            common.setSearchParams(localVarUrlObj, localVarQueryParameter);\n\t            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};\n\t            localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);\n\t            return {\n\t                url: common.toPathString(localVarUrlObj),\n\t                options: localVarRequestOptions,\n\t            };\n\t        }),\n\t        /**\n\t         *\n\t         * @summary Returns the contents of the specified file\n\t         * @param {string} fileId The ID of the file to use for this request\n\t         * @param {*} [options] Override http request option.\n\t         * @throws {RequiredError}\n\t         */\n\t        downloadFile: (fileId, options = {}) => __awaiter(this, void 0, void 0, function* () {\n\t            // verify required parameter 'fileId' is not null or undefined\n\t            common.assertParamExists('downloadFile', 'fileId', fileId);\n\t            const localVarPath = `/files/{file_id}/content`\n\t                .replace(`{${\"file_id\"}}`, encodeURIComponent(String(fileId)));\n\t            // use dummy base URL string because the URL constructor only accepts absolute URLs.\n\t            const localVarUrlObj = new URL(localVarPath, common.DUMMY_BASE_URL);\n\t            let baseOptions;\n\t            if (configuration) {\n\t                baseOptions = configuration.baseOptions;\n\t            }\n\t            const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);\n\t            const localVarHeaderParameter = {};\n\t            const localVarQueryParameter = {};\n\t            common.setSearchParams(localVarUrlObj, localVarQueryParameter);\n\t            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};\n\t            localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);\n\t            return {\n\t                url: common.toPathString(localVarUrlObj),\n\t                options: localVarRequestOptions,\n\t            };\n\t        }),\n\t        /**\n\t         *\n\t         * @summary Lists the currently available (non-finetuned) models, and provides basic information about each one such as the owner and availability.\n\t         * @param {*} [options] Override http request option.\n\t         * @deprecated\n\t         * @throws {RequiredError}\n\t         */\n\t        listEngines: (options = {}) => __awaiter(this, void 0, void 0, function* () {\n\t            const localVarPath = `/engines`;\n\t            // use dummy base URL string because the URL constructor only accepts absolute URLs.\n\t            const localVarUrlObj = new URL(localVarPath, common.DUMMY_BASE_URL);\n\t            let baseOptions;\n\t            if (configuration) {\n\t                baseOptions = configuration.baseOptions;\n\t            }\n\t            const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);\n\t            const localVarHeaderParameter = {};\n\t            const localVarQueryParameter = {};\n\t            common.setSearchParams(localVarUrlObj, localVarQueryParameter);\n\t            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};\n\t            localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);\n\t            return {\n\t                url: common.toPathString(localVarUrlObj),\n\t                options: localVarRequestOptions,\n\t            };\n\t        }),\n\t        /**\n\t         *\n\t         * @summary Returns a list of files that belong to the user\\'s organization.\n\t         * @param {*} [options] Override http request option.\n\t         * @throws {RequiredError}\n\t         */\n\t        listFiles: (options = {}) => __awaiter(this, void 0, void 0, function* () {\n\t            const localVarPath = `/files`;\n\t            // use dummy base URL string because the URL constructor only accepts absolute URLs.\n\t            const localVarUrlObj = new URL(localVarPath, common.DUMMY_BASE_URL);\n\t            let baseOptions;\n\t            if (configuration) {\n\t                baseOptions = configuration.baseOptions;\n\t            }\n\t            const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);\n\t            const localVarHeaderParameter = {};\n\t            const localVarQueryParameter = {};\n\t            common.setSearchParams(localVarUrlObj, localVarQueryParameter);\n\t            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};\n\t            localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);\n\t            return {\n\t                url: common.toPathString(localVarUrlObj),\n\t                options: localVarRequestOptions,\n\t            };\n\t        }),\n\t        /**\n\t         *\n\t         * @summary Get fine-grained status updates for a fine-tune job.\n\t         * @param {string} fineTuneId The ID of the fine-tune job to get events for.\n\t         * @param {boolean} [stream] Whether to stream events for the fine-tune job. If set to true, events will be sent as data-only [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format) as they become available. The stream will terminate with a &#x60;data: [DONE]&#x60; message when the job is finished (succeeded, cancelled, or failed).  If set to false, only events generated so far will be returned.\n\t         * @param {*} [options] Override http request option.\n\t         * @throws {RequiredError}\n\t         */\n\t        listFineTuneEvents: (fineTuneId, stream, options = {}) => __awaiter(this, void 0, void 0, function* () {\n\t            // verify required parameter 'fineTuneId' is not null or undefined\n\t            common.assertParamExists('listFineTuneEvents', 'fineTuneId', fineTuneId);\n\t            const localVarPath = `/fine-tunes/{fine_tune_id}/events`\n\t                .replace(`{${\"fine_tune_id\"}}`, encodeURIComponent(String(fineTuneId)));\n\t            // use dummy base URL string because the URL constructor only accepts absolute URLs.\n\t            const localVarUrlObj = new URL(localVarPath, common.DUMMY_BASE_URL);\n\t            let baseOptions;\n\t            if (configuration) {\n\t                baseOptions = configuration.baseOptions;\n\t            }\n\t            const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);\n\t            const localVarHeaderParameter = {};\n\t            const localVarQueryParameter = {};\n\t            if (stream !== undefined) {\n\t                localVarQueryParameter['stream'] = stream;\n\t            }\n\t            common.setSearchParams(localVarUrlObj, localVarQueryParameter);\n\t            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};\n\t            localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);\n\t            return {\n\t                url: common.toPathString(localVarUrlObj),\n\t                options: localVarRequestOptions,\n\t            };\n\t        }),\n\t        /**\n\t         *\n\t         * @summary List your organization\\'s fine-tuning jobs\n\t         * @param {*} [options] Override http request option.\n\t         * @throws {RequiredError}\n\t         */\n\t        listFineTunes: (options = {}) => __awaiter(this, void 0, void 0, function* () {\n\t            const localVarPath = `/fine-tunes`;\n\t            // use dummy base URL string because the URL constructor only accepts absolute URLs.\n\t            const localVarUrlObj = new URL(localVarPath, common.DUMMY_BASE_URL);\n\t            let baseOptions;\n\t            if (configuration) {\n\t                baseOptions = configuration.baseOptions;\n\t            }\n\t            const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);\n\t            const localVarHeaderParameter = {};\n\t            const localVarQueryParameter = {};\n\t            common.setSearchParams(localVarUrlObj, localVarQueryParameter);\n\t            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};\n\t            localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);\n\t            return {\n\t                url: common.toPathString(localVarUrlObj),\n\t                options: localVarRequestOptions,\n\t            };\n\t        }),\n\t        /**\n\t         *\n\t         * @summary Lists the currently available models, and provides basic information about each one such as the owner and availability.\n\t         * @param {*} [options] Override http request option.\n\t         * @throws {RequiredError}\n\t         */\n\t        listModels: (options = {}) => __awaiter(this, void 0, void 0, function* () {\n\t            const localVarPath = `/models`;\n\t            // use dummy base URL string because the URL constructor only accepts absolute URLs.\n\t            const localVarUrlObj = new URL(localVarPath, common.DUMMY_BASE_URL);\n\t            let baseOptions;\n\t            if (configuration) {\n\t                baseOptions = configuration.baseOptions;\n\t            }\n\t            const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);\n\t            const localVarHeaderParameter = {};\n\t            const localVarQueryParameter = {};\n\t            common.setSearchParams(localVarUrlObj, localVarQueryParameter);\n\t            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};\n\t            localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);\n\t            return {\n\t                url: common.toPathString(localVarUrlObj),\n\t                options: localVarRequestOptions,\n\t            };\n\t        }),\n\t        /**\n\t         *\n\t         * @summary Retrieves a model instance, providing basic information about it such as the owner and availability.\n\t         * @param {string} engineId The ID of the engine to use for this request\n\t         * @param {*} [options] Override http request option.\n\t         * @deprecated\n\t         * @throws {RequiredError}\n\t         */\n\t        retrieveEngine: (engineId, options = {}) => __awaiter(this, void 0, void 0, function* () {\n\t            // verify required parameter 'engineId' is not null or undefined\n\t            common.assertParamExists('retrieveEngine', 'engineId', engineId);\n\t            const localVarPath = `/engines/{engine_id}`\n\t                .replace(`{${\"engine_id\"}}`, encodeURIComponent(String(engineId)));\n\t            // use dummy base URL string because the URL constructor only accepts absolute URLs.\n\t            const localVarUrlObj = new URL(localVarPath, common.DUMMY_BASE_URL);\n\t            let baseOptions;\n\t            if (configuration) {\n\t                baseOptions = configuration.baseOptions;\n\t            }\n\t            const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);\n\t            const localVarHeaderParameter = {};\n\t            const localVarQueryParameter = {};\n\t            common.setSearchParams(localVarUrlObj, localVarQueryParameter);\n\t            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};\n\t            localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);\n\t            return {\n\t                url: common.toPathString(localVarUrlObj),\n\t                options: localVarRequestOptions,\n\t            };\n\t        }),\n\t        /**\n\t         *\n\t         * @summary Returns information about a specific file.\n\t         * @param {string} fileId The ID of the file to use for this request\n\t         * @param {*} [options] Override http request option.\n\t         * @throws {RequiredError}\n\t         */\n\t        retrieveFile: (fileId, options = {}) => __awaiter(this, void 0, void 0, function* () {\n\t            // verify required parameter 'fileId' is not null or undefined\n\t            common.assertParamExists('retrieveFile', 'fileId', fileId);\n\t            const localVarPath = `/files/{file_id}`\n\t                .replace(`{${\"file_id\"}}`, encodeURIComponent(String(fileId)));\n\t            // use dummy base URL string because the URL constructor only accepts absolute URLs.\n\t            const localVarUrlObj = new URL(localVarPath, common.DUMMY_BASE_URL);\n\t            let baseOptions;\n\t            if (configuration) {\n\t                baseOptions = configuration.baseOptions;\n\t            }\n\t            const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);\n\t            const localVarHeaderParameter = {};\n\t            const localVarQueryParameter = {};\n\t            common.setSearchParams(localVarUrlObj, localVarQueryParameter);\n\t            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};\n\t            localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);\n\t            return {\n\t                url: common.toPathString(localVarUrlObj),\n\t                options: localVarRequestOptions,\n\t            };\n\t        }),\n\t        /**\n\t         *\n\t         * @summary Gets info about the fine-tune job.  [Learn more about Fine-tuning](/docs/guides/fine-tuning)\n\t         * @param {string} fineTuneId The ID of the fine-tune job\n\t         * @param {*} [options] Override http request option.\n\t         * @throws {RequiredError}\n\t         */\n\t        retrieveFineTune: (fineTuneId, options = {}) => __awaiter(this, void 0, void 0, function* () {\n\t            // verify required parameter 'fineTuneId' is not null or undefined\n\t            common.assertParamExists('retrieveFineTune', 'fineTuneId', fineTuneId);\n\t            const localVarPath = `/fine-tunes/{fine_tune_id}`\n\t                .replace(`{${\"fine_tune_id\"}}`, encodeURIComponent(String(fineTuneId)));\n\t            // use dummy base URL string because the URL constructor only accepts absolute URLs.\n\t            const localVarUrlObj = new URL(localVarPath, common.DUMMY_BASE_URL);\n\t            let baseOptions;\n\t            if (configuration) {\n\t                baseOptions = configuration.baseOptions;\n\t            }\n\t            const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);\n\t            const localVarHeaderParameter = {};\n\t            const localVarQueryParameter = {};\n\t            common.setSearchParams(localVarUrlObj, localVarQueryParameter);\n\t            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};\n\t            localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);\n\t            return {\n\t                url: common.toPathString(localVarUrlObj),\n\t                options: localVarRequestOptions,\n\t            };\n\t        }),\n\t        /**\n\t         *\n\t         * @summary Retrieves a model instance, providing basic information about the model such as the owner and permissioning.\n\t         * @param {string} model The ID of the model to use for this request\n\t         * @param {*} [options] Override http request option.\n\t         * @throws {RequiredError}\n\t         */\n\t        retrieveModel: (model, options = {}) => __awaiter(this, void 0, void 0, function* () {\n\t            // verify required parameter 'model' is not null or undefined\n\t            common.assertParamExists('retrieveModel', 'model', model);\n\t            const localVarPath = `/models/{model}`\n\t                .replace(`{${\"model\"}}`, encodeURIComponent(String(model)));\n\t            // use dummy base URL string because the URL constructor only accepts absolute URLs.\n\t            const localVarUrlObj = new URL(localVarPath, common.DUMMY_BASE_URL);\n\t            let baseOptions;\n\t            if (configuration) {\n\t                baseOptions = configuration.baseOptions;\n\t            }\n\t            const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);\n\t            const localVarHeaderParameter = {};\n\t            const localVarQueryParameter = {};\n\t            common.setSearchParams(localVarUrlObj, localVarQueryParameter);\n\t            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};\n\t            localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);\n\t            return {\n\t                url: common.toPathString(localVarUrlObj),\n\t                options: localVarRequestOptions,\n\t            };\n\t        }),\n\t    };\n\t};\n\t/**\n\t * OpenAIApi - functional programming interface\n\t * @export\n\t */\n\texports.OpenAIApiFp = function (configuration) {\n\t    const localVarAxiosParamCreator = exports.OpenAIApiAxiosParamCreator(configuration);\n\t    return {\n\t        /**\n\t         *\n\t         * @summary Immediately cancel a fine-tune job.\n\t         * @param {string} fineTuneId The ID of the fine-tune job to cancel\n\t         * @param {*} [options] Override http request option.\n\t         * @throws {RequiredError}\n\t         */\n\t        cancelFineTune(fineTuneId, options) {\n\t            return __awaiter(this, void 0, void 0, function* () {\n\t                const localVarAxiosArgs = yield localVarAxiosParamCreator.cancelFineTune(fineTuneId, options);\n\t                return common.createRequestFunction(localVarAxiosArgs, axios$1.default, base$1.BASE_PATH, configuration);\n\t            });\n\t        },\n\t        /**\n\t         *\n\t         * @summary Answers the specified question using the provided documents and examples.  The endpoint first [searches](/docs/api-reference/searches) over provided documents or files to find relevant context. The relevant context is combined with the provided examples and question to create the prompt for [completion](/docs/api-reference/completions).\n\t         * @param {CreateAnswerRequest} createAnswerRequest\n\t         * @param {*} [options] Override http request option.\n\t         * @deprecated\n\t         * @throws {RequiredError}\n\t         */\n\t        createAnswer(createAnswerRequest, options) {\n\t            return __awaiter(this, void 0, void 0, function* () {\n\t                const localVarAxiosArgs = yield localVarAxiosParamCreator.createAnswer(createAnswerRequest, options);\n\t                return common.createRequestFunction(localVarAxiosArgs, axios$1.default, base$1.BASE_PATH, configuration);\n\t            });\n\t        },\n\t        /**\n\t         *\n\t         * @summary Creates a model response for the given chat conversation.\n\t         * @param {CreateChatCompletionRequest} createChatCompletionRequest\n\t         * @param {*} [options] Override http request option.\n\t         * @throws {RequiredError}\n\t         */\n\t        createChatCompletion(createChatCompletionRequest, options) {\n\t            return __awaiter(this, void 0, void 0, function* () {\n\t                const localVarAxiosArgs = yield localVarAxiosParamCreator.createChatCompletion(createChatCompletionRequest, options);\n\t                return common.createRequestFunction(localVarAxiosArgs, axios$1.default, base$1.BASE_PATH, configuration);\n\t            });\n\t        },\n\t        /**\n\t         *\n\t         * @summary Classifies the specified `query` using provided examples.  The endpoint first [searches](/docs/api-reference/searches) over the labeled examples to select the ones most relevant for the particular query. Then, the relevant examples are combined with the query to construct a prompt to produce the final label via the [completions](/docs/api-reference/completions) endpoint.  Labeled examples can be provided via an uploaded `file`, or explicitly listed in the request using the `examples` parameter for quick tests and small scale use cases.\n\t         * @param {CreateClassificationRequest} createClassificationRequest\n\t         * @param {*} [options] Override http request option.\n\t         * @deprecated\n\t         * @throws {RequiredError}\n\t         */\n\t        createClassification(createClassificationRequest, options) {\n\t            return __awaiter(this, void 0, void 0, function* () {\n\t                const localVarAxiosArgs = yield localVarAxiosParamCreator.createClassification(createClassificationRequest, options);\n\t                return common.createRequestFunction(localVarAxiosArgs, axios$1.default, base$1.BASE_PATH, configuration);\n\t            });\n\t        },\n\t        /**\n\t         *\n\t         * @summary Creates a completion for the provided prompt and parameters.\n\t         * @param {CreateCompletionRequest} createCompletionRequest\n\t         * @param {*} [options] Override http request option.\n\t         * @throws {RequiredError}\n\t         */\n\t        createCompletion(createCompletionRequest, options) {\n\t            return __awaiter(this, void 0, void 0, function* () {\n\t                const localVarAxiosArgs = yield localVarAxiosParamCreator.createCompletion(createCompletionRequest, options);\n\t                return common.createRequestFunction(localVarAxiosArgs, axios$1.default, base$1.BASE_PATH, configuration);\n\t            });\n\t        },\n\t        /**\n\t         *\n\t         * @summary Creates a new edit for the provided input, instruction, and parameters.\n\t         * @param {CreateEditRequest} createEditRequest\n\t         * @param {*} [options] Override http request option.\n\t         * @throws {RequiredError}\n\t         */\n\t        createEdit(createEditRequest, options) {\n\t            return __awaiter(this, void 0, void 0, function* () {\n\t                const localVarAxiosArgs = yield localVarAxiosParamCreator.createEdit(createEditRequest, options);\n\t                return common.createRequestFunction(localVarAxiosArgs, axios$1.default, base$1.BASE_PATH, configuration);\n\t            });\n\t        },\n\t        /**\n\t         *\n\t         * @summary Creates an embedding vector representing the input text.\n\t         * @param {CreateEmbeddingRequest} createEmbeddingRequest\n\t         * @param {*} [options] Override http request option.\n\t         * @throws {RequiredError}\n\t         */\n\t        createEmbedding(createEmbeddingRequest, options) {\n\t            return __awaiter(this, void 0, void 0, function* () {\n\t                const localVarAxiosArgs = yield localVarAxiosParamCreator.createEmbedding(createEmbeddingRequest, options);\n\t                return common.createRequestFunction(localVarAxiosArgs, axios$1.default, base$1.BASE_PATH, configuration);\n\t            });\n\t        },\n\t        /**\n\t         *\n\t         * @summary Upload a file that contains document(s) to be used across various endpoints/features. Currently, the size of all the files uploaded by one organization can be up to 1 GB. Please contact us if you need to increase the storage limit.\n\t         * @param {File} file Name of the [JSON Lines](https://jsonlines.readthedocs.io/en/latest/) file to be uploaded.  If the &#x60;purpose&#x60; is set to \\\\\\&quot;fine-tune\\\\\\&quot;, each line is a JSON record with \\\\\\&quot;prompt\\\\\\&quot; and \\\\\\&quot;completion\\\\\\&quot; fields representing your [training examples](/docs/guides/fine-tuning/prepare-training-data).\n\t         * @param {string} purpose The intended purpose of the uploaded documents.  Use \\\\\\&quot;fine-tune\\\\\\&quot; for [Fine-tuning](/docs/api-reference/fine-tunes). This allows us to validate the format of the uploaded file.\n\t         * @param {*} [options] Override http request option.\n\t         * @throws {RequiredError}\n\t         */\n\t        createFile(file, purpose, options) {\n\t            return __awaiter(this, void 0, void 0, function* () {\n\t                const localVarAxiosArgs = yield localVarAxiosParamCreator.createFile(file, purpose, options);\n\t                return common.createRequestFunction(localVarAxiosArgs, axios$1.default, base$1.BASE_PATH, configuration);\n\t            });\n\t        },\n\t        /**\n\t         *\n\t         * @summary Creates a job that fine-tunes a specified model from a given dataset.  Response includes details of the enqueued job including job status and the name of the fine-tuned models once complete.  [Learn more about Fine-tuning](/docs/guides/fine-tuning)\n\t         * @param {CreateFineTuneRequest} createFineTuneRequest\n\t         * @param {*} [options] Override http request option.\n\t         * @throws {RequiredError}\n\t         */\n\t        createFineTune(createFineTuneRequest, options) {\n\t            return __awaiter(this, void 0, void 0, function* () {\n\t                const localVarAxiosArgs = yield localVarAxiosParamCreator.createFineTune(createFineTuneRequest, options);\n\t                return common.createRequestFunction(localVarAxiosArgs, axios$1.default, base$1.BASE_PATH, configuration);\n\t            });\n\t        },\n\t        /**\n\t         *\n\t         * @summary Creates an image given a prompt.\n\t         * @param {CreateImageRequest} createImageRequest\n\t         * @param {*} [options] Override http request option.\n\t         * @throws {RequiredError}\n\t         */\n\t        createImage(createImageRequest, options) {\n\t            return __awaiter(this, void 0, void 0, function* () {\n\t                const localVarAxiosArgs = yield localVarAxiosParamCreator.createImage(createImageRequest, options);\n\t                return common.createRequestFunction(localVarAxiosArgs, axios$1.default, base$1.BASE_PATH, configuration);\n\t            });\n\t        },\n\t        /**\n\t         *\n\t         * @summary Creates an edited or extended image given an original image and a prompt.\n\t         * @param {File} image The image to edit. Must be a valid PNG file, less than 4MB, and square. If mask is not provided, image must have transparency, which will be used as the mask.\n\t         * @param {string} prompt A text description of the desired image(s). The maximum length is 1000 characters.\n\t         * @param {File} [mask] An additional image whose fully transparent areas (e.g. where alpha is zero) indicate where &#x60;image&#x60; should be edited. Must be a valid PNG file, less than 4MB, and have the same dimensions as &#x60;image&#x60;.\n\t         * @param {number} [n] The number of images to generate. Must be between 1 and 10.\n\t         * @param {string} [size] The size of the generated images. Must be one of &#x60;256x256&#x60;, &#x60;512x512&#x60;, or &#x60;1024x1024&#x60;.\n\t         * @param {string} [responseFormat] The format in which the generated images are returned. Must be one of &#x60;url&#x60; or &#x60;b64_json&#x60;.\n\t         * @param {string} [user] A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. [Learn more](/docs/guides/safety-best-practices/end-user-ids).\n\t         * @param {*} [options] Override http request option.\n\t         * @throws {RequiredError}\n\t         */\n\t        createImageEdit(image, prompt, mask, n, size, responseFormat, user, options) {\n\t            return __awaiter(this, void 0, void 0, function* () {\n\t                const localVarAxiosArgs = yield localVarAxiosParamCreator.createImageEdit(image, prompt, mask, n, size, responseFormat, user, options);\n\t                return common.createRequestFunction(localVarAxiosArgs, axios$1.default, base$1.BASE_PATH, configuration);\n\t            });\n\t        },\n\t        /**\n\t         *\n\t         * @summary Creates a variation of a given image.\n\t         * @param {File} image The image to use as the basis for the variation(s). Must be a valid PNG file, less than 4MB, and square.\n\t         * @param {number} [n] The number of images to generate. Must be between 1 and 10.\n\t         * @param {string} [size] The size of the generated images. Must be one of &#x60;256x256&#x60;, &#x60;512x512&#x60;, or &#x60;1024x1024&#x60;.\n\t         * @param {string} [responseFormat] The format in which the generated images are returned. Must be one of &#x60;url&#x60; or &#x60;b64_json&#x60;.\n\t         * @param {string} [user] A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. [Learn more](/docs/guides/safety-best-practices/end-user-ids).\n\t         * @param {*} [options] Override http request option.\n\t         * @throws {RequiredError}\n\t         */\n\t        createImageVariation(image, n, size, responseFormat, user, options) {\n\t            return __awaiter(this, void 0, void 0, function* () {\n\t                const localVarAxiosArgs = yield localVarAxiosParamCreator.createImageVariation(image, n, size, responseFormat, user, options);\n\t                return common.createRequestFunction(localVarAxiosArgs, axios$1.default, base$1.BASE_PATH, configuration);\n\t            });\n\t        },\n\t        /**\n\t         *\n\t         * @summary Classifies if text violates OpenAI\\'s Content Policy\n\t         * @param {CreateModerationRequest} createModerationRequest\n\t         * @param {*} [options] Override http request option.\n\t         * @throws {RequiredError}\n\t         */\n\t        createModeration(createModerationRequest, options) {\n\t            return __awaiter(this, void 0, void 0, function* () {\n\t                const localVarAxiosArgs = yield localVarAxiosParamCreator.createModeration(createModerationRequest, options);\n\t                return common.createRequestFunction(localVarAxiosArgs, axios$1.default, base$1.BASE_PATH, configuration);\n\t            });\n\t        },\n\t        /**\n\t         *\n\t         * @summary The search endpoint computes similarity scores between provided query and documents. Documents can be passed directly to the API if there are no more than 200 of them.  To go beyond the 200 document limit, documents can be processed offline and then used for efficient retrieval at query time. When `file` is set, the search endpoint searches over all the documents in the given file and returns up to the `max_rerank` number of documents. These documents will be returned along with their search scores.  The similarity score is a positive score that usually ranges from 0 to 300 (but can sometimes go higher), where a score above 200 usually means the document is semantically similar to the query.\n\t         * @param {string} engineId The ID of the engine to use for this request.  You can select one of &#x60;ada&#x60;, &#x60;babbage&#x60;, &#x60;curie&#x60;, or &#x60;davinci&#x60;.\n\t         * @param {CreateSearchRequest} createSearchRequest\n\t         * @param {*} [options] Override http request option.\n\t         * @deprecated\n\t         * @throws {RequiredError}\n\t         */\n\t        createSearch(engineId, createSearchRequest, options) {\n\t            return __awaiter(this, void 0, void 0, function* () {\n\t                const localVarAxiosArgs = yield localVarAxiosParamCreator.createSearch(engineId, createSearchRequest, options);\n\t                return common.createRequestFunction(localVarAxiosArgs, axios$1.default, base$1.BASE_PATH, configuration);\n\t            });\n\t        },\n\t        /**\n\t         *\n\t         * @summary Transcribes audio into the input language.\n\t         * @param {File} file The audio file object (not file name) to transcribe, in one of these formats: mp3, mp4, mpeg, mpga, m4a, wav, or webm.\n\t         * @param {string} model ID of the model to use. Only &#x60;whisper-1&#x60; is currently available.\n\t         * @param {string} [prompt] An optional text to guide the model\\\\\\&#39;s style or continue a previous audio segment. The [prompt](/docs/guides/speech-to-text/prompting) should match the audio language.\n\t         * @param {string} [responseFormat] The format of the transcript output, in one of these options: json, text, srt, verbose_json, or vtt.\n\t         * @param {number} [temperature] The sampling temperature, between 0 and 1. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. If set to 0, the model will use [log probability](https://en.wikipedia.org/wiki/Log_probability) to automatically increase the temperature until certain thresholds are hit.\n\t         * @param {string} [language] The language of the input audio. Supplying the input language in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format will improve accuracy and latency.\n\t         * @param {*} [options] Override http request option.\n\t         * @throws {RequiredError}\n\t         */\n\t        createTranscription(file, model, prompt, responseFormat, temperature, language, options) {\n\t            return __awaiter(this, void 0, void 0, function* () {\n\t                const localVarAxiosArgs = yield localVarAxiosParamCreator.createTranscription(file, model, prompt, responseFormat, temperature, language, options);\n\t                return common.createRequestFunction(localVarAxiosArgs, axios$1.default, base$1.BASE_PATH, configuration);\n\t            });\n\t        },\n\t        /**\n\t         *\n\t         * @summary Translates audio into into English.\n\t         * @param {File} file The audio file object (not file name) translate, in one of these formats: mp3, mp4, mpeg, mpga, m4a, wav, or webm.\n\t         * @param {string} model ID of the model to use. Only &#x60;whisper-1&#x60; is currently available.\n\t         * @param {string} [prompt] An optional text to guide the model\\\\\\&#39;s style or continue a previous audio segment. The [prompt](/docs/guides/speech-to-text/prompting) should be in English.\n\t         * @param {string} [responseFormat] The format of the transcript output, in one of these options: json, text, srt, verbose_json, or vtt.\n\t         * @param {number} [temperature] The sampling temperature, between 0 and 1. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. If set to 0, the model will use [log probability](https://en.wikipedia.org/wiki/Log_probability) to automatically increase the temperature until certain thresholds are hit.\n\t         * @param {*} [options] Override http request option.\n\t         * @throws {RequiredError}\n\t         */\n\t        createTranslation(file, model, prompt, responseFormat, temperature, options) {\n\t            return __awaiter(this, void 0, void 0, function* () {\n\t                const localVarAxiosArgs = yield localVarAxiosParamCreator.createTranslation(file, model, prompt, responseFormat, temperature, options);\n\t                return common.createRequestFunction(localVarAxiosArgs, axios$1.default, base$1.BASE_PATH, configuration);\n\t            });\n\t        },\n\t        /**\n\t         *\n\t         * @summary Delete a file.\n\t         * @param {string} fileId The ID of the file to use for this request\n\t         * @param {*} [options] Override http request option.\n\t         * @throws {RequiredError}\n\t         */\n\t        deleteFile(fileId, options) {\n\t            return __awaiter(this, void 0, void 0, function* () {\n\t                const localVarAxiosArgs = yield localVarAxiosParamCreator.deleteFile(fileId, options);\n\t                return common.createRequestFunction(localVarAxiosArgs, axios$1.default, base$1.BASE_PATH, configuration);\n\t            });\n\t        },\n\t        /**\n\t         *\n\t         * @summary Delete a fine-tuned model. You must have the Owner role in your organization.\n\t         * @param {string} model The model to delete\n\t         * @param {*} [options] Override http request option.\n\t         * @throws {RequiredError}\n\t         */\n\t        deleteModel(model, options) {\n\t            return __awaiter(this, void 0, void 0, function* () {\n\t                const localVarAxiosArgs = yield localVarAxiosParamCreator.deleteModel(model, options);\n\t                return common.createRequestFunction(localVarAxiosArgs, axios$1.default, base$1.BASE_PATH, configuration);\n\t            });\n\t        },\n\t        /**\n\t         *\n\t         * @summary Returns the contents of the specified file\n\t         * @param {string} fileId The ID of the file to use for this request\n\t         * @param {*} [options] Override http request option.\n\t         * @throws {RequiredError}\n\t         */\n\t        downloadFile(fileId, options) {\n\t            return __awaiter(this, void 0, void 0, function* () {\n\t                const localVarAxiosArgs = yield localVarAxiosParamCreator.downloadFile(fileId, options);\n\t                return common.createRequestFunction(localVarAxiosArgs, axios$1.default, base$1.BASE_PATH, configuration);\n\t            });\n\t        },\n\t        /**\n\t         *\n\t         * @summary Lists the currently available (non-finetuned) models, and provides basic information about each one such as the owner and availability.\n\t         * @param {*} [options] Override http request option.\n\t         * @deprecated\n\t         * @throws {RequiredError}\n\t         */\n\t        listEngines(options) {\n\t            return __awaiter(this, void 0, void 0, function* () {\n\t                const localVarAxiosArgs = yield localVarAxiosParamCreator.listEngines(options);\n\t                return common.createRequestFunction(localVarAxiosArgs, axios$1.default, base$1.BASE_PATH, configuration);\n\t            });\n\t        },\n\t        /**\n\t         *\n\t         * @summary Returns a list of files that belong to the user\\'s organization.\n\t         * @param {*} [options] Override http request option.\n\t         * @throws {RequiredError}\n\t         */\n\t        listFiles(options) {\n\t            return __awaiter(this, void 0, void 0, function* () {\n\t                const localVarAxiosArgs = yield localVarAxiosParamCreator.listFiles(options);\n\t                return common.createRequestFunction(localVarAxiosArgs, axios$1.default, base$1.BASE_PATH, configuration);\n\t            });\n\t        },\n\t        /**\n\t         *\n\t         * @summary Get fine-grained status updates for a fine-tune job.\n\t         * @param {string} fineTuneId The ID of the fine-tune job to get events for.\n\t         * @param {boolean} [stream] Whether to stream events for the fine-tune job. If set to true, events will be sent as data-only [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format) as they become available. The stream will terminate with a &#x60;data: [DONE]&#x60; message when the job is finished (succeeded, cancelled, or failed).  If set to false, only events generated so far will be returned.\n\t         * @param {*} [options] Override http request option.\n\t         * @throws {RequiredError}\n\t         */\n\t        listFineTuneEvents(fineTuneId, stream, options) {\n\t            return __awaiter(this, void 0, void 0, function* () {\n\t                const localVarAxiosArgs = yield localVarAxiosParamCreator.listFineTuneEvents(fineTuneId, stream, options);\n\t                return common.createRequestFunction(localVarAxiosArgs, axios$1.default, base$1.BASE_PATH, configuration);\n\t            });\n\t        },\n\t        /**\n\t         *\n\t         * @summary List your organization\\'s fine-tuning jobs\n\t         * @param {*} [options] Override http request option.\n\t         * @throws {RequiredError}\n\t         */\n\t        listFineTunes(options) {\n\t            return __awaiter(this, void 0, void 0, function* () {\n\t                const localVarAxiosArgs = yield localVarAxiosParamCreator.listFineTunes(options);\n\t                return common.createRequestFunction(localVarAxiosArgs, axios$1.default, base$1.BASE_PATH, configuration);\n\t            });\n\t        },\n\t        /**\n\t         *\n\t         * @summary Lists the currently available models, and provides basic information about each one such as the owner and availability.\n\t         * @param {*} [options] Override http request option.\n\t         * @throws {RequiredError}\n\t         */\n\t        listModels(options) {\n\t            return __awaiter(this, void 0, void 0, function* () {\n\t                const localVarAxiosArgs = yield localVarAxiosParamCreator.listModels(options);\n\t                return common.createRequestFunction(localVarAxiosArgs, axios$1.default, base$1.BASE_PATH, configuration);\n\t            });\n\t        },\n\t        /**\n\t         *\n\t         * @summary Retrieves a model instance, providing basic information about it such as the owner and availability.\n\t         * @param {string} engineId The ID of the engine to use for this request\n\t         * @param {*} [options] Override http request option.\n\t         * @deprecated\n\t         * @throws {RequiredError}\n\t         */\n\t        retrieveEngine(engineId, options) {\n\t            return __awaiter(this, void 0, void 0, function* () {\n\t                const localVarAxiosArgs = yield localVarAxiosParamCreator.retrieveEngine(engineId, options);\n\t                return common.createRequestFunction(localVarAxiosArgs, axios$1.default, base$1.BASE_PATH, configuration);\n\t            });\n\t        },\n\t        /**\n\t         *\n\t         * @summary Returns information about a specific file.\n\t         * @param {string} fileId The ID of the file to use for this request\n\t         * @param {*} [options] Override http request option.\n\t         * @throws {RequiredError}\n\t         */\n\t        retrieveFile(fileId, options) {\n\t            return __awaiter(this, void 0, void 0, function* () {\n\t                const localVarAxiosArgs = yield localVarAxiosParamCreator.retrieveFile(fileId, options);\n\t                return common.createRequestFunction(localVarAxiosArgs, axios$1.default, base$1.BASE_PATH, configuration);\n\t            });\n\t        },\n\t        /**\n\t         *\n\t         * @summary Gets info about the fine-tune job.  [Learn more about Fine-tuning](/docs/guides/fine-tuning)\n\t         * @param {string} fineTuneId The ID of the fine-tune job\n\t         * @param {*} [options] Override http request option.\n\t         * @throws {RequiredError}\n\t         */\n\t        retrieveFineTune(fineTuneId, options) {\n\t            return __awaiter(this, void 0, void 0, function* () {\n\t                const localVarAxiosArgs = yield localVarAxiosParamCreator.retrieveFineTune(fineTuneId, options);\n\t                return common.createRequestFunction(localVarAxiosArgs, axios$1.default, base$1.BASE_PATH, configuration);\n\t            });\n\t        },\n\t        /**\n\t         *\n\t         * @summary Retrieves a model instance, providing basic information about the model such as the owner and permissioning.\n\t         * @param {string} model The ID of the model to use for this request\n\t         * @param {*} [options] Override http request option.\n\t         * @throws {RequiredError}\n\t         */\n\t        retrieveModel(model, options) {\n\t            return __awaiter(this, void 0, void 0, function* () {\n\t                const localVarAxiosArgs = yield localVarAxiosParamCreator.retrieveModel(model, options);\n\t                return common.createRequestFunction(localVarAxiosArgs, axios$1.default, base$1.BASE_PATH, configuration);\n\t            });\n\t        },\n\t    };\n\t};\n\t/**\n\t * OpenAIApi - factory interface\n\t * @export\n\t */\n\texports.OpenAIApiFactory = function (configuration, basePath, axios) {\n\t    const localVarFp = exports.OpenAIApiFp(configuration);\n\t    return {\n\t        /**\n\t         *\n\t         * @summary Immediately cancel a fine-tune job.\n\t         * @param {string} fineTuneId The ID of the fine-tune job to cancel\n\t         * @param {*} [options] Override http request option.\n\t         * @throws {RequiredError}\n\t         */\n\t        cancelFineTune(fineTuneId, options) {\n\t            return localVarFp.cancelFineTune(fineTuneId, options).then((request) => request(axios, basePath));\n\t        },\n\t        /**\n\t         *\n\t         * @summary Answers the specified question using the provided documents and examples.  The endpoint first [searches](/docs/api-reference/searches) over provided documents or files to find relevant context. The relevant context is combined with the provided examples and question to create the prompt for [completion](/docs/api-reference/completions).\n\t         * @param {CreateAnswerRequest} createAnswerRequest\n\t         * @param {*} [options] Override http request option.\n\t         * @deprecated\n\t         * @throws {RequiredError}\n\t         */\n\t        createAnswer(createAnswerRequest, options) {\n\t            return localVarFp.createAnswer(createAnswerRequest, options).then((request) => request(axios, basePath));\n\t        },\n\t        /**\n\t         *\n\t         * @summary Creates a model response for the given chat conversation.\n\t         * @param {CreateChatCompletionRequest} createChatCompletionRequest\n\t         * @param {*} [options] Override http request option.\n\t         * @throws {RequiredError}\n\t         */\n\t        createChatCompletion(createChatCompletionRequest, options) {\n\t            return localVarFp.createChatCompletion(createChatCompletionRequest, options).then((request) => request(axios, basePath));\n\t        },\n\t        /**\n\t         *\n\t         * @summary Classifies the specified `query` using provided examples.  The endpoint first [searches](/docs/api-reference/searches) over the labeled examples to select the ones most relevant for the particular query. Then, the relevant examples are combined with the query to construct a prompt to produce the final label via the [completions](/docs/api-reference/completions) endpoint.  Labeled examples can be provided via an uploaded `file`, or explicitly listed in the request using the `examples` parameter for quick tests and small scale use cases.\n\t         * @param {CreateClassificationRequest} createClassificationRequest\n\t         * @param {*} [options] Override http request option.\n\t         * @deprecated\n\t         * @throws {RequiredError}\n\t         */\n\t        createClassification(createClassificationRequest, options) {\n\t            return localVarFp.createClassification(createClassificationRequest, options).then((request) => request(axios, basePath));\n\t        },\n\t        /**\n\t         *\n\t         * @summary Creates a completion for the provided prompt and parameters.\n\t         * @param {CreateCompletionRequest} createCompletionRequest\n\t         * @param {*} [options] Override http request option.\n\t         * @throws {RequiredError}\n\t         */\n\t        createCompletion(createCompletionRequest, options) {\n\t            return localVarFp.createCompletion(createCompletionRequest, options).then((request) => request(axios, basePath));\n\t        },\n\t        /**\n\t         *\n\t         * @summary Creates a new edit for the provided input, instruction, and parameters.\n\t         * @param {CreateEditRequest} createEditRequest\n\t         * @param {*} [options] Override http request option.\n\t         * @throws {RequiredError}\n\t         */\n\t        createEdit(createEditRequest, options) {\n\t            return localVarFp.createEdit(createEditRequest, options).then((request) => request(axios, basePath));\n\t        },\n\t        /**\n\t         *\n\t         * @summary Creates an embedding vector representing the input text.\n\t         * @param {CreateEmbeddingRequest} createEmbeddingRequest\n\t         * @param {*} [options] Override http request option.\n\t         * @throws {RequiredError}\n\t         */\n\t        createEmbedding(createEmbeddingRequest, options) {\n\t            return localVarFp.createEmbedding(createEmbeddingRequest, options).then((request) => request(axios, basePath));\n\t        },\n\t        /**\n\t         *\n\t         * @summary Upload a file that contains document(s) to be used across various endpoints/features. Currently, the size of all the files uploaded by one organization can be up to 1 GB. Please contact us if you need to increase the storage limit.\n\t         * @param {File} file Name of the [JSON Lines](https://jsonlines.readthedocs.io/en/latest/) file to be uploaded.  If the &#x60;purpose&#x60; is set to \\\\\\&quot;fine-tune\\\\\\&quot;, each line is a JSON record with \\\\\\&quot;prompt\\\\\\&quot; and \\\\\\&quot;completion\\\\\\&quot; fields representing your [training examples](/docs/guides/fine-tuning/prepare-training-data).\n\t         * @param {string} purpose The intended purpose of the uploaded documents.  Use \\\\\\&quot;fine-tune\\\\\\&quot; for [Fine-tuning](/docs/api-reference/fine-tunes). This allows us to validate the format of the uploaded file.\n\t         * @param {*} [options] Override http request option.\n\t         * @throws {RequiredError}\n\t         */\n\t        createFile(file, purpose, options) {\n\t            return localVarFp.createFile(file, purpose, options).then((request) => request(axios, basePath));\n\t        },\n\t        /**\n\t         *\n\t         * @summary Creates a job that fine-tunes a specified model from a given dataset.  Response includes details of the enqueued job including job status and the name of the fine-tuned models once complete.  [Learn more about Fine-tuning](/docs/guides/fine-tuning)\n\t         * @param {CreateFineTuneRequest} createFineTuneRequest\n\t         * @param {*} [options] Override http request option.\n\t         * @throws {RequiredError}\n\t         */\n\t        createFineTune(createFineTuneRequest, options) {\n\t            return localVarFp.createFineTune(createFineTuneRequest, options).then((request) => request(axios, basePath));\n\t        },\n\t        /**\n\t         *\n\t         * @summary Creates an image given a prompt.\n\t         * @param {CreateImageRequest} createImageRequest\n\t         * @param {*} [options] Override http request option.\n\t         * @throws {RequiredError}\n\t         */\n\t        createImage(createImageRequest, options) {\n\t            return localVarFp.createImage(createImageRequest, options).then((request) => request(axios, basePath));\n\t        },\n\t        /**\n\t         *\n\t         * @summary Creates an edited or extended image given an original image and a prompt.\n\t         * @param {File} image The image to edit. Must be a valid PNG file, less than 4MB, and square. If mask is not provided, image must have transparency, which will be used as the mask.\n\t         * @param {string} prompt A text description of the desired image(s). The maximum length is 1000 characters.\n\t         * @param {File} [mask] An additional image whose fully transparent areas (e.g. where alpha is zero) indicate where &#x60;image&#x60; should be edited. Must be a valid PNG file, less than 4MB, and have the same dimensions as &#x60;image&#x60;.\n\t         * @param {number} [n] The number of images to generate. Must be between 1 and 10.\n\t         * @param {string} [size] The size of the generated images. Must be one of &#x60;256x256&#x60;, &#x60;512x512&#x60;, or &#x60;1024x1024&#x60;.\n\t         * @param {string} [responseFormat] The format in which the generated images are returned. Must be one of &#x60;url&#x60; or &#x60;b64_json&#x60;.\n\t         * @param {string} [user] A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. [Learn more](/docs/guides/safety-best-practices/end-user-ids).\n\t         * @param {*} [options] Override http request option.\n\t         * @throws {RequiredError}\n\t         */\n\t        createImageEdit(image, prompt, mask, n, size, responseFormat, user, options) {\n\t            return localVarFp.createImageEdit(image, prompt, mask, n, size, responseFormat, user, options).then((request) => request(axios, basePath));\n\t        },\n\t        /**\n\t         *\n\t         * @summary Creates a variation of a given image.\n\t         * @param {File} image The image to use as the basis for the variation(s). Must be a valid PNG file, less than 4MB, and square.\n\t         * @param {number} [n] The number of images to generate. Must be between 1 and 10.\n\t         * @param {string} [size] The size of the generated images. Must be one of &#x60;256x256&#x60;, &#x60;512x512&#x60;, or &#x60;1024x1024&#x60;.\n\t         * @param {string} [responseFormat] The format in which the generated images are returned. Must be one of &#x60;url&#x60; or &#x60;b64_json&#x60;.\n\t         * @param {string} [user] A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. [Learn more](/docs/guides/safety-best-practices/end-user-ids).\n\t         * @param {*} [options] Override http request option.\n\t         * @throws {RequiredError}\n\t         */\n\t        createImageVariation(image, n, size, responseFormat, user, options) {\n\t            return localVarFp.createImageVariation(image, n, size, responseFormat, user, options).then((request) => request(axios, basePath));\n\t        },\n\t        /**\n\t         *\n\t         * @summary Classifies if text violates OpenAI\\'s Content Policy\n\t         * @param {CreateModerationRequest} createModerationRequest\n\t         * @param {*} [options] Override http request option.\n\t         * @throws {RequiredError}\n\t         */\n\t        createModeration(createModerationRequest, options) {\n\t            return localVarFp.createModeration(createModerationRequest, options).then((request) => request(axios, basePath));\n\t        },\n\t        /**\n\t         *\n\t         * @summary The search endpoint computes similarity scores between provided query and documents. Documents can be passed directly to the API if there are no more than 200 of them.  To go beyond the 200 document limit, documents can be processed offline and then used for efficient retrieval at query time. When `file` is set, the search endpoint searches over all the documents in the given file and returns up to the `max_rerank` number of documents. These documents will be returned along with their search scores.  The similarity score is a positive score that usually ranges from 0 to 300 (but can sometimes go higher), where a score above 200 usually means the document is semantically similar to the query.\n\t         * @param {string} engineId The ID of the engine to use for this request.  You can select one of &#x60;ada&#x60;, &#x60;babbage&#x60;, &#x60;curie&#x60;, or &#x60;davinci&#x60;.\n\t         * @param {CreateSearchRequest} createSearchRequest\n\t         * @param {*} [options] Override http request option.\n\t         * @deprecated\n\t         * @throws {RequiredError}\n\t         */\n\t        createSearch(engineId, createSearchRequest, options) {\n\t            return localVarFp.createSearch(engineId, createSearchRequest, options).then((request) => request(axios, basePath));\n\t        },\n\t        /**\n\t         *\n\t         * @summary Transcribes audio into the input language.\n\t         * @param {File} file The audio file object (not file name) to transcribe, in one of these formats: mp3, mp4, mpeg, mpga, m4a, wav, or webm.\n\t         * @param {string} model ID of the model to use. Only &#x60;whisper-1&#x60; is currently available.\n\t         * @param {string} [prompt] An optional text to guide the model\\\\\\&#39;s style or continue a previous audio segment. The [prompt](/docs/guides/speech-to-text/prompting) should match the audio language.\n\t         * @param {string} [responseFormat] The format of the transcript output, in one of these options: json, text, srt, verbose_json, or vtt.\n\t         * @param {number} [temperature] The sampling temperature, between 0 and 1. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. If set to 0, the model will use [log probability](https://en.wikipedia.org/wiki/Log_probability) to automatically increase the temperature until certain thresholds are hit.\n\t         * @param {string} [language] The language of the input audio. Supplying the input language in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format will improve accuracy and latency.\n\t         * @param {*} [options] Override http request option.\n\t         * @throws {RequiredError}\n\t         */\n\t        createTranscription(file, model, prompt, responseFormat, temperature, language, options) {\n\t            return localVarFp.createTranscription(file, model, prompt, responseFormat, temperature, language, options).then((request) => request(axios, basePath));\n\t        },\n\t        /**\n\t         *\n\t         * @summary Translates audio into into English.\n\t         * @param {File} file The audio file object (not file name) translate, in one of these formats: mp3, mp4, mpeg, mpga, m4a, wav, or webm.\n\t         * @param {string} model ID of the model to use. Only &#x60;whisper-1&#x60; is currently available.\n\t         * @param {string} [prompt] An optional text to guide the model\\\\\\&#39;s style or continue a previous audio segment. The [prompt](/docs/guides/speech-to-text/prompting) should be in English.\n\t         * @param {string} [responseFormat] The format of the transcript output, in one of these options: json, text, srt, verbose_json, or vtt.\n\t         * @param {number} [temperature] The sampling temperature, between 0 and 1. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. If set to 0, the model will use [log probability](https://en.wikipedia.org/wiki/Log_probability) to automatically increase the temperature until certain thresholds are hit.\n\t         * @param {*} [options] Override http request option.\n\t         * @throws {RequiredError}\n\t         */\n\t        createTranslation(file, model, prompt, responseFormat, temperature, options) {\n\t            return localVarFp.createTranslation(file, model, prompt, responseFormat, temperature, options).then((request) => request(axios, basePath));\n\t        },\n\t        /**\n\t         *\n\t         * @summary Delete a file.\n\t         * @param {string} fileId The ID of the file to use for this request\n\t         * @param {*} [options] Override http request option.\n\t         * @throws {RequiredError}\n\t         */\n\t        deleteFile(fileId, options) {\n\t            return localVarFp.deleteFile(fileId, options).then((request) => request(axios, basePath));\n\t        },\n\t        /**\n\t         *\n\t         * @summary Delete a fine-tuned model. You must have the Owner role in your organization.\n\t         * @param {string} model The model to delete\n\t         * @param {*} [options] Override http request option.\n\t         * @throws {RequiredError}\n\t         */\n\t        deleteModel(model, options) {\n\t            return localVarFp.deleteModel(model, options).then((request) => request(axios, basePath));\n\t        },\n\t        /**\n\t         *\n\t         * @summary Returns the contents of the specified file\n\t         * @param {string} fileId The ID of the file to use for this request\n\t         * @param {*} [options] Override http request option.\n\t         * @throws {RequiredError}\n\t         */\n\t        downloadFile(fileId, options) {\n\t            return localVarFp.downloadFile(fileId, options).then((request) => request(axios, basePath));\n\t        },\n\t        /**\n\t         *\n\t         * @summary Lists the currently available (non-finetuned) models, and provides basic information about each one such as the owner and availability.\n\t         * @param {*} [options] Override http request option.\n\t         * @deprecated\n\t         * @throws {RequiredError}\n\t         */\n\t        listEngines(options) {\n\t            return localVarFp.listEngines(options).then((request) => request(axios, basePath));\n\t        },\n\t        /**\n\t         *\n\t         * @summary Returns a list of files that belong to the user\\'s organization.\n\t         * @param {*} [options] Override http request option.\n\t         * @throws {RequiredError}\n\t         */\n\t        listFiles(options) {\n\t            return localVarFp.listFiles(options).then((request) => request(axios, basePath));\n\t        },\n\t        /**\n\t         *\n\t         * @summary Get fine-grained status updates for a fine-tune job.\n\t         * @param {string} fineTuneId The ID of the fine-tune job to get events for.\n\t         * @param {boolean} [stream] Whether to stream events for the fine-tune job. If set to true, events will be sent as data-only [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format) as they become available. The stream will terminate with a &#x60;data: [DONE]&#x60; message when the job is finished (succeeded, cancelled, or failed).  If set to false, only events generated so far will be returned.\n\t         * @param {*} [options] Override http request option.\n\t         * @throws {RequiredError}\n\t         */\n\t        listFineTuneEvents(fineTuneId, stream, options) {\n\t            return localVarFp.listFineTuneEvents(fineTuneId, stream, options).then((request) => request(axios, basePath));\n\t        },\n\t        /**\n\t         *\n\t         * @summary List your organization\\'s fine-tuning jobs\n\t         * @param {*} [options] Override http request option.\n\t         * @throws {RequiredError}\n\t         */\n\t        listFineTunes(options) {\n\t            return localVarFp.listFineTunes(options).then((request) => request(axios, basePath));\n\t        },\n\t        /**\n\t         *\n\t         * @summary Lists the currently available models, and provides basic information about each one such as the owner and availability.\n\t         * @param {*} [options] Override http request option.\n\t         * @throws {RequiredError}\n\t         */\n\t        listModels(options) {\n\t            return localVarFp.listModels(options).then((request) => request(axios, basePath));\n\t        },\n\t        /**\n\t         *\n\t         * @summary Retrieves a model instance, providing basic information about it such as the owner and availability.\n\t         * @param {string} engineId The ID of the engine to use for this request\n\t         * @param {*} [options] Override http request option.\n\t         * @deprecated\n\t         * @throws {RequiredError}\n\t         */\n\t        retrieveEngine(engineId, options) {\n\t            return localVarFp.retrieveEngine(engineId, options).then((request) => request(axios, basePath));\n\t        },\n\t        /**\n\t         *\n\t         * @summary Returns information about a specific file.\n\t         * @param {string} fileId The ID of the file to use for this request\n\t         * @param {*} [options] Override http request option.\n\t         * @throws {RequiredError}\n\t         */\n\t        retrieveFile(fileId, options) {\n\t            return localVarFp.retrieveFile(fileId, options).then((request) => request(axios, basePath));\n\t        },\n\t        /**\n\t         *\n\t         * @summary Gets info about the fine-tune job.  [Learn more about Fine-tuning](/docs/guides/fine-tuning)\n\t         * @param {string} fineTuneId The ID of the fine-tune job\n\t         * @param {*} [options] Override http request option.\n\t         * @throws {RequiredError}\n\t         */\n\t        retrieveFineTune(fineTuneId, options) {\n\t            return localVarFp.retrieveFineTune(fineTuneId, options).then((request) => request(axios, basePath));\n\t        },\n\t        /**\n\t         *\n\t         * @summary Retrieves a model instance, providing basic information about the model such as the owner and permissioning.\n\t         * @param {string} model The ID of the model to use for this request\n\t         * @param {*} [options] Override http request option.\n\t         * @throws {RequiredError}\n\t         */\n\t        retrieveModel(model, options) {\n\t            return localVarFp.retrieveModel(model, options).then((request) => request(axios, basePath));\n\t        },\n\t    };\n\t};\n\t/**\n\t * OpenAIApi - object-oriented interface\n\t * @export\n\t * @class OpenAIApi\n\t * @extends {BaseAPI}\n\t */\n\tclass OpenAIApi extends base$1.BaseAPI {\n\t    /**\n\t     *\n\t     * @summary Immediately cancel a fine-tune job.\n\t     * @param {string} fineTuneId The ID of the fine-tune job to cancel\n\t     * @param {*} [options] Override http request option.\n\t     * @throws {RequiredError}\n\t     * @memberof OpenAIApi\n\t     */\n\t    cancelFineTune(fineTuneId, options) {\n\t        return exports.OpenAIApiFp(this.configuration).cancelFineTune(fineTuneId, options).then((request) => request(this.axios, this.basePath));\n\t    }\n\t    /**\n\t     *\n\t     * @summary Answers the specified question using the provided documents and examples.  The endpoint first [searches](/docs/api-reference/searches) over provided documents or files to find relevant context. The relevant context is combined with the provided examples and question to create the prompt for [completion](/docs/api-reference/completions).\n\t     * @param {CreateAnswerRequest} createAnswerRequest\n\t     * @param {*} [options] Override http request option.\n\t     * @deprecated\n\t     * @throws {RequiredError}\n\t     * @memberof OpenAIApi\n\t     */\n\t    createAnswer(createAnswerRequest, options) {\n\t        return exports.OpenAIApiFp(this.configuration).createAnswer(createAnswerRequest, options).then((request) => request(this.axios, this.basePath));\n\t    }\n\t    /**\n\t     *\n\t     * @summary Creates a model response for the given chat conversation.\n\t     * @param {CreateChatCompletionRequest} createChatCompletionRequest\n\t     * @param {*} [options] Override http request option.\n\t     * @throws {RequiredError}\n\t     * @memberof OpenAIApi\n\t     */\n\t    createChatCompletion(createChatCompletionRequest, options) {\n\t        return exports.OpenAIApiFp(this.configuration).createChatCompletion(createChatCompletionRequest, options).then((request) => request(this.axios, this.basePath));\n\t    }\n\t    /**\n\t     *\n\t     * @summary Classifies the specified `query` using provided examples.  The endpoint first [searches](/docs/api-reference/searches) over the labeled examples to select the ones most relevant for the particular query. Then, the relevant examples are combined with the query to construct a prompt to produce the final label via the [completions](/docs/api-reference/completions) endpoint.  Labeled examples can be provided via an uploaded `file`, or explicitly listed in the request using the `examples` parameter for quick tests and small scale use cases.\n\t     * @param {CreateClassificationRequest} createClassificationRequest\n\t     * @param {*} [options] Override http request option.\n\t     * @deprecated\n\t     * @throws {RequiredError}\n\t     * @memberof OpenAIApi\n\t     */\n\t    createClassification(createClassificationRequest, options) {\n\t        return exports.OpenAIApiFp(this.configuration).createClassification(createClassificationRequest, options).then((request) => request(this.axios, this.basePath));\n\t    }\n\t    /**\n\t     *\n\t     * @summary Creates a completion for the provided prompt and parameters.\n\t     * @param {CreateCompletionRequest} createCompletionRequest\n\t     * @param {*} [options] Override http request option.\n\t     * @throws {RequiredError}\n\t     * @memberof OpenAIApi\n\t     */\n\t    createCompletion(createCompletionRequest, options) {\n\t        return exports.OpenAIApiFp(this.configuration).createCompletion(createCompletionRequest, options).then((request) => request(this.axios, this.basePath));\n\t    }\n\t    /**\n\t     *\n\t     * @summary Creates a new edit for the provided input, instruction, and parameters.\n\t     * @param {CreateEditRequest} createEditRequest\n\t     * @param {*} [options] Override http request option.\n\t     * @throws {RequiredError}\n\t     * @memberof OpenAIApi\n\t     */\n\t    createEdit(createEditRequest, options) {\n\t        return exports.OpenAIApiFp(this.configuration).createEdit(createEditRequest, options).then((request) => request(this.axios, this.basePath));\n\t    }\n\t    /**\n\t     *\n\t     * @summary Creates an embedding vector representing the input text.\n\t     * @param {CreateEmbeddingRequest} createEmbeddingRequest\n\t     * @param {*} [options] Override http request option.\n\t     * @throws {RequiredError}\n\t     * @memberof OpenAIApi\n\t     */\n\t    createEmbedding(createEmbeddingRequest, options) {\n\t        return exports.OpenAIApiFp(this.configuration).createEmbedding(createEmbeddingRequest, options).then((request) => request(this.axios, this.basePath));\n\t    }\n\t    /**\n\t     *\n\t     * @summary Upload a file that contains document(s) to be used across various endpoints/features. Currently, the size of all the files uploaded by one organization can be up to 1 GB. Please contact us if you need to increase the storage limit.\n\t     * @param {File} file Name of the [JSON Lines](https://jsonlines.readthedocs.io/en/latest/) file to be uploaded.  If the &#x60;purpose&#x60; is set to \\\\\\&quot;fine-tune\\\\\\&quot;, each line is a JSON record with \\\\\\&quot;prompt\\\\\\&quot; and \\\\\\&quot;completion\\\\\\&quot; fields representing your [training examples](/docs/guides/fine-tuning/prepare-training-data).\n\t     * @param {string} purpose The intended purpose of the uploaded documents.  Use \\\\\\&quot;fine-tune\\\\\\&quot; for [Fine-tuning](/docs/api-reference/fine-tunes). This allows us to validate the format of the uploaded file.\n\t     * @param {*} [options] Override http request option.\n\t     * @throws {RequiredError}\n\t     * @memberof OpenAIApi\n\t     */\n\t    createFile(file, purpose, options) {\n\t        return exports.OpenAIApiFp(this.configuration).createFile(file, purpose, options).then((request) => request(this.axios, this.basePath));\n\t    }\n\t    /**\n\t     *\n\t     * @summary Creates a job that fine-tunes a specified model from a given dataset.  Response includes details of the enqueued job including job status and the name of the fine-tuned models once complete.  [Learn more about Fine-tuning](/docs/guides/fine-tuning)\n\t     * @param {CreateFineTuneRequest} createFineTuneRequest\n\t     * @param {*} [options] Override http request option.\n\t     * @throws {RequiredError}\n\t     * @memberof OpenAIApi\n\t     */\n\t    createFineTune(createFineTuneRequest, options) {\n\t        return exports.OpenAIApiFp(this.configuration).createFineTune(createFineTuneRequest, options).then((request) => request(this.axios, this.basePath));\n\t    }\n\t    /**\n\t     *\n\t     * @summary Creates an image given a prompt.\n\t     * @param {CreateImageRequest} createImageRequest\n\t     * @param {*} [options] Override http request option.\n\t     * @throws {RequiredError}\n\t     * @memberof OpenAIApi\n\t     */\n\t    createImage(createImageRequest, options) {\n\t        return exports.OpenAIApiFp(this.configuration).createImage(createImageRequest, options).then((request) => request(this.axios, this.basePath));\n\t    }\n\t    /**\n\t     *\n\t     * @summary Creates an edited or extended image given an original image and a prompt.\n\t     * @param {File} image The image to edit. Must be a valid PNG file, less than 4MB, and square. If mask is not provided, image must have transparency, which will be used as the mask.\n\t     * @param {string} prompt A text description of the desired image(s). The maximum length is 1000 characters.\n\t     * @param {File} [mask] An additional image whose fully transparent areas (e.g. where alpha is zero) indicate where &#x60;image&#x60; should be edited. Must be a valid PNG file, less than 4MB, and have the same dimensions as &#x60;image&#x60;.\n\t     * @param {number} [n] The number of images to generate. Must be between 1 and 10.\n\t     * @param {string} [size] The size of the generated images. Must be one of &#x60;256x256&#x60;, &#x60;512x512&#x60;, or &#x60;1024x1024&#x60;.\n\t     * @param {string} [responseFormat] The format in which the generated images are returned. Must be one of &#x60;url&#x60; or &#x60;b64_json&#x60;.\n\t     * @param {string} [user] A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. [Learn more](/docs/guides/safety-best-practices/end-user-ids).\n\t     * @param {*} [options] Override http request option.\n\t     * @throws {RequiredError}\n\t     * @memberof OpenAIApi\n\t     */\n\t    createImageEdit(image, prompt, mask, n, size, responseFormat, user, options) {\n\t        return exports.OpenAIApiFp(this.configuration).createImageEdit(image, prompt, mask, n, size, responseFormat, user, options).then((request) => request(this.axios, this.basePath));\n\t    }\n\t    /**\n\t     *\n\t     * @summary Creates a variation of a given image.\n\t     * @param {File} image The image to use as the basis for the variation(s). Must be a valid PNG file, less than 4MB, and square.\n\t     * @param {number} [n] The number of images to generate. Must be between 1 and 10.\n\t     * @param {string} [size] The size of the generated images. Must be one of &#x60;256x256&#x60;, &#x60;512x512&#x60;, or &#x60;1024x1024&#x60;.\n\t     * @param {string} [responseFormat] The format in which the generated images are returned. Must be one of &#x60;url&#x60; or &#x60;b64_json&#x60;.\n\t     * @param {string} [user] A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. [Learn more](/docs/guides/safety-best-practices/end-user-ids).\n\t     * @param {*} [options] Override http request option.\n\t     * @throws {RequiredError}\n\t     * @memberof OpenAIApi\n\t     */\n\t    createImageVariation(image, n, size, responseFormat, user, options) {\n\t        return exports.OpenAIApiFp(this.configuration).createImageVariation(image, n, size, responseFormat, user, options).then((request) => request(this.axios, this.basePath));\n\t    }\n\t    /**\n\t     *\n\t     * @summary Classifies if text violates OpenAI\\'s Content Policy\n\t     * @param {CreateModerationRequest} createModerationRequest\n\t     * @param {*} [options] Override http request option.\n\t     * @throws {RequiredError}\n\t     * @memberof OpenAIApi\n\t     */\n\t    createModeration(createModerationRequest, options) {\n\t        return exports.OpenAIApiFp(this.configuration).createModeration(createModerationRequest, options).then((request) => request(this.axios, this.basePath));\n\t    }\n\t    /**\n\t     *\n\t     * @summary The search endpoint computes similarity scores between provided query and documents. Documents can be passed directly to the API if there are no more than 200 of them.  To go beyond the 200 document limit, documents can be processed offline and then used for efficient retrieval at query time. When `file` is set, the search endpoint searches over all the documents in the given file and returns up to the `max_rerank` number of documents. These documents will be returned along with their search scores.  The similarity score is a positive score that usually ranges from 0 to 300 (but can sometimes go higher), where a score above 200 usually means the document is semantically similar to the query.\n\t     * @param {string} engineId The ID of the engine to use for this request.  You can select one of &#x60;ada&#x60;, &#x60;babbage&#x60;, &#x60;curie&#x60;, or &#x60;davinci&#x60;.\n\t     * @param {CreateSearchRequest} createSearchRequest\n\t     * @param {*} [options] Override http request option.\n\t     * @deprecated\n\t     * @throws {RequiredError}\n\t     * @memberof OpenAIApi\n\t     */\n\t    createSearch(engineId, createSearchRequest, options) {\n\t        return exports.OpenAIApiFp(this.configuration).createSearch(engineId, createSearchRequest, options).then((request) => request(this.axios, this.basePath));\n\t    }\n\t    /**\n\t     *\n\t     * @summary Transcribes audio into the input language.\n\t     * @param {File} file The audio file object (not file name) to transcribe, in one of these formats: mp3, mp4, mpeg, mpga, m4a, wav, or webm.\n\t     * @param {string} model ID of the model to use. Only &#x60;whisper-1&#x60; is currently available.\n\t     * @param {string} [prompt] An optional text to guide the model\\\\\\&#39;s style or continue a previous audio segment. The [prompt](/docs/guides/speech-to-text/prompting) should match the audio language.\n\t     * @param {string} [responseFormat] The format of the transcript output, in one of these options: json, text, srt, verbose_json, or vtt.\n\t     * @param {number} [temperature] The sampling temperature, between 0 and 1. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. If set to 0, the model will use [log probability](https://en.wikipedia.org/wiki/Log_probability) to automatically increase the temperature until certain thresholds are hit.\n\t     * @param {string} [language] The language of the input audio. Supplying the input language in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format will improve accuracy and latency.\n\t     * @param {*} [options] Override http request option.\n\t     * @throws {RequiredError}\n\t     * @memberof OpenAIApi\n\t     */\n\t    createTranscription(file, model, prompt, responseFormat, temperature, language, options) {\n\t        return exports.OpenAIApiFp(this.configuration).createTranscription(file, model, prompt, responseFormat, temperature, language, options).then((request) => request(this.axios, this.basePath));\n\t    }\n\t    /**\n\t     *\n\t     * @summary Translates audio into into English.\n\t     * @param {File} file The audio file object (not file name) translate, in one of these formats: mp3, mp4, mpeg, mpga, m4a, wav, or webm.\n\t     * @param {string} model ID of the model to use. Only &#x60;whisper-1&#x60; is currently available.\n\t     * @param {string} [prompt] An optional text to guide the model\\\\\\&#39;s style or continue a previous audio segment. The [prompt](/docs/guides/speech-to-text/prompting) should be in English.\n\t     * @param {string} [responseFormat] The format of the transcript output, in one of these options: json, text, srt, verbose_json, or vtt.\n\t     * @param {number} [temperature] The sampling temperature, between 0 and 1. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. If set to 0, the model will use [log probability](https://en.wikipedia.org/wiki/Log_probability) to automatically increase the temperature until certain thresholds are hit.\n\t     * @param {*} [options] Override http request option.\n\t     * @throws {RequiredError}\n\t     * @memberof OpenAIApi\n\t     */\n\t    createTranslation(file, model, prompt, responseFormat, temperature, options) {\n\t        return exports.OpenAIApiFp(this.configuration).createTranslation(file, model, prompt, responseFormat, temperature, options).then((request) => request(this.axios, this.basePath));\n\t    }\n\t    /**\n\t     *\n\t     * @summary Delete a file.\n\t     * @param {string} fileId The ID of the file to use for this request\n\t     * @param {*} [options] Override http request option.\n\t     * @throws {RequiredError}\n\t     * @memberof OpenAIApi\n\t     */\n\t    deleteFile(fileId, options) {\n\t        return exports.OpenAIApiFp(this.configuration).deleteFile(fileId, options).then((request) => request(this.axios, this.basePath));\n\t    }\n\t    /**\n\t     *\n\t     * @summary Delete a fine-tuned model. You must have the Owner role in your organization.\n\t     * @param {string} model The model to delete\n\t     * @param {*} [options] Override http request option.\n\t     * @throws {RequiredError}\n\t     * @memberof OpenAIApi\n\t     */\n\t    deleteModel(model, options) {\n\t        return exports.OpenAIApiFp(this.configuration).deleteModel(model, options).then((request) => request(this.axios, this.basePath));\n\t    }\n\t    /**\n\t     *\n\t     * @summary Returns the contents of the specified file\n\t     * @param {string} fileId The ID of the file to use for this request\n\t     * @param {*} [options] Override http request option.\n\t     * @throws {RequiredError}\n\t     * @memberof OpenAIApi\n\t     */\n\t    downloadFile(fileId, options) {\n\t        return exports.OpenAIApiFp(this.configuration).downloadFile(fileId, options).then((request) => request(this.axios, this.basePath));\n\t    }\n\t    /**\n\t     *\n\t     * @summary Lists the currently available (non-finetuned) models, and provides basic information about each one such as the owner and availability.\n\t     * @param {*} [options] Override http request option.\n\t     * @deprecated\n\t     * @throws {RequiredError}\n\t     * @memberof OpenAIApi\n\t     */\n\t    listEngines(options) {\n\t        return exports.OpenAIApiFp(this.configuration).listEngines(options).then((request) => request(this.axios, this.basePath));\n\t    }\n\t    /**\n\t     *\n\t     * @summary Returns a list of files that belong to the user\\'s organization.\n\t     * @param {*} [options] Override http request option.\n\t     * @throws {RequiredError}\n\t     * @memberof OpenAIApi\n\t     */\n\t    listFiles(options) {\n\t        return exports.OpenAIApiFp(this.configuration).listFiles(options).then((request) => request(this.axios, this.basePath));\n\t    }\n\t    /**\n\t     *\n\t     * @summary Get fine-grained status updates for a fine-tune job.\n\t     * @param {string} fineTuneId The ID of the fine-tune job to get events for.\n\t     * @param {boolean} [stream] Whether to stream events for the fine-tune job. If set to true, events will be sent as data-only [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format) as they become available. The stream will terminate with a &#x60;data: [DONE]&#x60; message when the job is finished (succeeded, cancelled, or failed).  If set to false, only events generated so far will be returned.\n\t     * @param {*} [options] Override http request option.\n\t     * @throws {RequiredError}\n\t     * @memberof OpenAIApi\n\t     */\n\t    listFineTuneEvents(fineTuneId, stream, options) {\n\t        return exports.OpenAIApiFp(this.configuration).listFineTuneEvents(fineTuneId, stream, options).then((request) => request(this.axios, this.basePath));\n\t    }\n\t    /**\n\t     *\n\t     * @summary List your organization\\'s fine-tuning jobs\n\t     * @param {*} [options] Override http request option.\n\t     * @throws {RequiredError}\n\t     * @memberof OpenAIApi\n\t     */\n\t    listFineTunes(options) {\n\t        return exports.OpenAIApiFp(this.configuration).listFineTunes(options).then((request) => request(this.axios, this.basePath));\n\t    }\n\t    /**\n\t     *\n\t     * @summary Lists the currently available models, and provides basic information about each one such as the owner and availability.\n\t     * @param {*} [options] Override http request option.\n\t     * @throws {RequiredError}\n\t     * @memberof OpenAIApi\n\t     */\n\t    listModels(options) {\n\t        return exports.OpenAIApiFp(this.configuration).listModels(options).then((request) => request(this.axios, this.basePath));\n\t    }\n\t    /**\n\t     *\n\t     * @summary Retrieves a model instance, providing basic information about it such as the owner and availability.\n\t     * @param {string} engineId The ID of the engine to use for this request\n\t     * @param {*} [options] Override http request option.\n\t     * @deprecated\n\t     * @throws {RequiredError}\n\t     * @memberof OpenAIApi\n\t     */\n\t    retrieveEngine(engineId, options) {\n\t        return exports.OpenAIApiFp(this.configuration).retrieveEngine(engineId, options).then((request) => request(this.axios, this.basePath));\n\t    }\n\t    /**\n\t     *\n\t     * @summary Returns information about a specific file.\n\t     * @param {string} fileId The ID of the file to use for this request\n\t     * @param {*} [options] Override http request option.\n\t     * @throws {RequiredError}\n\t     * @memberof OpenAIApi\n\t     */\n\t    retrieveFile(fileId, options) {\n\t        return exports.OpenAIApiFp(this.configuration).retrieveFile(fileId, options).then((request) => request(this.axios, this.basePath));\n\t    }\n\t    /**\n\t     *\n\t     * @summary Gets info about the fine-tune job.  [Learn more about Fine-tuning](/docs/guides/fine-tuning)\n\t     * @param {string} fineTuneId The ID of the fine-tune job\n\t     * @param {*} [options] Override http request option.\n\t     * @throws {RequiredError}\n\t     * @memberof OpenAIApi\n\t     */\n\t    retrieveFineTune(fineTuneId, options) {\n\t        return exports.OpenAIApiFp(this.configuration).retrieveFineTune(fineTuneId, options).then((request) => request(this.axios, this.basePath));\n\t    }\n\t    /**\n\t     *\n\t     * @summary Retrieves a model instance, providing basic information about the model such as the owner and permissioning.\n\t     * @param {string} model The ID of the model to use for this request\n\t     * @param {*} [options] Override http request option.\n\t     * @throws {RequiredError}\n\t     * @memberof OpenAIApi\n\t     */\n\t    retrieveModel(model, options) {\n\t        return exports.OpenAIApiFp(this.configuration).retrieveModel(model, options).then((request) => request(this.axios, this.basePath));\n\t    }\n\t}\n\texports.OpenAIApi = OpenAIApi;\n\t});\n\n\tunwrapExports(api);\n\tvar api_1 = api.OpenAIApi;\n\tvar api_2 = api.OpenAIApiFactory;\n\tvar api_3 = api.OpenAIApiFp;\n\tvar api_4 = api.OpenAIApiAxiosParamCreator;\n\tvar api_5 = api.CreateImageRequestResponseFormatEnum;\n\tvar api_6 = api.CreateImageRequestSizeEnum;\n\tvar api_7 = api.ChatCompletionResponseMessageRoleEnum;\n\tvar api_8 = api.ChatCompletionRequestMessageRoleEnum;\n\n\tvar name = \"openai\";\n\tvar version$2 = \"3.3.0\";\n\tvar description = \"Node.js library for the OpenAI API\";\n\tvar repository = {\n\t\ttype: \"git\",\n\t\turl: \"git@github.com:openai/openai-node.git\"\n\t};\n\tvar keywords = [\n\t\t\"openai\",\n\t\t\"open\",\n\t\t\"ai\",\n\t\t\"gpt-3\",\n\t\t\"gpt3\"\n\t];\n\tvar author = \"OpenAI\";\n\tvar license = \"MIT\";\n\tvar main = \"./dist/index.js\";\n\tvar types = \"./dist/index.d.ts\";\n\tvar scripts = {\n\t\tbuild: \"tsc --outDir dist/\"\n\t};\n\tvar dependencies = {\n\t\taxios: \"^0.26.0\",\n\t\t\"form-data\": \"^4.0.0\"\n\t};\n\tvar devDependencies = {\n\t\t\"@types/node\": \"^12.11.5\",\n\t\ttypescript: \"^3.6.4\"\n\t};\n\tvar _package = {\n\t\tname: name,\n\t\tversion: version$2,\n\t\tdescription: description,\n\t\trepository: repository,\n\t\tkeywords: keywords,\n\t\tauthor: author,\n\t\tlicense: license,\n\t\tmain: main,\n\t\ttypes: types,\n\t\tscripts: scripts,\n\t\tdependencies: dependencies,\n\t\tdevDependencies: devDependencies\n\t};\n\n\tvar _package$1 = /*#__PURE__*/Object.freeze({\n\t\t__proto__: null,\n\t\tname: name,\n\t\tversion: version$2,\n\t\tdescription: description,\n\t\trepository: repository,\n\t\tkeywords: keywords,\n\t\tauthor: author,\n\t\tlicense: license,\n\t\tmain: main,\n\t\ttypes: types,\n\t\tscripts: scripts,\n\t\tdependencies: dependencies,\n\t\tdevDependencies: devDependencies,\n\t\t'default': _package\n\t});\n\n\t/* eslint-env browser */\n\tvar browser = typeof self == 'object' ? self.FormData : window.FormData;\n\n\tvar packageJson = getCjsExportFromNamespace(_package$1);\n\n\tvar configuration = createCommonjsModule(function (module, exports) {\n\t/* tslint:disable */\n\t/* eslint-disable */\n\t/**\n\t * OpenAI API\n\t * APIs for sampling from and fine-tuning language models\n\t *\n\t * The version of the OpenAPI document: 1.3.0\n\t *\n\t *\n\t * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n\t * https://openapi-generator.tech\n\t * Do not edit the class manually.\n\t */\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\texports.Configuration = void 0;\n\n\tclass Configuration {\n\t    constructor(param = {}) {\n\t        this.apiKey = param.apiKey;\n\t        this.organization = param.organization;\n\t        this.username = param.username;\n\t        this.password = param.password;\n\t        this.accessToken = param.accessToken;\n\t        this.basePath = param.basePath;\n\t        this.baseOptions = param.baseOptions;\n\t        this.formDataCtor = param.formDataCtor;\n\t        if (!this.baseOptions) {\n\t            this.baseOptions = {};\n\t        }\n\t        this.baseOptions.headers = Object.assign({ 'User-Agent': `OpenAI/NodeJS/${packageJson.version}`, 'Authorization': `Bearer ${this.apiKey}` }, this.baseOptions.headers);\n\t        if (this.organization) {\n\t            this.baseOptions.headers['OpenAI-Organization'] = this.organization;\n\t        }\n\t        if (!this.formDataCtor) {\n\t            this.formDataCtor = browser;\n\t        }\n\t    }\n\t    /**\n\t     * Check if the given MIME is a JSON MIME.\n\t     * JSON MIME examples:\n\t     *   application/json\n\t     *   application/json; charset=UTF8\n\t     *   APPLICATION/JSON\n\t     *   application/vnd.company+json\n\t     * @param mime - MIME (Multipurpose Internet Mail Extensions)\n\t     * @return True if the given MIME is JSON, false otherwise.\n\t     */\n\t    isJsonMime(mime) {\n\t        const jsonMime = new RegExp('^(application\\/json|[^;/ \\t]+\\/[^;/ \\t]+[+]json)[ \\t]*(;.*)?$', 'i');\n\t        return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json');\n\t    }\n\t}\n\texports.Configuration = Configuration;\n\t});\n\n\tunwrapExports(configuration);\n\tvar configuration_1 = configuration.Configuration;\n\n\tvar dist = createCommonjsModule(function (module, exports) {\n\t/* tslint:disable */\n\t/* eslint-disable */\n\t/**\n\t * OpenAI API\n\t * APIs for sampling from and fine-tuning language models\n\t *\n\t * The version of the OpenAPI document: 1.3.0\n\t *\n\t *\n\t * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n\t * https://openapi-generator.tech\n\t * Do not edit the class manually.\n\t */\n\tvar __createBinding = (commonjsGlobal && commonjsGlobal.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n\t    if (k2 === undefined) k2 = k;\n\t    Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n\t}) : (function(o, m, k, k2) {\n\t    if (k2 === undefined) k2 = k;\n\t    o[k2] = m[k];\n\t}));\n\tvar __exportStar = (commonjsGlobal && commonjsGlobal.__exportStar) || function(m, exports) {\n\t    for (var p in m) if (p !== \"default\" && !exports.hasOwnProperty(p)) __createBinding(exports, m, p);\n\t};\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\t__exportStar(api, exports);\n\t__exportStar(configuration, exports);\n\t});\n\n\tvar openAI = unwrapExports(dist);\n\n\tvar _generatePromptMap, _queryMap;\n\n\tfunction _createSuper$1h(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$1h(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = construct$4(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\n\tfunction _isNativeReflectConstruct$1h() { if (typeof Reflect === \"undefined\" || !construct$4) return false; if (construct$4.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(construct$4(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\tvar FUNC_MAP = {\n\t  COMPLEMENT: 'complement',\n\t  SUMMARY: 'summary'\n\t};\n\t/**\n\t * 插入“画图”的按钮\n\t * 本功能依赖[Mermaid.js](https://mermaid-js.github.io)组件，请保证调用CherryMarkdown前已加载mermaid.js组件\n\t */\n\n\tvar ChatGpt = /*#__PURE__*/function (_MenuBase) {\n\t  _inherits(ChatGpt, _MenuBase);\n\n\t  var _super = _createSuper$1h(ChatGpt);\n\n\t  function ChatGpt($cherry) {\n\t    var _context, _context2;\n\n\t    var _this;\n\n\t    _classCallCheck(this, ChatGpt);\n\n\t    _this = _super.call(this, $cherry);\n\n\t    _this.setName('chatgpt', 'chatgpt');\n\n\t    _this.noIcon = true;\n\t    _this.subMenuConfig = [// 续写\n\t    {\n\t      iconName: _this.locale.complement,\n\t      name: FUNC_MAP.COMPLEMENT,\n\t      onclick: bind$5(_context = _this.bindSubClick).call(_context, _assertThisInitialized(_this), FUNC_MAP.COMPLEMENT)\n\t    }, // 总结\n\t    {\n\t      iconName: _this.locale.summary,\n\t      name: FUNC_MAP.SUMMARY,\n\t      onclick: bind$5(_context2 = _this.bindSubClick).call(_context2, _assertThisInitialized(_this), FUNC_MAP.SUMMARY)\n\t    }];\n\n\t    var _ref = _this.$cherry.options.openai || {},\n\t        _ref$apiKey = _ref.apiKey,\n\t        apiKey = _ref$apiKey === void 0 ? '' : _ref$apiKey,\n\t        _ref$proxy = _ref.proxy;\n\n\t    _ref$proxy = _ref$proxy === void 0 ? {} : _ref$proxy;\n\t    var _ref$proxy$host = _ref$proxy.host,\n\t        host = _ref$proxy$host === void 0 ? '' : _ref$proxy$host,\n\t        _ref$proxy$port = _ref$proxy.port,\n\t        port = _ref$proxy$port === void 0 ? '' : _ref$proxy$port,\n\t        ignoreError = _ref.ignoreError; // 设置apiKey\n\n\t    if (apiKey) {\n\t      var openai = new openAI.OpenAIApi(new openAI.Configuration({\n\t        apiKey: apiKey\n\t      }));\n\t      _this.openai = openai;\n\t    } // 设置http proxy\n\n\n\t    if (host && port) {\n\t      _this.proxy = {\n\t        host: host,\n\t        port: port\n\t      };\n\t    }\n\n\t    _this.ignoreError = ignoreError;\n\t    return _this;\n\t  }\n\n\t  _createClass(ChatGpt, [{\n\t    key: \"getSubMenuConfig\",\n\t    value: function getSubMenuConfig() {\n\t      return this.subMenuConfig;\n\t    }\n\t    /**\n\t     * 响应点击事件\n\t     * @param {string} selection 被用户选中的文本内容，本函数不处理选中的内容，会直接清空用户选中的内容\n\t     * @param {string} shortKey 快捷键参数\n\t     * @returns {string} 回填到编辑器光标位置/选中文本区域的内容\n\t     */\n\n\t  }, {\n\t    key: \"onClick\",\n\t    value: function onClick(selection) {\n\t      var shortKey = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';\n\n\t      if (!shortKey) {\n\t        return;\n\t      }\n\n\t      switch (shortKey) {\n\t        case FUNC_MAP.COMPLEMENT:\n\t          if (!this.openai) {\n\t            // 触发一个事件表示没有apiKey？\n\t            return;\n\t          }\n\n\t          this.queryOpenAIApi(FUNC_MAP.COMPLEMENT, selection);\n\t          break;\n\n\t        case FUNC_MAP.SUMMARY:\n\t          this.queryOpenAIApi(FUNC_MAP.SUMMARY, selection);\n\t          break;\n\n\t        default:\n\t          return;\n\t      }\n\t    }\n\t    /**\n\t     * 在编辑器中添加文字\n\t     */\n\n\t  }, {\n\t    key: \"concatText\",\n\t    value: function concatText(selection, text) {\n\t      var _this$editor, _this$editor$editor, _context3, _this$editor2, _this$editor2$editor;\n\n\t      this.button.className = this.button.className.replace('icon-loading loading', '');\n\t      this.button.innerText = this.button.title;\n\t      (_this$editor = this.editor) === null || _this$editor === void 0 ? void 0 : (_this$editor$editor = _this$editor.editor) === null || _this$editor$editor === void 0 ? void 0 : _this$editor$editor.replaceSelection(concat$5(_context3 = \"\".concat(selection || '', \" \\n\")).call(_context3, text));\n\t      (_this$editor2 = this.editor) === null || _this$editor2 === void 0 ? void 0 : (_this$editor2$editor = _this$editor2.editor) === null || _this$editor2$editor === void 0 ? void 0 : _this$editor2$editor.focus();\n\t    }\n\t    /**\n\t     * 请求openai api，成功回调&失败回调\n\t     * @param {string} name\n\t     * @param {string} selection\n\t     */\n\n\t  }, {\n\t    key: \"queryOpenAIApi\",\n\t    value: function queryOpenAIApi(name, selection) {\n\t      var _this2 = this;\n\n\t      if (!this.openai) {\n\t        return;\n\t      } // 增加loading\n\t      // eslint-disable-next-line prefer-destructuring\n\n\n\t      this.button = this.$cherry.wrapperDom.getElementsByClassName('cherry-toolbar-chatgpt')[0];\n\n\t      if (/icon-loading loading/.test(this.button.className)) {\n\t        return;\n\t      }\n\n\t      this.button.className += ' icon-loading loading';\n\t      this.button.innerText = ''; // const that = this;\n\n\t      var inputText = selection || this.$cherry.editor.editor.getValue();\n\t      queryMap[name].apply(this, [inputText]).then(function (res) {\n\t        var _res$data, _res$data$choices, _res$data$choices$, _res$data$choices$$me;\n\n\t        return _this2.concatText(selection, ((_res$data = res.data) === null || _res$data === void 0 ? void 0 : (_res$data$choices = _res$data.choices) === null || _res$data$choices === void 0 ? void 0 : (_res$data$choices$ = _res$data$choices[0]) === null || _res$data$choices$ === void 0 ? void 0 : (_res$data$choices$$me = _res$data$choices$.message) === null || _res$data$choices$$me === void 0 ? void 0 : _res$data$choices$$me.content) || '');\n\t      })[\"catch\"](function (res) {\n\t        var _res$response, _res$response$data, _res$response$data$er;\n\n\t        // 请求失败处理，两种方案\n\t        // 1. 抛出一个事件给第三方使用者，在cherry里怎么实现？\n\t        // 2. cherry处理并在编辑器中提示用户，目前采取这种方式\n\t        var errMsg = (res === null || res === void 0 ? void 0 : (_res$response = res.response) === null || _res$response === void 0 ? void 0 : (_res$response$data = _res$response.data) === null || _res$response$data === void 0 ? void 0 : (_res$response$data$er = _res$response$data.error) === null || _res$response$data$er === void 0 ? void 0 : _res$response$data$er.message) || '';\n\n\t        if (errMsg && _this2.ignoreError === false) {\n\t          _this2.concatText(selection, errMsg);\n\t        }\n\t      });\n\t    }\n\t  }]);\n\n\t  return ChatGpt;\n\t}(MenuBase);\n\tvar generatePromptMap = (_generatePromptMap = {}, _defineProperty(_generatePromptMap, FUNC_MAP.COMPLEMENT, function (text, language) {\n\t  if (language === 'zh_CN') {\n\t    return \"\\u8BF7\\u7EED\\u5199\\u4EE5\\u4E0B\\u6587\\u5B57: \".concat(text);\n\t  }\n\n\t  return \"continue writing with the following text: \".concat(text);\n\t}), _defineProperty(_generatePromptMap, FUNC_MAP.SUMMARY, function (text, language) {\n\t  if (language === 'zh_CN') {\n\t    return \"\\u8BF7\\u603B\\u7ED3\\u4EE5\\u4E0B\\u6587\\u5B57: \".concat(text);\n\t  }\n\n\t  return \"summary the following text: \".concat(text);\n\t}), _generatePromptMap);\n\n\tfunction queryCompletion(type, input) {\n\t  return this.openai.createChatCompletion({\n\t    model: 'gpt-3.5-turbo',\n\t    messages: [{\n\t      role: 'user',\n\t      content: generatePromptMap[type](input, this.$cherry.options.locale || '')\n\t    }] // temperature: 0.6,\n\t    // max_tokens: 500,\n\n\t  }, {\n\t    proxy: this.proxy\n\t  });\n\t}\n\n\tvar queryMap = (_queryMap = {}, _defineProperty(_queryMap, FUNC_MAP.COMPLEMENT, function (input) {\n\t  return queryCompletion.apply(this, [FUNC_MAP.COMPLEMENT, input]);\n\t}), _defineProperty(_queryMap, FUNC_MAP.SUMMARY, function (input) {\n\t  return queryCompletion.apply(this, [FUNC_MAP.SUMMARY, input]);\n\t}), _queryMap);\n\n\tfunction _createSuper$1i(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$1i(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = construct$4(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\n\tfunction _isNativeReflectConstruct$1i() { if (typeof Reflect === \"undefined\" || !construct$4) return false; if (construct$4.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(construct$4(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\t/**\n\t * 预览区域切换到“移动端视图”的按钮\n\t */\n\n\tvar MobilePreview = /*#__PURE__*/function (_MenuBase) {\n\t  _inherits(MobilePreview, _MenuBase);\n\n\t  var _super = _createSuper$1i(MobilePreview);\n\n\t  function MobilePreview($cherry) {\n\t    var _this;\n\n\t    _classCallCheck(this, MobilePreview);\n\n\t    _this = _super.call(this, $cherry);\n\t    _this.previewer = $cherry.previewer;\n\t    _this.updateMarkdown = false;\n\n\t    _this.setName('mobilePreview', 'phone');\n\n\t    return _this;\n\t  }\n\t  /**\n\t   * 响应点击事件\n\t   * 因为是预览区域的按钮，所以不用关注编辑区的选中内容\n\t   */\n\n\n\t  _createClass(MobilePreview, [{\n\t    key: \"onClick\",\n\t    value: function onClick() {\n\t      this.previewer.removeScroll(); // TODO：是否可以只通过修改外层class的方式来实现移动端预览效果的展示，而不是增加删除dom结构的方式\n\n\t      var previewerDom = this.previewer.getDomContainer();\n\n\t      if (this.previewer.isMobilePreview) {\n\t        previewerDom.parentNode.innerHTML = previewerDom.innerHTML;\n\t      } else {\n\t        previewerDom.innerHTML = \"<div class='cherry-mobile-previewer-content'>\".concat(previewerDom.innerHTML, \"</div>\");\n\t      }\n\n\t      this.previewer.isMobilePreview = !this.previewer.isMobilePreview;\n\t      this.previewer.bindScroll();\n\t    }\n\t  }]);\n\n\t  return MobilePreview;\n\t}(MenuBase);\n\n\tvar copyConstructorProperties = function (target, source, exceptions) {\n\t  var keys = ownKeys(source);\n\t  var defineProperty = objectDefineProperty.f;\n\t  var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;\n\t  for (var i = 0; i < keys.length; i++) {\n\t    var key = keys[i];\n\t    if (!hasOwnProperty_1(target, key) && !(exceptions && hasOwnProperty_1(exceptions, key))) {\n\t      defineProperty(target, key, getOwnPropertyDescriptor(source, key));\n\t    }\n\t  }\n\t};\n\n\tvar $Error = Error;\n\tvar replace$5 = functionUncurryThis(''.replace);\n\n\tvar TEST = (function (arg) { return String($Error(arg).stack); })('zxcasd');\n\tvar V8_OR_CHAKRA_STACK_ENTRY = /\\n\\s*at [^:]*:[^\\n]*/;\n\tvar IS_V8_OR_CHAKRA_STACK = V8_OR_CHAKRA_STACK_ENTRY.test(TEST);\n\n\tvar clearErrorStack = function (stack, dropEntries) {\n\t  if (IS_V8_OR_CHAKRA_STACK && typeof stack == 'string' && !$Error.prepareStackTrace) {\n\t    while (dropEntries--) stack = replace$5(stack, V8_OR_CHAKRA_STACK_ENTRY, '');\n\t  } return stack;\n\t};\n\n\t// `InstallErrorCause` abstract operation\n\t// https://tc39.es/proposal-error-cause/#sec-errorobjects-install-error-cause\n\tvar installErrorCause = function (O, options) {\n\t  if (isObject(options) && 'cause' in options) {\n\t    createNonEnumerableProperty(O, 'cause', options.cause);\n\t  }\n\t};\n\n\tvar normalizeStringArgument = function (argument, $default) {\n\t  return argument === undefined ? arguments.length < 2 ? '' : $default : toString_1(argument);\n\t};\n\n\tvar errorStackInstallable = !fails(function () {\n\t  var error = Error('a');\n\t  if (!('stack' in error)) return true;\n\t  // eslint-disable-next-line es-x/no-object-defineproperty -- safe\n\t  Object.defineProperty(error, 'stack', createPropertyDescriptor(1, 7));\n\t  return error.stack !== 7;\n\t});\n\n\tvar TO_STRING_TAG$4 = wellKnownSymbol('toStringTag');\n\tvar Error$1 = global_1.Error;\n\tvar push$a = [].push;\n\n\tvar $AggregateError = function AggregateError(errors, message /* , options */) {\n\t  var options = arguments.length > 2 ? arguments[2] : undefined;\n\t  var isInstance = objectIsPrototypeOf(AggregateErrorPrototype, this);\n\t  var that;\n\t  if (objectSetPrototypeOf) {\n\t    that = objectSetPrototypeOf(new Error$1(), isInstance ? objectGetPrototypeOf(this) : AggregateErrorPrototype);\n\t  } else {\n\t    that = isInstance ? this : objectCreate(AggregateErrorPrototype);\n\t    createNonEnumerableProperty(that, TO_STRING_TAG$4, 'Error');\n\t  }\n\t  if (message !== undefined) createNonEnumerableProperty(that, 'message', normalizeStringArgument(message));\n\t  if (errorStackInstallable) createNonEnumerableProperty(that, 'stack', clearErrorStack(that.stack, 1));\n\t  installErrorCause(that, options);\n\t  var errorsArray = [];\n\t  iterate(errors, push$a, { that: errorsArray });\n\t  createNonEnumerableProperty(that, 'errors', errorsArray);\n\t  return that;\n\t};\n\n\tif (objectSetPrototypeOf) objectSetPrototypeOf($AggregateError, Error$1);\n\telse copyConstructorProperties($AggregateError, Error$1, { name: true });\n\n\tvar AggregateErrorPrototype = $AggregateError.prototype = objectCreate(Error$1.prototype, {\n\t  constructor: createPropertyDescriptor(1, $AggregateError),\n\t  message: createPropertyDescriptor(1, ''),\n\t  name: createPropertyDescriptor(1, 'AggregateError')\n\t});\n\n\t// `AggregateError` constructor\n\t// https://tc39.es/ecma262/#sec-aggregate-error-constructor\n\t_export({ global: true, constructor: true, arity: 2 }, {\n\t  AggregateError: $AggregateError\n\t});\n\n\tvar engineIsIos = /(?:ipad|iphone|ipod).*applewebkit/i.test(engineUserAgent);\n\n\tvar set$1 = global_1.setImmediate;\n\tvar clear = global_1.clearImmediate;\n\tvar process$2 = global_1.process;\n\tvar Dispatch = global_1.Dispatch;\n\tvar Function$3 = global_1.Function;\n\tvar MessageChannel = global_1.MessageChannel;\n\tvar String$5 = global_1.String;\n\tvar counter = 0;\n\tvar queue = {};\n\tvar ONREADYSTATECHANGE = 'onreadystatechange';\n\tvar location$1, defer, channel, port;\n\n\ttry {\n\t  // Deno throws a ReferenceError on `location` access without `--location` flag\n\t  location$1 = global_1.location;\n\t} catch (error) { /* empty */ }\n\n\tvar run = function (id) {\n\t  if (hasOwnProperty_1(queue, id)) {\n\t    var fn = queue[id];\n\t    delete queue[id];\n\t    fn();\n\t  }\n\t};\n\n\tvar runner = function (id) {\n\t  return function () {\n\t    run(id);\n\t  };\n\t};\n\n\tvar listener = function (event) {\n\t  run(event.data);\n\t};\n\n\tvar post = function (id) {\n\t  // old engines have not location.origin\n\t  global_1.postMessage(String$5(id), location$1.protocol + '//' + location$1.host);\n\t};\n\n\t// Node.js 0.9+ & IE10+ has setImmediate, otherwise:\n\tif (!set$1 || !clear) {\n\t  set$1 = function setImmediate(handler) {\n\t    validateArgumentsLength(arguments.length, 1);\n\t    var fn = isCallable(handler) ? handler : Function$3(handler);\n\t    var args = arraySlice(arguments, 1);\n\t    queue[++counter] = function () {\n\t      functionApply(fn, undefined, args);\n\t    };\n\t    defer(counter);\n\t    return counter;\n\t  };\n\t  clear = function clearImmediate(id) {\n\t    delete queue[id];\n\t  };\n\t  // Node.js 0.8-\n\t  if (engineIsNode) {\n\t    defer = function (id) {\n\t      process$2.nextTick(runner(id));\n\t    };\n\t  // Sphere (JS game engine) Dispatch API\n\t  } else if (Dispatch && Dispatch.now) {\n\t    defer = function (id) {\n\t      Dispatch.now(runner(id));\n\t    };\n\t  // Browsers with MessageChannel, includes WebWorkers\n\t  // except iOS - https://github.com/zloirock/core-js/issues/624\n\t  } else if (MessageChannel && !engineIsIos) {\n\t    channel = new MessageChannel();\n\t    port = channel.port2;\n\t    channel.port1.onmessage = listener;\n\t    defer = functionBindContext(port.postMessage, port);\n\t  // Browsers with postMessage, skip WebWorkers\n\t  // IE8 has postMessage, but it's sync & typeof its postMessage is 'object'\n\t  } else if (\n\t    global_1.addEventListener &&\n\t    isCallable(global_1.postMessage) &&\n\t    !global_1.importScripts &&\n\t    location$1 && location$1.protocol !== 'file:' &&\n\t    !fails(post)\n\t  ) {\n\t    defer = post;\n\t    global_1.addEventListener('message', listener, false);\n\t  // IE8-\n\t  } else if (ONREADYSTATECHANGE in documentCreateElement('script')) {\n\t    defer = function (id) {\n\t      html.appendChild(documentCreateElement('script'))[ONREADYSTATECHANGE] = function () {\n\t        html.removeChild(this);\n\t        run(id);\n\t      };\n\t    };\n\t  // Rest old browsers\n\t  } else {\n\t    defer = function (id) {\n\t      setTimeout(runner(id), 0);\n\t    };\n\t  }\n\t}\n\n\tvar task = {\n\t  set: set$1,\n\t  clear: clear\n\t};\n\n\tvar engineIsIosPebble = /ipad|iphone|ipod/i.test(engineUserAgent) && global_1.Pebble !== undefined;\n\n\tvar engineIsWebosWebkit = /web0s(?!.*chrome)/i.test(engineUserAgent);\n\n\tvar getOwnPropertyDescriptor$9 = objectGetOwnPropertyDescriptor.f;\n\tvar macrotask = task.set;\n\n\n\n\n\n\tvar MutationObserver = global_1.MutationObserver || global_1.WebKitMutationObserver;\n\tvar document$2 = global_1.document;\n\tvar process$3 = global_1.process;\n\tvar Promise$1 = global_1.Promise;\n\t// Node.js 11 shows ExperimentalWarning on getting `queueMicrotask`\n\tvar queueMicrotaskDescriptor = getOwnPropertyDescriptor$9(global_1, 'queueMicrotask');\n\tvar queueMicrotask = queueMicrotaskDescriptor && queueMicrotaskDescriptor.value;\n\n\tvar flush, head, last, notify, toggle, node, promise, then;\n\n\t// modern engines have queueMicrotask method\n\tif (!queueMicrotask) {\n\t  flush = function () {\n\t    var parent, fn;\n\t    if (engineIsNode && (parent = process$3.domain)) parent.exit();\n\t    while (head) {\n\t      fn = head.fn;\n\t      head = head.next;\n\t      try {\n\t        fn();\n\t      } catch (error) {\n\t        if (head) notify();\n\t        else last = undefined;\n\t        throw error;\n\t      }\n\t    } last = undefined;\n\t    if (parent) parent.enter();\n\t  };\n\n\t  // browsers with MutationObserver, except iOS - https://github.com/zloirock/core-js/issues/339\n\t  // also except WebOS Webkit https://github.com/zloirock/core-js/issues/898\n\t  if (!engineIsIos && !engineIsNode && !engineIsWebosWebkit && MutationObserver && document$2) {\n\t    toggle = true;\n\t    node = document$2.createTextNode('');\n\t    new MutationObserver(flush).observe(node, { characterData: true });\n\t    notify = function () {\n\t      node.data = toggle = !toggle;\n\t    };\n\t  // environments with maybe non-completely correct, but existent Promise\n\t  } else if (!engineIsIosPebble && Promise$1 && Promise$1.resolve) {\n\t    // Promise.resolve without an argument throws an error in LG WebOS 2\n\t    promise = Promise$1.resolve(undefined);\n\t    // workaround of WebKit ~ iOS Safari 10.1 bug\n\t    promise.constructor = Promise$1;\n\t    then = functionBindContext(promise.then, promise);\n\t    notify = function () {\n\t      then(flush);\n\t    };\n\t  // Node.js without promises\n\t  } else if (engineIsNode) {\n\t    notify = function () {\n\t      process$3.nextTick(flush);\n\t    };\n\t  // for other environments - macrotask based on:\n\t  // - setImmediate\n\t  // - MessageChannel\n\t  // - window.postMessage\n\t  // - onreadystatechange\n\t  // - setTimeout\n\t  } else {\n\t    // strange IE + webpack dev server bug - use .bind(global)\n\t    macrotask = functionBindContext(macrotask, global_1);\n\t    notify = function () {\n\t      macrotask(flush);\n\t    };\n\t  }\n\t}\n\n\tvar microtask = queueMicrotask || function (fn) {\n\t  var task = { fn: fn, next: undefined };\n\t  if (last) last.next = task;\n\t  if (!head) {\n\t    head = task;\n\t    notify();\n\t  } last = task;\n\t};\n\n\tvar hostReportErrors = function (a, b) {\n\t  var console = global_1.console;\n\t  if (console && console.error) {\n\t    arguments.length == 1 ? console.error(a) : console.error(a, b);\n\t  }\n\t};\n\n\tvar perform = function (exec) {\n\t  try {\n\t    return { error: false, value: exec() };\n\t  } catch (error) {\n\t    return { error: true, value: error };\n\t  }\n\t};\n\n\tvar Queue = function () {\n\t  this.head = null;\n\t  this.tail = null;\n\t};\n\n\tQueue.prototype = {\n\t  add: function (item) {\n\t    var entry = { item: item, next: null };\n\t    if (this.head) this.tail.next = entry;\n\t    else this.head = entry;\n\t    this.tail = entry;\n\t  },\n\t  get: function () {\n\t    var entry = this.head;\n\t    if (entry) {\n\t      this.head = entry.next;\n\t      if (this.tail === entry) this.tail = null;\n\t      return entry.item;\n\t    }\n\t  }\n\t};\n\n\tvar queue$1 = Queue;\n\n\tvar promiseNativeConstructor = global_1.Promise;\n\n\tvar engineIsBrowser = typeof window == 'object' && typeof Deno != 'object';\n\n\tvar NativePromisePrototype = promiseNativeConstructor && promiseNativeConstructor.prototype;\n\tvar SPECIES$5 = wellKnownSymbol('species');\n\tvar SUBCLASSING = false;\n\tvar NATIVE_PROMISE_REJECTION_EVENT = isCallable(global_1.PromiseRejectionEvent);\n\n\tvar FORCED_PROMISE_CONSTRUCTOR = isForced_1('Promise', function () {\n\t  var PROMISE_CONSTRUCTOR_SOURCE = inspectSource(promiseNativeConstructor);\n\t  var GLOBAL_CORE_JS_PROMISE = PROMISE_CONSTRUCTOR_SOURCE !== String(promiseNativeConstructor);\n\t  // V8 6.6 (Node 10 and Chrome 66) have a bug with resolving custom thenables\n\t  // https://bugs.chromium.org/p/chromium/issues/detail?id=830565\n\t  // We can't detect it synchronously, so just check versions\n\t  if (!GLOBAL_CORE_JS_PROMISE && engineV8Version === 66) return true;\n\t  // We need Promise#{ catch, finally } in the pure version for preventing prototype pollution\n\t  if ( !(NativePromisePrototype['catch'] && NativePromisePrototype['finally'])) return true;\n\t  // We can't use @@species feature detection in V8 since it causes\n\t  // deoptimization and performance degradation\n\t  // https://github.com/zloirock/core-js/issues/679\n\t  if (engineV8Version >= 51 && /native code/.test(PROMISE_CONSTRUCTOR_SOURCE)) return false;\n\t  // Detect correctness of subclassing with @@species support\n\t  var promise = new promiseNativeConstructor(function (resolve) { resolve(1); });\n\t  var FakePromise = function (exec) {\n\t    exec(function () { /* empty */ }, function () { /* empty */ });\n\t  };\n\t  var constructor = promise.constructor = {};\n\t  constructor[SPECIES$5] = FakePromise;\n\t  SUBCLASSING = promise.then(function () { /* empty */ }) instanceof FakePromise;\n\t  if (!SUBCLASSING) return true;\n\t  // Unhandled rejections tracking support, NodeJS Promise without it fails @@species test\n\t  return !GLOBAL_CORE_JS_PROMISE && engineIsBrowser && !NATIVE_PROMISE_REJECTION_EVENT;\n\t});\n\n\tvar promiseConstructorDetection = {\n\t  CONSTRUCTOR: FORCED_PROMISE_CONSTRUCTOR,\n\t  REJECTION_EVENT: NATIVE_PROMISE_REJECTION_EVENT,\n\t  SUBCLASSING: SUBCLASSING\n\t};\n\n\tvar PromiseCapability = function (C) {\n\t  var resolve, reject;\n\t  this.promise = new C(function ($$resolve, $$reject) {\n\t    if (resolve !== undefined || reject !== undefined) throw TypeError('Bad Promise constructor');\n\t    resolve = $$resolve;\n\t    reject = $$reject;\n\t  });\n\t  this.resolve = aCallable(resolve);\n\t  this.reject = aCallable(reject);\n\t};\n\n\t// `NewPromiseCapability` abstract operation\n\t// https://tc39.es/ecma262/#sec-newpromisecapability\n\tvar f$8 = function (C) {\n\t  return new PromiseCapability(C);\n\t};\n\n\tvar newPromiseCapability = {\n\t\tf: f$8\n\t};\n\n\tvar task$1 = task.set;\n\n\n\n\n\n\n\n\n\n\tvar PROMISE = 'Promise';\n\tvar FORCED_PROMISE_CONSTRUCTOR$1 = promiseConstructorDetection.CONSTRUCTOR;\n\tvar NATIVE_PROMISE_REJECTION_EVENT$1 = promiseConstructorDetection.REJECTION_EVENT;\n\tvar getInternalPromiseState = internalState.getterFor(PROMISE);\n\tvar setInternalState$7 = internalState.set;\n\tvar NativePromisePrototype$1 = promiseNativeConstructor && promiseNativeConstructor.prototype;\n\tvar PromiseConstructor = promiseNativeConstructor;\n\tvar PromisePrototype = NativePromisePrototype$1;\n\tvar TypeError$p = global_1.TypeError;\n\tvar document$3 = global_1.document;\n\tvar process$4 = global_1.process;\n\tvar newPromiseCapability$1 = newPromiseCapability.f;\n\tvar newGenericPromiseCapability = newPromiseCapability$1;\n\n\tvar DISPATCH_EVENT = !!(document$3 && document$3.createEvent && global_1.dispatchEvent);\n\tvar UNHANDLED_REJECTION = 'unhandledrejection';\n\tvar REJECTION_HANDLED = 'rejectionhandled';\n\tvar PENDING = 0;\n\tvar FULFILLED = 1;\n\tvar REJECTED = 2;\n\tvar HANDLED = 1;\n\tvar UNHANDLED = 2;\n\n\tvar Internal, OwnPromiseCapability, PromiseWrapper;\n\n\t// helpers\n\tvar isThenable = function (it) {\n\t  var then;\n\t  return isObject(it) && isCallable(then = it.then) ? then : false;\n\t};\n\n\tvar callReaction = function (reaction, state) {\n\t  var value = state.value;\n\t  var ok = state.state == FULFILLED;\n\t  var handler = ok ? reaction.ok : reaction.fail;\n\t  var resolve = reaction.resolve;\n\t  var reject = reaction.reject;\n\t  var domain = reaction.domain;\n\t  var result, then, exited;\n\t  try {\n\t    if (handler) {\n\t      if (!ok) {\n\t        if (state.rejection === UNHANDLED) onHandleUnhandled(state);\n\t        state.rejection = HANDLED;\n\t      }\n\t      if (handler === true) result = value;\n\t      else {\n\t        if (domain) domain.enter();\n\t        result = handler(value); // can throw\n\t        if (domain) {\n\t          domain.exit();\n\t          exited = true;\n\t        }\n\t      }\n\t      if (result === reaction.promise) {\n\t        reject(TypeError$p('Promise-chain cycle'));\n\t      } else if (then = isThenable(result)) {\n\t        functionCall(then, result, resolve, reject);\n\t      } else resolve(result);\n\t    } else reject(value);\n\t  } catch (error) {\n\t    if (domain && !exited) domain.exit();\n\t    reject(error);\n\t  }\n\t};\n\n\tvar notify$1 = function (state, isReject) {\n\t  if (state.notified) return;\n\t  state.notified = true;\n\t  microtask(function () {\n\t    var reactions = state.reactions;\n\t    var reaction;\n\t    while (reaction = reactions.get()) {\n\t      callReaction(reaction, state);\n\t    }\n\t    state.notified = false;\n\t    if (isReject && !state.rejection) onUnhandled(state);\n\t  });\n\t};\n\n\tvar dispatchEvent = function (name, promise, reason) {\n\t  var event, handler;\n\t  if (DISPATCH_EVENT) {\n\t    event = document$3.createEvent('Event');\n\t    event.promise = promise;\n\t    event.reason = reason;\n\t    event.initEvent(name, false, true);\n\t    global_1.dispatchEvent(event);\n\t  } else event = { promise: promise, reason: reason };\n\t  if (!NATIVE_PROMISE_REJECTION_EVENT$1 && (handler = global_1['on' + name])) handler(event);\n\t  else if (name === UNHANDLED_REJECTION) hostReportErrors('Unhandled promise rejection', reason);\n\t};\n\n\tvar onUnhandled = function (state) {\n\t  functionCall(task$1, global_1, function () {\n\t    var promise = state.facade;\n\t    var value = state.value;\n\t    var IS_UNHANDLED = isUnhandled(state);\n\t    var result;\n\t    if (IS_UNHANDLED) {\n\t      result = perform(function () {\n\t        if (engineIsNode) {\n\t          process$4.emit('unhandledRejection', value, promise);\n\t        } else dispatchEvent(UNHANDLED_REJECTION, promise, value);\n\t      });\n\t      // Browsers should not trigger `rejectionHandled` event if it was handled here, NodeJS - should\n\t      state.rejection = engineIsNode || isUnhandled(state) ? UNHANDLED : HANDLED;\n\t      if (result.error) throw result.value;\n\t    }\n\t  });\n\t};\n\n\tvar isUnhandled = function (state) {\n\t  return state.rejection !== HANDLED && !state.parent;\n\t};\n\n\tvar onHandleUnhandled = function (state) {\n\t  functionCall(task$1, global_1, function () {\n\t    var promise = state.facade;\n\t    if (engineIsNode) {\n\t      process$4.emit('rejectionHandled', promise);\n\t    } else dispatchEvent(REJECTION_HANDLED, promise, state.value);\n\t  });\n\t};\n\n\tvar bind$b = function (fn, state, unwrap) {\n\t  return function (value) {\n\t    fn(state, value, unwrap);\n\t  };\n\t};\n\n\tvar internalReject = function (state, value, unwrap) {\n\t  if (state.done) return;\n\t  state.done = true;\n\t  if (unwrap) state = unwrap;\n\t  state.value = value;\n\t  state.state = REJECTED;\n\t  notify$1(state, true);\n\t};\n\n\tvar internalResolve = function (state, value, unwrap) {\n\t  if (state.done) return;\n\t  state.done = true;\n\t  if (unwrap) state = unwrap;\n\t  try {\n\t    if (state.facade === value) throw TypeError$p(\"Promise can't be resolved itself\");\n\t    var then = isThenable(value);\n\t    if (then) {\n\t      microtask(function () {\n\t        var wrapper = { done: false };\n\t        try {\n\t          functionCall(then, value,\n\t            bind$b(internalResolve, wrapper, state),\n\t            bind$b(internalReject, wrapper, state)\n\t          );\n\t        } catch (error) {\n\t          internalReject(wrapper, error, state);\n\t        }\n\t      });\n\t    } else {\n\t      state.value = value;\n\t      state.state = FULFILLED;\n\t      notify$1(state, false);\n\t    }\n\t  } catch (error) {\n\t    internalReject({ done: false }, error, state);\n\t  }\n\t};\n\n\t// constructor polyfill\n\tif (FORCED_PROMISE_CONSTRUCTOR$1) {\n\t  // 25.4.3.1 Promise(executor)\n\t  PromiseConstructor = function Promise(executor) {\n\t    anInstance(this, PromisePrototype);\n\t    aCallable(executor);\n\t    functionCall(Internal, this);\n\t    var state = getInternalPromiseState(this);\n\t    try {\n\t      executor(bind$b(internalResolve, state), bind$b(internalReject, state));\n\t    } catch (error) {\n\t      internalReject(state, error);\n\t    }\n\t  };\n\n\t  PromisePrototype = PromiseConstructor.prototype;\n\n\t  // eslint-disable-next-line no-unused-vars -- required for `.length`\n\t  Internal = function Promise(executor) {\n\t    setInternalState$7(this, {\n\t      type: PROMISE,\n\t      done: false,\n\t      notified: false,\n\t      parent: false,\n\t      reactions: new queue$1(),\n\t      rejection: false,\n\t      state: PENDING,\n\t      value: undefined\n\t    });\n\t  };\n\n\t  // `Promise.prototype.then` method\n\t  // https://tc39.es/ecma262/#sec-promise.prototype.then\n\t  Internal.prototype = defineBuiltIn(PromisePrototype, 'then', function then(onFulfilled, onRejected) {\n\t    var state = getInternalPromiseState(this);\n\t    var reaction = newPromiseCapability$1(speciesConstructor(this, PromiseConstructor));\n\t    state.parent = true;\n\t    reaction.ok = isCallable(onFulfilled) ? onFulfilled : true;\n\t    reaction.fail = isCallable(onRejected) && onRejected;\n\t    reaction.domain = engineIsNode ? process$4.domain : undefined;\n\t    if (state.state == PENDING) state.reactions.add(reaction);\n\t    else microtask(function () {\n\t      callReaction(reaction, state);\n\t    });\n\t    return reaction.promise;\n\t  });\n\n\t  OwnPromiseCapability = function () {\n\t    var promise = new Internal();\n\t    var state = getInternalPromiseState(promise);\n\t    this.promise = promise;\n\t    this.resolve = bind$b(internalResolve, state);\n\t    this.reject = bind$b(internalReject, state);\n\t  };\n\n\t  newPromiseCapability.f = newPromiseCapability$1 = function (C) {\n\t    return C === PromiseConstructor || C === PromiseWrapper\n\t      ? new OwnPromiseCapability(C)\n\t      : newGenericPromiseCapability(C);\n\t  };\n\t}\n\n\t_export({ global: true, constructor: true, wrap: true, forced: FORCED_PROMISE_CONSTRUCTOR$1 }, {\n\t  Promise: PromiseConstructor\n\t});\n\n\tsetToStringTag(PromiseConstructor, PROMISE, false, true);\n\tsetSpecies(PROMISE);\n\n\tvar FORCED_PROMISE_CONSTRUCTOR$2 = promiseConstructorDetection.CONSTRUCTOR;\n\n\tvar promiseStaticsIncorrectIteration = FORCED_PROMISE_CONSTRUCTOR$2 || !checkCorrectnessOfIteration(function (iterable) {\n\t  promiseNativeConstructor.all(iterable).then(undefined, function () { /* empty */ });\n\t});\n\n\t// `Promise.all` method\n\t// https://tc39.es/ecma262/#sec-promise.all\n\t_export({ target: 'Promise', stat: true, forced: promiseStaticsIncorrectIteration }, {\n\t  all: function all(iterable) {\n\t    var C = this;\n\t    var capability = newPromiseCapability.f(C);\n\t    var resolve = capability.resolve;\n\t    var reject = capability.reject;\n\t    var result = perform(function () {\n\t      var $promiseResolve = aCallable(C.resolve);\n\t      var values = [];\n\t      var counter = 0;\n\t      var remaining = 1;\n\t      iterate(iterable, function (promise) {\n\t        var index = counter++;\n\t        var alreadyCalled = false;\n\t        remaining++;\n\t        functionCall($promiseResolve, C, promise).then(function (value) {\n\t          if (alreadyCalled) return;\n\t          alreadyCalled = true;\n\t          values[index] = value;\n\t          --remaining || resolve(values);\n\t        }, reject);\n\t      });\n\t      --remaining || resolve(values);\n\t    });\n\t    if (result.error) reject(result.value);\n\t    return capability.promise;\n\t  }\n\t});\n\n\tvar FORCED_PROMISE_CONSTRUCTOR$3 = promiseConstructorDetection.CONSTRUCTOR;\n\n\n\n\n\n\tvar NativePromisePrototype$2 = promiseNativeConstructor && promiseNativeConstructor.prototype;\n\n\t// `Promise.prototype.catch` method\n\t// https://tc39.es/ecma262/#sec-promise.prototype.catch\n\t_export({ target: 'Promise', proto: true, forced: FORCED_PROMISE_CONSTRUCTOR$3, real: true }, {\n\t  'catch': function (onRejected) {\n\t    return this.then(undefined, onRejected);\n\t  }\n\t});\n\n\t// `Promise.race` method\n\t// https://tc39.es/ecma262/#sec-promise.race\n\t_export({ target: 'Promise', stat: true, forced: promiseStaticsIncorrectIteration }, {\n\t  race: function race(iterable) {\n\t    var C = this;\n\t    var capability = newPromiseCapability.f(C);\n\t    var reject = capability.reject;\n\t    var result = perform(function () {\n\t      var $promiseResolve = aCallable(C.resolve);\n\t      iterate(iterable, function (promise) {\n\t        functionCall($promiseResolve, C, promise).then(capability.resolve, reject);\n\t      });\n\t    });\n\t    if (result.error) reject(result.value);\n\t    return capability.promise;\n\t  }\n\t});\n\n\tvar FORCED_PROMISE_CONSTRUCTOR$4 = promiseConstructorDetection.CONSTRUCTOR;\n\n\t// `Promise.reject` method\n\t// https://tc39.es/ecma262/#sec-promise.reject\n\t_export({ target: 'Promise', stat: true, forced: FORCED_PROMISE_CONSTRUCTOR$4 }, {\n\t  reject: function reject(r) {\n\t    var capability = newPromiseCapability.f(this);\n\t    functionCall(capability.reject, undefined, r);\n\t    return capability.promise;\n\t  }\n\t});\n\n\tvar promiseResolve = function (C, x) {\n\t  anObject(C);\n\t  if (isObject(x) && x.constructor === C) return x;\n\t  var promiseCapability = newPromiseCapability.f(C);\n\t  var resolve = promiseCapability.resolve;\n\t  resolve(x);\n\t  return promiseCapability.promise;\n\t};\n\n\tvar FORCED_PROMISE_CONSTRUCTOR$5 = promiseConstructorDetection.CONSTRUCTOR;\n\n\n\tvar PromiseConstructorWrapper = getBuiltIn('Promise');\n\tvar CHECK_WRAPPER =  !FORCED_PROMISE_CONSTRUCTOR$5;\n\n\t// `Promise.resolve` method\n\t// https://tc39.es/ecma262/#sec-promise.resolve\n\t_export({ target: 'Promise', stat: true, forced: isPure  }, {\n\t  resolve: function resolve(x) {\n\t    return promiseResolve(CHECK_WRAPPER && this === PromiseConstructorWrapper ? promiseNativeConstructor : this, x);\n\t  }\n\t});\n\n\t// `Promise.allSettled` method\n\t// https://tc39.es/ecma262/#sec-promise.allsettled\n\t_export({ target: 'Promise', stat: true }, {\n\t  allSettled: function allSettled(iterable) {\n\t    var C = this;\n\t    var capability = newPromiseCapability.f(C);\n\t    var resolve = capability.resolve;\n\t    var reject = capability.reject;\n\t    var result = perform(function () {\n\t      var promiseResolve = aCallable(C.resolve);\n\t      var values = [];\n\t      var counter = 0;\n\t      var remaining = 1;\n\t      iterate(iterable, function (promise) {\n\t        var index = counter++;\n\t        var alreadyCalled = false;\n\t        remaining++;\n\t        functionCall(promiseResolve, C, promise).then(function (value) {\n\t          if (alreadyCalled) return;\n\t          alreadyCalled = true;\n\t          values[index] = { status: 'fulfilled', value: value };\n\t          --remaining || resolve(values);\n\t        }, function (error) {\n\t          if (alreadyCalled) return;\n\t          alreadyCalled = true;\n\t          values[index] = { status: 'rejected', reason: error };\n\t          --remaining || resolve(values);\n\t        });\n\t      });\n\t      --remaining || resolve(values);\n\t    });\n\t    if (result.error) reject(result.value);\n\t    return capability.promise;\n\t  }\n\t});\n\n\tvar PROMISE_ANY_ERROR = 'No one promise resolved';\n\n\t// `Promise.any` method\n\t// https://tc39.es/ecma262/#sec-promise.any\n\t_export({ target: 'Promise', stat: true }, {\n\t  any: function any(iterable) {\n\t    var C = this;\n\t    var AggregateError = getBuiltIn('AggregateError');\n\t    var capability = newPromiseCapability.f(C);\n\t    var resolve = capability.resolve;\n\t    var reject = capability.reject;\n\t    var result = perform(function () {\n\t      var promiseResolve = aCallable(C.resolve);\n\t      var errors = [];\n\t      var counter = 0;\n\t      var remaining = 1;\n\t      var alreadyResolved = false;\n\t      iterate(iterable, function (promise) {\n\t        var index = counter++;\n\t        var alreadyRejected = false;\n\t        remaining++;\n\t        functionCall(promiseResolve, C, promise).then(function (value) {\n\t          if (alreadyRejected || alreadyResolved) return;\n\t          alreadyResolved = true;\n\t          resolve(value);\n\t        }, function (error) {\n\t          if (alreadyRejected || alreadyResolved) return;\n\t          alreadyRejected = true;\n\t          errors[index] = error;\n\t          --remaining || reject(new AggregateError(errors, PROMISE_ANY_ERROR));\n\t        });\n\t      });\n\t      --remaining || reject(new AggregateError(errors, PROMISE_ANY_ERROR));\n\t    });\n\t    if (result.error) reject(result.value);\n\t    return capability.promise;\n\t  }\n\t});\n\n\tvar NativePromisePrototype$3 = promiseNativeConstructor && promiseNativeConstructor.prototype;\n\n\t// Safari bug https://bugs.webkit.org/show_bug.cgi?id=200829\n\tvar NON_GENERIC = !!promiseNativeConstructor && fails(function () {\n\t  // eslint-disable-next-line unicorn/no-thenable -- required for testing\n\t  NativePromisePrototype$3['finally'].call({ then: function () { /* empty */ } }, function () { /* empty */ });\n\t});\n\n\t// `Promise.prototype.finally` method\n\t// https://tc39.es/ecma262/#sec-promise.prototype.finally\n\t_export({ target: 'Promise', proto: true, real: true, forced: NON_GENERIC }, {\n\t  'finally': function (onFinally) {\n\t    var C = speciesConstructor(this, getBuiltIn('Promise'));\n\t    var isFunction = isCallable(onFinally);\n\t    return this.then(\n\t      isFunction ? function (x) {\n\t        return promiseResolve(C, onFinally()).then(function () { return x; });\n\t      } : onFinally,\n\t      isFunction ? function (e) {\n\t        return promiseResolve(C, onFinally()).then(function () { throw e; });\n\t      } : onFinally\n\t    );\n\t  }\n\t});\n\n\tvar promise$1 = path.Promise;\n\n\tvar promise$2 = promise$1;\n\n\tvar promise$3 = promise$2;\n\n\t// TODO: Remove from `core-js@4`\n\n\n\n\n\t// `Promise.try` method\n\t// https://github.com/tc39/proposal-promise-try\n\t_export({ target: 'Promise', stat: true, forced: true }, {\n\t  'try': function (callbackfn) {\n\t    var promiseCapability = newPromiseCapability.f(this);\n\t    var result = perform(callbackfn);\n\t    (result.error ? promiseCapability.reject : promiseCapability.resolve)(result.value);\n\t    return promiseCapability.promise;\n\t  }\n\t});\n\n\t// TODO: Remove from `core-js@4`\n\n\n\n\n\tvar promise$4 = promise$3;\n\n\tvar promise$5 = promise$4;\n\n\tvar promise$6 = promise$5;\n\n\tvar asyncToGenerator = createCommonjsModule(function (module) {\n\tfunction asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {\n\t  try {\n\t    var info = gen[key](arg);\n\t    var value = info.value;\n\t  } catch (error) {\n\t    reject(error);\n\t    return;\n\t  }\n\n\t  if (info.done) {\n\t    resolve(value);\n\t  } else {\n\t    promise$6.resolve(value).then(_next, _throw);\n\t  }\n\t}\n\n\tfunction _asyncToGenerator(fn) {\n\t  return function () {\n\t    var self = this,\n\t        args = arguments;\n\t    return new promise$6(function (resolve, reject) {\n\t      var gen = fn.apply(self, args);\n\n\t      function _next(value) {\n\t        asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value);\n\t      }\n\n\t      function _throw(err) {\n\t        asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err);\n\t      }\n\n\t      _next(undefined);\n\t    });\n\t  };\n\t}\n\n\tmodule.exports = _asyncToGenerator, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n\t});\n\n\tvar _asyncToGenerator = unwrapExports(asyncToGenerator);\n\n\tvar forEach$6 = forEach$2;\n\n\tvar forEach$7 = forEach$6;\n\n\tvar forEach$8 = forEach$7;\n\n\tvar forEach$9 = forEach$8;\n\n\tvar un$Reverse = functionUncurryThis([].reverse);\n\tvar test$1 = [1, 2];\n\n\t// `Array.prototype.reverse` method\n\t// https://tc39.es/ecma262/#sec-array.prototype.reverse\n\t// fix for Safari 12.0 bug\n\t// https://bugs.webkit.org/show_bug.cgi?id=188794\n\t_export({ target: 'Array', proto: true, forced: String(test$1) === String(test$1.reverse()) }, {\n\t  reverse: function reverse() {\n\t    // eslint-disable-next-line no-self-assign -- dirty hack\n\t    if (isArray(this)) this.length = this.length;\n\t    return un$Reverse(this);\n\t  }\n\t});\n\n\tvar reverse = entryVirtual('Array').reverse;\n\n\tvar ArrayPrototype$g = Array.prototype;\n\n\tvar reverse$1 = function (it) {\n\t  var own = it.reverse;\n\t  return it === ArrayPrototype$g || (objectIsPrototypeOf(ArrayPrototype$g, it) && own === ArrayPrototype$g.reverse) ? reverse : own;\n\t};\n\n\tvar reverse$2 = reverse$1;\n\n\tvar reverse$3 = reverse$2;\n\n\tvar reverse$4 = reverse$3;\n\n\tvar reverse$5 = reverse$4;\n\n\tvar reverse$6 = reverse$5;\n\n\tvar regeneratorRuntime = createCommonjsModule(function (module) {\n\tvar _typeof = _typeof_1[\"default\"];\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\tfunction _regeneratorRuntime() {\n\t  /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */\n\n\t  module.exports = _regeneratorRuntime = function _regeneratorRuntime() {\n\t    return exports;\n\t  }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n\t  var exports = {},\n\t      Op = Object.prototype,\n\t      hasOwn = Op.hasOwnProperty,\n\t      $Symbol = \"function\" == typeof symbol$5 ? symbol$5 : {},\n\t      iteratorSymbol = $Symbol.iterator || \"@@iterator\",\n\t      asyncIteratorSymbol = $Symbol.asyncIterator || \"@@asyncIterator\",\n\t      toStringTagSymbol = $Symbol.toStringTag || \"@@toStringTag\";\n\n\t  function define(obj, key, value) {\n\t    return defineProperty$9(obj, key, {\n\t      value: value,\n\t      enumerable: !0,\n\t      configurable: !0,\n\t      writable: !0\n\t    }), obj[key];\n\t  }\n\n\t  try {\n\t    define({}, \"\");\n\t  } catch (err) {\n\t    define = function define(obj, key, value) {\n\t      return obj[key] = value;\n\t    };\n\t  }\n\n\t  function wrap(innerFn, outerFn, self, tryLocsList) {\n\t    var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator,\n\t        generator = create$5(protoGenerator.prototype),\n\t        context = new Context(tryLocsList || []);\n\n\t    return generator._invoke = function (innerFn, self, context) {\n\t      var state = \"suspendedStart\";\n\t      return function (method, arg) {\n\t        if (\"executing\" === state) throw new Error(\"Generator is already running\");\n\n\t        if (\"completed\" === state) {\n\t          if (\"throw\" === method) throw arg;\n\t          return doneResult();\n\t        }\n\n\t        for (context.method = method, context.arg = arg;;) {\n\t          var delegate = context.delegate;\n\n\t          if (delegate) {\n\t            var delegateResult = maybeInvokeDelegate(delegate, context);\n\n\t            if (delegateResult) {\n\t              if (delegateResult === ContinueSentinel) continue;\n\t              return delegateResult;\n\t            }\n\t          }\n\n\t          if (\"next\" === context.method) context.sent = context._sent = context.arg;else if (\"throw\" === context.method) {\n\t            if (\"suspendedStart\" === state) throw state = \"completed\", context.arg;\n\t            context.dispatchException(context.arg);\n\t          } else \"return\" === context.method && context.abrupt(\"return\", context.arg);\n\t          state = \"executing\";\n\t          var record = tryCatch(innerFn, self, context);\n\n\t          if (\"normal\" === record.type) {\n\t            if (state = context.done ? \"completed\" : \"suspendedYield\", record.arg === ContinueSentinel) continue;\n\t            return {\n\t              value: record.arg,\n\t              done: context.done\n\t            };\n\t          }\n\n\t          \"throw\" === record.type && (state = \"completed\", context.method = \"throw\", context.arg = record.arg);\n\t        }\n\t      };\n\t    }(innerFn, self, context), generator;\n\t  }\n\n\t  function tryCatch(fn, obj, arg) {\n\t    try {\n\t      return {\n\t        type: \"normal\",\n\t        arg: fn.call(obj, arg)\n\t      };\n\t    } catch (err) {\n\t      return {\n\t        type: \"throw\",\n\t        arg: err\n\t      };\n\t    }\n\t  }\n\n\t  exports.wrap = wrap;\n\t  var ContinueSentinel = {};\n\n\t  function Generator() {}\n\n\t  function GeneratorFunction() {}\n\n\t  function GeneratorFunctionPrototype() {}\n\n\t  var IteratorPrototype = {};\n\t  define(IteratorPrototype, iteratorSymbol, function () {\n\t    return this;\n\t  });\n\t  var getProto = getPrototypeOf$5,\n\t      NativeIteratorPrototype = getProto && getProto(getProto(values([])));\n\t  NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype);\n\n\t  var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = create$5(IteratorPrototype);\n\n\t  function defineIteratorMethods(prototype) {\n\t    var _context;\n\n\t    forEach$9(_context = [\"next\", \"throw\", \"return\"]).call(_context, function (method) {\n\t      define(prototype, method, function (arg) {\n\t        return this._invoke(method, arg);\n\t      });\n\t    });\n\t  }\n\n\t  function AsyncIterator(generator, PromiseImpl) {\n\t    function invoke(method, arg, resolve, reject) {\n\t      var record = tryCatch(generator[method], generator, arg);\n\n\t      if (\"throw\" !== record.type) {\n\t        var result = record.arg,\n\t            value = result.value;\n\t        return value && \"object\" == _typeof(value) && hasOwn.call(value, \"__await\") ? PromiseImpl.resolve(value.__await).then(function (value) {\n\t          invoke(\"next\", value, resolve, reject);\n\t        }, function (err) {\n\t          invoke(\"throw\", err, resolve, reject);\n\t        }) : PromiseImpl.resolve(value).then(function (unwrapped) {\n\t          result.value = unwrapped, resolve(result);\n\t        }, function (error) {\n\t          return invoke(\"throw\", error, resolve, reject);\n\t        });\n\t      }\n\n\t      reject(record.arg);\n\t    }\n\n\t    var previousPromise;\n\n\t    this._invoke = function (method, arg) {\n\t      function callInvokeWithMethodAndArg() {\n\t        return new PromiseImpl(function (resolve, reject) {\n\t          invoke(method, arg, resolve, reject);\n\t        });\n\t      }\n\n\t      return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();\n\t    };\n\t  }\n\n\t  function maybeInvokeDelegate(delegate, context) {\n\t    var method = delegate.iterator[context.method];\n\n\t    if (undefined === method) {\n\t      if (context.delegate = null, \"throw\" === context.method) {\n\t        if (delegate.iterator[\"return\"] && (context.method = \"return\", context.arg = undefined, maybeInvokeDelegate(delegate, context), \"throw\" === context.method)) return ContinueSentinel;\n\t        context.method = \"throw\", context.arg = new TypeError(\"The iterator does not provide a 'throw' method\");\n\t      }\n\n\t      return ContinueSentinel;\n\t    }\n\n\t    var record = tryCatch(method, delegate.iterator, context.arg);\n\t    if (\"throw\" === record.type) return context.method = \"throw\", context.arg = record.arg, context.delegate = null, ContinueSentinel;\n\t    var info = record.arg;\n\t    return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, \"return\" !== context.method && (context.method = \"next\", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = \"throw\", context.arg = new TypeError(\"iterator result is not an object\"), context.delegate = null, ContinueSentinel);\n\t  }\n\n\t  function pushTryEntry(locs) {\n\t    var entry = {\n\t      tryLoc: locs[0]\n\t    };\n\t    1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry);\n\t  }\n\n\t  function resetTryEntry(entry) {\n\t    var record = entry.completion || {};\n\t    record.type = \"normal\", delete record.arg, entry.completion = record;\n\t  }\n\n\t  function Context(tryLocsList) {\n\t    this.tryEntries = [{\n\t      tryLoc: \"root\"\n\t    }], forEach$9(tryLocsList).call(tryLocsList, pushTryEntry, this), this.reset(!0);\n\t  }\n\n\t  function values(iterable) {\n\t    if (iterable) {\n\t      var iteratorMethod = iterable[iteratorSymbol];\n\t      if (iteratorMethod) return iteratorMethod.call(iterable);\n\t      if (\"function\" == typeof iterable.next) return iterable;\n\n\t      if (!isNaN(iterable.length)) {\n\t        var i = -1,\n\t            next = function next() {\n\t          for (; ++i < iterable.length;) {\n\t            if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next;\n\t          }\n\n\t          return next.value = undefined, next.done = !0, next;\n\t        };\n\n\t        return next.next = next;\n\t      }\n\t    }\n\n\t    return {\n\t      next: doneResult\n\t    };\n\t  }\n\n\t  function doneResult() {\n\t    return {\n\t      value: undefined,\n\t      done: !0\n\t    };\n\t  }\n\n\t  return GeneratorFunction.prototype = GeneratorFunctionPrototype, define(Gp, \"constructor\", GeneratorFunctionPrototype), define(GeneratorFunctionPrototype, \"constructor\", GeneratorFunction), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, \"GeneratorFunction\"), exports.isGeneratorFunction = function (genFun) {\n\t    var ctor = \"function\" == typeof genFun && genFun.constructor;\n\t    return !!ctor && (ctor === GeneratorFunction || \"GeneratorFunction\" === (ctor.displayName || ctor.name));\n\t  }, exports.mark = function (genFun) {\n\t    return setPrototypeOf$5 ? setPrototypeOf$5(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, \"GeneratorFunction\")), genFun.prototype = create$5(Gp), genFun;\n\t  }, exports.awrap = function (arg) {\n\t    return {\n\t      __await: arg\n\t    };\n\t  }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () {\n\t    return this;\n\t  }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) {\n\t    void 0 === PromiseImpl && (PromiseImpl = promise$6);\n\t    var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl);\n\t    return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) {\n\t      return result.done ? result.value : iter.next();\n\t    });\n\t  }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, \"Generator\"), define(Gp, iteratorSymbol, function () {\n\t    return this;\n\t  }), define(Gp, \"toString\", function () {\n\t    return \"[object Generator]\";\n\t  }), exports.keys = function (object) {\n\t    var keys = [];\n\n\t    for (var key in object) {\n\t      keys.push(key);\n\t    }\n\n\t    return reverse$6(keys).call(keys), function next() {\n\t      for (; keys.length;) {\n\t        var key = keys.pop();\n\t        if (key in object) return next.value = key, next.done = !1, next;\n\t      }\n\n\t      return next.done = !0, next;\n\t    };\n\t  }, exports.values = values, Context.prototype = {\n\t    constructor: Context,\n\t    reset: function reset(skipTempReset) {\n\t      var _context2;\n\n\t      if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = \"next\", this.arg = undefined, forEach$9(_context2 = this.tryEntries).call(_context2, resetTryEntry), !skipTempReset) for (var name in this) {\n\t        \"t\" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+slice$6(name).call(name, 1)) && (this[name] = undefined);\n\t      }\n\t    },\n\t    stop: function stop() {\n\t      this.done = !0;\n\t      var rootRecord = this.tryEntries[0].completion;\n\t      if (\"throw\" === rootRecord.type) throw rootRecord.arg;\n\t      return this.rval;\n\t    },\n\t    dispatchException: function dispatchException(exception) {\n\t      if (this.done) throw exception;\n\t      var context = this;\n\n\t      function handle(loc, caught) {\n\t        return record.type = \"throw\", record.arg = exception, context.next = loc, caught && (context.method = \"next\", context.arg = undefined), !!caught;\n\t      }\n\n\t      for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n\t        var entry = this.tryEntries[i],\n\t            record = entry.completion;\n\t        if (\"root\" === entry.tryLoc) return handle(\"end\");\n\n\t        if (entry.tryLoc <= this.prev) {\n\t          var hasCatch = hasOwn.call(entry, \"catchLoc\"),\n\t              hasFinally = hasOwn.call(entry, \"finallyLoc\");\n\n\t          if (hasCatch && hasFinally) {\n\t            if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);\n\t            if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);\n\t          } else if (hasCatch) {\n\t            if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);\n\t          } else {\n\t            if (!hasFinally) throw new Error(\"try statement without catch or finally\");\n\t            if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);\n\t          }\n\t        }\n\t      }\n\t    },\n\t    abrupt: function abrupt(type, arg) {\n\t      for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n\t        var entry = this.tryEntries[i];\n\n\t        if (entry.tryLoc <= this.prev && hasOwn.call(entry, \"finallyLoc\") && this.prev < entry.finallyLoc) {\n\t          var finallyEntry = entry;\n\t          break;\n\t        }\n\t      }\n\n\t      finallyEntry && (\"break\" === type || \"continue\" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null);\n\t      var record = finallyEntry ? finallyEntry.completion : {};\n\t      return record.type = type, record.arg = arg, finallyEntry ? (this.method = \"next\", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record);\n\t    },\n\t    complete: function complete(record, afterLoc) {\n\t      if (\"throw\" === record.type) throw record.arg;\n\t      return \"break\" === record.type || \"continue\" === record.type ? this.next = record.arg : \"return\" === record.type ? (this.rval = this.arg = record.arg, this.method = \"return\", this.next = \"end\") : \"normal\" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel;\n\t    },\n\t    finish: function finish(finallyLoc) {\n\t      for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n\t        var entry = this.tryEntries[i];\n\t        if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel;\n\t      }\n\t    },\n\t    \"catch\": function _catch(tryLoc) {\n\t      for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n\t        var entry = this.tryEntries[i];\n\n\t        if (entry.tryLoc === tryLoc) {\n\t          var record = entry.completion;\n\n\t          if (\"throw\" === record.type) {\n\t            var thrown = record.arg;\n\t            resetTryEntry(entry);\n\t          }\n\n\t          return thrown;\n\t        }\n\t      }\n\n\t      throw new Error(\"illegal catch attempt\");\n\t    },\n\t    delegateYield: function delegateYield(iterable, resultName, nextLoc) {\n\t      return this.delegate = {\n\t        iterator: values(iterable),\n\t        resultName: resultName,\n\t        nextLoc: nextLoc\n\t      }, \"next\" === this.method && (this.arg = undefined), ContinueSentinel;\n\t    }\n\t  }, exports;\n\t}\n\n\tmodule.exports = _regeneratorRuntime, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n\t});\n\n\tunwrapExports(regeneratorRuntime);\n\n\tvar regenerator = regeneratorRuntime();\n\n\tvar promise$7 = promise$2;\n\n\tconst defaultOpts = {\n\t    xml: false,\n\t    decodeEntities: true,\n\t};\n\tconst xmlModeDefault = {\n\t    _useHtmlParser2: true,\n\t    xmlMode: true,\n\t};\n\t/**\n\t * Flatten the options for Cheerio.\n\t *\n\t * This will set `_useHtmlParser2` to true if `xml` is set to true.\n\t *\n\t * @param options - The options to flatten.\n\t * @returns The flattened options.\n\t */\n\tfunction flatten(options) {\n\t    return (options === null || options === void 0 ? void 0 : options.xml)\n\t        ? typeof options.xml === 'boolean'\n\t            ? xmlModeDefault\n\t            : { ...xmlModeDefault, ...options.xml }\n\t        : options !== null && options !== void 0 ? options : undefined;\n\t}\n\n\t/** Types of elements found in htmlparser2's DOM */\n\tvar ElementType;\n\t(function (ElementType) {\n\t    /** Type for the root element of a document */\n\t    ElementType[\"Root\"] = \"root\";\n\t    /** Type for Text */\n\t    ElementType[\"Text\"] = \"text\";\n\t    /** Type for <? ... ?> */\n\t    ElementType[\"Directive\"] = \"directive\";\n\t    /** Type for <!-- ... --> */\n\t    ElementType[\"Comment\"] = \"comment\";\n\t    /** Type for <script> tags */\n\t    ElementType[\"Script\"] = \"script\";\n\t    /** Type for <style> tags */\n\t    ElementType[\"Style\"] = \"style\";\n\t    /** Type for Any tag */\n\t    ElementType[\"Tag\"] = \"tag\";\n\t    /** Type for <![CDATA[ ... ]]> */\n\t    ElementType[\"CDATA\"] = \"cdata\";\n\t    /** Type for <!doctype ...> */\n\t    ElementType[\"Doctype\"] = \"doctype\";\n\t})(ElementType || (ElementType = {}));\n\t/**\n\t * Tests whether an element is a tag or not.\n\t *\n\t * @param elem Element to test\n\t */\n\tfunction isTag(elem) {\n\t    return (elem.type === ElementType.Tag ||\n\t        elem.type === ElementType.Script ||\n\t        elem.type === ElementType.Style);\n\t}\n\t// Exports for backwards compatibility\n\t/** Type for the root element of a document */\n\tconst Root = ElementType.Root;\n\t/** Type for Text */\n\tconst Text = ElementType.Text;\n\t/** Type for <? ... ?> */\n\tconst Directive = ElementType.Directive;\n\t/** Type for <!-- ... --> */\n\tconst Comment = ElementType.Comment;\n\t/** Type for <script> tags */\n\tconst Script = ElementType.Script;\n\t/** Type for <style> tags */\n\tconst Style = ElementType.Style;\n\t/** Type for Any tag */\n\tconst Tag = ElementType.Tag;\n\t/** Type for <![CDATA[ ... ]]> */\n\tconst CDATA = ElementType.CDATA;\n\t/** Type for <!doctype ...> */\n\tconst Doctype = ElementType.Doctype;\n\n\t/**\n\t * This object will be used as the prototype for Nodes when creating a\n\t * DOM-Level-1-compliant structure.\n\t */\n\tclass Node$2 {\n\t    constructor() {\n\t        /** Parent of the node */\n\t        this.parent = null;\n\t        /** Previous sibling */\n\t        this.prev = null;\n\t        /** Next sibling */\n\t        this.next = null;\n\t        /** The start index of the node. Requires `withStartIndices` on the handler to be `true. */\n\t        this.startIndex = null;\n\t        /** The end index of the node. Requires `withEndIndices` on the handler to be `true. */\n\t        this.endIndex = null;\n\t    }\n\t    // Read-write aliases for properties\n\t    /**\n\t     * Same as {@link parent}.\n\t     * [DOM spec](https://dom.spec.whatwg.org)-compatible alias.\n\t     */\n\t    get parentNode() {\n\t        return this.parent;\n\t    }\n\t    set parentNode(parent) {\n\t        this.parent = parent;\n\t    }\n\t    /**\n\t     * Same as {@link prev}.\n\t     * [DOM spec](https://dom.spec.whatwg.org)-compatible alias.\n\t     */\n\t    get previousSibling() {\n\t        return this.prev;\n\t    }\n\t    set previousSibling(prev) {\n\t        this.prev = prev;\n\t    }\n\t    /**\n\t     * Same as {@link next}.\n\t     * [DOM spec](https://dom.spec.whatwg.org)-compatible alias.\n\t     */\n\t    get nextSibling() {\n\t        return this.next;\n\t    }\n\t    set nextSibling(next) {\n\t        this.next = next;\n\t    }\n\t    /**\n\t     * Clone this node, and optionally its children.\n\t     *\n\t     * @param recursive Clone child nodes as well.\n\t     * @returns A clone of the node.\n\t     */\n\t    cloneNode(recursive = false) {\n\t        return cloneNode(this, recursive);\n\t    }\n\t}\n\t/**\n\t * A node that contains some data.\n\t */\n\tclass DataNode extends Node$2 {\n\t    /**\n\t     * @param data The content of the data node\n\t     */\n\t    constructor(data) {\n\t        super();\n\t        this.data = data;\n\t    }\n\t    /**\n\t     * Same as {@link data}.\n\t     * [DOM spec](https://dom.spec.whatwg.org)-compatible alias.\n\t     */\n\t    get nodeValue() {\n\t        return this.data;\n\t    }\n\t    set nodeValue(data) {\n\t        this.data = data;\n\t    }\n\t}\n\t/**\n\t * Text within the document.\n\t */\n\tclass Text$1 extends DataNode {\n\t    constructor() {\n\t        super(...arguments);\n\t        this.type = ElementType.Text;\n\t    }\n\t    get nodeType() {\n\t        return 3;\n\t    }\n\t}\n\t/**\n\t * Comments within the document.\n\t */\n\tclass Comment$1 extends DataNode {\n\t    constructor() {\n\t        super(...arguments);\n\t        this.type = ElementType.Comment;\n\t    }\n\t    get nodeType() {\n\t        return 8;\n\t    }\n\t}\n\t/**\n\t * Processing instructions, including doc types.\n\t */\n\tclass ProcessingInstruction extends DataNode {\n\t    constructor(name, data) {\n\t        super(data);\n\t        this.name = name;\n\t        this.type = ElementType.Directive;\n\t    }\n\t    get nodeType() {\n\t        return 1;\n\t    }\n\t}\n\t/**\n\t * A `Node` that can have children.\n\t */\n\tclass NodeWithChildren extends Node$2 {\n\t    /**\n\t     * @param children Children of the node. Only certain node types can have children.\n\t     */\n\t    constructor(children) {\n\t        super();\n\t        this.children = children;\n\t    }\n\t    // Aliases\n\t    /** First child of the node. */\n\t    get firstChild() {\n\t        var _a;\n\t        return (_a = this.children[0]) !== null && _a !== void 0 ? _a : null;\n\t    }\n\t    /** Last child of the node. */\n\t    get lastChild() {\n\t        return this.children.length > 0\n\t            ? this.children[this.children.length - 1]\n\t            : null;\n\t    }\n\t    /**\n\t     * Same as {@link children}.\n\t     * [DOM spec](https://dom.spec.whatwg.org)-compatible alias.\n\t     */\n\t    get childNodes() {\n\t        return this.children;\n\t    }\n\t    set childNodes(children) {\n\t        this.children = children;\n\t    }\n\t}\n\tclass CDATA$1 extends NodeWithChildren {\n\t    constructor() {\n\t        super(...arguments);\n\t        this.type = ElementType.CDATA;\n\t    }\n\t    get nodeType() {\n\t        return 4;\n\t    }\n\t}\n\t/**\n\t * The root node of the document.\n\t */\n\tclass Document extends NodeWithChildren {\n\t    constructor() {\n\t        super(...arguments);\n\t        this.type = ElementType.Root;\n\t    }\n\t    get nodeType() {\n\t        return 9;\n\t    }\n\t}\n\t/**\n\t * An element within the DOM.\n\t */\n\tclass Element extends NodeWithChildren {\n\t    /**\n\t     * @param name Name of the tag, eg. `div`, `span`.\n\t     * @param attribs Object mapping attribute names to attribute values.\n\t     * @param children Children of the node.\n\t     */\n\t    constructor(name, attribs, children = [], type = name === \"script\"\n\t        ? ElementType.Script\n\t        : name === \"style\"\n\t            ? ElementType.Style\n\t            : ElementType.Tag) {\n\t        super(children);\n\t        this.name = name;\n\t        this.attribs = attribs;\n\t        this.type = type;\n\t    }\n\t    get nodeType() {\n\t        return 1;\n\t    }\n\t    // DOM Level 1 aliases\n\t    /**\n\t     * Same as {@link name}.\n\t     * [DOM spec](https://dom.spec.whatwg.org)-compatible alias.\n\t     */\n\t    get tagName() {\n\t        return this.name;\n\t    }\n\t    set tagName(name) {\n\t        this.name = name;\n\t    }\n\t    get attributes() {\n\t        return Object.keys(this.attribs).map((name) => {\n\t            var _a, _b;\n\t            return ({\n\t                name,\n\t                value: this.attribs[name],\n\t                namespace: (_a = this[\"x-attribsNamespace\"]) === null || _a === void 0 ? void 0 : _a[name],\n\t                prefix: (_b = this[\"x-attribsPrefix\"]) === null || _b === void 0 ? void 0 : _b[name],\n\t            });\n\t        });\n\t    }\n\t}\n\t/**\n\t * @param node Node to check.\n\t * @returns `true` if the node is a `Element`, `false` otherwise.\n\t */\n\tfunction isTag$1(node) {\n\t    return isTag(node);\n\t}\n\t/**\n\t * @param node Node to check.\n\t * @returns `true` if the node has the type `CDATA`, `false` otherwise.\n\t */\n\tfunction isCDATA(node) {\n\t    return node.type === ElementType.CDATA;\n\t}\n\t/**\n\t * @param node Node to check.\n\t * @returns `true` if the node has the type `Text`, `false` otherwise.\n\t */\n\tfunction isText(node) {\n\t    return node.type === ElementType.Text;\n\t}\n\t/**\n\t * @param node Node to check.\n\t * @returns `true` if the node has the type `Comment`, `false` otherwise.\n\t */\n\tfunction isComment(node) {\n\t    return node.type === ElementType.Comment;\n\t}\n\t/**\n\t * @param node Node to check.\n\t * @returns `true` if the node has the type `ProcessingInstruction`, `false` otherwise.\n\t */\n\tfunction isDirective(node) {\n\t    return node.type === ElementType.Directive;\n\t}\n\t/**\n\t * @param node Node to check.\n\t * @returns `true` if the node has the type `ProcessingInstruction`, `false` otherwise.\n\t */\n\tfunction isDocument(node) {\n\t    return node.type === ElementType.Root;\n\t}\n\t/**\n\t * @param node Node to check.\n\t * @returns `true` if the node has children, `false` otherwise.\n\t */\n\tfunction hasChildren(node) {\n\t    return Object.prototype.hasOwnProperty.call(node, \"children\");\n\t}\n\t/**\n\t * Clone a node, and optionally its children.\n\t *\n\t * @param recursive Clone child nodes as well.\n\t * @returns A clone of the node.\n\t */\n\tfunction cloneNode(node, recursive = false) {\n\t    let result;\n\t    if (isText(node)) {\n\t        result = new Text$1(node.data);\n\t    }\n\t    else if (isComment(node)) {\n\t        result = new Comment$1(node.data);\n\t    }\n\t    else if (isTag$1(node)) {\n\t        const children = recursive ? cloneChildren(node.children) : [];\n\t        const clone = new Element(node.name, { ...node.attribs }, children);\n\t        children.forEach((child) => (child.parent = clone));\n\t        if (node.namespace != null) {\n\t            clone.namespace = node.namespace;\n\t        }\n\t        if (node[\"x-attribsNamespace\"]) {\n\t            clone[\"x-attribsNamespace\"] = { ...node[\"x-attribsNamespace\"] };\n\t        }\n\t        if (node[\"x-attribsPrefix\"]) {\n\t            clone[\"x-attribsPrefix\"] = { ...node[\"x-attribsPrefix\"] };\n\t        }\n\t        result = clone;\n\t    }\n\t    else if (isCDATA(node)) {\n\t        const children = recursive ? cloneChildren(node.children) : [];\n\t        const clone = new CDATA$1(children);\n\t        children.forEach((child) => (child.parent = clone));\n\t        result = clone;\n\t    }\n\t    else if (isDocument(node)) {\n\t        const children = recursive ? cloneChildren(node.children) : [];\n\t        const clone = new Document(children);\n\t        children.forEach((child) => (child.parent = clone));\n\t        if (node[\"x-mode\"]) {\n\t            clone[\"x-mode\"] = node[\"x-mode\"];\n\t        }\n\t        result = clone;\n\t    }\n\t    else if (isDirective(node)) {\n\t        const instruction = new ProcessingInstruction(node.name, node.data);\n\t        if (node[\"x-name\"] != null) {\n\t            instruction[\"x-name\"] = node[\"x-name\"];\n\t            instruction[\"x-publicId\"] = node[\"x-publicId\"];\n\t            instruction[\"x-systemId\"] = node[\"x-systemId\"];\n\t        }\n\t        result = instruction;\n\t    }\n\t    else {\n\t        throw new Error(`Not implemented yet: ${node.type}`);\n\t    }\n\t    result.startIndex = node.startIndex;\n\t    result.endIndex = node.endIndex;\n\t    if (node.sourceCodeLocation != null) {\n\t        result.sourceCodeLocation = node.sourceCodeLocation;\n\t    }\n\t    return result;\n\t}\n\tfunction cloneChildren(childs) {\n\t    const children = childs.map((child) => cloneNode(child, true));\n\t    for (let i = 1; i < children.length; i++) {\n\t        children[i].prev = children[i - 1];\n\t        children[i - 1].next = children[i];\n\t    }\n\t    return children;\n\t}\n\n\t// Default options\n\tconst defaultOpts$1 = {\n\t    withStartIndices: false,\n\t    withEndIndices: false,\n\t    xmlMode: false,\n\t};\n\tclass DomHandler {\n\t    /**\n\t     * @param callback Called once parsing has completed.\n\t     * @param options Settings for the handler.\n\t     * @param elementCB Callback whenever a tag is closed.\n\t     */\n\t    constructor(callback, options, elementCB) {\n\t        /** The elements of the DOM */\n\t        this.dom = [];\n\t        /** The root element for the DOM */\n\t        this.root = new Document(this.dom);\n\t        /** Indicated whether parsing has been completed. */\n\t        this.done = false;\n\t        /** Stack of open tags. */\n\t        this.tagStack = [this.root];\n\t        /** A data node that is still being written to. */\n\t        this.lastNode = null;\n\t        /** Reference to the parser instance. Used for location information. */\n\t        this.parser = null;\n\t        // Make it possible to skip arguments, for backwards-compatibility\n\t        if (typeof options === \"function\") {\n\t            elementCB = options;\n\t            options = defaultOpts$1;\n\t        }\n\t        if (typeof callback === \"object\") {\n\t            options = callback;\n\t            callback = undefined;\n\t        }\n\t        this.callback = callback !== null && callback !== void 0 ? callback : null;\n\t        this.options = options !== null && options !== void 0 ? options : defaultOpts$1;\n\t        this.elementCB = elementCB !== null && elementCB !== void 0 ? elementCB : null;\n\t    }\n\t    onparserinit(parser) {\n\t        this.parser = parser;\n\t    }\n\t    // Resets the handler back to starting state\n\t    onreset() {\n\t        this.dom = [];\n\t        this.root = new Document(this.dom);\n\t        this.done = false;\n\t        this.tagStack = [this.root];\n\t        this.lastNode = null;\n\t        this.parser = null;\n\t    }\n\t    // Signals the handler that parsing is done\n\t    onend() {\n\t        if (this.done)\n\t            return;\n\t        this.done = true;\n\t        this.parser = null;\n\t        this.handleCallback(null);\n\t    }\n\t    onerror(error) {\n\t        this.handleCallback(error);\n\t    }\n\t    onclosetag() {\n\t        this.lastNode = null;\n\t        const elem = this.tagStack.pop();\n\t        if (this.options.withEndIndices) {\n\t            elem.endIndex = this.parser.endIndex;\n\t        }\n\t        if (this.elementCB)\n\t            this.elementCB(elem);\n\t    }\n\t    onopentag(name, attribs) {\n\t        const type = this.options.xmlMode ? ElementType.Tag : undefined;\n\t        const element = new Element(name, attribs, undefined, type);\n\t        this.addNode(element);\n\t        this.tagStack.push(element);\n\t    }\n\t    ontext(data) {\n\t        const { lastNode } = this;\n\t        if (lastNode && lastNode.type === ElementType.Text) {\n\t            lastNode.data += data;\n\t            if (this.options.withEndIndices) {\n\t                lastNode.endIndex = this.parser.endIndex;\n\t            }\n\t        }\n\t        else {\n\t            const node = new Text$1(data);\n\t            this.addNode(node);\n\t            this.lastNode = node;\n\t        }\n\t    }\n\t    oncomment(data) {\n\t        if (this.lastNode && this.lastNode.type === ElementType.Comment) {\n\t            this.lastNode.data += data;\n\t            return;\n\t        }\n\t        const node = new Comment$1(data);\n\t        this.addNode(node);\n\t        this.lastNode = node;\n\t    }\n\t    oncommentend() {\n\t        this.lastNode = null;\n\t    }\n\t    oncdatastart() {\n\t        const text = new Text$1(\"\");\n\t        const node = new CDATA$1([text]);\n\t        this.addNode(node);\n\t        text.parent = node;\n\t        this.lastNode = text;\n\t    }\n\t    oncdataend() {\n\t        this.lastNode = null;\n\t    }\n\t    onprocessinginstruction(name, data) {\n\t        const node = new ProcessingInstruction(name, data);\n\t        this.addNode(node);\n\t    }\n\t    handleCallback(error) {\n\t        if (typeof this.callback === \"function\") {\n\t            this.callback(error, this.dom);\n\t        }\n\t        else if (error) {\n\t            throw error;\n\t        }\n\t    }\n\t    addNode(node) {\n\t        const parent = this.tagStack[this.tagStack.length - 1];\n\t        const previousSibling = parent.children[parent.children.length - 1];\n\t        if (this.options.withStartIndices) {\n\t            node.startIndex = this.parser.startIndex;\n\t        }\n\t        if (this.options.withEndIndices) {\n\t            node.endIndex = this.parser.endIndex;\n\t        }\n\t        parent.children.push(node);\n\t        if (previousSibling) {\n\t            node.prev = previousSibling;\n\t            previousSibling.next = node;\n\t        }\n\t        node.parent = parent;\n\t        this.lastNode = null;\n\t    }\n\t}\n\n\tconst xmlReplacer = /[\"&'<>$\\x80-\\uFFFF]/g;\n\tconst xmlCodeMap = new Map([\n\t    [34, \"&quot;\"],\n\t    [38, \"&amp;\"],\n\t    [39, \"&apos;\"],\n\t    [60, \"&lt;\"],\n\t    [62, \"&gt;\"],\n\t]);\n\t// For compatibility with node < 4, we wrap `codePointAt`\n\tconst getCodePoint = \n\t// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition\n\tString.prototype.codePointAt != null\n\t    ? (str, index) => str.codePointAt(index)\n\t    : // http://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae\n\t        (c, index) => (c.charCodeAt(index) & 0xfc00) === 0xd800\n\t            ? (c.charCodeAt(index) - 0xd800) * 0x400 +\n\t                c.charCodeAt(index + 1) -\n\t                0xdc00 +\n\t                0x10000\n\t            : c.charCodeAt(index);\n\t/**\n\t * Encodes all non-ASCII characters, as well as characters not valid in XML\n\t * documents using XML entities.\n\t *\n\t * If a character has no equivalent entity, a\n\t * numeric hexadecimal reference (eg. `&#xfc;`) will be used.\n\t */\n\tfunction encodeXML(str) {\n\t    let ret = \"\";\n\t    let lastIdx = 0;\n\t    let match;\n\t    while ((match = xmlReplacer.exec(str)) !== null) {\n\t        const i = match.index;\n\t        const char = str.charCodeAt(i);\n\t        const next = xmlCodeMap.get(char);\n\t        if (next !== undefined) {\n\t            ret += str.substring(lastIdx, i) + next;\n\t            lastIdx = i + 1;\n\t        }\n\t        else {\n\t            ret += `${str.substring(lastIdx, i)}&#x${getCodePoint(str, i).toString(16)};`;\n\t            // Increase by 1 if we have a surrogate pair\n\t            lastIdx = xmlReplacer.lastIndex += Number((char & 0xfc00) === 0xd800);\n\t        }\n\t    }\n\t    return ret + str.substr(lastIdx);\n\t}\n\tfunction getEscaper(regex, map) {\n\t    return function escape(data) {\n\t        let match;\n\t        let lastIdx = 0;\n\t        let result = \"\";\n\t        while ((match = regex.exec(data))) {\n\t            if (lastIdx !== match.index) {\n\t                result += data.substring(lastIdx, match.index);\n\t            }\n\t            // We know that this chararcter will be in the map.\n\t            result += map.get(match[0].charCodeAt(0));\n\t            // Every match will be of length 1\n\t            lastIdx = match.index + 1;\n\t        }\n\t        return result + data.substring(lastIdx);\n\t    };\n\t}\n\t/**\n\t * Encodes all characters that have to be escaped in HTML attributes,\n\t * following {@link https://html.spec.whatwg.org/multipage/parsing.html#escapingString}.\n\t *\n\t * @param data String to escape.\n\t */\n\tconst escapeAttribute = getEscaper(/[\"&\\u00A0]/g, new Map([\n\t    [34, \"&quot;\"],\n\t    [38, \"&amp;\"],\n\t    [160, \"&nbsp;\"],\n\t]));\n\t/**\n\t * Encodes all characters that have to be escaped in HTML text,\n\t * following {@link https://html.spec.whatwg.org/multipage/parsing.html#escapingString}.\n\t *\n\t * @param data String to escape.\n\t */\n\tconst escapeText = getEscaper(/[&<>\\u00A0]/g, new Map([\n\t    [38, \"&amp;\"],\n\t    [60, \"&lt;\"],\n\t    [62, \"&gt;\"],\n\t    [160, \"&nbsp;\"],\n\t]));\n\n\tconst elementNames = new Map([\n\t    \"altGlyph\",\n\t    \"altGlyphDef\",\n\t    \"altGlyphItem\",\n\t    \"animateColor\",\n\t    \"animateMotion\",\n\t    \"animateTransform\",\n\t    \"clipPath\",\n\t    \"feBlend\",\n\t    \"feColorMatrix\",\n\t    \"feComponentTransfer\",\n\t    \"feComposite\",\n\t    \"feConvolveMatrix\",\n\t    \"feDiffuseLighting\",\n\t    \"feDisplacementMap\",\n\t    \"feDistantLight\",\n\t    \"feDropShadow\",\n\t    \"feFlood\",\n\t    \"feFuncA\",\n\t    \"feFuncB\",\n\t    \"feFuncG\",\n\t    \"feFuncR\",\n\t    \"feGaussianBlur\",\n\t    \"feImage\",\n\t    \"feMerge\",\n\t    \"feMergeNode\",\n\t    \"feMorphology\",\n\t    \"feOffset\",\n\t    \"fePointLight\",\n\t    \"feSpecularLighting\",\n\t    \"feSpotLight\",\n\t    \"feTile\",\n\t    \"feTurbulence\",\n\t    \"foreignObject\",\n\t    \"glyphRef\",\n\t    \"linearGradient\",\n\t    \"radialGradient\",\n\t    \"textPath\",\n\t].map((val) => [val.toLowerCase(), val]));\n\tconst attributeNames = new Map([\n\t    \"definitionURL\",\n\t    \"attributeName\",\n\t    \"attributeType\",\n\t    \"baseFrequency\",\n\t    \"baseProfile\",\n\t    \"calcMode\",\n\t    \"clipPathUnits\",\n\t    \"diffuseConstant\",\n\t    \"edgeMode\",\n\t    \"filterUnits\",\n\t    \"glyphRef\",\n\t    \"gradientTransform\",\n\t    \"gradientUnits\",\n\t    \"kernelMatrix\",\n\t    \"kernelUnitLength\",\n\t    \"keyPoints\",\n\t    \"keySplines\",\n\t    \"keyTimes\",\n\t    \"lengthAdjust\",\n\t    \"limitingConeAngle\",\n\t    \"markerHeight\",\n\t    \"markerUnits\",\n\t    \"markerWidth\",\n\t    \"maskContentUnits\",\n\t    \"maskUnits\",\n\t    \"numOctaves\",\n\t    \"pathLength\",\n\t    \"patternContentUnits\",\n\t    \"patternTransform\",\n\t    \"patternUnits\",\n\t    \"pointsAtX\",\n\t    \"pointsAtY\",\n\t    \"pointsAtZ\",\n\t    \"preserveAlpha\",\n\t    \"preserveAspectRatio\",\n\t    \"primitiveUnits\",\n\t    \"refX\",\n\t    \"refY\",\n\t    \"repeatCount\",\n\t    \"repeatDur\",\n\t    \"requiredExtensions\",\n\t    \"requiredFeatures\",\n\t    \"specularConstant\",\n\t    \"specularExponent\",\n\t    \"spreadMethod\",\n\t    \"startOffset\",\n\t    \"stdDeviation\",\n\t    \"stitchTiles\",\n\t    \"surfaceScale\",\n\t    \"systemLanguage\",\n\t    \"tableValues\",\n\t    \"targetX\",\n\t    \"targetY\",\n\t    \"textLength\",\n\t    \"viewBox\",\n\t    \"viewTarget\",\n\t    \"xChannelSelector\",\n\t    \"yChannelSelector\",\n\t    \"zoomAndPan\",\n\t].map((val) => [val.toLowerCase(), val]));\n\n\t/*\n\t * Module dependencies\n\t */\n\tconst unencodedElements = new Set([\n\t    \"style\",\n\t    \"script\",\n\t    \"xmp\",\n\t    \"iframe\",\n\t    \"noembed\",\n\t    \"noframes\",\n\t    \"plaintext\",\n\t    \"noscript\",\n\t]);\n\tfunction replaceQuotes(value) {\n\t    return value.replace(/\"/g, \"&quot;\");\n\t}\n\t/**\n\t * Format attributes\n\t */\n\tfunction formatAttributes(attributes, opts) {\n\t    var _a;\n\t    if (!attributes)\n\t        return;\n\t    const encode = ((_a = opts.encodeEntities) !== null && _a !== void 0 ? _a : opts.decodeEntities) === false\n\t        ? replaceQuotes\n\t        : opts.xmlMode || opts.encodeEntities !== \"utf8\"\n\t            ? encodeXML\n\t            : escapeAttribute;\n\t    return Object.keys(attributes)\n\t        .map((key) => {\n\t        var _a, _b;\n\t        const value = (_a = attributes[key]) !== null && _a !== void 0 ? _a : \"\";\n\t        if (opts.xmlMode === \"foreign\") {\n\t            /* Fix up mixed-case attribute names */\n\t            key = (_b = attributeNames.get(key)) !== null && _b !== void 0 ? _b : key;\n\t        }\n\t        if (!opts.emptyAttrs && !opts.xmlMode && value === \"\") {\n\t            return key;\n\t        }\n\t        return `${key}=\"${encode(value)}\"`;\n\t    })\n\t        .join(\" \");\n\t}\n\t/**\n\t * Self-enclosing tags\n\t */\n\tconst singleTag = new Set([\n\t    \"area\",\n\t    \"base\",\n\t    \"basefont\",\n\t    \"br\",\n\t    \"col\",\n\t    \"command\",\n\t    \"embed\",\n\t    \"frame\",\n\t    \"hr\",\n\t    \"img\",\n\t    \"input\",\n\t    \"isindex\",\n\t    \"keygen\",\n\t    \"link\",\n\t    \"meta\",\n\t    \"param\",\n\t    \"source\",\n\t    \"track\",\n\t    \"wbr\",\n\t]);\n\t/**\n\t * Renders a DOM node or an array of DOM nodes to a string.\n\t *\n\t * Can be thought of as the equivalent of the `outerHTML` of the passed node(s).\n\t *\n\t * @param node Node to be rendered.\n\t * @param options Changes serialization behavior\n\t */\n\tfunction render(node, options = {}) {\n\t    const nodes = \"length\" in node ? node : [node];\n\t    let output = \"\";\n\t    for (let i = 0; i < nodes.length; i++) {\n\t        output += renderNode(nodes[i], options);\n\t    }\n\t    return output;\n\t}\n\tfunction renderNode(node, options) {\n\t    switch (node.type) {\n\t        case Root:\n\t            return render(node.children, options);\n\t        // @ts-expect-error We don't use `Doctype` yet\n\t        case Doctype:\n\t        case Directive:\n\t            return renderDirective(node);\n\t        case Comment:\n\t            return renderComment(node);\n\t        case CDATA:\n\t            return renderCdata(node);\n\t        case Script:\n\t        case Style:\n\t        case Tag:\n\t            return renderTag(node, options);\n\t        case Text:\n\t            return renderText(node, options);\n\t    }\n\t}\n\tconst foreignModeIntegrationPoints = new Set([\n\t    \"mi\",\n\t    \"mo\",\n\t    \"mn\",\n\t    \"ms\",\n\t    \"mtext\",\n\t    \"annotation-xml\",\n\t    \"foreignObject\",\n\t    \"desc\",\n\t    \"title\",\n\t]);\n\tconst foreignElements = new Set([\"svg\", \"math\"]);\n\tfunction renderTag(elem, opts) {\n\t    var _a;\n\t    // Handle SVG / MathML in HTML\n\t    if (opts.xmlMode === \"foreign\") {\n\t        /* Fix up mixed-case element names */\n\t        elem.name = (_a = elementNames.get(elem.name)) !== null && _a !== void 0 ? _a : elem.name;\n\t        /* Exit foreign mode at integration points */\n\t        if (elem.parent &&\n\t            foreignModeIntegrationPoints.has(elem.parent.name)) {\n\t            opts = { ...opts, xmlMode: false };\n\t        }\n\t    }\n\t    if (!opts.xmlMode && foreignElements.has(elem.name)) {\n\t        opts = { ...opts, xmlMode: \"foreign\" };\n\t    }\n\t    let tag = `<${elem.name}`;\n\t    const attribs = formatAttributes(elem.attribs, opts);\n\t    if (attribs) {\n\t        tag += ` ${attribs}`;\n\t    }\n\t    if (elem.children.length === 0 &&\n\t        (opts.xmlMode\n\t            ? // In XML mode or foreign mode, and user hasn't explicitly turned off self-closing tags\n\t                opts.selfClosingTags !== false\n\t            : // User explicitly asked for self-closing tags, even in HTML mode\n\t                opts.selfClosingTags && singleTag.has(elem.name))) {\n\t        if (!opts.xmlMode)\n\t            tag += \" \";\n\t        tag += \"/>\";\n\t    }\n\t    else {\n\t        tag += \">\";\n\t        if (elem.children.length > 0) {\n\t            tag += render(elem.children, opts);\n\t        }\n\t        if (opts.xmlMode || !singleTag.has(elem.name)) {\n\t            tag += `</${elem.name}>`;\n\t        }\n\t    }\n\t    return tag;\n\t}\n\tfunction renderDirective(elem) {\n\t    return `<${elem.data}>`;\n\t}\n\tfunction renderText(elem, opts) {\n\t    var _a;\n\t    let data = elem.data || \"\";\n\t    // If entities weren't decoded, no need to encode them back\n\t    if (((_a = opts.encodeEntities) !== null && _a !== void 0 ? _a : opts.decodeEntities) !== false &&\n\t        !(!opts.xmlMode &&\n\t            elem.parent &&\n\t            unencodedElements.has(elem.parent.name))) {\n\t        data =\n\t            opts.xmlMode || opts.encodeEntities !== \"utf8\"\n\t                ? encodeXML(data)\n\t                : escapeText(data);\n\t    }\n\t    return data;\n\t}\n\tfunction renderCdata(elem) {\n\t    return `<![CDATA[${elem.children[0].data}]]>`;\n\t}\n\tfunction renderComment(elem) {\n\t    return `<!--${elem.data}-->`;\n\t}\n\n\t/**\n\t * @category Stringify\n\t * @deprecated Use the `dom-serializer` module directly.\n\t * @param node Node to get the outer HTML of.\n\t * @param options Options for serialization.\n\t * @returns `node`'s outer HTML.\n\t */\n\tfunction getOuterHTML(node, options) {\n\t    return render(node, options);\n\t}\n\t/**\n\t * @category Stringify\n\t * @deprecated Use the `dom-serializer` module directly.\n\t * @param node Node to get the inner HTML of.\n\t * @param options Options for serialization.\n\t * @returns `node`'s inner HTML.\n\t */\n\tfunction getInnerHTML(node, options) {\n\t    return hasChildren(node)\n\t        ? node.children.map((node) => getOuterHTML(node, options)).join(\"\")\n\t        : \"\";\n\t}\n\t/**\n\t * Get a node's inner text. Same as `textContent`, but inserts newlines for `<br>` tags.\n\t *\n\t * @category Stringify\n\t * @deprecated Use `textContent` instead.\n\t * @param node Node to get the inner text of.\n\t * @returns `node`'s inner text.\n\t */\n\tfunction getText(node) {\n\t    if (Array.isArray(node))\n\t        return node.map(getText).join(\"\");\n\t    if (isTag$1(node))\n\t        return node.name === \"br\" ? \"\\n\" : getText(node.children);\n\t    if (isCDATA(node))\n\t        return getText(node.children);\n\t    if (isText(node))\n\t        return node.data;\n\t    return \"\";\n\t}\n\t/**\n\t * Get a node's text content.\n\t *\n\t * @category Stringify\n\t * @param node Node to get the text content of.\n\t * @returns `node`'s text content.\n\t * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/Node/textContent}\n\t */\n\tfunction textContent(node) {\n\t    if (Array.isArray(node))\n\t        return node.map(textContent).join(\"\");\n\t    if (hasChildren(node) && !isComment(node)) {\n\t        return textContent(node.children);\n\t    }\n\t    if (isText(node))\n\t        return node.data;\n\t    return \"\";\n\t}\n\t/**\n\t * Get a node's inner text.\n\t *\n\t * @category Stringify\n\t * @param node Node to get the inner text of.\n\t * @returns `node`'s inner text.\n\t * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/Node/innerText}\n\t */\n\tfunction innerText(node) {\n\t    if (Array.isArray(node))\n\t        return node.map(innerText).join(\"\");\n\t    if (hasChildren(node) && (node.type === ElementType.Tag || isCDATA(node))) {\n\t        return innerText(node.children);\n\t    }\n\t    if (isText(node))\n\t        return node.data;\n\t    return \"\";\n\t}\n\n\t/**\n\t * Get a node's children.\n\t *\n\t * @category Traversal\n\t * @param elem Node to get the children of.\n\t * @returns `elem`'s children, or an empty array.\n\t */\n\tfunction getChildren(elem) {\n\t    return hasChildren(elem) ? elem.children : [];\n\t}\n\t/**\n\t * Get a node's parent.\n\t *\n\t * @category Traversal\n\t * @param elem Node to get the parent of.\n\t * @returns `elem`'s parent node.\n\t */\n\tfunction getParent(elem) {\n\t    return elem.parent || null;\n\t}\n\t/**\n\t * Gets an elements siblings, including the element itself.\n\t *\n\t * Attempts to get the children through the element's parent first. If we don't\n\t * have a parent (the element is a root node), we walk the element's `prev` &\n\t * `next` to get all remaining nodes.\n\t *\n\t * @category Traversal\n\t * @param elem Element to get the siblings of.\n\t * @returns `elem`'s siblings.\n\t */\n\tfunction getSiblings(elem) {\n\t    const parent = getParent(elem);\n\t    if (parent != null)\n\t        return getChildren(parent);\n\t    const siblings = [elem];\n\t    let { prev, next } = elem;\n\t    while (prev != null) {\n\t        siblings.unshift(prev);\n\t        ({ prev } = prev);\n\t    }\n\t    while (next != null) {\n\t        siblings.push(next);\n\t        ({ next } = next);\n\t    }\n\t    return siblings;\n\t}\n\t/**\n\t * Gets an attribute from an element.\n\t *\n\t * @category Traversal\n\t * @param elem Element to check.\n\t * @param name Attribute name to retrieve.\n\t * @returns The element's attribute value, or `undefined`.\n\t */\n\tfunction getAttributeValue(elem, name) {\n\t    var _a;\n\t    return (_a = elem.attribs) === null || _a === void 0 ? void 0 : _a[name];\n\t}\n\t/**\n\t * Checks whether an element has an attribute.\n\t *\n\t * @category Traversal\n\t * @param elem Element to check.\n\t * @param name Attribute name to look for.\n\t * @returns Returns whether `elem` has the attribute `name`.\n\t */\n\tfunction hasAttrib(elem, name) {\n\t    return (elem.attribs != null &&\n\t        Object.prototype.hasOwnProperty.call(elem.attribs, name) &&\n\t        elem.attribs[name] != null);\n\t}\n\t/**\n\t * Get the tag name of an element.\n\t *\n\t * @category Traversal\n\t * @param elem The element to get the name for.\n\t * @returns The tag name of `elem`.\n\t */\n\tfunction getName(elem) {\n\t    return elem.name;\n\t}\n\t/**\n\t * Returns the next element sibling of a node.\n\t *\n\t * @category Traversal\n\t * @param elem The element to get the next sibling of.\n\t * @returns `elem`'s next sibling that is a tag.\n\t */\n\tfunction nextElementSibling(elem) {\n\t    let { next } = elem;\n\t    while (next !== null && !isTag$1(next))\n\t        ({ next } = next);\n\t    return next;\n\t}\n\t/**\n\t * Returns the previous element sibling of a node.\n\t *\n\t * @category Traversal\n\t * @param elem The element to get the previous sibling of.\n\t * @returns `elem`'s previous sibling that is a tag.\n\t */\n\tfunction prevElementSibling(elem) {\n\t    let { prev } = elem;\n\t    while (prev !== null && !isTag$1(prev))\n\t        ({ prev } = prev);\n\t    return prev;\n\t}\n\n\t/**\n\t * Remove an element from the dom\n\t *\n\t * @category Manipulation\n\t * @param elem The element to be removed\n\t */\n\tfunction removeElement(elem) {\n\t    if (elem.prev)\n\t        elem.prev.next = elem.next;\n\t    if (elem.next)\n\t        elem.next.prev = elem.prev;\n\t    if (elem.parent) {\n\t        const childs = elem.parent.children;\n\t        childs.splice(childs.lastIndexOf(elem), 1);\n\t    }\n\t}\n\t/**\n\t * Replace an element in the dom\n\t *\n\t * @category Manipulation\n\t * @param elem The element to be replaced\n\t * @param replacement The element to be added\n\t */\n\tfunction replaceElement(elem, replacement) {\n\t    const prev = (replacement.prev = elem.prev);\n\t    if (prev) {\n\t        prev.next = replacement;\n\t    }\n\t    const next = (replacement.next = elem.next);\n\t    if (next) {\n\t        next.prev = replacement;\n\t    }\n\t    const parent = (replacement.parent = elem.parent);\n\t    if (parent) {\n\t        const childs = parent.children;\n\t        childs[childs.lastIndexOf(elem)] = replacement;\n\t        elem.parent = null;\n\t    }\n\t}\n\t/**\n\t * Append a child to an element.\n\t *\n\t * @category Manipulation\n\t * @param elem The element to append to.\n\t * @param child The element to be added as a child.\n\t */\n\tfunction appendChild(elem, child) {\n\t    removeElement(child);\n\t    child.next = null;\n\t    child.parent = elem;\n\t    if (elem.children.push(child) > 1) {\n\t        const sibling = elem.children[elem.children.length - 2];\n\t        sibling.next = child;\n\t        child.prev = sibling;\n\t    }\n\t    else {\n\t        child.prev = null;\n\t    }\n\t}\n\t/**\n\t * Append an element after another.\n\t *\n\t * @category Manipulation\n\t * @param elem The element to append after.\n\t * @param next The element be added.\n\t */\n\tfunction append(elem, next) {\n\t    removeElement(next);\n\t    const { parent } = elem;\n\t    const currNext = elem.next;\n\t    next.next = currNext;\n\t    next.prev = elem;\n\t    elem.next = next;\n\t    next.parent = parent;\n\t    if (currNext) {\n\t        currNext.prev = next;\n\t        if (parent) {\n\t            const childs = parent.children;\n\t            childs.splice(childs.lastIndexOf(currNext), 0, next);\n\t        }\n\t    }\n\t    else if (parent) {\n\t        parent.children.push(next);\n\t    }\n\t}\n\t/**\n\t * Prepend a child to an element.\n\t *\n\t * @category Manipulation\n\t * @param elem The element to prepend before.\n\t * @param child The element to be added as a child.\n\t */\n\tfunction prependChild(elem, child) {\n\t    removeElement(child);\n\t    child.parent = elem;\n\t    child.prev = null;\n\t    if (elem.children.unshift(child) !== 1) {\n\t        const sibling = elem.children[1];\n\t        sibling.prev = child;\n\t        child.next = sibling;\n\t    }\n\t    else {\n\t        child.next = null;\n\t    }\n\t}\n\t/**\n\t * Prepend an element before another.\n\t *\n\t * @category Manipulation\n\t * @param elem The element to prepend before.\n\t * @param prev The element be added.\n\t */\n\tfunction prepend(elem, prev) {\n\t    removeElement(prev);\n\t    const { parent } = elem;\n\t    if (parent) {\n\t        const childs = parent.children;\n\t        childs.splice(childs.indexOf(elem), 0, prev);\n\t    }\n\t    if (elem.prev) {\n\t        elem.prev.next = prev;\n\t    }\n\t    prev.parent = parent;\n\t    prev.prev = elem.prev;\n\t    prev.next = elem;\n\t    elem.prev = prev;\n\t}\n\n\t/**\n\t * Search a node and its children for nodes passing a test function.\n\t *\n\t * @category Querying\n\t * @param test Function to test nodes on.\n\t * @param node Node to search. Will be included in the result set if it matches.\n\t * @param recurse Also consider child nodes.\n\t * @param limit Maximum number of nodes to return.\n\t * @returns All nodes passing `test`.\n\t */\n\tfunction filter$4(test, node, recurse = true, limit = Infinity) {\n\t    if (!Array.isArray(node))\n\t        node = [node];\n\t    return find$5(test, node, recurse, limit);\n\t}\n\t/**\n\t * Search an array of node and its children for nodes passing a test function.\n\t *\n\t * @category Querying\n\t * @param test Function to test nodes on.\n\t * @param nodes Array of nodes to search.\n\t * @param recurse Also consider child nodes.\n\t * @param limit Maximum number of nodes to return.\n\t * @returns All nodes passing `test`.\n\t */\n\tfunction find$5(test, nodes, recurse, limit) {\n\t    const result = [];\n\t    for (const elem of nodes) {\n\t        if (test(elem)) {\n\t            result.push(elem);\n\t            if (--limit <= 0)\n\t                break;\n\t        }\n\t        if (recurse && hasChildren(elem) && elem.children.length > 0) {\n\t            const children = find$5(test, elem.children, recurse, limit);\n\t            result.push(...children);\n\t            limit -= children.length;\n\t            if (limit <= 0)\n\t                break;\n\t        }\n\t    }\n\t    return result;\n\t}\n\t/**\n\t * Finds the first element inside of an array that matches a test function.\n\t *\n\t * @category Querying\n\t * @param test Function to test nodes on.\n\t * @param nodes Array of nodes to search.\n\t * @returns The first node in the array that passes `test`.\n\t * @deprecated Use `Array.prototype.find` directly.\n\t */\n\tfunction findOneChild(test, nodes) {\n\t    return nodes.find(test);\n\t}\n\t/**\n\t * Finds one element in a tree that passes a test.\n\t *\n\t * @category Querying\n\t * @param test Function to test nodes on.\n\t * @param nodes Array of nodes to search.\n\t * @param recurse Also consider child nodes.\n\t * @returns The first child node that passes `test`.\n\t */\n\tfunction findOne(test, nodes, recurse = true) {\n\t    let elem = null;\n\t    for (let i = 0; i < nodes.length && !elem; i++) {\n\t        const checked = nodes[i];\n\t        if (!isTag$1(checked)) {\n\t            continue;\n\t        }\n\t        else if (test(checked)) {\n\t            elem = checked;\n\t        }\n\t        else if (recurse && checked.children.length > 0) {\n\t            elem = findOne(test, checked.children, true);\n\t        }\n\t    }\n\t    return elem;\n\t}\n\t/**\n\t * @category Querying\n\t * @param test Function to test nodes on.\n\t * @param nodes Array of nodes to search.\n\t * @returns Whether a tree of nodes contains at least one node passing the test.\n\t */\n\tfunction existsOne(test, nodes) {\n\t    return nodes.some((checked) => isTag$1(checked) &&\n\t        (test(checked) ||\n\t            (checked.children.length > 0 &&\n\t                existsOne(test, checked.children))));\n\t}\n\t/**\n\t * Search and array of nodes and its children for elements passing a test function.\n\t *\n\t * Same as `find`, but limited to elements and with less options, leading to reduced complexity.\n\t *\n\t * @category Querying\n\t * @param test Function to test nodes on.\n\t * @param nodes Array of nodes to search.\n\t * @returns All nodes passing `test`.\n\t */\n\tfunction findAll(test, nodes) {\n\t    var _a;\n\t    const result = [];\n\t    const stack = nodes.filter(isTag$1);\n\t    let elem;\n\t    while ((elem = stack.shift())) {\n\t        const children = (_a = elem.children) === null || _a === void 0 ? void 0 : _a.filter(isTag$1);\n\t        if (children && children.length > 0) {\n\t            stack.unshift(...children);\n\t        }\n\t        if (test(elem))\n\t            result.push(elem);\n\t    }\n\t    return result;\n\t}\n\n\tconst Checks = {\n\t    tag_name(name) {\n\t        if (typeof name === \"function\") {\n\t            return (elem) => isTag$1(elem) && name(elem.name);\n\t        }\n\t        else if (name === \"*\") {\n\t            return isTag$1;\n\t        }\n\t        return (elem) => isTag$1(elem) && elem.name === name;\n\t    },\n\t    tag_type(type) {\n\t        if (typeof type === \"function\") {\n\t            return (elem) => type(elem.type);\n\t        }\n\t        return (elem) => elem.type === type;\n\t    },\n\t    tag_contains(data) {\n\t        if (typeof data === \"function\") {\n\t            return (elem) => isText(elem) && data(elem.data);\n\t        }\n\t        return (elem) => isText(elem) && elem.data === data;\n\t    },\n\t};\n\t/**\n\t * @param attrib Attribute to check.\n\t * @param value Attribute value to look for.\n\t * @returns A function to check whether the a node has an attribute with a\n\t *   particular value.\n\t */\n\tfunction getAttribCheck(attrib, value) {\n\t    if (typeof value === \"function\") {\n\t        return (elem) => isTag$1(elem) && value(elem.attribs[attrib]);\n\t    }\n\t    return (elem) => isTag$1(elem) && elem.attribs[attrib] === value;\n\t}\n\t/**\n\t * @param a First function to combine.\n\t * @param b Second function to combine.\n\t * @returns A function taking a node and returning `true` if either of the input\n\t *   functions returns `true` for the node.\n\t */\n\tfunction combineFuncs(a, b) {\n\t    return (elem) => a(elem) || b(elem);\n\t}\n\t/**\n\t * @param options An object describing nodes to look for.\n\t * @returns A function executing all checks in `options` and returning `true` if\n\t *   any of them match a node.\n\t */\n\tfunction compileTest(options) {\n\t    const funcs = Object.keys(options).map((key) => {\n\t        const value = options[key];\n\t        return Object.prototype.hasOwnProperty.call(Checks, key)\n\t            ? Checks[key](value)\n\t            : getAttribCheck(key, value);\n\t    });\n\t    return funcs.length === 0 ? null : funcs.reduce(combineFuncs);\n\t}\n\t/**\n\t * @category Legacy Query Functions\n\t * @param options An object describing nodes to look for.\n\t * @param node The element to test.\n\t * @returns Whether the element matches the description in `options`.\n\t */\n\tfunction testElement(options, node) {\n\t    const test = compileTest(options);\n\t    return test ? test(node) : true;\n\t}\n\t/**\n\t * @category Legacy Query Functions\n\t * @param options An object describing nodes to look for.\n\t * @param nodes Nodes to search through.\n\t * @param recurse Also consider child nodes.\n\t * @param limit Maximum number of nodes to return.\n\t * @returns All nodes that match `options`.\n\t */\n\tfunction getElements(options, nodes, recurse, limit = Infinity) {\n\t    const test = compileTest(options);\n\t    return test ? filter$4(test, nodes, recurse, limit) : [];\n\t}\n\t/**\n\t * @category Legacy Query Functions\n\t * @param id The unique ID attribute value to look for.\n\t * @param nodes Nodes to search through.\n\t * @param recurse Also consider child nodes.\n\t * @returns The node with the supplied ID.\n\t */\n\tfunction getElementById(id, nodes, recurse = true) {\n\t    if (!Array.isArray(nodes))\n\t        nodes = [nodes];\n\t    return findOne(getAttribCheck(\"id\", id), nodes, recurse);\n\t}\n\t/**\n\t * @category Legacy Query Functions\n\t * @param tagName Tag name to search for.\n\t * @param nodes Nodes to search through.\n\t * @param recurse Also consider child nodes.\n\t * @param limit Maximum number of nodes to return.\n\t * @returns All nodes with the supplied `tagName`.\n\t */\n\tfunction getElementsByTagName(tagName, nodes, recurse = true, limit = Infinity) {\n\t    return filter$4(Checks[\"tag_name\"](tagName), nodes, recurse, limit);\n\t}\n\t/**\n\t * @category Legacy Query Functions\n\t * @param type Element type to look for.\n\t * @param nodes Nodes to search through.\n\t * @param recurse Also consider child nodes.\n\t * @param limit Maximum number of nodes to return.\n\t * @returns All nodes with the supplied `type`.\n\t */\n\tfunction getElementsByTagType(type, nodes, recurse = true, limit = Infinity) {\n\t    return filter$4(Checks[\"tag_type\"](type), nodes, recurse, limit);\n\t}\n\n\t/**\n\t * Given an array of nodes, remove any member that is contained by another.\n\t *\n\t * @category Helpers\n\t * @param nodes Nodes to filter.\n\t * @returns Remaining nodes that aren't subtrees of each other.\n\t */\n\tfunction removeSubsets(nodes) {\n\t    let idx = nodes.length;\n\t    /*\n\t     * Check if each node (or one of its ancestors) is already contained in the\n\t     * array.\n\t     */\n\t    while (--idx >= 0) {\n\t        const node = nodes[idx];\n\t        /*\n\t         * Remove the node if it is not unique.\n\t         * We are going through the array from the end, so we only\n\t         * have to check nodes that preceed the node under consideration in the array.\n\t         */\n\t        if (idx > 0 && nodes.lastIndexOf(node, idx - 1) >= 0) {\n\t            nodes.splice(idx, 1);\n\t            continue;\n\t        }\n\t        for (let ancestor = node.parent; ancestor; ancestor = ancestor.parent) {\n\t            if (nodes.includes(ancestor)) {\n\t                nodes.splice(idx, 1);\n\t                break;\n\t            }\n\t        }\n\t    }\n\t    return nodes;\n\t}\n\t/**\n\t * @category Helpers\n\t * @see {@link http://dom.spec.whatwg.org/#dom-node-comparedocumentposition}\n\t */\n\tvar DocumentPosition;\n\t(function (DocumentPosition) {\n\t    DocumentPosition[DocumentPosition[\"DISCONNECTED\"] = 1] = \"DISCONNECTED\";\n\t    DocumentPosition[DocumentPosition[\"PRECEDING\"] = 2] = \"PRECEDING\";\n\t    DocumentPosition[DocumentPosition[\"FOLLOWING\"] = 4] = \"FOLLOWING\";\n\t    DocumentPosition[DocumentPosition[\"CONTAINS\"] = 8] = \"CONTAINS\";\n\t    DocumentPosition[DocumentPosition[\"CONTAINED_BY\"] = 16] = \"CONTAINED_BY\";\n\t})(DocumentPosition || (DocumentPosition = {}));\n\t/**\n\t * Compare the position of one node against another node in any other document.\n\t * The return value is a bitmask with the values from {@link DocumentPosition}.\n\t *\n\t * Document order:\n\t * > There is an ordering, document order, defined on all the nodes in the\n\t * > document corresponding to the order in which the first character of the\n\t * > XML representation of each node occurs in the XML representation of the\n\t * > document after expansion of general entities. Thus, the document element\n\t * > node will be the first node. Element nodes occur before their children.\n\t * > Thus, document order orders element nodes in order of the occurrence of\n\t * > their start-tag in the XML (after expansion of entities). The attribute\n\t * > nodes of an element occur after the element and before its children. The\n\t * > relative order of attribute nodes is implementation-dependent.\n\t *\n\t * Source:\n\t * http://www.w3.org/TR/DOM-Level-3-Core/glossary.html#dt-document-order\n\t *\n\t * @category Helpers\n\t * @param nodeA The first node to use in the comparison\n\t * @param nodeB The second node to use in the comparison\n\t * @returns A bitmask describing the input nodes' relative position.\n\t *\n\t * See http://dom.spec.whatwg.org/#dom-node-comparedocumentposition for\n\t * a description of these values.\n\t */\n\tfunction compareDocumentPosition(nodeA, nodeB) {\n\t    const aParents = [];\n\t    const bParents = [];\n\t    if (nodeA === nodeB) {\n\t        return 0;\n\t    }\n\t    let current = hasChildren(nodeA) ? nodeA : nodeA.parent;\n\t    while (current) {\n\t        aParents.unshift(current);\n\t        current = current.parent;\n\t    }\n\t    current = hasChildren(nodeB) ? nodeB : nodeB.parent;\n\t    while (current) {\n\t        bParents.unshift(current);\n\t        current = current.parent;\n\t    }\n\t    const maxIdx = Math.min(aParents.length, bParents.length);\n\t    let idx = 0;\n\t    while (idx < maxIdx && aParents[idx] === bParents[idx]) {\n\t        idx++;\n\t    }\n\t    if (idx === 0) {\n\t        return DocumentPosition.DISCONNECTED;\n\t    }\n\t    const sharedParent = aParents[idx - 1];\n\t    const siblings = sharedParent.children;\n\t    const aSibling = aParents[idx];\n\t    const bSibling = bParents[idx];\n\t    if (siblings.indexOf(aSibling) > siblings.indexOf(bSibling)) {\n\t        if (sharedParent === nodeB) {\n\t            return DocumentPosition.FOLLOWING | DocumentPosition.CONTAINED_BY;\n\t        }\n\t        return DocumentPosition.FOLLOWING;\n\t    }\n\t    if (sharedParent === nodeA) {\n\t        return DocumentPosition.PRECEDING | DocumentPosition.CONTAINS;\n\t    }\n\t    return DocumentPosition.PRECEDING;\n\t}\n\t/**\n\t * Sort an array of nodes based on their relative position in the document and\n\t * remove any duplicate nodes. If the array contains nodes that do not belong to\n\t * the same document, sort order is unspecified.\n\t *\n\t * @category Helpers\n\t * @param nodes Array of DOM nodes.\n\t * @returns Collection of unique nodes, sorted in document order.\n\t */\n\tfunction uniqueSort(nodes) {\n\t    nodes = nodes.filter((node, i, arr) => !arr.includes(node, i + 1));\n\t    nodes.sort((a, b) => {\n\t        const relative = compareDocumentPosition(a, b);\n\t        if (relative & DocumentPosition.PRECEDING) {\n\t            return -1;\n\t        }\n\t        else if (relative & DocumentPosition.FOLLOWING) {\n\t            return 1;\n\t        }\n\t        return 0;\n\t    });\n\t    return nodes;\n\t}\n\n\t/**\n\t * Get the feed object from the root of a DOM tree.\n\t *\n\t * @category Feeds\n\t * @param doc - The DOM to to extract the feed from.\n\t * @returns The feed.\n\t */\n\tfunction getFeed(doc) {\n\t    const feedRoot = getOneElement(isValidFeed, doc);\n\t    return !feedRoot\n\t        ? null\n\t        : feedRoot.name === \"feed\"\n\t            ? getAtomFeed(feedRoot)\n\t            : getRssFeed(feedRoot);\n\t}\n\t/**\n\t * Parse an Atom feed.\n\t *\n\t * @param feedRoot The root of the feed.\n\t * @returns The parsed feed.\n\t */\n\tfunction getAtomFeed(feedRoot) {\n\t    var _a;\n\t    const childs = feedRoot.children;\n\t    const feed = {\n\t        type: \"atom\",\n\t        items: getElementsByTagName(\"entry\", childs).map((item) => {\n\t            var _a;\n\t            const { children } = item;\n\t            const entry = { media: getMediaElements(children) };\n\t            addConditionally(entry, \"id\", \"id\", children);\n\t            addConditionally(entry, \"title\", \"title\", children);\n\t            const href = (_a = getOneElement(\"link\", children)) === null || _a === void 0 ? void 0 : _a.attribs[\"href\"];\n\t            if (href) {\n\t                entry.link = href;\n\t            }\n\t            const description = fetch$1(\"summary\", children) || fetch$1(\"content\", children);\n\t            if (description) {\n\t                entry.description = description;\n\t            }\n\t            const pubDate = fetch$1(\"updated\", children);\n\t            if (pubDate) {\n\t                entry.pubDate = new Date(pubDate);\n\t            }\n\t            return entry;\n\t        }),\n\t    };\n\t    addConditionally(feed, \"id\", \"id\", childs);\n\t    addConditionally(feed, \"title\", \"title\", childs);\n\t    const href = (_a = getOneElement(\"link\", childs)) === null || _a === void 0 ? void 0 : _a.attribs[\"href\"];\n\t    if (href) {\n\t        feed.link = href;\n\t    }\n\t    addConditionally(feed, \"description\", \"subtitle\", childs);\n\t    const updated = fetch$1(\"updated\", childs);\n\t    if (updated) {\n\t        feed.updated = new Date(updated);\n\t    }\n\t    addConditionally(feed, \"author\", \"email\", childs, true);\n\t    return feed;\n\t}\n\t/**\n\t * Parse a RSS feed.\n\t *\n\t * @param feedRoot The root of the feed.\n\t * @returns The parsed feed.\n\t */\n\tfunction getRssFeed(feedRoot) {\n\t    var _a, _b;\n\t    const childs = (_b = (_a = getOneElement(\"channel\", feedRoot.children)) === null || _a === void 0 ? void 0 : _a.children) !== null && _b !== void 0 ? _b : [];\n\t    const feed = {\n\t        type: feedRoot.name.substr(0, 3),\n\t        id: \"\",\n\t        items: getElementsByTagName(\"item\", feedRoot.children).map((item) => {\n\t            const { children } = item;\n\t            const entry = { media: getMediaElements(children) };\n\t            addConditionally(entry, \"id\", \"guid\", children);\n\t            addConditionally(entry, \"title\", \"title\", children);\n\t            addConditionally(entry, \"link\", \"link\", children);\n\t            addConditionally(entry, \"description\", \"description\", children);\n\t            const pubDate = fetch$1(\"pubDate\", children);\n\t            if (pubDate)\n\t                entry.pubDate = new Date(pubDate);\n\t            return entry;\n\t        }),\n\t    };\n\t    addConditionally(feed, \"title\", \"title\", childs);\n\t    addConditionally(feed, \"link\", \"link\", childs);\n\t    addConditionally(feed, \"description\", \"description\", childs);\n\t    const updated = fetch$1(\"lastBuildDate\", childs);\n\t    if (updated) {\n\t        feed.updated = new Date(updated);\n\t    }\n\t    addConditionally(feed, \"author\", \"managingEditor\", childs, true);\n\t    return feed;\n\t}\n\tconst MEDIA_KEYS_STRING = [\"url\", \"type\", \"lang\"];\n\tconst MEDIA_KEYS_INT = [\n\t    \"fileSize\",\n\t    \"bitrate\",\n\t    \"framerate\",\n\t    \"samplingrate\",\n\t    \"channels\",\n\t    \"duration\",\n\t    \"height\",\n\t    \"width\",\n\t];\n\t/**\n\t * Get all media elements of a feed item.\n\t *\n\t * @param where Nodes to search in.\n\t * @returns Media elements.\n\t */\n\tfunction getMediaElements(where) {\n\t    return getElementsByTagName(\"media:content\", where).map((elem) => {\n\t        const { attribs } = elem;\n\t        const media = {\n\t            medium: attribs[\"medium\"],\n\t            isDefault: !!attribs[\"isDefault\"],\n\t        };\n\t        for (const attrib of MEDIA_KEYS_STRING) {\n\t            if (attribs[attrib]) {\n\t                media[attrib] = attribs[attrib];\n\t            }\n\t        }\n\t        for (const attrib of MEDIA_KEYS_INT) {\n\t            if (attribs[attrib]) {\n\t                media[attrib] = parseInt(attribs[attrib], 10);\n\t            }\n\t        }\n\t        if (attribs[\"expression\"]) {\n\t            media.expression = attribs[\"expression\"];\n\t        }\n\t        return media;\n\t    });\n\t}\n\t/**\n\t * Get one element by tag name.\n\t *\n\t * @param tagName Tag name to look for\n\t * @param node Node to search in\n\t * @returns The element or null\n\t */\n\tfunction getOneElement(tagName, node) {\n\t    return getElementsByTagName(tagName, node, true, 1)[0];\n\t}\n\t/**\n\t * Get the text content of an element with a certain tag name.\n\t *\n\t * @param tagName Tag name to look for.\n\t * @param where Node to search in.\n\t * @param recurse Whether to recurse into child nodes.\n\t * @returns The text content of the element.\n\t */\n\tfunction fetch$1(tagName, where, recurse = false) {\n\t    return textContent(getElementsByTagName(tagName, where, recurse, 1)).trim();\n\t}\n\t/**\n\t * Adds a property to an object if it has a value.\n\t *\n\t * @param obj Object to be extended\n\t * @param prop Property name\n\t * @param tagName Tag name that contains the conditionally added property\n\t * @param where Element to search for the property\n\t * @param recurse Whether to recurse into child nodes.\n\t */\n\tfunction addConditionally(obj, prop, tagName, where, recurse = false) {\n\t    const val = fetch$1(tagName, where, recurse);\n\t    if (val)\n\t        obj[prop] = val;\n\t}\n\t/**\n\t * Checks if an element is a feed root node.\n\t *\n\t * @param value The name of the element to check.\n\t * @returns Whether an element is a feed root node.\n\t */\n\tfunction isValidFeed(value) {\n\t    return value === \"rss\" || value === \"feed\" || value === \"rdf:RDF\";\n\t}\n\n\n\n\tvar DomUtils = /*#__PURE__*/Object.freeze({\n\t\t__proto__: null,\n\t\tisTag: isTag$1,\n\t\tisCDATA: isCDATA,\n\t\tisText: isText,\n\t\tisComment: isComment,\n\t\tisDocument: isDocument,\n\t\thasChildren: hasChildren,\n\t\tgetOuterHTML: getOuterHTML,\n\t\tgetInnerHTML: getInnerHTML,\n\t\tgetText: getText,\n\t\ttextContent: textContent,\n\t\tinnerText: innerText,\n\t\tgetChildren: getChildren,\n\t\tgetParent: getParent,\n\t\tgetSiblings: getSiblings,\n\t\tgetAttributeValue: getAttributeValue,\n\t\thasAttrib: hasAttrib,\n\t\tgetName: getName,\n\t\tnextElementSibling: nextElementSibling,\n\t\tprevElementSibling: prevElementSibling,\n\t\tremoveElement: removeElement,\n\t\treplaceElement: replaceElement,\n\t\tappendChild: appendChild,\n\t\tappend: append,\n\t\tprependChild: prependChild,\n\t\tprepend: prepend,\n\t\tfilter: filter$4,\n\t\tfind: find$5,\n\t\tfindOneChild: findOneChild,\n\t\tfindOne: findOne,\n\t\texistsOne: existsOne,\n\t\tfindAll: findAll,\n\t\ttestElement: testElement,\n\t\tgetElements: getElements,\n\t\tgetElementById: getElementById,\n\t\tgetElementsByTagName: getElementsByTagName,\n\t\tgetElementsByTagType: getElementsByTagType,\n\t\tremoveSubsets: removeSubsets,\n\t\tget DocumentPosition () { return DocumentPosition; },\n\t\tcompareDocumentPosition: compareDocumentPosition,\n\t\tuniqueSort: uniqueSort,\n\t\tgetFeed: getFeed\n\t});\n\n\t/**\n\t * Helper function to render a DOM.\n\t *\n\t * @param that - Cheerio instance to render.\n\t * @param dom - The DOM to render. Defaults to `that`'s root.\n\t * @param options - Options for rendering.\n\t * @returns The rendered document.\n\t */\n\tfunction render$1(that, dom, options) {\n\t    if (!that)\n\t        return '';\n\t    return that(dom !== null && dom !== void 0 ? dom : that._root.children, null, undefined, options).toString();\n\t}\n\t/**\n\t * Checks if a passed object is an options object.\n\t *\n\t * @param dom - Object to check if it is an options object.\n\t * @returns Whether the object is an options object.\n\t */\n\tfunction isOptions(dom, options) {\n\t    return (!options &&\n\t        typeof dom === 'object' &&\n\t        dom != null &&\n\t        !('length' in dom) &&\n\t        !('type' in dom));\n\t}\n\tfunction html$1(dom, options) {\n\t    /*\n\t     * Be flexible about parameters, sometimes we call html(),\n\t     * with options as only parameter\n\t     * check dom argument for dom element specific properties\n\t     * assume there is no 'length' or 'type' properties in the options object\n\t     */\n\t    const toRender = isOptions(dom) ? ((options = dom), undefined) : dom;\n\t    /*\n\t     * Sometimes `$.html()` is used without preloading html,\n\t     * so fallback non-existing options to the default ones.\n\t     */\n\t    const opts = {\n\t        ...defaultOpts,\n\t        ...this === null || this === void 0 ? void 0 : this._options,\n\t        ...flatten(options !== null && options !== void 0 ? options : {}),\n\t    };\n\t    return render$1(this, toRender, opts);\n\t}\n\t/**\n\t * Render the document as XML.\n\t *\n\t * @param dom - Element to render.\n\t * @returns THe rendered document.\n\t */\n\tfunction xml$1(dom) {\n\t    const options = { ...this._options, xmlMode: true };\n\t    return render$1(this, dom, options);\n\t}\n\t/**\n\t * Render the document as text.\n\t *\n\t * This returns the `textContent` of the passed elements. The result will\n\t * include the contents of `script` and `stype` elements. To avoid this, use\n\t * `.prop('innerText')` instead.\n\t *\n\t * @param elements - Elements to render.\n\t * @returns The rendered document.\n\t */\n\tfunction text(elements) {\n\t    const elems = elements ? elements : this ? this.root() : [];\n\t    let ret = '';\n\t    for (let i = 0; i < elems.length; i++) {\n\t        ret += textContent(elems[i]);\n\t    }\n\t    return ret;\n\t}\n\tfunction parseHTML(data, context, keepScripts = typeof context === 'boolean' ? context : false) {\n\t    if (!data || typeof data !== 'string') {\n\t        return null;\n\t    }\n\t    if (typeof context === 'boolean') {\n\t        keepScripts = context;\n\t    }\n\t    const parsed = this.load(data, defaultOpts, false);\n\t    if (!keepScripts) {\n\t        parsed('script').remove();\n\t    }\n\t    /*\n\t     * The `children` array is used by Cheerio internally to group elements that\n\t     * share the same parents. When nodes created through `parseHTML` are\n\t     * inserted into previously-existing DOM structures, they will be removed\n\t     * from the `children` array. The results of `parseHTML` should remain\n\t     * constant across these operations, so a shallow copy should be returned.\n\t     */\n\t    return parsed.root()[0].children.slice();\n\t}\n\t/**\n\t * Sometimes you need to work with the top-level root element. To query it, you\n\t * can use `$.root()`.\n\t *\n\t * @example\n\t *\n\t * ```js\n\t * $.root().append('<ul id=\"vegetables\"></ul>').html();\n\t * //=> <ul id=\"fruits\">...</ul><ul id=\"vegetables\"></ul>\n\t * ```\n\t *\n\t * @returns Cheerio instance wrapping the root node.\n\t * @alias Cheerio.root\n\t */\n\tfunction root$2() {\n\t    return this(this._root);\n\t}\n\t/**\n\t * Checks to see if the `contained` DOM element is a descendant of the\n\t * `container` DOM element.\n\t *\n\t * @param container - Potential parent node.\n\t * @param contained - Potential child node.\n\t * @returns Indicates if the nodes contain one another.\n\t * @alias Cheerio.contains\n\t * @see {@link https://api.jquery.com/jQuery.contains/}\n\t */\n\tfunction contains(container, contained) {\n\t    // According to the jQuery API, an element does not \"contain\" itself\n\t    if (contained === container) {\n\t        return false;\n\t    }\n\t    /*\n\t     * Step up the descendants, stopping when the root element is reached\n\t     * (signaled by `.parent` returning a reference to the same object)\n\t     */\n\t    let next = contained;\n\t    while (next && next !== next.parent) {\n\t        next = next.parent;\n\t        if (next === container) {\n\t            return true;\n\t        }\n\t    }\n\t    return false;\n\t}\n\t/**\n\t * $.merge().\n\t *\n\t * @param arr1 - First array.\n\t * @param arr2 - Second array.\n\t * @returns `arr1`, with elements of `arr2` inserted.\n\t * @alias Cheerio.merge\n\t * @see {@link https://api.jquery.com/jQuery.merge/}\n\t */\n\tfunction merge$2(arr1, arr2) {\n\t    if (!isArrayLike$1(arr1) || !isArrayLike$1(arr2)) {\n\t        return;\n\t    }\n\t    let newLength = arr1.length;\n\t    const len = +arr2.length;\n\t    for (let i = 0; i < len; i++) {\n\t        arr1[newLength++] = arr2[i];\n\t    }\n\t    arr1.length = newLength;\n\t    return arr1;\n\t}\n\t/**\n\t * Checks if an object is array-like.\n\t *\n\t * @param item - Item to check.\n\t * @returns Indicates if the item is array-like.\n\t */\n\tfunction isArrayLike$1(item) {\n\t    if (Array.isArray(item)) {\n\t        return true;\n\t    }\n\t    if (typeof item !== 'object' ||\n\t        !Object.prototype.hasOwnProperty.call(item, 'length') ||\n\t        typeof item.length !== 'number' ||\n\t        item.length < 0) {\n\t        return false;\n\t    }\n\t    for (let i = 0; i < item.length; i++) {\n\t        if (!(i in item)) {\n\t            return false;\n\t        }\n\t    }\n\t    return true;\n\t}\n\n\tvar staticMethods = /*#__PURE__*/Object.freeze({\n\t\t__proto__: null,\n\t\thtml: html$1,\n\t\txml: xml$1,\n\t\ttext: text,\n\t\tparseHTML: parseHTML,\n\t\troot: root$2,\n\t\tcontains: contains,\n\t\tmerge: merge$2\n\t});\n\n\t/**\n\t * Checks if an object is a Cheerio instance.\n\t *\n\t * @category Utils\n\t * @param maybeCheerio - The object to check.\n\t * @returns Whether the object is a Cheerio instance.\n\t */\n\tfunction isCheerio(maybeCheerio) {\n\t    return maybeCheerio.cheerio != null;\n\t}\n\t/**\n\t * Convert a string to camel case notation.\n\t *\n\t * @private\n\t * @category Utils\n\t * @param str - The string to be converted.\n\t * @returns String in camel case notation.\n\t */\n\tfunction camelCase(str) {\n\t    return str.replace(/[_.-](\\w|$)/g, (_, x) => x.toUpperCase());\n\t}\n\t/**\n\t * Convert a string from camel case to \"CSS case\", where word boundaries are\n\t * described by hyphens (\"-\") and all characters are lower-case.\n\t *\n\t * @private\n\t * @category Utils\n\t * @param str - The string to be converted.\n\t * @returns String in \"CSS case\".\n\t */\n\tfunction cssCase(str) {\n\t    return str.replace(/[A-Z]/g, '-$&').toLowerCase();\n\t}\n\t/**\n\t * Iterate over each DOM element without creating intermediary Cheerio instances.\n\t *\n\t * This is indented for use internally to avoid otherwise unnecessary memory\n\t * pressure introduced by _make.\n\t *\n\t * @category Utils\n\t * @param array - The array to iterate over.\n\t * @param fn - Function to call.\n\t * @returns The original instance.\n\t */\n\tfunction domEach(array, fn) {\n\t    const len = array.length;\n\t    for (let i = 0; i < len; i++)\n\t        fn(array[i], i);\n\t    return array;\n\t}\n\t/**\n\t * Create a deep copy of the given DOM structure. Sets the parents of the copies\n\t * of the passed nodes to `null`.\n\t *\n\t * @private\n\t * @category Utils\n\t * @param dom - The domhandler-compliant DOM structure.\n\t * @returns - The cloned DOM.\n\t */\n\tfunction cloneDom(dom) {\n\t    const clone = 'length' in dom\n\t        ? Array.prototype.map.call(dom, (el) => cloneNode(el, true))\n\t        : [cloneNode(dom, true)];\n\t    // Add a root node around the cloned nodes\n\t    const root = new Document(clone);\n\t    clone.forEach((node) => {\n\t        node.parent = root;\n\t    });\n\t    return clone;\n\t}\n\tvar CharacterCodes;\n\t(function (CharacterCodes) {\n\t    CharacterCodes[CharacterCodes[\"LowerA\"] = 97] = \"LowerA\";\n\t    CharacterCodes[CharacterCodes[\"LowerZ\"] = 122] = \"LowerZ\";\n\t    CharacterCodes[CharacterCodes[\"UpperA\"] = 65] = \"UpperA\";\n\t    CharacterCodes[CharacterCodes[\"UpperZ\"] = 90] = \"UpperZ\";\n\t    CharacterCodes[CharacterCodes[\"Exclamation\"] = 33] = \"Exclamation\";\n\t})(CharacterCodes || (CharacterCodes = {}));\n\t/**\n\t * Check if string is HTML.\n\t *\n\t * Tests for a `<` within a string, immediate followed by a letter and\n\t * eventually followed by a `>`.\n\t *\n\t * @private\n\t * @category Utils\n\t * @param str - The string to check.\n\t * @returns Indicates if `str` is HTML.\n\t */\n\tfunction isHtml(str) {\n\t    const tagStart = str.indexOf('<');\n\t    if (tagStart < 0 || tagStart > str.length - 3)\n\t        return false;\n\t    const tagChar = str.charCodeAt(tagStart + 1);\n\t    return (((tagChar >= CharacterCodes.LowerA && tagChar <= CharacterCodes.LowerZ) ||\n\t        (tagChar >= CharacterCodes.UpperA && tagChar <= CharacterCodes.UpperZ) ||\n\t        tagChar === CharacterCodes.Exclamation) &&\n\t        str.includes('>', tagStart + 2));\n\t}\n\n\t/**\n\t * Methods for getting and modifying attributes.\n\t *\n\t * @module cheerio/attributes\n\t */\n\tconst hasOwn = Object.prototype.hasOwnProperty;\n\tconst rspace = /\\s+/;\n\tconst dataAttrPrefix = 'data-';\n\t/*\n\t * Lookup table for coercing string data-* attributes to their corresponding\n\t * JavaScript primitives\n\t */\n\tconst primitives = {\n\t    null: null,\n\t    true: true,\n\t    false: false,\n\t};\n\t// Attributes that are booleans\n\tconst rboolean = /^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i;\n\t// Matches strings that look like JSON objects or arrays\n\tconst rbrace = /^{[^]*}$|^\\[[^]*]$/;\n\tfunction getAttr(elem, name, xmlMode) {\n\t    var _a;\n\t    if (!elem || !isTag$1(elem))\n\t        return undefined;\n\t    (_a = elem.attribs) !== null && _a !== void 0 ? _a : (elem.attribs = {});\n\t    // Return the entire attribs object if no attribute specified\n\t    if (!name) {\n\t        return elem.attribs;\n\t    }\n\t    if (hasOwn.call(elem.attribs, name)) {\n\t        // Get the (decoded) attribute\n\t        return !xmlMode && rboolean.test(name) ? name : elem.attribs[name];\n\t    }\n\t    // Mimic the DOM and return text content as value for `option's`\n\t    if (elem.name === 'option' && name === 'value') {\n\t        return text(elem.children);\n\t    }\n\t    // Mimic DOM with default value for radios/checkboxes\n\t    if (elem.name === 'input' &&\n\t        (elem.attribs['type'] === 'radio' || elem.attribs['type'] === 'checkbox') &&\n\t        name === 'value') {\n\t        return 'on';\n\t    }\n\t    return undefined;\n\t}\n\t/**\n\t * Sets the value of an attribute. The attribute will be deleted if the value is `null`.\n\t *\n\t * @private\n\t * @param el - The element to set the attribute on.\n\t * @param name - The attribute's name.\n\t * @param value - The attribute's value.\n\t */\n\tfunction setAttr(el, name, value) {\n\t    if (value === null) {\n\t        removeAttribute(el, name);\n\t    }\n\t    else {\n\t        el.attribs[name] = `${value}`;\n\t    }\n\t}\n\tfunction attr(name, value) {\n\t    // Set the value (with attr map support)\n\t    if (typeof name === 'object' || value !== undefined) {\n\t        if (typeof value === 'function') {\n\t            if (typeof name !== 'string') {\n\t                {\n\t                    throw new Error('Bad combination of arguments.');\n\t                }\n\t            }\n\t            return domEach(this, (el, i) => {\n\t                if (isTag$1(el))\n\t                    setAttr(el, name, value.call(el, i, el.attribs[name]));\n\t            });\n\t        }\n\t        return domEach(this, (el) => {\n\t            if (!isTag$1(el))\n\t                return;\n\t            if (typeof name === 'object') {\n\t                Object.keys(name).forEach((objName) => {\n\t                    const objValue = name[objName];\n\t                    setAttr(el, objName, objValue);\n\t                });\n\t            }\n\t            else {\n\t                setAttr(el, name, value);\n\t            }\n\t        });\n\t    }\n\t    return arguments.length > 1\n\t        ? this\n\t        : getAttr(this[0], name, this.options.xmlMode);\n\t}\n\t/**\n\t * Gets a node's prop.\n\t *\n\t * @private\n\t * @category Attributes\n\t * @param el - Element to get the prop of.\n\t * @param name - Name of the prop.\n\t * @returns The prop's value.\n\t */\n\tfunction getProp(el, name, xmlMode) {\n\t    if (!el || !isTag$1(el))\n\t        return;\n\t    return name in el\n\t        ? // @ts-expect-error TS doesn't like us accessing the value directly here.\n\t            el[name]\n\t        : !xmlMode && rboolean.test(name)\n\t            ? getAttr(el, name, false) !== undefined\n\t            : getAttr(el, name, xmlMode);\n\t}\n\t/**\n\t * Sets the value of a prop.\n\t *\n\t * @private\n\t * @param el - The element to set the prop on.\n\t * @param name - The prop's name.\n\t * @param value - The prop's value.\n\t */\n\tfunction setProp(el, name, value, xmlMode) {\n\t    if (name in el) {\n\t        // @ts-expect-error Overriding value\n\t        el[name] = value;\n\t    }\n\t    else {\n\t        setAttr(el, name, !xmlMode && rboolean.test(name) ? (value ? '' : null) : `${value}`);\n\t    }\n\t}\n\tfunction prop(name, value) {\n\t    var _a;\n\t    if (typeof name === 'string' && value === undefined) {\n\t        switch (name) {\n\t            case 'style': {\n\t                const property = this.css();\n\t                const keys = Object.keys(property);\n\t                keys.forEach((p, i) => {\n\t                    property[i] = p;\n\t                });\n\t                property.length = keys.length;\n\t                return property;\n\t            }\n\t            case 'tagName':\n\t            case 'nodeName': {\n\t                const el = this[0];\n\t                return isTag$1(el) ? el.name.toUpperCase() : undefined;\n\t            }\n\t            case 'href':\n\t            case 'src': {\n\t                const el = this[0];\n\t                if (!isTag$1(el)) {\n\t                    return undefined;\n\t                }\n\t                const prop = (_a = el.attribs) === null || _a === void 0 ? void 0 : _a[name];\n\t                /* eslint-disable node/no-unsupported-features/node-builtins */\n\t                if (typeof URL !== 'undefined' &&\n\t                    ((name === 'href' && (el.tagName === 'a' || el.name === 'link')) ||\n\t                        (name === 'src' &&\n\t                            (el.tagName === 'img' ||\n\t                                el.tagName === 'iframe' ||\n\t                                el.tagName === 'audio' ||\n\t                                el.tagName === 'video' ||\n\t                                el.tagName === 'source'))) &&\n\t                    prop !== undefined &&\n\t                    this.options.baseURI) {\n\t                    return new URL(prop, this.options.baseURI).href;\n\t                }\n\t                /* eslint-enable node/no-unsupported-features/node-builtins */\n\t                return prop;\n\t            }\n\t            case 'innerText':\n\t                return innerText(this[0]);\n\t            case 'textContent':\n\t                return textContent(this[0]);\n\t            case 'outerHTML':\n\t                return this.clone().wrap('<container />').parent().html();\n\t            case 'innerHTML':\n\t                return this.html();\n\t            default:\n\t                return getProp(this[0], name, this.options.xmlMode);\n\t        }\n\t    }\n\t    if (typeof name === 'object' || value !== undefined) {\n\t        if (typeof value === 'function') {\n\t            if (typeof name === 'object') {\n\t                throw new Error('Bad combination of arguments.');\n\t            }\n\t            return domEach(this, (el, i) => {\n\t                if (isTag$1(el)) {\n\t                    setProp(el, name, value.call(el, i, getProp(el, name, this.options.xmlMode)), this.options.xmlMode);\n\t                }\n\t            });\n\t        }\n\t        return domEach(this, (el) => {\n\t            if (!isTag$1(el))\n\t                return;\n\t            if (typeof name === 'object') {\n\t                Object.keys(name).forEach((key) => {\n\t                    const val = name[key];\n\t                    setProp(el, key, val, this.options.xmlMode);\n\t                });\n\t            }\n\t            else {\n\t                setProp(el, name, value, this.options.xmlMode);\n\t            }\n\t        });\n\t    }\n\t    return undefined;\n\t}\n\t/**\n\t * Sets the value of a data attribute.\n\t *\n\t * @private\n\t * @param el - The element to set the data attribute on.\n\t * @param name - The data attribute's name.\n\t * @param value - The data attribute's value.\n\t */\n\tfunction setData(el, name, value) {\n\t    var _a;\n\t    const elem = el;\n\t    (_a = elem.data) !== null && _a !== void 0 ? _a : (elem.data = {});\n\t    if (typeof name === 'object')\n\t        Object.assign(elem.data, name);\n\t    else if (typeof name === 'string' && value !== undefined) {\n\t        elem.data[name] = value;\n\t    }\n\t}\n\t/**\n\t * Read the specified attribute from the equivalent HTML5 `data-*` attribute,\n\t * and (if present) cache the value in the node's internal data store. If no\n\t * attribute name is specified, read _all_ HTML5 `data-*` attributes in this manner.\n\t *\n\t * @private\n\t * @category Attributes\n\t * @param el - Element to get the data attribute of.\n\t * @param name - Name of the data attribute.\n\t * @returns The data attribute's value, or a map with all of the data attributes.\n\t */\n\tfunction readData(el, name) {\n\t    let domNames;\n\t    let jsNames;\n\t    let value;\n\t    if (name == null) {\n\t        domNames = Object.keys(el.attribs).filter((attrName) => attrName.startsWith(dataAttrPrefix));\n\t        jsNames = domNames.map((domName) => camelCase(domName.slice(dataAttrPrefix.length)));\n\t    }\n\t    else {\n\t        domNames = [dataAttrPrefix + cssCase(name)];\n\t        jsNames = [name];\n\t    }\n\t    for (let idx = 0; idx < domNames.length; ++idx) {\n\t        const domName = domNames[idx];\n\t        const jsName = jsNames[idx];\n\t        if (hasOwn.call(el.attribs, domName) &&\n\t            !hasOwn.call(el.data, jsName)) {\n\t            value = el.attribs[domName];\n\t            if (hasOwn.call(primitives, value)) {\n\t                value = primitives[value];\n\t            }\n\t            else if (value === String(Number(value))) {\n\t                value = Number(value);\n\t            }\n\t            else if (rbrace.test(value)) {\n\t                try {\n\t                    value = JSON.parse(value);\n\t                }\n\t                catch (e) {\n\t                    /* Ignore */\n\t                }\n\t            }\n\t            el.data[jsName] = value;\n\t        }\n\t    }\n\t    return name == null ? el.data : value;\n\t}\n\tfunction data$2(name, value) {\n\t    var _a;\n\t    const elem = this[0];\n\t    if (!elem || !isTag$1(elem))\n\t        return;\n\t    const dataEl = elem;\n\t    (_a = dataEl.data) !== null && _a !== void 0 ? _a : (dataEl.data = {});\n\t    // Return the entire data object if no data specified\n\t    if (!name) {\n\t        return readData(dataEl);\n\t    }\n\t    // Set the value (with attr map support)\n\t    if (typeof name === 'object' || value !== undefined) {\n\t        domEach(this, (el) => {\n\t            if (isTag$1(el)) {\n\t                if (typeof name === 'object')\n\t                    setData(el, name);\n\t                else\n\t                    setData(el, name, value);\n\t            }\n\t        });\n\t        return this;\n\t    }\n\t    if (hasOwn.call(dataEl.data, name)) {\n\t        return dataEl.data[name];\n\t    }\n\t    return readData(dataEl, name);\n\t}\n\tfunction val(value) {\n\t    const querying = arguments.length === 0;\n\t    const element = this[0];\n\t    if (!element || !isTag$1(element))\n\t        return querying ? undefined : this;\n\t    switch (element.name) {\n\t        case 'textarea':\n\t            return this.text(value);\n\t        case 'select': {\n\t            const option = this.find('option:selected');\n\t            if (!querying) {\n\t                if (this.attr('multiple') == null && typeof value === 'object') {\n\t                    return this;\n\t                }\n\t                this.find('option').removeAttr('selected');\n\t                const values = typeof value !== 'object' ? [value] : value;\n\t                for (let i = 0; i < values.length; i++) {\n\t                    this.find(`option[value=\"${values[i]}\"]`).attr('selected', '');\n\t                }\n\t                return this;\n\t            }\n\t            return this.attr('multiple')\n\t                ? option.toArray().map((el) => text(el.children))\n\t                : option.attr('value');\n\t        }\n\t        case 'input':\n\t        case 'option':\n\t            return querying\n\t                ? this.attr('value')\n\t                : this.attr('value', value);\n\t    }\n\t    return undefined;\n\t}\n\t/**\n\t * Remove an attribute.\n\t *\n\t * @private\n\t * @param elem - Node to remove attribute from.\n\t * @param name - Name of the attribute to remove.\n\t */\n\tfunction removeAttribute(elem, name) {\n\t    if (!elem.attribs || !hasOwn.call(elem.attribs, name))\n\t        return;\n\t    delete elem.attribs[name];\n\t}\n\t/**\n\t * Splits a space-separated list of names to individual names.\n\t *\n\t * @category Attributes\n\t * @param names - Names to split.\n\t * @returns - Split names.\n\t */\n\tfunction splitNames(names) {\n\t    return names ? names.trim().split(rspace) : [];\n\t}\n\t/**\n\t * Method for removing attributes by `name`.\n\t *\n\t * @category Attributes\n\t * @example\n\t *\n\t * ```js\n\t * $('.pear').removeAttr('class').html();\n\t * //=> <li>Pear</li>\n\t *\n\t * $('.apple').attr('id', 'favorite');\n\t * $('.apple').removeAttr('id class').html();\n\t * //=> <li>Apple</li>\n\t * ```\n\t *\n\t * @param name - Name of the attribute.\n\t * @returns The instance itself.\n\t * @see {@link https://api.jquery.com/removeAttr/}\n\t */\n\tfunction removeAttr(name) {\n\t    const attrNames = splitNames(name);\n\t    for (let i = 0; i < attrNames.length; i++) {\n\t        domEach(this, (elem) => {\n\t            if (isTag$1(elem))\n\t                removeAttribute(elem, attrNames[i]);\n\t        });\n\t    }\n\t    return this;\n\t}\n\t/**\n\t * Check to see if _any_ of the matched elements have the given `className`.\n\t *\n\t * @category Attributes\n\t * @example\n\t *\n\t * ```js\n\t * $('.pear').hasClass('pear');\n\t * //=> true\n\t *\n\t * $('apple').hasClass('fruit');\n\t * //=> false\n\t *\n\t * $('li').hasClass('pear');\n\t * //=> true\n\t * ```\n\t *\n\t * @param className - Name of the class.\n\t * @returns Indicates if an element has the given `className`.\n\t * @see {@link https://api.jquery.com/hasClass/}\n\t */\n\tfunction hasClass(className) {\n\t    return this.toArray().some((elem) => {\n\t        const clazz = isTag$1(elem) && elem.attribs['class'];\n\t        let idx = -1;\n\t        if (clazz && className.length) {\n\t            while ((idx = clazz.indexOf(className, idx + 1)) > -1) {\n\t                const end = idx + className.length;\n\t                if ((idx === 0 || rspace.test(clazz[idx - 1])) &&\n\t                    (end === clazz.length || rspace.test(clazz[end]))) {\n\t                    return true;\n\t                }\n\t            }\n\t        }\n\t        return false;\n\t    });\n\t}\n\t/**\n\t * Adds class(es) to all of the matched elements. Also accepts a `function`.\n\t *\n\t * @category Attributes\n\t * @example\n\t *\n\t * ```js\n\t * $('.pear').addClass('fruit').html();\n\t * //=> <li class=\"pear fruit\">Pear</li>\n\t *\n\t * $('.apple').addClass('fruit red').html();\n\t * //=> <li class=\"apple fruit red\">Apple</li>\n\t * ```\n\t *\n\t * @param value - Name of new class.\n\t * @returns The instance itself.\n\t * @see {@link https://api.jquery.com/addClass/}\n\t */\n\tfunction addClass(value) {\n\t    // Support functions\n\t    if (typeof value === 'function') {\n\t        return domEach(this, (el, i) => {\n\t            if (isTag$1(el)) {\n\t                const className = el.attribs['class'] || '';\n\t                addClass.call([el], value.call(el, i, className));\n\t            }\n\t        });\n\t    }\n\t    // Return if no value or not a string or function\n\t    if (!value || typeof value !== 'string')\n\t        return this;\n\t    const classNames = value.split(rspace);\n\t    const numElements = this.length;\n\t    for (let i = 0; i < numElements; i++) {\n\t        const el = this[i];\n\t        // If selected element isn't a tag, move on\n\t        if (!isTag$1(el))\n\t            continue;\n\t        // If we don't already have classes — always set xmlMode to false here, as it doesn't matter for classes\n\t        const className = getAttr(el, 'class', false);\n\t        if (!className) {\n\t            setAttr(el, 'class', classNames.join(' ').trim());\n\t        }\n\t        else {\n\t            let setClass = ` ${className} `;\n\t            // Check if class already exists\n\t            for (let j = 0; j < classNames.length; j++) {\n\t                const appendClass = `${classNames[j]} `;\n\t                if (!setClass.includes(` ${appendClass}`))\n\t                    setClass += appendClass;\n\t            }\n\t            setAttr(el, 'class', setClass.trim());\n\t        }\n\t    }\n\t    return this;\n\t}\n\t/**\n\t * Removes one or more space-separated classes from the selected elements. If no\n\t * `className` is defined, all classes will be removed. Also accepts a `function`.\n\t *\n\t * @category Attributes\n\t * @example\n\t *\n\t * ```js\n\t * $('.pear').removeClass('pear').html();\n\t * //=> <li class=\"\">Pear</li>\n\t *\n\t * $('.apple').addClass('red').removeClass().html();\n\t * //=> <li class=\"\">Apple</li>\n\t * ```\n\t *\n\t * @param name - Name of the class. If not specified, removes all elements.\n\t * @returns The instance itself.\n\t * @see {@link https://api.jquery.com/removeClass/}\n\t */\n\tfunction removeClass(name) {\n\t    // Handle if value is a function\n\t    if (typeof name === 'function') {\n\t        return domEach(this, (el, i) => {\n\t            if (isTag$1(el)) {\n\t                removeClass.call([el], name.call(el, i, el.attribs['class'] || ''));\n\t            }\n\t        });\n\t    }\n\t    const classes = splitNames(name);\n\t    const numClasses = classes.length;\n\t    const removeAll = arguments.length === 0;\n\t    return domEach(this, (el) => {\n\t        if (!isTag$1(el))\n\t            return;\n\t        if (removeAll) {\n\t            // Short circuit the remove all case as this is the nice one\n\t            el.attribs['class'] = '';\n\t        }\n\t        else {\n\t            const elClasses = splitNames(el.attribs['class']);\n\t            let changed = false;\n\t            for (let j = 0; j < numClasses; j++) {\n\t                const index = elClasses.indexOf(classes[j]);\n\t                if (index >= 0) {\n\t                    elClasses.splice(index, 1);\n\t                    changed = true;\n\t                    /*\n\t                     * We have to do another pass to ensure that there are not duplicate\n\t                     * classes listed\n\t                     */\n\t                    j--;\n\t                }\n\t            }\n\t            if (changed) {\n\t                el.attribs['class'] = elClasses.join(' ');\n\t            }\n\t        }\n\t    });\n\t}\n\t/**\n\t * Add or remove class(es) from the matched elements, depending on either the\n\t * class's presence or the value of the switch argument. Also accepts a `function`.\n\t *\n\t * @category Attributes\n\t * @example\n\t *\n\t * ```js\n\t * $('.apple.green').toggleClass('fruit green red').html();\n\t * //=> <li class=\"apple fruit red\">Apple</li>\n\t *\n\t * $('.apple.green').toggleClass('fruit green red', true).html();\n\t * //=> <li class=\"apple green fruit red\">Apple</li>\n\t * ```\n\t *\n\t * @param value - Name of the class. Can also be a function.\n\t * @param stateVal - If specified the state of the class.\n\t * @returns The instance itself.\n\t * @see {@link https://api.jquery.com/toggleClass/}\n\t */\n\tfunction toggleClass(value, stateVal) {\n\t    // Support functions\n\t    if (typeof value === 'function') {\n\t        return domEach(this, (el, i) => {\n\t            if (isTag$1(el)) {\n\t                toggleClass.call([el], value.call(el, i, el.attribs['class'] || '', stateVal), stateVal);\n\t            }\n\t        });\n\t    }\n\t    // Return if no value or not a string or function\n\t    if (!value || typeof value !== 'string')\n\t        return this;\n\t    const classNames = value.split(rspace);\n\t    const numClasses = classNames.length;\n\t    const state = typeof stateVal === 'boolean' ? (stateVal ? 1 : -1) : 0;\n\t    const numElements = this.length;\n\t    for (let i = 0; i < numElements; i++) {\n\t        const el = this[i];\n\t        // If selected element isn't a tag, move on\n\t        if (!isTag$1(el))\n\t            continue;\n\t        const elementClasses = splitNames(el.attribs['class']);\n\t        // Check if class already exists\n\t        for (let j = 0; j < numClasses; j++) {\n\t            // Check if the class name is currently defined\n\t            const index = elementClasses.indexOf(classNames[j]);\n\t            // Add if stateValue === true or we are toggling and there is no value\n\t            if (state >= 0 && index < 0) {\n\t                elementClasses.push(classNames[j]);\n\t            }\n\t            else if (state <= 0 && index >= 0) {\n\t                // Otherwise remove but only if the item exists\n\t                elementClasses.splice(index, 1);\n\t            }\n\t        }\n\t        el.attribs['class'] = elementClasses.join(' ');\n\t    }\n\t    return this;\n\t}\n\n\tvar Attributes = /*#__PURE__*/Object.freeze({\n\t\t__proto__: null,\n\t\tattr: attr,\n\t\tprop: prop,\n\t\tdata: data$2,\n\t\tval: val,\n\t\tremoveAttr: removeAttr,\n\t\thasClass: hasClass,\n\t\taddClass: addClass,\n\t\tremoveClass: removeClass,\n\t\ttoggleClass: toggleClass\n\t});\n\n\tvar SelectorType;\n\t(function (SelectorType) {\n\t    SelectorType[\"Attribute\"] = \"attribute\";\n\t    SelectorType[\"Pseudo\"] = \"pseudo\";\n\t    SelectorType[\"PseudoElement\"] = \"pseudo-element\";\n\t    SelectorType[\"Tag\"] = \"tag\";\n\t    SelectorType[\"Universal\"] = \"universal\";\n\t    // Traversals\n\t    SelectorType[\"Adjacent\"] = \"adjacent\";\n\t    SelectorType[\"Child\"] = \"child\";\n\t    SelectorType[\"Descendant\"] = \"descendant\";\n\t    SelectorType[\"Parent\"] = \"parent\";\n\t    SelectorType[\"Sibling\"] = \"sibling\";\n\t    SelectorType[\"ColumnCombinator\"] = \"column-combinator\";\n\t})(SelectorType || (SelectorType = {}));\n\tvar AttributeAction;\n\t(function (AttributeAction) {\n\t    AttributeAction[\"Any\"] = \"any\";\n\t    AttributeAction[\"Element\"] = \"element\";\n\t    AttributeAction[\"End\"] = \"end\";\n\t    AttributeAction[\"Equals\"] = \"equals\";\n\t    AttributeAction[\"Exists\"] = \"exists\";\n\t    AttributeAction[\"Hyphen\"] = \"hyphen\";\n\t    AttributeAction[\"Not\"] = \"not\";\n\t    AttributeAction[\"Start\"] = \"start\";\n\t})(AttributeAction || (AttributeAction = {}));\n\n\tconst reName = /^[^\\\\#]?(?:\\\\(?:[\\da-f]{1,6}\\s?|.)|[\\w\\-\\u00b0-\\uFFFF])+/;\n\tconst reEscape = /\\\\([\\da-f]{1,6}\\s?|(\\s)|.)/gi;\n\tconst actionTypes = new Map([\n\t    [126 /* Tilde */, AttributeAction.Element],\n\t    [94 /* Circumflex */, AttributeAction.Start],\n\t    [36 /* Dollar */, AttributeAction.End],\n\t    [42 /* Asterisk */, AttributeAction.Any],\n\t    [33 /* ExclamationMark */, AttributeAction.Not],\n\t    [124 /* Pipe */, AttributeAction.Hyphen],\n\t]);\n\t// Pseudos, whose data property is parsed as well.\n\tconst unpackPseudos = new Set([\n\t    \"has\",\n\t    \"not\",\n\t    \"matches\",\n\t    \"is\",\n\t    \"where\",\n\t    \"host\",\n\t    \"host-context\",\n\t]);\n\t/**\n\t * Checks whether a specific selector is a traversal.\n\t * This is useful eg. in swapping the order of elements that\n\t * are not traversals.\n\t *\n\t * @param selector Selector to check.\n\t */\n\tfunction isTraversal(selector) {\n\t    switch (selector.type) {\n\t        case SelectorType.Adjacent:\n\t        case SelectorType.Child:\n\t        case SelectorType.Descendant:\n\t        case SelectorType.Parent:\n\t        case SelectorType.Sibling:\n\t        case SelectorType.ColumnCombinator:\n\t            return true;\n\t        default:\n\t            return false;\n\t    }\n\t}\n\tconst stripQuotesFromPseudos = new Set([\"contains\", \"icontains\"]);\n\t// Unescape function taken from https://github.com/jquery/sizzle/blob/master/src/sizzle.js#L152\n\tfunction funescape(_, escaped, escapedWhitespace) {\n\t    const high = parseInt(escaped, 16) - 0x10000;\n\t    // NaN means non-codepoint\n\t    return high !== high || escapedWhitespace\n\t        ? escaped\n\t        : high < 0\n\t            ? // BMP codepoint\n\t                String.fromCharCode(high + 0x10000)\n\t            : // Supplemental Plane codepoint (surrogate pair)\n\t                String.fromCharCode((high >> 10) | 0xd800, (high & 0x3ff) | 0xdc00);\n\t}\n\tfunction unescapeCSS(str) {\n\t    return str.replace(reEscape, funescape);\n\t}\n\tfunction isQuote(c) {\n\t    return c === 39 /* SingleQuote */ || c === 34 /* DoubleQuote */;\n\t}\n\tfunction isWhitespace(c) {\n\t    return (c === 32 /* Space */ ||\n\t        c === 9 /* Tab */ ||\n\t        c === 10 /* NewLine */ ||\n\t        c === 12 /* FormFeed */ ||\n\t        c === 13 /* CarriageReturn */);\n\t}\n\t/**\n\t * Parses `selector`, optionally with the passed `options`.\n\t *\n\t * @param selector Selector to parse.\n\t * @param options Options for parsing.\n\t * @returns Returns a two-dimensional array.\n\t * The first dimension represents selectors separated by commas (eg. `sub1, sub2`),\n\t * the second contains the relevant tokens for that selector.\n\t */\n\tfunction parse(selector) {\n\t    const subselects = [];\n\t    const endIndex = parseSelector(subselects, `${selector}`, 0);\n\t    if (endIndex < selector.length) {\n\t        throw new Error(`Unmatched selector: ${selector.slice(endIndex)}`);\n\t    }\n\t    return subselects;\n\t}\n\tfunction parseSelector(subselects, selector, selectorIndex) {\n\t    let tokens = [];\n\t    function getName(offset) {\n\t        const match = selector.slice(selectorIndex + offset).match(reName);\n\t        if (!match) {\n\t            throw new Error(`Expected name, found ${selector.slice(selectorIndex)}`);\n\t        }\n\t        const [name] = match;\n\t        selectorIndex += offset + name.length;\n\t        return unescapeCSS(name);\n\t    }\n\t    function stripWhitespace(offset) {\n\t        selectorIndex += offset;\n\t        while (selectorIndex < selector.length &&\n\t            isWhitespace(selector.charCodeAt(selectorIndex))) {\n\t            selectorIndex++;\n\t        }\n\t    }\n\t    function readValueWithParenthesis() {\n\t        selectorIndex += 1;\n\t        const start = selectorIndex;\n\t        let counter = 1;\n\t        for (; counter > 0 && selectorIndex < selector.length; selectorIndex++) {\n\t            if (selector.charCodeAt(selectorIndex) ===\n\t                40 /* LeftParenthesis */ &&\n\t                !isEscaped(selectorIndex)) {\n\t                counter++;\n\t            }\n\t            else if (selector.charCodeAt(selectorIndex) ===\n\t                41 /* RightParenthesis */ &&\n\t                !isEscaped(selectorIndex)) {\n\t                counter--;\n\t            }\n\t        }\n\t        if (counter) {\n\t            throw new Error(\"Parenthesis not matched\");\n\t        }\n\t        return unescapeCSS(selector.slice(start, selectorIndex - 1));\n\t    }\n\t    function isEscaped(pos) {\n\t        let slashCount = 0;\n\t        while (selector.charCodeAt(--pos) === 92 /* BackSlash */)\n\t            slashCount++;\n\t        return (slashCount & 1) === 1;\n\t    }\n\t    function ensureNotTraversal() {\n\t        if (tokens.length > 0 && isTraversal(tokens[tokens.length - 1])) {\n\t            throw new Error(\"Did not expect successive traversals.\");\n\t        }\n\t    }\n\t    function addTraversal(type) {\n\t        if (tokens.length > 0 &&\n\t            tokens[tokens.length - 1].type === SelectorType.Descendant) {\n\t            tokens[tokens.length - 1].type = type;\n\t            return;\n\t        }\n\t        ensureNotTraversal();\n\t        tokens.push({ type });\n\t    }\n\t    function addSpecialAttribute(name, action) {\n\t        tokens.push({\n\t            type: SelectorType.Attribute,\n\t            name,\n\t            action,\n\t            value: getName(1),\n\t            namespace: null,\n\t            ignoreCase: \"quirks\",\n\t        });\n\t    }\n\t    /**\n\t     * We have finished parsing the current part of the selector.\n\t     *\n\t     * Remove descendant tokens at the end if they exist,\n\t     * and return the last index, so that parsing can be\n\t     * picked up from here.\n\t     */\n\t    function finalizeSubselector() {\n\t        if (tokens.length &&\n\t            tokens[tokens.length - 1].type === SelectorType.Descendant) {\n\t            tokens.pop();\n\t        }\n\t        if (tokens.length === 0) {\n\t            throw new Error(\"Empty sub-selector\");\n\t        }\n\t        subselects.push(tokens);\n\t    }\n\t    stripWhitespace(0);\n\t    if (selector.length === selectorIndex) {\n\t        return selectorIndex;\n\t    }\n\t    loop: while (selectorIndex < selector.length) {\n\t        const firstChar = selector.charCodeAt(selectorIndex);\n\t        switch (firstChar) {\n\t            // Whitespace\n\t            case 32 /* Space */:\n\t            case 9 /* Tab */:\n\t            case 10 /* NewLine */:\n\t            case 12 /* FormFeed */:\n\t            case 13 /* CarriageReturn */: {\n\t                if (tokens.length === 0 ||\n\t                    tokens[0].type !== SelectorType.Descendant) {\n\t                    ensureNotTraversal();\n\t                    tokens.push({ type: SelectorType.Descendant });\n\t                }\n\t                stripWhitespace(1);\n\t                break;\n\t            }\n\t            // Traversals\n\t            case 62 /* GreaterThan */: {\n\t                addTraversal(SelectorType.Child);\n\t                stripWhitespace(1);\n\t                break;\n\t            }\n\t            case 60 /* LessThan */: {\n\t                addTraversal(SelectorType.Parent);\n\t                stripWhitespace(1);\n\t                break;\n\t            }\n\t            case 126 /* Tilde */: {\n\t                addTraversal(SelectorType.Sibling);\n\t                stripWhitespace(1);\n\t                break;\n\t            }\n\t            case 43 /* Plus */: {\n\t                addTraversal(SelectorType.Adjacent);\n\t                stripWhitespace(1);\n\t                break;\n\t            }\n\t            // Special attribute selectors: .class, #id\n\t            case 46 /* Period */: {\n\t                addSpecialAttribute(\"class\", AttributeAction.Element);\n\t                break;\n\t            }\n\t            case 35 /* Hash */: {\n\t                addSpecialAttribute(\"id\", AttributeAction.Equals);\n\t                break;\n\t            }\n\t            case 91 /* LeftSquareBracket */: {\n\t                stripWhitespace(1);\n\t                // Determine attribute name and namespace\n\t                let name;\n\t                let namespace = null;\n\t                if (selector.charCodeAt(selectorIndex) === 124 /* Pipe */) {\n\t                    // Equivalent to no namespace\n\t                    name = getName(1);\n\t                }\n\t                else if (selector.startsWith(\"*|\", selectorIndex)) {\n\t                    namespace = \"*\";\n\t                    name = getName(2);\n\t                }\n\t                else {\n\t                    name = getName(0);\n\t                    if (selector.charCodeAt(selectorIndex) === 124 /* Pipe */ &&\n\t                        selector.charCodeAt(selectorIndex + 1) !==\n\t                            61 /* Equal */) {\n\t                        namespace = name;\n\t                        name = getName(1);\n\t                    }\n\t                }\n\t                stripWhitespace(0);\n\t                // Determine comparison operation\n\t                let action = AttributeAction.Exists;\n\t                const possibleAction = actionTypes.get(selector.charCodeAt(selectorIndex));\n\t                if (possibleAction) {\n\t                    action = possibleAction;\n\t                    if (selector.charCodeAt(selectorIndex + 1) !==\n\t                        61 /* Equal */) {\n\t                        throw new Error(\"Expected `=`\");\n\t                    }\n\t                    stripWhitespace(2);\n\t                }\n\t                else if (selector.charCodeAt(selectorIndex) === 61 /* Equal */) {\n\t                    action = AttributeAction.Equals;\n\t                    stripWhitespace(1);\n\t                }\n\t                // Determine value\n\t                let value = \"\";\n\t                let ignoreCase = null;\n\t                if (action !== \"exists\") {\n\t                    if (isQuote(selector.charCodeAt(selectorIndex))) {\n\t                        const quote = selector.charCodeAt(selectorIndex);\n\t                        let sectionEnd = selectorIndex + 1;\n\t                        while (sectionEnd < selector.length &&\n\t                            (selector.charCodeAt(sectionEnd) !== quote ||\n\t                                isEscaped(sectionEnd))) {\n\t                            sectionEnd += 1;\n\t                        }\n\t                        if (selector.charCodeAt(sectionEnd) !== quote) {\n\t                            throw new Error(\"Attribute value didn't end\");\n\t                        }\n\t                        value = unescapeCSS(selector.slice(selectorIndex + 1, sectionEnd));\n\t                        selectorIndex = sectionEnd + 1;\n\t                    }\n\t                    else {\n\t                        const valueStart = selectorIndex;\n\t                        while (selectorIndex < selector.length &&\n\t                            ((!isWhitespace(selector.charCodeAt(selectorIndex)) &&\n\t                                selector.charCodeAt(selectorIndex) !==\n\t                                    93 /* RightSquareBracket */) ||\n\t                                isEscaped(selectorIndex))) {\n\t                            selectorIndex += 1;\n\t                        }\n\t                        value = unescapeCSS(selector.slice(valueStart, selectorIndex));\n\t                    }\n\t                    stripWhitespace(0);\n\t                    // See if we have a force ignore flag\n\t                    const forceIgnore = selector.charCodeAt(selectorIndex) | 0x20;\n\t                    // If the forceIgnore flag is set (either `i` or `s`), use that value\n\t                    if (forceIgnore === 115 /* LowerS */) {\n\t                        ignoreCase = false;\n\t                        stripWhitespace(1);\n\t                    }\n\t                    else if (forceIgnore === 105 /* LowerI */) {\n\t                        ignoreCase = true;\n\t                        stripWhitespace(1);\n\t                    }\n\t                }\n\t                if (selector.charCodeAt(selectorIndex) !==\n\t                    93 /* RightSquareBracket */) {\n\t                    throw new Error(\"Attribute selector didn't terminate\");\n\t                }\n\t                selectorIndex += 1;\n\t                const attributeSelector = {\n\t                    type: SelectorType.Attribute,\n\t                    name,\n\t                    action,\n\t                    value,\n\t                    namespace,\n\t                    ignoreCase,\n\t                };\n\t                tokens.push(attributeSelector);\n\t                break;\n\t            }\n\t            case 58 /* Colon */: {\n\t                if (selector.charCodeAt(selectorIndex + 1) === 58 /* Colon */) {\n\t                    tokens.push({\n\t                        type: SelectorType.PseudoElement,\n\t                        name: getName(2).toLowerCase(),\n\t                        data: selector.charCodeAt(selectorIndex) ===\n\t                            40 /* LeftParenthesis */\n\t                            ? readValueWithParenthesis()\n\t                            : null,\n\t                    });\n\t                    continue;\n\t                }\n\t                const name = getName(1).toLowerCase();\n\t                let data = null;\n\t                if (selector.charCodeAt(selectorIndex) ===\n\t                    40 /* LeftParenthesis */) {\n\t                    if (unpackPseudos.has(name)) {\n\t                        if (isQuote(selector.charCodeAt(selectorIndex + 1))) {\n\t                            throw new Error(`Pseudo-selector ${name} cannot be quoted`);\n\t                        }\n\t                        data = [];\n\t                        selectorIndex = parseSelector(data, selector, selectorIndex + 1);\n\t                        if (selector.charCodeAt(selectorIndex) !==\n\t                            41 /* RightParenthesis */) {\n\t                            throw new Error(`Missing closing parenthesis in :${name} (${selector})`);\n\t                        }\n\t                        selectorIndex += 1;\n\t                    }\n\t                    else {\n\t                        data = readValueWithParenthesis();\n\t                        if (stripQuotesFromPseudos.has(name)) {\n\t                            const quot = data.charCodeAt(0);\n\t                            if (quot === data.charCodeAt(data.length - 1) &&\n\t                                isQuote(quot)) {\n\t                                data = data.slice(1, -1);\n\t                            }\n\t                        }\n\t                        data = unescapeCSS(data);\n\t                    }\n\t                }\n\t                tokens.push({ type: SelectorType.Pseudo, name, data });\n\t                break;\n\t            }\n\t            case 44 /* Comma */: {\n\t                finalizeSubselector();\n\t                tokens = [];\n\t                stripWhitespace(1);\n\t                break;\n\t            }\n\t            default: {\n\t                if (selector.startsWith(\"/*\", selectorIndex)) {\n\t                    const endIndex = selector.indexOf(\"*/\", selectorIndex + 2);\n\t                    if (endIndex < 0) {\n\t                        throw new Error(\"Comment was not terminated\");\n\t                    }\n\t                    selectorIndex = endIndex + 2;\n\t                    // Remove leading whitespace\n\t                    if (tokens.length === 0) {\n\t                        stripWhitespace(0);\n\t                    }\n\t                    break;\n\t                }\n\t                let namespace = null;\n\t                let name;\n\t                if (firstChar === 42 /* Asterisk */) {\n\t                    selectorIndex += 1;\n\t                    name = \"*\";\n\t                }\n\t                else if (firstChar === 124 /* Pipe */) {\n\t                    name = \"\";\n\t                    if (selector.charCodeAt(selectorIndex + 1) === 124 /* Pipe */) {\n\t                        addTraversal(SelectorType.ColumnCombinator);\n\t                        stripWhitespace(2);\n\t                        break;\n\t                    }\n\t                }\n\t                else if (reName.test(selector.slice(selectorIndex))) {\n\t                    name = getName(0);\n\t                }\n\t                else {\n\t                    break loop;\n\t                }\n\t                if (selector.charCodeAt(selectorIndex) === 124 /* Pipe */ &&\n\t                    selector.charCodeAt(selectorIndex + 1) !== 124 /* Pipe */) {\n\t                    namespace = name;\n\t                    if (selector.charCodeAt(selectorIndex + 1) ===\n\t                        42 /* Asterisk */) {\n\t                        name = \"*\";\n\t                        selectorIndex += 2;\n\t                    }\n\t                    else {\n\t                        name = getName(1);\n\t                    }\n\t                }\n\t                tokens.push(name === \"*\"\n\t                    ? { type: SelectorType.Universal, namespace }\n\t                    : { type: SelectorType.Tag, name, namespace });\n\t            }\n\t        }\n\t    }\n\t    finalizeSubselector();\n\t    return selectorIndex;\n\t}\n\n\tvar boolbase = {\n\t\ttrueFunc: function trueFunc(){\n\t\t\treturn true;\n\t\t},\n\t\tfalseFunc: function falseFunc(){\n\t\t\treturn false;\n\t\t}\n\t};\n\tvar boolbase_1 = boolbase.trueFunc;\n\tvar boolbase_2 = boolbase.falseFunc;\n\n\tconst procedure = new Map([\n\t    [SelectorType.Universal, 50],\n\t    [SelectorType.Tag, 30],\n\t    [SelectorType.Attribute, 1],\n\t    [SelectorType.Pseudo, 0],\n\t]);\n\tfunction isTraversal$1(token) {\n\t    return !procedure.has(token.type);\n\t}\n\tconst attributes = new Map([\n\t    [AttributeAction.Exists, 10],\n\t    [AttributeAction.Equals, 8],\n\t    [AttributeAction.Not, 7],\n\t    [AttributeAction.Start, 6],\n\t    [AttributeAction.End, 6],\n\t    [AttributeAction.Any, 5],\n\t]);\n\t/**\n\t * Sort the parts of the passed selector,\n\t * as there is potential for optimization\n\t * (some types of selectors are faster than others)\n\t *\n\t * @param arr Selector to sort\n\t */\n\tfunction sortByProcedure(arr) {\n\t    const procs = arr.map(getProcedure);\n\t    for (let i = 1; i < arr.length; i++) {\n\t        const procNew = procs[i];\n\t        if (procNew < 0)\n\t            continue;\n\t        for (let j = i - 1; j >= 0 && procNew < procs[j]; j--) {\n\t            const token = arr[j + 1];\n\t            arr[j + 1] = arr[j];\n\t            arr[j] = token;\n\t            procs[j + 1] = procs[j];\n\t            procs[j] = procNew;\n\t        }\n\t    }\n\t}\n\tfunction getProcedure(token) {\n\t    var _a, _b;\n\t    let proc = (_a = procedure.get(token.type)) !== null && _a !== void 0 ? _a : -1;\n\t    if (token.type === SelectorType.Attribute) {\n\t        proc = (_b = attributes.get(token.action)) !== null && _b !== void 0 ? _b : 4;\n\t        if (token.action === AttributeAction.Equals && token.name === \"id\") {\n\t            // Prefer ID selectors (eg. #ID)\n\t            proc = 9;\n\t        }\n\t        if (token.ignoreCase) {\n\t            /*\n\t             * IgnoreCase adds some overhead, prefer \"normal\" token\n\t             * this is a binary operation, to ensure it's still an int\n\t             */\n\t            proc >>= 1;\n\t        }\n\t    }\n\t    else if (token.type === SelectorType.Pseudo) {\n\t        if (!token.data) {\n\t            proc = 3;\n\t        }\n\t        else if (token.name === \"has\" || token.name === \"contains\") {\n\t            proc = 0; // Expensive in any case\n\t        }\n\t        else if (Array.isArray(token.data)) {\n\t            // Eg. :matches, :not\n\t            proc = Math.min(...token.data.map((d) => Math.min(...d.map(getProcedure))));\n\t            // If we have traversals, try to avoid executing this selector\n\t            if (proc < 0) {\n\t                proc = 0;\n\t            }\n\t        }\n\t        else {\n\t            proc = 2;\n\t        }\n\t    }\n\t    return proc;\n\t}\n\n\t/**\n\t * All reserved characters in a regex, used for escaping.\n\t *\n\t * Taken from XRegExp, (c) 2007-2020 Steven Levithan under the MIT license\n\t * https://github.com/slevithan/xregexp/blob/95eeebeb8fac8754d54eafe2b4743661ac1cf028/src/xregexp.js#L794\n\t */\n\tconst reChars = /[-[\\]{}()*+?.,\\\\^$|#\\s]/g;\n\tfunction escapeRegex(value) {\n\t    return value.replace(reChars, \"\\\\$&\");\n\t}\n\t/**\n\t * Attributes that are case-insensitive in HTML.\n\t *\n\t * @private\n\t * @see https://html.spec.whatwg.org/multipage/semantics-other.html#case-sensitivity-of-selectors\n\t */\n\tconst caseInsensitiveAttributes = new Set([\n\t    \"accept\",\n\t    \"accept-charset\",\n\t    \"align\",\n\t    \"alink\",\n\t    \"axis\",\n\t    \"bgcolor\",\n\t    \"charset\",\n\t    \"checked\",\n\t    \"clear\",\n\t    \"codetype\",\n\t    \"color\",\n\t    \"compact\",\n\t    \"declare\",\n\t    \"defer\",\n\t    \"dir\",\n\t    \"direction\",\n\t    \"disabled\",\n\t    \"enctype\",\n\t    \"face\",\n\t    \"frame\",\n\t    \"hreflang\",\n\t    \"http-equiv\",\n\t    \"lang\",\n\t    \"language\",\n\t    \"link\",\n\t    \"media\",\n\t    \"method\",\n\t    \"multiple\",\n\t    \"nohref\",\n\t    \"noresize\",\n\t    \"noshade\",\n\t    \"nowrap\",\n\t    \"readonly\",\n\t    \"rel\",\n\t    \"rev\",\n\t    \"rules\",\n\t    \"scope\",\n\t    \"scrolling\",\n\t    \"selected\",\n\t    \"shape\",\n\t    \"target\",\n\t    \"text\",\n\t    \"type\",\n\t    \"valign\",\n\t    \"valuetype\",\n\t    \"vlink\",\n\t]);\n\tfunction shouldIgnoreCase(selector, options) {\n\t    return typeof selector.ignoreCase === \"boolean\"\n\t        ? selector.ignoreCase\n\t        : selector.ignoreCase === \"quirks\"\n\t            ? !!options.quirksMode\n\t            : !options.xmlMode && caseInsensitiveAttributes.has(selector.name);\n\t}\n\t/**\n\t * Attribute selectors\n\t */\n\tconst attributeRules = {\n\t    equals(next, data, options) {\n\t        const { adapter } = options;\n\t        const { name } = data;\n\t        let { value } = data;\n\t        if (shouldIgnoreCase(data, options)) {\n\t            value = value.toLowerCase();\n\t            return (elem) => {\n\t                const attr = adapter.getAttributeValue(elem, name);\n\t                return (attr != null &&\n\t                    attr.length === value.length &&\n\t                    attr.toLowerCase() === value &&\n\t                    next(elem));\n\t            };\n\t        }\n\t        return (elem) => adapter.getAttributeValue(elem, name) === value && next(elem);\n\t    },\n\t    hyphen(next, data, options) {\n\t        const { adapter } = options;\n\t        const { name } = data;\n\t        let { value } = data;\n\t        const len = value.length;\n\t        if (shouldIgnoreCase(data, options)) {\n\t            value = value.toLowerCase();\n\t            return function hyphenIC(elem) {\n\t                const attr = adapter.getAttributeValue(elem, name);\n\t                return (attr != null &&\n\t                    (attr.length === len || attr.charAt(len) === \"-\") &&\n\t                    attr.substr(0, len).toLowerCase() === value &&\n\t                    next(elem));\n\t            };\n\t        }\n\t        return function hyphen(elem) {\n\t            const attr = adapter.getAttributeValue(elem, name);\n\t            return (attr != null &&\n\t                (attr.length === len || attr.charAt(len) === \"-\") &&\n\t                attr.substr(0, len) === value &&\n\t                next(elem));\n\t        };\n\t    },\n\t    element(next, data, options) {\n\t        const { adapter } = options;\n\t        const { name, value } = data;\n\t        if (/\\s/.test(value)) {\n\t            return boolbase.falseFunc;\n\t        }\n\t        const regex = new RegExp(`(?:^|\\\\s)${escapeRegex(value)}(?:$|\\\\s)`, shouldIgnoreCase(data, options) ? \"i\" : \"\");\n\t        return function element(elem) {\n\t            const attr = adapter.getAttributeValue(elem, name);\n\t            return (attr != null &&\n\t                attr.length >= value.length &&\n\t                regex.test(attr) &&\n\t                next(elem));\n\t        };\n\t    },\n\t    exists(next, { name }, { adapter }) {\n\t        return (elem) => adapter.hasAttrib(elem, name) && next(elem);\n\t    },\n\t    start(next, data, options) {\n\t        const { adapter } = options;\n\t        const { name } = data;\n\t        let { value } = data;\n\t        const len = value.length;\n\t        if (len === 0) {\n\t            return boolbase.falseFunc;\n\t        }\n\t        if (shouldIgnoreCase(data, options)) {\n\t            value = value.toLowerCase();\n\t            return (elem) => {\n\t                const attr = adapter.getAttributeValue(elem, name);\n\t                return (attr != null &&\n\t                    attr.length >= len &&\n\t                    attr.substr(0, len).toLowerCase() === value &&\n\t                    next(elem));\n\t            };\n\t        }\n\t        return (elem) => {\n\t            var _a;\n\t            return !!((_a = adapter.getAttributeValue(elem, name)) === null || _a === void 0 ? void 0 : _a.startsWith(value)) &&\n\t                next(elem);\n\t        };\n\t    },\n\t    end(next, data, options) {\n\t        const { adapter } = options;\n\t        const { name } = data;\n\t        let { value } = data;\n\t        const len = -value.length;\n\t        if (len === 0) {\n\t            return boolbase.falseFunc;\n\t        }\n\t        if (shouldIgnoreCase(data, options)) {\n\t            value = value.toLowerCase();\n\t            return (elem) => {\n\t                var _a;\n\t                return ((_a = adapter\n\t                    .getAttributeValue(elem, name)) === null || _a === void 0 ? void 0 : _a.substr(len).toLowerCase()) === value && next(elem);\n\t            };\n\t        }\n\t        return (elem) => {\n\t            var _a;\n\t            return !!((_a = adapter.getAttributeValue(elem, name)) === null || _a === void 0 ? void 0 : _a.endsWith(value)) &&\n\t                next(elem);\n\t        };\n\t    },\n\t    any(next, data, options) {\n\t        const { adapter } = options;\n\t        const { name, value } = data;\n\t        if (value === \"\") {\n\t            return boolbase.falseFunc;\n\t        }\n\t        if (shouldIgnoreCase(data, options)) {\n\t            const regex = new RegExp(escapeRegex(value), \"i\");\n\t            return function anyIC(elem) {\n\t                const attr = adapter.getAttributeValue(elem, name);\n\t                return (attr != null &&\n\t                    attr.length >= value.length &&\n\t                    regex.test(attr) &&\n\t                    next(elem));\n\t            };\n\t        }\n\t        return (elem) => {\n\t            var _a;\n\t            return !!((_a = adapter.getAttributeValue(elem, name)) === null || _a === void 0 ? void 0 : _a.includes(value)) &&\n\t                next(elem);\n\t        };\n\t    },\n\t    not(next, data, options) {\n\t        const { adapter } = options;\n\t        const { name } = data;\n\t        let { value } = data;\n\t        if (value === \"\") {\n\t            return (elem) => !!adapter.getAttributeValue(elem, name) && next(elem);\n\t        }\n\t        else if (shouldIgnoreCase(data, options)) {\n\t            value = value.toLowerCase();\n\t            return (elem) => {\n\t                const attr = adapter.getAttributeValue(elem, name);\n\t                return ((attr == null ||\n\t                    attr.length !== value.length ||\n\t                    attr.toLowerCase() !== value) &&\n\t                    next(elem));\n\t            };\n\t        }\n\t        return (elem) => adapter.getAttributeValue(elem, name) !== value && next(elem);\n\t    },\n\t};\n\n\t// Following http://www.w3.org/TR/css3-selectors/#nth-child-pseudo\n\t// Whitespace as per https://www.w3.org/TR/selectors-3/#lex is \" \\t\\r\\n\\f\"\n\tconst whitespace$1 = new Set([9, 10, 12, 13, 32]);\n\tconst ZERO = \"0\".charCodeAt(0);\n\tconst NINE = \"9\".charCodeAt(0);\n\t/**\n\t * Parses an expression.\n\t *\n\t * @throws An `Error` if parsing fails.\n\t * @returns An array containing the integer step size and the integer offset of the nth rule.\n\t * @example nthCheck.parse(\"2n+3\"); // returns [2, 3]\n\t */\n\tfunction parse$1(formula) {\n\t    formula = formula.trim().toLowerCase();\n\t    if (formula === \"even\") {\n\t        return [2, 0];\n\t    }\n\t    else if (formula === \"odd\") {\n\t        return [2, 1];\n\t    }\n\t    // Parse [ ['-'|'+']? INTEGER? {N} [ S* ['-'|'+'] S* INTEGER ]?\n\t    let idx = 0;\n\t    let a = 0;\n\t    let sign = readSign();\n\t    let number = readNumber();\n\t    if (idx < formula.length && formula.charAt(idx) === \"n\") {\n\t        idx++;\n\t        a = sign * (number !== null && number !== void 0 ? number : 1);\n\t        skipWhitespace();\n\t        if (idx < formula.length) {\n\t            sign = readSign();\n\t            skipWhitespace();\n\t            number = readNumber();\n\t        }\n\t        else {\n\t            sign = number = 0;\n\t        }\n\t    }\n\t    // Throw if there is anything else\n\t    if (number === null || idx < formula.length) {\n\t        throw new Error(`n-th rule couldn't be parsed ('${formula}')`);\n\t    }\n\t    return [a, sign * number];\n\t    function readSign() {\n\t        if (formula.charAt(idx) === \"-\") {\n\t            idx++;\n\t            return -1;\n\t        }\n\t        if (formula.charAt(idx) === \"+\") {\n\t            idx++;\n\t        }\n\t        return 1;\n\t    }\n\t    function readNumber() {\n\t        const start = idx;\n\t        let value = 0;\n\t        while (idx < formula.length &&\n\t            formula.charCodeAt(idx) >= ZERO &&\n\t            formula.charCodeAt(idx) <= NINE) {\n\t            value = value * 10 + (formula.charCodeAt(idx) - ZERO);\n\t            idx++;\n\t        }\n\t        // Return `null` if we didn't read anything.\n\t        return idx === start ? null : value;\n\t    }\n\t    function skipWhitespace() {\n\t        while (idx < formula.length &&\n\t            whitespace$1.has(formula.charCodeAt(idx))) {\n\t            idx++;\n\t        }\n\t    }\n\t}\n\n\t/**\n\t * Returns a function that checks if an elements index matches the given rule\n\t * highly optimized to return the fastest solution.\n\t *\n\t * @param parsed A tuple [a, b], as returned by `parse`.\n\t * @returns A highly optimized function that returns whether an index matches the nth-check.\n\t * @example\n\t *\n\t * ```js\n\t * const check = nthCheck.compile([2, 3]);\n\t *\n\t * check(0); // `false`\n\t * check(1); // `false`\n\t * check(2); // `true`\n\t * check(3); // `false`\n\t * check(4); // `true`\n\t * check(5); // `false`\n\t * check(6); // `true`\n\t * ```\n\t */\n\tfunction compile(parsed) {\n\t    const a = parsed[0];\n\t    // Subtract 1 from `b`, to convert from one- to zero-indexed.\n\t    const b = parsed[1] - 1;\n\t    /*\n\t     * When `b <= 0`, `a * n` won't be lead to any matches for `a < 0`.\n\t     * Besides, the specification states that no elements are\n\t     * matched when `a` and `b` are 0.\n\t     *\n\t     * `b < 0` here as we subtracted 1 from `b` above.\n\t     */\n\t    if (b < 0 && a <= 0)\n\t        return boolbase_2;\n\t    // When `a` is in the range -1..1, it matches any element (so only `b` is checked).\n\t    if (a === -1)\n\t        return (index) => index <= b;\n\t    if (a === 0)\n\t        return (index) => index === b;\n\t    // When `b <= 0` and `a === 1`, they match any element.\n\t    if (a === 1)\n\t        return b < 0 ? boolbase_1 : (index) => index >= b;\n\t    /*\n\t     * Otherwise, modulo can be used to check if there is a match.\n\t     *\n\t     * Modulo doesn't care about the sign, so let's use `a`s absolute value.\n\t     */\n\t    const absA = Math.abs(a);\n\t    // Get `b mod a`, + a if this is negative.\n\t    const bMod = ((b % absA) + absA) % absA;\n\t    return a > 1\n\t        ? (index) => index >= b && index % absA === bMod\n\t        : (index) => index <= b && index % absA === bMod;\n\t}\n\n\t/**\n\t * Parses and compiles a formula to a highly optimized function.\n\t * Combination of {@link parse} and {@link compile}.\n\t *\n\t * If the formula doesn't match any elements,\n\t * it returns [`boolbase`](https://github.com/fb55/boolbase)'s `falseFunc`.\n\t * Otherwise, a function accepting an _index_ is returned, which returns\n\t * whether or not the passed _index_ matches the formula.\n\t *\n\t * Note: The nth-rule starts counting at `1`, the returned function at `0`.\n\t *\n\t * @param formula The formula to compile.\n\t * @example\n\t * const check = nthCheck(\"2n+3\");\n\t *\n\t * check(0); // `false`\n\t * check(1); // `false`\n\t * check(2); // `true`\n\t * check(3); // `false`\n\t * check(4); // `true`\n\t * check(5); // `false`\n\t * check(6); // `true`\n\t */\n\tfunction nthCheck(formula) {\n\t    return compile(parse$1(formula));\n\t}\n\n\tfunction getChildFunc(next, adapter) {\n\t    return (elem) => {\n\t        const parent = adapter.getParent(elem);\n\t        return parent != null && adapter.isTag(parent) && next(elem);\n\t    };\n\t}\n\tconst filters = {\n\t    contains(next, text, { adapter }) {\n\t        return function contains(elem) {\n\t            return next(elem) && adapter.getText(elem).includes(text);\n\t        };\n\t    },\n\t    icontains(next, text, { adapter }) {\n\t        const itext = text.toLowerCase();\n\t        return function icontains(elem) {\n\t            return (next(elem) &&\n\t                adapter.getText(elem).toLowerCase().includes(itext));\n\t        };\n\t    },\n\t    // Location specific methods\n\t    \"nth-child\"(next, rule, { adapter, equals }) {\n\t        const func = nthCheck(rule);\n\t        if (func === boolbase.falseFunc)\n\t            return boolbase.falseFunc;\n\t        if (func === boolbase.trueFunc)\n\t            return getChildFunc(next, adapter);\n\t        return function nthChild(elem) {\n\t            const siblings = adapter.getSiblings(elem);\n\t            let pos = 0;\n\t            for (let i = 0; i < siblings.length; i++) {\n\t                if (equals(elem, siblings[i]))\n\t                    break;\n\t                if (adapter.isTag(siblings[i])) {\n\t                    pos++;\n\t                }\n\t            }\n\t            return func(pos) && next(elem);\n\t        };\n\t    },\n\t    \"nth-last-child\"(next, rule, { adapter, equals }) {\n\t        const func = nthCheck(rule);\n\t        if (func === boolbase.falseFunc)\n\t            return boolbase.falseFunc;\n\t        if (func === boolbase.trueFunc)\n\t            return getChildFunc(next, adapter);\n\t        return function nthLastChild(elem) {\n\t            const siblings = adapter.getSiblings(elem);\n\t            let pos = 0;\n\t            for (let i = siblings.length - 1; i >= 0; i--) {\n\t                if (equals(elem, siblings[i]))\n\t                    break;\n\t                if (adapter.isTag(siblings[i])) {\n\t                    pos++;\n\t                }\n\t            }\n\t            return func(pos) && next(elem);\n\t        };\n\t    },\n\t    \"nth-of-type\"(next, rule, { adapter, equals }) {\n\t        const func = nthCheck(rule);\n\t        if (func === boolbase.falseFunc)\n\t            return boolbase.falseFunc;\n\t        if (func === boolbase.trueFunc)\n\t            return getChildFunc(next, adapter);\n\t        return function nthOfType(elem) {\n\t            const siblings = adapter.getSiblings(elem);\n\t            let pos = 0;\n\t            for (let i = 0; i < siblings.length; i++) {\n\t                const currentSibling = siblings[i];\n\t                if (equals(elem, currentSibling))\n\t                    break;\n\t                if (adapter.isTag(currentSibling) &&\n\t                    adapter.getName(currentSibling) === adapter.getName(elem)) {\n\t                    pos++;\n\t                }\n\t            }\n\t            return func(pos) && next(elem);\n\t        };\n\t    },\n\t    \"nth-last-of-type\"(next, rule, { adapter, equals }) {\n\t        const func = nthCheck(rule);\n\t        if (func === boolbase.falseFunc)\n\t            return boolbase.falseFunc;\n\t        if (func === boolbase.trueFunc)\n\t            return getChildFunc(next, adapter);\n\t        return function nthLastOfType(elem) {\n\t            const siblings = adapter.getSiblings(elem);\n\t            let pos = 0;\n\t            for (let i = siblings.length - 1; i >= 0; i--) {\n\t                const currentSibling = siblings[i];\n\t                if (equals(elem, currentSibling))\n\t                    break;\n\t                if (adapter.isTag(currentSibling) &&\n\t                    adapter.getName(currentSibling) === adapter.getName(elem)) {\n\t                    pos++;\n\t                }\n\t            }\n\t            return func(pos) && next(elem);\n\t        };\n\t    },\n\t    // TODO determine the actual root element\n\t    root(next, _rule, { adapter }) {\n\t        return (elem) => {\n\t            const parent = adapter.getParent(elem);\n\t            return (parent == null || !adapter.isTag(parent)) && next(elem);\n\t        };\n\t    },\n\t    scope(next, rule, options, context) {\n\t        const { equals } = options;\n\t        if (!context || context.length === 0) {\n\t            // Equivalent to :root\n\t            return filters[\"root\"](next, rule, options);\n\t        }\n\t        if (context.length === 1) {\n\t            // NOTE: can't be unpacked, as :has uses this for side-effects\n\t            return (elem) => equals(context[0], elem) && next(elem);\n\t        }\n\t        return (elem) => context.includes(elem) && next(elem);\n\t    },\n\t    hover: dynamicStatePseudo(\"isHovered\"),\n\t    visited: dynamicStatePseudo(\"isVisited\"),\n\t    active: dynamicStatePseudo(\"isActive\"),\n\t};\n\t/**\n\t * Dynamic state pseudos. These depend on optional Adapter methods.\n\t *\n\t * @param name The name of the adapter method to call.\n\t * @returns Pseudo for the `filters` object.\n\t */\n\tfunction dynamicStatePseudo(name) {\n\t    return function dynamicPseudo(next, _rule, { adapter }) {\n\t        const func = adapter[name];\n\t        if (typeof func !== \"function\") {\n\t            return boolbase.falseFunc;\n\t        }\n\t        return function active(elem) {\n\t            return func(elem) && next(elem);\n\t        };\n\t    };\n\t}\n\n\t// While filters are precompiled, pseudos get called when they are needed\n\tconst pseudos = {\n\t    empty(elem, { adapter }) {\n\t        return !adapter.getChildren(elem).some((elem) => \n\t        // FIXME: `getText` call is potentially expensive.\n\t        adapter.isTag(elem) || adapter.getText(elem) !== \"\");\n\t    },\n\t    \"first-child\"(elem, { adapter, equals }) {\n\t        if (adapter.prevElementSibling) {\n\t            return adapter.prevElementSibling(elem) == null;\n\t        }\n\t        const firstChild = adapter\n\t            .getSiblings(elem)\n\t            .find((elem) => adapter.isTag(elem));\n\t        return firstChild != null && equals(elem, firstChild);\n\t    },\n\t    \"last-child\"(elem, { adapter, equals }) {\n\t        const siblings = adapter.getSiblings(elem);\n\t        for (let i = siblings.length - 1; i >= 0; i--) {\n\t            if (equals(elem, siblings[i]))\n\t                return true;\n\t            if (adapter.isTag(siblings[i]))\n\t                break;\n\t        }\n\t        return false;\n\t    },\n\t    \"first-of-type\"(elem, { adapter, equals }) {\n\t        const siblings = adapter.getSiblings(elem);\n\t        const elemName = adapter.getName(elem);\n\t        for (let i = 0; i < siblings.length; i++) {\n\t            const currentSibling = siblings[i];\n\t            if (equals(elem, currentSibling))\n\t                return true;\n\t            if (adapter.isTag(currentSibling) &&\n\t                adapter.getName(currentSibling) === elemName) {\n\t                break;\n\t            }\n\t        }\n\t        return false;\n\t    },\n\t    \"last-of-type\"(elem, { adapter, equals }) {\n\t        const siblings = adapter.getSiblings(elem);\n\t        const elemName = adapter.getName(elem);\n\t        for (let i = siblings.length - 1; i >= 0; i--) {\n\t            const currentSibling = siblings[i];\n\t            if (equals(elem, currentSibling))\n\t                return true;\n\t            if (adapter.isTag(currentSibling) &&\n\t                adapter.getName(currentSibling) === elemName) {\n\t                break;\n\t            }\n\t        }\n\t        return false;\n\t    },\n\t    \"only-of-type\"(elem, { adapter, equals }) {\n\t        const elemName = adapter.getName(elem);\n\t        return adapter\n\t            .getSiblings(elem)\n\t            .every((sibling) => equals(elem, sibling) ||\n\t            !adapter.isTag(sibling) ||\n\t            adapter.getName(sibling) !== elemName);\n\t    },\n\t    \"only-child\"(elem, { adapter, equals }) {\n\t        return adapter\n\t            .getSiblings(elem)\n\t            .every((sibling) => equals(elem, sibling) || !adapter.isTag(sibling));\n\t    },\n\t};\n\tfunction verifyPseudoArgs(func, name, subselect, argIndex) {\n\t    if (subselect === null) {\n\t        if (func.length > argIndex) {\n\t            throw new Error(`Pseudo-class :${name} requires an argument`);\n\t        }\n\t    }\n\t    else if (func.length === argIndex) {\n\t        throw new Error(`Pseudo-class :${name} doesn't have any arguments`);\n\t    }\n\t}\n\n\t/**\n\t * Aliases are pseudos that are expressed as selectors.\n\t */\n\tconst aliases = {\n\t    // Links\n\t    \"any-link\": \":is(a, area, link)[href]\",\n\t    link: \":any-link:not(:visited)\",\n\t    // Forms\n\t    // https://html.spec.whatwg.org/multipage/scripting.html#disabled-elements\n\t    disabled: `:is(\n        :is(button, input, select, textarea, optgroup, option)[disabled],\n        optgroup[disabled] > option,\n        fieldset[disabled]:not(fieldset[disabled] legend:first-of-type *)\n    )`,\n\t    enabled: \":not(:disabled)\",\n\t    checked: \":is(:is(input[type=radio], input[type=checkbox])[checked], option:selected)\",\n\t    required: \":is(input, select, textarea)[required]\",\n\t    optional: \":is(input, select, textarea):not([required])\",\n\t    // JQuery extensions\n\t    // https://html.spec.whatwg.org/multipage/form-elements.html#concept-option-selectedness\n\t    selected: \"option:is([selected], select:not([multiple]):not(:has(> option[selected])) > :first-of-type)\",\n\t    checkbox: \"[type=checkbox]\",\n\t    file: \"[type=file]\",\n\t    password: \"[type=password]\",\n\t    radio: \"[type=radio]\",\n\t    reset: \"[type=reset]\",\n\t    image: \"[type=image]\",\n\t    submit: \"[type=submit]\",\n\t    parent: \":not(:empty)\",\n\t    header: \":is(h1, h2, h3, h4, h5, h6)\",\n\t    button: \":is(button, input[type=button])\",\n\t    input: \":is(input, textarea, select, button)\",\n\t    text: \"input:is(:not([type!='']), [type=text])\",\n\t};\n\n\t/** Used as a placeholder for :has. Will be replaced with the actual element. */\n\tconst PLACEHOLDER_ELEMENT = {};\n\tfunction ensureIsTag(next, adapter) {\n\t    if (next === boolbase.falseFunc)\n\t        return boolbase.falseFunc;\n\t    return (elem) => adapter.isTag(elem) && next(elem);\n\t}\n\tfunction getNextSiblings(elem, adapter) {\n\t    const siblings = adapter.getSiblings(elem);\n\t    if (siblings.length <= 1)\n\t        return [];\n\t    const elemIndex = siblings.indexOf(elem);\n\t    if (elemIndex < 0 || elemIndex === siblings.length - 1)\n\t        return [];\n\t    return siblings.slice(elemIndex + 1).filter(adapter.isTag);\n\t}\n\tfunction copyOptions(options) {\n\t    // Not copied: context, rootFunc\n\t    return {\n\t        xmlMode: !!options.xmlMode,\n\t        lowerCaseAttributeNames: !!options.lowerCaseAttributeNames,\n\t        lowerCaseTags: !!options.lowerCaseTags,\n\t        quirksMode: !!options.quirksMode,\n\t        cacheResults: !!options.cacheResults,\n\t        pseudos: options.pseudos,\n\t        adapter: options.adapter,\n\t        equals: options.equals,\n\t    };\n\t}\n\tconst is = (next, token, options, context, compileToken) => {\n\t    const func = compileToken(token, copyOptions(options), context);\n\t    return func === boolbase.trueFunc\n\t        ? next\n\t        : func === boolbase.falseFunc\n\t            ? boolbase.falseFunc\n\t            : (elem) => func(elem) && next(elem);\n\t};\n\t/*\n\t * :not, :has, :is, :matches and :where have to compile selectors\n\t * doing this in src/pseudos.ts would lead to circular dependencies,\n\t * so we add them here\n\t */\n\tconst subselects = {\n\t    is,\n\t    /**\n\t     * `:matches` and `:where` are aliases for `:is`.\n\t     */\n\t    matches: is,\n\t    where: is,\n\t    not(next, token, options, context, compileToken) {\n\t        const func = compileToken(token, copyOptions(options), context);\n\t        return func === boolbase.falseFunc\n\t            ? next\n\t            : func === boolbase.trueFunc\n\t                ? boolbase.falseFunc\n\t                : (elem) => !func(elem) && next(elem);\n\t    },\n\t    has(next, subselect, options, _context, compileToken) {\n\t        const { adapter } = options;\n\t        const opts = copyOptions(options);\n\t        opts.relativeSelector = true;\n\t        const context = subselect.some((s) => s.some(isTraversal$1))\n\t            ? // Used as a placeholder. Will be replaced with the actual element.\n\t                [PLACEHOLDER_ELEMENT]\n\t            : undefined;\n\t        const compiled = compileToken(subselect, opts, context);\n\t        if (compiled === boolbase.falseFunc)\n\t            return boolbase.falseFunc;\n\t        const hasElement = ensureIsTag(compiled, adapter);\n\t        // If `compiled` is `trueFunc`, we can skip this.\n\t        if (context && compiled !== boolbase.trueFunc) {\n\t            /*\n\t             * `shouldTestNextSiblings` will only be true if the query starts with\n\t             * a traversal (sibling or adjacent). That means we will always have a context.\n\t             */\n\t            const { shouldTestNextSiblings = false } = compiled;\n\t            return (elem) => {\n\t                if (!next(elem))\n\t                    return false;\n\t                context[0] = elem;\n\t                const childs = adapter.getChildren(elem);\n\t                const nextElements = shouldTestNextSiblings\n\t                    ? [...childs, ...getNextSiblings(elem, adapter)]\n\t                    : childs;\n\t                return adapter.existsOne(hasElement, nextElements);\n\t            };\n\t        }\n\t        return (elem) => next(elem) &&\n\t            adapter.existsOne(hasElement, adapter.getChildren(elem));\n\t    },\n\t};\n\n\tfunction compilePseudoSelector(next, selector, options, context, compileToken) {\n\t    var _a;\n\t    const { name, data } = selector;\n\t    if (Array.isArray(data)) {\n\t        if (!(name in subselects)) {\n\t            throw new Error(`Unknown pseudo-class :${name}(${data})`);\n\t        }\n\t        return subselects[name](next, data, options, context, compileToken);\n\t    }\n\t    const userPseudo = (_a = options.pseudos) === null || _a === void 0 ? void 0 : _a[name];\n\t    const stringPseudo = typeof userPseudo === \"string\" ? userPseudo : aliases[name];\n\t    if (typeof stringPseudo === \"string\") {\n\t        if (data != null) {\n\t            throw new Error(`Pseudo ${name} doesn't have any arguments`);\n\t        }\n\t        // The alias has to be parsed here, to make sure options are respected.\n\t        const alias = parse(stringPseudo);\n\t        return subselects[\"is\"](next, alias, options, context, compileToken);\n\t    }\n\t    if (typeof userPseudo === \"function\") {\n\t        verifyPseudoArgs(userPseudo, name, data, 1);\n\t        return (elem) => userPseudo(elem, data) && next(elem);\n\t    }\n\t    if (name in filters) {\n\t        return filters[name](next, data, options, context);\n\t    }\n\t    if (name in pseudos) {\n\t        const pseudo = pseudos[name];\n\t        verifyPseudoArgs(pseudo, name, data, 2);\n\t        return (elem) => pseudo(elem, options, data) && next(elem);\n\t    }\n\t    throw new Error(`Unknown pseudo-class :${name}`);\n\t}\n\n\tfunction getElementParent(node, adapter) {\n\t    const parent = adapter.getParent(node);\n\t    if (parent && adapter.isTag(parent)) {\n\t        return parent;\n\t    }\n\t    return null;\n\t}\n\t/*\n\t * All available rules\n\t */\n\tfunction compileGeneralSelector(next, selector, options, context, compileToken) {\n\t    const { adapter, equals } = options;\n\t    switch (selector.type) {\n\t        case SelectorType.PseudoElement: {\n\t            throw new Error(\"Pseudo-elements are not supported by css-select\");\n\t        }\n\t        case SelectorType.ColumnCombinator: {\n\t            throw new Error(\"Column combinators are not yet supported by css-select\");\n\t        }\n\t        case SelectorType.Attribute: {\n\t            if (selector.namespace != null) {\n\t                throw new Error(\"Namespaced attributes are not yet supported by css-select\");\n\t            }\n\t            if (!options.xmlMode || options.lowerCaseAttributeNames) {\n\t                selector.name = selector.name.toLowerCase();\n\t            }\n\t            return attributeRules[selector.action](next, selector, options);\n\t        }\n\t        case SelectorType.Pseudo: {\n\t            return compilePseudoSelector(next, selector, options, context, compileToken);\n\t        }\n\t        // Tags\n\t        case SelectorType.Tag: {\n\t            if (selector.namespace != null) {\n\t                throw new Error(\"Namespaced tag names are not yet supported by css-select\");\n\t            }\n\t            let { name } = selector;\n\t            if (!options.xmlMode || options.lowerCaseTags) {\n\t                name = name.toLowerCase();\n\t            }\n\t            return function tag(elem) {\n\t                return adapter.getName(elem) === name && next(elem);\n\t            };\n\t        }\n\t        // Traversal\n\t        case SelectorType.Descendant: {\n\t            if (options.cacheResults === false ||\n\t                typeof WeakSet === \"undefined\") {\n\t                return function descendant(elem) {\n\t                    let current = elem;\n\t                    while ((current = getElementParent(current, adapter))) {\n\t                        if (next(current)) {\n\t                            return true;\n\t                        }\n\t                    }\n\t                    return false;\n\t                };\n\t            }\n\t            // @ts-expect-error `ElementNode` is not extending object\n\t            const isFalseCache = new WeakSet();\n\t            return function cachedDescendant(elem) {\n\t                let current = elem;\n\t                while ((current = getElementParent(current, adapter))) {\n\t                    if (!isFalseCache.has(current)) {\n\t                        if (adapter.isTag(current) && next(current)) {\n\t                            return true;\n\t                        }\n\t                        isFalseCache.add(current);\n\t                    }\n\t                }\n\t                return false;\n\t            };\n\t        }\n\t        case \"_flexibleDescendant\": {\n\t            // Include element itself, only used while querying an array\n\t            return function flexibleDescendant(elem) {\n\t                let current = elem;\n\t                do {\n\t                    if (next(current))\n\t                        return true;\n\t                } while ((current = getElementParent(current, adapter)));\n\t                return false;\n\t            };\n\t        }\n\t        case SelectorType.Parent: {\n\t            return function parent(elem) {\n\t                return adapter\n\t                    .getChildren(elem)\n\t                    .some((elem) => adapter.isTag(elem) && next(elem));\n\t            };\n\t        }\n\t        case SelectorType.Child: {\n\t            return function child(elem) {\n\t                const parent = adapter.getParent(elem);\n\t                return parent != null && adapter.isTag(parent) && next(parent);\n\t            };\n\t        }\n\t        case SelectorType.Sibling: {\n\t            return function sibling(elem) {\n\t                const siblings = adapter.getSiblings(elem);\n\t                for (let i = 0; i < siblings.length; i++) {\n\t                    const currentSibling = siblings[i];\n\t                    if (equals(elem, currentSibling))\n\t                        break;\n\t                    if (adapter.isTag(currentSibling) && next(currentSibling)) {\n\t                        return true;\n\t                    }\n\t                }\n\t                return false;\n\t            };\n\t        }\n\t        case SelectorType.Adjacent: {\n\t            if (adapter.prevElementSibling) {\n\t                return function adjacent(elem) {\n\t                    const previous = adapter.prevElementSibling(elem);\n\t                    return previous != null && next(previous);\n\t                };\n\t            }\n\t            return function adjacent(elem) {\n\t                const siblings = adapter.getSiblings(elem);\n\t                let lastElement;\n\t                for (let i = 0; i < siblings.length; i++) {\n\t                    const currentSibling = siblings[i];\n\t                    if (equals(elem, currentSibling))\n\t                        break;\n\t                    if (adapter.isTag(currentSibling)) {\n\t                        lastElement = currentSibling;\n\t                    }\n\t                }\n\t                return !!lastElement && next(lastElement);\n\t            };\n\t        }\n\t        case SelectorType.Universal: {\n\t            if (selector.namespace != null && selector.namespace !== \"*\") {\n\t                throw new Error(\"Namespaced universal selectors are not yet supported by css-select\");\n\t            }\n\t            return next;\n\t        }\n\t    }\n\t}\n\n\tfunction includesScopePseudo(t) {\n\t    return (t.type === SelectorType.Pseudo &&\n\t        (t.name === \"scope\" ||\n\t            (Array.isArray(t.data) &&\n\t                t.data.some((data) => data.some(includesScopePseudo)))));\n\t}\n\tconst DESCENDANT_TOKEN = { type: SelectorType.Descendant };\n\tconst FLEXIBLE_DESCENDANT_TOKEN = {\n\t    type: \"_flexibleDescendant\",\n\t};\n\tconst SCOPE_TOKEN = {\n\t    type: SelectorType.Pseudo,\n\t    name: \"scope\",\n\t    data: null,\n\t};\n\t/*\n\t * CSS 4 Spec (Draft): 3.4.1. Absolutizing a Relative Selector\n\t * http://www.w3.org/TR/selectors4/#absolutizing\n\t */\n\tfunction absolutize(token, { adapter }, context) {\n\t    // TODO Use better check if the context is a document\n\t    const hasContext = !!(context === null || context === void 0 ? void 0 : context.every((e) => {\n\t        const parent = adapter.isTag(e) && adapter.getParent(e);\n\t        return e === PLACEHOLDER_ELEMENT || (parent && adapter.isTag(parent));\n\t    }));\n\t    for (const t of token) {\n\t        if (t.length > 0 &&\n\t            isTraversal$1(t[0]) &&\n\t            t[0].type !== SelectorType.Descendant) ;\n\t        else if (hasContext && !t.some(includesScopePseudo)) {\n\t            t.unshift(DESCENDANT_TOKEN);\n\t        }\n\t        else {\n\t            continue;\n\t        }\n\t        t.unshift(SCOPE_TOKEN);\n\t    }\n\t}\n\tfunction compileToken(token, options, context) {\n\t    var _a;\n\t    token.forEach(sortByProcedure);\n\t    context = (_a = options.context) !== null && _a !== void 0 ? _a : context;\n\t    const isArrayContext = Array.isArray(context);\n\t    const finalContext = context && (Array.isArray(context) ? context : [context]);\n\t    // Check if the selector is relative\n\t    if (options.relativeSelector !== false) {\n\t        absolutize(token, options, finalContext);\n\t    }\n\t    else if (token.some((t) => t.length > 0 && isTraversal$1(t[0]))) {\n\t        throw new Error(\"Relative selectors are not allowed when the `relativeSelector` option is disabled\");\n\t    }\n\t    let shouldTestNextSiblings = false;\n\t    const query = token\n\t        .map((rules) => {\n\t        if (rules.length >= 2) {\n\t            const [first, second] = rules;\n\t            if (first.type !== SelectorType.Pseudo ||\n\t                first.name !== \"scope\") ;\n\t            else if (isArrayContext &&\n\t                second.type === SelectorType.Descendant) {\n\t                rules[1] = FLEXIBLE_DESCENDANT_TOKEN;\n\t            }\n\t            else if (second.type === SelectorType.Adjacent ||\n\t                second.type === SelectorType.Sibling) {\n\t                shouldTestNextSiblings = true;\n\t            }\n\t        }\n\t        return compileRules(rules, options, finalContext);\n\t    })\n\t        .reduce(reduceRules, boolbase.falseFunc);\n\t    query.shouldTestNextSiblings = shouldTestNextSiblings;\n\t    return query;\n\t}\n\tfunction compileRules(rules, options, context) {\n\t    var _a;\n\t    return rules.reduce((previous, rule) => previous === boolbase.falseFunc\n\t        ? boolbase.falseFunc\n\t        : compileGeneralSelector(previous, rule, options, context, compileToken), (_a = options.rootFunc) !== null && _a !== void 0 ? _a : boolbase.trueFunc);\n\t}\n\tfunction reduceRules(a, b) {\n\t    if (b === boolbase.falseFunc || a === boolbase.trueFunc) {\n\t        return a;\n\t    }\n\t    if (a === boolbase.falseFunc || b === boolbase.trueFunc) {\n\t        return b;\n\t    }\n\t    return function combine(elem) {\n\t        return a(elem) || b(elem);\n\t    };\n\t}\n\n\tconst defaultEquals = (a, b) => a === b;\n\tconst defaultOptions$1 = {\n\t    adapter: DomUtils,\n\t    equals: defaultEquals,\n\t};\n\tfunction convertOptionFormats(options) {\n\t    var _a, _b, _c, _d;\n\t    /*\n\t     * We force one format of options to the other one.\n\t     */\n\t    // @ts-expect-error Default options may have incompatible `Node` / `ElementNode`.\n\t    const opts = options !== null && options !== void 0 ? options : defaultOptions$1;\n\t    // @ts-expect-error Same as above.\n\t    (_a = opts.adapter) !== null && _a !== void 0 ? _a : (opts.adapter = DomUtils);\n\t    // @ts-expect-error `equals` does not exist on `Options`\n\t    (_b = opts.equals) !== null && _b !== void 0 ? _b : (opts.equals = (_d = (_c = opts.adapter) === null || _c === void 0 ? void 0 : _c.equals) !== null && _d !== void 0 ? _d : defaultEquals);\n\t    return opts;\n\t}\n\tfunction wrapCompile(func) {\n\t    return function addAdapter(selector, options, context) {\n\t        const opts = convertOptionFormats(options);\n\t        return func(selector, opts, context);\n\t    };\n\t}\n\tconst _compileToken = wrapCompile(compileToken);\n\tfunction prepareContext(elems, adapter, shouldTestNextSiblings = false) {\n\t    /*\n\t     * Add siblings if the query requires them.\n\t     * See https://github.com/fb55/css-select/pull/43#issuecomment-225414692\n\t     */\n\t    if (shouldTestNextSiblings) {\n\t        elems = appendNextSiblings(elems, adapter);\n\t    }\n\t    return Array.isArray(elems)\n\t        ? adapter.removeSubsets(elems)\n\t        : adapter.getChildren(elems);\n\t}\n\tfunction appendNextSiblings(elem, adapter) {\n\t    // Order matters because jQuery seems to check the children before the siblings\n\t    const elems = Array.isArray(elem) ? elem.slice(0) : [elem];\n\t    const elemsLength = elems.length;\n\t    for (let i = 0; i < elemsLength; i++) {\n\t        const nextSiblings = getNextSiblings(elems[i], adapter);\n\t        elems.push(...nextSiblings);\n\t    }\n\t    return elems;\n\t}\n\n\tconst filterNames = new Set([\n\t    \"first\",\n\t    \"last\",\n\t    \"eq\",\n\t    \"gt\",\n\t    \"nth\",\n\t    \"lt\",\n\t    \"even\",\n\t    \"odd\",\n\t]);\n\tfunction isFilter(s) {\n\t    if (s.type !== \"pseudo\")\n\t        return false;\n\t    if (filterNames.has(s.name))\n\t        return true;\n\t    if (s.name === \"not\" && Array.isArray(s.data)) {\n\t        // Only consider `:not` with embedded filters\n\t        return s.data.some((s) => s.some(isFilter));\n\t    }\n\t    return false;\n\t}\n\tfunction getLimit(filter, data, partLimit) {\n\t    const num = data != null ? parseInt(data, 10) : NaN;\n\t    switch (filter) {\n\t        case \"first\":\n\t            return 1;\n\t        case \"nth\":\n\t        case \"eq\":\n\t            return isFinite(num) ? (num >= 0 ? num + 1 : Infinity) : 0;\n\t        case \"lt\":\n\t            return isFinite(num)\n\t                ? num >= 0\n\t                    ? Math.min(num, partLimit)\n\t                    : Infinity\n\t                : 0;\n\t        case \"gt\":\n\t            return isFinite(num) ? Infinity : 0;\n\t        case \"odd\":\n\t            return 2 * partLimit;\n\t        case \"even\":\n\t            return 2 * partLimit - 1;\n\t        case \"last\":\n\t        case \"not\":\n\t            return Infinity;\n\t    }\n\t}\n\n\tfunction getDocumentRoot(node) {\n\t    while (node.parent)\n\t        node = node.parent;\n\t    return node;\n\t}\n\tfunction groupSelectors(selectors) {\n\t    const filteredSelectors = [];\n\t    const plainSelectors = [];\n\t    for (const selector of selectors) {\n\t        if (selector.some(isFilter)) {\n\t            filteredSelectors.push(selector);\n\t        }\n\t        else {\n\t            plainSelectors.push(selector);\n\t        }\n\t    }\n\t    return [plainSelectors, filteredSelectors];\n\t}\n\n\tconst UNIVERSAL_SELECTOR = {\n\t    type: SelectorType.Universal,\n\t    namespace: null,\n\t};\n\tconst SCOPE_PSEUDO = {\n\t    type: SelectorType.Pseudo,\n\t    name: \"scope\",\n\t    data: null,\n\t};\n\tfunction is$1(element, selector, options = {}) {\n\t    return some$4([element], selector, options);\n\t}\n\tfunction some$4(elements, selector, options = {}) {\n\t    if (typeof selector === \"function\")\n\t        return elements.some(selector);\n\t    const [plain, filtered] = groupSelectors(parse(selector));\n\t    return ((plain.length > 0 && elements.some(_compileToken(plain, options))) ||\n\t        filtered.some((sel) => filterBySelector(sel, elements, options).length > 0));\n\t}\n\tfunction filterByPosition(filter, elems, data, options) {\n\t    const num = typeof data === \"string\" ? parseInt(data, 10) : NaN;\n\t    switch (filter) {\n\t        case \"first\":\n\t        case \"lt\":\n\t            // Already done in `getLimit`\n\t            return elems;\n\t        case \"last\":\n\t            return elems.length > 0 ? [elems[elems.length - 1]] : elems;\n\t        case \"nth\":\n\t        case \"eq\":\n\t            return isFinite(num) && Math.abs(num) < elems.length\n\t                ? [num < 0 ? elems[elems.length + num] : elems[num]]\n\t                : [];\n\t        case \"gt\":\n\t            return isFinite(num) ? elems.slice(num + 1) : [];\n\t        case \"even\":\n\t            return elems.filter((_, i) => i % 2 === 0);\n\t        case \"odd\":\n\t            return elems.filter((_, i) => i % 2 === 1);\n\t        case \"not\": {\n\t            const filtered = new Set(filterParsed(data, elems, options));\n\t            return elems.filter((e) => !filtered.has(e));\n\t        }\n\t    }\n\t}\n\tfunction filter$5(selector, elements, options = {}) {\n\t    return filterParsed(parse(selector), elements, options);\n\t}\n\t/**\n\t * Filter a set of elements by a selector.\n\t *\n\t * Will return elements in the original order.\n\t *\n\t * @param selector Selector to filter by.\n\t * @param elements Elements to filter.\n\t * @param options Options for selector.\n\t */\n\tfunction filterParsed(selector, elements, options) {\n\t    if (elements.length === 0)\n\t        return [];\n\t    const [plainSelectors, filteredSelectors] = groupSelectors(selector);\n\t    let found;\n\t    if (plainSelectors.length) {\n\t        const filtered = filterElements(elements, plainSelectors, options);\n\t        // If there are no filters, just return\n\t        if (filteredSelectors.length === 0) {\n\t            return filtered;\n\t        }\n\t        // Otherwise, we have to do some filtering\n\t        if (filtered.length) {\n\t            found = new Set(filtered);\n\t        }\n\t    }\n\t    for (let i = 0; i < filteredSelectors.length && (found === null || found === void 0 ? void 0 : found.size) !== elements.length; i++) {\n\t        const filteredSelector = filteredSelectors[i];\n\t        const missing = found\n\t            ? elements.filter((e) => isTag$1(e) && !found.has(e))\n\t            : elements;\n\t        if (missing.length === 0)\n\t            break;\n\t        const filtered = filterBySelector(filteredSelector, elements, options);\n\t        if (filtered.length) {\n\t            if (!found) {\n\t                /*\n\t                 * If we haven't found anything before the last selector,\n\t                 * just return what we found now.\n\t                 */\n\t                if (i === filteredSelectors.length - 1) {\n\t                    return filtered;\n\t                }\n\t                found = new Set(filtered);\n\t            }\n\t            else {\n\t                filtered.forEach((el) => found.add(el));\n\t            }\n\t        }\n\t    }\n\t    return typeof found !== \"undefined\"\n\t        ? (found.size === elements.length\n\t            ? elements\n\t            : // Filter elements to preserve order\n\t                elements.filter((el) => found.has(el)))\n\t        : [];\n\t}\n\tfunction filterBySelector(selector, elements, options) {\n\t    var _a;\n\t    if (selector.some(isTraversal)) {\n\t        /*\n\t         * Get root node, run selector with the scope\n\t         * set to all of our nodes.\n\t         */\n\t        const root = (_a = options.root) !== null && _a !== void 0 ? _a : getDocumentRoot(elements[0]);\n\t        const opts = { ...options, context: elements, relativeSelector: false };\n\t        selector.push(SCOPE_PSEUDO);\n\t        return findFilterElements(root, selector, opts, true, elements.length);\n\t    }\n\t    // Performance optimization: If we don't have to traverse, just filter set.\n\t    return findFilterElements(elements, selector, options, false, elements.length);\n\t}\n\tfunction select(selector, root, options = {}, limit = Infinity) {\n\t    if (typeof selector === \"function\") {\n\t        return find$6(root, selector);\n\t    }\n\t    const [plain, filtered] = groupSelectors(parse(selector));\n\t    const results = filtered.map((sel) => findFilterElements(root, sel, options, true, limit));\n\t    // Plain selectors can be queried in a single go\n\t    if (plain.length) {\n\t        results.push(findElements(root, plain, options, limit));\n\t    }\n\t    if (results.length === 0) {\n\t        return [];\n\t    }\n\t    // If there was only a single selector, just return the result\n\t    if (results.length === 1) {\n\t        return results[0];\n\t    }\n\t    // Sort results, filtering for duplicates\n\t    return uniqueSort(results.reduce((a, b) => [...a, ...b]));\n\t}\n\t/**\n\t *\n\t * @param root Element(s) to search from.\n\t * @param selector Selector to look for.\n\t * @param options Options for querying.\n\t * @param queryForSelector Query multiple levels deep for the initial selector, even if it doesn't contain a traversal.\n\t */\n\tfunction findFilterElements(root, selector, options, queryForSelector, totalLimit) {\n\t    const filterIndex = selector.findIndex(isFilter);\n\t    const sub = selector.slice(0, filterIndex);\n\t    const filter = selector[filterIndex];\n\t    // If we are at the end of the selector, we can limit the number of elements to retrieve.\n\t    const partLimit = selector.length - 1 === filterIndex ? totalLimit : Infinity;\n\t    /*\n\t     * Set the number of elements to retrieve.\n\t     * Eg. for :first, we only have to get a single element.\n\t     */\n\t    const limit = getLimit(filter.name, filter.data, partLimit);\n\t    if (limit === 0)\n\t        return [];\n\t    /*\n\t     * Skip `findElements` call if our selector starts with a positional\n\t     * pseudo.\n\t     */\n\t    const elemsNoLimit = sub.length === 0 && !Array.isArray(root)\n\t        ? getChildren(root).filter(isTag$1)\n\t        : sub.length === 0\n\t            ? (Array.isArray(root) ? root : [root]).filter(isTag$1)\n\t            : queryForSelector || sub.some(isTraversal)\n\t                ? findElements(root, [sub], options, limit)\n\t                : filterElements(root, [sub], options);\n\t    const elems = elemsNoLimit.slice(0, limit);\n\t    let result = filterByPosition(filter.name, elems, filter.data, options);\n\t    if (result.length === 0 || selector.length === filterIndex + 1) {\n\t        return result;\n\t    }\n\t    const remainingSelector = selector.slice(filterIndex + 1);\n\t    const remainingHasTraversal = remainingSelector.some(isTraversal);\n\t    if (remainingHasTraversal) {\n\t        if (isTraversal(remainingSelector[0])) {\n\t            const { type } = remainingSelector[0];\n\t            if (type === SelectorType.Sibling ||\n\t                type === SelectorType.Adjacent) {\n\t                // If we have a sibling traversal, we need to also look at the siblings.\n\t                result = prepareContext(result, DomUtils, true);\n\t            }\n\t            // Avoid a traversal-first selector error.\n\t            remainingSelector.unshift(UNIVERSAL_SELECTOR);\n\t        }\n\t        options = {\n\t            ...options,\n\t            // Avoid absolutizing the selector\n\t            relativeSelector: false,\n\t            /*\n\t             * Add a custom root func, to make sure traversals don't match elements\n\t             * that aren't a part of the considered tree.\n\t             */\n\t            rootFunc: (el) => result.includes(el),\n\t        };\n\t    }\n\t    else if (options.rootFunc && options.rootFunc !== boolbase_1) {\n\t        options = { ...options, rootFunc: boolbase_1 };\n\t    }\n\t    /*\n\t     * If we have another filter, recursively call `findFilterElements`,\n\t     * with the `recursive` flag disabled. We only have to look for more\n\t     * elements when we see a traversal.\n\t     *\n\t     * Otherwise,\n\t     */\n\t    return remainingSelector.some(isFilter)\n\t        ? findFilterElements(result, remainingSelector, options, false, totalLimit)\n\t        : remainingHasTraversal\n\t            ? // Query existing elements to resolve traversal.\n\t                findElements(result, [remainingSelector], options, totalLimit)\n\t            : // If we don't have any more traversals, simply filter elements.\n\t                filterElements(result, [remainingSelector], options);\n\t}\n\tfunction findElements(root, sel, options, limit) {\n\t    const query = _compileToken(sel, options, root);\n\t    return find$6(root, query, limit);\n\t}\n\tfunction find$6(root, query, limit = Infinity) {\n\t    const elems = prepareContext(root, DomUtils, query.shouldTestNextSiblings);\n\t    return find$5((node) => isTag$1(node) && query(node), elems, true, limit);\n\t}\n\tfunction filterElements(elements, sel, options) {\n\t    const els = (Array.isArray(elements) ? elements : [elements]).filter(isTag$1);\n\t    if (els.length === 0)\n\t        return els;\n\t    const query = _compileToken(sel, options);\n\t    return query === boolbase_1 ? els : els.filter(query);\n\t}\n\n\t/**\n\t * Methods for traversing the DOM structure.\n\t *\n\t * @module cheerio/traversing\n\t */\n\tconst reSiblingSelector = /^\\s*[~+]/;\n\t/**\n\t * Get the descendants of each element in the current set of matched elements,\n\t * filtered by a selector, jQuery object, or element.\n\t *\n\t * @category Traversing\n\t * @example\n\t *\n\t * ```js\n\t * $('#fruits').find('li').length;\n\t * //=> 3\n\t * $('#fruits').find($('.apple')).length;\n\t * //=> 1\n\t * ```\n\t *\n\t * @param selectorOrHaystack - Element to look for.\n\t * @returns The found elements.\n\t * @see {@link https://api.jquery.com/find/}\n\t */\n\tfunction find$7(selectorOrHaystack) {\n\t    var _a;\n\t    if (!selectorOrHaystack) {\n\t        return this._make([]);\n\t    }\n\t    const context = this.toArray();\n\t    if (typeof selectorOrHaystack !== 'string') {\n\t        const haystack = isCheerio(selectorOrHaystack)\n\t            ? selectorOrHaystack.toArray()\n\t            : [selectorOrHaystack];\n\t        return this._make(haystack.filter((elem) => context.some((node) => contains(node, elem))));\n\t    }\n\t    const elems = reSiblingSelector.test(selectorOrHaystack)\n\t        ? context\n\t        : this.children().toArray();\n\t    const options = {\n\t        context,\n\t        root: (_a = this._root) === null || _a === void 0 ? void 0 : _a[0],\n\t        // Pass options that are recognized by `cheerio-select`\n\t        xmlMode: this.options.xmlMode,\n\t        lowerCaseTags: this.options.lowerCaseTags,\n\t        lowerCaseAttributeNames: this.options.lowerCaseAttributeNames,\n\t        pseudos: this.options.pseudos,\n\t        quirksMode: this.options.quirksMode,\n\t    };\n\t    return this._make(select(selectorOrHaystack, elems, options));\n\t}\n\t/**\n\t * Creates a matcher, using a particular mapping function. Matchers provide a\n\t * function that finds elements using a generating function, supporting filtering.\n\t *\n\t * @private\n\t * @param matchMap - Mapping function.\n\t * @returns - Function for wrapping generating functions.\n\t */\n\tfunction _getMatcher(matchMap) {\n\t    return function (fn, ...postFns) {\n\t        return function (selector) {\n\t            var _a;\n\t            let matched = matchMap(fn, this);\n\t            if (selector) {\n\t                matched = filterArray(matched, selector, this.options.xmlMode, (_a = this._root) === null || _a === void 0 ? void 0 : _a[0]);\n\t            }\n\t            return this._make(\n\t            // Post processing is only necessary if there is more than one element.\n\t            this.length > 1 && matched.length > 1\n\t                ? postFns.reduce((elems, fn) => fn(elems), matched)\n\t                : matched);\n\t        };\n\t    };\n\t}\n\t/** Matcher that adds multiple elements for each entry in the input. */\n\tconst _matcher = _getMatcher((fn, elems) => {\n\t    const ret = [];\n\t    for (let i = 0; i < elems.length; i++) {\n\t        const value = fn(elems[i]);\n\t        ret.push(value);\n\t    }\n\t    return new Array().concat(...ret);\n\t});\n\t/** Matcher that adds at most one element for each entry in the input. */\n\tconst _singleMatcher = _getMatcher((fn, elems) => {\n\t    const ret = [];\n\t    for (let i = 0; i < elems.length; i++) {\n\t        const value = fn(elems[i]);\n\t        if (value !== null) {\n\t            ret.push(value);\n\t        }\n\t    }\n\t    return ret;\n\t});\n\t/**\n\t * Matcher that supports traversing until a condition is met.\n\t *\n\t * @returns A function usable for `*Until` methods.\n\t */\n\tfunction _matchUntil(nextElem, ...postFns) {\n\t    // We use a variable here that is used from within the matcher.\n\t    let matches = null;\n\t    const innerMatcher = _getMatcher((nextElem, elems) => {\n\t        const matched = [];\n\t        domEach(elems, (elem) => {\n\t            for (let next; (next = nextElem(elem)); elem = next) {\n\t                // FIXME: `matched` might contain duplicates here and the index is too large.\n\t                if (matches === null || matches === void 0 ? void 0 : matches(next, matched.length))\n\t                    break;\n\t                matched.push(next);\n\t            }\n\t        });\n\t        return matched;\n\t    })(nextElem, ...postFns);\n\t    return function (selector, filterSelector) {\n\t        // Override `matches` variable with the new target.\n\t        matches =\n\t            typeof selector === 'string'\n\t                ? (elem) => is$1(elem, selector, this.options)\n\t                : selector\n\t                    ? getFilterFn(selector)\n\t                    : null;\n\t        const ret = innerMatcher.call(this, filterSelector);\n\t        // Set `matches` to `null`, so we don't waste memory.\n\t        matches = null;\n\t        return ret;\n\t    };\n\t}\n\tfunction _removeDuplicates(elems) {\n\t    return Array.from(new Set(elems));\n\t}\n\t/**\n\t * Get the parent of each element in the current set of matched elements,\n\t * optionally filtered by a selector.\n\t *\n\t * @category Traversing\n\t * @example\n\t *\n\t * ```js\n\t * $('.pear').parent().attr('id');\n\t * //=> fruits\n\t * ```\n\t *\n\t * @param selector - If specified filter for parent.\n\t * @returns The parents.\n\t * @see {@link https://api.jquery.com/parent/}\n\t */\n\tconst parent = _singleMatcher(({ parent }) => (parent && !isDocument(parent) ? parent : null), _removeDuplicates);\n\t/**\n\t * Get a set of parents filtered by `selector` of each element in the current\n\t * set of match elements.\n\t *\n\t * @category Traversing\n\t * @example\n\t *\n\t * ```js\n\t * $('.orange').parents().length;\n\t * //=> 2\n\t * $('.orange').parents('#fruits').length;\n\t * //=> 1\n\t * ```\n\t *\n\t * @param selector - If specified filter for parents.\n\t * @returns The parents.\n\t * @see {@link https://api.jquery.com/parents/}\n\t */\n\tconst parents = _matcher((elem) => {\n\t    const matched = [];\n\t    while (elem.parent && !isDocument(elem.parent)) {\n\t        matched.push(elem.parent);\n\t        elem = elem.parent;\n\t    }\n\t    return matched;\n\t}, uniqueSort, (elems) => elems.reverse());\n\t/**\n\t * Get the ancestors of each element in the current set of matched elements, up\n\t * to but not including the element matched by the selector, DOM node, or cheerio object.\n\t *\n\t * @category Traversing\n\t * @example\n\t *\n\t * ```js\n\t * $('.orange').parentsUntil('#food').length;\n\t * //=> 1\n\t * ```\n\t *\n\t * @param selector - Selector for element to stop at.\n\t * @param filterSelector - Optional filter for parents.\n\t * @returns The parents.\n\t * @see {@link https://api.jquery.com/parentsUntil/}\n\t */\n\tconst parentsUntil = _matchUntil(({ parent }) => (parent && !isDocument(parent) ? parent : null), uniqueSort, (elems) => elems.reverse());\n\t/**\n\t * For each element in the set, get the first element that matches the selector\n\t * by testing the element itself and traversing up through its ancestors in the DOM tree.\n\t *\n\t * @category Traversing\n\t * @example\n\t *\n\t * ```js\n\t * $('.orange').closest();\n\t * //=> []\n\t *\n\t * $('.orange').closest('.apple');\n\t * // => []\n\t *\n\t * $('.orange').closest('li');\n\t * //=> [<li class=\"orange\">Orange</li>]\n\t *\n\t * $('.orange').closest('#fruits');\n\t * //=> [<ul id=\"fruits\"> ... </ul>]\n\t * ```\n\t *\n\t * @param selector - Selector for the element to find.\n\t * @returns The closest nodes.\n\t * @see {@link https://api.jquery.com/closest/}\n\t */\n\tfunction closest(selector) {\n\t    var _a;\n\t    const set = [];\n\t    if (!selector) {\n\t        return this._make(set);\n\t    }\n\t    const selectOpts = {\n\t        xmlMode: this.options.xmlMode,\n\t        root: (_a = this._root) === null || _a === void 0 ? void 0 : _a[0],\n\t    };\n\t    const selectFn = typeof selector === 'string'\n\t        ? (elem) => is$1(elem, selector, selectOpts)\n\t        : getFilterFn(selector);\n\t    domEach(this, (elem) => {\n\t        while (elem && isTag$1(elem)) {\n\t            if (selectFn(elem, 0)) {\n\t                // Do not add duplicate elements to the set\n\t                if (!set.includes(elem)) {\n\t                    set.push(elem);\n\t                }\n\t                break;\n\t            }\n\t            elem = elem.parent;\n\t        }\n\t    });\n\t    return this._make(set);\n\t}\n\t/**\n\t * Gets the next sibling of the first selected element, optionally filtered by a selector.\n\t *\n\t * @category Traversing\n\t * @example\n\t *\n\t * ```js\n\t * $('.apple').next().hasClass('orange');\n\t * //=> true\n\t * ```\n\t *\n\t * @param selector - If specified filter for sibling.\n\t * @returns The next nodes.\n\t * @see {@link https://api.jquery.com/next/}\n\t */\n\tconst next = _singleMatcher((elem) => nextElementSibling(elem));\n\t/**\n\t * Gets all the following siblings of the first selected element, optionally\n\t * filtered by a selector.\n\t *\n\t * @category Traversing\n\t * @example\n\t *\n\t * ```js\n\t * $('.apple').nextAll();\n\t * //=> [<li class=\"orange\">Orange</li>, <li class=\"pear\">Pear</li>]\n\t * $('.apple').nextAll('.orange');\n\t * //=> [<li class=\"orange\">Orange</li>]\n\t * ```\n\t *\n\t * @param selector - If specified filter for siblings.\n\t * @returns The next nodes.\n\t * @see {@link https://api.jquery.com/nextAll/}\n\t */\n\tconst nextAll = _matcher((elem) => {\n\t    const matched = [];\n\t    while (elem.next) {\n\t        elem = elem.next;\n\t        if (isTag$1(elem))\n\t            matched.push(elem);\n\t    }\n\t    return matched;\n\t}, _removeDuplicates);\n\t/**\n\t * Gets all the following siblings up to but not including the element matched\n\t * by the selector, optionally filtered by another selector.\n\t *\n\t * @category Traversing\n\t * @example\n\t *\n\t * ```js\n\t * $('.apple').nextUntil('.pear');\n\t * //=> [<li class=\"orange\">Orange</li>]\n\t * ```\n\t *\n\t * @param selector - Selector for element to stop at.\n\t * @param filterSelector - If specified filter for siblings.\n\t * @returns The next nodes.\n\t * @see {@link https://api.jquery.com/nextUntil/}\n\t */\n\tconst nextUntil = _matchUntil((el) => nextElementSibling(el), _removeDuplicates);\n\t/**\n\t * Gets the previous sibling of the first selected element optionally filtered\n\t * by a selector.\n\t *\n\t * @category Traversing\n\t * @example\n\t *\n\t * ```js\n\t * $('.orange').prev().hasClass('apple');\n\t * //=> true\n\t * ```\n\t *\n\t * @param selector - If specified filter for siblings.\n\t * @returns The previous nodes.\n\t * @see {@link https://api.jquery.com/prev/}\n\t */\n\tconst prev = _singleMatcher((elem) => prevElementSibling(elem));\n\t/**\n\t * Gets all the preceding siblings of the first selected element, optionally\n\t * filtered by a selector.\n\t *\n\t * @category Traversing\n\t * @example\n\t *\n\t * ```js\n\t * $('.pear').prevAll();\n\t * //=> [<li class=\"orange\">Orange</li>, <li class=\"apple\">Apple</li>]\n\t *\n\t * $('.pear').prevAll('.orange');\n\t * //=> [<li class=\"orange\">Orange</li>]\n\t * ```\n\t *\n\t * @param selector - If specified filter for siblings.\n\t * @returns The previous nodes.\n\t * @see {@link https://api.jquery.com/prevAll/}\n\t */\n\tconst prevAll = _matcher((elem) => {\n\t    const matched = [];\n\t    while (elem.prev) {\n\t        elem = elem.prev;\n\t        if (isTag$1(elem))\n\t            matched.push(elem);\n\t    }\n\t    return matched;\n\t}, _removeDuplicates);\n\t/**\n\t * Gets all the preceding siblings up to but not including the element matched\n\t * by the selector, optionally filtered by another selector.\n\t *\n\t * @category Traversing\n\t * @example\n\t *\n\t * ```js\n\t * $('.pear').prevUntil('.apple');\n\t * //=> [<li class=\"orange\">Orange</li>]\n\t * ```\n\t *\n\t * @param selector - Selector for element to stop at.\n\t * @param filterSelector - If specified filter for siblings.\n\t * @returns The previous nodes.\n\t * @see {@link https://api.jquery.com/prevUntil/}\n\t */\n\tconst prevUntil = _matchUntil((el) => prevElementSibling(el), _removeDuplicates);\n\t/**\n\t * Get the siblings of each element (excluding the element) in the set of\n\t * matched elements, optionally filtered by a selector.\n\t *\n\t * @category Traversing\n\t * @example\n\t *\n\t * ```js\n\t * $('.pear').siblings().length;\n\t * //=> 2\n\t *\n\t * $('.pear').siblings('.orange').length;\n\t * //=> 1\n\t * ```\n\t *\n\t * @param selector - If specified filter for siblings.\n\t * @returns The siblings.\n\t * @see {@link https://api.jquery.com/siblings/}\n\t */\n\tconst siblings = _matcher((elem) => getSiblings(elem).filter((el) => isTag$1(el) && el !== elem), uniqueSort);\n\t/**\n\t * Gets the element children of each element in the set of matched elements.\n\t *\n\t * @category Traversing\n\t * @example\n\t *\n\t * ```js\n\t * $('#fruits').children().length;\n\t * //=> 3\n\t *\n\t * $('#fruits').children('.pear').text();\n\t * //=> Pear\n\t * ```\n\t *\n\t * @param selector - If specified filter for children.\n\t * @returns The children.\n\t * @see {@link https://api.jquery.com/children/}\n\t */\n\tconst children = _matcher((elem) => getChildren(elem).filter(isTag$1), _removeDuplicates);\n\t/**\n\t * Gets the children of each element in the set of matched elements, including\n\t * text and comment nodes.\n\t *\n\t * @category Traversing\n\t * @example\n\t *\n\t * ```js\n\t * $('#fruits').contents().length;\n\t * //=> 3\n\t * ```\n\t *\n\t * @returns The children.\n\t * @see {@link https://api.jquery.com/contents/}\n\t */\n\tfunction contents() {\n\t    const elems = this.toArray().reduce((newElems, elem) => hasChildren(elem) ? newElems.concat(elem.children) : newElems, []);\n\t    return this._make(elems);\n\t}\n\t/**\n\t * Iterates over a cheerio object, executing a function for each matched\n\t * element. When the callback is fired, the function is fired in the context of\n\t * the DOM element, so `this` refers to the current element, which is equivalent\n\t * to the function parameter `element`. To break out of the `each` loop early,\n\t * return with `false`.\n\t *\n\t * @category Traversing\n\t * @example\n\t *\n\t * ```js\n\t * const fruits = [];\n\t *\n\t * $('li').each(function (i, elem) {\n\t *   fruits[i] = $(this).text();\n\t * });\n\t *\n\t * fruits.join(', ');\n\t * //=> Apple, Orange, Pear\n\t * ```\n\t *\n\t * @param fn - Function to execute.\n\t * @returns The instance itself, useful for chaining.\n\t * @see {@link https://api.jquery.com/each/}\n\t */\n\tfunction each(fn) {\n\t    let i = 0;\n\t    const len = this.length;\n\t    while (i < len && fn.call(this[i], i, this[i]) !== false)\n\t        ++i;\n\t    return this;\n\t}\n\t/**\n\t * Pass each element in the current matched set through a function, producing a\n\t * new Cheerio object containing the return values. The function can return an\n\t * individual data item or an array of data items to be inserted into the\n\t * resulting set. If an array is returned, the elements inside the array are\n\t * inserted into the set. If the function returns null or undefined, no element\n\t * will be inserted.\n\t *\n\t * @category Traversing\n\t * @example\n\t *\n\t * ```js\n\t * $('li')\n\t *   .map(function (i, el) {\n\t *     // this === el\n\t *     return $(this).text();\n\t *   })\n\t *   .toArray()\n\t *   .join(' ');\n\t * //=> \"apple orange pear\"\n\t * ```\n\t *\n\t * @param fn - Function to execute.\n\t * @returns The mapped elements, wrapped in a Cheerio collection.\n\t * @see {@link https://api.jquery.com/map/}\n\t */\n\tfunction map$a(fn) {\n\t    let elems = [];\n\t    for (let i = 0; i < this.length; i++) {\n\t        const el = this[i];\n\t        const val = fn.call(el, i, el);\n\t        if (val != null) {\n\t            elems = elems.concat(val);\n\t        }\n\t    }\n\t    return this._make(elems);\n\t}\n\t/**\n\t * Creates a function to test if a filter is matched.\n\t *\n\t * @param match - A filter.\n\t * @returns A function that determines if a filter has been matched.\n\t */\n\tfunction getFilterFn(match) {\n\t    if (typeof match === 'function') {\n\t        return (el, i) => match.call(el, i, el);\n\t    }\n\t    if (isCheerio(match)) {\n\t        return (el) => Array.prototype.includes.call(match, el);\n\t    }\n\t    return function (el) {\n\t        return match === el;\n\t    };\n\t}\n\tfunction filter$6(match) {\n\t    var _a;\n\t    return this._make(filterArray(this.toArray(), match, this.options.xmlMode, (_a = this._root) === null || _a === void 0 ? void 0 : _a[0]));\n\t}\n\tfunction filterArray(nodes, match, xmlMode, root) {\n\t    return typeof match === 'string'\n\t        ? filter$5(match, nodes, { xmlMode, root })\n\t        : nodes.filter(getFilterFn(match));\n\t}\n\t/**\n\t * Checks the current list of elements and returns `true` if _any_ of the\n\t * elements match the selector. If using an element or Cheerio selection,\n\t * returns `true` if _any_ of the elements match. If using a predicate function,\n\t * the function is executed in the context of the selected element, so `this`\n\t * refers to the current element.\n\t *\n\t * @category Attributes\n\t * @param selector - Selector for the selection.\n\t * @returns Whether or not the selector matches an element of the instance.\n\t * @see {@link https://api.jquery.com/is/}\n\t */\n\tfunction is$2(selector) {\n\t    const nodes = this.toArray();\n\t    return typeof selector === 'string'\n\t        ? some$4(nodes.filter(isTag$1), selector, this.options)\n\t        : selector\n\t            ? nodes.some(getFilterFn(selector))\n\t            : false;\n\t}\n\t/**\n\t * Remove elements from the set of matched elements. Given a Cheerio object that\n\t * represents a set of DOM elements, the `.not()` method constructs a new\n\t * Cheerio object from a subset of the matching elements. The supplied selector\n\t * is tested against each element; the elements that don't match the selector\n\t * will be included in the result.\n\t *\n\t * The `.not()` method can take a function as its argument in the same way that\n\t * `.filter()` does. Elements for which the function returns `true` are excluded\n\t * from the filtered set; all other elements are included.\n\t *\n\t * @category Traversing\n\t * @example <caption>Selector</caption>\n\t *\n\t * ```js\n\t * $('li').not('.apple').length;\n\t * //=> 2\n\t * ```\n\t *\n\t * @example <caption>Function</caption>\n\t *\n\t * ```js\n\t * $('li').not(function (i, el) {\n\t *   // this === el\n\t *   return $(this).attr('class') === 'orange';\n\t * }).length; //=> 2\n\t * ```\n\t *\n\t * @param match - Value to look for, following the rules above.\n\t * @param container - Optional node to filter instead.\n\t * @returns The filtered collection.\n\t * @see {@link https://api.jquery.com/not/}\n\t */\n\tfunction not(match) {\n\t    let nodes = this.toArray();\n\t    if (typeof match === 'string') {\n\t        const matches = new Set(filter$5(match, nodes, this.options));\n\t        nodes = nodes.filter((el) => !matches.has(el));\n\t    }\n\t    else {\n\t        const filterFn = getFilterFn(match);\n\t        nodes = nodes.filter((el, i) => !filterFn(el, i));\n\t    }\n\t    return this._make(nodes);\n\t}\n\t/**\n\t * Filters the set of matched elements to only those which have the given DOM\n\t * element as a descendant or which have a descendant that matches the given\n\t * selector. Equivalent to `.filter(':has(selector)')`.\n\t *\n\t * @category Traversing\n\t * @example <caption>Selector</caption>\n\t *\n\t * ```js\n\t * $('ul').has('.pear').attr('id');\n\t * //=> fruits\n\t * ```\n\t *\n\t * @example <caption>Element</caption>\n\t *\n\t * ```js\n\t * $('ul').has($('.pear')[0]).attr('id');\n\t * //=> fruits\n\t * ```\n\t *\n\t * @param selectorOrHaystack - Element to look for.\n\t * @returns The filtered collection.\n\t * @see {@link https://api.jquery.com/has/}\n\t */\n\tfunction has$1(selectorOrHaystack) {\n\t    return this.filter(typeof selectorOrHaystack === 'string'\n\t        ? // Using the `:has` selector here short-circuits searches.\n\t            `:has(${selectorOrHaystack})`\n\t        : (_, el) => this._make(el).find(selectorOrHaystack).length > 0);\n\t}\n\t/**\n\t * Will select the first element of a cheerio object.\n\t *\n\t * @category Traversing\n\t * @example\n\t *\n\t * ```js\n\t * $('#fruits').children().first().text();\n\t * //=> Apple\n\t * ```\n\t *\n\t * @returns The first element.\n\t * @see {@link https://api.jquery.com/first/}\n\t */\n\tfunction first() {\n\t    return this.length > 1 ? this._make(this[0]) : this;\n\t}\n\t/**\n\t * Will select the last element of a cheerio object.\n\t *\n\t * @category Traversing\n\t * @example\n\t *\n\t * ```js\n\t * $('#fruits').children().last().text();\n\t * //=> Pear\n\t * ```\n\t *\n\t * @returns The last element.\n\t * @see {@link https://api.jquery.com/last/}\n\t */\n\tfunction last$1() {\n\t    return this.length > 0 ? this._make(this[this.length - 1]) : this;\n\t}\n\t/**\n\t * Reduce the set of matched elements to the one at the specified index. Use\n\t * `.eq(-i)` to count backwards from the last selected element.\n\t *\n\t * @category Traversing\n\t * @example\n\t *\n\t * ```js\n\t * $('li').eq(0).text();\n\t * //=> Apple\n\t *\n\t * $('li').eq(-1).text();\n\t * //=> Pear\n\t * ```\n\t *\n\t * @param i - Index of the element to select.\n\t * @returns The element at the `i`th position.\n\t * @see {@link https://api.jquery.com/eq/}\n\t */\n\tfunction eq$1(i) {\n\t    var _a;\n\t    i = +i;\n\t    // Use the first identity optimization if possible\n\t    if (i === 0 && this.length <= 1)\n\t        return this;\n\t    if (i < 0)\n\t        i = this.length + i;\n\t    return this._make((_a = this[i]) !== null && _a !== void 0 ? _a : []);\n\t}\n\tfunction get$9(i) {\n\t    if (i == null) {\n\t        return this.toArray();\n\t    }\n\t    return this[i < 0 ? this.length + i : i];\n\t}\n\t/**\n\t * Retrieve all the DOM elements contained in the jQuery set as an array.\n\t *\n\t * @example\n\t *\n\t * ```js\n\t * $('li').toArray();\n\t * //=> [ {...}, {...}, {...} ]\n\t * ```\n\t *\n\t * @returns The contained items.\n\t */\n\tfunction toArray$1() {\n\t    return Array.prototype.slice.call(this);\n\t}\n\t/**\n\t * Search for a given element from among the matched elements.\n\t *\n\t * @category Traversing\n\t * @example\n\t *\n\t * ```js\n\t * $('.pear').index();\n\t * //=> 2 $('.orange').index('li');\n\t * //=> 1\n\t * $('.apple').index($('#fruit, li'));\n\t * //=> 1\n\t * ```\n\t *\n\t * @param selectorOrNeedle - Element to look for.\n\t * @returns The index of the element.\n\t * @see {@link https://api.jquery.com/index/}\n\t */\n\tfunction index(selectorOrNeedle) {\n\t    let $haystack;\n\t    let needle;\n\t    if (selectorOrNeedle == null) {\n\t        $haystack = this.parent().children();\n\t        needle = this[0];\n\t    }\n\t    else if (typeof selectorOrNeedle === 'string') {\n\t        $haystack = this._make(selectorOrNeedle);\n\t        needle = this[0];\n\t    }\n\t    else {\n\t        // eslint-disable-next-line @typescript-eslint/no-this-alias\n\t        $haystack = this;\n\t        needle = isCheerio(selectorOrNeedle)\n\t            ? selectorOrNeedle[0]\n\t            : selectorOrNeedle;\n\t    }\n\t    return Array.prototype.indexOf.call($haystack, needle);\n\t}\n\t/**\n\t * Gets the elements matching the specified range (0-based position).\n\t *\n\t * @category Traversing\n\t * @example\n\t *\n\t * ```js\n\t * $('li').slice(1).eq(0).text();\n\t * //=> 'Orange'\n\t *\n\t * $('li').slice(1, 2).length;\n\t * //=> 1\n\t * ```\n\t *\n\t * @param start - An position at which the elements begin to be selected. If\n\t *   negative, it indicates an offset from the end of the set.\n\t * @param end - An position at which the elements stop being selected. If\n\t *   negative, it indicates an offset from the end of the set. If omitted, the\n\t *   range continues until the end of the set.\n\t * @returns The elements matching the specified range.\n\t * @see {@link https://api.jquery.com/slice/}\n\t */\n\tfunction slice$8(start, end) {\n\t    return this._make(Array.prototype.slice.call(this, start, end));\n\t}\n\t/**\n\t * End the most recent filtering operation in the current chain and return the\n\t * set of matched elements to its previous state.\n\t *\n\t * @category Traversing\n\t * @example\n\t *\n\t * ```js\n\t * $('li').eq(0).end().length;\n\t * //=> 3\n\t * ```\n\t *\n\t * @returns The previous state of the set of matched elements.\n\t * @see {@link https://api.jquery.com/end/}\n\t */\n\tfunction end() {\n\t    var _a;\n\t    return (_a = this.prevObject) !== null && _a !== void 0 ? _a : this._make([]);\n\t}\n\t/**\n\t * Add elements to the set of matched elements.\n\t *\n\t * @category Traversing\n\t * @example\n\t *\n\t * ```js\n\t * $('.apple').add('.orange').length;\n\t * //=> 2\n\t * ```\n\t *\n\t * @param other - Elements to add.\n\t * @param context - Optionally the context of the new selection.\n\t * @returns The combined set.\n\t * @see {@link https://api.jquery.com/add/}\n\t */\n\tfunction add(other, context) {\n\t    const selection = this._make(other, context);\n\t    const contents = uniqueSort([...this.get(), ...selection.get()]);\n\t    return this._make(contents);\n\t}\n\t/**\n\t * Add the previous set of elements on the stack to the current set, optionally\n\t * filtered by a selector.\n\t *\n\t * @category Traversing\n\t * @example\n\t *\n\t * ```js\n\t * $('li').eq(0).addBack('.orange').length;\n\t * //=> 2\n\t * ```\n\t *\n\t * @param selector - Selector for the elements to add.\n\t * @returns The combined set.\n\t * @see {@link https://api.jquery.com/addBack/}\n\t */\n\tfunction addBack(selector) {\n\t    return this.prevObject\n\t        ? this.add(selector ? this.prevObject.filter(selector) : this.prevObject)\n\t        : this;\n\t}\n\n\tvar Traversing = /*#__PURE__*/Object.freeze({\n\t\t__proto__: null,\n\t\tfind: find$7,\n\t\tparent: parent,\n\t\tparents: parents,\n\t\tparentsUntil: parentsUntil,\n\t\tclosest: closest,\n\t\tnext: next,\n\t\tnextAll: nextAll,\n\t\tnextUntil: nextUntil,\n\t\tprev: prev,\n\t\tprevAll: prevAll,\n\t\tprevUntil: prevUntil,\n\t\tsiblings: siblings,\n\t\tchildren: children,\n\t\tcontents: contents,\n\t\teach: each,\n\t\tmap: map$a,\n\t\tfilter: filter$6,\n\t\tfilterArray: filterArray,\n\t\tis: is$2,\n\t\tnot: not,\n\t\thas: has$1,\n\t\tfirst: first,\n\t\tlast: last$1,\n\t\teq: eq$1,\n\t\tget: get$9,\n\t\ttoArray: toArray$1,\n\t\tindex: index,\n\t\tslice: slice$8,\n\t\tend: end,\n\t\tadd: add,\n\t\taddBack: addBack\n\t});\n\n\t/**\n\t * Get the parse function with options.\n\t *\n\t * @param parser - The parser function.\n\t * @returns The parse function with options.\n\t */\n\tfunction getParse(parser) {\n\t    /**\n\t     * Parse a HTML string or a node.\n\t     *\n\t     * @param content - The HTML string or node.\n\t     * @param options - The parser options.\n\t     * @param isDocument - If `content` is a document.\n\t     * @param context - The context node in the DOM tree.\n\t     * @returns The parsed document node.\n\t     */\n\t    return function parse(content, options, isDocument$1, context) {\n\t        if (typeof Buffer !== 'undefined' && Buffer.isBuffer(content)) {\n\t            content = content.toString();\n\t        }\n\t        if (typeof content === 'string') {\n\t            return parser(content, options, isDocument$1, context);\n\t        }\n\t        const doc = content;\n\t        if (!Array.isArray(doc) && isDocument(doc)) {\n\t            // If `doc` is already a root, just return it\n\t            return doc;\n\t        }\n\t        // Add conent to new root element\n\t        const root = new Document([]);\n\t        // Update the DOM using the root\n\t        update(doc, root);\n\t        return root;\n\t    };\n\t}\n\t/**\n\t * Update the dom structure, for one changed layer.\n\t *\n\t * @param newChilds - The new children.\n\t * @param parent - The new parent.\n\t * @returns The parent node.\n\t */\n\tfunction update(newChilds, parent) {\n\t    // Normalize\n\t    const arr = Array.isArray(newChilds) ? newChilds : [newChilds];\n\t    // Update parent\n\t    if (parent) {\n\t        parent.children = arr;\n\t    }\n\t    else {\n\t        parent = null;\n\t    }\n\t    // Update neighbors\n\t    for (let i = 0; i < arr.length; i++) {\n\t        const node = arr[i];\n\t        // Cleanly remove existing nodes from their previous structures.\n\t        if (node.parent && node.parent.children !== arr) {\n\t            removeElement(node);\n\t        }\n\t        if (parent) {\n\t            node.prev = arr[i - 1] || null;\n\t            node.next = arr[i + 1] || null;\n\t        }\n\t        else {\n\t            node.prev = node.next = null;\n\t        }\n\t        node.parent = parent;\n\t    }\n\t    return parent;\n\t}\n\n\t/**\n\t * Methods for modifying the DOM structure.\n\t *\n\t * @module cheerio/manipulation\n\t */\n\t/**\n\t * Create an array of nodes, recursing into arrays and parsing strings if necessary.\n\t *\n\t * @private\n\t * @category Manipulation\n\t * @param elem - Elements to make an array of.\n\t * @param clone - Optionally clone nodes.\n\t * @returns The array of nodes.\n\t */\n\tfunction _makeDomArray(elem, clone) {\n\t    if (elem == null) {\n\t        return [];\n\t    }\n\t    if (isCheerio(elem)) {\n\t        return clone ? cloneDom(elem.get()) : elem.get();\n\t    }\n\t    if (Array.isArray(elem)) {\n\t        return elem.reduce((newElems, el) => newElems.concat(this._makeDomArray(el, clone)), []);\n\t    }\n\t    if (typeof elem === 'string') {\n\t        return this._parse(elem, this.options, false, null).children;\n\t    }\n\t    return clone ? cloneDom([elem]) : [elem];\n\t}\n\tfunction _insert(concatenator) {\n\t    return function (...elems) {\n\t        const lastIdx = this.length - 1;\n\t        return domEach(this, (el, i) => {\n\t            if (!hasChildren(el))\n\t                return;\n\t            const domSrc = typeof elems[0] === 'function'\n\t                ? elems[0].call(el, i, this._render(el.children))\n\t                : elems;\n\t            const dom = this._makeDomArray(domSrc, i < lastIdx);\n\t            concatenator(dom, el.children, el);\n\t        });\n\t    };\n\t}\n\t/**\n\t * Modify an array in-place, removing some number of elements and adding new\n\t * elements directly following them.\n\t *\n\t * @private\n\t * @category Manipulation\n\t * @param array - Target array to splice.\n\t * @param spliceIdx - Index at which to begin changing the array.\n\t * @param spliceCount - Number of elements to remove from the array.\n\t * @param newElems - Elements to insert into the array.\n\t * @param parent - The parent of the node.\n\t * @returns The spliced array.\n\t */\n\tfunction uniqueSplice(array, spliceIdx, spliceCount, newElems, parent) {\n\t    var _a, _b;\n\t    const spliceArgs = [\n\t        spliceIdx,\n\t        spliceCount,\n\t        ...newElems,\n\t    ];\n\t    const prev = spliceIdx === 0 ? null : array[spliceIdx - 1];\n\t    const next = spliceIdx + spliceCount >= array.length\n\t        ? null\n\t        : array[spliceIdx + spliceCount];\n\t    /*\n\t     * Before splicing in new elements, ensure they do not already appear in the\n\t     * current array.\n\t     */\n\t    for (let idx = 0; idx < newElems.length; ++idx) {\n\t        const node = newElems[idx];\n\t        const oldParent = node.parent;\n\t        if (oldParent) {\n\t            const oldSiblings = oldParent.children;\n\t            const prevIdx = oldSiblings.indexOf(node);\n\t            if (prevIdx > -1) {\n\t                oldParent.children.splice(prevIdx, 1);\n\t                if (parent === oldParent && spliceIdx > prevIdx) {\n\t                    spliceArgs[0]--;\n\t                }\n\t            }\n\t        }\n\t        node.parent = parent;\n\t        if (node.prev) {\n\t            node.prev.next = (_a = node.next) !== null && _a !== void 0 ? _a : null;\n\t        }\n\t        if (node.next) {\n\t            node.next.prev = (_b = node.prev) !== null && _b !== void 0 ? _b : null;\n\t        }\n\t        node.prev = idx === 0 ? prev : newElems[idx - 1];\n\t        node.next = idx === newElems.length - 1 ? next : newElems[idx + 1];\n\t    }\n\t    if (prev) {\n\t        prev.next = newElems[0];\n\t    }\n\t    if (next) {\n\t        next.prev = newElems[newElems.length - 1];\n\t    }\n\t    return array.splice(...spliceArgs);\n\t}\n\t/**\n\t * Insert every element in the set of matched elements to the end of the target.\n\t *\n\t * @category Manipulation\n\t * @example\n\t *\n\t * ```js\n\t * $('<li class=\"plum\">Plum</li>').appendTo('#fruits');\n\t * $.html();\n\t * //=>  <ul id=\"fruits\">\n\t * //      <li class=\"apple\">Apple</li>\n\t * //      <li class=\"orange\">Orange</li>\n\t * //      <li class=\"pear\">Pear</li>\n\t * //      <li class=\"plum\">Plum</li>\n\t * //    </ul>\n\t * ```\n\t *\n\t * @param target - Element to append elements to.\n\t * @returns The instance itself.\n\t * @see {@link https://api.jquery.com/appendTo/}\n\t */\n\tfunction appendTo(target) {\n\t    const appendTarget = isCheerio(target) ? target : this._make(target);\n\t    appendTarget.append(this);\n\t    return this;\n\t}\n\t/**\n\t * Insert every element in the set of matched elements to the beginning of the target.\n\t *\n\t * @category Manipulation\n\t * @example\n\t *\n\t * ```js\n\t * $('<li class=\"plum\">Plum</li>').prependTo('#fruits');\n\t * $.html();\n\t * //=>  <ul id=\"fruits\">\n\t * //      <li class=\"plum\">Plum</li>\n\t * //      <li class=\"apple\">Apple</li>\n\t * //      <li class=\"orange\">Orange</li>\n\t * //      <li class=\"pear\">Pear</li>\n\t * //    </ul>\n\t * ```\n\t *\n\t * @param target - Element to prepend elements to.\n\t * @returns The instance itself.\n\t * @see {@link https://api.jquery.com/prependTo/}\n\t */\n\tfunction prependTo(target) {\n\t    const prependTarget = isCheerio(target) ? target : this._make(target);\n\t    prependTarget.prepend(this);\n\t    return this;\n\t}\n\t/**\n\t * Inserts content as the _last_ child of each of the selected elements.\n\t *\n\t * @category Manipulation\n\t * @example\n\t *\n\t * ```js\n\t * $('ul').append('<li class=\"plum\">Plum</li>');\n\t * $.html();\n\t * //=>  <ul id=\"fruits\">\n\t * //      <li class=\"apple\">Apple</li>\n\t * //      <li class=\"orange\">Orange</li>\n\t * //      <li class=\"pear\">Pear</li>\n\t * //      <li class=\"plum\">Plum</li>\n\t * //    </ul>\n\t * ```\n\t *\n\t * @see {@link https://api.jquery.com/append/}\n\t */\n\tconst append$1 = _insert((dom, children, parent) => {\n\t    uniqueSplice(children, children.length, 0, dom, parent);\n\t});\n\t/**\n\t * Inserts content as the _first_ child of each of the selected elements.\n\t *\n\t * @category Manipulation\n\t * @example\n\t *\n\t * ```js\n\t * $('ul').prepend('<li class=\"plum\">Plum</li>');\n\t * $.html();\n\t * //=>  <ul id=\"fruits\">\n\t * //      <li class=\"plum\">Plum</li>\n\t * //      <li class=\"apple\">Apple</li>\n\t * //      <li class=\"orange\">Orange</li>\n\t * //      <li class=\"pear\">Pear</li>\n\t * //    </ul>\n\t * ```\n\t *\n\t * @see {@link https://api.jquery.com/prepend/}\n\t */\n\tconst prepend$1 = _insert((dom, children, parent) => {\n\t    uniqueSplice(children, 0, 0, dom, parent);\n\t});\n\tfunction _wrap(insert) {\n\t    return function (wrapper) {\n\t        const lastIdx = this.length - 1;\n\t        const lastParent = this.parents().last();\n\t        for (let i = 0; i < this.length; i++) {\n\t            const el = this[i];\n\t            const wrap = typeof wrapper === 'function'\n\t                ? wrapper.call(el, i, el)\n\t                : typeof wrapper === 'string' && !isHtml(wrapper)\n\t                    ? lastParent.find(wrapper).clone()\n\t                    : wrapper;\n\t            const [wrapperDom] = this._makeDomArray(wrap, i < lastIdx);\n\t            if (!wrapperDom || !hasChildren(wrapperDom))\n\t                continue;\n\t            let elInsertLocation = wrapperDom;\n\t            /*\n\t             * Find the deepest child. Only consider the first tag child of each node\n\t             * (ignore text); stop if no children are found.\n\t             */\n\t            let j = 0;\n\t            while (j < elInsertLocation.children.length) {\n\t                const child = elInsertLocation.children[j];\n\t                if (isTag$1(child)) {\n\t                    elInsertLocation = child;\n\t                    j = 0;\n\t                }\n\t                else {\n\t                    j++;\n\t                }\n\t            }\n\t            insert(el, elInsertLocation, [wrapperDom]);\n\t        }\n\t        return this;\n\t    };\n\t}\n\t/**\n\t * The .wrap() function can take any string or object that could be passed to\n\t * the $() factory function to specify a DOM structure. This structure may be\n\t * nested several levels deep, but should contain only one inmost element. A\n\t * copy of this structure will be wrapped around each of the elements in the set\n\t * of matched elements. This method returns the original set of elements for\n\t * chaining purposes.\n\t *\n\t * @category Manipulation\n\t * @example\n\t *\n\t * ```js\n\t * const redFruit = $('<div class=\"red-fruit\"></div>');\n\t * $('.apple').wrap(redFruit);\n\t *\n\t * //=> <ul id=\"fruits\">\n\t * //     <div class=\"red-fruit\">\n\t * //      <li class=\"apple\">Apple</li>\n\t * //     </div>\n\t * //     <li class=\"orange\">Orange</li>\n\t * //     <li class=\"plum\">Plum</li>\n\t * //   </ul>\n\t *\n\t * const healthy = $('<div class=\"healthy\"></div>');\n\t * $('li').wrap(healthy);\n\t *\n\t * //=> <ul id=\"fruits\">\n\t * //     <div class=\"healthy\">\n\t * //       <li class=\"apple\">Apple</li>\n\t * //     </div>\n\t * //     <div class=\"healthy\">\n\t * //       <li class=\"orange\">Orange</li>\n\t * //     </div>\n\t * //     <div class=\"healthy\">\n\t * //        <li class=\"plum\">Plum</li>\n\t * //     </div>\n\t * //   </ul>\n\t * ```\n\t *\n\t * @param wrapper - The DOM structure to wrap around each element in the selection.\n\t * @see {@link https://api.jquery.com/wrap/}\n\t */\n\tconst wrap$2 = _wrap((el, elInsertLocation, wrapperDom) => {\n\t    const { parent } = el;\n\t    if (!parent)\n\t        return;\n\t    const siblings = parent.children;\n\t    const index = siblings.indexOf(el);\n\t    update([el], elInsertLocation);\n\t    /*\n\t     * The previous operation removed the current element from the `siblings`\n\t     * array, so the `dom` array can be inserted without removing any\n\t     * additional elements.\n\t     */\n\t    uniqueSplice(siblings, index, 0, wrapperDom, parent);\n\t});\n\t/**\n\t * The .wrapInner() function can take any string or object that could be passed\n\t * to the $() factory function to specify a DOM structure. This structure may be\n\t * nested several levels deep, but should contain only one inmost element. The\n\t * structure will be wrapped around the content of each of the elements in the\n\t * set of matched elements.\n\t *\n\t * @category Manipulation\n\t * @example\n\t *\n\t * ```js\n\t * const redFruit = $('<div class=\"red-fruit\"></div>');\n\t * $('.apple').wrapInner(redFruit);\n\t *\n\t * //=> <ul id=\"fruits\">\n\t * //     <li class=\"apple\">\n\t * //       <div class=\"red-fruit\">Apple</div>\n\t * //     </li>\n\t * //     <li class=\"orange\">Orange</li>\n\t * //     <li class=\"pear\">Pear</li>\n\t * //   </ul>\n\t *\n\t * const healthy = $('<div class=\"healthy\"></div>');\n\t * $('li').wrapInner(healthy);\n\t *\n\t * //=> <ul id=\"fruits\">\n\t * //     <li class=\"apple\">\n\t * //       <div class=\"healthy\">Apple</div>\n\t * //     </li>\n\t * //     <li class=\"orange\">\n\t * //       <div class=\"healthy\">Orange</div>\n\t * //     </li>\n\t * //     <li class=\"pear\">\n\t * //       <div class=\"healthy\">Pear</div>\n\t * //     </li>\n\t * //   </ul>\n\t * ```\n\t *\n\t * @param wrapper - The DOM structure to wrap around the content of each element\n\t *   in the selection.\n\t * @returns The instance itself, for chaining.\n\t * @see {@link https://api.jquery.com/wrapInner/}\n\t */\n\tconst wrapInner = _wrap((el, elInsertLocation, wrapperDom) => {\n\t    if (!hasChildren(el))\n\t        return;\n\t    update(el.children, elInsertLocation);\n\t    update(wrapperDom, el);\n\t});\n\t/**\n\t * The .unwrap() function, removes the parents of the set of matched elements\n\t * from the DOM, leaving the matched elements in their place.\n\t *\n\t * @category Manipulation\n\t * @example <caption>without selector</caption>\n\t *\n\t * ```js\n\t * const $ = cheerio.load(\n\t *   '<div id=test>\\n  <div><p>Hello</p></div>\\n  <div><p>World</p></div>\\n</div>'\n\t * );\n\t * $('#test p').unwrap();\n\t *\n\t * //=> <div id=test>\n\t * //     <p>Hello</p>\n\t * //     <p>World</p>\n\t * //   </div>\n\t * ```\n\t *\n\t * @example <caption>with selector</caption>\n\t *\n\t * ```js\n\t * const $ = cheerio.load(\n\t *   '<div id=test>\\n  <p>Hello</p>\\n  <b><p>World</p></b>\\n</div>'\n\t * );\n\t * $('#test p').unwrap('b');\n\t *\n\t * //=> <div id=test>\n\t * //     <p>Hello</p>\n\t * //     <p>World</p>\n\t * //   </div>\n\t * ```\n\t *\n\t * @param selector - A selector to check the parent element against. If an\n\t *   element's parent does not match the selector, the element won't be unwrapped.\n\t * @returns The instance itself, for chaining.\n\t * @see {@link https://api.jquery.com/unwrap/}\n\t */\n\tfunction unwrap(selector) {\n\t    this.parent(selector)\n\t        .not('body')\n\t        .each((_, el) => {\n\t        this._make(el).replaceWith(el.children);\n\t    });\n\t    return this;\n\t}\n\t/**\n\t * The .wrapAll() function can take any string or object that could be passed to\n\t * the $() function to specify a DOM structure. This structure may be nested\n\t * several levels deep, but should contain only one inmost element. The\n\t * structure will be wrapped around all of the elements in the set of matched\n\t * elements, as a single group.\n\t *\n\t * @category Manipulation\n\t * @example <caption>With markup passed to `wrapAll`</caption>\n\t *\n\t * ```js\n\t * const $ = cheerio.load(\n\t *   '<div class=\"container\"><div class=\"inner\">First</div><div class=\"inner\">Second</div></div>'\n\t * );\n\t * $('.inner').wrapAll(\"<div class='new'></div>\");\n\t *\n\t * //=> <div class=\"container\">\n\t * //     <div class='new'>\n\t * //       <div class=\"inner\">First</div>\n\t * //       <div class=\"inner\">Second</div>\n\t * //     </div>\n\t * //   </div>\n\t * ```\n\t *\n\t * @example <caption>With an existing cheerio instance</caption>\n\t *\n\t * ```js\n\t * const $ = cheerio.load(\n\t *   '<span>Span 1</span><strong>Strong</strong><span>Span 2</span>'\n\t * );\n\t * const wrap = $('<div><p><em><b></b></em></p></div>');\n\t * $('span').wrapAll(wrap);\n\t *\n\t * //=> <div>\n\t * //     <p>\n\t * //       <em>\n\t * //         <b>\n\t * //           <span>Span 1</span>\n\t * //           <span>Span 2</span>\n\t * //         </b>\n\t * //       </em>\n\t * //     </p>\n\t * //   </div>\n\t * //   <strong>Strong</strong>\n\t * ```\n\t *\n\t * @param wrapper - The DOM structure to wrap around all matched elements in the\n\t *   selection.\n\t * @returns The instance itself.\n\t * @see {@link https://api.jquery.com/wrapAll/}\n\t */\n\tfunction wrapAll(wrapper) {\n\t    const el = this[0];\n\t    if (el) {\n\t        const wrap = this._make(typeof wrapper === 'function' ? wrapper.call(el, 0, el) : wrapper).insertBefore(el);\n\t        // If html is given as wrapper, wrap may contain text elements\n\t        let elInsertLocation;\n\t        for (let i = 0; i < wrap.length; i++) {\n\t            if (wrap[i].type === 'tag')\n\t                elInsertLocation = wrap[i];\n\t        }\n\t        let j = 0;\n\t        /*\n\t         * Find the deepest child. Only consider the first tag child of each node\n\t         * (ignore text); stop if no children are found.\n\t         */\n\t        while (elInsertLocation && j < elInsertLocation.children.length) {\n\t            const child = elInsertLocation.children[j];\n\t            if (child.type === 'tag') {\n\t                elInsertLocation = child;\n\t                j = 0;\n\t            }\n\t            else {\n\t                j++;\n\t            }\n\t        }\n\t        if (elInsertLocation)\n\t            this._make(elInsertLocation).append(this);\n\t    }\n\t    return this;\n\t}\n\t/* eslint-disable jsdoc/check-param-names*/\n\t/**\n\t * Insert content next to each element in the set of matched elements.\n\t *\n\t * @category Manipulation\n\t * @example\n\t *\n\t * ```js\n\t * $('.apple').after('<li class=\"plum\">Plum</li>');\n\t * $.html();\n\t * //=>  <ul id=\"fruits\">\n\t * //      <li class=\"apple\">Apple</li>\n\t * //      <li class=\"plum\">Plum</li>\n\t * //      <li class=\"orange\">Orange</li>\n\t * //      <li class=\"pear\">Pear</li>\n\t * //    </ul>\n\t * ```\n\t *\n\t * @param content - HTML string, DOM element, array of DOM elements or Cheerio\n\t *   to insert after each element in the set of matched elements.\n\t * @returns The instance itself.\n\t * @see {@link https://api.jquery.com/after/}\n\t */\n\tfunction after(...elems) {\n\t    const lastIdx = this.length - 1;\n\t    return domEach(this, (el, i) => {\n\t        const { parent } = el;\n\t        if (!hasChildren(el) || !parent) {\n\t            return;\n\t        }\n\t        const siblings = parent.children;\n\t        const index = siblings.indexOf(el);\n\t        // If not found, move on\n\t        /* istanbul ignore next */\n\t        if (index < 0)\n\t            return;\n\t        const domSrc = typeof elems[0] === 'function'\n\t            ? elems[0].call(el, i, this._render(el.children))\n\t            : elems;\n\t        const dom = this._makeDomArray(domSrc, i < lastIdx);\n\t        // Add element after `this` element\n\t        uniqueSplice(siblings, index + 1, 0, dom, parent);\n\t    });\n\t}\n\t/* eslint-enable jsdoc/check-param-names*/\n\t/**\n\t * Insert every element in the set of matched elements after the target.\n\t *\n\t * @category Manipulation\n\t * @example\n\t *\n\t * ```js\n\t * $('<li class=\"plum\">Plum</li>').insertAfter('.apple');\n\t * $.html();\n\t * //=>  <ul id=\"fruits\">\n\t * //      <li class=\"apple\">Apple</li>\n\t * //      <li class=\"plum\">Plum</li>\n\t * //      <li class=\"orange\">Orange</li>\n\t * //      <li class=\"pear\">Pear</li>\n\t * //    </ul>\n\t * ```\n\t *\n\t * @param target - Element to insert elements after.\n\t * @returns The set of newly inserted elements.\n\t * @see {@link https://api.jquery.com/insertAfter/}\n\t */\n\tfunction insertAfter(target) {\n\t    if (typeof target === 'string') {\n\t        target = this._make(target);\n\t    }\n\t    this.remove();\n\t    const clones = [];\n\t    this._makeDomArray(target).forEach((el) => {\n\t        const clonedSelf = this.clone().toArray();\n\t        const { parent } = el;\n\t        if (!parent) {\n\t            return;\n\t        }\n\t        const siblings = parent.children;\n\t        const index = siblings.indexOf(el);\n\t        // If not found, move on\n\t        /* istanbul ignore next */\n\t        if (index < 0)\n\t            return;\n\t        // Add cloned `this` element(s) after target element\n\t        uniqueSplice(siblings, index + 1, 0, clonedSelf, parent);\n\t        clones.push(...clonedSelf);\n\t    });\n\t    return this._make(clones);\n\t}\n\t/* eslint-disable jsdoc/check-param-names*/\n\t/**\n\t * Insert content previous to each element in the set of matched elements.\n\t *\n\t * @category Manipulation\n\t * @example\n\t *\n\t * ```js\n\t * $('.apple').before('<li class=\"plum\">Plum</li>');\n\t * $.html();\n\t * //=>  <ul id=\"fruits\">\n\t * //      <li class=\"plum\">Plum</li>\n\t * //      <li class=\"apple\">Apple</li>\n\t * //      <li class=\"orange\">Orange</li>\n\t * //      <li class=\"pear\">Pear</li>\n\t * //    </ul>\n\t * ```\n\t *\n\t * @param content - HTML string, DOM element, array of DOM elements or Cheerio\n\t *   to insert before each element in the set of matched elements.\n\t * @returns The instance itself.\n\t * @see {@link https://api.jquery.com/before/}\n\t */\n\tfunction before(...elems) {\n\t    const lastIdx = this.length - 1;\n\t    return domEach(this, (el, i) => {\n\t        const { parent } = el;\n\t        if (!hasChildren(el) || !parent) {\n\t            return;\n\t        }\n\t        const siblings = parent.children;\n\t        const index = siblings.indexOf(el);\n\t        // If not found, move on\n\t        /* istanbul ignore next */\n\t        if (index < 0)\n\t            return;\n\t        const domSrc = typeof elems[0] === 'function'\n\t            ? elems[0].call(el, i, this._render(el.children))\n\t            : elems;\n\t        const dom = this._makeDomArray(domSrc, i < lastIdx);\n\t        // Add element before `el` element\n\t        uniqueSplice(siblings, index, 0, dom, parent);\n\t    });\n\t}\n\t/* eslint-enable jsdoc/check-param-names*/\n\t/**\n\t * Insert every element in the set of matched elements before the target.\n\t *\n\t * @category Manipulation\n\t * @example\n\t *\n\t * ```js\n\t * $('<li class=\"plum\">Plum</li>').insertBefore('.apple');\n\t * $.html();\n\t * //=>  <ul id=\"fruits\">\n\t * //      <li class=\"plum\">Plum</li>\n\t * //      <li class=\"apple\">Apple</li>\n\t * //      <li class=\"orange\">Orange</li>\n\t * //      <li class=\"pear\">Pear</li>\n\t * //    </ul>\n\t * ```\n\t *\n\t * @param target - Element to insert elements before.\n\t * @returns The set of newly inserted elements.\n\t * @see {@link https://api.jquery.com/insertBefore/}\n\t */\n\tfunction insertBefore(target) {\n\t    const targetArr = this._make(target);\n\t    this.remove();\n\t    const clones = [];\n\t    domEach(targetArr, (el) => {\n\t        const clonedSelf = this.clone().toArray();\n\t        const { parent } = el;\n\t        if (!parent) {\n\t            return;\n\t        }\n\t        const siblings = parent.children;\n\t        const index = siblings.indexOf(el);\n\t        // If not found, move on\n\t        /* istanbul ignore next */\n\t        if (index < 0)\n\t            return;\n\t        // Add cloned `this` element(s) after target element\n\t        uniqueSplice(siblings, index, 0, clonedSelf, parent);\n\t        clones.push(...clonedSelf);\n\t    });\n\t    return this._make(clones);\n\t}\n\t/**\n\t * Removes the set of matched elements from the DOM and all their children.\n\t * `selector` filters the set of matched elements to be removed.\n\t *\n\t * @category Manipulation\n\t * @example\n\t *\n\t * ```js\n\t * $('.pear').remove();\n\t * $.html();\n\t * //=>  <ul id=\"fruits\">\n\t * //      <li class=\"apple\">Apple</li>\n\t * //      <li class=\"orange\">Orange</li>\n\t * //    </ul>\n\t * ```\n\t *\n\t * @param selector - Optional selector for elements to remove.\n\t * @returns The instance itself.\n\t * @see {@link https://api.jquery.com/remove/}\n\t */\n\tfunction remove$1(selector) {\n\t    // Filter if we have selector\n\t    const elems = selector ? this.filter(selector) : this;\n\t    domEach(elems, (el) => {\n\t        removeElement(el);\n\t        el.prev = el.next = el.parent = null;\n\t    });\n\t    return this;\n\t}\n\t/**\n\t * Replaces matched elements with `content`.\n\t *\n\t * @category Manipulation\n\t * @example\n\t *\n\t * ```js\n\t * const plum = $('<li class=\"plum\">Plum</li>');\n\t * $('.pear').replaceWith(plum);\n\t * $.html();\n\t * //=> <ul id=\"fruits\">\n\t * //     <li class=\"apple\">Apple</li>\n\t * //     <li class=\"orange\">Orange</li>\n\t * //     <li class=\"plum\">Plum</li>\n\t * //   </ul>\n\t * ```\n\t *\n\t * @param content - Replacement for matched elements.\n\t * @returns The instance itself.\n\t * @see {@link https://api.jquery.com/replaceWith/}\n\t */\n\tfunction replaceWith(content) {\n\t    return domEach(this, (el, i) => {\n\t        const { parent } = el;\n\t        if (!parent) {\n\t            return;\n\t        }\n\t        const siblings = parent.children;\n\t        const cont = typeof content === 'function' ? content.call(el, i, el) : content;\n\t        const dom = this._makeDomArray(cont);\n\t        /*\n\t         * In the case that `dom` contains nodes that already exist in other\n\t         * structures, ensure those nodes are properly removed.\n\t         */\n\t        update(dom, null);\n\t        const index = siblings.indexOf(el);\n\t        // Completely remove old element\n\t        uniqueSplice(siblings, index, 1, dom, parent);\n\t        if (!dom.includes(el)) {\n\t            el.parent = el.prev = el.next = null;\n\t        }\n\t    });\n\t}\n\t/**\n\t * Empties an element, removing all its children.\n\t *\n\t * @category Manipulation\n\t * @example\n\t *\n\t * ```js\n\t * $('ul').empty();\n\t * $.html();\n\t * //=>  <ul id=\"fruits\"></ul>\n\t * ```\n\t *\n\t * @returns The instance itself.\n\t * @see {@link https://api.jquery.com/empty/}\n\t */\n\tfunction empty$1() {\n\t    return domEach(this, (el) => {\n\t        if (!hasChildren(el))\n\t            return;\n\t        el.children.forEach((child) => {\n\t            child.next = child.prev = child.parent = null;\n\t        });\n\t        el.children.length = 0;\n\t    });\n\t}\n\tfunction html$2(str) {\n\t    if (str === undefined) {\n\t        const el = this[0];\n\t        if (!el || !hasChildren(el))\n\t            return null;\n\t        return this._render(el.children);\n\t    }\n\t    return domEach(this, (el) => {\n\t        if (!hasChildren(el))\n\t            return;\n\t        el.children.forEach((child) => {\n\t            child.next = child.prev = child.parent = null;\n\t        });\n\t        const content = isCheerio(str)\n\t            ? str.toArray()\n\t            : this._parse(`${str}`, this.options, false, el).children;\n\t        update(content, el);\n\t    });\n\t}\n\t/**\n\t * Turns the collection to a string. Alias for `.html()`.\n\t *\n\t * @category Manipulation\n\t * @returns The rendered document.\n\t */\n\tfunction toString$5() {\n\t    return this._render(this);\n\t}\n\tfunction text$1(str) {\n\t    // If `str` is undefined, act as a \"getter\"\n\t    if (str === undefined) {\n\t        return text(this);\n\t    }\n\t    if (typeof str === 'function') {\n\t        // Function support\n\t        return domEach(this, (el, i) => this._make(el).text(str.call(el, i, text([el]))));\n\t    }\n\t    // Append text node to each selected elements\n\t    return domEach(this, (el) => {\n\t        if (!hasChildren(el))\n\t            return;\n\t        el.children.forEach((child) => {\n\t            child.next = child.prev = child.parent = null;\n\t        });\n\t        const textNode = new Text$1(`${str}`);\n\t        update(textNode, el);\n\t    });\n\t}\n\t/**\n\t * Clone the cheerio object.\n\t *\n\t * @category Manipulation\n\t * @example\n\t *\n\t * ```js\n\t * const moreFruit = $('#fruits').clone();\n\t * ```\n\t *\n\t * @returns The cloned object.\n\t * @see {@link https://api.jquery.com/clone/}\n\t */\n\tfunction clone() {\n\t    return this._make(cloneDom(this.get()));\n\t}\n\n\tvar Manipulation = /*#__PURE__*/Object.freeze({\n\t\t__proto__: null,\n\t\t_makeDomArray: _makeDomArray,\n\t\tappendTo: appendTo,\n\t\tprependTo: prependTo,\n\t\tappend: append$1,\n\t\tprepend: prepend$1,\n\t\twrap: wrap$2,\n\t\twrapInner: wrapInner,\n\t\tunwrap: unwrap,\n\t\twrapAll: wrapAll,\n\t\tafter: after,\n\t\tinsertAfter: insertAfter,\n\t\tbefore: before,\n\t\tinsertBefore: insertBefore,\n\t\tremove: remove$1,\n\t\treplaceWith: replaceWith,\n\t\tempty: empty$1,\n\t\thtml: html$2,\n\t\ttoString: toString$5,\n\t\ttext: text$1,\n\t\tclone: clone\n\t});\n\n\t/**\n\t * Set multiple CSS properties for every matched element.\n\t *\n\t * @category CSS\n\t * @param prop - The names of the properties.\n\t * @param val - The new values.\n\t * @returns The instance itself.\n\t * @see {@link https://api.jquery.com/css/}\n\t */\n\tfunction css(prop, val) {\n\t    if ((prop != null && val != null) ||\n\t        // When `prop` is a \"plain\" object\n\t        (typeof prop === 'object' && !Array.isArray(prop))) {\n\t        return domEach(this, (el, i) => {\n\t            if (isTag$1(el)) {\n\t                // `prop` can't be an array here anymore.\n\t                setCss(el, prop, val, i);\n\t            }\n\t        });\n\t    }\n\t    if (this.length === 0) {\n\t        return undefined;\n\t    }\n\t    return getCss(this[0], prop);\n\t}\n\t/**\n\t * Set styles of all elements.\n\t *\n\t * @private\n\t * @param el - Element to set style of.\n\t * @param prop - Name of property.\n\t * @param value - Value to set property to.\n\t * @param idx - Optional index within the selection.\n\t */\n\tfunction setCss(el, prop, value, idx) {\n\t    if (typeof prop === 'string') {\n\t        const styles = getCss(el);\n\t        const val = typeof value === 'function' ? value.call(el, idx, styles[prop]) : value;\n\t        if (val === '') {\n\t            delete styles[prop];\n\t        }\n\t        else if (val != null) {\n\t            styles[prop] = val;\n\t        }\n\t        el.attribs['style'] = stringify$3(styles);\n\t    }\n\t    else if (typeof prop === 'object') {\n\t        Object.keys(prop).forEach((k, i) => {\n\t            setCss(el, k, prop[k], i);\n\t        });\n\t    }\n\t}\n\tfunction getCss(el, prop) {\n\t    if (!el || !isTag$1(el))\n\t        return;\n\t    const styles = parse$2(el.attribs['style']);\n\t    if (typeof prop === 'string') {\n\t        return styles[prop];\n\t    }\n\t    if (Array.isArray(prop)) {\n\t        const newStyles = {};\n\t        prop.forEach((item) => {\n\t            if (styles[item] != null) {\n\t                newStyles[item] = styles[item];\n\t            }\n\t        });\n\t        return newStyles;\n\t    }\n\t    return styles;\n\t}\n\t/**\n\t * Stringify `obj` to styles.\n\t *\n\t * @private\n\t * @category CSS\n\t * @param obj - Object to stringify.\n\t * @returns The serialized styles.\n\t */\n\tfunction stringify$3(obj) {\n\t    return Object.keys(obj).reduce((str, prop) => `${str}${str ? ' ' : ''}${prop}: ${obj[prop]};`, '');\n\t}\n\t/**\n\t * Parse `styles`.\n\t *\n\t * @private\n\t * @category CSS\n\t * @param styles - Styles to be parsed.\n\t * @returns The parsed styles.\n\t */\n\tfunction parse$2(styles) {\n\t    styles = (styles || '').trim();\n\t    if (!styles)\n\t        return {};\n\t    const obj = {};\n\t    let key;\n\t    for (const str of styles.split(';')) {\n\t        const n = str.indexOf(':');\n\t        // If there is no :, or if it is the first/last character, add to the previous item's value\n\t        if (n < 1 || n === str.length - 1) {\n\t            const trimmed = str.trimEnd();\n\t            if (trimmed.length > 0 && key !== undefined) {\n\t                obj[key] += `;${trimmed}`;\n\t            }\n\t        }\n\t        else {\n\t            key = str.slice(0, n).trim();\n\t            obj[key] = str.slice(n + 1).trim();\n\t        }\n\t    }\n\t    return obj;\n\t}\n\n\tvar Css = /*#__PURE__*/Object.freeze({\n\t\t__proto__: null,\n\t\tcss: css\n\t});\n\n\t/*\n\t * https://github.com/jquery/jquery/blob/2.1.3/src/manipulation/var/rcheckableType.js\n\t * https://github.com/jquery/jquery/blob/2.1.3/src/serialize.js\n\t */\n\tconst submittableSelector = 'input,select,textarea,keygen';\n\tconst r20 = /%20/g;\n\tconst rCRLF = /\\r?\\n/g;\n\t/**\n\t * Encode a set of form elements as a string for submission.\n\t *\n\t * @category Forms\n\t * @example\n\t *\n\t * ```js\n\t * $('<form><input name=\"foo\" value=\"bar\" /></form>').serialize();\n\t * //=> 'foo=bar'\n\t * ```\n\t *\n\t * @returns The serialized form.\n\t * @see {@link https://api.jquery.com/serialize/}\n\t */\n\tfunction serialize$1() {\n\t    // Convert form elements into name/value objects\n\t    const arr = this.serializeArray();\n\t    // Serialize each element into a key/value string\n\t    const retArr = arr.map((data) => `${encodeURIComponent(data.name)}=${encodeURIComponent(data.value)}`);\n\t    // Return the resulting serialization\n\t    return retArr.join('&').replace(r20, '+');\n\t}\n\t/**\n\t * Encode a set of form elements as an array of names and values.\n\t *\n\t * @category Forms\n\t * @example\n\t *\n\t * ```js\n\t * $('<form><input name=\"foo\" value=\"bar\" /></form>').serializeArray();\n\t * //=> [ { name: 'foo', value: 'bar' } ]\n\t * ```\n\t *\n\t * @returns The serialized form.\n\t * @see {@link https://api.jquery.com/serializeArray/}\n\t */\n\tfunction serializeArray() {\n\t    // Resolve all form elements from either forms or collections of form elements\n\t    return this.map((_, elem) => {\n\t        const $elem = this._make(elem);\n\t        if (isTag$1(elem) && elem.name === 'form') {\n\t            return $elem.find(submittableSelector).toArray();\n\t        }\n\t        return $elem.filter(submittableSelector).toArray();\n\t    })\n\t        .filter(\n\t    // Verify elements have a name (`attr.name`) and are not disabled (`:enabled`)\n\t    '[name!=\"\"]:enabled' +\n\t        // And cannot be clicked (`[type=submit]`) or are used in `x-www-form-urlencoded` (`[type=file]`)\n\t        ':not(:submit, :button, :image, :reset, :file)' +\n\t        // And are either checked/don't have a checkable state\n\t        ':matches([checked], :not(:checkbox, :radio))'\n\t    // Convert each of the elements to its value(s)\n\t    )\n\t        .map((_, elem) => {\n\t        var _a;\n\t        const $elem = this._make(elem);\n\t        const name = $elem.attr('name'); // We have filtered for elements with a name before.\n\t        // If there is no value set (e.g. `undefined`, `null`), then default value to empty\n\t        const value = (_a = $elem.val()) !== null && _a !== void 0 ? _a : '';\n\t        // If we have an array of values (e.g. `<select multiple>`), return an array of key/value pairs\n\t        if (Array.isArray(value)) {\n\t            return value.map((val) => \n\t            /*\n\t             * We trim replace any line endings (e.g. `\\r` or `\\r\\n` with `\\r\\n`) to guarantee consistency across platforms\n\t             * These can occur inside of `<textarea>'s`\n\t             */\n\t            ({ name, value: val.replace(rCRLF, '\\r\\n') }));\n\t        }\n\t        // Otherwise (e.g. `<input type=\"text\">`, return only one key/value pair\n\t        return { name, value: value.replace(rCRLF, '\\r\\n') };\n\t    })\n\t        .toArray();\n\t}\n\n\tvar Forms = /*#__PURE__*/Object.freeze({\n\t\t__proto__: null,\n\t\tserialize: serialize$1,\n\t\tserializeArray: serializeArray\n\t});\n\n\tclass Cheerio {\n\t    /**\n\t     * Instance of cheerio. Methods are specified in the modules. Usage of this\n\t     * constructor is not recommended. Please use `$.load` instead.\n\t     *\n\t     * @private\n\t     * @param elements - The new selection.\n\t     * @param root - Sets the root node.\n\t     * @param options - Options for the instance.\n\t     */\n\t    constructor(elements, root, options) {\n\t        this.length = 0;\n\t        this.options = options;\n\t        this._root = root;\n\t        if (elements) {\n\t            for (let idx = 0; idx < elements.length; idx++) {\n\t                this[idx] = elements[idx];\n\t            }\n\t            this.length = elements.length;\n\t        }\n\t    }\n\t}\n\t/** Set a signature of the object. */\n\tCheerio.prototype.cheerio = '[cheerio object]';\n\t/*\n\t * Make cheerio an array-like object\n\t */\n\tCheerio.prototype.splice = Array.prototype.splice;\n\t// Support for (const element of $(...)) iteration:\n\tCheerio.prototype[Symbol.iterator] = Array.prototype[Symbol.iterator];\n\t// Plug in the API\n\tObject.assign(Cheerio.prototype, Attributes, Traversing, Manipulation, Css, Forms);\n\n\tfunction getLoad(parse, render) {\n\t    /**\n\t     * Create a querying function, bound to a document created from the provided markup.\n\t     *\n\t     * Note that similar to web browser contexts, this operation may introduce\n\t     * `<html>`, `<head>`, and `<body>` elements; set `isDocument` to `false` to\n\t     * switch to fragment mode and disable this.\n\t     *\n\t     * @param content - Markup to be loaded.\n\t     * @param options - Options for the created instance.\n\t     * @param isDocument - Allows parser to be switched to fragment mode.\n\t     * @returns The loaded document.\n\t     * @see {@link https://cheerio.js.org#loading} for additional usage information.\n\t     */\n\t    return function load(content, options, isDocument = true) {\n\t        if (content == null) {\n\t            throw new Error('cheerio.load() expects a string');\n\t        }\n\t        const internalOpts = { ...defaultOpts, ...flatten(options) };\n\t        const initialRoot = parse(content, internalOpts, isDocument, null);\n\t        /** Create an extended class here, so that extensions only live on one instance. */\n\t        class LoadedCheerio extends Cheerio {\n\t            _make(selector, context) {\n\t                const cheerio = initialize(selector, context);\n\t                cheerio.prevObject = this;\n\t                return cheerio;\n\t            }\n\t            _parse(content, options, isDocument, context) {\n\t                return parse(content, options, isDocument, context);\n\t            }\n\t            _render(dom) {\n\t                return render(dom, this.options);\n\t            }\n\t        }\n\t        function initialize(selector, context, root = initialRoot, opts) {\n\t            // $($)\n\t            if (selector && isCheerio(selector))\n\t                return selector;\n\t            const options = {\n\t                ...internalOpts,\n\t                ...flatten(opts),\n\t            };\n\t            const r = typeof root === 'string'\n\t                ? [parse(root, options, false, null)]\n\t                : 'length' in root\n\t                    ? root\n\t                    : [root];\n\t            const rootInstance = isCheerio(r)\n\t                ? r\n\t                : new LoadedCheerio(r, null, options);\n\t            // Add a cyclic reference, so that calling methods on `_root` never fails.\n\t            rootInstance._root = rootInstance;\n\t            // $(), $(null), $(undefined), $(false)\n\t            if (!selector) {\n\t                return new LoadedCheerio(undefined, rootInstance, options);\n\t            }\n\t            const elements = typeof selector === 'string' && isHtml(selector)\n\t                ? // $(<html>)\n\t                    parse(selector, options, false, null).children\n\t                : isNode(selector)\n\t                    ? // $(dom)\n\t                        [selector]\n\t                    : Array.isArray(selector)\n\t                        ? // $([dom])\n\t                            selector\n\t                        : undefined;\n\t            const instance = new LoadedCheerio(elements, rootInstance, options);\n\t            if (elements) {\n\t                return instance;\n\t            }\n\t            if (typeof selector !== 'string') {\n\t                throw new Error('Unexpected type of selector');\n\t            }\n\t            // We know that our selector is a string now.\n\t            let search = selector;\n\t            const searchContext = !context\n\t                ? // If we don't have a context, maybe we have a root, from loading\n\t                    rootInstance\n\t                : typeof context === 'string'\n\t                    ? isHtml(context)\n\t                        ? // $('li', '<ul>...</ul>')\n\t                            new LoadedCheerio([parse(context, options, false, null)], rootInstance, options)\n\t                        : // $('li', 'ul')\n\t                            ((search = `${context} ${search}`), rootInstance)\n\t                    : isCheerio(context)\n\t                        ? // $('li', $)\n\t                            context\n\t                        : // $('li', node), $('li', [nodes])\n\t                            new LoadedCheerio(Array.isArray(context) ? context : [context], rootInstance, options);\n\t            // If we still don't have a context, return\n\t            if (!searchContext)\n\t                return instance;\n\t            /*\n\t             * #id, .class, tag\n\t             */\n\t            return searchContext.find(search);\n\t        }\n\t        // Add in static methods & properties\n\t        Object.assign(initialize, staticMethods, {\n\t            load,\n\t            // `_root` and `_options` are used in static methods.\n\t            _root: initialRoot,\n\t            _options: internalOpts,\n\t            // Add `fn` for plugins\n\t            fn: LoadedCheerio.prototype,\n\t            // Add the prototype here to maintain `instanceof` behavior.\n\t            prototype: LoadedCheerio.prototype,\n\t        });\n\t        return initialize;\n\t    };\n\t}\n\tfunction isNode(obj) {\n\t    return (!!obj.name ||\n\t        obj.type === 'root' ||\n\t        obj.type === 'text' ||\n\t        obj.type === 'comment');\n\t}\n\n\tconst UNDEFINED_CODE_POINTS = new Set([\n\t    65534, 65535, 131070, 131071, 196606, 196607, 262142, 262143, 327678, 327679, 393214,\n\t    393215, 458750, 458751, 524286, 524287, 589822, 589823, 655358, 655359, 720894,\n\t    720895, 786430, 786431, 851966, 851967, 917502, 917503, 983038, 983039, 1048574,\n\t    1048575, 1114110, 1114111,\n\t]);\n\tconst REPLACEMENT_CHARACTER = '\\uFFFD';\n\tvar CODE_POINTS;\n\t(function (CODE_POINTS) {\n\t    CODE_POINTS[CODE_POINTS[\"EOF\"] = -1] = \"EOF\";\n\t    CODE_POINTS[CODE_POINTS[\"NULL\"] = 0] = \"NULL\";\n\t    CODE_POINTS[CODE_POINTS[\"TABULATION\"] = 9] = \"TABULATION\";\n\t    CODE_POINTS[CODE_POINTS[\"CARRIAGE_RETURN\"] = 13] = \"CARRIAGE_RETURN\";\n\t    CODE_POINTS[CODE_POINTS[\"LINE_FEED\"] = 10] = \"LINE_FEED\";\n\t    CODE_POINTS[CODE_POINTS[\"FORM_FEED\"] = 12] = \"FORM_FEED\";\n\t    CODE_POINTS[CODE_POINTS[\"SPACE\"] = 32] = \"SPACE\";\n\t    CODE_POINTS[CODE_POINTS[\"EXCLAMATION_MARK\"] = 33] = \"EXCLAMATION_MARK\";\n\t    CODE_POINTS[CODE_POINTS[\"QUOTATION_MARK\"] = 34] = \"QUOTATION_MARK\";\n\t    CODE_POINTS[CODE_POINTS[\"NUMBER_SIGN\"] = 35] = \"NUMBER_SIGN\";\n\t    CODE_POINTS[CODE_POINTS[\"AMPERSAND\"] = 38] = \"AMPERSAND\";\n\t    CODE_POINTS[CODE_POINTS[\"APOSTROPHE\"] = 39] = \"APOSTROPHE\";\n\t    CODE_POINTS[CODE_POINTS[\"HYPHEN_MINUS\"] = 45] = \"HYPHEN_MINUS\";\n\t    CODE_POINTS[CODE_POINTS[\"SOLIDUS\"] = 47] = \"SOLIDUS\";\n\t    CODE_POINTS[CODE_POINTS[\"DIGIT_0\"] = 48] = \"DIGIT_0\";\n\t    CODE_POINTS[CODE_POINTS[\"DIGIT_9\"] = 57] = \"DIGIT_9\";\n\t    CODE_POINTS[CODE_POINTS[\"SEMICOLON\"] = 59] = \"SEMICOLON\";\n\t    CODE_POINTS[CODE_POINTS[\"LESS_THAN_SIGN\"] = 60] = \"LESS_THAN_SIGN\";\n\t    CODE_POINTS[CODE_POINTS[\"EQUALS_SIGN\"] = 61] = \"EQUALS_SIGN\";\n\t    CODE_POINTS[CODE_POINTS[\"GREATER_THAN_SIGN\"] = 62] = \"GREATER_THAN_SIGN\";\n\t    CODE_POINTS[CODE_POINTS[\"QUESTION_MARK\"] = 63] = \"QUESTION_MARK\";\n\t    CODE_POINTS[CODE_POINTS[\"LATIN_CAPITAL_A\"] = 65] = \"LATIN_CAPITAL_A\";\n\t    CODE_POINTS[CODE_POINTS[\"LATIN_CAPITAL_F\"] = 70] = \"LATIN_CAPITAL_F\";\n\t    CODE_POINTS[CODE_POINTS[\"LATIN_CAPITAL_X\"] = 88] = \"LATIN_CAPITAL_X\";\n\t    CODE_POINTS[CODE_POINTS[\"LATIN_CAPITAL_Z\"] = 90] = \"LATIN_CAPITAL_Z\";\n\t    CODE_POINTS[CODE_POINTS[\"RIGHT_SQUARE_BRACKET\"] = 93] = \"RIGHT_SQUARE_BRACKET\";\n\t    CODE_POINTS[CODE_POINTS[\"GRAVE_ACCENT\"] = 96] = \"GRAVE_ACCENT\";\n\t    CODE_POINTS[CODE_POINTS[\"LATIN_SMALL_A\"] = 97] = \"LATIN_SMALL_A\";\n\t    CODE_POINTS[CODE_POINTS[\"LATIN_SMALL_F\"] = 102] = \"LATIN_SMALL_F\";\n\t    CODE_POINTS[CODE_POINTS[\"LATIN_SMALL_X\"] = 120] = \"LATIN_SMALL_X\";\n\t    CODE_POINTS[CODE_POINTS[\"LATIN_SMALL_Z\"] = 122] = \"LATIN_SMALL_Z\";\n\t    CODE_POINTS[CODE_POINTS[\"REPLACEMENT_CHARACTER\"] = 65533] = \"REPLACEMENT_CHARACTER\";\n\t})(CODE_POINTS || (CODE_POINTS = {}));\n\tconst SEQUENCES = {\n\t    DASH_DASH: '--',\n\t    CDATA_START: '[CDATA[',\n\t    DOCTYPE: 'doctype',\n\t    SCRIPT: 'script',\n\t    PUBLIC: 'public',\n\t    SYSTEM: 'system',\n\t};\n\t//Surrogates\n\tfunction isSurrogate(cp) {\n\t    return cp >= 55296 && cp <= 57343;\n\t}\n\tfunction isSurrogatePair(cp) {\n\t    return cp >= 56320 && cp <= 57343;\n\t}\n\tfunction getSurrogatePairCodePoint(cp1, cp2) {\n\t    return (cp1 - 55296) * 1024 + 9216 + cp2;\n\t}\n\t//NOTE: excluding NULL and ASCII whitespace\n\tfunction isControlCodePoint(cp) {\n\t    return ((cp !== 0x20 && cp !== 0x0a && cp !== 0x0d && cp !== 0x09 && cp !== 0x0c && cp >= 0x01 && cp <= 0x1f) ||\n\t        (cp >= 0x7f && cp <= 0x9f));\n\t}\n\tfunction isUndefinedCodePoint(cp) {\n\t    return (cp >= 64976 && cp <= 65007) || UNDEFINED_CODE_POINTS.has(cp);\n\t}\n\n\tvar ERR;\n\t(function (ERR) {\n\t    ERR[\"controlCharacterInInputStream\"] = \"control-character-in-input-stream\";\n\t    ERR[\"noncharacterInInputStream\"] = \"noncharacter-in-input-stream\";\n\t    ERR[\"surrogateInInputStream\"] = \"surrogate-in-input-stream\";\n\t    ERR[\"nonVoidHtmlElementStartTagWithTrailingSolidus\"] = \"non-void-html-element-start-tag-with-trailing-solidus\";\n\t    ERR[\"endTagWithAttributes\"] = \"end-tag-with-attributes\";\n\t    ERR[\"endTagWithTrailingSolidus\"] = \"end-tag-with-trailing-solidus\";\n\t    ERR[\"unexpectedSolidusInTag\"] = \"unexpected-solidus-in-tag\";\n\t    ERR[\"unexpectedNullCharacter\"] = \"unexpected-null-character\";\n\t    ERR[\"unexpectedQuestionMarkInsteadOfTagName\"] = \"unexpected-question-mark-instead-of-tag-name\";\n\t    ERR[\"invalidFirstCharacterOfTagName\"] = \"invalid-first-character-of-tag-name\";\n\t    ERR[\"unexpectedEqualsSignBeforeAttributeName\"] = \"unexpected-equals-sign-before-attribute-name\";\n\t    ERR[\"missingEndTagName\"] = \"missing-end-tag-name\";\n\t    ERR[\"unexpectedCharacterInAttributeName\"] = \"unexpected-character-in-attribute-name\";\n\t    ERR[\"unknownNamedCharacterReference\"] = \"unknown-named-character-reference\";\n\t    ERR[\"missingSemicolonAfterCharacterReference\"] = \"missing-semicolon-after-character-reference\";\n\t    ERR[\"unexpectedCharacterAfterDoctypeSystemIdentifier\"] = \"unexpected-character-after-doctype-system-identifier\";\n\t    ERR[\"unexpectedCharacterInUnquotedAttributeValue\"] = \"unexpected-character-in-unquoted-attribute-value\";\n\t    ERR[\"eofBeforeTagName\"] = \"eof-before-tag-name\";\n\t    ERR[\"eofInTag\"] = \"eof-in-tag\";\n\t    ERR[\"missingAttributeValue\"] = \"missing-attribute-value\";\n\t    ERR[\"missingWhitespaceBetweenAttributes\"] = \"missing-whitespace-between-attributes\";\n\t    ERR[\"missingWhitespaceAfterDoctypePublicKeyword\"] = \"missing-whitespace-after-doctype-public-keyword\";\n\t    ERR[\"missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers\"] = \"missing-whitespace-between-doctype-public-and-system-identifiers\";\n\t    ERR[\"missingWhitespaceAfterDoctypeSystemKeyword\"] = \"missing-whitespace-after-doctype-system-keyword\";\n\t    ERR[\"missingQuoteBeforeDoctypePublicIdentifier\"] = \"missing-quote-before-doctype-public-identifier\";\n\t    ERR[\"missingQuoteBeforeDoctypeSystemIdentifier\"] = \"missing-quote-before-doctype-system-identifier\";\n\t    ERR[\"missingDoctypePublicIdentifier\"] = \"missing-doctype-public-identifier\";\n\t    ERR[\"missingDoctypeSystemIdentifier\"] = \"missing-doctype-system-identifier\";\n\t    ERR[\"abruptDoctypePublicIdentifier\"] = \"abrupt-doctype-public-identifier\";\n\t    ERR[\"abruptDoctypeSystemIdentifier\"] = \"abrupt-doctype-system-identifier\";\n\t    ERR[\"cdataInHtmlContent\"] = \"cdata-in-html-content\";\n\t    ERR[\"incorrectlyOpenedComment\"] = \"incorrectly-opened-comment\";\n\t    ERR[\"eofInScriptHtmlCommentLikeText\"] = \"eof-in-script-html-comment-like-text\";\n\t    ERR[\"eofInDoctype\"] = \"eof-in-doctype\";\n\t    ERR[\"nestedComment\"] = \"nested-comment\";\n\t    ERR[\"abruptClosingOfEmptyComment\"] = \"abrupt-closing-of-empty-comment\";\n\t    ERR[\"eofInComment\"] = \"eof-in-comment\";\n\t    ERR[\"incorrectlyClosedComment\"] = \"incorrectly-closed-comment\";\n\t    ERR[\"eofInCdata\"] = \"eof-in-cdata\";\n\t    ERR[\"absenceOfDigitsInNumericCharacterReference\"] = \"absence-of-digits-in-numeric-character-reference\";\n\t    ERR[\"nullCharacterReference\"] = \"null-character-reference\";\n\t    ERR[\"surrogateCharacterReference\"] = \"surrogate-character-reference\";\n\t    ERR[\"characterReferenceOutsideUnicodeRange\"] = \"character-reference-outside-unicode-range\";\n\t    ERR[\"controlCharacterReference\"] = \"control-character-reference\";\n\t    ERR[\"noncharacterCharacterReference\"] = \"noncharacter-character-reference\";\n\t    ERR[\"missingWhitespaceBeforeDoctypeName\"] = \"missing-whitespace-before-doctype-name\";\n\t    ERR[\"missingDoctypeName\"] = \"missing-doctype-name\";\n\t    ERR[\"invalidCharacterSequenceAfterDoctypeName\"] = \"invalid-character-sequence-after-doctype-name\";\n\t    ERR[\"duplicateAttribute\"] = \"duplicate-attribute\";\n\t    ERR[\"nonConformingDoctype\"] = \"non-conforming-doctype\";\n\t    ERR[\"missingDoctype\"] = \"missing-doctype\";\n\t    ERR[\"misplacedDoctype\"] = \"misplaced-doctype\";\n\t    ERR[\"endTagWithoutMatchingOpenElement\"] = \"end-tag-without-matching-open-element\";\n\t    ERR[\"closingOfElementWithOpenChildElements\"] = \"closing-of-element-with-open-child-elements\";\n\t    ERR[\"disallowedContentInNoscriptInHead\"] = \"disallowed-content-in-noscript-in-head\";\n\t    ERR[\"openElementsLeftAfterEof\"] = \"open-elements-left-after-eof\";\n\t    ERR[\"abandonedHeadElementChild\"] = \"abandoned-head-element-child\";\n\t    ERR[\"misplacedStartTagForHeadElement\"] = \"misplaced-start-tag-for-head-element\";\n\t    ERR[\"nestedNoscriptInHead\"] = \"nested-noscript-in-head\";\n\t    ERR[\"eofInElementThatCanContainOnlyText\"] = \"eof-in-element-that-can-contain-only-text\";\n\t})(ERR || (ERR = {}));\n\n\t//Const\n\tconst DEFAULT_BUFFER_WATERLINE = 1 << 16;\n\t//Preprocessor\n\t//NOTE: HTML input preprocessing\n\t//(see: http://www.whatwg.org/specs/web-apps/current-work/multipage/parsing.html#preprocessing-the-input-stream)\n\tclass Preprocessor {\n\t    constructor(handler) {\n\t        this.handler = handler;\n\t        this.html = '';\n\t        this.pos = -1;\n\t        // NOTE: Initial `lastGapPos` is -2, to ensure `col` on initialisation is 0\n\t        this.lastGapPos = -2;\n\t        this.gapStack = [];\n\t        this.skipNextNewLine = false;\n\t        this.lastChunkWritten = false;\n\t        this.endOfChunkHit = false;\n\t        this.bufferWaterline = DEFAULT_BUFFER_WATERLINE;\n\t        this.isEol = false;\n\t        this.lineStartPos = 0;\n\t        this.droppedBufferSize = 0;\n\t        this.line = 1;\n\t        //NOTE: avoid reporting errors twice on advance/retreat\n\t        this.lastErrOffset = -1;\n\t    }\n\t    /** The column on the current line. If we just saw a gap (eg. a surrogate pair), return the index before. */\n\t    get col() {\n\t        return this.pos - this.lineStartPos + Number(this.lastGapPos !== this.pos);\n\t    }\n\t    get offset() {\n\t        return this.droppedBufferSize + this.pos;\n\t    }\n\t    getError(code) {\n\t        const { line, col, offset } = this;\n\t        return {\n\t            code,\n\t            startLine: line,\n\t            endLine: line,\n\t            startCol: col,\n\t            endCol: col,\n\t            startOffset: offset,\n\t            endOffset: offset,\n\t        };\n\t    }\n\t    _err(code) {\n\t        if (this.handler.onParseError && this.lastErrOffset !== this.offset) {\n\t            this.lastErrOffset = this.offset;\n\t            this.handler.onParseError(this.getError(code));\n\t        }\n\t    }\n\t    _addGap() {\n\t        this.gapStack.push(this.lastGapPos);\n\t        this.lastGapPos = this.pos;\n\t    }\n\t    _processSurrogate(cp) {\n\t        //NOTE: try to peek a surrogate pair\n\t        if (this.pos !== this.html.length - 1) {\n\t            const nextCp = this.html.charCodeAt(this.pos + 1);\n\t            if (isSurrogatePair(nextCp)) {\n\t                //NOTE: we have a surrogate pair. Peek pair character and recalculate code point.\n\t                this.pos++;\n\t                //NOTE: add a gap that should be avoided during retreat\n\t                this._addGap();\n\t                return getSurrogatePairCodePoint(cp, nextCp);\n\t            }\n\t        }\n\t        //NOTE: we are at the end of a chunk, therefore we can't infer the surrogate pair yet.\n\t        else if (!this.lastChunkWritten) {\n\t            this.endOfChunkHit = true;\n\t            return CODE_POINTS.EOF;\n\t        }\n\t        //NOTE: isolated surrogate\n\t        this._err(ERR.surrogateInInputStream);\n\t        return cp;\n\t    }\n\t    willDropParsedChunk() {\n\t        return this.pos > this.bufferWaterline;\n\t    }\n\t    dropParsedChunk() {\n\t        if (this.willDropParsedChunk()) {\n\t            this.html = this.html.substring(this.pos);\n\t            this.lineStartPos -= this.pos;\n\t            this.droppedBufferSize += this.pos;\n\t            this.pos = 0;\n\t            this.lastGapPos = -2;\n\t            this.gapStack.length = 0;\n\t        }\n\t    }\n\t    write(chunk, isLastChunk) {\n\t        if (this.html.length > 0) {\n\t            this.html += chunk;\n\t        }\n\t        else {\n\t            this.html = chunk;\n\t        }\n\t        this.endOfChunkHit = false;\n\t        this.lastChunkWritten = isLastChunk;\n\t    }\n\t    insertHtmlAtCurrentPos(chunk) {\n\t        this.html = this.html.substring(0, this.pos + 1) + chunk + this.html.substring(this.pos + 1);\n\t        this.endOfChunkHit = false;\n\t    }\n\t    startsWith(pattern, caseSensitive) {\n\t        // Check if our buffer has enough characters\n\t        if (this.pos + pattern.length > this.html.length) {\n\t            this.endOfChunkHit = !this.lastChunkWritten;\n\t            return false;\n\t        }\n\t        if (caseSensitive) {\n\t            return this.html.startsWith(pattern, this.pos);\n\t        }\n\t        for (let i = 0; i < pattern.length; i++) {\n\t            const cp = this.html.charCodeAt(this.pos + i) | 0x20;\n\t            if (cp !== pattern.charCodeAt(i)) {\n\t                return false;\n\t            }\n\t        }\n\t        return true;\n\t    }\n\t    peek(offset) {\n\t        const pos = this.pos + offset;\n\t        if (pos >= this.html.length) {\n\t            this.endOfChunkHit = !this.lastChunkWritten;\n\t            return CODE_POINTS.EOF;\n\t        }\n\t        return this.html.charCodeAt(pos);\n\t    }\n\t    advance() {\n\t        this.pos++;\n\t        //NOTE: LF should be in the last column of the line\n\t        if (this.isEol) {\n\t            this.isEol = false;\n\t            this.line++;\n\t            this.lineStartPos = this.pos;\n\t        }\n\t        if (this.pos >= this.html.length) {\n\t            this.endOfChunkHit = !this.lastChunkWritten;\n\t            return CODE_POINTS.EOF;\n\t        }\n\t        let cp = this.html.charCodeAt(this.pos);\n\t        //NOTE: all U+000D CARRIAGE RETURN (CR) characters must be converted to U+000A LINE FEED (LF) characters\n\t        if (cp === CODE_POINTS.CARRIAGE_RETURN) {\n\t            this.isEol = true;\n\t            this.skipNextNewLine = true;\n\t            return CODE_POINTS.LINE_FEED;\n\t        }\n\t        //NOTE: any U+000A LINE FEED (LF) characters that immediately follow a U+000D CARRIAGE RETURN (CR) character\n\t        //must be ignored.\n\t        if (cp === CODE_POINTS.LINE_FEED) {\n\t            this.isEol = true;\n\t            if (this.skipNextNewLine) {\n\t                // `line` will be bumped again in the recursive call.\n\t                this.line--;\n\t                this.skipNextNewLine = false;\n\t                this._addGap();\n\t                return this.advance();\n\t            }\n\t        }\n\t        this.skipNextNewLine = false;\n\t        if (isSurrogate(cp)) {\n\t            cp = this._processSurrogate(cp);\n\t        }\n\t        //OPTIMIZATION: first check if code point is in the common allowed\n\t        //range (ASCII alphanumeric, whitespaces, big chunk of BMP)\n\t        //before going into detailed performance cost validation.\n\t        const isCommonValidRange = this.handler.onParseError === null ||\n\t            (cp > 0x1f && cp < 0x7f) ||\n\t            cp === CODE_POINTS.LINE_FEED ||\n\t            cp === CODE_POINTS.CARRIAGE_RETURN ||\n\t            (cp > 0x9f && cp < 64976);\n\t        if (!isCommonValidRange) {\n\t            this._checkForProblematicCharacters(cp);\n\t        }\n\t        return cp;\n\t    }\n\t    _checkForProblematicCharacters(cp) {\n\t        if (isControlCodePoint(cp)) {\n\t            this._err(ERR.controlCharacterInInputStream);\n\t        }\n\t        else if (isUndefinedCodePoint(cp)) {\n\t            this._err(ERR.noncharacterInInputStream);\n\t        }\n\t    }\n\t    retreat(count) {\n\t        this.pos -= count;\n\t        while (this.pos < this.lastGapPos) {\n\t            this.lastGapPos = this.gapStack.pop();\n\t            this.pos--;\n\t        }\n\t        this.isEol = false;\n\t    }\n\t}\n\n\tvar TokenType;\n\t(function (TokenType) {\n\t    TokenType[TokenType[\"CHARACTER\"] = 0] = \"CHARACTER\";\n\t    TokenType[TokenType[\"NULL_CHARACTER\"] = 1] = \"NULL_CHARACTER\";\n\t    TokenType[TokenType[\"WHITESPACE_CHARACTER\"] = 2] = \"WHITESPACE_CHARACTER\";\n\t    TokenType[TokenType[\"START_TAG\"] = 3] = \"START_TAG\";\n\t    TokenType[TokenType[\"END_TAG\"] = 4] = \"END_TAG\";\n\t    TokenType[TokenType[\"COMMENT\"] = 5] = \"COMMENT\";\n\t    TokenType[TokenType[\"DOCTYPE\"] = 6] = \"DOCTYPE\";\n\t    TokenType[TokenType[\"EOF\"] = 7] = \"EOF\";\n\t    TokenType[TokenType[\"HIBERNATION\"] = 8] = \"HIBERNATION\";\n\t})(TokenType || (TokenType = {}));\n\tfunction getTokenAttr(token, attrName) {\n\t    for (let i = token.attrs.length - 1; i >= 0; i--) {\n\t        if (token.attrs[i].name === attrName) {\n\t            return token.attrs[i].value;\n\t        }\n\t    }\n\t    return null;\n\t}\n\n\tvar decodeDataHtml = createCommonjsModule(function (module, exports) {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\t// Generated using scripts/write-decode-map.ts\n\t// prettier-ignore\n\texports.default = new Uint16Array([7489, 60, 213, 305, 650, 1181, 1403, 1488, 1653, 1758, 1954, 2006, 2063, 2634, 2705, 3489, 3693, 3849, 3878, 4298, 4648, 4833, 5141, 5277, 5315, 5343, 5413, 0, 0, 0, 0, 0, 0, 5483, 5837, 6541, 7186, 7645, 8062, 8288, 8624, 8845, 9152, 9211, 9282, 10276, 10514, 11528, 11848, 12238, 12310, 12986, 13881, 14252, 14590, 14888, 14961, 15072, 15150, 2048, 69, 77, 97, 98, 99, 102, 103, 108, 109, 110, 111, 112, 114, 115, 116, 117, 92, 98, 102, 109, 115, 127, 132, 139, 144, 149, 152, 166, 179, 185, 200, 207, 108, 105, 103, 32827, 198, 16582, 80, 32827, 38, 16422, 99, 117, 116, 101, 32827, 193, 16577, 114, 101, 118, 101, 59, 16642, 256, 105, 121, 120, 125, 114, 99, 32827, 194, 16578, 59, 17424, 114, 59, 49152, 55349, 56580, 114, 97, 118, 101, 32827, 192, 16576, 112, 104, 97, 59, 17297, 97, 99, 114, 59, 16640, 100, 59, 27219, 256, 103, 112, 157, 161, 111, 110, 59, 16644, 102, 59, 49152, 55349, 56632, 112, 108, 121, 70, 117, 110, 99, 116, 105, 111, 110, 59, 24673, 105, 110, 103, 32827, 197, 16581, 256, 99, 115, 190, 195, 114, 59, 49152, 55349, 56476, 105, 103, 110, 59, 25172, 105, 108, 100, 101, 32827, 195, 16579, 109, 108, 32827, 196, 16580, 1024, 97, 99, 101, 102, 111, 114, 115, 117, 229, 251, 254, 279, 284, 290, 295, 298, 256, 99, 114, 234, 242, 107, 115, 108, 97, 115, 104, 59, 25110, 374, 246, 248, 59, 27367, 101, 100, 59, 25350, 121, 59, 17425, 384, 99, 114, 116, 261, 267, 276, 97, 117, 115, 101, 59, 25141, 110, 111, 117, 108, 108, 105, 115, 59, 24876, 97, 59, 17298, 114, 59, 49152, 55349, 56581, 112, 102, 59, 49152, 55349, 56633, 101, 118, 101, 59, 17112, 99, 242, 275, 109, 112, 101, 113, 59, 25166, 1792, 72, 79, 97, 99, 100, 101, 102, 104, 105, 108, 111, 114, 115, 117, 333, 337, 342, 384, 414, 418, 437, 439, 442, 476, 533, 627, 632, 638, 99, 121, 59, 17447, 80, 89, 32827, 169, 16553, 384, 99, 112, 121, 349, 354, 378, 117, 116, 101, 59, 16646, 256, 59, 105, 359, 360, 25298, 116, 97, 108, 68, 105, 102, 102, 101, 114, 101, 110, 116, 105, 97, 108, 68, 59, 24901, 108, 101, 121, 115, 59, 24877, 512, 97, 101, 105, 111, 393, 398, 404, 408, 114, 111, 110, 59, 16652, 100, 105, 108, 32827, 199, 16583, 114, 99, 59, 16648, 110, 105, 110, 116, 59, 25136, 111, 116, 59, 16650, 256, 100, 110, 423, 429, 105, 108, 108, 97, 59, 16568, 116, 101, 114, 68, 111, 116, 59, 16567, 242, 383, 105, 59, 17319, 114, 99, 108, 101, 512, 68, 77, 80, 84, 455, 459, 465, 470, 111, 116, 59, 25241, 105, 110, 117, 115, 59, 25238, 108, 117, 115, 59, 25237, 105, 109, 101, 115, 59, 25239, 111, 256, 99, 115, 482, 504, 107, 119, 105, 115, 101, 67, 111, 110, 116, 111, 117, 114, 73, 110, 116, 101, 103, 114, 97, 108, 59, 25138, 101, 67, 117, 114, 108, 121, 256, 68, 81, 515, 527, 111, 117, 98, 108, 101, 81, 117, 111, 116, 101, 59, 24605, 117, 111, 116, 101, 59, 24601, 512, 108, 110, 112, 117, 542, 552, 583, 597, 111, 110, 256, 59, 101, 549, 550, 25143, 59, 27252, 384, 103, 105, 116, 559, 566, 570, 114, 117, 101, 110, 116, 59, 25185, 110, 116, 59, 25135, 111, 117, 114, 73, 110, 116, 101, 103, 114, 97, 108, 59, 25134, 256, 102, 114, 588, 590, 59, 24834, 111, 100, 117, 99, 116, 59, 25104, 110, 116, 101, 114, 67, 108, 111, 99, 107, 119, 105, 115, 101, 67, 111, 110, 116, 111, 117, 114, 73, 110, 116, 101, 103, 114, 97, 108, 59, 25139, 111, 115, 115, 59, 27183, 99, 114, 59, 49152, 55349, 56478, 112, 256, 59, 67, 644, 645, 25299, 97, 112, 59, 25165, 1408, 68, 74, 83, 90, 97, 99, 101, 102, 105, 111, 115, 672, 684, 688, 692, 696, 715, 727, 737, 742, 819, 1165, 256, 59, 111, 377, 677, 116, 114, 97, 104, 100, 59, 26897, 99, 121, 59, 17410, 99, 121, 59, 17413, 99, 121, 59, 17423, 384, 103, 114, 115, 703, 708, 711, 103, 101, 114, 59, 24609, 114, 59, 24993, 104, 118, 59, 27364, 256, 97, 121, 720, 725, 114, 111, 110, 59, 16654, 59, 17428, 108, 256, 59, 116, 733, 734, 25095, 97, 59, 17300, 114, 59, 49152, 55349, 56583, 256, 97, 102, 747, 807, 256, 99, 109, 752, 802, 114, 105, 116, 105, 99, 97, 108, 512, 65, 68, 71, 84, 768, 774, 790, 796, 99, 117, 116, 101, 59, 16564, 111, 372, 779, 781, 59, 17113, 98, 108, 101, 65, 99, 117, 116, 101, 59, 17117, 114, 97, 118, 101, 59, 16480, 105, 108, 100, 101, 59, 17116, 111, 110, 100, 59, 25284, 102, 101, 114, 101, 110, 116, 105, 97, 108, 68, 59, 24902, 1136, 829, 0, 0, 0, 834, 852, 0, 1029, 102, 59, 49152, 55349, 56635, 384, 59, 68, 69, 840, 841, 845, 16552, 111, 116, 59, 24796, 113, 117, 97, 108, 59, 25168, 98, 108, 101, 768, 67, 68, 76, 82, 85, 86, 867, 882, 898, 975, 994, 1016, 111, 110, 116, 111, 117, 114, 73, 110, 116, 101, 103, 114, 97, 236, 569, 111, 628, 889, 0, 0, 891, 187, 841, 110, 65, 114, 114, 111, 119, 59, 25043, 256, 101, 111, 903, 932, 102, 116, 384, 65, 82, 84, 912, 918, 929, 114, 114, 111, 119, 59, 25040, 105, 103, 104, 116, 65, 114, 114, 111, 119, 59, 25044, 101, 229, 714, 110, 103, 256, 76, 82, 939, 964, 101, 102, 116, 256, 65, 82, 947, 953, 114, 114, 111, 119, 59, 26616, 105, 103, 104, 116, 65, 114, 114, 111, 119, 59, 26618, 105, 103, 104, 116, 65, 114, 114, 111, 119, 59, 26617, 105, 103, 104, 116, 256, 65, 84, 984, 990, 114, 114, 111, 119, 59, 25042, 101, 101, 59, 25256, 112, 577, 1001, 0, 0, 1007, 114, 114, 111, 119, 59, 25041, 111, 119, 110, 65, 114, 114, 111, 119, 59, 25045, 101, 114, 116, 105, 99, 97, 108, 66, 97, 114, 59, 25125, 110, 768, 65, 66, 76, 82, 84, 97, 1042, 1066, 1072, 1118, 1151, 892, 114, 114, 111, 119, 384, 59, 66, 85, 1053, 1054, 1058, 24979, 97, 114, 59, 26899, 112, 65, 114, 114, 111, 119, 59, 25077, 114, 101, 118, 101, 59, 17169, 101, 102, 116, 722, 1082, 0, 1094, 0, 1104, 105, 103, 104, 116, 86, 101, 99, 116, 111, 114, 59, 26960, 101, 101, 86, 101, 99, 116, 111, 114, 59, 26974, 101, 99, 116, 111, 114, 256, 59, 66, 1113, 1114, 25021, 97, 114, 59, 26966, 105, 103, 104, 116, 468, 1127, 0, 1137, 101, 101, 86, 101, 99, 116, 111, 114, 59, 26975, 101, 99, 116, 111, 114, 256, 59, 66, 1146, 1147, 25025, 97, 114, 59, 26967, 101, 101, 256, 59, 65, 1158, 1159, 25252, 114, 114, 111, 119, 59, 24999, 256, 99, 116, 1170, 1175, 114, 59, 49152, 55349, 56479, 114, 111, 107, 59, 16656, 2048, 78, 84, 97, 99, 100, 102, 103, 108, 109, 111, 112, 113, 115, 116, 117, 120, 1213, 1216, 1220, 1227, 1246, 1250, 1255, 1262, 1269, 1313, 1327, 1334, 1362, 1373, 1376, 1381, 71, 59, 16714, 72, 32827, 208, 16592, 99, 117, 116, 101, 32827, 201, 16585, 384, 97, 105, 121, 1234, 1239, 1244, 114, 111, 110, 59, 16666, 114, 99, 32827, 202, 16586, 59, 17453, 111, 116, 59, 16662, 114, 59, 49152, 55349, 56584, 114, 97, 118, 101, 32827, 200, 16584, 101, 109, 101, 110, 116, 59, 25096, 256, 97, 112, 1274, 1278, 99, 114, 59, 16658, 116, 121, 595, 1286, 0, 0, 1298, 109, 97, 108, 108, 83, 113, 117, 97, 114, 101, 59, 26107, 101, 114, 121, 83, 109, 97, 108, 108, 83, 113, 117, 97, 114, 101, 59, 26027, 256, 103, 112, 1318, 1322, 111, 110, 59, 16664, 102, 59, 49152, 55349, 56636, 115, 105, 108, 111, 110, 59, 17301, 117, 256, 97, 105, 1340, 1353, 108, 256, 59, 84, 1346, 1347, 27253, 105, 108, 100, 101, 59, 25154, 108, 105, 98, 114, 105, 117, 109, 59, 25036, 256, 99, 105, 1367, 1370, 114, 59, 24880, 109, 59, 27251, 97, 59, 17303, 109, 108, 32827, 203, 16587, 256, 105, 112, 1386, 1391, 115, 116, 115, 59, 25091, 111, 110, 101, 110, 116, 105, 97, 108, 69, 59, 24903, 640, 99, 102, 105, 111, 115, 1413, 1416, 1421, 1458, 1484, 121, 59, 17444, 114, 59, 49152, 55349, 56585, 108, 108, 101, 100, 595, 1431, 0, 0, 1443, 109, 97, 108, 108, 83, 113, 117, 97, 114, 101, 59, 26108, 101, 114, 121, 83, 109, 97, 108, 108, 83, 113, 117, 97, 114, 101, 59, 26026, 880, 1466, 0, 1471, 0, 0, 1476, 102, 59, 49152, 55349, 56637, 65, 108, 108, 59, 25088, 114, 105, 101, 114, 116, 114, 102, 59, 24881, 99, 242, 1483, 1536, 74, 84, 97, 98, 99, 100, 102, 103, 111, 114, 115, 116, 1512, 1516, 1519, 1530, 1536, 1554, 1558, 1563, 1565, 1571, 1644, 1650, 99, 121, 59, 17411, 32827, 62, 16446, 109, 109, 97, 256, 59, 100, 1527, 1528, 17299, 59, 17372, 114, 101, 118, 101, 59, 16670, 384, 101, 105, 121, 1543, 1548, 1552, 100, 105, 108, 59, 16674, 114, 99, 59, 16668, 59, 17427, 111, 116, 59, 16672, 114, 59, 49152, 55349, 56586, 59, 25305, 112, 102, 59, 49152, 55349, 56638, 101, 97, 116, 101, 114, 768, 69, 70, 71, 76, 83, 84, 1589, 1604, 1614, 1622, 1627, 1638, 113, 117, 97, 108, 256, 59, 76, 1598, 1599, 25189, 101, 115, 115, 59, 25307, 117, 108, 108, 69, 113, 117, 97, 108, 59, 25191, 114, 101, 97, 116, 101, 114, 59, 27298, 101, 115, 115, 59, 25207, 108, 97, 110, 116, 69, 113, 117, 97, 108, 59, 27262, 105, 108, 100, 101, 59, 25203, 99, 114, 59, 49152, 55349, 56482, 59, 25195, 1024, 65, 97, 99, 102, 105, 111, 115, 117, 1669, 1675, 1686, 1691, 1694, 1706, 1726, 1738, 82, 68, 99, 121, 59, 17450, 256, 99, 116, 1680, 1684, 101, 107, 59, 17095, 59, 16478, 105, 114, 99, 59, 16676, 114, 59, 24844, 108, 98, 101, 114, 116, 83, 112, 97, 99, 101, 59, 24843, 496, 1711, 0, 1714, 102, 59, 24845, 105, 122, 111, 110, 116, 97, 108, 76, 105, 110, 101, 59, 25856, 256, 99, 116, 1731, 1733, 242, 1705, 114, 111, 107, 59, 16678, 109, 112, 324, 1744, 1752, 111, 119, 110, 72, 117, 109, 240, 303, 113, 117, 97, 108, 59, 25167, 1792, 69, 74, 79, 97, 99, 100, 102, 103, 109, 110, 111, 115, 116, 117, 1786, 1790, 1795, 1799, 1806, 1818, 1822, 1825, 1832, 1860, 1912, 1931, 1935, 1941, 99, 121, 59, 17429, 108, 105, 103, 59, 16690, 99, 121, 59, 17409, 99, 117, 116, 101, 32827, 205, 16589, 256, 105, 121, 1811, 1816, 114, 99, 32827, 206, 16590, 59, 17432, 111, 116, 59, 16688, 114, 59, 24849, 114, 97, 118, 101, 32827, 204, 16588, 384, 59, 97, 112, 1824, 1839, 1855, 256, 99, 103, 1844, 1847, 114, 59, 16682, 105, 110, 97, 114, 121, 73, 59, 24904, 108, 105, 101, 243, 989, 500, 1865, 0, 1890, 256, 59, 101, 1869, 1870, 25132, 256, 103, 114, 1875, 1880, 114, 97, 108, 59, 25131, 115, 101, 99, 116, 105, 111, 110, 59, 25282, 105, 115, 105, 98, 108, 101, 256, 67, 84, 1900, 1906, 111, 109, 109, 97, 59, 24675, 105, 109, 101, 115, 59, 24674, 384, 103, 112, 116, 1919, 1923, 1928, 111, 110, 59, 16686, 102, 59, 49152, 55349, 56640, 97, 59, 17305, 99, 114, 59, 24848, 105, 108, 100, 101, 59, 16680, 491, 1946, 0, 1950, 99, 121, 59, 17414, 108, 32827, 207, 16591, 640, 99, 102, 111, 115, 117, 1964, 1975, 1980, 1986, 2000, 256, 105, 121, 1969, 1973, 114, 99, 59, 16692, 59, 17433, 114, 59, 49152, 55349, 56589, 112, 102, 59, 49152, 55349, 56641, 483, 1991, 0, 1996, 114, 59, 49152, 55349, 56485, 114, 99, 121, 59, 17416, 107, 99, 121, 59, 17412, 896, 72, 74, 97, 99, 102, 111, 115, 2020, 2024, 2028, 2033, 2045, 2050, 2056, 99, 121, 59, 17445, 99, 121, 59, 17420, 112, 112, 97, 59, 17306, 256, 101, 121, 2038, 2043, 100, 105, 108, 59, 16694, 59, 17434, 114, 59, 49152, 55349, 56590, 112, 102, 59, 49152, 55349, 56642, 99, 114, 59, 49152, 55349, 56486, 1408, 74, 84, 97, 99, 101, 102, 108, 109, 111, 115, 116, 2085, 2089, 2092, 2128, 2147, 2483, 2488, 2503, 2509, 2615, 2631, 99, 121, 59, 17417, 32827, 60, 16444, 640, 99, 109, 110, 112, 114, 2103, 2108, 2113, 2116, 2125, 117, 116, 101, 59, 16697, 98, 100, 97, 59, 17307, 103, 59, 26602, 108, 97, 99, 101, 116, 114, 102, 59, 24850, 114, 59, 24990, 384, 97, 101, 121, 2135, 2140, 2145, 114, 111, 110, 59, 16701, 100, 105, 108, 59, 16699, 59, 17435, 256, 102, 115, 2152, 2416, 116, 1280, 65, 67, 68, 70, 82, 84, 85, 86, 97, 114, 2174, 2217, 2225, 2272, 2278, 2300, 2351, 2395, 912, 2410, 256, 110, 114, 2179, 2191, 103, 108, 101, 66, 114, 97, 99, 107, 101, 116, 59, 26600, 114, 111, 119, 384, 59, 66, 82, 2201, 2202, 2206, 24976, 97, 114, 59, 25060, 105, 103, 104, 116, 65, 114, 114, 111, 119, 59, 25030, 101, 105, 108, 105, 110, 103, 59, 25352, 111, 501, 2231, 0, 2243, 98, 108, 101, 66, 114, 97, 99, 107, 101, 116, 59, 26598, 110, 468, 2248, 0, 2258, 101, 101, 86, 101, 99, 116, 111, 114, 59, 26977, 101, 99, 116, 111, 114, 256, 59, 66, 2267, 2268, 25027, 97, 114, 59, 26969, 108, 111, 111, 114, 59, 25354, 105, 103, 104, 116, 256, 65, 86, 2287, 2293, 114, 114, 111, 119, 59, 24980, 101, 99, 116, 111, 114, 59, 26958, 256, 101, 114, 2305, 2327, 101, 384, 59, 65, 86, 2313, 2314, 2320, 25251, 114, 114, 111, 119, 59, 24996, 101, 99, 116, 111, 114, 59, 26970, 105, 97, 110, 103, 108, 101, 384, 59, 66, 69, 2340, 2341, 2345, 25266, 97, 114, 59, 27087, 113, 117, 97, 108, 59, 25268, 112, 384, 68, 84, 86, 2359, 2370, 2380, 111, 119, 110, 86, 101, 99, 116, 111, 114, 59, 26961, 101, 101, 86, 101, 99, 116, 111, 114, 59, 26976, 101, 99, 116, 111, 114, 256, 59, 66, 2390, 2391, 25023, 97, 114, 59, 26968, 101, 99, 116, 111, 114, 256, 59, 66, 2405, 2406, 25020, 97, 114, 59, 26962, 105, 103, 104, 116, 225, 924, 115, 768, 69, 70, 71, 76, 83, 84, 2430, 2443, 2453, 2461, 2466, 2477, 113, 117, 97, 108, 71, 114, 101, 97, 116, 101, 114, 59, 25306, 117, 108, 108, 69, 113, 117, 97, 108, 59, 25190, 114, 101, 97, 116, 101, 114, 59, 25206, 101, 115, 115, 59, 27297, 108, 97, 110, 116, 69, 113, 117, 97, 108, 59, 27261, 105, 108, 100, 101, 59, 25202, 114, 59, 49152, 55349, 56591, 256, 59, 101, 2493, 2494, 25304, 102, 116, 97, 114, 114, 111, 119, 59, 25050, 105, 100, 111, 116, 59, 16703, 384, 110, 112, 119, 2516, 2582, 2587, 103, 512, 76, 82, 108, 114, 2526, 2551, 2562, 2576, 101, 102, 116, 256, 65, 82, 2534, 2540, 114, 114, 111, 119, 59, 26613, 105, 103, 104, 116, 65, 114, 114, 111, 119, 59, 26615, 105, 103, 104, 116, 65, 114, 114, 111, 119, 59, 26614, 101, 102, 116, 256, 97, 114, 947, 2570, 105, 103, 104, 116, 225, 959, 105, 103, 104, 116, 225, 970, 102, 59, 49152, 55349, 56643, 101, 114, 256, 76, 82, 2594, 2604, 101, 102, 116, 65, 114, 114, 111, 119, 59, 24985, 105, 103, 104, 116, 65, 114, 114, 111, 119, 59, 24984, 384, 99, 104, 116, 2622, 2624, 2626, 242, 2124, 59, 25008, 114, 111, 107, 59, 16705, 59, 25194, 1024, 97, 99, 101, 102, 105, 111, 115, 117, 2650, 2653, 2656, 2679, 2684, 2693, 2699, 2702, 112, 59, 26885, 121, 59, 17436, 256, 100, 108, 2661, 2671, 105, 117, 109, 83, 112, 97, 99, 101, 59, 24671, 108, 105, 110, 116, 114, 102, 59, 24883, 114, 59, 49152, 55349, 56592, 110, 117, 115, 80, 108, 117, 115, 59, 25107, 112, 102, 59, 49152, 55349, 56644, 99, 242, 2678, 59, 17308, 1152, 74, 97, 99, 101, 102, 111, 115, 116, 117, 2723, 2727, 2733, 2752, 2836, 2841, 3473, 3479, 3486, 99, 121, 59, 17418, 99, 117, 116, 101, 59, 16707, 384, 97, 101, 121, 2740, 2745, 2750, 114, 111, 110, 59, 16711, 100, 105, 108, 59, 16709, 59, 17437, 384, 103, 115, 119, 2759, 2800, 2830, 97, 116, 105, 118, 101, 384, 77, 84, 86, 2771, 2783, 2792, 101, 100, 105, 117, 109, 83, 112, 97, 99, 101, 59, 24587, 104, 105, 256, 99, 110, 2790, 2776, 235, 2777, 101, 114, 121, 84, 104, 105, 238, 2777, 116, 101, 100, 256, 71, 76, 2808, 2822, 114, 101, 97, 116, 101, 114, 71, 114, 101, 97, 116, 101, 242, 1651, 101, 115, 115, 76, 101, 115, 243, 2632, 76, 105, 110, 101, 59, 16394, 114, 59, 49152, 55349, 56593, 512, 66, 110, 112, 116, 2850, 2856, 2871, 2874, 114, 101, 97, 107, 59, 24672, 66, 114, 101, 97, 107, 105, 110, 103, 83, 112, 97, 99, 101, 59, 16544, 102, 59, 24853, 1664, 59, 67, 68, 69, 71, 72, 76, 78, 80, 82, 83, 84, 86, 2901, 2902, 2922, 2940, 2977, 3051, 3076, 3166, 3204, 3238, 3288, 3425, 3461, 27372, 256, 111, 117, 2907, 2916, 110, 103, 114, 117, 101, 110, 116, 59, 25186, 112, 67, 97, 112, 59, 25197, 111, 117, 98, 108, 101, 86, 101, 114, 116, 105, 99, 97, 108, 66, 97, 114, 59, 25126, 384, 108, 113, 120, 2947, 2954, 2971, 101, 109, 101, 110, 116, 59, 25097, 117, 97, 108, 256, 59, 84, 2962, 2963, 25184, 105, 108, 100, 101, 59, 49152, 8770, 824, 105, 115, 116, 115, 59, 25092, 114, 101, 97, 116, 101, 114, 896, 59, 69, 70, 71, 76, 83, 84, 2998, 2999, 3005, 3017, 3027, 3032, 3045, 25199, 113, 117, 97, 108, 59, 25201, 117, 108, 108, 69, 113, 117, 97, 108, 59, 49152, 8807, 824, 114, 101, 97, 116, 101, 114, 59, 49152, 8811, 824, 101, 115, 115, 59, 25209, 108, 97, 110, 116, 69, 113, 117, 97, 108, 59, 49152, 10878, 824, 105, 108, 100, 101, 59, 25205, 117, 109, 112, 324, 3058, 3069, 111, 119, 110, 72, 117, 109, 112, 59, 49152, 8782, 824, 113, 117, 97, 108, 59, 49152, 8783, 824, 101, 256, 102, 115, 3082, 3111, 116, 84, 114, 105, 97, 110, 103, 108, 101, 384, 59, 66, 69, 3098, 3099, 3105, 25322, 97, 114, 59, 49152, 10703, 824, 113, 117, 97, 108, 59, 25324, 115, 768, 59, 69, 71, 76, 83, 84, 3125, 3126, 3132, 3140, 3147, 3160, 25198, 113, 117, 97, 108, 59, 25200, 114, 101, 97, 116, 101, 114, 59, 25208, 101, 115, 115, 59, 49152, 8810, 824, 108, 97, 110, 116, 69, 113, 117, 97, 108, 59, 49152, 10877, 824, 105, 108, 100, 101, 59, 25204, 101, 115, 116, 101, 100, 256, 71, 76, 3176, 3193, 114, 101, 97, 116, 101, 114, 71, 114, 101, 97, 116, 101, 114, 59, 49152, 10914, 824, 101, 115, 115, 76, 101, 115, 115, 59, 49152, 10913, 824, 114, 101, 99, 101, 100, 101, 115, 384, 59, 69, 83, 3218, 3219, 3227, 25216, 113, 117, 97, 108, 59, 49152, 10927, 824, 108, 97, 110, 116, 69, 113, 117, 97, 108, 59, 25312, 256, 101, 105, 3243, 3257, 118, 101, 114, 115, 101, 69, 108, 101, 109, 101, 110, 116, 59, 25100, 103, 104, 116, 84, 114, 105, 97, 110, 103, 108, 101, 384, 59, 66, 69, 3275, 3276, 3282, 25323, 97, 114, 59, 49152, 10704, 824, 113, 117, 97, 108, 59, 25325, 256, 113, 117, 3293, 3340, 117, 97, 114, 101, 83, 117, 256, 98, 112, 3304, 3321, 115, 101, 116, 256, 59, 69, 3312, 3315, 49152, 8847, 824, 113, 117, 97, 108, 59, 25314, 101, 114, 115, 101, 116, 256, 59, 69, 3331, 3334, 49152, 8848, 824, 113, 117, 97, 108, 59, 25315, 384, 98, 99, 112, 3347, 3364, 3406, 115, 101, 116, 256, 59, 69, 3355, 3358, 49152, 8834, 8402, 113, 117, 97, 108, 59, 25224, 99, 101, 101, 100, 115, 512, 59, 69, 83, 84, 3378, 3379, 3387, 3398, 25217, 113, 117, 97, 108, 59, 49152, 10928, 824, 108, 97, 110, 116, 69, 113, 117, 97, 108, 59, 25313, 105, 108, 100, 101, 59, 49152, 8831, 824, 101, 114, 115, 101, 116, 256, 59, 69, 3416, 3419, 49152, 8835, 8402, 113, 117, 97, 108, 59, 25225, 105, 108, 100, 101, 512, 59, 69, 70, 84, 3438, 3439, 3445, 3455, 25153, 113, 117, 97, 108, 59, 25156, 117, 108, 108, 69, 113, 117, 97, 108, 59, 25159, 105, 108, 100, 101, 59, 25161, 101, 114, 116, 105, 99, 97, 108, 66, 97, 114, 59, 25124, 99, 114, 59, 49152, 55349, 56489, 105, 108, 100, 101, 32827, 209, 16593, 59, 17309, 1792, 69, 97, 99, 100, 102, 103, 109, 111, 112, 114, 115, 116, 117, 118, 3517, 3522, 3529, 3541, 3547, 3552, 3559, 3580, 3586, 3616, 3618, 3634, 3647, 3652, 108, 105, 103, 59, 16722, 99, 117, 116, 101, 32827, 211, 16595, 256, 105, 121, 3534, 3539, 114, 99, 32827, 212, 16596, 59, 17438, 98, 108, 97, 99, 59, 16720, 114, 59, 49152, 55349, 56594, 114, 97, 118, 101, 32827, 210, 16594, 384, 97, 101, 105, 3566, 3570, 3574, 99, 114, 59, 16716, 103, 97, 59, 17321, 99, 114, 111, 110, 59, 17311, 112, 102, 59, 49152, 55349, 56646, 101, 110, 67, 117, 114, 108, 121, 256, 68, 81, 3598, 3610, 111, 117, 98, 108, 101, 81, 117, 111, 116, 101, 59, 24604, 117, 111, 116, 101, 59, 24600, 59, 27220, 256, 99, 108, 3623, 3628, 114, 59, 49152, 55349, 56490, 97, 115, 104, 32827, 216, 16600, 105, 364, 3639, 3644, 100, 101, 32827, 213, 16597, 101, 115, 59, 27191, 109, 108, 32827, 214, 16598, 101, 114, 256, 66, 80, 3659, 3680, 256, 97, 114, 3664, 3667, 114, 59, 24638, 97, 99, 256, 101, 107, 3674, 3676, 59, 25566, 101, 116, 59, 25524, 97, 114, 101, 110, 116, 104, 101, 115, 105, 115, 59, 25564, 1152, 97, 99, 102, 104, 105, 108, 111, 114, 115, 3711, 3719, 3722, 3727, 3730, 3732, 3741, 3760, 3836, 114, 116, 105, 97, 108, 68, 59, 25090, 121, 59, 17439, 114, 59, 49152, 55349, 56595, 105, 59, 17318, 59, 17312, 117, 115, 77, 105, 110, 117, 115, 59, 16561, 256, 105, 112, 3746, 3757, 110, 99, 97, 114, 101, 112, 108, 97, 110, 229, 1693, 102, 59, 24857, 512, 59, 101, 105, 111, 3769, 3770, 3808, 3812, 27323, 99, 101, 100, 101, 115, 512, 59, 69, 83, 84, 3784, 3785, 3791, 3802, 25210, 113, 117, 97, 108, 59, 27311, 108, 97, 110, 116, 69, 113, 117, 97, 108, 59, 25212, 105, 108, 100, 101, 59, 25214, 109, 101, 59, 24627, 256, 100, 112, 3817, 3822, 117, 99, 116, 59, 25103, 111, 114, 116, 105, 111, 110, 256, 59, 97, 549, 3833, 108, 59, 25117, 256, 99, 105, 3841, 3846, 114, 59, 49152, 55349, 56491, 59, 17320, 512, 85, 102, 111, 115, 3857, 3862, 3867, 3871, 79, 84, 32827, 34, 16418, 114, 59, 49152, 55349, 56596, 112, 102, 59, 24858, 99, 114, 59, 49152, 55349, 56492, 1536, 66, 69, 97, 99, 101, 102, 104, 105, 111, 114, 115, 117, 3902, 3907, 3911, 3936, 3955, 4007, 4010, 4013, 4246, 4265, 4276, 4286, 97, 114, 114, 59, 26896, 71, 32827, 174, 16558, 384, 99, 110, 114, 3918, 3923, 3926, 117, 116, 101, 59, 16724, 103, 59, 26603, 114, 256, 59, 116, 3932, 3933, 24992, 108, 59, 26902, 384, 97, 101, 121, 3943, 3948, 3953, 114, 111, 110, 59, 16728, 100, 105, 108, 59, 16726, 59, 17440, 256, 59, 118, 3960, 3961, 24860, 101, 114, 115, 101, 256, 69, 85, 3970, 3993, 256, 108, 113, 3975, 3982, 101, 109, 101, 110, 116, 59, 25099, 117, 105, 108, 105, 98, 114, 105, 117, 109, 59, 25035, 112, 69, 113, 117, 105, 108, 105, 98, 114, 105, 117, 109, 59, 26991, 114, 187, 3961, 111, 59, 17313, 103, 104, 116, 1024, 65, 67, 68, 70, 84, 85, 86, 97, 4033, 4075, 4083, 4130, 4136, 4187, 4231, 984, 256, 110, 114, 4038, 4050, 103, 108, 101, 66, 114, 97, 99, 107, 101, 116, 59, 26601, 114, 111, 119, 384, 59, 66, 76, 4060, 4061, 4065, 24978, 97, 114, 59, 25061, 101, 102, 116, 65, 114, 114, 111, 119, 59, 25028, 101, 105, 108, 105, 110, 103, 59, 25353, 111, 501, 4089, 0, 4101, 98, 108, 101, 66, 114, 97, 99, 107, 101, 116, 59, 26599, 110, 468, 4106, 0, 4116, 101, 101, 86, 101, 99, 116, 111, 114, 59, 26973, 101, 99, 116, 111, 114, 256, 59, 66, 4125, 4126, 25026, 97, 114, 59, 26965, 108, 111, 111, 114, 59, 25355, 256, 101, 114, 4141, 4163, 101, 384, 59, 65, 86, 4149, 4150, 4156, 25250, 114, 114, 111, 119, 59, 24998, 101, 99, 116, 111, 114, 59, 26971, 105, 97, 110, 103, 108, 101, 384, 59, 66, 69, 4176, 4177, 4181, 25267, 97, 114, 59, 27088, 113, 117, 97, 108, 59, 25269, 112, 384, 68, 84, 86, 4195, 4206, 4216, 111, 119, 110, 86, 101, 99, 116, 111, 114, 59, 26959, 101, 101, 86, 101, 99, 116, 111, 114, 59, 26972, 101, 99, 116, 111, 114, 256, 59, 66, 4226, 4227, 25022, 97, 114, 59, 26964, 101, 99, 116, 111, 114, 256, 59, 66, 4241, 4242, 25024, 97, 114, 59, 26963, 256, 112, 117, 4251, 4254, 102, 59, 24861, 110, 100, 73, 109, 112, 108, 105, 101, 115, 59, 26992, 105, 103, 104, 116, 97, 114, 114, 111, 119, 59, 25051, 256, 99, 104, 4281, 4284, 114, 59, 24859, 59, 25009, 108, 101, 68, 101, 108, 97, 121, 101, 100, 59, 27124, 1664, 72, 79, 97, 99, 102, 104, 105, 109, 111, 113, 115, 116, 117, 4324, 4337, 4343, 4349, 4377, 4382, 4433, 4438, 4449, 4455, 4533, 4539, 4543, 256, 67, 99, 4329, 4334, 72, 99, 121, 59, 17449, 121, 59, 17448, 70, 84, 99, 121, 59, 17452, 99, 117, 116, 101, 59, 16730, 640, 59, 97, 101, 105, 121, 4360, 4361, 4366, 4371, 4375, 27324, 114, 111, 110, 59, 16736, 100, 105, 108, 59, 16734, 114, 99, 59, 16732, 59, 17441, 114, 59, 49152, 55349, 56598, 111, 114, 116, 512, 68, 76, 82, 85, 4394, 4404, 4414, 4425, 111, 119, 110, 65, 114, 114, 111, 119, 187, 1054, 101, 102, 116, 65, 114, 114, 111, 119, 187, 2202, 105, 103, 104, 116, 65, 114, 114, 111, 119, 187, 4061, 112, 65, 114, 114, 111, 119, 59, 24977, 103, 109, 97, 59, 17315, 97, 108, 108, 67, 105, 114, 99, 108, 101, 59, 25112, 112, 102, 59, 49152, 55349, 56650, 626, 4461, 0, 0, 4464, 116, 59, 25114, 97, 114, 101, 512, 59, 73, 83, 85, 4475, 4476, 4489, 4527, 26017, 110, 116, 101, 114, 115, 101, 99, 116, 105, 111, 110, 59, 25235, 117, 256, 98, 112, 4495, 4510, 115, 101, 116, 256, 59, 69, 4503, 4504, 25231, 113, 117, 97, 108, 59, 25233, 101, 114, 115, 101, 116, 256, 59, 69, 4520, 4521, 25232, 113, 117, 97, 108, 59, 25234, 110, 105, 111, 110, 59, 25236, 99, 114, 59, 49152, 55349, 56494, 97, 114, 59, 25286, 512, 98, 99, 109, 112, 4552, 4571, 4617, 4619, 256, 59, 115, 4557, 4558, 25296, 101, 116, 256, 59, 69, 4557, 4565, 113, 117, 97, 108, 59, 25222, 256, 99, 104, 4576, 4613, 101, 101, 100, 115, 512, 59, 69, 83, 84, 4589, 4590, 4596, 4607, 25211, 113, 117, 97, 108, 59, 27312, 108, 97, 110, 116, 69, 113, 117, 97, 108, 59, 25213, 105, 108, 100, 101, 59, 25215, 84, 104, 225, 3980, 59, 25105, 384, 59, 101, 115, 4626, 4627, 4643, 25297, 114, 115, 101, 116, 256, 59, 69, 4636, 4637, 25219, 113, 117, 97, 108, 59, 25223, 101, 116, 187, 4627, 1408, 72, 82, 83, 97, 99, 102, 104, 105, 111, 114, 115, 4670, 4676, 4681, 4693, 4702, 4721, 4726, 4767, 4802, 4808, 4817, 79, 82, 78, 32827, 222, 16606, 65, 68, 69, 59, 24866, 256, 72, 99, 4686, 4690, 99, 121, 59, 17419, 121, 59, 17446, 256, 98, 117, 4698, 4700, 59, 16393, 59, 17316, 384, 97, 101, 121, 4709, 4714, 4719, 114, 111, 110, 59, 16740, 100, 105, 108, 59, 16738, 59, 17442, 114, 59, 49152, 55349, 56599, 256, 101, 105, 4731, 4745, 498, 4736, 0, 4743, 101, 102, 111, 114, 101, 59, 25140, 97, 59, 17304, 256, 99, 110, 4750, 4760, 107, 83, 112, 97, 99, 101, 59, 49152, 8287, 8202, 83, 112, 97, 99, 101, 59, 24585, 108, 100, 101, 512, 59, 69, 70, 84, 4779, 4780, 4786, 4796, 25148, 113, 117, 97, 108, 59, 25155, 117, 108, 108, 69, 113, 117, 97, 108, 59, 25157, 105, 108, 100, 101, 59, 25160, 112, 102, 59, 49152, 55349, 56651, 105, 112, 108, 101, 68, 111, 116, 59, 24795, 256, 99, 116, 4822, 4827, 114, 59, 49152, 55349, 56495, 114, 111, 107, 59, 16742, 2785, 4855, 4878, 4890, 4902, 0, 4908, 4913, 0, 0, 0, 0, 0, 4920, 4925, 4983, 4997, 0, 5119, 5124, 5130, 5136, 256, 99, 114, 4859, 4865, 117, 116, 101, 32827, 218, 16602, 114, 256, 59, 111, 4871, 4872, 24991, 99, 105, 114, 59, 26953, 114, 483, 4883, 0, 4886, 121, 59, 17422, 118, 101, 59, 16748, 256, 105, 121, 4894, 4899, 114, 99, 32827, 219, 16603, 59, 17443, 98, 108, 97, 99, 59, 16752, 114, 59, 49152, 55349, 56600, 114, 97, 118, 101, 32827, 217, 16601, 97, 99, 114, 59, 16746, 256, 100, 105, 4929, 4969, 101, 114, 256, 66, 80, 4936, 4957, 256, 97, 114, 4941, 4944, 114, 59, 16479, 97, 99, 256, 101, 107, 4951, 4953, 59, 25567, 101, 116, 59, 25525, 97, 114, 101, 110, 116, 104, 101, 115, 105, 115, 59, 25565, 111, 110, 256, 59, 80, 4976, 4977, 25283, 108, 117, 115, 59, 25230, 256, 103, 112, 4987, 4991, 111, 110, 59, 16754, 102, 59, 49152, 55349, 56652, 1024, 65, 68, 69, 84, 97, 100, 112, 115, 5013, 5038, 5048, 5060, 1000, 5074, 5079, 5107, 114, 114, 111, 119, 384, 59, 66, 68, 4432, 5024, 5028, 97, 114, 59, 26898, 111, 119, 110, 65, 114, 114, 111, 119, 59, 25029, 111, 119, 110, 65, 114, 114, 111, 119, 59, 24981, 113, 117, 105, 108, 105, 98, 114, 105, 117, 109, 59, 26990, 101, 101, 256, 59, 65, 5067, 5068, 25253, 114, 114, 111, 119, 59, 24997, 111, 119, 110, 225, 1011, 101, 114, 256, 76, 82, 5086, 5096, 101, 102, 116, 65, 114, 114, 111, 119, 59, 24982, 105, 103, 104, 116, 65, 114, 114, 111, 119, 59, 24983, 105, 256, 59, 108, 5113, 5114, 17362, 111, 110, 59, 17317, 105, 110, 103, 59, 16750, 99, 114, 59, 49152, 55349, 56496, 105, 108, 100, 101, 59, 16744, 109, 108, 32827, 220, 16604, 1152, 68, 98, 99, 100, 101, 102, 111, 115, 118, 5159, 5164, 5168, 5171, 5182, 5253, 5258, 5264, 5270, 97, 115, 104, 59, 25259, 97, 114, 59, 27371, 121, 59, 17426, 97, 115, 104, 256, 59, 108, 5179, 5180, 25257, 59, 27366, 256, 101, 114, 5187, 5189, 59, 25281, 384, 98, 116, 121, 5196, 5200, 5242, 97, 114, 59, 24598, 256, 59, 105, 5199, 5205, 99, 97, 108, 512, 66, 76, 83, 84, 5217, 5221, 5226, 5236, 97, 114, 59, 25123, 105, 110, 101, 59, 16508, 101, 112, 97, 114, 97, 116, 111, 114, 59, 26456, 105, 108, 100, 101, 59, 25152, 84, 104, 105, 110, 83, 112, 97, 99, 101, 59, 24586, 114, 59, 49152, 55349, 56601, 112, 102, 59, 49152, 55349, 56653, 99, 114, 59, 49152, 55349, 56497, 100, 97, 115, 104, 59, 25258, 640, 99, 101, 102, 111, 115, 5287, 5292, 5297, 5302, 5308, 105, 114, 99, 59, 16756, 100, 103, 101, 59, 25280, 114, 59, 49152, 55349, 56602, 112, 102, 59, 49152, 55349, 56654, 99, 114, 59, 49152, 55349, 56498, 512, 102, 105, 111, 115, 5323, 5328, 5330, 5336, 114, 59, 49152, 55349, 56603, 59, 17310, 112, 102, 59, 49152, 55349, 56655, 99, 114, 59, 49152, 55349, 56499, 1152, 65, 73, 85, 97, 99, 102, 111, 115, 117, 5361, 5365, 5369, 5373, 5380, 5391, 5396, 5402, 5408, 99, 121, 59, 17455, 99, 121, 59, 17415, 99, 121, 59, 17454, 99, 117, 116, 101, 32827, 221, 16605, 256, 105, 121, 5385, 5389, 114, 99, 59, 16758, 59, 17451, 114, 59, 49152, 55349, 56604, 112, 102, 59, 49152, 55349, 56656, 99, 114, 59, 49152, 55349, 56500, 109, 108, 59, 16760, 1024, 72, 97, 99, 100, 101, 102, 111, 115, 5429, 5433, 5439, 5451, 5455, 5469, 5472, 5476, 99, 121, 59, 17430, 99, 117, 116, 101, 59, 16761, 256, 97, 121, 5444, 5449, 114, 111, 110, 59, 16765, 59, 17431, 111, 116, 59, 16763, 498, 5460, 0, 5467, 111, 87, 105, 100, 116, 232, 2777, 97, 59, 17302, 114, 59, 24872, 112, 102, 59, 24868, 99, 114, 59, 49152, 55349, 56501, 3041, 5507, 5514, 5520, 0, 5552, 5558, 5567, 0, 0, 0, 0, 5574, 5595, 5611, 5727, 5741, 0, 5781, 5787, 5810, 5817, 0, 5822, 99, 117, 116, 101, 32827, 225, 16609, 114, 101, 118, 101, 59, 16643, 768, 59, 69, 100, 105, 117, 121, 5532, 5533, 5537, 5539, 5544, 5549, 25150, 59, 49152, 8766, 819, 59, 25151, 114, 99, 32827, 226, 16610, 116, 101, 32955, 180, 774, 59, 17456, 108, 105, 103, 32827, 230, 16614, 256, 59, 114, 178, 5562, 59, 49152, 55349, 56606, 114, 97, 118, 101, 32827, 224, 16608, 256, 101, 112, 5578, 5590, 256, 102, 112, 5583, 5588, 115, 121, 109, 59, 24885, 232, 5587, 104, 97, 59, 17329, 256, 97, 112, 5599, 99, 256, 99, 108, 5604, 5607, 114, 59, 16641, 103, 59, 27199, 612, 5616, 0, 0, 5642, 640, 59, 97, 100, 115, 118, 5626, 5627, 5631, 5633, 5639, 25127, 110, 100, 59, 27221, 59, 27228, 108, 111, 112, 101, 59, 27224, 59, 27226, 896, 59, 101, 108, 109, 114, 115, 122, 5656, 5657, 5659, 5662, 5695, 5711, 5721, 25120, 59, 27044, 101, 187, 5657, 115, 100, 256, 59, 97, 5669, 5670, 25121, 1121, 5680, 5682, 5684, 5686, 5688, 5690, 5692, 5694, 59, 27048, 59, 27049, 59, 27050, 59, 27051, 59, 27052, 59, 27053, 59, 27054, 59, 27055, 116, 256, 59, 118, 5701, 5702, 25119, 98, 256, 59, 100, 5708, 5709, 25278, 59, 27037, 256, 112, 116, 5716, 5719, 104, 59, 25122, 187, 185, 97, 114, 114, 59, 25468, 256, 103, 112, 5731, 5735, 111, 110, 59, 16645, 102, 59, 49152, 55349, 56658, 896, 59, 69, 97, 101, 105, 111, 112, 4801, 5755, 5757, 5762, 5764, 5767, 5770, 59, 27248, 99, 105, 114, 59, 27247, 59, 25162, 100, 59, 25163, 115, 59, 16423, 114, 111, 120, 256, 59, 101, 4801, 5778, 241, 5763, 105, 110, 103, 32827, 229, 16613, 384, 99, 116, 121, 5793, 5798, 5800, 114, 59, 49152, 55349, 56502, 59, 16426, 109, 112, 256, 59, 101, 4801, 5807, 241, 648, 105, 108, 100, 101, 32827, 227, 16611, 109, 108, 32827, 228, 16612, 256, 99, 105, 5826, 5832, 111, 110, 105, 110, 244, 626, 110, 116, 59, 27153, 2048, 78, 97, 98, 99, 100, 101, 102, 105, 107, 108, 110, 111, 112, 114, 115, 117, 5869, 5873, 5936, 5948, 5955, 5960, 6008, 6013, 6112, 6118, 6201, 6224, 5901, 6461, 6472, 6512, 111, 116, 59, 27373, 256, 99, 114, 5878, 5918, 107, 512, 99, 101, 112, 115, 5888, 5893, 5901, 5907, 111, 110, 103, 59, 25164, 112, 115, 105, 108, 111, 110, 59, 17398, 114, 105, 109, 101, 59, 24629, 105, 109, 256, 59, 101, 5914, 5915, 25149, 113, 59, 25293, 374, 5922, 5926, 101, 101, 59, 25277, 101, 100, 256, 59, 103, 5932, 5933, 25349, 101, 187, 5933, 114, 107, 256, 59, 116, 4956, 5943, 98, 114, 107, 59, 25526, 256, 111, 121, 5889, 5953, 59, 17457, 113, 117, 111, 59, 24606, 640, 99, 109, 112, 114, 116, 5971, 5979, 5985, 5988, 5992, 97, 117, 115, 256, 59, 101, 266, 265, 112, 116, 121, 118, 59, 27056, 115, 233, 5900, 110, 111, 245, 275, 384, 97, 104, 119, 5999, 6001, 6003, 59, 17330, 59, 24886, 101, 101, 110, 59, 25196, 114, 59, 49152, 55349, 56607, 103, 896, 99, 111, 115, 116, 117, 118, 119, 6029, 6045, 6067, 6081, 6101, 6107, 6110, 384, 97, 105, 117, 6036, 6038, 6042, 240, 1888, 114, 99, 59, 26095, 112, 187, 4977, 384, 100, 112, 116, 6052, 6056, 6061, 111, 116, 59, 27136, 108, 117, 115, 59, 27137, 105, 109, 101, 115, 59, 27138, 625, 6073, 0, 0, 6078, 99, 117, 112, 59, 27142, 97, 114, 59, 26117, 114, 105, 97, 110, 103, 108, 101, 256, 100, 117, 6093, 6098, 111, 119, 110, 59, 26045, 112, 59, 26035, 112, 108, 117, 115, 59, 27140, 101, 229, 5188, 229, 5293, 97, 114, 111, 119, 59, 26893, 384, 97, 107, 111, 6125, 6182, 6197, 256, 99, 110, 6130, 6179, 107, 384, 108, 115, 116, 6138, 1451, 6146, 111, 122, 101, 110, 103, 101, 59, 27115, 114, 105, 97, 110, 103, 108, 101, 512, 59, 100, 108, 114, 6162, 6163, 6168, 6173, 26036, 111, 119, 110, 59, 26046, 101, 102, 116, 59, 26050, 105, 103, 104, 116, 59, 26040, 107, 59, 25635, 433, 6187, 0, 6195, 434, 6191, 0, 6193, 59, 26002, 59, 26001, 52, 59, 26003, 99, 107, 59, 25992, 256, 101, 111, 6206, 6221, 256, 59, 113, 6211, 6214, 49152, 61, 8421, 117, 105, 118, 59, 49152, 8801, 8421, 116, 59, 25360, 512, 112, 116, 119, 120, 6233, 6238, 6247, 6252, 102, 59, 49152, 55349, 56659, 256, 59, 116, 5067, 6243, 111, 109, 187, 5068, 116, 105, 101, 59, 25288, 1536, 68, 72, 85, 86, 98, 100, 104, 109, 112, 116, 117, 118, 6277, 6294, 6314, 6331, 6359, 6363, 6380, 6399, 6405, 6410, 6416, 6433, 512, 76, 82, 108, 114, 6286, 6288, 6290, 6292, 59, 25943, 59, 25940, 59, 25942, 59, 25939, 640, 59, 68, 85, 100, 117, 6305, 6306, 6308, 6310, 6312, 25936, 59, 25958, 59, 25961, 59, 25956, 59, 25959, 512, 76, 82, 108, 114, 6323, 6325, 6327, 6329, 59, 25949, 59, 25946, 59, 25948, 59, 25945, 896, 59, 72, 76, 82, 104, 108, 114, 6346, 6347, 6349, 6351, 6353, 6355, 6357, 25937, 59, 25964, 59, 25955, 59, 25952, 59, 25963, 59, 25954, 59, 25951, 111, 120, 59, 27081, 512, 76, 82, 108, 114, 6372, 6374, 6376, 6378, 59, 25941, 59, 25938, 59, 25872, 59, 25868, 640, 59, 68, 85, 100, 117, 1725, 6391, 6393, 6395, 6397, 59, 25957, 59, 25960, 59, 25900, 59, 25908, 105, 110, 117, 115, 59, 25247, 108, 117, 115, 59, 25246, 105, 109, 101, 115, 59, 25248, 512, 76, 82, 108, 114, 6425, 6427, 6429, 6431, 59, 25947, 59, 25944, 59, 25880, 59, 25876, 896, 59, 72, 76, 82, 104, 108, 114, 6448, 6449, 6451, 6453, 6455, 6457, 6459, 25858, 59, 25962, 59, 25953, 59, 25950, 59, 25916, 59, 25892, 59, 25884, 256, 101, 118, 291, 6466, 98, 97, 114, 32827, 166, 16550, 512, 99, 101, 105, 111, 6481, 6486, 6490, 6496, 114, 59, 49152, 55349, 56503, 109, 105, 59, 24655, 109, 256, 59, 101, 5914, 5916, 108, 384, 59, 98, 104, 6504, 6505, 6507, 16476, 59, 27077, 115, 117, 98, 59, 26568, 364, 6516, 6526, 108, 256, 59, 101, 6521, 6522, 24610, 116, 187, 6522, 112, 384, 59, 69, 101, 303, 6533, 6535, 59, 27310, 256, 59, 113, 1756, 1755, 3297, 6567, 0, 6632, 6673, 6677, 6706, 0, 6711, 6736, 0, 0, 6836, 0, 0, 6849, 0, 0, 6945, 6958, 6989, 6994, 0, 7165, 0, 7180, 384, 99, 112, 114, 6573, 6578, 6621, 117, 116, 101, 59, 16647, 768, 59, 97, 98, 99, 100, 115, 6591, 6592, 6596, 6602, 6613, 6617, 25129, 110, 100, 59, 27204, 114, 99, 117, 112, 59, 27209, 256, 97, 117, 6607, 6610, 112, 59, 27211, 112, 59, 27207, 111, 116, 59, 27200, 59, 49152, 8745, 65024, 256, 101, 111, 6626, 6629, 116, 59, 24641, 238, 1683, 512, 97, 101, 105, 117, 6640, 6651, 6657, 6661, 496, 6645, 0, 6648, 115, 59, 27213, 111, 110, 59, 16653, 100, 105, 108, 32827, 231, 16615, 114, 99, 59, 16649, 112, 115, 256, 59, 115, 6668, 6669, 27212, 109, 59, 27216, 111, 116, 59, 16651, 384, 100, 109, 110, 6683, 6688, 6694, 105, 108, 32955, 184, 429, 112, 116, 121, 118, 59, 27058, 116, 33024, 162, 59, 101, 6701, 6702, 16546, 114, 228, 434, 114, 59, 49152, 55349, 56608, 384, 99, 101, 105, 6717, 6720, 6733, 121, 59, 17479, 99, 107, 256, 59, 109, 6727, 6728, 26387, 97, 114, 107, 187, 6728, 59, 17351, 114, 896, 59, 69, 99, 101, 102, 109, 115, 6751, 6752, 6754, 6763, 6820, 6826, 6830, 26059, 59, 27075, 384, 59, 101, 108, 6761, 6762, 6765, 17094, 113, 59, 25175, 101, 609, 6772, 0, 0, 6792, 114, 114, 111, 119, 256, 108, 114, 6780, 6785, 101, 102, 116, 59, 25018, 105, 103, 104, 116, 59, 25019, 640, 82, 83, 97, 99, 100, 6802, 6804, 6806, 6810, 6815, 187, 3911, 59, 25800, 115, 116, 59, 25243, 105, 114, 99, 59, 25242, 97, 115, 104, 59, 25245, 110, 105, 110, 116, 59, 27152, 105, 100, 59, 27375, 99, 105, 114, 59, 27074, 117, 98, 115, 256, 59, 117, 6843, 6844, 26211, 105, 116, 187, 6844, 748, 6855, 6868, 6906, 0, 6922, 111, 110, 256, 59, 101, 6861, 6862, 16442, 256, 59, 113, 199, 198, 621, 6873, 0, 0, 6882, 97, 256, 59, 116, 6878, 6879, 16428, 59, 16448, 384, 59, 102, 108, 6888, 6889, 6891, 25089, 238, 4448, 101, 256, 109, 120, 6897, 6902, 101, 110, 116, 187, 6889, 101, 243, 589, 487, 6910, 0, 6919, 256, 59, 100, 4795, 6914, 111, 116, 59, 27245, 110, 244, 582, 384, 102, 114, 121, 6928, 6932, 6935, 59, 49152, 55349, 56660, 111, 228, 596, 33024, 169, 59, 115, 341, 6941, 114, 59, 24855, 256, 97, 111, 6949, 6953, 114, 114, 59, 25013, 115, 115, 59, 26391, 256, 99, 117, 6962, 6967, 114, 59, 49152, 55349, 56504, 256, 98, 112, 6972, 6980, 256, 59, 101, 6977, 6978, 27343, 59, 27345, 256, 59, 101, 6985, 6986, 27344, 59, 27346, 100, 111, 116, 59, 25327, 896, 100, 101, 108, 112, 114, 118, 119, 7008, 7020, 7031, 7042, 7084, 7124, 7161, 97, 114, 114, 256, 108, 114, 7016, 7018, 59, 26936, 59, 26933, 624, 7026, 0, 0, 7029, 114, 59, 25310, 99, 59, 25311, 97, 114, 114, 256, 59, 112, 7039, 7040, 25014, 59, 26941, 768, 59, 98, 99, 100, 111, 115, 7055, 7056, 7062, 7073, 7077, 7080, 25130, 114, 99, 97, 112, 59, 27208, 256, 97, 117, 7067, 7070, 112, 59, 27206, 112, 59, 27210, 111, 116, 59, 25229, 114, 59, 27205, 59, 49152, 8746, 65024, 512, 97, 108, 114, 118, 7093, 7103, 7134, 7139, 114, 114, 256, 59, 109, 7100, 7101, 25015, 59, 26940, 121, 384, 101, 118, 119, 7111, 7124, 7128, 113, 624, 7118, 0, 0, 7122, 114, 101, 227, 7027, 117, 227, 7029, 101, 101, 59, 25294, 101, 100, 103, 101, 59, 25295, 101, 110, 32827, 164, 16548, 101, 97, 114, 114, 111, 119, 256, 108, 114, 7150, 7155, 101, 102, 116, 187, 7040, 105, 103, 104, 116, 187, 7101, 101, 228, 7133, 256, 99, 105, 7169, 7175, 111, 110, 105, 110, 244, 503, 110, 116, 59, 25137, 108, 99, 116, 121, 59, 25389, 2432, 65, 72, 97, 98, 99, 100, 101, 102, 104, 105, 106, 108, 111, 114, 115, 116, 117, 119, 122, 7224, 7227, 7231, 7261, 7273, 7285, 7306, 7326, 7340, 7351, 7419, 7423, 7437, 7547, 7569, 7595, 7611, 7622, 7629, 114, 242, 897, 97, 114, 59, 26981, 512, 103, 108, 114, 115, 7240, 7245, 7250, 7252, 103, 101, 114, 59, 24608, 101, 116, 104, 59, 24888, 242, 4403, 104, 256, 59, 118, 7258, 7259, 24592, 187, 2314, 363, 7265, 7271, 97, 114, 111, 119, 59, 26895, 97, 227, 789, 256, 97, 121, 7278, 7283, 114, 111, 110, 59, 16655, 59, 17460, 384, 59, 97, 111, 818, 7292, 7300, 256, 103, 114, 703, 7297, 114, 59, 25034, 116, 115, 101, 113, 59, 27255, 384, 103, 108, 109, 7313, 7316, 7320, 32827, 176, 16560, 116, 97, 59, 17332, 112, 116, 121, 118, 59, 27057, 256, 105, 114, 7331, 7336, 115, 104, 116, 59, 27007, 59, 49152, 55349, 56609, 97, 114, 256, 108, 114, 7347, 7349, 187, 2268, 187, 4126, 640, 97, 101, 103, 115, 118, 7362, 888, 7382, 7388, 7392, 109, 384, 59, 111, 115, 806, 7370, 7380, 110, 100, 256, 59, 115, 806, 7377, 117, 105, 116, 59, 26214, 97, 109, 109, 97, 59, 17373, 105, 110, 59, 25330, 384, 59, 105, 111, 7399, 7400, 7416, 16631, 100, 101, 33024, 247, 59, 111, 7399, 7408, 110, 116, 105, 109, 101, 115, 59, 25287, 110, 248, 7415, 99, 121, 59, 17490, 99, 623, 7430, 0, 0, 7434, 114, 110, 59, 25374, 111, 112, 59, 25357, 640, 108, 112, 116, 117, 119, 7448, 7453, 7458, 7497, 7509, 108, 97, 114, 59, 16420, 102, 59, 49152, 55349, 56661, 640, 59, 101, 109, 112, 115, 779, 7469, 7479, 7485, 7490, 113, 256, 59, 100, 850, 7475, 111, 116, 59, 25169, 105, 110, 117, 115, 59, 25144, 108, 117, 115, 59, 25108, 113, 117, 97, 114, 101, 59, 25249, 98, 108, 101, 98, 97, 114, 119, 101, 100, 103, 229, 250, 110, 384, 97, 100, 104, 4398, 7517, 7527, 111, 119, 110, 97, 114, 114, 111, 119, 243, 7299, 97, 114, 112, 111, 111, 110, 256, 108, 114, 7538, 7542, 101, 102, 244, 7348, 105, 103, 104, 244, 7350, 354, 7551, 7557, 107, 97, 114, 111, 247, 3906, 623, 7562, 0, 0, 7566, 114, 110, 59, 25375, 111, 112, 59, 25356, 384, 99, 111, 116, 7576, 7587, 7590, 256, 114, 121, 7581, 7585, 59, 49152, 55349, 56505, 59, 17493, 108, 59, 27126, 114, 111, 107, 59, 16657, 256, 100, 114, 7600, 7604, 111, 116, 59, 25329, 105, 256, 59, 102, 7610, 6166, 26047, 256, 97, 104, 7616, 7619, 114, 242, 1065, 97, 242, 4006, 97, 110, 103, 108, 101, 59, 27046, 256, 99, 105, 7634, 7637, 121, 59, 17503, 103, 114, 97, 114, 114, 59, 26623, 2304, 68, 97, 99, 100, 101, 102, 103, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 120, 7681, 7689, 7705, 7736, 1400, 7740, 7753, 7777, 7806, 7845, 7855, 7869, 7905, 7978, 7991, 8004, 8014, 8026, 256, 68, 111, 7686, 7476, 111, 244, 7305, 256, 99, 115, 7694, 7700, 117, 116, 101, 32827, 233, 16617, 116, 101, 114, 59, 27246, 512, 97, 105, 111, 121, 7714, 7719, 7729, 7734, 114, 111, 110, 59, 16667, 114, 256, 59, 99, 7725, 7726, 25174, 32827, 234, 16618, 108, 111, 110, 59, 25173, 59, 17485, 111, 116, 59, 16663, 256, 68, 114, 7745, 7749, 111, 116, 59, 25170, 59, 49152, 55349, 56610, 384, 59, 114, 115, 7760, 7761, 7767, 27290, 97, 118, 101, 32827, 232, 16616, 256, 59, 100, 7772, 7773, 27286, 111, 116, 59, 27288, 512, 59, 105, 108, 115, 7786, 7787, 7794, 7796, 27289, 110, 116, 101, 114, 115, 59, 25575, 59, 24851, 256, 59, 100, 7801, 7802, 27285, 111, 116, 59, 27287, 384, 97, 112, 115, 7813, 7817, 7831, 99, 114, 59, 16659, 116, 121, 384, 59, 115, 118, 7826, 7827, 7829, 25093, 101, 116, 187, 7827, 112, 256, 49, 59, 7837, 7844, 307, 7841, 7843, 59, 24580, 59, 24581, 24579, 256, 103, 115, 7850, 7852, 59, 16715, 112, 59, 24578, 256, 103, 112, 7860, 7864, 111, 110, 59, 16665, 102, 59, 49152, 55349, 56662, 384, 97, 108, 115, 7876, 7886, 7890, 114, 256, 59, 115, 7882, 7883, 25301, 108, 59, 27107, 117, 115, 59, 27249, 105, 384, 59, 108, 118, 7898, 7899, 7903, 17333, 111, 110, 187, 7899, 59, 17397, 512, 99, 115, 117, 118, 7914, 7923, 7947, 7971, 256, 105, 111, 7919, 7729, 114, 99, 187, 7726, 617, 7929, 0, 0, 7931, 237, 1352, 97, 110, 116, 256, 103, 108, 7938, 7942, 116, 114, 187, 7773, 101, 115, 115, 187, 7802, 384, 97, 101, 105, 7954, 7958, 7962, 108, 115, 59, 16445, 115, 116, 59, 25183, 118, 256, 59, 68, 565, 7968, 68, 59, 27256, 112, 97, 114, 115, 108, 59, 27109, 256, 68, 97, 7983, 7987, 111, 116, 59, 25171, 114, 114, 59, 26993, 384, 99, 100, 105, 7998, 8001, 7928, 114, 59, 24879, 111, 244, 850, 256, 97, 104, 8009, 8011, 59, 17335, 32827, 240, 16624, 256, 109, 114, 8019, 8023, 108, 32827, 235, 16619, 111, 59, 24748, 384, 99, 105, 112, 8033, 8036, 8039, 108, 59, 16417, 115, 244, 1390, 256, 101, 111, 8044, 8052, 99, 116, 97, 116, 105, 111, 238, 1369, 110, 101, 110, 116, 105, 97, 108, 229, 1401, 2529, 8082, 0, 8094, 0, 8097, 8103, 0, 0, 8134, 8140, 0, 8147, 0, 8166, 8170, 8192, 0, 8200, 8282, 108, 108, 105, 110, 103, 100, 111, 116, 115, 101, 241, 7748, 121, 59, 17476, 109, 97, 108, 101, 59, 26176, 384, 105, 108, 114, 8109, 8115, 8129, 108, 105, 103, 59, 32768, 64259, 617, 8121, 0, 0, 8125, 103, 59, 32768, 64256, 105, 103, 59, 32768, 64260, 59, 49152, 55349, 56611, 108, 105, 103, 59, 32768, 64257, 108, 105, 103, 59, 49152, 102, 106, 384, 97, 108, 116, 8153, 8156, 8161, 116, 59, 26221, 105, 103, 59, 32768, 64258, 110, 115, 59, 26033, 111, 102, 59, 16786, 496, 8174, 0, 8179, 102, 59, 49152, 55349, 56663, 256, 97, 107, 1471, 8183, 256, 59, 118, 8188, 8189, 25300, 59, 27353, 97, 114, 116, 105, 110, 116, 59, 27149, 256, 97, 111, 8204, 8277, 256, 99, 115, 8209, 8274, 945, 8218, 8240, 8248, 8261, 8264, 0, 8272, 946, 8226, 8229, 8231, 8234, 8236, 0, 8238, 32827, 189, 16573, 59, 24915, 32827, 188, 16572, 59, 24917, 59, 24921, 59, 24923, 435, 8244, 0, 8246, 59, 24916, 59, 24918, 692, 8254, 8257, 0, 0, 8259, 32827, 190, 16574, 59, 24919, 59, 24924, 53, 59, 24920, 438, 8268, 0, 8270, 59, 24922, 59, 24925, 56, 59, 24926, 108, 59, 24644, 119, 110, 59, 25378, 99, 114, 59, 49152, 55349, 56507, 2176, 69, 97, 98, 99, 100, 101, 102, 103, 105, 106, 108, 110, 111, 114, 115, 116, 118, 8322, 8329, 8351, 8357, 8368, 8372, 8432, 8437, 8442, 8447, 8451, 8466, 8504, 791, 8510, 8530, 8606, 256, 59, 108, 1613, 8327, 59, 27276, 384, 99, 109, 112, 8336, 8341, 8349, 117, 116, 101, 59, 16885, 109, 97, 256, 59, 100, 8348, 7386, 17331, 59, 27270, 114, 101, 118, 101, 59, 16671, 256, 105, 121, 8362, 8366, 114, 99, 59, 16669, 59, 17459, 111, 116, 59, 16673, 512, 59, 108, 113, 115, 1598, 1602, 8381, 8393, 384, 59, 113, 115, 1598, 1612, 8388, 108, 97, 110, 244, 1637, 512, 59, 99, 100, 108, 1637, 8402, 8405, 8421, 99, 59, 27305, 111, 116, 256, 59, 111, 8412, 8413, 27264, 256, 59, 108, 8418, 8419, 27266, 59, 27268, 256, 59, 101, 8426, 8429, 49152, 8923, 65024, 115, 59, 27284, 114, 59, 49152, 55349, 56612, 256, 59, 103, 1651, 1563, 109, 101, 108, 59, 24887, 99, 121, 59, 17491, 512, 59, 69, 97, 106, 1626, 8460, 8462, 8464, 59, 27282, 59, 27301, 59, 27300, 512, 69, 97, 101, 115, 8475, 8477, 8489, 8500, 59, 25193, 112, 256, 59, 112, 8483, 8484, 27274, 114, 111, 120, 187, 8484, 256, 59, 113, 8494, 8495, 27272, 256, 59, 113, 8494, 8475, 105, 109, 59, 25319, 112, 102, 59, 49152, 55349, 56664, 256, 99, 105, 8515, 8518, 114, 59, 24842, 109, 384, 59, 101, 108, 1643, 8526, 8528, 59, 27278, 59, 27280, 33536, 62, 59, 99, 100, 108, 113, 114, 1518, 8544, 8554, 8558, 8563, 8569, 256, 99, 105, 8549, 8551, 59, 27303, 114, 59, 27258, 111, 116, 59, 25303, 80, 97, 114, 59, 27029, 117, 101, 115, 116, 59, 27260, 640, 97, 100, 101, 108, 115, 8580, 8554, 8592, 1622, 8603, 496, 8585, 0, 8590, 112, 114, 111, 248, 8350, 114, 59, 27000, 113, 256, 108, 113, 1599, 8598, 108, 101, 115, 243, 8328, 105, 237, 1643, 256, 101, 110, 8611, 8621, 114, 116, 110, 101, 113, 113, 59, 49152, 8809, 65024, 197, 8618, 1280, 65, 97, 98, 99, 101, 102, 107, 111, 115, 121, 8644, 8647, 8689, 8693, 8698, 8728, 8733, 8751, 8808, 8829, 114, 242, 928, 512, 105, 108, 109, 114, 8656, 8660, 8663, 8667, 114, 115, 240, 5252, 102, 187, 8228, 105, 108, 244, 1705, 256, 100, 114, 8672, 8676, 99, 121, 59, 17482, 384, 59, 99, 119, 2292, 8683, 8687, 105, 114, 59, 26952, 59, 25005, 97, 114, 59, 24847, 105, 114, 99, 59, 16677, 384, 97, 108, 114, 8705, 8718, 8723, 114, 116, 115, 256, 59, 117, 8713, 8714, 26213, 105, 116, 187, 8714, 108, 105, 112, 59, 24614, 99, 111, 110, 59, 25273, 114, 59, 49152, 55349, 56613, 115, 256, 101, 119, 8739, 8745, 97, 114, 111, 119, 59, 26917, 97, 114, 111, 119, 59, 26918, 640, 97, 109, 111, 112, 114, 8762, 8766, 8771, 8798, 8803, 114, 114, 59, 25087, 116, 104, 116, 59, 25147, 107, 256, 108, 114, 8777, 8787, 101, 102, 116, 97, 114, 114, 111, 119, 59, 25001, 105, 103, 104, 116, 97, 114, 114, 111, 119, 59, 25002, 102, 59, 49152, 55349, 56665, 98, 97, 114, 59, 24597, 384, 99, 108, 116, 8815, 8820, 8824, 114, 59, 49152, 55349, 56509, 97, 115, 232, 8692, 114, 111, 107, 59, 16679, 256, 98, 112, 8834, 8839, 117, 108, 108, 59, 24643, 104, 101, 110, 187, 7259, 2785, 8867, 0, 8874, 0, 8888, 8901, 8910, 0, 8917, 8947, 0, 0, 8952, 8994, 9063, 9058, 9087, 0, 9094, 9130, 9140, 99, 117, 116, 101, 32827, 237, 16621, 384, 59, 105, 121, 1905, 8880, 8885, 114, 99, 32827, 238, 16622, 59, 17464, 256, 99, 120, 8892, 8895, 121, 59, 17461, 99, 108, 32827, 161, 16545, 256, 102, 114, 927, 8905, 59, 49152, 55349, 56614, 114, 97, 118, 101, 32827, 236, 16620, 512, 59, 105, 110, 111, 1854, 8925, 8937, 8942, 256, 105, 110, 8930, 8934, 110, 116, 59, 27148, 116, 59, 25133, 102, 105, 110, 59, 27100, 116, 97, 59, 24873, 108, 105, 103, 59, 16691, 384, 97, 111, 112, 8958, 8986, 8989, 384, 99, 103, 116, 8965, 8968, 8983, 114, 59, 16683, 384, 101, 108, 112, 1823, 8975, 8979, 105, 110, 229, 1934, 97, 114, 244, 1824, 104, 59, 16689, 102, 59, 25271, 101, 100, 59, 16821, 640, 59, 99, 102, 111, 116, 1268, 9004, 9009, 9021, 9025, 97, 114, 101, 59, 24837, 105, 110, 256, 59, 116, 9016, 9017, 25118, 105, 101, 59, 27101, 100, 111, 244, 8985, 640, 59, 99, 101, 108, 112, 1879, 9036, 9040, 9051, 9057, 97, 108, 59, 25274, 256, 103, 114, 9045, 9049, 101, 114, 243, 5475, 227, 9037, 97, 114, 104, 107, 59, 27159, 114, 111, 100, 59, 27196, 512, 99, 103, 112, 116, 9071, 9074, 9078, 9083, 121, 59, 17489, 111, 110, 59, 16687, 102, 59, 49152, 55349, 56666, 97, 59, 17337, 117, 101, 115, 116, 32827, 191, 16575, 256, 99, 105, 9098, 9103, 114, 59, 49152, 55349, 56510, 110, 640, 59, 69, 100, 115, 118, 1268, 9115, 9117, 9121, 1267, 59, 25337, 111, 116, 59, 25333, 256, 59, 118, 9126, 9127, 25332, 59, 25331, 256, 59, 105, 1911, 9134, 108, 100, 101, 59, 16681, 491, 9144, 0, 9148, 99, 121, 59, 17494, 108, 32827, 239, 16623, 768, 99, 102, 109, 111, 115, 117, 9164, 9175, 9180, 9185, 9191, 9205, 256, 105, 121, 9169, 9173, 114, 99, 59, 16693, 59, 17465, 114, 59, 49152, 55349, 56615, 97, 116, 104, 59, 16951, 112, 102, 59, 49152, 55349, 56667, 483, 9196, 0, 9201, 114, 59, 49152, 55349, 56511, 114, 99, 121, 59, 17496, 107, 99, 121, 59, 17492, 1024, 97, 99, 102, 103, 104, 106, 111, 115, 9227, 9238, 9250, 9255, 9261, 9265, 9269, 9275, 112, 112, 97, 256, 59, 118, 9235, 9236, 17338, 59, 17392, 256, 101, 121, 9243, 9248, 100, 105, 108, 59, 16695, 59, 17466, 114, 59, 49152, 55349, 56616, 114, 101, 101, 110, 59, 16696, 99, 121, 59, 17477, 99, 121, 59, 17500, 112, 102, 59, 49152, 55349, 56668, 99, 114, 59, 49152, 55349, 56512, 2944, 65, 66, 69, 72, 97, 98, 99, 100, 101, 102, 103, 104, 106, 108, 109, 110, 111, 112, 114, 115, 116, 117, 118, 9328, 9345, 9350, 9357, 9361, 9486, 9533, 9562, 9600, 9806, 9822, 9829, 9849, 9853, 9882, 9906, 9944, 10077, 10088, 10123, 10176, 10241, 10258, 384, 97, 114, 116, 9335, 9338, 9340, 114, 242, 2502, 242, 917, 97, 105, 108, 59, 26907, 97, 114, 114, 59, 26894, 256, 59, 103, 2452, 9355, 59, 27275, 97, 114, 59, 26978, 2403, 9381, 0, 9386, 0, 9393, 0, 0, 0, 0, 0, 9397, 9402, 0, 9414, 9416, 9421, 0, 9465, 117, 116, 101, 59, 16698, 109, 112, 116, 121, 118, 59, 27060, 114, 97, 238, 2124, 98, 100, 97, 59, 17339, 103, 384, 59, 100, 108, 2190, 9409, 9411, 59, 27025, 229, 2190, 59, 27269, 117, 111, 32827, 171, 16555, 114, 1024, 59, 98, 102, 104, 108, 112, 115, 116, 2201, 9438, 9446, 9449, 9451, 9454, 9457, 9461, 256, 59, 102, 2205, 9443, 115, 59, 26911, 115, 59, 26909, 235, 8786, 112, 59, 25003, 108, 59, 26937, 105, 109, 59, 26995, 108, 59, 24994, 384, 59, 97, 101, 9471, 9472, 9476, 27307, 105, 108, 59, 26905, 256, 59, 115, 9481, 9482, 27309, 59, 49152, 10925, 65024, 384, 97, 98, 114, 9493, 9497, 9501, 114, 114, 59, 26892, 114, 107, 59, 26482, 256, 97, 107, 9506, 9516, 99, 256, 101, 107, 9512, 9514, 59, 16507, 59, 16475, 256, 101, 115, 9521, 9523, 59, 27019, 108, 256, 100, 117, 9529, 9531, 59, 27023, 59, 27021, 512, 97, 101, 117, 121, 9542, 9547, 9558, 9560, 114, 111, 110, 59, 16702, 256, 100, 105, 9552, 9556, 105, 108, 59, 16700, 236, 2224, 226, 9513, 59, 17467, 512, 99, 113, 114, 115, 9571, 9574, 9581, 9597, 97, 59, 26934, 117, 111, 256, 59, 114, 3609, 5958, 256, 100, 117, 9586, 9591, 104, 97, 114, 59, 26983, 115, 104, 97, 114, 59, 26955, 104, 59, 25010, 640, 59, 102, 103, 113, 115, 9611, 9612, 2441, 9715, 9727, 25188, 116, 640, 97, 104, 108, 114, 116, 9624, 9636, 9655, 9666, 9704, 114, 114, 111, 119, 256, 59, 116, 2201, 9633, 97, 233, 9462, 97, 114, 112, 111, 111, 110, 256, 100, 117, 9647, 9652, 111, 119, 110, 187, 1114, 112, 187, 2406, 101, 102, 116, 97, 114, 114, 111, 119, 115, 59, 25031, 105, 103, 104, 116, 384, 97, 104, 115, 9677, 9686, 9694, 114, 114, 111, 119, 256, 59, 115, 2292, 2215, 97, 114, 112, 111, 111, 110, 243, 3992, 113, 117, 105, 103, 97, 114, 114, 111, 247, 8688, 104, 114, 101, 101, 116, 105, 109, 101, 115, 59, 25291, 384, 59, 113, 115, 9611, 2451, 9722, 108, 97, 110, 244, 2476, 640, 59, 99, 100, 103, 115, 2476, 9738, 9741, 9757, 9768, 99, 59, 27304, 111, 116, 256, 59, 111, 9748, 9749, 27263, 256, 59, 114, 9754, 9755, 27265, 59, 27267, 256, 59, 101, 9762, 9765, 49152, 8922, 65024, 115, 59, 27283, 640, 97, 100, 101, 103, 115, 9779, 9785, 9789, 9801, 9803, 112, 112, 114, 111, 248, 9414, 111, 116, 59, 25302, 113, 256, 103, 113, 9795, 9797, 244, 2441, 103, 116, 242, 9356, 244, 2459, 105, 237, 2482, 384, 105, 108, 114, 9813, 2273, 9818, 115, 104, 116, 59, 27004, 59, 49152, 55349, 56617, 256, 59, 69, 2460, 9827, 59, 27281, 353, 9833, 9846, 114, 256, 100, 117, 9650, 9838, 256, 59, 108, 2405, 9843, 59, 26986, 108, 107, 59, 25988, 99, 121, 59, 17497, 640, 59, 97, 99, 104, 116, 2632, 9864, 9867, 9873, 9878, 114, 242, 9665, 111, 114, 110, 101, 242, 7432, 97, 114, 100, 59, 26987, 114, 105, 59, 26106, 256, 105, 111, 9887, 9892, 100, 111, 116, 59, 16704, 117, 115, 116, 256, 59, 97, 9900, 9901, 25520, 99, 104, 101, 187, 9901, 512, 69, 97, 101, 115, 9915, 9917, 9929, 9940, 59, 25192, 112, 256, 59, 112, 9923, 9924, 27273, 114, 111, 120, 187, 9924, 256, 59, 113, 9934, 9935, 27271, 256, 59, 113, 9934, 9915, 105, 109, 59, 25318, 1024, 97, 98, 110, 111, 112, 116, 119, 122, 9961, 9972, 9975, 10010, 10031, 10049, 10055, 10064, 256, 110, 114, 9966, 9969, 103, 59, 26604, 114, 59, 25085, 114, 235, 2241, 103, 384, 108, 109, 114, 9983, 9997, 10004, 101, 102, 116, 256, 97, 114, 2534, 9991, 105, 103, 104, 116, 225, 2546, 97, 112, 115, 116, 111, 59, 26620, 105, 103, 104, 116, 225, 2557, 112, 97, 114, 114, 111, 119, 256, 108, 114, 10021, 10025, 101, 102, 244, 9453, 105, 103, 104, 116, 59, 25004, 384, 97, 102, 108, 10038, 10041, 10045, 114, 59, 27013, 59, 49152, 55349, 56669, 117, 115, 59, 27181, 105, 109, 101, 115, 59, 27188, 353, 10059, 10063, 115, 116, 59, 25111, 225, 4942, 384, 59, 101, 102, 10071, 10072, 6144, 26058, 110, 103, 101, 187, 10072, 97, 114, 256, 59, 108, 10084, 10085, 16424, 116, 59, 27027, 640, 97, 99, 104, 109, 116, 10099, 10102, 10108, 10117, 10119, 114, 242, 2216, 111, 114, 110, 101, 242, 7564, 97, 114, 256, 59, 100, 3992, 10115, 59, 26989, 59, 24590, 114, 105, 59, 25279, 768, 97, 99, 104, 105, 113, 116, 10136, 10141, 2624, 10146, 10158, 10171, 113, 117, 111, 59, 24633, 114, 59, 49152, 55349, 56513, 109, 384, 59, 101, 103, 2482, 10154, 10156, 59, 27277, 59, 27279, 256, 98, 117, 9514, 10163, 111, 256, 59, 114, 3615, 10169, 59, 24602, 114, 111, 107, 59, 16706, 33792, 60, 59, 99, 100, 104, 105, 108, 113, 114, 2091, 10194, 9785, 10204, 10208, 10213, 10218, 10224, 256, 99, 105, 10199, 10201, 59, 27302, 114, 59, 27257, 114, 101, 229, 9714, 109, 101, 115, 59, 25289, 97, 114, 114, 59, 26998, 117, 101, 115, 116, 59, 27259, 256, 80, 105, 10229, 10233, 97, 114, 59, 27030, 384, 59, 101, 102, 10240, 2349, 6171, 26051, 114, 256, 100, 117, 10247, 10253, 115, 104, 97, 114, 59, 26954, 104, 97, 114, 59, 26982, 256, 101, 110, 10263, 10273, 114, 116, 110, 101, 113, 113, 59, 49152, 8808, 65024, 197, 10270, 1792, 68, 97, 99, 100, 101, 102, 104, 105, 108, 110, 111, 112, 115, 117, 10304, 10309, 10370, 10382, 10387, 10400, 10405, 10408, 10458, 10466, 10468, 2691, 10483, 10498, 68, 111, 116, 59, 25146, 512, 99, 108, 112, 114, 10318, 10322, 10339, 10365, 114, 32827, 175, 16559, 256, 101, 116, 10327, 10329, 59, 26178, 256, 59, 101, 10334, 10335, 26400, 115, 101, 187, 10335, 256, 59, 115, 4155, 10344, 116, 111, 512, 59, 100, 108, 117, 4155, 10355, 10359, 10363, 111, 119, 238, 1164, 101, 102, 244, 2319, 240, 5073, 107, 101, 114, 59, 26030, 256, 111, 121, 10375, 10380, 109, 109, 97, 59, 27177, 59, 17468, 97, 115, 104, 59, 24596, 97, 115, 117, 114, 101, 100, 97, 110, 103, 108, 101, 187, 5670, 114, 59, 49152, 55349, 56618, 111, 59, 24871, 384, 99, 100, 110, 10415, 10420, 10441, 114, 111, 32827, 181, 16565, 512, 59, 97, 99, 100, 5220, 10429, 10432, 10436, 115, 244, 5799, 105, 114, 59, 27376, 111, 116, 32955, 183, 437, 117, 115, 384, 59, 98, 100, 10450, 6403, 10451, 25106, 256, 59, 117, 7484, 10456, 59, 27178, 355, 10462, 10465, 112, 59, 27355, 242, 8722, 240, 2689, 256, 100, 112, 10473, 10478, 101, 108, 115, 59, 25255, 102, 59, 49152, 55349, 56670, 256, 99, 116, 10488, 10493, 114, 59, 49152, 55349, 56514, 112, 111, 115, 187, 5533, 384, 59, 108, 109, 10505, 10506, 10509, 17340, 116, 105, 109, 97, 112, 59, 25272, 3072, 71, 76, 82, 86, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 108, 109, 111, 112, 114, 115, 116, 117, 118, 119, 10562, 10579, 10622, 10633, 10648, 10714, 10729, 10773, 10778, 10840, 10845, 10883, 10901, 10916, 10920, 11012, 11015, 11076, 11135, 11182, 11316, 11367, 11388, 11497, 256, 103, 116, 10567, 10571, 59, 49152, 8921, 824, 256, 59, 118, 10576, 3023, 49152, 8811, 8402, 384, 101, 108, 116, 10586, 10610, 10614, 102, 116, 256, 97, 114, 10593, 10599, 114, 114, 111, 119, 59, 25037, 105, 103, 104, 116, 97, 114, 114, 111, 119, 59, 25038, 59, 49152, 8920, 824, 256, 59, 118, 10619, 3143, 49152, 8810, 8402, 105, 103, 104, 116, 97, 114, 114, 111, 119, 59, 25039, 256, 68, 100, 10638, 10643, 97, 115, 104, 59, 25263, 97, 115, 104, 59, 25262, 640, 98, 99, 110, 112, 116, 10659, 10663, 10668, 10673, 10700, 108, 97, 187, 734, 117, 116, 101, 59, 16708, 103, 59, 49152, 8736, 8402, 640, 59, 69, 105, 111, 112, 3460, 10684, 10688, 10693, 10696, 59, 49152, 10864, 824, 100, 59, 49152, 8779, 824, 115, 59, 16713, 114, 111, 248, 3460, 117, 114, 256, 59, 97, 10707, 10708, 26222, 108, 256, 59, 115, 10707, 2872, 499, 10719, 0, 10723, 112, 32955, 160, 2871, 109, 112, 256, 59, 101, 3065, 3072, 640, 97, 101, 111, 117, 121, 10740, 10750, 10755, 10768, 10771, 496, 10745, 0, 10747, 59, 27203, 111, 110, 59, 16712, 100, 105, 108, 59, 16710, 110, 103, 256, 59, 100, 3454, 10762, 111, 116, 59, 49152, 10861, 824, 112, 59, 27202, 59, 17469, 97, 115, 104, 59, 24595, 896, 59, 65, 97, 100, 113, 115, 120, 2962, 10793, 10797, 10811, 10817, 10821, 10832, 114, 114, 59, 25047, 114, 256, 104, 114, 10803, 10806, 107, 59, 26916, 256, 59, 111, 5106, 5104, 111, 116, 59, 49152, 8784, 824, 117, 105, 246, 2915, 256, 101, 105, 10826, 10830, 97, 114, 59, 26920, 237, 2968, 105, 115, 116, 256, 59, 115, 2976, 2975, 114, 59, 49152, 55349, 56619, 512, 69, 101, 115, 116, 3013, 10854, 10873, 10876, 384, 59, 113, 115, 3004, 10861, 3041, 384, 59, 113, 115, 3004, 3013, 10868, 108, 97, 110, 244, 3042, 105, 237, 3050, 256, 59, 114, 2998, 10881, 187, 2999, 384, 65, 97, 112, 10890, 10893, 10897, 114, 242, 10609, 114, 114, 59, 25006, 97, 114, 59, 27378, 384, 59, 115, 118, 3981, 10908, 3980, 256, 59, 100, 10913, 10914, 25340, 59, 25338, 99, 121, 59, 17498, 896, 65, 69, 97, 100, 101, 115, 116, 10935, 10938, 10942, 10946, 10949, 10998, 11001, 114, 242, 10598, 59, 49152, 8806, 824, 114, 114, 59, 24986, 114, 59, 24613, 512, 59, 102, 113, 115, 3131, 10958, 10979, 10991, 116, 256, 97, 114, 10964, 10969, 114, 114, 111, 247, 10945, 105, 103, 104, 116, 97, 114, 114, 111, 247, 10896, 384, 59, 113, 115, 3131, 10938, 10986, 108, 97, 110, 244, 3157, 256, 59, 115, 3157, 10996, 187, 3126, 105, 237, 3165, 256, 59, 114, 3125, 11006, 105, 256, 59, 101, 3098, 3109, 105, 228, 3472, 256, 112, 116, 11020, 11025, 102, 59, 49152, 55349, 56671, 33152, 172, 59, 105, 110, 11033, 11034, 11062, 16556, 110, 512, 59, 69, 100, 118, 2953, 11044, 11048, 11054, 59, 49152, 8953, 824, 111, 116, 59, 49152, 8949, 824, 481, 2953, 11059, 11061, 59, 25335, 59, 25334, 105, 256, 59, 118, 3256, 11068, 481, 3256, 11073, 11075, 59, 25342, 59, 25341, 384, 97, 111, 114, 11083, 11107, 11113, 114, 512, 59, 97, 115, 116, 2939, 11093, 11098, 11103, 108, 108, 101, 236, 2939, 108, 59, 49152, 11005, 8421, 59, 49152, 8706, 824, 108, 105, 110, 116, 59, 27156, 384, 59, 99, 101, 3218, 11120, 11123, 117, 229, 3237, 256, 59, 99, 3224, 11128, 256, 59, 101, 3218, 11133, 241, 3224, 512, 65, 97, 105, 116, 11144, 11147, 11165, 11175, 114, 242, 10632, 114, 114, 384, 59, 99, 119, 11156, 11157, 11161, 24987, 59, 49152, 10547, 824, 59, 49152, 8605, 824, 103, 104, 116, 97, 114, 114, 111, 119, 187, 11157, 114, 105, 256, 59, 101, 3275, 3286, 896, 99, 104, 105, 109, 112, 113, 117, 11197, 11213, 11225, 11012, 2936, 11236, 11247, 512, 59, 99, 101, 114, 3378, 11206, 3383, 11209, 117, 229, 3397, 59, 49152, 55349, 56515, 111, 114, 116, 621, 11013, 0, 0, 11222, 97, 114, 225, 11094, 109, 256, 59, 101, 3438, 11231, 256, 59, 113, 3444, 3443, 115, 117, 256, 98, 112, 11243, 11245, 229, 3320, 229, 3339, 384, 98, 99, 112, 11254, 11281, 11289, 512, 59, 69, 101, 115, 11263, 11264, 3362, 11268, 25220, 59, 49152, 10949, 824, 101, 116, 256, 59, 101, 3355, 11275, 113, 256, 59, 113, 3363, 11264, 99, 256, 59, 101, 3378, 11287, 241, 3384, 512, 59, 69, 101, 115, 11298, 11299, 3423, 11303, 25221, 59, 49152, 10950, 824, 101, 116, 256, 59, 101, 3416, 11310, 113, 256, 59, 113, 3424, 11299, 512, 103, 105, 108, 114, 11325, 11327, 11333, 11335, 236, 3031, 108, 100, 101, 32827, 241, 16625, 231, 3139, 105, 97, 110, 103, 108, 101, 256, 108, 114, 11346, 11356, 101, 102, 116, 256, 59, 101, 3098, 11354, 241, 3110, 105, 103, 104, 116, 256, 59, 101, 3275, 11365, 241, 3287, 256, 59, 109, 11372, 11373, 17341, 384, 59, 101, 115, 11380, 11381, 11385, 16419, 114, 111, 59, 24854, 112, 59, 24583, 1152, 68, 72, 97, 100, 103, 105, 108, 114, 115, 11407, 11412, 11417, 11422, 11427, 11440, 11446, 11475, 11491, 97, 115, 104, 59, 25261, 97, 114, 114, 59, 26884, 112, 59, 49152, 8781, 8402, 97, 115, 104, 59, 25260, 256, 101, 116, 11432, 11436, 59, 49152, 8805, 8402, 59, 49152, 62, 8402, 110, 102, 105, 110, 59, 27102, 384, 65, 101, 116, 11453, 11457, 11461, 114, 114, 59, 26882, 59, 49152, 8804, 8402, 256, 59, 114, 11466, 11469, 49152, 60, 8402, 105, 101, 59, 49152, 8884, 8402, 256, 65, 116, 11480, 11484, 114, 114, 59, 26883, 114, 105, 101, 59, 49152, 8885, 8402, 105, 109, 59, 49152, 8764, 8402, 384, 65, 97, 110, 11504, 11508, 11522, 114, 114, 59, 25046, 114, 256, 104, 114, 11514, 11517, 107, 59, 26915, 256, 59, 111, 5095, 5093, 101, 97, 114, 59, 26919, 4691, 6805, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11565, 0, 11576, 11592, 11616, 11621, 11634, 11652, 6919, 0, 0, 11661, 11691, 0, 11720, 11726, 0, 11740, 11801, 11819, 11838, 11843, 256, 99, 115, 11569, 6807, 117, 116, 101, 32827, 243, 16627, 256, 105, 121, 11580, 11589, 114, 256, 59, 99, 6814, 11586, 32827, 244, 16628, 59, 17470, 640, 97, 98, 105, 111, 115, 6816, 11602, 11607, 456, 11610, 108, 97, 99, 59, 16721, 118, 59, 27192, 111, 108, 100, 59, 27068, 108, 105, 103, 59, 16723, 256, 99, 114, 11625, 11629, 105, 114, 59, 27071, 59, 49152, 55349, 56620, 879, 11641, 0, 0, 11644, 0, 11650, 110, 59, 17115, 97, 118, 101, 32827, 242, 16626, 59, 27073, 256, 98, 109, 11656, 3572, 97, 114, 59, 27061, 512, 97, 99, 105, 116, 11669, 11672, 11685, 11688, 114, 242, 6784, 256, 105, 114, 11677, 11680, 114, 59, 27070, 111, 115, 115, 59, 27067, 110, 229, 3666, 59, 27072, 384, 97, 101, 105, 11697, 11701, 11705, 99, 114, 59, 16717, 103, 97, 59, 17353, 384, 99, 100, 110, 11712, 11717, 461, 114, 111, 110, 59, 17343, 59, 27062, 112, 102, 59, 49152, 55349, 56672, 384, 97, 101, 108, 11732, 11735, 466, 114, 59, 27063, 114, 112, 59, 27065, 896, 59, 97, 100, 105, 111, 115, 118, 11754, 11755, 11758, 11784, 11789, 11792, 11798, 25128, 114, 242, 6790, 512, 59, 101, 102, 109, 11767, 11768, 11778, 11781, 27229, 114, 256, 59, 111, 11774, 11775, 24884, 102, 187, 11775, 32827, 170, 16554, 32827, 186, 16570, 103, 111, 102, 59, 25270, 114, 59, 27222, 108, 111, 112, 101, 59, 27223, 59, 27227, 384, 99, 108, 111, 11807, 11809, 11815, 242, 11777, 97, 115, 104, 32827, 248, 16632, 108, 59, 25240, 105, 364, 11823, 11828, 100, 101, 32827, 245, 16629, 101, 115, 256, 59, 97, 475, 11834, 115, 59, 27190, 109, 108, 32827, 246, 16630, 98, 97, 114, 59, 25405, 2785, 11870, 0, 11901, 0, 11904, 11933, 0, 11938, 11961, 0, 0, 11979, 3740, 0, 12051, 0, 0, 12075, 12220, 0, 12232, 114, 512, 59, 97, 115, 116, 1027, 11879, 11890, 3717, 33024, 182, 59, 108, 11885, 11886, 16566, 108, 101, 236, 1027, 617, 11896, 0, 0, 11899, 109, 59, 27379, 59, 27389, 121, 59, 17471, 114, 640, 99, 105, 109, 112, 116, 11915, 11919, 11923, 6245, 11927, 110, 116, 59, 16421, 111, 100, 59, 16430, 105, 108, 59, 24624, 101, 110, 107, 59, 24625, 114, 59, 49152, 55349, 56621, 384, 105, 109, 111, 11944, 11952, 11956, 256, 59, 118, 11949, 11950, 17350, 59, 17365, 109, 97, 244, 2678, 110, 101, 59, 26126, 384, 59, 116, 118, 11967, 11968, 11976, 17344, 99, 104, 102, 111, 114, 107, 187, 8189, 59, 17366, 256, 97, 117, 11983, 11999, 110, 256, 99, 107, 11989, 11997, 107, 256, 59, 104, 8692, 11995, 59, 24846, 246, 8692, 115, 1152, 59, 97, 98, 99, 100, 101, 109, 115, 116, 12019, 12020, 6408, 12025, 12029, 12036, 12038, 12042, 12046, 16427, 99, 105, 114, 59, 27171, 105, 114, 59, 27170, 256, 111, 117, 7488, 12034, 59, 27173, 59, 27250, 110, 32955, 177, 3741, 105, 109, 59, 27174, 119, 111, 59, 27175, 384, 105, 112, 117, 12057, 12064, 12069, 110, 116, 105, 110, 116, 59, 27157, 102, 59, 49152, 55349, 56673, 110, 100, 32827, 163, 16547, 1280, 59, 69, 97, 99, 101, 105, 110, 111, 115, 117, 3784, 12095, 12097, 12100, 12103, 12161, 12169, 12178, 12158, 12214, 59, 27315, 112, 59, 27319, 117, 229, 3801, 256, 59, 99, 3790, 12108, 768, 59, 97, 99, 101, 110, 115, 3784, 12121, 12127, 12134, 12136, 12158, 112, 112, 114, 111, 248, 12099, 117, 114, 108, 121, 101, 241, 3801, 241, 3790, 384, 97, 101, 115, 12143, 12150, 12154, 112, 112, 114, 111, 120, 59, 27321, 113, 113, 59, 27317, 105, 109, 59, 25320, 105, 237, 3807, 109, 101, 256, 59, 115, 12168, 3758, 24626, 384, 69, 97, 115, 12152, 12176, 12154, 240, 12149, 384, 100, 102, 112, 3820, 12185, 12207, 384, 97, 108, 115, 12192, 12197, 12202, 108, 97, 114, 59, 25390, 105, 110, 101, 59, 25362, 117, 114, 102, 59, 25363, 256, 59, 116, 3835, 12212, 239, 3835, 114, 101, 108, 59, 25264, 256, 99, 105, 12224, 12229, 114, 59, 49152, 55349, 56517, 59, 17352, 110, 99, 115, 112, 59, 24584, 768, 102, 105, 111, 112, 115, 117, 12250, 8930, 12255, 12261, 12267, 12273, 114, 59, 49152, 55349, 56622, 112, 102, 59, 49152, 55349, 56674, 114, 105, 109, 101, 59, 24663, 99, 114, 59, 49152, 55349, 56518, 384, 97, 101, 111, 12280, 12297, 12307, 116, 256, 101, 105, 12286, 12293, 114, 110, 105, 111, 110, 243, 1712, 110, 116, 59, 27158, 115, 116, 256, 59, 101, 12304, 12305, 16447, 241, 7961, 244, 3860, 2688, 65, 66, 72, 97, 98, 99, 100, 101, 102, 104, 105, 108, 109, 110, 111, 112, 114, 115, 116, 117, 120, 12352, 12369, 12373, 12377, 12512, 12558, 12587, 12615, 12642, 12658, 12686, 12806, 12821, 12836, 12841, 12888, 12910, 12914, 12944, 12976, 12983, 384, 97, 114, 116, 12359, 12362, 12364, 114, 242, 4275, 242, 989, 97, 105, 108, 59, 26908, 97, 114, 242, 7269, 97, 114, 59, 26980, 896, 99, 100, 101, 110, 113, 114, 116, 12392, 12405, 12408, 12415, 12431, 12436, 12492, 256, 101, 117, 12397, 12401, 59, 49152, 8765, 817, 116, 101, 59, 16725, 105, 227, 4462, 109, 112, 116, 121, 118, 59, 27059, 103, 512, 59, 100, 101, 108, 4049, 12425, 12427, 12429, 59, 27026, 59, 27045, 229, 4049, 117, 111, 32827, 187, 16571, 114, 1408, 59, 97, 98, 99, 102, 104, 108, 112, 115, 116, 119, 4060, 12460, 12463, 12471, 12473, 12476, 12478, 12480, 12483, 12487, 12490, 112, 59, 26997, 256, 59, 102, 4064, 12468, 115, 59, 26912, 59, 26931, 115, 59, 26910, 235, 8797, 240, 10030, 108, 59, 26949, 105, 109, 59, 26996, 108, 59, 24995, 59, 24989, 256, 97, 105, 12497, 12501, 105, 108, 59, 26906, 111, 256, 59, 110, 12507, 12508, 25142, 97, 108, 243, 3870, 384, 97, 98, 114, 12519, 12522, 12526, 114, 242, 6117, 114, 107, 59, 26483, 256, 97, 107, 12531, 12541, 99, 256, 101, 107, 12537, 12539, 59, 16509, 59, 16477, 256, 101, 115, 12546, 12548, 59, 27020, 108, 256, 100, 117, 12554, 12556, 59, 27022, 59, 27024, 512, 97, 101, 117, 121, 12567, 12572, 12583, 12585, 114, 111, 110, 59, 16729, 256, 100, 105, 12577, 12581, 105, 108, 59, 16727, 236, 4082, 226, 12538, 59, 17472, 512, 99, 108, 113, 115, 12596, 12599, 12605, 12612, 97, 59, 26935, 100, 104, 97, 114, 59, 26985, 117, 111, 256, 59, 114, 526, 525, 104, 59, 25011, 384, 97, 99, 103, 12622, 12639, 3908, 108, 512, 59, 105, 112, 115, 3960, 12632, 12635, 4252, 110, 229, 4283, 97, 114, 244, 4009, 116, 59, 26029, 384, 105, 108, 114, 12649, 4131, 12654, 115, 104, 116, 59, 27005, 59, 49152, 55349, 56623, 256, 97, 111, 12663, 12678, 114, 256, 100, 117, 12669, 12671, 187, 1147, 256, 59, 108, 4241, 12676, 59, 26988, 256, 59, 118, 12683, 12684, 17345, 59, 17393, 384, 103, 110, 115, 12693, 12793, 12796, 104, 116, 768, 97, 104, 108, 114, 115, 116, 12708, 12720, 12738, 12760, 12772, 12782, 114, 114, 111, 119, 256, 59, 116, 4060, 12717, 97, 233, 12488, 97, 114, 112, 111, 111, 110, 256, 100, 117, 12731, 12735, 111, 119, 238, 12670, 112, 187, 4242, 101, 102, 116, 256, 97, 104, 12746, 12752, 114, 114, 111, 119, 243, 4074, 97, 114, 112, 111, 111, 110, 243, 1361, 105, 103, 104, 116, 97, 114, 114, 111, 119, 115, 59, 25033, 113, 117, 105, 103, 97, 114, 114, 111, 247, 12491, 104, 114, 101, 101, 116, 105, 109, 101, 115, 59, 25292, 103, 59, 17114, 105, 110, 103, 100, 111, 116, 115, 101, 241, 7986, 384, 97, 104, 109, 12813, 12816, 12819, 114, 242, 4074, 97, 242, 1361, 59, 24591, 111, 117, 115, 116, 256, 59, 97, 12830, 12831, 25521, 99, 104, 101, 187, 12831, 109, 105, 100, 59, 27374, 512, 97, 98, 112, 116, 12850, 12861, 12864, 12882, 256, 110, 114, 12855, 12858, 103, 59, 26605, 114, 59, 25086, 114, 235, 4099, 384, 97, 102, 108, 12871, 12874, 12878, 114, 59, 27014, 59, 49152, 55349, 56675, 117, 115, 59, 27182, 105, 109, 101, 115, 59, 27189, 256, 97, 112, 12893, 12903, 114, 256, 59, 103, 12899, 12900, 16425, 116, 59, 27028, 111, 108, 105, 110, 116, 59, 27154, 97, 114, 242, 12771, 512, 97, 99, 104, 113, 12923, 12928, 4284, 12933, 113, 117, 111, 59, 24634, 114, 59, 49152, 55349, 56519, 256, 98, 117, 12539, 12938, 111, 256, 59, 114, 532, 531, 384, 104, 105, 114, 12951, 12955, 12960, 114, 101, 229, 12792, 109, 101, 115, 59, 25290, 105, 512, 59, 101, 102, 108, 12970, 4185, 6177, 12971, 26041, 116, 114, 105, 59, 27086, 108, 117, 104, 97, 114, 59, 26984, 59, 24862, 3425, 13013, 13019, 13023, 13100, 13112, 13169, 0, 13178, 13220, 0, 0, 13292, 13296, 0, 13352, 13384, 13402, 13485, 13489, 13514, 13553, 0, 13846, 0, 0, 13875, 99, 117, 116, 101, 59, 16731, 113, 117, 239, 10170, 1280, 59, 69, 97, 99, 101, 105, 110, 112, 115, 121, 4589, 13043, 13045, 13055, 13058, 13067, 13071, 13087, 13094, 13097, 59, 27316, 496, 13050, 0, 13052, 59, 27320, 111, 110, 59, 16737, 117, 229, 4606, 256, 59, 100, 4595, 13063, 105, 108, 59, 16735, 114, 99, 59, 16733, 384, 69, 97, 115, 13078, 13080, 13083, 59, 27318, 112, 59, 27322, 105, 109, 59, 25321, 111, 108, 105, 110, 116, 59, 27155, 105, 237, 4612, 59, 17473, 111, 116, 384, 59, 98, 101, 13108, 7495, 13109, 25285, 59, 27238, 896, 65, 97, 99, 109, 115, 116, 120, 13126, 13130, 13143, 13147, 13150, 13155, 13165, 114, 114, 59, 25048, 114, 256, 104, 114, 13136, 13138, 235, 8744, 256, 59, 111, 2614, 2612, 116, 32827, 167, 16551, 105, 59, 16443, 119, 97, 114, 59, 26921, 109, 256, 105, 110, 13161, 240, 110, 117, 243, 241, 116, 59, 26422, 114, 256, 59, 111, 13174, 8277, 49152, 55349, 56624, 512, 97, 99, 111, 121, 13186, 13190, 13201, 13216, 114, 112, 59, 26223, 256, 104, 121, 13195, 13199, 99, 121, 59, 17481, 59, 17480, 114, 116, 621, 13209, 0, 0, 13212, 105, 228, 5220, 97, 114, 97, 236, 11887, 32827, 173, 16557, 256, 103, 109, 13224, 13236, 109, 97, 384, 59, 102, 118, 13233, 13234, 13234, 17347, 59, 17346, 1024, 59, 100, 101, 103, 108, 110, 112, 114, 4779, 13253, 13257, 13262, 13270, 13278, 13281, 13286, 111, 116, 59, 27242, 256, 59, 113, 4785, 4784, 256, 59, 69, 13267, 13268, 27294, 59, 27296, 256, 59, 69, 13275, 13276, 27293, 59, 27295, 101, 59, 25158, 108, 117, 115, 59, 27172, 97, 114, 114, 59, 26994, 97, 114, 242, 4413, 512, 97, 101, 105, 116, 13304, 13320, 13327, 13335, 256, 108, 115, 13309, 13316, 108, 115, 101, 116, 109, 233, 13162, 104, 112, 59, 27187, 112, 97, 114, 115, 108, 59, 27108, 256, 100, 108, 5219, 13332, 101, 59, 25379, 256, 59, 101, 13340, 13341, 27306, 256, 59, 115, 13346, 13347, 27308, 59, 49152, 10924, 65024, 384, 102, 108, 112, 13358, 13363, 13378, 116, 99, 121, 59, 17484, 256, 59, 98, 13368, 13369, 16431, 256, 59, 97, 13374, 13375, 27076, 114, 59, 25407, 102, 59, 49152, 55349, 56676, 97, 256, 100, 114, 13389, 1026, 101, 115, 256, 59, 117, 13396, 13397, 26208, 105, 116, 187, 13397, 384, 99, 115, 117, 13408, 13433, 13471, 256, 97, 117, 13413, 13423, 112, 256, 59, 115, 4488, 13419, 59, 49152, 8851, 65024, 112, 256, 59, 115, 4532, 13429, 59, 49152, 8852, 65024, 117, 256, 98, 112, 13439, 13455, 384, 59, 101, 115, 4503, 4508, 13446, 101, 116, 256, 59, 101, 4503, 13453, 241, 4509, 384, 59, 101, 115, 4520, 4525, 13462, 101, 116, 256, 59, 101, 4520, 13469, 241, 4526, 384, 59, 97, 102, 4475, 13478, 1456, 114, 357, 13483, 1457, 187, 4476, 97, 114, 242, 4424, 512, 99, 101, 109, 116, 13497, 13502, 13506, 13509, 114, 59, 49152, 55349, 56520, 116, 109, 238, 241, 105, 236, 13333, 97, 114, 230, 4542, 256, 97, 114, 13518, 13525, 114, 256, 59, 102, 13524, 6079, 26118, 256, 97, 110, 13530, 13549, 105, 103, 104, 116, 256, 101, 112, 13539, 13546, 112, 115, 105, 108, 111, 238, 7904, 104, 233, 11951, 115, 187, 10322, 640, 98, 99, 109, 110, 112, 13563, 13662, 4617, 13707, 13710, 1152, 59, 69, 100, 101, 109, 110, 112, 114, 115, 13582, 13583, 13585, 13589, 13598, 13603, 13612, 13617, 13622, 25218, 59, 27333, 111, 116, 59, 27325, 256, 59, 100, 4570, 13594, 111, 116, 59, 27331, 117, 108, 116, 59, 27329, 256, 69, 101, 13608, 13610, 59, 27339, 59, 25226, 108, 117, 115, 59, 27327, 97, 114, 114, 59, 27001, 384, 101, 105, 117, 13629, 13650, 13653, 116, 384, 59, 101, 110, 13582, 13637, 13643, 113, 256, 59, 113, 4570, 13583, 101, 113, 256, 59, 113, 13611, 13608, 109, 59, 27335, 256, 98, 112, 13658, 13660, 59, 27349, 59, 27347, 99, 768, 59, 97, 99, 101, 110, 115, 4589, 13676, 13682, 13689, 13691, 13094, 112, 112, 114, 111, 248, 13050, 117, 114, 108, 121, 101, 241, 4606, 241, 4595, 384, 97, 101, 115, 13698, 13704, 13083, 112, 112, 114, 111, 248, 13082, 113, 241, 13079, 103, 59, 26218, 1664, 49, 50, 51, 59, 69, 100, 101, 104, 108, 109, 110, 112, 115, 13737, 13740, 13743, 4636, 13746, 13748, 13760, 13769, 13781, 13786, 13791, 13800, 13805, 32827, 185, 16569, 32827, 178, 16562, 32827, 179, 16563, 59, 27334, 256, 111, 115, 13753, 13756, 116, 59, 27326, 117, 98, 59, 27352, 256, 59, 100, 4642, 13765, 111, 116, 59, 27332, 115, 256, 111, 117, 13775, 13778, 108, 59, 26569, 98, 59, 27351, 97, 114, 114, 59, 27003, 117, 108, 116, 59, 27330, 256, 69, 101, 13796, 13798, 59, 27340, 59, 25227, 108, 117, 115, 59, 27328, 384, 101, 105, 117, 13812, 13833, 13836, 116, 384, 59, 101, 110, 4636, 13820, 13826, 113, 256, 59, 113, 4642, 13746, 101, 113, 256, 59, 113, 13799, 13796, 109, 59, 27336, 256, 98, 112, 13841, 13843, 59, 27348, 59, 27350, 384, 65, 97, 110, 13852, 13856, 13869, 114, 114, 59, 25049, 114, 256, 104, 114, 13862, 13864, 235, 8750, 256, 59, 111, 2603, 2601, 119, 97, 114, 59, 26922, 108, 105, 103, 32827, 223, 16607, 3041, 13905, 13917, 13920, 4814, 13939, 13945, 0, 13950, 14018, 0, 0, 0, 0, 0, 14043, 14083, 0, 14089, 14188, 0, 0, 0, 14215, 626, 13910, 0, 0, 13915, 103, 101, 116, 59, 25366, 59, 17348, 114, 235, 3679, 384, 97, 101, 121, 13926, 13931, 13936, 114, 111, 110, 59, 16741, 100, 105, 108, 59, 16739, 59, 17474, 108, 114, 101, 99, 59, 25365, 114, 59, 49152, 55349, 56625, 512, 101, 105, 107, 111, 13958, 13981, 14005, 14012, 498, 13963, 0, 13969, 101, 256, 52, 102, 4740, 4737, 97, 384, 59, 115, 118, 13976, 13977, 13979, 17336, 121, 109, 59, 17361, 256, 99, 110, 13986, 14002, 107, 256, 97, 115, 13992, 13998, 112, 112, 114, 111, 248, 4801, 105, 109, 187, 4780, 115, 240, 4766, 256, 97, 115, 14010, 13998, 240, 4801, 114, 110, 32827, 254, 16638, 492, 799, 14022, 8935, 101, 115, 33152, 215, 59, 98, 100, 14031, 14032, 14040, 16599, 256, 59, 97, 6415, 14037, 114, 59, 27185, 59, 27184, 384, 101, 112, 115, 14049, 14051, 14080, 225, 10829, 512, 59, 98, 99, 102, 1158, 14060, 14064, 14068, 111, 116, 59, 25398, 105, 114, 59, 27377, 256, 59, 111, 14073, 14076, 49152, 55349, 56677, 114, 107, 59, 27354, 225, 13154, 114, 105, 109, 101, 59, 24628, 384, 97, 105, 112, 14095, 14098, 14180, 100, 229, 4680, 896, 97, 100, 101, 109, 112, 115, 116, 14113, 14157, 14144, 14161, 14167, 14172, 14175, 110, 103, 108, 101, 640, 59, 100, 108, 113, 114, 14128, 14129, 14134, 14144, 14146, 26037, 111, 119, 110, 187, 7611, 101, 102, 116, 256, 59, 101, 10240, 14142, 241, 2350, 59, 25180, 105, 103, 104, 116, 256, 59, 101, 12970, 14155, 241, 4186, 111, 116, 59, 26092, 105, 110, 117, 115, 59, 27194, 108, 117, 115, 59, 27193, 98, 59, 27085, 105, 109, 101, 59, 27195, 101, 122, 105, 117, 109, 59, 25570, 384, 99, 104, 116, 14194, 14205, 14209, 256, 114, 121, 14199, 14203, 59, 49152, 55349, 56521, 59, 17478, 99, 121, 59, 17499, 114, 111, 107, 59, 16743, 256, 105, 111, 14219, 14222, 120, 244, 6007, 104, 101, 97, 100, 256, 108, 114, 14231, 14240, 101, 102, 116, 97, 114, 114, 111, 247, 2127, 105, 103, 104, 116, 97, 114, 114, 111, 119, 187, 3933, 2304, 65, 72, 97, 98, 99, 100, 102, 103, 104, 108, 109, 111, 112, 114, 115, 116, 117, 119, 14288, 14291, 14295, 14308, 14320, 14332, 14350, 14364, 14371, 14388, 14417, 14429, 14443, 14505, 14540, 14546, 14570, 14582, 114, 242, 1005, 97, 114, 59, 26979, 256, 99, 114, 14300, 14306, 117, 116, 101, 32827, 250, 16634, 242, 4432, 114, 483, 14314, 0, 14317, 121, 59, 17502, 118, 101, 59, 16749, 256, 105, 121, 14325, 14330, 114, 99, 32827, 251, 16635, 59, 17475, 384, 97, 98, 104, 14339, 14342, 14347, 114, 242, 5037, 108, 97, 99, 59, 16753, 97, 242, 5059, 256, 105, 114, 14355, 14360, 115, 104, 116, 59, 27006, 59, 49152, 55349, 56626, 114, 97, 118, 101, 32827, 249, 16633, 353, 14375, 14385, 114, 256, 108, 114, 14380, 14382, 187, 2391, 187, 4227, 108, 107, 59, 25984, 256, 99, 116, 14393, 14413, 623, 14399, 0, 0, 14410, 114, 110, 256, 59, 101, 14405, 14406, 25372, 114, 187, 14406, 111, 112, 59, 25359, 114, 105, 59, 26104, 256, 97, 108, 14422, 14426, 99, 114, 59, 16747, 32955, 168, 841, 256, 103, 112, 14434, 14438, 111, 110, 59, 16755, 102, 59, 49152, 55349, 56678, 768, 97, 100, 104, 108, 115, 117, 4427, 14456, 14461, 4978, 14481, 14496, 111, 119, 110, 225, 5043, 97, 114, 112, 111, 111, 110, 256, 108, 114, 14472, 14476, 101, 102, 244, 14381, 105, 103, 104, 244, 14383, 105, 384, 59, 104, 108, 14489, 14490, 14492, 17349, 187, 5114, 111, 110, 187, 14490, 112, 97, 114, 114, 111, 119, 115, 59, 25032, 384, 99, 105, 116, 14512, 14532, 14536, 623, 14518, 0, 0, 14529, 114, 110, 256, 59, 101, 14524, 14525, 25373, 114, 187, 14525, 111, 112, 59, 25358, 110, 103, 59, 16751, 114, 105, 59, 26105, 99, 114, 59, 49152, 55349, 56522, 384, 100, 105, 114, 14553, 14557, 14562, 111, 116, 59, 25328, 108, 100, 101, 59, 16745, 105, 256, 59, 102, 14128, 14568, 187, 6163, 256, 97, 109, 14575, 14578, 114, 242, 14504, 108, 32827, 252, 16636, 97, 110, 103, 108, 101, 59, 27047, 1920, 65, 66, 68, 97, 99, 100, 101, 102, 108, 110, 111, 112, 114, 115, 122, 14620, 14623, 14633, 14637, 14773, 14776, 14781, 14815, 14820, 14824, 14835, 14841, 14845, 14849, 14880, 114, 242, 1015, 97, 114, 256, 59, 118, 14630, 14631, 27368, 59, 27369, 97, 115, 232, 993, 256, 110, 114, 14642, 14647, 103, 114, 116, 59, 27036, 896, 101, 107, 110, 112, 114, 115, 116, 13539, 14662, 14667, 14674, 14685, 14692, 14742, 97, 112, 112, 225, 9237, 111, 116, 104, 105, 110, 231, 7830, 384, 104, 105, 114, 13547, 11976, 14681, 111, 112, 244, 12213, 256, 59, 104, 5047, 14690, 239, 12685, 256, 105, 117, 14697, 14701, 103, 109, 225, 13235, 256, 98, 112, 14706, 14724, 115, 101, 116, 110, 101, 113, 256, 59, 113, 14717, 14720, 49152, 8842, 65024, 59, 49152, 10955, 65024, 115, 101, 116, 110, 101, 113, 256, 59, 113, 14735, 14738, 49152, 8843, 65024, 59, 49152, 10956, 65024, 256, 104, 114, 14747, 14751, 101, 116, 225, 13980, 105, 97, 110, 103, 108, 101, 256, 108, 114, 14762, 14767, 101, 102, 116, 187, 2341, 105, 103, 104, 116, 187, 4177, 121, 59, 17458, 97, 115, 104, 187, 4150, 384, 101, 108, 114, 14788, 14802, 14807, 384, 59, 98, 101, 11754, 14795, 14799, 97, 114, 59, 25275, 113, 59, 25178, 108, 105, 112, 59, 25326, 256, 98, 116, 14812, 5224, 97, 242, 5225, 114, 59, 49152, 55349, 56627, 116, 114, 233, 14766, 115, 117, 256, 98, 112, 14831, 14833, 187, 3356, 187, 3417, 112, 102, 59, 49152, 55349, 56679, 114, 111, 240, 3835, 116, 114, 233, 14772, 256, 99, 117, 14854, 14859, 114, 59, 49152, 55349, 56523, 256, 98, 112, 14864, 14872, 110, 256, 69, 101, 14720, 14870, 187, 14718, 110, 256, 69, 101, 14738, 14878, 187, 14736, 105, 103, 122, 97, 103, 59, 27034, 896, 99, 101, 102, 111, 112, 114, 115, 14902, 14907, 14934, 14939, 14932, 14945, 14954, 105, 114, 99, 59, 16757, 256, 100, 105, 14912, 14929, 256, 98, 103, 14917, 14921, 97, 114, 59, 27231, 101, 256, 59, 113, 5626, 14927, 59, 25177, 101, 114, 112, 59, 24856, 114, 59, 49152, 55349, 56628, 112, 102, 59, 49152, 55349, 56680, 256, 59, 101, 5241, 14950, 97, 116, 232, 5241, 99, 114, 59, 49152, 55349, 56524, 2787, 6030, 14983, 0, 14987, 0, 14992, 15003, 0, 0, 15005, 15016, 15019, 15023, 0, 0, 15043, 15054, 0, 15064, 6108, 6111, 116, 114, 233, 6097, 114, 59, 49152, 55349, 56629, 256, 65, 97, 14996, 14999, 114, 242, 963, 114, 242, 2550, 59, 17342, 256, 65, 97, 15009, 15012, 114, 242, 952, 114, 242, 2539, 97, 240, 10003, 105, 115, 59, 25339, 384, 100, 112, 116, 6052, 15029, 15038, 256, 102, 108, 15034, 6057, 59, 49152, 55349, 56681, 105, 109, 229, 6066, 256, 65, 97, 15047, 15050, 114, 242, 974, 114, 242, 2561, 256, 99, 113, 15058, 6072, 114, 59, 49152, 55349, 56525, 256, 112, 116, 6102, 15068, 114, 233, 6100, 1024, 97, 99, 101, 102, 105, 111, 115, 117, 15088, 15101, 15112, 15116, 15121, 15125, 15131, 15137, 99, 256, 117, 121, 15094, 15099, 116, 101, 32827, 253, 16637, 59, 17487, 256, 105, 121, 15106, 15110, 114, 99, 59, 16759, 59, 17483, 110, 32827, 165, 16549, 114, 59, 49152, 55349, 56630, 99, 121, 59, 17495, 112, 102, 59, 49152, 55349, 56682, 99, 114, 59, 49152, 55349, 56526, 256, 99, 109, 15142, 15145, 121, 59, 17486, 108, 32827, 255, 16639, 1280, 97, 99, 100, 101, 102, 104, 105, 111, 115, 119, 15170, 15176, 15188, 15192, 15204, 15209, 15213, 15220, 15226, 15232, 99, 117, 116, 101, 59, 16762, 256, 97, 121, 15181, 15186, 114, 111, 110, 59, 16766, 59, 17463, 111, 116, 59, 16764, 256, 101, 116, 15197, 15201, 116, 114, 230, 5471, 97, 59, 17334, 114, 59, 49152, 55349, 56631, 99, 121, 59, 17462, 103, 114, 97, 114, 114, 59, 25053, 112, 102, 59, 49152, 55349, 56683, 99, 114, 59, 49152, 55349, 56527, 256, 106, 110, 15237, 15239, 59, 24589, 106, 59, 24588]);\n\n\t});\n\n\tunwrapExports(decodeDataHtml);\n\n\tvar decodeDataXml = createCommonjsModule(function (module, exports) {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\t// Generated using scripts/write-decode-map.ts\n\t// prettier-ignore\n\texports.default = new Uint16Array([512, 97, 103, 108, 113, 9, 21, 24, 27, 621, 15, 0, 0, 18, 112, 59, 16422, 111, 115, 59, 16423, 116, 59, 16446, 116, 59, 16444, 117, 111, 116, 59, 16418]);\n\n\t});\n\n\tunwrapExports(decodeDataXml);\n\n\tvar decode_codepoint = createCommonjsModule(function (module, exports) {\n\t// Adapted from https://github.com/mathiasbynens/he/blob/36afe179392226cf1b6ccdb16ebbb7a5a844d93a/src/he.js#L106-L134\n\tvar _a;\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\texports.replaceCodePoint = exports.fromCodePoint = void 0;\n\tvar decodeMap = new Map([\n\t    [0, 65533],\n\t    [128, 8364],\n\t    [130, 8218],\n\t    [131, 402],\n\t    [132, 8222],\n\t    [133, 8230],\n\t    [134, 8224],\n\t    [135, 8225],\n\t    [136, 710],\n\t    [137, 8240],\n\t    [138, 352],\n\t    [139, 8249],\n\t    [140, 338],\n\t    [142, 381],\n\t    [145, 8216],\n\t    [146, 8217],\n\t    [147, 8220],\n\t    [148, 8221],\n\t    [149, 8226],\n\t    [150, 8211],\n\t    [151, 8212],\n\t    [152, 732],\n\t    [153, 8482],\n\t    [154, 353],\n\t    [155, 8250],\n\t    [156, 339],\n\t    [158, 382],\n\t    [159, 376],\n\t]);\n\texports.fromCodePoint = \n\t// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition, node/no-unsupported-features/es-builtins\n\t(_a = String.fromCodePoint) !== null && _a !== void 0 ? _a : function (codePoint) {\n\t    var output = \"\";\n\t    if (codePoint > 0xffff) {\n\t        codePoint -= 0x10000;\n\t        output += String.fromCharCode(((codePoint >>> 10) & 0x3ff) | 0xd800);\n\t        codePoint = 0xdc00 | (codePoint & 0x3ff);\n\t    }\n\t    output += String.fromCharCode(codePoint);\n\t    return output;\n\t};\n\tfunction replaceCodePoint(codePoint) {\n\t    var _a;\n\t    if ((codePoint >= 0xd800 && codePoint <= 0xdfff) || codePoint > 0x10ffff) {\n\t        return 0xfffd;\n\t    }\n\t    return (_a = decodeMap.get(codePoint)) !== null && _a !== void 0 ? _a : codePoint;\n\t}\n\texports.replaceCodePoint = replaceCodePoint;\n\tfunction decodeCodePoint(codePoint) {\n\t    return (0, exports.fromCodePoint)(replaceCodePoint(codePoint));\n\t}\n\texports.default = decodeCodePoint;\n\n\t});\n\n\tunwrapExports(decode_codepoint);\n\tvar decode_codepoint_1 = decode_codepoint.replaceCodePoint;\n\tvar decode_codepoint_2 = decode_codepoint.fromCodePoint;\n\n\tvar decode = createCommonjsModule(function (module, exports) {\n\tvar __importDefault = (commonjsGlobal && commonjsGlobal.__importDefault) || function (mod) {\n\t    return (mod && mod.__esModule) ? mod : { \"default\": mod };\n\t};\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\texports.decodeXML = exports.decodeHTMLStrict = exports.decodeHTML = exports.determineBranch = exports.BinTrieFlags = exports.fromCodePoint = exports.replaceCodePoint = exports.decodeCodePoint = exports.xmlDecodeTree = exports.htmlDecodeTree = void 0;\n\tvar decode_data_html_js_1 = __importDefault(decodeDataHtml);\n\texports.htmlDecodeTree = decode_data_html_js_1.default;\n\tvar decode_data_xml_js_1 = __importDefault(decodeDataXml);\n\texports.xmlDecodeTree = decode_data_xml_js_1.default;\n\tvar decode_codepoint_js_1 = __importDefault(decode_codepoint);\n\texports.decodeCodePoint = decode_codepoint_js_1.default;\n\tvar decode_codepoint_js_2 = decode_codepoint;\n\tObject.defineProperty(exports, \"replaceCodePoint\", { enumerable: true, get: function () { return decode_codepoint_js_2.replaceCodePoint; } });\n\tObject.defineProperty(exports, \"fromCodePoint\", { enumerable: true, get: function () { return decode_codepoint_js_2.fromCodePoint; } });\n\tvar CharCodes;\n\t(function (CharCodes) {\n\t    CharCodes[CharCodes[\"NUM\"] = 35] = \"NUM\";\n\t    CharCodes[CharCodes[\"SEMI\"] = 59] = \"SEMI\";\n\t    CharCodes[CharCodes[\"ZERO\"] = 48] = \"ZERO\";\n\t    CharCodes[CharCodes[\"NINE\"] = 57] = \"NINE\";\n\t    CharCodes[CharCodes[\"LOWER_A\"] = 97] = \"LOWER_A\";\n\t    CharCodes[CharCodes[\"LOWER_F\"] = 102] = \"LOWER_F\";\n\t    CharCodes[CharCodes[\"LOWER_X\"] = 120] = \"LOWER_X\";\n\t    /** Bit that needs to be set to convert an upper case ASCII character to lower case */\n\t    CharCodes[CharCodes[\"To_LOWER_BIT\"] = 32] = \"To_LOWER_BIT\";\n\t})(CharCodes || (CharCodes = {}));\n\tvar BinTrieFlags;\n\t(function (BinTrieFlags) {\n\t    BinTrieFlags[BinTrieFlags[\"VALUE_LENGTH\"] = 49152] = \"VALUE_LENGTH\";\n\t    BinTrieFlags[BinTrieFlags[\"BRANCH_LENGTH\"] = 16256] = \"BRANCH_LENGTH\";\n\t    BinTrieFlags[BinTrieFlags[\"JUMP_TABLE\"] = 127] = \"JUMP_TABLE\";\n\t})(BinTrieFlags = exports.BinTrieFlags || (exports.BinTrieFlags = {}));\n\tfunction getDecoder(decodeTree) {\n\t    return function decodeHTMLBinary(str, strict) {\n\t        var ret = \"\";\n\t        var lastIdx = 0;\n\t        var strIdx = 0;\n\t        while ((strIdx = str.indexOf(\"&\", strIdx)) >= 0) {\n\t            ret += str.slice(lastIdx, strIdx);\n\t            lastIdx = strIdx;\n\t            // Skip the \"&\"\n\t            strIdx += 1;\n\t            // If we have a numeric entity, handle this separately.\n\t            if (str.charCodeAt(strIdx) === CharCodes.NUM) {\n\t                // Skip the leading \"&#\". For hex entities, also skip the leading \"x\".\n\t                var start = strIdx + 1;\n\t                var base = 10;\n\t                var cp = str.charCodeAt(start);\n\t                if ((cp | CharCodes.To_LOWER_BIT) === CharCodes.LOWER_X) {\n\t                    base = 16;\n\t                    strIdx += 1;\n\t                    start += 1;\n\t                }\n\t                do\n\t                    cp = str.charCodeAt(++strIdx);\n\t                while ((cp >= CharCodes.ZERO && cp <= CharCodes.NINE) ||\n\t                    (base === 16 &&\n\t                        (cp | CharCodes.To_LOWER_BIT) >= CharCodes.LOWER_A &&\n\t                        (cp | CharCodes.To_LOWER_BIT) <= CharCodes.LOWER_F));\n\t                if (start !== strIdx) {\n\t                    var entity = str.substring(start, strIdx);\n\t                    var parsed = parseInt(entity, base);\n\t                    if (str.charCodeAt(strIdx) === CharCodes.SEMI) {\n\t                        strIdx += 1;\n\t                    }\n\t                    else if (strict) {\n\t                        continue;\n\t                    }\n\t                    ret += (0, decode_codepoint_js_1.default)(parsed);\n\t                    lastIdx = strIdx;\n\t                }\n\t                continue;\n\t            }\n\t            var resultIdx = 0;\n\t            var excess = 1;\n\t            var treeIdx = 0;\n\t            var current = decodeTree[treeIdx];\n\t            for (; strIdx < str.length; strIdx++, excess++) {\n\t                treeIdx = determineBranch(decodeTree, current, treeIdx + 1, str.charCodeAt(strIdx));\n\t                if (treeIdx < 0)\n\t                    break;\n\t                current = decodeTree[treeIdx];\n\t                var masked = current & BinTrieFlags.VALUE_LENGTH;\n\t                // If the branch is a value, store it and continue\n\t                if (masked) {\n\t                    // If we have a legacy entity while parsing strictly, just skip the number of bytes\n\t                    if (!strict || str.charCodeAt(strIdx) === CharCodes.SEMI) {\n\t                        resultIdx = treeIdx;\n\t                        excess = 0;\n\t                    }\n\t                    // The mask is the number of bytes of the value, including the current byte.\n\t                    var valueLength = (masked >> 14) - 1;\n\t                    if (valueLength === 0)\n\t                        break;\n\t                    treeIdx += valueLength;\n\t                }\n\t            }\n\t            if (resultIdx !== 0) {\n\t                var valueLength = (decodeTree[resultIdx] & BinTrieFlags.VALUE_LENGTH) >> 14;\n\t                ret +=\n\t                    valueLength === 1\n\t                        ? String.fromCharCode(decodeTree[resultIdx] & ~BinTrieFlags.VALUE_LENGTH)\n\t                        : valueLength === 2\n\t                            ? String.fromCharCode(decodeTree[resultIdx + 1])\n\t                            : String.fromCharCode(decodeTree[resultIdx + 1], decodeTree[resultIdx + 2]);\n\t                lastIdx = strIdx - excess + 1;\n\t            }\n\t        }\n\t        return ret + str.slice(lastIdx);\n\t    };\n\t}\n\tfunction determineBranch(decodeTree, current, nodeIdx, char) {\n\t    var branchCount = (current & BinTrieFlags.BRANCH_LENGTH) >> 7;\n\t    var jumpOffset = current & BinTrieFlags.JUMP_TABLE;\n\t    // Case 1: Single branch encoded in jump offset\n\t    if (branchCount === 0) {\n\t        return jumpOffset !== 0 && char === jumpOffset ? nodeIdx : -1;\n\t    }\n\t    // Case 2: Multiple branches encoded in jump table\n\t    if (jumpOffset) {\n\t        var value = char - jumpOffset;\n\t        return value < 0 || value > branchCount\n\t            ? -1\n\t            : decodeTree[nodeIdx + value] - 1;\n\t    }\n\t    // Case 3: Multiple branches encoded in dictionary\n\t    // Binary search for the character.\n\t    var lo = nodeIdx;\n\t    var hi = lo + branchCount - 1;\n\t    while (lo <= hi) {\n\t        var mid = (lo + hi) >>> 1;\n\t        var midVal = decodeTree[mid];\n\t        if (midVal < char) {\n\t            lo = mid + 1;\n\t        }\n\t        else if (midVal > char) {\n\t            hi = mid - 1;\n\t        }\n\t        else {\n\t            return decodeTree[mid + branchCount];\n\t        }\n\t    }\n\t    return -1;\n\t}\n\texports.determineBranch = determineBranch;\n\tvar htmlDecoder = getDecoder(decode_data_html_js_1.default);\n\tvar xmlDecoder = getDecoder(decode_data_xml_js_1.default);\n\tfunction decodeHTML(str) {\n\t    return htmlDecoder(str, false);\n\t}\n\texports.decodeHTML = decodeHTML;\n\tfunction decodeHTMLStrict(str) {\n\t    return htmlDecoder(str, true);\n\t}\n\texports.decodeHTMLStrict = decodeHTMLStrict;\n\tfunction decodeXML(str) {\n\t    return xmlDecoder(str, true);\n\t}\n\texports.decodeXML = decodeXML;\n\n\t});\n\n\tunwrapExports(decode);\n\tvar decode_1 = decode.decodeXML;\n\tvar decode_2 = decode.decodeHTMLStrict;\n\tvar decode_3 = decode.decodeHTML;\n\tvar decode_4 = decode.determineBranch;\n\tvar decode_5 = decode.BinTrieFlags;\n\tvar decode_6 = decode.fromCodePoint;\n\tvar decode_7 = decode.replaceCodePoint;\n\tvar decode_8 = decode.decodeCodePoint;\n\tvar decode_9 = decode.xmlDecodeTree;\n\tvar decode_10 = decode.htmlDecodeTree;\n\n\t/** All valid namespaces in HTML. */\n\tvar NS;\n\t(function (NS) {\n\t    NS[\"HTML\"] = \"http://www.w3.org/1999/xhtml\";\n\t    NS[\"MATHML\"] = \"http://www.w3.org/1998/Math/MathML\";\n\t    NS[\"SVG\"] = \"http://www.w3.org/2000/svg\";\n\t    NS[\"XLINK\"] = \"http://www.w3.org/1999/xlink\";\n\t    NS[\"XML\"] = \"http://www.w3.org/XML/1998/namespace\";\n\t    NS[\"XMLNS\"] = \"http://www.w3.org/2000/xmlns/\";\n\t})(NS || (NS = {}));\n\tvar ATTRS;\n\t(function (ATTRS) {\n\t    ATTRS[\"TYPE\"] = \"type\";\n\t    ATTRS[\"ACTION\"] = \"action\";\n\t    ATTRS[\"ENCODING\"] = \"encoding\";\n\t    ATTRS[\"PROMPT\"] = \"prompt\";\n\t    ATTRS[\"NAME\"] = \"name\";\n\t    ATTRS[\"COLOR\"] = \"color\";\n\t    ATTRS[\"FACE\"] = \"face\";\n\t    ATTRS[\"SIZE\"] = \"size\";\n\t})(ATTRS || (ATTRS = {}));\n\t/**\n\t * The mode of the document.\n\t *\n\t * @see {@link https://dom.spec.whatwg.org/#concept-document-limited-quirks}\n\t */\n\tvar DOCUMENT_MODE;\n\t(function (DOCUMENT_MODE) {\n\t    DOCUMENT_MODE[\"NO_QUIRKS\"] = \"no-quirks\";\n\t    DOCUMENT_MODE[\"QUIRKS\"] = \"quirks\";\n\t    DOCUMENT_MODE[\"LIMITED_QUIRKS\"] = \"limited-quirks\";\n\t})(DOCUMENT_MODE || (DOCUMENT_MODE = {}));\n\tvar TAG_NAMES;\n\t(function (TAG_NAMES) {\n\t    TAG_NAMES[\"A\"] = \"a\";\n\t    TAG_NAMES[\"ADDRESS\"] = \"address\";\n\t    TAG_NAMES[\"ANNOTATION_XML\"] = \"annotation-xml\";\n\t    TAG_NAMES[\"APPLET\"] = \"applet\";\n\t    TAG_NAMES[\"AREA\"] = \"area\";\n\t    TAG_NAMES[\"ARTICLE\"] = \"article\";\n\t    TAG_NAMES[\"ASIDE\"] = \"aside\";\n\t    TAG_NAMES[\"B\"] = \"b\";\n\t    TAG_NAMES[\"BASE\"] = \"base\";\n\t    TAG_NAMES[\"BASEFONT\"] = \"basefont\";\n\t    TAG_NAMES[\"BGSOUND\"] = \"bgsound\";\n\t    TAG_NAMES[\"BIG\"] = \"big\";\n\t    TAG_NAMES[\"BLOCKQUOTE\"] = \"blockquote\";\n\t    TAG_NAMES[\"BODY\"] = \"body\";\n\t    TAG_NAMES[\"BR\"] = \"br\";\n\t    TAG_NAMES[\"BUTTON\"] = \"button\";\n\t    TAG_NAMES[\"CAPTION\"] = \"caption\";\n\t    TAG_NAMES[\"CENTER\"] = \"center\";\n\t    TAG_NAMES[\"CODE\"] = \"code\";\n\t    TAG_NAMES[\"COL\"] = \"col\";\n\t    TAG_NAMES[\"COLGROUP\"] = \"colgroup\";\n\t    TAG_NAMES[\"DD\"] = \"dd\";\n\t    TAG_NAMES[\"DESC\"] = \"desc\";\n\t    TAG_NAMES[\"DETAILS\"] = \"details\";\n\t    TAG_NAMES[\"DIALOG\"] = \"dialog\";\n\t    TAG_NAMES[\"DIR\"] = \"dir\";\n\t    TAG_NAMES[\"DIV\"] = \"div\";\n\t    TAG_NAMES[\"DL\"] = \"dl\";\n\t    TAG_NAMES[\"DT\"] = \"dt\";\n\t    TAG_NAMES[\"EM\"] = \"em\";\n\t    TAG_NAMES[\"EMBED\"] = \"embed\";\n\t    TAG_NAMES[\"FIELDSET\"] = \"fieldset\";\n\t    TAG_NAMES[\"FIGCAPTION\"] = \"figcaption\";\n\t    TAG_NAMES[\"FIGURE\"] = \"figure\";\n\t    TAG_NAMES[\"FONT\"] = \"font\";\n\t    TAG_NAMES[\"FOOTER\"] = \"footer\";\n\t    TAG_NAMES[\"FOREIGN_OBJECT\"] = \"foreignObject\";\n\t    TAG_NAMES[\"FORM\"] = \"form\";\n\t    TAG_NAMES[\"FRAME\"] = \"frame\";\n\t    TAG_NAMES[\"FRAMESET\"] = \"frameset\";\n\t    TAG_NAMES[\"H1\"] = \"h1\";\n\t    TAG_NAMES[\"H2\"] = \"h2\";\n\t    TAG_NAMES[\"H3\"] = \"h3\";\n\t    TAG_NAMES[\"H4\"] = \"h4\";\n\t    TAG_NAMES[\"H5\"] = \"h5\";\n\t    TAG_NAMES[\"H6\"] = \"h6\";\n\t    TAG_NAMES[\"HEAD\"] = \"head\";\n\t    TAG_NAMES[\"HEADER\"] = \"header\";\n\t    TAG_NAMES[\"HGROUP\"] = \"hgroup\";\n\t    TAG_NAMES[\"HR\"] = \"hr\";\n\t    TAG_NAMES[\"HTML\"] = \"html\";\n\t    TAG_NAMES[\"I\"] = \"i\";\n\t    TAG_NAMES[\"IMG\"] = \"img\";\n\t    TAG_NAMES[\"IMAGE\"] = \"image\";\n\t    TAG_NAMES[\"INPUT\"] = \"input\";\n\t    TAG_NAMES[\"IFRAME\"] = \"iframe\";\n\t    TAG_NAMES[\"KEYGEN\"] = \"keygen\";\n\t    TAG_NAMES[\"LABEL\"] = \"label\";\n\t    TAG_NAMES[\"LI\"] = \"li\";\n\t    TAG_NAMES[\"LINK\"] = \"link\";\n\t    TAG_NAMES[\"LISTING\"] = \"listing\";\n\t    TAG_NAMES[\"MAIN\"] = \"main\";\n\t    TAG_NAMES[\"MALIGNMARK\"] = \"malignmark\";\n\t    TAG_NAMES[\"MARQUEE\"] = \"marquee\";\n\t    TAG_NAMES[\"MATH\"] = \"math\";\n\t    TAG_NAMES[\"MENU\"] = \"menu\";\n\t    TAG_NAMES[\"META\"] = \"meta\";\n\t    TAG_NAMES[\"MGLYPH\"] = \"mglyph\";\n\t    TAG_NAMES[\"MI\"] = \"mi\";\n\t    TAG_NAMES[\"MO\"] = \"mo\";\n\t    TAG_NAMES[\"MN\"] = \"mn\";\n\t    TAG_NAMES[\"MS\"] = \"ms\";\n\t    TAG_NAMES[\"MTEXT\"] = \"mtext\";\n\t    TAG_NAMES[\"NAV\"] = \"nav\";\n\t    TAG_NAMES[\"NOBR\"] = \"nobr\";\n\t    TAG_NAMES[\"NOFRAMES\"] = \"noframes\";\n\t    TAG_NAMES[\"NOEMBED\"] = \"noembed\";\n\t    TAG_NAMES[\"NOSCRIPT\"] = \"noscript\";\n\t    TAG_NAMES[\"OBJECT\"] = \"object\";\n\t    TAG_NAMES[\"OL\"] = \"ol\";\n\t    TAG_NAMES[\"OPTGROUP\"] = \"optgroup\";\n\t    TAG_NAMES[\"OPTION\"] = \"option\";\n\t    TAG_NAMES[\"P\"] = \"p\";\n\t    TAG_NAMES[\"PARAM\"] = \"param\";\n\t    TAG_NAMES[\"PLAINTEXT\"] = \"plaintext\";\n\t    TAG_NAMES[\"PRE\"] = \"pre\";\n\t    TAG_NAMES[\"RB\"] = \"rb\";\n\t    TAG_NAMES[\"RP\"] = \"rp\";\n\t    TAG_NAMES[\"RT\"] = \"rt\";\n\t    TAG_NAMES[\"RTC\"] = \"rtc\";\n\t    TAG_NAMES[\"RUBY\"] = \"ruby\";\n\t    TAG_NAMES[\"S\"] = \"s\";\n\t    TAG_NAMES[\"SCRIPT\"] = \"script\";\n\t    TAG_NAMES[\"SECTION\"] = \"section\";\n\t    TAG_NAMES[\"SELECT\"] = \"select\";\n\t    TAG_NAMES[\"SOURCE\"] = \"source\";\n\t    TAG_NAMES[\"SMALL\"] = \"small\";\n\t    TAG_NAMES[\"SPAN\"] = \"span\";\n\t    TAG_NAMES[\"STRIKE\"] = \"strike\";\n\t    TAG_NAMES[\"STRONG\"] = \"strong\";\n\t    TAG_NAMES[\"STYLE\"] = \"style\";\n\t    TAG_NAMES[\"SUB\"] = \"sub\";\n\t    TAG_NAMES[\"SUMMARY\"] = \"summary\";\n\t    TAG_NAMES[\"SUP\"] = \"sup\";\n\t    TAG_NAMES[\"TABLE\"] = \"table\";\n\t    TAG_NAMES[\"TBODY\"] = \"tbody\";\n\t    TAG_NAMES[\"TEMPLATE\"] = \"template\";\n\t    TAG_NAMES[\"TEXTAREA\"] = \"textarea\";\n\t    TAG_NAMES[\"TFOOT\"] = \"tfoot\";\n\t    TAG_NAMES[\"TD\"] = \"td\";\n\t    TAG_NAMES[\"TH\"] = \"th\";\n\t    TAG_NAMES[\"THEAD\"] = \"thead\";\n\t    TAG_NAMES[\"TITLE\"] = \"title\";\n\t    TAG_NAMES[\"TR\"] = \"tr\";\n\t    TAG_NAMES[\"TRACK\"] = \"track\";\n\t    TAG_NAMES[\"TT\"] = \"tt\";\n\t    TAG_NAMES[\"U\"] = \"u\";\n\t    TAG_NAMES[\"UL\"] = \"ul\";\n\t    TAG_NAMES[\"SVG\"] = \"svg\";\n\t    TAG_NAMES[\"VAR\"] = \"var\";\n\t    TAG_NAMES[\"WBR\"] = \"wbr\";\n\t    TAG_NAMES[\"XMP\"] = \"xmp\";\n\t})(TAG_NAMES || (TAG_NAMES = {}));\n\t/**\n\t * Tag IDs are numeric IDs for known tag names.\n\t *\n\t * We use tag IDs to improve the performance of tag name comparisons.\n\t */\n\tvar TAG_ID;\n\t(function (TAG_ID) {\n\t    TAG_ID[TAG_ID[\"UNKNOWN\"] = 0] = \"UNKNOWN\";\n\t    TAG_ID[TAG_ID[\"A\"] = 1] = \"A\";\n\t    TAG_ID[TAG_ID[\"ADDRESS\"] = 2] = \"ADDRESS\";\n\t    TAG_ID[TAG_ID[\"ANNOTATION_XML\"] = 3] = \"ANNOTATION_XML\";\n\t    TAG_ID[TAG_ID[\"APPLET\"] = 4] = \"APPLET\";\n\t    TAG_ID[TAG_ID[\"AREA\"] = 5] = \"AREA\";\n\t    TAG_ID[TAG_ID[\"ARTICLE\"] = 6] = \"ARTICLE\";\n\t    TAG_ID[TAG_ID[\"ASIDE\"] = 7] = \"ASIDE\";\n\t    TAG_ID[TAG_ID[\"B\"] = 8] = \"B\";\n\t    TAG_ID[TAG_ID[\"BASE\"] = 9] = \"BASE\";\n\t    TAG_ID[TAG_ID[\"BASEFONT\"] = 10] = \"BASEFONT\";\n\t    TAG_ID[TAG_ID[\"BGSOUND\"] = 11] = \"BGSOUND\";\n\t    TAG_ID[TAG_ID[\"BIG\"] = 12] = \"BIG\";\n\t    TAG_ID[TAG_ID[\"BLOCKQUOTE\"] = 13] = \"BLOCKQUOTE\";\n\t    TAG_ID[TAG_ID[\"BODY\"] = 14] = \"BODY\";\n\t    TAG_ID[TAG_ID[\"BR\"] = 15] = \"BR\";\n\t    TAG_ID[TAG_ID[\"BUTTON\"] = 16] = \"BUTTON\";\n\t    TAG_ID[TAG_ID[\"CAPTION\"] = 17] = \"CAPTION\";\n\t    TAG_ID[TAG_ID[\"CENTER\"] = 18] = \"CENTER\";\n\t    TAG_ID[TAG_ID[\"CODE\"] = 19] = \"CODE\";\n\t    TAG_ID[TAG_ID[\"COL\"] = 20] = \"COL\";\n\t    TAG_ID[TAG_ID[\"COLGROUP\"] = 21] = \"COLGROUP\";\n\t    TAG_ID[TAG_ID[\"DD\"] = 22] = \"DD\";\n\t    TAG_ID[TAG_ID[\"DESC\"] = 23] = \"DESC\";\n\t    TAG_ID[TAG_ID[\"DETAILS\"] = 24] = \"DETAILS\";\n\t    TAG_ID[TAG_ID[\"DIALOG\"] = 25] = \"DIALOG\";\n\t    TAG_ID[TAG_ID[\"DIR\"] = 26] = \"DIR\";\n\t    TAG_ID[TAG_ID[\"DIV\"] = 27] = \"DIV\";\n\t    TAG_ID[TAG_ID[\"DL\"] = 28] = \"DL\";\n\t    TAG_ID[TAG_ID[\"DT\"] = 29] = \"DT\";\n\t    TAG_ID[TAG_ID[\"EM\"] = 30] = \"EM\";\n\t    TAG_ID[TAG_ID[\"EMBED\"] = 31] = \"EMBED\";\n\t    TAG_ID[TAG_ID[\"FIELDSET\"] = 32] = \"FIELDSET\";\n\t    TAG_ID[TAG_ID[\"FIGCAPTION\"] = 33] = \"FIGCAPTION\";\n\t    TAG_ID[TAG_ID[\"FIGURE\"] = 34] = \"FIGURE\";\n\t    TAG_ID[TAG_ID[\"FONT\"] = 35] = \"FONT\";\n\t    TAG_ID[TAG_ID[\"FOOTER\"] = 36] = \"FOOTER\";\n\t    TAG_ID[TAG_ID[\"FOREIGN_OBJECT\"] = 37] = \"FOREIGN_OBJECT\";\n\t    TAG_ID[TAG_ID[\"FORM\"] = 38] = \"FORM\";\n\t    TAG_ID[TAG_ID[\"FRAME\"] = 39] = \"FRAME\";\n\t    TAG_ID[TAG_ID[\"FRAMESET\"] = 40] = \"FRAMESET\";\n\t    TAG_ID[TAG_ID[\"H1\"] = 41] = \"H1\";\n\t    TAG_ID[TAG_ID[\"H2\"] = 42] = \"H2\";\n\t    TAG_ID[TAG_ID[\"H3\"] = 43] = \"H3\";\n\t    TAG_ID[TAG_ID[\"H4\"] = 44] = \"H4\";\n\t    TAG_ID[TAG_ID[\"H5\"] = 45] = \"H5\";\n\t    TAG_ID[TAG_ID[\"H6\"] = 46] = \"H6\";\n\t    TAG_ID[TAG_ID[\"HEAD\"] = 47] = \"HEAD\";\n\t    TAG_ID[TAG_ID[\"HEADER\"] = 48] = \"HEADER\";\n\t    TAG_ID[TAG_ID[\"HGROUP\"] = 49] = \"HGROUP\";\n\t    TAG_ID[TAG_ID[\"HR\"] = 50] = \"HR\";\n\t    TAG_ID[TAG_ID[\"HTML\"] = 51] = \"HTML\";\n\t    TAG_ID[TAG_ID[\"I\"] = 52] = \"I\";\n\t    TAG_ID[TAG_ID[\"IMG\"] = 53] = \"IMG\";\n\t    TAG_ID[TAG_ID[\"IMAGE\"] = 54] = \"IMAGE\";\n\t    TAG_ID[TAG_ID[\"INPUT\"] = 55] = \"INPUT\";\n\t    TAG_ID[TAG_ID[\"IFRAME\"] = 56] = \"IFRAME\";\n\t    TAG_ID[TAG_ID[\"KEYGEN\"] = 57] = \"KEYGEN\";\n\t    TAG_ID[TAG_ID[\"LABEL\"] = 58] = \"LABEL\";\n\t    TAG_ID[TAG_ID[\"LI\"] = 59] = \"LI\";\n\t    TAG_ID[TAG_ID[\"LINK\"] = 60] = \"LINK\";\n\t    TAG_ID[TAG_ID[\"LISTING\"] = 61] = \"LISTING\";\n\t    TAG_ID[TAG_ID[\"MAIN\"] = 62] = \"MAIN\";\n\t    TAG_ID[TAG_ID[\"MALIGNMARK\"] = 63] = \"MALIGNMARK\";\n\t    TAG_ID[TAG_ID[\"MARQUEE\"] = 64] = \"MARQUEE\";\n\t    TAG_ID[TAG_ID[\"MATH\"] = 65] = \"MATH\";\n\t    TAG_ID[TAG_ID[\"MENU\"] = 66] = \"MENU\";\n\t    TAG_ID[TAG_ID[\"META\"] = 67] = \"META\";\n\t    TAG_ID[TAG_ID[\"MGLYPH\"] = 68] = \"MGLYPH\";\n\t    TAG_ID[TAG_ID[\"MI\"] = 69] = \"MI\";\n\t    TAG_ID[TAG_ID[\"MO\"] = 70] = \"MO\";\n\t    TAG_ID[TAG_ID[\"MN\"] = 71] = \"MN\";\n\t    TAG_ID[TAG_ID[\"MS\"] = 72] = \"MS\";\n\t    TAG_ID[TAG_ID[\"MTEXT\"] = 73] = \"MTEXT\";\n\t    TAG_ID[TAG_ID[\"NAV\"] = 74] = \"NAV\";\n\t    TAG_ID[TAG_ID[\"NOBR\"] = 75] = \"NOBR\";\n\t    TAG_ID[TAG_ID[\"NOFRAMES\"] = 76] = \"NOFRAMES\";\n\t    TAG_ID[TAG_ID[\"NOEMBED\"] = 77] = \"NOEMBED\";\n\t    TAG_ID[TAG_ID[\"NOSCRIPT\"] = 78] = \"NOSCRIPT\";\n\t    TAG_ID[TAG_ID[\"OBJECT\"] = 79] = \"OBJECT\";\n\t    TAG_ID[TAG_ID[\"OL\"] = 80] = \"OL\";\n\t    TAG_ID[TAG_ID[\"OPTGROUP\"] = 81] = \"OPTGROUP\";\n\t    TAG_ID[TAG_ID[\"OPTION\"] = 82] = \"OPTION\";\n\t    TAG_ID[TAG_ID[\"P\"] = 83] = \"P\";\n\t    TAG_ID[TAG_ID[\"PARAM\"] = 84] = \"PARAM\";\n\t    TAG_ID[TAG_ID[\"PLAINTEXT\"] = 85] = \"PLAINTEXT\";\n\t    TAG_ID[TAG_ID[\"PRE\"] = 86] = \"PRE\";\n\t    TAG_ID[TAG_ID[\"RB\"] = 87] = \"RB\";\n\t    TAG_ID[TAG_ID[\"RP\"] = 88] = \"RP\";\n\t    TAG_ID[TAG_ID[\"RT\"] = 89] = \"RT\";\n\t    TAG_ID[TAG_ID[\"RTC\"] = 90] = \"RTC\";\n\t    TAG_ID[TAG_ID[\"RUBY\"] = 91] = \"RUBY\";\n\t    TAG_ID[TAG_ID[\"S\"] = 92] = \"S\";\n\t    TAG_ID[TAG_ID[\"SCRIPT\"] = 93] = \"SCRIPT\";\n\t    TAG_ID[TAG_ID[\"SECTION\"] = 94] = \"SECTION\";\n\t    TAG_ID[TAG_ID[\"SELECT\"] = 95] = \"SELECT\";\n\t    TAG_ID[TAG_ID[\"SOURCE\"] = 96] = \"SOURCE\";\n\t    TAG_ID[TAG_ID[\"SMALL\"] = 97] = \"SMALL\";\n\t    TAG_ID[TAG_ID[\"SPAN\"] = 98] = \"SPAN\";\n\t    TAG_ID[TAG_ID[\"STRIKE\"] = 99] = \"STRIKE\";\n\t    TAG_ID[TAG_ID[\"STRONG\"] = 100] = \"STRONG\";\n\t    TAG_ID[TAG_ID[\"STYLE\"] = 101] = \"STYLE\";\n\t    TAG_ID[TAG_ID[\"SUB\"] = 102] = \"SUB\";\n\t    TAG_ID[TAG_ID[\"SUMMARY\"] = 103] = \"SUMMARY\";\n\t    TAG_ID[TAG_ID[\"SUP\"] = 104] = \"SUP\";\n\t    TAG_ID[TAG_ID[\"TABLE\"] = 105] = \"TABLE\";\n\t    TAG_ID[TAG_ID[\"TBODY\"] = 106] = \"TBODY\";\n\t    TAG_ID[TAG_ID[\"TEMPLATE\"] = 107] = \"TEMPLATE\";\n\t    TAG_ID[TAG_ID[\"TEXTAREA\"] = 108] = \"TEXTAREA\";\n\t    TAG_ID[TAG_ID[\"TFOOT\"] = 109] = \"TFOOT\";\n\t    TAG_ID[TAG_ID[\"TD\"] = 110] = \"TD\";\n\t    TAG_ID[TAG_ID[\"TH\"] = 111] = \"TH\";\n\t    TAG_ID[TAG_ID[\"THEAD\"] = 112] = \"THEAD\";\n\t    TAG_ID[TAG_ID[\"TITLE\"] = 113] = \"TITLE\";\n\t    TAG_ID[TAG_ID[\"TR\"] = 114] = \"TR\";\n\t    TAG_ID[TAG_ID[\"TRACK\"] = 115] = \"TRACK\";\n\t    TAG_ID[TAG_ID[\"TT\"] = 116] = \"TT\";\n\t    TAG_ID[TAG_ID[\"U\"] = 117] = \"U\";\n\t    TAG_ID[TAG_ID[\"UL\"] = 118] = \"UL\";\n\t    TAG_ID[TAG_ID[\"SVG\"] = 119] = \"SVG\";\n\t    TAG_ID[TAG_ID[\"VAR\"] = 120] = \"VAR\";\n\t    TAG_ID[TAG_ID[\"WBR\"] = 121] = \"WBR\";\n\t    TAG_ID[TAG_ID[\"XMP\"] = 122] = \"XMP\";\n\t})(TAG_ID || (TAG_ID = {}));\n\tconst TAG_NAME_TO_ID = new Map([\n\t    [TAG_NAMES.A, TAG_ID.A],\n\t    [TAG_NAMES.ADDRESS, TAG_ID.ADDRESS],\n\t    [TAG_NAMES.ANNOTATION_XML, TAG_ID.ANNOTATION_XML],\n\t    [TAG_NAMES.APPLET, TAG_ID.APPLET],\n\t    [TAG_NAMES.AREA, TAG_ID.AREA],\n\t    [TAG_NAMES.ARTICLE, TAG_ID.ARTICLE],\n\t    [TAG_NAMES.ASIDE, TAG_ID.ASIDE],\n\t    [TAG_NAMES.B, TAG_ID.B],\n\t    [TAG_NAMES.BASE, TAG_ID.BASE],\n\t    [TAG_NAMES.BASEFONT, TAG_ID.BASEFONT],\n\t    [TAG_NAMES.BGSOUND, TAG_ID.BGSOUND],\n\t    [TAG_NAMES.BIG, TAG_ID.BIG],\n\t    [TAG_NAMES.BLOCKQUOTE, TAG_ID.BLOCKQUOTE],\n\t    [TAG_NAMES.BODY, TAG_ID.BODY],\n\t    [TAG_NAMES.BR, TAG_ID.BR],\n\t    [TAG_NAMES.BUTTON, TAG_ID.BUTTON],\n\t    [TAG_NAMES.CAPTION, TAG_ID.CAPTION],\n\t    [TAG_NAMES.CENTER, TAG_ID.CENTER],\n\t    [TAG_NAMES.CODE, TAG_ID.CODE],\n\t    [TAG_NAMES.COL, TAG_ID.COL],\n\t    [TAG_NAMES.COLGROUP, TAG_ID.COLGROUP],\n\t    [TAG_NAMES.DD, TAG_ID.DD],\n\t    [TAG_NAMES.DESC, TAG_ID.DESC],\n\t    [TAG_NAMES.DETAILS, TAG_ID.DETAILS],\n\t    [TAG_NAMES.DIALOG, TAG_ID.DIALOG],\n\t    [TAG_NAMES.DIR, TAG_ID.DIR],\n\t    [TAG_NAMES.DIV, TAG_ID.DIV],\n\t    [TAG_NAMES.DL, TAG_ID.DL],\n\t    [TAG_NAMES.DT, TAG_ID.DT],\n\t    [TAG_NAMES.EM, TAG_ID.EM],\n\t    [TAG_NAMES.EMBED, TAG_ID.EMBED],\n\t    [TAG_NAMES.FIELDSET, TAG_ID.FIELDSET],\n\t    [TAG_NAMES.FIGCAPTION, TAG_ID.FIGCAPTION],\n\t    [TAG_NAMES.FIGURE, TAG_ID.FIGURE],\n\t    [TAG_NAMES.FONT, TAG_ID.FONT],\n\t    [TAG_NAMES.FOOTER, TAG_ID.FOOTER],\n\t    [TAG_NAMES.FOREIGN_OBJECT, TAG_ID.FOREIGN_OBJECT],\n\t    [TAG_NAMES.FORM, TAG_ID.FORM],\n\t    [TAG_NAMES.FRAME, TAG_ID.FRAME],\n\t    [TAG_NAMES.FRAMESET, TAG_ID.FRAMESET],\n\t    [TAG_NAMES.H1, TAG_ID.H1],\n\t    [TAG_NAMES.H2, TAG_ID.H2],\n\t    [TAG_NAMES.H3, TAG_ID.H3],\n\t    [TAG_NAMES.H4, TAG_ID.H4],\n\t    [TAG_NAMES.H5, TAG_ID.H5],\n\t    [TAG_NAMES.H6, TAG_ID.H6],\n\t    [TAG_NAMES.HEAD, TAG_ID.HEAD],\n\t    [TAG_NAMES.HEADER, TAG_ID.HEADER],\n\t    [TAG_NAMES.HGROUP, TAG_ID.HGROUP],\n\t    [TAG_NAMES.HR, TAG_ID.HR],\n\t    [TAG_NAMES.HTML, TAG_ID.HTML],\n\t    [TAG_NAMES.I, TAG_ID.I],\n\t    [TAG_NAMES.IMG, TAG_ID.IMG],\n\t    [TAG_NAMES.IMAGE, TAG_ID.IMAGE],\n\t    [TAG_NAMES.INPUT, TAG_ID.INPUT],\n\t    [TAG_NAMES.IFRAME, TAG_ID.IFRAME],\n\t    [TAG_NAMES.KEYGEN, TAG_ID.KEYGEN],\n\t    [TAG_NAMES.LABEL, TAG_ID.LABEL],\n\t    [TAG_NAMES.LI, TAG_ID.LI],\n\t    [TAG_NAMES.LINK, TAG_ID.LINK],\n\t    [TAG_NAMES.LISTING, TAG_ID.LISTING],\n\t    [TAG_NAMES.MAIN, TAG_ID.MAIN],\n\t    [TAG_NAMES.MALIGNMARK, TAG_ID.MALIGNMARK],\n\t    [TAG_NAMES.MARQUEE, TAG_ID.MARQUEE],\n\t    [TAG_NAMES.MATH, TAG_ID.MATH],\n\t    [TAG_NAMES.MENU, TAG_ID.MENU],\n\t    [TAG_NAMES.META, TAG_ID.META],\n\t    [TAG_NAMES.MGLYPH, TAG_ID.MGLYPH],\n\t    [TAG_NAMES.MI, TAG_ID.MI],\n\t    [TAG_NAMES.MO, TAG_ID.MO],\n\t    [TAG_NAMES.MN, TAG_ID.MN],\n\t    [TAG_NAMES.MS, TAG_ID.MS],\n\t    [TAG_NAMES.MTEXT, TAG_ID.MTEXT],\n\t    [TAG_NAMES.NAV, TAG_ID.NAV],\n\t    [TAG_NAMES.NOBR, TAG_ID.NOBR],\n\t    [TAG_NAMES.NOFRAMES, TAG_ID.NOFRAMES],\n\t    [TAG_NAMES.NOEMBED, TAG_ID.NOEMBED],\n\t    [TAG_NAMES.NOSCRIPT, TAG_ID.NOSCRIPT],\n\t    [TAG_NAMES.OBJECT, TAG_ID.OBJECT],\n\t    [TAG_NAMES.OL, TAG_ID.OL],\n\t    [TAG_NAMES.OPTGROUP, TAG_ID.OPTGROUP],\n\t    [TAG_NAMES.OPTION, TAG_ID.OPTION],\n\t    [TAG_NAMES.P, TAG_ID.P],\n\t    [TAG_NAMES.PARAM, TAG_ID.PARAM],\n\t    [TAG_NAMES.PLAINTEXT, TAG_ID.PLAINTEXT],\n\t    [TAG_NAMES.PRE, TAG_ID.PRE],\n\t    [TAG_NAMES.RB, TAG_ID.RB],\n\t    [TAG_NAMES.RP, TAG_ID.RP],\n\t    [TAG_NAMES.RT, TAG_ID.RT],\n\t    [TAG_NAMES.RTC, TAG_ID.RTC],\n\t    [TAG_NAMES.RUBY, TAG_ID.RUBY],\n\t    [TAG_NAMES.S, TAG_ID.S],\n\t    [TAG_NAMES.SCRIPT, TAG_ID.SCRIPT],\n\t    [TAG_NAMES.SECTION, TAG_ID.SECTION],\n\t    [TAG_NAMES.SELECT, TAG_ID.SELECT],\n\t    [TAG_NAMES.SOURCE, TAG_ID.SOURCE],\n\t    [TAG_NAMES.SMALL, TAG_ID.SMALL],\n\t    [TAG_NAMES.SPAN, TAG_ID.SPAN],\n\t    [TAG_NAMES.STRIKE, TAG_ID.STRIKE],\n\t    [TAG_NAMES.STRONG, TAG_ID.STRONG],\n\t    [TAG_NAMES.STYLE, TAG_ID.STYLE],\n\t    [TAG_NAMES.SUB, TAG_ID.SUB],\n\t    [TAG_NAMES.SUMMARY, TAG_ID.SUMMARY],\n\t    [TAG_NAMES.SUP, TAG_ID.SUP],\n\t    [TAG_NAMES.TABLE, TAG_ID.TABLE],\n\t    [TAG_NAMES.TBODY, TAG_ID.TBODY],\n\t    [TAG_NAMES.TEMPLATE, TAG_ID.TEMPLATE],\n\t    [TAG_NAMES.TEXTAREA, TAG_ID.TEXTAREA],\n\t    [TAG_NAMES.TFOOT, TAG_ID.TFOOT],\n\t    [TAG_NAMES.TD, TAG_ID.TD],\n\t    [TAG_NAMES.TH, TAG_ID.TH],\n\t    [TAG_NAMES.THEAD, TAG_ID.THEAD],\n\t    [TAG_NAMES.TITLE, TAG_ID.TITLE],\n\t    [TAG_NAMES.TR, TAG_ID.TR],\n\t    [TAG_NAMES.TRACK, TAG_ID.TRACK],\n\t    [TAG_NAMES.TT, TAG_ID.TT],\n\t    [TAG_NAMES.U, TAG_ID.U],\n\t    [TAG_NAMES.UL, TAG_ID.UL],\n\t    [TAG_NAMES.SVG, TAG_ID.SVG],\n\t    [TAG_NAMES.VAR, TAG_ID.VAR],\n\t    [TAG_NAMES.WBR, TAG_ID.WBR],\n\t    [TAG_NAMES.XMP, TAG_ID.XMP],\n\t]);\n\tfunction getTagID(tagName) {\n\t    var _a;\n\t    return (_a = TAG_NAME_TO_ID.get(tagName)) !== null && _a !== void 0 ? _a : TAG_ID.UNKNOWN;\n\t}\n\tconst $ = TAG_ID;\n\tconst SPECIAL_ELEMENTS = {\n\t    [NS.HTML]: new Set([\n\t        $.ADDRESS,\n\t        $.APPLET,\n\t        $.AREA,\n\t        $.ARTICLE,\n\t        $.ASIDE,\n\t        $.BASE,\n\t        $.BASEFONT,\n\t        $.BGSOUND,\n\t        $.BLOCKQUOTE,\n\t        $.BODY,\n\t        $.BR,\n\t        $.BUTTON,\n\t        $.CAPTION,\n\t        $.CENTER,\n\t        $.COL,\n\t        $.COLGROUP,\n\t        $.DD,\n\t        $.DETAILS,\n\t        $.DIR,\n\t        $.DIV,\n\t        $.DL,\n\t        $.DT,\n\t        $.EMBED,\n\t        $.FIELDSET,\n\t        $.FIGCAPTION,\n\t        $.FIGURE,\n\t        $.FOOTER,\n\t        $.FORM,\n\t        $.FRAME,\n\t        $.FRAMESET,\n\t        $.H1,\n\t        $.H2,\n\t        $.H3,\n\t        $.H4,\n\t        $.H5,\n\t        $.H6,\n\t        $.HEAD,\n\t        $.HEADER,\n\t        $.HGROUP,\n\t        $.HR,\n\t        $.HTML,\n\t        $.IFRAME,\n\t        $.IMG,\n\t        $.INPUT,\n\t        $.LI,\n\t        $.LINK,\n\t        $.LISTING,\n\t        $.MAIN,\n\t        $.MARQUEE,\n\t        $.MENU,\n\t        $.META,\n\t        $.NAV,\n\t        $.NOEMBED,\n\t        $.NOFRAMES,\n\t        $.NOSCRIPT,\n\t        $.OBJECT,\n\t        $.OL,\n\t        $.P,\n\t        $.PARAM,\n\t        $.PLAINTEXT,\n\t        $.PRE,\n\t        $.SCRIPT,\n\t        $.SECTION,\n\t        $.SELECT,\n\t        $.SOURCE,\n\t        $.STYLE,\n\t        $.SUMMARY,\n\t        $.TABLE,\n\t        $.TBODY,\n\t        $.TD,\n\t        $.TEMPLATE,\n\t        $.TEXTAREA,\n\t        $.TFOOT,\n\t        $.TH,\n\t        $.THEAD,\n\t        $.TITLE,\n\t        $.TR,\n\t        $.TRACK,\n\t        $.UL,\n\t        $.WBR,\n\t        $.XMP,\n\t    ]),\n\t    [NS.MATHML]: new Set([$.MI, $.MO, $.MN, $.MS, $.MTEXT, $.ANNOTATION_XML]),\n\t    [NS.SVG]: new Set([$.TITLE, $.FOREIGN_OBJECT, $.DESC]),\n\t    [NS.XLINK]: new Set(),\n\t    [NS.XML]: new Set(),\n\t    [NS.XMLNS]: new Set(),\n\t};\n\tfunction isNumberedHeader(tn) {\n\t    return tn === $.H1 || tn === $.H2 || tn === $.H3 || tn === $.H4 || tn === $.H5 || tn === $.H6;\n\t}\n\tconst UNESCAPED_TEXT = new Set([\n\t    TAG_NAMES.STYLE,\n\t    TAG_NAMES.SCRIPT,\n\t    TAG_NAMES.XMP,\n\t    TAG_NAMES.IFRAME,\n\t    TAG_NAMES.NOEMBED,\n\t    TAG_NAMES.NOFRAMES,\n\t    TAG_NAMES.PLAINTEXT,\n\t]);\n\tfunction hasUnescapedText(tn, scriptingEnabled) {\n\t    return UNESCAPED_TEXT.has(tn) || (scriptingEnabled && tn === TAG_NAMES.NOSCRIPT);\n\t}\n\n\t//C1 Unicode control character reference replacements\n\tconst C1_CONTROLS_REFERENCE_REPLACEMENTS = new Map([\n\t    [0x80, 8364],\n\t    [0x82, 8218],\n\t    [0x83, 402],\n\t    [0x84, 8222],\n\t    [0x85, 8230],\n\t    [0x86, 8224],\n\t    [0x87, 8225],\n\t    [0x88, 710],\n\t    [0x89, 8240],\n\t    [0x8a, 352],\n\t    [0x8b, 8249],\n\t    [0x8c, 338],\n\t    [0x8e, 381],\n\t    [0x91, 8216],\n\t    [0x92, 8217],\n\t    [0x93, 8220],\n\t    [0x94, 8221],\n\t    [0x95, 8226],\n\t    [0x96, 8211],\n\t    [0x97, 8212],\n\t    [0x98, 732],\n\t    [0x99, 8482],\n\t    [0x9a, 353],\n\t    [0x9b, 8250],\n\t    [0x9c, 339],\n\t    [0x9e, 382],\n\t    [0x9f, 376],\n\t]);\n\t//States\n\tvar State;\n\t(function (State) {\n\t    State[State[\"DATA\"] = 0] = \"DATA\";\n\t    State[State[\"RCDATA\"] = 1] = \"RCDATA\";\n\t    State[State[\"RAWTEXT\"] = 2] = \"RAWTEXT\";\n\t    State[State[\"SCRIPT_DATA\"] = 3] = \"SCRIPT_DATA\";\n\t    State[State[\"PLAINTEXT\"] = 4] = \"PLAINTEXT\";\n\t    State[State[\"TAG_OPEN\"] = 5] = \"TAG_OPEN\";\n\t    State[State[\"END_TAG_OPEN\"] = 6] = \"END_TAG_OPEN\";\n\t    State[State[\"TAG_NAME\"] = 7] = \"TAG_NAME\";\n\t    State[State[\"RCDATA_LESS_THAN_SIGN\"] = 8] = \"RCDATA_LESS_THAN_SIGN\";\n\t    State[State[\"RCDATA_END_TAG_OPEN\"] = 9] = \"RCDATA_END_TAG_OPEN\";\n\t    State[State[\"RCDATA_END_TAG_NAME\"] = 10] = \"RCDATA_END_TAG_NAME\";\n\t    State[State[\"RAWTEXT_LESS_THAN_SIGN\"] = 11] = \"RAWTEXT_LESS_THAN_SIGN\";\n\t    State[State[\"RAWTEXT_END_TAG_OPEN\"] = 12] = \"RAWTEXT_END_TAG_OPEN\";\n\t    State[State[\"RAWTEXT_END_TAG_NAME\"] = 13] = \"RAWTEXT_END_TAG_NAME\";\n\t    State[State[\"SCRIPT_DATA_LESS_THAN_SIGN\"] = 14] = \"SCRIPT_DATA_LESS_THAN_SIGN\";\n\t    State[State[\"SCRIPT_DATA_END_TAG_OPEN\"] = 15] = \"SCRIPT_DATA_END_TAG_OPEN\";\n\t    State[State[\"SCRIPT_DATA_END_TAG_NAME\"] = 16] = \"SCRIPT_DATA_END_TAG_NAME\";\n\t    State[State[\"SCRIPT_DATA_ESCAPE_START\"] = 17] = \"SCRIPT_DATA_ESCAPE_START\";\n\t    State[State[\"SCRIPT_DATA_ESCAPE_START_DASH\"] = 18] = \"SCRIPT_DATA_ESCAPE_START_DASH\";\n\t    State[State[\"SCRIPT_DATA_ESCAPED\"] = 19] = \"SCRIPT_DATA_ESCAPED\";\n\t    State[State[\"SCRIPT_DATA_ESCAPED_DASH\"] = 20] = \"SCRIPT_DATA_ESCAPED_DASH\";\n\t    State[State[\"SCRIPT_DATA_ESCAPED_DASH_DASH\"] = 21] = \"SCRIPT_DATA_ESCAPED_DASH_DASH\";\n\t    State[State[\"SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN\"] = 22] = \"SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN\";\n\t    State[State[\"SCRIPT_DATA_ESCAPED_END_TAG_OPEN\"] = 23] = \"SCRIPT_DATA_ESCAPED_END_TAG_OPEN\";\n\t    State[State[\"SCRIPT_DATA_ESCAPED_END_TAG_NAME\"] = 24] = \"SCRIPT_DATA_ESCAPED_END_TAG_NAME\";\n\t    State[State[\"SCRIPT_DATA_DOUBLE_ESCAPE_START\"] = 25] = \"SCRIPT_DATA_DOUBLE_ESCAPE_START\";\n\t    State[State[\"SCRIPT_DATA_DOUBLE_ESCAPED\"] = 26] = \"SCRIPT_DATA_DOUBLE_ESCAPED\";\n\t    State[State[\"SCRIPT_DATA_DOUBLE_ESCAPED_DASH\"] = 27] = \"SCRIPT_DATA_DOUBLE_ESCAPED_DASH\";\n\t    State[State[\"SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH\"] = 28] = \"SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH\";\n\t    State[State[\"SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN\"] = 29] = \"SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN\";\n\t    State[State[\"SCRIPT_DATA_DOUBLE_ESCAPE_END\"] = 30] = \"SCRIPT_DATA_DOUBLE_ESCAPE_END\";\n\t    State[State[\"BEFORE_ATTRIBUTE_NAME\"] = 31] = \"BEFORE_ATTRIBUTE_NAME\";\n\t    State[State[\"ATTRIBUTE_NAME\"] = 32] = \"ATTRIBUTE_NAME\";\n\t    State[State[\"AFTER_ATTRIBUTE_NAME\"] = 33] = \"AFTER_ATTRIBUTE_NAME\";\n\t    State[State[\"BEFORE_ATTRIBUTE_VALUE\"] = 34] = \"BEFORE_ATTRIBUTE_VALUE\";\n\t    State[State[\"ATTRIBUTE_VALUE_DOUBLE_QUOTED\"] = 35] = \"ATTRIBUTE_VALUE_DOUBLE_QUOTED\";\n\t    State[State[\"ATTRIBUTE_VALUE_SINGLE_QUOTED\"] = 36] = \"ATTRIBUTE_VALUE_SINGLE_QUOTED\";\n\t    State[State[\"ATTRIBUTE_VALUE_UNQUOTED\"] = 37] = \"ATTRIBUTE_VALUE_UNQUOTED\";\n\t    State[State[\"AFTER_ATTRIBUTE_VALUE_QUOTED\"] = 38] = \"AFTER_ATTRIBUTE_VALUE_QUOTED\";\n\t    State[State[\"SELF_CLOSING_START_TAG\"] = 39] = \"SELF_CLOSING_START_TAG\";\n\t    State[State[\"BOGUS_COMMENT\"] = 40] = \"BOGUS_COMMENT\";\n\t    State[State[\"MARKUP_DECLARATION_OPEN\"] = 41] = \"MARKUP_DECLARATION_OPEN\";\n\t    State[State[\"COMMENT_START\"] = 42] = \"COMMENT_START\";\n\t    State[State[\"COMMENT_START_DASH\"] = 43] = \"COMMENT_START_DASH\";\n\t    State[State[\"COMMENT\"] = 44] = \"COMMENT\";\n\t    State[State[\"COMMENT_LESS_THAN_SIGN\"] = 45] = \"COMMENT_LESS_THAN_SIGN\";\n\t    State[State[\"COMMENT_LESS_THAN_SIGN_BANG\"] = 46] = \"COMMENT_LESS_THAN_SIGN_BANG\";\n\t    State[State[\"COMMENT_LESS_THAN_SIGN_BANG_DASH\"] = 47] = \"COMMENT_LESS_THAN_SIGN_BANG_DASH\";\n\t    State[State[\"COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH\"] = 48] = \"COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH\";\n\t    State[State[\"COMMENT_END_DASH\"] = 49] = \"COMMENT_END_DASH\";\n\t    State[State[\"COMMENT_END\"] = 50] = \"COMMENT_END\";\n\t    State[State[\"COMMENT_END_BANG\"] = 51] = \"COMMENT_END_BANG\";\n\t    State[State[\"DOCTYPE\"] = 52] = \"DOCTYPE\";\n\t    State[State[\"BEFORE_DOCTYPE_NAME\"] = 53] = \"BEFORE_DOCTYPE_NAME\";\n\t    State[State[\"DOCTYPE_NAME\"] = 54] = \"DOCTYPE_NAME\";\n\t    State[State[\"AFTER_DOCTYPE_NAME\"] = 55] = \"AFTER_DOCTYPE_NAME\";\n\t    State[State[\"AFTER_DOCTYPE_PUBLIC_KEYWORD\"] = 56] = \"AFTER_DOCTYPE_PUBLIC_KEYWORD\";\n\t    State[State[\"BEFORE_DOCTYPE_PUBLIC_IDENTIFIER\"] = 57] = \"BEFORE_DOCTYPE_PUBLIC_IDENTIFIER\";\n\t    State[State[\"DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED\"] = 58] = \"DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED\";\n\t    State[State[\"DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED\"] = 59] = \"DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED\";\n\t    State[State[\"AFTER_DOCTYPE_PUBLIC_IDENTIFIER\"] = 60] = \"AFTER_DOCTYPE_PUBLIC_IDENTIFIER\";\n\t    State[State[\"BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS\"] = 61] = \"BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS\";\n\t    State[State[\"AFTER_DOCTYPE_SYSTEM_KEYWORD\"] = 62] = \"AFTER_DOCTYPE_SYSTEM_KEYWORD\";\n\t    State[State[\"BEFORE_DOCTYPE_SYSTEM_IDENTIFIER\"] = 63] = \"BEFORE_DOCTYPE_SYSTEM_IDENTIFIER\";\n\t    State[State[\"DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED\"] = 64] = \"DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED\";\n\t    State[State[\"DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED\"] = 65] = \"DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED\";\n\t    State[State[\"AFTER_DOCTYPE_SYSTEM_IDENTIFIER\"] = 66] = \"AFTER_DOCTYPE_SYSTEM_IDENTIFIER\";\n\t    State[State[\"BOGUS_DOCTYPE\"] = 67] = \"BOGUS_DOCTYPE\";\n\t    State[State[\"CDATA_SECTION\"] = 68] = \"CDATA_SECTION\";\n\t    State[State[\"CDATA_SECTION_BRACKET\"] = 69] = \"CDATA_SECTION_BRACKET\";\n\t    State[State[\"CDATA_SECTION_END\"] = 70] = \"CDATA_SECTION_END\";\n\t    State[State[\"CHARACTER_REFERENCE\"] = 71] = \"CHARACTER_REFERENCE\";\n\t    State[State[\"NAMED_CHARACTER_REFERENCE\"] = 72] = \"NAMED_CHARACTER_REFERENCE\";\n\t    State[State[\"AMBIGUOUS_AMPERSAND\"] = 73] = \"AMBIGUOUS_AMPERSAND\";\n\t    State[State[\"NUMERIC_CHARACTER_REFERENCE\"] = 74] = \"NUMERIC_CHARACTER_REFERENCE\";\n\t    State[State[\"HEXADEMICAL_CHARACTER_REFERENCE_START\"] = 75] = \"HEXADEMICAL_CHARACTER_REFERENCE_START\";\n\t    State[State[\"DECIMAL_CHARACTER_REFERENCE_START\"] = 76] = \"DECIMAL_CHARACTER_REFERENCE_START\";\n\t    State[State[\"HEXADEMICAL_CHARACTER_REFERENCE\"] = 77] = \"HEXADEMICAL_CHARACTER_REFERENCE\";\n\t    State[State[\"DECIMAL_CHARACTER_REFERENCE\"] = 78] = \"DECIMAL_CHARACTER_REFERENCE\";\n\t    State[State[\"NUMERIC_CHARACTER_REFERENCE_END\"] = 79] = \"NUMERIC_CHARACTER_REFERENCE_END\";\n\t})(State || (State = {}));\n\t//Tokenizer initial states for different modes\n\tconst TokenizerMode = {\n\t    DATA: State.DATA,\n\t    RCDATA: State.RCDATA,\n\t    RAWTEXT: State.RAWTEXT,\n\t    SCRIPT_DATA: State.SCRIPT_DATA,\n\t    PLAINTEXT: State.PLAINTEXT,\n\t    CDATA_SECTION: State.CDATA_SECTION,\n\t};\n\t//Utils\n\t//OPTIMIZATION: these utility functions should not be moved out of this module. V8 Crankshaft will not inline\n\t//this functions if they will be situated in another module due to context switch.\n\t//Always perform inlining check before modifying this functions ('node --trace-inlining').\n\tfunction isAsciiDigit(cp) {\n\t    return cp >= CODE_POINTS.DIGIT_0 && cp <= CODE_POINTS.DIGIT_9;\n\t}\n\tfunction isAsciiUpper(cp) {\n\t    return cp >= CODE_POINTS.LATIN_CAPITAL_A && cp <= CODE_POINTS.LATIN_CAPITAL_Z;\n\t}\n\tfunction isAsciiLower(cp) {\n\t    return cp >= CODE_POINTS.LATIN_SMALL_A && cp <= CODE_POINTS.LATIN_SMALL_Z;\n\t}\n\tfunction isAsciiLetter(cp) {\n\t    return isAsciiLower(cp) || isAsciiUpper(cp);\n\t}\n\tfunction isAsciiAlphaNumeric(cp) {\n\t    return isAsciiLetter(cp) || isAsciiDigit(cp);\n\t}\n\tfunction isAsciiUpperHexDigit(cp) {\n\t    return cp >= CODE_POINTS.LATIN_CAPITAL_A && cp <= CODE_POINTS.LATIN_CAPITAL_F;\n\t}\n\tfunction isAsciiLowerHexDigit(cp) {\n\t    return cp >= CODE_POINTS.LATIN_SMALL_A && cp <= CODE_POINTS.LATIN_SMALL_F;\n\t}\n\tfunction isAsciiHexDigit(cp) {\n\t    return isAsciiDigit(cp) || isAsciiUpperHexDigit(cp) || isAsciiLowerHexDigit(cp);\n\t}\n\tfunction toAsciiLower(cp) {\n\t    return cp + 32;\n\t}\n\tfunction isWhitespace$1(cp) {\n\t    return cp === CODE_POINTS.SPACE || cp === CODE_POINTS.LINE_FEED || cp === CODE_POINTS.TABULATION || cp === CODE_POINTS.FORM_FEED;\n\t}\n\tfunction isEntityInAttributeInvalidEnd(nextCp) {\n\t    return nextCp === CODE_POINTS.EQUALS_SIGN || isAsciiAlphaNumeric(nextCp);\n\t}\n\tfunction isScriptDataDoubleEscapeSequenceEnd(cp) {\n\t    return isWhitespace$1(cp) || cp === CODE_POINTS.SOLIDUS || cp === CODE_POINTS.GREATER_THAN_SIGN;\n\t}\n\t//Tokenizer\n\tclass Tokenizer {\n\t    constructor(options, handler) {\n\t        this.options = options;\n\t        this.handler = handler;\n\t        this.paused = false;\n\t        /** Ensures that the parsing loop isn't run multiple times at once. */\n\t        this.inLoop = false;\n\t        /**\n\t         * Indicates that the current adjusted node exists, is not an element in the HTML namespace,\n\t         * and that it is not an integration point for either MathML or HTML.\n\t         *\n\t         * @see {@link https://html.spec.whatwg.org/multipage/parsing.html#tree-construction}\n\t         */\n\t        this.inForeignNode = false;\n\t        this.lastStartTagName = '';\n\t        this.active = false;\n\t        this.state = State.DATA;\n\t        this.returnState = State.DATA;\n\t        this.charRefCode = -1;\n\t        this.consumedAfterSnapshot = -1;\n\t        this.currentCharacterToken = null;\n\t        this.currentToken = null;\n\t        this.currentAttr = { name: '', value: '' };\n\t        this.preprocessor = new Preprocessor(handler);\n\t        this.currentLocation = this.getCurrentLocation(-1);\n\t    }\n\t    //Errors\n\t    _err(code) {\n\t        var _a, _b;\n\t        (_b = (_a = this.handler).onParseError) === null || _b === void 0 ? void 0 : _b.call(_a, this.preprocessor.getError(code));\n\t    }\n\t    // NOTE: `offset` may never run across line boundaries.\n\t    getCurrentLocation(offset) {\n\t        if (!this.options.sourceCodeLocationInfo) {\n\t            return null;\n\t        }\n\t        return {\n\t            startLine: this.preprocessor.line,\n\t            startCol: this.preprocessor.col - offset,\n\t            startOffset: this.preprocessor.offset - offset,\n\t            endLine: -1,\n\t            endCol: -1,\n\t            endOffset: -1,\n\t        };\n\t    }\n\t    _runParsingLoop() {\n\t        if (this.inLoop)\n\t            return;\n\t        this.inLoop = true;\n\t        while (this.active && !this.paused) {\n\t            this.consumedAfterSnapshot = 0;\n\t            const cp = this._consume();\n\t            if (!this._ensureHibernation()) {\n\t                this._callState(cp);\n\t            }\n\t        }\n\t        this.inLoop = false;\n\t    }\n\t    //API\n\t    pause() {\n\t        this.paused = true;\n\t    }\n\t    resume(writeCallback) {\n\t        if (!this.paused) {\n\t            throw new Error('Parser was already resumed');\n\t        }\n\t        this.paused = false;\n\t        // Necessary for synchronous resume.\n\t        if (this.inLoop)\n\t            return;\n\t        this._runParsingLoop();\n\t        if (!this.paused) {\n\t            writeCallback === null || writeCallback === void 0 ? void 0 : writeCallback();\n\t        }\n\t    }\n\t    write(chunk, isLastChunk, writeCallback) {\n\t        this.active = true;\n\t        this.preprocessor.write(chunk, isLastChunk);\n\t        this._runParsingLoop();\n\t        if (!this.paused) {\n\t            writeCallback === null || writeCallback === void 0 ? void 0 : writeCallback();\n\t        }\n\t    }\n\t    insertHtmlAtCurrentPos(chunk) {\n\t        this.active = true;\n\t        this.preprocessor.insertHtmlAtCurrentPos(chunk);\n\t        this._runParsingLoop();\n\t    }\n\t    //Hibernation\n\t    _ensureHibernation() {\n\t        if (this.preprocessor.endOfChunkHit) {\n\t            this._unconsume(this.consumedAfterSnapshot);\n\t            this.active = false;\n\t            return true;\n\t        }\n\t        return false;\n\t    }\n\t    //Consumption\n\t    _consume() {\n\t        this.consumedAfterSnapshot++;\n\t        return this.preprocessor.advance();\n\t    }\n\t    _unconsume(count) {\n\t        this.consumedAfterSnapshot -= count;\n\t        this.preprocessor.retreat(count);\n\t    }\n\t    _reconsumeInState(state) {\n\t        this.state = state;\n\t        this._unconsume(1);\n\t    }\n\t    _advanceBy(count) {\n\t        this.consumedAfterSnapshot += count;\n\t        for (let i = 0; i < count; i++) {\n\t            this.preprocessor.advance();\n\t        }\n\t    }\n\t    _consumeSequenceIfMatch(pattern, caseSensitive) {\n\t        if (this.preprocessor.startsWith(pattern, caseSensitive)) {\n\t            // We will already have consumed one character before calling this method.\n\t            this._advanceBy(pattern.length - 1);\n\t            return true;\n\t        }\n\t        return false;\n\t    }\n\t    //Token creation\n\t    _createStartTagToken() {\n\t        this.currentToken = {\n\t            type: TokenType.START_TAG,\n\t            tagName: '',\n\t            tagID: TAG_ID.UNKNOWN,\n\t            selfClosing: false,\n\t            ackSelfClosing: false,\n\t            attrs: [],\n\t            location: this.getCurrentLocation(1),\n\t        };\n\t    }\n\t    _createEndTagToken() {\n\t        this.currentToken = {\n\t            type: TokenType.END_TAG,\n\t            tagName: '',\n\t            tagID: TAG_ID.UNKNOWN,\n\t            selfClosing: false,\n\t            ackSelfClosing: false,\n\t            attrs: [],\n\t            location: this.getCurrentLocation(2),\n\t        };\n\t    }\n\t    _createCommentToken(offset) {\n\t        this.currentToken = {\n\t            type: TokenType.COMMENT,\n\t            data: '',\n\t            location: this.getCurrentLocation(offset),\n\t        };\n\t    }\n\t    _createDoctypeToken(initialName) {\n\t        this.currentToken = {\n\t            type: TokenType.DOCTYPE,\n\t            name: initialName,\n\t            forceQuirks: false,\n\t            publicId: null,\n\t            systemId: null,\n\t            location: this.currentLocation,\n\t        };\n\t    }\n\t    _createCharacterToken(type, chars) {\n\t        this.currentCharacterToken = {\n\t            type,\n\t            chars,\n\t            location: this.currentLocation,\n\t        };\n\t    }\n\t    //Tag attributes\n\t    _createAttr(attrNameFirstCh) {\n\t        this.currentAttr = {\n\t            name: attrNameFirstCh,\n\t            value: '',\n\t        };\n\t        this.currentLocation = this.getCurrentLocation(0);\n\t    }\n\t    _leaveAttrName() {\n\t        var _a;\n\t        var _b;\n\t        const token = this.currentToken;\n\t        if (getTokenAttr(token, this.currentAttr.name) === null) {\n\t            token.attrs.push(this.currentAttr);\n\t            if (token.location && this.currentLocation) {\n\t                const attrLocations = ((_a = (_b = token.location).attrs) !== null && _a !== void 0 ? _a : (_b.attrs = Object.create(null)));\n\t                attrLocations[this.currentAttr.name] = this.currentLocation;\n\t                // Set end location\n\t                this._leaveAttrValue();\n\t            }\n\t        }\n\t        else {\n\t            this._err(ERR.duplicateAttribute);\n\t        }\n\t    }\n\t    _leaveAttrValue() {\n\t        if (this.currentLocation) {\n\t            this.currentLocation.endLine = this.preprocessor.line;\n\t            this.currentLocation.endCol = this.preprocessor.col;\n\t            this.currentLocation.endOffset = this.preprocessor.offset;\n\t        }\n\t    }\n\t    //Token emission\n\t    prepareToken(ct) {\n\t        this._emitCurrentCharacterToken(ct.location);\n\t        this.currentToken = null;\n\t        if (ct.location) {\n\t            ct.location.endLine = this.preprocessor.line;\n\t            ct.location.endCol = this.preprocessor.col + 1;\n\t            ct.location.endOffset = this.preprocessor.offset + 1;\n\t        }\n\t        this.currentLocation = this.getCurrentLocation(-1);\n\t    }\n\t    emitCurrentTagToken() {\n\t        const ct = this.currentToken;\n\t        this.prepareToken(ct);\n\t        ct.tagID = getTagID(ct.tagName);\n\t        if (ct.type === TokenType.START_TAG) {\n\t            this.lastStartTagName = ct.tagName;\n\t            this.handler.onStartTag(ct);\n\t        }\n\t        else {\n\t            if (ct.attrs.length > 0) {\n\t                this._err(ERR.endTagWithAttributes);\n\t            }\n\t            if (ct.selfClosing) {\n\t                this._err(ERR.endTagWithTrailingSolidus);\n\t            }\n\t            this.handler.onEndTag(ct);\n\t        }\n\t        this.preprocessor.dropParsedChunk();\n\t    }\n\t    emitCurrentComment(ct) {\n\t        this.prepareToken(ct);\n\t        this.handler.onComment(ct);\n\t        this.preprocessor.dropParsedChunk();\n\t    }\n\t    emitCurrentDoctype(ct) {\n\t        this.prepareToken(ct);\n\t        this.handler.onDoctype(ct);\n\t        this.preprocessor.dropParsedChunk();\n\t    }\n\t    _emitCurrentCharacterToken(nextLocation) {\n\t        if (this.currentCharacterToken) {\n\t            //NOTE: if we have a pending character token, make it's end location equal to the\n\t            //current token's start location.\n\t            if (nextLocation && this.currentCharacterToken.location) {\n\t                this.currentCharacterToken.location.endLine = nextLocation.startLine;\n\t                this.currentCharacterToken.location.endCol = nextLocation.startCol;\n\t                this.currentCharacterToken.location.endOffset = nextLocation.startOffset;\n\t            }\n\t            switch (this.currentCharacterToken.type) {\n\t                case TokenType.CHARACTER: {\n\t                    this.handler.onCharacter(this.currentCharacterToken);\n\t                    break;\n\t                }\n\t                case TokenType.NULL_CHARACTER: {\n\t                    this.handler.onNullCharacter(this.currentCharacterToken);\n\t                    break;\n\t                }\n\t                case TokenType.WHITESPACE_CHARACTER: {\n\t                    this.handler.onWhitespaceCharacter(this.currentCharacterToken);\n\t                    break;\n\t                }\n\t            }\n\t            this.currentCharacterToken = null;\n\t        }\n\t    }\n\t    _emitEOFToken() {\n\t        const location = this.getCurrentLocation(0);\n\t        if (location) {\n\t            location.endLine = location.startLine;\n\t            location.endCol = location.startCol;\n\t            location.endOffset = location.startOffset;\n\t        }\n\t        this._emitCurrentCharacterToken(location);\n\t        this.handler.onEof({ type: TokenType.EOF, location });\n\t        this.active = false;\n\t    }\n\t    //Characters emission\n\t    //OPTIMIZATION: specification uses only one type of character tokens (one token per character).\n\t    //This causes a huge memory overhead and a lot of unnecessary parser loops. parse5 uses 3 groups of characters.\n\t    //If we have a sequence of characters that belong to the same group, the parser can process it\n\t    //as a single solid character token.\n\t    //So, there are 3 types of character tokens in parse5:\n\t    //1)TokenType.NULL_CHARACTER - \\u0000-character sequences (e.g. '\\u0000\\u0000\\u0000')\n\t    //2)TokenType.WHITESPACE_CHARACTER - any whitespace/new-line character sequences (e.g. '\\n  \\r\\t   \\f')\n\t    //3)TokenType.CHARACTER - any character sequence which don't belong to groups 1 and 2 (e.g. 'abcdef1234@@#$%^')\n\t    _appendCharToCurrentCharacterToken(type, ch) {\n\t        if (this.currentCharacterToken) {\n\t            if (this.currentCharacterToken.type !== type) {\n\t                this.currentLocation = this.getCurrentLocation(0);\n\t                this._emitCurrentCharacterToken(this.currentLocation);\n\t                this.preprocessor.dropParsedChunk();\n\t            }\n\t            else {\n\t                this.currentCharacterToken.chars += ch;\n\t                return;\n\t            }\n\t        }\n\t        this._createCharacterToken(type, ch);\n\t    }\n\t    _emitCodePoint(cp) {\n\t        let type = TokenType.CHARACTER;\n\t        if (isWhitespace$1(cp)) {\n\t            type = TokenType.WHITESPACE_CHARACTER;\n\t        }\n\t        else if (cp === CODE_POINTS.NULL) {\n\t            type = TokenType.NULL_CHARACTER;\n\t        }\n\t        this._appendCharToCurrentCharacterToken(type, String.fromCodePoint(cp));\n\t    }\n\t    //NOTE: used when we emit characters explicitly.\n\t    //This is always for non-whitespace and non-null characters, which allows us to avoid additional checks.\n\t    _emitChars(ch) {\n\t        this._appendCharToCurrentCharacterToken(TokenType.CHARACTER, ch);\n\t    }\n\t    // Character reference helpers\n\t    _matchNamedCharacterReference(cp) {\n\t        let result = null;\n\t        let excess = 0;\n\t        let withoutSemicolon = false;\n\t        for (let i = 0, current = decode_10[0]; i >= 0; cp = this._consume()) {\n\t            i = decode_4(decode_10, current, i + 1, cp);\n\t            if (i < 0)\n\t                break;\n\t            excess += 1;\n\t            current = decode_10[i];\n\t            const masked = current & decode_5.VALUE_LENGTH;\n\t            // If the branch is a value, store it and continue\n\t            if (masked) {\n\t                // The mask is the number of bytes of the value, including the current byte.\n\t                const valueLength = (masked >> 14) - 1;\n\t                // Attribute values that aren't terminated properly aren't parsed, and shouldn't lead to a parser error.\n\t                // See the example in https://html.spec.whatwg.org/multipage/parsing.html#named-character-reference-state\n\t                if (cp !== CODE_POINTS.SEMICOLON &&\n\t                    this._isCharacterReferenceInAttribute() &&\n\t                    isEntityInAttributeInvalidEnd(this.preprocessor.peek(1))) {\n\t                    //NOTE: we don't flush all consumed code points here, and instead switch back to the original state after\n\t                    //emitting an ampersand. This is fine, as alphanumeric characters won't be parsed differently in attributes.\n\t                    result = [CODE_POINTS.AMPERSAND];\n\t                    // Skip over the value.\n\t                    i += valueLength;\n\t                }\n\t                else {\n\t                    // If this is a surrogate pair, consume the next two bytes.\n\t                    result =\n\t                        valueLength === 0\n\t                            ? [decode_10[i] & ~decode_5.VALUE_LENGTH]\n\t                            : valueLength === 1\n\t                                ? [decode_10[++i]]\n\t                                : [decode_10[++i], decode_10[++i]];\n\t                    excess = 0;\n\t                    withoutSemicolon = cp !== CODE_POINTS.SEMICOLON;\n\t                }\n\t                if (valueLength === 0) {\n\t                    // If the value is zero-length, we're done.\n\t                    this._consume();\n\t                    break;\n\t                }\n\t            }\n\t        }\n\t        this._unconsume(excess);\n\t        if (withoutSemicolon && !this.preprocessor.endOfChunkHit) {\n\t            this._err(ERR.missingSemicolonAfterCharacterReference);\n\t        }\n\t        // We want to emit the error above on the code point after the entity.\n\t        // We always consume one code point too many in the loop, and we wait to\n\t        // unconsume it until after the error is emitted.\n\t        this._unconsume(1);\n\t        return result;\n\t    }\n\t    _isCharacterReferenceInAttribute() {\n\t        return (this.returnState === State.ATTRIBUTE_VALUE_DOUBLE_QUOTED ||\n\t            this.returnState === State.ATTRIBUTE_VALUE_SINGLE_QUOTED ||\n\t            this.returnState === State.ATTRIBUTE_VALUE_UNQUOTED);\n\t    }\n\t    _flushCodePointConsumedAsCharacterReference(cp) {\n\t        if (this._isCharacterReferenceInAttribute()) {\n\t            this.currentAttr.value += String.fromCodePoint(cp);\n\t        }\n\t        else {\n\t            this._emitCodePoint(cp);\n\t        }\n\t    }\n\t    // Calling states this way turns out to be much faster than any other approach.\n\t    _callState(cp) {\n\t        switch (this.state) {\n\t            case State.DATA: {\n\t                this._stateData(cp);\n\t                break;\n\t            }\n\t            case State.RCDATA: {\n\t                this._stateRcdata(cp);\n\t                break;\n\t            }\n\t            case State.RAWTEXT: {\n\t                this._stateRawtext(cp);\n\t                break;\n\t            }\n\t            case State.SCRIPT_DATA: {\n\t                this._stateScriptData(cp);\n\t                break;\n\t            }\n\t            case State.PLAINTEXT: {\n\t                this._statePlaintext(cp);\n\t                break;\n\t            }\n\t            case State.TAG_OPEN: {\n\t                this._stateTagOpen(cp);\n\t                break;\n\t            }\n\t            case State.END_TAG_OPEN: {\n\t                this._stateEndTagOpen(cp);\n\t                break;\n\t            }\n\t            case State.TAG_NAME: {\n\t                this._stateTagName(cp);\n\t                break;\n\t            }\n\t            case State.RCDATA_LESS_THAN_SIGN: {\n\t                this._stateRcdataLessThanSign(cp);\n\t                break;\n\t            }\n\t            case State.RCDATA_END_TAG_OPEN: {\n\t                this._stateRcdataEndTagOpen(cp);\n\t                break;\n\t            }\n\t            case State.RCDATA_END_TAG_NAME: {\n\t                this._stateRcdataEndTagName(cp);\n\t                break;\n\t            }\n\t            case State.RAWTEXT_LESS_THAN_SIGN: {\n\t                this._stateRawtextLessThanSign(cp);\n\t                break;\n\t            }\n\t            case State.RAWTEXT_END_TAG_OPEN: {\n\t                this._stateRawtextEndTagOpen(cp);\n\t                break;\n\t            }\n\t            case State.RAWTEXT_END_TAG_NAME: {\n\t                this._stateRawtextEndTagName(cp);\n\t                break;\n\t            }\n\t            case State.SCRIPT_DATA_LESS_THAN_SIGN: {\n\t                this._stateScriptDataLessThanSign(cp);\n\t                break;\n\t            }\n\t            case State.SCRIPT_DATA_END_TAG_OPEN: {\n\t                this._stateScriptDataEndTagOpen(cp);\n\t                break;\n\t            }\n\t            case State.SCRIPT_DATA_END_TAG_NAME: {\n\t                this._stateScriptDataEndTagName(cp);\n\t                break;\n\t            }\n\t            case State.SCRIPT_DATA_ESCAPE_START: {\n\t                this._stateScriptDataEscapeStart(cp);\n\t                break;\n\t            }\n\t            case State.SCRIPT_DATA_ESCAPE_START_DASH: {\n\t                this._stateScriptDataEscapeStartDash(cp);\n\t                break;\n\t            }\n\t            case State.SCRIPT_DATA_ESCAPED: {\n\t                this._stateScriptDataEscaped(cp);\n\t                break;\n\t            }\n\t            case State.SCRIPT_DATA_ESCAPED_DASH: {\n\t                this._stateScriptDataEscapedDash(cp);\n\t                break;\n\t            }\n\t            case State.SCRIPT_DATA_ESCAPED_DASH_DASH: {\n\t                this._stateScriptDataEscapedDashDash(cp);\n\t                break;\n\t            }\n\t            case State.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN: {\n\t                this._stateScriptDataEscapedLessThanSign(cp);\n\t                break;\n\t            }\n\t            case State.SCRIPT_DATA_ESCAPED_END_TAG_OPEN: {\n\t                this._stateScriptDataEscapedEndTagOpen(cp);\n\t                break;\n\t            }\n\t            case State.SCRIPT_DATA_ESCAPED_END_TAG_NAME: {\n\t                this._stateScriptDataEscapedEndTagName(cp);\n\t                break;\n\t            }\n\t            case State.SCRIPT_DATA_DOUBLE_ESCAPE_START: {\n\t                this._stateScriptDataDoubleEscapeStart(cp);\n\t                break;\n\t            }\n\t            case State.SCRIPT_DATA_DOUBLE_ESCAPED: {\n\t                this._stateScriptDataDoubleEscaped(cp);\n\t                break;\n\t            }\n\t            case State.SCRIPT_DATA_DOUBLE_ESCAPED_DASH: {\n\t                this._stateScriptDataDoubleEscapedDash(cp);\n\t                break;\n\t            }\n\t            case State.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH: {\n\t                this._stateScriptDataDoubleEscapedDashDash(cp);\n\t                break;\n\t            }\n\t            case State.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN: {\n\t                this._stateScriptDataDoubleEscapedLessThanSign(cp);\n\t                break;\n\t            }\n\t            case State.SCRIPT_DATA_DOUBLE_ESCAPE_END: {\n\t                this._stateScriptDataDoubleEscapeEnd(cp);\n\t                break;\n\t            }\n\t            case State.BEFORE_ATTRIBUTE_NAME: {\n\t                this._stateBeforeAttributeName(cp);\n\t                break;\n\t            }\n\t            case State.ATTRIBUTE_NAME: {\n\t                this._stateAttributeName(cp);\n\t                break;\n\t            }\n\t            case State.AFTER_ATTRIBUTE_NAME: {\n\t                this._stateAfterAttributeName(cp);\n\t                break;\n\t            }\n\t            case State.BEFORE_ATTRIBUTE_VALUE: {\n\t                this._stateBeforeAttributeValue(cp);\n\t                break;\n\t            }\n\t            case State.ATTRIBUTE_VALUE_DOUBLE_QUOTED: {\n\t                this._stateAttributeValueDoubleQuoted(cp);\n\t                break;\n\t            }\n\t            case State.ATTRIBUTE_VALUE_SINGLE_QUOTED: {\n\t                this._stateAttributeValueSingleQuoted(cp);\n\t                break;\n\t            }\n\t            case State.ATTRIBUTE_VALUE_UNQUOTED: {\n\t                this._stateAttributeValueUnquoted(cp);\n\t                break;\n\t            }\n\t            case State.AFTER_ATTRIBUTE_VALUE_QUOTED: {\n\t                this._stateAfterAttributeValueQuoted(cp);\n\t                break;\n\t            }\n\t            case State.SELF_CLOSING_START_TAG: {\n\t                this._stateSelfClosingStartTag(cp);\n\t                break;\n\t            }\n\t            case State.BOGUS_COMMENT: {\n\t                this._stateBogusComment(cp);\n\t                break;\n\t            }\n\t            case State.MARKUP_DECLARATION_OPEN: {\n\t                this._stateMarkupDeclarationOpen(cp);\n\t                break;\n\t            }\n\t            case State.COMMENT_START: {\n\t                this._stateCommentStart(cp);\n\t                break;\n\t            }\n\t            case State.COMMENT_START_DASH: {\n\t                this._stateCommentStartDash(cp);\n\t                break;\n\t            }\n\t            case State.COMMENT: {\n\t                this._stateComment(cp);\n\t                break;\n\t            }\n\t            case State.COMMENT_LESS_THAN_SIGN: {\n\t                this._stateCommentLessThanSign(cp);\n\t                break;\n\t            }\n\t            case State.COMMENT_LESS_THAN_SIGN_BANG: {\n\t                this._stateCommentLessThanSignBang(cp);\n\t                break;\n\t            }\n\t            case State.COMMENT_LESS_THAN_SIGN_BANG_DASH: {\n\t                this._stateCommentLessThanSignBangDash(cp);\n\t                break;\n\t            }\n\t            case State.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH: {\n\t                this._stateCommentLessThanSignBangDashDash(cp);\n\t                break;\n\t            }\n\t            case State.COMMENT_END_DASH: {\n\t                this._stateCommentEndDash(cp);\n\t                break;\n\t            }\n\t            case State.COMMENT_END: {\n\t                this._stateCommentEnd(cp);\n\t                break;\n\t            }\n\t            case State.COMMENT_END_BANG: {\n\t                this._stateCommentEndBang(cp);\n\t                break;\n\t            }\n\t            case State.DOCTYPE: {\n\t                this._stateDoctype(cp);\n\t                break;\n\t            }\n\t            case State.BEFORE_DOCTYPE_NAME: {\n\t                this._stateBeforeDoctypeName(cp);\n\t                break;\n\t            }\n\t            case State.DOCTYPE_NAME: {\n\t                this._stateDoctypeName(cp);\n\t                break;\n\t            }\n\t            case State.AFTER_DOCTYPE_NAME: {\n\t                this._stateAfterDoctypeName(cp);\n\t                break;\n\t            }\n\t            case State.AFTER_DOCTYPE_PUBLIC_KEYWORD: {\n\t                this._stateAfterDoctypePublicKeyword(cp);\n\t                break;\n\t            }\n\t            case State.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER: {\n\t                this._stateBeforeDoctypePublicIdentifier(cp);\n\t                break;\n\t            }\n\t            case State.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED: {\n\t                this._stateDoctypePublicIdentifierDoubleQuoted(cp);\n\t                break;\n\t            }\n\t            case State.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED: {\n\t                this._stateDoctypePublicIdentifierSingleQuoted(cp);\n\t                break;\n\t            }\n\t            case State.AFTER_DOCTYPE_PUBLIC_IDENTIFIER: {\n\t                this._stateAfterDoctypePublicIdentifier(cp);\n\t                break;\n\t            }\n\t            case State.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS: {\n\t                this._stateBetweenDoctypePublicAndSystemIdentifiers(cp);\n\t                break;\n\t            }\n\t            case State.AFTER_DOCTYPE_SYSTEM_KEYWORD: {\n\t                this._stateAfterDoctypeSystemKeyword(cp);\n\t                break;\n\t            }\n\t            case State.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER: {\n\t                this._stateBeforeDoctypeSystemIdentifier(cp);\n\t                break;\n\t            }\n\t            case State.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED: {\n\t                this._stateDoctypeSystemIdentifierDoubleQuoted(cp);\n\t                break;\n\t            }\n\t            case State.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED: {\n\t                this._stateDoctypeSystemIdentifierSingleQuoted(cp);\n\t                break;\n\t            }\n\t            case State.AFTER_DOCTYPE_SYSTEM_IDENTIFIER: {\n\t                this._stateAfterDoctypeSystemIdentifier(cp);\n\t                break;\n\t            }\n\t            case State.BOGUS_DOCTYPE: {\n\t                this._stateBogusDoctype(cp);\n\t                break;\n\t            }\n\t            case State.CDATA_SECTION: {\n\t                this._stateCdataSection(cp);\n\t                break;\n\t            }\n\t            case State.CDATA_SECTION_BRACKET: {\n\t                this._stateCdataSectionBracket(cp);\n\t                break;\n\t            }\n\t            case State.CDATA_SECTION_END: {\n\t                this._stateCdataSectionEnd(cp);\n\t                break;\n\t            }\n\t            case State.CHARACTER_REFERENCE: {\n\t                this._stateCharacterReference(cp);\n\t                break;\n\t            }\n\t            case State.NAMED_CHARACTER_REFERENCE: {\n\t                this._stateNamedCharacterReference(cp);\n\t                break;\n\t            }\n\t            case State.AMBIGUOUS_AMPERSAND: {\n\t                this._stateAmbiguousAmpersand(cp);\n\t                break;\n\t            }\n\t            case State.NUMERIC_CHARACTER_REFERENCE: {\n\t                this._stateNumericCharacterReference(cp);\n\t                break;\n\t            }\n\t            case State.HEXADEMICAL_CHARACTER_REFERENCE_START: {\n\t                this._stateHexademicalCharacterReferenceStart(cp);\n\t                break;\n\t            }\n\t            case State.DECIMAL_CHARACTER_REFERENCE_START: {\n\t                this._stateDecimalCharacterReferenceStart(cp);\n\t                break;\n\t            }\n\t            case State.HEXADEMICAL_CHARACTER_REFERENCE: {\n\t                this._stateHexademicalCharacterReference(cp);\n\t                break;\n\t            }\n\t            case State.DECIMAL_CHARACTER_REFERENCE: {\n\t                this._stateDecimalCharacterReference(cp);\n\t                break;\n\t            }\n\t            case State.NUMERIC_CHARACTER_REFERENCE_END: {\n\t                this._stateNumericCharacterReferenceEnd();\n\t                break;\n\t            }\n\t            default: {\n\t                throw new Error('Unknown state');\n\t            }\n\t        }\n\t    }\n\t    // State machine\n\t    // Data state\n\t    //------------------------------------------------------------------\n\t    _stateData(cp) {\n\t        switch (cp) {\n\t            case CODE_POINTS.LESS_THAN_SIGN: {\n\t                this.state = State.TAG_OPEN;\n\t                break;\n\t            }\n\t            case CODE_POINTS.AMPERSAND: {\n\t                this.returnState = State.DATA;\n\t                this.state = State.CHARACTER_REFERENCE;\n\t                break;\n\t            }\n\t            case CODE_POINTS.NULL: {\n\t                this._err(ERR.unexpectedNullCharacter);\n\t                this._emitCodePoint(cp);\n\t                break;\n\t            }\n\t            case CODE_POINTS.EOF: {\n\t                this._emitEOFToken();\n\t                break;\n\t            }\n\t            default: {\n\t                this._emitCodePoint(cp);\n\t            }\n\t        }\n\t    }\n\t    //  RCDATA state\n\t    //------------------------------------------------------------------\n\t    _stateRcdata(cp) {\n\t        switch (cp) {\n\t            case CODE_POINTS.AMPERSAND: {\n\t                this.returnState = State.RCDATA;\n\t                this.state = State.CHARACTER_REFERENCE;\n\t                break;\n\t            }\n\t            case CODE_POINTS.LESS_THAN_SIGN: {\n\t                this.state = State.RCDATA_LESS_THAN_SIGN;\n\t                break;\n\t            }\n\t            case CODE_POINTS.NULL: {\n\t                this._err(ERR.unexpectedNullCharacter);\n\t                this._emitChars(REPLACEMENT_CHARACTER);\n\t                break;\n\t            }\n\t            case CODE_POINTS.EOF: {\n\t                this._emitEOFToken();\n\t                break;\n\t            }\n\t            default: {\n\t                this._emitCodePoint(cp);\n\t            }\n\t        }\n\t    }\n\t    // RAWTEXT state\n\t    //------------------------------------------------------------------\n\t    _stateRawtext(cp) {\n\t        switch (cp) {\n\t            case CODE_POINTS.LESS_THAN_SIGN: {\n\t                this.state = State.RAWTEXT_LESS_THAN_SIGN;\n\t                break;\n\t            }\n\t            case CODE_POINTS.NULL: {\n\t                this._err(ERR.unexpectedNullCharacter);\n\t                this._emitChars(REPLACEMENT_CHARACTER);\n\t                break;\n\t            }\n\t            case CODE_POINTS.EOF: {\n\t                this._emitEOFToken();\n\t                break;\n\t            }\n\t            default: {\n\t                this._emitCodePoint(cp);\n\t            }\n\t        }\n\t    }\n\t    // Script data state\n\t    //------------------------------------------------------------------\n\t    _stateScriptData(cp) {\n\t        switch (cp) {\n\t            case CODE_POINTS.LESS_THAN_SIGN: {\n\t                this.state = State.SCRIPT_DATA_LESS_THAN_SIGN;\n\t                break;\n\t            }\n\t            case CODE_POINTS.NULL: {\n\t                this._err(ERR.unexpectedNullCharacter);\n\t                this._emitChars(REPLACEMENT_CHARACTER);\n\t                break;\n\t            }\n\t            case CODE_POINTS.EOF: {\n\t                this._emitEOFToken();\n\t                break;\n\t            }\n\t            default: {\n\t                this._emitCodePoint(cp);\n\t            }\n\t        }\n\t    }\n\t    // PLAINTEXT state\n\t    //------------------------------------------------------------------\n\t    _statePlaintext(cp) {\n\t        switch (cp) {\n\t            case CODE_POINTS.NULL: {\n\t                this._err(ERR.unexpectedNullCharacter);\n\t                this._emitChars(REPLACEMENT_CHARACTER);\n\t                break;\n\t            }\n\t            case CODE_POINTS.EOF: {\n\t                this._emitEOFToken();\n\t                break;\n\t            }\n\t            default: {\n\t                this._emitCodePoint(cp);\n\t            }\n\t        }\n\t    }\n\t    // Tag open state\n\t    //------------------------------------------------------------------\n\t    _stateTagOpen(cp) {\n\t        if (isAsciiLetter(cp)) {\n\t            this._createStartTagToken();\n\t            this.state = State.TAG_NAME;\n\t            this._stateTagName(cp);\n\t        }\n\t        else\n\t            switch (cp) {\n\t                case CODE_POINTS.EXCLAMATION_MARK: {\n\t                    this.state = State.MARKUP_DECLARATION_OPEN;\n\t                    break;\n\t                }\n\t                case CODE_POINTS.SOLIDUS: {\n\t                    this.state = State.END_TAG_OPEN;\n\t                    break;\n\t                }\n\t                case CODE_POINTS.QUESTION_MARK: {\n\t                    this._err(ERR.unexpectedQuestionMarkInsteadOfTagName);\n\t                    this._createCommentToken(1);\n\t                    this.state = State.BOGUS_COMMENT;\n\t                    this._stateBogusComment(cp);\n\t                    break;\n\t                }\n\t                case CODE_POINTS.EOF: {\n\t                    this._err(ERR.eofBeforeTagName);\n\t                    this._emitChars('<');\n\t                    this._emitEOFToken();\n\t                    break;\n\t                }\n\t                default: {\n\t                    this._err(ERR.invalidFirstCharacterOfTagName);\n\t                    this._emitChars('<');\n\t                    this.state = State.DATA;\n\t                    this._stateData(cp);\n\t                }\n\t            }\n\t    }\n\t    // End tag open state\n\t    //------------------------------------------------------------------\n\t    _stateEndTagOpen(cp) {\n\t        if (isAsciiLetter(cp)) {\n\t            this._createEndTagToken();\n\t            this.state = State.TAG_NAME;\n\t            this._stateTagName(cp);\n\t        }\n\t        else\n\t            switch (cp) {\n\t                case CODE_POINTS.GREATER_THAN_SIGN: {\n\t                    this._err(ERR.missingEndTagName);\n\t                    this.state = State.DATA;\n\t                    break;\n\t                }\n\t                case CODE_POINTS.EOF: {\n\t                    this._err(ERR.eofBeforeTagName);\n\t                    this._emitChars('</');\n\t                    this._emitEOFToken();\n\t                    break;\n\t                }\n\t                default: {\n\t                    this._err(ERR.invalidFirstCharacterOfTagName);\n\t                    this._createCommentToken(2);\n\t                    this.state = State.BOGUS_COMMENT;\n\t                    this._stateBogusComment(cp);\n\t                }\n\t            }\n\t    }\n\t    // Tag name state\n\t    //------------------------------------------------------------------\n\t    _stateTagName(cp) {\n\t        const token = this.currentToken;\n\t        switch (cp) {\n\t            case CODE_POINTS.SPACE:\n\t            case CODE_POINTS.LINE_FEED:\n\t            case CODE_POINTS.TABULATION:\n\t            case CODE_POINTS.FORM_FEED: {\n\t                this.state = State.BEFORE_ATTRIBUTE_NAME;\n\t                break;\n\t            }\n\t            case CODE_POINTS.SOLIDUS: {\n\t                this.state = State.SELF_CLOSING_START_TAG;\n\t                break;\n\t            }\n\t            case CODE_POINTS.GREATER_THAN_SIGN: {\n\t                this.state = State.DATA;\n\t                this.emitCurrentTagToken();\n\t                break;\n\t            }\n\t            case CODE_POINTS.NULL: {\n\t                this._err(ERR.unexpectedNullCharacter);\n\t                token.tagName += REPLACEMENT_CHARACTER;\n\t                break;\n\t            }\n\t            case CODE_POINTS.EOF: {\n\t                this._err(ERR.eofInTag);\n\t                this._emitEOFToken();\n\t                break;\n\t            }\n\t            default: {\n\t                token.tagName += String.fromCodePoint(isAsciiUpper(cp) ? toAsciiLower(cp) : cp);\n\t            }\n\t        }\n\t    }\n\t    // RCDATA less-than sign state\n\t    //------------------------------------------------------------------\n\t    _stateRcdataLessThanSign(cp) {\n\t        if (cp === CODE_POINTS.SOLIDUS) {\n\t            this.state = State.RCDATA_END_TAG_OPEN;\n\t        }\n\t        else {\n\t            this._emitChars('<');\n\t            this.state = State.RCDATA;\n\t            this._stateRcdata(cp);\n\t        }\n\t    }\n\t    // RCDATA end tag open state\n\t    //------------------------------------------------------------------\n\t    _stateRcdataEndTagOpen(cp) {\n\t        if (isAsciiLetter(cp)) {\n\t            this.state = State.RCDATA_END_TAG_NAME;\n\t            this._stateRcdataEndTagName(cp);\n\t        }\n\t        else {\n\t            this._emitChars('</');\n\t            this.state = State.RCDATA;\n\t            this._stateRcdata(cp);\n\t        }\n\t    }\n\t    handleSpecialEndTag(_cp) {\n\t        if (!this.preprocessor.startsWith(this.lastStartTagName, false)) {\n\t            return !this._ensureHibernation();\n\t        }\n\t        this._createEndTagToken();\n\t        const token = this.currentToken;\n\t        token.tagName = this.lastStartTagName;\n\t        const cp = this.preprocessor.peek(this.lastStartTagName.length);\n\t        switch (cp) {\n\t            case CODE_POINTS.SPACE:\n\t            case CODE_POINTS.LINE_FEED:\n\t            case CODE_POINTS.TABULATION:\n\t            case CODE_POINTS.FORM_FEED: {\n\t                this._advanceBy(this.lastStartTagName.length);\n\t                this.state = State.BEFORE_ATTRIBUTE_NAME;\n\t                return false;\n\t            }\n\t            case CODE_POINTS.SOLIDUS: {\n\t                this._advanceBy(this.lastStartTagName.length);\n\t                this.state = State.SELF_CLOSING_START_TAG;\n\t                return false;\n\t            }\n\t            case CODE_POINTS.GREATER_THAN_SIGN: {\n\t                this._advanceBy(this.lastStartTagName.length);\n\t                this.emitCurrentTagToken();\n\t                this.state = State.DATA;\n\t                return false;\n\t            }\n\t            default: {\n\t                return !this._ensureHibernation();\n\t            }\n\t        }\n\t    }\n\t    // RCDATA end tag name state\n\t    //------------------------------------------------------------------\n\t    _stateRcdataEndTagName(cp) {\n\t        if (this.handleSpecialEndTag(cp)) {\n\t            this._emitChars('</');\n\t            this.state = State.RCDATA;\n\t            this._stateRcdata(cp);\n\t        }\n\t    }\n\t    // RAWTEXT less-than sign state\n\t    //------------------------------------------------------------------\n\t    _stateRawtextLessThanSign(cp) {\n\t        if (cp === CODE_POINTS.SOLIDUS) {\n\t            this.state = State.RAWTEXT_END_TAG_OPEN;\n\t        }\n\t        else {\n\t            this._emitChars('<');\n\t            this.state = State.RAWTEXT;\n\t            this._stateRawtext(cp);\n\t        }\n\t    }\n\t    // RAWTEXT end tag open state\n\t    //------------------------------------------------------------------\n\t    _stateRawtextEndTagOpen(cp) {\n\t        if (isAsciiLetter(cp)) {\n\t            this.state = State.RAWTEXT_END_TAG_NAME;\n\t            this._stateRawtextEndTagName(cp);\n\t        }\n\t        else {\n\t            this._emitChars('</');\n\t            this.state = State.RAWTEXT;\n\t            this._stateRawtext(cp);\n\t        }\n\t    }\n\t    // RAWTEXT end tag name state\n\t    //------------------------------------------------------------------\n\t    _stateRawtextEndTagName(cp) {\n\t        if (this.handleSpecialEndTag(cp)) {\n\t            this._emitChars('</');\n\t            this.state = State.RAWTEXT;\n\t            this._stateRawtext(cp);\n\t        }\n\t    }\n\t    // Script data less-than sign state\n\t    //------------------------------------------------------------------\n\t    _stateScriptDataLessThanSign(cp) {\n\t        switch (cp) {\n\t            case CODE_POINTS.SOLIDUS: {\n\t                this.state = State.SCRIPT_DATA_END_TAG_OPEN;\n\t                break;\n\t            }\n\t            case CODE_POINTS.EXCLAMATION_MARK: {\n\t                this.state = State.SCRIPT_DATA_ESCAPE_START;\n\t                this._emitChars('<!');\n\t                break;\n\t            }\n\t            default: {\n\t                this._emitChars('<');\n\t                this.state = State.SCRIPT_DATA;\n\t                this._stateScriptData(cp);\n\t            }\n\t        }\n\t    }\n\t    // Script data end tag open state\n\t    //------------------------------------------------------------------\n\t    _stateScriptDataEndTagOpen(cp) {\n\t        if (isAsciiLetter(cp)) {\n\t            this.state = State.SCRIPT_DATA_END_TAG_NAME;\n\t            this._stateScriptDataEndTagName(cp);\n\t        }\n\t        else {\n\t            this._emitChars('</');\n\t            this.state = State.SCRIPT_DATA;\n\t            this._stateScriptData(cp);\n\t        }\n\t    }\n\t    // Script data end tag name state\n\t    //------------------------------------------------------------------\n\t    _stateScriptDataEndTagName(cp) {\n\t        if (this.handleSpecialEndTag(cp)) {\n\t            this._emitChars('</');\n\t            this.state = State.SCRIPT_DATA;\n\t            this._stateScriptData(cp);\n\t        }\n\t    }\n\t    // Script data escape start state\n\t    //------------------------------------------------------------------\n\t    _stateScriptDataEscapeStart(cp) {\n\t        if (cp === CODE_POINTS.HYPHEN_MINUS) {\n\t            this.state = State.SCRIPT_DATA_ESCAPE_START_DASH;\n\t            this._emitChars('-');\n\t        }\n\t        else {\n\t            this.state = State.SCRIPT_DATA;\n\t            this._stateScriptData(cp);\n\t        }\n\t    }\n\t    // Script data escape start dash state\n\t    //------------------------------------------------------------------\n\t    _stateScriptDataEscapeStartDash(cp) {\n\t        if (cp === CODE_POINTS.HYPHEN_MINUS) {\n\t            this.state = State.SCRIPT_DATA_ESCAPED_DASH_DASH;\n\t            this._emitChars('-');\n\t        }\n\t        else {\n\t            this.state = State.SCRIPT_DATA;\n\t            this._stateScriptData(cp);\n\t        }\n\t    }\n\t    // Script data escaped state\n\t    //------------------------------------------------------------------\n\t    _stateScriptDataEscaped(cp) {\n\t        switch (cp) {\n\t            case CODE_POINTS.HYPHEN_MINUS: {\n\t                this.state = State.SCRIPT_DATA_ESCAPED_DASH;\n\t                this._emitChars('-');\n\t                break;\n\t            }\n\t            case CODE_POINTS.LESS_THAN_SIGN: {\n\t                this.state = State.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;\n\t                break;\n\t            }\n\t            case CODE_POINTS.NULL: {\n\t                this._err(ERR.unexpectedNullCharacter);\n\t                this._emitChars(REPLACEMENT_CHARACTER);\n\t                break;\n\t            }\n\t            case CODE_POINTS.EOF: {\n\t                this._err(ERR.eofInScriptHtmlCommentLikeText);\n\t                this._emitEOFToken();\n\t                break;\n\t            }\n\t            default: {\n\t                this._emitCodePoint(cp);\n\t            }\n\t        }\n\t    }\n\t    // Script data escaped dash state\n\t    //------------------------------------------------------------------\n\t    _stateScriptDataEscapedDash(cp) {\n\t        switch (cp) {\n\t            case CODE_POINTS.HYPHEN_MINUS: {\n\t                this.state = State.SCRIPT_DATA_ESCAPED_DASH_DASH;\n\t                this._emitChars('-');\n\t                break;\n\t            }\n\t            case CODE_POINTS.LESS_THAN_SIGN: {\n\t                this.state = State.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;\n\t                break;\n\t            }\n\t            case CODE_POINTS.NULL: {\n\t                this._err(ERR.unexpectedNullCharacter);\n\t                this.state = State.SCRIPT_DATA_ESCAPED;\n\t                this._emitChars(REPLACEMENT_CHARACTER);\n\t                break;\n\t            }\n\t            case CODE_POINTS.EOF: {\n\t                this._err(ERR.eofInScriptHtmlCommentLikeText);\n\t                this._emitEOFToken();\n\t                break;\n\t            }\n\t            default: {\n\t                this.state = State.SCRIPT_DATA_ESCAPED;\n\t                this._emitCodePoint(cp);\n\t            }\n\t        }\n\t    }\n\t    // Script data escaped dash dash state\n\t    //------------------------------------------------------------------\n\t    _stateScriptDataEscapedDashDash(cp) {\n\t        switch (cp) {\n\t            case CODE_POINTS.HYPHEN_MINUS: {\n\t                this._emitChars('-');\n\t                break;\n\t            }\n\t            case CODE_POINTS.LESS_THAN_SIGN: {\n\t                this.state = State.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;\n\t                break;\n\t            }\n\t            case CODE_POINTS.GREATER_THAN_SIGN: {\n\t                this.state = State.SCRIPT_DATA;\n\t                this._emitChars('>');\n\t                break;\n\t            }\n\t            case CODE_POINTS.NULL: {\n\t                this._err(ERR.unexpectedNullCharacter);\n\t                this.state = State.SCRIPT_DATA_ESCAPED;\n\t                this._emitChars(REPLACEMENT_CHARACTER);\n\t                break;\n\t            }\n\t            case CODE_POINTS.EOF: {\n\t                this._err(ERR.eofInScriptHtmlCommentLikeText);\n\t                this._emitEOFToken();\n\t                break;\n\t            }\n\t            default: {\n\t                this.state = State.SCRIPT_DATA_ESCAPED;\n\t                this._emitCodePoint(cp);\n\t            }\n\t        }\n\t    }\n\t    // Script data escaped less-than sign state\n\t    //------------------------------------------------------------------\n\t    _stateScriptDataEscapedLessThanSign(cp) {\n\t        if (cp === CODE_POINTS.SOLIDUS) {\n\t            this.state = State.SCRIPT_DATA_ESCAPED_END_TAG_OPEN;\n\t        }\n\t        else if (isAsciiLetter(cp)) {\n\t            this._emitChars('<');\n\t            this.state = State.SCRIPT_DATA_DOUBLE_ESCAPE_START;\n\t            this._stateScriptDataDoubleEscapeStart(cp);\n\t        }\n\t        else {\n\t            this._emitChars('<');\n\t            this.state = State.SCRIPT_DATA_ESCAPED;\n\t            this._stateScriptDataEscaped(cp);\n\t        }\n\t    }\n\t    // Script data escaped end tag open state\n\t    //------------------------------------------------------------------\n\t    _stateScriptDataEscapedEndTagOpen(cp) {\n\t        if (isAsciiLetter(cp)) {\n\t            this.state = State.SCRIPT_DATA_ESCAPED_END_TAG_NAME;\n\t            this._stateScriptDataEscapedEndTagName(cp);\n\t        }\n\t        else {\n\t            this._emitChars('</');\n\t            this.state = State.SCRIPT_DATA_ESCAPED;\n\t            this._stateScriptDataEscaped(cp);\n\t        }\n\t    }\n\t    // Script data escaped end tag name state\n\t    //------------------------------------------------------------------\n\t    _stateScriptDataEscapedEndTagName(cp) {\n\t        if (this.handleSpecialEndTag(cp)) {\n\t            this._emitChars('</');\n\t            this.state = State.SCRIPT_DATA_ESCAPED;\n\t            this._stateScriptDataEscaped(cp);\n\t        }\n\t    }\n\t    // Script data double escape start state\n\t    //------------------------------------------------------------------\n\t    _stateScriptDataDoubleEscapeStart(cp) {\n\t        if (this.preprocessor.startsWith(SEQUENCES.SCRIPT, false) &&\n\t            isScriptDataDoubleEscapeSequenceEnd(this.preprocessor.peek(SEQUENCES.SCRIPT.length))) {\n\t            this._emitCodePoint(cp);\n\t            for (let i = 0; i < SEQUENCES.SCRIPT.length; i++) {\n\t                this._emitCodePoint(this._consume());\n\t            }\n\t            this.state = State.SCRIPT_DATA_DOUBLE_ESCAPED;\n\t        }\n\t        else if (!this._ensureHibernation()) {\n\t            this.state = State.SCRIPT_DATA_ESCAPED;\n\t            this._stateScriptDataEscaped(cp);\n\t        }\n\t    }\n\t    // Script data double escaped state\n\t    //------------------------------------------------------------------\n\t    _stateScriptDataDoubleEscaped(cp) {\n\t        switch (cp) {\n\t            case CODE_POINTS.HYPHEN_MINUS: {\n\t                this.state = State.SCRIPT_DATA_DOUBLE_ESCAPED_DASH;\n\t                this._emitChars('-');\n\t                break;\n\t            }\n\t            case CODE_POINTS.LESS_THAN_SIGN: {\n\t                this.state = State.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN;\n\t                this._emitChars('<');\n\t                break;\n\t            }\n\t            case CODE_POINTS.NULL: {\n\t                this._err(ERR.unexpectedNullCharacter);\n\t                this._emitChars(REPLACEMENT_CHARACTER);\n\t                break;\n\t            }\n\t            case CODE_POINTS.EOF: {\n\t                this._err(ERR.eofInScriptHtmlCommentLikeText);\n\t                this._emitEOFToken();\n\t                break;\n\t            }\n\t            default: {\n\t                this._emitCodePoint(cp);\n\t            }\n\t        }\n\t    }\n\t    // Script data double escaped dash state\n\t    //------------------------------------------------------------------\n\t    _stateScriptDataDoubleEscapedDash(cp) {\n\t        switch (cp) {\n\t            case CODE_POINTS.HYPHEN_MINUS: {\n\t                this.state = State.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH;\n\t                this._emitChars('-');\n\t                break;\n\t            }\n\t            case CODE_POINTS.LESS_THAN_SIGN: {\n\t                this.state = State.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN;\n\t                this._emitChars('<');\n\t                break;\n\t            }\n\t            case CODE_POINTS.NULL: {\n\t                this._err(ERR.unexpectedNullCharacter);\n\t                this.state = State.SCRIPT_DATA_DOUBLE_ESCAPED;\n\t                this._emitChars(REPLACEMENT_CHARACTER);\n\t                break;\n\t            }\n\t            case CODE_POINTS.EOF: {\n\t                this._err(ERR.eofInScriptHtmlCommentLikeText);\n\t                this._emitEOFToken();\n\t                break;\n\t            }\n\t            default: {\n\t                this.state = State.SCRIPT_DATA_DOUBLE_ESCAPED;\n\t                this._emitCodePoint(cp);\n\t            }\n\t        }\n\t    }\n\t    // Script data double escaped dash dash state\n\t    //------------------------------------------------------------------\n\t    _stateScriptDataDoubleEscapedDashDash(cp) {\n\t        switch (cp) {\n\t            case CODE_POINTS.HYPHEN_MINUS: {\n\t                this._emitChars('-');\n\t                break;\n\t            }\n\t            case CODE_POINTS.LESS_THAN_SIGN: {\n\t                this.state = State.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN;\n\t                this._emitChars('<');\n\t                break;\n\t            }\n\t            case CODE_POINTS.GREATER_THAN_SIGN: {\n\t                this.state = State.SCRIPT_DATA;\n\t                this._emitChars('>');\n\t                break;\n\t            }\n\t            case CODE_POINTS.NULL: {\n\t                this._err(ERR.unexpectedNullCharacter);\n\t                this.state = State.SCRIPT_DATA_DOUBLE_ESCAPED;\n\t                this._emitChars(REPLACEMENT_CHARACTER);\n\t                break;\n\t            }\n\t            case CODE_POINTS.EOF: {\n\t                this._err(ERR.eofInScriptHtmlCommentLikeText);\n\t                this._emitEOFToken();\n\t                break;\n\t            }\n\t            default: {\n\t                this.state = State.SCRIPT_DATA_DOUBLE_ESCAPED;\n\t                this._emitCodePoint(cp);\n\t            }\n\t        }\n\t    }\n\t    // Script data double escaped less-than sign state\n\t    //------------------------------------------------------------------\n\t    _stateScriptDataDoubleEscapedLessThanSign(cp) {\n\t        if (cp === CODE_POINTS.SOLIDUS) {\n\t            this.state = State.SCRIPT_DATA_DOUBLE_ESCAPE_END;\n\t            this._emitChars('/');\n\t        }\n\t        else {\n\t            this.state = State.SCRIPT_DATA_DOUBLE_ESCAPED;\n\t            this._stateScriptDataDoubleEscaped(cp);\n\t        }\n\t    }\n\t    // Script data double escape end state\n\t    //------------------------------------------------------------------\n\t    _stateScriptDataDoubleEscapeEnd(cp) {\n\t        if (this.preprocessor.startsWith(SEQUENCES.SCRIPT, false) &&\n\t            isScriptDataDoubleEscapeSequenceEnd(this.preprocessor.peek(SEQUENCES.SCRIPT.length))) {\n\t            this._emitCodePoint(cp);\n\t            for (let i = 0; i < SEQUENCES.SCRIPT.length; i++) {\n\t                this._emitCodePoint(this._consume());\n\t            }\n\t            this.state = State.SCRIPT_DATA_ESCAPED;\n\t        }\n\t        else if (!this._ensureHibernation()) {\n\t            this.state = State.SCRIPT_DATA_DOUBLE_ESCAPED;\n\t            this._stateScriptDataDoubleEscaped(cp);\n\t        }\n\t    }\n\t    // Before attribute name state\n\t    //------------------------------------------------------------------\n\t    _stateBeforeAttributeName(cp) {\n\t        switch (cp) {\n\t            case CODE_POINTS.SPACE:\n\t            case CODE_POINTS.LINE_FEED:\n\t            case CODE_POINTS.TABULATION:\n\t            case CODE_POINTS.FORM_FEED: {\n\t                // Ignore whitespace\n\t                break;\n\t            }\n\t            case CODE_POINTS.SOLIDUS:\n\t            case CODE_POINTS.GREATER_THAN_SIGN:\n\t            case CODE_POINTS.EOF: {\n\t                this.state = State.AFTER_ATTRIBUTE_NAME;\n\t                this._stateAfterAttributeName(cp);\n\t                break;\n\t            }\n\t            case CODE_POINTS.EQUALS_SIGN: {\n\t                this._err(ERR.unexpectedEqualsSignBeforeAttributeName);\n\t                this._createAttr('=');\n\t                this.state = State.ATTRIBUTE_NAME;\n\t                break;\n\t            }\n\t            default: {\n\t                this._createAttr('');\n\t                this.state = State.ATTRIBUTE_NAME;\n\t                this._stateAttributeName(cp);\n\t            }\n\t        }\n\t    }\n\t    // Attribute name state\n\t    //------------------------------------------------------------------\n\t    _stateAttributeName(cp) {\n\t        switch (cp) {\n\t            case CODE_POINTS.SPACE:\n\t            case CODE_POINTS.LINE_FEED:\n\t            case CODE_POINTS.TABULATION:\n\t            case CODE_POINTS.FORM_FEED:\n\t            case CODE_POINTS.SOLIDUS:\n\t            case CODE_POINTS.GREATER_THAN_SIGN:\n\t            case CODE_POINTS.EOF: {\n\t                this._leaveAttrName();\n\t                this.state = State.AFTER_ATTRIBUTE_NAME;\n\t                this._stateAfterAttributeName(cp);\n\t                break;\n\t            }\n\t            case CODE_POINTS.EQUALS_SIGN: {\n\t                this._leaveAttrName();\n\t                this.state = State.BEFORE_ATTRIBUTE_VALUE;\n\t                break;\n\t            }\n\t            case CODE_POINTS.QUOTATION_MARK:\n\t            case CODE_POINTS.APOSTROPHE:\n\t            case CODE_POINTS.LESS_THAN_SIGN: {\n\t                this._err(ERR.unexpectedCharacterInAttributeName);\n\t                this.currentAttr.name += String.fromCodePoint(cp);\n\t                break;\n\t            }\n\t            case CODE_POINTS.NULL: {\n\t                this._err(ERR.unexpectedNullCharacter);\n\t                this.currentAttr.name += REPLACEMENT_CHARACTER;\n\t                break;\n\t            }\n\t            default: {\n\t                this.currentAttr.name += String.fromCodePoint(isAsciiUpper(cp) ? toAsciiLower(cp) : cp);\n\t            }\n\t        }\n\t    }\n\t    // After attribute name state\n\t    //------------------------------------------------------------------\n\t    _stateAfterAttributeName(cp) {\n\t        switch (cp) {\n\t            case CODE_POINTS.SPACE:\n\t            case CODE_POINTS.LINE_FEED:\n\t            case CODE_POINTS.TABULATION:\n\t            case CODE_POINTS.FORM_FEED: {\n\t                // Ignore whitespace\n\t                break;\n\t            }\n\t            case CODE_POINTS.SOLIDUS: {\n\t                this.state = State.SELF_CLOSING_START_TAG;\n\t                break;\n\t            }\n\t            case CODE_POINTS.EQUALS_SIGN: {\n\t                this.state = State.BEFORE_ATTRIBUTE_VALUE;\n\t                break;\n\t            }\n\t            case CODE_POINTS.GREATER_THAN_SIGN: {\n\t                this.state = State.DATA;\n\t                this.emitCurrentTagToken();\n\t                break;\n\t            }\n\t            case CODE_POINTS.EOF: {\n\t                this._err(ERR.eofInTag);\n\t                this._emitEOFToken();\n\t                break;\n\t            }\n\t            default: {\n\t                this._createAttr('');\n\t                this.state = State.ATTRIBUTE_NAME;\n\t                this._stateAttributeName(cp);\n\t            }\n\t        }\n\t    }\n\t    // Before attribute value state\n\t    //------------------------------------------------------------------\n\t    _stateBeforeAttributeValue(cp) {\n\t        switch (cp) {\n\t            case CODE_POINTS.SPACE:\n\t            case CODE_POINTS.LINE_FEED:\n\t            case CODE_POINTS.TABULATION:\n\t            case CODE_POINTS.FORM_FEED: {\n\t                // Ignore whitespace\n\t                break;\n\t            }\n\t            case CODE_POINTS.QUOTATION_MARK: {\n\t                this.state = State.ATTRIBUTE_VALUE_DOUBLE_QUOTED;\n\t                break;\n\t            }\n\t            case CODE_POINTS.APOSTROPHE: {\n\t                this.state = State.ATTRIBUTE_VALUE_SINGLE_QUOTED;\n\t                break;\n\t            }\n\t            case CODE_POINTS.GREATER_THAN_SIGN: {\n\t                this._err(ERR.missingAttributeValue);\n\t                this.state = State.DATA;\n\t                this.emitCurrentTagToken();\n\t                break;\n\t            }\n\t            default: {\n\t                this.state = State.ATTRIBUTE_VALUE_UNQUOTED;\n\t                this._stateAttributeValueUnquoted(cp);\n\t            }\n\t        }\n\t    }\n\t    // Attribute value (double-quoted) state\n\t    //------------------------------------------------------------------\n\t    _stateAttributeValueDoubleQuoted(cp) {\n\t        switch (cp) {\n\t            case CODE_POINTS.QUOTATION_MARK: {\n\t                this.state = State.AFTER_ATTRIBUTE_VALUE_QUOTED;\n\t                break;\n\t            }\n\t            case CODE_POINTS.AMPERSAND: {\n\t                this.returnState = State.ATTRIBUTE_VALUE_DOUBLE_QUOTED;\n\t                this.state = State.CHARACTER_REFERENCE;\n\t                break;\n\t            }\n\t            case CODE_POINTS.NULL: {\n\t                this._err(ERR.unexpectedNullCharacter);\n\t                this.currentAttr.value += REPLACEMENT_CHARACTER;\n\t                break;\n\t            }\n\t            case CODE_POINTS.EOF: {\n\t                this._err(ERR.eofInTag);\n\t                this._emitEOFToken();\n\t                break;\n\t            }\n\t            default: {\n\t                this.currentAttr.value += String.fromCodePoint(cp);\n\t            }\n\t        }\n\t    }\n\t    // Attribute value (single-quoted) state\n\t    //------------------------------------------------------------------\n\t    _stateAttributeValueSingleQuoted(cp) {\n\t        switch (cp) {\n\t            case CODE_POINTS.APOSTROPHE: {\n\t                this.state = State.AFTER_ATTRIBUTE_VALUE_QUOTED;\n\t                break;\n\t            }\n\t            case CODE_POINTS.AMPERSAND: {\n\t                this.returnState = State.ATTRIBUTE_VALUE_SINGLE_QUOTED;\n\t                this.state = State.CHARACTER_REFERENCE;\n\t                break;\n\t            }\n\t            case CODE_POINTS.NULL: {\n\t                this._err(ERR.unexpectedNullCharacter);\n\t                this.currentAttr.value += REPLACEMENT_CHARACTER;\n\t                break;\n\t            }\n\t            case CODE_POINTS.EOF: {\n\t                this._err(ERR.eofInTag);\n\t                this._emitEOFToken();\n\t                break;\n\t            }\n\t            default: {\n\t                this.currentAttr.value += String.fromCodePoint(cp);\n\t            }\n\t        }\n\t    }\n\t    // Attribute value (unquoted) state\n\t    //------------------------------------------------------------------\n\t    _stateAttributeValueUnquoted(cp) {\n\t        switch (cp) {\n\t            case CODE_POINTS.SPACE:\n\t            case CODE_POINTS.LINE_FEED:\n\t            case CODE_POINTS.TABULATION:\n\t            case CODE_POINTS.FORM_FEED: {\n\t                this._leaveAttrValue();\n\t                this.state = State.BEFORE_ATTRIBUTE_NAME;\n\t                break;\n\t            }\n\t            case CODE_POINTS.AMPERSAND: {\n\t                this.returnState = State.ATTRIBUTE_VALUE_UNQUOTED;\n\t                this.state = State.CHARACTER_REFERENCE;\n\t                break;\n\t            }\n\t            case CODE_POINTS.GREATER_THAN_SIGN: {\n\t                this._leaveAttrValue();\n\t                this.state = State.DATA;\n\t                this.emitCurrentTagToken();\n\t                break;\n\t            }\n\t            case CODE_POINTS.NULL: {\n\t                this._err(ERR.unexpectedNullCharacter);\n\t                this.currentAttr.value += REPLACEMENT_CHARACTER;\n\t                break;\n\t            }\n\t            case CODE_POINTS.QUOTATION_MARK:\n\t            case CODE_POINTS.APOSTROPHE:\n\t            case CODE_POINTS.LESS_THAN_SIGN:\n\t            case CODE_POINTS.EQUALS_SIGN:\n\t            case CODE_POINTS.GRAVE_ACCENT: {\n\t                this._err(ERR.unexpectedCharacterInUnquotedAttributeValue);\n\t                this.currentAttr.value += String.fromCodePoint(cp);\n\t                break;\n\t            }\n\t            case CODE_POINTS.EOF: {\n\t                this._err(ERR.eofInTag);\n\t                this._emitEOFToken();\n\t                break;\n\t            }\n\t            default: {\n\t                this.currentAttr.value += String.fromCodePoint(cp);\n\t            }\n\t        }\n\t    }\n\t    // After attribute value (quoted) state\n\t    //------------------------------------------------------------------\n\t    _stateAfterAttributeValueQuoted(cp) {\n\t        switch (cp) {\n\t            case CODE_POINTS.SPACE:\n\t            case CODE_POINTS.LINE_FEED:\n\t            case CODE_POINTS.TABULATION:\n\t            case CODE_POINTS.FORM_FEED: {\n\t                this._leaveAttrValue();\n\t                this.state = State.BEFORE_ATTRIBUTE_NAME;\n\t                break;\n\t            }\n\t            case CODE_POINTS.SOLIDUS: {\n\t                this._leaveAttrValue();\n\t                this.state = State.SELF_CLOSING_START_TAG;\n\t                break;\n\t            }\n\t            case CODE_POINTS.GREATER_THAN_SIGN: {\n\t                this._leaveAttrValue();\n\t                this.state = State.DATA;\n\t                this.emitCurrentTagToken();\n\t                break;\n\t            }\n\t            case CODE_POINTS.EOF: {\n\t                this._err(ERR.eofInTag);\n\t                this._emitEOFToken();\n\t                break;\n\t            }\n\t            default: {\n\t                this._err(ERR.missingWhitespaceBetweenAttributes);\n\t                this.state = State.BEFORE_ATTRIBUTE_NAME;\n\t                this._stateBeforeAttributeName(cp);\n\t            }\n\t        }\n\t    }\n\t    // Self-closing start tag state\n\t    //------------------------------------------------------------------\n\t    _stateSelfClosingStartTag(cp) {\n\t        switch (cp) {\n\t            case CODE_POINTS.GREATER_THAN_SIGN: {\n\t                const token = this.currentToken;\n\t                token.selfClosing = true;\n\t                this.state = State.DATA;\n\t                this.emitCurrentTagToken();\n\t                break;\n\t            }\n\t            case CODE_POINTS.EOF: {\n\t                this._err(ERR.eofInTag);\n\t                this._emitEOFToken();\n\t                break;\n\t            }\n\t            default: {\n\t                this._err(ERR.unexpectedSolidusInTag);\n\t                this.state = State.BEFORE_ATTRIBUTE_NAME;\n\t                this._stateBeforeAttributeName(cp);\n\t            }\n\t        }\n\t    }\n\t    // Bogus comment state\n\t    //------------------------------------------------------------------\n\t    _stateBogusComment(cp) {\n\t        const token = this.currentToken;\n\t        switch (cp) {\n\t            case CODE_POINTS.GREATER_THAN_SIGN: {\n\t                this.state = State.DATA;\n\t                this.emitCurrentComment(token);\n\t                break;\n\t            }\n\t            case CODE_POINTS.EOF: {\n\t                this.emitCurrentComment(token);\n\t                this._emitEOFToken();\n\t                break;\n\t            }\n\t            case CODE_POINTS.NULL: {\n\t                this._err(ERR.unexpectedNullCharacter);\n\t                token.data += REPLACEMENT_CHARACTER;\n\t                break;\n\t            }\n\t            default: {\n\t                token.data += String.fromCodePoint(cp);\n\t            }\n\t        }\n\t    }\n\t    // Markup declaration open state\n\t    //------------------------------------------------------------------\n\t    _stateMarkupDeclarationOpen(cp) {\n\t        if (this._consumeSequenceIfMatch(SEQUENCES.DASH_DASH, true)) {\n\t            this._createCommentToken(SEQUENCES.DASH_DASH.length + 1);\n\t            this.state = State.COMMENT_START;\n\t        }\n\t        else if (this._consumeSequenceIfMatch(SEQUENCES.DOCTYPE, false)) {\n\t            // NOTE: Doctypes tokens are created without fixed offsets. We keep track of the moment a doctype *might* start here.\n\t            this.currentLocation = this.getCurrentLocation(SEQUENCES.DOCTYPE.length + 1);\n\t            this.state = State.DOCTYPE;\n\t        }\n\t        else if (this._consumeSequenceIfMatch(SEQUENCES.CDATA_START, true)) {\n\t            if (this.inForeignNode) {\n\t                this.state = State.CDATA_SECTION;\n\t            }\n\t            else {\n\t                this._err(ERR.cdataInHtmlContent);\n\t                this._createCommentToken(SEQUENCES.CDATA_START.length + 1);\n\t                this.currentToken.data = '[CDATA[';\n\t                this.state = State.BOGUS_COMMENT;\n\t            }\n\t        }\n\t        //NOTE: Sequence lookups can be abrupted by hibernation. In that case, lookup\n\t        //results are no longer valid and we will need to start over.\n\t        else if (!this._ensureHibernation()) {\n\t            this._err(ERR.incorrectlyOpenedComment);\n\t            this._createCommentToken(2);\n\t            this.state = State.BOGUS_COMMENT;\n\t            this._stateBogusComment(cp);\n\t        }\n\t    }\n\t    // Comment start state\n\t    //------------------------------------------------------------------\n\t    _stateCommentStart(cp) {\n\t        switch (cp) {\n\t            case CODE_POINTS.HYPHEN_MINUS: {\n\t                this.state = State.COMMENT_START_DASH;\n\t                break;\n\t            }\n\t            case CODE_POINTS.GREATER_THAN_SIGN: {\n\t                this._err(ERR.abruptClosingOfEmptyComment);\n\t                this.state = State.DATA;\n\t                const token = this.currentToken;\n\t                this.emitCurrentComment(token);\n\t                break;\n\t            }\n\t            default: {\n\t                this.state = State.COMMENT;\n\t                this._stateComment(cp);\n\t            }\n\t        }\n\t    }\n\t    // Comment start dash state\n\t    //------------------------------------------------------------------\n\t    _stateCommentStartDash(cp) {\n\t        const token = this.currentToken;\n\t        switch (cp) {\n\t            case CODE_POINTS.HYPHEN_MINUS: {\n\t                this.state = State.COMMENT_END;\n\t                break;\n\t            }\n\t            case CODE_POINTS.GREATER_THAN_SIGN: {\n\t                this._err(ERR.abruptClosingOfEmptyComment);\n\t                this.state = State.DATA;\n\t                this.emitCurrentComment(token);\n\t                break;\n\t            }\n\t            case CODE_POINTS.EOF: {\n\t                this._err(ERR.eofInComment);\n\t                this.emitCurrentComment(token);\n\t                this._emitEOFToken();\n\t                break;\n\t            }\n\t            default: {\n\t                token.data += '-';\n\t                this.state = State.COMMENT;\n\t                this._stateComment(cp);\n\t            }\n\t        }\n\t    }\n\t    // Comment state\n\t    //------------------------------------------------------------------\n\t    _stateComment(cp) {\n\t        const token = this.currentToken;\n\t        switch (cp) {\n\t            case CODE_POINTS.HYPHEN_MINUS: {\n\t                this.state = State.COMMENT_END_DASH;\n\t                break;\n\t            }\n\t            case CODE_POINTS.LESS_THAN_SIGN: {\n\t                token.data += '<';\n\t                this.state = State.COMMENT_LESS_THAN_SIGN;\n\t                break;\n\t            }\n\t            case CODE_POINTS.NULL: {\n\t                this._err(ERR.unexpectedNullCharacter);\n\t                token.data += REPLACEMENT_CHARACTER;\n\t                break;\n\t            }\n\t            case CODE_POINTS.EOF: {\n\t                this._err(ERR.eofInComment);\n\t                this.emitCurrentComment(token);\n\t                this._emitEOFToken();\n\t                break;\n\t            }\n\t            default: {\n\t                token.data += String.fromCodePoint(cp);\n\t            }\n\t        }\n\t    }\n\t    // Comment less-than sign state\n\t    //------------------------------------------------------------------\n\t    _stateCommentLessThanSign(cp) {\n\t        const token = this.currentToken;\n\t        switch (cp) {\n\t            case CODE_POINTS.EXCLAMATION_MARK: {\n\t                token.data += '!';\n\t                this.state = State.COMMENT_LESS_THAN_SIGN_BANG;\n\t                break;\n\t            }\n\t            case CODE_POINTS.LESS_THAN_SIGN: {\n\t                token.data += '<';\n\t                break;\n\t            }\n\t            default: {\n\t                this.state = State.COMMENT;\n\t                this._stateComment(cp);\n\t            }\n\t        }\n\t    }\n\t    // Comment less-than sign bang state\n\t    //------------------------------------------------------------------\n\t    _stateCommentLessThanSignBang(cp) {\n\t        if (cp === CODE_POINTS.HYPHEN_MINUS) {\n\t            this.state = State.COMMENT_LESS_THAN_SIGN_BANG_DASH;\n\t        }\n\t        else {\n\t            this.state = State.COMMENT;\n\t            this._stateComment(cp);\n\t        }\n\t    }\n\t    // Comment less-than sign bang dash state\n\t    //------------------------------------------------------------------\n\t    _stateCommentLessThanSignBangDash(cp) {\n\t        if (cp === CODE_POINTS.HYPHEN_MINUS) {\n\t            this.state = State.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH;\n\t        }\n\t        else {\n\t            this.state = State.COMMENT_END_DASH;\n\t            this._stateCommentEndDash(cp);\n\t        }\n\t    }\n\t    // Comment less-than sign bang dash dash state\n\t    //------------------------------------------------------------------\n\t    _stateCommentLessThanSignBangDashDash(cp) {\n\t        if (cp !== CODE_POINTS.GREATER_THAN_SIGN && cp !== CODE_POINTS.EOF) {\n\t            this._err(ERR.nestedComment);\n\t        }\n\t        this.state = State.COMMENT_END;\n\t        this._stateCommentEnd(cp);\n\t    }\n\t    // Comment end dash state\n\t    //------------------------------------------------------------------\n\t    _stateCommentEndDash(cp) {\n\t        const token = this.currentToken;\n\t        switch (cp) {\n\t            case CODE_POINTS.HYPHEN_MINUS: {\n\t                this.state = State.COMMENT_END;\n\t                break;\n\t            }\n\t            case CODE_POINTS.EOF: {\n\t                this._err(ERR.eofInComment);\n\t                this.emitCurrentComment(token);\n\t                this._emitEOFToken();\n\t                break;\n\t            }\n\t            default: {\n\t                token.data += '-';\n\t                this.state = State.COMMENT;\n\t                this._stateComment(cp);\n\t            }\n\t        }\n\t    }\n\t    // Comment end state\n\t    //------------------------------------------------------------------\n\t    _stateCommentEnd(cp) {\n\t        const token = this.currentToken;\n\t        switch (cp) {\n\t            case CODE_POINTS.GREATER_THAN_SIGN: {\n\t                this.state = State.DATA;\n\t                this.emitCurrentComment(token);\n\t                break;\n\t            }\n\t            case CODE_POINTS.EXCLAMATION_MARK: {\n\t                this.state = State.COMMENT_END_BANG;\n\t                break;\n\t            }\n\t            case CODE_POINTS.HYPHEN_MINUS: {\n\t                token.data += '-';\n\t                break;\n\t            }\n\t            case CODE_POINTS.EOF: {\n\t                this._err(ERR.eofInComment);\n\t                this.emitCurrentComment(token);\n\t                this._emitEOFToken();\n\t                break;\n\t            }\n\t            default: {\n\t                token.data += '--';\n\t                this.state = State.COMMENT;\n\t                this._stateComment(cp);\n\t            }\n\t        }\n\t    }\n\t    // Comment end bang state\n\t    //------------------------------------------------------------------\n\t    _stateCommentEndBang(cp) {\n\t        const token = this.currentToken;\n\t        switch (cp) {\n\t            case CODE_POINTS.HYPHEN_MINUS: {\n\t                token.data += '--!';\n\t                this.state = State.COMMENT_END_DASH;\n\t                break;\n\t            }\n\t            case CODE_POINTS.GREATER_THAN_SIGN: {\n\t                this._err(ERR.incorrectlyClosedComment);\n\t                this.state = State.DATA;\n\t                this.emitCurrentComment(token);\n\t                break;\n\t            }\n\t            case CODE_POINTS.EOF: {\n\t                this._err(ERR.eofInComment);\n\t                this.emitCurrentComment(token);\n\t                this._emitEOFToken();\n\t                break;\n\t            }\n\t            default: {\n\t                token.data += '--!';\n\t                this.state = State.COMMENT;\n\t                this._stateComment(cp);\n\t            }\n\t        }\n\t    }\n\t    // DOCTYPE state\n\t    //------------------------------------------------------------------\n\t    _stateDoctype(cp) {\n\t        switch (cp) {\n\t            case CODE_POINTS.SPACE:\n\t            case CODE_POINTS.LINE_FEED:\n\t            case CODE_POINTS.TABULATION:\n\t            case CODE_POINTS.FORM_FEED: {\n\t                this.state = State.BEFORE_DOCTYPE_NAME;\n\t                break;\n\t            }\n\t            case CODE_POINTS.GREATER_THAN_SIGN: {\n\t                this.state = State.BEFORE_DOCTYPE_NAME;\n\t                this._stateBeforeDoctypeName(cp);\n\t                break;\n\t            }\n\t            case CODE_POINTS.EOF: {\n\t                this._err(ERR.eofInDoctype);\n\t                this._createDoctypeToken(null);\n\t                const token = this.currentToken;\n\t                token.forceQuirks = true;\n\t                this.emitCurrentDoctype(token);\n\t                this._emitEOFToken();\n\t                break;\n\t            }\n\t            default: {\n\t                this._err(ERR.missingWhitespaceBeforeDoctypeName);\n\t                this.state = State.BEFORE_DOCTYPE_NAME;\n\t                this._stateBeforeDoctypeName(cp);\n\t            }\n\t        }\n\t    }\n\t    // Before DOCTYPE name state\n\t    //------------------------------------------------------------------\n\t    _stateBeforeDoctypeName(cp) {\n\t        if (isAsciiUpper(cp)) {\n\t            this._createDoctypeToken(String.fromCharCode(toAsciiLower(cp)));\n\t            this.state = State.DOCTYPE_NAME;\n\t        }\n\t        else\n\t            switch (cp) {\n\t                case CODE_POINTS.SPACE:\n\t                case CODE_POINTS.LINE_FEED:\n\t                case CODE_POINTS.TABULATION:\n\t                case CODE_POINTS.FORM_FEED: {\n\t                    // Ignore whitespace\n\t                    break;\n\t                }\n\t                case CODE_POINTS.NULL: {\n\t                    this._err(ERR.unexpectedNullCharacter);\n\t                    this._createDoctypeToken(REPLACEMENT_CHARACTER);\n\t                    this.state = State.DOCTYPE_NAME;\n\t                    break;\n\t                }\n\t                case CODE_POINTS.GREATER_THAN_SIGN: {\n\t                    this._err(ERR.missingDoctypeName);\n\t                    this._createDoctypeToken(null);\n\t                    const token = this.currentToken;\n\t                    token.forceQuirks = true;\n\t                    this.emitCurrentDoctype(token);\n\t                    this.state = State.DATA;\n\t                    break;\n\t                }\n\t                case CODE_POINTS.EOF: {\n\t                    this._err(ERR.eofInDoctype);\n\t                    this._createDoctypeToken(null);\n\t                    const token = this.currentToken;\n\t                    token.forceQuirks = true;\n\t                    this.emitCurrentDoctype(token);\n\t                    this._emitEOFToken();\n\t                    break;\n\t                }\n\t                default: {\n\t                    this._createDoctypeToken(String.fromCodePoint(cp));\n\t                    this.state = State.DOCTYPE_NAME;\n\t                }\n\t            }\n\t    }\n\t    // DOCTYPE name state\n\t    //------------------------------------------------------------------\n\t    _stateDoctypeName(cp) {\n\t        const token = this.currentToken;\n\t        switch (cp) {\n\t            case CODE_POINTS.SPACE:\n\t            case CODE_POINTS.LINE_FEED:\n\t            case CODE_POINTS.TABULATION:\n\t            case CODE_POINTS.FORM_FEED: {\n\t                this.state = State.AFTER_DOCTYPE_NAME;\n\t                break;\n\t            }\n\t            case CODE_POINTS.GREATER_THAN_SIGN: {\n\t                this.state = State.DATA;\n\t                this.emitCurrentDoctype(token);\n\t                break;\n\t            }\n\t            case CODE_POINTS.NULL: {\n\t                this._err(ERR.unexpectedNullCharacter);\n\t                token.name += REPLACEMENT_CHARACTER;\n\t                break;\n\t            }\n\t            case CODE_POINTS.EOF: {\n\t                this._err(ERR.eofInDoctype);\n\t                token.forceQuirks = true;\n\t                this.emitCurrentDoctype(token);\n\t                this._emitEOFToken();\n\t                break;\n\t            }\n\t            default: {\n\t                token.name += String.fromCodePoint(isAsciiUpper(cp) ? toAsciiLower(cp) : cp);\n\t            }\n\t        }\n\t    }\n\t    // After DOCTYPE name state\n\t    //------------------------------------------------------------------\n\t    _stateAfterDoctypeName(cp) {\n\t        const token = this.currentToken;\n\t        switch (cp) {\n\t            case CODE_POINTS.SPACE:\n\t            case CODE_POINTS.LINE_FEED:\n\t            case CODE_POINTS.TABULATION:\n\t            case CODE_POINTS.FORM_FEED: {\n\t                // Ignore whitespace\n\t                break;\n\t            }\n\t            case CODE_POINTS.GREATER_THAN_SIGN: {\n\t                this.state = State.DATA;\n\t                this.emitCurrentDoctype(token);\n\t                break;\n\t            }\n\t            case CODE_POINTS.EOF: {\n\t                this._err(ERR.eofInDoctype);\n\t                token.forceQuirks = true;\n\t                this.emitCurrentDoctype(token);\n\t                this._emitEOFToken();\n\t                break;\n\t            }\n\t            default:\n\t                if (this._consumeSequenceIfMatch(SEQUENCES.PUBLIC, false)) {\n\t                    this.state = State.AFTER_DOCTYPE_PUBLIC_KEYWORD;\n\t                }\n\t                else if (this._consumeSequenceIfMatch(SEQUENCES.SYSTEM, false)) {\n\t                    this.state = State.AFTER_DOCTYPE_SYSTEM_KEYWORD;\n\t                }\n\t                //NOTE: sequence lookup can be abrupted by hibernation. In that case lookup\n\t                //results are no longer valid and we will need to start over.\n\t                else if (!this._ensureHibernation()) {\n\t                    this._err(ERR.invalidCharacterSequenceAfterDoctypeName);\n\t                    token.forceQuirks = true;\n\t                    this.state = State.BOGUS_DOCTYPE;\n\t                    this._stateBogusDoctype(cp);\n\t                }\n\t        }\n\t    }\n\t    // After DOCTYPE public keyword state\n\t    //------------------------------------------------------------------\n\t    _stateAfterDoctypePublicKeyword(cp) {\n\t        const token = this.currentToken;\n\t        switch (cp) {\n\t            case CODE_POINTS.SPACE:\n\t            case CODE_POINTS.LINE_FEED:\n\t            case CODE_POINTS.TABULATION:\n\t            case CODE_POINTS.FORM_FEED: {\n\t                this.state = State.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;\n\t                break;\n\t            }\n\t            case CODE_POINTS.QUOTATION_MARK: {\n\t                this._err(ERR.missingWhitespaceAfterDoctypePublicKeyword);\n\t                token.publicId = '';\n\t                this.state = State.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;\n\t                break;\n\t            }\n\t            case CODE_POINTS.APOSTROPHE: {\n\t                this._err(ERR.missingWhitespaceAfterDoctypePublicKeyword);\n\t                token.publicId = '';\n\t                this.state = State.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;\n\t                break;\n\t            }\n\t            case CODE_POINTS.GREATER_THAN_SIGN: {\n\t                this._err(ERR.missingDoctypePublicIdentifier);\n\t                token.forceQuirks = true;\n\t                this.state = State.DATA;\n\t                this.emitCurrentDoctype(token);\n\t                break;\n\t            }\n\t            case CODE_POINTS.EOF: {\n\t                this._err(ERR.eofInDoctype);\n\t                token.forceQuirks = true;\n\t                this.emitCurrentDoctype(token);\n\t                this._emitEOFToken();\n\t                break;\n\t            }\n\t            default: {\n\t                this._err(ERR.missingQuoteBeforeDoctypePublicIdentifier);\n\t                token.forceQuirks = true;\n\t                this.state = State.BOGUS_DOCTYPE;\n\t                this._stateBogusDoctype(cp);\n\t            }\n\t        }\n\t    }\n\t    // Before DOCTYPE public identifier state\n\t    //------------------------------------------------------------------\n\t    _stateBeforeDoctypePublicIdentifier(cp) {\n\t        const token = this.currentToken;\n\t        switch (cp) {\n\t            case CODE_POINTS.SPACE:\n\t            case CODE_POINTS.LINE_FEED:\n\t            case CODE_POINTS.TABULATION:\n\t            case CODE_POINTS.FORM_FEED: {\n\t                // Ignore whitespace\n\t                break;\n\t            }\n\t            case CODE_POINTS.QUOTATION_MARK: {\n\t                token.publicId = '';\n\t                this.state = State.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;\n\t                break;\n\t            }\n\t            case CODE_POINTS.APOSTROPHE: {\n\t                token.publicId = '';\n\t                this.state = State.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;\n\t                break;\n\t            }\n\t            case CODE_POINTS.GREATER_THAN_SIGN: {\n\t                this._err(ERR.missingDoctypePublicIdentifier);\n\t                token.forceQuirks = true;\n\t                this.state = State.DATA;\n\t                this.emitCurrentDoctype(token);\n\t                break;\n\t            }\n\t            case CODE_POINTS.EOF: {\n\t                this._err(ERR.eofInDoctype);\n\t                token.forceQuirks = true;\n\t                this.emitCurrentDoctype(token);\n\t                this._emitEOFToken();\n\t                break;\n\t            }\n\t            default: {\n\t                this._err(ERR.missingQuoteBeforeDoctypePublicIdentifier);\n\t                token.forceQuirks = true;\n\t                this.state = State.BOGUS_DOCTYPE;\n\t                this._stateBogusDoctype(cp);\n\t            }\n\t        }\n\t    }\n\t    // DOCTYPE public identifier (double-quoted) state\n\t    //------------------------------------------------------------------\n\t    _stateDoctypePublicIdentifierDoubleQuoted(cp) {\n\t        const token = this.currentToken;\n\t        switch (cp) {\n\t            case CODE_POINTS.QUOTATION_MARK: {\n\t                this.state = State.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;\n\t                break;\n\t            }\n\t            case CODE_POINTS.NULL: {\n\t                this._err(ERR.unexpectedNullCharacter);\n\t                token.publicId += REPLACEMENT_CHARACTER;\n\t                break;\n\t            }\n\t            case CODE_POINTS.GREATER_THAN_SIGN: {\n\t                this._err(ERR.abruptDoctypePublicIdentifier);\n\t                token.forceQuirks = true;\n\t                this.emitCurrentDoctype(token);\n\t                this.state = State.DATA;\n\t                break;\n\t            }\n\t            case CODE_POINTS.EOF: {\n\t                this._err(ERR.eofInDoctype);\n\t                token.forceQuirks = true;\n\t                this.emitCurrentDoctype(token);\n\t                this._emitEOFToken();\n\t                break;\n\t            }\n\t            default: {\n\t                token.publicId += String.fromCodePoint(cp);\n\t            }\n\t        }\n\t    }\n\t    // DOCTYPE public identifier (single-quoted) state\n\t    //------------------------------------------------------------------\n\t    _stateDoctypePublicIdentifierSingleQuoted(cp) {\n\t        const token = this.currentToken;\n\t        switch (cp) {\n\t            case CODE_POINTS.APOSTROPHE: {\n\t                this.state = State.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;\n\t                break;\n\t            }\n\t            case CODE_POINTS.NULL: {\n\t                this._err(ERR.unexpectedNullCharacter);\n\t                token.publicId += REPLACEMENT_CHARACTER;\n\t                break;\n\t            }\n\t            case CODE_POINTS.GREATER_THAN_SIGN: {\n\t                this._err(ERR.abruptDoctypePublicIdentifier);\n\t                token.forceQuirks = true;\n\t                this.emitCurrentDoctype(token);\n\t                this.state = State.DATA;\n\t                break;\n\t            }\n\t            case CODE_POINTS.EOF: {\n\t                this._err(ERR.eofInDoctype);\n\t                token.forceQuirks = true;\n\t                this.emitCurrentDoctype(token);\n\t                this._emitEOFToken();\n\t                break;\n\t            }\n\t            default: {\n\t                token.publicId += String.fromCodePoint(cp);\n\t            }\n\t        }\n\t    }\n\t    // After DOCTYPE public identifier state\n\t    //------------------------------------------------------------------\n\t    _stateAfterDoctypePublicIdentifier(cp) {\n\t        const token = this.currentToken;\n\t        switch (cp) {\n\t            case CODE_POINTS.SPACE:\n\t            case CODE_POINTS.LINE_FEED:\n\t            case CODE_POINTS.TABULATION:\n\t            case CODE_POINTS.FORM_FEED: {\n\t                this.state = State.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;\n\t                break;\n\t            }\n\t            case CODE_POINTS.GREATER_THAN_SIGN: {\n\t                this.state = State.DATA;\n\t                this.emitCurrentDoctype(token);\n\t                break;\n\t            }\n\t            case CODE_POINTS.QUOTATION_MARK: {\n\t                this._err(ERR.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers);\n\t                token.systemId = '';\n\t                this.state = State.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;\n\t                break;\n\t            }\n\t            case CODE_POINTS.APOSTROPHE: {\n\t                this._err(ERR.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers);\n\t                token.systemId = '';\n\t                this.state = State.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;\n\t                break;\n\t            }\n\t            case CODE_POINTS.EOF: {\n\t                this._err(ERR.eofInDoctype);\n\t                token.forceQuirks = true;\n\t                this.emitCurrentDoctype(token);\n\t                this._emitEOFToken();\n\t                break;\n\t            }\n\t            default: {\n\t                this._err(ERR.missingQuoteBeforeDoctypeSystemIdentifier);\n\t                token.forceQuirks = true;\n\t                this.state = State.BOGUS_DOCTYPE;\n\t                this._stateBogusDoctype(cp);\n\t            }\n\t        }\n\t    }\n\t    // Between DOCTYPE public and system identifiers state\n\t    //------------------------------------------------------------------\n\t    _stateBetweenDoctypePublicAndSystemIdentifiers(cp) {\n\t        const token = this.currentToken;\n\t        switch (cp) {\n\t            case CODE_POINTS.SPACE:\n\t            case CODE_POINTS.LINE_FEED:\n\t            case CODE_POINTS.TABULATION:\n\t            case CODE_POINTS.FORM_FEED: {\n\t                // Ignore whitespace\n\t                break;\n\t            }\n\t            case CODE_POINTS.GREATER_THAN_SIGN: {\n\t                this.emitCurrentDoctype(token);\n\t                this.state = State.DATA;\n\t                break;\n\t            }\n\t            case CODE_POINTS.QUOTATION_MARK: {\n\t                token.systemId = '';\n\t                this.state = State.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;\n\t                break;\n\t            }\n\t            case CODE_POINTS.APOSTROPHE: {\n\t                token.systemId = '';\n\t                this.state = State.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;\n\t                break;\n\t            }\n\t            case CODE_POINTS.EOF: {\n\t                this._err(ERR.eofInDoctype);\n\t                token.forceQuirks = true;\n\t                this.emitCurrentDoctype(token);\n\t                this._emitEOFToken();\n\t                break;\n\t            }\n\t            default: {\n\t                this._err(ERR.missingQuoteBeforeDoctypeSystemIdentifier);\n\t                token.forceQuirks = true;\n\t                this.state = State.BOGUS_DOCTYPE;\n\t                this._stateBogusDoctype(cp);\n\t            }\n\t        }\n\t    }\n\t    // After DOCTYPE system keyword state\n\t    //------------------------------------------------------------------\n\t    _stateAfterDoctypeSystemKeyword(cp) {\n\t        const token = this.currentToken;\n\t        switch (cp) {\n\t            case CODE_POINTS.SPACE:\n\t            case CODE_POINTS.LINE_FEED:\n\t            case CODE_POINTS.TABULATION:\n\t            case CODE_POINTS.FORM_FEED: {\n\t                this.state = State.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;\n\t                break;\n\t            }\n\t            case CODE_POINTS.QUOTATION_MARK: {\n\t                this._err(ERR.missingWhitespaceAfterDoctypeSystemKeyword);\n\t                token.systemId = '';\n\t                this.state = State.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;\n\t                break;\n\t            }\n\t            case CODE_POINTS.APOSTROPHE: {\n\t                this._err(ERR.missingWhitespaceAfterDoctypeSystemKeyword);\n\t                token.systemId = '';\n\t                this.state = State.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;\n\t                break;\n\t            }\n\t            case CODE_POINTS.GREATER_THAN_SIGN: {\n\t                this._err(ERR.missingDoctypeSystemIdentifier);\n\t                token.forceQuirks = true;\n\t                this.state = State.DATA;\n\t                this.emitCurrentDoctype(token);\n\t                break;\n\t            }\n\t            case CODE_POINTS.EOF: {\n\t                this._err(ERR.eofInDoctype);\n\t                token.forceQuirks = true;\n\t                this.emitCurrentDoctype(token);\n\t                this._emitEOFToken();\n\t                break;\n\t            }\n\t            default: {\n\t                this._err(ERR.missingQuoteBeforeDoctypeSystemIdentifier);\n\t                token.forceQuirks = true;\n\t                this.state = State.BOGUS_DOCTYPE;\n\t                this._stateBogusDoctype(cp);\n\t            }\n\t        }\n\t    }\n\t    // Before DOCTYPE system identifier state\n\t    //------------------------------------------------------------------\n\t    _stateBeforeDoctypeSystemIdentifier(cp) {\n\t        const token = this.currentToken;\n\t        switch (cp) {\n\t            case CODE_POINTS.SPACE:\n\t            case CODE_POINTS.LINE_FEED:\n\t            case CODE_POINTS.TABULATION:\n\t            case CODE_POINTS.FORM_FEED: {\n\t                // Ignore whitespace\n\t                break;\n\t            }\n\t            case CODE_POINTS.QUOTATION_MARK: {\n\t                token.systemId = '';\n\t                this.state = State.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;\n\t                break;\n\t            }\n\t            case CODE_POINTS.APOSTROPHE: {\n\t                token.systemId = '';\n\t                this.state = State.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;\n\t                break;\n\t            }\n\t            case CODE_POINTS.GREATER_THAN_SIGN: {\n\t                this._err(ERR.missingDoctypeSystemIdentifier);\n\t                token.forceQuirks = true;\n\t                this.state = State.DATA;\n\t                this.emitCurrentDoctype(token);\n\t                break;\n\t            }\n\t            case CODE_POINTS.EOF: {\n\t                this._err(ERR.eofInDoctype);\n\t                token.forceQuirks = true;\n\t                this.emitCurrentDoctype(token);\n\t                this._emitEOFToken();\n\t                break;\n\t            }\n\t            default: {\n\t                this._err(ERR.missingQuoteBeforeDoctypeSystemIdentifier);\n\t                token.forceQuirks = true;\n\t                this.state = State.BOGUS_DOCTYPE;\n\t                this._stateBogusDoctype(cp);\n\t            }\n\t        }\n\t    }\n\t    // DOCTYPE system identifier (double-quoted) state\n\t    //------------------------------------------------------------------\n\t    _stateDoctypeSystemIdentifierDoubleQuoted(cp) {\n\t        const token = this.currentToken;\n\t        switch (cp) {\n\t            case CODE_POINTS.QUOTATION_MARK: {\n\t                this.state = State.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;\n\t                break;\n\t            }\n\t            case CODE_POINTS.NULL: {\n\t                this._err(ERR.unexpectedNullCharacter);\n\t                token.systemId += REPLACEMENT_CHARACTER;\n\t                break;\n\t            }\n\t            case CODE_POINTS.GREATER_THAN_SIGN: {\n\t                this._err(ERR.abruptDoctypeSystemIdentifier);\n\t                token.forceQuirks = true;\n\t                this.emitCurrentDoctype(token);\n\t                this.state = State.DATA;\n\t                break;\n\t            }\n\t            case CODE_POINTS.EOF: {\n\t                this._err(ERR.eofInDoctype);\n\t                token.forceQuirks = true;\n\t                this.emitCurrentDoctype(token);\n\t                this._emitEOFToken();\n\t                break;\n\t            }\n\t            default: {\n\t                token.systemId += String.fromCodePoint(cp);\n\t            }\n\t        }\n\t    }\n\t    // DOCTYPE system identifier (single-quoted) state\n\t    //------------------------------------------------------------------\n\t    _stateDoctypeSystemIdentifierSingleQuoted(cp) {\n\t        const token = this.currentToken;\n\t        switch (cp) {\n\t            case CODE_POINTS.APOSTROPHE: {\n\t                this.state = State.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;\n\t                break;\n\t            }\n\t            case CODE_POINTS.NULL: {\n\t                this._err(ERR.unexpectedNullCharacter);\n\t                token.systemId += REPLACEMENT_CHARACTER;\n\t                break;\n\t            }\n\t            case CODE_POINTS.GREATER_THAN_SIGN: {\n\t                this._err(ERR.abruptDoctypeSystemIdentifier);\n\t                token.forceQuirks = true;\n\t                this.emitCurrentDoctype(token);\n\t                this.state = State.DATA;\n\t                break;\n\t            }\n\t            case CODE_POINTS.EOF: {\n\t                this._err(ERR.eofInDoctype);\n\t                token.forceQuirks = true;\n\t                this.emitCurrentDoctype(token);\n\t                this._emitEOFToken();\n\t                break;\n\t            }\n\t            default: {\n\t                token.systemId += String.fromCodePoint(cp);\n\t            }\n\t        }\n\t    }\n\t    // After DOCTYPE system identifier state\n\t    //------------------------------------------------------------------\n\t    _stateAfterDoctypeSystemIdentifier(cp) {\n\t        const token = this.currentToken;\n\t        switch (cp) {\n\t            case CODE_POINTS.SPACE:\n\t            case CODE_POINTS.LINE_FEED:\n\t            case CODE_POINTS.TABULATION:\n\t            case CODE_POINTS.FORM_FEED: {\n\t                // Ignore whitespace\n\t                break;\n\t            }\n\t            case CODE_POINTS.GREATER_THAN_SIGN: {\n\t                this.emitCurrentDoctype(token);\n\t                this.state = State.DATA;\n\t                break;\n\t            }\n\t            case CODE_POINTS.EOF: {\n\t                this._err(ERR.eofInDoctype);\n\t                token.forceQuirks = true;\n\t                this.emitCurrentDoctype(token);\n\t                this._emitEOFToken();\n\t                break;\n\t            }\n\t            default: {\n\t                this._err(ERR.unexpectedCharacterAfterDoctypeSystemIdentifier);\n\t                this.state = State.BOGUS_DOCTYPE;\n\t                this._stateBogusDoctype(cp);\n\t            }\n\t        }\n\t    }\n\t    // Bogus DOCTYPE state\n\t    //------------------------------------------------------------------\n\t    _stateBogusDoctype(cp) {\n\t        const token = this.currentToken;\n\t        switch (cp) {\n\t            case CODE_POINTS.GREATER_THAN_SIGN: {\n\t                this.emitCurrentDoctype(token);\n\t                this.state = State.DATA;\n\t                break;\n\t            }\n\t            case CODE_POINTS.NULL: {\n\t                this._err(ERR.unexpectedNullCharacter);\n\t                break;\n\t            }\n\t            case CODE_POINTS.EOF: {\n\t                this.emitCurrentDoctype(token);\n\t                this._emitEOFToken();\n\t                break;\n\t            }\n\t            // Do nothing\n\t        }\n\t    }\n\t    // CDATA section state\n\t    //------------------------------------------------------------------\n\t    _stateCdataSection(cp) {\n\t        switch (cp) {\n\t            case CODE_POINTS.RIGHT_SQUARE_BRACKET: {\n\t                this.state = State.CDATA_SECTION_BRACKET;\n\t                break;\n\t            }\n\t            case CODE_POINTS.EOF: {\n\t                this._err(ERR.eofInCdata);\n\t                this._emitEOFToken();\n\t                break;\n\t            }\n\t            default: {\n\t                this._emitCodePoint(cp);\n\t            }\n\t        }\n\t    }\n\t    // CDATA section bracket state\n\t    //------------------------------------------------------------------\n\t    _stateCdataSectionBracket(cp) {\n\t        if (cp === CODE_POINTS.RIGHT_SQUARE_BRACKET) {\n\t            this.state = State.CDATA_SECTION_END;\n\t        }\n\t        else {\n\t            this._emitChars(']');\n\t            this.state = State.CDATA_SECTION;\n\t            this._stateCdataSection(cp);\n\t        }\n\t    }\n\t    // CDATA section end state\n\t    //------------------------------------------------------------------\n\t    _stateCdataSectionEnd(cp) {\n\t        switch (cp) {\n\t            case CODE_POINTS.GREATER_THAN_SIGN: {\n\t                this.state = State.DATA;\n\t                break;\n\t            }\n\t            case CODE_POINTS.RIGHT_SQUARE_BRACKET: {\n\t                this._emitChars(']');\n\t                break;\n\t            }\n\t            default: {\n\t                this._emitChars(']]');\n\t                this.state = State.CDATA_SECTION;\n\t                this._stateCdataSection(cp);\n\t            }\n\t        }\n\t    }\n\t    // Character reference state\n\t    //------------------------------------------------------------------\n\t    _stateCharacterReference(cp) {\n\t        if (cp === CODE_POINTS.NUMBER_SIGN) {\n\t            this.state = State.NUMERIC_CHARACTER_REFERENCE;\n\t        }\n\t        else if (isAsciiAlphaNumeric(cp)) {\n\t            this.state = State.NAMED_CHARACTER_REFERENCE;\n\t            this._stateNamedCharacterReference(cp);\n\t        }\n\t        else {\n\t            this._flushCodePointConsumedAsCharacterReference(CODE_POINTS.AMPERSAND);\n\t            this._reconsumeInState(this.returnState);\n\t        }\n\t    }\n\t    // Named character reference state\n\t    //------------------------------------------------------------------\n\t    _stateNamedCharacterReference(cp) {\n\t        const matchResult = this._matchNamedCharacterReference(cp);\n\t        //NOTE: Matching can be abrupted by hibernation. In that case, match\n\t        //results are no longer valid and we will need to start over.\n\t        if (this._ensureHibernation()) ;\n\t        else if (matchResult) {\n\t            for (let i = 0; i < matchResult.length; i++) {\n\t                this._flushCodePointConsumedAsCharacterReference(matchResult[i]);\n\t            }\n\t            this.state = this.returnState;\n\t        }\n\t        else {\n\t            this._flushCodePointConsumedAsCharacterReference(CODE_POINTS.AMPERSAND);\n\t            this.state = State.AMBIGUOUS_AMPERSAND;\n\t        }\n\t    }\n\t    // Ambiguos ampersand state\n\t    //------------------------------------------------------------------\n\t    _stateAmbiguousAmpersand(cp) {\n\t        if (isAsciiAlphaNumeric(cp)) {\n\t            this._flushCodePointConsumedAsCharacterReference(cp);\n\t        }\n\t        else {\n\t            if (cp === CODE_POINTS.SEMICOLON) {\n\t                this._err(ERR.unknownNamedCharacterReference);\n\t            }\n\t            this._reconsumeInState(this.returnState);\n\t        }\n\t    }\n\t    // Numeric character reference state\n\t    //------------------------------------------------------------------\n\t    _stateNumericCharacterReference(cp) {\n\t        this.charRefCode = 0;\n\t        if (cp === CODE_POINTS.LATIN_SMALL_X || cp === CODE_POINTS.LATIN_CAPITAL_X) {\n\t            this.state = State.HEXADEMICAL_CHARACTER_REFERENCE_START;\n\t        }\n\t        else {\n\t            this.state = State.DECIMAL_CHARACTER_REFERENCE_START;\n\t            this._stateDecimalCharacterReferenceStart(cp);\n\t        }\n\t    }\n\t    // Hexademical character reference start state\n\t    //------------------------------------------------------------------\n\t    _stateHexademicalCharacterReferenceStart(cp) {\n\t        if (isAsciiHexDigit(cp)) {\n\t            this.state = State.HEXADEMICAL_CHARACTER_REFERENCE;\n\t            this._stateHexademicalCharacterReference(cp);\n\t        }\n\t        else {\n\t            this._err(ERR.absenceOfDigitsInNumericCharacterReference);\n\t            this._flushCodePointConsumedAsCharacterReference(CODE_POINTS.AMPERSAND);\n\t            this._flushCodePointConsumedAsCharacterReference(CODE_POINTS.NUMBER_SIGN);\n\t            this._unconsume(2);\n\t            this.state = this.returnState;\n\t        }\n\t    }\n\t    // Decimal character reference start state\n\t    //------------------------------------------------------------------\n\t    _stateDecimalCharacterReferenceStart(cp) {\n\t        if (isAsciiDigit(cp)) {\n\t            this.state = State.DECIMAL_CHARACTER_REFERENCE;\n\t            this._stateDecimalCharacterReference(cp);\n\t        }\n\t        else {\n\t            this._err(ERR.absenceOfDigitsInNumericCharacterReference);\n\t            this._flushCodePointConsumedAsCharacterReference(CODE_POINTS.AMPERSAND);\n\t            this._flushCodePointConsumedAsCharacterReference(CODE_POINTS.NUMBER_SIGN);\n\t            this._reconsumeInState(this.returnState);\n\t        }\n\t    }\n\t    // Hexademical character reference state\n\t    //------------------------------------------------------------------\n\t    _stateHexademicalCharacterReference(cp) {\n\t        if (isAsciiUpperHexDigit(cp)) {\n\t            this.charRefCode = this.charRefCode * 16 + cp - 0x37;\n\t        }\n\t        else if (isAsciiLowerHexDigit(cp)) {\n\t            this.charRefCode = this.charRefCode * 16 + cp - 0x57;\n\t        }\n\t        else if (isAsciiDigit(cp)) {\n\t            this.charRefCode = this.charRefCode * 16 + cp - 0x30;\n\t        }\n\t        else if (cp === CODE_POINTS.SEMICOLON) {\n\t            this.state = State.NUMERIC_CHARACTER_REFERENCE_END;\n\t        }\n\t        else {\n\t            this._err(ERR.missingSemicolonAfterCharacterReference);\n\t            this.state = State.NUMERIC_CHARACTER_REFERENCE_END;\n\t            this._stateNumericCharacterReferenceEnd();\n\t        }\n\t    }\n\t    // Decimal character reference state\n\t    //------------------------------------------------------------------\n\t    _stateDecimalCharacterReference(cp) {\n\t        if (isAsciiDigit(cp)) {\n\t            this.charRefCode = this.charRefCode * 10 + cp - 0x30;\n\t        }\n\t        else if (cp === CODE_POINTS.SEMICOLON) {\n\t            this.state = State.NUMERIC_CHARACTER_REFERENCE_END;\n\t        }\n\t        else {\n\t            this._err(ERR.missingSemicolonAfterCharacterReference);\n\t            this.state = State.NUMERIC_CHARACTER_REFERENCE_END;\n\t            this._stateNumericCharacterReferenceEnd();\n\t        }\n\t    }\n\t    // Numeric character reference end state\n\t    //------------------------------------------------------------------\n\t    _stateNumericCharacterReferenceEnd() {\n\t        if (this.charRefCode === CODE_POINTS.NULL) {\n\t            this._err(ERR.nullCharacterReference);\n\t            this.charRefCode = CODE_POINTS.REPLACEMENT_CHARACTER;\n\t        }\n\t        else if (this.charRefCode > 1114111) {\n\t            this._err(ERR.characterReferenceOutsideUnicodeRange);\n\t            this.charRefCode = CODE_POINTS.REPLACEMENT_CHARACTER;\n\t        }\n\t        else if (isSurrogate(this.charRefCode)) {\n\t            this._err(ERR.surrogateCharacterReference);\n\t            this.charRefCode = CODE_POINTS.REPLACEMENT_CHARACTER;\n\t        }\n\t        else if (isUndefinedCodePoint(this.charRefCode)) {\n\t            this._err(ERR.noncharacterCharacterReference);\n\t        }\n\t        else if (isControlCodePoint(this.charRefCode) || this.charRefCode === CODE_POINTS.CARRIAGE_RETURN) {\n\t            this._err(ERR.controlCharacterReference);\n\t            const replacement = C1_CONTROLS_REFERENCE_REPLACEMENTS.get(this.charRefCode);\n\t            if (replacement !== undefined) {\n\t                this.charRefCode = replacement;\n\t            }\n\t        }\n\t        this._flushCodePointConsumedAsCharacterReference(this.charRefCode);\n\t        this._reconsumeInState(this.returnState);\n\t    }\n\t}\n\n\t//Element utils\n\tconst IMPLICIT_END_TAG_REQUIRED = new Set([TAG_ID.DD, TAG_ID.DT, TAG_ID.LI, TAG_ID.OPTGROUP, TAG_ID.OPTION, TAG_ID.P, TAG_ID.RB, TAG_ID.RP, TAG_ID.RT, TAG_ID.RTC]);\n\tconst IMPLICIT_END_TAG_REQUIRED_THOROUGHLY = new Set([\n\t    ...IMPLICIT_END_TAG_REQUIRED,\n\t    TAG_ID.CAPTION,\n\t    TAG_ID.COLGROUP,\n\t    TAG_ID.TBODY,\n\t    TAG_ID.TD,\n\t    TAG_ID.TFOOT,\n\t    TAG_ID.TH,\n\t    TAG_ID.THEAD,\n\t    TAG_ID.TR,\n\t]);\n\tconst SCOPING_ELEMENT_NS = new Map([\n\t    [TAG_ID.APPLET, NS.HTML],\n\t    [TAG_ID.CAPTION, NS.HTML],\n\t    [TAG_ID.HTML, NS.HTML],\n\t    [TAG_ID.MARQUEE, NS.HTML],\n\t    [TAG_ID.OBJECT, NS.HTML],\n\t    [TAG_ID.TABLE, NS.HTML],\n\t    [TAG_ID.TD, NS.HTML],\n\t    [TAG_ID.TEMPLATE, NS.HTML],\n\t    [TAG_ID.TH, NS.HTML],\n\t    [TAG_ID.ANNOTATION_XML, NS.MATHML],\n\t    [TAG_ID.MI, NS.MATHML],\n\t    [TAG_ID.MN, NS.MATHML],\n\t    [TAG_ID.MO, NS.MATHML],\n\t    [TAG_ID.MS, NS.MATHML],\n\t    [TAG_ID.MTEXT, NS.MATHML],\n\t    [TAG_ID.DESC, NS.SVG],\n\t    [TAG_ID.FOREIGN_OBJECT, NS.SVG],\n\t    [TAG_ID.TITLE, NS.SVG],\n\t]);\n\tconst NAMED_HEADERS = [TAG_ID.H1, TAG_ID.H2, TAG_ID.H3, TAG_ID.H4, TAG_ID.H5, TAG_ID.H6];\n\tconst TABLE_ROW_CONTEXT = [TAG_ID.TR, TAG_ID.TEMPLATE, TAG_ID.HTML];\n\tconst TABLE_BODY_CONTEXT = [TAG_ID.TBODY, TAG_ID.TFOOT, TAG_ID.THEAD, TAG_ID.TEMPLATE, TAG_ID.HTML];\n\tconst TABLE_CONTEXT = [TAG_ID.TABLE, TAG_ID.TEMPLATE, TAG_ID.HTML];\n\tconst TABLE_CELLS = [TAG_ID.TD, TAG_ID.TH];\n\t//Stack of open elements\n\tclass OpenElementStack {\n\t    constructor(document, treeAdapter, handler) {\n\t        this.treeAdapter = treeAdapter;\n\t        this.handler = handler;\n\t        this.items = [];\n\t        this.tagIDs = [];\n\t        this.stackTop = -1;\n\t        this.tmplCount = 0;\n\t        this.currentTagId = TAG_ID.UNKNOWN;\n\t        this.current = document;\n\t    }\n\t    get currentTmplContentOrNode() {\n\t        return this._isInTemplate() ? this.treeAdapter.getTemplateContent(this.current) : this.current;\n\t    }\n\t    //Index of element\n\t    _indexOf(element) {\n\t        return this.items.lastIndexOf(element, this.stackTop);\n\t    }\n\t    //Update current element\n\t    _isInTemplate() {\n\t        return this.currentTagId === TAG_ID.TEMPLATE && this.treeAdapter.getNamespaceURI(this.current) === NS.HTML;\n\t    }\n\t    _updateCurrentElement() {\n\t        this.current = this.items[this.stackTop];\n\t        this.currentTagId = this.tagIDs[this.stackTop];\n\t    }\n\t    //Mutations\n\t    push(element, tagID) {\n\t        this.stackTop++;\n\t        this.items[this.stackTop] = element;\n\t        this.current = element;\n\t        this.tagIDs[this.stackTop] = tagID;\n\t        this.currentTagId = tagID;\n\t        if (this._isInTemplate()) {\n\t            this.tmplCount++;\n\t        }\n\t        this.handler.onItemPush(element, tagID, true);\n\t    }\n\t    pop() {\n\t        const popped = this.current;\n\t        if (this.tmplCount > 0 && this._isInTemplate()) {\n\t            this.tmplCount--;\n\t        }\n\t        this.stackTop--;\n\t        this._updateCurrentElement();\n\t        this.handler.onItemPop(popped, true);\n\t    }\n\t    replace(oldElement, newElement) {\n\t        const idx = this._indexOf(oldElement);\n\t        this.items[idx] = newElement;\n\t        if (idx === this.stackTop) {\n\t            this.current = newElement;\n\t        }\n\t    }\n\t    insertAfter(referenceElement, newElement, newElementID) {\n\t        const insertionIdx = this._indexOf(referenceElement) + 1;\n\t        this.items.splice(insertionIdx, 0, newElement);\n\t        this.tagIDs.splice(insertionIdx, 0, newElementID);\n\t        this.stackTop++;\n\t        if (insertionIdx === this.stackTop) {\n\t            this._updateCurrentElement();\n\t        }\n\t        this.handler.onItemPush(this.current, this.currentTagId, insertionIdx === this.stackTop);\n\t    }\n\t    popUntilTagNamePopped(tagName) {\n\t        let targetIdx = this.stackTop + 1;\n\t        do {\n\t            targetIdx = this.tagIDs.lastIndexOf(tagName, targetIdx - 1);\n\t        } while (targetIdx > 0 && this.treeAdapter.getNamespaceURI(this.items[targetIdx]) !== NS.HTML);\n\t        this.shortenToLength(targetIdx < 0 ? 0 : targetIdx);\n\t    }\n\t    shortenToLength(idx) {\n\t        while (this.stackTop >= idx) {\n\t            const popped = this.current;\n\t            if (this.tmplCount > 0 && this._isInTemplate()) {\n\t                this.tmplCount -= 1;\n\t            }\n\t            this.stackTop--;\n\t            this._updateCurrentElement();\n\t            this.handler.onItemPop(popped, this.stackTop < idx);\n\t        }\n\t    }\n\t    popUntilElementPopped(element) {\n\t        const idx = this._indexOf(element);\n\t        this.shortenToLength(idx < 0 ? 0 : idx);\n\t    }\n\t    popUntilPopped(tagNames, targetNS) {\n\t        const idx = this._indexOfTagNames(tagNames, targetNS);\n\t        this.shortenToLength(idx < 0 ? 0 : idx);\n\t    }\n\t    popUntilNumberedHeaderPopped() {\n\t        this.popUntilPopped(NAMED_HEADERS, NS.HTML);\n\t    }\n\t    popUntilTableCellPopped() {\n\t        this.popUntilPopped(TABLE_CELLS, NS.HTML);\n\t    }\n\t    popAllUpToHtmlElement() {\n\t        //NOTE: here we assume that the root <html> element is always first in the open element stack, so\n\t        //we perform this fast stack clean up.\n\t        this.tmplCount = 0;\n\t        this.shortenToLength(1);\n\t    }\n\t    _indexOfTagNames(tagNames, namespace) {\n\t        for (let i = this.stackTop; i >= 0; i--) {\n\t            if (tagNames.includes(this.tagIDs[i]) && this.treeAdapter.getNamespaceURI(this.items[i]) === namespace) {\n\t                return i;\n\t            }\n\t        }\n\t        return -1;\n\t    }\n\t    clearBackTo(tagNames, targetNS) {\n\t        const idx = this._indexOfTagNames(tagNames, targetNS);\n\t        this.shortenToLength(idx + 1);\n\t    }\n\t    clearBackToTableContext() {\n\t        this.clearBackTo(TABLE_CONTEXT, NS.HTML);\n\t    }\n\t    clearBackToTableBodyContext() {\n\t        this.clearBackTo(TABLE_BODY_CONTEXT, NS.HTML);\n\t    }\n\t    clearBackToTableRowContext() {\n\t        this.clearBackTo(TABLE_ROW_CONTEXT, NS.HTML);\n\t    }\n\t    remove(element) {\n\t        const idx = this._indexOf(element);\n\t        if (idx >= 0) {\n\t            if (idx === this.stackTop) {\n\t                this.pop();\n\t            }\n\t            else {\n\t                this.items.splice(idx, 1);\n\t                this.tagIDs.splice(idx, 1);\n\t                this.stackTop--;\n\t                this._updateCurrentElement();\n\t                this.handler.onItemPop(element, false);\n\t            }\n\t        }\n\t    }\n\t    //Search\n\t    tryPeekProperlyNestedBodyElement() {\n\t        //Properly nested <body> element (should be second element in stack).\n\t        return this.stackTop >= 1 && this.tagIDs[1] === TAG_ID.BODY ? this.items[1] : null;\n\t    }\n\t    contains(element) {\n\t        return this._indexOf(element) > -1;\n\t    }\n\t    getCommonAncestor(element) {\n\t        const elementIdx = this._indexOf(element) - 1;\n\t        return elementIdx >= 0 ? this.items[elementIdx] : null;\n\t    }\n\t    isRootHtmlElementCurrent() {\n\t        return this.stackTop === 0 && this.tagIDs[0] === TAG_ID.HTML;\n\t    }\n\t    //Element in scope\n\t    hasInScope(tagName) {\n\t        for (let i = this.stackTop; i >= 0; i--) {\n\t            const tn = this.tagIDs[i];\n\t            const ns = this.treeAdapter.getNamespaceURI(this.items[i]);\n\t            if (tn === tagName && ns === NS.HTML) {\n\t                return true;\n\t            }\n\t            if (SCOPING_ELEMENT_NS.get(tn) === ns) {\n\t                return false;\n\t            }\n\t        }\n\t        return true;\n\t    }\n\t    hasNumberedHeaderInScope() {\n\t        for (let i = this.stackTop; i >= 0; i--) {\n\t            const tn = this.tagIDs[i];\n\t            const ns = this.treeAdapter.getNamespaceURI(this.items[i]);\n\t            if (isNumberedHeader(tn) && ns === NS.HTML) {\n\t                return true;\n\t            }\n\t            if (SCOPING_ELEMENT_NS.get(tn) === ns) {\n\t                return false;\n\t            }\n\t        }\n\t        return true;\n\t    }\n\t    hasInListItemScope(tagName) {\n\t        for (let i = this.stackTop; i >= 0; i--) {\n\t            const tn = this.tagIDs[i];\n\t            const ns = this.treeAdapter.getNamespaceURI(this.items[i]);\n\t            if (tn === tagName && ns === NS.HTML) {\n\t                return true;\n\t            }\n\t            if (((tn === TAG_ID.UL || tn === TAG_ID.OL) && ns === NS.HTML) || SCOPING_ELEMENT_NS.get(tn) === ns) {\n\t                return false;\n\t            }\n\t        }\n\t        return true;\n\t    }\n\t    hasInButtonScope(tagName) {\n\t        for (let i = this.stackTop; i >= 0; i--) {\n\t            const tn = this.tagIDs[i];\n\t            const ns = this.treeAdapter.getNamespaceURI(this.items[i]);\n\t            if (tn === tagName && ns === NS.HTML) {\n\t                return true;\n\t            }\n\t            if ((tn === TAG_ID.BUTTON && ns === NS.HTML) || SCOPING_ELEMENT_NS.get(tn) === ns) {\n\t                return false;\n\t            }\n\t        }\n\t        return true;\n\t    }\n\t    hasInTableScope(tagName) {\n\t        for (let i = this.stackTop; i >= 0; i--) {\n\t            const tn = this.tagIDs[i];\n\t            const ns = this.treeAdapter.getNamespaceURI(this.items[i]);\n\t            if (ns !== NS.HTML) {\n\t                continue;\n\t            }\n\t            if (tn === tagName) {\n\t                return true;\n\t            }\n\t            if (tn === TAG_ID.TABLE || tn === TAG_ID.TEMPLATE || tn === TAG_ID.HTML) {\n\t                return false;\n\t            }\n\t        }\n\t        return true;\n\t    }\n\t    hasTableBodyContextInTableScope() {\n\t        for (let i = this.stackTop; i >= 0; i--) {\n\t            const tn = this.tagIDs[i];\n\t            const ns = this.treeAdapter.getNamespaceURI(this.items[i]);\n\t            if (ns !== NS.HTML) {\n\t                continue;\n\t            }\n\t            if (tn === TAG_ID.TBODY || tn === TAG_ID.THEAD || tn === TAG_ID.TFOOT) {\n\t                return true;\n\t            }\n\t            if (tn === TAG_ID.TABLE || tn === TAG_ID.HTML) {\n\t                return false;\n\t            }\n\t        }\n\t        return true;\n\t    }\n\t    hasInSelectScope(tagName) {\n\t        for (let i = this.stackTop; i >= 0; i--) {\n\t            const tn = this.tagIDs[i];\n\t            const ns = this.treeAdapter.getNamespaceURI(this.items[i]);\n\t            if (ns !== NS.HTML) {\n\t                continue;\n\t            }\n\t            if (tn === tagName) {\n\t                return true;\n\t            }\n\t            if (tn !== TAG_ID.OPTION && tn !== TAG_ID.OPTGROUP) {\n\t                return false;\n\t            }\n\t        }\n\t        return true;\n\t    }\n\t    //Implied end tags\n\t    generateImpliedEndTags() {\n\t        while (IMPLICIT_END_TAG_REQUIRED.has(this.currentTagId)) {\n\t            this.pop();\n\t        }\n\t    }\n\t    generateImpliedEndTagsThoroughly() {\n\t        while (IMPLICIT_END_TAG_REQUIRED_THOROUGHLY.has(this.currentTagId)) {\n\t            this.pop();\n\t        }\n\t    }\n\t    generateImpliedEndTagsWithExclusion(exclusionId) {\n\t        while (this.currentTagId !== exclusionId && IMPLICIT_END_TAG_REQUIRED_THOROUGHLY.has(this.currentTagId)) {\n\t            this.pop();\n\t        }\n\t    }\n\t}\n\n\t//Const\n\tconst NOAH_ARK_CAPACITY = 3;\n\tvar EntryType;\n\t(function (EntryType) {\n\t    EntryType[EntryType[\"Marker\"] = 0] = \"Marker\";\n\t    EntryType[EntryType[\"Element\"] = 1] = \"Element\";\n\t})(EntryType || (EntryType = {}));\n\tconst MARKER = { type: EntryType.Marker };\n\t//List of formatting elements\n\tclass FormattingElementList {\n\t    constructor(treeAdapter) {\n\t        this.treeAdapter = treeAdapter;\n\t        this.entries = [];\n\t        this.bookmark = null;\n\t    }\n\t    //Noah Ark's condition\n\t    //OPTIMIZATION: at first we try to find possible candidates for exclusion using\n\t    //lightweight heuristics without thorough attributes check.\n\t    _getNoahArkConditionCandidates(newElement, neAttrs) {\n\t        const candidates = [];\n\t        const neAttrsLength = neAttrs.length;\n\t        const neTagName = this.treeAdapter.getTagName(newElement);\n\t        const neNamespaceURI = this.treeAdapter.getNamespaceURI(newElement);\n\t        for (let i = 0; i < this.entries.length; i++) {\n\t            const entry = this.entries[i];\n\t            if (entry.type === EntryType.Marker) {\n\t                break;\n\t            }\n\t            const { element } = entry;\n\t            if (this.treeAdapter.getTagName(element) === neTagName &&\n\t                this.treeAdapter.getNamespaceURI(element) === neNamespaceURI) {\n\t                const elementAttrs = this.treeAdapter.getAttrList(element);\n\t                if (elementAttrs.length === neAttrsLength) {\n\t                    candidates.push({ idx: i, attrs: elementAttrs });\n\t                }\n\t            }\n\t        }\n\t        return candidates;\n\t    }\n\t    _ensureNoahArkCondition(newElement) {\n\t        if (this.entries.length < NOAH_ARK_CAPACITY)\n\t            return;\n\t        const neAttrs = this.treeAdapter.getAttrList(newElement);\n\t        const candidates = this._getNoahArkConditionCandidates(newElement, neAttrs);\n\t        if (candidates.length < NOAH_ARK_CAPACITY)\n\t            return;\n\t        //NOTE: build attrs map for the new element, so we can perform fast lookups\n\t        const neAttrsMap = new Map(neAttrs.map((neAttr) => [neAttr.name, neAttr.value]));\n\t        let validCandidates = 0;\n\t        //NOTE: remove bottommost candidates, until Noah's Ark condition will not be met\n\t        for (let i = 0; i < candidates.length; i++) {\n\t            const candidate = candidates[i];\n\t            // We know that `candidate.attrs.length === neAttrs.length`\n\t            if (candidate.attrs.every((cAttr) => neAttrsMap.get(cAttr.name) === cAttr.value)) {\n\t                validCandidates += 1;\n\t                if (validCandidates >= NOAH_ARK_CAPACITY) {\n\t                    this.entries.splice(candidate.idx, 1);\n\t                }\n\t            }\n\t        }\n\t    }\n\t    //Mutations\n\t    insertMarker() {\n\t        this.entries.unshift(MARKER);\n\t    }\n\t    pushElement(element, token) {\n\t        this._ensureNoahArkCondition(element);\n\t        this.entries.unshift({\n\t            type: EntryType.Element,\n\t            element,\n\t            token,\n\t        });\n\t    }\n\t    insertElementAfterBookmark(element, token) {\n\t        const bookmarkIdx = this.entries.indexOf(this.bookmark);\n\t        this.entries.splice(bookmarkIdx, 0, {\n\t            type: EntryType.Element,\n\t            element,\n\t            token,\n\t        });\n\t    }\n\t    removeEntry(entry) {\n\t        const entryIndex = this.entries.indexOf(entry);\n\t        if (entryIndex >= 0) {\n\t            this.entries.splice(entryIndex, 1);\n\t        }\n\t    }\n\t    clearToLastMarker() {\n\t        const markerIdx = this.entries.indexOf(MARKER);\n\t        if (markerIdx >= 0) {\n\t            this.entries.splice(0, markerIdx + 1);\n\t        }\n\t        else {\n\t            this.entries.length = 0;\n\t        }\n\t    }\n\t    //Search\n\t    getElementEntryInScopeWithTagName(tagName) {\n\t        const entry = this.entries.find((entry) => entry.type === EntryType.Marker || this.treeAdapter.getTagName(entry.element) === tagName);\n\t        return entry && entry.type === EntryType.Element ? entry : null;\n\t    }\n\t    getElementEntry(element) {\n\t        return this.entries.find((entry) => entry.type === EntryType.Element && entry.element === element);\n\t    }\n\t}\n\n\tvar NodeType;\n\t(function (NodeType) {\n\t    NodeType[\"Document\"] = \"#document\";\n\t    NodeType[\"DocumentFragment\"] = \"#document-fragment\";\n\t    NodeType[\"Comment\"] = \"#comment\";\n\t    NodeType[\"Text\"] = \"#text\";\n\t    NodeType[\"DocumentType\"] = \"#documentType\";\n\t})(NodeType || (NodeType = {}));\n\tfunction createTextNode(value) {\n\t    return {\n\t        nodeName: NodeType.Text,\n\t        value,\n\t        parentNode: null,\n\t    };\n\t}\n\tconst defaultTreeAdapter = {\n\t    //Node construction\n\t    createDocument() {\n\t        return {\n\t            nodeName: NodeType.Document,\n\t            mode: DOCUMENT_MODE.NO_QUIRKS,\n\t            childNodes: [],\n\t        };\n\t    },\n\t    createDocumentFragment() {\n\t        return {\n\t            nodeName: NodeType.DocumentFragment,\n\t            childNodes: [],\n\t        };\n\t    },\n\t    createElement(tagName, namespaceURI, attrs) {\n\t        return {\n\t            nodeName: tagName,\n\t            tagName,\n\t            attrs,\n\t            namespaceURI,\n\t            childNodes: [],\n\t            parentNode: null,\n\t        };\n\t    },\n\t    createCommentNode(data) {\n\t        return {\n\t            nodeName: NodeType.Comment,\n\t            data,\n\t            parentNode: null,\n\t        };\n\t    },\n\t    //Tree mutation\n\t    appendChild(parentNode, newNode) {\n\t        parentNode.childNodes.push(newNode);\n\t        newNode.parentNode = parentNode;\n\t    },\n\t    insertBefore(parentNode, newNode, referenceNode) {\n\t        const insertionIdx = parentNode.childNodes.indexOf(referenceNode);\n\t        parentNode.childNodes.splice(insertionIdx, 0, newNode);\n\t        newNode.parentNode = parentNode;\n\t    },\n\t    setTemplateContent(templateElement, contentElement) {\n\t        templateElement.content = contentElement;\n\t    },\n\t    getTemplateContent(templateElement) {\n\t        return templateElement.content;\n\t    },\n\t    setDocumentType(document, name, publicId, systemId) {\n\t        const doctypeNode = document.childNodes.find((node) => node.nodeName === NodeType.DocumentType);\n\t        if (doctypeNode) {\n\t            doctypeNode.name = name;\n\t            doctypeNode.publicId = publicId;\n\t            doctypeNode.systemId = systemId;\n\t        }\n\t        else {\n\t            const node = {\n\t                nodeName: NodeType.DocumentType,\n\t                name,\n\t                publicId,\n\t                systemId,\n\t                parentNode: null,\n\t            };\n\t            defaultTreeAdapter.appendChild(document, node);\n\t        }\n\t    },\n\t    setDocumentMode(document, mode) {\n\t        document.mode = mode;\n\t    },\n\t    getDocumentMode(document) {\n\t        return document.mode;\n\t    },\n\t    detachNode(node) {\n\t        if (node.parentNode) {\n\t            const idx = node.parentNode.childNodes.indexOf(node);\n\t            node.parentNode.childNodes.splice(idx, 1);\n\t            node.parentNode = null;\n\t        }\n\t    },\n\t    insertText(parentNode, text) {\n\t        if (parentNode.childNodes.length > 0) {\n\t            const prevNode = parentNode.childNodes[parentNode.childNodes.length - 1];\n\t            if (defaultTreeAdapter.isTextNode(prevNode)) {\n\t                prevNode.value += text;\n\t                return;\n\t            }\n\t        }\n\t        defaultTreeAdapter.appendChild(parentNode, createTextNode(text));\n\t    },\n\t    insertTextBefore(parentNode, text, referenceNode) {\n\t        const prevNode = parentNode.childNodes[parentNode.childNodes.indexOf(referenceNode) - 1];\n\t        if (prevNode && defaultTreeAdapter.isTextNode(prevNode)) {\n\t            prevNode.value += text;\n\t        }\n\t        else {\n\t            defaultTreeAdapter.insertBefore(parentNode, createTextNode(text), referenceNode);\n\t        }\n\t    },\n\t    adoptAttributes(recipient, attrs) {\n\t        const recipientAttrsMap = new Set(recipient.attrs.map((attr) => attr.name));\n\t        for (let j = 0; j < attrs.length; j++) {\n\t            if (!recipientAttrsMap.has(attrs[j].name)) {\n\t                recipient.attrs.push(attrs[j]);\n\t            }\n\t        }\n\t    },\n\t    //Tree traversing\n\t    getFirstChild(node) {\n\t        return node.childNodes[0];\n\t    },\n\t    getChildNodes(node) {\n\t        return node.childNodes;\n\t    },\n\t    getParentNode(node) {\n\t        return node.parentNode;\n\t    },\n\t    getAttrList(element) {\n\t        return element.attrs;\n\t    },\n\t    //Node data\n\t    getTagName(element) {\n\t        return element.tagName;\n\t    },\n\t    getNamespaceURI(element) {\n\t        return element.namespaceURI;\n\t    },\n\t    getTextNodeContent(textNode) {\n\t        return textNode.value;\n\t    },\n\t    getCommentNodeContent(commentNode) {\n\t        return commentNode.data;\n\t    },\n\t    getDocumentTypeNodeName(doctypeNode) {\n\t        return doctypeNode.name;\n\t    },\n\t    getDocumentTypeNodePublicId(doctypeNode) {\n\t        return doctypeNode.publicId;\n\t    },\n\t    getDocumentTypeNodeSystemId(doctypeNode) {\n\t        return doctypeNode.systemId;\n\t    },\n\t    //Node types\n\t    isTextNode(node) {\n\t        return node.nodeName === '#text';\n\t    },\n\t    isCommentNode(node) {\n\t        return node.nodeName === '#comment';\n\t    },\n\t    isDocumentTypeNode(node) {\n\t        return node.nodeName === NodeType.DocumentType;\n\t    },\n\t    isElementNode(node) {\n\t        return Object.prototype.hasOwnProperty.call(node, 'tagName');\n\t    },\n\t    // Source code location\n\t    setNodeSourceCodeLocation(node, location) {\n\t        node.sourceCodeLocation = location;\n\t    },\n\t    getNodeSourceCodeLocation(node) {\n\t        return node.sourceCodeLocation;\n\t    },\n\t    updateNodeSourceCodeLocation(node, endLocation) {\n\t        node.sourceCodeLocation = { ...node.sourceCodeLocation, ...endLocation };\n\t    },\n\t};\n\n\t//Const\n\tconst VALID_DOCTYPE_NAME = 'html';\n\tconst VALID_SYSTEM_ID = 'about:legacy-compat';\n\tconst QUIRKS_MODE_SYSTEM_ID = 'http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd';\n\tconst QUIRKS_MODE_PUBLIC_ID_PREFIXES = [\n\t    '+//silmaril//dtd html pro v0r11 19970101//',\n\t    '-//as//dtd html 3.0 aswedit + extensions//',\n\t    '-//advasoft ltd//dtd html 3.0 aswedit + extensions//',\n\t    '-//ietf//dtd html 2.0 level 1//',\n\t    '-//ietf//dtd html 2.0 level 2//',\n\t    '-//ietf//dtd html 2.0 strict level 1//',\n\t    '-//ietf//dtd html 2.0 strict level 2//',\n\t    '-//ietf//dtd html 2.0 strict//',\n\t    '-//ietf//dtd html 2.0//',\n\t    '-//ietf//dtd html 2.1e//',\n\t    '-//ietf//dtd html 3.0//',\n\t    '-//ietf//dtd html 3.2 final//',\n\t    '-//ietf//dtd html 3.2//',\n\t    '-//ietf//dtd html 3//',\n\t    '-//ietf//dtd html level 0//',\n\t    '-//ietf//dtd html level 1//',\n\t    '-//ietf//dtd html level 2//',\n\t    '-//ietf//dtd html level 3//',\n\t    '-//ietf//dtd html strict level 0//',\n\t    '-//ietf//dtd html strict level 1//',\n\t    '-//ietf//dtd html strict level 2//',\n\t    '-//ietf//dtd html strict level 3//',\n\t    '-//ietf//dtd html strict//',\n\t    '-//ietf//dtd html//',\n\t    '-//metrius//dtd metrius presentational//',\n\t    '-//microsoft//dtd internet explorer 2.0 html strict//',\n\t    '-//microsoft//dtd internet explorer 2.0 html//',\n\t    '-//microsoft//dtd internet explorer 2.0 tables//',\n\t    '-//microsoft//dtd internet explorer 3.0 html strict//',\n\t    '-//microsoft//dtd internet explorer 3.0 html//',\n\t    '-//microsoft//dtd internet explorer 3.0 tables//',\n\t    '-//netscape comm. corp.//dtd html//',\n\t    '-//netscape comm. corp.//dtd strict html//',\n\t    \"-//o'reilly and associates//dtd html 2.0//\",\n\t    \"-//o'reilly and associates//dtd html extended 1.0//\",\n\t    \"-//o'reilly and associates//dtd html extended relaxed 1.0//\",\n\t    '-//sq//dtd html 2.0 hotmetal + extensions//',\n\t    '-//softquad software//dtd hotmetal pro 6.0::19990601::extensions to html 4.0//',\n\t    '-//softquad//dtd hotmetal pro 4.0::19971010::extensions to html 4.0//',\n\t    '-//spyglass//dtd html 2.0 extended//',\n\t    '-//sun microsystems corp.//dtd hotjava html//',\n\t    '-//sun microsystems corp.//dtd hotjava strict html//',\n\t    '-//w3c//dtd html 3 1995-03-24//',\n\t    '-//w3c//dtd html 3.2 draft//',\n\t    '-//w3c//dtd html 3.2 final//',\n\t    '-//w3c//dtd html 3.2//',\n\t    '-//w3c//dtd html 3.2s draft//',\n\t    '-//w3c//dtd html 4.0 frameset//',\n\t    '-//w3c//dtd html 4.0 transitional//',\n\t    '-//w3c//dtd html experimental 19960712//',\n\t    '-//w3c//dtd html experimental 970421//',\n\t    '-//w3c//dtd w3 html//',\n\t    '-//w3o//dtd w3 html 3.0//',\n\t    '-//webtechs//dtd mozilla html 2.0//',\n\t    '-//webtechs//dtd mozilla html//',\n\t];\n\tconst QUIRKS_MODE_NO_SYSTEM_ID_PUBLIC_ID_PREFIXES = [\n\t    ...QUIRKS_MODE_PUBLIC_ID_PREFIXES,\n\t    '-//w3c//dtd html 4.01 frameset//',\n\t    '-//w3c//dtd html 4.01 transitional//',\n\t];\n\tconst QUIRKS_MODE_PUBLIC_IDS = new Set([\n\t    '-//w3o//dtd w3 html strict 3.0//en//',\n\t    '-/w3c/dtd html 4.0 transitional/en',\n\t    'html',\n\t]);\n\tconst LIMITED_QUIRKS_PUBLIC_ID_PREFIXES = ['-//w3c//dtd xhtml 1.0 frameset//', '-//w3c//dtd xhtml 1.0 transitional//'];\n\tconst LIMITED_QUIRKS_WITH_SYSTEM_ID_PUBLIC_ID_PREFIXES = [\n\t    ...LIMITED_QUIRKS_PUBLIC_ID_PREFIXES,\n\t    '-//w3c//dtd html 4.01 frameset//',\n\t    '-//w3c//dtd html 4.01 transitional//',\n\t];\n\t//Utils\n\tfunction hasPrefix(publicId, prefixes) {\n\t    return prefixes.some((prefix) => publicId.startsWith(prefix));\n\t}\n\t//API\n\tfunction isConforming(token) {\n\t    return (token.name === VALID_DOCTYPE_NAME &&\n\t        token.publicId === null &&\n\t        (token.systemId === null || token.systemId === VALID_SYSTEM_ID));\n\t}\n\tfunction getDocumentMode(token) {\n\t    if (token.name !== VALID_DOCTYPE_NAME) {\n\t        return DOCUMENT_MODE.QUIRKS;\n\t    }\n\t    const { systemId } = token;\n\t    if (systemId && systemId.toLowerCase() === QUIRKS_MODE_SYSTEM_ID) {\n\t        return DOCUMENT_MODE.QUIRKS;\n\t    }\n\t    let { publicId } = token;\n\t    if (publicId !== null) {\n\t        publicId = publicId.toLowerCase();\n\t        if (QUIRKS_MODE_PUBLIC_IDS.has(publicId)) {\n\t            return DOCUMENT_MODE.QUIRKS;\n\t        }\n\t        let prefixes = systemId === null ? QUIRKS_MODE_NO_SYSTEM_ID_PUBLIC_ID_PREFIXES : QUIRKS_MODE_PUBLIC_ID_PREFIXES;\n\t        if (hasPrefix(publicId, prefixes)) {\n\t            return DOCUMENT_MODE.QUIRKS;\n\t        }\n\t        prefixes =\n\t            systemId === null ? LIMITED_QUIRKS_PUBLIC_ID_PREFIXES : LIMITED_QUIRKS_WITH_SYSTEM_ID_PUBLIC_ID_PREFIXES;\n\t        if (hasPrefix(publicId, prefixes)) {\n\t            return DOCUMENT_MODE.LIMITED_QUIRKS;\n\t        }\n\t    }\n\t    return DOCUMENT_MODE.NO_QUIRKS;\n\t}\n\n\t//MIME types\n\tconst MIME_TYPES = {\n\t    TEXT_HTML: 'text/html',\n\t    APPLICATION_XML: 'application/xhtml+xml',\n\t};\n\t//Attributes\n\tconst DEFINITION_URL_ATTR = 'definitionurl';\n\tconst ADJUSTED_DEFINITION_URL_ATTR = 'definitionURL';\n\tconst SVG_ATTRS_ADJUSTMENT_MAP = new Map([\n\t    'attributeName',\n\t    'attributeType',\n\t    'baseFrequency',\n\t    'baseProfile',\n\t    'calcMode',\n\t    'clipPathUnits',\n\t    'diffuseConstant',\n\t    'edgeMode',\n\t    'filterUnits',\n\t    'glyphRef',\n\t    'gradientTransform',\n\t    'gradientUnits',\n\t    'kernelMatrix',\n\t    'kernelUnitLength',\n\t    'keyPoints',\n\t    'keySplines',\n\t    'keyTimes',\n\t    'lengthAdjust',\n\t    'limitingConeAngle',\n\t    'markerHeight',\n\t    'markerUnits',\n\t    'markerWidth',\n\t    'maskContentUnits',\n\t    'maskUnits',\n\t    'numOctaves',\n\t    'pathLength',\n\t    'patternContentUnits',\n\t    'patternTransform',\n\t    'patternUnits',\n\t    'pointsAtX',\n\t    'pointsAtY',\n\t    'pointsAtZ',\n\t    'preserveAlpha',\n\t    'preserveAspectRatio',\n\t    'primitiveUnits',\n\t    'refX',\n\t    'refY',\n\t    'repeatCount',\n\t    'repeatDur',\n\t    'requiredExtensions',\n\t    'requiredFeatures',\n\t    'specularConstant',\n\t    'specularExponent',\n\t    'spreadMethod',\n\t    'startOffset',\n\t    'stdDeviation',\n\t    'stitchTiles',\n\t    'surfaceScale',\n\t    'systemLanguage',\n\t    'tableValues',\n\t    'targetX',\n\t    'targetY',\n\t    'textLength',\n\t    'viewBox',\n\t    'viewTarget',\n\t    'xChannelSelector',\n\t    'yChannelSelector',\n\t    'zoomAndPan',\n\t].map((attr) => [attr.toLowerCase(), attr]));\n\tconst XML_ATTRS_ADJUSTMENT_MAP = new Map([\n\t    ['xlink:actuate', { prefix: 'xlink', name: 'actuate', namespace: NS.XLINK }],\n\t    ['xlink:arcrole', { prefix: 'xlink', name: 'arcrole', namespace: NS.XLINK }],\n\t    ['xlink:href', { prefix: 'xlink', name: 'href', namespace: NS.XLINK }],\n\t    ['xlink:role', { prefix: 'xlink', name: 'role', namespace: NS.XLINK }],\n\t    ['xlink:show', { prefix: 'xlink', name: 'show', namespace: NS.XLINK }],\n\t    ['xlink:title', { prefix: 'xlink', name: 'title', namespace: NS.XLINK }],\n\t    ['xlink:type', { prefix: 'xlink', name: 'type', namespace: NS.XLINK }],\n\t    ['xml:base', { prefix: 'xml', name: 'base', namespace: NS.XML }],\n\t    ['xml:lang', { prefix: 'xml', name: 'lang', namespace: NS.XML }],\n\t    ['xml:space', { prefix: 'xml', name: 'space', namespace: NS.XML }],\n\t    ['xmlns', { prefix: '', name: 'xmlns', namespace: NS.XMLNS }],\n\t    ['xmlns:xlink', { prefix: 'xmlns', name: 'xlink', namespace: NS.XMLNS }],\n\t]);\n\t//SVG tag names adjustment map\n\tconst SVG_TAG_NAMES_ADJUSTMENT_MAP = new Map([\n\t    'altGlyph',\n\t    'altGlyphDef',\n\t    'altGlyphItem',\n\t    'animateColor',\n\t    'animateMotion',\n\t    'animateTransform',\n\t    'clipPath',\n\t    'feBlend',\n\t    'feColorMatrix',\n\t    'feComponentTransfer',\n\t    'feComposite',\n\t    'feConvolveMatrix',\n\t    'feDiffuseLighting',\n\t    'feDisplacementMap',\n\t    'feDistantLight',\n\t    'feFlood',\n\t    'feFuncA',\n\t    'feFuncB',\n\t    'feFuncG',\n\t    'feFuncR',\n\t    'feGaussianBlur',\n\t    'feImage',\n\t    'feMerge',\n\t    'feMergeNode',\n\t    'feMorphology',\n\t    'feOffset',\n\t    'fePointLight',\n\t    'feSpecularLighting',\n\t    'feSpotLight',\n\t    'feTile',\n\t    'feTurbulence',\n\t    'foreignObject',\n\t    'glyphRef',\n\t    'linearGradient',\n\t    'radialGradient',\n\t    'textPath',\n\t].map((tn) => [tn.toLowerCase(), tn]));\n\t//Tags that causes exit from foreign content\n\tconst EXITS_FOREIGN_CONTENT = new Set([\n\t    TAG_ID.B,\n\t    TAG_ID.BIG,\n\t    TAG_ID.BLOCKQUOTE,\n\t    TAG_ID.BODY,\n\t    TAG_ID.BR,\n\t    TAG_ID.CENTER,\n\t    TAG_ID.CODE,\n\t    TAG_ID.DD,\n\t    TAG_ID.DIV,\n\t    TAG_ID.DL,\n\t    TAG_ID.DT,\n\t    TAG_ID.EM,\n\t    TAG_ID.EMBED,\n\t    TAG_ID.H1,\n\t    TAG_ID.H2,\n\t    TAG_ID.H3,\n\t    TAG_ID.H4,\n\t    TAG_ID.H5,\n\t    TAG_ID.H6,\n\t    TAG_ID.HEAD,\n\t    TAG_ID.HR,\n\t    TAG_ID.I,\n\t    TAG_ID.IMG,\n\t    TAG_ID.LI,\n\t    TAG_ID.LISTING,\n\t    TAG_ID.MENU,\n\t    TAG_ID.META,\n\t    TAG_ID.NOBR,\n\t    TAG_ID.OL,\n\t    TAG_ID.P,\n\t    TAG_ID.PRE,\n\t    TAG_ID.RUBY,\n\t    TAG_ID.S,\n\t    TAG_ID.SMALL,\n\t    TAG_ID.SPAN,\n\t    TAG_ID.STRONG,\n\t    TAG_ID.STRIKE,\n\t    TAG_ID.SUB,\n\t    TAG_ID.SUP,\n\t    TAG_ID.TABLE,\n\t    TAG_ID.TT,\n\t    TAG_ID.U,\n\t    TAG_ID.UL,\n\t    TAG_ID.VAR,\n\t]);\n\t//Check exit from foreign content\n\tfunction causesExit(startTagToken) {\n\t    const tn = startTagToken.tagID;\n\t    const isFontWithAttrs = tn === TAG_ID.FONT &&\n\t        startTagToken.attrs.some(({ name }) => name === ATTRS.COLOR || name === ATTRS.SIZE || name === ATTRS.FACE);\n\t    return isFontWithAttrs || EXITS_FOREIGN_CONTENT.has(tn);\n\t}\n\t//Token adjustments\n\tfunction adjustTokenMathMLAttrs(token) {\n\t    for (let i = 0; i < token.attrs.length; i++) {\n\t        if (token.attrs[i].name === DEFINITION_URL_ATTR) {\n\t            token.attrs[i].name = ADJUSTED_DEFINITION_URL_ATTR;\n\t            break;\n\t        }\n\t    }\n\t}\n\tfunction adjustTokenSVGAttrs(token) {\n\t    for (let i = 0; i < token.attrs.length; i++) {\n\t        const adjustedAttrName = SVG_ATTRS_ADJUSTMENT_MAP.get(token.attrs[i].name);\n\t        if (adjustedAttrName != null) {\n\t            token.attrs[i].name = adjustedAttrName;\n\t        }\n\t    }\n\t}\n\tfunction adjustTokenXMLAttrs(token) {\n\t    for (let i = 0; i < token.attrs.length; i++) {\n\t        const adjustedAttrEntry = XML_ATTRS_ADJUSTMENT_MAP.get(token.attrs[i].name);\n\t        if (adjustedAttrEntry) {\n\t            token.attrs[i].prefix = adjustedAttrEntry.prefix;\n\t            token.attrs[i].name = adjustedAttrEntry.name;\n\t            token.attrs[i].namespace = adjustedAttrEntry.namespace;\n\t        }\n\t    }\n\t}\n\tfunction adjustTokenSVGTagName(token) {\n\t    const adjustedTagName = SVG_TAG_NAMES_ADJUSTMENT_MAP.get(token.tagName);\n\t    if (adjustedTagName != null) {\n\t        token.tagName = adjustedTagName;\n\t        token.tagID = getTagID(token.tagName);\n\t    }\n\t}\n\t//Integration points\n\tfunction isMathMLTextIntegrationPoint(tn, ns) {\n\t    return ns === NS.MATHML && (tn === TAG_ID.MI || tn === TAG_ID.MO || tn === TAG_ID.MN || tn === TAG_ID.MS || tn === TAG_ID.MTEXT);\n\t}\n\tfunction isHtmlIntegrationPoint(tn, ns, attrs) {\n\t    if (ns === NS.MATHML && tn === TAG_ID.ANNOTATION_XML) {\n\t        for (let i = 0; i < attrs.length; i++) {\n\t            if (attrs[i].name === ATTRS.ENCODING) {\n\t                const value = attrs[i].value.toLowerCase();\n\t                return value === MIME_TYPES.TEXT_HTML || value === MIME_TYPES.APPLICATION_XML;\n\t            }\n\t        }\n\t    }\n\t    return ns === NS.SVG && (tn === TAG_ID.FOREIGN_OBJECT || tn === TAG_ID.DESC || tn === TAG_ID.TITLE);\n\t}\n\tfunction isIntegrationPoint(tn, ns, attrs, foreignNS) {\n\t    return (((!foreignNS || foreignNS === NS.HTML) && isHtmlIntegrationPoint(tn, ns, attrs)) ||\n\t        ((!foreignNS || foreignNS === NS.MATHML) && isMathMLTextIntegrationPoint(tn, ns)));\n\t}\n\n\t//Misc constants\n\tconst HIDDEN_INPUT_TYPE = 'hidden';\n\t//Adoption agency loops iteration count\n\tconst AA_OUTER_LOOP_ITER = 8;\n\tconst AA_INNER_LOOP_ITER = 3;\n\t//Insertion modes\n\tvar InsertionMode;\n\t(function (InsertionMode) {\n\t    InsertionMode[InsertionMode[\"INITIAL\"] = 0] = \"INITIAL\";\n\t    InsertionMode[InsertionMode[\"BEFORE_HTML\"] = 1] = \"BEFORE_HTML\";\n\t    InsertionMode[InsertionMode[\"BEFORE_HEAD\"] = 2] = \"BEFORE_HEAD\";\n\t    InsertionMode[InsertionMode[\"IN_HEAD\"] = 3] = \"IN_HEAD\";\n\t    InsertionMode[InsertionMode[\"IN_HEAD_NO_SCRIPT\"] = 4] = \"IN_HEAD_NO_SCRIPT\";\n\t    InsertionMode[InsertionMode[\"AFTER_HEAD\"] = 5] = \"AFTER_HEAD\";\n\t    InsertionMode[InsertionMode[\"IN_BODY\"] = 6] = \"IN_BODY\";\n\t    InsertionMode[InsertionMode[\"TEXT\"] = 7] = \"TEXT\";\n\t    InsertionMode[InsertionMode[\"IN_TABLE\"] = 8] = \"IN_TABLE\";\n\t    InsertionMode[InsertionMode[\"IN_TABLE_TEXT\"] = 9] = \"IN_TABLE_TEXT\";\n\t    InsertionMode[InsertionMode[\"IN_CAPTION\"] = 10] = \"IN_CAPTION\";\n\t    InsertionMode[InsertionMode[\"IN_COLUMN_GROUP\"] = 11] = \"IN_COLUMN_GROUP\";\n\t    InsertionMode[InsertionMode[\"IN_TABLE_BODY\"] = 12] = \"IN_TABLE_BODY\";\n\t    InsertionMode[InsertionMode[\"IN_ROW\"] = 13] = \"IN_ROW\";\n\t    InsertionMode[InsertionMode[\"IN_CELL\"] = 14] = \"IN_CELL\";\n\t    InsertionMode[InsertionMode[\"IN_SELECT\"] = 15] = \"IN_SELECT\";\n\t    InsertionMode[InsertionMode[\"IN_SELECT_IN_TABLE\"] = 16] = \"IN_SELECT_IN_TABLE\";\n\t    InsertionMode[InsertionMode[\"IN_TEMPLATE\"] = 17] = \"IN_TEMPLATE\";\n\t    InsertionMode[InsertionMode[\"AFTER_BODY\"] = 18] = \"AFTER_BODY\";\n\t    InsertionMode[InsertionMode[\"IN_FRAMESET\"] = 19] = \"IN_FRAMESET\";\n\t    InsertionMode[InsertionMode[\"AFTER_FRAMESET\"] = 20] = \"AFTER_FRAMESET\";\n\t    InsertionMode[InsertionMode[\"AFTER_AFTER_BODY\"] = 21] = \"AFTER_AFTER_BODY\";\n\t    InsertionMode[InsertionMode[\"AFTER_AFTER_FRAMESET\"] = 22] = \"AFTER_AFTER_FRAMESET\";\n\t})(InsertionMode || (InsertionMode = {}));\n\tconst BASE_LOC = {\n\t    startLine: -1,\n\t    startCol: -1,\n\t    startOffset: -1,\n\t    endLine: -1,\n\t    endCol: -1,\n\t    endOffset: -1,\n\t};\n\tconst TABLE_STRUCTURE_TAGS = new Set([TAG_ID.TABLE, TAG_ID.TBODY, TAG_ID.TFOOT, TAG_ID.THEAD, TAG_ID.TR]);\n\tconst defaultParserOptions = {\n\t    scriptingEnabled: true,\n\t    sourceCodeLocationInfo: false,\n\t    treeAdapter: defaultTreeAdapter,\n\t    onParseError: null,\n\t};\n\t//Parser\n\tclass Parser {\n\t    constructor(options, document, fragmentContext = null, scriptHandler = null) {\n\t        this.fragmentContext = fragmentContext;\n\t        this.scriptHandler = scriptHandler;\n\t        this.currentToken = null;\n\t        this.stopped = false;\n\t        this.insertionMode = InsertionMode.INITIAL;\n\t        this.originalInsertionMode = InsertionMode.INITIAL;\n\t        this.headElement = null;\n\t        this.formElement = null;\n\t        /** Indicates that the current node is not an element in the HTML namespace */\n\t        this.currentNotInHTML = false;\n\t        /**\n\t         * The template insertion mode stack is maintained from the left.\n\t         * Ie. the topmost element will always have index 0.\n\t         */\n\t        this.tmplInsertionModeStack = [];\n\t        this.pendingCharacterTokens = [];\n\t        this.hasNonWhitespacePendingCharacterToken = false;\n\t        this.framesetOk = true;\n\t        this.skipNextNewLine = false;\n\t        this.fosterParentingEnabled = false;\n\t        this.options = {\n\t            ...defaultParserOptions,\n\t            ...options,\n\t        };\n\t        this.treeAdapter = this.options.treeAdapter;\n\t        this.onParseError = this.options.onParseError;\n\t        // Always enable location info if we report parse errors.\n\t        if (this.onParseError) {\n\t            this.options.sourceCodeLocationInfo = true;\n\t        }\n\t        this.document = document !== null && document !== void 0 ? document : this.treeAdapter.createDocument();\n\t        this.tokenizer = new Tokenizer(this.options, this);\n\t        this.activeFormattingElements = new FormattingElementList(this.treeAdapter);\n\t        this.fragmentContextID = fragmentContext ? getTagID(this.treeAdapter.getTagName(fragmentContext)) : TAG_ID.UNKNOWN;\n\t        this._setContextModes(fragmentContext !== null && fragmentContext !== void 0 ? fragmentContext : this.document, this.fragmentContextID);\n\t        this.openElements = new OpenElementStack(this.document, this.treeAdapter, this);\n\t    }\n\t    // API\n\t    static parse(html, options) {\n\t        const parser = new this(options);\n\t        parser.tokenizer.write(html, true);\n\t        return parser.document;\n\t    }\n\t    static getFragmentParser(fragmentContext, options) {\n\t        const opts = {\n\t            ...defaultParserOptions,\n\t            ...options,\n\t        };\n\t        //NOTE: use a <template> element as the fragment context if no context element was provided,\n\t        //so we will parse in a \"forgiving\" manner\n\t        fragmentContext !== null && fragmentContext !== void 0 ? fragmentContext : (fragmentContext = opts.treeAdapter.createElement(TAG_NAMES.TEMPLATE, NS.HTML, []));\n\t        //NOTE: create a fake element which will be used as the `document` for fragment parsing.\n\t        //This is important for jsdom, where a new `document` cannot be created. This led to\n\t        //fragment parsing messing with the main `document`.\n\t        const documentMock = opts.treeAdapter.createElement('documentmock', NS.HTML, []);\n\t        const parser = new this(opts, documentMock, fragmentContext);\n\t        if (parser.fragmentContextID === TAG_ID.TEMPLATE) {\n\t            parser.tmplInsertionModeStack.unshift(InsertionMode.IN_TEMPLATE);\n\t        }\n\t        parser._initTokenizerForFragmentParsing();\n\t        parser._insertFakeRootElement();\n\t        parser._resetInsertionMode();\n\t        parser._findFormInFragmentContext();\n\t        return parser;\n\t    }\n\t    getFragment() {\n\t        const rootElement = this.treeAdapter.getFirstChild(this.document);\n\t        const fragment = this.treeAdapter.createDocumentFragment();\n\t        this._adoptNodes(rootElement, fragment);\n\t        return fragment;\n\t    }\n\t    //Errors\n\t    _err(token, code, beforeToken) {\n\t        var _a;\n\t        if (!this.onParseError)\n\t            return;\n\t        const loc = (_a = token.location) !== null && _a !== void 0 ? _a : BASE_LOC;\n\t        const err = {\n\t            code,\n\t            startLine: loc.startLine,\n\t            startCol: loc.startCol,\n\t            startOffset: loc.startOffset,\n\t            endLine: beforeToken ? loc.startLine : loc.endLine,\n\t            endCol: beforeToken ? loc.startCol : loc.endCol,\n\t            endOffset: beforeToken ? loc.startOffset : loc.endOffset,\n\t        };\n\t        this.onParseError(err);\n\t    }\n\t    //Stack events\n\t    onItemPush(node, tid, isTop) {\n\t        var _a, _b;\n\t        (_b = (_a = this.treeAdapter).onItemPush) === null || _b === void 0 ? void 0 : _b.call(_a, node);\n\t        if (isTop && this.openElements.stackTop > 0)\n\t            this._setContextModes(node, tid);\n\t    }\n\t    onItemPop(node, isTop) {\n\t        var _a, _b;\n\t        if (this.options.sourceCodeLocationInfo) {\n\t            this._setEndLocation(node, this.currentToken);\n\t        }\n\t        (_b = (_a = this.treeAdapter).onItemPop) === null || _b === void 0 ? void 0 : _b.call(_a, node, this.openElements.current);\n\t        if (isTop) {\n\t            let current;\n\t            let currentTagId;\n\t            if (this.openElements.stackTop === 0 && this.fragmentContext) {\n\t                current = this.fragmentContext;\n\t                currentTagId = this.fragmentContextID;\n\t            }\n\t            else {\n\t                ({ current, currentTagId } = this.openElements);\n\t            }\n\t            this._setContextModes(current, currentTagId);\n\t        }\n\t    }\n\t    _setContextModes(current, tid) {\n\t        const isHTML = current === this.document || this.treeAdapter.getNamespaceURI(current) === NS.HTML;\n\t        this.currentNotInHTML = !isHTML;\n\t        this.tokenizer.inForeignNode = !isHTML && !this._isIntegrationPoint(tid, current);\n\t    }\n\t    _switchToTextParsing(currentToken, nextTokenizerState) {\n\t        this._insertElement(currentToken, NS.HTML);\n\t        this.tokenizer.state = nextTokenizerState;\n\t        this.originalInsertionMode = this.insertionMode;\n\t        this.insertionMode = InsertionMode.TEXT;\n\t    }\n\t    switchToPlaintextParsing() {\n\t        this.insertionMode = InsertionMode.TEXT;\n\t        this.originalInsertionMode = InsertionMode.IN_BODY;\n\t        this.tokenizer.state = TokenizerMode.PLAINTEXT;\n\t    }\n\t    //Fragment parsing\n\t    _getAdjustedCurrentElement() {\n\t        return this.openElements.stackTop === 0 && this.fragmentContext\n\t            ? this.fragmentContext\n\t            : this.openElements.current;\n\t    }\n\t    _findFormInFragmentContext() {\n\t        let node = this.fragmentContext;\n\t        while (node) {\n\t            if (this.treeAdapter.getTagName(node) === TAG_NAMES.FORM) {\n\t                this.formElement = node;\n\t                break;\n\t            }\n\t            node = this.treeAdapter.getParentNode(node);\n\t        }\n\t    }\n\t    _initTokenizerForFragmentParsing() {\n\t        if (!this.fragmentContext || this.treeAdapter.getNamespaceURI(this.fragmentContext) !== NS.HTML) {\n\t            return;\n\t        }\n\t        switch (this.fragmentContextID) {\n\t            case TAG_ID.TITLE:\n\t            case TAG_ID.TEXTAREA: {\n\t                this.tokenizer.state = TokenizerMode.RCDATA;\n\t                break;\n\t            }\n\t            case TAG_ID.STYLE:\n\t            case TAG_ID.XMP:\n\t            case TAG_ID.IFRAME:\n\t            case TAG_ID.NOEMBED:\n\t            case TAG_ID.NOFRAMES:\n\t            case TAG_ID.NOSCRIPT: {\n\t                this.tokenizer.state = TokenizerMode.RAWTEXT;\n\t                break;\n\t            }\n\t            case TAG_ID.SCRIPT: {\n\t                this.tokenizer.state = TokenizerMode.SCRIPT_DATA;\n\t                break;\n\t            }\n\t            case TAG_ID.PLAINTEXT: {\n\t                this.tokenizer.state = TokenizerMode.PLAINTEXT;\n\t                break;\n\t            }\n\t            // Do nothing\n\t        }\n\t    }\n\t    //Tree mutation\n\t    _setDocumentType(token) {\n\t        const name = token.name || '';\n\t        const publicId = token.publicId || '';\n\t        const systemId = token.systemId || '';\n\t        this.treeAdapter.setDocumentType(this.document, name, publicId, systemId);\n\t        if (token.location) {\n\t            const documentChildren = this.treeAdapter.getChildNodes(this.document);\n\t            const docTypeNode = documentChildren.find((node) => this.treeAdapter.isDocumentTypeNode(node));\n\t            if (docTypeNode) {\n\t                this.treeAdapter.setNodeSourceCodeLocation(docTypeNode, token.location);\n\t            }\n\t        }\n\t    }\n\t    _attachElementToTree(element, location) {\n\t        if (this.options.sourceCodeLocationInfo) {\n\t            const loc = location && {\n\t                ...location,\n\t                startTag: location,\n\t            };\n\t            this.treeAdapter.setNodeSourceCodeLocation(element, loc);\n\t        }\n\t        if (this._shouldFosterParentOnInsertion()) {\n\t            this._fosterParentElement(element);\n\t        }\n\t        else {\n\t            const parent = this.openElements.currentTmplContentOrNode;\n\t            this.treeAdapter.appendChild(parent, element);\n\t        }\n\t    }\n\t    _appendElement(token, namespaceURI) {\n\t        const element = this.treeAdapter.createElement(token.tagName, namespaceURI, token.attrs);\n\t        this._attachElementToTree(element, token.location);\n\t    }\n\t    _insertElement(token, namespaceURI) {\n\t        const element = this.treeAdapter.createElement(token.tagName, namespaceURI, token.attrs);\n\t        this._attachElementToTree(element, token.location);\n\t        this.openElements.push(element, token.tagID);\n\t    }\n\t    _insertFakeElement(tagName, tagID) {\n\t        const element = this.treeAdapter.createElement(tagName, NS.HTML, []);\n\t        this._attachElementToTree(element, null);\n\t        this.openElements.push(element, tagID);\n\t    }\n\t    _insertTemplate(token) {\n\t        const tmpl = this.treeAdapter.createElement(token.tagName, NS.HTML, token.attrs);\n\t        const content = this.treeAdapter.createDocumentFragment();\n\t        this.treeAdapter.setTemplateContent(tmpl, content);\n\t        this._attachElementToTree(tmpl, token.location);\n\t        this.openElements.push(tmpl, token.tagID);\n\t        if (this.options.sourceCodeLocationInfo)\n\t            this.treeAdapter.setNodeSourceCodeLocation(content, null);\n\t    }\n\t    _insertFakeRootElement() {\n\t        const element = this.treeAdapter.createElement(TAG_NAMES.HTML, NS.HTML, []);\n\t        if (this.options.sourceCodeLocationInfo)\n\t            this.treeAdapter.setNodeSourceCodeLocation(element, null);\n\t        this.treeAdapter.appendChild(this.openElements.current, element);\n\t        this.openElements.push(element, TAG_ID.HTML);\n\t    }\n\t    _appendCommentNode(token, parent) {\n\t        const commentNode = this.treeAdapter.createCommentNode(token.data);\n\t        this.treeAdapter.appendChild(parent, commentNode);\n\t        if (this.options.sourceCodeLocationInfo) {\n\t            this.treeAdapter.setNodeSourceCodeLocation(commentNode, token.location);\n\t        }\n\t    }\n\t    _insertCharacters(token) {\n\t        let parent;\n\t        let beforeElement;\n\t        if (this._shouldFosterParentOnInsertion()) {\n\t            ({ parent, beforeElement } = this._findFosterParentingLocation());\n\t            if (beforeElement) {\n\t                this.treeAdapter.insertTextBefore(parent, token.chars, beforeElement);\n\t            }\n\t            else {\n\t                this.treeAdapter.insertText(parent, token.chars);\n\t            }\n\t        }\n\t        else {\n\t            parent = this.openElements.currentTmplContentOrNode;\n\t            this.treeAdapter.insertText(parent, token.chars);\n\t        }\n\t        if (!token.location)\n\t            return;\n\t        const siblings = this.treeAdapter.getChildNodes(parent);\n\t        const textNodeIdx = beforeElement ? siblings.lastIndexOf(beforeElement) : siblings.length;\n\t        const textNode = siblings[textNodeIdx - 1];\n\t        //NOTE: if we have a location assigned by another token, then just update the end position\n\t        const tnLoc = this.treeAdapter.getNodeSourceCodeLocation(textNode);\n\t        if (tnLoc) {\n\t            const { endLine, endCol, endOffset } = token.location;\n\t            this.treeAdapter.updateNodeSourceCodeLocation(textNode, { endLine, endCol, endOffset });\n\t        }\n\t        else if (this.options.sourceCodeLocationInfo) {\n\t            this.treeAdapter.setNodeSourceCodeLocation(textNode, token.location);\n\t        }\n\t    }\n\t    _adoptNodes(donor, recipient) {\n\t        for (let child = this.treeAdapter.getFirstChild(donor); child; child = this.treeAdapter.getFirstChild(donor)) {\n\t            this.treeAdapter.detachNode(child);\n\t            this.treeAdapter.appendChild(recipient, child);\n\t        }\n\t    }\n\t    _setEndLocation(element, closingToken) {\n\t        if (this.treeAdapter.getNodeSourceCodeLocation(element) && closingToken.location) {\n\t            const ctLoc = closingToken.location;\n\t            const tn = this.treeAdapter.getTagName(element);\n\t            const endLoc = \n\t            // NOTE: For cases like <p> <p> </p> - First 'p' closes without a closing\n\t            // tag and for cases like <td> <p> </td> - 'p' closes without a closing tag.\n\t            closingToken.type === TokenType.END_TAG && tn === closingToken.tagName\n\t                ? {\n\t                    endTag: { ...ctLoc },\n\t                    endLine: ctLoc.endLine,\n\t                    endCol: ctLoc.endCol,\n\t                    endOffset: ctLoc.endOffset,\n\t                }\n\t                : {\n\t                    endLine: ctLoc.startLine,\n\t                    endCol: ctLoc.startCol,\n\t                    endOffset: ctLoc.startOffset,\n\t                };\n\t            this.treeAdapter.updateNodeSourceCodeLocation(element, endLoc);\n\t        }\n\t    }\n\t    //Token processing\n\t    shouldProcessStartTagTokenInForeignContent(token) {\n\t        // Check that neither current === document, or ns === NS.HTML\n\t        if (!this.currentNotInHTML)\n\t            return false;\n\t        let current;\n\t        let currentTagId;\n\t        if (this.openElements.stackTop === 0 && this.fragmentContext) {\n\t            current = this.fragmentContext;\n\t            currentTagId = this.fragmentContextID;\n\t        }\n\t        else {\n\t            ({ current, currentTagId } = this.openElements);\n\t        }\n\t        if (token.tagID === TAG_ID.SVG &&\n\t            this.treeAdapter.getTagName(current) === TAG_NAMES.ANNOTATION_XML &&\n\t            this.treeAdapter.getNamespaceURI(current) === NS.MATHML) {\n\t            return false;\n\t        }\n\t        return (\n\t        // Check that `current` is not an integration point for HTML or MathML elements.\n\t        this.tokenizer.inForeignNode ||\n\t            // If it _is_ an integration point, then we might have to check that it is not an HTML\n\t            // integration point.\n\t            ((token.tagID === TAG_ID.MGLYPH || token.tagID === TAG_ID.MALIGNMARK) &&\n\t                !this._isIntegrationPoint(currentTagId, current, NS.HTML)));\n\t    }\n\t    _processToken(token) {\n\t        switch (token.type) {\n\t            case TokenType.CHARACTER: {\n\t                this.onCharacter(token);\n\t                break;\n\t            }\n\t            case TokenType.NULL_CHARACTER: {\n\t                this.onNullCharacter(token);\n\t                break;\n\t            }\n\t            case TokenType.COMMENT: {\n\t                this.onComment(token);\n\t                break;\n\t            }\n\t            case TokenType.DOCTYPE: {\n\t                this.onDoctype(token);\n\t                break;\n\t            }\n\t            case TokenType.START_TAG: {\n\t                this._processStartTag(token);\n\t                break;\n\t            }\n\t            case TokenType.END_TAG: {\n\t                this.onEndTag(token);\n\t                break;\n\t            }\n\t            case TokenType.EOF: {\n\t                this.onEof(token);\n\t                break;\n\t            }\n\t            case TokenType.WHITESPACE_CHARACTER: {\n\t                this.onWhitespaceCharacter(token);\n\t                break;\n\t            }\n\t        }\n\t    }\n\t    //Integration points\n\t    _isIntegrationPoint(tid, element, foreignNS) {\n\t        const ns = this.treeAdapter.getNamespaceURI(element);\n\t        const attrs = this.treeAdapter.getAttrList(element);\n\t        return isIntegrationPoint(tid, ns, attrs, foreignNS);\n\t    }\n\t    //Active formatting elements reconstruction\n\t    _reconstructActiveFormattingElements() {\n\t        const listLength = this.activeFormattingElements.entries.length;\n\t        if (listLength) {\n\t            const endIndex = this.activeFormattingElements.entries.findIndex((entry) => entry.type === EntryType.Marker || this.openElements.contains(entry.element));\n\t            const unopenIdx = endIndex < 0 ? listLength - 1 : endIndex - 1;\n\t            for (let i = unopenIdx; i >= 0; i--) {\n\t                const entry = this.activeFormattingElements.entries[i];\n\t                this._insertElement(entry.token, this.treeAdapter.getNamespaceURI(entry.element));\n\t                entry.element = this.openElements.current;\n\t            }\n\t        }\n\t    }\n\t    //Close elements\n\t    _closeTableCell() {\n\t        this.openElements.generateImpliedEndTags();\n\t        this.openElements.popUntilTableCellPopped();\n\t        this.activeFormattingElements.clearToLastMarker();\n\t        this.insertionMode = InsertionMode.IN_ROW;\n\t    }\n\t    _closePElement() {\n\t        this.openElements.generateImpliedEndTagsWithExclusion(TAG_ID.P);\n\t        this.openElements.popUntilTagNamePopped(TAG_ID.P);\n\t    }\n\t    //Insertion modes\n\t    _resetInsertionMode() {\n\t        for (let i = this.openElements.stackTop; i >= 0; i--) {\n\t            //Insertion mode reset map\n\t            switch (i === 0 && this.fragmentContext ? this.fragmentContextID : this.openElements.tagIDs[i]) {\n\t                case TAG_ID.TR:\n\t                    this.insertionMode = InsertionMode.IN_ROW;\n\t                    return;\n\t                case TAG_ID.TBODY:\n\t                case TAG_ID.THEAD:\n\t                case TAG_ID.TFOOT:\n\t                    this.insertionMode = InsertionMode.IN_TABLE_BODY;\n\t                    return;\n\t                case TAG_ID.CAPTION:\n\t                    this.insertionMode = InsertionMode.IN_CAPTION;\n\t                    return;\n\t                case TAG_ID.COLGROUP:\n\t                    this.insertionMode = InsertionMode.IN_COLUMN_GROUP;\n\t                    return;\n\t                case TAG_ID.TABLE:\n\t                    this.insertionMode = InsertionMode.IN_TABLE;\n\t                    return;\n\t                case TAG_ID.BODY:\n\t                    this.insertionMode = InsertionMode.IN_BODY;\n\t                    return;\n\t                case TAG_ID.FRAMESET:\n\t                    this.insertionMode = InsertionMode.IN_FRAMESET;\n\t                    return;\n\t                case TAG_ID.SELECT:\n\t                    this._resetInsertionModeForSelect(i);\n\t                    return;\n\t                case TAG_ID.TEMPLATE:\n\t                    this.insertionMode = this.tmplInsertionModeStack[0];\n\t                    return;\n\t                case TAG_ID.HTML:\n\t                    this.insertionMode = this.headElement ? InsertionMode.AFTER_HEAD : InsertionMode.BEFORE_HEAD;\n\t                    return;\n\t                case TAG_ID.TD:\n\t                case TAG_ID.TH:\n\t                    if (i > 0) {\n\t                        this.insertionMode = InsertionMode.IN_CELL;\n\t                        return;\n\t                    }\n\t                    break;\n\t                case TAG_ID.HEAD:\n\t                    if (i > 0) {\n\t                        this.insertionMode = InsertionMode.IN_HEAD;\n\t                        return;\n\t                    }\n\t                    break;\n\t            }\n\t        }\n\t        this.insertionMode = InsertionMode.IN_BODY;\n\t    }\n\t    _resetInsertionModeForSelect(selectIdx) {\n\t        if (selectIdx > 0) {\n\t            for (let i = selectIdx - 1; i > 0; i--) {\n\t                const tn = this.openElements.tagIDs[i];\n\t                if (tn === TAG_ID.TEMPLATE) {\n\t                    break;\n\t                }\n\t                else if (tn === TAG_ID.TABLE) {\n\t                    this.insertionMode = InsertionMode.IN_SELECT_IN_TABLE;\n\t                    return;\n\t                }\n\t            }\n\t        }\n\t        this.insertionMode = InsertionMode.IN_SELECT;\n\t    }\n\t    //Foster parenting\n\t    _isElementCausesFosterParenting(tn) {\n\t        return TABLE_STRUCTURE_TAGS.has(tn);\n\t    }\n\t    _shouldFosterParentOnInsertion() {\n\t        return this.fosterParentingEnabled && this._isElementCausesFosterParenting(this.openElements.currentTagId);\n\t    }\n\t    _findFosterParentingLocation() {\n\t        for (let i = this.openElements.stackTop; i >= 0; i--) {\n\t            const openElement = this.openElements.items[i];\n\t            switch (this.openElements.tagIDs[i]) {\n\t                case TAG_ID.TEMPLATE:\n\t                    if (this.treeAdapter.getNamespaceURI(openElement) === NS.HTML) {\n\t                        return { parent: this.treeAdapter.getTemplateContent(openElement), beforeElement: null };\n\t                    }\n\t                    break;\n\t                case TAG_ID.TABLE: {\n\t                    const parent = this.treeAdapter.getParentNode(openElement);\n\t                    if (parent) {\n\t                        return { parent, beforeElement: openElement };\n\t                    }\n\t                    return { parent: this.openElements.items[i - 1], beforeElement: null };\n\t                }\n\t                // Do nothing\n\t            }\n\t        }\n\t        return { parent: this.openElements.items[0], beforeElement: null };\n\t    }\n\t    _fosterParentElement(element) {\n\t        const location = this._findFosterParentingLocation();\n\t        if (location.beforeElement) {\n\t            this.treeAdapter.insertBefore(location.parent, element, location.beforeElement);\n\t        }\n\t        else {\n\t            this.treeAdapter.appendChild(location.parent, element);\n\t        }\n\t    }\n\t    //Special elements\n\t    _isSpecialElement(element, id) {\n\t        const ns = this.treeAdapter.getNamespaceURI(element);\n\t        return SPECIAL_ELEMENTS[ns].has(id);\n\t    }\n\t    onCharacter(token) {\n\t        this.skipNextNewLine = false;\n\t        if (this.tokenizer.inForeignNode) {\n\t            characterInForeignContent(this, token);\n\t            return;\n\t        }\n\t        switch (this.insertionMode) {\n\t            case InsertionMode.INITIAL:\n\t                tokenInInitialMode(this, token);\n\t                break;\n\t            case InsertionMode.BEFORE_HTML:\n\t                tokenBeforeHtml(this, token);\n\t                break;\n\t            case InsertionMode.BEFORE_HEAD:\n\t                tokenBeforeHead(this, token);\n\t                break;\n\t            case InsertionMode.IN_HEAD:\n\t                tokenInHead(this, token);\n\t                break;\n\t            case InsertionMode.IN_HEAD_NO_SCRIPT:\n\t                tokenInHeadNoScript(this, token);\n\t                break;\n\t            case InsertionMode.AFTER_HEAD:\n\t                tokenAfterHead(this, token);\n\t                break;\n\t            case InsertionMode.IN_BODY:\n\t            case InsertionMode.IN_CAPTION:\n\t            case InsertionMode.IN_CELL:\n\t            case InsertionMode.IN_TEMPLATE:\n\t                characterInBody(this, token);\n\t                break;\n\t            case InsertionMode.TEXT:\n\t            case InsertionMode.IN_SELECT:\n\t            case InsertionMode.IN_SELECT_IN_TABLE:\n\t                this._insertCharacters(token);\n\t                break;\n\t            case InsertionMode.IN_TABLE:\n\t            case InsertionMode.IN_TABLE_BODY:\n\t            case InsertionMode.IN_ROW:\n\t                characterInTable(this, token);\n\t                break;\n\t            case InsertionMode.IN_TABLE_TEXT:\n\t                characterInTableText(this, token);\n\t                break;\n\t            case InsertionMode.IN_COLUMN_GROUP:\n\t                tokenInColumnGroup(this, token);\n\t                break;\n\t            case InsertionMode.AFTER_BODY:\n\t                tokenAfterBody(this, token);\n\t                break;\n\t            case InsertionMode.AFTER_AFTER_BODY:\n\t                tokenAfterAfterBody(this, token);\n\t                break;\n\t            // Do nothing\n\t        }\n\t    }\n\t    onNullCharacter(token) {\n\t        this.skipNextNewLine = false;\n\t        if (this.tokenizer.inForeignNode) {\n\t            nullCharacterInForeignContent(this, token);\n\t            return;\n\t        }\n\t        switch (this.insertionMode) {\n\t            case InsertionMode.INITIAL:\n\t                tokenInInitialMode(this, token);\n\t                break;\n\t            case InsertionMode.BEFORE_HTML:\n\t                tokenBeforeHtml(this, token);\n\t                break;\n\t            case InsertionMode.BEFORE_HEAD:\n\t                tokenBeforeHead(this, token);\n\t                break;\n\t            case InsertionMode.IN_HEAD:\n\t                tokenInHead(this, token);\n\t                break;\n\t            case InsertionMode.IN_HEAD_NO_SCRIPT:\n\t                tokenInHeadNoScript(this, token);\n\t                break;\n\t            case InsertionMode.AFTER_HEAD:\n\t                tokenAfterHead(this, token);\n\t                break;\n\t            case InsertionMode.TEXT:\n\t                this._insertCharacters(token);\n\t                break;\n\t            case InsertionMode.IN_TABLE:\n\t            case InsertionMode.IN_TABLE_BODY:\n\t            case InsertionMode.IN_ROW:\n\t                characterInTable(this, token);\n\t                break;\n\t            case InsertionMode.IN_COLUMN_GROUP:\n\t                tokenInColumnGroup(this, token);\n\t                break;\n\t            case InsertionMode.AFTER_BODY:\n\t                tokenAfterBody(this, token);\n\t                break;\n\t            case InsertionMode.AFTER_AFTER_BODY:\n\t                tokenAfterAfterBody(this, token);\n\t                break;\n\t            // Do nothing\n\t        }\n\t    }\n\t    onComment(token) {\n\t        this.skipNextNewLine = false;\n\t        if (this.currentNotInHTML) {\n\t            appendComment(this, token);\n\t            return;\n\t        }\n\t        switch (this.insertionMode) {\n\t            case InsertionMode.INITIAL:\n\t            case InsertionMode.BEFORE_HTML:\n\t            case InsertionMode.BEFORE_HEAD:\n\t            case InsertionMode.IN_HEAD:\n\t            case InsertionMode.IN_HEAD_NO_SCRIPT:\n\t            case InsertionMode.AFTER_HEAD:\n\t            case InsertionMode.IN_BODY:\n\t            case InsertionMode.IN_TABLE:\n\t            case InsertionMode.IN_CAPTION:\n\t            case InsertionMode.IN_COLUMN_GROUP:\n\t            case InsertionMode.IN_TABLE_BODY:\n\t            case InsertionMode.IN_ROW:\n\t            case InsertionMode.IN_CELL:\n\t            case InsertionMode.IN_SELECT:\n\t            case InsertionMode.IN_SELECT_IN_TABLE:\n\t            case InsertionMode.IN_TEMPLATE:\n\t            case InsertionMode.IN_FRAMESET:\n\t            case InsertionMode.AFTER_FRAMESET:\n\t                appendComment(this, token);\n\t                break;\n\t            case InsertionMode.IN_TABLE_TEXT:\n\t                tokenInTableText(this, token);\n\t                break;\n\t            case InsertionMode.AFTER_BODY:\n\t                appendCommentToRootHtmlElement(this, token);\n\t                break;\n\t            case InsertionMode.AFTER_AFTER_BODY:\n\t            case InsertionMode.AFTER_AFTER_FRAMESET:\n\t                appendCommentToDocument(this, token);\n\t                break;\n\t            // Do nothing\n\t        }\n\t    }\n\t    onDoctype(token) {\n\t        this.skipNextNewLine = false;\n\t        switch (this.insertionMode) {\n\t            case InsertionMode.INITIAL:\n\t                doctypeInInitialMode(this, token);\n\t                break;\n\t            case InsertionMode.BEFORE_HEAD:\n\t            case InsertionMode.IN_HEAD:\n\t            case InsertionMode.IN_HEAD_NO_SCRIPT:\n\t            case InsertionMode.AFTER_HEAD:\n\t                this._err(token, ERR.misplacedDoctype);\n\t                break;\n\t            case InsertionMode.IN_TABLE_TEXT:\n\t                tokenInTableText(this, token);\n\t                break;\n\t            // Do nothing\n\t        }\n\t    }\n\t    onStartTag(token) {\n\t        this.skipNextNewLine = false;\n\t        this.currentToken = token;\n\t        this._processStartTag(token);\n\t        if (token.selfClosing && !token.ackSelfClosing) {\n\t            this._err(token, ERR.nonVoidHtmlElementStartTagWithTrailingSolidus);\n\t        }\n\t    }\n\t    /**\n\t     * Processes a given start tag.\n\t     *\n\t     * `onStartTag` checks if a self-closing tag was recognized. When a token\n\t     * is moved inbetween multiple insertion modes, this check for self-closing\n\t     * could lead to false positives. To avoid this, `_processStartTag` is used\n\t     * for nested calls.\n\t     *\n\t     * @param token The token to process.\n\t     */\n\t    _processStartTag(token) {\n\t        if (this.shouldProcessStartTagTokenInForeignContent(token)) {\n\t            startTagInForeignContent(this, token);\n\t        }\n\t        else {\n\t            this._startTagOutsideForeignContent(token);\n\t        }\n\t    }\n\t    _startTagOutsideForeignContent(token) {\n\t        switch (this.insertionMode) {\n\t            case InsertionMode.INITIAL:\n\t                tokenInInitialMode(this, token);\n\t                break;\n\t            case InsertionMode.BEFORE_HTML:\n\t                startTagBeforeHtml(this, token);\n\t                break;\n\t            case InsertionMode.BEFORE_HEAD:\n\t                startTagBeforeHead(this, token);\n\t                break;\n\t            case InsertionMode.IN_HEAD:\n\t                startTagInHead(this, token);\n\t                break;\n\t            case InsertionMode.IN_HEAD_NO_SCRIPT:\n\t                startTagInHeadNoScript(this, token);\n\t                break;\n\t            case InsertionMode.AFTER_HEAD:\n\t                startTagAfterHead(this, token);\n\t                break;\n\t            case InsertionMode.IN_BODY:\n\t                startTagInBody(this, token);\n\t                break;\n\t            case InsertionMode.IN_TABLE:\n\t                startTagInTable(this, token);\n\t                break;\n\t            case InsertionMode.IN_TABLE_TEXT:\n\t                tokenInTableText(this, token);\n\t                break;\n\t            case InsertionMode.IN_CAPTION:\n\t                startTagInCaption(this, token);\n\t                break;\n\t            case InsertionMode.IN_COLUMN_GROUP:\n\t                startTagInColumnGroup(this, token);\n\t                break;\n\t            case InsertionMode.IN_TABLE_BODY:\n\t                startTagInTableBody(this, token);\n\t                break;\n\t            case InsertionMode.IN_ROW:\n\t                startTagInRow(this, token);\n\t                break;\n\t            case InsertionMode.IN_CELL:\n\t                startTagInCell(this, token);\n\t                break;\n\t            case InsertionMode.IN_SELECT:\n\t                startTagInSelect(this, token);\n\t                break;\n\t            case InsertionMode.IN_SELECT_IN_TABLE:\n\t                startTagInSelectInTable(this, token);\n\t                break;\n\t            case InsertionMode.IN_TEMPLATE:\n\t                startTagInTemplate(this, token);\n\t                break;\n\t            case InsertionMode.AFTER_BODY:\n\t                startTagAfterBody(this, token);\n\t                break;\n\t            case InsertionMode.IN_FRAMESET:\n\t                startTagInFrameset(this, token);\n\t                break;\n\t            case InsertionMode.AFTER_FRAMESET:\n\t                startTagAfterFrameset(this, token);\n\t                break;\n\t            case InsertionMode.AFTER_AFTER_BODY:\n\t                startTagAfterAfterBody(this, token);\n\t                break;\n\t            case InsertionMode.AFTER_AFTER_FRAMESET:\n\t                startTagAfterAfterFrameset(this, token);\n\t                break;\n\t            // Do nothing\n\t        }\n\t    }\n\t    onEndTag(token) {\n\t        this.skipNextNewLine = false;\n\t        this.currentToken = token;\n\t        if (this.currentNotInHTML) {\n\t            endTagInForeignContent(this, token);\n\t        }\n\t        else {\n\t            this._endTagOutsideForeignContent(token);\n\t        }\n\t    }\n\t    _endTagOutsideForeignContent(token) {\n\t        switch (this.insertionMode) {\n\t            case InsertionMode.INITIAL:\n\t                tokenInInitialMode(this, token);\n\t                break;\n\t            case InsertionMode.BEFORE_HTML:\n\t                endTagBeforeHtml(this, token);\n\t                break;\n\t            case InsertionMode.BEFORE_HEAD:\n\t                endTagBeforeHead(this, token);\n\t                break;\n\t            case InsertionMode.IN_HEAD:\n\t                endTagInHead(this, token);\n\t                break;\n\t            case InsertionMode.IN_HEAD_NO_SCRIPT:\n\t                endTagInHeadNoScript(this, token);\n\t                break;\n\t            case InsertionMode.AFTER_HEAD:\n\t                endTagAfterHead(this, token);\n\t                break;\n\t            case InsertionMode.IN_BODY:\n\t                endTagInBody(this, token);\n\t                break;\n\t            case InsertionMode.TEXT:\n\t                endTagInText(this, token);\n\t                break;\n\t            case InsertionMode.IN_TABLE:\n\t                endTagInTable(this, token);\n\t                break;\n\t            case InsertionMode.IN_TABLE_TEXT:\n\t                tokenInTableText(this, token);\n\t                break;\n\t            case InsertionMode.IN_CAPTION:\n\t                endTagInCaption(this, token);\n\t                break;\n\t            case InsertionMode.IN_COLUMN_GROUP:\n\t                endTagInColumnGroup(this, token);\n\t                break;\n\t            case InsertionMode.IN_TABLE_BODY:\n\t                endTagInTableBody(this, token);\n\t                break;\n\t            case InsertionMode.IN_ROW:\n\t                endTagInRow(this, token);\n\t                break;\n\t            case InsertionMode.IN_CELL:\n\t                endTagInCell(this, token);\n\t                break;\n\t            case InsertionMode.IN_SELECT:\n\t                endTagInSelect(this, token);\n\t                break;\n\t            case InsertionMode.IN_SELECT_IN_TABLE:\n\t                endTagInSelectInTable(this, token);\n\t                break;\n\t            case InsertionMode.IN_TEMPLATE:\n\t                endTagInTemplate(this, token);\n\t                break;\n\t            case InsertionMode.AFTER_BODY:\n\t                endTagAfterBody(this, token);\n\t                break;\n\t            case InsertionMode.IN_FRAMESET:\n\t                endTagInFrameset(this, token);\n\t                break;\n\t            case InsertionMode.AFTER_FRAMESET:\n\t                endTagAfterFrameset(this, token);\n\t                break;\n\t            case InsertionMode.AFTER_AFTER_BODY:\n\t                tokenAfterAfterBody(this, token);\n\t                break;\n\t            // Do nothing\n\t        }\n\t    }\n\t    onEof(token) {\n\t        switch (this.insertionMode) {\n\t            case InsertionMode.INITIAL:\n\t                tokenInInitialMode(this, token);\n\t                break;\n\t            case InsertionMode.BEFORE_HTML:\n\t                tokenBeforeHtml(this, token);\n\t                break;\n\t            case InsertionMode.BEFORE_HEAD:\n\t                tokenBeforeHead(this, token);\n\t                break;\n\t            case InsertionMode.IN_HEAD:\n\t                tokenInHead(this, token);\n\t                break;\n\t            case InsertionMode.IN_HEAD_NO_SCRIPT:\n\t                tokenInHeadNoScript(this, token);\n\t                break;\n\t            case InsertionMode.AFTER_HEAD:\n\t                tokenAfterHead(this, token);\n\t                break;\n\t            case InsertionMode.IN_BODY:\n\t            case InsertionMode.IN_TABLE:\n\t            case InsertionMode.IN_CAPTION:\n\t            case InsertionMode.IN_COLUMN_GROUP:\n\t            case InsertionMode.IN_TABLE_BODY:\n\t            case InsertionMode.IN_ROW:\n\t            case InsertionMode.IN_CELL:\n\t            case InsertionMode.IN_SELECT:\n\t            case InsertionMode.IN_SELECT_IN_TABLE:\n\t                eofInBody(this, token);\n\t                break;\n\t            case InsertionMode.TEXT:\n\t                eofInText(this, token);\n\t                break;\n\t            case InsertionMode.IN_TABLE_TEXT:\n\t                tokenInTableText(this, token);\n\t                break;\n\t            case InsertionMode.IN_TEMPLATE:\n\t                eofInTemplate(this, token);\n\t                break;\n\t            case InsertionMode.AFTER_BODY:\n\t            case InsertionMode.IN_FRAMESET:\n\t            case InsertionMode.AFTER_FRAMESET:\n\t            case InsertionMode.AFTER_AFTER_BODY:\n\t            case InsertionMode.AFTER_AFTER_FRAMESET:\n\t                stopParsing(this, token);\n\t                break;\n\t            // Do nothing\n\t        }\n\t    }\n\t    onWhitespaceCharacter(token) {\n\t        if (this.skipNextNewLine) {\n\t            this.skipNextNewLine = false;\n\t            if (token.chars.charCodeAt(0) === CODE_POINTS.LINE_FEED) {\n\t                if (token.chars.length === 1) {\n\t                    return;\n\t                }\n\t                token.chars = token.chars.substr(1);\n\t            }\n\t        }\n\t        if (this.tokenizer.inForeignNode) {\n\t            this._insertCharacters(token);\n\t            return;\n\t        }\n\t        switch (this.insertionMode) {\n\t            case InsertionMode.IN_HEAD:\n\t            case InsertionMode.IN_HEAD_NO_SCRIPT:\n\t            case InsertionMode.AFTER_HEAD:\n\t            case InsertionMode.TEXT:\n\t            case InsertionMode.IN_COLUMN_GROUP:\n\t            case InsertionMode.IN_SELECT:\n\t            case InsertionMode.IN_SELECT_IN_TABLE:\n\t            case InsertionMode.IN_FRAMESET:\n\t            case InsertionMode.AFTER_FRAMESET:\n\t                this._insertCharacters(token);\n\t                break;\n\t            case InsertionMode.IN_BODY:\n\t            case InsertionMode.IN_CAPTION:\n\t            case InsertionMode.IN_CELL:\n\t            case InsertionMode.IN_TEMPLATE:\n\t            case InsertionMode.AFTER_BODY:\n\t            case InsertionMode.AFTER_AFTER_BODY:\n\t            case InsertionMode.AFTER_AFTER_FRAMESET:\n\t                whitespaceCharacterInBody(this, token);\n\t                break;\n\t            case InsertionMode.IN_TABLE:\n\t            case InsertionMode.IN_TABLE_BODY:\n\t            case InsertionMode.IN_ROW:\n\t                characterInTable(this, token);\n\t                break;\n\t            case InsertionMode.IN_TABLE_TEXT:\n\t                whitespaceCharacterInTableText(this, token);\n\t                break;\n\t            // Do nothing\n\t        }\n\t    }\n\t}\n\t//Adoption agency algorithm\n\t//(see: http://www.whatwg.org/specs/web-apps/current-work/multipage/tree-construction.html#adoptionAgency)\n\t//------------------------------------------------------------------\n\t//Steps 5-8 of the algorithm\n\tfunction aaObtainFormattingElementEntry(p, token) {\n\t    let formattingElementEntry = p.activeFormattingElements.getElementEntryInScopeWithTagName(token.tagName);\n\t    if (formattingElementEntry) {\n\t        if (!p.openElements.contains(formattingElementEntry.element)) {\n\t            p.activeFormattingElements.removeEntry(formattingElementEntry);\n\t            formattingElementEntry = null;\n\t        }\n\t        else if (!p.openElements.hasInScope(token.tagID)) {\n\t            formattingElementEntry = null;\n\t        }\n\t    }\n\t    else {\n\t        genericEndTagInBody(p, token);\n\t    }\n\t    return formattingElementEntry;\n\t}\n\t//Steps 9 and 10 of the algorithm\n\tfunction aaObtainFurthestBlock(p, formattingElementEntry) {\n\t    let furthestBlock = null;\n\t    let idx = p.openElements.stackTop;\n\t    for (; idx >= 0; idx--) {\n\t        const element = p.openElements.items[idx];\n\t        if (element === formattingElementEntry.element) {\n\t            break;\n\t        }\n\t        if (p._isSpecialElement(element, p.openElements.tagIDs[idx])) {\n\t            furthestBlock = element;\n\t        }\n\t    }\n\t    if (!furthestBlock) {\n\t        p.openElements.shortenToLength(idx < 0 ? 0 : idx);\n\t        p.activeFormattingElements.removeEntry(formattingElementEntry);\n\t    }\n\t    return furthestBlock;\n\t}\n\t//Step 13 of the algorithm\n\tfunction aaInnerLoop(p, furthestBlock, formattingElement) {\n\t    let lastElement = furthestBlock;\n\t    let nextElement = p.openElements.getCommonAncestor(furthestBlock);\n\t    for (let i = 0, element = nextElement; element !== formattingElement; i++, element = nextElement) {\n\t        //NOTE: store the next element for the next loop iteration (it may be deleted from the stack by step 9.5)\n\t        nextElement = p.openElements.getCommonAncestor(element);\n\t        const elementEntry = p.activeFormattingElements.getElementEntry(element);\n\t        const counterOverflow = elementEntry && i >= AA_INNER_LOOP_ITER;\n\t        const shouldRemoveFromOpenElements = !elementEntry || counterOverflow;\n\t        if (shouldRemoveFromOpenElements) {\n\t            if (counterOverflow) {\n\t                p.activeFormattingElements.removeEntry(elementEntry);\n\t            }\n\t            p.openElements.remove(element);\n\t        }\n\t        else {\n\t            element = aaRecreateElementFromEntry(p, elementEntry);\n\t            if (lastElement === furthestBlock) {\n\t                p.activeFormattingElements.bookmark = elementEntry;\n\t            }\n\t            p.treeAdapter.detachNode(lastElement);\n\t            p.treeAdapter.appendChild(element, lastElement);\n\t            lastElement = element;\n\t        }\n\t    }\n\t    return lastElement;\n\t}\n\t//Step 13.7 of the algorithm\n\tfunction aaRecreateElementFromEntry(p, elementEntry) {\n\t    const ns = p.treeAdapter.getNamespaceURI(elementEntry.element);\n\t    const newElement = p.treeAdapter.createElement(elementEntry.token.tagName, ns, elementEntry.token.attrs);\n\t    p.openElements.replace(elementEntry.element, newElement);\n\t    elementEntry.element = newElement;\n\t    return newElement;\n\t}\n\t//Step 14 of the algorithm\n\tfunction aaInsertLastNodeInCommonAncestor(p, commonAncestor, lastElement) {\n\t    const tn = p.treeAdapter.getTagName(commonAncestor);\n\t    const tid = getTagID(tn);\n\t    if (p._isElementCausesFosterParenting(tid)) {\n\t        p._fosterParentElement(lastElement);\n\t    }\n\t    else {\n\t        const ns = p.treeAdapter.getNamespaceURI(commonAncestor);\n\t        if (tid === TAG_ID.TEMPLATE && ns === NS.HTML) {\n\t            commonAncestor = p.treeAdapter.getTemplateContent(commonAncestor);\n\t        }\n\t        p.treeAdapter.appendChild(commonAncestor, lastElement);\n\t    }\n\t}\n\t//Steps 15-19 of the algorithm\n\tfunction aaReplaceFormattingElement(p, furthestBlock, formattingElementEntry) {\n\t    const ns = p.treeAdapter.getNamespaceURI(formattingElementEntry.element);\n\t    const { token } = formattingElementEntry;\n\t    const newElement = p.treeAdapter.createElement(token.tagName, ns, token.attrs);\n\t    p._adoptNodes(furthestBlock, newElement);\n\t    p.treeAdapter.appendChild(furthestBlock, newElement);\n\t    p.activeFormattingElements.insertElementAfterBookmark(newElement, token);\n\t    p.activeFormattingElements.removeEntry(formattingElementEntry);\n\t    p.openElements.remove(formattingElementEntry.element);\n\t    p.openElements.insertAfter(furthestBlock, newElement, token.tagID);\n\t}\n\t//Algorithm entry point\n\tfunction callAdoptionAgency(p, token) {\n\t    for (let i = 0; i < AA_OUTER_LOOP_ITER; i++) {\n\t        const formattingElementEntry = aaObtainFormattingElementEntry(p, token);\n\t        if (!formattingElementEntry) {\n\t            break;\n\t        }\n\t        const furthestBlock = aaObtainFurthestBlock(p, formattingElementEntry);\n\t        if (!furthestBlock) {\n\t            break;\n\t        }\n\t        p.activeFormattingElements.bookmark = formattingElementEntry;\n\t        const lastElement = aaInnerLoop(p, furthestBlock, formattingElementEntry.element);\n\t        const commonAncestor = p.openElements.getCommonAncestor(formattingElementEntry.element);\n\t        p.treeAdapter.detachNode(lastElement);\n\t        if (commonAncestor)\n\t            aaInsertLastNodeInCommonAncestor(p, commonAncestor, lastElement);\n\t        aaReplaceFormattingElement(p, furthestBlock, formattingElementEntry);\n\t    }\n\t}\n\t//Generic token handlers\n\t//------------------------------------------------------------------\n\tfunction appendComment(p, token) {\n\t    p._appendCommentNode(token, p.openElements.currentTmplContentOrNode);\n\t}\n\tfunction appendCommentToRootHtmlElement(p, token) {\n\t    p._appendCommentNode(token, p.openElements.items[0]);\n\t}\n\tfunction appendCommentToDocument(p, token) {\n\t    p._appendCommentNode(token, p.document);\n\t}\n\tfunction stopParsing(p, token) {\n\t    p.stopped = true;\n\t    // NOTE: Set end locations for elements that remain on the open element stack.\n\t    if (token.location) {\n\t        // NOTE: If we are not in a fragment, `html` and `body` will stay on the stack.\n\t        // This is a problem, as we might overwrite their end position here.\n\t        const target = p.fragmentContext ? 0 : 2;\n\t        for (let i = p.openElements.stackTop; i >= target; i--) {\n\t            p._setEndLocation(p.openElements.items[i], token);\n\t        }\n\t        // Handle `html` and `body`\n\t        if (!p.fragmentContext && p.openElements.stackTop >= 0) {\n\t            const htmlElement = p.openElements.items[0];\n\t            const htmlLocation = p.treeAdapter.getNodeSourceCodeLocation(htmlElement);\n\t            if (htmlLocation && !htmlLocation.endTag) {\n\t                p._setEndLocation(htmlElement, token);\n\t                if (p.openElements.stackTop >= 1) {\n\t                    const bodyElement = p.openElements.items[1];\n\t                    const bodyLocation = p.treeAdapter.getNodeSourceCodeLocation(bodyElement);\n\t                    if (bodyLocation && !bodyLocation.endTag) {\n\t                        p._setEndLocation(bodyElement, token);\n\t                    }\n\t                }\n\t            }\n\t        }\n\t    }\n\t}\n\t// The \"initial\" insertion mode\n\t//------------------------------------------------------------------\n\tfunction doctypeInInitialMode(p, token) {\n\t    p._setDocumentType(token);\n\t    const mode = token.forceQuirks ? DOCUMENT_MODE.QUIRKS : getDocumentMode(token);\n\t    if (!isConforming(token)) {\n\t        p._err(token, ERR.nonConformingDoctype);\n\t    }\n\t    p.treeAdapter.setDocumentMode(p.document, mode);\n\t    p.insertionMode = InsertionMode.BEFORE_HTML;\n\t}\n\tfunction tokenInInitialMode(p, token) {\n\t    p._err(token, ERR.missingDoctype, true);\n\t    p.treeAdapter.setDocumentMode(p.document, DOCUMENT_MODE.QUIRKS);\n\t    p.insertionMode = InsertionMode.BEFORE_HTML;\n\t    p._processToken(token);\n\t}\n\t// The \"before html\" insertion mode\n\t//------------------------------------------------------------------\n\tfunction startTagBeforeHtml(p, token) {\n\t    if (token.tagID === TAG_ID.HTML) {\n\t        p._insertElement(token, NS.HTML);\n\t        p.insertionMode = InsertionMode.BEFORE_HEAD;\n\t    }\n\t    else {\n\t        tokenBeforeHtml(p, token);\n\t    }\n\t}\n\tfunction endTagBeforeHtml(p, token) {\n\t    const tn = token.tagID;\n\t    if (tn === TAG_ID.HTML || tn === TAG_ID.HEAD || tn === TAG_ID.BODY || tn === TAG_ID.BR) {\n\t        tokenBeforeHtml(p, token);\n\t    }\n\t}\n\tfunction tokenBeforeHtml(p, token) {\n\t    p._insertFakeRootElement();\n\t    p.insertionMode = InsertionMode.BEFORE_HEAD;\n\t    p._processToken(token);\n\t}\n\t// The \"before head\" insertion mode\n\t//------------------------------------------------------------------\n\tfunction startTagBeforeHead(p, token) {\n\t    switch (token.tagID) {\n\t        case TAG_ID.HTML: {\n\t            startTagInBody(p, token);\n\t            break;\n\t        }\n\t        case TAG_ID.HEAD: {\n\t            p._insertElement(token, NS.HTML);\n\t            p.headElement = p.openElements.current;\n\t            p.insertionMode = InsertionMode.IN_HEAD;\n\t            break;\n\t        }\n\t        default: {\n\t            tokenBeforeHead(p, token);\n\t        }\n\t    }\n\t}\n\tfunction endTagBeforeHead(p, token) {\n\t    const tn = token.tagID;\n\t    if (tn === TAG_ID.HEAD || tn === TAG_ID.BODY || tn === TAG_ID.HTML || tn === TAG_ID.BR) {\n\t        tokenBeforeHead(p, token);\n\t    }\n\t    else {\n\t        p._err(token, ERR.endTagWithoutMatchingOpenElement);\n\t    }\n\t}\n\tfunction tokenBeforeHead(p, token) {\n\t    p._insertFakeElement(TAG_NAMES.HEAD, TAG_ID.HEAD);\n\t    p.headElement = p.openElements.current;\n\t    p.insertionMode = InsertionMode.IN_HEAD;\n\t    p._processToken(token);\n\t}\n\t// The \"in head\" insertion mode\n\t//------------------------------------------------------------------\n\tfunction startTagInHead(p, token) {\n\t    switch (token.tagID) {\n\t        case TAG_ID.HTML: {\n\t            startTagInBody(p, token);\n\t            break;\n\t        }\n\t        case TAG_ID.BASE:\n\t        case TAG_ID.BASEFONT:\n\t        case TAG_ID.BGSOUND:\n\t        case TAG_ID.LINK:\n\t        case TAG_ID.META: {\n\t            p._appendElement(token, NS.HTML);\n\t            token.ackSelfClosing = true;\n\t            break;\n\t        }\n\t        case TAG_ID.TITLE: {\n\t            p._switchToTextParsing(token, TokenizerMode.RCDATA);\n\t            break;\n\t        }\n\t        case TAG_ID.NOSCRIPT: {\n\t            if (p.options.scriptingEnabled) {\n\t                p._switchToTextParsing(token, TokenizerMode.RAWTEXT);\n\t            }\n\t            else {\n\t                p._insertElement(token, NS.HTML);\n\t                p.insertionMode = InsertionMode.IN_HEAD_NO_SCRIPT;\n\t            }\n\t            break;\n\t        }\n\t        case TAG_ID.NOFRAMES:\n\t        case TAG_ID.STYLE: {\n\t            p._switchToTextParsing(token, TokenizerMode.RAWTEXT);\n\t            break;\n\t        }\n\t        case TAG_ID.SCRIPT: {\n\t            p._switchToTextParsing(token, TokenizerMode.SCRIPT_DATA);\n\t            break;\n\t        }\n\t        case TAG_ID.TEMPLATE: {\n\t            p._insertTemplate(token);\n\t            p.activeFormattingElements.insertMarker();\n\t            p.framesetOk = false;\n\t            p.insertionMode = InsertionMode.IN_TEMPLATE;\n\t            p.tmplInsertionModeStack.unshift(InsertionMode.IN_TEMPLATE);\n\t            break;\n\t        }\n\t        case TAG_ID.HEAD: {\n\t            p._err(token, ERR.misplacedStartTagForHeadElement);\n\t            break;\n\t        }\n\t        default: {\n\t            tokenInHead(p, token);\n\t        }\n\t    }\n\t}\n\tfunction endTagInHead(p, token) {\n\t    switch (token.tagID) {\n\t        case TAG_ID.HEAD: {\n\t            p.openElements.pop();\n\t            p.insertionMode = InsertionMode.AFTER_HEAD;\n\t            break;\n\t        }\n\t        case TAG_ID.BODY:\n\t        case TAG_ID.BR:\n\t        case TAG_ID.HTML: {\n\t            tokenInHead(p, token);\n\t            break;\n\t        }\n\t        case TAG_ID.TEMPLATE: {\n\t            if (p.openElements.tmplCount > 0) {\n\t                p.openElements.generateImpliedEndTagsThoroughly();\n\t                if (p.openElements.currentTagId !== TAG_ID.TEMPLATE) {\n\t                    p._err(token, ERR.closingOfElementWithOpenChildElements);\n\t                }\n\t                p.openElements.popUntilTagNamePopped(TAG_ID.TEMPLATE);\n\t                p.activeFormattingElements.clearToLastMarker();\n\t                p.tmplInsertionModeStack.shift();\n\t                p._resetInsertionMode();\n\t            }\n\t            else {\n\t                p._err(token, ERR.endTagWithoutMatchingOpenElement);\n\t            }\n\t            break;\n\t        }\n\t        default: {\n\t            p._err(token, ERR.endTagWithoutMatchingOpenElement);\n\t        }\n\t    }\n\t}\n\tfunction tokenInHead(p, token) {\n\t    p.openElements.pop();\n\t    p.insertionMode = InsertionMode.AFTER_HEAD;\n\t    p._processToken(token);\n\t}\n\t// The \"in head no script\" insertion mode\n\t//------------------------------------------------------------------\n\tfunction startTagInHeadNoScript(p, token) {\n\t    switch (token.tagID) {\n\t        case TAG_ID.HTML: {\n\t            startTagInBody(p, token);\n\t            break;\n\t        }\n\t        case TAG_ID.BASEFONT:\n\t        case TAG_ID.BGSOUND:\n\t        case TAG_ID.HEAD:\n\t        case TAG_ID.LINK:\n\t        case TAG_ID.META:\n\t        case TAG_ID.NOFRAMES:\n\t        case TAG_ID.STYLE: {\n\t            startTagInHead(p, token);\n\t            break;\n\t        }\n\t        case TAG_ID.NOSCRIPT: {\n\t            p._err(token, ERR.nestedNoscriptInHead);\n\t            break;\n\t        }\n\t        default: {\n\t            tokenInHeadNoScript(p, token);\n\t        }\n\t    }\n\t}\n\tfunction endTagInHeadNoScript(p, token) {\n\t    switch (token.tagID) {\n\t        case TAG_ID.NOSCRIPT: {\n\t            p.openElements.pop();\n\t            p.insertionMode = InsertionMode.IN_HEAD;\n\t            break;\n\t        }\n\t        case TAG_ID.BR: {\n\t            tokenInHeadNoScript(p, token);\n\t            break;\n\t        }\n\t        default: {\n\t            p._err(token, ERR.endTagWithoutMatchingOpenElement);\n\t        }\n\t    }\n\t}\n\tfunction tokenInHeadNoScript(p, token) {\n\t    const errCode = token.type === TokenType.EOF ? ERR.openElementsLeftAfterEof : ERR.disallowedContentInNoscriptInHead;\n\t    p._err(token, errCode);\n\t    p.openElements.pop();\n\t    p.insertionMode = InsertionMode.IN_HEAD;\n\t    p._processToken(token);\n\t}\n\t// The \"after head\" insertion mode\n\t//------------------------------------------------------------------\n\tfunction startTagAfterHead(p, token) {\n\t    switch (token.tagID) {\n\t        case TAG_ID.HTML: {\n\t            startTagInBody(p, token);\n\t            break;\n\t        }\n\t        case TAG_ID.BODY: {\n\t            p._insertElement(token, NS.HTML);\n\t            p.framesetOk = false;\n\t            p.insertionMode = InsertionMode.IN_BODY;\n\t            break;\n\t        }\n\t        case TAG_ID.FRAMESET: {\n\t            p._insertElement(token, NS.HTML);\n\t            p.insertionMode = InsertionMode.IN_FRAMESET;\n\t            break;\n\t        }\n\t        case TAG_ID.BASE:\n\t        case TAG_ID.BASEFONT:\n\t        case TAG_ID.BGSOUND:\n\t        case TAG_ID.LINK:\n\t        case TAG_ID.META:\n\t        case TAG_ID.NOFRAMES:\n\t        case TAG_ID.SCRIPT:\n\t        case TAG_ID.STYLE:\n\t        case TAG_ID.TEMPLATE:\n\t        case TAG_ID.TITLE: {\n\t            p._err(token, ERR.abandonedHeadElementChild);\n\t            p.openElements.push(p.headElement, TAG_ID.HEAD);\n\t            startTagInHead(p, token);\n\t            p.openElements.remove(p.headElement);\n\t            break;\n\t        }\n\t        case TAG_ID.HEAD: {\n\t            p._err(token, ERR.misplacedStartTagForHeadElement);\n\t            break;\n\t        }\n\t        default: {\n\t            tokenAfterHead(p, token);\n\t        }\n\t    }\n\t}\n\tfunction endTagAfterHead(p, token) {\n\t    switch (token.tagID) {\n\t        case TAG_ID.BODY:\n\t        case TAG_ID.HTML:\n\t        case TAG_ID.BR: {\n\t            tokenAfterHead(p, token);\n\t            break;\n\t        }\n\t        case TAG_ID.TEMPLATE: {\n\t            endTagInHead(p, token);\n\t            break;\n\t        }\n\t        default: {\n\t            p._err(token, ERR.endTagWithoutMatchingOpenElement);\n\t        }\n\t    }\n\t}\n\tfunction tokenAfterHead(p, token) {\n\t    p._insertFakeElement(TAG_NAMES.BODY, TAG_ID.BODY);\n\t    p.insertionMode = InsertionMode.IN_BODY;\n\t    modeInBody(p, token);\n\t}\n\t// The \"in body\" insertion mode\n\t//------------------------------------------------------------------\n\tfunction modeInBody(p, token) {\n\t    switch (token.type) {\n\t        case TokenType.CHARACTER: {\n\t            characterInBody(p, token);\n\t            break;\n\t        }\n\t        case TokenType.WHITESPACE_CHARACTER: {\n\t            whitespaceCharacterInBody(p, token);\n\t            break;\n\t        }\n\t        case TokenType.COMMENT: {\n\t            appendComment(p, token);\n\t            break;\n\t        }\n\t        case TokenType.START_TAG: {\n\t            startTagInBody(p, token);\n\t            break;\n\t        }\n\t        case TokenType.END_TAG: {\n\t            endTagInBody(p, token);\n\t            break;\n\t        }\n\t        case TokenType.EOF: {\n\t            eofInBody(p, token);\n\t            break;\n\t        }\n\t        // Do nothing\n\t    }\n\t}\n\tfunction whitespaceCharacterInBody(p, token) {\n\t    p._reconstructActiveFormattingElements();\n\t    p._insertCharacters(token);\n\t}\n\tfunction characterInBody(p, token) {\n\t    p._reconstructActiveFormattingElements();\n\t    p._insertCharacters(token);\n\t    p.framesetOk = false;\n\t}\n\tfunction htmlStartTagInBody(p, token) {\n\t    if (p.openElements.tmplCount === 0) {\n\t        p.treeAdapter.adoptAttributes(p.openElements.items[0], token.attrs);\n\t    }\n\t}\n\tfunction bodyStartTagInBody(p, token) {\n\t    const bodyElement = p.openElements.tryPeekProperlyNestedBodyElement();\n\t    if (bodyElement && p.openElements.tmplCount === 0) {\n\t        p.framesetOk = false;\n\t        p.treeAdapter.adoptAttributes(bodyElement, token.attrs);\n\t    }\n\t}\n\tfunction framesetStartTagInBody(p, token) {\n\t    const bodyElement = p.openElements.tryPeekProperlyNestedBodyElement();\n\t    if (p.framesetOk && bodyElement) {\n\t        p.treeAdapter.detachNode(bodyElement);\n\t        p.openElements.popAllUpToHtmlElement();\n\t        p._insertElement(token, NS.HTML);\n\t        p.insertionMode = InsertionMode.IN_FRAMESET;\n\t    }\n\t}\n\tfunction addressStartTagInBody(p, token) {\n\t    if (p.openElements.hasInButtonScope(TAG_ID.P)) {\n\t        p._closePElement();\n\t    }\n\t    p._insertElement(token, NS.HTML);\n\t}\n\tfunction numberedHeaderStartTagInBody(p, token) {\n\t    if (p.openElements.hasInButtonScope(TAG_ID.P)) {\n\t        p._closePElement();\n\t    }\n\t    if (isNumberedHeader(p.openElements.currentTagId)) {\n\t        p.openElements.pop();\n\t    }\n\t    p._insertElement(token, NS.HTML);\n\t}\n\tfunction preStartTagInBody(p, token) {\n\t    if (p.openElements.hasInButtonScope(TAG_ID.P)) {\n\t        p._closePElement();\n\t    }\n\t    p._insertElement(token, NS.HTML);\n\t    //NOTE: If the next token is a U+000A LINE FEED (LF) character token, then ignore that token and move\n\t    //on to the next one. (Newlines at the start of pre blocks are ignored as an authoring convenience.)\n\t    p.skipNextNewLine = true;\n\t    p.framesetOk = false;\n\t}\n\tfunction formStartTagInBody(p, token) {\n\t    const inTemplate = p.openElements.tmplCount > 0;\n\t    if (!p.formElement || inTemplate) {\n\t        if (p.openElements.hasInButtonScope(TAG_ID.P)) {\n\t            p._closePElement();\n\t        }\n\t        p._insertElement(token, NS.HTML);\n\t        if (!inTemplate) {\n\t            p.formElement = p.openElements.current;\n\t        }\n\t    }\n\t}\n\tfunction listItemStartTagInBody(p, token) {\n\t    p.framesetOk = false;\n\t    const tn = token.tagID;\n\t    for (let i = p.openElements.stackTop; i >= 0; i--) {\n\t        const elementId = p.openElements.tagIDs[i];\n\t        if ((tn === TAG_ID.LI && elementId === TAG_ID.LI) ||\n\t            ((tn === TAG_ID.DD || tn === TAG_ID.DT) && (elementId === TAG_ID.DD || elementId === TAG_ID.DT))) {\n\t            p.openElements.generateImpliedEndTagsWithExclusion(elementId);\n\t            p.openElements.popUntilTagNamePopped(elementId);\n\t            break;\n\t        }\n\t        if (elementId !== TAG_ID.ADDRESS &&\n\t            elementId !== TAG_ID.DIV &&\n\t            elementId !== TAG_ID.P &&\n\t            p._isSpecialElement(p.openElements.items[i], elementId)) {\n\t            break;\n\t        }\n\t    }\n\t    if (p.openElements.hasInButtonScope(TAG_ID.P)) {\n\t        p._closePElement();\n\t    }\n\t    p._insertElement(token, NS.HTML);\n\t}\n\tfunction plaintextStartTagInBody(p, token) {\n\t    if (p.openElements.hasInButtonScope(TAG_ID.P)) {\n\t        p._closePElement();\n\t    }\n\t    p._insertElement(token, NS.HTML);\n\t    p.tokenizer.state = TokenizerMode.PLAINTEXT;\n\t}\n\tfunction buttonStartTagInBody(p, token) {\n\t    if (p.openElements.hasInScope(TAG_ID.BUTTON)) {\n\t        p.openElements.generateImpliedEndTags();\n\t        p.openElements.popUntilTagNamePopped(TAG_ID.BUTTON);\n\t    }\n\t    p._reconstructActiveFormattingElements();\n\t    p._insertElement(token, NS.HTML);\n\t    p.framesetOk = false;\n\t}\n\tfunction aStartTagInBody(p, token) {\n\t    const activeElementEntry = p.activeFormattingElements.getElementEntryInScopeWithTagName(TAG_NAMES.A);\n\t    if (activeElementEntry) {\n\t        callAdoptionAgency(p, token);\n\t        p.openElements.remove(activeElementEntry.element);\n\t        p.activeFormattingElements.removeEntry(activeElementEntry);\n\t    }\n\t    p._reconstructActiveFormattingElements();\n\t    p._insertElement(token, NS.HTML);\n\t    p.activeFormattingElements.pushElement(p.openElements.current, token);\n\t}\n\tfunction bStartTagInBody(p, token) {\n\t    p._reconstructActiveFormattingElements();\n\t    p._insertElement(token, NS.HTML);\n\t    p.activeFormattingElements.pushElement(p.openElements.current, token);\n\t}\n\tfunction nobrStartTagInBody(p, token) {\n\t    p._reconstructActiveFormattingElements();\n\t    if (p.openElements.hasInScope(TAG_ID.NOBR)) {\n\t        callAdoptionAgency(p, token);\n\t        p._reconstructActiveFormattingElements();\n\t    }\n\t    p._insertElement(token, NS.HTML);\n\t    p.activeFormattingElements.pushElement(p.openElements.current, token);\n\t}\n\tfunction appletStartTagInBody(p, token) {\n\t    p._reconstructActiveFormattingElements();\n\t    p._insertElement(token, NS.HTML);\n\t    p.activeFormattingElements.insertMarker();\n\t    p.framesetOk = false;\n\t}\n\tfunction tableStartTagInBody(p, token) {\n\t    if (p.treeAdapter.getDocumentMode(p.document) !== DOCUMENT_MODE.QUIRKS && p.openElements.hasInButtonScope(TAG_ID.P)) {\n\t        p._closePElement();\n\t    }\n\t    p._insertElement(token, NS.HTML);\n\t    p.framesetOk = false;\n\t    p.insertionMode = InsertionMode.IN_TABLE;\n\t}\n\tfunction areaStartTagInBody(p, token) {\n\t    p._reconstructActiveFormattingElements();\n\t    p._appendElement(token, NS.HTML);\n\t    p.framesetOk = false;\n\t    token.ackSelfClosing = true;\n\t}\n\tfunction isHiddenInput(token) {\n\t    const inputType = getTokenAttr(token, ATTRS.TYPE);\n\t    return inputType != null && inputType.toLowerCase() === HIDDEN_INPUT_TYPE;\n\t}\n\tfunction inputStartTagInBody(p, token) {\n\t    p._reconstructActiveFormattingElements();\n\t    p._appendElement(token, NS.HTML);\n\t    if (!isHiddenInput(token)) {\n\t        p.framesetOk = false;\n\t    }\n\t    token.ackSelfClosing = true;\n\t}\n\tfunction paramStartTagInBody(p, token) {\n\t    p._appendElement(token, NS.HTML);\n\t    token.ackSelfClosing = true;\n\t}\n\tfunction hrStartTagInBody(p, token) {\n\t    if (p.openElements.hasInButtonScope(TAG_ID.P)) {\n\t        p._closePElement();\n\t    }\n\t    p._appendElement(token, NS.HTML);\n\t    p.framesetOk = false;\n\t    token.ackSelfClosing = true;\n\t}\n\tfunction imageStartTagInBody(p, token) {\n\t    token.tagName = TAG_NAMES.IMG;\n\t    token.tagID = TAG_ID.IMG;\n\t    areaStartTagInBody(p, token);\n\t}\n\tfunction textareaStartTagInBody(p, token) {\n\t    p._insertElement(token, NS.HTML);\n\t    //NOTE: If the next token is a U+000A LINE FEED (LF) character token, then ignore that token and move\n\t    //on to the next one. (Newlines at the start of textarea elements are ignored as an authoring convenience.)\n\t    p.skipNextNewLine = true;\n\t    p.tokenizer.state = TokenizerMode.RCDATA;\n\t    p.originalInsertionMode = p.insertionMode;\n\t    p.framesetOk = false;\n\t    p.insertionMode = InsertionMode.TEXT;\n\t}\n\tfunction xmpStartTagInBody(p, token) {\n\t    if (p.openElements.hasInButtonScope(TAG_ID.P)) {\n\t        p._closePElement();\n\t    }\n\t    p._reconstructActiveFormattingElements();\n\t    p.framesetOk = false;\n\t    p._switchToTextParsing(token, TokenizerMode.RAWTEXT);\n\t}\n\tfunction iframeStartTagInBody(p, token) {\n\t    p.framesetOk = false;\n\t    p._switchToTextParsing(token, TokenizerMode.RAWTEXT);\n\t}\n\t//NOTE: here we assume that we always act as an user agent with enabled plugins, so we parse\n\t//<noembed> as rawtext.\n\tfunction noembedStartTagInBody(p, token) {\n\t    p._switchToTextParsing(token, TokenizerMode.RAWTEXT);\n\t}\n\tfunction selectStartTagInBody(p, token) {\n\t    p._reconstructActiveFormattingElements();\n\t    p._insertElement(token, NS.HTML);\n\t    p.framesetOk = false;\n\t    p.insertionMode =\n\t        p.insertionMode === InsertionMode.IN_TABLE ||\n\t            p.insertionMode === InsertionMode.IN_CAPTION ||\n\t            p.insertionMode === InsertionMode.IN_TABLE_BODY ||\n\t            p.insertionMode === InsertionMode.IN_ROW ||\n\t            p.insertionMode === InsertionMode.IN_CELL\n\t            ? InsertionMode.IN_SELECT_IN_TABLE\n\t            : InsertionMode.IN_SELECT;\n\t}\n\tfunction optgroupStartTagInBody(p, token) {\n\t    if (p.openElements.currentTagId === TAG_ID.OPTION) {\n\t        p.openElements.pop();\n\t    }\n\t    p._reconstructActiveFormattingElements();\n\t    p._insertElement(token, NS.HTML);\n\t}\n\tfunction rbStartTagInBody(p, token) {\n\t    if (p.openElements.hasInScope(TAG_ID.RUBY)) {\n\t        p.openElements.generateImpliedEndTags();\n\t    }\n\t    p._insertElement(token, NS.HTML);\n\t}\n\tfunction rtStartTagInBody(p, token) {\n\t    if (p.openElements.hasInScope(TAG_ID.RUBY)) {\n\t        p.openElements.generateImpliedEndTagsWithExclusion(TAG_ID.RTC);\n\t    }\n\t    p._insertElement(token, NS.HTML);\n\t}\n\tfunction mathStartTagInBody(p, token) {\n\t    p._reconstructActiveFormattingElements();\n\t    adjustTokenMathMLAttrs(token);\n\t    adjustTokenXMLAttrs(token);\n\t    if (token.selfClosing) {\n\t        p._appendElement(token, NS.MATHML);\n\t    }\n\t    else {\n\t        p._insertElement(token, NS.MATHML);\n\t    }\n\t    token.ackSelfClosing = true;\n\t}\n\tfunction svgStartTagInBody(p, token) {\n\t    p._reconstructActiveFormattingElements();\n\t    adjustTokenSVGAttrs(token);\n\t    adjustTokenXMLAttrs(token);\n\t    if (token.selfClosing) {\n\t        p._appendElement(token, NS.SVG);\n\t    }\n\t    else {\n\t        p._insertElement(token, NS.SVG);\n\t    }\n\t    token.ackSelfClosing = true;\n\t}\n\tfunction genericStartTagInBody(p, token) {\n\t    p._reconstructActiveFormattingElements();\n\t    p._insertElement(token, NS.HTML);\n\t}\n\tfunction startTagInBody(p, token) {\n\t    switch (token.tagID) {\n\t        case TAG_ID.I:\n\t        case TAG_ID.S:\n\t        case TAG_ID.B:\n\t        case TAG_ID.U:\n\t        case TAG_ID.EM:\n\t        case TAG_ID.TT:\n\t        case TAG_ID.BIG:\n\t        case TAG_ID.CODE:\n\t        case TAG_ID.FONT:\n\t        case TAG_ID.SMALL:\n\t        case TAG_ID.STRIKE:\n\t        case TAG_ID.STRONG: {\n\t            bStartTagInBody(p, token);\n\t            break;\n\t        }\n\t        case TAG_ID.A: {\n\t            aStartTagInBody(p, token);\n\t            break;\n\t        }\n\t        case TAG_ID.H1:\n\t        case TAG_ID.H2:\n\t        case TAG_ID.H3:\n\t        case TAG_ID.H4:\n\t        case TAG_ID.H5:\n\t        case TAG_ID.H6: {\n\t            numberedHeaderStartTagInBody(p, token);\n\t            break;\n\t        }\n\t        case TAG_ID.P:\n\t        case TAG_ID.DL:\n\t        case TAG_ID.OL:\n\t        case TAG_ID.UL:\n\t        case TAG_ID.DIV:\n\t        case TAG_ID.DIR:\n\t        case TAG_ID.NAV:\n\t        case TAG_ID.MAIN:\n\t        case TAG_ID.MENU:\n\t        case TAG_ID.ASIDE:\n\t        case TAG_ID.CENTER:\n\t        case TAG_ID.FIGURE:\n\t        case TAG_ID.FOOTER:\n\t        case TAG_ID.HEADER:\n\t        case TAG_ID.HGROUP:\n\t        case TAG_ID.DIALOG:\n\t        case TAG_ID.DETAILS:\n\t        case TAG_ID.ADDRESS:\n\t        case TAG_ID.ARTICLE:\n\t        case TAG_ID.SECTION:\n\t        case TAG_ID.SUMMARY:\n\t        case TAG_ID.FIELDSET:\n\t        case TAG_ID.BLOCKQUOTE:\n\t        case TAG_ID.FIGCAPTION: {\n\t            addressStartTagInBody(p, token);\n\t            break;\n\t        }\n\t        case TAG_ID.LI:\n\t        case TAG_ID.DD:\n\t        case TAG_ID.DT: {\n\t            listItemStartTagInBody(p, token);\n\t            break;\n\t        }\n\t        case TAG_ID.BR:\n\t        case TAG_ID.IMG:\n\t        case TAG_ID.WBR:\n\t        case TAG_ID.AREA:\n\t        case TAG_ID.EMBED:\n\t        case TAG_ID.KEYGEN: {\n\t            areaStartTagInBody(p, token);\n\t            break;\n\t        }\n\t        case TAG_ID.HR: {\n\t            hrStartTagInBody(p, token);\n\t            break;\n\t        }\n\t        case TAG_ID.RB:\n\t        case TAG_ID.RTC: {\n\t            rbStartTagInBody(p, token);\n\t            break;\n\t        }\n\t        case TAG_ID.RT:\n\t        case TAG_ID.RP: {\n\t            rtStartTagInBody(p, token);\n\t            break;\n\t        }\n\t        case TAG_ID.PRE:\n\t        case TAG_ID.LISTING: {\n\t            preStartTagInBody(p, token);\n\t            break;\n\t        }\n\t        case TAG_ID.XMP: {\n\t            xmpStartTagInBody(p, token);\n\t            break;\n\t        }\n\t        case TAG_ID.SVG: {\n\t            svgStartTagInBody(p, token);\n\t            break;\n\t        }\n\t        case TAG_ID.HTML: {\n\t            htmlStartTagInBody(p, token);\n\t            break;\n\t        }\n\t        case TAG_ID.BASE:\n\t        case TAG_ID.LINK:\n\t        case TAG_ID.META:\n\t        case TAG_ID.STYLE:\n\t        case TAG_ID.TITLE:\n\t        case TAG_ID.SCRIPT:\n\t        case TAG_ID.BGSOUND:\n\t        case TAG_ID.BASEFONT:\n\t        case TAG_ID.TEMPLATE: {\n\t            startTagInHead(p, token);\n\t            break;\n\t        }\n\t        case TAG_ID.BODY: {\n\t            bodyStartTagInBody(p, token);\n\t            break;\n\t        }\n\t        case TAG_ID.FORM: {\n\t            formStartTagInBody(p, token);\n\t            break;\n\t        }\n\t        case TAG_ID.NOBR: {\n\t            nobrStartTagInBody(p, token);\n\t            break;\n\t        }\n\t        case TAG_ID.MATH: {\n\t            mathStartTagInBody(p, token);\n\t            break;\n\t        }\n\t        case TAG_ID.TABLE: {\n\t            tableStartTagInBody(p, token);\n\t            break;\n\t        }\n\t        case TAG_ID.INPUT: {\n\t            inputStartTagInBody(p, token);\n\t            break;\n\t        }\n\t        case TAG_ID.PARAM:\n\t        case TAG_ID.TRACK:\n\t        case TAG_ID.SOURCE: {\n\t            paramStartTagInBody(p, token);\n\t            break;\n\t        }\n\t        case TAG_ID.IMAGE: {\n\t            imageStartTagInBody(p, token);\n\t            break;\n\t        }\n\t        case TAG_ID.BUTTON: {\n\t            buttonStartTagInBody(p, token);\n\t            break;\n\t        }\n\t        case TAG_ID.APPLET:\n\t        case TAG_ID.OBJECT:\n\t        case TAG_ID.MARQUEE: {\n\t            appletStartTagInBody(p, token);\n\t            break;\n\t        }\n\t        case TAG_ID.IFRAME: {\n\t            iframeStartTagInBody(p, token);\n\t            break;\n\t        }\n\t        case TAG_ID.SELECT: {\n\t            selectStartTagInBody(p, token);\n\t            break;\n\t        }\n\t        case TAG_ID.OPTION:\n\t        case TAG_ID.OPTGROUP: {\n\t            optgroupStartTagInBody(p, token);\n\t            break;\n\t        }\n\t        case TAG_ID.NOEMBED: {\n\t            noembedStartTagInBody(p, token);\n\t            break;\n\t        }\n\t        case TAG_ID.FRAMESET: {\n\t            framesetStartTagInBody(p, token);\n\t            break;\n\t        }\n\t        case TAG_ID.TEXTAREA: {\n\t            textareaStartTagInBody(p, token);\n\t            break;\n\t        }\n\t        case TAG_ID.NOSCRIPT: {\n\t            if (p.options.scriptingEnabled) {\n\t                noembedStartTagInBody(p, token);\n\t            }\n\t            else {\n\t                genericStartTagInBody(p, token);\n\t            }\n\t            break;\n\t        }\n\t        case TAG_ID.PLAINTEXT: {\n\t            plaintextStartTagInBody(p, token);\n\t            break;\n\t        }\n\t        case TAG_ID.COL:\n\t        case TAG_ID.TH:\n\t        case TAG_ID.TD:\n\t        case TAG_ID.TR:\n\t        case TAG_ID.HEAD:\n\t        case TAG_ID.FRAME:\n\t        case TAG_ID.TBODY:\n\t        case TAG_ID.TFOOT:\n\t        case TAG_ID.THEAD:\n\t        case TAG_ID.CAPTION:\n\t        case TAG_ID.COLGROUP: {\n\t            // Ignore token\n\t            break;\n\t        }\n\t        default: {\n\t            genericStartTagInBody(p, token);\n\t        }\n\t    }\n\t}\n\tfunction bodyEndTagInBody(p, token) {\n\t    if (p.openElements.hasInScope(TAG_ID.BODY)) {\n\t        p.insertionMode = InsertionMode.AFTER_BODY;\n\t        //NOTE: <body> is never popped from the stack, so we need to updated\n\t        //the end location explicitly.\n\t        if (p.options.sourceCodeLocationInfo) {\n\t            const bodyElement = p.openElements.tryPeekProperlyNestedBodyElement();\n\t            if (bodyElement) {\n\t                p._setEndLocation(bodyElement, token);\n\t            }\n\t        }\n\t    }\n\t}\n\tfunction htmlEndTagInBody(p, token) {\n\t    if (p.openElements.hasInScope(TAG_ID.BODY)) {\n\t        p.insertionMode = InsertionMode.AFTER_BODY;\n\t        endTagAfterBody(p, token);\n\t    }\n\t}\n\tfunction addressEndTagInBody(p, token) {\n\t    const tn = token.tagID;\n\t    if (p.openElements.hasInScope(tn)) {\n\t        p.openElements.generateImpliedEndTags();\n\t        p.openElements.popUntilTagNamePopped(tn);\n\t    }\n\t}\n\tfunction formEndTagInBody(p) {\n\t    const inTemplate = p.openElements.tmplCount > 0;\n\t    const { formElement } = p;\n\t    if (!inTemplate) {\n\t        p.formElement = null;\n\t    }\n\t    if ((formElement || inTemplate) && p.openElements.hasInScope(TAG_ID.FORM)) {\n\t        p.openElements.generateImpliedEndTags();\n\t        if (inTemplate) {\n\t            p.openElements.popUntilTagNamePopped(TAG_ID.FORM);\n\t        }\n\t        else if (formElement) {\n\t            p.openElements.remove(formElement);\n\t        }\n\t    }\n\t}\n\tfunction pEndTagInBody(p) {\n\t    if (!p.openElements.hasInButtonScope(TAG_ID.P)) {\n\t        p._insertFakeElement(TAG_NAMES.P, TAG_ID.P);\n\t    }\n\t    p._closePElement();\n\t}\n\tfunction liEndTagInBody(p) {\n\t    if (p.openElements.hasInListItemScope(TAG_ID.LI)) {\n\t        p.openElements.generateImpliedEndTagsWithExclusion(TAG_ID.LI);\n\t        p.openElements.popUntilTagNamePopped(TAG_ID.LI);\n\t    }\n\t}\n\tfunction ddEndTagInBody(p, token) {\n\t    const tn = token.tagID;\n\t    if (p.openElements.hasInScope(tn)) {\n\t        p.openElements.generateImpliedEndTagsWithExclusion(tn);\n\t        p.openElements.popUntilTagNamePopped(tn);\n\t    }\n\t}\n\tfunction numberedHeaderEndTagInBody(p) {\n\t    if (p.openElements.hasNumberedHeaderInScope()) {\n\t        p.openElements.generateImpliedEndTags();\n\t        p.openElements.popUntilNumberedHeaderPopped();\n\t    }\n\t}\n\tfunction appletEndTagInBody(p, token) {\n\t    const tn = token.tagID;\n\t    if (p.openElements.hasInScope(tn)) {\n\t        p.openElements.generateImpliedEndTags();\n\t        p.openElements.popUntilTagNamePopped(tn);\n\t        p.activeFormattingElements.clearToLastMarker();\n\t    }\n\t}\n\tfunction brEndTagInBody(p) {\n\t    p._reconstructActiveFormattingElements();\n\t    p._insertFakeElement(TAG_NAMES.BR, TAG_ID.BR);\n\t    p.openElements.pop();\n\t    p.framesetOk = false;\n\t}\n\tfunction genericEndTagInBody(p, token) {\n\t    const tn = token.tagName;\n\t    const tid = token.tagID;\n\t    for (let i = p.openElements.stackTop; i > 0; i--) {\n\t        const element = p.openElements.items[i];\n\t        const elementId = p.openElements.tagIDs[i];\n\t        // Compare the tag name here, as the tag might not be a known tag with an ID.\n\t        if (tid === elementId && (tid !== TAG_ID.UNKNOWN || p.treeAdapter.getTagName(element) === tn)) {\n\t            p.openElements.generateImpliedEndTagsWithExclusion(tid);\n\t            if (p.openElements.stackTop >= i)\n\t                p.openElements.shortenToLength(i);\n\t            break;\n\t        }\n\t        if (p._isSpecialElement(element, elementId)) {\n\t            break;\n\t        }\n\t    }\n\t}\n\tfunction endTagInBody(p, token) {\n\t    switch (token.tagID) {\n\t        case TAG_ID.A:\n\t        case TAG_ID.B:\n\t        case TAG_ID.I:\n\t        case TAG_ID.S:\n\t        case TAG_ID.U:\n\t        case TAG_ID.EM:\n\t        case TAG_ID.TT:\n\t        case TAG_ID.BIG:\n\t        case TAG_ID.CODE:\n\t        case TAG_ID.FONT:\n\t        case TAG_ID.NOBR:\n\t        case TAG_ID.SMALL:\n\t        case TAG_ID.STRIKE:\n\t        case TAG_ID.STRONG: {\n\t            callAdoptionAgency(p, token);\n\t            break;\n\t        }\n\t        case TAG_ID.P: {\n\t            pEndTagInBody(p);\n\t            break;\n\t        }\n\t        case TAG_ID.DL:\n\t        case TAG_ID.UL:\n\t        case TAG_ID.OL:\n\t        case TAG_ID.DIR:\n\t        case TAG_ID.DIV:\n\t        case TAG_ID.NAV:\n\t        case TAG_ID.PRE:\n\t        case TAG_ID.MAIN:\n\t        case TAG_ID.MENU:\n\t        case TAG_ID.ASIDE:\n\t        case TAG_ID.CENTER:\n\t        case TAG_ID.FIGURE:\n\t        case TAG_ID.FOOTER:\n\t        case TAG_ID.HEADER:\n\t        case TAG_ID.HGROUP:\n\t        case TAG_ID.DIALOG:\n\t        case TAG_ID.ADDRESS:\n\t        case TAG_ID.ARTICLE:\n\t        case TAG_ID.DETAILS:\n\t        case TAG_ID.SECTION:\n\t        case TAG_ID.SUMMARY:\n\t        case TAG_ID.LISTING:\n\t        case TAG_ID.FIELDSET:\n\t        case TAG_ID.BLOCKQUOTE:\n\t        case TAG_ID.FIGCAPTION: {\n\t            addressEndTagInBody(p, token);\n\t            break;\n\t        }\n\t        case TAG_ID.LI: {\n\t            liEndTagInBody(p);\n\t            break;\n\t        }\n\t        case TAG_ID.DD:\n\t        case TAG_ID.DT: {\n\t            ddEndTagInBody(p, token);\n\t            break;\n\t        }\n\t        case TAG_ID.H1:\n\t        case TAG_ID.H2:\n\t        case TAG_ID.H3:\n\t        case TAG_ID.H4:\n\t        case TAG_ID.H5:\n\t        case TAG_ID.H6: {\n\t            numberedHeaderEndTagInBody(p);\n\t            break;\n\t        }\n\t        case TAG_ID.BR: {\n\t            brEndTagInBody(p);\n\t            break;\n\t        }\n\t        case TAG_ID.BODY: {\n\t            bodyEndTagInBody(p, token);\n\t            break;\n\t        }\n\t        case TAG_ID.HTML: {\n\t            htmlEndTagInBody(p, token);\n\t            break;\n\t        }\n\t        case TAG_ID.FORM: {\n\t            formEndTagInBody(p);\n\t            break;\n\t        }\n\t        case TAG_ID.APPLET:\n\t        case TAG_ID.OBJECT:\n\t        case TAG_ID.MARQUEE: {\n\t            appletEndTagInBody(p, token);\n\t            break;\n\t        }\n\t        case TAG_ID.TEMPLATE: {\n\t            endTagInHead(p, token);\n\t            break;\n\t        }\n\t        default: {\n\t            genericEndTagInBody(p, token);\n\t        }\n\t    }\n\t}\n\tfunction eofInBody(p, token) {\n\t    if (p.tmplInsertionModeStack.length > 0) {\n\t        eofInTemplate(p, token);\n\t    }\n\t    else {\n\t        stopParsing(p, token);\n\t    }\n\t}\n\t// The \"text\" insertion mode\n\t//------------------------------------------------------------------\n\tfunction endTagInText(p, token) {\n\t    var _a;\n\t    if (token.tagID === TAG_ID.SCRIPT) {\n\t        (_a = p.scriptHandler) === null || _a === void 0 ? void 0 : _a.call(p, p.openElements.current);\n\t    }\n\t    p.openElements.pop();\n\t    p.insertionMode = p.originalInsertionMode;\n\t}\n\tfunction eofInText(p, token) {\n\t    p._err(token, ERR.eofInElementThatCanContainOnlyText);\n\t    p.openElements.pop();\n\t    p.insertionMode = p.originalInsertionMode;\n\t    p.onEof(token);\n\t}\n\t// The \"in table\" insertion mode\n\t//------------------------------------------------------------------\n\tfunction characterInTable(p, token) {\n\t    if (TABLE_STRUCTURE_TAGS.has(p.openElements.currentTagId)) {\n\t        p.pendingCharacterTokens.length = 0;\n\t        p.hasNonWhitespacePendingCharacterToken = false;\n\t        p.originalInsertionMode = p.insertionMode;\n\t        p.insertionMode = InsertionMode.IN_TABLE_TEXT;\n\t        switch (token.type) {\n\t            case TokenType.CHARACTER: {\n\t                characterInTableText(p, token);\n\t                break;\n\t            }\n\t            case TokenType.WHITESPACE_CHARACTER: {\n\t                whitespaceCharacterInTableText(p, token);\n\t                break;\n\t            }\n\t            // Ignore null\n\t        }\n\t    }\n\t    else {\n\t        tokenInTable(p, token);\n\t    }\n\t}\n\tfunction captionStartTagInTable(p, token) {\n\t    p.openElements.clearBackToTableContext();\n\t    p.activeFormattingElements.insertMarker();\n\t    p._insertElement(token, NS.HTML);\n\t    p.insertionMode = InsertionMode.IN_CAPTION;\n\t}\n\tfunction colgroupStartTagInTable(p, token) {\n\t    p.openElements.clearBackToTableContext();\n\t    p._insertElement(token, NS.HTML);\n\t    p.insertionMode = InsertionMode.IN_COLUMN_GROUP;\n\t}\n\tfunction colStartTagInTable(p, token) {\n\t    p.openElements.clearBackToTableContext();\n\t    p._insertFakeElement(TAG_NAMES.COLGROUP, TAG_ID.COLGROUP);\n\t    p.insertionMode = InsertionMode.IN_COLUMN_GROUP;\n\t    startTagInColumnGroup(p, token);\n\t}\n\tfunction tbodyStartTagInTable(p, token) {\n\t    p.openElements.clearBackToTableContext();\n\t    p._insertElement(token, NS.HTML);\n\t    p.insertionMode = InsertionMode.IN_TABLE_BODY;\n\t}\n\tfunction tdStartTagInTable(p, token) {\n\t    p.openElements.clearBackToTableContext();\n\t    p._insertFakeElement(TAG_NAMES.TBODY, TAG_ID.TBODY);\n\t    p.insertionMode = InsertionMode.IN_TABLE_BODY;\n\t    startTagInTableBody(p, token);\n\t}\n\tfunction tableStartTagInTable(p, token) {\n\t    if (p.openElements.hasInTableScope(TAG_ID.TABLE)) {\n\t        p.openElements.popUntilTagNamePopped(TAG_ID.TABLE);\n\t        p._resetInsertionMode();\n\t        p._processStartTag(token);\n\t    }\n\t}\n\tfunction inputStartTagInTable(p, token) {\n\t    if (isHiddenInput(token)) {\n\t        p._appendElement(token, NS.HTML);\n\t    }\n\t    else {\n\t        tokenInTable(p, token);\n\t    }\n\t    token.ackSelfClosing = true;\n\t}\n\tfunction formStartTagInTable(p, token) {\n\t    if (!p.formElement && p.openElements.tmplCount === 0) {\n\t        p._insertElement(token, NS.HTML);\n\t        p.formElement = p.openElements.current;\n\t        p.openElements.pop();\n\t    }\n\t}\n\tfunction startTagInTable(p, token) {\n\t    switch (token.tagID) {\n\t        case TAG_ID.TD:\n\t        case TAG_ID.TH:\n\t        case TAG_ID.TR: {\n\t            tdStartTagInTable(p, token);\n\t            break;\n\t        }\n\t        case TAG_ID.STYLE:\n\t        case TAG_ID.SCRIPT:\n\t        case TAG_ID.TEMPLATE: {\n\t            startTagInHead(p, token);\n\t            break;\n\t        }\n\t        case TAG_ID.COL: {\n\t            colStartTagInTable(p, token);\n\t            break;\n\t        }\n\t        case TAG_ID.FORM: {\n\t            formStartTagInTable(p, token);\n\t            break;\n\t        }\n\t        case TAG_ID.TABLE: {\n\t            tableStartTagInTable(p, token);\n\t            break;\n\t        }\n\t        case TAG_ID.TBODY:\n\t        case TAG_ID.TFOOT:\n\t        case TAG_ID.THEAD: {\n\t            tbodyStartTagInTable(p, token);\n\t            break;\n\t        }\n\t        case TAG_ID.INPUT: {\n\t            inputStartTagInTable(p, token);\n\t            break;\n\t        }\n\t        case TAG_ID.CAPTION: {\n\t            captionStartTagInTable(p, token);\n\t            break;\n\t        }\n\t        case TAG_ID.COLGROUP: {\n\t            colgroupStartTagInTable(p, token);\n\t            break;\n\t        }\n\t        default: {\n\t            tokenInTable(p, token);\n\t        }\n\t    }\n\t}\n\tfunction endTagInTable(p, token) {\n\t    switch (token.tagID) {\n\t        case TAG_ID.TABLE: {\n\t            if (p.openElements.hasInTableScope(TAG_ID.TABLE)) {\n\t                p.openElements.popUntilTagNamePopped(TAG_ID.TABLE);\n\t                p._resetInsertionMode();\n\t            }\n\t            break;\n\t        }\n\t        case TAG_ID.TEMPLATE: {\n\t            endTagInHead(p, token);\n\t            break;\n\t        }\n\t        case TAG_ID.BODY:\n\t        case TAG_ID.CAPTION:\n\t        case TAG_ID.COL:\n\t        case TAG_ID.COLGROUP:\n\t        case TAG_ID.HTML:\n\t        case TAG_ID.TBODY:\n\t        case TAG_ID.TD:\n\t        case TAG_ID.TFOOT:\n\t        case TAG_ID.TH:\n\t        case TAG_ID.THEAD:\n\t        case TAG_ID.TR: {\n\t            // Ignore token\n\t            break;\n\t        }\n\t        default: {\n\t            tokenInTable(p, token);\n\t        }\n\t    }\n\t}\n\tfunction tokenInTable(p, token) {\n\t    const savedFosterParentingState = p.fosterParentingEnabled;\n\t    p.fosterParentingEnabled = true;\n\t    // Process token in `In Body` mode\n\t    modeInBody(p, token);\n\t    p.fosterParentingEnabled = savedFosterParentingState;\n\t}\n\t// The \"in table text\" insertion mode\n\t//------------------------------------------------------------------\n\tfunction whitespaceCharacterInTableText(p, token) {\n\t    p.pendingCharacterTokens.push(token);\n\t}\n\tfunction characterInTableText(p, token) {\n\t    p.pendingCharacterTokens.push(token);\n\t    p.hasNonWhitespacePendingCharacterToken = true;\n\t}\n\tfunction tokenInTableText(p, token) {\n\t    let i = 0;\n\t    if (p.hasNonWhitespacePendingCharacterToken) {\n\t        for (; i < p.pendingCharacterTokens.length; i++) {\n\t            tokenInTable(p, p.pendingCharacterTokens[i]);\n\t        }\n\t    }\n\t    else {\n\t        for (; i < p.pendingCharacterTokens.length; i++) {\n\t            p._insertCharacters(p.pendingCharacterTokens[i]);\n\t        }\n\t    }\n\t    p.insertionMode = p.originalInsertionMode;\n\t    p._processToken(token);\n\t}\n\t// The \"in caption\" insertion mode\n\t//------------------------------------------------------------------\n\tconst TABLE_VOID_ELEMENTS = new Set([TAG_ID.CAPTION, TAG_ID.COL, TAG_ID.COLGROUP, TAG_ID.TBODY, TAG_ID.TD, TAG_ID.TFOOT, TAG_ID.TH, TAG_ID.THEAD, TAG_ID.TR]);\n\tfunction startTagInCaption(p, token) {\n\t    const tn = token.tagID;\n\t    if (TABLE_VOID_ELEMENTS.has(tn)) {\n\t        if (p.openElements.hasInTableScope(TAG_ID.CAPTION)) {\n\t            p.openElements.generateImpliedEndTags();\n\t            p.openElements.popUntilTagNamePopped(TAG_ID.CAPTION);\n\t            p.activeFormattingElements.clearToLastMarker();\n\t            p.insertionMode = InsertionMode.IN_TABLE;\n\t            startTagInTable(p, token);\n\t        }\n\t    }\n\t    else {\n\t        startTagInBody(p, token);\n\t    }\n\t}\n\tfunction endTagInCaption(p, token) {\n\t    const tn = token.tagID;\n\t    switch (tn) {\n\t        case TAG_ID.CAPTION:\n\t        case TAG_ID.TABLE: {\n\t            if (p.openElements.hasInTableScope(TAG_ID.CAPTION)) {\n\t                p.openElements.generateImpliedEndTags();\n\t                p.openElements.popUntilTagNamePopped(TAG_ID.CAPTION);\n\t                p.activeFormattingElements.clearToLastMarker();\n\t                p.insertionMode = InsertionMode.IN_TABLE;\n\t                if (tn === TAG_ID.TABLE) {\n\t                    endTagInTable(p, token);\n\t                }\n\t            }\n\t            break;\n\t        }\n\t        case TAG_ID.BODY:\n\t        case TAG_ID.COL:\n\t        case TAG_ID.COLGROUP:\n\t        case TAG_ID.HTML:\n\t        case TAG_ID.TBODY:\n\t        case TAG_ID.TD:\n\t        case TAG_ID.TFOOT:\n\t        case TAG_ID.TH:\n\t        case TAG_ID.THEAD:\n\t        case TAG_ID.TR: {\n\t            // Ignore token\n\t            break;\n\t        }\n\t        default: {\n\t            endTagInBody(p, token);\n\t        }\n\t    }\n\t}\n\t// The \"in column group\" insertion mode\n\t//------------------------------------------------------------------\n\tfunction startTagInColumnGroup(p, token) {\n\t    switch (token.tagID) {\n\t        case TAG_ID.HTML: {\n\t            startTagInBody(p, token);\n\t            break;\n\t        }\n\t        case TAG_ID.COL: {\n\t            p._appendElement(token, NS.HTML);\n\t            token.ackSelfClosing = true;\n\t            break;\n\t        }\n\t        case TAG_ID.TEMPLATE: {\n\t            startTagInHead(p, token);\n\t            break;\n\t        }\n\t        default: {\n\t            tokenInColumnGroup(p, token);\n\t        }\n\t    }\n\t}\n\tfunction endTagInColumnGroup(p, token) {\n\t    switch (token.tagID) {\n\t        case TAG_ID.COLGROUP: {\n\t            if (p.openElements.currentTagId === TAG_ID.COLGROUP) {\n\t                p.openElements.pop();\n\t                p.insertionMode = InsertionMode.IN_TABLE;\n\t            }\n\t            break;\n\t        }\n\t        case TAG_ID.TEMPLATE: {\n\t            endTagInHead(p, token);\n\t            break;\n\t        }\n\t        case TAG_ID.COL: {\n\t            // Ignore token\n\t            break;\n\t        }\n\t        default: {\n\t            tokenInColumnGroup(p, token);\n\t        }\n\t    }\n\t}\n\tfunction tokenInColumnGroup(p, token) {\n\t    if (p.openElements.currentTagId === TAG_ID.COLGROUP) {\n\t        p.openElements.pop();\n\t        p.insertionMode = InsertionMode.IN_TABLE;\n\t        p._processToken(token);\n\t    }\n\t}\n\t// The \"in table body\" insertion mode\n\t//------------------------------------------------------------------\n\tfunction startTagInTableBody(p, token) {\n\t    switch (token.tagID) {\n\t        case TAG_ID.TR: {\n\t            p.openElements.clearBackToTableBodyContext();\n\t            p._insertElement(token, NS.HTML);\n\t            p.insertionMode = InsertionMode.IN_ROW;\n\t            break;\n\t        }\n\t        case TAG_ID.TH:\n\t        case TAG_ID.TD: {\n\t            p.openElements.clearBackToTableBodyContext();\n\t            p._insertFakeElement(TAG_NAMES.TR, TAG_ID.TR);\n\t            p.insertionMode = InsertionMode.IN_ROW;\n\t            startTagInRow(p, token);\n\t            break;\n\t        }\n\t        case TAG_ID.CAPTION:\n\t        case TAG_ID.COL:\n\t        case TAG_ID.COLGROUP:\n\t        case TAG_ID.TBODY:\n\t        case TAG_ID.TFOOT:\n\t        case TAG_ID.THEAD: {\n\t            if (p.openElements.hasTableBodyContextInTableScope()) {\n\t                p.openElements.clearBackToTableBodyContext();\n\t                p.openElements.pop();\n\t                p.insertionMode = InsertionMode.IN_TABLE;\n\t                startTagInTable(p, token);\n\t            }\n\t            break;\n\t        }\n\t        default: {\n\t            startTagInTable(p, token);\n\t        }\n\t    }\n\t}\n\tfunction endTagInTableBody(p, token) {\n\t    const tn = token.tagID;\n\t    switch (token.tagID) {\n\t        case TAG_ID.TBODY:\n\t        case TAG_ID.TFOOT:\n\t        case TAG_ID.THEAD: {\n\t            if (p.openElements.hasInTableScope(tn)) {\n\t                p.openElements.clearBackToTableBodyContext();\n\t                p.openElements.pop();\n\t                p.insertionMode = InsertionMode.IN_TABLE;\n\t            }\n\t            break;\n\t        }\n\t        case TAG_ID.TABLE: {\n\t            if (p.openElements.hasTableBodyContextInTableScope()) {\n\t                p.openElements.clearBackToTableBodyContext();\n\t                p.openElements.pop();\n\t                p.insertionMode = InsertionMode.IN_TABLE;\n\t                endTagInTable(p, token);\n\t            }\n\t            break;\n\t        }\n\t        case TAG_ID.BODY:\n\t        case TAG_ID.CAPTION:\n\t        case TAG_ID.COL:\n\t        case TAG_ID.COLGROUP:\n\t        case TAG_ID.HTML:\n\t        case TAG_ID.TD:\n\t        case TAG_ID.TH:\n\t        case TAG_ID.TR: {\n\t            // Ignore token\n\t            break;\n\t        }\n\t        default: {\n\t            endTagInTable(p, token);\n\t        }\n\t    }\n\t}\n\t// The \"in row\" insertion mode\n\t//------------------------------------------------------------------\n\tfunction startTagInRow(p, token) {\n\t    switch (token.tagID) {\n\t        case TAG_ID.TH:\n\t        case TAG_ID.TD: {\n\t            p.openElements.clearBackToTableRowContext();\n\t            p._insertElement(token, NS.HTML);\n\t            p.insertionMode = InsertionMode.IN_CELL;\n\t            p.activeFormattingElements.insertMarker();\n\t            break;\n\t        }\n\t        case TAG_ID.CAPTION:\n\t        case TAG_ID.COL:\n\t        case TAG_ID.COLGROUP:\n\t        case TAG_ID.TBODY:\n\t        case TAG_ID.TFOOT:\n\t        case TAG_ID.THEAD:\n\t        case TAG_ID.TR: {\n\t            if (p.openElements.hasInTableScope(TAG_ID.TR)) {\n\t                p.openElements.clearBackToTableRowContext();\n\t                p.openElements.pop();\n\t                p.insertionMode = InsertionMode.IN_TABLE_BODY;\n\t                startTagInTableBody(p, token);\n\t            }\n\t            break;\n\t        }\n\t        default: {\n\t            startTagInTable(p, token);\n\t        }\n\t    }\n\t}\n\tfunction endTagInRow(p, token) {\n\t    switch (token.tagID) {\n\t        case TAG_ID.TR: {\n\t            if (p.openElements.hasInTableScope(TAG_ID.TR)) {\n\t                p.openElements.clearBackToTableRowContext();\n\t                p.openElements.pop();\n\t                p.insertionMode = InsertionMode.IN_TABLE_BODY;\n\t            }\n\t            break;\n\t        }\n\t        case TAG_ID.TABLE: {\n\t            if (p.openElements.hasInTableScope(TAG_ID.TR)) {\n\t                p.openElements.clearBackToTableRowContext();\n\t                p.openElements.pop();\n\t                p.insertionMode = InsertionMode.IN_TABLE_BODY;\n\t                endTagInTableBody(p, token);\n\t            }\n\t            break;\n\t        }\n\t        case TAG_ID.TBODY:\n\t        case TAG_ID.TFOOT:\n\t        case TAG_ID.THEAD: {\n\t            if (p.openElements.hasInTableScope(token.tagID) || p.openElements.hasInTableScope(TAG_ID.TR)) {\n\t                p.openElements.clearBackToTableRowContext();\n\t                p.openElements.pop();\n\t                p.insertionMode = InsertionMode.IN_TABLE_BODY;\n\t                endTagInTableBody(p, token);\n\t            }\n\t            break;\n\t        }\n\t        case TAG_ID.BODY:\n\t        case TAG_ID.CAPTION:\n\t        case TAG_ID.COL:\n\t        case TAG_ID.COLGROUP:\n\t        case TAG_ID.HTML:\n\t        case TAG_ID.TD:\n\t        case TAG_ID.TH: {\n\t            // Ignore end tag\n\t            break;\n\t        }\n\t        default:\n\t            endTagInTable(p, token);\n\t    }\n\t}\n\t// The \"in cell\" insertion mode\n\t//------------------------------------------------------------------\n\tfunction startTagInCell(p, token) {\n\t    const tn = token.tagID;\n\t    if (TABLE_VOID_ELEMENTS.has(tn)) {\n\t        if (p.openElements.hasInTableScope(TAG_ID.TD) || p.openElements.hasInTableScope(TAG_ID.TH)) {\n\t            p._closeTableCell();\n\t            startTagInRow(p, token);\n\t        }\n\t    }\n\t    else {\n\t        startTagInBody(p, token);\n\t    }\n\t}\n\tfunction endTagInCell(p, token) {\n\t    const tn = token.tagID;\n\t    switch (tn) {\n\t        case TAG_ID.TD:\n\t        case TAG_ID.TH: {\n\t            if (p.openElements.hasInTableScope(tn)) {\n\t                p.openElements.generateImpliedEndTags();\n\t                p.openElements.popUntilTagNamePopped(tn);\n\t                p.activeFormattingElements.clearToLastMarker();\n\t                p.insertionMode = InsertionMode.IN_ROW;\n\t            }\n\t            break;\n\t        }\n\t        case TAG_ID.TABLE:\n\t        case TAG_ID.TBODY:\n\t        case TAG_ID.TFOOT:\n\t        case TAG_ID.THEAD:\n\t        case TAG_ID.TR: {\n\t            if (p.openElements.hasInTableScope(tn)) {\n\t                p._closeTableCell();\n\t                endTagInRow(p, token);\n\t            }\n\t            break;\n\t        }\n\t        case TAG_ID.BODY:\n\t        case TAG_ID.CAPTION:\n\t        case TAG_ID.COL:\n\t        case TAG_ID.COLGROUP:\n\t        case TAG_ID.HTML: {\n\t            // Ignore token\n\t            break;\n\t        }\n\t        default: {\n\t            endTagInBody(p, token);\n\t        }\n\t    }\n\t}\n\t// The \"in select\" insertion mode\n\t//------------------------------------------------------------------\n\tfunction startTagInSelect(p, token) {\n\t    switch (token.tagID) {\n\t        case TAG_ID.HTML: {\n\t            startTagInBody(p, token);\n\t            break;\n\t        }\n\t        case TAG_ID.OPTION: {\n\t            if (p.openElements.currentTagId === TAG_ID.OPTION) {\n\t                p.openElements.pop();\n\t            }\n\t            p._insertElement(token, NS.HTML);\n\t            break;\n\t        }\n\t        case TAG_ID.OPTGROUP: {\n\t            if (p.openElements.currentTagId === TAG_ID.OPTION) {\n\t                p.openElements.pop();\n\t            }\n\t            if (p.openElements.currentTagId === TAG_ID.OPTGROUP) {\n\t                p.openElements.pop();\n\t            }\n\t            p._insertElement(token, NS.HTML);\n\t            break;\n\t        }\n\t        case TAG_ID.INPUT:\n\t        case TAG_ID.KEYGEN:\n\t        case TAG_ID.TEXTAREA:\n\t        case TAG_ID.SELECT: {\n\t            if (p.openElements.hasInSelectScope(TAG_ID.SELECT)) {\n\t                p.openElements.popUntilTagNamePopped(TAG_ID.SELECT);\n\t                p._resetInsertionMode();\n\t                if (token.tagID !== TAG_ID.SELECT) {\n\t                    p._processStartTag(token);\n\t                }\n\t            }\n\t            break;\n\t        }\n\t        case TAG_ID.SCRIPT:\n\t        case TAG_ID.TEMPLATE: {\n\t            startTagInHead(p, token);\n\t            break;\n\t        }\n\t        // Do nothing\n\t    }\n\t}\n\tfunction endTagInSelect(p, token) {\n\t    switch (token.tagID) {\n\t        case TAG_ID.OPTGROUP: {\n\t            if (p.openElements.stackTop > 0 &&\n\t                p.openElements.currentTagId === TAG_ID.OPTION &&\n\t                p.openElements.tagIDs[p.openElements.stackTop - 1] === TAG_ID.OPTGROUP) {\n\t                p.openElements.pop();\n\t            }\n\t            if (p.openElements.currentTagId === TAG_ID.OPTGROUP) {\n\t                p.openElements.pop();\n\t            }\n\t            break;\n\t        }\n\t        case TAG_ID.OPTION: {\n\t            if (p.openElements.currentTagId === TAG_ID.OPTION) {\n\t                p.openElements.pop();\n\t            }\n\t            break;\n\t        }\n\t        case TAG_ID.SELECT: {\n\t            if (p.openElements.hasInSelectScope(TAG_ID.SELECT)) {\n\t                p.openElements.popUntilTagNamePopped(TAG_ID.SELECT);\n\t                p._resetInsertionMode();\n\t            }\n\t            break;\n\t        }\n\t        case TAG_ID.TEMPLATE: {\n\t            endTagInHead(p, token);\n\t            break;\n\t        }\n\t        // Do nothing\n\t    }\n\t}\n\t// The \"in select in table\" insertion mode\n\t//------------------------------------------------------------------\n\tfunction startTagInSelectInTable(p, token) {\n\t    const tn = token.tagID;\n\t    if (tn === TAG_ID.CAPTION ||\n\t        tn === TAG_ID.TABLE ||\n\t        tn === TAG_ID.TBODY ||\n\t        tn === TAG_ID.TFOOT ||\n\t        tn === TAG_ID.THEAD ||\n\t        tn === TAG_ID.TR ||\n\t        tn === TAG_ID.TD ||\n\t        tn === TAG_ID.TH) {\n\t        p.openElements.popUntilTagNamePopped(TAG_ID.SELECT);\n\t        p._resetInsertionMode();\n\t        p._processStartTag(token);\n\t    }\n\t    else {\n\t        startTagInSelect(p, token);\n\t    }\n\t}\n\tfunction endTagInSelectInTable(p, token) {\n\t    const tn = token.tagID;\n\t    if (tn === TAG_ID.CAPTION ||\n\t        tn === TAG_ID.TABLE ||\n\t        tn === TAG_ID.TBODY ||\n\t        tn === TAG_ID.TFOOT ||\n\t        tn === TAG_ID.THEAD ||\n\t        tn === TAG_ID.TR ||\n\t        tn === TAG_ID.TD ||\n\t        tn === TAG_ID.TH) {\n\t        if (p.openElements.hasInTableScope(tn)) {\n\t            p.openElements.popUntilTagNamePopped(TAG_ID.SELECT);\n\t            p._resetInsertionMode();\n\t            p.onEndTag(token);\n\t        }\n\t    }\n\t    else {\n\t        endTagInSelect(p, token);\n\t    }\n\t}\n\t// The \"in template\" insertion mode\n\t//------------------------------------------------------------------\n\tfunction startTagInTemplate(p, token) {\n\t    switch (token.tagID) {\n\t        // First, handle tags that can start without a mode change\n\t        case TAG_ID.BASE:\n\t        case TAG_ID.BASEFONT:\n\t        case TAG_ID.BGSOUND:\n\t        case TAG_ID.LINK:\n\t        case TAG_ID.META:\n\t        case TAG_ID.NOFRAMES:\n\t        case TAG_ID.SCRIPT:\n\t        case TAG_ID.STYLE:\n\t        case TAG_ID.TEMPLATE:\n\t        case TAG_ID.TITLE:\n\t            startTagInHead(p, token);\n\t            break;\n\t        // Re-process the token in the appropriate mode\n\t        case TAG_ID.CAPTION:\n\t        case TAG_ID.COLGROUP:\n\t        case TAG_ID.TBODY:\n\t        case TAG_ID.TFOOT:\n\t        case TAG_ID.THEAD:\n\t            p.tmplInsertionModeStack[0] = InsertionMode.IN_TABLE;\n\t            p.insertionMode = InsertionMode.IN_TABLE;\n\t            startTagInTable(p, token);\n\t            break;\n\t        case TAG_ID.COL:\n\t            p.tmplInsertionModeStack[0] = InsertionMode.IN_COLUMN_GROUP;\n\t            p.insertionMode = InsertionMode.IN_COLUMN_GROUP;\n\t            startTagInColumnGroup(p, token);\n\t            break;\n\t        case TAG_ID.TR:\n\t            p.tmplInsertionModeStack[0] = InsertionMode.IN_TABLE_BODY;\n\t            p.insertionMode = InsertionMode.IN_TABLE_BODY;\n\t            startTagInTableBody(p, token);\n\t            break;\n\t        case TAG_ID.TD:\n\t        case TAG_ID.TH:\n\t            p.tmplInsertionModeStack[0] = InsertionMode.IN_ROW;\n\t            p.insertionMode = InsertionMode.IN_ROW;\n\t            startTagInRow(p, token);\n\t            break;\n\t        default:\n\t            p.tmplInsertionModeStack[0] = InsertionMode.IN_BODY;\n\t            p.insertionMode = InsertionMode.IN_BODY;\n\t            startTagInBody(p, token);\n\t    }\n\t}\n\tfunction endTagInTemplate(p, token) {\n\t    if (token.tagID === TAG_ID.TEMPLATE) {\n\t        endTagInHead(p, token);\n\t    }\n\t}\n\tfunction eofInTemplate(p, token) {\n\t    if (p.openElements.tmplCount > 0) {\n\t        p.openElements.popUntilTagNamePopped(TAG_ID.TEMPLATE);\n\t        p.activeFormattingElements.clearToLastMarker();\n\t        p.tmplInsertionModeStack.shift();\n\t        p._resetInsertionMode();\n\t        p.onEof(token);\n\t    }\n\t    else {\n\t        stopParsing(p, token);\n\t    }\n\t}\n\t// The \"after body\" insertion mode\n\t//------------------------------------------------------------------\n\tfunction startTagAfterBody(p, token) {\n\t    if (token.tagID === TAG_ID.HTML) {\n\t        startTagInBody(p, token);\n\t    }\n\t    else {\n\t        tokenAfterBody(p, token);\n\t    }\n\t}\n\tfunction endTagAfterBody(p, token) {\n\t    var _a;\n\t    if (token.tagID === TAG_ID.HTML) {\n\t        if (!p.fragmentContext) {\n\t            p.insertionMode = InsertionMode.AFTER_AFTER_BODY;\n\t        }\n\t        //NOTE: <html> is never popped from the stack, so we need to updated\n\t        //the end location explicitly.\n\t        if (p.options.sourceCodeLocationInfo && p.openElements.tagIDs[0] === TAG_ID.HTML) {\n\t            p._setEndLocation(p.openElements.items[0], token);\n\t            // Update the body element, if it doesn't have an end tag\n\t            const bodyElement = p.openElements.items[1];\n\t            if (bodyElement && !((_a = p.treeAdapter.getNodeSourceCodeLocation(bodyElement)) === null || _a === void 0 ? void 0 : _a.endTag)) {\n\t                p._setEndLocation(bodyElement, token);\n\t            }\n\t        }\n\t    }\n\t    else {\n\t        tokenAfterBody(p, token);\n\t    }\n\t}\n\tfunction tokenAfterBody(p, token) {\n\t    p.insertionMode = InsertionMode.IN_BODY;\n\t    modeInBody(p, token);\n\t}\n\t// The \"in frameset\" insertion mode\n\t//------------------------------------------------------------------\n\tfunction startTagInFrameset(p, token) {\n\t    switch (token.tagID) {\n\t        case TAG_ID.HTML: {\n\t            startTagInBody(p, token);\n\t            break;\n\t        }\n\t        case TAG_ID.FRAMESET: {\n\t            p._insertElement(token, NS.HTML);\n\t            break;\n\t        }\n\t        case TAG_ID.FRAME: {\n\t            p._appendElement(token, NS.HTML);\n\t            token.ackSelfClosing = true;\n\t            break;\n\t        }\n\t        case TAG_ID.NOFRAMES: {\n\t            startTagInHead(p, token);\n\t            break;\n\t        }\n\t        // Do nothing\n\t    }\n\t}\n\tfunction endTagInFrameset(p, token) {\n\t    if (token.tagID === TAG_ID.FRAMESET && !p.openElements.isRootHtmlElementCurrent()) {\n\t        p.openElements.pop();\n\t        if (!p.fragmentContext && p.openElements.currentTagId !== TAG_ID.FRAMESET) {\n\t            p.insertionMode = InsertionMode.AFTER_FRAMESET;\n\t        }\n\t    }\n\t}\n\t// The \"after frameset\" insertion mode\n\t//------------------------------------------------------------------\n\tfunction startTagAfterFrameset(p, token) {\n\t    switch (token.tagID) {\n\t        case TAG_ID.HTML: {\n\t            startTagInBody(p, token);\n\t            break;\n\t        }\n\t        case TAG_ID.NOFRAMES: {\n\t            startTagInHead(p, token);\n\t            break;\n\t        }\n\t        // Do nothing\n\t    }\n\t}\n\tfunction endTagAfterFrameset(p, token) {\n\t    if (token.tagID === TAG_ID.HTML) {\n\t        p.insertionMode = InsertionMode.AFTER_AFTER_FRAMESET;\n\t    }\n\t}\n\t// The \"after after body\" insertion mode\n\t//------------------------------------------------------------------\n\tfunction startTagAfterAfterBody(p, token) {\n\t    if (token.tagID === TAG_ID.HTML) {\n\t        startTagInBody(p, token);\n\t    }\n\t    else {\n\t        tokenAfterAfterBody(p, token);\n\t    }\n\t}\n\tfunction tokenAfterAfterBody(p, token) {\n\t    p.insertionMode = InsertionMode.IN_BODY;\n\t    modeInBody(p, token);\n\t}\n\t// The \"after after frameset\" insertion mode\n\t//------------------------------------------------------------------\n\tfunction startTagAfterAfterFrameset(p, token) {\n\t    switch (token.tagID) {\n\t        case TAG_ID.HTML: {\n\t            startTagInBody(p, token);\n\t            break;\n\t        }\n\t        case TAG_ID.NOFRAMES: {\n\t            startTagInHead(p, token);\n\t            break;\n\t        }\n\t        // Do nothing\n\t    }\n\t}\n\t// The rules for parsing tokens in foreign content\n\t//------------------------------------------------------------------\n\tfunction nullCharacterInForeignContent(p, token) {\n\t    token.chars = REPLACEMENT_CHARACTER;\n\t    p._insertCharacters(token);\n\t}\n\tfunction characterInForeignContent(p, token) {\n\t    p._insertCharacters(token);\n\t    p.framesetOk = false;\n\t}\n\tfunction popUntilHtmlOrIntegrationPoint(p) {\n\t    while (p.treeAdapter.getNamespaceURI(p.openElements.current) !== NS.HTML &&\n\t        !p._isIntegrationPoint(p.openElements.currentTagId, p.openElements.current)) {\n\t        p.openElements.pop();\n\t    }\n\t}\n\tfunction startTagInForeignContent(p, token) {\n\t    if (causesExit(token)) {\n\t        popUntilHtmlOrIntegrationPoint(p);\n\t        p._startTagOutsideForeignContent(token);\n\t    }\n\t    else {\n\t        const current = p._getAdjustedCurrentElement();\n\t        const currentNs = p.treeAdapter.getNamespaceURI(current);\n\t        if (currentNs === NS.MATHML) {\n\t            adjustTokenMathMLAttrs(token);\n\t        }\n\t        else if (currentNs === NS.SVG) {\n\t            adjustTokenSVGTagName(token);\n\t            adjustTokenSVGAttrs(token);\n\t        }\n\t        adjustTokenXMLAttrs(token);\n\t        if (token.selfClosing) {\n\t            p._appendElement(token, currentNs);\n\t        }\n\t        else {\n\t            p._insertElement(token, currentNs);\n\t        }\n\t        token.ackSelfClosing = true;\n\t    }\n\t}\n\tfunction endTagInForeignContent(p, token) {\n\t    if (token.tagID === TAG_ID.P || token.tagID === TAG_ID.BR) {\n\t        popUntilHtmlOrIntegrationPoint(p);\n\t        p._endTagOutsideForeignContent(token);\n\t        return;\n\t    }\n\t    for (let i = p.openElements.stackTop; i > 0; i--) {\n\t        const element = p.openElements.items[i];\n\t        if (p.treeAdapter.getNamespaceURI(element) === NS.HTML) {\n\t            p._endTagOutsideForeignContent(token);\n\t            break;\n\t        }\n\t        const tagName = p.treeAdapter.getTagName(element);\n\t        if (tagName.toLowerCase() === token.tagName) {\n\t            //NOTE: update the token tag name for `_setEndLocation`.\n\t            token.tagName = tagName;\n\t            p.openElements.shortenToLength(i);\n\t            break;\n\t        }\n\t    }\n\t}\n\n\tvar _escape = createCommonjsModule(function (module, exports) {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\texports.escapeText = exports.escapeAttribute = exports.escapeUTF8 = exports.escape = exports.encodeXML = exports.getCodePoint = exports.xmlReplacer = void 0;\n\texports.xmlReplacer = /[\"&'<>$\\x80-\\uFFFF]/g;\n\tvar xmlCodeMap = new Map([\n\t    [34, \"&quot;\"],\n\t    [38, \"&amp;\"],\n\t    [39, \"&apos;\"],\n\t    [60, \"&lt;\"],\n\t    [62, \"&gt;\"],\n\t]);\n\t// For compatibility with node < 4, we wrap `codePointAt`\n\texports.getCodePoint = \n\t// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition\n\tString.prototype.codePointAt != null\n\t    ? function (str, index) { return str.codePointAt(index); }\n\t    : // http://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae\n\t        function (c, index) {\n\t            return (c.charCodeAt(index) & 0xfc00) === 0xd800\n\t                ? (c.charCodeAt(index) - 0xd800) * 0x400 +\n\t                    c.charCodeAt(index + 1) -\n\t                    0xdc00 +\n\t                    0x10000\n\t                : c.charCodeAt(index);\n\t        };\n\t/**\n\t * Encodes all non-ASCII characters, as well as characters not valid in XML\n\t * documents using XML entities.\n\t *\n\t * If a character has no equivalent entity, a\n\t * numeric hexadecimal reference (eg. `&#xfc;`) will be used.\n\t */\n\tfunction encodeXML(str) {\n\t    var ret = \"\";\n\t    var lastIdx = 0;\n\t    var match;\n\t    while ((match = exports.xmlReplacer.exec(str)) !== null) {\n\t        var i = match.index;\n\t        var char = str.charCodeAt(i);\n\t        var next = xmlCodeMap.get(char);\n\t        if (next !== undefined) {\n\t            ret += str.substring(lastIdx, i) + next;\n\t            lastIdx = i + 1;\n\t        }\n\t        else {\n\t            ret += \"\".concat(str.substring(lastIdx, i), \"&#x\").concat((0, exports.getCodePoint)(str, i).toString(16), \";\");\n\t            // Increase by 1 if we have a surrogate pair\n\t            lastIdx = exports.xmlReplacer.lastIndex += Number((char & 0xfc00) === 0xd800);\n\t        }\n\t    }\n\t    return ret + str.substr(lastIdx);\n\t}\n\texports.encodeXML = encodeXML;\n\t/**\n\t * Encodes all non-ASCII characters, as well as characters not valid in XML\n\t * documents using numeric hexadecimal reference (eg. `&#xfc;`).\n\t *\n\t * Have a look at `escapeUTF8` if you want a more concise output at the expense\n\t * of reduced transportability.\n\t *\n\t * @param data String to escape.\n\t */\n\texports.escape = encodeXML;\n\tfunction getEscaper(regex, map) {\n\t    return function escape(data) {\n\t        var match;\n\t        var lastIdx = 0;\n\t        var result = \"\";\n\t        while ((match = regex.exec(data))) {\n\t            if (lastIdx !== match.index) {\n\t                result += data.substring(lastIdx, match.index);\n\t            }\n\t            // We know that this chararcter will be in the map.\n\t            result += map.get(match[0].charCodeAt(0));\n\t            // Every match will be of length 1\n\t            lastIdx = match.index + 1;\n\t        }\n\t        return result + data.substring(lastIdx);\n\t    };\n\t}\n\t/**\n\t * Encodes all characters not valid in XML documents using XML entities.\n\t *\n\t * Note that the output will be character-set dependent.\n\t *\n\t * @param data String to escape.\n\t */\n\texports.escapeUTF8 = getEscaper(/[&<>'\"]/g, xmlCodeMap);\n\t/**\n\t * Encodes all characters that have to be escaped in HTML attributes,\n\t * following {@link https://html.spec.whatwg.org/multipage/parsing.html#escapingString}.\n\t *\n\t * @param data String to escape.\n\t */\n\texports.escapeAttribute = getEscaper(/[\"&\\u00A0]/g, new Map([\n\t    [34, \"&quot;\"],\n\t    [38, \"&amp;\"],\n\t    [160, \"&nbsp;\"],\n\t]));\n\t/**\n\t * Encodes all characters that have to be escaped in HTML text,\n\t * following {@link https://html.spec.whatwg.org/multipage/parsing.html#escapingString}.\n\t *\n\t * @param data String to escape.\n\t */\n\texports.escapeText = getEscaper(/[&<>\\u00A0]/g, new Map([\n\t    [38, \"&amp;\"],\n\t    [60, \"&lt;\"],\n\t    [62, \"&gt;\"],\n\t    [160, \"&nbsp;\"],\n\t]));\n\n\t});\n\n\tunwrapExports(_escape);\n\tvar _escape_1 = _escape.escapeText;\n\tvar _escape_2 = _escape.escapeAttribute;\n\tvar _escape_3 = _escape.escapeUTF8;\n\tvar _escape_4 = _escape.escape;\n\tvar _escape_5 = _escape.encodeXML;\n\tvar _escape_6 = _escape.getCodePoint;\n\tvar _escape_7 = _escape.xmlReplacer;\n\n\t// Sets\n\tconst VOID_ELEMENTS = new Set([\n\t    TAG_NAMES.AREA,\n\t    TAG_NAMES.BASE,\n\t    TAG_NAMES.BASEFONT,\n\t    TAG_NAMES.BGSOUND,\n\t    TAG_NAMES.BR,\n\t    TAG_NAMES.COL,\n\t    TAG_NAMES.EMBED,\n\t    TAG_NAMES.FRAME,\n\t    TAG_NAMES.HR,\n\t    TAG_NAMES.IMG,\n\t    TAG_NAMES.INPUT,\n\t    TAG_NAMES.KEYGEN,\n\t    TAG_NAMES.LINK,\n\t    TAG_NAMES.META,\n\t    TAG_NAMES.PARAM,\n\t    TAG_NAMES.SOURCE,\n\t    TAG_NAMES.TRACK,\n\t    TAG_NAMES.WBR,\n\t]);\n\tfunction isVoidElement(node, options) {\n\t    return (options.treeAdapter.isElementNode(node) &&\n\t        options.treeAdapter.getNamespaceURI(node) === NS.HTML &&\n\t        VOID_ELEMENTS.has(options.treeAdapter.getTagName(node)));\n\t}\n\tconst defaultOpts$2 = { treeAdapter: defaultTreeAdapter, scriptingEnabled: true };\n\t/**\n\t * Serializes an AST element node to an HTML string, including the element node.\n\t *\n\t * @example\n\t *\n\t * ```js\n\t * const parse5 = require('parse5');\n\t *\n\t * const document = parse5.parseFragment('<div>Hello, <b>world</b>!</div>');\n\t *\n\t * // Serializes the <div> element.\n\t * const html = parse5.serializeOuter(document.childNodes[0]);\n\t *\n\t * console.log(str); //> '<div>Hello, <b>world</b>!</div>'\n\t * ```\n\t *\n\t * @param node Node to serialize.\n\t * @param options Serialization options.\n\t */\n\tfunction serializeOuter(node, options) {\n\t    const opts = { ...defaultOpts$2, ...options };\n\t    return serializeNode(node, opts);\n\t}\n\tfunction serializeChildNodes(parentNode, options) {\n\t    let html = '';\n\t    // Get container of the child nodes\n\t    const container = options.treeAdapter.isElementNode(parentNode) &&\n\t        options.treeAdapter.getTagName(parentNode) === TAG_NAMES.TEMPLATE &&\n\t        options.treeAdapter.getNamespaceURI(parentNode) === NS.HTML\n\t        ? options.treeAdapter.getTemplateContent(parentNode)\n\t        : parentNode;\n\t    const childNodes = options.treeAdapter.getChildNodes(container);\n\t    if (childNodes) {\n\t        for (const currentNode of childNodes) {\n\t            html += serializeNode(currentNode, options);\n\t        }\n\t    }\n\t    return html;\n\t}\n\tfunction serializeNode(node, options) {\n\t    if (options.treeAdapter.isElementNode(node)) {\n\t        return serializeElement(node, options);\n\t    }\n\t    if (options.treeAdapter.isTextNode(node)) {\n\t        return serializeTextNode(node, options);\n\t    }\n\t    if (options.treeAdapter.isCommentNode(node)) {\n\t        return serializeCommentNode(node, options);\n\t    }\n\t    if (options.treeAdapter.isDocumentTypeNode(node)) {\n\t        return serializeDocumentTypeNode(node, options);\n\t    }\n\t    // Return an empty string for unknown nodes\n\t    return '';\n\t}\n\tfunction serializeElement(node, options) {\n\t    const tn = options.treeAdapter.getTagName(node);\n\t    return `<${tn}${serializeAttributes(node, options)}>${isVoidElement(node, options) ? '' : `${serializeChildNodes(node, options)}</${tn}>`}`;\n\t}\n\tfunction serializeAttributes(node, { treeAdapter }) {\n\t    let html = '';\n\t    for (const attr of treeAdapter.getAttrList(node)) {\n\t        html += ' ';\n\t        if (!attr.namespace) {\n\t            html += attr.name;\n\t        }\n\t        else\n\t            switch (attr.namespace) {\n\t                case NS.XML: {\n\t                    html += `xml:${attr.name}`;\n\t                    break;\n\t                }\n\t                case NS.XMLNS: {\n\t                    if (attr.name !== 'xmlns') {\n\t                        html += 'xmlns:';\n\t                    }\n\t                    html += attr.name;\n\t                    break;\n\t                }\n\t                case NS.XLINK: {\n\t                    html += `xlink:${attr.name}`;\n\t                    break;\n\t                }\n\t                default: {\n\t                    html += `${attr.prefix}:${attr.name}`;\n\t                }\n\t            }\n\t        html += `=\"${_escape_2(attr.value)}\"`;\n\t    }\n\t    return html;\n\t}\n\tfunction serializeTextNode(node, options) {\n\t    const { treeAdapter } = options;\n\t    const content = treeAdapter.getTextNodeContent(node);\n\t    const parent = treeAdapter.getParentNode(node);\n\t    const parentTn = parent && treeAdapter.isElementNode(parent) && treeAdapter.getTagName(parent);\n\t    return parentTn &&\n\t        treeAdapter.getNamespaceURI(parent) === NS.HTML &&\n\t        hasUnescapedText(parentTn, options.scriptingEnabled)\n\t        ? content\n\t        : _escape_1(content);\n\t}\n\tfunction serializeCommentNode(node, { treeAdapter }) {\n\t    return `<!--${treeAdapter.getCommentNodeContent(node)}-->`;\n\t}\n\tfunction serializeDocumentTypeNode(node, { treeAdapter }) {\n\t    return `<!DOCTYPE ${treeAdapter.getDocumentTypeNodeName(node)}>`;\n\t}\n\n\t// Shorthands\n\t/**\n\t * Parses an HTML string.\n\t *\n\t * @param html Input HTML string.\n\t * @param options Parsing options.\n\t * @returns Document\n\t *\n\t * @example\n\t *\n\t * ```js\n\t * const parse5 = require('parse5');\n\t *\n\t * const document = parse5.parse('<!DOCTYPE html><html><head></head><body>Hi there!</body></html>');\n\t *\n\t * console.log(document.childNodes[1].tagName); //> 'html'\n\t *```\n\t */\n\tfunction parse$3(html, options) {\n\t    return Parser.parse(html, options);\n\t}\n\tfunction parseFragment(fragmentContext, html, options) {\n\t    if (typeof fragmentContext === 'string') {\n\t        options = html;\n\t        html = fragmentContext;\n\t        fragmentContext = null;\n\t    }\n\t    const parser = Parser.getFragmentParser(fragmentContext, options);\n\t    parser.tokenizer.write(html, true);\n\t    return parser.getFragment();\n\t}\n\n\t// `Set` constructor\n\t// https://tc39.es/ecma262/#sec-set-objects\n\tcollection('Set', function (init) {\n\t  return function Set() { return init(this, arguments.length ? arguments[0] : undefined); };\n\t}, collectionStrong);\n\n\tvar set$2 = path.Set;\n\n\tvar set$3 = set$2;\n\n\tvar set$4 = set$3;\n\n\t/* eslint-disable es-x/no-array-prototype-lastindexof -- safe */\n\n\n\n\n\n\n\tvar min$4 = Math.min;\n\tvar $lastIndexOf = [].lastIndexOf;\n\tvar NEGATIVE_ZERO$1 = !!$lastIndexOf && 1 / [1].lastIndexOf(1, -0) < 0;\n\tvar STRICT_METHOD$5 = arrayMethodIsStrict('lastIndexOf');\n\tvar FORCED$6 = NEGATIVE_ZERO$1 || !STRICT_METHOD$5;\n\n\t// `Array.prototype.lastIndexOf` method implementation\n\t// https://tc39.es/ecma262/#sec-array.prototype.lastindexof\n\tvar arrayLastIndexOf = FORCED$6 ? function lastIndexOf(searchElement /* , fromIndex = @[*-1] */) {\n\t  // convert -0 to +0\n\t  if (NEGATIVE_ZERO$1) return functionApply($lastIndexOf, this, arguments) || 0;\n\t  var O = toIndexedObject(this);\n\t  var length = lengthOfArrayLike(O);\n\t  var index = length - 1;\n\t  if (arguments.length > 1) index = min$4(index, toIntegerOrInfinity(arguments[1]));\n\t  if (index < 0) index = length + index;\n\t  for (;index >= 0; index--) if (index in O && O[index] === searchElement) return index || 0;\n\t  return -1;\n\t} : $lastIndexOf;\n\n\t// `Array.prototype.lastIndexOf` method\n\t// https://tc39.es/ecma262/#sec-array.prototype.lastindexof\n\t// eslint-disable-next-line es-x/no-array-prototype-lastindexof -- required for testing\n\t_export({ target: 'Array', proto: true, forced: arrayLastIndexOf !== [].lastIndexOf }, {\n\t  lastIndexOf: arrayLastIndexOf\n\t});\n\n\tvar lastIndexOf = entryVirtual('Array').lastIndexOf;\n\n\tvar entries$3 = entryVirtual('Array').entries;\n\n\tvar map$b = map$5;\n\n\tvar UNDEFINED_CODE_POINTS$1 = new set$4([65534, 65535, 131070, 131071, 196606, 196607, 262142, 262143, 327678, 327679, 393214, 393215, 458750, 458751, 524286, 524287, 589822, 589823, 655358, 655359, 720894, 720895, 786430, 786431, 851966, 851967, 917502, 917503, 983038, 983039, 1048574, 1048575, 1114110, 1114111]);\n\tvar CODE_POINTS$1;\n\n\t(function (CODE_POINTS) {\n\t  CODE_POINTS[CODE_POINTS[\"EOF\"] = -1] = \"EOF\";\n\t  CODE_POINTS[CODE_POINTS[\"NULL\"] = 0] = \"NULL\";\n\t  CODE_POINTS[CODE_POINTS[\"TABULATION\"] = 9] = \"TABULATION\";\n\t  CODE_POINTS[CODE_POINTS[\"CARRIAGE_RETURN\"] = 13] = \"CARRIAGE_RETURN\";\n\t  CODE_POINTS[CODE_POINTS[\"LINE_FEED\"] = 10] = \"LINE_FEED\";\n\t  CODE_POINTS[CODE_POINTS[\"FORM_FEED\"] = 12] = \"FORM_FEED\";\n\t  CODE_POINTS[CODE_POINTS[\"SPACE\"] = 32] = \"SPACE\";\n\t  CODE_POINTS[CODE_POINTS[\"EXCLAMATION_MARK\"] = 33] = \"EXCLAMATION_MARK\";\n\t  CODE_POINTS[CODE_POINTS[\"QUOTATION_MARK\"] = 34] = \"QUOTATION_MARK\";\n\t  CODE_POINTS[CODE_POINTS[\"NUMBER_SIGN\"] = 35] = \"NUMBER_SIGN\";\n\t  CODE_POINTS[CODE_POINTS[\"AMPERSAND\"] = 38] = \"AMPERSAND\";\n\t  CODE_POINTS[CODE_POINTS[\"APOSTROPHE\"] = 39] = \"APOSTROPHE\";\n\t  CODE_POINTS[CODE_POINTS[\"HYPHEN_MINUS\"] = 45] = \"HYPHEN_MINUS\";\n\t  CODE_POINTS[CODE_POINTS[\"SOLIDUS\"] = 47] = \"SOLIDUS\";\n\t  CODE_POINTS[CODE_POINTS[\"DIGIT_0\"] = 48] = \"DIGIT_0\";\n\t  CODE_POINTS[CODE_POINTS[\"DIGIT_9\"] = 57] = \"DIGIT_9\";\n\t  CODE_POINTS[CODE_POINTS[\"SEMICOLON\"] = 59] = \"SEMICOLON\";\n\t  CODE_POINTS[CODE_POINTS[\"LESS_THAN_SIGN\"] = 60] = \"LESS_THAN_SIGN\";\n\t  CODE_POINTS[CODE_POINTS[\"EQUALS_SIGN\"] = 61] = \"EQUALS_SIGN\";\n\t  CODE_POINTS[CODE_POINTS[\"GREATER_THAN_SIGN\"] = 62] = \"GREATER_THAN_SIGN\";\n\t  CODE_POINTS[CODE_POINTS[\"QUESTION_MARK\"] = 63] = \"QUESTION_MARK\";\n\t  CODE_POINTS[CODE_POINTS[\"LATIN_CAPITAL_A\"] = 65] = \"LATIN_CAPITAL_A\";\n\t  CODE_POINTS[CODE_POINTS[\"LATIN_CAPITAL_F\"] = 70] = \"LATIN_CAPITAL_F\";\n\t  CODE_POINTS[CODE_POINTS[\"LATIN_CAPITAL_X\"] = 88] = \"LATIN_CAPITAL_X\";\n\t  CODE_POINTS[CODE_POINTS[\"LATIN_CAPITAL_Z\"] = 90] = \"LATIN_CAPITAL_Z\";\n\t  CODE_POINTS[CODE_POINTS[\"RIGHT_SQUARE_BRACKET\"] = 93] = \"RIGHT_SQUARE_BRACKET\";\n\t  CODE_POINTS[CODE_POINTS[\"GRAVE_ACCENT\"] = 96] = \"GRAVE_ACCENT\";\n\t  CODE_POINTS[CODE_POINTS[\"LATIN_SMALL_A\"] = 97] = \"LATIN_SMALL_A\";\n\t  CODE_POINTS[CODE_POINTS[\"LATIN_SMALL_F\"] = 102] = \"LATIN_SMALL_F\";\n\t  CODE_POINTS[CODE_POINTS[\"LATIN_SMALL_X\"] = 120] = \"LATIN_SMALL_X\";\n\t  CODE_POINTS[CODE_POINTS[\"LATIN_SMALL_Z\"] = 122] = \"LATIN_SMALL_Z\";\n\t  CODE_POINTS[CODE_POINTS[\"REPLACEMENT_CHARACTER\"] = 65533] = \"REPLACEMENT_CHARACTER\";\n\t})(CODE_POINTS$1 || (CODE_POINTS$1 = {}));\n\n\tvar ERR$1;\n\n\t(function (ERR) {\n\t  ERR[\"controlCharacterInInputStream\"] = \"control-character-in-input-stream\";\n\t  ERR[\"noncharacterInInputStream\"] = \"noncharacter-in-input-stream\";\n\t  ERR[\"surrogateInInputStream\"] = \"surrogate-in-input-stream\";\n\t  ERR[\"nonVoidHtmlElementStartTagWithTrailingSolidus\"] = \"non-void-html-element-start-tag-with-trailing-solidus\";\n\t  ERR[\"endTagWithAttributes\"] = \"end-tag-with-attributes\";\n\t  ERR[\"endTagWithTrailingSolidus\"] = \"end-tag-with-trailing-solidus\";\n\t  ERR[\"unexpectedSolidusInTag\"] = \"unexpected-solidus-in-tag\";\n\t  ERR[\"unexpectedNullCharacter\"] = \"unexpected-null-character\";\n\t  ERR[\"unexpectedQuestionMarkInsteadOfTagName\"] = \"unexpected-question-mark-instead-of-tag-name\";\n\t  ERR[\"invalidFirstCharacterOfTagName\"] = \"invalid-first-character-of-tag-name\";\n\t  ERR[\"unexpectedEqualsSignBeforeAttributeName\"] = \"unexpected-equals-sign-before-attribute-name\";\n\t  ERR[\"missingEndTagName\"] = \"missing-end-tag-name\";\n\t  ERR[\"unexpectedCharacterInAttributeName\"] = \"unexpected-character-in-attribute-name\";\n\t  ERR[\"unknownNamedCharacterReference\"] = \"unknown-named-character-reference\";\n\t  ERR[\"missingSemicolonAfterCharacterReference\"] = \"missing-semicolon-after-character-reference\";\n\t  ERR[\"unexpectedCharacterAfterDoctypeSystemIdentifier\"] = \"unexpected-character-after-doctype-system-identifier\";\n\t  ERR[\"unexpectedCharacterInUnquotedAttributeValue\"] = \"unexpected-character-in-unquoted-attribute-value\";\n\t  ERR[\"eofBeforeTagName\"] = \"eof-before-tag-name\";\n\t  ERR[\"eofInTag\"] = \"eof-in-tag\";\n\t  ERR[\"missingAttributeValue\"] = \"missing-attribute-value\";\n\t  ERR[\"missingWhitespaceBetweenAttributes\"] = \"missing-whitespace-between-attributes\";\n\t  ERR[\"missingWhitespaceAfterDoctypePublicKeyword\"] = \"missing-whitespace-after-doctype-public-keyword\";\n\t  ERR[\"missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers\"] = \"missing-whitespace-between-doctype-public-and-system-identifiers\";\n\t  ERR[\"missingWhitespaceAfterDoctypeSystemKeyword\"] = \"missing-whitespace-after-doctype-system-keyword\";\n\t  ERR[\"missingQuoteBeforeDoctypePublicIdentifier\"] = \"missing-quote-before-doctype-public-identifier\";\n\t  ERR[\"missingQuoteBeforeDoctypeSystemIdentifier\"] = \"missing-quote-before-doctype-system-identifier\";\n\t  ERR[\"missingDoctypePublicIdentifier\"] = \"missing-doctype-public-identifier\";\n\t  ERR[\"missingDoctypeSystemIdentifier\"] = \"missing-doctype-system-identifier\";\n\t  ERR[\"abruptDoctypePublicIdentifier\"] = \"abrupt-doctype-public-identifier\";\n\t  ERR[\"abruptDoctypeSystemIdentifier\"] = \"abrupt-doctype-system-identifier\";\n\t  ERR[\"cdataInHtmlContent\"] = \"cdata-in-html-content\";\n\t  ERR[\"incorrectlyOpenedComment\"] = \"incorrectly-opened-comment\";\n\t  ERR[\"eofInScriptHtmlCommentLikeText\"] = \"eof-in-script-html-comment-like-text\";\n\t  ERR[\"eofInDoctype\"] = \"eof-in-doctype\";\n\t  ERR[\"nestedComment\"] = \"nested-comment\";\n\t  ERR[\"abruptClosingOfEmptyComment\"] = \"abrupt-closing-of-empty-comment\";\n\t  ERR[\"eofInComment\"] = \"eof-in-comment\";\n\t  ERR[\"incorrectlyClosedComment\"] = \"incorrectly-closed-comment\";\n\t  ERR[\"eofInCdata\"] = \"eof-in-cdata\";\n\t  ERR[\"absenceOfDigitsInNumericCharacterReference\"] = \"absence-of-digits-in-numeric-character-reference\";\n\t  ERR[\"nullCharacterReference\"] = \"null-character-reference\";\n\t  ERR[\"surrogateCharacterReference\"] = \"surrogate-character-reference\";\n\t  ERR[\"characterReferenceOutsideUnicodeRange\"] = \"character-reference-outside-unicode-range\";\n\t  ERR[\"controlCharacterReference\"] = \"control-character-reference\";\n\t  ERR[\"noncharacterCharacterReference\"] = \"noncharacter-character-reference\";\n\t  ERR[\"missingWhitespaceBeforeDoctypeName\"] = \"missing-whitespace-before-doctype-name\";\n\t  ERR[\"missingDoctypeName\"] = \"missing-doctype-name\";\n\t  ERR[\"invalidCharacterSequenceAfterDoctypeName\"] = \"invalid-character-sequence-after-doctype-name\";\n\t  ERR[\"duplicateAttribute\"] = \"duplicate-attribute\";\n\t  ERR[\"nonConformingDoctype\"] = \"non-conforming-doctype\";\n\t  ERR[\"missingDoctype\"] = \"missing-doctype\";\n\t  ERR[\"misplacedDoctype\"] = \"misplaced-doctype\";\n\t  ERR[\"endTagWithoutMatchingOpenElement\"] = \"end-tag-without-matching-open-element\";\n\t  ERR[\"closingOfElementWithOpenChildElements\"] = \"closing-of-element-with-open-child-elements\";\n\t  ERR[\"disallowedContentInNoscriptInHead\"] = \"disallowed-content-in-noscript-in-head\";\n\t  ERR[\"openElementsLeftAfterEof\"] = \"open-elements-left-after-eof\";\n\t  ERR[\"abandonedHeadElementChild\"] = \"abandoned-head-element-child\";\n\t  ERR[\"misplacedStartTagForHeadElement\"] = \"misplaced-start-tag-for-head-element\";\n\t  ERR[\"nestedNoscriptInHead\"] = \"nested-noscript-in-head\";\n\t  ERR[\"eofInElementThatCanContainOnlyText\"] = \"eof-in-element-that-can-contain-only-text\";\n\t})(ERR$1 || (ERR$1 = {}));\n\n\tvar TokenType$1;\n\n\t(function (TokenType) {\n\t  TokenType[TokenType[\"CHARACTER\"] = 0] = \"CHARACTER\";\n\t  TokenType[TokenType[\"NULL_CHARACTER\"] = 1] = \"NULL_CHARACTER\";\n\t  TokenType[TokenType[\"WHITESPACE_CHARACTER\"] = 2] = \"WHITESPACE_CHARACTER\";\n\t  TokenType[TokenType[\"START_TAG\"] = 3] = \"START_TAG\";\n\t  TokenType[TokenType[\"END_TAG\"] = 4] = \"END_TAG\";\n\t  TokenType[TokenType[\"COMMENT\"] = 5] = \"COMMENT\";\n\t  TokenType[TokenType[\"DOCTYPE\"] = 6] = \"DOCTYPE\";\n\t  TokenType[TokenType[\"EOF\"] = 7] = \"EOF\";\n\t  TokenType[TokenType[\"HIBERNATION\"] = 8] = \"HIBERNATION\";\n\t})(TokenType$1 || (TokenType$1 = {}));\n\n\tvar _SPECIAL_ELEMENTS;\n\n\t/** All valid namespaces in HTML. */\n\tvar NS$1;\n\n\t(function (NS) {\n\t  NS[\"HTML\"] = \"http://www.w3.org/1999/xhtml\";\n\t  NS[\"MATHML\"] = \"http://www.w3.org/1998/Math/MathML\";\n\t  NS[\"SVG\"] = \"http://www.w3.org/2000/svg\";\n\t  NS[\"XLINK\"] = \"http://www.w3.org/1999/xlink\";\n\t  NS[\"XML\"] = \"http://www.w3.org/XML/1998/namespace\";\n\t  NS[\"XMLNS\"] = \"http://www.w3.org/2000/xmlns/\";\n\t})(NS$1 || (NS$1 = {}));\n\n\tvar ATTRS$1;\n\n\t(function (ATTRS) {\n\t  ATTRS[\"TYPE\"] = \"type\";\n\t  ATTRS[\"ACTION\"] = \"action\";\n\t  ATTRS[\"ENCODING\"] = \"encoding\";\n\t  ATTRS[\"PROMPT\"] = \"prompt\";\n\t  ATTRS[\"NAME\"] = \"name\";\n\t  ATTRS[\"COLOR\"] = \"color\";\n\t  ATTRS[\"FACE\"] = \"face\";\n\t  ATTRS[\"SIZE\"] = \"size\";\n\t})(ATTRS$1 || (ATTRS$1 = {}));\n\t/**\n\t * The mode of the document.\n\t *\n\t * @see {@link https://dom.spec.whatwg.org/#concept-document-limited-quirks}\n\t */\n\n\n\tvar DOCUMENT_MODE$1;\n\n\t(function (DOCUMENT_MODE) {\n\t  DOCUMENT_MODE[\"NO_QUIRKS\"] = \"no-quirks\";\n\t  DOCUMENT_MODE[\"QUIRKS\"] = \"quirks\";\n\t  DOCUMENT_MODE[\"LIMITED_QUIRKS\"] = \"limited-quirks\";\n\t})(DOCUMENT_MODE$1 || (DOCUMENT_MODE$1 = {}));\n\n\tvar TAG_NAMES$1;\n\n\t(function (TAG_NAMES) {\n\t  TAG_NAMES[\"A\"] = \"a\";\n\t  TAG_NAMES[\"ADDRESS\"] = \"address\";\n\t  TAG_NAMES[\"ANNOTATION_XML\"] = \"annotation-xml\";\n\t  TAG_NAMES[\"APPLET\"] = \"applet\";\n\t  TAG_NAMES[\"AREA\"] = \"area\";\n\t  TAG_NAMES[\"ARTICLE\"] = \"article\";\n\t  TAG_NAMES[\"ASIDE\"] = \"aside\";\n\t  TAG_NAMES[\"B\"] = \"b\";\n\t  TAG_NAMES[\"BASE\"] = \"base\";\n\t  TAG_NAMES[\"BASEFONT\"] = \"basefont\";\n\t  TAG_NAMES[\"BGSOUND\"] = \"bgsound\";\n\t  TAG_NAMES[\"BIG\"] = \"big\";\n\t  TAG_NAMES[\"BLOCKQUOTE\"] = \"blockquote\";\n\t  TAG_NAMES[\"BODY\"] = \"body\";\n\t  TAG_NAMES[\"BR\"] = \"br\";\n\t  TAG_NAMES[\"BUTTON\"] = \"button\";\n\t  TAG_NAMES[\"CAPTION\"] = \"caption\";\n\t  TAG_NAMES[\"CENTER\"] = \"center\";\n\t  TAG_NAMES[\"CODE\"] = \"code\";\n\t  TAG_NAMES[\"COL\"] = \"col\";\n\t  TAG_NAMES[\"COLGROUP\"] = \"colgroup\";\n\t  TAG_NAMES[\"DD\"] = \"dd\";\n\t  TAG_NAMES[\"DESC\"] = \"desc\";\n\t  TAG_NAMES[\"DETAILS\"] = \"details\";\n\t  TAG_NAMES[\"DIALOG\"] = \"dialog\";\n\t  TAG_NAMES[\"DIR\"] = \"dir\";\n\t  TAG_NAMES[\"DIV\"] = \"div\";\n\t  TAG_NAMES[\"DL\"] = \"dl\";\n\t  TAG_NAMES[\"DT\"] = \"dt\";\n\t  TAG_NAMES[\"EM\"] = \"em\";\n\t  TAG_NAMES[\"EMBED\"] = \"embed\";\n\t  TAG_NAMES[\"FIELDSET\"] = \"fieldset\";\n\t  TAG_NAMES[\"FIGCAPTION\"] = \"figcaption\";\n\t  TAG_NAMES[\"FIGURE\"] = \"figure\";\n\t  TAG_NAMES[\"FONT\"] = \"font\";\n\t  TAG_NAMES[\"FOOTER\"] = \"footer\";\n\t  TAG_NAMES[\"FOREIGN_OBJECT\"] = \"foreignObject\";\n\t  TAG_NAMES[\"FORM\"] = \"form\";\n\t  TAG_NAMES[\"FRAME\"] = \"frame\";\n\t  TAG_NAMES[\"FRAMESET\"] = \"frameset\";\n\t  TAG_NAMES[\"H1\"] = \"h1\";\n\t  TAG_NAMES[\"H2\"] = \"h2\";\n\t  TAG_NAMES[\"H3\"] = \"h3\";\n\t  TAG_NAMES[\"H4\"] = \"h4\";\n\t  TAG_NAMES[\"H5\"] = \"h5\";\n\t  TAG_NAMES[\"H6\"] = \"h6\";\n\t  TAG_NAMES[\"HEAD\"] = \"head\";\n\t  TAG_NAMES[\"HEADER\"] = \"header\";\n\t  TAG_NAMES[\"HGROUP\"] = \"hgroup\";\n\t  TAG_NAMES[\"HR\"] = \"hr\";\n\t  TAG_NAMES[\"HTML\"] = \"html\";\n\t  TAG_NAMES[\"I\"] = \"i\";\n\t  TAG_NAMES[\"IMG\"] = \"img\";\n\t  TAG_NAMES[\"IMAGE\"] = \"image\";\n\t  TAG_NAMES[\"INPUT\"] = \"input\";\n\t  TAG_NAMES[\"IFRAME\"] = \"iframe\";\n\t  TAG_NAMES[\"KEYGEN\"] = \"keygen\";\n\t  TAG_NAMES[\"LABEL\"] = \"label\";\n\t  TAG_NAMES[\"LI\"] = \"li\";\n\t  TAG_NAMES[\"LINK\"] = \"link\";\n\t  TAG_NAMES[\"LISTING\"] = \"listing\";\n\t  TAG_NAMES[\"MAIN\"] = \"main\";\n\t  TAG_NAMES[\"MALIGNMARK\"] = \"malignmark\";\n\t  TAG_NAMES[\"MARQUEE\"] = \"marquee\";\n\t  TAG_NAMES[\"MATH\"] = \"math\";\n\t  TAG_NAMES[\"MENU\"] = \"menu\";\n\t  TAG_NAMES[\"META\"] = \"meta\";\n\t  TAG_NAMES[\"MGLYPH\"] = \"mglyph\";\n\t  TAG_NAMES[\"MI\"] = \"mi\";\n\t  TAG_NAMES[\"MO\"] = \"mo\";\n\t  TAG_NAMES[\"MN\"] = \"mn\";\n\t  TAG_NAMES[\"MS\"] = \"ms\";\n\t  TAG_NAMES[\"MTEXT\"] = \"mtext\";\n\t  TAG_NAMES[\"NAV\"] = \"nav\";\n\t  TAG_NAMES[\"NOBR\"] = \"nobr\";\n\t  TAG_NAMES[\"NOFRAMES\"] = \"noframes\";\n\t  TAG_NAMES[\"NOEMBED\"] = \"noembed\";\n\t  TAG_NAMES[\"NOSCRIPT\"] = \"noscript\";\n\t  TAG_NAMES[\"OBJECT\"] = \"object\";\n\t  TAG_NAMES[\"OL\"] = \"ol\";\n\t  TAG_NAMES[\"OPTGROUP\"] = \"optgroup\";\n\t  TAG_NAMES[\"OPTION\"] = \"option\";\n\t  TAG_NAMES[\"P\"] = \"p\";\n\t  TAG_NAMES[\"PARAM\"] = \"param\";\n\t  TAG_NAMES[\"PLAINTEXT\"] = \"plaintext\";\n\t  TAG_NAMES[\"PRE\"] = \"pre\";\n\t  TAG_NAMES[\"RB\"] = \"rb\";\n\t  TAG_NAMES[\"RP\"] = \"rp\";\n\t  TAG_NAMES[\"RT\"] = \"rt\";\n\t  TAG_NAMES[\"RTC\"] = \"rtc\";\n\t  TAG_NAMES[\"RUBY\"] = \"ruby\";\n\t  TAG_NAMES[\"S\"] = \"s\";\n\t  TAG_NAMES[\"SCRIPT\"] = \"script\";\n\t  TAG_NAMES[\"SECTION\"] = \"section\";\n\t  TAG_NAMES[\"SELECT\"] = \"select\";\n\t  TAG_NAMES[\"SOURCE\"] = \"source\";\n\t  TAG_NAMES[\"SMALL\"] = \"small\";\n\t  TAG_NAMES[\"SPAN\"] = \"span\";\n\t  TAG_NAMES[\"STRIKE\"] = \"strike\";\n\t  TAG_NAMES[\"STRONG\"] = \"strong\";\n\t  TAG_NAMES[\"STYLE\"] = \"style\";\n\t  TAG_NAMES[\"SUB\"] = \"sub\";\n\t  TAG_NAMES[\"SUMMARY\"] = \"summary\";\n\t  TAG_NAMES[\"SUP\"] = \"sup\";\n\t  TAG_NAMES[\"TABLE\"] = \"table\";\n\t  TAG_NAMES[\"TBODY\"] = \"tbody\";\n\t  TAG_NAMES[\"TEMPLATE\"] = \"template\";\n\t  TAG_NAMES[\"TEXTAREA\"] = \"textarea\";\n\t  TAG_NAMES[\"TFOOT\"] = \"tfoot\";\n\t  TAG_NAMES[\"TD\"] = \"td\";\n\t  TAG_NAMES[\"TH\"] = \"th\";\n\t  TAG_NAMES[\"THEAD\"] = \"thead\";\n\t  TAG_NAMES[\"TITLE\"] = \"title\";\n\t  TAG_NAMES[\"TR\"] = \"tr\";\n\t  TAG_NAMES[\"TRACK\"] = \"track\";\n\t  TAG_NAMES[\"TT\"] = \"tt\";\n\t  TAG_NAMES[\"U\"] = \"u\";\n\t  TAG_NAMES[\"UL\"] = \"ul\";\n\t  TAG_NAMES[\"SVG\"] = \"svg\";\n\t  TAG_NAMES[\"VAR\"] = \"var\";\n\t  TAG_NAMES[\"WBR\"] = \"wbr\";\n\t  TAG_NAMES[\"XMP\"] = \"xmp\";\n\t})(TAG_NAMES$1 || (TAG_NAMES$1 = {}));\n\t/**\n\t * Tag IDs are numeric IDs for known tag names.\n\t *\n\t * We use tag IDs to improve the performance of tag name comparisons.\n\t */\n\n\n\tvar TAG_ID$1;\n\n\t(function (TAG_ID) {\n\t  TAG_ID[TAG_ID[\"UNKNOWN\"] = 0] = \"UNKNOWN\";\n\t  TAG_ID[TAG_ID[\"A\"] = 1] = \"A\";\n\t  TAG_ID[TAG_ID[\"ADDRESS\"] = 2] = \"ADDRESS\";\n\t  TAG_ID[TAG_ID[\"ANNOTATION_XML\"] = 3] = \"ANNOTATION_XML\";\n\t  TAG_ID[TAG_ID[\"APPLET\"] = 4] = \"APPLET\";\n\t  TAG_ID[TAG_ID[\"AREA\"] = 5] = \"AREA\";\n\t  TAG_ID[TAG_ID[\"ARTICLE\"] = 6] = \"ARTICLE\";\n\t  TAG_ID[TAG_ID[\"ASIDE\"] = 7] = \"ASIDE\";\n\t  TAG_ID[TAG_ID[\"B\"] = 8] = \"B\";\n\t  TAG_ID[TAG_ID[\"BASE\"] = 9] = \"BASE\";\n\t  TAG_ID[TAG_ID[\"BASEFONT\"] = 10] = \"BASEFONT\";\n\t  TAG_ID[TAG_ID[\"BGSOUND\"] = 11] = \"BGSOUND\";\n\t  TAG_ID[TAG_ID[\"BIG\"] = 12] = \"BIG\";\n\t  TAG_ID[TAG_ID[\"BLOCKQUOTE\"] = 13] = \"BLOCKQUOTE\";\n\t  TAG_ID[TAG_ID[\"BODY\"] = 14] = \"BODY\";\n\t  TAG_ID[TAG_ID[\"BR\"] = 15] = \"BR\";\n\t  TAG_ID[TAG_ID[\"BUTTON\"] = 16] = \"BUTTON\";\n\t  TAG_ID[TAG_ID[\"CAPTION\"] = 17] = \"CAPTION\";\n\t  TAG_ID[TAG_ID[\"CENTER\"] = 18] = \"CENTER\";\n\t  TAG_ID[TAG_ID[\"CODE\"] = 19] = \"CODE\";\n\t  TAG_ID[TAG_ID[\"COL\"] = 20] = \"COL\";\n\t  TAG_ID[TAG_ID[\"COLGROUP\"] = 21] = \"COLGROUP\";\n\t  TAG_ID[TAG_ID[\"DD\"] = 22] = \"DD\";\n\t  TAG_ID[TAG_ID[\"DESC\"] = 23] = \"DESC\";\n\t  TAG_ID[TAG_ID[\"DETAILS\"] = 24] = \"DETAILS\";\n\t  TAG_ID[TAG_ID[\"DIALOG\"] = 25] = \"DIALOG\";\n\t  TAG_ID[TAG_ID[\"DIR\"] = 26] = \"DIR\";\n\t  TAG_ID[TAG_ID[\"DIV\"] = 27] = \"DIV\";\n\t  TAG_ID[TAG_ID[\"DL\"] = 28] = \"DL\";\n\t  TAG_ID[TAG_ID[\"DT\"] = 29] = \"DT\";\n\t  TAG_ID[TAG_ID[\"EM\"] = 30] = \"EM\";\n\t  TAG_ID[TAG_ID[\"EMBED\"] = 31] = \"EMBED\";\n\t  TAG_ID[TAG_ID[\"FIELDSET\"] = 32] = \"FIELDSET\";\n\t  TAG_ID[TAG_ID[\"FIGCAPTION\"] = 33] = \"FIGCAPTION\";\n\t  TAG_ID[TAG_ID[\"FIGURE\"] = 34] = \"FIGURE\";\n\t  TAG_ID[TAG_ID[\"FONT\"] = 35] = \"FONT\";\n\t  TAG_ID[TAG_ID[\"FOOTER\"] = 36] = \"FOOTER\";\n\t  TAG_ID[TAG_ID[\"FOREIGN_OBJECT\"] = 37] = \"FOREIGN_OBJECT\";\n\t  TAG_ID[TAG_ID[\"FORM\"] = 38] = \"FORM\";\n\t  TAG_ID[TAG_ID[\"FRAME\"] = 39] = \"FRAME\";\n\t  TAG_ID[TAG_ID[\"FRAMESET\"] = 40] = \"FRAMESET\";\n\t  TAG_ID[TAG_ID[\"H1\"] = 41] = \"H1\";\n\t  TAG_ID[TAG_ID[\"H2\"] = 42] = \"H2\";\n\t  TAG_ID[TAG_ID[\"H3\"] = 43] = \"H3\";\n\t  TAG_ID[TAG_ID[\"H4\"] = 44] = \"H4\";\n\t  TAG_ID[TAG_ID[\"H5\"] = 45] = \"H5\";\n\t  TAG_ID[TAG_ID[\"H6\"] = 46] = \"H6\";\n\t  TAG_ID[TAG_ID[\"HEAD\"] = 47] = \"HEAD\";\n\t  TAG_ID[TAG_ID[\"HEADER\"] = 48] = \"HEADER\";\n\t  TAG_ID[TAG_ID[\"HGROUP\"] = 49] = \"HGROUP\";\n\t  TAG_ID[TAG_ID[\"HR\"] = 50] = \"HR\";\n\t  TAG_ID[TAG_ID[\"HTML\"] = 51] = \"HTML\";\n\t  TAG_ID[TAG_ID[\"I\"] = 52] = \"I\";\n\t  TAG_ID[TAG_ID[\"IMG\"] = 53] = \"IMG\";\n\t  TAG_ID[TAG_ID[\"IMAGE\"] = 54] = \"IMAGE\";\n\t  TAG_ID[TAG_ID[\"INPUT\"] = 55] = \"INPUT\";\n\t  TAG_ID[TAG_ID[\"IFRAME\"] = 56] = \"IFRAME\";\n\t  TAG_ID[TAG_ID[\"KEYGEN\"] = 57] = \"KEYGEN\";\n\t  TAG_ID[TAG_ID[\"LABEL\"] = 58] = \"LABEL\";\n\t  TAG_ID[TAG_ID[\"LI\"] = 59] = \"LI\";\n\t  TAG_ID[TAG_ID[\"LINK\"] = 60] = \"LINK\";\n\t  TAG_ID[TAG_ID[\"LISTING\"] = 61] = \"LISTING\";\n\t  TAG_ID[TAG_ID[\"MAIN\"] = 62] = \"MAIN\";\n\t  TAG_ID[TAG_ID[\"MALIGNMARK\"] = 63] = \"MALIGNMARK\";\n\t  TAG_ID[TAG_ID[\"MARQUEE\"] = 64] = \"MARQUEE\";\n\t  TAG_ID[TAG_ID[\"MATH\"] = 65] = \"MATH\";\n\t  TAG_ID[TAG_ID[\"MENU\"] = 66] = \"MENU\";\n\t  TAG_ID[TAG_ID[\"META\"] = 67] = \"META\";\n\t  TAG_ID[TAG_ID[\"MGLYPH\"] = 68] = \"MGLYPH\";\n\t  TAG_ID[TAG_ID[\"MI\"] = 69] = \"MI\";\n\t  TAG_ID[TAG_ID[\"MO\"] = 70] = \"MO\";\n\t  TAG_ID[TAG_ID[\"MN\"] = 71] = \"MN\";\n\t  TAG_ID[TAG_ID[\"MS\"] = 72] = \"MS\";\n\t  TAG_ID[TAG_ID[\"MTEXT\"] = 73] = \"MTEXT\";\n\t  TAG_ID[TAG_ID[\"NAV\"] = 74] = \"NAV\";\n\t  TAG_ID[TAG_ID[\"NOBR\"] = 75] = \"NOBR\";\n\t  TAG_ID[TAG_ID[\"NOFRAMES\"] = 76] = \"NOFRAMES\";\n\t  TAG_ID[TAG_ID[\"NOEMBED\"] = 77] = \"NOEMBED\";\n\t  TAG_ID[TAG_ID[\"NOSCRIPT\"] = 78] = \"NOSCRIPT\";\n\t  TAG_ID[TAG_ID[\"OBJECT\"] = 79] = \"OBJECT\";\n\t  TAG_ID[TAG_ID[\"OL\"] = 80] = \"OL\";\n\t  TAG_ID[TAG_ID[\"OPTGROUP\"] = 81] = \"OPTGROUP\";\n\t  TAG_ID[TAG_ID[\"OPTION\"] = 82] = \"OPTION\";\n\t  TAG_ID[TAG_ID[\"P\"] = 83] = \"P\";\n\t  TAG_ID[TAG_ID[\"PARAM\"] = 84] = \"PARAM\";\n\t  TAG_ID[TAG_ID[\"PLAINTEXT\"] = 85] = \"PLAINTEXT\";\n\t  TAG_ID[TAG_ID[\"PRE\"] = 86] = \"PRE\";\n\t  TAG_ID[TAG_ID[\"RB\"] = 87] = \"RB\";\n\t  TAG_ID[TAG_ID[\"RP\"] = 88] = \"RP\";\n\t  TAG_ID[TAG_ID[\"RT\"] = 89] = \"RT\";\n\t  TAG_ID[TAG_ID[\"RTC\"] = 90] = \"RTC\";\n\t  TAG_ID[TAG_ID[\"RUBY\"] = 91] = \"RUBY\";\n\t  TAG_ID[TAG_ID[\"S\"] = 92] = \"S\";\n\t  TAG_ID[TAG_ID[\"SCRIPT\"] = 93] = \"SCRIPT\";\n\t  TAG_ID[TAG_ID[\"SECTION\"] = 94] = \"SECTION\";\n\t  TAG_ID[TAG_ID[\"SELECT\"] = 95] = \"SELECT\";\n\t  TAG_ID[TAG_ID[\"SOURCE\"] = 96] = \"SOURCE\";\n\t  TAG_ID[TAG_ID[\"SMALL\"] = 97] = \"SMALL\";\n\t  TAG_ID[TAG_ID[\"SPAN\"] = 98] = \"SPAN\";\n\t  TAG_ID[TAG_ID[\"STRIKE\"] = 99] = \"STRIKE\";\n\t  TAG_ID[TAG_ID[\"STRONG\"] = 100] = \"STRONG\";\n\t  TAG_ID[TAG_ID[\"STYLE\"] = 101] = \"STYLE\";\n\t  TAG_ID[TAG_ID[\"SUB\"] = 102] = \"SUB\";\n\t  TAG_ID[TAG_ID[\"SUMMARY\"] = 103] = \"SUMMARY\";\n\t  TAG_ID[TAG_ID[\"SUP\"] = 104] = \"SUP\";\n\t  TAG_ID[TAG_ID[\"TABLE\"] = 105] = \"TABLE\";\n\t  TAG_ID[TAG_ID[\"TBODY\"] = 106] = \"TBODY\";\n\t  TAG_ID[TAG_ID[\"TEMPLATE\"] = 107] = \"TEMPLATE\";\n\t  TAG_ID[TAG_ID[\"TEXTAREA\"] = 108] = \"TEXTAREA\";\n\t  TAG_ID[TAG_ID[\"TFOOT\"] = 109] = \"TFOOT\";\n\t  TAG_ID[TAG_ID[\"TD\"] = 110] = \"TD\";\n\t  TAG_ID[TAG_ID[\"TH\"] = 111] = \"TH\";\n\t  TAG_ID[TAG_ID[\"THEAD\"] = 112] = \"THEAD\";\n\t  TAG_ID[TAG_ID[\"TITLE\"] = 113] = \"TITLE\";\n\t  TAG_ID[TAG_ID[\"TR\"] = 114] = \"TR\";\n\t  TAG_ID[TAG_ID[\"TRACK\"] = 115] = \"TRACK\";\n\t  TAG_ID[TAG_ID[\"TT\"] = 116] = \"TT\";\n\t  TAG_ID[TAG_ID[\"U\"] = 117] = \"U\";\n\t  TAG_ID[TAG_ID[\"UL\"] = 118] = \"UL\";\n\t  TAG_ID[TAG_ID[\"SVG\"] = 119] = \"SVG\";\n\t  TAG_ID[TAG_ID[\"VAR\"] = 120] = \"VAR\";\n\t  TAG_ID[TAG_ID[\"WBR\"] = 121] = \"WBR\";\n\t  TAG_ID[TAG_ID[\"XMP\"] = 122] = \"XMP\";\n\t})(TAG_ID$1 || (TAG_ID$1 = {}));\n\n\tvar TAG_NAME_TO_ID$1 = new map$b([[TAG_NAMES$1.A, TAG_ID$1.A], [TAG_NAMES$1.ADDRESS, TAG_ID$1.ADDRESS], [TAG_NAMES$1.ANNOTATION_XML, TAG_ID$1.ANNOTATION_XML], [TAG_NAMES$1.APPLET, TAG_ID$1.APPLET], [TAG_NAMES$1.AREA, TAG_ID$1.AREA], [TAG_NAMES$1.ARTICLE, TAG_ID$1.ARTICLE], [TAG_NAMES$1.ASIDE, TAG_ID$1.ASIDE], [TAG_NAMES$1.B, TAG_ID$1.B], [TAG_NAMES$1.BASE, TAG_ID$1.BASE], [TAG_NAMES$1.BASEFONT, TAG_ID$1.BASEFONT], [TAG_NAMES$1.BGSOUND, TAG_ID$1.BGSOUND], [TAG_NAMES$1.BIG, TAG_ID$1.BIG], [TAG_NAMES$1.BLOCKQUOTE, TAG_ID$1.BLOCKQUOTE], [TAG_NAMES$1.BODY, TAG_ID$1.BODY], [TAG_NAMES$1.BR, TAG_ID$1.BR], [TAG_NAMES$1.BUTTON, TAG_ID$1.BUTTON], [TAG_NAMES$1.CAPTION, TAG_ID$1.CAPTION], [TAG_NAMES$1.CENTER, TAG_ID$1.CENTER], [TAG_NAMES$1.CODE, TAG_ID$1.CODE], [TAG_NAMES$1.COL, TAG_ID$1.COL], [TAG_NAMES$1.COLGROUP, TAG_ID$1.COLGROUP], [TAG_NAMES$1.DD, TAG_ID$1.DD], [TAG_NAMES$1.DESC, TAG_ID$1.DESC], [TAG_NAMES$1.DETAILS, TAG_ID$1.DETAILS], [TAG_NAMES$1.DIALOG, TAG_ID$1.DIALOG], [TAG_NAMES$1.DIR, TAG_ID$1.DIR], [TAG_NAMES$1.DIV, TAG_ID$1.DIV], [TAG_NAMES$1.DL, TAG_ID$1.DL], [TAG_NAMES$1.DT, TAG_ID$1.DT], [TAG_NAMES$1.EM, TAG_ID$1.EM], [TAG_NAMES$1.EMBED, TAG_ID$1.EMBED], [TAG_NAMES$1.FIELDSET, TAG_ID$1.FIELDSET], [TAG_NAMES$1.FIGCAPTION, TAG_ID$1.FIGCAPTION], [TAG_NAMES$1.FIGURE, TAG_ID$1.FIGURE], [TAG_NAMES$1.FONT, TAG_ID$1.FONT], [TAG_NAMES$1.FOOTER, TAG_ID$1.FOOTER], [TAG_NAMES$1.FOREIGN_OBJECT, TAG_ID$1.FOREIGN_OBJECT], [TAG_NAMES$1.FORM, TAG_ID$1.FORM], [TAG_NAMES$1.FRAME, TAG_ID$1.FRAME], [TAG_NAMES$1.FRAMESET, TAG_ID$1.FRAMESET], [TAG_NAMES$1.H1, TAG_ID$1.H1], [TAG_NAMES$1.H2, TAG_ID$1.H2], [TAG_NAMES$1.H3, TAG_ID$1.H3], [TAG_NAMES$1.H4, TAG_ID$1.H4], [TAG_NAMES$1.H5, TAG_ID$1.H5], [TAG_NAMES$1.H6, TAG_ID$1.H6], [TAG_NAMES$1.HEAD, TAG_ID$1.HEAD], [TAG_NAMES$1.HEADER, TAG_ID$1.HEADER], [TAG_NAMES$1.HGROUP, TAG_ID$1.HGROUP], [TAG_NAMES$1.HR, TAG_ID$1.HR], [TAG_NAMES$1.HTML, TAG_ID$1.HTML], [TAG_NAMES$1.I, TAG_ID$1.I], [TAG_NAMES$1.IMG, TAG_ID$1.IMG], [TAG_NAMES$1.IMAGE, TAG_ID$1.IMAGE], [TAG_NAMES$1.INPUT, TAG_ID$1.INPUT], [TAG_NAMES$1.IFRAME, TAG_ID$1.IFRAME], [TAG_NAMES$1.KEYGEN, TAG_ID$1.KEYGEN], [TAG_NAMES$1.LABEL, TAG_ID$1.LABEL], [TAG_NAMES$1.LI, TAG_ID$1.LI], [TAG_NAMES$1.LINK, TAG_ID$1.LINK], [TAG_NAMES$1.LISTING, TAG_ID$1.LISTING], [TAG_NAMES$1.MAIN, TAG_ID$1.MAIN], [TAG_NAMES$1.MALIGNMARK, TAG_ID$1.MALIGNMARK], [TAG_NAMES$1.MARQUEE, TAG_ID$1.MARQUEE], [TAG_NAMES$1.MATH, TAG_ID$1.MATH], [TAG_NAMES$1.MENU, TAG_ID$1.MENU], [TAG_NAMES$1.META, TAG_ID$1.META], [TAG_NAMES$1.MGLYPH, TAG_ID$1.MGLYPH], [TAG_NAMES$1.MI, TAG_ID$1.MI], [TAG_NAMES$1.MO, TAG_ID$1.MO], [TAG_NAMES$1.MN, TAG_ID$1.MN], [TAG_NAMES$1.MS, TAG_ID$1.MS], [TAG_NAMES$1.MTEXT, TAG_ID$1.MTEXT], [TAG_NAMES$1.NAV, TAG_ID$1.NAV], [TAG_NAMES$1.NOBR, TAG_ID$1.NOBR], [TAG_NAMES$1.NOFRAMES, TAG_ID$1.NOFRAMES], [TAG_NAMES$1.NOEMBED, TAG_ID$1.NOEMBED], [TAG_NAMES$1.NOSCRIPT, TAG_ID$1.NOSCRIPT], [TAG_NAMES$1.OBJECT, TAG_ID$1.OBJECT], [TAG_NAMES$1.OL, TAG_ID$1.OL], [TAG_NAMES$1.OPTGROUP, TAG_ID$1.OPTGROUP], [TAG_NAMES$1.OPTION, TAG_ID$1.OPTION], [TAG_NAMES$1.P, TAG_ID$1.P], [TAG_NAMES$1.PARAM, TAG_ID$1.PARAM], [TAG_NAMES$1.PLAINTEXT, TAG_ID$1.PLAINTEXT], [TAG_NAMES$1.PRE, TAG_ID$1.PRE], [TAG_NAMES$1.RB, TAG_ID$1.RB], [TAG_NAMES$1.RP, TAG_ID$1.RP], [TAG_NAMES$1.RT, TAG_ID$1.RT], [TAG_NAMES$1.RTC, TAG_ID$1.RTC], [TAG_NAMES$1.RUBY, TAG_ID$1.RUBY], [TAG_NAMES$1.S, TAG_ID$1.S], [TAG_NAMES$1.SCRIPT, TAG_ID$1.SCRIPT], [TAG_NAMES$1.SECTION, TAG_ID$1.SECTION], [TAG_NAMES$1.SELECT, TAG_ID$1.SELECT], [TAG_NAMES$1.SOURCE, TAG_ID$1.SOURCE], [TAG_NAMES$1.SMALL, TAG_ID$1.SMALL], [TAG_NAMES$1.SPAN, TAG_ID$1.SPAN], [TAG_NAMES$1.STRIKE, TAG_ID$1.STRIKE], [TAG_NAMES$1.STRONG, TAG_ID$1.STRONG], [TAG_NAMES$1.STYLE, TAG_ID$1.STYLE], [TAG_NAMES$1.SUB, TAG_ID$1.SUB], [TAG_NAMES$1.SUMMARY, TAG_ID$1.SUMMARY], [TAG_NAMES$1.SUP, TAG_ID$1.SUP], [TAG_NAMES$1.TABLE, TAG_ID$1.TABLE], [TAG_NAMES$1.TBODY, TAG_ID$1.TBODY], [TAG_NAMES$1.TEMPLATE, TAG_ID$1.TEMPLATE], [TAG_NAMES$1.TEXTAREA, TAG_ID$1.TEXTAREA], [TAG_NAMES$1.TFOOT, TAG_ID$1.TFOOT], [TAG_NAMES$1.TD, TAG_ID$1.TD], [TAG_NAMES$1.TH, TAG_ID$1.TH], [TAG_NAMES$1.THEAD, TAG_ID$1.THEAD], [TAG_NAMES$1.TITLE, TAG_ID$1.TITLE], [TAG_NAMES$1.TR, TAG_ID$1.TR], [TAG_NAMES$1.TRACK, TAG_ID$1.TRACK], [TAG_NAMES$1.TT, TAG_ID$1.TT], [TAG_NAMES$1.U, TAG_ID$1.U], [TAG_NAMES$1.UL, TAG_ID$1.UL], [TAG_NAMES$1.SVG, TAG_ID$1.SVG], [TAG_NAMES$1.VAR, TAG_ID$1.VAR], [TAG_NAMES$1.WBR, TAG_ID$1.WBR], [TAG_NAMES$1.XMP, TAG_ID$1.XMP]]);\n\tvar $$1 = TAG_ID$1;\n\tvar SPECIAL_ELEMENTS$1 = (_SPECIAL_ELEMENTS = {}, _defineProperty(_SPECIAL_ELEMENTS, NS$1.HTML, new set$4([$$1.ADDRESS, $$1.APPLET, $$1.AREA, $$1.ARTICLE, $$1.ASIDE, $$1.BASE, $$1.BASEFONT, $$1.BGSOUND, $$1.BLOCKQUOTE, $$1.BODY, $$1.BR, $$1.BUTTON, $$1.CAPTION, $$1.CENTER, $$1.COL, $$1.COLGROUP, $$1.DD, $$1.DETAILS, $$1.DIR, $$1.DIV, $$1.DL, $$1.DT, $$1.EMBED, $$1.FIELDSET, $$1.FIGCAPTION, $$1.FIGURE, $$1.FOOTER, $$1.FORM, $$1.FRAME, $$1.FRAMESET, $$1.H1, $$1.H2, $$1.H3, $$1.H4, $$1.H5, $$1.H6, $$1.HEAD, $$1.HEADER, $$1.HGROUP, $$1.HR, $$1.HTML, $$1.IFRAME, $$1.IMG, $$1.INPUT, $$1.LI, $$1.LINK, $$1.LISTING, $$1.MAIN, $$1.MARQUEE, $$1.MENU, $$1.META, $$1.NAV, $$1.NOEMBED, $$1.NOFRAMES, $$1.NOSCRIPT, $$1.OBJECT, $$1.OL, $$1.P, $$1.PARAM, $$1.PLAINTEXT, $$1.PRE, $$1.SCRIPT, $$1.SECTION, $$1.SELECT, $$1.SOURCE, $$1.STYLE, $$1.SUMMARY, $$1.TABLE, $$1.TBODY, $$1.TD, $$1.TEMPLATE, $$1.TEXTAREA, $$1.TFOOT, $$1.TH, $$1.THEAD, $$1.TITLE, $$1.TR, $$1.TRACK, $$1.UL, $$1.WBR, $$1.XMP])), _defineProperty(_SPECIAL_ELEMENTS, NS$1.MATHML, new set$4([$$1.MI, $$1.MO, $$1.MN, $$1.MS, $$1.MTEXT, $$1.ANNOTATION_XML])), _defineProperty(_SPECIAL_ELEMENTS, NS$1.SVG, new set$4([$$1.TITLE, $$1.FOREIGN_OBJECT, $$1.DESC])), _defineProperty(_SPECIAL_ELEMENTS, NS$1.XLINK, new set$4()), _defineProperty(_SPECIAL_ELEMENTS, NS$1.XML, new set$4()), _defineProperty(_SPECIAL_ELEMENTS, NS$1.XMLNS, new set$4()), _SPECIAL_ELEMENTS);\n\tvar UNESCAPED_TEXT$1 = new set$4([TAG_NAMES$1.STYLE, TAG_NAMES$1.SCRIPT, TAG_NAMES$1.XMP, TAG_NAMES$1.IFRAME, TAG_NAMES$1.NOEMBED, TAG_NAMES$1.NOFRAMES, TAG_NAMES$1.PLAINTEXT]);\n\n\tvar C1_CONTROLS_REFERENCE_REPLACEMENTS$1 = new map$b([[0x80, 8364], [0x82, 8218], [0x83, 402], [0x84, 8222], [0x85, 8230], [0x86, 8224], [0x87, 8225], [0x88, 710], [0x89, 8240], [0x8a, 352], [0x8b, 8249], [0x8c, 338], [0x8e, 381], [0x91, 8216], [0x92, 8217], [0x93, 8220], [0x94, 8221], [0x95, 8226], [0x96, 8211], [0x97, 8212], [0x98, 732], [0x99, 8482], [0x9a, 353], [0x9b, 8250], [0x9c, 339], [0x9e, 382], [0x9f, 376]]); //States\n\n\tvar State$1;\n\n\t(function (State) {\n\t  State[State[\"DATA\"] = 0] = \"DATA\";\n\t  State[State[\"RCDATA\"] = 1] = \"RCDATA\";\n\t  State[State[\"RAWTEXT\"] = 2] = \"RAWTEXT\";\n\t  State[State[\"SCRIPT_DATA\"] = 3] = \"SCRIPT_DATA\";\n\t  State[State[\"PLAINTEXT\"] = 4] = \"PLAINTEXT\";\n\t  State[State[\"TAG_OPEN\"] = 5] = \"TAG_OPEN\";\n\t  State[State[\"END_TAG_OPEN\"] = 6] = \"END_TAG_OPEN\";\n\t  State[State[\"TAG_NAME\"] = 7] = \"TAG_NAME\";\n\t  State[State[\"RCDATA_LESS_THAN_SIGN\"] = 8] = \"RCDATA_LESS_THAN_SIGN\";\n\t  State[State[\"RCDATA_END_TAG_OPEN\"] = 9] = \"RCDATA_END_TAG_OPEN\";\n\t  State[State[\"RCDATA_END_TAG_NAME\"] = 10] = \"RCDATA_END_TAG_NAME\";\n\t  State[State[\"RAWTEXT_LESS_THAN_SIGN\"] = 11] = \"RAWTEXT_LESS_THAN_SIGN\";\n\t  State[State[\"RAWTEXT_END_TAG_OPEN\"] = 12] = \"RAWTEXT_END_TAG_OPEN\";\n\t  State[State[\"RAWTEXT_END_TAG_NAME\"] = 13] = \"RAWTEXT_END_TAG_NAME\";\n\t  State[State[\"SCRIPT_DATA_LESS_THAN_SIGN\"] = 14] = \"SCRIPT_DATA_LESS_THAN_SIGN\";\n\t  State[State[\"SCRIPT_DATA_END_TAG_OPEN\"] = 15] = \"SCRIPT_DATA_END_TAG_OPEN\";\n\t  State[State[\"SCRIPT_DATA_END_TAG_NAME\"] = 16] = \"SCRIPT_DATA_END_TAG_NAME\";\n\t  State[State[\"SCRIPT_DATA_ESCAPE_START\"] = 17] = \"SCRIPT_DATA_ESCAPE_START\";\n\t  State[State[\"SCRIPT_DATA_ESCAPE_START_DASH\"] = 18] = \"SCRIPT_DATA_ESCAPE_START_DASH\";\n\t  State[State[\"SCRIPT_DATA_ESCAPED\"] = 19] = \"SCRIPT_DATA_ESCAPED\";\n\t  State[State[\"SCRIPT_DATA_ESCAPED_DASH\"] = 20] = \"SCRIPT_DATA_ESCAPED_DASH\";\n\t  State[State[\"SCRIPT_DATA_ESCAPED_DASH_DASH\"] = 21] = \"SCRIPT_DATA_ESCAPED_DASH_DASH\";\n\t  State[State[\"SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN\"] = 22] = \"SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN\";\n\t  State[State[\"SCRIPT_DATA_ESCAPED_END_TAG_OPEN\"] = 23] = \"SCRIPT_DATA_ESCAPED_END_TAG_OPEN\";\n\t  State[State[\"SCRIPT_DATA_ESCAPED_END_TAG_NAME\"] = 24] = \"SCRIPT_DATA_ESCAPED_END_TAG_NAME\";\n\t  State[State[\"SCRIPT_DATA_DOUBLE_ESCAPE_START\"] = 25] = \"SCRIPT_DATA_DOUBLE_ESCAPE_START\";\n\t  State[State[\"SCRIPT_DATA_DOUBLE_ESCAPED\"] = 26] = \"SCRIPT_DATA_DOUBLE_ESCAPED\";\n\t  State[State[\"SCRIPT_DATA_DOUBLE_ESCAPED_DASH\"] = 27] = \"SCRIPT_DATA_DOUBLE_ESCAPED_DASH\";\n\t  State[State[\"SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH\"] = 28] = \"SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH\";\n\t  State[State[\"SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN\"] = 29] = \"SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN\";\n\t  State[State[\"SCRIPT_DATA_DOUBLE_ESCAPE_END\"] = 30] = \"SCRIPT_DATA_DOUBLE_ESCAPE_END\";\n\t  State[State[\"BEFORE_ATTRIBUTE_NAME\"] = 31] = \"BEFORE_ATTRIBUTE_NAME\";\n\t  State[State[\"ATTRIBUTE_NAME\"] = 32] = \"ATTRIBUTE_NAME\";\n\t  State[State[\"AFTER_ATTRIBUTE_NAME\"] = 33] = \"AFTER_ATTRIBUTE_NAME\";\n\t  State[State[\"BEFORE_ATTRIBUTE_VALUE\"] = 34] = \"BEFORE_ATTRIBUTE_VALUE\";\n\t  State[State[\"ATTRIBUTE_VALUE_DOUBLE_QUOTED\"] = 35] = \"ATTRIBUTE_VALUE_DOUBLE_QUOTED\";\n\t  State[State[\"ATTRIBUTE_VALUE_SINGLE_QUOTED\"] = 36] = \"ATTRIBUTE_VALUE_SINGLE_QUOTED\";\n\t  State[State[\"ATTRIBUTE_VALUE_UNQUOTED\"] = 37] = \"ATTRIBUTE_VALUE_UNQUOTED\";\n\t  State[State[\"AFTER_ATTRIBUTE_VALUE_QUOTED\"] = 38] = \"AFTER_ATTRIBUTE_VALUE_QUOTED\";\n\t  State[State[\"SELF_CLOSING_START_TAG\"] = 39] = \"SELF_CLOSING_START_TAG\";\n\t  State[State[\"BOGUS_COMMENT\"] = 40] = \"BOGUS_COMMENT\";\n\t  State[State[\"MARKUP_DECLARATION_OPEN\"] = 41] = \"MARKUP_DECLARATION_OPEN\";\n\t  State[State[\"COMMENT_START\"] = 42] = \"COMMENT_START\";\n\t  State[State[\"COMMENT_START_DASH\"] = 43] = \"COMMENT_START_DASH\";\n\t  State[State[\"COMMENT\"] = 44] = \"COMMENT\";\n\t  State[State[\"COMMENT_LESS_THAN_SIGN\"] = 45] = \"COMMENT_LESS_THAN_SIGN\";\n\t  State[State[\"COMMENT_LESS_THAN_SIGN_BANG\"] = 46] = \"COMMENT_LESS_THAN_SIGN_BANG\";\n\t  State[State[\"COMMENT_LESS_THAN_SIGN_BANG_DASH\"] = 47] = \"COMMENT_LESS_THAN_SIGN_BANG_DASH\";\n\t  State[State[\"COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH\"] = 48] = \"COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH\";\n\t  State[State[\"COMMENT_END_DASH\"] = 49] = \"COMMENT_END_DASH\";\n\t  State[State[\"COMMENT_END\"] = 50] = \"COMMENT_END\";\n\t  State[State[\"COMMENT_END_BANG\"] = 51] = \"COMMENT_END_BANG\";\n\t  State[State[\"DOCTYPE\"] = 52] = \"DOCTYPE\";\n\t  State[State[\"BEFORE_DOCTYPE_NAME\"] = 53] = \"BEFORE_DOCTYPE_NAME\";\n\t  State[State[\"DOCTYPE_NAME\"] = 54] = \"DOCTYPE_NAME\";\n\t  State[State[\"AFTER_DOCTYPE_NAME\"] = 55] = \"AFTER_DOCTYPE_NAME\";\n\t  State[State[\"AFTER_DOCTYPE_PUBLIC_KEYWORD\"] = 56] = \"AFTER_DOCTYPE_PUBLIC_KEYWORD\";\n\t  State[State[\"BEFORE_DOCTYPE_PUBLIC_IDENTIFIER\"] = 57] = \"BEFORE_DOCTYPE_PUBLIC_IDENTIFIER\";\n\t  State[State[\"DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED\"] = 58] = \"DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED\";\n\t  State[State[\"DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED\"] = 59] = \"DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED\";\n\t  State[State[\"AFTER_DOCTYPE_PUBLIC_IDENTIFIER\"] = 60] = \"AFTER_DOCTYPE_PUBLIC_IDENTIFIER\";\n\t  State[State[\"BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS\"] = 61] = \"BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS\";\n\t  State[State[\"AFTER_DOCTYPE_SYSTEM_KEYWORD\"] = 62] = \"AFTER_DOCTYPE_SYSTEM_KEYWORD\";\n\t  State[State[\"BEFORE_DOCTYPE_SYSTEM_IDENTIFIER\"] = 63] = \"BEFORE_DOCTYPE_SYSTEM_IDENTIFIER\";\n\t  State[State[\"DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED\"] = 64] = \"DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED\";\n\t  State[State[\"DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED\"] = 65] = \"DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED\";\n\t  State[State[\"AFTER_DOCTYPE_SYSTEM_IDENTIFIER\"] = 66] = \"AFTER_DOCTYPE_SYSTEM_IDENTIFIER\";\n\t  State[State[\"BOGUS_DOCTYPE\"] = 67] = \"BOGUS_DOCTYPE\";\n\t  State[State[\"CDATA_SECTION\"] = 68] = \"CDATA_SECTION\";\n\t  State[State[\"CDATA_SECTION_BRACKET\"] = 69] = \"CDATA_SECTION_BRACKET\";\n\t  State[State[\"CDATA_SECTION_END\"] = 70] = \"CDATA_SECTION_END\";\n\t  State[State[\"CHARACTER_REFERENCE\"] = 71] = \"CHARACTER_REFERENCE\";\n\t  State[State[\"NAMED_CHARACTER_REFERENCE\"] = 72] = \"NAMED_CHARACTER_REFERENCE\";\n\t  State[State[\"AMBIGUOUS_AMPERSAND\"] = 73] = \"AMBIGUOUS_AMPERSAND\";\n\t  State[State[\"NUMERIC_CHARACTER_REFERENCE\"] = 74] = \"NUMERIC_CHARACTER_REFERENCE\";\n\t  State[State[\"HEXADEMICAL_CHARACTER_REFERENCE_START\"] = 75] = \"HEXADEMICAL_CHARACTER_REFERENCE_START\";\n\t  State[State[\"DECIMAL_CHARACTER_REFERENCE_START\"] = 76] = \"DECIMAL_CHARACTER_REFERENCE_START\";\n\t  State[State[\"HEXADEMICAL_CHARACTER_REFERENCE\"] = 77] = \"HEXADEMICAL_CHARACTER_REFERENCE\";\n\t  State[State[\"DECIMAL_CHARACTER_REFERENCE\"] = 78] = \"DECIMAL_CHARACTER_REFERENCE\";\n\t  State[State[\"NUMERIC_CHARACTER_REFERENCE_END\"] = 79] = \"NUMERIC_CHARACTER_REFERENCE_END\";\n\t})(State$1 || (State$1 = {})); //Tokenizer initial states for different modes\n\n\n\tvar TokenizerMode$1 = {\n\t  DATA: State$1.DATA,\n\t  RCDATA: State$1.RCDATA,\n\t  RAWTEXT: State$1.RAWTEXT,\n\t  SCRIPT_DATA: State$1.SCRIPT_DATA,\n\t  PLAINTEXT: State$1.PLAINTEXT,\n\t  CDATA_SECTION: State$1.CDATA_SECTION\n\t}; //Utils\n\n\tvar _context$1;\n\n\tvar IMPLICIT_END_TAG_REQUIRED$1 = new set$4([TAG_ID$1.DD, TAG_ID$1.DT, TAG_ID$1.LI, TAG_ID$1.OPTGROUP, TAG_ID$1.OPTION, TAG_ID$1.P, TAG_ID$1.RB, TAG_ID$1.RP, TAG_ID$1.RT, TAG_ID$1.RTC]);\n\tvar IMPLICIT_END_TAG_REQUIRED_THOROUGHLY$1 = new set$4(concat$5(_context$1 = []).call(_context$1, _toConsumableArray(IMPLICIT_END_TAG_REQUIRED$1), [TAG_ID$1.CAPTION, TAG_ID$1.COLGROUP, TAG_ID$1.TBODY, TAG_ID$1.TD, TAG_ID$1.TFOOT, TAG_ID$1.TH, TAG_ID$1.THEAD, TAG_ID$1.TR]));\n\tvar SCOPING_ELEMENT_NS$1 = new map$b([[TAG_ID$1.APPLET, NS$1.HTML], [TAG_ID$1.CAPTION, NS$1.HTML], [TAG_ID$1.HTML, NS$1.HTML], [TAG_ID$1.MARQUEE, NS$1.HTML], [TAG_ID$1.OBJECT, NS$1.HTML], [TAG_ID$1.TABLE, NS$1.HTML], [TAG_ID$1.TD, NS$1.HTML], [TAG_ID$1.TEMPLATE, NS$1.HTML], [TAG_ID$1.TH, NS$1.HTML], [TAG_ID$1.ANNOTATION_XML, NS$1.MATHML], [TAG_ID$1.MI, NS$1.MATHML], [TAG_ID$1.MN, NS$1.MATHML], [TAG_ID$1.MO, NS$1.MATHML], [TAG_ID$1.MS, NS$1.MATHML], [TAG_ID$1.MTEXT, NS$1.MATHML], [TAG_ID$1.DESC, NS$1.SVG], [TAG_ID$1.FOREIGN_OBJECT, NS$1.SVG], [TAG_ID$1.TITLE, NS$1.SVG]]);\n\tvar NAMED_HEADERS$1 = [TAG_ID$1.H1, TAG_ID$1.H2, TAG_ID$1.H3, TAG_ID$1.H4, TAG_ID$1.H5, TAG_ID$1.H6];\n\tvar TABLE_ROW_CONTEXT$1 = [TAG_ID$1.TR, TAG_ID$1.TEMPLATE, TAG_ID$1.HTML];\n\tvar TABLE_BODY_CONTEXT$1 = [TAG_ID$1.TBODY, TAG_ID$1.TFOOT, TAG_ID$1.THEAD, TAG_ID$1.TEMPLATE, TAG_ID$1.HTML];\n\tvar TABLE_CONTEXT$1 = [TAG_ID$1.TABLE, TAG_ID$1.TEMPLATE, TAG_ID$1.HTML];\n\tvar TABLE_CELLS$1 = [TAG_ID$1.TD, TAG_ID$1.TH]; //Stack of open elements\n\n\tvar EntryType$1;\n\n\t(function (EntryType) {\n\t  EntryType[EntryType[\"Marker\"] = 0] = \"Marker\";\n\t  EntryType[EntryType[\"Element\"] = 1] = \"Element\";\n\t})(EntryType$1 || (EntryType$1 = {}));\n\n\tvar MARKER$1 = {\n\t  type: EntryType$1.Marker\n\t}; //List of formatting elements\n\n\tvar NodeType$1;\n\n\t(function (NodeType) {\n\t  NodeType[\"Document\"] = \"#document\";\n\t  NodeType[\"DocumentFragment\"] = \"#document-fragment\";\n\t  NodeType[\"Comment\"] = \"#comment\";\n\t  NodeType[\"Text\"] = \"#text\";\n\t  NodeType[\"DocumentType\"] = \"#documentType\";\n\t})(NodeType$1 || (NodeType$1 = {}));\n\n\tvar _context$2, _context2$1;\n\tvar QUIRKS_MODE_PUBLIC_ID_PREFIXES$1 = ['+//silmaril//dtd html pro v0r11 19970101//', '-//as//dtd html 3.0 aswedit + extensions//', '-//advasoft ltd//dtd html 3.0 aswedit + extensions//', '-//ietf//dtd html 2.0 level 1//', '-//ietf//dtd html 2.0 level 2//', '-//ietf//dtd html 2.0 strict level 1//', '-//ietf//dtd html 2.0 strict level 2//', '-//ietf//dtd html 2.0 strict//', '-//ietf//dtd html 2.0//', '-//ietf//dtd html 2.1e//', '-//ietf//dtd html 3.0//', '-//ietf//dtd html 3.2 final//', '-//ietf//dtd html 3.2//', '-//ietf//dtd html 3//', '-//ietf//dtd html level 0//', '-//ietf//dtd html level 1//', '-//ietf//dtd html level 2//', '-//ietf//dtd html level 3//', '-//ietf//dtd html strict level 0//', '-//ietf//dtd html strict level 1//', '-//ietf//dtd html strict level 2//', '-//ietf//dtd html strict level 3//', '-//ietf//dtd html strict//', '-//ietf//dtd html//', '-//metrius//dtd metrius presentational//', '-//microsoft//dtd internet explorer 2.0 html strict//', '-//microsoft//dtd internet explorer 2.0 html//', '-//microsoft//dtd internet explorer 2.0 tables//', '-//microsoft//dtd internet explorer 3.0 html strict//', '-//microsoft//dtd internet explorer 3.0 html//', '-//microsoft//dtd internet explorer 3.0 tables//', '-//netscape comm. corp.//dtd html//', '-//netscape comm. corp.//dtd strict html//', \"-//o'reilly and associates//dtd html 2.0//\", \"-//o'reilly and associates//dtd html extended 1.0//\", \"-//o'reilly and associates//dtd html extended relaxed 1.0//\", '-//sq//dtd html 2.0 hotmetal + extensions//', '-//softquad software//dtd hotmetal pro 6.0::19990601::extensions to html 4.0//', '-//softquad//dtd hotmetal pro 4.0::19971010::extensions to html 4.0//', '-//spyglass//dtd html 2.0 extended//', '-//sun microsystems corp.//dtd hotjava html//', '-//sun microsystems corp.//dtd hotjava strict html//', '-//w3c//dtd html 3 1995-03-24//', '-//w3c//dtd html 3.2 draft//', '-//w3c//dtd html 3.2 final//', '-//w3c//dtd html 3.2//', '-//w3c//dtd html 3.2s draft//', '-//w3c//dtd html 4.0 frameset//', '-//w3c//dtd html 4.0 transitional//', '-//w3c//dtd html experimental 19960712//', '-//w3c//dtd html experimental 970421//', '-//w3c//dtd w3 html//', '-//w3o//dtd w3 html 3.0//', '-//webtechs//dtd mozilla html 2.0//', '-//webtechs//dtd mozilla html//'];\n\n\tvar QUIRKS_MODE_NO_SYSTEM_ID_PUBLIC_ID_PREFIXES$1 = concat$5(_context$2 = []).call(_context$2, QUIRKS_MODE_PUBLIC_ID_PREFIXES$1, ['-//w3c//dtd html 4.01 frameset//', '-//w3c//dtd html 4.01 transitional//']);\n\n\tvar QUIRKS_MODE_PUBLIC_IDS$1 = new set$4(['-//w3o//dtd w3 html strict 3.0//en//', '-/w3c/dtd html 4.0 transitional/en', 'html']);\n\tvar LIMITED_QUIRKS_PUBLIC_ID_PREFIXES$1 = ['-//w3c//dtd xhtml 1.0 frameset//', '-//w3c//dtd xhtml 1.0 transitional//'];\n\n\tvar LIMITED_QUIRKS_WITH_SYSTEM_ID_PUBLIC_ID_PREFIXES$1 = concat$5(_context2$1 = []).call(_context2$1, LIMITED_QUIRKS_PUBLIC_ID_PREFIXES$1, ['-//w3c//dtd html 4.01 frameset//', '-//w3c//dtd html 4.01 transitional//']); //Utils\n\n\tvar _context$3, _context2$2;\n\tvar SVG_ATTRS_ADJUSTMENT_MAP$1 = new map$b(map$3(_context$3 = ['attributeName', 'attributeType', 'baseFrequency', 'baseProfile', 'calcMode', 'clipPathUnits', 'diffuseConstant', 'edgeMode', 'filterUnits', 'glyphRef', 'gradientTransform', 'gradientUnits', 'kernelMatrix', 'kernelUnitLength', 'keyPoints', 'keySplines', 'keyTimes', 'lengthAdjust', 'limitingConeAngle', 'markerHeight', 'markerUnits', 'markerWidth', 'maskContentUnits', 'maskUnits', 'numOctaves', 'pathLength', 'patternContentUnits', 'patternTransform', 'patternUnits', 'pointsAtX', 'pointsAtY', 'pointsAtZ', 'preserveAlpha', 'preserveAspectRatio', 'primitiveUnits', 'refX', 'refY', 'repeatCount', 'repeatDur', 'requiredExtensions', 'requiredFeatures', 'specularConstant', 'specularExponent', 'spreadMethod', 'startOffset', 'stdDeviation', 'stitchTiles', 'surfaceScale', 'systemLanguage', 'tableValues', 'targetX', 'targetY', 'textLength', 'viewBox', 'viewTarget', 'xChannelSelector', 'yChannelSelector', 'zoomAndPan']).call(_context$3, function (attr) {\n\t  return [attr.toLowerCase(), attr];\n\t}));\n\tvar XML_ATTRS_ADJUSTMENT_MAP$1 = new map$b([['xlink:actuate', {\n\t  prefix: 'xlink',\n\t  name: 'actuate',\n\t  namespace: NS$1.XLINK\n\t}], ['xlink:arcrole', {\n\t  prefix: 'xlink',\n\t  name: 'arcrole',\n\t  namespace: NS$1.XLINK\n\t}], ['xlink:href', {\n\t  prefix: 'xlink',\n\t  name: 'href',\n\t  namespace: NS$1.XLINK\n\t}], ['xlink:role', {\n\t  prefix: 'xlink',\n\t  name: 'role',\n\t  namespace: NS$1.XLINK\n\t}], ['xlink:show', {\n\t  prefix: 'xlink',\n\t  name: 'show',\n\t  namespace: NS$1.XLINK\n\t}], ['xlink:title', {\n\t  prefix: 'xlink',\n\t  name: 'title',\n\t  namespace: NS$1.XLINK\n\t}], ['xlink:type', {\n\t  prefix: 'xlink',\n\t  name: 'type',\n\t  namespace: NS$1.XLINK\n\t}], ['xml:base', {\n\t  prefix: 'xml',\n\t  name: 'base',\n\t  namespace: NS$1.XML\n\t}], ['xml:lang', {\n\t  prefix: 'xml',\n\t  name: 'lang',\n\t  namespace: NS$1.XML\n\t}], ['xml:space', {\n\t  prefix: 'xml',\n\t  name: 'space',\n\t  namespace: NS$1.XML\n\t}], ['xmlns', {\n\t  prefix: '',\n\t  name: 'xmlns',\n\t  namespace: NS$1.XMLNS\n\t}], ['xmlns:xlink', {\n\t  prefix: 'xmlns',\n\t  name: 'xlink',\n\t  namespace: NS$1.XMLNS\n\t}]]); //SVG tag names adjustment map\n\n\tvar SVG_TAG_NAMES_ADJUSTMENT_MAP$1 = new map$b(map$3(_context2$2 = ['altGlyph', 'altGlyphDef', 'altGlyphItem', 'animateColor', 'animateMotion', 'animateTransform', 'clipPath', 'feBlend', 'feColorMatrix', 'feComponentTransfer', 'feComposite', 'feConvolveMatrix', 'feDiffuseLighting', 'feDisplacementMap', 'feDistantLight', 'feFlood', 'feFuncA', 'feFuncB', 'feFuncG', 'feFuncR', 'feGaussianBlur', 'feImage', 'feMerge', 'feMergeNode', 'feMorphology', 'feOffset', 'fePointLight', 'feSpecularLighting', 'feSpotLight', 'feTile', 'feTurbulence', 'foreignObject', 'glyphRef', 'linearGradient', 'radialGradient', 'textPath']).call(_context2$2, function (tn) {\n\t  return [tn.toLowerCase(), tn];\n\t})); //Tags that causes exit from foreign content\n\n\tvar EXITS_FOREIGN_CONTENT$1 = new set$4([TAG_ID$1.B, TAG_ID$1.BIG, TAG_ID$1.BLOCKQUOTE, TAG_ID$1.BODY, TAG_ID$1.BR, TAG_ID$1.CENTER, TAG_ID$1.CODE, TAG_ID$1.DD, TAG_ID$1.DIV, TAG_ID$1.DL, TAG_ID$1.DT, TAG_ID$1.EM, TAG_ID$1.EMBED, TAG_ID$1.H1, TAG_ID$1.H2, TAG_ID$1.H3, TAG_ID$1.H4, TAG_ID$1.H5, TAG_ID$1.H6, TAG_ID$1.HEAD, TAG_ID$1.HR, TAG_ID$1.I, TAG_ID$1.IMG, TAG_ID$1.LI, TAG_ID$1.LISTING, TAG_ID$1.MENU, TAG_ID$1.META, TAG_ID$1.NOBR, TAG_ID$1.OL, TAG_ID$1.P, TAG_ID$1.PRE, TAG_ID$1.RUBY, TAG_ID$1.S, TAG_ID$1.SMALL, TAG_ID$1.SPAN, TAG_ID$1.STRONG, TAG_ID$1.STRIKE, TAG_ID$1.SUB, TAG_ID$1.SUP, TAG_ID$1.TABLE, TAG_ID$1.TT, TAG_ID$1.U, TAG_ID$1.UL, TAG_ID$1.VAR]); //Check exit from foreign content\n\n\tvar InsertionMode$1;\n\n\t(function (InsertionMode) {\n\t  InsertionMode[InsertionMode[\"INITIAL\"] = 0] = \"INITIAL\";\n\t  InsertionMode[InsertionMode[\"BEFORE_HTML\"] = 1] = \"BEFORE_HTML\";\n\t  InsertionMode[InsertionMode[\"BEFORE_HEAD\"] = 2] = \"BEFORE_HEAD\";\n\t  InsertionMode[InsertionMode[\"IN_HEAD\"] = 3] = \"IN_HEAD\";\n\t  InsertionMode[InsertionMode[\"IN_HEAD_NO_SCRIPT\"] = 4] = \"IN_HEAD_NO_SCRIPT\";\n\t  InsertionMode[InsertionMode[\"AFTER_HEAD\"] = 5] = \"AFTER_HEAD\";\n\t  InsertionMode[InsertionMode[\"IN_BODY\"] = 6] = \"IN_BODY\";\n\t  InsertionMode[InsertionMode[\"TEXT\"] = 7] = \"TEXT\";\n\t  InsertionMode[InsertionMode[\"IN_TABLE\"] = 8] = \"IN_TABLE\";\n\t  InsertionMode[InsertionMode[\"IN_TABLE_TEXT\"] = 9] = \"IN_TABLE_TEXT\";\n\t  InsertionMode[InsertionMode[\"IN_CAPTION\"] = 10] = \"IN_CAPTION\";\n\t  InsertionMode[InsertionMode[\"IN_COLUMN_GROUP\"] = 11] = \"IN_COLUMN_GROUP\";\n\t  InsertionMode[InsertionMode[\"IN_TABLE_BODY\"] = 12] = \"IN_TABLE_BODY\";\n\t  InsertionMode[InsertionMode[\"IN_ROW\"] = 13] = \"IN_ROW\";\n\t  InsertionMode[InsertionMode[\"IN_CELL\"] = 14] = \"IN_CELL\";\n\t  InsertionMode[InsertionMode[\"IN_SELECT\"] = 15] = \"IN_SELECT\";\n\t  InsertionMode[InsertionMode[\"IN_SELECT_IN_TABLE\"] = 16] = \"IN_SELECT_IN_TABLE\";\n\t  InsertionMode[InsertionMode[\"IN_TEMPLATE\"] = 17] = \"IN_TEMPLATE\";\n\t  InsertionMode[InsertionMode[\"AFTER_BODY\"] = 18] = \"AFTER_BODY\";\n\t  InsertionMode[InsertionMode[\"IN_FRAMESET\"] = 19] = \"IN_FRAMESET\";\n\t  InsertionMode[InsertionMode[\"AFTER_FRAMESET\"] = 20] = \"AFTER_FRAMESET\";\n\t  InsertionMode[InsertionMode[\"AFTER_AFTER_BODY\"] = 21] = \"AFTER_AFTER_BODY\";\n\t  InsertionMode[InsertionMode[\"AFTER_AFTER_FRAMESET\"] = 22] = \"AFTER_AFTER_FRAMESET\";\n\t})(InsertionMode$1 || (InsertionMode$1 = {}));\n\tvar TABLE_STRUCTURE_TAGS$1 = new set$4([TAG_ID$1.TABLE, TAG_ID$1.TBODY, TAG_ID$1.TFOOT, TAG_ID$1.THEAD, TAG_ID$1.TR]);\n\t//------------------------------------------------------------------\n\n\n\tvar TABLE_VOID_ELEMENTS$1 = new set$4([TAG_ID$1.CAPTION, TAG_ID$1.COL, TAG_ID$1.COLGROUP, TAG_ID$1.TBODY, TAG_ID$1.TD, TAG_ID$1.TFOOT, TAG_ID$1.TH, TAG_ID$1.THEAD, TAG_ID$1.TR]);\n\n\tvar VOID_ELEMENTS$1 = new set$4([TAG_NAMES$1.AREA, TAG_NAMES$1.BASE, TAG_NAMES$1.BASEFONT, TAG_NAMES$1.BGSOUND, TAG_NAMES$1.BR, TAG_NAMES$1.COL, TAG_NAMES$1.EMBED, TAG_NAMES$1.FRAME, TAG_NAMES$1.HR, TAG_NAMES$1.IMG, TAG_NAMES$1.INPUT, TAG_NAMES$1.KEYGEN, TAG_NAMES$1.LINK, TAG_NAMES$1.META, TAG_NAMES$1.PARAM, TAG_NAMES$1.SOURCE, TAG_NAMES$1.TRACK, TAG_NAMES$1.WBR]);\n\n\tfunction ownKeys$8(object, enumerableOnly) { var keys = keys$3(object); if (getOwnPropertySymbols$2) { var symbols = getOwnPropertySymbols$2(object); enumerableOnly && (symbols = filter$3(symbols).call(symbols, function (sym) { return getOwnPropertyDescriptor$3(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\n\n\tfunction _objectSpread$7(target) { for (var i = 1; i < arguments.length; i++) { var _context7, _context8; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? forEach$3(_context7 = ownKeys$8(Object(source), !0)).call(_context7, function (key) { _defineProperty(target, key, source[key]); }) : getOwnPropertyDescriptors$2 ? defineProperties$2(target, getOwnPropertyDescriptors$2(source)) : forEach$3(_context8 = ownKeys$8(Object(source))).call(_context8, function (key) { defineProperty$5(target, key, getOwnPropertyDescriptor$3(source, key)); }); } return target; }\n\n\tfunction createTextNode$1(value) {\n\t  return new Text$1(value);\n\t}\n\n\tfunction enquoteDoctypeId(id) {\n\t  var quote = includes$4(id).call(id, '\"') ? \"'\" : '\"';\n\t  return quote + id + quote;\n\t}\n\t/** @internal */\n\n\n\tfunction serializeDoctypeContent(name, publicId, systemId) {\n\t  var str = '!DOCTYPE ';\n\n\t  if (name) {\n\t    str += name;\n\t  }\n\n\t  if (publicId) {\n\t    str += \" PUBLIC \".concat(enquoteDoctypeId(publicId));\n\t  } else if (systemId) {\n\t    str += ' SYSTEM';\n\t  }\n\n\t  if (systemId) {\n\t    str += \" \".concat(enquoteDoctypeId(systemId));\n\t  }\n\n\t  return str;\n\t}\n\tvar adapter = {\n\t  // Re-exports from domhandler\n\t  isCommentNode: isComment,\n\t  isElementNode: isTag$1,\n\t  isTextNode: isText,\n\t  //Node construction\n\t  createDocument: function createDocument() {\n\t    var node = new Document([]);\n\t    node['x-mode'] = DOCUMENT_MODE$1.NO_QUIRKS;\n\t    return node;\n\t  },\n\t  createDocumentFragment: function createDocumentFragment() {\n\t    return new Document([]);\n\t  },\n\t  createElement: function createElement(tagName, namespaceURI, attrs) {\n\t    var attribs = create$6(null);\n\n\t    var attribsNamespace = create$6(null);\n\n\t    var attribsPrefix = create$6(null);\n\n\t    for (var i = 0; i < attrs.length; i++) {\n\t      var attrName = attrs[i].name;\n\t      attribs[attrName] = attrs[i].value;\n\t      attribsNamespace[attrName] = attrs[i].namespace;\n\t      attribsPrefix[attrName] = attrs[i].prefix;\n\t    }\n\n\t    var node = new Element(tagName, attribs, []);\n\t    node.namespace = namespaceURI;\n\t    node['x-attribsNamespace'] = attribsNamespace;\n\t    node['x-attribsPrefix'] = attribsPrefix;\n\t    return node;\n\t  },\n\t  createCommentNode: function createCommentNode(data) {\n\t    return new Comment$1(data);\n\t  },\n\t  //Tree mutation\n\t  appendChild: function appendChild(parentNode, newNode) {\n\t    var prev = parentNode.children[parentNode.children.length - 1];\n\n\t    if (prev) {\n\t      prev.next = newNode;\n\t      newNode.prev = prev;\n\t    }\n\n\t    parentNode.children.push(newNode);\n\t    newNode.parent = parentNode;\n\t  },\n\t  insertBefore: function insertBefore(parentNode, newNode, referenceNode) {\n\t    var _context, _context2;\n\n\t    var insertionIdx = indexOf$8(_context = parentNode.children).call(_context, referenceNode);\n\n\t    var prev = referenceNode.prev;\n\n\t    if (prev) {\n\t      prev.next = newNode;\n\t      newNode.prev = prev;\n\t    }\n\n\t    referenceNode.prev = newNode;\n\t    newNode.next = referenceNode;\n\n\t    splice$4(_context2 = parentNode.children).call(_context2, insertionIdx, 0, newNode);\n\n\t    newNode.parent = parentNode;\n\t  },\n\t  setTemplateContent: function setTemplateContent(templateElement, contentElement) {\n\t    adapter.appendChild(templateElement, contentElement);\n\t  },\n\t  getTemplateContent: function getTemplateContent(templateElement) {\n\t    return templateElement.children[0];\n\t  },\n\t  setDocumentType: function setDocumentType(document, name, publicId, systemId) {\n\t    var _context3;\n\n\t    var data = serializeDoctypeContent(name, publicId, systemId);\n\n\t    var doctypeNode = find$3(_context3 = document.children).call(_context3, function (node) {\n\t      return isDirective(node) && node.name === '!doctype';\n\t    });\n\n\t    if (doctypeNode) {\n\t      doctypeNode.data = data !== null && data !== void 0 ? data : null;\n\t    } else {\n\t      doctypeNode = new ProcessingInstruction('!doctype', data);\n\t      adapter.appendChild(document, doctypeNode);\n\t    }\n\n\t    doctypeNode['x-name'] = name !== null && name !== void 0 ? name : undefined;\n\t    doctypeNode['x-publicId'] = publicId !== null && publicId !== void 0 ? publicId : undefined;\n\t    doctypeNode['x-systemId'] = systemId !== null && systemId !== void 0 ? systemId : undefined;\n\t  },\n\t  setDocumentMode: function setDocumentMode(document, mode) {\n\t    document['x-mode'] = mode;\n\t  },\n\t  getDocumentMode: function getDocumentMode(document) {\n\t    return document['x-mode'];\n\t  },\n\t  detachNode: function detachNode(node) {\n\t    if (node.parent) {\n\t      var _context4, _context5;\n\n\t      var idx = indexOf$8(_context4 = node.parent.children).call(_context4, node);\n\n\t      var prev = node.prev,\n\t          next = node.next;\n\t      node.prev = null;\n\t      node.next = null;\n\n\t      if (prev) {\n\t        prev.next = next;\n\t      }\n\n\t      if (next) {\n\t        next.prev = prev;\n\t      }\n\n\t      splice$4(_context5 = node.parent.children).call(_context5, idx, 1);\n\n\t      node.parent = null;\n\t    }\n\t  },\n\t  insertText: function insertText(parentNode, text) {\n\t    var lastChild = parentNode.children[parentNode.children.length - 1];\n\n\t    if (lastChild && isText(lastChild)) {\n\t      lastChild.data += text;\n\t    } else {\n\t      adapter.appendChild(parentNode, createTextNode$1(text));\n\t    }\n\t  },\n\t  insertTextBefore: function insertTextBefore(parentNode, text, referenceNode) {\n\t    var _context6;\n\n\t    var prevNode = parentNode.children[indexOf$8(_context6 = parentNode.children).call(_context6, referenceNode) - 1];\n\n\t    if (prevNode && isText(prevNode)) {\n\t      prevNode.data += text;\n\t    } else {\n\t      adapter.insertBefore(parentNode, createTextNode$1(text), referenceNode);\n\t    }\n\t  },\n\t  adoptAttributes: function adoptAttributes(recipient, attrs) {\n\t    for (var i = 0; i < attrs.length; i++) {\n\t      var attrName = attrs[i].name;\n\n\t      if (typeof recipient.attribs[attrName] === 'undefined') {\n\t        recipient.attribs[attrName] = attrs[i].value;\n\t        recipient['x-attribsNamespace'][attrName] = attrs[i].namespace;\n\t        recipient['x-attribsPrefix'][attrName] = attrs[i].prefix;\n\t      }\n\t    }\n\t  },\n\t  //Tree traversing\n\t  getFirstChild: function getFirstChild(node) {\n\t    return node.children[0];\n\t  },\n\t  getChildNodes: function getChildNodes(node) {\n\t    return node.children;\n\t  },\n\t  getParentNode: function getParentNode(node) {\n\t    return node.parent;\n\t  },\n\t  getAttrList: function getAttrList(element) {\n\t    return element.attributes;\n\t  },\n\t  //Node data\n\t  getTagName: function getTagName(element) {\n\t    return element.name;\n\t  },\n\t  getNamespaceURI: function getNamespaceURI(element) {\n\t    return element.namespace;\n\t  },\n\t  getTextNodeContent: function getTextNodeContent(textNode) {\n\t    return textNode.data;\n\t  },\n\t  getCommentNodeContent: function getCommentNodeContent(commentNode) {\n\t    return commentNode.data;\n\t  },\n\t  getDocumentTypeNodeName: function getDocumentTypeNodeName(doctypeNode) {\n\t    var _a;\n\n\t    return (_a = doctypeNode['x-name']) !== null && _a !== void 0 ? _a : '';\n\t  },\n\t  getDocumentTypeNodePublicId: function getDocumentTypeNodePublicId(doctypeNode) {\n\t    var _a;\n\n\t    return (_a = doctypeNode['x-publicId']) !== null && _a !== void 0 ? _a : '';\n\t  },\n\t  getDocumentTypeNodeSystemId: function getDocumentTypeNodeSystemId(doctypeNode) {\n\t    var _a;\n\n\t    return (_a = doctypeNode['x-systemId']) !== null && _a !== void 0 ? _a : '';\n\t  },\n\t  //Node types\n\t  isDocumentTypeNode: function isDocumentTypeNode(node) {\n\t    return isDirective(node) && node.name === '!doctype';\n\t  },\n\t  // Source code location\n\t  setNodeSourceCodeLocation: function setNodeSourceCodeLocation(node, location) {\n\t    if (location) {\n\t      node.startIndex = location.startOffset;\n\t      node.endIndex = location.endOffset;\n\t    }\n\n\t    node.sourceCodeLocation = location;\n\t  },\n\t  getNodeSourceCodeLocation: function getNodeSourceCodeLocation(node) {\n\t    return node.sourceCodeLocation;\n\t  },\n\t  updateNodeSourceCodeLocation: function updateNodeSourceCodeLocation(node, endLocation) {\n\t    if (endLocation.endOffset != null) node.endIndex = endLocation.endOffset;\n\t    node.sourceCodeLocation = _objectSpread$7(_objectSpread$7({}, node.sourceCodeLocation), endLocation);\n\t  }\n\t};\n\n\t/**\n\t * Parse the content with `parse5` in the context of the given `ParentNode`.\n\t *\n\t * @param content - The content to parse.\n\t * @param options - A set of options to use to parse.\n\t * @param isDocument - Whether to parse the content as a full HTML document.\n\t * @param context - The context in which to parse the content.\n\t * @returns The parsed content.\n\t */\n\tfunction parseWithParse5(content, options, isDocument, context) {\n\t    const opts = {\n\t        scriptingEnabled: typeof options.scriptingEnabled === 'boolean'\n\t            ? options.scriptingEnabled\n\t            : true,\n\t        treeAdapter: adapter,\n\t        sourceCodeLocationInfo: options.sourceCodeLocationInfo,\n\t    };\n\t    return isDocument\n\t        ? parse$3(content, opts)\n\t        : parseFragment(context, content, opts);\n\t}\n\tconst renderOpts = { treeAdapter: adapter };\n\t/**\n\t * Renders the given DOM tree with `parse5` and returns the result as a string.\n\t *\n\t * @param dom - The DOM tree to render.\n\t * @returns The rendered document.\n\t */\n\tfunction renderWithParse5(dom) {\n\t    /*\n\t     * `dom-serializer` passes over the special \"root\" node and renders the\n\t     * node's children in its place. To mimic this behavior with `parse5`, an\n\t     * equivalent operation must be applied to the input array.\n\t     */\n\t    const nodes = 'length' in dom ? dom : [dom];\n\t    for (let index = 0; index < nodes.length; index += 1) {\n\t        const node = nodes[index];\n\t        if (isDocument(node)) {\n\t            Array.prototype.splice.call(nodes, index, 1, ...node.children);\n\t        }\n\t    }\n\t    let result = '';\n\t    for (let index = 0; index < nodes.length; index += 1) {\n\t        const node = nodes[index];\n\t        result += serializeOuter(node, renderOpts);\n\t    }\n\t    return result;\n\t}\n\n\tvar CharCodes;\n\t(function (CharCodes) {\n\t    CharCodes[CharCodes[\"Tab\"] = 9] = \"Tab\";\n\t    CharCodes[CharCodes[\"NewLine\"] = 10] = \"NewLine\";\n\t    CharCodes[CharCodes[\"FormFeed\"] = 12] = \"FormFeed\";\n\t    CharCodes[CharCodes[\"CarriageReturn\"] = 13] = \"CarriageReturn\";\n\t    CharCodes[CharCodes[\"Space\"] = 32] = \"Space\";\n\t    CharCodes[CharCodes[\"ExclamationMark\"] = 33] = \"ExclamationMark\";\n\t    CharCodes[CharCodes[\"Num\"] = 35] = \"Num\";\n\t    CharCodes[CharCodes[\"Amp\"] = 38] = \"Amp\";\n\t    CharCodes[CharCodes[\"SingleQuote\"] = 39] = \"SingleQuote\";\n\t    CharCodes[CharCodes[\"DoubleQuote\"] = 34] = \"DoubleQuote\";\n\t    CharCodes[CharCodes[\"Dash\"] = 45] = \"Dash\";\n\t    CharCodes[CharCodes[\"Slash\"] = 47] = \"Slash\";\n\t    CharCodes[CharCodes[\"Zero\"] = 48] = \"Zero\";\n\t    CharCodes[CharCodes[\"Nine\"] = 57] = \"Nine\";\n\t    CharCodes[CharCodes[\"Semi\"] = 59] = \"Semi\";\n\t    CharCodes[CharCodes[\"Lt\"] = 60] = \"Lt\";\n\t    CharCodes[CharCodes[\"Eq\"] = 61] = \"Eq\";\n\t    CharCodes[CharCodes[\"Gt\"] = 62] = \"Gt\";\n\t    CharCodes[CharCodes[\"Questionmark\"] = 63] = \"Questionmark\";\n\t    CharCodes[CharCodes[\"UpperA\"] = 65] = \"UpperA\";\n\t    CharCodes[CharCodes[\"LowerA\"] = 97] = \"LowerA\";\n\t    CharCodes[CharCodes[\"UpperF\"] = 70] = \"UpperF\";\n\t    CharCodes[CharCodes[\"LowerF\"] = 102] = \"LowerF\";\n\t    CharCodes[CharCodes[\"UpperZ\"] = 90] = \"UpperZ\";\n\t    CharCodes[CharCodes[\"LowerZ\"] = 122] = \"LowerZ\";\n\t    CharCodes[CharCodes[\"LowerX\"] = 120] = \"LowerX\";\n\t    CharCodes[CharCodes[\"OpeningSquareBracket\"] = 91] = \"OpeningSquareBracket\";\n\t})(CharCodes || (CharCodes = {}));\n\t/** All the states the tokenizer can be in. */\n\tvar State$2;\n\t(function (State) {\n\t    State[State[\"Text\"] = 1] = \"Text\";\n\t    State[State[\"BeforeTagName\"] = 2] = \"BeforeTagName\";\n\t    State[State[\"InTagName\"] = 3] = \"InTagName\";\n\t    State[State[\"InSelfClosingTag\"] = 4] = \"InSelfClosingTag\";\n\t    State[State[\"BeforeClosingTagName\"] = 5] = \"BeforeClosingTagName\";\n\t    State[State[\"InClosingTagName\"] = 6] = \"InClosingTagName\";\n\t    State[State[\"AfterClosingTagName\"] = 7] = \"AfterClosingTagName\";\n\t    // Attributes\n\t    State[State[\"BeforeAttributeName\"] = 8] = \"BeforeAttributeName\";\n\t    State[State[\"InAttributeName\"] = 9] = \"InAttributeName\";\n\t    State[State[\"AfterAttributeName\"] = 10] = \"AfterAttributeName\";\n\t    State[State[\"BeforeAttributeValue\"] = 11] = \"BeforeAttributeValue\";\n\t    State[State[\"InAttributeValueDq\"] = 12] = \"InAttributeValueDq\";\n\t    State[State[\"InAttributeValueSq\"] = 13] = \"InAttributeValueSq\";\n\t    State[State[\"InAttributeValueNq\"] = 14] = \"InAttributeValueNq\";\n\t    // Declarations\n\t    State[State[\"BeforeDeclaration\"] = 15] = \"BeforeDeclaration\";\n\t    State[State[\"InDeclaration\"] = 16] = \"InDeclaration\";\n\t    // Processing instructions\n\t    State[State[\"InProcessingInstruction\"] = 17] = \"InProcessingInstruction\";\n\t    // Comments & CDATA\n\t    State[State[\"BeforeComment\"] = 18] = \"BeforeComment\";\n\t    State[State[\"CDATASequence\"] = 19] = \"CDATASequence\";\n\t    State[State[\"InSpecialComment\"] = 20] = \"InSpecialComment\";\n\t    State[State[\"InCommentLike\"] = 21] = \"InCommentLike\";\n\t    // Special tags\n\t    State[State[\"BeforeSpecialS\"] = 22] = \"BeforeSpecialS\";\n\t    State[State[\"SpecialStartSequence\"] = 23] = \"SpecialStartSequence\";\n\t    State[State[\"InSpecialTag\"] = 24] = \"InSpecialTag\";\n\t    State[State[\"BeforeEntity\"] = 25] = \"BeforeEntity\";\n\t    State[State[\"BeforeNumericEntity\"] = 26] = \"BeforeNumericEntity\";\n\t    State[State[\"InNamedEntity\"] = 27] = \"InNamedEntity\";\n\t    State[State[\"InNumericEntity\"] = 28] = \"InNumericEntity\";\n\t    State[State[\"InHexEntity\"] = 29] = \"InHexEntity\";\n\t})(State$2 || (State$2 = {}));\n\tfunction isWhitespace$2(c) {\n\t    return (c === CharCodes.Space ||\n\t        c === CharCodes.NewLine ||\n\t        c === CharCodes.Tab ||\n\t        c === CharCodes.FormFeed ||\n\t        c === CharCodes.CarriageReturn);\n\t}\n\tfunction isEndOfTagSection(c) {\n\t    return c === CharCodes.Slash || c === CharCodes.Gt || isWhitespace$2(c);\n\t}\n\tfunction isNumber$1(c) {\n\t    return c >= CharCodes.Zero && c <= CharCodes.Nine;\n\t}\n\tfunction isASCIIAlpha(c) {\n\t    return ((c >= CharCodes.LowerA && c <= CharCodes.LowerZ) ||\n\t        (c >= CharCodes.UpperA && c <= CharCodes.UpperZ));\n\t}\n\tfunction isHexDigit(c) {\n\t    return ((c >= CharCodes.UpperA && c <= CharCodes.UpperF) ||\n\t        (c >= CharCodes.LowerA && c <= CharCodes.LowerF));\n\t}\n\tvar QuoteType;\n\t(function (QuoteType) {\n\t    QuoteType[QuoteType[\"NoValue\"] = 0] = \"NoValue\";\n\t    QuoteType[QuoteType[\"Unquoted\"] = 1] = \"Unquoted\";\n\t    QuoteType[QuoteType[\"Single\"] = 2] = \"Single\";\n\t    QuoteType[QuoteType[\"Double\"] = 3] = \"Double\";\n\t})(QuoteType || (QuoteType = {}));\n\t/**\n\t * Sequences used to match longer strings.\n\t *\n\t * We don't have `Script`, `Style`, or `Title` here. Instead, we re-use the *End\n\t * sequences with an increased offset.\n\t */\n\tconst Sequences = {\n\t    Cdata: new Uint8Array([0x43, 0x44, 0x41, 0x54, 0x41, 0x5b]),\n\t    CdataEnd: new Uint8Array([0x5d, 0x5d, 0x3e]),\n\t    CommentEnd: new Uint8Array([0x2d, 0x2d, 0x3e]),\n\t    ScriptEnd: new Uint8Array([0x3c, 0x2f, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74]),\n\t    StyleEnd: new Uint8Array([0x3c, 0x2f, 0x73, 0x74, 0x79, 0x6c, 0x65]),\n\t    TitleEnd: new Uint8Array([0x3c, 0x2f, 0x74, 0x69, 0x74, 0x6c, 0x65]), // `</title`\n\t};\n\tclass Tokenizer$1 {\n\t    constructor({ xmlMode = false, decodeEntities = true, }, cbs) {\n\t        this.cbs = cbs;\n\t        /** The current state the tokenizer is in. */\n\t        this.state = State$2.Text;\n\t        /** The read buffer. */\n\t        this.buffer = \"\";\n\t        /** The beginning of the section that is currently being read. */\n\t        this.sectionStart = 0;\n\t        /** The index within the buffer that we are currently looking at. */\n\t        this.index = 0;\n\t        /** Some behavior, eg. when decoding entities, is done while we are in another state. This keeps track of the other state type. */\n\t        this.baseState = State$2.Text;\n\t        /** For special parsing behavior inside of script and style tags. */\n\t        this.isSpecial = false;\n\t        /** Indicates whether the tokenizer has been paused. */\n\t        this.running = true;\n\t        /** The offset of the current buffer. */\n\t        this.offset = 0;\n\t        this.sequenceIndex = 0;\n\t        this.trieIndex = 0;\n\t        this.trieCurrent = 0;\n\t        /** For named entities, the index of the value. For numeric entities, the code point. */\n\t        this.entityResult = 0;\n\t        this.entityExcess = 0;\n\t        this.xmlMode = xmlMode;\n\t        this.decodeEntities = decodeEntities;\n\t        this.entityTrie = xmlMode ? decode_9 : decode_10;\n\t    }\n\t    reset() {\n\t        this.state = State$2.Text;\n\t        this.buffer = \"\";\n\t        this.sectionStart = 0;\n\t        this.index = 0;\n\t        this.baseState = State$2.Text;\n\t        this.currentSequence = undefined;\n\t        this.running = true;\n\t        this.offset = 0;\n\t    }\n\t    write(chunk) {\n\t        this.offset += this.buffer.length;\n\t        this.buffer = chunk;\n\t        this.parse();\n\t    }\n\t    end() {\n\t        if (this.running)\n\t            this.finish();\n\t    }\n\t    pause() {\n\t        this.running = false;\n\t    }\n\t    resume() {\n\t        this.running = true;\n\t        if (this.index < this.buffer.length + this.offset) {\n\t            this.parse();\n\t        }\n\t    }\n\t    /**\n\t     * The current index within all of the written data.\n\t     */\n\t    getIndex() {\n\t        return this.index;\n\t    }\n\t    /**\n\t     * The start of the current section.\n\t     */\n\t    getSectionStart() {\n\t        return this.sectionStart;\n\t    }\n\t    stateText(c) {\n\t        if (c === CharCodes.Lt ||\n\t            (!this.decodeEntities && this.fastForwardTo(CharCodes.Lt))) {\n\t            if (this.index > this.sectionStart) {\n\t                this.cbs.ontext(this.sectionStart, this.index);\n\t            }\n\t            this.state = State$2.BeforeTagName;\n\t            this.sectionStart = this.index;\n\t        }\n\t        else if (this.decodeEntities && c === CharCodes.Amp) {\n\t            this.state = State$2.BeforeEntity;\n\t        }\n\t    }\n\t    stateSpecialStartSequence(c) {\n\t        const isEnd = this.sequenceIndex === this.currentSequence.length;\n\t        const isMatch = isEnd\n\t            ? // If we are at the end of the sequence, make sure the tag name has ended\n\t                isEndOfTagSection(c)\n\t            : // Otherwise, do a case-insensitive comparison\n\t                (c | 0x20) === this.currentSequence[this.sequenceIndex];\n\t        if (!isMatch) {\n\t            this.isSpecial = false;\n\t        }\n\t        else if (!isEnd) {\n\t            this.sequenceIndex++;\n\t            return;\n\t        }\n\t        this.sequenceIndex = 0;\n\t        this.state = State$2.InTagName;\n\t        this.stateInTagName(c);\n\t    }\n\t    /** Look for an end tag. For <title> tags, also decode entities. */\n\t    stateInSpecialTag(c) {\n\t        if (this.sequenceIndex === this.currentSequence.length) {\n\t            if (c === CharCodes.Gt || isWhitespace$2(c)) {\n\t                const endOfText = this.index - this.currentSequence.length;\n\t                if (this.sectionStart < endOfText) {\n\t                    // Spoof the index so that reported locations match up.\n\t                    const actualIndex = this.index;\n\t                    this.index = endOfText;\n\t                    this.cbs.ontext(this.sectionStart, endOfText);\n\t                    this.index = actualIndex;\n\t                }\n\t                this.isSpecial = false;\n\t                this.sectionStart = endOfText + 2; // Skip over the `</`\n\t                this.stateInClosingTagName(c);\n\t                return; // We are done; skip the rest of the function.\n\t            }\n\t            this.sequenceIndex = 0;\n\t        }\n\t        if ((c | 0x20) === this.currentSequence[this.sequenceIndex]) {\n\t            this.sequenceIndex += 1;\n\t        }\n\t        else if (this.sequenceIndex === 0) {\n\t            if (this.currentSequence === Sequences.TitleEnd) {\n\t                // We have to parse entities in <title> tags.\n\t                if (this.decodeEntities && c === CharCodes.Amp) {\n\t                    this.state = State$2.BeforeEntity;\n\t                }\n\t            }\n\t            else if (this.fastForwardTo(CharCodes.Lt)) {\n\t                // Outside of <title> tags, we can fast-forward.\n\t                this.sequenceIndex = 1;\n\t            }\n\t        }\n\t        else {\n\t            // If we see a `<`, set the sequence index to 1; useful for eg. `<</script>`.\n\t            this.sequenceIndex = Number(c === CharCodes.Lt);\n\t        }\n\t    }\n\t    stateCDATASequence(c) {\n\t        if (c === Sequences.Cdata[this.sequenceIndex]) {\n\t            if (++this.sequenceIndex === Sequences.Cdata.length) {\n\t                this.state = State$2.InCommentLike;\n\t                this.currentSequence = Sequences.CdataEnd;\n\t                this.sequenceIndex = 0;\n\t                this.sectionStart = this.index + 1;\n\t            }\n\t        }\n\t        else {\n\t            this.sequenceIndex = 0;\n\t            this.state = State$2.InDeclaration;\n\t            this.stateInDeclaration(c); // Reconsume the character\n\t        }\n\t    }\n\t    /**\n\t     * When we wait for one specific character, we can speed things up\n\t     * by skipping through the buffer until we find it.\n\t     *\n\t     * @returns Whether the character was found.\n\t     */\n\t    fastForwardTo(c) {\n\t        while (++this.index < this.buffer.length + this.offset) {\n\t            if (this.buffer.charCodeAt(this.index - this.offset) === c) {\n\t                return true;\n\t            }\n\t        }\n\t        /*\n\t         * We increment the index at the end of the `parse` loop,\n\t         * so set it to `buffer.length - 1` here.\n\t         *\n\t         * TODO: Refactor `parse` to increment index before calling states.\n\t         */\n\t        this.index = this.buffer.length + this.offset - 1;\n\t        return false;\n\t    }\n\t    /**\n\t     * Comments and CDATA end with `-->` and `]]>`.\n\t     *\n\t     * Their common qualities are:\n\t     * - Their end sequences have a distinct character they start with.\n\t     * - That character is then repeated, so we have to check multiple repeats.\n\t     * - All characters but the start character of the sequence can be skipped.\n\t     */\n\t    stateInCommentLike(c) {\n\t        if (c === this.currentSequence[this.sequenceIndex]) {\n\t            if (++this.sequenceIndex === this.currentSequence.length) {\n\t                if (this.currentSequence === Sequences.CdataEnd) {\n\t                    this.cbs.oncdata(this.sectionStart, this.index, 2);\n\t                }\n\t                else {\n\t                    this.cbs.oncomment(this.sectionStart, this.index, 2);\n\t                }\n\t                this.sequenceIndex = 0;\n\t                this.sectionStart = this.index + 1;\n\t                this.state = State$2.Text;\n\t            }\n\t        }\n\t        else if (this.sequenceIndex === 0) {\n\t            // Fast-forward to the first character of the sequence\n\t            if (this.fastForwardTo(this.currentSequence[0])) {\n\t                this.sequenceIndex = 1;\n\t            }\n\t        }\n\t        else if (c !== this.currentSequence[this.sequenceIndex - 1]) {\n\t            // Allow long sequences, eg. --->, ]]]>\n\t            this.sequenceIndex = 0;\n\t        }\n\t    }\n\t    /**\n\t     * HTML only allows ASCII alpha characters (a-z and A-Z) at the beginning of a tag name.\n\t     *\n\t     * XML allows a lot more characters here (@see https://www.w3.org/TR/REC-xml/#NT-NameStartChar).\n\t     * We allow anything that wouldn't end the tag.\n\t     */\n\t    isTagStartChar(c) {\n\t        return this.xmlMode ? !isEndOfTagSection(c) : isASCIIAlpha(c);\n\t    }\n\t    startSpecial(sequence, offset) {\n\t        this.isSpecial = true;\n\t        this.currentSequence = sequence;\n\t        this.sequenceIndex = offset;\n\t        this.state = State$2.SpecialStartSequence;\n\t    }\n\t    stateBeforeTagName(c) {\n\t        if (c === CharCodes.ExclamationMark) {\n\t            this.state = State$2.BeforeDeclaration;\n\t            this.sectionStart = this.index + 1;\n\t        }\n\t        else if (c === CharCodes.Questionmark) {\n\t            this.state = State$2.InProcessingInstruction;\n\t            this.sectionStart = this.index + 1;\n\t        }\n\t        else if (this.isTagStartChar(c)) {\n\t            const lower = c | 0x20;\n\t            this.sectionStart = this.index;\n\t            if (!this.xmlMode && lower === Sequences.TitleEnd[2]) {\n\t                this.startSpecial(Sequences.TitleEnd, 3);\n\t            }\n\t            else {\n\t                this.state =\n\t                    !this.xmlMode && lower === Sequences.ScriptEnd[2]\n\t                        ? State$2.BeforeSpecialS\n\t                        : State$2.InTagName;\n\t            }\n\t        }\n\t        else if (c === CharCodes.Slash) {\n\t            this.state = State$2.BeforeClosingTagName;\n\t        }\n\t        else {\n\t            this.state = State$2.Text;\n\t            this.stateText(c);\n\t        }\n\t    }\n\t    stateInTagName(c) {\n\t        if (isEndOfTagSection(c)) {\n\t            this.cbs.onopentagname(this.sectionStart, this.index);\n\t            this.sectionStart = -1;\n\t            this.state = State$2.BeforeAttributeName;\n\t            this.stateBeforeAttributeName(c);\n\t        }\n\t    }\n\t    stateBeforeClosingTagName(c) {\n\t        if (isWhitespace$2(c)) ;\n\t        else if (c === CharCodes.Gt) {\n\t            this.state = State$2.Text;\n\t        }\n\t        else {\n\t            this.state = this.isTagStartChar(c)\n\t                ? State$2.InClosingTagName\n\t                : State$2.InSpecialComment;\n\t            this.sectionStart = this.index;\n\t        }\n\t    }\n\t    stateInClosingTagName(c) {\n\t        if (c === CharCodes.Gt || isWhitespace$2(c)) {\n\t            this.cbs.onclosetag(this.sectionStart, this.index);\n\t            this.sectionStart = -1;\n\t            this.state = State$2.AfterClosingTagName;\n\t            this.stateAfterClosingTagName(c);\n\t        }\n\t    }\n\t    stateAfterClosingTagName(c) {\n\t        // Skip everything until \">\"\n\t        if (c === CharCodes.Gt || this.fastForwardTo(CharCodes.Gt)) {\n\t            this.state = State$2.Text;\n\t            this.sectionStart = this.index + 1;\n\t        }\n\t    }\n\t    stateBeforeAttributeName(c) {\n\t        if (c === CharCodes.Gt) {\n\t            this.cbs.onopentagend(this.index);\n\t            if (this.isSpecial) {\n\t                this.state = State$2.InSpecialTag;\n\t                this.sequenceIndex = 0;\n\t            }\n\t            else {\n\t                this.state = State$2.Text;\n\t            }\n\t            this.baseState = this.state;\n\t            this.sectionStart = this.index + 1;\n\t        }\n\t        else if (c === CharCodes.Slash) {\n\t            this.state = State$2.InSelfClosingTag;\n\t        }\n\t        else if (!isWhitespace$2(c)) {\n\t            this.state = State$2.InAttributeName;\n\t            this.sectionStart = this.index;\n\t        }\n\t    }\n\t    stateInSelfClosingTag(c) {\n\t        if (c === CharCodes.Gt) {\n\t            this.cbs.onselfclosingtag(this.index);\n\t            this.state = State$2.Text;\n\t            this.baseState = State$2.Text;\n\t            this.sectionStart = this.index + 1;\n\t            this.isSpecial = false; // Reset special state, in case of self-closing special tags\n\t        }\n\t        else if (!isWhitespace$2(c)) {\n\t            this.state = State$2.BeforeAttributeName;\n\t            this.stateBeforeAttributeName(c);\n\t        }\n\t    }\n\t    stateInAttributeName(c) {\n\t        if (c === CharCodes.Eq || isEndOfTagSection(c)) {\n\t            this.cbs.onattribname(this.sectionStart, this.index);\n\t            this.sectionStart = -1;\n\t            this.state = State$2.AfterAttributeName;\n\t            this.stateAfterAttributeName(c);\n\t        }\n\t    }\n\t    stateAfterAttributeName(c) {\n\t        if (c === CharCodes.Eq) {\n\t            this.state = State$2.BeforeAttributeValue;\n\t        }\n\t        else if (c === CharCodes.Slash || c === CharCodes.Gt) {\n\t            this.cbs.onattribend(QuoteType.NoValue, this.index);\n\t            this.state = State$2.BeforeAttributeName;\n\t            this.stateBeforeAttributeName(c);\n\t        }\n\t        else if (!isWhitespace$2(c)) {\n\t            this.cbs.onattribend(QuoteType.NoValue, this.index);\n\t            this.state = State$2.InAttributeName;\n\t            this.sectionStart = this.index;\n\t        }\n\t    }\n\t    stateBeforeAttributeValue(c) {\n\t        if (c === CharCodes.DoubleQuote) {\n\t            this.state = State$2.InAttributeValueDq;\n\t            this.sectionStart = this.index + 1;\n\t        }\n\t        else if (c === CharCodes.SingleQuote) {\n\t            this.state = State$2.InAttributeValueSq;\n\t            this.sectionStart = this.index + 1;\n\t        }\n\t        else if (!isWhitespace$2(c)) {\n\t            this.sectionStart = this.index;\n\t            this.state = State$2.InAttributeValueNq;\n\t            this.stateInAttributeValueNoQuotes(c); // Reconsume token\n\t        }\n\t    }\n\t    handleInAttributeValue(c, quote) {\n\t        if (c === quote ||\n\t            (!this.decodeEntities && this.fastForwardTo(quote))) {\n\t            this.cbs.onattribdata(this.sectionStart, this.index);\n\t            this.sectionStart = -1;\n\t            this.cbs.onattribend(quote === CharCodes.DoubleQuote\n\t                ? QuoteType.Double\n\t                : QuoteType.Single, this.index);\n\t            this.state = State$2.BeforeAttributeName;\n\t        }\n\t        else if (this.decodeEntities && c === CharCodes.Amp) {\n\t            this.baseState = this.state;\n\t            this.state = State$2.BeforeEntity;\n\t        }\n\t    }\n\t    stateInAttributeValueDoubleQuotes(c) {\n\t        this.handleInAttributeValue(c, CharCodes.DoubleQuote);\n\t    }\n\t    stateInAttributeValueSingleQuotes(c) {\n\t        this.handleInAttributeValue(c, CharCodes.SingleQuote);\n\t    }\n\t    stateInAttributeValueNoQuotes(c) {\n\t        if (isWhitespace$2(c) || c === CharCodes.Gt) {\n\t            this.cbs.onattribdata(this.sectionStart, this.index);\n\t            this.sectionStart = -1;\n\t            this.cbs.onattribend(QuoteType.Unquoted, this.index);\n\t            this.state = State$2.BeforeAttributeName;\n\t            this.stateBeforeAttributeName(c);\n\t        }\n\t        else if (this.decodeEntities && c === CharCodes.Amp) {\n\t            this.baseState = this.state;\n\t            this.state = State$2.BeforeEntity;\n\t        }\n\t    }\n\t    stateBeforeDeclaration(c) {\n\t        if (c === CharCodes.OpeningSquareBracket) {\n\t            this.state = State$2.CDATASequence;\n\t            this.sequenceIndex = 0;\n\t        }\n\t        else {\n\t            this.state =\n\t                c === CharCodes.Dash\n\t                    ? State$2.BeforeComment\n\t                    : State$2.InDeclaration;\n\t        }\n\t    }\n\t    stateInDeclaration(c) {\n\t        if (c === CharCodes.Gt || this.fastForwardTo(CharCodes.Gt)) {\n\t            this.cbs.ondeclaration(this.sectionStart, this.index);\n\t            this.state = State$2.Text;\n\t            this.sectionStart = this.index + 1;\n\t        }\n\t    }\n\t    stateInProcessingInstruction(c) {\n\t        if (c === CharCodes.Gt || this.fastForwardTo(CharCodes.Gt)) {\n\t            this.cbs.onprocessinginstruction(this.sectionStart, this.index);\n\t            this.state = State$2.Text;\n\t            this.sectionStart = this.index + 1;\n\t        }\n\t    }\n\t    stateBeforeComment(c) {\n\t        if (c === CharCodes.Dash) {\n\t            this.state = State$2.InCommentLike;\n\t            this.currentSequence = Sequences.CommentEnd;\n\t            // Allow short comments (eg. <!-->)\n\t            this.sequenceIndex = 2;\n\t            this.sectionStart = this.index + 1;\n\t        }\n\t        else {\n\t            this.state = State$2.InDeclaration;\n\t        }\n\t    }\n\t    stateInSpecialComment(c) {\n\t        if (c === CharCodes.Gt || this.fastForwardTo(CharCodes.Gt)) {\n\t            this.cbs.oncomment(this.sectionStart, this.index, 0);\n\t            this.state = State$2.Text;\n\t            this.sectionStart = this.index + 1;\n\t        }\n\t    }\n\t    stateBeforeSpecialS(c) {\n\t        const lower = c | 0x20;\n\t        if (lower === Sequences.ScriptEnd[3]) {\n\t            this.startSpecial(Sequences.ScriptEnd, 4);\n\t        }\n\t        else if (lower === Sequences.StyleEnd[3]) {\n\t            this.startSpecial(Sequences.StyleEnd, 4);\n\t        }\n\t        else {\n\t            this.state = State$2.InTagName;\n\t            this.stateInTagName(c); // Consume the token again\n\t        }\n\t    }\n\t    stateBeforeEntity(c) {\n\t        // Start excess with 1 to include the '&'\n\t        this.entityExcess = 1;\n\t        this.entityResult = 0;\n\t        if (c === CharCodes.Num) {\n\t            this.state = State$2.BeforeNumericEntity;\n\t        }\n\t        else if (c === CharCodes.Amp) ;\n\t        else {\n\t            this.trieIndex = 0;\n\t            this.trieCurrent = this.entityTrie[0];\n\t            this.state = State$2.InNamedEntity;\n\t            this.stateInNamedEntity(c);\n\t        }\n\t    }\n\t    stateInNamedEntity(c) {\n\t        this.entityExcess += 1;\n\t        this.trieIndex = decode_4(this.entityTrie, this.trieCurrent, this.trieIndex + 1, c);\n\t        if (this.trieIndex < 0) {\n\t            this.emitNamedEntity();\n\t            this.index--;\n\t            return;\n\t        }\n\t        this.trieCurrent = this.entityTrie[this.trieIndex];\n\t        const masked = this.trieCurrent & decode_5.VALUE_LENGTH;\n\t        // If the branch is a value, store it and continue\n\t        if (masked) {\n\t            // The mask is the number of bytes of the value, including the current byte.\n\t            const valueLength = (masked >> 14) - 1;\n\t            // If we have a legacy entity while parsing strictly, just skip the number of bytes\n\t            if (!this.allowLegacyEntity() && c !== CharCodes.Semi) {\n\t                this.trieIndex += valueLength;\n\t            }\n\t            else {\n\t                // Add 1 as we have already incremented the excess\n\t                const entityStart = this.index - this.entityExcess + 1;\n\t                if (entityStart > this.sectionStart) {\n\t                    this.emitPartial(this.sectionStart, entityStart);\n\t                }\n\t                // If this is a surrogate pair, consume the next two bytes\n\t                this.entityResult = this.trieIndex;\n\t                this.trieIndex += valueLength;\n\t                this.entityExcess = 0;\n\t                this.sectionStart = this.index + 1;\n\t                if (valueLength === 0) {\n\t                    this.emitNamedEntity();\n\t                }\n\t            }\n\t        }\n\t    }\n\t    emitNamedEntity() {\n\t        this.state = this.baseState;\n\t        if (this.entityResult === 0) {\n\t            return;\n\t        }\n\t        const valueLength = (this.entityTrie[this.entityResult] & decode_5.VALUE_LENGTH) >>\n\t            14;\n\t        switch (valueLength) {\n\t            case 1:\n\t                this.emitCodePoint(this.entityTrie[this.entityResult] &\n\t                    ~decode_5.VALUE_LENGTH);\n\t                break;\n\t            case 2:\n\t                this.emitCodePoint(this.entityTrie[this.entityResult + 1]);\n\t                break;\n\t            case 3: {\n\t                this.emitCodePoint(this.entityTrie[this.entityResult + 1]);\n\t                this.emitCodePoint(this.entityTrie[this.entityResult + 2]);\n\t            }\n\t        }\n\t    }\n\t    stateBeforeNumericEntity(c) {\n\t        if ((c | 0x20) === CharCodes.LowerX) {\n\t            this.entityExcess++;\n\t            this.state = State$2.InHexEntity;\n\t        }\n\t        else {\n\t            this.state = State$2.InNumericEntity;\n\t            this.stateInNumericEntity(c);\n\t        }\n\t    }\n\t    emitNumericEntity(strict) {\n\t        const entityStart = this.index - this.entityExcess - 1;\n\t        const numberStart = entityStart + 2 + Number(this.state === State$2.InHexEntity);\n\t        if (numberStart !== this.index) {\n\t            // Emit leading data if any\n\t            if (entityStart > this.sectionStart) {\n\t                this.emitPartial(this.sectionStart, entityStart);\n\t            }\n\t            this.sectionStart = this.index + Number(strict);\n\t            this.emitCodePoint(decode_7(this.entityResult));\n\t        }\n\t        this.state = this.baseState;\n\t    }\n\t    stateInNumericEntity(c) {\n\t        if (c === CharCodes.Semi) {\n\t            this.emitNumericEntity(true);\n\t        }\n\t        else if (isNumber$1(c)) {\n\t            this.entityResult = this.entityResult * 10 + (c - CharCodes.Zero);\n\t            this.entityExcess++;\n\t        }\n\t        else {\n\t            if (this.allowLegacyEntity()) {\n\t                this.emitNumericEntity(false);\n\t            }\n\t            else {\n\t                this.state = this.baseState;\n\t            }\n\t            this.index--;\n\t        }\n\t    }\n\t    stateInHexEntity(c) {\n\t        if (c === CharCodes.Semi) {\n\t            this.emitNumericEntity(true);\n\t        }\n\t        else if (isNumber$1(c)) {\n\t            this.entityResult = this.entityResult * 16 + (c - CharCodes.Zero);\n\t            this.entityExcess++;\n\t        }\n\t        else if (isHexDigit(c)) {\n\t            this.entityResult =\n\t                this.entityResult * 16 + ((c | 0x20) - CharCodes.LowerA + 10);\n\t            this.entityExcess++;\n\t        }\n\t        else {\n\t            if (this.allowLegacyEntity()) {\n\t                this.emitNumericEntity(false);\n\t            }\n\t            else {\n\t                this.state = this.baseState;\n\t            }\n\t            this.index--;\n\t        }\n\t    }\n\t    allowLegacyEntity() {\n\t        return (!this.xmlMode &&\n\t            (this.baseState === State$2.Text ||\n\t                this.baseState === State$2.InSpecialTag));\n\t    }\n\t    /**\n\t     * Remove data that has already been consumed from the buffer.\n\t     */\n\t    cleanup() {\n\t        // If we are inside of text or attributes, emit what we already have.\n\t        if (this.running && this.sectionStart !== this.index) {\n\t            if (this.state === State$2.Text ||\n\t                (this.state === State$2.InSpecialTag && this.sequenceIndex === 0)) {\n\t                this.cbs.ontext(this.sectionStart, this.index);\n\t                this.sectionStart = this.index;\n\t            }\n\t            else if (this.state === State$2.InAttributeValueDq ||\n\t                this.state === State$2.InAttributeValueSq ||\n\t                this.state === State$2.InAttributeValueNq) {\n\t                this.cbs.onattribdata(this.sectionStart, this.index);\n\t                this.sectionStart = this.index;\n\t            }\n\t        }\n\t    }\n\t    shouldContinue() {\n\t        return this.index < this.buffer.length + this.offset && this.running;\n\t    }\n\t    /**\n\t     * Iterates through the buffer, calling the function corresponding to the current state.\n\t     *\n\t     * States that are more likely to be hit are higher up, as a performance improvement.\n\t     */\n\t    parse() {\n\t        while (this.shouldContinue()) {\n\t            const c = this.buffer.charCodeAt(this.index - this.offset);\n\t            if (this.state === State$2.Text) {\n\t                this.stateText(c);\n\t            }\n\t            else if (this.state === State$2.SpecialStartSequence) {\n\t                this.stateSpecialStartSequence(c);\n\t            }\n\t            else if (this.state === State$2.InSpecialTag) {\n\t                this.stateInSpecialTag(c);\n\t            }\n\t            else if (this.state === State$2.CDATASequence) {\n\t                this.stateCDATASequence(c);\n\t            }\n\t            else if (this.state === State$2.InAttributeValueDq) {\n\t                this.stateInAttributeValueDoubleQuotes(c);\n\t            }\n\t            else if (this.state === State$2.InAttributeName) {\n\t                this.stateInAttributeName(c);\n\t            }\n\t            else if (this.state === State$2.InCommentLike) {\n\t                this.stateInCommentLike(c);\n\t            }\n\t            else if (this.state === State$2.InSpecialComment) {\n\t                this.stateInSpecialComment(c);\n\t            }\n\t            else if (this.state === State$2.BeforeAttributeName) {\n\t                this.stateBeforeAttributeName(c);\n\t            }\n\t            else if (this.state === State$2.InTagName) {\n\t                this.stateInTagName(c);\n\t            }\n\t            else if (this.state === State$2.InClosingTagName) {\n\t                this.stateInClosingTagName(c);\n\t            }\n\t            else if (this.state === State$2.BeforeTagName) {\n\t                this.stateBeforeTagName(c);\n\t            }\n\t            else if (this.state === State$2.AfterAttributeName) {\n\t                this.stateAfterAttributeName(c);\n\t            }\n\t            else if (this.state === State$2.InAttributeValueSq) {\n\t                this.stateInAttributeValueSingleQuotes(c);\n\t            }\n\t            else if (this.state === State$2.BeforeAttributeValue) {\n\t                this.stateBeforeAttributeValue(c);\n\t            }\n\t            else if (this.state === State$2.BeforeClosingTagName) {\n\t                this.stateBeforeClosingTagName(c);\n\t            }\n\t            else if (this.state === State$2.AfterClosingTagName) {\n\t                this.stateAfterClosingTagName(c);\n\t            }\n\t            else if (this.state === State$2.BeforeSpecialS) {\n\t                this.stateBeforeSpecialS(c);\n\t            }\n\t            else if (this.state === State$2.InAttributeValueNq) {\n\t                this.stateInAttributeValueNoQuotes(c);\n\t            }\n\t            else if (this.state === State$2.InSelfClosingTag) {\n\t                this.stateInSelfClosingTag(c);\n\t            }\n\t            else if (this.state === State$2.InDeclaration) {\n\t                this.stateInDeclaration(c);\n\t            }\n\t            else if (this.state === State$2.BeforeDeclaration) {\n\t                this.stateBeforeDeclaration(c);\n\t            }\n\t            else if (this.state === State$2.BeforeComment) {\n\t                this.stateBeforeComment(c);\n\t            }\n\t            else if (this.state === State$2.InProcessingInstruction) {\n\t                this.stateInProcessingInstruction(c);\n\t            }\n\t            else if (this.state === State$2.InNamedEntity) {\n\t                this.stateInNamedEntity(c);\n\t            }\n\t            else if (this.state === State$2.BeforeEntity) {\n\t                this.stateBeforeEntity(c);\n\t            }\n\t            else if (this.state === State$2.InHexEntity) {\n\t                this.stateInHexEntity(c);\n\t            }\n\t            else if (this.state === State$2.InNumericEntity) {\n\t                this.stateInNumericEntity(c);\n\t            }\n\t            else {\n\t                // `this._state === State.BeforeNumericEntity`\n\t                this.stateBeforeNumericEntity(c);\n\t            }\n\t            this.index++;\n\t        }\n\t        this.cleanup();\n\t    }\n\t    finish() {\n\t        if (this.state === State$2.InNamedEntity) {\n\t            this.emitNamedEntity();\n\t        }\n\t        // If there is remaining data, emit it in a reasonable way\n\t        if (this.sectionStart < this.index) {\n\t            this.handleTrailingData();\n\t        }\n\t        this.cbs.onend();\n\t    }\n\t    /** Handle any trailing data. */\n\t    handleTrailingData() {\n\t        const endIndex = this.buffer.length + this.offset;\n\t        if (this.state === State$2.InCommentLike) {\n\t            if (this.currentSequence === Sequences.CdataEnd) {\n\t                this.cbs.oncdata(this.sectionStart, endIndex, 0);\n\t            }\n\t            else {\n\t                this.cbs.oncomment(this.sectionStart, endIndex, 0);\n\t            }\n\t        }\n\t        else if (this.state === State$2.InNumericEntity &&\n\t            this.allowLegacyEntity()) {\n\t            this.emitNumericEntity(false);\n\t            // All trailing data will have been consumed\n\t        }\n\t        else if (this.state === State$2.InHexEntity &&\n\t            this.allowLegacyEntity()) {\n\t            this.emitNumericEntity(false);\n\t            // All trailing data will have been consumed\n\t        }\n\t        else if (this.state === State$2.InTagName ||\n\t            this.state === State$2.BeforeAttributeName ||\n\t            this.state === State$2.BeforeAttributeValue ||\n\t            this.state === State$2.AfterAttributeName ||\n\t            this.state === State$2.InAttributeName ||\n\t            this.state === State$2.InAttributeValueSq ||\n\t            this.state === State$2.InAttributeValueDq ||\n\t            this.state === State$2.InAttributeValueNq ||\n\t            this.state === State$2.InClosingTagName) ;\n\t        else {\n\t            this.cbs.ontext(this.sectionStart, endIndex);\n\t        }\n\t    }\n\t    emitPartial(start, endIndex) {\n\t        if (this.baseState !== State$2.Text &&\n\t            this.baseState !== State$2.InSpecialTag) {\n\t            this.cbs.onattribdata(start, endIndex);\n\t        }\n\t        else {\n\t            this.cbs.ontext(start, endIndex);\n\t        }\n\t    }\n\t    emitCodePoint(cp) {\n\t        if (this.baseState !== State$2.Text &&\n\t            this.baseState !== State$2.InSpecialTag) {\n\t            this.cbs.onattribentity(cp);\n\t        }\n\t        else {\n\t            this.cbs.ontextentity(cp);\n\t        }\n\t    }\n\t}\n\n\tconst formTags = new Set([\n\t    \"input\",\n\t    \"option\",\n\t    \"optgroup\",\n\t    \"select\",\n\t    \"button\",\n\t    \"datalist\",\n\t    \"textarea\",\n\t]);\n\tconst pTag = new Set([\"p\"]);\n\tconst tableSectionTags = new Set([\"thead\", \"tbody\"]);\n\tconst ddtTags = new Set([\"dd\", \"dt\"]);\n\tconst rtpTags = new Set([\"rt\", \"rp\"]);\n\tconst openImpliesClose = new Map([\n\t    [\"tr\", new Set([\"tr\", \"th\", \"td\"])],\n\t    [\"th\", new Set([\"th\"])],\n\t    [\"td\", new Set([\"thead\", \"th\", \"td\"])],\n\t    [\"body\", new Set([\"head\", \"link\", \"script\"])],\n\t    [\"li\", new Set([\"li\"])],\n\t    [\"p\", pTag],\n\t    [\"h1\", pTag],\n\t    [\"h2\", pTag],\n\t    [\"h3\", pTag],\n\t    [\"h4\", pTag],\n\t    [\"h5\", pTag],\n\t    [\"h6\", pTag],\n\t    [\"select\", formTags],\n\t    [\"input\", formTags],\n\t    [\"output\", formTags],\n\t    [\"button\", formTags],\n\t    [\"datalist\", formTags],\n\t    [\"textarea\", formTags],\n\t    [\"option\", new Set([\"option\"])],\n\t    [\"optgroup\", new Set([\"optgroup\", \"option\"])],\n\t    [\"dd\", ddtTags],\n\t    [\"dt\", ddtTags],\n\t    [\"address\", pTag],\n\t    [\"article\", pTag],\n\t    [\"aside\", pTag],\n\t    [\"blockquote\", pTag],\n\t    [\"details\", pTag],\n\t    [\"div\", pTag],\n\t    [\"dl\", pTag],\n\t    [\"fieldset\", pTag],\n\t    [\"figcaption\", pTag],\n\t    [\"figure\", pTag],\n\t    [\"footer\", pTag],\n\t    [\"form\", pTag],\n\t    [\"header\", pTag],\n\t    [\"hr\", pTag],\n\t    [\"main\", pTag],\n\t    [\"nav\", pTag],\n\t    [\"ol\", pTag],\n\t    [\"pre\", pTag],\n\t    [\"section\", pTag],\n\t    [\"table\", pTag],\n\t    [\"ul\", pTag],\n\t    [\"rt\", rtpTags],\n\t    [\"rp\", rtpTags],\n\t    [\"tbody\", tableSectionTags],\n\t    [\"tfoot\", tableSectionTags],\n\t]);\n\tconst voidElements = new Set([\n\t    \"area\",\n\t    \"base\",\n\t    \"basefont\",\n\t    \"br\",\n\t    \"col\",\n\t    \"command\",\n\t    \"embed\",\n\t    \"frame\",\n\t    \"hr\",\n\t    \"img\",\n\t    \"input\",\n\t    \"isindex\",\n\t    \"keygen\",\n\t    \"link\",\n\t    \"meta\",\n\t    \"param\",\n\t    \"source\",\n\t    \"track\",\n\t    \"wbr\",\n\t]);\n\tconst foreignContextElements = new Set([\"math\", \"svg\"]);\n\tconst htmlIntegrationElements = new Set([\n\t    \"mi\",\n\t    \"mo\",\n\t    \"mn\",\n\t    \"ms\",\n\t    \"mtext\",\n\t    \"annotation-xml\",\n\t    \"foreignobject\",\n\t    \"desc\",\n\t    \"title\",\n\t]);\n\tconst reNameEnd = /\\s|\\//;\n\tclass Parser$1 {\n\t    constructor(cbs, options = {}) {\n\t        var _a, _b, _c, _d, _e;\n\t        this.options = options;\n\t        /** The start index of the last event. */\n\t        this.startIndex = 0;\n\t        /** The end index of the last event. */\n\t        this.endIndex = 0;\n\t        /**\n\t         * Store the start index of the current open tag,\n\t         * so we can update the start index for attributes.\n\t         */\n\t        this.openTagStart = 0;\n\t        this.tagname = \"\";\n\t        this.attribname = \"\";\n\t        this.attribvalue = \"\";\n\t        this.attribs = null;\n\t        this.stack = [];\n\t        this.foreignContext = [];\n\t        this.buffers = [];\n\t        this.bufferOffset = 0;\n\t        /** The index of the last written buffer. Used when resuming after a `pause()`. */\n\t        this.writeIndex = 0;\n\t        /** Indicates whether the parser has finished running / `.end` has been called. */\n\t        this.ended = false;\n\t        this.cbs = cbs !== null && cbs !== void 0 ? cbs : {};\n\t        this.lowerCaseTagNames = (_a = options.lowerCaseTags) !== null && _a !== void 0 ? _a : !options.xmlMode;\n\t        this.lowerCaseAttributeNames =\n\t            (_b = options.lowerCaseAttributeNames) !== null && _b !== void 0 ? _b : !options.xmlMode;\n\t        this.tokenizer = new ((_c = options.Tokenizer) !== null && _c !== void 0 ? _c : Tokenizer$1)(this.options, this);\n\t        (_e = (_d = this.cbs).onparserinit) === null || _e === void 0 ? void 0 : _e.call(_d, this);\n\t    }\n\t    // Tokenizer event handlers\n\t    /** @internal */\n\t    ontext(start, endIndex) {\n\t        var _a, _b;\n\t        const data = this.getSlice(start, endIndex);\n\t        this.endIndex = endIndex - 1;\n\t        (_b = (_a = this.cbs).ontext) === null || _b === void 0 ? void 0 : _b.call(_a, data);\n\t        this.startIndex = endIndex;\n\t    }\n\t    /** @internal */\n\t    ontextentity(cp) {\n\t        var _a, _b;\n\t        /*\n\t         * Entities can be emitted on the character, or directly after.\n\t         * We use the section start here to get accurate indices.\n\t         */\n\t        const idx = this.tokenizer.getSectionStart();\n\t        this.endIndex = idx - 1;\n\t        (_b = (_a = this.cbs).ontext) === null || _b === void 0 ? void 0 : _b.call(_a, decode_6(cp));\n\t        this.startIndex = idx;\n\t    }\n\t    isVoidElement(name) {\n\t        return !this.options.xmlMode && voidElements.has(name);\n\t    }\n\t    /** @internal */\n\t    onopentagname(start, endIndex) {\n\t        this.endIndex = endIndex;\n\t        let name = this.getSlice(start, endIndex);\n\t        if (this.lowerCaseTagNames) {\n\t            name = name.toLowerCase();\n\t        }\n\t        this.emitOpenTag(name);\n\t    }\n\t    emitOpenTag(name) {\n\t        var _a, _b, _c, _d;\n\t        this.openTagStart = this.startIndex;\n\t        this.tagname = name;\n\t        const impliesClose = !this.options.xmlMode && openImpliesClose.get(name);\n\t        if (impliesClose) {\n\t            while (this.stack.length > 0 &&\n\t                impliesClose.has(this.stack[this.stack.length - 1])) {\n\t                const el = this.stack.pop();\n\t                (_b = (_a = this.cbs).onclosetag) === null || _b === void 0 ? void 0 : _b.call(_a, el, true);\n\t            }\n\t        }\n\t        if (!this.isVoidElement(name)) {\n\t            this.stack.push(name);\n\t            if (foreignContextElements.has(name)) {\n\t                this.foreignContext.push(true);\n\t            }\n\t            else if (htmlIntegrationElements.has(name)) {\n\t                this.foreignContext.push(false);\n\t            }\n\t        }\n\t        (_d = (_c = this.cbs).onopentagname) === null || _d === void 0 ? void 0 : _d.call(_c, name);\n\t        if (this.cbs.onopentag)\n\t            this.attribs = {};\n\t    }\n\t    endOpenTag(isImplied) {\n\t        var _a, _b;\n\t        this.startIndex = this.openTagStart;\n\t        if (this.attribs) {\n\t            (_b = (_a = this.cbs).onopentag) === null || _b === void 0 ? void 0 : _b.call(_a, this.tagname, this.attribs, isImplied);\n\t            this.attribs = null;\n\t        }\n\t        if (this.cbs.onclosetag && this.isVoidElement(this.tagname)) {\n\t            this.cbs.onclosetag(this.tagname, true);\n\t        }\n\t        this.tagname = \"\";\n\t    }\n\t    /** @internal */\n\t    onopentagend(endIndex) {\n\t        this.endIndex = endIndex;\n\t        this.endOpenTag(false);\n\t        // Set `startIndex` for next node\n\t        this.startIndex = endIndex + 1;\n\t    }\n\t    /** @internal */\n\t    onclosetag(start, endIndex) {\n\t        var _a, _b, _c, _d, _e, _f;\n\t        this.endIndex = endIndex;\n\t        let name = this.getSlice(start, endIndex);\n\t        if (this.lowerCaseTagNames) {\n\t            name = name.toLowerCase();\n\t        }\n\t        if (foreignContextElements.has(name) ||\n\t            htmlIntegrationElements.has(name)) {\n\t            this.foreignContext.pop();\n\t        }\n\t        if (!this.isVoidElement(name)) {\n\t            const pos = this.stack.lastIndexOf(name);\n\t            if (pos !== -1) {\n\t                if (this.cbs.onclosetag) {\n\t                    let count = this.stack.length - pos;\n\t                    while (count--) {\n\t                        // We know the stack has sufficient elements.\n\t                        this.cbs.onclosetag(this.stack.pop(), count !== 0);\n\t                    }\n\t                }\n\t                else\n\t                    this.stack.length = pos;\n\t            }\n\t            else if (!this.options.xmlMode && name === \"p\") {\n\t                // Implicit open before close\n\t                this.emitOpenTag(\"p\");\n\t                this.closeCurrentTag(true);\n\t            }\n\t        }\n\t        else if (!this.options.xmlMode && name === \"br\") {\n\t            // We can't use `emitOpenTag` for implicit open, as `br` would be implicitly closed.\n\t            (_b = (_a = this.cbs).onopentagname) === null || _b === void 0 ? void 0 : _b.call(_a, \"br\");\n\t            (_d = (_c = this.cbs).onopentag) === null || _d === void 0 ? void 0 : _d.call(_c, \"br\", {}, true);\n\t            (_f = (_e = this.cbs).onclosetag) === null || _f === void 0 ? void 0 : _f.call(_e, \"br\", false);\n\t        }\n\t        // Set `startIndex` for next node\n\t        this.startIndex = endIndex + 1;\n\t    }\n\t    /** @internal */\n\t    onselfclosingtag(endIndex) {\n\t        this.endIndex = endIndex;\n\t        if (this.options.xmlMode ||\n\t            this.options.recognizeSelfClosing ||\n\t            this.foreignContext[this.foreignContext.length - 1]) {\n\t            this.closeCurrentTag(false);\n\t            // Set `startIndex` for next node\n\t            this.startIndex = endIndex + 1;\n\t        }\n\t        else {\n\t            // Ignore the fact that the tag is self-closing.\n\t            this.onopentagend(endIndex);\n\t        }\n\t    }\n\t    closeCurrentTag(isOpenImplied) {\n\t        var _a, _b;\n\t        const name = this.tagname;\n\t        this.endOpenTag(isOpenImplied);\n\t        // Self-closing tags will be on the top of the stack\n\t        if (this.stack[this.stack.length - 1] === name) {\n\t            // If the opening tag isn't implied, the closing tag has to be implied.\n\t            (_b = (_a = this.cbs).onclosetag) === null || _b === void 0 ? void 0 : _b.call(_a, name, !isOpenImplied);\n\t            this.stack.pop();\n\t        }\n\t    }\n\t    /** @internal */\n\t    onattribname(start, endIndex) {\n\t        this.startIndex = start;\n\t        const name = this.getSlice(start, endIndex);\n\t        this.attribname = this.lowerCaseAttributeNames\n\t            ? name.toLowerCase()\n\t            : name;\n\t    }\n\t    /** @internal */\n\t    onattribdata(start, endIndex) {\n\t        this.attribvalue += this.getSlice(start, endIndex);\n\t    }\n\t    /** @internal */\n\t    onattribentity(cp) {\n\t        this.attribvalue += decode_6(cp);\n\t    }\n\t    /** @internal */\n\t    onattribend(quote, endIndex) {\n\t        var _a, _b;\n\t        this.endIndex = endIndex;\n\t        (_b = (_a = this.cbs).onattribute) === null || _b === void 0 ? void 0 : _b.call(_a, this.attribname, this.attribvalue, quote === QuoteType.Double\n\t            ? '\"'\n\t            : quote === QuoteType.Single\n\t                ? \"'\"\n\t                : quote === QuoteType.NoValue\n\t                    ? undefined\n\t                    : null);\n\t        if (this.attribs &&\n\t            !Object.prototype.hasOwnProperty.call(this.attribs, this.attribname)) {\n\t            this.attribs[this.attribname] = this.attribvalue;\n\t        }\n\t        this.attribvalue = \"\";\n\t    }\n\t    getInstructionName(value) {\n\t        const idx = value.search(reNameEnd);\n\t        let name = idx < 0 ? value : value.substr(0, idx);\n\t        if (this.lowerCaseTagNames) {\n\t            name = name.toLowerCase();\n\t        }\n\t        return name;\n\t    }\n\t    /** @internal */\n\t    ondeclaration(start, endIndex) {\n\t        this.endIndex = endIndex;\n\t        const value = this.getSlice(start, endIndex);\n\t        if (this.cbs.onprocessinginstruction) {\n\t            const name = this.getInstructionName(value);\n\t            this.cbs.onprocessinginstruction(`!${name}`, `!${value}`);\n\t        }\n\t        // Set `startIndex` for next node\n\t        this.startIndex = endIndex + 1;\n\t    }\n\t    /** @internal */\n\t    onprocessinginstruction(start, endIndex) {\n\t        this.endIndex = endIndex;\n\t        const value = this.getSlice(start, endIndex);\n\t        if (this.cbs.onprocessinginstruction) {\n\t            const name = this.getInstructionName(value);\n\t            this.cbs.onprocessinginstruction(`?${name}`, `?${value}`);\n\t        }\n\t        // Set `startIndex` for next node\n\t        this.startIndex = endIndex + 1;\n\t    }\n\t    /** @internal */\n\t    oncomment(start, endIndex, offset) {\n\t        var _a, _b, _c, _d;\n\t        this.endIndex = endIndex;\n\t        (_b = (_a = this.cbs).oncomment) === null || _b === void 0 ? void 0 : _b.call(_a, this.getSlice(start, endIndex - offset));\n\t        (_d = (_c = this.cbs).oncommentend) === null || _d === void 0 ? void 0 : _d.call(_c);\n\t        // Set `startIndex` for next node\n\t        this.startIndex = endIndex + 1;\n\t    }\n\t    /** @internal */\n\t    oncdata(start, endIndex, offset) {\n\t        var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;\n\t        this.endIndex = endIndex;\n\t        const value = this.getSlice(start, endIndex - offset);\n\t        if (this.options.xmlMode || this.options.recognizeCDATA) {\n\t            (_b = (_a = this.cbs).oncdatastart) === null || _b === void 0 ? void 0 : _b.call(_a);\n\t            (_d = (_c = this.cbs).ontext) === null || _d === void 0 ? void 0 : _d.call(_c, value);\n\t            (_f = (_e = this.cbs).oncdataend) === null || _f === void 0 ? void 0 : _f.call(_e);\n\t        }\n\t        else {\n\t            (_h = (_g = this.cbs).oncomment) === null || _h === void 0 ? void 0 : _h.call(_g, `[CDATA[${value}]]`);\n\t            (_k = (_j = this.cbs).oncommentend) === null || _k === void 0 ? void 0 : _k.call(_j);\n\t        }\n\t        // Set `startIndex` for next node\n\t        this.startIndex = endIndex + 1;\n\t    }\n\t    /** @internal */\n\t    onend() {\n\t        var _a, _b;\n\t        if (this.cbs.onclosetag) {\n\t            // Set the end index for all remaining tags\n\t            this.endIndex = this.startIndex;\n\t            for (let i = this.stack.length; i > 0; this.cbs.onclosetag(this.stack[--i], true))\n\t                ;\n\t        }\n\t        (_b = (_a = this.cbs).onend) === null || _b === void 0 ? void 0 : _b.call(_a);\n\t    }\n\t    /**\n\t     * Resets the parser to a blank state, ready to parse a new HTML document\n\t     */\n\t    reset() {\n\t        var _a, _b, _c, _d;\n\t        (_b = (_a = this.cbs).onreset) === null || _b === void 0 ? void 0 : _b.call(_a);\n\t        this.tokenizer.reset();\n\t        this.tagname = \"\";\n\t        this.attribname = \"\";\n\t        this.attribs = null;\n\t        this.stack.length = 0;\n\t        this.startIndex = 0;\n\t        this.endIndex = 0;\n\t        (_d = (_c = this.cbs).onparserinit) === null || _d === void 0 ? void 0 : _d.call(_c, this);\n\t        this.buffers.length = 0;\n\t        this.bufferOffset = 0;\n\t        this.writeIndex = 0;\n\t        this.ended = false;\n\t    }\n\t    /**\n\t     * Resets the parser, then parses a complete document and\n\t     * pushes it to the handler.\n\t     *\n\t     * @param data Document to parse.\n\t     */\n\t    parseComplete(data) {\n\t        this.reset();\n\t        this.end(data);\n\t    }\n\t    getSlice(start, end) {\n\t        while (start - this.bufferOffset >= this.buffers[0].length) {\n\t            this.shiftBuffer();\n\t        }\n\t        let str = this.buffers[0].slice(start - this.bufferOffset, end - this.bufferOffset);\n\t        while (end - this.bufferOffset > this.buffers[0].length) {\n\t            this.shiftBuffer();\n\t            str += this.buffers[0].slice(0, end - this.bufferOffset);\n\t        }\n\t        return str;\n\t    }\n\t    shiftBuffer() {\n\t        this.bufferOffset += this.buffers[0].length;\n\t        this.writeIndex--;\n\t        this.buffers.shift();\n\t    }\n\t    /**\n\t     * Parses a chunk of data and calls the corresponding callbacks.\n\t     *\n\t     * @param chunk Chunk to parse.\n\t     */\n\t    write(chunk) {\n\t        var _a, _b;\n\t        if (this.ended) {\n\t            (_b = (_a = this.cbs).onerror) === null || _b === void 0 ? void 0 : _b.call(_a, new Error(\".write() after done!\"));\n\t            return;\n\t        }\n\t        this.buffers.push(chunk);\n\t        if (this.tokenizer.running) {\n\t            this.tokenizer.write(chunk);\n\t            this.writeIndex++;\n\t        }\n\t    }\n\t    /**\n\t     * Parses the end of the buffer and clears the stack, calls onend.\n\t     *\n\t     * @param chunk Optional final chunk to parse.\n\t     */\n\t    end(chunk) {\n\t        var _a, _b;\n\t        if (this.ended) {\n\t            (_b = (_a = this.cbs).onerror) === null || _b === void 0 ? void 0 : _b.call(_a, Error(\".end() after done!\"));\n\t            return;\n\t        }\n\t        if (chunk)\n\t            this.write(chunk);\n\t        this.ended = true;\n\t        this.tokenizer.end();\n\t    }\n\t    /**\n\t     * Pauses parsing. The parser won't emit events until `resume` is called.\n\t     */\n\t    pause() {\n\t        this.tokenizer.pause();\n\t    }\n\t    /**\n\t     * Resumes parsing after `pause` was called.\n\t     */\n\t    resume() {\n\t        this.tokenizer.resume();\n\t        while (this.tokenizer.running &&\n\t            this.writeIndex < this.buffers.length) {\n\t            this.tokenizer.write(this.buffers[this.writeIndex++]);\n\t        }\n\t        if (this.ended)\n\t            this.tokenizer.end();\n\t    }\n\t    /**\n\t     * Alias of `write`, for backwards compatibility.\n\t     *\n\t     * @param chunk Chunk to parse.\n\t     * @deprecated\n\t     */\n\t    parseChunk(chunk) {\n\t        this.write(chunk);\n\t    }\n\t    /**\n\t     * Alias of `end`, for backwards compatibility.\n\t     *\n\t     * @param chunk Optional final chunk to parse.\n\t     * @deprecated\n\t     */\n\t    done(chunk) {\n\t        this.end(chunk);\n\t    }\n\t}\n\n\t// Helper methods\n\t/**\n\t * Parses the data, returns the resulting document.\n\t *\n\t * @param data The data that should be parsed.\n\t * @param options Optional options for the parser and DOM builder.\n\t */\n\tfunction parseDocument(data, options) {\n\t    const handler = new DomHandler(undefined, options);\n\t    new Parser$1(handler, options).end(data);\n\t    return handler.root;\n\t}\n\n\t/**\n\t * Types used in signatures of Cheerio methods.\n\t *\n\t * @category Cheerio\n\t */\n\tconst parse$4 = getParse((content, options, isDocument, context) => options.xmlMode || options._useHtmlParser2\n\t    ? parseDocument(content, options)\n\t    : parseWithParse5(content, options, isDocument, context));\n\t// Duplicate docs due to https://github.com/TypeStrong/typedoc/issues/1616\n\t/**\n\t * Create a querying function, bound to a document created from the provided markup.\n\t *\n\t * Note that similar to web browser contexts, this operation may introduce\n\t * `<html>`, `<head>`, and `<body>` elements; set `isDocument` to `false` to\n\t * switch to fragment mode and disable this.\n\t *\n\t * @param content - Markup to be loaded.\n\t * @param options - Options for the created instance.\n\t * @param isDocument - Allows parser to be switched to fragment mode.\n\t * @returns The loaded document.\n\t * @see {@link https://cheerio.js.org#loading} for additional usage information.\n\t */\n\tconst load = getLoad(parse$4, (dom, options) => options.xmlMode || options._useHtmlParser2\n\t    ? render(dom, options)\n\t    : renderWithParse5(dom));\n\t/**\n\t * The default cheerio instance.\n\t *\n\t * @deprecated Use the function returned by `load` instead.\n\t */\n\tvar cheerio = load([]);\n\n\tvar debug_1 = createCommonjsModule(function (module, exports) {\n\texports = module.exports = debug;\n\n\tfunction debug(label) {\n\t  return _debug.bind(null, label);\n\t}\n\n\tfunction _debug(label) {\n\t  var args = [].slice.call(arguments, 1);\n\t  args.unshift('[' + label + ']');\n\t  process.stderr.write(args.join(' ') + '\\n');\n\t}\n\t});\n\n\tvar lexer = createCommonjsModule(function (module, exports) {\n\n\tvar debug = debug_1('lex');\n\n\texports = module.exports = lex;\n\n\t/**\n\t * Convert a CSS string into an array of lexical tokens.\n\t *\n\t * @param {String} css CSS\n\t * @returns {Array} lexical tokens\n\t */\n\tfunction lex(css) {\n\n\t  var buffer = '';      // Character accumulator\n\t  var ch;               // Current character\n\t  var column = 0;       // Current source column number\n\t  var cursor = -1;      // Current source cursor position\n\t  var depth = 0;        // Current nesting depth\n\t  var line = 1;         // Current source line number\n\t  var state = 'before-selector'; // Current state\n\t  var stack = [state];  // State stack\n\t  var token = {};       // Current token\n\t  var tokens = [];      // Token accumulator\n\n\t  // Supported @-rules, in roughly descending order of usage probability.\n\t  var atRules = [\n\t    'media',\n\t    'keyframes',\n\t    { name: '-webkit-keyframes', type: 'keyframes', prefix: '-webkit-' },\n\t    { name: '-moz-keyframes', type: 'keyframes', prefix: '-moz-' },\n\t    { name: '-ms-keyframes', type: 'keyframes', prefix: '-ms-' },\n\t    { name: '-o-keyframes', type: 'keyframes', prefix: '-o-' },\n\t    'font-face',\n\t    { name: 'import', state: 'before-at-value' },\n\t    { name: 'charset', state: 'before-at-value' },\n\t    'supports',\n\t    'viewport',\n\t    { name: 'namespace', state: 'before-at-value' },\n\t    'document',\n\t    { name: '-moz-document', type: 'document', prefix: '-moz-' },\n\t    'page'\n\t  ];\n\n\t  // -- Functions ------------------------------------------------------------\n\n\t  /**\n\t   * Advance the character cursor and return the next character.\n\t   *\n\t   * @returns {String} The next character.\n\t   */\n\t  function getCh() {\n\t    skip();\n\t    return css[cursor];\n\t  }\n\n\t  /**\n\t   * Return the state at the given index in the stack.\n\t   * The stack is LIFO so indexing is from the right.\n\t   *\n\t   * @param {Number} [index=0] Index to return.\n\t   * @returns {String} state\n\t   */\n\t  function getState(index) {\n\t    return index ? stack[stack.length - 1 - index] : state;\n\t  }\n\n\t  /**\n\t   * Look ahead for a string beginning from the next position. The string\n\t   * being looked for must start at the next position.\n\t   *\n\t   * @param {String} str The string to look for.\n\t   * @returns {Boolean} Whether the string was found.\n\t   */\n\t  function isNextString(str) {\n\t    var start = cursor + 1;\n\t    return (str === css.slice(start, start + str.length));\n\t  }\n\n\t  /**\n\t   * Find the start position of a substring beginning from the next\n\t   * position. The string being looked for may begin anywhere.\n\t   *\n\t   * @param {String} str The substring to look for.\n\t   * @returns {Number|false} The position, or `false` if not found.\n\t   */\n\t  function find(str) {\n\t    var pos = css.slice(cursor).indexOf(str);\n\n\t    return pos > 0 ? pos : false;\n\t  }\n\n\t  /**\n\t   * Determine whether a character is next.\n\t   *\n\t   * @param {String} ch Character.\n\t   * @returns {Boolean} Whether the character is next.\n\t   */\n\t  function isNextChar(ch) {\n\t    return ch === peek(1);\n\t  }\n\n\t  /**\n\t   * Return the character at the given cursor offset. The offset is relative\n\t   * to the cursor, so negative values move backwards.\n\t   *\n\t   * @param {Number} [offset=1] Cursor offset.\n\t   * @returns {String} Character.\n\t   */\n\t  function peek(offset) {\n\t    return css[cursor + (offset || 1)];\n\t  }\n\n\t  /**\n\t   * Remove the current state from the stack and set the new current state.\n\t   *\n\t   * @returns {String} The removed state.\n\t   */\n\t  function popState() {\n\t    var removed = stack.pop();\n\t    state = stack[stack.length - 1];\n\n\t    return removed;\n\t  }\n\n\t  /**\n\t   * Set the current state and add it to the stack.\n\t   *\n\t   * @param {String} newState The new state.\n\t   * @returns {Number} The new stack length.\n\t   */\n\t  function pushState(newState) {\n\t    state = newState;\n\t    stack.push(state);\n\n\t    return stack.length;\n\t  }\n\n\t  /**\n\t   * Replace the current state with a new state.\n\t   *\n\t   * @param {String} newState The new state.\n\t   * @returns {String} The replaced state.\n\t   */\n\t  function replaceState(newState) {\n\t    var previousState = state;\n\t    stack[stack.length - 1] = state = newState;\n\n\t    return previousState;\n\t  }\n\n\t  /**\n\t   * Move the character cursor. Positive numbers move the cursor forward.\n\t   * Negative numbers are not supported!\n\t   *\n\t   * @param {Number} [n=1] Number of characters to skip.\n\t   */\n\t  function skip(n) {\n\t    if ((n || 1) == 1) {\n\t      if (css[cursor] == '\\n') {\n\t        line++;\n\t        column = 1;\n\t      } else {\n\t        column++;\n\t      }\n\t      cursor++;\n\t    } else {\n\t      var skipStr = css.slice(cursor, cursor + n).split('\\n');\n\t      if (skipStr.length > 1) {\n\t        line += skipStr.length - 1;\n\t        column = 1;\n\t      }\n\t      column += skipStr[skipStr.length - 1].length;\n\t      cursor = cursor + n;\n\t    }\n\t  }\n\n\t  /**\n\t   * Add the current token to the pile and reset the buffer.\n\t   */\n\t  function addToken() {\n\t    token.end = {\n\t      line: line,\n\t      col: column\n\t    };\n\n\t    tokens.push(token);\n\n\t    buffer = '';\n\t    token = {};\n\t  }\n\n\t  /**\n\t   * Set the current token.\n\t   *\n\t   * @param {String} type Token type.\n\t   */\n\t  function initializeToken(type) {\n\t    token = {\n\t      type: type,\n\t      start: {\n\t        line: line,\n\t        col : column\n\t      }\n\t    };\n\t  }\n\n\t  while (ch = getCh()) {\n\n\t    // column += 1;\n\n\t    switch (ch) {\n\t    // Space\n\t    case ' ':\n\t      switch (getState()) {\n\t      case 'selector':\n\t      case 'value':\n\t      case 'value-paren':\n\t      case 'at-group':\n\t      case 'at-value':\n\t      case 'comment':\n\t      case 'double-string':\n\t      case 'single-string':\n\t        buffer += ch;\n\t        break;\n\t      }\n\t      break;\n\n\t    // Newline or tab\n\t    case '\\n':\n\t    case '\\t':\n\t    case '\\r':\n\t    case '\\f':\n\t      switch (getState()) {\n\t      case 'value':\n\t      case 'value-paren':\n\t      case 'at-group':\n\t      case 'comment':\n\t      case 'single-string':\n\t      case 'double-string':\n\t      case 'selector':\n\t        buffer += ch;\n\t        break;\n\n\t      case 'at-value':\n\t        // Tokenize an @-rule if a semi-colon was omitted.\n\t        if ('\\n' === ch) {\n\t          token.value = buffer.trim();\n\t          addToken();\n\t          popState();\n\t        }\n\t        break;\n\t      }\n\n\t      // if ('\\n' === ch) {\n\t      //   column = 0;\n\t      //   line += 1;\n\t      // }\n\t      break;\n\n\t    case ':':\n\t      switch (getState()) {\n\t      case 'name':\n\t        token.name = buffer.trim();\n\t        buffer = '';\n\n\t        replaceState('before-value');\n\t        break;\n\n\t      case 'before-selector':\n\t        buffer += ch;\n\n\t        initializeToken('selector');\n\t        pushState('selector');\n\t        break;\n\n\t      case 'before-value':\n\t        replaceState('value');\n\t        buffer += ch;\n\t        break;\n\n\t      default:\n\t        buffer += ch;\n\t        break;\n\t      }\n\t      break;\n\n\t    case ';':\n\t      switch (getState()) {\n\t      case 'name':\n\t      case 'before-value':\n\t      case 'value':\n\t        // Tokenize a declaration\n\t        // if value is empty skip the declaration\n\t        if (buffer.trim().length > 0) {\n\t          token.value = buffer.trim(),\n\t          addToken();\n\t        }\n\t        replaceState('before-name');\n\t        break;\n\n\t      case 'value-paren':\n\t        // Insignificant semi-colon\n\t        buffer += ch;\n\t        break;\n\n\t      case 'at-value':\n\t        // Tokenize an @-rule\n\t        token.value = buffer.trim();\n\t        addToken();\n\t        popState();\n\t        break;\n\n\t      case 'before-name':\n\t        // Extraneous semi-colon\n\t        break;\n\n\t      default:\n\t        buffer += ch;\n\t        break;\n\t      }\n\t      break;\n\n\t    case '{':\n\t      switch (getState()) {\n\t      case 'selector':\n\t        // If the sequence is `\\{` then assume that the brace should be escaped.\n\t        if (peek(-1) === '\\\\') {\n\t            buffer += ch;\n\t            break;\n\t        }\n\n\t        // Tokenize a selector\n\t        token.text = buffer.trim();\n\t        addToken();\n\t        replaceState('before-name');\n\t        depth = depth + 1;\n\t        break;\n\n\t      case 'at-group':\n\t        // Tokenize an @-group\n\t        token.name = buffer.trim();\n\n\t        // XXX: @-rules are starting to get hairy\n\t        switch (token.type) {\n\t        case 'font-face':\n\t        case 'viewport' :\n\t        case 'page'     :\n\t          pushState('before-name');\n\t          break;\n\n\t        default:\n\t          pushState('before-selector');\n\t        }\n\n\t        addToken();\n\t        depth = depth + 1;\n\t        break;\n\n\t      case 'name':\n\t      case 'at-rule':\n\t        // Tokenize a declaration or an @-rule\n\t        token.name = buffer.trim();\n\t        addToken();\n\t        pushState('before-name');\n\t        depth = depth + 1;\n\t        break;\n\n\t      case 'comment':\n\t      case 'double-string':\n\t      case 'single-string':\n\t        // Ignore braces in comments and strings\n\t        buffer += ch;\n\t        break;\n\t      case 'before-value':\n\t        replaceState('value');\n\t        buffer += ch;\n\t        break;\n\t      }\n\n\t      break;\n\n\t    case '}':\n\t      switch (getState()) {\n\t      case 'before-name':\n\t      case 'name':\n\t      case 'before-value':\n\t      case 'value':\n\t        // If the buffer contains anything, it is a value\n\t        if (buffer) {\n\t          token.value = buffer.trim();\n\t        }\n\n\t        // If the current token has a name and a value it should be tokenized.\n\t        if (token.name && token.value) {\n\t          addToken();\n\t        }\n\n\t        // Leave the block\n\t        initializeToken('end');\n\t        addToken();\n\t        popState();\n\n\t        // We might need to leave again.\n\t        // XXX: What about 3 levels deep?\n\t        if ('at-group' === getState()) {\n\t          initializeToken('at-group-end');\n\t          addToken();\n\t          popState();\n\t        }\n\t        \n\t        if (depth > 0) {\n\t          depth = depth - 1;\n\t        }\n\n\t        break;\n\n\t      case 'at-group':\n\t      case 'before-selector':\n\t      case 'selector':\n\t        // If the sequence is `\\}` then assume that the brace should be escaped.\n\t        if (peek(-1) === '\\\\') {\n\t            buffer += ch;\n\t            break;\n\t        }\n\n\t        if (depth > 0) {\n\t          // Leave block if in an at-group\n\t          if ('at-group' === getState(1)) {\n\t            initializeToken('at-group-end');\n\t            addToken();\n\t          }\n\t        }\n\n\t        if (depth > 1) {\n\t          popState();\n\t        }\n\n\t        if (depth > 0) {\n\t          depth = depth - 1;\n\t        }\n\t        break;\n\n\t      case 'double-string':\n\t      case 'single-string':\n\t      case 'comment':\n\t        // Ignore braces in comments and strings.\n\t        buffer += ch;\n\t        break;\n\t      }\n\n\t      break;\n\n\t    // Strings\n\t    case '\"':\n\t    case \"'\":\n\t      switch (getState()) {\n\t      case 'double-string':\n\t        if ('\"' === ch && '\\\\' !== peek(-1)) {\n\t          popState();\n\t        }\n\t        break;\n\n\t      case 'single-string':\n\t        if (\"'\" === ch && '\\\\' !== peek(-1)) {\n\t          popState();\n\t        }\n\t        break;\n\n\t      case 'before-at-value':\n\t        replaceState('at-value');\n\t        pushState('\"' === ch ? 'double-string' : 'single-string');\n\t        break;\n\n\t      case 'before-value':\n\t        replaceState('value');\n\t        pushState('\"' === ch ? 'double-string' : 'single-string');\n\t        break;\n\n\t      case 'comment':\n\t        // Ignore strings within comments.\n\t        break;\n\n\t      default:\n\t        if ('\\\\' !== peek(-1)) {\n\t          pushState('\"' === ch ? 'double-string' : 'single-string');\n\t        }\n\t      }\n\n\t      buffer += ch;\n\t      break;\n\n\t    // Comments\n\t    case '/':\n\t      switch (getState()) {\n\t      case 'comment':\n\t      case 'double-string':\n\t      case 'single-string':\n\t        // Ignore\n\t        buffer += ch;\n\t        break;\n\n\t      case 'before-value':\n\t      case 'selector':\n\t      case 'name':\n\t      case 'value':\n\t        if (isNextChar('*')) {\n\t          // Ignore comments in selectors, properties and values. They are\n\t          // difficult to represent in the AST.\n\t          var pos = find('*/');\n\n\t          if (pos) {\n\t            skip(pos + 1);\n\t          }\n\t        } else {\n\t          if (getState() == 'before-value') replaceState('value');\n\t          buffer += ch;\n\t        }\n\t        break;\n\n\t      default:\n\t        if (isNextChar('*')) {\n\t          // Create a comment token\n\t          initializeToken('comment');\n\t          pushState('comment');\n\t          skip();\n\t        }\n\t        else {\n\t          buffer += ch;\n\t        }\n\t        break;\n\t      }\n\t      break;\n\n\t    // Comment end or universal selector\n\t    case '*':\n\t      switch (getState()) {\n\t      case 'comment':\n\t        if (isNextChar('/')) {\n\t          // Tokenize a comment\n\t          token.text = buffer; // Don't trim()!\n\t          skip();\n\t          addToken();\n\t          popState();\n\t        }\n\t        else {\n\t          buffer += ch;\n\t        }\n\t        break;\n\n\t      case 'before-selector':\n\t        buffer += ch;\n\t        initializeToken('selector');\n\t        pushState('selector');\n\t        break;\n\n\t      case 'before-value':\n\t        replaceState('value');\n\t        buffer += ch;\n\t        break;\n\n\t      default:\n\t        buffer += ch;\n\t      }\n\t      break;\n\n\t    // @-rules\n\t    case '@':\n\t      switch (getState()) {\n\t      case 'comment':\n\t      case 'double-string':\n\t      case 'single-string':\n\t        buffer += ch;\n\t        break;\n\t      case 'before-value':\n\t        replaceState('value');\n\t        buffer += ch;\n\t        break;\n\n\t      default:\n\t        // Iterate over the supported @-rules and attempt to tokenize one.\n\t        var tokenized = false;\n\t        var name;\n\t        var rule;\n\n\t        for (var j = 0, len = atRules.length; !tokenized && j < len; ++j) {\n\t          rule = atRules[j];\n\t          name = rule.name || rule;\n\n\t          if (!isNextString(name)) { continue; }\n\n\t          tokenized = true;\n\n\t          initializeToken(name);\n\t          pushState(rule.state || 'at-group');\n\t          skip(name.length);\n\n\t          if (rule.prefix) {\n\t            token.prefix = rule.prefix;\n\t          }\n\n\t          if (rule.type) {\n\t            token.type = rule.type;\n\t          }\n\t        }\n\n\t        if (!tokenized) {\n\t          // Keep on truckin' America!\n\t          buffer += ch;\n\t        }\n\t        break;\n\t      }\n\t      break;\n\n\t    // Parentheses are tracked to disambiguate semi-colons, such as within a\n\t    // data URI.\n\t    case '(':\n\t      switch (getState()) {\n\t      case 'value':\n\t        pushState('value-paren');\n\t        break;\n\t      case 'before-value':\n\t        replaceState('value');\n\t        break;\n\t      }\n\n\t      buffer += ch;\n\t      break;\n\n\t    case ')':\n\t      switch (getState()) {\n\t      case 'value-paren':\n\t        popState();\n\t        break;\n\t      case 'before-value':\n\t        replaceState('value');\n\t        break;\n\t      }\n\n\t      buffer += ch;\n\t      break;\n\n\t    default:\n\t      switch (getState()) {\n\t      case 'before-selector':\n\t        initializeToken('selector');\n\t        pushState('selector');\n\t        break;\n\n\t      case 'before-name':\n\t        initializeToken('property');\n\t        replaceState('name');\n\t        break;\n\n\t      case 'before-value':\n\t        replaceState('value');\n\t        break;\n\n\t      case 'before-at-value':\n\t        replaceState('at-value');\n\t        break;\n\t      }\n\n\t      buffer += ch;\n\t      break;\n\t    }\n\t  }\n\n\t  return tokens;\n\t}\n\t});\n\n\tvar parser = createCommonjsModule(function (module, exports) {\n\n\tvar debug = debug_1('parse');\n\n\n\texports = module.exports = parse;\n\n\tvar _comments;   // Whether comments are allowed.\n\tvar _depth;      // Current block nesting depth.\n\tvar _position;   // Whether to include line/column position.\n\tvar _tokens;     // Array of lexical tokens.\n\n\t/**\n\t * Convert a CSS string or array of lexical tokens into a `stringify`-able AST.\n\t *\n\t * @param {String} css CSS string or array of lexical token\n\t * @param {Object} [options]\n\t * @param {Boolean} [options.comments=false] allow comment nodes in the AST\n\t * @returns {Object} `stringify`-able AST\n\t */\n\tfunction parse(css, options) {\n\n\t  options || (options = {});\n\t  _comments = !!options.comments;\n\t  _position = !!options.position;\n\n\t  _depth = 0;\n\n\t  // Operate on a copy of the given tokens, or the lex()'d CSS string.\n\t  _tokens = Array.isArray(css) ? css.slice() : lexer(css);\n\n\t  var rule;\n\t  var rules = [];\n\t  var token;\n\n\t  while ((token = next())) {\n\t    rule = parseToken(token);\n\t    rule && rules.push(rule);\n\t  }\n\n\t  return {\n\t    type: \"stylesheet\",\n\t    stylesheet: {\n\t      rules: rules\n\t    }\n\t  };\n\t}\n\n\t// -- Functions --------------------------------------------------------------\n\n\t/**\n\t * Build an AST node from a lexical token.\n\t *\n\t * @param {Object} token lexical token\n\t * @param {Object} [override] object hash of properties that override those\n\t *   already in the token, or that will be added to the token.\n\t * @returns {Object} AST node\n\t */\n\tfunction astNode(token, override) {\n\t  override || (override = {});\n\n\t  var key;\n\t  var keys = ['type', 'name', 'value'];\n\t  var node = {};\n\n\t  // Avoiding [].forEach for performance reasons.\n\t  for (var i = 0; i < keys.length; ++i) {\n\t    key = keys[i];\n\n\t    if (token[key]) {\n\t      node[key] = override[key] || token[key];\n\t    }\n\t  }\n\n\t  keys = Object.keys(override);\n\n\t  for (i = 0; i < keys.length; ++i) {\n\t    key = keys[i];\n\n\t    if (!node[key]) {\n\t      node[key] = override[key];\n\t    }\n\t  }\n\n\t  if (_position) {\n\t    node.position = {\n\t      start: token.start,\n\t      end: token.end\n\t    };\n\t  }\n\n\t  return node;\n\t}\n\n\t/**\n\t * Remove a lexical token from the stack and return the removed token.\n\t *\n\t * @returns {Object} lexical token\n\t */\n\tfunction next() {\n\t  var token = _tokens.shift();\n\t  return token;\n\t}\n\n\t// -- Parse* Functions ---------------------------------------------------------\n\n\t/**\n\t * Convert an @-group lexical token to an AST node.\n\t *\n\t * @param {Object} token @-group lexical token\n\t * @returns {Object} @-group AST node\n\t */\n\tfunction parseAtGroup(token) {\n\t  _depth = _depth + 1;\n\n\t  // As the @-group token is assembled, relevant token values are captured here\n\t  // temporarily. They will later be used as `tokenize()` overrides.\n\t  var overrides = {};\n\n\t  switch (token.type) {\n\t  case 'font-face':\n\t  case 'viewport' :\n\t    overrides.declarations = parseDeclarations();\n\t    break;\n\n\t  case 'page':\n\t    overrides.prefix = token.prefix;\n\t    overrides.declarations = parseDeclarations();\n\t    break;\n\n\t  default:\n\t    overrides.prefix = token.prefix;\n\t    overrides.rules = parseRules();\n\t  }\n\n\t  return astNode(token, overrides);\n\t}\n\n\t/**\n\t * Convert an @import lexical token to an AST node.\n\t *\n\t * @param {Object} token @import lexical token\n\t * @returns {Object} @import AST node\n\t */\n\tfunction parseAtImport(token) {\n\t  return astNode(token);\n\t}\n\n\t/**\n\t * Convert an @charset token to an AST node.\n\t *\n\t * @param {Object} token @charset lexical token\n\t * @returns {Object} @charset node\n\t */\n\tfunction parseCharset(token) {\n\t  return astNode(token);\n\t}\n\n\t/**\n\t * Convert a comment token to an AST Node.\n\t *\n\t * @param {Object} token comment lexical token\n\t * @returns {Object} comment node\n\t */\n\tfunction parseComment(token) {\n\t  return astNode(token, {text: token.text});\n\t}\n\n\tfunction parseNamespace(token) {\n\t  return astNode(token);\n\t}\n\n\t/**\n\t * Convert a property lexical token to a property AST node.\n\t *\n\t * @returns {Object} property node\n\t */\n\tfunction parseProperty(token) {\n\t  return astNode(token);\n\t}\n\n\t/**\n\t * Convert a selector lexical token to a selector AST node.\n\t *\n\t * @param {Object} token selector lexical token\n\t * @returns {Object} selector node\n\t */\n\tfunction parseSelector(token) {\n\t  function trim(str) {\n\t    return str.trim();\n\t  }\n\n\t  return astNode(token, {\n\t    type: 'rule',\n\t    selectors: token.text.split(',').map(trim),\n\t    declarations: parseDeclarations()\n\t  });\n\t}\n\n\t/**\n\t * Convert a lexical token to an AST node.\n\t *\n\t * @returns {Object|undefined} AST node\n\t */\n\tfunction parseToken(token) {\n\t  switch (token.type) {\n\t  // Cases are listed in roughly descending order of probability.\n\t  case 'property': return parseProperty(token);\n\n\t  case 'selector': return parseSelector(token);\n\n\t  case 'at-group-end': _depth = _depth - 1; return;\n\n\t  case 'media'     :\n\t  case 'keyframes' :return parseAtGroup(token);\n\n\t  case 'comment': if (_comments) { return parseComment(token); } break;\n\n\t  case 'charset': return parseCharset(token);\n\t  case 'import': return parseAtImport(token);\n\n\t  case 'namespace': return parseNamespace(token);\n\n\t  case 'font-face':\n\t  case 'supports' :\n\t  case 'viewport' :\n\t  case 'document' :\n\t  case 'page'     : return parseAtGroup(token);\n\t  }\n\t}\n\n\t// -- Parse Helper Functions ---------------------------------------------------\n\n\t/**\n\t * Iteratively parses lexical tokens from the stack into AST nodes until a\n\t * conditional function returns `false`, at which point iteration terminates\n\t * and any AST nodes collected are returned.\n\t *\n\t * @param {Function} conditionFn\n\t *   @param {Object} token the lexical token being parsed\n\t *   @returns {Boolean} `true` if the token should be parsed, `false` otherwise\n\t * @return {Array} AST nodes\n\t */\n\tfunction parseTokensWhile(conditionFn) {\n\t  var node;\n\t  var nodes = [];\n\t  var token;\n\n\t  while ((token = next()) && (conditionFn && conditionFn(token))) {\n\t    node = parseToken(token);\n\t    node && nodes.push(node);\n\t  }\n\n\t  // Place an unused non-`end` lexical token back onto the stack.\n\t  if (token && token.type !== 'end') {\n\t    _tokens.unshift(token);\n\t  }\n\n\t  return nodes;\n\t}\n\n\t/**\n\t * Convert a series of tokens into a sequence of declaration AST nodes.\n\t *\n\t * @returns {Array} declaration nodes\n\t */\n\tfunction parseDeclarations() {\n\t  return parseTokensWhile(function (token) {\n\t    return (token.type === 'property' || token.type === 'comment');\n\t  });\n\t}\n\n\t/**\n\t * Convert a series of tokens into a sequence of rule nodes.\n\t *\n\t * @returns {Array} rule nodes\n\t */\n\tfunction parseRules() {\n\t  return parseTokensWhile(function () { return _depth; });\n\t}\n\t});\n\n\tvar stringify_1 = createCommonjsModule(function (module, exports) {\n\n\tvar debug = debug_1('stringify');\n\n\tvar _comments;      // Whether comments are allowed in the stringified CSS.\n\tvar _compress;      // Whether the stringified CSS should be compressed.\n\tvar _indentation;   // Indentation option value.\n\tvar _level;         // Current indentation level.\n\tvar _n;             // Compression-aware newline character.\n\tvar _s;             // Compression-aware space character.\n\n\texports = module.exports = stringify;\n\n\t/**\n\t * Convert a `stringify`-able AST into a CSS string.\n\t *\n\t * @param {Object} `stringify`-able AST\n\t * @param {Object} [options]\n\t * @param {Boolean} [options.comments=false] allow comments in the CSS\n\t * @param {Boolean} [options.compress=false] compress whitespace\n\t * @param {String} [options.indentation=''] indentation sequence\n\t * @returns {String} CSS\n\t */\n\tfunction stringify(ast, options) {\n\n\t  options || (options = {});\n\t  _indentation = options.indentation || '';\n\t  _compress = !!options.compress;\n\t  _comments = !!options.comments;\n\t  _level = 1;\n\n\t  if (_compress) {\n\t    _n = _s = '';\n\t  } else {\n\t    _n = '\\n';\n\t    _s = ' ';\n\t  }\n\n\t  var css = reduce(ast.stylesheet.rules, stringifyNode).join('\\n').trim();\n\n\t  return css;\n\t}\n\n\t// -- Functions --------------------------------------------------------------\n\n\t/**\n\t * Modify the indentation level, or return a compression-aware sequence of\n\t * spaces equal to the current indentation level.\n\t *\n\t * @param {Number} [level=undefined] indentation level modifier\n\t * @returns {String} sequence of spaces\n\t */\n\tfunction indent(level) {\n\t  if (level) {\n\t    _level += level;\n\t    return;\n\t  }\n\n\t  if (_compress) { return ''; }\n\n\t  return Array(_level).join(_indentation || '');\n\t}\n\n\t// -- Stringify Functions ------------------------------------------------------\n\n\t/**\n\t * Stringify an @-rule AST node.\n\t *\n\t * Use `stringifyAtGroup()` when dealing with @-groups that may contain blocks\n\t * such as @media.\n\t *\n\t * @param {String} type @-rule type. E.g., import, charset\n\t * @returns {String} Stringified @-rule\n\t */\n\tfunction stringifyAtRule(node) {\n\t  return '@' + node.type + ' ' + node.value + ';' + _n;\n\t}\n\n\t/**\n\t * Stringify an @-group AST node.\n\t *\n\t * Use `stringifyAtRule()` when dealing with @-rules that may not contain blocks\n\t * such as @import.\n\t *\n\t * @param {Object} node @-group AST node\n\t * @returns {String}\n\t */\n\tfunction stringifyAtGroup(node) {\n\t  var label = '';\n\t  var prefix = node.prefix || '';\n\n\t  if (node.name) {\n\t    label = ' ' + node.name;\n\t  }\n\n\t  // FIXME: @-rule conditional logic is leaking everywhere.\n\t  var chomp = node.type !== 'page';\n\n\t  return '@' + prefix + node.type + label + _s + stringifyBlock(node, chomp) + _n;\n\t}\n\n\t/**\n\t * Stringify a comment AST node.\n\t *\n\t * @param {Object} node comment AST node\n\t * @returns {String}\n\t */\n\tfunction stringifyComment(node) {\n\t  if (!_comments) { return ''; }\n\n\t  return '/*' + (node.text || '') + '*/' + _n;\n\t}\n\n\t/**\n\t * Stringify a rule AST node.\n\t *\n\t * @param {Object} node rule AST node\n\t * @returns {String}\n\t */\n\tfunction stringifyRule(node) {\n\t  var label;\n\n\t  if (node.selectors) {\n\t    label = node.selectors.join(',' + _n);\n\t  } else {\n\t    label = '@' + node.type;\n\t    label += node.name ? ' ' + node.name : '';\n\t  }\n\n\t  return indent() + label + _s + stringifyBlock(node) + _n;\n\t}\n\n\n\t// -- Stringify Helper Functions -----------------------------------------------\n\n\t/**\n\t * Reduce an array by applying a function to each item and retaining the truthy\n\t * results.\n\t *\n\t * When `item.type` is `'comment'` `stringifyComment` will be applied instead.\n\t *\n\t * @param {Array} items array to reduce\n\t * @param {Function} fn function to call for each item in the array\n\t *   @returns {Mixed} Truthy values will be retained, falsy values omitted\n\t * @returns {Array} retained results\n\t */\n\tfunction reduce(items, fn) {\n\t  return items.reduce(function (results, item) {\n\t    var result = (item.type === 'comment') ? stringifyComment(item) : fn(item);\n\t    result && results.push(result);\n\t    return results;\n\t  }, []);\n\t}\n\n\t/**\n\t * Stringify an AST node with the assumption that it represents a block of\n\t * declarations or other @-group contents.\n\t *\n\t * @param {Object} node AST node\n\t * @returns {String}\n\t */\n\t// FIXME: chomp should not be a magic boolean parameter\n\tfunction stringifyBlock(node, chomp) {\n\t  var children = node.declarations;\n\t  var fn = stringifyDeclaration;\n\n\t  if (node.rules) {\n\t    children = node.rules;\n\t    fn = stringifyRule;\n\t  }\n\n\t  children = stringifyChildren(children, fn);\n\t  children && (children = _n + children + (chomp ? '' : _n));\n\n\t  return '{' + children + indent() + '}';\n\t}\n\n\t/**\n\t * Stringify an array of child AST nodes by calling the given stringify function\n\t * once for each child, and concatenating the results.\n\t *\n\t * @param {Array} children `node.rules` or `node.declarations`\n\t * @param {Function} fn stringify function\n\t * @returns {String}\n\t */\n\tfunction stringifyChildren(children, fn) {\n\t  if (!children) { return ''; }\n\n\t  indent(1);\n\t  var results = reduce(children, fn);\n\t  indent(-1);\n\n\t  if (!results.length) { return ''; }\n\n\t  return results.join(_n);\n\t}\n\n\t/**\n\t * Stringify a declaration AST node.\n\t *\n\t * @param {Object} node declaration AST node\n\t * @returns {String}\n\t */\n\tfunction stringifyDeclaration(node) {\n\t  if (node.type === 'property') {\n\t    return stringifyProperty(node);\n\t  }\n\t}\n\n\t/**\n\t * Stringify an AST node.\n\t *\n\t * @param {Object} node AST node\n\t * @returns {String}\n\t */\n\tfunction stringifyNode(node) {\n\t  switch (node.type) {\n\t  // Cases are listed in roughly descending order of probability.\n\t  case 'rule': return stringifyRule(node);\n\n\t  case 'media'    :\n\t  case 'keyframes': return stringifyAtGroup(node);\n\n\t  case 'comment': return stringifyComment(node);\n\n\t  case 'import'   :\n\t  case 'charset'  :\n\t  case 'namespace': return stringifyAtRule(node);\n\n\t  case 'font-face':\n\t  case 'supports' :\n\t  case 'viewport' :\n\t  case 'document' :\n\t  case 'page'     : return stringifyAtGroup(node);\n\t  }\n\t}\n\n\t/**\n\t * Stringify an AST property node.\n\t *\n\t * @param {Object} node AST property node\n\t * @returns {String}\n\t */\n\tfunction stringifyProperty(node) {\n\t  var name = node.name ? node.name + ':' + _s : '';\n\n\t  return indent() + name + node.value + ';';\n\t}\n\t});\n\n\tvar mensch = {\n\t    lex  : lexer,\n\t    parse: parser,\n\t    stringify: stringify_1\n\t};\n\n\t// Notable changes from Slick.Parser 1.0.x\n\n\t// The parser now uses 2 classes: Expressions and Expression\n\t// `new Expressions` produces an array-like object containing a list of Expression objects\n\t// - Expressions::toString() produces a cleaned up expressions string\n\t// `new Expression` produces an array-like object\n\t// - Expression::toString() produces a cleaned up expression string\n\t// The only exposed method is parse, which produces a (cached) `new Expressions` instance\n\t// parsed.raw is no longer present, use .toString()\n\t// parsed.expression is now useless, just use the indices\n\t// parsed.reverse() has been removed for now, due to its apparent uselessness\n\t// Other changes in the Expressions object:\n\t// - classNames are now unique, and save both escaped and unescaped values\n\t// - attributes now save both escaped and unescaped values\n\t// - pseudos now save both escaped and unescaped values\n\n\tvar escapeRe   = /([-.*+?^${}()|[\\]\\/\\\\])/g,\n\t    unescapeRe = /\\\\/g;\n\n\tvar escape$1 = function(string){\n\t    // XRegExp v2.0.0-beta-3\n\t    // « https://github.com/slevithan/XRegExp/blob/master/src/xregexp.js\n\t    return (string + \"\").replace(escapeRe, '\\\\$1')\n\t};\n\n\tvar unescape$1 = function(string){\n\t    return (string + \"\").replace(unescapeRe, '')\n\t};\n\n\tvar slickRe = RegExp(\n\t/*\n\t#!/usr/bin/env ruby\n\tputs \"\\t\\t\" + DATA.read.gsub(/\\(\\?x\\)|\\s+#.*$|\\s+|\\\\$|\\\\n/,'')\n\t__END__\n\t    \"(?x)^(?:\\\n\t      \\\\s* ( , ) \\\\s*               # Separator          \\n\\\n\t    | \\\\s* ( <combinator>+ ) \\\\s*   # Combinator         \\n\\\n\t    |      ( \\\\s+ )                 # CombinatorChildren \\n\\\n\t    |      ( <unicode>+ | \\\\* )     # Tag                \\n\\\n\t    | \\\\#  ( <unicode>+       )     # ID                 \\n\\\n\t    | \\\\.  ( <unicode>+       )     # ClassName          \\n\\\n\t    |                               # Attribute          \\n\\\n\t    \\\\[  \\\n\t        \\\\s* (<unicode1>+)  (?:  \\\n\t            \\\\s* ([*^$!~|]?=)  (?:  \\\n\t                \\\\s* (?:\\\n\t                    ([\\\"']?)(.*?)\\\\9 \\\n\t                )\\\n\t            )  \\\n\t        )?  \\\\s*  \\\n\t    \\\\](?!\\\\]) \\n\\\n\t    |   :+ ( <unicode>+ )(?:\\\n\t    \\\\( (?:\\\n\t        (?:([\\\"'])([^\\\\12]*)\\\\12)|((?:\\\\([^)]+\\\\)|[^()]*)+)\\\n\t    ) \\\\)\\\n\t    )?\\\n\t    )\"\n\t*/\n\t\"^(?:\\\\s*(,)\\\\s*|\\\\s*(<combinator>+)\\\\s*|(\\\\s+)|(<unicode>+|\\\\*)|\\\\#(<unicode>+)|\\\\.(<unicode>+)|\\\\[\\\\s*(<unicode1>+)(?:\\\\s*([*^$!~|]?=)(?:\\\\s*(?:([\\\"']?)(.*?)\\\\9)))?\\\\s*\\\\](?!\\\\])|(:+)(<unicode>+)(?:\\\\((?:(?:([\\\"'])([^\\\\13]*)\\\\13)|((?:\\\\([^)]+\\\\)|[^()]*)+))\\\\))?)\"\n\t    .replace(/<combinator>/, '[' + escape$1(\">+~`!@$%^&={}\\\\;</\") + ']')\n\t    .replace(/<unicode>/g, '(?:[\\\\w\\\\u00a1-\\\\uFFFF-]|\\\\\\\\[^\\\\s0-9a-f])')\n\t    .replace(/<unicode1>/g, '(?:[:\\\\w\\\\u00a1-\\\\uFFFF-]|\\\\\\\\[^\\\\s0-9a-f])')\n\t);\n\n\t// Part\n\n\tvar Part = function Part(combinator){\n\t    this.combinator = combinator || \" \";\n\t    this.tag = \"*\";\n\t};\n\n\tPart.prototype.toString = function(){\n\n\t    if (!this.raw){\n\n\t        var xpr = \"\", k, part;\n\n\t        xpr += this.tag || \"*\";\n\t        if (this.id) xpr += \"#\" + this.id;\n\t        if (this.classes) xpr += \".\" + this.classList.join(\".\");\n\t        if (this.attributes) for (k = 0; part = this.attributes[k++];){\n\t            xpr += \"[\" + part.name + (part.operator ? part.operator + '\"' + part.value + '\"' : '') + \"]\";\n\t        }\n\t        if (this.pseudos) for (k = 0; part = this.pseudos[k++];){\n\t            xpr += \":\" + part.name;\n\t            if (part.value) xpr += \"(\" + part.value + \")\";\n\t        }\n\n\t        this.raw = xpr;\n\n\t    }\n\n\t    return this.raw\n\t};\n\n\t// Expression\n\n\tvar Expression = function Expression(){\n\t    this.length = 0;\n\t};\n\n\tExpression.prototype.toString = function(){\n\n\t    if (!this.raw){\n\n\t        var xpr = \"\";\n\n\t        for (var j = 0, bit; bit = this[j++];){\n\t            if (j !== 1) xpr += \" \";\n\t            if (bit.combinator !== \" \") xpr += bit.combinator + \" \";\n\t            xpr += bit;\n\t        }\n\n\t        this.raw = xpr;\n\n\t    }\n\n\t    return this.raw\n\t};\n\n\tvar replacer$1 = function(\n\t    rawMatch,\n\n\t    separator,\n\t    combinator,\n\t    combinatorChildren,\n\n\t    tagName,\n\t    id,\n\t    className,\n\n\t    attributeKey,\n\t    attributeOperator,\n\t    attributeQuote,\n\t    attributeValue,\n\n\t    pseudoMarker,\n\t    pseudoClass,\n\t    pseudoQuote,\n\t    pseudoClassQuotedValue,\n\t    pseudoClassValue\n\t){\n\n\t    var expression, current;\n\n\t    if (separator || !this.length){\n\t        expression = this[this.length++] = new Expression;\n\t        if (separator) return ''\n\t    }\n\n\t    if (!expression) expression = this[this.length - 1];\n\n\t    if (combinator || combinatorChildren || !expression.length){\n\t        current = expression[expression.length++] = new Part(combinator);\n\t    }\n\n\t    if (!current) current = expression[expression.length - 1];\n\n\t    if (tagName){\n\n\t        current.tag = unescape$1(tagName);\n\n\t    } else if (id){\n\n\t        current.id = unescape$1(id);\n\n\t    } else if (className){\n\n\t        var unescaped = unescape$1(className);\n\n\t        var classes = current.classes || (current.classes = {});\n\t        if (!classes[unescaped]){\n\t            classes[unescaped] = escape$1(className);\n\t            var classList = current.classList || (current.classList = []);\n\t            classList.push(unescaped);\n\t            classList.sort();\n\t        }\n\n\t    } else if (pseudoClass){\n\n\t        pseudoClassValue = pseudoClassValue || pseudoClassQuotedValue\n\n\t        ;(current.pseudos || (current.pseudos = [])).push({\n\t            type         : pseudoMarker.length == 1 ? 'class' : 'element',\n\t            name         : unescape$1(pseudoClass),\n\t            escapedName  : escape$1(pseudoClass),\n\t            value        : pseudoClassValue ? unescape$1(pseudoClassValue) : null,\n\t            escapedValue : pseudoClassValue ? escape$1(pseudoClassValue) : null\n\t        });\n\n\t    } else if (attributeKey){\n\n\t        attributeValue = attributeValue ? escape$1(attributeValue) : null\n\n\t        ;(current.attributes || (current.attributes = [])).push({\n\t            operator     : attributeOperator,\n\t            name         : unescape$1(attributeKey),\n\t            escapedName  : escape$1(attributeKey),\n\t            value        : attributeValue ? unescape$1(attributeValue) : null,\n\t            escapedValue : attributeValue ? escape$1(attributeValue) : null\n\t        });\n\n\t    }\n\n\t    return ''\n\n\t};\n\n\t// Expressions\n\n\tvar Expressions = function Expressions(expression){\n\t    this.length = 0;\n\n\t    var self = this;\n\n\t    var original = expression, replaced;\n\n\t    while (expression){\n\t        replaced = expression.replace(slickRe, function(){\n\t            return replacer$1.apply(self, arguments)\n\t        });\n\t        if (replaced === expression) throw new Error(original + ' is an invalid expression')\n\t        expression = replaced;\n\t    }\n\t};\n\n\tExpressions.prototype.toString = function(){\n\t    if (!this.raw){\n\t        var expressions = [];\n\t        for (var i = 0, expression; expression = this[i++];) expressions.push(expression);\n\t        this.raw = expressions.join(\", \");\n\t    }\n\n\t    return this.raw\n\t};\n\n\tvar cache = {};\n\n\tvar parse$5 = function(expression){\n\t    if (expression == null) return null\n\t    expression = ('' + expression).replace(/^\\s+|\\s+$/g, '');\n\t    return cache[expression] || (cache[expression] = new Expressions(expression))\n\t};\n\n\tvar parser$1 = parse$5;\n\n\tvar selector = createCommonjsModule(function (module, exports) {\n\n\n\n\tmodule.exports = exports = Selector;\n\n\t/**\n\t * CSS selector constructor.\n\t *\n\t * @param {String} selector text\n\t * @param {Array} optionally, precalculated specificity\n\t * @api public\n\t */\n\n\tfunction Selector(text, styleAttribute) {\n\t  this.text = text;\n\t  this.spec = undefined;\n\t  this.styleAttribute = styleAttribute || false;\n\t}\n\n\t/**\n\t * Get parsed selector.\n\t *\n\t * @api public\n\t */\n\n\tSelector.prototype.parsed = function() {\n\t  if (!this.tokens) { this.tokens = parse(this.text); }\n\t  return this.tokens;\n\t};\n\n\t/**\n\t * Lazy specificity getter\n\t *\n\t * @api public\n\t */\n\n\tSelector.prototype.specificity = function() {\n\t  var styleAttribute = this.styleAttribute;\n\t  if (!this.spec) { this.spec = specificity(this.text, this.parsed()); }\n\t  return this.spec;\n\n\t  function specificity(text, parsed) {\n\t    var expressions = parsed || parse(text);\n\t    var spec = [styleAttribute ? 1 : 0, 0, 0, 0];\n\t    var nots = [];\n\n\t    for (var i = 0; i < expressions.length; i++) {\n\t      var expression = expressions[i];\n\t      var pseudos = expression.pseudos;\n\n\t      // id awards a point in the second column\n\t      if (expression.id) { spec[1]++; }\n\n\t      // classes and attributes award a point each in the third column\n\t      if (expression.attributes) { spec[2] += expression.attributes.length; }\n\t      if (expression.classList) { spec[2] += expression.classList.length; }\n\n\t      // tag awards a point in the fourth column\n\t      if (expression.tag && expression.tag !== '*') { spec[3]++; }\n\n\t      // pseudos award a point each in the fourth column\n\t      if (pseudos) {\n\t        spec[3] += pseudos.length;\n\n\t        for (var p = 0; p < pseudos.length; p++) {\n\t          if (pseudos[p].name === 'not') {\n\t            nots.push(pseudos[p].value);\n\t            spec[3]--;\n\t          }\n\t        }\n\t      }\n\t    }\n\n\t    for (var ii = nots.length; ii--;) {\n\t      var not = specificity(nots[ii]);\n\t      for (var jj = 4; jj--;) { spec[jj] += not[jj]; }\n\t    }\n\n\t    return spec;\n\t  }\n\t};\n\n\t/**\n\t * Parses a selector and returns the tokens.\n\t *\n\t * @param {String} selector\n\t * @api private.\n\t */\n\n\tfunction parse(text) {\n\t  try {\n\t    return parser$1(text)[0];\n\t  } catch (e) {\n\t    return [];\n\t  }\n\t}\n\t});\n\n\tvar property = createCommonjsModule(function (module, exports) {\n\n\tmodule.exports = exports = Property;\n\n\t/**\n\t * Module dependencies.\n\t */\n\n\n\n\t/**\n\t * CSS property constructor.\n\t *\n\t * @param {String} property\n\t * @param {String} value\n\t * @param {Selector} selector the property originates from\n\t * @param {Integer} priority 0 for normal properties, 2 for !important properties.\n\t * @param {Array} additional array of integers representing more detailed priorities (sorting)\n\t * @api public\n\t */\n\n\tfunction Property(prop, value, selector, priority, additionalPriority) {\n\t  this.prop = prop;\n\t  this.value = value;\n\t  this.selector = selector;\n\t  this.priority = priority || 0;\n\t  this.additionalPriority = additionalPriority || [];\n\t}\n\n\t/**\n\t * Compares with another Property based on Selector#specificity.\n\t *\n\t * @api public\n\t */\n\n\tProperty.prototype.compareFunc = function(property) {\n\t  var a = [];\n\t  a.push.apply(a, this.selector.specificity());\n\t  a.push.apply(a, this.additionalPriority);\n\t  a[0] += this.priority;\n\t  var b = [];\n\t  b.push.apply(b, property.selector.specificity());\n\t  b.push.apply(b, property.additionalPriority);\n\t  b[0] += property.priority;\n\t  return utils$1.compareFunc(a, b);\n\t};\n\n\tProperty.prototype.compare = function(property) {\n\t  var winner = this.compareFunc(property);\n\t  if (winner === 1) {\n\t    return this;\n\t  }\n\t  return property;\n\t};\n\n\n\t/**\n\t * Returns CSS property\n\t *\n\t * @api public\n\t */\n\n\tProperty.prototype.toString = function() {\n\t  return this.prop + ': ' + this.value.replace(/['\"]+/g, '') + ';';\n\t};\n\t});\n\n\tvar utils$1 = createCommonjsModule(function (module, exports) {\n\n\t/**\n\t * Module dependencies.\n\t */\n\n\n\n\n\n\texports.Selector = selector;\n\texports.Property = property;\n\n\t/**\n\t * Returns an array of the selectors.\n\t *\n\t * @license Sizzle CSS Selector Engine - MIT\n\t * @param {String} selectorText from mensch\n\t * @api public\n\t */\n\n\texports.extract = function extract(selectorText) {\n\t  var attr = 0;\n\t  var sels = [];\n\t  var sel = '';\n\n\t  for (var i = 0, l = selectorText.length; i < l; i++) {\n\t    var c = selectorText.charAt(i);\n\n\t    if (attr) {\n\t      if (']' === c || ')' === c) { attr--; }\n\t      sel += c;\n\t    } else {\n\t      if (',' === c) {\n\t        sels.push(sel);\n\t        sel = '';\n\t      } else {\n\t        if ('[' === c || '(' === c) { attr++; }\n\t        if (sel.length || (c !== ',' && c !== '\\n' && c !== ' ')) { sel += c; }\n\t      }\n\t    }\n\t  }\n\n\t  if (sel.length) {\n\t    sels.push(sel);\n\t  }\n\n\t  return sels;\n\t};\n\n\t/**\n\t * Returns a parse tree for a CSS source.\n\t * If it encounters multiple selectors separated by a comma, it splits the\n\t * tree.\n\t *\n\t * @param {String} css source\n\t * @api public\n\t */\n\n\texports.parseCSS = function(css) {\n\t  var parsed = mensch.parse(css, {position: true, comments: true});\n\t  var rules = typeof parsed.stylesheet != 'undefined' && parsed.stylesheet.rules ? parsed.stylesheet.rules : [];\n\t  var ret = [];\n\n\t  for (var i = 0, l = rules.length; i < l; i++) {\n\t    if (rules[i].type == 'rule') {\n\t      var rule = rules[i];\n\t      var selectors = rule.selectors;\n\n\t      for (var ii = 0, ll = selectors.length; ii < ll; ii++) {\n\t        ret.push([selectors[ii], rule.declarations]);\n\t      }\n\t    }\n\t  }\n\n\t  return ret;\n\t};\n\n\t/**\n\t * Returns preserved text for a CSS source.\n\t *\n\t * @param {String} css source\n\t * @param {Object} options\n\t * @api public\n\t */\n\n\texports.getPreservedText = function(css, options, ignoredPseudos) {\n\t  var parsed = mensch.parse(css, {position: true, comments: true});\n\t  var rules = typeof parsed.stylesheet != 'undefined' && parsed.stylesheet.rules ? parsed.stylesheet.rules : [];\n\t  var preserved = [];\n\t  var lastStart = null;\n\n\t  for (var i = rules.length - 1; i >= 0; i--) {\n\t    if ((options.fontFaces && rules[i].type === 'font-face') ||\n\t        (options.mediaQueries && rules[i].type === 'media') ||\n\t        (options.keyFrames && rules[i].type === 'keyframes') ||\n\t        (options.pseudos && rules[i].selectors && this.matchesPseudo(rules[i].selectors[0], ignoredPseudos))) {\n\t      preserved.unshift(\n\t        mensch.stringify(\n\t          { stylesheet: { rules: [ rules[i] ] }},\n\t          { comments: false, indentation: '  ' }\n\t        )\n\t      );\n\t    }\n\t    lastStart = rules[i].position.start;\n\t  }\n\n\t  if (preserved.length === 0) {\n\t    return false;\n\t  }\n\t  return '\\n' + preserved.join('\\n') + '\\n';\n\t};\n\n\texports.normalizeLineEndings = function(text) {\n\t  return text.replace(/\\r\\n/g, '\\n').replace(/\\n/g, '\\r\\n');\n\t};\n\n\texports.matchesPseudo = function(needle, haystack) {\n\t  return haystack.find(function (element) {\n\t    return needle.indexOf(element) > -1;\n\t  })\n\t};\n\n\t/**\n\t * Compares two specificity vectors, returning the winning one.\n\t *\n\t * @param {Array} vector a\n\t * @param {Array} vector b\n\t * @return {Array}\n\t * @api public\n\t */\n\n\texports.compareFunc = function(a, b) {\n\t  var min = Math.min(a.length, b.length);\n\t  for (var i = 0; i < min; i++) {\n\t    if (a[i] === b[i]) { continue; }\n\t    if (a[i] > b[i]) { return 1; }\n\t    return -1;\n\t  }\n\n\t  return a.length - b.length;\n\t};\n\n\texports.compare = function(a, b) {\n\t  return exports.compareFunc(a, b) == 1 ? a : b;\n\t};\n\n\texports.getDefaultOptions = function(options) {\n\t  var result = Object.assign({\n\t    extraCss: '',\n\t    insertPreservedExtraCss: true,\n\t    applyStyleTags: true,\n\t    removeStyleTags: true,\n\t    preserveMediaQueries: true,\n\t    preserveFontFaces: true,\n\t    preserveKeyFrames: true,\n\t    preservePseudos: true,\n\t    applyWidthAttributes: true,\n\t    applyHeightAttributes: true,\n\t    applyAttributesTableElements: true,\n\t    url: ''\n\t  }, options);\n\n\t  result.webResources = result.webResources || {};\n\n\t  return result;\n\t};\n\t});\n\tvar utils_1 = utils$1.Selector;\n\tvar utils_2 = utils$1.Property;\n\tvar utils_3 = utils$1.extract;\n\tvar utils_4 = utils$1.parseCSS;\n\tvar utils_5 = utils$1.getPreservedText;\n\tvar utils_6 = utils$1.normalizeLineEndings;\n\tvar utils_7 = utils$1.matchesPseudo;\n\tvar utils_8 = utils$1.compareFunc;\n\tvar utils_9 = utils$1.compare;\n\tvar utils_10 = utils$1.getDefaultOptions;\n\n\tvar cheerio_1 = createCommonjsModule(function (module) {\n\n\t/**\n\t * Module dependencies.\n\t */\n\n\n\n\tvar cheerioLoad = function(html, options, encodeEntities) {\n\t  options = Object.assign({decodeEntities: false, _useHtmlParser2:true}, options);\n\t  html = encodeEntities(html);\n\t  return cheerio.load(html, options);\n\t};\n\n\tvar createEntityConverters = function () {\n\t  var codeBlockLookup = [];\n\n\t  var encodeCodeBlocks = function(html) {\n\t    var blocks = module.exports.codeBlocks;\n\t    Object.keys(blocks).forEach(function(key) {\n\t      var re = new RegExp(blocks[key].start + '([\\\\S\\\\s]*?)' + blocks[key].end, 'g');\n\t      html = html.replace(re, function(match, subMatch) {\n\t        codeBlockLookup.push(match);\n\t        return 'JUICE_CODE_BLOCK_' + (codeBlockLookup.length - 1) + '_';\n\t      });\n\t    });\n\t    return html;\n\t  };\n\n\t  var decodeCodeBlocks = function(html) {\n\t    for(var index = 0; index < codeBlockLookup.length; index++) {\n\t      var re = new RegExp('JUICE_CODE_BLOCK_' + index + '_(=\"\")?', 'gi');\n\t      html = html.replace(re, function() {\n\t        return codeBlockLookup[index];\n\t      });\n\t    }\n\t    return html;\n\t  };\n\n\t  return {\n\t    encodeEntities: encodeCodeBlocks,\n\t    decodeEntities: decodeCodeBlocks,\n\t  };\n\t};\n\n\t/**\n\t * Parses the input, calls the callback on the parsed DOM, and generates the output\n\t *\n\t * @param {String} html input html to be processed\n\t * @param {Object} options for the parser\n\t * @param {Function} callback to be invoked on the DOM\n\t * @param {Array} callbackExtraArguments to be passed to the callback\n\t * @return {String} resulting html\n\t */\n\tmodule.exports = function(html, options, callback, callbackExtraArguments) {\n\t  var entityConverters = createEntityConverters();\n\n\t  var $ = cheerioLoad(html, options, entityConverters.encodeEntities);\n\t  var args = [ $ ];\n\t  args.push.apply(args, callbackExtraArguments);\n\t  var doc = callback.apply(undefined, args) || $;\n\n\t  if (options && options.xmlMode) {\n\t    return entityConverters.decodeEntities(doc.xml());\n\t  }\n\t  return entityConverters.decodeEntities(doc.html());\n\t};\n\n\tmodule.exports.codeBlocks = {\n\t  EJS: { start: '<%', end: '%>' },\n\t  HBS: { start: '{{', end: '}}' }\n\t};\n\t});\n\tvar cheerio_2 = cheerio_1.codeBlocks;\n\n\t/**\n\t * Converts a decimal number to roman numeral.\n\t * https://stackoverflow.com/questions/9083037/convert-a-number-into-a-roman-numeral-in-javascript\n\t *\n\t * @param {Number} number\n\t * @api private.\n\t */\n\tvar romanize = function(num) {\n\t    if (isNaN(num))\n\t        return NaN;\n\t    var digits = String(+num).split(\"\"),\n\t        key = [\"\",\"C\",\"CC\",\"CCC\",\"CD\",\"D\",\"DC\",\"DCC\",\"DCCC\",\"CM\",\n\t               \"\",\"X\",\"XX\",\"XXX\",\"XL\",\"L\",\"LX\",\"LXX\",\"LXXX\",\"XC\",\n\t               \"\",\"I\",\"II\",\"III\",\"IV\",\"V\",\"VI\",\"VII\",\"VIII\",\"IX\"],\n\t        roman = \"\",\n\t        i = 3;\n\t    while (i--)\n\t        roman = (key[+digits.pop() + (i * 10)] || \"\") + roman;\n\t    return Array(+digits.join(\"\") + 1).join(\"M\") + roman;\n\t};\n\n\t/**\n\t * Converts a decimal number to alphanumeric numeral.\n\t * https://stackoverflow.com/questions/45787459/convert-number-to-alphabet-string-javascript\n\t *\n\t * @param {Number} number\n\t * @api private.\n\t */\n\tvar alphanumeric = function(num) {\n\t    var s = '', t;\n\n\t    while (num > 0) {\n\t      t = (num - 1) % 26;\n\t      s = String.fromCharCode(65 + t) + s;\n\t      num = (num - t)/26 | 0;\n\t    }\n\t    return s || undefined;\n\t};\n\n\tvar numbers = {\n\t\tromanize: romanize,\n\t\talphanumeric: alphanumeric\n\t};\n\n\tvar inline = function makeJuiceClient(juiceClient) {\n\n\tjuiceClient.ignoredPseudos = ['hover', 'active', 'focus', 'visited', 'link'];\n\tjuiceClient.widthElements = ['TABLE', 'TD', 'TH', 'IMG'];\n\tjuiceClient.heightElements = ['TABLE', 'TD', 'TH', 'IMG'];\n\tjuiceClient.tableElements = ['TABLE', 'TH', 'TR', 'TD', 'CAPTION', 'COLGROUP', 'COL', 'THEAD', 'TBODY', 'TFOOT'];\n\tjuiceClient.nonVisualElements = [ 'HEAD', 'TITLE', 'BASE', 'LINK', 'STYLE', 'META', 'SCRIPT', 'NOSCRIPT' ];\n\tjuiceClient.styleToAttribute = {\n\t  'background-color': 'bgcolor',\n\t  'background-image': 'background',\n\t  'text-align': 'align',\n\t  'vertical-align': 'valign'\n\t};\n\tjuiceClient.excludedProperties = [];\n\n\tjuiceClient.juiceDocument = juiceDocument;\n\tjuiceClient.inlineDocument = inlineDocument;\n\n\tfunction inlineDocument($, css, options) {\n\n\t  options = options || {};\n\t  var rules = utils$1.parseCSS(css);\n\t  var editedElements = [];\n\t  var styleAttributeName = 'style';\n\t  var counters = {};\n\n\t  if (options.styleAttributeName) {\n\t    styleAttributeName = options.styleAttributeName;\n\t  }\n\n\t  rules.forEach(handleRule);\n\t  editedElements.forEach(setStyleAttrs);\n\n\t  if (options.inlinePseudoElements) {\n\t    editedElements.forEach(inlinePseudoElements);\n\t  }\n\n\t  if (options.applyWidthAttributes) {\n\t    editedElements.forEach(function(el) {\n\t      setDimensionAttrs(el, 'width');\n\t    });\n\t  }\n\n\t  if (options.applyHeightAttributes) {\n\t    editedElements.forEach(function(el) {\n\t      setDimensionAttrs(el, 'height');\n\t    });\n\t  }\n\n\t  if (options.applyAttributesTableElements) {\n\t    editedElements.forEach(setAttributesOnTableElements);\n\t  }\n\n\t  if (options.insertPreservedExtraCss && options.extraCss) {\n\t    var preservedText = utils$1.getPreservedText(options.extraCss, {\n\t      mediaQueries: options.preserveMediaQueries,\n\t      fontFaces: options.preserveFontFaces,\n\t      keyFrames: options.preserveKeyFrames\n\t    });\n\t    if (preservedText) {\n\t      var $appendTo = null;\n\t      if (options.insertPreservedExtraCss !== true) {\n\t        $appendTo = $(options.insertPreservedExtraCss);\n\t      } else {\n\t        $appendTo = $('head');\n\t        if (!$appendTo.length) { $appendTo = $('body'); }\n\t        if (!$appendTo.length) { $appendTo = $.root(); }\n\t      }\n\n\t      $appendTo.first().append('<style>' + preservedText + '</style>');\n\t    }\n\t  }\n\n\t  function handleRule(rule) {\n\t    var sel = rule[0];\n\t    var style = rule[1];\n\t    var selector = new utils$1.Selector(sel);\n\t    var parsedSelector = selector.parsed();\n\n\t    if (!parsedSelector) {\n\t      return;\n\t    }\n\n\t    var pseudoElementType = getPseudoElementType(parsedSelector);\n\n\t    // skip rule if the selector has any pseudos which are ignored\n\t    for (var i = 0; i < parsedSelector.length; ++i) {\n\t      var subSel = parsedSelector[i];\n\t      if (subSel.pseudos) {\n\t        for (var j = 0; j < subSel.pseudos.length; ++j) {\n\t          var subSelPseudo = subSel.pseudos[j];\n\t          if (juiceClient.ignoredPseudos.indexOf(subSelPseudo.name) >= 0) {\n\t            return;\n\t          }\n\t        }\n\t      }\n\t    }\n\n\t    if (pseudoElementType) {\n\t      var last = parsedSelector[parsedSelector.length - 1];\n\t      var pseudos = last.pseudos;\n\t      last.pseudos = filterElementPseudos(last.pseudos);\n\t      sel = parsedSelector.toString();\n\t      last.pseudos = pseudos;\n\t    }\n\n\t    var els;\n\t    try {\n\t      els = $(sel);\n\t    } catch (err) {\n\t      // skip invalid selector\n\t      return;\n\t    }\n\n\t    els.each(function() {\n\t      var el = this;\n\n\t      if (el.name && juiceClient.nonVisualElements.indexOf(el.name.toUpperCase()) >= 0) {\n\t        return;\n\t      }\n\n\t      if (pseudoElementType) {\n\t        var pseudoElPropName = 'pseudo' + pseudoElementType;\n\t        var pseudoEl = el[pseudoElPropName];\n\t        if (!pseudoEl) {\n\t          pseudoEl = el[pseudoElPropName] = $('<span />').get(0);\n\t          pseudoEl.pseudoElementType = pseudoElementType;\n\t          pseudoEl.pseudoElementParent = el;\n\t          pseudoEl.counterProps = el.counterProps;\n\t          el[pseudoElPropName] = pseudoEl;\n\t        }\n\t        el = pseudoEl;\n\t      }\n\n\t      if (!el.styleProps) {\n\t        el.styleProps = {};\n\n\t        // if the element has inline styles, fake selector with topmost specificity\n\t        if ($(el).attr(styleAttributeName)) {\n\t          var cssText = '* { ' + $(el).attr(styleAttributeName) + ' } ';\n\t          addProps(utils$1.parseCSS(cssText)[0][1], new utils$1.Selector('<style>', true));\n\t        }\n\n\t        // store reference to an element we need to compile style=\"\" attr for\n\t        editedElements.push(el);\n\t      }\n\n\t      if (!el.counterProps) {\n\t        el.counterProps = el.parent && el.parent.counterProps\n\t          ? Object.create(el.parent.counterProps)\n\t          : {};\n\t      }\n\n\t      function resetCounter(el, value) {\n\t        var tokens = value.split(/\\s+/);\n\n\t        for (var j = 0; j < tokens.length; j++) {\n\t          var counter = tokens[j];\n\t          var resetval = parseInt(tokens[j+1], 10);\n\n\t          isNaN(resetval)\n\t            ? el.counterProps[counter] = counters[counter] = 0\n\t            : el.counterProps[counter] = counters[tokens[j++]] = resetval;\n\t        }\n\t      }\n\n\t      function incrementCounter(el, value) {\n\t        var tokens = value.split(/\\s+/);\n\n\t        for (var j = 0; j < tokens.length; j++) {\n\t          var counter = tokens[j];\n\n\t          if (el.counterProps[counter] === undefined) {\n\t            continue;\n\t          }\n\n\t          var incrval = parseInt(tokens[j+1], 10);\n\n\t          isNaN(incrval)\n\t            ? el.counterProps[counter] = counters[counter] += 1\n\t            : el.counterProps[counter] = counters[tokens[j++]] += incrval;\n\t        }\n\t      }\n\n\t      // go through the properties\n\t      function addProps(style, selector) {\n\t        for (var i = 0, l = style.length; i < l; i++) {\n\t          if (style[i].type == 'property') {\n\t            var name = style[i].name;\n\t            var value = style[i].value;\n\n\t            if (name === 'counter-reset') {\n\t              resetCounter(el, value);\n\t            }\n\n\t            if (name === 'counter-increment') {\n\t              incrementCounter(el, value);\n\t            }\n\n\t            var important = value.match(/!important$/) !== null;\n\t            if (important && !options.preserveImportant) value = removeImportant(value);\n\t            // adds line number and column number for the properties as \"additionalPriority\" to the\n\t            // properties because in CSS the position directly affect the priority.\n\t            var additionalPriority = [style[i].position.start.line, style[i].position.start.col];\n\t            var prop = new utils$1.Property(name, value, selector, important ? 2 : 0, additionalPriority);\n\t            var existing = el.styleProps[name];\n\n\t            // if property name is not in the excluded properties array\n\t            if (juiceClient.excludedProperties.indexOf(name) < 0) {\n\t              if (existing && existing.compare(prop) === prop || !existing) {\n\t                // deleting a property let us change the order (move it to the end in the setStyleAttrs loop)\n\t                if (existing && existing.selector !== selector) {\n\t                  delete el.styleProps[name];\n\t                } else if (existing) {\n\t                  // make \"prop\" a special composed property.\n\t                  prop.nextProp = existing;\n\t                }\n\n\t                el.styleProps[name] = prop;\n\t              }\n\t            }\n\t          }\n\t        }\n\t      }\n\n\t      addProps(style, selector);\n\t    });\n\t  }\n\n\t  function setStyleAttrs(el) {\n\t    var l = Object.keys(el.styleProps).length;\n\t    var props = [];\n\t    // Here we loop each property and make sure to \"expand\"\n\t    // linked \"nextProp\" properties happening when the same property\n\t    // is declared multiple times in the same selector.\n\t    Object.keys(el.styleProps).forEach(function(key) {\n\t      var np = el.styleProps[key];\n\t      while (typeof np !== 'undefined') {\n\t        props.push(np);\n\t        np = np.nextProp;\n\t      }\n\t    });\n\t    // sort properties by their originating selector's specificity so that\n\t    // props like \"padding\" and \"padding-bottom\" are resolved as expected.\n\t    props.sort(function(a, b) {\n\t      return a.compareFunc(b);\n\t    });\n\t    var string = props\n\t      .filter(function(prop) {\n\t        // Content becomes the innerHTML of pseudo elements, not used as a\n\t        // style property\n\t        return prop.prop !== 'content';\n\t      })\n\t      .map(function(prop) {\n\t        return prop.prop + ': ' + prop.value.replace(/[\"]/g, '\\'') + ';';\n\t      })\n\t      .join(' ');\n\t    if (string) {\n\t      $(el).attr(styleAttributeName, string);\n\t    }\n\t  }\n\n\t  function inlinePseudoElements(el) {\n\t    if (el.pseudoElementType && el.styleProps.content) {\n\t      var parsed = parseContent(el);\n\t      if (parsed.img) {\n\t        el.name = 'img';\n\t        $(el).attr('src', parsed.img);\n\t      } else {\n\t        $(el).text(parsed);\n\t      }\n\t      var parent = el.pseudoElementParent;\n\t      if (el.pseudoElementType === 'before') {\n\t        $(parent).prepend(el);\n\t      } else {\n\t        $(parent).append(el);\n\t      }\n\t    }\n\t  }\n\n\t  function setDimensionAttrs(el, dimension) {\n\t    if (!el.name) { return; }\n\t    var elName = el.name.toUpperCase();\n\t    if (juiceClient[dimension + 'Elements'].indexOf(elName) > -1) {\n\t      for (var i in el.styleProps) {\n\t        if (el.styleProps[i].prop === dimension) {\n\t          var value = el.styleProps[i].value;\n\t          if (options.preserveImportant) {\n\t            value = removeImportant(value);\n\t          }\n\t          if (value.match(/px/)) {\n\t            var pxSize = value.replace('px', '');\n\t            $(el).attr(dimension, pxSize);\n\t            return;\n\t          }\n\t          if (juiceClient.tableElements.indexOf(elName) > -1 && value.match(/\\%/)) {\n\t            $(el).attr(dimension, value);\n\t            return;\n\t          }\n\t        }\n\t      }\n\t    }\n\t  }\n\n\t  function extractBackgroundUrl(value) {\n\t    return value.indexOf('url(') !== 0\n\t      ? value\n\t      : value.replace(/^url\\(([\"'])?([^\"']+)\\1\\)$/, '$2');\n\t  }\n\n\t  function setAttributesOnTableElements(el) {\n\t    if (!el.name) { return; }\n\t    var elName = el.name.toUpperCase();\n\t    var styleProps = Object.keys(juiceClient.styleToAttribute);\n\n\t    if (juiceClient.tableElements.indexOf(elName) > -1) {\n\t      for (var i in el.styleProps) {\n\t        if (styleProps.indexOf(el.styleProps[i].prop) > -1) {\n\t          var prop = juiceClient.styleToAttribute[el.styleProps[i].prop];\n\t          var value = el.styleProps[i].value;\n\t          if (options.preserveImportant) {\n\t            value = removeImportant(value);\n\t          }\n\t          if (prop === 'background') {\n\t            value = extractBackgroundUrl(value);\n\t          }\n\t          if (/(linear|radial)-gradient\\(/i.test(value)) {\n\t            continue;\n\t          }\n\t          $(el).attr(prop, value);\n\t        }\n\t      }\n\t    }\n\t  }\n\t}\n\n\tfunction removeImportant(value) {\n\t  return value.replace(/\\s*!important$/, '')\n\t}\n\n\tfunction findVariableValue(el, variable) {\n\t  while (el) {\n\t    if (variable in el.styleProps) {\n\t      return el.styleProps[variable].value;\n\t    }\n\n\t    var el = el.parent || el.pseudoElementParent;\n\t  }\n\t}\n\n\tfunction applyCounterStyle(counter, style) {\n\t  switch (style) {\n\t    case 'lower-roman':\n\t      return numbers.romanize(counter).toLowerCase();\n\t    case 'upper-roman':\n\t      return numbers.romanize(counter);\n\t    case 'lower-latin':\n\t    case 'lower-alpha':\n\t      return numbers.alphanumeric(counter).toLowerCase();\n\t    case 'upper-latin':\n\t    case 'upper-alpha':\n\t      return numbers.alphanumeric(counter);\n\t    // TODO support more counter styles\n\t    default:\n\t      return counter.toString();\n\t  }\n\t}\n\n\tfunction parseContent(el) {\n\t  var content = el.styleProps.content.value;\n\n\t  if (content === 'none' || content === 'normal') {\n\t    return '';\n\t  }\n\n\t  var imageUrlMatch = content.match(/^\\s*url\\s*\\(\\s*(.*?)\\s*\\)\\s*$/i);\n\t  if (imageUrlMatch) {\n\t    var url = imageUrlMatch[1].replace(/^['\"]|['\"]$/g, '');\n\t    return { img: url };\n\t  }\n\n\t  var parsed = [];\n\n\t  var tokens = content.split(/['\"]/);\n\t  for (var i = 0; i < tokens.length; i++) {\n\t    if (tokens[i] === '') continue;\n\n\t    var varMatch = tokens[i].match(/var\\s*\\(\\s*(.*?)\\s*(,\\s*(.*?)\\s*)?\\s*\\)/i);\n\t    if (varMatch) {\n\t      var variable = findVariableValue(el, varMatch[1]) || varMatch[2];\n\t      parsed.push(variable.replace(/^['\"]|['\"]$/g, ''));\n\t      continue;\n\t    }\n\n\t    var counterMatch = tokens[i].match(/counter\\s*\\(\\s*(.*?)\\s*(,\\s*(.*?)\\s*)?\\s*\\)/i);\n\t    if (counterMatch && counterMatch[1] in el.counterProps) {\n\t      var counter = el.counterProps[counterMatch[1]];\n\t      parsed.push(applyCounterStyle(counter, counterMatch[3]));\n\t      continue;\n\t    }\n\n\t    var attrMatch = tokens[i].match(/attr\\s*\\(\\s*(.*?)\\s*\\)/i);\n\t    if (attrMatch) {\n\t      var attr = attrMatch[1];\n\t      parsed.push(el.pseudoElementParent\n\t        ? el.pseudoElementParent.attribs[attr]\n\t        : el.attribs[attr]\n\t      );\n\t      continue;\n\t    }\n\n\t    parsed.push(tokens[i]);\n\t  }\n\n\t  content = parsed.join('');\n\t  // Naive unescape, assume no unicode char codes\n\t  content = content.replace(/\\\\/g, '');\n\t  return content;\n\t}\n\n\t// Return \"before\" or \"after\" if the given selector is a pseudo element (e.g.,\n\t// a::after).\n\tfunction getPseudoElementType(selector) {\n\t  if (selector.length === 0) {\n\t    return;\n\t  }\n\n\t  var pseudos = selector[selector.length - 1].pseudos;\n\t  if (!pseudos) {\n\t    return;\n\t  }\n\n\t  for (var i = 0; i < pseudos.length; i++) {\n\t    if (isPseudoElementName(pseudos[i])) {\n\t      return pseudos[i].name;\n\t    }\n\t  }\n\t}\n\n\tfunction isPseudoElementName(pseudo) {\n\t  return pseudo.name === 'before' || pseudo.name === 'after';\n\t}\n\n\tfunction filterElementPseudos(pseudos) {\n\t  return pseudos.filter(function(pseudo) {\n\t    return !isPseudoElementName(pseudo);\n\t  });\n\t}\n\n\tfunction juiceDocument($, options) {\n\t  options = utils$1.getDefaultOptions(options);\n\t  var css = extractCssFromDocument($, options);\n\t  css += '\\n' + options.extraCss;\n\t  inlineDocument($, css, options);\n\t  return $;\n\t}\n\n\tfunction getStylesData($, options) {\n\t  var results = [];\n\t  var stylesList = $('style');\n\t  var styleDataList, styleData, styleElement;\n\t  stylesList.each(function() {\n\t    styleElement = this;\n\t    // the API for Cheerio using parse5 (default) and htmlparser2 are slightly different\n\t    // detect this by checking if .childNodes exist (as opposed to .children)\n\t    var usingParse5 = !!styleElement.childNodes;\n\t    styleDataList = usingParse5 ? styleElement.childNodes : styleElement.children;\n\t    if (styleDataList.length !== 1) {\n\t      if (options.removeStyleTags) {\n\t        $(styleElement).remove();\n\t      }\n\t      return;\n\t    }\n\t    styleData = styleDataList[0].data;\n\t    if (options.applyStyleTags && $(styleElement).attr('data-embed') === undefined) {\n\t      results.push(styleData);\n\t    }\n\t    if (options.removeStyleTags && $(styleElement).attr('data-embed') === undefined) {\n\t      var text = usingParse5 ? styleElement.childNodes[0].nodeValue : styleElement.children[0].data;\n\t      var preservedText = utils$1.getPreservedText(text, {\n\t        mediaQueries: options.preserveMediaQueries,\n\t        fontFaces: options.preserveFontFaces,\n\t        keyFrames: options.preserveKeyFrames,\n\t        pseudos: options.preservePseudos\n\t      }, juiceClient.ignoredPseudos);\n\t      if (preservedText) {\n\t        if (usingParse5) {\n\t          styleElement.childNodes[0].nodeValue = preservedText;\n\t        } else {\n\t          styleElement.children[0].data = preservedText;\n\t        }\n\t      } else {\n\t        $(styleElement).remove();\n\t      }\n\t    }\n\t    $(styleElement).removeAttr('data-embed');\n\t  });\n\t  return results;\n\t}\n\n\tfunction extractCssFromDocument($, options) {\n\t  var results = getStylesData($, options);\n\t  var css = results.join('\\n');\n\t  return css;\n\t}\n\n\treturn juiceClient;\n\n\t};\n\n\t/**\n\t * Note that makeJuiceClient will take a base object (in this case a function) and enhance it\n\t * with a lot of useful properties and functions.\n\t *\n\t * This client adopts cheerio as a DOM parser and adds an \"inlineContent\" function that let\n\t * users to specify the CSS to be inlined instead of extracting it from the html.\n\t * \n\t * The weird \"makeJuiceClient\" behaviour is there in order to keep backward API compatibility.\n\t */\n\tvar juiceClient = inline(function(html,options) {\n\t  return cheerio_1(html, { xmlMode: options && options.xmlMode}, juiceDocument, [options]);\n\t});\n\n\tvar juiceDocument = function(html, options) {\n\t  return juiceClient.juiceDocument(html, options);\n\t};\n\n\tjuiceClient.inlineContent = function(html, css, options) {\n\t  return cheerio_1(html, { xmlMode: options && options.xmlMode}, juiceClient.inlineDocument, [css, options]);\n\t};\n\n\tvar client = juiceClient;\n\n\tfunction _createSuper$1j(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$1j(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = construct$4(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\n\tfunction _isNativeReflectConstruct$1j() { if (typeof Reflect === \"undefined\" || !construct$4) return false; if (construct$4.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(construct$4(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\t/**\n\t * 复制按钮，用来复制预览区的html内容\n\t * 该操作会将预览区的css样式以行内样式的形式插入到html内容里，从而保证粘贴时样式一致\n\t */\n\n\tvar Copy = /*#__PURE__*/function (_MenuBase) {\n\t  _inherits(Copy, _MenuBase);\n\n\t  var _super = _createSuper$1j(Copy);\n\n\t  function Copy($cherry) {\n\t    var _this;\n\n\t    _classCallCheck(this, Copy);\n\n\t    _this = _super.call(this, $cherry);\n\t    _this.previewer = $cherry.previewer;\n\t    _this.isLoading = false;\n\t    _this.updateMarkdown = false;\n\n\t    _this.setName('copy', 'copy');\n\n\t    return _this;\n\t  }\n\n\t  _createClass(Copy, [{\n\t    key: \"adaptWechat\",\n\t    value: function () {\n\t      var _adaptWechat = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee(rawHtml) {\n\t        var figureRegex, html, imgRegex, promises, urls;\n\t        return regenerator.wrap(function _callee$(_context3) {\n\t          while (1) {\n\t            switch (_context3.prev = _context3.next) {\n\t              case 0:\n\t                // 转化链接\n\t                // Array.from(document.querySelectorAll('a')).forEach((item) => {\n\t                //   item.removeAttribute('href');\n\t                // });\n\t                // 防止echarts标签被转成p时丢失样式\n\t                figureRegex = /(<figure data-lines=.+?<)div(.+?<\\/)div(>.*?<\\/figure>)/g;\n\t                html = rawHtml.replace(figureRegex, function (match, prefix, content, suffix) {\n\t                  var _context, _context2;\n\n\t                  return concat$5(_context = concat$5(_context2 = \"\".concat(prefix, \"p\")).call(_context2, content, \"p\")).call(_context, suffix);\n\t                }); // 图片转base64，防止无法自动上传\n\n\t                imgRegex = /(<img.+?src=\")(.+?)(\".*?>)/g;\n\t                /** @type {(Promise<string>)[]} */\n\n\t                promises = [];\n\t                html.replace(imgRegex, function (match, prefix, src) {\n\t                  promises.push(convertImgToBase64(src));\n\t                });\n\t                _context3.next = 7;\n\t                return promise$7.all(promises);\n\n\t              case 7:\n\t                urls = _context3.sent;\n\t                return _context3.abrupt(\"return\", html.replace(imgRegex, function (match, prefix, src, suffix) {\n\t                  return prefix + urls.shift() + suffix;\n\t                }));\n\n\t              case 9:\n\t              case \"end\":\n\t                return _context3.stop();\n\t            }\n\t          }\n\t        }, _callee);\n\t      }));\n\n\t      function adaptWechat(_x) {\n\t        return _adaptWechat.apply(this, arguments);\n\t      }\n\n\t      return adaptWechat;\n\t    }()\n\t  }, {\n\t    key: \"getStyleFromSheets\",\n\t    value: function getStyleFromSheets(keyword) {\n\t      var _context4;\n\n\t      var sheets = filter$3(_context4 = from_1$2(document.styleSheets)).call(_context4, function (item) {\n\t        var _context5;\n\n\t        return indexOf$8(_context5 = item.cssRules[0].cssText).call(_context5, keyword) > -1;\n\t      });\n\n\t      return \"<style>\".concat(reduce$3(sheets).call(sheets, function (html, sheet) {\n\t        var _context6;\n\n\t        return html + reduce$3(_context6 = from_1$2(sheet.cssRules)).call(_context6, function (html, rule) {\n\t          return html + rule.cssText;\n\t        }, '');\n\t      }, ''), \"</style>\");\n\t    }\n\t  }, {\n\t    key: \"computeStyle\",\n\t    value: function computeStyle() {\n\t      // 计算需要append进富文本的style\n\t      var mathStyle = this.getStyleFromSheets('mjx-container');\n\t      var cherryStyle = this.getStyleFromSheets('cherry');\n\t      var echartStyle = '<style>figure>p{overflow:hidden;position:relative;width:500px;height:300px;background:transparent;}</style>';\n\t      return {\n\t        mathStyle: mathStyle,\n\t        echartStyle: echartStyle,\n\t        cherryStyle: cherryStyle\n\t      };\n\t    }\n\t    /**\n\t     * 由于复制操作会随着预览区域的内容增加而耗时变长，所以需要增加“正在复制”的状态回显\n\t     * 同时该状态也用于限频\n\t     */\n\n\t  }, {\n\t    key: \"toggleLoading\",\n\t    value: function toggleLoading() {\n\t      // 切换loading状态\n\t      if (this.isLoading) {\n\t        var loadingButton = document.querySelector('.icon-loading');\n\t        loadingButton.outerHTML = \"<i class=\\\"ch-icon ch-icon-copy\\\" title=\\\"\".concat(this.locale.copy, \"\\\"></i>\");\n\t      } else {\n\t        var copyButton = document.querySelector('.ch-icon-copy');\n\t        copyButton.outerHTML = '<div class=\"icon-loading loading\"></div>';\n\t      }\n\n\t      this.isLoading = !this.isLoading;\n\t    }\n\t    /**\n\t     * 响应点击事件\n\t     * 该按钮不会引发编辑区域的内容改动，所以不用处理用户在编辑区域的选中内容\n\t     * @param {Event} e 点击事件\n\t     */\n\n\t  }, {\n\t    key: \"onClick\",\n\t    value: function onClick(e) {\n\t      var _this2 = this;\n\n\t      this.toggleLoading();\n\t      var inlineCodeTheme = document.querySelector('.cherry').getAttribute('data-inline-code-theme');\n\t      var codeBlockTheme = document.querySelector('.cherry').getAttribute('data-code-block-theme');\n\n\t      var _this$computeStyle = this.computeStyle(),\n\t          mathStyle = _this$computeStyle.mathStyle,\n\t          echartStyle = _this$computeStyle.echartStyle,\n\t          cherryStyle = _this$computeStyle.cherryStyle;\n\n\t      var html = this.previewer.isPreviewerHidden() ? this.previewer.options.previewerCache.html : this.previewer.getValue(); // 将css样式以行内样式的形式插入到html内容里\n\n\t      this.adaptWechat(html).then(function (html) {\n\t        var _context7, _context8, _context9;\n\n\t        copyToClip(client(concat$5(_context7 = concat$5(_context8 = concat$5(_context9 = \"<div data-inline-code-theme=\\\"\".concat(inlineCodeTheme, \"\\\" data-code-block-theme=\\\"\")).call(_context9, codeBlockTheme, \"\\\">\\n            <div class=\\\"cherry-markdown\\\">\")).call(_context8, html, \"</div>\\n          </div>\")).call(_context7, mathStyle + echartStyle + cherryStyle)));\n\n\t        _this2.toggleLoading();\n\t      });\n\t    }\n\t  }]);\n\n\t  return Copy;\n\t}(MenuBase);\n\n\tfunction convertImgToBase64(url, callback, outputFormat) {\n\t  return new promise$7(function (resolve) {\n\t    var canvas =\n\t    /** @type {HTMLCanvasElement}*/\n\t    document.createElement('CANVAS');\n\t    var ctx = canvas.getContext('2d');\n\t    var img = new Image();\n\t    img.crossOrigin = 'Anonymous';\n\n\t    img.onload = function () {\n\t      canvas.height = img.height;\n\t      canvas.width = img.width;\n\t      ctx.drawImage(img, 0, 0);\n\t      var dataURL = canvas.toDataURL(outputFormat || 'image/png');\n\t      resolve(dataURL);\n\t      canvas = null;\n\t    };\n\n\t    img.src = url;\n\t  });\n\t}\n\n\tfunction _createSuper$1k(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$1k(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = construct$4(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\n\tfunction _isNativeReflectConstruct$1k() { if (typeof Reflect === \"undefined\" || !construct$4) return false; if (construct$4.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(construct$4(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\t/**\n\t * 插入面板\n\t */\n\n\tvar Panel$1 = /*#__PURE__*/function (_MenuBase) {\n\t  _inherits(Panel, _MenuBase);\n\n\t  var _super = _createSuper$1k(Panel);\n\n\t  function Panel($cherry) {\n\t    var _context, _context2, _context3, _context4, _context5;\n\n\t    var _this;\n\n\t    _classCallCheck(this, Panel);\n\n\t    _this = _super.call(this, $cherry);\n\n\t    _this.setName('panel', 'tips');\n\n\t    _this.panelRule = getPanelRule().reg;\n\t    _this.subMenuConfig = [{\n\t      iconName: 'tips',\n\t      name: 'tips',\n\t      onclick: bind$5(_context = _this.bindSubClick).call(_context, _assertThisInitialized(_this), 'primary')\n\t    }, {\n\t      iconName: 'info',\n\t      name: 'info',\n\t      onclick: bind$5(_context2 = _this.bindSubClick).call(_context2, _assertThisInitialized(_this), 'info')\n\t    }, {\n\t      iconName: 'warning',\n\t      name: 'warning',\n\t      onclick: bind$5(_context3 = _this.bindSubClick).call(_context3, _assertThisInitialized(_this), 'warning')\n\t    }, {\n\t      iconName: 'danger',\n\t      name: 'danger',\n\t      onclick: bind$5(_context4 = _this.bindSubClick).call(_context4, _assertThisInitialized(_this), 'danger')\n\t    }, {\n\t      iconName: 'success',\n\t      name: 'success',\n\t      onclick: bind$5(_context5 = _this.bindSubClick).call(_context5, _assertThisInitialized(_this), 'success')\n\t    }];\n\t    return _this;\n\t  }\n\t  /**\n\t   * 从字符串中找打面板的name\n\t   * @param {string} str\n\t   * @returns {string | false}\n\t   */\n\n\n\t  _createClass(Panel, [{\n\t    key: \"$getNameFromStr\",\n\t    value: function $getNameFromStr(str) {\n\t      var ret = false;\n\t      this.panelRule.lastIndex = 0;\n\t      str.replace(this.panelRule, function (match, preLines, name, content) {\n\t        var $name = /\\s/.test(trim$3(name).call(name)) ? trim$3(name).call(name).replace(/\\s.*$/, '') : name;\n\t        ret = $name ? trim$3($name).call($name).toLowerCase() : '';\n\t        return match;\n\t      });\n\t      return ret;\n\t    }\n\t  }, {\n\t    key: \"$getTitle\",\n\t    value: function $getTitle(str) {\n\t      this.panelRule.lastIndex = 0;\n\t      str.replace(this.panelRule, function (match, preLines, name, content) {\n\t        var $name = trim$3(name).call(name);\n\n\t        return /\\s/.test($name) ? $name.replace(/[^\\s]+\\s/, '') : '';\n\t      });\n\t      return '';\n\t    }\n\t    /**\n\t     * 响应点击事件\n\t     * @param {string} selection 被用户选中的文本内容\n\t     * @param {string} shortKey 快捷键参数\n\t     * @returns {string} 回填到编辑器光标位置/选中文本区域的内容\n\t     */\n\n\t  }, {\n\t    key: \"onClick\",\n\t    value: function onClick(selection) {\n\t      var _this2 = this,\n\t          _context9,\n\t          _context10;\n\n\t      var shortKey = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';\n\t      var $selection = getSelection(this.editor.editor, selection, 'line', true) || '内容';\n\t      var currentName = this.$getNameFromStr($selection);\n\t      var title = this.$getTitle($selection);\n\n\t      if (currentName === false) {\n\t        // 如果没有命中面板语法，则尝试扩大选区\n\t        this.getMoreSelection('::: ', '\\n', function () {\n\t          var newSelection = _this2.editor.editor.getSelection();\n\n\t          var isMatch = _this2.$getNameFromStr(newSelection);\n\n\t          if (isMatch !== false) {\n\t            $selection = newSelection;\n\t            currentName = isMatch;\n\t            title = _this2.$getTitle(newSelection);\n\t          }\n\n\t          return isMatch !== false;\n\t        });\n\t      }\n\n\t      if (currentName !== false) {\n\t        // 如果命中了面板语法，则尝试去掉语法或者变更语法\n\t        if (currentName === shortKey) {\n\t          // 去掉面板语法\n\t          this.panelRule.lastIndex = 0;\n\t          return $selection.replace(this.panelRule, function (match, preLines, name, content) {\n\t            var _context6;\n\n\t            var $name = trim$3(name).call(name);\n\n\t            var $title = /\\s/.test($name) ? $name.replace(/[^\\s]+\\s/, '') : '';\n\t            return concat$5(_context6 = \"\".concat($title, \"\\n\")).call(_context6, content);\n\t          });\n\t        } // 修改name\n\n\n\t        this.registerAfterClickCb(function () {\n\t          _this2.setLessSelection('::: ', '\\n');\n\t        });\n\t        this.panelRule.lastIndex = 0;\n\t        return $selection.replace(this.panelRule, function (match, preLines, name, content) {\n\t          var _context7, _context8;\n\n\t          var $name = trim$3(name).call(name);\n\n\t          var $title = /\\s/.test($name) ? $name.replace(/[^\\s]+\\s/, '') : '';\n\t          return concat$5(_context7 = concat$5(_context8 = \"::: \".concat(shortKey, \" \")).call(_context8, $title, \"\\n\")).call(_context7, content.replace(/\\n+$/, ''), \"\\n:::\");\n\t        });\n\t      }\n\n\t      this.registerAfterClickCb(function () {\n\t        _this2.setLessSelection('::: ', '\\n');\n\t      });\n\t      $selection = $selection.replace(/^\\n+/, '');\n\n\t      if (/\\n/.test($selection)) {\n\t        if (!title) {\n\t          title = $selection.replace(/\\n[\\w\\W]+$/, '');\n\t          $selection = $selection.replace(/^[^\\n]+\\n/, '');\n\t        }\n\t      } else {\n\t        title = title ? title : '标题';\n\t      }\n\n\t      return concat$5(_context9 = concat$5(_context10 = \"::: \".concat(shortKey, \" \")).call(_context10, title, \"\\n\")).call(_context9, $selection, \"\\n:::\").replace(/\\n{2,}:::/g, '\\n:::');\n\t    }\n\t  }]);\n\n\t  return Panel;\n\t}(MenuBase);\n\n\tfunction _createSuper$1l(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$1l(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = construct$4(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\n\tfunction _isNativeReflectConstruct$1l() { if (typeof Reflect === \"undefined\" || !construct$4) return false; if (construct$4.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(construct$4(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\t/**\n\t * 插入对齐方式\n\t */\n\n\tvar Justify = /*#__PURE__*/function (_Panel) {\n\t  _inherits(Justify, _Panel);\n\n\t  var _super = _createSuper$1l(Justify);\n\n\t  function Justify($cherry) {\n\t    var _context, _context2, _context3;\n\n\t    var _this;\n\n\t    _classCallCheck(this, Justify);\n\n\t    _this = _super.call(this, $cherry);\n\n\t    _this.setName('justify', 'justify');\n\n\t    _this.panelRule = getPanelRule().reg;\n\t    _this.subMenuConfig = [{\n\t      iconName: 'justifyLeft',\n\t      name: '左对齐',\n\t      onclick: bind$5(_context = _this.bindSubClick).call(_context, _assertThisInitialized(_this), 'left')\n\t    }, {\n\t      iconName: 'justifyCenter',\n\t      name: '居中',\n\t      onclick: bind$5(_context2 = _this.bindSubClick).call(_context2, _assertThisInitialized(_this), 'center')\n\t    }, {\n\t      iconName: 'justifyRight',\n\t      name: '右对齐',\n\t      onclick: bind$5(_context3 = _this.bindSubClick).call(_context3, _assertThisInitialized(_this), 'right')\n\t    }];\n\t    return _this;\n\t  }\n\n\t  _createClass(Justify, [{\n\t    key: \"$getTitle\",\n\t    value: function $getTitle() {\n\t      return ' ';\n\t    }\n\t  }]);\n\n\t  return Justify;\n\t}(Panel$1);\n\n\tfunction _createSuper$1m(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$1m(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = construct$4(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\n\tfunction _isNativeReflectConstruct$1m() { if (typeof Reflect === \"undefined\" || !construct$4) return false; if (construct$4.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(construct$4(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\t/**\n\t * 插入手风琴\n\t */\n\n\tvar Detail$1 = /*#__PURE__*/function (_MenuBase) {\n\t  _inherits(Detail, _MenuBase);\n\n\t  var _super = _createSuper$1m(Detail);\n\n\t  function Detail($cherry) {\n\t    var _this;\n\n\t    _classCallCheck(this, Detail);\n\n\t    _this = _super.call(this, $cherry);\n\n\t    _this.setName('detail', 'insertFlow');\n\n\t    _this.detailRule = getDetailRule().reg;\n\t    return _this;\n\t  }\n\t  /**\n\t   * 响应点击事件\n\t   * @param {string} selection 被用户选中的文本内容\n\t   * @returns {string} 回填到编辑器光标位置/选中文本区域的内容\n\t   */\n\n\n\t  _createClass(Detail, [{\n\t    key: \"onClick\",\n\t    value: function onClick(selection) {\n\t      var _this2 = this;\n\n\t      var $selection = getSelection(this.editor.editor, selection, 'line', true) || '点击展开更多\\n内容\\n++- 默认展开\\n内容\\n++ 默认收起\\n内容';\n\t      this.detailRule.lastIndex = 0;\n\n\t      if (!this.detailRule.test($selection)) {\n\t        // 如果没有命中手风琴语法，则尝试扩大选区\n\t        this.getMoreSelection('+++ ', '\\n', function () {\n\t          var newSelection = _this2.editor.editor.getSelection();\n\n\t          _this2.detailRule.lastIndex = 0;\n\n\t          var isMatch = _this2.detailRule.test(newSelection);\n\n\t          if (isMatch !== false) {\n\t            $selection = newSelection;\n\t          }\n\n\t          return isMatch !== false;\n\t        });\n\t      }\n\n\t      this.detailRule.lastIndex = 0;\n\n\t      if (this.detailRule.test($selection)) {\n\t        // 如果命中了手风琴语法，则去掉手风琴语法\n\t        this.detailRule.lastIndex = 0;\n\t        return $selection.replace(this.detailRule, function (match, preLines, isOpen, title, content) {\n\t          var _context;\n\n\t          return concat$5(_context = \"\".concat(title, \"\\n\")).call(_context, content);\n\t        });\n\t      } // 去掉开头的空格\n\n\n\t      $selection = $selection.replace(/^\\s+/, ''); // 如果选中的内容不包含换行，则强制增加一个换行\n\n\t      if (!/\\n/.test($selection)) {\n\t        var _context2;\n\n\t        $selection = concat$5(_context2 = \"\".concat($selection, \"\\n\")).call(_context2, $selection);\n\t      }\n\n\t      this.registerAfterClickCb(function () {\n\t        _this2.setLessSelection('+++ ', '\\n');\n\t      });\n\t      return \"+++ \".concat($selection, \"\\n+++\").replace(/\\n{2,}\\+\\+\\+/g, '\\n+++');\n\t    }\n\t  }]);\n\n\t  return Detail;\n\t}(MenuBase);\n\n\tfunction _createSuper$1n(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$1n(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = construct$4(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\n\tfunction _isNativeReflectConstruct$1n() { if (typeof Reflect === \"undefined\" || !construct$4) return false; if (construct$4.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(construct$4(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\t/**\n\t * 打开draw.io画图对话框，点击确定后向编辑器插入图片语法\n\t */\n\n\tvar DrawIo = /*#__PURE__*/function (_MenuBase) {\n\t  _inherits(DrawIo, _MenuBase);\n\n\t  var _super = _createSuper$1n(DrawIo);\n\n\t  function DrawIo($cherry) {\n\t    var _this;\n\n\t    _classCallCheck(this, DrawIo);\n\n\t    _this = _super.call(this, $cherry);\n\n\t    _this.setName('draw.io', 'draw.io');\n\n\t    _this.noIcon = true;\n\t    _this.drawioIframeUrl = $cherry.options.drawioIframeUrl;\n\t    return _this;\n\t  }\n\t  /**\n\t   * 响应点击事件\n\t   * @param {string} selection 被用户选中的文本内容\n\t   * @param {string} shortKey 快捷键参数，本函数不处理这个参数\n\t   * @returns {string} 回填到编辑器光标位置/选中文本区域的内容\n\t   */\n\n\n\t  _createClass(DrawIo, [{\n\t    key: \"onClick\",\n\t    value: function onClick(selection) {\n\t      var _this2 = this;\n\n\t      if (!this.drawioIframeUrl) {\n\t        // 如果没有配置drawio的编辑页URL，则直接失效\n\t        return selection;\n\t      }\n\n\t      if (this.hasCacheOnce()) {\n\t        var _context;\n\n\t        // @ts-ignore\n\t        var _this$getAndCleanCach = this.getAndCleanCacheOnce(),\n\t            xmlData = _this$getAndCleanCach.xmlData,\n\t            base64 = _this$getAndCleanCach.base64;\n\n\t        var begin = '![';\n\n\t        var end = concat$5(_context = \"](\".concat(base64, \"){data-type=drawio data-xml=\")).call(_context, encodeURI(xmlData), \"}\");\n\n\t        this.registerAfterClickCb(function () {\n\t          _this2.setLessSelection(begin, end);\n\t        });\n\t        return \"\".concat(begin, \"\\u5728\\u9884\\u89C8\\u533A\\u70B9\\u51FB\\u56FE\\u7247\\u91CD\\u65B0\\u7F16\\u8F91draw.io\").concat(end);\n\t      } // 插入图片，调用上传文件逻辑\n\n\n\t      drawioDialog(this.drawioIframeUrl, '', function (data) {\n\t        _this2.setCacheOnce(data);\n\n\t        _this2.fire(null);\n\t      });\n\t      this.updateMarkdown = false;\n\t      return selection;\n\t    }\n\t  }]);\n\n\t  return DrawIo;\n\t}(MenuBase);\n\n\t// 目前不支持按需动态加载\n\t// 如果对CherryMarkdown构建后的文件大小有比较严格的要求，可以根据实际情况删减hook\n\n\tvar HookList = {\n\t  bold: Bold,\n\t  italic: Italic,\n\t  '|': Split,\n\t  strikethrough: Strikethrough$1,\n\t  sub: Sub$1,\n\t  sup: Sup$1,\n\t  header: Header$1,\n\t  insert: Insert,\n\t  list: List$1,\n\t  ol: Ol,\n\t  ul: Ul,\n\t  checklist: Checklist,\n\t  graph: Graph,\n\t  size: Size$1,\n\t  h1: H1,\n\t  h2: H2,\n\t  h3: H3,\n\t  color: Color$1,\n\t  quote: Quote,\n\t  quickTable: QuickTable,\n\t  togglePreview: TogglePreview,\n\t  code: Code,\n\t  codeTheme: CodeTheme,\n\t  \"export\": Export,\n\t  settings: Settings,\n\t  fullScreen: FullScreen,\n\t  mobilePreview: MobilePreview,\n\t  copy: Copy,\n\t  undo: Undo,\n\t  redo: Redo,\n\t  underline: Underline$1,\n\t  switchModel: SwitchModel,\n\t  image: Image$2,\n\t  audio: Audio,\n\t  video: Video,\n\t  br: Br$1,\n\t  hr: Hr$1,\n\t  formula: Formula,\n\t  link: Link$1,\n\t  table: Table$1,\n\t  toc: Toc$1,\n\t  lineTable: LineTable,\n\t  barTable: BrTable,\n\t  pdf: Pdf,\n\t  word: Word,\n\t  ruby: Ruby$1,\n\t  theme: Theme,\n\t  file: File,\n\t  panel: Panel$1,\n\t  justify: Justify,\n\t  detail: Detail$1,\n\t  drawIo: DrawIo,\n\t  chatgpt: ChatGpt\n\t};\n\n\tvar HookCenter$1 = /*#__PURE__*/function () {\n\t  function HookCenter(toolbar) {\n\t    _classCallCheck(this, HookCenter);\n\n\t    this.toolbar = toolbar;\n\t    /**\n\t     * @type {{[key: string]: import('@/toolbars/MenuBase').default}} 保存所有菜单实例\n\t     */\n\n\t    this.hooks = {};\n\t    /**\n\t     * @type {string[]} 所有注册的菜单名称\n\t     */\n\n\t    this.allMenusName = [];\n\t    /**\n\t     * @type {string[]} 一级菜单的名称\n\t     */\n\n\t    this.level1MenusName = [];\n\t    /**\n\t     * @type {{ [parentName: string]: string[]}} 二级菜单的名称, e.g. {一级菜单名称: [二级菜单名称1, 二级菜单名称2]}\n\t     */\n\n\t    this.level2MenusName = {};\n\t    this.init();\n\t  }\n\n\t  _createClass(HookCenter, [{\n\t    key: \"$newMenu\",\n\t    value: function $newMenu(name) {\n\t      if (this.hooks[name]) {\n\t        return;\n\t      }\n\n\t      var _this$toolbar$options = this.toolbar.options,\n\t          $cherry = _this$toolbar$options.$cherry,\n\t          customMenu = _this$toolbar$options.customMenu;\n\n\t      if (HookList[name]) {\n\t        this.allMenusName.push(name);\n\t        this.hooks[name] = new HookList[name]($cherry);\n\t      } else if (customMenu !== undefined && customMenu !== null && customMenu[name]) {\n\t        this.allMenusName.push(name); // 如果是自定义菜单，传参兼容旧版\n\n\t        this.hooks[name] = new customMenu[name]($cherry);\n\t      }\n\t    }\n\t    /**\n\t     * 根据配置动态渲染、绑定工具栏\n\t     * @returns\n\t     */\n\n\t  }, {\n\t    key: \"init\",\n\t    value: function init() {\n\t      var _this = this;\n\n\t      var buttonConfig = this.toolbar.options.buttonConfig;\n\n\t      forEach$3(buttonConfig).call(buttonConfig, function (item) {\n\t        if (typeof item === 'string') {\n\t          _this.level1MenusName.push(item);\n\n\t          _this.$newMenu(item);\n\t        } else if (_typeof(item) === 'object') {\n\t          var keys = keys$3(item);\n\n\t          if (keys.length === 1) {\n\t            var _context;\n\n\t            // 只接受形如{ name: [ subMenu ] }的参数\n\t            var _keys = _slicedToArray(keys, 1),\n\t                name = _keys[0];\n\n\t            _this.level1MenusName.push(name);\n\n\t            _this.$newMenu(name);\n\n\t            _this.level2MenusName[name] = item[name];\n\n\t            forEach$3(_context = item[name]).call(_context, function (subItem) {\n\t              _this.$newMenu(subItem);\n\t            });\n\t          }\n\t        }\n\t      });\n\t    }\n\t  }]);\n\n\t  return HookCenter;\n\t}();\n\n\tvar Toolbar = /*#__PURE__*/function () {\n\t  /**\n\t   * @type {Record<string, any>} 外部获取 toolbarHandler\n\t   */\n\t  function Toolbar(options) {\n\t    _classCallCheck(this, Toolbar);\n\n\t    _defineProperty(this, \"toolbarHandlers\", {});\n\n\t    // 存储所有菜单的实例\n\t    this.menus = {}; // 存储所有快捷键的影射  {快捷键: 菜单名称}\n\n\t    this.shortcutKeyMap = {}; // 存储所有二级菜单面板\n\n\t    this.subMenus = {}; // 默认的菜单配置\n\n\t    this.options = {\n\t      dom: document.createElement('div'),\n\t      buttonConfig: ['bold'],\n\t      customMenu: [],\n\t      buttonRightConfig: []\n\t    };\n\n\t    assign$2(this.options, options);\n\n\t    this.$cherry = this.options.$cherry;\n\t    this.instanceId = this.$cherry.instanceId;\n\t    this.menus = new HookCenter$1(this);\n\t    this.drawMenus();\n\t    this.init();\n\t  }\n\n\t  _createClass(Toolbar, [{\n\t    key: \"init\",\n\t    value: function init() {\n\t      var _this = this;\n\n\t      this.collectShortcutKey();\n\t      this.collectToolbarHandler();\n\t      Event$1.on(this.instanceId, Event$1.Events.cleanAllSubMenus, function () {\n\t        return _this.hideAllSubMenu();\n\t      });\n\t    }\n\t  }, {\n\t    key: \"previewOnly\",\n\t    value: function previewOnly() {\n\t      this.options.dom.classList.add('preview-only');\n\t      Event$1.emit(this.instanceId, Event$1.Events.toolbarHide);\n\t    }\n\t  }, {\n\t    key: \"showToolbar\",\n\t    value: function showToolbar() {\n\t      this.options.dom.classList.remove('preview-only');\n\t      Event$1.emit(this.instanceId, Event$1.Events.toolbarShow);\n\t    }\n\t  }, {\n\t    key: \"isHasLevel2Menu\",\n\t    value: function isHasLevel2Menu(name) {\n\t      // FIXME: return boolean\n\t      return this.menus.level2MenusName[name];\n\t    }\n\t  }, {\n\t    key: \"isHasConfigMenu\",\n\t    value: function isHasConfigMenu(name) {\n\t      // FIXME: return boolean\n\t      return this.menus.hooks[name].subMenuConfig || [];\n\t    }\n\t    /**\n\t     * 判断是否有子菜单，目前有两种子菜单配置方式：1、通过`subMenuConfig`属性 2、通过`buttonConfig`配置属性\n\t     * @param {string} name\n\t     * @returns {boolean} 是否有子菜单\n\t     */\n\n\t  }, {\n\t    key: \"isHasSubMenu\",\n\t    value: function isHasSubMenu(name) {\n\t      return Boolean(this.isHasLevel2Menu(name) || this.isHasConfigMenu(name).length > 0);\n\t    }\n\t    /**\n\t     * 根据配置画出来一级工具栏\n\t     */\n\n\t  }, {\n\t    key: \"drawMenus\",\n\t    value: function drawMenus() {\n\t      var _context,\n\t          _this2 = this,\n\t          _this$options$buttonR;\n\n\t      var fragLeft = document.createDocumentFragment();\n\t      var toolbarLeft = createElement('div', 'toolbar-left');\n\n\t      forEach$3(_context = this.menus.level1MenusName).call(_context, function (name) {\n\t        var btn = _this2.menus.hooks[name].createBtn();\n\n\t        btn.addEventListener('click', function (event) {\n\t          _this2.onClick(event, name);\n\t        }, false);\n\n\t        if (_this2.isHasSubMenu(name)) {\n\t          btn.classList.add('cherry-toolbar-dropdown');\n\t        }\n\n\t        fragLeft.appendChild(btn);\n\t      });\n\n\t      toolbarLeft.appendChild(fragLeft);\n\t      this.options.dom.appendChild(toolbarLeft);\n\t      (_this$options$buttonR = this.options.buttonRightConfig) !== null && _this$options$buttonR !== void 0 && _this$options$buttonR.length ? this.drawRightMenus(this.options.buttonRightConfig) : null;\n\t    }\n\t    /**\n\t     * 根据配置画出来右侧一级工具栏\n\t     */\n\n\t  }, {\n\t    key: \"drawRightMenus\",\n\t    value: function drawRightMenus(buttonRightConfig) {\n\t      var _context2;\n\n\t      var toolbarRight = createElement('div', 'toolbar-right');\n\t      var fragRight = document.createDocumentFragment();\n\t      var rightOptions = {\n\t        options: {\n\t          $cherry: this.$cherry,\n\t          buttonConfig: buttonRightConfig,\n\t          customMenu: []\n\t        }\n\t      };\n\t      var rightMenus = new HookCenter$1(rightOptions);\n\n\t      forEach$3(_context2 = rightMenus.level1MenusName).call(_context2, function (name) {\n\t        var btn = rightMenus.hooks[name].createBtn();\n\t        btn.addEventListener('click', function (event) {\n\t          console.log('第一次点击');\n\t          rightMenus.hooks[name].fire(event, name);\n\t        }, false);\n\t        fragRight.appendChild(btn);\n\t      });\n\n\t      toolbarRight.appendChild(fragRight);\n\t      this.options.dom.appendChild(toolbarRight);\n\t    }\n\t  }, {\n\t    key: \"setSubMenuPosition\",\n\t    value: function setSubMenuPosition(menuObj, subMenuObj) {\n\t      var pos = menuObj.getMenuPosition();\n\t      subMenuObj.style.left = \"\".concat(pos.left + pos.width / 2, \"px\");\n\t      subMenuObj.style.top = \"\".concat(pos.top + pos.height, \"px\");\n\t      subMenuObj.style.position = menuObj.positionModel;\n\t    }\n\t  }, {\n\t    key: \"drawSubMenus\",\n\t    value: function drawSubMenus(name) {\n\t      var _this3 = this;\n\n\t      this.subMenus[name] = createElement('div', 'cherry-dropdown', {\n\t        name: name\n\t      });\n\t      this.setSubMenuPosition(this.menus.hooks[name], this.subMenus[name]); // 如果有配置的二级菜单\n\n\t      var level2MenusName = this.isHasLevel2Menu(name);\n\n\t      if (level2MenusName) {\n\t        forEach$3(level2MenusName).call(level2MenusName, function (level2Name) {\n\t          var subMenu = _this3.menus.hooks[level2Name];\n\n\t          if (subMenu !== undefined && typeof subMenu.createBtn === 'function') {\n\t            var btn = subMenu.createBtn(true); // 二级菜单的dom认定为一级菜单的\n\n\t            subMenu.dom = subMenu.dom ? subMenu.dom : _this3.menus.hooks[name].dom;\n\t            btn.addEventListener('click', function (event) {\n\t              return _this3.onClick(event, level2Name, true);\n\t            }, false);\n\n\t            _this3.subMenus[name].appendChild(btn);\n\t          }\n\t        });\n\t      } // 兼容旧版本配置的二级菜单\n\n\n\t      var subMenuConfig = this.isHasConfigMenu(name);\n\n\t      if (subMenuConfig.length > 0) {\n\t        forEach$3(subMenuConfig).call(subMenuConfig, function (config) {\n\t          var btn = _this3.menus.hooks[name].createSubBtnByConfig(config);\n\n\t          btn.addEventListener('click', function () {\n\t            return _this3.hideAllSubMenu();\n\t          }, false);\n\n\t          _this3.subMenus[name].appendChild(btn);\n\t        });\n\t      }\n\n\t      this.$cherry.wrapperDom.appendChild(this.subMenus[name]);\n\t    }\n\t    /**\n\t     * 处理点击事件\n\t     */\n\n\t  }, {\n\t    key: \"onClick\",\n\t    value: function onClick(event, name) {\n\t      var focusEvent = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n\t      var menu = this.menus.hooks[name];\n\n\t      if (!menu) {\n\t        return;\n\t      }\n\n\t      if (this.isHasSubMenu(name) && !focusEvent) {\n\t        this.toggleSubMenu(name);\n\t      } else {\n\t        this.hideAllSubMenu();\n\t        menu.fire(event, name);\n\t      }\n\t    }\n\t    /**\n\t     * 展开/收起二级菜单\n\t     */\n\n\t  }, {\n\t    key: \"toggleSubMenu\",\n\t    value: function toggleSubMenu(name) {\n\t      if (!this.subMenus[name]) {\n\t        // 如果没有二级菜单，则先画出来，然后再显示\n\t        this.hideAllSubMenu();\n\t        this.drawSubMenus(name);\n\t        this.subMenus[name].style.display = 'block';\n\t        return;\n\t      }\n\n\t      if (this.subMenus[name].style.display === 'none') {\n\t        // 如果是隐藏的，则先隐藏所有二级菜单，再显示当前二级菜单\n\t        this.hideAllSubMenu();\n\t        this.subMenus[name].style.display = 'block';\n\t        this.setSubMenuPosition(this.menus.hooks[name], this.subMenus[name]);\n\t      } else {\n\t        // 如果是显示的，则隐藏当前二级菜单\n\t        this.subMenus[name].style.display = 'none';\n\t      }\n\t    }\n\t    /**\n\t     * 隐藏所有的二级菜单\n\t     */\n\n\t  }, {\n\t    key: \"hideAllSubMenu\",\n\t    value: function hideAllSubMenu() {\n\t      var _context3;\n\n\t      forEach$3(_context3 = this.$cherry.wrapperDom.querySelectorAll('.cherry-dropdown')).call(_context3, function (dom) {\n\t        dom.style.display = 'none';\n\t      });\n\t    }\n\t    /**\n\t     * 收集快捷键\n\t     */\n\n\t  }, {\n\t    key: \"collectShortcutKey\",\n\t    value: function collectShortcutKey() {\n\t      var _context4,\n\t          _this4 = this;\n\n\t      forEach$3(_context4 = this.menus.allMenusName).call(_context4, function (name) {\n\t        var _this4$menus$hooks$na;\n\n\t        (_this4$menus$hooks$na = _this4.menus.hooks[name].shortcutKeys) === null || _this4$menus$hooks$na === void 0 ? void 0 : forEach$3(_this4$menus$hooks$na).call(_this4$menus$hooks$na, function (key) {\n\t          _this4.shortcutKeyMap[key] = name;\n\t        });\n\t      });\n\t    }\n\t  }, {\n\t    key: \"collectToolbarHandler\",\n\t    value: function collectToolbarHandler() {\n\t      var _context5,\n\t          _this5 = this;\n\n\t      this.toolbarHandlers = reduce$3(_context5 = this.menus.allMenusName).call(_context5, function (handlerMap, name) {\n\t        var menuHook = _this5.menus.hooks[name];\n\n\t        if (!menuHook) {\n\t          return handlerMap;\n\t        }\n\n\t        handlerMap[name] = function (shortcut, _callback) {\n\t          if (typeof _callback === 'function') {\n\t            Logger.warn('MenuBase#onClick param callback is no longer supported. Please register the callback via MenuBase#registerAfterClickCb instead.');\n\t          }\n\n\t          menuHook.fire.call(menuHook, undefined, shortcut);\n\t        };\n\n\t        return handlerMap;\n\t      }, {});\n\t    }\n\t    /**\n\t     * 监测是否有对应的快捷键\n\t     * @param {KeyboardEvent} evt keydown 事件\n\t     * @returns {boolean} 是否有对应的快捷键\n\t     */\n\n\t  }, {\n\t    key: \"matchShortcutKey\",\n\t    value: function matchShortcutKey(evt) {\n\t      return !!this.shortcutKeyMap[this.getCurrentKey(evt)];\n\t    }\n\t    /**\n\t     * 触发对应快捷键的事件\n\t     * @param {KeyboardEvent} evt\n\t     */\n\n\t  }, {\n\t    key: \"fireShortcutKey\",\n\t    value: function fireShortcutKey(evt) {\n\t      var _this$menus$hooks$thi;\n\n\t      var currentKey = this.getCurrentKey(evt);\n\t      (_this$menus$hooks$thi = this.menus.hooks[this.shortcutKeyMap[currentKey]]) === null || _this$menus$hooks$thi === void 0 ? void 0 : _this$menus$hooks$thi.fire(evt, currentKey);\n\t    }\n\t    /**\n\t     * 格式化当前按键，mac下的command按键转换为ctrl\n\t     * @param {KeyboardEvent} event\n\t     * @returns\n\t     */\n\n\t  }, {\n\t    key: \"getCurrentKey\",\n\t    value: function getCurrentKey(event) {\n\t      var key = '';\n\n\t      if (event.ctrlKey) {\n\t        key += 'Ctrl-';\n\t      }\n\n\t      if (event.altKey) {\n\t        key += 'Alt-';\n\t      }\n\n\t      if (event.metaKey && mac) {\n\t        key += 'Ctrl-';\n\t      } // 如果存在shift键\n\n\n\t      if (event.shiftKey) {\n\t        key += \"Shift-\";\n\t      } // 如果还有第三个键 且不是 shift键\n\n\n\t      if (event.key && event.key.toLowerCase() !== 'shift') {\n\t        key += event.key.toLowerCase();\n\t      }\n\n\t      return key;\n\t    }\n\t  }]);\n\n\t  return Toolbar;\n\t}();\n\n\tfunction _createSuper$1o(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$1o(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = construct$4(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\n\tfunction _isNativeReflectConstruct$1o() { if (typeof Reflect === \"undefined\" || !construct$4) return false; if (construct$4.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(construct$4(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\t/**\n\t * 在编辑区域选中文本时浮现的bubble工具栏\n\t */\n\n\tvar Bubble = /*#__PURE__*/function (_Toolbar) {\n\t  _inherits(Bubble, _Toolbar);\n\n\t  var _super = _createSuper$1o(Bubble);\n\n\t  function Bubble() {\n\t    _classCallCheck(this, Bubble);\n\n\t    return _super.apply(this, arguments);\n\t  }\n\n\t  _createClass(Bubble, [{\n\t    key: \"visible\",\n\t    get: function get() {\n\t      var bubbleStyle = window.getComputedStyle(this.bubbleDom);\n\t      return bubbleStyle.display !== 'none' && bubbleStyle.visibility !== 'hidden';\n\t    },\n\t    set:\n\t    /**\n\t     * @type {'flex' | 'block'}\n\t     */\n\t    // constructor(options) {\n\t    //     super(options);\n\t    // }\n\t    function set(visible) {\n\t      var bubbleStyle = window.getComputedStyle(this.bubbleDom);\n\n\t      if (visible) {\n\t        bubbleStyle.display === 'none' && (this.bubbleDom.style.display = Bubble.displayType); // bubbleStyle.visibility !== 'visible' && (this.bubbleBottom.style.visibility = 'visible');\n\t      } else {\n\t        bubbleStyle.display !== 'none' && (this.bubbleDom.style.display = 'none'); // bubbleStyle.visibility !== 'hidden' && (this.bubbleBottom.style.visibility = 'hidden');\n\t      }\n\t    }\n\t  }, {\n\t    key: \"init\",\n\t    value: function init() {\n\t      this.options.editor = this.$cherry.editor;\n\t      this.addSelectionChangeListener();\n\t      this.bubbleDom = this.options.dom;\n\t      this.editorDom = this.options.editor.getEditorDom();\n\t      this.initBubbleDom();\n\t      this.editorDom.querySelector('.CodeMirror').appendChild(this.bubbleDom);\n\t    }\n\t    /**\n\t     * 计算编辑区域的偏移量\n\t     * @returns {number} 编辑区域的滚动区域\n\t     */\n\n\t  }, {\n\t    key: \"getScrollTop\",\n\t    value: function getScrollTop() {\n\t      return this.options.editor.editor.getScrollInfo().top;\n\t    }\n\t    /**\n\t     * 当编辑区域滚动的时候自动隐藏bubble工具栏和子工具栏\n\t     */\n\n\t  }, {\n\t    key: \"updatePositionWhenScroll\",\n\t    value: function updatePositionWhenScroll() {\n\t      if (this.bubbleDom.style.display === Bubble.displayType) {\n\t        this.bubbleDom.style.marginTop = \"\".concat(_parseFloat$2(this.bubbleDom.dataset.scrollTop) - this.getScrollTop(), \"px\");\n\t      }\n\t    }\n\t    /**\n\t     * 根据高度计算bubble工具栏出现的位置的高度\n\t     * 根据宽度计算bubble工具栏出现的位置的left值，以及bubble工具栏三角箭头的left值\n\t     * @param {number} top 高度\n\t     * @param {number} width 选中文本内容的宽度\n\t     */\n\n\t  }, {\n\t    key: \"showBubble\",\n\t    value: function showBubble(top, width) {\n\t      if (!this.visible) {\n\t        this.visible = true;\n\t        this.bubbleDom.style.marginTop = '0';\n\t        this.bubbleDom.dataset.scrollTop = String(this.getScrollTop());\n\t      }\n\n\t      var positionLimit = this.editorDom.querySelector('.CodeMirror-lines').firstChild.getBoundingClientRect();\n\t      var editorPosition = this.editorDom.getBoundingClientRect();\n\t      var minLeft = positionLimit.left - editorPosition.left;\n\t      var maxLeft = positionLimit.width + minLeft;\n\t      var minTop = this.bubbleDom.offsetHeight * 2;\n\t      var $top = top;\n\n\t      if ($top < minTop) {\n\t        // 如果高度小于编辑器的顶部，则让bubble工具栏出现在选中文本的下放\n\t        $top += this.bubbleDom.offsetHeight - this.bubbleTop.getBoundingClientRect().height;\n\t        this.bubbleTop.style.display = 'block';\n\t        this.bubbleBottom.style.display = 'none';\n\t      } else {\n\t        // 反之出现在选中文本内容的上方\n\t        $top -= this.bubbleDom.offsetHeight + 2 * this.bubbleBottom.getBoundingClientRect().height;\n\t        this.bubbleTop.style.display = 'none';\n\t        this.bubbleBottom.style.display = 'block';\n\t      }\n\n\t      this.bubbleDom.style.top = \"\".concat($top, \"px\");\n\t      var left = width - this.bubbleDom.offsetWidth / 2;\n\n\t      if (left < minLeft) {\n\t        // 如果位置超过了编辑器的最左边，则控制bubble工具栏不超出编辑器最左边\n\t        // 同时bubble工具栏上的箭头尽量指向选中文本内容的中间位置\n\t        left = minLeft;\n\t        this.$setBubbleCursorPosition(\"\".concat(width - minLeft, \"px\"));\n\t      } else if (left + this.bubbleDom.offsetWidth > maxLeft) {\n\t        // 如果位置超过了编辑器的最右边，则控制bubble工具栏不超出编辑器最右边\n\t        // 同时bubble工具栏上的箭头尽量指向选中文本内容的中间位置\n\t        left = maxLeft - this.bubbleDom.offsetWidth;\n\t        this.$setBubbleCursorPosition(\"\".concat(width - left, \"px\"));\n\t      } else {\n\t        // 让bubble工具栏的箭头处于工具栏的中间位置\n\t        this.$setBubbleCursorPosition('50%');\n\t      } // 安全边距 20px\n\n\n\t      this.bubbleDom.style.left = \"\".concat(Math.max(20, left), \"px\");\n\t    }\n\t  }, {\n\t    key: \"hideBubble\",\n\t    value: function hideBubble() {\n\t      this.visible = false;\n\t    }\n\t    /**\n\t     * 控制bubble工具栏的箭头的位置\n\t     * @param {string} left 左偏移量\n\t     */\n\n\t  }, {\n\t    key: \"$setBubbleCursorPosition\",\n\t    value: function $setBubbleCursorPosition() {\n\t      var left = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '50%';\n\n\t      if (left === '50%') {\n\t        this.bubbleTop.style.left = '50%';\n\t        this.bubbleBottom.style.left = '50%';\n\t      } else {\n\t        var $left = _parseFloat$2(left) < 10 ? '10px' : left;\n\t        this.bubbleTop.style.left = $left;\n\t        this.bubbleBottom.style.left = $left;\n\t      }\n\t    }\n\t  }, {\n\t    key: \"initBubbleDom\",\n\t    value: function initBubbleDom() {\n\t      var top = document.createElement('div');\n\t      top.className = 'cherry-bubble-top';\n\t      var bottom = document.createElement('div');\n\t      bottom.className = 'cherry-bubble-bottom';\n\t      this.bubbleTop = top;\n\t      this.bubbleBottom = bottom;\n\t      this.bubbleDom.appendChild(top);\n\t      this.bubbleDom.appendChild(bottom); // 默认不可见\n\n\t      this.visible = false;\n\t    }\n\t  }, {\n\t    key: \"getBubbleDom\",\n\t    value: function getBubbleDom() {\n\t      return this.bubbleDom;\n\t    }\n\t  }, {\n\t    key: \"addSelectionChangeListener\",\n\t    value: function addSelectionChangeListener() {\n\t      var _this = this;\n\n\t      this.options.editor.addListener('change', function (codemirror) {\n\t        // 当编辑区内容变更时自动隐藏bubble工具栏\n\t        _this.hideBubble();\n\t      });\n\t      this.options.editor.addListener('refresh', function (codemirror) {\n\t        // 当编辑区内容刷新时自动隐藏bubble工具栏\n\t        _this.hideBubble();\n\t      });\n\t      this.options.editor.addListener('scroll', function (codemirror) {\n\t        // 当编辑区滚动时，需要实时同步bubble工具栏的位置\n\t        _this.updatePositionWhenScroll();\n\t      });\n\t      this.options.editor.addListener('beforeSelectionChange', function (codemirror, info) {\n\t        // 当编辑区选中内容改变时，需要展示/隐藏bubble工具栏，并计算工具栏位置\n\t        if (info.origin !== '*mouse' && (info.origin !== null || typeof info.origin === 'undefined')) {\n\t          return true;\n\t        }\n\n\t        if (!info.ranges[0]) {\n\t          return true;\n\t        }\n\n\t        var anchor = info.ranges[0].anchor.line * 1000000 + info.ranges[0].anchor.ch;\n\t        var head = info.ranges[0].head.line * 1000000 + info.ranges[0].head.ch;\n\t        var direction = 'asc';\n\n\t        if (anchor > head) {\n\t          direction = 'desc';\n\t        }\n\n\t        setTimeout$3(function () {\n\t          var selections = codemirror.getSelections();\n\n\t          if (selections.join('').length <= 0) {\n\t            _this.hideBubble();\n\n\t            return;\n\t          }\n\n\t          var selectedObjs = codemirror.getWrapperElement().getElementsByClassName('CodeMirror-selected');\n\n\t          var editorPosition = _this.editorDom.getBoundingClientRect();\n\n\t          var width = 0;\n\t          var top = 0;\n\n\t          if (_typeof(selectedObjs) !== 'object' || selectedObjs.length <= 0) {\n\t            _this.hideBubble();\n\n\t            return;\n\t          }\n\n\t          for (var key = 0; key < selectedObjs.length; key++) {\n\t            var one = selectedObjs[key];\n\t            var position = one.getBoundingClientRect();\n\t            var targetTop = position.top - editorPosition.top;\n\n\t            if (direction === 'asc') {\n\t              if (targetTop >= top) {\n\t                top = targetTop;\n\t                width = position.left - editorPosition.left + position.width / 2;\n\t              }\n\t            } else {\n\t              if (targetTop <= top || top <= 0) {\n\t                top = targetTop;\n\t                width = position.left - editorPosition.left + position.width / 2;\n\t              }\n\t            }\n\t          }\n\n\t          _this.showBubble(top, width);\n\t        }, 10);\n\t      });\n\t    }\n\t  }]);\n\n\t  return Bubble;\n\t}(Toolbar);\n\n\t_defineProperty(Bubble, \"displayType\", 'flex');\n\n\tfunction _createSuper$1p(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$1p(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = construct$4(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\n\tfunction _isNativeReflectConstruct$1p() { if (typeof Reflect === \"undefined\" || !construct$4) return false; if (construct$4.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(construct$4(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\t/**\n\t * 当光标处于编辑器新行起始位置时出现的浮动工具栏\n\t */\n\n\tvar FloatMenu = /*#__PURE__*/function (_Toolbar) {\n\t  _inherits(FloatMenu, _Toolbar);\n\n\t  var _super = _createSuper$1p(FloatMenu);\n\n\t  function FloatMenu() {\n\t    _classCallCheck(this, FloatMenu);\n\n\t    return _super.apply(this, arguments);\n\t  }\n\n\t  _createClass(FloatMenu, [{\n\t    key: \"init\",\n\t    value: // constructor(options) {\n\t    //     super(options);\n\t    // }\n\t    function init() {\n\t      this.editor = this.$cherry.editor;\n\t      this.editorDom = this.editor.getEditorDom();\n\t      this.editorDom.querySelector('.CodeMirror-scroll').appendChild(this.options.dom);\n\t      this.initAction();\n\t    }\n\t  }, {\n\t    key: \"initAction\",\n\t    value: function initAction() {\n\t      var self = this;\n\t      this.editor.addListener('cursorActivity', function (codemirror, evt) {\n\t        // 当编辑区光标位置改变时触发\n\t        self.cursorActivity(evt, codemirror);\n\t      });\n\t      this.editor.addListener('update', function (codemirror, evt) {\n\t        // 当编辑区内容改变时触发\n\t        self.cursorActivity(evt, codemirror);\n\t      });\n\t      this.editor.addListener('refresh', function (codemirror, evt) {\n\t        // 当编辑器刷新时触发\n\t        setTimeout$3(function () {\n\t          self.cursorActivity(evt, codemirror);\n\t        }, 0);\n\t      });\n\t    }\n\t  }, {\n\t    key: \"update\",\n\t    value: function update(evt, codeMirror) {\n\t      var pos = codeMirror.getCursor();\n\n\t      if (this.isHidden(pos.line, codeMirror)) {\n\t        this.options.dom.style.display = 'none';\n\t        return false;\n\t      }\n\n\t      this.options.dom.style.display = 'inline-block';\n\t    }\n\t    /**\n\t     * 当光标激活时触发，当光标处于行起始位置时展示float工具栏；反之隐藏\n\t     * @param {Event} evt\n\t     * @param {CodeMirror.Editor} codeMirror\n\t     * @returns\n\t     */\n\n\t  }, {\n\t    key: \"cursorActivity\",\n\t    value: function cursorActivity(evt, codeMirror) {\n\t      var pos = codeMirror.getCursor();\n\t      var codeMirrorLines = document.querySelector('.cherry-editor .CodeMirror-lines');\n\n\t      if (!codeMirrorLines) {\n\t        return false;\n\t      }\n\n\t      var computedLinesStyle = getComputedStyle(codeMirrorLines);\n\n\t      var codeWrapPaddingLeft = _parseFloat$2(computedLinesStyle.paddingLeft);\n\n\t      var codeWrapPaddingTop = _parseFloat$2(computedLinesStyle.paddingTop); // const cursorHandle = codeMirror.getLineHandle(pos.line);\n\t      // const verticalMiddle = cursorHandle.height * 1 / 2;\n\n\n\t      if (this.isHidden(pos.line, codeMirror)) {\n\t        this.options.dom.style.display = 'none';\n\t        return false;\n\t      }\n\n\t      this.options.dom.style.display = 'inline-block';\n\t      this.options.dom.style.left = \"\".concat(codeWrapPaddingLeft, \"px\");\n\t      this.options.dom.style.top = \"\".concat(this.getLineHeight(pos.line, codeMirror) + codeWrapPaddingTop, \"px\");\n\t    }\n\t    /**\n\t     * 判断是否需要隐藏Float工具栏\n\t     * 有选中内容，或者光标所在行有内容时隐藏float 工具栏\n\t     * @param {number} line\n\t     * @param {CodeMirror.Editor} codeMirror\n\t     * @returns {boolean} 是否需要隐藏float工具栏，true：需要隐藏\n\t     */\n\n\t  }, {\n\t    key: \"isHidden\",\n\t    value: function isHidden(line, codeMirror) {\n\t      var selections = codeMirror.getSelections();\n\n\t      if (selections.length > 1) {\n\t        return true;\n\t      }\n\n\t      var selection = codeMirror.getSelection();\n\n\t      if (selection.length > 0) {\n\t        return true;\n\t      }\n\n\t      if (codeMirror.getLine(line)) {\n\t        return true;\n\t      }\n\n\t      return false;\n\t    }\n\t    /**\n\t     * 获取对应行的行高度，用来让float 工具栏在该行保持垂直居中\n\t     * @param {number} line\n\t     * @param {CodeMirror.Editor} codeMirror\n\t     * @returns\n\t     */\n\n\t  }, {\n\t    key: \"getLineHeight\",\n\t    value: function getLineHeight(line, codeMirror) {\n\t      var height = 0;\n\t      codeMirror.getDoc().eachLine(0, line, function (line) {\n\t        height += line.height;\n\t      });\n\t      return height;\n\t    }\n\t  }]);\n\n\t  return FloatMenu;\n\t}(Toolbar);\n\n\tfunction _createSuper$1q(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$1q(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = construct$4(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\n\tfunction _isNativeReflectConstruct$1q() { if (typeof Reflect === \"undefined\" || !construct$4) return false; if (construct$4.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(construct$4(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\t/**\n\t * 预览区域右侧悬浮的工具栏\n\t * 推荐放置跟编辑区域完全无关的工具栏\n\t *    比如复制预览区域内容、修改预览区域主题等\n\t */\n\n\tvar Sidebar = /*#__PURE__*/function (_Toolbar) {\n\t  _inherits(Sidebar, _Toolbar);\n\n\t  var _super = _createSuper$1q(Sidebar);\n\n\t  function Sidebar() {\n\t    _classCallCheck(this, Sidebar);\n\n\t    return _super.apply(this, arguments);\n\t  }\n\n\t  return _createClass(Sidebar);\n\t}(Toolbar);\n\n\t/**\n\t * This library modifies the diff-patch-match library by Neil Fraser\n\t * by removing the patch and match functionality and certain advanced\n\t * options in the diff function. The original license is as follows:\n\t *\n\t * ===\n\t *\n\t * Diff Match and Patch\n\t *\n\t * Copyright 2006 Google Inc.\n\t * http://code.google.com/p/google-diff-match-patch/\n\t *\n\t * Licensed under the Apache License, Version 2.0 (the \"License\");\n\t * you may not use this file except in compliance with the License.\n\t * You may obtain a copy of the License at\n\t *\n\t *   http://www.apache.org/licenses/LICENSE-2.0\n\t *\n\t * Unless required by applicable law or agreed to in writing, software\n\t * distributed under the License is distributed on an \"AS IS\" BASIS,\n\t * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n\t * See the License for the specific language governing permissions and\n\t * limitations under the License.\n\t */\n\n\n\t/**\n\t * The data structure representing a diff is an array of tuples:\n\t * [[DIFF_DELETE, 'Hello'], [DIFF_INSERT, 'Goodbye'], [DIFF_EQUAL, ' world.']]\n\t * which means: delete 'Hello', add 'Goodbye' and keep ' world.'\n\t */\n\tvar DIFF_DELETE = -1;\n\tvar DIFF_INSERT = 1;\n\tvar DIFF_EQUAL = 0;\n\n\n\t/**\n\t * Find the differences between two texts.  Simplifies the problem by stripping\n\t * any common prefix or suffix off the texts before diffing.\n\t * @param {string} text1 Old string to be diffed.\n\t * @param {string} text2 New string to be diffed.\n\t * @param {Int|Object} [cursor_pos] Edit position in text1 or object with more info\n\t * @return {Array} Array of diff tuples.\n\t */\n\tfunction diff_main(text1, text2, cursor_pos, _fix_unicode) {\n\t  // Check for equality\n\t  if (text1 === text2) {\n\t    if (text1) {\n\t      return [[DIFF_EQUAL, text1]];\n\t    }\n\t    return [];\n\t  }\n\n\t  if (cursor_pos != null) {\n\t    var editdiff = find_cursor_edit_diff(text1, text2, cursor_pos);\n\t    if (editdiff) {\n\t      return editdiff;\n\t    }\n\t  }\n\n\t  // Trim off common prefix (speedup).\n\t  var commonlength = diff_commonPrefix(text1, text2);\n\t  var commonprefix = text1.substring(0, commonlength);\n\t  text1 = text1.substring(commonlength);\n\t  text2 = text2.substring(commonlength);\n\n\t  // Trim off common suffix (speedup).\n\t  commonlength = diff_commonSuffix(text1, text2);\n\t  var commonsuffix = text1.substring(text1.length - commonlength);\n\t  text1 = text1.substring(0, text1.length - commonlength);\n\t  text2 = text2.substring(0, text2.length - commonlength);\n\n\t  // Compute the diff on the middle block.\n\t  var diffs = diff_compute_(text1, text2);\n\n\t  // Restore the prefix and suffix.\n\t  if (commonprefix) {\n\t    diffs.unshift([DIFF_EQUAL, commonprefix]);\n\t  }\n\t  if (commonsuffix) {\n\t    diffs.push([DIFF_EQUAL, commonsuffix]);\n\t  }\n\t  diff_cleanupMerge(diffs, _fix_unicode);\n\t  return diffs;\n\t}\n\n\t/**\n\t * Find the differences between two texts.  Assumes that the texts do not\n\t * have any common prefix or suffix.\n\t * @param {string} text1 Old string to be diffed.\n\t * @param {string} text2 New string to be diffed.\n\t * @return {Array} Array of diff tuples.\n\t */\n\tfunction diff_compute_(text1, text2) {\n\t  var diffs;\n\n\t  if (!text1) {\n\t    // Just add some text (speedup).\n\t    return [[DIFF_INSERT, text2]];\n\t  }\n\n\t  if (!text2) {\n\t    // Just delete some text (speedup).\n\t    return [[DIFF_DELETE, text1]];\n\t  }\n\n\t  var longtext = text1.length > text2.length ? text1 : text2;\n\t  var shorttext = text1.length > text2.length ? text2 : text1;\n\t  var i = longtext.indexOf(shorttext);\n\t  if (i !== -1) {\n\t    // Shorter text is inside the longer text (speedup).\n\t    diffs = [\n\t      [DIFF_INSERT, longtext.substring(0, i)],\n\t      [DIFF_EQUAL, shorttext],\n\t      [DIFF_INSERT, longtext.substring(i + shorttext.length)]\n\t    ];\n\t    // Swap insertions for deletions if diff is reversed.\n\t    if (text1.length > text2.length) {\n\t      diffs[0][0] = diffs[2][0] = DIFF_DELETE;\n\t    }\n\t    return diffs;\n\t  }\n\n\t  if (shorttext.length === 1) {\n\t    // Single character string.\n\t    // After the previous speedup, the character can't be an equality.\n\t    return [[DIFF_DELETE, text1], [DIFF_INSERT, text2]];\n\t  }\n\n\t  // Check to see if the problem can be split in two.\n\t  var hm = diff_halfMatch_(text1, text2);\n\t  if (hm) {\n\t    // A half-match was found, sort out the return data.\n\t    var text1_a = hm[0];\n\t    var text1_b = hm[1];\n\t    var text2_a = hm[2];\n\t    var text2_b = hm[3];\n\t    var mid_common = hm[4];\n\t    // Send both pairs off for separate processing.\n\t    var diffs_a = diff_main(text1_a, text2_a);\n\t    var diffs_b = diff_main(text1_b, text2_b);\n\t    // Merge the results.\n\t    return diffs_a.concat([[DIFF_EQUAL, mid_common]], diffs_b);\n\t  }\n\n\t  return diff_bisect_(text1, text2);\n\t}\n\n\t/**\n\t * Find the 'middle snake' of a diff, split the problem in two\n\t * and return the recursively constructed diff.\n\t * See Myers 1986 paper: An O(ND) Difference Algorithm and Its Variations.\n\t * @param {string} text1 Old string to be diffed.\n\t * @param {string} text2 New string to be diffed.\n\t * @return {Array} Array of diff tuples.\n\t * @private\n\t */\n\tfunction diff_bisect_(text1, text2) {\n\t  // Cache the text lengths to prevent multiple calls.\n\t  var text1_length = text1.length;\n\t  var text2_length = text2.length;\n\t  var max_d = Math.ceil((text1_length + text2_length) / 2);\n\t  var v_offset = max_d;\n\t  var v_length = 2 * max_d;\n\t  var v1 = new Array(v_length);\n\t  var v2 = new Array(v_length);\n\t  // Setting all elements to -1 is faster in Chrome & Firefox than mixing\n\t  // integers and undefined.\n\t  for (var x = 0; x < v_length; x++) {\n\t    v1[x] = -1;\n\t    v2[x] = -1;\n\t  }\n\t  v1[v_offset + 1] = 0;\n\t  v2[v_offset + 1] = 0;\n\t  var delta = text1_length - text2_length;\n\t  // If the total number of characters is odd, then the front path will collide\n\t  // with the reverse path.\n\t  var front = (delta % 2 !== 0);\n\t  // Offsets for start and end of k loop.\n\t  // Prevents mapping of space beyond the grid.\n\t  var k1start = 0;\n\t  var k1end = 0;\n\t  var k2start = 0;\n\t  var k2end = 0;\n\t  for (var d = 0; d < max_d; d++) {\n\t    // Walk the front path one step.\n\t    for (var k1 = -d + k1start; k1 <= d - k1end; k1 += 2) {\n\t      var k1_offset = v_offset + k1;\n\t      var x1;\n\t      if (k1 === -d || (k1 !== d && v1[k1_offset - 1] < v1[k1_offset + 1])) {\n\t        x1 = v1[k1_offset + 1];\n\t      } else {\n\t        x1 = v1[k1_offset - 1] + 1;\n\t      }\n\t      var y1 = x1 - k1;\n\t      while (\n\t        x1 < text1_length && y1 < text2_length &&\n\t        text1.charAt(x1) === text2.charAt(y1)\n\t      ) {\n\t        x1++;\n\t        y1++;\n\t      }\n\t      v1[k1_offset] = x1;\n\t      if (x1 > text1_length) {\n\t        // Ran off the right of the graph.\n\t        k1end += 2;\n\t      } else if (y1 > text2_length) {\n\t        // Ran off the bottom of the graph.\n\t        k1start += 2;\n\t      } else if (front) {\n\t        var k2_offset = v_offset + delta - k1;\n\t        if (k2_offset >= 0 && k2_offset < v_length && v2[k2_offset] !== -1) {\n\t          // Mirror x2 onto top-left coordinate system.\n\t          var x2 = text1_length - v2[k2_offset];\n\t          if (x1 >= x2) {\n\t            // Overlap detected.\n\t            return diff_bisectSplit_(text1, text2, x1, y1);\n\t          }\n\t        }\n\t      }\n\t    }\n\n\t    // Walk the reverse path one step.\n\t    for (var k2 = -d + k2start; k2 <= d - k2end; k2 += 2) {\n\t      var k2_offset = v_offset + k2;\n\t      var x2;\n\t      if (k2 === -d || (k2 !== d && v2[k2_offset - 1] < v2[k2_offset + 1])) {\n\t        x2 = v2[k2_offset + 1];\n\t      } else {\n\t        x2 = v2[k2_offset - 1] + 1;\n\t      }\n\t      var y2 = x2 - k2;\n\t      while (\n\t        x2 < text1_length && y2 < text2_length &&\n\t        text1.charAt(text1_length - x2 - 1) === text2.charAt(text2_length - y2 - 1)\n\t      ) {\n\t        x2++;\n\t        y2++;\n\t      }\n\t      v2[k2_offset] = x2;\n\t      if (x2 > text1_length) {\n\t        // Ran off the left of the graph.\n\t        k2end += 2;\n\t      } else if (y2 > text2_length) {\n\t        // Ran off the top of the graph.\n\t        k2start += 2;\n\t      } else if (!front) {\n\t        var k1_offset = v_offset + delta - k2;\n\t        if (k1_offset >= 0 && k1_offset < v_length && v1[k1_offset] !== -1) {\n\t          var x1 = v1[k1_offset];\n\t          var y1 = v_offset + x1 - k1_offset;\n\t          // Mirror x2 onto top-left coordinate system.\n\t          x2 = text1_length - x2;\n\t          if (x1 >= x2) {\n\t            // Overlap detected.\n\t            return diff_bisectSplit_(text1, text2, x1, y1);\n\t          }\n\t        }\n\t      }\n\t    }\n\t  }\n\t  // Diff took too long and hit the deadline or\n\t  // number of diffs equals number of characters, no commonality at all.\n\t  return [[DIFF_DELETE, text1], [DIFF_INSERT, text2]];\n\t}\n\n\t/**\n\t * Given the location of the 'middle snake', split the diff in two parts\n\t * and recurse.\n\t * @param {string} text1 Old string to be diffed.\n\t * @param {string} text2 New string to be diffed.\n\t * @param {number} x Index of split point in text1.\n\t * @param {number} y Index of split point in text2.\n\t * @return {Array} Array of diff tuples.\n\t */\n\tfunction diff_bisectSplit_(text1, text2, x, y) {\n\t  var text1a = text1.substring(0, x);\n\t  var text2a = text2.substring(0, y);\n\t  var text1b = text1.substring(x);\n\t  var text2b = text2.substring(y);\n\n\t  // Compute both diffs serially.\n\t  var diffs = diff_main(text1a, text2a);\n\t  var diffsb = diff_main(text1b, text2b);\n\n\t  return diffs.concat(diffsb);\n\t}\n\n\t/**\n\t * Determine the common prefix of two strings.\n\t * @param {string} text1 First string.\n\t * @param {string} text2 Second string.\n\t * @return {number} The number of characters common to the start of each\n\t *     string.\n\t */\n\tfunction diff_commonPrefix(text1, text2) {\n\t  // Quick check for common null cases.\n\t  if (!text1 || !text2 || text1.charAt(0) !== text2.charAt(0)) {\n\t    return 0;\n\t  }\n\t  // Binary search.\n\t  // Performance analysis: http://neil.fraser.name/news/2007/10/09/\n\t  var pointermin = 0;\n\t  var pointermax = Math.min(text1.length, text2.length);\n\t  var pointermid = pointermax;\n\t  var pointerstart = 0;\n\t  while (pointermin < pointermid) {\n\t    if (\n\t      text1.substring(pointerstart, pointermid) ==\n\t      text2.substring(pointerstart, pointermid)\n\t    ) {\n\t      pointermin = pointermid;\n\t      pointerstart = pointermin;\n\t    } else {\n\t      pointermax = pointermid;\n\t    }\n\t    pointermid = Math.floor((pointermax - pointermin) / 2 + pointermin);\n\t  }\n\n\t  if (is_surrogate_pair_start(text1.charCodeAt(pointermid - 1))) {\n\t    pointermid--;\n\t  }\n\n\t  return pointermid;\n\t}\n\n\t/**\n\t * Determine the common suffix of two strings.\n\t * @param {string} text1 First string.\n\t * @param {string} text2 Second string.\n\t * @return {number} The number of characters common to the end of each string.\n\t */\n\tfunction diff_commonSuffix(text1, text2) {\n\t  // Quick check for common null cases.\n\t  if (!text1 || !text2 || text1.slice(-1) !== text2.slice(-1)) {\n\t    return 0;\n\t  }\n\t  // Binary search.\n\t  // Performance analysis: http://neil.fraser.name/news/2007/10/09/\n\t  var pointermin = 0;\n\t  var pointermax = Math.min(text1.length, text2.length);\n\t  var pointermid = pointermax;\n\t  var pointerend = 0;\n\t  while (pointermin < pointermid) {\n\t    if (\n\t      text1.substring(text1.length - pointermid, text1.length - pointerend) ==\n\t      text2.substring(text2.length - pointermid, text2.length - pointerend)\n\t    ) {\n\t      pointermin = pointermid;\n\t      pointerend = pointermin;\n\t    } else {\n\t      pointermax = pointermid;\n\t    }\n\t    pointermid = Math.floor((pointermax - pointermin) / 2 + pointermin);\n\t  }\n\n\t  if (is_surrogate_pair_end(text1.charCodeAt(text1.length - pointermid))) {\n\t    pointermid--;\n\t  }\n\n\t  return pointermid;\n\t}\n\n\t/**\n\t * Do the two texts share a substring which is at least half the length of the\n\t * longer text?\n\t * This speedup can produce non-minimal diffs.\n\t * @param {string} text1 First string.\n\t * @param {string} text2 Second string.\n\t * @return {Array.<string>} Five element Array, containing the prefix of\n\t *     text1, the suffix of text1, the prefix of text2, the suffix of\n\t *     text2 and the common middle.  Or null if there was no match.\n\t */\n\tfunction diff_halfMatch_(text1, text2) {\n\t  var longtext = text1.length > text2.length ? text1 : text2;\n\t  var shorttext = text1.length > text2.length ? text2 : text1;\n\t  if (longtext.length < 4 || shorttext.length * 2 < longtext.length) {\n\t    return null;  // Pointless.\n\t  }\n\n\t  /**\n\t   * Does a substring of shorttext exist within longtext such that the substring\n\t   * is at least half the length of longtext?\n\t   * Closure, but does not reference any external variables.\n\t   * @param {string} longtext Longer string.\n\t   * @param {string} shorttext Shorter string.\n\t   * @param {number} i Start index of quarter length substring within longtext.\n\t   * @return {Array.<string>} Five element Array, containing the prefix of\n\t   *     longtext, the suffix of longtext, the prefix of shorttext, the suffix\n\t   *     of shorttext and the common middle.  Or null if there was no match.\n\t   * @private\n\t   */\n\t  function diff_halfMatchI_(longtext, shorttext, i) {\n\t    // Start with a 1/4 length substring at position i as a seed.\n\t    var seed = longtext.substring(i, i + Math.floor(longtext.length / 4));\n\t    var j = -1;\n\t    var best_common = '';\n\t    var best_longtext_a, best_longtext_b, best_shorttext_a, best_shorttext_b;\n\t    while ((j = shorttext.indexOf(seed, j + 1)) !== -1) {\n\t      var prefixLength = diff_commonPrefix(\n\t        longtext.substring(i), shorttext.substring(j));\n\t      var suffixLength = diff_commonSuffix(\n\t        longtext.substring(0, i), shorttext.substring(0, j));\n\t      if (best_common.length < suffixLength + prefixLength) {\n\t        best_common = shorttext.substring(\n\t          j - suffixLength, j) + shorttext.substring(j, j + prefixLength);\n\t        best_longtext_a = longtext.substring(0, i - suffixLength);\n\t        best_longtext_b = longtext.substring(i + prefixLength);\n\t        best_shorttext_a = shorttext.substring(0, j - suffixLength);\n\t        best_shorttext_b = shorttext.substring(j + prefixLength);\n\t      }\n\t    }\n\t    if (best_common.length * 2 >= longtext.length) {\n\t      return [\n\t        best_longtext_a, best_longtext_b,\n\t        best_shorttext_a, best_shorttext_b, best_common\n\t      ];\n\t    } else {\n\t      return null;\n\t    }\n\t  }\n\n\t  // First check if the second quarter is the seed for a half-match.\n\t  var hm1 = diff_halfMatchI_(longtext, shorttext, Math.ceil(longtext.length / 4));\n\t  // Check again based on the third quarter.\n\t  var hm2 = diff_halfMatchI_(longtext, shorttext, Math.ceil(longtext.length / 2));\n\t  var hm;\n\t  if (!hm1 && !hm2) {\n\t    return null;\n\t  } else if (!hm2) {\n\t    hm = hm1;\n\t  } else if (!hm1) {\n\t    hm = hm2;\n\t  } else {\n\t    // Both matched.  Select the longest.\n\t    hm = hm1[4].length > hm2[4].length ? hm1 : hm2;\n\t  }\n\n\t  // A half-match was found, sort out the return data.\n\t  var text1_a, text1_b, text2_a, text2_b;\n\t  if (text1.length > text2.length) {\n\t    text1_a = hm[0];\n\t    text1_b = hm[1];\n\t    text2_a = hm[2];\n\t    text2_b = hm[3];\n\t  } else {\n\t    text2_a = hm[0];\n\t    text2_b = hm[1];\n\t    text1_a = hm[2];\n\t    text1_b = hm[3];\n\t  }\n\t  var mid_common = hm[4];\n\t  return [text1_a, text1_b, text2_a, text2_b, mid_common];\n\t}\n\n\t/**\n\t * Reorder and merge like edit sections.  Merge equalities.\n\t * Any edit section can move as long as it doesn't cross an equality.\n\t * @param {Array} diffs Array of diff tuples.\n\t * @param {boolean} fix_unicode Whether to normalize to a unicode-correct diff\n\t */\n\tfunction diff_cleanupMerge(diffs, fix_unicode) {\n\t  diffs.push([DIFF_EQUAL, '']);  // Add a dummy entry at the end.\n\t  var pointer = 0;\n\t  var count_delete = 0;\n\t  var count_insert = 0;\n\t  var text_delete = '';\n\t  var text_insert = '';\n\t  var commonlength;\n\t  while (pointer < diffs.length) {\n\t    if (pointer < diffs.length - 1 && !diffs[pointer][1]) {\n\t      diffs.splice(pointer, 1);\n\t      continue;\n\t    }\n\t    switch (diffs[pointer][0]) {\n\t      case DIFF_INSERT:\n\n\t        count_insert++;\n\t        text_insert += diffs[pointer][1];\n\t        pointer++;\n\t        break;\n\t      case DIFF_DELETE:\n\t        count_delete++;\n\t        text_delete += diffs[pointer][1];\n\t        pointer++;\n\t        break;\n\t      case DIFF_EQUAL:\n\t        var previous_equality = pointer - count_insert - count_delete - 1;\n\t        if (fix_unicode) {\n\t          // prevent splitting of unicode surrogate pairs.  when fix_unicode is true,\n\t          // we assume that the old and new text in the diff are complete and correct\n\t          // unicode-encoded JS strings, but the tuple boundaries may fall between\n\t          // surrogate pairs.  we fix this by shaving off stray surrogates from the end\n\t          // of the previous equality and the beginning of this equality.  this may create\n\t          // empty equalities or a common prefix or suffix.  for example, if AB and AC are\n\t          // emojis, `[[0, 'A'], [-1, 'BA'], [0, 'C']]` would turn into deleting 'ABAC' and\n\t          // inserting 'AC', and then the common suffix 'AC' will be eliminated.  in this\n\t          // particular case, both equalities go away, we absorb any previous inequalities,\n\t          // and we keep scanning for the next equality before rewriting the tuples.\n\t          if (previous_equality >= 0 && ends_with_pair_start(diffs[previous_equality][1])) {\n\t            var stray = diffs[previous_equality][1].slice(-1);\n\t            diffs[previous_equality][1] = diffs[previous_equality][1].slice(0, -1);\n\t            text_delete = stray + text_delete;\n\t            text_insert = stray + text_insert;\n\t            if (!diffs[previous_equality][1]) {\n\t              // emptied out previous equality, so delete it and include previous delete/insert\n\t              diffs.splice(previous_equality, 1);\n\t              pointer--;\n\t              var k = previous_equality - 1;\n\t              if (diffs[k] && diffs[k][0] === DIFF_INSERT) {\n\t                count_insert++;\n\t                text_insert = diffs[k][1] + text_insert;\n\t                k--;\n\t              }\n\t              if (diffs[k] && diffs[k][0] === DIFF_DELETE) {\n\t                count_delete++;\n\t                text_delete = diffs[k][1] + text_delete;\n\t                k--;\n\t              }\n\t              previous_equality = k;\n\t            }\n\t          }\n\t          if (starts_with_pair_end(diffs[pointer][1])) {\n\t            var stray = diffs[pointer][1].charAt(0);\n\t            diffs[pointer][1] = diffs[pointer][1].slice(1);\n\t            text_delete += stray;\n\t            text_insert += stray;\n\t          }\n\t        }\n\t        if (pointer < diffs.length - 1 && !diffs[pointer][1]) {\n\t          // for empty equality not at end, wait for next equality\n\t          diffs.splice(pointer, 1);\n\t          break;\n\t        }\n\t        if (text_delete.length > 0 || text_insert.length > 0) {\n\t          // note that diff_commonPrefix and diff_commonSuffix are unicode-aware\n\t          if (text_delete.length > 0 && text_insert.length > 0) {\n\t            // Factor out any common prefixes.\n\t            commonlength = diff_commonPrefix(text_insert, text_delete);\n\t            if (commonlength !== 0) {\n\t              if (previous_equality >= 0) {\n\t                diffs[previous_equality][1] += text_insert.substring(0, commonlength);\n\t              } else {\n\t                diffs.splice(0, 0, [DIFF_EQUAL, text_insert.substring(0, commonlength)]);\n\t                pointer++;\n\t              }\n\t              text_insert = text_insert.substring(commonlength);\n\t              text_delete = text_delete.substring(commonlength);\n\t            }\n\t            // Factor out any common suffixes.\n\t            commonlength = diff_commonSuffix(text_insert, text_delete);\n\t            if (commonlength !== 0) {\n\t              diffs[pointer][1] =\n\t                text_insert.substring(text_insert.length - commonlength) + diffs[pointer][1];\n\t              text_insert = text_insert.substring(0, text_insert.length - commonlength);\n\t              text_delete = text_delete.substring(0, text_delete.length - commonlength);\n\t            }\n\t          }\n\t          // Delete the offending records and add the merged ones.\n\t          var n = count_insert + count_delete;\n\t          if (text_delete.length === 0 && text_insert.length === 0) {\n\t            diffs.splice(pointer - n, n);\n\t            pointer = pointer - n;\n\t          } else if (text_delete.length === 0) {\n\t            diffs.splice(pointer - n, n, [DIFF_INSERT, text_insert]);\n\t            pointer = pointer - n + 1;\n\t          } else if (text_insert.length === 0) {\n\t            diffs.splice(pointer - n, n, [DIFF_DELETE, text_delete]);\n\t            pointer = pointer - n + 1;\n\t          } else {\n\t            diffs.splice(pointer - n, n, [DIFF_DELETE, text_delete], [DIFF_INSERT, text_insert]);\n\t            pointer = pointer - n + 2;\n\t          }\n\t        }\n\t        if (pointer !== 0 && diffs[pointer - 1][0] === DIFF_EQUAL) {\n\t          // Merge this equality with the previous one.\n\t          diffs[pointer - 1][1] += diffs[pointer][1];\n\t          diffs.splice(pointer, 1);\n\t        } else {\n\t          pointer++;\n\t        }\n\t        count_insert = 0;\n\t        count_delete = 0;\n\t        text_delete = '';\n\t        text_insert = '';\n\t        break;\n\t    }\n\t  }\n\t  if (diffs[diffs.length - 1][1] === '') {\n\t    diffs.pop();  // Remove the dummy entry at the end.\n\t  }\n\n\t  // Second pass: look for single edits surrounded on both sides by equalities\n\t  // which can be shifted sideways to eliminate an equality.\n\t  // e.g: A<ins>BA</ins>C -> <ins>AB</ins>AC\n\t  var changes = false;\n\t  pointer = 1;\n\t  // Intentionally ignore the first and last element (don't need checking).\n\t  while (pointer < diffs.length - 1) {\n\t    if (diffs[pointer - 1][0] === DIFF_EQUAL &&\n\t      diffs[pointer + 1][0] === DIFF_EQUAL) {\n\t      // This is a single edit surrounded by equalities.\n\t      if (diffs[pointer][1].substring(diffs[pointer][1].length -\n\t        diffs[pointer - 1][1].length) === diffs[pointer - 1][1]) {\n\t        // Shift the edit over the previous equality.\n\t        diffs[pointer][1] = diffs[pointer - 1][1] +\n\t          diffs[pointer][1].substring(0, diffs[pointer][1].length -\n\t            diffs[pointer - 1][1].length);\n\t        diffs[pointer + 1][1] = diffs[pointer - 1][1] + diffs[pointer + 1][1];\n\t        diffs.splice(pointer - 1, 1);\n\t        changes = true;\n\t      } else if (diffs[pointer][1].substring(0, diffs[pointer + 1][1].length) ==\n\t        diffs[pointer + 1][1]) {\n\t        // Shift the edit over the next equality.\n\t        diffs[pointer - 1][1] += diffs[pointer + 1][1];\n\t        diffs[pointer][1] =\n\t          diffs[pointer][1].substring(diffs[pointer + 1][1].length) +\n\t          diffs[pointer + 1][1];\n\t        diffs.splice(pointer + 1, 1);\n\t        changes = true;\n\t      }\n\t    }\n\t    pointer++;\n\t  }\n\t  // If shifts were made, the diff needs reordering and another shift sweep.\n\t  if (changes) {\n\t    diff_cleanupMerge(diffs, fix_unicode);\n\t  }\n\t}\n\tfunction is_surrogate_pair_start(charCode) {\n\t  return charCode >= 0xD800 && charCode <= 0xDBFF;\n\t}\n\n\tfunction is_surrogate_pair_end(charCode) {\n\t  return charCode >= 0xDC00 && charCode <= 0xDFFF;\n\t}\n\n\tfunction starts_with_pair_end(str) {\n\t  return is_surrogate_pair_end(str.charCodeAt(0));\n\t}\n\n\tfunction ends_with_pair_start(str) {\n\t  return is_surrogate_pair_start(str.charCodeAt(str.length - 1));\n\t}\n\n\tfunction remove_empty_tuples(tuples) {\n\t  var ret = [];\n\t  for (var i = 0; i < tuples.length; i++) {\n\t    if (tuples[i][1].length > 0) {\n\t      ret.push(tuples[i]);\n\t    }\n\t  }\n\t  return ret;\n\t}\n\n\tfunction make_edit_splice(before, oldMiddle, newMiddle, after) {\n\t  if (ends_with_pair_start(before) || starts_with_pair_end(after)) {\n\t    return null;\n\t  }\n\t  return remove_empty_tuples([\n\t    [DIFF_EQUAL, before],\n\t    [DIFF_DELETE, oldMiddle],\n\t    [DIFF_INSERT, newMiddle],\n\t    [DIFF_EQUAL, after]\n\t  ]);\n\t}\n\n\tfunction find_cursor_edit_diff(oldText, newText, cursor_pos) {\n\t  // note: this runs after equality check has ruled out exact equality\n\t  var oldRange = typeof cursor_pos === 'number' ?\n\t    { index: cursor_pos, length: 0 } : cursor_pos.oldRange;\n\t  var newRange = typeof cursor_pos === 'number' ?\n\t    null : cursor_pos.newRange;\n\t  // take into account the old and new selection to generate the best diff\n\t  // possible for a text edit.  for example, a text change from \"xxx\" to \"xx\"\n\t  // could be a delete or forwards-delete of any one of the x's, or the\n\t  // result of selecting two of the x's and typing \"x\".\n\t  var oldLength = oldText.length;\n\t  var newLength = newText.length;\n\t  if (oldRange.length === 0 && (newRange === null || newRange.length === 0)) {\n\t    // see if we have an insert or delete before or after cursor\n\t    var oldCursor = oldRange.index;\n\t    var oldBefore = oldText.slice(0, oldCursor);\n\t    var oldAfter = oldText.slice(oldCursor);\n\t    var maybeNewCursor = newRange ? newRange.index : null;\n\t    editBefore: {\n\t      // is this an insert or delete right before oldCursor?\n\t      var newCursor = oldCursor + newLength - oldLength;\n\t      if (maybeNewCursor !== null && maybeNewCursor !== newCursor) {\n\t        break editBefore;\n\t      }\n\t      if (newCursor < 0 || newCursor > newLength) {\n\t        break editBefore;\n\t      }\n\t      var newBefore = newText.slice(0, newCursor);\n\t      var newAfter = newText.slice(newCursor);\n\t      if (newAfter !== oldAfter) {\n\t        break editBefore;\n\t      }\n\t      var prefixLength = Math.min(oldCursor, newCursor);\n\t      var oldPrefix = oldBefore.slice(0, prefixLength);\n\t      var newPrefix = newBefore.slice(0, prefixLength);\n\t      if (oldPrefix !== newPrefix) {\n\t        break editBefore;\n\t      }\n\t      var oldMiddle = oldBefore.slice(prefixLength);\n\t      var newMiddle = newBefore.slice(prefixLength);\n\t      return make_edit_splice(oldPrefix, oldMiddle, newMiddle, oldAfter);\n\t    }\n\t    editAfter: {\n\t      // is this an insert or delete right after oldCursor?\n\t      if (maybeNewCursor !== null && maybeNewCursor !== oldCursor) {\n\t        break editAfter;\n\t      }\n\t      var cursor = oldCursor;\n\t      var newBefore = newText.slice(0, cursor);\n\t      var newAfter = newText.slice(cursor);\n\t      if (newBefore !== oldBefore) {\n\t        break editAfter;\n\t      }\n\t      var suffixLength = Math.min(oldLength - cursor, newLength - cursor);\n\t      var oldSuffix = oldAfter.slice(oldAfter.length - suffixLength);\n\t      var newSuffix = newAfter.slice(newAfter.length - suffixLength);\n\t      if (oldSuffix !== newSuffix) {\n\t        break editAfter;\n\t      }\n\t      var oldMiddle = oldAfter.slice(0, oldAfter.length - suffixLength);\n\t      var newMiddle = newAfter.slice(0, newAfter.length - suffixLength);\n\t      return make_edit_splice(oldBefore, oldMiddle, newMiddle, oldSuffix);\n\t    }\n\t  }\n\t  if (oldRange.length > 0 && newRange && newRange.length === 0) {\n\t    replaceRange: {\n\t      // see if diff could be a splice of the old selection range\n\t      var oldPrefix = oldText.slice(0, oldRange.index);\n\t      var oldSuffix = oldText.slice(oldRange.index + oldRange.length);\n\t      var prefixLength = oldPrefix.length;\n\t      var suffixLength = oldSuffix.length;\n\t      if (newLength < prefixLength + suffixLength) {\n\t        break replaceRange;\n\t      }\n\t      var newPrefix = newText.slice(0, prefixLength);\n\t      var newSuffix = newText.slice(newLength - suffixLength);\n\t      if (oldPrefix !== newPrefix || oldSuffix !== newSuffix) {\n\t        break replaceRange;\n\t      }\n\t      var oldMiddle = oldText.slice(prefixLength, oldLength - suffixLength);\n\t      var newMiddle = newText.slice(prefixLength, newLength - suffixLength);\n\t      return make_edit_splice(oldPrefix, oldMiddle, newMiddle, oldSuffix);\n\t    }\n\t  }\n\n\t  return null;\n\t}\n\n\tfunction diff$1(text1, text2, cursor_pos) {\n\t  // only pass fix_unicode=true at the top level, not when diff_main is\n\t  // recursively invoked\n\t  return diff_main(text1, text2, cursor_pos, true);\n\t}\n\n\tdiff$1.INSERT = DIFF_INSERT;\n\tdiff$1.DELETE = DIFF_DELETE;\n\tdiff$1.EQUAL = DIFF_EQUAL;\n\n\tvar diff_1$2 = diff$1;\n\n\t/**\n\t * Copyright (C) 2021 THL A29 Limited, a Tencent company.\n\t *\n\t * Licensed under the Apache License, Version 2.0 (the \"License\");\n\t * you may not use this file except in compliance with the License.\n\t * You may obtain a copy of the License at\n\t *\n\t *     http://www.apache.org/licenses/LICENSE-2.0\n\t *\n\t * Unless required by applicable law or agreed to in writing, software\n\t * distributed under the License is distributed on an \"AS IS\" BASIS,\n\t * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n\t * See the License for the specific language governing permissions and\n\t * limitations under the License.\n\t */\n\t/**\n\t * 更新内容时保持光标不变\n\t * @param {Number} pos 光标相对文档开头的偏移量\n\t * @param {String} oldContent 变更前的内容\n\t * @param {String} newContent 变更后的内容\n\t * @returns {Number} newPos 新的光标偏移量\n\t */\n\n\tfunction getPosBydiffs(pos, oldContent, newContent) {\n\t  var diffs = diff_1$2(oldContent, newContent);\n\t  var newPos = pos;\n\t  var tmpPos = pos;\n\n\t  for (var i = 0; i < diffs.length; i++) {\n\t    var val = diffs[i];\n\n\t    if (tmpPos <= 0) {\n\t      return newPos;\n\t    }\n\n\t    var opType = val[0];\n\t    var opLength = val[1].length;\n\n\t    switch (opType) {\n\t      // 没有改变的内容\n\t      case diff_1$2.EQUAL:\n\t        if (tmpPos <= opLength) {\n\t          return newPos;\n\t        }\n\n\t        tmpPos -= opLength;\n\t        break;\n\t      // 删除的内容\n\n\t      case diff_1$2.DELETE:\n\t        if (tmpPos <= opLength) {\n\t          return newPos - opLength + tmpPos;\n\t        }\n\n\t        tmpPos -= opLength;\n\t        newPos -= opLength;\n\t        break;\n\t      // 新增的内容\n\n\t      case diff_1$2.INSERT:\n\t        newPos += opLength;\n\t        break;\n\t    }\n\t  }\n\n\t  return newPos;\n\t}\n\n\t/**\n\t * A specialized version of `_.forEach` for arrays without support for\n\t * iteratee shorthands.\n\t *\n\t * @private\n\t * @param {Array} [array] The array to iterate over.\n\t * @param {Function} iteratee The function invoked per iteration.\n\t * @returns {Array} Returns `array`.\n\t */\n\tfunction arrayEach(array, iteratee) {\n\t  var index = -1,\n\t      length = array == null ? 0 : array.length;\n\n\t  while (++index < length) {\n\t    if (iteratee(array[index], index, array) === false) {\n\t      break;\n\t    }\n\t  }\n\t  return array;\n\t}\n\n\tvar _arrayEach = arrayEach;\n\n\t/* Built-in method references for those with the same name as other `lodash` methods. */\n\tvar nativeKeys = _overArg(Object.keys, Object);\n\n\tvar _nativeKeys = nativeKeys;\n\n\t/** Used for built-in method references. */\n\tvar objectProto$b = Object.prototype;\n\n\t/** Used to check objects for own properties. */\n\tvar hasOwnProperty$a = objectProto$b.hasOwnProperty;\n\n\t/**\n\t * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.\n\t *\n\t * @private\n\t * @param {Object} object The object to query.\n\t * @returns {Array} Returns the array of property names.\n\t */\n\tfunction baseKeys(object) {\n\t  if (!_isPrototype(object)) {\n\t    return _nativeKeys(object);\n\t  }\n\t  var result = [];\n\t  for (var key in Object(object)) {\n\t    if (hasOwnProperty$a.call(object, key) && key != 'constructor') {\n\t      result.push(key);\n\t    }\n\t  }\n\t  return result;\n\t}\n\n\tvar _baseKeys = baseKeys;\n\n\t/**\n\t * Creates an array of the own enumerable property names of `object`.\n\t *\n\t * **Note:** Non-object values are coerced to objects. See the\n\t * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n\t * for more details.\n\t *\n\t * @static\n\t * @since 0.1.0\n\t * @memberOf _\n\t * @category Object\n\t * @param {Object} object The object to query.\n\t * @returns {Array} Returns the array of property names.\n\t * @example\n\t *\n\t * function Foo() {\n\t *   this.a = 1;\n\t *   this.b = 2;\n\t * }\n\t *\n\t * Foo.prototype.c = 3;\n\t *\n\t * _.keys(new Foo);\n\t * // => ['a', 'b'] (iteration order is not guaranteed)\n\t *\n\t * _.keys('hi');\n\t * // => ['0', '1']\n\t */\n\tfunction keys$8(object) {\n\t  return isArrayLike_1(object) ? _arrayLikeKeys(object) : _baseKeys(object);\n\t}\n\n\tvar keys_1 = keys$8;\n\n\t/**\n\t * The base implementation of `_.assign` without support for multiple sources\n\t * or `customizer` functions.\n\t *\n\t * @private\n\t * @param {Object} object The destination object.\n\t * @param {Object} source The source object.\n\t * @returns {Object} Returns `object`.\n\t */\n\tfunction baseAssign(object, source) {\n\t  return object && _copyObject(source, keys_1(source), object);\n\t}\n\n\tvar _baseAssign = baseAssign;\n\n\t/**\n\t * The base implementation of `_.assignIn` without support for multiple sources\n\t * or `customizer` functions.\n\t *\n\t * @private\n\t * @param {Object} object The destination object.\n\t * @param {Object} source The source object.\n\t * @returns {Object} Returns `object`.\n\t */\n\tfunction baseAssignIn(object, source) {\n\t  return object && _copyObject(source, keysIn_1(source), object);\n\t}\n\n\tvar _baseAssignIn = baseAssignIn;\n\n\t/**\n\t * A specialized version of `_.filter` for arrays without support for\n\t * iteratee shorthands.\n\t *\n\t * @private\n\t * @param {Array} [array] The array to iterate over.\n\t * @param {Function} predicate The function invoked per iteration.\n\t * @returns {Array} Returns the new filtered array.\n\t */\n\tfunction arrayFilter(array, predicate) {\n\t  var index = -1,\n\t      length = array == null ? 0 : array.length,\n\t      resIndex = 0,\n\t      result = [];\n\n\t  while (++index < length) {\n\t    var value = array[index];\n\t    if (predicate(value, index, array)) {\n\t      result[resIndex++] = value;\n\t    }\n\t  }\n\t  return result;\n\t}\n\n\tvar _arrayFilter = arrayFilter;\n\n\t/**\n\t * This method returns a new empty array.\n\t *\n\t * @static\n\t * @memberOf _\n\t * @since 4.13.0\n\t * @category Util\n\t * @returns {Array} Returns the new empty array.\n\t * @example\n\t *\n\t * var arrays = _.times(2, _.stubArray);\n\t *\n\t * console.log(arrays);\n\t * // => [[], []]\n\t *\n\t * console.log(arrays[0] === arrays[1]);\n\t * // => false\n\t */\n\tfunction stubArray() {\n\t  return [];\n\t}\n\n\tvar stubArray_1 = stubArray;\n\n\t/** Used for built-in method references. */\n\tvar objectProto$c = Object.prototype;\n\n\t/** Built-in value references. */\n\tvar propertyIsEnumerable$2 = objectProto$c.propertyIsEnumerable;\n\n\t/* Built-in method references for those with the same name as other `lodash` methods. */\n\tvar nativeGetSymbols = Object.getOwnPropertySymbols;\n\n\t/**\n\t * Creates an array of the own enumerable symbols of `object`.\n\t *\n\t * @private\n\t * @param {Object} object The object to query.\n\t * @returns {Array} Returns the array of symbols.\n\t */\n\tvar getSymbols = !nativeGetSymbols ? stubArray_1 : function(object) {\n\t  if (object == null) {\n\t    return [];\n\t  }\n\t  object = Object(object);\n\t  return _arrayFilter(nativeGetSymbols(object), function(symbol) {\n\t    return propertyIsEnumerable$2.call(object, symbol);\n\t  });\n\t};\n\n\tvar _getSymbols = getSymbols;\n\n\t/**\n\t * Copies own symbols of `source` to `object`.\n\t *\n\t * @private\n\t * @param {Object} source The object to copy symbols from.\n\t * @param {Object} [object={}] The object to copy symbols to.\n\t * @returns {Object} Returns `object`.\n\t */\n\tfunction copySymbols(source, object) {\n\t  return _copyObject(source, _getSymbols(source), object);\n\t}\n\n\tvar _copySymbols = copySymbols;\n\n\t/**\n\t * Appends the elements of `values` to `array`.\n\t *\n\t * @private\n\t * @param {Array} array The array to modify.\n\t * @param {Array} values The values to append.\n\t * @returns {Array} Returns `array`.\n\t */\n\tfunction arrayPush(array, values) {\n\t  var index = -1,\n\t      length = values.length,\n\t      offset = array.length;\n\n\t  while (++index < length) {\n\t    array[offset + index] = values[index];\n\t  }\n\t  return array;\n\t}\n\n\tvar _arrayPush = arrayPush;\n\n\t/* Built-in method references for those with the same name as other `lodash` methods. */\n\tvar nativeGetSymbols$1 = Object.getOwnPropertySymbols;\n\n\t/**\n\t * Creates an array of the own and inherited enumerable symbols of `object`.\n\t *\n\t * @private\n\t * @param {Object} object The object to query.\n\t * @returns {Array} Returns the array of symbols.\n\t */\n\tvar getSymbolsIn = !nativeGetSymbols$1 ? stubArray_1 : function(object) {\n\t  var result = [];\n\t  while (object) {\n\t    _arrayPush(result, _getSymbols(object));\n\t    object = _getPrototype(object);\n\t  }\n\t  return result;\n\t};\n\n\tvar _getSymbolsIn = getSymbolsIn;\n\n\t/**\n\t * Copies own and inherited symbols of `source` to `object`.\n\t *\n\t * @private\n\t * @param {Object} source The object to copy symbols from.\n\t * @param {Object} [object={}] The object to copy symbols to.\n\t * @returns {Object} Returns `object`.\n\t */\n\tfunction copySymbolsIn(source, object) {\n\t  return _copyObject(source, _getSymbolsIn(source), object);\n\t}\n\n\tvar _copySymbolsIn = copySymbolsIn;\n\n\t/**\n\t * The base implementation of `getAllKeys` and `getAllKeysIn` which uses\n\t * `keysFunc` and `symbolsFunc` to get the enumerable property names and\n\t * symbols of `object`.\n\t *\n\t * @private\n\t * @param {Object} object The object to query.\n\t * @param {Function} keysFunc The function to get the keys of `object`.\n\t * @param {Function} symbolsFunc The function to get the symbols of `object`.\n\t * @returns {Array} Returns the array of property names and symbols.\n\t */\n\tfunction baseGetAllKeys(object, keysFunc, symbolsFunc) {\n\t  var result = keysFunc(object);\n\t  return isArray_1(object) ? result : _arrayPush(result, symbolsFunc(object));\n\t}\n\n\tvar _baseGetAllKeys = baseGetAllKeys;\n\n\t/**\n\t * Creates an array of own enumerable property names and symbols of `object`.\n\t *\n\t * @private\n\t * @param {Object} object The object to query.\n\t * @returns {Array} Returns the array of property names and symbols.\n\t */\n\tfunction getAllKeys(object) {\n\t  return _baseGetAllKeys(object, keys_1, _getSymbols);\n\t}\n\n\tvar _getAllKeys = getAllKeys;\n\n\t/**\n\t * Creates an array of own and inherited enumerable property names and\n\t * symbols of `object`.\n\t *\n\t * @private\n\t * @param {Object} object The object to query.\n\t * @returns {Array} Returns the array of property names and symbols.\n\t */\n\tfunction getAllKeysIn(object) {\n\t  return _baseGetAllKeys(object, keysIn_1, _getSymbolsIn);\n\t}\n\n\tvar _getAllKeysIn = getAllKeysIn;\n\n\t/* Built-in method references that are verified to be native. */\n\tvar DataView$1 = _getNative(_root, 'DataView');\n\n\tvar _DataView = DataView$1;\n\n\t/* Built-in method references that are verified to be native. */\n\tvar Promise$2 = _getNative(_root, 'Promise');\n\n\tvar _Promise = Promise$2;\n\n\t/* Built-in method references that are verified to be native. */\n\tvar Set$1 = _getNative(_root, 'Set');\n\n\tvar _Set = Set$1;\n\n\t/* Built-in method references that are verified to be native. */\n\tvar WeakMap$2 = _getNative(_root, 'WeakMap');\n\n\tvar _WeakMap = WeakMap$2;\n\n\t/** `Object#toString` result references. */\n\tvar mapTag$1 = '[object Map]',\n\t    objectTag$2 = '[object Object]',\n\t    promiseTag = '[object Promise]',\n\t    setTag$1 = '[object Set]',\n\t    weakMapTag$1 = '[object WeakMap]';\n\n\tvar dataViewTag$1 = '[object DataView]';\n\n\t/** Used to detect maps, sets, and weakmaps. */\n\tvar dataViewCtorString = _toSource(_DataView),\n\t    mapCtorString = _toSource(_Map),\n\t    promiseCtorString = _toSource(_Promise),\n\t    setCtorString = _toSource(_Set),\n\t    weakMapCtorString = _toSource(_WeakMap);\n\n\t/**\n\t * Gets the `toStringTag` of `value`.\n\t *\n\t * @private\n\t * @param {*} value The value to query.\n\t * @returns {string} Returns the `toStringTag`.\n\t */\n\tvar getTag = _baseGetTag;\n\n\t// Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.\n\tif ((_DataView && getTag(new _DataView(new ArrayBuffer(1))) != dataViewTag$1) ||\n\t    (_Map && getTag(new _Map) != mapTag$1) ||\n\t    (_Promise && getTag(_Promise.resolve()) != promiseTag) ||\n\t    (_Set && getTag(new _Set) != setTag$1) ||\n\t    (_WeakMap && getTag(new _WeakMap) != weakMapTag$1)) {\n\t  getTag = function(value) {\n\t    var result = _baseGetTag(value),\n\t        Ctor = result == objectTag$2 ? value.constructor : undefined,\n\t        ctorString = Ctor ? _toSource(Ctor) : '';\n\n\t    if (ctorString) {\n\t      switch (ctorString) {\n\t        case dataViewCtorString: return dataViewTag$1;\n\t        case mapCtorString: return mapTag$1;\n\t        case promiseCtorString: return promiseTag;\n\t        case setCtorString: return setTag$1;\n\t        case weakMapCtorString: return weakMapTag$1;\n\t      }\n\t    }\n\t    return result;\n\t  };\n\t}\n\n\tvar _getTag = getTag;\n\n\t/** Used for built-in method references. */\n\tvar objectProto$d = Object.prototype;\n\n\t/** Used to check objects for own properties. */\n\tvar hasOwnProperty$b = objectProto$d.hasOwnProperty;\n\n\t/**\n\t * Initializes an array clone.\n\t *\n\t * @private\n\t * @param {Array} array The array to clone.\n\t * @returns {Array} Returns the initialized clone.\n\t */\n\tfunction initCloneArray(array) {\n\t  var length = array.length,\n\t      result = new array.constructor(length);\n\n\t  // Add properties assigned by `RegExp#exec`.\n\t  if (length && typeof array[0] == 'string' && hasOwnProperty$b.call(array, 'index')) {\n\t    result.index = array.index;\n\t    result.input = array.input;\n\t  }\n\t  return result;\n\t}\n\n\tvar _initCloneArray = initCloneArray;\n\n\t/**\n\t * Creates a clone of `dataView`.\n\t *\n\t * @private\n\t * @param {Object} dataView The data view to clone.\n\t * @param {boolean} [isDeep] Specify a deep clone.\n\t * @returns {Object} Returns the cloned data view.\n\t */\n\tfunction cloneDataView(dataView, isDeep) {\n\t  var buffer = isDeep ? _cloneArrayBuffer(dataView.buffer) : dataView.buffer;\n\t  return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);\n\t}\n\n\tvar _cloneDataView = cloneDataView;\n\n\t/** Used to match `RegExp` flags from their coerced string values. */\n\tvar reFlags = /\\w*$/;\n\n\t/**\n\t * Creates a clone of `regexp`.\n\t *\n\t * @private\n\t * @param {Object} regexp The regexp to clone.\n\t * @returns {Object} Returns the cloned regexp.\n\t */\n\tfunction cloneRegExp(regexp) {\n\t  var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));\n\t  result.lastIndex = regexp.lastIndex;\n\t  return result;\n\t}\n\n\tvar _cloneRegExp = cloneRegExp;\n\n\t/** Used to convert symbols to primitives and strings. */\n\tvar symbolProto$1 = _Symbol ? _Symbol.prototype : undefined,\n\t    symbolValueOf = symbolProto$1 ? symbolProto$1.valueOf : undefined;\n\n\t/**\n\t * Creates a clone of the `symbol` object.\n\t *\n\t * @private\n\t * @param {Object} symbol The symbol object to clone.\n\t * @returns {Object} Returns the cloned symbol object.\n\t */\n\tfunction cloneSymbol(symbol) {\n\t  return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};\n\t}\n\n\tvar _cloneSymbol = cloneSymbol;\n\n\t/** `Object#toString` result references. */\n\tvar boolTag$1 = '[object Boolean]',\n\t    dateTag$1 = '[object Date]',\n\t    mapTag$2 = '[object Map]',\n\t    numberTag$1 = '[object Number]',\n\t    regexpTag$1 = '[object RegExp]',\n\t    setTag$2 = '[object Set]',\n\t    stringTag$1 = '[object String]',\n\t    symbolTag$1 = '[object Symbol]';\n\n\tvar arrayBufferTag$1 = '[object ArrayBuffer]',\n\t    dataViewTag$2 = '[object DataView]',\n\t    float32Tag$1 = '[object Float32Array]',\n\t    float64Tag$1 = '[object Float64Array]',\n\t    int8Tag$1 = '[object Int8Array]',\n\t    int16Tag$1 = '[object Int16Array]',\n\t    int32Tag$1 = '[object Int32Array]',\n\t    uint8Tag$1 = '[object Uint8Array]',\n\t    uint8ClampedTag$1 = '[object Uint8ClampedArray]',\n\t    uint16Tag$1 = '[object Uint16Array]',\n\t    uint32Tag$1 = '[object Uint32Array]';\n\n\t/**\n\t * Initializes an object clone based on its `toStringTag`.\n\t *\n\t * **Note:** This function only supports cloning values with tags of\n\t * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`.\n\t *\n\t * @private\n\t * @param {Object} object The object to clone.\n\t * @param {string} tag The `toStringTag` of the object to clone.\n\t * @param {boolean} [isDeep] Specify a deep clone.\n\t * @returns {Object} Returns the initialized clone.\n\t */\n\tfunction initCloneByTag(object, tag, isDeep) {\n\t  var Ctor = object.constructor;\n\t  switch (tag) {\n\t    case arrayBufferTag$1:\n\t      return _cloneArrayBuffer(object);\n\n\t    case boolTag$1:\n\t    case dateTag$1:\n\t      return new Ctor(+object);\n\n\t    case dataViewTag$2:\n\t      return _cloneDataView(object, isDeep);\n\n\t    case float32Tag$1: case float64Tag$1:\n\t    case int8Tag$1: case int16Tag$1: case int32Tag$1:\n\t    case uint8Tag$1: case uint8ClampedTag$1: case uint16Tag$1: case uint32Tag$1:\n\t      return _cloneTypedArray(object, isDeep);\n\n\t    case mapTag$2:\n\t      return new Ctor;\n\n\t    case numberTag$1:\n\t    case stringTag$1:\n\t      return new Ctor(object);\n\n\t    case regexpTag$1:\n\t      return _cloneRegExp(object);\n\n\t    case setTag$2:\n\t      return new Ctor;\n\n\t    case symbolTag$1:\n\t      return _cloneSymbol(object);\n\t  }\n\t}\n\n\tvar _initCloneByTag = initCloneByTag;\n\n\t/** `Object#toString` result references. */\n\tvar mapTag$3 = '[object Map]';\n\n\t/**\n\t * The base implementation of `_.isMap` without Node.js optimizations.\n\t *\n\t * @private\n\t * @param {*} value The value to check.\n\t * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n\t */\n\tfunction baseIsMap(value) {\n\t  return isObjectLike_1(value) && _getTag(value) == mapTag$3;\n\t}\n\n\tvar _baseIsMap = baseIsMap;\n\n\t/* Node.js helper references. */\n\tvar nodeIsMap = _nodeUtil && _nodeUtil.isMap;\n\n\t/**\n\t * Checks if `value` is classified as a `Map` object.\n\t *\n\t * @static\n\t * @memberOf _\n\t * @since 4.3.0\n\t * @category Lang\n\t * @param {*} value The value to check.\n\t * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n\t * @example\n\t *\n\t * _.isMap(new Map);\n\t * // => true\n\t *\n\t * _.isMap(new WeakMap);\n\t * // => false\n\t */\n\tvar isMap = nodeIsMap ? _baseUnary(nodeIsMap) : _baseIsMap;\n\n\tvar isMap_1 = isMap;\n\n\t/** `Object#toString` result references. */\n\tvar setTag$3 = '[object Set]';\n\n\t/**\n\t * The base implementation of `_.isSet` without Node.js optimizations.\n\t *\n\t * @private\n\t * @param {*} value The value to check.\n\t * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n\t */\n\tfunction baseIsSet(value) {\n\t  return isObjectLike_1(value) && _getTag(value) == setTag$3;\n\t}\n\n\tvar _baseIsSet = baseIsSet;\n\n\t/* Node.js helper references. */\n\tvar nodeIsSet = _nodeUtil && _nodeUtil.isSet;\n\n\t/**\n\t * Checks if `value` is classified as a `Set` object.\n\t *\n\t * @static\n\t * @memberOf _\n\t * @since 4.3.0\n\t * @category Lang\n\t * @param {*} value The value to check.\n\t * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n\t * @example\n\t *\n\t * _.isSet(new Set);\n\t * // => true\n\t *\n\t * _.isSet(new WeakSet);\n\t * // => false\n\t */\n\tvar isSet = nodeIsSet ? _baseUnary(nodeIsSet) : _baseIsSet;\n\n\tvar isSet_1 = isSet;\n\n\t/** Used to compose bitmasks for cloning. */\n\tvar CLONE_DEEP_FLAG = 1,\n\t    CLONE_FLAT_FLAG = 2,\n\t    CLONE_SYMBOLS_FLAG = 4;\n\n\t/** `Object#toString` result references. */\n\tvar argsTag$2 = '[object Arguments]',\n\t    arrayTag$1 = '[object Array]',\n\t    boolTag$2 = '[object Boolean]',\n\t    dateTag$2 = '[object Date]',\n\t    errorTag$1 = '[object Error]',\n\t    funcTag$2 = '[object Function]',\n\t    genTag$1 = '[object GeneratorFunction]',\n\t    mapTag$4 = '[object Map]',\n\t    numberTag$2 = '[object Number]',\n\t    objectTag$3 = '[object Object]',\n\t    regexpTag$2 = '[object RegExp]',\n\t    setTag$4 = '[object Set]',\n\t    stringTag$2 = '[object String]',\n\t    symbolTag$2 = '[object Symbol]',\n\t    weakMapTag$2 = '[object WeakMap]';\n\n\tvar arrayBufferTag$2 = '[object ArrayBuffer]',\n\t    dataViewTag$3 = '[object DataView]',\n\t    float32Tag$2 = '[object Float32Array]',\n\t    float64Tag$2 = '[object Float64Array]',\n\t    int8Tag$2 = '[object Int8Array]',\n\t    int16Tag$2 = '[object Int16Array]',\n\t    int32Tag$2 = '[object Int32Array]',\n\t    uint8Tag$2 = '[object Uint8Array]',\n\t    uint8ClampedTag$2 = '[object Uint8ClampedArray]',\n\t    uint16Tag$2 = '[object Uint16Array]',\n\t    uint32Tag$2 = '[object Uint32Array]';\n\n\t/** Used to identify `toStringTag` values supported by `_.clone`. */\n\tvar cloneableTags = {};\n\tcloneableTags[argsTag$2] = cloneableTags[arrayTag$1] =\n\tcloneableTags[arrayBufferTag$2] = cloneableTags[dataViewTag$3] =\n\tcloneableTags[boolTag$2] = cloneableTags[dateTag$2] =\n\tcloneableTags[float32Tag$2] = cloneableTags[float64Tag$2] =\n\tcloneableTags[int8Tag$2] = cloneableTags[int16Tag$2] =\n\tcloneableTags[int32Tag$2] = cloneableTags[mapTag$4] =\n\tcloneableTags[numberTag$2] = cloneableTags[objectTag$3] =\n\tcloneableTags[regexpTag$2] = cloneableTags[setTag$4] =\n\tcloneableTags[stringTag$2] = cloneableTags[symbolTag$2] =\n\tcloneableTags[uint8Tag$2] = cloneableTags[uint8ClampedTag$2] =\n\tcloneableTags[uint16Tag$2] = cloneableTags[uint32Tag$2] = true;\n\tcloneableTags[errorTag$1] = cloneableTags[funcTag$2] =\n\tcloneableTags[weakMapTag$2] = false;\n\n\t/**\n\t * The base implementation of `_.clone` and `_.cloneDeep` which tracks\n\t * traversed objects.\n\t *\n\t * @private\n\t * @param {*} value The value to clone.\n\t * @param {boolean} bitmask The bitmask flags.\n\t *  1 - Deep clone\n\t *  2 - Flatten inherited properties\n\t *  4 - Clone symbols\n\t * @param {Function} [customizer] The function to customize cloning.\n\t * @param {string} [key] The key of `value`.\n\t * @param {Object} [object] The parent object of `value`.\n\t * @param {Object} [stack] Tracks traversed objects and their clone counterparts.\n\t * @returns {*} Returns the cloned value.\n\t */\n\tfunction baseClone(value, bitmask, customizer, key, object, stack) {\n\t  var result,\n\t      isDeep = bitmask & CLONE_DEEP_FLAG,\n\t      isFlat = bitmask & CLONE_FLAT_FLAG,\n\t      isFull = bitmask & CLONE_SYMBOLS_FLAG;\n\n\t  if (customizer) {\n\t    result = object ? customizer(value, key, object, stack) : customizer(value);\n\t  }\n\t  if (result !== undefined) {\n\t    return result;\n\t  }\n\t  if (!isObject_1(value)) {\n\t    return value;\n\t  }\n\t  var isArr = isArray_1(value);\n\t  if (isArr) {\n\t    result = _initCloneArray(value);\n\t    if (!isDeep) {\n\t      return _copyArray(value, result);\n\t    }\n\t  } else {\n\t    var tag = _getTag(value),\n\t        isFunc = tag == funcTag$2 || tag == genTag$1;\n\n\t    if (isBuffer_1(value)) {\n\t      return _cloneBuffer(value, isDeep);\n\t    }\n\t    if (tag == objectTag$3 || tag == argsTag$2 || (isFunc && !object)) {\n\t      result = (isFlat || isFunc) ? {} : _initCloneObject(value);\n\t      if (!isDeep) {\n\t        return isFlat\n\t          ? _copySymbolsIn(value, _baseAssignIn(result, value))\n\t          : _copySymbols(value, _baseAssign(result, value));\n\t      }\n\t    } else {\n\t      if (!cloneableTags[tag]) {\n\t        return object ? value : {};\n\t      }\n\t      result = _initCloneByTag(value, tag, isDeep);\n\t    }\n\t  }\n\t  // Check for circular references and return its corresponding clone.\n\t  stack || (stack = new _Stack);\n\t  var stacked = stack.get(value);\n\t  if (stacked) {\n\t    return stacked;\n\t  }\n\t  stack.set(value, result);\n\n\t  if (isSet_1(value)) {\n\t    value.forEach(function(subValue) {\n\t      result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));\n\t    });\n\t  } else if (isMap_1(value)) {\n\t    value.forEach(function(subValue, key) {\n\t      result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack));\n\t    });\n\t  }\n\n\t  var keysFunc = isFull\n\t    ? (isFlat ? _getAllKeysIn : _getAllKeys)\n\t    : (isFlat ? keysIn_1 : keys_1);\n\n\t  var props = isArr ? undefined : keysFunc(value);\n\t  _arrayEach(props || value, function(subValue, key) {\n\t    if (props) {\n\t      key = subValue;\n\t      subValue = value[key];\n\t    }\n\t    // Recursively populate clone (susceptible to call stack limits).\n\t    _assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack));\n\t  });\n\t  return result;\n\t}\n\n\tvar _baseClone = baseClone;\n\n\t/** Used to compose bitmasks for cloning. */\n\tvar CLONE_DEEP_FLAG$1 = 1,\n\t    CLONE_SYMBOLS_FLAG$1 = 4;\n\n\t/**\n\t * This method is like `_.clone` except that it recursively clones `value`.\n\t *\n\t * @static\n\t * @memberOf _\n\t * @since 1.0.0\n\t * @category Lang\n\t * @param {*} value The value to recursively clone.\n\t * @returns {*} Returns the deep cloned value.\n\t * @see _.clone\n\t * @example\n\t *\n\t * var objects = [{ 'a': 1 }, { 'b': 2 }];\n\t *\n\t * var deep = _.cloneDeep(objects);\n\t * console.log(deep[0] === objects[0]);\n\t * // => false\n\t */\n\tfunction cloneDeep(value) {\n\t  return _baseClone(value, CLONE_DEEP_FLAG$1 | CLONE_SYMBOLS_FLAG$1);\n\t}\n\n\tvar cloneDeep_1 = cloneDeep;\n\n\t/**\n\t * Copyright (C) 2021 THL A29 Limited, a Tencent company.\n\t *\n\t * Licensed under the Apache License, Version 2.0 (the \"License\");\n\t * you may not use this file except in compliance with the License.\n\t * You may obtain a copy of the License at\n\t *\n\t *     http://www.apache.org/licenses/LICENSE-2.0\n\t *\n\t * Unless required by applicable law or agreed to in writing, software\n\t * distributed under the License is distributed on an \"AS IS\" BASIS,\n\t * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n\t * See the License for the specific language governing permissions and\n\t * limitations under the License.\n\t */\n\tvar callbacks = {\n\t  /**\n\t   * 全局的URL处理器\n\t   * @param {string} url 来源url\n\t   * @param {'image'|'audio'|'video'|'autolink'|'link'} srcType 来源类型\n\t   * @returns\n\t   */\n\t  urlProcessor: function urlProcessor(url, srcType) {\n\t    return url;\n\t  },\n\t  fileUpload: function fileUpload(file, callback) {\n\t    if (/video/i.test(file.type)) {\n\t      callback('images/demo-dog.png', {\n\t        name: \"\".concat(file.name.replace(/\\.[^.]+$/, '')),\n\t        poster: 'images/demo-dog.png?poster=true',\n\t        isBorder: true,\n\t        isShadow: true,\n\t        isRadius: true\n\t      });\n\t    } else {\n\t      callback('images/demo-dog.png', {\n\t        name: \"\".concat(file.name.replace(/\\.[^.]+$/, '')),\n\t        isShadow: true\n\t      });\n\t    }\n\t  },\n\t  afterChange: function afterChange(text, html) {},\n\t  afterInit: function afterInit(text, html) {},\n\t  beforeImageMounted: function beforeImageMounted(srcProp, src) {\n\t    return {\n\t      srcProp: srcProp,\n\t      src: src\n\t    };\n\t  },\n\t  onClickPreview: function onClickPreview(event) {},\n\t  onCopyCode: function onCopyCode(event, code) {\n\t    // 阻止默认的粘贴事件\n\t    // return false;\n\t    // 对复制内容进行额外处理\n\t    return code;\n\t  },\n\t  // 获取中文的拼音\n\t  changeString2Pinyin: function changeString2Pinyin(string) {\n\t    /**\n\t     * 推荐使用这个组件：https://github.com/liu11hao11/pinyin_js\n\t     *\n\t     * 可以在 ../scripts/pinyin/pinyin_dist.js 里直接引用\n\t     */\n\t    return string;\n\t  }\n\t};\n\t/** @type {Partial<import('~types/cherry').CherryOptions>} */\n\n\tvar defaultConfig = {\n\t  // 第三方包\n\t  externals: {// externals\n\t  },\n\t  // chatGpt的openai配置\n\t  openai: {\n\t    apiKey: '',\n\t    // apiKey\n\t    // proxy: {\n\t    //   host: '127.0.0.1',\n\t    //   port: '7890',\n\t    // }, // http & https代理配置\n\t    ignoreError: false // 是否忽略请求失败，默认忽略\n\n\t  },\n\t  // 解析引擎配置\n\t  engine: {\n\t    // 全局配置\n\t    global: {\n\t      // 是否启用经典换行逻辑\n\t      // true：一个换行会被忽略，两个以上连续换行会分割成段落，\n\t      // false： 一个换行会转成<br>，两个连续换行会分割成段落，三个以上连续换行会转成<br>并分割段落\n\t      classicBr: false,\n\n\t      /**\n\t       * 全局的URL处理器\n\t       * @param {string} url 来源url\n\t       * @param {'image'|'audio'|'video'|'autolink'|'link'} srcType 来源类型\n\t       * @returns\n\t       */\n\t      urlProcessor: callbacks.urlProcessor,\n\n\t      /**\n\t       * 额外允许渲染的html标签\n\t       * 标签以英文竖线分隔，如：htmlWhiteList: 'iframe|script|style'\n\t       * 默认为空，默认允许渲染的html见src/utils/sanitize.js whiteList 属性\n\t       * 需要注意：\n\t       *    - 启用iframe、script等标签后，会产生xss注入，请根据实际场景判断是否需要启用\n\t       *    - 一般编辑权限可控的场景（如api文档系统）可以允许iframe、script等标签\n\t       */\n\t      htmlWhiteList: ''\n\t    },\n\t    // 内置语法配置\n\t    syntax: {\n\t      // 语法开关\n\t      // 'hookName': false,\n\t      // 语法配置\n\t      // 'hookName': {\n\t      //\n\t      // }\n\t      link: {\n\t        /** 生成的<a>标签追加target属性的默认值 空：在<a>标签里不会追加target属性， _blank：在<a>标签里追加target=\"_blank\"属性 */\n\t        target: '',\n\n\t        /** 生成的<a>标签追加rel属性的默认值 空：在<a>标签里不会追加rel属性， nofollow：在<a>标签里追加rel=\"nofollow：在\"属性*/\n\t        rel: ''\n\t      },\n\t      autoLink: {\n\t        /** 生成的<a>标签追加target属性的默认值 空：在<a>标签里不会追加target属性， _blank：在<a>标签里追加target=\"_blank\"属性 */\n\t        target: '',\n\n\t        /** 生成的<a>标签追加rel属性的默认值 空：在<a>标签里不会追加rel属性， nofollow：在<a>标签里追加rel=\"nofollow：在\"属性*/\n\t        rel: '',\n\n\t        /** 是否开启短链接 */\n\t        enableShortLink: true,\n\n\t        /** 短链接长度 */\n\t        shortLinkLength: 20\n\t      },\n\t      list: {\n\t        listNested: false,\n\t        // 同级列表类型转换后变为子级\n\t        indentSpace: 2 // 默认2个空格缩进\n\n\t      },\n\t      table: {\n\t        enableChart: false // chartRenderEngine: EChartsTableEngine,\n\t        // externals: ['echarts'],\n\n\t      },\n\t      inlineCode: {\n\t        theme: 'red'\n\t      },\n\t      codeBlock: {\n\t        theme: 'dark',\n\t        // 默认为深色主题\n\t        wrap: true,\n\t        // 超出长度是否换行，false则显示滚动条\n\t        lineNumber: true,\n\t        // 默认显示行号\n\t        copyCode: true,\n\t        // 是否显示“复制”按钮\n\t        customRenderer: {// 自定义语法渲染器\n\t        },\n\t        mermaid: {\n\t          svg2img: false // 是否将mermaid生成的画图变成img格式\n\n\t        },\n\n\t        /**\n\t         * indentedCodeBlock是缩进代码块是否启用的开关\n\t         *\n\t         *    在6.X之前的版本中默认不支持该语法。\n\t         *    因为cherry的开发团队认为该语法太丑了（容易误触）\n\t         *    开发团队希望用```代码块语法来彻底取代该语法\n\t         *    但在后续的沟通中，开发团队发现在某些场景下该语法有更好的显示效果\n\t         *    因此开发团队在6.X版本中才引入了该语法\n\t         *    已经引用6.x以下版本的业务如果想做到用户无感知升级，可以去掉该语法：\n\t         *        indentedCodeBlock：false\n\t         */\n\t        indentedCodeBlock: true\n\t      },\n\t      emoji: {\n\t        useUnicode: true // 是否使用unicode进行渲染\n\n\t      },\n\t      fontEmphasis: {\n\t        /**\n\t         * 是否允许首尾空格\n\t         * 首尾、前后的定义： 语法前**语法首+内容+语法尾**语法后\n\t         * 例：\n\t         *    true:\n\t         *           __ hello __  ====>   <strong> hello </strong>\n\t         *           __hello__    ====>   <strong>hello</strong>\n\t         *    false:\n\t         *           __ hello __  ====>   <em>_ hello _</em>\n\t         *           __hello__    ====>   <strong>hello</strong>\n\t         */\n\t        allowWhitespace: false\n\t      },\n\t      strikethrough: {\n\t        /**\n\t         * 是否必须有前后空格\n\t         * 首尾、前后的定义： 语法前**语法首+内容+语法尾**语法后\n\t         * 例：\n\t         *    true:\n\t         *            hello wor~~l~~d     ====>   hello wor~~l~~d\n\t         *            hello wor ~~l~~ d   ====>   hello wor <del>l</del> d\n\t         *    false:\n\t         *            hello wor~~l~~d     ====>   hello wor<del>l</del>d\n\t         *            hello wor ~~l~~ d     ====>   hello wor <del>l</del> d\n\t         */\n\t        needWhitespace: false\n\t      },\n\t      mathBlock: {\n\t        engine: 'MathJax',\n\t        // katex或MathJax\n\t        src: '',\n\t        plugins: true // 默认加载插件\n\n\t      },\n\t      inlineMath: {\n\t        engine: 'MathJax',\n\t        // katex或MathJax\n\t        src: ''\n\t      },\n\t      toc: {\n\t        /** 默认只渲染一个目录 */\n\t        allowMultiToc: false\n\t      },\n\t      header: {\n\t        /**\n\t         * 标题的样式：\n\t         *  - default       默认样式，标题前面有锚点\n\t         *  - autonumber    标题前面有自增序号锚点\n\t         *  - none          标题没有锚点\n\t         */\n\t        anchorStyle: 'default'\n\t      }\n\t    }\n\t  },\n\t  editor: {\n\t    id: 'code',\n\t    // textarea 的id属性值\n\t    name: 'code',\n\t    // textarea 的name属性值\n\t    autoSave2Textarea: false,\n\t    // 是否自动将编辑区的内容回写到textarea里\n\t    theme: 'default',\n\t    // depend on codemirror theme name: https://codemirror.net/demo/theme.htm\n\t    // 编辑器的高度，默认100%，如果挂载点存在内联设置的height则以内联样式为主\n\t    height: '100%',\n\t    // defaultModel 编辑器初始化后的默认模式，一共有三种模式：1、双栏编辑预览模式；2、纯编辑模式；3、预览模式\n\t    // edit&preview: 双栏编辑预览模式\n\t    // editOnly: 纯编辑模式（没有预览，可通过toolbar切换成双栏或预览模式）\n\t    // previewOnly: 预览模式（没有编辑框，toolbar只显示“返回编辑”按钮，可通过toolbar切换成编辑模式）\n\t    defaultModel: 'edit&preview',\n\t    // 粘贴时是否自动将html转成markdown\n\t    convertWhenPaste: true,\n\t    codemirror: {\n\t      // 是否自动focus 默认为true\n\t      autofocus: true\n\t    },\n\t    writingStyle: 'normal' // 书写风格，normal 普通 | typewriter 打字机 | focus 专注，默认normal\n\n\t  },\n\t  toolbars: {\n\t    theme: 'dark',\n\t    // light or dark\n\t    showToolbar: true,\n\t    // false：不展示顶部工具栏； true：展示工具栏; toolbars.showToolbar=false 与 toolbars.toolbar=false 等效\n\t    toolbar: ['bold', 'italic', 'strikethrough', '|', 'color', 'header', 'ruby', '|', 'list', 'panel', // 'justify', // 对齐方式，默认不推荐这么“复杂”的样式要求\n\t    'detail', {\n\t      insert: ['image', 'audio', 'video', 'link', 'hr', 'br', 'code', 'formula', 'toc', 'table', 'line-table', 'bar-table', 'pdf', 'word']\n\t    }, 'graph', 'settings'],\n\t    toolbarRight: [],\n\t    sidebar: [],\n\t    bubble: ['bold', 'italic', 'underline', 'strikethrough', 'sub', 'sup', 'quote', '|', 'size', 'color'],\n\t    // array or false\n\t    \"float\": ['h1', 'h2', 'h3', '|', 'checklist', 'quote', 'table', 'code'] // array or false\n\n\t  },\n\t  // 打开draw.io编辑页的url，如果为空则drawio按钮失效\n\t  drawioIframeUrl: '',\n\t  // 上传文件的回调\n\t  fileUpload: callbacks.fileUpload,\n\n\t  /**\n\t   * 上传文件的时候用来指定文件类型\n\t   */\n\t  fileTypeLimitMap: {\n\t    video: 'video/*',\n\t    audio: 'audio/*',\n\t    image: 'image/*',\n\t    word: '.doc,.docx',\n\t    pdf: '.pdf',\n\t    file: '*'\n\t  },\n\t  callback: {\n\t    afterChange: callbacks.afterChange,\n\t    afterInit: callbacks.afterInit,\n\t    beforeImageMounted: callbacks.beforeImageMounted,\n\t    // 预览区域点击事件，previewer.enablePreviewerBubble = true 时生效\n\t    onClickPreview: callbacks.onClickPreview,\n\t    // 复制代码块代码时的回调\n\t    onCopyCode: callbacks.onCopyCode,\n\t    // 把中文变成拼音的回调，当然也可以把中文变成英文、英文变成中文\n\t    changeString2Pinyin: callbacks.changeString2Pinyin\n\t  },\n\t  previewer: {\n\t    dom: false,\n\t    className: 'cherry-markdown',\n\t    // 是否启用预览区域编辑能力（目前支持编辑图片尺寸、编辑表格内容）\n\t    enablePreviewerBubble: true,\n\n\t    /**\n\t     * 配置图片懒加载的逻辑\n\t     * - 如果不希望图片懒加载，可配置成 lazyLoadImg = {noLoadImgNum: -1}\n\t     * - 如果希望所有图片都无脑懒加载，可配置成 lazyLoadImg = {noLoadImgNum: 0, autoLoadImgNum: -1}\n\t     * - 如果一共有15张图片，希望：\n\t     *    1、前5张图片（1~5）直接加载；\n\t     *    2、后5张图片（6~10）不论在不在视区内，都无脑懒加载；\n\t     *    3、其他图片（11~15）在视区内时，进行懒加载；\n\t     *    则配置应该为：lazyLoadImg = {noLoadImgNum: 5, autoLoadImgNum: 5}\n\t     */\n\t    lazyLoadImg: {\n\t      // 加载图片时如果需要展示loading图，则配置loading图的地址\n\t      loadingImgPath: '',\n\t      // 同一时间最多有几个图片请求，最大同时加载6张图片\n\t      maxNumPerTime: 2,\n\t      // 不进行懒加载处理的图片数量，如果为0，即所有图片都进行懒加载处理， 如果设置为-1，则所有图片都不进行懒加载处理\n\t      noLoadImgNum: 5,\n\t      // 首次自动加载几张图片（不论图片是否滚动到视野内），autoLoadImgNum = -1 表示会自动加载完所有图片\n\t      autoLoadImgNum: 5,\n\t      // 针对加载失败的图片 或 beforeLoadOneImgCallback 返回false 的图片，最多尝试加载几次，为了防止死循环，最多5次。以图片的src为纬度统计重试次数\n\t      maxTryTimesPerSrc: 2,\n\t      // 加载一张图片之前的回调函数，函数return false 会终止加载操作\n\t      beforeLoadOneImgCallback: function beforeLoadOneImgCallback(img) {\n\t        return true;\n\t      },\n\t      // 加载一张图片失败之后的回调函数\n\t      failLoadOneImgCallback: function failLoadOneImgCallback(img) {},\n\t      // 加载一张图片之后的回调函数，如果图片加载失败，则不会回调该函数\n\t      afterLoadOneImgCallback: function afterLoadOneImgCallback(img) {},\n\t      // 加载完所有图片后调用的回调函数\n\t      afterLoadAllImgCallback: function afterLoadAllImgCallback() {}\n\t    }\n\t  },\n\n\t  /**\n\t   * 配置主题，第三方可以自行扩展主题\n\t   */\n\t  theme: [{\n\t    className: 'default',\n\t    label: '默认'\n\t  }, {\n\t    className: 'dark',\n\t    label: '暗黑'\n\t  }, {\n\t    className: 'light',\n\t    label: '明亮'\n\t  }, {\n\t    className: 'green',\n\t    label: '清新'\n\t  }, {\n\t    className: 'red',\n\t    label: '热情'\n\t  }, {\n\t    className: 'violet',\n\t    label: '淡雅'\n\t  }, {\n\t    className: 'blue',\n\t    label: '清幽'\n\t  }],\n\t  // 预览页面不需要绑定事件\n\t  isPreviewOnly: false,\n\t  // 预览区域跟随编辑器光标自动滚动\n\t  autoScrollByCursor: true,\n\t  // 外层容器不存在时，是否强制输出到body上\n\t  forceAppend: true,\n\t  // The locale Cherry is going to use. Locales live in /src/locales/\n\t  locale: 'zh_CN'\n\t};\n\tvar defaultConfig$1 = cloneDeep_1(defaultConfig);\n\n\t/**\n\t * Copyright (C) 2021 THL A29 Limited, a Tencent company.\n\t *\n\t * Licensed under the Apache License, Version 2.0 (the \"License\");\n\t * you may not use this file except in compliance with the License.\n\t * You may obtain a copy of the License at\n\t *\n\t *   http://www.apache.org/licenses/LICENSE-2.0\n\t *\n\t * Unless required by applicable law or agreed to in writing, software\n\t * distributed under the License is distributed on an \"AS IS\" BASIS,\n\t * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n\t * See the License for the specific language governing permissions and\n\t * limitations under the License.\n\t */\n\tvar zhCn = {\n\t  bold: '加粗',\n\t  // 加粗\n\t  code: '代码',\n\t  // 代码\n\t  graph: '画图',\n\t  // 画图\n\t  h1: '一级标题',\n\t  // 一级标题\n\t  h2: '二级标题',\n\t  // 二级标题\n\t  h3: '三级标题',\n\t  // 三级标题\n\t  h4: '四级标题',\n\t  // 四级标题\n\t  h5: '五级标题',\n\t  // 五级标题\n\t  header: '标题',\n\t  // 标题\n\t  insert: '插入',\n\t  // 插入\n\t  italic: '斜体',\n\t  // 斜体\n\t  list: '列表',\n\t  // 列表\n\t  quickTable: '表格',\n\t  // 表格\n\t  quote: '引用',\n\t  // 引用\n\t  size: '大小',\n\t  // 大小\n\t  color: '文字颜色&背景',\n\t  // 文字颜色&背景\n\t  strikethrough: '删除线',\n\t  // 删除线\n\t  sub: '下标',\n\t  // 下标\n\t  sup: '上标',\n\t  // 上标\n\t  togglePreview: '预览',\n\t  // 预览\n\t  fullScreen: '全屏',\n\t  // 全屏\n\t  image: '图片',\n\t  // 图片\n\t  audio: '音频',\n\t  // 音频\n\t  video: '视频',\n\t  // 视频\n\t  link: '超链接',\n\t  // 超链接\n\t  hr: '分隔线',\n\t  // 分隔线\n\t  br: '换行',\n\t  // 换行\n\t  toc: '目录',\n\t  // 目录\n\t  pdf: 'pdf',\n\t  // pdf\n\t  word: 'word',\n\t  // word\n\t  table: '表格',\n\t  // 表格\n\t  'line-table': '折线表格',\n\t  // 折线表格\n\t  'bar-table': '柱状表格',\n\t  // 柱状表格\n\t  formula: '公式',\n\t  // 公式\n\t  insertFormula: '公式',\n\t  // 公式\n\t  insertFlow: '流程图',\n\t  // 流程图\n\t  insertSeq: '时序图',\n\t  // 时序图\n\t  insertState: '状态图',\n\t  // 状态图\n\t  insertClass: '类图',\n\t  // 类图\n\t  insertPie: '饼图',\n\t  // 饼图\n\t  insertGantt: '甘特图',\n\t  // 甘特图\n\t  checklist: '清单',\n\t  // 清单\n\t  ol: '有序列表',\n\t  // 有序列表\n\t  ul: '无序列表',\n\t  // 无序列表\n\t  undo: '撤销',\n\t  // 撤销\n\t  redo: '恢复',\n\t  // 恢复\n\t  previewClose: '关闭预览',\n\t  // 关闭预览\n\t  codeTheme: '代码主题',\n\t  // 代码主题\n\t  switchModel: '模式切换',\n\t  // 模式切换\n\t  switchPreview: '预览',\n\t  // 预览\n\t  switchEdit: '返回编辑',\n\t  // 返回编辑\n\t  classicBr: '经典换行',\n\t  // 经典换行\n\t  normalBr: '常规换行',\n\t  // 常规换行\n\t  settings: '设置',\n\t  // 设置\n\t  mobilePreview: '移动端预览',\n\t  // 移动端预览\n\t  copy: '复制内容',\n\t  // 复制内容\n\t  \"export\": '导出',\n\t  // 导出PDF、长图\n\t  underline: '下划线',\n\t  // 下划线\n\t  pinyin: '拼音',\n\t  // 拼音\n\t  file: '文件',\n\t  pastePlain: '粘贴为纯文本格式',\n\t  // 粘贴为纯文本格式\n\t  pasteMarkdown: '粘贴为markdown格式',\n\t  // 粘贴为markdown格式\n\t  hide: '隐藏(ctrl+0)',\n\t  // 隐藏(ctrl+0)\n\t  exportToPdf: '导出PDF',\n\t  // 导出PDF\n\t  exportScreenshot: '导出长图',\n\t  // 导出长图\n\t  exportMarkdownFile: '导出markdown',\n\t  // 导出markdown文件\n\t  exportHTMLFile: '导出html',\n\t  // 导出预览区html文件\n\t  theme: '主题',\n\t  // 导出长图\n\t  panel: '面板',\n\t  // 导出长图\n\t  detail: '手风琴',\n\t  // 手风琴\n\t  'H1 Heading': 'H1 一级标题',\n\t  'H2 Heading': 'H2 二级标题',\n\t  'H3 Heading': 'H3 三级标题',\n\t  complement: '续写',\n\t  summary: '总结',\n\t  save: '保存',\n\t  release: '发布',\n\t  back: '返回',\n\t};\n\n\t/**\n\t * Copyright (C) 2021 THL A29 Limited, a Tencent company.\n\t *\n\t * Licensed under the Apache License, Version 2.0 (the \"License\");\n\t * you may not use this file except in compliance with the License.\n\t * You may obtain a copy of the License at\n\t *\n\t *   http://www.apache.org/licenses/LICENSE-2.0\n\t *\n\t * Unless required by applicable law or agreed to in writing, software\n\t * distributed under the License is distributed on an \"AS IS\" BASIS,\n\t * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n\t * See the License for the specific language governing permissions and\n\t * limitations under the License.\n\t */\n\tvar enUs = {\n\t  bold: 'Bold',\n\t  code: 'Code',\n\t  graph: 'Graph',\n\t  h1: 'Heading 1',\n\t  h2: 'Heading 2',\n\t  h3: 'Heading 3',\n\t  h4: 'Heading 4',\n\t  h5: 'Heading 5',\n\t  header: 'Header',\n\t  insert: 'Insert',\n\t  italic: 'Italic',\n\t  list: 'List',\n\t  quickTable: 'Quick Table',\n\t  quote: 'Quote',\n\t  size: 'Size',\n\t  color: 'Text Color & Background',\n\t  strikethrough: 'Strikethrough',\n\t  sub: 'Sub',\n\t  sup: 'Sup',\n\t  togglePreview: 'Toggle Preview',\n\t  fullScreen: 'Full Screen',\n\t  image: 'Image',\n\t  audio: 'Audio',\n\t  video: 'Video',\n\t  link: 'Link',\n\t  hr: 'Horizontal Rule',\n\t  br: 'New Line',\n\t  toc: 'Table Of Content',\n\t  pdf: 'PDF',\n\t  word: 'Word',\n\t  table: 'Table',\n\t  'line-table': 'Line Table',\n\t  'bar-table': 'Bar Table',\n\t  formula: 'Formula',\n\t  insertFormula: 'Insert Formula',\n\t  insertFlow: 'Insert Flow',\n\t  insertSeq: 'Insert Seq',\n\t  insertState: 'Insert State',\n\t  insertClass: 'Insert Class',\n\t  insertPie: 'Insert Pie',\n\t  insertGantt: 'Insert Gantt',\n\t  checklist: 'Checklist',\n\t  ol: 'Ordered List',\n\t  ul: 'Unordered List',\n\t  undo: 'Undo',\n\t  redo: 'Redo',\n\t  previewClose: 'Preview Close',\n\t  codeTheme: 'Code Theme',\n\t  switchModel: 'Switch Model',\n\t  switchPreview: 'Switch Preview',\n\t  switchEdit: 'Switch Edit',\n\t  classicBr: 'Classic New Line',\n\t  normalBr: 'Normal New Line',\n\t  settings: 'Settings',\n\t  mobilePreview: 'Mobile Preview',\n\t  copy: 'Copy',\n\t  \"export\": 'Export',\n\t  underline: 'Underline',\n\t  pinyin: 'Pinyin',\n\t  pastePlain: 'Paste as Plain Text',\n\t  pasteMarkdown: 'Paste as Markdown',\n\t  hide: 'Hide (ctrl+0)',\n\t  exportToPdf: 'Export to PDF',\n\t  exportScreenshot: 'Screenshot',\n\t  exportMarkdownFile: 'Export Markdown File',\n\t  exportHTMLFile: 'Export preview HTML File',\n\t  'H1 Heading': 'H1 Heading',\n\t  'H2 Heading': 'H1 Heading',\n\t  'H3 Heading': 'H1 Heading',\n\t  complement: 'Complement',\n\t  summary: 'Summary',\n\t  save: 'Save',\n\t  release: 'Release',\n\t  back: 'Back',\n\t};\n\n\t/**\n\t * Copyright (C) 2021 THL A29 Limited, a Tencent company.\n\t *\n\t * Licensed under the Apache License, Version 2.0 (the \"License\");\n\t * you may not use this file except in compliance with the License.\n\t * You may obtain a copy of the License at\n\t *\n\t *     http://www.apache.org/licenses/LICENSE-2.0\n\t *\n\t * Unless required by applicable law or agreed to in writing, software\n\t * distributed under the License is distributed on an \"AS IS\" BASIS,\n\t * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n\t * See the License for the specific language governing permissions and\n\t * limitations under the License.\n\t */\n\tvar locales = {\n\t  zh_CN: zhCn,\n\t  en_US: enUs\n\t};\n\n\tfunction _createSuper$1r(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$1r(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = construct$4(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\n\tfunction _isNativeReflectConstruct$1r() { if (typeof Reflect === \"undefined\" || !construct$4) return false; if (construct$4.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(construct$4(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\n\tfunction filterOptions(options, whiteList, propTypes) {\n\t  var _context;\n\n\t  var filteredOptions = {};\n\n\t  forEach$3(_context = keys$3(options)).call(_context, function (key) {\n\t    if (indexOf$8(whiteList).call(whiteList, key) === -1) {\n\t      return;\n\t    }\n\n\t    if (_typeof(propTypes) === 'object') {\n\t      if (typeof propTypes[key] === 'string') {\n\t        if (_typeof(options[key]) === propTypes[key]) {\n\t          filteredOptions[key] = options[key];\n\t        }\n\t      } else {\n\t        if (options[key] instanceof propTypes[key]) {\n\t          filteredOptions[key] = options[key];\n\t        }\n\t      }\n\t    } else if (typeof propTypes === 'string') {\n\t      if (_typeof(options[key]) === propTypes) {\n\t        filteredOptions[key] = options[key];\n\t      }\n\t    }\n\t  });\n\n\t  return filteredOptions;\n\t}\n\n\tfunction createSyntaxHook(name, type, options) {\n\t  var _class;\n\n\t  var BaseClass = type === HOOKS_TYPE_LIST.PAR ? ParagraphBase : SyntaxBase;\n\t  var optionsWhiteList = ['beforeMakeHtml', 'makeHtml', 'afterMakeHtml', 'rule', 'test'];\n\t  var filteredOptions = filterOptions(options, optionsWhiteList, 'function');\n\t  var paragraphConfig = {\n\t    needCache: options.needCache,\n\t    defaultCache: options.defaultCache\n\t  };\n\t  return _class = /*#__PURE__*/function (_BaseClass) {\n\t    _inherits(CustomSyntax, _BaseClass);\n\n\t    var _super = _createSuper$1r(CustomSyntax);\n\n\t    function CustomSyntax() {\n\t      var _this;\n\n\t      var editorConfig = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n\t      _classCallCheck(this, CustomSyntax);\n\n\t      if (type === HOOKS_TYPE_LIST.PAR) {\n\t        _this = _super.call(this, {\n\t          needCache: !!paragraphConfig.needCache,\n\t          defaultCache: paragraphConfig.defaultCache\n\t        });\n\t      } else {\n\t        _this = _super.call(this);\n\t      }\n\n\t      _this.config = editorConfig.config;\n\t      return _possibleConstructorReturn(_this);\n\t    }\n\n\t    _createClass(CustomSyntax, [{\n\t      key: \"beforeMakeHtml\",\n\t      value: function beforeMakeHtml() {\n\t        var _get2, _context2;\n\n\t        for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n\t          args[_key] = arguments[_key];\n\t        }\n\n\t        if (filteredOptions.beforeMakeHtml) {\n\t          return filteredOptions.beforeMakeHtml.apply(this, args);\n\t        }\n\n\t        return (_get2 = _get(_getPrototypeOf(CustomSyntax.prototype), \"beforeMakeHtml\", this)).call.apply(_get2, concat$5(_context2 = [this]).call(_context2, args));\n\t      }\n\t    }, {\n\t      key: \"makeHtml\",\n\t      value: function makeHtml() {\n\t        var _get3, _context3;\n\n\t        for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n\t          args[_key2] = arguments[_key2];\n\t        }\n\n\t        if (filteredOptions.makeHtml) {\n\t          return filteredOptions.makeHtml.apply(this, args);\n\t        }\n\n\t        return (_get3 = _get(_getPrototypeOf(CustomSyntax.prototype), \"makeHtml\", this)).call.apply(_get3, concat$5(_context3 = [this]).call(_context3, args));\n\t      }\n\t    }, {\n\t      key: \"afterMakeHtml\",\n\t      value: function afterMakeHtml() {\n\t        var _get4, _context4;\n\n\t        for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {\n\t          args[_key3] = arguments[_key3];\n\t        }\n\n\t        if (filteredOptions.afterMakeHtml) {\n\t          return filteredOptions.afterMakeHtml.apply(this, args);\n\t        }\n\n\t        return (_get4 = _get(_getPrototypeOf(CustomSyntax.prototype), \"afterMakeHtml\", this)).call.apply(_get4, concat$5(_context4 = [this]).call(_context4, args));\n\t      }\n\t    }, {\n\t      key: \"test\",\n\t      value: function test() {\n\t        var _get5, _context5;\n\n\t        for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {\n\t          args[_key4] = arguments[_key4];\n\t        }\n\n\t        if (filteredOptions.test) {\n\t          return filteredOptions.test.apply(this, args);\n\t        }\n\n\t        return (_get5 = _get(_getPrototypeOf(CustomSyntax.prototype), \"test\", this)).call.apply(_get5, concat$5(_context5 = [this]).call(_context5, args));\n\t      }\n\t    }, {\n\t      key: \"rule\",\n\t      value: function rule() {\n\t        var _get6, _context6;\n\n\t        for (var _len5 = arguments.length, args = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {\n\t          args[_key5] = arguments[_key5];\n\t        }\n\n\t        if (filteredOptions.rule) {\n\t          return filteredOptions.rule.apply(this, args);\n\t        }\n\n\t        return (_get6 = _get(_getPrototypeOf(CustomSyntax.prototype), \"rule\", this)).call.apply(_get6, concat$5(_context6 = [this]).call(_context6, args));\n\t      }\n\t    }]);\n\n\t    return CustomSyntax;\n\t  }(BaseClass), _defineProperty(_class, \"HOOK_NAME\", name), _class;\n\t}\n\tfunction createMenuHook(name, options) {\n\t  var optionsWhiteList = ['subMenuConfig', 'id', 'onClick', 'shortcutKeys', 'iconName'];\n\t  var propTypes = {\n\t    subMenuConfig: Array,\n\t    onClick: 'function',\n\t    shortcutKeys: Array,\n\t\tid: 'string',\n\t    iconName: 'string'\n\t  };\n\t  var filteredOptions = filterOptions(options, optionsWhiteList, propTypes);\n\t  return /*#__PURE__*/function (_MenuBase) {\n\t    _inherits(CustomMenu, _MenuBase);\n\n\t    var _super2 = _createSuper$1r(CustomMenu);\n\n\t    function CustomMenu(editorInstance) {\n\t      var _this2;\n\n\t      _classCallCheck(this, CustomMenu);\n\n\t      _this2 = _super2.call(this, editorInstance);\n\n\t      if (!filteredOptions.iconName) {\n\t        _this2.noIcon = true;\n\t      }\n\n\t      _this2.setName(name, filteredOptions.iconName);\n\t\t  _this2.setId(filteredOptions.id);\n\n\t      _this2.subMenuConfig = filteredOptions.subMenuConfig || [];\n\t      return _this2;\n\t    }\n\n\t    _createClass(CustomMenu, [{\n\t      key: \"onClick\",\n\t      value: function onClick() {\n\t        var _get7, _context7;\n\n\t        for (var _len6 = arguments.length, args = new Array(_len6), _key6 = 0; _key6 < _len6; _key6++) {\n\t          args[_key6] = arguments[_key6];\n\t        }\n\n\t        if (filteredOptions.onClick) {\n\t          return filteredOptions.onClick.apply(this, args);\n\t        }\n\n\t        return (_get7 = _get(_getPrototypeOf(CustomMenu.prototype), \"onClick\", this)).call.apply(_get7, concat$5(_context7 = [this]).call(_context7, args));\n\t      }\n\t    }, {\n\t      key: \"shortcutKeys\",\n\t      get: function get() {\n\t        if (filteredOptions.shortcutKeys) {\n\t          return filteredOptions.shortcutKeys;\n\t        }\n\n\t        return [];\n\t      }\n\t    }]);\n\n\t    return CustomMenu;\n\t  }(MenuBase);\n\t}\n\n\tvar constants = {\n\t  HOOKS_TYPE_LIST: HOOKS_TYPE_LIST\n\t};\n\tvar nodeIgnorePlugin = [];\n\n\tif (!isBrowser()) {\n\t  forEach$3(nodeIgnorePlugin).call(nodeIgnorePlugin, function (key) {\n\t  });\n\t}\n\n\tvar VERSION$1 = \"0.8.21-4b60dd76\";\n\tvar CherryStatic = /*#__PURE__*/function () {\n\t  function CherryStatic() {\n\t    _classCallCheck(this, CherryStatic);\n\t  }\n\n\t  _createClass(CherryStatic, null, [{\n\t    key: \"usePlugin\",\n\t    value:\n\t    /**\n\t     * @this {typeof import('./Cherry').default | typeof CherryStatic}\n\t     * @param {{ install: (defaultConfig: any, ...args: any[]) => void }} PluginClass 插件Class\n\t     * @param  {...any} args 初始化插件的参数\n\t     * @returns\n\t     */\n\t    function usePlugin(PluginClass) {\n\t      var _context;\n\n\t      if (this === CherryStatic) {\n\t        throw new Error('`usePlugin` is not allowed to called through CherryStatic class.');\n\t      } // @ts-ignore\n\n\n\t      if (this.initialized) {\n\t        throw new Error('The function `usePlugin` should be called before Cherry is instantiated.');\n\t      } // @ts-ignore\n\n\n\t      if (PluginClass.$cherry$mounted === true) {\n\t        return;\n\t      } // @ts-ignore\n\n\n\t      for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n\t        args[_key - 1] = arguments[_key];\n\t      }\n\n\t      PluginClass.install.apply(PluginClass, concat$5(_context = [this.config.defaults]).call(_context, args)); // @ts-ignore\n\n\t      PluginClass.$cherry$mounted = true;\n\t    }\n\t  }]);\n\n\t  return CherryStatic;\n\t}();\n\n\t_defineProperty(CherryStatic, \"createSyntaxHook\", createSyntaxHook);\n\n\t_defineProperty(CherryStatic, \"createMenuHook\", createMenuHook);\n\n\t_defineProperty(CherryStatic, \"constants\", constants);\n\n\t_defineProperty(CherryStatic, \"VERSION\", VERSION$1);\n\n\tfunction ownKeys$9(object, enumerableOnly) { var keys = keys$3(object); if (getOwnPropertySymbols$2) { var symbols = getOwnPropertySymbols$2(object); enumerableOnly && (symbols = filter$3(symbols).call(symbols, function (sym) { return getOwnPropertyDescriptor$3(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\n\n\tfunction _objectSpread$8(target) { for (var i = 1; i < arguments.length; i++) { var _context5, _context6; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? forEach$3(_context5 = ownKeys$9(Object(source), !0)).call(_context5, function (key) { _defineProperty(target, key, source[key]); }) : getOwnPropertyDescriptors$2 ? defineProperties$2(target, getOwnPropertyDescriptors$2(source)) : forEach$3(_context6 = ownKeys$9(Object(source))).call(_context6, function (key) { defineProperty$5(target, key, getOwnPropertyDescriptor$3(source, key)); }); } return target; }\n\n\tfunction _createSuper$1s(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$1s(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = construct$4(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\n\tfunction _isNativeReflectConstruct$1s() { if (typeof Reflect === \"undefined\" || !construct$4) return false; if (construct$4.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(construct$4(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\t/** @typedef {import('~types/cherry').CherryOptions} CherryOptions */\n\n\tvar Cherry = /*#__PURE__*/function (_CherryStatic) {\n\t  _inherits(Cherry, _CherryStatic);\n\n\t  var _super = _createSuper$1s(Cherry);\n\n\t  /**\n\t   * @protected\n\t   */\n\n\t  /**\n\t   * @readonly\n\t   */\n\n\t  /**\n\t   * @param {Partial<CherryOptions>} options\n\t   */\n\t  function Cherry(options) {\n\t    var _context;\n\n\t    var _this;\n\n\t    _classCallCheck(this, Cherry);\n\n\t    _this = _super.call(this);\n\t    Cherry.initialized = true;\n\t    var defaultConfigCopy = cloneDeep_1(Cherry.config.defaults);\n\t    _this.defaultToolbar = defaultConfigCopy.toolbars.toolbar;\n\t    $expectTarget(options, Object);\n\t    /**\n\t     * @property\n\t     * @type {Partial<CherryOptions>}\n\t     */\n\n\t    _this.options = mergeWith_1({}, defaultConfigCopy, options, customizer); // loading the locale\n\n\t    _this.locale = locales[_this.options.locale];\n\n\t    if (typeof _this.options.engine.global.urlProcessor === 'function') {\n\t      _this.options.engine.global.urlProcessor = urlProcessorProxy(_this.options.engine.global.urlProcessor);\n\t    }\n\n\t    _this.status = {\n\t      toolbar: 'show',\n\t      previewer: 'show',\n\t      editor: 'show'\n\t    };\n\n\t    if (_this.options.isPreviewOnly || _this.options.editor.defaultModel === 'previewOnly') {\n\t      _this.options.toolbars.showToolbar = false;\n\t      _this.options.editor.defaultModel = 'previewOnly';\n\t      _this.status.editor = 'hide';\n\t      _this.status.toolbar = 'hide';\n\t    }\n\t    /**\n\t     * @property\n\t     * @type {string} 实例ID\n\t     */\n\n\n\t    _this.instanceId = concat$5(_context = \"cherry-\".concat(new Date().getTime())).call(_context, Math.random());\n\t    _this.options.instanceId = _this.instanceId;\n\t    /**\n\t     * @private\n\t     * @type {Engine}\n\t     */\n\n\t    _this.engine = new Engine(_this.options, _assertThisInitialized(_this));\n\n\t    _this.init();\n\n\t    return _this;\n\t  }\n\t  /**\n\t   * 初始化工具栏、编辑区、预览区等\n\t   * @private\n\t   */\n\n\n\t  _createClass(Cherry, [{\n\t    key: \"init\",\n\t    value: function init() {\n\t      var _context2,\n\t          _this2 = this;\n\n\t      var mountEl = this.options.id ? document.getElementById(this.options.id) : this.options.el;\n\n\t      if (!mountEl) {\n\t        if (!this.options.forceAppend) {\n\t          return false;\n\t        }\n\n\t        mountEl = document.createElement('div');\n\t        mountEl.id = this.options.id || 'cherry-markdown';\n\t        document.body.appendChild(mountEl);\n\t      }\n\n\t      if (!mountEl.style.height) {\n\t        mountEl.style.height = this.options.editor.height;\n\t      }\n\n\t      this.cherryDom = mountEl; // 蒙层dom，用来拖拽编辑区&预览区宽度时展示蒙层\n\n\t      var wrapperDom = this.createWrapper(); // 创建编辑区\n\n\t      var editor = this.createEditor(); // 创建预览区\n\n\t      var previewer = this.createPreviewer();\n\n\t      if (this.options.toolbars.showToolbar === false || this.options.toolbars.toolbar === false) {\n\t        // 即便配置了不展示工具栏，也要让工具栏加载对应的语法hook\n\t        wrapperDom.classList.add('cherry--no-toolbar');\n\t        this.options.toolbars.toolbar = this.defaultToolbar;\n\t      }\n\n\t      $expectTarget(this.options.toolbars.toolbar, Array); // 创建顶部工具栏\n\n\t      this.toolbar = this.createToolbar();\n\t      var wrapperFragment = document.createDocumentFragment();\n\t      wrapperFragment.appendChild(this.toolbar.options.dom);\n\t      wrapperFragment.appendChild(editor.options.editorDom); // 创建预览区域的侧边工具栏\n\n\t      this.createSidebar(wrapperFragment);\n\n\t      if (!this.options.previewer.dom) {\n\t        wrapperFragment.appendChild(previewer.options.previewerDom);\n\t      }\n\n\t      wrapperFragment.appendChild(previewer.options.virtualDragLineDom);\n\t      wrapperFragment.appendChild(previewer.options.editorMaskDom);\n\t      wrapperFragment.appendChild(previewer.options.previewerMaskDom);\n\t      wrapperDom.appendChild(wrapperFragment);\n\t      mountEl.appendChild(wrapperDom);\n\t      editor.init(previewer); // 创建bubble工具栏，所谓bubble工具栏，是指在编辑区选中文本时悬浮出现的工具栏\n\n\t      this.createBubble(); // 创建float工具栏，所谓float工具栏，是指当编辑区光标处于新行时，在行内联想出的工具栏\n\n\t      this.createFloatMenu();\n\t      previewer.init(editor);\n\t      previewer.registerAfterUpdate(bind$5(_context2 = this.engine.mounted).call(_context2, this.engine)); // default value init\n\n\t      this.initText(editor.editor); // 切换模式，有纯预览模式、纯编辑模式、双栏编辑模式\n\n\t      this.switchModel(this.options.editor.defaultModel);\n\t      Event$1.on(this.instanceId, Event$1.Events.toolbarHide, function () {\n\t        _this2.status.toolbar = 'hide';\n\t      });\n\t      Event$1.on(this.instanceId, Event$1.Events.toolbarShow, function () {\n\t        _this2.status.toolbar = 'show';\n\t      });\n\t      Event$1.on(this.instanceId, Event$1.Events.previewerClose, function () {\n\t        _this2.status.previewer = 'hide';\n\t      });\n\t      Event$1.on(this.instanceId, Event$1.Events.previewerOpen, function () {\n\t        _this2.status.previewer = 'show';\n\t      });\n\t      Event$1.on(this.instanceId, Event$1.Events.editorClose, function () {\n\t        _this2.status.editor = 'hide'; // 关闭编辑区时，需要清除所有高亮\n\n\t        _this2.previewer.highlightLine(0);\n\t      });\n\t      Event$1.on(this.instanceId, Event$1.Events.editorOpen, function () {\n\t        _this2.status.editor = 'show';\n\t      });\n\t    }\n\t    /**\n\t     * 切换编辑模式\n\t     * @param {'edit&preview'|'editOnly'|'previewOnly'} model 模式类型\n\t     * 一般纯预览模式和纯编辑模式适合在屏幕较小的终端使用，比如手机移动端\n\t     *\n\t     * @returns\n\t     */\n\n\t  }, {\n\t    key: \"switchModel\",\n\t    value: function switchModel() {\n\t      var model = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'edit&preview';\n\n\t      switch (model) {\n\t        case 'edit&preview':\n\t          if (this.previewer) {\n\t            this.previewer.editOnly(true);\n\t            this.previewer.recoverPreviewer();\n\t          }\n\n\t          if (this.toolbar) {\n\t            this.toolbar.showToolbar();\n\t          }\n\n\t          break;\n\n\t        case 'editOnly':\n\t          if (!this.previewer.isPreviewerHidden()) {\n\t            this.previewer.editOnly(true);\n\t          }\n\n\t          if (this.toolbar) {\n\t            this.toolbar.showToolbar();\n\t          }\n\n\t          break;\n\n\t        case 'previewOnly':\n\t          this.previewer.previewOnly();\n\t          this.toolbar && this.toolbar.previewOnly();\n\t          break;\n\t      }\n\t    }\n\t    /**\n\t     * 获取实例id\n\t     * @returns {string}\n\t     * @public\n\t     */\n\n\t  }, {\n\t    key: \"getInstanceId\",\n\t    value: function getInstanceId() {\n\t      return this.instanceId;\n\t    }\n\t    /**\n\t     * 获取编辑器状态\n\t     * @returns  {Object}\n\t     */\n\n\t  }, {\n\t    key: \"getStatus\",\n\t    value: function getStatus() {\n\t      return this.status;\n\t    }\n\t    /**\n\t     * 获取编辑区内的markdown源码内容\n\t     * @returns markdown源码内容\n\t     */\n\n\t  }, {\n\t    key: \"getValue\",\n\t    value: function getValue() {\n\t      return this.editor.editor.getValue();\n\t    }\n\t    /**\n\t     * 获取编辑区内的markdown源码内容\n\t     * @returns markdown源码内容\n\t     */\n\n\t  }, {\n\t    key: \"getMarkdown\",\n\t    value: function getMarkdown() {\n\t      return this.getValue();\n\t    }\n\t    /**\n\t     * 获取CodeMirror实例\n\t     * @returns CodeMirror实例\n\t     */\n\n\t  }, {\n\t    key: \"getCodeMirror\",\n\t    value: function getCodeMirror() {\n\t      return this.editor.editor;\n\t    }\n\t    /**\n\t     * 获取预览区内的html内容\n\t     * @param {boolean} wrapTheme 是否在外层包裹主题class\n\t     * @returns html内容\n\t     */\n\n\t  }, {\n\t    key: \"getHtml\",\n\t    value: function getHtml() {\n\t      var wrapTheme = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;\n\t      return this.previewer.getValue(wrapTheme);\n\t    }\n\t  }, {\n\t    key: \"getPreviewer\",\n\t    value: function getPreviewer() {\n\t      return this.previewer;\n\t    }\n\t    /**\n\t     * 获取目录，目录由head1~6组成\n\t     * @returns 标题head数组\n\t     */\n\t\t}, {\n\t\t\tkey: \"getTheme\",\n\t\t\tvalue: function getTheme() {\n\t\t\t\treturn getThemeFromLocal(true)\n\t\t\t}\n\t\t}, {\n\t\t\tkey: \"setTheme\",\n\t\t\tvalue: function setTheme(theme) {\n\t\t\t\tchangeTheme(this, theme)\n\t\t\t}\n\t\t}, {\n\t    key: \"getToc\",\n\t    value: function getToc() {\n\t      var str = this.getHtml();\n\t      /** @type {({level: number;id: string;text: string})[]} */\n\n\t      var headerList = [];\n\t      var headerRegex = /<h([1-6]).*?id=\"([^\"]+?)\".*?>(.+?)<\\/h[0-6]>/g;\n\t      str.replace(headerRegex, function (match, level, id, text) {\n\t        headerList.push({\n\t          level: +level,\n\t          id: id,\n\t          text: text\n\t        });\n\t        return match;\n\t      });\n\t      return headerList;\n\t    }\n\t    /**\n\t     * 覆盖编辑区的内容\n\t     * @param {string} content markdown内容\n\t     * @param {boolean} keepCursor 是否保持光标位置\n\t     * @returns\n\t     */\n\n\t  }, {\n\t    key: \"setValue\",\n\t    value: function setValue(content) {\n\t      var keepCursor = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n\n\t      if (keepCursor === false) {\n\t        return this.editor.editor.setValue(content);\n\t      }\n\n\t      var codemirror = this.editor.editor;\n\t      var old = this.getValue();\n\t      var pos = codemirror.getDoc().indexFromPos(codemirror.getCursor());\n\t      var newPos = getPosBydiffs(pos, old, content);\n\t      var ret = codemirror.setValue(content);\n\t      var cursor = codemirror.getDoc().posFromIndex(newPos);\n\t      codemirror.setCursor(cursor);\n\t      return ret;\n\t    }\n\t    /**\n\t     * 在光标处或者指定行+偏移量插入内容\n\t     * @param {string} content 被插入的文本\n\t     * @param {boolean} [isSelect=false] 是否选中刚插入的内容\n\t     * @param {[number, number]|false} [anchor=false] [x,y] 代表x+1行，y+1字符偏移量，默认false 会从光标处插入\n\t     * @param {boolean} [focus=true] 保持编辑器处于focus状态\n\t     * @returns\n\t     */\n\n\t  }, {\n\t    key: \"insert\",\n\t    value: function insert(content) {\n\t      var isSelect = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n\t      var anchor = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n\t      var focus = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : true;\n\n\t      if (anchor) {\n\t        this.editor.editor.setSelection({\n\t          line: anchor[0],\n\t          ch: anchor[1]\n\t        }, {\n\t          line: anchor[0],\n\t          ch: anchor[1]\n\t        });\n\t      }\n\n\t      var ret = this.editor.editor.replaceSelection(content, isSelect ? 'around' : 'end');\n\t      focus && this.editor.editor.focus();\n\t      return ret;\n\t    }\n\t    /**\n\t     * 在光标处或者指定行+偏移量插入内容\n\t     * @param {string} content 被插入的文本\n\t     * @param {boolean} [isSelect=false] 是否选中刚插入的内容\n\t     * @param {[number, number]|false} [anchor=false] [x,y] 代表x+1行，y+1字符偏移量，默认false 会从光标处插入\n\t     * @param {boolean} [focus=true] 保持编辑器处于focus状态\n\t     * @returns\n\t     */\n\n\t  }, {\n\t    key: \"insertValue\",\n\t    value: function insertValue(content) {\n\t      var isSelect = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n\t      var anchor = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n\t      var focus = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : true;\n\t      return this.insert(content, isSelect, anchor, focus);\n\t    }\n\t    /**\n\t     * 强制重新渲染预览区域\n\t     */\n\n\t  }, {\n\t    key: \"refreshPreviewer\",\n\t    value: function refreshPreviewer() {\n\t      try {\n\t        var markdownText = this.getValue();\n\t        var html = this.engine.makeHtml(markdownText);\n\t        this.previewer.refresh(html);\n\t      } catch (e) {\n\t        throw new NestedError(e);\n\t      }\n\t    }\n\t    /**\n\t     * 覆盖编辑区的内容\n\t     * @param {string} content markdown内容\n\t     * @param {boolean} keepCursor 是否保持光标位置\n\t     * @returns\n\t     */\n\n\t  }, {\n\t    key: \"setMarkdown\",\n\t    value: function setMarkdown(content) {\n\t      var keepCursor = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n\t      return this.setValue(content, keepCursor);\n\t    }\n\t    /**\n\t     * @private\n\t     * @returns\n\t     */\n\n\t  }, {\n\t    key: \"createWrapper\",\n\t    value: function createWrapper() {\n\t      var toolbarTheme = this.options.toolbars.theme === 'dark' ? 'dark' : ''; // TODO: 完善类型\n\n\t      var inlineCodeTheme =\n\t      /** @type {{theme?: string;}} */\n\t      this.options.engine.syntax.inlineCode.theme;\n\t      var codeBlockTheme =\n\t      /** @type {{theme?: string;}} */\n\t      this.options.engine.syntax.codeBlock.theme;\n\t      if (codeBlockTheme === 'dark') codeBlockTheme = 'tomorrow-night';else if (codeBlockTheme === 'light') codeBlockTheme = 'solarized-light';\n\t      var wrapperDom = createElement('div', ['cherry', 'clearfix', getThemeFromLocal(true)].join(' '), {\n\t        'data-toolbarTheme': toolbarTheme,\n\t        'data-inlineCodeTheme': inlineCodeTheme,\n\t        'data-codeBlockTheme': codeBlockTheme\n\t      });\n\t      this.wrapperDom = wrapperDom;\n\t      return wrapperDom;\n\t    }\n\t    /**\n\t     * @private\n\t     * @returns {Toolbar}\n\t     */\n\n\t  }, {\n\t    key: \"createToolbar\",\n\t    value: function createToolbar() {\n\t      var dom = createElement('div', 'cherry-toolbar');\n\t      this.toolbar = new Toolbar({\n\t        dom: dom,\n\t        $cherry: this,\n\t        buttonRightConfig: this.options.toolbars.toolbarRight,\n\t        buttonConfig: this.options.toolbars.toolbar,\n\t        customMenu: this.options.toolbars.customMenu\n\t      });\n\t      return this.toolbar;\n\t    }\n\t    /**\n\t     * @private\n\t     * @returns\n\t     */\n\n\t  }, {\n\t    key: \"createSidebar\",\n\t    value: function createSidebar(wrapperFragment) {\n\t      if (this.options.toolbars.sidebar) {\n\t        $expectTarget(this.options.toolbars.sidebar, Array);\n\t        var externalClass = this.options.toolbars.theme === 'dark' ? 'dark' : '';\n\t        var dom = createElement('div', \"cherry-sidebar \".concat(externalClass));\n\t        this.sidebar = new Sidebar({\n\t          dom: dom,\n\t          $cherry: this,\n\t          buttonConfig: this.options.toolbars.sidebar,\n\t          customMenu: this.options.toolbars.customMenu\n\t        });\n\t        wrapperFragment.appendChild(this.sidebar.options.dom);\n\t      }\n\t    }\n\t    /**\n\t     * @private\n\t     * @returns\n\t     */\n\n\t  }, {\n\t    key: \"createFloatMenu\",\n\t    value: function createFloatMenu() {\n\t      if (this.options.toolbars[\"float\"]) {\n\t        var dom = createElement('div', 'cherry-floatmenu');\n\t        $expectTarget(this.options.toolbars[\"float\"], Array);\n\t        this.floatMenu = new FloatMenu({\n\t          dom: dom,\n\t          $cherry: this,\n\t          buttonConfig: this.options.toolbars[\"float\"],\n\t          customMenu: this.options.toolbars.customMenu\n\t        });\n\t      }\n\t    }\n\t    /**\n\t     * @private\n\t     * @returns\n\t     */\n\n\t  }, {\n\t    key: \"createBubble\",\n\t    value: function createBubble() {\n\t      if (this.options.toolbars.bubble) {\n\t        var dom = createElement('div', 'cherry-bubble');\n\t        $expectTarget(this.options.toolbars.bubble, Array);\n\t        this.bubble = new Bubble({\n\t          dom: dom,\n\t          $cherry: this,\n\t          buttonConfig: this.options.toolbars.bubble,\n\t          customMenu: this.options.toolbars.customMenu,\n\t          engine: this.engine\n\t        });\n\t      }\n\t    }\n\t    /**\n\t     * @private\n\t     * @returns {import('@/Editor').default}\n\t     */\n\n\t  }, {\n\t    key: \"createEditor\",\n\t    value: function createEditor() {\n\t      var _this$options$editor$, _this$options$editor$2, _context3, _context4;\n\n\t      var textArea = createElement('textarea', '', {\n\t        id: (_this$options$editor$ = this.options.editor.id) !== null && _this$options$editor$ !== void 0 ? _this$options$editor$ : 'code',\n\t        name: (_this$options$editor$2 = this.options.editor.name) !== null && _this$options$editor$2 !== void 0 ? _this$options$editor$2 : 'code'\n\t      });\n\t      textArea.textContent = this.options.value;\n\t      var editor = createElement('div', 'cherry-editor');\n\t      editor.appendChild(textArea);\n\t      this.editor = new Editor(_objectSpread$8({\n\t        $cherry: this,\n\t        editorDom: editor,\n\t        wrapperDom: this.wrapperDom,\n\t        value: this.options.value,\n\t        onKeydown: bind$5(_context3 = this.fireShortcutKey).call(_context3, this),\n\t        onChange: bind$5(_context4 = this.editText).call(_context4, this),\n\t        toolbars: this.options.toolbars,\n\t        fileUpload: this.options.fileUpload,\n\t        autoScrollByCursor: this.options.autoScrollByCursor\n\t      }, this.options.editor));\n\t      return this.editor;\n\t    }\n\t    /**\n\t     * @private\n\t     * @returns {import('@/Previewer').default}\n\t     */\n\n\t  }, {\n\t    key: \"createPreviewer\",\n\t    value: function createPreviewer() {\n\t      /** @type {HTMLDivElement} */\n\t      var previewer;\n\t      var anchorStyle = this.options.engine.syntax.header && this.options.engine.syntax.header.anchorStyle || 'default';\n\t      var autonumberClass = anchorStyle === 'autonumber' ? ' head-num' : '';\n\t      var _this$options$preview = this.options.previewer,\n\t          className = _this$options$preview.className,\n\t          dom = _this$options$preview.dom,\n\t          enablePreviewerBubble = _this$options$preview.enablePreviewerBubble;\n\t      var previewerClassName = ['cherry-previewer cherry-markdown', className || '', autonumberClass, getThemeFromLocal(true)].join(' ');\n\n\t      if (dom) {\n\t        previewer = dom;\n\t        previewer.className += \" \".concat(previewerClassName);\n\t      } else {\n\t        previewer = createElement('div', previewerClassName);\n\t      }\n\n\t      var virtualDragLine = createElement('div', 'cherry-drag');\n\t      var editorMask = createElement('div', 'cherry-editor-mask');\n\t      var previewerMask = createElement('div', 'cherry-previewer-mask');\n\t      this.previewer = new Previewer({\n\t        $cherry: this,\n\t        virtualDragLineDom: virtualDragLine,\n\t        editorMaskDom: editorMask,\n\t        previewerMaskDom: previewerMask,\n\t        previewerDom: previewer,\n\t        value: this.options.value,\n\t        isPreviewOnly: this.options.isPreviewOnly,\n\t        enablePreviewerBubble: enablePreviewerBubble,\n\t        lazyLoadImg: this.options.previewer.lazyLoadImg\n\t      });\n\t      return this.previewer;\n\t    }\n\t    /**\n\t     * @private\n\t     * @param {import('codemirror').Editor} codemirror\n\t     */\n\n\t  }, {\n\t    key: \"initText\",\n\t    value: function initText(codemirror) {\n\t      try {\n\t        var markdownText = codemirror.getValue();\n\t        var html = this.engine.makeHtml(markdownText);\n\t        this.previewer.update(html);\n\n\t        if (this.options.callback.afterInit) {\n\t          this.options.callback.afterInit(markdownText, html);\n\t        }\n\t      } catch (e) {\n\t        throw new NestedError(e);\n\t      }\n\t    }\n\t    /**\n\t     * @private\n\t     * @param {Event} _evt\n\t     * @param {import('codemirror').Editor} codemirror\n\t     */\n\n\t  }, {\n\t    key: \"editText\",\n\t    value: function editText(_evt, codemirror) {\n\t      var _this3 = this;\n\n\t      try {\n\t        if (this.timer) {\n\t          clearTimeout(this.timer);\n\t          this.timer = null;\n\t        }\n\n\t        this.timer = setTimeout$3(function () {\n\t          var markdownText = codemirror.getValue();\n\n\t          var html = _this3.engine.makeHtml(markdownText);\n\n\t          _this3.previewer.update(html);\n\n\t          if (_this3.options.callback.afterChange) {\n\t            _this3.options.callback.afterChange(markdownText, html);\n\t          } // 强制每次编辑（包括undo、redo）编辑器都会自动滚动到光标位置\n\n\n\t          codemirror.scrollIntoView(null);\n\t        }, 50);\n\t      } catch (e) {\n\t        throw new NestedError(e);\n\t      }\n\t    }\n\t    /**\n\t     * @private\n\t     * @param {any} cb\n\t     */\n\n\t  }, {\n\t    key: \"onChange\",\n\t    value: function onChange(cb) {\n\t      this.editor.editor.on('change', function (codeMirror) {\n\t        cb({\n\t          markdown: codeMirror.getValue() // 后续可以按需增加html或其他状态\n\n\t        });\n\t      });\n\t    }\n\t    /**\n\t     * @private\n\t     * @param {*} evt\n\t     */\n\n\t  }, {\n\t    key: \"fireShortcutKey\",\n\t    value: function fireShortcutKey(evt) {\n\t      if (this.toolbar.matchShortcutKey(evt)) {\n\t        // 快捷键\n\t        evt.preventDefault();\n\t        this.toolbar.fireShortcutKey(evt);\n\t      }\n\t    }\n\t    /**\n\t     * 导出预览区域内容\n\t     * @public\n\t     * @param {String} type 'pdf'：导出成pdf文件; 'img'：导出成图片\n\t     * @param {String} fileName 导出文件名\n\t     */\n\n\t  }, {\n\t    key: \"export\",\n\t    value: function _export() {\n\t      var type = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'pdf';\n\t      var fileName = arguments.length > 1 ? arguments[1] : undefined;\n\t      this.previewer[\"export\"](type, fileName);\n\t    }\n\t    /**\n\t     * 修改主题\n\t     * @param {string} theme option.theme里的className\n\t     */\n\n\t  }, {\n\t    key: \"setTheme\",\n\t    value: function setTheme() {\n\t      var theme = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'default';\n\t      changeTheme(this, theme);\n\t    }\n\t    /**\n\t     * 修改书写风格\n\t     * @param {string} writingStyle normal 普通 | typewriter 打字机 | focus 专注\n\t     */\n\n\t  }, {\n\t    key: \"setWritingStyle\",\n\t    value: function setWritingStyle(writingStyle) {\n\t      this.editor.setWritingStyle(writingStyle);\n\t    }\n\t  }]);\n\n\t  return Cherry;\n\t}(CherryStatic);\n\n\t_defineProperty(Cherry, \"initialized\", false);\n\n\t_defineProperty(Cherry, \"config\", {\n\t  /** @type {Partial<CherryOptions>} */\n\t  defaults: defaultConfig$1\n\t});\n\n\t/**\n\t * Copyright (C) 2021 THL A29 Limited, a Tencent company.\n\t *\n\t * Licensed under the Apache License, Version 2.0 (the \"License\");\n\t * you may not use this file except in compliance with the License.\n\t * You may obtain a copy of the License at\n\t *\n\t *     http://www.apache.org/licenses/LICENSE-2.0\n\t *\n\t * Unless required by applicable law or agreed to in writing, software\n\t * distributed under the License is distributed on an \"AS IS\" BASIS,\n\t * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n\t * See the License for the specific language governing permissions and\n\t * limitations under the License.\n\t */\n\n\tif (window) {\n\t  // @ts-ignore\n\t  window.Cherry = Cherry;\n\t}\n\n\tfunction ownKeys$a(object, enumerableOnly) { var keys = keys$3(object); if (getOwnPropertySymbols$2) { var symbols = getOwnPropertySymbols$2(object); enumerableOnly && (symbols = filter$3(symbols).call(symbols, function (sym) { return getOwnPropertyDescriptor$3(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\n\n\tfunction _objectSpread$9(target) { for (var i = 1; i < arguments.length; i++) { var _context4, _context5; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? forEach$3(_context4 = ownKeys$a(Object(source), !0)).call(_context4, function (key) { _defineProperty(target, key, source[key]); }) : getOwnPropertyDescriptors$2 ? defineProperties$2(target, getOwnPropertyDescriptors$2(source)) : forEach$3(_context5 = ownKeys$a(Object(source))).call(_context5, function (key) { defineProperty$5(target, key, getOwnPropertyDescriptor$3(source, key)); }); } return target; }\n\tvar DEFAULT_OPTIONS = {\n\t  // TODO: themes\n\t  theme: 'default',\n\t  altFontFamily: 'sans-serif',\n\t  fontFamily: 'sans-serif',\n\t  themeCSS: '.label foreignObject { font-size: 90%; overflow: visible; } .label { font-family: sans-serif; }',\n\t  flowchart: {\n\t    useMaxWidth: false\n\t  },\n\t  sequence: {\n\t    useMaxWidth: false\n\t  },\n\t  startOnLoad: false,\n\t  logLevel: 5 // fontFamily: 'Arial, monospace'\n\n\t};\n\n\tvar MermaidCodeEngine = /*#__PURE__*/function () {\n\t  function MermaidCodeEngine() {\n\t    var mermaidOptions = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n\t    _classCallCheck(this, MermaidCodeEngine);\n\n\t    _defineProperty(this, \"mermaidAPIRefs\", null);\n\n\t    _defineProperty(this, \"options\", DEFAULT_OPTIONS);\n\n\t    _defineProperty(this, \"dom\", null);\n\n\t    _defineProperty(this, \"mermaidCanvas\", null);\n\n\t    var mermaid = mermaidOptions.mermaid,\n\t        mermaidAPI = mermaidOptions.mermaidAPI;\n\n\t    if (!mermaidAPI && !window.mermaidAPI && (!mermaid || !mermaid.mermaidAPI) && (!window.mermaid || !window.mermaid.mermaidAPI)) {\n\t      throw new Error('code-block-mermaid-plugin[init]: Package mermaid or mermaidAPI not found.');\n\t    }\n\n\t    this.options = _objectSpread$9(_objectSpread$9({}, DEFAULT_OPTIONS), mermaidOptions || {});\n\t    this.mermaidAPIRefs = mermaidAPI || window.mermaidAPI || mermaid.mermaidAPI || window.mermaid.mermaidAPI;\n\t    delete this.options.mermaid;\n\t    delete this.options.mermaidAPI;\n\t    this.mermaidAPIRefs.initialize(this.options);\n\t  }\n\n\t  _createClass(MermaidCodeEngine, [{\n\t    key: \"mountMermaidCanvas\",\n\t    value: function mountMermaidCanvas($engine) {\n\t      if (this.mermaidCanvas && document.body.contains(this.mermaidCanvas)) {\n\t        return;\n\t      }\n\n\t      this.mermaidCanvas = document.createElement('div');\n\t      this.mermaidCanvas.style = 'width:1024px;opacity:0;position:fixed;top:100%;';\n\t      var container = $engine.$cherry.wrapperDom || document.body;\n\t      container.appendChild(this.mermaidCanvas);\n\t    }\n\t    /**\n\t     * 转换svg为img，如果出错则直出svg\n\t     * @param {string} svgCode\n\t     * @param {string} graphId\n\t     * @returns {string}\n\t     */\n\n\t  }, {\n\t    key: \"convertMermaidSvgToImg\",\n\t    value: function convertMermaidSvgToImg(svgCode, graphId) {\n\t      var domParser = new DOMParser();\n\t      var svgHtml;\n\n\t      var injectSvgFallback = function injectSvgFallback(svg) {\n\t        return svg.replace('<svg ', '<svg style=\"max-width:100%;height:auto;font-family:sans-serif;\" ');\n\t      };\n\n\t      try {\n\t        var svgDoc =\n\t        /** @type {XMLDocument} */\n\t        domParser.parseFromString(svgCode, 'image/svg+xml');\n\t        var svgDom =\n\t        /** @type {SVGSVGElement} */\n\n\t        /** @type {any} */\n\t        svgDoc.documentElement; // tagName不是svg时，说明存在parse error\n\n\t        if (svgDom.tagName.toLowerCase() === 'svg') {\n\t          svgDom.style.maxWidth = '100%';\n\t          svgDom.style.height = 'auto';\n\t          svgDom.style.fontFamily = 'sans-serif';\n\t          var shadowSvg =\n\t          /** @type {SVGSVGElement} */\n\n\t          /** @type {any} */\n\t          document.getElementById(graphId);\n\t          var svgBox = shadowSvg.getBBox();\n\n\t          if (!svgDom.hasAttribute('viewBox')) {\n\t            var _context;\n\n\t            svgDom.setAttribute('viewBox', concat$5(_context = \"0 0 \".concat(svgBox.width, \" \")).call(_context, svgBox.height));\n\t          } else {\n\t            svgBox = svgDom.viewBox.baseVal;\n\t          }\n\n\t          svgDom.getAttribute('width') === '100%' && svgDom.setAttribute('width', \"\".concat(svgBox.width));\n\t          svgDom.getAttribute('height') === '100%' && svgDom.setAttribute('height', \"\".concat(svgBox.height)); // fix end\n\n\t          svgHtml = svgDoc.documentElement.outerHTML; // 屏蔽转img标签功能，如需要转换为img解除屏蔽即可\n\n\t          if (this.svg2img) {\n\t            var _context2;\n\n\t            var dataUrl = \"data:image/svg+xml,\".concat(encodeURIComponent(svgDoc.documentElement.outerHTML));\n\t            svgHtml = concat$5(_context2 = \"<img class=\\\"svg-img\\\" src=\\\"\".concat(dataUrl, \"\\\" alt=\\\"\")).call(_context2, graphId, \"\\\" />\");\n\t          }\n\t        } else {\n\t          svgHtml = injectSvgFallback(svgCode);\n\t        }\n\t      } catch (e) {\n\t        svgHtml = injectSvgFallback(svgCode);\n\t      }\n\n\t      return svgHtml;\n\t    }\n\t  }, {\n\t    key: \"render\",\n\t    value: function render(src, sign, $engine) {\n\t      var _context3,\n\t          _config$svg2img,\n\t          _this = this;\n\n\t      var config = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};\n\t      var $sign = sign;\n\n\t      if (!$sign) {\n\t        $sign = Math.round(Math.random() * 100000000);\n\t      }\n\n\t      this.mountMermaidCanvas($engine);\n\t      var html; // 多实例的情况下相同的内容ID相同会导致mermaid渲染异常\n\t      // 需要通过添加时间戳使得多次渲染相同内容的图像ID唯一\n\t      // 图像渲染节流在CodeBlock Hook内部控制\n\n\t      var graphId = concat$5(_context3 = \"mermaid-\".concat($sign, \"-\")).call(_context3, new Date().getTime());\n\n\t      this.svg2img = (_config$svg2img = config === null || config === void 0 ? void 0 : config.svg2img) !== null && _config$svg2img !== void 0 ? _config$svg2img : false;\n\n\t      try {\n\t        this.mermaidAPIRefs.render(graphId, src, function (svgCode) {\n\t          var fixedSvg = svgCode.replace(/\\s*markerUnits=\"0\"/g, '').replace(/\\s*x=\"NaN\"/g, '').replace(/<br>/g, '<br/>');\n\t          html = _this.convertMermaidSvgToImg(fixedSvg, graphId);\n\t        }, this.mermaidCanvas);\n\t      } catch (e) {\n\t        return e === null || e === void 0 ? void 0 : e.str;\n\t      }\n\n\t      return html;\n\t    }\n\t  }], [{\n\t    key: \"install\",\n\t    value: function install(cherryOptions) {\n\t      for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n\t        args[_key - 1] = arguments[_key];\n\t      }\n\n\t      mergeWith_1(cherryOptions, {\n\t        engine: {\n\t          syntax: {\n\t            codeBlock: {\n\t              customRenderer: {\n\t                mermaid: _construct(MermaidCodeEngine, args)\n\t              }\n\t            }\n\t          }\n\t        }\n\t      });\n\t    }\n\t  }]);\n\n\t  return MermaidCodeEngine;\n\t}();\n\n\t_defineProperty(MermaidCodeEngine, \"TYPE\", 'figure');\n\n\t// @ts-nocheck\n\n\t/*\n\t * $Id: rawdeflate.js,v 0.3 2009/03/01 19:05:05 dankogai Exp dankogai $\n\t *\n\t * Original:\n\t *   http://www.onicos.com/staff/iz/amuse/javascript/expert/deflate.txt\n\t */\n\t// if run as a web worker, respond to messages by deflating them\n\tvar deflate = function () {\n\t  /* Copyright (C) 1999 Masanao Izumo <iz@onicos.co.jp>\n\t   * Version: 1.0.1\n\t   * LastModified: Dec 25 1999\n\t   */\n\n\t  /* Interface:\n\t   * data = deflate(src);\n\t   */\n\n\t  /* constant parameters */\n\t  var zip_WSIZE = 32768; // Sliding Window size\n\n\t  var zip_STORED_BLOCK = 0;\n\t  var zip_STATIC_TREES = 1;\n\t  var zip_DYN_TREES = 2;\n\t  /* for deflate */\n\n\t  var zip_DEFAULT_LEVEL = 6;\n\t  var zip_INBUFSIZ = 32768; // Input buffer size\n\n\t  var zip_INBUF_EXTRA = 64; // Extra buffer\n\n\t  var zip_OUTBUFSIZ = 1024 * 8;\n\t  var zip_window_size = 2 * zip_WSIZE;\n\t  var zip_MIN_MATCH = 3;\n\t  var zip_MAX_MATCH = 258;\n\t  var zip_BITS = 16; // for SMALL_MEM\n\n\t  var zip_LIT_BUFSIZE = 0x2000;\n\t  var zip_HASH_BITS = 13; // for MEDIUM_MEM\n\t  // var zip_LIT_BUFSIZE = 0x4000;\n\t  // var zip_HASH_BITS = 14;\n\t  // for BIG_MEM\n\t  // var zip_LIT_BUFSIZE = 0x8000;\n\t  // var zip_HASH_BITS = 15;\n\t  // if(zip_LIT_BUFSIZE > zip_INBUFSIZ)\n\t  //    alert(\"error: zip_INBUFSIZ is too small\");\n\t  // if((zip_WSIZE<<1) > (1<<zip_BITS))\n\t  //    alert(\"error: zip_WSIZE is too large\");\n\t  // if(zip_HASH_BITS > zip_BITS-1)\n\t  //    alert(\"error: zip_HASH_BITS is too large\");\n\t  // if(zip_HASH_BITS < 8 || zip_MAX_MATCH != 258)\n\t  //    alert(\"error: Code too clever\");\n\n\t  var zip_DIST_BUFSIZE = zip_LIT_BUFSIZE;\n\t  var zip_HASH_SIZE = 1 << zip_HASH_BITS;\n\t  var zip_HASH_MASK = zip_HASH_SIZE - 1;\n\t  var zip_WMASK = zip_WSIZE - 1;\n\t  var zip_NIL = 0; // Tail of hash chains\n\n\t  var zip_TOO_FAR = 4096;\n\t  var zip_MIN_LOOKAHEAD = zip_MAX_MATCH + zip_MIN_MATCH + 1;\n\t  var zip_MAX_DIST = zip_WSIZE - zip_MIN_LOOKAHEAD;\n\t  var zip_SMALLEST = 1;\n\t  var zip_MAX_BITS = 15;\n\t  var zip_MAX_BL_BITS = 7;\n\t  var zip_LENGTH_CODES = 29;\n\t  var zip_LITERALS = 256;\n\t  var zip_END_BLOCK = 256;\n\t  var zip_L_CODES = zip_LITERALS + 1 + zip_LENGTH_CODES;\n\t  var zip_D_CODES = 30;\n\t  var zip_BL_CODES = 19;\n\t  var zip_REP_3_6 = 16;\n\t  var zip_REPZ_3_10 = 17;\n\t  var zip_REPZ_11_138 = 18;\n\t  var zip_HEAP_SIZE = 2 * zip_L_CODES + 1;\n\n\t  var zip_H_SHIFT = _parseInt$2((zip_HASH_BITS + zip_MIN_MATCH - 1) / zip_MIN_MATCH);\n\t  /* variables */\n\n\n\t  var zip_free_queue;\n\t  var zip_qhead;\n\t  var zip_qtail;\n\t  var zip_initflag;\n\t  var zip_outbuf = null;\n\t  var zip_outcnt;\n\t  var zip_outoff;\n\t  var zip_complete;\n\t  var zip_window;\n\t  var zip_d_buf;\n\t  var zip_l_buf;\n\t  var zip_prev;\n\t  var zip_bi_buf;\n\t  var zip_bi_valid;\n\t  var zip_block_start;\n\t  var zip_ins_h;\n\t  var zip_hash_head;\n\t  var zip_prev_match;\n\t  var zip_match_available;\n\t  var zip_match_length;\n\t  var zip_prev_length;\n\t  var zip_strstart;\n\t  var zip_match_start;\n\t  var zip_eofile;\n\t  var zip_lookahead;\n\t  var zip_max_chain_length;\n\t  var zip_max_lazy_match;\n\t  var zip_compr_level;\n\t  var zip_good_match;\n\t  var zip_dyn_ltree;\n\t  var zip_dyn_dtree;\n\t  var zip_static_ltree;\n\t  var zip_static_dtree;\n\t  var zip_bl_tree;\n\t  var zip_l_desc;\n\t  var zip_d_desc;\n\t  var zip_bl_desc;\n\t  var zip_bl_count;\n\t  var zip_heap;\n\t  var zip_heap_len;\n\t  var zip_heap_max;\n\t  var zip_depth;\n\t  var zip_length_code;\n\t  var zip_dist_code;\n\t  var zip_base_length;\n\t  var zip_base_dist;\n\t  var zip_flag_buf;\n\t  var zip_last_lit;\n\t  var zip_last_dist;\n\t  var zip_last_flags;\n\t  var zip_flags;\n\t  var zip_flag_bit;\n\t  var zip_opt_len;\n\t  var zip_static_len;\n\t  var zip_deflate_data;\n\t  var zip_deflate_pos;\n\t  /* objects (deflate) */\n\n\t  function zip_DeflateCT() {\n\t    this.fc = 0; // frequency count or bit string\n\n\t    this.dl = 0; // father node in Huffman tree or length of bit string\n\t  }\n\n\t  function zip_DeflateTreeDesc() {\n\t    this.dyn_tree = null; // the dynamic tree\n\n\t    this.static_tree = null; // corresponding static tree or NULL\n\n\t    this.extra_bits = null; // extra bits for each code or NULL\n\n\t    this.extra_base = 0; // base index for extra_bits\n\n\t    this.elems = 0; // max number of elements in the tree\n\n\t    this.max_length = 0; // max bit length for the codes\n\n\t    this.max_code = 0; // largest code with non zero frequency\n\t  }\n\t  /* Values for max_lazy_match, good_match and max_chain_length, depending on\n\t   * the desired pack level (0..9). The values given below have been tuned to\n\t   * exclude worst case performance for pathological files. Better values may be\n\t   * found for specific files.\n\t   */\n\n\n\t  function zip_DeflateConfiguration(a, b, c, d) {\n\t    this.good_length = a; // reduce lazy search above this match length\n\n\t    this.max_lazy = b; // do not perform lazy search above this match length\n\n\t    this.nice_length = c; // quit search above this match length\n\n\t    this.max_chain = d;\n\t  }\n\n\t  function zip_DeflateBuffer() {\n\t    this.next = null;\n\t    this.len = 0;\n\t    this.ptr = new Array(zip_OUTBUFSIZ);\n\t    this.off = 0;\n\t  }\n\t  /* constant tables */\n\n\n\t  var zip_extra_lbits = [0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0];\n\t  var zip_extra_dbits = [0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13];\n\t  var zip_extra_blbits = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 7];\n\t  var zip_bl_order = [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15];\n\t  var zip_configuration_table = [new zip_DeflateConfiguration(0, 0, 0, 0), new zip_DeflateConfiguration(4, 4, 8, 4), new zip_DeflateConfiguration(4, 5, 16, 8), new zip_DeflateConfiguration(4, 6, 32, 32), new zip_DeflateConfiguration(4, 4, 16, 16), new zip_DeflateConfiguration(8, 16, 32, 32), new zip_DeflateConfiguration(8, 16, 128, 128), new zip_DeflateConfiguration(8, 32, 128, 256), new zip_DeflateConfiguration(32, 128, 258, 1024), new zip_DeflateConfiguration(32, 258, 258, 4096)];\n\t  /* routines (deflate) */\n\n\t  function zip_deflate_start(level) {\n\t    var i;\n\t    if (!level) level = zip_DEFAULT_LEVEL;else if (level < 1) level = 1;else if (level > 9) level = 9;\n\t    zip_compr_level = level;\n\t    zip_initflag = false;\n\t    zip_eofile = false;\n\t    if (zip_outbuf != null) return;\n\t    zip_free_queue = zip_qhead = zip_qtail = null;\n\t    zip_outbuf = new Array(zip_OUTBUFSIZ);\n\t    zip_window = new Array(zip_window_size);\n\t    zip_d_buf = new Array(zip_DIST_BUFSIZE);\n\t    zip_l_buf = new Array(zip_INBUFSIZ + zip_INBUF_EXTRA);\n\t    zip_prev = new Array(1 << zip_BITS);\n\t    zip_dyn_ltree = new Array(zip_HEAP_SIZE);\n\n\t    for (i = 0; i < zip_HEAP_SIZE; i++) {\n\t      zip_dyn_ltree[i] = new zip_DeflateCT();\n\t    }\n\n\t    zip_dyn_dtree = new Array(2 * zip_D_CODES + 1);\n\n\t    for (i = 0; i < 2 * zip_D_CODES + 1; i++) {\n\t      zip_dyn_dtree[i] = new zip_DeflateCT();\n\t    }\n\n\t    zip_static_ltree = new Array(zip_L_CODES + 2);\n\n\t    for (i = 0; i < zip_L_CODES + 2; i++) {\n\t      zip_static_ltree[i] = new zip_DeflateCT();\n\t    }\n\n\t    zip_static_dtree = new Array(zip_D_CODES);\n\n\t    for (i = 0; i < zip_D_CODES; i++) {\n\t      zip_static_dtree[i] = new zip_DeflateCT();\n\t    }\n\n\t    zip_bl_tree = new Array(2 * zip_BL_CODES + 1);\n\n\t    for (i = 0; i < 2 * zip_BL_CODES + 1; i++) {\n\t      zip_bl_tree[i] = new zip_DeflateCT();\n\t    }\n\n\t    zip_l_desc = new zip_DeflateTreeDesc();\n\t    zip_d_desc = new zip_DeflateTreeDesc();\n\t    zip_bl_desc = new zip_DeflateTreeDesc();\n\t    zip_bl_count = new Array(zip_MAX_BITS + 1);\n\t    zip_heap = new Array(2 * zip_L_CODES + 1);\n\t    zip_depth = new Array(2 * zip_L_CODES + 1);\n\t    zip_length_code = new Array(zip_MAX_MATCH - zip_MIN_MATCH + 1);\n\t    zip_dist_code = new Array(512);\n\t    zip_base_length = new Array(zip_LENGTH_CODES);\n\t    zip_base_dist = new Array(zip_D_CODES);\n\t    zip_flag_buf = new Array(_parseInt$2(zip_LIT_BUFSIZE / 8));\n\t  }\n\n\t  function zip_reuse_queue(p) {\n\t    p.next = zip_free_queue;\n\t    zip_free_queue = p;\n\t  }\n\n\t  function zip_new_queue() {\n\t    var p;\n\n\t    if (zip_free_queue != null) {\n\t      p = zip_free_queue;\n\t      zip_free_queue = zip_free_queue.next;\n\t    } else p = new zip_DeflateBuffer();\n\n\t    p.next = null;\n\t    p.len = p.off = 0;\n\t    return p;\n\t  }\n\n\t  function zip_head1(i) {\n\t    return zip_prev[zip_WSIZE + i];\n\t  }\n\n\t  function zip_head2(i, val) {\n\t    return zip_prev[zip_WSIZE + i] = val;\n\t  }\n\t  /* put_byte is used for the compressed output, put_ubyte for the\n\t   * uncompressed output. However unlzw() uses window for its\n\t   * suffix table instead of its output buffer, so it does not use put_ubyte\n\t   * (to be cleaned up).\n\t   */\n\n\n\t  function zip_put_byte(c) {\n\t    zip_outbuf[zip_outoff + zip_outcnt++] = c;\n\t    if (zip_outoff + zip_outcnt == zip_OUTBUFSIZ) zip_qoutbuf();\n\t  }\n\t  /* Output a 16 bit value, lsb first */\n\n\n\t  function zip_put_short(w) {\n\t    w &= 0xffff;\n\n\t    if (zip_outoff + zip_outcnt < zip_OUTBUFSIZ - 2) {\n\t      zip_outbuf[zip_outoff + zip_outcnt++] = w & 0xff;\n\t      zip_outbuf[zip_outoff + zip_outcnt++] = w >>> 8;\n\t    } else {\n\t      zip_put_byte(w & 0xff);\n\t      zip_put_byte(w >>> 8);\n\t    }\n\t  }\n\t  /* ==========================================================================\n\t   * Insert string s in the dictionary and set match_head to the previous head\n\t   * of the hash chain (the most recent string with same hash key). Return\n\t   * the previous length of the hash chain.\n\t   * IN  assertion: all calls to to INSERT_STRING are made with consecutive\n\t   *    input characters and the first MIN_MATCH bytes of s are valid\n\t   *    (except for the last MIN_MATCH-1 bytes of the input file).\n\t   */\n\n\n\t  function zip_INSERT_STRING() {\n\t    zip_ins_h = (zip_ins_h << zip_H_SHIFT ^ zip_window[zip_strstart + zip_MIN_MATCH - 1] & 0xff) & zip_HASH_MASK;\n\t    zip_hash_head = zip_head1(zip_ins_h);\n\t    zip_prev[zip_strstart & zip_WMASK] = zip_hash_head;\n\t    zip_head2(zip_ins_h, zip_strstart);\n\t  }\n\t  /* Send a code of the given tree. c and tree must not have side effects */\n\n\n\t  function zip_SEND_CODE(c, tree) {\n\t    zip_send_bits(tree[c].fc, tree[c].dl);\n\t  }\n\t  /* Mapping from a distance to a distance code. dist is the distance - 1 and\n\t   * must not have side effects. dist_code[256] and dist_code[257] are never\n\t   * used.\n\t   */\n\n\n\t  function zip_D_CODE(dist) {\n\t    return (dist < 256 ? zip_dist_code[dist] : zip_dist_code[256 + (dist >> 7)]) & 0xff;\n\t  }\n\t  /* ==========================================================================\n\t   * Compares to subtrees, using the tree depth as tie breaker when\n\t   * the subtrees have equal frequency. This minimizes the worst case length.\n\t   */\n\n\n\t  function zip_SMALLER(tree, n, m) {\n\t    return tree[n].fc < tree[m].fc || tree[n].fc == tree[m].fc && zip_depth[n] <= zip_depth[m];\n\t  }\n\t  /* ==========================================================================\n\t   * read string data\n\t   */\n\n\n\t  function zip_read_buff(buff, offset, n) {\n\t    var i;\n\n\t    for (i = 0; i < n && zip_deflate_pos < zip_deflate_data.length; i++) {\n\t      buff[offset + i] = zip_deflate_data.charCodeAt(zip_deflate_pos++) & 0xff;\n\t    }\n\n\t    return i;\n\t  }\n\t  /* ==========================================================================\n\t   * Initialize the \"longest match\" routines for a new file\n\t   */\n\n\n\t  function zip_lm_init() {\n\t    var j;\n\t    /* Initialize the hash table. */\n\n\t    for (j = 0; j < zip_HASH_SIZE; j++) {\n\t      //\tzip_head2(j, zip_NIL);\n\t      zip_prev[zip_WSIZE + j] = 0;\n\t    }\n\t    /* prev will be initialized on the fly */\n\n\t    /* Set the default configuration parameters:\n\t     */\n\n\n\t    zip_max_lazy_match = zip_configuration_table[zip_compr_level].max_lazy;\n\t    zip_good_match = zip_configuration_table[zip_compr_level].good_length;\n\t    zip_max_chain_length = zip_configuration_table[zip_compr_level].max_chain;\n\t    zip_strstart = 0;\n\t    zip_block_start = 0;\n\t    zip_lookahead = zip_read_buff(zip_window, 0, 2 * zip_WSIZE);\n\n\t    if (zip_lookahead <= 0) {\n\t      zip_eofile = true;\n\t      zip_lookahead = 0;\n\t      return;\n\t    }\n\n\t    zip_eofile = false;\n\t    /* Make sure that we always have enough lookahead. This is important\n\t     * if input comes from a device such as a tty.\n\t     */\n\n\t    while (zip_lookahead < zip_MIN_LOOKAHEAD && !zip_eofile) {\n\t      zip_fill_window();\n\t    }\n\t    /* If lookahead < MIN_MATCH, ins_h is garbage, but this is\n\t     * not important since only literal bytes will be emitted.\n\t     */\n\n\n\t    zip_ins_h = 0;\n\n\t    for (j = 0; j < zip_MIN_MATCH - 1; j++) {\n\t      //      UPDATE_HASH(ins_h, window[j]);\n\t      zip_ins_h = (zip_ins_h << zip_H_SHIFT ^ zip_window[j] & 0xff) & zip_HASH_MASK;\n\t    }\n\t  }\n\t  /* ==========================================================================\n\t   * Set match_start to the longest match starting at the given string and\n\t   * return its length. Matches shorter or equal to prev_length are discarded,\n\t   * in which case the result is equal to prev_length and match_start is\n\t   * garbage.\n\t   * IN assertions: cur_match is the head of the hash chain for the current\n\t   *   string (strstart) and its distance is <= MAX_DIST, and prev_length >= 1\n\t   */\n\n\n\t  function zip_longest_match(cur_match) {\n\t    var chain_length = zip_max_chain_length; // max hash chain length\n\n\t    var scanp = zip_strstart; // current string\n\n\t    var matchp; // matched string\n\n\t    var len; // length of current match\n\n\t    var best_len = zip_prev_length; // best match length so far\n\n\t    /* Stop when cur_match becomes <= limit. To simplify the code,\n\t     * we prevent matches with the string of window index 0.\n\t     */\n\n\t    var limit = zip_strstart > zip_MAX_DIST ? zip_strstart - zip_MAX_DIST : zip_NIL;\n\t    var strendp = zip_strstart + zip_MAX_MATCH;\n\t    var scan_end1 = zip_window[scanp + best_len - 1];\n\t    var scan_end = zip_window[scanp + best_len];\n\t    /* Do not waste too much time if we already have a good match: */\n\n\t    if (zip_prev_length >= zip_good_match) chain_length >>= 2; //  Assert(encoder->strstart <= window_size-MIN_LOOKAHEAD, \"insufficient lookahead\");\n\n\t    do {\n\t      //    Assert(cur_match < encoder->strstart, \"no future\");\n\t      matchp = cur_match;\n\t      /* Skip to next match if the match length cannot increase\n\t       * or if the match length is less than 2:\n\t       */\n\n\t      if (zip_window[matchp + best_len] != scan_end || zip_window[matchp + best_len - 1] != scan_end1 || zip_window[matchp] != zip_window[scanp] || zip_window[++matchp] != zip_window[scanp + 1]) {\n\t        continue;\n\t      }\n\t      /* The check at best_len-1 can be removed because it will be made\n\t       * again later. (This heuristic is not always a win.)\n\t       * It is not necessary to compare scan[2] and match[2] since they\n\t       * are always equal when the other bytes match, given that\n\t       * the hash keys are equal and that HASH_BITS >= 8.\n\t       */\n\n\n\t      scanp += 2;\n\t      matchp++;\n\t      /* We check for insufficient lookahead only every 8th comparison;\n\t       * the 256th check will be made at strstart+258.\n\t       */\n\n\t      do {} while (zip_window[++scanp] == zip_window[++matchp] && zip_window[++scanp] == zip_window[++matchp] && zip_window[++scanp] == zip_window[++matchp] && zip_window[++scanp] == zip_window[++matchp] && zip_window[++scanp] == zip_window[++matchp] && zip_window[++scanp] == zip_window[++matchp] && zip_window[++scanp] == zip_window[++matchp] && zip_window[++scanp] == zip_window[++matchp] && scanp < strendp);\n\n\t      len = zip_MAX_MATCH - (strendp - scanp);\n\t      scanp = strendp - zip_MAX_MATCH;\n\n\t      if (len > best_len) {\n\t        zip_match_start = cur_match;\n\t        best_len = len;\n\n\t        {\n\t          if (len >= zip_MAX_MATCH) break;\n\t        }\n\n\t        scan_end1 = zip_window[scanp + best_len - 1];\n\t        scan_end = zip_window[scanp + best_len];\n\t      }\n\t    } while ((cur_match = zip_prev[cur_match & zip_WMASK]) > limit && --chain_length != 0);\n\n\t    return best_len;\n\t  }\n\t  /* ==========================================================================\n\t   * Fill the window when the lookahead becomes insufficient.\n\t   * Updates strstart and lookahead, and sets eofile if end of input file.\n\t   * IN assertion: lookahead < MIN_LOOKAHEAD && strstart + lookahead > 0\n\t   * OUT assertions: at least one byte has been read, or eofile is set;\n\t   *    file reads are performed for at least two bytes (required for the\n\t   *    translate_eol option).\n\t   */\n\n\n\t  function zip_fill_window() {\n\t    var n;\n\t    var m; // Amount of free space at the end of the window.\n\n\t    var more = zip_window_size - zip_lookahead - zip_strstart;\n\t    /* If the window is almost full and there is insufficient lookahead,\n\t     * move the upper half to the lower one to make room in the upper half.\n\t     */\n\n\t    if (more == -1) {\n\t      /* Very unlikely, but possible on 16 bit machine if strstart == 0\n\t       * and lookahead == 1 (input done one byte at time)\n\t       */\n\t      more--;\n\t    } else if (zip_strstart >= zip_WSIZE + zip_MAX_DIST) {\n\t      /* By the IN assertion, the window is not empty so we can't confuse\n\t       * more == 0 with more == 64K on a 16 bit machine.\n\t       */\n\t      //\tAssert(window_size == (ulg)2*WSIZE, \"no sliding with BIG_MEM\");\n\t      //\tSystem.arraycopy(window, WSIZE, window, 0, WSIZE);\n\t      for (n = 0; n < zip_WSIZE; n++) {\n\t        zip_window[n] = zip_window[n + zip_WSIZE];\n\t      }\n\n\t      zip_match_start -= zip_WSIZE;\n\t      zip_strstart -= zip_WSIZE;\n\t      /* we now have strstart >= MAX_DIST: */\n\n\t      zip_block_start -= zip_WSIZE;\n\n\t      for (n = 0; n < zip_HASH_SIZE; n++) {\n\t        m = zip_head1(n);\n\t        zip_head2(n, m >= zip_WSIZE ? m - zip_WSIZE : zip_NIL);\n\t      }\n\n\t      for (n = 0; n < zip_WSIZE; n++) {\n\t        /* If n is not on any hash chain, prev[n] is garbage but\n\t         * its value will never be used.\n\t         */\n\t        m = zip_prev[n];\n\t        zip_prev[n] = m >= zip_WSIZE ? m - zip_WSIZE : zip_NIL;\n\t      }\n\n\t      more += zip_WSIZE;\n\t    } // At this point, more >= 2\n\n\n\t    if (!zip_eofile) {\n\t      n = zip_read_buff(zip_window, zip_strstart + zip_lookahead, more);\n\t      if (n <= 0) zip_eofile = true;else zip_lookahead += n;\n\t    }\n\t  }\n\t  /* ==========================================================================\n\t   * Processes a new input file and return its compressed length. This\n\t   * function does not perform lazy evaluationof matches and inserts\n\t   * new strings in the dictionary only for unmatched strings or for short\n\t   * matches. It is used only for the fast compression options.\n\t   */\n\n\n\t  function zip_deflate_fast() {\n\t    while (zip_lookahead != 0 && zip_qhead == null) {\n\t      var flush; // set if current block must be flushed\n\n\t      /* Insert the string window[strstart .. strstart+2] in the\n\t       * dictionary, and set hash_head to the head of the hash chain:\n\t       */\n\n\t      zip_INSERT_STRING();\n\t      /* Find the longest match, discarding those <= prev_length.\n\t       * At this point we have always match_length < MIN_MATCH\n\t       */\n\n\t      if (zip_hash_head != zip_NIL && zip_strstart - zip_hash_head <= zip_MAX_DIST) {\n\t        /* To simplify the code, we prevent matches with the string\n\t         * of window index 0 (in particular we have to avoid a match\n\t         * of the string with itself at the start of the input file).\n\t         */\n\t        zip_match_length = zip_longest_match(zip_hash_head);\n\t        /* longest_match() sets match_start */\n\n\t        if (zip_match_length > zip_lookahead) zip_match_length = zip_lookahead;\n\t      }\n\n\t      if (zip_match_length >= zip_MIN_MATCH) {\n\t        //\t    check_match(strstart, match_start, match_length);\n\t        flush = zip_ct_tally(zip_strstart - zip_match_start, zip_match_length - zip_MIN_MATCH);\n\t        zip_lookahead -= zip_match_length;\n\t        /* Insert new strings in the hash table only if the match length\n\t         * is not too large. This saves time but degrades compression.\n\t         */\n\n\t        if (zip_match_length <= zip_max_lazy_match) {\n\t          zip_match_length--; // string at strstart already in hash table\n\n\t          do {\n\t            zip_strstart++;\n\t            zip_INSERT_STRING();\n\t            /* strstart never exceeds WSIZE-MAX_MATCH, so there are\n\t             * always MIN_MATCH bytes ahead. If lookahead < MIN_MATCH\n\t             * these bytes are garbage, but it does not matter since\n\t             * the next lookahead bytes will be emitted as literals.\n\t             */\n\t          } while (--zip_match_length != 0);\n\n\t          zip_strstart++;\n\t        } else {\n\t          zip_strstart += zip_match_length;\n\t          zip_match_length = 0;\n\t          zip_ins_h = zip_window[zip_strstart] & 0xff; //\t\tUPDATE_HASH(ins_h, window[strstart + 1]);\n\n\t          zip_ins_h = (zip_ins_h << zip_H_SHIFT ^ zip_window[zip_strstart + 1] & 0xff) & zip_HASH_MASK; // #if MIN_MATCH != 3\n\t          //\t\tCall UPDATE_HASH() MIN_MATCH-3 more times\n\t          // #endif\n\t        }\n\t      } else {\n\t        /* No match, output a literal byte */\n\t        flush = zip_ct_tally(0, zip_window[zip_strstart] & 0xff);\n\t        zip_lookahead--;\n\t        zip_strstart++;\n\t      }\n\n\t      if (flush) {\n\t        zip_flush_block(0);\n\t        zip_block_start = zip_strstart;\n\t      }\n\t      /* Make sure that we always have enough lookahead, except\n\t       * at the end of the input file. We need MAX_MATCH bytes\n\t       * for the next match, plus MIN_MATCH bytes to insert the\n\t       * string following the next match.\n\t       */\n\n\n\t      while (zip_lookahead < zip_MIN_LOOKAHEAD && !zip_eofile) {\n\t        zip_fill_window();\n\t      }\n\t    }\n\t  }\n\n\t  function zip_deflate_better() {\n\t    /* Process the input block. */\n\t    while (zip_lookahead != 0 && zip_qhead == null) {\n\t      /* Insert the string window[strstart .. strstart+2] in the\n\t       * dictionary, and set hash_head to the head of the hash chain:\n\t       */\n\t      zip_INSERT_STRING();\n\t      /* Find the longest match, discarding those <= prev_length.\n\t       */\n\n\t      zip_prev_length = zip_match_length;\n\t      zip_prev_match = zip_match_start;\n\t      zip_match_length = zip_MIN_MATCH - 1;\n\n\t      if (zip_hash_head != zip_NIL && zip_prev_length < zip_max_lazy_match && zip_strstart - zip_hash_head <= zip_MAX_DIST) {\n\t        /* To simplify the code, we prevent matches with the string\n\t         * of window index 0 (in particular we have to avoid a match\n\t         * of the string with itself at the start of the input file).\n\t         */\n\t        zip_match_length = zip_longest_match(zip_hash_head);\n\t        /* longest_match() sets match_start */\n\n\t        if (zip_match_length > zip_lookahead) zip_match_length = zip_lookahead;\n\t        /* Ignore a length 3 match if it is too distant: */\n\n\t        if (zip_match_length == zip_MIN_MATCH && zip_strstart - zip_match_start > zip_TOO_FAR) {\n\t          /* If prev_match is also MIN_MATCH, match_start is garbage\n\t           * but we will ignore the current match anyway.\n\t           */\n\t          zip_match_length--;\n\t        }\n\t      }\n\t      /* If there was a match at the previous step and the current\n\t       * match is not better, output the previous match:\n\t       */\n\n\n\t      if (zip_prev_length >= zip_MIN_MATCH && zip_match_length <= zip_prev_length) {\n\t        var flush; // set if current block must be flushed\n\t        //\t    check_match(strstart - 1, prev_match, prev_length);\n\n\t        flush = zip_ct_tally(zip_strstart - 1 - zip_prev_match, zip_prev_length - zip_MIN_MATCH);\n\t        /* Insert in hash table all strings up to the end of the match.\n\t         * strstart-1 and strstart are already inserted.\n\t         */\n\n\t        zip_lookahead -= zip_prev_length - 1;\n\t        zip_prev_length -= 2;\n\n\t        do {\n\t          zip_strstart++;\n\t          zip_INSERT_STRING();\n\t          /* strstart never exceeds WSIZE-MAX_MATCH, so there are\n\t           * always MIN_MATCH bytes ahead. If lookahead < MIN_MATCH\n\t           * these bytes are garbage, but it does not matter since the\n\t           * next lookahead bytes will always be emitted as literals.\n\t           */\n\t        } while (--zip_prev_length != 0);\n\n\t        zip_match_available = 0;\n\t        zip_match_length = zip_MIN_MATCH - 1;\n\t        zip_strstart++;\n\n\t        if (flush) {\n\t          zip_flush_block(0);\n\t          zip_block_start = zip_strstart;\n\t        }\n\t      } else if (zip_match_available != 0) {\n\t        /* If there was no match at the previous position, output a\n\t         * single literal. If there was a match but the current match\n\t         * is longer, truncate the previous match to a single literal.\n\t         */\n\t        if (zip_ct_tally(0, zip_window[zip_strstart - 1] & 0xff)) {\n\t          zip_flush_block(0);\n\t          zip_block_start = zip_strstart;\n\t        }\n\n\t        zip_strstart++;\n\t        zip_lookahead--;\n\t      } else {\n\t        /* There is no previous match to compare with, wait for\n\t         * the next step to decide.\n\t         */\n\t        zip_match_available = 1;\n\t        zip_strstart++;\n\t        zip_lookahead--;\n\t      }\n\t      /* Make sure that we always have enough lookahead, except\n\t       * at the end of the input file. We need MAX_MATCH bytes\n\t       * for the next match, plus MIN_MATCH bytes to insert the\n\t       * string following the next match.\n\t       */\n\n\n\t      while (zip_lookahead < zip_MIN_LOOKAHEAD && !zip_eofile) {\n\t        zip_fill_window();\n\t      }\n\t    }\n\t  }\n\n\t  function zip_init_deflate() {\n\t    if (zip_eofile) return;\n\t    zip_bi_buf = 0;\n\t    zip_bi_valid = 0;\n\t    zip_ct_init();\n\t    zip_lm_init();\n\t    zip_qhead = null;\n\t    zip_outcnt = 0;\n\t    zip_outoff = 0;\n\n\t    if (zip_compr_level <= 3) {\n\t      zip_prev_length = zip_MIN_MATCH - 1;\n\t      zip_match_length = 0;\n\t    } else {\n\t      zip_match_length = zip_MIN_MATCH - 1;\n\t      zip_match_available = 0;\n\t    }\n\n\t    zip_complete = false;\n\t  }\n\t  /* ==========================================================================\n\t   * Same as above, but achieves better compression. We use a lazy\n\t   * evaluation for matches: a match is finally adopted only if there is\n\t   * no better match at the next window position.\n\t   */\n\n\n\t  function zip_deflate_internal(buff, off, buff_size) {\n\t    var n;\n\n\t    if (!zip_initflag) {\n\t      zip_init_deflate();\n\t      zip_initflag = true;\n\n\t      if (zip_lookahead == 0) {\n\t        // empty\n\t        zip_complete = true;\n\t        return 0;\n\t      }\n\t    }\n\n\t    if ((n = zip_qcopy(buff, off, buff_size)) == buff_size) return buff_size;\n\t    if (zip_complete) return n;\n\t    if (zip_compr_level <= 3) // optimized for speed\n\t      zip_deflate_fast();else zip_deflate_better();\n\n\t    if (zip_lookahead == 0) {\n\t      if (zip_match_available != 0) zip_ct_tally(0, zip_window[zip_strstart - 1] & 0xff);\n\t      zip_flush_block(1);\n\t      zip_complete = true;\n\t    }\n\n\t    return n + zip_qcopy(buff, n + off, buff_size - n);\n\t  }\n\n\t  function zip_qcopy(buff, off, buff_size) {\n\t    var n;\n\t    var i;\n\t    var j;\n\t    n = 0;\n\n\t    while (zip_qhead != null && n < buff_size) {\n\t      i = buff_size - n;\n\t      if (i > zip_qhead.len) i = zip_qhead.len; //      System.arraycopy(qhead.ptr, qhead.off, buff, off + n, i);\n\n\t      for (j = 0; j < i; j++) {\n\t        buff[off + n + j] = zip_qhead.ptr[zip_qhead.off + j];\n\t      }\n\n\t      zip_qhead.off += i;\n\t      zip_qhead.len -= i;\n\t      n += i;\n\n\t      if (zip_qhead.len == 0) {\n\t        var p;\n\t        p = zip_qhead;\n\t        zip_qhead = zip_qhead.next;\n\t        zip_reuse_queue(p);\n\t      }\n\t    }\n\n\t    if (n == buff_size) return n;\n\n\t    if (zip_outoff < zip_outcnt) {\n\t      i = buff_size - n;\n\t      if (i > zip_outcnt - zip_outoff) i = zip_outcnt - zip_outoff; // System.arraycopy(outbuf, outoff, buff, off + n, i);\n\n\t      for (j = 0; j < i; j++) {\n\t        buff[off + n + j] = zip_outbuf[zip_outoff + j];\n\t      }\n\n\t      zip_outoff += i;\n\t      n += i;\n\t      if (zip_outcnt == zip_outoff) zip_outcnt = zip_outoff = 0;\n\t    }\n\n\t    return n;\n\t  }\n\t  /* ==========================================================================\n\t   * Allocate the match buffer, initialize the various tables and save the\n\t   * location of the internal file attribute (ascii/binary) and method\n\t   * (DEFLATE/STORE).\n\t   */\n\n\n\t  function zip_ct_init() {\n\t    var n; // iterates over tree elements\n\n\t    var bits; // bit counter\n\n\t    var length; // length value\n\n\t    var code; // code value\n\n\t    var dist; // distance index\n\n\t    if (zip_static_dtree[0].dl != 0) return; // ct_init already called\n\n\t    zip_l_desc.dyn_tree = zip_dyn_ltree;\n\t    zip_l_desc.static_tree = zip_static_ltree;\n\t    zip_l_desc.extra_bits = zip_extra_lbits;\n\t    zip_l_desc.extra_base = zip_LITERALS + 1;\n\t    zip_l_desc.elems = zip_L_CODES;\n\t    zip_l_desc.max_length = zip_MAX_BITS;\n\t    zip_l_desc.max_code = 0;\n\t    zip_d_desc.dyn_tree = zip_dyn_dtree;\n\t    zip_d_desc.static_tree = zip_static_dtree;\n\t    zip_d_desc.extra_bits = zip_extra_dbits;\n\t    zip_d_desc.extra_base = 0;\n\t    zip_d_desc.elems = zip_D_CODES;\n\t    zip_d_desc.max_length = zip_MAX_BITS;\n\t    zip_d_desc.max_code = 0;\n\t    zip_bl_desc.dyn_tree = zip_bl_tree;\n\t    zip_bl_desc.static_tree = null;\n\t    zip_bl_desc.extra_bits = zip_extra_blbits;\n\t    zip_bl_desc.extra_base = 0;\n\t    zip_bl_desc.elems = zip_BL_CODES;\n\t    zip_bl_desc.max_length = zip_MAX_BL_BITS;\n\t    zip_bl_desc.max_code = 0; // Initialize the mapping length (0..255) -> length code (0..28)\n\n\t    length = 0;\n\n\t    for (code = 0; code < zip_LENGTH_CODES - 1; code++) {\n\t      zip_base_length[code] = length;\n\n\t      for (n = 0; n < 1 << zip_extra_lbits[code]; n++) {\n\t        zip_length_code[length++] = code;\n\t      }\n\t    } // Assert (length == 256, \"ct_init: length != 256\");\n\n\t    /* Note that the length 255 (match length 258) can be represented\n\t     * in two different ways: code 284 + 5 bits or code 285, so we\n\t     * overwrite length_code[255] to use the best encoding:\n\t     */\n\n\n\t    zip_length_code[length - 1] = code;\n\t    /* Initialize the mapping dist (0..32K) -> dist code (0..29) */\n\n\t    dist = 0;\n\n\t    for (code = 0; code < 16; code++) {\n\t      zip_base_dist[code] = dist;\n\n\t      for (n = 0; n < 1 << zip_extra_dbits[code]; n++) {\n\t        zip_dist_code[dist++] = code;\n\t      }\n\t    } // Assert (dist == 256, \"ct_init: dist != 256\");\n\n\n\t    dist >>= 7; // from now on, all distances are divided by 128\n\n\t    for (; code < zip_D_CODES; code++) {\n\t      zip_base_dist[code] = dist << 7;\n\n\t      for (n = 0; n < 1 << zip_extra_dbits[code] - 7; n++) {\n\t        zip_dist_code[256 + dist++] = code;\n\t      }\n\t    } // Assert (dist == 256, \"ct_init: 256+dist != 512\");\n\t    // Construct the codes of the static literal tree\n\n\n\t    for (bits = 0; bits <= zip_MAX_BITS; bits++) {\n\t      zip_bl_count[bits] = 0;\n\t    }\n\n\t    n = 0;\n\n\t    while (n <= 143) {\n\t      zip_static_ltree[n++].dl = 8;\n\t      zip_bl_count[8]++;\n\t    }\n\n\t    while (n <= 255) {\n\t      zip_static_ltree[n++].dl = 9;\n\t      zip_bl_count[9]++;\n\t    }\n\n\t    while (n <= 279) {\n\t      zip_static_ltree[n++].dl = 7;\n\t      zip_bl_count[7]++;\n\t    }\n\n\t    while (n <= 287) {\n\t      zip_static_ltree[n++].dl = 8;\n\t      zip_bl_count[8]++;\n\t    }\n\t    /* Codes 286 and 287 do not exist, but we must include them in the\n\t     * tree construction to get a canonical Huffman tree (longest code\n\t     * all ones)\n\t     */\n\n\n\t    zip_gen_codes(zip_static_ltree, zip_L_CODES + 1);\n\t    /* The static distance tree is trivial: */\n\n\t    for (n = 0; n < zip_D_CODES; n++) {\n\t      zip_static_dtree[n].dl = 5;\n\t      zip_static_dtree[n].fc = zip_bi_reverse(n, 5);\n\t    } // Initialize the first block of the first file:\n\n\n\t    zip_init_block();\n\t  }\n\t  /* ==========================================================================\n\t   * Initialize a new block.\n\t   */\n\n\n\t  function zip_init_block() {\n\t    var n; // iterates over tree elements\n\t    // Initialize the trees.\n\n\t    for (n = 0; n < zip_L_CODES; n++) {\n\t      zip_dyn_ltree[n].fc = 0;\n\t    }\n\n\t    for (n = 0; n < zip_D_CODES; n++) {\n\t      zip_dyn_dtree[n].fc = 0;\n\t    }\n\n\t    for (n = 0; n < zip_BL_CODES; n++) {\n\t      zip_bl_tree[n].fc = 0;\n\t    }\n\n\t    zip_dyn_ltree[zip_END_BLOCK].fc = 1;\n\t    zip_opt_len = zip_static_len = 0;\n\t    zip_last_lit = zip_last_dist = zip_last_flags = 0;\n\t    zip_flags = 0;\n\t    zip_flag_bit = 1;\n\t  }\n\t  /* ==========================================================================\n\t   * Restore the heap property by moving down the tree starting at node k,\n\t   * exchanging a node with the smallest of its two sons if necessary, stopping\n\t   * when the heap property is re-established (each father smaller than its\n\t   * two sons).\n\t   */\n\n\n\t  function zip_pqdownheap(tree, // the tree to restore\n\t  k) {\n\t    // node to move down\n\t    var v = zip_heap[k];\n\t    var j = k << 1; // left son of k\n\n\t    while (j <= zip_heap_len) {\n\t      // Set j to the smallest of the two sons:\n\t      if (j < zip_heap_len && zip_SMALLER(tree, zip_heap[j + 1], zip_heap[j])) j++; // Exit if v is smaller than both sons\n\n\t      if (zip_SMALLER(tree, v, zip_heap[j])) break; // Exchange v with the smallest son\n\n\t      zip_heap[k] = zip_heap[j];\n\t      k = j; // And continue down the tree, setting j to the left son of k\n\n\t      j <<= 1;\n\t    }\n\n\t    zip_heap[k] = v;\n\t  }\n\t  /* ==========================================================================\n\t   * Compute the optimal bit lengths for a tree and update the total bit length\n\t   * for the current block.\n\t   * IN assertion: the fields freq and dad are set, heap[heap_max] and\n\t   *    above are the tree nodes sorted by increasing frequency.\n\t   * OUT assertions: the field len is set to the optimal bit length, the\n\t   *     array bl_count contains the frequencies for each bit length.\n\t   *     The length opt_len is updated; static_len is also updated if stree is\n\t   *     not null.\n\t   */\n\n\n\t  function zip_gen_bitlen(desc) {\n\t    // the tree descriptor\n\t    var tree = desc.dyn_tree;\n\t    var extra = desc.extra_bits;\n\t    var base = desc.extra_base;\n\t    var max_code = desc.max_code;\n\t    var max_length = desc.max_length;\n\t    var stree = desc.static_tree;\n\t    var h; // heap index\n\n\t    var n;\n\t    var m; // iterate over the tree elements\n\n\t    var bits; // bit length\n\n\t    var xbits; // extra bits\n\n\t    var f; // frequency\n\n\t    var overflow = 0; // number of elements with bit length too large\n\n\t    for (bits = 0; bits <= zip_MAX_BITS; bits++) {\n\t      zip_bl_count[bits] = 0;\n\t    }\n\t    /* In a first pass, compute the optimal bit lengths (which may\n\t     * overflow in the case of the bit length tree).\n\t     */\n\n\n\t    tree[zip_heap[zip_heap_max]].dl = 0; // root of the heap\n\n\t    for (h = zip_heap_max + 1; h < zip_HEAP_SIZE; h++) {\n\t      n = zip_heap[h];\n\t      bits = tree[tree[n].dl].dl + 1;\n\n\t      if (bits > max_length) {\n\t        bits = max_length;\n\t        overflow++;\n\t      }\n\n\t      tree[n].dl = bits; // We overwrite tree[n].dl which is no longer needed\n\n\t      if (n > max_code) continue; // not a leaf node\n\n\t      zip_bl_count[bits]++;\n\t      xbits = 0;\n\t      if (n >= base) xbits = extra[n - base];\n\t      f = tree[n].fc;\n\t      zip_opt_len += f * (bits + xbits);\n\t      if (stree != null) zip_static_len += f * (stree[n].dl + xbits);\n\t    }\n\n\t    if (overflow == 0) return; // This happens for example on obj2 and pic of the Calgary corpus\n\t    // Find the first bit length which could increase:\n\n\t    do {\n\t      bits = max_length - 1;\n\n\t      while (zip_bl_count[bits] == 0) {\n\t        bits--;\n\t      }\n\n\t      zip_bl_count[bits]--; // move one leaf down the tree\n\n\t      zip_bl_count[bits + 1] += 2; // move one overflow item as its brother\n\n\t      zip_bl_count[max_length]--;\n\t      /* The brother of the overflow item also moves one step up,\n\t       * but this does not affect bl_count[max_length]\n\t       */\n\n\t      overflow -= 2;\n\t    } while (overflow > 0);\n\t    /* Now recompute all bit lengths, scanning in increasing frequency.\n\t     * h is still equal to HEAP_SIZE. (It is simpler to reconstruct all\n\t     * lengths instead of fixing only the wrong ones. This idea is taken\n\t     * from 'ar' written by Haruhiko Okumura.)\n\t     */\n\n\n\t    for (bits = max_length; bits != 0; bits--) {\n\t      n = zip_bl_count[bits];\n\n\t      while (n != 0) {\n\t        m = zip_heap[--h];\n\t        if (m > max_code) continue;\n\n\t        if (tree[m].dl != bits) {\n\t          zip_opt_len += (bits - tree[m].dl) * tree[m].fc;\n\t          tree[m].fc = bits;\n\t        }\n\n\t        n--;\n\t      }\n\t    }\n\t  }\n\t  /* ==========================================================================\n\t   * Generate the codes for a given tree and bit counts (which need not be\n\t   * optimal).\n\t   * IN assertion: the array bl_count contains the bit length statistics for\n\t   * the given tree and the field len is set for all tree elements.\n\t   * OUT assertion: the field code is set for all tree elements of non\n\t   *     zero code length.\n\t   */\n\n\n\t  function zip_gen_codes(tree, // the tree to decorate\n\t  max_code) {\n\t    // largest code with non zero frequency\n\t    var next_code = new Array(zip_MAX_BITS + 1); // next code value for each bit length\n\n\t    var code = 0; // running code value\n\n\t    var bits; // bit index\n\n\t    var n; // code index\n\n\t    /* The distribution counts are first used to generate the code values\n\t     * without bit reversal.\n\t     */\n\n\t    for (bits = 1; bits <= zip_MAX_BITS; bits++) {\n\t      code = code + zip_bl_count[bits - 1] << 1;\n\t      next_code[bits] = code;\n\t    }\n\t    /* Check that the bit counts in bl_count are consistent. The last code\n\t     * must be all ones.\n\t     */\n\t    //    Assert (code + encoder->bl_count[MAX_BITS]-1 == (1<<MAX_BITS)-1,\n\t    //\t    \"inconsistent bit counts\");\n\t    //    Tracev((stderr,\"\\ngen_codes: max_code %d \", max_code));\n\n\n\t    for (n = 0; n <= max_code; n++) {\n\t      var len = tree[n].dl;\n\t      if (len == 0) continue; // Now reverse the bits\n\n\t      tree[n].fc = zip_bi_reverse(next_code[len]++, len); //      Tracec(tree != static_ltree, (stderr,\"\\nn %3d %c l %2d c %4x (%x) \",\n\t      //\t  n, (isgraph(n) ? n : ' '), len, tree[n].fc, next_code[len]-1));\n\t    }\n\t  }\n\t  /* ==========================================================================\n\t   * Construct one Huffman tree and assigns the code bit strings and lengths.\n\t   * Update the total bit length for the current block.\n\t   * IN assertion: the field freq is set for all tree elements.\n\t   * OUT assertions: the fields len and code are set to the optimal bit length\n\t   *     and corresponding code. The length opt_len is updated; static_len is\n\t   *     also updated if stree is not null. The field max_code is set.\n\t   */\n\n\n\t  function zip_build_tree(desc) {\n\t    // the tree descriptor\n\t    var tree = desc.dyn_tree;\n\t    var stree = desc.static_tree;\n\t    var elems = desc.elems;\n\t    var n;\n\t    var m; // iterate over heap elements\n\n\t    var max_code = -1; // largest code with non zero frequency\n\n\t    var node = elems; // next internal node of the tree\n\n\t    /* Construct the initial heap, with least frequent element in\n\t     * heap[SMALLEST]. The sons of heap[n] are heap[2*n] and heap[2*n+1].\n\t     * heap[0] is not used.\n\t     */\n\n\t    zip_heap_len = 0;\n\t    zip_heap_max = zip_HEAP_SIZE;\n\n\t    for (n = 0; n < elems; n++) {\n\t      if (tree[n].fc != 0) {\n\t        zip_heap[++zip_heap_len] = max_code = n;\n\t        zip_depth[n] = 0;\n\t      } else tree[n].dl = 0;\n\t    }\n\t    /* The pkzip format requires that at least one distance code exists,\n\t     * and that at least one bit should be sent even if there is only one\n\t     * possible code. So to avoid special checks later on we force at least\n\t     * two codes of non zero frequency.\n\t     */\n\n\n\t    while (zip_heap_len < 2) {\n\t      var xnew = zip_heap[++zip_heap_len] = max_code < 2 ? ++max_code : 0;\n\t      tree[xnew].fc = 1;\n\t      zip_depth[xnew] = 0;\n\t      zip_opt_len--;\n\t      if (stree != null) zip_static_len -= stree[xnew].dl; // new is 0 or 1 so it does not have extra bits\n\t    }\n\n\t    desc.max_code = max_code;\n\t    /* The elements heap[heap_len/2+1 .. heap_len] are leaves of the tree,\n\t     * establish sub-heaps of increasing lengths:\n\t     */\n\n\t    for (n = zip_heap_len >> 1; n >= 1; n--) {\n\t      zip_pqdownheap(tree, n);\n\t    }\n\t    /* Construct the Huffman tree by repeatedly combining the least two\n\t     * frequent nodes.\n\t     */\n\n\n\t    do {\n\t      n = zip_heap[zip_SMALLEST];\n\t      zip_heap[zip_SMALLEST] = zip_heap[zip_heap_len--];\n\t      zip_pqdownheap(tree, zip_SMALLEST);\n\t      m = zip_heap[zip_SMALLEST]; // m = node of next least frequency\n\t      // keep the nodes sorted by frequency\n\n\t      zip_heap[--zip_heap_max] = n;\n\t      zip_heap[--zip_heap_max] = m; // Create a new node father of n and m\n\n\t      tree[node].fc = tree[n].fc + tree[m].fc; //\tdepth[node] = (char)(MAX(depth[n], depth[m]) + 1);\n\n\t      if (zip_depth[n] > zip_depth[m] + 1) zip_depth[node] = zip_depth[n];else zip_depth[node] = zip_depth[m] + 1;\n\t      tree[n].dl = tree[m].dl = node; // and insert the new node in the heap\n\n\t      zip_heap[zip_SMALLEST] = node++;\n\t      zip_pqdownheap(tree, zip_SMALLEST);\n\t    } while (zip_heap_len >= 2);\n\n\t    zip_heap[--zip_heap_max] = zip_heap[zip_SMALLEST];\n\t    /* At this point, the fields freq and dad are set. We can now\n\t     * generate the bit lengths.\n\t     */\n\n\t    zip_gen_bitlen(desc); // The field len is now set, we can generate the bit codes\n\n\t    zip_gen_codes(tree, max_code);\n\t  }\n\t  /* ==========================================================================\n\t   * Scan a literal or distance tree to determine the frequencies of the codes\n\t   * in the bit length tree. Updates opt_len to take into account the repeat\n\t   * counts. (The contribution of the bit length codes will be added later\n\t   * during the construction of bl_tree.)\n\t   */\n\n\n\t  function zip_scan_tree(tree, // the tree to be scanned\n\t  max_code) {\n\t    // and its largest code of non zero frequency\n\t    var n; // iterates over all tree elements\n\n\t    var prevlen = -1; // last emitted length\n\n\t    var curlen; // length of current code\n\n\t    var nextlen = tree[0].dl; // length of next code\n\n\t    var count = 0; // repeat count of the current code\n\n\t    var max_count = 7; // max repeat count\n\n\t    var min_count = 4; // min repeat count\n\n\t    if (nextlen == 0) {\n\t      max_count = 138;\n\t      min_count = 3;\n\t    }\n\n\t    tree[max_code + 1].dl = 0xffff; // guard\n\n\t    for (n = 0; n <= max_code; n++) {\n\t      curlen = nextlen;\n\t      nextlen = tree[n + 1].dl;\n\t      if (++count < max_count && curlen == nextlen) continue;else if (count < min_count) zip_bl_tree[curlen].fc += count;else if (curlen != 0) {\n\t        if (curlen != prevlen) zip_bl_tree[curlen].fc++;\n\t        zip_bl_tree[zip_REP_3_6].fc++;\n\t      } else if (count <= 10) zip_bl_tree[zip_REPZ_3_10].fc++;else zip_bl_tree[zip_REPZ_11_138].fc++;\n\t      count = 0;\n\t      prevlen = curlen;\n\n\t      if (nextlen == 0) {\n\t        max_count = 138;\n\t        min_count = 3;\n\t      } else if (curlen == nextlen) {\n\t        max_count = 6;\n\t        min_count = 3;\n\t      } else {\n\t        max_count = 7;\n\t        min_count = 4;\n\t      }\n\t    }\n\t  }\n\t  /* ==========================================================================\n\t   * Send a literal or distance tree in compressed form, using the codes in\n\t   * bl_tree.\n\t   */\n\n\n\t  function zip_send_tree(tree, // the tree to be scanned\n\t  max_code) {\n\t    // and its largest code of non zero frequency\n\t    var n; // iterates over all tree elements\n\n\t    var prevlen = -1; // last emitted length\n\n\t    var curlen; // length of current code\n\n\t    var nextlen = tree[0].dl; // length of next code\n\n\t    var count = 0; // repeat count of the current code\n\n\t    var max_count = 7; // max repeat count\n\n\t    var min_count = 4;\n\t    /* guard already set */\n\t    // min repeat count\n\n\t    /* tree[max_code+1].dl = -1; */\n\n\t    if (nextlen == 0) {\n\t      max_count = 138;\n\t      min_count = 3;\n\t    }\n\n\t    for (n = 0; n <= max_code; n++) {\n\t      curlen = nextlen;\n\t      nextlen = tree[n + 1].dl;\n\n\t      if (++count < max_count && curlen == nextlen) {\n\t        continue;\n\t      } else if (count < min_count) {\n\t        do {\n\t          zip_SEND_CODE(curlen, zip_bl_tree);\n\t        } while (--count != 0);\n\t      } else if (curlen != 0) {\n\t        if (curlen != prevlen) {\n\t          zip_SEND_CODE(curlen, zip_bl_tree);\n\t          count--;\n\t        } // Assert(count >= 3 && count <= 6, \" 3_6?\");\n\n\n\t        zip_SEND_CODE(zip_REP_3_6, zip_bl_tree);\n\t        zip_send_bits(count - 3, 2);\n\t      } else if (count <= 10) {\n\t        zip_SEND_CODE(zip_REPZ_3_10, zip_bl_tree);\n\t        zip_send_bits(count - 3, 3);\n\t      } else {\n\t        zip_SEND_CODE(zip_REPZ_11_138, zip_bl_tree);\n\t        zip_send_bits(count - 11, 7);\n\t      }\n\n\t      count = 0;\n\t      prevlen = curlen;\n\n\t      if (nextlen == 0) {\n\t        max_count = 138;\n\t        min_count = 3;\n\t      } else if (curlen == nextlen) {\n\t        max_count = 6;\n\t        min_count = 3;\n\t      } else {\n\t        max_count = 7;\n\t        min_count = 4;\n\t      }\n\t    }\n\t  }\n\t  /* ==========================================================================\n\t   * Construct the Huffman tree for the bit lengths and return the index in\n\t   * bl_order of the last bit length code to send.\n\t   */\n\n\n\t  function zip_build_bl_tree() {\n\t    var max_blindex; // index of last bit length code of non zero freq\n\t    // Determine the bit length frequencies for literal and distance trees\n\n\t    zip_scan_tree(zip_dyn_ltree, zip_l_desc.max_code);\n\t    zip_scan_tree(zip_dyn_dtree, zip_d_desc.max_code); // Build the bit length tree:\n\n\t    zip_build_tree(zip_bl_desc);\n\t    /* opt_len now includes the length of the tree representations, except\n\t     * the lengths of the bit lengths codes and the 5+5+4 bits for the counts.\n\t     */\n\n\t    /* Determine the number of bit length codes to send. The pkzip format\n\t     * requires that at least 4 bit length codes be sent. (appnote.txt says\n\t     * 3 but the actual value used is 4.)\n\t     */\n\n\t    for (max_blindex = zip_BL_CODES - 1; max_blindex >= 3; max_blindex--) {\n\t      if (zip_bl_tree[zip_bl_order[max_blindex]].dl != 0) break;\n\t    }\n\t    /* Update opt_len to include the bit length tree and counts */\n\n\n\t    zip_opt_len += 3 * (max_blindex + 1) + 5 + 5 + 4; //    Tracev((stderr, \"\\ndyn trees: dyn %ld, stat %ld\",\n\t    //\t    encoder->opt_len, encoder->static_len));\n\n\t    return max_blindex;\n\t  }\n\t  /* ==========================================================================\n\t   * Send the header for a block using dynamic Huffman trees: the counts, the\n\t   * lengths of the bit length codes, the literal tree and the distance tree.\n\t   * IN assertion: lcodes >= 257, dcodes >= 1, blcodes >= 4.\n\t   */\n\n\n\t  function zip_send_all_trees(lcodes, dcodes, blcodes) {\n\t    // number of codes for each tree\n\t    var rank; // index in bl_order\n\t    //    Assert (lcodes >= 257 && dcodes >= 1 && blcodes >= 4, \"not enough codes\");\n\t    //    Assert (lcodes <= L_CODES && dcodes <= D_CODES && blcodes <= BL_CODES,\n\t    //\t    \"too many codes\");\n\t    //    Tracev((stderr, \"\\nbl counts: \"));\n\n\t    zip_send_bits(lcodes - 257, 5); // not +255 as stated in appnote.txt\n\n\t    zip_send_bits(dcodes - 1, 5);\n\t    zip_send_bits(blcodes - 4, 4); // not -3 as stated in appnote.txt\n\n\t    for (rank = 0; rank < blcodes; rank++) {\n\t      //      Tracev((stderr, \"\\nbl code %2d \", bl_order[rank]));\n\t      zip_send_bits(zip_bl_tree[zip_bl_order[rank]].dl, 3);\n\t    } // send the literal tree\n\n\n\t    zip_send_tree(zip_dyn_ltree, lcodes - 1); // send the distance tree\n\n\t    zip_send_tree(zip_dyn_dtree, dcodes - 1);\n\t  }\n\t  /* ==========================================================================\n\t   * Determine the best encoding for the current block: dynamic trees, static\n\t   * trees or store, and output the encoded block to the zip file.\n\t   */\n\n\n\t  function zip_flush_block(eof) {\n\t    // true if this is the last block for a file\n\t    var opt_lenb;\n\t    var static_lenb; // opt_len and static_len in bytes\n\n\t    var max_blindex; // index of last bit length code of non zero freq\n\n\t    var stored_len; // length of input block\n\n\t    stored_len = zip_strstart - zip_block_start;\n\t    zip_flag_buf[zip_last_flags] = zip_flags; // Save the flags for the last 8 items\n\t    // Construct the literal and distance trees\n\n\t    zip_build_tree(zip_l_desc); //    Tracev((stderr, \"\\nlit data: dyn %ld, stat %ld\",\n\t    //\t    encoder->opt_len, encoder->static_len));\n\n\t    zip_build_tree(zip_d_desc); //    Tracev((stderr, \"\\ndist data: dyn %ld, stat %ld\",\n\t    //\t    encoder->opt_len, encoder->static_len));\n\n\t    /* At this point, opt_len and static_len are the total bit lengths of\n\t     * the compressed block data, excluding the tree representations.\n\t     */\n\n\t    /* Build the bit length tree for the above two trees, and get the index\n\t     * in bl_order of the last bit length code to send.\n\t     */\n\n\t    max_blindex = zip_build_bl_tree(); // Determine the best encoding. Compute first the block length in bytes\n\n\t    opt_lenb = zip_opt_len + 3 + 7 >> 3;\n\t    static_lenb = zip_static_len + 3 + 7 >> 3; //    Trace((stderr, \"\\nopt %lu(%lu) stat %lu(%lu) stored %lu lit %u dist %u \",\n\t    //\t   opt_lenb, encoder->opt_len,\n\t    //\t   static_lenb, encoder->static_len, stored_len,\n\t    //\t   encoder->last_lit, encoder->last_dist));\n\n\t    if (static_lenb <= opt_lenb) opt_lenb = static_lenb;\n\n\t    if (stored_len + 4 <= opt_lenb && // 4: two words for the lengths\n\t    zip_block_start >= 0) {\n\t      var i;\n\t      /* The test buf != NULL is only necessary if LIT_BUFSIZE > WSIZE.\n\t       * Otherwise we can't have processed more than WSIZE input bytes since\n\t       * the last block flush, because compression would have been\n\t       * successful. If LIT_BUFSIZE <= WSIZE, it is never too late to\n\t       * transform a block into a stored block.\n\t       */\n\n\t      zip_send_bits((zip_STORED_BLOCK << 1) + eof, 3);\n\t      /* send block type */\n\n\t      zip_bi_windup();\n\t      /* align on byte boundary */\n\n\t      zip_put_short(stored_len);\n\t      zip_put_short(~stored_len); // copy block\n\n\t      /*\n\t      p = &window[block_start];\n\t      for(i = 0; i < stored_len; i++)\n\t      put_byte(p[i]);\n\t      */\n\n\t      for (i = 0; i < stored_len; i++) {\n\t        zip_put_byte(zip_window[zip_block_start + i]);\n\t      }\n\t    } else if (static_lenb == opt_lenb) {\n\t      zip_send_bits((zip_STATIC_TREES << 1) + eof, 3);\n\t      zip_compress_block(zip_static_ltree, zip_static_dtree);\n\t    } else {\n\t      zip_send_bits((zip_DYN_TREES << 1) + eof, 3);\n\t      zip_send_all_trees(zip_l_desc.max_code + 1, zip_d_desc.max_code + 1, max_blindex + 1);\n\t      zip_compress_block(zip_dyn_ltree, zip_dyn_dtree);\n\t    }\n\n\t    zip_init_block();\n\t    if (eof != 0) zip_bi_windup();\n\t  }\n\t  /* ==========================================================================\n\t   * Save the match info and tally the frequency counts. Return true if\n\t   * the current block must be flushed.\n\t   */\n\n\n\t  function zip_ct_tally(dist, // distance of matched string\n\t  lc) {\n\t    // match length-MIN_MATCH or unmatched char (if dist==0)\n\t    zip_l_buf[zip_last_lit++] = lc;\n\n\t    if (dist == 0) {\n\t      // lc is the unmatched char\n\t      zip_dyn_ltree[lc].fc++;\n\t    } else {\n\t      // Here, lc is the match length - MIN_MATCH\n\t      dist--; // dist = match distance - 1\n\t      //      Assert((ush)dist < (ush)MAX_DIST &&\n\t      //\t     (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&\n\t      //\t     (ush)D_CODE(dist) < (ush)D_CODES,  \"ct_tally: bad match\");\n\n\t      zip_dyn_ltree[zip_length_code[lc] + zip_LITERALS + 1].fc++;\n\t      zip_dyn_dtree[zip_D_CODE(dist)].fc++;\n\t      zip_d_buf[zip_last_dist++] = dist;\n\t      zip_flags |= zip_flag_bit;\n\t    }\n\n\t    zip_flag_bit <<= 1; // Output the flags if they fill a byte\n\n\t    if ((zip_last_lit & 7) == 0) {\n\t      zip_flag_buf[zip_last_flags++] = zip_flags;\n\t      zip_flags = 0;\n\t      zip_flag_bit = 1;\n\t    } // Try to guess if it is profitable to stop the current block here\n\n\n\t    if (zip_compr_level > 2 && (zip_last_lit & 0xfff) == 0) {\n\t      // Compute an upper bound for the compressed length\n\t      var out_length = zip_last_lit * 8;\n\t      var in_length = zip_strstart - zip_block_start;\n\t      var dcode;\n\n\t      for (dcode = 0; dcode < zip_D_CODES; dcode++) {\n\t        out_length += zip_dyn_dtree[dcode].fc * (5 + zip_extra_dbits[dcode]);\n\t      }\n\n\t      out_length >>= 3; //      Trace((stderr,\"\\nlast_lit %u, last_dist %u, in %ld, out ~%ld(%ld%%) \",\n\t      //\t     encoder->last_lit, encoder->last_dist, in_length, out_length,\n\t      //\t     100L - out_length*100L/in_length));\n\n\t      if (zip_last_dist < _parseInt$2(zip_last_lit / 2) && out_length < _parseInt$2(in_length / 2)) return true;\n\t    }\n\n\t    return zip_last_lit == zip_LIT_BUFSIZE - 1 || zip_last_dist == zip_DIST_BUFSIZE;\n\t    /* We avoid equality with LIT_BUFSIZE because of wraparound at 64K\n\t     * on 16 bit machines and because stored blocks are restricted to\n\t     * 64K-1 bytes.\n\t     */\n\t  }\n\t  /* ==========================================================================\n\t   * Send the block data compressed using the given Huffman trees\n\t   */\n\n\n\t  function zip_compress_block(ltree, // literal tree\n\t  dtree) {\n\t    // distance tree\n\t    var dist; // distance of matched string\n\n\t    var lc; // match length or unmatched char (if dist == 0)\n\n\t    var lx = 0; // running index in l_buf\n\n\t    var dx = 0; // running index in d_buf\n\n\t    var fx = 0; // running index in flag_buf\n\n\t    var flag = 0; // current flags\n\n\t    var code; // the code to send\n\n\t    var extra; // number of extra bits to send\n\n\t    if (zip_last_lit != 0) do {\n\t      if ((lx & 7) == 0) flag = zip_flag_buf[fx++];\n\t      lc = zip_l_buf[lx++] & 0xff;\n\n\t      if ((flag & 1) == 0) {\n\t        zip_SEND_CODE(lc, ltree);\n\t        /* send a literal byte */\n\t        //\tTracecv(isgraph(lc), (stderr,\" '%c' \", lc));\n\t      } else {\n\t        // Here, lc is the match length - MIN_MATCH\n\t        code = zip_length_code[lc];\n\t        zip_SEND_CODE(code + zip_LITERALS + 1, ltree); // send the length code\n\n\t        extra = zip_extra_lbits[code];\n\n\t        if (extra != 0) {\n\t          lc -= zip_base_length[code];\n\t          zip_send_bits(lc, extra); // send the extra length bits\n\t        }\n\n\t        dist = zip_d_buf[dx++]; // Here, dist is the match distance - 1\n\n\t        code = zip_D_CODE(dist); //\tAssert (code < D_CODES, \"bad d_code\");\n\n\t        zip_SEND_CODE(code, dtree); // send the distance code\n\n\t        extra = zip_extra_dbits[code];\n\n\t        if (extra != 0) {\n\t          dist -= zip_base_dist[code];\n\t          zip_send_bits(dist, extra); // send the extra distance bits\n\t        }\n\t      } // literal or match pair ?\n\n\n\t      flag >>= 1;\n\t    } while (lx < zip_last_lit);\n\t    zip_SEND_CODE(zip_END_BLOCK, ltree);\n\t  }\n\t  /* ==========================================================================\n\t   * Send a value on a given number of bits.\n\t   * IN assertion: length <= 16 and value fits in length bits.\n\t   */\n\n\n\t  var zip_Buf_size = 16; // bit size of bi_buf\n\n\t  function zip_send_bits(value, // value to send\n\t  length) {\n\t    // number of bits\n\n\t    /* If not enough room in bi_buf, use (valid) bits from bi_buf and\n\t     * (16 - bi_valid) bits from value, leaving (width - (16-bi_valid))\n\t     * unused bits in value.\n\t     */\n\t    if (zip_bi_valid > zip_Buf_size - length) {\n\t      zip_bi_buf |= value << zip_bi_valid;\n\t      zip_put_short(zip_bi_buf);\n\t      zip_bi_buf = value >> zip_Buf_size - zip_bi_valid;\n\t      zip_bi_valid += length - zip_Buf_size;\n\t    } else {\n\t      zip_bi_buf |= value << zip_bi_valid;\n\t      zip_bi_valid += length;\n\t    }\n\t  }\n\t  /* ==========================================================================\n\t   * Reverse the first len bits of a code, using straightforward code (a faster\n\t   * method would use a table)\n\t   * IN assertion: 1 <= len <= 15\n\t   */\n\n\n\t  function zip_bi_reverse(code, // the value to invert\n\t  len) {\n\t    // its bit length\n\t    var res = 0;\n\n\t    do {\n\t      res |= code & 1;\n\t      code >>= 1;\n\t      res <<= 1;\n\t    } while (--len > 0);\n\n\t    return res >> 1;\n\t  }\n\t  /* ==========================================================================\n\t   * Write out any remaining bits in an incomplete byte.\n\t   */\n\n\n\t  function zip_bi_windup() {\n\t    if (zip_bi_valid > 8) {\n\t      zip_put_short(zip_bi_buf);\n\t    } else if (zip_bi_valid > 0) {\n\t      zip_put_byte(zip_bi_buf);\n\t    }\n\n\t    zip_bi_buf = 0;\n\t    zip_bi_valid = 0;\n\t  }\n\n\t  function zip_qoutbuf() {\n\t    if (zip_outcnt != 0) {\n\t      var q;\n\t      var i;\n\t      q = zip_new_queue();\n\t      if (zip_qhead == null) zip_qhead = zip_qtail = q;else zip_qtail = zip_qtail.next = q;\n\t      q.len = zip_outcnt - zip_outoff; //      System.arraycopy(zip_outbuf, zip_outoff, q.ptr, 0, q.len);\n\n\t      for (i = 0; i < q.len; i++) {\n\t        q.ptr[i] = zip_outbuf[zip_outoff + i];\n\t      }\n\n\t      zip_outcnt = zip_outoff = 0;\n\t    }\n\t  }\n\n\t  return function deflate(str, level) {\n\t    var i;\n\t    var j;\n\t    zip_deflate_data = str;\n\t    zip_deflate_pos = 0;\n\t    if (typeof level === 'undefined') level = zip_DEFAULT_LEVEL;\n\t    zip_deflate_start(level);\n\t    var buff = new Array(1024);\n\t    var aout = [];\n\n\t    while ((i = zip_deflate_internal(buff, 0, buff.length)) > 0) {\n\t      var cbuf = new Array(i);\n\n\t      for (j = 0; j < i; j++) {\n\t        cbuf[j] = String.fromCharCode(buff[j]);\n\t      }\n\n\t      aout[aout.length] = cbuf.join('');\n\t    }\n\n\t    zip_deflate_data = null; // G.C.\n\n\t    return aout.join('');\n\t  };\n\t}();\n\n\tfunction ownKeys$b(object, enumerableOnly) { var keys = keys$3(object); if (getOwnPropertySymbols$2) { var symbols = getOwnPropertySymbols$2(object); enumerableOnly && (symbols = filter$3(symbols).call(symbols, function (sym) { return getOwnPropertyDescriptor$3(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\n\n\tfunction _objectSpread$a(target) { for (var i = 1; i < arguments.length; i++) { var _context4, _context5; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? forEach$3(_context4 = ownKeys$b(Object(source), !0)).call(_context4, function (key) { _defineProperty(target, key, source[key]); }) : getOwnPropertyDescriptors$2 ? defineProperties$2(target, getOwnPropertyDescriptors$2(source)) : forEach$3(_context5 = ownKeys$b(Object(source))).call(_context5, function (key) { defineProperty$5(target, key, getOwnPropertyDescriptor$3(source, key)); }); } return target; }\n\n\tfunction encode64(data) {\n\t  var r = '';\n\n\t  for (var i = 0; i < data.length; i += 3) {\n\t    if (i + 2 === data.length) {\n\t      r += append3bytes(data.charCodeAt(i), data.charCodeAt(i + 1), 0);\n\t    } else if (i + 1 === data.length) {\n\t      r += append3bytes(data.charCodeAt(i), 0, 0);\n\t    } else {\n\t      r += append3bytes(data.charCodeAt(i), data.charCodeAt(i + 1), data.charCodeAt(i + 2));\n\t    }\n\t  }\n\n\t  return r;\n\t}\n\n\tfunction append3bytes(b1, b2, b3) {\n\t  var c1 = b1 >> 2;\n\t  var c2 = (b1 & 0x3) << 4 | b2 >> 4;\n\t  var c3 = (b2 & 0xf) << 2 | b3 >> 6;\n\t  var c4 = b3 & 0x3f;\n\t  var r = '';\n\t  r += encode6bit(c1 & 0x3f);\n\t  r += encode6bit(c2 & 0x3f);\n\t  r += encode6bit(c3 & 0x3f);\n\t  r += encode6bit(c4 & 0x3f);\n\t  return r;\n\t}\n\n\tfunction encode6bit(b1) {\n\t  var b = b1;\n\n\t  if (b < 10) {\n\t    return String.fromCharCode(48 + b);\n\t  }\n\n\t  b -= 10;\n\n\t  if (b < 26) {\n\t    return String.fromCharCode(65 + b);\n\t  }\n\n\t  b -= 26;\n\n\t  if (b < 26) {\n\t    return String.fromCharCode(97 + b);\n\t  }\n\n\t  b -= 26;\n\n\t  if (b === 0) {\n\t    return '-';\n\t  }\n\n\t  if (b === 1) {\n\t    return '_';\n\t  }\n\n\t  return '?';\n\t}\n\n\tfunction compress(s1, url) {\n\t  var _context;\n\n\t  var s = unescape(encodeURIComponent(s1));\n\t  return concat$5(_context = \"\".concat(url, \"/svg/\")).call(_context, encode64(deflate(s, 9)));\n\t}\n\n\tvar PlantUMLCodeEngine = /*#__PURE__*/function () {\n\t  function PlantUMLCodeEngine() {\n\t    var _plantUMLOptions$base;\n\n\t    var plantUMLOptions = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n\t    _classCallCheck(this, PlantUMLCodeEngine);\n\n\t    var defaultUrl = 'http://www.plantuml.com/plantuml';\n\t    this.baseUrl = (_plantUMLOptions$base = plantUMLOptions.baseUrl) !== null && _plantUMLOptions$base !== void 0 ? _plantUMLOptions$base : defaultUrl;\n\t  }\n\n\t  _createClass(PlantUMLCodeEngine, [{\n\t    key: \"render\",\n\t    value: function render(src, sign) {\n\t      var _context2, _context3;\n\n\t      var $sign = sign;\n\n\t      if (!$sign) {\n\t        $sign = Math.round(Math.random() * 100000000);\n\t      }\n\n\t      var graphId = concat$5(_context2 = \"plantuml-\".concat($sign, \"-\")).call(_context2, new Date().getTime());\n\n\t      return concat$5(_context3 = \"<img id=\\\"\".concat(graphId, \"\\\" src=\\\"\")).call(_context3, compress(src, this.baseUrl), \"\\\" />\");\n\t    }\n\t  }], [{\n\t    key: \"install\",\n\t    value: function install(cherryOptions, args) {\n\t      var _cherryOptions$engine;\n\n\t      mergeWith_1(cherryOptions, {\n\t        engine: {\n\t          syntax: {\n\t            codeBlock: {\n\t              customRenderer: {\n\t                plantuml: new PlantUMLCodeEngine(_objectSpread$a(_objectSpread$a({}, args), (_cherryOptions$engine = cherryOptions.engine.syntax.plantuml) !== null && _cherryOptions$engine !== void 0 ? _cherryOptions$engine : {}))\n\t              }\n\t            }\n\t          }\n\t        }\n\t      });\n\t    }\n\t  }]);\n\n\t  return PlantUMLCodeEngine;\n\t}();\n\n\t/*! For license information please see mermaid.esm.min.mjs.LICENSE.txt */\n\tvar t={2536:(t,e,n)=>{t=n.nmd(t);var r=function(){var t=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},e=[1,6],n=[1,7],r=[1,8],i=[1,9],a=[1,16],o=[1,11],s=[1,12],l=[1,13],u=[1,14],h=[1,15],f=[1,27],d=[1,33],p=[1,34],g=[1,35],y=[1,36],m=[1,37],b=[1,72],v=[1,73],_=[1,74],x=[1,75],k=[1,76],w=[1,77],T=[1,78],E=[1,38],C=[1,39],S=[1,40],A=[1,41],M=[1,42],N=[1,43],O=[1,44],D=[1,45],B=[1,46],L=[1,47],I=[1,48],F=[1,49],R=[1,50],P=[1,51],j=[1,52],z=[1,53],Y=[1,54],U=[1,55],$=[1,56],W=[1,57],q=[1,59],H=[1,60],V=[1,61],G=[1,62],X=[1,63],Z=[1,64],Q=[1,65],K=[1,66],J=[1,67],tt=[1,68],et=[1,69],nt=[24,52],rt=[24,44,46,47,48,49,50,51,52,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84],it=[15,24,44,46,47,48,49,50,51,52,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84],at=[1,94],ot=[1,95],st=[1,96],ct=[1,97],lt=[15,24,52],ut=[7,8,9,10,18,22,25,26,27,28],ht=[15,24,43,52],ft=[15,24,43,52,86,87,89,90],dt=[15,43],pt=[44,46,47,48,49,50,51,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84],gt={trace:function(){},yy:{},symbols_:{error:2,start:3,mermaidDoc:4,direction:5,directive:6,direction_tb:7,direction_bt:8,direction_rl:9,direction_lr:10,graphConfig:11,openDirective:12,typeDirective:13,closeDirective:14,NEWLINE:15,\":\":16,argDirective:17,open_directive:18,type_directive:19,arg_directive:20,close_directive:21,C4_CONTEXT:22,statements:23,EOF:24,C4_CONTAINER:25,C4_COMPONENT:26,C4_DYNAMIC:27,C4_DEPLOYMENT:28,otherStatements:29,diagramStatements:30,otherStatement:31,title:32,accDescription:33,acc_title:34,acc_title_value:35,acc_descr:36,acc_descr_value:37,acc_descr_multiline_value:38,boundaryStatement:39,boundaryStartStatement:40,boundaryStopStatement:41,boundaryStart:42,LBRACE:43,ENTERPRISE_BOUNDARY:44,attributes:45,SYSTEM_BOUNDARY:46,BOUNDARY:47,CONTAINER_BOUNDARY:48,NODE:49,NODE_L:50,NODE_R:51,RBRACE:52,diagramStatement:53,PERSON:54,PERSON_EXT:55,SYSTEM:56,SYSTEM_DB:57,SYSTEM_QUEUE:58,SYSTEM_EXT:59,SYSTEM_EXT_DB:60,SYSTEM_EXT_QUEUE:61,CONTAINER:62,CONTAINER_DB:63,CONTAINER_QUEUE:64,CONTAINER_EXT:65,CONTAINER_EXT_DB:66,CONTAINER_EXT_QUEUE:67,COMPONENT:68,COMPONENT_DB:69,COMPONENT_QUEUE:70,COMPONENT_EXT:71,COMPONENT_EXT_DB:72,COMPONENT_EXT_QUEUE:73,REL:74,BIREL:75,REL_U:76,REL_D:77,REL_L:78,REL_R:79,REL_B:80,REL_INDEX:81,UPDATE_EL_STYLE:82,UPDATE_REL_STYLE:83,UPDATE_LAYOUT_CONFIG:84,attribute:85,STR:86,STR_KEY:87,STR_VALUE:88,ATTRIBUTE:89,ATTRIBUTE_EMPTY:90,$accept:0,$end:1},terminals_:{2:\"error\",7:\"direction_tb\",8:\"direction_bt\",9:\"direction_rl\",10:\"direction_lr\",15:\"NEWLINE\",16:\":\",18:\"open_directive\",19:\"type_directive\",20:\"arg_directive\",21:\"close_directive\",22:\"C4_CONTEXT\",24:\"EOF\",25:\"C4_CONTAINER\",26:\"C4_COMPONENT\",27:\"C4_DYNAMIC\",28:\"C4_DEPLOYMENT\",32:\"title\",33:\"accDescription\",34:\"acc_title\",35:\"acc_title_value\",36:\"acc_descr\",37:\"acc_descr_value\",38:\"acc_descr_multiline_value\",43:\"LBRACE\",44:\"ENTERPRISE_BOUNDARY\",46:\"SYSTEM_BOUNDARY\",47:\"BOUNDARY\",48:\"CONTAINER_BOUNDARY\",49:\"NODE\",50:\"NODE_L\",51:\"NODE_R\",52:\"RBRACE\",54:\"PERSON\",55:\"PERSON_EXT\",56:\"SYSTEM\",57:\"SYSTEM_DB\",58:\"SYSTEM_QUEUE\",59:\"SYSTEM_EXT\",60:\"SYSTEM_EXT_DB\",61:\"SYSTEM_EXT_QUEUE\",62:\"CONTAINER\",63:\"CONTAINER_DB\",64:\"CONTAINER_QUEUE\",65:\"CONTAINER_EXT\",66:\"CONTAINER_EXT_DB\",67:\"CONTAINER_EXT_QUEUE\",68:\"COMPONENT\",69:\"COMPONENT_DB\",70:\"COMPONENT_QUEUE\",71:\"COMPONENT_EXT\",72:\"COMPONENT_EXT_DB\",73:\"COMPONENT_EXT_QUEUE\",74:\"REL\",75:\"BIREL\",76:\"REL_U\",77:\"REL_D\",78:\"REL_L\",79:\"REL_R\",80:\"REL_B\",81:\"REL_INDEX\",82:\"UPDATE_EL_STYLE\",83:\"UPDATE_REL_STYLE\",84:\"UPDATE_LAYOUT_CONFIG\",86:\"STR\",87:\"STR_KEY\",88:\"STR_VALUE\",89:\"ATTRIBUTE\",90:\"ATTRIBUTE_EMPTY\"},productions_:[0,[3,1],[3,1],[3,2],[5,1],[5,1],[5,1],[5,1],[4,1],[6,4],[6,6],[12,1],[13,1],[17,1],[14,1],[11,4],[11,4],[11,4],[11,4],[11,4],[23,1],[23,1],[23,2],[29,1],[29,2],[29,3],[31,1],[31,1],[31,2],[31,2],[31,1],[39,3],[40,3],[40,3],[40,4],[42,2],[42,2],[42,2],[42,2],[42,2],[42,2],[42,2],[41,1],[30,1],[30,2],[30,3],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,1],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[45,1],[45,2],[85,1],[85,2],[85,1],[85,1]],performAction:function(t,e,n,r,i,a,o){var s=a.length-1;switch(i){case 4:r.setDirection(\"TB\");break;case 5:r.setDirection(\"BT\");break;case 6:r.setDirection(\"RL\");break;case 7:r.setDirection(\"LR\");break;case 11:console.log(\"open_directive: \",a[s]),r.parseDirective(\"%%{\",\"open_directive\");break;case 12:break;case 13:a[s]=a[s].trim().replace(/'/g,'\"'),console.log(\"arg_directive: \",a[s]),r.parseDirective(a[s],\"arg_directive\");break;case 14:console.log(\"close_directive: \",a[s]),r.parseDirective(\"}%%\",\"close_directive\",\"c4Context\");break;case 15:case 16:case 17:case 18:case 19:r.setC4Type(a[s-3]);break;case 26:r.setTitle(a[s].substring(6)),this.$=a[s].substring(6);break;case 27:r.setAccDescription(a[s].substring(15)),this.$=a[s].substring(15);break;case 28:this.$=a[s].trim(),r.setTitle(this.$);break;case 29:case 30:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 35:case 36:console.log(a[s-1],JSON.stringify(a[s])),a[s].splice(2,0,\"ENTERPRISE\"),r.addPersonOrSystemBoundary(...a[s]),this.$=a[s];break;case 37:console.log(a[s-1],JSON.stringify(a[s])),r.addPersonOrSystemBoundary(...a[s]),this.$=a[s];break;case 38:console.log(a[s-1],JSON.stringify(a[s])),a[s].splice(2,0,\"CONTAINER\"),r.addContainerBoundary(...a[s]),this.$=a[s];break;case 39:console.log(a[s-1],JSON.stringify(a[s])),r.addDeploymentNode(\"node\",...a[s]),this.$=a[s];break;case 40:console.log(a[s-1],JSON.stringify(a[s])),r.addDeploymentNode(\"nodeL\",...a[s]),this.$=a[s];break;case 41:console.log(a[s-1],JSON.stringify(a[s])),r.addDeploymentNode(\"nodeR\",...a[s]),this.$=a[s];break;case 42:r.popBoundaryParseStack();break;case 46:console.log(a[s-1],JSON.stringify(a[s])),r.addPersonOrSystem(\"person\",...a[s]),this.$=a[s];break;case 47:console.log(a[s-1],JSON.stringify(a[s])),r.addPersonOrSystem(\"external_person\",...a[s]),this.$=a[s];break;case 48:console.log(a[s-1],JSON.stringify(a[s])),r.addPersonOrSystem(\"system\",...a[s]),this.$=a[s];break;case 49:console.log(a[s-1],JSON.stringify(a[s])),r.addPersonOrSystem(\"system_db\",...a[s]),this.$=a[s];break;case 50:console.log(a[s-1],JSON.stringify(a[s])),r.addPersonOrSystem(\"system_queue\",...a[s]),this.$=a[s];break;case 51:console.log(a[s-1],JSON.stringify(a[s])),r.addPersonOrSystem(\"external_system\",...a[s]),this.$=a[s];break;case 52:console.log(a[s-1],JSON.stringify(a[s])),r.addPersonOrSystem(\"external_system_db\",...a[s]),this.$=a[s];break;case 53:console.log(a[s-1],JSON.stringify(a[s])),r.addPersonOrSystem(\"external_system_queue\",...a[s]),this.$=a[s];break;case 54:console.log(a[s-1],JSON.stringify(a[s])),r.addContainer(\"container\",...a[s]),this.$=a[s];break;case 55:console.log(a[s-1],JSON.stringify(a[s])),r.addContainer(\"container_db\",...a[s]),this.$=a[s];break;case 56:console.log(a[s-1],JSON.stringify(a[s])),r.addContainer(\"container_queue\",...a[s]),this.$=a[s];break;case 57:console.log(a[s-1],JSON.stringify(a[s])),r.addContainer(\"external_container\",...a[s]),this.$=a[s];break;case 58:console.log(a[s-1],JSON.stringify(a[s])),r.addContainer(\"external_container_db\",...a[s]),this.$=a[s];break;case 59:console.log(a[s-1],JSON.stringify(a[s])),r.addContainer(\"external_container_queue\",...a[s]),this.$=a[s];break;case 60:console.log(a[s-1],JSON.stringify(a[s])),r.addComponent(\"component\",...a[s]),this.$=a[s];break;case 61:console.log(a[s-1],JSON.stringify(a[s])),r.addComponent(\"component_db\",...a[s]),this.$=a[s];break;case 62:console.log(a[s-1],JSON.stringify(a[s])),r.addComponent(\"component_queue\",...a[s]),this.$=a[s];break;case 63:console.log(a[s-1],JSON.stringify(a[s])),r.addComponent(\"external_component\",...a[s]),this.$=a[s];break;case 64:console.log(a[s-1],JSON.stringify(a[s])),r.addComponent(\"external_component_db\",...a[s]),this.$=a[s];break;case 65:console.log(a[s-1],JSON.stringify(a[s])),r.addComponent(\"external_component_queue\",...a[s]),this.$=a[s];break;case 67:console.log(a[s-1],JSON.stringify(a[s])),r.addRel(\"rel\",...a[s]),this.$=a[s];break;case 68:console.log(a[s-1],JSON.stringify(a[s])),r.addRel(\"birel\",...a[s]),this.$=a[s];break;case 69:console.log(a[s-1],JSON.stringify(a[s])),r.addRel(\"rel_u\",...a[s]),this.$=a[s];break;case 70:console.log(a[s-1],JSON.stringify(a[s])),r.addRel(\"rel_d\",...a[s]),this.$=a[s];break;case 71:console.log(a[s-1],JSON.stringify(a[s])),r.addRel(\"rel_l\",...a[s]),this.$=a[s];break;case 72:console.log(a[s-1],JSON.stringify(a[s])),r.addRel(\"rel_r\",...a[s]),this.$=a[s];break;case 73:console.log(a[s-1],JSON.stringify(a[s])),r.addRel(\"rel_b\",...a[s]),this.$=a[s];break;case 74:console.log(a[s-1],JSON.stringify(a[s])),a[s].splice(0,1),r.addRel(\"rel\",...a[s]),this.$=a[s];break;case 75:console.log(a[s-1],JSON.stringify(a[s])),r.updateElStyle(\"update_el_style\",...a[s]),this.$=a[s];break;case 76:console.log(a[s-1],JSON.stringify(a[s])),r.updateRelStyle(\"update_rel_style\",...a[s]),this.$=a[s];break;case 77:console.log(a[s-1],JSON.stringify(a[s])),r.updateLayoutConfig(\"update_layout_config\",...a[s]),this.$=a[s];break;case 78:console.log(\"PUSH ATTRIBUTE: \",a[s]),this.$=[a[s]];break;case 79:console.log(\"PUSH ATTRIBUTE: \",a[s-1]),a[s].unshift(a[s-1]),this.$=a[s];break;case 80:case 82:this.$=a[s].trim();break;case 81:console.log(\"kv: \",a[s-1],a[s]);let t={};t[a[s-1].trim()]=a[s].trim(),this.$=t;break;case 83:this.$=\"\";}},table:[{3:1,4:2,5:3,6:4,7:e,8:n,9:r,10:i,11:5,12:10,18:a,22:o,25:s,26:l,27:u,28:h},{1:[3]},{1:[2,1]},{1:[2,2]},{3:17,4:2,5:3,6:4,7:e,8:n,9:r,10:i,11:5,12:10,18:a,22:o,25:s,26:l,27:u,28:h},{1:[2,8]},{1:[2,4]},{1:[2,5]},{1:[2,6]},{1:[2,7]},{13:18,19:[1,19]},{15:[1,20]},{15:[1,21]},{15:[1,22]},{15:[1,23]},{15:[1,24]},{19:[2,11]},{1:[2,3]},{14:25,16:[1,26],21:f},t([16,21],[2,12]),{23:28,29:29,30:30,31:31,32:d,33:p,34:g,36:y,38:m,39:58,40:70,42:71,44:b,46:v,47:_,48:x,49:k,50:w,51:T,53:32,54:E,55:C,56:S,57:A,58:M,59:N,60:O,61:D,62:B,63:L,64:I,65:F,66:R,67:P,68:j,69:z,70:Y,71:U,72:$,73:W,74:q,75:H,76:V,77:G,78:X,79:Z,80:Q,81:K,82:J,83:tt,84:et},{23:79,29:29,30:30,31:31,32:d,33:p,34:g,36:y,38:m,39:58,40:70,42:71,44:b,46:v,47:_,48:x,49:k,50:w,51:T,53:32,54:E,55:C,56:S,57:A,58:M,59:N,60:O,61:D,62:B,63:L,64:I,65:F,66:R,67:P,68:j,69:z,70:Y,71:U,72:$,73:W,74:q,75:H,76:V,77:G,78:X,79:Z,80:Q,81:K,82:J,83:tt,84:et},{23:80,29:29,30:30,31:31,32:d,33:p,34:g,36:y,38:m,39:58,40:70,42:71,44:b,46:v,47:_,48:x,49:k,50:w,51:T,53:32,54:E,55:C,56:S,57:A,58:M,59:N,60:O,61:D,62:B,63:L,64:I,65:F,66:R,67:P,68:j,69:z,70:Y,71:U,72:$,73:W,74:q,75:H,76:V,77:G,78:X,79:Z,80:Q,81:K,82:J,83:tt,84:et},{23:81,29:29,30:30,31:31,32:d,33:p,34:g,36:y,38:m,39:58,40:70,42:71,44:b,46:v,47:_,48:x,49:k,50:w,51:T,53:32,54:E,55:C,56:S,57:A,58:M,59:N,60:O,61:D,62:B,63:L,64:I,65:F,66:R,67:P,68:j,69:z,70:Y,71:U,72:$,73:W,74:q,75:H,76:V,77:G,78:X,79:Z,80:Q,81:K,82:J,83:tt,84:et},{23:82,29:29,30:30,31:31,32:d,33:p,34:g,36:y,38:m,39:58,40:70,42:71,44:b,46:v,47:_,48:x,49:k,50:w,51:T,53:32,54:E,55:C,56:S,57:A,58:M,59:N,60:O,61:D,62:B,63:L,64:I,65:F,66:R,67:P,68:j,69:z,70:Y,71:U,72:$,73:W,74:q,75:H,76:V,77:G,78:X,79:Z,80:Q,81:K,82:J,83:tt,84:et},{15:[1,83]},{17:84,20:[1,85]},{15:[2,14]},{24:[1,86]},t(nt,[2,20],{53:32,39:58,40:70,42:71,30:87,44:b,46:v,47:_,48:x,49:k,50:w,51:T,54:E,55:C,56:S,57:A,58:M,59:N,60:O,61:D,62:B,63:L,64:I,65:F,66:R,67:P,68:j,69:z,70:Y,71:U,72:$,73:W,74:q,75:H,76:V,77:G,78:X,79:Z,80:Q,81:K,82:J,83:tt,84:et}),t(nt,[2,21]),t(rt,[2,23],{15:[1,88]}),t(nt,[2,43],{15:[1,89]}),t(it,[2,26]),t(it,[2,27]),{35:[1,90]},{37:[1,91]},t(it,[2,30]),{45:92,85:93,86:at,87:ot,89:st,90:ct},{45:98,85:93,86:at,87:ot,89:st,90:ct},{45:99,85:93,86:at,87:ot,89:st,90:ct},{45:100,85:93,86:at,87:ot,89:st,90:ct},{45:101,85:93,86:at,87:ot,89:st,90:ct},{45:102,85:93,86:at,87:ot,89:st,90:ct},{45:103,85:93,86:at,87:ot,89:st,90:ct},{45:104,85:93,86:at,87:ot,89:st,90:ct},{45:105,85:93,86:at,87:ot,89:st,90:ct},{45:106,85:93,86:at,87:ot,89:st,90:ct},{45:107,85:93,86:at,87:ot,89:st,90:ct},{45:108,85:93,86:at,87:ot,89:st,90:ct},{45:109,85:93,86:at,87:ot,89:st,90:ct},{45:110,85:93,86:at,87:ot,89:st,90:ct},{45:111,85:93,86:at,87:ot,89:st,90:ct},{45:112,85:93,86:at,87:ot,89:st,90:ct},{45:113,85:93,86:at,87:ot,89:st,90:ct},{45:114,85:93,86:at,87:ot,89:st,90:ct},{45:115,85:93,86:at,87:ot,89:st,90:ct},{45:116,85:93,86:at,87:ot,89:st,90:ct},t(lt,[2,66]),{45:117,85:93,86:at,87:ot,89:st,90:ct},{45:118,85:93,86:at,87:ot,89:st,90:ct},{45:119,85:93,86:at,87:ot,89:st,90:ct},{45:120,85:93,86:at,87:ot,89:st,90:ct},{45:121,85:93,86:at,87:ot,89:st,90:ct},{45:122,85:93,86:at,87:ot,89:st,90:ct},{45:123,85:93,86:at,87:ot,89:st,90:ct},{45:124,85:93,86:at,87:ot,89:st,90:ct},{45:125,85:93,86:at,87:ot,89:st,90:ct},{45:126,85:93,86:at,87:ot,89:st,90:ct},{45:127,85:93,86:at,87:ot,89:st,90:ct},{30:128,39:58,40:70,42:71,44:b,46:v,47:_,48:x,49:k,50:w,51:T,53:32,54:E,55:C,56:S,57:A,58:M,59:N,60:O,61:D,62:B,63:L,64:I,65:F,66:R,67:P,68:j,69:z,70:Y,71:U,72:$,73:W,74:q,75:H,76:V,77:G,78:X,79:Z,80:Q,81:K,82:J,83:tt,84:et},{15:[1,130],43:[1,129]},{45:131,85:93,86:at,87:ot,89:st,90:ct},{45:132,85:93,86:at,87:ot,89:st,90:ct},{45:133,85:93,86:at,87:ot,89:st,90:ct},{45:134,85:93,86:at,87:ot,89:st,90:ct},{45:135,85:93,86:at,87:ot,89:st,90:ct},{45:136,85:93,86:at,87:ot,89:st,90:ct},{45:137,85:93,86:at,87:ot,89:st,90:ct},{24:[1,138]},{24:[1,139]},{24:[1,140]},{24:[1,141]},t(ut,[2,9]),{14:142,21:f},{21:[2,13]},{1:[2,15]},t(nt,[2,22]),t(rt,[2,24],{31:31,29:143,32:d,33:p,34:g,36:y,38:m}),t(nt,[2,44],{29:29,30:30,31:31,53:32,39:58,40:70,42:71,23:144,32:d,33:p,34:g,36:y,38:m,44:b,46:v,47:_,48:x,49:k,50:w,51:T,54:E,55:C,56:S,57:A,58:M,59:N,60:O,61:D,62:B,63:L,64:I,65:F,66:R,67:P,68:j,69:z,70:Y,71:U,72:$,73:W,74:q,75:H,76:V,77:G,78:X,79:Z,80:Q,81:K,82:J,83:tt,84:et}),t(it,[2,28]),t(it,[2,29]),t(lt,[2,46]),t(ht,[2,78],{85:93,45:145,86:at,87:ot,89:st,90:ct}),t(ft,[2,80]),{88:[1,146]},t(ft,[2,82]),t(ft,[2,83]),t(lt,[2,47]),t(lt,[2,48]),t(lt,[2,49]),t(lt,[2,50]),t(lt,[2,51]),t(lt,[2,52]),t(lt,[2,53]),t(lt,[2,54]),t(lt,[2,55]),t(lt,[2,56]),t(lt,[2,57]),t(lt,[2,58]),t(lt,[2,59]),t(lt,[2,60]),t(lt,[2,61]),t(lt,[2,62]),t(lt,[2,63]),t(lt,[2,64]),t(lt,[2,65]),t(lt,[2,67]),t(lt,[2,68]),t(lt,[2,69]),t(lt,[2,70]),t(lt,[2,71]),t(lt,[2,72]),t(lt,[2,73]),t(lt,[2,74]),t(lt,[2,75]),t(lt,[2,76]),t(lt,[2,77]),{41:147,52:[1,148]},{15:[1,149]},{43:[1,150]},t(dt,[2,35]),t(dt,[2,36]),t(dt,[2,37]),t(dt,[2,38]),t(dt,[2,39]),t(dt,[2,40]),t(dt,[2,41]),{1:[2,16]},{1:[2,17]},{1:[2,18]},{1:[2,19]},{15:[1,151]},t(rt,[2,25]),t(nt,[2,45]),t(ht,[2,79]),t(ft,[2,81]),t(lt,[2,31]),t(lt,[2,42]),t(pt,[2,32]),t(pt,[2,33],{15:[1,152]}),t(ut,[2,10]),t(pt,[2,34])],defaultActions:{2:[2,1],3:[2,2],5:[2,8],6:[2,4],7:[2,5],8:[2,6],9:[2,7],16:[2,11],17:[2,3],27:[2,14],85:[2,13],86:[2,15],138:[2,16],139:[2,17],140:[2,18],141:[2,19]},parseError:function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t);},parse:function(t){var e=this,n=[0],r=[],i=[null],a=[],o=this.table,s=\"\",c=0,l=0,u=0,h=2,f=1,d=a.slice.call(arguments,1),p=Object.create(this.lexer),g={yy:{}};for(var y in this.yy)Object.prototype.hasOwnProperty.call(this.yy,y)&&(g.yy[y]=this.yy[y]);p.setInput(t,g.yy),g.yy.lexer=p,g.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var m=p.yylloc;a.push(m);var b=p.options&&p.options.ranges;function v(){var t;return \"number\"!=typeof(t=r.pop()||p.lex()||f)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}\"function\"==typeof g.yy.parseError?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var _,x,k,w,T,E,C,S,A,M={};;){if(k=n[n.length-1],this.defaultActions[k]?w=this.defaultActions[k]:(null==_&&(_=v()),w=o[k]&&o[k][_]),void 0===w||!w.length||!w[0]){var N=\"\";for(E in A=[],o[k])this.terminals_[E]&&E>h&&A.push(\"'\"+this.terminals_[E]+\"'\");N=p.showPosition?\"Parse error on line \"+(c+1)+\":\\n\"+p.showPosition()+\"\\nExpecting \"+A.join(\", \")+\", got '\"+(this.terminals_[_]||_)+\"'\":\"Parse error on line \"+(c+1)+\": Unexpected \"+(_==f?\"end of input\":\"'\"+(this.terminals_[_]||_)+\"'\"),this.parseError(N,{text:p.match,token:this.terminals_[_]||_,line:p.yylineno,loc:m,expected:A});}if(w[0]instanceof Array&&w.length>1)throw new Error(\"Parse Error: multiple actions possible at state: \"+k+\", token: \"+_);switch(w[0]){case 1:n.push(_),i.push(p.yytext),a.push(p.yylloc),n.push(w[1]),_=null,x?(_=x,x=null):(l=p.yyleng,s=p.yytext,c=p.yylineno,m=p.yylloc,u>0&&u--);break;case 2:if(C=this.productions_[w[1]][1],M.$=i[i.length-C],M._$={first_line:a[a.length-(C||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(C||1)].first_column,last_column:a[a.length-1].last_column},b&&(M._$.range=[a[a.length-(C||1)].range[0],a[a.length-1].range[1]]),void 0!==(T=this.performAction.apply(M,[s,l,c,g.yy,w[1],i,a].concat(d))))return T;C&&(n=n.slice(0,-1*C*2),i=i.slice(0,-1*C),a=a.slice(0,-1*C)),n.push(this.productions_[w[1]][0]),i.push(M.$),a.push(M._$),S=o[n[n.length-2]][n[n.length-1]],n.push(S);break;case 3:return !0}}return !0}},yt={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e);},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=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.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\\r\\n?|\\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\\r\\n?|\\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\\r\\n?|\\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError(\"Lexical error on line \"+(this.yylineno+1)+\". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\\n\"+this.showPosition(),{text:\"\",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t));},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return (t.length>20?\"...\":\"\")+t.substr(-20).replace(/\\n/g,\"\")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?\"...\":\"\")).replace(/\\n/g,\"\")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join(\"-\");return t+this.upcomingInput()+\"\\n\"+e+\"^\"},test_match:function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\\r\\n?|\\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\\r?\\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return !1}return !1},next:function(){if(this.done)return this.EOF;var t,e,n,r;this._input||(this.done=!0),this._more||(this.yytext=\"\",this.match=\"\");for(var i=this._currentRules(),a=0;a<i.length;a++)if((n=this._input.match(this.rules[i[a]]))&&(!e||n[0].length>e[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,i[a])))return t;if(this._backtrack){e=!1;continue}return !1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[r]))&&t:\"\"===this._input?this.EOF:this.parseError(\"Lexical error on line \"+(this.yylineno+1)+\". Unrecognized text.\\n\"+this.showPosition(),{text:\"\",token:null,line:this.yylineno})},lex:function(){return this.next()||this.lex()},begin:function(t){this.conditionStack.push(t);},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return (t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:\"INITIAL\"},pushState:function(t){this.begin(t);},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(t,e,n,r){switch(n){case 0:return this.begin(\"open_directive\"),18;case 1:return 7;case 2:return 8;case 3:return 9;case 4:return 10;case 5:return this.begin(\"type_directive\"),19;case 6:return this.popState(),this.begin(\"arg_directive\"),16;case 7:return this.popState(),this.popState(),21;case 8:return 20;case 9:return 32;case 10:return 33;case 11:return this.begin(\"acc_title\"),34;case 12:return this.popState(),\"acc_title_value\";case 13:return this.begin(\"acc_descr\"),36;case 14:return this.popState(),\"acc_descr_value\";case 15:this.begin(\"acc_descr_multiline\");break;case 16:this.popState();break;case 17:return \"acc_descr_multiline_value\";case 18:case 21:break;case 19:c;break;case 20:return 15;case 22:return 22;case 23:return 25;case 24:return 26;case 25:return 27;case 26:return 28;case 27:return this.begin(\"person_ext\"),console.log(\"begin person_ext\"),55;case 28:return this.begin(\"person\"),console.log(\"begin person\"),54;case 29:return this.begin(\"system_ext_queue\"),console.log(\"begin system_ext_queue\"),61;case 30:return this.begin(\"system_ext_db\"),console.log(\"begin system_ext_db\"),60;case 31:return this.begin(\"system_ext\"),console.log(\"begin system_ext\"),59;case 32:return this.begin(\"system_queue\"),console.log(\"begin system_queue\"),58;case 33:return this.begin(\"system_db\"),console.log(\"begin system_db\"),57;case 34:return this.begin(\"system\"),console.log(\"begin system\"),56;case 35:return this.begin(\"boundary\"),console.log(\"begin boundary\"),47;case 36:return this.begin(\"enterprise_boundary\"),console.log(\"begin enterprise_boundary\"),44;case 37:return this.begin(\"system_boundary\"),console.log(\"begin system_boundary\"),46;case 38:return this.begin(\"container_ext_queue\"),console.log(\"begin container_ext_queue\"),67;case 39:return this.begin(\"container_ext_db\"),console.log(\"begin container_ext_db\"),66;case 40:return this.begin(\"container_ext\"),console.log(\"begin container_ext\"),65;case 41:return this.begin(\"container_queue\"),console.log(\"begin container_queue\"),64;case 42:return this.begin(\"container_db\"),console.log(\"begin container_db\"),63;case 43:return this.begin(\"container\"),console.log(\"begin container\"),62;case 44:return this.begin(\"container_boundary\"),console.log(\"begin container_boundary\"),48;case 45:return this.begin(\"component_ext_queue\"),console.log(\"begin component_ext_queue\"),73;case 46:return this.begin(\"component_ext_db\"),console.log(\"begin component_ext_db\"),72;case 47:return this.begin(\"component_ext\"),console.log(\"begin component_ext\"),71;case 48:return this.begin(\"component_queue\"),console.log(\"begin component_queue\"),70;case 49:return this.begin(\"component_db\"),console.log(\"begin component_db\"),69;case 50:return this.begin(\"component\"),console.log(\"begin component\"),68;case 51:case 52:return this.begin(\"node\"),console.log(\"begin node\"),49;case 53:return this.begin(\"node_l\"),console.log(\"begin node_l\"),50;case 54:return this.begin(\"node_r\"),console.log(\"begin node_r\"),51;case 55:return this.begin(\"rel\"),console.log(\"begin rel\"),74;case 56:return this.begin(\"birel\"),console.log(\"begin birel\"),75;case 57:case 58:return this.begin(\"rel_u\"),console.log(\"begin rel_u\"),76;case 59:case 60:return this.begin(\"rel_d\"),console.log(\"begin rel_d\"),77;case 61:case 62:return this.begin(\"rel_l\"),console.log(\"begin rel_l\"),78;case 63:case 64:return this.begin(\"rel_r\"),console.log(\"begin rel_r\"),79;case 65:return this.begin(\"rel_b\"),console.log(\"begin rel_b\"),80;case 66:return this.begin(\"rel_index\"),console.log(\"begin rel_index\"),81;case 67:return this.begin(\"update_el_style\"),console.log(\"begin update_el_style\"),82;case 68:return this.begin(\"update_rel_style\"),console.log(\"begin update_rel_style\"),83;case 69:return this.begin(\"update_layout_config\"),console.log(\"begin update_layout_config\"),84;case 70:return \"EOF_IN_STRUCT\";case 71:return console.log(\"begin attribute with ATTRIBUTE_EMPTY\"),this.begin(\"attribute\"),\"ATTRIBUTE_EMPTY\";case 72:console.log(\"begin attribute\"),this.begin(\"attribute\");break;case 73:console.log(\"STOP attribute\"),this.popState(),console.log(\"STOP diagram\"),this.popState();break;case 74:return console.log(\",,\"),90;case 75:console.log(\",\");break;case 76:return console.log(\"ATTRIBUTE_EMPTY\"),90;case 77:console.log(\"begin string\"),this.begin(\"string\");break;case 78:console.log(\"STOP string\"),this.popState();break;case 79:return console.log(\"STR\"),\"STR\";case 80:console.log(\"begin string_kv\"),this.begin(\"string_kv\");break;case 81:return console.log(\"STR_KEY\"),this.begin(\"string_kv_key\"),\"STR_KEY\";case 82:console.log(\"begin string_kv_value\"),this.popState(),this.begin(\"string_kv_value\");break;case 83:return console.log(\"STR_VALUE\"),\"STR_VALUE\";case 84:console.log(\"STOP string_kv_value\"),this.popState(),this.popState();break;case 85:return console.log(\"not STR\"),\"STR\";case 86:return console.log(\"begin boundary block\"),\"LBRACE\";case 87:return console.log(\"STOP boundary block\"),\"RBRACE\";case 88:return \"SPACE\";case 89:return \"EOL\";case 90:return 24}},rules:[/^(?:%%\\{)/,/^(?:.*direction\\s+TB[^\\n]*)/,/^(?:.*direction\\s+BT[^\\n]*)/,/^(?:.*direction\\s+RL[^\\n]*)/,/^(?:.*direction\\s+LR[^\\n]*)/,/^(?:((?:(?!\\}%%)[^:.])*))/,/^(?::)/,/^(?:\\}%%)/,/^(?:((?:(?!\\}%%).|\\n)*))/,/^(?:title\\s[^#\\n;]+)/,/^(?:accDescription\\s[^#\\n;]+)/,/^(?:accTitle\\s*:\\s*)/,/^(?:(?!\\n||)*[^\\n]*)/,/^(?:accDescr\\s*:\\s*)/,/^(?:(?!\\n||)*[^\\n]*)/,/^(?:accDescr\\s*\\{\\s*)/,/^(?:[\\}])/,/^(?:[^\\}]*)/,/^(?:%%(?!\\{)*[^\\n]*(\\r?\\n?)+)/,/^(?:%%[^\\n]*(\\r?\\n)*)/,/^(?:\\s*(\\r?\\n)+)/,/^(?:\\s+)/,/^(?:C4Context\\b)/,/^(?:C4Container\\b)/,/^(?:C4Component\\b)/,/^(?:C4Dynamic\\b)/,/^(?:C4Deployment\\b)/,/^(?:Person_Ext\\b)/,/^(?:Person\\b)/,/^(?:SystemQueue_Ext\\b)/,/^(?:SystemDb_Ext\\b)/,/^(?:System_Ext\\b)/,/^(?:SystemQueue\\b)/,/^(?:SystemDb\\b)/,/^(?:System\\b)/,/^(?:Boundary\\b)/,/^(?:Enterprise_Boundary\\b)/,/^(?:System_Boundary\\b)/,/^(?:ContainerQueue_Ext\\b)/,/^(?:ContainerDb_Ext\\b)/,/^(?:Container_Ext\\b)/,/^(?:ContainerQueue\\b)/,/^(?:ContainerDb\\b)/,/^(?:Container\\b)/,/^(?:Container_Boundary\\b)/,/^(?:ComponentQueue_Ext\\b)/,/^(?:ComponentDb_Ext\\b)/,/^(?:Component_Ext\\b)/,/^(?:ComponentQueue\\b)/,/^(?:ComponentDb\\b)/,/^(?:Component\\b)/,/^(?:Deployment_Node\\b)/,/^(?:Node\\b)/,/^(?:Node_L\\b)/,/^(?:Node_R\\b)/,/^(?:Rel\\b)/,/^(?:BiRel\\b)/,/^(?:Rel_Up\\b)/,/^(?:Rel_U\\b)/,/^(?:Rel_Down\\b)/,/^(?:Rel_D\\b)/,/^(?:Rel_Left\\b)/,/^(?:Rel_L\\b)/,/^(?:Rel_Right\\b)/,/^(?:Rel_R\\b)/,/^(?:Rel_Back\\b)/,/^(?:RelIndex\\b)/,/^(?:UpdateElementStyle\\b)/,/^(?:UpdateRelStyle\\b)/,/^(?:UpdateLayoutConfig\\b)/,/^(?:$)/,/^(?:[(][ ]*[,])/,/^(?:[(])/,/^(?:[)])/,/^(?:,,)/,/^(?:,)/,/^(?:[ ]*[\"][\"])/,/^(?:[ ]*[\"])/,/^(?:[\"])/,/^(?:[^\"]*)/,/^(?:[ ]*[\\$])/,/^(?:[^=]*)/,/^(?:[=][ ]*[\"])/,/^(?:[^\"]+)/,/^(?:[\"])/,/^(?:[^,]+)/,/^(?:\\{)/,/^(?:\\})/,/^(?:[\\s]+)/,/^(?:[\\n\\r]+)/,/^(?:$)/],conditions:{acc_descr_multiline:{rules:[16,17],inclusive:!1},acc_descr:{rules:[14],inclusive:!1},acc_title:{rules:[12],inclusive:!1},close_directive:{rules:[],inclusive:!1},arg_directive:{rules:[7,8],inclusive:!1},type_directive:{rules:[6,7],inclusive:!1},open_directive:{rules:[5],inclusive:!1},string_kv_value:{rules:[83,84],inclusive:!1},string_kv_key:{rules:[82],inclusive:!1},string_kv:{rules:[81],inclusive:!1},string:{rules:[78,79],inclusive:!1},attribute:{rules:[73,74,75,76,77,80,85],inclusive:!1},update_layout_config:{rules:[70,71,72,73],inclusive:!1},update_rel_style:{rules:[70,71,72,73],inclusive:!1},update_el_style:{rules:[70,71,72,73],inclusive:!1},rel_b:{rules:[70,71,72,73],inclusive:!1},rel_r:{rules:[70,71,72,73],inclusive:!1},rel_l:{rules:[70,71,72,73],inclusive:!1},rel_d:{rules:[70,71,72,73],inclusive:!1},rel_u:{rules:[70,71,72,73],inclusive:!1},rel_bi:{rules:[],inclusive:!1},rel:{rules:[70,71,72,73],inclusive:!1},node_r:{rules:[70,71,72,73],inclusive:!1},node_l:{rules:[70,71,72,73],inclusive:!1},node:{rules:[70,71,72,73],inclusive:!1},index:{rules:[],inclusive:!1},rel_index:{rules:[70,71,72,73],inclusive:!1},component_ext_queue:{rules:[],inclusive:!1},component_ext_db:{rules:[70,71,72,73],inclusive:!1},component_ext:{rules:[70,71,72,73],inclusive:!1},component_queue:{rules:[70,71,72,73],inclusive:!1},component_db:{rules:[70,71,72,73],inclusive:!1},component:{rules:[70,71,72,73],inclusive:!1},container_boundary:{rules:[70,71,72,73],inclusive:!1},container_ext_queue:{rules:[],inclusive:!1},container_ext_db:{rules:[70,71,72,73],inclusive:!1},container_ext:{rules:[70,71,72,73],inclusive:!1},container_queue:{rules:[70,71,72,73],inclusive:!1},container_db:{rules:[70,71,72,73],inclusive:!1},container:{rules:[70,71,72,73],inclusive:!1},birel:{rules:[70,71,72,73],inclusive:!1},system_boundary:{rules:[70,71,72,73],inclusive:!1},enterprise_boundary:{rules:[70,71,72,73],inclusive:!1},boundary:{rules:[70,71,72,73],inclusive:!1},system_ext_queue:{rules:[70,71,72,73],inclusive:!1},system_ext_db:{rules:[70,71,72,73],inclusive:!1},system_ext:{rules:[70,71,72,73],inclusive:!1},system_queue:{rules:[70,71,72,73],inclusive:!1},system_db:{rules:[70,71,72,73],inclusive:!1},system:{rules:[70,71,72,73],inclusive:!1},person_ext:{rules:[70,71,72,73],inclusive:!1},person:{rules:[70,71,72,73],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,9,10,11,13,15,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,86,87,88,89,90],inclusive:!0}}};function mt(){this.yy={};}return gt.lexer=yt,mt.prototype=gt,gt.Parser=mt,new mt}();e.parser=r,e.Parser=r.Parser,e.parse=function(){return r.parse.apply(r,arguments)},e.main=function(t){t[1]||(console.log(\"Usage: \"+t[0]+\" FILE\"),process.exit(1));var r=n(555).readFileSync(n(6470).normalize(t[1]),\"utf8\");return e.parser.parse(r)},n.c[n.s]===t&&e.main(process.argv.slice(1));},1362:(t,e,n)=>{t=n.nmd(t);var r=function(){var t=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},e=[1,3],n=[1,7],r=[1,8],i=[1,9],a=[1,10],o=[1,13],s=[1,12],c=[1,16,25],l=[1,20],u=[1,31],h=[1,32],f=[1,33],d=[1,35],p=[1,38],g=[1,36],y=[1,37],m=[1,39],b=[1,40],v=[1,41],_=[1,42],x=[1,45],k=[1,46],w=[1,47],T=[1,48],E=[16,25],C=[1,62],S=[1,63],A=[1,64],M=[1,65],N=[1,66],O=[1,67],D=[1,68],B=[16,25,32,44,45,53,56,57,58,59,60,61,62,67,69],L=[16,25,30,32,44,45,49,53,56,57,58,59,60,61,62,67,69,84,85,86,87],I=[5,8,9,10,11,16,19,23,25],F=[53,84,85,86,87],R=[53,61,62,84,85,86,87],P=[53,56,57,58,59,60,84,85,86,87],j=[16,25,32],z=[1,100],Y={trace:function(){},yy:{},symbols_:{error:2,start:3,mermaidDoc:4,statments:5,direction:6,directive:7,direction_tb:8,direction_bt:9,direction_rl:10,direction_lr:11,graphConfig:12,openDirective:13,typeDirective:14,closeDirective:15,NEWLINE:16,\":\":17,argDirective:18,open_directive:19,type_directive:20,arg_directive:21,close_directive:22,CLASS_DIAGRAM:23,statements:24,EOF:25,statement:26,className:27,alphaNumToken:28,classLiteralName:29,GENERICTYPE:30,relationStatement:31,LABEL:32,classStatement:33,methodStatement:34,annotationStatement:35,clickStatement:36,cssClassStatement:37,acc_title:38,acc_title_value:39,acc_descr:40,acc_descr_value:41,acc_descr_multiline_value:42,CLASS:43,STYLE_SEPARATOR:44,STRUCT_START:45,members:46,STRUCT_STOP:47,ANNOTATION_START:48,ANNOTATION_END:49,MEMBER:50,SEPARATOR:51,relation:52,STR:53,relationType:54,lineType:55,AGGREGATION:56,EXTENSION:57,COMPOSITION:58,DEPENDENCY:59,LOLLIPOP:60,LINE:61,DOTTED_LINE:62,CALLBACK:63,LINK:64,LINK_TARGET:65,CLICK:66,CALLBACK_NAME:67,CALLBACK_ARGS:68,HREF:69,CSSCLASS:70,commentToken:71,textToken:72,graphCodeTokens:73,textNoTagsToken:74,TAGSTART:75,TAGEND:76,\"==\":77,\"--\":78,PCT:79,DEFAULT:80,SPACE:81,MINUS:82,keywords:83,UNICODE_TEXT:84,NUM:85,ALPHA:86,BQUOTE_STR:87,$accept:0,$end:1},terminals_:{2:\"error\",5:\"statments\",8:\"direction_tb\",9:\"direction_bt\",10:\"direction_rl\",11:\"direction_lr\",16:\"NEWLINE\",17:\":\",19:\"open_directive\",20:\"type_directive\",21:\"arg_directive\",22:\"close_directive\",23:\"CLASS_DIAGRAM\",25:\"EOF\",30:\"GENERICTYPE\",32:\"LABEL\",38:\"acc_title\",39:\"acc_title_value\",40:\"acc_descr\",41:\"acc_descr_value\",42:\"acc_descr_multiline_value\",43:\"CLASS\",44:\"STYLE_SEPARATOR\",45:\"STRUCT_START\",47:\"STRUCT_STOP\",48:\"ANNOTATION_START\",49:\"ANNOTATION_END\",50:\"MEMBER\",51:\"SEPARATOR\",53:\"STR\",56:\"AGGREGATION\",57:\"EXTENSION\",58:\"COMPOSITION\",59:\"DEPENDENCY\",60:\"LOLLIPOP\",61:\"LINE\",62:\"DOTTED_LINE\",63:\"CALLBACK\",64:\"LINK\",65:\"LINK_TARGET\",66:\"CLICK\",67:\"CALLBACK_NAME\",68:\"CALLBACK_ARGS\",69:\"HREF\",70:\"CSSCLASS\",73:\"graphCodeTokens\",75:\"TAGSTART\",76:\"TAGEND\",77:\"==\",78:\"--\",79:\"PCT\",80:\"DEFAULT\",81:\"SPACE\",82:\"MINUS\",83:\"keywords\",84:\"UNICODE_TEXT\",85:\"NUM\",86:\"ALPHA\",87:\"BQUOTE_STR\"},productions_:[0,[3,1],[3,1],[3,1],[3,2],[6,1],[6,1],[6,1],[6,1],[4,1],[7,4],[7,6],[13,1],[14,1],[18,1],[15,1],[12,4],[24,1],[24,2],[24,3],[27,1],[27,1],[27,2],[27,2],[27,2],[26,1],[26,2],[26,1],[26,1],[26,1],[26,1],[26,1],[26,1],[26,1],[26,2],[26,2],[26,1],[33,2],[33,4],[33,5],[33,7],[35,4],[46,1],[46,2],[34,1],[34,2],[34,1],[34,1],[31,3],[31,4],[31,4],[31,5],[52,3],[52,2],[52,2],[52,1],[54,1],[54,1],[54,1],[54,1],[54,1],[55,1],[55,1],[36,3],[36,4],[36,3],[36,4],[36,4],[36,5],[36,3],[36,4],[36,4],[36,5],[36,3],[36,4],[36,4],[36,5],[37,3],[71,1],[71,1],[72,1],[72,1],[72,1],[72,1],[72,1],[72,1],[72,1],[74,1],[74,1],[74,1],[74,1],[28,1],[28,1],[28,1],[29,1]],performAction:function(t,e,n,r,i,a,o){var s=a.length-1;switch(i){case 5:r.setDirection(\"TB\");break;case 6:r.setDirection(\"BT\");break;case 7:r.setDirection(\"RL\");break;case 8:r.setDirection(\"LR\");break;case 12:r.parseDirective(\"%%{\",\"open_directive\");break;case 13:r.parseDirective(a[s],\"type_directive\");break;case 14:a[s]=a[s].trim().replace(/'/g,'\"'),r.parseDirective(a[s],\"arg_directive\");break;case 15:r.parseDirective(\"}%%\",\"close_directive\",\"class\");break;case 20:case 21:this.$=a[s];break;case 22:this.$=a[s-1]+a[s];break;case 23:case 24:this.$=a[s-1]+\"~\"+a[s];break;case 25:r.addRelation(a[s]);break;case 26:a[s-1].title=r.cleanupLabel(a[s]),r.addRelation(a[s-1]);break;case 34:this.$=a[s].trim(),r.setAccTitle(this.$);break;case 35:case 36:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 37:r.addClass(a[s]);break;case 38:r.addClass(a[s-2]),r.setCssClass(a[s-2],a[s]);break;case 39:r.addClass(a[s-3]),r.addMembers(a[s-3],a[s-1]);break;case 40:r.addClass(a[s-5]),r.setCssClass(a[s-5],a[s-3]),r.addMembers(a[s-5],a[s-1]);break;case 41:r.addAnnotation(a[s],a[s-2]);break;case 42:this.$=[a[s]];break;case 43:a[s].push(a[s-1]),this.$=a[s];break;case 44:case 46:case 47:break;case 45:r.addMember(a[s-1],r.cleanupLabel(a[s]));break;case 48:this.$={id1:a[s-2],id2:a[s],relation:a[s-1],relationTitle1:\"none\",relationTitle2:\"none\"};break;case 49:this.$={id1:a[s-3],id2:a[s],relation:a[s-1],relationTitle1:a[s-2],relationTitle2:\"none\"};break;case 50:this.$={id1:a[s-3],id2:a[s],relation:a[s-2],relationTitle1:\"none\",relationTitle2:a[s-1]};break;case 51:this.$={id1:a[s-4],id2:a[s],relation:a[s-2],relationTitle1:a[s-3],relationTitle2:a[s-1]};break;case 52:this.$={type1:a[s-2],type2:a[s],lineType:a[s-1]};break;case 53:this.$={type1:\"none\",type2:a[s],lineType:a[s-1]};break;case 54:this.$={type1:a[s-1],type2:\"none\",lineType:a[s]};break;case 55:this.$={type1:\"none\",type2:\"none\",lineType:a[s]};break;case 56:this.$=r.relationType.AGGREGATION;break;case 57:this.$=r.relationType.EXTENSION;break;case 58:this.$=r.relationType.COMPOSITION;break;case 59:this.$=r.relationType.DEPENDENCY;break;case 60:this.$=r.relationType.LOLLIPOP;break;case 61:this.$=r.lineType.LINE;break;case 62:this.$=r.lineType.DOTTED_LINE;break;case 63:case 69:this.$=a[s-2],r.setClickEvent(a[s-1],a[s]);break;case 64:case 70:this.$=a[s-3],r.setClickEvent(a[s-2],a[s-1]),r.setTooltip(a[s-2],a[s]);break;case 65:case 73:this.$=a[s-2],r.setLink(a[s-1],a[s]);break;case 66:case 74:this.$=a[s-3],r.setLink(a[s-2],a[s-1],a[s]);break;case 67:case 75:this.$=a[s-3],r.setLink(a[s-2],a[s-1]),r.setTooltip(a[s-2],a[s]);break;case 68:case 76:this.$=a[s-4],r.setLink(a[s-3],a[s-2],a[s]),r.setTooltip(a[s-3],a[s-1]);break;case 71:this.$=a[s-3],r.setClickEvent(a[s-2],a[s-1],a[s]);break;case 72:this.$=a[s-4],r.setClickEvent(a[s-3],a[s-2],a[s-1]),r.setTooltip(a[s-3],a[s]);break;case 77:r.setCssClass(a[s-1],a[s]);}},table:[{3:1,4:2,5:e,6:4,7:5,8:n,9:r,10:i,11:a,12:6,13:11,19:o,23:s},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,3]},{3:14,4:2,5:e,6:4,7:5,8:n,9:r,10:i,11:a,12:6,13:11,19:o,23:s},{1:[2,9]},t(c,[2,5]),t(c,[2,6]),t(c,[2,7]),t(c,[2,8]),{14:15,20:[1,16]},{16:[1,17]},{20:[2,12]},{1:[2,4]},{15:18,17:[1,19],22:l},t([17,22],[2,13]),{6:30,7:29,8:n,9:r,10:i,11:a,13:11,19:o,24:21,26:22,27:34,28:43,29:44,31:23,33:24,34:25,35:26,36:27,37:28,38:u,40:h,42:f,43:d,48:p,50:g,51:y,63:m,64:b,66:v,70:_,84:x,85:k,86:w,87:T},{16:[1,49]},{18:50,21:[1,51]},{16:[2,15]},{25:[1,52]},{16:[1,53],25:[2,17]},t(E,[2,25],{32:[1,54]}),t(E,[2,27]),t(E,[2,28]),t(E,[2,29]),t(E,[2,30]),t(E,[2,31]),t(E,[2,32]),t(E,[2,33]),{39:[1,55]},{41:[1,56]},t(E,[2,36]),t(E,[2,44],{52:57,54:60,55:61,32:[1,59],53:[1,58],56:C,57:S,58:A,59:M,60:N,61:O,62:D}),{27:69,28:43,29:44,84:x,85:k,86:w,87:T},t(E,[2,46]),t(E,[2,47]),{28:70,84:x,85:k,86:w},{27:71,28:43,29:44,84:x,85:k,86:w,87:T},{27:72,28:43,29:44,84:x,85:k,86:w,87:T},{27:73,28:43,29:44,84:x,85:k,86:w,87:T},{53:[1,74]},t(B,[2,20],{28:43,29:44,27:75,30:[1,76],84:x,85:k,86:w,87:T}),t(B,[2,21],{30:[1,77]}),t(L,[2,91]),t(L,[2,92]),t(L,[2,93]),t([16,25,30,32,44,45,53,56,57,58,59,60,61,62,67,69],[2,94]),t(I,[2,10]),{15:78,22:l},{22:[2,14]},{1:[2,16]},{6:30,7:29,8:n,9:r,10:i,11:a,13:11,19:o,24:79,25:[2,18],26:22,27:34,28:43,29:44,31:23,33:24,34:25,35:26,36:27,37:28,38:u,40:h,42:f,43:d,48:p,50:g,51:y,63:m,64:b,66:v,70:_,84:x,85:k,86:w,87:T},t(E,[2,26]),t(E,[2,34]),t(E,[2,35]),{27:80,28:43,29:44,53:[1,81],84:x,85:k,86:w,87:T},{52:82,54:60,55:61,56:C,57:S,58:A,59:M,60:N,61:O,62:D},t(E,[2,45]),{55:83,61:O,62:D},t(F,[2,55],{54:84,56:C,57:S,58:A,59:M,60:N}),t(R,[2,56]),t(R,[2,57]),t(R,[2,58]),t(R,[2,59]),t(R,[2,60]),t(P,[2,61]),t(P,[2,62]),t(E,[2,37],{44:[1,85],45:[1,86]}),{49:[1,87]},{53:[1,88]},{53:[1,89]},{67:[1,90],69:[1,91]},{28:92,84:x,85:k,86:w},t(B,[2,22]),t(B,[2,23]),t(B,[2,24]),{16:[1,93]},{25:[2,19]},t(j,[2,48]),{27:94,28:43,29:44,84:x,85:k,86:w,87:T},{27:95,28:43,29:44,53:[1,96],84:x,85:k,86:w,87:T},t(F,[2,54],{54:97,56:C,57:S,58:A,59:M,60:N}),t(F,[2,53]),{28:98,84:x,85:k,86:w},{46:99,50:z},{27:101,28:43,29:44,84:x,85:k,86:w,87:T},t(E,[2,63],{53:[1,102]}),t(E,[2,65],{53:[1,104],65:[1,103]}),t(E,[2,69],{53:[1,105],68:[1,106]}),t(E,[2,73],{53:[1,108],65:[1,107]}),t(E,[2,77]),t(I,[2,11]),t(j,[2,50]),t(j,[2,49]),{27:109,28:43,29:44,84:x,85:k,86:w,87:T},t(F,[2,52]),t(E,[2,38],{45:[1,110]}),{47:[1,111]},{46:112,47:[2,42],50:z},t(E,[2,41]),t(E,[2,64]),t(E,[2,66]),t(E,[2,67],{65:[1,113]}),t(E,[2,70]),t(E,[2,71],{53:[1,114]}),t(E,[2,74]),t(E,[2,75],{65:[1,115]}),t(j,[2,51]),{46:116,50:z},t(E,[2,39]),{47:[2,43]},t(E,[2,68]),t(E,[2,72]),t(E,[2,76]),{47:[1,117]},t(E,[2,40])],defaultActions:{2:[2,1],3:[2,2],4:[2,3],6:[2,9],13:[2,12],14:[2,4],20:[2,15],51:[2,14],52:[2,16],79:[2,19],112:[2,43]},parseError:function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t);},parse:function(t){var e=this,n=[0],r=[],i=[null],a=[],o=this.table,s=\"\",c=0,l=0,u=0,h=2,f=1,d=a.slice.call(arguments,1),p=Object.create(this.lexer),g={yy:{}};for(var y in this.yy)Object.prototype.hasOwnProperty.call(this.yy,y)&&(g.yy[y]=this.yy[y]);p.setInput(t,g.yy),g.yy.lexer=p,g.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var m=p.yylloc;a.push(m);var b=p.options&&p.options.ranges;function v(){var t;return \"number\"!=typeof(t=r.pop()||p.lex()||f)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}\"function\"==typeof g.yy.parseError?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var _,x,k,w,T,E,C,S,A,M={};;){if(k=n[n.length-1],this.defaultActions[k]?w=this.defaultActions[k]:(null==_&&(_=v()),w=o[k]&&o[k][_]),void 0===w||!w.length||!w[0]){var N=\"\";for(E in A=[],o[k])this.terminals_[E]&&E>h&&A.push(\"'\"+this.terminals_[E]+\"'\");N=p.showPosition?\"Parse error on line \"+(c+1)+\":\\n\"+p.showPosition()+\"\\nExpecting \"+A.join(\", \")+\", got '\"+(this.terminals_[_]||_)+\"'\":\"Parse error on line \"+(c+1)+\": Unexpected \"+(_==f?\"end of input\":\"'\"+(this.terminals_[_]||_)+\"'\"),this.parseError(N,{text:p.match,token:this.terminals_[_]||_,line:p.yylineno,loc:m,expected:A});}if(w[0]instanceof Array&&w.length>1)throw new Error(\"Parse Error: multiple actions possible at state: \"+k+\", token: \"+_);switch(w[0]){case 1:n.push(_),i.push(p.yytext),a.push(p.yylloc),n.push(w[1]),_=null,x?(_=x,x=null):(l=p.yyleng,s=p.yytext,c=p.yylineno,m=p.yylloc,u>0&&u--);break;case 2:if(C=this.productions_[w[1]][1],M.$=i[i.length-C],M._$={first_line:a[a.length-(C||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(C||1)].first_column,last_column:a[a.length-1].last_column},b&&(M._$.range=[a[a.length-(C||1)].range[0],a[a.length-1].range[1]]),void 0!==(T=this.performAction.apply(M,[s,l,c,g.yy,w[1],i,a].concat(d))))return T;C&&(n=n.slice(0,-1*C*2),i=i.slice(0,-1*C),a=a.slice(0,-1*C)),n.push(this.productions_[w[1]][0]),i.push(M.$),a.push(M._$),S=o[n[n.length-2]][n[n.length-1]],n.push(S);break;case 3:return !0}}return !0}},U={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e);},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=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.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\\r\\n?|\\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\\r\\n?|\\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\\r\\n?|\\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError(\"Lexical error on line \"+(this.yylineno+1)+\". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\\n\"+this.showPosition(),{text:\"\",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t));},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return (t.length>20?\"...\":\"\")+t.substr(-20).replace(/\\n/g,\"\")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?\"...\":\"\")).replace(/\\n/g,\"\")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join(\"-\");return t+this.upcomingInput()+\"\\n\"+e+\"^\"},test_match:function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\\r\\n?|\\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\\r?\\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return !1}return !1},next:function(){if(this.done)return this.EOF;var t,e,n,r;this._input||(this.done=!0),this._more||(this.yytext=\"\",this.match=\"\");for(var i=this._currentRules(),a=0;a<i.length;a++)if((n=this._input.match(this.rules[i[a]]))&&(!e||n[0].length>e[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,i[a])))return t;if(this._backtrack){e=!1;continue}return !1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[r]))&&t:\"\"===this._input?this.EOF:this.parseError(\"Lexical error on line \"+(this.yylineno+1)+\". Unrecognized text.\\n\"+this.showPosition(),{text:\"\",token:null,line:this.yylineno})},lex:function(){return this.next()||this.lex()},begin:function(t){this.conditionStack.push(t);},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return (t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:\"INITIAL\"},pushState:function(t){this.begin(t);},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(t,e,n,r){switch(n){case 0:return this.begin(\"open_directive\"),19;case 1:return 8;case 2:return 9;case 3:return 10;case 4:return 11;case 5:return this.begin(\"type_directive\"),20;case 6:return this.popState(),this.begin(\"arg_directive\"),17;case 7:return this.popState(),this.popState(),22;case 8:return 21;case 9:case 10:case 19:case 27:break;case 11:return this.begin(\"acc_title\"),38;case 12:return this.popState(),\"acc_title_value\";case 13:return this.begin(\"acc_descr\"),40;case 14:return this.popState(),\"acc_descr_value\";case 15:this.begin(\"acc_descr_multiline\");break;case 16:case 37:case 40:case 43:case 46:case 49:case 52:this.popState();break;case 17:return \"acc_descr_multiline_value\";case 18:return 16;case 20:case 21:return 23;case 22:return this.begin(\"struct\"),45;case 23:return \"EDGE_STATE\";case 24:return \"EOF_IN_STRUCT\";case 25:return \"OPEN_IN_STRUCT\";case 26:return this.popState(),47;case 28:return \"MEMBER\";case 29:return 43;case 30:return 70;case 31:return 63;case 32:return 64;case 33:return 66;case 34:return 48;case 35:return 49;case 36:this.begin(\"generic\");break;case 38:return \"GENERICTYPE\";case 39:this.begin(\"string\");break;case 41:return \"STR\";case 42:this.begin(\"bqstring\");break;case 44:return \"BQUOTE_STR\";case 45:this.begin(\"href\");break;case 47:return 69;case 48:this.begin(\"callback_name\");break;case 50:this.popState(),this.begin(\"callback_args\");break;case 51:return 67;case 53:return 68;case 54:case 55:case 56:case 57:return 65;case 58:case 59:return 57;case 60:case 61:return 59;case 62:return 58;case 63:return 56;case 64:return 60;case 65:return 61;case 66:return 62;case 67:return 32;case 68:return 44;case 69:return 82;case 70:return \"DOT\";case 71:return \"PLUS\";case 72:return 79;case 73:case 74:return \"EQUALS\";case 75:return 86;case 76:return \"PUNCTUATION\";case 77:return 85;case 78:return 84;case 79:return 81;case 80:return 25}},rules:[/^(?:%%\\{)/,/^(?:.*direction\\s+TB[^\\n]*)/,/^(?:.*direction\\s+BT[^\\n]*)/,/^(?:.*direction\\s+RL[^\\n]*)/,/^(?:.*direction\\s+LR[^\\n]*)/,/^(?:((?:(?!\\}%%)[^:.])*))/,/^(?::)/,/^(?:\\}%%)/,/^(?:((?:(?!\\}%%).|\\n)*))/,/^(?:%%(?!\\{)*[^\\n]*(\\r?\\n?)+)/,/^(?:%%[^\\n]*(\\r?\\n)*)/,/^(?:accTitle\\s*:\\s*)/,/^(?:(?!\\n||)*[^\\n]*)/,/^(?:accDescr\\s*:\\s*)/,/^(?:(?!\\n||)*[^\\n]*)/,/^(?:accDescr\\s*\\{\\s*)/,/^(?:[\\}])/,/^(?:[^\\}]*)/,/^(?:\\s*(\\r?\\n)+)/,/^(?:\\s+)/,/^(?:classDiagram-v2\\b)/,/^(?:classDiagram\\b)/,/^(?:[{])/,/^(?:\\[\\*\\])/,/^(?:$)/,/^(?:[{])/,/^(?:[}])/,/^(?:[\\n])/,/^(?:[^{}\\n]*)/,/^(?:class\\b)/,/^(?:cssClass\\b)/,/^(?:callback\\b)/,/^(?:link\\b)/,/^(?:click\\b)/,/^(?:<<)/,/^(?:>>)/,/^(?:[~])/,/^(?:[~])/,/^(?:[^~]*)/,/^(?:[\"])/,/^(?:[\"])/,/^(?:[^\"]*)/,/^(?:[`])/,/^(?:[`])/,/^(?:[^`]+)/,/^(?:href[\\s]+[\"])/,/^(?:[\"])/,/^(?:[^\"]*)/,/^(?:call[\\s]+)/,/^(?:\\([\\s]*\\))/,/^(?:\\()/,/^(?:[^(]*)/,/^(?:\\))/,/^(?:[^)]*)/,/^(?:_self\\b)/,/^(?:_blank\\b)/,/^(?:_parent\\b)/,/^(?:_top\\b)/,/^(?:\\s*<\\|)/,/^(?:\\s*\\|>)/,/^(?:\\s*>)/,/^(?:\\s*<)/,/^(?:\\s*\\*)/,/^(?:\\s*o\\b)/,/^(?:\\s*\\(\\))/,/^(?:--)/,/^(?:\\.\\.)/,/^(?::{1}[^:\\n;]+)/,/^(?::{3})/,/^(?:-)/,/^(?:\\.)/,/^(?:\\+)/,/^(?:%)/,/^(?:=)/,/^(?:=)/,/^(?:\\w+)/,/^(?:[!\"#$%&'*+,-.`?\\\\/])/,/^(?:[0-9]+)/,/^(?:[\\u00AA\\u00B5\\u00BA\\u00C0-\\u00D6\\u00D8-\\u00F6]|[\\u00F8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0370-\\u0374\\u0376\\u0377]|[\\u037A-\\u037D\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5]|[\\u03F7-\\u0481\\u048A-\\u0527\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u05D0-\\u05EA]|[\\u05F0-\\u05F2\\u0620-\\u064A\\u066E\\u066F\\u0671-\\u06D3\\u06D5\\u06E5\\u06E6\\u06EE]|[\\u06EF\\u06FA-\\u06FC\\u06FF\\u0710\\u0712-\\u072F\\u074D-\\u07A5\\u07B1\\u07CA-\\u07EA]|[\\u07F4\\u07F5\\u07FA\\u0800-\\u0815\\u081A\\u0824\\u0828\\u0840-\\u0858\\u08A0]|[\\u08A2-\\u08AC\\u0904-\\u0939\\u093D\\u0950\\u0958-\\u0961\\u0971-\\u0977]|[\\u0979-\\u097F\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2]|[\\u09B6-\\u09B9\\u09BD\\u09CE\\u09DC\\u09DD\\u09DF-\\u09E1\\u09F0\\u09F1\\u0A05-\\u0A0A]|[\\u0A0F\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A32\\u0A33\\u0A35\\u0A36\\u0A38\\u0A39]|[\\u0A59-\\u0A5C\\u0A5E\\u0A72-\\u0A74\\u0A85-\\u0A8D\\u0A8F-\\u0A91\\u0A93-\\u0AA8]|[\\u0AAA-\\u0AB0\\u0AB2\\u0AB3\\u0AB5-\\u0AB9\\u0ABD\\u0AD0\\u0AE0\\u0AE1\\u0B05-\\u0B0C]|[\\u0B0F\\u0B10\\u0B13-\\u0B28\\u0B2A-\\u0B30\\u0B32\\u0B33\\u0B35-\\u0B39\\u0B3D\\u0B5C]|[\\u0B5D\\u0B5F-\\u0B61\\u0B71\\u0B83\\u0B85-\\u0B8A\\u0B8E-\\u0B90\\u0B92-\\u0B95\\u0B99]|[\\u0B9A\\u0B9C\\u0B9E\\u0B9F\\u0BA3\\u0BA4\\u0BA8-\\u0BAA\\u0BAE-\\u0BB9\\u0BD0]|[\\u0C05-\\u0C0C\\u0C0E-\\u0C10\\u0C12-\\u0C28\\u0C2A-\\u0C33\\u0C35-\\u0C39\\u0C3D]|[\\u0C58\\u0C59\\u0C60\\u0C61\\u0C85-\\u0C8C\\u0C8E-\\u0C90\\u0C92-\\u0CA8\\u0CAA-\\u0CB3]|[\\u0CB5-\\u0CB9\\u0CBD\\u0CDE\\u0CE0\\u0CE1\\u0CF1\\u0CF2\\u0D05-\\u0D0C\\u0D0E-\\u0D10]|[\\u0D12-\\u0D3A\\u0D3D\\u0D4E\\u0D60\\u0D61\\u0D7A-\\u0D7F\\u0D85-\\u0D96\\u0D9A-\\u0DB1]|[\\u0DB3-\\u0DBB\\u0DBD\\u0DC0-\\u0DC6\\u0E01-\\u0E30\\u0E32\\u0E33\\u0E40-\\u0E46\\u0E81]|[\\u0E82\\u0E84\\u0E87\\u0E88\\u0E8A\\u0E8D\\u0E94-\\u0E97\\u0E99-\\u0E9F\\u0EA1-\\u0EA3]|[\\u0EA5\\u0EA7\\u0EAA\\u0EAB\\u0EAD-\\u0EB0\\u0EB2\\u0EB3\\u0EBD\\u0EC0-\\u0EC4\\u0EC6]|[\\u0EDC-\\u0EDF\\u0F00\\u0F40-\\u0F47\\u0F49-\\u0F6C\\u0F88-\\u0F8C\\u1000-\\u102A]|[\\u103F\\u1050-\\u1055\\u105A-\\u105D\\u1061\\u1065\\u1066\\u106E-\\u1070\\u1075-\\u1081]|[\\u108E\\u10A0-\\u10C5\\u10C7\\u10CD\\u10D0-\\u10FA\\u10FC-\\u1248\\u124A-\\u124D]|[\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0]|[\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310]|[\\u1312-\\u1315\\u1318-\\u135A\\u1380-\\u138F\\u13A0-\\u13F4\\u1401-\\u166C]|[\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u1700-\\u170C\\u170E-\\u1711]|[\\u1720-\\u1731\\u1740-\\u1751\\u1760-\\u176C\\u176E-\\u1770\\u1780-\\u17B3\\u17D7]|[\\u17DC\\u1820-\\u1877\\u1880-\\u18A8\\u18AA\\u18B0-\\u18F5\\u1900-\\u191C]|[\\u1950-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19C1-\\u19C7\\u1A00-\\u1A16]|[\\u1A20-\\u1A54\\u1AA7\\u1B05-\\u1B33\\u1B45-\\u1B4B\\u1B83-\\u1BA0\\u1BAE\\u1BAF]|[\\u1BBA-\\u1BE5\\u1C00-\\u1C23\\u1C4D-\\u1C4F\\u1C5A-\\u1C7D\\u1CE9-\\u1CEC]|[\\u1CEE-\\u1CF1\\u1CF5\\u1CF6\\u1D00-\\u1DBF\\u1E00-\\u1F15\\u1F18-\\u1F1D]|[\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D]|[\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3]|[\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u2071\\u207F]|[\\u2090-\\u209C\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2119-\\u211D\\u2124\\u2126\\u2128]|[\\u212A-\\u212D\\u212F-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u2183\\u2184]|[\\u2C00-\\u2C2E\\u2C30-\\u2C5E\\u2C60-\\u2CE4\\u2CEB-\\u2CEE\\u2CF2\\u2CF3]|[\\u2D00-\\u2D25\\u2D27\\u2D2D\\u2D30-\\u2D67\\u2D6F\\u2D80-\\u2D96\\u2DA0-\\u2DA6]|[\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE]|[\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u2E2F\\u3005\\u3006\\u3031-\\u3035\\u303B\\u303C]|[\\u3041-\\u3096\\u309D-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312D]|[\\u3131-\\u318E\\u31A0-\\u31BA\\u31F0-\\u31FF\\u3400-\\u4DB5\\u4E00-\\u9FCC]|[\\uA000-\\uA48C\\uA4D0-\\uA4FD\\uA500-\\uA60C\\uA610-\\uA61F\\uA62A\\uA62B]|[\\uA640-\\uA66E\\uA67F-\\uA697\\uA6A0-\\uA6E5\\uA717-\\uA71F\\uA722-\\uA788]|[\\uA78B-\\uA78E\\uA790-\\uA793\\uA7A0-\\uA7AA\\uA7F8-\\uA801\\uA803-\\uA805]|[\\uA807-\\uA80A\\uA80C-\\uA822\\uA840-\\uA873\\uA882-\\uA8B3\\uA8F2-\\uA8F7\\uA8FB]|[\\uA90A-\\uA925\\uA930-\\uA946\\uA960-\\uA97C\\uA984-\\uA9B2\\uA9CF\\uAA00-\\uAA28]|[\\uAA40-\\uAA42\\uAA44-\\uAA4B\\uAA60-\\uAA76\\uAA7A\\uAA80-\\uAAAF\\uAAB1\\uAAB5]|[\\uAAB6\\uAAB9-\\uAABD\\uAAC0\\uAAC2\\uAADB-\\uAADD\\uAAE0-\\uAAEA\\uAAF2-\\uAAF4]|[\\uAB01-\\uAB06\\uAB09-\\uAB0E\\uAB11-\\uAB16\\uAB20-\\uAB26\\uAB28-\\uAB2E]|[\\uABC0-\\uABE2\\uAC00-\\uD7A3\\uD7B0-\\uD7C6\\uD7CB-\\uD7FB\\uF900-\\uFA6D]|[\\uFA70-\\uFAD9\\uFB00-\\uFB06\\uFB13-\\uFB17\\uFB1D\\uFB1F-\\uFB28\\uFB2A-\\uFB36]|[\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46-\\uFBB1\\uFBD3-\\uFD3D]|[\\uFD50-\\uFD8F\\uFD92-\\uFDC7\\uFDF0-\\uFDFB\\uFE70-\\uFE74\\uFE76-\\uFEFC]|[\\uFF21-\\uFF3A\\uFF41-\\uFF5A\\uFF66-\\uFFBE\\uFFC2-\\uFFC7\\uFFCA-\\uFFCF]|[\\uFFD2-\\uFFD7\\uFFDA-\\uFFDC])/,/^(?:\\s)/,/^(?:$)/],conditions:{acc_descr_multiline:{rules:[16,17],inclusive:!1},acc_descr:{rules:[14],inclusive:!1},acc_title:{rules:[12],inclusive:!1},arg_directive:{rules:[7,8],inclusive:!1},type_directive:{rules:[6,7],inclusive:!1},open_directive:{rules:[5],inclusive:!1},callback_args:{rules:[52,53],inclusive:!1},callback_name:{rules:[49,50,51],inclusive:!1},href:{rules:[46,47],inclusive:!1},struct:{rules:[23,24,25,26,27,28],inclusive:!1},generic:{rules:[37,38],inclusive:!1},bqstring:{rules:[43,44],inclusive:!1},string:{rules:[40,41],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,9,10,11,13,15,18,19,20,21,22,23,29,30,31,32,33,34,35,36,39,42,45,48,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80],inclusive:!0}}};function $(){this.yy={};}return Y.lexer=U,$.prototype=Y,Y.Parser=$,new $}();e.parser=r,e.Parser=r.Parser,e.parse=function(){return r.parse.apply(r,arguments)},e.main=function(t){t[1]||(console.log(\"Usage: \"+t[0]+\" FILE\"),process.exit(1));var r=n(8218).readFileSync(n(6470).normalize(t[1]),\"utf8\");return e.parser.parse(r)},n.c[n.s]===t&&e.main(process.argv.slice(1));},5890:(t,e,n)=>{t=n.nmd(t);var r=function(){var t=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},e=[1,2],n=[1,5],r=[6,9,11,23,25,27,29,30,49],i=[1,17],a=[1,18],o=[1,19],s=[1,20],c=[1,21],l=[1,24],u=[1,29],h=[1,30],f=[1,31],d=[1,32],p=[6,9,11,15,20,23,25,27,29,30,42,43,44,45,49],g=[1,45],y=[30,46,47],m=[4,6,9,11,23,25,27,29,30,49],b=[42,43,44,45],v=[22,37],_=[1,64],x={trace:function(){},yy:{},symbols_:{error:2,start:3,ER_DIAGRAM:4,document:5,EOF:6,directive:7,line:8,SPACE:9,statement:10,NEWLINE:11,openDirective:12,typeDirective:13,closeDirective:14,\":\":15,argDirective:16,entityName:17,relSpec:18,role:19,BLOCK_START:20,attributes:21,BLOCK_STOP:22,title:23,title_value:24,acc_title:25,acc_title_value:26,acc_descr:27,acc_descr_value:28,acc_descr_multiline_value:29,ALPHANUM:30,\".\":31,attribute:32,attributeType:33,attributeName:34,attributeKeyType:35,attributeComment:36,ATTRIBUTE_WORD:37,ATTRIBUTE_KEY:38,COMMENT:39,cardinality:40,relType:41,ZERO_OR_ONE:42,ZERO_OR_MORE:43,ONE_OR_MORE:44,ONLY_ONE:45,NON_IDENTIFYING:46,IDENTIFYING:47,WORD:48,open_directive:49,type_directive:50,arg_directive:51,close_directive:52,$accept:0,$end:1},terminals_:{2:\"error\",4:\"ER_DIAGRAM\",6:\"EOF\",9:\"SPACE\",11:\"NEWLINE\",15:\":\",20:\"BLOCK_START\",22:\"BLOCK_STOP\",23:\"title\",24:\"title_value\",25:\"acc_title\",26:\"acc_title_value\",27:\"acc_descr\",28:\"acc_descr_value\",29:\"acc_descr_multiline_value\",30:\"ALPHANUM\",31:\".\",37:\"ATTRIBUTE_WORD\",38:\"ATTRIBUTE_KEY\",39:\"COMMENT\",42:\"ZERO_OR_ONE\",43:\"ZERO_OR_MORE\",44:\"ONE_OR_MORE\",45:\"ONLY_ONE\",46:\"NON_IDENTIFYING\",47:\"IDENTIFYING\",48:\"WORD\",49:\"open_directive\",50:\"type_directive\",51:\"arg_directive\",52:\"close_directive\"},productions_:[0,[3,3],[3,2],[5,0],[5,2],[8,2],[8,1],[8,1],[8,1],[7,4],[7,6],[10,1],[10,5],[10,4],[10,3],[10,1],[10,2],[10,2],[10,2],[10,1],[17,1],[17,3],[21,1],[21,2],[32,2],[32,3],[32,3],[32,4],[33,1],[34,1],[35,1],[36,1],[18,3],[40,1],[40,1],[40,1],[40,1],[41,1],[41,1],[19,1],[19,1],[12,1],[13,1],[16,1],[14,1]],performAction:function(t,e,n,r,i,a,o){var s=a.length-1;switch(i){case 1:break;case 3:case 7:case 8:this.$=[];break;case 4:a[s-1].push(a[s]),this.$=a[s-1];break;case 5:case 6:case 20:case 28:case 29:case 30:case 40:this.$=a[s];break;case 12:r.addEntity(a[s-4]),r.addEntity(a[s-2]),r.addRelationship(a[s-4],a[s],a[s-2],a[s-3]);break;case 13:r.addEntity(a[s-3]),r.addAttributes(a[s-3],a[s-1]);break;case 14:r.addEntity(a[s-2]);break;case 15:r.addEntity(a[s]);break;case 16:case 17:this.$=a[s].trim(),r.setAccTitle(this.$);break;case 18:case 19:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 21:this.$=a[s-2]+a[s-1]+a[s];break;case 22:this.$=[a[s]];break;case 23:a[s].push(a[s-1]),this.$=a[s];break;case 24:this.$={attributeType:a[s-1],attributeName:a[s]};break;case 25:this.$={attributeType:a[s-2],attributeName:a[s-1],attributeKeyType:a[s]};break;case 26:this.$={attributeType:a[s-2],attributeName:a[s-1],attributeComment:a[s]};break;case 27:this.$={attributeType:a[s-3],attributeName:a[s-2],attributeKeyType:a[s-1],attributeComment:a[s]};break;case 31:case 39:this.$=a[s].replace(/\"/g,\"\");break;case 32:this.$={cardA:a[s],relType:a[s-1],cardB:a[s-2]};break;case 33:this.$=r.Cardinality.ZERO_OR_ONE;break;case 34:this.$=r.Cardinality.ZERO_OR_MORE;break;case 35:this.$=r.Cardinality.ONE_OR_MORE;break;case 36:this.$=r.Cardinality.ONLY_ONE;break;case 37:this.$=r.Identification.NON_IDENTIFYING;break;case 38:this.$=r.Identification.IDENTIFYING;break;case 41:r.parseDirective(\"%%{\",\"open_directive\");break;case 42:r.parseDirective(a[s],\"type_directive\");break;case 43:a[s]=a[s].trim().replace(/'/g,'\"'),r.parseDirective(a[s],\"arg_directive\");break;case 44:r.parseDirective(\"}%%\",\"close_directive\",\"er\");}},table:[{3:1,4:e,7:3,12:4,49:n},{1:[3]},t(r,[2,3],{5:6}),{3:7,4:e,7:3,12:4,49:n},{13:8,50:[1,9]},{50:[2,41]},{6:[1,10],7:15,8:11,9:[1,12],10:13,11:[1,14],12:4,17:16,23:i,25:a,27:o,29:s,30:c,49:n},{1:[2,2]},{14:22,15:[1,23],52:l},t([15,52],[2,42]),t(r,[2,8],{1:[2,1]}),t(r,[2,4]),{7:15,10:25,12:4,17:16,23:i,25:a,27:o,29:s,30:c,49:n},t(r,[2,6]),t(r,[2,7]),t(r,[2,11]),t(r,[2,15],{18:26,40:28,20:[1,27],42:u,43:h,44:f,45:d}),{24:[1,33]},{26:[1,34]},{28:[1,35]},t(r,[2,19]),t(p,[2,20],{31:[1,36]}),{11:[1,37]},{16:38,51:[1,39]},{11:[2,44]},t(r,[2,5]),{17:40,30:c},{21:41,22:[1,42],32:43,33:44,37:g},{41:46,46:[1,47],47:[1,48]},t(y,[2,33]),t(y,[2,34]),t(y,[2,35]),t(y,[2,36]),t(r,[2,16]),t(r,[2,17]),t(r,[2,18]),{17:49,30:c},t(m,[2,9]),{14:50,52:l},{52:[2,43]},{15:[1,51]},{22:[1,52]},t(r,[2,14]),{21:53,22:[2,22],32:43,33:44,37:g},{34:54,37:[1,55]},{37:[2,28]},{40:56,42:u,43:h,44:f,45:d},t(b,[2,37]),t(b,[2,38]),t(p,[2,21]),{11:[1,57]},{19:58,30:[1,60],48:[1,59]},t(r,[2,13]),{22:[2,23]},t(v,[2,24],{35:61,36:62,38:[1,63],39:_}),t([22,37,38,39],[2,29]),{30:[2,32]},t(m,[2,10]),t(r,[2,12]),t(r,[2,39]),t(r,[2,40]),t(v,[2,25],{36:65,39:_}),t(v,[2,26]),t([22,37,39],[2,30]),t(v,[2,31]),t(v,[2,27])],defaultActions:{5:[2,41],7:[2,2],24:[2,44],39:[2,43],45:[2,28],53:[2,23],56:[2,32]},parseError:function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t);},parse:function(t){var e=this,n=[0],r=[],i=[null],a=[],o=this.table,s=\"\",c=0,l=0,u=0,h=2,f=1,d=a.slice.call(arguments,1),p=Object.create(this.lexer),g={yy:{}};for(var y in this.yy)Object.prototype.hasOwnProperty.call(this.yy,y)&&(g.yy[y]=this.yy[y]);p.setInput(t,g.yy),g.yy.lexer=p,g.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var m=p.yylloc;a.push(m);var b=p.options&&p.options.ranges;function v(){var t;return \"number\"!=typeof(t=r.pop()||p.lex()||f)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}\"function\"==typeof g.yy.parseError?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var _,x,k,w,T,E,C,S,A,M={};;){if(k=n[n.length-1],this.defaultActions[k]?w=this.defaultActions[k]:(null==_&&(_=v()),w=o[k]&&o[k][_]),void 0===w||!w.length||!w[0]){var N=\"\";for(E in A=[],o[k])this.terminals_[E]&&E>h&&A.push(\"'\"+this.terminals_[E]+\"'\");N=p.showPosition?\"Parse error on line \"+(c+1)+\":\\n\"+p.showPosition()+\"\\nExpecting \"+A.join(\", \")+\", got '\"+(this.terminals_[_]||_)+\"'\":\"Parse error on line \"+(c+1)+\": Unexpected \"+(_==f?\"end of input\":\"'\"+(this.terminals_[_]||_)+\"'\"),this.parseError(N,{text:p.match,token:this.terminals_[_]||_,line:p.yylineno,loc:m,expected:A});}if(w[0]instanceof Array&&w.length>1)throw new Error(\"Parse Error: multiple actions possible at state: \"+k+\", token: \"+_);switch(w[0]){case 1:n.push(_),i.push(p.yytext),a.push(p.yylloc),n.push(w[1]),_=null,x?(_=x,x=null):(l=p.yyleng,s=p.yytext,c=p.yylineno,m=p.yylloc,u>0&&u--);break;case 2:if(C=this.productions_[w[1]][1],M.$=i[i.length-C],M._$={first_line:a[a.length-(C||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(C||1)].first_column,last_column:a[a.length-1].last_column},b&&(M._$.range=[a[a.length-(C||1)].range[0],a[a.length-1].range[1]]),void 0!==(T=this.performAction.apply(M,[s,l,c,g.yy,w[1],i,a].concat(d))))return T;C&&(n=n.slice(0,-1*C*2),i=i.slice(0,-1*C),a=a.slice(0,-1*C)),n.push(this.productions_[w[1]][0]),i.push(M.$),a.push(M._$),S=o[n[n.length-2]][n[n.length-1]],n.push(S);break;case 3:return !0}}return !0}},k={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e);},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=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.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\\r\\n?|\\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\\r\\n?|\\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\\r\\n?|\\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError(\"Lexical error on line \"+(this.yylineno+1)+\". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\\n\"+this.showPosition(),{text:\"\",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t));},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return (t.length>20?\"...\":\"\")+t.substr(-20).replace(/\\n/g,\"\")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?\"...\":\"\")).replace(/\\n/g,\"\")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join(\"-\");return t+this.upcomingInput()+\"\\n\"+e+\"^\"},test_match:function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\\r\\n?|\\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\\r?\\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return !1}return !1},next:function(){if(this.done)return this.EOF;var t,e,n,r;this._input||(this.done=!0),this._more||(this.yytext=\"\",this.match=\"\");for(var i=this._currentRules(),a=0;a<i.length;a++)if((n=this._input.match(this.rules[i[a]]))&&(!e||n[0].length>e[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,i[a])))return t;if(this._backtrack){e=!1;continue}return !1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[r]))&&t:\"\"===this._input?this.EOF:this.parseError(\"Lexical error on line \"+(this.yylineno+1)+\". Unrecognized text.\\n\"+this.showPosition(),{text:\"\",token:null,line:this.yylineno})},lex:function(){return this.next()||this.lex()},begin:function(t){this.conditionStack.push(t);},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return (t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:\"INITIAL\"},pushState:function(t){this.begin(t);},stateStackSize:function(){return this.conditionStack.length},options:{\"case-insensitive\":!0},performAction:function(t,e,n,r){switch(n){case 0:return this.begin(\"acc_title\"),25;case 1:return this.popState(),\"acc_title_value\";case 2:return this.begin(\"acc_descr\"),27;case 3:return this.popState(),\"acc_descr_value\";case 4:this.begin(\"acc_descr_multiline\");break;case 5:this.popState();break;case 6:return \"acc_descr_multiline_value\";case 7:return this.begin(\"open_directive\"),49;case 8:return this.begin(\"type_directive\"),50;case 9:return this.popState(),this.begin(\"arg_directive\"),15;case 10:return this.popState(),this.popState(),52;case 11:return 51;case 12:case 13:case 15:case 20:case 25:break;case 14:return 11;case 16:return 9;case 17:return 48;case 18:return 4;case 19:return this.begin(\"block\"),20;case 21:return 38;case 22:case 23:return 37;case 24:return 39;case 26:return this.popState(),22;case 27:case 40:return e.yytext[0];case 28:case 32:return 42;case 29:case 33:return 43;case 30:case 34:return 44;case 31:return 45;case 35:case 37:case 38:return 46;case 36:return 47;case 39:return 30;case 41:return 6}},rules:[/^(?:accTitle\\s*:\\s*)/i,/^(?:(?!\\n||)*[^\\n]*)/i,/^(?:accDescr\\s*:\\s*)/i,/^(?:(?!\\n||)*[^\\n]*)/i,/^(?:accDescr\\s*\\{\\s*)/i,/^(?:[\\}])/i,/^(?:[^\\}]*)/i,/^(?:%%\\{)/i,/^(?:((?:(?!\\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\\}%%)/i,/^(?:((?:(?!\\}%%).|\\n)*))/i,/^(?:%(?!\\{)[^\\n]*)/i,/^(?:[^\\}]%%[^\\n]*)/i,/^(?:[\\n]+)/i,/^(?:\\s+)/i,/^(?:[\\s]+)/i,/^(?:\"[^\"]*\")/i,/^(?:erDiagram\\b)/i,/^(?:\\{)/i,/^(?:\\s+)/i,/^(?:\\b((?:PK)|(?:FK))\\b)/i,/^(?:(.*?)[~](.*?)*[~])/i,/^(?:[A-Za-z][A-Za-z0-9\\-_\\[\\]]*)/i,/^(?:\"[^\"]*\")/i,/^(?:[\\n]+)/i,/^(?:\\})/i,/^(?:.)/i,/^(?:\\|o\\b)/i,/^(?:\\}o\\b)/i,/^(?:\\}\\|)/i,/^(?:\\|\\|)/i,/^(?:o\\|)/i,/^(?:o\\{)/i,/^(?:\\|\\{)/i,/^(?:\\.\\.)/i,/^(?:--)/i,/^(?:\\.-)/i,/^(?:-\\.)/i,/^(?:[A-Za-z][A-Za-z0-9\\-_]*)/i,/^(?:.)/i,/^(?:$)/i],conditions:{acc_descr_multiline:{rules:[5,6],inclusive:!1},acc_descr:{rules:[3],inclusive:!1},acc_title:{rules:[1],inclusive:!1},open_directive:{rules:[8],inclusive:!1},type_directive:{rules:[9,10],inclusive:!1},arg_directive:{rules:[10,11],inclusive:!1},block:{rules:[20,21,22,23,24,25,26,27],inclusive:!1},INITIAL:{rules:[0,2,4,7,12,13,14,15,16,17,18,19,28,29,30,31,32,33,34,35,36,37,38,39,40,41],inclusive:!0}}};function w(){this.yy={};}return x.lexer=k,w.prototype=x,x.Parser=w,new w}();e.parser=r,e.Parser=r.Parser,e.parse=function(){return r.parse.apply(r,arguments)},e.main=function(t){t[1]||(console.log(\"Usage: \"+t[0]+\" FILE\"),process.exit(1));var r=n(8009).readFileSync(n(6470).normalize(t[1]),\"utf8\");return e.parser.parse(r)},n.c[n.s]===t&&e.main(process.argv.slice(1));},3602:(t,e,n)=>{t=n.nmd(t);var r=function(){var t=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},e=[1,9],n=[1,7],r=[1,6],i=[1,8],a=[1,20,21,22,23,38,44,46,48,52,66,67,86,87,88,89,90,91,95,105,106,109,111,112,118,119,120,121,122,123,124,125,126,127],o=[2,10],s=[1,20],c=[1,21],l=[1,22],u=[1,23],h=[1,30],f=[1,32],d=[1,33],p=[1,34],g=[1,62],y=[1,48],m=[1,52],b=[1,36],v=[1,37],_=[1,38],x=[1,39],k=[1,40],w=[1,56],T=[1,63],E=[1,51],C=[1,53],S=[1,55],A=[1,59],M=[1,60],N=[1,41],O=[1,42],D=[1,43],B=[1,44],L=[1,61],I=[1,50],F=[1,54],R=[1,57],P=[1,58],j=[1,49],z=[1,66],Y=[1,71],U=[1,20,21,22,23,38,42,44,46,48,52,66,67,86,87,88,89,90,91,95,105,106,109,111,112,118,119,120,121,122,123,124,125,126,127],$=[1,75],W=[1,74],q=[1,76],H=[20,21,23,81,82],V=[1,99],G=[1,104],X=[1,107],Z=[1,108],Q=[1,101],K=[1,106],J=[1,109],tt=[1,102],et=[1,114],nt=[1,113],rt=[1,103],it=[1,105],at=[1,110],ot=[1,111],st=[1,112],ct=[1,115],lt=[20,21,22,23,81,82],ut=[20,21,22,23,53,81,82],ht=[20,21,22,23,40,52,53,55,57,59,61,63,65,66,67,69,71,73,74,76,81,82,91,95,105,106,109,111,112,122,123,124,125,126,127],ft=[20,21,23],dt=[20,21,23,52,66,67,81,82,91,95,105,106,109,111,112,122,123,124,125,126,127],pt=[1,12,20,21,22,23,24,38,42,44,46,48,52,66,67,86,87,88,89,90,91,95,105,106,109,111,112,118,119,120,121,122,123,124,125,126,127],gt=[52,66,67,91,95,105,106,109,111,112,122,123,124,125,126,127],yt=[1,149],mt=[1,157],bt=[1,158],vt=[1,159],_t=[1,160],xt=[1,144],kt=[1,145],wt=[1,141],Tt=[1,152],Et=[1,153],Ct=[1,154],St=[1,155],At=[1,156],Mt=[1,161],Nt=[1,162],Ot=[1,147],Dt=[1,150],Bt=[1,146],Lt=[1,143],It=[20,21,22,23,38,42,44,46,48,52,66,67,86,87,88,89,90,91,95,105,106,109,111,112,118,119,120,121,122,123,124,125,126,127],Ft=[1,165],Rt=[20,21,22,23,26,52,66,67,91,105,106,109,111,112,122,123,124,125,126,127],Pt=[20,21,22,23,24,26,38,40,41,42,52,56,58,60,62,64,66,67,68,70,72,73,75,77,81,82,86,87,88,89,90,91,92,95,105,106,109,111,112,113,114,122,123,124,125,126,127],jt=[12,21,22,24],zt=[22,106],Yt=[1,250],Ut=[1,245],$t=[1,246],Wt=[1,254],qt=[1,251],Ht=[1,248],Vt=[1,247],Gt=[1,249],Xt=[1,252],Zt=[1,253],Qt=[1,255],Kt=[1,273],Jt=[20,21,23,106],te=[20,21,22,23,66,67,86,102,105,106,109,110,111,112,113],ee={trace:function(){},yy:{},symbols_:{error:2,start:3,mermaidDoc:4,directive:5,openDirective:6,typeDirective:7,closeDirective:8,separator:9,\":\":10,argDirective:11,open_directive:12,type_directive:13,arg_directive:14,close_directive:15,graphConfig:16,document:17,line:18,statement:19,SEMI:20,NEWLINE:21,SPACE:22,EOF:23,GRAPH:24,NODIR:25,DIR:26,FirstStmtSeperator:27,ending:28,endToken:29,spaceList:30,spaceListNewline:31,verticeStatement:32,styleStatement:33,linkStyleStatement:34,classDefStatement:35,classStatement:36,clickStatement:37,subgraph:38,text:39,SQS:40,SQE:41,end:42,direction:43,acc_title:44,acc_title_value:45,acc_descr:46,acc_descr_value:47,acc_descr_multiline_value:48,link:49,node:50,vertex:51,AMP:52,STYLE_SEPARATOR:53,idString:54,DOUBLECIRCLESTART:55,DOUBLECIRCLEEND:56,PS:57,PE:58,\"(-\":59,\"-)\":60,STADIUMSTART:61,STADIUMEND:62,SUBROUTINESTART:63,SUBROUTINEEND:64,VERTEX_WITH_PROPS_START:65,ALPHA:66,COLON:67,PIPE:68,CYLINDERSTART:69,CYLINDEREND:70,DIAMOND_START:71,DIAMOND_STOP:72,TAGEND:73,TRAPSTART:74,TRAPEND:75,INVTRAPSTART:76,INVTRAPEND:77,linkStatement:78,arrowText:79,TESTSTR:80,START_LINK:81,LINK:82,textToken:83,STR:84,keywords:85,STYLE:86,LINKSTYLE:87,CLASSDEF:88,CLASS:89,CLICK:90,DOWN:91,UP:92,textNoTags:93,textNoTagsToken:94,DEFAULT:95,stylesOpt:96,alphaNum:97,CALLBACKNAME:98,CALLBACKARGS:99,HREF:100,LINK_TARGET:101,HEX:102,numList:103,INTERPOLATE:104,NUM:105,COMMA:106,style:107,styleComponent:108,MINUS:109,UNIT:110,BRKT:111,DOT:112,PCT:113,TAGSTART:114,alphaNumToken:115,idStringToken:116,alphaNumStatement:117,direction_tb:118,direction_bt:119,direction_rl:120,direction_lr:121,PUNCTUATION:122,UNICODE_TEXT:123,PLUS:124,EQUALS:125,MULT:126,UNDERSCORE:127,graphCodeTokens:128,ARROW_CROSS:129,ARROW_POINT:130,ARROW_CIRCLE:131,ARROW_OPEN:132,QUOTE:133,$accept:0,$end:1},terminals_:{2:\"error\",10:\":\",12:\"open_directive\",13:\"type_directive\",14:\"arg_directive\",15:\"close_directive\",20:\"SEMI\",21:\"NEWLINE\",22:\"SPACE\",23:\"EOF\",24:\"GRAPH\",25:\"NODIR\",26:\"DIR\",38:\"subgraph\",40:\"SQS\",41:\"SQE\",42:\"end\",44:\"acc_title\",45:\"acc_title_value\",46:\"acc_descr\",47:\"acc_descr_value\",48:\"acc_descr_multiline_value\",52:\"AMP\",53:\"STYLE_SEPARATOR\",55:\"DOUBLECIRCLESTART\",56:\"DOUBLECIRCLEEND\",57:\"PS\",58:\"PE\",59:\"(-\",60:\"-)\",61:\"STADIUMSTART\",62:\"STADIUMEND\",63:\"SUBROUTINESTART\",64:\"SUBROUTINEEND\",65:\"VERTEX_WITH_PROPS_START\",66:\"ALPHA\",67:\"COLON\",68:\"PIPE\",69:\"CYLINDERSTART\",70:\"CYLINDEREND\",71:\"DIAMOND_START\",72:\"DIAMOND_STOP\",73:\"TAGEND\",74:\"TRAPSTART\",75:\"TRAPEND\",76:\"INVTRAPSTART\",77:\"INVTRAPEND\",80:\"TESTSTR\",81:\"START_LINK\",82:\"LINK\",84:\"STR\",86:\"STYLE\",87:\"LINKSTYLE\",88:\"CLASSDEF\",89:\"CLASS\",90:\"CLICK\",91:\"DOWN\",92:\"UP\",95:\"DEFAULT\",98:\"CALLBACKNAME\",99:\"CALLBACKARGS\",100:\"HREF\",101:\"LINK_TARGET\",102:\"HEX\",104:\"INTERPOLATE\",105:\"NUM\",106:\"COMMA\",109:\"MINUS\",110:\"UNIT\",111:\"BRKT\",112:\"DOT\",113:\"PCT\",114:\"TAGSTART\",118:\"direction_tb\",119:\"direction_bt\",120:\"direction_rl\",121:\"direction_lr\",122:\"PUNCTUATION\",123:\"UNICODE_TEXT\",124:\"PLUS\",125:\"EQUALS\",126:\"MULT\",127:\"UNDERSCORE\",129:\"ARROW_CROSS\",130:\"ARROW_POINT\",131:\"ARROW_CIRCLE\",132:\"ARROW_OPEN\",133:\"QUOTE\"},productions_:[0,[3,1],[3,2],[5,4],[5,6],[6,1],[7,1],[11,1],[8,1],[4,2],[17,0],[17,2],[18,1],[18,1],[18,1],[18,1],[18,1],[16,2],[16,2],[16,2],[16,3],[28,2],[28,1],[29,1],[29,1],[29,1],[27,1],[27,1],[27,2],[31,2],[31,2],[31,1],[31,1],[30,2],[30,1],[19,2],[19,2],[19,2],[19,2],[19,2],[19,2],[19,9],[19,6],[19,4],[19,1],[19,2],[19,2],[19,1],[9,1],[9,1],[9,1],[32,3],[32,4],[32,2],[32,1],[50,1],[50,5],[50,3],[51,4],[51,4],[51,6],[51,4],[51,4],[51,4],[51,8],[51,4],[51,4],[51,4],[51,6],[51,4],[51,4],[51,4],[51,4],[51,4],[51,1],[49,2],[49,3],[49,3],[49,1],[49,3],[78,1],[79,3],[39,1],[39,2],[39,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[93,1],[93,2],[35,5],[35,5],[36,5],[37,2],[37,4],[37,3],[37,5],[37,2],[37,4],[37,4],[37,6],[37,2],[37,4],[37,2],[37,4],[37,4],[37,6],[33,5],[33,5],[34,5],[34,5],[34,9],[34,9],[34,7],[34,7],[103,1],[103,3],[96,1],[96,3],[107,1],[107,2],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[94,1],[94,1],[94,1],[94,1],[54,1],[54,2],[97,1],[97,2],[117,1],[117,1],[117,1],[117,1],[43,1],[43,1],[43,1],[43,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1]],performAction:function(t,e,n,r,i,a,o){var s=a.length-1;switch(i){case 5:r.parseDirective(\"%%{\",\"open_directive\");break;case 6:r.parseDirective(a[s],\"type_directive\");break;case 7:a[s]=a[s].trim().replace(/'/g,'\"'),r.parseDirective(a[s],\"arg_directive\");break;case 8:r.parseDirective(\"}%%\",\"close_directive\",\"flowchart\");break;case 10:case 36:case 37:case 38:case 39:case 40:this.$=[];break;case 11:a[s]!==[]&&a[s-1].push(a[s]),this.$=a[s-1];break;case 12:case 82:case 84:case 96:case 152:case 154:case 155:case 78:case 150:this.$=a[s];break;case 19:r.setDirection(\"TB\"),this.$=\"TB\";break;case 20:r.setDirection(a[s-1]),this.$=a[s-1];break;case 35:this.$=a[s-1].nodes;break;case 41:this.$=r.addSubGraph(a[s-6],a[s-1],a[s-4]);break;case 42:this.$=r.addSubGraph(a[s-3],a[s-1],a[s-3]);break;case 43:this.$=r.addSubGraph(void 0,a[s-1],void 0);break;case 45:this.$=a[s].trim(),r.setAccTitle(this.$);break;case 46:case 47:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 51:r.addLink(a[s-2].stmt,a[s],a[s-1]),this.$={stmt:a[s],nodes:a[s].concat(a[s-2].nodes)};break;case 52:r.addLink(a[s-3].stmt,a[s-1],a[s-2]),this.$={stmt:a[s-1],nodes:a[s-1].concat(a[s-3].nodes)};break;case 53:this.$={stmt:a[s-1],nodes:a[s-1]};break;case 54:this.$={stmt:a[s],nodes:a[s]};break;case 55:case 123:case 125:this.$=[a[s]];break;case 56:this.$=a[s-4].concat(a[s]);break;case 57:this.$=[a[s-2]],r.setClass(a[s-2],a[s]);break;case 58:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],\"square\");break;case 59:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],\"doublecircle\");break;case 60:this.$=a[s-5],r.addVertex(a[s-5],a[s-2],\"circle\");break;case 61:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],\"ellipse\");break;case 62:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],\"stadium\");break;case 63:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],\"subroutine\");break;case 64:this.$=a[s-7],r.addVertex(a[s-7],a[s-1],\"rect\",void 0,void 0,void 0,Object.fromEntries([[a[s-5],a[s-3]]]));break;case 65:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],\"cylinder\");break;case 66:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],\"round\");break;case 67:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],\"diamond\");break;case 68:this.$=a[s-5],r.addVertex(a[s-5],a[s-2],\"hexagon\");break;case 69:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],\"odd\");break;case 70:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],\"trapezoid\");break;case 71:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],\"inv_trapezoid\");break;case 72:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],\"lean_right\");break;case 73:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],\"lean_left\");break;case 74:this.$=a[s],r.addVertex(a[s]);break;case 75:a[s-1].text=a[s],this.$=a[s-1];break;case 76:case 77:a[s-2].text=a[s-1],this.$=a[s-2];break;case 79:var c=r.destructLink(a[s],a[s-2]);this.$={type:c.type,stroke:c.stroke,length:c.length,text:a[s-1]};break;case 80:c=r.destructLink(a[s]),this.$={type:c.type,stroke:c.stroke,length:c.length};break;case 81:this.$=a[s-1];break;case 83:case 97:case 153:case 151:this.$=a[s-1]+\"\"+a[s];break;case 98:case 99:this.$=a[s-4],r.addClass(a[s-2],a[s]);break;case 100:this.$=a[s-4],r.setClass(a[s-2],a[s]);break;case 101:case 109:this.$=a[s-1],r.setClickEvent(a[s-1],a[s]);break;case 102:case 110:this.$=a[s-3],r.setClickEvent(a[s-3],a[s-2]),r.setTooltip(a[s-3],a[s]);break;case 103:this.$=a[s-2],r.setClickEvent(a[s-2],a[s-1],a[s]);break;case 104:this.$=a[s-4],r.setClickEvent(a[s-4],a[s-3],a[s-2]),r.setTooltip(a[s-4],a[s]);break;case 105:case 111:this.$=a[s-1],r.setLink(a[s-1],a[s]);break;case 106:case 112:this.$=a[s-3],r.setLink(a[s-3],a[s-2]),r.setTooltip(a[s-3],a[s]);break;case 107:case 113:this.$=a[s-3],r.setLink(a[s-3],a[s-2],a[s]);break;case 108:case 114:this.$=a[s-5],r.setLink(a[s-5],a[s-4],a[s]),r.setTooltip(a[s-5],a[s-2]);break;case 115:this.$=a[s-4],r.addVertex(a[s-2],void 0,void 0,a[s]);break;case 116:case 118:this.$=a[s-4],r.updateLink(a[s-2],a[s]);break;case 117:this.$=a[s-4],r.updateLink([a[s-2]],a[s]);break;case 119:this.$=a[s-8],r.updateLinkInterpolate([a[s-6]],a[s-2]),r.updateLink([a[s-6]],a[s]);break;case 120:this.$=a[s-8],r.updateLinkInterpolate(a[s-6],a[s-2]),r.updateLink(a[s-6],a[s]);break;case 121:this.$=a[s-6],r.updateLinkInterpolate([a[s-4]],a[s]);break;case 122:this.$=a[s-6],r.updateLinkInterpolate(a[s-4],a[s]);break;case 124:case 126:a[s-2].push(a[s]),this.$=a[s-2];break;case 128:this.$=a[s-1]+a[s];break;case 156:this.$=\"v\";break;case 157:this.$=\"-\";break;case 158:this.$={stmt:\"dir\",value:\"TB\"};break;case 159:this.$={stmt:\"dir\",value:\"BT\"};break;case 160:this.$={stmt:\"dir\",value:\"RL\"};break;case 161:this.$={stmt:\"dir\",value:\"LR\"};}},table:[{3:1,4:2,5:3,6:5,12:e,16:4,21:n,22:r,24:i},{1:[3]},{1:[2,1]},{3:10,4:2,5:3,6:5,12:e,16:4,21:n,22:r,24:i},t(a,o,{17:11}),{7:12,13:[1,13]},{16:14,21:n,22:r,24:i},{16:15,21:n,22:r,24:i},{25:[1,16],26:[1,17]},{13:[2,5]},{1:[2,2]},{1:[2,9],18:18,19:19,20:s,21:c,22:l,23:u,32:24,33:25,34:26,35:27,36:28,37:29,38:h,43:31,44:f,46:d,48:p,50:35,51:45,52:g,54:46,66:y,67:m,86:b,87:v,88:_,89:x,90:k,91:w,95:T,105:E,106:C,109:S,111:A,112:M,116:47,118:N,119:O,120:D,121:B,122:L,123:I,124:F,125:R,126:P,127:j},{8:64,10:[1,65],15:z},t([10,15],[2,6]),t(a,[2,17]),t(a,[2,18]),t(a,[2,19]),{20:[1,68],21:[1,69],22:Y,27:67,30:70},t(U,[2,11]),t(U,[2,12]),t(U,[2,13]),t(U,[2,14]),t(U,[2,15]),t(U,[2,16]),{9:72,20:$,21:W,23:q,49:73,78:77,81:[1,78],82:[1,79]},{9:80,20:$,21:W,23:q},{9:81,20:$,21:W,23:q},{9:82,20:$,21:W,23:q},{9:83,20:$,21:W,23:q},{9:84,20:$,21:W,23:q},{9:86,20:$,21:W,22:[1,85],23:q},t(U,[2,44]),{45:[1,87]},{47:[1,88]},t(U,[2,47]),t(H,[2,54],{30:89,22:Y}),{22:[1,90]},{22:[1,91]},{22:[1,92]},{22:[1,93]},{26:V,52:G,66:X,67:Z,84:[1,97],91:Q,97:96,98:[1,94],100:[1,95],105:K,106:J,109:tt,111:et,112:nt,115:100,117:98,122:rt,123:it,124:at,125:ot,126:st,127:ct},t(U,[2,158]),t(U,[2,159]),t(U,[2,160]),t(U,[2,161]),t(lt,[2,55],{53:[1,116]}),t(ut,[2,74],{116:129,40:[1,117],52:g,55:[1,118],57:[1,119],59:[1,120],61:[1,121],63:[1,122],65:[1,123],66:y,67:m,69:[1,124],71:[1,125],73:[1,126],74:[1,127],76:[1,128],91:w,95:T,105:E,106:C,109:S,111:A,112:M,122:L,123:I,124:F,125:R,126:P,127:j}),t(ht,[2,150]),t(ht,[2,175]),t(ht,[2,176]),t(ht,[2,177]),t(ht,[2,178]),t(ht,[2,179]),t(ht,[2,180]),t(ht,[2,181]),t(ht,[2,182]),t(ht,[2,183]),t(ht,[2,184]),t(ht,[2,185]),t(ht,[2,186]),t(ht,[2,187]),t(ht,[2,188]),t(ht,[2,189]),t(ht,[2,190]),{9:130,20:$,21:W,23:q},{11:131,14:[1,132]},t(ft,[2,8]),t(a,[2,20]),t(a,[2,26]),t(a,[2,27]),{21:[1,133]},t(dt,[2,34],{30:134,22:Y}),t(U,[2,35]),{50:135,51:45,52:g,54:46,66:y,67:m,91:w,95:T,105:E,106:C,109:S,111:A,112:M,116:47,122:L,123:I,124:F,125:R,126:P,127:j},t(pt,[2,48]),t(pt,[2,49]),t(pt,[2,50]),t(gt,[2,78],{79:136,68:[1,138],80:[1,137]}),{22:yt,24:mt,26:bt,38:vt,39:139,42:_t,52:G,66:X,67:Z,73:xt,81:kt,83:140,84:wt,85:151,86:Tt,87:Et,88:Ct,89:St,90:At,91:Mt,92:Nt,94:142,95:Ot,105:K,106:J,109:Dt,111:et,112:nt,113:Bt,114:Lt,115:148,122:rt,123:it,124:at,125:ot,126:st,127:ct},t([52,66,67,68,80,91,95,105,106,109,111,112,122,123,124,125,126,127],[2,80]),t(U,[2,36]),t(U,[2,37]),t(U,[2,38]),t(U,[2,39]),t(U,[2,40]),{22:yt,24:mt,26:bt,38:vt,39:163,42:_t,52:G,66:X,67:Z,73:xt,81:kt,83:140,84:wt,85:151,86:Tt,87:Et,88:Ct,89:St,90:At,91:Mt,92:Nt,94:142,95:Ot,105:K,106:J,109:Dt,111:et,112:nt,113:Bt,114:Lt,115:148,122:rt,123:it,124:at,125:ot,126:st,127:ct},t(It,o,{17:164}),t(U,[2,45]),t(U,[2,46]),t(H,[2,53],{52:Ft}),{26:V,52:G,66:X,67:Z,91:Q,97:166,102:[1,167],105:K,106:J,109:tt,111:et,112:nt,115:100,117:98,122:rt,123:it,124:at,125:ot,126:st,127:ct},{95:[1,168],103:169,105:[1,170]},{26:V,52:G,66:X,67:Z,91:Q,95:[1,171],97:172,105:K,106:J,109:tt,111:et,112:nt,115:100,117:98,122:rt,123:it,124:at,125:ot,126:st,127:ct},{26:V,52:G,66:X,67:Z,91:Q,97:173,105:K,106:J,109:tt,111:et,112:nt,115:100,117:98,122:rt,123:it,124:at,125:ot,126:st,127:ct},t(ft,[2,101],{22:[1,174],99:[1,175]}),t(ft,[2,105],{22:[1,176]}),t(ft,[2,109],{115:100,117:178,22:[1,177],26:V,52:G,66:X,67:Z,91:Q,105:K,106:J,109:tt,111:et,112:nt,122:rt,123:it,124:at,125:ot,126:st,127:ct}),t(ft,[2,111],{22:[1,179]}),t(Rt,[2,152]),t(Rt,[2,154]),t(Rt,[2,155]),t(Rt,[2,156]),t(Rt,[2,157]),t(Pt,[2,162]),t(Pt,[2,163]),t(Pt,[2,164]),t(Pt,[2,165]),t(Pt,[2,166]),t(Pt,[2,167]),t(Pt,[2,168]),t(Pt,[2,169]),t(Pt,[2,170]),t(Pt,[2,171]),t(Pt,[2,172]),t(Pt,[2,173]),t(Pt,[2,174]),{52:g,54:180,66:y,67:m,91:w,95:T,105:E,106:C,109:S,111:A,112:M,116:47,122:L,123:I,124:F,125:R,126:P,127:j},{22:yt,24:mt,26:bt,38:vt,39:181,42:_t,52:G,66:X,67:Z,73:xt,81:kt,83:140,84:wt,85:151,86:Tt,87:Et,88:Ct,89:St,90:At,91:Mt,92:Nt,94:142,95:Ot,105:K,106:J,109:Dt,111:et,112:nt,113:Bt,114:Lt,115:148,122:rt,123:it,124:at,125:ot,126:st,127:ct},{22:yt,24:mt,26:bt,38:vt,39:182,42:_t,52:G,66:X,67:Z,73:xt,81:kt,83:140,84:wt,85:151,86:Tt,87:Et,88:Ct,89:St,90:At,91:Mt,92:Nt,94:142,95:Ot,105:K,106:J,109:Dt,111:et,112:nt,113:Bt,114:Lt,115:148,122:rt,123:it,124:at,125:ot,126:st,127:ct},{22:yt,24:mt,26:bt,38:vt,39:184,42:_t,52:G,57:[1,183],66:X,67:Z,73:xt,81:kt,83:140,84:wt,85:151,86:Tt,87:Et,88:Ct,89:St,90:At,91:Mt,92:Nt,94:142,95:Ot,105:K,106:J,109:Dt,111:et,112:nt,113:Bt,114:Lt,115:148,122:rt,123:it,124:at,125:ot,126:st,127:ct},{22:yt,24:mt,26:bt,38:vt,39:185,42:_t,52:G,66:X,67:Z,73:xt,81:kt,83:140,84:wt,85:151,86:Tt,87:Et,88:Ct,89:St,90:At,91:Mt,92:Nt,94:142,95:Ot,105:K,106:J,109:Dt,111:et,112:nt,113:Bt,114:Lt,115:148,122:rt,123:it,124:at,125:ot,126:st,127:ct},{22:yt,24:mt,26:bt,38:vt,39:186,42:_t,52:G,66:X,67:Z,73:xt,81:kt,83:140,84:wt,85:151,86:Tt,87:Et,88:Ct,89:St,90:At,91:Mt,92:Nt,94:142,95:Ot,105:K,106:J,109:Dt,111:et,112:nt,113:Bt,114:Lt,115:148,122:rt,123:it,124:at,125:ot,126:st,127:ct},{22:yt,24:mt,26:bt,38:vt,39:187,42:_t,52:G,66:X,67:Z,73:xt,81:kt,83:140,84:wt,85:151,86:Tt,87:Et,88:Ct,89:St,90:At,91:Mt,92:Nt,94:142,95:Ot,105:K,106:J,109:Dt,111:et,112:nt,113:Bt,114:Lt,115:148,122:rt,123:it,124:at,125:ot,126:st,127:ct},{66:[1,188]},{22:yt,24:mt,26:bt,38:vt,39:189,42:_t,52:G,66:X,67:Z,73:xt,81:kt,83:140,84:wt,85:151,86:Tt,87:Et,88:Ct,89:St,90:At,91:Mt,92:Nt,94:142,95:Ot,105:K,106:J,109:Dt,111:et,112:nt,113:Bt,114:Lt,115:148,122:rt,123:it,124:at,125:ot,126:st,127:ct},{22:yt,24:mt,26:bt,38:vt,39:190,42:_t,52:G,66:X,67:Z,71:[1,191],73:xt,81:kt,83:140,84:wt,85:151,86:Tt,87:Et,88:Ct,89:St,90:At,91:Mt,92:Nt,94:142,95:Ot,105:K,106:J,109:Dt,111:et,112:nt,113:Bt,114:Lt,115:148,122:rt,123:it,124:at,125:ot,126:st,127:ct},{22:yt,24:mt,26:bt,38:vt,39:192,42:_t,52:G,66:X,67:Z,73:xt,81:kt,83:140,84:wt,85:151,86:Tt,87:Et,88:Ct,89:St,90:At,91:Mt,92:Nt,94:142,95:Ot,105:K,106:J,109:Dt,111:et,112:nt,113:Bt,114:Lt,115:148,122:rt,123:it,124:at,125:ot,126:st,127:ct},{22:yt,24:mt,26:bt,38:vt,39:193,42:_t,52:G,66:X,67:Z,73:xt,81:kt,83:140,84:wt,85:151,86:Tt,87:Et,88:Ct,89:St,90:At,91:Mt,92:Nt,94:142,95:Ot,105:K,106:J,109:Dt,111:et,112:nt,113:Bt,114:Lt,115:148,122:rt,123:it,124:at,125:ot,126:st,127:ct},{22:yt,24:mt,26:bt,38:vt,39:194,42:_t,52:G,66:X,67:Z,73:xt,81:kt,83:140,84:wt,85:151,86:Tt,87:Et,88:Ct,89:St,90:At,91:Mt,92:Nt,94:142,95:Ot,105:K,106:J,109:Dt,111:et,112:nt,113:Bt,114:Lt,115:148,122:rt,123:it,124:at,125:ot,126:st,127:ct},t(ht,[2,151]),t(jt,[2,3]),{8:195,15:z},{15:[2,7]},t(a,[2,28]),t(dt,[2,33]),t(H,[2,51],{30:196,22:Y}),t(gt,[2,75],{22:[1,197]}),{22:[1,198]},{22:yt,24:mt,26:bt,38:vt,39:199,42:_t,52:G,66:X,67:Z,73:xt,81:kt,83:140,84:wt,85:151,86:Tt,87:Et,88:Ct,89:St,90:At,91:Mt,92:Nt,94:142,95:Ot,105:K,106:J,109:Dt,111:et,112:nt,113:Bt,114:Lt,115:148,122:rt,123:it,124:at,125:ot,126:st,127:ct},{22:yt,24:mt,26:bt,38:vt,42:_t,52:G,66:X,67:Z,73:xt,81:kt,82:[1,200],83:201,85:151,86:Tt,87:Et,88:Ct,89:St,90:At,91:Mt,92:Nt,94:142,95:Ot,105:K,106:J,109:Dt,111:et,112:nt,113:Bt,114:Lt,115:148,122:rt,123:it,124:at,125:ot,126:st,127:ct},t(Pt,[2,82]),t(Pt,[2,84]),t(Pt,[2,140]),t(Pt,[2,141]),t(Pt,[2,142]),t(Pt,[2,143]),t(Pt,[2,144]),t(Pt,[2,145]),t(Pt,[2,146]),t(Pt,[2,147]),t(Pt,[2,148]),t(Pt,[2,149]),t(Pt,[2,85]),t(Pt,[2,86]),t(Pt,[2,87]),t(Pt,[2,88]),t(Pt,[2,89]),t(Pt,[2,90]),t(Pt,[2,91]),t(Pt,[2,92]),t(Pt,[2,93]),t(Pt,[2,94]),t(Pt,[2,95]),{9:203,20:$,21:W,22:yt,23:q,24:mt,26:bt,38:vt,40:[1,202],42:_t,52:G,66:X,67:Z,73:xt,81:kt,83:201,85:151,86:Tt,87:Et,88:Ct,89:St,90:At,91:Mt,92:Nt,94:142,95:Ot,105:K,106:J,109:Dt,111:et,112:nt,113:Bt,114:Lt,115:148,122:rt,123:it,124:at,125:ot,126:st,127:ct},{18:18,19:19,20:s,21:c,22:l,23:u,32:24,33:25,34:26,35:27,36:28,37:29,38:h,42:[1,204],43:31,44:f,46:d,48:p,50:35,51:45,52:g,54:46,66:y,67:m,86:b,87:v,88:_,89:x,90:k,91:w,95:T,105:E,106:C,109:S,111:A,112:M,116:47,118:N,119:O,120:D,121:B,122:L,123:I,124:F,125:R,126:P,127:j},{22:Y,30:205},{22:[1,206],26:V,52:G,66:X,67:Z,91:Q,105:K,106:J,109:tt,111:et,112:nt,115:100,117:178,122:rt,123:it,124:at,125:ot,126:st,127:ct},{22:[1,207]},{22:[1,208]},{22:[1,209],106:[1,210]},t(zt,[2,123]),{22:[1,211]},{22:[1,212],26:V,52:G,66:X,67:Z,91:Q,105:K,106:J,109:tt,111:et,112:nt,115:100,117:178,122:rt,123:it,124:at,125:ot,126:st,127:ct},{22:[1,213],26:V,52:G,66:X,67:Z,91:Q,105:K,106:J,109:tt,111:et,112:nt,115:100,117:178,122:rt,123:it,124:at,125:ot,126:st,127:ct},{84:[1,214]},t(ft,[2,103],{22:[1,215]}),{84:[1,216],101:[1,217]},{84:[1,218]},t(Rt,[2,153]),{84:[1,219],101:[1,220]},t(lt,[2,57],{116:129,52:g,66:y,67:m,91:w,95:T,105:E,106:C,109:S,111:A,112:M,122:L,123:I,124:F,125:R,126:P,127:j}),{22:yt,24:mt,26:bt,38:vt,41:[1,221],42:_t,52:G,66:X,67:Z,73:xt,81:kt,83:201,85:151,86:Tt,87:Et,88:Ct,89:St,90:At,91:Mt,92:Nt,94:142,95:Ot,105:K,106:J,109:Dt,111:et,112:nt,113:Bt,114:Lt,115:148,122:rt,123:it,124:at,125:ot,126:st,127:ct},{22:yt,24:mt,26:bt,38:vt,42:_t,52:G,56:[1,222],66:X,67:Z,73:xt,81:kt,83:201,85:151,86:Tt,87:Et,88:Ct,89:St,90:At,91:Mt,92:Nt,94:142,95:Ot,105:K,106:J,109:Dt,111:et,112:nt,113:Bt,114:Lt,115:148,122:rt,123:it,124:at,125:ot,126:st,127:ct},{22:yt,24:mt,26:bt,38:vt,39:223,42:_t,52:G,66:X,67:Z,73:xt,81:kt,83:140,84:wt,85:151,86:Tt,87:Et,88:Ct,89:St,90:At,91:Mt,92:Nt,94:142,95:Ot,105:K,106:J,109:Dt,111:et,112:nt,113:Bt,114:Lt,115:148,122:rt,123:it,124:at,125:ot,126:st,127:ct},{22:yt,24:mt,26:bt,38:vt,42:_t,52:G,58:[1,224],66:X,67:Z,73:xt,81:kt,83:201,85:151,86:Tt,87:Et,88:Ct,89:St,90:At,91:Mt,92:Nt,94:142,95:Ot,105:K,106:J,109:Dt,111:et,112:nt,113:Bt,114:Lt,115:148,122:rt,123:it,124:at,125:ot,126:st,127:ct},{22:yt,24:mt,26:bt,38:vt,42:_t,52:G,60:[1,225],66:X,67:Z,73:xt,81:kt,83:201,85:151,86:Tt,87:Et,88:Ct,89:St,90:At,91:Mt,92:Nt,94:142,95:Ot,105:K,106:J,109:Dt,111:et,112:nt,113:Bt,114:Lt,115:148,122:rt,123:it,124:at,125:ot,126:st,127:ct},{22:yt,24:mt,26:bt,38:vt,42:_t,52:G,62:[1,226],66:X,67:Z,73:xt,81:kt,83:201,85:151,86:Tt,87:Et,88:Ct,89:St,90:At,91:Mt,92:Nt,94:142,95:Ot,105:K,106:J,109:Dt,111:et,112:nt,113:Bt,114:Lt,115:148,122:rt,123:it,124:at,125:ot,126:st,127:ct},{22:yt,24:mt,26:bt,38:vt,42:_t,52:G,64:[1,227],66:X,67:Z,73:xt,81:kt,83:201,85:151,86:Tt,87:Et,88:Ct,89:St,90:At,91:Mt,92:Nt,94:142,95:Ot,105:K,106:J,109:Dt,111:et,112:nt,113:Bt,114:Lt,115:148,122:rt,123:it,124:at,125:ot,126:st,127:ct},{67:[1,228]},{22:yt,24:mt,26:bt,38:vt,42:_t,52:G,66:X,67:Z,70:[1,229],73:xt,81:kt,83:201,85:151,86:Tt,87:Et,88:Ct,89:St,90:At,91:Mt,92:Nt,94:142,95:Ot,105:K,106:J,109:Dt,111:et,112:nt,113:Bt,114:Lt,115:148,122:rt,123:it,124:at,125:ot,126:st,127:ct},{22:yt,24:mt,26:bt,38:vt,42:_t,52:G,66:X,67:Z,72:[1,230],73:xt,81:kt,83:201,85:151,86:Tt,87:Et,88:Ct,89:St,90:At,91:Mt,92:Nt,94:142,95:Ot,105:K,106:J,109:Dt,111:et,112:nt,113:Bt,114:Lt,115:148,122:rt,123:it,124:at,125:ot,126:st,127:ct},{22:yt,24:mt,26:bt,38:vt,39:231,42:_t,52:G,66:X,67:Z,73:xt,81:kt,83:140,84:wt,85:151,86:Tt,87:Et,88:Ct,89:St,90:At,91:Mt,92:Nt,94:142,95:Ot,105:K,106:J,109:Dt,111:et,112:nt,113:Bt,114:Lt,115:148,122:rt,123:it,124:at,125:ot,126:st,127:ct},{22:yt,24:mt,26:bt,38:vt,41:[1,232],42:_t,52:G,66:X,67:Z,73:xt,81:kt,83:201,85:151,86:Tt,87:Et,88:Ct,89:St,90:At,91:Mt,92:Nt,94:142,95:Ot,105:K,106:J,109:Dt,111:et,112:nt,113:Bt,114:Lt,115:148,122:rt,123:it,124:at,125:ot,126:st,127:ct},{22:yt,24:mt,26:bt,38:vt,42:_t,52:G,66:X,67:Z,73:xt,75:[1,233],77:[1,234],81:kt,83:201,85:151,86:Tt,87:Et,88:Ct,89:St,90:At,91:Mt,92:Nt,94:142,95:Ot,105:K,106:J,109:Dt,111:et,112:nt,113:Bt,114:Lt,115:148,122:rt,123:it,124:at,125:ot,126:st,127:ct},{22:yt,24:mt,26:bt,38:vt,42:_t,52:G,66:X,67:Z,73:xt,75:[1,236],77:[1,235],81:kt,83:201,85:151,86:Tt,87:Et,88:Ct,89:St,90:At,91:Mt,92:Nt,94:142,95:Ot,105:K,106:J,109:Dt,111:et,112:nt,113:Bt,114:Lt,115:148,122:rt,123:it,124:at,125:ot,126:st,127:ct},{9:237,20:$,21:W,23:q},t(H,[2,52],{52:Ft}),t(gt,[2,77]),t(gt,[2,76]),{22:yt,24:mt,26:bt,38:vt,42:_t,52:G,66:X,67:Z,68:[1,238],73:xt,81:kt,83:201,85:151,86:Tt,87:Et,88:Ct,89:St,90:At,91:Mt,92:Nt,94:142,95:Ot,105:K,106:J,109:Dt,111:et,112:nt,113:Bt,114:Lt,115:148,122:rt,123:it,124:at,125:ot,126:st,127:ct},t(gt,[2,79]),t(Pt,[2,83]),{22:yt,24:mt,26:bt,38:vt,39:239,42:_t,52:G,66:X,67:Z,73:xt,81:kt,83:140,84:wt,85:151,86:Tt,87:Et,88:Ct,89:St,90:At,91:Mt,92:Nt,94:142,95:Ot,105:K,106:J,109:Dt,111:et,112:nt,113:Bt,114:Lt,115:148,122:rt,123:it,124:at,125:ot,126:st,127:ct},t(It,o,{17:240}),t(U,[2,43]),{51:241,52:g,54:46,66:y,67:m,91:w,95:T,105:E,106:C,109:S,111:A,112:M,116:47,122:L,123:I,124:F,125:R,126:P,127:j},{22:Yt,66:Ut,67:$t,86:Wt,96:242,102:qt,105:Ht,107:243,108:244,109:Vt,110:Gt,111:Xt,112:Zt,113:Qt},{22:Yt,66:Ut,67:$t,86:Wt,96:256,102:qt,105:Ht,107:243,108:244,109:Vt,110:Gt,111:Xt,112:Zt,113:Qt},{22:Yt,66:Ut,67:$t,86:Wt,96:257,102:qt,104:[1,258],105:Ht,107:243,108:244,109:Vt,110:Gt,111:Xt,112:Zt,113:Qt},{22:Yt,66:Ut,67:$t,86:Wt,96:259,102:qt,104:[1,260],105:Ht,107:243,108:244,109:Vt,110:Gt,111:Xt,112:Zt,113:Qt},{105:[1,261]},{22:Yt,66:Ut,67:$t,86:Wt,96:262,102:qt,105:Ht,107:243,108:244,109:Vt,110:Gt,111:Xt,112:Zt,113:Qt},{22:Yt,66:Ut,67:$t,86:Wt,96:263,102:qt,105:Ht,107:243,108:244,109:Vt,110:Gt,111:Xt,112:Zt,113:Qt},{26:V,52:G,66:X,67:Z,91:Q,97:264,105:K,106:J,109:tt,111:et,112:nt,115:100,117:98,122:rt,123:it,124:at,125:ot,126:st,127:ct},t(ft,[2,102]),{84:[1,265]},t(ft,[2,106],{22:[1,266]}),t(ft,[2,107]),t(ft,[2,110]),t(ft,[2,112],{22:[1,267]}),t(ft,[2,113]),t(ut,[2,58]),t(ut,[2,59]),{22:yt,24:mt,26:bt,38:vt,42:_t,52:G,58:[1,268],66:X,67:Z,73:xt,81:kt,83:201,85:151,86:Tt,87:Et,88:Ct,89:St,90:At,91:Mt,92:Nt,94:142,95:Ot,105:K,106:J,109:Dt,111:et,112:nt,113:Bt,114:Lt,115:148,122:rt,123:it,124:at,125:ot,126:st,127:ct},t(ut,[2,66]),t(ut,[2,61]),t(ut,[2,62]),t(ut,[2,63]),{66:[1,269]},t(ut,[2,65]),t(ut,[2,67]),{22:yt,24:mt,26:bt,38:vt,42:_t,52:G,66:X,67:Z,72:[1,270],73:xt,81:kt,83:201,85:151,86:Tt,87:Et,88:Ct,89:St,90:At,91:Mt,92:Nt,94:142,95:Ot,105:K,106:J,109:Dt,111:et,112:nt,113:Bt,114:Lt,115:148,122:rt,123:it,124:at,125:ot,126:st,127:ct},t(ut,[2,69]),t(ut,[2,70]),t(ut,[2,72]),t(ut,[2,71]),t(ut,[2,73]),t(jt,[2,4]),t([22,52,66,67,91,95,105,106,109,111,112,122,123,124,125,126,127],[2,81]),{22:yt,24:mt,26:bt,38:vt,41:[1,271],42:_t,52:G,66:X,67:Z,73:xt,81:kt,83:201,85:151,86:Tt,87:Et,88:Ct,89:St,90:At,91:Mt,92:Nt,94:142,95:Ot,105:K,106:J,109:Dt,111:et,112:nt,113:Bt,114:Lt,115:148,122:rt,123:it,124:at,125:ot,126:st,127:ct},{18:18,19:19,20:s,21:c,22:l,23:u,32:24,33:25,34:26,35:27,36:28,37:29,38:h,42:[1,272],43:31,44:f,46:d,48:p,50:35,51:45,52:g,54:46,66:y,67:m,86:b,87:v,88:_,89:x,90:k,91:w,95:T,105:E,106:C,109:S,111:A,112:M,116:47,118:N,119:O,120:D,121:B,122:L,123:I,124:F,125:R,126:P,127:j},t(lt,[2,56]),t(ft,[2,115],{106:Kt}),t(Jt,[2,125],{108:274,22:Yt,66:Ut,67:$t,86:Wt,102:qt,105:Ht,109:Vt,110:Gt,111:Xt,112:Zt,113:Qt}),t(te,[2,127]),t(te,[2,129]),t(te,[2,130]),t(te,[2,131]),t(te,[2,132]),t(te,[2,133]),t(te,[2,134]),t(te,[2,135]),t(te,[2,136]),t(te,[2,137]),t(te,[2,138]),t(te,[2,139]),t(ft,[2,116],{106:Kt}),t(ft,[2,117],{106:Kt}),{22:[1,275]},t(ft,[2,118],{106:Kt}),{22:[1,276]},t(zt,[2,124]),t(ft,[2,98],{106:Kt}),t(ft,[2,99],{106:Kt}),t(ft,[2,100],{115:100,117:178,26:V,52:G,66:X,67:Z,91:Q,105:K,106:J,109:tt,111:et,112:nt,122:rt,123:it,124:at,125:ot,126:st,127:ct}),t(ft,[2,104]),{101:[1,277]},{101:[1,278]},{58:[1,279]},{68:[1,280]},{72:[1,281]},{9:282,20:$,21:W,23:q},t(U,[2,42]),{22:Yt,66:Ut,67:$t,86:Wt,102:qt,105:Ht,107:283,108:244,109:Vt,110:Gt,111:Xt,112:Zt,113:Qt},t(te,[2,128]),{26:V,52:G,66:X,67:Z,91:Q,97:284,105:K,106:J,109:tt,111:et,112:nt,115:100,117:98,122:rt,123:it,124:at,125:ot,126:st,127:ct},{26:V,52:G,66:X,67:Z,91:Q,97:285,105:K,106:J,109:tt,111:et,112:nt,115:100,117:98,122:rt,123:it,124:at,125:ot,126:st,127:ct},t(ft,[2,108]),t(ft,[2,114]),t(ut,[2,60]),{22:yt,24:mt,26:bt,38:vt,39:286,42:_t,52:G,66:X,67:Z,73:xt,81:kt,83:140,84:wt,85:151,86:Tt,87:Et,88:Ct,89:St,90:At,91:Mt,92:Nt,94:142,95:Ot,105:K,106:J,109:Dt,111:et,112:nt,113:Bt,114:Lt,115:148,122:rt,123:it,124:at,125:ot,126:st,127:ct},t(ut,[2,68]),t(It,o,{17:287}),t(Jt,[2,126],{108:274,22:Yt,66:Ut,67:$t,86:Wt,102:qt,105:Ht,109:Vt,110:Gt,111:Xt,112:Zt,113:Qt}),t(ft,[2,121],{115:100,117:178,22:[1,288],26:V,52:G,66:X,67:Z,91:Q,105:K,106:J,109:tt,111:et,112:nt,122:rt,123:it,124:at,125:ot,126:st,127:ct}),t(ft,[2,122],{115:100,117:178,22:[1,289],26:V,52:G,66:X,67:Z,91:Q,105:K,106:J,109:tt,111:et,112:nt,122:rt,123:it,124:at,125:ot,126:st,127:ct}),{22:yt,24:mt,26:bt,38:vt,41:[1,290],42:_t,52:G,66:X,67:Z,73:xt,81:kt,83:201,85:151,86:Tt,87:Et,88:Ct,89:St,90:At,91:Mt,92:Nt,94:142,95:Ot,105:K,106:J,109:Dt,111:et,112:nt,113:Bt,114:Lt,115:148,122:rt,123:it,124:at,125:ot,126:st,127:ct},{18:18,19:19,20:s,21:c,22:l,23:u,32:24,33:25,34:26,35:27,36:28,37:29,38:h,42:[1,291],43:31,44:f,46:d,48:p,50:35,51:45,52:g,54:46,66:y,67:m,86:b,87:v,88:_,89:x,90:k,91:w,95:T,105:E,106:C,109:S,111:A,112:M,116:47,118:N,119:O,120:D,121:B,122:L,123:I,124:F,125:R,126:P,127:j},{22:Yt,66:Ut,67:$t,86:Wt,96:292,102:qt,105:Ht,107:243,108:244,109:Vt,110:Gt,111:Xt,112:Zt,113:Qt},{22:Yt,66:Ut,67:$t,86:Wt,96:293,102:qt,105:Ht,107:243,108:244,109:Vt,110:Gt,111:Xt,112:Zt,113:Qt},t(ut,[2,64]),t(U,[2,41]),t(ft,[2,119],{106:Kt}),t(ft,[2,120],{106:Kt})],defaultActions:{2:[2,1],9:[2,5],10:[2,2],132:[2,7]},parseError:function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t);},parse:function(t){var e=this,n=[0],r=[],i=[null],a=[],o=this.table,s=\"\",c=0,l=0,u=0,h=2,f=1,d=a.slice.call(arguments,1),p=Object.create(this.lexer),g={yy:{}};for(var y in this.yy)Object.prototype.hasOwnProperty.call(this.yy,y)&&(g.yy[y]=this.yy[y]);p.setInput(t,g.yy),g.yy.lexer=p,g.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var m=p.yylloc;a.push(m);var b=p.options&&p.options.ranges;function v(){var t;return \"number\"!=typeof(t=r.pop()||p.lex()||f)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}\"function\"==typeof g.yy.parseError?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var _,x,k,w,T,E,C,S,A,M={};;){if(k=n[n.length-1],this.defaultActions[k]?w=this.defaultActions[k]:(null==_&&(_=v()),w=o[k]&&o[k][_]),void 0===w||!w.length||!w[0]){var N=\"\";for(E in A=[],o[k])this.terminals_[E]&&E>h&&A.push(\"'\"+this.terminals_[E]+\"'\");N=p.showPosition?\"Parse error on line \"+(c+1)+\":\\n\"+p.showPosition()+\"\\nExpecting \"+A.join(\", \")+\", got '\"+(this.terminals_[_]||_)+\"'\":\"Parse error on line \"+(c+1)+\": Unexpected \"+(_==f?\"end of input\":\"'\"+(this.terminals_[_]||_)+\"'\"),this.parseError(N,{text:p.match,token:this.terminals_[_]||_,line:p.yylineno,loc:m,expected:A});}if(w[0]instanceof Array&&w.length>1)throw new Error(\"Parse Error: multiple actions possible at state: \"+k+\", token: \"+_);switch(w[0]){case 1:n.push(_),i.push(p.yytext),a.push(p.yylloc),n.push(w[1]),_=null,x?(_=x,x=null):(l=p.yyleng,s=p.yytext,c=p.yylineno,m=p.yylloc,u>0&&u--);break;case 2:if(C=this.productions_[w[1]][1],M.$=i[i.length-C],M._$={first_line:a[a.length-(C||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(C||1)].first_column,last_column:a[a.length-1].last_column},b&&(M._$.range=[a[a.length-(C||1)].range[0],a[a.length-1].range[1]]),void 0!==(T=this.performAction.apply(M,[s,l,c,g.yy,w[1],i,a].concat(d))))return T;C&&(n=n.slice(0,-1*C*2),i=i.slice(0,-1*C),a=a.slice(0,-1*C)),n.push(this.productions_[w[1]][0]),i.push(M.$),a.push(M._$),S=o[n[n.length-2]][n[n.length-1]],n.push(S);break;case 3:return !0}}return !0}},ne={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e);},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=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.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\\r\\n?|\\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\\r\\n?|\\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\\r\\n?|\\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError(\"Lexical error on line \"+(this.yylineno+1)+\". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\\n\"+this.showPosition(),{text:\"\",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t));},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return (t.length>20?\"...\":\"\")+t.substr(-20).replace(/\\n/g,\"\")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?\"...\":\"\")).replace(/\\n/g,\"\")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join(\"-\");return t+this.upcomingInput()+\"\\n\"+e+\"^\"},test_match:function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\\r\\n?|\\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\\r?\\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return !1}return !1},next:function(){if(this.done)return this.EOF;var t,e,n,r;this._input||(this.done=!0),this._more||(this.yytext=\"\",this.match=\"\");for(var i=this._currentRules(),a=0;a<i.length;a++)if((n=this._input.match(this.rules[i[a]]))&&(!e||n[0].length>e[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,i[a])))return t;if(this._backtrack){e=!1;continue}return !1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[r]))&&t:\"\"===this._input?this.EOF:this.parseError(\"Lexical error on line \"+(this.yylineno+1)+\". Unrecognized text.\\n\"+this.showPosition(),{text:\"\",token:null,line:this.yylineno})},lex:function(){return this.next()||this.lex()},begin:function(t){this.conditionStack.push(t);},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return (t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:\"INITIAL\"},pushState:function(t){this.begin(t);},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(t,e,n,r){switch(n){case 0:return this.begin(\"open_directive\"),12;case 1:return this.begin(\"type_directive\"),13;case 2:return this.popState(),this.begin(\"arg_directive\"),10;case 3:return this.popState(),this.popState(),15;case 4:return 14;case 5:case 6:break;case 7:return this.begin(\"acc_title\"),44;case 8:return this.popState(),\"acc_title_value\";case 9:return this.begin(\"acc_descr\"),46;case 10:return this.popState(),\"acc_descr_value\";case 11:this.begin(\"acc_descr_multiline\");break;case 12:case 15:case 24:case 27:case 30:case 33:this.popState();break;case 13:return \"acc_descr_multiline_value\";case 14:this.begin(\"string\");break;case 16:return \"STR\";case 17:return 86;case 18:return 95;case 19:return 87;case 20:return 104;case 21:return 88;case 22:return 89;case 23:this.begin(\"href\");break;case 25:return 100;case 26:this.begin(\"callbackname\");break;case 28:this.popState(),this.begin(\"callbackargs\");break;case 29:return 98;case 31:return 99;case 32:this.begin(\"click\");break;case 34:return 90;case 35:case 36:return t.lex.firstGraph()&&this.begin(\"dir\"),24;case 37:return 38;case 38:return 42;case 39:case 40:case 41:case 42:return 101;case 43:return this.popState(),25;case 44:case 45:case 46:case 47:case 48:case 49:case 50:case 51:case 52:case 53:return this.popState(),26;case 54:return 118;case 55:return 119;case 56:return 120;case 57:return 121;case 58:return 105;case 59:return 111;case 60:return 53;case 61:return 67;case 62:return 52;case 63:return 20;case 64:return 106;case 65:return 126;case 66:case 67:case 68:return 82;case 69:case 70:case 71:return 81;case 72:return 59;case 73:return 60;case 74:return 61;case 75:return 62;case 76:return 63;case 77:return 64;case 78:return 65;case 79:return 69;case 80:return 70;case 81:return 55;case 82:return 56;case 83:return 109;case 84:return 112;case 85:return 127;case 86:return 124;case 87:return 113;case 88:case 89:return 125;case 90:return 114;case 91:return 73;case 92:return 92;case 93:return \"SEP\";case 94:return 91;case 95:return 66;case 96:return 75;case 97:return 74;case 98:return 77;case 99:return 76;case 100:return 122;case 101:return 123;case 102:return 68;case 103:return 57;case 104:return 58;case 105:return 40;case 106:return 41;case 107:return 71;case 108:return 72;case 109:return 133;case 110:return 21;case 111:return 22;case 112:return 23}},rules:[/^(?:%%\\{)/,/^(?:((?:(?!\\}%%)[^:.])*))/,/^(?::)/,/^(?:\\}%%)/,/^(?:((?:(?!\\}%%).|\\n)*))/,/^(?:%%(?!\\{)[^\\n]*)/,/^(?:[^\\}]%%[^\\n]*)/,/^(?:accTitle\\s*:\\s*)/,/^(?:(?!\\n||)*[^\\n]*)/,/^(?:accDescr\\s*:\\s*)/,/^(?:(?!\\n||)*[^\\n]*)/,/^(?:accDescr\\s*\\{\\s*)/,/^(?:[\\}])/,/^(?:[^\\}]*)/,/^(?:[\"])/,/^(?:[\"])/,/^(?:[^\"]*)/,/^(?:style\\b)/,/^(?:default\\b)/,/^(?:linkStyle\\b)/,/^(?:interpolate\\b)/,/^(?:classDef\\b)/,/^(?:class\\b)/,/^(?:href[\\s]+[\"])/,/^(?:[\"])/,/^(?:[^\"]*)/,/^(?:call[\\s]+)/,/^(?:\\([\\s]*\\))/,/^(?:\\()/,/^(?:[^(]*)/,/^(?:\\))/,/^(?:[^)]*)/,/^(?:click[\\s]+)/,/^(?:[\\s\\n])/,/^(?:[^\\s\\n]*)/,/^(?:graph\\b)/,/^(?:flowchart\\b)/,/^(?:subgraph\\b)/,/^(?:end\\b\\s*)/,/^(?:_self\\b)/,/^(?:_blank\\b)/,/^(?:_parent\\b)/,/^(?:_top\\b)/,/^(?:(\\r?\\n)*\\s*\\n)/,/^(?:\\s*LR\\b)/,/^(?:\\s*RL\\b)/,/^(?:\\s*TB\\b)/,/^(?:\\s*BT\\b)/,/^(?:\\s*TD\\b)/,/^(?:\\s*BR\\b)/,/^(?:\\s*<)/,/^(?:\\s*>)/,/^(?:\\s*\\^)/,/^(?:\\s*v\\b)/,/^(?:.*direction\\s+TB[^\\n]*)/,/^(?:.*direction\\s+BT[^\\n]*)/,/^(?:.*direction\\s+RL[^\\n]*)/,/^(?:.*direction\\s+LR[^\\n]*)/,/^(?:[0-9]+)/,/^(?:#)/,/^(?::::)/,/^(?::)/,/^(?:&)/,/^(?:;)/,/^(?:,)/,/^(?:\\*)/,/^(?:\\s*[xo<]?--+[-xo>]\\s*)/,/^(?:\\s*[xo<]?==+[=xo>]\\s*)/,/^(?:\\s*[xo<]?-?\\.+-[xo>]?\\s*)/,/^(?:\\s*[xo<]?--\\s*)/,/^(?:\\s*[xo<]?==\\s*)/,/^(?:\\s*[xo<]?-\\.\\s*)/,/^(?:\\(-)/,/^(?:-\\))/,/^(?:\\(\\[)/,/^(?:\\]\\))/,/^(?:\\[\\[)/,/^(?:\\]\\])/,/^(?:\\[\\|)/,/^(?:\\[\\()/,/^(?:\\)\\])/,/^(?:\\(\\(\\()/,/^(?:\\)\\)\\))/,/^(?:-)/,/^(?:\\.)/,/^(?:[\\_])/,/^(?:\\+)/,/^(?:%)/,/^(?:=)/,/^(?:=)/,/^(?:<)/,/^(?:>)/,/^(?:\\^)/,/^(?:\\\\\\|)/,/^(?:v\\b)/,/^(?:[A-Za-z]+)/,/^(?:\\\\\\])/,/^(?:\\[\\/)/,/^(?:\\/\\])/,/^(?:\\[\\\\)/,/^(?:[!\"#$%&'*+,-.`?\\\\_/])/,/^(?:[\\u00AA\\u00B5\\u00BA\\u00C0-\\u00D6\\u00D8-\\u00F6]|[\\u00F8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0370-\\u0374\\u0376\\u0377]|[\\u037A-\\u037D\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5]|[\\u03F7-\\u0481\\u048A-\\u0527\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u05D0-\\u05EA]|[\\u05F0-\\u05F2\\u0620-\\u064A\\u066E\\u066F\\u0671-\\u06D3\\u06D5\\u06E5\\u06E6\\u06EE]|[\\u06EF\\u06FA-\\u06FC\\u06FF\\u0710\\u0712-\\u072F\\u074D-\\u07A5\\u07B1\\u07CA-\\u07EA]|[\\u07F4\\u07F5\\u07FA\\u0800-\\u0815\\u081A\\u0824\\u0828\\u0840-\\u0858\\u08A0]|[\\u08A2-\\u08AC\\u0904-\\u0939\\u093D\\u0950\\u0958-\\u0961\\u0971-\\u0977]|[\\u0979-\\u097F\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2]|[\\u09B6-\\u09B9\\u09BD\\u09CE\\u09DC\\u09DD\\u09DF-\\u09E1\\u09F0\\u09F1\\u0A05-\\u0A0A]|[\\u0A0F\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A32\\u0A33\\u0A35\\u0A36\\u0A38\\u0A39]|[\\u0A59-\\u0A5C\\u0A5E\\u0A72-\\u0A74\\u0A85-\\u0A8D\\u0A8F-\\u0A91\\u0A93-\\u0AA8]|[\\u0AAA-\\u0AB0\\u0AB2\\u0AB3\\u0AB5-\\u0AB9\\u0ABD\\u0AD0\\u0AE0\\u0AE1\\u0B05-\\u0B0C]|[\\u0B0F\\u0B10\\u0B13-\\u0B28\\u0B2A-\\u0B30\\u0B32\\u0B33\\u0B35-\\u0B39\\u0B3D\\u0B5C]|[\\u0B5D\\u0B5F-\\u0B61\\u0B71\\u0B83\\u0B85-\\u0B8A\\u0B8E-\\u0B90\\u0B92-\\u0B95\\u0B99]|[\\u0B9A\\u0B9C\\u0B9E\\u0B9F\\u0BA3\\u0BA4\\u0BA8-\\u0BAA\\u0BAE-\\u0BB9\\u0BD0]|[\\u0C05-\\u0C0C\\u0C0E-\\u0C10\\u0C12-\\u0C28\\u0C2A-\\u0C33\\u0C35-\\u0C39\\u0C3D]|[\\u0C58\\u0C59\\u0C60\\u0C61\\u0C85-\\u0C8C\\u0C8E-\\u0C90\\u0C92-\\u0CA8\\u0CAA-\\u0CB3]|[\\u0CB5-\\u0CB9\\u0CBD\\u0CDE\\u0CE0\\u0CE1\\u0CF1\\u0CF2\\u0D05-\\u0D0C\\u0D0E-\\u0D10]|[\\u0D12-\\u0D3A\\u0D3D\\u0D4E\\u0D60\\u0D61\\u0D7A-\\u0D7F\\u0D85-\\u0D96\\u0D9A-\\u0DB1]|[\\u0DB3-\\u0DBB\\u0DBD\\u0DC0-\\u0DC6\\u0E01-\\u0E30\\u0E32\\u0E33\\u0E40-\\u0E46\\u0E81]|[\\u0E82\\u0E84\\u0E87\\u0E88\\u0E8A\\u0E8D\\u0E94-\\u0E97\\u0E99-\\u0E9F\\u0EA1-\\u0EA3]|[\\u0EA5\\u0EA7\\u0EAA\\u0EAB\\u0EAD-\\u0EB0\\u0EB2\\u0EB3\\u0EBD\\u0EC0-\\u0EC4\\u0EC6]|[\\u0EDC-\\u0EDF\\u0F00\\u0F40-\\u0F47\\u0F49-\\u0F6C\\u0F88-\\u0F8C\\u1000-\\u102A]|[\\u103F\\u1050-\\u1055\\u105A-\\u105D\\u1061\\u1065\\u1066\\u106E-\\u1070\\u1075-\\u1081]|[\\u108E\\u10A0-\\u10C5\\u10C7\\u10CD\\u10D0-\\u10FA\\u10FC-\\u1248\\u124A-\\u124D]|[\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0]|[\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310]|[\\u1312-\\u1315\\u1318-\\u135A\\u1380-\\u138F\\u13A0-\\u13F4\\u1401-\\u166C]|[\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u1700-\\u170C\\u170E-\\u1711]|[\\u1720-\\u1731\\u1740-\\u1751\\u1760-\\u176C\\u176E-\\u1770\\u1780-\\u17B3\\u17D7]|[\\u17DC\\u1820-\\u1877\\u1880-\\u18A8\\u18AA\\u18B0-\\u18F5\\u1900-\\u191C]|[\\u1950-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19C1-\\u19C7\\u1A00-\\u1A16]|[\\u1A20-\\u1A54\\u1AA7\\u1B05-\\u1B33\\u1B45-\\u1B4B\\u1B83-\\u1BA0\\u1BAE\\u1BAF]|[\\u1BBA-\\u1BE5\\u1C00-\\u1C23\\u1C4D-\\u1C4F\\u1C5A-\\u1C7D\\u1CE9-\\u1CEC]|[\\u1CEE-\\u1CF1\\u1CF5\\u1CF6\\u1D00-\\u1DBF\\u1E00-\\u1F15\\u1F18-\\u1F1D]|[\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D]|[\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3]|[\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u2071\\u207F]|[\\u2090-\\u209C\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2119-\\u211D\\u2124\\u2126\\u2128]|[\\u212A-\\u212D\\u212F-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u2183\\u2184]|[\\u2C00-\\u2C2E\\u2C30-\\u2C5E\\u2C60-\\u2CE4\\u2CEB-\\u2CEE\\u2CF2\\u2CF3]|[\\u2D00-\\u2D25\\u2D27\\u2D2D\\u2D30-\\u2D67\\u2D6F\\u2D80-\\u2D96\\u2DA0-\\u2DA6]|[\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE]|[\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u2E2F\\u3005\\u3006\\u3031-\\u3035\\u303B\\u303C]|[\\u3041-\\u3096\\u309D-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312D]|[\\u3131-\\u318E\\u31A0-\\u31BA\\u31F0-\\u31FF\\u3400-\\u4DB5\\u4E00-\\u9FCC]|[\\uA000-\\uA48C\\uA4D0-\\uA4FD\\uA500-\\uA60C\\uA610-\\uA61F\\uA62A\\uA62B]|[\\uA640-\\uA66E\\uA67F-\\uA697\\uA6A0-\\uA6E5\\uA717-\\uA71F\\uA722-\\uA788]|[\\uA78B-\\uA78E\\uA790-\\uA793\\uA7A0-\\uA7AA\\uA7F8-\\uA801\\uA803-\\uA805]|[\\uA807-\\uA80A\\uA80C-\\uA822\\uA840-\\uA873\\uA882-\\uA8B3\\uA8F2-\\uA8F7\\uA8FB]|[\\uA90A-\\uA925\\uA930-\\uA946\\uA960-\\uA97C\\uA984-\\uA9B2\\uA9CF\\uAA00-\\uAA28]|[\\uAA40-\\uAA42\\uAA44-\\uAA4B\\uAA60-\\uAA76\\uAA7A\\uAA80-\\uAAAF\\uAAB1\\uAAB5]|[\\uAAB6\\uAAB9-\\uAABD\\uAAC0\\uAAC2\\uAADB-\\uAADD\\uAAE0-\\uAAEA\\uAAF2-\\uAAF4]|[\\uAB01-\\uAB06\\uAB09-\\uAB0E\\uAB11-\\uAB16\\uAB20-\\uAB26\\uAB28-\\uAB2E]|[\\uABC0-\\uABE2\\uAC00-\\uD7A3\\uD7B0-\\uD7C6\\uD7CB-\\uD7FB\\uF900-\\uFA6D]|[\\uFA70-\\uFAD9\\uFB00-\\uFB06\\uFB13-\\uFB17\\uFB1D\\uFB1F-\\uFB28\\uFB2A-\\uFB36]|[\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46-\\uFBB1\\uFBD3-\\uFD3D]|[\\uFD50-\\uFD8F\\uFD92-\\uFDC7\\uFDF0-\\uFDFB\\uFE70-\\uFE74\\uFE76-\\uFEFC]|[\\uFF21-\\uFF3A\\uFF41-\\uFF5A\\uFF66-\\uFFBE\\uFFC2-\\uFFC7\\uFFCA-\\uFFCF]|[\\uFFD2-\\uFFD7\\uFFDA-\\uFFDC])/,/^(?:\\|)/,/^(?:\\()/,/^(?:\\))/,/^(?:\\[)/,/^(?:\\])/,/^(?:\\{)/,/^(?:\\})/,/^(?:\")/,/^(?:(\\r?\\n)+)/,/^(?:\\s)/,/^(?:$)/],conditions:{close_directive:{rules:[],inclusive:!1},arg_directive:{rules:[3,4],inclusive:!1},type_directive:{rules:[2,3],inclusive:!1},open_directive:{rules:[1],inclusive:!1},callbackargs:{rules:[30,31],inclusive:!1},callbackname:{rules:[27,28,29],inclusive:!1},href:{rules:[24,25],inclusive:!1},click:{rules:[33,34],inclusive:!1},vertex:{rules:[],inclusive:!1},dir:{rules:[43,44,45,46,47,48,49,50,51,52,53],inclusive:!1},acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},string:{rules:[15,16],inclusive:!1},INITIAL:{rules:[0,5,6,7,9,11,14,17,18,19,20,21,22,23,26,32,35,36,37,38,39,40,41,42,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112],inclusive:!0}}};function re(){this.yy={};}return ee.lexer=ne,re.prototype=ee,ee.Parser=re,new re}();e.parser=r,e.Parser=r.Parser,e.parse=function(){return r.parse.apply(r,arguments)},e.main=function(t){t[1]||(console.log(\"Usage: \"+t[0]+\" FILE\"),process.exit(1));var r=n(5354).readFileSync(n(6470).normalize(t[1]),\"utf8\");return e.parser.parse(r)},n.c[n.s]===t&&e.main(process.argv.slice(1));},9959:(t,e,n)=>{t=n.nmd(t);var r=function(){var t=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},e=[1,3],n=[1,5],r=[7,9,11,12,13,14,15,16,17,18,19,20,22,24,25,27,34,39],i=[1,15],a=[1,16],o=[1,17],s=[1,18],c=[1,19],l=[1,20],u=[1,21],h=[1,22],f=[1,23],d=[1,24],p=[1,25],g=[1,26],y=[1,28],m=[1,30],b=[1,33],v=[5,7,9,11,12,13,14,15,16,17,18,19,20,22,24,25,27,34,39],_={trace:function(){},yy:{},symbols_:{error:2,start:3,directive:4,gantt:5,document:6,EOF:7,line:8,SPACE:9,statement:10,NL:11,dateFormat:12,inclusiveEndDates:13,topAxis:14,axisFormat:15,excludes:16,includes:17,todayMarker:18,title:19,acc_title:20,acc_title_value:21,acc_descr:22,acc_descr_value:23,acc_descr_multiline_value:24,section:25,clickStatement:26,taskTxt:27,taskData:28,openDirective:29,typeDirective:30,closeDirective:31,\":\":32,argDirective:33,click:34,callbackname:35,callbackargs:36,href:37,clickStatementDebug:38,open_directive:39,type_directive:40,arg_directive:41,close_directive:42,$accept:0,$end:1},terminals_:{2:\"error\",5:\"gantt\",7:\"EOF\",9:\"SPACE\",11:\"NL\",12:\"dateFormat\",13:\"inclusiveEndDates\",14:\"topAxis\",15:\"axisFormat\",16:\"excludes\",17:\"includes\",18:\"todayMarker\",19:\"title\",20:\"acc_title\",21:\"acc_title_value\",22:\"acc_descr\",23:\"acc_descr_value\",24:\"acc_descr_multiline_value\",25:\"section\",27:\"taskTxt\",28:\"taskData\",32:\":\",34:\"click\",35:\"callbackname\",36:\"callbackargs\",37:\"href\",39:\"open_directive\",40:\"type_directive\",41:\"arg_directive\",42:\"close_directive\"},productions_:[0,[3,2],[3,3],[6,0],[6,2],[8,2],[8,1],[8,1],[8,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,2],[10,2],[10,1],[10,1],[10,1],[10,2],[10,1],[4,4],[4,6],[26,2],[26,3],[26,3],[26,4],[26,3],[26,4],[26,2],[38,2],[38,3],[38,3],[38,4],[38,3],[38,4],[38,2],[29,1],[30,1],[33,1],[31,1]],performAction:function(t,e,n,r,i,a,o){var s=a.length-1;switch(i){case 2:return a[s-1];case 3:case 7:case 8:this.$=[];break;case 4:a[s-1].push(a[s]),this.$=a[s-1];break;case 5:case 6:this.$=a[s];break;case 9:r.setDateFormat(a[s].substr(11)),this.$=a[s].substr(11);break;case 10:r.enableInclusiveEndDates(),this.$=a[s].substr(18);break;case 11:r.TopAxis(),this.$=a[s].substr(8);break;case 12:r.setAxisFormat(a[s].substr(11)),this.$=a[s].substr(11);break;case 13:r.setExcludes(a[s].substr(9)),this.$=a[s].substr(9);break;case 14:r.setIncludes(a[s].substr(9)),this.$=a[s].substr(9);break;case 15:r.setTodayMarker(a[s].substr(12)),this.$=a[s].substr(12);break;case 16:r.setDiagramTitle(a[s].substr(6)),this.$=a[s].substr(6);break;case 17:this.$=a[s].trim(),r.setAccTitle(this.$);break;case 18:case 19:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 20:r.addSection(a[s].substr(8)),this.$=a[s].substr(8);break;case 22:r.addTask(a[s-1],a[s]),this.$=\"task\";break;case 26:this.$=a[s-1],r.setClickEvent(a[s-1],a[s],null);break;case 27:this.$=a[s-2],r.setClickEvent(a[s-2],a[s-1],a[s]);break;case 28:this.$=a[s-2],r.setClickEvent(a[s-2],a[s-1],null),r.setLink(a[s-2],a[s]);break;case 29:this.$=a[s-3],r.setClickEvent(a[s-3],a[s-2],a[s-1]),r.setLink(a[s-3],a[s]);break;case 30:this.$=a[s-2],r.setClickEvent(a[s-2],a[s],null),r.setLink(a[s-2],a[s-1]);break;case 31:this.$=a[s-3],r.setClickEvent(a[s-3],a[s-1],a[s]),r.setLink(a[s-3],a[s-2]);break;case 32:this.$=a[s-1],r.setLink(a[s-1],a[s]);break;case 33:case 39:this.$=a[s-1]+\" \"+a[s];break;case 34:case 35:case 37:this.$=a[s-2]+\" \"+a[s-1]+\" \"+a[s];break;case 36:case 38:this.$=a[s-3]+\" \"+a[s-2]+\" \"+a[s-1]+\" \"+a[s];break;case 40:r.parseDirective(\"%%{\",\"open_directive\");break;case 41:r.parseDirective(a[s],\"type_directive\");break;case 42:a[s]=a[s].trim().replace(/'/g,'\"'),r.parseDirective(a[s],\"arg_directive\");break;case 43:r.parseDirective(\"}%%\",\"close_directive\",\"gantt\");}},table:[{3:1,4:2,5:e,29:4,39:n},{1:[3]},{3:6,4:2,5:e,29:4,39:n},t(r,[2,3],{6:7}),{30:8,40:[1,9]},{40:[2,40]},{1:[2,1]},{4:29,7:[1,10],8:11,9:[1,12],10:13,11:[1,14],12:i,13:a,14:o,15:s,16:c,17:l,18:u,19:h,20:f,22:d,24:p,25:g,26:27,27:y,29:4,34:m,39:n},{31:31,32:[1,32],42:b},t([32,42],[2,41]),t(r,[2,8],{1:[2,2]}),t(r,[2,4]),{4:29,10:34,12:i,13:a,14:o,15:s,16:c,17:l,18:u,19:h,20:f,22:d,24:p,25:g,26:27,27:y,29:4,34:m,39:n},t(r,[2,6]),t(r,[2,7]),t(r,[2,9]),t(r,[2,10]),t(r,[2,11]),t(r,[2,12]),t(r,[2,13]),t(r,[2,14]),t(r,[2,15]),t(r,[2,16]),{21:[1,35]},{23:[1,36]},t(r,[2,19]),t(r,[2,20]),t(r,[2,21]),{28:[1,37]},t(r,[2,23]),{35:[1,38],37:[1,39]},{11:[1,40]},{33:41,41:[1,42]},{11:[2,43]},t(r,[2,5]),t(r,[2,17]),t(r,[2,18]),t(r,[2,22]),t(r,[2,26],{36:[1,43],37:[1,44]}),t(r,[2,32],{35:[1,45]}),t(v,[2,24]),{31:46,42:b},{42:[2,42]},t(r,[2,27],{37:[1,47]}),t(r,[2,28]),t(r,[2,30],{36:[1,48]}),{11:[1,49]},t(r,[2,29]),t(r,[2,31]),t(v,[2,25])],defaultActions:{5:[2,40],6:[2,1],33:[2,43],42:[2,42]},parseError:function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t);},parse:function(t){var e=this,n=[0],r=[],i=[null],a=[],o=this.table,s=\"\",c=0,l=0,u=0,h=2,f=1,d=a.slice.call(arguments,1),p=Object.create(this.lexer),g={yy:{}};for(var y in this.yy)Object.prototype.hasOwnProperty.call(this.yy,y)&&(g.yy[y]=this.yy[y]);p.setInput(t,g.yy),g.yy.lexer=p,g.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var m=p.yylloc;a.push(m);var b=p.options&&p.options.ranges;function v(){var t;return \"number\"!=typeof(t=r.pop()||p.lex()||f)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}\"function\"==typeof g.yy.parseError?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var _,x,k,w,T,E,C,S,A,M={};;){if(k=n[n.length-1],this.defaultActions[k]?w=this.defaultActions[k]:(null==_&&(_=v()),w=o[k]&&o[k][_]),void 0===w||!w.length||!w[0]){var N=\"\";for(E in A=[],o[k])this.terminals_[E]&&E>h&&A.push(\"'\"+this.terminals_[E]+\"'\");N=p.showPosition?\"Parse error on line \"+(c+1)+\":\\n\"+p.showPosition()+\"\\nExpecting \"+A.join(\", \")+\", got '\"+(this.terminals_[_]||_)+\"'\":\"Parse error on line \"+(c+1)+\": Unexpected \"+(_==f?\"end of input\":\"'\"+(this.terminals_[_]||_)+\"'\"),this.parseError(N,{text:p.match,token:this.terminals_[_]||_,line:p.yylineno,loc:m,expected:A});}if(w[0]instanceof Array&&w.length>1)throw new Error(\"Parse Error: multiple actions possible at state: \"+k+\", token: \"+_);switch(w[0]){case 1:n.push(_),i.push(p.yytext),a.push(p.yylloc),n.push(w[1]),_=null,x?(_=x,x=null):(l=p.yyleng,s=p.yytext,c=p.yylineno,m=p.yylloc,u>0&&u--);break;case 2:if(C=this.productions_[w[1]][1],M.$=i[i.length-C],M._$={first_line:a[a.length-(C||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(C||1)].first_column,last_column:a[a.length-1].last_column},b&&(M._$.range=[a[a.length-(C||1)].range[0],a[a.length-1].range[1]]),void 0!==(T=this.performAction.apply(M,[s,l,c,g.yy,w[1],i,a].concat(d))))return T;C&&(n=n.slice(0,-1*C*2),i=i.slice(0,-1*C),a=a.slice(0,-1*C)),n.push(this.productions_[w[1]][0]),i.push(M.$),a.push(M._$),S=o[n[n.length-2]][n[n.length-1]],n.push(S);break;case 3:return !0}}return !0}},x={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e);},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=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.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\\r\\n?|\\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\\r\\n?|\\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\\r\\n?|\\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError(\"Lexical error on line \"+(this.yylineno+1)+\". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\\n\"+this.showPosition(),{text:\"\",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t));},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return (t.length>20?\"...\":\"\")+t.substr(-20).replace(/\\n/g,\"\")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?\"...\":\"\")).replace(/\\n/g,\"\")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join(\"-\");return t+this.upcomingInput()+\"\\n\"+e+\"^\"},test_match:function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\\r\\n?|\\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\\r?\\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return !1}return !1},next:function(){if(this.done)return this.EOF;var t,e,n,r;this._input||(this.done=!0),this._more||(this.yytext=\"\",this.match=\"\");for(var i=this._currentRules(),a=0;a<i.length;a++)if((n=this._input.match(this.rules[i[a]]))&&(!e||n[0].length>e[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,i[a])))return t;if(this._backtrack){e=!1;continue}return !1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[r]))&&t:\"\"===this._input?this.EOF:this.parseError(\"Lexical error on line \"+(this.yylineno+1)+\". Unrecognized text.\\n\"+this.showPosition(),{text:\"\",token:null,line:this.yylineno})},lex:function(){return this.next()||this.lex()},begin:function(t){this.conditionStack.push(t);},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return (t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:\"INITIAL\"},pushState:function(t){this.begin(t);},stateStackSize:function(){return this.conditionStack.length},options:{\"case-insensitive\":!0},performAction:function(t,e,n,r){switch(n){case 0:return this.begin(\"open_directive\"),39;case 1:return this.begin(\"type_directive\"),40;case 2:return this.popState(),this.begin(\"arg_directive\"),32;case 3:return this.popState(),this.popState(),42;case 4:return 41;case 5:return this.begin(\"acc_title\"),20;case 6:return this.popState(),\"acc_title_value\";case 7:return this.begin(\"acc_descr\"),22;case 8:return this.popState(),\"acc_descr_value\";case 9:this.begin(\"acc_descr_multiline\");break;case 10:case 20:case 23:case 26:case 29:this.popState();break;case 11:return \"acc_descr_multiline_value\";case 12:case 13:case 14:case 16:case 17:case 18:break;case 15:return 11;case 19:this.begin(\"href\");break;case 21:return 37;case 22:this.begin(\"callbackname\");break;case 24:this.popState(),this.begin(\"callbackargs\");break;case 25:return 35;case 27:return 36;case 28:this.begin(\"click\");break;case 30:return 34;case 31:return 5;case 32:return 12;case 33:return 13;case 34:return 14;case 35:return 15;case 36:return 17;case 37:return 16;case 38:return 18;case 39:return \"date\";case 40:return 19;case 41:return \"accDescription\";case 42:return 25;case 43:return 27;case 44:return 28;case 45:return 32;case 46:return 7;case 47:return \"INVALID\"}},rules:[/^(?:%%\\{)/i,/^(?:((?:(?!\\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\\}%%)/i,/^(?:((?:(?!\\}%%).|\\n)*))/i,/^(?:accTitle\\s*:\\s*)/i,/^(?:(?!\\n||)*[^\\n]*)/i,/^(?:accDescr\\s*:\\s*)/i,/^(?:(?!\\n||)*[^\\n]*)/i,/^(?:accDescr\\s*\\{\\s*)/i,/^(?:[\\}])/i,/^(?:[^\\}]*)/i,/^(?:%%(?!\\{)*[^\\n]*)/i,/^(?:[^\\}]%%*[^\\n]*)/i,/^(?:%%*[^\\n]*[\\n]*)/i,/^(?:[\\n]+)/i,/^(?:\\s+)/i,/^(?:#[^\\n]*)/i,/^(?:%[^\\n]*)/i,/^(?:href[\\s]+[\"])/i,/^(?:[\"])/i,/^(?:[^\"]*)/i,/^(?:call[\\s]+)/i,/^(?:\\([\\s]*\\))/i,/^(?:\\()/i,/^(?:[^(]*)/i,/^(?:\\))/i,/^(?:[^)]*)/i,/^(?:click[\\s]+)/i,/^(?:[\\s\\n])/i,/^(?:[^\\s\\n]*)/i,/^(?:gantt\\b)/i,/^(?:dateFormat\\s[^#\\n;]+)/i,/^(?:inclusiveEndDates\\b)/i,/^(?:topAxis\\b)/i,/^(?:axisFormat\\s[^#\\n;]+)/i,/^(?:includes\\s[^#\\n;]+)/i,/^(?:excludes\\s[^#\\n;]+)/i,/^(?:todayMarker\\s[^\\n;]+)/i,/^(?:\\d\\d\\d\\d-\\d\\d-\\d\\d\\b)/i,/^(?:title\\s[^#\\n;]+)/i,/^(?:accDescription\\s[^#\\n;]+)/i,/^(?:section\\s[^#:\\n;]+)/i,/^(?:[^#:\\n;]+)/i,/^(?::[^#\\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[10,11],inclusive:!1},acc_descr:{rules:[8],inclusive:!1},acc_title:{rules:[6],inclusive:!1},close_directive:{rules:[],inclusive:!1},arg_directive:{rules:[3,4],inclusive:!1},type_directive:{rules:[2,3],inclusive:!1},open_directive:{rules:[1],inclusive:!1},callbackargs:{rules:[26,27],inclusive:!1},callbackname:{rules:[23,24,25],inclusive:!1},href:{rules:[20,21],inclusive:!1},click:{rules:[29,30],inclusive:!1},INITIAL:{rules:[0,5,7,9,12,13,14,15,16,17,18,19,22,28,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47],inclusive:!0}}};function k(){this.yy={};}return _.lexer=x,k.prototype=_,_.Parser=k,new k}();e.parser=r,e.Parser=r.Parser,e.parse=function(){return r.parse.apply(r,arguments)},e.main=function(t){t[1]||(console.log(\"Usage: \"+t[0]+\" FILE\"),process.exit(1));var r=n(6878).readFileSync(n(6470).normalize(t[1]),\"utf8\");return e.parser.parse(r)},n.c[n.s]===t&&e.main(process.argv.slice(1));},2553:(t,e,n)=>{t=n.nmd(t);var r=function(){var t=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},e=[1,4],n=[1,7],r=[1,5],i=[1,9],a=[1,6],o=[2,6],s=[1,16],c=[6,8,14,20,22,24,25,27,29,32,35,39,49,53],l=[8,14,20,22,24,25,27,29,32,35,39],u=[8,13,14,20,22,24,25,27,29,32,35,39],h=[1,26],f=[6,8,14,49,53],d=[8,14,53],p=[1,64],g=[1,65],y=[1,66],m=[8,14,33,38,41,53],b={trace:function(){},yy:{},symbols_:{error:2,start:3,eol:4,directive:5,GG:6,document:7,EOF:8,\":\":9,DIR:10,options:11,body:12,OPT:13,NL:14,line:15,statement:16,commitStatement:17,mergeStatement:18,cherryPickStatement:19,acc_title:20,acc_title_value:21,acc_descr:22,acc_descr_value:23,acc_descr_multiline_value:24,section:25,branchStatement:26,CHECKOUT:27,ID:28,BRANCH:29,ORDER:30,NUM:31,CHERRY_PICK:32,COMMIT_ID:33,STR:34,MERGE:35,COMMIT_TYPE:36,commitType:37,COMMIT_TAG:38,COMMIT:39,commit_arg:40,COMMIT_MSG:41,NORMAL:42,REVERSE:43,HIGHLIGHT:44,openDirective:45,typeDirective:46,closeDirective:47,argDirective:48,open_directive:49,type_directive:50,arg_directive:51,close_directive:52,\";\":53,$accept:0,$end:1},terminals_:{2:\"error\",6:\"GG\",8:\"EOF\",9:\":\",10:\"DIR\",13:\"OPT\",14:\"NL\",20:\"acc_title\",21:\"acc_title_value\",22:\"acc_descr\",23:\"acc_descr_value\",24:\"acc_descr_multiline_value\",25:\"section\",27:\"CHECKOUT\",28:\"ID\",29:\"BRANCH\",30:\"ORDER\",31:\"NUM\",32:\"CHERRY_PICK\",33:\"COMMIT_ID\",34:\"STR\",35:\"MERGE\",36:\"COMMIT_TYPE\",38:\"COMMIT_TAG\",39:\"COMMIT\",41:\"COMMIT_MSG\",42:\"NORMAL\",43:\"REVERSE\",44:\"HIGHLIGHT\",49:\"open_directive\",50:\"type_directive\",51:\"arg_directive\",52:\"close_directive\",53:\";\"},productions_:[0,[3,2],[3,2],[3,3],[3,4],[3,5],[7,0],[7,2],[11,2],[11,1],[12,0],[12,2],[15,2],[15,1],[16,1],[16,1],[16,1],[16,2],[16,2],[16,1],[16,1],[16,1],[16,2],[26,2],[26,4],[19,3],[18,2],[18,4],[18,4],[18,4],[18,6],[18,6],[18,6],[18,6],[18,6],[18,6],[18,8],[18,8],[18,8],[18,8],[18,8],[18,8],[17,2],[17,3],[17,3],[17,5],[17,5],[17,3],[17,5],[17,5],[17,5],[17,5],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,3],[17,5],[17,5],[17,5],[17,5],[17,5],[17,5],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[40,0],[40,1],[37,1],[37,1],[37,1],[5,3],[5,5],[45,1],[46,1],[48,1],[47,1],[4,1],[4,1],[4,1]],performAction:function(t,e,n,r,i,a,o){var s=a.length-1;switch(i){case 3:return a[s];case 4:return a[s-1];case 5:return r.setDirection(a[s-3]),a[s-1];case 7:r.setOptions(a[s-1]),this.$=a[s];break;case 8:a[s-1]+=a[s],this.$=a[s-1];break;case 10:this.$=[];break;case 11:a[s-1].push(a[s]),this.$=a[s-1];break;case 12:this.$=a[s-1];break;case 17:this.$=a[s].trim(),r.setAccTitle(this.$);break;case 18:case 19:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 20:r.addSection(a[s].substr(8)),this.$=a[s].substr(8);break;case 22:r.checkout(a[s]);break;case 23:r.branch(a[s]);break;case 24:r.branch(a[s-2],a[s]);break;case 25:r.cherryPick(a[s]);break;case 26:r.merge(a[s],\"\",\"\",\"\");break;case 27:r.merge(a[s-2],a[s],\"\",\"\");break;case 28:r.merge(a[s-2],\"\",a[s],\"\");break;case 29:r.merge(a[s-2],\"\",\"\",a[s]);break;case 30:r.merge(a[s-4],a[s],\"\",a[s-2]);break;case 31:r.merge(a[s-4],\"\",a[s],a[s-2]);break;case 32:r.merge(a[s-4],\"\",a[s-2],a[s]);break;case 33:r.merge(a[s-4],a[s-2],a[s],\"\");break;case 34:r.merge(a[s-4],a[s-2],\"\",a[s]);break;case 35:r.merge(a[s-4],a[s],a[s-2],\"\");break;case 36:r.merge(a[s-6],a[s-4],a[s-2],a[s]);break;case 37:r.merge(a[s-6],a[s],a[s-4],a[s-2]);break;case 38:r.merge(a[s-6],a[s-4],a[s],a[s-2]);break;case 39:r.merge(a[s-6],a[s-2],a[s-4],a[s]);break;case 40:r.merge(a[s-6],a[s],a[s-2],a[s-4]);break;case 41:r.merge(a[s-6],a[s-2],a[s],a[s-4]);break;case 42:r.commit(a[s]);break;case 43:r.commit(\"\",\"\",r.commitType.NORMAL,a[s]);break;case 44:r.commit(\"\",\"\",a[s],\"\");break;case 45:r.commit(\"\",\"\",a[s],a[s-2]);break;case 46:r.commit(\"\",\"\",a[s-2],a[s]);break;case 47:r.commit(\"\",a[s],r.commitType.NORMAL,\"\");break;case 48:r.commit(\"\",a[s-2],r.commitType.NORMAL,a[s]);break;case 49:r.commit(\"\",a[s],r.commitType.NORMAL,a[s-2]);break;case 50:r.commit(\"\",a[s-2],a[s],\"\");break;case 51:r.commit(\"\",a[s],a[s-2],\"\");break;case 52:r.commit(\"\",a[s-4],a[s-2],a[s]);break;case 53:r.commit(\"\",a[s-4],a[s],a[s-2]);break;case 54:r.commit(\"\",a[s-2],a[s-4],a[s]);break;case 55:r.commit(\"\",a[s],a[s-4],a[s-2]);break;case 56:r.commit(\"\",a[s],a[s-2],a[s-4]);break;case 57:r.commit(\"\",a[s-2],a[s],a[s-4]);break;case 58:r.commit(a[s],\"\",r.commitType.NORMAL,\"\");break;case 59:r.commit(a[s],\"\",r.commitType.NORMAL,a[s-2]);break;case 60:r.commit(a[s-2],\"\",r.commitType.NORMAL,a[s]);break;case 61:r.commit(a[s-2],\"\",a[s],\"\");break;case 62:r.commit(a[s],\"\",a[s-2],\"\");break;case 63:r.commit(a[s],a[s-2],r.commitType.NORMAL,\"\");break;case 64:r.commit(a[s-2],a[s],r.commitType.NORMAL,\"\");break;case 65:r.commit(a[s-4],\"\",a[s-2],a[s]);break;case 66:r.commit(a[s-4],\"\",a[s],a[s-2]);break;case 67:r.commit(a[s-2],\"\",a[s-4],a[s]);break;case 68:r.commit(a[s],\"\",a[s-4],a[s-2]);break;case 69:r.commit(a[s],\"\",a[s-2],a[s-4]);break;case 70:r.commit(a[s-2],\"\",a[s],a[s-4]);break;case 71:r.commit(a[s-4],a[s],a[s-2],\"\");break;case 72:r.commit(a[s-4],a[s-2],a[s],\"\");break;case 73:r.commit(a[s-2],a[s],a[s-4],\"\");break;case 74:r.commit(a[s],a[s-2],a[s-4],\"\");break;case 75:r.commit(a[s],a[s-4],a[s-2],\"\");break;case 76:r.commit(a[s-2],a[s-4],a[s],\"\");break;case 77:r.commit(a[s-4],a[s],r.commitType.NORMAL,a[s-2]);break;case 78:r.commit(a[s-4],a[s-2],r.commitType.NORMAL,a[s]);break;case 79:r.commit(a[s-2],a[s],r.commitType.NORMAL,a[s-4]);break;case 80:r.commit(a[s],a[s-2],r.commitType.NORMAL,a[s-4]);break;case 81:r.commit(a[s],a[s-4],r.commitType.NORMAL,a[s-2]);break;case 82:r.commit(a[s-2],a[s-4],r.commitType.NORMAL,a[s]);break;case 83:r.commit(a[s-6],a[s-4],a[s-2],a[s]);break;case 84:r.commit(a[s-6],a[s-4],a[s],a[s-2]);break;case 85:r.commit(a[s-6],a[s-2],a[s-4],a[s]);break;case 86:r.commit(a[s-6],a[s],a[s-4],a[s-2]);break;case 87:r.commit(a[s-6],a[s-2],a[s],a[s-4]);break;case 88:r.commit(a[s-6],a[s],a[s-2],a[s-4]);break;case 89:r.commit(a[s-4],a[s-6],a[s-2],a[s]);break;case 90:r.commit(a[s-4],a[s-6],a[s],a[s-2]);break;case 91:r.commit(a[s-2],a[s-6],a[s-4],a[s]);break;case 92:r.commit(a[s],a[s-6],a[s-4],a[s-2]);break;case 93:r.commit(a[s-2],a[s-6],a[s],a[s-4]);break;case 94:r.commit(a[s],a[s-6],a[s-2],a[s-4]);break;case 95:r.commit(a[s],a[s-4],a[s-2],a[s-6]);break;case 96:r.commit(a[s-2],a[s-4],a[s],a[s-6]);break;case 97:r.commit(a[s],a[s-2],a[s-4],a[s-6]);break;case 98:r.commit(a[s-2],a[s],a[s-4],a[s-6]);break;case 99:r.commit(a[s-4],a[s-2],a[s],a[s-6]);break;case 100:r.commit(a[s-4],a[s],a[s-2],a[s-6]);break;case 101:r.commit(a[s-2],a[s-4],a[s-6],a[s]);break;case 102:r.commit(a[s],a[s-4],a[s-6],a[s-2]);break;case 103:r.commit(a[s-2],a[s],a[s-6],a[s-4]);break;case 104:r.commit(a[s],a[s-2],a[s-6],a[s-4]);break;case 105:r.commit(a[s-4],a[s-2],a[s-6],a[s]);break;case 106:r.commit(a[s-4],a[s],a[s-6],a[s-2]);break;case 107:this.$=\"\";break;case 108:this.$=a[s];break;case 109:this.$=r.commitType.NORMAL;break;case 110:this.$=r.commitType.REVERSE;break;case 111:this.$=r.commitType.HIGHLIGHT;break;case 114:r.parseDirective(\"%%{\",\"open_directive\");break;case 115:r.parseDirective(a[s],\"type_directive\");break;case 116:a[s]=a[s].trim().replace(/'/g,'\"'),r.parseDirective(a[s],\"arg_directive\");break;case 117:r.parseDirective(\"}%%\",\"close_directive\",\"gitGraph\");}},table:[{3:1,4:2,5:3,6:e,8:n,14:r,45:8,49:i,53:a},{1:[3]},{3:10,4:2,5:3,6:e,8:n,14:r,45:8,49:i,53:a},{3:11,4:2,5:3,6:e,8:n,14:r,45:8,49:i,53:a},{7:12,8:o,9:[1,13],10:[1,14],11:15,14:s},t(c,[2,118]),t(c,[2,119]),t(c,[2,120]),{46:17,50:[1,18]},{50:[2,114]},{1:[2,1]},{1:[2,2]},{8:[1,19]},{7:20,8:o,11:15,14:s},{9:[1,21]},t(l,[2,10],{12:22,13:[1,23]}),t(u,[2,9]),{9:[1,25],47:24,52:h},t([9,52],[2,115]),{1:[2,3]},{8:[1,27]},{7:28,8:o,11:15,14:s},{8:[2,7],14:[1,31],15:29,16:30,17:32,18:33,19:34,20:[1,35],22:[1,36],24:[1,37],25:[1,38],26:39,27:[1,40],29:[1,44],32:[1,43],35:[1,42],39:[1,41]},t(u,[2,8]),t(f,[2,112]),{48:45,51:[1,46]},t(f,[2,117]),{1:[2,4]},{8:[1,47]},t(l,[2,11]),{4:48,8:n,14:r,53:a},t(l,[2,13]),t(d,[2,14]),t(d,[2,15]),t(d,[2,16]),{21:[1,49]},{23:[1,50]},t(d,[2,19]),t(d,[2,20]),t(d,[2,21]),{28:[1,51]},t(d,[2,107],{40:52,33:[1,55],34:[1,57],36:[1,54],38:[1,53],41:[1,56]}),{28:[1,58]},{33:[1,59]},{28:[1,60]},{47:61,52:h},{52:[2,116]},{1:[2,5]},t(l,[2,12]),t(d,[2,17]),t(d,[2,18]),t(d,[2,22]),t(d,[2,42]),{34:[1,62]},{37:63,42:p,43:g,44:y},{34:[1,67]},{34:[1,68]},t(d,[2,108]),t(d,[2,26],{33:[1,69],36:[1,70],38:[1,71]}),{34:[1,72]},t(d,[2,23],{30:[1,73]}),t(f,[2,113]),t(d,[2,43],{33:[1,75],36:[1,74],41:[1,76]}),t(d,[2,44],{33:[1,78],38:[1,77],41:[1,79]}),t(m,[2,109]),t(m,[2,110]),t(m,[2,111]),t(d,[2,47],{36:[1,81],38:[1,80],41:[1,82]}),t(d,[2,58],{33:[1,85],36:[1,84],38:[1,83]}),{34:[1,86]},{37:87,42:p,43:g,44:y},{34:[1,88]},t(d,[2,25]),{31:[1,89]},{37:90,42:p,43:g,44:y},{34:[1,91]},{34:[1,92]},{34:[1,93]},{34:[1,94]},{34:[1,95]},{34:[1,96]},{37:97,42:p,43:g,44:y},{34:[1,98]},{34:[1,99]},{37:100,42:p,43:g,44:y},{34:[1,101]},t(d,[2,27],{36:[1,102],38:[1,103]}),t(d,[2,28],{33:[1,105],38:[1,104]}),t(d,[2,29],{33:[1,106],36:[1,107]}),t(d,[2,24]),t(d,[2,45],{33:[1,108],41:[1,109]}),t(d,[2,49],{36:[1,110],41:[1,111]}),t(d,[2,59],{33:[1,113],36:[1,112]}),t(d,[2,46],{33:[1,114],41:[1,115]}),t(d,[2,51],{38:[1,116],41:[1,117]}),t(d,[2,62],{33:[1,119],38:[1,118]}),t(d,[2,48],{36:[1,120],41:[1,121]}),t(d,[2,50],{38:[1,122],41:[1,123]}),t(d,[2,63],{36:[1,124],38:[1,125]}),t(d,[2,60],{33:[1,127],36:[1,126]}),t(d,[2,61],{33:[1,129],38:[1,128]}),t(d,[2,64],{36:[1,130],38:[1,131]}),{37:132,42:p,43:g,44:y},{34:[1,133]},{34:[1,134]},{34:[1,135]},{34:[1,136]},{37:137,42:p,43:g,44:y},{34:[1,138]},{34:[1,139]},{37:140,42:p,43:g,44:y},{34:[1,141]},{37:142,42:p,43:g,44:y},{34:[1,143]},{34:[1,144]},{34:[1,145]},{34:[1,146]},{34:[1,147]},{34:[1,148]},{34:[1,149]},{37:150,42:p,43:g,44:y},{34:[1,151]},{34:[1,152]},{34:[1,153]},{37:154,42:p,43:g,44:y},{34:[1,155]},{37:156,42:p,43:g,44:y},{34:[1,157]},{34:[1,158]},{34:[1,159]},{37:160,42:p,43:g,44:y},{34:[1,161]},t(d,[2,33],{38:[1,162]}),t(d,[2,34],{36:[1,163]}),t(d,[2,32],{33:[1,164]}),t(d,[2,35],{38:[1,165]}),t(d,[2,30],{36:[1,166]}),t(d,[2,31],{33:[1,167]}),t(d,[2,56],{41:[1,168]}),t(d,[2,69],{33:[1,169]}),t(d,[2,57],{41:[1,170]}),t(d,[2,80],{36:[1,171]}),t(d,[2,70],{33:[1,172]}),t(d,[2,79],{36:[1,173]}),t(d,[2,55],{41:[1,174]}),t(d,[2,68],{33:[1,175]}),t(d,[2,54],{41:[1,176]}),t(d,[2,74],{38:[1,177]}),t(d,[2,67],{33:[1,178]}),t(d,[2,73],{38:[1,179]}),t(d,[2,53],{41:[1,180]}),t(d,[2,81],{36:[1,181]}),t(d,[2,52],{41:[1,182]}),t(d,[2,75],{38:[1,183]}),t(d,[2,76],{38:[1,184]}),t(d,[2,82],{36:[1,185]}),t(d,[2,66],{33:[1,186]}),t(d,[2,77],{36:[1,187]}),t(d,[2,65],{33:[1,188]}),t(d,[2,71],{38:[1,189]}),t(d,[2,72],{38:[1,190]}),t(d,[2,78],{36:[1,191]}),{34:[1,192]},{37:193,42:p,43:g,44:y},{34:[1,194]},{34:[1,195]},{37:196,42:p,43:g,44:y},{34:[1,197]},{34:[1,198]},{34:[1,199]},{34:[1,200]},{37:201,42:p,43:g,44:y},{34:[1,202]},{37:203,42:p,43:g,44:y},{34:[1,204]},{34:[1,205]},{34:[1,206]},{34:[1,207]},{34:[1,208]},{34:[1,209]},{34:[1,210]},{37:211,42:p,43:g,44:y},{34:[1,212]},{34:[1,213]},{34:[1,214]},{37:215,42:p,43:g,44:y},{34:[1,216]},{37:217,42:p,43:g,44:y},{34:[1,218]},{34:[1,219]},{34:[1,220]},{37:221,42:p,43:g,44:y},t(d,[2,36]),t(d,[2,38]),t(d,[2,37]),t(d,[2,39]),t(d,[2,41]),t(d,[2,40]),t(d,[2,97]),t(d,[2,98]),t(d,[2,95]),t(d,[2,96]),t(d,[2,100]),t(d,[2,99]),t(d,[2,104]),t(d,[2,103]),t(d,[2,102]),t(d,[2,101]),t(d,[2,106]),t(d,[2,105]),t(d,[2,94]),t(d,[2,93]),t(d,[2,92]),t(d,[2,91]),t(d,[2,89]),t(d,[2,90]),t(d,[2,88]),t(d,[2,87]),t(d,[2,86]),t(d,[2,85]),t(d,[2,83]),t(d,[2,84])],defaultActions:{9:[2,114],10:[2,1],11:[2,2],19:[2,3],27:[2,4],46:[2,116],47:[2,5]},parseError:function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t);},parse:function(t){var e=this,n=[0],r=[],i=[null],a=[],o=this.table,s=\"\",c=0,l=0,u=0,h=2,f=1,d=a.slice.call(arguments,1),p=Object.create(this.lexer),g={yy:{}};for(var y in this.yy)Object.prototype.hasOwnProperty.call(this.yy,y)&&(g.yy[y]=this.yy[y]);p.setInput(t,g.yy),g.yy.lexer=p,g.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var m=p.yylloc;a.push(m);var b=p.options&&p.options.ranges;function v(){var t;return \"number\"!=typeof(t=r.pop()||p.lex()||f)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}\"function\"==typeof g.yy.parseError?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var _,x,k,w,T,E,C,S,A,M={};;){if(k=n[n.length-1],this.defaultActions[k]?w=this.defaultActions[k]:(null==_&&(_=v()),w=o[k]&&o[k][_]),void 0===w||!w.length||!w[0]){var N=\"\";for(E in A=[],o[k])this.terminals_[E]&&E>h&&A.push(\"'\"+this.terminals_[E]+\"'\");N=p.showPosition?\"Parse error on line \"+(c+1)+\":\\n\"+p.showPosition()+\"\\nExpecting \"+A.join(\", \")+\", got '\"+(this.terminals_[_]||_)+\"'\":\"Parse error on line \"+(c+1)+\": Unexpected \"+(_==f?\"end of input\":\"'\"+(this.terminals_[_]||_)+\"'\"),this.parseError(N,{text:p.match,token:this.terminals_[_]||_,line:p.yylineno,loc:m,expected:A});}if(w[0]instanceof Array&&w.length>1)throw new Error(\"Parse Error: multiple actions possible at state: \"+k+\", token: \"+_);switch(w[0]){case 1:n.push(_),i.push(p.yytext),a.push(p.yylloc),n.push(w[1]),_=null,x?(_=x,x=null):(l=p.yyleng,s=p.yytext,c=p.yylineno,m=p.yylloc,u>0&&u--);break;case 2:if(C=this.productions_[w[1]][1],M.$=i[i.length-C],M._$={first_line:a[a.length-(C||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(C||1)].first_column,last_column:a[a.length-1].last_column},b&&(M._$.range=[a[a.length-(C||1)].range[0],a[a.length-1].range[1]]),void 0!==(T=this.performAction.apply(M,[s,l,c,g.yy,w[1],i,a].concat(d))))return T;C&&(n=n.slice(0,-1*C*2),i=i.slice(0,-1*C),a=a.slice(0,-1*C)),n.push(this.productions_[w[1]][0]),i.push(M.$),a.push(M._$),S=o[n[n.length-2]][n[n.length-1]],n.push(S);break;case 3:return !0}}return !0}},v={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e);},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=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.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\\r\\n?|\\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\\r\\n?|\\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\\r\\n?|\\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError(\"Lexical error on line \"+(this.yylineno+1)+\". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\\n\"+this.showPosition(),{text:\"\",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t));},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return (t.length>20?\"...\":\"\")+t.substr(-20).replace(/\\n/g,\"\")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?\"...\":\"\")).replace(/\\n/g,\"\")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join(\"-\");return t+this.upcomingInput()+\"\\n\"+e+\"^\"},test_match:function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\\r\\n?|\\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\\r?\\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return !1}return !1},next:function(){if(this.done)return this.EOF;var t,e,n,r;this._input||(this.done=!0),this._more||(this.yytext=\"\",this.match=\"\");for(var i=this._currentRules(),a=0;a<i.length;a++)if((n=this._input.match(this.rules[i[a]]))&&(!e||n[0].length>e[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,i[a])))return t;if(this._backtrack){e=!1;continue}return !1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[r]))&&t:\"\"===this._input?this.EOF:this.parseError(\"Lexical error on line \"+(this.yylineno+1)+\". Unrecognized text.\\n\"+this.showPosition(),{text:\"\",token:null,line:this.yylineno})},lex:function(){return this.next()||this.lex()},begin:function(t){this.conditionStack.push(t);},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return (t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:\"INITIAL\"},pushState:function(t){this.begin(t);},stateStackSize:function(){return this.conditionStack.length},options:{\"case-insensitive\":!0},performAction:function(t,e,n,r){switch(n){case 0:return this.begin(\"open_directive\"),49;case 1:return this.begin(\"type_directive\"),50;case 2:return this.popState(),this.begin(\"arg_directive\"),9;case 3:return this.popState(),this.popState(),52;case 4:return 51;case 5:return this.begin(\"acc_title\"),20;case 6:return this.popState(),\"acc_title_value\";case 7:return this.begin(\"acc_descr\"),22;case 8:return this.popState(),\"acc_descr_value\";case 9:this.begin(\"acc_descr_multiline\");break;case 10:case 35:case 38:this.popState();break;case 11:return \"acc_descr_multiline_value\";case 12:return 14;case 13:case 14:case 15:break;case 16:return 6;case 17:return 39;case 18:return 33;case 19:return 36;case 20:return 41;case 21:return 42;case 22:return 43;case 23:return 44;case 24:return 38;case 25:return 29;case 26:return 30;case 27:return 35;case 28:return 32;case 29:return 27;case 30:case 31:return 10;case 32:return 9;case 33:return \"CARET\";case 34:this.begin(\"options\");break;case 36:return 13;case 37:this.begin(\"string\");break;case 39:return 34;case 40:return 31;case 41:return 28;case 42:return 8}},rules:[/^(?:%%\\{)/i,/^(?:((?:(?!\\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\\}%%)/i,/^(?:((?:(?!\\}%%).|\\n)*))/i,/^(?:accTitle\\s*:\\s*)/i,/^(?:(?!\\n||)*[^\\n]*)/i,/^(?:accDescr\\s*:\\s*)/i,/^(?:(?!\\n||)*[^\\n]*)/i,/^(?:accDescr\\s*\\{\\s*)/i,/^(?:[\\}])/i,/^(?:[^\\}]*)/i,/^(?:(\\r?\\n)+)/i,/^(?:\\s+)/i,/^(?:#[^\\n]*)/i,/^(?:%[^\\n]*)/i,/^(?:gitGraph\\b)/i,/^(?:commit\\b)/i,/^(?:id:)/i,/^(?:type:)/i,/^(?:msg:)/i,/^(?:NORMAL\\b)/i,/^(?:REVERSE\\b)/i,/^(?:HIGHLIGHT\\b)/i,/^(?:tag:)/i,/^(?:branch\\b)/i,/^(?:order:)/i,/^(?:merge\\b)/i,/^(?:cherry-pick\\b)/i,/^(?:checkout\\b)/i,/^(?:LR\\b)/i,/^(?:BT\\b)/i,/^(?::)/i,/^(?:\\^)/i,/^(?:options\\r?\\n)/i,/^(?:[ \\r\\n\\t]+end\\b)/i,/^(?:[\\s\\S]+(?=[ \\r\\n\\t]+end))/i,/^(?:[\"])/i,/^(?:[\"])/i,/^(?:[^\"]*)/i,/^(?:[0-9]+)/i,/^(?:[a-zA-Z][-_\\./a-zA-Z0-9]*[-_a-zA-Z0-9])/i,/^(?:$)/i],conditions:{acc_descr_multiline:{rules:[10,11],inclusive:!1},acc_descr:{rules:[8],inclusive:!1},acc_title:{rules:[6],inclusive:!1},close_directive:{rules:[],inclusive:!1},arg_directive:{rules:[3,4],inclusive:!1},type_directive:{rules:[2,3],inclusive:!1},open_directive:{rules:[1],inclusive:!1},options:{rules:[35,36],inclusive:!1},string:{rules:[38,39],inclusive:!1},INITIAL:{rules:[0,5,7,9,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,37,40,41,42],inclusive:!0}}};function _(){this.yy={};}return b.lexer=v,_.prototype=b,b.Parser=_,new _}();e.parser=r,e.Parser=r.Parser,e.parse=function(){return r.parse.apply(r,arguments)},e.main=function(t){t[1]||(console.log(\"Usage: \"+t[0]+\" FILE\"),process.exit(1));var r=n(8183).readFileSync(n(6470).normalize(t[1]),\"utf8\");return e.parser.parse(r)},n.c[n.s]===t&&e.main(process.argv.slice(1));},6765:(t,e,n)=>{t=n.nmd(t);var r=function(){var t=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},e=[6,9,10],n={trace:function(){},yy:{},symbols_:{error:2,start:3,info:4,document:5,EOF:6,line:7,statement:8,NL:9,showInfo:10,$accept:0,$end:1},terminals_:{2:\"error\",4:\"info\",6:\"EOF\",9:\"NL\",10:\"showInfo\"},productions_:[0,[3,3],[5,0],[5,2],[7,1],[7,1],[8,1]],performAction:function(t,e,n,r,i,a,o){switch(a.length,i){case 1:return r;case 4:break;case 6:r.setInfo(!0);}},table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:6,9:[1,7],10:[1,8]},{1:[2,1]},t(e,[2,3]),t(e,[2,4]),t(e,[2,5]),t(e,[2,6])],defaultActions:{4:[2,1]},parseError:function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t);},parse:function(t){var e=this,n=[0],r=[],i=[null],a=[],o=this.table,s=\"\",c=0,l=0,u=0,h=2,f=1,d=a.slice.call(arguments,1),p=Object.create(this.lexer),g={yy:{}};for(var y in this.yy)Object.prototype.hasOwnProperty.call(this.yy,y)&&(g.yy[y]=this.yy[y]);p.setInput(t,g.yy),g.yy.lexer=p,g.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var m=p.yylloc;a.push(m);var b=p.options&&p.options.ranges;function v(){var t;return \"number\"!=typeof(t=r.pop()||p.lex()||f)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}\"function\"==typeof g.yy.parseError?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var _,x,k,w,T,E,C,S,A,M={};;){if(k=n[n.length-1],this.defaultActions[k]?w=this.defaultActions[k]:(null==_&&(_=v()),w=o[k]&&o[k][_]),void 0===w||!w.length||!w[0]){var N=\"\";for(E in A=[],o[k])this.terminals_[E]&&E>h&&A.push(\"'\"+this.terminals_[E]+\"'\");N=p.showPosition?\"Parse error on line \"+(c+1)+\":\\n\"+p.showPosition()+\"\\nExpecting \"+A.join(\", \")+\", got '\"+(this.terminals_[_]||_)+\"'\":\"Parse error on line \"+(c+1)+\": Unexpected \"+(_==f?\"end of input\":\"'\"+(this.terminals_[_]||_)+\"'\"),this.parseError(N,{text:p.match,token:this.terminals_[_]||_,line:p.yylineno,loc:m,expected:A});}if(w[0]instanceof Array&&w.length>1)throw new Error(\"Parse Error: multiple actions possible at state: \"+k+\", token: \"+_);switch(w[0]){case 1:n.push(_),i.push(p.yytext),a.push(p.yylloc),n.push(w[1]),_=null,x?(_=x,x=null):(l=p.yyleng,s=p.yytext,c=p.yylineno,m=p.yylloc,u>0&&u--);break;case 2:if(C=this.productions_[w[1]][1],M.$=i[i.length-C],M._$={first_line:a[a.length-(C||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(C||1)].first_column,last_column:a[a.length-1].last_column},b&&(M._$.range=[a[a.length-(C||1)].range[0],a[a.length-1].range[1]]),void 0!==(T=this.performAction.apply(M,[s,l,c,g.yy,w[1],i,a].concat(d))))return T;C&&(n=n.slice(0,-1*C*2),i=i.slice(0,-1*C),a=a.slice(0,-1*C)),n.push(this.productions_[w[1]][0]),i.push(M.$),a.push(M._$),S=o[n[n.length-2]][n[n.length-1]],n.push(S);break;case 3:return !0}}return !0}},r={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e);},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=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.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\\r\\n?|\\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\\r\\n?|\\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\\r\\n?|\\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError(\"Lexical error on line \"+(this.yylineno+1)+\". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\\n\"+this.showPosition(),{text:\"\",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t));},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return (t.length>20?\"...\":\"\")+t.substr(-20).replace(/\\n/g,\"\")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?\"...\":\"\")).replace(/\\n/g,\"\")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join(\"-\");return t+this.upcomingInput()+\"\\n\"+e+\"^\"},test_match:function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\\r\\n?|\\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\\r?\\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return !1}return !1},next:function(){if(this.done)return this.EOF;var t,e,n,r;this._input||(this.done=!0),this._more||(this.yytext=\"\",this.match=\"\");for(var i=this._currentRules(),a=0;a<i.length;a++)if((n=this._input.match(this.rules[i[a]]))&&(!e||n[0].length>e[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,i[a])))return t;if(this._backtrack){e=!1;continue}return !1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[r]))&&t:\"\"===this._input?this.EOF:this.parseError(\"Lexical error on line \"+(this.yylineno+1)+\". Unrecognized text.\\n\"+this.showPosition(),{text:\"\",token:null,line:this.yylineno})},lex:function(){return this.next()||this.lex()},begin:function(t){this.conditionStack.push(t);},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return (t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:\"INITIAL\"},pushState:function(t){this.begin(t);},stateStackSize:function(){return this.conditionStack.length},options:{\"case-insensitive\":!0},performAction:function(t,e,n,r){switch(n){case 0:return 4;case 1:return 9;case 2:return \"space\";case 3:return 10;case 4:return 6;case 5:return \"TXT\"}},rules:[/^(?:info\\b)/i,/^(?:[\\s\\n\\r]+)/i,/^(?:[\\s]+)/i,/^(?:showInfo\\b)/i,/^(?:$)/i,/^(?:.)/i],conditions:{INITIAL:{rules:[0,1,2,3,4,5],inclusive:!0}}};function i(){this.yy={};}return n.lexer=r,i.prototype=n,n.Parser=i,new i}();e.parser=r,e.Parser=r.Parser,e.parse=function(){return r.parse.apply(r,arguments)},e.main=function(t){t[1]||(console.log(\"Usage: \"+t[0]+\" FILE\"),process.exit(1));var r=n(1428).readFileSync(n(6470).normalize(t[1]),\"utf8\");return e.parser.parse(r)},n.c[n.s]===t&&e.main(process.argv.slice(1));},7062:(t,e,n)=>{t=n.nmd(t);var r=function(){var t=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},e=[1,4],n=[1,5],r=[1,6],i=[1,7],a=[1,9],o=[1,11,13,15,17,19,20,26,27,28,29],s=[2,5],c=[1,6,11,13,15,17,19,20,26,27,28,29],l=[26,27,28],u=[2,8],h=[1,18],f=[1,19],d=[1,20],p=[1,21],g=[1,22],y=[1,23],m=[1,28],b=[6,26,27,28,29],v={trace:function(){},yy:{},symbols_:{error:2,start:3,eol:4,directive:5,PIE:6,document:7,showData:8,line:9,statement:10,txt:11,value:12,title:13,title_value:14,acc_title:15,acc_title_value:16,acc_descr:17,acc_descr_value:18,acc_descr_multiline_value:19,section:20,openDirective:21,typeDirective:22,closeDirective:23,\":\":24,argDirective:25,NEWLINE:26,\";\":27,EOF:28,open_directive:29,type_directive:30,arg_directive:31,close_directive:32,$accept:0,$end:1},terminals_:{2:\"error\",6:\"PIE\",8:\"showData\",11:\"txt\",12:\"value\",13:\"title\",14:\"title_value\",15:\"acc_title\",16:\"acc_title_value\",17:\"acc_descr\",18:\"acc_descr_value\",19:\"acc_descr_multiline_value\",20:\"section\",24:\":\",26:\"NEWLINE\",27:\";\",28:\"EOF\",29:\"open_directive\",30:\"type_directive\",31:\"arg_directive\",32:\"close_directive\"},productions_:[0,[3,2],[3,2],[3,2],[3,3],[7,0],[7,2],[9,2],[10,0],[10,2],[10,2],[10,2],[10,2],[10,1],[10,1],[10,1],[5,3],[5,5],[4,1],[4,1],[4,1],[21,1],[22,1],[25,1],[23,1]],performAction:function(t,e,n,r,i,a,o){var s=a.length-1;switch(i){case 4:r.setShowData(!0);break;case 7:this.$=a[s-1];break;case 9:r.addSection(a[s-1],r.cleanupValue(a[s]));break;case 10:this.$=a[s].trim(),r.setDiagramTitle(this.$);break;case 11:this.$=a[s].trim(),r.setAccTitle(this.$);break;case 12:case 13:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 14:r.addSection(a[s].substr(8)),this.$=a[s].substr(8);break;case 21:r.parseDirective(\"%%{\",\"open_directive\");break;case 22:r.parseDirective(a[s],\"type_directive\");break;case 23:a[s]=a[s].trim().replace(/'/g,'\"'),r.parseDirective(a[s],\"arg_directive\");break;case 24:r.parseDirective(\"}%%\",\"close_directive\",\"pie\");}},table:[{3:1,4:2,5:3,6:e,21:8,26:n,27:r,28:i,29:a},{1:[3]},{3:10,4:2,5:3,6:e,21:8,26:n,27:r,28:i,29:a},{3:11,4:2,5:3,6:e,21:8,26:n,27:r,28:i,29:a},t(o,s,{7:12,8:[1,13]}),t(c,[2,18]),t(c,[2,19]),t(c,[2,20]),{22:14,30:[1,15]},{30:[2,21]},{1:[2,1]},{1:[2,2]},t(l,u,{21:8,9:16,10:17,5:24,1:[2,3],11:h,13:f,15:d,17:p,19:g,20:y,29:a}),t(o,s,{7:25}),{23:26,24:[1,27],32:m},t([24,32],[2,22]),t(o,[2,6]),{4:29,26:n,27:r,28:i},{12:[1,30]},{14:[1,31]},{16:[1,32]},{18:[1,33]},t(l,[2,13]),t(l,[2,14]),t(l,[2,15]),t(l,u,{21:8,9:16,10:17,5:24,1:[2,4],11:h,13:f,15:d,17:p,19:g,20:y,29:a}),t(b,[2,16]),{25:34,31:[1,35]},t(b,[2,24]),t(o,[2,7]),t(l,[2,9]),t(l,[2,10]),t(l,[2,11]),t(l,[2,12]),{23:36,32:m},{32:[2,23]},t(b,[2,17])],defaultActions:{9:[2,21],10:[2,1],11:[2,2],35:[2,23]},parseError:function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t);},parse:function(t){var e=this,n=[0],r=[],i=[null],a=[],o=this.table,s=\"\",c=0,l=0,u=0,h=2,f=1,d=a.slice.call(arguments,1),p=Object.create(this.lexer),g={yy:{}};for(var y in this.yy)Object.prototype.hasOwnProperty.call(this.yy,y)&&(g.yy[y]=this.yy[y]);p.setInput(t,g.yy),g.yy.lexer=p,g.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var m=p.yylloc;a.push(m);var b=p.options&&p.options.ranges;function v(){var t;return \"number\"!=typeof(t=r.pop()||p.lex()||f)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}\"function\"==typeof g.yy.parseError?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var _,x,k,w,T,E,C,S,A,M={};;){if(k=n[n.length-1],this.defaultActions[k]?w=this.defaultActions[k]:(null==_&&(_=v()),w=o[k]&&o[k][_]),void 0===w||!w.length||!w[0]){var N=\"\";for(E in A=[],o[k])this.terminals_[E]&&E>h&&A.push(\"'\"+this.terminals_[E]+\"'\");N=p.showPosition?\"Parse error on line \"+(c+1)+\":\\n\"+p.showPosition()+\"\\nExpecting \"+A.join(\", \")+\", got '\"+(this.terminals_[_]||_)+\"'\":\"Parse error on line \"+(c+1)+\": Unexpected \"+(_==f?\"end of input\":\"'\"+(this.terminals_[_]||_)+\"'\"),this.parseError(N,{text:p.match,token:this.terminals_[_]||_,line:p.yylineno,loc:m,expected:A});}if(w[0]instanceof Array&&w.length>1)throw new Error(\"Parse Error: multiple actions possible at state: \"+k+\", token: \"+_);switch(w[0]){case 1:n.push(_),i.push(p.yytext),a.push(p.yylloc),n.push(w[1]),_=null,x?(_=x,x=null):(l=p.yyleng,s=p.yytext,c=p.yylineno,m=p.yylloc,u>0&&u--);break;case 2:if(C=this.productions_[w[1]][1],M.$=i[i.length-C],M._$={first_line:a[a.length-(C||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(C||1)].first_column,last_column:a[a.length-1].last_column},b&&(M._$.range=[a[a.length-(C||1)].range[0],a[a.length-1].range[1]]),void 0!==(T=this.performAction.apply(M,[s,l,c,g.yy,w[1],i,a].concat(d))))return T;C&&(n=n.slice(0,-1*C*2),i=i.slice(0,-1*C),a=a.slice(0,-1*C)),n.push(this.productions_[w[1]][0]),i.push(M.$),a.push(M._$),S=o[n[n.length-2]][n[n.length-1]],n.push(S);break;case 3:return !0}}return !0}},_={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e);},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=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.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\\r\\n?|\\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\\r\\n?|\\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\\r\\n?|\\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError(\"Lexical error on line \"+(this.yylineno+1)+\". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\\n\"+this.showPosition(),{text:\"\",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t));},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return (t.length>20?\"...\":\"\")+t.substr(-20).replace(/\\n/g,\"\")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?\"...\":\"\")).replace(/\\n/g,\"\")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join(\"-\");return t+this.upcomingInput()+\"\\n\"+e+\"^\"},test_match:function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\\r\\n?|\\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\\r?\\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return !1}return !1},next:function(){if(this.done)return this.EOF;var t,e,n,r;this._input||(this.done=!0),this._more||(this.yytext=\"\",this.match=\"\");for(var i=this._currentRules(),a=0;a<i.length;a++)if((n=this._input.match(this.rules[i[a]]))&&(!e||n[0].length>e[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,i[a])))return t;if(this._backtrack){e=!1;continue}return !1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[r]))&&t:\"\"===this._input?this.EOF:this.parseError(\"Lexical error on line \"+(this.yylineno+1)+\". Unrecognized text.\\n\"+this.showPosition(),{text:\"\",token:null,line:this.yylineno})},lex:function(){return this.next()||this.lex()},begin:function(t){this.conditionStack.push(t);},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return (t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:\"INITIAL\"},pushState:function(t){this.begin(t);},stateStackSize:function(){return this.conditionStack.length},options:{\"case-insensitive\":!0},performAction:function(t,e,n,r){switch(n){case 0:return this.begin(\"open_directive\"),29;case 1:return this.begin(\"type_directive\"),30;case 2:return this.popState(),this.begin(\"arg_directive\"),24;case 3:return this.popState(),this.popState(),32;case 4:return 31;case 5:case 6:case 8:case 9:break;case 7:return 26;case 10:return this.begin(\"title\"),13;case 11:return this.popState(),\"title_value\";case 12:return this.begin(\"acc_title\"),15;case 13:return this.popState(),\"acc_title_value\";case 14:return this.begin(\"acc_descr\"),17;case 15:return this.popState(),\"acc_descr_value\";case 16:this.begin(\"acc_descr_multiline\");break;case 17:case 20:this.popState();break;case 18:return \"acc_descr_multiline_value\";case 19:this.begin(\"string\");break;case 21:return \"txt\";case 22:return 6;case 23:return 8;case 24:return \"value\";case 25:return 28}},rules:[/^(?:%%\\{)/i,/^(?:((?:(?!\\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\\}%%)/i,/^(?:((?:(?!\\}%%).|\\n)*))/i,/^(?:%%(?!\\{)[^\\n]*)/i,/^(?:[^\\}]%%[^\\n]*)/i,/^(?:[\\n\\r]+)/i,/^(?:%%[^\\n]*)/i,/^(?:[\\s]+)/i,/^(?:title\\b)/i,/^(?:(?!\\n||)*[^\\n]*)/i,/^(?:accTitle\\s*:\\s*)/i,/^(?:(?!\\n||)*[^\\n]*)/i,/^(?:accDescr\\s*:\\s*)/i,/^(?:(?!\\n||)*[^\\n]*)/i,/^(?:accDescr\\s*\\{\\s*)/i,/^(?:[\\}])/i,/^(?:[^\\}]*)/i,/^(?:[\"])/i,/^(?:[\"])/i,/^(?:[^\"]*)/i,/^(?:pie\\b)/i,/^(?:showData\\b)/i,/^(?::[\\s]*[\\d]+(?:\\.[\\d]+)?)/i,/^(?:$)/i],conditions:{acc_descr_multiline:{rules:[17,18],inclusive:!1},acc_descr:{rules:[15],inclusive:!1},acc_title:{rules:[13],inclusive:!1},close_directive:{rules:[],inclusive:!1},arg_directive:{rules:[3,4],inclusive:!1},type_directive:{rules:[2,3],inclusive:!1},open_directive:{rules:[1],inclusive:!1},title:{rules:[11],inclusive:!1},string:{rules:[20,21],inclusive:!1},INITIAL:{rules:[0,5,6,7,8,9,10,12,14,16,19,22,23,24,25],inclusive:!0}}};function x(){this.yy={};}return v.lexer=_,x.prototype=v,v.Parser=x,new x}();e.parser=r,e.Parser=r.Parser,e.parse=function(){return r.parse.apply(r,arguments)},e.main=function(t){t[1]||(console.log(\"Usage: \"+t[0]+\" FILE\"),process.exit(1));var r=n(4551).readFileSync(n(6470).normalize(t[1]),\"utf8\");return e.parser.parse(r)},n.c[n.s]===t&&e.main(process.argv.slice(1));},3176:(t,e,n)=>{t=n.nmd(t);var r=function(){var t=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},e=[1,3],n=[1,5],r=[1,6],i=[1,7],a=[1,8],o=[5,6,8,14,16,18,19,40,41,42,43,44,45,53,71,72],s=[1,22],c=[2,13],l=[1,26],u=[1,27],h=[1,28],f=[1,29],d=[1,30],p=[1,31],g=[1,24],y=[1,32],m=[1,33],b=[1,36],v=[71,72],_=[5,8,14,16,18,19,40,41,42,43,44,45,53,60,62,71,72],x=[1,56],k=[1,57],w=[1,58],T=[1,59],E=[1,60],C=[1,61],S=[1,62],A=[62,63],M=[1,74],N=[1,70],O=[1,71],D=[1,72],B=[1,73],L=[1,75],I=[1,79],F=[1,80],R=[1,77],P=[1,78],j=[5,8,14,16,18,19,40,41,42,43,44,45,53,71,72],z={trace:function(){},yy:{},symbols_:{error:2,start:3,directive:4,NEWLINE:5,RD:6,diagram:7,EOF:8,openDirective:9,typeDirective:10,closeDirective:11,\":\":12,argDirective:13,acc_title:14,acc_title_value:15,acc_descr:16,acc_descr_value:17,acc_descr_multiline_value:18,open_directive:19,type_directive:20,arg_directive:21,close_directive:22,requirementDef:23,elementDef:24,relationshipDef:25,requirementType:26,requirementName:27,STRUCT_START:28,requirementBody:29,ID:30,COLONSEP:31,id:32,TEXT:33,text:34,RISK:35,riskLevel:36,VERIFYMTHD:37,verifyType:38,STRUCT_STOP:39,REQUIREMENT:40,FUNCTIONAL_REQUIREMENT:41,INTERFACE_REQUIREMENT:42,PERFORMANCE_REQUIREMENT:43,PHYSICAL_REQUIREMENT:44,DESIGN_CONSTRAINT:45,LOW_RISK:46,MED_RISK:47,HIGH_RISK:48,VERIFY_ANALYSIS:49,VERIFY_DEMONSTRATION:50,VERIFY_INSPECTION:51,VERIFY_TEST:52,ELEMENT:53,elementName:54,elementBody:55,TYPE:56,type:57,DOCREF:58,ref:59,END_ARROW_L:60,relationship:61,LINE:62,END_ARROW_R:63,CONTAINS:64,COPIES:65,DERIVES:66,SATISFIES:67,VERIFIES:68,REFINES:69,TRACES:70,unqString:71,qString:72,$accept:0,$end:1},terminals_:{2:\"error\",5:\"NEWLINE\",6:\"RD\",8:\"EOF\",12:\":\",14:\"acc_title\",15:\"acc_title_value\",16:\"acc_descr\",17:\"acc_descr_value\",18:\"acc_descr_multiline_value\",19:\"open_directive\",20:\"type_directive\",21:\"arg_directive\",22:\"close_directive\",28:\"STRUCT_START\",30:\"ID\",31:\"COLONSEP\",33:\"TEXT\",35:\"RISK\",37:\"VERIFYMTHD\",39:\"STRUCT_STOP\",40:\"REQUIREMENT\",41:\"FUNCTIONAL_REQUIREMENT\",42:\"INTERFACE_REQUIREMENT\",43:\"PERFORMANCE_REQUIREMENT\",44:\"PHYSICAL_REQUIREMENT\",45:\"DESIGN_CONSTRAINT\",46:\"LOW_RISK\",47:\"MED_RISK\",48:\"HIGH_RISK\",49:\"VERIFY_ANALYSIS\",50:\"VERIFY_DEMONSTRATION\",51:\"VERIFY_INSPECTION\",52:\"VERIFY_TEST\",53:\"ELEMENT\",56:\"TYPE\",58:\"DOCREF\",60:\"END_ARROW_L\",62:\"LINE\",63:\"END_ARROW_R\",64:\"CONTAINS\",65:\"COPIES\",66:\"DERIVES\",67:\"SATISFIES\",68:\"VERIFIES\",69:\"REFINES\",70:\"TRACES\",71:\"unqString\",72:\"qString\"},productions_:[0,[3,3],[3,2],[3,4],[4,3],[4,5],[4,2],[4,2],[4,1],[9,1],[10,1],[13,1],[11,1],[7,0],[7,2],[7,2],[7,2],[7,2],[7,2],[23,5],[29,5],[29,5],[29,5],[29,5],[29,2],[29,1],[26,1],[26,1],[26,1],[26,1],[26,1],[26,1],[36,1],[36,1],[36,1],[38,1],[38,1],[38,1],[38,1],[24,5],[55,5],[55,5],[55,2],[55,1],[25,5],[25,5],[61,1],[61,1],[61,1],[61,1],[61,1],[61,1],[61,1],[27,1],[27,1],[32,1],[32,1],[34,1],[34,1],[54,1],[54,1],[57,1],[57,1],[59,1],[59,1]],performAction:function(t,e,n,r,i,a,o){var s=a.length-1;switch(i){case 6:this.$=a[s].trim(),r.setAccTitle(this.$);break;case 7:case 8:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 9:r.parseDirective(\"%%{\",\"open_directive\");break;case 10:r.parseDirective(a[s],\"type_directive\");break;case 11:a[s]=a[s].trim().replace(/'/g,'\"'),r.parseDirective(a[s],\"arg_directive\");break;case 12:r.parseDirective(\"}%%\",\"close_directive\",\"pie\");break;case 13:this.$=[];break;case 19:r.addRequirement(a[s-3],a[s-4]);break;case 20:r.setNewReqId(a[s-2]);break;case 21:r.setNewReqText(a[s-2]);break;case 22:r.setNewReqRisk(a[s-2]);break;case 23:r.setNewReqVerifyMethod(a[s-2]);break;case 26:this.$=r.RequirementType.REQUIREMENT;break;case 27:this.$=r.RequirementType.FUNCTIONAL_REQUIREMENT;break;case 28:this.$=r.RequirementType.INTERFACE_REQUIREMENT;break;case 29:this.$=r.RequirementType.PERFORMANCE_REQUIREMENT;break;case 30:this.$=r.RequirementType.PHYSICAL_REQUIREMENT;break;case 31:this.$=r.RequirementType.DESIGN_CONSTRAINT;break;case 32:this.$=r.RiskLevel.LOW_RISK;break;case 33:this.$=r.RiskLevel.MED_RISK;break;case 34:this.$=r.RiskLevel.HIGH_RISK;break;case 35:this.$=r.VerifyType.VERIFY_ANALYSIS;break;case 36:this.$=r.VerifyType.VERIFY_DEMONSTRATION;break;case 37:this.$=r.VerifyType.VERIFY_INSPECTION;break;case 38:this.$=r.VerifyType.VERIFY_TEST;break;case 39:r.addElement(a[s-3]);break;case 40:r.setNewElementType(a[s-2]);break;case 41:r.setNewElementDocRef(a[s-2]);break;case 44:r.addRelationship(a[s-2],a[s],a[s-4]);break;case 45:r.addRelationship(a[s-2],a[s-4],a[s]);break;case 46:this.$=r.Relationships.CONTAINS;break;case 47:this.$=r.Relationships.COPIES;break;case 48:this.$=r.Relationships.DERIVES;break;case 49:this.$=r.Relationships.SATISFIES;break;case 50:this.$=r.Relationships.VERIFIES;break;case 51:this.$=r.Relationships.REFINES;break;case 52:this.$=r.Relationships.TRACES;}},table:[{3:1,4:2,6:e,9:4,14:n,16:r,18:i,19:a},{1:[3]},{3:10,4:2,5:[1,9],6:e,9:4,14:n,16:r,18:i,19:a},{5:[1,11]},{10:12,20:[1,13]},{15:[1,14]},{17:[1,15]},t(o,[2,8]),{20:[2,9]},{3:16,4:2,6:e,9:4,14:n,16:r,18:i,19:a},{1:[2,2]},{4:21,5:s,7:17,8:c,9:4,14:n,16:r,18:i,19:a,23:18,24:19,25:20,26:23,32:25,40:l,41:u,42:h,43:f,44:d,45:p,53:g,71:y,72:m},{11:34,12:[1,35],22:b},t([12,22],[2,10]),t(o,[2,6]),t(o,[2,7]),{1:[2,1]},{8:[1,37]},{4:21,5:s,7:38,8:c,9:4,14:n,16:r,18:i,19:a,23:18,24:19,25:20,26:23,32:25,40:l,41:u,42:h,43:f,44:d,45:p,53:g,71:y,72:m},{4:21,5:s,7:39,8:c,9:4,14:n,16:r,18:i,19:a,23:18,24:19,25:20,26:23,32:25,40:l,41:u,42:h,43:f,44:d,45:p,53:g,71:y,72:m},{4:21,5:s,7:40,8:c,9:4,14:n,16:r,18:i,19:a,23:18,24:19,25:20,26:23,32:25,40:l,41:u,42:h,43:f,44:d,45:p,53:g,71:y,72:m},{4:21,5:s,7:41,8:c,9:4,14:n,16:r,18:i,19:a,23:18,24:19,25:20,26:23,32:25,40:l,41:u,42:h,43:f,44:d,45:p,53:g,71:y,72:m},{4:21,5:s,7:42,8:c,9:4,14:n,16:r,18:i,19:a,23:18,24:19,25:20,26:23,32:25,40:l,41:u,42:h,43:f,44:d,45:p,53:g,71:y,72:m},{27:43,71:[1,44],72:[1,45]},{54:46,71:[1,47],72:[1,48]},{60:[1,49],62:[1,50]},t(v,[2,26]),t(v,[2,27]),t(v,[2,28]),t(v,[2,29]),t(v,[2,30]),t(v,[2,31]),t(_,[2,55]),t(_,[2,56]),t(o,[2,4]),{13:51,21:[1,52]},t(o,[2,12]),{1:[2,3]},{8:[2,14]},{8:[2,15]},{8:[2,16]},{8:[2,17]},{8:[2,18]},{28:[1,53]},{28:[2,53]},{28:[2,54]},{28:[1,54]},{28:[2,59]},{28:[2,60]},{61:55,64:x,65:k,66:w,67:T,68:E,69:C,70:S},{61:63,64:x,65:k,66:w,67:T,68:E,69:C,70:S},{11:64,22:b},{22:[2,11]},{5:[1,65]},{5:[1,66]},{62:[1,67]},t(A,[2,46]),t(A,[2,47]),t(A,[2,48]),t(A,[2,49]),t(A,[2,50]),t(A,[2,51]),t(A,[2,52]),{63:[1,68]},t(o,[2,5]),{5:M,29:69,30:N,33:O,35:D,37:B,39:L},{5:I,39:F,55:76,56:R,58:P},{32:81,71:y,72:m},{32:82,71:y,72:m},t(j,[2,19]),{31:[1,83]},{31:[1,84]},{31:[1,85]},{31:[1,86]},{5:M,29:87,30:N,33:O,35:D,37:B,39:L},t(j,[2,25]),t(j,[2,39]),{31:[1,88]},{31:[1,89]},{5:I,39:F,55:90,56:R,58:P},t(j,[2,43]),t(j,[2,44]),t(j,[2,45]),{32:91,71:y,72:m},{34:92,71:[1,93],72:[1,94]},{36:95,46:[1,96],47:[1,97],48:[1,98]},{38:99,49:[1,100],50:[1,101],51:[1,102],52:[1,103]},t(j,[2,24]),{57:104,71:[1,105],72:[1,106]},{59:107,71:[1,108],72:[1,109]},t(j,[2,42]),{5:[1,110]},{5:[1,111]},{5:[2,57]},{5:[2,58]},{5:[1,112]},{5:[2,32]},{5:[2,33]},{5:[2,34]},{5:[1,113]},{5:[2,35]},{5:[2,36]},{5:[2,37]},{5:[2,38]},{5:[1,114]},{5:[2,61]},{5:[2,62]},{5:[1,115]},{5:[2,63]},{5:[2,64]},{5:M,29:116,30:N,33:O,35:D,37:B,39:L},{5:M,29:117,30:N,33:O,35:D,37:B,39:L},{5:M,29:118,30:N,33:O,35:D,37:B,39:L},{5:M,29:119,30:N,33:O,35:D,37:B,39:L},{5:I,39:F,55:120,56:R,58:P},{5:I,39:F,55:121,56:R,58:P},t(j,[2,20]),t(j,[2,21]),t(j,[2,22]),t(j,[2,23]),t(j,[2,40]),t(j,[2,41])],defaultActions:{8:[2,9],10:[2,2],16:[2,1],37:[2,3],38:[2,14],39:[2,15],40:[2,16],41:[2,17],42:[2,18],44:[2,53],45:[2,54],47:[2,59],48:[2,60],52:[2,11],93:[2,57],94:[2,58],96:[2,32],97:[2,33],98:[2,34],100:[2,35],101:[2,36],102:[2,37],103:[2,38],105:[2,61],106:[2,62],108:[2,63],109:[2,64]},parseError:function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t);},parse:function(t){var e=this,n=[0],r=[],i=[null],a=[],o=this.table,s=\"\",c=0,l=0,u=0,h=2,f=1,d=a.slice.call(arguments,1),p=Object.create(this.lexer),g={yy:{}};for(var y in this.yy)Object.prototype.hasOwnProperty.call(this.yy,y)&&(g.yy[y]=this.yy[y]);p.setInput(t,g.yy),g.yy.lexer=p,g.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var m=p.yylloc;a.push(m);var b=p.options&&p.options.ranges;function v(){var t;return \"number\"!=typeof(t=r.pop()||p.lex()||f)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}\"function\"==typeof g.yy.parseError?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var _,x,k,w,T,E,C,S,A,M={};;){if(k=n[n.length-1],this.defaultActions[k]?w=this.defaultActions[k]:(null==_&&(_=v()),w=o[k]&&o[k][_]),void 0===w||!w.length||!w[0]){var N=\"\";for(E in A=[],o[k])this.terminals_[E]&&E>h&&A.push(\"'\"+this.terminals_[E]+\"'\");N=p.showPosition?\"Parse error on line \"+(c+1)+\":\\n\"+p.showPosition()+\"\\nExpecting \"+A.join(\", \")+\", got '\"+(this.terminals_[_]||_)+\"'\":\"Parse error on line \"+(c+1)+\": Unexpected \"+(_==f?\"end of input\":\"'\"+(this.terminals_[_]||_)+\"'\"),this.parseError(N,{text:p.match,token:this.terminals_[_]||_,line:p.yylineno,loc:m,expected:A});}if(w[0]instanceof Array&&w.length>1)throw new Error(\"Parse Error: multiple actions possible at state: \"+k+\", token: \"+_);switch(w[0]){case 1:n.push(_),i.push(p.yytext),a.push(p.yylloc),n.push(w[1]),_=null,x?(_=x,x=null):(l=p.yyleng,s=p.yytext,c=p.yylineno,m=p.yylloc,u>0&&u--);break;case 2:if(C=this.productions_[w[1]][1],M.$=i[i.length-C],M._$={first_line:a[a.length-(C||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(C||1)].first_column,last_column:a[a.length-1].last_column},b&&(M._$.range=[a[a.length-(C||1)].range[0],a[a.length-1].range[1]]),void 0!==(T=this.performAction.apply(M,[s,l,c,g.yy,w[1],i,a].concat(d))))return T;C&&(n=n.slice(0,-1*C*2),i=i.slice(0,-1*C),a=a.slice(0,-1*C)),n.push(this.productions_[w[1]][0]),i.push(M.$),a.push(M._$),S=o[n[n.length-2]][n[n.length-1]],n.push(S);break;case 3:return !0}}return !0}},Y={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e);},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=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.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\\r\\n?|\\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\\r\\n?|\\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\\r\\n?|\\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError(\"Lexical error on line \"+(this.yylineno+1)+\". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\\n\"+this.showPosition(),{text:\"\",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t));},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return (t.length>20?\"...\":\"\")+t.substr(-20).replace(/\\n/g,\"\")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?\"...\":\"\")).replace(/\\n/g,\"\")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join(\"-\");return t+this.upcomingInput()+\"\\n\"+e+\"^\"},test_match:function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\\r\\n?|\\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\\r?\\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return !1}return !1},next:function(){if(this.done)return this.EOF;var t,e,n,r;this._input||(this.done=!0),this._more||(this.yytext=\"\",this.match=\"\");for(var i=this._currentRules(),a=0;a<i.length;a++)if((n=this._input.match(this.rules[i[a]]))&&(!e||n[0].length>e[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,i[a])))return t;if(this._backtrack){e=!1;continue}return !1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[r]))&&t:\"\"===this._input?this.EOF:this.parseError(\"Lexical error on line \"+(this.yylineno+1)+\". Unrecognized text.\\n\"+this.showPosition(),{text:\"\",token:null,line:this.yylineno})},lex:function(){return this.next()||this.lex()},begin:function(t){this.conditionStack.push(t);},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return (t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:\"INITIAL\"},pushState:function(t){this.begin(t);},stateStackSize:function(){return this.conditionStack.length},options:{\"case-insensitive\":!0},performAction:function(t,e,n,r){switch(n){case 0:return this.begin(\"open_directive\"),19;case 1:return this.begin(\"type_directive\"),20;case 2:return this.popState(),this.begin(\"arg_directive\"),12;case 3:return this.popState(),this.popState(),22;case 4:return 21;case 5:return \"title\";case 6:return this.begin(\"acc_title\"),14;case 7:return this.popState(),\"acc_title_value\";case 8:return this.begin(\"acc_descr\"),16;case 9:return this.popState(),\"acc_descr_value\";case 10:this.begin(\"acc_descr_multiline\");break;case 11:case 53:this.popState();break;case 12:return \"acc_descr_multiline_value\";case 13:return 5;case 14:case 15:case 16:break;case 17:return 8;case 18:return 6;case 19:return 28;case 20:return 39;case 21:return 31;case 22:return 30;case 23:return 33;case 24:return 35;case 25:return 37;case 26:return 40;case 27:return 41;case 28:return 42;case 29:return 43;case 30:return 44;case 31:return 45;case 32:return 46;case 33:return 47;case 34:return 48;case 35:return 49;case 36:return 50;case 37:return 51;case 38:return 52;case 39:return 53;case 40:return 64;case 41:return 65;case 42:return 66;case 43:return 67;case 44:return 68;case 45:return 69;case 46:return 70;case 47:return 56;case 48:return 58;case 49:return 60;case 50:return 63;case 51:return 62;case 52:this.begin(\"string\");break;case 54:return \"qString\";case 55:return e.yytext=e.yytext.trim(),71}},rules:[/^(?:%%\\{)/i,/^(?:((?:(?!\\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\\}%%)/i,/^(?:((?:(?!\\}%%).|\\n)*))/i,/^(?:title\\s[^#\\n;]+)/i,/^(?:accTitle\\s*:\\s*)/i,/^(?:(?!\\n||)*[^\\n]*)/i,/^(?:accDescr\\s*:\\s*)/i,/^(?:(?!\\n||)*[^\\n]*)/i,/^(?:accDescr\\s*\\{\\s*)/i,/^(?:[\\}])/i,/^(?:[^\\}]*)/i,/^(?:(\\r?\\n)+)/i,/^(?:\\s+)/i,/^(?:#[^\\n]*)/i,/^(?:%[^\\n]*)/i,/^(?:$)/i,/^(?:requirementDiagram\\b)/i,/^(?:\\{)/i,/^(?:\\})/i,/^(?::)/i,/^(?:id\\b)/i,/^(?:text\\b)/i,/^(?:risk\\b)/i,/^(?:verifyMethod\\b)/i,/^(?:requirement\\b)/i,/^(?:functionalRequirement\\b)/i,/^(?:interfaceRequirement\\b)/i,/^(?:performanceRequirement\\b)/i,/^(?:physicalRequirement\\b)/i,/^(?:designConstraint\\b)/i,/^(?:low\\b)/i,/^(?:medium\\b)/i,/^(?:high\\b)/i,/^(?:analysis\\b)/i,/^(?:demonstration\\b)/i,/^(?:inspection\\b)/i,/^(?:test\\b)/i,/^(?:element\\b)/i,/^(?:contains\\b)/i,/^(?:copies\\b)/i,/^(?:derives\\b)/i,/^(?:satisfies\\b)/i,/^(?:verifies\\b)/i,/^(?:refines\\b)/i,/^(?:traces\\b)/i,/^(?:type\\b)/i,/^(?:docref\\b)/i,/^(?:<-)/i,/^(?:->)/i,/^(?:-)/i,/^(?:[\"])/i,/^(?:[\"])/i,/^(?:[^\"]*)/i,/^(?:[\\w][^\\r\\n\\{\\<\\>\\-\\=]*)/i],conditions:{acc_descr_multiline:{rules:[11,12],inclusive:!1},acc_descr:{rules:[9],inclusive:!1},acc_title:{rules:[7],inclusive:!1},close_directive:{rules:[],inclusive:!1},arg_directive:{rules:[3,4],inclusive:!1},type_directive:{rules:[2,3],inclusive:!1},open_directive:{rules:[1],inclusive:!1},unqString:{rules:[],inclusive:!1},token:{rules:[],inclusive:!1},string:{rules:[53,54],inclusive:!1},INITIAL:{rules:[0,5,6,8,10,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,55],inclusive:!0}}};function U(){this.yy={};}return z.lexer=Y,U.prototype=z,z.Parser=U,new U}();e.parser=r,e.Parser=r.Parser,e.parse=function(){return r.parse.apply(r,arguments)},e.main=function(t){t[1]||(console.log(\"Usage: \"+t[0]+\" FILE\"),process.exit(1));var r=n(8800).readFileSync(n(6470).normalize(t[1]),\"utf8\");return e.parser.parse(r)},n.c[n.s]===t&&e.main(process.argv.slice(1));},6876:(t,e,n)=>{t=n.nmd(t);var r=function(){var t=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},e=[1,2],n=[1,3],r=[1,5],i=[1,7],a=[2,5],o=[1,15],s=[1,17],c=[1,18],l=[1,19],u=[1,21],h=[1,22],f=[1,23],d=[1,29],p=[1,30],g=[1,31],y=[1,32],m=[1,33],b=[1,34],v=[1,35],_=[1,36],x=[1,37],k=[1,38],w=[1,39],T=[1,40],E=[1,43],C=[1,44],S=[1,45],A=[1,46],M=[1,47],N=[1,48],O=[1,51],D=[1,4,5,16,20,22,25,26,32,33,34,36,38,39,40,41,42,43,45,47,49,50,51,52,53,58,59,60,61,69,79],B=[4,5,16,20,22,25,26,32,33,34,36,38,39,40,41,42,43,45,47,49,53,58,59,60,61,69,79],L=[4,5,16,20,22,25,26,32,33,34,36,38,39,40,41,42,43,45,47,49,52,53,58,59,60,61,69,79],I=[4,5,16,20,22,25,26,32,33,34,36,38,39,40,41,42,43,45,47,49,51,53,58,59,60,61,69,79],F=[4,5,16,20,22,25,26,32,33,34,36,38,39,40,41,42,43,45,47,49,50,53,58,59,60,61,69,79],R=[67,68,69],P=[1,121],j=[1,4,5,7,16,20,22,25,26,32,33,34,36,38,39,40,41,42,43,45,47,49,50,51,52,53,58,59,60,61,69,79],z={trace:function(){},yy:{},symbols_:{error:2,start:3,SPACE:4,NEWLINE:5,directive:6,SD:7,document:8,line:9,statement:10,openDirective:11,typeDirective:12,closeDirective:13,\":\":14,argDirective:15,participant:16,actor:17,AS:18,restOfLine:19,participant_actor:20,signal:21,autonumber:22,NUM:23,off:24,activate:25,deactivate:26,note_statement:27,links_statement:28,link_statement:29,properties_statement:30,details_statement:31,title:32,legacy_title:33,acc_title:34,acc_title_value:35,acc_descr:36,acc_descr_value:37,acc_descr_multiline_value:38,loop:39,end:40,rect:41,opt:42,alt:43,else_sections:44,par:45,par_sections:46,critical:47,option_sections:48,break:49,option:50,and:51,else:52,note:53,placement:54,text2:55,over:56,actor_pair:57,links:58,link:59,properties:60,details:61,spaceList:62,\",\":63,left_of:64,right_of:65,signaltype:66,\"+\":67,\"-\":68,ACTOR:69,SOLID_OPEN_ARROW:70,DOTTED_OPEN_ARROW:71,SOLID_ARROW:72,DOTTED_ARROW:73,SOLID_CROSS:74,DOTTED_CROSS:75,SOLID_POINT:76,DOTTED_POINT:77,TXT:78,open_directive:79,type_directive:80,arg_directive:81,close_directive:82,$accept:0,$end:1},terminals_:{2:\"error\",4:\"SPACE\",5:\"NEWLINE\",7:\"SD\",14:\":\",16:\"participant\",18:\"AS\",19:\"restOfLine\",20:\"participant_actor\",22:\"autonumber\",23:\"NUM\",24:\"off\",25:\"activate\",26:\"deactivate\",32:\"title\",33:\"legacy_title\",34:\"acc_title\",35:\"acc_title_value\",36:\"acc_descr\",37:\"acc_descr_value\",38:\"acc_descr_multiline_value\",39:\"loop\",40:\"end\",41:\"rect\",42:\"opt\",43:\"alt\",45:\"par\",47:\"critical\",49:\"break\",50:\"option\",51:\"and\",52:\"else\",53:\"note\",56:\"over\",58:\"links\",59:\"link\",60:\"properties\",61:\"details\",63:\",\",64:\"left_of\",65:\"right_of\",67:\"+\",68:\"-\",69:\"ACTOR\",70:\"SOLID_OPEN_ARROW\",71:\"DOTTED_OPEN_ARROW\",72:\"SOLID_ARROW\",73:\"DOTTED_ARROW\",74:\"SOLID_CROSS\",75:\"DOTTED_CROSS\",76:\"SOLID_POINT\",77:\"DOTTED_POINT\",78:\"TXT\",79:\"open_directive\",80:\"type_directive\",81:\"arg_directive\",82:\"close_directive\"},productions_:[0,[3,2],[3,2],[3,2],[3,2],[8,0],[8,2],[9,2],[9,1],[9,1],[6,4],[6,6],[10,5],[10,3],[10,5],[10,3],[10,2],[10,4],[10,3],[10,3],[10,2],[10,3],[10,3],[10,2],[10,2],[10,2],[10,2],[10,2],[10,1],[10,1],[10,2],[10,2],[10,1],[10,4],[10,4],[10,4],[10,4],[10,4],[10,4],[10,4],[10,1],[48,1],[48,4],[46,1],[46,4],[44,1],[44,4],[27,4],[27,4],[28,3],[29,3],[30,3],[31,3],[62,2],[62,1],[57,3],[57,1],[54,1],[54,1],[21,5],[21,5],[21,4],[17,1],[66,1],[66,1],[66,1],[66,1],[66,1],[66,1],[66,1],[66,1],[55,1],[11,1],[12,1],[15,1],[13,1]],performAction:function(t,e,n,r,i,a,o){var s=a.length-1;switch(i){case 4:return r.apply(a[s]),a[s];case 5:case 9:this.$=[];break;case 6:a[s-1].push(a[s]),this.$=a[s-1];break;case 7:case 8:case 56:this.$=a[s];break;case 12:a[s-3].type=\"addParticipant\",a[s-3].description=r.parseMessage(a[s-1]),this.$=a[s-3];break;case 13:a[s-1].type=\"addParticipant\",this.$=a[s-1];break;case 14:a[s-3].type=\"addActor\",a[s-3].description=r.parseMessage(a[s-1]),this.$=a[s-3];break;case 15:a[s-1].type=\"addActor\",this.$=a[s-1];break;case 17:this.$={type:\"sequenceIndex\",sequenceIndex:Number(a[s-2]),sequenceIndexStep:Number(a[s-1]),sequenceVisible:!0,signalType:r.LINETYPE.AUTONUMBER};break;case 18:this.$={type:\"sequenceIndex\",sequenceIndex:Number(a[s-1]),sequenceIndexStep:1,sequenceVisible:!0,signalType:r.LINETYPE.AUTONUMBER};break;case 19:this.$={type:\"sequenceIndex\",sequenceVisible:!1,signalType:r.LINETYPE.AUTONUMBER};break;case 20:this.$={type:\"sequenceIndex\",sequenceVisible:!0,signalType:r.LINETYPE.AUTONUMBER};break;case 21:this.$={type:\"activeStart\",signalType:r.LINETYPE.ACTIVE_START,actor:a[s-1]};break;case 22:this.$={type:\"activeEnd\",signalType:r.LINETYPE.ACTIVE_END,actor:a[s-1]};break;case 28:r.setDiagramTitle(a[s].substring(6)),this.$=a[s].substring(6);break;case 29:r.setDiagramTitle(a[s].substring(7)),this.$=a[s].substring(7);break;case 30:this.$=a[s].trim(),r.setAccTitle(this.$);break;case 31:case 32:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 33:a[s-1].unshift({type:\"loopStart\",loopText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.LOOP_START}),a[s-1].push({type:\"loopEnd\",loopText:a[s-2],signalType:r.LINETYPE.LOOP_END}),this.$=a[s-1];break;case 34:a[s-1].unshift({type:\"rectStart\",color:r.parseMessage(a[s-2]),signalType:r.LINETYPE.RECT_START}),a[s-1].push({type:\"rectEnd\",color:r.parseMessage(a[s-2]),signalType:r.LINETYPE.RECT_END}),this.$=a[s-1];break;case 35:a[s-1].unshift({type:\"optStart\",optText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.OPT_START}),a[s-1].push({type:\"optEnd\",optText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.OPT_END}),this.$=a[s-1];break;case 36:a[s-1].unshift({type:\"altStart\",altText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.ALT_START}),a[s-1].push({type:\"altEnd\",signalType:r.LINETYPE.ALT_END}),this.$=a[s-1];break;case 37:a[s-1].unshift({type:\"parStart\",parText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.PAR_START}),a[s-1].push({type:\"parEnd\",signalType:r.LINETYPE.PAR_END}),this.$=a[s-1];break;case 38:a[s-1].unshift({type:\"criticalStart\",criticalText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.CRITICAL_START}),a[s-1].push({type:\"criticalEnd\",signalType:r.LINETYPE.CRITICAL_END}),this.$=a[s-1];break;case 39:a[s-1].unshift({type:\"breakStart\",breakText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.BREAK_START}),a[s-1].push({type:\"breakEnd\",optText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.BREAK_END}),this.$=a[s-1];break;case 42:this.$=a[s-3].concat([{type:\"option\",optionText:r.parseMessage(a[s-1]),signalType:r.LINETYPE.CRITICAL_OPTION},a[s]]);break;case 44:this.$=a[s-3].concat([{type:\"and\",parText:r.parseMessage(a[s-1]),signalType:r.LINETYPE.PAR_AND},a[s]]);break;case 46:this.$=a[s-3].concat([{type:\"else\",altText:r.parseMessage(a[s-1]),signalType:r.LINETYPE.ALT_ELSE},a[s]]);break;case 47:this.$=[a[s-1],{type:\"addNote\",placement:a[s-2],actor:a[s-1].actor,text:a[s]}];break;case 48:a[s-2]=[].concat(a[s-1],a[s-1]).slice(0,2),a[s-2][0]=a[s-2][0].actor,a[s-2][1]=a[s-2][1].actor,this.$=[a[s-1],{type:\"addNote\",placement:r.PLACEMENT.OVER,actor:a[s-2].slice(0,2),text:a[s]}];break;case 49:this.$=[a[s-1],{type:\"addLinks\",actor:a[s-1].actor,text:a[s]}];break;case 50:this.$=[a[s-1],{type:\"addALink\",actor:a[s-1].actor,text:a[s]}];break;case 51:this.$=[a[s-1],{type:\"addProperties\",actor:a[s-1].actor,text:a[s]}];break;case 52:this.$=[a[s-1],{type:\"addDetails\",actor:a[s-1].actor,text:a[s]}];break;case 55:this.$=[a[s-2],a[s]];break;case 57:this.$=r.PLACEMENT.LEFTOF;break;case 58:this.$=r.PLACEMENT.RIGHTOF;break;case 59:this.$=[a[s-4],a[s-1],{type:\"addMessage\",from:a[s-4].actor,to:a[s-1].actor,signalType:a[s-3],msg:a[s]},{type:\"activeStart\",signalType:r.LINETYPE.ACTIVE_START,actor:a[s-1]}];break;case 60:this.$=[a[s-4],a[s-1],{type:\"addMessage\",from:a[s-4].actor,to:a[s-1].actor,signalType:a[s-3],msg:a[s]},{type:\"activeEnd\",signalType:r.LINETYPE.ACTIVE_END,actor:a[s-4]}];break;case 61:this.$=[a[s-3],a[s-1],{type:\"addMessage\",from:a[s-3].actor,to:a[s-1].actor,signalType:a[s-2],msg:a[s]}];break;case 62:this.$={type:\"addParticipant\",actor:a[s]};break;case 63:this.$=r.LINETYPE.SOLID_OPEN;break;case 64:this.$=r.LINETYPE.DOTTED_OPEN;break;case 65:this.$=r.LINETYPE.SOLID;break;case 66:this.$=r.LINETYPE.DOTTED;break;case 67:this.$=r.LINETYPE.SOLID_CROSS;break;case 68:this.$=r.LINETYPE.DOTTED_CROSS;break;case 69:this.$=r.LINETYPE.SOLID_POINT;break;case 70:this.$=r.LINETYPE.DOTTED_POINT;break;case 71:this.$=r.parseMessage(a[s].trim().substring(1));break;case 72:r.parseDirective(\"%%{\",\"open_directive\");break;case 73:r.parseDirective(a[s],\"type_directive\");break;case 74:a[s]=a[s].trim().replace(/'/g,'\"'),r.parseDirective(a[s],\"arg_directive\");break;case 75:r.parseDirective(\"}%%\",\"close_directive\",\"sequence\");}},table:[{3:1,4:e,5:n,6:4,7:r,11:6,79:i},{1:[3]},{3:8,4:e,5:n,6:4,7:r,11:6,79:i},{3:9,4:e,5:n,6:4,7:r,11:6,79:i},{3:10,4:e,5:n,6:4,7:r,11:6,79:i},t([1,4,5,16,20,22,25,26,32,33,34,36,38,39,41,42,43,45,47,49,53,58,59,60,61,69,79],a,{8:11}),{12:12,80:[1,13]},{80:[2,72]},{1:[2,1]},{1:[2,2]},{1:[2,3]},{1:[2,4],4:o,5:s,6:41,9:14,10:16,11:6,16:c,17:42,20:l,21:20,22:u,25:h,26:f,27:24,28:25,29:26,30:27,31:28,32:d,33:p,34:g,36:y,38:m,39:b,41:v,42:_,43:x,45:k,47:w,49:T,53:E,58:C,59:S,60:A,61:M,69:N,79:i},{13:49,14:[1,50],82:O},t([14,82],[2,73]),t(D,[2,6]),{6:41,10:52,11:6,16:c,17:42,20:l,21:20,22:u,25:h,26:f,27:24,28:25,29:26,30:27,31:28,32:d,33:p,34:g,36:y,38:m,39:b,41:v,42:_,43:x,45:k,47:w,49:T,53:E,58:C,59:S,60:A,61:M,69:N,79:i},t(D,[2,8]),t(D,[2,9]),{17:53,69:N},{17:54,69:N},{5:[1,55]},{5:[1,58],23:[1,56],24:[1,57]},{17:59,69:N},{17:60,69:N},{5:[1,61]},{5:[1,62]},{5:[1,63]},{5:[1,64]},{5:[1,65]},t(D,[2,28]),t(D,[2,29]),{35:[1,66]},{37:[1,67]},t(D,[2,32]),{19:[1,68]},{19:[1,69]},{19:[1,70]},{19:[1,71]},{19:[1,72]},{19:[1,73]},{19:[1,74]},t(D,[2,40]),{66:75,70:[1,76],71:[1,77],72:[1,78],73:[1,79],74:[1,80],75:[1,81],76:[1,82],77:[1,83]},{54:84,56:[1,85],64:[1,86],65:[1,87]},{17:88,69:N},{17:89,69:N},{17:90,69:N},{17:91,69:N},t([5,18,63,70,71,72,73,74,75,76,77,78],[2,62]),{5:[1,92]},{15:93,81:[1,94]},{5:[2,75]},t(D,[2,7]),{5:[1,96],18:[1,95]},{5:[1,98],18:[1,97]},t(D,[2,16]),{5:[1,100],23:[1,99]},{5:[1,101]},t(D,[2,20]),{5:[1,102]},{5:[1,103]},t(D,[2,23]),t(D,[2,24]),t(D,[2,25]),t(D,[2,26]),t(D,[2,27]),t(D,[2,30]),t(D,[2,31]),t(B,a,{8:104}),t(B,a,{8:105}),t(B,a,{8:106}),t(L,a,{44:107,8:108}),t(I,a,{46:109,8:110}),t(F,a,{48:111,8:112}),t(B,a,{8:113}),{17:116,67:[1,114],68:[1,115],69:N},t(R,[2,63]),t(R,[2,64]),t(R,[2,65]),t(R,[2,66]),t(R,[2,67]),t(R,[2,68]),t(R,[2,69]),t(R,[2,70]),{17:117,69:N},{17:119,57:118,69:N},{69:[2,57]},{69:[2,58]},{55:120,78:P},{55:122,78:P},{55:123,78:P},{55:124,78:P},t(j,[2,10]),{13:125,82:O},{82:[2,74]},{19:[1,126]},t(D,[2,13]),{19:[1,127]},t(D,[2,15]),{5:[1,128]},t(D,[2,18]),t(D,[2,19]),t(D,[2,21]),t(D,[2,22]),{4:o,5:s,6:41,9:14,10:16,11:6,16:c,17:42,20:l,21:20,22:u,25:h,26:f,27:24,28:25,29:26,30:27,31:28,32:d,33:p,34:g,36:y,38:m,39:b,40:[1,129],41:v,42:_,43:x,45:k,47:w,49:T,53:E,58:C,59:S,60:A,61:M,69:N,79:i},{4:o,5:s,6:41,9:14,10:16,11:6,16:c,17:42,20:l,21:20,22:u,25:h,26:f,27:24,28:25,29:26,30:27,31:28,32:d,33:p,34:g,36:y,38:m,39:b,40:[1,130],41:v,42:_,43:x,45:k,47:w,49:T,53:E,58:C,59:S,60:A,61:M,69:N,79:i},{4:o,5:s,6:41,9:14,10:16,11:6,16:c,17:42,20:l,21:20,22:u,25:h,26:f,27:24,28:25,29:26,30:27,31:28,32:d,33:p,34:g,36:y,38:m,39:b,40:[1,131],41:v,42:_,43:x,45:k,47:w,49:T,53:E,58:C,59:S,60:A,61:M,69:N,79:i},{40:[1,132]},{4:o,5:s,6:41,9:14,10:16,11:6,16:c,17:42,20:l,21:20,22:u,25:h,26:f,27:24,28:25,29:26,30:27,31:28,32:d,33:p,34:g,36:y,38:m,39:b,40:[2,45],41:v,42:_,43:x,45:k,47:w,49:T,52:[1,133],53:E,58:C,59:S,60:A,61:M,69:N,79:i},{40:[1,134]},{4:o,5:s,6:41,9:14,10:16,11:6,16:c,17:42,20:l,21:20,22:u,25:h,26:f,27:24,28:25,29:26,30:27,31:28,32:d,33:p,34:g,36:y,38:m,39:b,40:[2,43],41:v,42:_,43:x,45:k,47:w,49:T,51:[1,135],53:E,58:C,59:S,60:A,61:M,69:N,79:i},{40:[1,136]},{4:o,5:s,6:41,9:14,10:16,11:6,16:c,17:42,20:l,21:20,22:u,25:h,26:f,27:24,28:25,29:26,30:27,31:28,32:d,33:p,34:g,36:y,38:m,39:b,40:[2,41],41:v,42:_,43:x,45:k,47:w,49:T,50:[1,137],53:E,58:C,59:S,60:A,61:M,69:N,79:i},{4:o,5:s,6:41,9:14,10:16,11:6,16:c,17:42,20:l,21:20,22:u,25:h,26:f,27:24,28:25,29:26,30:27,31:28,32:d,33:p,34:g,36:y,38:m,39:b,40:[1,138],41:v,42:_,43:x,45:k,47:w,49:T,53:E,58:C,59:S,60:A,61:M,69:N,79:i},{17:139,69:N},{17:140,69:N},{55:141,78:P},{55:142,78:P},{55:143,78:P},{63:[1,144],78:[2,56]},{5:[2,49]},{5:[2,71]},{5:[2,50]},{5:[2,51]},{5:[2,52]},{5:[1,145]},{5:[1,146]},{5:[1,147]},t(D,[2,17]),t(D,[2,33]),t(D,[2,34]),t(D,[2,35]),t(D,[2,36]),{19:[1,148]},t(D,[2,37]),{19:[1,149]},t(D,[2,38]),{19:[1,150]},t(D,[2,39]),{55:151,78:P},{55:152,78:P},{5:[2,61]},{5:[2,47]},{5:[2,48]},{17:153,69:N},t(j,[2,11]),t(D,[2,12]),t(D,[2,14]),t(L,a,{8:108,44:154}),t(I,a,{8:110,46:155}),t(F,a,{8:112,48:156}),{5:[2,59]},{5:[2,60]},{78:[2,55]},{40:[2,46]},{40:[2,44]},{40:[2,42]}],defaultActions:{7:[2,72],8:[2,1],9:[2,2],10:[2,3],51:[2,75],86:[2,57],87:[2,58],94:[2,74],120:[2,49],121:[2,71],122:[2,50],123:[2,51],124:[2,52],141:[2,61],142:[2,47],143:[2,48],151:[2,59],152:[2,60],153:[2,55],154:[2,46],155:[2,44],156:[2,42]},parseError:function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t);},parse:function(t){var e=this,n=[0],r=[],i=[null],a=[],o=this.table,s=\"\",c=0,l=0,u=0,h=2,f=1,d=a.slice.call(arguments,1),p=Object.create(this.lexer),g={yy:{}};for(var y in this.yy)Object.prototype.hasOwnProperty.call(this.yy,y)&&(g.yy[y]=this.yy[y]);p.setInput(t,g.yy),g.yy.lexer=p,g.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var m=p.yylloc;a.push(m);var b=p.options&&p.options.ranges;function v(){var t;return \"number\"!=typeof(t=r.pop()||p.lex()||f)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}\"function\"==typeof g.yy.parseError?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var _,x,k,w,T,E,C,S,A,M={};;){if(k=n[n.length-1],this.defaultActions[k]?w=this.defaultActions[k]:(null==_&&(_=v()),w=o[k]&&o[k][_]),void 0===w||!w.length||!w[0]){var N=\"\";for(E in A=[],o[k])this.terminals_[E]&&E>h&&A.push(\"'\"+this.terminals_[E]+\"'\");N=p.showPosition?\"Parse error on line \"+(c+1)+\":\\n\"+p.showPosition()+\"\\nExpecting \"+A.join(\", \")+\", got '\"+(this.terminals_[_]||_)+\"'\":\"Parse error on line \"+(c+1)+\": Unexpected \"+(_==f?\"end of input\":\"'\"+(this.terminals_[_]||_)+\"'\"),this.parseError(N,{text:p.match,token:this.terminals_[_]||_,line:p.yylineno,loc:m,expected:A});}if(w[0]instanceof Array&&w.length>1)throw new Error(\"Parse Error: multiple actions possible at state: \"+k+\", token: \"+_);switch(w[0]){case 1:n.push(_),i.push(p.yytext),a.push(p.yylloc),n.push(w[1]),_=null,x?(_=x,x=null):(l=p.yyleng,s=p.yytext,c=p.yylineno,m=p.yylloc,u>0&&u--);break;case 2:if(C=this.productions_[w[1]][1],M.$=i[i.length-C],M._$={first_line:a[a.length-(C||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(C||1)].first_column,last_column:a[a.length-1].last_column},b&&(M._$.range=[a[a.length-(C||1)].range[0],a[a.length-1].range[1]]),void 0!==(T=this.performAction.apply(M,[s,l,c,g.yy,w[1],i,a].concat(d))))return T;C&&(n=n.slice(0,-1*C*2),i=i.slice(0,-1*C),a=a.slice(0,-1*C)),n.push(this.productions_[w[1]][0]),i.push(M.$),a.push(M._$),S=o[n[n.length-2]][n[n.length-1]],n.push(S);break;case 3:return !0}}return !0}},Y={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e);},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=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.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\\r\\n?|\\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\\r\\n?|\\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\\r\\n?|\\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError(\"Lexical error on line \"+(this.yylineno+1)+\". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\\n\"+this.showPosition(),{text:\"\",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t));},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return (t.length>20?\"...\":\"\")+t.substr(-20).replace(/\\n/g,\"\")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?\"...\":\"\")).replace(/\\n/g,\"\")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join(\"-\");return t+this.upcomingInput()+\"\\n\"+e+\"^\"},test_match:function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\\r\\n?|\\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\\r?\\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return !1}return !1},next:function(){if(this.done)return this.EOF;var t,e,n,r;this._input||(this.done=!0),this._more||(this.yytext=\"\",this.match=\"\");for(var i=this._currentRules(),a=0;a<i.length;a++)if((n=this._input.match(this.rules[i[a]]))&&(!e||n[0].length>e[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,i[a])))return t;if(this._backtrack){e=!1;continue}return !1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[r]))&&t:\"\"===this._input?this.EOF:this.parseError(\"Lexical error on line \"+(this.yylineno+1)+\". Unrecognized text.\\n\"+this.showPosition(),{text:\"\",token:null,line:this.yylineno})},lex:function(){return this.next()||this.lex()},begin:function(t){this.conditionStack.push(t);},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return (t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:\"INITIAL\"},pushState:function(t){this.begin(t);},stateStackSize:function(){return this.conditionStack.length},options:{\"case-insensitive\":!0},performAction:function(t,e,n,r){switch(n){case 0:return this.begin(\"open_directive\"),79;case 1:return this.begin(\"type_directive\"),80;case 2:return this.popState(),this.begin(\"arg_directive\"),14;case 3:return this.popState(),this.popState(),82;case 4:return 81;case 5:case 52:case 65:return 5;case 6:case 7:case 8:case 9:case 10:break;case 11:return 23;case 12:return this.begin(\"ID\"),16;case 13:return this.begin(\"ID\"),20;case 14:return e.yytext=e.yytext.trim(),this.begin(\"ALIAS\"),69;case 15:return this.popState(),this.popState(),this.begin(\"LINE\"),18;case 16:return this.popState(),this.popState(),5;case 17:return this.begin(\"LINE\"),39;case 18:return this.begin(\"LINE\"),41;case 19:return this.begin(\"LINE\"),42;case 20:return this.begin(\"LINE\"),43;case 21:return this.begin(\"LINE\"),52;case 22:return this.begin(\"LINE\"),45;case 23:return this.begin(\"LINE\"),51;case 24:return this.begin(\"LINE\"),47;case 25:return this.begin(\"LINE\"),50;case 26:return this.begin(\"LINE\"),49;case 27:return this.popState(),19;case 28:return 40;case 29:return 64;case 30:return 65;case 31:return 58;case 32:return 59;case 33:return 60;case 34:return 61;case 35:return 56;case 36:return 53;case 37:return this.begin(\"ID\"),25;case 38:return this.begin(\"ID\"),26;case 39:return 32;case 40:return 33;case 41:return this.begin(\"acc_title\"),34;case 42:return this.popState(),\"acc_title_value\";case 43:return this.begin(\"acc_descr\"),36;case 44:return this.popState(),\"acc_descr_value\";case 45:this.begin(\"acc_descr_multiline\");break;case 46:this.popState();break;case 47:return \"acc_descr_multiline_value\";case 48:return 7;case 49:return 22;case 50:return 24;case 51:return 63;case 53:return e.yytext=e.yytext.trim(),69;case 54:return 72;case 55:return 73;case 56:return 70;case 57:return 71;case 58:return 74;case 59:return 75;case 60:return 76;case 61:return 77;case 62:return 78;case 63:return 67;case 64:return 68;case 66:return \"INVALID\"}},rules:[/^(?:%%\\{)/i,/^(?:((?:(?!\\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\\}%%)/i,/^(?:((?:(?!\\}%%).|\\n)*))/i,/^(?:[\\n]+)/i,/^(?:\\s+)/i,/^(?:((?!\\n)\\s)+)/i,/^(?:#[^\\n]*)/i,/^(?:%(?!\\{)[^\\n]*)/i,/^(?:[^\\}]%%[^\\n]*)/i,/^(?:[0-9]+(?=[ \\n]+))/i,/^(?:participant\\b)/i,/^(?:actor\\b)/i,/^(?:[^\\->:\\n,;]+?(?=((?!\\n)\\s)+as(?!\\n)\\s|[#\\n;]|$))/i,/^(?:as\\b)/i,/^(?:(?:))/i,/^(?:loop\\b)/i,/^(?:rect\\b)/i,/^(?:opt\\b)/i,/^(?:alt\\b)/i,/^(?:else\\b)/i,/^(?:par\\b)/i,/^(?:and\\b)/i,/^(?:critical\\b)/i,/^(?:option\\b)/i,/^(?:break\\b)/i,/^(?:(?:[:]?(?:no)?wrap)?[^#\\n;]*)/i,/^(?:end\\b)/i,/^(?:left of\\b)/i,/^(?:right of\\b)/i,/^(?:links\\b)/i,/^(?:link\\b)/i,/^(?:properties\\b)/i,/^(?:details\\b)/i,/^(?:over\\b)/i,/^(?:note\\b)/i,/^(?:activate\\b)/i,/^(?:deactivate\\b)/i,/^(?:title\\s[^#\\n;]+)/i,/^(?:title:\\s[^#\\n;]+)/i,/^(?:accTitle\\s*:\\s*)/i,/^(?:(?!\\n||)*[^\\n]*)/i,/^(?:accDescr\\s*:\\s*)/i,/^(?:(?!\\n||)*[^\\n]*)/i,/^(?:accDescr\\s*\\{\\s*)/i,/^(?:[\\}])/i,/^(?:[^\\}]*)/i,/^(?:sequenceDiagram\\b)/i,/^(?:autonumber\\b)/i,/^(?:off\\b)/i,/^(?:,)/i,/^(?:;)/i,/^(?:[^\\+\\->:\\n,;]+((?!(-x|--x|-\\)|--\\)))[\\-]*[^\\+\\->:\\n,;]+)*)/i,/^(?:->>)/i,/^(?:-->>)/i,/^(?:->)/i,/^(?:-->)/i,/^(?:-[x])/i,/^(?:--[x])/i,/^(?:-[\\)])/i,/^(?:--[\\)])/i,/^(?::(?:(?:no)?wrap)?[^#\\n;]+)/i,/^(?:\\+)/i,/^(?:-)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[46,47],inclusive:!1},acc_descr:{rules:[44],inclusive:!1},acc_title:{rules:[42],inclusive:!1},open_directive:{rules:[1,8],inclusive:!1},type_directive:{rules:[2,3,8],inclusive:!1},arg_directive:{rules:[3,4,8],inclusive:!1},ID:{rules:[7,8,14],inclusive:!1},ALIAS:{rules:[7,8,15,16],inclusive:!1},LINE:{rules:[7,8,27],inclusive:!1},INITIAL:{rules:[0,5,6,8,9,10,11,12,13,17,18,19,20,21,22,23,24,25,26,28,29,30,31,32,33,34,35,36,37,38,39,40,41,43,45,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66],inclusive:!0}}};function U(){this.yy={};}return z.lexer=Y,U.prototype=z,z.Parser=U,new U}();e.parser=r,e.Parser=r.Parser,e.parse=function(){return r.parse.apply(r,arguments)},e.main=function(t){t[1]||(console.log(\"Usage: \"+t[0]+\" FILE\"),process.exit(1));var r=n(1993).readFileSync(n(6470).normalize(t[1]),\"utf8\");return e.parser.parse(r)},n.c[n.s]===t&&e.main(process.argv.slice(1));},3584:(t,e,n)=>{t=n.nmd(t);var r=function(){var t=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},e=[1,2],n=[1,3],r=[1,5],i=[1,7],a=[2,5],o=[1,15],s=[1,17],c=[1,19],l=[1,20],u=[1,21],h=[1,22],f=[1,33],d=[1,23],p=[1,24],g=[1,25],y=[1,26],m=[1,27],b=[1,30],v=[1,31],_=[1,32],x=[1,35],k=[1,36],w=[1,37],T=[1,38],E=[1,34],C=[1,41],S=[1,4,5,14,15,17,19,20,22,23,24,25,26,27,31,33,35,41,42,43,44,47,50],A=[1,4,5,12,13,14,15,17,19,20,22,23,24,25,26,27,31,33,35,41,42,43,44,47,50],M=[1,4,5,7,14,15,17,19,20,22,23,24,25,26,27,31,33,35,41,42,43,44,47,50],N=[4,5,14,15,17,19,20,22,23,24,25,26,27,31,33,35,41,42,43,44,47,50],O={trace:function(){},yy:{},symbols_:{error:2,start:3,SPACE:4,NL:5,directive:6,SD:7,document:8,line:9,statement:10,idStatement:11,DESCR:12,\"--\\x3e\":13,HIDE_EMPTY:14,scale:15,WIDTH:16,COMPOSIT_STATE:17,STRUCT_START:18,STRUCT_STOP:19,STATE_DESCR:20,AS:21,ID:22,FORK:23,JOIN:24,CHOICE:25,CONCURRENT:26,note:27,notePosition:28,NOTE_TEXT:29,direction:30,acc_title:31,acc_title_value:32,acc_descr:33,acc_descr_value:34,acc_descr_multiline_value:35,openDirective:36,typeDirective:37,closeDirective:38,\":\":39,argDirective:40,direction_tb:41,direction_bt:42,direction_rl:43,direction_lr:44,eol:45,\";\":46,EDGE_STATE:47,left_of:48,right_of:49,open_directive:50,type_directive:51,arg_directive:52,close_directive:53,$accept:0,$end:1},terminals_:{2:\"error\",4:\"SPACE\",5:\"NL\",7:\"SD\",12:\"DESCR\",13:\"--\\x3e\",14:\"HIDE_EMPTY\",15:\"scale\",16:\"WIDTH\",17:\"COMPOSIT_STATE\",18:\"STRUCT_START\",19:\"STRUCT_STOP\",20:\"STATE_DESCR\",21:\"AS\",22:\"ID\",23:\"FORK\",24:\"JOIN\",25:\"CHOICE\",26:\"CONCURRENT\",27:\"note\",29:\"NOTE_TEXT\",31:\"acc_title\",32:\"acc_title_value\",33:\"acc_descr\",34:\"acc_descr_value\",35:\"acc_descr_multiline_value\",39:\":\",41:\"direction_tb\",42:\"direction_bt\",43:\"direction_rl\",44:\"direction_lr\",46:\";\",47:\"EDGE_STATE\",48:\"left_of\",49:\"right_of\",50:\"open_directive\",51:\"type_directive\",52:\"arg_directive\",53:\"close_directive\"},productions_:[0,[3,2],[3,2],[3,2],[3,2],[8,0],[8,2],[9,2],[9,1],[9,1],[10,1],[10,2],[10,3],[10,4],[10,1],[10,2],[10,1],[10,4],[10,3],[10,6],[10,1],[10,1],[10,1],[10,1],[10,4],[10,4],[10,1],[10,1],[10,2],[10,2],[10,1],[6,3],[6,5],[30,1],[30,1],[30,1],[30,1],[45,1],[45,1],[11,1],[11,1],[28,1],[28,1],[36,1],[37,1],[40,1],[38,1]],performAction:function(t,e,n,r,i,a,o){var s=a.length-1;switch(i){case 4:return r.setRootDoc(a[s]),a[s];case 5:this.$=[];break;case 6:\"nl\"!=a[s]&&(a[s-1].push(a[s]),this.$=a[s-1]);break;case 7:case 8:case 39:case 40:this.$=a[s];break;case 9:this.$=\"nl\";break;case 10:this.$={stmt:\"state\",id:a[s],type:\"default\",description:\"\"};break;case 11:this.$={stmt:\"state\",id:a[s-1],type:\"default\",description:r.trimColon(a[s])};break;case 12:this.$={stmt:\"relation\",state1:{stmt:\"state\",id:a[s-2],type:\"default\",description:\"\"},state2:{stmt:\"state\",id:a[s],type:\"default\",description:\"\"}};break;case 13:this.$={stmt:\"relation\",state1:{stmt:\"state\",id:a[s-3],type:\"default\",description:\"\"},state2:{stmt:\"state\",id:a[s-1],type:\"default\",description:\"\"},description:a[s].substr(1).trim()};break;case 17:this.$={stmt:\"state\",id:a[s-3],type:\"default\",description:\"\",doc:a[s-1]};break;case 18:var c=a[s],l=a[s-2].trim();if(a[s].match(\":\")){var u=a[s].split(\":\");c=u[0],l=[l,u[1]];}this.$={stmt:\"state\",id:c,type:\"default\",description:l};break;case 19:this.$={stmt:\"state\",id:a[s-3],type:\"default\",description:a[s-5],doc:a[s-1]};break;case 20:this.$={stmt:\"state\",id:a[s],type:\"fork\"};break;case 21:this.$={stmt:\"state\",id:a[s],type:\"join\"};break;case 22:this.$={stmt:\"state\",id:a[s],type:\"choice\"};break;case 23:this.$={stmt:\"state\",id:r.getDividerId(),type:\"divider\"};break;case 24:this.$={stmt:\"state\",id:a[s-1].trim(),note:{position:a[s-2].trim(),text:a[s].trim()}};break;case 28:this.$=a[s].trim(),r.setAccTitle(this.$);break;case 29:case 30:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 33:r.setDirection(\"TB\"),this.$={stmt:\"dir\",value:\"TB\"};break;case 34:r.setDirection(\"BT\"),this.$={stmt:\"dir\",value:\"BT\"};break;case 35:r.setDirection(\"RL\"),this.$={stmt:\"dir\",value:\"RL\"};break;case 36:r.setDirection(\"LR\"),this.$={stmt:\"dir\",value:\"LR\"};break;case 43:r.parseDirective(\"%%{\",\"open_directive\");break;case 44:r.parseDirective(a[s],\"type_directive\");break;case 45:a[s]=a[s].trim().replace(/'/g,'\"'),r.parseDirective(a[s],\"arg_directive\");break;case 46:r.parseDirective(\"}%%\",\"close_directive\",\"state\");}},table:[{3:1,4:e,5:n,6:4,7:r,36:6,50:i},{1:[3]},{3:8,4:e,5:n,6:4,7:r,36:6,50:i},{3:9,4:e,5:n,6:4,7:r,36:6,50:i},{3:10,4:e,5:n,6:4,7:r,36:6,50:i},t([1,4,5,14,15,17,20,22,23,24,25,26,27,31,33,35,41,42,43,44,47,50],a,{8:11}),{37:12,51:[1,13]},{51:[2,43]},{1:[2,1]},{1:[2,2]},{1:[2,3]},{1:[2,4],4:o,5:s,6:28,9:14,10:16,11:18,14:c,15:l,17:u,20:h,22:f,23:d,24:p,25:g,26:y,27:m,30:29,31:b,33:v,35:_,36:6,41:x,42:k,43:w,44:T,47:E,50:i},{38:39,39:[1,40],53:C},t([39,53],[2,44]),t(S,[2,6]),{6:28,10:42,11:18,14:c,15:l,17:u,20:h,22:f,23:d,24:p,25:g,26:y,27:m,30:29,31:b,33:v,35:_,36:6,41:x,42:k,43:w,44:T,47:E,50:i},t(S,[2,8]),t(S,[2,9]),t(S,[2,10],{12:[1,43],13:[1,44]}),t(S,[2,14]),{16:[1,45]},t(S,[2,16],{18:[1,46]}),{21:[1,47]},t(S,[2,20]),t(S,[2,21]),t(S,[2,22]),t(S,[2,23]),{28:48,29:[1,49],48:[1,50],49:[1,51]},t(S,[2,26]),t(S,[2,27]),{32:[1,52]},{34:[1,53]},t(S,[2,30]),t(A,[2,39]),t(A,[2,40]),t(S,[2,33]),t(S,[2,34]),t(S,[2,35]),t(S,[2,36]),t(M,[2,31]),{40:54,52:[1,55]},t(M,[2,46]),t(S,[2,7]),t(S,[2,11]),{11:56,22:f,47:E},t(S,[2,15]),t(N,a,{8:57}),{22:[1,58]},{22:[1,59]},{21:[1,60]},{22:[2,41]},{22:[2,42]},t(S,[2,28]),t(S,[2,29]),{38:61,53:C},{53:[2,45]},t(S,[2,12],{12:[1,62]}),{4:o,5:s,6:28,9:14,10:16,11:18,14:c,15:l,17:u,19:[1,63],20:h,22:f,23:d,24:p,25:g,26:y,27:m,30:29,31:b,33:v,35:_,36:6,41:x,42:k,43:w,44:T,47:E,50:i},t(S,[2,18],{18:[1,64]}),{29:[1,65]},{22:[1,66]},t(M,[2,32]),t(S,[2,13]),t(S,[2,17]),t(N,a,{8:67}),t(S,[2,24]),t(S,[2,25]),{4:o,5:s,6:28,9:14,10:16,11:18,14:c,15:l,17:u,19:[1,68],20:h,22:f,23:d,24:p,25:g,26:y,27:m,30:29,31:b,33:v,35:_,36:6,41:x,42:k,43:w,44:T,47:E,50:i},t(S,[2,19])],defaultActions:{7:[2,43],8:[2,1],9:[2,2],10:[2,3],50:[2,41],51:[2,42],55:[2,45]},parseError:function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t);},parse:function(t){var e=this,n=[0],r=[],i=[null],a=[],o=this.table,s=\"\",c=0,l=0,u=0,h=2,f=1,d=a.slice.call(arguments,1),p=Object.create(this.lexer),g={yy:{}};for(var y in this.yy)Object.prototype.hasOwnProperty.call(this.yy,y)&&(g.yy[y]=this.yy[y]);p.setInput(t,g.yy),g.yy.lexer=p,g.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var m=p.yylloc;a.push(m);var b=p.options&&p.options.ranges;function v(){var t;return \"number\"!=typeof(t=r.pop()||p.lex()||f)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}\"function\"==typeof g.yy.parseError?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var _,x,k,w,T,E,C,S,A,M={};;){if(k=n[n.length-1],this.defaultActions[k]?w=this.defaultActions[k]:(null==_&&(_=v()),w=o[k]&&o[k][_]),void 0===w||!w.length||!w[0]){var N=\"\";for(E in A=[],o[k])this.terminals_[E]&&E>h&&A.push(\"'\"+this.terminals_[E]+\"'\");N=p.showPosition?\"Parse error on line \"+(c+1)+\":\\n\"+p.showPosition()+\"\\nExpecting \"+A.join(\", \")+\", got '\"+(this.terminals_[_]||_)+\"'\":\"Parse error on line \"+(c+1)+\": Unexpected \"+(_==f?\"end of input\":\"'\"+(this.terminals_[_]||_)+\"'\"),this.parseError(N,{text:p.match,token:this.terminals_[_]||_,line:p.yylineno,loc:m,expected:A});}if(w[0]instanceof Array&&w.length>1)throw new Error(\"Parse Error: multiple actions possible at state: \"+k+\", token: \"+_);switch(w[0]){case 1:n.push(_),i.push(p.yytext),a.push(p.yylloc),n.push(w[1]),_=null,x?(_=x,x=null):(l=p.yyleng,s=p.yytext,c=p.yylineno,m=p.yylloc,u>0&&u--);break;case 2:if(C=this.productions_[w[1]][1],M.$=i[i.length-C],M._$={first_line:a[a.length-(C||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(C||1)].first_column,last_column:a[a.length-1].last_column},b&&(M._$.range=[a[a.length-(C||1)].range[0],a[a.length-1].range[1]]),void 0!==(T=this.performAction.apply(M,[s,l,c,g.yy,w[1],i,a].concat(d))))return T;C&&(n=n.slice(0,-1*C*2),i=i.slice(0,-1*C),a=a.slice(0,-1*C)),n.push(this.productions_[w[1]][0]),i.push(M.$),a.push(M._$),S=o[n[n.length-2]][n[n.length-1]],n.push(S);break;case 3:return !0}}return !0}},D={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e);},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=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.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\\r\\n?|\\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\\r\\n?|\\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\\r\\n?|\\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError(\"Lexical error on line \"+(this.yylineno+1)+\". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\\n\"+this.showPosition(),{text:\"\",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t));},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return (t.length>20?\"...\":\"\")+t.substr(-20).replace(/\\n/g,\"\")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?\"...\":\"\")).replace(/\\n/g,\"\")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join(\"-\");return t+this.upcomingInput()+\"\\n\"+e+\"^\"},test_match:function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\\r\\n?|\\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\\r?\\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return !1}return !1},next:function(){if(this.done)return this.EOF;var t,e,n,r;this._input||(this.done=!0),this._more||(this.yytext=\"\",this.match=\"\");for(var i=this._currentRules(),a=0;a<i.length;a++)if((n=this._input.match(this.rules[i[a]]))&&(!e||n[0].length>e[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,i[a])))return t;if(this._backtrack){e=!1;continue}return !1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[r]))&&t:\"\"===this._input?this.EOF:this.parseError(\"Lexical error on line \"+(this.yylineno+1)+\". Unrecognized text.\\n\"+this.showPosition(),{text:\"\",token:null,line:this.yylineno})},lex:function(){return this.next()||this.lex()},begin:function(t){this.conditionStack.push(t);},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return (t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:\"INITIAL\"},pushState:function(t){this.begin(t);},stateStackSize:function(){return this.conditionStack.length},options:{\"case-insensitive\":!0},performAction:function(t,e,n,r){switch(n){case 0:case 33:return 41;case 1:case 34:return 42;case 2:case 35:return 43;case 3:case 36:return 44;case 4:return this.begin(\"open_directive\"),50;case 5:return this.begin(\"type_directive\"),51;case 6:return this.popState(),this.begin(\"arg_directive\"),39;case 7:return this.popState(),this.popState(),53;case 8:return 52;case 9:case 10:case 12:case 13:case 14:case 15:case 46:case 52:break;case 11:case 66:return 5;case 16:return this.pushState(\"SCALE\"),15;case 17:return 16;case 18:case 24:case 40:case 43:this.popState();break;case 19:return this.begin(\"acc_title\"),31;case 20:return this.popState(),\"acc_title_value\";case 21:return this.begin(\"acc_descr\"),33;case 22:return this.popState(),\"acc_descr_value\";case 23:this.begin(\"acc_descr_multiline\");break;case 25:return \"acc_descr_multiline_value\";case 26:this.pushState(\"STATE\");break;case 27:case 30:return this.popState(),e.yytext=e.yytext.slice(0,-8).trim(),23;case 28:case 31:return this.popState(),e.yytext=e.yytext.slice(0,-8).trim(),24;case 29:case 32:return this.popState(),e.yytext=e.yytext.slice(0,-10).trim(),25;case 37:this.begin(\"STATE_STRING\");break;case 38:return this.popState(),this.pushState(\"STATE_ID\"),\"AS\";case 39:case 54:return this.popState(),\"ID\";case 41:return \"STATE_DESCR\";case 42:return 17;case 44:return this.popState(),this.pushState(\"struct\"),18;case 45:return this.popState(),19;case 47:return this.begin(\"NOTE\"),27;case 48:return this.popState(),this.pushState(\"NOTE_ID\"),48;case 49:return this.popState(),this.pushState(\"NOTE_ID\"),49;case 50:this.popState(),this.pushState(\"FLOATING_NOTE\");break;case 51:return this.popState(),this.pushState(\"FLOATING_NOTE_ID\"),\"AS\";case 53:return \"NOTE_TEXT\";case 55:return this.popState(),this.pushState(\"NOTE_TEXT\"),22;case 56:return this.popState(),e.yytext=e.yytext.substr(2).trim(),29;case 57:return this.popState(),e.yytext=e.yytext.slice(0,-8).trim(),29;case 58:case 59:return 7;case 60:return 14;case 61:return 47;case 62:return 22;case 63:return e.yytext=e.yytext.trim(),12;case 64:return 13;case 65:return 26;case 67:return \"INVALID\"}},rules:[/^(?:.*direction\\s+TB[^\\n]*)/i,/^(?:.*direction\\s+BT[^\\n]*)/i,/^(?:.*direction\\s+RL[^\\n]*)/i,/^(?:.*direction\\s+LR[^\\n]*)/i,/^(?:%%\\{)/i,/^(?:((?:(?!\\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\\}%%)/i,/^(?:((?:(?!\\}%%).|\\n)*))/i,/^(?:%%(?!\\{)[^\\n]*)/i,/^(?:[^\\}]%%[^\\n]*)/i,/^(?:[\\n]+)/i,/^(?:[\\s]+)/i,/^(?:((?!\\n)\\s)+)/i,/^(?:#[^\\n]*)/i,/^(?:%[^\\n]*)/i,/^(?:scale\\s+)/i,/^(?:\\d+)/i,/^(?:\\s+width\\b)/i,/^(?:accTitle\\s*:\\s*)/i,/^(?:(?!\\n||)*[^\\n]*)/i,/^(?:accDescr\\s*:\\s*)/i,/^(?:(?!\\n||)*[^\\n]*)/i,/^(?:accDescr\\s*\\{\\s*)/i,/^(?:[\\}])/i,/^(?:[^\\}]*)/i,/^(?:state\\s+)/i,/^(?:.*<<fork>>)/i,/^(?:.*<<join>>)/i,/^(?:.*<<choice>>)/i,/^(?:.*\\[\\[fork\\]\\])/i,/^(?:.*\\[\\[join\\]\\])/i,/^(?:.*\\[\\[choice\\]\\])/i,/^(?:.*direction\\s+TB[^\\n]*)/i,/^(?:.*direction\\s+BT[^\\n]*)/i,/^(?:.*direction\\s+RL[^\\n]*)/i,/^(?:.*direction\\s+LR[^\\n]*)/i,/^(?:[\"])/i,/^(?:\\s*as\\s+)/i,/^(?:[^\\n\\{]*)/i,/^(?:[\"])/i,/^(?:[^\"]*)/i,/^(?:[^\\n\\s\\{]+)/i,/^(?:\\n)/i,/^(?:\\{)/i,/^(?:\\})/i,/^(?:[\\n])/i,/^(?:note\\s+)/i,/^(?:left of\\b)/i,/^(?:right of\\b)/i,/^(?:\")/i,/^(?:\\s*as\\s*)/i,/^(?:[\"])/i,/^(?:[^\"]*)/i,/^(?:[^\\n]*)/i,/^(?:\\s*[^:\\n\\s\\-]+)/i,/^(?:\\s*:[^:\\n;]+)/i,/^(?:[\\s\\S]*?end note\\b)/i,/^(?:stateDiagram\\s+)/i,/^(?:stateDiagram-v2\\s+)/i,/^(?:hide empty description\\b)/i,/^(?:\\[\\*\\])/i,/^(?:[^:\\n\\s\\-\\{]+)/i,/^(?:\\s*:[^:\\n;]+)/i,/^(?:-->)/i,/^(?:--)/i,/^(?:$)/i,/^(?:.)/i],conditions:{LINE:{rules:[13,14],inclusive:!1},close_directive:{rules:[13,14],inclusive:!1},arg_directive:{rules:[7,8,13,14],inclusive:!1},type_directive:{rules:[6,7,13,14],inclusive:!1},open_directive:{rules:[5,13,14],inclusive:!1},struct:{rules:[13,14,26,33,34,35,36,45,46,47,61,62,63,64,65],inclusive:!1},FLOATING_NOTE_ID:{rules:[54],inclusive:!1},FLOATING_NOTE:{rules:[51,52,53],inclusive:!1},NOTE_TEXT:{rules:[56,57],inclusive:!1},NOTE_ID:{rules:[55],inclusive:!1},NOTE:{rules:[48,49,50],inclusive:!1},acc_descr_multiline:{rules:[24,25],inclusive:!1},acc_descr:{rules:[22],inclusive:!1},acc_title:{rules:[20],inclusive:!1},SCALE:{rules:[17,18],inclusive:!1},ALIAS:{rules:[],inclusive:!1},STATE_ID:{rules:[39],inclusive:!1},STATE_STRING:{rules:[40,41],inclusive:!1},FORK_STATE:{rules:[],inclusive:!1},STATE:{rules:[13,14,27,28,29,30,31,32,37,38,42,43,44],inclusive:!1},ID:{rules:[13,14],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,9,10,11,12,14,15,16,19,21,23,26,44,47,58,59,60,61,62,63,64,66,67],inclusive:!0}}};function B(){this.yy={};}return O.lexer=D,B.prototype=O,O.Parser=B,new B}();e.parser=r,e.Parser=r.Parser,e.parse=function(){return r.parse.apply(r,arguments)},e.main=function(t){t[1]||(console.log(\"Usage: \"+t[0]+\" FILE\"),process.exit(1));var r=n(3069).readFileSync(n(6470).normalize(t[1]),\"utf8\");return e.parser.parse(r)},n.c[n.s]===t&&e.main(process.argv.slice(1));},9763:(t,e,n)=>{t=n.nmd(t);var r=function(){var t=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},e=[1,2],n=[1,5],r=[6,9,11,17,18,20,22,23,24,26],i=[1,15],a=[1,16],o=[1,17],s=[1,18],c=[1,19],l=[1,20],u=[1,24],h=[4,6,9,11,17,18,20,22,23,24,26],f={trace:function(){},yy:{},symbols_:{error:2,start:3,journey:4,document:5,EOF:6,directive:7,line:8,SPACE:9,statement:10,NEWLINE:11,openDirective:12,typeDirective:13,closeDirective:14,\":\":15,argDirective:16,title:17,acc_title:18,acc_title_value:19,acc_descr:20,acc_descr_value:21,acc_descr_multiline_value:22,section:23,taskName:24,taskData:25,open_directive:26,type_directive:27,arg_directive:28,close_directive:29,$accept:0,$end:1},terminals_:{2:\"error\",4:\"journey\",6:\"EOF\",9:\"SPACE\",11:\"NEWLINE\",15:\":\",17:\"title\",18:\"acc_title\",19:\"acc_title_value\",20:\"acc_descr\",21:\"acc_descr_value\",22:\"acc_descr_multiline_value\",23:\"section\",24:\"taskName\",25:\"taskData\",26:\"open_directive\",27:\"type_directive\",28:\"arg_directive\",29:\"close_directive\"},productions_:[0,[3,3],[3,2],[5,0],[5,2],[8,2],[8,1],[8,1],[8,1],[7,4],[7,6],[10,1],[10,2],[10,2],[10,1],[10,1],[10,2],[10,1],[12,1],[13,1],[16,1],[14,1]],performAction:function(t,e,n,r,i,a,o){var s=a.length-1;switch(i){case 1:return a[s-1];case 3:case 7:case 8:this.$=[];break;case 4:a[s-1].push(a[s]),this.$=a[s-1];break;case 5:case 6:this.$=a[s];break;case 11:r.setDiagramTitle(a[s].substr(6)),this.$=a[s].substr(6);break;case 12:this.$=a[s].trim(),r.setAccTitle(this.$);break;case 13:case 14:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 15:r.addSection(a[s].substr(8)),this.$=a[s].substr(8);break;case 16:r.addTask(a[s-1],a[s]),this.$=\"task\";break;case 18:r.parseDirective(\"%%{\",\"open_directive\");break;case 19:r.parseDirective(a[s],\"type_directive\");break;case 20:a[s]=a[s].trim().replace(/'/g,'\"'),r.parseDirective(a[s],\"arg_directive\");break;case 21:r.parseDirective(\"}%%\",\"close_directive\",\"journey\");}},table:[{3:1,4:e,7:3,12:4,26:n},{1:[3]},t(r,[2,3],{5:6}),{3:7,4:e,7:3,12:4,26:n},{13:8,27:[1,9]},{27:[2,18]},{6:[1,10],7:21,8:11,9:[1,12],10:13,11:[1,14],12:4,17:i,18:a,20:o,22:s,23:c,24:l,26:n},{1:[2,2]},{14:22,15:[1,23],29:u},t([15,29],[2,19]),t(r,[2,8],{1:[2,1]}),t(r,[2,4]),{7:21,10:25,12:4,17:i,18:a,20:o,22:s,23:c,24:l,26:n},t(r,[2,6]),t(r,[2,7]),t(r,[2,11]),{19:[1,26]},{21:[1,27]},t(r,[2,14]),t(r,[2,15]),{25:[1,28]},t(r,[2,17]),{11:[1,29]},{16:30,28:[1,31]},{11:[2,21]},t(r,[2,5]),t(r,[2,12]),t(r,[2,13]),t(r,[2,16]),t(h,[2,9]),{14:32,29:u},{29:[2,20]},{11:[1,33]},t(h,[2,10])],defaultActions:{5:[2,18],7:[2,2],24:[2,21],31:[2,20]},parseError:function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t);},parse:function(t){var e=this,n=[0],r=[],i=[null],a=[],o=this.table,s=\"\",c=0,l=0,u=0,h=2,f=1,d=a.slice.call(arguments,1),p=Object.create(this.lexer),g={yy:{}};for(var y in this.yy)Object.prototype.hasOwnProperty.call(this.yy,y)&&(g.yy[y]=this.yy[y]);p.setInput(t,g.yy),g.yy.lexer=p,g.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var m=p.yylloc;a.push(m);var b=p.options&&p.options.ranges;function v(){var t;return \"number\"!=typeof(t=r.pop()||p.lex()||f)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}\"function\"==typeof g.yy.parseError?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var _,x,k,w,T,E,C,S,A,M={};;){if(k=n[n.length-1],this.defaultActions[k]?w=this.defaultActions[k]:(null==_&&(_=v()),w=o[k]&&o[k][_]),void 0===w||!w.length||!w[0]){var N=\"\";for(E in A=[],o[k])this.terminals_[E]&&E>h&&A.push(\"'\"+this.terminals_[E]+\"'\");N=p.showPosition?\"Parse error on line \"+(c+1)+\":\\n\"+p.showPosition()+\"\\nExpecting \"+A.join(\", \")+\", got '\"+(this.terminals_[_]||_)+\"'\":\"Parse error on line \"+(c+1)+\": Unexpected \"+(_==f?\"end of input\":\"'\"+(this.terminals_[_]||_)+\"'\"),this.parseError(N,{text:p.match,token:this.terminals_[_]||_,line:p.yylineno,loc:m,expected:A});}if(w[0]instanceof Array&&w.length>1)throw new Error(\"Parse Error: multiple actions possible at state: \"+k+\", token: \"+_);switch(w[0]){case 1:n.push(_),i.push(p.yytext),a.push(p.yylloc),n.push(w[1]),_=null,x?(_=x,x=null):(l=p.yyleng,s=p.yytext,c=p.yylineno,m=p.yylloc,u>0&&u--);break;case 2:if(C=this.productions_[w[1]][1],M.$=i[i.length-C],M._$={first_line:a[a.length-(C||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(C||1)].first_column,last_column:a[a.length-1].last_column},b&&(M._$.range=[a[a.length-(C||1)].range[0],a[a.length-1].range[1]]),void 0!==(T=this.performAction.apply(M,[s,l,c,g.yy,w[1],i,a].concat(d))))return T;C&&(n=n.slice(0,-1*C*2),i=i.slice(0,-1*C),a=a.slice(0,-1*C)),n.push(this.productions_[w[1]][0]),i.push(M.$),a.push(M._$),S=o[n[n.length-2]][n[n.length-1]],n.push(S);break;case 3:return !0}}return !0}},d={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e);},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=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.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\\r\\n?|\\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\\r\\n?|\\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\\r\\n?|\\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError(\"Lexical error on line \"+(this.yylineno+1)+\". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\\n\"+this.showPosition(),{text:\"\",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t));},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return (t.length>20?\"...\":\"\")+t.substr(-20).replace(/\\n/g,\"\")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?\"...\":\"\")).replace(/\\n/g,\"\")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join(\"-\");return t+this.upcomingInput()+\"\\n\"+e+\"^\"},test_match:function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\\r\\n?|\\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\\r?\\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return !1}return !1},next:function(){if(this.done)return this.EOF;var t,e,n,r;this._input||(this.done=!0),this._more||(this.yytext=\"\",this.match=\"\");for(var i=this._currentRules(),a=0;a<i.length;a++)if((n=this._input.match(this.rules[i[a]]))&&(!e||n[0].length>e[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,i[a])))return t;if(this._backtrack){e=!1;continue}return !1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[r]))&&t:\"\"===this._input?this.EOF:this.parseError(\"Lexical error on line \"+(this.yylineno+1)+\". Unrecognized text.\\n\"+this.showPosition(),{text:\"\",token:null,line:this.yylineno})},lex:function(){return this.next()||this.lex()},begin:function(t){this.conditionStack.push(t);},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return (t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:\"INITIAL\"},pushState:function(t){this.begin(t);},stateStackSize:function(){return this.conditionStack.length},options:{\"case-insensitive\":!0},performAction:function(t,e,n,r){switch(n){case 0:return this.begin(\"open_directive\"),26;case 1:return this.begin(\"type_directive\"),27;case 2:return this.popState(),this.begin(\"arg_directive\"),15;case 3:return this.popState(),this.popState(),29;case 4:return 28;case 5:case 6:case 8:case 9:break;case 7:return 11;case 10:return 4;case 11:return 17;case 12:return this.begin(\"acc_title\"),18;case 13:return this.popState(),\"acc_title_value\";case 14:return this.begin(\"acc_descr\"),20;case 15:return this.popState(),\"acc_descr_value\";case 16:this.begin(\"acc_descr_multiline\");break;case 17:this.popState();break;case 18:return \"acc_descr_multiline_value\";case 19:return 23;case 20:return 24;case 21:return 25;case 22:return 15;case 23:return 6;case 24:return \"INVALID\"}},rules:[/^(?:%%\\{)/i,/^(?:((?:(?!\\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\\}%%)/i,/^(?:((?:(?!\\}%%).|\\n)*))/i,/^(?:%(?!\\{)[^\\n]*)/i,/^(?:[^\\}]%%[^\\n]*)/i,/^(?:[\\n]+)/i,/^(?:\\s+)/i,/^(?:#[^\\n]*)/i,/^(?:journey\\b)/i,/^(?:title\\s[^#\\n;]+)/i,/^(?:accTitle\\s*:\\s*)/i,/^(?:(?!\\n||)*[^\\n]*)/i,/^(?:accDescr\\s*:\\s*)/i,/^(?:(?!\\n||)*[^\\n]*)/i,/^(?:accDescr\\s*\\{\\s*)/i,/^(?:[\\}])/i,/^(?:[^\\}]*)/i,/^(?:section\\s[^#:\\n;]+)/i,/^(?:[^#:\\n;]+)/i,/^(?::[^#\\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{open_directive:{rules:[1],inclusive:!1},type_directive:{rules:[2,3],inclusive:!1},arg_directive:{rules:[3,4],inclusive:!1},acc_descr_multiline:{rules:[17,18],inclusive:!1},acc_descr:{rules:[15],inclusive:!1},acc_title:{rules:[13],inclusive:!1},INITIAL:{rules:[0,5,6,7,8,9,10,11,12,14,16,19,20,21,22,23,24],inclusive:!0}}};function p(){this.yy={};}return f.lexer=d,p.prototype=f,f.Parser=p,new p}();e.parser=r,e.Parser=r.Parser,e.parse=function(){return r.parse.apply(r,arguments)},e.main=function(t){t[1]||(console.log(\"Usage: \"+t[0]+\" FILE\"),process.exit(1));var r=n(9143).readFileSync(n(6470).normalize(t[1]),\"utf8\");return e.parser.parse(r)},n.c[n.s]===t&&e.main(process.argv.slice(1));},7967:(t,e)=>{e.N=void 0;var n=/^([^\\w]*)(javascript|data|vbscript)/im,r=/&#(\\w+)(^\\w|;)?/g,i=/[\\u0000-\\u001F\\u007F-\\u009F\\u2000-\\u200D\\uFEFF]/gim,a=/^([^:]+):/gm,o=[\".\",\"/\"];e.N=function(t){var e,s=(e=t||\"\",e.replace(r,(function(t,e){return String.fromCharCode(e)}))).replace(i,\"\").trim();if(!s)return \"about:blank\";if(function(t){return o.indexOf(t[0])>-1}(s))return s;var c=s.match(a);if(!c)return s;var l=c[0];return n.test(l)?\"about:blank\":s};},3841:t=>{t.exports=function(t,e){return t.intersect(e)};},6187:(t,e,n)=>{n.d(e,{Z:()=>fu});var r=n(1941),i=n.n(r),a={debug:1,info:2,warn:3,error:4,fatal:5},o={debug:function(){},info:function(){},warn:function(){},error:function(){},fatal:function(){}},s=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:\"fatal\";isNaN(t)&&(t=t.toLowerCase(),void 0!==a[t]&&(t=a[t])),o.trace=function(){},o.debug=function(){},o.info=function(){},o.warn=function(){},o.error=function(){},o.fatal=function(){},t<=a.fatal&&(o.fatal=console.error?console.error.bind(console,c(\"FATAL\"),\"color: orange\"):console.log.bind(console,\"\u001b[35m\",c(\"FATAL\"))),t<=a.error&&(o.error=console.error?console.error.bind(console,c(\"ERROR\"),\"color: orange\"):console.log.bind(console,\"\u001b[31m\",c(\"ERROR\"))),t<=a.warn&&(o.warn=console.warn?console.warn.bind(console,c(\"WARN\"),\"color: orange\"):console.log.bind(console,\"\u001b[33m\",c(\"WARN\"))),t<=a.info&&(o.info=console.info?console.info.bind(console,c(\"INFO\"),\"color: lightblue\"):console.log.bind(console,\"\u001b[34m\",c(\"INFO\"))),t<=a.debug&&(o.debug=console.debug?console.debug.bind(console,c(\"DEBUG\"),\"color: lightgreen\"):console.log.bind(console,\"\u001b[32m\",c(\"DEBUG\")));},c=function(t){var e=i()().format(\"ss.SSS\");return \"%c\".concat(e,\" : \").concat(t,\" : \")},l=n(7543),u=\"comm\",h=\"rule\",f=\"decl\",d=Math.abs,p=String.fromCharCode;function g(t){return t.trim()}function y(t,e,n){return t.replace(e,n)}function m(t,e){return t.indexOf(e)}function b(t,e){return 0|t.charCodeAt(e)}function v(t,e,n){return t.slice(e,n)}function _(t){return t.length}function x(t){return t.length}function k(t,e){return e.push(t),t}function w(t,e){for(var n=\"\",r=x(t),i=0;i<r;i++)n+=e(t[i],i,t,e)||\"\";return n}function T(t,e,n,r){switch(t.type){case\"@import\":case f:return t.return=t.return||t.value;case u:return \"\";case\"@keyframes\":return t.return=t.value+\"{\"+w(t.children,r)+\"}\";case h:t.value=t.props.join(\",\");}return _(n=w(t.children,r))?t.return=t.value+\"{\"+n+\"}\":\"\"}var E=1,C=1,S=0,A=0,M=0,N=\"\";function O(t,e,n,r,i,a,o){return {value:t,root:e,parent:n,type:r,props:i,children:a,line:E,column:C,length:o,return:\"\"}}function D(){return M=A>0?b(N,--A):0,C--,10===M&&(C=1,E--),M}function B(){return M=A<S?b(N,A++):0,C++,10===M&&(C=1,E++),M}function L(){return b(N,A)}function I(){return A}function F(t,e){return v(N,t,e)}function R(t){switch(t){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function P(t){return g(F(A-1,Y(91===t?t+2:40===t?t+1:t)))}function j(t){for(;(M=L())&&M<33;)B();return R(t)>2||R(M)>3?\"\":\" \"}function z(t,e){for(;--e&&B()&&!(M<48||M>102||M>57&&M<65||M>70&&M<97););return F(t,I()+(e<6&&32==L()&&32==B()))}function Y(t){for(;B();)switch(M){case t:return A;case 34:case 39:34!==t&&39!==t&&Y(M);break;case 40:41===t&&Y(t);break;case 92:B();}return A}function U(t,e){for(;B()&&t+M!==57&&(t+M!==84||47!==L()););return \"/*\"+F(e,A-1)+\"*\"+p(47===t?t:B())}function $(t){for(;!R(L());)B();return F(t,A)}function W(t){return function(t){return N=\"\",t}(q(\"\",null,null,null,[\"\"],t=function(t){return E=C=1,S=_(N=t),A=0,[]}(t),0,[0],t))}function q(t,e,n,r,i,a,o,s,c){for(var l=0,u=0,h=o,f=0,d=0,g=0,b=1,v=1,x=1,w=0,T=\"\",E=i,C=a,S=r,A=T;v;)switch(g=w,w=B()){case 40:if(108!=g&&58==A.charCodeAt(h-1)){-1!=m(A+=y(P(w),\"&\",\"&\\f\"),\"&\\f\")&&(x=-1);break}case 34:case 39:case 91:A+=P(w);break;case 9:case 10:case 13:case 32:A+=j(g);break;case 92:A+=z(I()-1,7);continue;case 47:switch(L()){case 42:case 47:k(V(U(B(),I()),e,n),c);break;default:A+=\"/\";}break;case 123*b:s[l++]=_(A)*x;case 125*b:case 59:case 0:switch(w){case 0:case 125:v=0;case 59+u:d>0&&_(A)-h&&k(d>32?G(A+\";\",r,n,h-1):G(y(A,\" \",\"\")+\";\",r,n,h-2),c);break;case 59:A+=\";\";default:if(k(S=H(A,e,n,l,u,i,s,T,E=[],C=[],h),a),123===w)if(0===u)q(A,e,S,S,E,a,h,s,C);else switch(f){case 100:case 109:case 115:q(t,S,S,r&&k(H(t,S,S,0,0,i,s,T,i,E=[],h),C),i,C,h,s,r?E:C);break;default:q(A,S,S,S,[\"\"],C,0,s,C);}}l=u=d=0,b=x=1,T=A=\"\",h=o;break;case 58:h=1+_(A),d=g;default:if(b<1)if(123==w)--b;else if(125==w&&0==b++&&125==D())continue;switch(A+=p(w),w*b){case 38:x=u>0?1:(A+=\"\\f\",-1);break;case 44:s[l++]=(_(A)-1)*x,x=1;break;case 64:45===L()&&(A+=P(B())),f=L(),u=h=_(T=A+=$(I())),w++;break;case 45:45===g&&2==_(A)&&(b=0);}}return a}function H(t,e,n,r,i,a,o,s,c,l,u){for(var f=i-1,p=0===i?a:[\"\"],m=x(p),b=0,_=0,k=0;b<r;++b)for(var w=0,T=v(t,f+1,f=d(_=o[b])),E=t;w<m;++w)(E=g(_>0?p[w]+\" \"+T:y(T,/&\\f/g,p[w])))&&(c[k++]=E);return O(t,e,n,0===i?h:s,c,l,u)}function V(t,e,n){return O(t,e,n,u,p(M),v(t,2,-2),0)}function G(t,e,n,r){return O(t,e,n,f,v(t,0,r),v(t,r+1,-1),r)}const X=\"9.1.7\";function Z(t){return Z=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&\"function\"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?\"symbol\":typeof t},Z(t)}const Q=function t(e,n,r){var i=Object.assign({depth:2,clobber:!1},r),a=i.depth,o=i.clobber;return Array.isArray(n)&&!Array.isArray(e)?(n.forEach((function(n){return t(e,n,r)})),e):Array.isArray(n)&&Array.isArray(e)?(n.forEach((function(t){-1===e.indexOf(t)&&e.push(t);})),e):void 0===e||a<=0?null!=e&&\"object\"===Z(e)&&\"object\"===Z(n)?Object.assign(e,n):n:(void 0!==n&&\"object\"===Z(e)&&\"object\"===Z(n)&&Object.keys(n).forEach((function(r){\"object\"!==Z(n[r])||void 0!==e[r]&&\"object\"!==Z(e[r])?(o||\"object\"!==Z(e[r])&&\"object\"!==Z(n[r]))&&(e[r]=n[r]):(void 0===e[r]&&(e[r]=Array.isArray(n[r])?[]:{}),e[r]=t(e[r],n[r],{depth:a-1,clobber:o}));})),e)},K={min:{r:0,g:0,b:0,s:0,l:0,a:0},max:{r:255,g:255,b:255,h:360,s:100,l:100,a:1},clamp:{r:t=>t>=255?255:t<0?0:t,g:t=>t>=255?255:t<0?0:t,b:t=>t>=255?255:t<0?0:t,h:t=>t%360,s:t=>t>=100?100:t<0?0:t,l:t=>t>=100?100:t<0?0:t,a:t=>t>=1?1:t<0?0:t},toLinear:t=>{const e=t/255;return t>.03928?Math.pow((e+.055)/1.055,2.4):e/12.92},hue2rgb:(t,e,n)=>(n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t),hsl2rgb:({h:t,s:e,l:n},r)=>{if(!e)return 2.55*n;t/=360,e/=100;const i=(n/=100)<.5?n*(1+e):n+e-n*e,a=2*n-i;switch(r){case\"r\":return 255*K.hue2rgb(a,i,t+1/3);case\"g\":return 255*K.hue2rgb(a,i,t);case\"b\":return 255*K.hue2rgb(a,i,t-1/3)}},rgb2hsl:({r:t,g:e,b:n},r)=>{t/=255,e/=255,n/=255;const i=Math.max(t,e,n),a=Math.min(t,e,n),o=(i+a)/2;if(\"l\"===r)return 100*o;if(i===a)return 0;const s=i-a;if(\"s\"===r)return 100*(o>.5?s/(2-i-a):s/(i+a));switch(i){case t:return 60*((e-n)/s+(e<n?6:0));case e:return 60*((n-t)/s+2);case n:return 60*((t-e)/s+4);default:return -1}}},J={channel:K,lang:{clamp:(t,e,n)=>e>n?Math.min(e,Math.max(n,t)):Math.min(n,Math.max(e,t)),round:t=>Math.round(1e10*t)/1e10},unit:{dec2hex:t=>{const e=Math.round(t).toString(16);return e.length>1?e:`0${e}`}}},tt={};for(let t=0;t<=255;t++)tt[t]=J.unit.dec2hex(t);const et=new class{constructor(t,e){this.color=e,this.changed=!1,this.data=t,this.type=new class{constructor(){this.type=0;}get(){return this.type}set(t){if(this.type&&this.type!==t)throw new Error(\"Cannot change both RGB and HSL channels at the same time\");this.type=t;}reset(){this.type=0;}is(t){return this.type===t}};}set(t,e){return this.color=e,this.changed=!1,this.data=t,this.type.type=0,this}_ensureHSL(){const t=this.data,{h:e,s:n,l:r}=t;void 0===e&&(t.h=J.channel.rgb2hsl(t,\"h\")),void 0===n&&(t.s=J.channel.rgb2hsl(t,\"s\")),void 0===r&&(t.l=J.channel.rgb2hsl(t,\"l\"));}_ensureRGB(){const t=this.data,{r:e,g:n,b:r}=t;void 0===e&&(t.r=J.channel.hsl2rgb(t,\"r\")),void 0===n&&(t.g=J.channel.hsl2rgb(t,\"g\")),void 0===r&&(t.b=J.channel.hsl2rgb(t,\"b\"));}get r(){const t=this.data,e=t.r;return this.type.is(2)||void 0===e?(this._ensureHSL(),J.channel.hsl2rgb(t,\"r\")):e}get g(){const t=this.data,e=t.g;return this.type.is(2)||void 0===e?(this._ensureHSL(),J.channel.hsl2rgb(t,\"g\")):e}get b(){const t=this.data,e=t.b;return this.type.is(2)||void 0===e?(this._ensureHSL(),J.channel.hsl2rgb(t,\"b\")):e}get h(){const t=this.data,e=t.h;return this.type.is(1)||void 0===e?(this._ensureRGB(),J.channel.rgb2hsl(t,\"h\")):e}get s(){const t=this.data,e=t.s;return this.type.is(1)||void 0===e?(this._ensureRGB(),J.channel.rgb2hsl(t,\"s\")):e}get l(){const t=this.data,e=t.l;return this.type.is(1)||void 0===e?(this._ensureRGB(),J.channel.rgb2hsl(t,\"l\")):e}get a(){return this.data.a}set r(t){this.type.set(1),this.changed=!0,this.data.r=t;}set g(t){this.type.set(1),this.changed=!0,this.data.g=t;}set b(t){this.type.set(1),this.changed=!0,this.data.b=t;}set h(t){this.type.set(2),this.changed=!0,this.data.h=t;}set s(t){this.type.set(2),this.changed=!0,this.data.s=t;}set l(t){this.type.set(2),this.changed=!0,this.data.l=t;}set a(t){this.changed=!0,this.data.a=t;}}({r:0,g:0,b:0,a:0},\"transparent\"),nt={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:t=>{if(35!==t.charCodeAt(0))return;const e=t.match(nt.re);if(!e)return;const n=e[1],r=parseInt(n,16),i=n.length,a=i%4==0,o=i>4,s=o?1:17,c=o?8:4,l=a?0:-1,u=o?255:15;return et.set({r:(r>>c*(l+3)&u)*s,g:(r>>c*(l+2)&u)*s,b:(r>>c*(l+1)&u)*s,a:a?(r&u)*s/255:1},t)},stringify:t=>{const{r:e,g:n,b:r,a:i}=t;return i<1?`#${tt[Math.round(e)]}${tt[Math.round(n)]}${tt[Math.round(r)]}${tt[Math.round(255*i)]}`:`#${tt[Math.round(e)]}${tt[Math.round(n)]}${tt[Math.round(r)]}`}},rt=nt,it={re:/^hsla?\\(\\s*?(-?(?:\\d+(?:\\.\\d+)?|(?:\\.\\d+))(?:e-?\\d+)?(?:deg|grad|rad|turn)?)\\s*?(?:,|\\s)\\s*?(-?(?:\\d+(?:\\.\\d+)?|(?:\\.\\d+))(?:e-?\\d+)?%)\\s*?(?:,|\\s)\\s*?(-?(?:\\d+(?:\\.\\d+)?|(?:\\.\\d+))(?:e-?\\d+)?%)(?:\\s*?(?:,|\\/)\\s*?\\+?(-?(?:\\d+(?:\\.\\d+)?|(?:\\.\\d+))(?:e-?\\d+)?(%)?))?\\s*?\\)$/i,hueRe:/^(.+?)(deg|grad|rad|turn)$/i,_hue2deg:t=>{const e=t.match(it.hueRe);if(e){const[,t,n]=e;switch(n){case\"grad\":return J.channel.clamp.h(.9*parseFloat(t));case\"rad\":return J.channel.clamp.h(180*parseFloat(t)/Math.PI);case\"turn\":return J.channel.clamp.h(360*parseFloat(t))}}return J.channel.clamp.h(parseFloat(t))},parse:t=>{const e=t.charCodeAt(0);if(104!==e&&72!==e)return;const n=t.match(it.re);if(!n)return;const[,r,i,a,o,s]=n;return et.set({h:it._hue2deg(r),s:J.channel.clamp.s(parseFloat(i)),l:J.channel.clamp.l(parseFloat(a)),a:o?J.channel.clamp.a(s?parseFloat(o)/100:parseFloat(o)):1},t)},stringify:t=>{const{h:e,s:n,l:r,a:i}=t;return i<1?`hsla(${J.lang.round(e)}, ${J.lang.round(n)}%, ${J.lang.round(r)}%, ${i})`:`hsl(${J.lang.round(e)}, ${J.lang.round(n)}%, ${J.lang.round(r)}%)`}},at=it,ot={colors:{aliceblue:\"#f0f8ff\",antiquewhite:\"#faebd7\",aqua:\"#00ffff\",aquamarine:\"#7fffd4\",azure:\"#f0ffff\",beige:\"#f5f5dc\",bisque:\"#ffe4c4\",black:\"#000000\",blanchedalmond:\"#ffebcd\",blue:\"#0000ff\",blueviolet:\"#8a2be2\",brown:\"#a52a2a\",burlywood:\"#deb887\",cadetblue:\"#5f9ea0\",chartreuse:\"#7fff00\",chocolate:\"#d2691e\",coral:\"#ff7f50\",cornflowerblue:\"#6495ed\",cornsilk:\"#fff8dc\",crimson:\"#dc143c\",cyanaqua:\"#00ffff\",darkblue:\"#00008b\",darkcyan:\"#008b8b\",darkgoldenrod:\"#b8860b\",darkgray:\"#a9a9a9\",darkgreen:\"#006400\",darkgrey:\"#a9a9a9\",darkkhaki:\"#bdb76b\",darkmagenta:\"#8b008b\",darkolivegreen:\"#556b2f\",darkorange:\"#ff8c00\",darkorchid:\"#9932cc\",darkred:\"#8b0000\",darksalmon:\"#e9967a\",darkseagreen:\"#8fbc8f\",darkslateblue:\"#483d8b\",darkslategray:\"#2f4f4f\",darkslategrey:\"#2f4f4f\",darkturquoise:\"#00ced1\",darkviolet:\"#9400d3\",deeppink:\"#ff1493\",deepskyblue:\"#00bfff\",dimgray:\"#696969\",dimgrey:\"#696969\",dodgerblue:\"#1e90ff\",firebrick:\"#b22222\",floralwhite:\"#fffaf0\",forestgreen:\"#228b22\",fuchsia:\"#ff00ff\",gainsboro:\"#dcdcdc\",ghostwhite:\"#f8f8ff\",gold:\"#ffd700\",goldenrod:\"#daa520\",gray:\"#808080\",green:\"#008000\",greenyellow:\"#adff2f\",grey:\"#808080\",honeydew:\"#f0fff0\",hotpink:\"#ff69b4\",indianred:\"#cd5c5c\",indigo:\"#4b0082\",ivory:\"#fffff0\",khaki:\"#f0e68c\",lavender:\"#e6e6fa\",lavenderblush:\"#fff0f5\",lawngreen:\"#7cfc00\",lemonchiffon:\"#fffacd\",lightblue:\"#add8e6\",lightcoral:\"#f08080\",lightcyan:\"#e0ffff\",lightgoldenrodyellow:\"#fafad2\",lightgray:\"#d3d3d3\",lightgreen:\"#90ee90\",lightgrey:\"#d3d3d3\",lightpink:\"#ffb6c1\",lightsalmon:\"#ffa07a\",lightseagreen:\"#20b2aa\",lightskyblue:\"#87cefa\",lightslategray:\"#778899\",lightslategrey:\"#778899\",lightsteelblue:\"#b0c4de\",lightyellow:\"#ffffe0\",lime:\"#00ff00\",limegreen:\"#32cd32\",linen:\"#faf0e6\",magenta:\"#ff00ff\",maroon:\"#800000\",mediumaquamarine:\"#66cdaa\",mediumblue:\"#0000cd\",mediumorchid:\"#ba55d3\",mediumpurple:\"#9370db\",mediumseagreen:\"#3cb371\",mediumslateblue:\"#7b68ee\",mediumspringgreen:\"#00fa9a\",mediumturquoise:\"#48d1cc\",mediumvioletred:\"#c71585\",midnightblue:\"#191970\",mintcream:\"#f5fffa\",mistyrose:\"#ffe4e1\",moccasin:\"#ffe4b5\",navajowhite:\"#ffdead\",navy:\"#000080\",oldlace:\"#fdf5e6\",olive:\"#808000\",olivedrab:\"#6b8e23\",orange:\"#ffa500\",orangered:\"#ff4500\",orchid:\"#da70d6\",palegoldenrod:\"#eee8aa\",palegreen:\"#98fb98\",paleturquoise:\"#afeeee\",palevioletred:\"#db7093\",papayawhip:\"#ffefd5\",peachpuff:\"#ffdab9\",peru:\"#cd853f\",pink:\"#ffc0cb\",plum:\"#dda0dd\",powderblue:\"#b0e0e6\",purple:\"#800080\",rebeccapurple:\"#663399\",red:\"#ff0000\",rosybrown:\"#bc8f8f\",royalblue:\"#4169e1\",saddlebrown:\"#8b4513\",salmon:\"#fa8072\",sandybrown:\"#f4a460\",seagreen:\"#2e8b57\",seashell:\"#fff5ee\",sienna:\"#a0522d\",silver:\"#c0c0c0\",skyblue:\"#87ceeb\",slateblue:\"#6a5acd\",slategray:\"#708090\",slategrey:\"#708090\",snow:\"#fffafa\",springgreen:\"#00ff7f\",tan:\"#d2b48c\",teal:\"#008080\",thistle:\"#d8bfd8\",transparent:\"#00000000\",turquoise:\"#40e0d0\",violet:\"#ee82ee\",wheat:\"#f5deb3\",white:\"#ffffff\",whitesmoke:\"#f5f5f5\",yellow:\"#ffff00\",yellowgreen:\"#9acd32\"},parse:t=>{t=t.toLowerCase();const e=ot.colors[t];if(e)return rt.parse(e)},stringify:t=>{const e=rt.stringify(t);for(const t in ot.colors)if(ot.colors[t]===e)return t}},st=ot,ct={re:/^rgba?\\(\\s*?(-?(?:\\d+(?:\\.\\d+)?|(?:\\.\\d+))(?:e\\d+)?(%?))\\s*?(?:,|\\s)\\s*?(-?(?:\\d+(?:\\.\\d+)?|(?:\\.\\d+))(?:e\\d+)?(%?))\\s*?(?:,|\\s)\\s*?(-?(?:\\d+(?:\\.\\d+)?|(?:\\.\\d+))(?:e\\d+)?(%?))(?:\\s*?(?:,|\\/)\\s*?\\+?(-?(?:\\d+(?:\\.\\d+)?|(?:\\.\\d+))(?:e\\d+)?(%?)))?\\s*?\\)$/i,parse:t=>{const e=t.charCodeAt(0);if(114!==e&&82!==e)return;const n=t.match(ct.re);if(!n)return;const[,r,i,a,o,s,c,l,u]=n;return et.set({r:J.channel.clamp.r(i?2.55*parseFloat(r):parseFloat(r)),g:J.channel.clamp.g(o?2.55*parseFloat(a):parseFloat(a)),b:J.channel.clamp.b(c?2.55*parseFloat(s):parseFloat(s)),a:l?J.channel.clamp.a(u?parseFloat(l)/100:parseFloat(l)):1},t)},stringify:t=>{const{r:e,g:n,b:r,a:i}=t;return i<1?`rgba(${J.lang.round(e)}, ${J.lang.round(n)}, ${J.lang.round(r)}, ${J.lang.round(i)})`:`rgb(${J.lang.round(e)}, ${J.lang.round(n)}, ${J.lang.round(r)})`}},lt=ct,ut={format:{keyword:st,hex:rt,rgb:lt,rgba:lt,hsl:at,hsla:at},parse:t=>{if(\"string\"!=typeof t)return t;const e=rt.parse(t)||lt.parse(t)||at.parse(t)||st.parse(t);if(e)return e;throw new Error(`Unsupported color format: \"${t}\"`)},stringify:t=>!t.changed&&t.color?t.color:t.type.is(2)||void 0===t.data.r?at.stringify(t):t.a<1||!Number.isInteger(t.r)||!Number.isInteger(t.g)||!Number.isInteger(t.b)?lt.stringify(t):rt.stringify(t)},ht=(t,e)=>{const n=ut.parse(t);for(const t in e)n[t]=J.channel.clamp[t](e[t]);return ut.stringify(n)},ft=(t,e)=>{const n=ut.parse(t),r={};for(const t in e)e[t]&&(r[t]=n[t]+e[t]);return ht(t,r)},dt=(t,e,n=0,r=1)=>{if(\"number\"!=typeof t)return ht(t,{a:e});const i=et.set({r:J.channel.clamp.r(t),g:J.channel.clamp.g(e),b:J.channel.clamp.b(n),a:J.channel.clamp.a(r)});return ut.stringify(i)},pt=(t,e=100)=>{const n=ut.parse(t);return n.r=255-n.r,n.g=255-n.g,n.b=255-n.b,((t,e,n=50)=>{const{r,g:i,b:a,a:o}=ut.parse(t),{r:s,g:c,b:l,a:u}=ut.parse(e),h=n/100,f=2*h-1,d=o-u,p=((f*d==-1?f:(f+d)/(1+f*d))+1)/2,g=1-p;return dt(r*p+s*g,i*p+c*g,a*p+l*g,o*h+u*(1-h))})(n,t,e)},gt=(t,e,n)=>{const r=ut.parse(t),i=r[e],a=J.channel.clamp[e](i+n);return i!==a&&(r[e]=a),ut.stringify(r)},yt=(t,e)=>gt(t,\"l\",-e),mt=(t,e)=>gt(t,\"l\",e);var bt=function(t,e){return ft(t,e?{s:-40,l:10}:{s:-40,l:-10})};function vt(t){return vt=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&\"function\"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?\"symbol\":typeof t},vt(t)}function _t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,\"value\"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r);}}var xt=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError(\"Cannot call a class as a function\")}(this,t),this.background=\"#f4f4f4\",this.darkMode=!1,this.primaryColor=\"#fff4dd\",this.noteBkgColor=\"#fff5ad\",this.noteTextColor=\"#333\",this.fontFamily='\"trebuchet ms\", verdana, arial, sans-serif',this.fontSize=\"16px\";}var e,n;return e=t,n=[{key:\"updateColors\",value:function(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?\"#eee\":\"#333\"),this.secondaryColor=this.secondaryColor||ft(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||ft(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||bt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||bt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||bt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||bt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||\"#fff5ad\",this.noteTextColor=this.noteTextColor||\"#333\",this.secondaryTextColor=this.secondaryTextColor||pt(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||pt(this.tertiaryColor),this.lineColor=this.lineColor||pt(this.background),this.textColor=this.textColor||this.primaryTextColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?yt(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||\"grey\",this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||yt(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||pt(this.lineColor),this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||\"white\",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||\"#eeeeee\",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||mt(this.primaryColor,23),this.gridColor=this.gridColor||\"lightgrey\",this.doneTaskBkgColor=this.doneTaskBkgColor||\"lightgrey\",this.doneTaskBorderColor=this.doneTaskBorderColor||\"grey\",this.critBorderColor=this.critBorderColor||\"#ff8888\",this.critBkgColor=this.critBkgColor||\"red\",this.todayLineColor=this.todayLineColor||\"red\",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||\"#003163\",this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||this.tertiaryColor,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||ft(this.primaryColor,{h:64}),this.fillType3=this.fillType3||ft(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||ft(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||ft(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||ft(this.primaryColor,{h:128}),this.fillType7=this.fillType7||ft(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||ft(this.primaryColor,{l:-10}),this.pie5=this.pie5||ft(this.secondaryColor,{l:-10}),this.pie6=this.pie6||ft(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||ft(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||ft(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||ft(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||ft(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||ft(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||ft(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||\"25px\",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||\"17px\",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||\"17px\",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||\"black\",this.pieStrokeWidth=this.pieStrokeWidth||\"2px\",this.pieOpacity=this.pieOpacity||\"0.7\",this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||this.primaryBorderColor,this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?yt(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||ft(this.primaryColor,{h:-30}),this.git4=this.git4||ft(this.primaryColor,{h:-60}),this.git5=this.git5||ft(this.primaryColor,{h:-90}),this.git6=this.git6||ft(this.primaryColor,{h:60}),this.git7=this.git7||ft(this.primaryColor,{h:120}),this.darkMode?(this.git0=mt(this.git0,25),this.git1=mt(this.git1,25),this.git2=mt(this.git2,25),this.git3=mt(this.git3,25),this.git4=mt(this.git4,25),this.git5=mt(this.git5,25),this.git6=mt(this.git6,25),this.git7=mt(this.git7,25)):(this.git0=yt(this.git0,25),this.git1=yt(this.git1,25),this.git2=yt(this.git2,25),this.git3=yt(this.git3,25),this.git4=yt(this.git4,25),this.git5=yt(this.git5,25),this.git6=yt(this.git6,25),this.git7=yt(this.git7,25)),this.gitInv0=this.gitInv0||pt(this.git0),this.gitInv1=this.gitInv1||pt(this.git1),this.gitInv2=this.gitInv2||pt(this.git2),this.gitInv3=this.gitInv3||pt(this.git3),this.gitInv4=this.gitInv4||pt(this.git4),this.gitInv5=this.gitInv5||pt(this.git5),this.gitInv6=this.gitInv6||pt(this.git6),this.gitInv7=this.gitInv7||pt(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?\"black\":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||\"10px\",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||\"10px\";}},{key:\"calculate\",value:function(t){var e=this;if(\"object\"===vt(t)){var n=Object.keys(t);n.forEach((function(n){e[n]=t[n];})),this.updateColors(),n.forEach((function(n){e[n]=t[n];}));}else this.updateColors();}}],n&&_t(e.prototype,n),Object.defineProperty(e,\"prototype\",{writable:!1}),t}();function kt(t){return kt=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&\"function\"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?\"symbol\":typeof t},kt(t)}function wt(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,\"value\"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r);}}var Tt=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError(\"Cannot call a class as a function\")}(this,t),this.background=\"#333\",this.primaryColor=\"#1f2020\",this.secondaryColor=mt(this.primaryColor,16),this.tertiaryColor=ft(this.primaryColor,{h:-160}),this.primaryBorderColor=pt(this.background),this.secondaryBorderColor=bt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=bt(this.tertiaryColor,this.darkMode),this.primaryTextColor=pt(this.primaryColor),this.secondaryTextColor=pt(this.secondaryColor),this.tertiaryTextColor=pt(this.tertiaryColor),this.lineColor=pt(this.background),this.textColor=pt(this.background),this.mainBkg=\"#1f2020\",this.secondBkg=\"calculated\",this.mainContrastColor=\"lightgrey\",this.darkTextColor=mt(pt(\"#323D47\"),10),this.lineColor=\"calculated\",this.border1=\"#81B1DB\",this.border2=dt(255,255,255,.25),this.arrowheadColor=\"calculated\",this.fontFamily='\"trebuchet ms\", verdana, arial, sans-serif',this.fontSize=\"16px\",this.labelBackground=\"#181818\",this.textColor=\"#ccc\",this.nodeBkg=\"calculated\",this.nodeBorder=\"calculated\",this.clusterBkg=\"calculated\",this.clusterBorder=\"calculated\",this.defaultLinkColor=\"calculated\",this.titleColor=\"#F9FFFE\",this.edgeLabelBackground=\"calculated\",this.actorBorder=\"calculated\",this.actorBkg=\"calculated\",this.actorTextColor=\"calculated\",this.actorLineColor=\"calculated\",this.signalColor=\"calculated\",this.signalTextColor=\"calculated\",this.labelBoxBkgColor=\"calculated\",this.labelBoxBorderColor=\"calculated\",this.labelTextColor=\"calculated\",this.loopTextColor=\"calculated\",this.noteBorderColor=\"calculated\",this.noteBkgColor=\"#fff5ad\",this.noteTextColor=\"calculated\",this.activationBorderColor=\"calculated\",this.activationBkgColor=\"calculated\",this.sequenceNumberColor=\"black\",this.sectionBkgColor=yt(\"#EAE8D9\",30),this.altSectionBkgColor=\"calculated\",this.sectionBkgColor2=\"#EAE8D9\",this.taskBorderColor=dt(255,255,255,70),this.taskBkgColor=\"calculated\",this.taskTextColor=\"calculated\",this.taskTextLightColor=\"calculated\",this.taskTextOutsideColor=\"calculated\",this.taskTextClickableColor=\"#003163\",this.activeTaskBorderColor=dt(255,255,255,50),this.activeTaskBkgColor=\"#81B1DB\",this.gridColor=\"calculated\",this.doneTaskBkgColor=\"calculated\",this.doneTaskBorderColor=\"grey\",this.critBorderColor=\"#E83737\",this.critBkgColor=\"#E83737\",this.taskTextDarkColor=\"calculated\",this.todayLineColor=\"#DB5757\",this.personBorder=\"calculated\",this.personBkg=\"calculated\",this.labelColor=\"calculated\",this.errorBkgColor=\"#a44141\",this.errorTextColor=\"#ddd\";}var e,n;return e=t,n=[{key:\"updateColors\",value:function(){this.secondBkg=mt(this.mainBkg,16),this.lineColor=this.mainContrastColor,this.arrowheadColor=this.mainContrastColor,this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.edgeLabelBackground=mt(this.labelBackground,25),this.actorBorder=this.border1,this.actorBkg=this.mainBkg,this.actorTextColor=this.mainContrastColor,this.actorLineColor=this.mainContrastColor,this.signalColor=this.mainContrastColor,this.signalTextColor=this.mainContrastColor,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.mainContrastColor,this.loopTextColor=this.mainContrastColor,this.noteBorderColor=this.secondaryBorderColor,this.noteBkgColor=this.secondBkg,this.noteTextColor=this.secondaryTextColor,this.activationBorderColor=this.border1,this.activationBkgColor=this.secondBkg,this.altSectionBkgColor=this.background,this.taskBkgColor=mt(this.mainBkg,23),this.taskTextColor=this.darkTextColor,this.taskTextLightColor=this.mainContrastColor,this.taskTextOutsideColor=this.taskTextLightColor,this.gridColor=this.mainContrastColor,this.doneTaskBkgColor=this.mainContrastColor,this.taskTextDarkColor=this.darkTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||\"#555\",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor=\"#f4f4f4\",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=ft(this.primaryColor,{h:64}),this.fillType3=ft(this.secondaryColor,{h:64}),this.fillType4=ft(this.primaryColor,{h:-64}),this.fillType5=ft(this.secondaryColor,{h:-64}),this.fillType6=ft(this.primaryColor,{h:128}),this.fillType7=ft(this.secondaryColor,{h:128}),this.pie1=this.pie1||\"#0b0000\",this.pie2=this.pie2||\"#4d1037\",this.pie3=this.pie3||\"#3f5258\",this.pie4=this.pie4||\"#4f2f1b\",this.pie5=this.pie5||\"#6e0a0a\",this.pie6=this.pie6||\"#3b0048\",this.pie7=this.pie7||\"#995a01\",this.pie8=this.pie8||\"#154706\",this.pie9=this.pie9||\"#161722\",this.pie10=this.pie10||\"#00296f\",this.pie11=this.pie11||\"#01629c\",this.pie12=this.pie12||\"#010029\",this.pieTitleTextSize=this.pieTitleTextSize||\"25px\",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||\"17px\",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||\"17px\",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||\"black\",this.pieStrokeWidth=this.pieStrokeWidth||\"2px\",this.pieOpacity=this.pieOpacity||\"0.7\",this.classText=this.primaryTextColor,this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||this.primaryBorderColor,this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?yt(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=mt(this.secondaryColor,20),this.git1=mt(this.pie2||this.secondaryColor,20),this.git2=mt(this.pie3||this.tertiaryColor,20),this.git3=mt(this.pie4||ft(this.primaryColor,{h:-30}),20),this.git4=mt(this.pie5||ft(this.primaryColor,{h:-60}),20),this.git5=mt(this.pie6||ft(this.primaryColor,{h:-90}),10),this.git6=mt(this.pie7||ft(this.primaryColor,{h:60}),10),this.git7=mt(this.pie8||ft(this.primaryColor,{h:120}),20),this.gitInv0=this.gitInv0||pt(this.git0),this.gitInv1=this.gitInv1||pt(this.git1),this.gitInv2=this.gitInv2||pt(this.git2),this.gitInv3=this.gitInv3||pt(this.git3),this.gitInv4=this.gitInv4||pt(this.git4),this.gitInv5=this.gitInv5||pt(this.git5),this.gitInv6=this.gitInv6||pt(this.git6),this.gitInv7=this.gitInv7||pt(this.git7),this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||\"10px\",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||\"10px\";}},{key:\"calculate\",value:function(t){var e=this;if(\"object\"===kt(t)){var n=Object.keys(t);n.forEach((function(n){e[n]=t[n];})),this.updateColors(),n.forEach((function(n){e[n]=t[n];}));}else this.updateColors();}}],n&&wt(e.prototype,n),Object.defineProperty(e,\"prototype\",{writable:!1}),t}();function Et(t){return Et=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&\"function\"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?\"symbol\":typeof t},Et(t)}function Ct(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,\"value\"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r);}}var St=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError(\"Cannot call a class as a function\")}(this,t),this.background=\"#f4f4f4\",this.primaryColor=\"#ECECFF\",this.secondaryColor=ft(this.primaryColor,{h:120}),this.secondaryColor=\"#ffffde\",this.tertiaryColor=ft(this.primaryColor,{h:-160}),this.primaryBorderColor=bt(this.primaryColor,this.darkMode),this.secondaryBorderColor=bt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=bt(this.tertiaryColor,this.darkMode),this.primaryTextColor=pt(this.primaryColor),this.secondaryTextColor=pt(this.secondaryColor),this.tertiaryTextColor=pt(this.tertiaryColor),this.lineColor=pt(this.background),this.textColor=pt(this.background),this.background=\"white\",this.mainBkg=\"#ECECFF\",this.secondBkg=\"#ffffde\",this.lineColor=\"#333333\",this.border1=\"#9370DB\",this.border2=\"#aaaa33\",this.arrowheadColor=\"#333333\",this.fontFamily='\"trebuchet ms\", verdana, arial, sans-serif',this.fontSize=\"16px\",this.labelBackground=\"#e8e8e8\",this.textColor=\"#333\",this.nodeBkg=\"calculated\",this.nodeBorder=\"calculated\",this.clusterBkg=\"calculated\",this.clusterBorder=\"calculated\",this.defaultLinkColor=\"calculated\",this.titleColor=\"calculated\",this.edgeLabelBackground=\"calculated\",this.actorBorder=\"calculated\",this.actorBkg=\"calculated\",this.actorTextColor=\"black\",this.actorLineColor=\"grey\",this.signalColor=\"calculated\",this.signalTextColor=\"calculated\",this.labelBoxBkgColor=\"calculated\",this.labelBoxBorderColor=\"calculated\",this.labelTextColor=\"calculated\",this.loopTextColor=\"calculated\",this.noteBorderColor=\"calculated\",this.noteBkgColor=\"#fff5ad\",this.noteTextColor=\"calculated\",this.activationBorderColor=\"#666\",this.activationBkgColor=\"#f4f4f4\",this.sequenceNumberColor=\"white\",this.sectionBkgColor=\"calculated\",this.altSectionBkgColor=\"calculated\",this.sectionBkgColor2=\"calculated\",this.excludeBkgColor=\"#eeeeee\",this.taskBorderColor=\"calculated\",this.taskBkgColor=\"calculated\",this.taskTextLightColor=\"calculated\",this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor=\"calculated\",this.taskTextOutsideColor=this.taskTextDarkColor,this.taskTextClickableColor=\"calculated\",this.activeTaskBorderColor=\"calculated\",this.activeTaskBkgColor=\"calculated\",this.gridColor=\"calculated\",this.doneTaskBkgColor=\"calculated\",this.doneTaskBorderColor=\"calculated\",this.critBorderColor=\"calculated\",this.critBkgColor=\"calculated\",this.todayLineColor=\"calculated\",this.sectionBkgColor=dt(102,102,255,.49),this.altSectionBkgColor=\"white\",this.sectionBkgColor2=\"#fff400\",this.taskBorderColor=\"#534fbc\",this.taskBkgColor=\"#8a90dd\",this.taskTextLightColor=\"white\",this.taskTextColor=\"calculated\",this.taskTextDarkColor=\"black\",this.taskTextOutsideColor=\"calculated\",this.taskTextClickableColor=\"#003163\",this.activeTaskBorderColor=\"#534fbc\",this.activeTaskBkgColor=\"#bfc7ff\",this.gridColor=\"lightgrey\",this.doneTaskBkgColor=\"lightgrey\",this.doneTaskBorderColor=\"grey\",this.critBorderColor=\"#ff8888\",this.critBkgColor=\"red\",this.todayLineColor=\"red\",this.personBorder=\"calculated\",this.personBkg=\"calculated\",this.labelColor=\"black\",this.errorBkgColor=\"#552222\",this.errorTextColor=\"#552222\",this.updateColors();}var e,n;return e=t,n=[{key:\"updateColors\",value:function(){this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.textColor,this.edgeLabelBackground=this.labelBackground,this.actorBorder=mt(this.border1,23),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.signalColor=this.textColor,this.signalTextColor=this.textColor,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||\"#f0f0f0\",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.specialStateColor=this.lineColor,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=ft(this.primaryColor,{h:64}),this.fillType3=ft(this.secondaryColor,{h:64}),this.fillType4=ft(this.primaryColor,{h:-64}),this.fillType5=ft(this.secondaryColor,{h:-64}),this.fillType6=ft(this.primaryColor,{h:128}),this.fillType7=ft(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||ft(this.tertiaryColor,{l:-40}),this.pie4=this.pie4||ft(this.primaryColor,{l:-10}),this.pie5=this.pie5||ft(this.secondaryColor,{l:-30}),this.pie6=this.pie6||ft(this.tertiaryColor,{l:-20}),this.pie7=this.pie7||ft(this.primaryColor,{h:60,l:-20}),this.pie8=this.pie8||ft(this.primaryColor,{h:-60,l:-40}),this.pie9=this.pie9||ft(this.primaryColor,{h:120,l:-40}),this.pie10=this.pie10||ft(this.primaryColor,{h:60,l:-40}),this.pie11=this.pie11||ft(this.primaryColor,{h:-90,l:-40}),this.pie12=this.pie12||ft(this.primaryColor,{h:120,l:-30}),this.pieTitleTextSize=this.pieTitleTextSize||\"25px\",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||\"17px\",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||\"17px\",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||\"black\",this.pieStrokeWidth=this.pieStrokeWidth||\"2px\",this.pieOpacity=this.pieOpacity||\"0.7\",this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||this.primaryBorderColor,this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.labelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||ft(this.primaryColor,{h:-30}),this.git4=this.git4||ft(this.primaryColor,{h:-60}),this.git5=this.git5||ft(this.primaryColor,{h:-90}),this.git6=this.git6||ft(this.primaryColor,{h:60}),this.git7=this.git7||ft(this.primaryColor,{h:120}),this.darkMode?(this.git0=mt(this.git0,25),this.git1=mt(this.git1,25),this.git2=mt(this.git2,25),this.git3=mt(this.git3,25),this.git4=mt(this.git4,25),this.git5=mt(this.git5,25),this.git6=mt(this.git6,25),this.git7=mt(this.git7,25)):(this.git0=yt(this.git0,25),this.git1=yt(this.git1,25),this.git2=yt(this.git2,25),this.git3=yt(this.git3,25),this.git4=yt(this.git4,25),this.git5=yt(this.git5,25),this.git6=yt(this.git6,25),this.git7=yt(this.git7,25)),this.gitInv0=this.gitInv0||yt(pt(this.git0),25),this.gitInv1=this.gitInv1||pt(this.git1),this.gitInv2=this.gitInv2||pt(this.git2),this.gitInv3=this.gitInv3||pt(this.git3),this.gitInv4=this.gitInv4||pt(this.git4),this.gitInv5=this.gitInv5||pt(this.git5),this.gitInv6=this.gitInv6||pt(this.git6),this.gitInv7=this.gitInv7||pt(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||pt(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||pt(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||\"10px\",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||\"10px\";}},{key:\"calculate\",value:function(t){var e=this;if(\"object\"===Et(t)){var n=Object.keys(t);n.forEach((function(n){e[n]=t[n];})),this.updateColors(),n.forEach((function(n){e[n]=t[n];}));}else this.updateColors();}}],n&&Ct(e.prototype,n),Object.defineProperty(e,\"prototype\",{writable:!1}),t}();function At(t){return At=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&\"function\"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?\"symbol\":typeof t},At(t)}function Mt(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,\"value\"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r);}}var Nt=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError(\"Cannot call a class as a function\")}(this,t),this.background=\"#f4f4f4\",this.primaryColor=\"#cde498\",this.secondaryColor=\"#cdffb2\",this.background=\"white\",this.mainBkg=\"#cde498\",this.secondBkg=\"#cdffb2\",this.lineColor=\"green\",this.border1=\"#13540c\",this.border2=\"#6eaa49\",this.arrowheadColor=\"green\",this.fontFamily='\"trebuchet ms\", verdana, arial, sans-serif',this.fontSize=\"16px\",this.tertiaryColor=mt(\"#cde498\",10),this.primaryBorderColor=bt(this.primaryColor,this.darkMode),this.secondaryBorderColor=bt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=bt(this.tertiaryColor,this.darkMode),this.primaryTextColor=pt(this.primaryColor),this.secondaryTextColor=pt(this.secondaryColor),this.tertiaryTextColor=pt(this.primaryColor),this.lineColor=pt(this.background),this.textColor=pt(this.background),this.nodeBkg=\"calculated\",this.nodeBorder=\"calculated\",this.clusterBkg=\"calculated\",this.clusterBorder=\"calculated\",this.defaultLinkColor=\"calculated\",this.titleColor=\"#333\",this.edgeLabelBackground=\"#e8e8e8\",this.actorBorder=\"calculated\",this.actorBkg=\"calculated\",this.actorTextColor=\"black\",this.actorLineColor=\"grey\",this.signalColor=\"#333\",this.signalTextColor=\"#333\",this.labelBoxBkgColor=\"calculated\",this.labelBoxBorderColor=\"#326932\",this.labelTextColor=\"calculated\",this.loopTextColor=\"calculated\",this.noteBorderColor=\"calculated\",this.noteBkgColor=\"#fff5ad\",this.noteTextColor=\"calculated\",this.activationBorderColor=\"#666\",this.activationBkgColor=\"#f4f4f4\",this.sequenceNumberColor=\"white\",this.sectionBkgColor=\"#6eaa49\",this.altSectionBkgColor=\"white\",this.sectionBkgColor2=\"#6eaa49\",this.excludeBkgColor=\"#eeeeee\",this.taskBorderColor=\"calculated\",this.taskBkgColor=\"#487e3a\",this.taskTextLightColor=\"white\",this.taskTextColor=\"calculated\",this.taskTextDarkColor=\"black\",this.taskTextOutsideColor=\"calculated\",this.taskTextClickableColor=\"#003163\",this.activeTaskBorderColor=\"calculated\",this.activeTaskBkgColor=\"calculated\",this.gridColor=\"lightgrey\",this.doneTaskBkgColor=\"lightgrey\",this.doneTaskBorderColor=\"grey\",this.critBorderColor=\"#ff8888\",this.critBkgColor=\"red\",this.todayLineColor=\"red\",this.personBorder=\"calculated\",this.personBkg=\"calculated\",this.labelColor=\"black\",this.errorBkgColor=\"#552222\",this.errorTextColor=\"#552222\";}var e,n;return e=t,n=[{key:\"updateColors\",value:function(){this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.actorBorder=yt(this.mainBkg,20),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.taskBorderColor=this.border1,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.activeTaskBorderColor=this.taskBorderColor,this.activeTaskBkgColor=this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||\"#f0f0f0\",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor=this.lineColor,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=ft(this.primaryColor,{h:64}),this.fillType3=ft(this.secondaryColor,{h:64}),this.fillType4=ft(this.primaryColor,{h:-64}),this.fillType5=ft(this.secondaryColor,{h:-64}),this.fillType6=ft(this.primaryColor,{h:128}),this.fillType7=ft(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||ft(this.primaryColor,{l:-30}),this.pie5=this.pie5||ft(this.secondaryColor,{l:-30}),this.pie6=this.pie6||ft(this.tertiaryColor,{h:40,l:-40}),this.pie7=this.pie7||ft(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||ft(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||ft(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||ft(this.primaryColor,{h:60,l:-50}),this.pie11=this.pie11||ft(this.primaryColor,{h:-60,l:-50}),this.pie12=this.pie12||ft(this.primaryColor,{h:120,l:-50}),this.pieTitleTextSize=this.pieTitleTextSize||\"25px\",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||\"17px\",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||\"17px\",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||\"black\",this.pieStrokeWidth=this.pieStrokeWidth||\"2px\",this.pieOpacity=this.pieOpacity||\"0.7\",this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||this.primaryBorderColor,this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||ft(this.primaryColor,{h:-30}),this.git4=this.git4||ft(this.primaryColor,{h:-60}),this.git5=this.git5||ft(this.primaryColor,{h:-90}),this.git6=this.git6||ft(this.primaryColor,{h:60}),this.git7=this.git7||ft(this.primaryColor,{h:120}),this.darkMode?(this.git0=mt(this.git0,25),this.git1=mt(this.git1,25),this.git2=mt(this.git2,25),this.git3=mt(this.git3,25),this.git4=mt(this.git4,25),this.git5=mt(this.git5,25),this.git6=mt(this.git6,25),this.git7=mt(this.git7,25)):(this.git0=yt(this.git0,25),this.git1=yt(this.git1,25),this.git2=yt(this.git2,25),this.git3=yt(this.git3,25),this.git4=yt(this.git4,25),this.git5=yt(this.git5,25),this.git6=yt(this.git6,25),this.git7=yt(this.git7,25)),this.gitInv0=this.gitInv0||pt(this.git0),this.gitInv1=this.gitInv1||pt(this.git1),this.gitInv2=this.gitInv2||pt(this.git2),this.gitInv3=this.gitInv3||pt(this.git3),this.gitInv4=this.gitInv4||pt(this.git4),this.gitInv5=this.gitInv5||pt(this.git5),this.gitInv6=this.gitInv6||pt(this.git6),this.gitInv7=this.gitInv7||pt(this.git7),this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||\"10px\",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||\"10px\";}},{key:\"calculate\",value:function(t){var e=this;if(\"object\"===At(t)){var n=Object.keys(t);n.forEach((function(n){e[n]=t[n];})),this.updateColors(),n.forEach((function(n){e[n]=t[n];}));}else this.updateColors();}}],n&&Mt(e.prototype,n),Object.defineProperty(e,\"prototype\",{writable:!1}),t}();function Ot(t){return Ot=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&\"function\"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?\"symbol\":typeof t},Ot(t)}function Dt(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,\"value\"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r);}}var Bt=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError(\"Cannot call a class as a function\")}(this,t),this.primaryColor=\"#eee\",this.contrast=\"#707070\",this.secondaryColor=mt(this.contrast,55),this.background=\"#ffffff\",this.tertiaryColor=ft(this.primaryColor,{h:-160}),this.primaryBorderColor=bt(this.primaryColor,this.darkMode),this.secondaryBorderColor=bt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=bt(this.tertiaryColor,this.darkMode),this.primaryTextColor=pt(this.primaryColor),this.secondaryTextColor=pt(this.secondaryColor),this.tertiaryTextColor=pt(this.tertiaryColor),this.lineColor=pt(this.background),this.textColor=pt(this.background),this.mainBkg=\"#eee\",this.secondBkg=\"calculated\",this.lineColor=\"#666\",this.border1=\"#999\",this.border2=\"calculated\",this.note=\"#ffa\",this.text=\"#333\",this.critical=\"#d42\",this.done=\"#bbb\",this.arrowheadColor=\"#333333\",this.fontFamily='\"trebuchet ms\", verdana, arial, sans-serif',this.fontSize=\"16px\",this.nodeBkg=\"calculated\",this.nodeBorder=\"calculated\",this.clusterBkg=\"calculated\",this.clusterBorder=\"calculated\",this.defaultLinkColor=\"calculated\",this.titleColor=\"calculated\",this.edgeLabelBackground=\"white\",this.actorBorder=\"calculated\",this.actorBkg=\"calculated\",this.actorTextColor=\"calculated\",this.actorLineColor=\"calculated\",this.signalColor=\"calculated\",this.signalTextColor=\"calculated\",this.labelBoxBkgColor=\"calculated\",this.labelBoxBorderColor=\"calculated\",this.labelTextColor=\"calculated\",this.loopTextColor=\"calculated\",this.noteBorderColor=\"calculated\",this.noteBkgColor=\"calculated\",this.noteTextColor=\"calculated\",this.activationBorderColor=\"#666\",this.activationBkgColor=\"#f4f4f4\",this.sequenceNumberColor=\"white\",this.sectionBkgColor=\"calculated\",this.altSectionBkgColor=\"white\",this.sectionBkgColor2=\"calculated\",this.excludeBkgColor=\"#eeeeee\",this.taskBorderColor=\"calculated\",this.taskBkgColor=\"calculated\",this.taskTextLightColor=\"white\",this.taskTextColor=\"calculated\",this.taskTextDarkColor=\"calculated\",this.taskTextOutsideColor=\"calculated\",this.taskTextClickableColor=\"#003163\",this.activeTaskBorderColor=\"calculated\",this.activeTaskBkgColor=\"calculated\",this.gridColor=\"calculated\",this.doneTaskBkgColor=\"calculated\",this.doneTaskBorderColor=\"calculated\",this.critBkgColor=\"calculated\",this.critBorderColor=\"calculated\",this.todayLineColor=\"calculated\",this.personBorder=\"calculated\",this.personBkg=\"calculated\",this.labelColor=\"black\",this.errorBkgColor=\"#552222\",this.errorTextColor=\"#552222\";}var e,n;return e=t,n=[{key:\"updateColors\",value:function(){this.secondBkg=mt(this.contrast,55),this.border2=this.contrast,this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.text,this.actorBorder=mt(this.border1,23),this.actorBkg=this.mainBkg,this.actorTextColor=this.text,this.actorLineColor=this.lineColor,this.signalColor=this.text,this.signalTextColor=this.text,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.text,this.loopTextColor=this.text,this.noteBorderColor=\"#999\",this.noteBkgColor=\"#666\",this.noteTextColor=\"#fff\",this.sectionBkgColor=mt(this.contrast,30),this.sectionBkgColor2=mt(this.contrast,30),this.taskBorderColor=yt(this.contrast,10),this.taskBkgColor=this.contrast,this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor=this.text,this.taskTextOutsideColor=this.taskTextDarkColor,this.activeTaskBorderColor=this.taskBorderColor,this.activeTaskBkgColor=this.mainBkg,this.gridColor=mt(this.border1,30),this.doneTaskBkgColor=this.done,this.doneTaskBorderColor=this.lineColor,this.critBkgColor=this.critical,this.critBorderColor=yt(this.critBkgColor,10),this.todayLineColor=this.critBkgColor,this.transitionColor=this.transitionColor||\"#000\",this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||\"#f4f4f4\",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.stateBorder=this.stateBorder||\"#000\",this.innerEndBackground=this.primaryBorderColor,this.specialStateColor=\"#222\",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=ft(this.primaryColor,{h:64}),this.fillType3=ft(this.secondaryColor,{h:64}),this.fillType4=ft(this.primaryColor,{h:-64}),this.fillType5=ft(this.secondaryColor,{h:-64}),this.fillType6=ft(this.primaryColor,{h:128}),this.fillType7=ft(this.secondaryColor,{h:128}),this.pie1=this.pie1||\"#F4F4F4\",this.pie2=this.pie2||\"#555\",this.pie3=this.pie3||\"#BBB\",this.pie4=this.pie4||\"#777\",this.pie5=this.pie5||\"#999\",this.pie6=this.pie6||\"#DDD\",this.pie7=this.pie7||\"#FFF\",this.pie8=this.pie8||\"#DDD\",this.pie9=this.pie9||\"#BBB\",this.pie10=this.pie10||\"#999\",this.pie11=this.pie11||\"#777\",this.pie12=this.pie12||\"#555\",this.pieTitleTextSize=this.pieTitleTextSize||\"25px\",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||\"17px\",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||\"17px\",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||\"black\",this.pieStrokeWidth=this.pieStrokeWidth||\"2px\",this.pieOpacity=this.pieOpacity||\"0.7\",this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||this.primaryBorderColor,this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=yt(this.pie1,25)||this.primaryColor,this.git1=this.pie2||this.secondaryColor,this.git2=this.pie3||this.tertiaryColor,this.git3=this.pie4||ft(this.primaryColor,{h:-30}),this.git4=this.pie5||ft(this.primaryColor,{h:-60}),this.git5=this.pie6||ft(this.primaryColor,{h:-90}),this.git6=this.pie7||ft(this.primaryColor,{h:60}),this.git7=this.pie8||ft(this.primaryColor,{h:120}),this.gitInv0=this.gitInv0||pt(this.git0),this.gitInv1=this.gitInv1||pt(this.git1),this.gitInv2=this.gitInv2||pt(this.git2),this.gitInv3=this.gitInv3||pt(this.git3),this.gitInv4=this.gitInv4||pt(this.git4),this.gitInv5=this.gitInv5||pt(this.git5),this.gitInv6=this.gitInv6||pt(this.git6),this.gitInv7=this.gitInv7||pt(this.git7),this.branchLabelColor=this.branchLabelColor||this.labelTextColor,this.gitBranchLabel0=this.branchLabelColor,this.gitBranchLabel1=\"white\",this.gitBranchLabel2=this.branchLabelColor,this.gitBranchLabel3=\"white\",this.gitBranchLabel4=this.branchLabelColor,this.gitBranchLabel5=this.branchLabelColor,this.gitBranchLabel6=this.branchLabelColor,this.gitBranchLabel7=this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||\"10px\",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||\"10px\";}},{key:\"calculate\",value:function(t){var e=this;if(\"object\"===Ot(t)){var n=Object.keys(t);n.forEach((function(n){e[n]=t[n];})),this.updateColors(),n.forEach((function(n){e[n]=t[n];}));}else this.updateColors();}}],n&&Dt(e.prototype,n),Object.defineProperty(e,\"prototype\",{writable:!1}),t}();const Lt={base:{getThemeVariables:function(t){var e=new xt;return e.calculate(t),e}},dark:{getThemeVariables:function(t){var e=new Tt;return e.calculate(t),e}},default:{getThemeVariables:function(t){var e=new St;return e.calculate(t),e}},forest:{getThemeVariables:function(t){var e=new Nt;return e.calculate(t),e}},neutral:{getThemeVariables:function(t){var e=new Bt;return e.calculate(t),e}}};function It(t){return function(t){if(Array.isArray(t))return Ft(t)}(t)||function(t){if(\"undefined\"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t[\"@@iterator\"])return Array.from(t)}(t)||function(t,e){if(t){if(\"string\"==typeof t)return Ft(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return \"Object\"===n&&t.constructor&&(n=t.constructor.name),\"Map\"===n||\"Set\"===n?Array.from(t):\"Arguments\"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ft(t,e):void 0}}(t)||function(){throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\")}()}function Ft(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Rt(t){return Rt=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&\"function\"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?\"symbol\":typeof t},Rt(t)}var Pt={theme:\"default\",themeVariables:Lt.default.getThemeVariables(),themeCSS:void 0,maxTextSize:5e4,darkMode:!1,fontFamily:'\"trebuchet ms\", verdana, arial, sans-serif;',logLevel:5,securityLevel:\"strict\",startOnLoad:!0,arrowMarkerAbsolute:!1,secure:[\"secure\",\"securityLevel\",\"startOnLoad\",\"maxTextSize\"],deterministicIds:!1,deterministicIDSeed:void 0,flowchart:{diagramPadding:8,htmlLabels:!0,nodeSpacing:50,rankSpacing:50,curve:\"basis\",padding:15,useMaxWidth:!0,defaultRenderer:\"dagre-d3\"},sequence:{hideUnusedParticipants:!1,activationWidth:10,diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:\"center\",mirrorActors:!0,forceMenus:!1,bottomMarginAdj:1,useMaxWidth:!0,rightAngles:!1,showSequenceNumbers:!1,actorFontSize:14,actorFontFamily:'\"Open Sans\", sans-serif',actorFontWeight:400,noteFontSize:14,noteFontFamily:'\"trebuchet ms\", verdana, arial, sans-serif',noteFontWeight:400,noteAlign:\"center\",messageFontSize:16,messageFontFamily:'\"trebuchet ms\", verdana, arial, sans-serif',messageFontWeight:400,wrap:!1,wrapPadding:10,labelBoxWidth:50,labelBoxHeight:20,messageFont:function(){return {fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},noteFont:function(){return {fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},actorFont:function(){return {fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}}},gantt:{titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,rightPadding:75,leftPadding:75,gridLineStartPadding:35,fontSize:11,sectionFontSize:11,numberSectionStyles:4,axisFormat:\"%Y-%m-%d\",useMaxWidth:!0,topAxis:!1,useWidth:void 0},journey:{diagramMarginX:50,diagramMarginY:10,leftMargin:150,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:\"center\",bottomMarginAdj:1,useMaxWidth:!0,rightAngles:!1,taskFontSize:14,taskFontFamily:'\"Open Sans\", sans-serif',taskMargin:50,activationWidth:10,textPlacement:\"fo\",actorColours:[\"#8FBC8F\",\"#7CFC00\",\"#00FFFF\",\"#20B2AA\",\"#B0E0E6\",\"#FFFFE0\"],sectionFills:[\"#191970\",\"#8B008B\",\"#4B0082\",\"#2F4F4F\",\"#800000\",\"#8B4513\",\"#00008B\"],sectionColours:[\"#fff\"]},class:{arrowMarkerAbsolute:!1,dividerMargin:10,padding:5,textHeight:10,useMaxWidth:!0,defaultRenderer:\"dagre-wrapper\"},state:{dividerMargin:10,sizeUnit:5,padding:8,textHeight:10,titleShift:-15,noteMargin:10,forkWidth:70,forkHeight:7,miniPadding:2,fontSizeFactor:5.02,fontSize:24,labelHeight:16,edgeLengthFactor:\"20\",compositTitleSize:35,radius:5,useMaxWidth:!0,defaultRenderer:\"dagre-wrapper\"},er:{diagramPadding:20,layoutDirection:\"TB\",minEntityWidth:100,minEntityHeight:75,entityPadding:15,stroke:\"gray\",fill:\"honeydew\",fontSize:12,useMaxWidth:!0},pie:{useWidth:void 0,useMaxWidth:!0},requirement:{useWidth:void 0,useMaxWidth:!0,rect_fill:\"#f9f9f9\",text_color:\"#333\",rect_border_size:\"0.5px\",rect_border_color:\"#bbb\",rect_min_width:200,rect_min_height:200,fontSize:14,rect_padding:10,line_height:20},gitGraph:{diagramPadding:8,nodeLabel:{width:75,height:100,x:-25,y:0},mainBranchName:\"main\",mainBranchOrder:0,showCommitLabel:!0,showBranches:!0,rotateCommitLabel:!0},c4:{useWidth:void 0,diagramMarginX:50,diagramMarginY:10,c4ShapeMargin:50,c4ShapePadding:20,width:216,height:60,boxMargin:10,useMaxWidth:!0,c4ShapeInRow:4,nextLinePaddingX:0,c4BoundaryInRow:2,personFontSize:14,personFontFamily:'\"Open Sans\", sans-serif',personFontWeight:\"normal\",external_personFontSize:14,external_personFontFamily:'\"Open Sans\", sans-serif',external_personFontWeight:\"normal\",systemFontSize:14,systemFontFamily:'\"Open Sans\", sans-serif',systemFontWeight:\"normal\",external_systemFontSize:14,external_systemFontFamily:'\"Open Sans\", sans-serif',external_systemFontWeight:\"normal\",system_dbFontSize:14,system_dbFontFamily:'\"Open Sans\", sans-serif',system_dbFontWeight:\"normal\",external_system_dbFontSize:14,external_system_dbFontFamily:'\"Open Sans\", sans-serif',external_system_dbFontWeight:\"normal\",system_queueFontSize:14,system_queueFontFamily:'\"Open Sans\", sans-serif',system_queueFontWeight:\"normal\",external_system_queueFontSize:14,external_system_queueFontFamily:'\"Open Sans\", sans-serif',external_system_queueFontWeight:\"normal\",boundaryFontSize:14,boundaryFontFamily:'\"Open Sans\", sans-serif',boundaryFontWeight:\"normal\",messageFontSize:12,messageFontFamily:'\"Open Sans\", sans-serif',messageFontWeight:\"normal\",containerFontSize:14,containerFontFamily:'\"Open Sans\", sans-serif',containerFontWeight:\"normal\",external_containerFontSize:14,external_containerFontFamily:'\"Open Sans\", sans-serif',external_containerFontWeight:\"normal\",container_dbFontSize:14,container_dbFontFamily:'\"Open Sans\", sans-serif',container_dbFontWeight:\"normal\",external_container_dbFontSize:14,external_container_dbFontFamily:'\"Open Sans\", sans-serif',external_container_dbFontWeight:\"normal\",container_queueFontSize:14,container_queueFontFamily:'\"Open Sans\", sans-serif',container_queueFontWeight:\"normal\",external_container_queueFontSize:14,external_container_queueFontFamily:'\"Open Sans\", sans-serif',external_container_queueFontWeight:\"normal\",componentFontSize:14,componentFontFamily:'\"Open Sans\", sans-serif',componentFontWeight:\"normal\",external_componentFontSize:14,external_componentFontFamily:'\"Open Sans\", sans-serif',external_componentFontWeight:\"normal\",component_dbFontSize:14,component_dbFontFamily:'\"Open Sans\", sans-serif',component_dbFontWeight:\"normal\",external_component_dbFontSize:14,external_component_dbFontFamily:'\"Open Sans\", sans-serif',external_component_dbFontWeight:\"normal\",component_queueFontSize:14,component_queueFontFamily:'\"Open Sans\", sans-serif',component_queueFontWeight:\"normal\",external_component_queueFontSize:14,external_component_queueFontFamily:'\"Open Sans\", sans-serif',external_component_queueFontWeight:\"normal\",wrap:!0,wrapPadding:10,personFont:function(){return {fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},external_personFont:function(){return {fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},systemFont:function(){return {fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},external_systemFont:function(){return {fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},system_dbFont:function(){return {fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},external_system_dbFont:function(){return {fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},system_queueFont:function(){return {fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},external_system_queueFont:function(){return {fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},containerFont:function(){return {fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},external_containerFont:function(){return {fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},container_dbFont:function(){return {fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},external_container_dbFont:function(){return {fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},container_queueFont:function(){return {fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},external_container_queueFont:function(){return {fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},componentFont:function(){return {fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},external_componentFont:function(){return {fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},component_dbFont:function(){return {fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},external_component_dbFont:function(){return {fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},component_queueFont:function(){return {fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},external_component_queueFont:function(){return {fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},boundaryFont:function(){return {fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},messageFont:function(){return {fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},person_bg_color:\"#08427B\",person_border_color:\"#073B6F\",external_person_bg_color:\"#686868\",external_person_border_color:\"#8A8A8A\",system_bg_color:\"#1168BD\",system_border_color:\"#3C7FC0\",system_db_bg_color:\"#1168BD\",system_db_border_color:\"#3C7FC0\",system_queue_bg_color:\"#1168BD\",system_queue_border_color:\"#3C7FC0\",external_system_bg_color:\"#999999\",external_system_border_color:\"#8A8A8A\",external_system_db_bg_color:\"#999999\",external_system_db_border_color:\"#8A8A8A\",external_system_queue_bg_color:\"#999999\",external_system_queue_border_color:\"#8A8A8A\",container_bg_color:\"#438DD5\",container_border_color:\"#3C7FC0\",container_db_bg_color:\"#438DD5\",container_db_border_color:\"#3C7FC0\",container_queue_bg_color:\"#438DD5\",container_queue_border_color:\"#3C7FC0\",external_container_bg_color:\"#B3B3B3\",external_container_border_color:\"#A6A6A6\",external_container_db_bg_color:\"#B3B3B3\",external_container_db_border_color:\"#A6A6A6\",external_container_queue_bg_color:\"#B3B3B3\",external_container_queue_border_color:\"#A6A6A6\",component_bg_color:\"#85BBF0\",component_border_color:\"#78A8D8\",component_db_bg_color:\"#85BBF0\",component_db_border_color:\"#78A8D8\",component_queue_bg_color:\"#85BBF0\",component_queue_border_color:\"#78A8D8\",external_component_bg_color:\"#CCCCCC\",external_component_border_color:\"#BFBFBF\",external_component_db_bg_color:\"#CCCCCC\",external_component_db_border_color:\"#BFBFBF\",external_component_queue_bg_color:\"#CCCCCC\",external_component_queue_border_color:\"#BFBFBF\"}};Pt.class.arrowMarkerAbsolute=Pt.arrowMarkerAbsolute,Pt.gitGraph.arrowMarkerAbsolute=Pt.arrowMarkerAbsolute;var jt=function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:\"\";return Object.keys(e).reduce((function(r,i){return Array.isArray(e[i])?r:\"object\"===Rt(e[i])&&null!==e[i]?[].concat(It(r),[n+i],It(t(e[i],\"\"))):[].concat(It(r),[n+i])}),[])}(Pt,\"\");const zt=Pt;function Yt(t){return Yt=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&\"function\"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?\"symbol\":typeof t},Yt(t)}var Ut,$t=Object.freeze(zt),Wt=Q({},$t),qt=[],Ht=Q({},$t),Vt=function(t,e){for(var n=Q({},t),r={},i=0;i<e.length;i++){var a=e[i];Zt(a),r=Q(r,a);}if(n=Q(n,r),r.theme&&Lt[r.theme]){var o=Q({},Ut),s=Q(o.themeVariables||{},r.themeVariables);n.themeVariables=Lt[n.theme].getThemeVariables(s);}return Ht=n,n},Gt=function(){return Q({},Wt)},Xt=function(){return Q({},Ht)},Zt=function t(e){Object.keys(Wt.secure).forEach((function(t){void 0!==e[Wt.secure[t]]&&(o.debug(\"Denied attempt to modify a secure key \".concat(Wt.secure[t]),e[Wt.secure[t]]),delete e[Wt.secure[t]]);})),Object.keys(e).forEach((function(t){0===t.indexOf(\"__\")&&delete e[t];})),Object.keys(e).forEach((function(n){\"string\"==typeof e[n]&&(e[n].indexOf(\"<\")>-1||e[n].indexOf(\">\")>-1||e[n].indexOf(\"url(data:\")>-1)&&delete e[n],\"object\"===Yt(e[n])&&t(e[n]);}));},Qt=function(t){t.fontFamily&&(t.themeVariables&&t.themeVariables.fontFamily||(t.themeVariables={fontFamily:t.fontFamily})),qt.push(t),Vt(Wt,qt);},Kt=function(){Vt(Wt,qt=[]);},Jt=n(7856),te=n.n(Jt),ee=function(t){var e=t.replace(/\\\\u[\\dA-F]{4}/gi,(function(t){return String.fromCharCode(parseInt(t.replace(/\\\\u/g,\"\"),16))}));return e=(e=(e=e.replace(/\\\\x([0-9a-f]{2})/gi,(function(t,e){return String.fromCharCode(parseInt(e,16))}))).replace(/\\\\[\\d\\d\\d]{3}/gi,(function(t){return String.fromCharCode(parseInt(t.replace(/\\\\/g,\"\"),8))}))).replace(/\\\\[\\d\\d\\d]{2}/gi,(function(t){return String.fromCharCode(parseInt(t.replace(/\\\\/g,\"\"),8))}))},ne=function(t){for(var e=\"\",n=0;n>=0;){if(!((n=t.indexOf(\"<script\"))>=0)){e+=t,n=-1;break}e+=t.substr(0,n),(n=(t=t.substr(n+1)).indexOf(\"<\\/script>\"))>=0&&(n+=9,t=t.substr(n));}var r=ee(e);return (r=(r=(r=(r=r.replace(/script>/gi,\"#\")).replace(/javascript:/gi,\"#\")).replace(/javascript&colon/gi,\"#\")).replace(/onerror=/gi,\"onerror:\")).replace(/<iframe/gi,\"\")},re=function(t,e){var n=t,r=!0;if(!e.flowchart||!1!==e.flowchart.htmlLabels&&\"false\"!==e.flowchart.htmlLabels||(r=!1),r){var i=e.securityLevel;\"antiscript\"===i||\"strict\"===i?n=ne(n):\"loose\"!==i&&(n=(n=(n=se(n)).replace(/</g,\"&lt;\").replace(/>/g,\"&gt;\")).replace(/=/g,\"&equals;\"),n=oe(n));}return n},ie=function(t,e){return t?e.dompurifyConfig?te().sanitize(re(t,e),e.dompurifyConfig):te().sanitize(re(t,e)):t},ae=/<br\\s*\\/?>/gi,oe=function(t){return t.replace(/#br#/g,\"<br/>\")},se=function(t){return t.replace(ae,\"#br#\")},ce=function(t){return \"false\"!==t&&!1!==t},le=function t(e){var n=e;return -1!=e.indexOf(\"~\")?t(n=(n=n.replace(\"~\",\"<\")).replace(\"~\",\">\")):n};const ue={getRows:function(t){if(!t)return 1;var e=se(t);return (e=e.replace(/\\\\n/g,\"#br#\")).split(\"#br#\")},sanitizeText:ie,sanitizeTextOrArray:function(t,e){return \"string\"==typeof t?ie(t,e):t.flat().map((function(t){return ie(t,e)}))},hasBreaks:function(t){return ae.test(t)},splitBreaks:function(t){return t.split(ae)},lineBreakRegex:ae,removeScript:ne,getUrl:function(t){var e=\"\";return t&&(e=(e=(e=window.location.protocol+\"//\"+window.location.host+window.location.pathname+window.location.search).replace(/\\(/g,\"\\\\(\")).replace(/\\)/g,\"\\\\)\")),e},evaluate:ce,removeEscapes:ee};var he=\"\",fe=\"\",de=\"\",pe=function(t){return ie(t,Xt())},ge=function(){he=\"\",de=\"\",fe=\"\";},ye=function(t){he=pe(t).replace(/^\\s+/g,\"\");},me=function(){return he||fe},be=function(t){de=pe(t).replace(/\\n\\s+/g,\"\\n\");},ve=function(){return de},_e=function(t){fe=pe(t);},xe=function(){return fe};function ke(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:\"undefined\"!=typeof Symbol&&t[Symbol.iterator]||t[\"@@iterator\"];if(null!=n){var r,i,a=[],o=!0,s=!1;try{for(n=n.call(t);!(o=(r=n.next()).done)&&(a.push(r.value),!e||a.length!==e);o=!0);}catch(t){s=!0,i=t;}finally{try{o||null==n.return||n.return();}finally{if(s)throw i}}return a}}(t,e)||function(t,e){if(t){if(\"string\"==typeof t)return we(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return \"Object\"===n&&t.constructor&&(n=t.constructor.name),\"Map\"===n||\"Set\"===n?Array.from(t):\"Arguments\"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?we(t,e):void 0}}(t,e)||function(){throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\")}()}function we(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Te(t){return Te=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&\"function\"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?\"symbol\":typeof t},Te(t)}var Ee,Ce=[],Se=[\"\"],Ae=\"global\",Me=\"\",Ne=[{alias:\"global\",label:{text:\"global\"},type:{text:\"global\"},tags:null,link:null,parentBoundary:\"\"}],Oe=[],De=\"\",Be=!1,Le=4,Ie=2,Fe=function(t){return null==t?Ce:Ce.filter((function(e){return e.parentBoundary===t}))},Re=function(){return Be};const Pe={addPersonOrSystem:function(t,e,n,r,i,a,o){if(null!==e&&null!==n){var s={},c=Ce.find((function(t){return t.alias===e}));if(c&&e===c.alias?s=c:(s.alias=e,Ce.push(s)),s.label=null==n?{text:\"\"}:{text:n},null==r)s.descr={text:\"\"};else if(\"object\"===Te(r)){var l=ke(Object.entries(r)[0],2),u=l[0],h=l[1];s[u]={text:h};}else s.descr={text:r};if(\"object\"===Te(i)){var f=ke(Object.entries(i)[0],2),d=f[0],p=f[1];s[d]=p;}else s.sprite=i;if(\"object\"===Te(a)){var g=ke(Object.entries(a)[0],2),y=g[0],m=g[1];s[y]=m;}else s.tags=a;if(\"object\"===Te(o)){var b=ke(Object.entries(o)[0],2),v=b[0],_=b[1];s[v]=_;}else s.link=o;s.typeC4Shape={text:t},s.parentBoundary=Ae,s.wrap=Re();}},addPersonOrSystemBoundary:function(t,e,n,r,i){if(null!==t&&null!==e){var a={},o=Ne.find((function(e){return e.alias===t}));if(o&&t===o.alias?a=o:(a.alias=t,Ne.push(a)),a.label=null==e?{text:\"\"}:{text:e},null==n)a.type={text:\"system\"};else if(\"object\"===Te(n)){var s=ke(Object.entries(n)[0],2),c=s[0],l=s[1];a[c]={text:l};}else a.type={text:n};if(\"object\"===Te(r)){var u=ke(Object.entries(r)[0],2),h=u[0],f=u[1];a[h]=f;}else a.tags=r;if(\"object\"===Te(i)){var d=ke(Object.entries(i)[0],2),p=d[0],g=d[1];a[p]=g;}else a.link=i;a.parentBoundary=Ae,a.wrap=Re(),Me=Ae,Ae=t,Se.push(Me);}},addContainer:function(t,e,n,r,i,a,o,s){if(null!==e&&null!==n){var c={},l=Ce.find((function(t){return t.alias===e}));if(l&&e===l.alias?c=l:(c.alias=e,Ce.push(c)),c.label=null==n?{text:\"\"}:{text:n},null==r)c.techn={text:\"\"};else if(\"object\"===Te(r)){var u=ke(Object.entries(r)[0],2),h=u[0],f=u[1];c[h]={text:f};}else c.techn={text:r};if(null==i)c.descr={text:\"\"};else if(\"object\"===Te(i)){var d=ke(Object.entries(i)[0],2),p=d[0],g=d[1];c[p]={text:g};}else c.descr={text:i};if(\"object\"===Te(a)){var y=ke(Object.entries(a)[0],2),m=y[0],b=y[1];c[m]=b;}else c.sprite=a;if(\"object\"===Te(o)){var v=ke(Object.entries(o)[0],2),_=v[0],x=v[1];c[_]=x;}else c.tags=o;if(\"object\"===Te(s)){var k=ke(Object.entries(s)[0],2),w=k[0],T=k[1];c[w]=T;}else c.link=s;c.wrap=Re(),c.typeC4Shape={text:t},c.parentBoundary=Ae;}},addContainerBoundary:function(t,e,n,r,i){if(null!==t&&null!==e){var a={},o=Ne.find((function(e){return e.alias===t}));if(o&&t===o.alias?a=o:(a.alias=t,Ne.push(a)),a.label=null==e?{text:\"\"}:{text:e},null==n)a.type={text:\"container\"};else if(\"object\"===Te(n)){var s=ke(Object.entries(n)[0],2),c=s[0],l=s[1];a[c]={text:l};}else a.type={text:n};if(\"object\"===Te(r)){var u=ke(Object.entries(r)[0],2),h=u[0],f=u[1];a[h]=f;}else a.tags=r;if(\"object\"===Te(i)){var d=ke(Object.entries(i)[0],2),p=d[0],g=d[1];a[p]=g;}else a.link=i;a.parentBoundary=Ae,a.wrap=Re(),Me=Ae,Ae=t,Se.push(Me);}},addComponent:function(t,e,n,r,i,a,o,s){if(null!==e&&null!==n){var c={},l=Ce.find((function(t){return t.alias===e}));if(l&&e===l.alias?c=l:(c.alias=e,Ce.push(c)),c.label=null==n?{text:\"\"}:{text:n},null==r)c.techn={text:\"\"};else if(\"object\"===Te(r)){var u=ke(Object.entries(r)[0],2),h=u[0],f=u[1];c[h]={text:f};}else c.techn={text:r};if(null==i)c.descr={text:\"\"};else if(\"object\"===Te(i)){var d=ke(Object.entries(i)[0],2),p=d[0],g=d[1];c[p]={text:g};}else c.descr={text:i};if(\"object\"===Te(a)){var y=ke(Object.entries(a)[0],2),m=y[0],b=y[1];c[m]=b;}else c.sprite=a;if(\"object\"===Te(o)){var v=ke(Object.entries(o)[0],2),_=v[0],x=v[1];c[_]=x;}else c.tags=o;if(\"object\"===Te(s)){var k=ke(Object.entries(s)[0],2),w=k[0],T=k[1];c[w]=T;}else c.link=s;c.wrap=Re(),c.typeC4Shape={text:t},c.parentBoundary=Ae;}},addDeploymentNode:function(t,e,n,r,i,a,o,s){if(null!==e&&null!==n){var c={},l=Ne.find((function(t){return t.alias===e}));if(l&&e===l.alias?c=l:(c.alias=e,Ne.push(c)),c.label=null==n?{text:\"\"}:{text:n},null==r)c.type={text:\"node\"};else if(\"object\"===Te(r)){var u=ke(Object.entries(r)[0],2),h=u[0],f=u[1];c[h]={text:f};}else c.type={text:r};if(null==i)c.descr={text:\"\"};else if(\"object\"===Te(i)){var d=ke(Object.entries(i)[0],2),p=d[0],g=d[1];c[p]={text:g};}else c.descr={text:i};if(\"object\"===Te(o)){var y=ke(Object.entries(o)[0],2),m=y[0],b=y[1];c[m]=b;}else c.tags=o;if(\"object\"===Te(s)){var v=ke(Object.entries(s)[0],2),_=v[0],x=v[1];c[_]=x;}else c.link=s;c.nodeType=t,c.parentBoundary=Ae,c.wrap=Re(),Me=Ae,Ae=e,Se.push(Me);}},popBoundaryParseStack:function(){Ae=Me,Se.pop(),Me=Se.pop(),Se.push(Me);},addRel:function(t,e,n,r,i,a,o,s,c){if(null!=t&&null!=e&&null!=n&&null!=r){var l={},u=Oe.find((function(t){return t.from===e&&t.to===n}));if(u?l=u:Oe.push(l),l.type=t,l.from=e,l.to=n,l.label={text:r},null==i)l.techn={text:\"\"};else if(\"object\"===Te(i)){var h=ke(Object.entries(i)[0],2),f=h[0],d=h[1];l[f]={text:d};}else l.techn={text:i};if(null==a)l.descr={text:\"\"};else if(\"object\"===Te(a)){var p=ke(Object.entries(a)[0],2),g=p[0],y=p[1];l[g]={text:y};}else l.descr={text:a};if(\"object\"===Te(o)){var m=ke(Object.entries(o)[0],2),b=m[0],v=m[1];l[b]=v;}else l.sprite=o;if(\"object\"===Te(s)){var _=ke(Object.entries(s)[0],2),x=_[0],k=_[1];l[x]=k;}else l.tags=s;if(\"object\"===Te(c)){var w=ke(Object.entries(c)[0],2),T=w[0],E=w[1];l[T]=E;}else l.link=c;l.wrap=Re();}},updateElStyle:function(t,e,n,r,i,a,o,s,c,l,u){var h=Ce.find((function(t){return t.alias===e}));if(void 0!==h||void 0!==(h=Ne.find((function(t){return t.alias===e})))){if(null!=n)if(\"object\"===Te(n)){var f=ke(Object.entries(n)[0],2),d=f[0],p=f[1];h[d]=p;}else h.bgColor=n;if(null!=r)if(\"object\"===Te(r)){var g=ke(Object.entries(r)[0],2),y=g[0],m=g[1];h[y]=m;}else h.fontColor=r;if(null!=i)if(\"object\"===Te(i)){var b=ke(Object.entries(i)[0],2),v=b[0],_=b[1];h[v]=_;}else h.borderColor=i;if(null!=a)if(\"object\"===Te(a)){var x=ke(Object.entries(a)[0],2),k=x[0],w=x[1];h[k]=w;}else h.shadowing=a;if(null!=o)if(\"object\"===Te(o)){var T=ke(Object.entries(o)[0],2),E=T[0],C=T[1];h[E]=C;}else h.shape=o;if(null!=s)if(\"object\"===Te(s)){var S=ke(Object.entries(s)[0],2),A=S[0],M=S[1];h[A]=M;}else h.sprite=s;if(null!=c)if(\"object\"===Te(c)){var N=ke(Object.entries(c)[0],2),O=N[0],D=N[1];h[O]=D;}else h.techn=c;if(null!=l)if(\"object\"===Te(l)){var B=ke(Object.entries(l)[0],2),L=B[0],I=B[1];h[L]=I;}else h.legendText=l;if(null!=u)if(\"object\"===Te(u)){var F=ke(Object.entries(u)[0],2),R=F[0],P=F[1];h[R]=P;}else h.legendSprite=u;}},updateRelStyle:function(t,e,n,r,i,a,o){var s=Oe.find((function(t){return t.from===e&&t.to===n}));if(void 0!==s){if(null!=r)if(\"object\"===Te(r)){var c=ke(Object.entries(r)[0],2),l=c[0],u=c[1];s[l]=u;}else s.textColor=r;if(null!=i)if(\"object\"===Te(i)){var h=ke(Object.entries(i)[0],2),f=h[0],d=h[1];s[f]=d;}else s.lineColor=i;if(null!=a)if(\"object\"===Te(a)){var p=ke(Object.entries(a)[0],2),g=p[0],y=p[1];s[g]=parseInt(y);}else s.offsetX=parseInt(a);if(null!=o)if(\"object\"===Te(o)){var m=ke(Object.entries(o)[0],2),b=m[0],v=m[1];s[b]=parseInt(v);}else s.offsetY=parseInt(o);}},updateLayoutConfig:function(t,e,n){var r=Le,i=Ie;if(\"object\"===Te(e)){var a=ke(Object.entries(e)[0],2),o=(a[0],a[1]);r=parseInt(o);}else r=parseInt(e);if(\"object\"===Te(n)){var s=ke(Object.entries(n)[0],2),c=(s[0],s[1]);i=parseInt(c);}else i=parseInt(n);r>=1&&(Le=r),i>=1&&(Ie=i);},autoWrap:Re,setWrap:function(t){Be=t;},getC4ShapeArray:Fe,getC4Shape:function(t){return Ce.find((function(e){return e.alias===t}))},getC4ShapeKeys:function(t){return Object.keys(Fe(t))},getBoundarys:function(t){return null==t?Ne:Ne.filter((function(e){return e.parentBoundary===t}))},getCurrentBoundaryParse:function(){return Ae},getParentBoundaryParse:function(){return Me},getRels:function(){return Oe},getTitle:function(){return De},getC4Type:function(){return Ee},getC4ShapeInRow:function(){return Le},getC4BoundaryInRow:function(){return Ie},setAccTitle:ye,getAccTitle:me,getAccDescription:ve,setAccDescription:be,parseDirective:function(t,e,n){cu.parseDirective(this,t,e,n);},getConfig:function(){return Xt().c4},clear:function(){Ce=[],Ne=[{alias:\"global\",label:{text:\"global\"},type:{text:\"global\"},tags:null,link:null,parentBoundary:\"\"}],Me=\"\",Ae=\"global\",Se=[\"\"],Oe=[],Se=[\"\"],De=\"\",Be=!1,Le=4,Ie=2;},LINETYPE:{SOLID:0,DOTTED:1,NOTE:2,SOLID_CROSS:3,DOTTED_CROSS:4,SOLID_OPEN:5,DOTTED_OPEN:6,LOOP_START:10,LOOP_END:11,ALT_START:12,ALT_ELSE:13,ALT_END:14,OPT_START:15,OPT_END:16,ACTIVE_START:17,ACTIVE_END:18,PAR_START:19,PAR_AND:20,PAR_END:21,RECT_START:22,RECT_END:23,SOLID_POINT:24,DOTTED_POINT:25},ARROWTYPE:{FILLED:0,OPEN:1},PLACEMENT:{LEFTOF:0,RIGHTOF:1,OVER:2},setTitle:function(t){var e=ie(t,Xt());De=e;},setC4Type:function(t){var e=ie(t,Xt());Ee=e;}};var je=n(7967);function ze(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var Ye=function(t,e){var n=t.append(\"rect\");if(n.attr(\"x\",e.x),n.attr(\"y\",e.y),n.attr(\"fill\",e.fill),n.attr(\"stroke\",e.stroke),n.attr(\"width\",e.width),n.attr(\"height\",e.height),n.attr(\"rx\",e.rx),n.attr(\"ry\",e.ry),\"undefined\"!==e.attrs&&null!==e.attrs)for(var r in e.attrs)n.attr(r,e.attrs[r]);return \"undefined\"!==e.class&&n.attr(\"class\",e.class),n},Ue=function(){function t(t,e,n,i,a,o,s){r(e.append(\"text\").attr(\"x\",n+a/2).attr(\"y\",i+o/2+5).style(\"text-anchor\",\"middle\").text(t),s);}function e(t,e,n,i,a,o,s,c){for(var l=c.fontSize,u=c.fontFamily,h=c.fontWeight,f=t.split(ue.lineBreakRegex),d=0;d<f.length;d++){var p=d*l-l*(f.length-1)/2,g=e.append(\"text\").attr(\"x\",n+a/2).attr(\"y\",i).style(\"text-anchor\",\"middle\").attr(\"dominant-baseline\",\"middle\").style(\"font-size\",l).style(\"font-weight\",h).style(\"font-family\",u);g.append(\"tspan\").attr(\"dy\",p).text(f[d]).attr(\"alignment-baseline\",\"mathematical\"),r(g,s);}}function n(t,n,i,a,o,s,c,l){var u=n.append(\"switch\"),h=u.append(\"foreignObject\").attr(\"x\",i).attr(\"y\",a).attr(\"width\",o).attr(\"height\",s).append(\"xhtml:div\").style(\"display\",\"table\").style(\"height\",\"100%\").style(\"width\",\"100%\");h.append(\"div\").style(\"display\",\"table-cell\").style(\"text-align\",\"center\").style(\"vertical-align\",\"middle\").text(t),e(t,u,i,a,o,0,c,l),r(h,c);}function r(t,e){for(var n in e)e.hasOwnProperty(n)&&t.attr(n,e[n]);}return function(r){return \"fo\"===r.textPlacement?n:\"old\"===r.textPlacement?t:e}}();const $e=function(t,e,n){var r=e.bgColor?e.bgColor:n[e.typeC4Shape.text+\"_bg_color\"],i=e.borderColor?e.borderColor:n[e.typeC4Shape.text+\"_border_color\"],a=e.fontColor?e.fontColor:\"#FFFFFF\",o=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAACD0lEQVR4Xu2YoU4EMRCGT+4j8Ai8AhaH4QHgAUjQuFMECUgMIUgwJAgMhgQsAYUiJCiQIBBY+EITsjfTdme6V24v4c8vyGbb+ZjOtN0bNcvjQXmkH83WvYBWto6PLm6v7p7uH1/w2fXD+PBycX1Pv2l3IdDm/vn7x+dXQiAubRzoURa7gRZWd0iGRIiJbOnhnfYBQZNJjNbuyY2eJG8fkDE3bbG4ep6MHUAsgYxmE3nVs6VsBWJSGccsOlFPmLIViMzLOB7pCVO2AtHJMohH7Fh6zqitQK7m0rJvAVYgGcEpe//PLdDz65sM4pF9N7ICcXDKIB5Nv6j7tD0NoSdM2QrU9Gg0ewE1LqBhHR3BBdvj2vapnidjHxD/q6vd7Pvhr31AwcY8eXMTXAKECZZJFXuEq27aLgQK5uLMohCenGGuGewOxSjBvYBqeG6B+Nqiblggdjnc+ZXDy+FNFpFzw76O3UBAROuXh6FoiAcf5g9eTvUgzy0nWg6I8cXHRUpg5bOVBCo+KDpFajOf23GgPme7RSQ+lacIENUgJ6gg1k6HjgOlqnLqip4tEuhv0hNEMXUD0clyXE3p6pZA0S2nnvTlXwLJEZWlb7cTQH1+USgTN4VhAenm/wea1OCAOmqo6fE1WCb9WSKBah+rbUWPWAmE2Rvk0ApiB45eOyNAzU8xcTvj8KvkKEoOaIYeHNA3ZuygAvFMUO0AAAAASUVORK5CYII=\";switch(e.typeC4Shape.text){case\"person\":o=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAACD0lEQVR4Xu2YoU4EMRCGT+4j8Ai8AhaH4QHgAUjQuFMECUgMIUgwJAgMhgQsAYUiJCiQIBBY+EITsjfTdme6V24v4c8vyGbb+ZjOtN0bNcvjQXmkH83WvYBWto6PLm6v7p7uH1/w2fXD+PBycX1Pv2l3IdDm/vn7x+dXQiAubRzoURa7gRZWd0iGRIiJbOnhnfYBQZNJjNbuyY2eJG8fkDE3bbG4ep6MHUAsgYxmE3nVs6VsBWJSGccsOlFPmLIViMzLOB7pCVO2AtHJMohH7Fh6zqitQK7m0rJvAVYgGcEpe//PLdDz65sM4pF9N7ICcXDKIB5Nv6j7tD0NoSdM2QrU9Gg0ewE1LqBhHR3BBdvj2vapnidjHxD/q6vd7Pvhr31AwcY8eXMTXAKECZZJFXuEq27aLgQK5uLMohCenGGuGewOxSjBvYBqeG6B+Nqiblggdjnc+ZXDy+FNFpFzw76O3UBAROuXh6FoiAcf5g9eTvUgzy0nWg6I8cXHRUpg5bOVBCo+KDpFajOf23GgPme7RSQ+lacIENUgJ6gg1k6HjgOlqnLqip4tEuhv0hNEMXUD0clyXE3p6pZA0S2nnvTlXwLJEZWlb7cTQH1+USgTN4VhAenm/wea1OCAOmqo6fE1WCb9WSKBah+rbUWPWAmE2Rvk0ApiB45eOyNAzU8xcTvj8KvkKEoOaIYeHNA3ZuygAvFMUO0AAAAASUVORK5CYII=\";break;case\"external_person\":o=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAAB6ElEQVR4Xu2YLY+EMBCG9+dWr0aj0Wg0Go1Go0+j8Xdv2uTCvv1gpt0ebHKPuhDaeW4605Z9mJvx4AdXUyTUdd08z+u6flmWZRnHsWkafk9DptAwDPu+f0eAYtu2PEaGWuj5fCIZrBAC2eLBAnRCsEkkxmeaJp7iDJ2QMDdHsLg8SxKFEJaAo8lAXnmuOFIhTMpxxKATebo4UiFknuNo4OniSIXQyRxEA3YsnjGCVEjVXD7yLUAqxBGUyPv/Y4W2beMgGuS7kVQIBycH0fD+oi5pezQETxdHKmQKGk1eQEYldK+jw5GxPfZ9z7Mk0Qnhf1W1m3w//EUn5BDmSZsbR44QQLBEqrBHqOrmSKaQAxdnLArCrxZcM7A7ZKs4ioRq8LFC+NpC3WCBJsvpVw5edm9iEXFuyNfxXAgSwfrFQ1c0iNda8AdejvUgnktOtJQQxmcfFzGglc5WVCj7oDgFqU18boeFSs52CUh8LE8BIVQDT1ABrB0HtgSEYlX5doJnCwv9TXocKCaKbnwhdDKPq4lf3SwU3HLq4V/+WYhHVMa/3b4IlfyikAduCkcBc7mQ3/z/Qq/cTuikhkzB12Ae/mcJC9U+Vo8Ej1gWAtgbeGgFsAMHr50BIWOLCbezvhpBFUdY6EJuJ/QDW0XoMX60zZ0AAAAASUVORK5CYII=\";}var s=t.append(\"g\");s.attr(\"class\",\"person-man\");var c={x:0,y:0,fill:\"#EDF2AE\",stroke:\"#666\",width:100,anchor:\"start\",height:100,rx:0,ry:0};switch(e.typeC4Shape.text){case\"person\":case\"external_person\":case\"system\":case\"external_system\":case\"container\":case\"external_container\":case\"component\":case\"external_component\":c.x=e.x,c.y=e.y,c.fill=r,c.width=e.width,c.height=e.height,c.style=\"stroke:\"+i+\";stroke-width:0.5;\",c.rx=2.5,c.ry=2.5,Ye(s,c);break;case\"system_db\":case\"external_system_db\":case\"container_db\":case\"external_container_db\":case\"component_db\":case\"external_component_db\":s.append(\"path\").attr(\"fill\",r).attr(\"stroke-width\",\"0.5\").attr(\"stroke\",i).attr(\"d\",\"Mstartx,startyc0,-10 half,-10 half,-10c0,0 half,0 half,10l0,heightc0,10 -half,10 -half,10c0,0 -half,0 -half,-10l0,-height\".replaceAll(\"startx\",e.x).replaceAll(\"starty\",e.y).replaceAll(\"half\",e.width/2).replaceAll(\"height\",e.height)),s.append(\"path\").attr(\"fill\",\"none\").attr(\"stroke-width\",\"0.5\").attr(\"stroke\",i).attr(\"d\",\"Mstartx,startyc0,10 half,10 half,10c0,0 half,0 half,-10\".replaceAll(\"startx\",e.x).replaceAll(\"starty\",e.y).replaceAll(\"half\",e.width/2));break;case\"system_queue\":case\"external_system_queue\":case\"container_queue\":case\"external_container_queue\":case\"component_queue\":case\"external_component_queue\":s.append(\"path\").attr(\"fill\",r).attr(\"stroke-width\",\"0.5\").attr(\"stroke\",i).attr(\"d\",\"Mstartx,startylwidth,0c5,0 5,half 5,halfc0,0 0,half -5,halfl-width,0c-5,0 -5,-half -5,-halfc0,0 0,-half 5,-half\".replaceAll(\"startx\",e.x).replaceAll(\"starty\",e.y).replaceAll(\"width\",e.width).replaceAll(\"half\",e.height/2)),s.append(\"path\").attr(\"fill\",\"none\").attr(\"stroke-width\",\"0.5\").attr(\"stroke\",i).attr(\"d\",\"Mstartx,startyc-5,0 -5,half -5,halfc0,half 5,half 5,half\".replaceAll(\"startx\",e.x+e.width).replaceAll(\"starty\",e.y).replaceAll(\"half\",e.height/2));}var l,u,h=(l=n,u=e.typeC4Shape.text,{fontFamily:l[u+\"FontFamily\"],fontSize:l[u+\"FontSize\"],fontWeight:l[u+\"FontWeight\"]});switch(s.append(\"text\").attr(\"fill\",a).attr(\"font-family\",h.fontFamily).attr(\"font-size\",h.fontSize-2).attr(\"font-style\",\"italic\").attr(\"lengthAdjust\",\"spacing\").attr(\"textLength\",e.typeC4Shape.width).attr(\"x\",e.x+e.width/2-e.typeC4Shape.width/2).attr(\"y\",e.y+e.typeC4Shape.Y).text(\"<<\"+e.typeC4Shape.text+\">>\"),e.typeC4Shape.text){case\"person\":case\"external_person\":!function(t,e,n,r,i,a){var o=t.append(\"image\");o.attr(\"width\",e),o.attr(\"height\",n),o.attr(\"x\",r),o.attr(\"y\",i);var s=a.startsWith(\"data:image/png;base64\")?a:(0, je.N)(a);o.attr(\"xlink:href\",s);}(s,48,48,e.x+e.width/2-24,e.y+e.image.Y,o);}var f=n[e.typeC4Shape.text+\"Font\"]();return f.fontWeight=\"bold\",f.fontSize=f.fontSize+2,f.fontColor=a,Ue(n)(e.label.text,s,e.x,e.y+e.label.Y,e.width,e.height,{fill:a},f),(f=n[e.typeC4Shape.text+\"Font\"]()).fontColor=a,e.thchn&&\"\"!==e.thchn.text?Ue(n)(e.thchn.text,s,e.x,e.y+e.thchn.Y,e.width,e.height,{fill:a,\"font-style\":\"italic\"},f):e.type&&\"\"!==e.type.text&&Ue(n)(e.type.text,s,e.x,e.y+e.type.Y,e.width,e.height,{fill:a,\"font-style\":\"italic\"},f),e.descr&&\"\"!==e.descr.text&&((f=n.personFont()).fontColor=a,Ue(n)(e.descr.text,s,e.x,e.y+e.descr.Y,e.width,e.height,{fill:a},f)),e.height},We=function(t,e,n){var r,i=t.append(\"g\"),a=0,o=function(t,e){var n=\"undefined\"!=typeof Symbol&&t[Symbol.iterator]||t[\"@@iterator\"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(t){if(\"string\"==typeof t)return ze(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return \"Object\"===n&&t.constructor&&(n=t.constructor.name),\"Map\"===n||\"Set\"===n?Array.from(t):\"Arguments\"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ze(t,e):void 0}}(t))||e&&t&&\"number\"==typeof t.length){n&&(t=n);var r=0,i=function(){};return {s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\")}var a,o=!0,s=!1;return {s:function(){n=n.call(t);},n:function(){var t=n.next();return o=t.done,t},e:function(t){s=!0,a=t;},f:function(){try{o||null==n.return||n.return();}finally{if(s)throw a}}}}(e);try{for(o.s();!(r=o.n()).done;){var s=r.value,c=s.textColor?s.textColor:\"#444444\",l=s.lineColor?s.lineColor:\"#444444\",u=s.offsetX?parseInt(s.offsetX):0,h=s.offsetY?parseInt(s.offsetY):0;if(0===a){var f=i.append(\"line\");f.attr(\"x1\",s.startPoint.x),f.attr(\"y1\",s.startPoint.y),f.attr(\"x2\",s.endPoint.x),f.attr(\"y2\",s.endPoint.y),f.attr(\"stroke-width\",\"1\"),f.attr(\"stroke\",l),f.style(\"fill\",\"none\"),\"rel_b\"!==s.type&&f.attr(\"marker-end\",\"url(#arrowhead)\"),\"birel\"!==s.type&&\"rel_b\"!==s.type||f.attr(\"marker-start\",\"url(#arrowend)\"),a=-1;}else {var d=i.append(\"path\");d.attr(\"fill\",\"none\").attr(\"stroke-width\",\"1\").attr(\"stroke\",l).attr(\"d\",\"Mstartx,starty Qcontrolx,controly stopx,stopy \".replaceAll(\"startx\",s.startPoint.x).replaceAll(\"starty\",s.startPoint.y).replaceAll(\"controlx\",s.startPoint.x+(s.endPoint.x-s.startPoint.x)/2-(s.endPoint.x-s.startPoint.x)/4).replaceAll(\"controly\",s.startPoint.y+(s.endPoint.y-s.startPoint.y)/2).replaceAll(\"stopx\",s.endPoint.x).replaceAll(\"stopy\",s.endPoint.y)),\"rel_b\"!==s.type&&d.attr(\"marker-end\",\"url(#arrowhead)\"),\"birel\"!==s.type&&\"rel_b\"!==s.type||d.attr(\"marker-start\",\"url(#arrowend)\");}var p=n.messageFont();Ue(n)(s.label.text,i,Math.min(s.startPoint.x,s.endPoint.x)+Math.abs(s.endPoint.x-s.startPoint.x)/2+u,Math.min(s.startPoint.y,s.endPoint.y)+Math.abs(s.endPoint.y-s.startPoint.y)/2+h,s.label.width,s.label.height,{fill:c},p),s.techn&&\"\"!==s.techn.text&&(p=n.messageFont(),Ue(n)(\"[\"+s.techn.text+\"]\",i,Math.min(s.startPoint.x,s.endPoint.x)+Math.abs(s.endPoint.x-s.startPoint.x)/2+u,Math.min(s.startPoint.y,s.endPoint.y)+Math.abs(s.endPoint.y-s.startPoint.y)/2+n.messageFontSize+5+h,Math.max(s.label.width,s.techn.width),s.techn.height,{fill:c,\"font-style\":\"italic\"},p));}}catch(t){o.e(t);}finally{o.f();}};je.N;var qe=n(2536),He=n.n(qe),Ve=/[%]{2}[{]\\s*(?:(?:(\\w+)\\s*:|(\\w+))\\s*(?:(?:(\\w+))|((?:(?![}][%]{2}).|\\r?\\n)*))?\\s*)(?:[}][%]{2})?/gi,Ge=/\\s*%%.*\\n/gm,Xe={};const Ze=function(t,e){if((t=t.replace(Ve,\"\").replace(Ge,\"\\n\")).match(/^\\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/))return \"c4\";if(\"error\"===t)return \"error\";if(t.match(/^\\s*sequenceDiagram/))return \"sequence\";if(t.match(/^\\s*gantt/))return \"gantt\";if(t.match(/^\\s*classDiagram-v2/))return \"classDiagram\";if(t.match(/^\\s*classDiagram/))return e&&e.class&&\"dagre-wrapper\"===e.class.defaultRenderer?\"classDiagram\":\"class\";if(t.match(/^\\s*stateDiagram-v2/))return \"stateDiagram\";if(t.match(/^\\s*stateDiagram/))return e&&e.class&&\"dagre-wrapper\"===e.state.defaultRenderer?\"stateDiagram\":\"state\";if(t.match(/^\\s*flowchart/))return \"flowchart-v2\";if(t.match(/^\\s*info/))return \"info\";if(t.match(/^\\s*pie/))return \"pie\";if(t.match(/^\\s*erDiagram/))return \"er\";if(t.match(/^\\s*journey/))return \"journey\";if(t.match(/^\\s*requirement/)||t.match(/^\\s*requirementDiagram/))return \"requirement\";if(e&&e.flowchart&&\"dagre-wrapper\"===e.flowchart.defaultRenderer)return \"flowchart-v2\";for(var n=Object.keys(Xe),r=0;r<n.length;r++){var i=n[r],a=Xe[i];if(a&&a.detector(t))return i}return \"flowchart\"};var Qe=void 0;function Ke(t){return Ke=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&\"function\"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?\"symbol\":typeof t},Ke(t)}function Je(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,\"value\"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r);}}function tn(t,e){var n=\"undefined\"!=typeof Symbol&&t[Symbol.iterator]||t[\"@@iterator\"];if(!n){if(Array.isArray(t)||(n=nn(t))||e&&t&&\"number\"==typeof t.length){n&&(t=n);var r=0,i=function(){};return {s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\")}var a,o=!0,s=!1;return {s:function(){n=n.call(t);},n:function(){var t=n.next();return o=t.done,t},e:function(t){s=!0,a=t;},f:function(){try{o||null==n.return||n.return();}finally{if(s)throw a}}}}function en(t){return function(t){if(Array.isArray(t))return rn(t)}(t)||function(t){if(\"undefined\"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t[\"@@iterator\"])return Array.from(t)}(t)||nn(t)||function(){throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\")}()}function nn(t,e){if(t){if(\"string\"==typeof t)return rn(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return \"Object\"===n&&t.constructor&&(n=t.constructor.name),\"Map\"===n||\"Set\"===n?Array.from(t):\"Arguments\"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?rn(t,e):void 0}}function rn(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var an,on={curveBasis:l.curveBasis,curveBasisClosed:l.curveBasisClosed,curveBasisOpen:l.curveBasisOpen,curveLinear:l.curveLinear,curveLinearClosed:l.curveLinearClosed,curveMonotoneX:l.curveMonotoneX,curveMonotoneY:l.curveMonotoneY,curveNatural:l.curveNatural,curveStep:l.curveStep,curveStepAfter:l.curveStepAfter,curveStepBefore:l.curveStepBefore},sn=/[%]{2}[{]\\s*(?:(?:(\\w+)\\s*:|(\\w+))\\s*(?:(?:(\\w+))|((?:(?![}][%]{2}).|\\r?\\n)*))?\\s*)(?:[}][%]{2})?/gi,cn=/\\s*(?:(?:(\\w+)(?=:):|(\\w+))\\s*(?:(?:(\\w+))|((?:(?![}][%]{2}).|\\r?\\n)*))?\\s*)(?:[}][%]{2})?/gi,ln=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;try{var n=new RegExp(\"[%]{2}(?![{]\".concat(cn.source,\")(?=[}][%]{2}).*\\n\"),\"ig\");t=t.trim().replace(n,\"\").replace(/'/gm,'\"'),o.debug(\"Detecting diagram directive\".concat(null!==e?\" type:\"+e:\"\",\" based on the text:\").concat(t));for(var r,i=[];null!==(r=sn.exec(t));)if(r.index===sn.lastIndex&&sn.lastIndex++,r&&!e||e&&r[1]&&r[1].match(e)||e&&r[2]&&r[2].match(e)){var a=r[1]?r[1]:r[2],s=r[3]?r[3].trim():r[4]?JSON.parse(r[4].trim()):null;i.push({type:a,args:s});}return 0===i.length&&i.push({type:t,args:null}),1===i.length?i[0]:i}catch(n){return o.error(\"ERROR: \".concat(n.message,\" - Unable to parse directive\\n      \").concat(null!==e?\" type:\"+e:\"\",\" based on the text:\").concat(t)),{type:null,args:null}}},un=function(t,e){var n={};return function(){for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];var o=e?e.apply(Qe,i):i[0];if(o in n)return n[o];var s=t.apply(void 0,i);return n[o]=s,s}},hn=function(t,e){if(!t)return e;var n=\"curve\".concat(t.charAt(0).toUpperCase()+t.slice(1));return on[n]||e},fn=function(t,e){return t&&e?Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2)):0},dn=function(t){for(var e=\"\",n=\"\",r=0;r<t.length;r++)void 0!==t[r]&&(t[r].startsWith(\"color:\")||t[r].startsWith(\"text-align:\")?n=n+t[r]+\";\":e=e+t[r]+\";\");return {style:e,labelStyle:n}},pn=0,gn=function(){return pn++,\"id-\"+Math.random().toString(36).substr(2,12)+\"-\"+pn},yn=function(t){return function(t){for(var e=\"\",n=\"0123456789abcdef\",r=n.length,i=0;i<t;i++)e+=n.charAt(Math.floor(Math.random()*r));return e}(t.length)},mn=function(t,e){var n=e.text.replace(ue.lineBreakRegex,\" \"),r=t.append(\"text\");r.attr(\"x\",e.x),r.attr(\"y\",e.y),r.style(\"text-anchor\",e.anchor),r.style(\"font-family\",e.fontFamily),r.style(\"font-size\",e.fontSize),r.style(\"font-weight\",e.fontWeight),r.attr(\"fill\",e.fill),void 0!==e.class&&r.attr(\"class\",e.class);var i=r.append(\"tspan\");return i.attr(\"x\",e.x+2*e.textMargin),i.attr(\"fill\",e.fill),i.text(n),r},bn=un((function(t,e,n){if(!t)return t;if(n=Object.assign({fontSize:12,fontWeight:400,fontFamily:\"Arial\",joinWith:\"<br/>\"},n),ue.lineBreakRegex.test(t))return t;var r=t.split(\" \"),i=[],a=\"\";return r.forEach((function(t,o){var s=xn(\"\".concat(t,\" \"),n),c=xn(a,n);if(s>e){var l=vn(t,e,\"-\",n),u=l.hyphenatedStrings,h=l.remainingWord;i.push.apply(i,[a].concat(en(u))),a=h;}else c+s>=e?(i.push(a),a=t):a=[a,t].filter(Boolean).join(\" \");o+1===r.length&&i.push(a);})),i.filter((function(t){return \"\"!==t})).join(n.joinWith)}),(function(t,e,n){return \"\".concat(t,\"-\").concat(e,\"-\").concat(n.fontSize,\"-\").concat(n.fontWeight,\"-\").concat(n.fontFamily,\"-\").concat(n.joinWith)})),vn=un((function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:\"-\",r=arguments.length>3?arguments[3]:void 0;r=Object.assign({fontSize:12,fontWeight:400,fontFamily:\"Arial\",margin:0},r);var i=t.split(\"\"),a=[],o=\"\";return i.forEach((function(t,s){var c=\"\".concat(o).concat(t);if(xn(c,r)>=e){var l=s+1,u=i.length===l,h=\"\".concat(c).concat(n);a.push(u?c:h),o=\"\";}else o=c;})),{hyphenatedStrings:a,remainingWord:o}}),(function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:\"-\",r=arguments.length>3?arguments[3]:void 0;return \"\".concat(t,\"-\").concat(e,\"-\").concat(n,\"-\").concat(r.fontSize,\"-\").concat(r.fontWeight,\"-\").concat(r.fontFamily)})),_n=function(t,e){return e=Object.assign({fontSize:12,fontWeight:400,fontFamily:\"Arial\",margin:15},e),kn(t,e).height},xn=function(t,e){return e=Object.assign({fontSize:12,fontWeight:400,fontFamily:\"Arial\"},e),kn(t,e).width},kn=un((function(t,e){var n=e=Object.assign({fontSize:12,fontWeight:400,fontFamily:\"Arial\"},e),r=n.fontSize,i=n.fontFamily,a=n.fontWeight;if(!t)return {width:0,height:0};var o=[\"sans-serif\",i],s=t.split(ue.lineBreakRegex),c=[],u=(0, l.select)(\"body\");if(!u.remove)return {width:0,height:0,lineHeight:0};for(var h=u.append(\"svg\"),f=0,d=o;f<d.length;f++){var p,g=d[f],y=0,m={width:0,height:0,lineHeight:0},b=tn(s);try{for(b.s();!(p=b.n()).done;){var v=p.value,_={x:0,y:0,fill:void 0,anchor:\"start\",style:\"#666\",width:100,height:100,textMargin:0,rx:0,ry:0,valign:void 0};_.text=v;var x=mn(h,_).style(\"font-size\",r).style(\"font-weight\",a).style(\"font-family\",g),k=(x._groups||x)[0][0].getBBox();m.width=Math.round(Math.max(m.width,k.width)),y=Math.round(k.height),m.height+=y,m.lineHeight=Math.round(Math.max(m.lineHeight,y));}}catch(t){b.e(t);}finally{b.f();}c.push(m);}return h.remove(),c[isNaN(c[1].height)||isNaN(c[1].width)||isNaN(c[1].lineHeight)||c[0].height>c[1].height&&c[0].width>c[1].width&&c[0].lineHeight>c[1].lineHeight?0:1]}),(function(t,e){return \"\".concat(t,\"-\").concat(e.fontSize,\"-\").concat(e.fontWeight,\"-\").concat(e.fontFamily)})),wn=function(t,e,n){var r=new Map;return n?(r.set(\"width\",\"100%\"),r.set(\"style\",\"max-width: \".concat(e,\"px;\"))):r.set(\"width\",e),r},Tn=function(t,e,n,r){!function(t,e){var n,r=tn(e);try{for(r.s();!(n=r.n()).done;){var i=n.value;t.attr(i[0],i[1]);}}catch(t){r.e(t);}finally{r.f();}}(t,wn(0,1*n,r));},En=function(t,e,n,r){var i=e.node().getBBox(),a=i.width,s=i.height;o.info(\"SVG bounds: \".concat(a,\"x\").concat(s),i);var c=t._label.width,l=t._label.height;o.info(\"Graph bounds: \".concat(c,\"x\").concat(l),t),c=a+2*n,l=s+2*n,o.info(\"Calculated bounds: \".concat(c,\"x\").concat(l)),Tn(e,0,c,r);var u=\"\".concat(i.x-n,\" \").concat(i.y-n,\" \").concat(i.width+2*n,\" \").concat(i.height+2*n);o.info(\"Graph.label\",t._label,\"swidth\",a,\"sheight\",s,\"width\",c,\"height\",l,\"vBox\",u),e.attr(\"viewBox\",u);},Cn=function t(e){if(o.debug(\"directiveSanitizer called with\",e),\"object\"===Ke(e)&&(e.length?e.forEach((function(e){return t(e)})):Object.keys(e).forEach((function(n){o.debug(\"Checking key\",n),0===n.indexOf(\"__\")&&(o.debug(\"sanitize deleting __ option\",n),delete e[n]),n.indexOf(\"proto\")>=0&&(o.debug(\"sanitize deleting proto option\",n),delete e[n]),n.indexOf(\"constr\")>=0&&(o.debug(\"sanitize deleting constr option\",n),delete e[n]),n.indexOf(\"themeCSS\")>=0&&(o.debug(\"sanitizing themeCss option\"),e[n]=Sn(e[n])),n.indexOf(\"fontFamily\")>=0&&(o.debug(\"sanitizing fontFamily option\"),e[n]=Sn(e[n])),n.indexOf(\"altFontFamily\")>=0&&(o.debug(\"sanitizing altFontFamily option\"),e[n]=Sn(e[n])),jt.indexOf(n)<0?(o.debug(\"sanitize deleting option\",n),delete e[n]):\"object\"===Ke(e[n])&&(o.debug(\"sanitize deleting object\",n),t(e[n]));}))),e.themeVariables)for(var n=Object.keys(e.themeVariables),r=0;r<n.length;r++){var i=n[r],a=e.themeVariables[i];a&&a.match&&!a.match(/^[a-zA-Z0-9#,\";()%. ]+$/)&&(e.themeVariables[i]=\"\");}o.debug(\"After sanitization\",e);},Sn=function(t){for(var e=0,n=0,r=0;r<t.length;r++){if(e<n)return \"{ /* ERROR: Unbalanced CSS */ }\";\"{\"===t[r]?e++:\"}\"===t[r]&&n++;}return e!==n?\"{ /* ERROR: Unbalanced CSS */ }\":t};const An={assignWithDepth:Q,wrapLabel:bn,calculateTextHeight:_n,calculateTextWidth:xn,calculateTextDimensions:kn,calculateSvgSizeAttrs:wn,configureSvgSize:Tn,setupGraphViewbox:En,detectInit:function(t,e){var n=ln(t,/(?:init\\b)|(?:initialize\\b)/),r={};if(Array.isArray(n)){var i=n.map((function(t){return t.args}));Cn(i),r=Q(r,en(i));}else r=n.args;if(r){var a=Ze(t,e);[\"config\"].forEach((function(t){void 0!==r[t]&&(\"flowchart-v2\"===a&&(a=\"flowchart\"),r[a]=r[t],delete r[t]);}));}return r},detectDirective:ln,isSubstringInArray:function(t,e){for(var n=0;n<e.length;n++)if(e[n].match(t))return n;return -1},interpolateToCurve:hn,calcLabelPosition:function(t){return 1===t.length?t[0]:function(t){var e,n=0;t.forEach((function(t){n+=fn(t,e),e=t;}));var r=n/2,i=void 0;return e=void 0,t.forEach((function(t){if(e&&!i){var n=fn(t,e);if(n<r)r-=n;else {var a=r/n;a<=0&&(i=e),a>=1&&(i={x:t.x,y:t.y}),a>0&&a<1&&(i={x:(1-a)*e.x+a*t.x,y:(1-a)*e.y+a*t.y});}}e=t;})),i}(t)},calcCardinalityPosition:function(t,e,n){var r;o.info(\"our points\",e),e[0]!==n&&(e=e.reverse()),e.forEach((function(t){fn(t,r),r=t;}));var i,a=25;r=void 0,e.forEach((function(t){if(r&&!i){var e=fn(t,r);if(e<a)a-=e;else {var n=a/e;n<=0&&(i=r),n>=1&&(i={x:t.x,y:t.y}),n>0&&n<1&&(i={x:(1-n)*r.x+n*t.x,y:(1-n)*r.y+n*t.y});}}r=t;}));var s=t?10:5,c=Math.atan2(e[0].y-i.y,e[0].x-i.x),l={x:0,y:0};return l.x=Math.sin(c)*s+(e[0].x+i.x)/2,l.y=-Math.cos(c)*s+(e[0].y+i.y)/2,l},calcTerminalLabelPosition:function(t,e,n){var r,i=JSON.parse(JSON.stringify(n));o.info(\"our points\",i),\"start_left\"!==e&&\"start_right\"!==e&&(i=i.reverse()),i.forEach((function(t){fn(t,r),r=t;}));var a,s=25+t;r=void 0,i.forEach((function(t){if(r&&!a){var e=fn(t,r);if(e<s)s-=e;else {var n=s/e;n<=0&&(a=r),n>=1&&(a={x:t.x,y:t.y}),n>0&&n<1&&(a={x:(1-n)*r.x+n*t.x,y:(1-n)*r.y+n*t.y});}}r=t;}));var c=10+.5*t,l=Math.atan2(i[0].y-a.y,i[0].x-a.x),u={x:0,y:0};return u.x=Math.sin(l)*c+(i[0].x+a.x)/2,u.y=-Math.cos(l)*c+(i[0].y+a.y)/2,\"start_left\"===e&&(u.x=Math.sin(l+Math.PI)*c+(i[0].x+a.x)/2,u.y=-Math.cos(l+Math.PI)*c+(i[0].y+a.y)/2),\"end_right\"===e&&(u.x=Math.sin(l-Math.PI)*c+(i[0].x+a.x)/2-5,u.y=-Math.cos(l-Math.PI)*c+(i[0].y+a.y)/2-5),\"end_left\"===e&&(u.x=Math.sin(l)*c+(i[0].x+a.x)/2-5,u.y=-Math.cos(l)*c+(i[0].y+a.y)/2-5),u},formatUrl:function(t,e){var n=t.trim();if(n)return \"loose\"!==e.securityLevel?(0, je.N)(n):n},getStylesFromArray:dn,generateId:gn,random:yn,memoize:un,runFunc:function(t){for(var e,n=t.split(\".\"),r=n.length-1,i=n[r],a=window,o=0;o<r;o++)if(!(a=a[n[o]]))return;for(var s=arguments.length,c=new Array(s>1?s-1:0),l=1;l<s;l++)c[l-1]=arguments[l];(e=a)[i].apply(e,c);},entityDecode:function(t){return an=an||document.createElement(\"div\"),t=escape(t).replace(/%26/g,\"&\").replace(/%23/g,\"#\").replace(/%3B/g,\";\"),an.innerHTML=t,unescape(an.textContent)},initIdGenerator:function(){function t(e,n){!function(t,e){if(!(t instanceof e))throw new TypeError(\"Cannot call a class as a function\")}(this,t),this.deterministic=e,this.seed=n,this.count=n?n.length:0;}var e,n;return e=t,(n=[{key:\"next\",value:function(){return this.deterministic?this.count++:Date.now()}}])&&Je(e.prototype,n),Object.defineProperty(e,\"prototype\",{writable:!1}),t}(),directiveSanitizer:Cn,sanitizeCss:Sn};function Mn(t,e,n){if(void 0!==e.insert){var r=t.getAccTitle(),i=t.getAccDescription();e.attr(\"role\",\"img\").attr(\"aria-labelledby\",\"chart-title-\"+n+\" chart-desc-\"+n),e.insert(\"desc\",\":first-child\").attr(\"id\",\"chart-desc-\"+n).text(i),e.insert(\"title\",\":first-child\").attr(\"id\",\"chart-title-\"+n).text(r);}}function Nn(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function On(t,e){if(!(t instanceof e))throw new TypeError(\"Cannot call a class as a function\")}function Dn(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,\"value\"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r);}}function Bn(t,e,n){return e&&Dn(t.prototype,e),n&&Dn(t,n),Object.defineProperty(t,\"prototype\",{writable:!1}),t}var Ln=0,In=0,Fn=4,Rn=2;qe.parser.yy=Pe;var Pn={},jn=function(){function t(e){On(this,t),this.name=\"\",this.data={},this.data.startx=void 0,this.data.stopx=void 0,this.data.starty=void 0,this.data.stopy=void 0,this.data.widthLimit=void 0,this.nextData={},this.nextData.startx=void 0,this.nextData.stopx=void 0,this.nextData.starty=void 0,this.nextData.stopy=void 0,this.nextData.cnt=0,zn(e.db.getConfig());}return Bn(t,[{key:\"setData\",value:function(t,e,n,r){this.nextData.startx=this.data.startx=t,this.nextData.stopx=this.data.stopx=e,this.nextData.starty=this.data.starty=n,this.nextData.stopy=this.data.stopy=r;}},{key:\"updateVal\",value:function(t,e,n,r){void 0===t[e]?t[e]=n:t[e]=r(n,t[e]);}},{key:\"insert\",value:function(t){this.nextData.cnt=this.nextData.cnt+1;var e=this.nextData.startx===this.nextData.stopx?this.nextData.stopx+t.margin:this.nextData.stopx+2*t.margin,n=e+t.width,r=this.nextData.starty+2*t.margin,i=r+t.height;(e>=this.data.widthLimit||n>=this.data.widthLimit||this.nextData.cnt>Fn)&&(e=this.nextData.startx+t.margin+Pn.nextLinePaddingX,r=this.nextData.stopy+2*t.margin,this.nextData.stopx=n=e+t.width,this.nextData.starty=this.nextData.stopy,this.nextData.stopy=i=r+t.height,this.nextData.cnt=1),t.x=e,t.y=r,this.updateVal(this.data,\"startx\",e,Math.min),this.updateVal(this.data,\"starty\",r,Math.min),this.updateVal(this.data,\"stopx\",n,Math.max),this.updateVal(this.data,\"stopy\",i,Math.max),this.updateVal(this.nextData,\"startx\",e,Math.min),this.updateVal(this.nextData,\"starty\",r,Math.min),this.updateVal(this.nextData,\"stopx\",n,Math.max),this.updateVal(this.nextData,\"stopy\",i,Math.max);}},{key:\"init\",value:function(t){this.name=\"\",this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0,widthLimit:void 0},this.nextData={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0,cnt:0},zn(t.db.getConfig());}},{key:\"bumpLastMargin\",value:function(t){this.data.stopx+=t,this.data.stopy+=t;}}]),t}(),zn=function(t){Q(Pn,t),t.fontFamily&&(Pn.personFontFamily=Pn.systemFontFamily=Pn.messageFontFamily=t.fontFamily),t.fontSize&&(Pn.personFontSize=Pn.systemFontSize=Pn.messageFontSize=t.fontSize),t.fontWeight&&(Pn.personFontWeight=Pn.systemFontWeight=Pn.messageFontWeight=t.fontWeight);},Yn=function(t,e){return {fontFamily:t[e+\"FontFamily\"],fontSize:t[e+\"FontSize\"],fontWeight:t[e+\"FontWeight\"]}},Un=function(t){return {fontFamily:t.boundaryFontFamily,fontSize:t.boundaryFontSize,fontWeight:t.boundaryFontWeight}};function $n(t,e,n,r,i){if(!e[t].width)if(n)e[t].text=bn(e[t].text,i,r),e[t].textLines=e[t].text.split(ue.lineBreakRegex).length,e[t].width=i,e[t].height=_n(e[t].text,r);else {var a=e[t].text.split(ue.lineBreakRegex);e[t].textLines=a.length;var o=0;e[t].height=0,e[t].width=0;for(var s=0;s<a.length;s++)e[t].width=Math.max(xn(a[s],r),e[t].width),o=_n(a[s],r),e[t].height=e[t].height+o;}}var Wn=function(t,e,n){e.x=n.data.startx,e.y=n.data.starty,e.width=n.data.stopx-n.data.startx,e.height=n.data.stopy-n.data.starty,e.label.y=Pn.c4ShapeMargin-35;var r=e.wrap&&Pn.wrap,i=Un(Pn);i.fontSize=i.fontSize+2,i.fontWeight=\"bold\",$n(\"label\",e,r,i,xn(e.label.text,i)),function(t,e,n){var r=t.append(\"g\"),i=e.bgColor?e.bgColor:\"none\",a=e.borderColor?e.borderColor:\"#444444\",o=e.fontColor?e.fontColor:\"black\",s={\"stroke-width\":1,\"stroke-dasharray\":\"7.0,7.0\"};e.nodeType&&(s={\"stroke-width\":1});var c={x:e.x,y:e.y,fill:i,stroke:a,width:e.width,height:e.height,rx:2.5,ry:2.5,attrs:s};Ye(r,c);var l=n.boundaryFont();l.fontWeight=\"bold\",l.fontSize=l.fontSize+2,l.fontColor=o,Ue(n)(e.label.text,r,e.x,e.y+e.label.Y,e.width,e.height,{fill:\"#444444\"},l),e.type&&\"\"!==e.type.text&&((l=n.boundaryFont()).fontColor=o,Ue(n)(e.type.text,r,e.x,e.y+e.type.Y,e.width,e.height,{fill:\"#444444\"},l)),e.descr&&\"\"!==e.descr.text&&((l=n.boundaryFont()).fontSize=l.fontSize-2,l.fontColor=o,Ue(n)(e.descr.text,r,e.x,e.y+e.descr.Y,e.width,e.height,{fill:\"#444444\"},l));}(t,e,Pn);},qn=function(t,e,n,r){for(var i=0,a=0;a<r.length;a++){i=0;var o=n[r[a]],s=Yn(Pn,o.typeC4Shape.text);switch(s.fontSize=s.fontSize-2,o.typeC4Shape.width=xn(\"<<\"+o.typeC4Shape.text+\">>\",s),o.typeC4Shape.height=s.fontSize+2,o.typeC4Shape.Y=Pn.c4ShapePadding,i=o.typeC4Shape.Y+o.typeC4Shape.height-4,o.image={width:0,height:0,Y:0},o.typeC4Shape.text){case\"person\":case\"external_person\":o.image.width=48,o.image.height=48,o.image.Y=i,i=o.image.Y+o.image.height;}o.sprite&&(o.image.width=48,o.image.height=48,o.image.Y=i,i=o.image.Y+o.image.height);var c=o.wrap&&Pn.wrap,l=Pn.width-2*Pn.c4ShapePadding,u=Yn(Pn,o.typeC4Shape.text);u.fontSize=u.fontSize+2,u.fontWeight=\"bold\",$n(\"label\",o,c,u,l),o.label.Y=i+8,i=o.label.Y+o.label.height,o.type&&\"\"!==o.type.text?(o.type.text=\"[\"+o.type.text+\"]\",$n(\"type\",o,c,Yn(Pn,o.typeC4Shape.text),l),o.type.Y=i+5,i=o.type.Y+o.type.height):o.techn&&\"\"!==o.techn.text&&(o.techn.text=\"[\"+o.techn.text+\"]\",$n(\"techn\",o,c,Yn(Pn,o.techn.text),l),o.techn.Y=i+5,i=o.techn.Y+o.techn.height);var h=i,f=o.label.width;o.descr&&\"\"!==o.descr.text&&($n(\"descr\",o,c,Yn(Pn,o.typeC4Shape.text),l),o.descr.Y=i+20,i=o.descr.Y+o.descr.height,f=Math.max(o.label.width,o.descr.width),h=i-5*o.descr.textLines),f+=Pn.c4ShapePadding,o.width=Math.max(o.width||Pn.width,f,Pn.width),o.height=Math.max(o.height||Pn.height,h,Pn.height),o.margin=o.margin||Pn.c4ShapeMargin,t.insert(o),$e(e,o,Pn);}t.bumpLastMargin(Pn.c4ShapeMargin);},Hn=Bn((function t(e,n){On(this,t),this.x=e,this.y=n;})),Vn=function(t,e){var n=t.x,r=t.y,i=e.x,a=e.y,o=n+t.width/2,s=r+t.height/2,c=Math.abs(n-i),l=Math.abs(r-a),u=l/c,h=t.height/t.width,f=null;return r==a&&n<i?f=new Hn(n+t.width,s):r==a&&n>i?f=new Hn(n,s):n==i&&r<a?f=new Hn(o,r+t.height):n==i&&r>a&&(f=new Hn(o,r)),n>i&&r<a?f=h>=u?new Hn(n,s+u*t.width/2):new Hn(o-c/l*t.height/2,r+t.height):n<i&&r<a?f=h>=u?new Hn(n+t.width,s+u*t.width/2):new Hn(o+c/l*t.height/2,r+t.height):n<i&&r>a?f=h>=u?new Hn(n+t.width,s-u*t.width/2):new Hn(o+t.height/2*c/l,r):n>i&&r>a&&(f=h>=u?new Hn(n,s-t.width/2*u):new Hn(o-t.height/2*c/l,r)),f},Gn=function(t,e){var n={x:0,y:0};n.x=e.x+e.width/2,n.y=e.y+e.height/2;var r=Vn(t,n);return n.x=t.x+t.width/2,n.y=t.y+t.height/2,{startPoint:r,endPoint:Vn(e,n)}};function Xn(t,e,n,r,i){var a=new jn(i);a.data.widthLimit=n.data.widthLimit/Math.min(Rn,r.length);for(var o=0;o<r.length;o++){var s=r[o],c=0;s.image={width:0,height:0,Y:0},s.sprite&&(s.image.width=48,s.image.height=48,s.image.Y=c,c=s.image.Y+s.image.height);var l=s.wrap&&Pn.wrap,u=Un(Pn);if(u.fontSize=u.fontSize+2,u.fontWeight=\"bold\",$n(\"label\",s,l,u,a.data.widthLimit),s.label.Y=c+8,c=s.label.Y+s.label.height,s.type&&\"\"!==s.type.text&&(s.type.text=\"[\"+s.type.text+\"]\",$n(\"type\",s,l,Un(Pn),a.data.widthLimit),s.type.Y=c+5,c=s.type.Y+s.type.height),s.descr&&\"\"!==s.descr.text){var h=Un(Pn);h.fontSize=h.fontSize-2,$n(\"descr\",s,l,h,a.data.widthLimit),s.descr.Y=c+20,c=s.descr.Y+s.descr.height;}if(0==o||o%Rn==0){var f=n.data.startx+Pn.diagramMarginX,d=n.data.stopy+Pn.diagramMarginY+c;a.setData(f,f,d,d);}else {var p=a.data.stopx!==a.data.startx?a.data.stopx+Pn.diagramMarginX:a.data.startx,g=a.data.starty;a.setData(p,p,g,g);}a.name=s.alias;var y=i.db.getC4ShapeArray(s.alias),m=i.db.getC4ShapeKeys(s.alias);m.length>0&&qn(a,t,y,m),e=s.alias;var b=i.db.getBoundarys(e);b.length>0&&Xn(t,e,a,b,i),\"global\"!==s.alias&&Wn(t,s,a),n.data.stopy=Math.max(a.data.stopy+Pn.c4ShapeMargin,n.data.stopy),n.data.stopx=Math.max(a.data.stopx+Pn.c4ShapeMargin,n.data.stopx),Ln=Math.max(Ln,n.data.stopx),In=Math.max(In,n.data.stopy);}}const Zn={drawPersonOrSystemArray:qn,drawBoundary:Wn,setConf:zn,draw:function(t,e,n,r){Pn=Xt().c4;var i,a=Xt().securityLevel;\"sandbox\"===a&&(i=(0, l.select)(\"#i\"+e));var s=\"sandbox\"===a?(0, l.select)(i.nodes()[0].contentDocument.body):(0, l.select)(\"body\"),c=r.db;r.db.setWrap(Pn.wrap),Fn=c.getC4ShapeInRow(),Rn=c.getC4BoundaryInRow(),o.debug(\"C:\".concat(JSON.stringify(Pn,null,2)));var u=\"sandbox\"===a?s.select('[id=\"'.concat(e,'\"]')):(0, l.select)('[id=\"'.concat(e,'\"]'));u.append(\"defs\").append(\"symbol\").attr(\"id\",\"computer\").attr(\"width\",\"24\").attr(\"height\",\"24\").append(\"path\").attr(\"transform\",\"scale(.5)\").attr(\"d\",\"M2 2v13h20v-13h-20zm18 11h-16v-9h16v9zm-10.228 6l.466-1h3.524l.467 1h-4.457zm14.228 3h-24l2-6h2.104l-1.33 4h18.45l-1.297-4h2.073l2 6zm-5-10h-14v-7h14v7z\"),function(t){t.append(\"defs\").append(\"symbol\").attr(\"id\",\"database\").attr(\"fill-rule\",\"evenodd\").attr(\"clip-rule\",\"evenodd\").append(\"path\").attr(\"transform\",\"scale(.5)\").attr(\"d\",\"M12.258.001l.256.004.255.005.253.008.251.01.249.012.247.015.246.016.242.019.241.02.239.023.236.024.233.027.231.028.229.031.225.032.223.034.22.036.217.038.214.04.211.041.208.043.205.045.201.046.198.048.194.05.191.051.187.053.183.054.18.056.175.057.172.059.168.06.163.061.16.063.155.064.15.066.074.033.073.033.071.034.07.034.069.035.068.035.067.035.066.035.064.036.064.036.062.036.06.036.06.037.058.037.058.037.055.038.055.038.053.038.052.038.051.039.05.039.048.039.047.039.045.04.044.04.043.04.041.04.04.041.039.041.037.041.036.041.034.041.033.042.032.042.03.042.029.042.027.042.026.043.024.043.023.043.021.043.02.043.018.044.017.043.015.044.013.044.012.044.011.045.009.044.007.045.006.045.004.045.002.045.001.045v17l-.001.045-.002.045-.004.045-.006.045-.007.045-.009.044-.011.045-.012.044-.013.044-.015.044-.017.043-.018.044-.02.043-.021.043-.023.043-.024.043-.026.043-.027.042-.029.042-.03.042-.032.042-.033.042-.034.041-.036.041-.037.041-.039.041-.04.041-.041.04-.043.04-.044.04-.045.04-.047.039-.048.039-.05.039-.051.039-.052.038-.053.038-.055.038-.055.038-.058.037-.058.037-.06.037-.06.036-.062.036-.064.036-.064.036-.066.035-.067.035-.068.035-.069.035-.07.034-.071.034-.073.033-.074.033-.15.066-.155.064-.16.063-.163.061-.168.06-.172.059-.175.057-.18.056-.183.054-.187.053-.191.051-.194.05-.198.048-.201.046-.205.045-.208.043-.211.041-.214.04-.217.038-.22.036-.223.034-.225.032-.229.031-.231.028-.233.027-.236.024-.239.023-.241.02-.242.019-.246.016-.247.015-.249.012-.251.01-.253.008-.255.005-.256.004-.258.001-.258-.001-.256-.004-.255-.005-.253-.008-.251-.01-.249-.012-.247-.015-.245-.016-.243-.019-.241-.02-.238-.023-.236-.024-.234-.027-.231-.028-.228-.031-.226-.032-.223-.034-.22-.036-.217-.038-.214-.04-.211-.041-.208-.043-.204-.045-.201-.046-.198-.048-.195-.05-.19-.051-.187-.053-.184-.054-.179-.056-.176-.057-.172-.059-.167-.06-.164-.061-.159-.063-.155-.064-.151-.066-.074-.033-.072-.033-.072-.034-.07-.034-.069-.035-.068-.035-.067-.035-.066-.035-.064-.036-.063-.036-.062-.036-.061-.036-.06-.037-.058-.037-.057-.037-.056-.038-.055-.038-.053-.038-.052-.038-.051-.039-.049-.039-.049-.039-.046-.039-.046-.04-.044-.04-.043-.04-.041-.04-.04-.041-.039-.041-.037-.041-.036-.041-.034-.041-.033-.042-.032-.042-.03-.042-.029-.042-.027-.042-.026-.043-.024-.043-.023-.043-.021-.043-.02-.043-.018-.044-.017-.043-.015-.044-.013-.044-.012-.044-.011-.045-.009-.044-.007-.045-.006-.045-.004-.045-.002-.045-.001-.045v-17l.001-.045.002-.045.004-.045.006-.045.007-.045.009-.044.011-.045.012-.044.013-.044.015-.044.017-.043.018-.044.02-.043.021-.043.023-.043.024-.043.026-.043.027-.042.029-.042.03-.042.032-.042.033-.042.034-.041.036-.041.037-.041.039-.041.04-.041.041-.04.043-.04.044-.04.046-.04.046-.039.049-.039.049-.039.051-.039.052-.038.053-.038.055-.038.056-.038.057-.037.058-.037.06-.037.061-.036.062-.036.063-.036.064-.036.066-.035.067-.035.068-.035.069-.035.07-.034.072-.034.072-.033.074-.033.151-.066.155-.064.159-.063.164-.061.167-.06.172-.059.176-.057.179-.056.184-.054.187-.053.19-.051.195-.05.198-.048.201-.046.204-.045.208-.043.211-.041.214-.04.217-.038.22-.036.223-.034.226-.032.228-.031.231-.028.234-.027.236-.024.238-.023.241-.02.243-.019.245-.016.247-.015.249-.012.251-.01.253-.008.255-.005.256-.004.258-.001.258.001zm-9.258 20.499v.01l.001.021.003.021.004.022.005.021.006.022.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.023.018.024.019.024.021.024.022.025.023.024.024.025.052.049.056.05.061.051.066.051.07.051.075.051.079.052.084.052.088.052.092.052.097.052.102.051.105.052.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.048.144.049.147.047.152.047.155.047.16.045.163.045.167.043.171.043.176.041.178.041.183.039.187.039.19.037.194.035.197.035.202.033.204.031.209.03.212.029.216.027.219.025.222.024.226.021.23.02.233.018.236.016.24.015.243.012.246.01.249.008.253.005.256.004.259.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.021.224-.024.22-.026.216-.027.212-.028.21-.031.205-.031.202-.034.198-.034.194-.036.191-.037.187-.039.183-.04.179-.04.175-.042.172-.043.168-.044.163-.045.16-.046.155-.046.152-.047.148-.048.143-.049.139-.049.136-.05.131-.05.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.053.083-.051.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.05.023-.024.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.023.01-.022.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.127l-.077.055-.08.053-.083.054-.085.053-.087.052-.09.052-.093.051-.095.05-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.045-.118.044-.12.043-.122.042-.124.042-.126.041-.128.04-.13.04-.132.038-.134.038-.135.037-.138.037-.139.035-.142.035-.143.034-.144.033-.147.032-.148.031-.15.03-.151.03-.153.029-.154.027-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.01-.179.008-.179.008-.181.006-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.006-.179-.008-.179-.008-.178-.01-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.027-.153-.029-.151-.03-.15-.03-.148-.031-.146-.032-.145-.033-.143-.034-.141-.035-.14-.035-.137-.037-.136-.037-.134-.038-.132-.038-.13-.04-.128-.04-.126-.041-.124-.042-.122-.042-.12-.044-.117-.043-.116-.045-.113-.045-.112-.046-.109-.047-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.05-.093-.052-.09-.051-.087-.052-.085-.053-.083-.054-.08-.054-.077-.054v4.127zm0-5.654v.011l.001.021.003.021.004.021.005.022.006.022.007.022.009.022.01.022.011.023.012.023.013.023.015.024.016.023.017.024.018.024.019.024.021.024.022.024.023.025.024.024.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.052.11.051.114.051.119.052.123.05.127.051.131.05.135.049.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.044.171.042.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.022.23.02.233.018.236.016.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.012.241-.015.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.048.139-.05.136-.049.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.051.051-.049.023-.025.023-.024.021-.025.02-.024.019-.024.018-.024.017-.024.015-.023.014-.023.013-.024.012-.022.01-.023.01-.023.008-.022.006-.022.006-.022.004-.021.004-.022.001-.021.001-.021v-4.139l-.077.054-.08.054-.083.054-.085.052-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.044-.118.044-.12.044-.122.042-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.035-.143.033-.144.033-.147.033-.148.031-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.009-.179.009-.179.007-.181.007-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.007-.179-.007-.179-.009-.178-.009-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.031-.146-.033-.145-.033-.143-.033-.141-.035-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.04-.126-.041-.124-.042-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.051-.093-.051-.09-.051-.087-.053-.085-.052-.083-.054-.08-.054-.077-.054v4.139zm0-5.666v.011l.001.02.003.022.004.021.005.022.006.021.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.024.018.023.019.024.021.025.022.024.023.024.024.025.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.051.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.043.171.043.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.021.23.02.233.018.236.017.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.013.241-.014.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.049.139-.049.136-.049.131-.051.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.049.023-.025.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.022.01-.023.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.153l-.077.054-.08.054-.083.053-.085.053-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.048-.105.048-.106.048-.109.046-.111.046-.114.046-.115.044-.118.044-.12.043-.122.043-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.034-.143.034-.144.033-.147.032-.148.032-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.024-.161.024-.162.023-.163.023-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.01-.178.01-.179.009-.179.007-.181.006-.182.006-.182.004-.184.003-.184.001-.185.001-.185-.001-.184-.001-.184-.003-.182-.004-.182-.006-.181-.006-.179-.007-.179-.009-.178-.01-.176-.01-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.023-.162-.023-.161-.024-.159-.024-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.032-.146-.032-.145-.033-.143-.034-.141-.034-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.041-.126-.041-.124-.041-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.048-.105-.048-.102-.048-.1-.05-.097-.049-.095-.051-.093-.051-.09-.052-.087-.052-.085-.053-.083-.053-.08-.054-.077-.054v4.153zm8.74-8.179l-.257.004-.254.005-.25.008-.247.011-.244.012-.241.014-.237.016-.233.018-.231.021-.226.022-.224.023-.22.026-.216.027-.212.028-.21.031-.205.032-.202.033-.198.034-.194.036-.191.038-.187.038-.183.04-.179.041-.175.042-.172.043-.168.043-.163.045-.16.046-.155.046-.152.048-.148.048-.143.048-.139.049-.136.05-.131.05-.126.051-.123.051-.118.051-.114.052-.11.052-.106.052-.101.052-.096.052-.092.052-.088.052-.083.052-.079.052-.074.051-.07.052-.065.051-.06.05-.056.05-.051.05-.023.025-.023.024-.021.024-.02.025-.019.024-.018.024-.017.023-.015.024-.014.023-.013.023-.012.023-.01.023-.01.022-.008.022-.006.023-.006.021-.004.022-.004.021-.001.021-.001.021.001.021.001.021.004.021.004.022.006.021.006.023.008.022.01.022.01.023.012.023.013.023.014.023.015.024.017.023.018.024.019.024.02.025.021.024.023.024.023.025.051.05.056.05.06.05.065.051.07.052.074.051.079.052.083.052.088.052.092.052.096.052.101.052.106.052.11.052.114.052.118.051.123.051.126.051.131.05.136.05.139.049.143.048.148.048.152.048.155.046.16.046.163.045.168.043.172.043.175.042.179.041.183.04.187.038.191.038.194.036.198.034.202.033.205.032.21.031.212.028.216.027.22.026.224.023.226.022.231.021.233.018.237.016.241.014.244.012.247.011.25.008.254.005.257.004.26.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.022.224-.023.22-.026.216-.027.212-.028.21-.031.205-.032.202-.033.198-.034.194-.036.191-.038.187-.038.183-.04.179-.041.175-.042.172-.043.168-.043.163-.045.16-.046.155-.046.152-.048.148-.048.143-.048.139-.049.136-.05.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.05.051-.05.023-.025.023-.024.021-.024.02-.025.019-.024.018-.024.017-.023.015-.024.014-.023.013-.023.012-.023.01-.023.01-.022.008-.022.006-.023.006-.021.004-.022.004-.021.001-.021.001-.021-.001-.021-.001-.021-.004-.021-.004-.022-.006-.021-.006-.023-.008-.022-.01-.022-.01-.023-.012-.023-.013-.023-.014-.023-.015-.024-.017-.023-.018-.024-.019-.024-.02-.025-.021-.024-.023-.024-.023-.025-.051-.05-.056-.05-.06-.05-.065-.051-.07-.052-.074-.051-.079-.052-.083-.052-.088-.052-.092-.052-.096-.052-.101-.052-.106-.052-.11-.052-.114-.052-.118-.051-.123-.051-.126-.051-.131-.05-.136-.05-.139-.049-.143-.048-.148-.048-.152-.048-.155-.046-.16-.046-.163-.045-.168-.043-.172-.043-.175-.042-.179-.041-.183-.04-.187-.038-.191-.038-.194-.036-.198-.034-.202-.033-.205-.032-.21-.031-.212-.028-.216-.027-.22-.026-.224-.023-.226-.022-.231-.021-.233-.018-.237-.016-.241-.014-.244-.012-.247-.011-.25-.008-.254-.005-.257-.004-.26-.001-.26.001z\");}(u),function(t){t.append(\"defs\").append(\"symbol\").attr(\"id\",\"clock\").attr(\"width\",\"24\").attr(\"height\",\"24\").append(\"path\").attr(\"transform\",\"scale(.5)\").attr(\"d\",\"M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm5.848 12.459c.202.038.202.333.001.372-1.907.361-6.045 1.111-6.547 1.111-.719 0-1.301-.582-1.301-1.301 0-.512.77-5.447 1.125-7.445.034-.192.312-.181.343.014l.985 6.238 5.394 1.011z\");}(u);var h=new jn(r);h.setData(Pn.diagramMarginX,Pn.diagramMarginX,Pn.diagramMarginY,Pn.diagramMarginY),h.data.widthLimit=screen.availWidth,Ln=Pn.diagramMarginX,In=Pn.diagramMarginY;var f=r.db.getTitle();r.db.getC4Type(),Xn(u,\"\",h,r.db.getBoundarys(\"\"),r),function(t){t.append(\"defs\").append(\"marker\").attr(\"id\",\"arrowhead\").attr(\"refX\",9).attr(\"refY\",5).attr(\"markerUnits\",\"userSpaceOnUse\").attr(\"markerWidth\",12).attr(\"markerHeight\",12).attr(\"orient\",\"auto\").append(\"path\").attr(\"d\",\"M 0 0 L 10 5 L 0 10 z\");}(u),function(t){t.append(\"defs\").append(\"marker\").attr(\"id\",\"arrowend\").attr(\"refX\",1).attr(\"refY\",5).attr(\"markerUnits\",\"userSpaceOnUse\").attr(\"markerWidth\",12).attr(\"markerHeight\",12).attr(\"orient\",\"auto\").append(\"path\").attr(\"d\",\"M 10 0 L 0 5 L 10 10 z\");}(u),function(t){var e=t.append(\"defs\").append(\"marker\").attr(\"id\",\"crosshead\").attr(\"markerWidth\",15).attr(\"markerHeight\",8).attr(\"orient\",\"auto\").attr(\"refX\",16).attr(\"refY\",4);e.append(\"path\").attr(\"fill\",\"black\").attr(\"stroke\",\"#000000\").style(\"stroke-dasharray\",\"0, 0\").attr(\"stroke-width\",\"1px\").attr(\"d\",\"M 9,2 V 6 L16,4 Z\"),e.append(\"path\").attr(\"fill\",\"none\").attr(\"stroke\",\"#000000\").style(\"stroke-dasharray\",\"0, 0\").attr(\"stroke-width\",\"1px\").attr(\"d\",\"M 0,1 L 6,7 M 6,1 L 0,7\");}(u),function(t){t.append(\"defs\").append(\"marker\").attr(\"id\",\"filled-head\").attr(\"refX\",18).attr(\"refY\",7).attr(\"markerWidth\",20).attr(\"markerHeight\",28).attr(\"orient\",\"auto\").append(\"path\").attr(\"d\",\"M 18,7 L9,13 L14,7 L9,1 Z\");}(u),function(t,e,n,r){var i,a,o=0,s=function(t,e){var n=\"undefined\"!=typeof Symbol&&t[Symbol.iterator]||t[\"@@iterator\"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(t){if(\"string\"==typeof t)return Nn(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return \"Object\"===n&&t.constructor&&(n=t.constructor.name),\"Map\"===n||\"Set\"===n?Array.from(t):\"Arguments\"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Nn(t,e):void 0}}(t))||e&&t&&\"number\"==typeof t.length){n&&(t=n);var r=0,i=function(){};return {s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\")}var a,o=!0,s=!1;return {s:function(){n=n.call(t);},n:function(){var t=n.next();return o=t.done,t},e:function(t){s=!0,a=t;},f:function(){try{o||null==n.return||n.return();}finally{if(s)throw a}}}}(e);try{for(s.s();!(i=s.n()).done;){var c=i.value;o+=1;var l=c.wrap&&Pn.wrap,u={fontFamily:(a=Pn).messageFontFamily,fontSize:a.messageFontSize,fontWeight:a.messageFontWeight};\"C4Dynamic\"===r.db.getC4Type()&&(c.label.text=o+\": \"+c.label.text);var h=xn(c.label.text,u);$n(\"label\",c,l,u,h),c.techn&&\"\"!==c.techn.text&&$n(\"techn\",c,l,u,h=xn(c.techn.text,u)),c.descr&&\"\"!==c.descr.text&&$n(\"descr\",c,l,u,h=xn(c.descr.text,u));var f=n(c.from),d=n(c.to),p=Gn(f,d);c.startPoint=p.startPoint,c.endPoint=p.endPoint;}}catch(t){s.e(t);}finally{s.f();}We(t,e,Pn);}(u,r.db.getRels(),r.db.getC4Shape,r),h.data.stopx=Ln,h.data.stopy=In;var d=h.data,p=d.stopy-d.starty+2*Pn.diagramMarginY,g=d.stopx-d.startx+2*Pn.diagramMarginX;f&&u.append(\"text\").text(f).attr(\"x\",(d.stopx-d.startx)/2-4*Pn.diagramMarginX).attr(\"y\",d.starty+Pn.diagramMarginY),Tn(u,0,g,Pn.useMaxWidth);var y=f?60:0;u.attr(\"viewBox\",d.startx-Pn.diagramMarginX+\" -\"+(Pn.diagramMarginY+y)+\" \"+g+\" \"+(p+y)),Mn(qe.parser.yy,u,e),o.debug(\"models:\",d);}};function Qn(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var Kn=\"classid-\",Jn=[],tr={},er=0,nr=[],rr=function(t){return ue.sanitizeText(t,Xt())},ir=function(t){var e=\"\",n=t;if(t.indexOf(\"~\")>0){var r=t.split(\"~\");n=r[0],e=ue.sanitizeText(r[1],Xt());}return {className:n,type:e}},ar=function(t){var e=ir(t);void 0===tr[e.className]&&(tr[e.className]={id:e.className,type:e.type,cssClasses:[],methods:[],members:[],annotations:[],domId:Kn+e.className+\"-\"+er},er++);},or=function(t){for(var e=Object.keys(tr),n=0;n<e.length;n++)if(tr[e[n]].id===t)return tr[e[n]].domId},sr=function(t,e){var n=ir(t).className,r=tr[n];if(\"string\"==typeof e){var i=e.trim();i.startsWith(\"<<\")&&i.endsWith(\">>\")?r.annotations.push(rr(i.substring(2,i.length-2))):i.indexOf(\")\")>0?r.methods.push(rr(i)):i&&r.members.push(rr(i));}},cr=function(t,e){t.split(\",\").forEach((function(t){var n=t;t[0].match(/\\d/)&&(n=Kn+n),void 0!==tr[n]&&tr[n].cssClasses.push(e);}));},lr=function(t,e,n){var r=Xt(),i=t,a=or(i);if(\"loose\"===r.securityLevel&&void 0!==e&&void 0!==tr[i]){var o=[];if(\"string\"==typeof n){o=n.split(/,(?=(?:(?:[^\"]*\"){2})*[^\"]*$)/);for(var s=0;s<o.length;s++){var c=o[s].trim();'\"'===c.charAt(0)&&'\"'===c.charAt(c.length-1)&&(c=c.substr(1,c.length-2)),o[s]=c;}}0===o.length&&o.push(a),nr.push((function(){var t=document.querySelector('[id=\"'.concat(a,'\"]'));null!==t&&t.addEventListener(\"click\",(function(){var t;An.runFunc.apply(An,[e].concat(function(t){if(Array.isArray(t))return Qn(t)}(t=o)||function(t){if(\"undefined\"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t[\"@@iterator\"])return Array.from(t)}(t)||function(t,e){if(t){if(\"string\"==typeof t)return Qn(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return \"Object\"===n&&t.constructor&&(n=t.constructor.name),\"Map\"===n||\"Set\"===n?Array.from(t):\"Arguments\"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Qn(t,e):void 0}}(t)||function(){throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\")}()));}),!1);}));}},ur=function(t){var e=(0, l.select)(\".mermaidTooltip\");null===(e._groups||e)[0][0]&&(e=(0, l.select)(\"body\").append(\"div\").attr(\"class\",\"mermaidTooltip\").style(\"opacity\",0)),(0, l.select)(t).select(\"svg\").selectAll(\"g.node\").on(\"mouseover\",(function(){var t=(0, l.select)(this);if(null!==t.attr(\"title\")){var n=this.getBoundingClientRect();e.transition().duration(200).style(\"opacity\",\".9\"),e.text(t.attr(\"title\")).style(\"left\",window.scrollX+n.left+(n.right-n.left)/2+\"px\").style(\"top\",window.scrollY+n.top-14+document.body.scrollTop+\"px\"),e.html(e.html().replace(/&lt;br\\/&gt;/g,\"<br/>\")),t.classed(\"hover\",!0);}})).on(\"mouseout\",(function(){e.transition().duration(500).style(\"opacity\",0),(0, l.select)(this).classed(\"hover\",!1);}));};nr.push(ur);var hr=\"TB\";const fr={parseDirective:function(t,e,n){cu.parseDirective(this,t,e,n);},setAccTitle:ye,getAccTitle:me,getAccDescription:ve,setAccDescription:be,getConfig:function(){return Xt().class},addClass:ar,bindFunctions:function(t){nr.forEach((function(e){e(t);}));},clear:function(){Jn=[],tr={},(nr=[]).push(ur),ge();},getClass:function(t){return tr[t]},getClasses:function(){return tr},addAnnotation:function(t,e){var n=ir(t).className;tr[n].annotations.push(e);},getRelations:function(){return Jn},addRelation:function(t){o.debug(\"Adding relation: \"+JSON.stringify(t)),ar(t.id1),ar(t.id2),t.id1=ir(t.id1).className,t.id2=ir(t.id2).className,t.relationTitle1=ue.sanitizeText(t.relationTitle1.trim(),Xt()),t.relationTitle2=ue.sanitizeText(t.relationTitle2.trim(),Xt()),Jn.push(t);},getDirection:function(){return hr},setDirection:function(t){hr=t;},addMember:sr,addMembers:function(t,e){Array.isArray(e)&&(e.reverse(),e.forEach((function(e){return sr(t,e)})));},cleanupLabel:function(t){return \":\"===t.substring(0,1)?ue.sanitizeText(t.substr(1).trim(),Xt()):rr(t.trim())},lineType:{LINE:0,DOTTED_LINE:1},relationType:{AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3,LOLLIPOP:4},setClickEvent:function(t,e,n){t.split(\",\").forEach((function(t){lr(t,e,n),tr[t].haveCallback=!0;})),cr(t,\"clickable\");},setCssClass:cr,setLink:function(t,e,n){var r=Xt();t.split(\",\").forEach((function(t){var i=t;t[0].match(/\\d/)&&(i=Kn+i),void 0!==tr[i]&&(tr[i].link=An.formatUrl(e,r),\"sandbox\"===r.securityLevel?tr[i].linkTarget=\"_top\":tr[i].linkTarget=\"string\"==typeof n?rr(n):\"_blank\");})),cr(t,\"clickable\");},getTooltip:function(t){return tr[t].tooltip},setTooltip:function(t,e){var n=Xt();t.split(\",\").forEach((function(t){void 0!==e&&(tr[t].tooltip=ue.sanitizeText(e,n));}));},lookUpDomId:or};var dr=n(681),pr=n.n(dr),gr=n(8282),yr=n.n(gr),mr=0,br=function(t){var e=t.match(/^(\\+|-|~|#)?(\\w+)(~\\w+~|\\[\\])?\\s+(\\w+) *(\\*|\\$)?$/),n=t.match(/^([+|\\-|~|#])?(\\w+) *\\( *(.*)\\) *(\\*|\\$)? *(\\w*[~|[\\]]*\\s*\\w*~?)$/);return e&&!n?vr(e):n?_r(n):xr(t)},vr=function(t){var e=\"\",n=\"\";try{var r=t[1]?t[1].trim():\"\",i=t[2]?t[2].trim():\"\",a=t[3]?le(t[3].trim()):\"\",o=t[4]?t[4].trim():\"\",s=t[5]?t[5].trim():\"\";n=r+i+a+\" \"+o,e=wr(s);}catch(e){n=t;}return {displayText:n,cssStyle:e}},_r=function(t){var e=\"\",n=\"\";try{var r=t[1]?t[1].trim():\"\",i=t[2]?t[2].trim():\"\",a=t[3]?le(t[3].trim()):\"\",o=t[4]?t[4].trim():\"\";n=r+i+\"(\"+a+\")\"+(t[5]?\" : \"+le(t[5]).trim():\"\"),e=wr(o);}catch(e){n=t;}return {displayText:n,cssStyle:e}},xr=function(t){var e=\"\",n=\"\",r=\"\",i=t.indexOf(\"(\"),a=t.indexOf(\")\");if(i>1&&a>i&&a<=t.length){var o=\"\",s=\"\",c=t.substring(0,1);c.match(/\\w/)?s=t.substring(0,i).trim():(c.match(/\\+|-|~|#/)&&(o=c),s=t.substring(1,i).trim());var l=t.substring(i+1,a),u=t.substring(a+1,1);n=wr(u),e=o+s+\"(\"+le(l.trim())+\")\",a<\"\".length&&\"\"!==(r=t.substring(a+2).trim())&&(r=\" : \"+le(r));}else e=le(t);return {displayText:e,cssStyle:n}},kr=function(t,e,n,r){var i=br(e),a=t.append(\"tspan\").attr(\"x\",r.padding).text(i.displayText);\"\"!==i.cssStyle&&a.attr(\"style\",i.cssStyle),n||a.attr(\"dy\",r.textHeight);},wr=function(t){switch(t){case\"*\":return \"font-style:italic;\";case\"$\":return \"text-decoration:underline;\";default:return \"\"}};const Tr=function(t,e,n,r){o.debug(\"Rendering class \",e,n);var i,a=e.id,s={id:a,label:e.id,width:0,height:0},c=t.append(\"g\").attr(\"id\",r.db.lookUpDomId(a)).attr(\"class\",\"classGroup\");i=e.link?c.append(\"svg:a\").attr(\"xlink:href\",e.link).attr(\"target\",e.linkTarget).append(\"text\").attr(\"y\",n.textHeight+n.padding).attr(\"x\",0):c.append(\"text\").attr(\"y\",n.textHeight+n.padding).attr(\"x\",0);var l=!0;e.annotations.forEach((function(t){var e=i.append(\"tspan\").text(\"«\"+t+\"»\");l||e.attr(\"dy\",n.textHeight),l=!1;}));var u=e.id;void 0!==e.type&&\"\"!==e.type&&(u+=\"<\"+e.type+\">\");var h=i.append(\"tspan\").text(u).attr(\"class\",\"title\");l||h.attr(\"dy\",n.textHeight);var f=i.node().getBBox().height,d=c.append(\"line\").attr(\"x1\",0).attr(\"y1\",n.padding+f+n.dividerMargin/2).attr(\"y2\",n.padding+f+n.dividerMargin/2),p=c.append(\"text\").attr(\"x\",n.padding).attr(\"y\",f+n.dividerMargin+n.textHeight).attr(\"fill\",\"white\").attr(\"class\",\"classText\");l=!0,e.members.forEach((function(t){kr(p,t,l,n),l=!1;}));var g=p.node().getBBox(),y=c.append(\"line\").attr(\"x1\",0).attr(\"y1\",n.padding+f+n.dividerMargin+g.height).attr(\"y2\",n.padding+f+n.dividerMargin+g.height),m=c.append(\"text\").attr(\"x\",n.padding).attr(\"y\",f+2*n.dividerMargin+g.height+n.textHeight).attr(\"fill\",\"white\").attr(\"class\",\"classText\");l=!0,e.methods.forEach((function(t){kr(m,t,l,n),l=!1;}));var b=c.node().getBBox(),v=\" \";e.cssClasses.length>0&&(v+=e.cssClasses.join(\" \"));var _=c.insert(\"rect\",\":first-child\").attr(\"x\",0).attr(\"y\",0).attr(\"width\",b.width+2*n.padding).attr(\"height\",b.height+n.padding+.5*n.dividerMargin).attr(\"class\",v).node().getBBox().width;return i.node().childNodes.forEach((function(t){t.setAttribute(\"x\",(_-t.getBBox().width)/2);})),e.tooltip&&i.insert(\"title\").text(e.tooltip),d.attr(\"x2\",_),y.attr(\"x2\",_),s.width=_,s.height=b.height+n.padding+.5*n.dividerMargin,s};var Er={},Cr=function(t){var e=Object.entries(Er).find((function(e){return e[1].label===t}));if(e)return e[0]};const Sr={draw:function(t,e,n,r){var i=Xt().class;Er={},o.info(\"Rendering diagram \"+t);var a,s=Xt().securityLevel;\"sandbox\"===s&&(a=(0, l.select)(\"#i\"+e));var c,u=\"sandbox\"===s?(0, l.select)(a.nodes()[0].contentDocument.body):(0, l.select)(\"body\"),h=(\"sandbox\"===s?a.nodes()[0].contentDocument:document,u.select(\"[id='\".concat(e,\"']\")));(c=h).append(\"defs\").append(\"marker\").attr(\"id\",\"extensionStart\").attr(\"class\",\"extension\").attr(\"refX\",0).attr(\"refY\",7).attr(\"markerWidth\",190).attr(\"markerHeight\",240).attr(\"orient\",\"auto\").append(\"path\").attr(\"d\",\"M 1,7 L18,13 V 1 Z\"),c.append(\"defs\").append(\"marker\").attr(\"id\",\"extensionEnd\").attr(\"refX\",19).attr(\"refY\",7).attr(\"markerWidth\",20).attr(\"markerHeight\",28).attr(\"orient\",\"auto\").append(\"path\").attr(\"d\",\"M 1,1 V 13 L18,7 Z\"),c.append(\"defs\").append(\"marker\").attr(\"id\",\"compositionStart\").attr(\"class\",\"extension\").attr(\"refX\",0).attr(\"refY\",7).attr(\"markerWidth\",190).attr(\"markerHeight\",240).attr(\"orient\",\"auto\").append(\"path\").attr(\"d\",\"M 18,7 L9,13 L1,7 L9,1 Z\"),c.append(\"defs\").append(\"marker\").attr(\"id\",\"compositionEnd\").attr(\"refX\",19).attr(\"refY\",7).attr(\"markerWidth\",20).attr(\"markerHeight\",28).attr(\"orient\",\"auto\").append(\"path\").attr(\"d\",\"M 18,7 L9,13 L1,7 L9,1 Z\"),c.append(\"defs\").append(\"marker\").attr(\"id\",\"aggregationStart\").attr(\"class\",\"extension\").attr(\"refX\",0).attr(\"refY\",7).attr(\"markerWidth\",190).attr(\"markerHeight\",240).attr(\"orient\",\"auto\").append(\"path\").attr(\"d\",\"M 18,7 L9,13 L1,7 L9,1 Z\"),c.append(\"defs\").append(\"marker\").attr(\"id\",\"aggregationEnd\").attr(\"refX\",19).attr(\"refY\",7).attr(\"markerWidth\",20).attr(\"markerHeight\",28).attr(\"orient\",\"auto\").append(\"path\").attr(\"d\",\"M 18,7 L9,13 L1,7 L9,1 Z\"),c.append(\"defs\").append(\"marker\").attr(\"id\",\"dependencyStart\").attr(\"class\",\"extension\").attr(\"refX\",0).attr(\"refY\",7).attr(\"markerWidth\",190).attr(\"markerHeight\",240).attr(\"orient\",\"auto\").append(\"path\").attr(\"d\",\"M 5,7 L9,13 L1,7 L9,1 Z\"),c.append(\"defs\").append(\"marker\").attr(\"id\",\"dependencyEnd\").attr(\"refX\",19).attr(\"refY\",7).attr(\"markerWidth\",20).attr(\"markerHeight\",28).attr(\"orient\",\"auto\").append(\"path\").attr(\"d\",\"M 18,7 L9,13 L14,7 L9,1 Z\");var f=new(yr().Graph)({multigraph:!0});f.setGraph({isMultiGraph:!0}),f.setDefaultEdgeLabel((function(){return {}}));for(var d=r.db.getClasses(),p=Object.keys(d),g=0;g<p.length;g++){var y=d[p[g]],m=Tr(h,y,i,r);Er[m.id]=m,f.setNode(m.id,m),o.info(\"Org height: \"+m.height);}r.db.getRelations().forEach((function(t){o.info(\"tjoho\"+Cr(t.id1)+Cr(t.id2)+JSON.stringify(t)),f.setEdge(Cr(t.id1),Cr(t.id2),{relation:t},t.title||\"DEFAULT\");})),pr().layout(f),f.nodes().forEach((function(t){void 0!==t&&void 0!==f.node(t)&&(o.debug(\"Node \"+t+\": \"+JSON.stringify(f.node(t))),u.select(\"#\"+r.db.lookUpDomId(t)).attr(\"transform\",\"translate(\"+(f.node(t).x-f.node(t).width/2)+\",\"+(f.node(t).y-f.node(t).height/2)+\" )\"));})),f.edges().forEach((function(t){void 0!==t&&void 0!==f.edge(t)&&(o.debug(\"Edge \"+t.v+\" -> \"+t.w+\": \"+JSON.stringify(f.edge(t))),function(t,e,n,r,i){var a=function(t){switch(t){case i.db.relationType.AGGREGATION:return \"aggregation\";case i.db.EXTENSION:return \"extension\";case i.db.COMPOSITION:return \"composition\";case i.db.DEPENDENCY:return \"dependency\";case i.db.LOLLIPOP:return \"lollipop\"}};e.points=e.points.filter((function(t){return !Number.isNaN(t.y)}));var s,c,u=e.points,h=(0, l.line)().x((function(t){return t.x})).y((function(t){return t.y})).curve(l.curveBasis),f=t.append(\"path\").attr(\"d\",h(u)).attr(\"id\",\"edge\"+mr).attr(\"class\",\"relation\"),d=\"\";r.arrowMarkerAbsolute&&(d=(d=(d=window.location.protocol+\"//\"+window.location.host+window.location.pathname+window.location.search).replace(/\\(/g,\"\\\\(\")).replace(/\\)/g,\"\\\\)\")),1==n.relation.lineType&&f.attr(\"class\",\"relation dashed-line\"),\"none\"!==n.relation.type1&&f.attr(\"marker-start\",\"url(\"+d+\"#\"+a(n.relation.type1)+\"Start)\"),\"none\"!==n.relation.type2&&f.attr(\"marker-end\",\"url(\"+d+\"#\"+a(n.relation.type2)+\"End)\");var p,g,y,m,b=e.points.length,v=An.calcLabelPosition(e.points);if(s=v.x,c=v.y,b%2!=0&&b>1){var _=An.calcCardinalityPosition(\"none\"!==n.relation.type1,e.points,e.points[0]),x=An.calcCardinalityPosition(\"none\"!==n.relation.type2,e.points,e.points[b-1]);o.debug(\"cardinality_1_point \"+JSON.stringify(_)),o.debug(\"cardinality_2_point \"+JSON.stringify(x)),p=_.x,g=_.y,y=x.x,m=x.y;}if(void 0!==n.title){var k=t.append(\"g\").attr(\"class\",\"classLabel\"),w=k.append(\"text\").attr(\"class\",\"label\").attr(\"x\",s).attr(\"y\",c).attr(\"fill\",\"red\").attr(\"text-anchor\",\"middle\").text(n.title);window.label=w;var T=w.node().getBBox();k.insert(\"rect\",\":first-child\").attr(\"class\",\"box\").attr(\"x\",T.x-r.padding/2).attr(\"y\",T.y-r.padding/2).attr(\"width\",T.width+r.padding).attr(\"height\",T.height+r.padding);}o.info(\"Rendering relation \"+JSON.stringify(n)),void 0!==n.relationTitle1&&\"none\"!==n.relationTitle1&&t.append(\"g\").attr(\"class\",\"cardinality\").append(\"text\").attr(\"class\",\"type1\").attr(\"x\",p).attr(\"y\",g).attr(\"fill\",\"black\").attr(\"font-size\",\"6\").text(n.relationTitle1),void 0!==n.relationTitle2&&\"none\"!==n.relationTitle2&&t.append(\"g\").attr(\"class\",\"cardinality\").append(\"text\").attr(\"class\",\"type2\").attr(\"x\",y).attr(\"y\",m).attr(\"fill\",\"black\").attr(\"font-size\",\"6\").text(n.relationTitle2),mr++;}(h,f.edge(t),f.edge(t).relation,i,r));}));var b=h.node().getBBox(),v=b.width+40,_=b.height+40;Tn(h,0,v,i.useMaxWidth);var x=\"\".concat(b.x-20,\" \").concat(b.y-20,\" \").concat(v,\" \").concat(_);o.debug(\"viewBox \".concat(x)),h.attr(\"viewBox\",x),Mn(r.db,h,e);}};var Ar={extension:function(t,e,n){o.trace(\"Making markers for \",n),t.append(\"defs\").append(\"marker\").attr(\"id\",e+\"-extensionStart\").attr(\"class\",\"marker extension \"+e).attr(\"refX\",0).attr(\"refY\",7).attr(\"markerWidth\",190).attr(\"markerHeight\",240).attr(\"orient\",\"auto\").append(\"path\").attr(\"d\",\"M 1,7 L18,13 V 1 Z\"),t.append(\"defs\").append(\"marker\").attr(\"id\",e+\"-extensionEnd\").attr(\"class\",\"marker extension \"+e).attr(\"refX\",19).attr(\"refY\",7).attr(\"markerWidth\",20).attr(\"markerHeight\",28).attr(\"orient\",\"auto\").append(\"path\").attr(\"d\",\"M 1,1 V 13 L18,7 Z\");},composition:function(t,e){t.append(\"defs\").append(\"marker\").attr(\"id\",e+\"-compositionStart\").attr(\"class\",\"marker composition \"+e).attr(\"refX\",0).attr(\"refY\",7).attr(\"markerWidth\",190).attr(\"markerHeight\",240).attr(\"orient\",\"auto\").append(\"path\").attr(\"d\",\"M 18,7 L9,13 L1,7 L9,1 Z\"),t.append(\"defs\").append(\"marker\").attr(\"id\",e+\"-compositionEnd\").attr(\"class\",\"marker composition \"+e).attr(\"refX\",19).attr(\"refY\",7).attr(\"markerWidth\",20).attr(\"markerHeight\",28).attr(\"orient\",\"auto\").append(\"path\").attr(\"d\",\"M 18,7 L9,13 L1,7 L9,1 Z\");},aggregation:function(t,e){t.append(\"defs\").append(\"marker\").attr(\"id\",e+\"-aggregationStart\").attr(\"class\",\"marker aggregation \"+e).attr(\"refX\",0).attr(\"refY\",7).attr(\"markerWidth\",190).attr(\"markerHeight\",240).attr(\"orient\",\"auto\").append(\"path\").attr(\"d\",\"M 18,7 L9,13 L1,7 L9,1 Z\"),t.append(\"defs\").append(\"marker\").attr(\"id\",e+\"-aggregationEnd\").attr(\"class\",\"marker aggregation \"+e).attr(\"refX\",19).attr(\"refY\",7).attr(\"markerWidth\",20).attr(\"markerHeight\",28).attr(\"orient\",\"auto\").append(\"path\").attr(\"d\",\"M 18,7 L9,13 L1,7 L9,1 Z\");},dependency:function(t,e){t.append(\"defs\").append(\"marker\").attr(\"id\",e+\"-dependencyStart\").attr(\"class\",\"marker dependency \"+e).attr(\"refX\",0).attr(\"refY\",7).attr(\"markerWidth\",190).attr(\"markerHeight\",240).attr(\"orient\",\"auto\").append(\"path\").attr(\"d\",\"M 5,7 L9,13 L1,7 L9,1 Z\"),t.append(\"defs\").append(\"marker\").attr(\"id\",e+\"-dependencyEnd\").attr(\"class\",\"marker dependency \"+e).attr(\"refX\",19).attr(\"refY\",7).attr(\"markerWidth\",20).attr(\"markerHeight\",28).attr(\"orient\",\"auto\").append(\"path\").attr(\"d\",\"M 18,7 L9,13 L14,7 L9,1 Z\");},lollipop:function(t,e,n){t.append(\"defs\").append(\"marker\").attr(\"id\",e+\"-lollipopStart\").attr(\"class\",\"marker lollipop \"+e).attr(\"refX\",0).attr(\"refY\",7).attr(\"markerWidth\",190).attr(\"markerHeight\",240).attr(\"orient\",\"auto\").append(\"circle\").attr(\"stroke\",\"black\").attr(\"fill\",\"white\").attr(\"cx\",6).attr(\"cy\",7).attr(\"r\",6);},point:function(t,e){t.append(\"marker\").attr(\"id\",e+\"-pointEnd\").attr(\"class\",\"marker \"+e).attr(\"viewBox\",\"0 0 10 10\").attr(\"refX\",9).attr(\"refY\",5).attr(\"markerUnits\",\"userSpaceOnUse\").attr(\"markerWidth\",12).attr(\"markerHeight\",12).attr(\"orient\",\"auto\").append(\"path\").attr(\"d\",\"M 0 0 L 10 5 L 0 10 z\").attr(\"class\",\"arrowMarkerPath\").style(\"stroke-width\",1).style(\"stroke-dasharray\",\"1,0\"),t.append(\"marker\").attr(\"id\",e+\"-pointStart\").attr(\"class\",\"marker \"+e).attr(\"viewBox\",\"0 0 10 10\").attr(\"refX\",0).attr(\"refY\",5).attr(\"markerUnits\",\"userSpaceOnUse\").attr(\"markerWidth\",12).attr(\"markerHeight\",12).attr(\"orient\",\"auto\").append(\"path\").attr(\"d\",\"M 0 5 L 10 10 L 10 0 z\").attr(\"class\",\"arrowMarkerPath\").style(\"stroke-width\",1).style(\"stroke-dasharray\",\"1,0\");},circle:function(t,e){t.append(\"marker\").attr(\"id\",e+\"-circleEnd\").attr(\"class\",\"marker \"+e).attr(\"viewBox\",\"0 0 10 10\").attr(\"refX\",11).attr(\"refY\",5).attr(\"markerUnits\",\"userSpaceOnUse\").attr(\"markerWidth\",11).attr(\"markerHeight\",11).attr(\"orient\",\"auto\").append(\"circle\").attr(\"cx\",\"5\").attr(\"cy\",\"5\").attr(\"r\",\"5\").attr(\"class\",\"arrowMarkerPath\").style(\"stroke-width\",1).style(\"stroke-dasharray\",\"1,0\"),t.append(\"marker\").attr(\"id\",e+\"-circleStart\").attr(\"class\",\"marker \"+e).attr(\"viewBox\",\"0 0 10 10\").attr(\"refX\",-1).attr(\"refY\",5).attr(\"markerUnits\",\"userSpaceOnUse\").attr(\"markerWidth\",11).attr(\"markerHeight\",11).attr(\"orient\",\"auto\").append(\"circle\").attr(\"cx\",\"5\").attr(\"cy\",\"5\").attr(\"r\",\"5\").attr(\"class\",\"arrowMarkerPath\").style(\"stroke-width\",1).style(\"stroke-dasharray\",\"1,0\");},cross:function(t,e){t.append(\"marker\").attr(\"id\",e+\"-crossEnd\").attr(\"class\",\"marker cross \"+e).attr(\"viewBox\",\"0 0 11 11\").attr(\"refX\",12).attr(\"refY\",5.2).attr(\"markerUnits\",\"userSpaceOnUse\").attr(\"markerWidth\",11).attr(\"markerHeight\",11).attr(\"orient\",\"auto\").append(\"path\").attr(\"d\",\"M 1,1 l 9,9 M 10,1 l -9,9\").attr(\"class\",\"arrowMarkerPath\").style(\"stroke-width\",2).style(\"stroke-dasharray\",\"1,0\"),t.append(\"marker\").attr(\"id\",e+\"-crossStart\").attr(\"class\",\"marker cross \"+e).attr(\"viewBox\",\"0 0 11 11\").attr(\"refX\",-1).attr(\"refY\",5.2).attr(\"markerUnits\",\"userSpaceOnUse\").attr(\"markerWidth\",11).attr(\"markerHeight\",11).attr(\"orient\",\"auto\").append(\"path\").attr(\"d\",\"M 1,1 l 9,9 M 10,1 l -9,9\").attr(\"class\",\"arrowMarkerPath\").style(\"stroke-width\",2).style(\"stroke-dasharray\",\"1,0\");},barb:function(t,e){t.append(\"defs\").append(\"marker\").attr(\"id\",e+\"-barbEnd\").attr(\"refX\",19).attr(\"refY\",7).attr(\"markerWidth\",20).attr(\"markerHeight\",14).attr(\"markerUnits\",\"strokeWidth\").attr(\"orient\",\"auto\").append(\"path\").attr(\"d\",\"M 19,7 L9,13 L14,7 L9,1 Z\");}};const Mr=function(t,e,n,r){e.forEach((function(e){Ar[e](t,n,r);}));};function Nr(t){return Nr=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&\"function\"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?\"symbol\":typeof t},Nr(t)}const Or=function(t,e,n,r){var i=t||\"\";if(\"object\"===Nr(i)&&(i=i[0]),ce(Xt().flowchart.htmlLabels)){i=i.replace(/\\\\n|\\n/g,\"<br />\"),o.info(\"vertexText\"+i);var a=function(t){var e,n=(0, l.select)(document.createElementNS(\"http://www.w3.org/2000/svg\",\"foreignObject\")),r=n.append(\"xhtml:div\"),i=t.label,a=t.isNode?\"nodeLabel\":\"edgeLabel\";return r.html('<span class=\"'+a+'\" '+(t.labelStyle?'style=\"'+t.labelStyle+'\"':\"\")+\">\"+i+\"</span>\"),(e=t.labelStyle)&&r.attr(\"style\",e),r.style(\"display\",\"inline-block\"),r.style(\"white-space\",\"nowrap\"),r.attr(\"xmlns\",\"http://www.w3.org/1999/xhtml\"),n.node()}({isNode:r,label:iu(i).replace(/fa[lrsb]?:fa-[\\w-]+/g,(function(t){return \"<i class='\".concat(t.replace(\":\",\" \"),\"'></i>\")})),labelStyle:e.replace(\"fill:\",\"color:\")});return a}var s=document.createElementNS(\"http://www.w3.org/2000/svg\",\"text\");s.setAttribute(\"style\",e.replace(\"color:\",\"fill:\"));var c=[];c=\"string\"==typeof i?i.split(/\\\\n|\\n|<br\\s*\\/?>/gi):Array.isArray(i)?i:[];for(var u=0;u<c.length;u++){var h=document.createElementNS(\"http://www.w3.org/2000/svg\",\"tspan\");h.setAttributeNS(\"http://www.w3.org/XML/1998/namespace\",\"xml:space\",\"preserve\"),h.setAttribute(\"dy\",\"1em\"),h.setAttribute(\"x\",\"0\"),n?h.setAttribute(\"class\",\"title-row\"):h.setAttribute(\"class\",\"row\"),h.textContent=c[u].trim(),s.appendChild(h);}return s};var Dr=function(t,e,n,r){var i;i=n||\"node default\";var a=t.insert(\"g\").attr(\"class\",i).attr(\"id\",e.domId||e.id),o=a.insert(\"g\").attr(\"class\",\"label\").attr(\"style\",e.labelStyle),s=\"string\"==typeof e.labelText?e.labelText:e.labelText[0],c=o.node().appendChild(Or(ie(iu(s),Xt()),e.labelStyle,!1,r)),u=c.getBBox();if(ce(Xt().flowchart.htmlLabels)){var h=c.children[0],f=(0, l.select)(c);u=h.getBoundingClientRect(),f.attr(\"width\",u.width),f.attr(\"height\",u.height);}var d=e.padding/2;return o.attr(\"transform\",\"translate(\"+-u.width/2+\", \"+-u.height/2+\")\"),{shapeSvg:a,bbox:u,halfPadding:d,label:o}},Br=function(t,e){var n=e.node().getBBox();t.width=n.width,t.height=n.height;};function Lr(t,e,n,r){return t.insert(\"polygon\",\":first-child\").attr(\"points\",r.map((function(t){return t.x+\",\"+t.y})).join(\" \")).attr(\"class\",\"label-container\").attr(\"transform\",\"translate(\"+-e/2+\",\"+n/2+\")\")}var Ir={},Fr={},Rr={},Pr=function(t,e){return o.trace(\"In isDecendant\",e,\" \",t,\" = \",Fr[e].indexOf(t)>=0),Fr[e].indexOf(t)>=0},jr=function t(e,n,r,i){o.warn(\"Copying children of \",e,\"root\",i,\"data\",n.node(e),i);var a=n.children(e)||[];e!==i&&a.push(e),o.warn(\"Copying (nodes) clusterId\",e,\"nodes\",a),a.forEach((function(a){if(n.children(a).length>0)t(a,n,r,i);else {var s=n.node(a);o.info(\"cp \",a,\" to \",i,\" with parent \",e),r.setNode(a,s),i!==n.parent(a)&&(o.warn(\"Setting parent\",a,n.parent(a)),r.setParent(a,n.parent(a))),e!==i&&a!==e?(o.debug(\"Setting parent\",a,e),r.setParent(a,e)):(o.info(\"In copy \",e,\"root\",i,\"data\",n.node(e),i),o.debug(\"Not Setting parent for node=\",a,\"cluster!==rootId\",e!==i,\"node!==clusterId\",a!==e));var c=n.edges(a);o.debug(\"Copying Edges\",c),c.forEach((function(t){o.info(\"Edge\",t);var a=n.edge(t.v,t.w,t.name);o.info(\"Edge data\",a,i);try{!function(t,e){return o.info(\"Decendants of \",e,\" is \",Fr[e]),o.info(\"Edge is \",t),t.v!==e&&t.w!==e&&(Fr[e]?(o.info(\"Here \"),Fr[e].indexOf(t.v)>=0||!!Pr(t.v,e)||!!Pr(t.w,e)||Fr[e].indexOf(t.w)>=0):(o.debug(\"Tilt, \",e,\",not in decendants\"),!1))}(t,i)?o.info(\"Skipping copy of edge \",t.v,\"--\\x3e\",t.w,\" rootId: \",i,\" clusterId:\",e):(o.info(\"Copying as \",t.v,t.w,a,t.name),r.setEdge(t.v,t.w,a,t.name),o.info(\"newGraph edges \",r.edges(),r.edge(r.edges()[0])));}catch(t){o.error(t);}}));}o.debug(\"Removing node\",a),n.removeNode(a);}));},zr=function t(e,n){for(var r=n.children(e),i=[].concat(r),a=0;a<r.length;a++)Rr[r[a]]=e,i=i.concat(t(r[a],n));return i},Yr=function t(e,n){o.trace(\"Searching\",e);var r=n.children(e);if(o.trace(\"Searching children of id \",e,r),r.length<1)return o.trace(\"This is a valid node\",e),e;for(var i=0;i<r.length;i++){var a=t(r[i],n);if(a)return o.trace(\"Found replacement for\",e,\" => \",a),a}},Ur=function(t){return Ir[t]&&Ir[t].externalConnections&&Ir[t]?Ir[t].id:t},$r=function(t,e){!t||e>10?o.debug(\"Opting out, no graph \"):(o.debug(\"Opting in, graph \"),t.nodes().forEach((function(e){t.children(e).length>0&&(o.warn(\"Cluster identified\",e,\" Replacement id in edges: \",Yr(e,t)),Fr[e]=zr(e,t),Ir[e]={id:Yr(e,t),clusterData:t.node(e)});})),t.nodes().forEach((function(e){var n=t.children(e),r=t.edges();n.length>0?(o.debug(\"Cluster identified\",e,Fr),r.forEach((function(t){t.v!==e&&t.w!==e&&Pr(t.v,e)^Pr(t.w,e)&&(o.warn(\"Edge: \",t,\" leaves cluster \",e),o.warn(\"Decendants of XXX \",e,\": \",Fr[e]),Ir[e].externalConnections=!0);}))):o.debug(\"Not a cluster \",e,Fr);})),t.edges().forEach((function(e){var n=t.edge(e);o.warn(\"Edge \"+e.v+\" -> \"+e.w+\": \"+JSON.stringify(e)),o.warn(\"Edge \"+e.v+\" -> \"+e.w+\": \"+JSON.stringify(t.edge(e)));var r=e.v,i=e.w;if(o.warn(\"Fix XXX\",Ir,\"ids:\",e.v,e.w,\"Translateing: \",Ir[e.v],\" --- \",Ir[e.w]),Ir[e.v]&&Ir[e.w]&&Ir[e.v]===Ir[e.w]){o.warn(\"Fixing and trixing link to self - removing XXX\",e.v,e.w,e.name),o.warn(\"Fixing and trixing - removing XXX\",e.v,e.w,e.name),r=Ur(e.v),i=Ur(e.w),t.removeEdge(e.v,e.w,e.name);var a=e.w+\"---\"+e.v;t.setNode(a,{domId:a,id:a,labelStyle:\"\",labelText:n.label,padding:0,shape:\"labelRect\",style:\"\"});var s=JSON.parse(JSON.stringify(n)),c=JSON.parse(JSON.stringify(n));s.label=\"\",s.arrowTypeEnd=\"none\",c.label=\"\",s.fromCluster=e.v,c.toCluster=e.v,t.setEdge(r,a,s,e.name+\"-cyclic-special\"),t.setEdge(a,i,c,e.name+\"-cyclic-special\");}else (Ir[e.v]||Ir[e.w])&&(o.warn(\"Fixing and trixing - removing XXX\",e.v,e.w,e.name),r=Ur(e.v),i=Ur(e.w),t.removeEdge(e.v,e.w,e.name),r!==e.v&&(n.fromCluster=e.v),i!==e.w&&(n.toCluster=e.w),o.warn(\"Fix Replacing with XXX\",r,i,e.name),t.setEdge(r,i,n,e.name));})),o.warn(\"Adjusted Graph\",yr().json.write(t)),Wr(t,0),o.trace(Ir));},Wr=function t(e,n){if(o.warn(\"extractor - \",n,yr().json.write(e),e.children(\"D\")),n>10)o.error(\"Bailing out\");else {for(var r=e.nodes(),i=!1,a=0;a<r.length;a++){var s=r[a],c=e.children(s);i=i||c.length>0;}if(i){o.debug(\"Nodes = \",r,n);for(var l=0;l<r.length;l++){var u=r[l];if(o.debug(\"Extracting node\",u,Ir,Ir[u]&&!Ir[u].externalConnections,!e.parent(u),e.node(u),e.children(\"D\"),\" Depth \",n),Ir[u])if(!Ir[u].externalConnections&&e.children(u)&&e.children(u).length>0){o.warn(\"Cluster without external connections, without a parent and with children\",u,n);var h=\"TB\"===e.graph().rankdir?\"LR\":\"TB\";Ir[u]&&Ir[u].clusterData&&Ir[u].clusterData.dir&&(h=Ir[u].clusterData.dir,o.warn(\"Fixing dir\",Ir[u].clusterData.dir,h));var f=new(yr().Graph)({multigraph:!0,compound:!0}).setGraph({rankdir:h,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel((function(){return {}}));o.warn(\"Old graph before copy\",yr().json.write(e)),jr(u,e,f,u),e.setNode(u,{clusterNode:!0,id:u,clusterData:Ir[u].clusterData,labelText:Ir[u].labelText,graph:f}),o.warn(\"New graph after copy node: (\",u,\")\",yr().json.write(f)),o.debug(\"Old graph after copy\",yr().json.write(e));}else o.warn(\"Cluster ** \",u,\" **not meeting the criteria !externalConnections:\",!Ir[u].externalConnections,\" no parent: \",!e.parent(u),\" children \",e.children(u)&&e.children(u).length>0,e.children(\"D\"),n),o.debug(Ir);else o.debug(\"Not a cluster\",u,n);}r=e.nodes(),o.warn(\"New list of nodes\",r);for(var d=0;d<r.length;d++){var p=r[d],g=e.node(p);o.warn(\" Now next level\",p,g),g.clusterNode&&t(g.graph,n+1);}}else o.debug(\"Done, no node has children\",e.nodes());}},qr=function t(e,n){if(0===n.length)return [];var r=Object.assign(n);return n.forEach((function(n){var i=e.children(n),a=t(e,i);r=r.concat(a);})),r},Hr=function(t){return qr(t,t.children())},Vr=n(3841);const Gr=function(t,e,n,r){var i=t.x,a=t.y,o=i-r.x,s=a-r.y,c=Math.sqrt(e*e*s*s+n*n*o*o),l=Math.abs(e*n*o/c);r.x<i&&(l=-l);var u=Math.abs(e*n*s/c);return r.y<a&&(u=-u),{x:i+l,y:a+u}};function Xr(t,e){return t*e>0}const Zr=function(t,e,n,r){var i,a,o,s,c,l,u,h,f,d,p,g,y;if(i=e.y-t.y,o=t.x-e.x,c=e.x*t.y-t.x*e.y,f=i*n.x+o*n.y+c,d=i*r.x+o*r.y+c,!(0!==f&&0!==d&&Xr(f,d)||(a=r.y-n.y,s=n.x-r.x,l=r.x*n.y-n.x*r.y,u=a*t.x+s*t.y+l,h=a*e.x+s*e.y+l,0!==u&&0!==h&&Xr(u,h)||0==(p=i*s-a*o))))return g=Math.abs(p/2),{x:(y=o*l-s*c)<0?(y-g)/p:(y+g)/p,y:(y=a*c-i*l)<0?(y-g)/p:(y+g)/p}},Qr=function(t,e){var n,r,i=t.x,a=t.y,o=e.x-i,s=e.y-a,c=t.width/2,l=t.height/2;return Math.abs(s)*c>Math.abs(o)*l?(s<0&&(l=-l),n=0===s?0:l*o/s,r=l):(o<0&&(c=-c),n=c,r=0===o?0:c*s/o),{x:i+n,y:a+r}},Kr=(n.n(Vr)(),function(t,e,n){return Gr(t,e,e,n)}),Jr=function(t,e,n){var r=t.x,i=t.y,a=[],o=Number.POSITIVE_INFINITY,s=Number.POSITIVE_INFINITY;\"function\"==typeof e.forEach?e.forEach((function(t){o=Math.min(o,t.x),s=Math.min(s,t.y);})):(o=Math.min(o,e.x),s=Math.min(s,e.y));for(var c=r-t.width/2-o,l=i-t.height/2-s,u=0;u<e.length;u++){var h=e[u],f=e[u<e.length-1?u+1:0],d=Zr(t,n,{x:c+h.x,y:l+h.y},{x:c+f.x,y:l+f.y});d&&a.push(d);}return a.length?(a.length>1&&a.sort((function(t,e){var r=t.x-n.x,i=t.y-n.y,a=Math.sqrt(r*r+i*i),o=e.x-n.x,s=e.y-n.y,c=Math.sqrt(o*o+s*s);return a<c?-1:a===c?0:1})),a[0]):t},ti=Qr;function ei(t){return ei=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&\"function\"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?\"symbol\":typeof t},ei(t)}function ni(t,e,n,r){var i=[],a=function(t){i.push(t),i.push(0);},s=function(t){i.push(0),i.push(t);};e.includes(\"t\")?(o.debug(\"add top border\"),a(n)):s(n),e.includes(\"r\")?(o.debug(\"add right border\"),a(r)):s(r),e.includes(\"b\")?(o.debug(\"add bottom border\"),a(n)):s(n),e.includes(\"l\")?(o.debug(\"add left border\"),a(r)):s(r),t.attr(\"stroke-dasharray\",i.join(\" \"));}var ri=function(t,e,n){var r=t.insert(\"g\").attr(\"class\",\"node default\").attr(\"id\",e.domId||e.id),i=70,a=10;\"LR\"===n&&(i=10,a=70);var o=r.append(\"rect\").attr(\"x\",-1*i/2).attr(\"y\",-1*a/2).attr(\"width\",i).attr(\"height\",a).attr(\"class\",\"fork-join\");return Br(e,o),e.height=e.height+e.padding/2,e.width=e.width+e.padding/2,e.intersect=function(t){return ti(e,t)},r},ii={question:function(t,e){var n=Dr(t,e,void 0,!0),r=n.shapeSvg,i=n.bbox,a=i.width+e.padding+(i.height+e.padding),s=[{x:a/2,y:0},{x:a,y:-a/2},{x:a/2,y:-a},{x:0,y:-a/2}];o.info(\"Question main (Circle)\");var c=Lr(r,a,a,s);return c.attr(\"style\",e.style),Br(e,c),e.intersect=function(t){return o.warn(\"Intersect called\"),Jr(e,s,t)},r},rect:function(t,e){var n=Dr(t,e,\"node \"+e.classes,!0),r=n.shapeSvg,i=n.bbox,a=n.halfPadding;o.trace(\"Classes = \",e.classes);var s=r.insert(\"rect\",\":first-child\"),c=i.width+e.padding,l=i.height+e.padding;if(s.attr(\"class\",\"basic label-container\").attr(\"style\",e.style).attr(\"rx\",e.rx).attr(\"ry\",e.ry).attr(\"x\",-i.width/2-a).attr(\"y\",-i.height/2-a).attr(\"width\",c).attr(\"height\",l),e.props){var u=new Set(Object.keys(e.props));e.props.borders&&(ni(s,e.props.borders,c,l),u.delete(\"borders\")),u.forEach((function(t){o.warn(\"Unknown node property \".concat(t));}));}return Br(e,s),e.intersect=function(t){return ti(e,t)},r},labelRect:function(t,e){var n=Dr(t,e,\"label\",!0),r=n.shapeSvg;o.trace(\"Classes = \",e.classes);var i=r.insert(\"rect\",\":first-child\");if(i.attr(\"width\",0).attr(\"height\",0),r.attr(\"class\",\"label edgeLabel\"),e.props){var a=new Set(Object.keys(e.props));e.props.borders&&(ni(i,e.props.borders,0,0),a.delete(\"borders\")),a.forEach((function(t){o.warn(\"Unknown node property \".concat(t));}));}return Br(e,i),e.intersect=function(t){return ti(e,t)},r},rectWithTitle:function(t,e){var n;n=e.classes?\"node \"+e.classes:\"node default\";var r,i=t.insert(\"g\").attr(\"class\",n).attr(\"id\",e.domId||e.id),a=i.insert(\"rect\",\":first-child\"),s=i.insert(\"line\"),c=i.insert(\"g\").attr(\"class\",\"label\"),u=e.labelText.flat?e.labelText.flat():e.labelText;r=\"object\"===ei(u)?u[0]:u,o.info(\"Label text abc79\",r,u,\"object\"===ei(u));var h=c.node().appendChild(Or(r,e.labelStyle,!0,!0)),f={width:0,height:0};if(ce(Xt().flowchart.htmlLabels)){var d=h.children[0],p=(0, l.select)(h);f=d.getBoundingClientRect(),p.attr(\"width\",f.width),p.attr(\"height\",f.height);}o.info(\"Text 2\",u);var g=u.slice(1,u.length),y=h.getBBox(),m=c.node().appendChild(Or(g.join?g.join(\"<br/>\"):g,e.labelStyle,!0,!0));if(ce(Xt().flowchart.htmlLabels)){var b=m.children[0],v=(0, l.select)(m);f=b.getBoundingClientRect(),v.attr(\"width\",f.width),v.attr(\"height\",f.height);}var _=e.padding/2;return (0, l.select)(m).attr(\"transform\",\"translate( \"+(f.width>y.width?0:(y.width-f.width)/2)+\", \"+(y.height+_+5)+\")\"),(0, l.select)(h).attr(\"transform\",\"translate( \"+(f.width<y.width?0:-(y.width-f.width)/2)+\", 0)\"),f=c.node().getBBox(),c.attr(\"transform\",\"translate(\"+-f.width/2+\", \"+(-f.height/2-_+3)+\")\"),a.attr(\"class\",\"outer title-state\").attr(\"x\",-f.width/2-_).attr(\"y\",-f.height/2-_).attr(\"width\",f.width+e.padding).attr(\"height\",f.height+e.padding),s.attr(\"class\",\"divider\").attr(\"x1\",-f.width/2-_).attr(\"x2\",f.width/2+_).attr(\"y1\",-f.height/2-_+y.height+_).attr(\"y2\",-f.height/2-_+y.height+_),Br(e,a),e.intersect=function(t){return ti(e,t)},i},choice:function(t,e){var n=t.insert(\"g\").attr(\"class\",\"node default\").attr(\"id\",e.domId||e.id);return n.insert(\"polygon\",\":first-child\").attr(\"points\",[{x:0,y:14},{x:14,y:0},{x:0,y:-14},{x:-14,y:0}].map((function(t){return t.x+\",\"+t.y})).join(\" \")).attr(\"class\",\"state-start\").attr(\"r\",7).attr(\"width\",28).attr(\"height\",28),e.width=28,e.height=28,e.intersect=function(t){return Kr(e,14,t)},n},circle:function(t,e){var n=Dr(t,e,void 0,!0),r=n.shapeSvg,i=n.bbox,a=n.halfPadding,s=r.insert(\"circle\",\":first-child\");return s.attr(\"style\",e.style).attr(\"rx\",e.rx).attr(\"ry\",e.ry).attr(\"r\",i.width/2+a).attr(\"width\",i.width+e.padding).attr(\"height\",i.height+e.padding),o.info(\"Circle main\"),Br(e,s),e.intersect=function(t){return o.info(\"Circle intersect\",e,i.width/2+a,t),Kr(e,i.width/2+a,t)},r},doublecircle:function(t,e){var n=Dr(t,e,void 0,!0),r=n.shapeSvg,i=n.bbox,a=n.halfPadding,s=r.insert(\"g\",\":first-child\"),c=s.insert(\"circle\"),l=s.insert(\"circle\");return c.attr(\"style\",e.style).attr(\"rx\",e.rx).attr(\"ry\",e.ry).attr(\"r\",i.width/2+a+5).attr(\"width\",i.width+e.padding+10).attr(\"height\",i.height+e.padding+10),l.attr(\"style\",e.style).attr(\"rx\",e.rx).attr(\"ry\",e.ry).attr(\"r\",i.width/2+a).attr(\"width\",i.width+e.padding).attr(\"height\",i.height+e.padding),o.info(\"DoubleCircle main\"),Br(e,c),e.intersect=function(t){return o.info(\"DoubleCircle intersect\",e,i.width/2+a+5,t),Kr(e,i.width/2+a+5,t)},r},stadium:function(t,e){var n=Dr(t,e,void 0,!0),r=n.shapeSvg,i=n.bbox,a=i.height+e.padding,o=i.width+a/4+e.padding,s=r.insert(\"rect\",\":first-child\").attr(\"style\",e.style).attr(\"rx\",a/2).attr(\"ry\",a/2).attr(\"x\",-o/2).attr(\"y\",-a/2).attr(\"width\",o).attr(\"height\",a);return Br(e,s),e.intersect=function(t){return ti(e,t)},r},hexagon:function(t,e){var n=Dr(t,e,void 0,!0),r=n.shapeSvg,i=n.bbox,a=i.height+e.padding,o=a/4,s=i.width+2*o+e.padding,c=[{x:o,y:0},{x:s-o,y:0},{x:s,y:-a/2},{x:s-o,y:-a},{x:o,y:-a},{x:0,y:-a/2}],l=Lr(r,s,a,c);return l.attr(\"style\",e.style),Br(e,l),e.intersect=function(t){return Jr(e,c,t)},r},rect_left_inv_arrow:function(t,e){var n=Dr(t,e,void 0,!0),r=n.shapeSvg,i=n.bbox,a=i.width+e.padding,o=i.height+e.padding,s=[{x:-o/2,y:0},{x:a,y:0},{x:a,y:-o},{x:-o/2,y:-o},{x:0,y:-o/2}];return Lr(r,a,o,s).attr(\"style\",e.style),e.width=a+o,e.height=o,e.intersect=function(t){return Jr(e,s,t)},r},lean_right:function(t,e){var n=Dr(t,e,void 0,!0),r=n.shapeSvg,i=n.bbox,a=i.width+e.padding,o=i.height+e.padding,s=[{x:-2*o/6,y:0},{x:a-o/6,y:0},{x:a+2*o/6,y:-o},{x:o/6,y:-o}],c=Lr(r,a,o,s);return c.attr(\"style\",e.style),Br(e,c),e.intersect=function(t){return Jr(e,s,t)},r},lean_left:function(t,e){var n=Dr(t,e,void 0,!0),r=n.shapeSvg,i=n.bbox,a=i.width+e.padding,o=i.height+e.padding,s=[{x:2*o/6,y:0},{x:a+o/6,y:0},{x:a-2*o/6,y:-o},{x:-o/6,y:-o}],c=Lr(r,a,o,s);return c.attr(\"style\",e.style),Br(e,c),e.intersect=function(t){return Jr(e,s,t)},r},trapezoid:function(t,e){var n=Dr(t,e,void 0,!0),r=n.shapeSvg,i=n.bbox,a=i.width+e.padding,o=i.height+e.padding,s=[{x:-2*o/6,y:0},{x:a+2*o/6,y:0},{x:a-o/6,y:-o},{x:o/6,y:-o}],c=Lr(r,a,o,s);return c.attr(\"style\",e.style),Br(e,c),e.intersect=function(t){return Jr(e,s,t)},r},inv_trapezoid:function(t,e){var n=Dr(t,e,void 0,!0),r=n.shapeSvg,i=n.bbox,a=i.width+e.padding,o=i.height+e.padding,s=[{x:o/6,y:0},{x:a-o/6,y:0},{x:a+2*o/6,y:-o},{x:-2*o/6,y:-o}],c=Lr(r,a,o,s);return c.attr(\"style\",e.style),Br(e,c),e.intersect=function(t){return Jr(e,s,t)},r},rect_right_inv_arrow:function(t,e){var n=Dr(t,e,void 0,!0),r=n.shapeSvg,i=n.bbox,a=i.width+e.padding,o=i.height+e.padding,s=[{x:0,y:0},{x:a+o/2,y:0},{x:a,y:-o/2},{x:a+o/2,y:-o},{x:0,y:-o}],c=Lr(r,a,o,s);return c.attr(\"style\",e.style),Br(e,c),e.intersect=function(t){return Jr(e,s,t)},r},cylinder:function(t,e){var n=Dr(t,e,void 0,!0),r=n.shapeSvg,i=n.bbox,a=i.width+e.padding,o=a/2,s=o/(2.5+a/50),c=i.height+s+e.padding,l=\"M 0,\"+s+\" a \"+o+\",\"+s+\" 0,0,0 \"+a+\" 0 a \"+o+\",\"+s+\" 0,0,0 \"+-a+\" 0 l 0,\"+c+\" a \"+o+\",\"+s+\" 0,0,0 \"+a+\" 0 l 0,\"+-c,u=r.attr(\"label-offset-y\",s).insert(\"path\",\":first-child\").attr(\"style\",e.style).attr(\"d\",l).attr(\"transform\",\"translate(\"+-a/2+\",\"+-(c/2+s)+\")\");return Br(e,u),e.intersect=function(t){var n=ti(e,t),r=n.x-e.x;if(0!=o&&(Math.abs(r)<e.width/2||Math.abs(r)==e.width/2&&Math.abs(n.y-e.y)>e.height/2-s)){var i=s*s*(1-r*r/(o*o));0!=i&&(i=Math.sqrt(i)),i=s-i,t.y-e.y>0&&(i=-i),n.y+=i;}return n},r},start:function(t,e){var n=t.insert(\"g\").attr(\"class\",\"node default\").attr(\"id\",e.domId||e.id),r=n.insert(\"circle\",\":first-child\");return r.attr(\"class\",\"state-start\").attr(\"r\",7).attr(\"width\",14).attr(\"height\",14),Br(e,r),e.intersect=function(t){return Kr(e,7,t)},n},end:function(t,e){var n=t.insert(\"g\").attr(\"class\",\"node default\").attr(\"id\",e.domId||e.id),r=n.insert(\"circle\",\":first-child\"),i=n.insert(\"circle\",\":first-child\");return i.attr(\"class\",\"state-start\").attr(\"r\",7).attr(\"width\",14).attr(\"height\",14),r.attr(\"class\",\"state-end\").attr(\"r\",5).attr(\"width\",10).attr(\"height\",10),Br(e,i),e.intersect=function(t){return Kr(e,7,t)},n},note:function(t,e){var n=Dr(t,e,\"node \"+e.classes,!0),r=n.shapeSvg,i=n.bbox,a=n.halfPadding;o.info(\"Classes = \",e.classes);var s=r.insert(\"rect\",\":first-child\");return s.attr(\"rx\",e.rx).attr(\"ry\",e.ry).attr(\"x\",-i.width/2-a).attr(\"y\",-i.height/2-a).attr(\"width\",i.width+e.padding).attr(\"height\",i.height+e.padding),Br(e,s),e.intersect=function(t){return ti(e,t)},r},subroutine:function(t,e){var n=Dr(t,e,void 0,!0),r=n.shapeSvg,i=n.bbox,a=i.width+e.padding,o=i.height+e.padding,s=[{x:0,y:0},{x:a,y:0},{x:a,y:-o},{x:0,y:-o},{x:0,y:0},{x:-8,y:0},{x:a+8,y:0},{x:a+8,y:-o},{x:-8,y:-o},{x:-8,y:0}],c=Lr(r,a,o,s);return c.attr(\"style\",e.style),Br(e,c),e.intersect=function(t){return Jr(e,s,t)},r},fork:ri,join:ri,class_box:function(t,e){var n,r=e.padding/2;n=e.classes?\"node \"+e.classes:\"node default\";var i=t.insert(\"g\").attr(\"class\",n).attr(\"id\",e.domId||e.id),a=i.insert(\"rect\",\":first-child\"),o=i.insert(\"line\"),s=i.insert(\"line\"),c=0,u=4,h=i.insert(\"g\").attr(\"class\",\"label\"),f=0,d=e.classData.annotations&&e.classData.annotations[0],p=e.classData.annotations[0]?\"«\"+e.classData.annotations[0]+\"»\":\"\",g=h.node().appendChild(Or(p,e.labelStyle,!0,!0)),y=g.getBBox();if(ce(Xt().flowchart.htmlLabels)){var m=g.children[0],b=(0, l.select)(g);y=m.getBoundingClientRect(),b.attr(\"width\",y.width),b.attr(\"height\",y.height);}e.classData.annotations[0]&&(u+=y.height+4,c+=y.width);var v=e.classData.id;void 0!==e.classData.type&&\"\"!==e.classData.type&&(Xt().flowchart.htmlLabels?v+=\"&lt;\"+e.classData.type+\"&gt;\":v+=\"<\"+e.classData.type+\">\");var _=h.node().appendChild(Or(v,e.labelStyle,!0,!0));(0, l.select)(_).attr(\"class\",\"classTitle\");var x=_.getBBox();if(ce(Xt().flowchart.htmlLabels)){var k=_.children[0],w=(0, l.select)(_);x=k.getBoundingClientRect(),w.attr(\"width\",x.width),w.attr(\"height\",x.height);}u+=x.height+4,x.width>c&&(c=x.width);var T=[];e.classData.members.forEach((function(t){var n=br(t),r=n.displayText;Xt().flowchart.htmlLabels&&(r=r.replace(/</g,\"&lt;\").replace(/>/g,\"&gt;\"));var i=h.node().appendChild(Or(r,n.cssStyle?n.cssStyle:e.labelStyle,!0,!0)),a=i.getBBox();if(ce(Xt().flowchart.htmlLabels)){var o=i.children[0],s=(0, l.select)(i);a=o.getBoundingClientRect(),s.attr(\"width\",a.width),s.attr(\"height\",a.height);}a.width>c&&(c=a.width),u+=a.height+4,T.push(i);})),u+=8;var E=[];if(e.classData.methods.forEach((function(t){var n=br(t),r=n.displayText;Xt().flowchart.htmlLabels&&(r=r.replace(/</g,\"&lt;\").replace(/>/g,\"&gt;\"));var i=h.node().appendChild(Or(r,n.cssStyle?n.cssStyle:e.labelStyle,!0,!0)),a=i.getBBox();if(ce(Xt().flowchart.htmlLabels)){var o=i.children[0],s=(0, l.select)(i);a=o.getBoundingClientRect(),s.attr(\"width\",a.width),s.attr(\"height\",a.height);}a.width>c&&(c=a.width),u+=a.height+4,E.push(i);})),u+=8,d){var C=(c-y.width)/2;(0, l.select)(g).attr(\"transform\",\"translate( \"+(-1*c/2+C)+\", \"+-1*u/2+\")\"),f=y.height+4;}var S=(c-x.width)/2;return (0, l.select)(_).attr(\"transform\",\"translate( \"+(-1*c/2+S)+\", \"+(-1*u/2+f)+\")\"),f+=x.height+4,o.attr(\"class\",\"divider\").attr(\"x1\",-c/2-r).attr(\"x2\",c/2+r).attr(\"y1\",-u/2-r+8+f).attr(\"y2\",-u/2-r+8+f),f+=8,T.forEach((function(t){(0, l.select)(t).attr(\"transform\",\"translate( \"+-c/2+\", \"+(-1*u/2+f+4)+\")\"),f+=x.height+4;})),f+=8,s.attr(\"class\",\"divider\").attr(\"x1\",-c/2-r).attr(\"x2\",c/2+r).attr(\"y1\",-u/2-r+8+f).attr(\"y2\",-u/2-r+8+f),f+=8,E.forEach((function(t){(0, l.select)(t).attr(\"transform\",\"translate( \"+-c/2+\", \"+(-1*u/2+f)+\")\"),f+=x.height+4;})),a.attr(\"class\",\"outer title-state\").attr(\"x\",-c/2-r).attr(\"y\",-u/2-r).attr(\"width\",c+e.padding).attr(\"height\",u+e.padding),Br(e,a),e.intersect=function(t){return ti(e,t)},i}},ai={},oi=function(t){var e=ai[t.id];o.trace(\"Transforming node\",t.diff,t,\"translate(\"+(t.x-t.width/2-5)+\", \"+t.width/2+\")\");var n=t.diff||0;return t.clusterNode?e.attr(\"transform\",\"translate(\"+(t.x+n-t.width/2)+\", \"+(t.y-t.height/2-8)+\")\"):e.attr(\"transform\",\"translate(\"+t.x+\", \"+t.y+\")\"),n},si={rect:function(t,e){o.trace(\"Creating subgraph rect for \",e.id,e);var n=t.insert(\"g\").attr(\"class\",\"cluster\"+(e.class?\" \"+e.class:\"\")).attr(\"id\",e.id),r=n.insert(\"rect\",\":first-child\"),i=n.insert(\"g\").attr(\"class\",\"cluster-label\"),a=i.node().appendChild(Or(e.labelText,e.labelStyle,void 0,!0)),s=a.getBBox();if(ce(Xt().flowchart.htmlLabels)){var c=a.children[0],u=(0, l.select)(a);s=c.getBoundingClientRect(),u.attr(\"width\",s.width),u.attr(\"height\",s.height);}var h=0*e.padding,f=h/2,d=e.width<=s.width+h?s.width+h:e.width;e.width<=s.width+h?e.diff=(s.width-e.width)/2-e.padding/2:e.diff=-e.padding/2,o.trace(\"Data \",e,JSON.stringify(e)),r.attr(\"style\",e.style).attr(\"rx\",e.rx).attr(\"ry\",e.ry).attr(\"x\",e.x-d/2).attr(\"y\",e.y-e.height/2-f).attr(\"width\",d).attr(\"height\",e.height+h),i.attr(\"transform\",\"translate(\"+(e.x-s.width/2)+\", \"+(e.y-e.height/2+e.padding/3)+\")\");var p=r.node().getBBox();return e.width=p.width,e.height=p.height,e.intersect=function(t){return Qr(e,t)},n},roundedWithTitle:function(t,e){var n=t.insert(\"g\").attr(\"class\",e.classes).attr(\"id\",e.id),r=n.insert(\"rect\",\":first-child\"),i=n.insert(\"g\").attr(\"class\",\"cluster-label\"),a=n.append(\"rect\"),o=i.node().appendChild(Or(e.labelText,e.labelStyle,void 0,!0)),s=o.getBBox();if(ce(Xt().flowchart.htmlLabels)){var c=o.children[0],u=(0, l.select)(o);s=c.getBoundingClientRect(),u.attr(\"width\",s.width),u.attr(\"height\",s.height);}s=o.getBBox();var h=0*e.padding,f=h/2,d=e.width<=s.width+e.padding?s.width+e.padding:e.width;e.width<=s.width+e.padding?e.diff=(s.width+0*e.padding-e.width)/2:e.diff=-e.padding/2,r.attr(\"class\",\"outer\").attr(\"x\",e.x-d/2-f).attr(\"y\",e.y-e.height/2-f).attr(\"width\",d+h).attr(\"height\",e.height+h),a.attr(\"class\",\"inner\").attr(\"x\",e.x-d/2-f).attr(\"y\",e.y-e.height/2-f+s.height-1).attr(\"width\",d+h).attr(\"height\",e.height+h-s.height-3),i.attr(\"transform\",\"translate(\"+(e.x-s.width/2)+\", \"+(e.y-e.height/2-e.padding/3+(ce(Xt().flowchart.htmlLabels)?5:3))+\")\");var p=r.node().getBBox();return e.height=p.height,e.intersect=function(t){return Qr(e,t)},n},noteGroup:function(t,e){var n=t.insert(\"g\").attr(\"class\",\"note-cluster\").attr(\"id\",e.id),r=n.insert(\"rect\",\":first-child\"),i=0*e.padding,a=i/2;r.attr(\"rx\",e.rx).attr(\"ry\",e.ry).attr(\"x\",e.x-e.width/2-a).attr(\"y\",e.y-e.height/2-a).attr(\"width\",e.width+i).attr(\"height\",e.height+i).attr(\"fill\",\"none\");var o=r.node().getBBox();return e.width=o.width,e.height=o.height,e.intersect=function(t){return Qr(e,t)},n},divider:function(t,e){var n=t.insert(\"g\").attr(\"class\",e.classes).attr(\"id\",e.id),r=n.insert(\"rect\",\":first-child\"),i=0*e.padding,a=i/2;r.attr(\"class\",\"divider\").attr(\"x\",e.x-e.width/2-a).attr(\"y\",e.y-e.height/2).attr(\"width\",e.width+i).attr(\"height\",e.height+i);var o=r.node().getBBox();return e.width=o.width,e.height=o.height,e.diff=-e.padding/2,e.intersect=function(t){return Qr(e,t)},n}},ci={},li={},ui={},hi=function(t,e){var n=Or(e.label,e.labelStyle),r=t.insert(\"g\").attr(\"class\",\"edgeLabel\"),i=r.insert(\"g\").attr(\"class\",\"label\");i.node().appendChild(n);var a,o=n.getBBox();if(ce(Xt().flowchart.htmlLabels)){var s=n.children[0],c=(0, l.select)(n);o=s.getBoundingClientRect(),c.attr(\"width\",o.width),c.attr(\"height\",o.height);}if(i.attr(\"transform\",\"translate(\"+-o.width/2+\", \"+-o.height/2+\")\"),li[e.id]=r,e.width=o.width,e.height=o.height,e.startLabelLeft){var u=Or(e.startLabelLeft,e.labelStyle),h=t.insert(\"g\").attr(\"class\",\"edgeTerminals\"),f=h.insert(\"g\").attr(\"class\",\"inner\");a=f.node().appendChild(u);var d=u.getBBox();f.attr(\"transform\",\"translate(\"+-d.width/2+\", \"+-d.height/2+\")\"),ui[e.id]||(ui[e.id]={}),ui[e.id].startLeft=h,fi(a,e.startLabelLeft);}if(e.startLabelRight){var p=Or(e.startLabelRight,e.labelStyle),g=t.insert(\"g\").attr(\"class\",\"edgeTerminals\"),y=g.insert(\"g\").attr(\"class\",\"inner\");a=g.node().appendChild(p),y.node().appendChild(p);var m=p.getBBox();y.attr(\"transform\",\"translate(\"+-m.width/2+\", \"+-m.height/2+\")\"),ui[e.id]||(ui[e.id]={}),ui[e.id].startRight=g,fi(a,e.startLabelRight);}if(e.endLabelLeft){var b=Or(e.endLabelLeft,e.labelStyle),v=t.insert(\"g\").attr(\"class\",\"edgeTerminals\"),_=v.insert(\"g\").attr(\"class\",\"inner\");a=_.node().appendChild(b);var x=b.getBBox();_.attr(\"transform\",\"translate(\"+-x.width/2+\", \"+-x.height/2+\")\"),v.node().appendChild(b),ui[e.id]||(ui[e.id]={}),ui[e.id].endLeft=v,fi(a,e.endLabelLeft);}if(e.endLabelRight){var k=Or(e.endLabelRight,e.labelStyle),w=t.insert(\"g\").attr(\"class\",\"edgeTerminals\"),T=w.insert(\"g\").attr(\"class\",\"inner\");a=T.node().appendChild(k);var E=k.getBBox();T.attr(\"transform\",\"translate(\"+-E.width/2+\", \"+-E.height/2+\")\"),w.node().appendChild(k),ui[e.id]||(ui[e.id]={}),ui[e.id].endRight=w,fi(a,e.endLabelRight);}};function fi(t,e){Xt().flowchart.htmlLabels&&t&&(t.style.width=9*e.length+\"px\",t.style.height=\"12px\");}var di=function(t,e){o.info(\"Moving label abc78 \",t.id,t.label,li[t.id]);var n=e.updatedPath?e.updatedPath:e.originalPath;if(t.label){var r=li[t.id],i=t.x,a=t.y;if(n){var s=An.calcLabelPosition(n);o.info(\"Moving label from (\",i,\",\",a,\") to (\",s.x,\",\",s.y,\") abc78\");}r.attr(\"transform\",\"translate(\"+i+\", \"+a+\")\");}if(t.startLabelLeft){var c=ui[t.id].startLeft,l=t.x,u=t.y;if(n){var h=An.calcTerminalLabelPosition(t.arrowTypeStart?10:0,\"start_left\",n);l=h.x,u=h.y;}c.attr(\"transform\",\"translate(\"+l+\", \"+u+\")\");}if(t.startLabelRight){var f=ui[t.id].startRight,d=t.x,p=t.y;if(n){var g=An.calcTerminalLabelPosition(t.arrowTypeStart?10:0,\"start_right\",n);d=g.x,p=g.y;}f.attr(\"transform\",\"translate(\"+d+\", \"+p+\")\");}if(t.endLabelLeft){var y=ui[t.id].endLeft,m=t.x,b=t.y;if(n){var v=An.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,\"end_left\",n);m=v.x,b=v.y;}y.attr(\"transform\",\"translate(\"+m+\", \"+b+\")\");}if(t.endLabelRight){var _=ui[t.id].endRight,x=t.x,k=t.y;if(n){var w=An.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,\"end_right\",n);x=w.x,k=w.y;}_.attr(\"transform\",\"translate(\"+x+\", \"+k+\")\");}},pi=function(t,e){o.warn(\"abc88 cutPathAtIntersect\",t,e);var n=[],r=t[0],i=!1;return t.forEach((function(t){if(o.info(\"abc88 checking point\",t,e),function(t,e){var n=t.x,r=t.y,i=Math.abs(e.x-n),a=Math.abs(e.y-r),o=t.width/2,s=t.height/2;return i>=o||a>=s}(e,t)||i)o.warn(\"abc88 outside\",t,r),r=t,i||n.push(t);else {var a=function(t,e,n){o.warn(\"intersection calc abc89:\\n  outsidePoint: \".concat(JSON.stringify(e),\"\\n  insidePoint : \").concat(JSON.stringify(n),\"\\n  node        : x:\").concat(t.x,\" y:\").concat(t.y,\" w:\").concat(t.width,\" h:\").concat(t.height));var r=t.x,i=t.y,a=Math.abs(r-n.x),s=t.width/2,c=n.x<e.x?s-a:s+a,l=t.height/2,u=Math.abs(e.y-n.y),h=Math.abs(e.x-n.x);if(Math.abs(i-e.y)*s>Math.abs(r-e.x)*l){var f=n.y<e.y?e.y-l-i:i-l-e.y;c=h*f/u;var d={x:n.x<e.x?n.x+c:n.x-h+c,y:n.y<e.y?n.y+u-f:n.y-u+f};return 0===c&&(d.x=e.x,d.y=e.y),0===h&&(d.x=e.x),0===u&&(d.y=e.y),o.warn(\"abc89 topp/bott calc, Q \".concat(u,\", q \").concat(f,\", R \").concat(h,\", r \").concat(c),d),d}var p=u*(c=n.x<e.x?e.x-s-r:r-s-e.x)/h,g=n.x<e.x?n.x+h-c:n.x-h+c,y=n.y<e.y?n.y+p:n.y-p;return o.warn(\"sides calc abc89, Q \".concat(u,\", q \").concat(p,\", R \").concat(h,\", r \").concat(c),{_x:g,_y:y}),0===c&&(g=e.x,y=e.y),0===h&&(g=e.x),0===u&&(y=e.y),{x:g,y}}(e,r,t);o.warn(\"abc88 inside\",t,r,a),o.warn(\"abc88 intersection\",a);var s=!1;n.forEach((function(t){s=s||t.x===a.x&&t.y===a.y;})),n.find((function(t){return t.x===a.x&&t.y===a.y}))?o.warn(\"abc88 no intersect\",a,n):n.push(a),i=!0;}})),o.warn(\"abc88 returning points\",n),n},gi=function t(e,n,r,i){o.info(\"Graph in recursive render: XXX\",yr().json.write(n),i);var a=n.graph().rankdir;o.trace(\"Dir in recursive render - dir:\",a);var s=e.insert(\"g\").attr(\"class\",\"root\");n.nodes()?o.info(\"Recursive render XXX\",n.nodes()):o.info(\"No nodes found for\",n),n.edges().length>0&&o.trace(\"Recursive edges\",n.edge(n.edges()[0]));var c=s.insert(\"g\").attr(\"class\",\"clusters\"),u=s.insert(\"g\").attr(\"class\",\"edgePaths\"),h=s.insert(\"g\").attr(\"class\",\"edgeLabels\"),f=s.insert(\"g\").attr(\"class\",\"nodes\");n.nodes().forEach((function(e){var s=n.node(e);if(void 0!==i){var c=JSON.parse(JSON.stringify(i.clusterData));o.info(\"Setting data for cluster XXX (\",e,\") \",c,i),n.setNode(i.id,c),n.parent(e)||(o.trace(\"Setting parent\",e,i.id),n.setParent(e,i.id,c));}if(o.info(\"(Insert) Node XXX\"+e+\": \"+JSON.stringify(n.node(e))),s&&s.clusterNode){o.info(\"Cluster identified\",e,s.width,n.node(e));var l=t(f,s.graph,r,n.node(e)),u=l.elem;Br(s,u),s.diff=l.diff||0,o.info(\"Node bounds (abc123)\",e,s,s.width,s.x,s.y),function(t,e){ai[e.id]=t;}(u,s),o.warn(\"Recursive render complete \",u,s);}else n.children(e).length>0?(o.info(\"Cluster - the non recursive path XXX\",e,s.id,s,n),o.info(Yr(s.id,n)),Ir[s.id]={id:Yr(s.id,n),node:s}):(o.info(\"Node - the non recursive path\",e,s.id,s),function(t,e,n){var r,i,a;e.link?(\"sandbox\"===Xt().securityLevel?a=\"_top\":e.linkTarget&&(a=e.linkTarget||\"_blank\"),r=t.insert(\"svg:a\").attr(\"xlink:href\",e.link).attr(\"target\",a),i=ii[e.shape](r,e,n)):r=i=ii[e.shape](t,e,n),e.tooltip&&i.attr(\"title\",e.tooltip),e.class&&i.attr(\"class\",\"node default \"+e.class),ai[e.id]=r,e.haveCallback&&ai[e.id].attr(\"class\",ai[e.id].attr(\"class\")+\" clickable\");}(f,n.node(e),a));})),n.edges().forEach((function(t){var e=n.edge(t.v,t.w,t.name);o.info(\"Edge \"+t.v+\" -> \"+t.w+\": \"+JSON.stringify(t)),o.info(\"Edge \"+t.v+\" -> \"+t.w+\": \",t,\" \",JSON.stringify(n.edge(t))),o.info(\"Fix\",Ir,\"ids:\",t.v,t.w,\"Translateing: \",Ir[t.v],Ir[t.w]),hi(h,e);})),n.edges().forEach((function(t){o.info(\"Edge \"+t.v+\" -> \"+t.w+\": \"+JSON.stringify(t));})),o.info(\"#############################################\"),o.info(\"###                Layout                 ###\"),o.info(\"#############################################\"),o.info(n),pr().layout(n),o.info(\"Graph after layout:\",yr().json.write(n));var d=0;return Hr(n).forEach((function(t){var e=n.node(t);o.info(\"Position \"+t+\": \"+JSON.stringify(n.node(t))),o.info(\"Position \"+t+\": (\"+e.x,\",\"+e.y,\") width: \",e.width,\" height: \",e.height),e&&e.clusterNode?oi(e):n.children(t).length>0?(function(t,e){o.trace(\"Inserting cluster\");var n=e.shape||\"rect\";ci[e.id]=si[n](t,e);}(c,e),Ir[e.id].node=e):oi(e);})),n.edges().forEach((function(t){var e=n.edge(t);o.info(\"Edge \"+t.v+\" -> \"+t.w+\": \"+JSON.stringify(e),e);var i=function(t,e,n,r,i,a){var s=n.points,c=!1,u=a.node(e.v),h=a.node(e.w);o.info(\"abc88 InsertEdge: \",n),h.intersect&&u.intersect&&((s=s.slice(1,n.points.length-1)).unshift(u.intersect(s[0])),o.info(\"Last point\",s[s.length-1],h,h.intersect(s[s.length-1])),s.push(h.intersect(s[s.length-1]))),n.toCluster&&(o.info(\"to cluster abc88\",r[n.toCluster]),s=pi(n.points,r[n.toCluster].node),c=!0),n.fromCluster&&(o.info(\"from cluster abc88\",r[n.fromCluster]),s=pi(s.reverse(),r[n.fromCluster].node).reverse(),c=!0);var f,d=s.filter((function(t){return !Number.isNaN(t.y)}));f=(\"graph\"===i||\"flowchart\"===i)&&n.curve||l.curveBasis;var p,g=(0, l.line)().x((function(t){return t.x})).y((function(t){return t.y})).curve(f);switch(n.thickness){case\"normal\":p=\"edge-thickness-normal\";break;case\"thick\":p=\"edge-thickness-thick\";break;default:p=\"\";}switch(n.pattern){case\"solid\":p+=\" edge-pattern-solid\";break;case\"dotted\":p+=\" edge-pattern-dotted\";break;case\"dashed\":p+=\" edge-pattern-dashed\";}var y=t.append(\"path\").attr(\"d\",g(d)).attr(\"id\",n.id).attr(\"class\",\" \"+p+(n.classes?\" \"+n.classes:\"\")).attr(\"style\",n.style),m=\"\";switch(Xt().state.arrowMarkerAbsolute&&(m=(m=(m=window.location.protocol+\"//\"+window.location.host+window.location.pathname+window.location.search).replace(/\\(/g,\"\\\\(\")).replace(/\\)/g,\"\\\\)\")),o.info(\"arrowTypeStart\",n.arrowTypeStart),o.info(\"arrowTypeEnd\",n.arrowTypeEnd),n.arrowTypeStart){case\"arrow_cross\":y.attr(\"marker-start\",\"url(\"+m+\"#\"+i+\"-crossStart)\");break;case\"arrow_point\":y.attr(\"marker-start\",\"url(\"+m+\"#\"+i+\"-pointStart)\");break;case\"arrow_barb\":y.attr(\"marker-start\",\"url(\"+m+\"#\"+i+\"-barbStart)\");break;case\"arrow_circle\":y.attr(\"marker-start\",\"url(\"+m+\"#\"+i+\"-circleStart)\");break;case\"aggregation\":y.attr(\"marker-start\",\"url(\"+m+\"#\"+i+\"-aggregationStart)\");break;case\"extension\":y.attr(\"marker-start\",\"url(\"+m+\"#\"+i+\"-extensionStart)\");break;case\"composition\":y.attr(\"marker-start\",\"url(\"+m+\"#\"+i+\"-compositionStart)\");break;case\"dependency\":y.attr(\"marker-start\",\"url(\"+m+\"#\"+i+\"-dependencyStart)\");break;case\"lollipop\":y.attr(\"marker-start\",\"url(\"+m+\"#\"+i+\"-lollipopStart)\");}switch(n.arrowTypeEnd){case\"arrow_cross\":y.attr(\"marker-end\",\"url(\"+m+\"#\"+i+\"-crossEnd)\");break;case\"arrow_point\":y.attr(\"marker-end\",\"url(\"+m+\"#\"+i+\"-pointEnd)\");break;case\"arrow_barb\":y.attr(\"marker-end\",\"url(\"+m+\"#\"+i+\"-barbEnd)\");break;case\"arrow_circle\":y.attr(\"marker-end\",\"url(\"+m+\"#\"+i+\"-circleEnd)\");break;case\"aggregation\":y.attr(\"marker-end\",\"url(\"+m+\"#\"+i+\"-aggregationEnd)\");break;case\"extension\":y.attr(\"marker-end\",\"url(\"+m+\"#\"+i+\"-extensionEnd)\");break;case\"composition\":y.attr(\"marker-end\",\"url(\"+m+\"#\"+i+\"-compositionEnd)\");break;case\"dependency\":y.attr(\"marker-end\",\"url(\"+m+\"#\"+i+\"-dependencyEnd)\");break;case\"lollipop\":y.attr(\"marker-end\",\"url(\"+m+\"#\"+i+\"-lollipopEnd)\");}var b={};return c&&(b.updatedPath=s),b.originalPath=n.points,b}(u,t,e,Ir,r,n);di(e,i);})),n.nodes().forEach((function(t){var e=n.node(t);o.info(t,e.type,e.diff),\"group\"===e.type&&(d=e.diff);})),{elem:s,diff:d}},yi=function(t,e,n,r,i){Mr(t,n,r,i),ai={},li={},ui={},ci={},Fr={},Rr={},Ir={},o.warn(\"Graph at first:\",yr().json.write(e)),$r(e),o.warn(\"Graph after:\",yr().json.write(e)),gi(t,e,r);},mi={dividerMargin:10,padding:5,textHeight:10};function bi(t){var e;switch(t){case 0:e=\"aggregation\";break;case 1:e=\"extension\";break;case 2:e=\"composition\";break;case 3:e=\"dependency\";break;case 4:e=\"lollipop\";break;default:e=\"none\";}return e}const vi={setConf:function(t){Object.keys(t).forEach((function(e){mi[e]=t[e];}));},draw:function(t,e,n,r){o.info(\"Drawing class - \",e);var i=Xt().flowchart,a=Xt().securityLevel;o.info(\"config:\",i);var s,c=i.nodeSpacing||50,u=i.rankSpacing||50,h=new(yr().Graph)({multigraph:!0,compound:!0}).setGraph({rankdir:r.db.getDirection(),nodesep:c,ranksep:u,marginx:8,marginy:8}).setDefaultEdgeLabel((function(){return {}})),f=r.db.getClasses(),d=r.db.getRelations();o.info(d),function(t,e,n,r){var i=Object.keys(t);o.info(\"keys:\",i),o.info(t),i.forEach((function(n){var i=t[n],a=\"\";i.cssClasses.length>0&&(a=a+\" \"+i.cssClasses.join(\" \"));var s,c,l={labelStyle:\"\"},u=void 0!==i.text?i.text:i.id;i.type,c=\"class_box\",e.setNode(i.id,{labelStyle:l.labelStyle,shape:c,labelText:(s=u,ue.sanitizeText(s,Xt())),classData:i,rx:0,ry:0,class:a,style:l.style,id:i.id,domId:i.domId,tooltip:r.db.getTooltip(i.id)||\"\",haveCallback:i.haveCallback,link:i.link,width:\"group\"===i.type?500:void 0,type:i.type,padding:Xt().flowchart.padding}),o.info(\"setNode\",{labelStyle:l.labelStyle,shape:c,labelText:u,rx:0,ry:0,class:a,style:l.style,id:i.id,width:\"group\"===i.type?500:void 0,type:i.type,padding:Xt().flowchart.padding});}));}(f,h,0,r),function(t,e){var n=Xt().flowchart,r=0;t.forEach((function(i){r++;var a={classes:\"relation\"};a.pattern=1==i.relation.lineType?\"dashed\":\"solid\",a.id=\"id\"+r,\"arrow_open\"===i.type?a.arrowhead=\"none\":a.arrowhead=\"normal\",o.info(a,i),a.startLabelRight=\"none\"===i.relationTitle1?\"\":i.relationTitle1,a.endLabelLeft=\"none\"===i.relationTitle2?\"\":i.relationTitle2,a.arrowTypeStart=bi(i.relation.type1),a.arrowTypeEnd=bi(i.relation.type2);var s=\"\",c=\"\";if(void 0!==i.style){var u=dn(i.style);s=u.style,c=u.labelStyle;}else s=\"fill:none\";a.style=s,a.labelStyle=c,void 0!==i.interpolate?a.curve=hn(i.interpolate,l.curveLinear):void 0!==t.defaultInterpolate?a.curve=hn(t.defaultInterpolate,l.curveLinear):a.curve=hn(n.curve,l.curveLinear),i.text=i.title,void 0===i.text?void 0!==i.style&&(a.arrowheadStyle=\"fill: #333\"):(a.arrowheadStyle=\"fill: #333\",a.labelpos=\"c\",Xt().flowchart.htmlLabels?(a.labelType=\"html\",a.label='<span class=\"edgeLabel\">'+i.text+\"</span>\"):(a.labelType=\"text\",a.label=i.text.replace(ue.lineBreakRegex,\"\\n\"),void 0===i.style&&(a.style=a.style||\"stroke: #333; stroke-width: 1.5px;fill:none\"),a.labelStyle=a.labelStyle.replace(\"color:\",\"fill:\"))),e.setEdge(i.id1,i.id2,a,r);}));}(d,h),\"sandbox\"===a&&(s=(0, l.select)(\"#i\"+e));var p=\"sandbox\"===a?(0, l.select)(s.nodes()[0].contentDocument.body):(0, l.select)(\"body\"),g=p.select('[id=\"'.concat(e,'\"]')),y=p.select(\"#\"+e+\" g\");if(yi(y,h,[\"aggregation\",\"extension\",\"composition\",\"dependency\",\"lollipop\"],\"classDiagram\",e),En(h,g,i.diagramPadding,i.useMaxWidth),!i.htmlLabels)for(var m=\"sandbox\"===a?s.nodes()[0].contentDocument:document,b=m.querySelectorAll('[id=\"'+e+'\"] .edgeLabel .label'),v=0;v<b.length;v++){var _=b[v],x=_.getBBox(),k=m.createElementNS(\"http://www.w3.org/2000/svg\",\"rect\");k.setAttribute(\"rx\",0),k.setAttribute(\"ry\",0),k.setAttribute(\"width\",x.width),k.setAttribute(\"height\",x.height),_.insertBefore(k,_.firstChild);}Mn(r.db,g,e);}};var _i=n(1362),xi=n.n(_i),ki={},wi=[],Ti=function(t){return void 0===ki[t]&&(ki[t]={attributes:[]},o.info(\"Added new entity :\",t)),ki[t]};const Ei={Cardinality:{ZERO_OR_ONE:\"ZERO_OR_ONE\",ZERO_OR_MORE:\"ZERO_OR_MORE\",ONE_OR_MORE:\"ONE_OR_MORE\",ONLY_ONE:\"ONLY_ONE\"},Identification:{NON_IDENTIFYING:\"NON_IDENTIFYING\",IDENTIFYING:\"IDENTIFYING\"},parseDirective:function(t,e,n){cu.parseDirective(this,t,e,n);},getConfig:function(){return Xt().er},addEntity:Ti,addAttributes:function(t,e){var n,r=Ti(t);for(n=e.length-1;n>=0;n--)r.attributes.push(e[n]),o.debug(\"Added attribute \",e[n].attributeName);},getEntities:function(){return ki},addRelationship:function(t,e,n,r){var i={entityA:t,roleA:e,entityB:n,relSpec:r};wi.push(i),o.debug(\"Added new relationship :\",i);},getRelationships:function(){return wi},clear:function(){ki={},wi=[],ge();},setAccTitle:ye,getAccTitle:me,setAccDescription:be,getAccDescription:ve};var Ci={ONLY_ONE_START:\"ONLY_ONE_START\",ONLY_ONE_END:\"ONLY_ONE_END\",ZERO_OR_ONE_START:\"ZERO_OR_ONE_START\",ZERO_OR_ONE_END:\"ZERO_OR_ONE_END\",ONE_OR_MORE_START:\"ONE_OR_MORE_START\",ONE_OR_MORE_END:\"ONE_OR_MORE_END\",ZERO_OR_MORE_START:\"ZERO_OR_MORE_START\",ZERO_OR_MORE_END:\"ZERO_OR_MORE_END\"};const Si=Ci;var Ai={},Mi=function(t){return (t.entityA+t.roleA+t.entityB).replace(/\\s/g,\"\")},Ni=0;const Oi={setConf:function(t){for(var e=Object.keys(t),n=0;n<e.length;n++)Ai[e[n]]=t[e[n]];},draw:function(t,e,n,r){Ai=Xt().er,o.info(\"Drawing ER diagram\");var i,a=Xt().securityLevel;\"sandbox\"===a&&(i=(0, l.select)(\"#i\"+e));var s,c=(\"sandbox\"===a?(0, l.select)(i.nodes()[0].contentDocument.body):(0, l.select)(\"body\")).select(\"[id='\".concat(e,\"']\"));(function(t,e){var n;t.append(\"defs\").append(\"marker\").attr(\"id\",Ci.ONLY_ONE_START).attr(\"refX\",0).attr(\"refY\",9).attr(\"markerWidth\",18).attr(\"markerHeight\",18).attr(\"orient\",\"auto\").append(\"path\").attr(\"stroke\",e.stroke).attr(\"fill\",\"none\").attr(\"d\",\"M9,0 L9,18 M15,0 L15,18\"),t.append(\"defs\").append(\"marker\").attr(\"id\",Ci.ONLY_ONE_END).attr(\"refX\",18).attr(\"refY\",9).attr(\"markerWidth\",18).attr(\"markerHeight\",18).attr(\"orient\",\"auto\").append(\"path\").attr(\"stroke\",e.stroke).attr(\"fill\",\"none\").attr(\"d\",\"M3,0 L3,18 M9,0 L9,18\"),(n=t.append(\"defs\").append(\"marker\").attr(\"id\",Ci.ZERO_OR_ONE_START).attr(\"refX\",0).attr(\"refY\",9).attr(\"markerWidth\",30).attr(\"markerHeight\",18).attr(\"orient\",\"auto\")).append(\"circle\").attr(\"stroke\",e.stroke).attr(\"fill\",\"white\").attr(\"cx\",21).attr(\"cy\",9).attr(\"r\",6),n.append(\"path\").attr(\"stroke\",e.stroke).attr(\"fill\",\"none\").attr(\"d\",\"M9,0 L9,18\"),(n=t.append(\"defs\").append(\"marker\").attr(\"id\",Ci.ZERO_OR_ONE_END).attr(\"refX\",30).attr(\"refY\",9).attr(\"markerWidth\",30).attr(\"markerHeight\",18).attr(\"orient\",\"auto\")).append(\"circle\").attr(\"stroke\",e.stroke).attr(\"fill\",\"white\").attr(\"cx\",9).attr(\"cy\",9).attr(\"r\",6),n.append(\"path\").attr(\"stroke\",e.stroke).attr(\"fill\",\"none\").attr(\"d\",\"M21,0 L21,18\"),t.append(\"defs\").append(\"marker\").attr(\"id\",Ci.ONE_OR_MORE_START).attr(\"refX\",18).attr(\"refY\",18).attr(\"markerWidth\",45).attr(\"markerHeight\",36).attr(\"orient\",\"auto\").append(\"path\").attr(\"stroke\",e.stroke).attr(\"fill\",\"none\").attr(\"d\",\"M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27\"),t.append(\"defs\").append(\"marker\").attr(\"id\",Ci.ONE_OR_MORE_END).attr(\"refX\",27).attr(\"refY\",18).attr(\"markerWidth\",45).attr(\"markerHeight\",36).attr(\"orient\",\"auto\").append(\"path\").attr(\"stroke\",e.stroke).attr(\"fill\",\"none\").attr(\"d\",\"M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18\"),(n=t.append(\"defs\").append(\"marker\").attr(\"id\",Ci.ZERO_OR_MORE_START).attr(\"refX\",18).attr(\"refY\",18).attr(\"markerWidth\",57).attr(\"markerHeight\",36).attr(\"orient\",\"auto\")).append(\"circle\").attr(\"stroke\",e.stroke).attr(\"fill\",\"white\").attr(\"cx\",48).attr(\"cy\",18).attr(\"r\",6),n.append(\"path\").attr(\"stroke\",e.stroke).attr(\"fill\",\"none\").attr(\"d\",\"M0,18 Q18,0 36,18 Q18,36 0,18\"),(n=t.append(\"defs\").append(\"marker\").attr(\"id\",Ci.ZERO_OR_MORE_END).attr(\"refX\",39).attr(\"refY\",18).attr(\"markerWidth\",57).attr(\"markerHeight\",36).attr(\"orient\",\"auto\")).append(\"circle\").attr(\"stroke\",e.stroke).attr(\"fill\",\"white\").attr(\"cx\",9).attr(\"cy\",18).attr(\"r\",6),n.append(\"path\").attr(\"stroke\",e.stroke).attr(\"fill\",\"none\").attr(\"d\",\"M21,18 Q39,0 57,18 Q39,36 21,18\");})(c,Ai),s=new(yr().Graph)({multigraph:!0,directed:!0,compound:!1}).setGraph({rankdir:Ai.layoutDirection,marginx:20,marginy:20,nodesep:100,edgesep:100,ranksep:100}).setDefaultEdgeLabel((function(){return {}}));var u,h,f=function(t,e,n){var r;return Object.keys(e).forEach((function(i){var a=t.append(\"g\").attr(\"id\",i);r=void 0===r?i:r;var o=\"entity-\"+i,s=a.append(\"text\").attr(\"class\",\"er entityLabel\").attr(\"id\",o).attr(\"x\",0).attr(\"y\",0).attr(\"dominant-baseline\",\"middle\").attr(\"text-anchor\",\"middle\").attr(\"style\",\"font-family: \"+Xt().fontFamily+\"; font-size: \"+Ai.fontSize+\"px\").text(i),c=function(t,e,n){var r=Ai.entityPadding/3,i=Ai.entityPadding/3,a=.85*Ai.fontSize,o=e.node().getBBox(),s=[],c=!1,l=!1,u=0,h=0,f=0,d=0,p=o.height+2*r,g=1;n.forEach((function(t){void 0!==t.attributeKeyType&&(c=!0),void 0!==t.attributeComment&&(l=!0);})),n.forEach((function(n){var i=\"\".concat(e.node().id,\"-attr-\").concat(g),o=0,y=le(n.attributeType),m=t.append(\"text\").attr(\"class\",\"er entityLabel\").attr(\"id\",\"\".concat(i,\"-type\")).attr(\"x\",0).attr(\"y\",0).attr(\"dominant-baseline\",\"middle\").attr(\"text-anchor\",\"left\").attr(\"style\",\"font-family: \"+Xt().fontFamily+\"; font-size: \"+a+\"px\").text(y),b=t.append(\"text\").attr(\"class\",\"er entityLabel\").attr(\"id\",\"\".concat(i,\"-name\")).attr(\"x\",0).attr(\"y\",0).attr(\"dominant-baseline\",\"middle\").attr(\"text-anchor\",\"left\").attr(\"style\",\"font-family: \"+Xt().fontFamily+\"; font-size: \"+a+\"px\").text(n.attributeName),v={};v.tn=m,v.nn=b;var _=m.node().getBBox(),x=b.node().getBBox();if(u=Math.max(u,_.width),h=Math.max(h,x.width),o=Math.max(_.height,x.height),c){var k=t.append(\"text\").attr(\"class\",\"er entityLabel\").attr(\"id\",\"\".concat(i,\"-key\")).attr(\"x\",0).attr(\"y\",0).attr(\"dominant-baseline\",\"middle\").attr(\"text-anchor\",\"left\").attr(\"style\",\"font-family: \"+Xt().fontFamily+\"; font-size: \"+a+\"px\").text(n.attributeKeyType||\"\");v.kn=k;var w=k.node().getBBox();f=Math.max(f,w.width),o=Math.max(o,w.height);}if(l){var T=t.append(\"text\").attr(\"class\",\"er entityLabel\").attr(\"id\",\"\".concat(i,\"-comment\")).attr(\"x\",0).attr(\"y\",0).attr(\"dominant-baseline\",\"middle\").attr(\"text-anchor\",\"left\").attr(\"style\",\"font-family: \"+Xt().fontFamily+\"; font-size: \"+a+\"px\").text(n.attributeComment||\"\");v.cn=T;var E=T.node().getBBox();d=Math.max(d,E.width),o=Math.max(o,E.height);}v.height=o,s.push(v),p+=o+2*r,g+=1;}));var y=4;c&&(y+=2),l&&(y+=2);var m=u+h+f+d,b={width:Math.max(Ai.minEntityWidth,Math.max(o.width+2*Ai.entityPadding,m+i*y)),height:n.length>0?p:Math.max(Ai.minEntityHeight,o.height+2*Ai.entityPadding)};if(n.length>0){var v=Math.max(0,(b.width-m-i*y)/(y/2));e.attr(\"transform\",\"translate(\"+b.width/2+\",\"+(r+o.height/2)+\")\");var _=o.height+2*r,x=\"attributeBoxOdd\";s.forEach((function(e){var n=_+r+e.height/2;e.tn.attr(\"transform\",\"translate(\"+i+\",\"+n+\")\");var a=t.insert(\"rect\",\"#\"+e.tn.node().id).attr(\"class\",\"er \".concat(x)).attr(\"fill\",Ai.fill).attr(\"fill-opacity\",\"100%\").attr(\"stroke\",Ai.stroke).attr(\"x\",0).attr(\"y\",_).attr(\"width\",u+2*i+v).attr(\"height\",e.height+2*r),o=parseFloat(a.attr(\"x\"))+parseFloat(a.attr(\"width\"));e.nn.attr(\"transform\",\"translate(\"+(o+i)+\",\"+n+\")\");var s=t.insert(\"rect\",\"#\"+e.nn.node().id).attr(\"class\",\"er \".concat(x)).attr(\"fill\",Ai.fill).attr(\"fill-opacity\",\"100%\").attr(\"stroke\",Ai.stroke).attr(\"x\",o).attr(\"y\",_).attr(\"width\",h+2*i+v).attr(\"height\",e.height+2*r),p=parseFloat(s.attr(\"x\"))+parseFloat(s.attr(\"width\"));if(c){e.kn.attr(\"transform\",\"translate(\"+(p+i)+\",\"+n+\")\");var g=t.insert(\"rect\",\"#\"+e.kn.node().id).attr(\"class\",\"er \".concat(x)).attr(\"fill\",Ai.fill).attr(\"fill-opacity\",\"100%\").attr(\"stroke\",Ai.stroke).attr(\"x\",p).attr(\"y\",_).attr(\"width\",f+2*i+v).attr(\"height\",e.height+2*r);p=parseFloat(g.attr(\"x\"))+parseFloat(g.attr(\"width\"));}l&&(e.cn.attr(\"transform\",\"translate(\"+(p+i)+\",\"+n+\")\"),t.insert(\"rect\",\"#\"+e.cn.node().id).attr(\"class\",\"er \".concat(x)).attr(\"fill\",Ai.fill).attr(\"fill-opacity\",\"100%\").attr(\"stroke\",Ai.stroke).attr(\"x\",p).attr(\"y\",_).attr(\"width\",d+2*i+v).attr(\"height\",e.height+2*r)),_+=e.height+2*r,x=\"attributeBoxOdd\"==x?\"attributeBoxEven\":\"attributeBoxOdd\";}));}else b.height=Math.max(Ai.minEntityHeight,p),e.attr(\"transform\",\"translate(\"+b.width/2+\",\"+b.height/2+\")\");return b}(a,s,e[i].attributes),l=c.width,u=c.height,h=a.insert(\"rect\",\"#\"+o).attr(\"class\",\"er entityBox\").attr(\"fill\",Ai.fill).attr(\"fill-opacity\",\"100%\").attr(\"stroke\",Ai.stroke).attr(\"x\",0).attr(\"y\",0).attr(\"width\",l).attr(\"height\",u).node().getBBox();n.setNode(i,{width:h.width,height:h.height,shape:\"rect\",id:i});})),r}(c,r.db.getEntities(),s),d=function(t,e){return t.forEach((function(t){e.setEdge(t.entityA,t.entityB,{relationship:t},Mi(t));})),t}(r.db.getRelationships(),s);pr().layout(s),u=c,(h=s).nodes().forEach((function(t){void 0!==t&&void 0!==h.node(t)&&u.select(\"#\"+t).attr(\"transform\",\"translate(\"+(h.node(t).x-h.node(t).width/2)+\",\"+(h.node(t).y-h.node(t).height/2)+\" )\");})),d.forEach((function(t){!function(t,e,n,r,i){Ni++;var a=n.edge(e.entityA,e.entityB,Mi(e)),o=(0, l.line)().x((function(t){return t.x})).y((function(t){return t.y})).curve(l.curveBasis),s=t.insert(\"path\",\"#\"+r).attr(\"class\",\"er relationshipLine\").attr(\"d\",o(a.points)).attr(\"stroke\",Ai.stroke).attr(\"fill\",\"none\");e.relSpec.relType===i.db.Identification.NON_IDENTIFYING&&s.attr(\"stroke-dasharray\",\"8,8\");var c=\"\";switch(Ai.arrowMarkerAbsolute&&(c=(c=(c=window.location.protocol+\"//\"+window.location.host+window.location.pathname+window.location.search).replace(/\\(/g,\"\\\\(\")).replace(/\\)/g,\"\\\\)\")),e.relSpec.cardA){case i.db.Cardinality.ZERO_OR_ONE:s.attr(\"marker-end\",\"url(\"+c+\"#\"+Si.ZERO_OR_ONE_END+\")\");break;case i.db.Cardinality.ZERO_OR_MORE:s.attr(\"marker-end\",\"url(\"+c+\"#\"+Si.ZERO_OR_MORE_END+\")\");break;case i.db.Cardinality.ONE_OR_MORE:s.attr(\"marker-end\",\"url(\"+c+\"#\"+Si.ONE_OR_MORE_END+\")\");break;case i.db.Cardinality.ONLY_ONE:s.attr(\"marker-end\",\"url(\"+c+\"#\"+Si.ONLY_ONE_END+\")\");}switch(e.relSpec.cardB){case i.db.Cardinality.ZERO_OR_ONE:s.attr(\"marker-start\",\"url(\"+c+\"#\"+Si.ZERO_OR_ONE_START+\")\");break;case i.db.Cardinality.ZERO_OR_MORE:s.attr(\"marker-start\",\"url(\"+c+\"#\"+Si.ZERO_OR_MORE_START+\")\");break;case i.db.Cardinality.ONE_OR_MORE:s.attr(\"marker-start\",\"url(\"+c+\"#\"+Si.ONE_OR_MORE_START+\")\");break;case i.db.Cardinality.ONLY_ONE:s.attr(\"marker-start\",\"url(\"+c+\"#\"+Si.ONLY_ONE_START+\")\");}var u=s.node().getTotalLength(),h=s.node().getPointAtLength(.5*u),f=\"rel\"+Ni,d=t.append(\"text\").attr(\"class\",\"er relationshipLabel\").attr(\"id\",f).attr(\"x\",h.x).attr(\"y\",h.y).attr(\"text-anchor\",\"middle\").attr(\"dominant-baseline\",\"middle\").attr(\"style\",\"font-family: \"+Xt().fontFamily+\"; font-size: \"+Ai.fontSize+\"px\").text(e.roleA).node().getBBox();t.insert(\"rect\",\"#\"+f).attr(\"class\",\"er relationshipLabelBox\").attr(\"x\",h.x-d.width/2).attr(\"y\",h.y-d.height/2).attr(\"width\",d.width).attr(\"height\",d.height).attr(\"fill\",\"white\").attr(\"fill-opacity\",\"85%\");}(c,t,s,f,r);}));var p=Ai.diagramPadding,g=c.node().getBBox(),y=g.width+2*p,m=g.height+2*p;Tn(c,0,y,Ai.useMaxWidth),c.attr(\"viewBox\",\"\".concat(g.x-p,\" \").concat(g.y-p,\" \").concat(y,\" \").concat(m)),Mn(r.db,c,e);}};var Di={};const Bi={setConf:function(t){Object.keys(t).forEach((function(e){Di[e]=t[e];}));},draw:function(t,e,n){try{o.debug(\"Renering svg for syntax error\\n\");var r=(0,l.select)(\"#\"+e),i=r.append(\"g\");i.append(\"path\").attr(\"class\",\"error-icon\").attr(\"d\",\"m411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z\"),i.append(\"path\").attr(\"class\",\"error-icon\").attr(\"d\",\"m459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z\"),i.append(\"path\").attr(\"class\",\"error-icon\").attr(\"d\",\"m340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z\"),i.append(\"path\").attr(\"class\",\"error-icon\").attr(\"d\",\"m400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z\"),i.append(\"path\").attr(\"class\",\"error-icon\").attr(\"d\",\"m496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z\"),i.append(\"path\").attr(\"class\",\"error-icon\").attr(\"d\",\"m436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z\"),i.append(\"text\").attr(\"class\",\"error-text\").attr(\"x\",1440).attr(\"y\",250).attr(\"font-size\",\"150px\").style(\"text-anchor\",\"middle\").text(\"Syntax error in graph\"),i.append(\"text\").attr(\"class\",\"error-text\").attr(\"x\",1250).attr(\"y\",400).attr(\"font-size\",\"100px\").style(\"text-anchor\",\"middle\").text(\"mermaid version \"+n),r.attr(\"height\",100),r.attr(\"width\",500),r.attr(\"viewBox\",\"768 0 912 512\");}catch(t){o.error(\"Error while rendering info diagram\"),o.error(t.message);}}};var Li=n(5890),Ii=n.n(Li);function Fi(t){return Fi=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&\"function\"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?\"symbol\":typeof t},Fi(t)}function Ri(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var Pi,ji,zi=\"flowchart-\",Yi=0,Ui=Xt(),$i={},Wi=[],qi=[],Hi=[],Vi={},Gi={},Xi=0,Zi=!0,Qi=[],Ki=function(t){return ue.sanitizeText(t,Ui)},Ji=function(t){for(var e=Object.keys($i),n=0;n<e.length;n++)if($i[e[n]].id===t)return $i[e[n]].domId;return t},ta=function(t,e,n,r){var i={start:t,end:e,type:void 0,text:\"\"};void 0!==(r=n.text)&&(i.text=Ki(r.trim()),'\"'===i.text[0]&&'\"'===i.text[i.text.length-1]&&(i.text=i.text.substring(1,i.text.length-1))),void 0!==n&&(i.type=n.type,i.stroke=n.stroke,i.length=n.length),Wi.push(i);},ea=function(t,e){t.split(\",\").forEach((function(t){var n=t;void 0!==$i[n]&&$i[n].classes.push(e),void 0!==Vi[n]&&Vi[n].classes.push(e);}));},na=function(t){var e=(0, l.select)(\".mermaidTooltip\");null===(e._groups||e)[0][0]&&(e=(0, l.select)(\"body\").append(\"div\").attr(\"class\",\"mermaidTooltip\").style(\"opacity\",0)),(0, l.select)(t).select(\"svg\").selectAll(\"g.node\").on(\"mouseover\",(function(){var t=(0, l.select)(this);if(null!==t.attr(\"title\")){var n=this.getBoundingClientRect();e.transition().duration(200).style(\"opacity\",\".9\"),e.text(t.attr(\"title\")).style(\"left\",window.scrollX+n.left+(n.right-n.left)/2+\"px\").style(\"top\",window.scrollY+n.top-14+document.body.scrollTop+\"px\"),e.html(e.html().replace(/&lt;br\\/&gt;/g,\"<br/>\")),t.classed(\"hover\",!0);}})).on(\"mouseout\",(function(){e.transition().duration(500).style(\"opacity\",0),(0, l.select)(this).classed(\"hover\",!1);}));};Qi.push(na);var ra=function(t){for(var e=0;e<Hi.length;e++)if(Hi[e].id===t)return e;return -1},ia=-1,aa=[],oa=function t(e,n){var r=Hi[n].nodes;if(!((ia+=1)>2e3)){if(aa[ia]=n,Hi[n].id===e)return {result:!0,count:0};for(var i=0,a=1;i<r.length;){var o=ra(r[i]);if(o>=0){var s=t(e,o);if(s.result)return {result:!0,count:a+s.count};a+=s.count;}i+=1;}return {result:!1,count:a}}},sa=function(t,e){var n=!1;return t.forEach((function(t){t.nodes.indexOf(e)>=0&&(n=!0);})),n},ca=function(t,e){var n=[];return t.nodes.forEach((function(r,i){sa(e,r)||n.push(t.nodes[i]);})),{nodes:n}};const la={parseDirective:function(t,e,n){cu.parseDirective(this,t,e,n);},defaultConfig:function(){return $t.flowchart},setAccTitle:ye,getAccTitle:me,getAccDescription:ve,setAccDescription:be,addVertex:function(t,e,n,r,i,a){var o,s=arguments.length>6&&void 0!==arguments[6]?arguments[6]:{},c=t;void 0!==c&&0!==c.trim().length&&(void 0===$i[c]&&($i[c]={id:c,domId:zi+c+\"-\"+Yi,styles:[],classes:[]}),Yi++,void 0!==e?(Ui=Xt(),'\"'===(o=Ki(e.trim()))[0]&&'\"'===o[o.length-1]&&(o=o.substring(1,o.length-1)),$i[c].text=o):void 0===$i[c].text&&($i[c].text=t),void 0!==n&&($i[c].type=n),null!=r&&r.forEach((function(t){$i[c].styles.push(t);})),null!=i&&i.forEach((function(t){$i[c].classes.push(t);})),void 0!==a&&($i[c].dir=a),$i[c].props=s);},lookUpDomId:Ji,addLink:function(t,e,n,r){var i,a;for(i=0;i<t.length;i++)for(a=0;a<e.length;a++)ta(t[i],e[a],n,r);},updateLinkInterpolate:function(t,e){t.forEach((function(t){\"default\"===t?Wi.defaultInterpolate=e:Wi[t].interpolate=e;}));},updateLink:function(t,e){t.forEach((function(t){\"default\"===t?Wi.defaultStyle=e:(-1===An.isSubstringInArray(\"fill\",e)&&e.push(\"fill:none\"),Wi[t].style=e);}));},addClass:function(t,e){void 0===qi[t]&&(qi[t]={id:t,styles:[],textStyles:[]}),null!=e&&e.forEach((function(e){if(e.match(\"color\")){var n=e.replace(\"fill\",\"bgFill\").replace(\"color\",\"fill\");qi[t].textStyles.push(n);}qi[t].styles.push(e);}));},setDirection:function(t){(Pi=t).match(/.*</)&&(Pi=\"RL\"),Pi.match(/.*\\^/)&&(Pi=\"BT\"),Pi.match(/.*>/)&&(Pi=\"LR\"),Pi.match(/.*v/)&&(Pi=\"TB\");},setClass:ea,setTooltip:function(t,e){t.split(\",\").forEach((function(t){void 0!==e&&(Gi[\"gen-1\"===ji?Ji(t):t]=Ki(e));}));},getTooltip:function(t){return Gi[t]},setClickEvent:function(t,e,n){t.split(\",\").forEach((function(t){!function(t,e,n){var r=Ji(t);if(\"loose\"===Xt().securityLevel&&void 0!==e){var i=[];if(\"string\"==typeof n){i=n.split(/,(?=(?:(?:[^\"]*\"){2})*[^\"]*$)/);for(var a=0;a<i.length;a++){var o=i[a].trim();'\"'===o.charAt(0)&&'\"'===o.charAt(o.length-1)&&(o=o.substr(1,o.length-2)),i[a]=o;}}0===i.length&&i.push(t),void 0!==$i[t]&&($i[t].haveCallback=!0,Qi.push((function(){var t=document.querySelector('[id=\"'.concat(r,'\"]'));null!==t&&t.addEventListener(\"click\",(function(){var t;An.runFunc.apply(An,[e].concat(function(t){if(Array.isArray(t))return Ri(t)}(t=i)||function(t){if(\"undefined\"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t[\"@@iterator\"])return Array.from(t)}(t)||function(t,e){if(t){if(\"string\"==typeof t)return Ri(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return \"Object\"===n&&t.constructor&&(n=t.constructor.name),\"Map\"===n||\"Set\"===n?Array.from(t):\"Arguments\"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ri(t,e):void 0}}(t)||function(){throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\")}()));}),!1);})));}}(t,e,n);})),ea(t,\"clickable\");},setLink:function(t,e,n){t.split(\",\").forEach((function(t){void 0!==$i[t]&&($i[t].link=An.formatUrl(e,Ui),$i[t].linkTarget=n);})),ea(t,\"clickable\");},bindFunctions:function(t){Qi.forEach((function(e){e(t);}));},getDirection:function(){return Pi.trim()},getVertices:function(){return $i},getEdges:function(){return Wi},getClasses:function(){return qi},clear:function(t){$i={},qi={},Wi=[],(Qi=[]).push(na),Hi=[],Vi={},Xi=0,Gi=[],Zi=!0,ji=t||\"gen-1\",ge();},setGen:function(t){ji=t||\"gen-1\";},defaultStyle:function(){return \"fill:#ffa;stroke: #f66; stroke-width: 3px; stroke-dasharray: 5, 5;fill:#ffa;stroke: #666;\"},addSubGraph:function(t,e,n){var r=t.trim(),i=n;t===n&&n.match(/\\s/)&&(r=void 0);var a=[],s=function(t){var e,n={boolean:{},number:{},string:{}},r=[],i=t.filter((function(t){var i=Fi(t);return t.stmt&&\"dir\"===t.stmt?(e=t.value,!1):\"\"!==t.trim()&&(i in n?!n[i].hasOwnProperty(t)&&(n[i][t]=!0):!(r.indexOf(t)>=0)&&r.push(t))}));return {nodeList:i,dir:e}}(a.concat.apply(a,e)),c=s.nodeList,l=s.dir;if(a=c,\"gen-1\"===ji)for(var u=0;u<a.length;u++)a[u]=Ji(a[u]);r=r||\"subGraph\"+Xi,i=Ki(i=i||\"\"),Xi+=1;var h={id:r,nodes:a,title:i.trim(),classes:[],dir:l};return o.info(\"Adding\",h.id,h.nodes,h.dir),h.nodes=ca(h,Hi).nodes,Hi.push(h),Vi[r]=h,r},getDepthFirstPos:function(t){return aa[t]},indexNodes:function(){ia=-1,Hi.length>0&&oa(\"none\",Hi.length-1);},getSubGraphs:function(){return Hi},destructLink:function(t,e){var n,r=function(t){var e=t.trim(),n=e.slice(0,-1),r=\"arrow_open\";switch(e.slice(-1)){case\"x\":r=\"arrow_cross\",\"x\"===e[0]&&(r=\"double_\"+r,n=n.slice(1));break;case\">\":r=\"arrow_point\",\"<\"===e[0]&&(r=\"double_\"+r,n=n.slice(1));break;case\"o\":r=\"arrow_circle\",\"o\"===e[0]&&(r=\"double_\"+r,n=n.slice(1));}var i=\"normal\",a=n.length-1;\"=\"===n[0]&&(i=\"thick\");var o=function(t,e){for(var n=e.length,r=0,i=0;i<n;++i)\".\"===e[i]&&++r;return r}(0,n);return o&&(i=\"dotted\",a=o),{type:r,stroke:i,length:a}}(t);if(e){if(n=function(t){var e=t.trim(),n=\"arrow_open\";switch(e[0]){case\"<\":n=\"arrow_point\",e=e.slice(1);break;case\"x\":n=\"arrow_cross\",e=e.slice(1);break;case\"o\":n=\"arrow_circle\",e=e.slice(1);}var r=\"normal\";return -1!==e.indexOf(\"=\")&&(r=\"thick\"),-1!==e.indexOf(\".\")&&(r=\"dotted\"),{type:n,stroke:r}}(e),n.stroke!==r.stroke)return {type:\"INVALID\",stroke:\"INVALID\"};if(\"arrow_open\"===n.type)n.type=r.type;else {if(n.type!==r.type)return {type:\"INVALID\",stroke:\"INVALID\"};n.type=\"double_\"+n.type;}return \"double_arrow\"===n.type&&(n.type=\"double_arrow_point\"),n.length=r.length,n}return r},lex:{firstGraph:function(){return !!Zi&&(Zi=!1,!0)}},exists:sa,makeUniq:ca};var ua=n(4949),ha=n.n(ua),fa=n(8284),da=n.n(fa);function pa(t,e,n){var r=.9*(e.width+e.height),i=[{x:r/2,y:0},{x:r,y:-r/2},{x:r/2,y:-r},{x:0,y:-r/2}],a=Ea(t,r,r,i);return n.intersect=function(t){return ha().intersect.polygon(n,i,t)},a}function ga(t,e,n){var r=e.height,i=r/4,a=e.width+2*i,o=[{x:i,y:0},{x:a-i,y:0},{x:a,y:-r/2},{x:a-i,y:-r},{x:i,y:-r},{x:0,y:-r/2}],s=Ea(t,a,r,o);return n.intersect=function(t){return ha().intersect.polygon(n,o,t)},s}function ya(t,e,n){var r=e.width,i=e.height,a=[{x:-i/2,y:0},{x:r,y:0},{x:r,y:-i},{x:-i/2,y:-i},{x:0,y:-i/2}],o=Ea(t,r,i,a);return n.intersect=function(t){return ha().intersect.polygon(n,a,t)},o}function ma(t,e,n){var r=e.width,i=e.height,a=[{x:-2*i/6,y:0},{x:r-i/6,y:0},{x:r+2*i/6,y:-i},{x:i/6,y:-i}],o=Ea(t,r,i,a);return n.intersect=function(t){return ha().intersect.polygon(n,a,t)},o}function ba(t,e,n){var r=e.width,i=e.height,a=[{x:2*i/6,y:0},{x:r+i/6,y:0},{x:r-2*i/6,y:-i},{x:-i/6,y:-i}],o=Ea(t,r,i,a);return n.intersect=function(t){return ha().intersect.polygon(n,a,t)},o}function va(t,e,n){var r=e.width,i=e.height,a=[{x:-2*i/6,y:0},{x:r+2*i/6,y:0},{x:r-i/6,y:-i},{x:i/6,y:-i}],o=Ea(t,r,i,a);return n.intersect=function(t){return ha().intersect.polygon(n,a,t)},o}function _a(t,e,n){var r=e.width,i=e.height,a=[{x:i/6,y:0},{x:r-i/6,y:0},{x:r+2*i/6,y:-i},{x:-2*i/6,y:-i}],o=Ea(t,r,i,a);return n.intersect=function(t){return ha().intersect.polygon(n,a,t)},o}function xa(t,e,n){var r=e.width,i=e.height,a=[{x:0,y:0},{x:r+i/2,y:0},{x:r,y:-i/2},{x:r+i/2,y:-i},{x:0,y:-i}],o=Ea(t,r,i,a);return n.intersect=function(t){return ha().intersect.polygon(n,a,t)},o}function ka(t,e,n){var r=e.height,i=e.width+r/4,a=t.insert(\"rect\",\":first-child\").attr(\"rx\",r/2).attr(\"ry\",r/2).attr(\"x\",-i/2).attr(\"y\",-r/2).attr(\"width\",i).attr(\"height\",r);return n.intersect=function(t){return ha().intersect.rect(n,t)},a}function wa(t,e,n){var r=e.width,i=e.height,a=[{x:0,y:0},{x:r,y:0},{x:r,y:-i},{x:0,y:-i},{x:0,y:0},{x:-8,y:0},{x:r+8,y:0},{x:r+8,y:-i},{x:-8,y:-i},{x:-8,y:0}],o=Ea(t,r,i,a);return n.intersect=function(t){return ha().intersect.polygon(n,a,t)},o}function Ta(t,e,n){var r=e.width,i=r/2,a=i/(2.5+r/50),o=e.height+a,s=\"M 0,\"+a+\" a \"+i+\",\"+a+\" 0,0,0 \"+r+\" 0 a \"+i+\",\"+a+\" 0,0,0 \"+-r+\" 0 l 0,\"+o+\" a \"+i+\",\"+a+\" 0,0,0 \"+r+\" 0 l 0,\"+-o,c=t.attr(\"label-offset-y\",a).insert(\"path\",\":first-child\").attr(\"d\",s).attr(\"transform\",\"translate(\"+-r/2+\",\"+-(o/2+a)+\")\");return n.intersect=function(t){var e=ha().intersect.rect(n,t),r=e.x-n.x;if(0!=i&&(Math.abs(r)<n.width/2||Math.abs(r)==n.width/2&&Math.abs(e.y-n.y)>n.height/2-a)){var o=a*a*(1-r*r/(i*i));0!=o&&(o=Math.sqrt(o)),o=a-o,t.y-n.y>0&&(o=-o),e.y+=o;}return e},c}function Ea(t,e,n,r){return t.insert(\"polygon\",\":first-child\").attr(\"points\",r.map((function(t){return t.x+\",\"+t.y})).join(\" \")).attr(\"transform\",\"translate(\"+-e/2+\",\"+n/2+\")\")}const Ca=function(t){t.shapes().question=pa,t.shapes().hexagon=ga,t.shapes().stadium=ka,t.shapes().subroutine=wa,t.shapes().cylinder=Ta,t.shapes().rect_left_inv_arrow=ya,t.shapes().lean_right=ma,t.shapes().lean_left=ba,t.shapes().trapezoid=va,t.shapes().inv_trapezoid=_a,t.shapes().rect_right_inv_arrow=xa;};var Sa={},Aa=function(t,e,n,r,i,a){Xt().securityLevel;var s=r?r.select('[id=\"'.concat(n,'\"]')):(0, l.select)('[id=\"'.concat(n,'\"]')),c=i||document;Object.keys(t).forEach((function(n){var r=t[n],i=\"default\";r.classes.length>0&&(i=r.classes.join(\" \"));var l,u=dn(r.styles),h=void 0!==r.text?r.text:r.id;if(ce(Xt().flowchart.htmlLabels)){var f={label:h.replace(/fa[lrsb]?:fa-[\\w-]+/g,(function(t){return \"<i class='\".concat(t.replace(\":\",\" \"),\"'></i>\")}))};(l=da()(s,f).node()).parentNode.removeChild(l);}else {var d=c.createElementNS(\"http://www.w3.org/2000/svg\",\"text\");d.setAttribute(\"style\",u.labelStyle.replace(\"color:\",\"fill:\"));for(var p=h.split(ue.lineBreakRegex),g=0;g<p.length;g++){var y=c.createElementNS(\"http://www.w3.org/2000/svg\",\"tspan\");y.setAttributeNS(\"http://www.w3.org/XML/1998/namespace\",\"xml:space\",\"preserve\"),y.setAttribute(\"dy\",\"1em\"),y.setAttribute(\"x\",\"1\"),y.textContent=p[g],d.appendChild(y);}l=d;}var m=0,b=\"\";switch(r.type){case\"round\":m=5,b=\"rect\";break;case\"square\":case\"group\":default:b=\"rect\";break;case\"diamond\":b=\"question\";break;case\"hexagon\":b=\"hexagon\";break;case\"odd\":case\"odd_right\":b=\"rect_left_inv_arrow\";break;case\"lean_right\":b=\"lean_right\";break;case\"lean_left\":b=\"lean_left\";break;case\"trapezoid\":b=\"trapezoid\";break;case\"inv_trapezoid\":b=\"inv_trapezoid\";break;case\"circle\":b=\"circle\";break;case\"ellipse\":b=\"ellipse\";break;case\"stadium\":b=\"stadium\";break;case\"subroutine\":b=\"subroutine\";break;case\"cylinder\":b=\"cylinder\";}o.warn(\"Adding node\",r.id,r.domId),e.setNode(a.db.lookUpDomId(r.id),{labelType:\"svg\",labelStyle:u.labelStyle,shape:b,label:l,rx:m,ry:m,class:i,style:u.style,id:a.db.lookUpDomId(r.id)});}));},Ma=function(t,e,n){var r,i,a=0;if(void 0!==t.defaultStyle){var o=dn(t.defaultStyle);r=o.style,i=o.labelStyle;}t.forEach((function(o){a++;var s=\"L-\"+o.start+\"-\"+o.end,c=\"LS-\"+o.start,u=\"LE-\"+o.end,h={};\"arrow_open\"===o.type?h.arrowhead=\"none\":h.arrowhead=\"normal\";var f=\"\",d=\"\";if(void 0!==o.style){var p=dn(o.style);f=p.style,d=p.labelStyle;}else switch(o.stroke){case\"normal\":f=\"fill:none\",void 0!==r&&(f=r),void 0!==i&&(d=i);break;case\"dotted\":f=\"fill:none;stroke-width:2px;stroke-dasharray:3;\";break;case\"thick\":f=\" stroke-width: 3.5px;fill:none\";}h.style=f,h.labelStyle=d,void 0!==o.interpolate?h.curve=hn(o.interpolate,l.curveLinear):void 0!==t.defaultInterpolate?h.curve=hn(t.defaultInterpolate,l.curveLinear):h.curve=hn(Sa.curve,l.curveLinear),void 0===o.text?void 0!==o.style&&(h.arrowheadStyle=\"fill: #333\"):(h.arrowheadStyle=\"fill: #333\",h.labelpos=\"c\",ce(Xt().flowchart.htmlLabels)?(h.labelType=\"html\",h.label='<span id=\"L-'.concat(s,'\" class=\"edgeLabel L-').concat(c,\"' L-\").concat(u,'\" style=\"').concat(h.labelStyle,'\">').concat(o.text.replace(/fa[lrsb]?:fa-[\\w-]+/g,(function(t){return \"<i class='\".concat(t.replace(\":\",\" \"),\"'></i>\")})),\"</span>\")):(h.labelType=\"text\",h.label=o.text.replace(ue.lineBreakRegex,\"\\n\"),void 0===o.style&&(h.style=h.style||\"stroke: #333; stroke-width: 1.5px;fill:none\"),h.labelStyle=h.labelStyle.replace(\"color:\",\"fill:\"))),h.id=s,h.class=c+\" \"+u,h.minlen=o.length||1,e.setEdge(n.db.lookUpDomId(o.start),n.db.lookUpDomId(o.end),h,a);}));};const Na={setConf:function(t){for(var e=Object.keys(t),n=0;n<e.length;n++)Sa[e[n]]=t[e[n]];},addVertices:Aa,addEdges:Ma,getClasses:function(t,e){o.info(\"Extracting classes\"),e.db.clear();try{return e.parse(t),e.db.getClasses()}catch(t){return}},draw:function(t,e,n,r){o.info(\"Drawing flowchart\"),r.db.clear();var i,a=Xt().securityLevel;\"sandbox\"===a&&(i=(0, l.select)(\"#i\"+e));var s=\"sandbox\"===a?(0, l.select)(i.nodes()[0].contentDocument.body):(0, l.select)(\"body\"),c=\"sandbox\"===a?i.nodes()[0].contentDocument:document;try{r.parser.parse(t);}catch(t){o.debug(\"Parsing failed\");}var u=r.db.getDirection();void 0===u&&(u=\"TD\");for(var h,f=Xt().flowchart,d=f.nodeSpacing||50,p=f.rankSpacing||50,g=new(yr().Graph)({multigraph:!0,compound:!0}).setGraph({rankdir:u,nodesep:d,ranksep:p,marginx:8,marginy:8}).setDefaultEdgeLabel((function(){return {}})),y=r.db.getSubGraphs(),m=y.length-1;m>=0;m--)h=y[m],r.db.addVertex(h.id,h.title,\"group\",void 0,h.classes);var b=r.db.getVertices();o.warn(\"Get vertices\",b);var v=r.db.getEdges(),_=0;for(_=y.length-1;_>=0;_--){h=y[_],(0, l.selectAll)(\"cluster\").append(\"text\");for(var x=0;x<h.nodes.length;x++)o.warn(\"Setting subgraph\",h.nodes[x],r.db.lookUpDomId(h.nodes[x]),r.db.lookUpDomId(h.id)),g.setParent(r.db.lookUpDomId(h.nodes[x]),r.db.lookUpDomId(h.id));}Aa(b,g,e,s,c,r),Ma(v,g,r);var k=new(ha().render);Ca(k),k.arrows().none=function(t,e,n,r){var i=t.append(\"marker\").attr(\"id\",e).attr(\"viewBox\",\"0 0 10 10\").attr(\"refX\",9).attr(\"refY\",5).attr(\"markerUnits\",\"strokeWidth\").attr(\"markerWidth\",8).attr(\"markerHeight\",6).attr(\"orient\",\"auto\").append(\"path\").attr(\"d\",\"M 0 0 L 0 0 L 0 0 z\");ha().util.applyStyle(i,n[r+\"Style\"]);},k.arrows().normal=function(t,e){t.append(\"marker\").attr(\"id\",e).attr(\"viewBox\",\"0 0 10 10\").attr(\"refX\",9).attr(\"refY\",5).attr(\"markerUnits\",\"strokeWidth\").attr(\"markerWidth\",8).attr(\"markerHeight\",6).attr(\"orient\",\"auto\").append(\"path\").attr(\"d\",\"M 0 0 L 10 5 L 0 10 z\").attr(\"class\",\"arrowheadPath\").style(\"stroke-width\",1).style(\"stroke-dasharray\",\"1,0\");};var w=s.select('[id=\"'.concat(e,'\"]'));Mn(r.db,w,e);var T=s.select(\"#\"+e+\" g\");for(k(T,g),T.selectAll(\"g.node\").attr(\"title\",(function(){return r.db.getTooltip(this.id)})),r.db.indexNodes(\"subGraph\"+_),_=0;_<y.length;_++)if(\"undefined\"!==(h=y[_]).title){var E=c.querySelectorAll(\"#\"+e+' [id=\"'+r.db.lookUpDomId(h.id)+'\"] rect'),C=c.querySelectorAll(\"#\"+e+' [id=\"'+r.db.lookUpDomId(h.id)+'\"]'),S=E[0].x.baseVal.value,A=E[0].y.baseVal.value,M=E[0].width.baseVal.value,N=(0, l.select)(C[0]).select(\".label\");N.attr(\"transform\",\"translate(\".concat(S+M/2,\", \").concat(A+14,\")\")),N.attr(\"id\",e+\"Text\");for(var O=0;O<h.classes.length;O++)C[0].classList.add(h.classes[O]);}ce(f.htmlLabels);for(var D=c.querySelectorAll('[id=\"'+e+'\"] .edgeLabel .label'),B=0;B<D.length;B++){var L=D[B],I=L.getBBox(),F=c.createElementNS(\"http://www.w3.org/2000/svg\",\"rect\");F.setAttribute(\"rx\",0),F.setAttribute(\"ry\",0),F.setAttribute(\"width\",I.width),F.setAttribute(\"height\",I.height),L.insertBefore(F,L.firstChild);}En(g,w,f.diagramPadding,f.useMaxWidth),Object.keys(b).forEach((function(t){var n=b[t];if(n.link){var i=s.select(\"#\"+e+' [id=\"'+r.db.lookUpDomId(t)+'\"]');if(i){var o=c.createElementNS(\"http://www.w3.org/2000/svg\",\"a\");o.setAttributeNS(\"http://www.w3.org/2000/svg\",\"class\",n.classes.join(\" \")),o.setAttributeNS(\"http://www.w3.org/2000/svg\",\"href\",n.link),o.setAttributeNS(\"http://www.w3.org/2000/svg\",\"rel\",\"noopener\"),\"sandbox\"===a?o.setAttributeNS(\"http://www.w3.org/2000/svg\",\"target\",\"_top\"):n.linkTarget&&o.setAttributeNS(\"http://www.w3.org/2000/svg\",\"target\",n.linkTarget);var l=i.insert((function(){return o}),\":first-child\"),u=i.select(\".label-container\");u&&l.append((function(){return u.node()}));var h=i.select(\".label\");h&&l.append((function(){return h.node()}));}}}));}};var Oa={},Da=function(t,e,n,r,i,a){var s=r.select('[id=\"'.concat(n,'\"]'));Object.keys(t).forEach((function(n){var r=t[n],c=\"default\";r.classes.length>0&&(c=r.classes.join(\" \"));var l,u=dn(r.styles),h=void 0!==r.text?r.text:r.id;if(ce(Xt().flowchart.htmlLabels)){var f={label:h.replace(/fa[lrsb]?:fa-[\\w-]+/g,(function(t){return \"<i class='\".concat(t.replace(\":\",\" \"),\"'></i>\")}))};(l=da()(s,f).node()).parentNode.removeChild(l);}else {var d=i.createElementNS(\"http://www.w3.org/2000/svg\",\"text\");d.setAttribute(\"style\",u.labelStyle.replace(\"color:\",\"fill:\"));for(var p=h.split(ue.lineBreakRegex),g=0;g<p.length;g++){var y=i.createElementNS(\"http://www.w3.org/2000/svg\",\"tspan\");y.setAttributeNS(\"http://www.w3.org/XML/1998/namespace\",\"xml:space\",\"preserve\"),y.setAttribute(\"dy\",\"1em\"),y.setAttribute(\"x\",\"1\"),y.textContent=p[g],d.appendChild(y);}l=d;}var m=0,b=\"\";switch(r.type){case\"round\":m=5,b=\"rect\";break;case\"square\":case\"group\":default:b=\"rect\";break;case\"diamond\":b=\"question\";break;case\"hexagon\":b=\"hexagon\";break;case\"odd\":case\"odd_right\":b=\"rect_left_inv_arrow\";break;case\"lean_right\":b=\"lean_right\";break;case\"lean_left\":b=\"lean_left\";break;case\"trapezoid\":b=\"trapezoid\";break;case\"inv_trapezoid\":b=\"inv_trapezoid\";break;case\"circle\":b=\"circle\";break;case\"ellipse\":b=\"ellipse\";break;case\"stadium\":b=\"stadium\";break;case\"subroutine\":b=\"subroutine\";break;case\"cylinder\":b=\"cylinder\";break;case\"doublecircle\":b=\"doublecircle\";}e.setNode(r.id,{labelStyle:u.labelStyle,shape:b,labelText:h,rx:m,ry:m,class:c,style:u.style,id:r.id,link:r.link,linkTarget:r.linkTarget,tooltip:a.db.getTooltip(r.id)||\"\",domId:a.db.lookUpDomId(r.id),haveCallback:r.haveCallback,width:\"group\"===r.type?500:void 0,dir:r.dir,type:r.type,props:r.props,padding:Xt().flowchart.padding}),o.info(\"setNode\",{labelStyle:u.labelStyle,shape:b,labelText:h,rx:m,ry:m,class:c,style:u.style,id:r.id,domId:a.db.lookUpDomId(r.id),width:\"group\"===r.type?500:void 0,type:r.type,dir:r.dir,props:r.props,padding:Xt().flowchart.padding});}));},Ba=function(t,e,n){o.info(\"abc78 edges = \",t);var r,i,a=0,s={};if(void 0!==t.defaultStyle){var c=dn(t.defaultStyle);r=c.style,i=c.labelStyle;}t.forEach((function(n){a++;var c=\"L-\"+n.start+\"-\"+n.end;void 0===s[c]?(s[c]=0,o.info(\"abc78 new entry\",c,s[c])):(s[c]++,o.info(\"abc78 new entry\",c,s[c]));var u=c+\"-\"+s[c];o.info(\"abc78 new link id to be used is\",c,u,s[c]);var h=\"LS-\"+n.start,f=\"LE-\"+n.end,d={style:\"\",labelStyle:\"\"};switch(d.minlen=n.length||1,\"arrow_open\"===n.type?d.arrowhead=\"none\":d.arrowhead=\"normal\",d.arrowTypeStart=\"arrow_open\",d.arrowTypeEnd=\"arrow_open\",n.type){case\"double_arrow_cross\":d.arrowTypeStart=\"arrow_cross\";case\"arrow_cross\":d.arrowTypeEnd=\"arrow_cross\";break;case\"double_arrow_point\":d.arrowTypeStart=\"arrow_point\";case\"arrow_point\":d.arrowTypeEnd=\"arrow_point\";break;case\"double_arrow_circle\":d.arrowTypeStart=\"arrow_circle\";case\"arrow_circle\":d.arrowTypeEnd=\"arrow_circle\";}var p=\"\",g=\"\";switch(n.stroke){case\"normal\":p=\"fill:none;\",void 0!==r&&(p=r),void 0!==i&&(g=i),d.thickness=\"normal\",d.pattern=\"solid\";break;case\"dotted\":d.thickness=\"normal\",d.pattern=\"dotted\",d.style=\"fill:none;stroke-width:2px;stroke-dasharray:3;\";break;case\"thick\":d.thickness=\"thick\",d.pattern=\"solid\",d.style=\"stroke-width: 3.5px;fill:none;\";}if(void 0!==n.style){var y=dn(n.style);p=y.style,g=y.labelStyle;}d.style=d.style+=p,d.labelStyle=d.labelStyle+=g,void 0!==n.interpolate?d.curve=hn(n.interpolate,l.curveLinear):void 0!==t.defaultInterpolate?d.curve=hn(t.defaultInterpolate,l.curveLinear):d.curve=hn(Oa.curve,l.curveLinear),void 0===n.text?void 0!==n.style&&(d.arrowheadStyle=\"fill: #333\"):(d.arrowheadStyle=\"fill: #333\",d.labelpos=\"c\"),d.labelType=\"text\",d.label=n.text.replace(ue.lineBreakRegex,\"\\n\"),void 0===n.style&&(d.style=d.style||\"stroke: #333; stroke-width: 1.5px;fill:none;\"),d.labelStyle=d.labelStyle.replace(\"color:\",\"fill:\"),d.id=u,d.classes=\"flowchart-link \"+h+\" \"+f,e.setEdge(n.start,n.end,d,a);}));};const La={setConf:function(t){for(var e=Object.keys(t),n=0;n<e.length;n++)Oa[e[n]]=t[e[n]];},addVertices:Da,addEdges:Ba,getClasses:function(t,e){o.info(\"Extracting classes\"),e.db.clear();try{return e.parse(t),e.db.getClasses()}catch(t){return}},draw:function(t,e,n,r){o.info(\"Drawing flowchart\"),r.db.clear(),la.setGen(\"gen-2\"),r.parser.parse(t);var i=r.db.getDirection();void 0===i&&(i=\"TD\");var a,s=Xt().flowchart,c=s.nodeSpacing||50,u=s.rankSpacing||50,h=Xt().securityLevel;\"sandbox\"===h&&(a=(0, l.select)(\"#i\"+e));var f,d=\"sandbox\"===h?(0, l.select)(a.nodes()[0].contentDocument.body):(0, l.select)(\"body\"),p=\"sandbox\"===h?a.nodes()[0].contentDocument:document,g=new(yr().Graph)({multigraph:!0,compound:!0}).setGraph({rankdir:i,nodesep:c,ranksep:u,marginx:0,marginy:0}).setDefaultEdgeLabel((function(){return {}})),y=r.db.getSubGraphs();o.info(\"Subgraphs - \",y);for(var m=y.length-1;m>=0;m--)f=y[m],o.info(\"Subgraph - \",f),r.db.addVertex(f.id,f.title,\"group\",void 0,f.classes,f.dir);var b=r.db.getVertices(),v=r.db.getEdges();o.info(v);var _=0;for(_=y.length-1;_>=0;_--){f=y[_],(0, l.selectAll)(\"cluster\").append(\"text\");for(var x=0;x<f.nodes.length;x++)o.info(\"Setting up subgraphs\",f.nodes[x],f.id),g.setParent(f.nodes[x],f.id);}Da(b,g,e,d,p,r),Ba(v,g);var k=d.select('[id=\"'.concat(e,'\"]'));Mn(r.db,k,e);var w=d.select(\"#\"+e+\" g\");if(yi(w,g,[\"point\",\"circle\",\"cross\"],\"flowchart\",e),En(g,k,s.diagramPadding,s.useMaxWidth),r.db.indexNodes(\"subGraph\"+_),!s.htmlLabels)for(var T=p.querySelectorAll('[id=\"'+e+'\"] .edgeLabel .label'),E=0;E<T.length;E++){var C=T[E],S=C.getBBox(),A=p.createElementNS(\"http://www.w3.org/2000/svg\",\"rect\");A.setAttribute(\"rx\",0),A.setAttribute(\"ry\",0),A.setAttribute(\"width\",S.width),A.setAttribute(\"height\",S.height),C.insertBefore(A,C.firstChild);}Object.keys(b).forEach((function(t){var n=b[t];if(n.link){var r=(0, l.select)(\"#\"+e+' [id=\"'+t+'\"]');if(r){var i=p.createElementNS(\"http://www.w3.org/2000/svg\",\"a\");i.setAttributeNS(\"http://www.w3.org/2000/svg\",\"class\",n.classes.join(\" \")),i.setAttributeNS(\"http://www.w3.org/2000/svg\",\"href\",n.link),i.setAttributeNS(\"http://www.w3.org/2000/svg\",\"rel\",\"noopener\"),\"sandbox\"===h?i.setAttributeNS(\"http://www.w3.org/2000/svg\",\"target\",\"_top\"):n.linkTarget&&i.setAttributeNS(\"http://www.w3.org/2000/svg\",\"target\",n.linkTarget);var a=r.insert((function(){return i}),\":first-child\"),o=r.select(\".label-container\");o&&a.append((function(){return o.node()}));var s=r.select(\".label\");s&&a.append((function(){return s.node()}));}}}));}};var Ia=n(3602),Fa=n.n(Ia);function Ra(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var Pa,ja,za=\"\",Ya=\"\",Ua=\"\",$a=[],Wa=[],qa={},Ha=[],Va=[],Ga=\"\",Xa=[\"active\",\"done\",\"crit\",\"milestone\"],Za=[],Qa=!1,Ka=!1,Ja=0,to=function(t,e,n,r){return !(r.indexOf(t.format(e.trim()))>=0)&&(t.isoWeekday()>=6&&n.indexOf(\"weekends\")>=0||n.indexOf(t.format(\"dddd\").toLowerCase())>=0||n.indexOf(t.format(e.trim()))>=0)},eo=function(t,e,n,r){if(n.length&&!t.manualEndTime){var a=i()(t.startTime,e,!0);a.add(1,\"d\");var o=i()(t.endTime,e,!0),s=no(a,o,e,n,r);t.endTime=o.toDate(),t.renderEndTime=s;}},no=function(t,e,n,r,i){for(var a=!1,o=null;t<=e;)a||(o=e.toDate()),(a=to(t,n,r,i))&&e.add(1,\"d\"),t.add(1,\"d\");return o},ro=function(t,e,n){n=n.trim();var r=/^after\\s+([\\d\\w- ]+)/.exec(n.trim());if(null!==r){var a=null;if(r[1].split(\" \").forEach((function(t){var e=uo(t);void 0!==e&&(a?e.endTime>a.endTime&&(a=e):a=e);})),a)return a.endTime;var s=new Date;return s.setHours(0,0,0,0),s}var c=i()(n,e.trim(),!0);return c.isValid()?c.toDate():(o.debug(\"Invalid date:\"+n),o.debug(\"With date format:\"+e.trim()),new Date)},io=function(t,e){if(null!==t)switch(t[2]){case\"ms\":e.add(t[1],\"milliseconds\");break;case\"s\":e.add(t[1],\"seconds\");break;case\"m\":e.add(t[1],\"minutes\");break;case\"h\":e.add(t[1],\"hours\");break;case\"d\":e.add(t[1],\"days\");break;case\"w\":e.add(t[1],\"weeks\");}return e.toDate()},ao=function(t,e,n,r){r=r||!1,n=n.trim();var a=i()(n,e.trim(),!0);return a.isValid()?(r&&a.add(1,\"d\"),a.toDate()):io(/^([\\d]+)([wdhms]|ms)$/.exec(n.trim()),i()(t))},oo=0,so=function(t){return void 0===t?\"task\"+(oo+=1):t},co=[],lo={},uo=function(t){var e=lo[t];return co[e]},ho=function(){for(var t=function(t){var e=co[t],n=\"\";switch(co[t].raw.startTime.type){case\"prevTaskEnd\":var r=uo(e.prevTaskId);e.startTime=r.endTime;break;case\"getStartDate\":(n=ro(0,za,co[t].raw.startTime.startData))&&(co[t].startTime=n);}return co[t].startTime&&(co[t].endTime=ao(co[t].startTime,za,co[t].raw.endTime.data,Qa),co[t].endTime&&(co[t].processed=!0,co[t].manualEndTime=i()(co[t].raw.endTime.data,\"YYYY-MM-DD\",!0).isValid(),eo(co[t],za,Wa,$a))),co[t].processed},e=!0,n=0;n<co.length;n++)t(n),e=e&&co[n].processed;return e},fo=function(t,e){t.split(\",\").forEach((function(t){var n=uo(t);void 0!==n&&n.classes.push(e);}));},po=function(t,e){Za.push((function(){var n=document.querySelector('[id=\"'.concat(t,'\"]'));null!==n&&n.addEventListener(\"click\",(function(){e();}));})),Za.push((function(){var n=document.querySelector('[id=\"'.concat(t,'-text\"]'));null!==n&&n.addEventListener(\"click\",(function(){e();}));}));};const go={parseDirective:function(t,e,n){cu.parseDirective(this,t,e,n);},getConfig:function(){return Xt().gantt},clear:function(){Ha=[],Va=[],Ga=\"\",Za=[],oo=0,Pa=void 0,ja=void 0,co=[],za=\"\",Ya=\"\",Ua=\"\",$a=[],Wa=[],Qa=!1,Ka=!1,Ja=0,qa={},ge();},setDateFormat:function(t){za=t;},getDateFormat:function(){return za},enableInclusiveEndDates:function(){Qa=!0;},endDatesAreInclusive:function(){return Qa},enableTopAxis:function(){Ka=!0;},topAxisEnabled:function(){return Ka},setAxisFormat:function(t){Ya=t;},getAxisFormat:function(){return Ya},setTodayMarker:function(t){Ua=t;},getTodayMarker:function(){return Ua},setAccTitle:ye,getAccTitle:me,setDiagramTitle:_e,getDiagramTitle:xe,setAccDescription:be,getAccDescription:ve,addSection:function(t){Ga=t,Ha.push(t);},getSections:function(){return Ha},getTasks:function(){for(var t=ho(),e=0;!t&&e<10;)t=ho(),e++;return Va=co},addTask:function(t,e){var n={section:Ga,type:Ga,processed:!1,manualEndTime:!1,renderEndTime:null,raw:{data:e},task:t,classes:[]},r=function(t,e){var n=(\":\"===e.substr(0,1)?e.substr(1,e.length):e).split(\",\"),r={};yo(n,r,Xa);for(var i=0;i<n.length;i++)n[i]=n[i].trim();switch(n.length){case 1:r.id=so(),r.startTime={type:\"prevTaskEnd\",id:t},r.endTime={data:n[0]};break;case 2:r.id=so(),r.startTime={type:\"getStartDate\",startData:n[0]},r.endTime={data:n[1]};break;case 3:r.id=so(n[0]),r.startTime={type:\"getStartDate\",startData:n[1]},r.endTime={data:n[2]};}return r}(ja,e);n.raw.startTime=r.startTime,n.raw.endTime=r.endTime,n.id=r.id,n.prevTaskId=ja,n.active=r.active,n.done=r.done,n.crit=r.crit,n.milestone=r.milestone,n.order=Ja,Ja++;var i=co.push(n);ja=n.id,lo[n.id]=i-1;},findTaskById:uo,addTaskOrg:function(t,e){var n={section:Ga,type:Ga,description:t,task:t,classes:[]},r=function(t,e){var n=(\":\"===e.substr(0,1)?e.substr(1,e.length):e).split(\",\"),r={};yo(n,r,Xa);for(var a=0;a<n.length;a++)n[a]=n[a].trim();var o=\"\";switch(n.length){case 1:r.id=so(),r.startTime=t.endTime,o=n[0];break;case 2:r.id=so(),r.startTime=ro(0,za,n[0]),o=n[1];break;case 3:r.id=so(n[0]),r.startTime=ro(0,za,n[1]),o=n[2];}return o&&(r.endTime=ao(r.startTime,za,o,Qa),r.manualEndTime=i()(o,\"YYYY-MM-DD\",!0).isValid(),eo(r,za,Wa,$a)),r}(Pa,e);n.startTime=r.startTime,n.endTime=r.endTime,n.id=r.id,n.active=r.active,n.done=r.done,n.crit=r.crit,n.milestone=r.milestone,Pa=n,Va.push(n);},setIncludes:function(t){$a=t.toLowerCase().split(/[\\s,]+/);},getIncludes:function(){return $a},setExcludes:function(t){Wa=t.toLowerCase().split(/[\\s,]+/);},getExcludes:function(){return Wa},setClickEvent:function(t,e,n){t.split(\",\").forEach((function(t){!function(t,e,n){if(\"loose\"===Xt().securityLevel&&void 0!==e){var r=[];if(\"string\"==typeof n){r=n.split(/,(?=(?:(?:[^\"]*\"){2})*[^\"]*$)/);for(var i=0;i<r.length;i++){var a=r[i].trim();'\"'===a.charAt(0)&&'\"'===a.charAt(a.length-1)&&(a=a.substr(1,a.length-2)),r[i]=a;}}0===r.length&&r.push(t),void 0!==uo(t)&&po(t,(function(){var t;An.runFunc.apply(An,[e].concat(function(t){if(Array.isArray(t))return Ra(t)}(t=r)||function(t){if(\"undefined\"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t[\"@@iterator\"])return Array.from(t)}(t)||function(t,e){if(t){if(\"string\"==typeof t)return Ra(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return \"Object\"===n&&t.constructor&&(n=t.constructor.name),\"Map\"===n||\"Set\"===n?Array.from(t):\"Arguments\"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ra(t,e):void 0}}(t)||function(){throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\")}()));}));}}(t,e,n);})),fo(t,\"clickable\");},setLink:function(t,e){var n=e;\"loose\"!==Xt().securityLevel&&(n=(0, je.N)(e)),t.split(\",\").forEach((function(t){void 0!==uo(t)&&(po(t,(function(){window.open(n,\"_self\");})),qa[t]=n);})),fo(t,\"clickable\");},getLinks:function(){return qa},bindFunctions:function(t){Za.forEach((function(e){e(t);}));},durationToDate:io,isInvalidDate:to};function yo(t,e,n){for(var r=!0;r;)r=!1,n.forEach((function(n){var i=new RegExp(\"^\\\\s*\"+n+\"\\\\s*$\");t[0].match(i)&&(e[n]=!0,t.shift(1),r=!0);}));}var mo;const bo={setConf:function(){o.debug(\"Something is calling, setConf, remove the call\");},draw:function(t,e,n,r){var a,o=Xt().gantt,s=Xt().securityLevel;\"sandbox\"===s&&(a=(0, l.select)(\"#i\"+e));var c=\"sandbox\"===s?(0, l.select)(a.nodes()[0].contentDocument.body):(0, l.select)(\"body\"),u=\"sandbox\"===s?a.nodes()[0].contentDocument:document,h=u.getElementById(e);void 0===(mo=h.parentElement.offsetWidth)&&(mo=1200),void 0!==o.useWidth&&(mo=o.useWidth);var f=r.db.getTasks(),d=f.length*(o.barHeight+o.barGap)+2*o.topPadding;h.setAttribute(\"viewBox\",\"0 0 \"+mo+\" \"+d);for(var p=c.select('[id=\"'.concat(e,'\"]')),g=(0, l.scaleTime)().domain([(0, l.min)(f,(function(t){return t.startTime})),(0, l.max)(f,(function(t){return t.endTime}))]).rangeRound([0,mo-o.leftPadding-o.rightPadding]),y=[],m=0;m<f.length;m++)y.push(f[m].type);var b=y;y=function(t){for(var e={},n=[],r=0,i=t.length;r<i;++r)Object.prototype.hasOwnProperty.call(e,t[r])||(e[t[r]]=!0,n.push(t[r]));return n}(y),f.sort((function(t,e){var n=t.startTime,r=e.startTime,i=0;return n>r?i=1:n<r&&(i=-1),i})),function(t,n,a){var s=o.barHeight,c=s+o.barGap,h=o.topPadding,f=o.leftPadding;(0, l.scaleLinear)().domain([0,y.length]).range([\"#00B9FA\",\"#F95002\"]).interpolate(l.interpolateHcl),function(t,e,n,a,s,c,l,u){var h=c.reduce((function(t,e){var n=e.startTime;return t?Math.min(t,n):n}),0),f=c.reduce((function(t,e){var n=e.endTime;return t?Math.max(t,n):n}),0),d=r.db.getDateFormat();if(h&&f){for(var y=[],m=null,b=i()(h);b.valueOf()<=f;)r.db.isInvalidDate(b,d,l,u)?m?m.end=b.clone():m={start:b.clone(),end:b.clone()}:m&&(y.push(m),m=null),b.add(1,\"d\");p.append(\"g\").selectAll(\"rect\").data(y).enter().append(\"rect\").attr(\"id\",(function(t){return \"exclude-\"+t.start.format(\"YYYY-MM-DD\")})).attr(\"x\",(function(t){return g(t.start)+n})).attr(\"y\",o.gridLineStartPadding).attr(\"width\",(function(t){var e=t.end.clone().add(1,\"day\");return g(e)-g(t.start)})).attr(\"height\",s-e-o.gridLineStartPadding).attr(\"transform-origin\",(function(e,r){return (g(e.start)+n+.5*(g(e.end)-g(e.start))).toString()+\"px \"+(r*t+.5*s).toString()+\"px\"})).attr(\"class\",\"exclude-range\");}}(c,h,f,0,a,t,r.db.getExcludes(),r.db.getIncludes()),function(t,e,n,i){var a=(0, l.axisBottom)(g).tickSize(-i+e+o.gridLineStartPadding).tickFormat((0, l.timeFormat)(r.db.getAxisFormat()||o.axisFormat||\"%Y-%m-%d\"));if(p.append(\"g\").attr(\"class\",\"grid\").attr(\"transform\",\"translate(\"+t+\", \"+(i-50)+\")\").call(a).selectAll(\"text\").style(\"text-anchor\",\"middle\").attr(\"fill\",\"#000\").attr(\"stroke\",\"none\").attr(\"font-size\",10).attr(\"dy\",\"1em\"),r.db.topAxisEnabled()||o.topAxis){var s=(0, l.axisTop)(g).tickSize(-i+e+o.gridLineStartPadding).tickFormat((0, l.timeFormat)(r.db.getAxisFormat()||o.axisFormat||\"%Y-%m-%d\"));p.append(\"g\").attr(\"class\",\"grid\").attr(\"transform\",\"translate(\"+t+\", \"+e+\")\").call(s).selectAll(\"text\").style(\"text-anchor\",\"middle\").attr(\"fill\",\"#000\").attr(\"stroke\",\"none\").attr(\"font-size\",10);}}(f,h,0,a),function(t,n,i,a,s,c,u){p.append(\"g\").selectAll(\"rect\").data(t).enter().append(\"rect\").attr(\"x\",0).attr(\"y\",(function(t,e){return t.order*n+i-2})).attr(\"width\",(function(){return u-o.rightPadding/2})).attr(\"height\",n).attr(\"class\",(function(t){for(var e=0;e<y.length;e++)if(t.type===y[e])return \"section section\"+e%o.numberSectionStyles;return \"section section0\"}));var h=p.append(\"g\").selectAll(\"rect\").data(t).enter(),f=r.db.getLinks();if(h.append(\"rect\").attr(\"id\",(function(t){return t.id})).attr(\"rx\",3).attr(\"ry\",3).attr(\"x\",(function(t){return t.milestone?g(t.startTime)+a+.5*(g(t.endTime)-g(t.startTime))-.5*s:g(t.startTime)+a})).attr(\"y\",(function(t,e){return t.order*n+i})).attr(\"width\",(function(t){return t.milestone?s:g(t.renderEndTime||t.endTime)-g(t.startTime)})).attr(\"height\",s).attr(\"transform-origin\",(function(t,e){return e=t.order,(g(t.startTime)+a+.5*(g(t.endTime)-g(t.startTime))).toString()+\"px \"+(e*n+i+.5*s).toString()+\"px\"})).attr(\"class\",(function(t){var e=\"\";t.classes.length>0&&(e=t.classes.join(\" \"));for(var n=0,r=0;r<y.length;r++)t.type===y[r]&&(n=r%o.numberSectionStyles);var i=\"\";return t.active?t.crit?i+=\" activeCrit\":i=\" active\":t.done?i=t.crit?\" doneCrit\":\" done\":t.crit&&(i+=\" crit\"),0===i.length&&(i=\" task\"),t.milestone&&(i=\" milestone \"+i),\"task\"+(i+=n)+\" \"+e})),h.append(\"text\").attr(\"id\",(function(t){return t.id+\"-text\"})).text((function(t){return t.task})).attr(\"font-size\",o.fontSize).attr(\"x\",(function(t){var e=g(t.startTime),n=g(t.renderEndTime||t.endTime);t.milestone&&(e+=.5*(g(t.endTime)-g(t.startTime))-.5*s),t.milestone&&(n=e+s);var r=this.getBBox().width;return r>n-e?n+r+1.5*o.leftPadding>u?e+a-5:n+a+5:(n-e)/2+e+a})).attr(\"y\",(function(t,e){return t.order*n+o.barHeight/2+(o.fontSize/2-2)+i})).attr(\"text-height\",s).attr(\"class\",(function(t){var e=g(t.startTime),n=g(t.endTime);t.milestone&&(n=e+s);var r=this.getBBox().width,i=\"\";t.classes.length>0&&(i=t.classes.join(\" \"));for(var a=0,c=0;c<y.length;c++)t.type===y[c]&&(a=c%o.numberSectionStyles);var l=\"\";return t.active&&(l=t.crit?\"activeCritText\"+a:\"activeText\"+a),t.done?l=t.crit?l+\" doneCritText\"+a:l+\" doneText\"+a:t.crit&&(l=l+\" critText\"+a),t.milestone&&(l+=\" milestoneText\"),r>n-e?n+r+1.5*o.leftPadding>u?i+\" taskTextOutsideLeft taskTextOutside\"+a+\" \"+l:i+\" taskTextOutsideRight taskTextOutside\"+a+\" \"+l+\" width-\"+r:i+\" taskText taskText\"+a+\" \"+l+\" width-\"+r})),\"sandbox\"===Xt().securityLevel){var d;d=(0, l.select)(\"#i\"+e),(0, l.select)(d.nodes()[0].contentDocument.body);var m=d.nodes()[0].contentDocument;h.filter((function(t){return void 0!==f[t.id]})).each((function(t){var e=m.querySelector(\"#\"+t.id),n=m.querySelector(\"#\"+t.id+\"-text\"),r=e.parentNode,i=m.createElement(\"a\");i.setAttribute(\"xlink:href\",f[t.id]),i.setAttribute(\"target\",\"_top\"),r.appendChild(i),i.appendChild(e),i.appendChild(n);}));}}(t,c,h,f,s,0,n),function(t,e){for(var n=[],r=0,i=0;i<y.length;i++)n[i]=[y[i],(a=y[i],s=b,function(t){for(var e=t.length,n={};e;)n[t[--e]]=(n[t[e]]||0)+1;return n}(s)[a]||0)];var a,s;p.append(\"g\").selectAll(\"text\").data(n).enter().append((function(t){var e=t[0].split(ue.lineBreakRegex),n=-(e.length-1)/2,r=u.createElementNS(\"http://www.w3.org/2000/svg\",\"text\");r.setAttribute(\"dy\",n+\"em\");for(var i=0;i<e.length;i++){var a=u.createElementNS(\"http://www.w3.org/2000/svg\",\"tspan\");a.setAttribute(\"alignment-baseline\",\"central\"),a.setAttribute(\"x\",\"10\"),i>0&&a.setAttribute(\"dy\",\"1em\"),a.textContent=e[i],r.appendChild(a);}return r})).attr(\"x\",10).attr(\"y\",(function(i,a){if(!(a>0))return i[1]*t/2+e;for(var o=0;o<a;o++)return r+=n[a-1][1],i[1]*t/2+r*t+e})).attr(\"font-size\",o.sectionFontSize).attr(\"font-size\",o.sectionFontSize).attr(\"class\",(function(t){for(var e=0;e<y.length;e++)if(t[0]===y[e])return \"sectionTitle sectionTitle\"+e%o.numberSectionStyles;return \"sectionTitle\"}));}(c,h),function(t,e,n,i){var a=r.db.getTodayMarker();if(\"off\"!==a){var s=p.append(\"g\").attr(\"class\",\"today\"),c=new Date,l=s.append(\"line\");l.attr(\"x1\",g(c)+t).attr(\"x2\",g(c)+t).attr(\"y1\",o.titleTopMargin).attr(\"y2\",i-o.titleTopMargin).attr(\"class\",\"today\"),\"\"!==a&&l.attr(\"style\",a.replace(/,/g,\";\"));}}(f,0,0,a);}(f,mo,d),Tn(p,0,mo,o.useMaxWidth),p.append(\"text\").text(r.db.getDiagramTitle()).attr(\"x\",mo/2).attr(\"y\",o.titleTopMargin).attr(\"class\",\"titleText\"),Mn(r.db,p,e);}};var vo=n(9959),_o=n.n(vo),xo=\"\",ko=!1;const wo={setMessage:function(t){o.debug(\"Setting message to: \"+t),xo=t;},getMessage:function(){return xo},setInfo:function(t){ko=t;},getInfo:function(){return ko}},To={draw:function(t,e,n,r){try{o.debug(\"Renering info diagram\\n\"+t);var i,a=Xt().securityLevel;\"sandbox\"===a&&(i=(0,l.select)(\"#i\"+e));var s=\"sandbox\"===a?(0,l.select)(i.nodes()[0].contentDocument.body):(0,l.select)(\"body\"),c=(\"sandbox\"===a?i.nodes()[0].contentDocument:document,s.select(\"#\"+e));c.append(\"g\").append(\"text\").attr(\"x\",100).attr(\"y\",40).attr(\"class\",\"version\").attr(\"font-size\",\"32px\").style(\"text-anchor\",\"middle\").text(\"v \"+n),c.attr(\"height\",100),c.attr(\"width\",400);}catch(t){o.error(\"Error while rendering info diagram\"),o.error(t.message);}}};var Eo=n(6765),Co=n.n(Eo),So=n(7062),Ao=n.n(So),Mo={},No=!1;const Oo={parseDirective:function(t,e,n){cu.parseDirective(this,t,e,n);},getConfig:function(){return Xt().pie},addSection:function(t,e){t=ue.sanitizeText(t,Xt()),void 0===Mo[t]&&(Mo[t]=e,o.debug(\"Added new section :\",t));},getSections:function(){return Mo},cleanupValue:function(t){return \":\"===t.substring(0,1)?(t=t.substring(1).trim(),Number(t.trim())):Number(t.trim())},clear:function(){Mo={},No=!1,ge();},setAccTitle:ye,getAccTitle:me,setDiagramTitle:_e,getDiagramTitle:xe,setShowData:function(t){No=t;},getShowData:function(){return No},getAccDescription:ve,setAccDescription:be};var Do,Bo=Xt();const Lo={draw:function(t,e,n,r){try{Bo=Xt(),o.debug(\"Rendering info diagram\\n\"+t);var i,a=Xt().securityLevel;\"sandbox\"===a&&(i=(0,l.select)(\"#i\"+e));var s=\"sandbox\"===a?(0,l.select)(i.nodes()[0].contentDocument.body):(0,l.select)(\"body\"),c=\"sandbox\"===a?i.nodes()[0].contentDocument:document;r.db.clear(),r.parser.parse(t),o.debug(\"Parsed info diagram\");var u=c.getElementById(e);void 0===(Do=u.parentElement.offsetWidth)&&(Do=1200),void 0!==Bo.useWidth&&(Do=Bo.useWidth),void 0!==Bo.pie.useWidth&&(Do=Bo.pie.useWidth);var h=s.select(\"#\"+e);Tn(h,0,Do,Bo.pie.useMaxWidth),Mn(r.db,h,e),u.setAttribute(\"viewBox\",\"0 0 \"+Do+\" 450\");var f=Math.min(Do,450)/2-40,d=h.append(\"g\").attr(\"transform\",\"translate(\"+Do/2+\",225)\"),p=r.db.getSections(),g=0;Object.keys(p).forEach((function(t){g+=p[t];}));var y=Bo.themeVariables,m=[y.pie1,y.pie2,y.pie3,y.pie4,y.pie5,y.pie6,y.pie7,y.pie8,y.pie9,y.pie10,y.pie11,y.pie12],b=(0,l.scaleOrdinal)().range(m),v=(0,l.pie)().value((function(t){return t[1]}))(Object.entries(p)),_=(0,l.arc)().innerRadius(0).outerRadius(f);d.selectAll(\"mySlices\").data(v).enter().append(\"path\").attr(\"d\",_).attr(\"fill\",(function(t){return b(t.data[0])})).attr(\"class\",\"pieCircle\"),d.selectAll(\"mySlices\").data(v).enter().append(\"text\").text((function(t){return (t.data[1]/g*100).toFixed(0)+\"%\"})).attr(\"transform\",(function(t){return \"translate(\"+_.centroid(t)+\")\"})).style(\"text-anchor\",\"middle\").attr(\"class\",\"slice\"),d.append(\"text\").text(r.db.getDiagramTitle()).attr(\"x\",0).attr(\"y\",-200).attr(\"class\",\"pieTitleText\");var x=d.selectAll(\".legend\").data(b.domain()).enter().append(\"g\").attr(\"class\",\"legend\").attr(\"transform\",(function(t,e){return \"translate(216,\"+(22*e-22*b.domain().length/2)+\")\"}));x.append(\"rect\").attr(\"width\",18).attr(\"height\",18).style(\"fill\",b).style(\"stroke\",b),x.data(v).append(\"text\").attr(\"x\",22).attr(\"y\",14).text((function(t){return r.db.getShowData()||Bo.showData||Bo.pie.showData?t.data[0]+\" [\"+t.data[1]+\"]\":t.data[0]}));}catch(t){o.error(\"Error while rendering info diagram\"),o.error(t);}}};var Io=n(3176),Fo=n.n(Io),Ro=[],Po={},jo={},zo={},Yo={};const Uo={RequirementType:{REQUIREMENT:\"Requirement\",FUNCTIONAL_REQUIREMENT:\"Functional Requirement\",INTERFACE_REQUIREMENT:\"Interface Requirement\",PERFORMANCE_REQUIREMENT:\"Performance Requirement\",PHYSICAL_REQUIREMENT:\"Physical Requirement\",DESIGN_CONSTRAINT:\"Design Constraint\"},RiskLevel:{LOW_RISK:\"Low\",MED_RISK:\"Medium\",HIGH_RISK:\"High\"},VerifyType:{VERIFY_ANALYSIS:\"Analysis\",VERIFY_DEMONSTRATION:\"Demonstration\",VERIFY_INSPECTION:\"Inspection\",VERIFY_TEST:\"Test\"},Relationships:{CONTAINS:\"contains\",COPIES:\"copies\",DERIVES:\"derives\",SATISFIES:\"satisfies\",VERIFIES:\"verifies\",REFINES:\"refines\",TRACES:\"traces\"},parseDirective:function(t,e,n){cu.parseDirective(this,t,e,n);},getConfig:function(){return Xt().req},addRequirement:function(t,e){return void 0===jo[t]&&(jo[t]={name:t,type:e,id:Po.id,text:Po.text,risk:Po.risk,verifyMethod:Po.verifyMethod}),Po={},jo[t]},getRequirements:function(){return jo},setNewReqId:function(t){void 0!==Po&&(Po.id=t);},setNewReqText:function(t){void 0!==Po&&(Po.text=t);},setNewReqRisk:function(t){void 0!==Po&&(Po.risk=t);},setNewReqVerifyMethod:function(t){void 0!==Po&&(Po.verifyMethod=t);},setAccTitle:ye,getAccTitle:me,setAccDescription:be,getAccDescription:ve,addElement:function(t){return void 0===Yo[t]&&(Yo[t]={name:t,type:zo.type,docRef:zo.docRef},o.info(\"Added new requirement: \",t)),zo={},Yo[t]},getElements:function(){return Yo},setNewElementType:function(t){void 0!==zo&&(zo.type=t);},setNewElementDocRef:function(t){void 0!==zo&&(zo.docRef=t);},addRelationship:function(t,e,n){Ro.push({type:t,src:e,dst:n});},getRelationships:function(){return Ro},clear:function(){Ro=[],Po={},jo={},zo={},Yo={},ge();}};var $o={CONTAINS:\"contains\",ARROW:\"arrow\"};const Wo=$o;var qo={},Ho=0,Vo=function(t,e){return t.insert(\"rect\",\"#\"+e).attr(\"class\",\"req reqBox\").attr(\"x\",0).attr(\"y\",0).attr(\"width\",qo.rect_min_width+\"px\").attr(\"height\",qo.rect_min_height+\"px\")},Go=function(t,e,n){var r=qo.rect_min_width/2,i=t.append(\"text\").attr(\"class\",\"req reqLabel reqTitle\").attr(\"id\",e).attr(\"x\",r).attr(\"y\",qo.rect_padding).attr(\"dominant-baseline\",\"hanging\"),a=0;n.forEach((function(t){0==a?i.append(\"tspan\").attr(\"text-anchor\",\"middle\").attr(\"x\",qo.rect_min_width/2).attr(\"dy\",0).text(t):i.append(\"tspan\").attr(\"text-anchor\",\"middle\").attr(\"x\",qo.rect_min_width/2).attr(\"dy\",.75*qo.line_height).text(t),a++;}));var o=1.5*qo.rect_padding+a*qo.line_height*.75;return t.append(\"line\").attr(\"class\",\"req-title-line\").attr(\"x1\",\"0\").attr(\"x2\",qo.rect_min_width).attr(\"y1\",o).attr(\"y2\",o),{titleNode:i,y:o}},Xo=function(t,e,n,r){var i=t.append(\"text\").attr(\"class\",\"req reqLabel\").attr(\"id\",e).attr(\"x\",qo.rect_padding).attr(\"y\",r).attr(\"dominant-baseline\",\"hanging\"),a=0,o=[];return n.forEach((function(t){for(var e=t.length;e>30&&a<3;){var n=t.substring(0,30);e=(t=t.substring(30,t.length)).length,o[o.length]=n,a++;}if(3==a){var r=o[o.length-1];o[o.length-1]=r.substring(0,r.length-4)+\"...\";}else o[o.length]=t;a=0;})),o.forEach((function(t){i.append(\"tspan\").attr(\"x\",qo.rect_padding).attr(\"dy\",qo.line_height).text(t);})),i},Zo=function(t){return t.replace(/\\s/g,\"\").replace(/\\./g,\"_\")};const Qo={draw:function(t,e,n,r){qo=Xt().requirement,r.db.clear(),r.parser.parse(t);var i,a=qo.securityLevel;\"sandbox\"===a&&(i=(0, l.select)(\"#i\"+e));var s=\"sandbox\"===a?(0, l.select)(i.nodes()[0].contentDocument.body):(0, l.select)(\"body\"),c=(\"sandbox\"===a?i.nodes()[0].contentDocument:document,s.select(\"[id='\".concat(e,\"']\")));!function(t,e){var n=t.append(\"defs\").append(\"marker\").attr(\"id\",$o.CONTAINS+\"_line_ending\").attr(\"refX\",0).attr(\"refY\",e.line_height/2).attr(\"markerWidth\",e.line_height).attr(\"markerHeight\",e.line_height).attr(\"orient\",\"auto\").append(\"g\");n.append(\"circle\").attr(\"cx\",e.line_height/2).attr(\"cy\",e.line_height/2).attr(\"r\",e.line_height/2).attr(\"fill\",\"none\"),n.append(\"line\").attr(\"x1\",0).attr(\"x2\",e.line_height).attr(\"y1\",e.line_height/2).attr(\"y2\",e.line_height/2).attr(\"stroke-width\",1),n.append(\"line\").attr(\"y1\",0).attr(\"y2\",e.line_height).attr(\"x1\",e.line_height/2).attr(\"x2\",e.line_height/2).attr(\"stroke-width\",1),t.append(\"defs\").append(\"marker\").attr(\"id\",$o.ARROW+\"_line_ending\").attr(\"refX\",e.line_height).attr(\"refY\",.5*e.line_height).attr(\"markerWidth\",e.line_height).attr(\"markerHeight\",e.line_height).attr(\"orient\",\"auto\").append(\"path\").attr(\"d\",\"M0,0\\n      L\".concat(e.line_height,\",\").concat(e.line_height/2,\"\\n      M\").concat(e.line_height,\",\").concat(e.line_height/2,\"\\n      L0,\").concat(e.line_height)).attr(\"stroke-width\",1);}(c,qo);var u,h,f,d=new(yr().Graph)({multigraph:!1,compound:!1,directed:!0}).setGraph({rankdir:qo.layoutDirection,marginx:20,marginy:20,nodesep:100,edgesep:100,ranksep:100}).setDefaultEdgeLabel((function(){return {}})),p=r.db.getRequirements(),g=r.db.getElements(),y=r.db.getRelationships();u=p,h=d,f=c,Object.keys(u).forEach((function(t){var e=u[t];t=Zo(t),o.info(\"Added new requirement: \",t);var n=f.append(\"g\").attr(\"id\",t),r=Vo(n,\"req-\"+t),a=Go(n,t+\"_title\",[\"<<\".concat(e.type,\">>\"),\"\".concat(e.name)]);var s=Xo(n,t+\"_body\",[\"Id: \".concat(e.id),\"Text: \".concat(e.text),\"Risk: \".concat(e.risk),\"Verification: \".concat(e.verifyMethod)],a.y);var c=r.node().getBBox();h.setNode(t,{width:c.width,height:c.height,shape:\"rect\",id:t});})),function(t,e,n){Object.keys(t).forEach((function(r){var i=t[r],a=Zo(r),o=n.append(\"g\").attr(\"id\",a),s=\"element-\"+a,c=Vo(o,s),u=Go(o,s+\"_title\",[\"<<Element>>\",\"\".concat(r)]);var h=Xo(o,s+\"_body\",[\"Type: \".concat(i.type||\"Not Specified\"),\"Doc Ref: \".concat(i.docRef||\"None\")],u.y);var f=c.node().getBBox();e.setNode(a,{width:f.width,height:f.height,shape:\"rect\",id:a});}));}(g,d,c),function(t,e){t.forEach((function(t){var n=Zo(t.src),r=Zo(t.dst);e.setEdge(n,r,{relationship:t});}));}(y,d),pr().layout(d),function(t,e){e.nodes().forEach((function(n){void 0!==n&&void 0!==e.node(n)&&(t.select(\"#\"+n),t.select(\"#\"+n).attr(\"transform\",\"translate(\"+(e.node(n).x-e.node(n).width/2)+\",\"+(e.node(n).y-e.node(n).height/2)+\" )\"));}));}(c,d),y.forEach((function(t){!function(t,e,n,r,i){var a=n.edge(Zo(e.src),Zo(e.dst)),o=(0, l.line)().x((function(t){return t.x})).y((function(t){return t.y})),s=t.insert(\"path\",\"#\"+r).attr(\"class\",\"er relationshipLine\").attr(\"d\",o(a.points)).attr(\"fill\",\"none\");e.type==i.db.Relationships.CONTAINS?s.attr(\"marker-start\",\"url(\"+ue.getUrl(qo.arrowMarkerAbsolute)+\"#\"+e.type+\"_line_ending)\"):(s.attr(\"stroke-dasharray\",\"10,7\"),s.attr(\"marker-end\",\"url(\"+ue.getUrl(qo.arrowMarkerAbsolute)+\"#\"+Wo.ARROW+\"_line_ending)\")),function(t,e,n,r){var i=e.node().getTotalLength(),a=e.node().getPointAtLength(.5*i),o=\"rel\"+Ho;Ho++;var s=t.append(\"text\").attr(\"class\",\"req relationshipLabel\").attr(\"id\",o).attr(\"x\",a.x).attr(\"y\",a.y).attr(\"text-anchor\",\"middle\").attr(\"dominant-baseline\",\"middle\").text(r).node().getBBox();t.insert(\"rect\",\"#\"+o).attr(\"class\",\"req reqLabelBox\").attr(\"x\",a.x-s.width/2).attr(\"y\",a.y-s.height/2).attr(\"width\",s.width).attr(\"height\",s.height).attr(\"fill\",\"white\").attr(\"fill-opacity\",\"85%\");}(t,s,0,\"<<\".concat(e.type,\">>\"));}(c,t,d,e,r);}));var m=qo.rect_padding,b=c.node().getBBox(),v=b.width+2*m,_=b.height+2*m;Tn(c,0,v,qo.useMaxWidth),c.attr(\"viewBox\",\"\".concat(b.x-m,\" \").concat(b.y-m,\" \").concat(v,\" \").concat(_)),Mn(r.db,c,e);}};var Ko,Jo=n(6876),ts=n.n(Jo),es=void 0,ns={},rs=[],as=!1,os=function(t,e,n,r){var i=ns[t];i&&e===i.name&&null==n||(null!=n&&null!=n.text||(n={text:e,wrap:null,type:r}),null!=r&&null!=n.text||(n={text:e,wrap:null,type:r}),ns[t]={name:e,description:n.text,wrap:void 0===n.wrap&&us()||!!n.wrap,prevActor:es,links:{},properties:{},actorCnt:null,rectData:null,type:r||\"participant\"},es&&ns[es]&&(ns[es].nextActor=t),es=t);},ss=function(t){var e,n=0;for(e=0;e<rs.length;e++)rs[e].type===hs.ACTIVE_START&&rs[e].from.actor===t&&n++,rs[e].type===hs.ACTIVE_END&&rs[e].from.actor===t&&n--;return n},cs=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{text:void 0,wrap:void 0},r=arguments.length>3?arguments[3]:void 0;if(r===hs.ACTIVE_END){var i=ss(t.actor);if(i<1){var a=new Error(\"Trying to inactivate an inactive participant (\"+t.actor+\")\");throw a.hash={text:\"->>-\",token:\"->>-\",line:\"1\",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:[\"'ACTIVE_PARTICIPANT'\"]},a}}return rs.push({from:t,to:e,message:n.text,wrap:void 0===n.wrap&&us()||!!n.wrap,type:r}),!0},ls=function(t){return ns[t]},us=function(){return void 0!==Ko?Ko:Xt().sequence.wrap},hs={SOLID:0,DOTTED:1,NOTE:2,SOLID_CROSS:3,DOTTED_CROSS:4,SOLID_OPEN:5,DOTTED_OPEN:6,LOOP_START:10,LOOP_END:11,ALT_START:12,ALT_ELSE:13,ALT_END:14,OPT_START:15,OPT_END:16,ACTIVE_START:17,ACTIVE_END:18,PAR_START:19,PAR_AND:20,PAR_END:21,RECT_START:22,RECT_END:23,SOLID_POINT:24,DOTTED_POINT:25,AUTONUMBER:26,CRITICAL_START:27,CRITICAL_OPTION:28,CRITICAL_END:29,BREAK_START:30,BREAK_END:31},fs=function(t,e,n){var r={actor:t,placement:e,message:n.text,wrap:void 0===n.wrap&&us()||!!n.wrap},i=[].concat(t,t);rs.push({from:i[0],to:i[1],message:n.text,wrap:void 0===n.wrap&&us()||!!n.wrap,type:hs.NOTE,placement:e});},ds=function(t,e){var n=ls(t);try{var r=ie(e.text,Xt());r=(r=r.replace(/&amp;/g,\"&\")).replace(/&equals;/g,\"=\"),ps(n,JSON.parse(r));}catch(t){o.error(\"error while parsing actor link text\",t);}};function ps(t,e){if(null==t.links)t.links=e;else for(var n in e)t.links[n]=e[n];}var gs=function(t,e){var n=ls(t);try{var r=ie(e.text,Xt());ys(n,JSON.parse(r));}catch(t){o.error(\"error while parsing actor properties text\",t);}};function ys(t,e){if(null==t.properties)t.properties=e;else for(var n in e)t.properties[n]=e[n];}var ms=function(t,e){var n=ls(t),r=document.getElementById(e.text);try{var i=r.innerHTML,a=JSON.parse(i);a.properties&&ys(n,a.properties),a.links&&ps(n,a.links);}catch(t){o.error(\"error while parsing actor details text\",t);}};const bs={addActor:os,addMessage:function(t,e,n,r){rs.push({from:t,to:e,message:n.text,wrap:void 0===n.wrap&&us()||!!n.wrap,answer:r});},addSignal:cs,addLinks:ds,addDetails:ms,addProperties:gs,autoWrap:us,setWrap:function(t){Ko=t;},enableSequenceNumbers:function(){as=!0;},disableSequenceNumbers:function(){as=!1;},showSequenceNumbers:function(){return as},getMessages:function(){return rs},getActors:function(){return ns},getActor:ls,getActorKeys:function(){return Object.keys(ns)},getActorProperty:function(t,e){if(void 0!==t&&void 0!==t.properties)return t.properties[e]},getAccTitle:me,getDiagramTitle:xe,setDiagramTitle:_e,parseDirective:function(t,e,n){cu.parseDirective(this,t,e,n);},getConfig:function(){return Xt().sequence},clear:function(){ns={},rs=[],as=!1,ge();},parseMessage:function(t){var e=t.trim(),n={text:e.replace(/^[:]?(?:no)?wrap:/,\"\").trim(),wrap:null!==e.match(/^[:]?wrap:/)||null===e.match(/^[:]?nowrap:/)&&void 0};return o.debug(\"parseMessage:\",n),n},LINETYPE:hs,ARROWTYPE:{FILLED:0,OPEN:1},PLACEMENT:{LEFTOF:0,RIGHTOF:1,OVER:2},addNote:fs,setAccTitle:ye,apply:function t(e){if(e instanceof Array)e.forEach((function(e){t(e);}));else switch(e.type){case\"sequenceIndex\":rs.push({from:void 0,to:void 0,message:{start:e.sequenceIndex,step:e.sequenceIndexStep,visible:e.sequenceVisible},wrap:!1,type:e.signalType});break;case\"addParticipant\":os(e.actor,e.actor,e.description,\"participant\");break;case\"addActor\":os(e.actor,e.actor,e.description,\"actor\");break;case\"activeStart\":case\"activeEnd\":cs(e.actor,void 0,void 0,e.signalType);break;case\"addNote\":fs(e.actor,e.placement,e.text);break;case\"addLinks\":ds(e.actor,e.text);break;case\"addALink\":!function(t,e){var n=ls(t);try{var r={},i=ie(e.text,Xt()),a=i.indexOf(\"@\"),s=(i=(i=i.replace(/&amp;/g,\"&\")).replace(/&equals;/g,\"=\")).slice(0,a-1).trim(),c=i.slice(a+1).trim();r[s]=c,ps(n,r);}catch(t){o.error(\"error while parsing actor link text\",t);}}(e.actor,e.text);break;case\"addProperties\":gs(e.actor,e.text);break;case\"addDetails\":ms(e.actor,e.text);break;case\"addMessage\":cs(e.from,e.to,e.msg,e.signalType);break;case\"loopStart\":cs(void 0,void 0,e.loopText,e.signalType);break;case\"loopEnd\":case\"rectEnd\":case\"optEnd\":case\"altEnd\":case\"parEnd\":case\"criticalEnd\":case\"breakEnd\":cs(void 0,void 0,void 0,e.signalType);break;case\"rectStart\":cs(void 0,void 0,e.color,e.signalType);break;case\"optStart\":cs(void 0,void 0,e.optText,e.signalType);break;case\"altStart\":case\"else\":cs(void 0,void 0,e.altText,e.signalType);break;case\"setAccTitle\":ye(e.text);break;case\"parStart\":case\"and\":cs(void 0,void 0,e.parText,e.signalType);break;case\"criticalStart\":cs(void 0,void 0,e.criticalText,e.signalType);break;case\"option\":cs(void 0,void 0,e.optionText,e.signalType);break;case\"breakStart\":cs(void 0,void 0,e.breakText,e.signalType);}},setAccDescription:be,getAccDescription:ve};var vs=[],_s=function(t,e){var n=t.append(\"rect\");return n.attr(\"x\",e.x),n.attr(\"y\",e.y),n.attr(\"fill\",e.fill),n.attr(\"stroke\",e.stroke),n.attr(\"width\",e.width),n.attr(\"height\",e.height),n.attr(\"rx\",e.rx),n.attr(\"ry\",e.ry),void 0!==e.class&&n.attr(\"class\",e.class),n},xs=function(t,e){var n;n=function(){var n=document.querySelectorAll(t);0!==n.length&&(n[0].addEventListener(\"mouseover\",(function(){Ts(\"actor\"+e+\"_popup\");})),n[0].addEventListener(\"mouseout\",(function(){Es(\"actor\"+e+\"_popup\");})));},vs.push(n);},ks=function(t,e,n,r){var i=t.append(\"image\");i.attr(\"x\",e),i.attr(\"y\",n);var a=(0, je.N)(r);i.attr(\"xlink:href\",a);},ws=function(t,e,n,r){var i=t.append(\"use\");i.attr(\"x\",e),i.attr(\"y\",n);var a=(0, je.N)(r);i.attr(\"xlink:href\",\"#\"+a);},Ts=function(t){var e=document.getElementById(t);null!=e&&(e.style.display=\"block\");},Es=function(t){var e=document.getElementById(t);null!=e&&(e.style.display=\"none\");},Cs=function(t,e){var n=0,r=0,i=e.text.split(ue.lineBreakRegex),a=[],o=0,s=function(){return e.y};if(void 0!==e.valign&&void 0!==e.textMargin&&e.textMargin>0)switch(e.valign){case\"top\":case\"start\":s=function(){return Math.round(e.y+e.textMargin)};break;case\"middle\":case\"center\":s=function(){return Math.round(e.y+(n+r+e.textMargin)/2)};break;case\"bottom\":case\"end\":s=function(){return Math.round(e.y+(n+r+2*e.textMargin)-e.textMargin)};}if(void 0!==e.anchor&&void 0!==e.textMargin&&void 0!==e.width)switch(e.anchor){case\"left\":case\"start\":e.x=Math.round(e.x+e.textMargin),e.anchor=\"start\",e.dominantBaseline=\"middle\",e.alignmentBaseline=\"middle\";break;case\"middle\":case\"center\":e.x=Math.round(e.x+e.width/2),e.anchor=\"middle\",e.dominantBaseline=\"middle\",e.alignmentBaseline=\"middle\";break;case\"right\":case\"end\":e.x=Math.round(e.x+e.width-e.textMargin),e.anchor=\"end\",e.dominantBaseline=\"middle\",e.alignmentBaseline=\"middle\";}for(var c=0;c<i.length;c++){var l=i[c];void 0!==e.textMargin&&0===e.textMargin&&void 0!==e.fontSize&&(o=c*e.fontSize);var u=t.append(\"text\");if(u.attr(\"x\",e.x),u.attr(\"y\",s()),void 0!==e.anchor&&u.attr(\"text-anchor\",e.anchor).attr(\"dominant-baseline\",e.dominantBaseline).attr(\"alignment-baseline\",e.alignmentBaseline),void 0!==e.fontFamily&&u.style(\"font-family\",e.fontFamily),void 0!==e.fontSize&&u.style(\"font-size\",e.fontSize),void 0!==e.fontWeight&&u.style(\"font-weight\",e.fontWeight),void 0!==e.fill&&u.attr(\"fill\",e.fill),void 0!==e.class&&u.attr(\"class\",e.class),void 0!==e.dy?u.attr(\"dy\",e.dy):0!==o&&u.attr(\"dy\",o),e.tspan){var h=u.append(\"tspan\");h.attr(\"x\",e.x),void 0!==e.fill&&h.attr(\"fill\",e.fill),h.text(l);}else u.text(l);void 0!==e.valign&&void 0!==e.textMargin&&e.textMargin>0&&(r+=(u._groups||u)[0][0].getBBox().height,n=r),a.push(u);}return a},Ss=function(t,e){var n=t.append(\"polygon\");return n.attr(\"points\",function(t,e,n,r,i){return t+\",\"+e+\" \"+(t+n)+\",\"+e+\" \"+(t+n)+\",\"+(e+r-7)+\" \"+(t+n-8.4)+\",\"+(e+r)+\" \"+t+\",\"+(e+r)}(e.x,e.y,e.width,e.height)),n.attr(\"class\",\"labelBox\"),e.y=e.y+e.height/2,Cs(t,e),n},As=-1,Ms=function(t,e){t.selectAll&&t.selectAll(\".actor-line\").attr(\"class\",\"200\").attr(\"y2\",e-55);},Ns=function(){return {x:0,y:0,fill:void 0,anchor:void 0,style:\"#666\",width:void 0,height:void 0,textMargin:0,rx:0,ry:0,tspan:!0,valign:void 0}},Os=function(){return {x:0,y:0,fill:\"#EDF2AE\",stroke:\"#666\",width:100,anchor:\"start\",height:100,rx:0,ry:0}},Ds=function(){function t(t,e,n,i,a,o,s){r(e.append(\"text\").attr(\"x\",n+a/2).attr(\"y\",i+o/2+5).style(\"text-anchor\",\"middle\").text(t),s);}function e(t,e,n,i,a,o,s,c){for(var l=c.actorFontSize,u=c.actorFontFamily,h=c.actorFontWeight,f=l&&l.replace?l.replace(\"px\",\"\"):l,d=t.split(ue.lineBreakRegex),p=0;p<d.length;p++){var g=p*f-f*(d.length-1)/2,y=e.append(\"text\").attr(\"x\",n+a/2).attr(\"y\",i).style(\"text-anchor\",\"middle\").style(\"font-size\",l).style(\"font-weight\",h).style(\"font-family\",u);y.append(\"tspan\").attr(\"x\",n+a/2).attr(\"dy\",g).text(d[p]),y.attr(\"y\",i+o/2).attr(\"dominant-baseline\",\"central\").attr(\"alignment-baseline\",\"central\"),r(y,s);}}function n(t,n,i,a,o,s,c,l){var u=n.append(\"switch\"),h=u.append(\"foreignObject\").attr(\"x\",i).attr(\"y\",a).attr(\"width\",o).attr(\"height\",s).append(\"xhtml:div\").style(\"display\",\"table\").style(\"height\",\"100%\").style(\"width\",\"100%\");h.append(\"div\").style(\"display\",\"table-cell\").style(\"text-align\",\"center\").style(\"vertical-align\",\"middle\").text(t),e(t,u,i,a,o,s,c,l),r(h,c);}function r(t,e){for(var n in e)e.hasOwnProperty(n)&&t.attr(n,e[n]);}return function(r){return \"fo\"===r.textPlacement?n:\"old\"===r.textPlacement?t:e}}(),Bs=function(){function t(t,e,n,i,a,o,s){r(e.append(\"text\").attr(\"x\",n).attr(\"y\",i).style(\"text-anchor\",\"start\").text(t),s);}function e(t,e,n,i,a,o,s,c){for(var l=c.actorFontSize,u=c.actorFontFamily,h=c.actorFontWeight,f=t.split(ue.lineBreakRegex),d=0;d<f.length;d++){var p=d*l-l*(f.length-1)/2,g=e.append(\"text\").attr(\"x\",n).attr(\"y\",i).style(\"text-anchor\",\"start\").style(\"font-size\",l).style(\"font-weight\",h).style(\"font-family\",u);g.append(\"tspan\").attr(\"x\",n).attr(\"dy\",p).text(f[d]),g.attr(\"y\",i+o/2).attr(\"dominant-baseline\",\"central\").attr(\"alignment-baseline\",\"central\"),r(g,s);}}function n(t,n,i,a,o,s,c,l){var u=n.append(\"switch\"),h=u.append(\"foreignObject\").attr(\"x\",i).attr(\"y\",a).attr(\"width\",o).attr(\"height\",s).append(\"xhtml:div\").style(\"display\",\"table\").style(\"height\",\"100%\").style(\"width\",\"100%\");h.append(\"div\").style(\"display\",\"table-cell\").style(\"text-align\",\"center\").style(\"vertical-align\",\"middle\").text(t),e(t,u,i,a,0,s,c,l),r(h,c);}function r(t,e){for(var n in e)e.hasOwnProperty(n)&&t.attr(n,e[n]);}return function(r){return \"fo\"===r.textPlacement?n:\"old\"===r.textPlacement?t:e}}();const Ls=_s,Is=function(t,e,n){switch(e.type){case\"actor\":return function(t,e,n){var r=e.x+e.width/2;0===e.y&&(As++,t.append(\"line\").attr(\"id\",\"actor\"+As).attr(\"x1\",r).attr(\"y1\",80).attr(\"x2\",r).attr(\"y2\",2e3).attr(\"class\",\"actor-line\").attr(\"stroke-width\",\"0.5px\").attr(\"stroke\",\"#999\"));var i=t.append(\"g\");i.attr(\"class\",\"actor-man\");var a={x:0,y:0,fill:\"#EDF2AE\",stroke:\"#666\",width:100,anchor:\"start\",height:100,rx:0,ry:0};a.x=e.x,a.y=e.y,a.fill=\"#eaeaea\",a.width=e.width,a.height=e.height,a.class=\"actor\",a.rx=3,a.ry=3,i.append(\"line\").attr(\"id\",\"actor-man-torso\"+As).attr(\"x1\",r).attr(\"y1\",e.y+25).attr(\"x2\",r).attr(\"y2\",e.y+45),i.append(\"line\").attr(\"id\",\"actor-man-arms\"+As).attr(\"x1\",r-18).attr(\"y1\",e.y+33).attr(\"x2\",r+18).attr(\"y2\",e.y+33),i.append(\"line\").attr(\"x1\",r-18).attr(\"y1\",e.y+60).attr(\"x2\",r).attr(\"y2\",e.y+45),i.append(\"line\").attr(\"x1\",r).attr(\"y1\",e.y+45).attr(\"x2\",r+16).attr(\"y2\",e.y+60);var o=i.append(\"circle\");o.attr(\"cx\",e.x+e.width/2),o.attr(\"cy\",e.y+10),o.attr(\"r\",15),o.attr(\"width\",e.width),o.attr(\"height\",e.height);var s=i.node().getBBox();return e.height=s.height,Ds(n)(e.description,i,a.x,a.y+35,a.width,a.height,{class:\"actor\"},n),e.height}(t,e,n);case\"participant\":return function(t,e,n){var r=e.x+e.width/2,i=t.append(\"g\"),a=i;0===e.y&&(As++,a.append(\"line\").attr(\"id\",\"actor\"+As).attr(\"x1\",r).attr(\"y1\",5).attr(\"x2\",r).attr(\"y2\",2e3).attr(\"class\",\"actor-line\").attr(\"stroke-width\",\"0.5px\").attr(\"stroke\",\"#999\"),a=i.append(\"g\"),e.actorCnt=As,null!=e.links&&(a.attr(\"id\",\"root-\"+As),xs(\"#root-\"+As,As)));var o={x:0,y:0,fill:\"#EDF2AE\",stroke:\"#666\",width:100,anchor:\"start\",height:100,rx:0,ry:0},s=\"actor\";null!=e.properties&&e.properties.class?s=e.properties.class:o.fill=\"#eaeaea\",o.x=e.x,o.y=e.y,o.width=e.width,o.height=e.height,o.class=s,o.rx=3,o.ry=3;var c=_s(a,o);if(e.rectData=o,null!=e.properties&&e.properties.icon){var l=e.properties.icon.trim();\"@\"===l.charAt(0)?ws(a,o.x+o.width-20,o.y+10,l.substr(1)):ks(a,o.x+o.width-20,o.y+10,l);}Ds(n)(e.description,a,o.x,o.y,o.width,o.height,{class:\"actor\"},n);var u=e.height;if(c.node){var h=c.node().getBBox();e.height=h.height,u=h.height;}return u}(t,e,n)}},Fs=function(t,e,n,r,i){if(void 0===e.links||null===e.links||0===Object.keys(e.links).length)return {height:0,width:0};var a=e.links,o=e.actorCnt,s=e.rectData,c=\"none\";i&&(c=\"block !important\");var l=t.append(\"g\");l.attr(\"id\",\"actor\"+o+\"_popup\"),l.attr(\"class\",\"actorPopupMenu\"),l.attr(\"display\",c),xs(\"#actor\"+o+\"_popup\",o);var u=\"\";void 0!==s.class&&(u=\" \"+s.class);var h=s.width>n?s.width:n,f=l.append(\"rect\");if(f.attr(\"class\",\"actorPopupMenuPanel\"+u),f.attr(\"x\",s.x),f.attr(\"y\",s.height),f.attr(\"fill\",s.fill),f.attr(\"stroke\",s.stroke),f.attr(\"width\",h),f.attr(\"height\",s.height),f.attr(\"rx\",s.rx),f.attr(\"ry\",s.ry),null!=a){var d=20;for(var p in a){var g=l.append(\"a\"),y=(0, je.N)(a[p]);g.attr(\"xlink:href\",y),g.attr(\"target\",\"_blank\"),Bs(r)(p,g,s.x+10,s.height+d,h,20,{class:\"actor\"},r),d+=30;}}return f.attr(\"height\",d),{height:s.height+d,width:h}},Rs=function(t){return t.append(\"g\")},Ps=function(t,e,n,r,i){var a={x:0,y:0,fill:\"#EDF2AE\",stroke:\"#666\",width:100,anchor:\"start\",height:100,rx:0,ry:0},o=e.anchored;a.x=e.startx,a.y=e.starty,a.class=\"activation\"+i%3,a.width=e.stopx-e.startx,a.height=n-e.starty,_s(o,a);},js=function(t,e,n,r){var i=r.boxMargin,a=r.boxTextMargin,o=r.labelBoxHeight,s=r.labelBoxWidth,c=r.messageFontFamily,l=r.messageFontSize,u=r.messageFontWeight,h=t.append(\"g\"),f=function(t,e,n,r){return h.append(\"line\").attr(\"x1\",t).attr(\"y1\",e).attr(\"x2\",n).attr(\"y2\",r).attr(\"class\",\"loopLine\")};f(e.startx,e.starty,e.stopx,e.starty),f(e.stopx,e.starty,e.stopx,e.stopy),f(e.startx,e.stopy,e.stopx,e.stopy),f(e.startx,e.starty,e.startx,e.stopy),void 0!==e.sections&&e.sections.forEach((function(t){f(e.startx,t.y,e.stopx,t.y).style(\"stroke-dasharray\",\"3, 3\");}));var d={x:0,y:0,fill:void 0,anchor:void 0,style:\"#666\",width:void 0,height:void 0,textMargin:0,rx:0,ry:0,tspan:!0,valign:void 0};d.text=n,d.x=e.startx,d.y=e.starty,d.fontFamily=c,d.fontSize=l,d.fontWeight=u,d.anchor=\"middle\",d.valign=\"middle\",d.tspan=!1,d.width=s||50,d.height=o||20,d.textMargin=a,d.class=\"labelText\",Ss(h,d),(d={x:0,y:0,fill:void 0,anchor:void 0,style:\"#666\",width:void 0,height:void 0,textMargin:0,rx:0,ry:0,tspan:!0,valign:void 0}).text=e.title,d.x=e.startx+s/2+(e.stopx-e.startx)/2,d.y=e.starty+i+a,d.anchor=\"middle\",d.valign=\"middle\",d.textMargin=a,d.class=\"loopText\",d.fontFamily=c,d.fontSize=l,d.fontWeight=u,d.wrap=!0;var p=Cs(h,d);return void 0!==e.sectionTitles&&e.sectionTitles.forEach((function(t,n){if(t.message){d.text=t.message,d.x=e.startx+(e.stopx-e.startx)/2,d.y=e.sections[n].y+i+a,d.class=\"loopText\",d.anchor=\"middle\",d.valign=\"middle\",d.tspan=!1,d.fontFamily=c,d.fontSize=l,d.fontWeight=u,d.wrap=e.wrap,p=Cs(h,d);var r=Math.round(p.map((function(t){return (t._groups||t)[0][0].getBBox().height})).reduce((function(t,e){return t+e})));e.sections[n].height+=r-(i+a);}})),e.height=Math.round(e.stopy-e.starty),h},zs=function(t,e){_s(t,{x:e.startx,y:e.starty,width:e.stopx-e.startx,height:e.stopy-e.starty,fill:e.fill,class:\"rect\"}).lower();},Ys=function(t){t.append(\"defs\").append(\"marker\").attr(\"id\",\"arrowhead\").attr(\"refX\",9).attr(\"refY\",5).attr(\"markerUnits\",\"userSpaceOnUse\").attr(\"markerWidth\",12).attr(\"markerHeight\",12).attr(\"orient\",\"auto\").append(\"path\").attr(\"d\",\"M 0 0 L 10 5 L 0 10 z\");},Us=function(t){t.append(\"defs\").append(\"marker\").attr(\"id\",\"filled-head\").attr(\"refX\",18).attr(\"refY\",7).attr(\"markerWidth\",20).attr(\"markerHeight\",28).attr(\"orient\",\"auto\").append(\"path\").attr(\"d\",\"M 18,7 L9,13 L14,7 L9,1 Z\");},$s=function(t){t.append(\"defs\").append(\"marker\").attr(\"id\",\"sequencenumber\").attr(\"refX\",15).attr(\"refY\",15).attr(\"markerWidth\",60).attr(\"markerHeight\",40).attr(\"orient\",\"auto\").append(\"circle\").attr(\"cx\",15).attr(\"cy\",15).attr(\"r\",6);},Ws=function(t){var e=t.append(\"defs\").append(\"marker\").attr(\"id\",\"crosshead\").attr(\"markerWidth\",15).attr(\"markerHeight\",8).attr(\"orient\",\"auto\").attr(\"refX\",16).attr(\"refY\",4);e.append(\"path\").attr(\"fill\",\"black\").attr(\"stroke\",\"#000000\").style(\"stroke-dasharray\",\"0, 0\").attr(\"stroke-width\",\"1px\").attr(\"d\",\"M 9,2 V 6 L16,4 Z\"),e.append(\"path\").attr(\"fill\",\"none\").attr(\"stroke\",\"#000000\").style(\"stroke-dasharray\",\"0, 0\").attr(\"stroke-width\",\"1px\").attr(\"d\",\"M 0,1 L 6,7 M 6,1 L 0,7\");},qs=function(t){t.append(\"defs\").append(\"symbol\").attr(\"id\",\"database\").attr(\"fill-rule\",\"evenodd\").attr(\"clip-rule\",\"evenodd\").append(\"path\").attr(\"transform\",\"scale(.5)\").attr(\"d\",\"M12.258.001l.256.004.255.005.253.008.251.01.249.012.247.015.246.016.242.019.241.02.239.023.236.024.233.027.231.028.229.031.225.032.223.034.22.036.217.038.214.04.211.041.208.043.205.045.201.046.198.048.194.05.191.051.187.053.183.054.18.056.175.057.172.059.168.06.163.061.16.063.155.064.15.066.074.033.073.033.071.034.07.034.069.035.068.035.067.035.066.035.064.036.064.036.062.036.06.036.06.037.058.037.058.037.055.038.055.038.053.038.052.038.051.039.05.039.048.039.047.039.045.04.044.04.043.04.041.04.04.041.039.041.037.041.036.041.034.041.033.042.032.042.03.042.029.042.027.042.026.043.024.043.023.043.021.043.02.043.018.044.017.043.015.044.013.044.012.044.011.045.009.044.007.045.006.045.004.045.002.045.001.045v17l-.001.045-.002.045-.004.045-.006.045-.007.045-.009.044-.011.045-.012.044-.013.044-.015.044-.017.043-.018.044-.02.043-.021.043-.023.043-.024.043-.026.043-.027.042-.029.042-.03.042-.032.042-.033.042-.034.041-.036.041-.037.041-.039.041-.04.041-.041.04-.043.04-.044.04-.045.04-.047.039-.048.039-.05.039-.051.039-.052.038-.053.038-.055.038-.055.038-.058.037-.058.037-.06.037-.06.036-.062.036-.064.036-.064.036-.066.035-.067.035-.068.035-.069.035-.07.034-.071.034-.073.033-.074.033-.15.066-.155.064-.16.063-.163.061-.168.06-.172.059-.175.057-.18.056-.183.054-.187.053-.191.051-.194.05-.198.048-.201.046-.205.045-.208.043-.211.041-.214.04-.217.038-.22.036-.223.034-.225.032-.229.031-.231.028-.233.027-.236.024-.239.023-.241.02-.242.019-.246.016-.247.015-.249.012-.251.01-.253.008-.255.005-.256.004-.258.001-.258-.001-.256-.004-.255-.005-.253-.008-.251-.01-.249-.012-.247-.015-.245-.016-.243-.019-.241-.02-.238-.023-.236-.024-.234-.027-.231-.028-.228-.031-.226-.032-.223-.034-.22-.036-.217-.038-.214-.04-.211-.041-.208-.043-.204-.045-.201-.046-.198-.048-.195-.05-.19-.051-.187-.053-.184-.054-.179-.056-.176-.057-.172-.059-.167-.06-.164-.061-.159-.063-.155-.064-.151-.066-.074-.033-.072-.033-.072-.034-.07-.034-.069-.035-.068-.035-.067-.035-.066-.035-.064-.036-.063-.036-.062-.036-.061-.036-.06-.037-.058-.037-.057-.037-.056-.038-.055-.038-.053-.038-.052-.038-.051-.039-.049-.039-.049-.039-.046-.039-.046-.04-.044-.04-.043-.04-.041-.04-.04-.041-.039-.041-.037-.041-.036-.041-.034-.041-.033-.042-.032-.042-.03-.042-.029-.042-.027-.042-.026-.043-.024-.043-.023-.043-.021-.043-.02-.043-.018-.044-.017-.043-.015-.044-.013-.044-.012-.044-.011-.045-.009-.044-.007-.045-.006-.045-.004-.045-.002-.045-.001-.045v-17l.001-.045.002-.045.004-.045.006-.045.007-.045.009-.044.011-.045.012-.044.013-.044.015-.044.017-.043.018-.044.02-.043.021-.043.023-.043.024-.043.026-.043.027-.042.029-.042.03-.042.032-.042.033-.042.034-.041.036-.041.037-.041.039-.041.04-.041.041-.04.043-.04.044-.04.046-.04.046-.039.049-.039.049-.039.051-.039.052-.038.053-.038.055-.038.056-.038.057-.037.058-.037.06-.037.061-.036.062-.036.063-.036.064-.036.066-.035.067-.035.068-.035.069-.035.07-.034.072-.034.072-.033.074-.033.151-.066.155-.064.159-.063.164-.061.167-.06.172-.059.176-.057.179-.056.184-.054.187-.053.19-.051.195-.05.198-.048.201-.046.204-.045.208-.043.211-.041.214-.04.217-.038.22-.036.223-.034.226-.032.228-.031.231-.028.234-.027.236-.024.238-.023.241-.02.243-.019.245-.016.247-.015.249-.012.251-.01.253-.008.255-.005.256-.004.258-.001.258.001zm-9.258 20.499v.01l.001.021.003.021.004.022.005.021.006.022.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.023.018.024.019.024.021.024.022.025.023.024.024.025.052.049.056.05.061.051.066.051.07.051.075.051.079.052.084.052.088.052.092.052.097.052.102.051.105.052.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.048.144.049.147.047.152.047.155.047.16.045.163.045.167.043.171.043.176.041.178.041.183.039.187.039.19.037.194.035.197.035.202.033.204.031.209.03.212.029.216.027.219.025.222.024.226.021.23.02.233.018.236.016.24.015.243.012.246.01.249.008.253.005.256.004.259.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.021.224-.024.22-.026.216-.027.212-.028.21-.031.205-.031.202-.034.198-.034.194-.036.191-.037.187-.039.183-.04.179-.04.175-.042.172-.043.168-.044.163-.045.16-.046.155-.046.152-.047.148-.048.143-.049.139-.049.136-.05.131-.05.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.053.083-.051.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.05.023-.024.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.023.01-.022.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.127l-.077.055-.08.053-.083.054-.085.053-.087.052-.09.052-.093.051-.095.05-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.045-.118.044-.12.043-.122.042-.124.042-.126.041-.128.04-.13.04-.132.038-.134.038-.135.037-.138.037-.139.035-.142.035-.143.034-.144.033-.147.032-.148.031-.15.03-.151.03-.153.029-.154.027-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.01-.179.008-.179.008-.181.006-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.006-.179-.008-.179-.008-.178-.01-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.027-.153-.029-.151-.03-.15-.03-.148-.031-.146-.032-.145-.033-.143-.034-.141-.035-.14-.035-.137-.037-.136-.037-.134-.038-.132-.038-.13-.04-.128-.04-.126-.041-.124-.042-.122-.042-.12-.044-.117-.043-.116-.045-.113-.045-.112-.046-.109-.047-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.05-.093-.052-.09-.051-.087-.052-.085-.053-.083-.054-.08-.054-.077-.054v4.127zm0-5.654v.011l.001.021.003.021.004.021.005.022.006.022.007.022.009.022.01.022.011.023.012.023.013.023.015.024.016.023.017.024.018.024.019.024.021.024.022.024.023.025.024.024.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.052.11.051.114.051.119.052.123.05.127.051.131.05.135.049.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.044.171.042.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.022.23.02.233.018.236.016.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.012.241-.015.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.048.139-.05.136-.049.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.051.051-.049.023-.025.023-.024.021-.025.02-.024.019-.024.018-.024.017-.024.015-.023.014-.023.013-.024.012-.022.01-.023.01-.023.008-.022.006-.022.006-.022.004-.021.004-.022.001-.021.001-.021v-4.139l-.077.054-.08.054-.083.054-.085.052-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.044-.118.044-.12.044-.122.042-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.035-.143.033-.144.033-.147.033-.148.031-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.009-.179.009-.179.007-.181.007-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.007-.179-.007-.179-.009-.178-.009-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.031-.146-.033-.145-.033-.143-.033-.141-.035-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.04-.126-.041-.124-.042-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.051-.093-.051-.09-.051-.087-.053-.085-.052-.083-.054-.08-.054-.077-.054v4.139zm0-5.666v.011l.001.02.003.022.004.021.005.022.006.021.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.024.018.023.019.024.021.025.022.024.023.024.024.025.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.051.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.043.171.043.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.021.23.02.233.018.236.017.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.013.241-.014.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.049.139-.049.136-.049.131-.051.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.049.023-.025.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.022.01-.023.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.153l-.077.054-.08.054-.083.053-.085.053-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.048-.105.048-.106.048-.109.046-.111.046-.114.046-.115.044-.118.044-.12.043-.122.043-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.034-.143.034-.144.033-.147.032-.148.032-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.024-.161.024-.162.023-.163.023-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.01-.178.01-.179.009-.179.007-.181.006-.182.006-.182.004-.184.003-.184.001-.185.001-.185-.001-.184-.001-.184-.003-.182-.004-.182-.006-.181-.006-.179-.007-.179-.009-.178-.01-.176-.01-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.023-.162-.023-.161-.024-.159-.024-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.032-.146-.032-.145-.033-.143-.034-.141-.034-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.041-.126-.041-.124-.041-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.048-.105-.048-.102-.048-.1-.05-.097-.049-.095-.051-.093-.051-.09-.052-.087-.052-.085-.053-.083-.053-.08-.054-.077-.054v4.153zm8.74-8.179l-.257.004-.254.005-.25.008-.247.011-.244.012-.241.014-.237.016-.233.018-.231.021-.226.022-.224.023-.22.026-.216.027-.212.028-.21.031-.205.032-.202.033-.198.034-.194.036-.191.038-.187.038-.183.04-.179.041-.175.042-.172.043-.168.043-.163.045-.16.046-.155.046-.152.048-.148.048-.143.048-.139.049-.136.05-.131.05-.126.051-.123.051-.118.051-.114.052-.11.052-.106.052-.101.052-.096.052-.092.052-.088.052-.083.052-.079.052-.074.051-.07.052-.065.051-.06.05-.056.05-.051.05-.023.025-.023.024-.021.024-.02.025-.019.024-.018.024-.017.023-.015.024-.014.023-.013.023-.012.023-.01.023-.01.022-.008.022-.006.023-.006.021-.004.022-.004.021-.001.021-.001.021.001.021.001.021.004.021.004.022.006.021.006.023.008.022.01.022.01.023.012.023.013.023.014.023.015.024.017.023.018.024.019.024.02.025.021.024.023.024.023.025.051.05.056.05.06.05.065.051.07.052.074.051.079.052.083.052.088.052.092.052.096.052.101.052.106.052.11.052.114.052.118.051.123.051.126.051.131.05.136.05.139.049.143.048.148.048.152.048.155.046.16.046.163.045.168.043.172.043.175.042.179.041.183.04.187.038.191.038.194.036.198.034.202.033.205.032.21.031.212.028.216.027.22.026.224.023.226.022.231.021.233.018.237.016.241.014.244.012.247.011.25.008.254.005.257.004.26.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.022.224-.023.22-.026.216-.027.212-.028.21-.031.205-.032.202-.033.198-.034.194-.036.191-.038.187-.038.183-.04.179-.041.175-.042.172-.043.168-.043.163-.045.16-.046.155-.046.152-.048.148-.048.143-.048.139-.049.136-.05.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.05.051-.05.023-.025.023-.024.021-.024.02-.025.019-.024.018-.024.017-.023.015-.024.014-.023.013-.023.012-.023.01-.023.01-.022.008-.022.006-.023.006-.021.004-.022.004-.021.001-.021.001-.021-.001-.021-.001-.021-.004-.021-.004-.022-.006-.021-.006-.023-.008-.022-.01-.022-.01-.023-.012-.023-.013-.023-.014-.023-.015-.024-.017-.023-.018-.024-.019-.024-.02-.025-.021-.024-.023-.024-.023-.025-.051-.05-.056-.05-.06-.05-.065-.051-.07-.052-.074-.051-.079-.052-.083-.052-.088-.052-.092-.052-.096-.052-.101-.052-.106-.052-.11-.052-.114-.052-.118-.051-.123-.051-.126-.051-.131-.05-.136-.05-.139-.049-.143-.048-.148-.048-.152-.048-.155-.046-.16-.046-.163-.045-.168-.043-.172-.043-.175-.042-.179-.041-.183-.04-.187-.038-.191-.038-.194-.036-.198-.034-.202-.033-.205-.032-.21-.031-.212-.028-.216-.027-.22-.026-.224-.023-.226-.022-.231-.021-.233-.018-.237-.016-.241-.014-.244-.012-.247-.011-.25-.008-.254-.005-.257-.004-.26-.001-.26.001z\");},Hs=function(t){t.append(\"defs\").append(\"symbol\").attr(\"id\",\"computer\").attr(\"width\",\"24\").attr(\"height\",\"24\").append(\"path\").attr(\"transform\",\"scale(.5)\").attr(\"d\",\"M2 2v13h20v-13h-20zm18 11h-16v-9h16v9zm-10.228 6l.466-1h3.524l.467 1h-4.457zm14.228 3h-24l2-6h2.104l-1.33 4h18.45l-1.297-4h2.073l2 6zm-5-10h-14v-7h14v7z\");},Vs=function(t){t.append(\"defs\").append(\"symbol\").attr(\"id\",\"clock\").attr(\"width\",\"24\").attr(\"height\",\"24\").append(\"path\").attr(\"transform\",\"scale(.5)\").attr(\"d\",\"M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm5.848 12.459c.202.038.202.333.001.372-1.907.361-6.045 1.111-6.547 1.111-.719 0-1.301-.582-1.301-1.301 0-.512.77-5.447 1.125-7.445.034-.192.312-.181.343.014l.985 6.238 5.394 1.011z\");},Gs=Ns,Xs=Os;je.N;var Zs={},Qs={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],activations:[],models:{getHeight:function(){return Math.max.apply(null,0===this.actors.length?[0]:this.actors.map((function(t){return t.height||0})))+(0===this.loops.length?0:this.loops.map((function(t){return t.height||0})).reduce((function(t,e){return t+e})))+(0===this.messages.length?0:this.messages.map((function(t){return t.height||0})).reduce((function(t,e){return t+e})))+(0===this.notes.length?0:this.notes.map((function(t){return t.height||0})).reduce((function(t,e){return t+e})))},clear:function(){this.actors=[],this.loops=[],this.messages=[],this.notes=[];},addActor:function(t){this.actors.push(t);},addLoop:function(t){this.loops.push(t);},addMessage:function(t){this.messages.push(t);},addNote:function(t){this.notes.push(t);},lastActor:function(){return this.actors[this.actors.length-1]},lastLoop:function(){return this.loops[this.loops.length-1]},lastMessage:function(){return this.messages[this.messages.length-1]},lastNote:function(){return this.notes[this.notes.length-1]},actors:[],loops:[],messages:[],notes:[]},init:function(){this.sequenceItems=[],this.activations=[],this.models.clear(),this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0,rc(Xt());},updateVal:function(t,e,n,r){void 0===t[e]?t[e]=n:t[e]=r(n,t[e]);},updateBounds:function(t,e,n,r){var i=this,a=0;function o(o){return function(s){a++;var c=i.sequenceItems.length-a+1;i.updateVal(s,\"starty\",e-c*Zs.boxMargin,Math.min),i.updateVal(s,\"stopy\",r+c*Zs.boxMargin,Math.max),i.updateVal(Qs.data,\"startx\",t-c*Zs.boxMargin,Math.min),i.updateVal(Qs.data,\"stopx\",n+c*Zs.boxMargin,Math.max),\"activation\"!==o&&(i.updateVal(s,\"startx\",t-c*Zs.boxMargin,Math.min),i.updateVal(s,\"stopx\",n+c*Zs.boxMargin,Math.max),i.updateVal(Qs.data,\"starty\",e-c*Zs.boxMargin,Math.min),i.updateVal(Qs.data,\"stopy\",r+c*Zs.boxMargin,Math.max));}}this.sequenceItems.forEach(o()),this.activations.forEach(o(\"activation\"));},insert:function(t,e,n,r){var i=Math.min(t,n),a=Math.max(t,n),o=Math.min(e,r),s=Math.max(e,r);this.updateVal(Qs.data,\"startx\",i,Math.min),this.updateVal(Qs.data,\"starty\",o,Math.min),this.updateVal(Qs.data,\"stopx\",a,Math.max),this.updateVal(Qs.data,\"stopy\",s,Math.max),this.updateBounds(i,o,a,s);},newActivation:function(t,e,n){var r=n[t.from.actor],i=ic(t.from.actor).length||0,a=r.x+r.width/2+(i-1)*Zs.activationWidth/2;this.activations.push({startx:a,starty:this.verticalPos+2,stopx:a+Zs.activationWidth,stopy:void 0,actor:t.from.actor,anchored:Rs(e)});},endActivation:function(t){var e=this.activations.map((function(t){return t.actor})).lastIndexOf(t.from.actor);return this.activations.splice(e,1)[0]},createLoop:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{message:void 0,wrap:!1,width:void 0},e=arguments.length>1?arguments[1]:void 0;return {startx:void 0,starty:this.verticalPos,stopx:void 0,stopy:void 0,title:t.message,wrap:t.wrap,width:t.width,height:0,fill:e}},newLoop:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{message:void 0,wrap:!1,width:void 0},e=arguments.length>1?arguments[1]:void 0;this.sequenceItems.push(this.createLoop(t,e));},endLoop:function(){return this.sequenceItems.pop()},addSectionToLoop:function(t){var e=this.sequenceItems.pop();e.sections=e.sections||[],e.sectionTitles=e.sectionTitles||[],e.sections.push({y:Qs.getVerticalPos(),height:0}),e.sectionTitles.push(t),this.sequenceItems.push(e);},bumpVerticalPos:function(t){this.verticalPos=this.verticalPos+t,this.data.stopy=this.verticalPos;},getVerticalPos:function(){return this.verticalPos},getBounds:function(){return {bounds:this.data,models:this.models}}},Ks=function(t){return {fontFamily:t.messageFontFamily,fontSize:t.messageFontSize,fontWeight:t.messageFontWeight}},Js=function(t){return {fontFamily:t.noteFontFamily,fontSize:t.noteFontSize,fontWeight:t.noteFontWeight}},tc=function(t){return {fontFamily:t.actorFontFamily,fontSize:t.actorFontSize,fontWeight:t.actorFontWeight}},ec=function(t,e,n,r,i,a){if(!0===i.hideUnusedParticipants){var o=new Set;a.forEach((function(t){o.add(t.from),o.add(t.to);})),n=n.filter((function(t){return o.has(t)}));}for(var s=0,c=0,l=0,u=0;u<n.length;u++){var h=e[n[u]];h.width=h.width||Zs.width,h.height=Math.max(h.height||Zs.height,Zs.height),h.margin=h.margin||Zs.actorMargin,h.x=s+c,h.y=r;var f=Is(t,h,Zs);l=Math.max(l,f),Qs.insert(h.x,r,h.x+h.width,h.height),s+=h.width,c+=h.margin,Qs.models.addActor(h);}Qs.bumpVerticalPos(l);},nc=function(t,e,n,r){for(var i=0,a=0,o=0;o<n.length;o++){var s=e[n[o]],c=sc(s),l=Fs(t,s,c,Zs,Zs.forceMenus);l.height>i&&(i=l.height),l.width+s.x>a&&(a=l.width+s.x);}return {maxHeight:i,maxWidth:a}},rc=function(t){Q(Zs,t),t.fontFamily&&(Zs.actorFontFamily=Zs.noteFontFamily=Zs.messageFontFamily=t.fontFamily),t.fontSize&&(Zs.actorFontSize=Zs.noteFontSize=Zs.messageFontSize=t.fontSize),t.fontWeight&&(Zs.actorFontWeight=Zs.noteFontWeight=Zs.messageFontWeight=t.fontWeight);},ic=function(t){return Qs.activations.filter((function(e){return e.actor===t}))},ac=function(t,e){var n=e[t],r=ic(t);return [r.reduce((function(t,e){return Math.min(t,e.startx)}),n.x+n.width/2),r.reduce((function(t,e){return Math.max(t,e.stopx)}),n.x+n.width/2)]};function oc(t,e,n,r,i){Qs.bumpVerticalPos(n);var a=r;if(e.id&&e.message&&t[e.id]){var s=t[e.id].width,c=Ks(Zs);e.message=An.wrapLabel(\"[\".concat(e.message,\"]\"),s-2*Zs.wrapPadding,c),e.width=s,e.wrap=!0;var l=An.calculateTextDimensions(e.message,c),u=Math.max(l.height,Zs.labelBoxHeight);a=r+u,o.debug(\"\".concat(u,\" - \").concat(e.message));}i(e),Qs.bumpVerticalPos(a);}var sc=function(t){var e=0,n=tc(Zs);for(var r in t.links){var i=An.calculateTextDimensions(r,n).width+2*Zs.wrapPadding+2*Zs.boxMargin;e<i&&(e=i);}return e};const cc={bounds:Qs,drawActors:ec,drawActorsPopup:nc,setConf:rc,draw:function(t,e,n,r){Zs=Xt().sequence;var i,a=Xt().securityLevel;\"sandbox\"===a&&(i=(0, l.select)(\"#i\"+e));var s=\"sandbox\"===a?(0, l.select)(i.nodes()[0].contentDocument.body):(0, l.select)(\"body\"),c=\"sandbox\"===a?i.nodes()[0].contentDocument:document;Qs.init(),o.debug(r.db);var u=\"sandbox\"===a?s.select('[id=\"'.concat(e,'\"]')):(0, l.select)('[id=\"'.concat(e,'\"]')),h=r.db.getActors(),f=r.db.getActorKeys(),d=r.db.getMessages(),p=r.db.getDiagramTitle(),g=function(t,e,n){var r={};return e.forEach((function(e){if(t[e.to]&&t[e.from]){var i=t[e.to];if(e.placement===n.db.PLACEMENT.LEFTOF&&!i.prevActor)return;if(e.placement===n.db.PLACEMENT.RIGHTOF&&!i.nextActor)return;var a=void 0!==e.placement,o=!a,s=a?Js(Zs):Ks(Zs),c=e.wrap?An.wrapLabel(e.message,Zs.width-2*Zs.wrapPadding,s):e.message,l=An.calculateTextDimensions(c,s).width+2*Zs.wrapPadding;o&&e.from===i.nextActor?r[e.to]=Math.max(r[e.to]||0,l):o&&e.from===i.prevActor?r[e.from]=Math.max(r[e.from]||0,l):o&&e.from===e.to?(r[e.from]=Math.max(r[e.from]||0,l/2),r[e.to]=Math.max(r[e.to]||0,l/2)):e.placement===n.db.PLACEMENT.RIGHTOF?r[e.from]=Math.max(r[e.from]||0,l):e.placement===n.db.PLACEMENT.LEFTOF?r[i.prevActor]=Math.max(r[i.prevActor]||0,l):e.placement===n.db.PLACEMENT.OVER&&(i.prevActor&&(r[i.prevActor]=Math.max(r[i.prevActor]||0,l/2)),i.nextActor&&(r[e.from]=Math.max(r[e.from]||0,l/2)));}})),o.debug(\"maxMessageWidthPerActor:\",r),r}(h,d,r);Zs.height=function(t,e){var n=0;for(var r in Object.keys(t).forEach((function(e){var r=t[e];r.wrap&&(r.description=An.wrapLabel(r.description,Zs.width-2*Zs.wrapPadding,tc(Zs)));var i=An.calculateTextDimensions(r.description,tc(Zs));r.width=r.wrap?Zs.width:Math.max(Zs.width,i.width+2*Zs.wrapPadding),r.height=r.wrap?Math.max(i.height,Zs.height):Zs.height,n=Math.max(n,r.height);})),e){var i=t[r];if(i){var a=t[i.nextActor];if(a){var o=e[r]+Zs.actorMargin-i.width/2-a.width/2;i.margin=Math.max(o,Zs.actorMargin);}}}return Math.max(n,Zs.height)}(h,g),Hs(u),qs(u),Vs(u),ec(u,h,f,0,Zs,d);var y=function(t,e,n,r){var i,a,s,c={},l=[];return t.forEach((function(t){switch(t.id=An.random({length:10}),t.type){case r.db.LINETYPE.LOOP_START:case r.db.LINETYPE.ALT_START:case r.db.LINETYPE.OPT_START:case r.db.LINETYPE.PAR_START:case r.db.LINETYPE.CRITICAL_START:case r.db.LINETYPE.BREAK_START:l.push({id:t.id,msg:t.message,from:Number.MAX_SAFE_INTEGER,to:Number.MIN_SAFE_INTEGER,width:0});break;case r.db.LINETYPE.ALT_ELSE:case r.db.LINETYPE.PAR_AND:case r.db.LINETYPE.CRITICAL_OPTION:t.message&&(i=l.pop(),c[i.id]=i,c[t.id]=i,l.push(i));break;case r.db.LINETYPE.LOOP_END:case r.db.LINETYPE.ALT_END:case r.db.LINETYPE.OPT_END:case r.db.LINETYPE.PAR_END:case r.db.LINETYPE.CRITICAL_END:case r.db.LINETYPE.BREAK_END:i=l.pop(),c[i.id]=i;break;case r.db.LINETYPE.ACTIVE_START:var n=e[t.from?t.from.actor:t.to.actor],u=ic(t.from?t.from.actor:t.to.actor).length,h=n.x+n.width/2+(u-1)*Zs.activationWidth/2,f={startx:h,stopx:h+Zs.activationWidth,actor:t.from.actor,enabled:!0};Qs.activations.push(f);break;case r.db.LINETYPE.ACTIVE_END:var d=Qs.activations.map((function(t){return t.actor})).lastIndexOf(t.from.actor);delete Qs.activations.splice(d,1)[0];}void 0!==t.placement?(a=function(t,e,n){var r=e[t.from].x,i=e[t.to].x,a=t.wrap&&t.message,s=An.calculateTextDimensions(a?An.wrapLabel(t.message,Zs.width,Js(Zs)):t.message,Js(Zs)),c={width:a?Zs.width:Math.max(Zs.width,s.width+2*Zs.noteMargin),height:0,startx:e[t.from].x,stopx:0,starty:0,stopy:0,message:t.message};return t.placement===n.db.PLACEMENT.RIGHTOF?(c.width=a?Math.max(Zs.width,s.width):Math.max(e[t.from].width/2+e[t.to].width/2,s.width+2*Zs.noteMargin),c.startx=r+(e[t.from].width+Zs.actorMargin)/2):t.placement===n.db.PLACEMENT.LEFTOF?(c.width=a?Math.max(Zs.width,s.width+2*Zs.noteMargin):Math.max(e[t.from].width/2+e[t.to].width/2,s.width+2*Zs.noteMargin),c.startx=r-c.width+(e[t.from].width-Zs.actorMargin)/2):t.to===t.from?(s=An.calculateTextDimensions(a?An.wrapLabel(t.message,Math.max(Zs.width,e[t.from].width),Js(Zs)):t.message,Js(Zs)),c.width=a?Math.max(Zs.width,e[t.from].width):Math.max(e[t.from].width,Zs.width,s.width+2*Zs.noteMargin),c.startx=r+(e[t.from].width-c.width)/2):(c.width=Math.abs(r+e[t.from].width/2-(i+e[t.to].width/2))+Zs.actorMargin,c.startx=r<i?r+e[t.from].width/2-Zs.actorMargin/2:i+e[t.to].width/2-Zs.actorMargin/2),a&&(c.message=An.wrapLabel(t.message,c.width-2*Zs.wrapPadding,Js(Zs))),o.debug(\"NM:[\".concat(c.startx,\",\").concat(c.stopx,\",\").concat(c.starty,\",\").concat(c.stopy,\":\").concat(c.width,\",\").concat(c.height,\"=\").concat(t.message,\"]\")),c}(t,e,r),t.noteModel=a,l.forEach((function(t){(i=t).from=Math.min(i.from,a.startx),i.to=Math.max(i.to,a.startx+a.width),i.width=Math.max(i.width,Math.abs(i.from-i.to))-Zs.labelBoxWidth;}))):(s=function(t,e,n){var r=!1;if([n.db.LINETYPE.SOLID_OPEN,n.db.LINETYPE.DOTTED_OPEN,n.db.LINETYPE.SOLID,n.db.LINETYPE.DOTTED,n.db.LINETYPE.SOLID_CROSS,n.db.LINETYPE.DOTTED_CROSS,n.db.LINETYPE.SOLID_POINT,n.db.LINETYPE.DOTTED_POINT].includes(t.type)&&(r=!0),!r)return {};var i=ac(t.from,e),a=ac(t.to,e),o=i[0]<=a[0]?1:0,s=i[0]<a[0]?0:1,c=i.concat(a),l=Math.abs(a[s]-i[o]);t.wrap&&t.message&&(t.message=An.wrapLabel(t.message,Math.max(l+2*Zs.wrapPadding,Zs.width),Ks(Zs)));var u=An.calculateTextDimensions(t.message,Ks(Zs));return {width:Math.max(t.wrap?0:u.width+2*Zs.wrapPadding,l+2*Zs.wrapPadding,Zs.width),height:0,startx:i[o],stopx:a[s],starty:0,stopy:0,message:t.message,type:t.type,wrap:t.wrap,fromBounds:Math.min.apply(null,c),toBounds:Math.max.apply(null,c)}}(t,e,r),t.msgModel=s,s.startx&&s.stopx&&l.length>0&&l.forEach((function(n){if(i=n,s.startx===s.stopx){var r=e[t.from],a=e[t.to];i.from=Math.min(r.x-s.width/2,r.x-r.width/2,i.from),i.to=Math.max(a.x+s.width/2,a.x+r.width/2,i.to),i.width=Math.max(i.width,Math.abs(i.to-i.from))-Zs.labelBoxWidth;}else i.from=Math.min(s.startx,i.from),i.to=Math.max(s.stopx,i.to),i.width=Math.max(i.width,s.width)-Zs.labelBoxWidth;})));})),Qs.activations=[],o.debug(\"Loop type widths:\",c),c}(d,h,0,r);Ys(u),Ws(u),Us(u),$s(u);var m=1,b=1,v=Array();d.forEach((function(t){var e,n,i;switch(t.type){case r.db.LINETYPE.NOTE:n=t.noteModel,function(t,e){Qs.bumpVerticalPos(Zs.boxMargin),e.height=Zs.boxMargin,e.starty=Qs.getVerticalPos();var n=Xs();n.x=e.startx,n.y=e.starty,n.width=e.width||Zs.width,n.class=\"note\";var r=t.append(\"g\"),i=Ls(r,n),a=Gs();a.x=e.startx,a.y=e.starty,a.width=n.width,a.dy=\"1em\",a.text=e.message,a.class=\"noteText\",a.fontFamily=Zs.noteFontFamily,a.fontSize=Zs.noteFontSize,a.fontWeight=Zs.noteFontWeight,a.anchor=Zs.noteAlign,a.textMargin=Zs.noteMargin,a.valign=\"center\";var o=Cs(r,a),s=Math.round(o.map((function(t){return (t._groups||t)[0][0].getBBox().height})).reduce((function(t,e){return t+e})));i.attr(\"height\",s+2*Zs.noteMargin),e.height+=s+2*Zs.noteMargin,Qs.bumpVerticalPos(s+2*Zs.noteMargin),e.stopy=e.starty+s+2*Zs.noteMargin,e.stopx=e.startx+n.width,Qs.insert(e.startx,e.starty,e.stopx,e.stopy),Qs.models.addNote(e);}(u,n);break;case r.db.LINETYPE.ACTIVE_START:Qs.newActivation(t,u,h);break;case r.db.LINETYPE.ACTIVE_END:!function(t,e){var n=Qs.endActivation(t);n.starty+18>e&&(n.starty=e-6,e+=12),Ps(u,n,e,Zs,ic(t.from.actor).length),Qs.insert(n.startx,e-10,n.stopx,e);}(t,Qs.getVerticalPos());break;case r.db.LINETYPE.LOOP_START:oc(y,t,Zs.boxMargin,Zs.boxMargin+Zs.boxTextMargin,(function(t){return Qs.newLoop(t)}));break;case r.db.LINETYPE.LOOP_END:e=Qs.endLoop(),js(u,e,\"loop\",Zs),Qs.bumpVerticalPos(e.stopy-Qs.getVerticalPos()),Qs.models.addLoop(e);break;case r.db.LINETYPE.RECT_START:oc(y,t,Zs.boxMargin,Zs.boxMargin,(function(t){return Qs.newLoop(void 0,t.message)}));break;case r.db.LINETYPE.RECT_END:e=Qs.endLoop(),zs(u,e),Qs.models.addLoop(e),Qs.bumpVerticalPos(e.stopy-Qs.getVerticalPos());break;case r.db.LINETYPE.OPT_START:oc(y,t,Zs.boxMargin,Zs.boxMargin+Zs.boxTextMargin,(function(t){return Qs.newLoop(t)}));break;case r.db.LINETYPE.OPT_END:e=Qs.endLoop(),js(u,e,\"opt\",Zs),Qs.bumpVerticalPos(e.stopy-Qs.getVerticalPos()),Qs.models.addLoop(e);break;case r.db.LINETYPE.ALT_START:oc(y,t,Zs.boxMargin,Zs.boxMargin+Zs.boxTextMargin,(function(t){return Qs.newLoop(t)}));break;case r.db.LINETYPE.ALT_ELSE:oc(y,t,Zs.boxMargin+Zs.boxTextMargin,Zs.boxMargin,(function(t){return Qs.addSectionToLoop(t)}));break;case r.db.LINETYPE.ALT_END:e=Qs.endLoop(),js(u,e,\"alt\",Zs),Qs.bumpVerticalPos(e.stopy-Qs.getVerticalPos()),Qs.models.addLoop(e);break;case r.db.LINETYPE.PAR_START:oc(y,t,Zs.boxMargin,Zs.boxMargin+Zs.boxTextMargin,(function(t){return Qs.newLoop(t)}));break;case r.db.LINETYPE.PAR_AND:oc(y,t,Zs.boxMargin+Zs.boxTextMargin,Zs.boxMargin,(function(t){return Qs.addSectionToLoop(t)}));break;case r.db.LINETYPE.PAR_END:e=Qs.endLoop(),js(u,e,\"par\",Zs),Qs.bumpVerticalPos(e.stopy-Qs.getVerticalPos()),Qs.models.addLoop(e);break;case r.db.LINETYPE.AUTONUMBER:m=t.message.start||m,b=t.message.step||b,t.message.visible?r.db.enableSequenceNumbers():r.db.disableSequenceNumbers();break;case r.db.LINETYPE.CRITICAL_START:oc(y,t,Zs.boxMargin,Zs.boxMargin+Zs.boxTextMargin,(function(t){return Qs.newLoop(t)}));break;case r.db.LINETYPE.CRITICAL_OPTION:oc(y,t,Zs.boxMargin+Zs.boxTextMargin,Zs.boxMargin,(function(t){return Qs.addSectionToLoop(t)}));break;case r.db.LINETYPE.CRITICAL_END:e=Qs.endLoop(),js(u,e,\"critical\",Zs),Qs.bumpVerticalPos(e.stopy-Qs.getVerticalPos()),Qs.models.addLoop(e);break;case r.db.LINETYPE.BREAK_START:oc(y,t,Zs.boxMargin,Zs.boxMargin+Zs.boxTextMargin,(function(t){return Qs.newLoop(t)}));break;case r.db.LINETYPE.BREAK_END:e=Qs.endLoop(),js(u,e,\"break\",Zs),Qs.bumpVerticalPos(e.stopy-Qs.getVerticalPos()),Qs.models.addLoop(e);break;default:try{(i=t.msgModel).starty=Qs.getVerticalPos(),i.sequenceIndex=m,i.sequenceVisible=r.db.showSequenceNumbers();var a=function(t,e){Qs.bumpVerticalPos(10);var n,r=e.startx,i=e.stopx,a=e.message,o=ue.splitBreaks(a).length,s=An.calculateTextDimensions(a,Ks(Zs)),c=s.height/o;e.height+=c,Qs.bumpVerticalPos(c);var l=s.height-10,u=s.width;if(r===i){n=Qs.getVerticalPos()+l,Zs.rightAngles||(l+=Zs.boxMargin,n=Qs.getVerticalPos()+l),l+=30;var h=Math.max(u/2,Zs.width/2);Qs.insert(r-h,Qs.getVerticalPos()-10+l,i+h,Qs.getVerticalPos()+30+l);}else l+=Zs.boxMargin,n=Qs.getVerticalPos()+l,Qs.insert(r,n-10,i,n);return Qs.bumpVerticalPos(l),e.height+=l,e.stopy=e.starty+e.height,Qs.insert(e.fromBounds,e.starty,e.toBounds,e.stopy),n}(0,i);v.push({messageModel:i,lineStarty:a}),Qs.models.addMessage(i);}catch(t){o.error(\"error while drawing message\",t);}}[r.db.LINETYPE.SOLID_OPEN,r.db.LINETYPE.DOTTED_OPEN,r.db.LINETYPE.SOLID,r.db.LINETYPE.DOTTED,r.db.LINETYPE.SOLID_CROSS,r.db.LINETYPE.DOTTED_CROSS,r.db.LINETYPE.SOLID_POINT,r.db.LINETYPE.DOTTED_POINT].includes(t.type)&&(m+=b);})),v.forEach((function(t){return function(t,e,n,r){var i=e.startx,a=e.stopx,o=e.starty,s=e.message,c=e.type,l=e.sequenceIndex,u=e.sequenceVisible,h=An.calculateTextDimensions(s,Ks(Zs)),f=Gs();f.x=i,f.y=o+10,f.width=a-i,f.class=\"messageText\",f.dy=\"1em\",f.text=s,f.fontFamily=Zs.messageFontFamily,f.fontSize=Zs.messageFontSize,f.fontWeight=Zs.messageFontWeight,f.anchor=Zs.messageAlign,f.valign=\"center\",f.textMargin=Zs.wrapPadding,f.tspan=!1,Cs(t,f);var d,p=h.width;i===a?d=Zs.rightAngles?t.append(\"path\").attr(\"d\",\"M  \".concat(i,\",\").concat(n,\" H \").concat(i+Math.max(Zs.width/2,p/2),\" V \").concat(n+25,\" H \").concat(i)):t.append(\"path\").attr(\"d\",\"M \"+i+\",\"+n+\" C \"+(i+60)+\",\"+(n-10)+\" \"+(i+60)+\",\"+(n+30)+\" \"+i+\",\"+(n+20)):((d=t.append(\"line\")).attr(\"x1\",i),d.attr(\"y1\",n),d.attr(\"x2\",a),d.attr(\"y2\",n)),c===r.db.LINETYPE.DOTTED||c===r.db.LINETYPE.DOTTED_CROSS||c===r.db.LINETYPE.DOTTED_POINT||c===r.db.LINETYPE.DOTTED_OPEN?(d.style(\"stroke-dasharray\",\"3, 3\"),d.attr(\"class\",\"messageLine1\")):d.attr(\"class\",\"messageLine0\");var g=\"\";Zs.arrowMarkerAbsolute&&(g=(g=(g=window.location.protocol+\"//\"+window.location.host+window.location.pathname+window.location.search).replace(/\\(/g,\"\\\\(\")).replace(/\\)/g,\"\\\\)\")),d.attr(\"stroke-width\",2),d.attr(\"stroke\",\"none\"),d.style(\"fill\",\"none\"),c!==r.db.LINETYPE.SOLID&&c!==r.db.LINETYPE.DOTTED||d.attr(\"marker-end\",\"url(\"+g+\"#arrowhead)\"),c!==r.db.LINETYPE.SOLID_POINT&&c!==r.db.LINETYPE.DOTTED_POINT||d.attr(\"marker-end\",\"url(\"+g+\"#filled-head)\"),c!==r.db.LINETYPE.SOLID_CROSS&&c!==r.db.LINETYPE.DOTTED_CROSS||d.attr(\"marker-end\",\"url(\"+g+\"#crosshead)\"),(u||Zs.showSequenceNumbers)&&(d.attr(\"marker-start\",\"url(\"+g+\"#sequencenumber)\"),t.append(\"text\").attr(\"x\",i).attr(\"y\",n+4).attr(\"font-family\",\"sans-serif\").attr(\"font-size\",\"12px\").attr(\"text-anchor\",\"middle\").attr(\"class\",\"sequenceNumber\").text(l));}(u,t.messageModel,t.lineStarty,r)})),Zs.mirrorActors&&(Qs.bumpVerticalPos(2*Zs.boxMargin),ec(u,h,f,Qs.getVerticalPos(),Zs,d),Qs.bumpVerticalPos(Zs.boxMargin),Ms(u,Qs.getVerticalPos()));var _=nc(u,h,f),x=Qs.getBounds().bounds;o.debug(\"For line height fix Querying: #\"+e+\" .actor-line\"),(0, l.selectAll)(\"#\"+e+\" .actor-line\").attr(\"y2\",x.stopy);var k=x.stopy-x.starty;k<_.maxHeight&&(k=_.maxHeight);var w=k+2*Zs.diagramMarginY;Zs.mirrorActors&&(w=w-Zs.boxMargin+Zs.bottomMarginAdj);var T=x.stopx-x.startx;T<_.maxWidth&&(T=_.maxWidth);var E=T+2*Zs.diagramMarginX;p&&u.append(\"text\").text(p).attr(\"x\",(x.stopx-x.startx)/2-2*Zs.diagramMarginX).attr(\"y\",-25),Tn(u,0,E,Zs.useMaxWidth);var C=p?40:0;u.attr(\"viewBox\",x.startx-Zs.diagramMarginX+\" -\"+(Zs.diagramMarginY+C)+\" \"+E+\" \"+(w+C)),Mn(r.db,u,e),o.debug(\"models:\",Qs.models);}};var lc=n(3584),uc=n.n(lc);function hc(t){return hc=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&\"function\"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?\"symbol\":typeof t},hc(t)}var fc=function(t){return JSON.parse(JSON.stringify(t))},dc=[],pc=function t(e,n,r){if(\"relation\"===n.stmt)t(e,n.state1,!0),t(e,n.state2,!1);else if(\"state\"===n.stmt&&\"[*]\"===n.id&&(n.id=r?e.id+\"_start\":e.id+\"_end\",n.start=r),n.doc){var i=[],a=0,o=[];for(a=0;a<n.doc.length;a++)if(\"divider\"===n.doc[a].type){var s=fc(n.doc[a]);s.doc=fc(o),i.push(s),o=[];}else o.push(n.doc[a]);if(i.length>0&&o.length>0){var c={stmt:\"state\",id:gn(),type:\"divider\",doc:fc(o)};i.push(fc(c)),n.doc=i;}n.doc.forEach((function(e){return t(n,e,!0)}));}},gc={root:{relations:[],states:{},documents:{}}},yc=gc.root,mc=0,bc=function(t,e,n,r,i){void 0===yc.states[t]?yc.states[t]={id:t,descriptions:[],type:e,doc:n,note:i}:(yc.states[t].doc||(yc.states[t].doc=n),yc.states[t].type||(yc.states[t].type=e)),r&&(o.info(\"Adding state \",t,r),\"string\"==typeof r&&xc(t,r.trim()),\"object\"===hc(r)&&r.forEach((function(e){return xc(t,e.trim())}))),i&&(yc.states[t].note=i,yc.states[t].note.text=ue.sanitizeText(yc.states[t].note.text,Xt()));},vc=function(t){yc=(gc={root:{relations:[],states:{},documents:{}}}).root,yc=gc.root,mc=0,wc=[],t||ge();},_c=function(t,e,n){var r=t,i=e,a=\"default\",o=\"default\";\"[*]\"===t&&(r=\"start\"+ ++mc,a=\"start\"),\"[*]\"===e&&(i=\"end\"+mc,o=\"end\"),bc(r,a),bc(i,o),yc.relations.push({id1:r,id2:i,title:ue.sanitizeText(n,Xt())});},xc=function(t,e){var n=yc.states[t],r=e;\":\"===r[0]&&(r=r.substr(1).trim()),n.descriptions.push(ue.sanitizeText(r,Xt()));},kc=0,wc=[],Tc=\"TB\";const Ec={parseDirective:function(t,e,n){cu.parseDirective(this,t,e,n);},getConfig:function(){return Xt().state},addState:bc,clear:vc,getState:function(t){return yc.states[t]},getStates:function(){return yc.states},getRelations:function(){return yc.relations},getClasses:function(){return wc},getDirection:function(){return Tc},addRelation:_c,getDividerId:function(){return \"divider-id-\"+ ++kc},setDirection:function(t){Tc=t;},cleanupLabel:function(t){return \":\"===t.substring(0,1)?t.substr(2).trim():t.trim()},lineType:{LINE:0,DOTTED_LINE:1},relationType:{AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3},logDocuments:function(){o.info(\"Documents = \",gc);},getRootDoc:function(){return dc},setRootDoc:function(t){o.info(\"Setting root doc\",t),dc=t;},getRootDocV2:function(){return pc({id:\"root\"},{id:\"root\",doc:dc},!0),{id:\"root\",doc:dc}},extract:function(t){var e;e=t.doc?t.doc:t,o.info(e),vc(!0),o.info(\"Extract\",e),e.forEach((function(t){\"state\"===t.stmt&&bc(t.id,t.type,t.doc,t.description,t.note),\"relation\"===t.stmt&&_c(t.state1.id,t.state2.id,t.description);}));},trimColon:function(t){return t&&\":\"===t[0]?t.substr(1).trim():t.trim()},getAccTitle:me,setAccTitle:ye,getAccDescription:ve,setAccDescription:be};function Sc(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var Ac,Mc=function(t,e,n){var r,i=Xt().state.padding,a=2*Xt().state.padding,o=t.node().getBBox(),s=o.width,c=o.x,l=t.append(\"text\").attr(\"x\",0).attr(\"y\",Xt().state.titleShift).attr(\"font-size\",Xt().state.fontSize).attr(\"class\",\"state-title\").text(e.id),u=l.node().getBBox().width+a,h=Math.max(u,s);h===s&&(h+=a);var f=t.node().getBBox();e.doc,r=c-i,u>s&&(r=(s-h)/2+i),Math.abs(c-f.x)<i&&u>s&&(r=c-(u-s)/2);var d=1-Xt().state.textHeight;return t.insert(\"rect\",\":first-child\").attr(\"x\",r).attr(\"y\",d).attr(\"class\",n?\"alt-composit\":\"composit\").attr(\"width\",h).attr(\"height\",f.height+Xt().state.textHeight+Xt().state.titleShift+1).attr(\"rx\",\"0\"),l.attr(\"x\",r+i),u<=s&&l.attr(\"x\",c+(h-a)/2-u/2+i),t.insert(\"rect\",\":first-child\").attr(\"x\",r).attr(\"y\",Xt().state.titleShift-Xt().state.textHeight-Xt().state.padding).attr(\"width\",h).attr(\"height\",3*Xt().state.textHeight).attr(\"rx\",Xt().state.radius),t.insert(\"rect\",\":first-child\").attr(\"x\",r).attr(\"y\",Xt().state.titleShift-Xt().state.textHeight-Xt().state.padding).attr(\"width\",h).attr(\"height\",f.height+3+2*Xt().state.textHeight).attr(\"rx\",Xt().state.radius),t},Nc=function(t,e){e.attr(\"class\",\"state-note\");var n=e.append(\"rect\").attr(\"x\",0).attr(\"y\",Xt().state.padding),r=function(t,e,n,r){var i=0,a=r.append(\"text\");a.style(\"text-anchor\",\"start\"),a.attr(\"class\",\"noteText\");var o,s=t.replace(/\\r\\n/g,\"<br/>\"),c=(s=s.replace(/\\n/g,\"<br/>\")).split(ue.lineBreakRegex),l=1.25*Xt().state.noteMargin,u=function(t,e){var n=\"undefined\"!=typeof Symbol&&t[Symbol.iterator]||t[\"@@iterator\"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(t){if(\"string\"==typeof t)return Sc(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return \"Object\"===n&&t.constructor&&(n=t.constructor.name),\"Map\"===n||\"Set\"===n?Array.from(t):\"Arguments\"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Sc(t,e):void 0}}(t))||e&&t&&\"number\"==typeof t.length){n&&(t=n);var r=0,i=function(){};return {s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\")}var a,o=!0,s=!1;return {s:function(){n=n.call(t);},n:function(){var t=n.next();return o=t.done,t},e:function(t){s=!0,a=t;},f:function(){try{o||null==n.return||n.return();}finally{if(s)throw a}}}}(c);try{for(u.s();!(o=u.n()).done;){var h=o.value.trim();if(h.length>0){var f=a.append(\"tspan\");f.text(h),0===l&&(l+=f.node().getBBox().height),i+=l,f.attr(\"x\",0+Xt().state.noteMargin),f.attr(\"y\",0+i+1.25*Xt().state.noteMargin);}}}catch(t){u.e(t);}finally{u.f();}return {textWidth:a.node().getBBox().width,textHeight:i}}(t,0,0,e.append(\"g\")),i=r.textWidth,a=r.textHeight;return n.attr(\"height\",a+2*Xt().state.noteMargin),n.attr(\"width\",i+2*Xt().state.noteMargin),n},Oc=function(t,e){var n=e.id,r={id:n,label:e.id,width:0,height:0},i=t.append(\"g\").attr(\"id\",n).attr(\"class\",\"stateGroup\");\"start\"===e.type&&function(t){t.append(\"circle\").attr(\"class\",\"start-state\").attr(\"r\",Xt().state.sizeUnit).attr(\"cx\",Xt().state.padding+Xt().state.sizeUnit).attr(\"cy\",Xt().state.padding+Xt().state.sizeUnit);}(i),\"end\"===e.type&&function(t){t.append(\"circle\").attr(\"class\",\"end-state-outer\").attr(\"r\",Xt().state.sizeUnit+Xt().state.miniPadding).attr(\"cx\",Xt().state.padding+Xt().state.sizeUnit+Xt().state.miniPadding).attr(\"cy\",Xt().state.padding+Xt().state.sizeUnit+Xt().state.miniPadding),t.append(\"circle\").attr(\"class\",\"end-state-inner\").attr(\"r\",Xt().state.sizeUnit).attr(\"cx\",Xt().state.padding+Xt().state.sizeUnit+2).attr(\"cy\",Xt().state.padding+Xt().state.sizeUnit+2);}(i),\"fork\"!==e.type&&\"join\"!==e.type||function(t,e){var n=Xt().state.forkWidth,r=Xt().state.forkHeight;if(e.parentId){var i=n;n=r,r=i;}t.append(\"rect\").style(\"stroke\",\"black\").style(\"fill\",\"black\").attr(\"width\",n).attr(\"height\",r).attr(\"x\",Xt().state.padding).attr(\"y\",Xt().state.padding);}(i,e),\"note\"===e.type&&Nc(e.note.text,i),\"divider\"===e.type&&function(t){t.append(\"line\").style(\"stroke\",\"grey\").style(\"stroke-dasharray\",\"3\").attr(\"x1\",Xt().state.textHeight).attr(\"class\",\"divider\").attr(\"x2\",2*Xt().state.textHeight).attr(\"y1\",0).attr(\"y2\",0);}(i),\"default\"===e.type&&0===e.descriptions.length&&function(t,e){var n=t.append(\"text\").attr(\"x\",2*Xt().state.padding).attr(\"y\",Xt().state.textHeight+2*Xt().state.padding).attr(\"font-size\",Xt().state.fontSize).attr(\"class\",\"state-title\").text(e.id).node().getBBox();t.insert(\"rect\",\":first-child\").attr(\"x\",Xt().state.padding).attr(\"y\",Xt().state.padding).attr(\"width\",n.width+2*Xt().state.padding).attr(\"height\",n.height+2*Xt().state.padding).attr(\"rx\",Xt().state.radius);}(i,e),\"default\"===e.type&&e.descriptions.length>0&&function(t,e){var n=t.append(\"text\").attr(\"x\",2*Xt().state.padding).attr(\"y\",Xt().state.textHeight+1.3*Xt().state.padding).attr(\"font-size\",Xt().state.fontSize).attr(\"class\",\"state-title\").text(e.descriptions[0]).node().getBBox(),r=n.height,i=t.append(\"text\").attr(\"x\",Xt().state.padding).attr(\"y\",r+.4*Xt().state.padding+Xt().state.dividerMargin+Xt().state.textHeight).attr(\"class\",\"state-description\"),a=!0,o=!0;e.descriptions.forEach((function(t){a||(function(t,e,n){var r=t.append(\"tspan\").attr(\"x\",2*Xt().state.padding).text(e);n||r.attr(\"dy\",Xt().state.textHeight);}(i,t,o),o=!1),a=!1;}));var s=t.append(\"line\").attr(\"x1\",Xt().state.padding).attr(\"y1\",Xt().state.padding+r+Xt().state.dividerMargin/2).attr(\"y2\",Xt().state.padding+r+Xt().state.dividerMargin/2).attr(\"class\",\"descr-divider\"),c=i.node().getBBox(),l=Math.max(c.width,n.width);s.attr(\"x2\",l+3*Xt().state.padding),t.insert(\"rect\",\":first-child\").attr(\"x\",Xt().state.padding).attr(\"y\",Xt().state.padding).attr(\"width\",l+2*Xt().state.padding).attr(\"height\",c.height+r+2*Xt().state.padding).attr(\"rx\",Xt().state.radius);}(i,e);var o=i.node().getBBox();return r.width=o.width+2*Xt().state.padding,r.height=o.height+2*Xt().state.padding,r},Dc=0,Bc={},Lc=function t(e,n,r,i,a,s,c){var u,h=new(yr().Graph)({compound:!0,multigraph:!0}),f=!0;for(u=0;u<e.length;u++)if(\"relation\"===e[u].stmt){f=!1;break}r?h.setGraph({rankdir:\"LR\",multigraph:!0,compound:!0,ranker:\"tight-tree\",ranksep:f?1:Ac.edgeLengthFactor,nodeSep:f?1:50,isMultiGraph:!0}):h.setGraph({rankdir:\"TB\",multigraph:!0,compound:!0,ranksep:f?1:Ac.edgeLengthFactor,nodeSep:f?1:50,ranker:\"tight-tree\",isMultiGraph:!0}),h.setDefaultEdgeLabel((function(){return {}})),c.db.extract(e);for(var d=c.db.getStates(),p=c.db.getRelations(),g=Object.keys(d),y=0;y<g.length;y++){var m=d[g[y]];r&&(m.parentId=r);var b=void 0;if(m.doc){var v=n.append(\"g\").attr(\"id\",m.id).attr(\"class\",\"stateGroup\");b=t(m.doc,v,m.id,!i,a,s,c);var _=(v=Mc(v,m,i)).node().getBBox();b.width=_.width,b.height=_.height+Ac.padding/2,Bc[m.id]={y:Ac.compositTitleSize};}else b=Oc(n,m);if(m.note){var x={descriptions:[],id:m.id+\"-note\",note:m.note,type:\"note\"},k=Oc(n,x);\"left of\"===m.note.position?(h.setNode(b.id+\"-note\",k),h.setNode(b.id,b)):(h.setNode(b.id,b),h.setNode(b.id+\"-note\",k)),h.setParent(b.id,b.id+\"-group\"),h.setParent(b.id+\"-note\",b.id+\"-group\");}else h.setNode(b.id,b);}o.debug(\"Count=\",h.nodeCount(),h);var w=0;p.forEach((function(t){var e;w++,o.debug(\"Setting edge\",t),h.setEdge(t.id1,t.id2,{relation:t,width:(e=t.title,e?e.length*Ac.fontSizeFactor:1),height:Ac.labelHeight*ue.getRows(t.title).length,labelpos:\"c\"},\"id\"+w);})),pr().layout(h),o.debug(\"Graph after layout\",h.nodes());var T=n.node();h.nodes().forEach((function(t){void 0!==t&&void 0!==h.node(t)?(o.warn(\"Node \"+t+\": \"+JSON.stringify(h.node(t))),a.select(\"#\"+T.id+\" #\"+t).attr(\"transform\",\"translate(\"+(h.node(t).x-h.node(t).width/2)+\",\"+(h.node(t).y+(Bc[t]?Bc[t].y:0)-h.node(t).height/2)+\" )\"),a.select(\"#\"+T.id+\" #\"+t).attr(\"data-x-shift\",h.node(t).x-h.node(t).width/2),s.querySelectorAll(\"#\"+T.id+\" #\"+t+\" .divider\").forEach((function(t){var e=t.parentElement,n=0,r=0;e&&(e.parentElement&&(n=e.parentElement.getBBox().width),r=parseInt(e.getAttribute(\"data-x-shift\"),10),Number.isNaN(r)&&(r=0)),t.setAttribute(\"x1\",0-r+8),t.setAttribute(\"x2\",n-r-8);}))):o.debug(\"No Node \"+t+\": \"+JSON.stringify(h.node(t)));}));var E=T.getBBox();h.edges().forEach((function(t){void 0!==t&&void 0!==h.edge(t)&&(o.debug(\"Edge \"+t.v+\" -> \"+t.w+\": \"+JSON.stringify(h.edge(t))),function(t,e,n){e.points=e.points.filter((function(t){return !Number.isNaN(t.y)}));var r=e.points,i=(0, l.line)().x((function(t){return t.x})).y((function(t){return t.y})).curve(l.curveBasis),a=t.append(\"path\").attr(\"d\",i(r)).attr(\"id\",\"edge\"+Dc).attr(\"class\",\"transition\"),s=\"\";if(Xt().state.arrowMarkerAbsolute&&(s=(s=(s=window.location.protocol+\"//\"+window.location.host+window.location.pathname+window.location.search).replace(/\\(/g,\"\\\\(\")).replace(/\\)/g,\"\\\\)\")),a.attr(\"marker-end\",\"url(\"+s+\"#\"+function(t){switch(t){case Ec.relationType.AGGREGATION:return \"aggregation\";case Ec.relationType.EXTENSION:return \"extension\";case Ec.relationType.COMPOSITION:return \"composition\";case Ec.relationType.DEPENDENCY:return \"dependency\"}}(Ec.relationType.DEPENDENCY)+\"End)\"),void 0!==n.title){for(var c=t.append(\"g\").attr(\"class\",\"stateLabel\"),u=An.calcLabelPosition(e.points),h=u.x,f=u.y,d=ue.getRows(n.title),p=0,g=[],y=0,m=0,b=0;b<=d.length;b++){var v=c.append(\"text\").attr(\"text-anchor\",\"middle\").text(d[b]).attr(\"x\",h).attr(\"y\",f+p),_=v.node().getBBox();if(y=Math.max(y,_.width),m=Math.min(m,_.x),o.info(_.x,h,f+p),0===p){var x=v.node().getBBox();p=x.height,o.info(\"Title height\",p,f);}g.push(v);}var k=p*d.length;if(d.length>1){var w=(d.length-1)*p*.5;g.forEach((function(t,e){return t.attr(\"y\",f+e*p-w)})),k=p*d.length;}var T=c.node().getBBox();c.insert(\"rect\",\":first-child\").attr(\"class\",\"box\").attr(\"x\",h-y/2-Xt().state.padding/2).attr(\"y\",f-k/2-Xt().state.padding/2-3.5).attr(\"width\",y+Xt().state.padding).attr(\"height\",k+Xt().state.padding),o.info(T);}Dc++;}(n,h.edge(t),h.edge(t).relation));})),E=T.getBBox();var C={id:r||\"root\",label:r||\"root\",width:0,height:0};return C.width=E.width+2*Ac.padding,C.height=E.height+2*Ac.padding,o.debug(\"Doc rendered\",C,h),C};const Ic={setConf:function(){},draw:function(t,e,n,r){Ac=Xt().state;var i,a=Xt().securityLevel;\"sandbox\"===a&&(i=(0, l.select)(\"#i\"+e));var s=\"sandbox\"===a?(0, l.select)(i.nodes()[0].contentDocument.body):(0, l.select)(\"body\"),c=\"sandbox\"===a?i.nodes()[0].contentDocument:document;o.debug(\"Rendering diagram \"+t);var u=s.select(\"[id='\".concat(e,\"']\"));u.append(\"defs\").append(\"marker\").attr(\"id\",\"dependencyEnd\").attr(\"refX\",19).attr(\"refY\",7).attr(\"markerWidth\",20).attr(\"markerHeight\",28).attr(\"orient\",\"auto\").append(\"path\").attr(\"d\",\"M 19,7 L9,13 L14,7 L9,1 Z\"),new(yr().Graph)({multigraph:!0,compound:!0,rankdir:\"RL\"}).setDefaultEdgeLabel((function(){return {}}));var h=r.db.getRootDoc();Lc(h,u,void 0,!1,s,c,r);var f=Ac.padding,d=u.node().getBBox(),p=d.width+2*f,g=d.height+2*f;Tn(u,0,1.75*p,Ac.useMaxWidth),u.attr(\"viewBox\",\"\".concat(d.x-Ac.padding,\"  \").concat(d.y-Ac.padding,\" \")+p+\" \"+g),Mn(r.db,u,e);}};var Fc={},Rc={},Pc=function(t,e,n,r){if(\"root\"!==n.id){var i=\"rect\";!0===n.start&&(i=\"start\"),!1===n.start&&(i=\"end\"),\"default\"!==n.type&&(i=n.type),Rc[n.id]||(Rc[n.id]={id:n.id,shape:i,description:ue.sanitizeText(n.id,Xt()),classes:\"statediagram-state\"}),n.description&&(Array.isArray(Rc[n.id].description)?(Rc[n.id].shape=\"rectWithTitle\",Rc[n.id].description.push(n.description)):Rc[n.id].description.length>0?(Rc[n.id].shape=\"rectWithTitle\",Rc[n.id].description===n.id?Rc[n.id].description=[n.description]:Rc[n.id].description=[Rc[n.id].description,n.description]):(Rc[n.id].shape=\"rect\",Rc[n.id].description=n.description),Rc[n.id].description=ue.sanitizeTextOrArray(Rc[n.id].description,Xt())),1===Rc[n.id].description.length&&\"rectWithTitle\"===Rc[n.id].shape&&(Rc[n.id].shape=\"rect\"),!Rc[n.id].type&&n.doc&&(o.info(\"Setting cluster for \",n.id,Yc(n)),Rc[n.id].type=\"group\",Rc[n.id].dir=Yc(n),Rc[n.id].shape=\"divider\"===n.type?\"divider\":\"roundedWithTitle\",Rc[n.id].classes=Rc[n.id].classes+\" \"+(r?\"statediagram-cluster statediagram-cluster-alt\":\"statediagram-cluster\"));var a={labelStyle:\"\",shape:Rc[n.id].shape,labelText:Rc[n.id].description,classes:Rc[n.id].classes,style:\"\",id:n.id,dir:Rc[n.id].dir,domId:\"state-\"+n.id+\"-\"+jc,type:Rc[n.id].type,padding:15};if(n.note){var s={labelStyle:\"\",shape:\"note\",labelText:n.note.text,classes:\"statediagram-note\",style:\"\",id:n.id+\"----note-\"+jc,domId:\"state-\"+n.id+\"----note-\"+jc,type:Rc[n.id].type,padding:15},c={labelStyle:\"\",shape:\"noteGroup\",labelText:n.note.text,classes:Rc[n.id].classes,style:\"\",id:n.id+\"----parent\",domId:\"state-\"+n.id+\"----parent-\"+jc,type:\"group\",padding:0};jc++,t.setNode(n.id+\"----parent\",c),t.setNode(s.id,s),t.setNode(n.id,a),t.setParent(n.id,n.id+\"----parent\"),t.setParent(s.id,n.id+\"----parent\");var l=n.id,u=s.id;\"left of\"===n.note.position&&(l=s.id,u=n.id),t.setEdge(l,u,{arrowhead:\"none\",arrowType:\"\",style:\"fill:none\",labelStyle:\"\",classes:\"transition note-edge\",arrowheadStyle:\"fill: #333\",labelpos:\"c\",labelType:\"text\",thickness:\"normal\"});}else t.setNode(n.id,a);}e&&\"root\"!==e.id&&(o.trace(\"Setting node \",n.id,\" to be child of its parent \",e.id),t.setParent(n.id,e.id)),n.doc&&(o.trace(\"Adding nodes children \"),zc(t,n,n.doc,!r));},jc=0,zc=function(t,e,n,r){o.trace(\"items\",n),n.forEach((function(n){if(\"state\"===n.stmt||\"default\"===n.stmt)Pc(t,e,n,r);else if(\"relation\"===n.stmt){Pc(t,e,n.state1,r),Pc(t,e,n.state2,r);var i={id:\"edge\"+jc,arrowhead:\"normal\",arrowTypeEnd:\"arrow_barb\",style:\"fill:none\",labelStyle:\"\",label:ue.sanitizeText(n.description,Xt()),arrowheadStyle:\"fill: #333\",labelpos:\"c\",labelType:\"text\",thickness:\"normal\",classes:\"transition\"},a=n.state1.id,o=n.state2.id;t.setEdge(a,o,i,jc),jc++;}}));},Yc=function(t,e){var n=e||\"TB\";if(t.doc)for(var r=0;r<t.doc.length;r++){var i=t.doc[r];\"dir\"===i.stmt&&(n=i.value);}return n};const Uc={setConf:function(t){for(var e=Object.keys(t),n=0;n<e.length;n++)Fc[e[n]]=t[e[n]];},getClasses:function(t,e){return o.trace(\"Extracting classes\"),e.sb.clear(),e.parser.parse(t),e.sb.getClasses()},draw:function(t,e,n,r){o.info(\"Drawing state diagram (v2)\",e),Rc={};var i=r.db.getDirection();void 0===i&&(i=\"LR\");var a=Xt().state,s=a.nodeSpacing||50,c=a.rankSpacing||50,u=Xt().securityLevel;o.info(r.db.getRootDocV2()),r.db.extract(r.db.getRootDocV2()),o.info(r.db.getRootDocV2());var h,f=new(yr().Graph)({multigraph:!0,compound:!0}).setGraph({rankdir:Yc(r.db.getRootDocV2()),nodesep:s,ranksep:c,marginx:8,marginy:8}).setDefaultEdgeLabel((function(){return {}}));Pc(f,void 0,r.db.getRootDocV2(),!0),\"sandbox\"===u&&(h=(0, l.select)(\"#i\"+e));var d=\"sandbox\"===u?(0, l.select)(h.nodes()[0].contentDocument.body):(0, l.select)(\"body\"),p=(\"sandbox\"===u?h.nodes()[0].contentDocument:document,d.select('[id=\"'.concat(e,'\"]'))),g=d.select(\"#\"+e+\" g\");yi(g,f,[\"barb\"],\"statediagram\",e);var y=p.node().getBBox(),m=y.width+16,b=y.height+16;p.attr(\"class\",\"statediagram\");var v=p.node().getBBox();Tn(p,0,m,a.useMaxWidth);var _=\"\".concat(v.x-8,\" \").concat(v.y-8,\" \").concat(m,\" \").concat(b);o.debug(\"viewBox \".concat(_)),p.attr(\"viewBox\",_);for(var x=document.querySelectorAll('[id=\"'+e+'\"] .edgeLabel .label'),k=0;k<x.length;k++){var w=x[k],T=w.getBBox(),E=document.createElementNS(\"http://www.w3.org/2000/svg\",\"rect\");E.setAttribute(\"rx\",0),E.setAttribute(\"ry\",0),E.setAttribute(\"width\",T.width),E.setAttribute(\"height\",T.height),w.insertBefore(E,w.firstChild);}Mn(r.db,p,e);}};function $c(t){return function(t){if(Array.isArray(t))return Wc(t)}(t)||function(t){if(\"undefined\"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t[\"@@iterator\"])return Array.from(t)}(t)||function(t,e){if(t){if(\"string\"==typeof t)return Wc(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return \"Object\"===n&&t.constructor&&(n=t.constructor.name),\"Map\"===n||\"Set\"===n?Array.from(t):\"Arguments\"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Wc(t,e):void 0}}(t)||function(){throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\")}()}function Wc(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var qc=\"\",Hc=[],Vc=[],Gc=[],Xc=function(){for(var t=!0,e=0;e<Gc.length;e++)Gc[e].processed,t=t&&Gc[e].processed;return t};const Zc={parseDirective:function(t,e,n){cu.parseDirective(this,t,e,n);},getConfig:function(){return Xt().journey},clear:function(){Hc.length=0,Vc.length=0,qc=\"\",Gc.length=0,ge();},setDiagramTitle:_e,getDiagramTitle:xe,setAccTitle:ye,getAccTitle:me,setAccDescription:be,getAccDescription:ve,addSection:function(t){qc=t,Hc.push(t);},getSections:function(){return Hc},getTasks:function(){for(var t=Xc(),e=0;!t&&e<100;)t=Xc(),e++;return Vc.push.apply(Vc,Gc),Vc},addTask:function(t,e){var n=e.substr(1).split(\":\"),r=0,i=[];1===n.length?(r=Number(n[0]),i=[]):(r=Number(n[0]),i=n[1].split(\",\"));var a=i.map((function(t){return t.trim()})),o={section:qc,type:qc,people:a,task:t,score:r};Gc.push(o);},addTaskOrg:function(t){var e={section:qc,type:qc,description:t,task:t,classes:[]};Vc.push(e);},getActors:function(){return t=[],Vc.forEach((function(e){e.people&&t.push.apply(t,$c(e.people));})),$c(new Set(t)).sort();var t;}};var Qc=function(t,e){var n=t.append(\"rect\");return n.attr(\"x\",e.x),n.attr(\"y\",e.y),n.attr(\"fill\",e.fill),n.attr(\"stroke\",e.stroke),n.attr(\"width\",e.width),n.attr(\"height\",e.height),n.attr(\"rx\",e.rx),n.attr(\"ry\",e.ry),void 0!==e.class&&n.attr(\"class\",e.class),n},Kc=function(t,e){var n=t.append(\"circle\");return n.attr(\"cx\",e.cx),n.attr(\"cy\",e.cy),n.attr(\"class\",\"actor-\"+e.pos),n.attr(\"fill\",e.fill),n.attr(\"stroke\",e.stroke),n.attr(\"r\",e.r),void 0!==n.class&&n.attr(\"class\",n.class),void 0!==e.title&&n.append(\"title\").text(e.title),n},Jc=-1,tl=function(){function t(t,e,n,i,a,o,s,c){r(e.append(\"text\").attr(\"x\",n+a/2).attr(\"y\",i+o/2+5).style(\"font-color\",c).style(\"text-anchor\",\"middle\").text(t),s);}function e(t,e,n,i,a,o,s,c,l){for(var u=c.taskFontSize,h=c.taskFontFamily,f=t.split(/<br\\s*\\/?>/gi),d=0;d<f.length;d++){var p=d*u-u*(f.length-1)/2,g=e.append(\"text\").attr(\"x\",n+a/2).attr(\"y\",i).attr(\"fill\",l).style(\"text-anchor\",\"middle\").style(\"font-size\",u).style(\"font-family\",h);g.append(\"tspan\").attr(\"x\",n+a/2).attr(\"dy\",p).text(f[d]),g.attr(\"y\",i+o/2).attr(\"dominant-baseline\",\"central\").attr(\"alignment-baseline\",\"central\"),r(g,s);}}function n(t,n,i,a,o,s,c,l){var u=n.append(\"switch\"),h=u.append(\"foreignObject\").attr(\"x\",i).attr(\"y\",a).attr(\"width\",o).attr(\"height\",s).attr(\"position\",\"fixed\").append(\"xhtml:div\").style(\"display\",\"table\").style(\"height\",\"100%\").style(\"width\",\"100%\");h.append(\"div\").attr(\"class\",\"label\").style(\"display\",\"table-cell\").style(\"text-align\",\"center\").style(\"vertical-align\",\"middle\").text(t),e(t,u,i,a,o,s,c,l),r(h,c);}function r(t,e){for(var n in e)n in e&&t.attr(n,e[n]);}return function(r){return \"fo\"===r.textPlacement?n:\"old\"===r.textPlacement?t:e}}();const el=Kc,nl=function(t,e,n){var r=t.append(\"g\"),i={x:0,y:0,width:100,anchor:\"start\",height:100,rx:0,ry:0};i.x=e.x,i.y=e.y,i.fill=e.fill,i.width=n.width,i.height=n.height,i.class=\"journey-section section-type-\"+e.num,i.rx=3,i.ry=3,Qc(r,i),tl(n)(e.text,r,i.x,i.y,i.width,i.height,{class:\"journey-section section-type-\"+e.num},n,e.colour);},rl=function(t,e){var n=e.text.replace(/<br\\s*\\/?>/gi,\" \"),r=t.append(\"text\");r.attr(\"x\",e.x),r.attr(\"y\",e.y),r.attr(\"class\",\"legend\"),r.style(\"text-anchor\",e.anchor),void 0!==e.class&&r.attr(\"class\",e.class);var i=r.append(\"tspan\");return i.attr(\"x\",e.x+2*e.textMargin),i.text(n),r},il=function(t,e,n){var r,i,a,o=e.x+n.width/2,s=t.append(\"g\");Jc++,s.append(\"line\").attr(\"id\",\"task\"+Jc).attr(\"x1\",o).attr(\"y1\",e.y).attr(\"x2\",o).attr(\"y2\",450).attr(\"class\",\"task-line\").attr(\"stroke-width\",\"1px\").attr(\"stroke-dasharray\",\"4 2\").attr(\"stroke\",\"#666\"),r=s,i={cx:o,cy:300+30*(5-e.score),score:e.score},r.append(\"circle\").attr(\"cx\",i.cx).attr(\"cy\",i.cy).attr(\"class\",\"face\").attr(\"r\",15).attr(\"stroke-width\",2).attr(\"overflow\",\"visible\"),(a=r.append(\"g\")).append(\"circle\").attr(\"cx\",i.cx-5).attr(\"cy\",i.cy-5).attr(\"r\",1.5).attr(\"stroke-width\",2).attr(\"fill\",\"#666\").attr(\"stroke\",\"#666\"),a.append(\"circle\").attr(\"cx\",i.cx+5).attr(\"cy\",i.cy-5).attr(\"r\",1.5).attr(\"stroke-width\",2).attr(\"fill\",\"#666\").attr(\"stroke\",\"#666\"),i.score>3?function(t){var e=(0, l.arc)().startAngle(Math.PI/2).endAngle(Math.PI/2*3).innerRadius(7.5).outerRadius(15/2.2);t.append(\"path\").attr(\"class\",\"mouth\").attr(\"d\",e).attr(\"transform\",\"translate(\"+i.cx+\",\"+(i.cy+2)+\")\");}(a):i.score<3?function(t){var e=(0, l.arc)().startAngle(3*Math.PI/2).endAngle(Math.PI/2*5).innerRadius(7.5).outerRadius(15/2.2);t.append(\"path\").attr(\"class\",\"mouth\").attr(\"d\",e).attr(\"transform\",\"translate(\"+i.cx+\",\"+(i.cy+7)+\")\");}(a):function(t){t.append(\"line\").attr(\"class\",\"mouth\").attr(\"stroke\",2).attr(\"x1\",i.cx-5).attr(\"y1\",i.cy+7).attr(\"x2\",i.cx+5).attr(\"y2\",i.cy+7).attr(\"class\",\"mouth\").attr(\"stroke-width\",\"1px\").attr(\"stroke\",\"#666\");}(a);var c={x:0,y:0,width:100,anchor:\"start\",height:100,rx:0,ry:0};c.x=e.x,c.y=e.y,c.fill=e.fill,c.width=n.width,c.height=n.height,c.class=\"task task-type-\"+e.num,c.rx=3,c.ry=3,Qc(s,c);var u=e.x+14;e.people.forEach((function(t){var n=e.actors[t].color,r={cx:u,cy:e.y,r:7,fill:n,stroke:\"#000\",title:t,pos:e.actors[t].position};Kc(s,r),u+=10;})),tl(n)(e.task,s,c.x,c.y,c.width,c.height,{class:\"task\"},n,e.colour);};var al={},ol=Xt().journey,sl=Xt().journey.leftMargin,cl={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],init:function(){this.sequenceItems=[],this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0;},updateVal:function(t,e,n,r){void 0===t[e]?t[e]=n:t[e]=r(n,t[e]);},updateBounds:function(t,e,n,r){var i=Xt().journey,a=this,o=0;this.sequenceItems.forEach((function(s){o++;var c=a.sequenceItems.length-o+1;a.updateVal(s,\"starty\",e-c*i.boxMargin,Math.min),a.updateVal(s,\"stopy\",r+c*i.boxMargin,Math.max),a.updateVal(cl.data,\"startx\",t-c*i.boxMargin,Math.min),a.updateVal(cl.data,\"stopx\",n+c*i.boxMargin,Math.max),a.updateVal(s,\"startx\",t-c*i.boxMargin,Math.min),a.updateVal(s,\"stopx\",n+c*i.boxMargin,Math.max),a.updateVal(cl.data,\"starty\",e-c*i.boxMargin,Math.min),a.updateVal(cl.data,\"stopy\",r+c*i.boxMargin,Math.max);}));},insert:function(t,e,n,r){var i=Math.min(t,n),a=Math.max(t,n),o=Math.min(e,r),s=Math.max(e,r);this.updateVal(cl.data,\"startx\",i,Math.min),this.updateVal(cl.data,\"starty\",o,Math.min),this.updateVal(cl.data,\"stopx\",a,Math.max),this.updateVal(cl.data,\"stopy\",s,Math.max),this.updateBounds(i,o,a,s);},bumpVerticalPos:function(t){this.verticalPos=this.verticalPos+t,this.data.stopy=this.verticalPos;},getVerticalPos:function(){return this.verticalPos},getBounds:function(){return this.data}},ll=ol.sectionFills,ul=ol.sectionColours;const hl={setConf:function(t){Object.keys(t).forEach((function(e){ol[e]=t[e];}));},draw:function(t,e,n,r){var i=Xt().journey;r.db.clear(),r.parser.parse(t+\"\\n\");var a,o=Xt().securityLevel;\"sandbox\"===o&&(a=(0, l.select)(\"#i\"+e));var s=\"sandbox\"===o?(0, l.select)(a.nodes()[0].contentDocument.body):(0, l.select)(\"body\");cl.init();var c=s.select(\"#\"+e);c.append(\"defs\").append(\"marker\").attr(\"id\",\"arrowhead\").attr(\"refX\",5).attr(\"refY\",2).attr(\"markerWidth\",6).attr(\"markerHeight\",4).attr(\"orient\",\"auto\").append(\"path\").attr(\"d\",\"M 0,0 V 4 L6,2 Z\");var u=r.db.getTasks(),h=r.db.getDiagramTitle(),f=r.db.getActors();for(var d in al)delete al[d];var p=0;f.forEach((function(t){al[t]={color:i.actorColours[p%i.actorColours.length],position:p},p++;})),function(t){var e=Xt().journey,n=60;Object.keys(al).forEach((function(r){var i=al[r].color,a={cx:20,cy:n,r:7,fill:i,stroke:\"#000\",pos:al[r].position};el(t,a);var o={x:40,y:n+7,fill:\"#666\",text:r,textMargin:5|e.boxTextMargin};rl(t,o),n+=20;}));}(c),cl.insert(0,0,sl,50*Object.keys(al).length),function(t,e,n){for(var r=Xt().journey,i=\"\",a=n+(2*r.height+r.diagramMarginY),o=0,s=\"#CCC\",c=\"black\",l=0,u=0;u<e.length;u++){var h=e[u];if(i!==h.section){s=ll[o%ll.length],l=o%ll.length,c=ul[o%ul.length];var f={x:u*r.taskMargin+u*r.width+sl,y:50,text:h.section,fill:s,num:l,colour:c};nl(t,f,r),i=h.section,o++;}var d=h.people.reduce((function(t,e){return al[e]&&(t[e]=al[e]),t}),{});h.x=u*r.taskMargin+u*r.width+sl,h.y=a,h.width=r.diagramMarginX,h.height=r.diagramMarginY,h.colour=c,h.fill=s,h.num=l,h.actors=d,il(t,h,r),cl.insert(h.x,h.y,h.x+h.width+r.taskMargin,450);}}(c,u,0);var g=cl.getBounds();h&&c.append(\"text\").text(h).attr(\"x\",sl).attr(\"font-size\",\"4ex\").attr(\"font-weight\",\"bold\").attr(\"y\",25);var y=g.stopy-g.starty+2*i.diagramMarginY,m=sl+g.stopx+2*i.diagramMarginX;Tn(c,0,m,i.useMaxWidth),c.append(\"line\").attr(\"x1\",sl).attr(\"y1\",4*i.height).attr(\"x2\",m-sl-4).attr(\"y2\",4*i.height).attr(\"stroke-width\",4).attr(\"stroke\",\"black\").attr(\"marker-end\",\"url(#arrowhead)\");var b=h?70:0;c.attr(\"viewBox\",\"\".concat(g.startx,\" -25 \").concat(m,\" \").concat(y+b)),c.attr(\"preserveAspectRatio\",\"xMinYMin meet\"),c.attr(\"height\",y+b+25),Mn(r.db,c,e);}};var fl=n(9763),dl=n.n(fl),pl={c4:{db:Pe,renderer:Zn,parser:He(),init:function(t){Zn.setConf(t.c4);}},class:{db:fr,renderer:Sr,parser:xi(),init:function(t){t.class.arrowMarkerAbsolute=t.arrowMarkerAbsolute,fr.clear();}},error:{db:{},renderer:Bi,parser:{parser:{yy:{}},parse:function(){}},init:function(){}},classDiagram:{db:fr,renderer:vi,parser:xi(),init:function(t){t.class.arrowMarkerAbsolute=t.arrowMarkerAbsolute,fr.clear();}},er:{db:Ei,renderer:Oi,parser:Ii()},flowchart:{db:la,renderer:Na,parser:Fa(),init:function(t){Na.setConf(t.flowchart),t.flowchart.arrowMarkerAbsolute=t.arrowMarkerAbsolute,la.clear(),la.setGen(\"gen-1\");}},\"flowchart-v2\":{db:la,renderer:La,parser:Fa(),init:function(t){La.setConf(t.flowchart),t.flowchart.arrowMarkerAbsolute=t.arrowMarkerAbsolute,la.clear(),la.setGen(\"gen-2\");}},gantt:{db:go,renderer:bo,parser:_o(),init:function(t){bo.setConf(t.gantt);}},info:{db:wo,renderer:To,parser:Co()},pie:{db:Oo,renderer:Lo,parser:Ao()},requirement:{db:Uo,renderer:Qo,parser:Fo()},sequence:{db:bs,renderer:cc,parser:ts(),init:function(t){t.sequence.arrowMarkerAbsolute=t.arrowMarkerAbsolute,t.sequenceDiagram&&(cc.setConf(Object.assign(t.sequence,t.sequenceDiagram)),console.error(\"`mermaid config.sequenceDiagram` has been renamed to `config.sequence`. Please update your mermaid config.\")),bs.setWrap(t.wrap),cc.setConf(t.sequence);}},state:{db:Ec,renderer:Ic,parser:uc(),init:function(t){t.class.arrowMarkerAbsolute=t.arrowMarkerAbsolute,Ec.clear();}},stateDiagram:{db:Ec,renderer:Uc,parser:uc(),init:function(t){t.class.arrowMarkerAbsolute=t.arrowMarkerAbsolute,Ec.clear();}},journey:{db:Zc,renderer:hl,parser:dl(),init:function(t){hl.setConf(t.journey),Zc.clear();}}},gl=function(){return pl};function yl(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r);}return n}function ml(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?yl(Object(n),!0).forEach((function(e){bl(t,e,n[e]);})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):yl(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e));}));}return t}function bl(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var vl=Xt().gitGraph.mainBranchName,_l=Xt().gitGraph.mainBranchOrder,xl={},kl=null,wl={};wl[vl]={name:vl,order:_l};var Tl={};Tl[vl]=kl;var El=vl,Cl=\"LR\",Sl=0;function Al(){return yn({length:7})}var Ml={},Nl=function(t){if(t=ue.sanitizeText(t,Xt()),void 0===Tl[t]){var e=new Error('Trying to checkout branch which is not yet created. (Help try using \"branch '+t+'\")');throw e.hash={text:\"checkout \"+t,token:\"checkout \"+t,line:\"1\",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:['\"branch '+t+'\"']},e}var n=Tl[El=t];kl=xl[n];};function Ol(t,e,n){var r=t.indexOf(e);-1===r?t.push(n):t.splice(r,1,n);}function Dl(t){var e=t.reduce((function(t,e){return t.seq>e.seq?t:e}),t[0]),n=\"\";t.forEach((function(t){n+=t===e?\"\\t*\":\"\\t|\";}));var r,i,a,s=[n,e.id,e.seq];for(var c in Tl)Tl[c]===e.id&&s.push(c);if(o.debug(s.join(\" \")),e.parents&&2==e.parents.length){var l=xl[e.parents[0]];Ol(t,e,l),t.push(xl[e.parents[1]]);}else {if(0==e.parents.length)return;var u=xl[e.parents];Ol(t,e,u);}r=t,i=function(t){return t.id},a=Object.create(null),Dl(t=r.reduce((function(t,e){var n=i(e);return a[n]||(a[n]=!0,t.push(e)),t}),[]));}var Bl=function(){var t=Object.keys(xl).map((function(t){return xl[t]}));return t.forEach((function(t){o.debug(t.id);})),t.sort((function(t,e){return t.seq-e.seq})),t},Ll={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4};const Il={parseDirective:function(t,e,n){cu.parseDirective(this,t,e,n);},getConfig:function(){return Xt().gitGraph},setDirection:function(t){Cl=t;},setOptions:function(t){o.debug(\"options str\",t),t=(t=t&&t.trim())||\"{}\";try{Ml=JSON.parse(t);}catch(t){o.error(\"error while parsing gitGraph options\",t.message);}},getOptions:function(){return Ml},commit:function(t,e,n,r){o.debug(\"Entering commit:\",t,e,n,r),e=ue.sanitizeText(e,Xt()),t=ue.sanitizeText(t,Xt()),r=ue.sanitizeText(r,Xt());var i={id:e||Sl+\"-\"+Al(),message:t,seq:Sl++,type:n||Ll.NORMAL,tag:r||\"\",parents:null==kl?[]:[kl.id],branch:El};kl=i,xl[i.id]=i,Tl[El]=i.id,o.debug(\"in pushCommit \"+i.id);},branch:function(t,e){if(t=ue.sanitizeText(t,Xt()),void 0!==Tl[t]){var n=new Error('Trying to create an existing branch. (Help: Either use a new name if you want create a new branch or try using \"checkout '+t+'\")');throw n.hash={text:\"branch \"+t,token:\"branch \"+t,line:\"1\",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:['\"checkout '+t+'\"']},n}Tl[t]=null!=kl?kl.id:null,wl[t]={name:t,order:e?parseInt(e,10):null},Nl(t),o.debug(\"in createBranch\");},merge:function(t,e,n,r){t=ue.sanitizeText(t,Xt()),e=ue.sanitizeText(e,Xt());var i=xl[Tl[El]],a=xl[Tl[t]];if(El===t){var s=new Error('Incorrect usage of \"merge\". Cannot merge a branch to itself');throw s.hash={text:\"merge \"+t,token:\"merge \"+t,line:\"1\",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:[\"branch abc\"]},s}if(void 0===i||!i){var c=new Error('Incorrect usage of \"merge\". Current branch ('+El+\")has no commits\");throw c.hash={text:\"merge \"+t,token:\"merge \"+t,line:\"1\",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:[\"commit\"]},c}if(void 0===Tl[t]){var l=new Error('Incorrect usage of \"merge\". Branch to be merged ('+t+\") does not exist\");throw l.hash={text:\"merge \"+t,token:\"merge \"+t,line:\"1\",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:[\"branch \"+t]},l}if(void 0===a||!a){var u=new Error('Incorrect usage of \"merge\". Branch to be merged ('+t+\") has no commits\");throw u.hash={text:\"merge \"+t,token:\"merge \"+t,line:\"1\",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:['\"commit\"']},u}if(i===a){var h=new Error('Incorrect usage of \"merge\". Both branches have same head');throw h.hash={text:\"merge \"+t,token:\"merge \"+t,line:\"1\",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:[\"branch abc\"]},h}if(e&&void 0!==xl[e]){var f=new Error('Incorrect usage of \"merge\". Commit with id:'+e+\" already exists, use different custom Id\");throw f.hash={text:\"merge \"+t+e+n+r,token:\"merge \"+t+e+n+r,line:\"1\",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:[\"merge \"+t+\" \"+e+\"_UNIQUE \"+n+\" \"+r]},f}var d={id:e||Sl+\"-\"+Al(),message:\"merged branch \"+t+\" into \"+El,seq:Sl++,parents:[null==kl?null:kl.id,Tl[t]],branch:El,type:Ll.MERGE,customType:n,customId:!!e,tag:r||\"\"};kl=d,xl[d.id]=d,Tl[El]=d.id,o.debug(Tl),o.debug(\"in mergeBranch\");},cherryPick:function(t,e){if(t=ue.sanitizeText(t,Xt()),e=ue.sanitizeText(e,Xt()),!t||void 0===xl[t]){var n=new Error('Incorrect usage of \"cherryPick\". Source commit id should exist and provided');throw n.hash={text:\"cherryPick \"+t+\" \"+e,token:\"cherryPick \"+t+\" \"+e,line:\"1\",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:[\"cherry-pick abc\"]},n}var r=xl[t],i=r.branch;if(r.type===Ll.MERGE){var a=new Error('Incorrect usage of \"cherryPick\". Source commit should not be a merge commit');throw a.hash={text:\"cherryPick \"+t+\" \"+e,token:\"cherryPick \"+t+\" \"+e,line:\"1\",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:[\"cherry-pick abc\"]},a}if(!e||void 0===xl[e]){if(i===El){var s=new Error('Incorrect usage of \"cherryPick\". Source commit is already on current branch');throw s.hash={text:\"cherryPick \"+t+\" \"+e,token:\"cherryPick \"+t+\" \"+e,line:\"1\",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:[\"cherry-pick abc\"]},s}var c=xl[Tl[El]];if(void 0===c||!c){var l=new Error('Incorrect usage of \"cherry-pick\". Current branch ('+El+\")has no commits\");throw l.hash={text:\"cherryPick \"+t+\" \"+e,token:\"cherryPick \"+t+\" \"+e,line:\"1\",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:[\"cherry-pick abc\"]},l}var u={id:Sl+\"-\"+Al(),message:\"cherry-picked \"+r+\" into \"+El,seq:Sl++,parents:[null==kl?null:kl.id,r.id],branch:El,type:Ll.CHERRY_PICK,tag:\"cherry-pick:\"+r.id};kl=u,xl[u.id]=u,Tl[El]=u.id,o.debug(Tl),o.debug(\"in cheeryPick\");}},checkout:Nl,prettyPrint:function(){o.debug(xl),Dl([Bl()[0]]);},clear:function(){xl={},kl=null;var t=Xt().gitGraph.mainBranchName,e=Xt().gitGraph.mainBranchOrder;(Tl={})[t]=null,(wl={})[t]={name:t,order:e},El=t,Sl=0,ge();},getBranchesAsObjArray:function(){return Object.values(wl).map((function(t,e){return null!==t.order?t:ml(ml({},t),{},{order:parseFloat(\"0.\".concat(e),10)})})).sort((function(t,e){return t.order-e.order})).map((function(t){return {name:t.name}}))},getBranches:function(){return Tl},getCommits:function(){return xl},getCommitsArray:Bl,getCurrentBranch:function(){return El},getDirection:function(){return Cl},getHead:function(){return kl},setAccTitle:ye,getAccTitle:me,getAccDescription:ve,setAccDescription:be,commitType:Ll};var Fl={},Rl={},Pl={},jl=[],zl=0,Yl=function(t,e,n){var r=Xt().gitGraph,i=t.append(\"g\").attr(\"class\",\"commit-bullets\"),a=t.append(\"g\").attr(\"class\",\"commit-labels\"),o=0;Object.keys(e).sort((function(t,n){return e[t].seq-e[n].seq})).forEach((function(t,s){var c=e[t],l=Rl[c.branch].pos,u=o+10;if(n){var h,f=void 0!==c.customType&&\"\"!==c.customType?c.customType:c.type;switch(f){case 0:default:h=\"commit-normal\";break;case 1:h=\"commit-reverse\";break;case 2:h=\"commit-highlight\";break;case 3:h=\"commit-merge\";break;case 4:h=\"commit-cherry-pick\";}if(2===f){var d=i.append(\"rect\");d.attr(\"x\",u-10),d.attr(\"y\",l-10),d.attr(\"height\",20),d.attr(\"width\",20),d.attr(\"class\",\"commit \".concat(c.id,\" commit-highlight\").concat(Rl[c.branch].index%8,\" \").concat(h,\"-outer\")),i.append(\"rect\").attr(\"x\",u-6).attr(\"y\",l-6).attr(\"height\",12).attr(\"width\",12).attr(\"class\",\"commit \".concat(c.id,\" commit\").concat(Rl[c.branch].index%8,\" \").concat(h,\"-inner\"));}else if(4===f)i.append(\"circle\").attr(\"cx\",u).attr(\"cy\",l).attr(\"r\",10).attr(\"class\",\"commit \".concat(c.id,\" \").concat(h)),i.append(\"circle\").attr(\"cx\",u-3).attr(\"cy\",l+2).attr(\"r\",2.75).attr(\"fill\",\"#fff\").attr(\"class\",\"commit \".concat(c.id,\" \").concat(h)),i.append(\"circle\").attr(\"cx\",u+3).attr(\"cy\",l+2).attr(\"r\",2.75).attr(\"fill\",\"#fff\").attr(\"class\",\"commit \".concat(c.id,\" \").concat(h)),i.append(\"line\").attr(\"x1\",u+3).attr(\"y1\",l+1).attr(\"x2\",u).attr(\"y2\",l-5).attr(\"stroke\",\"#fff\").attr(\"class\",\"commit \".concat(c.id,\" \").concat(h)),i.append(\"line\").attr(\"x1\",u-3).attr(\"y1\",l+1).attr(\"x2\",u).attr(\"y2\",l-5).attr(\"stroke\",\"#fff\").attr(\"class\",\"commit \".concat(c.id,\" \").concat(h));else {var p=i.append(\"circle\");if(p.attr(\"cx\",u),p.attr(\"cy\",l),p.attr(\"r\",3===c.type?9:10),p.attr(\"class\",\"commit \".concat(c.id,\" commit\").concat(Rl[c.branch].index%8)),3===f){var g=i.append(\"circle\");g.attr(\"cx\",u),g.attr(\"cy\",l),g.attr(\"r\",6),g.attr(\"class\",\"commit \".concat(h,\" \").concat(c.id,\" commit\").concat(Rl[c.branch].index%8));}1===f&&i.append(\"path\").attr(\"d\",\"M \".concat(u-5,\",\").concat(l-5,\"L\").concat(u+5,\",\").concat(l+5,\"M\").concat(u-5,\",\").concat(l+5,\"L\").concat(u+5,\",\").concat(l-5)).attr(\"class\",\"commit \".concat(h,\" \").concat(c.id,\" commit\").concat(Rl[c.branch].index%8));}}if(Pl[c.id]={x:o+10,y:l},n){if(4!==c.type&&(c.customId&&3===c.type||3!==c.type)&&r.showCommitLabel){var y=a.append(\"g\"),m=y.insert(\"rect\").attr(\"class\",\"commit-label-bkg\"),b=y.append(\"text\").attr(\"x\",o).attr(\"y\",l+25).attr(\"class\",\"commit-label\").text(c.id),v=b.node().getBBox();if(m.attr(\"x\",o+10-v.width/2-2).attr(\"y\",l+13.5).attr(\"width\",v.width+4).attr(\"height\",v.height+4),b.attr(\"x\",o+10-v.width/2),r.rotateCommitLabel){var _=-7.5-(v.width+10)/25*9.5,x=10+v.width/25*8.5;y.attr(\"transform\",\"translate(\"+_+\", \"+x+\") rotate(-45, \"+o+\", \"+l+\")\");}}if(c.tag){var k=a.insert(\"polygon\"),w=a.append(\"circle\"),T=a.append(\"text\").attr(\"y\",l-16).attr(\"class\",\"tag-label\").text(c.tag),E=T.node().getBBox();T.attr(\"x\",o+10-E.width/2);var C=E.height/2,S=l-19.2;k.attr(\"class\",\"tag-label-bkg\").attr(\"points\",\"\\n          \".concat(o-E.width/2-2,\",\").concat(S+2,\"\\n          \").concat(o-E.width/2-2,\",\").concat(S-2,\"\\n          \").concat(o+10-E.width/2-4,\",\").concat(S-C-2,\"\\n          \").concat(o+10+E.width/2+4,\",\").concat(S-C-2,\"\\n          \").concat(o+10+E.width/2+4,\",\").concat(S+C+2,\"\\n          \").concat(o+10-E.width/2-4,\",\").concat(S+C+2)),w.attr(\"cx\",o-E.width/2+2).attr(\"cy\",S).attr(\"r\",1.5).attr(\"class\",\"tag-hole\");}}(o+=50)>zl&&(zl=o);}));},Ul=function t(e,n,r){var i=r||0,a=e+Math.abs(e-n)/2;if(i>5)return a;for(var o=!0,s=0;s<jl.length;s++)Math.abs(jl[s]-a)<10&&(o=!1);return o?(jl.push(a),a):t(e,n-Math.abs(e-n)/5,i+1)};const $l={draw:function(t,e,n,r){Rl={},Pl={},Fl={},zl=0,jl=[];var i=Xt(),a=Xt().gitGraph;o.debug(\"in gitgraph renderer\",t+\"\\n\",\"id:\",e,n),Fl=r.db.getCommits();var s=r.db.getBranchesAsObjArray(),c=0;s.forEach((function(t,e){Rl[t.name]={pos:c,index:e},c+=50+(a.rotateCommitLabel?40:0);}));var u=(0, l.select)('[id=\"'.concat(e,'\"]'));Mn(r.db,u,e),Yl(u,Fl,!1),a.showBranches&&function(t,e){var n=Xt().gitGraph,r=t.append(\"g\");e.forEach((function(t,e){var i=e%8,a=Rl[t.name].pos,o=r.append(\"line\");o.attr(\"x1\",0),o.attr(\"y1\",a),o.attr(\"x2\",zl),o.attr(\"y2\",a),o.attr(\"class\",\"branch branch\"+i),jl.push(a);var s=function(t){var e=document.createElementNS(\"http://www.w3.org/2000/svg\",\"text\"),n=[];n=\"string\"==typeof t?t.split(/\\\\n|\\n|<br\\s*\\/?>/gi):Array.isArray(t)?t:[];for(var r=0;r<n.length;r++){var i=document.createElementNS(\"http://www.w3.org/2000/svg\",\"tspan\");i.setAttributeNS(\"http://www.w3.org/XML/1998/namespace\",\"xml:space\",\"preserve\"),i.setAttribute(\"dy\",\"1em\"),i.setAttribute(\"x\",\"0\"),i.setAttribute(\"class\",\"row\"),i.textContent=n[r].trim(),e.appendChild(i);}return e}(t.name),c=r.insert(\"rect\"),l=r.insert(\"g\").attr(\"class\",\"branchLabel\").insert(\"g\").attr(\"class\",\"label branch-label\"+i);l.node().appendChild(s);var u=s.getBBox();c.attr(\"class\",\"branchLabelBkg label\"+i).attr(\"rx\",4).attr(\"ry\",4).attr(\"x\",-u.width-4-(!0===n.rotateCommitLabel?30:0)).attr(\"y\",-u.height/2+8).attr(\"width\",u.width+18).attr(\"height\",u.height+4),l.attr(\"transform\",\"translate(\"+(-u.width-14-(!0===n.rotateCommitLabel?30:0))+\", \"+(a-u.height/2-1)+\")\"),c.attr(\"transform\",\"translate(-19, \"+(a-u.height/2)+\")\");}));}(u,s),function(t,e){var n=t.append(\"g\").attr(\"class\",\"commit-arrows\");Object.keys(e).forEach((function(t,r){var i=e[t];i.parents&&i.parents.length>0&&i.parents.forEach((function(t){!function(t,e,n,r){var i=Xt(),a=Pl[e.id],o=Pl[n.id],s=function(t,e,n){return Pl[e.id],Pl[t.id],Object.keys(n).filter((function(r){return n[r].branch===e.branch&&n[r].seq>t.seq&&n[r].seq<e.seq})).length>0}(e,n,r);i.arrowMarkerAbsolute&&(window.location.protocol+\"//\"+window.location.host+window.location.pathname+window.location.search).replace(/\\(/g,\"\\\\(\").replace(/\\)/g,\"\\\\)\");var c,l=\"\",u=\"\",h=0,f=0,d=Rl[n.branch].index;if(s){l=\"A 10 10, 0, 0, 0,\",u=\"A 10 10, 0, 0, 1,\",h=10,f=10,d=Rl[n.branch].index;var p=a.y<o.y?Ul(a.y,o.y):Ul(o.y,a.y);c=a.y<o.y?\"M \".concat(a.x,\" \").concat(a.y,\" L \").concat(a.x,\" \").concat(p-h,\" \").concat(l,\" \").concat(a.x+f,\" \").concat(p,\" L \").concat(o.x-h,\" \").concat(p,\" \").concat(u,\" \").concat(o.x,\" \").concat(p+f,\" L \").concat(o.x,\" \").concat(o.y):\"M \".concat(a.x,\" \").concat(a.y,\" L \").concat(a.x,\" \").concat(p+h,\" \").concat(u,\" \").concat(a.x+f,\" \").concat(p,\" L \").concat(o.x-h,\" \").concat(p,\" \").concat(l,\" \").concat(o.x,\" \").concat(p-f,\" L \").concat(o.x,\" \").concat(o.y);}else a.y<o.y&&(l=\"A 20 20, 0, 0, 0,\",h=20,f=20,d=Rl[n.branch].index,c=\"M \".concat(a.x,\" \").concat(a.y,\" L \").concat(a.x,\" \").concat(o.y-h,\" \").concat(l,\" \").concat(a.x+f,\" \").concat(o.y,\" L \").concat(o.x,\" \").concat(o.y)),a.y>o.y&&(l=\"A 20 20, 0, 0, 0,\",h=20,f=20,d=Rl[e.branch].index,c=\"M \".concat(a.x,\" \").concat(a.y,\" L \").concat(o.x-h,\" \").concat(a.y,\" \").concat(l,\" \").concat(o.x,\" \").concat(a.y-f,\" L \").concat(o.x,\" \").concat(o.y)),a.y===o.y&&(d=Rl[e.branch].index,c=\"M \".concat(a.x,\" \").concat(a.y,\" L \").concat(a.x,\" \").concat(o.y-h,\" \").concat(l,\" \").concat(a.x+f,\" \").concat(o.y,\" L \").concat(o.x,\" \").concat(o.y));t.append(\"path\").attr(\"d\",c).attr(\"class\",\"arrow arrow\"+d%8);}(n,e[t],i,e);}));}));}(u,Fl),Yl(u,Fl,!0);var h=a.diagramPadding,f=u.node().getBBox(),d=f.width+2*h,p=f.height+2*h;Tn(u,0,d,i.useMaxWidth);var g=\"\".concat(f.x-h-(a.showBranches&&!0===a.rotateCommitLabel?30:0),\" \").concat(f.y-h,\" \").concat(d,\" \").concat(p);u.attr(\"viewBox\",g);}};var Wl=n(2553),ql=n.n(Wl);const Hl=function(t){return t.match(/^\\s*gitGraph/)?\"gitGraph\":null},Vl=function(){var t,e,n,r,i,a;t=\"gitGraph\",e=ql(),n=Il,r=$l,i=void 0,a=Hl,pl[t]={parser:e,db:n,renderer:r,init:i},function(t,e){Xe[t]={detector:e};}(t,a);};function Gl(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,\"value\"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r);}}function Xl(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Zl=function(){function t(e){var n,r;!function(t,e){if(!(t instanceof e))throw new TypeError(\"Cannot call a class as a function\")}(this,t),Xl(this,\"type\",\"graph\"),Xl(this,\"parser\",void 0),Xl(this,\"renderer\",void 0),Xl(this,\"db\",void 0);var i=gl(),a=Xt();this.txt=e,this.type=Ze(e,a),o.debug(\"Type \"+this.type),this.db=i[this.type].db,null===(n=(r=this.db).clear)||void 0===n||n.call(r),this.renderer=i[this.type].renderer,this.parser=i[this.type].parser,this.parser.parser.yy=this.db,\"function\"==typeof i[this.type].init&&(i[this.type].init(a),o.debug(\"Initialized diagram \"+this.type,a)),this.txt=this.txt+\"\\n\",this.parser.parser.yy.graphType=this.type,this.parser.parser.yy.parseError=function(t,e){throw {str:t,hash:e}},this.parser.parse(this.txt);}var e,r;return e=t,(r=[{key:\"parse\",value:function(t){var e=!1;try{t+=\"\\n\",this.db.clear(),this.parser.parse(t);}catch(t){if(e=!0,!n.g.mermaid.parseError)throw t;null!=t.str?n.g.mermaid.parseError(t.str,t.hash):n.g.mermaid.parseError(t);}return !e}},{key:\"getParser\",value:function(){return this.parser}},{key:\"getType\",value:function(){return this.type}}])&&Gl(e.prototype,r),Object.defineProperty(e,\"prototype\",{writable:!1}),t}();const Ql=Zl,Kl=function(t){return \"g.classGroup text {\\n  fill: \".concat(t.nodeBorder,\";\\n  fill: \").concat(t.classText,\";\\n  stroke: none;\\n  font-family: \").concat(t.fontFamily,\";\\n  font-size: 10px;\\n\\n  .title {\\n    font-weight: bolder;\\n  }\\n\\n}\\n\\n.nodeLabel, .edgeLabel {\\n  color: \").concat(t.classText,\";\\n}\\n.edgeLabel .label rect {\\n  fill: \").concat(t.mainBkg,\";\\n}\\n.label text {\\n  fill: \").concat(t.classText,\";\\n}\\n.edgeLabel .label span {\\n  background: \").concat(t.mainBkg,\";\\n}\\n\\n.classTitle {\\n  font-weight: bolder;\\n}\\n.node rect,\\n  .node circle,\\n  .node ellipse,\\n  .node polygon,\\n  .node path {\\n    fill: \").concat(t.mainBkg,\";\\n    stroke: \").concat(t.nodeBorder,\";\\n    stroke-width: 1px;\\n  }\\n\\n\\n.divider {\\n  stroke: \").concat(t.nodeBorder,\";\\n  stroke: 1;\\n}\\n\\ng.clickable {\\n  cursor: pointer;\\n}\\n\\ng.classGroup rect {\\n  fill: \").concat(t.mainBkg,\";\\n  stroke: \").concat(t.nodeBorder,\";\\n}\\n\\ng.classGroup line {\\n  stroke: \").concat(t.nodeBorder,\";\\n  stroke-width: 1;\\n}\\n\\n.classLabel .box {\\n  stroke: none;\\n  stroke-width: 0;\\n  fill: \").concat(t.mainBkg,\";\\n  opacity: 0.5;\\n}\\n\\n.classLabel .label {\\n  fill: \").concat(t.nodeBorder,\";\\n  font-size: 10px;\\n}\\n\\n.relation {\\n  stroke: \").concat(t.lineColor,\";\\n  stroke-width: 1;\\n  fill: none;\\n}\\n\\n.dashed-line{\\n  stroke-dasharray: 3;\\n}\\n\\n#compositionStart, .composition {\\n  fill: \").concat(t.lineColor,\" !important;\\n  stroke: \").concat(t.lineColor,\" !important;\\n  stroke-width: 1;\\n}\\n\\n#compositionEnd, .composition {\\n  fill: \").concat(t.lineColor,\" !important;\\n  stroke: \").concat(t.lineColor,\" !important;\\n  stroke-width: 1;\\n}\\n\\n#dependencyStart, .dependency {\\n  fill: \").concat(t.lineColor,\" !important;\\n  stroke: \").concat(t.lineColor,\" !important;\\n  stroke-width: 1;\\n}\\n\\n#dependencyStart, .dependency {\\n  fill: \").concat(t.lineColor,\" !important;\\n  stroke: \").concat(t.lineColor,\" !important;\\n  stroke-width: 1;\\n}\\n\\n#extensionStart, .extension {\\n  fill: \").concat(t.lineColor,\" !important;\\n  stroke: \").concat(t.lineColor,\" !important;\\n  stroke-width: 1;\\n}\\n\\n#extensionEnd, .extension {\\n  fill: \").concat(t.lineColor,\" !important;\\n  stroke: \").concat(t.lineColor,\" !important;\\n  stroke-width: 1;\\n}\\n\\n#aggregationStart, .aggregation {\\n  fill: \").concat(t.mainBkg,\" !important;\\n  stroke: \").concat(t.lineColor,\" !important;\\n  stroke-width: 1;\\n}\\n\\n#aggregationEnd, .aggregation {\\n  fill: \").concat(t.mainBkg,\" !important;\\n  stroke: \").concat(t.lineColor,\" !important;\\n  stroke-width: 1;\\n}\\n\\n#lollipopStart, .lollipop {\\n  fill: \").concat(t.mainBkg,\" !important;\\n  stroke: \").concat(t.lineColor,\" !important;\\n  stroke-width: 1;\\n}\\n\\n#lollipopEnd, .lollipop {\\n  fill: \").concat(t.mainBkg,\" !important;\\n  stroke: \").concat(t.lineColor,\" !important;\\n  stroke-width: 1;\\n}\\n\\n.edgeTerminals {\\n  font-size: 11px;\\n}\\n\\n\")},Jl=function(t){return \".label {\\n    font-family: \".concat(t.fontFamily,\";\\n    color: \").concat(t.nodeTextColor||t.textColor,\";\\n  }\\n  .cluster-label text {\\n    fill: \").concat(t.titleColor,\";\\n  }\\n  .cluster-label span {\\n    color: \").concat(t.titleColor,\";\\n  }\\n\\n  .label text,span {\\n    fill: \").concat(t.nodeTextColor||t.textColor,\";\\n    color: \").concat(t.nodeTextColor||t.textColor,\";\\n  }\\n\\n  .node rect,\\n  .node circle,\\n  .node ellipse,\\n  .node polygon,\\n  .node path {\\n    fill: \").concat(t.mainBkg,\";\\n    stroke: \").concat(t.nodeBorder,\";\\n    stroke-width: 1px;\\n  }\\n\\n  .node .label {\\n    text-align: center;\\n  }\\n  .node.clickable {\\n    cursor: pointer;\\n  }\\n\\n  .arrowheadPath {\\n    fill: \").concat(t.arrowheadColor,\";\\n  }\\n\\n  .edgePath .path {\\n    stroke: \").concat(t.lineColor,\";\\n    stroke-width: 2.0px;\\n  }\\n\\n  .flowchart-link {\\n    stroke: \").concat(t.lineColor,\";\\n    fill: none;\\n  }\\n\\n  .edgeLabel {\\n    background-color: \").concat(t.edgeLabelBackground,\";\\n    rect {\\n      opacity: 0.5;\\n      background-color: \").concat(t.edgeLabelBackground,\";\\n      fill: \").concat(t.edgeLabelBackground,\";\\n    }\\n    text-align: center;\\n  }\\n\\n  .cluster rect {\\n    fill: \").concat(t.clusterBkg,\";\\n    stroke: \").concat(t.clusterBorder,\";\\n    stroke-width: 1px;\\n  }\\n\\n  .cluster text {\\n    fill: \").concat(t.titleColor,\";\\n  }\\n\\n  .cluster span {\\n    color: \").concat(t.titleColor,\";\\n  }\\n  /* .cluster div {\\n    color: \").concat(t.titleColor,\";\\n  } */\\n\\n  div.mermaidTooltip {\\n    position: absolute;\\n    text-align: center;\\n    max-width: 200px;\\n    padding: 2px;\\n    font-family: \").concat(t.fontFamily,\";\\n    font-size: 12px;\\n    background: \").concat(t.tertiaryColor,\";\\n    border: 1px solid \").concat(t.border2,\";\\n    border-radius: 2px;\\n    pointer-events: none;\\n    z-index: 100;\\n  }\\n\")},tu=function(t){return \"\\ndefs #statediagram-barbEnd {\\n    fill: \".concat(t.transitionColor,\";\\n    stroke: \").concat(t.transitionColor,\";\\n  }\\ng.stateGroup text {\\n  fill: \").concat(t.nodeBorder,\";\\n  stroke: none;\\n  font-size: 10px;\\n}\\ng.stateGroup text {\\n  fill: \").concat(t.textColor,\";\\n  stroke: none;\\n  font-size: 10px;\\n\\n}\\ng.stateGroup .state-title {\\n  font-weight: bolder;\\n  fill: \").concat(t.stateLabelColor,\";\\n}\\n\\ng.stateGroup rect {\\n  fill: \").concat(t.mainBkg,\";\\n  stroke: \").concat(t.nodeBorder,\";\\n}\\n\\ng.stateGroup line {\\n  stroke: \").concat(t.lineColor,\";\\n  stroke-width: 1;\\n}\\n\\n.transition {\\n  stroke: \").concat(t.transitionColor,\";\\n  stroke-width: 1;\\n  fill: none;\\n}\\n\\n.stateGroup .composit {\\n  fill: \").concat(t.background,\";\\n  border-bottom: 1px\\n}\\n\\n.stateGroup .alt-composit {\\n  fill: #e0e0e0;\\n  border-bottom: 1px\\n}\\n\\n.state-note {\\n  stroke: \").concat(t.noteBorderColor,\";\\n  fill: \").concat(t.noteBkgColor,\";\\n\\n  text {\\n    fill: \").concat(t.noteTextColor,\";\\n    stroke: none;\\n    font-size: 10px;\\n  }\\n}\\n\\n.stateLabel .box {\\n  stroke: none;\\n  stroke-width: 0;\\n  fill: \").concat(t.mainBkg,\";\\n  opacity: 0.5;\\n}\\n\\n.edgeLabel .label rect {\\n  fill: \").concat(t.labelBackgroundColor,\";\\n  opacity: 0.5;\\n}\\n.edgeLabel .label text {\\n  fill: \").concat(t.transitionLabelColor||t.tertiaryTextColor,\";\\n}\\n.label div .edgeLabel {\\n  color: \").concat(t.transitionLabelColor||t.tertiaryTextColor,\";\\n}\\n\\n.stateLabel text {\\n  fill: \").concat(t.stateLabelColor,\";\\n  font-size: 10px;\\n  font-weight: bold;\\n}\\n\\n.node circle.state-start {\\n  fill: \").concat(t.specialStateColor,\";\\n  stroke: \").concat(t.specialStateColor,\";\\n}\\n\\n.node .fork-join {\\n  fill: \").concat(t.specialStateColor,\";\\n  stroke: \").concat(t.specialStateColor,\";\\n}\\n\\n.node circle.state-end {\\n  fill: \").concat(t.innerEndBackground,\";\\n  stroke: \").concat(t.background,\";\\n  stroke-width: 1.5\\n}\\n.end-state-inner {\\n  fill: \").concat(t.compositeBackground||t.background,\";\\n  // stroke: \").concat(t.background,\";\\n  stroke-width: 1.5\\n}\\n\\n.node rect {\\n  fill: \").concat(t.stateBkg||t.mainBkg,\";\\n  stroke: \").concat(t.stateBorder||t.nodeBorder,\";\\n  stroke-width: 1px;\\n}\\n.node polygon {\\n  fill: \").concat(t.mainBkg,\";\\n  stroke: \").concat(t.stateBorder||t.nodeBorder,\";;\\n  stroke-width: 1px;\\n}\\n#statediagram-barbEnd {\\n  fill: \").concat(t.lineColor,\";\\n}\\n\\n.statediagram-cluster rect {\\n  fill: \").concat(t.compositeTitleBackground,\";\\n  stroke: \").concat(t.stateBorder||t.nodeBorder,\";\\n  stroke-width: 1px;\\n}\\n\\n.cluster-label, .nodeLabel {\\n  color: \").concat(t.stateLabelColor,\";\\n}\\n\\n.statediagram-cluster rect.outer {\\n  rx: 5px;\\n  ry: 5px;\\n}\\n.statediagram-state .divider {\\n  stroke: \").concat(t.stateBorder||t.nodeBorder,\";\\n}\\n\\n.statediagram-state .title-state {\\n  rx: 5px;\\n  ry: 5px;\\n}\\n.statediagram-cluster.statediagram-cluster .inner {\\n  fill: \").concat(t.compositeBackground||t.background,\";\\n}\\n.statediagram-cluster.statediagram-cluster-alt .inner {\\n  fill: \").concat(t.altBackground?t.altBackground:\"#efefef\",\";\\n}\\n\\n.statediagram-cluster .inner {\\n  rx:0;\\n  ry:0;\\n}\\n\\n.statediagram-state rect.basic {\\n  rx: 5px;\\n  ry: 5px;\\n}\\n.statediagram-state rect.divider {\\n  stroke-dasharray: 10,10;\\n  fill: \").concat(t.altBackground?t.altBackground:\"#efefef\",\";\\n}\\n\\n.note-edge {\\n  stroke-dasharray: 5;\\n}\\n\\n.statediagram-note rect {\\n  fill: \").concat(t.noteBkgColor,\";\\n  stroke: \").concat(t.noteBorderColor,\";\\n  stroke-width: 1px;\\n  rx: 0;\\n  ry: 0;\\n}\\n.statediagram-note rect {\\n  fill: \").concat(t.noteBkgColor,\";\\n  stroke: \").concat(t.noteBorderColor,\";\\n  stroke-width: 1px;\\n  rx: 0;\\n  ry: 0;\\n}\\n\\n.statediagram-note text {\\n  fill: \").concat(t.noteTextColor,\";\\n}\\n\\n.statediagram-note .nodeLabel {\\n  color: \").concat(t.noteTextColor,\";\\n}\\n.statediagram .edgeLabel {\\n  color: red; // \").concat(t.noteTextColor,\";\\n}\\n\\n#dependencyStart, #dependencyEnd {\\n  fill: \").concat(t.lineColor,\";\\n  stroke: \").concat(t.lineColor,\";\\n  stroke-width: 1;\\n}\\n\")};var eu={flowchart:Jl,\"flowchart-v2\":Jl,sequence:function(t){return \".actor {\\n    stroke: \".concat(t.actorBorder,\";\\n    fill: \").concat(t.actorBkg,\";\\n  }\\n\\n  text.actor > tspan {\\n    fill: \").concat(t.actorTextColor,\";\\n    stroke: none;\\n  }\\n\\n  .actor-line {\\n    stroke: \").concat(t.actorLineColor,\";\\n  }\\n\\n  .messageLine0 {\\n    stroke-width: 1.5;\\n    stroke-dasharray: none;\\n    stroke: \").concat(t.signalColor,\";\\n  }\\n\\n  .messageLine1 {\\n    stroke-width: 1.5;\\n    stroke-dasharray: 2, 2;\\n    stroke: \").concat(t.signalColor,\";\\n  }\\n\\n  #arrowhead path {\\n    fill: \").concat(t.signalColor,\";\\n    stroke: \").concat(t.signalColor,\";\\n  }\\n\\n  .sequenceNumber {\\n    fill: \").concat(t.sequenceNumberColor,\";\\n  }\\n\\n  #sequencenumber {\\n    fill: \").concat(t.signalColor,\";\\n  }\\n\\n  #crosshead path {\\n    fill: \").concat(t.signalColor,\";\\n    stroke: \").concat(t.signalColor,\";\\n  }\\n\\n  .messageText {\\n    fill: \").concat(t.signalTextColor,\";\\n    stroke: none;\\n  }\\n\\n  .labelBox {\\n    stroke: \").concat(t.labelBoxBorderColor,\";\\n    fill: \").concat(t.labelBoxBkgColor,\";\\n  }\\n\\n  .labelText, .labelText > tspan {\\n    fill: \").concat(t.labelTextColor,\";\\n    stroke: none;\\n  }\\n\\n  .loopText, .loopText > tspan {\\n    fill: \").concat(t.loopTextColor,\";\\n    stroke: none;\\n  }\\n\\n  .loopLine {\\n    stroke-width: 2px;\\n    stroke-dasharray: 2, 2;\\n    stroke: \").concat(t.labelBoxBorderColor,\";\\n    fill: \").concat(t.labelBoxBorderColor,\";\\n  }\\n\\n  .note {\\n    //stroke: #decc93;\\n    stroke: \").concat(t.noteBorderColor,\";\\n    fill: \").concat(t.noteBkgColor,\";\\n  }\\n\\n  .noteText, .noteText > tspan {\\n    fill: \").concat(t.noteTextColor,\";\\n    stroke: none;\\n  }\\n\\n  .activation0 {\\n    fill: \").concat(t.activationBkgColor,\";\\n    stroke: \").concat(t.activationBorderColor,\";\\n  }\\n\\n  .activation1 {\\n    fill: \").concat(t.activationBkgColor,\";\\n    stroke: \").concat(t.activationBorderColor,\";\\n  }\\n\\n  .activation2 {\\n    fill: \").concat(t.activationBkgColor,\";\\n    stroke: \").concat(t.activationBorderColor,\";\\n  }\\n\\n  .actorPopupMenu {\\n    position: absolute;\\n  }\\n\\n  .actorPopupMenuPanel {\\n    position: absolute;\\n    fill: \").concat(t.actorBkg,\";\\n    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);\\n    filter: drop-shadow(3px 5px 2px rgb(0 0 0 / 0.4));\\n}\\n  .actor-man line {\\n    stroke: \").concat(t.actorBorder,\";\\n    fill: \").concat(t.actorBkg,\";\\n  }\\n  .actor-man circle, line {\\n    stroke: \").concat(t.actorBorder,\";\\n    fill: \").concat(t.actorBkg,\";\\n    stroke-width: 2px;\\n  }\\n\")},gantt:function(t){return '\\n  .mermaid-main-font {\\n    font-family: \"trebuchet ms\", verdana, arial, sans-serif;\\n    font-family: var(--mermaid-font-family);\\n  }\\n  .exclude-range {\\n    fill: '.concat(t.excludeBkgColor,\";\\n  }\\n\\n  .section {\\n    stroke: none;\\n    opacity: 0.2;\\n  }\\n\\n  .section0 {\\n    fill: \").concat(t.sectionBkgColor,\";\\n  }\\n\\n  .section2 {\\n    fill: \").concat(t.sectionBkgColor2,\";\\n  }\\n\\n  .section1,\\n  .section3 {\\n    fill: \").concat(t.altSectionBkgColor,\";\\n    opacity: 0.2;\\n  }\\n\\n  .sectionTitle0 {\\n    fill: \").concat(t.titleColor,\";\\n  }\\n\\n  .sectionTitle1 {\\n    fill: \").concat(t.titleColor,\";\\n  }\\n\\n  .sectionTitle2 {\\n    fill: \").concat(t.titleColor,\";\\n  }\\n\\n  .sectionTitle3 {\\n    fill: \").concat(t.titleColor,\";\\n  }\\n\\n  .sectionTitle {\\n    text-anchor: start;\\n    // font-size: \").concat(t.ganttFontSize,\";\\n    // text-height: 14px;\\n    font-family: 'trebuchet ms', verdana, arial, sans-serif;\\n    font-family: var(--mermaid-font-family);\\n\\n  }\\n\\n\\n  /* Grid and axis */\\n\\n  .grid .tick {\\n    stroke: \").concat(t.gridColor,\";\\n    opacity: 0.8;\\n    shape-rendering: crispEdges;\\n    text {\\n      font-family: \").concat(t.fontFamily,\";\\n      fill: \").concat(t.textColor,\";\\n    }\\n  }\\n\\n  .grid path {\\n    stroke-width: 0;\\n  }\\n\\n\\n  /* Today line */\\n\\n  .today {\\n    fill: none;\\n    stroke: \").concat(t.todayLineColor,\";\\n    stroke-width: 2px;\\n  }\\n\\n\\n  /* Task styling */\\n\\n  /* Default task */\\n\\n  .task {\\n    stroke-width: 2;\\n  }\\n\\n  .taskText {\\n    text-anchor: middle;\\n    font-family: 'trebuchet ms', verdana, arial, sans-serif;\\n    font-family: var(--mermaid-font-family);\\n  }\\n\\n  // .taskText:not([font-size]) {\\n  //   font-size: \").concat(t.ganttFontSize,\";\\n  // }\\n\\n  .taskTextOutsideRight {\\n    fill: \").concat(t.taskTextDarkColor,\";\\n    text-anchor: start;\\n    // font-size: \").concat(t.ganttFontSize,\";\\n    font-family: 'trebuchet ms', verdana, arial, sans-serif;\\n    font-family: var(--mermaid-font-family);\\n\\n  }\\n\\n  .taskTextOutsideLeft {\\n    fill: \").concat(t.taskTextDarkColor,\";\\n    text-anchor: end;\\n    // font-size: \").concat(t.ganttFontSize,\";\\n  }\\n\\n  /* Special case clickable */\\n  .task.clickable {\\n    cursor: pointer;\\n  }\\n  .taskText.clickable {\\n    cursor: pointer;\\n    fill: \").concat(t.taskTextClickableColor,\" !important;\\n    font-weight: bold;\\n  }\\n\\n  .taskTextOutsideLeft.clickable {\\n    cursor: pointer;\\n    fill: \").concat(t.taskTextClickableColor,\" !important;\\n    font-weight: bold;\\n  }\\n\\n  .taskTextOutsideRight.clickable {\\n    cursor: pointer;\\n    fill: \").concat(t.taskTextClickableColor,\" !important;\\n    font-weight: bold;\\n  }\\n\\n  /* Specific task settings for the sections*/\\n\\n  .taskText0,\\n  .taskText1,\\n  .taskText2,\\n  .taskText3 {\\n    fill: \").concat(t.taskTextColor,\";\\n  }\\n\\n  .task0,\\n  .task1,\\n  .task2,\\n  .task3 {\\n    fill: \").concat(t.taskBkgColor,\";\\n    stroke: \").concat(t.taskBorderColor,\";\\n  }\\n\\n  .taskTextOutside0,\\n  .taskTextOutside2\\n  {\\n    fill: \").concat(t.taskTextOutsideColor,\";\\n  }\\n\\n  .taskTextOutside1,\\n  .taskTextOutside3 {\\n    fill: \").concat(t.taskTextOutsideColor,\";\\n  }\\n\\n\\n  /* Active task */\\n\\n  .active0,\\n  .active1,\\n  .active2,\\n  .active3 {\\n    fill: \").concat(t.activeTaskBkgColor,\";\\n    stroke: \").concat(t.activeTaskBorderColor,\";\\n  }\\n\\n  .activeText0,\\n  .activeText1,\\n  .activeText2,\\n  .activeText3 {\\n    fill: \").concat(t.taskTextDarkColor,\" !important;\\n  }\\n\\n\\n  /* Completed task */\\n\\n  .done0,\\n  .done1,\\n  .done2,\\n  .done3 {\\n    stroke: \").concat(t.doneTaskBorderColor,\";\\n    fill: \").concat(t.doneTaskBkgColor,\";\\n    stroke-width: 2;\\n  }\\n\\n  .doneText0,\\n  .doneText1,\\n  .doneText2,\\n  .doneText3 {\\n    fill: \").concat(t.taskTextDarkColor,\" !important;\\n  }\\n\\n\\n  /* Tasks on the critical line */\\n\\n  .crit0,\\n  .crit1,\\n  .crit2,\\n  .crit3 {\\n    stroke: \").concat(t.critBorderColor,\";\\n    fill: \").concat(t.critBkgColor,\";\\n    stroke-width: 2;\\n  }\\n\\n  .activeCrit0,\\n  .activeCrit1,\\n  .activeCrit2,\\n  .activeCrit3 {\\n    stroke: \").concat(t.critBorderColor,\";\\n    fill: \").concat(t.activeTaskBkgColor,\";\\n    stroke-width: 2;\\n  }\\n\\n  .doneCrit0,\\n  .doneCrit1,\\n  .doneCrit2,\\n  .doneCrit3 {\\n    stroke: \").concat(t.critBorderColor,\";\\n    fill: \").concat(t.doneTaskBkgColor,\";\\n    stroke-width: 2;\\n    cursor: pointer;\\n    shape-rendering: crispEdges;\\n  }\\n\\n  .milestone {\\n    transform: rotate(45deg) scale(0.8,0.8);\\n  }\\n\\n  .milestoneText {\\n    font-style: italic;\\n  }\\n  .doneCritText0,\\n  .doneCritText1,\\n  .doneCritText2,\\n  .doneCritText3 {\\n    fill: \").concat(t.taskTextDarkColor,\" !important;\\n  }\\n\\n  .activeCritText0,\\n  .activeCritText1,\\n  .activeCritText2,\\n  .activeCritText3 {\\n    fill: \").concat(t.taskTextDarkColor,\" !important;\\n  }\\n\\n  .titleText {\\n    text-anchor: middle;\\n    font-size: 18px;\\n    fill: \").concat(t.textColor,\"    ;\\n    font-family: 'trebuchet ms', verdana, arial, sans-serif;\\n    font-family: var(--mermaid-font-family);\\n  }\\n\")},classDiagram:Kl,\"classDiagram-v2\":Kl,class:Kl,stateDiagram:tu,state:tu,gitGraph:function(t){return \"\\n  .commit-id,\\n  .commit-msg,\\n  .branch-label {\\n    fill: lightgrey;\\n    color: lightgrey;\\n    font-family: 'trebuchet ms', verdana, arial, sans-serif;\\n    font-family: var(--mermaid-font-family);\\n  }\\n  \".concat([0,1,2,3,4,5,6,7].map((function(e){return \"\\n        .branch-label\".concat(e,\" { fill: \").concat(t[\"gitBranchLabel\"+e],\"; }\\n        .commit\").concat(e,\" { stroke: \").concat(t[\"git\"+e],\"; fill: \").concat(t[\"git\"+e],\"; }\\n        .commit-highlight\").concat(e,\" { stroke: \").concat(t[\"gitInv\"+e],\"; fill: \").concat(t[\"gitInv\"+e],\"; }\\n        .label\").concat(e,\"  { fill: \").concat(t[\"git\"+e],\"; }\\n        .arrow\").concat(e,\" { stroke: \").concat(t[\"git\"+e],\"; }\\n        \")})).join(\"\\n\"),\"\\n\\n  .branch {\\n    stroke-width: 1;\\n    stroke: \").concat(t.lineColor,\";\\n    stroke-dasharray: 2;\\n  }\\n  .commit-label { font-size: \").concat(t.commitLabelFontSize,\"; fill: \").concat(t.commitLabelColor,\";}\\n  .commit-label-bkg { font-size: \").concat(t.commitLabelFontSize,\"; fill: \").concat(t.commitLabelBackground,\"; opacity: 0.5; }\\n  .tag-label { font-size: \").concat(t.tagLabelFontSize,\"; fill: \").concat(t.tagLabelColor,\";}\\n  .tag-label-bkg { fill: \").concat(t.tagLabelBackground,\"; stroke: \").concat(t.tagLabelBorder,\"; }\\n  .tag-hole { fill: \").concat(t.textColor,\"; }\\n\\n  .commit-merge {\\n    stroke: \").concat(t.primaryColor,\";\\n    fill: \").concat(t.primaryColor,\";\\n  }\\n  .commit-reverse {\\n    stroke: \").concat(t.primaryColor,\";\\n    fill: \").concat(t.primaryColor,\";\\n    stroke-width: 3;\\n  }\\n  .commit-highlight-outer {\\n  }\\n  .commit-highlight-inner {\\n    stroke: \").concat(t.primaryColor,\";\\n    fill: \").concat(t.primaryColor,\";\\n  }\\n\\n  .arrow { stroke-width: 8; stroke-linecap: round; fill: none}\\n  }\\n\")},info:function(){return \"\"},pie:function(t){return \"\\n  .pieCircle{\\n    stroke: \".concat(t.pieStrokeColor,\";\\n    stroke-width : \").concat(t.pieStrokeWidth,\";\\n    opacity : \").concat(t.pieOpacity,\";\\n  }\\n  .pieTitleText {\\n    text-anchor: middle;\\n    font-size: \").concat(t.pieTitleTextSize,\";\\n    fill: \").concat(t.pieTitleTextColor,\";\\n    font-family: \").concat(t.fontFamily,\";\\n  }\\n  .slice {\\n    font-family: \").concat(t.fontFamily,\";\\n    fill: \").concat(t.pieSectionTextColor,\";\\n    font-size:\").concat(t.pieSectionTextSize,\";\\n    // fill: white;\\n  }\\n  .legend text {\\n    fill: \").concat(t.pieLegendTextColor,\";\\n    font-family: \").concat(t.fontFamily,\";\\n    font-size: \").concat(t.pieLegendTextSize,\";\\n  }\\n\")},er:function(t){return \"\\n  .entityBox {\\n    fill: \".concat(t.mainBkg,\";\\n    stroke: \").concat(t.nodeBorder,\";\\n  }\\n\\n  .attributeBoxOdd {\\n    fill: #ffffff;\\n    stroke: \").concat(t.nodeBorder,\";\\n  }\\n\\n  .attributeBoxEven {\\n    fill: #f2f2f2;\\n    stroke: \").concat(t.nodeBorder,\";\\n  }\\n\\n  .relationshipLabelBox {\\n    fill: \").concat(t.tertiaryColor,\";\\n    opacity: 0.7;\\n    background-color: \").concat(t.tertiaryColor,\";\\n      rect {\\n        opacity: 0.5;\\n      }\\n  }\\n\\n    .relationshipLine {\\n      stroke: \").concat(t.lineColor,\";\\n    }\\n\")},error:function(){return \"\"},journey:function(t){return \".label {\\n    font-family: 'trebuchet ms', verdana, arial, sans-serif;\\n    font-family: var(--mermaid-font-family);\\n    color: \".concat(t.textColor,\";\\n  }\\n  .mouth {\\n    stroke: #666;\\n  }\\n\\n  line {\\n    stroke: \").concat(t.textColor,\"\\n  }\\n\\n  .legend {\\n    fill: \").concat(t.textColor,\";\\n  }\\n\\n  .label text {\\n    fill: #333;\\n  }\\n  .label {\\n    color: \").concat(t.textColor,\"\\n  }\\n\\n  .face {\\n    \").concat(t.faceColor?\"fill: \".concat(t.faceColor):\"fill: #FFF8DC\",\";\\n    stroke: #999;\\n  }\\n\\n  .node rect,\\n  .node circle,\\n  .node ellipse,\\n  .node polygon,\\n  .node path {\\n    fill: \").concat(t.mainBkg,\";\\n    stroke: \").concat(t.nodeBorder,\";\\n    stroke-width: 1px;\\n  }\\n\\n  .node .label {\\n    text-align: center;\\n  }\\n  .node.clickable {\\n    cursor: pointer;\\n  }\\n\\n  .arrowheadPath {\\n    fill: \").concat(t.arrowheadColor,\";\\n  }\\n\\n  .edgePath .path {\\n    stroke: \").concat(t.lineColor,\";\\n    stroke-width: 1.5px;\\n  }\\n\\n  .flowchart-link {\\n    stroke: \").concat(t.lineColor,\";\\n    fill: none;\\n  }\\n\\n  .edgeLabel {\\n    background-color: \").concat(t.edgeLabelBackground,\";\\n    rect {\\n      opacity: 0.5;\\n    }\\n    text-align: center;\\n  }\\n\\n  .cluster rect {\\n  }\\n\\n  .cluster text {\\n    fill: \").concat(t.titleColor,\";\\n  }\\n\\n  div.mermaidTooltip {\\n    position: absolute;\\n    text-align: center;\\n    max-width: 200px;\\n    padding: 2px;\\n    font-family: 'trebuchet ms', verdana, arial, sans-serif;\\n    font-family: var(--mermaid-font-family);\\n    font-size: 12px;\\n    background: \").concat(t.tertiaryColor,\";\\n    border: 1px solid \").concat(t.border2,\";\\n    border-radius: 2px;\\n    pointer-events: none;\\n    z-index: 100;\\n  }\\n\\n  .task-type-0, .section-type-0  {\\n    \").concat(t.fillType0?\"fill: \".concat(t.fillType0):\"\",\";\\n  }\\n  .task-type-1, .section-type-1  {\\n    \").concat(t.fillType0?\"fill: \".concat(t.fillType1):\"\",\";\\n  }\\n  .task-type-2, .section-type-2  {\\n    \").concat(t.fillType0?\"fill: \".concat(t.fillType2):\"\",\";\\n  }\\n  .task-type-3, .section-type-3  {\\n    \").concat(t.fillType0?\"fill: \".concat(t.fillType3):\"\",\";\\n  }\\n  .task-type-4, .section-type-4  {\\n    \").concat(t.fillType0?\"fill: \".concat(t.fillType4):\"\",\";\\n  }\\n  .task-type-5, .section-type-5  {\\n    \").concat(t.fillType0?\"fill: \".concat(t.fillType5):\"\",\";\\n  }\\n  .task-type-6, .section-type-6  {\\n    \").concat(t.fillType0?\"fill: \".concat(t.fillType6):\"\",\";\\n  }\\n  .task-type-7, .section-type-7  {\\n    \").concat(t.fillType0?\"fill: \".concat(t.fillType7):\"\",\";\\n  }\\n\\n  .actor-0 {\\n    \").concat(t.actor0?\"fill: \".concat(t.actor0):\"\",\";\\n  }\\n  .actor-1 {\\n    \").concat(t.actor1?\"fill: \".concat(t.actor1):\"\",\";\\n  }\\n  .actor-2 {\\n    \").concat(t.actor2?\"fill: \".concat(t.actor2):\"\",\";\\n  }\\n  .actor-3 {\\n    \").concat(t.actor3?\"fill: \".concat(t.actor3):\"\",\";\\n  }\\n  .actor-4 {\\n    \").concat(t.actor4?\"fill: \".concat(t.actor4):\"\",\";\\n  }\\n  .actor-5 {\\n    \").concat(t.actor5?\"fill: \".concat(t.actor5):\"\",\";\\n  }\\n\\n  }\\n\")},requirement:function(t){return \"\\n\\n  marker {\\n    fill: \".concat(t.relationColor,\";\\n    stroke: \").concat(t.relationColor,\";\\n  }\\n\\n  marker.cross {\\n    stroke: \").concat(t.lineColor,\";\\n  }\\n\\n  svg {\\n    font-family: \").concat(t.fontFamily,\";\\n    font-size: \").concat(t.fontSize,\";\\n  }\\n\\n  .reqBox {\\n    fill: \").concat(t.requirementBackground,\";\\n    fill-opacity: 100%;\\n    stroke: \").concat(t.requirementBorderColor,\";\\n    stroke-width: \").concat(t.requirementBorderSize,\";\\n  }\\n  \\n  .reqTitle, .reqLabel{\\n    fill:  \").concat(t.requirementTextColor,\";\\n  }\\n  .reqLabelBox {\\n    fill: \").concat(t.relationLabelBackground,\";\\n    fill-opacity: 100%;\\n  }\\n\\n  .req-title-line {\\n    stroke: \").concat(t.requirementBorderColor,\";\\n    stroke-width: \").concat(t.requirementBorderSize,\";\\n  }\\n  .relationshipLine {\\n    stroke: \").concat(t.relationColor,\";\\n    stroke-width: 1;\\n  }\\n  .relationshipLabel {\\n    fill: \").concat(t.relationLabelColor,\";\\n  }\\n\\n\")},c4:function(t){return \".person {\\n    stroke: \".concat(t.personBorder,\";\\n    fill: \").concat(t.personBkg,\";\\n  }\\n\")}};function nu(t){return nu=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&\"function\"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?\"symbol\":typeof t},nu(t)}var ru=!1,iu=function(t){var e=t;return (e=(e=e.replace(/ﬂ°°/g,(function(){return \"&#\"}))).replace(/ﬂ°/g,(function(){return \"&\"}))).replace(/¶ß/g,(function(){return \";\"}))},au={};function ou(t){Na.setConf(t.flowchart),La.setConf(t.flowchart),void 0!==t.sequenceDiagram&&cc.setConf(Q(t.sequence,t.sequenceDiagram)),cc.setConf(t.sequence),bo.setConf(t.gantt),Ic.setConf(t.state),Uc.setConf(t.state),hl.setConf(t.journey),Bi.setConf(t.class);}var su=Object.freeze({render:function(t,e,n,r){ru||(Vl(),ru=!0),Kt();var i=e.replace(/\\r\\n?/g,\"\\n\"),a=An.detectInit(i);a&&(Cn(a),Qt(a));var s=Xt();o.debug(s),e.length>s.maxTextSize&&(i=\"graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa\");var c,u,h=(0, l.select)(\"body\");if(void 0!==r){if(\"sandbox\"===s.securityLevel){var f=(0, l.select)(\"body\").append(\"iframe\").attr(\"id\",\"i\"+t).attr(\"style\",\"width: 100%; height: 100%;\").attr(\"sandbox\",\"\");(h=(0, l.select)(f.nodes()[0].contentDocument.body)).node().style.margin=0;}if(r.innerHTML=\"\",\"sandbox\"===s.securityLevel){var d=(0, l.select)(r).append(\"iframe\").attr(\"id\",\"i\"+t).attr(\"style\",\"width: 100%; height: 100%;\").attr(\"sandbox\",\"\");(h=(0, l.select)(d.nodes()[0].contentDocument.body)).node().style.margin=0;}else h=(0, l.select)(r);h.append(\"div\").attr(\"id\",\"d\"+t).attr(\"style\",\"font-family: \"+s.fontFamily).append(\"svg\").attr(\"id\",t).attr(\"width\",\"100%\").attr(\"xmlns\",\"http://www.w3.org/2000/svg\").attr(\"xmlns:xlink\",\"http://www.w3.org/1999/xlink\").append(\"g\");}else {var p,g=document.getElementById(t);if(g&&g.remove(),(p=\"sandbox\"!==s.securityLevel?document.querySelector(\"#d\"+t):document.querySelector(\"#i\"+t))&&p.remove(),\"sandbox\"===s.securityLevel){var y=(0, l.select)(\"body\").append(\"iframe\").attr(\"id\",\"i\"+t).attr(\"style\",\"width: 100%; height: 100%;\").attr(\"sandbox\",\"\");(h=(0, l.select)(y.nodes()[0].contentDocument.body)).node().style.margin=0;}else h=(0, l.select)(\"body\");h.append(\"div\").attr(\"id\",\"d\"+t).append(\"svg\").attr(\"id\",t).attr(\"width\",\"100%\").attr(\"xmlns\",\"http://www.w3.org/2000/svg\").append(\"g\");}i=i.replace(/style.*:\\S*#.*;/g,(function(t){return t.substring(0,t.length-1)})).replace(/classDef.*:\\S*#.*;/g,(function(t){return t.substring(0,t.length-1)})).replace(/#\\w+;/g,(function(t){var e=t.substring(1,t.length-1);return /^\\+?\\d+$/.test(e)?\"ﬂ°°\"+e+\"¶ß\":\"ﬂ°\"+e+\"¶ß\"}));try{c=new Ql(i);}catch(t){c=new Ql(\"error\"),u=t;}var m=h.select(\"#d\"+t).node(),b=c.type,v=m.firstChild,_=v.firstChild,x=\"\";if(void 0!==s.themeCSS&&(x+=\"\\n\".concat(s.themeCSS)),void 0!==s.fontFamily&&(x+=\"\\n:root { --mermaid-font-family: \".concat(s.fontFamily,\"}\")),void 0!==s.altFontFamily&&(x+=\"\\n:root { --mermaid-alt-font-family: \".concat(s.altFontFamily,\"}\")),\"flowchart\"===b||\"flowchart-v2\"===b||\"graph\"===b){var k=Na.getClasses(i,c),E=s.htmlLabels||s.flowchart.htmlLabels;for(var C in k)E?(x+=\"\\n.\".concat(C,\" > * { \").concat(k[C].styles.join(\" !important; \"),\" !important; }\"),x+=\"\\n.\".concat(C,\" span { \").concat(k[C].styles.join(\" !important; \"),\" !important; }\")):(x+=\"\\n.\".concat(C,\" path { \").concat(k[C].styles.join(\" !important; \"),\" !important; }\"),x+=\"\\n.\".concat(C,\" rect { \").concat(k[C].styles.join(\" !important; \"),\" !important; }\"),x+=\"\\n.\".concat(C,\" polygon { \").concat(k[C].styles.join(\" !important; \"),\" !important; }\"),x+=\"\\n.\".concat(C,\" ellipse { \").concat(k[C].styles.join(\" !important; \"),\" !important; }\"),x+=\"\\n.\".concat(C,\" circle { \").concat(k[C].styles.join(\" !important; \"),\" !important; }\"),k[C].textStyles&&(x+=\"\\n.\".concat(C,\" tspan { \").concat(k[C].textStyles.join(\" !important; \"),\" !important; }\")));}var S=function(t,e){return w(W(\"\".concat(t,\"{\").concat(e,\"}\")),T)}(\"#\".concat(t),function(t,e,n){return \" {\\n    font-family: \".concat(n.fontFamily,\";\\n    font-size: \").concat(n.fontSize,\";\\n    fill: \").concat(n.textColor,\"\\n  }\\n\\n  /* Classes common for multiple diagrams */\\n\\n  .error-icon {\\n    fill: \").concat(n.errorBkgColor,\";\\n  }\\n  .error-text {\\n    fill: \").concat(n.errorTextColor,\";\\n    stroke: \").concat(n.errorTextColor,\";\\n  }\\n\\n  .edge-thickness-normal {\\n    stroke-width: 2px;\\n  }\\n  .edge-thickness-thick {\\n    stroke-width: 3.5px\\n  }\\n  .edge-pattern-solid {\\n    stroke-dasharray: 0;\\n  }\\n\\n  .edge-pattern-dashed{\\n    stroke-dasharray: 3;\\n  }\\n  .edge-pattern-dotted {\\n    stroke-dasharray: 2;\\n  }\\n\\n  .marker {\\n    fill: \").concat(n.lineColor,\";\\n    stroke: \").concat(n.lineColor,\";\\n  }\\n  .marker.cross {\\n    stroke: \").concat(n.lineColor,\";\\n  }\\n\\n  svg {\\n    font-family: \").concat(n.fontFamily,\";\\n    font-size: \").concat(n.fontSize,\";\\n  }\\n\\n  \").concat(eu[t](n),\"\\n\\n  \").concat(e,\"\\n\")}(b,x,s.themeVariables)),A=document.createElement(\"style\");A.innerHTML=\"#\".concat(t,\" \")+S,v.insertBefore(A,_);try{c.renderer.draw(i,t,X,c);}catch(e){throw Bi.draw(t,X),e}h.select('[id=\"'.concat(t,'\"]')).selectAll(\"foreignobject > *\").attr(\"xmlns\",\"http://www.w3.org/1999/xhtml\");var M=h.select(\"#d\"+t).node().innerHTML;if(o.debug(\"cnf.arrowMarkerAbsolute\",s.arrowMarkerAbsolute),s.arrowMarkerAbsolute&&\"false\"!==s.arrowMarkerAbsolute||\"sandbox\"===s.arrowMarkerAbsolute||(M=M.replace(/marker-end=\"url\\(.*?#/g,'marker-end=\"url(#',\"g\")),M=(M=iu(M)).replace(/<br>/g,\"<br/>\"),\"sandbox\"===s.securityLevel){var N=h.select(\"#d\"+t+\" svg\").node(),O=\"100%\";N&&(O=N.viewBox.baseVal.height+\"px\"),M='<iframe style=\"width:'.concat(\"100%\",\";height:\").concat(O,';border:0;margin:0;\" src=\"data:text/html;base64,').concat(btoa('<body style=\"margin:0\">'+M+\"</body>\"),'\" sandbox=\"allow-top-navigation-by-user-activation allow-popups\">\\n  The “iframe” tag is not supported by your browser.\\n</iframe>');}else \"loose\"!==s.securityLevel&&(M=te().sanitize(M,{ADD_TAGS:[\"foreignobject\"],ADD_ATTR:[\"dominant-baseline\"]}));if(void 0!==n)switch(b){case\"flowchart\":case\"flowchart-v2\":n(M,la.bindFunctions);break;case\"gantt\":n(M,go.bindFunctions);break;case\"class\":case\"classDiagram\":n(M,fr.bindFunctions);break;default:n(M);}else o.debug(\"CB = undefined!\");vs.forEach((function(t){t();})),vs=[];var D=\"sandbox\"===s.securityLevel?\"#i\"+t:\"#d\"+t,B=(0, l.select)(D).node();if(null!==B&&\"function\"==typeof B.remove&&(0, l.select)(D).node().remove(),u)throw u;return M},parse:function(t,e){ru||(Vl(),ru=!0);var n=!1;try{var r=e||new Ql(t);return r.db.clear(),r.parse(t)}catch(t){if(n=!0,!fu.parseError)throw t;null!=t.str?fu.parseError(t.str,t.hash):fu.parseError(t);}return !n},parseDirective:function(t,e,n,r){try{if(void 0!==e)switch(e=e.trim(),n){case\"open_directive\":au={};break;case\"type_directive\":au.type=e.toLowerCase();break;case\"arg_directive\":au.args=JSON.parse(e);break;case\"close_directive\":(function(t,e,n){switch(o.debug(\"Directive type=\".concat(e.type,\" with args:\"),e.args),e.type){case\"init\":case\"initialize\":[\"config\"].forEach((function(t){void 0!==e.args[t]&&(\"flowchart-v2\"===n&&(n=\"flowchart\"),e.args[n]=e.args[t],delete e.args[t]);})),o.debug(\"sanitize in handleDirective\",e.args),Cn(e.args),o.debug(\"sanitize in handleDirective (done)\",e.args),Qt(e.args);break;case\"wrap\":case\"nowrap\":t&&t.setWrap&&t.setWrap(\"wrap\"===e.type);break;case\"themeCss\":o.warn(\"themeCss encountered\");break;default:o.warn(\"Unhandled directive: source: '%%{\".concat(e.type,\": \").concat(JSON.stringify(e.args?e.args:{}),\"}%%\"),e);}})(t,au,r),au=null;}}catch(t){o.error(\"Error while rendering sequenceDiagram directive: \".concat(e,\" jison context: \").concat(n)),o.error(t.message);}},initialize:function(t){var e;null!=t&&t.fontFamily&&(null!==(e=t.themeVariables)&&void 0!==e&&e.fontFamily||(t.themeVariables={fontFamily:t.fontFamily})),function(t){Ut=Q({},t);}(t),null!=t&&t.theme&&Lt[t.theme]?t.themeVariables=Lt[t.theme].getThemeVariables(t.themeVariables):t&&(t.themeVariables=Lt.default.getThemeVariables(t.themeVariables));var n=\"object\"===nu(t)?function(t){return Wt=Q({},$t),Wt=Q(Wt,t),t.theme&&Lt[t.theme]&&(Wt.themeVariables=Lt[t.theme].getThemeVariables(t.themeVariables)),Ht=Vt(Wt,qt),Wt}(t):Gt();ou(n),s(n.logLevel),ru||(Vl(),ru=!0);},getConfig:Xt,setConfig:function(t){return Q(Ht,t),Xt()},getSiteConfig:Gt,updateSiteConfig:function(t){return Wt=Q(Wt,t),Vt(Wt,qt),Wt},reset:function(){Kt();},globalReset:function(){Kt(),ou(Xt());},defaultConfig:$t});s(Xt().logLevel),Kt(Xt());const cu=su;var lu=function(){var t,e,n=cu.getConfig();arguments.length>=2?(void 0!==arguments[0]&&(hu.sequenceConfig=arguments[0]),t=arguments[1]):t=arguments[0],\"function\"==typeof arguments[arguments.length-1]?(e=arguments[arguments.length-1],o.debug(\"Callback function found\")):void 0!==n.mermaid&&(\"function\"==typeof n.mermaid.callback?(e=n.mermaid.callback,o.debug(\"Callback function found\")):o.debug(\"No Callback function found\")),t=void 0===t?document.querySelectorAll(\".mermaid\"):\"string\"==typeof t?document.querySelectorAll(t):t instanceof window.Node?[t]:t,o.debug(\"Start On Load before: \"+hu.startOnLoad),void 0!==hu.startOnLoad&&(o.debug(\"Start On Load inner: \"+hu.startOnLoad),cu.updateSiteConfig({startOnLoad:hu.startOnLoad})),void 0!==hu.ganttConfig&&cu.updateSiteConfig({gantt:hu.ganttConfig});for(var r,i=new An.initIdGenerator(n.deterministicIds,n.deterministicIDSeed),a=[],s=function(n){o.info(\"Rendering diagram: \"+t[n].id,n);var s=t[n];if(s.getAttribute(\"data-processed\"))return \"continue\";s.setAttribute(\"data-processed\",!0);var c=\"mermaid-\".concat(i.next());r=s.innerHTML,r=An.entityDecode(r).trim().replace(/<br\\s*\\/?>/gi,\"<br/>\");var l=An.detectInit(r);l&&o.debug(\"Detected early reinit: \",l);try{cu.render(c,r,(function(t,n){s.innerHTML=t,void 0!==e&&e(c),n&&n(s);}),s);}catch(t){o.warn(\"Catching Error (bootstrap)\",t),\"function\"==typeof hu.parseError&&hu.parseError({error:t,str:t.str,hash:t.hash,message:t.str}),a.push({error:t,str:t.str,hash:t.hash,message:t.str});}},c=0;c<t.length;c++)s(c);if(a.length>0)throw a[0]},uu=function(){hu.startOnLoad?cu.getConfig().startOnLoad&&hu.init():void 0===hu.startOnLoad&&(o.debug(\"In start, no config\"),cu.getConfig().startOnLoad&&hu.init());};\"undefined\"!=typeof document&&window.addEventListener(\"load\",(function(){uu();}),!1);var hu={startOnLoad:!0,htmlLabels:!0,diagrams:{},mermaidAPI:cu,parse:null!=cu?cu.parse:null,render:null!=cu?cu.render:null,init:function(){try{lu.apply(void 0,arguments);}catch(t){o.warn(\"Syntax Error rendering\"),o.warn(t.str);}},initThrowsErrors:lu,initialize:function(t){void 0!==t.mermaid&&(void 0!==t.mermaid.startOnLoad&&(hu.startOnLoad=t.mermaid.startOnLoad),void 0!==t.mermaid.htmlLabels&&(hu.htmlLabels=\"false\"!==t.mermaid.htmlLabels&&!1!==t.mermaid.htmlLabels)),cu.initialize(t);},contentLoaded:uu,setParseErrorHandler:function(t){hu.parseError=t;}};const fu=hu;},4949:(t,e,n)=>{t.exports={graphlib:n(6614),dagre:n(6478),intersect:n(8114),render:n(5787),util:n(8355),version:n(5689)};},9144:(t,e,n)=>{var r=n(8355);function i(t,e,n,i){var a=t.append(\"marker\").attr(\"id\",e).attr(\"viewBox\",\"0 0 10 10\").attr(\"refX\",9).attr(\"refY\",5).attr(\"markerUnits\",\"strokeWidth\").attr(\"markerWidth\",8).attr(\"markerHeight\",6).attr(\"orient\",\"auto\").append(\"path\").attr(\"d\",\"M 0 0 L 10 5 L 0 10 z\").style(\"stroke-width\",1).style(\"stroke-dasharray\",\"1,0\");r.applyStyle(a,n[i+\"Style\"]),n[i+\"Class\"]&&a.attr(\"class\",n[i+\"Class\"]);}t.exports={default:i,normal:i,vee:function(t,e,n,i){var a=t.append(\"marker\").attr(\"id\",e).attr(\"viewBox\",\"0 0 10 10\").attr(\"refX\",9).attr(\"refY\",5).attr(\"markerUnits\",\"strokeWidth\").attr(\"markerWidth\",8).attr(\"markerHeight\",6).attr(\"orient\",\"auto\").append(\"path\").attr(\"d\",\"M 0 0 L 10 5 L 0 10 L 4 5 z\").style(\"stroke-width\",1).style(\"stroke-dasharray\",\"1,0\");r.applyStyle(a,n[i+\"Style\"]),n[i+\"Class\"]&&a.attr(\"class\",n[i+\"Class\"]);},undirected:function(t,e,n,i){var a=t.append(\"marker\").attr(\"id\",e).attr(\"viewBox\",\"0 0 10 10\").attr(\"refX\",9).attr(\"refY\",5).attr(\"markerUnits\",\"strokeWidth\").attr(\"markerWidth\",8).attr(\"markerHeight\",6).attr(\"orient\",\"auto\").append(\"path\").attr(\"d\",\"M 0 5 L 10 5\").style(\"stroke-width\",1).style(\"stroke-dasharray\",\"1,0\");r.applyStyle(a,n[i+\"Style\"]),n[i+\"Class\"]&&a.attr(\"class\",n[i+\"Class\"]);}};},5632:(t,e,n)=>{var r=n(8355),i=n(4322),a=n(1322);t.exports=function(t,e){var n,o=e.nodes().filter((function(t){return r.isSubgraph(e,t)})),s=t.selectAll(\"g.cluster\").data(o,(function(t){return t}));return s.selectAll(\"*\").remove(),s.enter().append(\"g\").attr(\"class\",\"cluster\").attr(\"id\",(function(t){return e.node(t).id})).style(\"opacity\",0),s=t.selectAll(\"g.cluster\"),r.applyTransition(s,e).style(\"opacity\",1),s.each((function(t){var n=e.node(t),r=i.select(this);i.select(this).append(\"rect\");var o=r.append(\"g\").attr(\"class\",\"label\");a(o,n,n.clusterLabelPos);})),s.selectAll(\"rect\").each((function(t){var n=e.node(t),a=i.select(this);r.applyStyle(a,n.style);})),n=s.exit?s.exit():s.selectAll(null),r.applyTransition(n,e).style(\"opacity\",0).remove(),s};},6315:(t,e,n)=>{var r=n(1034),i=n(1322),a=n(8355),o=n(4322);t.exports=function(t,e){var n,s=t.selectAll(\"g.edgeLabel\").data(e.edges(),(function(t){return a.edgeToId(t)})).classed(\"update\",!0);return s.exit().remove(),s.enter().append(\"g\").classed(\"edgeLabel\",!0).style(\"opacity\",0),(s=t.selectAll(\"g.edgeLabel\")).each((function(t){var n=o.select(this);n.select(\".label\").remove();var a=e.edge(t),s=i(n,e.edge(t),0,0).classed(\"label\",!0),c=s.node().getBBox();a.labelId&&s.attr(\"id\",a.labelId),r.has(a,\"width\")||(a.width=c.width),r.has(a,\"height\")||(a.height=c.height);})),n=s.exit?s.exit():s.selectAll(null),a.applyTransition(n,e).style(\"opacity\",0).remove(),s};},940:(t,e,n)=>{var r=n(1034),i=n(3042),a=n(8355),o=n(4322);function s(t,e){var n=(o.line||o.svg.line)().x((function(t){return t.x})).y((function(t){return t.y}));return (n.curve||n.interpolate)(t.curve),n(e)}t.exports=function(t,e,n){var c=t.selectAll(\"g.edgePath\").data(e.edges(),(function(t){return a.edgeToId(t)})).classed(\"update\",!0),l=function(t,e){var n=t.enter().append(\"g\").attr(\"class\",\"edgePath\").style(\"opacity\",0);return n.append(\"path\").attr(\"class\",\"path\").attr(\"d\",(function(t){var n=e.edge(t),i=e.node(t.v).elem;return s(n,r.range(n.points.length).map((function(){return e=(t=i).getBBox(),{x:(n=t.ownerSVGElement.getScreenCTM().inverse().multiply(t.getScreenCTM()).translate(e.width/2,e.height/2)).e,y:n.f};var t,e,n;})))})),n.append(\"defs\"),n}(c,e);!function(t,e){var n=t.exit();a.applyTransition(n,e).style(\"opacity\",0).remove();}(c,e);var u=void 0!==c.merge?c.merge(l):c;return a.applyTransition(u,e).style(\"opacity\",1),u.each((function(t){var n=o.select(this),r=e.edge(t);r.elem=this,r.id&&n.attr(\"id\",r.id),a.applyClass(n,r.class,(n.classed(\"update\")?\"update \":\"\")+\"edgePath\");})),u.selectAll(\"path.path\").each((function(t){var n=e.edge(t);n.arrowheadId=r.uniqueId(\"arrowhead\");var c=o.select(this).attr(\"marker-end\",(function(){return \"url(\"+(t=location.href,e=n.arrowheadId,t.split(\"#\")[0]+\"#\"+e+\")\");var t,e;})).style(\"fill\",\"none\");a.applyTransition(c,e).attr(\"d\",(function(t){return function(t,e){var n=t.edge(e),r=t.node(e.v),a=t.node(e.w),o=n.points.slice(1,n.points.length-1);return o.unshift(i(r,o[0])),o.push(i(a,o[o.length-1])),s(n,o)}(e,t)})),a.applyStyle(c,n.style);})),u.selectAll(\"defs *\").remove(),u.selectAll(\"defs\").each((function(t){var r=e.edge(t);(0, n[r.arrowhead])(o.select(this),r.arrowheadId,r,\"arrowhead\");})),u};},607:(t,e,n)=>{var r=n(1034),i=n(1322),a=n(8355),o=n(4322);t.exports=function(t,e,n){var s,c=e.nodes().filter((function(t){return !a.isSubgraph(e,t)})),l=t.selectAll(\"g.node\").data(c,(function(t){return t})).classed(\"update\",!0);return l.exit().remove(),l.enter().append(\"g\").attr(\"class\",\"node\").style(\"opacity\",0),(l=t.selectAll(\"g.node\")).each((function(t){var s=e.node(t),c=o.select(this);a.applyClass(c,s.class,(c.classed(\"update\")?\"update \":\"\")+\"node\"),c.select(\"g.label\").remove();var l=c.append(\"g\").attr(\"class\",\"label\"),u=i(l,s),h=n[s.shape],f=r.pick(u.node().getBBox(),\"width\",\"height\");s.elem=this,s.id&&c.attr(\"id\",s.id),s.labelId&&l.attr(\"id\",s.labelId),r.has(s,\"width\")&&(f.width=s.width),r.has(s,\"height\")&&(f.height=s.height),f.width+=s.paddingLeft+s.paddingRight,f.height+=s.paddingTop+s.paddingBottom,l.attr(\"transform\",\"translate(\"+(s.paddingLeft-s.paddingRight)/2+\",\"+(s.paddingTop-s.paddingBottom)/2+\")\");var d=o.select(this);d.select(\".label-container\").remove();var p=h(d,f,s).classed(\"label-container\",!0);a.applyStyle(p,s.style);var g=p.node().getBBox();s.width=g.width,s.height=g.height;})),s=l.exit?l.exit():l.selectAll(null),a.applyTransition(s,e).style(\"opacity\",0).remove(),l};},4322:(t,e,n)=>{var r;if(!r)try{r=n(7543);}catch(t){}r||(r=window.d3),t.exports=r;},6478:(t,e,n)=>{var r;try{r=n(681);}catch(t){}r||(r=window.dagre),t.exports=r;},6614:(t,e,n)=>{var r;try{r=n(8282);}catch(t){}r||(r=window.graphlib),t.exports=r;},8114:(t,e,n)=>{t.exports={node:n(3042),circle:n(6587),ellipse:n(3260),polygon:n(5337),rect:n(8049)};},6587:(t,e,n)=>{var r=n(3260);t.exports=function(t,e,n){return r(t,e,e,n)};},3260:t=>{t.exports=function(t,e,n,r){var i=t.x,a=t.y,o=i-r.x,s=a-r.y,c=Math.sqrt(e*e*s*s+n*n*o*o),l=Math.abs(e*n*o/c);r.x<i&&(l=-l);var u=Math.abs(e*n*s/c);return r.y<a&&(u=-u),{x:i+l,y:a+u}};},6808:t=>{function e(t,e){return t*e>0}t.exports=function(t,n,r,i){var a,o,s,c,l,u,h,f,d,p,g,y,m;if(!(a=n.y-t.y,s=t.x-n.x,l=n.x*t.y-t.x*n.y,d=a*r.x+s*r.y+l,p=a*i.x+s*i.y+l,0!==d&&0!==p&&e(d,p)||(o=i.y-r.y,c=r.x-i.x,u=i.x*r.y-r.x*i.y,h=o*t.x+c*t.y+u,f=o*n.x+c*n.y+u,0!==h&&0!==f&&e(h,f)||0==(g=a*c-o*s))))return y=Math.abs(g/2),{x:(m=s*u-c*l)<0?(m-y)/g:(m+y)/g,y:(m=o*l-a*u)<0?(m-y)/g:(m+y)/g}};},3042:t=>{t.exports=function(t,e){return t.intersect(e)};},5337:(t,e,n)=>{var r=n(6808);t.exports=function(t,e,n){var i=t.x,a=t.y,o=[],s=Number.POSITIVE_INFINITY,c=Number.POSITIVE_INFINITY;e.forEach((function(t){s=Math.min(s,t.x),c=Math.min(c,t.y);}));for(var l=i-t.width/2-s,u=a-t.height/2-c,h=0;h<e.length;h++){var f=e[h],d=e[h<e.length-1?h+1:0],p=r(t,n,{x:l+f.x,y:u+f.y},{x:l+d.x,y:u+d.y});p&&o.push(p);}return o.length?(o.length>1&&o.sort((function(t,e){var r=t.x-n.x,i=t.y-n.y,a=Math.sqrt(r*r+i*i),o=e.x-n.x,s=e.y-n.y,c=Math.sqrt(o*o+s*s);return a<c?-1:a===c?0:1})),o[0]):(console.log(\"NO INTERSECTION FOUND, RETURN NODE CENTER\",t),t)};},8049:t=>{t.exports=function(t,e){var n,r,i=t.x,a=t.y,o=e.x-i,s=e.y-a,c=t.width/2,l=t.height/2;return Math.abs(s)*c>Math.abs(o)*l?(s<0&&(l=-l),n=0===s?0:l*o/s,r=l):(o<0&&(c=-c),n=c,r=0===o?0:c*s/o),{x:i+n,y:a+r}};},8284:(t,e,n)=>{var r=n(8355);t.exports=function(t,e){var n=t.append(\"foreignObject\").attr(\"width\",\"100000\"),i=n.append(\"xhtml:div\");i.attr(\"xmlns\",\"http://www.w3.org/1999/xhtml\");var a=e.label;switch(typeof a){case\"function\":i.insert(a);break;case\"object\":i.insert((function(){return a}));break;default:i.html(a);}r.applyStyle(i,e.labelStyle),i.style(\"display\",\"inline-block\"),i.style(\"white-space\",\"nowrap\");var o=i.node().getBoundingClientRect();return n.attr(\"width\",o.width).attr(\"height\",o.height),n};},1322:(t,e,n)=>{var r=n(7318),i=n(8284),a=n(8287);t.exports=function(t,e,n){var o=e.label,s=t.append(\"g\");\"svg\"===e.labelType?a(s,e):\"string\"!=typeof o||\"html\"===e.labelType?i(s,e):r(s,e);var c,l=s.node().getBBox();switch(n){case\"top\":c=-e.height/2;break;case\"bottom\":c=e.height/2-l.height;break;default:c=-l.height/2;}return s.attr(\"transform\",\"translate(\"+-l.width/2+\",\"+c+\")\"),s};},8287:(t,e,n)=>{var r=n(8355);t.exports=function(t,e){var n=t;return n.node().appendChild(e.label),r.applyStyle(n,e.labelStyle),n};},7318:(t,e,n)=>{var r=n(8355);t.exports=function(t,e){for(var n=t.append(\"text\"),i=function(t){for(var e,n=\"\",r=!1,i=0;i<t.length;++i)e=t[i],r?(n+=\"n\"===e?\"\\n\":e,r=!1):\"\\\\\"===e?r=!0:n+=e;return n}(e.label).split(\"\\n\"),a=0;a<i.length;a++)n.append(\"tspan\").attr(\"xml:space\",\"preserve\").attr(\"dy\",\"1em\").attr(\"x\",\"1\").text(i[a]);return r.applyStyle(n,e.labelStyle),n};},1034:(t,e,n)=>{var r;try{r={defaults:n(1747),each:n(6073),isFunction:n(3560),isPlainObject:n(8630),pick:n(9722),has:n(8721),range:n(6026),uniqueId:n(3955)};}catch(t){}r||(r=window._),t.exports=r;},6381:(t,e,n)=>{var r=n(8355),i=n(4322);t.exports=function(t,e){var n=t.filter((function(){return !i.select(this).classed(\"update\")}));function a(t){var n=e.node(t);return \"translate(\"+n.x+\",\"+n.y+\")\"}n.attr(\"transform\",a),r.applyTransition(t,e).style(\"opacity\",1).attr(\"transform\",a),r.applyTransition(n.selectAll(\"rect\"),e).attr(\"width\",(function(t){return e.node(t).width})).attr(\"height\",(function(t){return e.node(t).height})).attr(\"x\",(function(t){return -e.node(t).width/2})).attr(\"y\",(function(t){return -e.node(t).height/2}));};},4577:(t,e,n)=>{var r=n(8355),i=n(4322),a=n(1034);t.exports=function(t,e){function n(t){var n=e.edge(t);return a.has(n,\"x\")?\"translate(\"+n.x+\",\"+n.y+\")\":\"\"}t.filter((function(){return !i.select(this).classed(\"update\")})).attr(\"transform\",n),r.applyTransition(t,e).style(\"opacity\",1).attr(\"transform\",n);};},4849:(t,e,n)=>{var r=n(8355),i=n(4322);t.exports=function(t,e){function n(t){var n=e.node(t);return \"translate(\"+n.x+\",\"+n.y+\")\"}t.filter((function(){return !i.select(this).classed(\"update\")})).attr(\"transform\",n),r.applyTransition(t,e).style(\"opacity\",1).attr(\"transform\",n);};},5787:(t,e,n)=>{var r=n(1034),i=n(4322),a=n(6478).layout;t.exports=function(){var t=n(607),e=n(5632),i=n(6315),l=n(940),u=n(4849),h=n(4577),f=n(6381),d=n(4418),p=n(9144),g=function(n,g){!function(t){t.nodes().forEach((function(e){var n=t.node(e);r.has(n,\"label\")||t.children(e).length||(n.label=e),r.has(n,\"paddingX\")&&r.defaults(n,{paddingLeft:n.paddingX,paddingRight:n.paddingX}),r.has(n,\"paddingY\")&&r.defaults(n,{paddingTop:n.paddingY,paddingBottom:n.paddingY}),r.has(n,\"padding\")&&r.defaults(n,{paddingLeft:n.padding,paddingRight:n.padding,paddingTop:n.padding,paddingBottom:n.padding}),r.defaults(n,o),r.each([\"paddingLeft\",\"paddingRight\",\"paddingTop\",\"paddingBottom\"],(function(t){n[t]=Number(n[t]);})),r.has(n,\"width\")&&(n._prevWidth=n.width),r.has(n,\"height\")&&(n._prevHeight=n.height);})),t.edges().forEach((function(e){var n=t.edge(e);r.has(n,\"label\")||(n.label=\"\"),r.defaults(n,s);}));}(g);var y=c(n,\"output\"),m=c(y,\"clusters\"),b=c(y,\"edgePaths\"),v=i(c(y,\"edgeLabels\"),g),_=t(c(y,\"nodes\"),g,d);a(g),u(_,g),h(v,g),l(b,g,p);var x=e(m,g);f(x,g),function(t){r.each(t.nodes(),(function(e){var n=t.node(e);r.has(n,\"_prevWidth\")?n.width=n._prevWidth:delete n.width,r.has(n,\"_prevHeight\")?n.height=n._prevHeight:delete n.height,delete n._prevWidth,delete n._prevHeight;}));}(g);};return g.createNodes=function(e){return arguments.length?(t=e,g):t},g.createClusters=function(t){return arguments.length?(e=t,g):e},g.createEdgeLabels=function(t){return arguments.length?(i=t,g):i},g.createEdgePaths=function(t){return arguments.length?(l=t,g):l},g.shapes=function(t){return arguments.length?(d=t,g):d},g.arrows=function(t){return arguments.length?(p=t,g):p},g};var o={paddingLeft:10,paddingRight:10,paddingTop:10,paddingBottom:10,rx:0,ry:0,shape:\"rect\"},s={arrowhead:\"normal\",curve:i.curveLinear};function c(t,e){var n=t.select(\"g.\"+e);return n.empty()&&(n=t.append(\"g\").attr(\"class\",e)),n}},4418:(t,e,n)=>{var r=n(8049),i=n(3260),a=n(6587),o=n(5337);t.exports={rect:function(t,e,n){var i=t.insert(\"rect\",\":first-child\").attr(\"rx\",n.rx).attr(\"ry\",n.ry).attr(\"x\",-e.width/2).attr(\"y\",-e.height/2).attr(\"width\",e.width).attr(\"height\",e.height);return n.intersect=function(t){return r(n,t)},i},ellipse:function(t,e,n){var r=e.width/2,a=e.height/2,o=t.insert(\"ellipse\",\":first-child\").attr(\"x\",-e.width/2).attr(\"y\",-e.height/2).attr(\"rx\",r).attr(\"ry\",a);return n.intersect=function(t){return i(n,r,a,t)},o},circle:function(t,e,n){var r=Math.max(e.width,e.height)/2,i=t.insert(\"circle\",\":first-child\").attr(\"x\",-e.width/2).attr(\"y\",-e.height/2).attr(\"r\",r);return n.intersect=function(t){return a(n,r,t)},i},diamond:function(t,e,n){var r=e.width*Math.SQRT2/2,i=e.height*Math.SQRT2/2,a=[{x:0,y:-i},{x:-r,y:0},{x:0,y:i},{x:r,y:0}],s=t.insert(\"polygon\",\":first-child\").attr(\"points\",a.map((function(t){return t.x+\",\"+t.y})).join(\" \"));return n.intersect=function(t){return o(n,a,t)},s}};},8355:(t,e,n)=>{var r=n(1034);t.exports={isSubgraph:function(t,e){return !!t.children(e).length},edgeToId:function(t){return a(t.v)+\":\"+a(t.w)+\":\"+a(t.name)},applyStyle:function(t,e){e&&t.attr(\"style\",e);},applyClass:function(t,e,n){e&&t.attr(\"class\",e).attr(\"class\",n+\" \"+t.attr(\"class\"));},applyTransition:function(t,e){var n=e.graph();if(r.isPlainObject(n)){var i=n.transition;if(r.isFunction(i))return i(t)}return t}};var i=/:/g;function a(t){return t?String(t).replace(i,\"\\\\:\"):\"\"}},5689:t=>{t.exports=\"0.6.4\";},681:(t,e,n)=>{t.exports={graphlib:n(574),layout:n(8123),debug:n(7570),util:{time:n(1138).time,notime:n(1138).notime},version:n(8177)};},2188:(t,e,n)=>{var r=n(8436),i=n(4079);t.exports={run:function(t){var e=\"greedy\"===t.graph().acyclicer?i(t,function(t){return function(e){return t.edge(e).weight}}(t)):function(t){var e=[],n={},i={};return r.forEach(t.nodes(),(function a(o){r.has(i,o)||(i[o]=!0,n[o]=!0,r.forEach(t.outEdges(o),(function(t){r.has(n,t.w)?e.push(t):a(t.w);})),delete n[o]);})),e}(t);r.forEach(e,(function(e){var n=t.edge(e);t.removeEdge(e),n.forwardName=e.name,n.reversed=!0,t.setEdge(e.w,e.v,n,r.uniqueId(\"rev\"));}));},undo:function(t){r.forEach(t.edges(),(function(e){var n=t.edge(e);if(n.reversed){t.removeEdge(e);var r=n.forwardName;delete n.reversed,delete n.forwardName,t.setEdge(e.w,e.v,n,r);}}));}};},1133:(t,e,n)=>{var r=n(8436),i=n(1138);function a(t,e,n,r,a,o){var s={width:0,height:0,rank:o,borderType:e},c=a[e][o-1],l=i.addDummyNode(t,\"border\",s,n);a[e][o]=l,t.setParent(l,r),c&&t.setEdge(c,l,{weight:1});}t.exports=function(t){r.forEach(t.children(),(function e(n){var i=t.children(n),o=t.node(n);if(i.length&&r.forEach(i,e),r.has(o,\"minRank\")){o.borderLeft=[],o.borderRight=[];for(var s=o.minRank,c=o.maxRank+1;s<c;++s)a(t,\"borderLeft\",\"_bl\",n,o,s),a(t,\"borderRight\",\"_br\",n,o,s);}}));};},3258:(t,e,n)=>{var r=n(8436);function i(t){r.forEach(t.nodes(),(function(e){a(t.node(e));})),r.forEach(t.edges(),(function(e){a(t.edge(e));}));}function a(t){var e=t.width;t.width=t.height,t.height=e;}function o(t){t.y=-t.y;}function s(t){var e=t.x;t.x=t.y,t.y=e;}t.exports={adjust:function(t){var e=t.graph().rankdir.toLowerCase();\"lr\"!==e&&\"rl\"!==e||i(t);},undo:function(t){var e=t.graph().rankdir.toLowerCase();\"bt\"!==e&&\"rl\"!==e||function(t){r.forEach(t.nodes(),(function(e){o(t.node(e));})),r.forEach(t.edges(),(function(e){var n=t.edge(e);r.forEach(n.points,o),r.has(n,\"y\")&&o(n);}));}(t),\"lr\"!==e&&\"rl\"!==e||(function(t){r.forEach(t.nodes(),(function(e){s(t.node(e));})),r.forEach(t.edges(),(function(e){var n=t.edge(e);r.forEach(n.points,s),r.has(n,\"x\")&&s(n);}));}(t),i(t));}};},7822:t=>{function e(){var t={};t._next=t._prev=t,this._sentinel=t;}function n(t){t._prev._next=t._next,t._next._prev=t._prev,delete t._next,delete t._prev;}function r(t,e){if(\"_next\"!==t&&\"_prev\"!==t)return e}t.exports=e,e.prototype.dequeue=function(){var t=this._sentinel,e=t._prev;if(e!==t)return n(e),e},e.prototype.enqueue=function(t){var e=this._sentinel;t._prev&&t._next&&n(t),t._next=e._next,e._next._prev=t,e._next=t,t._prev=e;},e.prototype.toString=function(){for(var t=[],e=this._sentinel,n=e._prev;n!==e;)t.push(JSON.stringify(n,r)),n=n._prev;return \"[\"+t.join(\", \")+\"]\"};},7570:(t,e,n)=>{var r=n(8436),i=n(1138),a=n(574).Graph;t.exports={debugOrdering:function(t){var e=i.buildLayerMatrix(t),n=new a({compound:!0,multigraph:!0}).setGraph({});return r.forEach(t.nodes(),(function(e){n.setNode(e,{label:e}),n.setParent(e,\"layer\"+t.node(e).rank);})),r.forEach(t.edges(),(function(t){n.setEdge(t.v,t.w,{},t.name);})),r.forEach(e,(function(t,e){var i=\"layer\"+e;n.setNode(i,{rank:\"same\"}),r.reduce(t,(function(t,e){return n.setEdge(t,e,{style:\"invis\"}),e}));})),n}};},574:(t,e,n)=>{var r;try{r=n(8282);}catch(t){}r||(r=window.graphlib),t.exports=r;},4079:(t,e,n)=>{var r=n(8436),i=n(574).Graph,a=n(7822);t.exports=function(t,e){if(t.nodeCount()<=1)return [];var n=function(t,e){var n=new i,o=0,s=0;r.forEach(t.nodes(),(function(t){n.setNode(t,{v:t,in:0,out:0});})),r.forEach(t.edges(),(function(t){var r=n.edge(t.v,t.w)||0,i=e(t),a=r+i;n.setEdge(t.v,t.w,a),s=Math.max(s,n.node(t.v).out+=i),o=Math.max(o,n.node(t.w).in+=i);}));var l=r.range(s+o+3).map((function(){return new a})),u=o+1;return r.forEach(n.nodes(),(function(t){c(l,u,n.node(t));})),{graph:n,buckets:l,zeroIdx:u}}(t,e||o),l=function(t,e,n){for(var r,i=[],a=e[e.length-1],o=e[0];t.nodeCount();){for(;r=o.dequeue();)s(t,e,n,r);for(;r=a.dequeue();)s(t,e,n,r);if(t.nodeCount())for(var c=e.length-2;c>0;--c)if(r=e[c].dequeue()){i=i.concat(s(t,e,n,r,!0));break}}return i}(n.graph,n.buckets,n.zeroIdx);return r.flatten(r.map(l,(function(e){return t.outEdges(e.v,e.w)})),!0)};var o=r.constant(1);function s(t,e,n,i,a){var o=a?[]:void 0;return r.forEach(t.inEdges(i.v),(function(r){var i=t.edge(r),s=t.node(r.v);a&&o.push({v:r.v,w:r.w}),s.out-=i,c(e,n,s);})),r.forEach(t.outEdges(i.v),(function(r){var i=t.edge(r),a=r.w,o=t.node(a);o.in-=i,c(e,n,o);})),t.removeNode(i.v),o}function c(t,e,n){n.out?n.in?t[n.out-n.in+e].enqueue(n):t[t.length-1].enqueue(n):t[0].enqueue(n);}},8123:(t,e,n)=>{var r=n(8436),i=n(2188),a=n(5995),o=n(8093),s=n(1138).normalizeRanks,c=n(4219),l=n(1138).removeEmptyRanks,u=n(2981),h=n(1133),f=n(3258),d=n(3408),p=n(7873),g=n(1138),y=n(574).Graph;t.exports=function(t,e){var n=e&&e.debugTiming?g.time:g.notime;n(\"layout\",(function(){var e=n(\"  buildLayoutGraph\",(function(){return function(t){var e=new y({multigraph:!0,compound:!0}),n=C(t.graph());return e.setGraph(r.merge({},b,E(n,m),r.pick(n,v))),r.forEach(t.nodes(),(function(n){var i=C(t.node(n));e.setNode(n,r.defaults(E(i,_),x)),e.setParent(n,t.parent(n));})),r.forEach(t.edges(),(function(n){var i=C(t.edge(n));e.setEdge(n,r.merge({},w,E(i,k),r.pick(i,T)));})),e}(t)}));n(\"  runLayout\",(function(){!function(t,e){e(\"    makeSpaceForEdgeLabels\",(function(){!function(t){var e=t.graph();e.ranksep/=2,r.forEach(t.edges(),(function(n){var r=t.edge(n);r.minlen*=2,\"c\"!==r.labelpos.toLowerCase()&&(\"TB\"===e.rankdir||\"BT\"===e.rankdir?r.width+=r.labeloffset:r.height+=r.labeloffset);}));}(t);})),e(\"    removeSelfEdges\",(function(){!function(t){r.forEach(t.edges(),(function(e){if(e.v===e.w){var n=t.node(e.v);n.selfEdges||(n.selfEdges=[]),n.selfEdges.push({e,label:t.edge(e)}),t.removeEdge(e);}}));}(t);})),e(\"    acyclic\",(function(){i.run(t);})),e(\"    nestingGraph.run\",(function(){u.run(t);})),e(\"    rank\",(function(){o(g.asNonCompoundGraph(t));})),e(\"    injectEdgeLabelProxies\",(function(){!function(t){r.forEach(t.edges(),(function(e){var n=t.edge(e);if(n.width&&n.height){var r=t.node(e.v),i={rank:(t.node(e.w).rank-r.rank)/2+r.rank,e};g.addDummyNode(t,\"edge-proxy\",i,\"_ep\");}}));}(t);})),e(\"    removeEmptyRanks\",(function(){l(t);})),e(\"    nestingGraph.cleanup\",(function(){u.cleanup(t);})),e(\"    normalizeRanks\",(function(){s(t);})),e(\"    assignRankMinMax\",(function(){!function(t){var e=0;r.forEach(t.nodes(),(function(n){var i=t.node(n);i.borderTop&&(i.minRank=t.node(i.borderTop).rank,i.maxRank=t.node(i.borderBottom).rank,e=r.max(e,i.maxRank));})),t.graph().maxRank=e;}(t);})),e(\"    removeEdgeLabelProxies\",(function(){!function(t){r.forEach(t.nodes(),(function(e){var n=t.node(e);\"edge-proxy\"===n.dummy&&(t.edge(n.e).labelRank=n.rank,t.removeNode(e));}));}(t);})),e(\"    normalize.run\",(function(){a.run(t);})),e(\"    parentDummyChains\",(function(){c(t);})),e(\"    addBorderSegments\",(function(){h(t);})),e(\"    order\",(function(){d(t);})),e(\"    insertSelfEdges\",(function(){!function(t){var e=g.buildLayerMatrix(t);r.forEach(e,(function(e){var n=0;r.forEach(e,(function(e,i){var a=t.node(e);a.order=i+n,r.forEach(a.selfEdges,(function(e){g.addDummyNode(t,\"selfedge\",{width:e.label.width,height:e.label.height,rank:a.rank,order:i+ ++n,e:e.e,label:e.label},\"_se\");})),delete a.selfEdges;}));}));}(t);})),e(\"    adjustCoordinateSystem\",(function(){f.adjust(t);})),e(\"    position\",(function(){p(t);})),e(\"    positionSelfEdges\",(function(){!function(t){r.forEach(t.nodes(),(function(e){var n=t.node(e);if(\"selfedge\"===n.dummy){var r=t.node(n.e.v),i=r.x+r.width/2,a=r.y,o=n.x-i,s=r.height/2;t.setEdge(n.e,n.label),t.removeNode(e),n.label.points=[{x:i+2*o/3,y:a-s},{x:i+5*o/6,y:a-s},{x:i+o,y:a},{x:i+5*o/6,y:a+s},{x:i+2*o/3,y:a+s}],n.label.x=n.x,n.label.y=n.y;}}));}(t);})),e(\"    removeBorderNodes\",(function(){!function(t){r.forEach(t.nodes(),(function(e){if(t.children(e).length){var n=t.node(e),i=t.node(n.borderTop),a=t.node(n.borderBottom),o=t.node(r.last(n.borderLeft)),s=t.node(r.last(n.borderRight));n.width=Math.abs(s.x-o.x),n.height=Math.abs(a.y-i.y),n.x=o.x+n.width/2,n.y=i.y+n.height/2;}})),r.forEach(t.nodes(),(function(e){\"border\"===t.node(e).dummy&&t.removeNode(e);}));}(t);})),e(\"    normalize.undo\",(function(){a.undo(t);})),e(\"    fixupEdgeLabelCoords\",(function(){!function(t){r.forEach(t.edges(),(function(e){var n=t.edge(e);if(r.has(n,\"x\"))switch(\"l\"!==n.labelpos&&\"r\"!==n.labelpos||(n.width-=n.labeloffset),n.labelpos){case\"l\":n.x-=n.width/2+n.labeloffset;break;case\"r\":n.x+=n.width/2+n.labeloffset;}}));}(t);})),e(\"    undoCoordinateSystem\",(function(){f.undo(t);})),e(\"    translateGraph\",(function(){!function(t){var e=Number.POSITIVE_INFINITY,n=0,i=Number.POSITIVE_INFINITY,a=0,o=t.graph(),s=o.marginx||0,c=o.marginy||0;function l(t){var r=t.x,o=t.y,s=t.width,c=t.height;e=Math.min(e,r-s/2),n=Math.max(n,r+s/2),i=Math.min(i,o-c/2),a=Math.max(a,o+c/2);}r.forEach(t.nodes(),(function(e){l(t.node(e));})),r.forEach(t.edges(),(function(e){var n=t.edge(e);r.has(n,\"x\")&&l(n);})),e-=s,i-=c,r.forEach(t.nodes(),(function(n){var r=t.node(n);r.x-=e,r.y-=i;})),r.forEach(t.edges(),(function(n){var a=t.edge(n);r.forEach(a.points,(function(t){t.x-=e,t.y-=i;})),r.has(a,\"x\")&&(a.x-=e),r.has(a,\"y\")&&(a.y-=i);})),o.width=n-e+s,o.height=a-i+c;}(t);})),e(\"    assignNodeIntersects\",(function(){!function(t){r.forEach(t.edges(),(function(e){var n,r,i=t.edge(e),a=t.node(e.v),o=t.node(e.w);i.points?(n=i.points[0],r=i.points[i.points.length-1]):(i.points=[],n=o,r=a),i.points.unshift(g.intersectRect(a,n)),i.points.push(g.intersectRect(o,r));}));}(t);})),e(\"    reversePoints\",(function(){!function(t){r.forEach(t.edges(),(function(e){var n=t.edge(e);n.reversed&&n.points.reverse();}));}(t);})),e(\"    acyclic.undo\",(function(){i.undo(t);}));}(e,n);})),n(\"  updateInputGraph\",(function(){!function(t,e){r.forEach(t.nodes(),(function(n){var r=t.node(n),i=e.node(n);r&&(r.x=i.x,r.y=i.y,e.children(n).length&&(r.width=i.width,r.height=i.height));})),r.forEach(t.edges(),(function(n){var i=t.edge(n),a=e.edge(n);i.points=a.points,r.has(a,\"x\")&&(i.x=a.x,i.y=a.y);})),t.graph().width=e.graph().width,t.graph().height=e.graph().height;}(t,e);}));}));};var m=[\"nodesep\",\"edgesep\",\"ranksep\",\"marginx\",\"marginy\"],b={ranksep:50,edgesep:20,nodesep:50,rankdir:\"tb\"},v=[\"acyclicer\",\"ranker\",\"rankdir\",\"align\"],_=[\"width\",\"height\"],x={width:0,height:0},k=[\"minlen\",\"weight\",\"width\",\"height\",\"labeloffset\"],w={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:\"r\"},T=[\"labelpos\"];function E(t,e){return r.mapValues(r.pick(t,e),Number)}function C(t){var e={};return r.forEach(t,(function(t,n){e[n.toLowerCase()]=t;})),e}},8436:(t,e,n)=>{var r;try{r={cloneDeep:n(361),constant:n(5703),defaults:n(1747),each:n(6073),filter:n(3105),find:n(3311),flatten:n(5564),forEach:n(4486),forIn:n(2620),has:n(8721),isUndefined:n(2353),last:n(928),map:n(5161),mapValues:n(6604),max:n(6162),merge:n(3857),min:n(3632),minBy:n(2762),now:n(7771),pick:n(9722),range:n(6026),reduce:n(4061),sortBy:n(9734),uniqueId:n(3955),values:n(2628),zipObject:n(7287)};}catch(t){}r||(r=window._),t.exports=r;},2981:(t,e,n)=>{var r=n(8436),i=n(1138);function a(t,e,n,o,s,c,l){var u=t.children(l);if(u.length){var h=i.addBorderNode(t,\"_bt\"),f=i.addBorderNode(t,\"_bb\"),d=t.node(l);t.setParent(h,l),d.borderTop=h,t.setParent(f,l),d.borderBottom=f,r.forEach(u,(function(r){a(t,e,n,o,s,c,r);var i=t.node(r),u=i.borderTop?i.borderTop:r,d=i.borderBottom?i.borderBottom:r,p=i.borderTop?o:2*o,g=u!==d?1:s-c[l]+1;t.setEdge(h,u,{weight:p,minlen:g,nestingEdge:!0}),t.setEdge(d,f,{weight:p,minlen:g,nestingEdge:!0});})),t.parent(l)||t.setEdge(e,h,{weight:0,minlen:s+c[l]});}else l!==e&&t.setEdge(e,l,{weight:0,minlen:n});}t.exports={run:function(t){var e=i.addDummyNode(t,\"root\",{},\"_root\"),n=function(t){var e={};function n(i,a){var o=t.children(i);o&&o.length&&r.forEach(o,(function(t){n(t,a+1);})),e[i]=a;}return r.forEach(t.children(),(function(t){n(t,1);})),e}(t),o=r.max(r.values(n))-1,s=2*o+1;t.graph().nestingRoot=e,r.forEach(t.edges(),(function(e){t.edge(e).minlen*=s;}));var c=function(t){return r.reduce(t.edges(),(function(e,n){return e+t.edge(n).weight}),0)}(t)+1;r.forEach(t.children(),(function(r){a(t,e,s,c,o,n,r);})),t.graph().nodeRankFactor=s;},cleanup:function(t){var e=t.graph();t.removeNode(e.nestingRoot),delete e.nestingRoot,r.forEach(t.edges(),(function(e){t.edge(e).nestingEdge&&t.removeEdge(e);}));}};},5995:(t,e,n)=>{var r=n(8436),i=n(1138);t.exports={run:function(t){t.graph().dummyChains=[],r.forEach(t.edges(),(function(e){!function(t,e){var n,r,a,o=e.v,s=t.node(o).rank,c=e.w,l=t.node(c).rank,u=e.name,h=t.edge(e),f=h.labelRank;if(l!==s+1){for(t.removeEdge(e),a=0,++s;s<l;++a,++s)h.points=[],r={width:0,height:0,edgeLabel:h,edgeObj:e,rank:s},n=i.addDummyNode(t,\"edge\",r,\"_d\"),s===f&&(r.width=h.width,r.height=h.height,r.dummy=\"edge-label\",r.labelpos=h.labelpos),t.setEdge(o,n,{weight:h.weight},u),0===a&&t.graph().dummyChains.push(n),o=n;t.setEdge(o,c,{weight:h.weight},u);}}(t,e);}));},undo:function(t){r.forEach(t.graph().dummyChains,(function(e){var n,r=t.node(e),i=r.edgeLabel;for(t.setEdge(r.edgeObj,i);r.dummy;)n=t.successors(e)[0],t.removeNode(e),i.points.push({x:r.x,y:r.y}),\"edge-label\"===r.dummy&&(i.x=r.x,i.y=r.y,i.width=r.width,i.height=r.height),e=n,r=t.node(e);}));}};},5093:(t,e,n)=>{var r=n(8436);t.exports=function(t,e,n){var i,a={};r.forEach(n,(function(n){for(var r,o,s=t.parent(n);s;){if((r=t.parent(s))?(o=a[r],a[r]=s):(o=i,i=s),o&&o!==s)return void e.setEdge(o,s);s=r;}}));};},5439:(t,e,n)=>{var r=n(8436);t.exports=function(t,e){return r.map(e,(function(e){var n=t.inEdges(e);if(n.length){var i=r.reduce(n,(function(e,n){var r=t.edge(n),i=t.node(n.v);return {sum:e.sum+r.weight*i.order,weight:e.weight+r.weight}}),{sum:0,weight:0});return {v:e,barycenter:i.sum/i.weight,weight:i.weight}}return {v:e}}))};},3128:(t,e,n)=>{var r=n(8436),i=n(574).Graph;t.exports=function(t,e,n){var a=function(t){for(var e;t.hasNode(e=r.uniqueId(\"_root\")););return e}(t),o=new i({compound:!0}).setGraph({root:a}).setDefaultNodeLabel((function(e){return t.node(e)}));return r.forEach(t.nodes(),(function(i){var s=t.node(i),c=t.parent(i);(s.rank===e||s.minRank<=e&&e<=s.maxRank)&&(o.setNode(i),o.setParent(i,c||a),r.forEach(t[n](i),(function(e){var n=e.v===i?e.w:e.v,a=o.edge(n,i),s=r.isUndefined(a)?0:a.weight;o.setEdge(n,i,{weight:t.edge(e).weight+s});})),r.has(s,\"minRank\")&&o.setNode(i,{borderLeft:s.borderLeft[e],borderRight:s.borderRight[e]}));})),o};},6630:(t,e,n)=>{var r=n(8436);function i(t,e,n){for(var i=r.zipObject(n,r.map(n,(function(t,e){return e}))),a=r.flatten(r.map(e,(function(e){return r.sortBy(r.map(t.outEdges(e),(function(e){return {pos:i[e.w],weight:t.edge(e).weight}})),\"pos\")})),!0),o=1;o<n.length;)o<<=1;var s=2*o-1;o-=1;var c=r.map(new Array(s),(function(){return 0})),l=0;return r.forEach(a.forEach((function(t){var e=t.pos+o;c[e]+=t.weight;for(var n=0;e>0;)e%2&&(n+=c[e+1]),c[e=e-1>>1]+=t.weight;l+=t.weight*n;}))),l}t.exports=function(t,e){for(var n=0,r=1;r<e.length;++r)n+=i(t,e[r-1],e[r]);return n};},3408:(t,e,n)=>{var r=n(8436),i=n(2588),a=n(6630),o=n(1026),s=n(3128),c=n(5093),l=n(574).Graph,u=n(1138);function h(t,e,n){return r.map(e,(function(e){return s(t,e,n)}))}function f(t,e){var n=new l;r.forEach(t,(function(t){var i=t.graph().root,a=o(t,i,n,e);r.forEach(a.vs,(function(e,n){t.node(e).order=n;})),c(t,n,a.vs);}));}function d(t,e){r.forEach(e,(function(e){r.forEach(e,(function(e,n){t.node(e).order=n;}));}));}t.exports=function(t){var e=u.maxRank(t),n=h(t,r.range(1,e+1),\"inEdges\"),o=h(t,r.range(e-1,-1,-1),\"outEdges\"),s=i(t);d(t,s);for(var c,l=Number.POSITIVE_INFINITY,p=0,g=0;g<4;++p,++g){f(p%2?n:o,p%4>=2),s=u.buildLayerMatrix(t);var y=a(t,s);y<l&&(g=0,c=r.cloneDeep(s),l=y);}d(t,c);};},2588:(t,e,n)=>{var r=n(8436);t.exports=function(t){var e={},n=r.filter(t.nodes(),(function(e){return !t.children(e).length})),i=r.max(r.map(n,(function(e){return t.node(e).rank}))),a=r.map(r.range(i+1),(function(){return []})),o=r.sortBy(n,(function(e){return t.node(e).rank}));return r.forEach(o,(function n(i){if(!r.has(e,i)){e[i]=!0;var o=t.node(i);a[o.rank].push(i),r.forEach(t.successors(i),n);}})),a};},9567:(t,e,n)=>{var r=n(8436);t.exports=function(t,e){var n={};return r.forEach(t,(function(t,e){var i=n[t.v]={indegree:0,in:[],out:[],vs:[t.v],i:e};r.isUndefined(t.barycenter)||(i.barycenter=t.barycenter,i.weight=t.weight);})),r.forEach(e.edges(),(function(t){var e=n[t.v],i=n[t.w];r.isUndefined(e)||r.isUndefined(i)||(i.indegree++,e.out.push(n[t.w]));})),function(t){var e=[];function n(t){return function(e){var n,i,a,o;e.merged||(r.isUndefined(e.barycenter)||r.isUndefined(t.barycenter)||e.barycenter>=t.barycenter)&&(i=e,a=0,o=0,(n=t).weight&&(a+=n.barycenter*n.weight,o+=n.weight),i.weight&&(a+=i.barycenter*i.weight,o+=i.weight),n.vs=i.vs.concat(n.vs),n.barycenter=a/o,n.weight=o,n.i=Math.min(i.i,n.i),i.merged=!0);}}function i(e){return function(n){n.in.push(e),0==--n.indegree&&t.push(n);}}for(;t.length;){var a=t.pop();e.push(a),r.forEach(a.in.reverse(),n(a)),r.forEach(a.out,i(a));}return r.map(r.filter(e,(function(t){return !t.merged})),(function(t){return r.pick(t,[\"vs\",\"i\",\"barycenter\",\"weight\"])}))}(r.filter(n,(function(t){return !t.indegree})))};},1026:(t,e,n)=>{var r=n(8436),i=n(5439),a=n(9567),o=n(7304);t.exports=function t(e,n,s,c){var l=e.children(n),u=e.node(n),h=u?u.borderLeft:void 0,f=u?u.borderRight:void 0,d={};h&&(l=r.filter(l,(function(t){return t!==h&&t!==f})));var p=i(e,l);r.forEach(p,(function(n){if(e.children(n.v).length){var i=t(e,n.v,s,c);d[n.v]=i,r.has(i,\"barycenter\")&&(a=n,o=i,r.isUndefined(a.barycenter)?(a.barycenter=o.barycenter,a.weight=o.weight):(a.barycenter=(a.barycenter*a.weight+o.barycenter*o.weight)/(a.weight+o.weight),a.weight+=o.weight));}var a,o;}));var g=a(p,s);!function(t,e){r.forEach(t,(function(t){t.vs=r.flatten(t.vs.map((function(t){return e[t]?e[t].vs:t})),!0);}));}(g,d);var y=o(g,c);if(h&&(y.vs=r.flatten([h,y.vs,f],!0),e.predecessors(h).length)){var m=e.node(e.predecessors(h)[0]),b=e.node(e.predecessors(f)[0]);r.has(y,\"barycenter\")||(y.barycenter=0,y.weight=0),y.barycenter=(y.barycenter*y.weight+m.order+b.order)/(y.weight+2),y.weight+=2;}return y};},7304:(t,e,n)=>{var r=n(8436),i=n(1138);function a(t,e,n){for(var i;e.length&&(i=r.last(e)).i<=n;)e.pop(),t.push(i.vs),n++;return n}t.exports=function(t,e){var n,o=i.partition(t,(function(t){return r.has(t,\"barycenter\")})),s=o.lhs,c=r.sortBy(o.rhs,(function(t){return -t.i})),l=[],u=0,h=0,f=0;s.sort((n=!!e,function(t,e){return t.barycenter<e.barycenter?-1:t.barycenter>e.barycenter?1:n?e.i-t.i:t.i-e.i})),f=a(l,c,f),r.forEach(s,(function(t){f+=t.vs.length,l.push(t.vs),u+=t.barycenter*t.weight,h+=t.weight,f=a(l,c,f);}));var d={vs:r.flatten(l,!0)};return h&&(d.barycenter=u/h,d.weight=h),d};},4219:(t,e,n)=>{var r=n(8436);t.exports=function(t){var e=function(t){var e={},n=0;return r.forEach(t.children(),(function i(a){var o=n;r.forEach(t.children(a),i),e[a]={low:o,lim:n++};})),e}(t);r.forEach(t.graph().dummyChains,(function(n){for(var r=t.node(n),i=r.edgeObj,a=function(t,e,n,r){var i,a,o=[],s=[],c=Math.min(e[n].low,e[r].low),l=Math.max(e[n].lim,e[r].lim);i=n;do{i=t.parent(i),o.push(i);}while(i&&(e[i].low>c||l>e[i].lim));for(a=i,i=r;(i=t.parent(i))!==a;)s.push(i);return {path:o.concat(s.reverse()),lca:a}}(t,e,i.v,i.w),o=a.path,s=a.lca,c=0,l=o[c],u=!0;n!==i.w;){if(r=t.node(n),u){for(;(l=o[c])!==s&&t.node(l).maxRank<r.rank;)c++;l===s&&(u=!1);}if(!u){for(;c<o.length-1&&t.node(l=o[c+1]).minRank<=r.rank;)c++;l=o[c];}t.setParent(n,l),n=t.successors(n)[0];}}));};},3573:(t,e,n)=>{var r=n(8436),i=n(574).Graph,a=n(1138);function o(t,e){var n={};return r.reduce(e,(function(e,i){var a=0,o=0,s=e.length,l=r.last(i);return r.forEach(i,(function(e,u){var h=function(t,e){if(t.node(e).dummy)return r.find(t.predecessors(e),(function(e){return t.node(e).dummy}))}(t,e),f=h?t.node(h).order:s;(h||e===l)&&(r.forEach(i.slice(o,u+1),(function(e){r.forEach(t.predecessors(e),(function(r){var i=t.node(r),o=i.order;!(o<a||f<o)||i.dummy&&t.node(e).dummy||c(n,r,e);}));})),o=u+1,a=f);})),i})),n}function s(t,e){var n={};function i(e,i,a,o,s){var l;r.forEach(r.range(i,a),(function(i){l=e[i],t.node(l).dummy&&r.forEach(t.predecessors(l),(function(e){var r=t.node(e);r.dummy&&(r.order<o||r.order>s)&&c(n,e,l);}));}));}return r.reduce(e,(function(e,n){var a,o=-1,s=0;return r.forEach(n,(function(r,c){if(\"border\"===t.node(r).dummy){var l=t.predecessors(r);l.length&&(a=t.node(l[0]).order,i(n,s,c,o,a),s=c,o=a);}i(n,s,n.length,a,e.length);})),n})),n}function c(t,e,n){if(e>n){var r=e;e=n,n=r;}var i=t[e];i||(t[e]=i={}),i[n]=!0;}function l(t,e,n){if(e>n){var i=e;e=n,n=i;}return r.has(t[e],n)}function u(t,e,n,i){var a={},o={},s={};return r.forEach(e,(function(t){r.forEach(t,(function(t,e){a[t]=t,o[t]=t,s[t]=e;}));})),r.forEach(e,(function(t){var e=-1;r.forEach(t,(function(t){var c=i(t);if(c.length){c=r.sortBy(c,(function(t){return s[t]}));for(var u=(c.length-1)/2,h=Math.floor(u),f=Math.ceil(u);h<=f;++h){var d=c[h];o[t]===t&&e<s[d]&&!l(n,t,d)&&(o[d]=t,o[t]=a[t]=a[d],e=s[d]);}}}));})),{root:a,align:o}}function h(t,e,n,a,o){var s={},c=function(t,e,n,a){var o=new i,s=t.graph(),c=function(t,e,n){return function(i,a,o){var s,c=i.node(a),l=i.node(o),u=0;if(u+=c.width/2,r.has(c,\"labelpos\"))switch(c.labelpos.toLowerCase()){case\"l\":s=-c.width/2;break;case\"r\":s=c.width/2;}if(s&&(u+=n?s:-s),s=0,u+=(c.dummy?e:t)/2,u+=(l.dummy?e:t)/2,u+=l.width/2,r.has(l,\"labelpos\"))switch(l.labelpos.toLowerCase()){case\"l\":s=l.width/2;break;case\"r\":s=-l.width/2;}return s&&(u+=n?s:-s),s=0,u}}(s.nodesep,s.edgesep,a);return r.forEach(e,(function(e){var i;r.forEach(e,(function(e){var r=n[e];if(o.setNode(r),i){var a=n[i],s=o.edge(a,r);o.setEdge(a,r,Math.max(c(t,e,i),s||0));}i=e;}));})),o}(t,e,n,o),l=o?\"borderLeft\":\"borderRight\";function u(t,e){for(var n=c.nodes(),r=n.pop(),i={};r;)i[r]?t(r):(i[r]=!0,n.push(r),n=n.concat(e(r))),r=n.pop();}return u((function(t){s[t]=c.inEdges(t).reduce((function(t,e){return Math.max(t,s[e.v]+c.edge(e))}),0);}),c.predecessors.bind(c)),u((function(e){var n=c.outEdges(e).reduce((function(t,e){return Math.min(t,s[e.w]-c.edge(e))}),Number.POSITIVE_INFINITY),r=t.node(e);n!==Number.POSITIVE_INFINITY&&r.borderType!==l&&(s[e]=Math.max(s[e],n));}),c.successors.bind(c)),r.forEach(a,(function(t){s[t]=s[n[t]];})),s}function f(t,e){return r.minBy(r.values(e),(function(e){var n=Number.NEGATIVE_INFINITY,i=Number.POSITIVE_INFINITY;return r.forIn(e,(function(e,r){var a=function(t,e){return t.node(e).width}(t,r)/2;n=Math.max(e+a,n),i=Math.min(e-a,i);})),n-i}))}function d(t,e){var n=r.values(e),i=r.min(n),a=r.max(n);r.forEach([\"u\",\"d\"],(function(n){r.forEach([\"l\",\"r\"],(function(o){var s,c=n+o,l=t[c];if(l!==e){var u=r.values(l);(s=\"l\"===o?i-r.min(u):a-r.max(u))&&(t[c]=r.mapValues(l,(function(t){return t+s})));}}));}));}function p(t,e){return r.mapValues(t.ul,(function(n,i){if(e)return t[e.toLowerCase()][i];var a=r.sortBy(r.map(t,i));return (a[1]+a[2])/2}))}t.exports={positionX:function(t){var e,n=a.buildLayerMatrix(t),i=r.merge(o(t,n),s(t,n)),c={};r.forEach([\"u\",\"d\"],(function(a){e=\"u\"===a?n:r.values(n).reverse(),r.forEach([\"l\",\"r\"],(function(n){\"r\"===n&&(e=r.map(e,(function(t){return r.values(t).reverse()})));var o=(\"u\"===a?t.predecessors:t.successors).bind(t),s=u(0,e,i,o),l=h(t,e,s.root,s.align,\"r\"===n);\"r\"===n&&(l=r.mapValues(l,(function(t){return -t}))),c[a+n]=l;}));}));var l=f(t,c);return d(c,l),p(c,t.graph().align)},findType1Conflicts:o,findType2Conflicts:s,addConflict:c,hasConflict:l,verticalAlignment:u,horizontalCompaction:h,alignCoordinates:d,findSmallestWidthAlignment:f,balance:p};},7873:(t,e,n)=>{var r=n(8436),i=n(1138),a=n(3573).positionX;t.exports=function(t){(function(t){var e=i.buildLayerMatrix(t),n=t.graph().ranksep,a=0;r.forEach(e,(function(e){var i=r.max(r.map(e,(function(e){return t.node(e).height})));r.forEach(e,(function(e){t.node(e).y=a+i/2;})),a+=i+n;}));})(t=i.asNonCompoundGraph(t)),r.forEach(a(t),(function(e,n){t.node(n).x=e;}));};},300:(t,e,n)=>{var r=n(8436),i=n(574).Graph,a=n(6681).slack;function o(t,e){return r.forEach(t.nodes(),(function n(i){r.forEach(e.nodeEdges(i),(function(r){var o=r.v,s=i===o?r.w:o;t.hasNode(s)||a(e,r)||(t.setNode(s,{}),t.setEdge(i,s,{}),n(s));}));})),t.nodeCount()}function s(t,e){return r.minBy(e.edges(),(function(n){if(t.hasNode(n.v)!==t.hasNode(n.w))return a(e,n)}))}function c(t,e,n){r.forEach(t.nodes(),(function(t){e.node(t).rank+=n;}));}t.exports=function(t){var e,n,r=new i({directed:!1}),l=t.nodes()[0],u=t.nodeCount();for(r.setNode(l,{});o(r,t)<u;)e=s(r,t),n=r.hasNode(e.v)?a(t,e):-a(t,e),c(r,t,n);return r};},8093:(t,e,n)=>{var r=n(6681).longestPath,i=n(300),a=n(2472);t.exports=function(t){switch(t.graph().ranker){case\"network-simplex\":default:!function(t){a(t);}(t);break;case\"tight-tree\":!function(t){r(t),i(t);}(t);break;case\"longest-path\":o(t);}};var o=r;},2472:(t,e,n)=>{var r=n(8436),i=n(300),a=n(6681).slack,o=n(6681).longestPath,s=n(574).alg.preorder,c=n(574).alg.postorder,l=n(1138).simplify;function u(t){t=l(t),o(t);var e,n=i(t);for(d(n),h(n,t);e=g(n);)m(n,t,e,y(n,t,e));}function h(t,e){var n=c(t,t.nodes());n=n.slice(0,n.length-1),r.forEach(n,(function(n){!function(t,e,n){var r=t.node(n).parent;t.edge(n,r).cutvalue=f(t,e,n);}(t,e,n);}));}function f(t,e,n){var i=t.node(n).parent,a=!0,o=e.edge(n,i),s=0;return o||(a=!1,o=e.edge(i,n)),s=o.weight,r.forEach(e.nodeEdges(n),(function(r){var o,c,l=r.v===n,u=l?r.w:r.v;if(u!==i){var h=l===a,f=e.edge(r).weight;if(s+=h?f:-f,o=n,c=u,t.hasEdge(o,c)){var d=t.edge(n,u).cutvalue;s+=h?-d:d;}}})),s}function d(t,e){arguments.length<2&&(e=t.nodes()[0]),p(t,{},1,e);}function p(t,e,n,i,a){var o=n,s=t.node(i);return e[i]=!0,r.forEach(t.neighbors(i),(function(a){r.has(e,a)||(n=p(t,e,n,a,i));})),s.low=o,s.lim=n++,a?s.parent=a:delete s.parent,n}function g(t){return r.find(t.edges(),(function(e){return t.edge(e).cutvalue<0}))}function y(t,e,n){var i=n.v,o=n.w;e.hasEdge(i,o)||(i=n.w,o=n.v);var s=t.node(i),c=t.node(o),l=s,u=!1;s.lim>c.lim&&(l=c,u=!0);var h=r.filter(e.edges(),(function(e){return u===b(0,t.node(e.v),l)&&u!==b(0,t.node(e.w),l)}));return r.minBy(h,(function(t){return a(e,t)}))}function m(t,e,n,i){var a=n.v,o=n.w;t.removeEdge(a,o),t.setEdge(i.v,i.w,{}),d(t),h(t,e),function(t,e){var n=r.find(t.nodes(),(function(t){return !e.node(t).parent})),i=s(t,n);i=i.slice(1),r.forEach(i,(function(n){var r=t.node(n).parent,i=e.edge(n,r),a=!1;i||(i=e.edge(r,n),a=!0),e.node(n).rank=e.node(r).rank+(a?i.minlen:-i.minlen);}));}(t,e);}function b(t,e,n){return n.low<=e.lim&&e.lim<=n.lim}t.exports=u,u.initLowLimValues=d,u.initCutValues=h,u.calcCutValue=f,u.leaveEdge=g,u.enterEdge=y,u.exchangeEdges=m;},6681:(t,e,n)=>{var r=n(8436);t.exports={longestPath:function(t){var e={};r.forEach(t.sources(),(function n(i){var a=t.node(i);if(r.has(e,i))return a.rank;e[i]=!0;var o=r.min(r.map(t.outEdges(i),(function(e){return n(e.w)-t.edge(e).minlen})));return o!==Number.POSITIVE_INFINITY&&null!=o||(o=0),a.rank=o}));},slack:function(t,e){return t.node(e.w).rank-t.node(e.v).rank-t.edge(e).minlen}};},1138:(t,e,n)=>{var r=n(8436),i=n(574).Graph;function a(t,e,n,i){var a;do{a=r.uniqueId(i);}while(t.hasNode(a));return n.dummy=e,t.setNode(a,n),a}function o(t){return r.max(r.map(t.nodes(),(function(e){var n=t.node(e).rank;if(!r.isUndefined(n))return n})))}t.exports={addDummyNode:a,simplify:function(t){var e=(new i).setGraph(t.graph());return r.forEach(t.nodes(),(function(n){e.setNode(n,t.node(n));})),r.forEach(t.edges(),(function(n){var r=e.edge(n.v,n.w)||{weight:0,minlen:1},i=t.edge(n);e.setEdge(n.v,n.w,{weight:r.weight+i.weight,minlen:Math.max(r.minlen,i.minlen)});})),e},asNonCompoundGraph:function(t){var e=new i({multigraph:t.isMultigraph()}).setGraph(t.graph());return r.forEach(t.nodes(),(function(n){t.children(n).length||e.setNode(n,t.node(n));})),r.forEach(t.edges(),(function(n){e.setEdge(n,t.edge(n));})),e},successorWeights:function(t){var e=r.map(t.nodes(),(function(e){var n={};return r.forEach(t.outEdges(e),(function(e){n[e.w]=(n[e.w]||0)+t.edge(e).weight;})),n}));return r.zipObject(t.nodes(),e)},predecessorWeights:function(t){var e=r.map(t.nodes(),(function(e){var n={};return r.forEach(t.inEdges(e),(function(e){n[e.v]=(n[e.v]||0)+t.edge(e).weight;})),n}));return r.zipObject(t.nodes(),e)},intersectRect:function(t,e){var n,r,i=t.x,a=t.y,o=e.x-i,s=e.y-a,c=t.width/2,l=t.height/2;if(!o&&!s)throw new Error(\"Not possible to find intersection inside of the rectangle\");return Math.abs(s)*c>Math.abs(o)*l?(s<0&&(l=-l),n=l*o/s,r=l):(o<0&&(c=-c),n=c,r=c*s/o),{x:i+n,y:a+r}},buildLayerMatrix:function(t){var e=r.map(r.range(o(t)+1),(function(){return []}));return r.forEach(t.nodes(),(function(n){var i=t.node(n),a=i.rank;r.isUndefined(a)||(e[a][i.order]=n);})),e},normalizeRanks:function(t){var e=r.min(r.map(t.nodes(),(function(e){return t.node(e).rank})));r.forEach(t.nodes(),(function(n){var i=t.node(n);r.has(i,\"rank\")&&(i.rank-=e);}));},removeEmptyRanks:function(t){var e=r.min(r.map(t.nodes(),(function(e){return t.node(e).rank}))),n=[];r.forEach(t.nodes(),(function(r){var i=t.node(r).rank-e;n[i]||(n[i]=[]),n[i].push(r);}));var i=0,a=t.graph().nodeRankFactor;r.forEach(n,(function(e,n){r.isUndefined(e)&&n%a!=0?--i:i&&r.forEach(e,(function(e){t.node(e).rank+=i;}));}));},addBorderNode:function(t,e,n,r){var i={width:0,height:0};return arguments.length>=4&&(i.rank=n,i.order=r),a(t,\"border\",i,e)},maxRank:o,partition:function(t,e){var n={lhs:[],rhs:[]};return r.forEach(t,(function(t){e(t)?n.lhs.push(t):n.rhs.push(t);})),n},time:function(t,e){var n=r.now();try{return e()}finally{console.log(t+\" time: \"+(r.now()-n)+\"ms\");}},notime:function(t,e){return e()}};},8177:t=>{t.exports=\"0.8.5\";},7856:function(t){t.exports=function(){function t(e){return t=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&\"function\"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?\"symbol\":typeof t},t(e)}function e(t,n){return e=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},e(t,n)}function n(){if(\"undefined\"==typeof Reflect||!Reflect.construct)return !1;if(Reflect.construct.sham)return !1;if(\"function\"==typeof Proxy)return !0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return !1}}function r(t,i,a){return r=n()?Reflect.construct:function(t,n,r){var i=[null];i.push.apply(i,n);var a=new(Function.bind.apply(t,i));return r&&e(a,r.prototype),a},r.apply(null,arguments)}function i(t){return function(t){if(Array.isArray(t))return a(t)}(t)||function(t){if(\"undefined\"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t[\"@@iterator\"])return Array.from(t)}(t)||function(t,e){if(t){if(\"string\"==typeof t)return a(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return \"Object\"===n&&t.constructor&&(n=t.constructor.name),\"Map\"===n||\"Set\"===n?Array.from(t):\"Arguments\"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?a(t,e):void 0}}(t)||function(){throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\")}()}function a(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var o=Object.hasOwnProperty,s=Object.setPrototypeOf,c=Object.isFrozen,l=Object.getPrototypeOf,u=Object.getOwnPropertyDescriptor,h=Object.freeze,f=Object.seal,d=Object.create,p=\"undefined\"!=typeof Reflect&&Reflect,g=p.apply,y=p.construct;g||(g=function(t,e,n){return t.apply(e,n)}),h||(h=function(t){return t}),f||(f=function(t){return t}),y||(y=function(t,e){return r(t,i(e))});var m,b=A(Array.prototype.forEach),v=A(Array.prototype.pop),_=A(Array.prototype.push),x=A(String.prototype.toLowerCase),k=A(String.prototype.match),w=A(String.prototype.replace),T=A(String.prototype.indexOf),E=A(String.prototype.trim),C=A(RegExp.prototype.test),S=(m=TypeError,function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return y(m,e)});function A(t){return function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return g(t,e,r)}}function M(t,e,n){n=n||x,s&&s(t,null);for(var r=e.length;r--;){var i=e[r];if(\"string\"==typeof i){var a=n(i);a!==i&&(c(e)||(e[r]=a),i=a);}t[i]=!0;}return t}function N(t){var e,n=d(null);for(e in t)g(o,t,[e])&&(n[e]=t[e]);return n}function O(t,e){for(;null!==t;){var n=u(t,e);if(n){if(n.get)return A(n.get);if(\"function\"==typeof n.value)return A(n.value)}t=l(t);}return function(t){return console.warn(\"fallback value for\",t),null}}var D=h([\"a\",\"abbr\",\"acronym\",\"address\",\"area\",\"article\",\"aside\",\"audio\",\"b\",\"bdi\",\"bdo\",\"big\",\"blink\",\"blockquote\",\"body\",\"br\",\"button\",\"canvas\",\"caption\",\"center\",\"cite\",\"code\",\"col\",\"colgroup\",\"content\",\"data\",\"datalist\",\"dd\",\"decorator\",\"del\",\"details\",\"dfn\",\"dialog\",\"dir\",\"div\",\"dl\",\"dt\",\"element\",\"em\",\"fieldset\",\"figcaption\",\"figure\",\"font\",\"footer\",\"form\",\"h1\",\"h2\",\"h3\",\"h4\",\"h5\",\"h6\",\"head\",\"header\",\"hgroup\",\"hr\",\"html\",\"i\",\"img\",\"input\",\"ins\",\"kbd\",\"label\",\"legend\",\"li\",\"main\",\"map\",\"mark\",\"marquee\",\"menu\",\"menuitem\",\"meter\",\"nav\",\"nobr\",\"ol\",\"optgroup\",\"option\",\"output\",\"p\",\"picture\",\"pre\",\"progress\",\"q\",\"rp\",\"rt\",\"ruby\",\"s\",\"samp\",\"section\",\"select\",\"shadow\",\"small\",\"source\",\"spacer\",\"span\",\"strike\",\"strong\",\"style\",\"sub\",\"summary\",\"sup\",\"table\",\"tbody\",\"td\",\"template\",\"textarea\",\"tfoot\",\"th\",\"thead\",\"time\",\"tr\",\"track\",\"tt\",\"u\",\"ul\",\"var\",\"video\",\"wbr\"]),B=h([\"svg\",\"a\",\"altglyph\",\"altglyphdef\",\"altglyphitem\",\"animatecolor\",\"animatemotion\",\"animatetransform\",\"circle\",\"clippath\",\"defs\",\"desc\",\"ellipse\",\"filter\",\"font\",\"g\",\"glyph\",\"glyphref\",\"hkern\",\"image\",\"line\",\"lineargradient\",\"marker\",\"mask\",\"metadata\",\"mpath\",\"path\",\"pattern\",\"polygon\",\"polyline\",\"radialgradient\",\"rect\",\"stop\",\"style\",\"switch\",\"symbol\",\"text\",\"textpath\",\"title\",\"tref\",\"tspan\",\"view\",\"vkern\"]),L=h([\"feBlend\",\"feColorMatrix\",\"feComponentTransfer\",\"feComposite\",\"feConvolveMatrix\",\"feDiffuseLighting\",\"feDisplacementMap\",\"feDistantLight\",\"feFlood\",\"feFuncA\",\"feFuncB\",\"feFuncG\",\"feFuncR\",\"feGaussianBlur\",\"feImage\",\"feMerge\",\"feMergeNode\",\"feMorphology\",\"feOffset\",\"fePointLight\",\"feSpecularLighting\",\"feSpotLight\",\"feTile\",\"feTurbulence\"]),I=h([\"animate\",\"color-profile\",\"cursor\",\"discard\",\"fedropshadow\",\"font-face\",\"font-face-format\",\"font-face-name\",\"font-face-src\",\"font-face-uri\",\"foreignobject\",\"hatch\",\"hatchpath\",\"mesh\",\"meshgradient\",\"meshpatch\",\"meshrow\",\"missing-glyph\",\"script\",\"set\",\"solidcolor\",\"unknown\",\"use\"]),F=h([\"math\",\"menclose\",\"merror\",\"mfenced\",\"mfrac\",\"mglyph\",\"mi\",\"mlabeledtr\",\"mmultiscripts\",\"mn\",\"mo\",\"mover\",\"mpadded\",\"mphantom\",\"mroot\",\"mrow\",\"ms\",\"mspace\",\"msqrt\",\"mstyle\",\"msub\",\"msup\",\"msubsup\",\"mtable\",\"mtd\",\"mtext\",\"mtr\",\"munder\",\"munderover\"]),R=h([\"maction\",\"maligngroup\",\"malignmark\",\"mlongdiv\",\"mscarries\",\"mscarry\",\"msgroup\",\"mstack\",\"msline\",\"msrow\",\"semantics\",\"annotation\",\"annotation-xml\",\"mprescripts\",\"none\"]),P=h([\"#text\"]),j=h([\"accept\",\"action\",\"align\",\"alt\",\"autocapitalize\",\"autocomplete\",\"autopictureinpicture\",\"autoplay\",\"background\",\"bgcolor\",\"border\",\"capture\",\"cellpadding\",\"cellspacing\",\"checked\",\"cite\",\"class\",\"clear\",\"color\",\"cols\",\"colspan\",\"controls\",\"controlslist\",\"coords\",\"crossorigin\",\"datetime\",\"decoding\",\"default\",\"dir\",\"disabled\",\"disablepictureinpicture\",\"disableremoteplayback\",\"download\",\"draggable\",\"enctype\",\"enterkeyhint\",\"face\",\"for\",\"headers\",\"height\",\"hidden\",\"high\",\"href\",\"hreflang\",\"id\",\"inputmode\",\"integrity\",\"ismap\",\"kind\",\"label\",\"lang\",\"list\",\"loading\",\"loop\",\"low\",\"max\",\"maxlength\",\"media\",\"method\",\"min\",\"minlength\",\"multiple\",\"muted\",\"name\",\"nonce\",\"noshade\",\"novalidate\",\"nowrap\",\"open\",\"optimum\",\"pattern\",\"placeholder\",\"playsinline\",\"poster\",\"preload\",\"pubdate\",\"radiogroup\",\"readonly\",\"rel\",\"required\",\"rev\",\"reversed\",\"role\",\"rows\",\"rowspan\",\"spellcheck\",\"scope\",\"selected\",\"shape\",\"size\",\"sizes\",\"span\",\"srclang\",\"start\",\"src\",\"srcset\",\"step\",\"style\",\"summary\",\"tabindex\",\"title\",\"translate\",\"type\",\"usemap\",\"valign\",\"value\",\"width\",\"xmlns\",\"slot\"]),z=h([\"accent-height\",\"accumulate\",\"additive\",\"alignment-baseline\",\"ascent\",\"attributename\",\"attributetype\",\"azimuth\",\"basefrequency\",\"baseline-shift\",\"begin\",\"bias\",\"by\",\"class\",\"clip\",\"clippathunits\",\"clip-path\",\"clip-rule\",\"color\",\"color-interpolation\",\"color-interpolation-filters\",\"color-profile\",\"color-rendering\",\"cx\",\"cy\",\"d\",\"dx\",\"dy\",\"diffuseconstant\",\"direction\",\"display\",\"divisor\",\"dur\",\"edgemode\",\"elevation\",\"end\",\"fill\",\"fill-opacity\",\"fill-rule\",\"filter\",\"filterunits\",\"flood-color\",\"flood-opacity\",\"font-family\",\"font-size\",\"font-size-adjust\",\"font-stretch\",\"font-style\",\"font-variant\",\"font-weight\",\"fx\",\"fy\",\"g1\",\"g2\",\"glyph-name\",\"glyphref\",\"gradientunits\",\"gradienttransform\",\"height\",\"href\",\"id\",\"image-rendering\",\"in\",\"in2\",\"k\",\"k1\",\"k2\",\"k3\",\"k4\",\"kerning\",\"keypoints\",\"keysplines\",\"keytimes\",\"lang\",\"lengthadjust\",\"letter-spacing\",\"kernelmatrix\",\"kernelunitlength\",\"lighting-color\",\"local\",\"marker-end\",\"marker-mid\",\"marker-start\",\"markerheight\",\"markerunits\",\"markerwidth\",\"maskcontentunits\",\"maskunits\",\"max\",\"mask\",\"media\",\"method\",\"mode\",\"min\",\"name\",\"numoctaves\",\"offset\",\"operator\",\"opacity\",\"order\",\"orient\",\"orientation\",\"origin\",\"overflow\",\"paint-order\",\"path\",\"pathlength\",\"patterncontentunits\",\"patterntransform\",\"patternunits\",\"points\",\"preservealpha\",\"preserveaspectratio\",\"primitiveunits\",\"r\",\"rx\",\"ry\",\"radius\",\"refx\",\"refy\",\"repeatcount\",\"repeatdur\",\"restart\",\"result\",\"rotate\",\"scale\",\"seed\",\"shape-rendering\",\"specularconstant\",\"specularexponent\",\"spreadmethod\",\"startoffset\",\"stddeviation\",\"stitchtiles\",\"stop-color\",\"stop-opacity\",\"stroke-dasharray\",\"stroke-dashoffset\",\"stroke-linecap\",\"stroke-linejoin\",\"stroke-miterlimit\",\"stroke-opacity\",\"stroke\",\"stroke-width\",\"style\",\"surfacescale\",\"systemlanguage\",\"tabindex\",\"targetx\",\"targety\",\"transform\",\"transform-origin\",\"text-anchor\",\"text-decoration\",\"text-rendering\",\"textlength\",\"type\",\"u1\",\"u2\",\"unicode\",\"values\",\"viewbox\",\"visibility\",\"version\",\"vert-adv-y\",\"vert-origin-x\",\"vert-origin-y\",\"width\",\"word-spacing\",\"wrap\",\"writing-mode\",\"xchannelselector\",\"ychannelselector\",\"x\",\"x1\",\"x2\",\"xmlns\",\"y\",\"y1\",\"y2\",\"z\",\"zoomandpan\"]),Y=h([\"accent\",\"accentunder\",\"align\",\"bevelled\",\"close\",\"columnsalign\",\"columnlines\",\"columnspan\",\"denomalign\",\"depth\",\"dir\",\"display\",\"displaystyle\",\"encoding\",\"fence\",\"frame\",\"height\",\"href\",\"id\",\"largeop\",\"length\",\"linethickness\",\"lspace\",\"lquote\",\"mathbackground\",\"mathcolor\",\"mathsize\",\"mathvariant\",\"maxsize\",\"minsize\",\"movablelimits\",\"notation\",\"numalign\",\"open\",\"rowalign\",\"rowlines\",\"rowspacing\",\"rowspan\",\"rspace\",\"rquote\",\"scriptlevel\",\"scriptminsize\",\"scriptsizemultiplier\",\"selection\",\"separator\",\"separators\",\"stretchy\",\"subscriptshift\",\"supscriptshift\",\"symmetric\",\"voffset\",\"width\",\"xmlns\"]),U=h([\"xlink:href\",\"xml:id\",\"xlink:title\",\"xml:space\",\"xmlns:xlink\"]),$=f(/\\{\\{[\\w\\W]*|[\\w\\W]*\\}\\}/gm),W=f(/<%[\\w\\W]*|[\\w\\W]*%>/gm),q=f(/^data-[\\-\\w.\\u00B7-\\uFFFF]/),H=f(/^aria-[\\-\\w]+$/),V=f(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\\-]+(?:[^a-z+.\\-:]|$))/i),G=f(/^(?:\\w+script|data):/i),X=f(/[\\u0000-\\u0020\\u00A0\\u1680\\u180E\\u2000-\\u2029\\u205F\\u3000]/g),Z=f(/^html$/i),Q=function(){return \"undefined\"==typeof window?null:window},K=function(e,n){if(\"object\"!==t(e)||\"function\"!=typeof e.createPolicy)return null;var r=null,i=\"data-tt-policy-suffix\";n.currentScript&&n.currentScript.hasAttribute(i)&&(r=n.currentScript.getAttribute(i));var a=\"dompurify\"+(r?\"#\"+r:\"\");try{return e.createPolicy(a,{createHTML:function(t){return t},createScriptURL:function(t){return t}})}catch(t){return console.warn(\"TrustedTypes policy \"+a+\" could not be created.\"),null}};return function e(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Q(),r=function(t){return e(t)};if(r.version=\"2.4.0\",r.removed=[],!n||!n.document||9!==n.document.nodeType)return r.isSupported=!1,r;var a=n.document,o=n.document,s=n.DocumentFragment,c=n.HTMLTemplateElement,l=n.Node,u=n.Element,f=n.NodeFilter,d=n.NamedNodeMap,p=void 0===d?n.NamedNodeMap||n.MozNamedAttrMap:d,g=n.HTMLFormElement,y=n.DOMParser,m=n.trustedTypes,A=u.prototype,J=O(A,\"cloneNode\"),tt=O(A,\"nextSibling\"),et=O(A,\"childNodes\"),nt=O(A,\"parentNode\");if(\"function\"==typeof c){var rt=o.createElement(\"template\");rt.content&&rt.content.ownerDocument&&(o=rt.content.ownerDocument);}var it=K(m,a),at=it?it.createHTML(\"\"):\"\",ot=o,st=ot.implementation,ct=ot.createNodeIterator,lt=ot.createDocumentFragment,ut=ot.getElementsByTagName,ht=a.importNode,ft={};try{ft=N(o).documentMode?o.documentMode:{};}catch(t){}var dt={};r.isSupported=\"function\"==typeof nt&&st&&void 0!==st.createHTMLDocument&&9!==ft;var pt,gt,yt=$,mt=W,bt=q,vt=H,_t=G,xt=X,kt=V,wt=null,Tt=M({},[].concat(i(D),i(B),i(L),i(F),i(P))),Et=null,Ct=M({},[].concat(i(j),i(z),i(Y),i(U))),St=Object.seal(Object.create(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),At=null,Mt=null,Nt=!0,Ot=!0,Dt=!1,Bt=!1,Lt=!1,It=!1,Ft=!1,Rt=!1,Pt=!1,jt=!1,zt=!0,Yt=!1,Ut=\"user-content-\",$t=!0,Wt=!1,qt={},Ht=null,Vt=M({},[\"annotation-xml\",\"audio\",\"colgroup\",\"desc\",\"foreignobject\",\"head\",\"iframe\",\"math\",\"mi\",\"mn\",\"mo\",\"ms\",\"mtext\",\"noembed\",\"noframes\",\"noscript\",\"plaintext\",\"script\",\"style\",\"svg\",\"template\",\"thead\",\"title\",\"video\",\"xmp\"]),Gt=null,Xt=M({},[\"audio\",\"video\",\"img\",\"source\",\"image\",\"track\"]),Zt=null,Qt=M({},[\"alt\",\"class\",\"for\",\"id\",\"label\",\"name\",\"pattern\",\"placeholder\",\"role\",\"summary\",\"title\",\"value\",\"style\",\"xmlns\"]),Kt=\"http://www.w3.org/1998/Math/MathML\",Jt=\"http://www.w3.org/2000/svg\",te=\"http://www.w3.org/1999/xhtml\",ee=te,ne=!1,re=[\"application/xhtml+xml\",\"text/html\"],ie=\"text/html\",ae=null,oe=o.createElement(\"form\"),se=function(t){return t instanceof RegExp||t instanceof Function},ce=function(e){ae&&ae===e||(e&&\"object\"===t(e)||(e={}),e=N(e),pt=pt=-1===re.indexOf(e.PARSER_MEDIA_TYPE)?ie:e.PARSER_MEDIA_TYPE,gt=\"application/xhtml+xml\"===pt?function(t){return t}:x,wt=\"ALLOWED_TAGS\"in e?M({},e.ALLOWED_TAGS,gt):Tt,Et=\"ALLOWED_ATTR\"in e?M({},e.ALLOWED_ATTR,gt):Ct,Zt=\"ADD_URI_SAFE_ATTR\"in e?M(N(Qt),e.ADD_URI_SAFE_ATTR,gt):Qt,Gt=\"ADD_DATA_URI_TAGS\"in e?M(N(Xt),e.ADD_DATA_URI_TAGS,gt):Xt,Ht=\"FORBID_CONTENTS\"in e?M({},e.FORBID_CONTENTS,gt):Vt,At=\"FORBID_TAGS\"in e?M({},e.FORBID_TAGS,gt):{},Mt=\"FORBID_ATTR\"in e?M({},e.FORBID_ATTR,gt):{},qt=\"USE_PROFILES\"in e&&e.USE_PROFILES,Nt=!1!==e.ALLOW_ARIA_ATTR,Ot=!1!==e.ALLOW_DATA_ATTR,Dt=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Bt=e.SAFE_FOR_TEMPLATES||!1,Lt=e.WHOLE_DOCUMENT||!1,Rt=e.RETURN_DOM||!1,Pt=e.RETURN_DOM_FRAGMENT||!1,jt=e.RETURN_TRUSTED_TYPE||!1,Ft=e.FORCE_BODY||!1,zt=!1!==e.SANITIZE_DOM,Yt=e.SANITIZE_NAMED_PROPS||!1,$t=!1!==e.KEEP_CONTENT,Wt=e.IN_PLACE||!1,kt=e.ALLOWED_URI_REGEXP||kt,ee=e.NAMESPACE||te,e.CUSTOM_ELEMENT_HANDLING&&se(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(St.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&se(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(St.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&\"boolean\"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(St.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Bt&&(Ot=!1),Pt&&(Rt=!0),qt&&(wt=M({},i(P)),Et=[],!0===qt.html&&(M(wt,D),M(Et,j)),!0===qt.svg&&(M(wt,B),M(Et,z),M(Et,U)),!0===qt.svgFilters&&(M(wt,L),M(Et,z),M(Et,U)),!0===qt.mathMl&&(M(wt,F),M(Et,Y),M(Et,U))),e.ADD_TAGS&&(wt===Tt&&(wt=N(wt)),M(wt,e.ADD_TAGS,gt)),e.ADD_ATTR&&(Et===Ct&&(Et=N(Et)),M(Et,e.ADD_ATTR,gt)),e.ADD_URI_SAFE_ATTR&&M(Zt,e.ADD_URI_SAFE_ATTR,gt),e.FORBID_CONTENTS&&(Ht===Vt&&(Ht=N(Ht)),M(Ht,e.FORBID_CONTENTS,gt)),$t&&(wt[\"#text\"]=!0),Lt&&M(wt,[\"html\",\"head\",\"body\"]),wt.table&&(M(wt,[\"tbody\"]),delete At.tbody),h&&h(e),ae=e);},le=M({},[\"mi\",\"mo\",\"mn\",\"ms\",\"mtext\"]),ue=M({},[\"foreignobject\",\"desc\",\"title\",\"annotation-xml\"]),he=M({},[\"title\",\"style\",\"font\",\"a\",\"script\"]),fe=M({},B);M(fe,L),M(fe,I);var de=M({},F);M(de,R);var pe=function(t){var e=nt(t);e&&e.tagName||(e={namespaceURI:te,tagName:\"template\"});var n=x(t.tagName),r=x(e.tagName);return t.namespaceURI===Jt?e.namespaceURI===te?\"svg\"===n:e.namespaceURI===Kt?\"svg\"===n&&(\"annotation-xml\"===r||le[r]):Boolean(fe[n]):t.namespaceURI===Kt?e.namespaceURI===te?\"math\"===n:e.namespaceURI===Jt?\"math\"===n&&ue[r]:Boolean(de[n]):t.namespaceURI===te&&!(e.namespaceURI===Jt&&!ue[r])&&!(e.namespaceURI===Kt&&!le[r])&&!de[n]&&(he[n]||!fe[n])},ge=function(t){_(r.removed,{element:t});try{t.parentNode.removeChild(t);}catch(e){try{t.outerHTML=at;}catch(e){t.remove();}}},ye=function(t,e){try{_(r.removed,{attribute:e.getAttributeNode(t),from:e});}catch(t){_(r.removed,{attribute:null,from:e});}if(e.removeAttribute(t),\"is\"===t&&!Et[t])if(Rt||Pt)try{ge(e);}catch(t){}else try{e.setAttribute(t,\"\");}catch(t){}},me=function(t){var e,n;if(Ft)t=\"<remove></remove>\"+t;else {var r=k(t,/^[\\r\\n\\t ]+/);n=r&&r[0];}\"application/xhtml+xml\"===pt&&(t='<html xmlns=\"http://www.w3.org/1999/xhtml\"><head></head><body>'+t+\"</body></html>\");var i=it?it.createHTML(t):t;if(ee===te)try{e=(new y).parseFromString(i,pt);}catch(t){}if(!e||!e.documentElement){e=st.createDocument(ee,\"template\",null);try{e.documentElement.innerHTML=ne?\"\":i;}catch(t){}}var a=e.body||e.documentElement;return t&&n&&a.insertBefore(o.createTextNode(n),a.childNodes[0]||null),ee===te?ut.call(e,Lt?\"html\":\"body\")[0]:Lt?e.documentElement:a},be=function(t){return ct.call(t.ownerDocument||t,t,f.SHOW_ELEMENT|f.SHOW_COMMENT|f.SHOW_TEXT,null,!1)},ve=function(t){return t instanceof g&&(\"string\"!=typeof t.nodeName||\"string\"!=typeof t.textContent||\"function\"!=typeof t.removeChild||!(t.attributes instanceof p)||\"function\"!=typeof t.removeAttribute||\"function\"!=typeof t.setAttribute||\"string\"!=typeof t.namespaceURI||\"function\"!=typeof t.insertBefore)},_e=function(e){return \"object\"===t(l)?e instanceof l:e&&\"object\"===t(e)&&\"number\"==typeof e.nodeType&&\"string\"==typeof e.nodeName},xe=function(t,e,n){dt[t]&&b(dt[t],(function(t){t.call(r,e,n,ae);}));},ke=function(t){var e;if(xe(\"beforeSanitizeElements\",t,null),ve(t))return ge(t),!0;if(C(/[\\u0080-\\uFFFF]/,t.nodeName))return ge(t),!0;var n=gt(t.nodeName);if(xe(\"uponSanitizeElement\",t,{tagName:n,allowedTags:wt}),t.hasChildNodes()&&!_e(t.firstElementChild)&&(!_e(t.content)||!_e(t.content.firstElementChild))&&C(/<[/\\w]/g,t.innerHTML)&&C(/<[/\\w]/g,t.textContent))return ge(t),!0;if(\"select\"===n&&C(/<template/i,t.innerHTML))return ge(t),!0;if(!wt[n]||At[n]){if(!At[n]&&Te(n)){if(St.tagNameCheck instanceof RegExp&&C(St.tagNameCheck,n))return !1;if(St.tagNameCheck instanceof Function&&St.tagNameCheck(n))return !1}if($t&&!Ht[n]){var i=nt(t)||t.parentNode,a=et(t)||t.childNodes;if(a&&i)for(var o=a.length-1;o>=0;--o)i.insertBefore(J(a[o],!0),tt(t));}return ge(t),!0}return t instanceof u&&!pe(t)?(ge(t),!0):\"noscript\"!==n&&\"noembed\"!==n||!C(/<\\/no(script|embed)/i,t.innerHTML)?(Bt&&3===t.nodeType&&(e=t.textContent,e=w(e,yt,\" \"),e=w(e,mt,\" \"),t.textContent!==e&&(_(r.removed,{element:t.cloneNode()}),t.textContent=e)),xe(\"afterSanitizeElements\",t,null),!1):(ge(t),!0)},we=function(t,e,n){if(zt&&(\"id\"===e||\"name\"===e)&&(n in o||n in oe))return !1;if(Ot&&!Mt[e]&&C(bt,e));else if(Nt&&C(vt,e));else if(!Et[e]||Mt[e]){if(!(Te(t)&&(St.tagNameCheck instanceof RegExp&&C(St.tagNameCheck,t)||St.tagNameCheck instanceof Function&&St.tagNameCheck(t))&&(St.attributeNameCheck instanceof RegExp&&C(St.attributeNameCheck,e)||St.attributeNameCheck instanceof Function&&St.attributeNameCheck(e))||\"is\"===e&&St.allowCustomizedBuiltInElements&&(St.tagNameCheck instanceof RegExp&&C(St.tagNameCheck,n)||St.tagNameCheck instanceof Function&&St.tagNameCheck(n))))return !1}else if(Zt[e]);else if(C(kt,w(n,xt,\"\")));else if(\"src\"!==e&&\"xlink:href\"!==e&&\"href\"!==e||\"script\"===t||0!==T(n,\"data:\")||!Gt[t])if(Dt&&!C(_t,w(n,xt,\"\")));else if(n)return !1;return !0},Te=function(t){return t.indexOf(\"-\")>0},Ee=function(e){var n,i,a,o;xe(\"beforeSanitizeAttributes\",e,null);var s=e.attributes;if(s){var c={attrName:\"\",attrValue:\"\",keepAttr:!0,allowedAttributes:Et};for(o=s.length;o--;){var l=n=s[o],u=l.name,h=l.namespaceURI;if(i=\"value\"===u?n.value:E(n.value),a=gt(u),c.attrName=a,c.attrValue=i,c.keepAttr=!0,c.forceKeepAttr=void 0,xe(\"uponSanitizeAttribute\",e,c),i=c.attrValue,!c.forceKeepAttr&&(ye(u,e),c.keepAttr))if(C(/\\/>/i,i))ye(u,e);else {Bt&&(i=w(i,yt,\" \"),i=w(i,mt,\" \"));var f=gt(e.nodeName);if(we(f,a,i)){if(!Yt||\"id\"!==a&&\"name\"!==a||(ye(u,e),i=Ut+i),it&&\"object\"===t(m)&&\"function\"==typeof m.getAttributeType)if(h);else switch(m.getAttributeType(f,a)){case\"TrustedHTML\":i=it.createHTML(i);break;case\"TrustedScriptURL\":i=it.createScriptURL(i);}try{h?e.setAttributeNS(h,u,i):e.setAttribute(u,i),v(r.removed);}catch(t){}}}}xe(\"afterSanitizeAttributes\",e,null);}},Ce=function t(e){var n,r=be(e);for(xe(\"beforeSanitizeShadowDOM\",e,null);n=r.nextNode();)xe(\"uponSanitizeShadowNode\",n,null),ke(n)||(n.content instanceof s&&t(n.content),Ee(n));xe(\"afterSanitizeShadowDOM\",e,null);};return r.sanitize=function(e){var i,o,c,u,h,f=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if((ne=!e)&&(e=\"\\x3c!--\\x3e\"),\"string\"!=typeof e&&!_e(e)){if(\"function\"!=typeof e.toString)throw S(\"toString is not a function\");if(\"string\"!=typeof(e=e.toString()))throw S(\"dirty is not a string, aborting\")}if(!r.isSupported){if(\"object\"===t(n.toStaticHTML)||\"function\"==typeof n.toStaticHTML){if(\"string\"==typeof e)return n.toStaticHTML(e);if(_e(e))return n.toStaticHTML(e.outerHTML)}return e}if(It||ce(f),r.removed=[],\"string\"==typeof e&&(Wt=!1),Wt){if(e.nodeName){var d=gt(e.nodeName);if(!wt[d]||At[d])throw S(\"root node is forbidden and cannot be sanitized in-place\")}}else if(e instanceof l)1===(o=(i=me(\"\\x3c!----\\x3e\")).ownerDocument.importNode(e,!0)).nodeType&&\"BODY\"===o.nodeName||\"HTML\"===o.nodeName?i=o:i.appendChild(o);else {if(!Rt&&!Bt&&!Lt&&-1===e.indexOf(\"<\"))return it&&jt?it.createHTML(e):e;if(!(i=me(e)))return Rt?null:jt?at:\"\"}i&&Ft&&ge(i.firstChild);for(var p=be(Wt?e:i);c=p.nextNode();)3===c.nodeType&&c===u||ke(c)||(c.content instanceof s&&Ce(c.content),Ee(c),u=c);if(u=null,Wt)return e;if(Rt){if(Pt)for(h=lt.call(i.ownerDocument);i.firstChild;)h.appendChild(i.firstChild);else h=i;return Et.shadowroot&&(h=ht.call(a,h,!0)),h}var g=Lt?i.outerHTML:i.innerHTML;return Lt&&wt[\"!doctype\"]&&i.ownerDocument&&i.ownerDocument.doctype&&i.ownerDocument.doctype.name&&C(Z,i.ownerDocument.doctype.name)&&(g=\"<!DOCTYPE \"+i.ownerDocument.doctype.name+\">\\n\"+g),Bt&&(g=w(g,yt,\" \"),g=w(g,mt,\" \")),it&&jt?it.createHTML(g):g},r.setConfig=function(t){ce(t),It=!0;},r.clearConfig=function(){ae=null,It=!1;},r.isValidAttribute=function(t,e,n){ae||ce({});var r=gt(t),i=gt(e);return we(r,i,n)},r.addHook=function(t,e){\"function\"==typeof e&&(dt[t]=dt[t]||[],_(dt[t],e));},r.removeHook=function(t){if(dt[t])return v(dt[t])},r.removeHooks=function(t){dt[t]&&(dt[t]=[]);},r.removeAllHooks=function(){dt={};},r}()}();},8282:(t,e,n)=>{var r=n(2354);t.exports={Graph:r.Graph,json:n(8974),alg:n(2440),version:r.version};},2842:(t,e,n)=>{var r=n(9126);t.exports=function(t){var e,n={},i=[];function a(i){r.has(n,i)||(n[i]=!0,e.push(i),r.each(t.successors(i),a),r.each(t.predecessors(i),a));}return r.each(t.nodes(),(function(t){e=[],a(t),e.length&&i.push(e);})),i};},3984:(t,e,n)=>{var r=n(9126);function i(t,e,n,a,o,s){r.has(a,e)||(a[e]=!0,n||s.push(e),r.each(o(e),(function(e){i(t,e,n,a,o,s);})),n&&s.push(e));}t.exports=function(t,e,n){r.isArray(e)||(e=[e]);var a=(t.isDirected()?t.successors:t.neighbors).bind(t),o=[],s={};return r.each(e,(function(e){if(!t.hasNode(e))throw new Error(\"Graph does not have node: \"+e);i(t,e,\"post\"===n,s,a,o);})),o};},4847:(t,e,n)=>{var r=n(3763),i=n(9126);t.exports=function(t,e,n){return i.transform(t.nodes(),(function(i,a){i[a]=r(t,a,e,n);}),{})};},3763:(t,e,n)=>{var r=n(9126),i=n(9675);t.exports=function(t,e,n,r){return function(t,e,n,r){var a,o,s={},c=new i,l=function(t){var e=t.v!==a?t.v:t.w,r=s[e],i=n(t),l=o.distance+i;if(i<0)throw new Error(\"dijkstra does not allow negative edge weights. Bad edge: \"+t+\" Weight: \"+i);l<r.distance&&(r.distance=l,r.predecessor=a,c.decrease(e,l));};for(t.nodes().forEach((function(t){var n=t===e?0:Number.POSITIVE_INFINITY;s[t]={distance:n},c.add(t,n);}));c.size()>0&&(a=c.removeMin(),(o=s[a]).distance!==Number.POSITIVE_INFINITY);)r(a).forEach(l);return s}(t,String(e),n||a,r||function(e){return t.outEdges(e)})};var a=r.constant(1);},9096:(t,e,n)=>{var r=n(9126),i=n(5023);t.exports=function(t){return r.filter(i(t),(function(e){return e.length>1||1===e.length&&t.hasEdge(e[0],e[0])}))};},8924:(t,e,n)=>{var r=n(9126);t.exports=function(t,e,n){return function(t,e,n){var r={},i=t.nodes();return i.forEach((function(t){r[t]={},r[t][t]={distance:0},i.forEach((function(e){t!==e&&(r[t][e]={distance:Number.POSITIVE_INFINITY});})),n(t).forEach((function(n){var i=n.v===t?n.w:n.v,a=e(n);r[t][i]={distance:a,predecessor:t};}));})),i.forEach((function(t){var e=r[t];i.forEach((function(n){var a=r[n];i.forEach((function(n){var r=a[t],i=e[n],o=a[n],s=r.distance+i.distance;s<o.distance&&(o.distance=s,o.predecessor=i.predecessor);}));}));})),r}(t,e||i,n||function(e){return t.outEdges(e)})};var i=r.constant(1);},2440:(t,e,n)=>{t.exports={components:n(2842),dijkstra:n(3763),dijkstraAll:n(4847),findCycles:n(9096),floydWarshall:n(8924),isAcyclic:n(2707),postorder:n(8828),preorder:n(2648),prim:n(514),tarjan:n(5023),topsort:n(2166)};},2707:(t,e,n)=>{var r=n(2166);t.exports=function(t){try{r(t);}catch(t){if(t instanceof r.CycleException)return !1;throw t}return !0};},8828:(t,e,n)=>{var r=n(3984);t.exports=function(t,e){return r(t,e,\"post\")};},2648:(t,e,n)=>{var r=n(3984);t.exports=function(t,e){return r(t,e,\"pre\")};},514:(t,e,n)=>{var r=n(9126),i=n(771),a=n(9675);t.exports=function(t,e){var n,o=new i,s={},c=new a;function l(t){var r=t.v===n?t.w:t.v,i=c.priority(r);if(void 0!==i){var a=e(t);a<i&&(s[r]=n,c.decrease(r,a));}}if(0===t.nodeCount())return o;r.each(t.nodes(),(function(t){c.add(t,Number.POSITIVE_INFINITY),o.setNode(t);})),c.decrease(t.nodes()[0],0);for(var u=!1;c.size()>0;){if(n=c.removeMin(),r.has(s,n))o.setEdge(n,s[n]);else {if(u)throw new Error(\"Input graph is not connected: \"+t);u=!0;}t.nodeEdges(n).forEach(l);}return o};},5023:(t,e,n)=>{var r=n(9126);t.exports=function(t){var e=0,n=[],i={},a=[];function o(s){var c=i[s]={onStack:!0,lowlink:e,index:e++};if(n.push(s),t.successors(s).forEach((function(t){r.has(i,t)?i[t].onStack&&(c.lowlink=Math.min(c.lowlink,i[t].index)):(o(t),c.lowlink=Math.min(c.lowlink,i[t].lowlink));})),c.lowlink===c.index){var l,u=[];do{l=n.pop(),i[l].onStack=!1,u.push(l);}while(s!==l);a.push(u);}}return t.nodes().forEach((function(t){r.has(i,t)||o(t);})),a};},2166:(t,e,n)=>{var r=n(9126);function i(t){var e={},n={},i=[];if(r.each(t.sinks(),(function o(s){if(r.has(n,s))throw new a;r.has(e,s)||(n[s]=!0,e[s]=!0,r.each(t.predecessors(s),o),delete n[s],i.push(s));})),r.size(e)!==t.nodeCount())throw new a;return i}function a(){}t.exports=i,i.CycleException=a,a.prototype=new Error;},9675:(t,e,n)=>{var r=n(9126);function i(){this._arr=[],this._keyIndices={};}t.exports=i,i.prototype.size=function(){return this._arr.length},i.prototype.keys=function(){return this._arr.map((function(t){return t.key}))},i.prototype.has=function(t){return r.has(this._keyIndices,t)},i.prototype.priority=function(t){var e=this._keyIndices[t];if(void 0!==e)return this._arr[e].priority},i.prototype.min=function(){if(0===this.size())throw new Error(\"Queue underflow\");return this._arr[0].key},i.prototype.add=function(t,e){var n=this._keyIndices;if(t=String(t),!r.has(n,t)){var i=this._arr,a=i.length;return n[t]=a,i.push({key:t,priority:e}),this._decrease(a),!0}return !1},i.prototype.removeMin=function(){this._swap(0,this._arr.length-1);var t=this._arr.pop();return delete this._keyIndices[t.key],this._heapify(0),t.key},i.prototype.decrease=function(t,e){var n=this._keyIndices[t];if(e>this._arr[n].priority)throw new Error(\"New priority is greater than current priority. Key: \"+t+\" Old: \"+this._arr[n].priority+\" New: \"+e);this._arr[n].priority=e,this._decrease(n);},i.prototype._heapify=function(t){var e=this._arr,n=2*t,r=n+1,i=t;n<e.length&&(i=e[n].priority<e[i].priority?n:i,r<e.length&&(i=e[r].priority<e[i].priority?r:i),i!==t&&(this._swap(t,i),this._heapify(i)));},i.prototype._decrease=function(t){for(var e,n=this._arr,r=n[t].priority;0!==t&&!(n[e=t>>1].priority<r);)this._swap(t,e),t=e;},i.prototype._swap=function(t,e){var n=this._arr,r=this._keyIndices,i=n[t],a=n[e];n[t]=a,n[e]=i,r[a.key]=t,r[i.key]=e;};},771:(t,e,n)=>{var r=n(9126);t.exports=a;var i=\"\\0\";function a(t){this._isDirected=!r.has(t,\"directed\")||t.directed,this._isMultigraph=!!r.has(t,\"multigraph\")&&t.multigraph,this._isCompound=!!r.has(t,\"compound\")&&t.compound,this._label=void 0,this._defaultNodeLabelFn=r.constant(void 0),this._defaultEdgeLabelFn=r.constant(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[\"\\0\"]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={};}function o(t,e){t[e]?t[e]++:t[e]=1;}function s(t,e){--t[e]||delete t[e];}function c(t,e,n,i){var a=\"\"+e,o=\"\"+n;if(!t&&a>o){var s=a;a=o,o=s;}return a+\"\u0001\"+o+\"\u0001\"+(r.isUndefined(i)?\"\\0\":i)}function l(t,e,n,r){var i=\"\"+e,a=\"\"+n;if(!t&&i>a){var o=i;i=a,a=o;}var s={v:i,w:a};return r&&(s.name=r),s}function u(t,e){return c(t,e.v,e.w,e.name)}a.prototype._nodeCount=0,a.prototype._edgeCount=0,a.prototype.isDirected=function(){return this._isDirected},a.prototype.isMultigraph=function(){return this._isMultigraph},a.prototype.isCompound=function(){return this._isCompound},a.prototype.setGraph=function(t){return this._label=t,this},a.prototype.graph=function(){return this._label},a.prototype.setDefaultNodeLabel=function(t){return r.isFunction(t)||(t=r.constant(t)),this._defaultNodeLabelFn=t,this},a.prototype.nodeCount=function(){return this._nodeCount},a.prototype.nodes=function(){return r.keys(this._nodes)},a.prototype.sources=function(){var t=this;return r.filter(this.nodes(),(function(e){return r.isEmpty(t._in[e])}))},a.prototype.sinks=function(){var t=this;return r.filter(this.nodes(),(function(e){return r.isEmpty(t._out[e])}))},a.prototype.setNodes=function(t,e){var n=arguments,i=this;return r.each(t,(function(t){n.length>1?i.setNode(t,e):i.setNode(t);})),this},a.prototype.setNode=function(t,e){return r.has(this._nodes,t)?(arguments.length>1&&(this._nodes[t]=e),this):(this._nodes[t]=arguments.length>1?e:this._defaultNodeLabelFn(t),this._isCompound&&(this._parent[t]=i,this._children[t]={},this._children[\"\\0\"][t]=!0),this._in[t]={},this._preds[t]={},this._out[t]={},this._sucs[t]={},++this._nodeCount,this)},a.prototype.node=function(t){return this._nodes[t]},a.prototype.hasNode=function(t){return r.has(this._nodes,t)},a.prototype.removeNode=function(t){var e=this;if(r.has(this._nodes,t)){var n=function(t){e.removeEdge(e._edgeObjs[t]);};delete this._nodes[t],this._isCompound&&(this._removeFromParentsChildList(t),delete this._parent[t],r.each(this.children(t),(function(t){e.setParent(t);})),delete this._children[t]),r.each(r.keys(this._in[t]),n),delete this._in[t],delete this._preds[t],r.each(r.keys(this._out[t]),n),delete this._out[t],delete this._sucs[t],--this._nodeCount;}return this},a.prototype.setParent=function(t,e){if(!this._isCompound)throw new Error(\"Cannot set parent in a non-compound graph\");if(r.isUndefined(e))e=i;else {for(var n=e+=\"\";!r.isUndefined(n);n=this.parent(n))if(n===t)throw new Error(\"Setting \"+e+\" as parent of \"+t+\" would create a cycle\");this.setNode(e);}return this.setNode(t),this._removeFromParentsChildList(t),this._parent[t]=e,this._children[e][t]=!0,this},a.prototype._removeFromParentsChildList=function(t){delete this._children[this._parent[t]][t];},a.prototype.parent=function(t){if(this._isCompound){var e=this._parent[t];if(e!==i)return e}},a.prototype.children=function(t){if(r.isUndefined(t)&&(t=i),this._isCompound){var e=this._children[t];if(e)return r.keys(e)}else {if(t===i)return this.nodes();if(this.hasNode(t))return []}},a.prototype.predecessors=function(t){var e=this._preds[t];if(e)return r.keys(e)},a.prototype.successors=function(t){var e=this._sucs[t];if(e)return r.keys(e)},a.prototype.neighbors=function(t){var e=this.predecessors(t);if(e)return r.union(e,this.successors(t))},a.prototype.isLeaf=function(t){return 0===(this.isDirected()?this.successors(t):this.neighbors(t)).length},a.prototype.filterNodes=function(t){var e=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});e.setGraph(this.graph());var n=this;r.each(this._nodes,(function(n,r){t(r)&&e.setNode(r,n);})),r.each(this._edgeObjs,(function(t){e.hasNode(t.v)&&e.hasNode(t.w)&&e.setEdge(t,n.edge(t));}));var i={};function a(t){var r=n.parent(t);return void 0===r||e.hasNode(r)?(i[t]=r,r):r in i?i[r]:a(r)}return this._isCompound&&r.each(e.nodes(),(function(t){e.setParent(t,a(t));})),e},a.prototype.setDefaultEdgeLabel=function(t){return r.isFunction(t)||(t=r.constant(t)),this._defaultEdgeLabelFn=t,this},a.prototype.edgeCount=function(){return this._edgeCount},a.prototype.edges=function(){return r.values(this._edgeObjs)},a.prototype.setPath=function(t,e){var n=this,i=arguments;return r.reduce(t,(function(t,r){return i.length>1?n.setEdge(t,r,e):n.setEdge(t,r),r})),this},a.prototype.setEdge=function(){var t,e,n,i,a=!1,s=arguments[0];\"object\"==typeof s&&null!==s&&\"v\"in s?(t=s.v,e=s.w,n=s.name,2===arguments.length&&(i=arguments[1],a=!0)):(t=s,e=arguments[1],n=arguments[3],arguments.length>2&&(i=arguments[2],a=!0)),t=\"\"+t,e=\"\"+e,r.isUndefined(n)||(n=\"\"+n);var u=c(this._isDirected,t,e,n);if(r.has(this._edgeLabels,u))return a&&(this._edgeLabels[u]=i),this;if(!r.isUndefined(n)&&!this._isMultigraph)throw new Error(\"Cannot set a named edge when isMultigraph = false\");this.setNode(t),this.setNode(e),this._edgeLabels[u]=a?i:this._defaultEdgeLabelFn(t,e,n);var h=l(this._isDirected,t,e,n);return t=h.v,e=h.w,Object.freeze(h),this._edgeObjs[u]=h,o(this._preds[e],t),o(this._sucs[t],e),this._in[e][u]=h,this._out[t][u]=h,this._edgeCount++,this},a.prototype.edge=function(t,e,n){var r=1===arguments.length?u(this._isDirected,arguments[0]):c(this._isDirected,t,e,n);return this._edgeLabels[r]},a.prototype.hasEdge=function(t,e,n){var i=1===arguments.length?u(this._isDirected,arguments[0]):c(this._isDirected,t,e,n);return r.has(this._edgeLabels,i)},a.prototype.removeEdge=function(t,e,n){var r=1===arguments.length?u(this._isDirected,arguments[0]):c(this._isDirected,t,e,n),i=this._edgeObjs[r];return i&&(t=i.v,e=i.w,delete this._edgeLabels[r],delete this._edgeObjs[r],s(this._preds[e],t),s(this._sucs[t],e),delete this._in[e][r],delete this._out[t][r],this._edgeCount--),this},a.prototype.inEdges=function(t,e){var n=this._in[t];if(n){var i=r.values(n);return e?r.filter(i,(function(t){return t.v===e})):i}},a.prototype.outEdges=function(t,e){var n=this._out[t];if(n){var i=r.values(n);return e?r.filter(i,(function(t){return t.w===e})):i}},a.prototype.nodeEdges=function(t,e){var n=this.inEdges(t,e);if(n)return n.concat(this.outEdges(t,e))};},2354:(t,e,n)=>{t.exports={Graph:n(771),version:n(9631)};},8974:(t,e,n)=>{var r=n(9126),i=n(771);function a(t){return r.map(t.nodes(),(function(e){var n=t.node(e),i=t.parent(e),a={v:e};return r.isUndefined(n)||(a.value=n),r.isUndefined(i)||(a.parent=i),a}))}function o(t){return r.map(t.edges(),(function(e){var n=t.edge(e),i={v:e.v,w:e.w};return r.isUndefined(e.name)||(i.name=e.name),r.isUndefined(n)||(i.value=n),i}))}t.exports={write:function(t){var e={options:{directed:t.isDirected(),multigraph:t.isMultigraph(),compound:t.isCompound()},nodes:a(t),edges:o(t)};return r.isUndefined(t.graph())||(e.value=r.clone(t.graph())),e},read:function(t){var e=new i(t.options).setGraph(t.value);return r.each(t.nodes,(function(t){e.setNode(t.v,t.value),t.parent&&e.setParent(t.v,t.parent);})),r.each(t.edges,(function(t){e.setEdge({v:t.v,w:t.w,name:t.name},t.value);})),e}};},9126:(t,e,n)=>{var r;try{r={clone:n(6678),constant:n(5703),each:n(6073),filter:n(3105),has:n(8721),isArray:n(1469),isEmpty:n(1609),isFunction:n(3560),isUndefined:n(2353),keys:n(3674),map:n(5161),reduce:n(4061),size:n(4238),transform:n(8718),union:n(3386),values:n(2628)};}catch(t){}r||(r=window._),t.exports=r;},9631:t=>{t.exports=\"2.1.8\";},8552:(t,e,n)=>{var r=n(852)(n(5639),\"DataView\");t.exports=r;},1989:(t,e,n)=>{var r=n(1789),i=n(401),a=n(7667),o=n(1327),s=n(1866);function c(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1]);}}c.prototype.clear=r,c.prototype.delete=i,c.prototype.get=a,c.prototype.has=o,c.prototype.set=s,t.exports=c;},8407:(t,e,n)=>{var r=n(7040),i=n(4125),a=n(2117),o=n(7518),s=n(4705);function c(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1]);}}c.prototype.clear=r,c.prototype.delete=i,c.prototype.get=a,c.prototype.has=o,c.prototype.set=s,t.exports=c;},7071:(t,e,n)=>{var r=n(852)(n(5639),\"Map\");t.exports=r;},3369:(t,e,n)=>{var r=n(4785),i=n(1285),a=n(6e3),o=n(9916),s=n(5265);function c(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1]);}}c.prototype.clear=r,c.prototype.delete=i,c.prototype.get=a,c.prototype.has=o,c.prototype.set=s,t.exports=c;},3818:(t,e,n)=>{var r=n(852)(n(5639),\"Promise\");t.exports=r;},8525:(t,e,n)=>{var r=n(852)(n(5639),\"Set\");t.exports=r;},8668:(t,e,n)=>{var r=n(3369),i=n(619),a=n(2385);function o(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new r;++e<n;)this.add(t[e]);}o.prototype.add=o.prototype.push=i,o.prototype.has=a,t.exports=o;},6384:(t,e,n)=>{var r=n(8407),i=n(7465),a=n(3779),o=n(7599),s=n(4758),c=n(4309);function l(t){var e=this.__data__=new r(t);this.size=e.size;}l.prototype.clear=i,l.prototype.delete=a,l.prototype.get=o,l.prototype.has=s,l.prototype.set=c,t.exports=l;},2705:(t,e,n)=>{var r=n(5639).Symbol;t.exports=r;},1149:(t,e,n)=>{var r=n(5639).Uint8Array;t.exports=r;},577:(t,e,n)=>{var r=n(852)(n(5639),\"WeakMap\");t.exports=r;},6874:t=>{t.exports=function(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)};},7412:t=>{t.exports=function(t,e){for(var n=-1,r=null==t?0:t.length;++n<r&&!1!==e(t[n],n,t););return t};},4963:t=>{t.exports=function(t,e){for(var n=-1,r=null==t?0:t.length,i=0,a=[];++n<r;){var o=t[n];e(o,n,t)&&(a[i++]=o);}return a};},7443:(t,e,n)=>{var r=n(2118);t.exports=function(t,e){return !(null==t||!t.length)&&r(t,e,0)>-1};},1196:t=>{t.exports=function(t,e,n){for(var r=-1,i=null==t?0:t.length;++r<i;)if(n(e,t[r]))return !0;return !1};},4636:(t,e,n)=>{var r=n(2545),i=n(5694),a=n(1469),o=n(4144),s=n(5776),c=n(6719),l=Object.prototype.hasOwnProperty;t.exports=function(t,e){var n=a(t),u=!n&&i(t),h=!n&&!u&&o(t),f=!n&&!u&&!h&&c(t),d=n||u||h||f,p=d?r(t.length,String):[],g=p.length;for(var y in t)!e&&!l.call(t,y)||d&&(\"length\"==y||h&&(\"offset\"==y||\"parent\"==y)||f&&(\"buffer\"==y||\"byteLength\"==y||\"byteOffset\"==y)||s(y,g))||p.push(y);return p};},9932:t=>{t.exports=function(t,e){for(var n=-1,r=null==t?0:t.length,i=Array(r);++n<r;)i[n]=e(t[n],n,t);return i};},2488:t=>{t.exports=function(t,e){for(var n=-1,r=e.length,i=t.length;++n<r;)t[i+n]=e[n];return t};},2663:t=>{t.exports=function(t,e,n,r){var i=-1,a=null==t?0:t.length;for(r&&a&&(n=t[++i]);++i<a;)n=e(n,t[i],i,t);return n};},2908:t=>{t.exports=function(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(e(t[n],n,t))return !0;return !1};},8983:(t,e,n)=>{var r=n(371)(\"length\");t.exports=r;},6556:(t,e,n)=>{var r=n(9465),i=n(7813);t.exports=function(t,e,n){(void 0!==n&&!i(t[e],n)||void 0===n&&!(e in t))&&r(t,e,n);};},4865:(t,e,n)=>{var r=n(9465),i=n(7813),a=Object.prototype.hasOwnProperty;t.exports=function(t,e,n){var o=t[e];a.call(t,e)&&i(o,n)&&(void 0!==n||e in t)||r(t,e,n);};},8470:(t,e,n)=>{var r=n(7813);t.exports=function(t,e){for(var n=t.length;n--;)if(r(t[n][0],e))return n;return -1};},4037:(t,e,n)=>{var r=n(8363),i=n(3674);t.exports=function(t,e){return t&&r(e,i(e),t)};},3886:(t,e,n)=>{var r=n(8363),i=n(1704);t.exports=function(t,e){return t&&r(e,i(e),t)};},9465:(t,e,n)=>{var r=n(8777);t.exports=function(t,e,n){\"__proto__\"==e&&r?r(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n;};},5990:(t,e,n)=>{var r=n(6384),i=n(7412),a=n(4865),o=n(4037),s=n(3886),c=n(4626),l=n(278),u=n(8805),h=n(1911),f=n(8234),d=n(6904),p=n(4160),g=n(3824),y=n(9148),m=n(8517),b=n(1469),v=n(4144),_=n(6688),x=n(3218),k=n(2928),w=n(3674),T=n(1704),E=\"[object Arguments]\",C=\"[object Function]\",S=\"[object Object]\",A={};A[E]=A[\"[object Array]\"]=A[\"[object ArrayBuffer]\"]=A[\"[object DataView]\"]=A[\"[object Boolean]\"]=A[\"[object Date]\"]=A[\"[object Float32Array]\"]=A[\"[object Float64Array]\"]=A[\"[object Int8Array]\"]=A[\"[object Int16Array]\"]=A[\"[object Int32Array]\"]=A[\"[object Map]\"]=A[\"[object Number]\"]=A[S]=A[\"[object RegExp]\"]=A[\"[object Set]\"]=A[\"[object String]\"]=A[\"[object Symbol]\"]=A[\"[object Uint8Array]\"]=A[\"[object Uint8ClampedArray]\"]=A[\"[object Uint16Array]\"]=A[\"[object Uint32Array]\"]=!0,A[\"[object Error]\"]=A[C]=A[\"[object WeakMap]\"]=!1,t.exports=function t(e,n,M,N,O,D){var B,L=1&n,I=2&n,F=4&n;if(M&&(B=O?M(e,N,O,D):M(e)),void 0!==B)return B;if(!x(e))return e;var R=b(e);if(R){if(B=g(e),!L)return l(e,B)}else {var P=p(e),j=P==C||\"[object GeneratorFunction]\"==P;if(v(e))return c(e,L);if(P==S||P==E||j&&!O){if(B=I||j?{}:m(e),!L)return I?h(e,s(B,e)):u(e,o(B,e))}else {if(!A[P])return O?e:{};B=y(e,P,L);}}D||(D=new r);var z=D.get(e);if(z)return z;D.set(e,B),k(e)?e.forEach((function(r){B.add(t(r,n,M,r,e,D));})):_(e)&&e.forEach((function(r,i){B.set(i,t(r,n,M,i,e,D));}));var Y=R?void 0:(F?I?d:f:I?T:w)(e);return i(Y||e,(function(r,i){Y&&(r=e[i=r]),a(B,i,t(r,n,M,i,e,D));})),B};},3118:(t,e,n)=>{var r=n(3218),i=Object.create,a=function(){function t(){}return function(e){if(!r(e))return {};if(i)return i(e);t.prototype=e;var n=new t;return t.prototype=void 0,n}}();t.exports=a;},9881:(t,e,n)=>{var r=n(7816),i=n(9291)(r);t.exports=i;},6029:(t,e,n)=>{var r=n(3448);t.exports=function(t,e,n){for(var i=-1,a=t.length;++i<a;){var o=t[i],s=e(o);if(null!=s&&(void 0===c?s==s&&!r(s):n(s,c)))var c=s,l=o;}return l};},760:(t,e,n)=>{var r=n(9881);t.exports=function(t,e){var n=[];return r(t,(function(t,r,i){e(t,r,i)&&n.push(t);})),n};},1848:t=>{t.exports=function(t,e,n,r){for(var i=t.length,a=n+(r?1:-1);r?a--:++a<i;)if(e(t[a],a,t))return a;return -1};},1078:(t,e,n)=>{var r=n(2488),i=n(7285);t.exports=function t(e,n,a,o,s){var c=-1,l=e.length;for(a||(a=i),s||(s=[]);++c<l;){var u=e[c];n>0&&a(u)?n>1?t(u,n-1,a,o,s):r(s,u):o||(s[s.length]=u);}return s};},8483:(t,e,n)=>{var r=n(5063)();t.exports=r;},7816:(t,e,n)=>{var r=n(8483),i=n(3674);t.exports=function(t,e){return t&&r(t,e,i)};},7786:(t,e,n)=>{var r=n(1811),i=n(327);t.exports=function(t,e){for(var n=0,a=(e=r(e,t)).length;null!=t&&n<a;)t=t[i(e[n++])];return n&&n==a?t:void 0};},8866:(t,e,n)=>{var r=n(2488),i=n(1469);t.exports=function(t,e,n){var a=e(t);return i(t)?a:r(a,n(t))};},4239:(t,e,n)=>{var r=n(2705),i=n(9607),a=n(2333),o=r?r.toStringTag:void 0;t.exports=function(t){return null==t?void 0===t?\"[object Undefined]\":\"[object Null]\":o&&o in Object(t)?i(t):a(t)};},3325:t=>{t.exports=function(t,e){return t>e};},8565:t=>{var e=Object.prototype.hasOwnProperty;t.exports=function(t,n){return null!=t&&e.call(t,n)};},13:t=>{t.exports=function(t,e){return null!=t&&e in Object(t)};},2118:(t,e,n)=>{var r=n(1848),i=n(2722),a=n(2351);t.exports=function(t,e,n){return e==e?a(t,e,n):r(t,i,n)};},9454:(t,e,n)=>{var r=n(4239),i=n(7005);t.exports=function(t){return i(t)&&\"[object Arguments]\"==r(t)};},939:(t,e,n)=>{var r=n(2492),i=n(7005);t.exports=function t(e,n,a,o,s){return e===n||(null==e||null==n||!i(e)&&!i(n)?e!=e&&n!=n:r(e,n,a,o,t,s))};},2492:(t,e,n)=>{var r=n(6384),i=n(7114),a=n(8351),o=n(6096),s=n(4160),c=n(1469),l=n(4144),u=n(6719),h=\"[object Arguments]\",f=\"[object Array]\",d=\"[object Object]\",p=Object.prototype.hasOwnProperty;t.exports=function(t,e,n,g,y,m){var b=c(t),v=c(e),_=b?f:s(t),x=v?f:s(e),k=(_=_==h?d:_)==d,w=(x=x==h?d:x)==d,T=_==x;if(T&&l(t)){if(!l(e))return !1;b=!0,k=!1;}if(T&&!k)return m||(m=new r),b||u(t)?i(t,e,n,g,y,m):a(t,e,_,n,g,y,m);if(!(1&n)){var E=k&&p.call(t,\"__wrapped__\"),C=w&&p.call(e,\"__wrapped__\");if(E||C){var S=E?t.value():t,A=C?e.value():e;return m||(m=new r),y(S,A,n,g,m)}}return !!T&&(m||(m=new r),o(t,e,n,g,y,m))};},5588:(t,e,n)=>{var r=n(4160),i=n(7005);t.exports=function(t){return i(t)&&\"[object Map]\"==r(t)};},2958:(t,e,n)=>{var r=n(6384),i=n(939);t.exports=function(t,e,n,a){var o=n.length,s=o,c=!a;if(null==t)return !s;for(t=Object(t);o--;){var l=n[o];if(c&&l[2]?l[1]!==t[l[0]]:!(l[0]in t))return !1}for(;++o<s;){var u=(l=n[o])[0],h=t[u],f=l[1];if(c&&l[2]){if(void 0===h&&!(u in t))return !1}else {var d=new r;if(a)var p=a(h,f,u,t,e,d);if(!(void 0===p?i(f,h,3,a,d):p))return !1}}return !0};},2722:t=>{t.exports=function(t){return t!=t};},8458:(t,e,n)=>{var r=n(3560),i=n(5346),a=n(3218),o=n(346),s=/^\\[object .+?Constructor\\]$/,c=Function.prototype,l=Object.prototype,u=c.toString,h=l.hasOwnProperty,f=RegExp(\"^\"+u.call(h).replace(/[\\\\^$.*+?()[\\]{}|]/g,\"\\\\$&\").replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g,\"$1.*?\")+\"$\");t.exports=function(t){return !(!a(t)||i(t))&&(r(t)?f:s).test(o(t))};},9221:(t,e,n)=>{var r=n(4160),i=n(7005);t.exports=function(t){return i(t)&&\"[object Set]\"==r(t)};},8749:(t,e,n)=>{var r=n(4239),i=n(1780),a=n(7005),o={};o[\"[object Float32Array]\"]=o[\"[object Float64Array]\"]=o[\"[object Int8Array]\"]=o[\"[object Int16Array]\"]=o[\"[object Int32Array]\"]=o[\"[object Uint8Array]\"]=o[\"[object Uint8ClampedArray]\"]=o[\"[object Uint16Array]\"]=o[\"[object Uint32Array]\"]=!0,o[\"[object Arguments]\"]=o[\"[object Array]\"]=o[\"[object ArrayBuffer]\"]=o[\"[object Boolean]\"]=o[\"[object DataView]\"]=o[\"[object Date]\"]=o[\"[object Error]\"]=o[\"[object Function]\"]=o[\"[object Map]\"]=o[\"[object Number]\"]=o[\"[object Object]\"]=o[\"[object RegExp]\"]=o[\"[object Set]\"]=o[\"[object String]\"]=o[\"[object WeakMap]\"]=!1,t.exports=function(t){return a(t)&&i(t.length)&&!!o[r(t)]};},7206:(t,e,n)=>{var r=n(1573),i=n(6432),a=n(6557),o=n(1469),s=n(9601);t.exports=function(t){return \"function\"==typeof t?t:null==t?a:\"object\"==typeof t?o(t)?i(t[0],t[1]):r(t):s(t)};},280:(t,e,n)=>{var r=n(5726),i=n(6916),a=Object.prototype.hasOwnProperty;t.exports=function(t){if(!r(t))return i(t);var e=[];for(var n in Object(t))a.call(t,n)&&\"constructor\"!=n&&e.push(n);return e};},313:(t,e,n)=>{var r=n(3218),i=n(5726),a=n(3498),o=Object.prototype.hasOwnProperty;t.exports=function(t){if(!r(t))return a(t);var e=i(t),n=[];for(var s in t)(\"constructor\"!=s||!e&&o.call(t,s))&&n.push(s);return n};},433:t=>{t.exports=function(t,e){return t<e};},9199:(t,e,n)=>{var r=n(9881),i=n(8612);t.exports=function(t,e){var n=-1,a=i(t)?Array(t.length):[];return r(t,(function(t,r,i){a[++n]=e(t,r,i);})),a};},1573:(t,e,n)=>{var r=n(2958),i=n(1499),a=n(2634);t.exports=function(t){var e=i(t);return 1==e.length&&e[0][2]?a(e[0][0],e[0][1]):function(n){return n===t||r(n,t,e)}};},6432:(t,e,n)=>{var r=n(939),i=n(7361),a=n(9095),o=n(5403),s=n(9162),c=n(2634),l=n(327);t.exports=function(t,e){return o(t)&&s(e)?c(l(t),e):function(n){var o=i(n,t);return void 0===o&&o===e?a(n,t):r(e,o,3)}};},2980:(t,e,n)=>{var r=n(6384),i=n(6556),a=n(8483),o=n(9783),s=n(3218),c=n(1704),l=n(6390);t.exports=function t(e,n,u,h,f){e!==n&&a(n,(function(a,c){if(f||(f=new r),s(a))o(e,n,c,u,t,h,f);else {var d=h?h(l(e,c),a,c+\"\",e,n,f):void 0;void 0===d&&(d=a),i(e,c,d);}}),c);};},9783:(t,e,n)=>{var r=n(6556),i=n(4626),a=n(7133),o=n(278),s=n(8517),c=n(5694),l=n(1469),u=n(9246),h=n(4144),f=n(3560),d=n(3218),p=n(8630),g=n(6719),y=n(6390),m=n(3678);t.exports=function(t,e,n,b,v,_,x){var k=y(t,n),w=y(e,n),T=x.get(w);if(T)r(t,n,T);else {var E=_?_(k,w,n+\"\",t,e,x):void 0,C=void 0===E;if(C){var S=l(w),A=!S&&h(w),M=!S&&!A&&g(w);E=w,S||A||M?l(k)?E=k:u(k)?E=o(k):A?(C=!1,E=i(w,!0)):M?(C=!1,E=a(w,!0)):E=[]:p(w)||c(w)?(E=k,c(k)?E=m(k):d(k)&&!f(k)||(E=s(w))):C=!1;}C&&(x.set(w,E),v(E,w,b,_,x),x.delete(w)),r(t,n,E);}};},9556:(t,e,n)=>{var r=n(9932),i=n(7786),a=n(7206),o=n(9199),s=n(1131),c=n(1717),l=n(5022),u=n(6557),h=n(1469);t.exports=function(t,e,n){e=e.length?r(e,(function(t){return h(t)?function(e){return i(e,1===t.length?t[0]:t)}:t})):[u];var f=-1;e=r(e,c(a));var d=o(t,(function(t,n,i){return {criteria:r(e,(function(e){return e(t)})),index:++f,value:t}}));return s(d,(function(t,e){return l(t,e,n)}))};},5970:(t,e,n)=>{var r=n(3012),i=n(9095);t.exports=function(t,e){return r(t,e,(function(e,n){return i(t,n)}))};},3012:(t,e,n)=>{var r=n(7786),i=n(611),a=n(1811);t.exports=function(t,e,n){for(var o=-1,s=e.length,c={};++o<s;){var l=e[o],u=r(t,l);n(u,l)&&i(c,a(l,t),u);}return c};},371:t=>{t.exports=function(t){return function(e){return null==e?void 0:e[t]}};},9152:(t,e,n)=>{var r=n(7786);t.exports=function(t){return function(e){return r(e,t)}};},98:t=>{var e=Math.ceil,n=Math.max;t.exports=function(t,r,i,a){for(var o=-1,s=n(e((r-t)/(i||1)),0),c=Array(s);s--;)c[a?s:++o]=t,t+=i;return c};},107:t=>{t.exports=function(t,e,n,r,i){return i(t,(function(t,i,a){n=r?(r=!1,t):e(n,t,i,a);})),n};},5976:(t,e,n)=>{var r=n(6557),i=n(5357),a=n(61);t.exports=function(t,e){return a(i(t,e,r),t+\"\")};},611:(t,e,n)=>{var r=n(4865),i=n(1811),a=n(5776),o=n(3218),s=n(327);t.exports=function(t,e,n,c){if(!o(t))return t;for(var l=-1,u=(e=i(e,t)).length,h=u-1,f=t;null!=f&&++l<u;){var d=s(e[l]),p=n;if(\"__proto__\"===d||\"constructor\"===d||\"prototype\"===d)return t;if(l!=h){var g=f[d];void 0===(p=c?c(g,d,f):void 0)&&(p=o(g)?g:a(e[l+1])?[]:{});}r(f,d,p),f=f[d];}return t};},6560:(t,e,n)=>{var r=n(5703),i=n(8777),a=n(6557),o=i?function(t,e){return i(t,\"toString\",{configurable:!0,enumerable:!1,value:r(e),writable:!0})}:a;t.exports=o;},1131:t=>{t.exports=function(t,e){var n=t.length;for(t.sort(e);n--;)t[n]=t[n].value;return t};},2545:t=>{t.exports=function(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r};},531:(t,e,n)=>{var r=n(2705),i=n(9932),a=n(1469),o=n(3448),s=r?r.prototype:void 0,c=s?s.toString:void 0;t.exports=function t(e){if(\"string\"==typeof e)return e;if(a(e))return i(e,t)+\"\";if(o(e))return c?c.call(e):\"\";var n=e+\"\";return \"0\"==n&&1/e==-1/0?\"-0\":n};},7561:(t,e,n)=>{var r=n(7990),i=/^\\s+/;t.exports=function(t){return t?t.slice(0,r(t)+1).replace(i,\"\"):t};},1717:t=>{t.exports=function(t){return function(e){return t(e)}};},5652:(t,e,n)=>{var r=n(8668),i=n(7443),a=n(1196),o=n(4757),s=n(3593),c=n(1814);t.exports=function(t,e,n){var l=-1,u=i,h=t.length,f=!0,d=[],p=d;if(n)f=!1,u=a;else if(h>=200){var g=e?null:s(t);if(g)return c(g);f=!1,u=o,p=new r;}else p=e?[]:d;t:for(;++l<h;){var y=t[l],m=e?e(y):y;if(y=n||0!==y?y:0,f&&m==m){for(var b=p.length;b--;)if(p[b]===m)continue t;e&&p.push(m),d.push(y);}else u(p,m,n)||(p!==d&&p.push(m),d.push(y));}return d};},7415:(t,e,n)=>{var r=n(9932);t.exports=function(t,e){return r(e,(function(e){return t[e]}))};},1757:t=>{t.exports=function(t,e,n){for(var r=-1,i=t.length,a=e.length,o={};++r<i;){var s=r<a?e[r]:void 0;n(o,t[r],s);}return o};},4757:t=>{t.exports=function(t,e){return t.has(e)};},4290:(t,e,n)=>{var r=n(6557);t.exports=function(t){return \"function\"==typeof t?t:r};},1811:(t,e,n)=>{var r=n(1469),i=n(5403),a=n(5514),o=n(9833);t.exports=function(t,e){return r(t)?t:i(t,e)?[t]:a(o(t))};},4318:(t,e,n)=>{var r=n(1149);t.exports=function(t){var e=new t.constructor(t.byteLength);return new r(e).set(new r(t)),e};},4626:(t,e,n)=>{t=n.nmd(t);var r=n(5639),i=e&&!e.nodeType&&e,a=i&&t&&!t.nodeType&&t,o=a&&a.exports===i?r.Buffer:void 0,s=o?o.allocUnsafe:void 0;t.exports=function(t,e){if(e)return t.slice();var n=t.length,r=s?s(n):new t.constructor(n);return t.copy(r),r};},7157:(t,e,n)=>{var r=n(4318);t.exports=function(t,e){var n=e?r(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)};},3147:t=>{var e=/\\w*$/;t.exports=function(t){var n=new t.constructor(t.source,e.exec(t));return n.lastIndex=t.lastIndex,n};},419:(t,e,n)=>{var r=n(2705),i=r?r.prototype:void 0,a=i?i.valueOf:void 0;t.exports=function(t){return a?Object(a.call(t)):{}};},7133:(t,e,n)=>{var r=n(4318);t.exports=function(t,e){var n=e?r(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)};},6393:(t,e,n)=>{var r=n(3448);t.exports=function(t,e){if(t!==e){var n=void 0!==t,i=null===t,a=t==t,o=r(t),s=void 0!==e,c=null===e,l=e==e,u=r(e);if(!c&&!u&&!o&&t>e||o&&s&&l&&!c&&!u||i&&s&&l||!n&&l||!a)return 1;if(!i&&!o&&!u&&t<e||u&&n&&a&&!i&&!o||c&&n&&a||!s&&a||!l)return -1}return 0};},5022:(t,e,n)=>{var r=n(6393);t.exports=function(t,e,n){for(var i=-1,a=t.criteria,o=e.criteria,s=a.length,c=n.length;++i<s;){var l=r(a[i],o[i]);if(l)return i>=c?l:l*(\"desc\"==n[i]?-1:1)}return t.index-e.index};},278:t=>{t.exports=function(t,e){var n=-1,r=t.length;for(e||(e=Array(r));++n<r;)e[n]=t[n];return e};},8363:(t,e,n)=>{var r=n(4865),i=n(9465);t.exports=function(t,e,n,a){var o=!n;n||(n={});for(var s=-1,c=e.length;++s<c;){var l=e[s],u=a?a(n[l],t[l],l,n,t):void 0;void 0===u&&(u=t[l]),o?i(n,l,u):r(n,l,u);}return n};},8805:(t,e,n)=>{var r=n(8363),i=n(9551);t.exports=function(t,e){return r(t,i(t),e)};},1911:(t,e,n)=>{var r=n(8363),i=n(1442);t.exports=function(t,e){return r(t,i(t),e)};},4429:(t,e,n)=>{var r=n(5639)[\"__core-js_shared__\"];t.exports=r;},1463:(t,e,n)=>{var r=n(5976),i=n(6612);t.exports=function(t){return r((function(e,n){var r=-1,a=n.length,o=a>1?n[a-1]:void 0,s=a>2?n[2]:void 0;for(o=t.length>3&&\"function\"==typeof o?(a--,o):void 0,s&&i(n[0],n[1],s)&&(o=a<3?void 0:o,a=1),e=Object(e);++r<a;){var c=n[r];c&&t(e,c,r,o);}return e}))};},9291:(t,e,n)=>{var r=n(8612);t.exports=function(t,e){return function(n,i){if(null==n)return n;if(!r(n))return t(n,i);for(var a=n.length,o=e?a:-1,s=Object(n);(e?o--:++o<a)&&!1!==i(s[o],o,s););return n}};},5063:t=>{t.exports=function(t){return function(e,n,r){for(var i=-1,a=Object(e),o=r(e),s=o.length;s--;){var c=o[t?s:++i];if(!1===n(a[c],c,a))break}return e}};},7740:(t,e,n)=>{var r=n(7206),i=n(8612),a=n(3674);t.exports=function(t){return function(e,n,o){var s=Object(e);if(!i(e)){var c=r(n,3);e=a(e),n=function(t){return c(s[t],t,s)};}var l=t(e,n,o);return l>-1?s[c?e[l]:l]:void 0}};},7445:(t,e,n)=>{var r=n(98),i=n(6612),a=n(8601);t.exports=function(t){return function(e,n,o){return o&&\"number\"!=typeof o&&i(e,n,o)&&(n=o=void 0),e=a(e),void 0===n?(n=e,e=0):n=a(n),o=void 0===o?e<n?1:-1:a(o),r(e,n,o,t)}};},3593:(t,e,n)=>{var r=n(8525),i=n(308),a=n(1814),o=r&&1/a(new r([,-0]))[1]==1/0?function(t){return new r(t)}:i;t.exports=o;},8777:(t,e,n)=>{var r=n(852),i=function(){try{var t=r(Object,\"defineProperty\");return t({},\"\",{}),t}catch(t){}}();t.exports=i;},7114:(t,e,n)=>{var r=n(8668),i=n(2908),a=n(4757);t.exports=function(t,e,n,o,s,c){var l=1&n,u=t.length,h=e.length;if(u!=h&&!(l&&h>u))return !1;var f=c.get(t),d=c.get(e);if(f&&d)return f==e&&d==t;var p=-1,g=!0,y=2&n?new r:void 0;for(c.set(t,e),c.set(e,t);++p<u;){var m=t[p],b=e[p];if(o)var v=l?o(b,m,p,e,t,c):o(m,b,p,t,e,c);if(void 0!==v){if(v)continue;g=!1;break}if(y){if(!i(e,(function(t,e){if(!a(y,e)&&(m===t||s(m,t,n,o,c)))return y.push(e)}))){g=!1;break}}else if(m!==b&&!s(m,b,n,o,c)){g=!1;break}}return c.delete(t),c.delete(e),g};},8351:(t,e,n)=>{var r=n(2705),i=n(1149),a=n(7813),o=n(7114),s=n(8776),c=n(1814),l=r?r.prototype:void 0,u=l?l.valueOf:void 0;t.exports=function(t,e,n,r,l,h,f){switch(n){case\"[object DataView]\":if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return !1;t=t.buffer,e=e.buffer;case\"[object ArrayBuffer]\":return !(t.byteLength!=e.byteLength||!h(new i(t),new i(e)));case\"[object Boolean]\":case\"[object Date]\":case\"[object Number]\":return a(+t,+e);case\"[object Error]\":return t.name==e.name&&t.message==e.message;case\"[object RegExp]\":case\"[object String]\":return t==e+\"\";case\"[object Map]\":var d=s;case\"[object Set]\":var p=1&r;if(d||(d=c),t.size!=e.size&&!p)return !1;var g=f.get(t);if(g)return g==e;r|=2,f.set(t,e);var y=o(d(t),d(e),r,l,h,f);return f.delete(t),y;case\"[object Symbol]\":if(u)return u.call(t)==u.call(e)}return !1};},6096:(t,e,n)=>{var r=n(8234),i=Object.prototype.hasOwnProperty;t.exports=function(t,e,n,a,o,s){var c=1&n,l=r(t),u=l.length;if(u!=r(e).length&&!c)return !1;for(var h=u;h--;){var f=l[h];if(!(c?f in e:i.call(e,f)))return !1}var d=s.get(t),p=s.get(e);if(d&&p)return d==e&&p==t;var g=!0;s.set(t,e),s.set(e,t);for(var y=c;++h<u;){var m=t[f=l[h]],b=e[f];if(a)var v=c?a(b,m,f,e,t,s):a(m,b,f,t,e,s);if(!(void 0===v?m===b||o(m,b,n,a,s):v)){g=!1;break}y||(y=\"constructor\"==f);}if(g&&!y){var _=t.constructor,x=e.constructor;_==x||!(\"constructor\"in t)||!(\"constructor\"in e)||\"function\"==typeof _&&_ instanceof _&&\"function\"==typeof x&&x instanceof x||(g=!1);}return s.delete(t),s.delete(e),g};},9021:(t,e,n)=>{var r=n(5564),i=n(5357),a=n(61);t.exports=function(t){return a(i(t,void 0,r),t+\"\")};},1957:(t,e,n)=>{var r=\"object\"==typeof n.g&&n.g&&n.g.Object===Object&&n.g;t.exports=r;},8234:(t,e,n)=>{var r=n(8866),i=n(9551),a=n(3674);t.exports=function(t){return r(t,a,i)};},6904:(t,e,n)=>{var r=n(8866),i=n(1442),a=n(1704);t.exports=function(t){return r(t,a,i)};},5050:(t,e,n)=>{var r=n(7019);t.exports=function(t,e){var n=t.__data__;return r(e)?n[\"string\"==typeof e?\"string\":\"hash\"]:n.map};},1499:(t,e,n)=>{var r=n(9162),i=n(3674);t.exports=function(t){for(var e=i(t),n=e.length;n--;){var a=e[n],o=t[a];e[n]=[a,o,r(o)];}return e};},852:(t,e,n)=>{var r=n(8458),i=n(7801);t.exports=function(t,e){var n=i(t,e);return r(n)?n:void 0};},5924:(t,e,n)=>{var r=n(5569)(Object.getPrototypeOf,Object);t.exports=r;},9607:(t,e,n)=>{var r=n(2705),i=Object.prototype,a=i.hasOwnProperty,o=i.toString,s=r?r.toStringTag:void 0;t.exports=function(t){var e=a.call(t,s),n=t[s];try{t[s]=void 0;var r=!0;}catch(t){}var i=o.call(t);return r&&(e?t[s]=n:delete t[s]),i};},9551:(t,e,n)=>{var r=n(4963),i=n(479),a=Object.prototype.propertyIsEnumerable,o=Object.getOwnPropertySymbols,s=o?function(t){return null==t?[]:(t=Object(t),r(o(t),(function(e){return a.call(t,e)})))}:i;t.exports=s;},1442:(t,e,n)=>{var r=n(2488),i=n(5924),a=n(9551),o=n(479),s=Object.getOwnPropertySymbols?function(t){for(var e=[];t;)r(e,a(t)),t=i(t);return e}:o;t.exports=s;},4160:(t,e,n)=>{var r=n(8552),i=n(7071),a=n(3818),o=n(8525),s=n(577),c=n(4239),l=n(346),u=\"[object Map]\",h=\"[object Promise]\",f=\"[object Set]\",d=\"[object WeakMap]\",p=\"[object DataView]\",g=l(r),y=l(i),m=l(a),b=l(o),v=l(s),_=c;(r&&_(new r(new ArrayBuffer(1)))!=p||i&&_(new i)!=u||a&&_(a.resolve())!=h||o&&_(new o)!=f||s&&_(new s)!=d)&&(_=function(t){var e=c(t),n=\"[object Object]\"==e?t.constructor:void 0,r=n?l(n):\"\";if(r)switch(r){case g:return p;case y:return u;case m:return h;case b:return f;case v:return d}return e}),t.exports=_;},7801:t=>{t.exports=function(t,e){return null==t?void 0:t[e]};},222:(t,e,n)=>{var r=n(1811),i=n(5694),a=n(1469),o=n(5776),s=n(1780),c=n(327);t.exports=function(t,e,n){for(var l=-1,u=(e=r(e,t)).length,h=!1;++l<u;){var f=c(e[l]);if(!(h=null!=t&&n(t,f)))break;t=t[f];}return h||++l!=u?h:!!(u=null==t?0:t.length)&&s(u)&&o(f,u)&&(a(t)||i(t))};},2689:t=>{var e=RegExp(\"[\\\\u200d\\\\ud800-\\\\udfff\\\\u0300-\\\\u036f\\\\ufe20-\\\\ufe2f\\\\u20d0-\\\\u20ff\\\\ufe0e\\\\ufe0f]\");t.exports=function(t){return e.test(t)};},1789:(t,e,n)=>{var r=n(4536);t.exports=function(){this.__data__=r?r(null):{},this.size=0;};},401:t=>{t.exports=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e};},7667:(t,e,n)=>{var r=n(4536),i=Object.prototype.hasOwnProperty;t.exports=function(t){var e=this.__data__;if(r){var n=e[t];return \"__lodash_hash_undefined__\"===n?void 0:n}return i.call(e,t)?e[t]:void 0};},1327:(t,e,n)=>{var r=n(4536),i=Object.prototype.hasOwnProperty;t.exports=function(t){var e=this.__data__;return r?void 0!==e[t]:i.call(e,t)};},1866:(t,e,n)=>{var r=n(4536);t.exports=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=r&&void 0===e?\"__lodash_hash_undefined__\":e,this};},3824:t=>{var e=Object.prototype.hasOwnProperty;t.exports=function(t){var n=t.length,r=new t.constructor(n);return n&&\"string\"==typeof t[0]&&e.call(t,\"index\")&&(r.index=t.index,r.input=t.input),r};},9148:(t,e,n)=>{var r=n(4318),i=n(7157),a=n(3147),o=n(419),s=n(7133);t.exports=function(t,e,n){var c=t.constructor;switch(e){case\"[object ArrayBuffer]\":return r(t);case\"[object Boolean]\":case\"[object Date]\":return new c(+t);case\"[object DataView]\":return i(t,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 s(t,n);case\"[object Map]\":case\"[object Set]\":return new c;case\"[object Number]\":case\"[object String]\":return new c(t);case\"[object RegExp]\":return a(t);case\"[object Symbol]\":return o(t)}};},8517:(t,e,n)=>{var r=n(3118),i=n(5924),a=n(5726);t.exports=function(t){return \"function\"!=typeof t.constructor||a(t)?{}:r(i(t))};},7285:(t,e,n)=>{var r=n(2705),i=n(5694),a=n(1469),o=r?r.isConcatSpreadable:void 0;t.exports=function(t){return a(t)||i(t)||!!(o&&t&&t[o])};},5776:t=>{var e=/^(?:0|[1-9]\\d*)$/;t.exports=function(t,n){var r=typeof t;return !!(n=null==n?9007199254740991:n)&&(\"number\"==r||\"symbol\"!=r&&e.test(t))&&t>-1&&t%1==0&&t<n};},6612:(t,e,n)=>{var r=n(7813),i=n(8612),a=n(5776),o=n(3218);t.exports=function(t,e,n){if(!o(n))return !1;var s=typeof e;return !!(\"number\"==s?i(n)&&a(e,n.length):\"string\"==s&&e in n)&&r(n[e],t)};},5403:(t,e,n)=>{var r=n(1469),i=n(3448),a=/\\.|\\[(?:[^[\\]]*|([\"'])(?:(?!\\1)[^\\\\]|\\\\.)*?\\1)\\]/,o=/^\\w*$/;t.exports=function(t,e){if(r(t))return !1;var n=typeof t;return !(\"number\"!=n&&\"symbol\"!=n&&\"boolean\"!=n&&null!=t&&!i(t))||o.test(t)||!a.test(t)||null!=e&&t in Object(e)};},7019:t=>{t.exports=function(t){var e=typeof t;return \"string\"==e||\"number\"==e||\"symbol\"==e||\"boolean\"==e?\"__proto__\"!==t:null===t};},5346:(t,e,n)=>{var r,i=n(4429),a=(r=/[^.]+$/.exec(i&&i.keys&&i.keys.IE_PROTO||\"\"))?\"Symbol(src)_1.\"+r:\"\";t.exports=function(t){return !!a&&a in t};},5726:t=>{var e=Object.prototype;t.exports=function(t){var n=t&&t.constructor;return t===(\"function\"==typeof n&&n.prototype||e)};},9162:(t,e,n)=>{var r=n(3218);t.exports=function(t){return t==t&&!r(t)};},7040:t=>{t.exports=function(){this.__data__=[],this.size=0;};},4125:(t,e,n)=>{var r=n(8470),i=Array.prototype.splice;t.exports=function(t){var e=this.__data__,n=r(e,t);return !(n<0||(n==e.length-1?e.pop():i.call(e,n,1),--this.size,0))};},2117:(t,e,n)=>{var r=n(8470);t.exports=function(t){var e=this.__data__,n=r(e,t);return n<0?void 0:e[n][1]};},7518:(t,e,n)=>{var r=n(8470);t.exports=function(t){return r(this.__data__,t)>-1};},4705:(t,e,n)=>{var r=n(8470);t.exports=function(t,e){var n=this.__data__,i=r(n,t);return i<0?(++this.size,n.push([t,e])):n[i][1]=e,this};},4785:(t,e,n)=>{var r=n(1989),i=n(8407),a=n(7071);t.exports=function(){this.size=0,this.__data__={hash:new r,map:new(a||i),string:new r};};},1285:(t,e,n)=>{var r=n(5050);t.exports=function(t){var e=r(this,t).delete(t);return this.size-=e?1:0,e};},6e3:(t,e,n)=>{var r=n(5050);t.exports=function(t){return r(this,t).get(t)};},9916:(t,e,n)=>{var r=n(5050);t.exports=function(t){return r(this,t).has(t)};},5265:(t,e,n)=>{var r=n(5050);t.exports=function(t,e){var n=r(this,t),i=n.size;return n.set(t,e),this.size+=n.size==i?0:1,this};},8776:t=>{t.exports=function(t){var e=-1,n=Array(t.size);return t.forEach((function(t,r){n[++e]=[r,t];})),n};},2634:t=>{t.exports=function(t,e){return function(n){return null!=n&&n[t]===e&&(void 0!==e||t in Object(n))}};},4523:(t,e,n)=>{var r=n(8306);t.exports=function(t){var e=r(t,(function(t){return 500===n.size&&n.clear(),t})),n=e.cache;return e};},4536:(t,e,n)=>{var r=n(852)(Object,\"create\");t.exports=r;},6916:(t,e,n)=>{var r=n(5569)(Object.keys,Object);t.exports=r;},3498:t=>{t.exports=function(t){var e=[];if(null!=t)for(var n in Object(t))e.push(n);return e};},1167:(t,e,n)=>{t=n.nmd(t);var r=n(1957),i=e&&!e.nodeType&&e,a=i&&t&&!t.nodeType&&t,o=a&&a.exports===i&&r.process,s=function(){try{return a&&a.require&&a.require(\"util\").types||o&&o.binding&&o.binding(\"util\")}catch(t){}}();t.exports=s;},2333:t=>{var e=Object.prototype.toString;t.exports=function(t){return e.call(t)};},5569:t=>{t.exports=function(t,e){return function(n){return t(e(n))}};},5357:(t,e,n)=>{var r=n(6874),i=Math.max;t.exports=function(t,e,n){return e=i(void 0===e?t.length-1:e,0),function(){for(var a=arguments,o=-1,s=i(a.length-e,0),c=Array(s);++o<s;)c[o]=a[e+o];o=-1;for(var l=Array(e+1);++o<e;)l[o]=a[o];return l[e]=n(c),r(t,this,l)}};},5639:(t,e,n)=>{var r=n(1957),i=\"object\"==typeof self&&self&&self.Object===Object&&self,a=r||i||Function(\"return this\")();t.exports=a;},6390:t=>{t.exports=function(t,e){if((\"constructor\"!==e||\"function\"!=typeof t[e])&&\"__proto__\"!=e)return t[e]};},619:t=>{t.exports=function(t){return this.__data__.set(t,\"__lodash_hash_undefined__\"),this};},2385:t=>{t.exports=function(t){return this.__data__.has(t)};},1814:t=>{t.exports=function(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=t;})),n};},61:(t,e,n)=>{var r=n(6560),i=n(1275)(r);t.exports=i;},1275:t=>{var e=Date.now;t.exports=function(t){var n=0,r=0;return function(){var i=e(),a=16-(i-r);if(r=i,a>0){if(++n>=800)return arguments[0]}else n=0;return t.apply(void 0,arguments)}};},7465:(t,e,n)=>{var r=n(8407);t.exports=function(){this.__data__=new r,this.size=0;};},3779:t=>{t.exports=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n};},7599:t=>{t.exports=function(t){return this.__data__.get(t)};},4758:t=>{t.exports=function(t){return this.__data__.has(t)};},4309:(t,e,n)=>{var r=n(8407),i=n(7071),a=n(3369);t.exports=function(t,e){var n=this.__data__;if(n instanceof r){var o=n.__data__;if(!i||o.length<199)return o.push([t,e]),this.size=++n.size,this;n=this.__data__=new a(o);}return n.set(t,e),this.size=n.size,this};},2351:t=>{t.exports=function(t,e,n){for(var r=n-1,i=t.length;++r<i;)if(t[r]===e)return r;return -1};},8016:(t,e,n)=>{var r=n(8983),i=n(2689),a=n(1903);t.exports=function(t){return i(t)?a(t):r(t)};},5514:(t,e,n)=>{var r=n(4523),i=/[^.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))/g,a=/\\\\(\\\\)?/g,o=r((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(\"\"),t.replace(i,(function(t,n,r,i){e.push(r?i.replace(a,\"$1\"):n||t);})),e}));t.exports=o;},327:(t,e,n)=>{var r=n(3448);t.exports=function(t){if(\"string\"==typeof t||r(t))return t;var e=t+\"\";return \"0\"==e&&1/t==-1/0?\"-0\":e};},346:t=>{var e=Function.prototype.toString;t.exports=function(t){if(null!=t){try{return e.call(t)}catch(t){}try{return t+\"\"}catch(t){}}return \"\"};},7990:t=>{var e=/\\s/;t.exports=function(t){for(var n=t.length;n--&&e.test(t.charAt(n)););return n};},1903:t=>{var e=\"[\\\\u0300-\\\\u036f\\\\ufe20-\\\\ufe2f\\\\u20d0-\\\\u20ff]\",n=\"\\\\ud83c[\\\\udffb-\\\\udfff]\",r=\"[^\\\\ud800-\\\\udfff]\",i=\"(?:\\\\ud83c[\\\\udde6-\\\\uddff]){2}\",a=\"[\\\\ud800-\\\\udbff][\\\\udc00-\\\\udfff]\",o=\"(?:\"+e+\"|\"+n+\")?\",s=\"[\\\\ufe0e\\\\ufe0f]?\",c=s+o+\"(?:\\\\u200d(?:\"+[r,i,a].join(\"|\")+\")\"+s+o+\")*\",l=\"(?:\"+[r+e+\"?\",e,i,a,\"[\\\\ud800-\\\\udfff]\"].join(\"|\")+\")\",u=RegExp(n+\"(?=\"+n+\")|\"+l+c,\"g\");t.exports=function(t){for(var e=u.lastIndex=0;u.test(t);)++e;return e};},6678:(t,e,n)=>{var r=n(5990);t.exports=function(t){return r(t,4)};},361:(t,e,n)=>{var r=n(5990);t.exports=function(t){return r(t,5)};},5703:t=>{t.exports=function(t){return function(){return t}};},1747:(t,e,n)=>{var r=n(5976),i=n(7813),a=n(6612),o=n(1704),s=Object.prototype,c=s.hasOwnProperty,l=r((function(t,e){t=Object(t);var n=-1,r=e.length,l=r>2?e[2]:void 0;for(l&&a(e[0],e[1],l)&&(r=1);++n<r;)for(var u=e[n],h=o(u),f=-1,d=h.length;++f<d;){var p=h[f],g=t[p];(void 0===g||i(g,s[p])&&!c.call(t,p))&&(t[p]=u[p]);}return t}));t.exports=l;},6073:(t,e,n)=>{t.exports=n(4486);},7813:t=>{t.exports=function(t,e){return t===e||t!=t&&e!=e};},3105:(t,e,n)=>{var r=n(4963),i=n(760),a=n(7206),o=n(1469);t.exports=function(t,e){return (o(t)?r:i)(t,a(e,3))};},3311:(t,e,n)=>{var r=n(7740)(n(998));t.exports=r;},998:(t,e,n)=>{var r=n(1848),i=n(7206),a=n(554),o=Math.max;t.exports=function(t,e,n){var s=null==t?0:t.length;if(!s)return -1;var c=null==n?0:a(n);return c<0&&(c=o(s+c,0)),r(t,i(e,3),c)};},5564:(t,e,n)=>{var r=n(1078);t.exports=function(t){return null!=t&&t.length?r(t,1):[]};},4486:(t,e,n)=>{var r=n(7412),i=n(9881),a=n(4290),o=n(1469);t.exports=function(t,e){return (o(t)?r:i)(t,a(e))};},2620:(t,e,n)=>{var r=n(8483),i=n(4290),a=n(1704);t.exports=function(t,e){return null==t?t:r(t,i(e),a)};},7361:(t,e,n)=>{var r=n(7786);t.exports=function(t,e,n){var i=null==t?void 0:r(t,e);return void 0===i?n:i};},8721:(t,e,n)=>{var r=n(8565),i=n(222);t.exports=function(t,e){return null!=t&&i(t,e,r)};},9095:(t,e,n)=>{var r=n(13),i=n(222);t.exports=function(t,e){return null!=t&&i(t,e,r)};},6557:t=>{t.exports=function(t){return t};},5694:(t,e,n)=>{var r=n(9454),i=n(7005),a=Object.prototype,o=a.hasOwnProperty,s=a.propertyIsEnumerable,c=r(function(){return arguments}())?r:function(t){return i(t)&&o.call(t,\"callee\")&&!s.call(t,\"callee\")};t.exports=c;},1469:t=>{var e=Array.isArray;t.exports=e;},8612:(t,e,n)=>{var r=n(3560),i=n(1780);t.exports=function(t){return null!=t&&i(t.length)&&!r(t)};},9246:(t,e,n)=>{var r=n(8612),i=n(7005);t.exports=function(t){return i(t)&&r(t)};},4144:(t,e,n)=>{t=n.nmd(t);var r=n(5639),i=n(5062),a=e&&!e.nodeType&&e,o=a&&t&&!t.nodeType&&t,s=o&&o.exports===a?r.Buffer:void 0,c=(s?s.isBuffer:void 0)||i;t.exports=c;},1609:(t,e,n)=>{var r=n(280),i=n(4160),a=n(5694),o=n(1469),s=n(8612),c=n(4144),l=n(5726),u=n(6719),h=Object.prototype.hasOwnProperty;t.exports=function(t){if(null==t)return !0;if(s(t)&&(o(t)||\"string\"==typeof t||\"function\"==typeof t.splice||c(t)||u(t)||a(t)))return !t.length;var e=i(t);if(\"[object Map]\"==e||\"[object Set]\"==e)return !t.size;if(l(t))return !r(t).length;for(var n in t)if(h.call(t,n))return !1;return !0};},3560:(t,e,n)=>{var r=n(4239),i=n(3218);t.exports=function(t){if(!i(t))return !1;var e=r(t);return \"[object Function]\"==e||\"[object GeneratorFunction]\"==e||\"[object AsyncFunction]\"==e||\"[object Proxy]\"==e};},1780:t=>{t.exports=function(t){return \"number\"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991};},6688:(t,e,n)=>{var r=n(5588),i=n(1717),a=n(1167),o=a&&a.isMap,s=o?i(o):r;t.exports=s;},3218:t=>{t.exports=function(t){var e=typeof t;return null!=t&&(\"object\"==e||\"function\"==e)};},7005:t=>{t.exports=function(t){return null!=t&&\"object\"==typeof t};},8630:(t,e,n)=>{var r=n(4239),i=n(5924),a=n(7005),o=Function.prototype,s=Object.prototype,c=o.toString,l=s.hasOwnProperty,u=c.call(Object);t.exports=function(t){if(!a(t)||\"[object Object]\"!=r(t))return !1;var e=i(t);if(null===e)return !0;var n=l.call(e,\"constructor\")&&e.constructor;return \"function\"==typeof n&&n instanceof n&&c.call(n)==u};},2928:(t,e,n)=>{var r=n(9221),i=n(1717),a=n(1167),o=a&&a.isSet,s=o?i(o):r;t.exports=s;},7037:(t,e,n)=>{var r=n(4239),i=n(1469),a=n(7005);t.exports=function(t){return \"string\"==typeof t||!i(t)&&a(t)&&\"[object String]\"==r(t)};},3448:(t,e,n)=>{var r=n(4239),i=n(7005);t.exports=function(t){return \"symbol\"==typeof t||i(t)&&\"[object Symbol]\"==r(t)};},6719:(t,e,n)=>{var r=n(8749),i=n(1717),a=n(1167),o=a&&a.isTypedArray,s=o?i(o):r;t.exports=s;},2353:t=>{t.exports=function(t){return void 0===t};},3674:(t,e,n)=>{var r=n(4636),i=n(280),a=n(8612);t.exports=function(t){return a(t)?r(t):i(t)};},1704:(t,e,n)=>{var r=n(4636),i=n(313),a=n(8612);t.exports=function(t){return a(t)?r(t,!0):i(t)};},928:t=>{t.exports=function(t){var e=null==t?0:t.length;return e?t[e-1]:void 0};},5161:(t,e,n)=>{var r=n(9932),i=n(7206),a=n(9199),o=n(1469);t.exports=function(t,e){return (o(t)?r:a)(t,i(e,3))};},6604:(t,e,n)=>{var r=n(9465),i=n(7816),a=n(7206);t.exports=function(t,e){var n={};return e=a(e,3),i(t,(function(t,i,a){r(n,i,e(t,i,a));})),n};},6162:(t,e,n)=>{var r=n(6029),i=n(3325),a=n(6557);t.exports=function(t){return t&&t.length?r(t,a,i):void 0};},8306:(t,e,n)=>{var r=n(3369);function i(t,e){if(\"function\"!=typeof t||null!=e&&\"function\"!=typeof e)throw new TypeError(\"Expected a function\");var n=function(){var r=arguments,i=e?e.apply(this,r):r[0],a=n.cache;if(a.has(i))return a.get(i);var o=t.apply(this,r);return n.cache=a.set(i,o)||a,o};return n.cache=new(i.Cache||r),n}i.Cache=r,t.exports=i;},3857:(t,e,n)=>{var r=n(2980),i=n(1463)((function(t,e,n){r(t,e,n);}));t.exports=i;},3632:(t,e,n)=>{var r=n(6029),i=n(433),a=n(6557);t.exports=function(t){return t&&t.length?r(t,a,i):void 0};},2762:(t,e,n)=>{var r=n(6029),i=n(7206),a=n(433);t.exports=function(t,e){return t&&t.length?r(t,i(e,2),a):void 0};},308:t=>{t.exports=function(){};},7771:(t,e,n)=>{var r=n(5639);t.exports=function(){return r.Date.now()};},9722:(t,e,n)=>{var r=n(5970),i=n(9021)((function(t,e){return null==t?{}:r(t,e)}));t.exports=i;},9601:(t,e,n)=>{var r=n(371),i=n(9152),a=n(5403),o=n(327);t.exports=function(t){return a(t)?r(o(t)):i(t)};},6026:(t,e,n)=>{var r=n(7445)();t.exports=r;},4061:(t,e,n)=>{var r=n(2663),i=n(9881),a=n(7206),o=n(107),s=n(1469);t.exports=function(t,e,n){var c=s(t)?r:o,l=arguments.length<3;return c(t,a(e,4),n,l,i)};},4238:(t,e,n)=>{var r=n(280),i=n(4160),a=n(8612),o=n(7037),s=n(8016);t.exports=function(t){if(null==t)return 0;if(a(t))return o(t)?s(t):t.length;var e=i(t);return \"[object Map]\"==e||\"[object Set]\"==e?t.size:r(t).length};},9734:(t,e,n)=>{var r=n(1078),i=n(9556),a=n(5976),o=n(6612),s=a((function(t,e){if(null==t)return [];var n=e.length;return n>1&&o(t,e[0],e[1])?e=[]:n>2&&o(e[0],e[1],e[2])&&(e=[e[0]]),i(t,r(e,1),[])}));t.exports=s;},479:t=>{t.exports=function(){return []};},5062:t=>{t.exports=function(){return !1};},8601:(t,e,n)=>{var r=n(4841);t.exports=function(t){return t?Infinity===(t=r(t))||t===-1/0?17976931348623157e292*(t<0?-1:1):t==t?t:0:0===t?t:0};},554:(t,e,n)=>{var r=n(8601);t.exports=function(t){var e=r(t),n=e%1;return e==e?n?e-n:e:0};},4841:(t,e,n)=>{var r=n(7561),i=n(3218),a=n(3448),o=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,c=/^0o[0-7]+$/i,l=parseInt;t.exports=function(t){if(\"number\"==typeof t)return t;if(a(t))return NaN;if(i(t)){var e=\"function\"==typeof t.valueOf?t.valueOf():t;t=i(e)?e+\"\":e;}if(\"string\"!=typeof t)return 0===t?t:+t;t=r(t);var n=s.test(t);return n||c.test(t)?l(t.slice(2),n?2:8):o.test(t)?NaN:+t};},3678:(t,e,n)=>{var r=n(8363),i=n(1704);t.exports=function(t){return r(t,i(t))};},9833:(t,e,n)=>{var r=n(531);t.exports=function(t){return null==t?\"\":r(t)};},8718:(t,e,n)=>{var r=n(7412),i=n(3118),a=n(7816),o=n(7206),s=n(5924),c=n(1469),l=n(4144),u=n(3560),h=n(3218),f=n(6719);t.exports=function(t,e,n){var d=c(t),p=d||l(t)||f(t);if(e=o(e,4),null==n){var g=t&&t.constructor;n=p?d?new g:[]:h(t)&&u(g)?i(s(t)):{};}return (p?r:a)(t,(function(t,r,i){return e(n,t,r,i)})),n};},3386:(t,e,n)=>{var r=n(1078),i=n(5976),a=n(5652),o=n(9246),s=i((function(t){return a(r(t,1,o,!0))}));t.exports=s;},3955:(t,e,n)=>{var r=n(9833),i=0;t.exports=function(t){var e=++i;return r(t)+e};},2628:(t,e,n)=>{var r=n(7415),i=n(3674);t.exports=function(t){return null==t?[]:r(t,i(t))};},7287:(t,e,n)=>{var r=n(4865),i=n(1757);t.exports=function(t,e){return i(t||[],e||[],r)};},9234:()=>{},1748:(t,e,n)=>{var r={\"./locale\":9234,\"./locale.js\":9234};function i(t){var e=a(t);return n(e)}function a(t){if(!n.o(r,t)){var e=new Error(\"Cannot find module '\"+t+\"'\");throw e.code=\"MODULE_NOT_FOUND\",e}return r[t]}i.keys=function(){return Object.keys(r)},i.resolve=a,t.exports=i,i.id=1748;},1941:function(t,e,n){(t=n.nmd(t)).exports=function(){var e,r;function i(){return e.apply(null,arguments)}function a(t){return t instanceof Array||\"[object Array]\"===Object.prototype.toString.call(t)}function o(t){return null!=t&&\"[object Object]\"===Object.prototype.toString.call(t)}function s(t){return void 0===t}function c(t){return \"number\"==typeof t||\"[object Number]\"===Object.prototype.toString.call(t)}function l(t){return t instanceof Date||\"[object Date]\"===Object.prototype.toString.call(t)}function u(t,e){var n,r=[];for(n=0;n<t.length;++n)r.push(e(t[n],n));return r}function h(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function f(t,e){for(var n in e)h(e,n)&&(t[n]=e[n]);return h(e,\"toString\")&&(t.toString=e.toString),h(e,\"valueOf\")&&(t.valueOf=e.valueOf),t}function d(t,e,n,r){return ve(t,e,n,r,!0).utc()}function p(t){return null==t._pf&&(t._pf={empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],meridiem:null,rfc2822:!1,weekdayMismatch:!1}),t._pf}function g(t){if(null==t._isValid){var e=p(t),n=r.call(e.parsedDateParts,(function(t){return null!=t})),i=!isNaN(t._d.getTime())&&e.overflow<0&&!e.empty&&!e.invalidMonth&&!e.invalidWeekday&&!e.weekdayMismatch&&!e.nullInput&&!e.invalidFormat&&!e.userInvalidated&&(!e.meridiem||e.meridiem&&n);if(t._strict&&(i=i&&0===e.charsLeftOver&&0===e.unusedTokens.length&&void 0===e.bigHour),null!=Object.isFrozen&&Object.isFrozen(t))return i;t._isValid=i;}return t._isValid}function y(t){var e=d(NaN);return null!=t?f(p(e),t):p(e).userInvalidated=!0,e}r=Array.prototype.some?Array.prototype.some:function(t){for(var e=Object(this),n=e.length>>>0,r=0;r<n;r++)if(r in e&&t.call(this,e[r],r,e))return !0;return !1};var m=i.momentProperties=[];function b(t,e){var n,r,i;if(s(e._isAMomentObject)||(t._isAMomentObject=e._isAMomentObject),s(e._i)||(t._i=e._i),s(e._f)||(t._f=e._f),s(e._l)||(t._l=e._l),s(e._strict)||(t._strict=e._strict),s(e._tzm)||(t._tzm=e._tzm),s(e._isUTC)||(t._isUTC=e._isUTC),s(e._offset)||(t._offset=e._offset),s(e._pf)||(t._pf=p(e)),s(e._locale)||(t._locale=e._locale),0<m.length)for(n=0;n<m.length;n++)s(i=e[r=m[n]])||(t[r]=i);return t}var v=!1;function _(t){b(this,t),this._d=new Date(null!=t._d?t._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),!1===v&&(v=!0,i.updateOffset(this),v=!1);}function x(t){return t instanceof _||null!=t&&null!=t._isAMomentObject}function k(t){return t<0?Math.ceil(t)||0:Math.floor(t)}function w(t){var e=+t,n=0;return 0!==e&&isFinite(e)&&(n=k(e)),n}function T(t,e,n){var r,i=Math.min(t.length,e.length),a=Math.abs(t.length-e.length),o=0;for(r=0;r<i;r++)(n&&t[r]!==e[r]||!n&&w(t[r])!==w(e[r]))&&o++;return o+a}function E(t){!1===i.suppressDeprecationWarnings&&\"undefined\"!=typeof console&&console.warn&&console.warn(\"Deprecation warning: \"+t);}function C(t,e){var n=!0;return f((function(){if(null!=i.deprecationHandler&&i.deprecationHandler(null,t),n){for(var r,a=[],o=0;o<arguments.length;o++){if(r=\"\",\"object\"==typeof arguments[o]){for(var s in r+=\"\\n[\"+o+\"] \",arguments[0])r+=s+\": \"+arguments[0][s]+\", \";r=r.slice(0,-2);}else r=arguments[o];a.push(r);}E(t+\"\\nArguments: \"+Array.prototype.slice.call(a).join(\"\")+\"\\n\"+(new Error).stack),n=!1;}return e.apply(this,arguments)}),e)}var S,A={};function M(t,e){null!=i.deprecationHandler&&i.deprecationHandler(t,e),A[t]||(E(e),A[t]=!0);}function N(t){return t instanceof Function||\"[object Function]\"===Object.prototype.toString.call(t)}function O(t,e){var n,r=f({},t);for(n in e)h(e,n)&&(o(t[n])&&o(e[n])?(r[n]={},f(r[n],t[n]),f(r[n],e[n])):null!=e[n]?r[n]=e[n]:delete r[n]);for(n in t)h(t,n)&&!h(e,n)&&o(t[n])&&(r[n]=f({},r[n]));return r}function D(t){null!=t&&this.set(t);}i.suppressDeprecationWarnings=!1,i.deprecationHandler=null,S=Object.keys?Object.keys:function(t){var e,n=[];for(e in t)h(t,e)&&n.push(e);return n};var B={};function L(t,e){var n=t.toLowerCase();B[n]=B[n+\"s\"]=B[e]=t;}function I(t){return \"string\"==typeof t?B[t]||B[t.toLowerCase()]:void 0}function F(t){var e,n,r={};for(n in t)h(t,n)&&(e=I(n))&&(r[e]=t[n]);return r}var R={};function P(t,e){R[t]=e;}function j(t,e,n){var r=\"\"+Math.abs(t),i=e-r.length;return (0<=t?n?\"+\":\"\":\"-\")+Math.pow(10,Math.max(0,i)).toString().substr(1)+r}var z=/(\\[[^\\[]*\\])|(\\\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,Y=/(\\[[^\\[]*\\])|(\\\\)?(LTS|LT|LL?L?L?|l{1,4})/g,U={},$={};function W(t,e,n,r){var i=r;\"string\"==typeof r&&(i=function(){return this[r]()}),t&&($[t]=i),e&&($[e[0]]=function(){return j(i.apply(this,arguments),e[1],e[2])}),n&&($[n]=function(){return this.localeData().ordinal(i.apply(this,arguments),t)});}function q(t,e){return t.isValid()?(e=H(e,t.localeData()),U[e]=U[e]||function(t){var e,n,r,i=t.match(z);for(e=0,n=i.length;e<n;e++)$[i[e]]?i[e]=$[i[e]]:i[e]=(r=i[e]).match(/\\[[\\s\\S]/)?r.replace(/^\\[|\\]$/g,\"\"):r.replace(/\\\\/g,\"\");return function(e){var r,a=\"\";for(r=0;r<n;r++)a+=N(i[r])?i[r].call(e,t):i[r];return a}}(e),U[e](t)):t.localeData().invalidDate()}function H(t,e){var n=5;function r(t){return e.longDateFormat(t)||t}for(Y.lastIndex=0;0<=n&&Y.test(t);)t=t.replace(Y,r),Y.lastIndex=0,n-=1;return t}var V=/\\d/,G=/\\d\\d/,X=/\\d{3}/,Z=/\\d{4}/,Q=/[+-]?\\d{6}/,K=/\\d\\d?/,J=/\\d\\d\\d\\d?/,tt=/\\d\\d\\d\\d\\d\\d?/,et=/\\d{1,3}/,nt=/\\d{1,4}/,rt=/[+-]?\\d{1,6}/,it=/\\d+/,at=/[+-]?\\d+/,ot=/Z|[+-]\\d\\d:?\\d\\d/gi,st=/Z|[+-]\\d\\d(?::?\\d\\d)?/gi,ct=/[0-9]{0,256}['a-z\\u00A0-\\u05FF\\u0700-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFF07\\uFF10-\\uFFEF]{1,256}|[\\u0600-\\u06FF\\/]{1,256}(\\s*?[\\u0600-\\u06FF]{1,256}){1,2}/i,lt={};function ut(t,e,n){lt[t]=N(e)?e:function(t,r){return t&&n?n:e};}function ht(t,e){return h(lt,t)?lt[t](e._strict,e._locale):new RegExp(ft(t.replace(\"\\\\\",\"\").replace(/\\\\(\\[)|\\\\(\\])|\\[([^\\]\\[]*)\\]|\\\\(.)/g,(function(t,e,n,r,i){return e||n||r||i}))))}function ft(t){return t.replace(/[-\\/\\\\^$*+?.()|[\\]{}]/g,\"\\\\$&\")}var dt={};function pt(t,e){var n,r=e;for(\"string\"==typeof t&&(t=[t]),c(e)&&(r=function(t,n){n[e]=w(t);}),n=0;n<t.length;n++)dt[t[n]]=r;}function gt(t,e){pt(t,(function(t,n,r,i){r._w=r._w||{},e(t,r._w,r,i);}));}function yt(t){return mt(t)?366:365}function mt(t){return t%4==0&&t%100!=0||t%400==0}W(\"Y\",0,0,(function(){var t=this.year();return t<=9999?\"\"+t:\"+\"+t})),W(0,[\"YY\",2],0,(function(){return this.year()%100})),W(0,[\"YYYY\",4],0,\"year\"),W(0,[\"YYYYY\",5],0,\"year\"),W(0,[\"YYYYYY\",6,!0],0,\"year\"),L(\"year\",\"y\"),P(\"year\",1),ut(\"Y\",at),ut(\"YY\",K,G),ut(\"YYYY\",nt,Z),ut(\"YYYYY\",rt,Q),ut(\"YYYYYY\",rt,Q),pt([\"YYYYY\",\"YYYYYY\"],0),pt(\"YYYY\",(function(t,e){e[0]=2===t.length?i.parseTwoDigitYear(t):w(t);})),pt(\"YY\",(function(t,e){e[0]=i.parseTwoDigitYear(t);})),pt(\"Y\",(function(t,e){e[0]=parseInt(t,10);})),i.parseTwoDigitYear=function(t){return w(t)+(68<w(t)?1900:2e3)};var bt,vt=_t(\"FullYear\",!0);function _t(t,e){return function(n){return null!=n?(kt(this,t,n),i.updateOffset(this,e),this):xt(this,t)}}function xt(t,e){return t.isValid()?t._d[\"get\"+(t._isUTC?\"UTC\":\"\")+e]():NaN}function kt(t,e,n){t.isValid()&&!isNaN(n)&&(\"FullYear\"===e&&mt(t.year())&&1===t.month()&&29===t.date()?t._d[\"set\"+(t._isUTC?\"UTC\":\"\")+e](n,t.month(),wt(n,t.month())):t._d[\"set\"+(t._isUTC?\"UTC\":\"\")+e](n));}function wt(t,e){if(isNaN(t)||isNaN(e))return NaN;var n=(e%12+12)%12;return t+=(e-n)/12,1===n?mt(t)?29:28:31-n%7%2}bt=Array.prototype.indexOf?Array.prototype.indexOf:function(t){var e;for(e=0;e<this.length;++e)if(this[e]===t)return e;return -1},W(\"M\",[\"MM\",2],\"Mo\",(function(){return this.month()+1})),W(\"MMM\",0,0,(function(t){return this.localeData().monthsShort(this,t)})),W(\"MMMM\",0,0,(function(t){return this.localeData().months(this,t)})),L(\"month\",\"M\"),P(\"month\",8),ut(\"M\",K),ut(\"MM\",K,G),ut(\"MMM\",(function(t,e){return e.monthsShortRegex(t)})),ut(\"MMMM\",(function(t,e){return e.monthsRegex(t)})),pt([\"M\",\"MM\"],(function(t,e){e[1]=w(t)-1;})),pt([\"MMM\",\"MMMM\"],(function(t,e,n,r){var i=n._locale.monthsParse(t,r,n._strict);null!=i?e[1]=i:p(n).invalidMonth=t;}));var Tt=/D[oD]?(\\[[^\\[\\]]*\\]|\\s)+MMMM?/,Et=\"January_February_March_April_May_June_July_August_September_October_November_December\".split(\"_\"),Ct=\"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec\".split(\"_\");function St(t,e){var n;if(!t.isValid())return t;if(\"string\"==typeof e)if(/^\\d+$/.test(e))e=w(e);else if(!c(e=t.localeData().monthsParse(e)))return t;return n=Math.min(t.date(),wt(t.year(),e)),t._d[\"set\"+(t._isUTC?\"UTC\":\"\")+\"Month\"](e,n),t}function At(t){return null!=t?(St(this,t),i.updateOffset(this,!0),this):xt(this,\"Month\")}var Mt=ct,Nt=ct;function Ot(){function t(t,e){return e.length-t.length}var e,n,r=[],i=[],a=[];for(e=0;e<12;e++)n=d([2e3,e]),r.push(this.monthsShort(n,\"\")),i.push(this.months(n,\"\")),a.push(this.months(n,\"\")),a.push(this.monthsShort(n,\"\"));for(r.sort(t),i.sort(t),a.sort(t),e=0;e<12;e++)r[e]=ft(r[e]),i[e]=ft(i[e]);for(e=0;e<24;e++)a[e]=ft(a[e]);this._monthsRegex=new RegExp(\"^(\"+a.join(\"|\")+\")\",\"i\"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp(\"^(\"+i.join(\"|\")+\")\",\"i\"),this._monthsShortStrictRegex=new RegExp(\"^(\"+r.join(\"|\")+\")\",\"i\");}function Dt(t){var e;if(t<100&&0<=t){var n=Array.prototype.slice.call(arguments);n[0]=t+400,e=new Date(Date.UTC.apply(null,n)),isFinite(e.getUTCFullYear())&&e.setUTCFullYear(t);}else e=new Date(Date.UTC.apply(null,arguments));return e}function Bt(t,e,n){var r=7+e-n;return -(7+Dt(t,0,r).getUTCDay()-e)%7+r-1}function Lt(t,e,n,r,i){var a,o,s=1+7*(e-1)+(7+n-r)%7+Bt(t,r,i);return o=s<=0?yt(a=t-1)+s:s>yt(t)?(a=t+1,s-yt(t)):(a=t,s),{year:a,dayOfYear:o}}function It(t,e,n){var r,i,a=Bt(t.year(),e,n),o=Math.floor((t.dayOfYear()-a-1)/7)+1;return o<1?r=o+Ft(i=t.year()-1,e,n):o>Ft(t.year(),e,n)?(r=o-Ft(t.year(),e,n),i=t.year()+1):(i=t.year(),r=o),{week:r,year:i}}function Ft(t,e,n){var r=Bt(t,e,n),i=Bt(t+1,e,n);return (yt(t)-r+i)/7}function Rt(t,e){return t.slice(e,7).concat(t.slice(0,e))}W(\"w\",[\"ww\",2],\"wo\",\"week\"),W(\"W\",[\"WW\",2],\"Wo\",\"isoWeek\"),L(\"week\",\"w\"),L(\"isoWeek\",\"W\"),P(\"week\",5),P(\"isoWeek\",5),ut(\"w\",K),ut(\"ww\",K,G),ut(\"W\",K),ut(\"WW\",K,G),gt([\"w\",\"ww\",\"W\",\"WW\"],(function(t,e,n,r){e[r.substr(0,1)]=w(t);})),W(\"d\",0,\"do\",\"day\"),W(\"dd\",0,0,(function(t){return this.localeData().weekdaysMin(this,t)})),W(\"ddd\",0,0,(function(t){return this.localeData().weekdaysShort(this,t)})),W(\"dddd\",0,0,(function(t){return this.localeData().weekdays(this,t)})),W(\"e\",0,0,\"weekday\"),W(\"E\",0,0,\"isoWeekday\"),L(\"day\",\"d\"),L(\"weekday\",\"e\"),L(\"isoWeekday\",\"E\"),P(\"day\",11),P(\"weekday\",11),P(\"isoWeekday\",11),ut(\"d\",K),ut(\"e\",K),ut(\"E\",K),ut(\"dd\",(function(t,e){return e.weekdaysMinRegex(t)})),ut(\"ddd\",(function(t,e){return e.weekdaysShortRegex(t)})),ut(\"dddd\",(function(t,e){return e.weekdaysRegex(t)})),gt([\"dd\",\"ddd\",\"dddd\"],(function(t,e,n,r){var i=n._locale.weekdaysParse(t,r,n._strict);null!=i?e.d=i:p(n).invalidWeekday=t;})),gt([\"d\",\"e\",\"E\"],(function(t,e,n,r){e[r]=w(t);}));var Pt=\"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday\".split(\"_\"),jt=\"Sun_Mon_Tue_Wed_Thu_Fri_Sat\".split(\"_\"),zt=\"Su_Mo_Tu_We_Th_Fr_Sa\".split(\"_\"),Yt=ct,Ut=ct,$t=ct;function Wt(){function t(t,e){return e.length-t.length}var e,n,r,i,a,o=[],s=[],c=[],l=[];for(e=0;e<7;e++)n=d([2e3,1]).day(e),r=this.weekdaysMin(n,\"\"),i=this.weekdaysShort(n,\"\"),a=this.weekdays(n,\"\"),o.push(r),s.push(i),c.push(a),l.push(r),l.push(i),l.push(a);for(o.sort(t),s.sort(t),c.sort(t),l.sort(t),e=0;e<7;e++)s[e]=ft(s[e]),c[e]=ft(c[e]),l[e]=ft(l[e]);this._weekdaysRegex=new RegExp(\"^(\"+l.join(\"|\")+\")\",\"i\"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp(\"^(\"+c.join(\"|\")+\")\",\"i\"),this._weekdaysShortStrictRegex=new RegExp(\"^(\"+s.join(\"|\")+\")\",\"i\"),this._weekdaysMinStrictRegex=new RegExp(\"^(\"+o.join(\"|\")+\")\",\"i\");}function qt(){return this.hours()%12||12}function Ht(t,e){W(t,0,0,(function(){return this.localeData().meridiem(this.hours(),this.minutes(),e)}));}function Vt(t,e){return e._meridiemParse}W(\"H\",[\"HH\",2],0,\"hour\"),W(\"h\",[\"hh\",2],0,qt),W(\"k\",[\"kk\",2],0,(function(){return this.hours()||24})),W(\"hmm\",0,0,(function(){return \"\"+qt.apply(this)+j(this.minutes(),2)})),W(\"hmmss\",0,0,(function(){return \"\"+qt.apply(this)+j(this.minutes(),2)+j(this.seconds(),2)})),W(\"Hmm\",0,0,(function(){return \"\"+this.hours()+j(this.minutes(),2)})),W(\"Hmmss\",0,0,(function(){return \"\"+this.hours()+j(this.minutes(),2)+j(this.seconds(),2)})),Ht(\"a\",!0),Ht(\"A\",!1),L(\"hour\",\"h\"),P(\"hour\",13),ut(\"a\",Vt),ut(\"A\",Vt),ut(\"H\",K),ut(\"h\",K),ut(\"k\",K),ut(\"HH\",K,G),ut(\"hh\",K,G),ut(\"kk\",K,G),ut(\"hmm\",J),ut(\"hmmss\",tt),ut(\"Hmm\",J),ut(\"Hmmss\",tt),pt([\"H\",\"HH\"],3),pt([\"k\",\"kk\"],(function(t,e,n){var r=w(t);e[3]=24===r?0:r;})),pt([\"a\",\"A\"],(function(t,e,n){n._isPm=n._locale.isPM(t),n._meridiem=t;})),pt([\"h\",\"hh\"],(function(t,e,n){e[3]=w(t),p(n).bigHour=!0;})),pt(\"hmm\",(function(t,e,n){var r=t.length-2;e[3]=w(t.substr(0,r)),e[4]=w(t.substr(r)),p(n).bigHour=!0;})),pt(\"hmmss\",(function(t,e,n){var r=t.length-4,i=t.length-2;e[3]=w(t.substr(0,r)),e[4]=w(t.substr(r,2)),e[5]=w(t.substr(i)),p(n).bigHour=!0;})),pt(\"Hmm\",(function(t,e,n){var r=t.length-2;e[3]=w(t.substr(0,r)),e[4]=w(t.substr(r));})),pt(\"Hmmss\",(function(t,e,n){var r=t.length-4,i=t.length-2;e[3]=w(t.substr(0,r)),e[4]=w(t.substr(r,2)),e[5]=w(t.substr(i));}));var Gt,Xt=_t(\"Hours\",!0),Zt={calendar:{sameDay:\"[Today at] LT\",nextDay:\"[Tomorrow at] LT\",nextWeek:\"dddd [at] LT\",lastDay:\"[Yesterday at] LT\",lastWeek:\"[Last] dddd [at] LT\",sameElse:\"L\"},longDateFormat:{LTS:\"h:mm:ss A\",LT:\"h:mm A\",L:\"MM/DD/YYYY\",LL:\"MMMM D, YYYY\",LLL:\"MMMM D, YYYY h:mm A\",LLLL:\"dddd, MMMM D, YYYY h:mm A\"},invalidDate:\"Invalid date\",ordinal:\"%d\",dayOfMonthOrdinalParse:/\\d{1,2}/,relativeTime:{future:\"in %s\",past:\"%s ago\",s:\"a few seconds\",ss:\"%d seconds\",m:\"a minute\",mm:\"%d minutes\",h:\"an hour\",hh:\"%d hours\",d:\"a day\",dd:\"%d days\",M:\"a month\",MM:\"%d months\",y:\"a year\",yy:\"%d years\"},months:Et,monthsShort:Ct,week:{dow:0,doy:6},weekdays:Pt,weekdaysMin:zt,weekdaysShort:jt,meridiemParse:/[ap]\\.?m?\\.?/i},Qt={},Kt={};function Jt(t){return t?t.toLowerCase().replace(\"_\",\"-\"):t}function te(e){var r=null;if(!Qt[e]&&t&&t.exports)try{r=Gt._abbr,n(1748)(\"./\"+e),ee(r);}catch(e){}return Qt[e]}function ee(t,e){var n;return t&&((n=s(e)?re(t):ne(t,e))?Gt=n:\"undefined\"!=typeof console&&console.warn&&console.warn(\"Locale \"+t+\" not found. Did you forget to load it?\")),Gt._abbr}function ne(t,e){if(null===e)return delete Qt[t],null;var n,r=Zt;if(e.abbr=t,null!=Qt[t])M(\"defineLocaleOverride\",\"use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info.\"),r=Qt[t]._config;else if(null!=e.parentLocale)if(null!=Qt[e.parentLocale])r=Qt[e.parentLocale]._config;else {if(null==(n=te(e.parentLocale)))return Kt[e.parentLocale]||(Kt[e.parentLocale]=[]),Kt[e.parentLocale].push({name:t,config:e}),null;r=n._config;}return Qt[t]=new D(O(r,e)),Kt[t]&&Kt[t].forEach((function(t){ne(t.name,t.config);})),ee(t),Qt[t]}function re(t){var e;if(t&&t._locale&&t._locale._abbr&&(t=t._locale._abbr),!t)return Gt;if(!a(t)){if(e=te(t))return e;t=[t];}return function(t){for(var e,n,r,i,a=0;a<t.length;){for(e=(i=Jt(t[a]).split(\"-\")).length,n=(n=Jt(t[a+1]))?n.split(\"-\"):null;0<e;){if(r=te(i.slice(0,e).join(\"-\")))return r;if(n&&n.length>=e&&T(i,n,!0)>=e-1)break;e--;}a++;}return Gt}(t)}function ie(t){var e,n=t._a;return n&&-2===p(t).overflow&&(e=n[1]<0||11<n[1]?1:n[2]<1||n[2]>wt(n[0],n[1])?2:n[3]<0||24<n[3]||24===n[3]&&(0!==n[4]||0!==n[5]||0!==n[6])?3:n[4]<0||59<n[4]?4:n[5]<0||59<n[5]?5:n[6]<0||999<n[6]?6:-1,p(t)._overflowDayOfYear&&(e<0||2<e)&&(e=2),p(t)._overflowWeeks&&-1===e&&(e=7),p(t)._overflowWeekday&&-1===e&&(e=8),p(t).overflow=e),t}function ae(t,e,n){return null!=t?t:null!=e?e:n}function oe(t){var e,n,r,a,o,s=[];if(!t._d){var c,l;for(c=t,l=new Date(i.now()),r=c._useUTC?[l.getUTCFullYear(),l.getUTCMonth(),l.getUTCDate()]:[l.getFullYear(),l.getMonth(),l.getDate()],t._w&&null==t._a[2]&&null==t._a[1]&&function(t){var e,n,r,i,a,o,s,c;if(null!=(e=t._w).GG||null!=e.W||null!=e.E)a=1,o=4,n=ae(e.GG,t._a[0],It(_e(),1,4).year),r=ae(e.W,1),((i=ae(e.E,1))<1||7<i)&&(c=!0);else {a=t._locale._week.dow,o=t._locale._week.doy;var l=It(_e(),a,o);n=ae(e.gg,t._a[0],l.year),r=ae(e.w,l.week),null!=e.d?((i=e.d)<0||6<i)&&(c=!0):null!=e.e?(i=e.e+a,(e.e<0||6<e.e)&&(c=!0)):i=a;}r<1||r>Ft(n,a,o)?p(t)._overflowWeeks=!0:null!=c?p(t)._overflowWeekday=!0:(s=Lt(n,r,i,a,o),t._a[0]=s.year,t._dayOfYear=s.dayOfYear);}(t),null!=t._dayOfYear&&(o=ae(t._a[0],r[0]),(t._dayOfYear>yt(o)||0===t._dayOfYear)&&(p(t)._overflowDayOfYear=!0),n=Dt(o,0,t._dayOfYear),t._a[1]=n.getUTCMonth(),t._a[2]=n.getUTCDate()),e=0;e<3&&null==t._a[e];++e)t._a[e]=s[e]=r[e];for(;e<7;e++)t._a[e]=s[e]=null==t._a[e]?2===e?1:0:t._a[e];24===t._a[3]&&0===t._a[4]&&0===t._a[5]&&0===t._a[6]&&(t._nextDay=!0,t._a[3]=0),t._d=(t._useUTC?Dt:function(t,e,n,r,i,a,o){var s;return t<100&&0<=t?(s=new Date(t+400,e,n,r,i,a,o),isFinite(s.getFullYear())&&s.setFullYear(t)):s=new Date(t,e,n,r,i,a,o),s}).apply(null,s),a=t._useUTC?t._d.getUTCDay():t._d.getDay(),null!=t._tzm&&t._d.setUTCMinutes(t._d.getUTCMinutes()-t._tzm),t._nextDay&&(t._a[3]=24),t._w&&void 0!==t._w.d&&t._w.d!==a&&(p(t).weekdayMismatch=!0);}}var se=/^\\s*((?:[+-]\\d{6}|\\d{4})-(?:\\d\\d-\\d\\d|W\\d\\d-\\d|W\\d\\d|\\d\\d\\d|\\d\\d))(?:(T| )(\\d\\d(?::\\d\\d(?::\\d\\d(?:[.,]\\d+)?)?)?)([\\+\\-]\\d\\d(?::?\\d\\d)?|\\s*Z)?)?$/,ce=/^\\s*((?:[+-]\\d{6}|\\d{4})(?:\\d\\d\\d\\d|W\\d\\d\\d|W\\d\\d|\\d\\d\\d|\\d\\d))(?:(T| )(\\d\\d(?:\\d\\d(?:\\d\\d(?:[.,]\\d+)?)?)?)([\\+\\-]\\d\\d(?::?\\d\\d)?|\\s*Z)?)?$/,le=/Z|[+-]\\d\\d(?::?\\d\\d)?/,ue=[[\"YYYYYY-MM-DD\",/[+-]\\d{6}-\\d\\d-\\d\\d/],[\"YYYY-MM-DD\",/\\d{4}-\\d\\d-\\d\\d/],[\"GGGG-[W]WW-E\",/\\d{4}-W\\d\\d-\\d/],[\"GGGG-[W]WW\",/\\d{4}-W\\d\\d/,!1],[\"YYYY-DDD\",/\\d{4}-\\d{3}/],[\"YYYY-MM\",/\\d{4}-\\d\\d/,!1],[\"YYYYYYMMDD\",/[+-]\\d{10}/],[\"YYYYMMDD\",/\\d{8}/],[\"GGGG[W]WWE\",/\\d{4}W\\d{3}/],[\"GGGG[W]WW\",/\\d{4}W\\d{2}/,!1],[\"YYYYDDD\",/\\d{7}/]],he=[[\"HH:mm:ss.SSSS\",/\\d\\d:\\d\\d:\\d\\d\\.\\d+/],[\"HH:mm:ss,SSSS\",/\\d\\d:\\d\\d:\\d\\d,\\d+/],[\"HH:mm:ss\",/\\d\\d:\\d\\d:\\d\\d/],[\"HH:mm\",/\\d\\d:\\d\\d/],[\"HHmmss.SSSS\",/\\d\\d\\d\\d\\d\\d\\.\\d+/],[\"HHmmss,SSSS\",/\\d\\d\\d\\d\\d\\d,\\d+/],[\"HHmmss\",/\\d\\d\\d\\d\\d\\d/],[\"HHmm\",/\\d\\d\\d\\d/],[\"HH\",/\\d\\d/]],fe=/^\\/?Date\\((\\-?\\d+)/i;function de(t){var e,n,r,i,a,o,s=t._i,c=se.exec(s)||ce.exec(s);if(c){for(p(t).iso=!0,e=0,n=ue.length;e<n;e++)if(ue[e][1].exec(c[1])){i=ue[e][0],r=!1!==ue[e][2];break}if(null==i)return void(t._isValid=!1);if(c[3]){for(e=0,n=he.length;e<n;e++)if(he[e][1].exec(c[3])){a=(c[2]||\" \")+he[e][0];break}if(null==a)return void(t._isValid=!1)}if(!r&&null!=a)return void(t._isValid=!1);if(c[4]){if(!le.exec(c[4]))return void(t._isValid=!1);o=\"Z\";}t._f=i+(a||\"\")+(o||\"\"),me(t);}else t._isValid=!1;}var pe=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\\s)?(\\d{1,2})\\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\\s(\\d{2,4})\\s(\\d\\d):(\\d\\d)(?::(\\d\\d))?\\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\\d{4}))$/;var ge={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function ye(t){var e,n,r,i=pe.exec(t._i.replace(/\\([^)]*\\)|[\\n\\t]/g,\" \").replace(/(\\s\\s+)/g,\" \").replace(/^\\s\\s*/,\"\").replace(/\\s\\s*$/,\"\"));if(i){var a=function(t,e,n,r,i,a){var o=[function(t){var e=parseInt(t,10);return e<=49?2e3+e:e<=999?1900+e:e}(t),Ct.indexOf(e),parseInt(n,10),parseInt(r,10),parseInt(i,10)];return a&&o.push(parseInt(a,10)),o}(i[4],i[3],i[2],i[5],i[6],i[7]);if(n=a,r=t,(e=i[1])&&jt.indexOf(e)!==new Date(n[0],n[1],n[2]).getDay()&&(p(r).weekdayMismatch=!0,!(r._isValid=!1)))return;t._a=a,t._tzm=function(t,e,n){if(t)return ge[t];if(e)return 0;var r=parseInt(n,10),i=r%100;return (r-i)/100*60+i}(i[8],i[9],i[10]),t._d=Dt.apply(null,t._a),t._d.setUTCMinutes(t._d.getUTCMinutes()-t._tzm),p(t).rfc2822=!0;}else t._isValid=!1;}function me(t){if(t._f!==i.ISO_8601)if(t._f!==i.RFC_2822){t._a=[],p(t).empty=!0;var e,n,r,a,o,s,c,l,u=\"\"+t._i,f=u.length,d=0;for(r=H(t._f,t._locale).match(z)||[],e=0;e<r.length;e++)a=r[e],(n=(u.match(ht(a,t))||[])[0])&&(0<(o=u.substr(0,u.indexOf(n))).length&&p(t).unusedInput.push(o),u=u.slice(u.indexOf(n)+n.length),d+=n.length),$[a]?(n?p(t).empty=!1:p(t).unusedTokens.push(a),s=a,l=t,null!=(c=n)&&h(dt,s)&&dt[s](c,l._a,l,s)):t._strict&&!n&&p(t).unusedTokens.push(a);p(t).charsLeftOver=f-d,0<u.length&&p(t).unusedInput.push(u),t._a[3]<=12&&!0===p(t).bigHour&&0<t._a[3]&&(p(t).bigHour=void 0),p(t).parsedDateParts=t._a.slice(0),p(t).meridiem=t._meridiem,t._a[3]=function(t,e,n){var r;return null==n?e:null!=t.meridiemHour?t.meridiemHour(e,n):(null!=t.isPM&&((r=t.isPM(n))&&e<12&&(e+=12),r||12!==e||(e=0)),e)}(t._locale,t._a[3],t._meridiem),oe(t),ie(t);}else ye(t);else de(t);}function be(t){var e,n,r,h,d=t._i,m=t._f;return t._locale=t._locale||re(t._l),null===d||void 0===m&&\"\"===d?y({nullInput:!0}):(\"string\"==typeof d&&(t._i=d=t._locale.preparse(d)),x(d)?new _(ie(d)):(l(d)?t._d=d:a(m)?function(t){var e,n,r,i,a;if(0===t._f.length)return p(t).invalidFormat=!0,t._d=new Date(NaN);for(i=0;i<t._f.length;i++)a=0,e=b({},t),null!=t._useUTC&&(e._useUTC=t._useUTC),e._f=t._f[i],me(e),g(e)&&(a+=p(e).charsLeftOver,a+=10*p(e).unusedTokens.length,p(e).score=a,(null==r||a<r)&&(r=a,n=e));f(t,n||e);}(t):m?me(t):s(n=(e=t)._i)?e._d=new Date(i.now()):l(n)?e._d=new Date(n.valueOf()):\"string\"==typeof n?(r=e,null===(h=fe.exec(r._i))?(de(r),!1===r._isValid&&(delete r._isValid,ye(r),!1===r._isValid&&(delete r._isValid,i.createFromInputFallback(r)))):r._d=new Date(+h[1])):a(n)?(e._a=u(n.slice(0),(function(t){return parseInt(t,10)})),oe(e)):o(n)?function(t){if(!t._d){var e=F(t._i);t._a=u([e.year,e.month,e.day||e.date,e.hour,e.minute,e.second,e.millisecond],(function(t){return t&&parseInt(t,10)})),oe(t);}}(e):c(n)?e._d=new Date(n):i.createFromInputFallback(e),g(t)||(t._d=null),t))}function ve(t,e,n,r,i){var s,c={};return !0!==n&&!1!==n||(r=n,n=void 0),(o(t)&&function(t){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(t).length;var e;for(e in t)if(t.hasOwnProperty(e))return !1;return !0}(t)||a(t)&&0===t.length)&&(t=void 0),c._isAMomentObject=!0,c._useUTC=c._isUTC=i,c._l=n,c._i=t,c._f=e,c._strict=r,(s=new _(ie(be(c))))._nextDay&&(s.add(1,\"d\"),s._nextDay=void 0),s}function _e(t,e,n,r){return ve(t,e,n,r,!1)}i.createFromInputFallback=C(\"value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged and will be removed in an upcoming major release. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.\",(function(t){t._d=new Date(t._i+(t._useUTC?\" UTC\":\"\"));})),i.ISO_8601=function(){},i.RFC_2822=function(){};var xe=C(\"moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/\",(function(){var t=_e.apply(null,arguments);return this.isValid()&&t.isValid()?t<this?this:t:y()})),ke=C(\"moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/\",(function(){var t=_e.apply(null,arguments);return this.isValid()&&t.isValid()?this<t?this:t:y()}));function we(t,e){var n,r;if(1===e.length&&a(e[0])&&(e=e[0]),!e.length)return _e();for(n=e[0],r=1;r<e.length;++r)e[r].isValid()&&!e[r][t](n)||(n=e[r]);return n}var Te=[\"year\",\"quarter\",\"month\",\"week\",\"day\",\"hour\",\"minute\",\"second\",\"millisecond\"];function Ee(t){var e=F(t),n=e.year||0,r=e.quarter||0,i=e.month||0,a=e.week||e.isoWeek||0,o=e.day||0,s=e.hour||0,c=e.minute||0,l=e.second||0,u=e.millisecond||0;this._isValid=function(t){for(var e in t)if(-1===bt.call(Te,e)||null!=t[e]&&isNaN(t[e]))return !1;for(var n=!1,r=0;r<Te.length;++r)if(t[Te[r]]){if(n)return !1;parseFloat(t[Te[r]])!==w(t[Te[r]])&&(n=!0);}return !0}(e),this._milliseconds=+u+1e3*l+6e4*c+1e3*s*60*60,this._days=+o+7*a,this._months=+i+3*r+12*n,this._data={},this._locale=re(),this._bubble();}function Ce(t){return t instanceof Ee}function Se(t){return t<0?-1*Math.round(-1*t):Math.round(t)}function Ae(t,e){W(t,0,0,(function(){var t=this.utcOffset(),n=\"+\";return t<0&&(t=-t,n=\"-\"),n+j(~~(t/60),2)+e+j(~~t%60,2)}));}Ae(\"Z\",\":\"),Ae(\"ZZ\",\"\"),ut(\"Z\",st),ut(\"ZZ\",st),pt([\"Z\",\"ZZ\"],(function(t,e,n){n._useUTC=!0,n._tzm=Ne(st,t);}));var Me=/([\\+\\-]|\\d\\d)/gi;function Ne(t,e){var n=(e||\"\").match(t);if(null===n)return null;var r=((n[n.length-1]||[])+\"\").match(Me)||[\"-\",0,0],i=60*r[1]+w(r[2]);return 0===i?0:\"+\"===r[0]?i:-i}function Oe(t,e){var n,r;return e._isUTC?(n=e.clone(),r=(x(t)||l(t)?t.valueOf():_e(t).valueOf())-n.valueOf(),n._d.setTime(n._d.valueOf()+r),i.updateOffset(n,!1),n):_e(t).local()}function De(t){return 15*-Math.round(t._d.getTimezoneOffset()/15)}function Be(){return !!this.isValid()&&this._isUTC&&0===this._offset}i.updateOffset=function(){};var Le=/^(\\-|\\+)?(?:(\\d*)[. ])?(\\d+)\\:(\\d+)(?:\\:(\\d+)(\\.\\d*)?)?$/,Ie=/^(-|\\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function Fe(t,e){var n,r,i,a=t,o=null;return Ce(t)?a={ms:t._milliseconds,d:t._days,M:t._months}:c(t)?(a={},e?a[e]=t:a.milliseconds=t):(o=Le.exec(t))?(n=\"-\"===o[1]?-1:1,a={y:0,d:w(o[2])*n,h:w(o[3])*n,m:w(o[4])*n,s:w(o[5])*n,ms:w(Se(1e3*o[6]))*n}):(o=Ie.exec(t))?(n=\"-\"===o[1]?-1:1,a={y:Re(o[2],n),M:Re(o[3],n),w:Re(o[4],n),d:Re(o[5],n),h:Re(o[6],n),m:Re(o[7],n),s:Re(o[8],n)}):null==a?a={}:\"object\"==typeof a&&(\"from\"in a||\"to\"in a)&&(i=function(t,e){var n;return t.isValid()&&e.isValid()?(e=Oe(e,t),t.isBefore(e)?n=Pe(t,e):((n=Pe(e,t)).milliseconds=-n.milliseconds,n.months=-n.months),n):{milliseconds:0,months:0}}(_e(a.from),_e(a.to)),(a={}).ms=i.milliseconds,a.M=i.months),r=new Ee(a),Ce(t)&&h(t,\"_locale\")&&(r._locale=t._locale),r}function Re(t,e){var n=t&&parseFloat(t.replace(\",\",\".\"));return (isNaN(n)?0:n)*e}function Pe(t,e){var n={};return n.months=e.month()-t.month()+12*(e.year()-t.year()),t.clone().add(n.months,\"M\").isAfter(e)&&--n.months,n.milliseconds=+e-+t.clone().add(n.months,\"M\"),n}function je(t,e){return function(n,r){var i;return null===r||isNaN(+r)||(M(e,\"moment().\"+e+\"(period, number) is deprecated. Please use moment().\"+e+\"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.\"),i=n,n=r,r=i),ze(this,Fe(n=\"string\"==typeof n?+n:n,r),t),this}}function ze(t,e,n,r){var a=e._milliseconds,o=Se(e._days),s=Se(e._months);t.isValid()&&(r=null==r||r,s&&St(t,xt(t,\"Month\")+s*n),o&&kt(t,\"Date\",xt(t,\"Date\")+o*n),a&&t._d.setTime(t._d.valueOf()+a*n),r&&i.updateOffset(t,o||s));}Fe.fn=Ee.prototype,Fe.invalid=function(){return Fe(NaN)};var Ye=je(1,\"add\"),Ue=je(-1,\"subtract\");function $e(t,e){var n=12*(e.year()-t.year())+(e.month()-t.month()),r=t.clone().add(n,\"months\");return -(n+(e-r<0?(e-r)/(r-t.clone().add(n-1,\"months\")):(e-r)/(t.clone().add(n+1,\"months\")-r)))||0}function We(t){var e;return void 0===t?this._locale._abbr:(null!=(e=re(t))&&(this._locale=e),this)}i.defaultFormat=\"YYYY-MM-DDTHH:mm:ssZ\",i.defaultFormatUtc=\"YYYY-MM-DDTHH:mm:ss[Z]\";var qe=C(\"moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.\",(function(t){return void 0===t?this.localeData():this.locale(t)}));function He(){return this._locale}var Ve=126227808e5;function Ge(t,e){return (t%e+e)%e}function Xe(t,e,n){return t<100&&0<=t?new Date(t+400,e,n)-Ve:new Date(t,e,n).valueOf()}function Ze(t,e,n){return t<100&&0<=t?Date.UTC(t+400,e,n)-Ve:Date.UTC(t,e,n)}function Qe(t,e){W(0,[t,t.length],0,e);}function Ke(t,e,n,r,i){var a;return null==t?It(this,r,i).year:((a=Ft(t,r,i))<e&&(e=a),function(t,e,n,r,i){var a=Lt(t,e,n,r,i),o=Dt(a.year,0,a.dayOfYear);return this.year(o.getUTCFullYear()),this.month(o.getUTCMonth()),this.date(o.getUTCDate()),this}.call(this,t,e,n,r,i))}W(0,[\"gg\",2],0,(function(){return this.weekYear()%100})),W(0,[\"GG\",2],0,(function(){return this.isoWeekYear()%100})),Qe(\"gggg\",\"weekYear\"),Qe(\"ggggg\",\"weekYear\"),Qe(\"GGGG\",\"isoWeekYear\"),Qe(\"GGGGG\",\"isoWeekYear\"),L(\"weekYear\",\"gg\"),L(\"isoWeekYear\",\"GG\"),P(\"weekYear\",1),P(\"isoWeekYear\",1),ut(\"G\",at),ut(\"g\",at),ut(\"GG\",K,G),ut(\"gg\",K,G),ut(\"GGGG\",nt,Z),ut(\"gggg\",nt,Z),ut(\"GGGGG\",rt,Q),ut(\"ggggg\",rt,Q),gt([\"gggg\",\"ggggg\",\"GGGG\",\"GGGGG\"],(function(t,e,n,r){e[r.substr(0,2)]=w(t);})),gt([\"gg\",\"GG\"],(function(t,e,n,r){e[r]=i.parseTwoDigitYear(t);})),W(\"Q\",0,\"Qo\",\"quarter\"),L(\"quarter\",\"Q\"),P(\"quarter\",7),ut(\"Q\",V),pt(\"Q\",(function(t,e){e[1]=3*(w(t)-1);})),W(\"D\",[\"DD\",2],\"Do\",\"date\"),L(\"date\",\"D\"),P(\"date\",9),ut(\"D\",K),ut(\"DD\",K,G),ut(\"Do\",(function(t,e){return t?e._dayOfMonthOrdinalParse||e._ordinalParse:e._dayOfMonthOrdinalParseLenient})),pt([\"D\",\"DD\"],2),pt(\"Do\",(function(t,e){e[2]=w(t.match(K)[0]);}));var Je=_t(\"Date\",!0);W(\"DDD\",[\"DDDD\",3],\"DDDo\",\"dayOfYear\"),L(\"dayOfYear\",\"DDD\"),P(\"dayOfYear\",4),ut(\"DDD\",et),ut(\"DDDD\",X),pt([\"DDD\",\"DDDD\"],(function(t,e,n){n._dayOfYear=w(t);})),W(\"m\",[\"mm\",2],0,\"minute\"),L(\"minute\",\"m\"),P(\"minute\",14),ut(\"m\",K),ut(\"mm\",K,G),pt([\"m\",\"mm\"],4);var tn=_t(\"Minutes\",!1);W(\"s\",[\"ss\",2],0,\"second\"),L(\"second\",\"s\"),P(\"second\",15),ut(\"s\",K),ut(\"ss\",K,G),pt([\"s\",\"ss\"],5);var en,nn=_t(\"Seconds\",!1);for(W(\"S\",0,0,(function(){return ~~(this.millisecond()/100)})),W(0,[\"SS\",2],0,(function(){return ~~(this.millisecond()/10)})),W(0,[\"SSS\",3],0,\"millisecond\"),W(0,[\"SSSS\",4],0,(function(){return 10*this.millisecond()})),W(0,[\"SSSSS\",5],0,(function(){return 100*this.millisecond()})),W(0,[\"SSSSSS\",6],0,(function(){return 1e3*this.millisecond()})),W(0,[\"SSSSSSS\",7],0,(function(){return 1e4*this.millisecond()})),W(0,[\"SSSSSSSS\",8],0,(function(){return 1e5*this.millisecond()})),W(0,[\"SSSSSSSSS\",9],0,(function(){return 1e6*this.millisecond()})),L(\"millisecond\",\"ms\"),P(\"millisecond\",16),ut(\"S\",et,V),ut(\"SS\",et,G),ut(\"SSS\",et,X),en=\"SSSS\";en.length<=9;en+=\"S\")ut(en,it);function rn(t,e){e[6]=w(1e3*(\"0.\"+t));}for(en=\"S\";en.length<=9;en+=\"S\")pt(en,rn);var an=_t(\"Milliseconds\",!1);W(\"z\",0,0,\"zoneAbbr\"),W(\"zz\",0,0,\"zoneName\");var on=_.prototype;function sn(t){return t}on.add=Ye,on.calendar=function(t,e){var n=t||_e(),r=Oe(n,this).startOf(\"day\"),a=i.calendarFormat(this,r)||\"sameElse\",o=e&&(N(e[a])?e[a].call(this,n):e[a]);return this.format(o||this.localeData().calendar(a,this,_e(n)))},on.clone=function(){return new _(this)},on.diff=function(t,e,n){var r,i,a;if(!this.isValid())return NaN;if(!(r=Oe(t,this)).isValid())return NaN;switch(i=6e4*(r.utcOffset()-this.utcOffset()),e=I(e)){case\"year\":a=$e(this,r)/12;break;case\"month\":a=$e(this,r);break;case\"quarter\":a=$e(this,r)/3;break;case\"second\":a=(this-r)/1e3;break;case\"minute\":a=(this-r)/6e4;break;case\"hour\":a=(this-r)/36e5;break;case\"day\":a=(this-r-i)/864e5;break;case\"week\":a=(this-r-i)/6048e5;break;default:a=this-r;}return n?a:k(a)},on.endOf=function(t){var e;if(void 0===(t=I(t))||\"millisecond\"===t||!this.isValid())return this;var n=this._isUTC?Ze:Xe;switch(t){case\"year\":e=n(this.year()+1,0,1)-1;break;case\"quarter\":e=n(this.year(),this.month()-this.month()%3+3,1)-1;break;case\"month\":e=n(this.year(),this.month()+1,1)-1;break;case\"week\":e=n(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case\"isoWeek\":e=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case\"day\":case\"date\":e=n(this.year(),this.month(),this.date()+1)-1;break;case\"hour\":e=this._d.valueOf(),e+=36e5-Ge(e+(this._isUTC?0:6e4*this.utcOffset()),36e5)-1;break;case\"minute\":e=this._d.valueOf(),e+=6e4-Ge(e,6e4)-1;break;case\"second\":e=this._d.valueOf(),e+=1e3-Ge(e,1e3)-1;}return this._d.setTime(e),i.updateOffset(this,!0),this},on.format=function(t){t||(t=this.isUtc()?i.defaultFormatUtc:i.defaultFormat);var e=q(this,t);return this.localeData().postformat(e)},on.from=function(t,e){return this.isValid()&&(x(t)&&t.isValid()||_e(t).isValid())?Fe({to:this,from:t}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()},on.fromNow=function(t){return this.from(_e(),t)},on.to=function(t,e){return this.isValid()&&(x(t)&&t.isValid()||_e(t).isValid())?Fe({from:this,to:t}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()},on.toNow=function(t){return this.to(_e(),t)},on.get=function(t){return N(this[t=I(t)])?this[t]():this},on.invalidAt=function(){return p(this).overflow},on.isAfter=function(t,e){var n=x(t)?t:_e(t);return !(!this.isValid()||!n.isValid())&&(\"millisecond\"===(e=I(e)||\"millisecond\")?this.valueOf()>n.valueOf():n.valueOf()<this.clone().startOf(e).valueOf())},on.isBefore=function(t,e){var n=x(t)?t:_e(t);return !(!this.isValid()||!n.isValid())&&(\"millisecond\"===(e=I(e)||\"millisecond\")?this.valueOf()<n.valueOf():this.clone().endOf(e).valueOf()<n.valueOf())},on.isBetween=function(t,e,n,r){var i=x(t)?t:_e(t),a=x(e)?e:_e(e);return !!(this.isValid()&&i.isValid()&&a.isValid())&&(\"(\"===(r=r||\"()\")[0]?this.isAfter(i,n):!this.isBefore(i,n))&&(\")\"===r[1]?this.isBefore(a,n):!this.isAfter(a,n))},on.isSame=function(t,e){var n,r=x(t)?t:_e(t);return !(!this.isValid()||!r.isValid())&&(\"millisecond\"===(e=I(e)||\"millisecond\")?this.valueOf()===r.valueOf():(n=r.valueOf(),this.clone().startOf(e).valueOf()<=n&&n<=this.clone().endOf(e).valueOf()))},on.isSameOrAfter=function(t,e){return this.isSame(t,e)||this.isAfter(t,e)},on.isSameOrBefore=function(t,e){return this.isSame(t,e)||this.isBefore(t,e)},on.isValid=function(){return g(this)},on.lang=qe,on.locale=We,on.localeData=He,on.max=ke,on.min=xe,on.parsingFlags=function(){return f({},p(this))},on.set=function(t,e){if(\"object\"==typeof t)for(var n=function(t){var e=[];for(var n in t)e.push({unit:n,priority:R[n]});return e.sort((function(t,e){return t.priority-e.priority})),e}(t=F(t)),r=0;r<n.length;r++)this[n[r].unit](t[n[r].unit]);else if(N(this[t=I(t)]))return this[t](e);return this},on.startOf=function(t){var e;if(void 0===(t=I(t))||\"millisecond\"===t||!this.isValid())return this;var n=this._isUTC?Ze:Xe;switch(t){case\"year\":e=n(this.year(),0,1);break;case\"quarter\":e=n(this.year(),this.month()-this.month()%3,1);break;case\"month\":e=n(this.year(),this.month(),1);break;case\"week\":e=n(this.year(),this.month(),this.date()-this.weekday());break;case\"isoWeek\":e=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case\"day\":case\"date\":e=n(this.year(),this.month(),this.date());break;case\"hour\":e=this._d.valueOf(),e-=Ge(e+(this._isUTC?0:6e4*this.utcOffset()),36e5);break;case\"minute\":e=this._d.valueOf(),e-=Ge(e,6e4);break;case\"second\":e=this._d.valueOf(),e-=Ge(e,1e3);}return this._d.setTime(e),i.updateOffset(this,!0),this},on.subtract=Ue,on.toArray=function(){var t=this;return [t.year(),t.month(),t.date(),t.hour(),t.minute(),t.second(),t.millisecond()]},on.toObject=function(){var t=this;return {years:t.year(),months:t.month(),date:t.date(),hours:t.hours(),minutes:t.minutes(),seconds:t.seconds(),milliseconds:t.milliseconds()}},on.toDate=function(){return new Date(this.valueOf())},on.toISOString=function(t){if(!this.isValid())return null;var e=!0!==t,n=e?this.clone().utc():this;return n.year()<0||9999<n.year()?q(n,e?\"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]\":\"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ\"):N(Date.prototype.toISOString)?e?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace(\"Z\",q(n,\"Z\")):q(n,e?\"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]\":\"YYYY-MM-DD[T]HH:mm:ss.SSSZ\")},on.inspect=function(){if(!this.isValid())return \"moment.invalid(/* \"+this._i+\" */)\";var t=\"moment\",e=\"\";this.isLocal()||(t=0===this.utcOffset()?\"moment.utc\":\"moment.parseZone\",e=\"Z\");var n=\"[\"+t+'(\"]',r=0<=this.year()&&this.year()<=9999?\"YYYY\":\"YYYYYY\",i=e+'[\")]';return this.format(n+r+\"-MM-DD[T]HH:mm:ss.SSS\"+i)},on.toJSON=function(){return this.isValid()?this.toISOString():null},on.toString=function(){return this.clone().locale(\"en\").format(\"ddd MMM DD YYYY HH:mm:ss [GMT]ZZ\")},on.unix=function(){return Math.floor(this.valueOf()/1e3)},on.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)},on.creationData=function(){return {input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},on.year=vt,on.isLeapYear=function(){return mt(this.year())},on.weekYear=function(t){return Ke.call(this,t,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)},on.isoWeekYear=function(t){return Ke.call(this,t,this.isoWeek(),this.isoWeekday(),1,4)},on.quarter=on.quarters=function(t){return null==t?Math.ceil((this.month()+1)/3):this.month(3*(t-1)+this.month()%3)},on.month=At,on.daysInMonth=function(){return wt(this.year(),this.month())},on.week=on.weeks=function(t){var e=this.localeData().week(this);return null==t?e:this.add(7*(t-e),\"d\")},on.isoWeek=on.isoWeeks=function(t){var e=It(this,1,4).week;return null==t?e:this.add(7*(t-e),\"d\")},on.weeksInYear=function(){var t=this.localeData()._week;return Ft(this.year(),t.dow,t.doy)},on.isoWeeksInYear=function(){return Ft(this.year(),1,4)},on.date=Je,on.day=on.days=function(t){if(!this.isValid())return null!=t?this:NaN;var e,n,r=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=t?(e=t,n=this.localeData(),t=\"string\"!=typeof e?e:isNaN(e)?\"number\"==typeof(e=n.weekdaysParse(e))?e:null:parseInt(e,10),this.add(t-r,\"d\")):r},on.weekday=function(t){if(!this.isValid())return null!=t?this:NaN;var e=(this.day()+7-this.localeData()._week.dow)%7;return null==t?e:this.add(t-e,\"d\")},on.isoWeekday=function(t){if(!this.isValid())return null!=t?this:NaN;if(null==t)return this.day()||7;var e,n,r=(e=t,n=this.localeData(),\"string\"==typeof e?n.weekdaysParse(e)%7||7:isNaN(e)?null:e);return this.day(this.day()%7?r:r-7)},on.dayOfYear=function(t){var e=Math.round((this.clone().startOf(\"day\")-this.clone().startOf(\"year\"))/864e5)+1;return null==t?e:this.add(t-e,\"d\")},on.hour=on.hours=Xt,on.minute=on.minutes=tn,on.second=on.seconds=nn,on.millisecond=on.milliseconds=an,on.utcOffset=function(t,e,n){var r,a=this._offset||0;if(!this.isValid())return null!=t?this:NaN;if(null==t)return this._isUTC?a:De(this);if(\"string\"==typeof t){if(null===(t=Ne(st,t)))return this}else Math.abs(t)<16&&!n&&(t*=60);return !this._isUTC&&e&&(r=De(this)),this._offset=t,this._isUTC=!0,null!=r&&this.add(r,\"m\"),a!==t&&(!e||this._changeInProgress?ze(this,Fe(t-a,\"m\"),1,!1):this._changeInProgress||(this._changeInProgress=!0,i.updateOffset(this,!0),this._changeInProgress=null)),this},on.utc=function(t){return this.utcOffset(0,t)},on.local=function(t){return this._isUTC&&(this.utcOffset(0,t),this._isUTC=!1,t&&this.subtract(De(this),\"m\")),this},on.parseZone=function(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,!0);else if(\"string\"==typeof this._i){var t=Ne(ot,this._i);null!=t?this.utcOffset(t):this.utcOffset(0,!0);}return this},on.hasAlignedHourOffset=function(t){return !!this.isValid()&&(t=t?_e(t).utcOffset():0,(this.utcOffset()-t)%60==0)},on.isDST=function(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},on.isLocal=function(){return !!this.isValid()&&!this._isUTC},on.isUtcOffset=function(){return !!this.isValid()&&this._isUTC},on.isUtc=Be,on.isUTC=Be,on.zoneAbbr=function(){return this._isUTC?\"UTC\":\"\"},on.zoneName=function(){return this._isUTC?\"Coordinated Universal Time\":\"\"},on.dates=C(\"dates accessor is deprecated. Use date instead.\",Je),on.months=C(\"months accessor is deprecated. Use month instead\",At),on.years=C(\"years accessor is deprecated. Use year instead\",vt),on.zone=C(\"moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/\",(function(t,e){return null!=t?(\"string\"!=typeof t&&(t=-t),this.utcOffset(t,e),this):-this.utcOffset()})),on.isDSTShifted=C(\"isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information\",(function(){if(!s(this._isDSTShifted))return this._isDSTShifted;var t={};if(b(t,this),(t=be(t))._a){var e=t._isUTC?d(t._a):_e(t._a);this._isDSTShifted=this.isValid()&&0<T(t._a,e.toArray());}else this._isDSTShifted=!1;return this._isDSTShifted}));var cn=D.prototype;function ln(t,e,n,r){var i=re(),a=d().set(r,e);return i[n](a,t)}function un(t,e,n){if(c(t)&&(e=t,t=void 0),t=t||\"\",null!=e)return ln(t,e,n,\"month\");var r,i=[];for(r=0;r<12;r++)i[r]=ln(t,r,n,\"month\");return i}function hn(t,e,n,r){\"boolean\"==typeof t?c(e)&&(n=e,e=void 0):(e=t,t=!1,c(n=e)&&(n=e,e=void 0)),e=e||\"\";var i,a=re(),o=t?a._week.dow:0;if(null!=n)return ln(e,(n+o)%7,r,\"day\");var s=[];for(i=0;i<7;i++)s[i]=ln(e,(i+o)%7,r,\"day\");return s}cn.calendar=function(t,e,n){var r=this._calendar[t]||this._calendar.sameElse;return N(r)?r.call(e,n):r},cn.longDateFormat=function(t){var e=this._longDateFormat[t],n=this._longDateFormat[t.toUpperCase()];return e||!n?e:(this._longDateFormat[t]=n.replace(/MMMM|MM|DD|dddd/g,(function(t){return t.slice(1)})),this._longDateFormat[t])},cn.invalidDate=function(){return this._invalidDate},cn.ordinal=function(t){return this._ordinal.replace(\"%d\",t)},cn.preparse=sn,cn.postformat=sn,cn.relativeTime=function(t,e,n,r){var i=this._relativeTime[n];return N(i)?i(t,e,n,r):i.replace(/%d/i,t)},cn.pastFuture=function(t,e){var n=this._relativeTime[0<t?\"future\":\"past\"];return N(n)?n(e):n.replace(/%s/i,e)},cn.set=function(t){var e,n;for(n in t)N(e=t[n])?this[n]=e:this[\"_\"+n]=e;this._config=t,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+\"|\"+/\\d{1,2}/.source);},cn.months=function(t,e){return t?a(this._months)?this._months[t.month()]:this._months[(this._months.isFormat||Tt).test(e)?\"format\":\"standalone\"][t.month()]:a(this._months)?this._months:this._months.standalone},cn.monthsShort=function(t,e){return t?a(this._monthsShort)?this._monthsShort[t.month()]:this._monthsShort[Tt.test(e)?\"format\":\"standalone\"][t.month()]:a(this._monthsShort)?this._monthsShort:this._monthsShort.standalone},cn.monthsParse=function(t,e,n){var r,i,a;if(this._monthsParseExact)return function(t,e,n){var r,i,a,o=t.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],r=0;r<12;++r)a=d([2e3,r]),this._shortMonthsParse[r]=this.monthsShort(a,\"\").toLocaleLowerCase(),this._longMonthsParse[r]=this.months(a,\"\").toLocaleLowerCase();return n?\"MMM\"===e?-1!==(i=bt.call(this._shortMonthsParse,o))?i:null:-1!==(i=bt.call(this._longMonthsParse,o))?i:null:\"MMM\"===e?-1!==(i=bt.call(this._shortMonthsParse,o))||-1!==(i=bt.call(this._longMonthsParse,o))?i:null:-1!==(i=bt.call(this._longMonthsParse,o))||-1!==(i=bt.call(this._shortMonthsParse,o))?i:null}.call(this,t,e,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),r=0;r<12;r++){if(i=d([2e3,r]),n&&!this._longMonthsParse[r]&&(this._longMonthsParse[r]=new RegExp(\"^\"+this.months(i,\"\").replace(\".\",\"\")+\"$\",\"i\"),this._shortMonthsParse[r]=new RegExp(\"^\"+this.monthsShort(i,\"\").replace(\".\",\"\")+\"$\",\"i\")),n||this._monthsParse[r]||(a=\"^\"+this.months(i,\"\")+\"|^\"+this.monthsShort(i,\"\"),this._monthsParse[r]=new RegExp(a.replace(\".\",\"\"),\"i\")),n&&\"MMMM\"===e&&this._longMonthsParse[r].test(t))return r;if(n&&\"MMM\"===e&&this._shortMonthsParse[r].test(t))return r;if(!n&&this._monthsParse[r].test(t))return r}},cn.monthsRegex=function(t){return this._monthsParseExact?(h(this,\"_monthsRegex\")||Ot.call(this),t?this._monthsStrictRegex:this._monthsRegex):(h(this,\"_monthsRegex\")||(this._monthsRegex=Nt),this._monthsStrictRegex&&t?this._monthsStrictRegex:this._monthsRegex)},cn.monthsShortRegex=function(t){return this._monthsParseExact?(h(this,\"_monthsRegex\")||Ot.call(this),t?this._monthsShortStrictRegex:this._monthsShortRegex):(h(this,\"_monthsShortRegex\")||(this._monthsShortRegex=Mt),this._monthsShortStrictRegex&&t?this._monthsShortStrictRegex:this._monthsShortRegex)},cn.week=function(t){return It(t,this._week.dow,this._week.doy).week},cn.firstDayOfYear=function(){return this._week.doy},cn.firstDayOfWeek=function(){return this._week.dow},cn.weekdays=function(t,e){var n=a(this._weekdays)?this._weekdays:this._weekdays[t&&!0!==t&&this._weekdays.isFormat.test(e)?\"format\":\"standalone\"];return !0===t?Rt(n,this._week.dow):t?n[t.day()]:n},cn.weekdaysMin=function(t){return !0===t?Rt(this._weekdaysMin,this._week.dow):t?this._weekdaysMin[t.day()]:this._weekdaysMin},cn.weekdaysShort=function(t){return !0===t?Rt(this._weekdaysShort,this._week.dow):t?this._weekdaysShort[t.day()]:this._weekdaysShort},cn.weekdaysParse=function(t,e,n){var r,i,a;if(this._weekdaysParseExact)return function(t,e,n){var r,i,a,o=t.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],r=0;r<7;++r)a=d([2e3,1]).day(r),this._minWeekdaysParse[r]=this.weekdaysMin(a,\"\").toLocaleLowerCase(),this._shortWeekdaysParse[r]=this.weekdaysShort(a,\"\").toLocaleLowerCase(),this._weekdaysParse[r]=this.weekdays(a,\"\").toLocaleLowerCase();return n?\"dddd\"===e?-1!==(i=bt.call(this._weekdaysParse,o))?i:null:\"ddd\"===e?-1!==(i=bt.call(this._shortWeekdaysParse,o))?i:null:-1!==(i=bt.call(this._minWeekdaysParse,o))?i:null:\"dddd\"===e?-1!==(i=bt.call(this._weekdaysParse,o))||-1!==(i=bt.call(this._shortWeekdaysParse,o))||-1!==(i=bt.call(this._minWeekdaysParse,o))?i:null:\"ddd\"===e?-1!==(i=bt.call(this._shortWeekdaysParse,o))||-1!==(i=bt.call(this._weekdaysParse,o))||-1!==(i=bt.call(this._minWeekdaysParse,o))?i:null:-1!==(i=bt.call(this._minWeekdaysParse,o))||-1!==(i=bt.call(this._weekdaysParse,o))||-1!==(i=bt.call(this._shortWeekdaysParse,o))?i:null}.call(this,t,e,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),r=0;r<7;r++){if(i=d([2e3,1]).day(r),n&&!this._fullWeekdaysParse[r]&&(this._fullWeekdaysParse[r]=new RegExp(\"^\"+this.weekdays(i,\"\").replace(\".\",\"\\\\.?\")+\"$\",\"i\"),this._shortWeekdaysParse[r]=new RegExp(\"^\"+this.weekdaysShort(i,\"\").replace(\".\",\"\\\\.?\")+\"$\",\"i\"),this._minWeekdaysParse[r]=new RegExp(\"^\"+this.weekdaysMin(i,\"\").replace(\".\",\"\\\\.?\")+\"$\",\"i\")),this._weekdaysParse[r]||(a=\"^\"+this.weekdays(i,\"\")+\"|^\"+this.weekdaysShort(i,\"\")+\"|^\"+this.weekdaysMin(i,\"\"),this._weekdaysParse[r]=new RegExp(a.replace(\".\",\"\"),\"i\")),n&&\"dddd\"===e&&this._fullWeekdaysParse[r].test(t))return r;if(n&&\"ddd\"===e&&this._shortWeekdaysParse[r].test(t))return r;if(n&&\"dd\"===e&&this._minWeekdaysParse[r].test(t))return r;if(!n&&this._weekdaysParse[r].test(t))return r}},cn.weekdaysRegex=function(t){return this._weekdaysParseExact?(h(this,\"_weekdaysRegex\")||Wt.call(this),t?this._weekdaysStrictRegex:this._weekdaysRegex):(h(this,\"_weekdaysRegex\")||(this._weekdaysRegex=Yt),this._weekdaysStrictRegex&&t?this._weekdaysStrictRegex:this._weekdaysRegex)},cn.weekdaysShortRegex=function(t){return this._weekdaysParseExact?(h(this,\"_weekdaysRegex\")||Wt.call(this),t?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(h(this,\"_weekdaysShortRegex\")||(this._weekdaysShortRegex=Ut),this._weekdaysShortStrictRegex&&t?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)},cn.weekdaysMinRegex=function(t){return this._weekdaysParseExact?(h(this,\"_weekdaysRegex\")||Wt.call(this),t?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(h(this,\"_weekdaysMinRegex\")||(this._weekdaysMinRegex=$t),this._weekdaysMinStrictRegex&&t?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)},cn.isPM=function(t){return \"p\"===(t+\"\").toLowerCase().charAt(0)},cn.meridiem=function(t,e,n){return 11<t?n?\"pm\":\"PM\":n?\"am\":\"AM\"},ee(\"en\",{dayOfMonthOrdinalParse:/\\d{1,2}(th|st|nd|rd)/,ordinal:function(t){var e=t%10;return t+(1===w(t%100/10)?\"th\":1===e?\"st\":2===e?\"nd\":3===e?\"rd\":\"th\")}}),i.lang=C(\"moment.lang is deprecated. Use moment.locale instead.\",ee),i.langData=C(\"moment.langData is deprecated. Use moment.localeData instead.\",re);var fn=Math.abs;function dn(t,e,n,r){var i=Fe(e,n);return t._milliseconds+=r*i._milliseconds,t._days+=r*i._days,t._months+=r*i._months,t._bubble()}function pn(t){return t<0?Math.floor(t):Math.ceil(t)}function gn(t){return 4800*t/146097}function yn(t){return 146097*t/4800}function mn(t){return function(){return this.as(t)}}var bn=mn(\"ms\"),vn=mn(\"s\"),_n=mn(\"m\"),xn=mn(\"h\"),kn=mn(\"d\"),wn=mn(\"w\"),Tn=mn(\"M\"),En=mn(\"Q\"),Cn=mn(\"y\");function Sn(t){return function(){return this.isValid()?this._data[t]:NaN}}var An=Sn(\"milliseconds\"),Mn=Sn(\"seconds\"),Nn=Sn(\"minutes\"),On=Sn(\"hours\"),Dn=Sn(\"days\"),Bn=Sn(\"months\"),Ln=Sn(\"years\"),In=Math.round,Fn={ss:44,s:45,m:45,h:22,d:26,M:11},Rn=Math.abs;function Pn(t){return (0<t)-(t<0)||+t}function jn(){if(!this.isValid())return this.localeData().invalidDate();var t,e,n=Rn(this._milliseconds)/1e3,r=Rn(this._days),i=Rn(this._months);e=k((t=k(n/60))/60),n%=60,t%=60;var a=k(i/12),o=i%=12,s=r,c=e,l=t,u=n?n.toFixed(3).replace(/\\.?0+$/,\"\"):\"\",h=this.asSeconds();if(!h)return \"P0D\";var f=h<0?\"-\":\"\",d=Pn(this._months)!==Pn(h)?\"-\":\"\",p=Pn(this._days)!==Pn(h)?\"-\":\"\",g=Pn(this._milliseconds)!==Pn(h)?\"-\":\"\";return f+\"P\"+(a?d+a+\"Y\":\"\")+(o?d+o+\"M\":\"\")+(s?p+s+\"D\":\"\")+(c||l||u?\"T\":\"\")+(c?g+c+\"H\":\"\")+(l?g+l+\"M\":\"\")+(u?g+u+\"S\":\"\")}var zn=Ee.prototype;return zn.isValid=function(){return this._isValid},zn.abs=function(){var t=this._data;return this._milliseconds=fn(this._milliseconds),this._days=fn(this._days),this._months=fn(this._months),t.milliseconds=fn(t.milliseconds),t.seconds=fn(t.seconds),t.minutes=fn(t.minutes),t.hours=fn(t.hours),t.months=fn(t.months),t.years=fn(t.years),this},zn.add=function(t,e){return dn(this,t,e,1)},zn.subtract=function(t,e){return dn(this,t,e,-1)},zn.as=function(t){if(!this.isValid())return NaN;var e,n,r=this._milliseconds;if(\"month\"===(t=I(t))||\"quarter\"===t||\"year\"===t)switch(e=this._days+r/864e5,n=this._months+gn(e),t){case\"month\":return n;case\"quarter\":return n/3;case\"year\":return n/12}else switch(e=this._days+Math.round(yn(this._months)),t){case\"week\":return e/7+r/6048e5;case\"day\":return e+r/864e5;case\"hour\":return 24*e+r/36e5;case\"minute\":return 1440*e+r/6e4;case\"second\":return 86400*e+r/1e3;case\"millisecond\":return Math.floor(864e5*e)+r;default:throw new Error(\"Unknown unit \"+t)}},zn.asMilliseconds=bn,zn.asSeconds=vn,zn.asMinutes=_n,zn.asHours=xn,zn.asDays=kn,zn.asWeeks=wn,zn.asMonths=Tn,zn.asQuarters=En,zn.asYears=Cn,zn.valueOf=function(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*w(this._months/12):NaN},zn._bubble=function(){var t,e,n,r,i,a=this._milliseconds,o=this._days,s=this._months,c=this._data;return 0<=a&&0<=o&&0<=s||a<=0&&o<=0&&s<=0||(a+=864e5*pn(yn(s)+o),s=o=0),c.milliseconds=a%1e3,t=k(a/1e3),c.seconds=t%60,e=k(t/60),c.minutes=e%60,n=k(e/60),c.hours=n%24,s+=i=k(gn(o+=k(n/24))),o-=pn(yn(i)),r=k(s/12),s%=12,c.days=o,c.months=s,c.years=r,this},zn.clone=function(){return Fe(this)},zn.get=function(t){return t=I(t),this.isValid()?this[t+\"s\"]():NaN},zn.milliseconds=An,zn.seconds=Mn,zn.minutes=Nn,zn.hours=On,zn.days=Dn,zn.weeks=function(){return k(this.days()/7)},zn.months=Bn,zn.years=Ln,zn.humanize=function(t){if(!this.isValid())return this.localeData().invalidDate();var e,n,r,i,a,o,s,c,l,u,h=this.localeData(),f=(e=!t,n=h,r=Fe(this).abs(),i=In(r.as(\"s\")),a=In(r.as(\"m\")),o=In(r.as(\"h\")),s=In(r.as(\"d\")),c=In(r.as(\"M\")),l=In(r.as(\"y\")),(u=i<=Fn.ss&&[\"s\",i]||i<Fn.s&&[\"ss\",i]||a<=1&&[\"m\"]||a<Fn.m&&[\"mm\",a]||o<=1&&[\"h\"]||o<Fn.h&&[\"hh\",o]||s<=1&&[\"d\"]||s<Fn.d&&[\"dd\",s]||c<=1&&[\"M\"]||c<Fn.M&&[\"MM\",c]||l<=1&&[\"y\"]||[\"yy\",l])[2]=e,u[3]=0<+this,u[4]=n,function(t,e,n,r,i){return i.relativeTime(e||1,!!n,t,r)}.apply(null,u));return t&&(f=h.pastFuture(+this,f)),h.postformat(f)},zn.toISOString=jn,zn.toString=jn,zn.toJSON=jn,zn.locale=We,zn.localeData=He,zn.toIsoString=C(\"toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)\",jn),zn.lang=qe,W(\"X\",0,0,\"unix\"),W(\"x\",0,0,\"valueOf\"),ut(\"x\",at),ut(\"X\",/[+-]?\\d+(\\.\\d{1,3})?/),pt(\"X\",(function(t,e,n){n._d=new Date(1e3*parseFloat(t,10));})),pt(\"x\",(function(t,e,n){n._d=new Date(w(t));})),i.version=\"2.24.0\",e=_e,i.fn=on,i.min=function(){return we(\"isBefore\",[].slice.call(arguments,0))},i.max=function(){return we(\"isAfter\",[].slice.call(arguments,0))},i.now=function(){return Date.now?Date.now():+new Date},i.utc=d,i.unix=function(t){return _e(1e3*t)},i.months=function(t,e){return un(t,e,\"months\")},i.isDate=l,i.locale=ee,i.invalid=y,i.duration=Fe,i.isMoment=x,i.weekdays=function(t,e,n){return hn(t,e,n,\"weekdays\")},i.parseZone=function(){return _e.apply(null,arguments).parseZone()},i.localeData=re,i.isDuration=Ce,i.monthsShort=function(t,e){return un(t,e,\"monthsShort\")},i.weekdaysMin=function(t,e,n){return hn(t,e,n,\"weekdaysMin\")},i.defineLocale=ne,i.updateLocale=function(t,e){if(null!=e){var n,r,i=Zt;null!=(r=te(t))&&(i=r._config),(n=new D(e=O(i,e))).parentLocale=Qt[t],Qt[t]=n,ee(t);}else null!=Qt[t]&&(null!=Qt[t].parentLocale?Qt[t]=Qt[t].parentLocale:null!=Qt[t]&&delete Qt[t]);return Qt[t]},i.locales=function(){return S(Qt)},i.weekdaysShort=function(t,e,n){return hn(t,e,n,\"weekdaysShort\")},i.normalizeUnits=I,i.relativeTimeRounding=function(t){return void 0===t?In:\"function\"==typeof t&&(In=t,!0)},i.relativeTimeThreshold=function(t,e){return void 0!==Fn[t]&&(void 0===e?Fn[t]:(Fn[t]=e,\"s\"===t&&(Fn.ss=e-1),!0))},i.calendarFormat=function(t,e){var n=t.diff(e,\"days\",!0);return n<-6?\"sameElse\":n<-1?\"lastWeek\":n<0?\"lastDay\":n<1?\"sameDay\":n<2?\"nextDay\":n<7?\"nextWeek\":\"sameElse\"},i.prototype=on,i.HTML5_FMT={DATETIME_LOCAL:\"YYYY-MM-DDTHH:mm\",DATETIME_LOCAL_SECONDS:\"YYYY-MM-DDTHH:mm:ss\",DATETIME_LOCAL_MS:\"YYYY-MM-DDTHH:mm:ss.SSS\",DATE:\"YYYY-MM-DD\",TIME:\"HH:mm\",TIME_SECONDS:\"HH:mm:ss\",TIME_MS:\"HH:mm:ss.SSS\",WEEK:\"GGGG-[W]WW\",MONTH:\"YYYY-MM\"},i}();},6470:t=>{function e(t){if(\"string\"!=typeof t)throw new TypeError(\"Path must be a string. Received \"+JSON.stringify(t))}function n(t,e){for(var n,r=\"\",i=0,a=-1,o=0,s=0;s<=t.length;++s){if(s<t.length)n=t.charCodeAt(s);else {if(47===n)break;n=47;}if(47===n){if(a===s-1||1===o);else if(a!==s-1&&2===o){if(r.length<2||2!==i||46!==r.charCodeAt(r.length-1)||46!==r.charCodeAt(r.length-2))if(r.length>2){var c=r.lastIndexOf(\"/\");if(c!==r.length-1){-1===c?(r=\"\",i=0):i=(r=r.slice(0,c)).length-1-r.lastIndexOf(\"/\"),a=s,o=0;continue}}else if(2===r.length||1===r.length){r=\"\",i=0,a=s,o=0;continue}e&&(r.length>0?r+=\"/..\":r=\"..\",i=2);}else r.length>0?r+=\"/\"+t.slice(a+1,s):r=t.slice(a+1,s),i=s-a-1;a=s,o=0;}else 46===n&&-1!==o?++o:o=-1;}return r}var r={resolve:function(){for(var t,r=\"\",i=!1,a=arguments.length-1;a>=-1&&!i;a--){var o;a>=0?o=arguments[a]:(void 0===t&&(t=process.cwd()),o=t),e(o),0!==o.length&&(r=o+\"/\"+r,i=47===o.charCodeAt(0));}return r=n(r,!i),i?r.length>0?\"/\"+r:\"/\":r.length>0?r:\".\"},normalize:function(t){if(e(t),0===t.length)return \".\";var r=47===t.charCodeAt(0),i=47===t.charCodeAt(t.length-1);return 0!==(t=n(t,!r)).length||r||(t=\".\"),t.length>0&&i&&(t+=\"/\"),r?\"/\"+t:t},isAbsolute:function(t){return e(t),t.length>0&&47===t.charCodeAt(0)},join:function(){if(0===arguments.length)return \".\";for(var t,n=0;n<arguments.length;++n){var i=arguments[n];e(i),i.length>0&&(void 0===t?t=i:t+=\"/\"+i);}return void 0===t?\".\":r.normalize(t)},relative:function(t,n){if(e(t),e(n),t===n)return \"\";if((t=r.resolve(t))===(n=r.resolve(n)))return \"\";for(var i=1;i<t.length&&47===t.charCodeAt(i);++i);for(var a=t.length,o=a-i,s=1;s<n.length&&47===n.charCodeAt(s);++s);for(var c=n.length-s,l=o<c?o:c,u=-1,h=0;h<=l;++h){if(h===l){if(c>l){if(47===n.charCodeAt(s+h))return n.slice(s+h+1);if(0===h)return n.slice(s+h)}else o>l&&(47===t.charCodeAt(i+h)?u=h:0===h&&(u=0));break}var f=t.charCodeAt(i+h);if(f!==n.charCodeAt(s+h))break;47===f&&(u=h);}var d=\"\";for(h=i+u+1;h<=a;++h)h!==a&&47!==t.charCodeAt(h)||(0===d.length?d+=\"..\":d+=\"/..\");return d.length>0?d+n.slice(s+u):(s+=u,47===n.charCodeAt(s)&&++s,n.slice(s))},_makeLong:function(t){return t},dirname:function(t){if(e(t),0===t.length)return \".\";for(var n=t.charCodeAt(0),r=47===n,i=-1,a=!0,o=t.length-1;o>=1;--o)if(47===(n=t.charCodeAt(o))){if(!a){i=o;break}}else a=!1;return -1===i?r?\"/\":\".\":r&&1===i?\"//\":t.slice(0,i)},basename:function(t,n){if(void 0!==n&&\"string\"!=typeof n)throw new TypeError('\"ext\" argument must be a string');e(t);var r,i=0,a=-1,o=!0;if(void 0!==n&&n.length>0&&n.length<=t.length){if(n.length===t.length&&n===t)return \"\";var s=n.length-1,c=-1;for(r=t.length-1;r>=0;--r){var l=t.charCodeAt(r);if(47===l){if(!o){i=r+1;break}}else -1===c&&(o=!1,c=r+1),s>=0&&(l===n.charCodeAt(s)?-1==--s&&(a=r):(s=-1,a=c));}return i===a?a=c:-1===a&&(a=t.length),t.slice(i,a)}for(r=t.length-1;r>=0;--r)if(47===t.charCodeAt(r)){if(!o){i=r+1;break}}else -1===a&&(o=!1,a=r+1);return -1===a?\"\":t.slice(i,a)},extname:function(t){e(t);for(var n=-1,r=0,i=-1,a=!0,o=0,s=t.length-1;s>=0;--s){var c=t.charCodeAt(s);if(47!==c)-1===i&&(a=!1,i=s+1),46===c?-1===n?n=s:1!==o&&(o=1):-1!==n&&(o=-1);else if(!a){r=s+1;break}}return -1===n||-1===i||0===o||1===o&&n===i-1&&n===r+1?\"\":t.slice(n,i)},format:function(t){if(null===t||\"object\"!=typeof t)throw new TypeError('The \"pathObject\" argument must be of type Object. Received type '+typeof t);return function(t,e){var n=e.dir||e.root,r=e.base||(e.name||\"\")+(e.ext||\"\");return n?n===e.root?n+r:n+\"/\"+r:r}(0,t)},parse:function(t){e(t);var n={root:\"\",dir:\"\",base:\"\",ext:\"\",name:\"\"};if(0===t.length)return n;var r,i=t.charCodeAt(0),a=47===i;a?(n.root=\"/\",r=1):r=0;for(var o=-1,s=0,c=-1,l=!0,u=t.length-1,h=0;u>=r;--u)if(47!==(i=t.charCodeAt(u)))-1===c&&(l=!1,c=u+1),46===i?-1===o?o=u:1!==h&&(h=1):-1!==o&&(h=-1);else if(!l){s=u+1;break}return -1===o||-1===c||0===h||1===h&&o===c-1&&o===s+1?-1!==c&&(n.base=n.name=0===s&&a?t.slice(1,c):t.slice(s,c)):(0===s&&a?(n.name=t.slice(1,o),n.base=t.slice(1,c)):(n.name=t.slice(s,o),n.base=t.slice(s,c)),n.ext=t.slice(o,c)),s>0?n.dir=t.slice(0,s-1):a&&(n.dir=\"/\"),n},sep:\"/\",delimiter:\":\",win32:null,posix:null};r.posix=r,t.exports=r;},555:()=>{},8218:()=>{},8009:()=>{},5354:()=>{},6878:()=>{},8183:()=>{},1428:()=>{},4551:()=>{},8800:()=>{},1993:()=>{},3069:()=>{},9143:()=>{},7543:(t,e,n)=>{function r(t,e){return null==t||null==e?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function i(t){let e=t,n=t,i=t;function a(t,e,r=0,a=t.length){if(r<a){if(0!==n(e,e))return a;do{const n=r+a>>>1;i(t[n],e)<0?r=n+1:a=n;}while(r<a)}return r}return 2!==t.length&&(e=(e,n)=>t(e)-n,n=r,i=(e,n)=>r(t(e),n)),{left:a,center:function(t,n,r=0,i=t.length){const o=a(t,n,r,i-1);return o>r&&e(t[o-1],n)>-e(t[o],n)?o-1:o},right:function(t,e,r=0,a=t.length){if(r<a){if(0!==n(e,e))return a;do{const n=r+a>>>1;i(t[n],e)<=0?r=n+1:a=n;}while(r<a)}return r}}}function a(t){return null===t?NaN:+t}n.r(e),n.d(e,{Adder:()=>x,Delaunay:()=>Bs,FormatSpecifier:()=>Fl,InternMap:()=>T,InternSet:()=>E,Node:()=>ng,Voronoi:()=>Ss,ZoomTransform:()=>sE,active:()=>ta,arc:()=>Jk,area:()=>sw,areaRadial:()=>yw,ascending:()=>r,autoType:()=>lc,axisBottom:()=>ie,axisLeft:()=>ae,axisRight:()=>re,axisTop:()=>ne,bin:()=>it,bisect:()=>u,bisectCenter:()=>l,bisectLeft:()=>c,bisectRight:()=>s,bisector:()=>i,blob:()=>$c,brush:()=>Oa,brushSelection:()=>Aa,brushX:()=>Ma,brushY:()=>Na,buffer:()=>qc,chord:()=>$a,chordDirected:()=>qa,chordTranspose:()=>Wa,cluster:()=>Xp,color:()=>tr,contourDensity:()=>is,contours:()=>Ko,count:()=>h,create:()=>Ck,creator:()=>pn,cross:()=>g,csv:()=>Zc,csvFormat:()=>Zs,csvFormatBody:()=>Qs,csvFormatRow:()=>Js,csvFormatRows:()=>Ks,csvFormatValue:()=>tc,csvParse:()=>Gs,csvParseRows:()=>Xs,cubehelix:()=>Uo,cumsum:()=>y,curveBasis:()=>Xw,curveBasisClosed:()=>Qw,curveBasisOpen:()=>Jw,curveBumpX:()=>eT,curveBumpY:()=>nT,curveBundle:()=>iT,curveCardinal:()=>sT,curveCardinalClosed:()=>lT,curveCardinalOpen:()=>hT,curveCatmullRom:()=>pT,curveCatmullRomClosed:()=>yT,curveCatmullRomOpen:()=>bT,curveLinear:()=>rw,curveLinearClosed:()=>_T,curveMonotoneX:()=>AT,curveMonotoneY:()=>MT,curveNatural:()=>DT,curveStep:()=>LT,curveStepAfter:()=>FT,curveStepBefore:()=>IT,descending:()=>m,deviation:()=>v,difference:()=>zt,disjoint:()=>Yt,dispatch:()=>fe,drag:()=>zs,dragDisable:()=>Ln,dragEnable:()=>In,dsv:()=>Xc,dsvFormat:()=>Hs,easeBack:()=>Rc,easeBackIn:()=>Ic,easeBackInOut:()=>Rc,easeBackOut:()=>Fc,easeBounce:()=>Dc,easeBounceIn:()=>Oc,easeBounceInOut:()=>Bc,easeBounceOut:()=>Dc,easeCircle:()=>Mc,easeCircleIn:()=>Sc,easeCircleInOut:()=>Mc,easeCircleOut:()=>Ac,easeCubic:()=>Zi,easeCubicIn:()=>Gi,easeCubicInOut:()=>Zi,easeCubicOut:()=>Xi,easeElastic:()=>zc,easeElasticIn:()=>jc,easeElasticInOut:()=>Yc,easeElasticOut:()=>zc,easeExp:()=>Cc,easeExpIn:()=>Tc,easeExpInOut:()=>Cc,easeExpOut:()=>Ec,easeLinear:()=>hc,easePoly:()=>mc,easePolyIn:()=>gc,easePolyInOut:()=>mc,easePolyOut:()=>yc,easeQuad:()=>pc,easeQuadIn:()=>fc,easeQuadInOut:()=>pc,easeQuadOut:()=>dc,easeSin:()=>kc,easeSinIn:()=>_c,easeSinInOut:()=>kc,easeSinOut:()=>xc,every:()=>Lt,extent:()=>_,fcumsum:()=>w,filter:()=>Ft,flatGroup:()=>L,flatRollup:()=>I,forceCenter:()=>al,forceCollide:()=>bl,forceLink:()=>xl,forceManyBody:()=>Sl,forceRadial:()=>Al,forceSimulation:()=>Cl,forceX:()=>Ml,forceY:()=>Nl,format:()=>Yl,formatDefaultLocale:()=>Hl,formatLocale:()=>ql,formatPrefix:()=>Ul,formatSpecifier:()=>Il,fsum:()=>k,geoAlbers:()=>up,geoAlbersUsa:()=>hp,geoArea:()=>Zu,geoAzimuthalEqualArea:()=>gp,geoAzimuthalEqualAreaRaw:()=>pp,geoAzimuthalEquidistant:()=>mp,geoAzimuthalEquidistantRaw:()=>yp,geoBounds:()=>Oh,geoCentroid:()=>$h,geoCircle:()=>tf,geoClipAntimeridian:()=>ff,geoClipCircle:()=>df,geoClipExtent:()=>xf,geoClipRectangle:()=>_f,geoConicConformal:()=>wp,geoConicConformalRaw:()=>kp,geoConicEqualArea:()=>lp,geoConicEqualAreaRaw:()=>cp,geoConicEquidistant:()=>Sp,geoConicEquidistantRaw:()=>Cp,geoContains:()=>Pf,geoDistance:()=>Mf,geoEqualEarth:()=>Lp,geoEqualEarthRaw:()=>Bp,geoEquirectangular:()=>Ep,geoEquirectangularRaw:()=>Tp,geoGnomonic:()=>Fp,geoGnomonicRaw:()=>Ip,geoGraticule:()=>Yf,geoGraticule10:()=>Uf,geoIdentity:()=>Rp,geoInterpolate:()=>$f,geoLength:()=>Cf,geoMercator:()=>vp,geoMercatorRaw:()=>bp,geoNaturalEarth1:()=>jp,geoNaturalEarth1Raw:()=>Pp,geoOrthographic:()=>Yp,geoOrthographicRaw:()=>zp,geoPath:()=>Hd,geoProjection:()=>ap,geoProjectionMutator:()=>op,geoRotation:()=>Qh,geoStereographic:()=>$p,geoStereographicRaw:()=>Up,geoStream:()=>Cu,geoTransform:()=>Vd,geoTransverseMercator:()=>qp,geoTransverseMercatorRaw:()=>Wp,gray:()=>xo,greatest:()=>Et,greatestIndex:()=>Ct,group:()=>O,groupSort:()=>H,groups:()=>D,hcl:()=>No,hierarchy:()=>Qp,histogram:()=>it,hsl:()=>hr,html:()=>rl,image:()=>Kc,index:()=>P,indexes:()=>j,interpolate:()=>Ir,interpolateArray:()=>Sr,interpolateBasis:()=>gr,interpolateBasisClosed:()=>yr,interpolateBlues:()=>Jx,interpolateBrBG:()=>hx,interpolateBuGn:()=>Mx,interpolateBuPu:()=>Ox,interpolateCividis:()=>uk,interpolateCool:()=>dk,interpolateCubehelix:()=>hy,interpolateCubehelixDefault:()=>hk,interpolateCubehelixLong:()=>fy,interpolateDate:()=>Mr,interpolateDiscrete:()=>Kg,interpolateGnBu:()=>Bx,interpolateGreens:()=>ek,interpolateGreys:()=>rk,interpolateHcl:()=>cy,interpolateHclLong:()=>ly,interpolateHsl:()=>iy,interpolateHslLong:()=>ay,interpolateHue:()=>Jg,interpolateInferno:()=>Tk,interpolateLab:()=>oy,interpolateMagma:()=>wk,interpolateNumber:()=>Nr,interpolateNumberArray:()=>Er,interpolateObject:()=>Or,interpolateOrRd:()=>Ix,interpolateOranges:()=>lk,interpolatePRGn:()=>dx,interpolatePiYG:()=>gx,interpolatePlasma:()=>Ek,interpolatePuBu:()=>jx,interpolatePuBuGn:()=>Rx,interpolatePuOr:()=>mx,interpolatePuRd:()=>Yx,interpolatePurples:()=>ak,interpolateRainbow:()=>gk,interpolateRdBu:()=>vx,interpolateRdGy:()=>xx,interpolateRdPu:()=>$x,interpolateRdYlBu:()=>wx,interpolateRdYlGn:()=>Ex,interpolateReds:()=>sk,interpolateRgb:()=>xr,interpolateRgbBasis:()=>wr,interpolateRgbBasisClosed:()=>Tr,interpolateRound:()=>ty,interpolateSinebow:()=>vk,interpolateSpectral:()=>Sx,interpolateString:()=>Lr,interpolateTransformCss:()=>gi,interpolateTransformSvg:()=>yi,interpolateTurbo:()=>_k,interpolateViridis:()=>kk,interpolateWarm:()=>fk,interpolateYlGn:()=>Vx,interpolateYlGnBu:()=>qx,interpolateYlOrBr:()=>Xx,interpolateYlOrRd:()=>Qx,interpolateZoom:()=>ny,interrupt:()=>li,intersection:()=>Ut,interval:()=>iE,isoFormat:()=>eE,isoParse:()=>rE,json:()=>tl,lab:()=>ko,lch:()=>Mo,least:()=>wt,leastIndex:()=>Tt,line:()=>ow,lineRadial:()=>gw,linkHorizontal:()=>Tw,linkRadial:()=>Cw,linkVertical:()=>Ew,local:()=>Ak,map:()=>Rt,matcher:()=>be,max:()=>at,maxIndex:()=>dt,mean:()=>pt,median:()=>gt,merge:()=>yt,min:()=>ot,minIndex:()=>mt,mode:()=>bt,namespace:()=>Le,namespaces:()=>Be,nice:()=>nt,now:()=>Gr,pack:()=>kg,packEnclose:()=>rg,packSiblings:()=>yg,pairs:()=>vt,partition:()=>Ag,path:()=>Ja,permute:()=>U,pie:()=>uw,piecewise:()=>dy,pointRadial:()=>mw,pointer:()=>Rr,pointers:()=>Nk,polygonArea:()=>gy,polygonCentroid:()=>yy,polygonContains:()=>xy,polygonHull:()=>_y,polygonLength:()=>ky,precisionFixed:()=>Vl,precisionPrefix:()=>Gl,precisionRound:()=>Xl,quadtree:()=>ul,quantile:()=>lt,quantileSorted:()=>ut,quantize:()=>py,quickselect:()=>st,radialArea:()=>yw,radialLine:()=>gw,randomBates:()=>My,randomBernoulli:()=>Dy,randomBeta:()=>Iy,randomBinomial:()=>Fy,randomCauchy:()=>Py,randomExponential:()=>Ny,randomGamma:()=>Ly,randomGeometric:()=>By,randomInt:()=>Ey,randomIrwinHall:()=>Ay,randomLcg:()=>Uy,randomLogNormal:()=>Sy,randomLogistic:()=>jy,randomNormal:()=>Cy,randomPareto:()=>Oy,randomPoisson:()=>zy,randomUniform:()=>Ty,randomWeibull:()=>Ry,range:()=>xt,rank:()=>kt,reduce:()=>Pt,reverse:()=>jt,rgb:()=>ir,ribbon:()=>uo,ribbonArrow:()=>ho,rollup:()=>F,rollups:()=>R,scaleBand:()=>Vy,scaleDiverging:()=>V_,scaleDivergingLog:()=>G_,scaleDivergingPow:()=>Z_,scaleDivergingSqrt:()=>Q_,scaleDivergingSymlog:()=>X_,scaleIdentity:()=>cm,scaleImplicit:()=>qy,scaleLinear:()=>sm,scaleLog:()=>mm,scaleOrdinal:()=>Hy,scalePoint:()=>Xy,scalePow:()=>Cm,scaleQuantile:()=>Om,scaleQuantize:()=>Dm,scaleRadial:()=>Nm,scaleSequential:()=>z_,scaleSequentialLog:()=>Y_,scaleSequentialPow:()=>$_,scaleSequentialQuantile:()=>q_,scaleSequentialSqrt:()=>W_,scaleSequentialSymlog:()=>U_,scaleSqrt:()=>Sm,scaleSymlog:()=>xm,scaleThreshold:()=>Bm,scaleTime:()=>F_,scaleUtc:()=>R_,scan:()=>St,schemeAccent:()=>tx,schemeBlues:()=>Kx,schemeBrBG:()=>ux,schemeBuGn:()=>Ax,schemeBuPu:()=>Nx,schemeCategory10:()=>J_,schemeDark2:()=>ex,schemeGnBu:()=>Dx,schemeGreens:()=>tk,schemeGreys:()=>nk,schemeOrRd:()=>Lx,schemeOranges:()=>ck,schemePRGn:()=>fx,schemePaired:()=>nx,schemePastel1:()=>rx,schemePastel2:()=>ix,schemePiYG:()=>px,schemePuBu:()=>Px,schemePuBuGn:()=>Fx,schemePuOr:()=>yx,schemePuRd:()=>zx,schemePurples:()=>ik,schemeRdBu:()=>bx,schemeRdGy:()=>_x,schemeRdPu:()=>Ux,schemeRdYlBu:()=>kx,schemeRdYlGn:()=>Tx,schemeReds:()=>ok,schemeSet1:()=>ax,schemeSet2:()=>ox,schemeSet3:()=>sx,schemeSpectral:()=>Cx,schemeTableau10:()=>cx,schemeYlGn:()=>Hx,schemeYlGnBu:()=>Wx,schemeYlOrBr:()=>Gx,schemeYlOrRd:()=>Zx,select:()=>Mn,selectAll:()=>Ok,selection:()=>An,selector:()=>pe,selectorAll:()=>me,shuffle:()=>At,shuffler:()=>Mt,some:()=>It,sort:()=>$,stack:()=>YT,stackOffsetDiverging:()=>$T,stackOffsetExpand:()=>UT,stackOffsetNone:()=>RT,stackOffsetSilhouette:()=>WT,stackOffsetWiggle:()=>qT,stackOrderAppearance:()=>HT,stackOrderAscending:()=>GT,stackOrderDescending:()=>ZT,stackOrderInsideOut:()=>QT,stackOrderNone:()=>PT,stackOrderReverse:()=>KT,stratify:()=>Lg,style:()=>qe,subset:()=>Ht,sum:()=>Nt,superset:()=>Wt,svg:()=>il,symbol:()=>qw,symbolCircle:()=>Sw,symbolCross:()=>Aw,symbolDiamond:()=>Ow,symbolSquare:()=>Fw,symbolStar:()=>Iw,symbolTriangle:()=>Pw,symbolWye:()=>$w,symbols:()=>Ww,text:()=>Vc,thresholdFreedmanDiaconis:()=>ht,thresholdScott:()=>ft,thresholdSturges:()=>rt,tickFormat:()=>am,tickIncrement:()=>tt,tickStep:()=>et,ticks:()=>J,timeDay:()=>nb,timeDays:()=>rb,timeFormat:()=>hv,timeFormatDefaultLocale:()=>D_,timeFormatLocale:()=>lv,timeFriday:()=>ub,timeFridays:()=>mb,timeHour:()=>Jm,timeHours:()=>tb,timeInterval:()=>Um,timeMillisecond:()=>Wm,timeMilliseconds:()=>qm,timeMinute:()=>Zm,timeMinutes:()=>Qm,timeMonday:()=>ob,timeMondays:()=>db,timeMonth:()=>_b,timeMonths:()=>xb,timeParse:()=>fv,timeSaturday:()=>hb,timeSaturdays:()=>bb,timeSecond:()=>Vm,timeSeconds:()=>Gm,timeSunday:()=>ab,timeSundays:()=>fb,timeThursday:()=>lb,timeThursdays:()=>yb,timeTickInterval:()=>av,timeTicks:()=>iv,timeTuesday:()=>sb,timeTuesdays:()=>pb,timeWednesday:()=>cb,timeWednesdays:()=>gb,timeWeek:()=>ab,timeWeeks:()=>fb,timeYear:()=>wb,timeYears:()=>Tb,timeout:()=>ni,timer:()=>Qr,timerFlush:()=>Kr,transition:()=>qi,transpose:()=>Ot,tree:()=>$g,treemap:()=>Gg,treemapBinary:()=>Xg,treemapDice:()=>Sg,treemapResquarify:()=>Qg,treemapSlice:()=>Wg,treemapSliceDice:()=>Zg,treemapSquarify:()=>Vg,tsv:()=>Qc,tsvFormat:()=>ic,tsvFormatBody:()=>ac,tsvFormatRow:()=>sc,tsvFormatRows:()=>oc,tsvFormatValue:()=>cc,tsvParse:()=>nc,tsvParseRows:()=>rc,union:()=>Vt,utcDay:()=>Db,utcDays:()=>Bb,utcFormat:()=>dv,utcFriday:()=>zb,utcFridays:()=>Vb,utcHour:()=>Mb,utcHours:()=>Nb,utcMillisecond:()=>Wm,utcMilliseconds:()=>qm,utcMinute:()=>Cb,utcMinutes:()=>Sb,utcMonday:()=>Fb,utcMondays:()=>$b,utcMonth:()=>Zb,utcMonths:()=>Qb,utcParse:()=>pv,utcSaturday:()=>Yb,utcSaturdays:()=>Gb,utcSecond:()=>Vm,utcSeconds:()=>Gm,utcSunday:()=>Ib,utcSundays:()=>Ub,utcThursday:()=>jb,utcThursdays:()=>Hb,utcTickInterval:()=>rv,utcTicks:()=>nv,utcTuesday:()=>Rb,utcTuesdays:()=>Wb,utcWednesday:()=>Pb,utcWednesdays:()=>qb,utcWeek:()=>Ib,utcWeeks:()=>Ub,utcYear:()=>Jb,utcYears:()=>tv,variance:()=>b,window:()=>Ye,xml:()=>nl,zip:()=>Bt,zoom:()=>bE,zoomIdentity:()=>cE,zoomTransform:()=>lE});const o=i(r),s=o.right,c=o.left,l=i(a).center,u=s;function h(t,e){let n=0;if(void 0===e)for(let e of t)null!=e&&(e=+e)>=e&&++n;else {let r=-1;for(let i of t)null!=(i=e(i,++r,t))&&(i=+i)>=i&&++n;}return n}function f(t){return 0|t.length}function d(t){return !(t>0)}function p(t){return \"object\"!=typeof t||\"length\"in t?t:Array.from(t)}function g(...t){const e=\"function\"==typeof t[t.length-1]&&function(t){return e=>t(...e)}(t.pop()),n=(t=t.map(p)).map(f),r=t.length-1,i=new Array(r+1).fill(0),a=[];if(r<0||n.some(d))return a;for(;;){a.push(i.map(((e,n)=>t[n][e])));let o=r;for(;++i[o]===n[o];){if(0===o)return e?a.map(e):a;i[o--]=0;}}}function y(t,e){var n=0,r=0;return Float64Array.from(t,void 0===e?t=>n+=+t||0:i=>n+=+e(i,r++,t)||0)}function m(t,e){return null==t||null==e?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function b(t,e){let n,r=0,i=0,a=0;if(void 0===e)for(let e of t)null!=e&&(e=+e)>=e&&(n=e-i,i+=n/++r,a+=n*(e-i));else {let o=-1;for(let s of t)null!=(s=e(s,++o,t))&&(s=+s)>=s&&(n=s-i,i+=n/++r,a+=n*(s-i));}if(r>1)return a/(r-1)}function v(t,e){const n=b(t,e);return n?Math.sqrt(n):n}function _(t,e){let n,r;if(void 0===e)for(const e of t)null!=e&&(void 0===n?e>=e&&(n=r=e):(n>e&&(n=e),r<e&&(r=e)));else {let i=-1;for(let a of t)null!=(a=e(a,++i,t))&&(void 0===n?a>=a&&(n=r=a):(n>a&&(n=a),r<a&&(r=a)));}return [n,r]}class x{constructor(){this._partials=new Float64Array(32),this._n=0;}add(t){const e=this._partials;let n=0;for(let r=0;r<this._n&&r<32;r++){const i=e[r],a=t+i,o=Math.abs(t)<Math.abs(i)?t-(a-i):i-(a-t);o&&(e[n++]=o),t=a;}return e[n]=t,this._n=n+1,this}valueOf(){const t=this._partials;let e,n,r,i=this._n,a=0;if(i>0){for(a=t[--i];i>0&&(e=a,n=t[--i],a=e+n,r=n-(a-e),!r););i>0&&(r<0&&t[i-1]<0||r>0&&t[i-1]>0)&&(n=2*r,e=a+n,n==e-a&&(a=e));}return a}}function k(t,e){const n=new x;if(void 0===e)for(let e of t)(e=+e)&&n.add(e);else {let r=-1;for(let i of t)(i=+e(i,++r,t))&&n.add(i);}return +n}function w(t,e){const n=new x;let r=-1;return Float64Array.from(t,void 0===e?t=>n.add(+t||0):i=>n.add(+e(i,++r,t)||0))}class T extends Map{constructor(t,e=M){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:e}}),null!=t)for(const[e,n]of t)this.set(e,n);}get(t){return super.get(C(this,t))}has(t){return super.has(C(this,t))}set(t,e){return super.set(S(this,t),e)}delete(t){return super.delete(A(this,t))}}class E extends Set{constructor(t,e=M){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:e}}),null!=t)for(const e of t)this.add(e);}has(t){return super.has(C(this,t))}add(t){return super.add(S(this,t))}delete(t){return super.delete(A(this,t))}}function C({_intern:t,_key:e},n){const r=e(n);return t.has(r)?t.get(r):n}function S({_intern:t,_key:e},n){const r=e(n);return t.has(r)?t.get(r):(t.set(r,n),n)}function A({_intern:t,_key:e},n){const r=e(n);return t.has(r)&&(n=t.get(r),t.delete(r)),n}function M(t){return null!==t&&\"object\"==typeof t?t.valueOf():t}function N(t){return t}function O(t,...e){return Y(t,N,N,e)}function D(t,...e){return Y(t,Array.from,N,e)}function B(t,e){for(let n=1,r=e.length;n<r;++n)t=t.flatMap((t=>t.pop().map((([e,n])=>[...t,e,n]))));return t}function L(t,...e){return B(D(t,...e),e)}function I(t,e,...n){return B(R(t,e,...n),n)}function F(t,e,...n){return Y(t,N,e,n)}function R(t,e,...n){return Y(t,Array.from,e,n)}function P(t,...e){return Y(t,N,z,e)}function j(t,...e){return Y(t,Array.from,z,e)}function z(t){if(1!==t.length)throw new Error(\"duplicate key\");return t[0]}function Y(t,e,n,r){return function t(i,a){if(a>=r.length)return n(i);const o=new T,s=r[a++];let c=-1;for(const t of i){const e=s(t,++c,i),n=o.get(e);n?n.push(t):o.set(e,[t]);}for(const[e,n]of o)o.set(e,t(n,a));return e(o)}(t,0)}function U(t,e){return Array.from(e,(e=>t[e]))}function $(t,...e){if(\"function\"!=typeof t[Symbol.iterator])throw new TypeError(\"values is not iterable\");t=Array.from(t);let[n]=e;if(n&&2!==n.length||e.length>1){const r=Uint32Array.from(t,((t,e)=>e));return e.length>1?(e=e.map((e=>t.map(e))),r.sort(((t,n)=>{for(const r of e){const e=q(r[t],r[n]);if(e)return e}}))):(n=t.map(n),r.sort(((t,e)=>q(n[t],n[e])))),U(t,r)}return t.sort(W(n))}function W(t=r){if(t===r)return q;if(\"function\"!=typeof t)throw new TypeError(\"compare is not a function\");return (e,n)=>{const r=t(e,n);return r||0===r?r:(0===t(n,n))-(0===t(e,e))}}function q(t,e){return (null==t||!(t>=t))-(null==e||!(e>=e))||(t<e?-1:t>e?1:0)}function H(t,e,n){return (2!==e.length?$(F(t,e,n),(([t,e],[n,i])=>r(e,i)||r(t,n))):$(O(t,n),(([t,n],[i,a])=>e(n,a)||r(t,i)))).map((([t])=>t))}var V=Array.prototype,G=V.slice;function X(t){return ()=>t}var Z=Math.sqrt(50),Q=Math.sqrt(10),K=Math.sqrt(2);function J(t,e,n){var r,i,a,o,s=-1;if(n=+n,(t=+t)==(e=+e)&&n>0)return [t];if((r=e<t)&&(i=t,t=e,e=i),0===(o=tt(t,e,n))||!isFinite(o))return [];if(o>0){let n=Math.round(t/o),r=Math.round(e/o);for(n*o<t&&++n,r*o>e&&--r,a=new Array(i=r-n+1);++s<i;)a[s]=(n+s)*o;}else {o=-o;let n=Math.round(t*o),r=Math.round(e*o);for(n/o<t&&++n,r/o>e&&--r,a=new Array(i=r-n+1);++s<i;)a[s]=(n+s)/o;}return r&&a.reverse(),a}function tt(t,e,n){var r=(e-t)/Math.max(0,n),i=Math.floor(Math.log(r)/Math.LN10),a=r/Math.pow(10,i);return i>=0?(a>=Z?10:a>=Q?5:a>=K?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(a>=Z?10:a>=Q?5:a>=K?2:1)}function et(t,e,n){var r=Math.abs(e-t)/Math.max(0,n),i=Math.pow(10,Math.floor(Math.log(r)/Math.LN10)),a=r/i;return a>=Z?i*=10:a>=Q?i*=5:a>=K&&(i*=2),e<t?-i:i}function nt(t,e,n){let r;for(;;){const i=tt(t,e,n);if(i===r||0===i||!isFinite(i))return [t,e];i>0?(t=Math.floor(t/i)*i,e=Math.ceil(e/i)*i):i<0&&(t=Math.ceil(t*i)/i,e=Math.floor(e*i)/i),r=i;}}function rt(t){return Math.ceil(Math.log(h(t))/Math.LN2)+1}function it(){var t=N,e=_,n=rt;function r(r){Array.isArray(r)||(r=Array.from(r));var i,a,o=r.length,s=new Array(o);for(i=0;i<o;++i)s[i]=t(r[i],i,r);var c=e(s),l=c[0],h=c[1],f=n(s,l,h);if(!Array.isArray(f)){const t=h,n=+f;if(e===_&&([l,h]=nt(l,h,n)),(f=J(l,h,n))[f.length-1]>=h)if(t>=h&&e===_){const t=tt(l,h,n);isFinite(t)&&(t>0?h=(Math.floor(h/t)+1)*t:t<0&&(h=(Math.ceil(h*-t)+1)/-t));}else f.pop();}for(var d=f.length;f[0]<=l;)f.shift(),--d;for(;f[d-1]>h;)f.pop(),--d;var p,g=new Array(d+1);for(i=0;i<=d;++i)(p=g[i]=[]).x0=i>0?f[i-1]:l,p.x1=i<d?f[i]:h;for(i=0;i<o;++i)null!=(a=s[i])&&l<=a&&a<=h&&g[u(f,a,0,d)].push(r[i]);return g}return r.value=function(e){return arguments.length?(t=\"function\"==typeof e?e:X(e),r):t},r.domain=function(t){return arguments.length?(e=\"function\"==typeof t?t:X([t[0],t[1]]),r):e},r.thresholds=function(t){return arguments.length?(n=\"function\"==typeof t?t:Array.isArray(t)?X(G.call(t)):X(t),r):n},r}function at(t,e){let n;if(void 0===e)for(const e of t)null!=e&&(n<e||void 0===n&&e>=e)&&(n=e);else {let r=-1;for(let i of t)null!=(i=e(i,++r,t))&&(n<i||void 0===n&&i>=i)&&(n=i);}return n}function ot(t,e){let n;if(void 0===e)for(const e of t)null!=e&&(n>e||void 0===n&&e>=e)&&(n=e);else {let r=-1;for(let i of t)null!=(i=e(i,++r,t))&&(n>i||void 0===n&&i>=i)&&(n=i);}return n}function st(t,e,n=0,r=t.length-1,i){for(i=void 0===i?q:W(i);r>n;){if(r-n>600){const a=r-n+1,o=e-n+1,s=Math.log(a),c=.5*Math.exp(2*s/3),l=.5*Math.sqrt(s*c*(a-c)/a)*(o-a/2<0?-1:1);st(t,e,Math.max(n,Math.floor(e-o*c/a+l)),Math.min(r,Math.floor(e+(a-o)*c/a+l)),i);}const a=t[e];let o=n,s=r;for(ct(t,n,e),i(t[r],a)>0&&ct(t,n,r);o<s;){for(ct(t,o,s),++o,--s;i(t[o],a)<0;)++o;for(;i(t[s],a)>0;)--s;}0===i(t[n],a)?ct(t,n,s):(++s,ct(t,s,r)),s<=e&&(n=s+1),e<=s&&(r=s-1);}return t}function ct(t,e,n){const r=t[e];t[e]=t[n],t[n]=r;}function lt(t,e,n){if(t=Float64Array.from(function*(t,e){if(void 0===e)for(let e of t)null!=e&&(e=+e)>=e&&(yield e);else {let n=-1;for(let r of t)null!=(r=e(r,++n,t))&&(r=+r)>=r&&(yield r);}}(t,n)),r=t.length){if((e=+e)<=0||r<2)return ot(t);if(e>=1)return at(t);var r,i=(r-1)*e,a=Math.floor(i),o=at(st(t,a).subarray(0,a+1));return o+(ot(t.subarray(a+1))-o)*(i-a)}}function ut(t,e,n=a){if(r=t.length){if((e=+e)<=0||r<2)return +n(t[0],0,t);if(e>=1)return +n(t[r-1],r-1,t);var r,i=(r-1)*e,o=Math.floor(i),s=+n(t[o],o,t);return s+(+n(t[o+1],o+1,t)-s)*(i-o)}}function ht(t,e,n){return Math.ceil((n-e)/(2*(lt(t,.75)-lt(t,.25))*Math.pow(h(t),-1/3)))}function ft(t,e,n){return Math.ceil((n-e)/(3.5*v(t)*Math.pow(h(t),-1/3)))}function dt(t,e){let n,r=-1,i=-1;if(void 0===e)for(const e of t)++i,null!=e&&(n<e||void 0===n&&e>=e)&&(n=e,r=i);else for(let a of t)null!=(a=e(a,++i,t))&&(n<a||void 0===n&&a>=a)&&(n=a,r=i);return r}function pt(t,e){let n=0,r=0;if(void 0===e)for(let e of t)null!=e&&(e=+e)>=e&&(++n,r+=e);else {let i=-1;for(let a of t)null!=(a=e(a,++i,t))&&(a=+a)>=a&&(++n,r+=a);}if(n)return r/n}function gt(t,e){return lt(t,.5,e)}function yt(t){return Array.from(function*(t){for(const e of t)yield*e;}(t))}function mt(t,e){let n,r=-1,i=-1;if(void 0===e)for(const e of t)++i,null!=e&&(n>e||void 0===n&&e>=e)&&(n=e,r=i);else for(let a of t)null!=(a=e(a,++i,t))&&(n>a||void 0===n&&a>=a)&&(n=a,r=i);return r}function bt(t,e){const n=new T;if(void 0===e)for(let e of t)null!=e&&e>=e&&n.set(e,(n.get(e)||0)+1);else {let r=-1;for(let i of t)null!=(i=e(i,++r,t))&&i>=i&&n.set(i,(n.get(i)||0)+1);}let r,i=0;for(const[t,e]of n)e>i&&(i=e,r=t);return r}function vt(t,e=_t){const n=[];let r,i=!1;for(const a of t)i&&n.push(e(r,a)),r=a,i=!0;return n}function _t(t,e){return [t,e]}function xt(t,e,n){t=+t,e=+e,n=(i=arguments.length)<2?(e=t,t=0,1):i<3?1:+n;for(var r=-1,i=0|Math.max(0,Math.ceil((e-t)/n)),a=new Array(i);++r<i;)a[r]=t+r*n;return a}function kt(t,e=r){if(\"function\"!=typeof t[Symbol.iterator])throw new TypeError(\"values is not iterable\");let n=Array.from(t);const i=new Float64Array(n.length);2!==e.length&&(n=n.map(e),e=r);const a=(t,r)=>e(n[t],n[r]);let o,s;return Uint32Array.from(n,((t,e)=>e)).sort(e===r?(t,e)=>q(n[t],n[e]):W(a)).forEach(((t,e)=>{const n=a(t,void 0===o?t:o);n>=0?((void 0===o||n>0)&&(o=t,s=e),i[t]=s):i[t]=NaN;})),i}function wt(t,e=r){let n,i=!1;if(1===e.length){let a;for(const o of t){const t=e(o);(i?r(t,a)<0:0===r(t,t))&&(n=o,a=t,i=!0);}}else for(const r of t)(i?e(r,n)<0:0===e(r,r))&&(n=r,i=!0);return n}function Tt(t,e=r){if(1===e.length)return mt(t,e);let n,i=-1,a=-1;for(const r of t)++a,(i<0?0===e(r,r):e(r,n)<0)&&(n=r,i=a);return i}function Et(t,e=r){let n,i=!1;if(1===e.length){let a;for(const o of t){const t=e(o);(i?r(t,a)>0:0===r(t,t))&&(n=o,a=t,i=!0);}}else for(const r of t)(i?e(r,n)>0:0===e(r,r))&&(n=r,i=!0);return n}function Ct(t,e=r){if(1===e.length)return dt(t,e);let n,i=-1,a=-1;for(const r of t)++a,(i<0?0===e(r,r):e(r,n)>0)&&(n=r,i=a);return i}function St(t,e){const n=Tt(t,e);return n<0?void 0:n}const At=Mt(Math.random);function Mt(t){return function(e,n=0,r=e.length){let i=r-(n=+n);for(;i;){const r=t()*i--|0,a=e[i+n];e[i+n]=e[r+n],e[r+n]=a;}return e}}function Nt(t,e){let n=0;if(void 0===e)for(let e of t)(e=+e)&&(n+=e);else {let r=-1;for(let i of t)(i=+e(i,++r,t))&&(n+=i);}return n}function Ot(t){if(!(i=t.length))return [];for(var e=-1,n=ot(t,Dt),r=new Array(n);++e<n;)for(var i,a=-1,o=r[e]=new Array(i);++a<i;)o[a]=t[a][e];return r}function Dt(t){return t.length}function Bt(){return Ot(arguments)}function Lt(t,e){if(\"function\"!=typeof e)throw new TypeError(\"test is not a function\");let n=-1;for(const r of t)if(!e(r,++n,t))return !1;return !0}function It(t,e){if(\"function\"!=typeof e)throw new TypeError(\"test is not a function\");let n=-1;for(const r of t)if(e(r,++n,t))return !0;return !1}function Ft(t,e){if(\"function\"!=typeof e)throw new TypeError(\"test is not a function\");const n=[];let r=-1;for(const i of t)e(i,++r,t)&&n.push(i);return n}function Rt(t,e){if(\"function\"!=typeof t[Symbol.iterator])throw new TypeError(\"values is not iterable\");if(\"function\"!=typeof e)throw new TypeError(\"mapper is not a function\");return Array.from(t,((n,r)=>e(n,r,t)))}function Pt(t,e,n){if(\"function\"!=typeof e)throw new TypeError(\"reducer is not a function\");const r=t[Symbol.iterator]();let i,a,o=-1;if(arguments.length<3){if(({done:i,value:n}=r.next()),i)return;++o;}for(;({done:i,value:a}=r.next()),!i;)n=e(n,a,++o,t);return n}function jt(t){if(\"function\"!=typeof t[Symbol.iterator])throw new TypeError(\"values is not iterable\");return Array.from(t).reverse()}function zt(t,...e){t=new E(t);for(const n of e)for(const e of n)t.delete(e);return t}function Yt(t,e){const n=e[Symbol.iterator](),r=new E;for(const e of t){if(r.has(e))return !1;let t,i;for(;({value:t,done:i}=n.next())&&!i;){if(Object.is(e,t))return !1;r.add(t);}}return !0}function Ut(t,...e){t=new E(t),e=e.map($t);t:for(const n of t)for(const r of e)if(!r.has(n)){t.delete(n);continue t}return t}function $t(t){return t instanceof E?t:new E(t)}function Wt(t,e){const n=t[Symbol.iterator](),r=new Set;for(const t of e){const e=qt(t);if(r.has(e))continue;let i,a;for(;({value:i,done:a}=n.next());){if(a)return !1;const t=qt(i);if(r.add(t),Object.is(e,t))break}}return !0}function qt(t){return null!==t&&\"object\"==typeof t?t.valueOf():t}function Ht(t,e){return Wt(e,t)}function Vt(...t){const e=new E;for(const n of t)for(const t of n)e.add(t);return e}function Gt(t){return t}var Xt=1e-6;function Zt(t){return \"translate(\"+t+\",0)\"}function Qt(t){return \"translate(0,\"+t+\")\"}function Kt(t){return e=>+t(e)}function Jt(t,e){return e=Math.max(0,t.bandwidth()-2*e)/2,t.round()&&(e=Math.round(e)),n=>+t(n)+e}function te(){return !this.__axis}function ee(t,e){var n=[],r=null,i=null,a=6,o=6,s=3,c=\"undefined\"!=typeof window&&window.devicePixelRatio>1?0:.5,l=1===t||4===t?-1:1,u=4===t||2===t?\"x\":\"y\",h=1===t||3===t?Zt:Qt;function f(f){var d=null==r?e.ticks?e.ticks.apply(e,n):e.domain():r,p=null==i?e.tickFormat?e.tickFormat.apply(e,n):Gt:i,g=Math.max(a,0)+s,y=e.range(),m=+y[0]+c,b=+y[y.length-1]+c,v=(e.bandwidth?Jt:Kt)(e.copy(),c),_=f.selection?f.selection():f,x=_.selectAll(\".domain\").data([null]),k=_.selectAll(\".tick\").data(d,e).order(),w=k.exit(),T=k.enter().append(\"g\").attr(\"class\",\"tick\"),E=k.select(\"line\"),C=k.select(\"text\");x=x.merge(x.enter().insert(\"path\",\".tick\").attr(\"class\",\"domain\").attr(\"stroke\",\"currentColor\")),k=k.merge(T),E=E.merge(T.append(\"line\").attr(\"stroke\",\"currentColor\").attr(u+\"2\",l*a)),C=C.merge(T.append(\"text\").attr(\"fill\",\"currentColor\").attr(u,l*g).attr(\"dy\",1===t?\"0em\":3===t?\"0.71em\":\"0.32em\")),f!==_&&(x=x.transition(f),k=k.transition(f),E=E.transition(f),C=C.transition(f),w=w.transition(f).attr(\"opacity\",Xt).attr(\"transform\",(function(t){return isFinite(t=v(t))?h(t+c):this.getAttribute(\"transform\")})),T.attr(\"opacity\",Xt).attr(\"transform\",(function(t){var e=this.parentNode.__axis;return h((e&&isFinite(e=e(t))?e:v(t))+c)}))),w.remove(),x.attr(\"d\",4===t||2===t?o?\"M\"+l*o+\",\"+m+\"H\"+c+\"V\"+b+\"H\"+l*o:\"M\"+c+\",\"+m+\"V\"+b:o?\"M\"+m+\",\"+l*o+\"V\"+c+\"H\"+b+\"V\"+l*o:\"M\"+m+\",\"+c+\"H\"+b),k.attr(\"opacity\",1).attr(\"transform\",(function(t){return h(v(t)+c)})),E.attr(u+\"2\",l*a),C.attr(u,l*g).text(p),_.filter(te).attr(\"fill\",\"none\").attr(\"font-size\",10).attr(\"font-family\",\"sans-serif\").attr(\"text-anchor\",2===t?\"start\":4===t?\"end\":\"middle\"),_.each((function(){this.__axis=v;}));}return f.scale=function(t){return arguments.length?(e=t,f):e},f.ticks=function(){return n=Array.from(arguments),f},f.tickArguments=function(t){return arguments.length?(n=null==t?[]:Array.from(t),f):n.slice()},f.tickValues=function(t){return arguments.length?(r=null==t?null:Array.from(t),f):r&&r.slice()},f.tickFormat=function(t){return arguments.length?(i=t,f):i},f.tickSize=function(t){return arguments.length?(a=o=+t,f):a},f.tickSizeInner=function(t){return arguments.length?(a=+t,f):a},f.tickSizeOuter=function(t){return arguments.length?(o=+t,f):o},f.tickPadding=function(t){return arguments.length?(s=+t,f):s},f.offset=function(t){return arguments.length?(c=+t,f):c},f}function ne(t){return ee(1,t)}function re(t){return ee(2,t)}function ie(t){return ee(3,t)}function ae(t){return ee(4,t)}var oe={value:()=>{}};function se(){for(var t,e=0,n=arguments.length,r={};e<n;++e){if(!(t=arguments[e]+\"\")||t in r||/[\\s.]/.test(t))throw new Error(\"illegal type: \"+t);r[t]=[];}return new ce(r)}function ce(t){this._=t;}function le(t,e){return t.trim().split(/^|\\s+/).map((function(t){var n=\"\",r=t.indexOf(\".\");if(r>=0&&(n=t.slice(r+1),t=t.slice(0,r)),t&&!e.hasOwnProperty(t))throw new Error(\"unknown type: \"+t);return {type:t,name:n}}))}function ue(t,e){for(var n,r=0,i=t.length;r<i;++r)if((n=t[r]).name===e)return n.value}function he(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=oe,t=t.slice(0,r).concat(t.slice(r+1));break}return null!=n&&t.push({name:e,value:n}),t}ce.prototype=se.prototype={constructor:ce,on:function(t,e){var n,r=this._,i=le(t+\"\",r),a=-1,o=i.length;if(!(arguments.length<2)){if(null!=e&&\"function\"!=typeof e)throw new Error(\"invalid callback: \"+e);for(;++a<o;)if(n=(t=i[a]).type)r[n]=he(r[n],t.name,e);else if(null==e)for(n in r)r[n]=he(r[n],t.name,null);return this}for(;++a<o;)if((n=(t=i[a]).type)&&(n=ue(r[n],t.name)))return n},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new ce(t)},call:function(t,e){if((n=arguments.length-2)>0)for(var n,r,i=new Array(n),a=0;a<n;++a)i[a]=arguments[a+2];if(!this._.hasOwnProperty(t))throw new Error(\"unknown type: \"+t);for(a=0,n=(r=this._[t]).length;a<n;++a)r[a].value.apply(e,i);},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error(\"unknown type: \"+t);for(var r=this._[t],i=0,a=r.length;i<a;++i)r[i].value.apply(e,n);}};const fe=se;function de(){}function pe(t){return null==t?de:function(){return this.querySelector(t)}}function ge(t){return null==t?[]:Array.isArray(t)?t:Array.from(t)}function ye(){return []}function me(t){return null==t?ye:function(){return this.querySelectorAll(t)}}function be(t){return function(){return this.matches(t)}}function ve(t){return function(e){return e.matches(t)}}var _e=Array.prototype.find;function xe(){return this.firstElementChild}var ke=Array.prototype.filter;function we(){return Array.from(this.children)}function Te(t){return new Array(t.length)}function Ee(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e;}function Ce(t){return function(){return t}}function Se(t,e,n,r,i,a){for(var o,s=0,c=e.length,l=a.length;s<l;++s)(o=e[s])?(o.__data__=a[s],r[s]=o):n[s]=new Ee(t,a[s]);for(;s<c;++s)(o=e[s])&&(i[s]=o);}function Ae(t,e,n,r,i,a,o){var s,c,l,u=new Map,h=e.length,f=a.length,d=new Array(h);for(s=0;s<h;++s)(c=e[s])&&(d[s]=l=o.call(c,c.__data__,s,e)+\"\",u.has(l)?i[s]=c:u.set(l,c));for(s=0;s<f;++s)l=o.call(t,a[s],s,a)+\"\",(c=u.get(l))?(r[s]=c,c.__data__=a[s],u.delete(l)):n[s]=new Ee(t,a[s]);for(s=0;s<h;++s)(c=e[s])&&u.get(d[s])===c&&(i[s]=c);}function Me(t){return t.__data__}function Ne(t){return \"object\"==typeof t&&\"length\"in t?t:Array.from(t)}function Oe(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}Ee.prototype={constructor:Ee,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};var De=\"http://www.w3.org/1999/xhtml\";const Be={svg:\"http://www.w3.org/2000/svg\",xhtml:De,xlink:\"http://www.w3.org/1999/xlink\",xml:\"http://www.w3.org/XML/1998/namespace\",xmlns:\"http://www.w3.org/2000/xmlns/\"};function Le(t){var e=t+=\"\",n=e.indexOf(\":\");return n>=0&&\"xmlns\"!==(e=t.slice(0,n))&&(t=t.slice(n+1)),Be.hasOwnProperty(e)?{space:Be[e],local:t}:t}function Ie(t){return function(){this.removeAttribute(t);}}function Fe(t){return function(){this.removeAttributeNS(t.space,t.local);}}function Re(t,e){return function(){this.setAttribute(t,e);}}function Pe(t,e){return function(){this.setAttributeNS(t.space,t.local,e);}}function je(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttribute(t):this.setAttribute(t,n);}}function ze(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n);}}function Ye(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function Ue(t){return function(){this.style.removeProperty(t);}}function $e(t,e,n){return function(){this.style.setProperty(t,e,n);}}function We(t,e,n){return function(){var r=e.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,n);}}function qe(t,e){return t.style.getPropertyValue(e)||Ye(t).getComputedStyle(t,null).getPropertyValue(e)}function He(t){return function(){delete this[t];}}function Ve(t,e){return function(){this[t]=e;}}function Ge(t,e){return function(){var n=e.apply(this,arguments);null==n?delete this[t]:this[t]=n;}}function Xe(t){return t.trim().split(/^|\\s+/)}function Ze(t){return t.classList||new Qe(t)}function Qe(t){this._node=t,this._names=Xe(t.getAttribute(\"class\")||\"\");}function Ke(t,e){for(var n=Ze(t),r=-1,i=e.length;++r<i;)n.add(e[r]);}function Je(t,e){for(var n=Ze(t),r=-1,i=e.length;++r<i;)n.remove(e[r]);}function tn(t){return function(){Ke(this,t);}}function en(t){return function(){Je(this,t);}}function nn(t,e){return function(){(e.apply(this,arguments)?Ke:Je)(this,t);}}function rn(){this.textContent=\"\";}function an(t){return function(){this.textContent=t;}}function on(t){return function(){var e=t.apply(this,arguments);this.textContent=null==e?\"\":e;}}function sn(){this.innerHTML=\"\";}function cn(t){return function(){this.innerHTML=t;}}function ln(t){return function(){var e=t.apply(this,arguments);this.innerHTML=null==e?\"\":e;}}function un(){this.nextSibling&&this.parentNode.appendChild(this);}function hn(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild);}function fn(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===De&&e.documentElement.namespaceURI===De?e.createElement(t):e.createElementNS(n,t)}}function dn(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function pn(t){var e=Le(t);return (e.local?dn:fn)(e)}function gn(){return null}function yn(){var t=this.parentNode;t&&t.removeChild(this);}function mn(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function bn(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function vn(t){return t.trim().split(/^|\\s+/).map((function(t){var e=\"\",n=t.indexOf(\".\");return n>=0&&(e=t.slice(n+1),t=t.slice(0,n)),{type:t,name:e}}))}function _n(t){return function(){var e=this.__on;if(e){for(var n,r=0,i=-1,a=e.length;r<a;++r)n=e[r],t.type&&n.type!==t.type||n.name!==t.name?e[++i]=n:this.removeEventListener(n.type,n.listener,n.options);++i?e.length=i:delete this.__on;}}}function xn(t,e,n){return function(){var r,i=this.__on,a=function(t){return function(e){t.call(this,e,this.__data__);}}(e);if(i)for(var o=0,s=i.length;o<s;++o)if((r=i[o]).type===t.type&&r.name===t.name)return this.removeEventListener(r.type,r.listener,r.options),this.addEventListener(r.type,r.listener=a,r.options=n),void(r.value=e);this.addEventListener(t.type,a,n),r={type:t.type,name:t.name,value:e,listener:a,options:n},i?i.push(r):this.__on=[r];}}function kn(t,e,n){var r=Ye(t),i=r.CustomEvent;\"function\"==typeof i?i=new i(e,n):(i=r.document.createEvent(\"Event\"),n?(i.initEvent(e,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(e,!1,!1)),t.dispatchEvent(i);}function wn(t,e){return function(){return kn(this,t,e)}}function Tn(t,e){return function(){return kn(this,t,e.apply(this,arguments))}}Qe.prototype={add:function(t){this._names.indexOf(t)<0&&(this._names.push(t),this._node.setAttribute(\"class\",this._names.join(\" \")));},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute(\"class\",this._names.join(\" \")));},contains:function(t){return this._names.indexOf(t)>=0}};var En=[null];function Cn(t,e){this._groups=t,this._parents=e;}function Sn(){return new Cn([[document.documentElement]],En)}Cn.prototype=Sn.prototype={constructor:Cn,select:function(t){\"function\"!=typeof t&&(t=pe(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var a,o,s=e[i],c=s.length,l=r[i]=new Array(c),u=0;u<c;++u)(a=s[u])&&(o=t.call(a,a.__data__,u,s))&&(\"__data__\"in a&&(o.__data__=a.__data__),l[u]=o);return new Cn(r,this._parents)},selectAll:function(t){t=\"function\"==typeof t?function(t){return function(){return ge(t.apply(this,arguments))}}(t):me(t);for(var e=this._groups,n=e.length,r=[],i=[],a=0;a<n;++a)for(var o,s=e[a],c=s.length,l=0;l<c;++l)(o=s[l])&&(r.push(t.call(o,o.__data__,l,s)),i.push(o));return new Cn(r,i)},selectChild:function(t){return this.select(null==t?xe:function(t){return function(){return _e.call(this.children,t)}}(\"function\"==typeof t?t:ve(t)))},selectChildren:function(t){return this.selectAll(null==t?we:function(t){return function(){return ke.call(this.children,t)}}(\"function\"==typeof t?t:ve(t)))},filter:function(t){\"function\"!=typeof t&&(t=be(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var a,o=e[i],s=o.length,c=r[i]=[],l=0;l<s;++l)(a=o[l])&&t.call(a,a.__data__,l,o)&&c.push(a);return new Cn(r,this._parents)},data:function(t,e){if(!arguments.length)return Array.from(this,Me);var n=e?Ae:Se,r=this._parents,i=this._groups;\"function\"!=typeof t&&(t=Ce(t));for(var a=i.length,o=new Array(a),s=new Array(a),c=new Array(a),l=0;l<a;++l){var u=r[l],h=i[l],f=h.length,d=Ne(t.call(u,u&&u.__data__,l,r)),p=d.length,g=s[l]=new Array(p),y=o[l]=new Array(p),m=c[l]=new Array(f);n(u,h,g,y,m,d,e);for(var b,v,_=0,x=0;_<p;++_)if(b=g[_]){for(_>=x&&(x=_+1);!(v=y[x])&&++x<p;);b._next=v||null;}}return (o=new Cn(o,r))._enter=s,o._exit=c,o},enter:function(){return new Cn(this._enter||this._groups.map(Te),this._parents)},exit:function(){return new Cn(this._exit||this._groups.map(Te),this._parents)},join:function(t,e,n){var r=this.enter(),i=this,a=this.exit();return \"function\"==typeof t?(r=t(r))&&(r=r.selection()):r=r.append(t+\"\"),null!=e&&(i=e(i))&&(i=i.selection()),null==n?a.remove():n(a),r&&i?r.merge(i).order():i},merge:function(t){for(var e=t.selection?t.selection():t,n=this._groups,r=e._groups,i=n.length,a=r.length,o=Math.min(i,a),s=new Array(i),c=0;c<o;++c)for(var l,u=n[c],h=r[c],f=u.length,d=s[c]=new Array(f),p=0;p<f;++p)(l=u[p]||h[p])&&(d[p]=l);for(;c<i;++c)s[c]=n[c];return new Cn(s,this._parents)},selection:function(){return this},order:function(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var r,i=t[e],a=i.length-1,o=i[a];--a>=0;)(r=i[a])&&(o&&4^r.compareDocumentPosition(o)&&o.parentNode.insertBefore(r,o),o=r);return this},sort:function(t){function e(e,n){return e&&n?t(e.__data__,n.__data__):!e-!n}t||(t=Oe);for(var n=this._groups,r=n.length,i=new Array(r),a=0;a<r;++a){for(var o,s=n[a],c=s.length,l=i[a]=new Array(c),u=0;u<c;++u)(o=s[u])&&(l[u]=o);l.sort(e);}return new Cn(i,this._parents).order()},call:function(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this},nodes:function(){return Array.from(this)},node:function(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],i=0,a=r.length;i<a;++i){var o=r[i];if(o)return o}return null},size:function(){let t=0;for(const e of this)++t;return t},empty:function(){return !this.node()},each:function(t){for(var e=this._groups,n=0,r=e.length;n<r;++n)for(var i,a=e[n],o=0,s=a.length;o<s;++o)(i=a[o])&&t.call(i,i.__data__,o,a);return this},attr:function(t,e){var n=Le(t);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((null==e?n.local?Fe:Ie:\"function\"==typeof e?n.local?ze:je:n.local?Pe:Re)(n,e))},style:function(t,e,n){return arguments.length>1?this.each((null==e?Ue:\"function\"==typeof e?We:$e)(t,e,null==n?\"\":n)):qe(this.node(),t)},property:function(t,e){return arguments.length>1?this.each((null==e?He:\"function\"==typeof e?Ge:Ve)(t,e)):this.node()[t]},classed:function(t,e){var n=Xe(t+\"\");if(arguments.length<2){for(var r=Ze(this.node()),i=-1,a=n.length;++i<a;)if(!r.contains(n[i]))return !1;return !0}return this.each((\"function\"==typeof e?nn:e?tn:en)(n,e))},text:function(t){return arguments.length?this.each(null==t?rn:(\"function\"==typeof t?on:an)(t)):this.node().textContent},html:function(t){return arguments.length?this.each(null==t?sn:(\"function\"==typeof t?ln:cn)(t)):this.node().innerHTML},raise:function(){return this.each(un)},lower:function(){return this.each(hn)},append:function(t){var e=\"function\"==typeof t?t:pn(t);return this.select((function(){return this.appendChild(e.apply(this,arguments))}))},insert:function(t,e){var n=\"function\"==typeof t?t:pn(t),r=null==e?gn:\"function\"==typeof e?e:pe(e);return this.select((function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)}))},remove:function(){return this.each(yn)},clone:function(t){return this.select(t?bn:mn)},datum:function(t){return arguments.length?this.property(\"__data__\",t):this.node().__data__},on:function(t,e,n){var r,i,a=vn(t+\"\"),o=a.length;if(!(arguments.length<2)){for(s=e?xn:_n,r=0;r<o;++r)this.each(s(a[r],e,n));return this}var s=this.node().__on;if(s)for(var c,l=0,u=s.length;l<u;++l)for(r=0,c=s[l];r<o;++r)if((i=a[r]).type===c.type&&i.name===c.name)return c.value},dispatch:function(t,e){return this.each((\"function\"==typeof e?Tn:wn)(t,e))},[Symbol.iterator]:function*(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r,i=t[e],a=0,o=i.length;a<o;++a)(r=i[a])&&(yield r);}};const An=Sn;function Mn(t){return \"string\"==typeof t?new Cn([[document.querySelector(t)]],[document.documentElement]):new Cn([[t]],En)}const Nn={passive:!1},On={capture:!0,passive:!1};function Dn(t){t.stopImmediatePropagation();}function Bn(t){t.preventDefault(),t.stopImmediatePropagation();}function Ln(t){var e=t.document.documentElement,n=Mn(t).on(\"dragstart.drag\",Bn,On);\"onselectstart\"in e?n.on(\"selectstart.drag\",Bn,On):(e.__noselect=e.style.MozUserSelect,e.style.MozUserSelect=\"none\");}function In(t,e){var n=t.document.documentElement,r=Mn(t).on(\"dragstart.drag\",null);e&&(r.on(\"click.drag\",Bn,On),setTimeout((function(){r.on(\"click.drag\",null);}),0)),\"onselectstart\"in n?r.on(\"selectstart.drag\",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect);}function Fn(t,e,n){t.prototype=e.prototype=n,n.constructor=t;}function Rn(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function Pn(){}var jn=.7,zn=1/jn,Yn=\"\\\\s*([+-]?\\\\d+)\\\\s*\",Un=\"\\\\s*([+-]?\\\\d*\\\\.?\\\\d+(?:[eE][+-]?\\\\d+)?)\\\\s*\",$n=\"\\\\s*([+-]?\\\\d*\\\\.?\\\\d+(?:[eE][+-]?\\\\d+)?)%\\\\s*\",Wn=/^#([0-9a-f]{3,8})$/,qn=new RegExp(\"^rgb\\\\(\"+[Yn,Yn,Yn]+\"\\\\)$\"),Hn=new RegExp(\"^rgb\\\\(\"+[$n,$n,$n]+\"\\\\)$\"),Vn=new RegExp(\"^rgba\\\\(\"+[Yn,Yn,Yn,Un]+\"\\\\)$\"),Gn=new RegExp(\"^rgba\\\\(\"+[$n,$n,$n,Un]+\"\\\\)$\"),Xn=new RegExp(\"^hsl\\\\(\"+[Un,$n,$n]+\"\\\\)$\"),Zn=new RegExp(\"^hsla\\\\(\"+[Un,$n,$n,Un]+\"\\\\)$\"),Qn={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function Kn(){return this.rgb().formatHex()}function Jn(){return this.rgb().formatRgb()}function tr(t){var e,n;return t=(t+\"\").trim().toLowerCase(),(e=Wn.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?er(e):3===n?new ar(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?nr(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?nr(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=qn.exec(t))?new ar(e[1],e[2],e[3],1):(e=Hn.exec(t))?new ar(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=Vn.exec(t))?nr(e[1],e[2],e[3],e[4]):(e=Gn.exec(t))?nr(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=Xn.exec(t))?lr(e[1],e[2]/100,e[3]/100,1):(e=Zn.exec(t))?lr(e[1],e[2]/100,e[3]/100,e[4]):Qn.hasOwnProperty(t)?er(Qn[t]):\"transparent\"===t?new ar(NaN,NaN,NaN,0):null}function er(t){return new ar(t>>16&255,t>>8&255,255&t,1)}function nr(t,e,n,r){return r<=0&&(t=e=n=NaN),new ar(t,e,n,r)}function rr(t){return t instanceof Pn||(t=tr(t)),t?new ar((t=t.rgb()).r,t.g,t.b,t.opacity):new ar}function ir(t,e,n,r){return 1===arguments.length?rr(t):new ar(t,e,n,null==r?1:r)}function ar(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r;}function or(){return \"#\"+cr(this.r)+cr(this.g)+cr(this.b)}function sr(){var t=this.opacity;return (1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?\"rgb(\":\"rgba(\")+Math.max(0,Math.min(255,Math.round(this.r)||0))+\", \"+Math.max(0,Math.min(255,Math.round(this.g)||0))+\", \"+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===t?\")\":\", \"+t+\")\")}function cr(t){return ((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?\"0\":\"\")+t.toString(16)}function lr(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new fr(t,e,n,r)}function ur(t){if(t instanceof fr)return new fr(t.h,t.s,t.l,t.opacity);if(t instanceof Pn||(t=tr(t)),!t)return new fr;if(t instanceof fr)return t;var e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),a=Math.max(e,n,r),o=NaN,s=a-i,c=(a+i)/2;return s?(o=e===a?(n-r)/s+6*(n<r):n===a?(r-e)/s+2:(e-n)/s+4,s/=c<.5?a+i:2-a-i,o*=60):s=c>0&&c<1?0:o,new fr(o,s,c,t.opacity)}function hr(t,e,n,r){return 1===arguments.length?ur(t):new fr(t,e,n,null==r?1:r)}function fr(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r;}function dr(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}function pr(t,e,n,r,i){var a=t*t,o=a*t;return ((1-3*t+3*a-o)*e+(4-6*a+3*o)*n+(1+3*t+3*a-3*o)*r+o*i)/6}function gr(t){var e=t.length-1;return function(n){var r=n<=0?n=0:n>=1?(n=1,e-1):Math.floor(n*e),i=t[r],a=t[r+1],o=r>0?t[r-1]:2*i-a,s=r<e-1?t[r+2]:2*a-i;return pr((n-r/e)*e,o,i,a,s)}}function yr(t){var e=t.length;return function(n){var r=Math.floor(((n%=1)<0?++n:n)*e),i=t[(r+e-1)%e],a=t[r%e],o=t[(r+1)%e],s=t[(r+2)%e];return pr((n-r/e)*e,i,a,o,s)}}Fn(Pn,tr,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:Kn,formatHex:Kn,formatHsl:function(){return ur(this).formatHsl()},formatRgb:Jn,toString:Jn}),Fn(ar,ir,Rn(Pn,{brighter:function(t){return t=null==t?zn:Math.pow(zn,t),new ar(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?jn:Math.pow(jn,t),new ar(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){return -.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:or,formatHex:or,formatRgb:sr,toString:sr})),Fn(fr,hr,Rn(Pn,{brighter:function(t){return t=null==t?zn:Math.pow(zn,t),new fr(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?jn:Math.pow(jn,t),new fr(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,i=2*n-r;return new ar(dr(t>=240?t-240:t+120,i,r),dr(t,i,r),dr(t<120?t+240:t-120,i,r),this.opacity)},displayable:function(){return (0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var t=this.opacity;return (1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?\"hsl(\":\"hsla(\")+(this.h||0)+\", \"+100*(this.s||0)+\"%, \"+100*(this.l||0)+\"%\"+(1===t?\")\":\", \"+t+\")\")}}));const mr=t=>()=>t;function br(t,e){return function(n){return t+n*e}}function vr(t,e){var n=e-t;return n?br(t,n>180||n<-180?n-360*Math.round(n/360):n):mr(isNaN(t)?e:t)}function _r(t,e){var n=e-t;return n?br(t,n):mr(isNaN(t)?e:t)}const xr=function t(e){var n=function(t){return 1==(t=+t)?_r:function(e,n){return n-e?function(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(r){return Math.pow(t+r*e,n)}}(e,n,t):mr(isNaN(e)?n:e)}}(e);function r(t,e){var r=n((t=ir(t)).r,(e=ir(e)).r),i=n(t.g,e.g),a=n(t.b,e.b),o=_r(t.opacity,e.opacity);return function(e){return t.r=r(e),t.g=i(e),t.b=a(e),t.opacity=o(e),t+\"\"}}return r.gamma=t,r}(1);function kr(t){return function(e){var n,r,i=e.length,a=new Array(i),o=new Array(i),s=new Array(i);for(n=0;n<i;++n)r=ir(e[n]),a[n]=r.r||0,o[n]=r.g||0,s[n]=r.b||0;return a=t(a),o=t(o),s=t(s),r.opacity=1,function(t){return r.r=a(t),r.g=o(t),r.b=s(t),r+\"\"}}}var wr=kr(gr),Tr=kr(yr);function Er(t,e){e||(e=[]);var n,r=t?Math.min(e.length,t.length):0,i=e.slice();return function(a){for(n=0;n<r;++n)i[n]=t[n]*(1-a)+e[n]*a;return i}}function Cr(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function Sr(t,e){return (Cr(e)?Er:Ar)(t,e)}function Ar(t,e){var n,r=e?e.length:0,i=t?Math.min(r,t.length):0,a=new Array(i),o=new Array(r);for(n=0;n<i;++n)a[n]=Ir(t[n],e[n]);for(;n<r;++n)o[n]=e[n];return function(t){for(n=0;n<i;++n)o[n]=a[n](t);return o}}function Mr(t,e){var n=new Date;return t=+t,e=+e,function(r){return n.setTime(t*(1-r)+e*r),n}}function Nr(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}function Or(t,e){var n,r={},i={};for(n in null!==t&&\"object\"==typeof t||(t={}),null!==e&&\"object\"==typeof e||(e={}),e)n in t?r[n]=Ir(t[n],e[n]):i[n]=e[n];return function(t){for(n in r)i[n]=r[n](t);return i}}var Dr=/[-+]?(?:\\d+\\.?\\d*|\\.?\\d+)(?:[eE][-+]?\\d+)?/g,Br=new RegExp(Dr.source,\"g\");function Lr(t,e){var n,r,i,a=Dr.lastIndex=Br.lastIndex=0,o=-1,s=[],c=[];for(t+=\"\",e+=\"\";(n=Dr.exec(t))&&(r=Br.exec(e));)(i=r.index)>a&&(i=e.slice(a,i),s[o]?s[o]+=i:s[++o]=i),(n=n[0])===(r=r[0])?s[o]?s[o]+=r:s[++o]=r:(s[++o]=null,c.push({i:o,x:Nr(n,r)})),a=Br.lastIndex;return a<e.length&&(i=e.slice(a),s[o]?s[o]+=i:s[++o]=i),s.length<2?c[0]?function(t){return function(e){return t(e)+\"\"}}(c[0].x):function(t){return function(){return t}}(e):(e=c.length,function(t){for(var n,r=0;r<e;++r)s[(n=c[r]).i]=n.x(t);return s.join(\"\")})}function Ir(t,e){var n,r=typeof e;return null==e||\"boolean\"===r?mr(e):(\"number\"===r?Nr:\"string\"===r?(n=tr(e))?(e=n,xr):Lr:e instanceof tr?xr:e instanceof Date?Mr:Cr(e)?Er:Array.isArray(e)?Ar:\"function\"!=typeof e.valueOf&&\"function\"!=typeof e.toString||isNaN(e)?Or:Nr)(t,e)}function Fr(t){let e;for(;e=t.sourceEvent;)t=e;return t}function Rr(t,e){if(t=Fr(t),void 0===e&&(e=t.currentTarget),e){var n=e.ownerSVGElement||e;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=t.clientX,r.y=t.clientY,[(r=r.matrixTransform(e.getScreenCTM().inverse())).x,r.y]}if(e.getBoundingClientRect){var i=e.getBoundingClientRect();return [t.clientX-i.left-e.clientLeft,t.clientY-i.top-e.clientTop]}}return [t.pageX,t.pageY]}var Pr,jr,zr=0,Yr=0,Ur=0,$r=0,Wr=0,qr=0,Hr=\"object\"==typeof performance&&performance.now?performance:Date,Vr=\"object\"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17);};function Gr(){return Wr||(Vr(Xr),Wr=Hr.now()+qr)}function Xr(){Wr=0;}function Zr(){this._call=this._time=this._next=null;}function Qr(t,e,n){var r=new Zr;return r.restart(t,e,n),r}function Kr(){Gr(),++zr;for(var t,e=Pr;e;)(t=Wr-e._time)>=0&&e._call.call(void 0,t),e=e._next;--zr;}function Jr(){Wr=($r=Hr.now())+qr,zr=Yr=0;try{Kr();}finally{zr=0,function(){for(var t,e,n=Pr,r=1/0;n;)n._call?(r>n._time&&(r=n._time),t=n,n=n._next):(e=n._next,n._next=null,n=t?t._next=e:Pr=e);jr=t,ei(r);}(),Wr=0;}}function ti(){var t=Hr.now(),e=t-$r;e>1e3&&(qr-=e,$r=t);}function ei(t){zr||(Yr&&(Yr=clearTimeout(Yr)),t-Wr>24?(t<1/0&&(Yr=setTimeout(Jr,t-Hr.now()-qr)),Ur&&(Ur=clearInterval(Ur))):(Ur||($r=Hr.now(),Ur=setInterval(ti,1e3)),zr=1,Vr(Jr)));}function ni(t,e,n){var r=new Zr;return e=null==e?0:+e,r.restart((n=>{r.stop(),t(n+e);}),e,n),r}Zr.prototype=Qr.prototype={constructor:Zr,restart:function(t,e,n){if(\"function\"!=typeof t)throw new TypeError(\"callback is not a function\");n=(null==n?Gr():+n)+(null==e?0:+e),this._next||jr===this||(jr?jr._next=this:Pr=this,jr=this),this._call=t,this._time=n,ei();},stop:function(){this._call&&(this._call=null,this._time=1/0,ei());}};var ri=fe(\"start\",\"end\",\"cancel\",\"interrupt\"),ii=[];function ai(t,e,n,r,i,a){var o=t.__transition;if(o){if(n in o)return}else t.__transition={};!function(t,e,n){var r,i=t.__transition;function a(c){var l,u,h,f;if(1!==n.state)return s();for(l in i)if((f=i[l]).name===n.name){if(3===f.state)return ni(a);4===f.state?(f.state=6,f.timer.stop(),f.on.call(\"interrupt\",t,t.__data__,f.index,f.group),delete i[l]):+l<e&&(f.state=6,f.timer.stop(),f.on.call(\"cancel\",t,t.__data__,f.index,f.group),delete i[l]);}if(ni((function(){3===n.state&&(n.state=4,n.timer.restart(o,n.delay,n.time),o(c));})),n.state=2,n.on.call(\"start\",t,t.__data__,n.index,n.group),2===n.state){for(n.state=3,r=new Array(h=n.tween.length),l=0,u=-1;l<h;++l)(f=n.tween[l].value.call(t,t.__data__,n.index,n.group))&&(r[++u]=f);r.length=u+1;}}function o(e){for(var i=e<n.duration?n.ease.call(null,e/n.duration):(n.timer.restart(s),n.state=5,1),a=-1,o=r.length;++a<o;)r[a].call(t,i);5===n.state&&(n.on.call(\"end\",t,t.__data__,n.index,n.group),s());}function s(){for(var r in n.state=6,n.timer.stop(),delete i[e],i)return;delete t.__transition;}i[e]=n,n.timer=Qr((function(t){n.state=1,n.timer.restart(a,n.delay,n.time),n.delay<=t&&a(t-n.delay);}),0,n.time);}(t,n,{name:e,index:r,group:i,on:ri,tween:ii,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:0});}function oi(t,e){var n=ci(t,e);if(n.state>0)throw new Error(\"too late; already scheduled\");return n}function si(t,e){var n=ci(t,e);if(n.state>3)throw new Error(\"too late; already running\");return n}function ci(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error(\"transition not found\");return n}function li(t,e){var n,r,i,a=t.__transition,o=!0;if(a){for(i in e=null==e?null:e+\"\",a)(n=a[i]).name===e?(r=n.state>2&&n.state<5,n.state=6,n.timer.stop(),n.on.call(r?\"interrupt\":\"cancel\",t,t.__data__,n.index,n.group),delete a[i]):o=!1;o&&delete t.__transition;}}var ui,hi=180/Math.PI,fi={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function di(t,e,n,r,i,a){var o,s,c;return (o=Math.sqrt(t*t+e*e))&&(t/=o,e/=o),(c=t*n+e*r)&&(n-=t*c,r-=e*c),(s=Math.sqrt(n*n+r*r))&&(n/=s,r/=s,c/=s),t*r<e*n&&(t=-t,e=-e,c=-c,o=-o),{translateX:i,translateY:a,rotate:Math.atan2(e,t)*hi,skewX:Math.atan(c)*hi,scaleX:o,scaleY:s}}function pi(t,e,n,r){function i(t){return t.length?t.pop()+\" \":\"\"}return function(a,o){var s=[],c=[];return a=t(a),o=t(o),function(t,r,i,a,o,s){if(t!==i||r!==a){var c=o.push(\"translate(\",null,e,null,n);s.push({i:c-4,x:Nr(t,i)},{i:c-2,x:Nr(r,a)});}else (i||a)&&o.push(\"translate(\"+i+e+a+n);}(a.translateX,a.translateY,o.translateX,o.translateY,s,c),function(t,e,n,a){t!==e?(t-e>180?e+=360:e-t>180&&(t+=360),a.push({i:n.push(i(n)+\"rotate(\",null,r)-2,x:Nr(t,e)})):e&&n.push(i(n)+\"rotate(\"+e+r);}(a.rotate,o.rotate,s,c),function(t,e,n,a){t!==e?a.push({i:n.push(i(n)+\"skewX(\",null,r)-2,x:Nr(t,e)}):e&&n.push(i(n)+\"skewX(\"+e+r);}(a.skewX,o.skewX,s,c),function(t,e,n,r,a,o){if(t!==n||e!==r){var s=a.push(i(a)+\"scale(\",null,\",\",null,\")\");o.push({i:s-4,x:Nr(t,n)},{i:s-2,x:Nr(e,r)});}else 1===n&&1===r||a.push(i(a)+\"scale(\"+n+\",\"+r+\")\");}(a.scaleX,a.scaleY,o.scaleX,o.scaleY,s,c),a=o=null,function(t){for(var e,n=-1,r=c.length;++n<r;)s[(e=c[n]).i]=e.x(t);return s.join(\"\")}}}var gi=pi((function(t){const e=new(\"function\"==typeof DOMMatrix?DOMMatrix:WebKitCSSMatrix)(t+\"\");return e.isIdentity?fi:di(e.a,e.b,e.c,e.d,e.e,e.f)}),\"px, \",\"px)\",\"deg)\"),yi=pi((function(t){return null==t?fi:(ui||(ui=document.createElementNS(\"http://www.w3.org/2000/svg\",\"g\")),ui.setAttribute(\"transform\",t),(t=ui.transform.baseVal.consolidate())?di((t=t.matrix).a,t.b,t.c,t.d,t.e,t.f):fi)}),\", \",\")\",\")\");function mi(t,e){var n,r;return function(){var i=si(this,t),a=i.tween;if(a!==n)for(var o=0,s=(r=n=a).length;o<s;++o)if(r[o].name===e){(r=r.slice()).splice(o,1);break}i.tween=r;}}function bi(t,e,n){var r,i;if(\"function\"!=typeof n)throw new Error;return function(){var a=si(this,t),o=a.tween;if(o!==r){i=(r=o).slice();for(var s={name:e,value:n},c=0,l=i.length;c<l;++c)if(i[c].name===e){i[c]=s;break}c===l&&i.push(s);}a.tween=i;}}function vi(t,e,n){var r=t._id;return t.each((function(){var t=si(this,r);(t.value||(t.value={}))[e]=n.apply(this,arguments);})),function(t){return ci(t,r).value[e]}}function _i(t,e){var n;return (\"number\"==typeof e?Nr:e instanceof tr?xr:(n=tr(e))?(e=n,xr):Lr)(t,e)}function xi(t){return function(){this.removeAttribute(t);}}function ki(t){return function(){this.removeAttributeNS(t.space,t.local);}}function wi(t,e,n){var r,i,a=n+\"\";return function(){var o=this.getAttribute(t);return o===a?null:o===r?i:i=e(r=o,n)}}function Ti(t,e,n){var r,i,a=n+\"\";return function(){var o=this.getAttributeNS(t.space,t.local);return o===a?null:o===r?i:i=e(r=o,n)}}function Ei(t,e,n){var r,i,a;return function(){var o,s,c=n(this);if(null!=c)return (o=this.getAttribute(t))===(s=c+\"\")?null:o===r&&s===i?a:(i=s,a=e(r=o,c));this.removeAttribute(t);}}function Ci(t,e,n){var r,i,a;return function(){var o,s,c=n(this);if(null!=c)return (o=this.getAttributeNS(t.space,t.local))===(s=c+\"\")?null:o===r&&s===i?a:(i=s,a=e(r=o,c));this.removeAttributeNS(t.space,t.local);}}function Si(t,e){return function(n){this.setAttribute(t,e.call(this,n));}}function Ai(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n));}}function Mi(t,e){var n,r;function i(){var i=e.apply(this,arguments);return i!==r&&(n=(r=i)&&Ai(t,i)),n}return i._value=e,i}function Ni(t,e){var n,r;function i(){var i=e.apply(this,arguments);return i!==r&&(n=(r=i)&&Si(t,i)),n}return i._value=e,i}function Oi(t,e){return function(){oi(this,t).delay=+e.apply(this,arguments);}}function Di(t,e){return e=+e,function(){oi(this,t).delay=e;}}function Bi(t,e){return function(){si(this,t).duration=+e.apply(this,arguments);}}function Li(t,e){return e=+e,function(){si(this,t).duration=e;}}function Ii(t,e){if(\"function\"!=typeof e)throw new Error;return function(){si(this,t).ease=e;}}function Fi(t,e,n){var r,i,a=function(t){return (t+\"\").trim().split(/^|\\s+/).every((function(t){var e=t.indexOf(\".\");return e>=0&&(t=t.slice(0,e)),!t||\"start\"===t}))}(e)?oi:si;return function(){var o=a(this,t),s=o.on;s!==r&&(i=(r=s).copy()).on(e,n),o.on=i;}}var Ri=An.prototype.constructor;function Pi(t){return function(){this.style.removeProperty(t);}}function ji(t,e,n){return function(r){this.style.setProperty(t,e.call(this,r),n);}}function zi(t,e,n){var r,i;function a(){var a=e.apply(this,arguments);return a!==i&&(r=(i=a)&&ji(t,a,n)),r}return a._value=e,a}function Yi(t){return function(e){this.textContent=t.call(this,e);}}function Ui(t){var e,n;function r(){var r=t.apply(this,arguments);return r!==n&&(e=(n=r)&&Yi(r)),e}return r._value=t,r}var $i=0;function Wi(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r;}function qi(t){return An().transition(t)}function Hi(){return ++$i}var Vi=An.prototype;function Gi(t){return t*t*t}function Xi(t){return --t*t*t+1}function Zi(t){return ((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}Wi.prototype=qi.prototype={constructor:Wi,select:function(t){var e=this._name,n=this._id;\"function\"!=typeof t&&(t=pe(t));for(var r=this._groups,i=r.length,a=new Array(i),o=0;o<i;++o)for(var s,c,l=r[o],u=l.length,h=a[o]=new Array(u),f=0;f<u;++f)(s=l[f])&&(c=t.call(s,s.__data__,f,l))&&(\"__data__\"in s&&(c.__data__=s.__data__),h[f]=c,ai(h[f],e,n,f,h,ci(s,n)));return new Wi(a,this._parents,e,n)},selectAll:function(t){var e=this._name,n=this._id;\"function\"!=typeof t&&(t=me(t));for(var r=this._groups,i=r.length,a=[],o=[],s=0;s<i;++s)for(var c,l=r[s],u=l.length,h=0;h<u;++h)if(c=l[h]){for(var f,d=t.call(c,c.__data__,h,l),p=ci(c,n),g=0,y=d.length;g<y;++g)(f=d[g])&&ai(f,e,n,g,d,p);a.push(d),o.push(c);}return new Wi(a,o,e,n)},selectChild:Vi.selectChild,selectChildren:Vi.selectChildren,filter:function(t){\"function\"!=typeof t&&(t=be(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var a,o=e[i],s=o.length,c=r[i]=[],l=0;l<s;++l)(a=o[l])&&t.call(a,a.__data__,l,o)&&c.push(a);return new Wi(r,this._parents,this._name,this._id)},merge:function(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,n=t._groups,r=e.length,i=n.length,a=Math.min(r,i),o=new Array(r),s=0;s<a;++s)for(var c,l=e[s],u=n[s],h=l.length,f=o[s]=new Array(h),d=0;d<h;++d)(c=l[d]||u[d])&&(f[d]=c);for(;s<r;++s)o[s]=e[s];return new Wi(o,this._parents,this._name,this._id)},selection:function(){return new Ri(this._groups,this._parents)},transition:function(){for(var t=this._name,e=this._id,n=Hi(),r=this._groups,i=r.length,a=0;a<i;++a)for(var o,s=r[a],c=s.length,l=0;l<c;++l)if(o=s[l]){var u=ci(o,e);ai(o,t,n,l,s,{time:u.time+u.delay+u.duration,delay:0,duration:u.duration,ease:u.ease});}return new Wi(r,this._parents,t,n)},call:Vi.call,nodes:Vi.nodes,node:Vi.node,size:Vi.size,empty:Vi.empty,each:Vi.each,on:function(t,e){var n=this._id;return arguments.length<2?ci(this.node(),n).on.on(t):this.each(Fi(n,t,e))},attr:function(t,e){var n=Le(t),r=\"transform\"===n?yi:_i;return this.attrTween(t,\"function\"==typeof e?(n.local?Ci:Ei)(n,r,vi(this,\"attr.\"+t,e)):null==e?(n.local?ki:xi)(n):(n.local?Ti:wi)(n,r,e))},attrTween:function(t,e){var n=\"attr.\"+t;if(arguments.length<2)return (n=this.tween(n))&&n._value;if(null==e)return this.tween(n,null);if(\"function\"!=typeof e)throw new Error;var r=Le(t);return this.tween(n,(r.local?Mi:Ni)(r,e))},style:function(t,e,n){var r=\"transform\"==(t+=\"\")?gi:_i;return null==e?this.styleTween(t,function(t,e){var n,r,i;return function(){var a=qe(this,t),o=(this.style.removeProperty(t),qe(this,t));return a===o?null:a===n&&o===r?i:i=e(n=a,r=o)}}(t,r)).on(\"end.style.\"+t,Pi(t)):\"function\"==typeof e?this.styleTween(t,function(t,e,n){var r,i,a;return function(){var o=qe(this,t),s=n(this),c=s+\"\";return null==s&&(this.style.removeProperty(t),c=s=qe(this,t)),o===c?null:o===r&&c===i?a:(i=c,a=e(r=o,s))}}(t,r,vi(this,\"style.\"+t,e))).each(function(t,e){var n,r,i,a,o=\"style.\"+e,s=\"end.\"+o;return function(){var c=si(this,t),l=c.on,u=null==c.value[o]?a||(a=Pi(e)):void 0;l===n&&i===u||(r=(n=l).copy()).on(s,i=u),c.on=r;}}(this._id,t)):this.styleTween(t,function(t,e,n){var r,i,a=n+\"\";return function(){var o=qe(this,t);return o===a?null:o===r?i:i=e(r=o,n)}}(t,r,e),n).on(\"end.style.\"+t,null)},styleTween:function(t,e,n){var r=\"style.\"+(t+=\"\");if(arguments.length<2)return (r=this.tween(r))&&r._value;if(null==e)return this.tween(r,null);if(\"function\"!=typeof e)throw new Error;return this.tween(r,zi(t,e,null==n?\"\":n))},text:function(t){return this.tween(\"text\",\"function\"==typeof t?function(t){return function(){var e=t(this);this.textContent=null==e?\"\":e;}}(vi(this,\"text\",t)):function(t){return function(){this.textContent=t;}}(null==t?\"\":t+\"\"))},textTween:function(t){var e=\"text\";if(arguments.length<1)return (e=this.tween(e))&&e._value;if(null==t)return this.tween(e,null);if(\"function\"!=typeof t)throw new Error;return this.tween(e,Ui(t))},remove:function(){return this.on(\"end.remove\",function(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this);}}(this._id))},tween:function(t,e){var n=this._id;if(t+=\"\",arguments.length<2){for(var r,i=ci(this.node(),n).tween,a=0,o=i.length;a<o;++a)if((r=i[a]).name===t)return r.value;return null}return this.each((null==e?mi:bi)(n,t,e))},delay:function(t){var e=this._id;return arguments.length?this.each((\"function\"==typeof t?Oi:Di)(e,t)):ci(this.node(),e).delay},duration:function(t){var e=this._id;return arguments.length?this.each((\"function\"==typeof t?Bi:Li)(e,t)):ci(this.node(),e).duration},ease:function(t){var e=this._id;return arguments.length?this.each(Ii(e,t)):ci(this.node(),e).ease},easeVarying:function(t){if(\"function\"!=typeof t)throw new Error;return this.each(function(t,e){return function(){var n=e.apply(this,arguments);if(\"function\"!=typeof n)throw new Error;si(this,t).ease=n;}}(this._id,t))},end:function(){var t,e,n=this,r=n._id,i=n.size();return new Promise((function(a,o){var s={value:o},c={value:function(){0==--i&&a();}};n.each((function(){var n=si(this,r),i=n.on;i!==t&&((e=(t=i).copy())._.cancel.push(s),e._.interrupt.push(s),e._.end.push(c)),n.on=e;})),0===i&&a();}))},[Symbol.iterator]:Vi[Symbol.iterator]};var Qi={time:null,delay:0,duration:250,ease:Zi};function Ki(t,e){for(var n;!(n=t.__transition)||!(n=n[e]);)if(!(t=t.parentNode))throw new Error(`transition ${e} not found`);return n}An.prototype.interrupt=function(t){return this.each((function(){li(this,t);}))},An.prototype.transition=function(t){var e,n;t instanceof Wi?(e=t._id,t=t._name):(e=Hi(),(n=Qi).time=Gr(),t=null==t?null:t+\"\");for(var r=this._groups,i=r.length,a=0;a<i;++a)for(var o,s=r[a],c=s.length,l=0;l<c;++l)(o=s[l])&&ai(o,t,e,l,s,n||Ki(o,e));return new Wi(r,this._parents,t,e)};var Ji=[null];function ta(t,e){var n,r,i=t.__transition;if(i)for(r in e=null==e?null:e+\"\",i)if((n=i[r]).state>1&&n.name===e)return new Wi([[t]],Ji,e,+r);return null}const ea=t=>()=>t;function na(t,{sourceEvent:e,target:n,selection:r,mode:i,dispatch:a}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:e,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},selection:{value:r,enumerable:!0,configurable:!0},mode:{value:i,enumerable:!0,configurable:!0},_:{value:a}});}function ra(t){t.stopImmediatePropagation();}function ia(t){t.preventDefault(),t.stopImmediatePropagation();}var aa={name:\"drag\"},oa={name:\"space\"},sa={name:\"handle\"},ca={name:\"center\"};const{abs:la,max:ua,min:ha}=Math;function fa(t){return [+t[0],+t[1]]}function da(t){return [fa(t[0]),fa(t[1])]}var pa={name:\"x\",handles:[\"w\",\"e\"].map(ka),input:function(t,e){return null==t?null:[[+t[0],e[0][1]],[+t[1],e[1][1]]]},output:function(t){return t&&[t[0][0],t[1][0]]}},ga={name:\"y\",handles:[\"n\",\"s\"].map(ka),input:function(t,e){return null==t?null:[[e[0][0],+t[0]],[e[1][0],+t[1]]]},output:function(t){return t&&[t[0][1],t[1][1]]}},ya={name:\"xy\",handles:[\"n\",\"w\",\"e\",\"s\",\"nw\",\"ne\",\"sw\",\"se\"].map(ka),input:function(t){return null==t?null:da(t)},output:function(t){return t}},ma={overlay:\"crosshair\",selection:\"move\",n:\"ns-resize\",e:\"ew-resize\",s:\"ns-resize\",w:\"ew-resize\",nw:\"nwse-resize\",ne:\"nesw-resize\",se:\"nwse-resize\",sw:\"nesw-resize\"},ba={e:\"w\",w:\"e\",nw:\"ne\",ne:\"nw\",se:\"sw\",sw:\"se\"},va={n:\"s\",s:\"n\",nw:\"sw\",ne:\"se\",se:\"ne\",sw:\"nw\"},_a={overlay:1,selection:1,n:null,e:1,s:null,w:-1,nw:-1,ne:1,se:1,sw:-1},xa={overlay:1,selection:1,n:-1,e:null,s:1,w:null,nw:-1,ne:-1,se:1,sw:1};function ka(t){return {type:t}}function wa(t){return !t.ctrlKey&&!t.button}function Ta(){var t=this.ownerSVGElement||this;return t.hasAttribute(\"viewBox\")?[[(t=t.viewBox.baseVal).x,t.y],[t.x+t.width,t.y+t.height]]:[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]}function Ea(){return navigator.maxTouchPoints||\"ontouchstart\"in this}function Ca(t){for(;!t.__brush;)if(!(t=t.parentNode))return;return t.__brush}function Sa(t){return t[0][0]===t[1][0]||t[0][1]===t[1][1]}function Aa(t){var e=t.__brush;return e?e.dim.output(e.selection):null}function Ma(){return Da(pa)}function Na(){return Da(ga)}function Oa(){return Da(ya)}function Da(t){var e,n=Ta,r=wa,i=Ea,a=!0,o=fe(\"start\",\"brush\",\"end\"),s=6;function c(e){var n=e.property(\"__brush\",g).selectAll(\".overlay\").data([ka(\"overlay\")]);n.enter().append(\"rect\").attr(\"class\",\"overlay\").attr(\"pointer-events\",\"all\").attr(\"cursor\",ma.overlay).merge(n).each((function(){var t=Ca(this).extent;Mn(this).attr(\"x\",t[0][0]).attr(\"y\",t[0][1]).attr(\"width\",t[1][0]-t[0][0]).attr(\"height\",t[1][1]-t[0][1]);})),e.selectAll(\".selection\").data([ka(\"selection\")]).enter().append(\"rect\").attr(\"class\",\"selection\").attr(\"cursor\",ma.selection).attr(\"fill\",\"#777\").attr(\"fill-opacity\",.3).attr(\"stroke\",\"#fff\").attr(\"shape-rendering\",\"crispEdges\");var r=e.selectAll(\".handle\").data(t.handles,(function(t){return t.type}));r.exit().remove(),r.enter().append(\"rect\").attr(\"class\",(function(t){return \"handle handle--\"+t.type})).attr(\"cursor\",(function(t){return ma[t.type]})),e.each(l).attr(\"fill\",\"none\").attr(\"pointer-events\",\"all\").on(\"mousedown.brush\",f).filter(i).on(\"touchstart.brush\",f).on(\"touchmove.brush\",d).on(\"touchend.brush touchcancel.brush\",p).style(\"touch-action\",\"none\").style(\"-webkit-tap-highlight-color\",\"rgba(0,0,0,0)\");}function l(){var t=Mn(this),e=Ca(this).selection;e?(t.selectAll(\".selection\").style(\"display\",null).attr(\"x\",e[0][0]).attr(\"y\",e[0][1]).attr(\"width\",e[1][0]-e[0][0]).attr(\"height\",e[1][1]-e[0][1]),t.selectAll(\".handle\").style(\"display\",null).attr(\"x\",(function(t){return \"e\"===t.type[t.type.length-1]?e[1][0]-s/2:e[0][0]-s/2})).attr(\"y\",(function(t){return \"s\"===t.type[0]?e[1][1]-s/2:e[0][1]-s/2})).attr(\"width\",(function(t){return \"n\"===t.type||\"s\"===t.type?e[1][0]-e[0][0]+s:s})).attr(\"height\",(function(t){return \"e\"===t.type||\"w\"===t.type?e[1][1]-e[0][1]+s:s}))):t.selectAll(\".selection,.handle\").style(\"display\",\"none\").attr(\"x\",null).attr(\"y\",null).attr(\"width\",null).attr(\"height\",null);}function u(t,e,n){var r=t.__brush.emitter;return !r||n&&r.clean?new h(t,e,n):r}function h(t,e,n){this.that=t,this.args=e,this.state=t.__brush,this.active=0,this.clean=n;}function f(n){if((!e||n.touches)&&r.apply(this,arguments)){var i,o,s,c,h,f,d,p,g,y,m,b=this,v=n.target.__data__.type,_=\"selection\"===(a&&n.metaKey?v=\"overlay\":v)?aa:a&&n.altKey?ca:sa,x=t===ga?null:_a[v],k=t===pa?null:xa[v],w=Ca(b),T=w.extent,E=w.selection,C=T[0][0],S=T[0][1],A=T[1][0],M=T[1][1],N=0,O=0,D=x&&k&&a&&n.shiftKey,B=Array.from(n.touches||[n],(t=>{const e=t.identifier;return (t=Rr(t,b)).point0=t.slice(),t.identifier=e,t}));li(b);var L=u(b,arguments,!0).beforestart();if(\"overlay\"===v){E&&(g=!0);const e=[B[0],B[1]||B[0]];w.selection=E=[[i=t===ga?C:ha(e[0][0],e[1][0]),s=t===pa?S:ha(e[0][1],e[1][1])],[h=t===ga?A:ua(e[0][0],e[1][0]),d=t===pa?M:ua(e[0][1],e[1][1])]],B.length>1&&j(n);}else i=E[0][0],s=E[0][1],h=E[1][0],d=E[1][1];o=i,c=s,f=h,p=d;var I=Mn(b).attr(\"pointer-events\",\"none\"),F=I.selectAll(\".overlay\").attr(\"cursor\",ma[v]);if(n.touches)L.moved=P,L.ended=z;else {var R=Mn(n.view).on(\"mousemove.brush\",P,!0).on(\"mouseup.brush\",z,!0);a&&R.on(\"keydown.brush\",Y,!0).on(\"keyup.brush\",U,!0),Ln(n.view);}l.call(b),L.start(n,_.name);}function P(t){for(const e of t.changedTouches||[t])for(const t of B)t.identifier===e.identifier&&(t.cur=Rr(e,b));if(D&&!y&&!m&&1===B.length){const t=B[0];la(t.cur[0]-t[0])>la(t.cur[1]-t[1])?m=!0:y=!0;}for(const t of B)t.cur&&(t[0]=t.cur[0],t[1]=t.cur[1]);g=!0,ia(t),j(t);}function j(t){const e=B[0],n=e.point0;var r;switch(N=e[0]-n[0],O=e[1]-n[1],_){case oa:case aa:x&&(N=ua(C-i,ha(A-h,N)),o=i+N,f=h+N),k&&(O=ua(S-s,ha(M-d,O)),c=s+O,p=d+O);break;case sa:B[1]?(x&&(o=ua(C,ha(A,B[0][0])),f=ua(C,ha(A,B[1][0])),x=1),k&&(c=ua(S,ha(M,B[0][1])),p=ua(S,ha(M,B[1][1])),k=1)):(x<0?(N=ua(C-i,ha(A-i,N)),o=i+N,f=h):x>0&&(N=ua(C-h,ha(A-h,N)),o=i,f=h+N),k<0?(O=ua(S-s,ha(M-s,O)),c=s+O,p=d):k>0&&(O=ua(S-d,ha(M-d,O)),c=s,p=d+O));break;case ca:x&&(o=ua(C,ha(A,i-N*x)),f=ua(C,ha(A,h+N*x))),k&&(c=ua(S,ha(M,s-O*k)),p=ua(S,ha(M,d+O*k)));}f<o&&(x*=-1,r=i,i=h,h=r,r=o,o=f,f=r,v in ba&&F.attr(\"cursor\",ma[v=ba[v]])),p<c&&(k*=-1,r=s,s=d,d=r,r=c,c=p,p=r,v in va&&F.attr(\"cursor\",ma[v=va[v]])),w.selection&&(E=w.selection),y&&(o=E[0][0],f=E[1][0]),m&&(c=E[0][1],p=E[1][1]),E[0][0]===o&&E[0][1]===c&&E[1][0]===f&&E[1][1]===p||(w.selection=[[o,c],[f,p]],l.call(b),L.brush(t,_.name));}function z(t){if(ra(t),t.touches){if(t.touches.length)return;e&&clearTimeout(e),e=setTimeout((function(){e=null;}),500);}else In(t.view,g),R.on(\"keydown.brush keyup.brush mousemove.brush mouseup.brush\",null);I.attr(\"pointer-events\",\"all\"),F.attr(\"cursor\",ma.overlay),w.selection&&(E=w.selection),Sa(E)&&(w.selection=null,l.call(b)),L.end(t,_.name);}function Y(t){switch(t.keyCode){case 16:D=x&&k;break;case 18:_===sa&&(x&&(h=f-N*x,i=o+N*x),k&&(d=p-O*k,s=c+O*k),_=ca,j(t));break;case 32:_!==sa&&_!==ca||(x<0?h=f-N:x>0&&(i=o-N),k<0?d=p-O:k>0&&(s=c-O),_=oa,F.attr(\"cursor\",ma.selection),j(t));break;default:return}ia(t);}function U(t){switch(t.keyCode){case 16:D&&(y=m=D=!1,j(t));break;case 18:_===ca&&(x<0?h=f:x>0&&(i=o),k<0?d=p:k>0&&(s=c),_=sa,j(t));break;case 32:_===oa&&(t.altKey?(x&&(h=f-N*x,i=o+N*x),k&&(d=p-O*k,s=c+O*k),_=ca):(x<0?h=f:x>0&&(i=o),k<0?d=p:k>0&&(s=c),_=sa),F.attr(\"cursor\",ma[v]),j(t));break;default:return}ia(t);}}function d(t){u(this,arguments).moved(t);}function p(t){u(this,arguments).ended(t);}function g(){var e=this.__brush||{selection:null};return e.extent=da(n.apply(this,arguments)),e.dim=t,e}return c.move=function(e,n,r){e.tween?e.on(\"start.brush\",(function(t){u(this,arguments).beforestart().start(t);})).on(\"interrupt.brush end.brush\",(function(t){u(this,arguments).end(t);})).tween(\"brush\",(function(){var e=this,r=e.__brush,i=u(e,arguments),a=r.selection,o=t.input(\"function\"==typeof n?n.apply(this,arguments):n,r.extent),s=Ir(a,o);function c(t){r.selection=1===t&&null===o?null:s(t),l.call(e),i.brush();}return null!==a&&null!==o?c:c(1)})):e.each((function(){var e=this,i=arguments,a=e.__brush,o=t.input(\"function\"==typeof n?n.apply(e,i):n,a.extent),s=u(e,i).beforestart();li(e),a.selection=null===o?null:o,l.call(e),s.start(r).brush(r).end(r);}));},c.clear=function(t,e){c.move(t,null,e);},h.prototype={beforestart:function(){return 1==++this.active&&(this.state.emitter=this,this.starting=!0),this},start:function(t,e){return this.starting?(this.starting=!1,this.emit(\"start\",t,e)):this.emit(\"brush\",t),this},brush:function(t,e){return this.emit(\"brush\",t,e),this},end:function(t,e){return 0==--this.active&&(delete this.state.emitter,this.emit(\"end\",t,e)),this},emit:function(e,n,r){var i=Mn(this.that).datum();o.call(e,this.that,new na(e,{sourceEvent:n,target:c,selection:t.output(this.state.selection),mode:r,dispatch:o}),i);}},c.extent=function(t){return arguments.length?(n=\"function\"==typeof t?t:ea(da(t)),c):n},c.filter=function(t){return arguments.length?(r=\"function\"==typeof t?t:ea(!!t),c):r},c.touchable=function(t){return arguments.length?(i=\"function\"==typeof t?t:ea(!!t),c):i},c.handleSize=function(t){return arguments.length?(s=+t,c):s},c.keyModifiers=function(t){return arguments.length?(a=!!t,c):a},c.on=function(){var t=o.on.apply(o,arguments);return t===o?c:t},c}var Ba=Math.abs,La=Math.cos,Ia=Math.sin,Fa=Math.PI,Ra=Fa/2,Pa=2*Fa,ja=Math.max,za=1e-12;function Ya(t,e){return Array.from({length:e-t},((e,n)=>t+n))}function Ua(t){return function(e,n){return t(e.source.value+e.target.value,n.source.value+n.target.value)}}function $a(){return Ha(!1,!1)}function Wa(){return Ha(!1,!0)}function qa(){return Ha(!0,!1)}function Ha(t,e){var n=0,r=null,i=null,a=null;function o(o){var s,c=o.length,l=new Array(c),u=Ya(0,c),h=new Array(c*c),f=new Array(c),d=0;o=Float64Array.from({length:c*c},e?(t,e)=>o[e%c][e/c|0]:(t,e)=>o[e/c|0][e%c]);for(let e=0;e<c;++e){let n=0;for(let r=0;r<c;++r)n+=o[e*c+r]+t*o[r*c+e];d+=l[e]=n;}s=(d=ja(0,Pa-n*c)/d)?n:Pa/c;{let e=0;r&&u.sort(((t,e)=>r(l[t],l[e])));for(const n of u){const r=e;if(t){const t=Ya(1+~c,c).filter((t=>t<0?o[~t*c+n]:o[n*c+t]));i&&t.sort(((t,e)=>i(t<0?-o[~t*c+n]:o[n*c+t],e<0?-o[~e*c+n]:o[n*c+e])));for(const r of t)r<0?(h[~r*c+n]||(h[~r*c+n]={source:null,target:null})).target={index:n,startAngle:e,endAngle:e+=o[~r*c+n]*d,value:o[~r*c+n]}:(h[n*c+r]||(h[n*c+r]={source:null,target:null})).source={index:n,startAngle:e,endAngle:e+=o[n*c+r]*d,value:o[n*c+r]};f[n]={index:n,startAngle:r,endAngle:e,value:l[n]};}else {const t=Ya(0,c).filter((t=>o[n*c+t]||o[t*c+n]));i&&t.sort(((t,e)=>i(o[n*c+t],o[n*c+e])));for(const r of t){let t;if(n<r?(t=h[n*c+r]||(h[n*c+r]={source:null,target:null}),t.source={index:n,startAngle:e,endAngle:e+=o[n*c+r]*d,value:o[n*c+r]}):(t=h[r*c+n]||(h[r*c+n]={source:null,target:null}),t.target={index:n,startAngle:e,endAngle:e+=o[n*c+r]*d,value:o[n*c+r]},n===r&&(t.source=t.target)),t.source&&t.target&&t.source.value<t.target.value){const e=t.source;t.source=t.target,t.target=e;}}f[n]={index:n,startAngle:r,endAngle:e,value:l[n]};}e+=s;}}return (h=Object.values(h)).groups=f,a?h.sort(a):h}return o.padAngle=function(t){return arguments.length?(n=ja(0,t),o):n},o.sortGroups=function(t){return arguments.length?(r=t,o):r},o.sortSubgroups=function(t){return arguments.length?(i=t,o):i},o.sortChords=function(t){return arguments.length?(null==t?a=null:(a=Ua(t))._=t,o):a&&a._},o}const Va=Math.PI,Ga=2*Va,Xa=1e-6,Za=Ga-Xa;function Qa(){this._x0=this._y0=this._x1=this._y1=null,this._=\"\";}function Ka(){return new Qa}Qa.prototype=Ka.prototype={constructor:Qa,moveTo:function(t,e){this._+=\"M\"+(this._x0=this._x1=+t)+\",\"+(this._y0=this._y1=+e);},closePath:function(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+=\"Z\");},lineTo:function(t,e){this._+=\"L\"+(this._x1=+t)+\",\"+(this._y1=+e);},quadraticCurveTo:function(t,e,n,r){this._+=\"Q\"+ +t+\",\"+ +e+\",\"+(this._x1=+n)+\",\"+(this._y1=+r);},bezierCurveTo:function(t,e,n,r,i,a){this._+=\"C\"+ +t+\",\"+ +e+\",\"+ +n+\",\"+ +r+\",\"+(this._x1=+i)+\",\"+(this._y1=+a);},arcTo:function(t,e,n,r,i){t=+t,e=+e,n=+n,r=+r,i=+i;var a=this._x1,o=this._y1,s=n-t,c=r-e,l=a-t,u=o-e,h=l*l+u*u;if(i<0)throw new Error(\"negative radius: \"+i);if(null===this._x1)this._+=\"M\"+(this._x1=t)+\",\"+(this._y1=e);else if(h>Xa)if(Math.abs(u*s-c*l)>Xa&&i){var f=n-a,d=r-o,p=s*s+c*c,g=f*f+d*d,y=Math.sqrt(p),m=Math.sqrt(h),b=i*Math.tan((Va-Math.acos((p+h-g)/(2*y*m)))/2),v=b/m,_=b/y;Math.abs(v-1)>Xa&&(this._+=\"L\"+(t+v*l)+\",\"+(e+v*u)),this._+=\"A\"+i+\",\"+i+\",0,0,\"+ +(u*f>l*d)+\",\"+(this._x1=t+_*s)+\",\"+(this._y1=e+_*c);}else this._+=\"L\"+(this._x1=t)+\",\"+(this._y1=e);},arc:function(t,e,n,r,i,a){t=+t,e=+e,a=!!a;var o=(n=+n)*Math.cos(r),s=n*Math.sin(r),c=t+o,l=e+s,u=1^a,h=a?r-i:i-r;if(n<0)throw new Error(\"negative radius: \"+n);null===this._x1?this._+=\"M\"+c+\",\"+l:(Math.abs(this._x1-c)>Xa||Math.abs(this._y1-l)>Xa)&&(this._+=\"L\"+c+\",\"+l),n&&(h<0&&(h=h%Ga+Ga),h>Za?this._+=\"A\"+n+\",\"+n+\",0,1,\"+u+\",\"+(t-o)+\",\"+(e-s)+\"A\"+n+\",\"+n+\",0,1,\"+u+\",\"+(this._x1=c)+\",\"+(this._y1=l):h>Xa&&(this._+=\"A\"+n+\",\"+n+\",0,\"+ +(h>=Va)+\",\"+u+\",\"+(this._x1=t+n*Math.cos(i))+\",\"+(this._y1=e+n*Math.sin(i))));},rect:function(t,e,n,r){this._+=\"M\"+(this._x0=this._x1=+t)+\",\"+(this._y0=this._y1=+e)+\"h\"+ +n+\"v\"+ +r+\"h\"+-n+\"Z\";},toString:function(){return this._}};const Ja=Ka;var to=Array.prototype.slice;function eo(t){return function(){return t}}function no(t){return t.source}function ro(t){return t.target}function io(t){return t.radius}function ao(t){return t.startAngle}function oo(t){return t.endAngle}function so(){return 0}function co(){return 10}function lo(t){var e=no,n=ro,r=io,i=io,a=ao,o=oo,s=so,c=null;function l(){var l,u=e.apply(this,arguments),h=n.apply(this,arguments),f=s.apply(this,arguments)/2,d=to.call(arguments),p=+r.apply(this,(d[0]=u,d)),g=a.apply(this,d)-Ra,y=o.apply(this,d)-Ra,m=+i.apply(this,(d[0]=h,d)),b=a.apply(this,d)-Ra,v=o.apply(this,d)-Ra;if(c||(c=l=Ja()),f>za&&(Ba(y-g)>2*f+za?y>g?(g+=f,y-=f):(g-=f,y+=f):g=y=(g+y)/2,Ba(v-b)>2*f+za?v>b?(b+=f,v-=f):(b-=f,v+=f):b=v=(b+v)/2),c.moveTo(p*La(g),p*Ia(g)),c.arc(0,0,p,g,y),g!==b||y!==v)if(t){var _=+t.apply(this,arguments),x=m-_,k=(b+v)/2;c.quadraticCurveTo(0,0,x*La(b),x*Ia(b)),c.lineTo(m*La(k),m*Ia(k)),c.lineTo(x*La(v),x*Ia(v));}else c.quadraticCurveTo(0,0,m*La(b),m*Ia(b)),c.arc(0,0,m,b,v);if(c.quadraticCurveTo(0,0,p*La(g),p*Ia(g)),c.closePath(),l)return c=null,l+\"\"||null}return t&&(l.headRadius=function(e){return arguments.length?(t=\"function\"==typeof e?e:eo(+e),l):t}),l.radius=function(t){return arguments.length?(r=i=\"function\"==typeof t?t:eo(+t),l):r},l.sourceRadius=function(t){return arguments.length?(r=\"function\"==typeof t?t:eo(+t),l):r},l.targetRadius=function(t){return arguments.length?(i=\"function\"==typeof t?t:eo(+t),l):i},l.startAngle=function(t){return arguments.length?(a=\"function\"==typeof t?t:eo(+t),l):a},l.endAngle=function(t){return arguments.length?(o=\"function\"==typeof t?t:eo(+t),l):o},l.padAngle=function(t){return arguments.length?(s=\"function\"==typeof t?t:eo(+t),l):s},l.source=function(t){return arguments.length?(e=t,l):e},l.target=function(t){return arguments.length?(n=t,l):n},l.context=function(t){return arguments.length?(c=null==t?null:t,l):c},l}function uo(){return lo()}function ho(){return lo(co)}const fo=Math.PI/180,po=180/Math.PI,go=.96422,yo=.82521,mo=4/29,bo=6/29,vo=3*bo*bo;function _o(t){if(t instanceof wo)return new wo(t.l,t.a,t.b,t.opacity);if(t instanceof Oo)return Do(t);t instanceof ar||(t=rr(t));var e,n,r=So(t.r),i=So(t.g),a=So(t.b),o=To((.2225045*r+.7168786*i+.0606169*a)/1);return r===i&&i===a?e=n=o:(e=To((.4360747*r+.3850649*i+.1430804*a)/go),n=To((.0139322*r+.0971045*i+.7141733*a)/yo)),new wo(116*o-16,500*(e-o),200*(o-n),t.opacity)}function xo(t,e){return new wo(t,0,0,null==e?1:e)}function ko(t,e,n,r){return 1===arguments.length?_o(t):new wo(t,e,n,null==r?1:r)}function wo(t,e,n,r){this.l=+t,this.a=+e,this.b=+n,this.opacity=+r;}function To(t){return t>.008856451679035631?Math.pow(t,1/3):t/vo+mo}function Eo(t){return t>bo?t*t*t:vo*(t-mo)}function Co(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function So(t){return (t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function Ao(t){if(t instanceof Oo)return new Oo(t.h,t.c,t.l,t.opacity);if(t instanceof wo||(t=_o(t)),0===t.a&&0===t.b)return new Oo(NaN,0<t.l&&t.l<100?0:NaN,t.l,t.opacity);var e=Math.atan2(t.b,t.a)*po;return new Oo(e<0?e+360:e,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}function Mo(t,e,n,r){return 1===arguments.length?Ao(t):new Oo(n,e,t,null==r?1:r)}function No(t,e,n,r){return 1===arguments.length?Ao(t):new Oo(t,e,n,null==r?1:r)}function Oo(t,e,n,r){this.h=+t,this.c=+e,this.l=+n,this.opacity=+r;}function Do(t){if(isNaN(t.h))return new wo(t.l,0,0,t.opacity);var e=t.h*fo;return new wo(t.l,Math.cos(e)*t.c,Math.sin(e)*t.c,t.opacity)}Fn(wo,ko,Rn(Pn,{brighter:function(t){return new wo(this.l+18*(null==t?1:t),this.a,this.b,this.opacity)},darker:function(t){return new wo(this.l-18*(null==t?1:t),this.a,this.b,this.opacity)},rgb:function(){var t=(this.l+16)/116,e=isNaN(this.a)?t:t+this.a/500,n=isNaN(this.b)?t:t-this.b/200;return new ar(Co(3.1338561*(e=go*Eo(e))-1.6168667*(t=1*Eo(t))-.4906146*(n=yo*Eo(n))),Co(-.9787684*e+1.9161415*t+.033454*n),Co(.0719453*e-.2289914*t+1.4052427*n),this.opacity)}})),Fn(Oo,No,Rn(Pn,{brighter:function(t){return new Oo(this.h,this.c,this.l+18*(null==t?1:t),this.opacity)},darker:function(t){return new Oo(this.h,this.c,this.l-18*(null==t?1:t),this.opacity)},rgb:function(){return Do(this).rgb()}}));var Bo=-.14861,Lo=1.78277,Io=-.29227,Fo=-.90649,Ro=1.97294,Po=Ro*Fo,jo=Ro*Lo,zo=Lo*Io-Fo*Bo;function Yo(t){if(t instanceof $o)return new $o(t.h,t.s,t.l,t.opacity);t instanceof ar||(t=rr(t));var e=t.r/255,n=t.g/255,r=t.b/255,i=(zo*r+Po*e-jo*n)/(zo+Po-jo),a=r-i,o=(Ro*(n-i)-Io*a)/Fo,s=Math.sqrt(o*o+a*a)/(Ro*i*(1-i)),c=s?Math.atan2(o,a)*po-120:NaN;return new $o(c<0?c+360:c,s,i,t.opacity)}function Uo(t,e,n,r){return 1===arguments.length?Yo(t):new $o(t,e,n,null==r?1:r)}function $o(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r;}Fn($o,Uo,Rn(Pn,{brighter:function(t){return t=null==t?zn:Math.pow(zn,t),new $o(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?jn:Math.pow(jn,t),new $o(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=isNaN(this.h)?0:(this.h+120)*fo,e=+this.l,n=isNaN(this.s)?0:this.s*e*(1-e),r=Math.cos(t),i=Math.sin(t);return new ar(255*(e+n*(Bo*r+Lo*i)),255*(e+n*(Io*r+Fo*i)),255*(e+n*(Ro*r)),this.opacity)}}));var Wo=Array.prototype.slice;function qo(t,e){return t-e}const Ho=t=>()=>t;function Vo(t,e){for(var n,r=-1,i=e.length;++r<i;)if(n=Go(t,e[r]))return n;return 0}function Go(t,e){for(var n=e[0],r=e[1],i=-1,a=0,o=t.length,s=o-1;a<o;s=a++){var c=t[a],l=c[0],u=c[1],h=t[s],f=h[0],d=h[1];if(Xo(c,h,e))return 0;u>r!=d>r&&n<(f-l)*(r-u)/(d-u)+l&&(i=-i);}return i}function Xo(t,e,n){var r,i,a,o;return function(t,e,n){return (e[0]-t[0])*(n[1]-t[1])==(n[0]-t[0])*(e[1]-t[1])}(t,e,n)&&(i=t[r=+(t[0]===e[0])],a=n[r],o=e[r],i<=a&&a<=o||o<=a&&a<=i)}function Zo(){}var Qo=[[],[[[1,1.5],[.5,1]]],[[[1.5,1],[1,1.5]]],[[[1.5,1],[.5,1]]],[[[1,.5],[1.5,1]]],[[[1,1.5],[.5,1]],[[1,.5],[1.5,1]]],[[[1,.5],[1,1.5]]],[[[1,.5],[.5,1]]],[[[.5,1],[1,.5]]],[[[1,1.5],[1,.5]]],[[[.5,1],[1,.5]],[[1.5,1],[1,1.5]]],[[[1.5,1],[1,.5]]],[[[.5,1],[1.5,1]]],[[[1,1.5],[1.5,1]]],[[[.5,1],[1,1.5]]],[]];function Ko(){var t=1,e=1,n=rt,r=s;function i(t){var e=n(t);if(Array.isArray(e))e=e.slice().sort(qo);else {const n=_(t),r=et(n[0],n[1],e);e=J(Math.floor(n[0]/r)*r,Math.floor(n[1]/r-1)*r,e);}return e.map((e=>a(t,e)))}function a(n,i){var a=[],s=[];return function(n,r,i){var a,s,c,l,u,h,f=new Array,d=new Array;for(a=s=-1,l=n[0]>=r,Qo[l<<1].forEach(p);++a<t-1;)c=l,l=n[a+1]>=r,Qo[c|l<<1].forEach(p);for(Qo[l<<0].forEach(p);++s<e-1;){for(a=-1,l=n[s*t+t]>=r,u=n[s*t]>=r,Qo[l<<1|u<<2].forEach(p);++a<t-1;)c=l,l=n[s*t+t+a+1]>=r,h=u,u=n[s*t+a+1]>=r,Qo[c|l<<1|u<<2|h<<3].forEach(p);Qo[l|u<<3].forEach(p);}for(a=-1,u=n[s*t]>=r,Qo[u<<2].forEach(p);++a<t-1;)h=u,u=n[s*t+a+1]>=r,Qo[u<<2|h<<3].forEach(p);function p(t){var e,n,r=[t[0][0]+a,t[0][1]+s],c=[t[1][0]+a,t[1][1]+s],l=o(r),u=o(c);(e=d[l])?(n=f[u])?(delete d[e.end],delete f[n.start],e===n?(e.ring.push(c),i(e.ring)):f[e.start]=d[n.end]={start:e.start,end:n.end,ring:e.ring.concat(n.ring)}):(delete d[e.end],e.ring.push(c),d[e.end=u]=e):(e=f[u])?(n=d[l])?(delete f[e.start],delete d[n.end],e===n?(e.ring.push(c),i(e.ring)):f[n.start]=d[e.end]={start:n.start,end:e.end,ring:n.ring.concat(e.ring)}):(delete f[e.start],e.ring.unshift(r),f[e.start=l]=e):f[l]=d[u]={start:l,end:u,ring:[r,c]};}Qo[u<<3].forEach(p);}(n,i,(function(t){r(t,n,i),function(t){for(var e=0,n=t.length,r=t[n-1][1]*t[0][0]-t[n-1][0]*t[0][1];++e<n;)r+=t[e-1][1]*t[e][0]-t[e-1][0]*t[e][1];return r}(t)>0?a.push([t]):s.push(t);})),s.forEach((function(t){for(var e,n=0,r=a.length;n<r;++n)if(-1!==Vo((e=a[n])[0],t))return void e.push(t)})),{type:\"MultiPolygon\",value:i,coordinates:a}}function o(e){return 2*e[0]+e[1]*(t+1)*4}function s(n,r,i){n.forEach((function(n){var a,o=n[0],s=n[1],c=0|o,l=0|s,u=r[l*t+c];o>0&&o<t&&c===o&&(a=r[l*t+c-1],n[0]=o+(i-a)/(u-a)-.5),s>0&&s<e&&l===s&&(a=r[(l-1)*t+c],n[1]=s+(i-a)/(u-a)-.5);}));}return i.contour=a,i.size=function(n){if(!arguments.length)return [t,e];var r=Math.floor(n[0]),a=Math.floor(n[1]);if(!(r>=0&&a>=0))throw new Error(\"invalid size\");return t=r,e=a,i},i.thresholds=function(t){return arguments.length?(n=\"function\"==typeof t?t:Array.isArray(t)?Ho(Wo.call(t)):Ho(t),i):n},i.smooth=function(t){return arguments.length?(r=t?s:Zo,i):r===s},i}function Jo(t,e,n){for(var r=t.width,i=t.height,a=1+(n<<1),o=0;o<i;++o)for(var s=0,c=0;s<r+n;++s)s<r&&(c+=t.data[s+o*r]),s>=n&&(s>=a&&(c-=t.data[s-a+o*r]),e.data[s-n+o*r]=c/Math.min(s+1,r-1+a-s,a));}function ts(t,e,n){for(var r=t.width,i=t.height,a=1+(n<<1),o=0;o<r;++o)for(var s=0,c=0;s<i+n;++s)s<i&&(c+=t.data[o+s*r]),s>=n&&(s>=a&&(c-=t.data[o+(s-a)*r]),e.data[o+(s-n)*r]=c/Math.min(s+1,i-1+a-s,a));}function es(t){return t[0]}function ns(t){return t[1]}function rs(){return 1}function is(){var t=es,e=ns,n=rs,r=960,i=500,a=20,o=2,s=3*a,c=r+2*s>>o,l=i+2*s>>o,u=Ho(20);function h(r){var i=new Float32Array(c*l),h=new Float32Array(c*l),d=Math.pow(2,-o);r.forEach((function(r,a,o){var u=(t(r,a,o)+s)*d,h=(e(r,a,o)+s)*d,f=+n(r,a,o);if(u>=0&&u<c&&h>=0&&h<l){var p=Math.floor(u),g=Math.floor(h),y=u-p-.5,m=h-g-.5;i[p+g*c]+=(1-y)*(1-m)*f,i[p+1+g*c]+=y*(1-m)*f,i[p+1+(g+1)*c]+=y*m*f,i[p+(g+1)*c]+=(1-y)*m*f;}})),Jo({width:c,height:l,data:i},{width:c,height:l,data:h},a>>o),ts({width:c,height:l,data:h},{width:c,height:l,data:i},a>>o),Jo({width:c,height:l,data:i},{width:c,height:l,data:h},a>>o),ts({width:c,height:l,data:h},{width:c,height:l,data:i},a>>o),Jo({width:c,height:l,data:i},{width:c,height:l,data:h},a>>o),ts({width:c,height:l,data:h},{width:c,height:l,data:i},a>>o);var p=u(i);if(!Array.isArray(p)){var g=at(i);p=et(0,g,p),(p=xt(0,Math.floor(g/p)*p,p)).shift();}return Ko().thresholds(p).size([c,l])(i).map(f)}function f(t){return t.value*=Math.pow(2,-2*o),t.coordinates.forEach(d),t}function d(t){t.forEach(p);}function p(t){t.forEach(g);}function g(t){t[0]=t[0]*Math.pow(2,o)-s,t[1]=t[1]*Math.pow(2,o)-s;}function y(){return c=r+2*(s=3*a)>>o,l=i+2*s>>o,h}return h.x=function(e){return arguments.length?(t=\"function\"==typeof e?e:Ho(+e),h):t},h.y=function(t){return arguments.length?(e=\"function\"==typeof t?t:Ho(+t),h):e},h.weight=function(t){return arguments.length?(n=\"function\"==typeof t?t:Ho(+t),h):n},h.size=function(t){if(!arguments.length)return [r,i];var e=+t[0],n=+t[1];if(!(e>=0&&n>=0))throw new Error(\"invalid size\");return r=e,i=n,y()},h.cellSize=function(t){if(!arguments.length)return 1<<o;if(!((t=+t)>=1))throw new Error(\"invalid cell size\");return o=Math.floor(Math.log(t)/Math.LN2),y()},h.thresholds=function(t){return arguments.length?(u=\"function\"==typeof t?t:Array.isArray(t)?Ho(Wo.call(t)):Ho(t),h):u},h.bandwidth=function(t){if(!arguments.length)return Math.sqrt(a*(a+1));if(!((t=+t)>=0))throw new Error(\"invalid bandwidth\");return a=Math.round((Math.sqrt(4*t*t+1)-1)/2),y()},h}const as=134217729;function os(t,e,n,r,i){let a,o,s,c,l=e[0],u=r[0],h=0,f=0;u>l==u>-l?(a=l,l=e[++h]):(a=u,u=r[++f]);let d=0;if(h<t&&f<n)for(u>l==u>-l?(o=l+a,s=a-(o-l),l=e[++h]):(o=u+a,s=a-(o-u),u=r[++f]),a=o,0!==s&&(i[d++]=s);h<t&&f<n;)u>l==u>-l?(o=a+l,c=o-a,s=a-(o-c)+(l-c),l=e[++h]):(o=a+u,c=o-a,s=a-(o-c)+(u-c),u=r[++f]),a=o,0!==s&&(i[d++]=s);for(;h<t;)o=a+l,c=o-a,s=a-(o-c)+(l-c),l=e[++h],a=o,0!==s&&(i[d++]=s);for(;f<n;)o=a+u,c=o-a,s=a-(o-c)+(u-c),u=r[++f],a=o,0!==s&&(i[d++]=s);return 0===a&&0!==d||(i[d++]=a),d}function ss(t){return new Float64Array(t)}const cs=ss(4),ls=ss(8),us=ss(12),hs=ss(16),fs=ss(4);function ds(t,e,n,r,i,a){const o=(e-a)*(n-i),s=(t-i)*(r-a),c=o-s;if(0===o||0===s||o>0!=s>0)return c;const l=Math.abs(o+s);return Math.abs(c)>=33306690738754716e-32*l?c:-function(t,e,n,r,i,a,o){let s,c,l,u,h,f,d,p,g,y,m,b,v,_,x,k,w,T;const E=t-i,C=n-i,S=e-a,A=r-a;_=E*A,f=as*E,d=f-(f-E),p=E-d,f=as*A,g=f-(f-A),y=A-g,x=p*y-(_-d*g-p*g-d*y),k=S*C,f=as*S,d=f-(f-S),p=S-d,f=as*C,g=f-(f-C),y=C-g,w=p*y-(k-d*g-p*g-d*y),m=x-w,h=x-m,cs[0]=x-(m+h)+(h-w),b=_+m,h=b-_,v=_-(b-h)+(m-h),m=v-k,h=v-m,cs[1]=v-(m+h)+(h-k),T=b+m,h=T-b,cs[2]=b-(T-h)+(m-h),cs[3]=T;let M=function(t,e){let n=e[0];for(let t=1;t<4;t++)n+=e[t];return n}(0,cs),N=22204460492503146e-32*o;if(M>=N||-M>=N)return M;if(h=t-E,s=t-(E+h)+(h-i),h=n-C,l=n-(C+h)+(h-i),h=e-S,c=e-(S+h)+(h-a),h=r-A,u=r-(A+h)+(h-a),0===s&&0===c&&0===l&&0===u)return M;if(N=11093356479670487e-47*o+33306690738754706e-32*Math.abs(M),M+=E*u+A*s-(S*l+C*c),M>=N||-M>=N)return M;_=s*A,f=as*s,d=f-(f-s),p=s-d,f=as*A,g=f-(f-A),y=A-g,x=p*y-(_-d*g-p*g-d*y),k=c*C,f=as*c,d=f-(f-c),p=c-d,f=as*C,g=f-(f-C),y=C-g,w=p*y-(k-d*g-p*g-d*y),m=x-w,h=x-m,fs[0]=x-(m+h)+(h-w),b=_+m,h=b-_,v=_-(b-h)+(m-h),m=v-k,h=v-m,fs[1]=v-(m+h)+(h-k),T=b+m,h=T-b,fs[2]=b-(T-h)+(m-h),fs[3]=T;const O=os(4,cs,4,fs,ls);_=E*u,f=as*E,d=f-(f-E),p=E-d,f=as*u,g=f-(f-u),y=u-g,x=p*y-(_-d*g-p*g-d*y),k=S*l,f=as*S,d=f-(f-S),p=S-d,f=as*l,g=f-(f-l),y=l-g,w=p*y-(k-d*g-p*g-d*y),m=x-w,h=x-m,fs[0]=x-(m+h)+(h-w),b=_+m,h=b-_,v=_-(b-h)+(m-h),m=v-k,h=v-m,fs[1]=v-(m+h)+(h-k),T=b+m,h=T-b,fs[2]=b-(T-h)+(m-h),fs[3]=T;const D=os(O,ls,4,fs,us);_=s*u,f=as*s,d=f-(f-s),p=s-d,f=as*u,g=f-(f-u),y=u-g,x=p*y-(_-d*g-p*g-d*y),k=c*l,f=as*c,d=f-(f-c),p=c-d,f=as*l,g=f-(f-l),y=l-g,w=p*y-(k-d*g-p*g-d*y),m=x-w,h=x-m,fs[0]=x-(m+h)+(h-w),b=_+m,h=b-_,v=_-(b-h)+(m-h),m=v-k,h=v-m,fs[1]=v-(m+h)+(h-k),T=b+m,h=T-b,fs[2]=b-(T-h)+(m-h),fs[3]=T;const B=os(D,us,4,fs,hs);return hs[B-1]}(t,e,n,r,i,a,l)}const ps=Math.pow(2,-52),gs=new Uint32Array(512);class ys{static from(t,e=ks,n=ws){const r=t.length,i=new Float64Array(2*r);for(let a=0;a<r;a++){const r=t[a];i[2*a]=e(r),i[2*a+1]=n(r);}return new ys(i)}constructor(t){const e=t.length>>1;if(e>0&&\"number\"!=typeof t[0])throw new Error(\"Expected coords to contain numbers.\");this.coords=t;const n=Math.max(2*e-5,0);this._triangles=new Uint32Array(3*n),this._halfedges=new Int32Array(3*n),this._hashSize=Math.ceil(Math.sqrt(e)),this._hullPrev=new Uint32Array(e),this._hullNext=new Uint32Array(e),this._hullTri=new Uint32Array(e),this._hullHash=new Int32Array(this._hashSize).fill(-1),this._ids=new Uint32Array(e),this._dists=new Float64Array(e),this.update();}update(){const{coords:t,_hullPrev:e,_hullNext:n,_hullTri:r,_hullHash:i}=this,a=t.length>>1;let o=1/0,s=1/0,c=-1/0,l=-1/0;for(let e=0;e<a;e++){const n=t[2*e],r=t[2*e+1];n<o&&(o=n),r<s&&(s=r),n>c&&(c=n),r>l&&(l=r),this._ids[e]=e;}const u=(o+c)/2,h=(s+l)/2;let f,d,p,g=1/0;for(let e=0;e<a;e++){const n=ms(u,h,t[2*e],t[2*e+1]);n<g&&(f=e,g=n);}const y=t[2*f],m=t[2*f+1];g=1/0;for(let e=0;e<a;e++){if(e===f)continue;const n=ms(y,m,t[2*e],t[2*e+1]);n<g&&n>0&&(d=e,g=n);}let b=t[2*d],v=t[2*d+1],_=1/0;for(let e=0;e<a;e++){if(e===f||e===d)continue;const n=vs(y,m,b,v,t[2*e],t[2*e+1]);n<_&&(p=e,_=n);}let x=t[2*p],k=t[2*p+1];if(_===1/0){for(let e=0;e<a;e++)this._dists[e]=t[2*e]-t[0]||t[2*e+1]-t[1];_s(this._ids,this._dists,0,a-1);const e=new Uint32Array(a);let n=0;for(let t=0,r=-1/0;t<a;t++){const i=this._ids[t];this._dists[i]>r&&(e[n++]=i,r=this._dists[i]);}return this.hull=e.subarray(0,n),this.triangles=new Uint32Array(0),void(this.halfedges=new Uint32Array(0))}if(ds(y,m,b,v,x,k)<0){const t=d,e=b,n=v;d=p,b=x,v=k,p=t,x=e,k=n;}const w=function(t,e,n,r,i,a){const o=n-t,s=r-e,c=i-t,l=a-e,u=o*o+s*s,h=c*c+l*l,f=.5/(o*l-s*c);return {x:t+(l*u-s*h)*f,y:e+(o*h-c*u)*f}}(y,m,b,v,x,k);this._cx=w.x,this._cy=w.y;for(let e=0;e<a;e++)this._dists[e]=ms(t[2*e],t[2*e+1],w.x,w.y);_s(this._ids,this._dists,0,a-1),this._hullStart=f;let T=3;n[f]=e[p]=d,n[d]=e[f]=p,n[p]=e[d]=f,r[f]=0,r[d]=1,r[p]=2,i.fill(-1),i[this._hashKey(y,m)]=f,i[this._hashKey(b,v)]=d,i[this._hashKey(x,k)]=p,this.trianglesLen=0,this._addTriangle(f,d,p,-1,-1,-1);for(let a,o,s=0;s<this._ids.length;s++){const c=this._ids[s],l=t[2*c],u=t[2*c+1];if(s>0&&Math.abs(l-a)<=ps&&Math.abs(u-o)<=ps)continue;if(a=l,o=u,c===f||c===d||c===p)continue;let h=0;for(let t=0,e=this._hashKey(l,u);t<this._hashSize&&(h=i[(e+t)%this._hashSize],-1===h||h===n[h]);t++);h=e[h];let g,y=h;for(;g=n[y],ds(l,u,t[2*y],t[2*y+1],t[2*g],t[2*g+1])>=0;)if(y=g,y===h){y=-1;break}if(-1===y)continue;let m=this._addTriangle(y,c,n[y],-1,-1,r[y]);r[c]=this._legalize(m+2),r[y]=m,T++;let b=n[y];for(;g=n[b],ds(l,u,t[2*b],t[2*b+1],t[2*g],t[2*g+1])<0;)m=this._addTriangle(b,c,g,r[c],-1,r[b]),r[c]=this._legalize(m+2),n[b]=b,T--,b=g;if(y===h)for(;g=e[y],ds(l,u,t[2*g],t[2*g+1],t[2*y],t[2*y+1])<0;)m=this._addTriangle(g,c,y,-1,r[y],r[g]),this._legalize(m+2),r[g]=m,n[y]=y,T--,y=g;this._hullStart=e[c]=y,n[y]=e[b]=c,n[c]=b,i[this._hashKey(l,u)]=c,i[this._hashKey(t[2*y],t[2*y+1])]=y;}this.hull=new Uint32Array(T);for(let t=0,e=this._hullStart;t<T;t++)this.hull[t]=e,e=n[e];this.triangles=this._triangles.subarray(0,this.trianglesLen),this.halfedges=this._halfedges.subarray(0,this.trianglesLen);}_hashKey(t,e){return Math.floor(function(t,e){const n=t/(Math.abs(t)+Math.abs(e));return (e>0?3-n:1+n)/4}(t-this._cx,e-this._cy)*this._hashSize)%this._hashSize}_legalize(t){const{_triangles:e,_halfedges:n,coords:r}=this;let i=0,a=0;for(;;){const o=n[t],s=t-t%3;if(a=s+(t+2)%3,-1===o){if(0===i)break;t=gs[--i];continue}const c=o-o%3,l=s+(t+1)%3,u=c+(o+2)%3,h=e[a],f=e[t],d=e[l],p=e[u];if(bs(r[2*h],r[2*h+1],r[2*f],r[2*f+1],r[2*d],r[2*d+1],r[2*p],r[2*p+1])){e[t]=p,e[o]=h;const r=n[u];if(-1===r){let e=this._hullStart;do{if(this._hullTri[e]===u){this._hullTri[e]=t;break}e=this._hullPrev[e];}while(e!==this._hullStart)}this._link(t,r),this._link(o,n[a]),this._link(a,u);const s=c+(o+1)%3;i<gs.length&&(gs[i++]=s);}else {if(0===i)break;t=gs[--i];}}return a}_link(t,e){this._halfedges[t]=e,-1!==e&&(this._halfedges[e]=t);}_addTriangle(t,e,n,r,i,a){const o=this.trianglesLen;return this._triangles[o]=t,this._triangles[o+1]=e,this._triangles[o+2]=n,this._link(o,r),this._link(o+1,i),this._link(o+2,a),this.trianglesLen+=3,o}}function ms(t,e,n,r){const i=t-n,a=e-r;return i*i+a*a}function bs(t,e,n,r,i,a,o,s){const c=t-o,l=e-s,u=n-o,h=r-s,f=i-o,d=a-s,p=u*u+h*h,g=f*f+d*d;return c*(h*g-p*d)-l*(u*g-p*f)+(c*c+l*l)*(u*d-h*f)<0}function vs(t,e,n,r,i,a){const o=n-t,s=r-e,c=i-t,l=a-e,u=o*o+s*s,h=c*c+l*l,f=.5/(o*l-s*c),d=(l*u-s*h)*f,p=(o*h-c*u)*f;return d*d+p*p}function _s(t,e,n,r){if(r-n<=20)for(let i=n+1;i<=r;i++){const r=t[i],a=e[r];let o=i-1;for(;o>=n&&e[t[o]]>a;)t[o+1]=t[o--];t[o+1]=r;}else {let i=n+1,a=r;xs(t,n+r>>1,i),e[t[n]]>e[t[r]]&&xs(t,n,r),e[t[i]]>e[t[r]]&&xs(t,i,r),e[t[n]]>e[t[i]]&&xs(t,n,i);const o=t[i],s=e[o];for(;;){do{i++;}while(e[t[i]]<s);do{a--;}while(e[t[a]]>s);if(a<i)break;xs(t,i,a);}t[n+1]=t[a],t[a]=o,r-i+1>=a-n?(_s(t,e,i,r),_s(t,e,n,a-1)):(_s(t,e,n,a-1),_s(t,e,i,r));}}function xs(t,e,n){const r=t[e];t[e]=t[n],t[n]=r;}function ks(t){return t[0]}function ws(t){return t[1]}const Ts=1e-6;class Es{constructor(){this._x0=this._y0=this._x1=this._y1=null,this._=\"\";}moveTo(t,e){this._+=`M${this._x0=this._x1=+t},${this._y0=this._y1=+e}`;}closePath(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+=\"Z\");}lineTo(t,e){this._+=`L${this._x1=+t},${this._y1=+e}`;}arc(t,e,n){const r=(t=+t)+(n=+n),i=e=+e;if(n<0)throw new Error(\"negative radius\");null===this._x1?this._+=`M${r},${i}`:(Math.abs(this._x1-r)>Ts||Math.abs(this._y1-i)>Ts)&&(this._+=\"L\"+r+\",\"+i),n&&(this._+=`A${n},${n},0,1,1,${t-n},${e}A${n},${n},0,1,1,${this._x1=r},${this._y1=i}`);}rect(t,e,n,r){this._+=`M${this._x0=this._x1=+t},${this._y0=this._y1=+e}h${+n}v${+r}h${-n}Z`;}value(){return this._||null}}class Cs{constructor(){this._=[];}moveTo(t,e){this._.push([t,e]);}closePath(){this._.push(this._[0].slice());}lineTo(t,e){this._.push([t,e]);}value(){return this._.length?this._:null}}class Ss{constructor(t,[e,n,r,i]=[0,0,960,500]){if(!((r=+r)>=(e=+e)&&(i=+i)>=(n=+n)))throw new Error(\"invalid bounds\");this.delaunay=t,this._circumcenters=new Float64Array(2*t.points.length),this.vectors=new Float64Array(2*t.points.length),this.xmax=r,this.xmin=e,this.ymax=i,this.ymin=n,this._init();}update(){return this.delaunay.update(),this._init(),this}_init(){const{delaunay:{points:t,hull:e,triangles:n},vectors:r}=this,i=this.circumcenters=this._circumcenters.subarray(0,n.length/3*2);for(let e,r,a=0,o=0,s=n.length;a<s;a+=3,o+=2){const s=2*n[a],c=2*n[a+1],l=2*n[a+2],u=t[s],h=t[s+1],f=t[c],d=t[c+1],p=t[l],g=t[l+1],y=f-u,m=d-h,b=p-u,v=g-h,_=2*(y*v-m*b);if(Math.abs(_)<1e-9){let i=1e9;const a=2*n[0];i*=Math.sign((t[a]-u)*v-(t[a+1]-h)*b),e=(u+p)/2-i*v,r=(h+g)/2+i*b;}else {const t=1/_,n=y*y+m*m,i=b*b+v*v;e=u+(v*n-m*i)*t,r=h+(y*i-b*n)*t;}i[o]=e,i[o+1]=r;}let a,o,s,c=e[e.length-1],l=4*c,u=t[2*c],h=t[2*c+1];r.fill(0);for(let n=0;n<e.length;++n)c=e[n],a=l,o=u,s=h,l=4*c,u=t[2*c],h=t[2*c+1],r[a+2]=r[l]=s-h,r[a+3]=r[l+1]=u-o;}render(t){const e=null==t?t=new Es:void 0,{delaunay:{halfedges:n,inedges:r,hull:i},circumcenters:a,vectors:o}=this;if(i.length<=1)return null;for(let e=0,r=n.length;e<r;++e){const r=n[e];if(r<e)continue;const i=2*Math.floor(e/3),o=2*Math.floor(r/3),s=a[i],c=a[i+1],l=a[o],u=a[o+1];this._renderSegment(s,c,l,u,t);}let s,c=i[i.length-1];for(let e=0;e<i.length;++e){s=c,c=i[e];const n=2*Math.floor(r[c]/3),l=a[n],u=a[n+1],h=4*s,f=this._project(l,u,o[h+2],o[h+3]);f&&this._renderSegment(l,u,f[0],f[1],t);}return e&&e.value()}renderBounds(t){const e=null==t?t=new Es:void 0;return t.rect(this.xmin,this.ymin,this.xmax-this.xmin,this.ymax-this.ymin),e&&e.value()}renderCell(t,e){const n=null==e?e=new Es:void 0,r=this._clip(t);if(null===r||!r.length)return;e.moveTo(r[0],r[1]);let i=r.length;for(;r[0]===r[i-2]&&r[1]===r[i-1]&&i>1;)i-=2;for(let t=2;t<i;t+=2)r[t]===r[t-2]&&r[t+1]===r[t-1]||e.lineTo(r[t],r[t+1]);return e.closePath(),n&&n.value()}*cellPolygons(){const{delaunay:{points:t}}=this;for(let e=0,n=t.length/2;e<n;++e){const t=this.cellPolygon(e);t&&(t.index=e,yield t);}}cellPolygon(t){const e=new Cs;return this.renderCell(t,e),e.value()}_renderSegment(t,e,n,r,i){let a;const o=this._regioncode(t,e),s=this._regioncode(n,r);0===o&&0===s?(i.moveTo(t,e),i.lineTo(n,r)):(a=this._clipSegment(t,e,n,r,o,s))&&(i.moveTo(a[0],a[1]),i.lineTo(a[2],a[3]));}contains(t,e,n){return (e=+e)==e&&(n=+n)==n&&this.delaunay._step(t,e,n)===t}*neighbors(t){const e=this._clip(t);if(e)for(const n of this.delaunay.neighbors(t)){const t=this._clip(n);if(t)t:for(let r=0,i=e.length;r<i;r+=2)for(let a=0,o=t.length;a<o;a+=2)if(e[r]==t[a]&&e[r+1]==t[a+1]&&e[(r+2)%i]==t[(a+o-2)%o]&&e[(r+3)%i]==t[(a+o-1)%o]){yield n;break t}}}_cell(t){const{circumcenters:e,delaunay:{inedges:n,halfedges:r,triangles:i}}=this,a=n[t];if(-1===a)return null;const o=[];let s=a;do{const n=Math.floor(s/3);if(o.push(e[2*n],e[2*n+1]),s=s%3==2?s-2:s+1,i[s]!==t)break;s=r[s];}while(s!==a&&-1!==s);return o}_clip(t){if(0===t&&1===this.delaunay.hull.length)return [this.xmax,this.ymin,this.xmax,this.ymax,this.xmin,this.ymax,this.xmin,this.ymin];const e=this._cell(t);if(null===e)return null;const{vectors:n}=this,r=4*t;return n[r]||n[r+1]?this._clipInfinite(t,e,n[r],n[r+1],n[r+2],n[r+3]):this._clipFinite(t,e)}_clipFinite(t,e){const n=e.length;let r,i,a,o,s=null,c=e[n-2],l=e[n-1],u=this._regioncode(c,l),h=0;for(let f=0;f<n;f+=2)if(r=c,i=l,c=e[f],l=e[f+1],a=u,u=this._regioncode(c,l),0===a&&0===u)o=h,h=0,s?s.push(c,l):s=[c,l];else {let e,n,f,d,p;if(0===a){if(null===(e=this._clipSegment(r,i,c,l,a,u)))continue;[n,f,d,p]=e;}else {if(null===(e=this._clipSegment(c,l,r,i,u,a)))continue;[d,p,n,f]=e,o=h,h=this._edgecode(n,f),o&&h&&this._edge(t,o,h,s,s.length),s?s.push(n,f):s=[n,f];}o=h,h=this._edgecode(d,p),o&&h&&this._edge(t,o,h,s,s.length),s?s.push(d,p):s=[d,p];}if(s)o=h,h=this._edgecode(s[0],s[1]),o&&h&&this._edge(t,o,h,s,s.length);else if(this.contains(t,(this.xmin+this.xmax)/2,(this.ymin+this.ymax)/2))return [this.xmax,this.ymin,this.xmax,this.ymax,this.xmin,this.ymax,this.xmin,this.ymin];return s}_clipSegment(t,e,n,r,i,a){for(;;){if(0===i&&0===a)return [t,e,n,r];if(i&a)return null;let o,s,c=i||a;8&c?(o=t+(n-t)*(this.ymax-e)/(r-e),s=this.ymax):4&c?(o=t+(n-t)*(this.ymin-e)/(r-e),s=this.ymin):2&c?(s=e+(r-e)*(this.xmax-t)/(n-t),o=this.xmax):(s=e+(r-e)*(this.xmin-t)/(n-t),o=this.xmin),i?(t=o,e=s,i=this._regioncode(t,e)):(n=o,r=s,a=this._regioncode(n,r));}}_clipInfinite(t,e,n,r,i,a){let o,s=Array.from(e);if((o=this._project(s[0],s[1],n,r))&&s.unshift(o[0],o[1]),(o=this._project(s[s.length-2],s[s.length-1],i,a))&&s.push(o[0],o[1]),s=this._clipFinite(t,s))for(let e,n=0,r=s.length,i=this._edgecode(s[r-2],s[r-1]);n<r;n+=2)e=i,i=this._edgecode(s[n],s[n+1]),e&&i&&(n=this._edge(t,e,i,s,n),r=s.length);else this.contains(t,(this.xmin+this.xmax)/2,(this.ymin+this.ymax)/2)&&(s=[this.xmin,this.ymin,this.xmax,this.ymin,this.xmax,this.ymax,this.xmin,this.ymax]);return s}_edge(t,e,n,r,i){for(;e!==n;){let n,a;switch(e){case 5:e=4;continue;case 4:e=6,n=this.xmax,a=this.ymin;break;case 6:e=2;continue;case 2:e=10,n=this.xmax,a=this.ymax;break;case 10:e=8;continue;case 8:e=9,n=this.xmin,a=this.ymax;break;case 9:e=1;continue;case 1:e=5,n=this.xmin,a=this.ymin;}r[i]===n&&r[i+1]===a||!this.contains(t,n,a)||(r.splice(i,0,n,a),i+=2);}if(r.length>4)for(let t=0;t<r.length;t+=2){const e=(t+2)%r.length,n=(t+4)%r.length;(r[t]===r[e]&&r[e]===r[n]||r[t+1]===r[e+1]&&r[e+1]===r[n+1])&&(r.splice(e,2),t-=2);}return i}_project(t,e,n,r){let i,a,o,s=1/0;if(r<0){if(e<=this.ymin)return null;(i=(this.ymin-e)/r)<s&&(o=this.ymin,a=t+(s=i)*n);}else if(r>0){if(e>=this.ymax)return null;(i=(this.ymax-e)/r)<s&&(o=this.ymax,a=t+(s=i)*n);}if(n>0){if(t>=this.xmax)return null;(i=(this.xmax-t)/n)<s&&(a=this.xmax,o=e+(s=i)*r);}else if(n<0){if(t<=this.xmin)return null;(i=(this.xmin-t)/n)<s&&(a=this.xmin,o=e+(s=i)*r);}return [a,o]}_edgecode(t,e){return (t===this.xmin?1:t===this.xmax?2:0)|(e===this.ymin?4:e===this.ymax?8:0)}_regioncode(t,e){return (t<this.xmin?1:t>this.xmax?2:0)|(e<this.ymin?4:e>this.ymax?8:0)}}const As=2*Math.PI,Ms=Math.pow;function Ns(t){return t[0]}function Os(t){return t[1]}function Ds(t,e,n){return [t+Math.sin(t+e)*n,e+Math.cos(t-e)*n]}class Bs{static from(t,e=Ns,n=Os,r){return new Bs(\"length\"in t?function(t,e,n,r){const i=t.length,a=new Float64Array(2*i);for(let o=0;o<i;++o){const i=t[o];a[2*o]=e.call(r,i,o,t),a[2*o+1]=n.call(r,i,o,t);}return a}(t,e,n,r):Float64Array.from(function*(t,e,n,r){let i=0;for(const a of t)yield e.call(r,a,i,t),yield n.call(r,a,i,t),++i;}(t,e,n,r)))}constructor(t){this._delaunator=new ys(t),this.inedges=new Int32Array(t.length/2),this._hullIndex=new Int32Array(t.length/2),this.points=this._delaunator.coords,this._init();}update(){return this._delaunator.update(),this._init(),this}_init(){const t=this._delaunator,e=this.points;if(t.hull&&t.hull.length>2&&function(t){const{triangles:e,coords:n}=t;for(let t=0;t<e.length;t+=3){const r=2*e[t],i=2*e[t+1],a=2*e[t+2];if((n[a]-n[r])*(n[i+1]-n[r+1])-(n[i]-n[r])*(n[a+1]-n[r+1])>1e-10)return !1}return !0}(t)){this.collinear=Int32Array.from({length:e.length/2},((t,e)=>e)).sort(((t,n)=>e[2*t]-e[2*n]||e[2*t+1]-e[2*n+1]));const t=this.collinear[0],n=this.collinear[this.collinear.length-1],r=[e[2*t],e[2*t+1],e[2*n],e[2*n+1]],i=1e-8*Math.hypot(r[3]-r[1],r[2]-r[0]);for(let t=0,n=e.length/2;t<n;++t){const n=Ds(e[2*t],e[2*t+1],i);e[2*t]=n[0],e[2*t+1]=n[1];}this._delaunator=new ys(e);}else delete this.collinear;const n=this.halfedges=this._delaunator.halfedges,r=this.hull=this._delaunator.hull,i=this.triangles=this._delaunator.triangles,a=this.inedges.fill(-1),o=this._hullIndex.fill(-1);for(let t=0,e=n.length;t<e;++t){const e=i[t%3==2?t-2:t+1];-1!==n[t]&&-1!==a[e]||(a[e]=t);}for(let t=0,e=r.length;t<e;++t)o[r[t]]=t;r.length<=2&&r.length>0&&(this.triangles=new Int32Array(3).fill(-1),this.halfedges=new Int32Array(3).fill(-1),this.triangles[0]=r[0],a[r[0]]=1,2===r.length&&(a[r[1]]=0,this.triangles[1]=r[1],this.triangles[2]=r[1]));}voronoi(t){return new Ss(this,t)}*neighbors(t){const{inedges:e,hull:n,_hullIndex:r,halfedges:i,triangles:a,collinear:o}=this;if(o){const e=o.indexOf(t);return e>0&&(yield o[e-1]),void(e<o.length-1&&(yield o[e+1]))}const s=e[t];if(-1===s)return;let c=s,l=-1;do{if(yield l=a[c],c=c%3==2?c-2:c+1,a[c]!==t)return;if(c=i[c],-1===c){const e=n[(r[t]+1)%n.length];return void(e!==l&&(yield e))}}while(c!==s)}find(t,e,n=0){if((t=+t)!=t||(e=+e)!=e)return -1;const r=n;let i;for(;(i=this._step(n,t,e))>=0&&i!==n&&i!==r;)n=i;return i}_step(t,e,n){const{inedges:r,hull:i,_hullIndex:a,halfedges:o,triangles:s,points:c}=this;if(-1===r[t]||!c.length)return (t+1)%(c.length>>1);let l=t,u=Ms(e-c[2*t],2)+Ms(n-c[2*t+1],2);const h=r[t];let f=h;do{let r=s[f];const h=Ms(e-c[2*r],2)+Ms(n-c[2*r+1],2);if(h<u&&(u=h,l=r),f=f%3==2?f-2:f+1,s[f]!==t)break;if(f=o[f],-1===f){if(f=i[(a[t]+1)%i.length],f!==r&&Ms(e-c[2*f],2)+Ms(n-c[2*f+1],2)<u)return f;break}}while(f!==h);return l}render(t){const e=null==t?t=new Es:void 0,{points:n,halfedges:r,triangles:i}=this;for(let e=0,a=r.length;e<a;++e){const a=r[e];if(a<e)continue;const o=2*i[e],s=2*i[a];t.moveTo(n[o],n[o+1]),t.lineTo(n[s],n[s+1]);}return this.renderHull(t),e&&e.value()}renderPoints(t,e){void 0!==e||t&&\"function\"==typeof t.moveTo||(e=t,t=null),e=null==e?2:+e;const n=null==t?t=new Es:void 0,{points:r}=this;for(let n=0,i=r.length;n<i;n+=2){const i=r[n],a=r[n+1];t.moveTo(i+e,a),t.arc(i,a,e,0,As);}return n&&n.value()}renderHull(t){const e=null==t?t=new Es:void 0,{hull:n,points:r}=this,i=2*n[0],a=n.length;t.moveTo(r[i],r[i+1]);for(let e=1;e<a;++e){const i=2*n[e];t.lineTo(r[i],r[i+1]);}return t.closePath(),e&&e.value()}hullPolygon(){const t=new Cs;return this.renderHull(t),t.value()}renderTriangle(t,e){const n=null==e?e=new Es:void 0,{points:r,triangles:i}=this,a=2*i[t*=3],o=2*i[t+1],s=2*i[t+2];return e.moveTo(r[a],r[a+1]),e.lineTo(r[o],r[o+1]),e.lineTo(r[s],r[s+1]),e.closePath(),n&&n.value()}*trianglePolygons(){const{triangles:t}=this;for(let e=0,n=t.length/3;e<n;++e)yield this.trianglePolygon(e);}trianglePolygon(t){const e=new Cs;return this.renderTriangle(t,e),e.value()}}const Ls=t=>()=>t;function Is(t,{sourceEvent:e,subject:n,target:r,identifier:i,active:a,x:o,y:s,dx:c,dy:l,dispatch:u}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:e,enumerable:!0,configurable:!0},subject:{value:n,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},identifier:{value:i,enumerable:!0,configurable:!0},active:{value:a,enumerable:!0,configurable:!0},x:{value:o,enumerable:!0,configurable:!0},y:{value:s,enumerable:!0,configurable:!0},dx:{value:c,enumerable:!0,configurable:!0},dy:{value:l,enumerable:!0,configurable:!0},_:{value:u}});}function Fs(t){return !t.ctrlKey&&!t.button}function Rs(){return this.parentNode}function Ps(t,e){return null==e?{x:t.x,y:t.y}:e}function js(){return navigator.maxTouchPoints||\"ontouchstart\"in this}function zs(){var t,e,n,r,i=Fs,a=Rs,o=Ps,s=js,c={},l=fe(\"start\",\"drag\",\"end\"),u=0,h=0;function f(t){t.on(\"mousedown.drag\",d).filter(s).on(\"touchstart.drag\",y).on(\"touchmove.drag\",m,Nn).on(\"touchend.drag touchcancel.drag\",b).style(\"touch-action\",\"none\").style(\"-webkit-tap-highlight-color\",\"rgba(0,0,0,0)\");}function d(o,s){if(!r&&i.call(this,o,s)){var c=v(this,a.call(this,o,s),o,s,\"mouse\");c&&(Mn(o.view).on(\"mousemove.drag\",p,On).on(\"mouseup.drag\",g,On),Ln(o.view),Dn(o),n=!1,t=o.clientX,e=o.clientY,c(\"start\",o));}}function p(r){if(Bn(r),!n){var i=r.clientX-t,a=r.clientY-e;n=i*i+a*a>h;}c.mouse(\"drag\",r);}function g(t){Mn(t.view).on(\"mousemove.drag mouseup.drag\",null),In(t.view,n),Bn(t),c.mouse(\"end\",t);}function y(t,e){if(i.call(this,t,e)){var n,r,o=t.changedTouches,s=a.call(this,t,e),c=o.length;for(n=0;n<c;++n)(r=v(this,s,t,e,o[n].identifier,o[n]))&&(Dn(t),r(\"start\",t,o[n]));}}function m(t){var e,n,r=t.changedTouches,i=r.length;for(e=0;e<i;++e)(n=c[r[e].identifier])&&(Bn(t),n(\"drag\",t,r[e]));}function b(t){var e,n,i=t.changedTouches,a=i.length;for(r&&clearTimeout(r),r=setTimeout((function(){r=null;}),500),e=0;e<a;++e)(n=c[i[e].identifier])&&(Dn(t),n(\"end\",t,i[e]));}function v(t,e,n,r,i,a){var s,h,d,p=l.copy(),g=Rr(a||n,e);if(null!=(d=o.call(t,new Is(\"beforestart\",{sourceEvent:n,target:f,identifier:i,active:u,x:g[0],y:g[1],dx:0,dy:0,dispatch:p}),r)))return s=d.x-g[0]||0,h=d.y-g[1]||0,function n(a,o,l){var y,m=g;switch(a){case\"start\":c[i]=n,y=u++;break;case\"end\":delete c[i],--u;case\"drag\":g=Rr(l||o,e),y=u;}p.call(a,t,new Is(a,{sourceEvent:o,subject:d,target:f,identifier:i,active:y,x:g[0]+s,y:g[1]+h,dx:g[0]-m[0],dy:g[1]-m[1],dispatch:p}),r);}}return f.filter=function(t){return arguments.length?(i=\"function\"==typeof t?t:Ls(!!t),f):i},f.container=function(t){return arguments.length?(a=\"function\"==typeof t?t:Ls(t),f):a},f.subject=function(t){return arguments.length?(o=\"function\"==typeof t?t:Ls(t),f):o},f.touchable=function(t){return arguments.length?(s=\"function\"==typeof t?t:Ls(!!t),f):s},f.on=function(){var t=l.on.apply(l,arguments);return t===l?f:t},f.clickDistance=function(t){return arguments.length?(h=(t=+t)*t,f):Math.sqrt(h)},f}Is.prototype.on=function(){var t=this._.on.apply(this._,arguments);return t===this._?this:t};var Ys={},Us={};function $s(t){return new Function(\"d\",\"return {\"+t.map((function(t,e){return JSON.stringify(t)+\": d[\"+e+'] || \"\"'})).join(\",\")+\"}\")}function Ws(t){var e=Object.create(null),n=[];return t.forEach((function(t){for(var r in t)r in e||n.push(e[r]=r);})),n}function qs(t,e){var n=t+\"\",r=n.length;return r<e?new Array(e-r+1).join(0)+n:n}function Hs(t){var e=new RegExp('[\"'+t+\"\\n\\r]\"),n=t.charCodeAt(0);function r(t,e){var r,i=[],a=t.length,o=0,s=0,c=a<=0,l=!1;function u(){if(c)return Us;if(l)return l=!1,Ys;var e,r,i=o;if(34===t.charCodeAt(i)){for(;o++<a&&34!==t.charCodeAt(o)||34===t.charCodeAt(++o););return (e=o)>=a?c=!0:10===(r=t.charCodeAt(o++))?l=!0:13===r&&(l=!0,10===t.charCodeAt(o)&&++o),t.slice(i+1,e-1).replace(/\"\"/g,'\"')}for(;o<a;){if(10===(r=t.charCodeAt(e=o++)))l=!0;else if(13===r)l=!0,10===t.charCodeAt(o)&&++o;else if(r!==n)continue;return t.slice(i,e)}return c=!0,t.slice(i,a)}for(10===t.charCodeAt(a-1)&&--a,13===t.charCodeAt(a-1)&&--a;(r=u())!==Us;){for(var h=[];r!==Ys&&r!==Us;)h.push(r),r=u();e&&null==(h=e(h,s++))||i.push(h);}return i}function i(e,n){return e.map((function(e){return n.map((function(t){return o(e[t])})).join(t)}))}function a(e){return e.map(o).join(t)}function o(t){return null==t?\"\":t instanceof Date?function(t){var e=t.getUTCHours(),n=t.getUTCMinutes(),r=t.getUTCSeconds(),i=t.getUTCMilliseconds();return isNaN(t)?\"Invalid Date\":function(t){return t<0?\"-\"+qs(-t,6):t>9999?\"+\"+qs(t,6):qs(t,4)}(t.getUTCFullYear())+\"-\"+qs(t.getUTCMonth()+1,2)+\"-\"+qs(t.getUTCDate(),2)+(i?\"T\"+qs(e,2)+\":\"+qs(n,2)+\":\"+qs(r,2)+\".\"+qs(i,3)+\"Z\":r?\"T\"+qs(e,2)+\":\"+qs(n,2)+\":\"+qs(r,2)+\"Z\":n||e?\"T\"+qs(e,2)+\":\"+qs(n,2)+\"Z\":\"\")}(t):e.test(t+=\"\")?'\"'+t.replace(/\"/g,'\"\"')+'\"':t}return {parse:function(t,e){var n,i,a=r(t,(function(t,r){if(n)return n(t,r-1);i=t,n=e?function(t,e){var n=$s(t);return function(r,i){return e(n(r),i,t)}}(t,e):$s(t);}));return a.columns=i||[],a},parseRows:r,format:function(e,n){return null==n&&(n=Ws(e)),[n.map(o).join(t)].concat(i(e,n)).join(\"\\n\")},formatBody:function(t,e){return null==e&&(e=Ws(t)),i(t,e).join(\"\\n\")},formatRows:function(t){return t.map(a).join(\"\\n\")},formatRow:a,formatValue:o}}var Vs=Hs(\",\"),Gs=Vs.parse,Xs=Vs.parseRows,Zs=Vs.format,Qs=Vs.formatBody,Ks=Vs.formatRows,Js=Vs.formatRow,tc=Vs.formatValue,ec=Hs(\"\\t\"),nc=ec.parse,rc=ec.parseRows,ic=ec.format,ac=ec.formatBody,oc=ec.formatRows,sc=ec.formatRow,cc=ec.formatValue;function lc(t){for(var e in t){var n,r,i=t[e].trim();if(i)if(\"true\"===i)i=!0;else if(\"false\"===i)i=!1;else if(\"NaN\"===i)i=NaN;else if(isNaN(n=+i)){if(!(r=i.match(/^([-+]\\d{2})?\\d{4}(-\\d{2}(-\\d{2})?)?(T\\d{2}:\\d{2}(:\\d{2}(\\.\\d{3})?)?(Z|[-+]\\d{2}:\\d{2})?)?$/)))continue;uc&&r[4]&&!r[7]&&(i=i.replace(/-/g,\"/\").replace(/T/,\" \")),i=new Date(i);}else i=n;else i=null;t[e]=i;}return t}const uc=new Date(\"2019-01-01T00:00\").getHours()||new Date(\"2019-07-01T00:00\").getHours(),hc=t=>+t;function fc(t){return t*t}function dc(t){return t*(2-t)}function pc(t){return ((t*=2)<=1?t*t:--t*(2-t)+1)/2}var gc=function t(e){function n(t){return Math.pow(t,e)}return e=+e,n.exponent=t,n}(3),yc=function t(e){function n(t){return 1-Math.pow(1-t,e)}return e=+e,n.exponent=t,n}(3),mc=function t(e){function n(t){return ((t*=2)<=1?Math.pow(t,e):2-Math.pow(2-t,e))/2}return e=+e,n.exponent=t,n}(3),bc=Math.PI,vc=bc/2;function _c(t){return 1==+t?1:1-Math.cos(t*vc)}function xc(t){return Math.sin(t*vc)}function kc(t){return (1-Math.cos(bc*t))/2}function wc(t){return 1.0009775171065494*(Math.pow(2,-10*t)-.0009765625)}function Tc(t){return wc(1-+t)}function Ec(t){return 1-wc(t)}function Cc(t){return ((t*=2)<=1?wc(1-t):2-wc(t-1))/2}function Sc(t){return 1-Math.sqrt(1-t*t)}function Ac(t){return Math.sqrt(1- --t*t)}function Mc(t){return ((t*=2)<=1?1-Math.sqrt(1-t*t):Math.sqrt(1-(t-=2)*t)+1)/2}var Nc=7.5625;function Oc(t){return 1-Dc(1-t)}function Dc(t){return (t=+t)<.36363636363636365?Nc*t*t:t<.7272727272727273?Nc*(t-=.5454545454545454)*t+.75:t<.9090909090909091?Nc*(t-=.8181818181818182)*t+.9375:Nc*(t-=.9545454545454546)*t+.984375}function Bc(t){return ((t*=2)<=1?1-Dc(1-t):Dc(t-1)+1)/2}var Lc=1.70158,Ic=function t(e){function n(t){return (t=+t)*t*(e*(t-1)+t)}return e=+e,n.overshoot=t,n}(Lc),Fc=function t(e){function n(t){return --t*t*((t+1)*e+t)+1}return e=+e,n.overshoot=t,n}(Lc),Rc=function t(e){function n(t){return ((t*=2)<1?t*t*((e+1)*t-e):(t-=2)*t*((e+1)*t+e)+2)/2}return e=+e,n.overshoot=t,n}(Lc),Pc=2*Math.PI,jc=function t(e,n){var r=Math.asin(1/(e=Math.max(1,e)))*(n/=Pc);function i(t){return e*wc(- --t)*Math.sin((r-t)/n)}return i.amplitude=function(e){return t(e,n*Pc)},i.period=function(n){return t(e,n)},i}(1,.3),zc=function t(e,n){var r=Math.asin(1/(e=Math.max(1,e)))*(n/=Pc);function i(t){return 1-e*wc(t=+t)*Math.sin((t+r)/n)}return i.amplitude=function(e){return t(e,n*Pc)},i.period=function(n){return t(e,n)},i}(1,.3),Yc=function t(e,n){var r=Math.asin(1/(e=Math.max(1,e)))*(n/=Pc);function i(t){return ((t=2*t-1)<0?e*wc(-t)*Math.sin((r-t)/n):2-e*wc(t)*Math.sin((r+t)/n))/2}return i.amplitude=function(e){return t(e,n*Pc)},i.period=function(n){return t(e,n)},i}(1,.3);function Uc(t){if(!t.ok)throw new Error(t.status+\" \"+t.statusText);return t.blob()}function $c(t,e){return fetch(t,e).then(Uc)}function Wc(t){if(!t.ok)throw new Error(t.status+\" \"+t.statusText);return t.arrayBuffer()}function qc(t,e){return fetch(t,e).then(Wc)}function Hc(t){if(!t.ok)throw new Error(t.status+\" \"+t.statusText);return t.text()}function Vc(t,e){return fetch(t,e).then(Hc)}function Gc(t){return function(e,n,r){return 2===arguments.length&&\"function\"==typeof n&&(r=n,n=void 0),Vc(e,n).then((function(e){return t(e,r)}))}}function Xc(t,e,n,r){3===arguments.length&&\"function\"==typeof n&&(r=n,n=void 0);var i=Hs(t);return Vc(e,n).then((function(t){return i.parse(t,r)}))}var Zc=Gc(Gs),Qc=Gc(nc);function Kc(t,e){return new Promise((function(n,r){var i=new Image;for(var a in e)i[a]=e[a];i.onerror=r,i.onload=function(){n(i);},i.src=t;}))}function Jc(t){if(!t.ok)throw new Error(t.status+\" \"+t.statusText);if(204!==t.status&&205!==t.status)return t.json()}function tl(t,e){return fetch(t,e).then(Jc)}function el(t){return (e,n)=>Vc(e,n).then((e=>(new DOMParser).parseFromString(e,t)))}const nl=el(\"application/xml\");var rl=el(\"text/html\"),il=el(\"image/svg+xml\");function al(t,e){var n,r=1;function i(){var i,a,o=n.length,s=0,c=0;for(i=0;i<o;++i)s+=(a=n[i]).x,c+=a.y;for(s=(s/o-t)*r,c=(c/o-e)*r,i=0;i<o;++i)(a=n[i]).x-=s,a.y-=c;}return null==t&&(t=0),null==e&&(e=0),i.initialize=function(t){n=t;},i.x=function(e){return arguments.length?(t=+e,i):t},i.y=function(t){return arguments.length?(e=+t,i):e},i.strength=function(t){return arguments.length?(r=+t,i):r},i}function ol(t,e,n,r){if(isNaN(e)||isNaN(n))return t;var i,a,o,s,c,l,u,h,f,d=t._root,p={data:r},g=t._x0,y=t._y0,m=t._x1,b=t._y1;if(!d)return t._root=p,t;for(;d.length;)if((l=e>=(a=(g+m)/2))?g=a:m=a,(u=n>=(o=(y+b)/2))?y=o:b=o,i=d,!(d=d[h=u<<1|l]))return i[h]=p,t;if(s=+t._x.call(null,d.data),c=+t._y.call(null,d.data),e===s&&n===c)return p.next=d,i?i[h]=p:t._root=p,t;do{i=i?i[h]=new Array(4):t._root=new Array(4),(l=e>=(a=(g+m)/2))?g=a:m=a,(u=n>=(o=(y+b)/2))?y=o:b=o;}while((h=u<<1|l)==(f=(c>=o)<<1|s>=a));return i[f]=d,i[h]=p,t}function sl(t,e,n,r,i){this.node=t,this.x0=e,this.y0=n,this.x1=r,this.y1=i;}function cl(t){return t[0]}function ll(t){return t[1]}function ul(t,e,n){var r=new hl(null==e?cl:e,null==n?ll:n,NaN,NaN,NaN,NaN);return null==t?r:r.addAll(t)}function hl(t,e,n,r,i,a){this._x=t,this._y=e,this._x0=n,this._y0=r,this._x1=i,this._y1=a,this._root=void 0;}function fl(t){for(var e={data:t.data},n=e;t=t.next;)n=n.next={data:t.data};return e}var dl=ul.prototype=hl.prototype;function pl(t){return function(){return t}}function gl(t){return 1e-6*(t()-.5)}function yl(t){return t.x+t.vx}function ml(t){return t.y+t.vy}function bl(t){var e,n,r,i=1,a=1;function o(){for(var t,o,c,l,u,h,f,d=e.length,p=0;p<a;++p)for(o=ul(e,yl,ml).visitAfter(s),t=0;t<d;++t)c=e[t],h=n[c.index],f=h*h,l=c.x+c.vx,u=c.y+c.vy,o.visit(g);function g(t,e,n,a,o){var s=t.data,d=t.r,p=h+d;if(!s)return e>l+p||a<l-p||n>u+p||o<u-p;if(s.index>c.index){var g=l-s.x-s.vx,y=u-s.y-s.vy,m=g*g+y*y;m<p*p&&(0===g&&(m+=(g=gl(r))*g),0===y&&(m+=(y=gl(r))*y),m=(p-(m=Math.sqrt(m)))/m*i,c.vx+=(g*=m)*(p=(d*=d)/(f+d)),c.vy+=(y*=m)*p,s.vx-=g*(p=1-p),s.vy-=y*p);}}}function s(t){if(t.data)return t.r=n[t.data.index];for(var e=t.r=0;e<4;++e)t[e]&&t[e].r>t.r&&(t.r=t[e].r);}function c(){if(e){var r,i,a=e.length;for(n=new Array(a),r=0;r<a;++r)i=e[r],n[i.index]=+t(i,r,e);}}return \"function\"!=typeof t&&(t=pl(null==t?1:+t)),o.initialize=function(t,n){e=t,r=n,c();},o.iterations=function(t){return arguments.length?(a=+t,o):a},o.strength=function(t){return arguments.length?(i=+t,o):i},o.radius=function(e){return arguments.length?(t=\"function\"==typeof e?e:pl(+e),c(),o):t},o}function vl(t){return t.index}function _l(t,e){var n=t.get(e);if(!n)throw new Error(\"node not found: \"+e);return n}function xl(t){var e,n,r,i,a,o,s=vl,c=function(t){return 1/Math.min(i[t.source.index],i[t.target.index])},l=pl(30),u=1;function h(r){for(var i=0,s=t.length;i<u;++i)for(var c,l,h,f,d,p,g,y=0;y<s;++y)l=(c=t[y]).source,f=(h=c.target).x+h.vx-l.x-l.vx||gl(o),d=h.y+h.vy-l.y-l.vy||gl(o),f*=p=((p=Math.sqrt(f*f+d*d))-n[y])/p*r*e[y],d*=p,h.vx-=f*(g=a[y]),h.vy-=d*g,l.vx+=f*(g=1-g),l.vy+=d*g;}function f(){if(r){var o,c,l=r.length,u=t.length,h=new Map(r.map(((t,e)=>[s(t,e,r),t])));for(o=0,i=new Array(l);o<u;++o)(c=t[o]).index=o,\"object\"!=typeof c.source&&(c.source=_l(h,c.source)),\"object\"!=typeof c.target&&(c.target=_l(h,c.target)),i[c.source.index]=(i[c.source.index]||0)+1,i[c.target.index]=(i[c.target.index]||0)+1;for(o=0,a=new Array(u);o<u;++o)c=t[o],a[o]=i[c.source.index]/(i[c.source.index]+i[c.target.index]);e=new Array(u),d(),n=new Array(u),p();}}function d(){if(r)for(var n=0,i=t.length;n<i;++n)e[n]=+c(t[n],n,t);}function p(){if(r)for(var e=0,i=t.length;e<i;++e)n[e]=+l(t[e],e,t);}return null==t&&(t=[]),h.initialize=function(t,e){r=t,o=e,f();},h.links=function(e){return arguments.length?(t=e,f(),h):t},h.id=function(t){return arguments.length?(s=t,h):s},h.iterations=function(t){return arguments.length?(u=+t,h):u},h.strength=function(t){return arguments.length?(c=\"function\"==typeof t?t:pl(+t),d(),h):c},h.distance=function(t){return arguments.length?(l=\"function\"==typeof t?t:pl(+t),p(),h):l},h}dl.copy=function(){var t,e,n=new hl(this._x,this._y,this._x0,this._y0,this._x1,this._y1),r=this._root;if(!r)return n;if(!r.length)return n._root=fl(r),n;for(t=[{source:r,target:n._root=new Array(4)}];r=t.pop();)for(var i=0;i<4;++i)(e=r.source[i])&&(e.length?t.push({source:e,target:r.target[i]=new Array(4)}):r.target[i]=fl(e));return n},dl.add=function(t){const e=+this._x.call(null,t),n=+this._y.call(null,t);return ol(this.cover(e,n),e,n,t)},dl.addAll=function(t){var e,n,r,i,a=t.length,o=new Array(a),s=new Array(a),c=1/0,l=1/0,u=-1/0,h=-1/0;for(n=0;n<a;++n)isNaN(r=+this._x.call(null,e=t[n]))||isNaN(i=+this._y.call(null,e))||(o[n]=r,s[n]=i,r<c&&(c=r),r>u&&(u=r),i<l&&(l=i),i>h&&(h=i));if(c>u||l>h)return this;for(this.cover(c,l).cover(u,h),n=0;n<a;++n)ol(this,o[n],s[n],t[n]);return this},dl.cover=function(t,e){if(isNaN(t=+t)||isNaN(e=+e))return this;var n=this._x0,r=this._y0,i=this._x1,a=this._y1;if(isNaN(n))i=(n=Math.floor(t))+1,a=(r=Math.floor(e))+1;else {for(var o,s,c=i-n||1,l=this._root;n>t||t>=i||r>e||e>=a;)switch(s=(e<r)<<1|t<n,(o=new Array(4))[s]=l,l=o,c*=2,s){case 0:i=n+c,a=r+c;break;case 1:n=i-c,a=r+c;break;case 2:i=n+c,r=a-c;break;case 3:n=i-c,r=a-c;}this._root&&this._root.length&&(this._root=l);}return this._x0=n,this._y0=r,this._x1=i,this._y1=a,this},dl.data=function(){var t=[];return this.visit((function(e){if(!e.length)do{t.push(e.data);}while(e=e.next)})),t},dl.extent=function(t){return arguments.length?this.cover(+t[0][0],+t[0][1]).cover(+t[1][0],+t[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]},dl.find=function(t,e,n){var r,i,a,o,s,c,l,u=this._x0,h=this._y0,f=this._x1,d=this._y1,p=[],g=this._root;for(g&&p.push(new sl(g,u,h,f,d)),null==n?n=1/0:(u=t-n,h=e-n,f=t+n,d=e+n,n*=n);c=p.pop();)if(!(!(g=c.node)||(i=c.x0)>f||(a=c.y0)>d||(o=c.x1)<u||(s=c.y1)<h))if(g.length){var y=(i+o)/2,m=(a+s)/2;p.push(new sl(g[3],y,m,o,s),new sl(g[2],i,m,y,s),new sl(g[1],y,a,o,m),new sl(g[0],i,a,y,m)),(l=(e>=m)<<1|t>=y)&&(c=p[p.length-1],p[p.length-1]=p[p.length-1-l],p[p.length-1-l]=c);}else {var b=t-+this._x.call(null,g.data),v=e-+this._y.call(null,g.data),_=b*b+v*v;if(_<n){var x=Math.sqrt(n=_);u=t-x,h=e-x,f=t+x,d=e+x,r=g.data;}}return r},dl.remove=function(t){if(isNaN(a=+this._x.call(null,t))||isNaN(o=+this._y.call(null,t)))return this;var e,n,r,i,a,o,s,c,l,u,h,f,d=this._root,p=this._x0,g=this._y0,y=this._x1,m=this._y1;if(!d)return this;if(d.length)for(;;){if((l=a>=(s=(p+y)/2))?p=s:y=s,(u=o>=(c=(g+m)/2))?g=c:m=c,e=d,!(d=d[h=u<<1|l]))return this;if(!d.length)break;(e[h+1&3]||e[h+2&3]||e[h+3&3])&&(n=e,f=h);}for(;d.data!==t;)if(r=d,!(d=d.next))return this;return (i=d.next)&&delete d.next,r?(i?r.next=i:delete r.next,this):e?(i?e[h]=i:delete e[h],(d=e[0]||e[1]||e[2]||e[3])&&d===(e[3]||e[2]||e[1]||e[0])&&!d.length&&(n?n[f]=d:this._root=d),this):(this._root=i,this)},dl.removeAll=function(t){for(var e=0,n=t.length;e<n;++e)this.remove(t[e]);return this},dl.root=function(){return this._root},dl.size=function(){var t=0;return this.visit((function(e){if(!e.length)do{++t;}while(e=e.next)})),t},dl.visit=function(t){var e,n,r,i,a,o,s=[],c=this._root;for(c&&s.push(new sl(c,this._x0,this._y0,this._x1,this._y1));e=s.pop();)if(!t(c=e.node,r=e.x0,i=e.y0,a=e.x1,o=e.y1)&&c.length){var l=(r+a)/2,u=(i+o)/2;(n=c[3])&&s.push(new sl(n,l,u,a,o)),(n=c[2])&&s.push(new sl(n,r,u,l,o)),(n=c[1])&&s.push(new sl(n,l,i,a,u)),(n=c[0])&&s.push(new sl(n,r,i,l,u));}return this},dl.visitAfter=function(t){var e,n=[],r=[];for(this._root&&n.push(new sl(this._root,this._x0,this._y0,this._x1,this._y1));e=n.pop();){var i=e.node;if(i.length){var a,o=e.x0,s=e.y0,c=e.x1,l=e.y1,u=(o+c)/2,h=(s+l)/2;(a=i[0])&&n.push(new sl(a,o,s,u,h)),(a=i[1])&&n.push(new sl(a,u,s,c,h)),(a=i[2])&&n.push(new sl(a,o,h,u,l)),(a=i[3])&&n.push(new sl(a,u,h,c,l));}r.push(e);}for(;e=r.pop();)t(e.node,e.x0,e.y0,e.x1,e.y1);return this},dl.x=function(t){return arguments.length?(this._x=t,this):this._x},dl.y=function(t){return arguments.length?(this._y=t,this):this._y};const kl=4294967296;function wl(t){return t.x}function Tl(t){return t.y}var El=Math.PI*(3-Math.sqrt(5));function Cl(t){var e,n=1,r=.001,i=1-Math.pow(r,1/300),a=0,o=.6,s=new Map,c=Qr(h),l=fe(\"tick\",\"end\"),u=function(){let t=1;return ()=>(t=(1664525*t+1013904223)%kl)/kl}();function h(){f(),l.call(\"tick\",e),n<r&&(c.stop(),l.call(\"end\",e));}function f(r){var c,l,u=t.length;void 0===r&&(r=1);for(var h=0;h<r;++h)for(n+=(a-n)*i,s.forEach((function(t){t(n);})),c=0;c<u;++c)null==(l=t[c]).fx?l.x+=l.vx*=o:(l.x=l.fx,l.vx=0),null==l.fy?l.y+=l.vy*=o:(l.y=l.fy,l.vy=0);return e}function d(){for(var e,n=0,r=t.length;n<r;++n){if((e=t[n]).index=n,null!=e.fx&&(e.x=e.fx),null!=e.fy&&(e.y=e.fy),isNaN(e.x)||isNaN(e.y)){var i=10*Math.sqrt(.5+n),a=n*El;e.x=i*Math.cos(a),e.y=i*Math.sin(a);}(isNaN(e.vx)||isNaN(e.vy))&&(e.vx=e.vy=0);}}function p(e){return e.initialize&&e.initialize(t,u),e}return null==t&&(t=[]),d(),e={tick:f,restart:function(){return c.restart(h),e},stop:function(){return c.stop(),e},nodes:function(n){return arguments.length?(t=n,d(),s.forEach(p),e):t},alpha:function(t){return arguments.length?(n=+t,e):n},alphaMin:function(t){return arguments.length?(r=+t,e):r},alphaDecay:function(t){return arguments.length?(i=+t,e):+i},alphaTarget:function(t){return arguments.length?(a=+t,e):a},velocityDecay:function(t){return arguments.length?(o=1-t,e):1-o},randomSource:function(t){return arguments.length?(u=t,s.forEach(p),e):u},force:function(t,n){return arguments.length>1?(null==n?s.delete(t):s.set(t,p(n)),e):s.get(t)},find:function(e,n,r){var i,a,o,s,c,l=0,u=t.length;for(null==r?r=1/0:r*=r,l=0;l<u;++l)(o=(i=e-(s=t[l]).x)*i+(a=n-s.y)*a)<r&&(c=s,r=o);return c},on:function(t,n){return arguments.length>1?(l.on(t,n),e):l.on(t)}}}function Sl(){var t,e,n,r,i,a=pl(-30),o=1,s=1/0,c=.81;function l(n){var i,a=t.length,o=ul(t,wl,Tl).visitAfter(h);for(r=n,i=0;i<a;++i)e=t[i],o.visit(f);}function u(){if(t){var e,n,r=t.length;for(i=new Array(r),e=0;e<r;++e)n=t[e],i[n.index]=+a(n,e,t);}}function h(t){var e,n,r,a,o,s=0,c=0;if(t.length){for(r=a=o=0;o<4;++o)(e=t[o])&&(n=Math.abs(e.value))&&(s+=e.value,c+=n,r+=n*e.x,a+=n*e.y);t.x=r/c,t.y=a/c;}else {(e=t).x=e.data.x,e.y=e.data.y;do{s+=i[e.data.index];}while(e=e.next)}t.value=s;}function f(t,a,l,u){if(!t.value)return !0;var h=t.x-e.x,f=t.y-e.y,d=u-a,p=h*h+f*f;if(d*d/c<p)return p<s&&(0===h&&(p+=(h=gl(n))*h),0===f&&(p+=(f=gl(n))*f),p<o&&(p=Math.sqrt(o*p)),e.vx+=h*t.value*r/p,e.vy+=f*t.value*r/p),!0;if(!(t.length||p>=s)){(t.data!==e||t.next)&&(0===h&&(p+=(h=gl(n))*h),0===f&&(p+=(f=gl(n))*f),p<o&&(p=Math.sqrt(o*p)));do{t.data!==e&&(d=i[t.data.index]*r/p,e.vx+=h*d,e.vy+=f*d);}while(t=t.next)}}return l.initialize=function(e,r){t=e,n=r,u();},l.strength=function(t){return arguments.length?(a=\"function\"==typeof t?t:pl(+t),u(),l):a},l.distanceMin=function(t){return arguments.length?(o=t*t,l):Math.sqrt(o)},l.distanceMax=function(t){return arguments.length?(s=t*t,l):Math.sqrt(s)},l.theta=function(t){return arguments.length?(c=t*t,l):Math.sqrt(c)},l}function Al(t,e,n){var r,i,a,o=pl(.1);function s(t){for(var o=0,s=r.length;o<s;++o){var c=r[o],l=c.x-e||1e-6,u=c.y-n||1e-6,h=Math.sqrt(l*l+u*u),f=(a[o]-h)*i[o]*t/h;c.vx+=l*f,c.vy+=u*f;}}function c(){if(r){var e,n=r.length;for(i=new Array(n),a=new Array(n),e=0;e<n;++e)a[e]=+t(r[e],e,r),i[e]=isNaN(a[e])?0:+o(r[e],e,r);}}return \"function\"!=typeof t&&(t=pl(+t)),null==e&&(e=0),null==n&&(n=0),s.initialize=function(t){r=t,c();},s.strength=function(t){return arguments.length?(o=\"function\"==typeof t?t:pl(+t),c(),s):o},s.radius=function(e){return arguments.length?(t=\"function\"==typeof e?e:pl(+e),c(),s):t},s.x=function(t){return arguments.length?(e=+t,s):e},s.y=function(t){return arguments.length?(n=+t,s):n},s}function Ml(t){var e,n,r,i=pl(.1);function a(t){for(var i,a=0,o=e.length;a<o;++a)(i=e[a]).vx+=(r[a]-i.x)*n[a]*t;}function o(){if(e){var a,o=e.length;for(n=new Array(o),r=new Array(o),a=0;a<o;++a)n[a]=isNaN(r[a]=+t(e[a],a,e))?0:+i(e[a],a,e);}}return \"function\"!=typeof t&&(t=pl(null==t?0:+t)),a.initialize=function(t){e=t,o();},a.strength=function(t){return arguments.length?(i=\"function\"==typeof t?t:pl(+t),o(),a):i},a.x=function(e){return arguments.length?(t=\"function\"==typeof e?e:pl(+e),o(),a):t},a}function Nl(t){var e,n,r,i=pl(.1);function a(t){for(var i,a=0,o=e.length;a<o;++a)(i=e[a]).vy+=(r[a]-i.y)*n[a]*t;}function o(){if(e){var a,o=e.length;for(n=new Array(o),r=new Array(o),a=0;a<o;++a)n[a]=isNaN(r[a]=+t(e[a],a,e))?0:+i(e[a],a,e);}}return \"function\"!=typeof t&&(t=pl(null==t?0:+t)),a.initialize=function(t){e=t,o();},a.strength=function(t){return arguments.length?(i=\"function\"==typeof t?t:pl(+t),o(),a):i},a.y=function(e){return arguments.length?(t=\"function\"==typeof e?e:pl(+e),o(),a):t},a}function Ol(t,e){if((n=(t=e?t.toExponential(e-1):t.toExponential()).indexOf(\"e\"))<0)return null;var n,r=t.slice(0,n);return [r.length>1?r[0]+r.slice(2):r,+t.slice(n+1)]}function Dl(t){return (t=Ol(Math.abs(t)))?t[1]:NaN}var Bl,Ll=/^(?:(.)?([<>=^]))?([+\\-( ])?([$#])?(0)?(\\d+)?(,)?(\\.\\d+)?(~)?([a-z%])?$/i;function Il(t){if(!(e=Ll.exec(t)))throw new Error(\"invalid format: \"+t);var e;return new Fl({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}function Fl(t){this.fill=void 0===t.fill?\" \":t.fill+\"\",this.align=void 0===t.align?\">\":t.align+\"\",this.sign=void 0===t.sign?\"-\":t.sign+\"\",this.symbol=void 0===t.symbol?\"\":t.symbol+\"\",this.zero=!!t.zero,this.width=void 0===t.width?void 0:+t.width,this.comma=!!t.comma,this.precision=void 0===t.precision?void 0:+t.precision,this.trim=!!t.trim,this.type=void 0===t.type?\"\":t.type+\"\";}function Rl(t,e){var n=Ol(t,e);if(!n)return t+\"\";var r=n[0],i=n[1];return i<0?\"0.\"+new Array(-i).join(\"0\")+r:r.length>i+1?r.slice(0,i+1)+\".\"+r.slice(i+1):r+new Array(i-r.length+2).join(\"0\")}Il.prototype=Fl.prototype,Fl.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?\"0\":\"\")+(void 0===this.width?\"\":Math.max(1,0|this.width))+(this.comma?\",\":\"\")+(void 0===this.precision?\"\":\".\"+Math.max(0,0|this.precision))+(this.trim?\"~\":\"\")+this.type};const Pl={\"%\":(t,e)=>(100*t).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+\"\",d:function(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString(\"en\").replace(/,/g,\"\"):t.toString(10)},e:(t,e)=>t.toExponential(e),f:(t,e)=>t.toFixed(e),g:(t,e)=>t.toPrecision(e),o:t=>Math.round(t).toString(8),p:(t,e)=>Rl(100*t,e),r:Rl,s:function(t,e){var n=Ol(t,e);if(!n)return t+\"\";var r=n[0],i=n[1],a=i-(Bl=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,o=r.length;return a===o?r:a>o?r+new Array(a-o+1).join(\"0\"):a>0?r.slice(0,a)+\".\"+r.slice(a):\"0.\"+new Array(1-a).join(\"0\")+Ol(t,Math.max(0,e+a-1))[0]},X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function jl(t){return t}var zl,Yl,Ul,$l=Array.prototype.map,Wl=[\"y\",\"z\",\"a\",\"f\",\"p\",\"n\",\"µ\",\"m\",\"\",\"k\",\"M\",\"G\",\"T\",\"P\",\"E\",\"Z\",\"Y\"];function ql(t){var e,n,r=void 0===t.grouping||void 0===t.thousands?jl:(e=$l.call(t.grouping,Number),n=t.thousands+\"\",function(t,r){for(var i=t.length,a=[],o=0,s=e[0],c=0;i>0&&s>0&&(c+s+1>r&&(s=Math.max(1,r-c)),a.push(t.substring(i-=s,i+s)),!((c+=s+1)>r));)s=e[o=(o+1)%e.length];return a.reverse().join(n)}),i=void 0===t.currency?\"\":t.currency[0]+\"\",a=void 0===t.currency?\"\":t.currency[1]+\"\",o=void 0===t.decimal?\".\":t.decimal+\"\",s=void 0===t.numerals?jl:function(t){return function(e){return e.replace(/[0-9]/g,(function(e){return t[+e]}))}}($l.call(t.numerals,String)),c=void 0===t.percent?\"%\":t.percent+\"\",l=void 0===t.minus?\"−\":t.minus+\"\",u=void 0===t.nan?\"NaN\":t.nan+\"\";function h(t){var e=(t=Il(t)).fill,n=t.align,h=t.sign,f=t.symbol,d=t.zero,p=t.width,g=t.comma,y=t.precision,m=t.trim,b=t.type;\"n\"===b?(g=!0,b=\"g\"):Pl[b]||(void 0===y&&(y=12),m=!0,b=\"g\"),(d||\"0\"===e&&\"=\"===n)&&(d=!0,e=\"0\",n=\"=\");var v=\"$\"===f?i:\"#\"===f&&/[boxX]/.test(b)?\"0\"+b.toLowerCase():\"\",_=\"$\"===f?a:/[%p]/.test(b)?c:\"\",x=Pl[b],k=/[defgprs%]/.test(b);function w(t){var i,a,c,f=v,w=_;if(\"c\"===b)w=x(t)+w,t=\"\";else {var T=(t=+t)<0||1/t<0;if(t=isNaN(t)?u:x(Math.abs(t),y),m&&(t=function(t){t:for(var e,n=t.length,r=1,i=-1;r<n;++r)switch(t[r]){case\".\":i=e=r;break;case\"0\":0===i&&(i=r),e=r;break;default:if(!+t[r])break t;i>0&&(i=0);}return i>0?t.slice(0,i)+t.slice(e+1):t}(t)),T&&0==+t&&\"+\"!==h&&(T=!1),f=(T?\"(\"===h?h:l:\"-\"===h||\"(\"===h?\"\":h)+f,w=(\"s\"===b?Wl[8+Bl/3]:\"\")+w+(T&&\"(\"===h?\")\":\"\"),k)for(i=-1,a=t.length;++i<a;)if(48>(c=t.charCodeAt(i))||c>57){w=(46===c?o+t.slice(i+1):t.slice(i))+w,t=t.slice(0,i);break}}g&&!d&&(t=r(t,1/0));var E=f.length+t.length+w.length,C=E<p?new Array(p-E+1).join(e):\"\";switch(g&&d&&(t=r(C+t,C.length?p-w.length:1/0),C=\"\"),n){case\"<\":t=f+t+w+C;break;case\"=\":t=f+C+t+w;break;case\"^\":t=C.slice(0,E=C.length>>1)+f+t+w+C.slice(E);break;default:t=C+f+t+w;}return s(t)}return y=void 0===y?6:/[gprs]/.test(b)?Math.max(1,Math.min(21,y)):Math.max(0,Math.min(20,y)),w.toString=function(){return t+\"\"},w}return {format:h,formatPrefix:function(t,e){var n=h(((t=Il(t)).type=\"f\",t)),r=3*Math.max(-8,Math.min(8,Math.floor(Dl(e)/3))),i=Math.pow(10,-r),a=Wl[8+r/3];return function(t){return n(i*t)+a}}}}function Hl(t){return zl=ql(t),Yl=zl.format,Ul=zl.formatPrefix,zl}function Vl(t){return Math.max(0,-Dl(Math.abs(t)))}function Gl(t,e){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(Dl(e)/3)))-Dl(Math.abs(t)))}function Xl(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,Dl(e)-Dl(t))+1}Hl({thousands:\",\",grouping:[3],currency:[\"$\",\"\"]});var Zl=1e-6,Ql=1e-12,Kl=Math.PI,Jl=Kl/2,tu=Kl/4,eu=2*Kl,nu=180/Kl,ru=Kl/180,iu=Math.abs,au=Math.atan,ou=Math.atan2,su=Math.cos,cu=Math.ceil,lu=Math.exp,uu=(Math.hypot),hu=Math.log,fu=Math.pow,du=Math.sin,pu=Math.sign||function(t){return t>0?1:t<0?-1:0},gu=Math.sqrt,yu=Math.tan;function mu(t){return t>1?0:t<-1?Kl:Math.acos(t)}function bu(t){return t>1?Jl:t<-1?-Jl:Math.asin(t)}function vu(t){return (t=du(t/2))*t}function _u(){}function xu(t,e){t&&wu.hasOwnProperty(t.type)&&wu[t.type](t,e);}var ku={Feature:function(t,e){xu(t.geometry,e);},FeatureCollection:function(t,e){for(var n=t.features,r=-1,i=n.length;++r<i;)xu(n[r].geometry,e);}},wu={Sphere:function(t,e){e.sphere();},Point:function(t,e){t=t.coordinates,e.point(t[0],t[1],t[2]);},MultiPoint:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)t=n[r],e.point(t[0],t[1],t[2]);},LineString:function(t,e){Tu(t.coordinates,e,0);},MultiLineString:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)Tu(n[r],e,0);},Polygon:function(t,e){Eu(t.coordinates,e);},MultiPolygon:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)Eu(n[r],e);},GeometryCollection:function(t,e){for(var n=t.geometries,r=-1,i=n.length;++r<i;)xu(n[r],e);}};function Tu(t,e,n){var r,i=-1,a=t.length-n;for(e.lineStart();++i<a;)r=t[i],e.point(r[0],r[1],r[2]);e.lineEnd();}function Eu(t,e){var n=-1,r=t.length;for(e.polygonStart();++n<r;)Tu(t[n],e,1);e.polygonEnd();}function Cu(t,e){t&&ku.hasOwnProperty(t.type)?ku[t.type](t,e):xu(t,e);}var Su,Au,Mu,Nu,Ou,Du,Bu,Lu,Iu,Fu,Ru,Pu,ju,zu,Yu,Uu,$u=new x,Wu=new x,qu={point:_u,lineStart:_u,lineEnd:_u,polygonStart:function(){$u=new x,qu.lineStart=Hu,qu.lineEnd=Vu;},polygonEnd:function(){var t=+$u;Wu.add(t<0?eu+t:t),this.lineStart=this.lineEnd=this.point=_u;},sphere:function(){Wu.add(eu);}};function Hu(){qu.point=Gu;}function Vu(){Xu(Su,Au);}function Gu(t,e){qu.point=Xu,Su=t,Au=e,Mu=t*=ru,Nu=su(e=(e*=ru)/2+tu),Ou=du(e);}function Xu(t,e){var n=(t*=ru)-Mu,r=n>=0?1:-1,i=r*n,a=su(e=(e*=ru)/2+tu),o=du(e),s=Ou*o,c=Nu*a+s*su(i),l=s*r*du(i);$u.add(ou(l,c)),Mu=t,Nu=a,Ou=o;}function Zu(t){return Wu=new x,Cu(t,qu),2*Wu}function Qu(t){return [ou(t[1],t[0]),bu(t[2])]}function Ku(t){var e=t[0],n=t[1],r=su(n);return [r*su(e),r*du(e),du(n)]}function Ju(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function th(t,e){return [t[1]*e[2]-t[2]*e[1],t[2]*e[0]-t[0]*e[2],t[0]*e[1]-t[1]*e[0]]}function eh(t,e){t[0]+=e[0],t[1]+=e[1],t[2]+=e[2];}function nh(t,e){return [t[0]*e,t[1]*e,t[2]*e]}function rh(t){var e=gu(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=e,t[1]/=e,t[2]/=e;}var ih,ah,oh,sh,ch,lh,uh,hh,fh,dh,ph,gh,yh,mh,bh,vh,_h={point:xh,lineStart:wh,lineEnd:Th,polygonStart:function(){_h.point=Eh,_h.lineStart=Ch,_h.lineEnd=Sh,zu=new x,qu.polygonStart();},polygonEnd:function(){qu.polygonEnd(),_h.point=xh,_h.lineStart=wh,_h.lineEnd=Th,$u<0?(Du=-(Lu=180),Bu=-(Iu=90)):zu>Zl?Iu=90:zu<-1e-6&&(Bu=-90),Uu[0]=Du,Uu[1]=Lu;},sphere:function(){Du=-(Lu=180),Bu=-(Iu=90);}};function xh(t,e){Yu.push(Uu=[Du=t,Lu=t]),e<Bu&&(Bu=e),e>Iu&&(Iu=e);}function kh(t,e){var n=Ku([t*ru,e*ru]);if(ju){var r=th(ju,n),i=th([r[1],-r[0],0],r);rh(i),i=Qu(i);var a,o=t-Fu,s=o>0?1:-1,c=i[0]*nu*s,l=iu(o)>180;l^(s*Fu<c&&c<s*t)?(a=i[1]*nu)>Iu&&(Iu=a):l^(s*Fu<(c=(c+360)%360-180)&&c<s*t)?(a=-i[1]*nu)<Bu&&(Bu=a):(e<Bu&&(Bu=e),e>Iu&&(Iu=e)),l?t<Fu?Ah(Du,t)>Ah(Du,Lu)&&(Lu=t):Ah(t,Lu)>Ah(Du,Lu)&&(Du=t):Lu>=Du?(t<Du&&(Du=t),t>Lu&&(Lu=t)):t>Fu?Ah(Du,t)>Ah(Du,Lu)&&(Lu=t):Ah(t,Lu)>Ah(Du,Lu)&&(Du=t);}else Yu.push(Uu=[Du=t,Lu=t]);e<Bu&&(Bu=e),e>Iu&&(Iu=e),ju=n,Fu=t;}function wh(){_h.point=kh;}function Th(){Uu[0]=Du,Uu[1]=Lu,_h.point=xh,ju=null;}function Eh(t,e){if(ju){var n=t-Fu;zu.add(iu(n)>180?n+(n>0?360:-360):n);}else Ru=t,Pu=e;qu.point(t,e),kh(t,e);}function Ch(){qu.lineStart();}function Sh(){Eh(Ru,Pu),qu.lineEnd(),iu(zu)>Zl&&(Du=-(Lu=180)),Uu[0]=Du,Uu[1]=Lu,ju=null;}function Ah(t,e){return (e-=t)<0?e+360:e}function Mh(t,e){return t[0]-e[0]}function Nh(t,e){return t[0]<=t[1]?t[0]<=e&&e<=t[1]:e<t[0]||t[1]<e}function Oh(t){var e,n,r,i,a,o,s;if(Iu=Lu=-(Du=Bu=1/0),Yu=[],Cu(t,_h),n=Yu.length){for(Yu.sort(Mh),e=1,a=[r=Yu[0]];e<n;++e)Nh(r,(i=Yu[e])[0])||Nh(r,i[1])?(Ah(r[0],i[1])>Ah(r[0],r[1])&&(r[1]=i[1]),Ah(i[0],r[1])>Ah(r[0],r[1])&&(r[0]=i[0])):a.push(r=i);for(o=-1/0,e=0,r=a[n=a.length-1];e<=n;r=i,++e)i=a[e],(s=Ah(r[1],i[0]))>o&&(o=s,Du=i[0],Lu=r[1]);}return Yu=Uu=null,Du===1/0||Bu===1/0?[[NaN,NaN],[NaN,NaN]]:[[Du,Bu],[Lu,Iu]]}var Dh={sphere:_u,point:Bh,lineStart:Ih,lineEnd:Ph,polygonStart:function(){Dh.lineStart=jh,Dh.lineEnd=zh;},polygonEnd:function(){Dh.lineStart=Ih,Dh.lineEnd=Ph;}};function Bh(t,e){t*=ru;var n=su(e*=ru);Lh(n*su(t),n*du(t),du(e));}function Lh(t,e,n){++ih,oh+=(t-oh)/ih,sh+=(e-sh)/ih,ch+=(n-ch)/ih;}function Ih(){Dh.point=Fh;}function Fh(t,e){t*=ru;var n=su(e*=ru);mh=n*su(t),bh=n*du(t),vh=du(e),Dh.point=Rh,Lh(mh,bh,vh);}function Rh(t,e){t*=ru;var n=su(e*=ru),r=n*su(t),i=n*du(t),a=du(e),o=ou(gu((o=bh*a-vh*i)*o+(o=vh*r-mh*a)*o+(o=mh*i-bh*r)*o),mh*r+bh*i+vh*a);ah+=o,lh+=o*(mh+(mh=r)),uh+=o*(bh+(bh=i)),hh+=o*(vh+(vh=a)),Lh(mh,bh,vh);}function Ph(){Dh.point=Bh;}function jh(){Dh.point=Yh;}function zh(){Uh(gh,yh),Dh.point=Bh;}function Yh(t,e){gh=t,yh=e,t*=ru,e*=ru,Dh.point=Uh;var n=su(e);mh=n*su(t),bh=n*du(t),vh=du(e),Lh(mh,bh,vh);}function Uh(t,e){t*=ru;var n=su(e*=ru),r=n*su(t),i=n*du(t),a=du(e),o=bh*a-vh*i,s=vh*r-mh*a,c=mh*i-bh*r,l=uu(o,s,c),u=bu(l),h=l&&-u/l;fh.add(h*o),dh.add(h*s),ph.add(h*c),ah+=u,lh+=u*(mh+(mh=r)),uh+=u*(bh+(bh=i)),hh+=u*(vh+(vh=a)),Lh(mh,bh,vh);}function $h(t){ih=ah=oh=sh=ch=lh=uh=hh=0,fh=new x,dh=new x,ph=new x,Cu(t,Dh);var e=+fh,n=+dh,r=+ph,i=uu(e,n,r);return i<Ql&&(e=lh,n=uh,r=hh,ah<Zl&&(e=oh,n=sh,r=ch),(i=uu(e,n,r))<Ql)?[NaN,NaN]:[ou(n,e)*nu,bu(r/i)*nu]}function Wh(t){return function(){return t}}function qh(t,e){function n(n,r){return n=t(n,r),e(n[0],n[1])}return t.invert&&e.invert&&(n.invert=function(n,r){return (n=e.invert(n,r))&&t.invert(n[0],n[1])}),n}function Hh(t,e){return [iu(t)>Kl?t+Math.round(-t/eu)*eu:t,e]}function Vh(t,e,n){return (t%=eu)?e||n?qh(Xh(t),Zh(e,n)):Xh(t):e||n?Zh(e,n):Hh}function Gh(t){return function(e,n){return [(e+=t)>Kl?e-eu:e<-Kl?e+eu:e,n]}}function Xh(t){var e=Gh(t);return e.invert=Gh(-t),e}function Zh(t,e){var n=su(t),r=du(t),i=su(e),a=du(e);function o(t,e){var o=su(e),s=su(t)*o,c=du(t)*o,l=du(e),u=l*n+s*r;return [ou(c*i-u*a,s*n-l*r),bu(u*i+c*a)]}return o.invert=function(t,e){var o=su(e),s=su(t)*o,c=du(t)*o,l=du(e),u=l*i-c*a;return [ou(c*i+l*a,s*n+u*r),bu(u*n-s*r)]},o}function Qh(t){function e(e){return (e=t(e[0]*ru,e[1]*ru))[0]*=nu,e[1]*=nu,e}return t=Vh(t[0]*ru,t[1]*ru,t.length>2?t[2]*ru:0),e.invert=function(e){return (e=t.invert(e[0]*ru,e[1]*ru))[0]*=nu,e[1]*=nu,e},e}function Kh(t,e,n,r,i,a){if(n){var o=su(e),s=du(e),c=r*n;null==i?(i=e+r*eu,a=e-c/2):(i=Jh(o,i),a=Jh(o,a),(r>0?i<a:i>a)&&(i+=r*eu));for(var l,u=i;r>0?u>a:u<a;u-=c)l=Qu([o,-s*su(u),-s*du(u)]),t.point(l[0],l[1]);}}function Jh(t,e){(e=Ku(e))[0]-=t,rh(e);var n=mu(-e[1]);return ((-e[2]<0?-n:n)+eu-Zl)%eu}function tf(){var t,e,n=Wh([0,0]),r=Wh(90),i=Wh(6),a={point:function(n,r){t.push(n=e(n,r)),n[0]*=nu,n[1]*=nu;}};function o(){var o=n.apply(this,arguments),s=r.apply(this,arguments)*ru,c=i.apply(this,arguments)*ru;return t=[],e=Vh(-o[0]*ru,-o[1]*ru,0).invert,Kh(a,s,c,1),o={type:\"Polygon\",coordinates:[t]},t=e=null,o}return o.center=function(t){return arguments.length?(n=\"function\"==typeof t?t:Wh([+t[0],+t[1]]),o):n},o.radius=function(t){return arguments.length?(r=\"function\"==typeof t?t:Wh(+t),o):r},o.precision=function(t){return arguments.length?(i=\"function\"==typeof t?t:Wh(+t),o):i},o}function ef(){var t,e=[];return {point:function(e,n,r){t.push([e,n,r]);},lineStart:function(){e.push(t=[]);},lineEnd:_u,rejoin:function(){e.length>1&&e.push(e.pop().concat(e.shift()));},result:function(){var n=e;return e=[],t=null,n}}}function nf(t,e){return iu(t[0]-e[0])<Zl&&iu(t[1]-e[1])<Zl}function rf(t,e,n,r){this.x=t,this.z=e,this.o=n,this.e=r,this.v=!1,this.n=this.p=null;}function af(t,e,n,r,i){var a,o,s=[],c=[];if(t.forEach((function(t){if(!((e=t.length-1)<=0)){var e,n,r=t[0],o=t[e];if(nf(r,o)){if(!r[2]&&!o[2]){for(i.lineStart(),a=0;a<e;++a)i.point((r=t[a])[0],r[1]);return void i.lineEnd()}o[0]+=2e-6;}s.push(n=new rf(r,t,null,!0)),c.push(n.o=new rf(r,null,n,!1)),s.push(n=new rf(o,t,null,!1)),c.push(n.o=new rf(o,null,n,!0));}})),s.length){for(c.sort(e),of(s),of(c),a=0,o=c.length;a<o;++a)c[a].e=n=!n;for(var l,u,h=s[0];;){for(var f=h,d=!0;f.v;)if((f=f.n)===h)return;l=f.z,i.lineStart();do{if(f.v=f.o.v=!0,f.e){if(d)for(a=0,o=l.length;a<o;++a)i.point((u=l[a])[0],u[1]);else r(f.x,f.n.x,1,i);f=f.n;}else {if(d)for(l=f.p.z,a=l.length-1;a>=0;--a)i.point((u=l[a])[0],u[1]);else r(f.x,f.p.x,-1,i);f=f.p;}l=(f=f.o).z,d=!d;}while(!f.v);i.lineEnd();}}}function of(t){if(e=t.length){for(var e,n,r=0,i=t[0];++r<e;)i.n=n=t[r],n.p=i,i=n;i.n=n=t[0],n.p=i;}}function sf(t){return iu(t[0])<=Kl?t[0]:pu(t[0])*((iu(t[0])+Kl)%eu-Kl)}function cf(t,e){var n=sf(e),r=e[1],i=du(r),a=[du(n),-su(n),0],o=0,s=0,c=new x;1===i?r=Jl+Zl:-1===i&&(r=-Jl-Zl);for(var l=0,u=t.length;l<u;++l)if(f=(h=t[l]).length)for(var h,f,d=h[f-1],p=sf(d),g=d[1]/2+tu,y=du(g),m=su(g),b=0;b<f;++b,p=_,y=w,m=T,d=v){var v=h[b],_=sf(v),k=v[1]/2+tu,w=du(k),T=su(k),E=_-p,C=E>=0?1:-1,S=C*E,A=S>Kl,M=y*w;if(c.add(ou(M*C*du(S),m*T+M*su(S))),o+=A?E+C*eu:E,A^p>=n^_>=n){var N=th(Ku(d),Ku(v));rh(N);var O=th(a,N);rh(O);var D=(A^E>=0?-1:1)*bu(O[2]);(r>D||r===D&&(N[0]||N[1]))&&(s+=A^E>=0?1:-1);}}return (o<-1e-6||o<Zl&&c<-1e-12)^1&s}function lf(t,e,n,r){return function(i){var a,o,s,c=e(i),l=ef(),u=e(l),h=!1,f={point:d,lineStart:g,lineEnd:y,polygonStart:function(){f.point=m,f.lineStart=b,f.lineEnd=v,o=[],a=[];},polygonEnd:function(){f.point=d,f.lineStart=g,f.lineEnd=y,o=yt(o);var t=cf(a,r);o.length?(h||(i.polygonStart(),h=!0),af(o,hf,t,n,i)):t&&(h||(i.polygonStart(),h=!0),i.lineStart(),n(null,null,1,i),i.lineEnd()),h&&(i.polygonEnd(),h=!1),o=a=null;},sphere:function(){i.polygonStart(),i.lineStart(),n(null,null,1,i),i.lineEnd(),i.polygonEnd();}};function d(e,n){t(e,n)&&i.point(e,n);}function p(t,e){c.point(t,e);}function g(){f.point=p,c.lineStart();}function y(){f.point=d,c.lineEnd();}function m(t,e){s.push([t,e]),u.point(t,e);}function b(){u.lineStart(),s=[];}function v(){m(s[0][0],s[0][1]),u.lineEnd();var t,e,n,r,c=u.clean(),f=l.result(),d=f.length;if(s.pop(),a.push(s),s=null,d)if(1&c){if((e=(n=f[0]).length-1)>0){for(h||(i.polygonStart(),h=!0),i.lineStart(),t=0;t<e;++t)i.point((r=n[t])[0],r[1]);i.lineEnd();}}else d>1&&2&c&&f.push(f.pop().concat(f.shift())),o.push(f.filter(uf));}return f}}function uf(t){return t.length>1}function hf(t,e){return ((t=t.x)[0]<0?t[1]-Jl-Zl:Jl-t[1])-((e=e.x)[0]<0?e[1]-Jl-Zl:Jl-e[1])}Hh.invert=Hh;const ff=lf((function(){return !0}),(function(t){var e,n=NaN,r=NaN,i=NaN;return {lineStart:function(){t.lineStart(),e=1;},point:function(a,o){var s=a>0?Kl:-Kl,c=iu(a-n);iu(c-Kl)<Zl?(t.point(n,r=(r+o)/2>0?Jl:-Jl),t.point(i,r),t.lineEnd(),t.lineStart(),t.point(s,r),t.point(a,r),e=0):i!==s&&c>=Kl&&(iu(n-i)<Zl&&(n-=i*Zl),iu(a-s)<Zl&&(a-=s*Zl),r=function(t,e,n,r){var i,a,o=du(t-n);return iu(o)>Zl?au((du(e)*(a=su(r))*du(n)-du(r)*(i=su(e))*du(t))/(i*a*o)):(e+r)/2}(n,r,a,o),t.point(i,r),t.lineEnd(),t.lineStart(),t.point(s,r),e=0),t.point(n=a,r=o),i=s;},lineEnd:function(){t.lineEnd(),n=r=NaN;},clean:function(){return 2-e}}}),(function(t,e,n,r){var i;if(null==t)i=n*Jl,r.point(-Kl,i),r.point(0,i),r.point(Kl,i),r.point(Kl,0),r.point(Kl,-i),r.point(0,-i),r.point(-Kl,-i),r.point(-Kl,0),r.point(-Kl,i);else if(iu(t[0]-e[0])>Zl){var a=t[0]<e[0]?Kl:-Kl;i=n*a/2,r.point(-a,i),r.point(0,i),r.point(a,i);}else r.point(e[0],e[1]);}),[-Kl,-Jl]);function df(t){var e=su(t),n=6*ru,r=e>0,i=iu(e)>Zl;function a(t,n){return su(t)*su(n)>e}function o(t,n,r){var i=[1,0,0],a=th(Ku(t),Ku(n)),o=Ju(a,a),s=a[0],c=o-s*s;if(!c)return !r&&t;var l=e*o/c,u=-e*s/c,h=th(i,a),f=nh(i,l);eh(f,nh(a,u));var d=h,p=Ju(f,d),g=Ju(d,d),y=p*p-g*(Ju(f,f)-1);if(!(y<0)){var m=gu(y),b=nh(d,(-p-m)/g);if(eh(b,f),b=Qu(b),!r)return b;var v,_=t[0],x=n[0],k=t[1],w=n[1];x<_&&(v=_,_=x,x=v);var T=x-_,E=iu(T-Kl)<Zl;if(!E&&w<k&&(v=k,k=w,w=v),E||T<Zl?E?k+w>0^b[1]<(iu(b[0]-_)<Zl?k:w):k<=b[1]&&b[1]<=w:T>Kl^(_<=b[0]&&b[0]<=x)){var C=nh(d,(-p+m)/g);return eh(C,f),[b,Qu(C)]}}}function s(e,n){var i=r?t:Kl-t,a=0;return e<-i?a|=1:e>i&&(a|=2),n<-i?a|=4:n>i&&(a|=8),a}return lf(a,(function(t){var e,n,c,l,u;return {lineStart:function(){l=c=!1,u=1;},point:function(h,f){var d,p=[h,f],g=a(h,f),y=r?g?0:s(h,f):g?s(h+(h<0?Kl:-Kl),f):0;if(!e&&(l=c=g)&&t.lineStart(),g!==c&&(!(d=o(e,p))||nf(e,d)||nf(p,d))&&(p[2]=1),g!==c)u=0,g?(t.lineStart(),d=o(p,e),t.point(d[0],d[1])):(d=o(e,p),t.point(d[0],d[1],2),t.lineEnd()),e=d;else if(i&&e&&r^g){var m;y&n||!(m=o(p,e,!0))||(u=0,r?(t.lineStart(),t.point(m[0][0],m[0][1]),t.point(m[1][0],m[1][1]),t.lineEnd()):(t.point(m[1][0],m[1][1]),t.lineEnd(),t.lineStart(),t.point(m[0][0],m[0][1],3)));}!g||e&&nf(e,p)||t.point(p[0],p[1]),e=p,c=g,n=y;},lineEnd:function(){c&&t.lineEnd(),e=null;},clean:function(){return u|(l&&c)<<1}}}),(function(e,r,i,a){Kh(a,t,n,i,e,r);}),r?[0,-t]:[-Kl,t-Kl])}var pf,gf,yf,mf,bf=1e9,vf=-bf;function _f(t,e,n,r){function i(i,a){return t<=i&&i<=n&&e<=a&&a<=r}function a(i,a,s,l){var u=0,h=0;if(null==i||(u=o(i,s))!==(h=o(a,s))||c(i,a)<0^s>0)do{l.point(0===u||3===u?t:n,u>1?r:e);}while((u=(u+s+4)%4)!==h);else l.point(a[0],a[1]);}function o(r,i){return iu(r[0]-t)<Zl?i>0?0:3:iu(r[0]-n)<Zl?i>0?2:1:iu(r[1]-e)<Zl?i>0?1:0:i>0?3:2}function s(t,e){return c(t.x,e.x)}function c(t,e){var n=o(t,1),r=o(e,1);return n!==r?n-r:0===n?e[1]-t[1]:1===n?t[0]-e[0]:2===n?t[1]-e[1]:e[0]-t[0]}return function(o){var c,l,u,h,f,d,p,g,y,m,b,v=o,_=ef(),x={point:k,lineStart:function(){x.point=w,l&&l.push(u=[]),m=!0,y=!1,p=g=NaN;},lineEnd:function(){c&&(w(h,f),d&&y&&_.rejoin(),c.push(_.result())),x.point=k,y&&v.lineEnd();},polygonStart:function(){v=_,c=[],l=[],b=!0;},polygonEnd:function(){var e=function(){for(var e=0,n=0,i=l.length;n<i;++n)for(var a,o,s=l[n],c=1,u=s.length,h=s[0],f=h[0],d=h[1];c<u;++c)a=f,o=d,f=(h=s[c])[0],d=h[1],o<=r?d>r&&(f-a)*(r-o)>(d-o)*(t-a)&&++e:d<=r&&(f-a)*(r-o)<(d-o)*(t-a)&&--e;return e}(),n=b&&e,i=(c=yt(c)).length;(n||i)&&(o.polygonStart(),n&&(o.lineStart(),a(null,null,1,o),o.lineEnd()),i&&af(c,s,e,a,o),o.polygonEnd()),v=o,c=l=u=null;}};function k(t,e){i(t,e)&&v.point(t,e);}function w(a,o){var s=i(a,o);if(l&&u.push([a,o]),m)h=a,f=o,d=s,m=!1,s&&(v.lineStart(),v.point(a,o));else if(s&&y)v.point(a,o);else {var c=[p=Math.max(vf,Math.min(bf,p)),g=Math.max(vf,Math.min(bf,g))],_=[a=Math.max(vf,Math.min(bf,a)),o=Math.max(vf,Math.min(bf,o))];!function(t,e,n,r,i,a){var o,s=t[0],c=t[1],l=0,u=1,h=e[0]-s,f=e[1]-c;if(o=n-s,h||!(o>0)){if(o/=h,h<0){if(o<l)return;o<u&&(u=o);}else if(h>0){if(o>u)return;o>l&&(l=o);}if(o=i-s,h||!(o<0)){if(o/=h,h<0){if(o>u)return;o>l&&(l=o);}else if(h>0){if(o<l)return;o<u&&(u=o);}if(o=r-c,f||!(o>0)){if(o/=f,f<0){if(o<l)return;o<u&&(u=o);}else if(f>0){if(o>u)return;o>l&&(l=o);}if(o=a-c,f||!(o<0)){if(o/=f,f<0){if(o>u)return;o>l&&(l=o);}else if(f>0){if(o<l)return;o<u&&(u=o);}return l>0&&(t[0]=s+l*h,t[1]=c+l*f),u<1&&(e[0]=s+u*h,e[1]=c+u*f),!0}}}}}(c,_,t,e,n,r)?s&&(v.lineStart(),v.point(a,o),b=!1):(y||(v.lineStart(),v.point(c[0],c[1])),v.point(_[0],_[1]),s||v.lineEnd(),b=!1);}p=a,g=o,y=s;}return x}}function xf(){var t,e,n,r=0,i=0,a=960,o=500;return n={stream:function(n){return t&&e===n?t:t=_f(r,i,a,o)(e=n)},extent:function(s){return arguments.length?(r=+s[0][0],i=+s[0][1],a=+s[1][0],o=+s[1][1],t=e=null,n):[[r,i],[a,o]]}}}var kf={sphere:_u,point:_u,lineStart:function(){kf.point=Tf,kf.lineEnd=wf;},lineEnd:_u,polygonStart:_u,polygonEnd:_u};function wf(){kf.point=kf.lineEnd=_u;}function Tf(t,e){gf=t*=ru,yf=du(e*=ru),mf=su(e),kf.point=Ef;}function Ef(t,e){t*=ru;var n=du(e*=ru),r=su(e),i=iu(t-gf),a=su(i),o=r*du(i),s=mf*n-yf*r*a,c=yf*n+mf*r*a;pf.add(ou(gu(o*o+s*s),c)),gf=t,yf=n,mf=r;}function Cf(t){return pf=new x,Cu(t,kf),+pf}var Sf=[null,null],Af={type:\"LineString\",coordinates:Sf};function Mf(t,e){return Sf[0]=t,Sf[1]=e,Cf(Af)}var Nf={Feature:function(t,e){return Df(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,r=-1,i=n.length;++r<i;)if(Df(n[r].geometry,e))return !0;return !1}},Of={Sphere:function(){return !0},Point:function(t,e){return Bf(t.coordinates,e)},MultiPoint:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)if(Bf(n[r],e))return !0;return !1},LineString:function(t,e){return Lf(t.coordinates,e)},MultiLineString:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)if(Lf(n[r],e))return !0;return !1},Polygon:function(t,e){return If(t.coordinates,e)},MultiPolygon:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)if(If(n[r],e))return !0;return !1},GeometryCollection:function(t,e){for(var n=t.geometries,r=-1,i=n.length;++r<i;)if(Df(n[r],e))return !0;return !1}};function Df(t,e){return !(!t||!Of.hasOwnProperty(t.type))&&Of[t.type](t,e)}function Bf(t,e){return 0===Mf(t,e)}function Lf(t,e){for(var n,r,i,a=0,o=t.length;a<o;a++){if(0===(r=Mf(t[a],e)))return !0;if(a>0&&(i=Mf(t[a],t[a-1]))>0&&n<=i&&r<=i&&(n+r-i)*(1-Math.pow((n-r)/i,2))<Ql*i)return !0;n=r;}return !1}function If(t,e){return !!cf(t.map(Ff),Rf(e))}function Ff(t){return (t=t.map(Rf)).pop(),t}function Rf(t){return [t[0]*ru,t[1]*ru]}function Pf(t,e){return (t&&Nf.hasOwnProperty(t.type)?Nf[t.type]:Df)(t,e)}function jf(t,e,n){var r=xt(t,e-Zl,n).concat(e);return function(t){return r.map((function(e){return [t,e]}))}}function zf(t,e,n){var r=xt(t,e-Zl,n).concat(e);return function(t){return r.map((function(e){return [e,t]}))}}function Yf(){var t,e,n,r,i,a,o,s,c,l,u,h,f=10,d=f,p=90,g=360,y=2.5;function m(){return {type:\"MultiLineString\",coordinates:b()}}function b(){return xt(cu(r/p)*p,n,p).map(u).concat(xt(cu(s/g)*g,o,g).map(h)).concat(xt(cu(e/f)*f,t,f).filter((function(t){return iu(t%p)>Zl})).map(c)).concat(xt(cu(a/d)*d,i,d).filter((function(t){return iu(t%g)>Zl})).map(l))}return m.lines=function(){return b().map((function(t){return {type:\"LineString\",coordinates:t}}))},m.outline=function(){return {type:\"Polygon\",coordinates:[u(r).concat(h(o).slice(1),u(n).reverse().slice(1),h(s).reverse().slice(1))]}},m.extent=function(t){return arguments.length?m.extentMajor(t).extentMinor(t):m.extentMinor()},m.extentMajor=function(t){return arguments.length?(r=+t[0][0],n=+t[1][0],s=+t[0][1],o=+t[1][1],r>n&&(t=r,r=n,n=t),s>o&&(t=s,s=o,o=t),m.precision(y)):[[r,s],[n,o]]},m.extentMinor=function(n){return arguments.length?(e=+n[0][0],t=+n[1][0],a=+n[0][1],i=+n[1][1],e>t&&(n=e,e=t,t=n),a>i&&(n=a,a=i,i=n),m.precision(y)):[[e,a],[t,i]]},m.step=function(t){return arguments.length?m.stepMajor(t).stepMinor(t):m.stepMinor()},m.stepMajor=function(t){return arguments.length?(p=+t[0],g=+t[1],m):[p,g]},m.stepMinor=function(t){return arguments.length?(f=+t[0],d=+t[1],m):[f,d]},m.precision=function(f){return arguments.length?(y=+f,c=jf(a,i,90),l=zf(e,t,y),u=jf(s,o,90),h=zf(r,n,y),m):y},m.extentMajor([[-180,-89.999999],[180,89.999999]]).extentMinor([[-180,-80.000001],[180,80.000001]])}function Uf(){return Yf()()}function $f(t,e){var n=t[0]*ru,r=t[1]*ru,i=e[0]*ru,a=e[1]*ru,o=su(r),s=du(r),c=su(a),l=du(a),u=o*su(n),h=o*du(n),f=c*su(i),d=c*du(i),p=2*bu(gu(vu(a-r)+o*c*vu(i-n))),g=du(p),y=p?function(t){var e=du(t*=p)/g,n=du(p-t)/g,r=n*u+e*f,i=n*h+e*d,a=n*s+e*l;return [ou(i,r)*nu,ou(a,gu(r*r+i*i))*nu]}:function(){return [n*nu,r*nu]};return y.distance=p,y}const Wf=t=>t;var qf,Hf,Vf,Gf,Xf=new x,Zf=new x,Qf={point:_u,lineStart:_u,lineEnd:_u,polygonStart:function(){Qf.lineStart=Kf,Qf.lineEnd=ed;},polygonEnd:function(){Qf.lineStart=Qf.lineEnd=Qf.point=_u,Xf.add(iu(Zf)),Zf=new x;},result:function(){var t=Xf/2;return Xf=new x,t}};function Kf(){Qf.point=Jf;}function Jf(t,e){Qf.point=td,qf=Vf=t,Hf=Gf=e;}function td(t,e){Zf.add(Gf*t-Vf*e),Vf=t,Gf=e;}function ed(){td(qf,Hf);}const nd=Qf;var rd=1/0,id=rd,ad=-rd,od=ad,sd={point:function(t,e){t<rd&&(rd=t),t>ad&&(ad=t),e<id&&(id=e),e>od&&(od=e);},lineStart:_u,lineEnd:_u,polygonStart:_u,polygonEnd:_u,result:function(){var t=[[rd,id],[ad,od]];return ad=od=-(id=rd=1/0),t}};const cd=sd;var ld,ud,hd,fd,dd=0,pd=0,gd=0,yd=0,md=0,bd=0,vd=0,_d=0,xd=0,kd={point:wd,lineStart:Td,lineEnd:Sd,polygonStart:function(){kd.lineStart=Ad,kd.lineEnd=Md;},polygonEnd:function(){kd.point=wd,kd.lineStart=Td,kd.lineEnd=Sd;},result:function(){var t=xd?[vd/xd,_d/xd]:bd?[yd/bd,md/bd]:gd?[dd/gd,pd/gd]:[NaN,NaN];return dd=pd=gd=yd=md=bd=vd=_d=xd=0,t}};function wd(t,e){dd+=t,pd+=e,++gd;}function Td(){kd.point=Ed;}function Ed(t,e){kd.point=Cd,wd(hd=t,fd=e);}function Cd(t,e){var n=t-hd,r=e-fd,i=gu(n*n+r*r);yd+=i*(hd+t)/2,md+=i*(fd+e)/2,bd+=i,wd(hd=t,fd=e);}function Sd(){kd.point=wd;}function Ad(){kd.point=Nd;}function Md(){Od(ld,ud);}function Nd(t,e){kd.point=Od,wd(ld=hd=t,ud=fd=e);}function Od(t,e){var n=t-hd,r=e-fd,i=gu(n*n+r*r);yd+=i*(hd+t)/2,md+=i*(fd+e)/2,bd+=i,vd+=(i=fd*t-hd*e)*(hd+t),_d+=i*(fd+e),xd+=3*i,wd(hd=t,fd=e);}const Dd=kd;function Bd(t){this._context=t;}Bd.prototype={_radius:4.5,pointRadius:function(t){return this._radius=t,this},polygonStart:function(){this._line=0;},polygonEnd:function(){this._line=NaN;},lineStart:function(){this._point=0;},lineEnd:function(){0===this._line&&this._context.closePath(),this._point=NaN;},point:function(t,e){switch(this._point){case 0:this._context.moveTo(t,e),this._point=1;break;case 1:this._context.lineTo(t,e);break;default:this._context.moveTo(t+this._radius,e),this._context.arc(t,e,this._radius,0,eu);}},result:_u};var Ld,Id,Fd,Rd,Pd,jd=new x,zd={point:_u,lineStart:function(){zd.point=Yd;},lineEnd:function(){Ld&&Ud(Id,Fd),zd.point=_u;},polygonStart:function(){Ld=!0;},polygonEnd:function(){Ld=null;},result:function(){var t=+jd;return jd=new x,t}};function Yd(t,e){zd.point=Ud,Id=Rd=t,Fd=Pd=e;}function Ud(t,e){Rd-=t,Pd-=e,jd.add(gu(Rd*Rd+Pd*Pd)),Rd=t,Pd=e;}const $d=zd;function Wd(){this._string=[];}function qd(t){return \"m0,\"+t+\"a\"+t+\",\"+t+\" 0 1,1 0,\"+-2*t+\"a\"+t+\",\"+t+\" 0 1,1 0,\"+2*t+\"z\"}function Hd(t,e){var n,r,i=4.5;function a(t){return t&&(\"function\"==typeof i&&r.pointRadius(+i.apply(this,arguments)),Cu(t,n(r))),r.result()}return a.area=function(t){return Cu(t,n(nd)),nd.result()},a.measure=function(t){return Cu(t,n($d)),$d.result()},a.bounds=function(t){return Cu(t,n(cd)),cd.result()},a.centroid=function(t){return Cu(t,n(Dd)),Dd.result()},a.projection=function(e){return arguments.length?(n=null==e?(t=null,Wf):(t=e).stream,a):t},a.context=function(t){return arguments.length?(r=null==t?(e=null,new Wd):new Bd(e=t),\"function\"!=typeof i&&r.pointRadius(i),a):e},a.pointRadius=function(t){return arguments.length?(i=\"function\"==typeof t?t:(r.pointRadius(+t),+t),a):i},a.projection(t).context(e)}function Vd(t){return {stream:Gd(t)}}function Gd(t){return function(e){var n=new Xd;for(var r in t)n[r]=t[r];return n.stream=e,n}}function Xd(){}function Zd(t,e,n){var r=t.clipExtent&&t.clipExtent();return t.scale(150).translate([0,0]),null!=r&&t.clipExtent(null),Cu(n,t.stream(cd)),e(cd.result()),null!=r&&t.clipExtent(r),t}function Qd(t,e,n){return Zd(t,(function(n){var r=e[1][0]-e[0][0],i=e[1][1]-e[0][1],a=Math.min(r/(n[1][0]-n[0][0]),i/(n[1][1]-n[0][1])),o=+e[0][0]+(r-a*(n[1][0]+n[0][0]))/2,s=+e[0][1]+(i-a*(n[1][1]+n[0][1]))/2;t.scale(150*a).translate([o,s]);}),n)}function Kd(t,e,n){return Qd(t,[[0,0],e],n)}function Jd(t,e,n){return Zd(t,(function(n){var r=+e,i=r/(n[1][0]-n[0][0]),a=(r-i*(n[1][0]+n[0][0]))/2,o=-i*n[0][1];t.scale(150*i).translate([a,o]);}),n)}function tp(t,e,n){return Zd(t,(function(n){var r=+e,i=r/(n[1][1]-n[0][1]),a=-i*n[0][0],o=(r-i*(n[1][1]+n[0][1]))/2;t.scale(150*i).translate([a,o]);}),n)}Wd.prototype={_radius:4.5,_circle:qd(4.5),pointRadius:function(t){return (t=+t)!==this._radius&&(this._radius=t,this._circle=null),this},polygonStart:function(){this._line=0;},polygonEnd:function(){this._line=NaN;},lineStart:function(){this._point=0;},lineEnd:function(){0===this._line&&this._string.push(\"Z\"),this._point=NaN;},point:function(t,e){switch(this._point){case 0:this._string.push(\"M\",t,\",\",e),this._point=1;break;case 1:this._string.push(\"L\",t,\",\",e);break;default:null==this._circle&&(this._circle=qd(this._radius)),this._string.push(\"M\",t,\",\",e,this._circle);}},result:function(){if(this._string.length){var t=this._string.join(\"\");return this._string=[],t}return null}},Xd.prototype={constructor:Xd,point:function(t,e){this.stream.point(t,e);},sphere:function(){this.stream.sphere();},lineStart:function(){this.stream.lineStart();},lineEnd:function(){this.stream.lineEnd();},polygonStart:function(){this.stream.polygonStart();},polygonEnd:function(){this.stream.polygonEnd();}};var ep=su(30*ru);function np(t,e){return +e?function(t,e){function n(r,i,a,o,s,c,l,u,h,f,d,p,g,y){var m=l-r,b=u-i,v=m*m+b*b;if(v>4*e&&g--){var _=o+f,x=s+d,k=c+p,w=gu(_*_+x*x+k*k),T=bu(k/=w),E=iu(iu(k)-1)<Zl||iu(a-h)<Zl?(a+h)/2:ou(x,_),C=t(E,T),S=C[0],A=C[1],M=S-r,N=A-i,O=b*M-m*N;(O*O/v>e||iu((m*M+b*N)/v-.5)>.3||o*f+s*d+c*p<ep)&&(n(r,i,a,o,s,c,S,A,E,_/=w,x/=w,k,g,y),y.point(S,A),n(S,A,E,_,x,k,l,u,h,f,d,p,g,y));}}return function(e){var r,i,a,o,s,c,l,u,h,f,d,p,g={point:y,lineStart:m,lineEnd:v,polygonStart:function(){e.polygonStart(),g.lineStart=_;},polygonEnd:function(){e.polygonEnd(),g.lineStart=m;}};function y(n,r){n=t(n,r),e.point(n[0],n[1]);}function m(){u=NaN,g.point=b,e.lineStart();}function b(r,i){var a=Ku([r,i]),o=t(r,i);n(u,h,l,f,d,p,u=o[0],h=o[1],l=r,f=a[0],d=a[1],p=a[2],16,e),e.point(u,h);}function v(){g.point=y,e.lineEnd();}function _(){m(),g.point=x,g.lineEnd=k;}function x(t,e){b(r=t,e),i=u,a=h,o=f,s=d,c=p,g.point=b;}function k(){n(u,h,l,f,d,p,i,a,r,o,s,c,16,e),g.lineEnd=v,v();}return g}}(t,e):function(t){return Gd({point:function(e,n){e=t(e,n),this.stream.point(e[0],e[1]);}})}(t)}var rp=Gd({point:function(t,e){this.stream.point(t*ru,e*ru);}});function ip(t,e,n,r,i,a){if(!a)return function(t,e,n,r,i){function a(a,o){return [e+t*(a*=r),n-t*(o*=i)]}return a.invert=function(a,o){return [(a-e)/t*r,(n-o)/t*i]},a}(t,e,n,r,i);var o=su(a),s=du(a),c=o*t,l=s*t,u=o/t,h=s/t,f=(s*n-o*e)/t,d=(s*e+o*n)/t;function p(t,a){return [c*(t*=r)-l*(a*=i)+e,n-l*t-c*a]}return p.invert=function(t,e){return [r*(u*t-h*e+f),i*(d-h*t-u*e)]},p}function ap(t){return op((function(){return t}))()}function op(t){var e,n,r,i,a,o,s,c,l,u,h=150,f=480,d=250,p=0,g=0,y=0,m=0,b=0,v=0,_=1,x=1,k=null,w=ff,T=null,E=Wf,C=.5;function S(t){return c(t[0]*ru,t[1]*ru)}function A(t){return (t=c.invert(t[0],t[1]))&&[t[0]*nu,t[1]*nu]}function M(){var t=ip(h,0,0,_,x,v).apply(null,e(p,g)),r=ip(h,f-t[0],d-t[1],_,x,v);return n=Vh(y,m,b),s=qh(e,r),c=qh(n,s),o=np(s,C),N()}function N(){return l=u=null,S}return S.stream=function(t){return l&&u===t?l:l=rp(function(t){return Gd({point:function(e,n){var r=t(e,n);return this.stream.point(r[0],r[1])}})}(n)(w(o(E(u=t)))))},S.preclip=function(t){return arguments.length?(w=t,k=void 0,N()):w},S.postclip=function(t){return arguments.length?(E=t,T=r=i=a=null,N()):E},S.clipAngle=function(t){return arguments.length?(w=+t?df(k=t*ru):(k=null,ff),N()):k*nu},S.clipExtent=function(t){return arguments.length?(E=null==t?(T=r=i=a=null,Wf):_f(T=+t[0][0],r=+t[0][1],i=+t[1][0],a=+t[1][1]),N()):null==T?null:[[T,r],[i,a]]},S.scale=function(t){return arguments.length?(h=+t,M()):h},S.translate=function(t){return arguments.length?(f=+t[0],d=+t[1],M()):[f,d]},S.center=function(t){return arguments.length?(p=t[0]%360*ru,g=t[1]%360*ru,M()):[p*nu,g*nu]},S.rotate=function(t){return arguments.length?(y=t[0]%360*ru,m=t[1]%360*ru,b=t.length>2?t[2]%360*ru:0,M()):[y*nu,m*nu,b*nu]},S.angle=function(t){return arguments.length?(v=t%360*ru,M()):v*nu},S.reflectX=function(t){return arguments.length?(_=t?-1:1,M()):_<0},S.reflectY=function(t){return arguments.length?(x=t?-1:1,M()):x<0},S.precision=function(t){return arguments.length?(o=np(s,C=t*t),N()):gu(C)},S.fitExtent=function(t,e){return Qd(S,t,e)},S.fitSize=function(t,e){return Kd(S,t,e)},S.fitWidth=function(t,e){return Jd(S,t,e)},S.fitHeight=function(t,e){return tp(S,t,e)},function(){return e=t.apply(this,arguments),S.invert=e.invert&&A,M()}}function sp(t){var e=0,n=Kl/3,r=op(t),i=r(e,n);return i.parallels=function(t){return arguments.length?r(e=t[0]*ru,n=t[1]*ru):[e*nu,n*nu]},i}function cp(t,e){var n=du(t),r=(n+du(e))/2;if(iu(r)<Zl)return function(t){var e=su(t);function n(t,n){return [t*e,du(n)/e]}return n.invert=function(t,n){return [t/e,bu(n*e)]},n}(t);var i=1+n*(2*r-n),a=gu(i)/r;function o(t,e){var n=gu(i-2*r*du(e))/r;return [n*du(t*=r),a-n*su(t)]}return o.invert=function(t,e){var n=a-e,o=ou(t,iu(n))*pu(n);return n*r<0&&(o-=Kl*pu(t)*pu(n)),[o/r,bu((i-(t*t+n*n)*r*r)/(2*r))]},o}function lp(){return sp(cp).scale(155.424).center([0,33.6442])}function up(){return lp().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])}function hp(){var t,e,n,r,i,a,o=up(),s=lp().rotate([154,0]).center([-2,58.5]).parallels([55,65]),c=lp().rotate([157,0]).center([-3,19.9]).parallels([8,18]),l={point:function(t,e){a=[t,e];}};function u(t){var e=t[0],o=t[1];return a=null,n.point(e,o),a||(r.point(e,o),a)||(i.point(e,o),a)}function h(){return t=e=null,u}return u.invert=function(t){var e=o.scale(),n=o.translate(),r=(t[0]-n[0])/e,i=(t[1]-n[1])/e;return (i>=.12&&i<.234&&r>=-.425&&r<-.214?s:i>=.166&&i<.234&&r>=-.214&&r<-.115?c:o).invert(t)},u.stream=function(n){return t&&e===n?t:(r=[o.stream(e=n),s.stream(n),c.stream(n)],i=r.length,t={point:function(t,e){for(var n=-1;++n<i;)r[n].point(t,e);},sphere:function(){for(var t=-1;++t<i;)r[t].sphere();},lineStart:function(){for(var t=-1;++t<i;)r[t].lineStart();},lineEnd:function(){for(var t=-1;++t<i;)r[t].lineEnd();},polygonStart:function(){for(var t=-1;++t<i;)r[t].polygonStart();},polygonEnd:function(){for(var t=-1;++t<i;)r[t].polygonEnd();}});var r,i;},u.precision=function(t){return arguments.length?(o.precision(t),s.precision(t),c.precision(t),h()):o.precision()},u.scale=function(t){return arguments.length?(o.scale(t),s.scale(.35*t),c.scale(t),u.translate(o.translate())):o.scale()},u.translate=function(t){if(!arguments.length)return o.translate();var e=o.scale(),a=+t[0],u=+t[1];return n=o.translate(t).clipExtent([[a-.455*e,u-.238*e],[a+.455*e,u+.238*e]]).stream(l),r=s.translate([a-.307*e,u+.201*e]).clipExtent([[a-.425*e+Zl,u+.12*e+Zl],[a-.214*e-Zl,u+.234*e-Zl]]).stream(l),i=c.translate([a-.205*e,u+.212*e]).clipExtent([[a-.214*e+Zl,u+.166*e+Zl],[a-.115*e-Zl,u+.234*e-Zl]]).stream(l),h()},u.fitExtent=function(t,e){return Qd(u,t,e)},u.fitSize=function(t,e){return Kd(u,t,e)},u.fitWidth=function(t,e){return Jd(u,t,e)},u.fitHeight=function(t,e){return tp(u,t,e)},u.scale(1070)}function fp(t){return function(e,n){var r=su(e),i=su(n),a=t(r*i);return a===1/0?[2,0]:[a*i*du(e),a*du(n)]}}function dp(t){return function(e,n){var r=gu(e*e+n*n),i=t(r),a=du(i),o=su(i);return [ou(e*a,r*o),bu(r&&n*a/r)]}}var pp=fp((function(t){return gu(2/(1+t))}));function gp(){return ap(pp).scale(124.75).clipAngle(179.999)}pp.invert=dp((function(t){return 2*bu(t/2)}));var yp=fp((function(t){return (t=mu(t))&&t/du(t)}));function mp(){return ap(yp).scale(79.4188).clipAngle(179.999)}function bp(t,e){return [t,hu(yu((Jl+e)/2))]}function vp(){return _p(bp).scale(961/eu)}function _p(t){var e,n,r,i=ap(t),a=i.center,o=i.scale,s=i.translate,c=i.clipExtent,l=null;function u(){var a=Kl*o(),s=i(Qh(i.rotate()).invert([0,0]));return c(null==l?[[s[0]-a,s[1]-a],[s[0]+a,s[1]+a]]:t===bp?[[Math.max(s[0]-a,l),e],[Math.min(s[0]+a,n),r]]:[[l,Math.max(s[1]-a,e)],[n,Math.min(s[1]+a,r)]])}return i.scale=function(t){return arguments.length?(o(t),u()):o()},i.translate=function(t){return arguments.length?(s(t),u()):s()},i.center=function(t){return arguments.length?(a(t),u()):a()},i.clipExtent=function(t){return arguments.length?(null==t?l=e=n=r=null:(l=+t[0][0],e=+t[0][1],n=+t[1][0],r=+t[1][1]),u()):null==l?null:[[l,e],[n,r]]},u()}function xp(t){return yu((Jl+t)/2)}function kp(t,e){var n=su(t),r=t===e?du(t):hu(n/su(e))/hu(xp(e)/xp(t)),i=n*fu(xp(t),r)/r;if(!r)return bp;function a(t,e){i>0?e<-Jl+Zl&&(e=-Jl+Zl):e>Jl-Zl&&(e=Jl-Zl);var n=i/fu(xp(e),r);return [n*du(r*t),i-n*su(r*t)]}return a.invert=function(t,e){var n=i-e,a=pu(r)*gu(t*t+n*n),o=ou(t,iu(n))*pu(n);return n*r<0&&(o-=Kl*pu(t)*pu(n)),[o/r,2*au(fu(i/a,1/r))-Jl]},a}function wp(){return sp(kp).scale(109.5).parallels([30,30])}function Tp(t,e){return [t,e]}function Ep(){return ap(Tp).scale(152.63)}function Cp(t,e){var n=su(t),r=t===e?du(t):(n-su(e))/(e-t),i=n/r+t;if(iu(r)<Zl)return Tp;function a(t,e){var n=i-e,a=r*t;return [n*du(a),i-n*su(a)]}return a.invert=function(t,e){var n=i-e,a=ou(t,iu(n))*pu(n);return n*r<0&&(a-=Kl*pu(t)*pu(n)),[a/r,i-pu(r)*gu(t*t+n*n)]},a}function Sp(){return sp(Cp).scale(131.154).center([0,13.9389])}yp.invert=dp((function(t){return t})),bp.invert=function(t,e){return [t,2*au(lu(e))-Jl]},Tp.invert=Tp;var Ap=1.340264,Mp=-.081106,Np=893e-6,Op=.003796,Dp=gu(3)/2;function Bp(t,e){var n=bu(Dp*du(e)),r=n*n,i=r*r*r;return [t*su(n)/(Dp*(Ap+3*Mp*r+i*(7*Np+9*Op*r))),n*(Ap+Mp*r+i*(Np+Op*r))]}function Lp(){return ap(Bp).scale(177.158)}function Ip(t,e){var n=su(e),r=su(t)*n;return [n*du(t)/r,du(e)/r]}function Fp(){return ap(Ip).scale(144.049).clipAngle(60)}function Rp(){var t,e,n,r,i,a,o,s=1,c=0,l=0,u=1,h=1,f=0,d=null,p=1,g=1,y=Gd({point:function(t,e){var n=v([t,e]);this.stream.point(n[0],n[1]);}}),m=Wf;function b(){return p=s*u,g=s*h,a=o=null,v}function v(n){var r=n[0]*p,i=n[1]*g;if(f){var a=i*t-r*e;r=r*t+i*e,i=a;}return [r+c,i+l]}return v.invert=function(n){var r=n[0]-c,i=n[1]-l;if(f){var a=i*t+r*e;r=r*t-i*e,i=a;}return [r/p,i/g]},v.stream=function(t){return a&&o===t?a:a=y(m(o=t))},v.postclip=function(t){return arguments.length?(m=t,d=n=r=i=null,b()):m},v.clipExtent=function(t){return arguments.length?(m=null==t?(d=n=r=i=null,Wf):_f(d=+t[0][0],n=+t[0][1],r=+t[1][0],i=+t[1][1]),b()):null==d?null:[[d,n],[r,i]]},v.scale=function(t){return arguments.length?(s=+t,b()):s},v.translate=function(t){return arguments.length?(c=+t[0],l=+t[1],b()):[c,l]},v.angle=function(n){return arguments.length?(e=du(f=n%360*ru),t=su(f),b()):f*nu},v.reflectX=function(t){return arguments.length?(u=t?-1:1,b()):u<0},v.reflectY=function(t){return arguments.length?(h=t?-1:1,b()):h<0},v.fitExtent=function(t,e){return Qd(v,t,e)},v.fitSize=function(t,e){return Kd(v,t,e)},v.fitWidth=function(t,e){return Jd(v,t,e)},v.fitHeight=function(t,e){return tp(v,t,e)},v}function Pp(t,e){var n=e*e,r=n*n;return [t*(.8707-.131979*n+r*(r*(.003971*n-.001529*r)-.013791)),e*(1.007226+n*(.015085+r*(.028874*n-.044475-.005916*r)))]}function jp(){return ap(Pp).scale(175.295)}function zp(t,e){return [su(e)*du(t),du(e)]}function Yp(){return ap(zp).scale(249.5).clipAngle(90.000001)}function Up(t,e){var n=su(e),r=1+su(t)*n;return [n*du(t)/r,du(e)/r]}function $p(){return ap(Up).scale(250).clipAngle(142)}function Wp(t,e){return [hu(yu((Jl+e)/2)),-t]}function qp(){var t=_p(Wp),e=t.center,n=t.rotate;return t.center=function(t){return arguments.length?e([-t[1],t[0]]):[(t=e())[1],-t[0]]},t.rotate=function(t){return arguments.length?n([t[0],t[1],t.length>2?t[2]+90:90]):[(t=n())[0],t[1],t[2]-90]},n([0,0,90]).scale(159.155)}function Hp(t,e){return t.parent===e.parent?1:2}function Vp(t,e){return t+e.x}function Gp(t,e){return Math.max(t,e.y)}function Xp(){var t=Hp,e=1,n=1,r=!1;function i(i){var a,o=0;i.eachAfter((function(e){var n=e.children;n?(e.x=function(t){return t.reduce(Vp,0)/t.length}(n),e.y=function(t){return 1+t.reduce(Gp,0)}(n)):(e.x=a?o+=t(e,a):0,e.y=0,a=e);}));var s=function(t){for(var e;e=t.children;)t=e[0];return t}(i),c=function(t){for(var e;e=t.children;)t=e[e.length-1];return t}(i),l=s.x-t(s,c)/2,u=c.x+t(c,s)/2;return i.eachAfter(r?function(t){t.x=(t.x-i.x)*e,t.y=(i.y-t.y)*n;}:function(t){t.x=(t.x-l)/(u-l)*e,t.y=(1-(i.y?t.y/i.y:1))*n;})}return i.separation=function(e){return arguments.length?(t=e,i):t},i.size=function(t){return arguments.length?(r=!1,e=+t[0],n=+t[1],i):r?null:[e,n]},i.nodeSize=function(t){return arguments.length?(r=!0,e=+t[0],n=+t[1],i):r?[e,n]:null},i}function Zp(t){var e=0,n=t.children,r=n&&n.length;if(r)for(;--r>=0;)e+=n[r].value;else e=1;t.value=e;}function Qp(t,e){t instanceof Map?(t=[void 0,t],void 0===e&&(e=Jp)):void 0===e&&(e=Kp);for(var n,r,i,a,o,s=new ng(t),c=[s];n=c.pop();)if((i=e(n.data))&&(o=(i=Array.from(i)).length))for(n.children=i,a=o-1;a>=0;--a)c.push(r=i[a]=new ng(i[a])),r.parent=n,r.depth=n.depth+1;return s.eachBefore(eg)}function Kp(t){return t.children}function Jp(t){return Array.isArray(t)?t[1]:null}function tg(t){void 0!==t.data.value&&(t.value=t.data.value),t.data=t.data.data;}function eg(t){var e=0;do{t.height=e;}while((t=t.parent)&&t.height<++e)}function ng(t){this.data=t,this.depth=this.height=0,this.parent=null;}function rg(t){for(var e,n,r=0,i=(t=function(t){for(var e,n,r=t.length;r;)n=Math.random()*r--|0,e=t[r],t[r]=t[n],t[n]=e;return t}(Array.from(t))).length,a=[];r<i;)e=t[r],n&&og(n,e)?++r:(n=cg(a=ig(a,e)),r=0);return n}function ig(t,e){var n,r;if(sg(e,t))return [e];for(n=0;n<t.length;++n)if(ag(e,t[n])&&sg(lg(t[n],e),t))return [t[n],e];for(n=0;n<t.length-1;++n)for(r=n+1;r<t.length;++r)if(ag(lg(t[n],t[r]),e)&&ag(lg(t[n],e),t[r])&&ag(lg(t[r],e),t[n])&&sg(ug(t[n],t[r],e),t))return [t[n],t[r],e];throw new Error}function ag(t,e){var n=t.r-e.r,r=e.x-t.x,i=e.y-t.y;return n<0||n*n<r*r+i*i}function og(t,e){var n=t.r-e.r+1e-9*Math.max(t.r,e.r,1),r=e.x-t.x,i=e.y-t.y;return n>0&&n*n>r*r+i*i}function sg(t,e){for(var n=0;n<e.length;++n)if(!og(t,e[n]))return !1;return !0}function cg(t){switch(t.length){case 1:return {x:(e=t[0]).x,y:e.y,r:e.r};case 2:return lg(t[0],t[1]);case 3:return ug(t[0],t[1],t[2])}var e;}function lg(t,e){var n=t.x,r=t.y,i=t.r,a=e.x,o=e.y,s=e.r,c=a-n,l=o-r,u=s-i,h=Math.sqrt(c*c+l*l);return {x:(n+a+c/h*u)/2,y:(r+o+l/h*u)/2,r:(h+i+s)/2}}function ug(t,e,n){var r=t.x,i=t.y,a=t.r,o=e.x,s=e.y,c=e.r,l=n.x,u=n.y,h=n.r,f=r-o,d=r-l,p=i-s,g=i-u,y=c-a,m=h-a,b=r*r+i*i-a*a,v=b-o*o-s*s+c*c,_=b-l*l-u*u+h*h,x=d*p-f*g,k=(p*_-g*v)/(2*x)-r,w=(g*y-p*m)/x,T=(d*v-f*_)/(2*x)-i,E=(f*m-d*y)/x,C=w*w+E*E-1,S=2*(a+k*w+T*E),A=k*k+T*T-a*a,M=-(C?(S+Math.sqrt(S*S-4*C*A))/(2*C):A/S);return {x:r+k+w*M,y:i+T+E*M,r:M}}function hg(t,e,n){var r,i,a,o,s=t.x-e.x,c=t.y-e.y,l=s*s+c*c;l?(i=e.r+n.r,i*=i,o=t.r+n.r,i>(o*=o)?(r=(l+o-i)/(2*l),a=Math.sqrt(Math.max(0,o/l-r*r)),n.x=t.x-r*s-a*c,n.y=t.y-r*c+a*s):(r=(l+i-o)/(2*l),a=Math.sqrt(Math.max(0,i/l-r*r)),n.x=e.x+r*s-a*c,n.y=e.y+r*c+a*s)):(n.x=e.x+n.r,n.y=e.y);}function fg(t,e){var n=t.r+e.r-1e-6,r=e.x-t.x,i=e.y-t.y;return n>0&&n*n>r*r+i*i}function dg(t){var e=t._,n=t.next._,r=e.r+n.r,i=(e.x*n.r+n.x*e.r)/r,a=(e.y*n.r+n.y*e.r)/r;return i*i+a*a}function pg(t){this._=t,this.next=null,this.previous=null;}function gg(t){if(!(a=(e=t,t=\"object\"==typeof e&&\"length\"in e?e:Array.from(e)).length))return 0;var e,n,r,i,a,o,s,c,l,u,h,f;if((n=t[0]).x=0,n.y=0,!(a>1))return n.r;if(r=t[1],n.x=-r.r,r.x=n.r,r.y=0,!(a>2))return n.r+r.r;hg(r,n,i=t[2]),n=new pg(n),r=new pg(r),i=new pg(i),n.next=i.previous=r,r.next=n.previous=i,i.next=r.previous=n;t:for(c=3;c<a;++c){hg(n._,r._,i=t[c]),i=new pg(i),l=r.next,u=n.previous,h=r._.r,f=n._.r;do{if(h<=f){if(fg(l._,i._)){r=l,n.next=r,r.previous=n,--c;continue t}h+=l._.r,l=l.next;}else {if(fg(u._,i._)){(n=u).next=r,r.previous=n,--c;continue t}f+=u._.r,u=u.previous;}}while(l!==u.next);for(i.previous=n,i.next=r,n.next=r.previous=r=i,o=dg(n);(i=i.next)!==r;)(s=dg(i))<o&&(n=i,o=s);r=n.next;}for(n=[r._],i=r;(i=i.next)!==r;)n.push(i._);for(i=rg(n),c=0;c<a;++c)(n=t[c]).x-=i.x,n.y-=i.y;return i.r}function yg(t){return gg(t),t}function mg(t){return null==t?null:bg(t)}function bg(t){if(\"function\"!=typeof t)throw new Error;return t}function vg(){return 0}function _g(t){return function(){return t}}function xg(t){return Math.sqrt(t.value)}function kg(){var t=null,e=1,n=1,r=vg;function i(i){return i.x=e/2,i.y=n/2,t?i.eachBefore(wg(t)).eachAfter(Tg(r,.5)).eachBefore(Eg(1)):i.eachBefore(wg(xg)).eachAfter(Tg(vg,1)).eachAfter(Tg(r,i.r/Math.min(e,n))).eachBefore(Eg(Math.min(e,n)/(2*i.r))),i}return i.radius=function(e){return arguments.length?(t=mg(e),i):t},i.size=function(t){return arguments.length?(e=+t[0],n=+t[1],i):[e,n]},i.padding=function(t){return arguments.length?(r=\"function\"==typeof t?t:_g(+t),i):r},i}function wg(t){return function(e){e.children||(e.r=Math.max(0,+t(e)||0));}}function Tg(t,e){return function(n){if(r=n.children){var r,i,a,o=r.length,s=t(n)*e||0;if(s)for(i=0;i<o;++i)r[i].r+=s;if(a=gg(r),s)for(i=0;i<o;++i)r[i].r-=s;n.r=a+s;}}}function Eg(t){return function(e){var n=e.parent;e.r*=t,n&&(e.x=n.x+t*e.x,e.y=n.y+t*e.y);}}function Cg(t){t.x0=Math.round(t.x0),t.y0=Math.round(t.y0),t.x1=Math.round(t.x1),t.y1=Math.round(t.y1);}function Sg(t,e,n,r,i){for(var a,o=t.children,s=-1,c=o.length,l=t.value&&(r-e)/t.value;++s<c;)(a=o[s]).y0=n,a.y1=i,a.x0=e,a.x1=e+=a.value*l;}function Ag(){var t=1,e=1,n=0,r=!1;function i(i){var a=i.height+1;return i.x0=i.y0=n,i.x1=t,i.y1=e/a,i.eachBefore(function(t,e){return function(r){r.children&&Sg(r,r.x0,t*(r.depth+1)/e,r.x1,t*(r.depth+2)/e);var i=r.x0,a=r.y0,o=r.x1-n,s=r.y1-n;o<i&&(i=o=(i+o)/2),s<a&&(a=s=(a+s)/2),r.x0=i,r.y0=a,r.x1=o,r.y1=s;}}(e,a)),r&&i.eachBefore(Cg),i}return i.round=function(t){return arguments.length?(r=!!t,i):r},i.size=function(n){return arguments.length?(t=+n[0],e=+n[1],i):[t,e]},i.padding=function(t){return arguments.length?(n=+t,i):n},i}Bp.invert=function(t,e){for(var n,r=e,i=r*r,a=i*i*i,o=0;o<12&&(a=(i=(r-=n=(r*(Ap+Mp*i+a*(Np+Op*i))-e)/(Ap+3*Mp*i+a*(7*Np+9*Op*i)))*r)*i*i,!(iu(n)<Ql));++o);return [Dp*t*(Ap+3*Mp*i+a*(7*Np+9*Op*i))/su(r),bu(du(r)/Dp)]},Ip.invert=dp(au),Pp.invert=function(t,e){var n,r=e,i=25;do{var a=r*r,o=a*a;r-=n=(r*(1.007226+a*(.015085+o*(.028874*a-.044475-.005916*o)))-e)/(1.007226+a*(.045255+o*(.259866*a-.311325-.005916*11*o)));}while(iu(n)>Zl&&--i>0);return [t/(.8707+(a=r*r)*(a*(a*a*a*(.003971-.001529*a)-.013791)-.131979)),r]},zp.invert=dp(bu),Up.invert=dp((function(t){return 2*au(t)})),Wp.invert=function(t,e){return [-e,2*au(lu(t))-Jl]},ng.prototype=Qp.prototype={constructor:ng,count:function(){return this.eachAfter(Zp)},each:function(t,e){let n=-1;for(const r of this)t.call(e,r,++n,this);return this},eachAfter:function(t,e){for(var n,r,i,a=this,o=[a],s=[],c=-1;a=o.pop();)if(s.push(a),n=a.children)for(r=0,i=n.length;r<i;++r)o.push(n[r]);for(;a=s.pop();)t.call(e,a,++c,this);return this},eachBefore:function(t,e){for(var n,r,i=this,a=[i],o=-1;i=a.pop();)if(t.call(e,i,++o,this),n=i.children)for(r=n.length-1;r>=0;--r)a.push(n[r]);return this},find:function(t,e){let n=-1;for(const r of this)if(t.call(e,r,++n,this))return r},sum:function(t){return this.eachAfter((function(e){for(var n=+t(e.data)||0,r=e.children,i=r&&r.length;--i>=0;)n+=r[i].value;e.value=n;}))},sort:function(t){return this.eachBefore((function(e){e.children&&e.children.sort(t);}))},path:function(t){for(var e=this,n=function(t,e){if(t===e)return t;var n=t.ancestors(),r=e.ancestors(),i=null;for(t=n.pop(),e=r.pop();t===e;)i=t,t=n.pop(),e=r.pop();return i}(e,t),r=[e];e!==n;)e=e.parent,r.push(e);for(var i=r.length;t!==n;)r.splice(i,0,t),t=t.parent;return r},ancestors:function(){for(var t=this,e=[t];t=t.parent;)e.push(t);return e},descendants:function(){return Array.from(this)},leaves:function(){var t=[];return this.eachBefore((function(e){e.children||t.push(e);})),t},links:function(){var t=this,e=[];return t.each((function(n){n!==t&&e.push({source:n.parent,target:n});})),e},copy:function(){return Qp(this).eachBefore(tg)},[Symbol.iterator]:function*(){var t,e,n,r,i=this,a=[i];do{for(t=a.reverse(),a=[];i=t.pop();)if(yield i,e=i.children)for(n=0,r=e.length;n<r;++n)a.push(e[n]);}while(a.length)}};var Mg={depth:-1},Ng={},Og={};function Dg(t){return t.id}function Bg(t){return t.parentId}function Lg(){var t,e=Dg,n=Bg;function r(r){var i,a,o,s,c,l,u,h,f=Array.from(r),d=e,p=n,g=new Map;if(null!=t){const e=f.map(((e,n)=>function(t){let e=(t=`${t}`).length;return Fg(t,e-1)&&!Fg(t,e-2)&&(t=t.slice(0,-1)),\"/\"===t[0]?t:`/${t}`}(t(e,n,r)))),n=e.map(Ig),i=new Set(e).add(\"\");for(const t of n)i.has(t)||(i.add(t),e.push(t),n.push(Ig(t)),f.push(Og));d=(t,n)=>e[n],p=(t,e)=>n[e];}for(o=0,i=f.length;o<i;++o)a=f[o],l=f[o]=new ng(a),null!=(u=d(a,o,r))&&(u+=\"\")&&(h=l.id=u,g.set(h,g.has(h)?Ng:l)),null!=(u=p(a,o,r))&&(u+=\"\")&&(l.parent=u);for(o=0;o<i;++o)if(u=(l=f[o]).parent){if(!(c=g.get(u)))throw new Error(\"missing: \"+u);if(c===Ng)throw new Error(\"ambiguous: \"+u);c.children?c.children.push(l):c.children=[l],l.parent=c;}else {if(s)throw new Error(\"multiple roots\");s=l;}if(!s)throw new Error(\"no root\");if(null!=t){for(;s.data===Og&&1===s.children.length;)s=s.children[0],--i;for(let t=f.length-1;t>=0&&(l=f[t],l.data===Og);--t)l.data=null;}if(s.parent=Mg,s.eachBefore((function(t){t.depth=t.parent.depth+1,--i;})).eachBefore(eg),s.parent=null,i>0)throw new Error(\"cycle\");return s}return r.id=function(t){return arguments.length?(e=mg(t),r):e},r.parentId=function(t){return arguments.length?(n=mg(t),r):n},r.path=function(e){return arguments.length?(t=mg(e),r):t},r}function Ig(t){let e=t.length;if(e<2)return \"\";for(;--e>1&&!Fg(t,e););return t.slice(0,e)}function Fg(t,e){if(\"/\"===t[e]){let n=0;for(;e>0&&\"\\\\\"===t[--e];)++n;if(0==(1&n))return !0}return !1}function Rg(t,e){return t.parent===e.parent?1:2}function Pg(t){var e=t.children;return e?e[0]:t.t}function jg(t){var e=t.children;return e?e[e.length-1]:t.t}function zg(t,e,n){var r=n/(e.i-t.i);e.c-=r,e.s+=n,t.c+=r,e.z+=n,e.m+=n;}function Yg(t,e,n){return t.a.parent===e.parent?t.a:n}function Ug(t,e){this._=t,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=e;}function $g(){var t=Rg,e=1,n=1,r=null;function i(i){var c=function(t){for(var e,n,r,i,a,o=new Ug(t,0),s=[o];e=s.pop();)if(r=e._.children)for(e.children=new Array(a=r.length),i=a-1;i>=0;--i)s.push(n=e.children[i]=new Ug(r[i],i)),n.parent=e;return (o.parent=new Ug(null,0)).children=[o],o}(i);if(c.eachAfter(a),c.parent.m=-c.z,c.eachBefore(o),r)i.eachBefore(s);else {var l=i,u=i,h=i;i.eachBefore((function(t){t.x<l.x&&(l=t),t.x>u.x&&(u=t),t.depth>h.depth&&(h=t);}));var f=l===u?1:t(l,u)/2,d=f-l.x,p=e/(u.x+f+d),g=n/(h.depth||1);i.eachBefore((function(t){t.x=(t.x+d)*p,t.y=t.depth*g;}));}return i}function a(e){var n=e.children,r=e.parent.children,i=e.i?r[e.i-1]:null;if(n){!function(t){for(var e,n=0,r=0,i=t.children,a=i.length;--a>=0;)(e=i[a]).z+=n,e.m+=n,n+=e.s+(r+=e.c);}(e);var a=(n[0].z+n[n.length-1].z)/2;i?(e.z=i.z+t(e._,i._),e.m=e.z-a):e.z=a;}else i&&(e.z=i.z+t(e._,i._));e.parent.A=function(e,n,r){if(n){for(var i,a=e,o=e,s=n,c=a.parent.children[0],l=a.m,u=o.m,h=s.m,f=c.m;s=jg(s),a=Pg(a),s&&a;)c=Pg(c),(o=jg(o)).a=e,(i=s.z+h-a.z-l+t(s._,a._))>0&&(zg(Yg(s,e,r),e,i),l+=i,u+=i),h+=s.m,l+=a.m,f+=c.m,u+=o.m;s&&!jg(o)&&(o.t=s,o.m+=h-u),a&&!Pg(c)&&(c.t=a,c.m+=l-f,r=e);}return r}(e,i,e.parent.A||r[0]);}function o(t){t._.x=t.z+t.parent.m,t.m+=t.parent.m;}function s(t){t.x*=e,t.y=t.depth*n;}return i.separation=function(e){return arguments.length?(t=e,i):t},i.size=function(t){return arguments.length?(r=!1,e=+t[0],n=+t[1],i):r?null:[e,n]},i.nodeSize=function(t){return arguments.length?(r=!0,e=+t[0],n=+t[1],i):r?[e,n]:null},i}function Wg(t,e,n,r,i){for(var a,o=t.children,s=-1,c=o.length,l=t.value&&(i-n)/t.value;++s<c;)(a=o[s]).x0=e,a.x1=r,a.y0=n,a.y1=n+=a.value*l;}Ug.prototype=Object.create(ng.prototype);var qg=(1+Math.sqrt(5))/2;function Hg(t,e,n,r,i,a){for(var o,s,c,l,u,h,f,d,p,g,y,m=[],b=e.children,v=0,_=0,x=b.length,k=e.value;v<x;){c=i-n,l=a-r;do{u=b[_++].value;}while(!u&&_<x);for(h=f=u,y=u*u*(g=Math.max(l/c,c/l)/(k*t)),p=Math.max(f/y,y/h);_<x;++_){if(u+=s=b[_].value,s<h&&(h=s),s>f&&(f=s),y=u*u*g,(d=Math.max(f/y,y/h))>p){u-=s;break}p=d;}m.push(o={value:u,dice:c<l,children:b.slice(v,_)}),o.dice?Sg(o,n,r,i,k?r+=l*u/k:a):Wg(o,n,r,k?n+=c*u/k:i,a),k-=u,v=_;}return m}const Vg=function t(e){function n(t,n,r,i,a){Hg(e,t,n,r,i,a);}return n.ratio=function(e){return t((e=+e)>1?e:1)},n}(qg);function Gg(){var t=Vg,e=!1,n=1,r=1,i=[0],a=vg,o=vg,s=vg,c=vg,l=vg;function u(t){return t.x0=t.y0=0,t.x1=n,t.y1=r,t.eachBefore(h),i=[0],e&&t.eachBefore(Cg),t}function h(e){var n=i[e.depth],r=e.x0+n,u=e.y0+n,h=e.x1-n,f=e.y1-n;h<r&&(r=h=(r+h)/2),f<u&&(u=f=(u+f)/2),e.x0=r,e.y0=u,e.x1=h,e.y1=f,e.children&&(n=i[e.depth+1]=a(e)/2,r+=l(e)-n,u+=o(e)-n,(h-=s(e)-n)<r&&(r=h=(r+h)/2),(f-=c(e)-n)<u&&(u=f=(u+f)/2),t(e,r,u,h,f));}return u.round=function(t){return arguments.length?(e=!!t,u):e},u.size=function(t){return arguments.length?(n=+t[0],r=+t[1],u):[n,r]},u.tile=function(e){return arguments.length?(t=bg(e),u):t},u.padding=function(t){return arguments.length?u.paddingInner(t).paddingOuter(t):u.paddingInner()},u.paddingInner=function(t){return arguments.length?(a=\"function\"==typeof t?t:_g(+t),u):a},u.paddingOuter=function(t){return arguments.length?u.paddingTop(t).paddingRight(t).paddingBottom(t).paddingLeft(t):u.paddingTop()},u.paddingTop=function(t){return arguments.length?(o=\"function\"==typeof t?t:_g(+t),u):o},u.paddingRight=function(t){return arguments.length?(s=\"function\"==typeof t?t:_g(+t),u):s},u.paddingBottom=function(t){return arguments.length?(c=\"function\"==typeof t?t:_g(+t),u):c},u.paddingLeft=function(t){return arguments.length?(l=\"function\"==typeof t?t:_g(+t),u):l},u}function Xg(t,e,n,r,i){var a,o,s=t.children,c=s.length,l=new Array(c+1);for(l[0]=o=a=0;a<c;++a)l[a+1]=o+=s[a].value;!function t(e,n,r,i,a,o,c){if(e>=n-1){var u=s[e];return u.x0=i,u.y0=a,u.x1=o,void(u.y1=c)}for(var h=l[e],f=r/2+h,d=e+1,p=n-1;d<p;){var g=d+p>>>1;l[g]<f?d=g+1:p=g;}f-l[d-1]<l[d]-f&&e+1<d&&--d;var y=l[d]-h,m=r-y;if(o-i>c-a){var b=r?(i*m+o*y)/r:o;t(e,d,y,i,a,b,c),t(d,n,m,b,a,o,c);}else {var v=r?(a*m+c*y)/r:c;t(e,d,y,i,a,o,v),t(d,n,m,i,v,o,c);}}(0,c,t.value,e,n,r,i);}function Zg(t,e,n,r,i){(1&t.depth?Wg:Sg)(t,e,n,r,i);}const Qg=function t(e){function n(t,n,r,i,a){if((o=t._squarify)&&o.ratio===e)for(var o,s,c,l,u,h=-1,f=o.length,d=t.value;++h<f;){for(c=(s=o[h]).children,l=s.value=0,u=c.length;l<u;++l)s.value+=c[l].value;s.dice?Sg(s,n,r,i,d?r+=(a-r)*s.value/d:a):Wg(s,n,r,d?n+=(i-n)*s.value/d:i,a),d-=s.value;}else t._squarify=o=Hg(e,t,n,r,i,a),o.ratio=e;}return n.ratio=function(e){return t((e=+e)>1?e:1)},n}(qg);function Kg(t){var e=t.length;return function(n){return t[Math.max(0,Math.min(e-1,Math.floor(n*e)))]}}function Jg(t,e){var n=vr(+t,+e);return function(t){var e=n(t);return e-360*Math.floor(e/360)}}function ty(t,e){return t=+t,e=+e,function(n){return Math.round(t*(1-n)+e*n)}}function ey(t){return ((t=Math.exp(t))+1/t)/2}const ny=function t(e,n,r){function i(t,i){var a,o,s=t[0],c=t[1],l=t[2],u=i[0],h=i[1],f=i[2],d=u-s,p=h-c,g=d*d+p*p;if(g<1e-12)o=Math.log(f/l)/e,a=function(t){return [s+t*d,c+t*p,l*Math.exp(e*t*o)]};else {var y=Math.sqrt(g),m=(f*f-l*l+r*g)/(2*l*n*y),b=(f*f-l*l-r*g)/(2*f*n*y),v=Math.log(Math.sqrt(m*m+1)-m),_=Math.log(Math.sqrt(b*b+1)-b);o=(_-v)/e,a=function(t){var r,i=t*o,a=ey(v),u=l/(n*y)*(a*(r=e*i+v,((r=Math.exp(2*r))-1)/(r+1))-function(t){return ((t=Math.exp(t))-1/t)/2}(v));return [s+u*d,c+u*p,l*a/ey(e*i+v)]};}return a.duration=1e3*o*e/Math.SQRT2,a}return i.rho=function(e){var n=Math.max(.001,+e),r=n*n;return t(n,r,r*r)},i}(Math.SQRT2,2,4);function ry(t){return function(e,n){var r=t((e=hr(e)).h,(n=hr(n)).h),i=_r(e.s,n.s),a=_r(e.l,n.l),o=_r(e.opacity,n.opacity);return function(t){return e.h=r(t),e.s=i(t),e.l=a(t),e.opacity=o(t),e+\"\"}}}const iy=ry(vr);var ay=ry(_r);function oy(t,e){var n=_r((t=ko(t)).l,(e=ko(e)).l),r=_r(t.a,e.a),i=_r(t.b,e.b),a=_r(t.opacity,e.opacity);return function(e){return t.l=n(e),t.a=r(e),t.b=i(e),t.opacity=a(e),t+\"\"}}function sy(t){return function(e,n){var r=t((e=No(e)).h,(n=No(n)).h),i=_r(e.c,n.c),a=_r(e.l,n.l),o=_r(e.opacity,n.opacity);return function(t){return e.h=r(t),e.c=i(t),e.l=a(t),e.opacity=o(t),e+\"\"}}}const cy=sy(vr);var ly=sy(_r);function uy(t){return function e(n){function r(e,r){var i=t((e=Uo(e)).h,(r=Uo(r)).h),a=_r(e.s,r.s),o=_r(e.l,r.l),s=_r(e.opacity,r.opacity);return function(t){return e.h=i(t),e.s=a(t),e.l=o(Math.pow(t,n)),e.opacity=s(t),e+\"\"}}return n=+n,r.gamma=e,r}(1)}const hy=uy(vr);var fy=uy(_r);function dy(t,e){void 0===e&&(e=t,t=Ir);for(var n=0,r=e.length-1,i=e[0],a=new Array(r<0?0:r);n<r;)a[n]=t(i,i=e[++n]);return function(t){var e=Math.max(0,Math.min(r-1,Math.floor(t*=r)));return a[e](t-e)}}function py(t,e){for(var n=new Array(e),r=0;r<e;++r)n[r]=t(r/(e-1));return n}function gy(t){for(var e,n=-1,r=t.length,i=t[r-1],a=0;++n<r;)e=i,i=t[n],a+=e[1]*i[0]-e[0]*i[1];return a/2}function yy(t){for(var e,n,r=-1,i=t.length,a=0,o=0,s=t[i-1],c=0;++r<i;)e=s,s=t[r],c+=n=e[0]*s[1]-s[0]*e[1],a+=(e[0]+s[0])*n,o+=(e[1]+s[1])*n;return [a/(c*=3),o/c]}function my(t,e,n){return (e[0]-t[0])*(n[1]-t[1])-(e[1]-t[1])*(n[0]-t[0])}function by(t,e){return t[0]-e[0]||t[1]-e[1]}function vy(t){const e=t.length,n=[0,1];let r,i=2;for(r=2;r<e;++r){for(;i>1&&my(t[n[i-2]],t[n[i-1]],t[r])<=0;)--i;n[i++]=r;}return n.slice(0,i)}function _y(t){if((n=t.length)<3)return null;var e,n,r=new Array(n),i=new Array(n);for(e=0;e<n;++e)r[e]=[+t[e][0],+t[e][1],e];for(r.sort(by),e=0;e<n;++e)i[e]=[r[e][0],-r[e][1]];var a=vy(r),o=vy(i),s=o[0]===a[0],c=o[o.length-1]===a[a.length-1],l=[];for(e=a.length-1;e>=0;--e)l.push(t[r[a[e]][2]]);for(e=+s;e<o.length-c;++e)l.push(t[r[o[e]][2]]);return l}function xy(t,e){for(var n,r,i=t.length,a=t[i-1],o=e[0],s=e[1],c=a[0],l=a[1],u=!1,h=0;h<i;++h)n=(a=t[h])[0],(r=a[1])>s!=l>s&&o<(c-n)*(s-r)/(l-r)+n&&(u=!u),c=n,l=r;return u}function ky(t){for(var e,n,r=-1,i=t.length,a=t[i-1],o=a[0],s=a[1],c=0;++r<i;)e=o,n=s,e-=o=(a=t[r])[0],n-=s=a[1],c+=Math.hypot(e,n);return c}const wy=Math.random,Ty=function t(e){function n(t,n){return t=null==t?0:+t,n=null==n?1:+n,1===arguments.length?(n=t,t=0):n-=t,function(){return e()*n+t}}return n.source=t,n}(wy),Ey=function t(e){function n(t,n){return arguments.length<2&&(n=t,t=0),t=Math.floor(t),n=Math.floor(n)-t,function(){return Math.floor(e()*n+t)}}return n.source=t,n}(wy),Cy=function t(e){function n(t,n){var r,i;return t=null==t?0:+t,n=null==n?1:+n,function(){var a;if(null!=r)a=r,r=null;else do{r=2*e()-1,a=2*e()-1,i=r*r+a*a;}while(!i||i>1);return t+n*a*Math.sqrt(-2*Math.log(i)/i)}}return n.source=t,n}(wy),Sy=function t(e){var n=Cy.source(e);function r(){var t=n.apply(this,arguments);return function(){return Math.exp(t())}}return r.source=t,r}(wy),Ay=function t(e){function n(t){return (t=+t)<=0?()=>0:function(){for(var n=0,r=t;r>1;--r)n+=e();return n+r*e()}}return n.source=t,n}(wy),My=function t(e){var n=Ay.source(e);function r(t){if(0==(t=+t))return e;var r=n(t);return function(){return r()/t}}return r.source=t,r}(wy),Ny=function t(e){function n(t){return function(){return -Math.log1p(-e())/t}}return n.source=t,n}(wy),Oy=function t(e){function n(t){if((t=+t)<0)throw new RangeError(\"invalid alpha\");return t=1/-t,function(){return Math.pow(1-e(),t)}}return n.source=t,n}(wy),Dy=function t(e){function n(t){if((t=+t)<0||t>1)throw new RangeError(\"invalid p\");return function(){return Math.floor(e()+t)}}return n.source=t,n}(wy),By=function t(e){function n(t){if((t=+t)<0||t>1)throw new RangeError(\"invalid p\");return 0===t?()=>1/0:1===t?()=>1:(t=Math.log1p(-t),function(){return 1+Math.floor(Math.log1p(-e())/t)})}return n.source=t,n}(wy),Ly=function t(e){var n=Cy.source(e)();function r(t,r){if((t=+t)<0)throw new RangeError(\"invalid k\");if(0===t)return ()=>0;if(r=null==r?1:+r,1===t)return ()=>-Math.log1p(-e())*r;var i=(t<1?t+1:t)-1/3,a=1/(3*Math.sqrt(i)),o=t<1?()=>Math.pow(e(),1/t):()=>1;return function(){do{do{var t=n(),s=1+a*t;}while(s<=0);s*=s*s;var c=1-e();}while(c>=1-.0331*t*t*t*t&&Math.log(c)>=.5*t*t+i*(1-s+Math.log(s)));return i*s*o()*r}}return r.source=t,r}(wy),Iy=function t(e){var n=Ly.source(e);function r(t,e){var r=n(t),i=n(e);return function(){var t=r();return 0===t?0:t/(t+i())}}return r.source=t,r}(wy),Fy=function t(e){var n=By.source(e),r=Iy.source(e);function i(t,e){return t=+t,(e=+e)>=1?()=>t:e<=0?()=>0:function(){for(var i=0,a=t,o=e;a*o>16&&a*(1-o)>16;){var s=Math.floor((a+1)*o),c=r(s,a-s+1)();c<=o?(i+=s,a-=s,o=(o-c)/(1-c)):(a=s-1,o/=c);}for(var l=o<.5,u=n(l?o:1-o),h=u(),f=0;h<=a;++f)h+=u();return i+(l?f:a-f)}}return i.source=t,i}(wy),Ry=function t(e){function n(t,n,r){var i;return 0==(t=+t)?i=t=>-Math.log(t):(t=1/t,i=e=>Math.pow(e,t)),n=null==n?0:+n,r=null==r?1:+r,function(){return n+r*i(-Math.log1p(-e()))}}return n.source=t,n}(wy),Py=function t(e){function n(t,n){return t=null==t?0:+t,n=null==n?1:+n,function(){return t+n*Math.tan(Math.PI*e())}}return n.source=t,n}(wy),jy=function t(e){function n(t,n){return t=null==t?0:+t,n=null==n?1:+n,function(){var r=e();return t+n*Math.log(r/(1-r))}}return n.source=t,n}(wy),zy=function t(e){var n=Ly.source(e),r=Fy.source(e);function i(t){return function(){for(var i=0,a=t;a>16;){var o=Math.floor(.875*a),s=n(o)();if(s>a)return i+r(o-1,a/s)();i+=o,a-=s;}for(var c=-Math.log1p(-e()),l=0;c<=a;++l)c-=Math.log1p(-e());return i+l}}return i.source=t,i}(wy),Yy=1/4294967296;function Uy(t=Math.random()){let e=0|(0<=t&&t<1?t/Yy:Math.abs(t));return ()=>(e=1664525*e+1013904223|0,Yy*(e>>>0))}function $y(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t);}return this}function Wy(t,e){switch(arguments.length){case 0:break;case 1:\"function\"==typeof t?this.interpolator(t):this.range(t);break;default:this.domain(t),\"function\"==typeof e?this.interpolator(e):this.range(e);}return this}const qy=Symbol(\"implicit\");function Hy(){var t=new T,e=[],n=[],r=qy;function i(i){let a=t.get(i);if(void 0===a){if(r!==qy)return r;t.set(i,a=e.push(i)-1);}return n[a%n.length]}return i.domain=function(n){if(!arguments.length)return e.slice();e=[],t=new T;for(const r of n)t.has(r)||t.set(r,e.push(r)-1);return i},i.range=function(t){return arguments.length?(n=Array.from(t),i):n.slice()},i.unknown=function(t){return arguments.length?(r=t,i):r},i.copy=function(){return Hy(e,n).unknown(r)},$y.apply(i,arguments),i}function Vy(){var t,e,n=Hy().unknown(void 0),r=n.domain,i=n.range,a=0,o=1,s=!1,c=0,l=0,u=.5;function h(){var n=r().length,h=o<a,f=h?o:a,d=h?a:o;t=(d-f)/Math.max(1,n-c+2*l),s&&(t=Math.floor(t)),f+=(d-f-t*(n-c))*u,e=t*(1-c),s&&(f=Math.round(f),e=Math.round(e));var p=xt(n).map((function(e){return f+t*e}));return i(h?p.reverse():p)}return delete n.unknown,n.domain=function(t){return arguments.length?(r(t),h()):r()},n.range=function(t){return arguments.length?([a,o]=t,a=+a,o=+o,h()):[a,o]},n.rangeRound=function(t){return [a,o]=t,a=+a,o=+o,s=!0,h()},n.bandwidth=function(){return e},n.step=function(){return t},n.round=function(t){return arguments.length?(s=!!t,h()):s},n.padding=function(t){return arguments.length?(c=Math.min(1,l=+t),h()):c},n.paddingInner=function(t){return arguments.length?(c=Math.min(1,t),h()):c},n.paddingOuter=function(t){return arguments.length?(l=+t,h()):l},n.align=function(t){return arguments.length?(u=Math.max(0,Math.min(1,t)),h()):u},n.copy=function(){return Vy(r(),[a,o]).round(s).paddingInner(c).paddingOuter(l).align(u)},$y.apply(h(),arguments)}function Gy(t){var e=t.copy;return t.padding=t.paddingOuter,delete t.paddingInner,delete t.paddingOuter,t.copy=function(){return Gy(e())},t}function Xy(){return Gy(Vy.apply(null,arguments).paddingInner(1))}function Zy(t){return +t}var Qy=[0,1];function Ky(t){return t}function Jy(t,e){return (e-=t=+t)?function(n){return (n-t)/e}:(n=isNaN(e)?NaN:.5,function(){return n});var n;}function tm(t,e,n){var r=t[0],i=t[1],a=e[0],o=e[1];return i<r?(r=Jy(i,r),a=n(o,a)):(r=Jy(r,i),a=n(a,o)),function(t){return a(r(t))}}function em(t,e,n){var r=Math.min(t.length,e.length)-1,i=new Array(r),a=new Array(r),o=-1;for(t[r]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++o<r;)i[o]=Jy(t[o],t[o+1]),a[o]=n(e[o],e[o+1]);return function(e){var n=u(t,e,1,r)-1;return a[n](i[n](e))}}function nm(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function rm(){var t,e,n,r,i,a,o=Qy,s=Qy,c=Ir,l=Ky;function u(){var t,e,n,c=Math.min(o.length,s.length);return l!==Ky&&(t=o[0],e=o[c-1],t>e&&(n=t,t=e,e=n),l=function(n){return Math.max(t,Math.min(e,n))}),r=c>2?em:tm,i=a=null,h}function h(e){return null==e||isNaN(e=+e)?n:(i||(i=r(o.map(t),s,c)))(t(l(e)))}return h.invert=function(n){return l(e((a||(a=r(s,o.map(t),Nr)))(n)))},h.domain=function(t){return arguments.length?(o=Array.from(t,Zy),u()):o.slice()},h.range=function(t){return arguments.length?(s=Array.from(t),u()):s.slice()},h.rangeRound=function(t){return s=Array.from(t),c=ty,u()},h.clamp=function(t){return arguments.length?(l=!!t||Ky,u()):l!==Ky},h.interpolate=function(t){return arguments.length?(c=t,u()):c},h.unknown=function(t){return arguments.length?(n=t,h):n},function(n,r){return t=n,e=r,u()}}function im(){return rm()(Ky,Ky)}function am(t,e,n,r){var i,a=et(t,e,n);switch((r=Il(null==r?\",f\":r)).type){case\"s\":var o=Math.max(Math.abs(t),Math.abs(e));return null!=r.precision||isNaN(i=Gl(a,o))||(r.precision=i),Ul(r,o);case\"\":case\"e\":case\"g\":case\"p\":case\"r\":null!=r.precision||isNaN(i=Xl(a,Math.max(Math.abs(t),Math.abs(e))))||(r.precision=i-(\"e\"===r.type));break;case\"f\":case\"%\":null!=r.precision||isNaN(i=Vl(a))||(r.precision=i-2*(\"%\"===r.type));}return Yl(r)}function om(t){var e=t.domain;return t.ticks=function(t){var n=e();return J(n[0],n[n.length-1],null==t?10:t)},t.tickFormat=function(t,n){var r=e();return am(r[0],r[r.length-1],null==t?10:t,n)},t.nice=function(n){null==n&&(n=10);var r,i,a=e(),o=0,s=a.length-1,c=a[o],l=a[s],u=10;for(l<c&&(i=c,c=l,l=i,i=o,o=s,s=i);u-- >0;){if((i=tt(c,l,n))===r)return a[o]=c,a[s]=l,e(a);if(i>0)c=Math.floor(c/i)*i,l=Math.ceil(l/i)*i;else {if(!(i<0))break;c=Math.ceil(c*i)/i,l=Math.floor(l*i)/i;}r=i;}return t},t}function sm(){var t=im();return t.copy=function(){return nm(t,sm())},$y.apply(t,arguments),om(t)}function cm(t){var e;function n(t){return null==t||isNaN(t=+t)?e:t}return n.invert=n,n.domain=n.range=function(e){return arguments.length?(t=Array.from(e,Zy),n):t.slice()},n.unknown=function(t){return arguments.length?(e=t,n):e},n.copy=function(){return cm(t).unknown(e)},t=arguments.length?Array.from(t,Zy):[0,1],om(n)}function lm(t,e){var n,r=0,i=(t=t.slice()).length-1,a=t[r],o=t[i];return o<a&&(n=r,r=i,i=n,n=a,a=o,o=n),t[r]=e.floor(a),t[i]=e.ceil(o),t}function um(t){return Math.log(t)}function hm(t){return Math.exp(t)}function fm(t){return -Math.log(-t)}function dm(t){return -Math.exp(-t)}function pm(t){return isFinite(t)?+(\"1e\"+t):t<0?0:t}function gm(t){return (e,n)=>-t(-e,n)}function ym(t){const e=t(um,hm),n=e.domain;let r,i,a=10;function o(){return r=function(t){return t===Math.E?Math.log:10===t&&Math.log10||2===t&&Math.log2||(t=Math.log(t),e=>Math.log(e)/t)}(a),i=function(t){return 10===t?pm:t===Math.E?Math.exp:e=>Math.pow(t,e)}(a),n()[0]<0?(r=gm(r),i=gm(i),t(fm,dm)):t(um,hm),e}return e.base=function(t){return arguments.length?(a=+t,o()):a},e.domain=function(t){return arguments.length?(n(t),o()):n()},e.ticks=t=>{const e=n();let o=e[0],s=e[e.length-1];const c=s<o;c&&([o,s]=[s,o]);let l,u,h=r(o),f=r(s);const d=null==t?10:+t;let p=[];if(!(a%1)&&f-h<d){if(h=Math.floor(h),f=Math.ceil(f),o>0){for(;h<=f;++h)for(l=1;l<a;++l)if(u=h<0?l/i(-h):l*i(h),!(u<o)){if(u>s)break;p.push(u);}}else for(;h<=f;++h)for(l=a-1;l>=1;--l)if(u=h>0?l/i(-h):l*i(h),!(u<o)){if(u>s)break;p.push(u);}2*p.length<d&&(p=J(o,s,d));}else p=J(h,f,Math.min(f-h,d)).map(i);return c?p.reverse():p},e.tickFormat=(t,n)=>{if(null==t&&(t=10),null==n&&(n=10===a?\"s\":\",\"),\"function\"!=typeof n&&(a%1||null!=(n=Il(n)).precision||(n.trim=!0),n=Yl(n)),t===1/0)return n;const o=Math.max(1,a*t/e.ticks().length);return t=>{let e=t/i(Math.round(r(t)));return e*a<a-.5&&(e*=a),e<=o?n(t):\"\"}},e.nice=()=>n(lm(n(),{floor:t=>i(Math.floor(r(t))),ceil:t=>i(Math.ceil(r(t)))})),e}function mm(){const t=ym(rm()).domain([1,10]);return t.copy=()=>nm(t,mm()).base(t.base()),$y.apply(t,arguments),t}function bm(t){return function(e){return Math.sign(e)*Math.log1p(Math.abs(e/t))}}function vm(t){return function(e){return Math.sign(e)*Math.expm1(Math.abs(e))*t}}function _m(t){var e=1,n=t(bm(e),vm(e));return n.constant=function(n){return arguments.length?t(bm(e=+n),vm(e)):e},om(n)}function xm(){var t=_m(rm());return t.copy=function(){return nm(t,xm()).constant(t.constant())},$y.apply(t,arguments)}function km(t){return function(e){return e<0?-Math.pow(-e,t):Math.pow(e,t)}}function wm(t){return t<0?-Math.sqrt(-t):Math.sqrt(t)}function Tm(t){return t<0?-t*t:t*t}function Em(t){var e=t(Ky,Ky),n=1;function r(){return 1===n?t(Ky,Ky):.5===n?t(wm,Tm):t(km(n),km(1/n))}return e.exponent=function(t){return arguments.length?(n=+t,r()):n},om(e)}function Cm(){var t=Em(rm());return t.copy=function(){return nm(t,Cm()).exponent(t.exponent())},$y.apply(t,arguments),t}function Sm(){return Cm.apply(null,arguments).exponent(.5)}function Am(t){return Math.sign(t)*t*t}function Mm(t){return Math.sign(t)*Math.sqrt(Math.abs(t))}function Nm(){var t,e=im(),n=[0,1],r=!1;function i(n){var i=Mm(e(n));return isNaN(i)?t:r?Math.round(i):i}return i.invert=function(t){return e.invert(Am(t))},i.domain=function(t){return arguments.length?(e.domain(t),i):e.domain()},i.range=function(t){return arguments.length?(e.range((n=Array.from(t,Zy)).map(Am)),i):n.slice()},i.rangeRound=function(t){return i.range(t).round(!0)},i.round=function(t){return arguments.length?(r=!!t,i):r},i.clamp=function(t){return arguments.length?(e.clamp(t),i):e.clamp()},i.unknown=function(e){return arguments.length?(t=e,i):t},i.copy=function(){return Nm(e.domain(),n).round(r).clamp(e.clamp()).unknown(t)},$y.apply(i,arguments),om(i)}function Om(){var t,e=[],n=[],i=[];function a(){var t=0,r=Math.max(1,n.length);for(i=new Array(r-1);++t<r;)i[t-1]=ut(e,t/r);return o}function o(e){return null==e||isNaN(e=+e)?t:n[u(i,e)]}return o.invertExtent=function(t){var r=n.indexOf(t);return r<0?[NaN,NaN]:[r>0?i[r-1]:e[0],r<i.length?i[r]:e[e.length-1]]},o.domain=function(t){if(!arguments.length)return e.slice();e=[];for(let n of t)null==n||isNaN(n=+n)||e.push(n);return e.sort(r),a()},o.range=function(t){return arguments.length?(n=Array.from(t),a()):n.slice()},o.unknown=function(e){return arguments.length?(t=e,o):t},o.quantiles=function(){return i.slice()},o.copy=function(){return Om().domain(e).range(n).unknown(t)},$y.apply(o,arguments)}function Dm(){var t,e=0,n=1,r=1,i=[.5],a=[0,1];function o(e){return null!=e&&e<=e?a[u(i,e,0,r)]:t}function s(){var t=-1;for(i=new Array(r);++t<r;)i[t]=((t+1)*n-(t-r)*e)/(r+1);return o}return o.domain=function(t){return arguments.length?([e,n]=t,e=+e,n=+n,s()):[e,n]},o.range=function(t){return arguments.length?(r=(a=Array.from(t)).length-1,s()):a.slice()},o.invertExtent=function(t){var o=a.indexOf(t);return o<0?[NaN,NaN]:o<1?[e,i[0]]:o>=r?[i[r-1],n]:[i[o-1],i[o]]},o.unknown=function(e){return arguments.length?(t=e,o):o},o.thresholds=function(){return i.slice()},o.copy=function(){return Dm().domain([e,n]).range(a).unknown(t)},$y.apply(om(o),arguments)}function Bm(){var t,e=[.5],n=[0,1],r=1;function i(i){return null!=i&&i<=i?n[u(e,i,0,r)]:t}return i.domain=function(t){return arguments.length?(e=Array.from(t),r=Math.min(e.length,n.length-1),i):e.slice()},i.range=function(t){return arguments.length?(n=Array.from(t),r=Math.min(e.length,n.length-1),i):n.slice()},i.invertExtent=function(t){var r=n.indexOf(t);return [e[r-1],e[r]]},i.unknown=function(e){return arguments.length?(t=e,i):t},i.copy=function(){return Bm().domain(e).range(n).unknown(t)},$y.apply(i,arguments)}const Lm=1e3,Im=6e4,Fm=36e5,Rm=864e5,Pm=6048e5,jm=31536e6;var zm=new Date,Ym=new Date;function Um(t,e,n,r){function i(e){return t(e=0===arguments.length?new Date:new Date(+e)),e}return i.floor=function(e){return t(e=new Date(+e)),e},i.ceil=function(n){return t(n=new Date(n-1)),e(n,1),t(n),n},i.round=function(t){var e=i(t),n=i.ceil(t);return t-e<n-t?e:n},i.offset=function(t,n){return e(t=new Date(+t),null==n?1:Math.floor(n)),t},i.range=function(n,r,a){var o,s=[];if(n=i.ceil(n),a=null==a?1:Math.floor(a),!(n<r&&a>0))return s;do{s.push(o=new Date(+n)),e(n,a),t(n);}while(o<n&&n<r);return s},i.filter=function(n){return Um((function(e){if(e>=e)for(;t(e),!n(e);)e.setTime(e-1);}),(function(t,r){if(t>=t)if(r<0)for(;++r<=0;)for(;e(t,-1),!n(t););else for(;--r>=0;)for(;e(t,1),!n(t););}))},n&&(i.count=function(e,r){return zm.setTime(+e),Ym.setTime(+r),t(zm),t(Ym),Math.floor(n(zm,Ym))},i.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?i.filter(r?function(e){return r(e)%t==0}:function(e){return i.count(0,e)%t==0}):i:null}),i}var $m=Um((function(){}),(function(t,e){t.setTime(+t+e);}),(function(t,e){return e-t}));$m.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?Um((function(e){e.setTime(Math.floor(e/t)*t);}),(function(e,n){e.setTime(+e+n*t);}),(function(e,n){return (n-e)/t})):$m:null};const Wm=$m;var qm=$m.range,Hm=Um((function(t){t.setTime(t-t.getMilliseconds());}),(function(t,e){t.setTime(+t+e*Lm);}),(function(t,e){return (e-t)/Lm}),(function(t){return t.getUTCSeconds()}));const Vm=Hm;var Gm=Hm.range,Xm=Um((function(t){t.setTime(t-t.getMilliseconds()-t.getSeconds()*Lm);}),(function(t,e){t.setTime(+t+e*Im);}),(function(t,e){return (e-t)/Im}),(function(t){return t.getMinutes()}));const Zm=Xm;var Qm=Xm.range,Km=Um((function(t){t.setTime(t-t.getMilliseconds()-t.getSeconds()*Lm-t.getMinutes()*Im);}),(function(t,e){t.setTime(+t+e*Fm);}),(function(t,e){return (e-t)/Fm}),(function(t){return t.getHours()}));const Jm=Km;var tb=Km.range,eb=Um((t=>t.setHours(0,0,0,0)),((t,e)=>t.setDate(t.getDate()+e)),((t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*Im)/Rm),(t=>t.getDate()-1));const nb=eb;var rb=eb.range;function ib(t){return Um((function(e){e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0);}),(function(t,e){t.setDate(t.getDate()+7*e);}),(function(t,e){return (e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*Im)/Pm}))}var ab=ib(0),ob=ib(1),sb=ib(2),cb=ib(3),lb=ib(4),ub=ib(5),hb=ib(6),fb=ab.range,db=ob.range,pb=sb.range,gb=cb.range,yb=lb.range,mb=ub.range,bb=hb.range,vb=Um((function(t){t.setDate(1),t.setHours(0,0,0,0);}),(function(t,e){t.setMonth(t.getMonth()+e);}),(function(t,e){return e.getMonth()-t.getMonth()+12*(e.getFullYear()-t.getFullYear())}),(function(t){return t.getMonth()}));const _b=vb;var xb=vb.range,kb=Um((function(t){t.setMonth(0,1),t.setHours(0,0,0,0);}),(function(t,e){t.setFullYear(t.getFullYear()+e);}),(function(t,e){return e.getFullYear()-t.getFullYear()}),(function(t){return t.getFullYear()}));kb.every=function(t){return isFinite(t=Math.floor(t))&&t>0?Um((function(e){e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0);}),(function(e,n){e.setFullYear(e.getFullYear()+n*t);})):null};const wb=kb;var Tb=kb.range,Eb=Um((function(t){t.setUTCSeconds(0,0);}),(function(t,e){t.setTime(+t+e*Im);}),(function(t,e){return (e-t)/Im}),(function(t){return t.getUTCMinutes()}));const Cb=Eb;var Sb=Eb.range,Ab=Um((function(t){t.setUTCMinutes(0,0,0);}),(function(t,e){t.setTime(+t+e*Fm);}),(function(t,e){return (e-t)/Fm}),(function(t){return t.getUTCHours()}));const Mb=Ab;var Nb=Ab.range,Ob=Um((function(t){t.setUTCHours(0,0,0,0);}),(function(t,e){t.setUTCDate(t.getUTCDate()+e);}),(function(t,e){return (e-t)/Rm}),(function(t){return t.getUTCDate()-1}));const Db=Ob;var Bb=Ob.range;function Lb(t){return Um((function(e){e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0);}),(function(t,e){t.setUTCDate(t.getUTCDate()+7*e);}),(function(t,e){return (e-t)/Pm}))}var Ib=Lb(0),Fb=Lb(1),Rb=Lb(2),Pb=Lb(3),jb=Lb(4),zb=Lb(5),Yb=Lb(6),Ub=Ib.range,$b=Fb.range,Wb=Rb.range,qb=Pb.range,Hb=jb.range,Vb=zb.range,Gb=Yb.range,Xb=Um((function(t){t.setUTCDate(1),t.setUTCHours(0,0,0,0);}),(function(t,e){t.setUTCMonth(t.getUTCMonth()+e);}),(function(t,e){return e.getUTCMonth()-t.getUTCMonth()+12*(e.getUTCFullYear()-t.getUTCFullYear())}),(function(t){return t.getUTCMonth()}));const Zb=Xb;var Qb=Xb.range,Kb=Um((function(t){t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0);}),(function(t,e){t.setUTCFullYear(t.getUTCFullYear()+e);}),(function(t,e){return e.getUTCFullYear()-t.getUTCFullYear()}),(function(t){return t.getUTCFullYear()}));Kb.every=function(t){return isFinite(t=Math.floor(t))&&t>0?Um((function(e){e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0);}),(function(e,n){e.setUTCFullYear(e.getUTCFullYear()+n*t);})):null};const Jb=Kb;var tv=Kb.range;function ev(t,e,n,r,a,o){const s=[[Vm,1,Lm],[Vm,5,5e3],[Vm,15,15e3],[Vm,30,3e4],[o,1,Im],[o,5,3e5],[o,15,9e5],[o,30,18e5],[a,1,Fm],[a,3,108e5],[a,6,216e5],[a,12,432e5],[r,1,Rm],[r,2,1728e5],[n,1,Pm],[e,1,2592e6],[e,3,7776e6],[t,1,jm]];function c(e,n,r){const a=Math.abs(n-e)/r,o=i((([,,t])=>t)).right(s,a);if(o===s.length)return t.every(et(e/jm,n/jm,r));if(0===o)return Wm.every(Math.max(et(e,n,r),1));const[c,l]=s[a/s[o-1][2]<s[o][2]/a?o-1:o];return c.every(l)}return [function(t,e,n){const r=e<t;r&&([t,e]=[e,t]);const i=n&&\"function\"==typeof n.range?n:c(t,e,n),a=i?i.range(t,+e+1):[];return r?a.reverse():a},c]}const[nv,rv]=ev(Jb,Zb,Ib,Db,Mb,Cb),[iv,av]=ev(wb,_b,ab,nb,Jm,Zm);function ov(t){if(0<=t.y&&t.y<100){var e=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return e.setFullYear(t.y),e}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function sv(t){if(0<=t.y&&t.y<100){var e=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return e.setUTCFullYear(t.y),e}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function cv(t,e,n){return {y:t,m:e,d:n,H:0,M:0,S:0,L:0}}function lv(t){var e=t.dateTime,n=t.date,r=t.time,i=t.periods,a=t.days,o=t.shortDays,s=t.months,c=t.shortMonths,l=xv(i),u=kv(i),h=xv(a),f=kv(a),d=xv(o),p=kv(o),g=xv(s),y=kv(s),m=xv(c),b=kv(c),v={a:function(t){return o[t.getDay()]},A:function(t){return a[t.getDay()]},b:function(t){return c[t.getMonth()]},B:function(t){return s[t.getMonth()]},c:null,d:$v,e:$v,f:Gv,g:a_,G:s_,H:Wv,I:qv,j:Hv,L:Vv,m:Xv,M:Zv,p:function(t){return i[+(t.getHours()>=12)]},q:function(t){return 1+~~(t.getMonth()/3)},Q:N_,s:O_,S:Qv,u:Kv,U:Jv,V:e_,w:n_,W:r_,x:null,X:null,y:i_,Y:o_,Z:c_,\"%\":M_},_={a:function(t){return o[t.getUTCDay()]},A:function(t){return a[t.getUTCDay()]},b:function(t){return c[t.getUTCMonth()]},B:function(t){return s[t.getUTCMonth()]},c:null,d:l_,e:l_,f:p_,g:E_,G:S_,H:u_,I:h_,j:f_,L:d_,m:g_,M:y_,p:function(t){return i[+(t.getUTCHours()>=12)]},q:function(t){return 1+~~(t.getUTCMonth()/3)},Q:N_,s:O_,S:m_,u:b_,U:v_,V:x_,w:k_,W:w_,x:null,X:null,y:T_,Y:C_,Z:A_,\"%\":M_},x={a:function(t,e,n){var r=d.exec(e.slice(n));return r?(t.w=p.get(r[0].toLowerCase()),n+r[0].length):-1},A:function(t,e,n){var r=h.exec(e.slice(n));return r?(t.w=f.get(r[0].toLowerCase()),n+r[0].length):-1},b:function(t,e,n){var r=m.exec(e.slice(n));return r?(t.m=b.get(r[0].toLowerCase()),n+r[0].length):-1},B:function(t,e,n){var r=g.exec(e.slice(n));return r?(t.m=y.get(r[0].toLowerCase()),n+r[0].length):-1},c:function(t,n,r){return T(t,e,n,r)},d:Bv,e:Bv,f:jv,g:Mv,G:Av,H:Iv,I:Iv,j:Lv,L:Pv,m:Dv,M:Fv,p:function(t,e,n){var r=l.exec(e.slice(n));return r?(t.p=u.get(r[0].toLowerCase()),n+r[0].length):-1},q:Ov,Q:Yv,s:Uv,S:Rv,u:Tv,U:Ev,V:Cv,w:wv,W:Sv,x:function(t,e,r){return T(t,n,e,r)},X:function(t,e,n){return T(t,r,e,n)},y:Mv,Y:Av,Z:Nv,\"%\":zv};function k(t,e){return function(n){var r,i,a,o=[],s=-1,c=0,l=t.length;for(n instanceof Date||(n=new Date(+n));++s<l;)37===t.charCodeAt(s)&&(o.push(t.slice(c,s)),null!=(i=gv[r=t.charAt(++s)])?r=t.charAt(++s):i=\"e\"===r?\" \":\"0\",(a=e[r])&&(r=a(n,i)),o.push(r),c=s+1);return o.push(t.slice(c,s)),o.join(\"\")}}function w(t,e){return function(n){var r,i,a=cv(1900,void 0,1);if(T(a,t,n+=\"\",0)!=n.length)return null;if(\"Q\"in a)return new Date(a.Q);if(\"s\"in a)return new Date(1e3*a.s+(\"L\"in a?a.L:0));if(e&&!(\"Z\"in a)&&(a.Z=0),\"p\"in a&&(a.H=a.H%12+12*a.p),void 0===a.m&&(a.m=\"q\"in a?a.q:0),\"V\"in a){if(a.V<1||a.V>53)return null;\"w\"in a||(a.w=1),\"Z\"in a?(i=(r=sv(cv(a.y,0,1))).getUTCDay(),r=i>4||0===i?Fb.ceil(r):Fb(r),r=Db.offset(r,7*(a.V-1)),a.y=r.getUTCFullYear(),a.m=r.getUTCMonth(),a.d=r.getUTCDate()+(a.w+6)%7):(i=(r=ov(cv(a.y,0,1))).getDay(),r=i>4||0===i?ob.ceil(r):ob(r),r=nb.offset(r,7*(a.V-1)),a.y=r.getFullYear(),a.m=r.getMonth(),a.d=r.getDate()+(a.w+6)%7);}else (\"W\"in a||\"U\"in a)&&(\"w\"in a||(a.w=\"u\"in a?a.u%7:\"W\"in a?1:0),i=\"Z\"in a?sv(cv(a.y,0,1)).getUTCDay():ov(cv(a.y,0,1)).getDay(),a.m=0,a.d=\"W\"in a?(a.w+6)%7+7*a.W-(i+5)%7:a.w+7*a.U-(i+6)%7);return \"Z\"in a?(a.H+=a.Z/100|0,a.M+=a.Z%100,sv(a)):ov(a)}}function T(t,e,n,r){for(var i,a,o=0,s=e.length,c=n.length;o<s;){if(r>=c)return -1;if(37===(i=e.charCodeAt(o++))){if(i=e.charAt(o++),!(a=x[i in gv?e.charAt(o++):i])||(r=a(t,n,r))<0)return -1}else if(i!=n.charCodeAt(r++))return -1}return r}return v.x=k(n,v),v.X=k(r,v),v.c=k(e,v),_.x=k(n,_),_.X=k(r,_),_.c=k(e,_),{format:function(t){var e=k(t+=\"\",v);return e.toString=function(){return t},e},parse:function(t){var e=w(t+=\"\",!1);return e.toString=function(){return t},e},utcFormat:function(t){var e=k(t+=\"\",_);return e.toString=function(){return t},e},utcParse:function(t){var e=w(t+=\"\",!0);return e.toString=function(){return t},e}}}var uv,hv,fv,dv,pv,gv={\"-\":\"\",_:\" \",0:\"0\"},yv=/^\\s*\\d+/,mv=/^%/,bv=/[\\\\^$*+?|[\\]().{}]/g;function vv(t,e,n){var r=t<0?\"-\":\"\",i=(r?-t:t)+\"\",a=i.length;return r+(a<n?new Array(n-a+1).join(e)+i:i)}function _v(t){return t.replace(bv,\"\\\\$&\")}function xv(t){return new RegExp(\"^(?:\"+t.map(_v).join(\"|\")+\")\",\"i\")}function kv(t){return new Map(t.map(((t,e)=>[t.toLowerCase(),e])))}function wv(t,e,n){var r=yv.exec(e.slice(n,n+1));return r?(t.w=+r[0],n+r[0].length):-1}function Tv(t,e,n){var r=yv.exec(e.slice(n,n+1));return r?(t.u=+r[0],n+r[0].length):-1}function Ev(t,e,n){var r=yv.exec(e.slice(n,n+2));return r?(t.U=+r[0],n+r[0].length):-1}function Cv(t,e,n){var r=yv.exec(e.slice(n,n+2));return r?(t.V=+r[0],n+r[0].length):-1}function Sv(t,e,n){var r=yv.exec(e.slice(n,n+2));return r?(t.W=+r[0],n+r[0].length):-1}function Av(t,e,n){var r=yv.exec(e.slice(n,n+4));return r?(t.y=+r[0],n+r[0].length):-1}function Mv(t,e,n){var r=yv.exec(e.slice(n,n+2));return r?(t.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function Nv(t,e,n){var r=/^(Z)|([+-]\\d\\d)(?::?(\\d\\d))?/.exec(e.slice(n,n+6));return r?(t.Z=r[1]?0:-(r[2]+(r[3]||\"00\")),n+r[0].length):-1}function Ov(t,e,n){var r=yv.exec(e.slice(n,n+1));return r?(t.q=3*r[0]-3,n+r[0].length):-1}function Dv(t,e,n){var r=yv.exec(e.slice(n,n+2));return r?(t.m=r[0]-1,n+r[0].length):-1}function Bv(t,e,n){var r=yv.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function Lv(t,e,n){var r=yv.exec(e.slice(n,n+3));return r?(t.m=0,t.d=+r[0],n+r[0].length):-1}function Iv(t,e,n){var r=yv.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function Fv(t,e,n){var r=yv.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function Rv(t,e,n){var r=yv.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function Pv(t,e,n){var r=yv.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function jv(t,e,n){var r=yv.exec(e.slice(n,n+6));return r?(t.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function zv(t,e,n){var r=mv.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function Yv(t,e,n){var r=yv.exec(e.slice(n));return r?(t.Q=+r[0],n+r[0].length):-1}function Uv(t,e,n){var r=yv.exec(e.slice(n));return r?(t.s=+r[0],n+r[0].length):-1}function $v(t,e){return vv(t.getDate(),e,2)}function Wv(t,e){return vv(t.getHours(),e,2)}function qv(t,e){return vv(t.getHours()%12||12,e,2)}function Hv(t,e){return vv(1+nb.count(wb(t),t),e,3)}function Vv(t,e){return vv(t.getMilliseconds(),e,3)}function Gv(t,e){return Vv(t,e)+\"000\"}function Xv(t,e){return vv(t.getMonth()+1,e,2)}function Zv(t,e){return vv(t.getMinutes(),e,2)}function Qv(t,e){return vv(t.getSeconds(),e,2)}function Kv(t){var e=t.getDay();return 0===e?7:e}function Jv(t,e){return vv(ab.count(wb(t)-1,t),e,2)}function t_(t){var e=t.getDay();return e>=4||0===e?lb(t):lb.ceil(t)}function e_(t,e){return t=t_(t),vv(lb.count(wb(t),t)+(4===wb(t).getDay()),e,2)}function n_(t){return t.getDay()}function r_(t,e){return vv(ob.count(wb(t)-1,t),e,2)}function i_(t,e){return vv(t.getFullYear()%100,e,2)}function a_(t,e){return vv((t=t_(t)).getFullYear()%100,e,2)}function o_(t,e){return vv(t.getFullYear()%1e4,e,4)}function s_(t,e){var n=t.getDay();return vv((t=n>=4||0===n?lb(t):lb.ceil(t)).getFullYear()%1e4,e,4)}function c_(t){var e=t.getTimezoneOffset();return (e>0?\"-\":(e*=-1,\"+\"))+vv(e/60|0,\"0\",2)+vv(e%60,\"0\",2)}function l_(t,e){return vv(t.getUTCDate(),e,2)}function u_(t,e){return vv(t.getUTCHours(),e,2)}function h_(t,e){return vv(t.getUTCHours()%12||12,e,2)}function f_(t,e){return vv(1+Db.count(Jb(t),t),e,3)}function d_(t,e){return vv(t.getUTCMilliseconds(),e,3)}function p_(t,e){return d_(t,e)+\"000\"}function g_(t,e){return vv(t.getUTCMonth()+1,e,2)}function y_(t,e){return vv(t.getUTCMinutes(),e,2)}function m_(t,e){return vv(t.getUTCSeconds(),e,2)}function b_(t){var e=t.getUTCDay();return 0===e?7:e}function v_(t,e){return vv(Ib.count(Jb(t)-1,t),e,2)}function __(t){var e=t.getUTCDay();return e>=4||0===e?jb(t):jb.ceil(t)}function x_(t,e){return t=__(t),vv(jb.count(Jb(t),t)+(4===Jb(t).getUTCDay()),e,2)}function k_(t){return t.getUTCDay()}function w_(t,e){return vv(Fb.count(Jb(t)-1,t),e,2)}function T_(t,e){return vv(t.getUTCFullYear()%100,e,2)}function E_(t,e){return vv((t=__(t)).getUTCFullYear()%100,e,2)}function C_(t,e){return vv(t.getUTCFullYear()%1e4,e,4)}function S_(t,e){var n=t.getUTCDay();return vv((t=n>=4||0===n?jb(t):jb.ceil(t)).getUTCFullYear()%1e4,e,4)}function A_(){return \"+0000\"}function M_(){return \"%\"}function N_(t){return +t}function O_(t){return Math.floor(+t/1e3)}function D_(t){return uv=lv(t),hv=uv.format,fv=uv.parse,dv=uv.utcFormat,pv=uv.utcParse,uv}function B_(t){return new Date(t)}function L_(t){return t instanceof Date?+t:+new Date(+t)}function I_(t,e,n,r,i,a,o,s,c,l){var u=im(),h=u.invert,f=u.domain,d=l(\".%L\"),p=l(\":%S\"),g=l(\"%I:%M\"),y=l(\"%I %p\"),m=l(\"%a %d\"),b=l(\"%b %d\"),v=l(\"%B\"),_=l(\"%Y\");function x(t){return (c(t)<t?d:s(t)<t?p:o(t)<t?g:a(t)<t?y:r(t)<t?i(t)<t?m:b:n(t)<t?v:_)(t)}return u.invert=function(t){return new Date(h(t))},u.domain=function(t){return arguments.length?f(Array.from(t,L_)):f().map(B_)},u.ticks=function(e){var n=f();return t(n[0],n[n.length-1],null==e?10:e)},u.tickFormat=function(t,e){return null==e?x:l(e)},u.nice=function(t){var n=f();return t&&\"function\"==typeof t.range||(t=e(n[0],n[n.length-1],null==t?10:t)),t?f(lm(n,t)):u},u.copy=function(){return nm(u,I_(t,e,n,r,i,a,o,s,c,l))},u}function F_(){return $y.apply(I_(iv,av,wb,_b,ab,nb,Jm,Zm,Vm,hv).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function R_(){return $y.apply(I_(nv,rv,Jb,Zb,Ib,Db,Mb,Cb,Vm,dv).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function P_(){var t,e,n,r,i,a=0,o=1,s=Ky,c=!1;function l(e){return null==e||isNaN(e=+e)?i:s(0===n?.5:(e=(r(e)-t)*n,c?Math.max(0,Math.min(1,e)):e))}function u(t){return function(e){var n,r;return arguments.length?([n,r]=e,s=t(n,r),l):[s(0),s(1)]}}return l.domain=function(i){return arguments.length?([a,o]=i,t=r(a=+a),e=r(o=+o),n=t===e?0:1/(e-t),l):[a,o]},l.clamp=function(t){return arguments.length?(c=!!t,l):c},l.interpolator=function(t){return arguments.length?(s=t,l):s},l.range=u(Ir),l.rangeRound=u(ty),l.unknown=function(t){return arguments.length?(i=t,l):i},function(i){return r=i,t=i(a),e=i(o),n=t===e?0:1/(e-t),l}}function j_(t,e){return e.domain(t.domain()).interpolator(t.interpolator()).clamp(t.clamp()).unknown(t.unknown())}function z_(){var t=om(P_()(Ky));return t.copy=function(){return j_(t,z_())},Wy.apply(t,arguments)}function Y_(){var t=ym(P_()).domain([1,10]);return t.copy=function(){return j_(t,Y_()).base(t.base())},Wy.apply(t,arguments)}function U_(){var t=_m(P_());return t.copy=function(){return j_(t,U_()).constant(t.constant())},Wy.apply(t,arguments)}function $_(){var t=Em(P_());return t.copy=function(){return j_(t,$_()).exponent(t.exponent())},Wy.apply(t,arguments)}function W_(){return $_.apply(null,arguments).exponent(.5)}function q_(){var t=[],e=Ky;function n(n){if(null!=n&&!isNaN(n=+n))return e((u(t,n,1)-1)/(t.length-1))}return n.domain=function(e){if(!arguments.length)return t.slice();t=[];for(let n of e)null==n||isNaN(n=+n)||t.push(n);return t.sort(r),n},n.interpolator=function(t){return arguments.length?(e=t,n):e},n.range=function(){return t.map(((n,r)=>e(r/(t.length-1))))},n.quantiles=function(e){return Array.from({length:e+1},((n,r)=>lt(t,r/e)))},n.copy=function(){return q_(e).domain(t)},Wy.apply(n,arguments)}function H_(){var t,e,n,r,i,a,o,s=0,c=.5,l=1,u=1,h=Ky,f=!1;function d(t){return isNaN(t=+t)?o:(t=.5+((t=+a(t))-e)*(u*t<u*e?r:i),h(f?Math.max(0,Math.min(1,t)):t))}function p(t){return function(e){var n,r,i;return arguments.length?([n,r,i]=e,h=dy(t,[n,r,i]),d):[h(0),h(.5),h(1)]}}return d.domain=function(o){return arguments.length?([s,c,l]=o,t=a(s=+s),e=a(c=+c),n=a(l=+l),r=t===e?0:.5/(e-t),i=e===n?0:.5/(n-e),u=e<t?-1:1,d):[s,c,l]},d.clamp=function(t){return arguments.length?(f=!!t,d):f},d.interpolator=function(t){return arguments.length?(h=t,d):h},d.range=p(Ir),d.rangeRound=p(ty),d.unknown=function(t){return arguments.length?(o=t,d):o},function(o){return a=o,t=o(s),e=o(c),n=o(l),r=t===e?0:.5/(e-t),i=e===n?0:.5/(n-e),u=e<t?-1:1,d}}function V_(){var t=om(H_()(Ky));return t.copy=function(){return j_(t,V_())},Wy.apply(t,arguments)}function G_(){var t=ym(H_()).domain([.1,1,10]);return t.copy=function(){return j_(t,G_()).base(t.base())},Wy.apply(t,arguments)}function X_(){var t=_m(H_());return t.copy=function(){return j_(t,X_()).constant(t.constant())},Wy.apply(t,arguments)}function Z_(){var t=Em(H_());return t.copy=function(){return j_(t,Z_()).exponent(t.exponent())},Wy.apply(t,arguments)}function Q_(){return Z_.apply(null,arguments).exponent(.5)}function K_(t){for(var e=t.length/6|0,n=new Array(e),r=0;r<e;)n[r]=\"#\"+t.slice(6*r,6*++r);return n}D_({dateTime:\"%x, %X\",date:\"%-m/%-d/%Y\",time:\"%-I:%M:%S %p\",periods:[\"AM\",\"PM\"],days:[\"Sunday\",\"Monday\",\"Tuesday\",\"Wednesday\",\"Thursday\",\"Friday\",\"Saturday\"],shortDays:[\"Sun\",\"Mon\",\"Tue\",\"Wed\",\"Thu\",\"Fri\",\"Sat\"],months:[\"January\",\"February\",\"March\",\"April\",\"May\",\"June\",\"July\",\"August\",\"September\",\"October\",\"November\",\"December\"],shortMonths:[\"Jan\",\"Feb\",\"Mar\",\"Apr\",\"May\",\"Jun\",\"Jul\",\"Aug\",\"Sep\",\"Oct\",\"Nov\",\"Dec\"]});const J_=K_(\"1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf\"),tx=K_(\"7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666\"),ex=K_(\"1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666\"),nx=K_(\"a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928\"),rx=K_(\"fbb4aeb3cde3ccebc5decbe4fed9a6ffffcce5d8bdfddaecf2f2f2\"),ix=K_(\"b3e2cdfdcdaccbd5e8f4cae4e6f5c9fff2aef1e2cccccccc\"),ax=K_(\"e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999\"),ox=K_(\"66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3\"),sx=K_(\"8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f\"),cx=K_(\"4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab\"),lx=t=>wr(t[t.length-1]);var ux=new Array(3).concat(\"d8b365f5f5f55ab4ac\",\"a6611adfc27d80cdc1018571\",\"a6611adfc27df5f5f580cdc1018571\",\"8c510ad8b365f6e8c3c7eae55ab4ac01665e\",\"8c510ad8b365f6e8c3f5f5f5c7eae55ab4ac01665e\",\"8c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e\",\"8c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e\",\"5430058c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e003c30\",\"5430058c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e003c30\").map(K_);const hx=lx(ux);var fx=new Array(3).concat(\"af8dc3f7f7f77fbf7b\",\"7b3294c2a5cfa6dba0008837\",\"7b3294c2a5cff7f7f7a6dba0008837\",\"762a83af8dc3e7d4e8d9f0d37fbf7b1b7837\",\"762a83af8dc3e7d4e8f7f7f7d9f0d37fbf7b1b7837\",\"762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b7837\",\"762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b7837\",\"40004b762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b783700441b\",\"40004b762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b783700441b\").map(K_);const dx=lx(fx);var px=new Array(3).concat(\"e9a3c9f7f7f7a1d76a\",\"d01c8bf1b6dab8e1864dac26\",\"d01c8bf1b6daf7f7f7b8e1864dac26\",\"c51b7de9a3c9fde0efe6f5d0a1d76a4d9221\",\"c51b7de9a3c9fde0eff7f7f7e6f5d0a1d76a4d9221\",\"c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221\",\"c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221\",\"8e0152c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221276419\",\"8e0152c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221276419\").map(K_);const gx=lx(px);var yx=new Array(3).concat(\"998ec3f7f7f7f1a340\",\"5e3c99b2abd2fdb863e66101\",\"5e3c99b2abd2f7f7f7fdb863e66101\",\"542788998ec3d8daebfee0b6f1a340b35806\",\"542788998ec3d8daebf7f7f7fee0b6f1a340b35806\",\"5427888073acb2abd2d8daebfee0b6fdb863e08214b35806\",\"5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b35806\",\"2d004b5427888073acb2abd2d8daebfee0b6fdb863e08214b358067f3b08\",\"2d004b5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b358067f3b08\").map(K_);const mx=lx(yx);var bx=new Array(3).concat(\"ef8a62f7f7f767a9cf\",\"ca0020f4a58292c5de0571b0\",\"ca0020f4a582f7f7f792c5de0571b0\",\"b2182bef8a62fddbc7d1e5f067a9cf2166ac\",\"b2182bef8a62fddbc7f7f7f7d1e5f067a9cf2166ac\",\"b2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac\",\"b2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac\",\"67001fb2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac053061\",\"67001fb2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac053061\").map(K_);const vx=lx(bx);var _x=new Array(3).concat(\"ef8a62ffffff999999\",\"ca0020f4a582bababa404040\",\"ca0020f4a582ffffffbababa404040\",\"b2182bef8a62fddbc7e0e0e09999994d4d4d\",\"b2182bef8a62fddbc7ffffffe0e0e09999994d4d4d\",\"b2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d\",\"b2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d\",\"67001fb2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d1a1a1a\",\"67001fb2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d1a1a1a\").map(K_);const xx=lx(_x);var kx=new Array(3).concat(\"fc8d59ffffbf91bfdb\",\"d7191cfdae61abd9e92c7bb6\",\"d7191cfdae61ffffbfabd9e92c7bb6\",\"d73027fc8d59fee090e0f3f891bfdb4575b4\",\"d73027fc8d59fee090ffffbfe0f3f891bfdb4575b4\",\"d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4\",\"d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4\",\"a50026d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4313695\",\"a50026d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4313695\").map(K_);const wx=lx(kx);var Tx=new Array(3).concat(\"fc8d59ffffbf91cf60\",\"d7191cfdae61a6d96a1a9641\",\"d7191cfdae61ffffbfa6d96a1a9641\",\"d73027fc8d59fee08bd9ef8b91cf601a9850\",\"d73027fc8d59fee08bffffbfd9ef8b91cf601a9850\",\"d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850\",\"d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850\",\"a50026d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850006837\",\"a50026d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850006837\").map(K_);const Ex=lx(Tx);var Cx=new Array(3).concat(\"fc8d59ffffbf99d594\",\"d7191cfdae61abdda42b83ba\",\"d7191cfdae61ffffbfabdda42b83ba\",\"d53e4ffc8d59fee08be6f59899d5943288bd\",\"d53e4ffc8d59fee08bffffbfe6f59899d5943288bd\",\"d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd\",\"d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd\",\"9e0142d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd5e4fa2\",\"9e0142d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd5e4fa2\").map(K_);const Sx=lx(Cx);var Ax=new Array(3).concat(\"e5f5f999d8c92ca25f\",\"edf8fbb2e2e266c2a4238b45\",\"edf8fbb2e2e266c2a42ca25f006d2c\",\"edf8fbccece699d8c966c2a42ca25f006d2c\",\"edf8fbccece699d8c966c2a441ae76238b45005824\",\"f7fcfde5f5f9ccece699d8c966c2a441ae76238b45005824\",\"f7fcfde5f5f9ccece699d8c966c2a441ae76238b45006d2c00441b\").map(K_);const Mx=lx(Ax);var Nx=new Array(3).concat(\"e0ecf49ebcda8856a7\",\"edf8fbb3cde38c96c688419d\",\"edf8fbb3cde38c96c68856a7810f7c\",\"edf8fbbfd3e69ebcda8c96c68856a7810f7c\",\"edf8fbbfd3e69ebcda8c96c68c6bb188419d6e016b\",\"f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d6e016b\",\"f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d810f7c4d004b\").map(K_);const Ox=lx(Nx);var Dx=new Array(3).concat(\"e0f3dba8ddb543a2ca\",\"f0f9e8bae4bc7bccc42b8cbe\",\"f0f9e8bae4bc7bccc443a2ca0868ac\",\"f0f9e8ccebc5a8ddb57bccc443a2ca0868ac\",\"f0f9e8ccebc5a8ddb57bccc44eb3d32b8cbe08589e\",\"f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe08589e\",\"f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe0868ac084081\").map(K_);const Bx=lx(Dx);var Lx=new Array(3).concat(\"fee8c8fdbb84e34a33\",\"fef0d9fdcc8afc8d59d7301f\",\"fef0d9fdcc8afc8d59e34a33b30000\",\"fef0d9fdd49efdbb84fc8d59e34a33b30000\",\"fef0d9fdd49efdbb84fc8d59ef6548d7301f990000\",\"fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000\",\"fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000\").map(K_);const Ix=lx(Lx);var Fx=new Array(3).concat(\"ece2f0a6bddb1c9099\",\"f6eff7bdc9e167a9cf02818a\",\"f6eff7bdc9e167a9cf1c9099016c59\",\"f6eff7d0d1e6a6bddb67a9cf1c9099016c59\",\"f6eff7d0d1e6a6bddb67a9cf3690c002818a016450\",\"fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016450\",\"fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016c59014636\").map(K_);const Rx=lx(Fx);var Px=new Array(3).concat(\"ece7f2a6bddb2b8cbe\",\"f1eef6bdc9e174a9cf0570b0\",\"f1eef6bdc9e174a9cf2b8cbe045a8d\",\"f1eef6d0d1e6a6bddb74a9cf2b8cbe045a8d\",\"f1eef6d0d1e6a6bddb74a9cf3690c00570b0034e7b\",\"fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0034e7b\",\"fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0045a8d023858\").map(K_);const jx=lx(Px);var zx=new Array(3).concat(\"e7e1efc994c7dd1c77\",\"f1eef6d7b5d8df65b0ce1256\",\"f1eef6d7b5d8df65b0dd1c77980043\",\"f1eef6d4b9dac994c7df65b0dd1c77980043\",\"f1eef6d4b9dac994c7df65b0e7298ace125691003f\",\"f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125691003f\",\"f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125698004367001f\").map(K_);const Yx=lx(zx);var Ux=new Array(3).concat(\"fde0ddfa9fb5c51b8a\",\"feebe2fbb4b9f768a1ae017e\",\"feebe2fbb4b9f768a1c51b8a7a0177\",\"feebe2fcc5c0fa9fb5f768a1c51b8a7a0177\",\"feebe2fcc5c0fa9fb5f768a1dd3497ae017e7a0177\",\"fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a0177\",\"fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a017749006a\").map(K_);const $x=lx(Ux);var Wx=new Array(3).concat(\"edf8b17fcdbb2c7fb8\",\"ffffcca1dab441b6c4225ea8\",\"ffffcca1dab441b6c42c7fb8253494\",\"ffffccc7e9b47fcdbb41b6c42c7fb8253494\",\"ffffccc7e9b47fcdbb41b6c41d91c0225ea80c2c84\",\"ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea80c2c84\",\"ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea8253494081d58\").map(K_);const qx=lx(Wx);var Hx=new Array(3).concat(\"f7fcb9addd8e31a354\",\"ffffccc2e69978c679238443\",\"ffffccc2e69978c67931a354006837\",\"ffffccd9f0a3addd8e78c67931a354006837\",\"ffffccd9f0a3addd8e78c67941ab5d238443005a32\",\"ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443005a32\",\"ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443006837004529\").map(K_);const Vx=lx(Hx);var Gx=new Array(3).concat(\"fff7bcfec44fd95f0e\",\"ffffd4fed98efe9929cc4c02\",\"ffffd4fed98efe9929d95f0e993404\",\"ffffd4fee391fec44ffe9929d95f0e993404\",\"ffffd4fee391fec44ffe9929ec7014cc4c028c2d04\",\"ffffe5fff7bcfee391fec44ffe9929ec7014cc4c028c2d04\",\"ffffe5fff7bcfee391fec44ffe9929ec7014cc4c02993404662506\").map(K_);const Xx=lx(Gx);var Zx=new Array(3).concat(\"ffeda0feb24cf03b20\",\"ffffb2fecc5cfd8d3ce31a1c\",\"ffffb2fecc5cfd8d3cf03b20bd0026\",\"ffffb2fed976feb24cfd8d3cf03b20bd0026\",\"ffffb2fed976feb24cfd8d3cfc4e2ae31a1cb10026\",\"ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cb10026\",\"ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cbd0026800026\").map(K_);const Qx=lx(Zx);var Kx=new Array(3).concat(\"deebf79ecae13182bd\",\"eff3ffbdd7e76baed62171b5\",\"eff3ffbdd7e76baed63182bd08519c\",\"eff3ffc6dbef9ecae16baed63182bd08519c\",\"eff3ffc6dbef9ecae16baed64292c62171b5084594\",\"f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594\",\"f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b\").map(K_);const Jx=lx(Kx);var tk=new Array(3).concat(\"e5f5e0a1d99b31a354\",\"edf8e9bae4b374c476238b45\",\"edf8e9bae4b374c47631a354006d2c\",\"edf8e9c7e9c0a1d99b74c47631a354006d2c\",\"edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32\",\"f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32\",\"f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b\").map(K_);const ek=lx(tk);var nk=new Array(3).concat(\"f0f0f0bdbdbd636363\",\"f7f7f7cccccc969696525252\",\"f7f7f7cccccc969696636363252525\",\"f7f7f7d9d9d9bdbdbd969696636363252525\",\"f7f7f7d9d9d9bdbdbd969696737373525252252525\",\"fffffff0f0f0d9d9d9bdbdbd969696737373525252252525\",\"fffffff0f0f0d9d9d9bdbdbd969696737373525252252525000000\").map(K_);const rk=lx(nk);var ik=new Array(3).concat(\"efedf5bcbddc756bb1\",\"f2f0f7cbc9e29e9ac86a51a3\",\"f2f0f7cbc9e29e9ac8756bb154278f\",\"f2f0f7dadaebbcbddc9e9ac8756bb154278f\",\"f2f0f7dadaebbcbddc9e9ac8807dba6a51a34a1486\",\"fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a34a1486\",\"fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a354278f3f007d\").map(K_);const ak=lx(ik);var ok=new Array(3).concat(\"fee0d2fc9272de2d26\",\"fee5d9fcae91fb6a4acb181d\",\"fee5d9fcae91fb6a4ade2d26a50f15\",\"fee5d9fcbba1fc9272fb6a4ade2d26a50f15\",\"fee5d9fcbba1fc9272fb6a4aef3b2ccb181d99000d\",\"fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181d99000d\",\"fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181da50f1567000d\").map(K_);const sk=lx(ok);var ck=new Array(3).concat(\"fee6cefdae6be6550d\",\"feeddefdbe85fd8d3cd94701\",\"feeddefdbe85fd8d3ce6550da63603\",\"feeddefdd0a2fdae6bfd8d3ce6550da63603\",\"feeddefdd0a2fdae6bfd8d3cf16913d948018c2d04\",\"fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d948018c2d04\",\"fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d94801a636037f2704\").map(K_);const lk=lx(ck);function uk(t){return t=Math.max(0,Math.min(1,t)),\"rgb(\"+Math.max(0,Math.min(255,Math.round(-4.54-t*(35.34-t*(2381.73-t*(6402.7-t*(7024.72-2710.57*t)))))))+\", \"+Math.max(0,Math.min(255,Math.round(32.49+t*(170.73+t*(52.82-t*(131.46-t*(176.58-67.37*t)))))))+\", \"+Math.max(0,Math.min(255,Math.round(81.24+t*(442.36-t*(2482.43-t*(6167.24-t*(6614.94-2475.67*t)))))))+\")\"}const hk=fy(Uo(300,.5,0),Uo(-240,.5,1));var fk=fy(Uo(-100,.75,.35),Uo(80,1.5,.8)),dk=fy(Uo(260,.75,.35),Uo(80,1.5,.8)),pk=Uo();function gk(t){(t<0||t>1)&&(t-=Math.floor(t));var e=Math.abs(t-.5);return pk.h=360*t-100,pk.s=1.5-1.5*e,pk.l=.8-.9*e,pk+\"\"}var yk=ir(),mk=Math.PI/3,bk=2*Math.PI/3;function vk(t){var e;return t=(.5-t)*Math.PI,yk.r=255*(e=Math.sin(t))*e,yk.g=255*(e=Math.sin(t+mk))*e,yk.b=255*(e=Math.sin(t+bk))*e,yk+\"\"}function _k(t){return t=Math.max(0,Math.min(1,t)),\"rgb(\"+Math.max(0,Math.min(255,Math.round(34.61+t*(1172.33-t*(10793.56-t*(33300.12-t*(38394.49-14825.05*t)))))))+\", \"+Math.max(0,Math.min(255,Math.round(23.31+t*(557.33+t*(1225.33-t*(3574.96-t*(1073.77+707.56*t)))))))+\", \"+Math.max(0,Math.min(255,Math.round(27.2+t*(3211.1-t*(15327.97-t*(27814-t*(22569.18-6838.66*t)))))))+\")\"}function xk(t){var e=t.length;return function(n){return t[Math.max(0,Math.min(e-1,Math.floor(n*e)))]}}const kk=xk(K_(\"44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725\"));var wk=xk(K_(\"00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf\")),Tk=xk(K_(\"00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4\")),Ek=xk(K_(\"0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921\"));function Ck(t){return Mn(pn(t).call(document.documentElement))}var Sk=0;function Ak(){return new Mk}function Mk(){this._=\"@\"+(++Sk).toString(36);}function Nk(t,e){return t.target&&(t=Fr(t),void 0===e&&(e=t.currentTarget),t=t.touches||[t]),Array.from(t,(t=>Rr(t,e)))}function Ok(t){return \"string\"==typeof t?new Cn([document.querySelectorAll(t)],[document.documentElement]):new Cn([ge(t)],En)}function Dk(t){return function(){return t}}Mk.prototype=Ak.prototype={constructor:Mk,get:function(t){for(var e=this._;!(e in t);)if(!(t=t.parentNode))return;return t[e]},set:function(t,e){return t[this._]=e},remove:function(t){return this._ in t&&delete t[this._]},toString:function(){return this._}};var Bk=Math.abs,Lk=Math.atan2,Ik=Math.cos,Fk=Math.max,Rk=Math.min,Pk=Math.sin,jk=Math.sqrt,zk=1e-12,Yk=Math.PI,Uk=Yk/2,$k=2*Yk;function Wk(t){return t>1?0:t<-1?Yk:Math.acos(t)}function qk(t){return t>=1?Uk:t<=-1?-Uk:Math.asin(t)}function Hk(t){return t.innerRadius}function Vk(t){return t.outerRadius}function Gk(t){return t.startAngle}function Xk(t){return t.endAngle}function Zk(t){return t&&t.padAngle}function Qk(t,e,n,r,i,a,o,s){var c=n-t,l=r-e,u=o-i,h=s-a,f=h*c-u*l;if(!(f*f<zk))return [t+(f=(u*(e-a)-h*(t-i))/f)*c,e+f*l]}function Kk(t,e,n,r,i,a,o){var s=t-n,c=e-r,l=(o?a:-a)/jk(s*s+c*c),u=l*c,h=-l*s,f=t+u,d=e+h,p=n+u,g=r+h,y=(f+p)/2,m=(d+g)/2,b=p-f,v=g-d,_=b*b+v*v,x=i-a,k=f*g-p*d,w=(v<0?-1:1)*jk(Fk(0,x*x*_-k*k)),T=(k*v-b*w)/_,E=(-k*b-v*w)/_,C=(k*v+b*w)/_,S=(-k*b+v*w)/_,A=T-y,M=E-m,N=C-y,O=S-m;return A*A+M*M>N*N+O*O&&(T=C,E=S),{cx:T,cy:E,x01:-u,y01:-h,x11:T*(i/x-1),y11:E*(i/x-1)}}function Jk(){var t=Hk,e=Vk,n=Dk(0),r=null,i=Gk,a=Xk,o=Zk,s=null;function c(){var c,l,u=+t.apply(this,arguments),h=+e.apply(this,arguments),f=i.apply(this,arguments)-Uk,d=a.apply(this,arguments)-Uk,p=Bk(d-f),g=d>f;if(s||(s=c=Ja()),h<u&&(l=h,h=u,u=l),h>zk)if(p>$k-zk)s.moveTo(h*Ik(f),h*Pk(f)),s.arc(0,0,h,f,d,!g),u>zk&&(s.moveTo(u*Ik(d),u*Pk(d)),s.arc(0,0,u,d,f,g));else {var y,m,b=f,v=d,_=f,x=d,k=p,w=p,T=o.apply(this,arguments)/2,E=T>zk&&(r?+r.apply(this,arguments):jk(u*u+h*h)),C=Rk(Bk(h-u)/2,+n.apply(this,arguments)),S=C,A=C;if(E>zk){var M=qk(E/u*Pk(T)),N=qk(E/h*Pk(T));(k-=2*M)>zk?(_+=M*=g?1:-1,x-=M):(k=0,_=x=(f+d)/2),(w-=2*N)>zk?(b+=N*=g?1:-1,v-=N):(w=0,b=v=(f+d)/2);}var O=h*Ik(b),D=h*Pk(b),B=u*Ik(x),L=u*Pk(x);if(C>zk){var I,F=h*Ik(v),R=h*Pk(v),P=u*Ik(_),j=u*Pk(_);if(p<Yk&&(I=Qk(O,D,P,j,F,R,B,L))){var z=O-I[0],Y=D-I[1],U=F-I[0],$=R-I[1],W=1/Pk(Wk((z*U+Y*$)/(jk(z*z+Y*Y)*jk(U*U+$*$)))/2),q=jk(I[0]*I[0]+I[1]*I[1]);S=Rk(C,(u-q)/(W-1)),A=Rk(C,(h-q)/(W+1));}}w>zk?A>zk?(y=Kk(P,j,O,D,h,A,g),m=Kk(F,R,B,L,h,A,g),s.moveTo(y.cx+y.x01,y.cy+y.y01),A<C?s.arc(y.cx,y.cy,A,Lk(y.y01,y.x01),Lk(m.y01,m.x01),!g):(s.arc(y.cx,y.cy,A,Lk(y.y01,y.x01),Lk(y.y11,y.x11),!g),s.arc(0,0,h,Lk(y.cy+y.y11,y.cx+y.x11),Lk(m.cy+m.y11,m.cx+m.x11),!g),s.arc(m.cx,m.cy,A,Lk(m.y11,m.x11),Lk(m.y01,m.x01),!g))):(s.moveTo(O,D),s.arc(0,0,h,b,v,!g)):s.moveTo(O,D),u>zk&&k>zk?S>zk?(y=Kk(B,L,F,R,u,-S,g),m=Kk(O,D,P,j,u,-S,g),s.lineTo(y.cx+y.x01,y.cy+y.y01),S<C?s.arc(y.cx,y.cy,S,Lk(y.y01,y.x01),Lk(m.y01,m.x01),!g):(s.arc(y.cx,y.cy,S,Lk(y.y01,y.x01),Lk(y.y11,y.x11),!g),s.arc(0,0,u,Lk(y.cy+y.y11,y.cx+y.x11),Lk(m.cy+m.y11,m.cx+m.x11),g),s.arc(m.cx,m.cy,S,Lk(m.y11,m.x11),Lk(m.y01,m.x01),!g))):s.arc(0,0,u,x,_,g):s.lineTo(B,L);}else s.moveTo(0,0);if(s.closePath(),c)return s=null,c+\"\"||null}return c.centroid=function(){var n=(+t.apply(this,arguments)+ +e.apply(this,arguments))/2,r=(+i.apply(this,arguments)+ +a.apply(this,arguments))/2-Yk/2;return [Ik(r)*n,Pk(r)*n]},c.innerRadius=function(e){return arguments.length?(t=\"function\"==typeof e?e:Dk(+e),c):t},c.outerRadius=function(t){return arguments.length?(e=\"function\"==typeof t?t:Dk(+t),c):e},c.cornerRadius=function(t){return arguments.length?(n=\"function\"==typeof t?t:Dk(+t),c):n},c.padRadius=function(t){return arguments.length?(r=null==t?null:\"function\"==typeof t?t:Dk(+t),c):r},c.startAngle=function(t){return arguments.length?(i=\"function\"==typeof t?t:Dk(+t),c):i},c.endAngle=function(t){return arguments.length?(a=\"function\"==typeof t?t:Dk(+t),c):a},c.padAngle=function(t){return arguments.length?(o=\"function\"==typeof t?t:Dk(+t),c):o},c.context=function(t){return arguments.length?(s=null==t?null:t,c):s},c}var tw=Array.prototype.slice;function ew(t){return \"object\"==typeof t&&\"length\"in t?t:Array.from(t)}function nw(t){this._context=t;}function rw(t){return new nw(t)}function iw(t){return t[0]}function aw(t){return t[1]}function ow(t,e){var n=Dk(!0),r=null,i=rw,a=null;function o(o){var s,c,l,u=(o=ew(o)).length,h=!1;for(null==r&&(a=i(l=Ja())),s=0;s<=u;++s)!(s<u&&n(c=o[s],s,o))===h&&((h=!h)?a.lineStart():a.lineEnd()),h&&a.point(+t(c,s,o),+e(c,s,o));if(l)return a=null,l+\"\"||null}return t=\"function\"==typeof t?t:void 0===t?iw:Dk(t),e=\"function\"==typeof e?e:void 0===e?aw:Dk(e),o.x=function(e){return arguments.length?(t=\"function\"==typeof e?e:Dk(+e),o):t},o.y=function(t){return arguments.length?(e=\"function\"==typeof t?t:Dk(+t),o):e},o.defined=function(t){return arguments.length?(n=\"function\"==typeof t?t:Dk(!!t),o):n},o.curve=function(t){return arguments.length?(i=t,null!=r&&(a=i(r)),o):i},o.context=function(t){return arguments.length?(null==t?r=a=null:a=i(r=t),o):r},o}function sw(t,e,n){var r=null,i=Dk(!0),a=null,o=rw,s=null;function c(c){var l,u,h,f,d,p=(c=ew(c)).length,g=!1,y=new Array(p),m=new Array(p);for(null==a&&(s=o(d=Ja())),l=0;l<=p;++l){if(!(l<p&&i(f=c[l],l,c))===g)if(g=!g)u=l,s.areaStart(),s.lineStart();else {for(s.lineEnd(),s.lineStart(),h=l-1;h>=u;--h)s.point(y[h],m[h]);s.lineEnd(),s.areaEnd();}g&&(y[l]=+t(f,l,c),m[l]=+e(f,l,c),s.point(r?+r(f,l,c):y[l],n?+n(f,l,c):m[l]));}if(d)return s=null,d+\"\"||null}function l(){return ow().defined(i).curve(o).context(a)}return t=\"function\"==typeof t?t:void 0===t?iw:Dk(+t),e=\"function\"==typeof e?e:Dk(void 0===e?0:+e),n=\"function\"==typeof n?n:void 0===n?aw:Dk(+n),c.x=function(e){return arguments.length?(t=\"function\"==typeof e?e:Dk(+e),r=null,c):t},c.x0=function(e){return arguments.length?(t=\"function\"==typeof e?e:Dk(+e),c):t},c.x1=function(t){return arguments.length?(r=null==t?null:\"function\"==typeof t?t:Dk(+t),c):r},c.y=function(t){return arguments.length?(e=\"function\"==typeof t?t:Dk(+t),n=null,c):e},c.y0=function(t){return arguments.length?(e=\"function\"==typeof t?t:Dk(+t),c):e},c.y1=function(t){return arguments.length?(n=null==t?null:\"function\"==typeof t?t:Dk(+t),c):n},c.lineX0=c.lineY0=function(){return l().x(t).y(e)},c.lineY1=function(){return l().x(t).y(n)},c.lineX1=function(){return l().x(r).y(e)},c.defined=function(t){return arguments.length?(i=\"function\"==typeof t?t:Dk(!!t),c):i},c.curve=function(t){return arguments.length?(o=t,null!=a&&(s=o(a)),c):o},c.context=function(t){return arguments.length?(null==t?a=s=null:s=o(a=t),c):a},c}function cw(t,e){return e<t?-1:e>t?1:e>=t?0:NaN}function lw(t){return t}function uw(){var t=lw,e=cw,n=null,r=Dk(0),i=Dk($k),a=Dk(0);function o(o){var s,c,l,u,h,f=(o=ew(o)).length,d=0,p=new Array(f),g=new Array(f),y=+r.apply(this,arguments),m=Math.min($k,Math.max(-$k,i.apply(this,arguments)-y)),b=Math.min(Math.abs(m)/f,a.apply(this,arguments)),v=b*(m<0?-1:1);for(s=0;s<f;++s)(h=g[p[s]=s]=+t(o[s],s,o))>0&&(d+=h);for(null!=e?p.sort((function(t,n){return e(g[t],g[n])})):null!=n&&p.sort((function(t,e){return n(o[t],o[e])})),s=0,l=d?(m-f*v)/d:0;s<f;++s,y=u)c=p[s],u=y+((h=g[c])>0?h*l:0)+v,g[c]={data:o[c],index:s,value:h,startAngle:y,endAngle:u,padAngle:b};return g}return o.value=function(e){return arguments.length?(t=\"function\"==typeof e?e:Dk(+e),o):t},o.sortValues=function(t){return arguments.length?(e=t,n=null,o):e},o.sort=function(t){return arguments.length?(n=t,e=null,o):n},o.startAngle=function(t){return arguments.length?(r=\"function\"==typeof t?t:Dk(+t),o):r},o.endAngle=function(t){return arguments.length?(i=\"function\"==typeof t?t:Dk(+t),o):i},o.padAngle=function(t){return arguments.length?(a=\"function\"==typeof t?t:Dk(+t),o):a},o}nw.prototype={areaStart:function(){this._line=0;},areaEnd:function(){this._line=NaN;},lineStart:function(){this._point=0;},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line;},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._context.lineTo(t,e);}}};var hw=dw(rw);function fw(t){this._curve=t;}function dw(t){function e(e){return new fw(t(e))}return e._curve=t,e}function pw(t){var e=t.curve;return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t.curve=function(t){return arguments.length?e(dw(t)):e()._curve},t}function gw(){return pw(ow().curve(hw))}function yw(){var t=sw().curve(hw),e=t.curve,n=t.lineX0,r=t.lineX1,i=t.lineY0,a=t.lineY1;return t.angle=t.x,delete t.x,t.startAngle=t.x0,delete t.x0,t.endAngle=t.x1,delete t.x1,t.radius=t.y,delete t.y,t.innerRadius=t.y0,delete t.y0,t.outerRadius=t.y1,delete t.y1,t.lineStartAngle=function(){return pw(n())},delete t.lineX0,t.lineEndAngle=function(){return pw(r())},delete t.lineX1,t.lineInnerRadius=function(){return pw(i())},delete t.lineY0,t.lineOuterRadius=function(){return pw(a())},delete t.lineY1,t.curve=function(t){return arguments.length?e(dw(t)):e()._curve},t}function mw(t,e){return [(e=+e)*Math.cos(t-=Math.PI/2),e*Math.sin(t)]}function bw(t){return t.source}function vw(t){return t.target}function _w(t){var e=bw,n=vw,r=iw,i=aw,a=null;function o(){var o,s=tw.call(arguments),c=e.apply(this,s),l=n.apply(this,s);if(a||(a=o=Ja()),t(a,+r.apply(this,(s[0]=c,s)),+i.apply(this,s),+r.apply(this,(s[0]=l,s)),+i.apply(this,s)),o)return a=null,o+\"\"||null}return o.source=function(t){return arguments.length?(e=t,o):e},o.target=function(t){return arguments.length?(n=t,o):n},o.x=function(t){return arguments.length?(r=\"function\"==typeof t?t:Dk(+t),o):r},o.y=function(t){return arguments.length?(i=\"function\"==typeof t?t:Dk(+t),o):i},o.context=function(t){return arguments.length?(a=null==t?null:t,o):a},o}function xw(t,e,n,r,i){t.moveTo(e,n),t.bezierCurveTo(e=(e+r)/2,n,e,i,r,i);}function kw(t,e,n,r,i){t.moveTo(e,n),t.bezierCurveTo(e,n=(n+i)/2,r,n,r,i);}function ww(t,e,n,r,i){var a=mw(e,n),o=mw(e,n=(n+i)/2),s=mw(r,n),c=mw(r,i);t.moveTo(a[0],a[1]),t.bezierCurveTo(o[0],o[1],s[0],s[1],c[0],c[1]);}function Tw(){return _w(xw)}function Ew(){return _w(kw)}function Cw(){var t=_w(ww);return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t}fw.prototype={areaStart:function(){this._curve.areaStart();},areaEnd:function(){this._curve.areaEnd();},lineStart:function(){this._curve.lineStart();},lineEnd:function(){this._curve.lineEnd();},point:function(t,e){this._curve.point(e*Math.sin(t),e*-Math.cos(t));}};const Sw={draw:function(t,e){var n=Math.sqrt(e/Yk);t.moveTo(n,0),t.arc(0,0,n,0,$k);}},Aw={draw:function(t,e){var n=Math.sqrt(e/5)/2;t.moveTo(-3*n,-n),t.lineTo(-n,-n),t.lineTo(-n,-3*n),t.lineTo(n,-3*n),t.lineTo(n,-n),t.lineTo(3*n,-n),t.lineTo(3*n,n),t.lineTo(n,n),t.lineTo(n,3*n),t.lineTo(-n,3*n),t.lineTo(-n,n),t.lineTo(-3*n,n),t.closePath();}};var Mw=Math.sqrt(1/3),Nw=2*Mw;const Ow={draw:function(t,e){var n=Math.sqrt(e/Nw),r=n*Mw;t.moveTo(0,-n),t.lineTo(r,0),t.lineTo(0,n),t.lineTo(-r,0),t.closePath();}};var Dw=Math.sin(Yk/10)/Math.sin(7*Yk/10),Bw=Math.sin($k/10)*Dw,Lw=-Math.cos($k/10)*Dw;const Iw={draw:function(t,e){var n=Math.sqrt(.8908130915292852*e),r=Bw*n,i=Lw*n;t.moveTo(0,-n),t.lineTo(r,i);for(var a=1;a<5;++a){var o=$k*a/5,s=Math.cos(o),c=Math.sin(o);t.lineTo(c*n,-s*n),t.lineTo(s*r-c*i,c*r+s*i);}t.closePath();}},Fw={draw:function(t,e){var n=Math.sqrt(e),r=-n/2;t.rect(r,r,n,n);}};var Rw=Math.sqrt(3);const Pw={draw:function(t,e){var n=-Math.sqrt(e/(3*Rw));t.moveTo(0,2*n),t.lineTo(-Rw*n,-n),t.lineTo(Rw*n,-n),t.closePath();}};var jw=-.5,zw=Math.sqrt(3)/2,Yw=1/Math.sqrt(12),Uw=3*(Yw/2+1);const $w={draw:function(t,e){var n=Math.sqrt(e/Uw),r=n/2,i=n*Yw,a=r,o=n*Yw+n,s=-a,c=o;t.moveTo(r,i),t.lineTo(a,o),t.lineTo(s,c),t.lineTo(jw*r-zw*i,zw*r+jw*i),t.lineTo(jw*a-zw*o,zw*a+jw*o),t.lineTo(jw*s-zw*c,zw*s+jw*c),t.lineTo(jw*r+zw*i,jw*i-zw*r),t.lineTo(jw*a+zw*o,jw*o-zw*a),t.lineTo(jw*s+zw*c,jw*c-zw*s),t.closePath();}};var Ww=[Sw,Aw,Ow,Fw,Iw,Pw,$w];function qw(t,e){var n=null;function r(){var r;if(n||(n=r=Ja()),t.apply(this,arguments).draw(n,+e.apply(this,arguments)),r)return n=null,r+\"\"||null}return t=\"function\"==typeof t?t:Dk(t||Sw),e=\"function\"==typeof e?e:Dk(void 0===e?64:+e),r.type=function(e){return arguments.length?(t=\"function\"==typeof e?e:Dk(e),r):t},r.size=function(t){return arguments.length?(e=\"function\"==typeof t?t:Dk(+t),r):e},r.context=function(t){return arguments.length?(n=null==t?null:t,r):n},r}function Hw(){}function Vw(t,e,n){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+e)/6,(t._y0+4*t._y1+n)/6);}function Gw(t){this._context=t;}function Xw(t){return new Gw(t)}function Zw(t){this._context=t;}function Qw(t){return new Zw(t)}function Kw(t){this._context=t;}function Jw(t){return new Kw(t)}Gw.prototype={areaStart:function(){this._line=0;},areaEnd:function(){this._line=NaN;},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0;},lineEnd:function(){switch(this._point){case 3:Vw(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line;},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:Vw(this,t,e);}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e;}},Zw.prototype={areaStart:Hw,areaEnd:Hw,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0;},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x2=t,this._y2=e;break;case 1:this._point=2,this._x3=t,this._y3=e;break;case 2:this._point=3,this._x4=t,this._y4=e,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+e)/6);break;default:Vw(this,t,e);}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e;}},Kw.prototype={areaStart:function(){this._line=0;},areaEnd:function(){this._line=NaN;},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0;},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line;},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+t)/6,r=(this._y0+4*this._y1+e)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:Vw(this,t,e);}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e;}};class tT{constructor(t,e){this._context=t,this._x=e;}areaStart(){this._line=0;}areaEnd(){this._line=NaN;}lineStart(){this._point=0;}lineEnd(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line;}point(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,e,t,e):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+e)/2,t,this._y0,t,e);}this._x0=t,this._y0=e;}}function eT(t){return new tT(t,!0)}function nT(t){return new tT(t,!1)}function rT(t,e){this._basis=new Gw(t),this._beta=e;}rT.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart();},lineEnd:function(){var t=this._x,e=this._y,n=t.length-1;if(n>0)for(var r,i=t[0],a=e[0],o=t[n]-i,s=e[n]-a,c=-1;++c<=n;)r=c/n,this._basis.point(this._beta*t[c]+(1-this._beta)*(i+r*o),this._beta*e[c]+(1-this._beta)*(a+r*s));this._x=this._y=null,this._basis.lineEnd();},point:function(t,e){this._x.push(+t),this._y.push(+e);}};const iT=function t(e){function n(t){return 1===e?new Gw(t):new rT(t,e)}return n.beta=function(e){return t(+e)},n}(.85);function aT(t,e,n){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-e),t._y2+t._k*(t._y1-n),t._x2,t._y2);}function oT(t,e){this._context=t,this._k=(1-e)/6;}oT.prototype={areaStart:function(){this._line=0;},areaEnd:function(){this._line=NaN;},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0;},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:aT(this,this._x1,this._y1);}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line;},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2,this._x1=t,this._y1=e;break;case 2:this._point=3;default:aT(this,t,e);}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e;}};const sT=function t(e){function n(t){return new oT(t,e)}return n.tension=function(e){return t(+e)},n}(0);function cT(t,e){this._context=t,this._k=(1-e)/6;}cT.prototype={areaStart:Hw,areaEnd:Hw,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0;},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:aT(this,t,e);}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e;}};const lT=function t(e){function n(t){return new cT(t,e)}return n.tension=function(e){return t(+e)},n}(0);function uT(t,e){this._context=t,this._k=(1-e)/6;}uT.prototype={areaStart:function(){this._line=0;},areaEnd:function(){this._line=NaN;},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0;},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line;},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:aT(this,t,e);}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e;}};const hT=function t(e){function n(t){return new uT(t,e)}return n.tension=function(e){return t(+e)},n}(0);function fT(t,e,n){var r=t._x1,i=t._y1,a=t._x2,o=t._y2;if(t._l01_a>zk){var s=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,c=3*t._l01_a*(t._l01_a+t._l12_a);r=(r*s-t._x0*t._l12_2a+t._x2*t._l01_2a)/c,i=(i*s-t._y0*t._l12_2a+t._y2*t._l01_2a)/c;}if(t._l23_a>zk){var l=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,u=3*t._l23_a*(t._l23_a+t._l12_a);a=(a*l+t._x1*t._l23_2a-e*t._l12_2a)/u,o=(o*l+t._y1*t._l23_2a-n*t._l12_2a)/u;}t._context.bezierCurveTo(r,i,a,o,t._x2,t._y2);}function dT(t,e){this._context=t,this._alpha=e;}dT.prototype={areaStart:function(){this._line=0;},areaEnd:function(){this._line=NaN;},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0;},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2);}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line;},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha));}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3;default:fT(this,t,e);}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e;}};const pT=function t(e){function n(t){return e?new dT(t,e):new oT(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function gT(t,e){this._context=t,this._alpha=e;}gT.prototype={areaStart:Hw,areaEnd:Hw,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0;},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);}},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha));}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:fT(this,t,e);}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e;}};const yT=function t(e){function n(t){return e?new gT(t,e):new cT(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function mT(t,e){this._context=t,this._alpha=e;}mT.prototype={areaStart:function(){this._line=0;},areaEnd:function(){this._line=NaN;},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0;},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line;},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha));}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:fT(this,t,e);}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e;}};const bT=function t(e){function n(t){return e?new mT(t,e):new uT(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function vT(t){this._context=t;}function _T(t){return new vT(t)}function xT(t){return t<0?-1:1}function kT(t,e,n){var r=t._x1-t._x0,i=e-t._x1,a=(t._y1-t._y0)/(r||i<0&&-0),o=(n-t._y1)/(i||r<0&&-0),s=(a*i+o*r)/(r+i);return (xT(a)+xT(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}function wT(t,e){var n=t._x1-t._x0;return n?(3*(t._y1-t._y0)/n-e)/2:e}function TT(t,e,n){var r=t._x0,i=t._y0,a=t._x1,o=t._y1,s=(a-r)/3;t._context.bezierCurveTo(r+s,i+s*e,a-s,o-s*n,a,o);}function ET(t){this._context=t;}function CT(t){this._context=new ST(t);}function ST(t){this._context=t;}function AT(t){return new ET(t)}function MT(t){return new CT(t)}function NT(t){this._context=t;}function OT(t){var e,n,r=t.length-1,i=new Array(r),a=new Array(r),o=new Array(r);for(i[0]=0,a[0]=2,o[0]=t[0]+2*t[1],e=1;e<r-1;++e)i[e]=1,a[e]=4,o[e]=4*t[e]+2*t[e+1];for(i[r-1]=2,a[r-1]=7,o[r-1]=8*t[r-1]+t[r],e=1;e<r;++e)n=i[e]/a[e-1],a[e]-=n,o[e]-=n*o[e-1];for(i[r-1]=o[r-1]/a[r-1],e=r-2;e>=0;--e)i[e]=(o[e]-i[e+1])/a[e];for(a[r-1]=(t[r]+i[r-1])/2,e=0;e<r-1;++e)a[e]=2*t[e+1]-i[e+1];return [i,a]}function DT(t){return new NT(t)}function BT(t,e){this._context=t,this._t=e;}function LT(t){return new BT(t,.5)}function IT(t){return new BT(t,0)}function FT(t){return new BT(t,1)}function RT(t,e){if((i=t.length)>1)for(var n,r,i,a=1,o=t[e[0]],s=o.length;a<i;++a)for(r=o,o=t[e[a]],n=0;n<s;++n)o[n][1]+=o[n][0]=isNaN(r[n][1])?r[n][0]:r[n][1];}function PT(t){for(var e=t.length,n=new Array(e);--e>=0;)n[e]=e;return n}function jT(t,e){return t[e]}function zT(t){const e=[];return e.key=t,e}function YT(){var t=Dk([]),e=PT,n=RT,r=jT;function i(i){var a,o,s=Array.from(t.apply(this,arguments),zT),c=s.length,l=-1;for(const t of i)for(a=0,++l;a<c;++a)(s[a][l]=[0,+r(t,s[a].key,l,i)]).data=t;for(a=0,o=ew(e(s));a<c;++a)s[o[a]].index=a;return n(s,o),s}return i.keys=function(e){return arguments.length?(t=\"function\"==typeof e?e:Dk(Array.from(e)),i):t},i.value=function(t){return arguments.length?(r=\"function\"==typeof t?t:Dk(+t),i):r},i.order=function(t){return arguments.length?(e=null==t?PT:\"function\"==typeof t?t:Dk(Array.from(t)),i):e},i.offset=function(t){return arguments.length?(n=null==t?RT:t,i):n},i}function UT(t,e){if((r=t.length)>0){for(var n,r,i,a=0,o=t[0].length;a<o;++a){for(i=n=0;n<r;++n)i+=t[n][a][1]||0;if(i)for(n=0;n<r;++n)t[n][a][1]/=i;}RT(t,e);}}function $T(t,e){if((s=t.length)>0)for(var n,r,i,a,o,s,c=0,l=t[e[0]].length;c<l;++c)for(a=o=0,n=0;n<s;++n)(i=(r=t[e[n]][c])[1]-r[0])>0?(r[0]=a,r[1]=a+=i):i<0?(r[1]=o,r[0]=o+=i):(r[0]=0,r[1]=i);}function WT(t,e){if((n=t.length)>0){for(var n,r=0,i=t[e[0]],a=i.length;r<a;++r){for(var o=0,s=0;o<n;++o)s+=t[o][r][1]||0;i[r][1]+=i[r][0]=-s/2;}RT(t,e);}}function qT(t,e){if((i=t.length)>0&&(r=(n=t[e[0]]).length)>0){for(var n,r,i,a=0,o=1;o<r;++o){for(var s=0,c=0,l=0;s<i;++s){for(var u=t[e[s]],h=u[o][1]||0,f=(h-(u[o-1][1]||0))/2,d=0;d<s;++d){var p=t[e[d]];f+=(p[o][1]||0)-(p[o-1][1]||0);}c+=h,l+=f*h;}n[o-1][1]+=n[o-1][0]=a,c&&(a-=l/c);}n[o-1][1]+=n[o-1][0]=a,RT(t,e);}}function HT(t){var e=t.map(VT);return PT(t).sort((function(t,n){return e[t]-e[n]}))}function VT(t){for(var e,n=-1,r=0,i=t.length,a=-1/0;++n<i;)(e=+t[n][1])>a&&(a=e,r=n);return r}function GT(t){var e=t.map(XT);return PT(t).sort((function(t,n){return e[t]-e[n]}))}function XT(t){for(var e,n=0,r=-1,i=t.length;++r<i;)(e=+t[r][1])&&(n+=e);return n}function ZT(t){return GT(t).reverse()}function QT(t){var e,n,r=t.length,i=t.map(XT),a=HT(t),o=0,s=0,c=[],l=[];for(e=0;e<r;++e)n=a[e],o<s?(o+=i[n],c.push(n)):(s+=i[n],l.push(n));return l.reverse().concat(c)}function KT(t){return PT(t).reverse()}vT.prototype={areaStart:Hw,areaEnd:Hw,lineStart:function(){this._point=0;},lineEnd:function(){this._point&&this._context.closePath();},point:function(t,e){t=+t,e=+e,this._point?this._context.lineTo(t,e):(this._point=1,this._context.moveTo(t,e));}},ET.prototype={areaStart:function(){this._line=0;},areaEnd:function(){this._line=NaN;},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0;},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:TT(this,this._t0,wT(this,this._t0));}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line;},point:function(t,e){var n=NaN;if(e=+e,(t=+t)!==this._x1||e!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,TT(this,wT(this,n=kT(this,t,e)),n);break;default:TT(this,this._t0,n=kT(this,t,e));}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=n;}}},(CT.prototype=Object.create(ET.prototype)).point=function(t,e){ET.prototype.point.call(this,e,t);},ST.prototype={moveTo:function(t,e){this._context.moveTo(e,t);},closePath:function(){this._context.closePath();},lineTo:function(t,e){this._context.lineTo(e,t);},bezierCurveTo:function(t,e,n,r,i,a){this._context.bezierCurveTo(e,t,r,n,a,i);}},NT.prototype={areaStart:function(){this._line=0;},areaEnd:function(){this._line=NaN;},lineStart:function(){this._x=[],this._y=[];},lineEnd:function(){var t=this._x,e=this._y,n=t.length;if(n)if(this._line?this._context.lineTo(t[0],e[0]):this._context.moveTo(t[0],e[0]),2===n)this._context.lineTo(t[1],e[1]);else for(var r=OT(t),i=OT(e),a=0,o=1;o<n;++a,++o)this._context.bezierCurveTo(r[0][a],i[0][a],r[1][a],i[1][a],t[o],e[o]);(this._line||0!==this._line&&1===n)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null;},point:function(t,e){this._x.push(+t),this._y.push(+e);}},BT.prototype={areaStart:function(){this._line=0;},areaEnd:function(){this._line=NaN;},lineStart:function(){this._x=this._y=NaN,this._point=0;},lineEnd:function(){0<this._t&&this._t<1&&2===this._point&&this._context.lineTo(this._x,this._y),(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line);},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,e),this._context.lineTo(t,e);else {var n=this._x*(1-this._t)+t*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,e);}}this._x=t,this._y=e;}};var JT=\"%Y-%m-%dT%H:%M:%S.%LZ\",tE=Date.prototype.toISOString?function(t){return t.toISOString()}:dv(JT);const eE=tE;var nE=+new Date(\"2000-01-01T00:00:00.000Z\")?function(t){var e=new Date(t);return isNaN(e)?null:e}:pv(JT);const rE=nE;function iE(t,e,n){var r=new Zr,i=e;return null==e?(r.restart(t,e,n),r):(r._restart=r.restart,r.restart=function(t,e,n){e=+e,n=null==n?Gr():+n,r._restart((function a(o){o+=i,r._restart(a,i+=e,n),t(o);}),e,n);},r.restart(t,e,n),r)}const aE=t=>()=>t;function oE(t,{sourceEvent:e,target:n,transform:r,dispatch:i}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:e,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:r,enumerable:!0,configurable:!0},_:{value:i}});}function sE(t,e,n){this.k=t,this.x=e,this.y=n;}sE.prototype={constructor:sE,scale:function(t){return 1===t?this:new sE(this.k*t,this.x,this.y)},translate:function(t,e){return 0===t&0===e?this:new sE(this.k,this.x+this.k*t,this.y+this.k*e)},apply:function(t){return [t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return [(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return (t-this.x)/this.k},invertY:function(t){return (t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return \"translate(\"+this.x+\",\"+this.y+\") scale(\"+this.k+\")\"}};var cE=new sE(1,0,0);function lE(t){for(;!t.__zoom;)if(!(t=t.parentNode))return cE;return t.__zoom}function uE(t){t.stopImmediatePropagation();}function hE(t){t.preventDefault(),t.stopImmediatePropagation();}function fE(t){return !(t.ctrlKey&&\"wheel\"!==t.type||t.button)}function dE(){var t=this;return t instanceof SVGElement?(t=t.ownerSVGElement||t).hasAttribute(\"viewBox\")?[[(t=t.viewBox.baseVal).x,t.y],[t.x+t.width,t.y+t.height]]:[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]:[[0,0],[t.clientWidth,t.clientHeight]]}function pE(){return this.__zoom||cE}function gE(t){return -t.deltaY*(1===t.deltaMode?.05:t.deltaMode?1:.002)*(t.ctrlKey?10:1)}function yE(){return navigator.maxTouchPoints||\"ontouchstart\"in this}function mE(t,e,n){var r=t.invertX(e[0][0])-n[0][0],i=t.invertX(e[1][0])-n[1][0],a=t.invertY(e[0][1])-n[0][1],o=t.invertY(e[1][1])-n[1][1];return t.translate(i>r?(r+i)/2:Math.min(0,r)||Math.max(0,i),o>a?(a+o)/2:Math.min(0,a)||Math.max(0,o))}function bE(){var t,e,n,r=fE,i=dE,a=mE,o=gE,s=yE,c=[0,1/0],l=[[-1/0,-1/0],[1/0,1/0]],u=250,h=ny,f=fe(\"start\",\"zoom\",\"end\"),d=500,p=0,g=10;function y(t){t.property(\"__zoom\",pE).on(\"wheel.zoom\",w,{passive:!1}).on(\"mousedown.zoom\",T).on(\"dblclick.zoom\",E).filter(s).on(\"touchstart.zoom\",C).on(\"touchmove.zoom\",S).on(\"touchend.zoom touchcancel.zoom\",A).style(\"-webkit-tap-highlight-color\",\"rgba(0,0,0,0)\");}function m(t,e){return (e=Math.max(c[0],Math.min(c[1],e)))===t.k?t:new sE(e,t.x,t.y)}function b(t,e,n){var r=e[0]-n[0]*t.k,i=e[1]-n[1]*t.k;return r===t.x&&i===t.y?t:new sE(t.k,r,i)}function v(t){return [(+t[0][0]+ +t[1][0])/2,(+t[0][1]+ +t[1][1])/2]}function _(t,e,n,r){t.on(\"start.zoom\",(function(){x(this,arguments).event(r).start();})).on(\"interrupt.zoom end.zoom\",(function(){x(this,arguments).event(r).end();})).tween(\"zoom\",(function(){var t=this,a=arguments,o=x(t,a).event(r),s=i.apply(t,a),c=null==n?v(s):\"function\"==typeof n?n.apply(t,a):n,l=Math.max(s[1][0]-s[0][0],s[1][1]-s[0][1]),u=t.__zoom,f=\"function\"==typeof e?e.apply(t,a):e,d=h(u.invert(c).concat(l/u.k),f.invert(c).concat(l/f.k));return function(t){if(1===t)t=f;else {var e=d(t),n=l/e[2];t=new sE(n,c[0]-e[0]*n,c[1]-e[1]*n);}o.zoom(null,t);}}));}function x(t,e,n){return !n&&t.__zooming||new k(t,e)}function k(t,e){this.that=t,this.args=e,this.active=0,this.sourceEvent=null,this.extent=i.apply(t,e),this.taps=0;}function w(t,...e){if(r.apply(this,arguments)){var n=x(this,e).event(t),i=this.__zoom,s=Math.max(c[0],Math.min(c[1],i.k*Math.pow(2,o.apply(this,arguments)))),u=Rr(t);if(n.wheel)n.mouse[0][0]===u[0]&&n.mouse[0][1]===u[1]||(n.mouse[1]=i.invert(n.mouse[0]=u)),clearTimeout(n.wheel);else {if(i.k===s)return;n.mouse=[u,i.invert(u)],li(this),n.start();}hE(t),n.wheel=setTimeout(h,150),n.zoom(\"mouse\",a(b(m(i,s),n.mouse[0],n.mouse[1]),n.extent,l));}function h(){n.wheel=null,n.end();}}function T(t,...e){if(!n&&r.apply(this,arguments)){var i=t.currentTarget,o=x(this,e,!0).event(t),s=Mn(t.view).on(\"mousemove.zoom\",f,!0).on(\"mouseup.zoom\",d,!0),c=Rr(t,i),u=t.clientX,h=t.clientY;Ln(t.view),uE(t),o.mouse=[c,this.__zoom.invert(c)],li(this),o.start();}function f(t){if(hE(t),!o.moved){var e=t.clientX-u,n=t.clientY-h;o.moved=e*e+n*n>p;}o.event(t).zoom(\"mouse\",a(b(o.that.__zoom,o.mouse[0]=Rr(t,i),o.mouse[1]),o.extent,l));}function d(t){s.on(\"mousemove.zoom mouseup.zoom\",null),In(t.view,o.moved),hE(t),o.event(t).end();}}function E(t,...e){if(r.apply(this,arguments)){var n=this.__zoom,o=Rr(t.changedTouches?t.changedTouches[0]:t,this),s=n.invert(o),c=n.k*(t.shiftKey?.5:2),h=a(b(m(n,c),o,s),i.apply(this,e),l);hE(t),u>0?Mn(this).transition().duration(u).call(_,h,o,t):Mn(this).call(y.transform,h,o,t);}}function C(n,...i){if(r.apply(this,arguments)){var a,o,s,c,l=n.touches,u=l.length,h=x(this,i,n.changedTouches.length===u).event(n);for(uE(n),o=0;o<u;++o)c=[c=Rr(s=l[o],this),this.__zoom.invert(c),s.identifier],h.touch0?h.touch1||h.touch0[2]===c[2]||(h.touch1=c,h.taps=0):(h.touch0=c,a=!0,h.taps=1+!!t);t&&(t=clearTimeout(t)),a&&(h.taps<2&&(e=c[0],t=setTimeout((function(){t=null;}),d)),li(this),h.start());}}function S(t,...e){if(this.__zooming){var n,r,i,o,s=x(this,e).event(t),c=t.changedTouches,u=c.length;for(hE(t),n=0;n<u;++n)i=Rr(r=c[n],this),s.touch0&&s.touch0[2]===r.identifier?s.touch0[0]=i:s.touch1&&s.touch1[2]===r.identifier&&(s.touch1[0]=i);if(r=s.that.__zoom,s.touch1){var h=s.touch0[0],f=s.touch0[1],d=s.touch1[0],p=s.touch1[1],g=(g=d[0]-h[0])*g+(g=d[1]-h[1])*g,y=(y=p[0]-f[0])*y+(y=p[1]-f[1])*y;r=m(r,Math.sqrt(g/y)),i=[(h[0]+d[0])/2,(h[1]+d[1])/2],o=[(f[0]+p[0])/2,(f[1]+p[1])/2];}else {if(!s.touch0)return;i=s.touch0[0],o=s.touch0[1];}s.zoom(\"touch\",a(b(r,i,o),s.extent,l));}}function A(t,...r){if(this.__zooming){var i,a,o=x(this,r).event(t),s=t.changedTouches,c=s.length;for(uE(t),n&&clearTimeout(n),n=setTimeout((function(){n=null;}),d),i=0;i<c;++i)a=s[i],o.touch0&&o.touch0[2]===a.identifier?delete o.touch0:o.touch1&&o.touch1[2]===a.identifier&&delete o.touch1;if(o.touch1&&!o.touch0&&(o.touch0=o.touch1,delete o.touch1),o.touch0)o.touch0[1]=this.__zoom.invert(o.touch0[0]);else if(o.end(),2===o.taps&&(a=Rr(a,this),Math.hypot(e[0]-a[0],e[1]-a[1])<g)){var l=Mn(this).on(\"dblclick.zoom\");l&&l.apply(this,arguments);}}}return y.transform=function(t,e,n,r){var i=t.selection?t.selection():t;i.property(\"__zoom\",pE),t!==i?_(t,e,n,r):i.interrupt().each((function(){x(this,arguments).event(r).start().zoom(null,\"function\"==typeof e?e.apply(this,arguments):e).end();}));},y.scaleBy=function(t,e,n,r){y.scaleTo(t,(function(){var t=this.__zoom.k,n=\"function\"==typeof e?e.apply(this,arguments):e;return t*n}),n,r);},y.scaleTo=function(t,e,n,r){y.transform(t,(function(){var t=i.apply(this,arguments),r=this.__zoom,o=null==n?v(t):\"function\"==typeof n?n.apply(this,arguments):n,s=r.invert(o),c=\"function\"==typeof e?e.apply(this,arguments):e;return a(b(m(r,c),o,s),t,l)}),n,r);},y.translateBy=function(t,e,n,r){y.transform(t,(function(){return a(this.__zoom.translate(\"function\"==typeof e?e.apply(this,arguments):e,\"function\"==typeof n?n.apply(this,arguments):n),i.apply(this,arguments),l)}),null,r);},y.translateTo=function(t,e,n,r,o){y.transform(t,(function(){var t=i.apply(this,arguments),o=this.__zoom,s=null==r?v(t):\"function\"==typeof r?r.apply(this,arguments):r;return a(cE.translate(s[0],s[1]).scale(o.k).translate(\"function\"==typeof e?-e.apply(this,arguments):-e,\"function\"==typeof n?-n.apply(this,arguments):-n),t,l)}),r,o);},k.prototype={event:function(t){return t&&(this.sourceEvent=t),this},start:function(){return 1==++this.active&&(this.that.__zooming=this,this.emit(\"start\")),this},zoom:function(t,e){return this.mouse&&\"mouse\"!==t&&(this.mouse[1]=e.invert(this.mouse[0])),this.touch0&&\"touch\"!==t&&(this.touch0[1]=e.invert(this.touch0[0])),this.touch1&&\"touch\"!==t&&(this.touch1[1]=e.invert(this.touch1[0])),this.that.__zoom=e,this.emit(\"zoom\"),this},end:function(){return 0==--this.active&&(delete this.that.__zooming,this.emit(\"end\")),this},emit:function(t){var e=Mn(this.that).datum();f.call(t,this.that,new oE(t,{sourceEvent:this.sourceEvent,target:y,type:t,transform:this.that.__zoom,dispatch:f}),e);}},y.wheelDelta=function(t){return arguments.length?(o=\"function\"==typeof t?t:aE(+t),y):o},y.filter=function(t){return arguments.length?(r=\"function\"==typeof t?t:aE(!!t),y):r},y.touchable=function(t){return arguments.length?(s=\"function\"==typeof t?t:aE(!!t),y):s},y.extent=function(t){return arguments.length?(i=\"function\"==typeof t?t:aE([[+t[0][0],+t[0][1]],[+t[1][0],+t[1][1]]]),y):i},y.scaleExtent=function(t){return arguments.length?(c[0]=+t[0],c[1]=+t[1],y):[c[0],c[1]]},y.translateExtent=function(t){return arguments.length?(l[0][0]=+t[0][0],l[1][0]=+t[1][0],l[0][1]=+t[0][1],l[1][1]=+t[1][1],y):[[l[0][0],l[0][1]],[l[1][0],l[1][1]]]},y.constrain=function(t){return arguments.length?(a=t,y):a},y.duration=function(t){return arguments.length?(u=+t,y):u},y.interpolate=function(t){return arguments.length?(h=t,y):h},y.on=function(){var t=f.on.apply(f,arguments);return t===f?y:t},y.clickDistance=function(t){return arguments.length?(p=(t=+t)*t,y):Math.sqrt(p)},y.tapDistance=function(t){return arguments.length?(g=+t,y):g},y}lE.prototype=sE.prototype;}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var a=e[r]={id:r,loaded:!1,exports:{}};return t[r].call(a.exports,a,a.exports,n),a.loaded=!0,a.exports}n.c=e,n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]});},n.g=function(){if(\"object\"==typeof globalThis)return globalThis;try{return this||new Function(\"return this\")()}catch(t){if(\"object\"==typeof window)return window}}(),n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{\"undefined\"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:\"Module\"}),Object.defineProperty(t,\"__esModule\",{value:!0});},n.nmd=t=>(t.paths=[],t.children||(t.children=[]),t);var r=n(n.s=6187).Z;\n\n\t/**\n\t * Copyright (C) 2021 THL A29 Limited, a Tencent company.\n\t *\n\t * Licensed under the Apache License, Version 2.0 (the \"License\");\n\t * you may not use this file except in compliance with the License.\n\t * You may obtain a copy of the License at\n\t *\n\t *     http://www.apache.org/licenses/LICENSE-2.0\n\t *\n\t * Unless required by applicable law or agreed to in writing, software\n\t * distributed under the License is distributed on an \"AS IS\" BASIS,\n\t * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n\t * See the License for the specific language governing permissions and\n\t * limitations under the License.\n\t */\n\tvar mermaidAPI = r === null || r === void 0 ? void 0 : r.mermaidAPI;\n\tCherry.usePlugin(MermaidCodeEngine, {\n\t  mermaidAPI: mermaidAPI,\n\t  theme: 'default',\n\t  sequence: {\n\t    useMaxWidth: false\n\t  }\n\t});\n\tCherry.usePlugin(PlantUMLCodeEngine, {});\n\n\texports.MenuHookBase = MenuBase;\n\texports.SyntaxHookBase = SyntaxBase;\n\texports.default = Cherry;\n\n\tObject.defineProperty(exports, '__esModule', { value: true });\n\n})));\n//# sourceMappingURL=cherry-markdown.js.map\n"
  },
  {
    "path": "static/cherry/drawio-demo.js",
    "content": "// Extends EditorUi to update I/O action states based on availability of backend\n(function () {\n  var editorUiInit = EditorUi.prototype.init;\n\n  EditorUi.prototype.init = function () {\n    editorUiInit.apply(this, arguments);\n  };\n\n  // Adds required resources (disables loading of fallback properties, this can only\n  // be used if we know that all keys are defined in the language specific file)\n  mxResources.loadDefaultBundle = false;\n  var bundle = mxResources.getDefaultBundle(mxLanguage);\n\n  // Fixes possible asynchronous requests\n  mxUtils.getAll([bundle, '/static/cherry/drawio_demo/default.xml'], function (xhr) {\n    // Adds bundle text to resources\n    mxResources.parse(xhr[0].getText());\n\n    // Configures the default graph theme\n    var themes = new Object();\n    themes[Graph.prototype.defaultThemeName] = xhr[1].getDocumentElement();\n\n    // Main\n    window.editorUIInstance = new EditorUi(new Editor(false, themes));\n\n    try {\n      addPostMessageListener(editorUIInstance.editor);\n    } catch (error) {\n      console.log(error);\n    }\n    window.parent.postMessage({ eventName: 'ready', value: '' }, '*');\n\n  }, function () {\n    document.body.innerHTML = '<center style=\"margin-top:10%;\">Error loading resource files. Please check browser console.</center>';\n  });\n})();\n\nfunction addPostMessageListener(graphEditor) {\n  window.addEventListener('message', function (event) {\n    if (!event.data || !event.data.eventName) {\n      return\n    }\n    switch (event.data.eventName) {\n      case 'setData':\n        var value = event.data.value;\n        var doc = mxUtils.parseXml(value);\n        var documentName = 'cherry-drawio-' + new Date().getTime();\n        editorUIInstance.editor.setGraphXml(null);\n        graphEditor.graph.importGraphModel(doc.documentElement);\n        graphEditor.setFilename(documentName);\n        window.parent.postMessage({ eventName: 'setData:success', value: '' }, '*');\n        break;\n      case 'getData':\n        editorUIInstance.editor.graph.stopEditing();\n        var xmlData = mxUtils.getXml(editorUIInstance.editor.getGraphXml());\n        editorUIInstance.exportImage(2, \"#ffffff\", true, null, true, 50, null, \"png\", function (base64, filename) {\n          window.parent.postMessage({\n            mceAction: 'getData:success',\n            eventName: 'getData:success',\n            value: {\n              xmlData: xmlData,\n              base64: base64,\n            }\n          }, '*');\n        })\n        break;\n      case 'ready?':\n        window.parent.postMessage({ eventName: 'ready', value: '' }, '*');\n        break;\n      default:\n        break;\n    }\n  });\n}\n"
  },
  {
    "path": "static/cherry/drawio_demo/Actions.js",
    "content": "/**\n * Copyright (c) 2006-2020, JGraph Ltd\n * Copyright (c) 2006-2020, draw.io AG\n *\n * Constructs the actions object for the given UI.\n */\nfunction Actions(editorUi)\n{\n\tthis.editorUi = editorUi;\n\tthis.actions = new Object();\n\tthis.init();\n};\n\n/**\n * Adds the default actions.\n */\nActions.prototype.init = function()\n{\n\tvar ui = this.editorUi;\n\tvar editor = ui.editor;\n\tvar graph = editor.graph;\n\tvar isGraphEnabled = function()\n\t{\n\t\treturn Action.prototype.isEnabled.apply(this, arguments) && graph.isEnabled();\n\t};\n\n\t// File actions\n\tthis.addAction('new...', function() { graph.openLink(ui.getUrl()); });\n\tthis.addAction('open...', function()\n\t{\n\t\twindow.openNew = true;\n\t\twindow.openKey = 'open';\n\t\t\n\t\tui.openFile();\n\t});\n\tthis.put('smartFit', new Action(mxResources.get('fitWindow') + ' / ' + mxResources.get('resetView'), function()\n\t{\n\t\tgraph.popupMenuHandler.hideMenu();\n\n\t\tvar scale = graph.view.scale;\n\t\tvar sx = graph.container.scrollLeft;\n\t\tvar sy = graph.container.scrollTop;\n        var tx = graph.view.translate.x;\n        var ty = graph.view.translate.y;\n\t\tvar thresh = 5;\n\n    \tui.actions.get('resetView').funct();\n    \t\n        // Toggle scale if nothing has changed\n        if (Math.abs(scale - graph.view.scale) < 0.00001 &&\n\t\t\tMath.abs(sx - graph.container.scrollLeft) < thresh &&\n\t\t\tMath.abs(sy - graph.container.scrollTop) < thresh &&\n\t\t\ttx == graph.view.translate.x &&\n\t\t\tty == graph.view.translate.y)\n        {\n\t\t\tui.actions.get('fitWindow').funct();\n        }\n\t}, null, null, 'Enter'));\n\tthis.addAction('keyPressEnter', function()\n\t{\n\t\tif (graph.isEnabled())\n\t\t{\n\t\t\tif (graph.isSelectionEmpty())\n\t\t\t{\n\t\t\t\tui.actions.get('smartFit').funct();\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tgraph.startEditingAtCell();\n\t\t\t}\n\t\t}\n\t});\n\tthis.addAction('import...', function()\n\t{\n\t\twindow.openNew = false;\n\t\twindow.openKey = 'import';\n\t\t\n\t\t// Closes dialog after open\n\t\twindow.openFile = new OpenFile(mxUtils.bind(this, function()\n\t\t{\n\t\t\tui.hideDialog();\n\t\t}));\n\t\t\n\t\twindow.openFile.setConsumer(mxUtils.bind(this, function(xml, filename)\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\tvar doc = mxUtils.parseXml(xml);\n\t\t\t\teditor.graph.setSelectionCells(editor.graph.importGraphModel(doc.documentElement));\n\t\t\t}\n\t\t\tcatch (e)\n\t\t\t{\n\t\t\t\tmxUtils.alert(mxResources.get('invalidOrMissingFile') + ': ' + e.message);\n\t\t\t}\n\t\t}));\n\n\t\t// Removes openFile if dialog is closed\n\t\tui.showDialog(new OpenDialog(this).container, 320, 220, true, true, function()\n\t\t{\n\t\t\twindow.openFile = null;\n\t\t});\n\t}).isEnabled = isGraphEnabled;\n\tthis.addAction('save', function() { ui.saveFile(false); }, null, null, Editor.ctrlKey + '+S').isEnabled = isGraphEnabled;\n\tthis.addAction('saveAs...', function() { ui.saveFile(true); }, null, null, Editor.ctrlKey + '+Shift+S').isEnabled = isGraphEnabled;\n\tthis.addAction('export...', function() { ui.showDialog(new ExportDialog(ui).container, 300, 340, true, true); });\n\tthis.addAction('editDiagram...', function()\n\t{\n\t\tvar dlg = new EditDiagramDialog(ui);\n\t\tui.showDialog(dlg.container, 620, 420, true, false);\n\t\tdlg.init();\n\t});\n\tthis.addAction('pageSetup...', function() { ui.showDialog(new PageSetupDialog(ui).container, 320, 240, true, true); }).isEnabled = isGraphEnabled;\n\tthis.addAction('print...', function() { ui.showDialog(new PrintDialog(ui).container, 300, 180, true, true); }, null, 'sprite-print', Editor.ctrlKey + '+P');\n\tthis.addAction('preview', function() { mxUtils.show(graph, null, 10, 10); });\n\n\t// Edit actions\n\tthis.addAction('undo', function() { ui.undo(); }, null, 'sprite-undo', Editor.ctrlKey + '+Z');\n\tthis.addAction('redo', function() { ui.redo(); }, null, 'sprite-redo', (!mxClient.IS_WIN) ? Editor.ctrlKey + '+Shift+Z' : Editor.ctrlKey + '+Y');\n\tthis.addAction('cut', function()\n\t{\n\t\tvar cells = null;\n\t\t\n\t\ttry\n\t\t{\n\t\t\tcells = ui.copyXml();\n\n\t\t\tif (cells != null)\n\t\t\t{\n\t\t\t\tgraph.removeCells(cells, false);\n\t\t\t}\n\t\t}\n\t\tcatch (e)\n\t\t{\n\t\t\t// ignore\n\t\t}\n\t\t\n\t\ttry\n\t\t{\n\t\t\tif (cells == null)\n\t\t\t{\n\t\t\t\tmxClipboard.cut(graph);\n\t\t\t}\n\t\t}\n\t\tcatch (e)\n\t\t{\n\t\t\tui.handleError(e);\n\t\t}\n\t}, null, 'sprite-cut', Editor.ctrlKey + '+X');\n\tthis.addAction('copy', function()\n\t{\n\t\ttry\n\t\t{\n\t\t\tui.copyXml();\n\t\t}\n\t\tcatch (e)\n\t\t{\n\t\t\t// ignore\n\t\t}\n\t\t\n\t\ttry\n\t\t{\n\t\t\tmxClipboard.copy(graph);\n\t\t}\n\t\tcatch (e)\n\t\t{\n\t\t\tui.handleError(e);\n\t\t}\n\t}, null, 'sprite-copy', Editor.ctrlKey + '+C');\n\tthis.addAction('paste', function()\n\t{\n\t\tif (graph.isEnabled() && !graph.isCellLocked(graph.getDefaultParent()))\n\t\t{\n\t\t\tvar done = false;\n\t\t\n\t\t\ttry\n\t\t\t{\n\t\t\t\tif (Editor.enableNativeCipboard)\n\t\t\t\t{\n\t\t\t\t\tui.readGraphModelFromClipboard(function(xml)\n\t\t\t\t\t{\n\t\t\t\t\t\tif (xml != null)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tgraph.getModel().beginUpdate();\n\t\t\t\t\t\t\ttry\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tui.pasteXml(xml, true);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tfinally\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tgraph.getModel().endUpdate();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tmxClipboard.paste(graph);\n\t\t\t\t\t\t}\n\t\t\t\t\t})\n\t\t\t\t\t\n\t\t\t\t\tdone = true;\n\t\t\t\t}\n\t\t\t}\n\t\t\tcatch (e)\n\t\t\t{\n\t\t\t\t// ignore\n\t\t\t}\n\t\t\n\t\t\tif (!done)\n\t\t\t{\n\t\t\t\tmxClipboard.paste(graph);\n\t\t\t}\n\t\t}\n\t}, false, 'sprite-paste', Editor.ctrlKey + '+V');\n\tthis.addAction('pasteHere', function(evt)\n\t{\n\t\tfunction pasteCellsHere(cells)\n\t\t{\n\t\t\tif (cells != null)\n\t\t\t{\n\t\t\t\tvar includeEdges = true;\n\t\t\t\t\n\t\t\t\tfor (var i = 0; i < cells.length && includeEdges; i++)\n\t\t\t\t{\n\t\t\t\t\tincludeEdges = includeEdges && graph.model.isEdge(cells[i]);\n\t\t\t\t}\n\n\t\t\t\tvar t = graph.view.translate;\n\t\t\t\tvar s = graph.view.scale;\n\t\t\t\tvar dx = t.x;\n\t\t\t\tvar dy = t.y;\n\t\t\t\tvar bb = null;\n\t\t\t\t\n\t\t\t\tif (cells.length == 1 && includeEdges)\n\t\t\t\t{\n\t\t\t\t\tvar geo = graph.getCellGeometry(cells[0]);\n\t\t\t\t\t\n\t\t\t\t\tif (geo != null)\n\t\t\t\t\t{\n\t\t\t\t\t\tbb = geo.getTerminalPoint(true);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tbb = (bb != null) ? bb : graph.getBoundingBoxFromGeometry(cells, includeEdges);\n\t\t\t\t\n\t\t\t\tif (bb != null)\n\t\t\t\t{\n\t\t\t\t\tvar x = Math.round(graph.snap(graph.popupMenuHandler.triggerX / s - dx));\n\t\t\t\t\tvar y = Math.round(graph.snap(graph.popupMenuHandler.triggerY / s - dy));\n\t\t\t\t\t\n\t\t\t\t\tgraph.cellsMoved(cells, x - bb.x, y - bb.y);\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\t\n\t\tfunction fallback()\n\t\t{\n\t\t\tgraph.getModel().beginUpdate();\n\t\t\ttry\n\t\t\t{\n\t\t\t\tpasteCellsHere(mxClipboard.paste(graph));\n\t\t\t}\n\t\t\tfinally\n\t\t\t{\n\t\t\t\tgraph.getModel().endUpdate();\n\t\t\t}\n\t\t};\n\t\t\n\t\tif (graph.isEnabled() && !graph.isCellLocked(graph.getDefaultParent()))\n\t\t{\n\t\t\tvar done = false;\n\t\t\n\t\t\ttry\n\t\t\t{\n\t\t\t\tif (Editor.enableNativeCipboard)\n\t\t\t\t{\n\t\t\t\t\tui.readGraphModelFromClipboard(function(xml)\n\t\t\t\t\t{\n\t\t\t\t\t\tif (xml != null)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tgraph.getModel().beginUpdate();\n\t\t\t\t\t\t\ttry\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tpasteCellsHere(ui.pasteXml(xml, true));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tfinally\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tgraph.getModel().endUpdate();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tfallback();\n\t\t\t\t\t\t}\n\t\t\t\t\t})\n\t\t\t\t\t\n\t\t\t\t\tdone = true;\n\t\t\t\t}\n\t\t\t}\n\t\t\tcatch (e)\n\t\t\t{\n\t\t\t\t// ignore\n\t\t\t}\n\t\t\t\n\t\t\tif (!done)\n\t\t\t{\n\t\t\t\tfallback();\n\t\t\t}\n\t\t}\n\t});\n\t\n\tthis.addAction('copySize', function()\n\t{\n\t\tvar cell = graph.getSelectionCell();\n\t\t\n\t\tif (graph.isEnabled() && cell != null && graph.getModel().isVertex(cell))\n\t\t{\n\t\t\tvar geo = graph.getCellGeometry(cell);\n\t\t\t\n\t\t\tif (geo != null)\n\t\t\t{\n\t\t\t\tui.copiedSize = new mxRectangle(geo.x, geo.y, geo.width, geo.height);\n\t\t\t}\n\t\t}\n\t}, null, null, 'Alt+Shift+F');\n\n\tthis.addAction('pasteSize', function()\n\t{\n\t\tif (graph.isEnabled() && !graph.isSelectionEmpty() && ui.copiedSize != null)\n\t\t{\n\t\t\tgraph.getModel().beginUpdate();\n\t\t\t\n\t\t\ttry\n\t\t\t{\n\t\t\t\tvar cells = graph.getResizableCells(graph.getSelectionCells());\n\t\t\t\t\n\t\t\t\tfor (var i = 0; i < cells.length; i++)\n\t\t\t\t{\n\t\t\t\t\tif (graph.getModel().isVertex(cells[i]))\n\t\t\t\t\t{\n\t\t\t\t\t\tvar geo = graph.getCellGeometry(cells[i]);\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (geo != null)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tgeo = geo.clone();\n\t\t\t\t\t\t\tgeo.width = ui.copiedSize.width;\n\t\t\t\t\t\t\tgeo.height = ui.copiedSize.height;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tgraph.getModel().setGeometry(cells[i], geo);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tfinally\n\t\t\t{\n\t\t\t\tgraph.getModel().endUpdate();\n\t\t\t}\n\t\t}\n\t}, null, null, 'Alt+Shift+V');\n\t\t\n\tthis.addAction('copyData', function()\n\t{\n\t\tvar cell = graph.getSelectionCell() || graph.getModel().getRoot();\n\t\t\n\t\tif (graph.isEnabled() && cell != null)\n\t\t{\n\t\t\tvar value = cell.cloneValue();\n\t\t\t\n\t\t\tif (value != null && !isNaN(value.nodeType))\n\t\t\t{\n\t\t\t\tui.copiedValue = value;\n\t\t\t}\n\t\t}\n\t}, null, null, 'Alt+Shift+B');\n\n\tthis.addAction('pasteData', function(evt, trigger)\n\t{\n\t\t// Context menu click uses trigger, toolbar menu click uses evt\n\t\tvar evt = (trigger != null) ? trigger : evt;\n\t\tvar model = graph.getModel();\n\t\t\n\t\tfunction applyValue(cell, value)\n\t\t{\n\t\t\tvar old = model.getValue(cell);\n\t\t\tvalue = cell.cloneValue(value);\n\t\t\tvalue.removeAttribute('placeholders');\n\t\t\t\n\t\t\t// Carries over placeholders and label properties\n\t\t\tif (old != null && !isNaN(old.nodeType))\n\t\t\t{\n\t\t\t\tvalue.setAttribute('placeholders', old.getAttribute('placeholders'));\n\t\t\t}\n\t\t\t\n\t\t\tif (evt == null || !mxEvent.isShiftDown(evt))\n\t\t\t{\n\t\t\t\tvalue.setAttribute('label', graph.convertValueToString(cell));\n\t\t\t}\n\t\t\t\n\t\t\tmodel.setValue(cell, value);\n\t\t};\n\t\t\n\t\tif (graph.isEnabled() && !graph.isSelectionEmpty() && ui.copiedValue != null)\n\t\t{\n\t\t\tmodel.beginUpdate();\n\t\t\t\n\t\t\ttry\n\t\t\t{\n\t\t\t\tvar cells = graph.getEditableCells(graph.getSelectionCells());\n\t\t\t\t\n\t\t\t\tif (cells.length == 0)\n\t\t\t\t{\n\t\t\t\t\tapplyValue(model.getRoot(), ui.copiedValue);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tfor (var i = 0; i < cells.length; i++)\n\t\t\t\t\t{\n\t\t\t\t\t\tapplyValue(cells[i], ui.copiedValue);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tfinally\n\t\t\t{\n\t\t\t\tmodel.endUpdate();\n\t\t\t}\n\t\t}\n\t}, null, null, 'Alt+Shift+E');\n\t\n\tfunction deleteCells(includeEdges)\n\t{\n\t\t// Cancels interactive operations\n\t\tgraph.escape();\n\t\tvar select = graph.deleteCells(graph.getDeletableCells(graph.getSelectionCells()), includeEdges);\n\t\t\n\t\tif (select != null)\n\t\t{\n\t\t\tgraph.setSelectionCells(select);\n\t\t}\n\t};\n\n\tfunction deleteLabels()\n\t{\n\t\tif (!graph.isSelectionEmpty())\n\t\t{\n\t\t\tgraph.getModel().beginUpdate();\n\t\t\ttry\n\t\t\t{\n\t\t\t\tvar cells = graph.getSelectionCells();\n\t\t\t\t\n\t\t\t\tfor (var i = 0; i < cells.length; i++)\n\t\t\t\t{\n\t\t\t\t\tgraph.cellLabelChanged(cells[i], '');\n\t\t\t\t}\n\t\t\t}\n\t\t\tfinally\n\t\t\t{\n\t\t\t\tgraph.getModel().endUpdate();\n\t\t\t}\n\t\t}\n\t};\n\t\n\tthis.addAction('delete', function(evt, trigger)\n\t{\n\t\t// Context menu click uses trigger, toolbar menu click uses evt\n\t\tvar evt = (trigger != null) ? trigger : evt;\n\n\t\tif (evt != null && mxEvent.isShiftDown(evt))\n\t\t{\n\t\t\tdeleteLabels();\n\t\t}\n\t\telse\n\t\t{\n\t\t\tdeleteCells(evt != null && (mxEvent.isControlDown(evt) ||\n\t\t\t\tmxEvent.isMetaDown(evt) || mxEvent.isAltDown(evt)));\n\t\t}\n\t}, null, null, 'Delete');\n\tthis.addAction('deleteAll', function()\n\t{\n\t\tdeleteCells(true);\n\t});\n\tthis.addAction('deleteLabels', function()\n\t{\n\t\tdeleteLabels();\n\t}, null, null, Editor.ctrlKey + '+Delete');\n\tthis.addAction('duplicate', function()\n\t{\n\t\ttry\n\t\t{\n\t\t\tgraph.setSelectionCells(graph.duplicateCells());\n\t\t\tgraph.scrollCellToVisible(graph.getSelectionCell());\n\t\t}\n\t\tcatch (e)\n\t\t{\n\t\t\tui.handleError(e);\n\t\t}\n\t}, null, null, Editor.ctrlKey + '+D');\n\tthis.put('mergeCells', new Action(mxResources.get('merge'), function()\n\t{\n\t\tvar ss = ui.getSelectionState();\n\n\t\tif (ss.mergeCell != null)\n\t\t{\n\t\t\tgraph.getModel().beginUpdate();\n\t\t\ttry\n\t\t\t{\n\t\t\t\tgraph.setCellStyles('rowspan', ss.rowspan, [ss.mergeCell]);\n\t\t\t\tgraph.setCellStyles('colspan', ss.colspan, [ss.mergeCell]);\n\t\t\t}\n\t\t\tfinally\n\t\t\t{\n\t\t\t\tgraph.getModel().endUpdate();\n\t\t\t}\n\t\t}\n\t}));\n\tthis.put('unmergeCells', new Action(mxResources.get('unmerge'), function()\n\t{\n\t\tvar ss = ui.getSelectionState();\n\n\t\tif (ss.cells.length > 0)\n\t\t{\n\t\t\tgraph.getModel().beginUpdate();\n\t\t\ttry\n\t\t\t{\n\t\t\t\tgraph.setCellStyles('rowspan', null, ss.cells);\n\t\t\t\tgraph.setCellStyles('colspan', null, ss.cells);\n\t\t\t}\n\t\t\tfinally\n\t\t\t{\n\t\t\t\tgraph.getModel().endUpdate();\n\t\t\t}\n\t\t}\n\t}));\n\tthis.put('turn', new Action(mxResources.get('turn') + ' / ' + mxResources.get('reverse'), function(evt, trigger)\n\t{\n\t\t// Context menu click uses trigger, toolbar menu click uses evt\n\t\tvar evt = (trigger != null) ? trigger : evt;\n\n\t\tgraph.turnShapes(graph.getResizableCells(graph.getSelectionCells()),\n\t\t\t(evt != null) ? mxEvent.isShiftDown(evt) : false);\n\t}, null, null, (mxClient.IS_SF) ? null : Editor.ctrlKey + '+R'));\n\tthis.put('selectConnections', new Action(mxResources.get('selectEdges'), function(evt)\n\t{\n\t\tvar cell = graph.getSelectionCell();\n\t\t\n\t\tif (graph.isEnabled() && cell != null)\n\t\t{\n\t\t\tgraph.addSelectionCells(graph.getEdges(cell));\n\t\t}\n\t}));\n\tthis.addAction('selectVertices', function() { graph.selectVertices(null, true); }, null, null, Editor.ctrlKey + '+Shift+I');\n\tthis.addAction('selectEdges', function() { graph.selectEdges(); }, null, null, Editor.ctrlKey + '+Shift+E');\n\tthis.addAction('selectAll', function() { graph.selectAll(null, true); }, null, null, Editor.ctrlKey + '+A');\n\tthis.addAction('selectNone', function() { graph.clearSelection(); }, null, null, Editor.ctrlKey + '+Shift+A');\n\tthis.addAction('lockUnlock', function()\n\t{\n\t\tif (!graph.isSelectionEmpty())\n\t\t{\n\t\t\tgraph.getModel().beginUpdate();\n\t\t\ttry\n\t\t\t{\n\t\t\t\tvar cells = graph.getSelectionCells();\n\t\t\t\tvar style = graph.getCurrentCellStyle(graph.getSelectionCell());\n\t\t\t\tvar value = (mxUtils.getValue(style, mxConstants.STYLE_EDITABLE, 1)) == 1 ? 0 : 1;\n\t\t\t\tgraph.setCellStyles(mxConstants.STYLE_MOVABLE, value, cells);\n\t\t\t\tgraph.setCellStyles(mxConstants.STYLE_RESIZABLE, value, cells);\n\t\t\t\tgraph.setCellStyles(mxConstants.STYLE_ROTATABLE, value, cells);\n\t\t\t\tgraph.setCellStyles(mxConstants.STYLE_DELETABLE, value, cells);\n\t\t\t\tgraph.setCellStyles(mxConstants.STYLE_EDITABLE, value, cells);\n\t\t\t\tgraph.setCellStyles('locked', (value == 1) ? 0 : 1, cells);\n\t\t\t\tgraph.setCellStyles('connectable', value, cells);\n\t\t\t}\n\t\t\tfinally\n\t\t\t{\n\t\t\t\tgraph.getModel().endUpdate();\n\t\t\t}\n\t\t}\n\t}, null, null, Editor.ctrlKey + '+L');\n\n\t// Navigation actions\n\tthis.addAction('home', function() { graph.home(); }, null, null, 'Shift+Home');\n\tthis.addAction('exitGroup', function() { graph.exitGroup(); }, null, null, Editor.ctrlKey + '+Shift+Home');\n\tthis.addAction('enterGroup', function() { graph.enterGroup(); }, null, null, Editor.ctrlKey + '+Shift+End');\n\tthis.addAction('collapse', function() { graph.foldCells(true); }, null, null, Editor.ctrlKey + '+Home');\n\tthis.addAction('expand', function() { graph.foldCells(false); }, null, null, Editor.ctrlKey + '+End');\n\t\n\t// Arrange actions\n\tthis.addAction('toFront', function()\n\t{\n\t\tgraph.orderCells(false);\n\t}, null, null, Editor.ctrlKey + '+Shift+F');\n\tthis.addAction('toBack', function()\n\t{\n\t\tgraph.orderCells(true);\n\t}, null, null, Editor.ctrlKey + '+Shift+B');\n\tthis.addAction('bringForward', function(evt)\n\t{\n\t\tgraph.orderCells(false, null, true);\n\t});\n\tthis.addAction('sendBackward', function(evt)\n\t{\n\t\tgraph.orderCells(true, null, true);\n\t});\n\tthis.addAction('group', function()\n\t{\n\t\tif (graph.isEnabled())\n\t\t{\n\t\t\tvar cells = mxUtils.sortCells(graph.getSelectionCells(), true);\n\n\t\t\tif (cells.length == 1 && !graph.isTable(cells[0]) && !graph.isTableRow(cells[0]))\n\t\t\t{\n\t\t\t\tgraph.setCellStyles('container', '1');\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tcells = graph.getCellsForGroup(cells);\n\t\t\t\t\n\t\t\t\tif (cells.length > 1)\n\t\t\t\t{\n\t\t\t\t\tgraph.setSelectionCell(graph.groupCells(null, 0, cells));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}, null, null, Editor.ctrlKey + '+G');\n\tthis.addAction('ungroup', function()\n\t{\n\t\tif (graph.isEnabled())\n\t\t{\n\t\t\tvar cells = graph.getEditableCells(graph.getSelectionCells());\n\t\t\t\n\t        graph.model.beginUpdate();\n\t\t\ttry\n\t\t\t{\n\t\t\t\tvar temp = graph.ungroupCells();\n\t\t\t\t\n\t\t\t\t// Clears container flag for remaining cells\n\t\t\t\tif (cells != null)\n\t\t\t\t{\n\t\t\t\t\tfor (var i = 0; i < cells.length; i++)\n\t\t\t    \t{\n\t\t\t\t\t\tif (graph.model.contains(cells[i]))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif (graph.model.getChildCount(cells[i]) == 0 &&\n\t\t\t\t\t\t\t\tgraph.model.isVertex(cells[i]))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tgraph.setCellStyles('container', '0', [cells[i]]);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\ttemp.push(cells[i]);\n\t\t\t\t\t\t}\n\t\t\t    \t}\n\t\t\t\t}\n\t\t    }\n\t\t\tfinally\n\t\t\t{\n\t\t\t\tgraph.model.endUpdate();\n\t\t\t}\n\t\n\t\t\tif (temp.length > 0)\n\t\t\t{\n\t\t\t\tgraph.setSelectionCells(temp);\n\t\t\t}\n\t\t}\n\t}, null, null, Editor.ctrlKey + '+Shift+U');\n\tthis.addAction('removeFromGroup', function()\n\t{\n\t\tif (graph.isEnabled())\n\t\t{\n\t\t\tvar cells = graph.getSelectionCells();\n\t\t\t\n\t\t\t// Removes table rows and cells\n\t\t\tif (cells != null)\n\t\t\t{\n\t\t\t\tvar temp = [];\n\t\t\t\t\n\t\t\t\tfor (var i = 0; i < cells.length; i++)\n\t\t    \t{\n\t\t\t\t\tif (!graph.isTableRow(cells[i]) &&\n\t\t\t\t\t\t!graph.isTableCell(cells[i]))\n\t\t\t\t\t{\n\t\t\t\t\t\ttemp.push(cells[i]);\n\t\t\t\t\t}\n\t\t    \t}\n\t\t\t\t\n\t\t\t\tgraph.removeCellsFromParent(temp);\n\t\t\t}\n\t\t}\n\t});\n\t// Adds action\n\tthis.addAction('edit', function()\n\t{\n\t\tif (graph.isEnabled())\n\t\t{\n\t\t\tgraph.startEditingAtCell();\n\t\t}\n\t}, null, null, 'F2/Enter');\n\tthis.addAction('editData...', function()\n\t{\n\t\tvar cell = graph.getSelectionCell() || graph.getModel().getRoot();\n\t\tui.showDataDialog(cell);\n\t}, null, null, Editor.ctrlKey + '+M');\n\tthis.addAction('editTooltip...', function()\n\t{\n\t\tvar cell = graph.getSelectionCell();\n\t\t\n\t\tif (graph.isEnabled() && cell != null && graph.isCellEditable(cell))\n\t\t{\n\t\t\tvar tooltip = '';\n\t\t\t\n\t\t\tif (mxUtils.isNode(cell.value))\n\t\t\t{\n\t\t\t\tvar tmp = null;\n\t\t\t\t\n\t\t\t\tif (Graph.translateDiagram && Graph.diagramLanguage != null &&\n\t\t\t\t\tcell.value.hasAttribute('tooltip_' + Graph.diagramLanguage))\n\t\t\t\t{\n\t\t\t\t\ttmp = cell.value.getAttribute('tooltip_' + Graph.diagramLanguage);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (tmp == null)\n\t\t\t\t{\n\t\t\t\t\ttmp = cell.value.getAttribute('tooltip');\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (tmp != null)\n\t\t\t\t{\n\t\t\t\t\ttooltip = tmp;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t    \tvar dlg = new TextareaDialog(ui, mxResources.get('editTooltip') + ':', tooltip, function(newValue)\n\t\t\t{\n\t\t\t\tgraph.setTooltipForCell(cell, newValue);\n\t\t\t});\n\t\t\tui.showDialog(dlg.container, 320, 200, true, true);\n\t\t\tdlg.init();\n\t\t}\n\t}, null, null, 'Alt+Shift+T');\n\tthis.addAction('openLink', function()\n\t{\n\t\tvar link = graph.getLinkForCell(graph.getSelectionCell());\n\t\t\n\t\tif (link != null)\n\t\t{\n\t\t\tgraph.openLink(link);\n\t\t}\n\t});\n\tthis.addAction('editLink...', function()\n\t{\n\t\tvar cell = graph.getSelectionCell();\n\t\t\n\t\tif (graph.isEnabled() && cell != null && graph.isCellEditable(cell))\n\t\t{\n\t\t\tvar value = graph.getLinkForCell(cell) || '';\n\t\t\t\n\t\t\tui.showLinkDialog(value, mxResources.get('apply'), function(link, docs, linkTarget)\n\t\t\t{\n\t\t\t\tlink = mxUtils.trim(link);\n    \t\t\tgraph.setLinkForCell(cell, (link.length > 0) ? link : null);\n\t\t\t\tgraph.setAttributeForCell(cell, 'linkTarget', linkTarget);\n\t\t\t}, true, graph.getLinkTargetForCell(cell));\n\t\t}\n\t}, null, null, 'Alt+Shift+L');\n\tthis.put('insertImage', new Action(mxResources.get('image') + '...', function()\n\t{\n\t\tif (graph.isEnabled() && !graph.isCellLocked(graph.getDefaultParent()))\n\t\t{\n\t\t\tgraph.clearSelection();\n\t\t\tui.actions.get('image').funct();\n\t\t}\n\t})).isEnabled = isGraphEnabled;\n\tthis.addAction('editImage...', function()\n\t{\n\t\tui.actions.get('image').funct();\n\t});\n\tthis.put('insertLink', new Action(mxResources.get('link') + '...', function()\n\t{\n\t\tif (graph.isEnabled() && !graph.isCellLocked(graph.getDefaultParent()))\n\t\t{\n\t\t\tui.showLinkDialog('', mxResources.get('insert'), function(link, docs, linkTarget)\n\t\t\t{\n\t\t\t\tlink = mxUtils.trim(link);\n\t\t\t\t\n\t\t\t\tif (link.length > 0)\n\t\t\t\t{\n\t\t\t\t\tvar icon = null;\n\t\t\t\t\tvar title = graph.getLinkTitle(link);\n\t\t\t\t\t\n\t\t\t\t\tif (docs != null && docs.length > 0)\n\t\t\t\t\t{\n\t\t\t\t\t\ticon = docs[0].iconUrl;\n\t\t\t\t\t\ttitle = docs[0].name || docs[0].type;\n\t\t\t\t\t\ttitle = title.charAt(0).toUpperCase() + title.substring(1);\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (title.length > 30)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\ttitle = title.substring(0, 30) + '...';\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n            \t\tvar linkCell = new mxCell(title, new mxGeometry(0, 0, 100, 40),\n\t            \t    \t'fontColor=#0000EE;fontStyle=4;rounded=1;overflow=hidden;' + ((icon != null) ?\n\t            \t    \t'shape=label;imageWidth=16;imageHeight=16;spacingLeft=26;align=left;image=' + icon :\n\t            \t    \t'spacing=10;'));\n            \t    linkCell.vertex = true;\n\n            \t    var pt = graph.getCenterInsertPoint(graph.getBoundingBoxFromGeometry([linkCell], true));\n\t\t\t\t\tlinkCell.geometry.x = pt.x;\n            \t    linkCell.geometry.y = pt.y;\n            \t    \n\t\t\t\t\tgraph.setAttributeForCell(linkCell, 'linkTarget', linkTarget);\n            \t    graph.setLinkForCell(linkCell, link);\n            \t    graph.cellSizeUpdated(linkCell, true);\n\n            \t\tgraph.getModel().beginUpdate();\n            \t\ttry\n            \t\t{\n        \t    \t\tlinkCell = graph.addCell(linkCell);\n        \t    \t\tgraph.fireEvent(new mxEventObject('cellsInserted', 'cells', [linkCell]));\n            \t    }\n            \t\tfinally\n            \t\t{\n            \t\t\tgraph.getModel().endUpdate();\n            \t\t}\n            \t\t\n            \t    graph.setSelectionCell(linkCell);\n            \t    graph.scrollCellToVisible(graph.getSelectionCell());\n\t\t\t\t}\n\t\t\t}, true);\n\t\t}\n\t}, null, null, 'L')).isEnabled = isGraphEnabled;\n\tthis.addAction('link...', mxUtils.bind(this, function()\n\t{\n\t\tif (graph.isEnabled())\n\t\t{\n\t\t\tif (graph.cellEditor.isContentEditing())\n\t\t\t{\n\t\t\t\tvar elt = graph.getSelectedElement();\n\t\t\t\tvar link = graph.getParentByName(elt, 'A', graph.cellEditor.textarea);\n\t\t\t\tvar oldValue = '';\n\t\t\t\t\n\t\t\t\t// Workaround for FF returning the outermost selected element after double\n\t\t\t\t// click on a DOM hierarchy with a link inside (but not as topmost element)\n\t\t\t\tif (link == null && elt != null && elt.getElementsByTagName != null)\n\t\t\t\t{\n\t\t\t\t\t// Finds all links in the selected DOM and uses the link\n\t\t\t\t\t// where the selection text matches its text content\n\t\t\t\t\tvar links = elt.getElementsByTagName('a');\n\t\t\t\t\t\n\t\t\t\t\tfor (var i = 0; i < links.length && link == null; i++)\n\t\t\t\t\t{\n\t\t\t\t\t\tif (links[i].textContent == elt.textContent)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tlink = links[i];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (link != null && link.nodeName == 'A')\n\t\t\t\t{\n\t\t\t\t\toldValue = link.getAttribute('href') || '';\n\t\t\t\t\tgraph.selectNode(link);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tvar selState = graph.cellEditor.saveSelection();\n\t\t\t\t\n\t\t\t\tui.showLinkDialog(oldValue, mxResources.get('apply'), mxUtils.bind(this, function(value)\n\t\t\t\t{\n\t\t    \t\tgraph.cellEditor.restoreSelection(selState);\n\n\t\t    \t\tif (value != null)\n\t\t    \t\t{\n\t\t    \t\t\tgraph.insertLink(value);\n\t\t\t\t\t}\n\t\t\t\t}));\n\t\t\t}\n\t\t\telse if (graph.isSelectionEmpty())\n\t\t\t{\n\t\t\t\tthis.get('insertLink').funct();\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tthis.get('editLink').funct();\n\t\t\t}\n\t\t}\n\t})).isEnabled = isGraphEnabled;\n\tthis.addAction('autosize', function()\n\t{\n\t\tvar cells = graph.getSelectionCells();\n\t\t\n\t\tif (cells != null)\n\t\t{\n\t\t\tgraph.getModel().beginUpdate();\n\t\t\ttry\n\t\t\t{\n\t\t\t\tfor (var i = 0; i < cells.length; i++)\n\t\t\t\t{\n\t\t\t\t\tvar cell = cells[i];\n\n\t\t\t\t\tif (graph.getModel().isVertex(cell))\n\t\t\t\t\t{\n\t\t\t\t\t\tif (graph.getModel().getChildCount(cell) > 0)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tgraph.updateGroupBounds([cell], 0, true);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tgraph.updateCellSize(cell);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tfinally\n\t\t\t{\n\t\t\t\tgraph.getModel().endUpdate();\n\t\t\t}\n\t\t}\n\t}, null, null, Editor.ctrlKey + '+Shift+Y');\n\tthis.addAction('snapToGrid', function()\n\t{\n\t\tgraph.snapCellsToGrid(graph.getSelectionCells(), graph.gridSize);\n\t});\n\tthis.addAction('formattedText', function()\n\t{\n    \tgraph.stopEditing();\n\n\t\tvar style = graph.getCommonStyle(graph.getSelectionCells());\n\t\tvar value = (mxUtils.getValue(style, 'html', '0') == '1') ? null : '1';\n\t\t\n\t\tgraph.getModel().beginUpdate();\n\t\ttry\n\t\t{\n\t\t\tvar cells = graph.getEditableCells(graph.getSelectionCells());\n\t\t\t\n\t\t\tfor (var i = 0; i < cells.length; i++)\n\t\t\t{\n\t\t\t\tstate = graph.getView().getState(cells[i]);\n\t\t\t\t\n\t\t\t\tif (state != null)\n\t\t\t\t{\n\t\t\t\t\tvar html = mxUtils.getValue(state.style, 'html', '0');\n\t\t\t\t\t\n\t\t\t\t\tif (html == '1' && value == null)\n\t\t\t    \t{\n\t\t\t\t\t\tgraph.removeTextStyleForCell(state.cell);\n\t\t\t\t\t\tgraph.setCellStyles('html', value, [cells[i]]);\n\t\t\t    \t}\n\t\t\t\t\telse if (html == '0' && value == '1')\n\t\t\t    \t{\n\t\t\t    \t\t// Converts HTML tags to text\n\t\t\t    \t\tvar label = mxUtils.htmlEntities(graph.convertValueToString(state.cell), false);\n\t\t\t    \t\t\n\t\t\t    \t\tif (mxUtils.getValue(state.style, 'nl2Br', '1') != '0')\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t// Converts newlines in plain text to breaks in HTML\n\t\t\t\t\t\t\t// to match the plain text output\n\t\t\t    \t\t\tlabel = label.replace(/\\n/g, '<br/>');\n\t\t\t\t\t\t}\n\t\t\t    \t\t\n\t\t\t    \t\tgraph.cellLabelChanged(state.cell, Graph.sanitizeHtml(label));\n\t\t\t    \t\tgraph.setCellStyles('html', value, [cells[i]]);\n\t\t\t    \t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tui.fireEvent(new mxEventObject('styleChanged', 'keys', ['html'],\n\t\t\t\t'values', [(value != null) ? value : '0'], 'cells', cells));\n\t\t}\n\t\tfinally\n\t\t{\n\t\t\tgraph.getModel().endUpdate();\n\t\t}\n\t});\n\tthis.addAction('wordWrap', function()\n\t{\n    \tvar state = graph.getView().getState(graph.getSelectionCell());\n    \tvar value = 'wrap';\n    \t\n\t\tgraph.stopEditing();\n    \t\n    \tif (state != null && state.style[mxConstants.STYLE_WHITE_SPACE] == 'wrap')\n    \t{\n    \t\tvalue = null;\n    \t}\n\n       \tgraph.setCellStyles(mxConstants.STYLE_WHITE_SPACE, value);\n\t});\n\tthis.addAction('rotation', function()\n\t{\n\t\tvar value = '0';\n    \tvar state = graph.getView().getState(graph.getSelectionCell());\n    \t\n    \tif (state != null)\n    \t{\n    \t\tvalue = state.style[mxConstants.STYLE_ROTATION] || value;\n    \t}\n\n\t\tvar dlg = new FilenameDialog(ui, value, mxResources.get('apply'), function(newValue)\n\t\t{\n\t\t\tif (newValue != null && newValue.length > 0)\n\t\t\t{\n\t\t\t\tgraph.setCellStyles(mxConstants.STYLE_ROTATION, newValue);\n\t\t\t}\n\t\t}, mxResources.get('enterValue') + ' (' + mxResources.get('rotation') + ' 0-360)');\n\t\t\n\t\tui.showDialog(dlg.container, 375, 80, true, true);\n\t\tdlg.init();\n\t});\n\t// View actions\n\tthis.addAction('resetView', function()\n\t{\n\t\tgraph.zoomTo(1);\n\t\tui.resetScrollbars();\n\t}, null, null, 'Enter/Home');\n\tthis.addAction('zoomIn', function(evt)\n\t{\n\t\tif (graph.isFastZoomEnabled())\n\t\t{\n\t\t\tgraph.lazyZoom(true, true, ui.buttonZoomDelay);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tgraph.zoomIn();\n\t\t}\n\t}, null, null, Editor.ctrlKey + ' + (Numpad) / Alt+Mousewheel');\n\tthis.addAction('zoomOut', function(evt)\n\t{\n\t\tif (graph.isFastZoomEnabled())\n\t\t{\n\t\t\tgraph.lazyZoom(false, true, ui.buttonZoomDelay);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tgraph.zoomOut();\n\t\t}\n\t}, null, null, Editor.ctrlKey + ' - (Numpad) / Alt+Mousewheel');\n\tthis.addAction('fitWindow', function()\n\t{\n\t\tif (graph.pageVisible && graph.isSelectionEmpty())\n\t\t{\n\t\t\tgraph.fitPages();\n\t\t}\n\t\telse\n\t\t{\n\t\t\tui.fitDiagramToWindow();\n\t\t}\n\t}, null, null, Editor.ctrlKey + '+Shift+H');\n\tthis.addAction('fitPage', mxUtils.bind(this, function()\n\t{\n\t\tif (graph.pageVisible)\n\t\t{\n\t\t\tgraph.fitPages(1);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tthis.get('pageView').funct();\n\t\t}\n\t}), null, null, Editor.ctrlKey + '+J');\n\tthis.addAction('fitTwoPages', mxUtils.bind(this, function()\n\t{\n\t\tif (graph.pageVisible)\n\t\t{\n\t\t\tgraph.fitPages(2);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tthis.get('pageView').funct();\n\t\t}\n\t}), null, null, Editor.ctrlKey + '+Shift+J');\n\tthis.addAction('fitPageWidth', mxUtils.bind(this, function()\n\t{\n\t\tif (graph.pageVisible)\n\t\t{\n\t\t\tgraph.fitPages(1, true);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tthis.get('pageView').funct();\n\t\t}\n\t}));\n\tthis.put('customZoom', new Action(mxResources.get('custom') + '...', mxUtils.bind(this, function()\n\t{\n\t\tvar dlg = new FilenameDialog(this.editorUi, parseInt(graph.getView().getScale() * 100), mxResources.get('apply'), mxUtils.bind(this, function(newValue)\n\t\t{\n\t\t\tvar val = parseInt(newValue);\n\t\t\t\n\t\t\tif (!isNaN(val) && val > 0)\n\t\t\t{\n\t\t\t\tgraph.zoomTo(val / 100);\n\t\t\t}\n\t\t}), mxResources.get('zoom') + ' (%)');\n\t\tthis.editorUi.showDialog(dlg.container, 300, 80, true, true);\n\t\tdlg.init();\n\t}), null, null, Editor.ctrlKey + '+0'));\n\tthis.addAction('pageScale...', mxUtils.bind(this, function()\n\t{\n\t\tvar dlg = new FilenameDialog(this.editorUi, parseInt(graph.pageScale * 100), mxResources.get('apply'), mxUtils.bind(this, function(newValue)\n\t\t{\n\t\t\tvar val = parseInt(newValue);\n\t\t\t\n\t\t\tif (!isNaN(val) && val > 0)\n\t\t\t{\n\t\t\t\tvar change = new ChangePageSetup(ui, null, null, null, val / 100);\n\t\t\t\tchange.ignoreColor = true;\n\t\t\t\tchange.ignoreImage = true;\n\t\t\t\t\n\t\t\t\tgraph.model.execute(change);\n\t\t\t}\n\t\t}), mxResources.get('pageScale') + ' (%)');\n\t\tthis.editorUi.showDialog(dlg.container, 300, 80, true, true);\n\t\tdlg.init();\n\t}));\n\n\t// Option actions\n\tvar action = null;\n\taction = this.addAction('grid', function()\n\t{\n\t\tgraph.setGridEnabled(!graph.isGridEnabled());\n\t\tgraph.defaultGridEnabled = graph.isGridEnabled();\n\t\tui.fireEvent(new mxEventObject('gridEnabledChanged'));\n\t}, null, null, Editor.ctrlKey + '+Shift+G');\n\taction.setToggleAction(true);\n\taction.setSelectedCallback(function() { return graph.isGridEnabled(); });\n\taction.setEnabled(false);\n\t\n\taction = this.addAction('guides', function()\n\t{\n\t\tgraph.graphHandler.guidesEnabled = !graph.graphHandler.guidesEnabled;\n\t\tui.fireEvent(new mxEventObject('guidesEnabledChanged'));\n\t});\n\taction.setToggleAction(true);\n\taction.setSelectedCallback(function() { return graph.graphHandler.guidesEnabled; });\n\taction.setEnabled(false);\n\t\n\taction = this.addAction('tooltips', function()\n\t{\n\t\tgraph.tooltipHandler.setEnabled(!graph.tooltipHandler.isEnabled());\n\t\tui.fireEvent(new mxEventObject('tooltipsEnabledChanged'));\n\t});\n\taction.setToggleAction(true);\n\taction.setSelectedCallback(function() { return graph.tooltipHandler.isEnabled(); });\n\t\n\taction = this.addAction('collapseExpand', function()\n\t{\n\t\tvar change = new ChangePageSetup(ui);\n\t\tchange.ignoreColor = true;\n\t\tchange.ignoreImage = true;\n\t\tchange.foldingEnabled = !graph.foldingEnabled;\n\t\t\n\t\tgraph.model.execute(change);\n\t});\n\taction.setToggleAction(true);\n\taction.setSelectedCallback(function() { return graph.foldingEnabled; });\n\taction.isEnabled = isGraphEnabled;\n\taction = this.addAction('pageView', mxUtils.bind(this, function()\n\t{\n\t\tui.setPageVisible(!graph.pageVisible);\n\t}));\n\taction.setToggleAction(true);\n\taction.setSelectedCallback(function() { return graph.pageVisible; });\n\taction = this.addAction('connectionArrows', function()\n\t{\n\t\tgraph.connectionArrowsEnabled = !graph.connectionArrowsEnabled;\n\t\tui.fireEvent(new mxEventObject('connectionArrowsChanged'));\n\t}, null, null, 'Alt+Shift+A');\n\taction.setToggleAction(true);\n\taction.setSelectedCallback(function() { return graph.connectionArrowsEnabled; });\n\taction = this.addAction('connectionPoints', function()\n\t{\n\t\tgraph.setConnectable(!graph.connectionHandler.isEnabled());\n\t\tui.fireEvent(new mxEventObject('connectionPointsChanged'));\n\t}, null, null, 'Alt+Shift+O');\n\taction.setToggleAction(true);\n\taction.setSelectedCallback(function() { return graph.connectionHandler.isEnabled(); });\n\taction = this.addAction('copyConnect', function()\n\t{\n\t\tgraph.connectionHandler.setCreateTarget(!graph.connectionHandler.isCreateTarget());\n\t\tui.fireEvent(new mxEventObject('copyConnectChanged'));\n\t});\n\taction.setToggleAction(true);\n\taction.setSelectedCallback(function() { return graph.connectionHandler.isCreateTarget(); });\n\taction.isEnabled = isGraphEnabled;\n\taction = this.addAction('autosave', function()\n\t{\n\t\tui.editor.setAutosave(!ui.editor.autosave);\n\t});\n\taction.setToggleAction(true);\n\taction.setSelectedCallback(function() { return ui.editor.autosave; });\n\taction.isEnabled = isGraphEnabled;\n\taction.visible = false;\n\t\n\t// Help actions\n\tthis.addAction('help', function()\n\t{\n\t\tvar ext = '';\n\t\t\n\t\tif (mxResources.isLanguageSupported(mxClient.language))\n\t\t{\n\t\t\text = '_' + mxClient.language;\n\t\t}\n\t\t\n\t\tgraph.openLink(RESOURCES_PATH + '/help' + ext + '.html');\n\t});\n\t\n\tvar showingAbout = false;\n\t\n\tthis.put('about', new Action(mxResources.get('about') + ' Graph Editor...', function()\n\t{\n\t\tif (!showingAbout)\n\t\t{\n\t\t\tui.showDialog(new AboutDialog(ui).container, 320, 280, true, true, function()\n\t\t\t{\n\t\t\t\tshowingAbout = false;\n\t\t\t});\n\t\t\t\n\t\t\tshowingAbout = true;\n\t\t}\n\t}));\n\t\n\t// Font style actions\n\tvar toggleFontStyle = mxUtils.bind(this, function(key, style, fn, shortcut)\n\t{\n\t\treturn this.addAction(key, function()\n\t\t{\n\t\t\tif (fn != null && graph.cellEditor.isContentEditing())\n\t\t\t{\n\t\t\t\tfn();\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tgraph.stopEditing(false);\n\t\t\t\t\n\t\t\t\tgraph.getModel().beginUpdate();\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tvar cells = graph.getEditableCells(graph.getSelectionCells());\n\t\t\t\t\tgraph.toggleCellStyleFlags(mxConstants.STYLE_FONTSTYLE, style, cells);\n\t\t\t\t\t\n\t\t\t\t\t// Removes bold and italic tags and CSS styles inside labels\n\t\t\t\t\tif ((style & mxConstants.FONT_BOLD) == mxConstants.FONT_BOLD)\n\t\t\t\t\t{\n\t\t\t\t\t\tgraph.updateLabelElements(cells, function(elt)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\telt.style.fontWeight = null;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif (elt.nodeName == 'B')\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tgraph.replaceElement(elt);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t\telse if ((style & mxConstants.FONT_ITALIC) == mxConstants.FONT_ITALIC)\n\t\t\t\t\t{\n\t\t\t\t\t\tgraph.updateLabelElements(cells, function(elt)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\telt.style.fontStyle = null;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif (elt.nodeName == 'I')\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tgraph.replaceElement(elt);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t\telse if ((style & mxConstants.FONT_UNDERLINE) == mxConstants.FONT_UNDERLINE)\n\t\t\t\t\t{\n\t\t\t\t\t\tgraph.updateLabelElements(cells, function(elt)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\telt.style.textDecoration = null;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif (elt.nodeName == 'U')\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tgraph.replaceElement(elt);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tfor (var i = 0; i < cells.length; i++)\n\t\t\t\t\t{\n\t\t\t\t\t\tif (graph.model.getChildCount(cells[i]) == 0)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tgraph.autoSizeCell(cells[i], false);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tfinally\n\t\t\t\t{\n\t\t\t\t\tgraph.getModel().endUpdate();\n\t\t\t\t}\n\t\t\t}\n\t\t}, null, null, shortcut);\n\t});\n\t\n\ttoggleFontStyle('bold', mxConstants.FONT_BOLD, function() { document.execCommand('bold', false, null); }, Editor.ctrlKey + '+B');\n\ttoggleFontStyle('italic', mxConstants.FONT_ITALIC, function() { document.execCommand('italic', false, null); }, Editor.ctrlKey + '+I');\n\ttoggleFontStyle('underline', mxConstants.FONT_UNDERLINE, function() { document.execCommand('underline', false, null); }, Editor.ctrlKey + '+U');\n\t\n\t// Color actions\n\tthis.addAction('fontColor...', function() { ui.menus.pickColor(mxConstants.STYLE_FONTCOLOR, 'forecolor', '000000'); });\n\tthis.addAction('strokeColor...', function() { ui.menus.pickColor(mxConstants.STYLE_STROKECOLOR); });\n\tthis.addAction('fillColor...', function() { ui.menus.pickColor(mxConstants.STYLE_FILLCOLOR); });\n\tthis.addAction('gradientColor...', function() { ui.menus.pickColor(mxConstants.STYLE_GRADIENTCOLOR); });\n\tthis.addAction('backgroundColor...', function() { ui.menus.pickColor(mxConstants.STYLE_LABEL_BACKGROUNDCOLOR, 'backcolor'); });\n\tthis.addAction('borderColor...', function() { ui.menus.pickColor(mxConstants.STYLE_LABEL_BORDERCOLOR); });\n\t\n\t// Format actions\n\tthis.addAction('removeFormat', function()\n\t{\n\t\tif (graph.isEnabled() && !graph.isSelectionEmpty() && !graph.isEditing())\n\t\t{\n\t\t\tgraph.getModel().beginUpdate();\n\t\t\ttry\n\t\t\t{\n\t\t\t\tvar cells = graph.getSelectionCells();\n\n\t\t\t\tfor (var i = 0; i < cells.length; i++)\n\t\t\t\t{\n\t\t\t\t\tgraph.removeTextStyleForCell(cells[i], true);\n\t\t\t\t}\n\t\t\t}\n\t\t\tfinally\n\t\t\t{\n\t\t\t\tgraph.getModel().endUpdate();\n\t\t\t}\n\t\t}\n\t});\n\tthis.addAction('vertical', function() { ui.menus.toggleStyle(mxConstants.STYLE_HORIZONTAL, true); });\n\tthis.addAction('shadow', function() { ui.menus.toggleStyle(mxConstants.STYLE_SHADOW); });\n\tthis.addAction('solid', function()\n\t{\n\t\tgraph.getModel().beginUpdate();\n\t\ttry\n\t\t{\n\t\t\tgraph.setCellStyles(mxConstants.STYLE_DASHED, null);\n\t\t\tgraph.setCellStyles(mxConstants.STYLE_DASH_PATTERN, null);\n\t\t\tui.fireEvent(new mxEventObject('styleChanged', 'keys', [mxConstants.STYLE_DASHED, mxConstants.STYLE_DASH_PATTERN],\n\t\t\t\t'values', [null, null], 'cells', graph.getSelectionCells()));\n\t\t}\n\t\tfinally\n\t\t{\n\t\t\tgraph.getModel().endUpdate();\n\t\t}\n\t});\n\tthis.addAction('dashed', function()\n\t{\n\t\tgraph.getModel().beginUpdate();\n\t\ttry\n\t\t{\n\t\t\tgraph.setCellStyles(mxConstants.STYLE_DASHED, '1');\n\t\t\tgraph.setCellStyles(mxConstants.STYLE_DASH_PATTERN, null);\n\t\t\tui.fireEvent(new mxEventObject('styleChanged', 'keys', [mxConstants.STYLE_DASHED, mxConstants.STYLE_DASH_PATTERN],\n\t\t\t\t'values', ['1', null], 'cells', graph.getSelectionCells()));\n\t\t}\n\t\tfinally\n\t\t{\n\t\t\tgraph.getModel().endUpdate();\n\t\t}\n\t});\n\tthis.addAction('dotted', function()\n\t{\n\t\tgraph.getModel().beginUpdate();\n\t\ttry\n\t\t{\n\t\t\tgraph.setCellStyles(mxConstants.STYLE_DASHED, '1');\n\t\t\tgraph.setCellStyles(mxConstants.STYLE_DASH_PATTERN, '1 4');\n\t\t\tui.fireEvent(new mxEventObject('styleChanged', 'keys', [mxConstants.STYLE_DASHED, mxConstants.STYLE_DASH_PATTERN],\n\t\t\t\t'values', ['1', '1 4'], 'cells', graph.getSelectionCells()));\n\t\t}\n\t\tfinally\n\t\t{\n\t\t\tgraph.getModel().endUpdate();\n\t\t}\n\t});\n\tthis.addAction('sharp', function()\n\t{\n\t\tgraph.getModel().beginUpdate();\n\t\ttry\n\t\t{\n\t\t\tgraph.setCellStyles(mxConstants.STYLE_ROUNDED, '0');\n\t\t\tgraph.setCellStyles(mxConstants.STYLE_CURVED, '0');\n\t\t\tui.fireEvent(new mxEventObject('styleChanged', 'keys', [mxConstants.STYLE_ROUNDED, mxConstants.STYLE_CURVED],\n\t\t\t\t\t'values', ['0', '0'], 'cells', graph.getSelectionCells()));\n\t\t}\n\t\tfinally\n\t\t{\n\t\t\tgraph.getModel().endUpdate();\n\t\t}\n\t});\n\tthis.addAction('rounded', function()\n\t{\n\t\tgraph.getModel().beginUpdate();\n\t\ttry\n\t\t{\n\t\t\tgraph.setCellStyles(mxConstants.STYLE_ROUNDED, '1');\n\t\t\tgraph.setCellStyles(mxConstants.STYLE_CURVED, '0');\n\t\t\tui.fireEvent(new mxEventObject('styleChanged', 'keys', [mxConstants.STYLE_ROUNDED, mxConstants.STYLE_CURVED],\n\t\t\t\t\t'values', ['1', '0'], 'cells', graph.getSelectionCells()));\n\t\t}\n\t\tfinally\n\t\t{\n\t\t\tgraph.getModel().endUpdate();\n\t\t}\n\t});\n\tthis.addAction('toggleRounded', function()\n\t{\n\t\tif (!graph.isSelectionEmpty() && graph.isEnabled())\n\t\t{\n\t\t\tgraph.getModel().beginUpdate();\n\t\t\ttry\n\t\t\t{\n\t\t\t\tvar cells = graph.getSelectionCells();\n\t    \t\tvar style = graph.getCurrentCellStyle(cells[0]);\n\t    \t\tvar value = (mxUtils.getValue(style, mxConstants.STYLE_ROUNDED, '0') == '1') ? '0' : '1';\n\t    \t\t\n\t\t\t\tgraph.setCellStyles(mxConstants.STYLE_ROUNDED, value);\n\t\t\t\tgraph.setCellStyles(mxConstants.STYLE_CURVED, null);\n\t\t\t\tui.fireEvent(new mxEventObject('styleChanged', 'keys', [mxConstants.STYLE_ROUNDED, mxConstants.STYLE_CURVED],\n\t\t\t\t\t\t'values', [value, '0'], 'cells', graph.getSelectionCells()));\n\t\t\t}\n\t\t\tfinally\n\t\t\t{\n\t\t\t\tgraph.getModel().endUpdate();\n\t\t\t}\n\t\t}\n\t});\n\tthis.addAction('curved', function()\n\t{\n\t\tgraph.getModel().beginUpdate();\n\t\ttry\n\t\t{\n\t\t\tgraph.setCellStyles(mxConstants.STYLE_ROUNDED, '0');\n\t\t\tgraph.setCellStyles(mxConstants.STYLE_CURVED, '1');\n\t\t\tui.fireEvent(new mxEventObject('styleChanged', 'keys', [mxConstants.STYLE_ROUNDED, mxConstants.STYLE_CURVED],\n\t\t\t\t\t'values', ['0', '1'], 'cells', graph.getSelectionCells()));\n\t\t}\n\t\tfinally\n\t\t{\n\t\t\tgraph.getModel().endUpdate();\n\t\t}\n\t});\n\tthis.addAction('collapsible', function()\n\t{\n\t\tvar state = graph.view.getState(graph.getSelectionCell());\n\t\tvar value = '1';\n\t\t\n\t\tif (state != null && graph.getFoldingImage(state) != null)\n\t\t{\n\t\t\tvalue = '0';\t\n\t\t}\n\t\t\n\t\tgraph.setCellStyles('collapsible', value);\n\t\tui.fireEvent(new mxEventObject('styleChanged', 'keys', ['collapsible'],\n\t\t\t\t'values', [value], 'cells', graph.getSelectionCells()));\n\t});\n\tthis.addAction('editStyle...', mxUtils.bind(this, function()\n\t{\n\t\tvar cells = graph.getEditableCells(graph.getSelectionCells());\n\t\t\n\t\tif (cells != null && cells.length > 0)\n\t\t{\n\t\t\tvar model = graph.getModel();\n\t\t\t\n\t    \tvar dlg = new TextareaDialog(this.editorUi, mxResources.get('editStyle') + ':',\n\t    \t\tmodel.getStyle(cells[0]) || '', function(newValue)\n\t\t\t{\n\t    \t\tif (newValue != null)\n\t\t\t\t{\n\t\t\t\t\tgraph.setCellStyle(mxUtils.trim(newValue), cells);\n\t\t\t\t}\n\t\t\t}, null, null, 400, 220);\n\t\t\tthis.editorUi.showDialog(dlg.container, 420, 300, true, true);\n\t\t\tdlg.init();\n\t\t}\n\t}), null, null, Editor.ctrlKey + '+E');\n\tthis.addAction('setAsDefaultStyle', function()\n\t{\n\t\tif (graph.isEnabled() && !graph.isSelectionEmpty())\n\t\t{\n\t\t\tui.setDefaultStyle(graph.getSelectionCell());\n\t\t}\n\t}, null, null, Editor.ctrlKey + '+Shift+D');\n\tthis.addAction('clearDefaultStyle', function()\n\t{\n\t\tif (graph.isEnabled())\n\t\t{\n\t\t\tui.clearDefaultStyle();\n\t\t}\n\t}, null, null, Editor.ctrlKey + '+Shift+R');\n\tthis.addAction('addWaypoint', function()\n\t{\n\t\tvar cell = graph.getSelectionCell();\n\t\t\n\t\tif (cell != null && graph.getModel().isEdge(cell))\n\t\t{\n\t\t\tvar handler = editor.graph.selectionCellsHandler.getHandler(cell);\n\t\t\t\n\t\t\tif (handler instanceof mxEdgeHandler)\n\t\t\t{\n\t\t\t\tvar t = graph.view.translate;\n\t\t\t\tvar s = graph.view.scale;\n\t\t\t\tvar dx = t.x;\n\t\t\t\tvar dy = t.y;\n\t\t\t\t\n\t\t\t\tvar parent = graph.getModel().getParent(cell);\n\t\t\t\tvar pgeo = graph.getCellGeometry(parent);\n\t\t\t\t\n\t\t\t\twhile (graph.getModel().isVertex(parent) && pgeo != null)\n\t\t\t\t{\n\t\t\t\t\tdx += pgeo.x;\n\t\t\t\t\tdy += pgeo.y;\n\t\t\t\t\t\n\t\t\t\t\tparent = graph.getModel().getParent(parent);\n\t\t\t\t\tpgeo = graph.getCellGeometry(parent);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tvar x = Math.round(graph.snap(graph.popupMenuHandler.triggerX / s - dx));\n\t\t\t\tvar y = Math.round(graph.snap(graph.popupMenuHandler.triggerY / s - dy));\n\t\t\t\t\n\t\t\t\thandler.addPointAt(handler.state, x, y);\n\t\t\t}\n\t\t}\n\t});\n\tthis.addAction('removeWaypoint', function()\n\t{\n\t\t// TODO: Action should run with \"this\" set to action\n\t\tvar rmWaypointAction = ui.actions.get('removeWaypoint');\n\t\t\n\t\tif (rmWaypointAction.handler != null)\n\t\t{\n\t\t\t// NOTE: Popupevent handled and action updated in Menus.createPopupMenu\n\t\t\trmWaypointAction.handler.removePoint(rmWaypointAction.handler.state, rmWaypointAction.index);\n\t\t}\n\t});\n\tthis.addAction('clearWaypoints', function(evt, trigger)\n\t{\n\t\t// Context menu click uses trigger, toolbar menu click uses evt\n\t\tvar evt = (trigger != null) ? trigger : evt;\n\t\tvar cells = graph.getSelectionCells();\n\n\t\tif (cells != null)\n\t\t{\n\t\t\tcells = graph.getEditableCells(graph.addAllEdges(cells));\n\t\t\t\n\t\t\tgraph.getModel().beginUpdate();\n\t\t\ttry\n\t\t\t{\n\t\t\t\tfor (var i = 0; i < cells.length; i++)\n\t\t\t\t{\n\t\t\t\t\tvar cell = cells[i];\n\t\t\t\t\t\n\t\t\t\t\tif (graph.getModel().isEdge(cell))\n\t\t\t\t\t{\n\t\t\t\t\t\tvar geo = graph.getCellGeometry(cell);\n\t\t\t\n\t\t\t\t\t\t// Resets fixed connection point\n\t\t\t\t\t\tif (trigger != null && mxEvent.isShiftDown(evt))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tgraph.setCellStyles(mxConstants.STYLE_EXIT_X, null, [cell]);\n\t\t\t\t\t\t\tgraph.setCellStyles(mxConstants.STYLE_EXIT_Y, null, [cell]);\n\t\t\t\t\t\t\tgraph.setCellStyles(mxConstants.STYLE_ENTRY_X, null, [cell]);\n\t\t\t\t\t\t\tgraph.setCellStyles(mxConstants.STYLE_ENTRY_Y, null, [cell]);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if (geo != null)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tgeo = geo.clone();\n\t\t\t\t\t\t\tgeo.points = null;\n\t\t\t\t\t\t\tgeo.x = 0;\n\t\t\t\t\t\t\tgeo.y = 0;\n\t\t\t\t\t\t\tgeo.offset = null;\n\t\t\t\t\t\t\tgraph.getModel().setGeometry(cell, geo);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tfinally\n\t\t\t{\n\t\t\t\tgraph.getModel().endUpdate();\n\t\t\t}\n\t\t}\n\t}, null, null, 'Alt+Shift+R');\n\taction = this.addAction('subscript', mxUtils.bind(this, function()\n\t{\n\t    if (graph.cellEditor.isContentEditing())\n\t    {\n\t\t\tdocument.execCommand('subscript', false, null);\n\t\t}\n\t}), null, null, Editor.ctrlKey + '+,');\n\taction = this.addAction('superscript', mxUtils.bind(this, function()\n\t{\n\t    if (graph.cellEditor.isContentEditing())\n\t    {\n\t\t\tdocument.execCommand('superscript', false, null);\n\t\t}\n\t}), null, null, Editor.ctrlKey + '+.');\n\taction = this.addAction('decreaseFontSize', mxUtils.bind(this, function()\n\t{\n\t\tif (!graph.isSelectionEmpty())\n\t\t{\n\t\t\tvar style = graph.getCurrentCellStyle(graph.getSelectionCell());\n\t\t\tvar size = mxUtils.getValue(style, mxConstants.STYLE_FONTSIZE, mxConstants.DEFAULT_FONTSIZE);\n\t\t\tgraph.setCellStyles(mxConstants.STYLE_FONTSIZE, Math.max(1, size - 1),\n\t\t\t\tgraph.getSelectionCells());\n\t\t}\n\t}), null, null, Editor.ctrlKey + '+Shift + (Numpad)');\n\taction = this.addAction('increaseFontSize', mxUtils.bind(this, function()\n\t{\n\t\tif (!graph.isSelectionEmpty())\n\t\t{\n\t\t\tvar style = graph.getCurrentCellStyle(graph.getSelectionCell());\n\t\t\tvar size = mxUtils.getValue(style, mxConstants.STYLE_FONTSIZE, mxConstants.DEFAULT_FONTSIZE);\n\t\t\tgraph.setCellStyles(mxConstants.STYLE_FONTSIZE, Math.min(100, size + 1),\n\t\t\t\tgraph.getSelectionCells());\n\t\t}\n\t}), null, null, Editor.ctrlKey + '+Shift - (Numpad)');\n\n\tfunction applyClipPath(cell, clipPath, width, height, graph)\n\t{\n\t\tgraph.getModel().beginUpdate();\n\t\ttry\n\t\t{\n\t\t\tvar geo = graph.getCellGeometry(cell);\n\t\t\t\t\n\t\t\tif (geo != null && width && height) //Comparing the ratio mostly will fail since it's float\n\t\t\t{\n\t\t\t\tvar scale = width / height;\n\t\t\t\tgeo = geo.clone();\n\n\t\t\t\tif (scale > 1)\n\t\t\t\t{\n\t\t\t\t\tgeo.height = geo.width / scale;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tgeo.width = geo.height * scale;\n\t\t\t\t}\n\n\t\t\t\tgraph.getModel().setGeometry(cell, geo);\n\t\t\t}\n\n\t\t\tgraph.setCellStyles(mxConstants.STYLE_CLIP_PATH, clipPath, [cell]); //Set/unset clipPath\n\t\t\tgraph.setCellStyles(mxConstants.STYLE_ASPECT, 'fixed', [cell]);\n\t\t}\n\t\tfinally\n\t\t{\n\t\t\tgraph.getModel().endUpdate();\n\t\t}\n\t};\n\n\tthis.addAction('image...', function()\n\t{\n\t\tif (graph.isEnabled() && !graph.isCellLocked(graph.getDefaultParent()))\n\t\t{\n\t\t\tvar title = mxResources.get('image') + ' (' + mxResources.get('url') + '):';\n\t    \tvar state = graph.getView().getState(graph.getSelectionCell());\n\t    \tvar value = '', clipPath = null;\n\t    \t\n\t    \tif (state != null)\n\t    \t{\n\t    \t\tvalue = state.style[mxConstants.STYLE_IMAGE] || value;\n\t\t\t\tclipPath = state.style[mxConstants.STYLE_CLIP_PATH] || clipPath;\n\t\t    }\n\t    \t\n\t    \tvar selectionState = graph.cellEditor.saveSelection();\n\t    \t\n\t    \tui.showImageDialog(title, value, function(newValue, w, h, clipPath, cW, cH)\n\t\t\t{\n\t    \t\t// Inserts image into HTML text\n\t    \t\tif (graph.cellEditor.isContentEditing())\n\t    \t\t{\n\t    \t\t\tgraph.cellEditor.restoreSelection(selectionState);\n\t    \t\t\tgraph.insertImage(newValue, w, h);\n\t    \t\t}\n\t    \t\telse\n\t    \t\t{\n\t\t\t\t\tvar cells = graph.getSelectionCells();\n\t\t\t\t\t\n\t\t\t\t\tif (newValue != null && (newValue.length > 0 || cells.length > 0))\n\t\t\t\t\t{\n\t\t\t\t\t\tvar select = null;\n\t\t\t\t\t\t\n\t\t\t\t\t\tgraph.getModel().beginUpdate();\n\t\t\t        \ttry\n\t\t\t        \t{\n\t\t\t        \t\t// Inserts new cell if no cell is selected\n\t\t\t    \t\t\tif (cells.length == 0)\n\t\t\t    \t\t\t{\n\t\t\t    \t\t\t\tcells = [graph.insertVertex(graph.getDefaultParent(), null, '', 0, 0, w, h,\n\t\t\t    \t\t\t\t\t'shape=image;imageAspect=0;aspect=fixed;verticalLabelPosition=bottom;verticalAlign=top;')];\n\t\t\t    \t\t\t\tvar pt = graph.getCenterInsertPoint(graph.getBoundingBoxFromGeometry(cells, true));\n\t\t\t\t\t\t\t\tcells[0].geometry.x = pt.x;\n\t\t\t            \t    cells[0].geometry.y = pt.y;\n\n\t\t\t\t\t\t\t\tif (clipPath != null)\n\t\t\t\t\t\t\t\t{\n\t\t\t            \t    \tapplyClipPath(cells[0], clipPath, cW, cH, graph);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t    \t\t\t\tselect = cells;\n\t\t            \t    \tgraph.fireEvent(new mxEventObject('cellsInserted', 'cells', select));\n\t\t\t    \t\t\t}\n\t\t\t    \t\t\t\n\t\t\t        \t\tgraph.setCellStyles(mxConstants.STYLE_IMAGE, (newValue.length > 0) ? newValue : null, cells);\n\t\t\t\t\t\t\t\n\t\t\t        \t\t// Sets shape only if not already shape with image (label or image)\n\t\t\t        \t\tvar style = graph.getCurrentCellStyle(cells[0]);\n\t\t\t        \t\t\n\t\t\t        \t\tif (style[mxConstants.STYLE_SHAPE] != 'image' && style[mxConstants.STYLE_SHAPE] != 'label')\n\t\t\t        \t\t{\n\t\t\t        \t\t\tgraph.setCellStyles(mxConstants.STYLE_SHAPE, 'image', cells);\n\t\t\t        \t\t}\n\t\t\t        \t\telse if (newValue.length == 0)\n\t\t\t        \t\t{\n\t\t\t        \t\t\tgraph.setCellStyles(mxConstants.STYLE_SHAPE, null, cells);\n\t\t\t        \t\t}\n\n\t\t\t\t\t\t\tif (clipPath == null)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tgraph.setCellStyles(mxConstants.STYLE_CLIP_PATH, null, cells); //Reset clip path\n\t\t\t\t\t\t\t}\n\t\t\t\t        \t\n\t\t\t\t\t\t\tif (w != null && h != null)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tfor (var i = 0; i < cells.length; i++)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tvar cell = cells[i];\n\n\t\t\t\t\t\t\t\t\tif (graph.getCurrentCellStyle(cell)['expand'] != '0')\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tvar geo = graph.getModel().getGeometry(cell);\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tif (geo != null)\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\tgeo = geo.clone();\n\t\t\t\t\t\t\t\t\t\t\tgeo.width = w;\n\t\t\t\t\t\t\t\t\t\t\tgeo.height = h;\n\t\t\t\t\t\t\t\t\t\t\tgraph.getModel().setGeometry(cell, geo);\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\tif (clipPath != null)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tapplyClipPath(cell, clipPath, cW, cH, graph);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t        \t}\n\t\t\t        \tfinally\n\t\t\t        \t{\n\t\t\t        \t\tgraph.getModel().endUpdate();\n\t\t\t        \t}\n\t\t\t        \t\n\t\t\t        \tif (select != null)\n\t\t\t        \t{\n\t\t\t        \t\tgraph.setSelectionCells(select);\n\t\t\t        \t\tgraph.scrollCellToVisible(select[0]);\n\t\t\t        \t}\n\t\t\t\t\t}\n\t\t    \t}\n\t\t\t}, graph.cellEditor.isContentEditing(), !graph.cellEditor.isContentEditing(), true, clipPath);\n\t\t}\n\t}).isEnabled = isGraphEnabled;\n\t\n\tthis.addAction('crop...', function()\n\t{\n\t\tvar cell = graph.getSelectionCell();\n\n\t\tif (graph.isEnabled() && !graph.isCellLocked(graph.getDefaultParent()) && cell != null)\n\t\t{\n\t\t\tvar style = graph.getCurrentCellStyle(cell);\n\n\t    \tvar value = style[mxConstants.STYLE_IMAGE], shape = style[mxConstants.STYLE_SHAPE];\n\t    \t\n\t\t\tif (!value || shape != 'image')\n\t\t\t{\n\t\t\t\treturn; //Can only process an existing image\n\t\t\t}\n\t\t\t\n\t\t\tvar dlg = new CropImageDialog(ui, value, style[mxConstants.STYLE_CLIP_PATH], function(clipPath, width, height)\n\t    \t{\n\t\t\t\tapplyClipPath(cell, clipPath, width, height, graph);\n\t    \t});\n\t    \t\n\t    \tui.showDialog(dlg.container, 300, 390, true, true);\n\t\t}\n\t}).isEnabled = isGraphEnabled;\n\taction = this.addAction('layers', mxUtils.bind(this, function()\n\t{\n\t\tif (this.layersWindow == null)\n\t\t{\n\t\t\t// LATER: Check outline window for initial placement\n\t\t\tthis.layersWindow = new LayersWindow(ui, document.body.offsetWidth - 280, 120, 212, 200);\n\t\t\tthis.layersWindow.window.addListener('show', mxUtils.bind(this, function()\n\t\t\t{\n\t\t\t\tui.fireEvent(new mxEventObject('layers'));\n\t\t\t}));\n\t\t\tthis.layersWindow.window.addListener('hide', function()\n\t\t\t{\n\t\t\t\tui.fireEvent(new mxEventObject('layers'));\n\t\t\t});\n\t\t\tthis.layersWindow.window.setVisible(true);\n\t\t\tui.fireEvent(new mxEventObject('layers'));\n\t\t\t\n\t\t\tthis.layersWindow.init();\n\t\t}\n\t\telse\n\t\t{\n\t\t\tthis.layersWindow.window.setVisible(!this.layersWindow.window.isVisible());\n\t\t}\n\t}), null, null, Editor.ctrlKey + '+Shift+L');\n\taction.setToggleAction(true);\n\taction.setSelectedCallback(mxUtils.bind(this, function() { return this.layersWindow != null && this.layersWindow.window.isVisible(); }));\n\taction = this.addAction('format', mxUtils.bind(this, function()\n\t{\n\t\tui.toggleFormatPanel();\n\t}), null, null, Editor.ctrlKey + '+Shift+P');\n\taction.setToggleAction(true);\n\taction.setSelectedCallback(mxUtils.bind(this, function() { return ui.isFormatPanelVisible(); }));\n\taction = this.addAction('outline', mxUtils.bind(this, function()\n\t{\n\t\tif (this.outlineWindow == null)\n\t\t{\n\t\t\t// LATER: Check layers window for initial placement\n\t\t\tthis.outlineWindow = new OutlineWindow(ui, document.body.offsetWidth - 260, 100, 180, 180);\n\t\t\tthis.outlineWindow.window.addListener('show', mxUtils.bind(this, function()\n\t\t\t{\n\t\t\t\tui.fireEvent(new mxEventObject('outline'));\n\t\t\t}));\n\t\t\tthis.outlineWindow.window.addListener('hide', function()\n\t\t\t{\n\t\t\t\tui.fireEvent(new mxEventObject('outline'));\n\t\t\t});\n\t\t\tthis.outlineWindow.window.setVisible(true);\n\t\t\tui.fireEvent(new mxEventObject('outline'));\n\t\t}\n\t\telse\n\t\t{\n\t\t\tthis.outlineWindow.window.setVisible(!this.outlineWindow.window.isVisible());\n\t\t}\n\t}), null, null, Editor.ctrlKey + '+Shift+O');\n\t\n\taction.setToggleAction(true);\n\taction.setSelectedCallback(mxUtils.bind(this, function() { return this.outlineWindow != null && this.outlineWindow.window.isVisible(); }));\n\n\tthis.addAction('editConnectionPoints...', function()\n\t{\n\t\tvar cell = graph.getSelectionCell();\n\n\t\tif (graph.isEnabled() && !graph.isCellLocked(graph.getDefaultParent()) && cell != null)\n\t\t{\n\t\t\tvar dlg = new ConnectionPointsDialog(ui, cell);\n\t    \tui.showDialog(dlg.container, 350, 450, true, false, function() \n\t\t\t{\n\t\t\t\tdlg.destroy();\n\t\t\t});\n\t\t\tdlg.init();\n\t\t}\n\t}, null, null, 'Alt+Shift+Q').isEnabled = isGraphEnabled;\n};\n\n/**\n * Registers the given action under the given name.\n */\nActions.prototype.addAction = function(key, funct, enabled, iconCls, shortcut)\n{\n\tvar title;\n\t\n\tif (key.substring(key.length - 3) == '...')\n\t{\n\t\tkey = key.substring(0, key.length - 3);\n\t\ttitle = mxResources.get(key) + '...';\n\t}\n\telse\n\t{\n\t\ttitle = mxResources.get(key);\n\t}\n\t\n\treturn this.put(key, new Action(title, funct, enabled, iconCls, shortcut));\n};\n\n/**\n * Registers the given action under the given name.\n */\nActions.prototype.put = function(name, action)\n{\n\tthis.actions[name] = action;\n\t\n\treturn action;\n};\n\n/**\n * Returns the action for the given name or null if no such action exists.\n */\nActions.prototype.get = function(name)\n{\n\treturn this.actions[name];\n};\n\n/**\n * Constructs a new action for the given parameters.\n */\nfunction Action(label, funct, enabled, iconCls, shortcut)\n{\n\tmxEventSource.call(this);\n\tthis.label = label;\n\tthis.funct = this.createFunction(funct);\n\tthis.enabled = (enabled != null) ? enabled : true;\n\tthis.iconCls = iconCls;\n\tthis.shortcut = shortcut;\n\tthis.visible = true;\n};\n\n// Action inherits from mxEventSource\nmxUtils.extend(Action, mxEventSource);\n\n/**\n * Sets the enabled state of the action and fires a stateChanged event.\n */\nAction.prototype.createFunction = function(funct)\n{\n\treturn funct;\n};\n\n/**\n * Sets the enabled state of the action and fires a stateChanged event.\n */\nAction.prototype.setEnabled = function(value)\n{\n\tif (this.enabled != value)\n\t{\n\t\tthis.enabled = value;\n\t\tthis.fireEvent(new mxEventObject('stateChanged'));\n\t}\n};\n\n/**\n * Sets the enabled state of the action and fires a stateChanged event.\n */\nAction.prototype.isEnabled = function()\n{\n\treturn this.enabled;\n};\n\n/**\n * Sets the enabled state of the action and fires a stateChanged event.\n */\nAction.prototype.setToggleAction = function(value)\n{\n\tthis.toggleAction = value;\n};\n\n/**\n * Sets the enabled state of the action and fires a stateChanged event.\n */\nAction.prototype.setSelectedCallback = function(funct)\n{\n\tthis.selectedCallback = funct;\n};\n\n/**\n * Sets the enabled state of the action and fires a stateChanged event.\n */\nAction.prototype.isSelected = function()\n{\n\treturn this.selectedCallback();\n};\n"
  },
  {
    "path": "static/cherry/drawio_demo/Dialogs.js",
    "content": "/**\n * Copyright (c) 2006-2012, JGraph Ltd\n */\n/**\n * Constructs a new open dialog.\n */\nvar OpenDialog = function()\n{\n\tvar iframe = document.createElement('iframe');\n\tiframe.style.backgroundColor = 'transparent';\n\tiframe.allowTransparency = 'true';\n\tiframe.style.borderStyle = 'none';\n\tiframe.style.borderWidth = '0px';\n\tiframe.style.overflow = 'hidden';\n\tiframe.style.maxWidth = '100%';\n\tiframe.frameBorder = '0';\n\t\n\tvar dx = 0;\n\tiframe.setAttribute('width', (((Editor.useLocalStorage) ? 640 : 320) + dx) + 'px');\n\tiframe.setAttribute('height', (((Editor.useLocalStorage) ? 480 : 220) + dx) + 'px');\n\tiframe.setAttribute('src', OPEN_FORM);\n\t\n\tthis.container = iframe;\n};\n\n/**\n * Constructs a new color dialog.\n */\nvar ColorDialog = function(editorUi, color, apply, cancelFn)\n{\n\tthis.editorUi = editorUi;\n\t\n\tvar input = document.createElement('input');\n\tinput.style.marginBottom = '10px';\n\t\n\t// Required for picker to render in IE\n\tif (mxClient.IS_IE)\n\t{\n\t\tinput.style.marginTop = '10px';\n\t\tdocument.body.appendChild(input);\n\t}\n\n\tvar applyFunction = (apply != null) ? apply : this.createApplyFunction();\n\t\n\tfunction doApply()\n\t{\n\t\tvar color = input.value;\n\t\t\n\t\t// Blocks any non-alphabetic chars in colors\n\t\tif (/(^#?[a-zA-Z0-9]*$)/.test(color))\n\t\t{\n\t\t\tif (color != 'none' && color.charAt(0) != '#')\n\t\t\t{\n\t\t\t\tcolor = '#' + color;\n\t\t\t}\n\n\t\t\tColorDialog.addRecentColor((color != 'none') ? color.substring(1) : color, 12);\n\t\t\tapplyFunction(color);\n\t\t\teditorUi.hideDialog();\n\t\t}\n\t\telse\n\t\t{\n\t\t\teditorUi.handleError({message: mxResources.get('invalidInput')});\t\n\t\t}\n\t};\n\t\n\tthis.init = function()\n\t{\n\t\tif (!mxClient.IS_TOUCH)\n\t\t{\n\t\t\tinput.focus();\n\t\t}\n\t};\n\n\tvar picker = new mxJSColor.color(input);\n\tpicker.pickerOnfocus = false;\n\tpicker.showPicker();\n\n\tvar div = document.createElement('div');\n\tmxJSColor.picker.box.style.position = 'relative';\n\tmxJSColor.picker.box.style.width = '230px';\n\tmxJSColor.picker.box.style.height = '100px';\n\tmxJSColor.picker.box.style.paddingBottom = '10px';\n\tdiv.appendChild(mxJSColor.picker.box);\n\n\tvar center = document.createElement('center');\n\t\n\tfunction createRecentColorTable()\n\t{\n\t\tvar table = addPresets((ColorDialog.recentColors.length == 0) ? ['FFFFFF'] :\n\t\t\t\t\tColorDialog.recentColors, 11, 'FFFFFF', true);\n\t\ttable.style.marginBottom = '8px';\n\t\t\n\t\treturn table;\n\t};\n\t\n\tvar addPresets = mxUtils.bind(this, function(presets, rowLength, defaultColor, addResetOption)\n\t{\n\t\trowLength = (rowLength != null) ? rowLength : 12;\n\t\tvar table = document.createElement('table');\n\t\ttable.style.borderCollapse = 'collapse';\n\t\ttable.setAttribute('cellspacing', '0');\n\t\ttable.style.marginBottom = '20px';\n\t\ttable.style.cellSpacing = '0px';\n\t\ttable.style.marginLeft = '1px';\n\t\tvar tbody = document.createElement('tbody');\n\t\ttable.appendChild(tbody);\n\n\t\tvar rows = presets.length / rowLength;\n\t\t\n\t\tfor (var row = 0; row < rows; row++)\n\t\t{\n\t\t\tvar tr = document.createElement('tr');\n\t\t\t\n\t\t\tfor (var i = 0; i < rowLength; i++)\n\t\t\t{\n\t\t\t\t(mxUtils.bind(this, function(clr)\n\t\t\t\t{\n\t\t\t\t\tvar td = document.createElement('td');\n\t\t\t\t\ttd.style.border = '0px solid black';\n\t\t\t\t\ttd.style.padding = '0px';\n\t\t\t\t\ttd.style.width = '16px';\n\t\t\t\t\ttd.style.height = '16px';\n\t\t\t\t\t\n\t\t\t\t\tif (clr == null)\n\t\t\t\t\t{\n\t\t\t\t\t\tclr = defaultColor;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (clr != null)\n\t\t\t\t\t{\n\t\t\t\t\t\ttd.style.borderWidth = '1px';\n\n\t\t\t\t\t\tif (clr == 'none')\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\ttd.style.background = 'url(\\'' + Dialog.prototype.noColorImage + '\\')';\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\ttd.style.backgroundColor = '#' + clr;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tvar name = this.colorNames[clr.toUpperCase()];\n\n\t\t\t\t\t\tif (name != null)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\ttd.setAttribute('title', name);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\ttr.appendChild(td);\n\n\t\t\t\t\tif (clr != null)\n\t\t\t\t\t{\n\t\t\t\t\t\ttd.style.cursor = 'pointer';\n\t\t\t\t\t\t\n\t\t\t\t\t\tmxEvent.addListener(td, 'click', function()\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif (clr == 'none')\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tpicker.fromString('ffffff');\n\t\t\t\t\t\t\t\tinput.value = 'none';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tpicker.fromString(clr);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\t\t\t\t\t\n\t\t\t\t\t\tmxEvent.addListener(td, 'dblclick', doApply);\n\t\t\t\t\t}\n\t\t\t\t}))(presets[row * rowLength + i]);\n\t\t\t}\n\t\t\t\n\t\t\ttbody.appendChild(tr);\n\t\t}\n\t\t\n\t\tif (addResetOption)\n\t\t{\n\t\t\tvar td = document.createElement('td');\n\t\t\ttd.setAttribute('title', mxResources.get('reset'));\n\t\t\ttd.style.border = '1px solid black';\n\t\t\ttd.style.padding = '0px';\n\t\t\ttd.style.width = '16px';\n\t\t\ttd.style.height = '16px';\n\t\t\ttd.style.backgroundImage = 'url(\\'' + Dialog.prototype.closeImage + '\\')';\n\t\t\ttd.style.backgroundPosition = 'center center';\n\t\t\ttd.style.backgroundRepeat = 'no-repeat';\n\t\t\ttd.style.cursor = 'pointer';\n\t\t\t\n\t\t\ttr.appendChild(td);\n\n\t\t\tmxEvent.addListener(td, 'click', function()\n\t\t\t{\n\t\t\t\tColorDialog.resetRecentColors();\n\t\t\t\ttable.parentNode.replaceChild(createRecentColorTable(), table);\n\t\t\t});\n\t\t}\n\t\t\n\t\tcenter.appendChild(table);\n\t\t\n\t\treturn table;\n\t});\n\n\tdiv.appendChild(input);\n\n\tif (!mxClient.IS_IE && !mxClient.IS_IE11)\n\t{\n\t\tinput.style.width = '182px';\n\n\t\tvar clrInput = document.createElement('input');\n\t\tclrInput.setAttribute('type', 'color');\n\t\tclrInput.style.position = 'relative';\n\t\tclrInput.style.visibility = 'hidden';\n\t\tclrInput.style.top = '10px';\n\t\tclrInput.style.width = '0px';\n\t\tclrInput.style.height = '0px';\n\t\tclrInput.style.border = 'none';\n\t\t\n\t\tdiv.style.whiteSpace = 'nowrap';\n\t\tdiv.appendChild(clrInput);\n\n\t\tvar dropperBtn = mxUtils.button('', function()\n\t\t{\n\t\t\t// LATER: Check if clrInput is expanded\n\t\t\tif (document.activeElement == clrInput)\n\t\t\t{\n\t\t\t\tinput.focus();\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tclrInput.value = '#' + input.value;\n\t\t\t\tclrInput.click();\n\t\t\t}\n\t\t});\n\n\t\tvar dropper = document.createElement('img');\n\t\tdropper.src = Editor.colorDropperImage;\n\t\tdropper.className = 'geAdaptiveAsset';\n\t\tdropper.style.position = 'relative';\n\t\tdropper.style.verticalAlign = 'middle';\n\t\tdropper.style.width = 'auto';\n\t\tdropper.style.height = '14px';\n\n\t\tdropperBtn.appendChild(dropper);\n\t\tdiv.appendChild(dropperBtn);\n\n\t\tmxEvent.addListener(clrInput, 'change', function()\n\t\t{\n\t\t\tpicker.fromString(clrInput.value.substring(1));\n\t\t});\n\t}\n\telse\n\t{\n\t\tinput.style.width = '216px';\n\t}\n\n\tmxUtils.br(div);\n\t\n\t// Adds recent colors\n\tcreateRecentColorTable();\n\t\t\n\t// Adds presets\n\tvar table = addPresets(this.presetColors);\n\ttable.style.marginBottom = '8px';\n\ttable = addPresets(this.defaultColors);\n\ttable.style.marginBottom = '16px';\n\n\tdiv.appendChild(center);\n\n\tvar buttons = document.createElement('div');\n\tbuttons.style.textAlign = 'right';\n\tbuttons.style.whiteSpace = 'nowrap';\n\t\n\tvar cancelBtn = mxUtils.button(mxResources.get('cancel'), function()\n\t{\n\t\teditorUi.hideDialog();\n\t\t\n\t\tif (cancelFn != null)\n\t\t{\n\t\t\tcancelFn();\n\t\t}\n\t});\n\tcancelBtn.className = 'geBtn';\n\n\tif (editorUi.editor.cancelFirst)\n\t{\n\t\tbuttons.appendChild(cancelBtn);\n\t}\n\t\n\tvar applyBtn = mxUtils.button(mxResources.get('apply'), doApply);\n\tapplyBtn.className = 'geBtn gePrimaryBtn';\n\tbuttons.appendChild(applyBtn);\n\t\n\tif (!editorUi.editor.cancelFirst)\n\t{\n\t\tbuttons.appendChild(cancelBtn);\n\t}\n\t\n\tif (color != null)\n\t{\n\t\tif (color == 'none')\n\t\t{\n\t\t\tpicker.fromString('ffffff');\n\t\t\tinput.value = 'none';\n\t\t}\n\t\telse\n\t\t{\n\t\t\tpicker.fromString(color);\n\t\t}\n\t}\n\t\n\tdiv.appendChild(buttons);\n\tthis.picker = picker;\n\tthis.colorInput = input;\n\n\t// LATER: Only fires if input if focused, should always\n\t// fire if this dialog is showing.\n\tmxEvent.addListener(div, 'keydown', function(e)\n\t{\n\t\tif (e.keyCode == 27)\n\t\t{\n\t\t\teditorUi.hideDialog();\n\t\t\t\n\t\t\tif (cancelFn != null)\n\t\t\t{\n\t\t\t\tcancelFn();\n\t\t\t}\n\t\t\t\n\t\t\tmxEvent.consume(e);\n\t\t}\n\t});\n\t\n\tthis.container = div;\n};\n\n/**\n * Creates function to apply value\n */\nColorDialog.prototype.presetColors = ['E6D0DE', 'CDA2BE', 'B5739D', 'E1D5E7', 'C3ABD0', 'A680B8', 'D4E1F5', 'A9C4EB', '7EA6E0', 'D5E8D4', '9AC7BF', '67AB9F', 'D5E8D4', 'B9E0A5', '97D077', 'FFF2CC', 'FFE599', 'FFD966', 'FFF4C3', 'FFCE9F', 'FFB570', 'F8CECC', 'F19C99', 'EA6B66']; \n\n/**\n * Creates function to apply value\n */\n ColorDialog.prototype.colorNames = {};\n\n/**\n * Creates function to apply value\n */\nColorDialog.prototype.defaultColors = ['none', 'FFFFFF', 'E6E6E6', 'CCCCCC', 'B3B3B3', '999999', '808080', '666666', '4D4D4D', '333333', '1A1A1A', '000000', 'FFCCCC', 'FFE6CC', 'FFFFCC', 'E6FFCC', 'CCFFCC', 'CCFFE6', 'CCFFFF', 'CCE5FF', 'CCCCFF', 'E5CCFF', 'FFCCFF', 'FFCCE6',\n\t\t'FF9999', 'FFCC99', 'FFFF99', 'CCFF99', '99FF99', '99FFCC', '99FFFF', '99CCFF', '9999FF', 'CC99FF', 'FF99FF', 'FF99CC', 'FF6666', 'FFB366', 'FFFF66', 'B3FF66', '66FF66', '66FFB3', '66FFFF', '66B2FF', '6666FF', 'B266FF', 'FF66FF', 'FF66B3', 'FF3333', 'FF9933', 'FFFF33',\n\t\t'99FF33', '33FF33', '33FF99', '33FFFF', '3399FF', '3333FF', '9933FF', 'FF33FF', 'FF3399', 'FF0000', 'FF8000', 'FFFF00', '80FF00', '00FF00', '00FF80', '00FFFF', '007FFF', '0000FF', '7F00FF', 'FF00FF', 'FF0080', 'CC0000', 'CC6600', 'CCCC00', '66CC00', '00CC00', '00CC66',\n\t\t'00CCCC', '0066CC', '0000CC', '6600CC', 'CC00CC', 'CC0066', '990000', '994C00', '999900', '4D9900', '009900', '00994D', '009999', '004C99', '000099', '4C0099', '990099', '99004D', '660000', '663300', '666600', '336600', '006600', '006633', '006666', '003366', '000066',\n\t\t'330066', '660066', '660033', '330000', '331A00', '333300', '1A3300', '003300', '00331A', '003333', '001933', '000033', '190033', '330033', '33001A'];\n\n/**\n * Creates function to apply value\n */\nColorDialog.prototype.createApplyFunction = function()\n{\n\treturn mxUtils.bind(this, function(color)\n\t{\n\t\tvar graph = this.editorUi.editor.graph;\n\t\t\n\t\tgraph.getModel().beginUpdate();\n\t\ttry\n\t\t{\n\t\t\tgraph.setCellStyles(this.currentColorKey, color);\n\t\t\tthis.editorUi.fireEvent(new mxEventObject('styleChanged', 'keys', [this.currentColorKey],\n\t\t\t\t'values', [color], 'cells', graph.getSelectionCells()));\n\t\t}\n\t\tfinally\n\t\t{\n\t\t\tgraph.getModel().endUpdate();\n\t\t}\n\t});\n};\n\n/**\n * \n */\nColorDialog.recentColors = [];\n\n/**\n * Adds recent color for later use.\n */\nColorDialog.addRecentColor = function(color, max)\n{\n\tif (color != null)\n\t{\n\t\tmxUtils.remove(color, ColorDialog.recentColors);\n\t\tColorDialog.recentColors.splice(0, 0, color);\n\t\t\n\t\tif (ColorDialog.recentColors.length >= max)\n\t\t{\n\t\t\tColorDialog.recentColors.pop();\n\t\t}\n\t}\n};\n\n/**\n * Adds recent color for later use.\n */\nColorDialog.resetRecentColors = function()\n{\n\tColorDialog.recentColors = [];\n};\n\n/**\n * Constructs a new about dialog.\n */\nvar AboutDialog = function(editorUi)\n{\n\tvar div = document.createElement('div');\n\tdiv.setAttribute('align', 'center');\n\tvar h3 = document.createElement('h3');\n\tmxUtils.write(h3, mxResources.get('about') + ' GraphEditor');\n\tdiv.appendChild(h3);\n\tvar img = document.createElement('img');\n\timg.style.border = '0px';\n\timg.setAttribute('width', '176');\n\timg.setAttribute('width', '151');\n\timg.setAttribute('src', IMAGE_PATH + '/logo.png');\n\tdiv.appendChild(img);\n\tmxUtils.br(div);\n\tmxUtils.write(div, 'Powered by mxGraph ' + mxClient.VERSION);\n\tmxUtils.br(div);\n\tvar link = document.createElement('a');\n\tlink.setAttribute('href', 'http://www.jgraph.com/');\n\tlink.setAttribute('target', '_blank');\n\tmxUtils.write(link, 'www.jgraph.com');\n\tdiv.appendChild(link);\n\tmxUtils.br(div);\n\tmxUtils.br(div);\n\tvar closeBtn = mxUtils.button(mxResources.get('close'), function()\n\t{\n\t\teditorUi.hideDialog();\n\t});\n\tcloseBtn.className = 'geBtn gePrimaryBtn';\n\tdiv.appendChild(closeBtn);\n\t\n\tthis.container = div;\n};\n\n/**\n * Constructs a new textarea dialog.\n */\nvar TextareaDialog = function(editorUi, title, url, fn, cancelFn, cancelTitle, w, h,\n\taddButtons, noHide, noWrap, applyTitle, helpLink, customButtons, header)\n{\n\tw = (w != null) ? w : 300;\n\th = (h != null) ? h : 120;\n\tnoHide = (noHide != null) ? noHide : false;\n\n\tvar div = document.createElement('div');\n\tdiv.style.position = 'absolute';\n\tdiv.style.top = '20px';\n\tdiv.style.bottom = '20px';\n\tdiv.style.left = '20px';\n\tdiv.style.right = '20px';\n\n\tvar top = document.createElement('div');\n\n\ttop.style.position = 'absolute';\n\ttop.style.left = '0px';\n\ttop.style.right = '0px';\n\n\tvar main = top.cloneNode(false);\n\tvar buttons = top.cloneNode(false);\n\n\ttop.style.top = '0px';\n\ttop.style.height = '20px';\n\tmain.style.top = '20px';\n\tmain.style.bottom = '64px';\n\tbuttons.style.bottom = '0px';\n\tbuttons.style.height = '60px';\n\tbuttons.style.textAlign = 'center';\n\n\tmxUtils.write(top, title);\n\n\tdiv.appendChild(top);\n\tdiv.appendChild(main);\n\tdiv.appendChild(buttons);\n\n\tif (header != null)\n\t{\n\t\ttop.appendChild(header);\n\t}\n\t\n\tvar nameInput = document.createElement('textarea');\n\t\n\tif (noWrap)\n\t{\n\t\tnameInput.setAttribute('wrap', 'off');\n\t}\n\t\n\tnameInput.setAttribute('spellcheck', 'false');\n\tnameInput.setAttribute('autocorrect', 'off');\n\tnameInput.setAttribute('autocomplete', 'off');\n\tnameInput.setAttribute('autocapitalize', 'off');\n\t\n\tmxUtils.write(nameInput, url || '');\n\tnameInput.style.resize = 'none';\n\tnameInput.style.outline = 'none';\n\tnameInput.style.position = 'absolute';\n\tnameInput.style.boxSizing = 'border-box';\n\tnameInput.style.top = '0px';\n\tnameInput.style.left = '0px';\n\tnameInput.style.height = '100%';\n\tnameInput.style.width = '100%';\n\t\n\tthis.textarea = nameInput;\n\n\tthis.init = function()\n\t{\n\t\tnameInput.focus();\n\t\tnameInput.scrollTop = 0;\n\t};\n\n\tmain.appendChild(nameInput);\n\n\tif (helpLink != null)\n\t{\n\t\tvar helpBtn = mxUtils.button(mxResources.get('help'), function()\n\t\t{\n\t\t\teditorUi.editor.graph.openLink(helpLink);\n\t\t});\n\t\thelpBtn.className = 'geBtn';\n\t\t\n\t\tbuttons.appendChild(helpBtn);\n\t}\n\t\n\tif (customButtons != null)\n\t{\n\t\tfor (var i = 0; i < customButtons.length; i++)\n\t\t{\n\t\t\t(function(label, fn, title)\n\t\t\t{\n\t\t\t\tvar customBtn = mxUtils.button(label, function(e)\n\t\t\t\t{\n\t\t\t\t\tfn(e, nameInput);\n\t\t\t\t});\n\n\t\t\t\tif (title != null)\n\t\t\t\t{\n\t\t\t\t\tcustomBtn.setAttribute('title', title);\n\t\t\t\t}\n\n\t\t\t\tcustomBtn.className = 'geBtn';\n\t\t\t\t\n\t\t\t\tbuttons.appendChild(customBtn);\n\t\t\t})(customButtons[i][0], customButtons[i][1], customButtons[i][2]);\n\t\t}\n\t}\n\t\n\tvar cancelBtn = mxUtils.button(cancelTitle || mxResources.get('cancel'), function()\n\t{\n\t\teditorUi.hideDialog();\n\t\t\n\t\tif (cancelFn != null)\n\t\t{\n\t\t\tcancelFn();\n\t\t}\n\t});\n\n\tcancelBtn.setAttribute('title', 'Escape');\n\tcancelBtn.className = 'geBtn';\n\t\n\tif (editorUi.editor.cancelFirst)\n\t{\n\t\tbuttons.appendChild(cancelBtn);\n\t}\n\t\n\tif (addButtons != null)\n\t{\n\t\taddButtons(buttons, nameInput);\n\t}\n\t\n\tif (fn != null)\n\t{\n\t\tvar genericBtn = mxUtils.button(applyTitle || mxResources.get('apply'), function()\n\t\t{\n\t\t\tif (!noHide)\n\t\t\t{\n\t\t\t\teditorUi.hideDialog();\n\t\t\t}\n\t\t\t\n\t\t\tfn(nameInput.value);\n\t\t});\n\t\t\n\t\tgenericBtn.setAttribute('title', 'Ctrl+Enter');\n\t\tgenericBtn.className = 'geBtn gePrimaryBtn';\n\t\tbuttons.appendChild(genericBtn);\n\n\t\tmxEvent.addListener(nameInput, 'keypress', function(e)\n\t\t{\n\t\t\tif (e.keyCode == 13 && mxEvent.isControlDown(e))\n\t\t\t{\n\t\t\t\tgenericBtn.click();\n\t\t\t}\n\t\t});\n\t}\n\t\n\tif (!editorUi.editor.cancelFirst)\n\t{\n\t\tbuttons.appendChild(cancelBtn);\n\t}\n\n\tthis.container = div;\n};\n\n/**\n * Constructs a new edit file dialog.\n */\nvar EditDiagramDialog = function(editorUi)\n{\n\tvar div = document.createElement('div');\n\tdiv.style.textAlign = 'right';\n\tvar textarea = document.createElement('textarea');\n\ttextarea.setAttribute('wrap', 'off');\n\ttextarea.setAttribute('spellcheck', 'false');\n\ttextarea.setAttribute('autocorrect', 'off');\n\ttextarea.setAttribute('autocomplete', 'off');\n\ttextarea.setAttribute('autocapitalize', 'off');\n\ttextarea.style.overflow = 'auto';\n\ttextarea.style.resize = 'none';\n\ttextarea.style.width = '600px';\n\ttextarea.style.height = '360px';\n\ttextarea.style.marginBottom = '16px';\n\t\n\ttextarea.value = mxUtils.getPrettyXml(editorUi.editor.getGraphXml());\n\tdiv.appendChild(textarea);\n\t\n\tthis.init = function()\n\t{\n\t\ttextarea.focus();\n\t};\n\t\n\t// Enables dropping files\n\tif (Graph.fileSupport)\n\t{\n\t\tfunction handleDrop(evt)\n\t\t{\n\t\t    evt.stopPropagation();\n\t\t    evt.preventDefault();\n\t\t    \n\t\t    if (evt.dataTransfer.files.length > 0)\n\t\t    {\n    \t\t\tvar file = evt.dataTransfer.files[0];\n    \t\t\tvar reader = new FileReader();\n\t\t\t\t\n\t\t\t\treader.onload = function(e)\n\t\t\t\t{\n\t\t\t\t\ttextarea.value = e.target.result;\n\t\t\t\t};\n\t\t\t\t\n\t\t\t\treader.readAsText(file);\n    \t\t}\n\t\t    else\n\t\t    {\n\t\t    \ttextarea.value = editorUi.extractGraphModelFromEvent(evt);\n\t\t    }\n\t\t};\n\t\t\n\t\tfunction handleDragOver(evt)\n\t\t{\n\t\t\tevt.stopPropagation();\n\t\t\tevt.preventDefault();\n\t\t};\n\n\t\t// Setup the dnd listeners.\n\t\ttextarea.addEventListener('dragover', handleDragOver, false);\n\t\ttextarea.addEventListener('drop', handleDrop, false);\n\t}\n\t\n\tvar cancelBtn = mxUtils.button(mxResources.get('cancel'), function()\n\t{\n\t\teditorUi.hideDialog();\n\t});\n\tcancelBtn.className = 'geBtn';\n\t\n\tif (editorUi.editor.cancelFirst)\n\t{\n\t\tdiv.appendChild(cancelBtn);\n\t}\n\t\n\tvar select = document.createElement('select');\n\tselect.style.width = '180px';\n\tselect.className = 'geBtn';\n\n\tif (editorUi.editor.graph.isEnabled())\n\t{\n\t\tvar replaceOption = document.createElement('option');\n\t\treplaceOption.setAttribute('value', 'replace');\n\t\tmxUtils.write(replaceOption, mxResources.get('replaceExistingDrawing'));\n\t\tselect.appendChild(replaceOption);\n\t}\n\n\tvar newOption = document.createElement('option');\n\tnewOption.setAttribute('value', 'new');\n\tmxUtils.write(newOption, mxResources.get('openInNewWindow'));\n\t\n\tif (EditDiagramDialog.showNewWindowOption)\n\t{\n\t\tselect.appendChild(newOption);\n\t}\n\n\tif (editorUi.editor.graph.isEnabled())\n\t{\n\t\tvar importOption = document.createElement('option');\n\t\timportOption.setAttribute('value', 'import');\n\t\tmxUtils.write(importOption, mxResources.get('addToExistingDrawing'));\n\t\tselect.appendChild(importOption);\n\t}\n\n\tdiv.appendChild(select);\n\n\tvar okBtn = mxUtils.button(mxResources.get('ok'), function()\n\t{\n\t\t// Removes all illegal control characters before parsing\n\t\tvar data = Graph.zapGremlins(mxUtils.trim(textarea.value));\n\t\tvar error = null;\n\t\t\n\t\tif (select.value == 'new')\n\t\t{\n\t\t\teditorUi.hideDialog();\n\t\t\teditorUi.editor.editAsNew(data);\n\t\t}\n\t\telse if (select.value == 'replace')\n\t\t{\n\t\t\teditorUi.editor.graph.model.beginUpdate();\n\t\t\ttry\n\t\t\t{\n\t\t\t\teditorUi.editor.setGraphXml(mxUtils.parseXml(data).documentElement);\n\t\t\t\t// LATER: Why is hideDialog between begin-/endUpdate faster?\n\t\t\t\teditorUi.hideDialog();\n\t\t\t}\n\t\t\tcatch (e)\n\t\t\t{\n\t\t\t\terror = e;\n\t\t\t}\n\t\t\tfinally\n\t\t\t{\n\t\t\t\teditorUi.editor.graph.model.endUpdate();\t\t\t\t\n\t\t\t}\n\t\t}\n\t\telse if (select.value == 'import')\n\t\t{\n\t\t\teditorUi.editor.graph.model.beginUpdate();\n\t\t\ttry\n\t\t\t{\n\t\t\t\tvar doc = mxUtils.parseXml(data);\n\t\t\t\tvar model = new mxGraphModel();\n\t\t\t\tvar codec = new mxCodec(doc);\n\t\t\t\tcodec.decode(doc.documentElement, model);\n\t\t\t\t\n\t\t\t\tvar children = model.getChildren(model.getChildAt(model.getRoot(), 0));\n\t\t\t\teditorUi.editor.graph.setSelectionCells(editorUi.editor.graph.importCells(children));\n\t\t\t\t\n\t\t\t\t// LATER: Why is hideDialog between begin-/endUpdate faster?\n\t\t\t\teditorUi.hideDialog();\n\t\t\t}\n\t\t\tcatch (e)\n\t\t\t{\n\t\t\t\terror = e;\n\t\t\t}\n\t\t\tfinally\n\t\t\t{\n\t\t\t\teditorUi.editor.graph.model.endUpdate();\t\t\t\t\n\t\t\t}\n\t\t}\n\t\t\t\n\t\tif (error != null)\n\t\t{\n\t\t\tmxUtils.alert(error.message);\n\t\t}\n\t});\n\tokBtn.className = 'geBtn gePrimaryBtn';\n\tdiv.appendChild(okBtn);\n\t\n\tif (!editorUi.editor.cancelFirst)\n\t{\n\t\tdiv.appendChild(cancelBtn);\n\t}\n\n\tthis.container = div;\n};\n\n/**\n * \n */\nEditDiagramDialog.showNewWindowOption = true;\n\n/**\n * Constructs a new export dialog.\n */\nvar ExportDialog = function(editorUi)\n{\n\tvar graph = editorUi.editor.graph;\n\tvar bounds = graph.getGraphBounds();\n\tvar scale = graph.view.scale;\n\t\n\tvar width = Math.ceil(bounds.width / scale);\n\tvar height = Math.ceil(bounds.height / scale);\n\n\tvar row, td;\n\t\n\tvar table = document.createElement('table');\n\tvar tbody = document.createElement('tbody');\n\ttable.setAttribute('cellpadding', (mxClient.IS_SF) ? '0' : '2');\n\t\n\trow = document.createElement('tr');\n\t\n\ttd = document.createElement('td');\n\ttd.style.fontSize = '10pt';\n\ttd.style.width = '100px';\n\tmxUtils.write(td, mxResources.get('filename') + ':');\n\t\n\trow.appendChild(td);\n\t\n\tvar nameInput = document.createElement('input');\n\tnameInput.setAttribute('value', editorUi.editor.getOrCreateFilename());\n\tnameInput.style.width = '180px';\n\n\ttd = document.createElement('td');\n\ttd.appendChild(nameInput);\n\trow.appendChild(td);\n\t\n\ttbody.appendChild(row);\n\t\t\n\trow = document.createElement('tr');\n\t\n\ttd = document.createElement('td');\n\ttd.style.fontSize = '10pt';\n\tmxUtils.write(td, mxResources.get('format') + ':');\n\t\n\trow.appendChild(td);\n\t\n\tvar imageFormatSelect = document.createElement('select');\n\timageFormatSelect.style.width = '180px';\n\n\tvar pngOption = document.createElement('option');\n\tpngOption.setAttribute('value', 'png');\n\tmxUtils.write(pngOption, mxResources.get('formatPng'));\n\timageFormatSelect.appendChild(pngOption);\n\n\tvar gifOption = document.createElement('option');\n\t\n\tif (ExportDialog.showGifOption)\n\t{\n\t\tgifOption.setAttribute('value', 'gif');\n\t\tmxUtils.write(gifOption, mxResources.get('formatGif'));\n\t\timageFormatSelect.appendChild(gifOption);\n\t}\n\t\n\tvar jpgOption = document.createElement('option');\n\tjpgOption.setAttribute('value', 'jpg');\n\tmxUtils.write(jpgOption, mxResources.get('formatJpg'));\n\timageFormatSelect.appendChild(jpgOption);\n\n\tif (!editorUi.printPdfExport)\n\t{\n\t\tvar pdfOption = document.createElement('option');\n\t\tpdfOption.setAttribute('value', 'pdf');\n\t\tmxUtils.write(pdfOption, mxResources.get('formatPdf'));\n\t\timageFormatSelect.appendChild(pdfOption);\n\t}\n\n\tvar svgOption = document.createElement('option');\n\tsvgOption.setAttribute('value', 'svg');\n\tmxUtils.write(svgOption, mxResources.get('formatSvg'));\n\timageFormatSelect.appendChild(svgOption);\n\t\n\tif (ExportDialog.showXmlOption)\n\t{\n\t\tvar xmlOption = document.createElement('option');\n\t\txmlOption.setAttribute('value', 'xml');\n\t\tmxUtils.write(xmlOption, mxResources.get('formatXml'));\n\t\timageFormatSelect.appendChild(xmlOption);\n\t}\n\n\ttd = document.createElement('td');\n\ttd.appendChild(imageFormatSelect);\n\trow.appendChild(td);\n\t\n\ttbody.appendChild(row);\n\t\n\trow = document.createElement('tr');\n\n\ttd = document.createElement('td');\n\ttd.style.fontSize = '10pt';\n\tmxUtils.write(td, mxResources.get('zoom') + ' (%):');\n\t\n\trow.appendChild(td);\n\t\n\tvar zoomInput = document.createElement('input');\n\tzoomInput.setAttribute('type', 'number');\n\tzoomInput.setAttribute('value', '100');\n\tzoomInput.style.width = '180px';\n\n\ttd = document.createElement('td');\n\ttd.appendChild(zoomInput);\n\trow.appendChild(td);\n\n\ttbody.appendChild(row);\n\n\trow = document.createElement('tr');\n\n\ttd = document.createElement('td');\n\ttd.style.fontSize = '10pt';\n\tmxUtils.write(td, mxResources.get('width') + ':');\n\t\n\trow.appendChild(td);\n\t\n\tvar widthInput = document.createElement('input');\n\twidthInput.setAttribute('value', width);\n\twidthInput.style.width = '180px';\n\n\ttd = document.createElement('td');\n\ttd.appendChild(widthInput);\n\trow.appendChild(td);\n\n\ttbody.appendChild(row);\n\t\n\trow = document.createElement('tr');\n\t\n\ttd = document.createElement('td');\n\ttd.style.fontSize = '10pt';\n\tmxUtils.write(td, mxResources.get('height') + ':');\n\t\n\trow.appendChild(td);\n\t\n\tvar heightInput = document.createElement('input');\n\theightInput.setAttribute('value', height);\n\theightInput.style.width = '180px';\n\n\ttd = document.createElement('td');\n\ttd.appendChild(heightInput);\n\trow.appendChild(td);\n\n\ttbody.appendChild(row);\n\t\n\trow = document.createElement('tr');\n\t\n\ttd = document.createElement('td');\n\ttd.style.fontSize = '10pt';\n\tmxUtils.write(td, mxResources.get('dpi') + ':');\n\t\n\trow.appendChild(td);\n\t\n\tvar dpiSelect = document.createElement('select');\n\tdpiSelect.style.width = '180px';\n\n\tvar dpi100Option = document.createElement('option');\n\tdpi100Option.setAttribute('value', '100');\n\tmxUtils.write(dpi100Option, '100dpi');\n\tdpiSelect.appendChild(dpi100Option);\n\n\tvar dpi200Option = document.createElement('option');\n\tdpi200Option.setAttribute('value', '200');\n\tmxUtils.write(dpi200Option, '200dpi');\n\tdpiSelect.appendChild(dpi200Option);\n\t\n\tvar dpi300Option = document.createElement('option');\n\tdpi300Option.setAttribute('value', '300');\n\tmxUtils.write(dpi300Option, '300dpi');\n\tdpiSelect.appendChild(dpi300Option);\n\t\n\tvar dpi400Option = document.createElement('option');\n\tdpi400Option.setAttribute('value', '400');\n\tmxUtils.write(dpi400Option, '400dpi');\n\tdpiSelect.appendChild(dpi400Option);\n\t\n\tvar dpiCustOption = document.createElement('option');\n\tdpiCustOption.setAttribute('value', 'custom');\n\tmxUtils.write(dpiCustOption, mxResources.get('custom'));\n\tdpiSelect.appendChild(dpiCustOption);\n\n\tvar customDpi = document.createElement('input');\n\tcustomDpi.style.width = '180px';\n\tcustomDpi.style.display = 'none';\n\tcustomDpi.setAttribute('value', '100');\n\tcustomDpi.setAttribute('type', 'number');\n\tcustomDpi.setAttribute('min', '50');\n\tcustomDpi.setAttribute('step', '50');\n\t\n\tvar zoomUserChanged = false;\n\t\n\tmxEvent.addListener(dpiSelect, 'change', function()\n\t{\n\t\tif (this.value == 'custom')\n\t\t{\n\t\t\tthis.style.display = 'none';\n\t\t\tcustomDpi.style.display = '';\n\t\t\tcustomDpi.focus();\n\t\t}\n\t\telse\n\t\t{\n\t\t\tcustomDpi.value = this.value;\n\t\t\t\n\t\t\tif (!zoomUserChanged) \n\t\t\t{\n\t\t\t\tzoomInput.value = this.value;\n\t\t\t}\n\t\t}\n\t});\n\t\n\tmxEvent.addListener(customDpi, 'change', function()\n\t{\n\t\tvar dpi = parseInt(customDpi.value);\n\t\t\n\t\tif (isNaN(dpi) || dpi <= 0)\n\t\t{\n\t\t\tcustomDpi.style.backgroundColor = 'red';\n\t\t}\n\t\telse\n\t\t{\n\t\t\tcustomDpi.style.backgroundColor = '';\n\n\t\t\tif (!zoomUserChanged) \n\t\t\t{\n\t\t\t\tzoomInput.value = dpi;\n\t\t\t}\n\t\t}\t\n\t});\n\t\n\ttd = document.createElement('td');\n\ttd.appendChild(dpiSelect);\n\ttd.appendChild(customDpi);\n\trow.appendChild(td);\n\n\ttbody.appendChild(row);\n\t\n\trow = document.createElement('tr');\n\t\n\ttd = document.createElement('td');\n\ttd.style.fontSize = '10pt';\n\tmxUtils.write(td, mxResources.get('background') + ':');\n\t\n\trow.appendChild(td);\n\t\n\tvar transparentCheckbox = document.createElement('input');\n\ttransparentCheckbox.setAttribute('type', 'checkbox');\n\ttransparentCheckbox.checked = graph.background == null || graph.background == mxConstants.NONE;\n\n\ttd = document.createElement('td');\n\ttd.appendChild(transparentCheckbox);\n\tmxUtils.write(td, mxResources.get('transparent'));\n\t\n\trow.appendChild(td);\n\t\n\ttbody.appendChild(row);\n\t\n\trow = document.createElement('tr');\n\t\n\ttd = document.createElement('td');\n\ttd.style.fontSize = '10pt';\n\tmxUtils.write(td, mxResources.get('grid') + ':');\n\t\n\trow.appendChild(td);\n\t\n\tvar gridCheckbox = document.createElement('input');\n\tgridCheckbox.setAttribute('type', 'checkbox');\n\tgridCheckbox.checked = false;\n\n\ttd = document.createElement('td');\n\ttd.appendChild(gridCheckbox);\n\t\n\trow.appendChild(td);\n\t\n\ttbody.appendChild(row);\n\t\n\trow = document.createElement('tr');\n\n\ttd = document.createElement('td');\n\ttd.style.fontSize = '10pt';\n\tmxUtils.write(td, mxResources.get('borderWidth') + ':');\n\t\n\trow.appendChild(td);\n\t\n\tvar borderInput = document.createElement('input');\n\tborderInput.setAttribute('type', 'number');\n\tborderInput.setAttribute('value', ExportDialog.lastBorderValue);\n\tborderInput.style.width = '180px';\n\n\ttd = document.createElement('td');\n\ttd.appendChild(borderInput);\n\trow.appendChild(td);\n\n\ttbody.appendChild(row);\n\ttable.appendChild(tbody);\n\t\n\t// Handles changes in the export format\n\tfunction formatChanged()\n\t{\n\t\tvar name = nameInput.value;\n\t\tvar dot = name.lastIndexOf('.');\n\t\t\n\t\tif (dot > 0)\n\t\t{\n\t\t\tnameInput.value = name.substring(0, dot + 1) + imageFormatSelect.value;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tnameInput.value = name + '.' + imageFormatSelect.value;\n\t\t}\n\t\t\n\t\tif (imageFormatSelect.value === 'xml')\n\t\t{\n\t\t\tzoomInput.setAttribute('disabled', 'true');\n\t\t\twidthInput.setAttribute('disabled', 'true');\n\t\t\theightInput.setAttribute('disabled', 'true');\n\t\t\tborderInput.setAttribute('disabled', 'true');\n\t\t}\n\t\telse\n\t\t{\n\t\t\tzoomInput.removeAttribute('disabled');\n\t\t\twidthInput.removeAttribute('disabled');\n\t\t\theightInput.removeAttribute('disabled');\n\t\t\tborderInput.removeAttribute('disabled');\n\t\t}\n\t\t\n\t\tif (imageFormatSelect.value === 'png' || imageFormatSelect.value === 'svg' || imageFormatSelect.value === 'pdf')\n\t\t{\n\t\t\ttransparentCheckbox.removeAttribute('disabled');\n\t\t}\n\t\telse\n\t\t{\n\t\t\ttransparentCheckbox.setAttribute('disabled', 'disabled');\n\t\t}\n\t\t\n\t\tif (imageFormatSelect.value === 'png' || imageFormatSelect.value === 'jpg' || imageFormatSelect.value === 'pdf')\n\t\t{\n\t\t\tgridCheckbox.removeAttribute('disabled');\n\t\t}\n\t\telse\n\t\t{\n\t\t\tgridCheckbox.setAttribute('disabled', 'disabled');\n\t\t}\n\t\t\n\t\tif (imageFormatSelect.value === 'png')\n\t\t{\n\t\t\tdpiSelect.removeAttribute('disabled');\n\t\t\tcustomDpi.removeAttribute('disabled');\n\t\t}\n\t\telse\n\t\t{\n\t\t\tdpiSelect.setAttribute('disabled', 'disabled');\n\t\t\tcustomDpi.setAttribute('disabled', 'disabled');\n\t\t}\n\t};\n\t\n\tmxEvent.addListener(imageFormatSelect, 'change', formatChanged);\n\tformatChanged();\n\n\tfunction checkValues()\n\t{\n\t\tif (widthInput.value * heightInput.value > MAX_AREA || widthInput.value <= 0)\n\t\t{\n\t\t\twidthInput.style.backgroundColor = 'red';\n\t\t}\n\t\telse\n\t\t{\n\t\t\twidthInput.style.backgroundColor = '';\n\t\t}\n\t\t\n\t\tif (widthInput.value * heightInput.value > MAX_AREA || heightInput.value <= 0)\n\t\t{\n\t\t\theightInput.style.backgroundColor = 'red';\n\t\t}\n\t\telse\n\t\t{\n\t\t\theightInput.style.backgroundColor = '';\n\t\t}\n\t};\n\n\tmxEvent.addListener(zoomInput, 'change', function()\n\t{\n\t\tzoomUserChanged = true;\n\t\tvar s = Math.max(0, parseFloat(zoomInput.value) || 100) / 100;\n\t\tzoomInput.value = parseFloat((s * 100).toFixed(2));\n\t\t\n\t\tif (width > 0)\n\t\t{\n\t\t\twidthInput.value = Math.floor(width * s);\n\t\t\theightInput.value = Math.floor(height * s);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tzoomInput.value = '100';\n\t\t\twidthInput.value = width;\n\t\t\theightInput.value = height;\n\t\t}\n\t\t\n\t\tcheckValues();\n\t});\n\n\tmxEvent.addListener(widthInput, 'change', function()\n\t{\n\t\tvar s = parseInt(widthInput.value) / width;\n\t\t\n\t\tif (s > 0)\n\t\t{\n\t\t\tzoomInput.value = parseFloat((s * 100).toFixed(2));\n\t\t\theightInput.value = Math.floor(height * s);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tzoomInput.value = '100';\n\t\t\twidthInput.value = width;\n\t\t\theightInput.value = height;\n\t\t}\n\t\t\n\t\tcheckValues();\n\t});\n\n\tmxEvent.addListener(heightInput, 'change', function()\n\t{\n\t\tvar s = parseInt(heightInput.value) / height;\n\t\t\n\t\tif (s > 0)\n\t\t{\n\t\t\tzoomInput.value = parseFloat((s * 100).toFixed(2));\n\t\t\twidthInput.value = Math.floor(width * s);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tzoomInput.value = '100';\n\t\t\twidthInput.value = width;\n\t\t\theightInput.value = height;\n\t\t}\n\t\t\n\t\tcheckValues();\n\t});\n\t\n\trow = document.createElement('tr');\n\ttd = document.createElement('td');\n\ttd.setAttribute('align', 'right');\n\ttd.style.paddingTop = '22px';\n\ttd.colSpan = 2;\n\t\n\tvar saveBtn = mxUtils.button(mxResources.get('export'), mxUtils.bind(this, function()\n\t{\n\t\tif (parseInt(zoomInput.value) <= 0)\n\t\t{\n\t\t\tmxUtils.alert(mxResources.get('drawingEmpty'));\n\t\t}\n\t\telse\n\t\t{\n\t    \tvar name = nameInput.value;\n\t\t\tvar format = imageFormatSelect.value;\n\t    \tvar s = Math.max(0, parseFloat(zoomInput.value) || 100) / 100;\n\t\t\tvar b = Math.max(0, parseInt(borderInput.value));\n\t\t\tvar bg = graph.background;\n\t\t\tvar dpi = Math.max(1, parseInt(customDpi.value));\n\t\t\t\n\t\t\tif ((format == 'svg' || format == 'png' || format == 'pdf') && transparentCheckbox.checked)\n\t\t\t{\n\t\t\t\tbg = null;\n\t\t\t}\n\t\t\telse if (bg == null || bg == mxConstants.NONE)\n\t\t\t{\n\t\t\t\tbg = '#ffffff';\n\t\t\t}\n\t\t\t\n\t\t\tExportDialog.lastBorderValue = b;\n\t\t\tExportDialog.exportFile(editorUi, name, format, bg, s, b, dpi, gridCheckbox.checked);\n\t\t}\n\t}));\n\tsaveBtn.className = 'geBtn gePrimaryBtn';\n\t\n\tvar cancelBtn = mxUtils.button(mxResources.get('cancel'), function()\n\t{\n\t\teditorUi.hideDialog();\n\t});\n\tcancelBtn.className = 'geBtn';\n\t\n\tif (editorUi.editor.cancelFirst)\n\t{\n\t\ttd.appendChild(cancelBtn);\n\t\ttd.appendChild(saveBtn);\n\t}\n\telse\n\t{\n\t\ttd.appendChild(saveBtn);\n\t\ttd.appendChild(cancelBtn);\n\t}\n\n\trow.appendChild(td);\n\ttbody.appendChild(row);\n\ttable.appendChild(tbody);\n\tthis.container = table;\n};\n\n/**\n * Remembers last value for border.\n */\nExportDialog.lastBorderValue = 0;\n\n/**\n * Global switches for the export dialog.\n */\nExportDialog.showGifOption = true;\n\n/**\n * Global switches for the export dialog.\n */\nExportDialog.showXmlOption = true;\n\n/**\n * Hook for getting the export format. Returns null for the default\n * intermediate XML export format or a function that returns the\n * parameter and value to be used in the request in the form\n * key=value, where value should be URL encoded.\n */\nExportDialog.exportFile = function(editorUi, name, format, bg, s, b, dpi, grid)\n{\n\tvar graph = editorUi.editor.graph;\n\t\n\tif (format == 'xml')\n\t{\n    \tExportDialog.saveLocalFile(editorUi, mxUtils.getXml(editorUi.editor.getGraphXml()), name, format);\n\t}\n    else if (format == 'svg')\n\t{\n\t\tExportDialog.saveLocalFile(editorUi, mxUtils.getXml(graph.getSvg(bg, s, b)), name, format);\n\t}\n    else\n    {\n    \tvar bounds = graph.getGraphBounds();\n    \t\n\t\t// New image export\n\t\tvar xmlDoc = mxUtils.createXmlDocument();\n\t\tvar root = xmlDoc.createElement('output');\n\t\txmlDoc.appendChild(root);\n\t\t\n\t    // Renders graph. Offset will be multiplied with state's scale when painting state.\n\t\tvar xmlCanvas = new mxXmlCanvas2D(root);\n\t\txmlCanvas.translate(Math.floor((b / s - bounds.x) / graph.view.scale),\n\t\t\tMath.floor((b / s - bounds.y) / graph.view.scale));\n\t\txmlCanvas.scale(s / graph.view.scale);\n\t\t\n\t\tvar imgExport = new mxImageExport()\n\t    imgExport.drawState(graph.getView().getState(graph.model.root), xmlCanvas);\n\t    \n\t\t// Puts request data together\n\t\tvar param = 'xml=' + encodeURIComponent(mxUtils.getXml(root));\n\t\tvar w = Math.ceil(bounds.width * s / graph.view.scale + 2 * b);\n\t\tvar h = Math.ceil(bounds.height * s / graph.view.scale + 2 * b);\n\t\t\n\t\t// Requests image if request is valid\n\t\tif (param.length <= MAX_REQUEST_SIZE && w * h < MAX_AREA)\n\t\t{\n\t\t\teditorUi.hideDialog();\n\t\t\tvar req = new mxXmlRequest(EXPORT_URL, 'format=' + format +\n\t\t\t\t'&filename=' + encodeURIComponent(name) +\n\t\t\t\t'&bg=' + ((bg != null) ? bg : 'none') +\n\t\t\t\t'&w=' + w + '&h=' + h + '&' + param +\n\t\t\t\t'&dpi=' + dpi);\n\t\t\treq.simulate(document, '_blank');\n\t\t}\n\t\telse\n\t\t{\n\t\t\tmxUtils.alert(mxResources.get('drawingTooLarge'));\n\t\t}\n\t}\n};\n\n/**\n * Hook for getting the export format. Returns null for the default\n * intermediate XML export format or a function that returns the\n * parameter and value to be used in the request in the form\n * key=value, where value should be URL encoded.\n */\nExportDialog.saveLocalFile = function(editorUi, data, filename, format)\n{\n\tif (data.length < MAX_REQUEST_SIZE)\n\t{\n\t\teditorUi.hideDialog();\n\t\tvar req = new mxXmlRequest(SAVE_URL, 'xml=' + encodeURIComponent(data) + '&filename=' +\n\t\t\tencodeURIComponent(filename) + '&format=' + format);\n\t\treq.simulate(document, '_blank');\n\t}\n\telse\n\t{\n\t\tmxUtils.alert(mxResources.get('drawingTooLarge'));\n\t\tmxUtils.popup(xml);\n\t}\n};\n\n/**\n * Constructs a new metadata dialog.\n */\nvar EditDataDialog = function(ui, cell)\n{\n\tvar div = document.createElement('div');\n\tvar graph = ui.editor.graph;\n\t\n\tvar value = graph.getModel().getValue(cell);\n\t\n\t// Converts the value to an XML node\n\tif (!mxUtils.isNode(value))\n\t{\n\t\tvar doc = mxUtils.createXmlDocument();\n\t\tvar obj = doc.createElement('object');\n\t\tobj.setAttribute('label', value || '');\n\t\tvalue = obj;\n\t}\n\t\n\tvar meta = {};\n\t\n\ttry\n\t{\n\t\tvar temp = mxUtils.getValue(ui.editor.graph.getCurrentCellStyle(cell), 'metaData', null);\n\t\t\n\t\tif (temp != null)\n\t\t{\n\t\t\tmeta = JSON.parse(temp);\n\t\t}\n\t}\n\tcatch (e)\n\t{\n\t\t// ignore\n\t}\n\t\n\t// Creates the dialog contents\n\tvar form = new mxForm('properties');\n\tform.table.style.width = '100%';\n\n\tvar attrs = value.attributes;\n\tvar names = [];\n\tvar texts = [];\n\tvar count = 0;\n\n\tvar id = (EditDataDialog.getDisplayIdForCell != null) ?\n\t\tEditDataDialog.getDisplayIdForCell(ui, cell) : null;\n\t\n\tvar addRemoveButton = function(text, name)\n\t{\n\t\tvar wrapper = document.createElement('div');\n\t\twrapper.style.position = 'relative';\n\t\twrapper.style.paddingRight = '20px';\n\t\twrapper.style.boxSizing = 'border-box';\n\t\twrapper.style.width = '100%';\n\t\t\n\t\tvar removeAttr = document.createElement('a');\n\t\tvar img = mxUtils.createImage(Dialog.prototype.closeImage);\n\t\timg.style.height = '9px';\n\t\timg.style.fontSize = '9px';\n\t\timg.style.marginBottom = (mxClient.IS_IE11) ? '-1px' : '5px';\n\t\t\n\t\tremoveAttr.className = 'geButton';\n\t\tremoveAttr.setAttribute('title', mxResources.get('delete'));\n\t\tremoveAttr.style.position = 'absolute';\n\t\tremoveAttr.style.top = '4px';\n\t\tremoveAttr.style.right = '0px';\n\t\tremoveAttr.style.margin = '0px';\n\t\tremoveAttr.style.width = '9px';\n\t\tremoveAttr.style.height = '9px';\n\t\tremoveAttr.style.cursor = 'pointer';\n\t\tremoveAttr.appendChild(img);\n\t\t\n\t\tvar removeAttrFn = (function(name)\n\t\t{\n\t\t\treturn function()\n\t\t\t{\n\t\t\t\tvar count = 0;\n\t\t\t\t\n\t\t\t\tfor (var j = 0; j < names.length; j++)\n\t\t\t\t{\n\t\t\t\t\tif (names[j] == name)\n\t\t\t\t\t{\n\t\t\t\t\t\ttexts[j] = null;\n\t\t\t\t\t\tform.table.deleteRow(count + ((id != null) ? 1 : 0));\n\t\t\t\t\t\t\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif (texts[j] != null)\n\t\t\t\t\t{\n\t\t\t\t\t\tcount++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t};\n\t\t})(name);\n\t\t\n\t\tmxEvent.addListener(removeAttr, 'click', removeAttrFn);\n\t\t\n\t\tvar parent = text.parentNode;\n\t\twrapper.appendChild(text);\n\t\twrapper.appendChild(removeAttr);\n\t\tparent.appendChild(wrapper);\n\t};\n\t\n\tvar addTextArea = function(index, name, value)\n\t{\n\t\tnames[index] = name;\n\t\ttexts[index] = form.addTextarea(names[count] + ':', value, 2);\n\t\ttexts[index].style.width = '100%';\n\t\t\n\t\tif (value.indexOf('\\n') > 0)\n\t\t{\n\t\t\ttexts[index].setAttribute('rows', '2');\n\t\t}\n\t\t\n\t\taddRemoveButton(texts[index], name);\n\t\t\n\t\tif (meta[name] != null && meta[name].editable == false)\n\t\t{\n\t\t\ttexts[index].setAttribute('disabled', 'disabled');\n\t\t}\n\t};\n\t\n\tvar temp = [];\n\tvar isLayer = graph.getModel().getParent(cell) == graph.getModel().getRoot();\n\n\tfor (var i = 0; i < attrs.length; i++)\n\t{\n\t\tif ((attrs[i].nodeName != 'label' || Graph.translateDiagram ||\n\t\t\tisLayer) && attrs[i].nodeName != 'placeholders')\n\t\t{\n\t\t\ttemp.push({name: attrs[i].nodeName, value: attrs[i].nodeValue});\n\t\t}\n\t}\n\t\n\t// Sorts by name\n\ttemp.sort(function(a, b)\n\t{\n\t    if (a.name < b.name)\n\t    {\n\t    \treturn -1;\n\t    }\n\t    else if (a.name > b.name)\n\t    {\n\t    \treturn 1;\n\t    }\n\t    else\n\t    {\n\t    \treturn 0;\n\t    }\n\t});\n\n\tif (id != null)\n\t{\t\n\t\tvar text = document.createElement('div');\n\t\ttext.style.width = '100%';\n\t\ttext.style.fontSize = '11px';\n\t\ttext.style.textAlign = 'center';\n\t\tmxUtils.write(text, id);\n\t\t\n\t\tvar idInput = form.addField(mxResources.get('id') + ':', text);\n\t\t\n\t\tmxEvent.addListener(text, 'dblclick', function(evt)\n\t\t{\n\t\t\tvar dlg = new FilenameDialog(ui, id, mxResources.get('apply'), mxUtils.bind(this, function(value)\n\t\t\t{\n\t\t\t\tif (value != null && value.length > 0 && value != id)\n\t\t\t\t{\n\t\t\t\t\tif (graph.model.isRoot(cell))\n\t\t\t\t\t{\n\t\t\t\t\t\tvar page = ui.getPageById(id);\n\n\t\t\t\t\t\tif (page != null)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif (ui.getPageById(value) == null)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tvar index = ui.getPageIndex(page);\n\n\t\t\t\t\t\t\t\tif (index >= 0)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tui.removePage(page);\n\t\t\t\t\t\t\t\t\tpage.node.setAttribute('id', value);\n\t\t\t\t\t\t\t\t\tid = value;\n\t\t\t\t\t\t\t\t\tidInput.innerHTML = mxUtils.htmlEntities(value);\n\t\t\t\t\t\t\t\t\tui.insertPage(page, index);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tui.handleError({message: mxResources.get('alreadyExst', [mxResources.get('page')])});\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tif (graph.getModel().getCell(value) == null)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tgraph.getModel().cellRemoved(cell);\n\t\t\t\t\t\t\tcell.setId(value);\n\t\t\t\t\t\t\tid = value;\n\t\t\t\t\t\t\tidInput.innerHTML = mxUtils.htmlEntities(value);\n\t\t\t\t\t\t\tgraph.getModel().cellAdded(cell);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tui.handleError({message: mxResources.get('alreadyExst', [value])});\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}), mxResources.get('id'), null, null, null, null, null, null, 200);\n\t\t\tui.showDialog(dlg.container, 300, 80, true, true);\n\t\t\tdlg.init();\n\t\t});\n\t}\n\t\n\tfor (var i = 0; i < temp.length; i++)\n\t{\n\t\taddTextArea(count, temp[i].name, temp[i].value);\n\t\tcount++;\n\t}\n\t\n\tvar top = document.createElement('div');\n\ttop.style.position = 'absolute';\n\ttop.style.top = '30px';\n\ttop.style.left = '30px';\n\ttop.style.right = '30px';\n\ttop.style.bottom = '80px';\n\ttop.style.overflowY = 'auto';\n\t\n\ttop.appendChild(form.table);\n\n\tvar newProp = document.createElement('div');\n\tnewProp.style.display = 'flex';\n\tnewProp.style.alignItems = 'center';\n\tnewProp.style.boxSizing = 'border-box';\n\tnewProp.style.paddingRight = '160px';\n\tnewProp.style.whiteSpace = 'nowrap';\n\tnewProp.style.marginTop = '6px';\n\tnewProp.style.width = '100%';\n\t\n\tvar nameInput = document.createElement('input');\n\tnameInput.setAttribute('placeholder', mxResources.get('enterPropertyName'));\n\tnameInput.setAttribute('type', 'text');\n\tnameInput.setAttribute('size', (mxClient.IS_IE || mxClient.IS_IE11) ? '36' : '40');\n\tnameInput.style.boxSizing = 'border-box';\n\tnameInput.style.borderWidth = '1px';\n\tnameInput.style.borderStyle = 'solid';\n\tnameInput.style.marginLeft = '2px';\n\tnameInput.style.padding = '4px';\n\tnameInput.style.width = '100%';\n\t\n\tnewProp.appendChild(nameInput);\n\ttop.appendChild(newProp);\n\tdiv.appendChild(top);\n\t\n\tvar addBtn = mxUtils.button(mxResources.get('addProperty'), function()\n\t{\n\t\tvar name = nameInput.value;\n\n\t\t// Avoid ':' in attribute names which seems to be valid in Chrome\n\t\tif (name.length > 0 && name != 'label' && name != 'id' &&\n\t\t\tname != 'placeholders' && name.indexOf(':') < 0)\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\tvar idx = mxUtils.indexOf(names, name);\n\t\t\t\t\n\t\t\t\tif (idx >= 0 && texts[idx] != null)\n\t\t\t\t{\n\t\t\t\t\ttexts[idx].focus();\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t// Checks if the name is valid\n\t\t\t\t\tvar clone = value.cloneNode(false);\n\t\t\t\t\tclone.setAttribute(name, '');\n\t\t\t\t\t\n\t\t\t\t\tif (idx >= 0)\n\t\t\t\t\t{\n\t\t\t\t\t\tnames.splice(idx, 1);\n\t\t\t\t\t\ttexts.splice(idx, 1);\n\t\t\t\t\t}\n\n\t\t\t\t\tnames.push(name);\n\t\t\t\t\tvar text = form.addTextarea(name + ':', '', 2);\n\t\t\t\t\ttext.style.width = '100%';\n\t\t\t\t\ttexts.push(text);\n\t\t\t\t\taddRemoveButton(text, name);\n\n\t\t\t\t\ttext.focus();\n\t\t\t\t}\n\n\t\t\t\taddBtn.setAttribute('disabled', 'disabled');\n\t\t\t\tnameInput.value = '';\n\t\t\t}\n\t\t\tcatch (e)\n\t\t\t{\n\t\t\t\tmxUtils.alert(e);\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tmxUtils.alert(mxResources.get('invalidName'));\n\t\t}\n\t});\n\n\tmxEvent.addListener(nameInput, 'keypress', function(e)\n\t{\n\t\tif (e.keyCode == 13 )\n\t\t{\n\t\t\taddBtn.click();\n\t\t}\n\t});\n\t\n\tthis.init = function()\n\t{\n\t\tif (texts.length > 0)\n\t\t{\n\t\t\ttexts[0].focus();\n\t\t}\n\t\telse\n\t\t{\n\t\t\tnameInput.focus();\n\t\t}\n\t};\n\t\n\taddBtn.setAttribute('title', mxResources.get('addProperty'));\n\taddBtn.setAttribute('disabled', 'disabled');\n\taddBtn.style.textOverflow = 'ellipsis';\n\taddBtn.style.position = 'absolute';\n\taddBtn.style.overflow = 'hidden';\n\taddBtn.style.width = '144px';\n\taddBtn.style.right = '0px';\n\taddBtn.className = 'geBtn';\n\tnewProp.appendChild(addBtn);\n\n\tvar cancelBtn = mxUtils.button(mxResources.get('cancel'), function()\n\t{\n\t\tui.hideDialog.apply(ui, arguments);\n\t});\n\t\n\tcancelBtn.setAttribute('title', 'Escape');\n\tcancelBtn.className = 'geBtn';\n\n\tvar exportBtn = mxUtils.button(mxResources.get('export'), mxUtils.bind(this, function(evt)\n\t{\n\t\tvar result = graph.getDataForCells([cell]);\n\n\t\tvar dlg = new EmbedDialog(ui, JSON.stringify(result, null, 2), null, null, function()\n\t\t{\n\t\t\tconsole.log(result);\n\t\t\tui.alert('Written to Console (Dev Tools)');\n\t\t}, mxResources.get('export'), null, 'Console', 'data.json');\n\t\tui.showDialog(dlg.container, 450, 240, true, true);\n\t\tdlg.init();\n\t}));\n\t\n\texportBtn.setAttribute('title', mxResources.get('export'));\n\texportBtn.className = 'geBtn';\n\t\n\tvar applyBtn = mxUtils.button(mxResources.get('apply'), function()\n\t{\n\t\ttry\n\t\t{\n\t\t\tui.hideDialog.apply(ui, arguments);\n\t\t\t\n\t\t\t// Clones and updates the value\n\t\t\tvalue = value.cloneNode(true);\n\t\t\tvar removeLabel = false;\n\t\t\t\n\t\t\tfor (var i = 0; i < names.length; i++)\n\t\t\t{\n\t\t\t\tif (texts[i] == null)\n\t\t\t\t{\n\t\t\t\t\tvalue.removeAttribute(names[i]);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tvalue.setAttribute(names[i], texts[i].value);\n\t\t\t\t\tremoveLabel = removeLabel || (names[i] == 'placeholder' &&\n\t\t\t\t\t\tvalue.getAttribute('placeholders') == '1');\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// Removes label if placeholder is assigned\n\t\t\tif (removeLabel)\n\t\t\t{\n\t\t\t\tvalue.removeAttribute('label');\n\t\t\t}\n\t\t\t\n\t\t\t// Updates the value of the cell (undoable)\n\t\t\tgraph.getModel().setValue(cell, value);\n\t\t}\n\t\tcatch (e)\n\t\t{\n\t\t\tmxUtils.alert(e);\n\t\t}\n\t});\n\n\tapplyBtn.setAttribute('title', 'Ctrl+Enter');\n\tapplyBtn.className = 'geBtn gePrimaryBtn';\n\n\tmxEvent.addListener(div, 'keypress', function(e)\n\t{\n\t\tif (e.keyCode == 13 && mxEvent.isControlDown(e))\n\t\t{\n\t\t\tapplyBtn.click();\n\t\t}\n\t});\n\t\n\tfunction updateAddBtn()\n\t{\n\t\tif (nameInput.value.length > 0)\n\t\t{\n\t\t\taddBtn.removeAttribute('disabled');\n\t\t}\n\t\telse\n\t\t{\n\t\t\taddBtn.setAttribute('disabled', 'disabled');\n\t\t}\n\t};\n\n\tmxEvent.addListener(nameInput, 'keyup', updateAddBtn);\n\t\n\t// Catches all changes that don't fire a keyup (such as paste via mouse)\n\tmxEvent.addListener(nameInput, 'change', updateAddBtn);\n\t\n\tvar buttons = document.createElement('div');\n\tbuttons.style.cssText = 'position:absolute;left:30px;right:30px;text-align:right;bottom:30px;height:40px;'\n\t\n\tif (ui.editor.graph.getModel().isVertex(cell) || ui.editor.graph.getModel().isEdge(cell))\n\t{\n\t\tvar replace = document.createElement('span');\n\t\treplace.style.marginRight = '10px';\n\t\tvar input = document.createElement('input');\n\t\tinput.setAttribute('type', 'checkbox');\n\t\tinput.style.marginRight = '6px';\n\t\t\n\t\tif (value.getAttribute('placeholders') == '1')\n\t\t{\n\t\t\tinput.setAttribute('checked', 'checked');\n\t\t\tinput.defaultChecked = true;\n\t\t}\n\t\n\t\tmxEvent.addListener(input, 'click', function()\n\t\t{\n\t\t\tif (value.getAttribute('placeholders') == '1')\n\t\t\t{\n\t\t\t\tvalue.removeAttribute('placeholders');\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tvalue.setAttribute('placeholders', '1');\n\t\t\t}\n\t\t});\n\t\t\n\t\treplace.appendChild(input);\n\t\tmxUtils.write(replace, mxResources.get('placeholders'));\n\t\t\n\t\tif (EditDataDialog.placeholderHelpLink != null)\n\t\t{\n\t\t\tvar link = document.createElement('a');\n\t\t\tlink.setAttribute('href', EditDataDialog.placeholderHelpLink);\n\t\t\tlink.setAttribute('title', mxResources.get('help'));\n\t\t\tlink.setAttribute('target', '_blank');\n\t\t\tlink.style.marginLeft = '8px';\n\t\t\tlink.style.cursor = 'help';\n\t\t\t\n\t\t\tvar icon = document.createElement('img');\n\t\t\tmxUtils.setOpacity(icon, 50);\n\t\t\ticon.style.height = '16px';\n\t\t\ticon.style.width = '16px';\n\t\t\ticon.setAttribute('border', '0');\n\t\t\ticon.setAttribute('valign', 'middle');\n\t\t\ticon.style.marginTop = (mxClient.IS_IE11) ? '0px' : '-4px';\n\t\t\ticon.setAttribute('src', Editor.helpImage);\n\t\t\tlink.appendChild(icon);\n\t\t\t\n\t\t\treplace.appendChild(link);\n\t\t}\n\t\t\n\t\tbuttons.appendChild(replace);\n\t}\n\t\n\tif (ui.editor.cancelFirst)\n\t{\n\t\tbuttons.appendChild(cancelBtn);\n\t}\n\t\n\tbuttons.appendChild(exportBtn);\n\tbuttons.appendChild(applyBtn);\n\n\tif (!ui.editor.cancelFirst)\n\t{\n\t\tbuttons.appendChild(cancelBtn);\n\t}\n\n\tdiv.appendChild(buttons);\n\tthis.container = div;\n};\n\n/**\n * Optional help link.\n */\nEditDataDialog.getDisplayIdForCell = function(ui, cell)\n{\n\tvar id = null;\n\t\n\tif (ui.editor.graph.getModel().getParent(cell) != null)\n\t{\n\t\tid = cell.getId();\n\t}\n\t\n\treturn id;\n};\n\n/**\n * Optional help link.\n */\nEditDataDialog.placeholderHelpLink = null;\n\n/**\n * Constructs a new link dialog.\n */\nvar LinkDialog = function(editorUi, initialValue, btnLabel, fn)\n{\n\tvar div = document.createElement('div');\n\tmxUtils.write(div, mxResources.get('editLink') + ':');\n\t\n\tvar inner = document.createElement('div');\n\tinner.className = 'geTitle';\n\tinner.style.backgroundColor = 'transparent';\n\tinner.style.borderColor = 'transparent';\n\tinner.style.whiteSpace = 'nowrap';\n\tinner.style.textOverflow = 'clip';\n\tinner.style.cursor = 'default';\n\tinner.style.paddingRight = '20px';\n\t\n\tvar linkInput = document.createElement('input');\n\tlinkInput.setAttribute('value', initialValue);\n\tlinkInput.setAttribute('placeholder', 'http://www.example.com/');\n\tlinkInput.setAttribute('type', 'text');\n\tlinkInput.style.marginTop = '6px';\n\tlinkInput.style.width = '400px';\n\tlinkInput.style.backgroundImage = 'url(\\'' + Dialog.prototype.clearImage + '\\')';\n\tlinkInput.style.backgroundRepeat = 'no-repeat';\n\tlinkInput.style.backgroundPosition = '100% 50%';\n\tlinkInput.style.paddingRight = '14px';\n\t\n\tvar cross = document.createElement('div');\n\tcross.setAttribute('title', mxResources.get('reset'));\n\tcross.style.position = 'relative';\n\tcross.style.left = '-16px';\n\tcross.style.width = '12px';\n\tcross.style.height = '14px';\n\tcross.style.cursor = 'pointer';\n\n\t// Workaround for inline-block not supported in IE\n\tcross.style.display = 'inline-block';\n\tcross.style.top = '3px';\n\t\n\t// Needed to block event transparency in IE\n\tcross.style.background = 'url(' + IMAGE_PATH + '/transparent.gif)';\n\n\tmxEvent.addListener(cross, 'click', function()\n\t{\n\t\tlinkInput.value = '';\n\t\tlinkInput.focus();\n\t});\n\t\n\tinner.appendChild(linkInput);\n\tinner.appendChild(cross);\n\tdiv.appendChild(inner);\n\t\n\tthis.init = function()\n\t{\n\t\tlinkInput.focus();\n\t\t\n\t\tif (mxClient.IS_GC || mxClient.IS_FF || document.documentMode >= 5)\n\t\t{\n\t\t\tlinkInput.select();\n\t\t}\n\t\telse\n\t\t{\n\t\t\tdocument.execCommand('selectAll', false, null);\n\t\t}\n\t};\n\t\n\tvar btns = document.createElement('div');\n\tbtns.style.marginTop = '18px';\n\tbtns.style.textAlign = 'right';\n\n\tmxEvent.addListener(linkInput, 'keypress', function(e)\n\t{\n\t\tif (e.keyCode == 13)\n\t\t{\n\t\t\teditorUi.hideDialog();\n\t\t\tfn(linkInput.value);\n\t\t}\n\t});\n\n\tvar cancelBtn = mxUtils.button(mxResources.get('cancel'), function()\n\t{\n\t\teditorUi.hideDialog();\n\t});\n\tcancelBtn.className = 'geBtn';\n\t\n\tif (editorUi.editor.cancelFirst)\n\t{\n\t\tbtns.appendChild(cancelBtn);\n\t}\n\t\n\tvar mainBtn = mxUtils.button(btnLabel, function()\n\t{\n\t\teditorUi.hideDialog();\n\t\tfn(linkInput.value);\n\t});\n\tmainBtn.className = 'geBtn gePrimaryBtn';\n\tbtns.appendChild(mainBtn);\n\t\n\tif (!editorUi.editor.cancelFirst)\n\t{\n\t\tbtns.appendChild(cancelBtn);\n\t}\n\n\tdiv.appendChild(btns);\n\n\tthis.container = div;\n};\n\n/**\n * \n */\nvar OutlineWindow = function(editorUi, x, y, w, h)\n{\n\tvar graph = editorUi.editor.graph;\n\n\tvar div = document.createElement('div');\n\tdiv.style.position = 'absolute';\n\tdiv.style.width = '100%';\n\tdiv.style.height = '100%';\n\tdiv.style.overflow = 'hidden';\n\n\tthis.window = new mxWindow(mxResources.get('outline'), div, x, y, w, h, true, true);\n\tthis.window.minimumSize = new mxRectangle(0, 0, 80, 80);\n\tthis.window.destroyOnClose = false;\n\tthis.window.setMaximizable(false);\n\tthis.window.setResizable(true);\n\tthis.window.setClosable(true);\n\tthis.window.setVisible(true);\n\t\n\tvar outline = editorUi.createOutline(this.window);\n\n\teditorUi.installResizeHandler(this, true, function()\n\t{\n\t\toutline.destroy();\n\t});\n\n\tthis.window.addListener(mxEvent.SHOW, mxUtils.bind(this, function()\n\t{\n\t\tthis.window.fit();\n\t\toutline.setSuspended(false);\n\t}));\n\t\n\tthis.window.addListener(mxEvent.HIDE, mxUtils.bind(this, function()\n\t{\n\t\toutline.setSuspended(true);\n\t}));\n\t\n\tthis.window.addListener(mxEvent.NORMALIZE, mxUtils.bind(this, function()\n\t{\n\t\toutline.setSuspended(false);\n\t}));\n\t\t\t\n\tthis.window.addListener(mxEvent.MINIMIZE, mxUtils.bind(this, function()\n\t{\n\t\toutline.setSuspended(true);\n\t}));\n\n\toutline.init(div);\n\t\n\tmxEvent.addMouseWheelListener(function(evt, up)\n\t{\n\t\tvar outlineWheel = false;\n\t\tvar source = mxEvent.getSource(evt);\n\n\t\twhile (source != null)\n\t\t{\n\t\t\tif (source == outline.svg)\n\t\t\t{\n\t\t\t\toutlineWheel = true;\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tsource = source.parentNode;\n\t\t}\n\n\t\tif (outlineWheel)\n\t\t{\n\t\t\tvar factor = graph.zoomFactor;\n\n\t\t\t// Slower zoom for pinch gesture on trackpad\n\t\t\tif (evt.deltaY != null && Math.round(evt.deltaY) != evt.deltaY)\n\t\t\t{\n\t\t\t\tfactor = 1 + (Math.abs(evt.deltaY) / 20) * (factor - 1);\n\t\t\t}\n\n\t\t\tgraph.lazyZoom(up, null, null, factor);\n\t\t\tmxEvent.consume(evt);\n\t\t}\n\t});\n};\n\n/**\n * \n */\nvar LayersWindow = function(editorUi, x, y, w, h)\n{\n\tvar graph = editorUi.editor.graph;\n\t\n\tvar div = document.createElement('div');\n\tdiv.className = 'geBackground';\n\tdiv.style.userSelect = 'none';\n\tdiv.style.border = '1px solid whiteSmoke';\n\tdiv.style.height = '100%';\n\tdiv.style.marginBottom = '10px';\n\tdiv.style.overflow = 'auto';\n\n\tvar tbarHeight = (!EditorUi.compactUi) ? '30px' : '26px';\n\t\n\tvar listDiv = document.createElement('div')\n\tlistDiv.className = 'geBackground';\n\tlistDiv.style.position = 'absolute';\n\tlistDiv.style.overflow = 'auto';\n\tlistDiv.style.left = '0px';\n\tlistDiv.style.right = '0px';\n\tlistDiv.style.top = '0px';\n\tlistDiv.style.bottom = (parseInt(tbarHeight) + 7) + 'px';\n\tdiv.appendChild(listDiv);\n\t\n\tvar dragSource = null;\n\tvar dropIndex = null;\n\t\n\tmxEvent.addListener(div, 'dragover', function(evt)\n\t{\n\t\tevt.dataTransfer.dropEffect = 'move';\n\t\tdropIndex = 0;\n\t\tevt.stopPropagation();\n\t\tevt.preventDefault();\n\t});\n\t\n\t// Workaround for \"no element found\" error in FF\n\tmxEvent.addListener(div, 'drop', function(evt)\n\t{\n\t\tevt.stopPropagation();\n\t\tevt.preventDefault();\n\t});\n\n\tvar layerCount = null;\n\tvar selectionLayer = null;\n\tvar ldiv = document.createElement('div');\n\t\n\tldiv.className = 'geToolbarContainer';\n\tldiv.style.position = 'absolute';\n\tldiv.style.bottom = '0px';\n\tldiv.style.left = '0px';\n\tldiv.style.right = '0px';\n\tldiv.style.height = tbarHeight;\n\tldiv.style.overflow = 'hidden';\n\tldiv.style.padding = (!EditorUi.compactUi) ? '1px' : '4px 0px 3px 0px';\n\tldiv.style.borderWidth = '1px 0px 0px 0px';\n\tldiv.style.borderStyle = 'solid';\n\tldiv.style.display = 'block';\n\tldiv.style.whiteSpace = 'nowrap';\n\t\n\tvar link = document.createElement('a');\n\tlink.className = 'geButton';\n\t\n\tvar removeLink = link.cloneNode(false);\n\tvar img = document.createElement('img');\n\timg.setAttribute('border', '0');\n\timg.setAttribute('width', '22');\n\timg.setAttribute('src', Editor.trashImage);\n\timg.style.opacity = '0.9';\n\n\tif (Editor.isDarkMode())\n\t{\n\t\timg.style.filter = 'invert(100%)';\n\t}\n\n\tremoveLink.appendChild(img);\n\n\tmxEvent.addListener(removeLink, 'click', function(evt)\n\t{\n\t\tif (graph.isEnabled())\n\t\t{\n\t\t\tgraph.model.beginUpdate();\n\t\t\ttry\n\t\t\t{\n\t\t\t\tvar index = graph.model.root.getIndex(selectionLayer);\n\t\t\t\tgraph.removeCells([selectionLayer], false);\n\t\t\t\t\n\t\t\t\t// Creates default layer if no layer exists\n\t\t\t\tif (graph.model.getChildCount(graph.model.root) == 0)\n\t\t\t\t{\n\t\t\t\t\tgraph.model.add(graph.model.root, new mxCell());\n\t\t\t\t\tgraph.setDefaultParent(null);\n\t\t\t\t}\n\t\t\t\telse if (index > 0 && index <= graph.model.getChildCount(graph.model.root))\n\t\t\t\t{\n\t\t\t\t\tgraph.setDefaultParent(graph.model.getChildAt(graph.model.root, index - 1));\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tgraph.setDefaultParent(null);\n\t\t\t\t}\n\t\t\t}\n\t\t\tfinally\n\t\t\t{\n\t\t\t\tgraph.model.endUpdate();\n\t\t\t}\n\t\t}\n\t\t\n\t\tmxEvent.consume(evt);\n\t});\n\t\n\tif (!graph.isEnabled())\n\t{\n\t\tremoveLink.className = 'geButton mxDisabled';\n\t}\n\t\n\tldiv.appendChild(removeLink);\n\n\tvar insertLink = link.cloneNode();\n\tinsertLink.setAttribute('title', mxUtils.trim(mxResources.get('moveSelectionTo', ['...'])));\n\n\timg = img.cloneNode(false);\n\timg.setAttribute('src', Editor.verticalDotsImage);\n\tinsertLink.appendChild(img);\n\n\tmxEvent.addListener(insertLink, 'click', function(evt)\n\t{\n\t\tif (graph.isEnabled() && !graph.isSelectionEmpty())\n\t\t{\n\t\t\tvar offset = mxUtils.getOffset(insertLink);\n\t\t\t\n\t\t\teditorUi.showPopupMenu(mxUtils.bind(this, function(menu, parent)\n\t\t\t{\n\t\t\t\tfor (var i = layerCount - 1; i >= 0; i--)\n\t\t\t\t{\n\t\t\t\t\t(mxUtils.bind(this, function(child)\n\t\t\t\t\t{\n\t\t\t\t\t\tvar item = menu.addItem(graph.convertValueToString(child) ||\n\t\t\t\t\t\t\t\tmxResources.get('background'), null, mxUtils.bind(this, function()\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tgraph.moveCells(graph.getSelectionCells(), 0, 0, false, child);\n\t\t\t\t\t\t}), parent);\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (graph.getSelectionCount() == 1 && graph.model.isAncestor(child, graph.getSelectionCell()))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tmenu.addCheckmark(item, Editor.checkmarkImage);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t}))(graph.model.getChildAt(graph.model.root, i));\n\t\t\t\t}\n\t\t\t}), offset.x, offset.y + insertLink.offsetHeight, evt);\n\t\t}\n\t});\n\n\tldiv.appendChild(insertLink);\n\t\n\tvar dataLink = link.cloneNode(false);\n\tdataLink.setAttribute('title', mxResources.get('editData'));\n\n\timg = img.cloneNode(false);\n\timg.setAttribute('src', Editor.editImage);\n\tdataLink.appendChild(img);\n\n\tmxEvent.addListener(dataLink, 'click', function(evt)\n\t{\n\t\tif (graph.isEnabled())\n\t\t{\n\t\t\teditorUi.showDataDialog(selectionLayer);\n\t\t}\n\t\t\n\t\tmxEvent.consume(evt);\n\t});\n\t\n\tif (!graph.isEnabled())\n\t{\n\t\tdataLink.className = 'geButton mxDisabled';\n\t}\n\n\tldiv.appendChild(dataLink);\n\t\n\tfunction renameLayer(layer)\n\t{\n\t\tif (graph.isEnabled() && layer != null)\n\t\t{\n\t\t\tvar label = graph.convertValueToString(layer);\n\t\t\tvar dlg = new FilenameDialog(editorUi, label || mxResources.get('background'),\n\t\t\t\tmxResources.get('rename'), mxUtils.bind(this, function(newValue)\n\t\t\t{\n\t\t\t\tif (newValue != null)\n\t\t\t\t{\n\t\t\t\t\tgraph.cellLabelChanged(layer, newValue);\n\t\t\t\t}\n\t\t\t}), mxResources.get('enterName'));\n\t\t\teditorUi.showDialog(dlg.container, 300, 100, true, true);\n\t\t\tdlg.init();\n\t\t}\n\t};\n\t\n\tvar duplicateLink = link.cloneNode(false);\n\tduplicateLink.setAttribute('title', mxResources.get('duplicate'));\n\n\timg = img.cloneNode(false);\n\timg.setAttribute('src', Editor.duplicateImage);\n\tduplicateLink.appendChild(img);\n\n\tmxEvent.addListener(duplicateLink, 'click', function(evt)\n\t{\n\t\tif (graph.isEnabled())\n\t\t{\n\t\t\tvar newCell = null;\n\t\t\tgraph.model.beginUpdate();\n\t\t\ttry\n\t\t\t{\n\t\t\t\tnewCell = graph.cloneCell(selectionLayer);\n\t\t\t\tgraph.cellLabelChanged(newCell, mxResources.get('untitledLayer'));\n\t\t\t\tnewCell.setVisible(true);\n\t\t\t\tnewCell = graph.addCell(newCell, graph.model.root);\n\t\t\t\tgraph.setDefaultParent(newCell);\n\t\t\t}\n\t\t\tfinally\n\t\t\t{\n\t\t\t\tgraph.model.endUpdate();\n\t\t\t}\n\n\t\t\tif (newCell != null && !graph.isCellLocked(newCell))\n\t\t\t{\n\t\t\t\tgraph.selectAll(newCell);\n\t\t\t}\n\t\t}\n\t});\n\t\n\tif (!graph.isEnabled())\n\t{\n\t\tduplicateLink.className = 'geButton mxDisabled';\n\t}\n\n\tldiv.appendChild(duplicateLink);\n\n\tvar addLink = link.cloneNode(false);\n\taddLink.setAttribute('title', mxResources.get('addLayer'));\n\n\timg = img.cloneNode(false);\n\timg.setAttribute('src', Editor.addImage);\n\taddLink.appendChild(img);\n\t\n\tmxEvent.addListener(addLink, 'click', function(evt)\n\t{\n\t\tif (graph.isEnabled())\n\t\t{\n\t\t\tgraph.model.beginUpdate();\n\t\t\t\n\t\t\ttry\n\t\t\t{\n\t\t\t\tvar cell = graph.addCell(new mxCell(mxResources.get('untitledLayer')), graph.model.root);\n\t\t\t\tgraph.setDefaultParent(cell);\n\t\t\t}\n\t\t\tfinally\n\t\t\t{\n\t\t\t\tgraph.model.endUpdate();\n\t\t\t}\n\t\t}\n\t\t\n\t\tmxEvent.consume(evt);\n\t});\n\t\n\tif (!graph.isEnabled())\n\t{\n\t\taddLink.className = 'geButton mxDisabled';\n\t}\n\t\n\tldiv.appendChild(addLink);\n\tdiv.appendChild(ldiv);\n\t\n\tvar layerDivs = new mxDictionary();\n\t\n\tvar dot = document.createElement('span');\n\tdot.setAttribute('title', mxResources.get('selectionOnly'));\n\tdot.innerHTML = '&#8226;';\n\tdot.style.position = 'absolute';\n\tdot.style.fontWeight = 'bold';\n\tdot.style.fontSize = '16pt';\n\tdot.style.right = '2px';\n\tdot.style.top = '2px';\n\t\n\tfunction updateLayerDot()\n\t{\n\t\tvar div = layerDivs.get(graph.getLayerForCells(graph.getSelectionCells()));\n\t\t\n\t\tif (div != null)\n\t\t{\n\t\t\tdiv.appendChild(dot);\n\t\t}\n\t\telse if (dot.parentNode != null)\n\t\t{\n\t\t\tdot.parentNode.removeChild(dot);\n\t\t}\n\t};\n\t\n\tfunction refresh()\n\t{\n\t\tlayerCount = graph.model.getChildCount(graph.model.root)\n\t\tlistDiv.innerText = '';\n\t\tlayerDivs.clear();\n\t\t\n\t\tfunction addLayer(index, label, child, defaultParent)\n\t\t{\n\t\t\tvar ldiv = document.createElement('div');\n\t\t\tldiv.className = 'geToolbarContainer';\n\t\t\tlayerDivs.put(child, ldiv);\n\n\t\t\tldiv.style.overflow = 'hidden';\n\t\t\tldiv.style.position = 'relative';\n\t\t\tldiv.style.padding = '4px';\n\t\t\tldiv.style.height = '22px';\n\t\t\tldiv.style.display = 'block';\n\t\t\tldiv.style.backgroundColor = (Editor.isDarkMode()) ?\n\t\t\t\tEditor.darkColor : 'whiteSmoke';\n\t\t\tldiv.style.borderWidth = '0px 0px 1px 0px';\n\t\t\tldiv.style.borderColor = '#c3c3c3';\n\t\t\tldiv.style.borderStyle = 'solid';\n\t\t\tldiv.style.whiteSpace = 'nowrap';\n\t\t\tldiv.setAttribute('title', label);\n\t\t\t\n\t\t\tvar left = document.createElement('div');\n\t\t\tleft.style.display = 'inline-block';\n\t\t\tleft.style.width = '100%';\n\t\t\tleft.style.textOverflow = 'ellipsis';\n\t\t\tleft.style.overflow = 'hidden';\n\t\t\t\n\t\t\tmxEvent.addListener(ldiv, 'dragover', function(evt)\n\t\t\t{\n\t\t\t\tevt.dataTransfer.dropEffect = 'move';\n\t\t\t\tdropIndex = index;\n\t\t\t\tevt.stopPropagation();\n\t\t\t\tevt.preventDefault();\n\t\t\t});\n\t\t\t\n\t\t\tmxEvent.addListener(ldiv, 'dragstart', function(evt)\n\t\t\t{\n\t\t\t\tdragSource = ldiv;\n\t\t\t\t\n\t\t\t\t// Workaround for no DnD on DIV in FF\n\t\t\t\tif (mxClient.IS_FF)\n\t\t\t\t{\n\t\t\t\t\t// LATER: Check what triggers a parse as XML on this in FF after drop\n\t\t\t\t\tevt.dataTransfer.setData('Text', '<layer/>');\n\t\t\t\t}\n\t\t\t});\n\t\t\t\n\t\t\tmxEvent.addListener(ldiv, 'dragend', function(evt)\n\t\t\t{\n\t\t\t\tif (dragSource != null && dropIndex != null)\n\t\t\t\t{\n\t\t\t\t\tgraph.addCell(child, graph.model.root, dropIndex);\n\t\t\t\t}\n\n\t\t\t\tdragSource = null;\n\t\t\t\tdropIndex = null;\n\t\t\t\tevt.stopPropagation();\n\t\t\t\tevt.preventDefault();\n\t\t\t});\n\n\t\t\tvar inp = document.createElement('img');\n\t\t\tinp.setAttribute('draggable', 'false');\n\t\t\tinp.setAttribute('align', 'top');\n\t\t\tinp.setAttribute('border', '0');\n\t\t\tinp.style.width = '16px';\n\t\t\tinp.style.padding = '0px 6px 0 4px';\n\t\t\tinp.style.marginTop = '2px';\n\t\t\tinp.style.cursor = 'pointer';\n\t\t\tinp.setAttribute('title', mxResources.get(\n\t\t\t\tgraph.model.isVisible(child) ?\n\t\t\t\t'hide' : 'show'));\n\n\t\t\tif (graph.model.isVisible(child))\n\t\t\t{\n\t\t\t\tinp.setAttribute('src', Editor.visibleImage);\n\t\t\t\tmxUtils.setOpacity(ldiv, 75);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tinp.setAttribute('src', Editor.hiddenImage);\n\t\t\t\tmxUtils.setOpacity(ldiv, 25);\n\t\t\t}\n\n\t\t\tif (Editor.isDarkMode())\n\t\t\t{\n\t\t\t\tinp.style.filter = 'invert(100%)';\n\t\t\t}\n\n\t\t\tleft.appendChild(inp);\n\t\t\t\n\t\t\tmxEvent.addListener(inp, 'click', function(evt)\n\t\t\t{\n\t\t\t\tgraph.model.setVisible(child, !graph.model.isVisible(child));\n\t\t\t\tmxEvent.consume(evt);\n\t\t\t});\n\n\t\t\tvar btn = document.createElement('img');\n\t\t\tbtn.setAttribute('draggable', 'false');\n\t\t\tbtn.setAttribute('align', 'top');\n\t\t\tbtn.setAttribute('border', '0');\n\t\t\tbtn.style.width = '16px';\n\t\t\tbtn.style.padding = '0px 6px 0 0';\n\t\t\tbtn.style.marginTop = '2px';\n\t\t\tbtn.setAttribute('title', mxResources.get('lockUnlock'));\n\n\t\t\tvar style = graph.getCurrentCellStyle(child);\n\n\t\t\tif (mxUtils.getValue(style, 'locked', '0') == '1')\n\t\t\t{\n\t\t\t\tbtn.setAttribute('src', Editor.lockedImage);\n\t\t\t\tmxUtils.setOpacity(btn, 75);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tbtn.setAttribute('src', Editor.unlockedImage);\n\t\t\t\tmxUtils.setOpacity(btn, 25);\n\t\t\t}\n\n\t\t\tif (Editor.isDarkMode())\n\t\t\t{\n\t\t\t\tbtn.style.filter = 'invert(100%)';\n\t\t\t}\n\t\t\t\n\t\t\tif (graph.isEnabled())\n\t\t\t{\n\t\t\t\tbtn.style.cursor = 'pointer';\n\t\t\t}\n\t\t\t\n\t\t\tmxEvent.addListener(btn, 'click', function(evt)\n\t\t\t{\n\t\t\t\tif (graph.isEnabled())\n\t\t\t\t{\n\t\t\t\t\tvar value = null;\n\t\t\t\t\t\n\t\t\t\t\tgraph.getModel().beginUpdate();\n\t\t\t\t\ttry\n\t\t\t\t\t{\n\t\t\t    \t\tvalue = (mxUtils.getValue(style, 'locked', '0') == '1') ? null : '1';\n\t\t\t    \t\tgraph.setCellStyles('locked', value, [child]);\n\t\t\t\t\t}\n\t\t\t\t\tfinally\n\t\t\t\t\t{\n\t\t\t\t\t\tgraph.getModel().endUpdate();\n\t\t\t\t\t}\n\n\t\t\t\t\tif (value == '1')\n\t\t\t\t\t{\n\t\t\t\t\t\tgraph.removeSelectionCells(graph.getModel().getDescendants(child));\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tmxEvent.consume(evt);\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tleft.appendChild(btn);\n\n\t\t\tvar span = document.createElement('span');\n\t\t\tmxUtils.write(span, label);\n\t\t\tspan.style.display = 'block';\n\t\t\tspan.style.whiteSpace = 'nowrap';\n\t\t\tspan.style.overflow = 'hidden';\n\t\t\tspan.style.textOverflow = 'ellipsis';\n\t\t\tspan.style.position = 'absolute';\n\t\t\tspan.style.left = '52px';\n\t\t\tspan.style.right = '8px';\n\t\t\tspan.style.top = '8px';\n\n\t\t\tleft.appendChild(span);\n\t\t\tldiv.appendChild(left);\n\t\t\t\n\t\t\tif (graph.isEnabled())\n\t\t\t{\n\t\t\t\t// Fallback if no drag and drop is available\n\t\t\t\tif (mxClient.IS_TOUCH || mxClient.IS_POINTER ||\n\t\t\t\t\t(mxClient.IS_IE && document.documentMode < 10))\n\t\t\t\t{\n\t\t\t\t\tvar right = document.createElement('div');\n\t\t\t\t\tright.style.display = 'block';\n\t\t\t\t\tright.style.textAlign = 'right';\n\t\t\t\t\tright.style.whiteSpace = 'nowrap';\n\t\t\t\t\tright.style.position = 'absolute';\n\t\t\t\t\tright.style.right = '16px';\n\t\t\t\t\tright.style.top = '6px';\n\t\t\n\t\t\t\t\t// Poor man's change layer order\n\t\t\t\t\tif (index > 0)\n\t\t\t\t\t{\n\t\t\t\t\t\tvar img2 = document.createElement('a');\n\t\t\t\t\t\t\n\t\t\t\t\t\timg2.setAttribute('title', mxResources.get('toBack'));\n\t\t\t\t\t\t\n\t\t\t\t\t\timg2.className = 'geButton';\n\t\t\t\t\t\timg2.style.cssFloat = 'none';\n\t\t\t\t\t\timg2.innerHTML = '&#9660;';\n\t\t\t\t\t\timg2.style.width = '14px';\n\t\t\t\t\t\timg2.style.height = '14px';\n\t\t\t\t\t\timg2.style.fontSize = '14px';\n\t\t\t\t\t\timg2.style.margin = '0px';\n\t\t\t\t\t\timg2.style.marginTop = '-1px';\n\t\t\t\t\t\tright.appendChild(img2);\n\t\t\t\t\t\t\n\t\t\t\t\t\tmxEvent.addListener(img2, 'click', function(evt)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif (graph.isEnabled())\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tgraph.addCell(child, graph.model.root, index - 1);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tmxEvent.consume(evt);\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\n\t\t\t\t\tif (index >= 0 && index < layerCount - 1)\n\t\t\t\t\t{\n\t\t\t\t\t\tvar img1 = document.createElement('a');\n\t\t\t\t\t\t\n\t\t\t\t\t\timg1.setAttribute('title', mxResources.get('toFront'));\n\t\t\t\t\t\t\n\t\t\t\t\t\timg1.className = 'geButton';\n\t\t\t\t\t\timg1.style.cssFloat = 'none';\n\t\t\t\t\t\timg1.innerHTML = '&#9650;';\n\t\t\t\t\t\timg1.style.width = '14px';\n\t\t\t\t\t\timg1.style.height = '14px';\n\t\t\t\t\t\timg1.style.fontSize = '14px';\n\t\t\t\t\t\timg1.style.margin = '0px';\n\t\t\t\t\t\timg1.style.marginTop = '-1px';\n\t\t\t\t\t\tright.appendChild(img1);\n\t\t\t\t\t\t\n\t\t\t\t\t\tmxEvent.addListener(img1, 'click', function(evt)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif (graph.isEnabled())\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tgraph.addCell(child, graph.model.root, index + 1);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tmxEvent.consume(evt);\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tldiv.appendChild(right);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (mxClient.IS_SVG && (!mxClient.IS_IE || document.documentMode >= 10))\n\t\t\t\t{\n\t\t\t\t\tldiv.setAttribute('draggable', 'true');\n\t\t\t\t\tldiv.style.cursor = 'move';\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tmxEvent.addListener(ldiv, 'dblclick', function(evt)\n\t\t\t{\n\t\t\t\tvar nodeName = mxEvent.getSource(evt).nodeName;\n\t\t\t\t\n\t\t\t\tif (nodeName != 'INPUT' && nodeName != 'IMG')\n\t\t\t\t{\n\t\t\t\t\trenameLayer(child);\n\t\t\t\t\tmxEvent.consume(evt);\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tif (graph.getDefaultParent() == child)\n\t\t\t{\n\t\t\t\tldiv.style.background = (!Editor.isDarkMode()) ? '#e6eff8' : '#505759';\n\t\t\t\tldiv.style.fontWeight = (graph.isEnabled()) ? 'bold' : '';\n\t\t\t\tselectionLayer = child;\n\t\t\t}\n\n\t\t\tmxEvent.addListener(ldiv, 'click', function(evt)\n\t\t\t{\n\t\t\t\tif (graph.isEnabled())\n\t\t\t\t{\n\t\t\t\t\tgraph.setDefaultParent(defaultParent);\n\t\t\t\t\tgraph.view.setCurrentRoot(null);\n\n\t\t\t\t\tif (mxEvent.isShiftDown(evt))\n\t\t\t\t\t{\n\t\t\t\t\t\tgraph.setSelectionCells(child.children);\t\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tmxEvent.consume(evt);\n\t\t\t\t}\n\t\t\t});\n\t\t\t\n\t\t\tlistDiv.appendChild(ldiv);\n\t\t};\n\t\t\n\t\t// Cannot be moved or deleted\n\t\tfor (var i = layerCount - 1; i >= 0; i--)\n\t\t{\n\t\t\t(mxUtils.bind(this, function(child)\n\t\t\t{\n\t\t\t\taddLayer(i, graph.convertValueToString(child) ||\n\t\t\t\t\tmxResources.get('background'), child, child);\n\t\t\t}))(graph.model.getChildAt(graph.model.root, i));\n\t\t}\n\t\t\n\t\tvar label = graph.convertValueToString(selectionLayer) || mxResources.get('background');\n\t\tremoveLink.setAttribute('title', mxResources.get('removeIt', [label]));\n\t\tduplicateLink.setAttribute('title', mxResources.get('duplicateIt', [label]));\n\n\t\tif (graph.isSelectionEmpty())\n\t\t{\n\t\t\tinsertLink.className = 'geButton mxDisabled';\n\t\t}\n\t\t\n\t\tupdateLayerDot();\n\t};\n\n\trefresh();\n\tgraph.model.addListener(mxEvent.CHANGE, refresh);\n\tgraph.addListener('defaultParentChanged', refresh);\n\t\n\tgraph.selectionModel.addListener(mxEvent.CHANGE, function()\n\t{\n\t\tif (graph.isSelectionEmpty())\n\t\t{\n\t\t\tinsertLink.className = 'geButton mxDisabled';\n\t\t}\n\t\telse\n\t\t{\n\t\t\tinsertLink.className = 'geButton';\n\t\t}\n\t\t\n\t\tupdateLayerDot();\n\t});\n\n\tthis.window = new mxWindow(mxResources.get('layers'), div, x, y, w, h, true, true);\n\tthis.window.minimumSize = new mxRectangle(0, 0, 150, 120);\n\tthis.window.destroyOnClose = false;\n\tthis.window.setMaximizable(false);\n\tthis.window.setResizable(true);\n\tthis.window.setClosable(true);\n\tthis.window.setVisible(true);\n\t\n\tthis.init = function()\n\t{\n\t\tlistDiv.scrollTop = listDiv.scrollHeight - listDiv.clientHeight;\t\n\t};\n\n\tthis.window.addListener(mxEvent.SHOW, mxUtils.bind(this, function()\n\t{\n\t\tthis.window.fit();\n\t}));\n\t\n\t// Make refresh available via instance\n\tthis.refreshLayers = refresh;\n\teditorUi.installResizeHandler(this, true);\n};\n"
  },
  {
    "path": "static/cherry/drawio_demo/Editor.js",
    "content": "/**\n * Copyright (c) 2006-2012, JGraph Ltd\n */\n/**\n * Editor constructor executed on page load.\n */\nEditor = function(chromeless, themes, model, graph, editable)\n{\n\tmxEventSource.call(this);\n\tthis.chromeless = (chromeless != null) ? chromeless : this.chromeless;\n\tthis.initStencilRegistry();\n\tthis.graph = graph || this.createGraph(themes, model);\n\tthis.editable = (editable != null) ? editable : !chromeless;\n\tthis.undoManager = this.createUndoManager();\n\tthis.status = '';\n\n\tthis.getOrCreateFilename = function()\n\t{\n\t\treturn this.filename || mxResources.get('drawing', [Editor.pageCounter]) + '.xml';\n\t};\n\t\n\tthis.getFilename = function()\n\t{\n\t\treturn this.filename;\n\t};\n\t\n\t// Sets the status and fires a statusChanged event\n\tthis.setStatus = function(value, fn)\n\t{\n\t\tthis.status = value;\n\t\tthis.statusFunction = fn;\n\t\tthis.fireEvent(new mxEventObject('statusChanged'));\n\t};\n\t\n\t// Returns the current status\n\tthis.getStatus = function()\n\t{\n\t\treturn this.status;\n\t};\n\n\t// Updates modified state if graph changes\n\tthis.graphChangeListener = function(sender, eventObject) \n\t{\n\t\tvar edit = (eventObject != null) ? eventObject.getProperty('edit') : null;\n\t\t\t\t\n\t\tif (edit == null || !edit.ignoreEdit)\n\t\t{\n\t\t\tthis.setModified(true);\n\t\t}\n\t};\n\t\n\tthis.graph.getModel().addListener(mxEvent.CHANGE, mxUtils.bind(this, function()\n\t{\n\t\tthis.graphChangeListener.apply(this, arguments);\n\t}));\n\n\t// Sets persistent graph state defaults\n\tthis.graph.resetViewOnRootChange = false;\n\tthis.init();\n};\n\n/**\n * Counts open editor tabs (must be global for cross-window access)\n */\nEditor.pageCounter = 0;\n\n// Cross-domain window access is not allowed in FF, so if we\n// were opened from another domain then this will fail.\n(function()\n{\n\ttry\n\t{\n\t\tvar op = window;\n\n\t\twhile (op.opener != null && typeof op.opener.Editor !== 'undefined' &&\n\t\t\t!isNaN(op.opener.Editor.pageCounter) &&\t\n\t\t\t// Workaround for possible infinite loop in FF https://drawio.atlassian.net/browse/DS-795\n\t\t\top.opener != op)\n\t\t{\n\t\t\top = op.opener;\n\t\t}\n\t\t\n\t\t// Increments the counter in the first opener in the chain\n\t\tif (op != null)\n\t\t{\n\t\t\top.Editor.pageCounter++;\n\t\t\tEditor.pageCounter = op.Editor.pageCounter;\n\t\t}\n\t}\n\tcatch (e)\n\t{\n\t\t// ignore\n\t}\n})();\n\n/**\n * \n */\nEditor.defaultHtmlFont = '-apple-system, BlinkMacSystemFont, \"Segoe UI Variable\", \"Segoe UI\", system-ui, ui-sans-serif, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\"';\n\n/**\n * Specifies if local storage should be used (eg. on the iPad which has no filesystem)\n */\nEditor.useLocalStorage = typeof(Storage) != 'undefined' && mxClient.IS_IOS;\n\n/**\n * Window width for simple mode to collapse panels.\n */\nEditor.smallScreenWidth = 800;\n\n/**\n * \n */\nEditor.lightCheckmarkImage = 'data:image/gif;base64,R0lGODlhFQAVAMQfAGxsbHx8fIqKioaGhvb29nJycvr6+sDAwJqamltbW5OTk+np6YGBgeTk5Ly8vJiYmP39/fLy8qWlpa6ursjIyOLi4vj4+N/f3+3t7fT09LCwsHZ2dubm5r6+vmZmZv///yH/C1hNUCBEYXRhWE1QPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS4wLWMwNjAgNjEuMTM0Nzc3LCAyMDEwLzAyLzEyLTE3OjMyOjAwICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOnhtcE1NPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvbW0vIiB4bWxuczpzdFJlZj0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL3NUeXBlL1Jlc291cmNlUmVmIyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1IFdpbmRvd3MiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6OEY4NTZERTQ5QUFBMTFFMUE5MTVDOTM5MUZGMTE3M0QiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6OEY4NTZERTU5QUFBMTFFMUE5MTVDOTM5MUZGMTE3M0QiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo4Rjg1NkRFMjlBQUExMUUxQTkxNUM5MzkxRkYxMTczRCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo4Rjg1NkRFMzlBQUExMUUxQTkxNUM5MzkxRkYxMTczRCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PgH//v38+/r5+Pf29fTz8vHw7+7t7Ovq6ejn5uXk4+Lh4N/e3dzb2tnY19bV1NPS0dDPzs3My8rJyMfGxcTDwsHAv769vLu6ubi3trW0s7KxsK+urayrqqmop6alpKOioaCfnp2cm5qZmJeWlZSTkpGQj46NjIuKiYiHhoWEg4KBgH9+fXx7enl4d3Z1dHNycXBvbm1sa2ppaGdmZWRjYmFgX15dXFtaWVhXVlVUU1JRUE9OTUxLSklIR0ZFRENCQUA/Pj08Ozo5ODc2NTQzMjEwLy4tLCsqKSgnJiUkIyIhIB8eHRwbGhkYFxYVFBMSERAPDg0MCwoJCAcGBQQDAgEAACH5BAEAAB8ALAAAAAAVABUAAAVI4CeOZGmeaKqubKtylktSgCOLRyLd3+QJEJnh4VHcMoOfYQXQLBcBD4PA6ngGlIInEHEhPOANRkaIFhq8SuHCE1Hb8Lh8LgsBADs=';\nEditor.darkCheckmarkImage = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAVCAMAAACeyVWkAAAARVBMVEUAAACZmZkICAgEBASNjY2Dg4MYGBiTk5N5eXl1dXVmZmZQUFBCQkI3NzceHh4MDAykpKSJiYl+fn5sbGxaWlo/Pz8SEhK96uPlAAAAAXRSTlMAQObYZgAAAE5JREFUGNPFzTcSgDAQQ1HJGUfy/Y9K7V1qeOUfzQifCQZai1XHaz11LFysbDbzgDSSWMZiETz3+b8yNUc/MMsktxuC8XQBSncdLwz+8gCCggGXzBcozAAAAABJRU5ErkJggg==';\nEditor.darkHelpImage = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAP1BMVEUAAAD///////////////////////////////////////////////////////////////////////////////9Du/pqAAAAFXRSTlMAT30qCJRBboyDZyCgRzUUdF46MJlgXETgAAAAeklEQVQY022O2w4DIQhEQUURda/9/28tUO2+7CQS5sgQ4F1RapX78YUwRqQjTU8ILqQfKerTKTvACJ4nLX3krt+8aS82oI8aQC4KavRgtvEW/mDvsICgA03PSGRr79MqX1YPNIxzjyqtw8ZnnRo4t5a5undtJYRywau+ds4Cyza3E6YAAAAASUVORK5CYII=';\nEditor.lightHelpImage = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBmaWxsPSJub25lIiBkPSJNMCAwaDI0djI0SDB6Ii8+PHBhdGggZD0iTTExIDE4aDJ2LTJoLTJ2MnptMS0xNkM2LjQ4IDIgMiA2LjQ4IDIgMTJzNC40OCAxMCAxMCAxMCAxMC00LjQ4IDEwLTEwUzE3LjUyIDIgMTIgMnptMCAxOGMtNC40MSAwLTgtMy41OS04LThzMy41OS04IDgtOCA4IDMuNTkgOCA4LTMuNTkgOC04IDh6bTAtMTRjLTIuMjEgMC00IDEuNzktNCA0aDJjMC0xLjEuOS0yIDItMnMyIC45IDIgMmMwIDItMyAxLjc1LTMgNWgyYzAtMi4yNSAzLTIuNSAzLTUgMC0yLjIxLTEuNzktNC00LTR6Ii8+PC9zdmc+';\nEditor.menuImage = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMjRweCIgZmlsbD0iIzAwMDAwMCI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTMgMThoMTh2LTJIM3Yyem0wLTVoMTh2LTJIM3Yyem0wLTd2MmgxOFY2SDN6Ii8+PC9zdmc+';\nEditor.moveImage = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCIgd2lkdGg9IjI4cHgiIGhlaWdodD0iMjhweCI+PGc+PC9nPjxnPjxnPjxnPjxwYXRoIHRyYW5zZm9ybT0idHJhbnNsYXRlKDIuNCwyLjQpc2NhbGUoMC44KXJvdGF0ZSg0NSwxMiwxMikiIHN0cm9rZT0iIzI5YjZmMiIgZmlsbD0iIzI5YjZmMiIgZD0iTTE1LDNsMi4zLDIuM2wtMi44OSwyLjg3bDEuNDIsMS40MkwxOC43LDYuN0wyMSw5VjNIMTV6IE0zLDlsMi4zLTIuM2wyLjg3LDIuODlsMS40Mi0xLjQyTDYuNyw1LjNMOSwzSDNWOXogTTksMjEgbC0yLjMtMi4zbDIuODktMi44N2wtMS40Mi0xLjQyTDUuMywxNy4zTDMsMTV2Nkg5eiBNMjEsMTVsLTIuMywyLjNsLTIuODctMi44OWwtMS40MiwxLjQybDIuODksMi44N0wxNSwyMWg2VjE1eiIvPjwvZz48L2c+PC9nPjwvc3ZnPgo=';\nEditor.zoomInImage = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTUuNSAxNGgtLjc5bC0uMjgtLjI3QzE1LjQxIDEyLjU5IDE2IDExLjExIDE2IDkuNSAxNiA1LjkxIDEzLjA5IDMgOS41IDNTMyA1LjkxIDMgOS41IDUuOTEgMTYgOS41IDE2YzEuNjEgMCAzLjA5LS41OSA0LjIzLTEuNTdsLjI3LjI4di43OWw1IDQuOTlMMjAuNDkgMTlsLTQuOTktNXptLTYgMEM3LjAxIDE0IDUgMTEuOTkgNSA5LjVTNy4wMSA1IDkuNSA1IDE0IDcuMDEgMTQgOS41IDExLjk5IDE0IDkuNSAxNHptMi41LTRoLTJ2Mkg5di0ySDdWOWgyVjdoMXYyaDJ2MXoiLz48L3N2Zz4=';\nEditor.zoomOutImage = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTUuNSAxNGgtLjc5bC0uMjgtLjI3QzE1LjQxIDEyLjU5IDE2IDExLjExIDE2IDkuNSAxNiA1LjkxIDEzLjA5IDMgOS41IDNTMyA1LjkxIDMgOS41IDUuOTEgMTYgOS41IDE2YzEuNjEgMCAzLjA5LS41OSA0LjIzLTEuNTdsLjI3LjI4di43OWw1IDQuOTlMMjAuNDkgMTlsLTQuOTktNXptLTYgMEM3LjAxIDE0IDUgMTEuOTkgNSA5LjVTNy4wMSA1IDkuNSA1IDE0IDcuMDEgMTQgOS41IDExLjk5IDE0IDkuNSAxNHpNNyA5aDV2MUg3eiIvPjwvc3ZnPg==';\nEditor.fullscreenImage = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMyA1djRoMlY1aDRWM0g1Yy0xLjEgMC0yIC45LTIgMnptMiAxMEgzdjRjMCAxLjEuOSAyIDIgMmg0di0ySDV2LTR6bTE0IDRoLTR2Mmg0YzEuMSAwIDItLjkgMi0ydi00aC0ydjR6bTAtMTZoLTR2Mmg0djRoMlY1YzAtMS4xLS45LTItMi0yeiIvPjwvc3ZnPg==';\nEditor.fullscreenExitImage = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMjRweCIgZmlsbD0iIzAwMDAwMCI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTUgMTZoM3YzaDJ2LTVINXYyem0zLThINXYyaDVWNUg4djN6bTYgMTFoMnYtM2gzdi0yaC01djV6bTItMTFWNWgtMnY1aDVWOGgtM3oiLz48L3N2Zz4=';\nEditor.zoomFitImage = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMThweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMThweCIgZmlsbD0iIzAwMDAwMCI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTUgMTVIM3Y0YzAgMS4xLjkgMiAyIDJoNHYtMkg1di00ek01IDVoNFYzSDVjLTEuMSAwLTIgLjktMiAydjRoMlY1em03IDNjLTIuMjEgMC00IDEuNzktNCA0czEuNzkgNCA0IDQgNC0xLjc5IDQtNC0xLjc5LTQtNC00em0wIDZjLTEuMSAwLTItLjktMi0ycy45LTIgMi0yIDIgLjkgMiAyLS45IDItMiAyem03LTExaC00djJoNHY0aDJWNWMwLTEuMS0uOS0yLTItMnptMCAxNmgtNHYyaDRjMS4xIDAgMi0uOSAyLTJ2LTRoLTJ2NHoiLz48L3N2Zz4=';\nEditor.layersImage = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMThweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMThweCIgZmlsbD0iIzAwMDAwMCI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTExLjk5IDE4LjU0bC03LjM3LTUuNzNMMyAxNC4wN2w5IDcgOS03LTEuNjMtMS4yN3pNMTIgMTZsNy4zNi01LjczTDIxIDlsLTktNy05IDcgMS42MyAxLjI3TDEyIDE2em0wLTExLjQ3TDE3Ljc0IDkgMTIgMTMuNDcgNi4yNiA5IDEyIDQuNTN6Ii8+PC9zdmc+';\nEditor.previousImage = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMThweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMThweCIgZmlsbD0iIzAwMDAwMCI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTE1LjQxIDcuNDFMMTQgNmwtNiA2IDYgNiAxLjQxLTEuNDFMMTAuODMgMTJsNC41OC00LjU5eiIvPjwvc3ZnPg==';\nEditor.nextImage = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMThweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMThweCIgZmlsbD0iIzAwMDAwMCI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTEwIDZMOC41OSA3LjQxIDEzLjE3IDEybC00LjU4IDQuNTlMMTAgMThsNi02LTYtNnoiLz48L3N2Zz4=';\nEditor.editImage = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMThweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMThweCIgZmlsbD0iIzAwMDAwMCI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTE0LjA2IDkuMDJsLjkyLjkyTDUuOTIgMTlINXYtLjkybDkuMDYtOS4wNk0xNy42NiAzYy0uMjUgMC0uNTEuMS0uNy4yOWwtMS44MyAxLjgzIDMuNzUgMy43NSAxLjgzLTEuODNjLjM5LS4zOS4zOS0xLjAyIDAtMS40MWwtMi4zNC0yLjM0Yy0uMi0uMi0uNDUtLjI5LS43MS0uMjl6bS0zLjYgMy4xOUwzIDE3LjI1VjIxaDMuNzVMMTcuODEgOS45NGwtMy43NS0zLjc1eiIvPjwvc3ZnPg==';\nEditor.duplicateImage = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMThweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMThweCIgZmlsbD0iIzAwMDAwMCI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTE2IDFINGMtMS4xIDAtMiAuOS0yIDJ2MTRoMlYzaDEyVjF6bTMgNEg4Yy0xLjEgMC0yIC45LTIgMnYxNGMwIDEuMS45IDIgMiAyaDExYzEuMSAwIDItLjkgMi0yVjdjMC0xLjEtLjktMi0yLTJ6bTAgMTZIOFY3aDExdjE0eiIvPjwvc3ZnPg==';\nEditor.addImage = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMThweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMThweCIgZmlsbD0iIzAwMDAwMCI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTE5IDEzaC02djZoLTJ2LTZINXYtMmg2VjVoMnY2aDZ2MnoiLz48L3N2Zz4=';\nEditor.crossImage = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMThweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMThweCIgZmlsbD0iIzAwMDAwMCI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTE5IDYuNDFMMTcuNTkgNSAxMiAxMC41OSA2LjQxIDUgNSA2LjQxIDEwLjU5IDEyIDUgMTcuNTkgNi40MSAxOSAxMiAxMy40MSAxNy41OSAxOSAxOSAxNy41OSAxMy40MSAxMiAxOSA2LjQxeiIvPjwvc3ZnPg==';\nEditor.verticalDotsImage = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMThweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMThweCIgZmlsbD0iIzAwMDAwMCI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTEyIDhjMS4xIDAgMi0uOSAyLTJzLS45LTItMi0yLTIgLjktMiAyIC45IDIgMiAyem0wIDJjLTEuMSAwLTIgLjktMiAycy45IDIgMiAyIDItLjkgMi0yLS45LTItMi0yem0wIDZjLTEuMSAwLTIgLjktMiAycy45IDIgMiAyIDItLjkgMi0yLS45LTItMi0yeiIvPjwvc3ZnPg==';\nEditor.trashImage = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMThweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMThweCIgZmlsbD0iIzAwMDAwMCI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTE2IDl2MTBIOFY5aDhtLTEuNS02aC01bC0xIDFINXYyaDE0VjRoLTMuNWwtMS0xek0xOCA3SDZ2MTJjMCAxLjEuOSAyIDIgMmg4YzEuMSAwIDItLjkgMi0yVjd6Ii8+PC9zdmc+';\nEditor.hiddenImage = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMThweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMThweCIgZmlsbD0iIzAwMDAwMCI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6bTAgMGgyNHYyNEgwVjB6bTAgMGgyNHYyNEgwVjB6bTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTEyIDZjMy43OSAwIDcuMTcgMi4xMyA4LjgyIDUuNS0uNTkgMS4yMi0xLjQyIDIuMjctMi40MSAzLjEybDEuNDEgMS40MWMxLjM5LTEuMjMgMi40OS0yLjc3IDMuMTgtNC41M0MyMS4yNyA3LjExIDE3IDQgMTIgNGMtMS4yNyAwLTIuNDkuMi0zLjY0LjU3bDEuNjUgMS42NUMxMC42NiA2LjA5IDExLjMyIDYgMTIgNnptLTEuMDcgMS4xNEwxMyA5LjIxYy41Ny4yNSAxLjAzLjcxIDEuMjggMS4yOGwyLjA3IDIuMDdjLjA4LS4zNC4xNC0uNy4xNC0xLjA3QzE2LjUgOS4wMSAxNC40OCA3IDEyIDdjLS4zNyAwLS43Mi4wNS0xLjA3LjE0ek0yLjAxIDMuODdsMi42OCAyLjY4QzMuMDYgNy44MyAxLjc3IDkuNTMgMSAxMS41IDIuNzMgMTUuODkgNyAxOSAxMiAxOWMxLjUyIDAgMi45OC0uMjkgNC4zMi0uODJsMy40MiAzLjQyIDEuNDEtMS40MUwzLjQyIDIuNDUgMi4wMSAzLjg3em03LjUgNy41bDIuNjEgMi42MWMtLjA0LjAxLS4wOC4wMi0uMTIuMDItMS4zOCAwLTIuNS0xLjEyLTIuNS0yLjUgMC0uMDUuMDEtLjA4LjAxLS4xM3ptLTMuNC0zLjRsMS43NSAxLjc1Yy0uMjMuNTUtLjM2IDEuMTUtLjM2IDEuNzggMCAyLjQ4IDIuMDIgNC41IDQuNSA0LjUuNjMgMCAxLjIzLS4xMyAxLjc3LS4zNmwuOTguOThjLS44OC4yNC0xLjguMzgtMi43NS4zOC0zLjc5IDAtNy4xNy0yLjEzLTguODItNS41LjctMS40MyAxLjcyLTIuNjEgMi45My0zLjUzeiIvPjwvc3ZnPg==';\nEditor.visibleImage = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMThweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMThweCIgZmlsbD0iIzAwMDAwMCI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTEyIDZjMy43OSAwIDcuMTcgMi4xMyA4LjgyIDUuNUMxOS4xNyAxNC44NyAxNS43OSAxNyAxMiAxN3MtNy4xNy0yLjEzLTguODItNS41QzQuODMgOC4xMyA4LjIxIDYgMTIgNm0wLTJDNyA0IDIuNzMgNy4xMSAxIDExLjUgMi43MyAxNS44OSA3IDE5IDEyIDE5czkuMjctMy4xMSAxMS03LjVDMjEuMjcgNy4xMSAxNyA0IDEyIDR6bTAgNWMxLjM4IDAgMi41IDEuMTIgMi41IDIuNVMxMy4zOCAxNCAxMiAxNHMtMi41LTEuMTItMi41LTIuNVMxMC42MiA5IDEyIDltMC0yYy0yLjQ4IDAtNC41IDIuMDItNC41IDQuNVM5LjUyIDE2IDEyIDE2czQuNS0yLjAyIDQuNS00LjVTMTQuNDggNyAxMiA3eiIvPjwvc3ZnPg==';\nEditor.lockedImage = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMThweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMThweCIgZmlsbD0iIzAwMDAwMCI+PGcgZmlsbD0ibm9uZSI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6Ii8+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBvcGFjaXR5PSIuODciLz48L2c+PHBhdGggZD0iTTE4IDhoLTFWNmMwLTIuNzYtMi4yNC01LTUtNVM3IDMuMjQgNyA2djJINmMtMS4xIDAtMiAuOS0yIDJ2MTBjMCAxLjEuOSAyIDIgMmgxMmMxLjEgMCAyLS45IDItMlYxMGMwLTEuMS0uOS0yLTItMnpNOSA2YzAtMS42NiAxLjM0LTMgMy0zczMgMS4zNCAzIDN2Mkg5VjZ6bTkgMTRINlYxMGgxMnYxMHptLTYtM2MxLjEgMCAyLS45IDItMnMtLjktMi0yLTItMiAuOS0yIDIgLjkgMiAyIDJ6Ii8+PC9zdmc+';\nEditor.unlockedImage = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMjRweCIgZmlsbD0iIzAwMDAwMCI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTE4IDhoLTFWNmMwLTIuNzYtMi4yNC01LTUtNVM3IDMuMjQgNyA2aDJjMC0xLjY2IDEuMzQtMyAzLTNzMyAxLjM0IDMgM3YySDZjLTEuMSAwLTIgLjktMiAydjEwYzAgMS4xLjkgMiAyIDJoMTJjMS4xIDAgMi0uOSAyLTJWMTBjMC0xLjEtLjktMi0yLTJ6bTAgMTJINlYxMGgxMnYxMHptLTYtM2MxLjEgMCAyLS45IDItMnMtLjktMi0yLTItMiAuOS0yIDIgLjkgMiAyIDJ6Ii8+PC9zdmc+';\nEditor.printImage = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMThweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMThweCIgZmlsbD0iIzAwMDAwMCI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTE5IDhoLTFWM0g2djVINWMtMS42NiAwLTMgMS4zNC0zIDN2Nmg0djRoMTJ2LTRoNHYtNmMwLTEuNjYtMS4zNC0zLTMtM3pNOCA1aDh2M0g4VjV6bTggMTJ2Mkg4di00aDh2MnptMi0ydi0ySDZ2Mkg0di00YzAtLjU1LjQ1LTEgMS0xaDE0Yy41NSAwIDEgLjQ1IDEgMXY0aC0yeiIvPjxjaXJjbGUgY3g9IjE4IiBjeT0iMTEuNSIgcj0iMSIvPjwvc3ZnPg==';\nEditor.refreshImage = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMThweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMThweCIgZmlsbD0iIzAwMDAwMCI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTE3LjY1IDYuMzVDMTYuMiA0LjkgMTQuMjEgNCAxMiA0Yy00LjQyIDAtNy45OSAzLjU4LTcuOTkgOHMzLjU3IDggNy45OSA4YzMuNzMgMCA2Ljg0LTIuNTUgNy43My02aC0yLjA4Yy0uODIgMi4zMy0zLjA0IDQtNS42NSA0LTMuMzEgMC02LTIuNjktNi02czIuNjktNiA2LTZjMS42NiAwIDMuMTQuNjkgNC4yMiAxLjc4TDEzIDExaDdWNGwtMi4zNSAyLjM1eiIvPjwvc3ZnPg==';\nEditor.backImage = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMThweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMThweCIgZmlsbD0iIzAwMDAwMCI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIiBvcGFjaXR5PSIuODciLz48cGF0aCBkPSJNMTcuNTEgMy44N0wxNS43MyAyLjEgNS44NCAxMmw5LjkgOS45IDEuNzctMS43N0w5LjM4IDEybDguMTMtOC4xM3oiLz48L3N2Zz4=';\nEditor.closeImage = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMThweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMThweCIgZmlsbD0iIzAwMDAwMCI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIiBvcGFjaXR5PSIuODciLz48cGF0aCBkPSJNMTIgMkM2LjQ3IDIgMiA2LjQ3IDIgMTJzNC40NyAxMCAxMCAxMCAxMC00LjQ3IDEwLTEwUzE3LjUzIDIgMTIgMnptMCAxOGMtNC40MSAwLTgtMy41OS04LThzMy41OS04IDgtOCA4IDMuNTkgOCA4LTMuNTkgOC04IDh6bTMuNTktMTNMMTIgMTAuNTkgOC40MSA3IDcgOC40MSAxMC41OSAxMiA3IDE1LjU5IDguNDEgMTcgMTIgMTMuNDEgMTUuNTkgMTcgMTcgMTUuNTkgMTMuNDEgMTIgMTcgOC40MXoiLz48L3N2Zz4='\nEditor.closeBlackImage = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjZweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMjZweCI+PGVsbGlwc2UgY3g9IjEyIiBjeT0iMTIiIHJ4PSI5IiByeT0iOSIgc3Ryb2tlPSJub25lIiBmaWxsPSIjMDAwIi8+PHBhdGggZmlsbD0iI2ZmZiIgZD0iTTE0LjU5IDhMMTIgMTAuNTkgOS40MSA4IDggOS40MSAxMC41OSAxMiA4IDE0LjU5IDkuNDEgMTYgMTIgMTMuNDEgMTQuNTkgMTYgMTYgMTQuNTkgMTMuNDEgMTIgMTYgOS40MSAxNC41OSA4ek0xMiAyQzYuNDcgMiAyIDYuNDcgMiAxMnM0LjQ3IDEwIDEwIDEwIDEwLTQuNDcgMTAtMTBTMTcuNTMgMiAxMiAyem0wIDE4Yy00LjQxIDAtOC0zLjU5LTgtOHMzLjU5LTggOC04IDggMy41OSA4IDgtMy41OSA4LTggOHoiLz48L3N2Zz4=';\nEditor.minusImage = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iNDgiIHdpZHRoPSI0OCI+PHBhdGggZD0iTTEwIDI1LjV2LTNoMjh2M1oiLz48L3N2Zz4=';\nEditor.plusImage = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTkgMTNoLTZ2NmgtMnYtNkg1di0yaDZWNWgydjZoNnYyeiIvPjwvc3ZnPg==';\nEditor.addBoxImage = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjQiIHdpZHRoPSIyNCI+PHBhdGggZD0iTTExIDE3aDJ2LTRoNHYtMmgtNFY3aC0ydjRIN3YyaDRabS02IDRxLS44MjUgMC0xLjQxMy0uNTg3UTMgMTkuODI1IDMgMTlWNXEwLS44MjUuNTg3LTEuNDEzUTQuMTc1IDMgNSAzaDE0cS44MjUgMCAxLjQxMy41ODdRMjEgNC4xNzUgMjEgNXYxNHEwIC44MjUtLjU4NyAxLjQxM1ExOS44MjUgMjEgMTkgMjFabTAtMmgxNFY1SDV2MTRaTTUgNXYxNFY1WiIvPjwvc3ZnPg==';\nEditor.shapesImage = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjQiIHdpZHRoPSIyNCI+PHBhdGggZD0iTTE1IDE1Wm0tNyAyLjk1cS4yNS4wMjUuNDg4LjAzOFE4LjcyNSAxOCA5IDE4dC41MTItLjAxMnEuMjM4LS4wMTMuNDg4LS4wMzhWMjBoMTBWMTBoLTIuMDVxLjAyNS0uMjUuMDM4LS40ODhRMTggOS4yNzUgMTggOXQtLjAxMi0uNTEyUTE3Ljk3NSA4LjI1IDE3Ljk1IDhIMjBxLjgyNSAwIDEuNDEzLjU4N1EyMiA5LjE3NSAyMiAxMHYxMHEwIC44MjUtLjU4NyAxLjQxM1EyMC44MjUgMjIgMjAgMjJIMTBxLS44MjUgMC0xLjQxMi0uNTg3UTggMjAuODI1IDggMjBaTTkgMTZxLTIuOTI1IDAtNC45NjMtMi4wMzhRMiAxMS45MjUgMiA5dDIuMDM3LTQuOTYzUTYuMDc1IDIgOSAycTIuOTI1IDAgNC45NjMgMi4wMzdRMTYgNi4wNzUgMTYgOXEwIDIuOTI1LTIuMDM3IDQuOTYyUTExLjkyNSAxNiA5IDE2Wm0wLTJxMi4wNzUgMCAzLjUzOC0xLjQ2M1ExNCAxMS4wNzUgMTQgOXQtMS40NjItMy41MzdRMTEuMDc1IDQgOSA0IDYuOTI1IDQgNS40NjMgNS40NjMgNCA2LjkyNSA0IDl0MS40NjMgMy41MzdRNi45MjUgMTQgOSAxNFptMC01WiIvPjwvc3ZnPg==';\nEditor.formatImage = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjQiIHdpZHRoPSIyNCI+PHBhdGggZD0iTTExIDIycS0uODI1IDAtMS40MTItLjU4N1E5IDIwLjgyNSA5IDIwdi00SDZxLS44MjUgMC0xLjQxMi0uNTg4UTQgMTQuODI1IDQgMTRWN3EwLTEuNjUgMS4xNzUtMi44MjVRNi4zNSAzIDggM2gxMnYxMXEwIC44MjUtLjU4NyAxLjQxMlExOC44MjUgMTYgMTggMTZoLTN2NHEwIC44MjUtLjU4NyAxLjQxM1ExMy44MjUgMjIgMTMgMjJaTTYgMTBoMTJWNWgtMXY0aC0yVjVoLTF2MmgtMlY1SDhxLS44MjUgMC0xLjQxMi41ODhRNiA2LjE3NSA2IDdabTAgNGgxMnYtMkg2djJabTAtMnYyWiIvPjwvc3ZnPg==';\nEditor.freehandImage = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMjRweCIgZmlsbD0iIzAwMDAwMCI+PHJlY3QgZmlsbD0ibm9uZSIgaGVpZ2h0PSIyNCIgd2lkdGg9IjI0Ii8+PHBhdGggZD0iTTQuNSw4YzEuMDQsMCwyLjM0LTEuNSw0LjI1LTEuNWMxLjUyLDAsMi43NSwxLjIzLDIuNzUsMi43NWMwLDIuMDQtMS45OSwzLjE1LTMuOTEsNC4yMkM1LjQyLDE0LjY3LDQsMTUuNTcsNCwxNyBjMCwxLjEsMC45LDIsMiwydjJjLTIuMjEsMC00LTEuNzktNC00YzAtMi43MSwyLjU2LTQuMTQsNC42Mi01LjI4YzEuNDItMC43OSwyLjg4LTEuNiwyLjg4LTIuNDdjMC0wLjQxLTAuMzQtMC43NS0wLjc1LTAuNzUgQzcuNSw4LjUsNi4yNSwxMCw0LjUsMTBDMy4xMiwxMCwyLDguODgsMiw3LjVDMiw1LjQ1LDQuMTcsMi44Myw1LDJsMS40MSwxLjQxQzUuNDEsNC40Miw0LDYuNDMsNCw3LjVDNCw3Ljc4LDQuMjIsOCw0LjUsOHogTTgsMjEgbDMuNzUsMGw4LjA2LTguMDZsLTMuNzUtMy43NUw4LDE3LjI1TDgsMjF6IE0xMCwxOC4wOGw2LjA2LTYuMDZsMC45MiwwLjkyTDEwLjkyLDE5TDEwLDE5TDEwLDE4LjA4eiBNMjAuMzcsNi4yOSBjLTAuMzktMC4zOS0xLjAyLTAuMzktMS40MSwwbC0xLjgzLDEuODNsMy43NSwzLjc1bDEuODMtMS44M2MwLjM5LTAuMzksMC4zOS0xLjAyLDAtMS40MUwyMC4zNyw2LjI5eiIvPjwvc3ZnPg==';\nEditor.undoImage = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTIuNSA4Yy0yLjY1IDAtNS4wNS45OS02LjkgMi42TDIgN3Y5aDlsLTMuNjItMy42MmMxLjM5LTEuMTYgMy4xNi0xLjg4IDUuMTItMS44OCAzLjU0IDAgNi41NSAyLjMxIDcuNiA1LjVsMi4zNy0uNzhDMjEuMDggMTEuMDMgMTcuMTUgOCAxMi41IDh6Ii8+PC9zdmc+';\nEditor.redoImage = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTguNCAxMC42QzE2LjU1IDguOTkgMTQuMTUgOCAxMS41IDhjLTQuNjUgMC04LjU4IDMuMDMtOS45NiA3LjIyTDMuOSAxNmMxLjA1LTMuMTkgNC4wNS01LjUgNy42LTUuNSAxLjk1IDAgMy43My43MiA1LjEyIDEuODhMMTMgMTZoOVY3bC0zLjYgMy42eiIvPjwvc3ZnPg==';\nEditor.outlineImage = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjQiIHdpZHRoPSIyNCI+PHBhdGggZD0ibTE1IDIxLTYtMi4xLTQuNjUgMS44cS0uNS4yLS45MjUtLjExM1EzIDIwLjI3NSAzIDE5Ljc1di0xNHEwLS4zMjUuMTg4LS41NzUuMTg3LS4yNS41MTItLjM3NUw5IDNsNiAyLjEgNC42NS0xLjhxLjUtLjIuOTI1LjExMi40MjUuMzEzLjQyNS44Mzh2MTRxMCAuMzI1LS4xODguNTc1LS4xODcuMjUtLjUxMi4zNzVabS0xLTIuNDVWNi44NWwtNC0xLjR2MTEuN1ptMiAwIDMtMVY1LjdsLTMgMS4xNVpNNSAxOC4zbDMtMS4xNVY1LjQ1bC0zIDFaTTE2IDYuODV2MTEuN1ptLTgtMS40djExLjdaIi8+PC9zdmc+';\nEditor.saveImage = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMThweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMThweCIgZmlsbD0iIzAwMDAwMCI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTE5IDEydjdINXYtN0gzdjdjMCAxLjEuOSAyIDIgMmgxNGMxLjEgMCAyLS45IDItMnYtN2gtMnptLTYgLjY3bDIuNTktMi41OEwxNyAxMS41bC01IDUtNS01IDEuNDEtMS40MUwxMSAxMi42N1YzaDJ2OS42N3oiLz48L3N2Zz4=';\nEditor.compareImage = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iNDgiIHdpZHRoPSI0OCI+PHBhdGggZD0ibTE1Ljg1IDQwLTIuMS0yLjEgNi4wNS02LjA1SDR2LTNoMTUuOGwtNi4wNS02LjA1IDIuMS0yLjEgOS42NSA5LjY1Wm0xNi4zLTEyLjctOS42NS05LjY1TDMyLjE1IDhsMi4xIDIuMS02LjA1IDYuMDVINDR2M0gyOC4ybDYuMDUgNi4wNVoiLz48L3N2Zz4=';\nEditor.expandMoreImage = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjQiIHdpZHRoPSIyNCI+PHBhdGggZD0ibTEyIDE1LjM3NS02LTYgMS40LTEuNCA0LjYgNC42IDQuNi00LjYgMS40IDEuNFoiLz48L3N2Zz4=';\nEditor.expandLessImage = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjQiIHdpZHRoPSIyNCI+PHBhdGggZD0ibTcuNCAxNS4zNzUtMS40LTEuNCA2LTYgNiA2LTEuNCAxLjQtNC42LTQuNloiLz48L3N2Zz4=';\nEditor.gearImage = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjQiIHdpZHRoPSIyNCI+PHBhdGggZD0ibTkuMjUgMjItLjQtMy4ycS0uMzI1LS4xMjUtLjYxMi0uMy0uMjg4LS4xNzUtLjU2My0uMzc1TDQuNyAxOS4zNzVsLTIuNzUtNC43NSAyLjU3NS0xLjk1UTQuNSAxMi41IDQuNSAxMi4zMzd2LS42NzVxMC0uMTYyLjAyNS0uMzM3TDEuOTUgOS4zNzVsMi43NS00Ljc1IDIuOTc1IDEuMjVxLjI3NS0uMi41NzUtLjM3NS4zLS4xNzUuNi0uM2wuNC0zLjJoNS41bC40IDMuMnEuMzI1LjEyNS42MTMuMy4yODcuMTc1LjU2Mi4zNzVsMi45NzUtMS4yNSAyLjc1IDQuNzUtMi41NzUgMS45NXEuMDI1LjE3NS4wMjUuMzM3di42NzVxMCAuMTYzLS4wNS4zMzhsMi41NzUgMS45NS0yLjc1IDQuNzUtMi45NS0xLjI1cS0uMjc1LjItLjU3NS4zNzUtLjMuMTc1LS42LjNsLS40IDMuMlptMi44LTYuNXExLjQ1IDAgMi40NzUtMS4wMjVRMTUuNTUgMTMuNDUgMTUuNTUgMTJxMC0xLjQ1LTEuMDI1LTIuNDc1UTEzLjUgOC41IDEyLjA1IDguNXEtMS40NzUgMC0yLjQ4OCAxLjAyNVE4LjU1IDEwLjU1IDguNTUgMTJxMCAxLjQ1IDEuMDEyIDIuNDc1UTEwLjU3NSAxNS41IDEyLjA1IDE1LjVabTAtMnEtLjYyNSAwLTEuMDYyLS40MzgtLjQzOC0uNDM3LS40MzgtMS4wNjJ0LjQzOC0xLjA2MnEuNDM3LS40MzggMS4wNjItLjQzOHQxLjA2My40MzhxLjQzNy40MzcuNDM3IDEuMDYydC0uNDM3IDEuMDYycS0uNDM4LjQzOC0xLjA2My40MzhaTTEyIDEyWm0tMSA4aDEuOTc1bC4zNS0yLjY1cS43NzUtLjIgMS40MzgtLjU4OC42NjItLjM4NyAxLjIxMi0uOTM3bDIuNDc1IDEuMDI1Ljk3NS0xLjctMi4xNS0xLjYyNXEuMTI1LS4zNS4xNzUtLjczOC4wNS0uMzg3LjA1LS43ODd0LS4wNS0uNzg4cS0uMDUtLjM4Ny0uMTc1LS43MzdsMi4xNS0xLjYyNS0uOTc1LTEuNy0yLjQ3NSAxLjA1cS0uNTUtLjU3NS0xLjIxMi0uOTYzLS42NjMtLjM4Ny0xLjQzOC0uNTg3TDEzIDRoLTEuOTc1bC0uMzUgMi42NXEtLjc3NS4yLTEuNDM3LjU4Ny0uNjYzLjM4OC0xLjIxMy45MzhMNS41NSA3LjE1bC0uOTc1IDEuNyAyLjE1IDEuNnEtLjEyNS4zNzUtLjE3NS43NS0uMDUuMzc1LS4wNS44IDAgLjQuMDUuNzc1dC4xNzUuNzVsLTIuMTUgMS42MjUuOTc1IDEuNyAyLjQ3NS0xLjA1cS41NS41NzUgMS4yMTMuOTYyLjY2Mi4zODggMS40MzcuNTg4WiIvPjwvc3ZnPg==';\nEditor.extensionImage = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjQiIHdpZHRoPSIyNCI+PHBhdGggZD0iTTguOCAyMUg1cS0uODI1IDAtMS40MTMtLjU4N1EzIDE5LjgyNSAzIDE5di0zLjhxMS4yIDAgMi4xLS43NjIuOS0uNzYzLjktMS45MzggMC0xLjE3NS0uOS0xLjkzOFE0LjIgOS44IDMgOS44VjZxMC0uODI1LjU4Ny0xLjQxMlE0LjE3NSA0IDUgNGg0cTAtMS4wNS43MjUtMS43NzVRMTAuNDUgMS41IDExLjUgMS41cTEuMDUgMCAxLjc3NS43MjVRMTQgMi45NSAxNCA0aDRxLjgyNSAwIDEuNDEzLjU4OFEyMCA1LjE3NSAyMCA2djRxMS4wNSAwIDEuNzc1LjcyNS43MjUuNzI1LjcyNSAxLjc3NSAwIDEuMDUtLjcyNSAxLjc3NVEyMS4wNSAxNSAyMCAxNXY0cTAgLjgyNS0uNTg3IDEuNDEzUTE4LjgyNSAyMSAxOCAyMWgtMy44cTAtMS4yNS0uNzg3LTIuMTI1UTEyLjYyNSAxOCAxMS41IDE4dC0xLjkxMi44NzVROC44IDE5Ljc1IDguOCAyMVpNNSAxOWgyLjEyNXEuNi0xLjY1IDEuOTI1LTIuMzI1UTEwLjM3NSAxNiAxMS41IDE2cTEuMTI1IDAgMi40NS42NzUgMS4zMjUuNjc1IDEuOTI1IDIuMzI1SDE4di02aDJxLjIgMCAuMzUtLjE1LjE1LS4xNS4xNS0uMzUgMC0uMi0uMTUtLjM1UTIwLjIgMTIgMjAgMTJoLTJWNmgtNlY0cTAtLjItLjE1LS4zNS0uMTUtLjE1LS4zNS0uMTUtLjIgMC0uMzUuMTVRMTEgMy44IDExIDR2Mkg1djIuMnExLjM1LjUgMi4xNzUgMS42NzVROCAxMS4wNSA4IDEyLjVxMCAxLjQyNS0uODI1IDIuNlQ1IDE2LjhabTcuNzUtNy43NVoiLz48L3N2Zz4=';\nEditor.colorDropperImage = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iNDgiIHdpZHRoPSI0OCI+PHBhdGggZD0iTTYgNDJ2LTguNGwxOC44NS0xOC44NS0zLjYtMy42TDIzLjMgOS4xbDQuNiA0LjZMMzUgNi42cS41NS0uNTUgMS4xNzUtLjU1dDEuMTc1LjU1bDQuMDUgNC4wNXEuNTUuNTUuNTUgMS4xNzVUNDEuNCAxM2wtNy4xIDcuMSA0LjYgNC42LTIuMDUgMi4wNS0zLjYtMy42TDE0LjQgNDJabTMtM2g0LjM1TDMxLjEgMjEuMjVsLTQuMzUtNC4zNUw5IDM0LjY1Wm0yMy4xNS0yMSA2LjItNi4yLTIuMTUtMi4xNS02LjIgNi4yWm0wIDBMMzAgMTUuODUgMzIuMTUgMThaIi8+PC9zdmc+';\nEditor.helpImage = Editor.lightHelpImage;\nEditor.checkmarkImage = Editor.lightCheckmarkImage;\n\n/**\n * All fill styles supported by rough.js.\n */\nEditor.roughFillStyles = [{val: 'auto', dispName: 'Auto'}, {val: 'hachure', dispName: 'Hachure'},\n\t{val: 'solid', dispName: 'Solid'}, {val: 'zigzag', dispName: 'ZigZag'},\n\t{val: 'cross-hatch', dispName: 'Cross Hatch'}, {val: 'dashed', dispName: 'Dashed'},\n\t{val: 'zigzag-line', dispName: 'ZigZag Line'}];\n\n/**\n * Fill styles for normal mode.\n */\nEditor.fillStyles = [{val: 'auto', dispName: 'Auto'}, {val: 'hatch', dispName: 'Hatch'},\n\t{val: 'solid', dispName: 'Solid'}, {val: 'dots', dispName: 'Dots'}, \n\t{val: 'cross-hatch', dispName: 'Cross Hatch'}, {val: 'dashed', dispName: 'Dashed'},\n\t{val: 'zigzag-line', dispName: 'ZigZag Line'}];\n\n/**\n * Graph themes for the format panel.\n */\nEditor.themes = null;\n\n/**\n * Specifies the image URL to be used for the transparent background.\n */\nEditor.ctrlKey = (mxClient.IS_MAC) ? 'Cmd' : 'Ctrl';\n\n/**\n * Specifies the image URL to be used for the transparent background.\n */\nEditor.hintOffset = 20;\n\n/**\n * Delay in ms to show shape picker on hover over blue arrows.\n */\nEditor.shapePickerHoverDelay = 300;\n\n/**\n * Specifies the image URL to be used for the transparent background.\n */\nEditor.fitWindowBorders = null;\n\n/**\n * Specifies if the diagram should be saved automatically if possible. Default\n * is true.\n */\nEditor.popupsAllowed = window.urlParams != null? urlParams['noDevice'] != '1' : true;\n\n/**\n * Specifies if the html and whiteSpace styles should be removed on inserted cells.\n */\nEditor.simpleLabels = false;\n\t\n/**\n * Specifies if the native clipboard is enabled. Blocked in iframes for possible sandbox attribute.\n * LATER: Check if actually blocked.\n */\nEditor.enableNativeCipboard = window == window.top && !mxClient.IS_FF && navigator.clipboard != null;\n\t\t\n/**\n * Dynamic change of dark mode for minimal and sketch theme.\n */\nEditor.sketchMode = false;\n\n/**\n * Dynamic change of dark mode for minimal and sketch theme.\n */\nEditor.darkMode = false;\n\n/**\n * Dynamic change of dark mode for minimal and sketch theme.\n */\n//Editor.currentTheme = uiTheme;\n\n/**\n * Dynamic change of dark mode for minimal and sketch theme.\n */\nEditor.darkColor = '#18141D';\n\n/**\n * Dynamic change of dark mode for minimal and sketch theme.\n */\nEditor.lightColor = '#f0f0f0';\n  \n/**\n * Returns the current state of the dark mode.\n */\nEditor.isDarkMode = function(value)\n{\n\treturn Editor.darkMode;\n};\n\n/**\n * Returns true if the given URL is a PNG data URL.\n */\nEditor.isPngDataUrl = function(url)\n{\n\treturn url != null && url.substring(0, 15) == 'data:image/png;'\n};\n\n/**\n * Returns true if the given binary data is a PNG file.\n */\nEditor.isPngData = function(data)\n{\n\treturn data.length > 8 && data.charCodeAt(0) == 137 && data.charCodeAt(1) == 80 &&\n\t\tdata.charCodeAt(2) == 78 && data.charCodeAt(3) == 71 && data.charCodeAt(4) == 13 &&\n\t\tdata.charCodeAt(5) == 10 && data.charCodeAt(6) == 26 && data.charCodeAt(7) == 10;\n};\n\n/**\n * Converts HTML to plain text.\n */\nEditor.convertHtmlToText = function(label)\n{\n\tif (label != null)\n\t{\n\t\tvar temp = document.createElement('div');\n\t\ttemp.innerHTML = Graph.sanitizeHtml(label);\n\n\t\treturn mxUtils.extractTextWithWhitespace(temp.childNodes)\n\t}\n\telse\n\t{\n\t\treturn null;\n\t}\n};\n\n/**\n * Extracts the XML from the compressed or non-compressed text chunk.\n */\nEditor.extractGraphModelFromPng = function(data)\n{\n\tvar result = null;\n\t\n\ttry\n\t{\n\t\tvar base64 = data.substring(data.indexOf(',') + 1);\n\n\t\t// Workaround for invalid character error in Safari\n\t\tvar binary = (window.atob && !mxClient.IS_SF) ? atob(base64) : Base64.decode(base64, true);\n\t\t\n\t\tEditorUi.parsePng(binary, mxUtils.bind(this, function(pos, type, length)\n\t\t{\n\t\t\tvar value = binary.substring(pos + 8, pos + 8 + length);\n\t\t\t\n\t\t\tif (type == 'zTXt')\n\t\t\t{\n\t\t\t\tvar idx = value.indexOf(String.fromCharCode(0));\n\t\t\t\t\n\t\t\t\tif (value.substring(0, idx) == 'mxGraphModel')\n\t\t\t\t{\n\t\t\t\t\t// Workaround for Java URL Encoder using + for spaces, which isn't compatible with JS\n\t\t\t\t\tvar xmlData = pako.inflateRaw(Graph.stringToArrayBuffer(\n\t\t\t\t\t\tvalue.substring(idx + 2)), {to: 'string'}).replace(/\\+/g,' ');\n\t\t\t\t\t\n\t\t\t\t\tif (xmlData != null && xmlData.length > 0)\n\t\t\t\t\t{\n\t\t\t\t\t\tresult = xmlData;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Uncompressed section is normally not used\n\t\t\telse if (type == 'tEXt')\n\t\t\t{\n\t\t\t\tvar vals = value.split(String.fromCharCode(0));\n\t\t\t\t\n\t\t\t\tif (vals.length > 1 && (vals[0] == 'mxGraphModel' ||\n\t\t\t\t\tvals[0] == 'mxfile'))\n\t\t\t\t{\n\t\t\t\t\tresult = vals[1];\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif (result != null || type == 'IDAT')\n\t\t\t{\n\t\t\t\t// Stops processing the file as our text chunks\n\t\t\t\t// are always placed before the data section\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}));\n\t}\n\tcatch (e)\n\t{\n\t\t// ignores decoding errors\n\t}\n\t\n\tif (result != null && result.charAt(0) == '%')\n\t{\n\t\tresult = decodeURIComponent(result);\n\t}\n\t\n\t// Workaround for double encoded content\n\tif (result != null && result.charAt(0) == '%')\n\t{\n\t\tresult = decodeURIComponent(result);\n\t}\n\t\n\treturn result;\n};\n\n/**\n * Soundex algorithm for strings.\n * See https://www.codedrome.com/the-soundex-algorithm-in-javascript/\n */\nEditor.soundex = function(name)\n{\n\tif (name == null || name.length == 0)\n\t{\n\t\treturn '';\n\t}\n\telse\n\t{\n\t\tvar s = [];\n\t\tvar si = 1;\n\t\tvar c;\n\n\t\t// Changed: s maps to 0 not 2 to ignore plurals\n\t\t//              ABCDEFGHIJKLMNOPQRSTUVWXYZ\n\t\tvar mappings = '01230120022455012603010202';\n\n\t\ts[0] = name[0].toUpperCase();\n\n\t\tfor(var i = 1, l = name.length; i < l; i++)\n\t\t{\n\t\t\tc = (name[i].toUpperCase()).charCodeAt(0) - 65;\n\n\t\t\tif(c >= 0 && c <= 25)\n\t\t\t{\n\t\t\t\tif(mappings[c] != '0')\n\t\t\t\t{\n\t\t\t\t\tif(mappings[c] != s[si-1])\n\t\t\t\t\t{\n\t\t\t\t\t\ts[si] = mappings[c];\n\t\t\t\t\t\tsi++;\n\t\t\t\t\t}\n\n\t\t\t\t\tif(si > 3)\n\t\t\t\t\t{\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif(si <= 3)\n\t\t{\n\t\t\twhile(si <= 3)\n\t\t\t{\n\t\t\t\ts[si] = '0';\n\t\t\t\tsi++;\n\t\t\t}\n\t\t}\n\n\t\treturn s.join('');\n\t}\n};\n\n/**\n * Selects the given part of the input element.\n */\nEditor.selectFilename = function(input)\n{\n\tvar end = input.value.lastIndexOf('.');\n\n\tif (end > 0)\n\t{\n\t\tvar ext = input.value.substring(end + 1);\n\n\t\tif (ext != 'drawio')\n\t\t{\n\t\t\tif (mxUtils.indexOf(['png', 'svg', 'html', 'xml', 'pdf'], ext) >= 0)\n\t\t\t{\n\t\t\t\tvar temp = input.value.lastIndexOf('.drawio.', end);\n\n\t\t\t\tif (temp > 0)\n\t\t\t\t{\n\t\t\t\t\tend = temp;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t\n\tend = (end > 0) ? end : input.value.length;\n\tEditor.selectSubstring(input, 0, end);\n};\n\n/**\n * Selects the given part of the input element.\n */\nEditor.selectSubstring = function(input, startPos, endPos)\n{\n\tinput.focus();\n\n\tif (typeof input.selectionStart != 'undefined')\n\t{\n\t\tinput.selectionStart = startPos;\n\t\tinput.selectionEnd = endPos;\n\t}\n\telse if (document.selection && document.selection.createRange)\n\t{\n\t\t// IE branch\n\t\tinput.select();\n\t\tvar range = document.selection.createRange();\n\t\trange.collapse(true);\n\t\trange.moveEnd('character', endPos);\n\t\trange.moveStart('character', startPos);\n\t\trange.select();\n\t}\n};\n\n/**\n * Editor inherits from mxEventSource\n */\nmxUtils.extend(Editor, mxEventSource);\n\n/**\n * Stores initial state of mxClient.NO_FO.\n */\nEditor.prototype.originalNoForeignObject = mxClient.NO_FO;\n\n/**\n * Specifies the image URL to be used for the transparent background.\n */\nEditor.prototype.transparentImage = (mxClient.IS_SVG) ? 'data:image/gif;base64,R0lGODlhMAAwAIAAAP///wAAACH5BAEAAAAALAAAAAAwADAAAAIxhI+py+0Po5y02ouz3rz7D4biSJbmiabqyrbuC8fyTNf2jef6zvf+DwwKh8Si8egpAAA7' :\n\tIMAGE_PATH + '/transparent.gif';\n\n/**\n * Specifies if the canvas should be extended in all directions. Default is true.\n */\nEditor.prototype.extendCanvas = true;\n\n/**\n * Specifies if the app should run in chromeless mode. Default is false.\n * This default is only used if the contructor argument is null.\n */\nEditor.prototype.chromeless = false;\n\n/**\n * Specifies the order of OK/Cancel buttons in dialogs. Default is true.\n * Cancel first is used on Macs, Windows/Confluence uses cancel last.\n */\nEditor.prototype.cancelFirst = true;\n\n/**\n * Specifies if the editor is enabled. Default is true.\n */\nEditor.prototype.enabled = true;\n\n/**\n * Contains the name which was used for the last save. Default value is null.\n */\nEditor.prototype.filename = null;\n\n/**\n * Contains the current modified state of the diagram. This is false for\n * new diagrams and after the diagram was saved.\n */\nEditor.prototype.modified = false;\n\n/**\n * Specifies if the diagram should be saved automatically if possible. Default\n * is true.\n */\nEditor.prototype.autosave = true;\n\n/**\n * Specifies the top spacing for the initial page view. Default is 0.\n */\nEditor.prototype.initialTopSpacing = 0;\n\n/**\n * Specifies the app name. Default is document.title.\n */\nEditor.prototype.appName = document.title;\n\n/**\n * \n */\nEditor.prototype.editBlankUrl = window.location.protocol + '//' + window.location.host + '/';\n\n/**\n * Default value for the graph container overflow style.\n */\nEditor.prototype.defaultGraphOverflow = 'hidden';\n\n/**\n * Initializes the environment.\n */\nEditor.prototype.init = function() { };\n\n/**\n * Sets the XML node for the current diagram.\n */\nEditor.prototype.isChromelessView = function()\n{\n\treturn this.chromeless;\n};\n\n/**\n * Sets the XML node for the current diagram.\n */\nEditor.prototype.setAutosave = function(value)\n{\n\tthis.autosave = value;\n\tthis.fireEvent(new mxEventObject('autosaveChanged'));\n};\n\n/**\n * \n */\nEditor.prototype.getEditBlankUrl = function(params)\n{\n\treturn this.editBlankUrl + params;\n}\n\n/**\n * \n */\nEditor.prototype.editAsNew = function(xml, title)\n{\n\tvar p = (title != null) ? '?title=' + encodeURIComponent(title) : '';\n\t\n\tif (urlParams['ui'] != null)\n\t{\n\t\tp += ((p.length > 0) ? '&' : '?') + 'ui=' + urlParams['ui'];\n\t}\n\t\n\tif (typeof window.postMessage !== 'undefined' &&\n\t\t(document.documentMode == null ||\n\t\tdocument.documentMode >= 10))\n\t{\n\t\tvar wnd = null;\n\t\t\n\t\tvar l = mxUtils.bind(this, function(evt)\n\t\t{\n\t\t\tif (evt.data == 'ready' && evt.source == wnd)\n\t\t\t{\n\t\t\t\tmxEvent.removeListener(window, 'message', l);\n\t\t\t\twnd.postMessage(xml, '*');\n\t\t\t}\n\t\t});\n\t\t\t\n\t\tmxEvent.addListener(window, 'message', l);\n\t\twnd = this.graph.openLink(this.getEditBlankUrl(\n\t\t\tp + ((p.length > 0) ? '&' : '?') +\n\t\t\t'client=1'), null, true);\n\t}\n\telse\n\t{\n\t\tthis.graph.openLink(this.getEditBlankUrl(p) +\n\t\t\t'#R' + encodeURIComponent(xml));\n\t}\n};\n\n/**\n * Sets the XML node for the current diagram.\n */\nEditor.prototype.createGraph = function(themes, model)\n{\n\tvar graph = new Graph(null, model, null, null, themes);\n\tgraph.transparentBackground = false;\n\t\n\t// Disables CSS transforms in Safari in chromeless mode\n\tvar graphIsCssTransformsSupported = graph.isCssTransformsSupported;\n\tvar self = this;\n\n\tgraph.isCssTransformsSupported = function()\n\t{\n\t\treturn graphIsCssTransformsSupported.apply(this, arguments) &&\n\t\t\t(!self.chromeless || !mxClient.IS_SF);\n\t};\n\n\t// Opens all links in a new window while editing\n\tif (!this.chromeless)\n\t{\n\t\tgraph.isBlankLink = function(href)\n\t\t{\n\t\t\treturn !this.isExternalProtocol(href);\n\t\t};\n\t}\n\t\n\treturn graph;\n};\n\n/**\n * Sets the XML node for the current diagram.\n */\nEditor.prototype.resetGraph = function()\n{\n\tthis.graph.gridEnabled = this.graph.defaultGridEnabled && (!this.isChromelessView() || urlParams['grid'] == '1');\n\tthis.graph.graphHandler.guidesEnabled = true;\n\tthis.graph.setTooltips(true);\n\tthis.graph.setConnectable(true);\n\tthis.graph.foldingEnabled = true;\n\tthis.graph.scrollbars = this.graph.defaultScrollbars;\n\tthis.graph.pageVisible = this.graph.defaultPageVisible;\n\tthis.graph.pageBreaksVisible = this.graph.pageVisible; \n\tthis.graph.preferPageSize = this.graph.pageBreaksVisible;\n\tthis.graph.background = null;\n\tthis.graph.pageScale = mxGraph.prototype.pageScale;\n\tthis.graph.pageFormat = mxGraph.prototype.pageFormat;\n\tthis.graph.currentScale = 1;\n\tthis.graph.currentTranslate.x = 0;\n\tthis.graph.currentTranslate.y = 0;\n\tthis.updateGraphComponents();\n\tthis.graph.view.setScale(1);\n};\n\n/**\n * Sets the XML node for the current diagram.\n */\nEditor.prototype.readGraphState = function(node)\n{\n\tvar grid = node.getAttribute('grid');\n\t\n\tif (grid == null || grid == '')\n\t{\n\t\tgrid = this.graph.defaultGridEnabled ? '1' : '0';\n\t}\n\t\n\tthis.graph.gridEnabled = grid != '0' && (!this.isChromelessView() || urlParams['grid'] == '1');\n\tthis.graph.gridSize = parseFloat(node.getAttribute('gridSize')) || mxGraph.prototype.gridSize;\n\tthis.graph.graphHandler.guidesEnabled = node.getAttribute('guides') != '0';\n\tthis.graph.setTooltips(node.getAttribute('tooltips') != '0');\n\tthis.graph.setConnectable(node.getAttribute('connect') != '0');\n\tthis.graph.connectionArrowsEnabled = node.getAttribute('arrows') != '0';\n\tthis.graph.foldingEnabled = node.getAttribute('fold') != '0';\n\n\tif (this.isChromelessView() && this.graph.foldingEnabled)\n\t{\n\t\tthis.graph.foldingEnabled = urlParams['nav'] == '1';\n\t\tthis.graph.cellRenderer.forceControlClickHandler = this.graph.foldingEnabled;\n\t}\n\t\n\tvar ps = parseFloat(node.getAttribute('pageScale'));\n\t\n\tif (!isNaN(ps) && ps > 0)\n\t{\n\t\tthis.graph.pageScale = ps;\n\t}\n\telse\n\t{\n\t\tthis.graph.pageScale = mxGraph.prototype.pageScale;\n\t}\n\n\tif (!this.graph.isLightboxView() && !this.graph.isViewer())\n\t{\n\t\tvar pv = node.getAttribute('page');\n\t\n\t\tif (pv != null)\n\t\t{\n\t\t\tthis.graph.pageVisible = (pv != '0');\n\t\t}\n\t\telse\n\t\t{\n\t\t\tthis.graph.pageVisible = this.graph.defaultPageVisible;\n\t\t}\n\t}\n\telse\n\t{\n\t\tthis.graph.pageVisible = false;\n\t}\n\t\n\tthis.graph.pageBreaksVisible = this.graph.pageVisible; \n\tthis.graph.preferPageSize = this.graph.pageBreaksVisible;\n\t\n\tvar pw = parseFloat(node.getAttribute('pageWidth'));\n\tvar ph = parseFloat(node.getAttribute('pageHeight'));\n\t\n\tif (!isNaN(pw) && !isNaN(ph))\n\t{\n\t\tthis.graph.pageFormat = new mxRectangle(0, 0, pw, ph);\n\t}\n\n\t// Loads the persistent state settings\n\tvar bg = node.getAttribute('background');\n\t\n\tif (bg != null && bg.length > 0)\n\t{\n\t\tthis.graph.background = bg;\n\t}\n\telse\n\t{\n\t\tthis.graph.background = null;\n\t}\n};\n\n/**\n * Sets the XML node for the current diagram.\n */\nEditor.prototype.setGraphXml = function(node)\n{\n\tif (node != null)\n\t{\n\t\tvar dec = new mxCodec(node.ownerDocument);\n\t\n\t\tif (node.nodeName == 'mxGraphModel')\n\t\t{\n\t\t\tthis.graph.model.beginUpdate();\n\t\t\t\n\t\t\ttry\n\t\t\t{\n\t\t\t\tthis.graph.model.clear();\n\t\t\t\tthis.graph.view.scale = 1;\n\t\t\t\tthis.readGraphState(node);\n\t\t\t\tthis.updateGraphComponents();\n\t\t\t\tdec.decode(node, this.graph.getModel());\n\t\t\t}\n\t\t\tfinally\n\t\t\t{\n\t\t\t\tthis.graph.model.endUpdate();\n\t\t\t}\n\t\n\t\t\tthis.fireEvent(new mxEventObject('resetGraphView'));\n\t\t}\n\t\telse if (node.nodeName == 'root')\n\t\t{\n\t\t\tthis.resetGraph();\n\t\t\t\n\t\t\t// Workaround for invalid XML output in Firefox 20 due to bug in mxUtils.getXml\n\t\t\tvar wrapper = dec.document.createElement('mxGraphModel');\n\t\t\twrapper.appendChild(node);\n\t\t\t\n\t\t\tdec.decode(wrapper, this.graph.getModel());\n\t\t\tthis.updateGraphComponents();\n\t\t\tthis.fireEvent(new mxEventObject('resetGraphView'));\n\t\t}\n\t\telse\n\t\t{\n\t\t\tthrow { \n\t\t\t    message: mxResources.get('cannotOpenFile'), \n\t\t\t    node: node,\n\t\t\t    toString: function() { return this.message; }\n\t\t\t};\n\t\t}\n\t}\n\telse\n\t{\n\t\tthis.resetGraph();\n\t\tthis.graph.model.clear();\n\t\tthis.fireEvent(new mxEventObject('resetGraphView'));\n\t}\n};\n\n/**\n * Returns the XML node that represents the current diagram.\n */\nEditor.prototype.getGraphXml = function(ignoreSelection)\n{\n\tignoreSelection = (ignoreSelection != null) ? ignoreSelection : true;\n\tvar node = null;\n\t\n\tif (ignoreSelection)\n\t{\n\t\tvar enc = new mxCodec(mxUtils.createXmlDocument());\n\t\tnode = enc.encode(this.graph.getModel());\n\t}\n\telse\n\t{\n\t\tnode = this.graph.encodeCells(mxUtils.sortCells(this.graph.model.getTopmostCells(\n\t\t\tthis.graph.getSelectionCells())));\n\t}\n\n\tif (this.graph.view.translate.x != 0 || this.graph.view.translate.y != 0)\n\t{\n\t\tnode.setAttribute('dx', Math.round(this.graph.view.translate.x * 100) / 100);\n\t\tnode.setAttribute('dy', Math.round(this.graph.view.translate.y * 100) / 100);\n\t}\n\t\n\tnode.setAttribute('grid', (this.graph.isGridEnabled()) ? '1' : '0');\n\tnode.setAttribute('gridSize', this.graph.gridSize);\n\tnode.setAttribute('guides', (this.graph.graphHandler.guidesEnabled) ? '1' : '0');\n\tnode.setAttribute('tooltips', (this.graph.tooltipHandler.isEnabled()) ? '1' : '0');\n\tnode.setAttribute('connect', (this.graph.connectionHandler.isEnabled()) ? '1' : '0');\n\tnode.setAttribute('arrows', (this.graph.connectionArrowsEnabled) ? '1' : '0');\n\tnode.setAttribute('fold', (this.graph.foldingEnabled) ? '1' : '0');\n\tnode.setAttribute('page', (this.graph.pageVisible) ? '1' : '0');\n\tnode.setAttribute('pageScale', this.graph.pageScale);\n\tnode.setAttribute('pageWidth', this.graph.pageFormat.width);\n\tnode.setAttribute('pageHeight', this.graph.pageFormat.height);\n\n\tif (this.graph.background != null)\n\t{\n\t\tnode.setAttribute('background', this.graph.background);\n\t}\n\t\n\treturn node;\n};\n\n/**\n * Keeps the graph container in sync with the persistent graph state\n */\nEditor.prototype.updateGraphComponents = function()\n{\n\tvar graph = this.graph;\n\t\n\tif (graph.container != null)\n\t{\n\t\tgraph.view.validateBackground();\n\t\tgraph.container.style.overflow = (graph.scrollbars) ? 'auto' : this.defaultGraphOverflow;\n\t\t\n\t\tthis.fireEvent(new mxEventObject('updateGraphComponents'));\n\t}\n};\n\n/**\n * Sets the modified flag.\n */\nEditor.prototype.setModified = function(value)\n{\n\tthis.modified = value;\n};\n\n/**\n * Sets the filename.\n */\nEditor.prototype.setFilename = function(value)\n{\n\tthis.filename = value;\n};\n\n/**\n * Creates and returns a new undo manager.\n */\nEditor.prototype.createUndoManager = function()\n{\n\tvar graph = this.graph;\n\tvar undoMgr = new mxUndoManager();\n\n\tthis.undoListener = function(sender, evt)\n\t{\n\t\tundoMgr.undoableEditHappened(evt.getProperty('edit'));\n\t};\n\t\n    // Installs the command history\n\tvar listener = mxUtils.bind(this, function(sender, evt)\n\t{\n\t\tthis.undoListener.apply(this, arguments);\n\t});\n\t\n\tgraph.getModel().addListener(mxEvent.UNDO, listener);\n\tgraph.getView().addListener(mxEvent.UNDO, listener);\n\n\t// Keeps the selection in sync with the history\n\tvar undoHandler = function(sender, evt)\n\t{\n\t\tvar cand = graph.getSelectionCellsForChanges(evt.getProperty('edit').changes, function(change)\n\t\t{\n\t\t\t// Only selects changes to the cell hierarchy\n\t\t\treturn !(change instanceof mxChildChange);\n\t\t});\n\t\t\n\t\tif (cand.length > 0)\n\t\t{\n\t\t\tvar model = graph.getModel();\n\t\t\tvar cells = [];\n\t\t\t\n\t\t\tfor (var i = 0; i < cand.length; i++)\n\t\t\t{\n\t\t\t\tif (graph.view.getState(cand[i]) != null)\n\t\t\t\t{\n\t\t\t\t\tcells.push(cand[i]);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tgraph.setSelectionCells(cells);\n\t\t}\n\t};\n\t\n\tundoMgr.addListener(mxEvent.UNDO, undoHandler);\n\tundoMgr.addListener(mxEvent.REDO, undoHandler);\n\n\treturn undoMgr;\n};\n\n/**\n * Adds basic stencil set (no namespace).\n */\nEditor.prototype.initStencilRegistry = function() { };\n\n/**\n * Creates and returns a new undo manager.\n */\nEditor.prototype.destroy = function()\n{\n\tif (this.graph != null)\n\t{\n\t\tthis.graph.destroy();\n\t\tthis.graph = null;\n\t}\n};\n\n/**\n * Class for asynchronously opening a new window and loading a file at the same\n * time. This acts as a bridge between the open dialog and the new editor.\n */\nOpenFile = function(done)\n{\n\tthis.producer = null;\n\tthis.consumer = null;\n\tthis.done = done;\n\tthis.args = null;\n};\n\n/**\n * Registers the editor from the new window.\n */\nOpenFile.prototype.setConsumer = function(value)\n{\n\tthis.consumer = value;\n\tthis.execute();\n};\n\n/**\n * Sets the data from the loaded file.\n */\nOpenFile.prototype.setData = function()\n{\n\tthis.args = arguments;\n\tthis.execute();\n};\n\n/**\n * Displays an error message.\n */\nOpenFile.prototype.error = function(msg)\n{\n\tthis.cancel(true);\n\tmxUtils.alert(msg);\n};\n\n/**\n * Consumes the data.\n */\nOpenFile.prototype.execute = function()\n{\n\tif (this.consumer != null && this.args != null)\n\t{\n\t\tthis.cancel(false);\n\t\tthis.consumer.apply(this, this.args);\n\t}\n};\n\n/**\n * Cancels the operation.\n */\nOpenFile.prototype.cancel = function(cancel)\n{\n\tif (this.done != null)\n\t{\n\t\tthis.done((cancel != null) ? cancel : true);\n\t}\n};\n\n/**\n * Basic dialogs that are available in the viewer (print dialog).\n */\nfunction Dialog(editorUi, elt, w, h, modal, closable, onClose, noScroll, transparent, onResize, ignoreBgClick)\n{\n\tthis.editorUi = editorUi;\n\tvar dx = transparent? 57 : 0;\n\tvar w0 = w;\n\tvar h0 = h;\n\tvar padding = transparent? 0 : 64; //No padding needed for transparent dialogs\n\t\n\tvar ds = (!Editor.inlineFullscreen && editorUi.embedViewport != null) ?\n\t\tmxUtils.clone(editorUi.embedViewport) : this.getDocumentSize();\n\t\n\t// Workaround for print dialog offset in viewer lightbox\n\tif (editorUi.embedViewport == null && window.innerHeight != null)\n\t{\n\t\tds.height = window.innerHeight;\n\t}\n\t\n\tvar dh = ds.height;\n\tvar left = Math.max(1, Math.round((ds.width - w - padding) / 2));\n\tvar top = Math.max(1, Math.round((dh - h - editorUi.footerHeight) / 3));\n\t\n\t// Keeps window size inside available space\n\telt.style.maxHeight = '100%';\n\t\n\tw = (document.body != null) ? Math.min(w, document.body.scrollWidth - padding) : w;\n\th = Math.min(h, dh - padding);\n\t\n\t// Increments zIndex to put subdialogs and background over existing dialogs and background\n\tif (editorUi.dialogs.length > 0)\n\t{\n\t\tthis.zIndex += editorUi.dialogs.length * 2;\n\t}\n\n\tif (this.bg == null)\n\t{\n\t\tthis.bg = editorUi.createDiv('geBackground');\n\t\tthis.bg.style.position = 'absolute';\n\t\tthis.bg.style.height = dh + 'px';\n\t\tthis.bg.style.right = '0px';\n\t\tthis.bg.style.zIndex = this.zIndex - 2;\n\t\t\n\t\tmxUtils.setOpacity(this.bg, this.bgOpacity);\n\t}\n\t\n\tvar origin = mxUtils.getDocumentScrollOrigin(document);\n\tthis.bg.style.left = origin.x + 'px';\n\tthis.bg.style.top = origin.y + 'px';\n\tleft += origin.x;\n\ttop += origin.y;\n\n\tif (!Editor.inlineFullscreen && editorUi.embedViewport != null)\n\t{\n\t\tthis.bg.style.height = this.getDocumentSize().height + 'px';\n\t\ttop += editorUi.embedViewport.y;\n\t\tleft += editorUi.embedViewport.x;\n\t}\n\t\n\tif (modal)\n\t{\n\t\tdocument.body.appendChild(this.bg);\n\t}\n\t\n\tvar div = editorUi.createDiv(transparent? 'geTransDialog' : 'geDialog');\n\tvar pos = this.getPosition(left, top, w, h);\n\tleft = pos.x;\n\ttop = pos.y;\n\n\tdiv.style.width = w + 'px';\n\tdiv.style.height = h + 'px';\n\tdiv.style.left = left + 'px';\n\tdiv.style.top = top + 'px';\n\tdiv.style.zIndex = this.zIndex;\n\t\n\tdiv.appendChild(elt);\n\tdocument.body.appendChild(div);\n\t\n\t// Adds vertical scrollbars if needed\n\tif (!noScroll && elt.clientHeight > div.clientHeight - padding)\n\t{\n\t\telt.style.overflowY = 'auto';\n\t}\n\t\n\t//Prevent horizontal scrollbar\n\telt.style.overflowX = 'hidden';\n\t\n\tif (closable)\n\t{\n\t\tvar img = document.createElement('img');\n\n\t\timg.setAttribute('src', Dialog.prototype.closeImage);\n\t\timg.setAttribute('title', mxResources.get('close'));\n\t\timg.className = 'geDialogClose';\n\t\timg.style.top = (top + 14) + 'px';\n\t\timg.style.left = (left + w + 38 - dx) + 'px';\n\t\timg.style.zIndex = this.zIndex;\n\t\t\n\t\tmxEvent.addListener(img, 'click', mxUtils.bind(this, function()\n\t\t{\n\t\t\teditorUi.hideDialog(true);\n\t\t}));\n\t\t\n\t\tdocument.body.appendChild(img);\n\t\tthis.dialogImg = img;\n\t\t\n\t\tif (!ignoreBgClick)\n\t\t{\n\t\t\tvar mouseDownSeen = false;\n\t\t\t\n\t\t\tmxEvent.addGestureListeners(this.bg, mxUtils.bind(this, function(evt)\n\t\t\t{\n\t\t\t\tmouseDownSeen = true;\n\t\t\t}), null, mxUtils.bind(this, function(evt)\n\t\t\t{\n\t\t\t\tif (mouseDownSeen)\n\t\t\t\t{\n\t\t\t\t\teditorUi.hideDialog(true);\n\t\t\t\t\tmouseDownSeen = false;\n\t\t\t\t}\n\t\t\t}));\n\t\t}\n\t}\n\t\n\tthis.resizeListener = mxUtils.bind(this, function()\n\t{\n\t\tif (onResize != null)\n\t\t{\n\t\t\tvar newWH = onResize();\n\t\t\t\n\t\t\tif (newWH != null)\n\t\t\t{\n\t\t\t\tw0 = w = newWH.w;\n\t\t\t\th0 = h = newWH.h;\n\t\t\t}\n\t\t}\n\t\t\n\t\tvar ds = (!Editor.inlineFullscreen && editorUi.embedViewport != null) ?\n\t\t\tmxUtils.clone(editorUi.embedViewport) : this.getDocumentSize();\n\t\tdh = ds.height;\n\t\tthis.bg.style.height = dh + 'px';\n\t\t\n\t\tif (!Editor.inlineFullscreen && editorUi.embedViewport != null)\n\t\t{\n\t\t\tthis.bg.style.height = this.getDocumentSize().height + 'px';\n\t\t}\n\n\t\tleft = Math.max(1, Math.round((ds.width - w - padding) / 2));\n\t\ttop = Math.max(1, Math.round((dh - h - editorUi.footerHeight) / 3));\n\t\tw = (document.body != null) ? Math.min(w0, document.body.scrollWidth - padding) : w0;\n\t\th = Math.min(h0, dh - padding);\n\n\t\t// var dh = ds.height;\n\t\tvar left = Math.max(1, Math.round((ds.width - w - padding) / 2));\n\t\tvar top = Math.max(1, Math.round((dh - h - editorUi.footerHeight) / 3));\n\t\t\n\t\tvar pos = this.getPosition(left, top, w, h);\n\t\tleft = pos.x;\n\t\ttop = pos.y;\n\n\t\tvar origin = mxUtils.getDocumentScrollOrigin(document);\n\t\tleft += origin.x;\n\t\ttop += origin.y;\n\t\n\t\tif (!Editor.inlineFullscreen && editorUi.embedViewport != null)\n\t\t{\n\t\t\ttop += editorUi.embedViewport.y;\n\t\t\tleft += editorUi.embedViewport.x;\n\t\t}\n\t\t\n\t\tdiv.style.left = left + 'px';\n\t\tdiv.style.top = top + 'px';\n\t\tdiv.style.width = w + 'px';\n\t\tdiv.style.height = h + 'px';\n\t\t\n\t\t// Adds vertical scrollbars if needed\n\t\tif (!noScroll && elt.clientHeight > div.clientHeight - padding)\n\t\t{\n\t\t\telt.style.overflowY = 'auto';\n\t\t}\n\t\t\n\t\tif (this.dialogImg != null)\n\t\t{\n\t\t\tthis.dialogImg.style.top = (top + 14) + 'px';\n\t\t\tthis.dialogImg.style.left = (left + w + 38 - dx) + 'px';\n\t\t}\n\t});\n\t\n\tif (editorUi.embedViewport != null)\n\t{\n\t\teditorUi.addListener('embedViewportChanged', this.resizeListener);\n\t}\n\telse\n\t{\n\t\tmxEvent.addListener(window, 'resize', this.resizeListener);\n\t}\n\n\tthis.onDialogClose = onClose;\n\tthis.container = div;\n\t\n\teditorUi.editor.fireEvent(new mxEventObject('showDialog'));\n};\n\n/**\n * \n */\nDialog.prototype.zIndex = mxPopupMenu.prototype.zIndex - 2;\n\n/**\n * \n */\nDialog.prototype.noColorImage = (!mxClient.IS_SVG) ? IMAGE_PATH + '/nocolor.png' : 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyBpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBXaW5kb3dzIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOkEzRDlBMUUwODYxMTExRTFCMzA4RDdDMjJBMEMxRDM3IiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOkEzRDlBMUUxODYxMTExRTFCMzA4RDdDMjJBMEMxRDM3Ij4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6QTNEOUExREU4NjExMTFFMUIzMDhEN0MyMkEwQzFEMzciIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6QTNEOUExREY4NjExMTFFMUIzMDhEN0MyMkEwQzFEMzciLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz5xh3fmAAAABlBMVEX////MzMw46qqDAAAAGElEQVR42mJggAJGKGAYIIGBth8KAAIMAEUQAIElnLuQAAAAAElFTkSuQmCC';\n\n/**\n * \n */\nDialog.prototype.closeImage = (!mxClient.IS_SVG) ? IMAGE_PATH + '/close.png' : 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJAQMAAADaX5RTAAAABlBMVEV7mr3///+wksspAAAAAnRSTlP/AOW3MEoAAAAdSURBVAgdY9jXwCDDwNDRwHCwgeExmASygSL7GgB12QiqNHZZIwAAAABJRU5ErkJggg==';\n\n/**\n * \n */\nDialog.prototype.clearImage = (!mxClient.IS_SVG) ? IMAGE_PATH + '/clear.gif' : 'data:image/gif;base64,R0lGODlhDQAKAIABAMDAwP///yH/C1hNUCBEYXRhWE1QPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS4wLWMwNjAgNjEuMTM0Nzc3LCAyMDEwLzAyLzEyLTE3OjMyOjAwICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOnhtcE1NPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvbW0vIiB4bWxuczpzdFJlZj0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL3NUeXBlL1Jlc291cmNlUmVmIyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1IFdpbmRvd3MiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6OUIzOEM1NzI4NjEyMTFFMUEzMkNDMUE3NjZERDE2QjIiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6OUIzOEM1NzM4NjEyMTFFMUEzMkNDMUE3NjZERDE2QjIiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo5QjM4QzU3MDg2MTIxMUUxQTMyQ0MxQTc2NkREMTZCMiIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo5QjM4QzU3MTg2MTIxMUUxQTMyQ0MxQTc2NkREMTZCMiIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PgH//v38+/r5+Pf29fTz8vHw7+7t7Ovq6ejn5uXk4+Lh4N/e3dzb2tnY19bV1NPS0dDPzs3My8rJyMfGxcTDwsHAv769vLu6ubi3trW0s7KxsK+urayrqqmop6alpKOioaCfnp2cm5qZmJeWlZSTkpGQj46NjIuKiYiHhoWEg4KBgH9+fXx7enl4d3Z1dHNycXBvbm1sa2ppaGdmZWRjYmFgX15dXFtaWVhXVlVUU1JRUE9OTUxLSklIR0ZFRENCQUA/Pj08Ozo5ODc2NTQzMjEwLy4tLCsqKSgnJiUkIyIhIB8eHRwbGhkYFxYVFBMSERAPDg0MCwoJCAcGBQQDAgEAACH5BAEAAAEALAAAAAANAAoAAAIXTGCJebD9jEOTqRlttXdrB32PJ2ncyRQAOw==';\n\n/**\n * Removes the dialog from the DOM.\n */\nDialog.prototype.bgOpacity = 80;\n\n/**\n * Removes the dialog from the DOM.\n */\nDialog.prototype.getDocumentSize = function()\n{\n\treturn mxUtils.getDocumentSize();\n};\n\n/**\n * Removes the dialog from the DOM.\n */\nDialog.prototype.getPosition = function(left, top)\n{\n\treturn new mxPoint(left, top);\n};\n\n/**\n * Removes the dialog from the DOM.\n */\nDialog.prototype.close = function(cancel, isEsc)\n{\n\tif (this.onDialogClose != null)\n\t{\n\t\tif (this.onDialogClose(cancel, isEsc) == false)\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tthis.onDialogClose = null;\n\t}\n\t\n\tif (this.dialogImg != null && this.dialogImg.parentNode != null)\n\t{\n\t\tthis.dialogImg.parentNode.removeChild(this.dialogImg);\n\t\tthis.dialogImg = null;\n\t}\n\t\n\tif (this.bg != null && this.bg.parentNode != null)\n\t{\n\t\tthis.bg.parentNode.removeChild(this.bg);\n\t}\n\n\tif (this.editorUi.embedViewport != null)\n\t{\n\t\tthis.editorUi.removeListener(this.resizeListener);\n\t}\n\telse\n\t{\n\t\tmxEvent.removeListener(window, 'resize', this.resizeListener);\n\t}\n\n\tif (this.container.parentNode != null)\n\t{\n\t\tthis.container.parentNode.removeChild(this.container);\n\t}\n};\n\n/**\n * \n */\nvar ErrorDialog = function(editorUi, title, message, buttonText, fn, retry, buttonText2, fn2, hide, buttonText3, fn3)\n{\n\thide = (hide != null) ? hide : true;\n\t\n\tvar div = document.createElement('div');\n\tdiv.style.textAlign = 'center';\n\n\tif (title != null)\n\t{\n\t\tvar hd = document.createElement('div');\n\t\thd.style.padding = '0px';\n\t\thd.style.margin = '0px';\n\t\thd.style.fontSize = '18px';\n\t\thd.style.paddingBottom = '16px';\n\t\thd.style.marginBottom = '10px';\n\t\thd.style.borderBottom = '1px solid #c0c0c0';\n\t\thd.style.color = 'gray';\n\t\thd.style.whiteSpace = 'nowrap';\n\t\thd.style.textOverflow = 'ellipsis';\n\t\thd.style.overflow = 'hidden';\n\t\tmxUtils.write(hd, title);\n\t\thd.setAttribute('title', title);\n\t\tdiv.appendChild(hd);\n\t}\n\n\tvar p2 = document.createElement('div');\n\tp2.style.lineHeight = '1.2em';\n\tp2.style.padding = '6px';\n\t\n\tif (typeof message === 'string')\n\t{\n\t\tmessage = message.replace(/\\n/g, '<br/>');\n\t}\n\n\tp2.innerHTML = message;\n\tdiv.appendChild(p2);\n\t\n\tvar btns = document.createElement('div');\n\tbtns.style.marginTop = '12px';\n\tbtns.style.textAlign = 'center';\n\t\n\tif (retry != null)\n\t{\n\t\tvar retryBtn = mxUtils.button(mxResources.get('tryAgain'), function()\n\t\t{\n\t\t\teditorUi.hideDialog();\n\t\t\tretry();\n\t\t});\n\t\tretryBtn.className = 'geBtn';\n\t\tbtns.appendChild(retryBtn);\n\t\t\n\t\tbtns.style.textAlign = 'center';\n\t}\n\t\n\tif (buttonText3 != null)\n\t{\n\t\tvar btn3 = mxUtils.button(buttonText3, function()\n\t\t{\n\t\t\tif (fn3 != null)\n\t\t\t{\n\t\t\t\tfn3();\n\t\t\t}\n\t\t});\n\t\t\n\t\tbtn3.className = 'geBtn';\n\t\tbtns.appendChild(btn3);\n\t}\n\t\n\tvar btn = mxUtils.button(buttonText, function()\n\t{\n\t\tif (hide)\n\t\t{\n\t\t\teditorUi.hideDialog();\n\t\t}\n\t\t\n\t\tif (fn != null)\n\t\t{\n\t\t\tfn();\n\t\t}\n\t});\n\t\n\tbtn.className = 'geBtn';\n\tbtns.appendChild(btn);\n\n\tif (buttonText2 != null)\n\t{\n\t\tvar mainBtn = mxUtils.button(buttonText2, function()\n\t\t{\n\t\t\tif (hide)\n\t\t\t{\n\t\t\t\teditorUi.hideDialog();\n\t\t\t}\n\t\t\t\n\t\t\tif (fn2 != null)\n\t\t\t{\n\t\t\t\tfn2();\n\t\t\t}\n\t\t});\n\t\t\n\t\tmainBtn.className = 'geBtn gePrimaryBtn';\n\t\tbtns.appendChild(mainBtn);\n\t}\n\n\tthis.init = function()\n\t{\n\t\tbtn.focus();\n\t};\n\t\n\tdiv.appendChild(btns);\n\n\tthis.container = div;\n};\n\n/**\n * Constructs a new print dialog.\n */\nvar PrintDialog = function(editorUi, title)\n{\n\tthis.create(editorUi, title);\n};\n\n/**\n * Constructs a new print dialog.\n */\nPrintDialog.prototype.create = function(editorUi)\n{\n\tvar graph = editorUi.editor.graph;\n\tvar row, td;\n\t\n\tvar table = document.createElement('table');\n\ttable.style.width = '100%';\n\ttable.style.height = '100%';\n\tvar tbody = document.createElement('tbody');\n\t\n\trow = document.createElement('tr');\n\t\n\tvar onePageCheckBox = document.createElement('input');\n\tonePageCheckBox.setAttribute('type', 'checkbox');\n\ttd = document.createElement('td');\n\ttd.setAttribute('colspan', '2');\n\ttd.style.fontSize = '10pt';\n\ttd.appendChild(onePageCheckBox);\n\t\n\tvar span = document.createElement('span');\n\tmxUtils.write(span, ' ' + mxResources.get('fitPage'));\n\ttd.appendChild(span);\n\t\n\tmxEvent.addListener(span, 'click', function(evt)\n\t{\n\t\tonePageCheckBox.checked = !onePageCheckBox.checked;\n\t\tpageCountCheckBox.checked = !onePageCheckBox.checked;\n\t\tmxEvent.consume(evt);\n\t});\n\t\n\tmxEvent.addListener(onePageCheckBox, 'change', function()\n\t{\n\t\tpageCountCheckBox.checked = !onePageCheckBox.checked;\n\t});\n\t\n\trow.appendChild(td);\n\ttbody.appendChild(row);\n\n\trow = row.cloneNode(false);\n\t\n\tvar pageCountCheckBox = document.createElement('input');\n\tpageCountCheckBox.setAttribute('type', 'checkbox');\n\ttd = document.createElement('td');\n\ttd.style.fontSize = '10pt';\n\ttd.appendChild(pageCountCheckBox);\n\t\n\tvar span = document.createElement('span');\n\tmxUtils.write(span, ' ' + mxResources.get('posterPrint') + ':');\n\ttd.appendChild(span);\n\t\n\tmxEvent.addListener(span, 'click', function(evt)\n\t{\n\t\tpageCountCheckBox.checked = !pageCountCheckBox.checked;\n\t\tonePageCheckBox.checked = !pageCountCheckBox.checked;\n\t\tmxEvent.consume(evt);\n\t});\n\t\n\trow.appendChild(td);\n\t\n\tvar pageCountInput = document.createElement('input');\n\tpageCountInput.setAttribute('value', '1');\n\tpageCountInput.setAttribute('type', 'number');\n\tpageCountInput.setAttribute('min', '1');\n\tpageCountInput.setAttribute('size', '4');\n\tpageCountInput.setAttribute('disabled', 'disabled');\n\tpageCountInput.style.width = '50px';\n\n\ttd = document.createElement('td');\n\ttd.style.fontSize = '10pt';\n\ttd.appendChild(pageCountInput);\n\tmxUtils.write(td, ' ' + mxResources.get('pages') + ' (max)');\n\trow.appendChild(td);\n\ttbody.appendChild(row);\n\n\tmxEvent.addListener(pageCountCheckBox, 'change', function()\n\t{\n\t\tif (pageCountCheckBox.checked)\n\t\t{\n\t\t\tpageCountInput.removeAttribute('disabled');\n\t\t}\n\t\telse\n\t\t{\n\t\t\tpageCountInput.setAttribute('disabled', 'disabled');\n\t\t}\n\n\t\tonePageCheckBox.checked = !pageCountCheckBox.checked;\n\t});\n\n\trow = row.cloneNode(false);\n\t\n\ttd = document.createElement('td');\n\tmxUtils.write(td, mxResources.get('pageScale') + ':');\n\trow.appendChild(td);\n\t\n\ttd = document.createElement('td');\n\tvar pageScaleInput = document.createElement('input');\n\tpageScaleInput.setAttribute('value', '100 %');\n\tpageScaleInput.setAttribute('size', '5');\n\tpageScaleInput.style.width = '50px';\n\t\n\ttd.appendChild(pageScaleInput);\n\trow.appendChild(td);\n\ttbody.appendChild(row);\n\t\n\trow = document.createElement('tr');\n\ttd = document.createElement('td');\n\ttd.colSpan = 2;\n\ttd.style.paddingTop = '20px';\n\ttd.setAttribute('align', 'right');\n\t\n\t// Overall scale for print-out to account for print borders in dialogs etc\n\tfunction preview(print)\n\t{\n\t\tvar autoOrigin = onePageCheckBox.checked || pageCountCheckBox.checked;\n\t\tvar printScale = parseInt(pageScaleInput.value) / 100;\n\t\t\n\t\tif (isNaN(printScale))\n\t\t{\n\t\t\tprintScale = 1;\n\t\t\tpageScaleInput.value = '100%';\n\t\t}\n\n\t\t// Workaround to match available paper size in actual print output\n\t\tif (mxClient.IS_SF)\n\t\t{\n\t\t\tprintScale *= 0.75;\n\t\t}\n\t\t\n\t\tvar pf = graph.pageFormat || mxConstants.PAGE_FORMAT_A4_PORTRAIT;\n\t\tvar scale = 1 / graph.pageScale;\n\t\t\n\t\tif (autoOrigin)\n\t\t{\n    \t\tvar pageCount = (onePageCheckBox.checked) ? 1 : parseInt(pageCountInput.value);\n\t\t\t\n\t\t\tif (!isNaN(pageCount))\n\t\t\t{\n\t\t\t\tscale = mxUtils.getScaleForPageCount(pageCount, graph, pf);\n\t\t\t}\n\t\t}\n\n\t\t// Negative coordinates are cropped or shifted if page visible\n\t\tvar border = 0;\n\t\tvar x0 = 0;\n\t\tvar y0 = 0;\n\n\t\t// Applies print scale\n\t\tpf = mxRectangle.fromRectangle(pf);\n\t\tpf.width = Math.ceil(pf.width * printScale);\n\t\tpf.height = Math.ceil(pf.height * printScale);\n\t\tscale *= printScale;\n\t\t\n\t\t// Starts at first visible page\n\t\tif (!autoOrigin && graph.pageVisible)\n\t\t{\n\t\t\tvar layout = graph.getPageLayout();\n\t\t\tx0 -= layout.x * pf.width;\n\t\t\ty0 -= layout.y * pf.height;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tautoOrigin = true;\n\t\t}\n\t\t\n\t\tvar preview = PrintDialog.createPrintPreview(graph, scale, pf, border, x0, y0, autoOrigin);\n\t\tpreview.open();\n\t\n\t\tif (print)\n\t\t{\n\t\t\tPrintDialog.printPreview(preview);\n\t\t}\n\t};\n\t\n\tvar cancelBtn = mxUtils.button(mxResources.get('cancel'), function()\n\t{\n\t\teditorUi.hideDialog();\n\t});\n\tcancelBtn.className = 'geBtn';\n\t\n\tif (editorUi.editor.cancelFirst)\n\t{\n\t\ttd.appendChild(cancelBtn);\n\t}\n\n\tif (PrintDialog.previewEnabled)\n\t{\n\t\tvar previewBtn = mxUtils.button(mxResources.get('preview'), function()\n\t\t{\n\t\t\teditorUi.hideDialog();\n\t\t\tpreview(false);\n\t\t});\n\t\tpreviewBtn.className = 'geBtn';\n\t\ttd.appendChild(previewBtn);\n\t}\n\t\n\tvar printBtn = mxUtils.button(mxResources.get((!PrintDialog.previewEnabled) ? 'ok' : 'print'), function()\n\t{\n\t\teditorUi.hideDialog();\n\t\tpreview(true);\n\t});\n\tprintBtn.className = 'geBtn gePrimaryBtn';\n\ttd.appendChild(printBtn);\n\t\n\tif (!editorUi.editor.cancelFirst)\n\t{\n\t\ttd.appendChild(cancelBtn);\n\t}\n\n\trow.appendChild(td);\n\ttbody.appendChild(row);\n\t\n\ttable.appendChild(tbody);\n\tthis.container = table;\n};\n\n/**\n * Constructs a new print dialog.\n */\nPrintDialog.printPreview = function(preview)\n{\n\ttry\n\t{\n\t\tif (preview.wnd != null)\n\t\t{\n\t\t\tvar printFn = function()\n\t\t\t{\n\t\t\t\tpreview.wnd.focus();\n\t\t\t\tpreview.wnd.print();\n\t\t\t\tpreview.wnd.close();\n\t\t\t};\n\t\t\t\n\t\t\t// Workaround for rendering SVG output and\n\t\t\t// make window available for printing\n\t\t\twindow.setTimeout(printFn, 500);\n\t\t}\n\t}\n\tcatch (e)\n\t{\n\t\t// ignores possible Access Denied\n\t}\n};\n\n/**\n * Constructs a new print dialog.\n */\nPrintDialog.createPrintPreview = function(graph, scale, pf, border, x0, y0, autoOrigin)\n{\n\tvar preview = new mxPrintPreview(graph, scale, pf, border, x0, y0);\n\tpreview.title = mxResources.get('preview');\n\tpreview.addPageCss = !mxClient.IS_SF;\n\tpreview.printBackgroundImage = true;\n\tpreview.autoOrigin = autoOrigin;\n\tvar bg = graph.background;\n\t\n\tif (bg == null || bg == '' || bg == mxConstants.NONE)\n\t{\n\t\tbg = '#ffffff';\n\t}\n\t\n\tpreview.backgroundColor = bg;\n\t\n\tvar writeHead = preview.writeHead;\n\t\n\t// Adds a border in the preview\n\tpreview.writeHead = function(doc)\n\t{\n\t\twriteHead.apply(this, arguments);\n\t\t\n\t\tdoc.writeln('<style type=\"text/css\">');\n\t\tdoc.writeln('@media screen {');\n\t\tdoc.writeln('  body > div { padding:30px;box-sizing:content-box; }');\n\t\tdoc.writeln('}');\n\t\tdoc.writeln('</style>');\n\t};\n\t\n\treturn preview;\n};\n\n/**\n * Specifies if the preview button should be enabled. Default is true.\n */\nPrintDialog.previewEnabled = true;\n\n/**\n * Constructs a new page setup dialog.\n */\nvar PageSetupDialog = function(editorUi)\n{\n\tvar graph = editorUi.editor.graph;\n\tvar row, td;\n\n\tvar table = document.createElement('table');\n\ttable.style.width = '100%';\n\ttable.style.height = '100%';\n\tvar tbody = document.createElement('tbody');\n\t\n\trow = document.createElement('tr');\n\t\n\ttd = document.createElement('td');\n\ttd.style.verticalAlign = 'top';\n\ttd.style.fontSize = '10pt';\n\tmxUtils.write(td, mxResources.get('paperSize') + ':');\n\t\n\trow.appendChild(td);\n\t\n\ttd = document.createElement('td');\n\ttd.style.verticalAlign = 'top';\n\ttd.style.fontSize = '10pt';\n\t\n\tvar accessor = PageSetupDialog.addPageFormatPanel(td, 'pagesetupdialog', graph.pageFormat);\n\n\trow.appendChild(td);\n\ttbody.appendChild(row);\n\t\n\trow = document.createElement('tr');\n\t\n\ttd = document.createElement('td');\n\tmxUtils.write(td, mxResources.get('gridSize') + ':');\n\trow.appendChild(td);\n\t\n\ttd = document.createElement('td');\n\ttd.style.whiteSpace = 'nowrap';\n\n\tvar gridSizeInput = document.createElement('input');\n\tgridSizeInput.setAttribute('type', 'number');\n\tgridSizeInput.setAttribute('min', '0');\n\tgridSizeInput.style.width = '40px';\n\tgridSizeInput.style.marginLeft = '6px';\n\t\n\tgridSizeInput.value = graph.getGridSize();\n\ttd.appendChild(gridSizeInput);\n\t\n\tmxEvent.addListener(gridSizeInput, 'change', function()\n\t{\n\t\tvar value = parseInt(gridSizeInput.value);\n\t\tgridSizeInput.value = Math.max(1, (isNaN(value)) ? graph.getGridSize() : value);\n\t});\n\t\n\trow.appendChild(td);\n\ttbody.appendChild(row);\n\t\n\trow = document.createElement('tr');\n\ttd = document.createElement('td');\n\t\n\tmxUtils.write(td, mxResources.get('background') + ':');\n\t\n\trow.appendChild(td);\n\ttd = document.createElement('td');\n\t\n\tvar changeImageLink = document.createElement('button');\n\tchangeImageLink.className = 'geBtn';\n\tchangeImageLink.style.margin = '0px';\n\tmxUtils.write(changeImageLink, mxResources.get('change') + '...');\n\n\tvar imgPreview = document.createElement('div');\n\timgPreview.style.display = 'inline-block';\n\timgPreview.style.verticalAlign = 'middle';\n\timgPreview.style.backgroundPosition = 'center center';\n\timgPreview.style.backgroundRepeat = 'no-repeat';\n\timgPreview.style.backgroundSize = 'contain';\n\timgPreview.style.border = '1px solid lightGray';\n\timgPreview.style.borderRadius = '4px';\n\timgPreview.style.marginRight = '14px';\n\timgPreview.style.height = '32px';\n\timgPreview.style.width = '64px';\n\timgPreview.style.cursor = 'pointer';\n\timgPreview.style.padding = '4px';\n\t\n\tvar newBackgroundImage = graph.backgroundImage;\n\tvar newBackgroundColor = graph.background;\n\tvar newShadowVisible = graph.shadowVisible;\n\t\n\tfunction updateBackgroundImage()\n\t{\n\t\tvar img = newBackgroundImage;\n\n\t\tif (img != null && img.originalSrc != null)\n\t\t{\n\t\t\timg = editorUi.createImageForPageLink(img.originalSrc, null);\n\t\t}\n\t\t\n\t\tif (img != null && img.src != null)\n\t\t{\n\t\t\timgPreview.style.backgroundImage = 'url(' + img.src + ')';\n\t\t\timgPreview.style.display = 'inline-block';\n\t\t}\n\t\telse\n\t\t{\n\t\t\timgPreview.style.backgroundImage = '';\n\t\t\timgPreview.style.display = 'none';\n\t\t}\n\n\t\timgPreview.style.backgroundColor = '';\n\n\t\tif (newBackgroundColor != null && newBackgroundColor != mxConstants.NONE)\n\t\t{\n\t\t\timgPreview.style.backgroundColor = newBackgroundColor;\n\t\t\timgPreview.style.display = 'inline-block';\n\t\t}\n\t};\n\n\tvar changeImage = function(evt)\n\t{\n\t\teditorUi.showBackgroundImageDialog(function(image, failed, color, shadowVisible)\n\t\t{\n\t\t\tif (!failed)\n\t\t\t{\n\t\t\t\tif (image != null && image.src != null && Graph.isPageLink(image.src))\n\t\t\t\t{\n\t\t\t\t\timage = {originalSrc: image.src};\n\t\t\t\t}\n\n\t\t\t\tnewBackgroundImage = image;\n\t\t\t\tnewShadowVisible = shadowVisible;\n\t\t\t}\n\n\t\t\tnewBackgroundColor = color;\n\t\t\tupdateBackgroundImage();\n\t\t}, newBackgroundImage, newBackgroundColor, true);\n\t\t\n\t\tmxEvent.consume(evt);\n\t};\n\t\n\tmxEvent.addListener(changeImageLink, 'click', changeImage);\n\tmxEvent.addListener(imgPreview, 'click', changeImage);\n\t\n\tupdateBackgroundImage();\n\ttd.appendChild(imgPreview);\n\ttd.appendChild(changeImageLink);\n\t\n\trow.appendChild(td);\n\ttbody.appendChild(row);\n\t\n\trow = document.createElement('tr');\n\ttd = document.createElement('td');\n\ttd.colSpan = 2;\n\ttd.style.paddingTop = '16px';\n\ttd.setAttribute('align', 'right');\n\n\tvar cancelBtn = mxUtils.button(mxResources.get('cancel'), function()\n\t{\n\t\teditorUi.hideDialog();\n\t});\n\tcancelBtn.className = 'geBtn';\n\t\n\tif (editorUi.editor.cancelFirst)\n\t{\n\t\ttd.appendChild(cancelBtn);\n\t}\n\t\n\tvar applyBtn = mxUtils.button(mxResources.get('apply'), function()\n\t{\n\t\teditorUi.hideDialog();\n\t\tvar gridSize = parseInt(gridSizeInput.value);\n\t\t\n\t\tif (!isNaN(gridSize) && graph.gridSize !== gridSize)\n\t\t{\n\t\t\tgraph.setGridSize(gridSize);\n\t\t}\n\n\t\tvar change = new ChangePageSetup(editorUi, newBackgroundColor,\n\t\t\tnewBackgroundImage, accessor.get());\n\t\tchange.ignoreColor = graph.background == newBackgroundColor;\n\t\t\n\t\tvar oldSrc = (graph.backgroundImage != null) ? graph.backgroundImage.src : null;\n\t\tvar newSrc = (newBackgroundImage != null) ? newBackgroundImage.src : null;\n\t\t\n\t\tchange.ignoreImage = oldSrc === newSrc;\n\n\t\tif (newShadowVisible != null)\n\t\t{\n\t\t\tchange.shadowVisible = newShadowVisible;\n\t\t}\n\n\t\tif (graph.pageFormat.width != change.previousFormat.width ||\n\t\t\tgraph.pageFormat.height != change.previousFormat.height ||\n\t\t\t!change.ignoreColor || !change.ignoreImage||\n\t\t\tchange.shadowVisible != graph.shadowVisible)\n\t\t{\n\t\t\tgraph.model.execute(change);\n\t\t}\n\t});\n\tapplyBtn.className = 'geBtn gePrimaryBtn';\n\ttd.appendChild(applyBtn);\n\n\tif (!editorUi.editor.cancelFirst)\n\t{\n\t\ttd.appendChild(cancelBtn);\n\t}\n\t\n\trow.appendChild(td);\n\ttbody.appendChild(row);\n\t\n\ttable.appendChild(tbody);\n\tthis.container = table;\n};\n\n/**\n * \n */\nPageSetupDialog.addPageFormatPanel = function(div, namePostfix, pageFormat, pageFormatListener)\n{\n\tvar formatName = 'format-' + namePostfix;\n\t\n\tvar portraitCheckBox = document.createElement('input');\n\tportraitCheckBox.setAttribute('name', formatName);\n\tportraitCheckBox.setAttribute('type', 'radio');\n\tportraitCheckBox.setAttribute('value', 'portrait');\n\t\n\tvar landscapeCheckBox = document.createElement('input');\n\tlandscapeCheckBox.setAttribute('name', formatName);\n\tlandscapeCheckBox.setAttribute('type', 'radio');\n\tlandscapeCheckBox.setAttribute('value', 'landscape');\n\t\n\tvar paperSizeSelect = document.createElement('select');\n\tpaperSizeSelect.style.marginBottom = '8px';\n\tpaperSizeSelect.style.borderRadius = '4px';\n\tpaperSizeSelect.style.borderWidth = '1px';\n\tpaperSizeSelect.style.borderStyle = 'solid';\n\tpaperSizeSelect.style.width = '206px';\n\n\tvar formatDiv = document.createElement('div');\n\tformatDiv.style.marginLeft = '4px';\n\tformatDiv.style.width = '210px';\n\tformatDiv.style.height = '24px';\n\n\tportraitCheckBox.style.marginRight = '6px';\n\tformatDiv.appendChild(portraitCheckBox);\n\t\n\tvar portraitSpan = document.createElement('span');\n\tportraitSpan.style.maxWidth = '100px';\n\tmxUtils.write(portraitSpan, mxResources.get('portrait'));\n\tformatDiv.appendChild(portraitSpan);\n\n\tlandscapeCheckBox.style.marginLeft = '10px';\n\tlandscapeCheckBox.style.marginRight = '6px';\n\tformatDiv.appendChild(landscapeCheckBox);\n\t\n\tvar landscapeSpan = document.createElement('span');\n\tlandscapeSpan.style.width = '100px';\n\tmxUtils.write(landscapeSpan, mxResources.get('landscape'));\n\tformatDiv.appendChild(landscapeSpan)\n\n\tvar customDiv = document.createElement('div');\n\tcustomDiv.style.marginLeft = '4px';\n\tcustomDiv.style.width = '210px';\n\tcustomDiv.style.height = '24px';\n\t\n\tvar widthInput = document.createElement('input');\n\twidthInput.setAttribute('size', '7');\n\twidthInput.style.textAlign = 'right';\n\tcustomDiv.appendChild(widthInput);\n\tmxUtils.write(customDiv, ' in x ');\n\t\n\tvar heightInput = document.createElement('input');\n\theightInput.setAttribute('size', '7');\n\theightInput.style.textAlign = 'right';\n\tcustomDiv.appendChild(heightInput);\n\tmxUtils.write(customDiv, ' in');\n\n\tformatDiv.style.display = 'none';\n\tcustomDiv.style.display = 'none';\n\t\n\tvar pf = new Object();\n\tvar formats = PageSetupDialog.getFormats();\n\t\n\tfor (var i = 0; i < formats.length; i++)\n\t{\n\t\tvar f = formats[i];\n\t\tpf[f.key] = f;\n\n\t\tvar paperSizeOption = document.createElement('option');\n\t\tpaperSizeOption.setAttribute('value', f.key);\n\t\tmxUtils.write(paperSizeOption, f.title);\n\t\tpaperSizeSelect.appendChild(paperSizeOption);\n\t}\n\t\n\tvar customSize = false;\n\t\n\tfunction listener(sender, evt, force)\n\t{\n\t\tif (force || (widthInput != document.activeElement && heightInput != document.activeElement))\n\t\t{\n\t\t\tvar detected = false;\n\t\t\t\n\t\t\tfor (var i = 0; i < formats.length; i++)\n\t\t\t{\n\t\t\t\tvar f = formats[i];\n\t\n\t\t\t\t// Special case where custom was chosen\n\t\t\t\tif (customSize)\n\t\t\t\t{\n\t\t\t\t\tif (f.key == 'custom')\n\t\t\t\t\t{\n\t\t\t\t\t\tpaperSizeSelect.value = f.key;\n\t\t\t\t\t\tcustomSize = false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if (f.format != null)\n\t\t\t\t{\n\t\t\t\t\t// Fixes wrong values for previous A4 and A5 page sizes\n\t\t\t\t\tif (f.key == 'a4')\n\t\t\t\t\t{\n\t\t\t\t\t\tif (pageFormat.width == 826)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tpageFormat = mxRectangle.fromRectangle(pageFormat);\n\t\t\t\t\t\t\tpageFormat.width = 827;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if (pageFormat.height == 826)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tpageFormat = mxRectangle.fromRectangle(pageFormat);\n\t\t\t\t\t\t\tpageFormat.height = 827;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse if (f.key == 'a5')\n\t\t\t\t\t{\n\t\t\t\t\t\tif (pageFormat.width == 584)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tpageFormat = mxRectangle.fromRectangle(pageFormat);\n\t\t\t\t\t\t\tpageFormat.width = 583;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if (pageFormat.height == 584)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tpageFormat = mxRectangle.fromRectangle(pageFormat);\n\t\t\t\t\t\t\tpageFormat.height = 583;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif (pageFormat.width == f.format.width && pageFormat.height == f.format.height)\n\t\t\t\t\t{\n\t\t\t\t\t\tpaperSizeSelect.value = f.key;\n\t\t\t\t\t\tportraitCheckBox.setAttribute('checked', 'checked');\n\t\t\t\t\t\tportraitCheckBox.defaultChecked = true;\n\t\t\t\t\t\tportraitCheckBox.checked = true;\n\t\t\t\t\t\tlandscapeCheckBox.removeAttribute('checked');\n\t\t\t\t\t\tlandscapeCheckBox.defaultChecked = false;\n\t\t\t\t\t\tlandscapeCheckBox.checked = false;\n\t\t\t\t\t\tdetected = true;\n\t\t\t\t\t}\n\t\t\t\t\telse if (pageFormat.width == f.format.height && pageFormat.height == f.format.width)\n\t\t\t\t\t{\n\t\t\t\t\t\tpaperSizeSelect.value = f.key;\n\t\t\t\t\t\tportraitCheckBox.removeAttribute('checked');\n\t\t\t\t\t\tportraitCheckBox.defaultChecked = false;\n\t\t\t\t\t\tportraitCheckBox.checked = false;\n\t\t\t\t\t\tlandscapeCheckBox.setAttribute('checked', 'checked');\n\t\t\t\t\t\tlandscapeCheckBox.defaultChecked = true;\n\t\t\t\t\t\tlandscapeCheckBox.checked = true;\n\t\t\t\t\t\tdetected = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// Selects custom format which is last in list\n\t\t\tif (!detected)\n\t\t\t{\n\t\t\t\twidthInput.value = pageFormat.width / 100;\n\t\t\t\theightInput.value = pageFormat.height / 100;\n\t\t\t\tportraitCheckBox.setAttribute('checked', 'checked');\n\t\t\t\tpaperSizeSelect.value = 'custom';\n\t\t\t\tformatDiv.style.display = 'none';\n\t\t\t\tcustomDiv.style.display = '';\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tformatDiv.style.display = '';\n\t\t\t\tcustomDiv.style.display = 'none';\n\t\t\t}\n\t\t}\n\t};\n\t\n\tlistener();\n\n\tdiv.appendChild(paperSizeSelect);\n\tmxUtils.br(div);\n\n\tdiv.appendChild(formatDiv);\n\tdiv.appendChild(customDiv);\n\t\n\tvar currentPageFormat = pageFormat;\n\t\n\tvar update = function(evt, selectChanged)\n\t{\n\t\tvar f = pf[paperSizeSelect.value];\n\t\t\n\t\tif (f.format != null)\n\t\t{\n\t\t\twidthInput.value = f.format.width / 100;\n\t\t\theightInput.value = f.format.height / 100;\n\t\t\tcustomDiv.style.display = 'none';\n\t\t\tformatDiv.style.display = '';\n\t\t}\n\t\telse\n\t\t{\n\t\t\tformatDiv.style.display = 'none';\n\t\t\tcustomDiv.style.display = '';\n\t\t}\n\t\t\n\t\tvar wi = parseFloat(widthInput.value);\n\t\t\n\t\tif (isNaN(wi) || wi <= 0)\n\t\t{\n\t\t\twidthInput.value = pageFormat.width / 100;\n\t\t}\n\t\t\n\t\tvar hi = parseFloat(heightInput.value);\n\t\t\n\t\tif (isNaN(hi) || hi <= 0)\n\t\t{\n\t\t\theightInput.value = pageFormat.height / 100;\n\t\t}\n\t\t\n\t\tvar newPageFormat = new mxRectangle(0, 0,\n\t\t\tMath.floor(parseFloat(widthInput.value) * 100),\n\t\t\tMath.floor(parseFloat(heightInput.value) * 100));\n\t\t\n\t\tif (paperSizeSelect.value != 'custom' && landscapeCheckBox.checked)\n\t\t{\n\t\t\tnewPageFormat = new mxRectangle(0, 0, newPageFormat.height, newPageFormat.width);\n\t\t}\n\t\t\n\t\t// Initial select of custom should not update page format to avoid update of combo\n\t\tif ((!selectChanged || !customSize) && (newPageFormat.width != currentPageFormat.width ||\n\t\t\tnewPageFormat.height != currentPageFormat.height))\n\t\t{\n\t\t\tcurrentPageFormat = newPageFormat;\n\t\t\t\n\t\t\t// Updates page format and reloads format panel\n\t\t\tif (pageFormatListener != null)\n\t\t\t{\n\t\t\t\tpageFormatListener(currentPageFormat);\n\t\t\t}\n\t\t}\n\t};\n\n\tmxEvent.addListener(portraitSpan, 'click', function(evt)\n\t{\n\t\tportraitCheckBox.checked = true;\n\t\tupdate(evt);\n\t\tmxEvent.consume(evt);\n\t});\n\t\n\tmxEvent.addListener(landscapeSpan, 'click', function(evt)\n\t{\n\t\tlandscapeCheckBox.checked = true;\n\t\tupdate(evt);\n\t\tmxEvent.consume(evt);\n\t});\n\t\n\tmxEvent.addListener(widthInput, 'blur', update);\n\tmxEvent.addListener(widthInput, 'click', update);\n\tmxEvent.addListener(heightInput, 'blur', update);\n\tmxEvent.addListener(heightInput, 'click', update);\n\tmxEvent.addListener(landscapeCheckBox, 'change', update);\n\tmxEvent.addListener(portraitCheckBox, 'change', update);\n\tmxEvent.addListener(paperSizeSelect, 'change', function(evt)\n\t{\n\t\t// Handles special case where custom was chosen\n\t\tcustomSize = paperSizeSelect.value == 'custom';\n\t\tupdate(evt, true);\n\t});\n\t\n\tupdate();\n\t\n\treturn {set: function(value)\n\t{\n\t\tpageFormat = value;\n\t\tlistener(null, null, true);\n\t},get: function()\n\t{\n\t\treturn currentPageFormat;\n\t}, widthInput: widthInput,\n\t\theightInput: heightInput};\n};\n\n/**\n * \n */\nPageSetupDialog.getFormats = function()\n{\n\treturn [{key: 'letter', title: 'US-Letter (8,5\" x 11\")', format: mxConstants.PAGE_FORMAT_LETTER_PORTRAIT},\n\t        {key: 'legal', title: 'US-Legal (8,5\" x 14\")', format: new mxRectangle(0, 0, 850, 1400)},\n\t        {key: 'tabloid', title: 'US-Tabloid (11\" x 17\")', format: new mxRectangle(0, 0, 1100, 1700)},\n\t        {key: 'executive', title: 'US-Executive (7\" x 10\")', format: new mxRectangle(0, 0, 700, 1000)},\n\t        {key: 'a0', title: 'A0 (841 mm x 1189 mm)', format: new mxRectangle(0, 0, 3300, 4681)},\n\t        {key: 'a1', title: 'A1 (594 mm x 841 mm)', format: new mxRectangle(0, 0, 2339, 3300)},\n\t        {key: 'a2', title: 'A2 (420 mm x 594 mm)', format: new mxRectangle(0, 0, 1654, 2336)},\n\t        {key: 'a3', title: 'A3 (297 mm x 420 mm)', format: new mxRectangle(0, 0, 1169, 1654)},\n\t        {key: 'a4', title: 'A4 (210 mm x 297 mm)', format: mxConstants.PAGE_FORMAT_A4_PORTRAIT},\n\t        {key: 'a5', title: 'A5 (148 mm x 210 mm)', format: new mxRectangle(0, 0, 583, 827)},\n\t        {key: 'a6', title: 'A6 (105 mm x 148 mm)', format: new mxRectangle(0, 0, 413, 583)},\n\t        {key: 'a7', title: 'A7 (74 mm x 105 mm)', format: new mxRectangle(0, 0, 291, 413)},\n\t        {key: 'b4', title: 'B4 (250 mm x 353 mm)', format: new mxRectangle(0, 0, 980, 1390)},\n\t        {key: 'b5', title: 'B5 (176 mm x 250 mm)', format: new mxRectangle(0, 0, 690, 980)},\n\t        {key: '16-9', title: '16:9 (1600 x 900)', format: new mxRectangle(0, 0, 900, 1600)},\n\t        {key: '16-10', title: '16:10 (1920 x 1200)', format: new mxRectangle(0, 0, 1200, 1920)},\n\t        {key: '4-3', title: '4:3 (1600 x 1200)', format: new mxRectangle(0, 0, 1200, 1600)},\n\t        {key: 'custom', title: mxResources.get('custom'), format: null}];\n};\n\n/**\n * Constructs a new filename dialog.\n */\nvar FilenameDialog = function(editorUi, filename, buttonText, fn, label, validateFn, content, helpLink, closeOnBtn, cancelFn, hints, w, lblW)\n{\n\tcloseOnBtn = (closeOnBtn != null) ? closeOnBtn : true;\n\tvar row, td;\n\t\n\tvar table = document.createElement('table');\n\tvar tbody = document.createElement('tbody');\n\ttable.style.position = 'absolute';\n\ttable.style.top = '30px';\n\ttable.style.left = '20px';\n\t\n\trow = document.createElement('tr');\n\t\n\ttd = document.createElement('td');\n\ttd.style.textOverflow = 'ellipsis';\n\ttd.style.whiteSpace = 'nowrap';\n\ttd.style.textAlign = 'right';\n\ttd.style.maxWidth = (lblW? lblW + 15 : 100) + 'px';\n\ttd.style.fontSize = '10pt';\n\ttd.style.width = (lblW? lblW : 84) + 'px';\n\tmxUtils.write(td, (label || mxResources.get('filename')) + ':');\n\t\n\trow.appendChild(td);\n\t\n\tvar nameInput = document.createElement('input');\n\tnameInput.setAttribute('value', filename || '');\n\tnameInput.style.marginLeft = '4px';\n\tnameInput.style.width = (w != null) ? w + 'px' : '180px';\n\t\n\tvar genericBtn = mxUtils.button(buttonText, function()\n\t{\n\t\tif (validateFn == null || validateFn(nameInput.value))\n\t\t{\n\t\t\tif (closeOnBtn)\n\t\t\t{\n\t\t\t\teditorUi.hideDialog();\n\t\t\t}\n\t\t\t\n\t\t\tfn(nameInput.value);\n\t\t}\n\t});\n\tgenericBtn.className = 'geBtn gePrimaryBtn';\n\t\n\tthis.init = function()\n\t{\n\t\tif (label == null && content != null)\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\tif (hints != null)\n\t\t{\n\t\t\tEditor.selectFilename(nameInput);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tnameInput.focus();\n\t\t\t\n\t\t\tif (mxClient.IS_GC || mxClient.IS_FF || document.documentMode >= 5)\n\t\t\t{\n\t\t\t\tnameInput.select();\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tdocument.execCommand('selectAll', false, null);\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Installs drag and drop handler for links\n\t\tif (Graph.fileSupport)\n\t\t{\n\t\t\t// Setup the dnd listeners\n\t\t\tvar dlg = table.parentNode;\n\t\t\t\n\t\t\tif (dlg != null)\n\t\t\t{\n\t\t\t\tvar graph = editorUi.editor.graph;\n\t\t\t\tvar dropElt = null;\n\t\t\t\t\t\n\t\t\t\tmxEvent.addListener(dlg, 'dragleave', function(evt)\n\t\t\t\t{\n\t\t\t\t\tif (dropElt != null)\n\t\t\t\t    {\n\t\t\t\t\t\tdropElt.style.backgroundColor = '';\n\t\t\t\t    \tdropElt = null;\n\t\t\t\t    }\n\t\t\t\t    \n\t\t\t\t\tevt.stopPropagation();\n\t\t\t\t\tevt.preventDefault();\n\t\t\t\t});\n\t\t\t\t\n\t\t\t\tmxEvent.addListener(dlg, 'dragover', mxUtils.bind(this, function(evt)\n\t\t\t\t{\n\t\t\t\t\t// IE 10 does not implement pointer-events so it can't have a drop highlight\n\t\t\t\t\tif (dropElt == null && (!mxClient.IS_IE || document.documentMode > 10))\n\t\t\t\t\t{\n\t\t\t\t\t\tdropElt = nameInput;\n\t\t\t\t\t\tdropElt.style.backgroundColor = '#ebf2f9';\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tevt.stopPropagation();\n\t\t\t\t\tevt.preventDefault();\n\t\t\t\t}));\n\t\t\t\t\t\t\n\t\t\t\tmxEvent.addListener(dlg, 'drop', mxUtils.bind(this, function(evt)\n\t\t\t\t{\n\t\t\t\t    if (dropElt != null)\n\t\t\t\t    {\n\t\t\t\t\t\tdropElt.style.backgroundColor = '';\n\t\t\t\t    \tdropElt = null;\n\t\t\t\t    }\n\t\n\t\t\t\t    if (mxUtils.indexOf(evt.dataTransfer.types, 'text/uri-list') >= 0)\n\t\t\t\t    {\n\t\t\t\t    \tnameInput.value = decodeURIComponent(evt.dataTransfer.getData('text/uri-list'));\n\t\t\t\t    \tgenericBtn.click();\n\t\t\t\t    }\n\t\n\t\t\t\t    evt.stopPropagation();\n\t\t\t\t    evt.preventDefault();\n\t\t\t\t}));\n\t\t\t}\n\t\t}\n\t};\n\n\ttd = document.createElement('td');\n\ttd.style.whiteSpace = 'nowrap';\n\ttd.appendChild(nameInput);\n\trow.appendChild(td);\n\t\n\tif (label != null || content == null)\n\t{\n\t\ttbody.appendChild(row);\n\t\t\n\t\tif (hints != null)\n\t\t{\t\n\t\t\ttd.appendChild(FilenameDialog.createTypeHint(editorUi, nameInput, hints));\n\n\t\t\tif (editorUi.editor.diagramFileTypes != null)\n\t\t\t{\n\t\t\t\trow = document.createElement('tr');\n\t\t\n\t\t\t\ttd = document.createElement('td');\n\t\t\t\ttd.style.textOverflow = 'ellipsis';\n\t\t\t\ttd.style.textAlign = 'right';\n\t\t\t\ttd.style.maxWidth = '100px';\n\t\t\t\ttd.style.fontSize = '10pt';\n\t\t\t\ttd.style.width = '84px';\n\t\t\t\tmxUtils.write(td, mxResources.get('type') + ':');\n\t\t\t\trow.appendChild(td);\n\n\t\t\t\ttd = document.createElement('td');\n\t\t\t\ttd.style.whiteSpace = 'nowrap';\n\t\t\t\trow.appendChild(td);\n\n\t\t\t\tvar typeSelect = FilenameDialog.createFileTypes(editorUi,\n\t\t\t\t\tnameInput, editorUi.editor.diagramFileTypes);\n\t\t\t\ttypeSelect.style.marginLeft = '4px';\n\t\t\t\ttypeSelect.style.width = '198px';\n\n\t\t\t\ttd.appendChild(typeSelect);\n\t\t\t\tnameInput.style.width = (w != null) ? (w - 40) + 'px' : '190px';\n\n\t\t\t\trow.appendChild(td);\n\t\t\t\ttbody.appendChild(row);\n\t\t\t}\n\t\t}\n\t}\n\t\n\tif (content != null)\n\t{\n\t\trow = document.createElement('tr');\n\t\ttd = document.createElement('td');\n\t\ttd.colSpan = 2;\n\t\ttd.appendChild(content);\n\t\trow.appendChild(td);\n\t\ttbody.appendChild(row);\n\t}\n\t\n\trow = document.createElement('tr');\n\ttd = document.createElement('td');\n\ttd.colSpan = 2;\n\ttd.style.paddingTop = (hints != null) ? '12px' : '20px';\n\ttd.style.whiteSpace = 'nowrap';\n\ttd.setAttribute('align', 'right');\n\t\n\tvar cancelBtn = mxUtils.button(mxResources.get('cancel'), function()\n\t{\n\t\teditorUi.hideDialog();\n\t\t\n\t\tif (cancelFn != null)\n\t\t{\n\t\t\tcancelFn();\n\t\t}\n\t});\n\tcancelBtn.className = 'geBtn';\n\t\n\tif (editorUi.editor.cancelFirst)\n\t{\n\t\ttd.appendChild(cancelBtn);\n\t}\n\t\n\tif (helpLink != null)\n\t{\n\t\tvar helpBtn = mxUtils.button(mxResources.get('help'), function()\n\t\t{\n\t\t\teditorUi.editor.graph.openLink(helpLink);\n\t\t});\n\t\t\n\t\thelpBtn.className = 'geBtn';\t\n\t\ttd.appendChild(helpBtn);\n\t}\n\n\tmxEvent.addListener(nameInput, 'keypress', function(e)\n\t{\n\t\tif (e.keyCode == 13)\n\t\t{\n\t\t\tgenericBtn.click();\n\t\t}\n\t});\n\t\n\ttd.appendChild(genericBtn);\n\t\n\tif (!editorUi.editor.cancelFirst)\n\t{\n\t\ttd.appendChild(cancelBtn);\n\t}\n\n\trow.appendChild(td);\n\ttbody.appendChild(row);\n\ttable.appendChild(tbody);\n\t\n\tthis.container = table;\n};\n\n/**\n * \n */\nFilenameDialog.filenameHelpLink = null;\n\n/**\n * \n */\nFilenameDialog.createTypeHint = function(ui, nameInput, hints)\n{\n\tvar hint = document.createElement('img');\n\thint.style.backgroundPosition = 'center bottom';\n\thint.style.backgroundRepeat = 'no-repeat';\n\thint.style.margin = '2px 0 0 4px';\n\thint.style.verticalAlign = 'top';\n\thint.style.cursor = 'pointer';\n\thint.style.height = '16px';\n\thint.style.width = '16px';\n\tmxUtils.setOpacity(hint, 70);\n\t\n\tvar nameChanged = function()\n\t{\n\t\thint.setAttribute('src', Editor.helpImage);\n\t\thint.setAttribute('title', mxResources.get('help'));\n\t\t\n\t\tfor (var i = 0; i < hints.length; i++)\n\t\t{\n\t\t\tif (hints[i].ext.length > 0 && nameInput.value.toLowerCase().substring(\n\t\t\t\tnameInput.value.length - hints[i].ext.length - 1) == '.' + hints[i].ext)\n\t\t\t{\n\t\t\t\thint.setAttribute('title', mxResources.get(hints[i].title));\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t};\n\t\n\tmxEvent.addListener(nameInput, 'keyup', nameChanged);\n\tmxEvent.addListener(nameInput, 'change', nameChanged);\n\tmxEvent.addListener(hint, 'click', function(evt)\n\t{\n\t\tvar title = hint.getAttribute('title');\n\t\t\n\t\tif (hint.getAttribute('src') == Editor.helpImage)\n\t\t{\n\t\t\tui.editor.graph.openLink(FilenameDialog.filenameHelpLink);\n\t\t}\n\t\telse if (title != '')\n\t\t{\n\t\t\tui.showError(null, title, mxResources.get('help'), function()\n\t\t\t{\n\t\t\t\tui.editor.graph.openLink(FilenameDialog.filenameHelpLink);\n\t\t\t}, null, mxResources.get('ok'), null, null, null, 340, 90);\n\t\t}\n\t\t\n\t\tmxEvent.consume(evt);\n\t});\n\t\n\tnameChanged();\n\t\n\treturn hint;\n};\n\n/**\n * \n */\nFilenameDialog.createFileTypes = function(editorUi, nameInput, types)\n{\n\tvar typeSelect = document.createElement('select');\n\n\tfor (var i = 0; i < types.length; i++)\n\t{\n\t\tvar typeOption = document.createElement('option');\n\t\ttypeOption.setAttribute('value', i);\n\t\tmxUtils.write(typeOption, mxResources.get(types[i].description) +\n\t\t\t' (.' + types[i].extension + ')');\n\t\ttypeSelect.appendChild(typeOption);\n\t}\n\t\t\t\n\tmxEvent.addListener(typeSelect, 'change', function(evt)\n\t{\n\t\tvar ext = types[typeSelect.value].extension;\n\t\tvar idx2 = nameInput.value.lastIndexOf('.drawio.');\n\t\tvar idx = (idx2 > 0) ? idx2 : nameInput.value.lastIndexOf('.');\n\n\t\tif (ext != 'drawio')\n\t\t{\n\t\t\text = 'drawio.' + ext;\n\t\t}\n\t\t\n\t\tif (idx > 0)\n\t\t{\n\t\t\tnameInput.value = nameInput.value.substring(0, idx + 1) + ext;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tnameInput.value = nameInput.value + '.' + ext;\n\t\t}\n\t\t\n\t\tif ('createEvent' in document)\n\t\t{\n\t\t    var changeEvent = document.createEvent('HTMLEvents');\n\t\t    changeEvent.initEvent('change', false, true);\n\t\t    nameInput.dispatchEvent(changeEvent);\n\t\t}\n\t\telse\n\t\t{\n\t\t    nameInput.fireEvent('onchange');\n\t\t}\n\t});\n\t\n\tvar nameInputChanged = function(evt)\n\t{\n\t\tvar name = nameInput.value.toLowerCase();\n\t\tvar active = 0;\n\t\t\n\t\t// Finds current extension\n\t\tfor (var i = 0; i < types.length; i++)\n\t\t{\n\t\t\tvar ext = types[i].extension;\n\t\t\tvar subExt = null;\n\n\t\t\tif (ext != 'drawio')\n\t\t\t{\n\t\t\t\tsubExt = ext;\n\t\t\t\text = '.drawio.' + ext;\n\t\t\t}\n\n\t\t\tif (name.substring(name.length - ext.length - 1) == '.' + ext ||\n\t\t\t\t(subExt != null && name.substring(name.length - subExt.length - 1) == '.' + subExt))\n\t\t\t{\n\t\t\t\tactive = i;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\ttypeSelect.value = active;\n\t};\n\t\n\tmxEvent.addListener(nameInput, 'change', nameInputChanged);\n\tmxEvent.addListener(nameInput, 'keyup', nameInputChanged);\n\tnameInputChanged();\n\t\n\treturn typeSelect;\n};\n\n/**\n * \n */\nvar WrapperWindow = function(editorUi, title, x, y, w, h, fn)\n{\n\tvar div = editorUi.createSidebarContainer();\n\tfn(div);\n\n\tthis.window = new mxWindow(title, div, x, y, w, h, true, true);\n\tthis.window.destroyOnClose = false;\n\tthis.window.setMaximizable(false);\n\tthis.window.setResizable(true);\n\tthis.window.setClosable(true);\n\tthis.window.setVisible(true);\n\n\teditorUi.installResizeHandler(this, true);\n\t\n\t// Workaround for text selection starting in Safari\n\t// when dragging shapes outside of window\n\tif (mxClient.IS_SF)\n\t{\n\t\tthis.window.div.onselectstart = mxUtils.bind(this, function(evt)\n\t\t{\n\t\t\tif (evt == null)\n\t\t\t{\n\t\t\t\tevt = window.event;\n\t\t\t}\n\t\t\t\n\t\t\treturn (evt != null && editorUi.isSelectionAllowed(evt));\n\t\t});\n\t}\n};\n\n/**\n * Static overrides\n */\n(function()\n{\n\t// Uses HTML for background pages (to support grid background image)\n\tmxGraphView.prototype.validateBackgroundPage = function()\n\t{\n\t\tvar graph = this.graph;\n\t\t\n\t\tif (graph.container != null && !graph.transparentBackground)\n\t\t{\n\t\t\tif (graph.pageVisible)\n\t\t\t{\n\t\t\t\tvar bounds = this.getBackgroundPageBounds();\n\t\t\t\t\n\t\t\t\tif (this.backgroundPageShape == null)\n\t\t\t\t{\n\t\t\t\t\t// Finds first element in graph container\n\t\t\t\t\tvar firstChild = graph.container.firstChild;\n\t\t\t\t\t\n\t\t\t\t\twhile (firstChild != null && firstChild.nodeType != mxConstants.NODETYPE_ELEMENT)\n\t\t\t\t\t{\n\t\t\t\t\t\tfirstChild = firstChild.nextSibling;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif (firstChild != null)\n\t\t\t\t\t{\n\t\t\t\t\t\tthis.backgroundPageShape = this.createBackgroundPageShape(bounds);\n\t\t\t\t\t\tthis.backgroundPageShape.scale = 1;\n\t\t\t\t\t\t\n\t\t\t\t\t\t// IE8 standards has known rendering issues inside mxWindow but not using shadow is worse.\n\t\t\t\t\t\tthis.backgroundPageShape.isShadow = true;\n\t\t\t\t\t\tthis.backgroundPageShape.dialect = mxConstants.DIALECT_STRICTHTML;\n\t\t\t\t\t\tthis.backgroundPageShape.init(graph.container);\n\t\n\t\t\t\t\t\t// Required for the browser to render the background page in correct order\n\t\t\t\t\t\tfirstChild.style.position = 'absolute';\n\t\t\t\t\t\tgraph.container.insertBefore(this.backgroundPageShape.node, firstChild);\n\t\t\t\t\t\tthis.backgroundPageShape.redraw();\n\t\t\t\t\t\t\n\t\t\t\t\t\tthis.backgroundPageShape.node.className = 'geBackgroundPage';\n\t\t\t\t\t\t\n\t\t\t\t\t\t// Adds listener for double click handling on background\n\t\t\t\t\t\tmxEvent.addListener(this.backgroundPageShape.node, 'dblclick',\n\t\t\t\t\t\t\tmxUtils.bind(this, function(evt)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tgraph.dblClick(evt);\n\t\t\t\t\t\t\t})\n\t\t\t\t\t\t);\n\t\t\t\t\t\t\n\t\t\t\t\t\t// Adds basic listeners for graph event dispatching outside of the\n\t\t\t\t\t\t// container and finishing the handling of a single gesture\n\t\t\t\t\t\tmxEvent.addGestureListeners(this.backgroundPageShape.node,\n\t\t\t\t\t\t\tmxUtils.bind(this, function(evt)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tgraph.fireMouseEvent(mxEvent.MOUSE_DOWN, new mxMouseEvent(evt));\n\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t\tmxUtils.bind(this, function(evt)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t// Hides the tooltip if mouse is outside container\n\t\t\t\t\t\t\t\tif (graph.tooltipHandler != null && graph.tooltipHandler.isHideOnHover())\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tgraph.tooltipHandler.hide();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tif (graph.isMouseDown && !mxEvent.isConsumed(evt))\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tgraph.fireMouseEvent(mxEvent.MOUSE_MOVE, new mxMouseEvent(evt));\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t\tmxUtils.bind(this, function(evt)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tgraph.fireMouseEvent(mxEvent.MOUSE_UP, new mxMouseEvent(evt));\n\t\t\t\t\t\t\t})\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tthis.backgroundPageShape.scale = 1;\n\t\t\t\t\tthis.backgroundPageShape.bounds = bounds;\n\t\t\t\t\tthis.backgroundPageShape.redraw();\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if (this.backgroundPageShape != null)\n\t\t\t{\n\t\t\t\tthis.backgroundPageShape.destroy();\n\t\t\t\tthis.backgroundPageShape = null;\n\t\t\t}\n\t\t\t\n\t\t\tthis.validateBackgroundStyles();\n\t\t}\n\t};\n\n\t// Updates the CSS of the background to draw the grid\n\tmxGraphView.prototype.validateBackgroundStyles = function(factor, cx, cy)\n\t{\n\t\tvar graph = this.graph;\n\t\tfactor = (factor != null) ? factor : 1;\n\t\tvar color = (graph.background == null || graph.background == mxConstants.NONE) ?\n\t\t\tgraph.defaultPageBackgroundColor : graph.background;\n\t\tvar gridColor = (color != null && this.gridColor != color.toLowerCase()) ? this.gridColor : '#ffffff';\n\t\tvar image = 'none';\n\t\tvar position = '';\n\t\t\n\t\tif (graph.isGridEnabled() || graph.gridVisible)\n\t\t{\n\t\t\tvar phase = 10;\n\t\t\t\n\t\t\tif (mxClient.IS_SVG)\n\t\t\t{\n\t\t\t\t// Generates the SVG required for drawing the dynamic grid\n\t\t\t\timage = unescape(encodeURIComponent(this.createSvgGrid(gridColor, factor)));\n\t\t\t\timage = (window.btoa) ? btoa(image) : Base64.encode(image, true);\n\t\t\t\timage = 'url(' + 'data:image/svg+xml;base64,' + image + ')'\n\t\t\t\tphase = graph.gridSize * this.scale * this.gridSteps * factor;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// Fallback to grid wallpaper with fixed size\n\t\t\t\timage = 'url(' + this.gridImage + ')';\n\t\t\t}\n\t\t\t\n\t\t\tvar x0 = 0;\n\t\t\tvar y0 = 0;\n\n\t\t\tvar dx = (cx != null) ? cx - this.translate.x * this.scale : 0;\n\t\t\tvar dy = (cy != null) ? cy - this.translate.y * this.scale : 0;\n\n\t\t\tvar p = graph.gridSize * this.scale * this.gridSteps;\n\t\t\tvar ddx = dx % p;\n\t\t\tvar ddy = dy % p;\n\t\t\t\n\t\t\tif (graph.view.backgroundPageShape != null)\n\t\t\t{\n\t\t\t\tvar bds = this.getBackgroundPageBounds();\n\t\t\t\t\n\t\t\t\tx0 = 1 + bds.x;\n\t\t\t\ty0 = 1 + bds.y;\n\t\t\t}\n\t\t\t\n\t\t\t// Computes the offset to maintain origin for grid\n\t\t\tposition = -Math.round(phase - mxUtils.mod(this.translate.x * this.scale - x0 + dx, phase) + ddx * factor) + 'px ' +\n\t\t\t\t-Math.round(phase - mxUtils.mod(this.translate.y * this.scale - y0 + dy, phase) + ddy * factor) + 'px';\n\t\t}\n\t\t\n\t\tvar canvas = graph.view.canvas;\n\t\t\n\t\tif (canvas.ownerSVGElement != null)\n\t\t{\n\t\t\tcanvas = canvas.ownerSVGElement;\n\t\t}\n\n\t\tvar useDiagramBackground = !Editor.isDarkMode() && graph.enableDiagramBackground;\n\t\t\n\t\tif (graph.view.backgroundPageShape != null)\n\t\t{\n\t\t\tgraph.view.backgroundPageShape.node.style.backgroundPosition = position;\n\t\t\tgraph.view.backgroundPageShape.node.style.backgroundImage = image;\n\t\t\tgraph.view.backgroundPageShape.node.style.backgroundColor = color;\n\t\t\tgraph.view.backgroundPageShape.node.style.borderColor = graph.defaultPageBorderColor;\n\t\t\tgraph.container.className = 'geDiagramContainer geDiagramBackdrop';\n\t\t\tcanvas.style.backgroundImage = 'none';\n\t\t\tcanvas.style.backgroundColor = '';\n\n\t\t\tif (useDiagramBackground)\n\t\t\t{\n\t\t\t\tgraph.container.style.backgroundColor = graph.diagramBackgroundColor;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tgraph.container.style.backgroundColor = '';\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tgraph.container.className = 'geDiagramContainer';\n\t\t\tcanvas.style.backgroundPosition = position;\n\t\t\tcanvas.style.backgroundImage = image;\n\t\t\t\n\t\t\tif (useDiagramBackground && (graph.background == null ||\n\t\t\t\tgraph.background == mxConstants.NONE))\n\t\t\t{\n\t\t\t\tcanvas.style.backgroundColor = graph.diagramBackgroundColor;\n\t\t\t\tgraph.container.style.backgroundColor = '';\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tcanvas.style.backgroundColor = color;\n\t\t\t}\n\t\t}\n\t};\n\t\n\t// Returns the SVG required for painting the background grid.\n\tmxGraphView.prototype.createSvgGrid = function(color, factor)\n\t{\n\t\tfactor = (factor != null) ? factor : 1;\n\t\tvar tmp = this.graph.gridSize * this.scale * factor;\n\t\t\n\t\twhile (tmp < this.minGridSize)\n\t\t{\n\t\t\ttmp *= 2;\n\t\t}\n\t\t\n\t\tvar tmp2 = this.gridSteps * tmp;\n\t\t\n\t\t// Small grid lines\n\t\tvar d = [];\n\t\t\n\t\tfor (var i = 1; i < this.gridSteps; i++)\n\t\t{\n\t\t\tvar tmp3 = i * tmp;\n\t\t\td.push('M 0 ' + tmp3 + ' L ' + tmp2 + ' ' + tmp3 + ' M ' + tmp3 + ' 0 L ' + tmp3 + ' ' + tmp2);\n\t\t}\n\t\t\n\t\t// KNOWN: Rounding errors for certain scales (eg. 144%, 121% in Chrome, FF and Safari). Workaround\n\t\t// in Chrome is to use 100% for the svg size, but this results in blurred grid for large diagrams.\n\t\tvar size = tmp2;\n\t\tvar svg =  '<svg width=\"' + size + '\" height=\"' + size + '\" xmlns=\"' + mxConstants.NS_SVG + '\">' +\n\t\t    '<defs><pattern id=\"grid\" width=\"' + tmp2 + '\" height=\"' + tmp2 + '\" patternUnits=\"userSpaceOnUse\">' +\n\t\t    '<path d=\"' + d.join(' ') + '\" fill=\"none\" stroke=\"' + color + '\" opacity=\"0.2\" stroke-width=\"1\"/>' +\n\t\t    '<path d=\"M ' + tmp2 + ' 0 L 0 0 0 ' + tmp2 + '\" fill=\"none\" stroke=\"' + color + '\" stroke-width=\"1\"/>' +\n\t\t    '</pattern></defs><rect width=\"100%\" height=\"100%\" fill=\"url(#grid)\"/></svg>';\n\n\t\treturn svg;\n\t};\n\n\t// Adds panning for the grid with no page view and disabled scrollbars\n\tvar mxGraphPanGraph = mxGraph.prototype.panGraph;\n\tmxGraph.prototype.panGraph = function(dx, dy)\n\t{\n\t\tmxGraphPanGraph.apply(this, arguments);\n\t\t\n\t\tif (this.shiftPreview1 != null)\n\t\t{\n\t\t\tvar canvas = this.view.canvas;\n\t\t\t\n\t\t\tif (canvas.ownerSVGElement != null)\n\t\t\t{\n\t\t\t\tcanvas = canvas.ownerSVGElement;\n\t\t\t}\n\t\t\t\n\t\t\tvar phase = this.gridSize * this.view.scale * this.view.gridSteps;\n\t\t\tvar position = -Math.round(phase - mxUtils.mod(this.view.translate.x * this.view.scale + dx, phase)) + 'px ' +\n\t\t\t\t-Math.round(phase - mxUtils.mod(this.view.translate.y * this.view.scale + dy, phase)) + 'px';\n\t\t\tcanvas.style.backgroundPosition = position;\n\t\t}\n\t};\n\t\n\t// Draws page breaks only within the page\n\tmxGraph.prototype.updatePageBreaks = function(visible, width, height)\n\t{\n\t\tvar scale = this.view.scale;\n\t\tvar tr = this.view.translate;\n\t\tvar fmt = this.pageFormat;\n\t\tvar ps = scale * this.pageScale;\n\n\t\tvar bounds2 = this.view.getBackgroundPageBounds();\n\n\t\twidth = bounds2.width;\n\t\theight = bounds2.height;\n\t\tvar bounds = new mxRectangle(scale * tr.x, scale * tr.y, fmt.width * ps, fmt.height * ps);\n\n\t\t// Does not show page breaks if the scale is too small\n\t\tvisible = visible && Math.min(bounds.width, bounds.height) > this.minPageBreakDist;\n\n\t\tvar horizontalCount = (visible) ? Math.ceil(height / bounds.height) - 1 : 0;\n\t\tvar verticalCount = (visible) ? Math.ceil(width / bounds.width) - 1 : 0;\n\t\tvar right = bounds2.x + width;\n\t\tvar bottom = bounds2.y + height;\n\n\t\tif (this.horizontalPageBreaks == null && horizontalCount > 0)\n\t\t{\n\t\t\tthis.horizontalPageBreaks = [];\n\t\t}\n\t\t\n\t\tif (this.verticalPageBreaks == null && verticalCount > 0)\n\t\t{\n\t\t\tthis.verticalPageBreaks = [];\n\t\t}\n\t\t\t\n\t\tvar drawPageBreaks = mxUtils.bind(this, function(breaks)\n\t\t{\n\t\t\tif (breaks != null)\n\t\t\t{\n\t\t\t\tvar count = (breaks == this.horizontalPageBreaks) ? horizontalCount : verticalCount; \n\t\t\t\t\n\t\t\t\tfor (var i = 0; i <= count; i++)\n\t\t\t\t{\n\t\t\t\t\tvar pts = (breaks == this.horizontalPageBreaks) ?\n\t\t\t\t\t\t[new mxPoint(Math.round(bounds2.x), Math.round(bounds2.y + (i + 1) * bounds.height)),\n\t\t\t\t\t\t new mxPoint(Math.round(right), Math.round(bounds2.y + (i + 1) * bounds.height))] :\n\t\t\t\t\t\t[new mxPoint(Math.round(bounds2.x + (i + 1) * bounds.width), Math.round(bounds2.y)),\n\t\t\t\t\t\t new mxPoint(Math.round(bounds2.x + (i + 1) * bounds.width), Math.round(bottom))];\n\t\t\t\t\t\n\t\t\t\t\tif (breaks[i] != null)\n\t\t\t\t\t{\n\t\t\t\t\t\tbreaks[i].points = pts;\n\t\t\t\t\t\tbreaks[i].redraw();\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tvar pageBreak = new mxPolyline(pts, this.pageBreakColor);\n\t\t\t\t\t\tpageBreak.dialect = this.dialect;\n\t\t\t\t\t\tpageBreak.isDashed = this.pageBreakDashed;\n\t\t\t\t\t\tpageBreak.pointerEvents = false;\n\t\t\t\t\t\tpageBreak.init(this.view.backgroundPane);\n\t\t\t\t\t\tpageBreak.redraw();\n\t\t\t\t\t\t\n\t\t\t\t\t\tbreaks[i] = pageBreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tfor (var i = count; i < breaks.length; i++)\n\t\t\t\t{\n\t\t\t\t\tif (breaks[i] != null)\n\t\t\t\t\t{\n\t\t\t\t\t\tbreaks[i].destroy();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tbreaks.splice(count, breaks.length - count);\n\t\t\t}\n\t\t});\n\t\t\t\n\t\tdrawPageBreaks(this.horizontalPageBreaks);\n\t\tdrawPageBreaks(this.verticalPageBreaks);\n\t};\n\t\n\t// Disables removing relative children and table rows and cells from parents\n\tvar mxGraphHandlerShouldRemoveCellsFromParent = mxGraphHandler.prototype.shouldRemoveCellsFromParent;\n\tmxGraphHandler.prototype.shouldRemoveCellsFromParent = function(parent, cells, evt)\n\t{\n\t\tfor (var i = 0; i < cells.length; i++)\n\t\t{\n\t\t\tif (this.graph.isTableCell(cells[i]) || this.graph.isTableRow(cells[i]))\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\telse if (this.graph.getModel().isVertex(cells[i]))\n\t\t\t{\n\t\t\t\tvar geo = this.graph.getCellGeometry(cells[i]);\n\t\t\t\t\n\t\t\t\tif (geo != null && geo.relative)\n\t\t\t\t{\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn mxGraphHandlerShouldRemoveCellsFromParent.apply(this, arguments);\n\t};\n\n\t// Overrides to ignore hotspot only for target terminal\n\tvar mxConnectionHandlerCreateMarker = mxConnectionHandler.prototype.createMarker;\n\tmxConnectionHandler.prototype.createMarker = function()\n\t{\n\t\tvar marker = mxConnectionHandlerCreateMarker.apply(this, arguments);\n\t\t\n\t\tmarker.intersects = mxUtils.bind(this, function(state, evt)\n\t\t{\n\t\t\tif (this.isConnecting())\n\t\t\t{\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\t\n\t\t\treturn mxCellMarker.prototype.intersects.apply(marker, arguments);\n\t\t});\n\t\t\n\t\treturn marker;\n\t};\n\n\t// Creates background page shape\n\tmxGraphView.prototype.createBackgroundPageShape = function(bounds)\n\t{\n\t\treturn new mxRectangleShape(bounds, '#ffffff', this.graph.defaultPageBorderColor);\n\t};\n\n\t// Fits the number of background pages to the graph\n\tmxGraphView.prototype.getBackgroundPageBounds = function()\n\t{\n\t\tvar gb = this.getGraphBounds();\n\t\t\n\t\t// Computes unscaled, untranslated graph bounds\n\t\tvar x = (gb.width > 0) ? gb.x / this.scale - this.translate.x : 0;\n\t\tvar y = (gb.height > 0) ? gb.y / this.scale - this.translate.y : 0;\n\t\tvar w = gb.width / this.scale;\n\t\tvar h = gb.height / this.scale;\n\t\t\n\t\tvar fmt = this.graph.pageFormat;\n\t\tvar ps = this.graph.pageScale;\n\n\t\tvar pw = fmt.width * ps;\n\t\tvar ph = fmt.height * ps;\n\n\t\tvar x0 = Math.floor(Math.min(0, x) / pw);\n\t\tvar y0 = Math.floor(Math.min(0, y) / ph);\n\t\tvar xe = Math.ceil(Math.max(1, x + w) / pw);\n\t\tvar ye = Math.ceil(Math.max(1, y + h) / ph);\n\t\t\n\t\tvar rows = xe - x0;\n\t\tvar cols = ye - y0;\n\n\t\tvar bounds = new mxRectangle(this.scale * (this.translate.x + x0 * pw), this.scale *\n\t\t\t\t(this.translate.y + y0 * ph), this.scale * rows * pw, this.scale * cols * ph);\n\t\t\n\t\treturn bounds;\n\t};\n\t\n\t// Add panning for background page in VML\n\tvar graphPanGraph = mxGraph.prototype.panGraph;\n\tmxGraph.prototype.panGraph = function(dx, dy)\n\t{\n\t\tgraphPanGraph.apply(this, arguments);\n\t\t\n\t\tif ((this.dialect != mxConstants.DIALECT_SVG && this.view.backgroundPageShape != null) &&\n\t\t\t(!this.useScrollbarsForPanning || !mxUtils.hasScrollbars(this.container)))\n\t\t{\n\t\t\tthis.view.backgroundPageShape.node.style.marginLeft = dx + 'px';\n\t\t\tthis.view.backgroundPageShape.node.style.marginTop = dy + 'px';\n\t\t}\n\t};\n\n\t/**\n\t * Consumes click events for disabled menu items.\n\t */\n\tvar mxPopupMenuAddItem = mxPopupMenu.prototype.addItem;\n\tmxPopupMenu.prototype.addItem = function(title, image, funct, parent, iconCls, enabled)\n\t{\n\t\tvar result = mxPopupMenuAddItem.apply(this, arguments);\n\t\t\n\t\tif (enabled != null && !enabled)\n\t\t{\n\t\t\tmxEvent.addListener(result, 'mousedown', function(evt)\n\t\t\t{\n\t\t\t\tmxEvent.consume(evt);\n\t\t\t});\n\t\t}\n\t\t\n\t\treturn result;\n\t};\n\t\n\t/**\n\t * Selects tables before cells and rows.\n\t */\n\tvar mxGraphHandlerIsPropagateSelectionCell = mxGraphHandler.prototype.isPropagateSelectionCell;\n\tmxGraphHandler.prototype.isPropagateSelectionCell = function(cell, immediate, me)\n\t{\n\t\tvar result = false;\n\t\tvar parent = this.graph.model.getParent(cell)\n\t\t\n\t\tif (immediate)\n\t\t{\n\t\t\tvar geo = (this.graph.model.isEdge(cell)) ? null :\n\t\t\t\tthis.graph.getCellGeometry(cell);\n\t\t\t\n\t\t\tresult = !this.graph.model.isEdge(parent) &&\n\t\t\t\t!this.graph.isSiblingSelected(cell) &&\n\t\t\t\t((geo != null && geo.relative) ||\n\t\t\t\t!this.graph.isContainer(parent) ||\n\t\t\t\tthis.graph.isPart(cell));\n\t\t}\n\t\telse\n\t\t{\n\t\t\tresult = mxGraphHandlerIsPropagateSelectionCell.apply(this, arguments);\n\t\t\t\n\t\t\tif (this.graph.isTableCell(cell) || this.graph.isTableRow(cell))\n\t\t\t{\n\t\t\t\tvar table = parent;\n\t\t\t\t\n\t\t\t\tif (!this.graph.isTable(table))\n\t\t\t\t{\n\t\t\t\t\ttable = this.graph.model.getParent(table);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tresult = !this.graph.selectionCellsHandler.isHandled(table) ||\n\t\t\t\t\t(this.graph.isCellSelected(table) && this.graph.isToggleEvent(me.getEvent())) ||\n\t\t\t\t\t(this.graph.isCellSelected(cell) && !this.graph.isToggleEvent(me.getEvent())) ||\n\t\t\t\t\t(this.graph.isTableCell(cell) && this.graph.isCellSelected(parent));\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn result;\n\t};\n\n\t/**\n\t * Returns last selected ancestor\n\t */\n\tmxPopupMenuHandler.prototype.getCellForPopupEvent = function(me)\n\t{\n\t\tvar cell = me.getCell();\n\t\tvar model = this.graph.getModel();\n\t\tvar parent = model.getParent(cell);\n\t\tvar state = this.graph.view.getState(parent);\n\t\tvar selected = this.graph.isCellSelected(cell);\n\t\t\n\t\twhile (state != null && (model.isVertex(parent) || model.isEdge(parent)))\n\t\t{\n\t\t\tvar temp = this.graph.isCellSelected(parent);\n\t\t\tselected = selected || temp;\n\t\t\t\n\t\t\tif (temp || (!selected && (this.graph.isTableCell(cell) ||\n\t\t\t\tthis.graph.isTableRow(cell))))\n\t\t\t{\n\t\t\t\tcell = parent;\n\t\t\t}\n\t\t\t\n\t\t\tparent = model.getParent(parent);\n\t\t}\n\t\t\n\t\treturn cell;\n\t};\n\n})();\n\n\n/**\n\t * Adds drawing and update of the shape number.\n\t */\nmxGraphView.prototype.redrawEnumerationState = function(state)\n{\n\tvar enumerate = mxUtils.getValue(state.style, 'enumerate', 0) == '1';\n\n\tif (enumerate && state.secondLabel == null)\n\t{\n\t\tstate.secondLabel = new mxText('', new mxRectangle(),\n\t\t\tmxConstants.ALIGN_LEFT, mxConstants.ALIGN_BOTTOM);\n\t\tstate.secondLabel.size = 12;\n\t\tstate.secondLabel.state = state;\n\t\tstate.secondLabel.dialect = mxConstants.DIALECT_STRICTHTML;\n\n\t\tthis.graph.cellRenderer.initializeLabel(state, state.secondLabel);\n\t}\n\telse if (!enumerate && state.secondLabel != null)\n\t{\n\t\tstate.secondLabel.destroy();\n\t\tstate.secondLabel = null;\n\t}\n\n\tvar shape = state.secondLabel;\n\n\tif (shape != null)\n\t{\n\t\tvar s = state.view.scale;\n\t\tvar value = this.createEnumerationValue(state);\n\t\tvar bounds = this.graph.model.isVertex(state.cell) ?\n\t\t\tnew mxRectangle(state.x + state.width - 4 * s, state.y + 4 * s, 0, 0) :\n\t\t\tmxRectangle.fromPoint(state.view.getPoint(state));\n\n\t\tif (!shape.bounds.equals(bounds) || shape.value != value || shape.scale != s)\n\t\t{\n\t\t\tshape.bounds = bounds;\n\t\t\tshape.value = value;\n\t\t\tshape.scale = s;\n\t\t\tshape.redraw();\n\t\t}\n\t}\n};\n\nEditor.GUID_ALPHABET = \"0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_\";\nEditor.GUID_LENGTH = 20;\nEditor.guid = function(a) {\n    a = null != a ? a : Editor.GUID_LENGTH;\n    for (var b = [], c = 0; c < a; c++)\n        b.push(Editor.GUID_ALPHABET.charAt(Math.floor(Math.random() * Editor.GUID_ALPHABET.length)));\n    return b.join(\"\")\n}"
  },
  {
    "path": "static/cherry/drawio_demo/EditorUi.js",
    "content": "/**\n * Copyright (c) 2006-2012, JGraph Ltd\n */\n/**\n * Constructs a new graph editor\n */\nEditorUi = function (editor, container, lightbox) {\n\tmxEventSource.call(this);\n\n\tthis.destroyFunctions = [];\n\tthis.editor = editor || new Editor();\n\tthis.container = container || document.body;\n\n\tvar ui = this;\n\tvar graph = this.editor.graph;\n\tgraph.lightbox = lightbox;\n\n\t// Overrides graph bounds to include background images\n\tvar graphGetGraphBounds = graph.getGraphBounds;\n\n\tgraph.getGraphBounds = function () {\n\t\tvar bounds = graphGetGraphBounds.apply(this, arguments);\n\t\tvar img = this.backgroundImage;\n\n\t\tif (img != null && img.width != null && img.height != null) {\n\t\t\tvar t = this.view.translate;\n\t\t\tvar s = this.view.scale;\n\n\t\t\tbounds = mxRectangle.fromRectangle(bounds);\n\t\t\tbounds.add(new mxRectangle(\n\t\t\t\t(t.x + img.x) * s, (t.y + img.y) * s,\n\t\t\t\timg.width * s, img.height * s));\n\t\t}\n\n\t\treturn bounds;\n\t};\n\n\t// Faster scrollwheel zoom is possible with CSS transforms\n\tif (graph.useCssTransforms) {\n\t\tthis.lazyZoomDelay = 0;\n\t}\n\n\t// Pre-fetches submenu image or replaces with embedded image if supported\n\tif (mxClient.IS_SVG) {\n\t\tmxPopupMenu.prototype.submenuImage = 'data:image/gif;base64,R0lGODlhCQAJAIAAAP///zMzMyH5BAEAAAAALAAAAAAJAAkAAAIPhI8WebHsHopSOVgb26AAADs=';\n\t}\n\telse {\n\t\tnew Image().src = mxPopupMenu.prototype.submenuImage;\n\t}\n\n\t// Pre-fetches connect image\n\tif (!mxClient.IS_SVG && mxConnectionHandler.prototype.connectImage != null) {\n\t\tnew Image().src = mxConnectionHandler.prototype.connectImage.src;\n\t}\n\n\t// Installs selection state listener\n\tthis.selectionStateListener = mxUtils.bind(this, function (sender, evt) {\n\t\tthis.clearSelectionState();\n\t});\n\n\tgraph.getSelectionModel().addListener(mxEvent.CHANGE, this.selectionStateListener);\n\tgraph.getModel().addListener(mxEvent.CHANGE, this.selectionStateListener);\n\tgraph.addListener(mxEvent.EDITING_STARTED, this.selectionStateListener);\n\tgraph.addListener(mxEvent.EDITING_STOPPED, this.selectionStateListener);\n\tgraph.getView().addListener('unitChanged', this.selectionStateListener);\n\n\t// Disables graph and forced panning in chromeless mode\n\tif (this.editor.chromeless && !this.editor.editable) {\n\t\tthis.footerHeight = 0;\n\t\tgraph.isEnabled = function () { return false; };\n\t\tgraph.panningHandler.isForcePanningEvent = function (me) {\n\t\t\treturn !mxEvent.isPopupTrigger(me.getEvent());\n\t\t};\n\t}\n\n\t// Creates the user interface\n\tthis.actions = new Actions(this);\n\tthis.menus = this.createMenus();\n\n\tif (!graph.standalone) {\n\t\t// Stores the current style and assigns it to new cells\n\t\tvar styles = ['rounded', 'shadow', 'glass', 'dashed', 'dashPattern', 'labelBackgroundColor',\n\t\t\t'labelBorderColor', 'comic', 'sketch', 'fillWeight', 'hachureGap', 'hachureAngle', 'jiggle',\n\t\t\t'disableMultiStroke', 'disableMultiStrokeFill', 'fillStyle', 'curveFitting',\n\t\t\t'simplification', 'sketchStyle', 'pointerEvents', 'strokeColor', 'strokeWidth'];\n\t\tvar connectStyles = ['shape', 'edgeStyle', 'curved', 'rounded', 'elbow', 'jumpStyle', 'jumpSize',\n\t\t\t'comic', 'sketch', 'fillWeight', 'hachureGap', 'hachureAngle', 'jiggle',\n\t\t\t'disableMultiStroke', 'disableMultiStrokeFill', 'fillStyle', 'curveFitting',\n\t\t\t'simplification', 'sketchStyle'];\n\t\t// Styles to be ignored if applyAll is false\n\t\tvar ignoredEdgeStyles = ['curved', 'sourcePerimeterSpacing', 'targetPerimeterSpacing',\n\t\t\t'startArrow', 'startFill', 'startSize', 'endArrow', 'endFill', 'endSize'];\n\t\tvar vertexStyleIgnored = false;\n\t\tvar edgeStyleIgnored = false;\n\n\t\t// Note: Everything that is not in styles is ignored (styles is augmented below)\n\t\tthis.setDefaultStyle = function (cell) {\n\t\t\ttry {\n\t\t\t\tif (graph.getModel().isEdge(cell)) {\n\t\t\t\t\tedgeStyleIgnored = false;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tvertexStyleIgnored = false;\n\t\t\t\t}\n\n\t\t\t\tvar style = graph.getCellStyle(cell, false);\n\t\t\t\tvar values = [];\n\t\t\t\tvar keys = [];\n\n\t\t\t\tfor (var key in style) {\n\t\t\t\t\tvalues.push(style[key]);\n\t\t\t\t\tkeys.push(key);\n\t\t\t\t}\n\n\t\t\t\t// Resets current style\n\t\t\t\tif (graph.getModel().isEdge(cell)) {\n\t\t\t\t\tgraph.currentEdgeStyle = {};\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tgraph.currentVertexStyle = {}\n\t\t\t\t}\n\n\t\t\t\tthis.fireEvent(new mxEventObject('styleChanged',\n\t\t\t\t\t'keys', keys, 'values', values,\n\t\t\t\t\t'cells', [cell], 'force', true));\n\n\t\t\t\t// Blocks update of default style with style changes\n\t\t\t\t// once the it was set using this function\n\t\t\t\tif (graph.getModel().isEdge(cell)) {\n\t\t\t\t\tedgeStyleIgnored = true;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tvertexStyleIgnored = true;\n\t\t\t\t}\n\t\t\t}\n\t\t\tcatch (e) {\n\t\t\t\tthis.handleError(e);\n\t\t\t}\n\t\t};\n\n\t\tthis.clearDefaultStyle = function () {\n\t\t\tgraph.currentEdgeStyle = mxUtils.clone(graph.defaultEdgeStyle);\n\t\t\tgraph.currentVertexStyle = mxUtils.clone(graph.defaultVertexStyle);\n\t\t\tedgeStyleIgnored = false;\n\t\t\tvertexStyleIgnored = false;\n\n\t\t\t// Updates UI\n\t\t\tthis.fireEvent(new mxEventObject('styleChanged', 'keys', [], 'values', [], 'cells', []));\n\t\t};\n\n\t\t// Keys that should be ignored if the cell has a value (known: new default for all cells is html=1 so\n\t\t// for the html key this effecticely only works for edges inserted via the connection handler)\n\t\tvar valueStyles = ['fontFamily', 'fontSource', 'fontSize', 'fontColor'];\n\n\t\tfor (var i = 0; i < valueStyles.length; i++) {\n\t\t\tif (mxUtils.indexOf(styles, valueStyles[i]) < 0) {\n\t\t\t\tstyles.push(valueStyles[i]);\n\t\t\t}\n\t\t}\n\n\t\t// Keys that always update the current edge style regardless of selection\n\t\tvar alwaysEdgeStyles = ['edgeStyle', 'startArrow', 'startFill', 'startSize', 'endArrow',\n\t\t\t'endFill', 'endSize'];\n\n\t\t// Keys that are ignored together (if one appears all are ignored)\n\t\tvar keyGroups = [['startArrow', 'startFill', 'endArrow', 'endFill'],\n\t\t['startSize', 'endSize'],\n\t\t['sourcePerimeterSpacing', 'targetPerimeterSpacing'],\n\t\t['fillColor', 'gradientColor', 'gradientDirection'],\n\t\t['opacity'],\n\t\t['html']];\n\n\t\t// Adds all keys used above to the styles array\n\t\tfor (var i = 0; i < keyGroups.length; i++) {\n\t\t\tfor (var j = 0; j < keyGroups[i].length; j++) {\n\t\t\t\tstyles.push(keyGroups[i][j]);\n\t\t\t}\n\t\t}\n\n\t\tfor (var i = 0; i < connectStyles.length; i++) {\n\t\t\tif (mxUtils.indexOf(styles, connectStyles[i]) < 0) {\n\t\t\t\tstyles.push(connectStyles[i]);\n\t\t\t}\n\t\t}\n\n\t\t// Implements a global current style for edges and vertices that is applied to new cells\n\t\tvar insertHandler = function (cells, asText, model, vertexStyle, edgeStyle, applyAll, recurse) {\n\t\t\tvertexStyle = (vertexStyle != null) ? vertexStyle : graph.currentVertexStyle;\n\t\t\tedgeStyle = (edgeStyle != null) ? edgeStyle : graph.currentEdgeStyle;\n\t\t\tapplyAll = (applyAll != null) ? applyAll : true;\n\n\t\t\tmodel = (model != null) ? model : graph.getModel();\n\n\t\t\tif (recurse) {\n\t\t\t\tvar temp = [];\n\n\t\t\t\tfor (var i = 0; i < cells.length; i++) {\n\t\t\t\t\ttemp = temp.concat(model.getDescendants(cells[i]));\n\t\t\t\t}\n\n\t\t\t\tcells = temp;\n\t\t\t}\n\n\t\t\tmodel.beginUpdate();\n\t\t\ttry {\n\t\t\t\tfor (var i = 0; i < cells.length; i++) {\n\t\t\t\t\tvar cell = cells[i];\n\t\t\t\t\tvar isText = asText;\n\t\t\t\t\tvar appliedStyles;\n\n\t\t\t\t\t// Applies basic text styles for cells with text class\n\t\t\t\t\tif (cell.style != null && !isText) {\n\t\t\t\t\t\tpairs = cell.style.split(';');\n\t\t\t\t\t\tisText = isText || mxUtils.indexOf(pairs, 'text') >= 0;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (isText) {\n\t\t\t\t\t\t// Applies only basic text styles\n\t\t\t\t\t\tappliedStyles = ['fontSize', 'fontFamily', 'fontColor'];\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\t// Removes styles defined in the cell style from the styles to be applied\n\t\t\t\t\t\tvar cellStyle = model.getStyle(cell);\n\t\t\t\t\t\tvar tokens = (cellStyle != null) ? cellStyle.split(';') : [];\n\t\t\t\t\t\tappliedStyles = styles.slice();\n\n\t\t\t\t\t\tfor (var j = 0; j < tokens.length; j++) {\n\t\t\t\t\t\t\tvar tmp = tokens[j];\n\t\t\t\t\t\t\tvar pos = tmp.indexOf('=');\n\n\t\t\t\t\t\t\tif (pos >= 0) {\n\t\t\t\t\t\t\t\tvar key = tmp.substring(0, pos);\n\t\t\t\t\t\t\t\tvar index = mxUtils.indexOf(appliedStyles, key);\n\n\t\t\t\t\t\t\t\tif (index >= 0) {\n\t\t\t\t\t\t\t\t\tappliedStyles.splice(index, 1);\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t// Handles special cases where one defined style ignores other styles\n\t\t\t\t\t\t\t\tfor (var k = 0; k < keyGroups.length; k++) {\n\t\t\t\t\t\t\t\t\tvar group = keyGroups[k];\n\n\t\t\t\t\t\t\t\t\tif (mxUtils.indexOf(group, key) >= 0) {\n\t\t\t\t\t\t\t\t\t\tfor (var l = 0; l < group.length; l++) {\n\t\t\t\t\t\t\t\t\t\t\tvar index2 = mxUtils.indexOf(appliedStyles, group[l]);\n\n\t\t\t\t\t\t\t\t\t\t\tif (index2 >= 0) {\n\t\t\t\t\t\t\t\t\t\t\t\tappliedStyles.splice(index2, 1);\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Applies the current style to the cell\n\t\t\t\t\tvar edge = model.isEdge(cell);\n\t\t\t\t\tvar current = (edge) ? edgeStyle : vertexStyle;\n\t\t\t\t\tvar newStyle = model.getStyle(cell);\n\n\t\t\t\t\tfor (var j = 0; j < appliedStyles.length; j++) {\n\t\t\t\t\t\tvar key = appliedStyles[j];\n\t\t\t\t\t\tvar styleValue = current[key];\n\n\t\t\t\t\t\tif (styleValue != null && key != 'edgeStyle' && (key != 'shape' || edge)) {\n\t\t\t\t\t\t\t// Special case: Connect styles are not applied here but in the connection handler\n\t\t\t\t\t\t\tif (!edge || applyAll || mxUtils.indexOf(ignoredEdgeStyles, key) < 0) {\n\t\t\t\t\t\t\t\tnewStyle = mxUtils.setStyle(newStyle, key, styleValue);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tif (Editor.simpleLabels) {\n\t\t\t\t\t\tnewStyle = mxUtils.setStyle(mxUtils.setStyle(\n\t\t\t\t\t\t\tnewStyle, 'html', null), 'whiteSpace', null);\n\t\t\t\t\t}\n\n\t\t\t\t\tmodel.setStyle(cell, newStyle);\n\t\t\t\t}\n\t\t\t}\n\t\t\tfinally {\n\t\t\t\tmodel.endUpdate();\n\t\t\t}\n\n\t\t\treturn cells;\n\t\t};\n\n\t\tgraph.addListener('cellsInserted', function (sender, evt) {\n\t\t\tinsertHandler(evt.getProperty('cells'), null, null, null, null, true, true);\n\t\t});\n\n\t\tgraph.addListener('textInserted', function (sender, evt) {\n\t\t\tinsertHandler(evt.getProperty('cells'), true);\n\t\t});\n\n\t\tthis.insertHandler = insertHandler;\n\n\t\tthis.createDivs();\n\t\tthis.createUi();\n\t\tthis.refresh();\n\n\t\t// Disables HTML and text selection\n\t\tvar textEditing = mxUtils.bind(this, function (evt) {\n\t\t\tif (evt == null) {\n\t\t\t\tevt = window.event;\n\t\t\t}\n\n\t\t\treturn graph.isEditing() || (evt != null && this.isSelectionAllowed(evt));\n\t\t});\n\n\t\t// Disables text selection while not editing and no dialog visible\n\t\tif (this.container == document.body) {\n\t\t\tthis.menubarContainer.onselectstart = textEditing;\n\t\t\tthis.menubarContainer.onmousedown = textEditing;\n\t\t\tthis.toolbarContainer.onselectstart = textEditing;\n\t\t\tthis.toolbarContainer.onmousedown = textEditing;\n\t\t\tthis.diagramContainer.onselectstart = textEditing;\n\t\t\tthis.diagramContainer.onmousedown = textEditing;\n\t\t\tthis.sidebarContainer.onselectstart = textEditing;\n\t\t\tthis.sidebarContainer.onmousedown = textEditing;\n\t\t\tthis.formatContainer.onselectstart = textEditing;\n\t\t\tthis.formatContainer.onmousedown = textEditing;\n\t\t\tthis.footerContainer.onselectstart = textEditing;\n\t\t\tthis.footerContainer.onmousedown = textEditing;\n\n\t\t\tif (this.tabContainer != null) {\n\t\t\t\t// Mouse down is needed for drag and drop\n\t\t\t\tthis.tabContainer.onselectstart = textEditing;\n\t\t\t}\n\n\t\t\t// Workaround for rubberband selection on iPadOS 16\n\t\t\t// Avoid on previous versions to allow label editing\n\t\t\tif (mxClient.IS_IOS) {\n\t\t\t\tfunction iOSversion() {\n\t\t\t\t\tif (/iP(hone|od|ad)/.test(navigator.platform)) {\n\t\t\t\t\t\t// supports iOS 2.0 and later: <http://bit.ly/TJjs1V>\n\t\t\t\t\t\tvar v = (navigator.appVersion).match(/OS (\\d+)_(\\d+)_?(\\d+)?/);\n\n\t\t\t\t\t\treturn [parseInt(v[1], 10), parseInt(v[2], 10), parseInt(v[3] || 0, 10)];\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tvar ver = iOSversion();\n\n\t\t\t\tif (ver != null && ver[0] >= 16) {\n\t\t\t\t\tmxUtils.setPrefixedStyle(this.menubarContainer.style, 'userSelect', 'none');\n\t\t\t\t\tmxUtils.setPrefixedStyle(this.diagramContainer.style, 'userSelect', 'none');\n\t\t\t\t\tmxUtils.setPrefixedStyle(this.sidebarContainer.style, 'userSelect', 'none');\n\t\t\t\t\tmxUtils.setPrefixedStyle(this.formatContainer.style, 'userSelect', 'none');\n\t\t\t\t\tmxUtils.setPrefixedStyle(this.footerContainer.style, 'userSelect', 'none');\n\n\t\t\t\t\tif (this.tabContainer != null) {\n\t\t\t\t\t\tmxUtils.setPrefixedStyle(this.tabContainer.style, 'userSelect', 'none');\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// And uses built-in context menu while editing\n\t\tif (!this.editor.chromeless || this.editor.editable) {\n\t\t\t// Allows context menu for links in hints\n\t\t\tvar linkHandler = function (evt) {\n\t\t\t\tif (evt != null) {\n\t\t\t\t\tvar source = mxEvent.getSource(evt);\n\n\t\t\t\t\tif (source.nodeName == 'A') {\n\t\t\t\t\t\twhile (source != null) {\n\t\t\t\t\t\t\tif (source.className == 'geHint') {\n\t\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tsource = source.parentNode;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn textEditing(evt);\n\t\t\t};\n\n\t\t\tif (mxClient.IS_IE && (typeof (document.documentMode) === 'undefined' || document.documentMode < 9)) {\n\t\t\t\tmxEvent.addListener(this.diagramContainer, 'contextmenu', linkHandler);\n\t\t\t}\n\t\t\telse {\n\t\t\t\t// Allows browser context menu outside of diagram and sidebar\n\t\t\t\tthis.diagramContainer.oncontextmenu = linkHandler;\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tgraph.panningHandler.usePopupTrigger = false;\n\t\t}\n\n\t\t// Contains the main graph instance inside the given panel\n\t\tgraph.init(this.diagramContainer);\n\n\t\t// Improves line wrapping for in-place editor\n\t\tif (mxClient.IS_SVG && graph.view.getDrawPane() != null) {\n\t\t\tvar root = graph.view.getDrawPane().ownerSVGElement;\n\n\t\t\tif (root != null) {\n\t\t\t\troot.style.position = 'absolute';\n\t\t\t}\n\t\t}\n\n\t\t// Creates hover icons\n\t\tthis.hoverIcons = this.createHoverIcons();\n\n\t\t// Hides hover icons when cells are moved\n\t\tif (graph.graphHandler != null) {\n\t\t\tvar graphHandlerStart = graph.graphHandler.start;\n\n\t\t\tgraph.graphHandler.start = function () {\n\t\t\t\tif (ui.hoverIcons != null) {\n\t\t\t\t\tui.hoverIcons.reset();\n\t\t\t\t}\n\n\t\t\t\tgraphHandlerStart.apply(this, arguments);\n\t\t\t};\n\t\t}\n\n\t\t// Adds tooltip when mouse is over scrollbars to show space-drag panning option\n\t\tmxEvent.addListener(this.diagramContainer, 'mousemove', mxUtils.bind(this, function (evt) {\n\t\t\tvar off = mxUtils.getOffset(this.diagramContainer);\n\n\t\t\tif (mxEvent.getClientX(evt) - off.x - this.diagramContainer.clientWidth > 0 ||\n\t\t\t\tmxEvent.getClientY(evt) - off.y - this.diagramContainer.clientHeight > 0) {\n\t\t\t\tthis.diagramContainer.setAttribute('title', mxResources.get('panTooltip'));\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthis.diagramContainer.removeAttribute('title');\n\t\t\t}\n\t\t}));\n\n\t\t// Overrides hovericons to disable while space key is pressed\n\t\tvar hoverIconsIsResetEvent = this.hoverIcons.isResetEvent;\n\n\t\tthis.hoverIcons.isResetEvent = function (evt, allowShift) {\n\t\t\treturn ui.isSpaceDown() || hoverIconsIsResetEvent.apply(this, arguments);\n\t\t};\n\n\t\tthis.keydownHandler = mxUtils.bind(this, function (evt) {\n\t\t\tif (evt.which == 16 /* Shift */) {\n\t\t\t\tthis.shiftDown = true;\n\t\t\t}\n\t\t\telse if (evt.which == 32 /* Space */ && !graph.isEditing()) {\n\t\t\t\tthis.spaceDown = true;\n\t\t\t\tthis.hoverIcons.reset();\n\t\t\t\tgraph.container.style.cursor = 'move';\n\n\t\t\t\t// Disables scroll after space keystroke with scrollbars\n\t\t\t\tif (!graph.isEditing() && mxEvent.getSource(evt) == graph.container) {\n\t\t\t\t\tmxEvent.consume(evt);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if (!mxEvent.isConsumed(evt) && evt.keyCode == 27 /* Escape */) {\n\t\t\t\tthis.hideDialog(null, true);\n\t\t\t}\n\t\t});\n\n\t\tmxEvent.addListener(document, 'keydown', this.keydownHandler);\n\n\t\tthis.keyupHandler = mxUtils.bind(this, function (evt) {\n\t\t\tgraph.container.style.cursor = '';\n\t\t\tthis.spaceDown = false;\n\t\t\tthis.shiftDown = false;\n\t\t});\n\n\t\tmxEvent.addListener(document, 'keyup', this.keyupHandler);\n\n\t\t// Forces panning for middle and right mouse buttons\n\t\tvar panningHandlerIsForcePanningEvent = graph.panningHandler.isForcePanningEvent;\n\t\tgraph.panningHandler.isForcePanningEvent = function (me) {\n\t\t\t// Ctrl+left button is reported as right button in FF on Mac\n\t\t\treturn panningHandlerIsForcePanningEvent.apply(this, arguments) ||\n\t\t\t\tui.isSpaceDown() || (mxEvent.isMouseEvent(me.getEvent()) &&\n\t\t\t\t\t(this.usePopupTrigger || !mxEvent.isPopupTrigger(me.getEvent())) &&\n\t\t\t\t\t((!mxEvent.isControlDown(me.getEvent()) &&\n\t\t\t\t\t\tmxEvent.isRightMouseButton(me.getEvent())) ||\n\t\t\t\t\t\tmxEvent.isMiddleMouseButton(me.getEvent())));\n\t\t};\n\n\t\t// Ctrl/Cmd+Enter applies editing value except in Safari where Ctrl+Enter creates\n\t\t// a new line (while Enter creates a new paragraph and Shift+Enter stops)\n\t\tvar cellEditorIsStopEditingEvent = graph.cellEditor.isStopEditingEvent;\n\t\tgraph.cellEditor.isStopEditingEvent = function (evt) {\n\t\t\treturn cellEditorIsStopEditingEvent.apply(this, arguments) ||\n\t\t\t\t(evt.keyCode == 13 && ((!mxClient.IS_SF && mxEvent.isControlDown(evt)) ||\n\t\t\t\t\t(mxClient.IS_MAC && mxEvent.isMetaDown(evt)) ||\n\t\t\t\t\t(mxClient.IS_SF && mxEvent.isShiftDown(evt))));\n\t\t};\n\n\t\t// Adds space+wheel for zoom\n\t\tvar graphIsZoomWheelEvent = graph.isZoomWheelEvent;\n\n\t\tgraph.isZoomWheelEvent = function () {\n\t\t\treturn ui.isSpaceDown() || graphIsZoomWheelEvent.apply(this, arguments);\n\t\t};\n\n\t\t// Switches toolbar for text editing\n\t\tvar textMode = false;\n\t\tvar fontMenu = null;\n\t\tvar sizeMenu = null;\n\t\tvar nodes = null;\n\n\t\tvar updateToolbar = mxUtils.bind(this, function () {\n\t\t\tif (this.toolbar != null && textMode != graph.cellEditor.isContentEditing()) {\n\t\t\t\tvar node = this.toolbar.container.firstChild;\n\t\t\t\tvar newNodes = [];\n\n\t\t\t\twhile (node != null) {\n\t\t\t\t\tvar tmp = node.nextSibling;\n\n\t\t\t\t\tif (mxUtils.indexOf(this.toolbar.staticElements, node) < 0) {\n\t\t\t\t\t\tnode.parentNode.removeChild(node);\n\t\t\t\t\t\tnewNodes.push(node);\n\t\t\t\t\t}\n\n\t\t\t\t\tnode = tmp;\n\t\t\t\t}\n\n\t\t\t\t// Saves references to special items\n\t\t\t\tvar tmp1 = this.toolbar.fontMenu;\n\t\t\t\tvar tmp2 = this.toolbar.sizeMenu;\n\n\t\t\t\tif (nodes == null) {\n\t\t\t\t\tthis.toolbar.createTextToolbar();\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tfor (var i = 0; i < nodes.length; i++) {\n\t\t\t\t\t\tthis.toolbar.container.appendChild(nodes[i]);\n\t\t\t\t\t}\n\n\t\t\t\t\t// Restores references to special items\n\t\t\t\t\tthis.toolbar.fontMenu = fontMenu;\n\t\t\t\t\tthis.toolbar.sizeMenu = sizeMenu;\n\t\t\t\t}\n\n\t\t\t\ttextMode = graph.cellEditor.isContentEditing();\n\t\t\t\tfontMenu = tmp1;\n\t\t\t\tsizeMenu = tmp2;\n\t\t\t\tnodes = newNodes;\n\t\t\t}\n\t\t});\n\n\t\t// Overrides cell editor to update toolbar\n\t\tvar cellEditorStartEditing = graph.cellEditor.startEditing;\n\t\tgraph.cellEditor.startEditing = function () {\n\t\t\tcellEditorStartEditing.apply(this, arguments);\n\t\t\tupdateToolbar();\n\n\t\t\tif (graph.cellEditor.isContentEditing()) {\n\t\t\t\tvar updating = false;\n\n\t\t\t\tvar updateCssHandler = function () {\n\t\t\t\t\tif (!updating) {\n\t\t\t\t\t\tupdating = true;\n\n\t\t\t\t\t\twindow.setTimeout(function () {\n\t\t\t\t\t\t\tvar node = graph.getSelectedEditingElement();\n\n\t\t\t\t\t\t\tif (node != null) {\n\t\t\t\t\t\t\t\tvar css = mxUtils.getCurrentStyle(node);\n\n\t\t\t\t\t\t\t\tif (css != null && ui.toolbar != null) {\n\t\t\t\t\t\t\t\t\tui.toolbar.setFontName(Graph.stripQuotes(css.fontFamily));\n\t\t\t\t\t\t\t\t\tui.toolbar.setFontSize(parseInt(css.fontSize));\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tupdating = false;\n\t\t\t\t\t\t}, 0);\n\t\t\t\t\t}\n\t\t\t\t};\n\n\t\t\t\tmxEvent.addListener(graph.cellEditor.textarea, 'input', updateCssHandler)\n\t\t\t\tmxEvent.addListener(graph.cellEditor.textarea, 'touchend', updateCssHandler);\n\t\t\t\tmxEvent.addListener(graph.cellEditor.textarea, 'mouseup', updateCssHandler);\n\t\t\t\tmxEvent.addListener(graph.cellEditor.textarea, 'keyup', updateCssHandler);\n\t\t\t\tupdateCssHandler();\n\t\t\t}\n\t\t};\n\n\t\t// Updates toolbar and handles possible errors\n\t\tvar cellEditorStopEditing = graph.cellEditor.stopEditing;\n\t\tgraph.cellEditor.stopEditing = function (cell, trigger) {\n\t\t\ttry {\n\t\t\t\tcellEditorStopEditing.apply(this, arguments);\n\t\t\t\tupdateToolbar();\n\t\t\t}\n\t\t\tcatch (e) {\n\t\t\t\tui.handleError(e);\n\t\t\t}\n\t\t};\n\n\t\t// Enables scrollbars and sets cursor style for the container\n\t\tgraph.container.setAttribute('tabindex', '0');\n\t\tgraph.container.style.cursor = 'default';\n\n\t\t// Workaround for page scroll if embedded via iframe\n\t\tif (window.self === window.top && graph.container.parentNode != null) {\n\t\t\ttry {\n\t\t\t\tgraph.container.focus();\n\t\t\t}\n\t\t\tcatch (e) {\n\t\t\t\t// ignores error in old versions of IE\n\t\t\t}\n\t\t}\n\n\t\t// Keeps graph container focused on mouse down\n\t\tvar graphFireMouseEvent = graph.fireMouseEvent;\n\t\tgraph.fireMouseEvent = function (evtName, me, sender) {\n\t\t\ttry {\n\t\t\t\tif (evtName == mxEvent.MOUSE_DOWN) {\n\t\t\t\t\tthis.container.focus();\n\t\t\t\t}\n\n\t\t\t\tgraphFireMouseEvent.apply(this, arguments);\n\t\t\t}\n\t\t\tcatch (e) {\n\t\t\t\tui.handleError(e);\n\t\t\t}\n\t\t};\n\n\t\t// Adds error handling for foldCells\n\t\tvar graphFoldCells = graph.foldCells;\n\t\tgraph.foldCells = function (collapse, recurse, cells, checkFoldable, evt) {\n\t\t\ttry {\n\t\t\t\tgraphFoldCells.apply(this, arguments);\n\t\t\t}\n\t\t\tcatch (e) {\n\t\t\t\tui.handleError(e);\n\t\t\t}\n\t\t};\n\n\t\t// Configures automatic expand on mouseover\n\t\tgraph.popupMenuHandler.autoExpand = true;\n\n\t\t// Installs context menu\n\t\tif (this.menus != null) {\n\t\t\tgraph.popupMenuHandler.factoryMethod = mxUtils.bind(this, function (menu, cell, evt) {\n\t\t\t\tthis.menus.createPopupMenu(menu, cell, evt);\n\t\t\t});\n\t\t}\n\n\t\t// Hides context menu\n\t\tmxEvent.addGestureListeners(document, mxUtils.bind(this, function (evt) {\n\t\t\tgraph.popupMenuHandler.hideMenu();\n\t\t}));\n\n\t\t// Create handler for key events\n\t\tthis.keyHandler = this.createKeyHandler(editor);\n\n\t\t// Getter for key handler\n\t\tthis.getKeyHandler = function () {\n\t\t\treturn keyHandler;\n\t\t};\n\n\t\tgraph.connectionHandler.addListener(mxEvent.CONNECT, function (sender, evt) {\n\t\t\tvar cells = [evt.getProperty('cell')];\n\n\t\t\tif (evt.getProperty('terminalInserted')) {\n\t\t\t\tcells.push(evt.getProperty('terminal'));\n\n\t\t\t\twindow.setTimeout(function () {\n\t\t\t\t\tif (ui.hoverIcons != null) {\n\t\t\t\t\t\tui.hoverIcons.update(graph.view.getState(cells[cells.length - 1]));\n\t\t\t\t\t}\n\t\t\t\t}, 0);\n\t\t\t}\n\n\t\t\tinsertHandler(cells);\n\t\t});\n\n\t\tthis.addListener('styleChanged', mxUtils.bind(this, function (sender, evt) {\n\t\t\tvar force = evt.getProperty('force');\n\n\t\t\t// Checks if edges and/or vertices were modified\n\t\t\tif (this.updateDefaultStyle || force) {\n\t\t\t\tvar cells = evt.getProperty('cells');\n\t\t\t\tvar vertex = false;\n\t\t\t\tvar edge = false;\n\n\t\t\t\tif (cells.length > 0) {\n\t\t\t\t\tfor (var i = 0; i < cells.length; i++) {\n\t\t\t\t\t\tvertex = graph.getModel().isVertex(cells[i]) || vertex;\n\t\t\t\t\t\tedge = graph.getModel().isEdge(cells[i]) || edge;\n\n\t\t\t\t\t\tif (edge && vertex) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tvertex = true;\n\t\t\t\t\tedge = true;\n\t\t\t\t}\n\n\t\t\t\tvertex = vertex && !vertexStyleIgnored;\n\t\t\t\tedge = edge && !edgeStyleIgnored;\n\n\t\t\t\tvar keys = evt.getProperty('keys');\n\t\t\t\tvar values = evt.getProperty('values');\n\n\t\t\t\tfor (var i = 0; i < keys.length; i++) {\n\t\t\t\t\tvar common = mxUtils.indexOf(valueStyles, keys[i]) >= 0;\n\n\t\t\t\t\t// Ignores transparent stroke colors\n\t\t\t\t\tif (keys[i] != 'strokeColor' || (values[i] != null && values[i] != 'none')) {\n\t\t\t\t\t\t// Special case: Edge style and shape\n\t\t\t\t\t\tif (mxUtils.indexOf(connectStyles, keys[i]) >= 0) {\n\t\t\t\t\t\t\tif (edge || mxUtils.indexOf(alwaysEdgeStyles, keys[i]) >= 0) {\n\t\t\t\t\t\t\t\tif (values[i] == null) {\n\t\t\t\t\t\t\t\t\tdelete graph.currentEdgeStyle[keys[i]];\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\tgraph.currentEdgeStyle[keys[i]] = values[i];\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t// Uses style for vertex if defined in styles\n\t\t\t\t\t\t\telse if (vertex && mxUtils.indexOf(styles, keys[i]) >= 0) {\n\t\t\t\t\t\t\t\tif (values[i] == null) {\n\t\t\t\t\t\t\t\t\tdelete graph.currentVertexStyle[keys[i]];\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\tgraph.currentVertexStyle[keys[i]] = values[i];\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if (mxUtils.indexOf(styles, keys[i]) >= 0) {\n\t\t\t\t\t\t\tif (vertex || common) {\n\t\t\t\t\t\t\t\tif (values[i] == null) {\n\t\t\t\t\t\t\t\t\tdelete graph.currentVertexStyle[keys[i]];\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\tgraph.currentVertexStyle[keys[i]] = values[i];\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif (edge || common || mxUtils.indexOf(alwaysEdgeStyles, keys[i]) >= 0) {\n\t\t\t\t\t\t\t\tif (values[i] == null) {\n\t\t\t\t\t\t\t\t\tdelete graph.currentEdgeStyle[keys[i]];\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\tgraph.currentEdgeStyle[keys[i]] = values[i];\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (this.toolbar != null) {\n\t\t\t\tthis.toolbar.setFontName(graph.currentVertexStyle['fontFamily'] || Menus.prototype.defaultFont);\n\t\t\t\tthis.toolbar.setFontSize(graph.currentVertexStyle['fontSize'] || Menus.prototype.defaultFontSize);\n\n\t\t\t\tif (this.toolbar.edgeStyleMenu != null) {\n\t\t\t\t\t// Updates toolbar icon for edge style\n\t\t\t\t\tvar edgeStyleDiv = this.toolbar.edgeStyleMenu.getElementsByTagName('div')[0];\n\n\t\t\t\t\tif (graph.currentEdgeStyle['edgeStyle'] == 'orthogonalEdgeStyle' && graph.currentEdgeStyle['curved'] == '1') {\n\t\t\t\t\t\tedgeStyleDiv.className = 'geSprite geSprite-curved';\n\t\t\t\t\t}\n\t\t\t\t\telse if (graph.currentEdgeStyle['edgeStyle'] == 'straight' || graph.currentEdgeStyle['edgeStyle'] == 'none' ||\n\t\t\t\t\t\tgraph.currentEdgeStyle['edgeStyle'] == null) {\n\t\t\t\t\t\tedgeStyleDiv.className = 'geSprite geSprite-straight';\n\t\t\t\t\t}\n\t\t\t\t\telse if (graph.currentEdgeStyle['edgeStyle'] == 'entityRelationEdgeStyle') {\n\t\t\t\t\t\tedgeStyleDiv.className = 'geSprite geSprite-entity';\n\t\t\t\t\t}\n\t\t\t\t\telse if (graph.currentEdgeStyle['edgeStyle'] == 'elbowEdgeStyle') {\n\t\t\t\t\t\tedgeStyleDiv.className = 'geSprite geSprite-' + ((graph.currentEdgeStyle['elbow'] == 'vertical') ?\n\t\t\t\t\t\t\t'verticalelbow' : 'horizontalelbow');\n\t\t\t\t\t}\n\t\t\t\t\telse if (graph.currentEdgeStyle['edgeStyle'] == 'isometricEdgeStyle') {\n\t\t\t\t\t\tedgeStyleDiv.className = 'geSprite geSprite-' + ((graph.currentEdgeStyle['elbow'] == 'vertical') ?\n\t\t\t\t\t\t\t'verticalisometric' : 'horizontalisometric');\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tedgeStyleDiv.className = 'geSprite geSprite-orthogonal';\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (this.toolbar.edgeShapeMenu != null) {\n\t\t\t\t\t// Updates icon for edge shape\n\t\t\t\t\tvar edgeShapeDiv = this.toolbar.edgeShapeMenu.getElementsByTagName('div')[0];\n\n\t\t\t\t\tif (graph.currentEdgeStyle['shape'] == 'link') {\n\t\t\t\t\t\tedgeShapeDiv.className = 'geSprite geSprite-linkedge';\n\t\t\t\t\t}\n\t\t\t\t\telse if (graph.currentEdgeStyle['shape'] == 'flexArrow') {\n\t\t\t\t\t\tedgeShapeDiv.className = 'geSprite geSprite-arrow';\n\t\t\t\t\t}\n\t\t\t\t\telse if (graph.currentEdgeStyle['shape'] == 'arrow') {\n\t\t\t\t\t\tedgeShapeDiv.className = 'geSprite geSprite-simplearrow';\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tedgeShapeDiv.className = 'geSprite geSprite-connection';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}));\n\n\t\t// Update font size and font family labels\n\t\tif (this.toolbar != null) {\n\t\t\tvar update = mxUtils.bind(this, function () {\n\t\t\t\tvar ff = graph.currentVertexStyle['fontFamily'] || 'Helvetica';\n\t\t\t\tvar fs = String(graph.currentVertexStyle['fontSize'] || '12');\n\t\t\t\tvar state = graph.getView().getState(graph.getSelectionCell());\n\n\t\t\t\tif (state != null) {\n\t\t\t\t\tff = state.style[mxConstants.STYLE_FONTFAMILY] || ff;\n\t\t\t\t\tfs = state.style[mxConstants.STYLE_FONTSIZE] || fs;\n\n\t\t\t\t\tif (ff.length > 10) {\n\t\t\t\t\t\tff = ff.substring(0, 8) + '...';\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tthis.toolbar.setFontName(ff);\n\t\t\t\tthis.toolbar.setFontSize(fs);\n\t\t\t});\n\n\t\t\tgraph.getSelectionModel().addListener(mxEvent.CHANGE, update);\n\t\t\tgraph.getModel().addListener(mxEvent.CHANGE, update);\n\t\t}\n\n\t\t// Makes sure the current layer is visible when cells are added\n\t\tgraph.addListener(mxEvent.CELLS_ADDED, function (sender, evt) {\n\t\t\tvar cells = evt.getProperty('cells');\n\t\t\tvar parent = evt.getProperty('parent');\n\n\t\t\tif (parent != null && graph.getModel().isLayer(parent) &&\n\t\t\t\t!graph.isCellVisible(parent) && cells != null &&\n\t\t\t\tcells.length > 0) {\n\t\t\t\tgraph.getModel().setVisible(parent, true);\n\t\t\t}\n\t\t});\n\n\t\t// Global handler to hide the current menu\n\t\tthis.gestureHandler = mxUtils.bind(this, function (evt) {\n\t\t\tif (this.currentMenu != null && mxEvent.getSource(evt) != this.currentMenu.div) {\n\t\t\t\tthis.hideCurrentMenu();\n\t\t\t}\n\t\t});\n\n\t\tmxEvent.addGestureListeners(document, this.gestureHandler);\n\n\t\t// Updates the editor UI after the window has been resized or the orientation changes\n\t\t// Timeout is workaround for old IE versions which have a delay for DOM client sizes.\n\t\tvar resizeThread = null;\n\n\t\tthis.resizeHandler = mxUtils.bind(this, function () {\n\t\t\tif (resizeThread != null) {\n\t\t\t\twindow.clearTimeout(resizeThread);\n\t\t\t}\n\n\t\t\tresizeThread = window.setTimeout(mxUtils.bind(this, function () {\n\t\t\t\tresizeThread = null;\n\t\t\t\tthis.windowResized();\n\t\t\t}), 100);\n\t\t});\n\n\t\tmxEvent.addListener(window, 'resize', this.resizeHandler);\n\n\t\tthis.orientationChangeHandler = mxUtils.bind(this, function () {\n\t\t\tthis.refresh();\n\t\t});\n\n\t\tmxEvent.addListener(window, 'orientationchange', this.orientationChangeHandler);\n\n\t\t// Workaround for bug on iOS see\n\t\t// http://stackoverflow.com/questions/19012135/ios-7-ipad-safari-landscape-innerheight-outerheight-layout-issue\n\t\tif (mxClient.IS_IOS && !window.navigator.standalone && typeof Menus !== 'undefined') {\n\t\t\tthis.scrollHandler = mxUtils.bind(this, function () {\n\t\t\t\twindow.scrollTo(0, 0);\n\t\t\t});\n\n\t\t\tmxEvent.addListener(window, 'scroll', this.scrollHandler);\n\t\t}\n\n\t\t/**\n\t\t * Sets the initial scrollbar locations after a file was loaded.\n\t\t */\n\t\tthis.editor.addListener('resetGraphView', mxUtils.bind(this, function () {\n\t\t\tthis.resetScrollbars();\n\t\t}));\n\n\t\t/**\n\t\t * Repaints the grid.\n\t\t */\n\t\tthis.addListener('gridEnabledChanged', mxUtils.bind(this, function () {\n\t\t\tgraph.view.validateBackground();\n\t\t}));\n\n\t\tthis.addListener('backgroundColorChanged', mxUtils.bind(this, function () {\n\t\t\tgraph.view.validateBackground();\n\t\t}));\n\n\t\t/**\n\t\t * Repaints the grid.\n\t\t */\n\t\tgraph.addListener('gridSizeChanged', mxUtils.bind(this, function () {\n\t\t\tif (graph.isGridEnabled()) {\n\t\t\t\tgraph.view.validateBackground();\n\t\t\t}\n\t\t}));\n\n\t\t// Resets UI, updates action and menu states\n\t\tthis.editor.resetGraph();\n\t}\n\n\tthis.init();\n\n\tif (!graph.standalone) {\n\t\tthis.open();\n\t}\n};\n\n/**\n * Global config that specifies if the compact UI elements should be used.\n */\nEditorUi.compactUi = true;\n\n/**\n * Static method for pasing PNG files.\n */\nEditorUi.parsePng = function (f, fn, error) {\n\tvar pos = 0;\n\n\tfunction fread(d, count) {\n\t\tvar start = pos;\n\t\tpos += count;\n\n\t\treturn d.substring(start, pos);\n\t};\n\n\t// Reads unsigned long 32 bit big endian\n\tfunction _freadint(d) {\n\t\tvar bytes = fread(d, 4);\n\n\t\treturn bytes.charCodeAt(3) + (bytes.charCodeAt(2) << 8) +\n\t\t\t(bytes.charCodeAt(1) << 16) + (bytes.charCodeAt(0) << 24);\n\t};\n\n\t// Checks signature\n\tif (fread(f, 8) != String.fromCharCode(137) + 'PNG' + String.fromCharCode(13, 10, 26, 10)) {\n\t\tif (error != null) {\n\t\t\terror();\n\t\t}\n\n\t\treturn;\n\t}\n\n\t// Reads header chunk\n\tfread(f, 4);\n\n\tif (fread(f, 4) != 'IHDR') {\n\t\tif (error != null) {\n\t\t\terror();\n\t\t}\n\n\t\treturn;\n\t}\n\n\tfread(f, 17);\n\n\tdo {\n\t\tvar n = _freadint(f);\n\t\tvar type = fread(f, 4);\n\n\t\tif (fn != null) {\n\t\t\tif (fn(pos - 8, type, n)) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tvalue = fread(f, n);\n\t\tfread(f, 4);\n\n\t\tif (type == 'IEND') {\n\t\t\tbreak;\n\t\t}\n\t}\n\twhile (n);\n};\n\n// Extends mxEventSource\nmxUtils.extend(EditorUi, mxEventSource);\n\n/**\n * Specifies the size of the split bar.\n */\nEditorUi.prototype.splitSize = (mxClient.IS_TOUCH || mxClient.IS_POINTER) ? 12 : 8;\n\n/**\n * Specifies the height of the menubar. Default is 30.\n */\nEditorUi.prototype.menubarHeight = 30;\n\n/**\n * Specifies the width of the format panel should be enabled. Default is true.\n */\nEditorUi.prototype.formatEnabled = true;\n\n/**\n * Specifies the width of the format panel. Default is 240.\n */\nEditorUi.prototype.formatWidth = 240;\n\n/**\n * Specifies the height of the toolbar. Default is 38.\n */\nEditorUi.prototype.toolbarHeight = 38;\n\n/**\n * Specifies the height of the footer. Default is 28.\n */\nEditorUi.prototype.footerHeight = 28;\n\n/**\n * Specifies the position of the horizontal split bar. Default is 240 or 118 for\n * screen widths <= 640px.\n */\nEditorUi.prototype.hsplitPosition = (screen.width <= Editor.smallScreenWidth) ? 0 :\n\t((urlParams['sidebar-entries'] != 'large') ? 212 : 240);\n\n/**\n * Specifies if animations are allowed in <executeLayout>. Default is true.\n */\nEditorUi.prototype.allowAnimation = true;\n\n/**\n * Default is 2.\n */\nEditorUi.prototype.lightboxMaxFitScale = 2;\n\n/**\n * Default is 4.\n */\nEditorUi.prototype.lightboxVerticalDivider = 4;\n\n/**\n * Specifies if single click on horizontal split should collapse sidebar. Default is false.\n */\nEditorUi.prototype.hsplitClickEnabled = false;\n\n/**\n * Whether the default styles should be updated when styles are changed. Default is true.\n */\nEditorUi.prototype.updateDefaultStyle = false;\n\n/**\n * Whether the default styles should be updated when styles are changed. Default is true.\n */\nEditorUi.prototype.spaceDown = false;\n\n/**\n * Whether the default styles should be updated when styles are changed. Default is true.\n */\nEditorUi.prototype.shiftDown = false;\n\n/**\n * Installs the listeners to update the action states.\n */\nEditorUi.prototype.init = function () {\n\tvar graph = this.editor.graph;\n\n\tif (!graph.standalone) {\n\t\tif (urlParams['shape-picker'] != '0') {\n\t\t\tthis.installShapePicker();\n\t\t}\n\n\t\t// Hides tooltips and connection points when scrolling\n\t\tmxEvent.addListener(graph.container, 'scroll', mxUtils.bind(this, function () {\n\t\t\tgraph.tooltipHandler.hide();\n\n\t\t\tif (graph.connectionHandler != null && graph.connectionHandler.constraintHandler != null) {\n\t\t\t\tgraph.connectionHandler.constraintHandler.reset();\n\t\t\t}\n\t\t}));\n\n\t\t// Hides tooltip on escape\n\t\tgraph.addListener(mxEvent.ESCAPE, mxUtils.bind(this, function () {\n\t\t\tgraph.tooltipHandler.hide();\n\t\t\tvar rb = graph.getRubberband();\n\n\t\t\tif (rb != null) {\n\t\t\t\trb.cancel();\n\t\t\t}\n\t\t}));\n\n\t\tmxEvent.addListener(graph.container, 'keydown', mxUtils.bind(this, function (evt) {\n\t\t\tthis.onKeyDown(evt);\n\t\t}));\n\n\t\tmxEvent.addListener(graph.container, 'keypress', mxUtils.bind(this, function (evt) {\n\t\t\tthis.onKeyPress(evt);\n\t\t}));\n\n\t\t// Updates action states\n\t\tthis.addUndoListener();\n\t\tthis.addBeforeUnloadListener();\n\n\t\tgraph.getSelectionModel().addListener(mxEvent.CHANGE, mxUtils.bind(this, function () {\n\t\t\tthis.updateActionStates();\n\t\t}));\n\n\t\tgraph.getModel().addListener(mxEvent.CHANGE, mxUtils.bind(this, function () {\n\t\t\tthis.updateActionStates();\n\t\t}));\n\n\t\t// Changes action states after change of default parent\n\t\tvar graphSetDefaultParent = graph.setDefaultParent;\n\t\tvar ui = this;\n\n\t\tthis.editor.graph.setDefaultParent = function () {\n\t\t\tgraphSetDefaultParent.apply(this, arguments);\n\t\t\tui.updateActionStates();\n\t\t};\n\n\t\t// Hack to make showLinkDialog and editLink available in vertex handler\n\t\tgraph.showLinkDialog = mxUtils.bind(ui, ui.showLinkDialog);\n\t\tgraph.editLink = ui.actions.get('editLink').funct;\n\n\t\tthis.updateActionStates();\n\t\tthis.initClipboard();\n\t\tthis.initCanvas();\n\n\t\tif (this.format != null) {\n\t\t\tthis.format.init();\n\t\t}\n\t}\n};\n\n/**\n * Returns information about the current selection.\n */\nEditorUi.prototype.clearSelectionState = function () {\n\tthis.selectionState = null;\n};\n\n/**\n * Returns information about the current selection.\n */\nEditorUi.prototype.getSelectionState = function () {\n\tif (this.selectionState == null) {\n\t\tthis.selectionState = this.createSelectionState();\n\t}\n\n\treturn this.selectionState;\n};\n\n/**\n * Returns information about the current selection.\n */\nEditorUi.prototype.createSelectionState = function () {\n\tvar graph = this.editor.graph;\n\tvar cells = graph.getSelectionCells();\n\tvar result = this.initSelectionState();\n\tvar initial = true;\n\n\tfor (var i = 0; i < cells.length; i++) {\n\t\tvar style = graph.getCurrentCellStyle(cells[i]);\n\n\t\tif (mxUtils.getValue(style, mxConstants.STYLE_EDITABLE, '1') != '0') {\n\t\t\tthis.updateSelectionStateForCell(result, cells[i], cells, initial);\n\t\t\tinitial = false;\n\t\t}\n\t}\n\n\tthis.updateSelectionStateForTableCells(result);\n\n\treturn result;\n};\n\n/**\n * Returns information about the current selection.\n */\nEditorUi.prototype.initSelectionState = function () {\n\treturn {\n\t\tvertices: [], edges: [], cells: [], x: null, y: null, width: null, height: null,\n\t\tstyle: {}, containsImage: false, containsLabel: false, fill: true, glass: true,\n\t\trounded: true, autoSize: false, image: false, shadow: true, lineJumps: true, resizable: true,\n\t\ttable: false, cell: false, row: false, movable: true, rotatable: true, stroke: true,\n\t\tswimlane: false, unlocked: this.editor.graph.isEnabled(), connections: false\n\t};\n};\n\n/**\n * Adds information about current selected table cells range.\n */\nEditorUi.prototype.updateSelectionStateForTableCells = function (result) {\n\tif (result.cells.length > 1 && result.cell) {\n\t\tvar cells = mxUtils.sortCells(result.cells);\n\t\tvar model = this.editor.graph.model;\n\t\tvar parent = model.getParent(cells[0]);\n\t\tvar table = model.getParent(parent);\n\n\t\tif (parent != null && table != null) {\n\t\t\tvar col = parent.getIndex(cells[0]);\n\t\t\tvar row = table.getIndex(parent);\n\t\t\tvar lastspan = null;\n\t\t\tvar colspan = 1;\n\t\t\tvar rowspan = 1;\n\t\t\tvar index = 0;\n\n\t\t\tvar nextRowCell = (row < table.getChildCount() - 1) ?\n\t\t\t\tmodel.getChildAt(model.getChildAt(\n\t\t\t\t\ttable, row + 1), col) : null;\n\n\t\t\twhile (index < cells.length - 1) {\n\t\t\t\tvar next = cells[++index];\n\n\t\t\t\tif (nextRowCell != null && nextRowCell == next &&\n\t\t\t\t\t(lastspan == null || colspan == lastspan)) {\n\t\t\t\t\tlastspan = colspan;\n\t\t\t\t\tcolspan = 0;\n\t\t\t\t\trowspan++;\n\t\t\t\t\tparent = model.getParent(nextRowCell);\n\t\t\t\t\tnextRowCell = (row + rowspan < table.getChildCount()) ?\n\t\t\t\t\t\tmodel.getChildAt(model.getChildAt(\n\t\t\t\t\t\t\ttable, row + rowspan), col) : null;\n\t\t\t\t}\n\n\t\t\t\tvar state = this.editor.graph.view.getState(next);\n\n\t\t\t\tif (next == model.getChildAt(parent, col + colspan) && state != null &&\n\t\t\t\t\tmxUtils.getValue(state.style, 'colspan', 1) == 1 &&\n\t\t\t\t\tmxUtils.getValue(state.style, 'rowspan', 1) == 1) {\n\t\t\t\t\tcolspan++;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (index == rowspan * colspan - 1) {\n\t\t\t\tresult.mergeCell = cells[0];\n\t\t\t\tresult.colspan = colspan;\n\t\t\t\tresult.rowspan = rowspan;\n\t\t\t}\n\t\t}\n\t}\n};\n\n/**\n * Returns information about the current selection.\n */\nEditorUi.prototype.windowResized = function () {\n\twindow.setTimeout(mxUtils.bind(this, function () {\n\t\tif (this.editor.graph != null) {\n\t\t\tthis.refresh();\n\t\t}\n\t}), 0);\n};\n\n/**\n * Returns information about the current selection.\n */\nEditorUi.prototype.createTimeout = function (timeout, fn, error) {\n\tvar acceptResponse = true;\n\tvar result = null;\n\n\tvar handleError = mxUtils.bind(this, function (e) {\n\t\tif (result.clear()) {\n\t\t\tacceptResponse = false;\n\t\t\te = (e != null) ? e : {\n\t\t\t\tcode: App.ERROR_TIMEOUT,\n\t\t\t\tmessage: mxResources.get('timeout'),\n\t\t\t\tretry: mxUtils.bind(this, function () {\n\t\t\t\t\tthis.createTimeout(timeout, fn, error);\n\t\t\t\t})\n\t\t\t};\n\n\t\t\tif (error != null) {\n\t\t\t\terror(e);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthis.handleError(e);\n\t\t\t}\n\t\t}\n\t});\n\n\tvar timeoutThread = window.setTimeout(handleError,\n\t\t(timeout != null) ? timeout : this.timeout);\n\n\tvar result = {\n\t\tclear: function () {\n\t\t\twindow.clearTimeout(timeoutThread);\n\n\t\t\treturn acceptResponse;\n\t\t},\n\t\tisAlive: function () {\n\t\t\treturn acceptResponse;\n\t\t}\n\t};\n\n\tif (fn != null) {\n\t\tthis.tryAndHandle(mxUtils.bind(this, function () {\n\t\t\tfn(result);\n\t\t}), handleError);\n\t}\n\n\treturn result;\n};\n\n/**\n * Returns information about the current selection.\n */\nEditorUi.prototype.tryAndHandle = function (fn, error) {\n\ttry {\n\t\tfn();\n\t}\n\tcatch (e) {\n\t\tif (error != null) {\n\t\t\terror(e);\n\t\t}\n\t\telse {\n\t\t\tthis.handleError(e);\n\t\t}\n\t}\n};\n\n/**\n * Returns information about the current selection.\n */\nEditorUi.prototype.updateSelectionStateForCell = function (result, cell, cells, initial) {\n\tvar graph = this.editor.graph;\n\tresult.cells.push(cell);\n\n\tif (graph.getModel().isVertex(cell)) {\n\t\tresult.connections = graph.model.getEdgeCount(cell) > 0;\n\t\tresult.unlocked = result.unlocked && !graph.isCellLocked(cell);\n\t\tresult.resizable = result.resizable && graph.isCellResizable(cell);\n\t\tresult.rotatable = result.rotatable && graph.isCellRotatable(cell);\n\t\tresult.movable = result.movable && graph.isCellMovable(cell) &&\n\t\t\t!graph.isTableRow(cell) && !graph.isTableCell(cell);\n\t\tresult.swimlane = result.swimlane || graph.isSwimlane(cell);\n\t\tresult.table = result.table || graph.isTable(cell);\n\t\tresult.cell = result.cell || graph.isTableCell(cell);\n\t\tresult.row = result.row || graph.isTableRow(cell);\n\t\tresult.vertices.push(cell);\n\t\tvar geo = graph.getCellGeometry(cell);\n\n\t\tif (geo != null) {\n\t\t\tif (geo.width > 0) {\n\t\t\t\tif (result.width == null) {\n\t\t\t\t\tresult.width = geo.width;\n\t\t\t\t}\n\t\t\t\telse if (result.width != geo.width) {\n\t\t\t\t\tresult.width = '';\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tresult.containsLabel = true;\n\t\t\t}\n\n\t\t\tif (geo.height > 0) {\n\t\t\t\tif (result.height == null) {\n\t\t\t\t\tresult.height = geo.height;\n\t\t\t\t}\n\t\t\t\telse if (result.height != geo.height) {\n\t\t\t\t\tresult.height = '';\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tresult.containsLabel = true;\n\t\t\t}\n\n\t\t\tif (!geo.relative || geo.offset != null) {\n\t\t\t\tvar x = (geo.relative) ? geo.offset.x : geo.x;\n\t\t\t\tvar y = (geo.relative) ? geo.offset.y : geo.y;\n\n\t\t\t\tif (result.x == null) {\n\t\t\t\t\tresult.x = x;\n\t\t\t\t}\n\t\t\t\telse if (result.x != x) {\n\t\t\t\t\tresult.x = '';\n\t\t\t\t}\n\n\t\t\t\tif (result.y == null) {\n\t\t\t\t\tresult.y = y;\n\t\t\t\t}\n\t\t\t\telse if (result.y != y) {\n\t\t\t\t\tresult.y = '';\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\telse if (graph.getModel().isEdge(cell)) {\n\t\tresult.edges.push(cell);\n\t\tresult.connections = true;\n\t\tresult.resizable = false;\n\t\tresult.rotatable = false;\n\t\tresult.movable = false;\n\t}\n\n\tvar state = graph.view.getState(cell);\n\n\tif (state != null) {\n\t\tresult.autoSize = result.autoSize || graph.isAutoSizeState(state);\n\t\tresult.glass = result.glass && graph.isGlassState(state);\n\t\tresult.rounded = result.rounded && graph.isRoundedState(state);\n\t\tresult.lineJumps = result.lineJumps && graph.isLineJumpState(state);\n\t\tresult.image = result.image || graph.isImageState(state);\n\t\tresult.shadow = result.shadow && graph.isShadowState(state);\n\t\tresult.fill = result.fill && graph.isFillState(state);\n\t\tresult.gradient = result.fill && graph.isGradientState(state);\n\t\tresult.stroke = result.stroke && graph.isStrokeState(state);\n\n\t\tvar shape = mxUtils.getValue(state.style, mxConstants.STYLE_SHAPE, null);\n\t\tresult.containsImage = result.containsImage || shape == 'image';\n\t\tgraph.mergeStyle(state.style, result.style, initial);\n\t}\n};\n\n/**\n * Returns true if the given event should start editing. This implementation returns true.\n */\nEditorUi.prototype.installShapePicker = function () {\n\tvar graph = this.editor.graph;\n\tvar ui = this;\n\n\t// Uses this event to process mouseDown to check the selection state before it is changed\n\tgraph.addListener(mxEvent.FIRE_MOUSE_EVENT, mxUtils.bind(this, function (sender, evt) {\n\t\tif (evt.getProperty('eventName') == 'mouseDown') {\n\t\t\tui.hideShapePicker();\n\t\t}\n\t}));\n\n\tvar hidePicker = mxUtils.bind(this, function () {\n\t\tui.hideShapePicker(true);\n\t});\n\n\tgraph.addListener('wheel', hidePicker);\n\tgraph.addListener(mxEvent.ESCAPE, hidePicker);\n\tgraph.view.addListener(mxEvent.SCALE, hidePicker);\n\tgraph.view.addListener(mxEvent.SCALE_AND_TRANSLATE, hidePicker);\n\tgraph.getSelectionModel().addListener(mxEvent.CHANGE, hidePicker);\n\n\t// Counts as popup menu\n\tvar popupMenuHandlerIsMenuShowing = graph.popupMenuHandler.isMenuShowing;\n\n\tgraph.popupMenuHandler.isMenuShowing = function () {\n\t\treturn popupMenuHandlerIsMenuShowing.apply(this, arguments) ||\n\t\t\tui.shapePicker != null || ui.currentMenu != null;\n\t};\n\n\t// Adds dbl click dialog for inserting shapes\n\tvar graphDblClick = graph.dblClick;\n\n\tgraph.dblClick = function (evt, cell) {\n\t\tif (this.isEnabled()) {\n\t\t\tif (cell == null && ui.sidebar != null && !mxEvent.isShiftDown(evt) &&\n\t\t\t\t!graph.isCellLocked(graph.getDefaultParent())) {\n\t\t\t\tvar pt = mxUtils.convertPoint(this.container, mxEvent.getClientX(evt), mxEvent.getClientY(evt));\n\t\t\t\tmxEvent.consume(evt);\n\n\t\t\t\t// Asynchronous to avoid direct insert after double tap\n\t\t\t\twindow.setTimeout(mxUtils.bind(this, function () {\n\t\t\t\t\tui.showShapePicker(pt.x, pt.y);\n\t\t\t\t}), 30);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tgraphDblClick.apply(this, arguments);\n\t\t\t}\n\t\t}\n\t};\n\n\tif (this.hoverIcons != null) {\n\t\tthis.hoverIcons.addListener('reset', hidePicker);\n\t\tvar hoverIconsDrag = this.hoverIcons.drag;\n\n\t\tthis.hoverIcons.drag = function () {\n\t\t\tui.hideShapePicker();\n\t\t\thoverIconsDrag.apply(this, arguments);\n\t\t};\n\n\t\tvar hoverIconsExecute = this.hoverIcons.execute;\n\n\t\tthis.hoverIcons.execute = function (state, dir, me) {\n\t\t\tvar evt = me.getEvent();\n\n\t\t\tif (!this.graph.isCloneEvent(evt) && !mxEvent.isShiftDown(evt)) {\n\t\t\t\tthis.graph.connectVertex(state.cell, dir, this.graph.defaultEdgeLength, evt, null, null, mxUtils.bind(this, function (x, y, execute) {\n\t\t\t\t\tvar temp = graph.getCompositeParent(state.cell);\n\t\t\t\t\tvar geo = graph.getCellGeometry(temp);\n\t\t\t\t\tme.consume();\n\n\t\t\t\t\twhile (temp != null && graph.model.isVertex(temp) && geo != null && geo.relative) {\n\t\t\t\t\t\tcell = temp;\n\t\t\t\t\t\ttemp = graph.model.getParent(cell)\n\t\t\t\t\t\tgeo = graph.getCellGeometry(temp);\n\t\t\t\t\t}\n\n\t\t\t\t\t// Asynchronous to avoid direct insert after double tap\n\t\t\t\t\twindow.setTimeout(mxUtils.bind(this, function () {\n\t\t\t\t\t\tui.showShapePicker(me.getGraphX(), me.getGraphY(), temp, mxUtils.bind(this, function (cell) {\n\t\t\t\t\t\t\texecute(cell);\n\n\t\t\t\t\t\t\tif (ui.hoverIcons != null) {\n\t\t\t\t\t\t\t\tui.hoverIcons.update(graph.view.getState(cell));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}), dir);\n\t\t\t\t\t}), 30);\n\t\t\t\t}), mxUtils.bind(this, function (result) {\n\t\t\t\t\tthis.graph.selectCellsForConnectVertex(result, evt, this);\n\t\t\t\t}));\n\t\t\t}\n\t\t\telse {\n\t\t\t\thoverIconsExecute.apply(this, arguments);\n\t\t\t}\n\t\t};\n\n\t\tvar thread = null;\n\n\t\tthis.hoverIcons.addListener('focus', mxUtils.bind(this, function (sender, evt) {\n\t\t\tif (thread != null) {\n\t\t\t\twindow.clearTimeout(thread);\n\t\t\t}\n\n\t\t\tthread = window.setTimeout(mxUtils.bind(this, function () {\n\t\t\t\tvar arrow = evt.getProperty('arrow');\n\t\t\t\tvar dir = evt.getProperty('direction');\n\t\t\t\tvar mouseEvent = evt.getProperty('event');\n\n\t\t\t\tvar rect = arrow.getBoundingClientRect();\n\t\t\t\tvar offset = mxUtils.getOffset(graph.container);\n\t\t\t\tvar x = graph.container.scrollLeft + rect.x - offset.x;\n\t\t\t\tvar y = graph.container.scrollTop + rect.y - offset.y;\n\n\t\t\t\tvar temp = graph.getCompositeParent((this.hoverIcons.currentState != null) ?\n\t\t\t\t\tthis.hoverIcons.currentState.cell : null);\n\t\t\t\tvar div = ui.showShapePicker(x, y, temp, mxUtils.bind(this, function (cell) {\n\t\t\t\t\tif (cell != null) {\n\t\t\t\t\t\tgraph.connectVertex(temp, dir, graph.defaultEdgeLength, mouseEvent, true, false, function (x, y, execute) {\n\t\t\t\t\t\t\texecute(cell);\n\n\t\t\t\t\t\t\tif (ui.hoverIcons != null) {\n\t\t\t\t\t\t\t\tui.hoverIcons.update(graph.view.getState(cell));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}, function (cells) {\n\t\t\t\t\t\t\tgraph.selectCellsForConnectVertex(cells);\n\t\t\t\t\t\t}, mouseEvent, this.hoverIcons);\n\t\t\t\t\t}\n\t\t\t\t}), dir, true);\n\n\t\t\t\tthis.centerShapePicker(div, rect, x, y, dir);\n\t\t\t\tmxUtils.setOpacity(div, 30);\n\n\t\t\t\tmxEvent.addListener(div, 'mouseenter', function () {\n\t\t\t\t\tmxUtils.setOpacity(div, 100);\n\t\t\t\t});\n\n\t\t\t\tmxEvent.addListener(div, 'mouseleave', function () {\n\t\t\t\t\tui.hideShapePicker();\n\t\t\t\t});\n\t\t\t}), Editor.shapePickerHoverDelay);\n\t\t}));\n\n\t\tthis.hoverIcons.addListener('blur', mxUtils.bind(this, function (sender, evt) {\n\t\t\tif (thread != null) {\n\t\t\t\twindow.clearTimeout(thread);\n\t\t\t}\n\t\t}));\n\t}\n};\n\n/**\n * Creates a temporary graph instance for rendering off-screen content.\n */\nEditorUi.prototype.centerShapePicker = function (div, rect, x, y, dir) {\n\tif (dir == mxConstants.DIRECTION_EAST || dir == mxConstants.DIRECTION_WEST) {\n\t\tdiv.style.width = '40px';\n\t}\n\n\tvar r2 = div.getBoundingClientRect();\n\n\tif (dir == mxConstants.DIRECTION_NORTH) {\n\t\tx -= r2.width / 2 - 10;\n\t\ty -= r2.height + 6;\n\t}\n\telse if (dir == mxConstants.DIRECTION_SOUTH) {\n\t\tx -= r2.width / 2 - 10;\n\t\ty += rect.height + 6;\n\t}\n\telse if (dir == mxConstants.DIRECTION_WEST) {\n\t\tx -= r2.width + 6;\n\t\ty -= r2.height / 2 - 10;\n\t}\n\telse if (dir == mxConstants.DIRECTION_EAST) {\n\t\tx += rect.width + 6;\n\t\ty -= r2.height / 2 - 10;\n\t}\n\n\tdiv.style.left = x + 'px';\n\tdiv.style.top = y + 'px';\n};\n\n/**\n * Creates a temporary graph instance for rendering off-screen content.\n */\nEditorUi.prototype.showShapePicker = function (x, y, source, callback, direction, hovering,\n\tgetInsertLocationFn, showEdges, startEditing) {\n\tshowEdges = showEdges || source == null;\n\n\tvar div = this.createShapePicker(x, y, source, callback, direction, mxUtils.bind(this, function () {\n\t\tthis.hideShapePicker();\n\t}), this.getCellsForShapePicker(source, hovering, showEdges), hovering,\n\t\tgetInsertLocationFn, showEdges, startEditing);\n\n\tif (div != null) {\n\t\tif (this.hoverIcons != null && !hovering) {\n\t\t\tthis.hoverIcons.reset();\n\t\t}\n\n\t\tvar graph = this.editor.graph;\n\t\tgraph.popupMenuHandler.hideMenu();\n\t\tgraph.tooltipHandler.hideTooltip();\n\t\tthis.hideCurrentMenu();\n\t\tthis.hideShapePicker();\n\n\t\tthis.shapePickerCallback = callback;\n\t\tthis.shapePicker = div;\n\t}\n\n\treturn div;\n};\n\n/**\n * Creates a temporary graph instance for rendering off-screen content.\n */\nEditorUi.prototype.createShapePicker = function (x, y, source, callback, direction,\n\tafterClick, cells, hovering, getInsertLocationFn, showEdges, startEditing) {\n\tstartEditing = (startEditing != null) ? startEditing : true;\n\tvar graph = this.editor.graph;\n\tvar div = null;\n\n\tgetInsertLocationFn = (getInsertLocationFn != null) ? getInsertLocationFn : function (cells) {\n\t\tvar cell = cells[0];\n\t\tvar w = 0;\n\t\tvar h = 0;\n\t\tvar geo = cell.geometry;\n\n\t\tif (geo != null) {\n\t\t\tif (graph.model.isEdge(cell)) {\n\t\t\t\tvar pt = geo.getTerminalPoint(false);\n\t\t\t\tgeo = new mxRectangle(0, 0, pt.x, pt.y);\n\t\t\t}\n\n\t\t\tw = geo.width / 2;\n\t\t\th = geo.height / 2;\n\t\t}\n\n\t\treturn new mxPoint(graph.snap(Math.round(x / graph.view.scale) - graph.view.translate.x - w),\n\t\t\tgraph.snap(Math.round(y / graph.view.scale) - graph.view.translate.y - h));\n\t};\n\n\tif (cells != null && cells.length > 0) {\n\t\tvar ui = this;\n\t\tvar graph = this.editor.graph;\n\t\tdiv = document.createElement('div');\n\t\tvar sourceState = graph.view.getState(source);\n\t\tvar style = (source != null && (sourceState == null ||\n\t\t\t!graph.isTransparentState(sourceState))) ?\n\t\t\tgraph.copyStyle(source) : null;\n\n\t\t// Do not place entry under pointer for touch devices\n\t\tvar w = (cells.length < 6) ? cells.length * 35 : 140;\n\t\tdiv.className = 'geToolbarContainer geSidebarContainer geShapePicker';\n\t\tdiv.setAttribute('title', mxResources.get('sidebarTooltip'));\n\t\tdiv.style.left = x + 'px';\n\t\tdiv.style.top = y + 'px';\n\t\tdiv.style.width = w + 'px';\n\n\t\t// Disables built-in pan and zoom on touch devices\n\t\tif (mxClient.IS_POINTER) {\n\t\t\tdiv.style.touchAction = 'none';\n\t\t}\n\n\t\tif (!hovering) {\n\t\t\tmxUtils.setPrefixedStyle(div.style, 'transform', 'translate(-22px,-22px)');\n\t\t}\n\n\t\tif (graph.background != null && graph.background != mxConstants.NONE) {\n\t\t\tdiv.style.backgroundColor = graph.background;\n\t\t}\n\n\t\tgraph.container.appendChild(div);\n\n\t\tvar addCell = mxUtils.bind(this, function (cell) {\n\t\t\t// Wrapper needed to catch events\n\t\t\tvar node = document.createElement('a');\n\t\t\tnode.className = 'geItem';\n\t\t\tnode.style.cssText = 'position:relative;display:inline-block;position:relative;' +\n\t\t\t\t'width:30px;height:30px;cursor:pointer;overflow:hidden;padding:1px';\n\t\t\tdiv.appendChild(node);\n\n\t\t\tif (style != null && urlParams['sketch'] != '1') {\n\t\t\t\tthis.sidebar.graph.pasteStyle(style, [cell]);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tui.insertHandler([cell], cell.value != '' && urlParams['sketch'] != '1', this.sidebar.graph.model);\n\t\t\t}\n\n\t\t\tvar geo = cell.geometry;\n\n\t\t\tif (graph.model.isEdge(cell)) {\n\t\t\t\tvar pt = geo.getTerminalPoint(false);\n\t\t\t\tgeo = new mxRectangle(0, 0, pt.x, pt.y);\n\t\t\t}\n\n\t\t\tif (geo != null) {\n\t\t\t\tnode.appendChild(this.sidebar.createVertexTemplateFromCells([cell],\n\t\t\t\t\tgeo.width, geo.height, '', true, false, null, false,\n\t\t\t\t\tmxUtils.bind(this, function (evt) {\n\t\t\t\t\t\tif (mxEvent.isShiftDown(evt) && (source != null ||\n\t\t\t\t\t\t\t!graph.isSelectionEmpty())) {\n\t\t\t\t\t\t\tvar temp = graph.getEditableCells((source != null) ?\n\t\t\t\t\t\t\t\t[source] : graph.getSelectionCells());\n\t\t\t\t\t\t\tgraph.updateShapes(cell, temp);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tvar clone = graph.cloneCell(cell);\n\n\t\t\t\t\t\t\tif (callback != null) {\n\t\t\t\t\t\t\t\tcallback(clone);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\tvar pt = getInsertLocationFn([clone]);\n\n\t\t\t\t\t\t\t\tif (graph.model.isEdge(clone)) {\n\t\t\t\t\t\t\t\t\tclone.geometry.translate(pt.x, pt.y);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\tclone.geometry.x = pt.x;\n\t\t\t\t\t\t\t\t\tclone.geometry.y = pt.y;\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tgraph.model.beginUpdate();\n\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\tgraph.addCell(clone);\n\n\t\t\t\t\t\t\t\t\tif (graph.model.isVertex(clone) &&\n\t\t\t\t\t\t\t\t\t\tgraph.isAutoSizeCell(clone)) {\n\t\t\t\t\t\t\t\t\t\tgraph.updateCellSize(clone);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tfinally {\n\t\t\t\t\t\t\t\t\tgraph.model.endUpdate();\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tgraph.setSelectionCell(clone);\n\t\t\t\t\t\t\t\tgraph.scrollCellToVisible(clone);\n\n\t\t\t\t\t\t\t\tif (startEditing) {\n\t\t\t\t\t\t\t\t\tgraph.startEditing(clone);\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tif (ui.hoverIcons != null) {\n\t\t\t\t\t\t\t\t\tui.hoverIcons.update(graph.view.getState(clone));\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (afterClick != null) {\n\t\t\t\t\t\t\tafterClick(evt);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tmxEvent.consume(evt);\n\t\t\t\t\t}), 25, 25, null, null, source));\n\t\t\t}\n\t\t});\n\n\t\tfor (var i = 0; i < (hovering ? Math.min(cells.length, 4) : cells.length); i++) {\n\t\t\taddCell(cells[i]);\n\t\t}\n\n\t\tvar b = graph.container.scrollTop + graph.container.offsetHeight;\n\t\tvar dy = div.offsetTop + div.clientHeight - b;\n\n\t\tif (dy > 0) {\n\t\t\tdiv.style.top = Math.max(graph.container.scrollTop + 22, y - dy) + 'px';\n\t\t}\n\n\t\tvar r = graph.container.scrollLeft + graph.container.offsetWidth;\n\t\tvar dx = div.offsetLeft + div.clientWidth - r;\n\n\t\tif (dx > 0) {\n\t\t\tdiv.style.left = Math.max(graph.container.scrollLeft + 22, x - dx) + 'px';\n\t\t}\n\t}\n\n\treturn div;\n};\n\n/**\n * Creates a temporary graph instance for rendering off-screen content.\n */\nEditorUi.prototype.getCellsForShapePicker = function (cell, hovering, showEdges) {\n\tvar graph = this.editor.graph;\n\n\tvar createVertex = mxUtils.bind(this, function (style, w, h, value) {\n\t\treturn graph.createVertex(null, null, value || '', 0, 0, w || 120, h || 60, style, false);\n\t});\n\n\tvar createEdge = mxUtils.bind(this, function (style, y, value) {\n\t\tvar cell = new mxCell(value || '', new mxGeometry(0, 0, graph.defaultEdgeLength + 20, 0), style);\n\t\tcell.geometry.setTerminalPoint(new mxPoint(0, 0), true);\n\t\tcell.geometry.setTerminalPoint(new mxPoint(cell.geometry.width, (y != null) ? y : 0), false);\n\t\tcell.geometry.points = (y != null) ? [new mxPoint(cell.geometry.width / 2, y)] : [];\n\t\tcell.geometry.relative = true;\n\t\tcell.edge = true;\n\n\t\treturn cell;\n\t});\n\n\t// Creates a clone of the source cell and moves it to the origin\n\tif (cell != null) {\n\t\ttry {\n\t\t\tcell = graph.cloneCell(cell);\n\n\t\t\tif (graph.model.isVertex(cell) && cell.geometry != null) {\n\t\t\t\tcell.geometry.x = 0;\n\t\t\t\tcell.geometry.y = 0;\n\t\t\t}\n\t\t}\n\t\tcatch (e) {\n\t\t\tcell = null;\n\t\t}\n\t}\n\n\tif (cell == null) {\n\t\tcell = createVertex('text;html=1;align=center;verticalAlign=middle;resizable=0;' +\n\t\t\t'points=[];autosize=1;strokeColor=none;fillColor=none;', 40, 20, 'Text');\n\n\t\tif (graph.model.isVertex(cell) && graph.isAutoSizeCell(cell)) {\n\t\t\t// Uses offscreen graph to bypass undo history\n\t\t\tvar tempGraph = Graph.createOffscreenGraph(graph.getStylesheet());\n\t\t\ttempGraph.updateCellSize(cell);\n\t\t}\n\t}\n\n\tvar cells = [cell, createVertex('whiteSpace=wrap;html=1;'),\n\t\tcreateVertex('ellipse;whiteSpace=wrap;html=1;', 80, 80),\n\t\tcreateVertex('rhombus;whiteSpace=wrap;html=1;', 80, 80),\n\t\tcreateVertex('rounded=1;whiteSpace=wrap;html=1;'),\n\t\tcreateVertex('shape=parallelogram;perimeter=parallelogramPerimeter;whiteSpace=wrap;html=1;fixedSize=1;'),\n\t\tcreateVertex('shape=trapezoid;perimeter=trapezoidPerimeter;whiteSpace=wrap;html=1;fixedSize=1;', 120, 60),\n\t\tcreateVertex('shape=hexagon;perimeter=hexagonPerimeter2;whiteSpace=wrap;html=1;fixedSize=1;', 120, 80),\n\t\tcreateVertex('shape=step;perimeter=stepPerimeter;whiteSpace=wrap;html=1;fixedSize=1;', 120, 80),\n\t\tcreateVertex('shape=process;whiteSpace=wrap;html=1;backgroundOutline=1;'),\n\t\tcreateVertex('triangle;whiteSpace=wrap;html=1;', 60, 80),\n\t\tcreateVertex('shape=document;whiteSpace=wrap;html=1;boundedLbl=1;', 120, 80),\n\t\tcreateVertex('shape=tape;whiteSpace=wrap;html=1;', 120, 100),\n\t\tcreateVertex('ellipse;shape=cloud;whiteSpace=wrap;html=1;', 120, 80),\n\t\tcreateVertex('shape=singleArrow;whiteSpace=wrap;html=1;arrowWidth=0.4;arrowSize=0.4;', 80, 60),\n\t\tcreateVertex('shape=waypoint;sketch=0;size=6;pointerEvents=1;points=[];fillColor=none;resizable=0;' +\n\t\t\t'rotatable=0;perimeter=centerPerimeter;snapToPoint=1;', 20, 20)];\n\n\tif (showEdges) {\n\t\tcells = cells.concat([\n\t\t\tcreateEdge('edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;'),\n\t\t\tcreateEdge('edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;endArrow=classic;startArrow=classic;endSize=8;startSize=8;'),\n\t\t\tcreateEdge('edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;shape=flexArrow;rounded=1;startSize=8;endSize=8;'),\n\t\t\tcreateEdge('edgeStyle=segmentEdgeStyle;endArrow=classic;html=1;curved=0;rounded=0;endSize=8;startSize=8;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;',\n\t\t\t\tthis.editor.graph.defaultEdgeLength / 2)\n\t\t]);\n\t}\n\n\treturn cells;\n};\n\n/**\n * Creates a temporary graph instance for rendering off-screen content.\n */\nEditorUi.prototype.isShapePickerVisible = function (cancel) {\n\treturn this.shapePicker != null;\n};\n\n/**\n * Creates a temporary graph instance for rendering off-screen content.\n */\nEditorUi.prototype.hideShapePicker = function (cancel) {\n\tif (this.shapePicker != null) {\n\t\tthis.shapePicker.parentNode.removeChild(this.shapePicker);\n\t\tthis.shapePicker = null;\n\n\t\tif (!cancel && this.shapePickerCallback != null) {\n\t\t\tthis.shapePickerCallback();\n\t\t}\n\n\t\tthis.shapePickerCallback = null;\n\t}\n};\n\n/**\n * Whether the default styles should be updated when styles are changed. Default is true.\n */\nEditorUi.prototype.isSpaceDown = function () {\n\treturn this.spaceDown;\n};\n\n/**\n * Whether the default styles should be updated when styles are changed. Default is true.\n */\nEditorUi.prototype.isShiftDown = function () {\n\treturn this.shiftDown;\n};\n\n/**\n * Returns true if the given event should start editing. This implementation returns true.\n */\nEditorUi.prototype.onKeyDown = function (evt) {\n\tvar graph = this.editor.graph;\n\n\t// Alt+tab for task switcher in Windows, ctrl+tab for tab control in Chrome\n\tif (evt.which == 9 && graph.isEnabled() && !mxEvent.isControlDown(evt)) {\n\t\tif (graph.isEditing()) {\n\t\t\tif (mxEvent.isAltDown(evt)) {\n\t\t\t\tgraph.stopEditing(false);\n\t\t\t}\n\t\t\telse {\n\t\t\t\ttry {\n\t\t\t\t\tvar nesting = graph.cellEditor.isContentEditing() && graph.cellEditor.isTextSelected();\n\n\t\t\t\t\tif (window.getSelection && graph.cellEditor.isContentEditing() &&\n\t\t\t\t\t\t!nesting && !mxClient.IS_IE && !mxClient.IS_IE11) {\n\t\t\t\t\t\tvar selection = window.getSelection();\n\t\t\t\t\t\tvar container = (selection.rangeCount > 0) ? selection.getRangeAt(0).commonAncestorContainer : null;\n\t\t\t\t\t\tnesting = container != null && (container.nodeName == 'LI' || (container.parentNode != null &&\n\t\t\t\t\t\t\tcontainer.parentNode.nodeName == 'LI'));\n\t\t\t\t\t}\n\n\t\t\t\t\tif (nesting) {\n\t\t\t\t\t\t// (Shift+)tab indents/outdents with text selection or inside list elements\n\t\t\t\t\t\tdocument.execCommand(mxEvent.isShiftDown(evt) ? 'outdent' : 'indent', false, null);\n\t\t\t\t\t}\n\t\t\t\t\t// Shift+tab applies value with cursor\n\t\t\t\t\telse if (mxEvent.isShiftDown(evt)) {\n\t\t\t\t\t\tgraph.stopEditing(false);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\t// Inserts tab character\n\t\t\t\t\t\tgraph.cellEditor.insertTab(!graph.cellEditor.isContentEditing() ? 4 : null);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcatch (e) {\n\t\t\t\t\t// ignore\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse if (mxEvent.isAltDown(evt)) {\n\t\t\tgraph.selectParentCell();\n\t\t}\n\t\telse {\n\t\t\tgraph.selectCell(!mxEvent.isShiftDown(evt));\n\t\t}\n\n\t\tmxEvent.consume(evt);\n\t}\n};\n\n/**\n * Returns true if the given event should start editing. This implementation returns true.\n */\nEditorUi.prototype.onKeyPress = function (evt) {\n\tvar graph = this.editor.graph;\n\n\t// KNOWN: Focus does not work if label is empty in quirks mode\n\tif (this.isImmediateEditingEvent(evt) && !graph.isEditing() && !graph.isSelectionEmpty() && evt.which !== 0 &&\n\t\tevt.which !== 27 && !mxEvent.isAltDown(evt) && !mxEvent.isControlDown(evt) && !mxEvent.isMetaDown(evt)) {\n\t\tgraph.escape();\n\t\tgraph.startEditing();\n\n\t\t// Workaround for FF where char is lost if cursor is placed before char\n\t\tif (mxClient.IS_FF) {\n\t\t\tvar ce = graph.cellEditor;\n\n\t\t\tif (ce.textarea != null) {\n\t\t\t\tce.textarea.innerHTML = String.fromCharCode(evt.which);\n\n\t\t\t\t// Moves cursor to end of textarea\n\t\t\t\tvar range = document.createRange();\n\t\t\t\trange.selectNodeContents(ce.textarea);\n\t\t\t\trange.collapse(false);\n\t\t\t\tvar sel = window.getSelection();\n\t\t\t\tsel.removeAllRanges();\n\t\t\t\tsel.addRange(range);\n\t\t\t}\n\t\t}\n\t}\n};\n\n/**\n * Returns true if the given event should start editing. This implementation returns true.\n */\nEditorUi.prototype.isImmediateEditingEvent = function (evt) {\n\treturn true;\n};\n\n/**\n * Updates the CSS for the given element to match the selection.\n */\nEditorUi.prototype.updateCssForMarker = function (markerDiv, prefix, shape, marker, fill) {\n\tmarkerDiv.style.display = 'inline-flex';\n\tmarkerDiv.style.alignItems = 'center';\n\tmarkerDiv.style.justifyContent = 'center';\n\tmarkerDiv.innerText = '';\n\n\tif (shape == 'flexArrow') {\n\t\tmarkerDiv.className = (marker != null && marker != mxConstants.NONE) ?\n\t\t\t'geSprite geSprite-' + prefix + 'blocktrans' : 'geSprite geSprite-noarrow';\n\t}\n\telse {\n\t\tvar src = this.getImageForMarker(marker, fill);\n\n\t\tif (src != null) {\n\t\t\tvar img = document.createElement('img');\n\t\t\timg.className = 'geAdaptiveAsset';\n\t\t\timg.setAttribute('src', src);\n\t\t\tmarkerDiv.className = '';\n\n\t\t\tif (prefix == 'end') {\n\t\t\t\tmxUtils.setPrefixedStyle(img.style, 'transform', 'scaleX(-1)');\n\t\t\t}\n\n\t\t\tmarkerDiv.appendChild(img);\n\t\t}\n\t\telse {\n\t\t\tmarkerDiv.className = 'geSprite geSprite-noarrow';\n\t\t\tmarkerDiv.innerHTML = mxUtils.htmlEntities(mxResources.get('none'));\n\t\t\tmarkerDiv.style.backgroundImage = 'none';\n\t\t\tmarkerDiv.style.fontSize = '11px';\n\t\t\tmarkerDiv.style.filter = 'none';\n\t\t}\n\t}\n};\n\n/**\n * Returns true if the given event should start editing. This implementation returns true.\n */\nEditorUi.prototype.getImageForMarker = function (marker, fill) {\n\tvar result = null;\n\n\tif (marker == mxConstants.ARROW_CLASSIC) {\n\t\tresult = (fill != '1') ? Format.classicMarkerImage.src :\n\t\t\tFormat.classicFilledMarkerImage.src\n\t}\n\telse if (marker == mxConstants.ARROW_CLASSIC_THIN) {\n\t\tresult = (fill != '1') ? Format.classicThinMarkerImage.src :\n\t\t\tFormat.openThinFilledMarkerImage.src;\n\t}\n\telse if (marker == mxConstants.ARROW_OPEN) {\n\t\tresult = Format.openFilledMarkerImage.src;\n\t}\n\telse if (marker == mxConstants.ARROW_OPEN_THIN) {\n\t\tresult = Format.openThinFilledMarkerImage.src;\n\t}\n\telse if (marker == mxConstants.ARROW_BLOCK) {\n\t\tresult = (fill != '1') ? Format.blockMarkerImage.src :\n\t\t\tFormat.blockFilledMarkerImage.src;\n\t}\n\telse if (marker == mxConstants.ARROW_BLOCK_THIN) {\n\t\tresult = (fill != '1') ? Format.blockThinMarkerImage.src :\n\t\t\tFormat.blockThinFilledMarkerImage.src;\n\t}\n\telse if (marker == mxConstants.ARROW_OVAL) {\n\t\tresult = (fill != '1') ? Format.ovalMarkerImage.src :\n\t\t\tFormat.ovalFilledMarkerImage.src;\n\t}\n\telse if (marker == mxConstants.ARROW_DIAMOND) {\n\t\tresult = (fill != '1') ? Format.diamondMarkerImage.src :\n\t\t\tFormat.diamondFilledMarkerImage.src;\n\t}\n\telse if (marker == mxConstants.ARROW_DIAMOND_THIN) {\n\t\tresult = (fill != '1') ? Format.diamondThinMarkerImage.src :\n\t\t\tFormat.diamondThinFilledMarkerImage.src;\n\t}\n\telse if (marker == 'doubleBlock') {\n\t\tresult = (fill != '1') ? Format.doubleBlockMarkerImage.src :\n\t\t\tFormat.doubleBlockFilledMarkerImage.src;\n\t}\n\telse if (marker == 'box') {\n\t\tresult = Format.boxMarkerImage.src;\n\t}\n\telse if (marker == 'halfCircle') {\n\t\tresult = Format.halfCircleMarkerImage.src;\n\t}\n\telse if (marker == 'openAsync') {\n\t\tresult = Format.openAsyncFilledMarkerImage.src;\n\t}\n\telse if (marker == 'async') {\n\t\tresult = (fill != '1') ? Format.asyncMarkerImage.src :\n\t\t\tFormat.asyncFilledMarkerImage.src;\n\t}\n\telse if (marker == 'dash') {\n\t\tresult = Format.dashMarkerImage.src;\n\t}\n\telse if (marker == 'baseDash') {\n\t\tresult = Format.baseDashMarkerImage.src;\n\t}\n\telse if (marker == 'cross') {\n\t\tresult = Format.crossMarkerImage.src;\n\t}\n\telse if (marker == 'circle') {\n\t\tresult = Format.circleMarkerImage.src;\n\t}\n\telse if (marker == 'circlePlus') {\n\t\tresult = Format.circlePlusMarkerImage.src;\n\t}\n\telse if (marker == 'ERone') {\n\t\tresult = Format.EROneMarkerImage.src;\n\t}\n\telse if (marker == 'ERmandOne') {\n\t\tresult = Format.ERmandOneMarkerImage.src;\n\t}\n\telse if (marker == 'ERmany') {\n\t\tresult = Format.ERmanyMarkerImage.src;\n\t}\n\telse if (marker == 'ERoneToMany') {\n\t\tresult = Format.ERoneToManyMarkerImage.src;\n\t}\n\telse if (marker == 'ERzeroToOne') {\n\t\tresult = Format.ERzeroToOneMarkerImage.src;\n\t}\n\telse if (marker == 'ERzeroToMany') {\n\t\tresult = Format.ERzeroToManyMarkerImage.src;\n\t}\n\n\treturn result;\n};\n\n/**\n * Overridden in Menus.js\n */\nEditorUi.prototype.createMenus = function () {\n\treturn null;\n};\n\n/**\n * Hook for allowing selection and context menu for certain events.\n */\nEditorUi.prototype.updatePasteActionStates = function () {\n\tvar graph = this.editor.graph;\n\tvar paste = this.actions.get('paste');\n\tvar pasteHere = this.actions.get('pasteHere');\n\n\tpaste.setEnabled(this.editor.graph.cellEditor.isContentEditing() ||\n\t\t(((!mxClient.IS_FF && navigator.clipboard != null) || !mxClipboard.isEmpty()) &&\n\t\t\tgraph.isEnabled() && !graph.isCellLocked(graph.getDefaultParent())));\n\tpasteHere.setEnabled(paste.isEnabled());\n};\n\n/**\n * Hook for allowing selection and context menu for certain events.\n */\nEditorUi.prototype.initClipboard = function () {\n\tvar ui = this;\n\n\tvar mxClipboardCut = mxClipboard.cut;\n\tmxClipboard.cut = function (graph) {\n\t\tif (graph.cellEditor.isContentEditing()) {\n\t\t\tdocument.execCommand('cut', false, null);\n\t\t}\n\t\telse {\n\t\t\tmxClipboardCut.apply(this, arguments);\n\t\t}\n\n\t\tui.updatePasteActionStates();\n\t};\n\n\tvar mxClipboardCopy = mxClipboard.copy;\n\tmxClipboard.copy = function (graph) {\n\t\tvar result = null;\n\n\t\tif (graph.cellEditor.isContentEditing()) {\n\t\t\tdocument.execCommand('copy', false, null);\n\t\t}\n\t\telse {\n\t\t\tresult = result || graph.getSelectionCells();\n\t\t\tresult = graph.getExportableCells(graph.model.getTopmostCells(result));\n\n\t\t\tvar cloneMap = new Object();\n\t\t\tvar lookup = graph.createCellLookup(result);\n\t\t\tvar clones = graph.cloneCells(result, null, cloneMap);\n\n\t\t\t// Uses temporary model to force new IDs to be assigned\n\t\t\t// to avoid having to carry over the mapping from object\n\t\t\t// ID to cell ID to the paste operation\n\t\t\tvar model = new mxGraphModel();\n\t\t\tvar parent = model.getChildAt(model.getRoot(), 0);\n\n\t\t\tfor (var i = 0; i < clones.length; i++) {\n\t\t\t\tmodel.add(parent, clones[i]);\n\n\t\t\t\t// Checks for orphaned relative children and makes absolute\t\t\t\t\n\t\t\t\tvar state = graph.view.getState(result[i]);\n\n\t\t\t\tif (state != null) {\n\t\t\t\t\tvar geo = graph.getCellGeometry(clones[i]);\n\n\t\t\t\t\tif (geo != null && geo.relative && !model.isEdge(result[i]) &&\n\t\t\t\t\t\tlookup[mxObjectIdentity.get(model.getParent(result[i]))] == null) {\n\t\t\t\t\t\tgeo.offset = null;\n\t\t\t\t\t\tgeo.relative = false;\n\t\t\t\t\t\tgeo.x = state.x / state.view.scale - state.view.translate.x;\n\t\t\t\t\t\tgeo.y = state.y / state.view.scale - state.view.translate.y;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tgraph.updateCustomLinks(graph.createCellMapping(cloneMap, lookup), clones);\n\n\t\t\tmxClipboard.insertCount = 1;\n\t\t\tmxClipboard.setCells(clones);\n\t\t}\n\n\t\tui.updatePasteActionStates();\n\n\t\treturn result;\n\t};\n\n\tvar mxClipboardPaste = mxClipboard.paste;\n\tmxClipboard.paste = function (graph) {\n\t\tvar result = null;\n\n\t\tif (graph.cellEditor.isContentEditing()) {\n\t\t\tdocument.execCommand('paste', false, null);\n\t\t}\n\t\telse {\n\t\t\tresult = mxClipboardPaste.apply(this, arguments);\n\t\t}\n\n\t\tui.updatePasteActionStates();\n\n\t\treturn result;\n\t};\n\n\t// Overrides cell editor to update paste action state\n\tvar cellEditorStartEditing = this.editor.graph.cellEditor.startEditing;\n\n\tthis.editor.graph.cellEditor.startEditing = function () {\n\t\tcellEditorStartEditing.apply(this, arguments);\n\t\tui.updatePasteActionStates();\n\t};\n\n\tvar cellEditorStopEditing = this.editor.graph.cellEditor.stopEditing;\n\n\tthis.editor.graph.cellEditor.stopEditing = function (cell, trigger) {\n\t\tcellEditorStopEditing.apply(this, arguments);\n\t\tui.updatePasteActionStates();\n\t};\n\n\tthis.updatePasteActionStates();\n};\n\n/**\n * Delay between zoom steps when not using preview.\n */\nEditorUi.prototype.lazyZoomDelay = 20;\n\n/**\n * Delay before update of DOM when using preview.\n */\nEditorUi.prototype.wheelZoomDelay = 500;\n\n/**\n * Delay before update of DOM when using preview.\n */\nEditorUi.prototype.buttonZoomDelay = 600;\n\n/**\n * Initializes the infinite canvas.\n */\nEditorUi.prototype.initCanvas = function () {\n\t// Initial page layout view, scrollBuffer and timer-based scrolling\n\tvar graph = this.editor.graph;\n\tgraph.timerAutoScroll = true;\n\n\t/**\n\t * Returns the padding for pages in page view with scrollbars.\n\t */\n\tgraph.getPagePadding = function () {\n\t\treturn new mxPoint(Math.max(0, Math.round((graph.container.offsetWidth - 34) / graph.view.scale)),\n\t\t\tMath.max(0, Math.round((graph.container.offsetHeight - 34) / graph.view.scale)));\n\t};\n\n\t// Fits the number of background pages to the graph\n\tgraph.view.getBackgroundPageBounds = function () {\n\t\tvar layout = this.graph.getPageLayout();\n\t\tvar page = this.graph.getPageSize();\n\n\t\treturn new mxRectangle(this.scale * (this.translate.x + layout.x * page.width),\n\t\t\tthis.scale * (this.translate.y + layout.y * page.height),\n\t\t\tthis.scale * layout.width * page.width,\n\t\t\tthis.scale * layout.height * page.height);\n\t};\n\n\tgraph.getPreferredPageSize = function (bounds, width, height) {\n\t\tvar pages = this.getPageLayout();\n\t\tvar size = this.getPageSize();\n\n\t\treturn new mxRectangle(0, 0, pages.width * size.width, pages.height * size.height);\n\t};\n\n\t// Scales pages/graph to fit available size\n\tvar resize = null;\n\tvar ui = this;\n\n\tif (this.editor.isChromelessView()) {\n\t\tresize = mxUtils.bind(this, function (autoscale, maxScale, cx, cy) {\n\t\t\tif (graph.container != null && !graph.isViewer()) {\n\t\t\t\tcx = (cx != null) ? cx : 0;\n\t\t\t\tcy = (cy != null) ? cy : 0;\n\n\t\t\t\tvar bds = (graph.pageVisible) ?\n\t\t\t\t\tgraph.view.getBackgroundPageBounds() :\n\t\t\t\t\tgraph.getGraphBounds();\n\t\t\t\tvar scroll = mxUtils.hasScrollbars(graph.container);\n\t\t\t\tvar tr = graph.view.translate;\n\t\t\t\tvar s = graph.view.scale;\n\n\t\t\t\t// Normalizes the bounds\n\t\t\t\tvar b = mxRectangle.fromRectangle(bds);\n\t\t\t\tb.x = b.x / s - tr.x;\n\t\t\t\tb.y = b.y / s - tr.y;\n\t\t\t\tb.width /= s;\n\t\t\t\tb.height /= s;\n\n\t\t\t\tvar st = graph.container.scrollTop;\n\t\t\t\tvar sl = graph.container.scrollLeft;\n\t\t\t\tvar sb = (document.documentMode >= 8) ? 20 : 14;\n\n\t\t\t\tif (document.documentMode == 8 || document.documentMode == 9) {\n\t\t\t\t\tsb += 3;\n\t\t\t\t}\n\n\t\t\t\tvar cw = graph.container.offsetWidth - sb;\n\t\t\t\tvar ch = graph.container.offsetHeight - sb;\n\n\t\t\t\tvar ns = (autoscale) ? Math.max(0.3, Math.min(maxScale || 1, cw / b.width)) : s;\n\t\t\t\tvar dx = ((cw - ns * b.width) / 2) / ns;\n\t\t\t\tvar dy = (this.lightboxVerticalDivider == 0) ? 0 : ((ch - ns * b.height) / this.lightboxVerticalDivider) / ns;\n\n\t\t\t\tif (scroll) {\n\t\t\t\t\tdx = Math.max(dx, 0);\n\t\t\t\t\tdy = Math.max(dy, 0);\n\t\t\t\t}\n\n\t\t\t\tif (scroll || bds.width < cw || bds.height < ch) {\n\t\t\t\t\tgraph.view.scaleAndTranslate(ns, Math.floor(dx - b.x), Math.floor(dy - b.y));\n\t\t\t\t\tgraph.container.scrollTop = st * ns / s;\n\t\t\t\t\tgraph.container.scrollLeft = sl * ns / s;\n\t\t\t\t}\n\t\t\t\telse if (cx != 0 || cy != 0) {\n\t\t\t\t\tvar t = graph.view.translate;\n\t\t\t\t\tgraph.view.setTranslate(Math.floor(t.x + cx / s), Math.floor(t.y + cy / s));\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\t// Hack to make function available to subclassers\n\t\tthis.chromelessResize = resize;\n\n\t\t// Hook for subclassers for override\n\t\tthis.chromelessWindowResize = mxUtils.bind(this, function () {\n\t\t\tthis.chromelessResize(false);\n\t\t});\n\n\t\t// Removable resize listener\n\t\tvar autoscaleResize = mxUtils.bind(this, function () {\n\t\t\tthis.chromelessWindowResize(false);\n\t\t});\n\n\t\tmxEvent.addListener(window, 'resize', autoscaleResize);\n\n\t\tthis.destroyFunctions.push(function () {\n\t\t\tmxEvent.removeListener(window, 'resize', autoscaleResize);\n\t\t});\n\n\t\tthis.editor.addListener('resetGraphView', mxUtils.bind(this, function () {\n\t\t\tthis.chromelessResize(true);\n\t\t}));\n\n\t\tthis.actions.get('zoomIn').funct = mxUtils.bind(this, function (evt) {\n\t\t\tgraph.zoomIn();\n\t\t\tthis.chromelessResize(false);\n\t\t});\n\t\tthis.actions.get('zoomOut').funct = mxUtils.bind(this, function (evt) {\n\t\t\tgraph.zoomOut();\n\t\t\tthis.chromelessResize(false);\n\t\t});\n\n\t\t// Creates toolbar for viewer - do not use CSS here\n\t\t// as this may be used in a viewer that has no CSS\n\t\tif (urlParams['toolbar'] != '0') {\n\t\t\tvar toolbarConfig = JSON.parse(decodeURIComponent(urlParams['toolbar-config'] || '{}'));\n\n\t\t\tthis.chromelessToolbar = document.createElement('div');\n\t\t\tthis.chromelessToolbar.style.position = 'fixed';\n\t\t\tthis.chromelessToolbar.style.overflow = 'hidden';\n\t\t\tthis.chromelessToolbar.style.boxSizing = 'border-box';\n\t\t\tthis.chromelessToolbar.style.whiteSpace = 'nowrap';\n\t\t\tthis.chromelessToolbar.style.padding = '10px 10px 8px 10px';\n\t\t\tthis.chromelessToolbar.style.left = (graph.isViewer()) ? '0' : '50%';\n\n\t\t\tif (!mxClient.IS_IE && !mxClient.IS_IE11) {\n\t\t\t\tthis.chromelessToolbar.style.backgroundColor = '#000000';\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthis.chromelessToolbar.style.backgroundColor = '#ffffff';\n\t\t\t\tthis.chromelessToolbar.style.border = '3px solid black';\n\t\t\t}\n\n\t\t\tmxUtils.setPrefixedStyle(this.chromelessToolbar.style, 'borderRadius', '16px');\n\t\t\tmxUtils.setPrefixedStyle(this.chromelessToolbar.style, 'transition', 'opacity 600ms ease-in-out');\n\n\t\t\tvar updateChromelessToolbarPosition = mxUtils.bind(this, function () {\n\t\t\t\tvar css = mxUtils.getCurrentStyle(graph.container);\n\n\t\t\t\tif (graph.isViewer()) {\n\t\t\t\t\tthis.chromelessToolbar.style.top = '0';\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tthis.chromelessToolbar.style.bottom = ((css != null) ? parseInt(css['margin-bottom'] || 0) : 0) +\n\t\t\t\t\t\t((this.tabContainer != null) ? (20 + parseInt(this.tabContainer.style.height)) : 20) + 'px';\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tthis.editor.addListener('resetGraphView', updateChromelessToolbarPosition);\n\t\t\tupdateChromelessToolbarPosition();\n\n\t\t\tvar btnCount = 0;\n\n\t\t\tvar addButton = mxUtils.bind(this, function (fn, imgSrc, tip) {\n\t\t\t\tbtnCount++;\n\n\t\t\t\tvar a = document.createElement('span');\n\t\t\t\ta.style.paddingLeft = '8px';\n\t\t\t\ta.style.paddingRight = '8px';\n\t\t\t\ta.style.cursor = 'pointer';\n\t\t\t\tmxEvent.addListener(a, 'click', fn);\n\n\t\t\t\tif (tip != null) {\n\t\t\t\t\ta.setAttribute('title', tip);\n\t\t\t\t}\n\n\t\t\t\tvar img = document.createElement('img');\n\t\t\t\timg.setAttribute('border', '0');\n\t\t\t\timg.setAttribute('src', imgSrc);\n\t\t\t\timg.style.width = '36px';\n\t\t\t\timg.style.filter = 'invert(100%)';\n\n\t\t\t\ta.appendChild(img);\n\t\t\t\tthis.chromelessToolbar.appendChild(a);\n\n\t\t\t\treturn a;\n\t\t\t});\n\n\t\t\tif (toolbarConfig.backBtn != null) {\n\t\t\t\tvar backUrl = Graph.sanitizeLink(toolbarConfig.backBtn.url);\n\n\t\t\t\tif (backUrl != null) {\n\t\t\t\t\taddButton(mxUtils.bind(this, function (evt) {\n\t\t\t\t\t\twindow.location.href = backUrl;\n\t\t\t\t\t\tmxEvent.consume(evt);\n\t\t\t\t\t}), Editor.backImage, mxResources.get('back', null, 'Back'));\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (this.isPagesEnabled()) {\n\t\t\t\tvar prevButton = addButton(mxUtils.bind(this, function (evt) {\n\t\t\t\t\tthis.actions.get('previousPage').funct();\n\t\t\t\t\tmxEvent.consume(evt);\n\t\t\t\t}), Editor.previousImage, mxResources.get('previousPage'));\n\n\t\t\t\tvar pageInfo = document.createElement('div');\n\t\t\t\tpageInfo.style.fontFamily = Editor.defaultHtmlFont;\n\t\t\t\tpageInfo.style.display = 'inline-block';\n\t\t\t\tpageInfo.style.verticalAlign = 'top';\n\t\t\t\tpageInfo.style.fontWeight = 'bold';\n\t\t\t\tpageInfo.style.marginTop = '8px';\n\t\t\t\tpageInfo.style.fontSize = '14px';\n\n\t\t\t\tif (!mxClient.IS_IE && !mxClient.IS_IE11) {\n\t\t\t\t\tpageInfo.style.color = '#ffffff';\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tpageInfo.style.color = '#000000';\n\t\t\t\t}\n\n\t\t\t\tthis.chromelessToolbar.appendChild(pageInfo);\n\n\t\t\t\tvar nextButton = addButton(mxUtils.bind(this, function (evt) {\n\t\t\t\t\tthis.actions.get('nextPage').funct();\n\t\t\t\t\tmxEvent.consume(evt);\n\t\t\t\t}), Editor.nextImage, mxResources.get('nextPage'));\n\n\t\t\t\tvar updatePageInfo = mxUtils.bind(this, function () {\n\t\t\t\t\tif (this.pages != null && this.pages.length > 1 && this.currentPage != null) {\n\t\t\t\t\t\tpageInfo.innerText = '';\n\t\t\t\t\t\tmxUtils.write(pageInfo, (mxUtils.indexOf(this.pages, this.currentPage) + 1) + ' / ' + this.pages.length);\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\tprevButton.style.paddingLeft = '0px';\n\t\t\t\tprevButton.style.paddingRight = '4px';\n\t\t\t\tnextButton.style.paddingLeft = '4px';\n\t\t\t\tnextButton.style.paddingRight = '0px';\n\n\t\t\t\tvar updatePageButtons = mxUtils.bind(this, function () {\n\t\t\t\t\tif (this.pages != null && this.pages.length > 1 && this.currentPage != null) {\n\t\t\t\t\t\tnextButton.style.display = '';\n\t\t\t\t\t\tprevButton.style.display = '';\n\t\t\t\t\t\tpageInfo.style.display = 'inline-block';\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tnextButton.style.display = 'none';\n\t\t\t\t\t\tprevButton.style.display = 'none';\n\t\t\t\t\t\tpageInfo.style.display = 'none';\n\t\t\t\t\t}\n\n\t\t\t\t\tupdatePageInfo();\n\t\t\t\t});\n\n\t\t\t\tthis.editor.addListener('resetGraphView', updatePageButtons);\n\t\t\t\tthis.editor.addListener('pageSelected', updatePageInfo);\n\t\t\t}\n\n\t\t\taddButton(mxUtils.bind(this, function (evt) {\n\t\t\t\tthis.actions.get('zoomOut').funct();\n\t\t\t\tmxEvent.consume(evt);\n\t\t\t}), Editor.zoomOutImage, mxResources.get('zoomOut') + ' (Alt+Mousewheel)');\n\n\t\t\taddButton(mxUtils.bind(this, function (evt) {\n\t\t\t\tthis.actions.get('zoomIn').funct();\n\t\t\t\tmxEvent.consume(evt);\n\t\t\t}), Editor.zoomInImage, mxResources.get('zoomIn') + ' (Alt+Mousewheel)');\n\n\t\t\taddButton(mxUtils.bind(this, function (evt) {\n\t\t\t\tif (graph.isLightboxView()) {\n\t\t\t\t\tif (graph.view.scale == 1) {\n\t\t\t\t\t\tthis.lightboxFit();\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tgraph.zoomTo(1);\n\t\t\t\t\t}\n\n\t\t\t\t\tthis.chromelessResize(false);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tthis.chromelessResize(true);\n\t\t\t\t}\n\n\t\t\t\tmxEvent.consume(evt);\n\t\t\t}), Editor.zoomFitImage, mxResources.get('fit'));\n\n\t\t\t// Changes toolbar opacity on hover\n\t\t\tvar fadeThread = null;\n\t\t\tvar fadeThread2 = null;\n\n\t\t\tvar fadeOut = mxUtils.bind(this, function (delay) {\n\t\t\t\tif (fadeThread != null) {\n\t\t\t\t\twindow.clearTimeout(fadeThread);\n\t\t\t\t\tfadeThread = null;\n\t\t\t\t}\n\n\t\t\t\tif (fadeThread2 != null) {\n\t\t\t\t\twindow.clearTimeout(fadeThread2);\n\t\t\t\t\tfadeThread2 = null;\n\t\t\t\t}\n\n\t\t\t\tfadeThread = window.setTimeout(mxUtils.bind(this, function () {\n\t\t\t\t\tmxUtils.setOpacity(this.chromelessToolbar, 0);\n\t\t\t\t\tfadeThread = null;\n\n\t\t\t\t\tfadeThread2 = window.setTimeout(mxUtils.bind(this, function () {\n\t\t\t\t\t\tthis.chromelessToolbar.style.display = 'none';\n\t\t\t\t\t\tfadeThread2 = null;\n\t\t\t\t\t}), 600);\n\t\t\t\t}), delay || 200);\n\t\t\t});\n\n\t\t\tvar fadeIn = mxUtils.bind(this, function (opacity) {\n\t\t\t\tif (fadeThread != null) {\n\t\t\t\t\twindow.clearTimeout(fadeThread);\n\t\t\t\t\tfadeThread = null;\n\t\t\t\t}\n\n\t\t\t\tif (fadeThread2 != null) {\n\t\t\t\t\twindow.clearTimeout(fadeThread2);\n\t\t\t\t\tfadeThread2 = null;\n\t\t\t\t}\n\n\t\t\t\tthis.chromelessToolbar.style.display = '';\n\t\t\t\tmxUtils.setOpacity(this.chromelessToolbar, opacity || 30);\n\t\t\t});\n\n\t\t\tif (urlParams['layers'] == '1') {\n\t\t\t\tthis.layersDialog = null;\n\n\t\t\t\tvar layersButton = addButton(mxUtils.bind(this, function (evt) {\n\t\t\t\t\tif (this.layersDialog != null) {\n\t\t\t\t\t\tthis.layersDialog.parentNode.removeChild(this.layersDialog);\n\t\t\t\t\t\tthis.layersDialog = null;\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tthis.layersDialog = graph.createLayersDialog(null, true);\n\n\t\t\t\t\t\tmxEvent.addListener(this.layersDialog, 'mouseleave', mxUtils.bind(this, function () {\n\t\t\t\t\t\t\tthis.layersDialog.parentNode.removeChild(this.layersDialog);\n\t\t\t\t\t\t\tthis.layersDialog = null;\n\t\t\t\t\t\t}));\n\n\t\t\t\t\t\tvar r = layersButton.getBoundingClientRect();\n\n\t\t\t\t\t\tmxUtils.setPrefixedStyle(this.layersDialog.style, 'borderRadius', '5px');\n\t\t\t\t\t\tthis.layersDialog.style.position = 'fixed';\n\t\t\t\t\t\tthis.layersDialog.style.fontFamily = Editor.defaultHtmlFont;\n\t\t\t\t\t\tthis.layersDialog.style.width = '160px';\n\t\t\t\t\t\tthis.layersDialog.style.padding = '4px 2px 4px 2px';\n\t\t\t\t\t\tthis.layersDialog.style.left = r.left + 'px';\n\t\t\t\t\t\tthis.layersDialog.style.bottom = parseInt(this.chromelessToolbar.style.bottom) +\n\t\t\t\t\t\t\tthis.chromelessToolbar.offsetHeight + 4 + 'px';\n\n\t\t\t\t\t\tif (!mxClient.IS_IE && !mxClient.IS_IE11) {\n\t\t\t\t\t\t\tthis.layersDialog.style.backgroundColor = '#000000';\n\t\t\t\t\t\t\tthis.layersDialog.style.color = '#ffffff';\n\t\t\t\t\t\t\tmxUtils.setOpacity(this.layersDialog, 80);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tthis.layersDialog.style.backgroundColor = '#ffffff';\n\t\t\t\t\t\t\tthis.layersDialog.style.border = '2px solid black';\n\t\t\t\t\t\t\tthis.layersDialog.style.color = '#000000';\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Puts the dialog on top of the container z-index\n\t\t\t\t\t\tvar style = mxUtils.getCurrentStyle(this.editor.graph.container);\n\t\t\t\t\t\tthis.layersDialog.style.zIndex = style.zIndex;\n\n\t\t\t\t\t\tdocument.body.appendChild(this.layersDialog);\n\t\t\t\t\t\tthis.editor.fireEvent(new mxEventObject('layersDialogShown'));\n\t\t\t\t\t}\n\n\t\t\t\t\tmxEvent.consume(evt);\n\t\t\t\t}), Editor.layersImage, mxResources.get('layers'));\n\n\t\t\t\t// Shows/hides layers button depending on content\n\t\t\t\tvar model = graph.getModel();\n\n\t\t\t\tmodel.addListener(mxEvent.CHANGE, function () {\n\t\t\t\t\tlayersButton.style.display = (model.getChildCount(model.root) > 1) ? '' : 'none';\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tif (urlParams['openInSameWin'] != '1' || navigator.standalone) {\n\t\t\t\tthis.addChromelessToolbarItems(addButton);\n\t\t\t}\n\n\t\t\tif (this.editor.editButtonLink != null || this.editor.editButtonFunc != null) {\n\t\t\t\taddButton(mxUtils.bind(this, function (evt) {\n\t\t\t\t\tif (this.editor.editButtonFunc != null) {\n\t\t\t\t\t\tthis.editor.editButtonFunc();\n\t\t\t\t\t}\n\t\t\t\t\telse if (this.editor.editButtonLink == '_blank') {\n\t\t\t\t\t\tthis.editor.editAsNew(this.getEditBlankXml());\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tgraph.openLink(this.editor.editButtonLink, 'editWindow');\n\t\t\t\t\t}\n\n\t\t\t\t\tmxEvent.consume(evt);\n\t\t\t\t}), Editor.editImage, mxResources.get('edit'));\n\t\t\t}\n\n\t\t\tif (this.lightboxToolbarActions != null) {\n\t\t\t\tfor (var i = 0; i < this.lightboxToolbarActions.length; i++) {\n\t\t\t\t\tvar lbAction = this.lightboxToolbarActions[i];\n\t\t\t\t\tlbAction.elem = addButton(lbAction.fn, lbAction.icon, lbAction.tooltip);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (toolbarConfig.refreshBtn != null) {\n\t\t\t\tvar refreshUrl = (toolbarConfig.refreshBtn.url == null) ? null :\n\t\t\t\t\tGraph.sanitizeLink(toolbarConfig.refreshBtn.url);\n\n\t\t\t\taddButton(mxUtils.bind(this, function (evt) {\n\t\t\t\t\tif (refreshUrl != null) {\n\t\t\t\t\t\twindow.location.href = refreshUrl;\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\twindow.location.reload();\n\t\t\t\t\t}\n\n\t\t\t\t\tmxEvent.consume(evt);\n\t\t\t\t}), Editor.refreshImage, mxResources.get('refresh', null, 'Refresh'));\n\t\t\t}\n\n\t\t\tif (toolbarConfig.fullscreenBtn != null && window.self !== window.top) {\n\t\t\t\taddButton(mxUtils.bind(this, function (evt) {\n\t\t\t\t\tif (toolbarConfig.fullscreenBtn.url) {\n\t\t\t\t\t\tgraph.openLink(toolbarConfig.fullscreenBtn.url);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tgraph.openLink(window.location.href);\n\t\t\t\t\t}\n\n\t\t\t\t\tmxEvent.consume(evt);\n\t\t\t\t}), Editor.fullscreenImage, mxResources.get('openInNewWindow', null, 'Open in New Window'));\n\t\t\t}\n\n\t\t\tif (!toolbarConfig.noCloseBtn && ((toolbarConfig.closeBtn && window.self === window.top) ||\n\t\t\t\t(graph.lightbox && (urlParams['close'] == '1' || this.container != document.body)))) {\n\t\t\t\taddButton(mxUtils.bind(this, function (evt) {\n\t\t\t\t\tif (urlParams['close'] == '1' || toolbarConfig.closeBtn) {\n\t\t\t\t\t\twindow.close();\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tthis.destroy();\n\t\t\t\t\t\tmxEvent.consume(evt);\n\t\t\t\t\t}\n\t\t\t\t}), Editor.closeImage, mxResources.get('close') + ' (Escape)');\n\t\t\t}\n\n\t\t\t// Initial state invisible\n\t\t\tthis.chromelessToolbar.style.display = 'none';\n\n\t\t\tif (!graph.isViewer()) {\n\t\t\t\tmxUtils.setPrefixedStyle(this.chromelessToolbar.style, 'transform', 'translate(-50%,0)');\n\t\t\t}\n\n\t\t\tgraph.container.appendChild(this.chromelessToolbar);\n\n\t\t\tmxEvent.addListener(graph.container, (mxClient.IS_POINTER) ? 'pointermove' : 'mousemove', mxUtils.bind(this, function (evt) {\n\t\t\t\tif (!mxEvent.isTouchEvent(evt)) {\n\t\t\t\t\tif (!mxEvent.isShiftDown(evt)) {\n\t\t\t\t\t\tfadeIn(30);\n\t\t\t\t\t}\n\n\t\t\t\t\tfadeOut();\n\t\t\t\t}\n\t\t\t}));\n\n\t\t\tmxEvent.addListener(this.chromelessToolbar, (mxClient.IS_POINTER) ? 'pointermove' : 'mousemove', function (evt) {\n\t\t\t\tmxEvent.consume(evt);\n\t\t\t});\n\n\t\t\tmxEvent.addListener(this.chromelessToolbar, 'mouseenter', mxUtils.bind(this, function (evt) {\n\t\t\t\tgraph.tooltipHandler.resetTimer();\n\t\t\t\tgraph.tooltipHandler.hideTooltip();\n\n\t\t\t\tif (!mxEvent.isShiftDown(evt)) {\n\t\t\t\t\tfadeIn(100);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tfadeOut();\n\t\t\t\t}\n\t\t\t}));\n\n\t\t\tmxEvent.addListener(this.chromelessToolbar, 'mousemove', mxUtils.bind(this, function (evt) {\n\t\t\t\tif (!mxEvent.isShiftDown(evt)) {\n\t\t\t\t\tfadeIn(100);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tfadeOut();\n\t\t\t\t}\n\n\t\t\t\tmxEvent.consume(evt);\n\t\t\t}));\n\n\t\t\tmxEvent.addListener(this.chromelessToolbar, 'mouseleave', mxUtils.bind(this, function (evt) {\n\t\t\t\tif (!mxEvent.isTouchEvent(evt)) {\n\t\t\t\t\tfadeIn(30);\n\t\t\t\t}\n\t\t\t}));\n\n\t\t\t// Shows/hides toolbar for touch devices\n\t\t\tvar tol = graph.getTolerance();\n\n\t\t\tgraph.addMouseListener(\n\t\t\t\t{\n\t\t\t\t\tstartX: 0,\n\t\t\t\t\tstartY: 0,\n\t\t\t\t\tscrollLeft: 0,\n\t\t\t\t\tscrollTop: 0,\n\t\t\t\t\tmouseDown: function (sender, me) {\n\t\t\t\t\t\tthis.startX = me.getGraphX();\n\t\t\t\t\t\tthis.startY = me.getGraphY();\n\t\t\t\t\t\tthis.scrollLeft = graph.container.scrollLeft;\n\t\t\t\t\t\tthis.scrollTop = graph.container.scrollTop;\n\t\t\t\t\t},\n\t\t\t\t\tmouseMove: function (sender, me) { },\n\t\t\t\t\tmouseUp: function (sender, me) {\n\t\t\t\t\t\tif (mxEvent.isTouchEvent(me.getEvent())) {\n\t\t\t\t\t\t\tif ((Math.abs(this.scrollLeft - graph.container.scrollLeft) < tol &&\n\t\t\t\t\t\t\t\tMath.abs(this.scrollTop - graph.container.scrollTop) < tol) &&\n\t\t\t\t\t\t\t\t(Math.abs(this.startX - me.getGraphX()) < tol &&\n\t\t\t\t\t\t\t\t\tMath.abs(this.startY - me.getGraphY()) < tol)) {\n\t\t\t\t\t\t\t\tif (parseFloat(ui.chromelessToolbar.style.opacity || 0) > 0) {\n\t\t\t\t\t\t\t\t\tfadeOut();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\tfadeIn(30);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t} // end if toolbar\n\n\t\t// Installs handling of highlight and handling links to relative links and anchors\n\t\tif (!this.editor.editable) {\n\t\t\tthis.addChromelessClickHandler();\n\t\t}\n\t}\n\telse if (this.editor.extendCanvas) {\n\t\t/**\n\t\t * Guesses autoTranslate to avoid another repaint (see below).\n\t\t * Works if only the scale of the graph changes or if pages\n\t\t * are visible and the visible pages do not change. Uses\n\t\t * geometries to guess the bounding box of the graph.\n\t\t */\n\t\tvar graphViewValidate = graph.view.validate;\n\t\tvar zero = new mxPoint();\n\t\tvar lastPage = null;\n\n\t\tgraph.view.validate = function () {\n\t\t\tif (graph.container != null &&\n\t\t\t\tmxUtils.hasScrollbars(graph.container)) {\n\t\t\t\t// Sets initial state after page changes\n\t\t\t\tif (ui.currentPage != null &&\n\t\t\t\t\tlastPage != ui.currentPage) {\n\t\t\t\t\tlastPage = ui.currentPage;\n\n\t\t\t\t\t// Sets initial translate based on geometries\n\t\t\t\t\t// to avoid revalidation in sizeDidChange\n\t\t\t\t\tvar bbox = graph.getBoundingBoxFromGeometry(\n\t\t\t\t\t\tgraph.model.getCells(), true);\n\n\t\t\t\t\t// Handles blank diagrams\n\t\t\t\t\tif (bbox == null) {\n\t\t\t\t\t\tbbox = new mxRectangle(\n\t\t\t\t\t\t\tgraph.view.translate.x * graph.view.scale,\n\t\t\t\t\t\t\tgraph.view.translate.y * graph.view.scale);\n\t\t\t\t\t}\n\n\t\t\t\t\tvar pageLayout = graph.getPageLayout(bbox, zero, 1);\n\t\t\t\t\tvar tr = graph.getDefaultTranslate(pageLayout);\n\t\t\t\t\tthis.x0 = pageLayout.x;\n\t\t\t\t\tthis.y0 = pageLayout.y;\n\n\t\t\t\t\tif (tr.x != this.translate.x ||\n\t\t\t\t\t\ttr.y != this.translate.y) {\n\t\t\t\t\t\tthis.invalidate();\n\t\t\t\t\t\tthis.translate.x = tr.x;\n\t\t\t\t\t\tthis.translate.y = tr.y;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tvar pad = graph.getPagePadding();\n\t\t\t\tvar size = graph.getPageSize();\n\t\t\t\tvar tx = pad.x - (this.x0 || 0) * size.width;\n\t\t\t\tvar ty = pad.y - (this.y0 || 0) * size.height;\n\n\t\t\t\tif (this.translate.x != tx || this.translate.y != ty) {\n\t\t\t\t\tthis.invalidate();\n\t\t\t\t\tthis.translate.x = tx\n\t\t\t\t\tthis.translate.y = ty\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tgraphViewValidate.apply(this, arguments);\n\t\t};\n\n\t\tif (!graph.isViewer()) {\n\t\t\tvar graphSizeDidChange = graph.sizeDidChange;\n\n\t\t\tgraph.sizeDidChange = function () {\n\t\t\t\tif (this.container != null &&\n\t\t\t\t\tmxUtils.hasScrollbars(this.container)) {\n\t\t\t\t\tthis.updateMinimumSize();\n\n\t\t\t\t\tif (!this.autoTranslate) {\n\t\t\t\t\t\tvar pageLayout = this.getPageLayout();\n\t\t\t\t\t\tvar tr = this.getDefaultTranslate(pageLayout);\n\t\t\t\t\t\tvar tx = this.view.translate.x;\n\t\t\t\t\t\tvar ty = this.view.translate.y;\n\n\t\t\t\t\t\tif (tr.x != tx || tr.y != ty) {\n\t\t\t\t\t\t\tthis.view.x0 = pageLayout.x;\n\t\t\t\t\t\t\tthis.view.y0 = pageLayout.y;\n\t\t\t\t\t\t\tthis.autoTranslate = true;\n\n\t\t\t\t\t\t\t// Requires full revalidation\n\t\t\t\t\t\t\tthis.view.setTranslate(tr.x, tr.y);\n\t\t\t\t\t\t\tthis.container.scrollLeft += Math.round((tr.x - tx) * this.view.scale);\n\t\t\t\t\t\t\tthis.container.scrollTop += Math.round((tr.y - ty) * this.view.scale);\n\t\t\t\t\t\t\tthis.autoTranslate = false;\n\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tgraphSizeDidChange.apply(this, arguments);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t// Fires event but does not invoke superclass\n\t\t\t\t\tthis.fireEvent(new mxEventObject(mxEvent.SIZE,\n\t\t\t\t\t\t'bounds', this.getGraphBounds()));\n\t\t\t\t}\n\t\t\t};\n\t\t}\n\t}\n\n\t// Accumulates the zoom factor while the rendering is taking place\n\t// so that not the complete sequence of zoom steps must be painted\n\tvar bgGroup = graph.view.getBackgroundPane();\n\tvar mainGroup = graph.view.getDrawPane();\n\tgraph.cumulativeZoomFactor = 1;\n\tvar updateZoomTimeout = null;\n\tvar cursorPosition = null;\n\tvar scrollPosition = null;\n\tvar forcedZoom = null;\n\tvar filter = null;\n\tvar mult = 20;\n\n\tvar scheduleZoom = function (delay) {\n\t\tif (updateZoomTimeout != null) {\n\t\t\twindow.clearTimeout(updateZoomTimeout);\n\t\t}\n\n\t\tif (delay >= 0) {\n\t\t\twindow.setTimeout(function () {\n\t\t\t\tif (!graph.isMouseDown || forcedZoom) {\n\t\t\t\t\tupdateZoomTimeout = window.setTimeout(mxUtils.bind(this, function () {\n\t\t\t\t\t\tif (graph.isFastZoomEnabled()) {\n\t\t\t\t\t\t\t// Transforms background page\n\t\t\t\t\t\t\tif (graph.view.backgroundPageShape != null && graph.view.backgroundPageShape.node != null) {\n\t\t\t\t\t\t\t\tmxUtils.setPrefixedStyle(graph.view.backgroundPageShape.node.style, 'transform-origin', null);\n\t\t\t\t\t\t\t\tmxUtils.setPrefixedStyle(graph.view.backgroundPageShape.node.style, 'transform', null);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// Transforms graph and background image\n\t\t\t\t\t\t\tmainGroup.style.transformOrigin = '';\n\t\t\t\t\t\t\tbgGroup.style.transformOrigin = '';\n\n\t\t\t\t\t\t\t// Workaround for no reset of transform in Safari\n\t\t\t\t\t\t\tif (mxClient.IS_SF) {\n\t\t\t\t\t\t\t\tmainGroup.style.transform = 'scale(1)';\n\t\t\t\t\t\t\t\tbgGroup.style.transform = 'scale(1)';\n\n\t\t\t\t\t\t\t\twindow.setTimeout(function () {\n\t\t\t\t\t\t\t\t\tmainGroup.style.transform = '';\n\t\t\t\t\t\t\t\t\tbgGroup.style.transform = '';\n\t\t\t\t\t\t\t\t}, 0)\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\tmainGroup.style.transform = '';\n\t\t\t\t\t\t\t\tbgGroup.style.transform = '';\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// Shows interactive elements\n\t\t\t\t\t\t\tgraph.view.getDecoratorPane().style.opacity = '';\n\t\t\t\t\t\t\tgraph.view.getOverlayPane().style.opacity = '';\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tvar sp = new mxPoint(graph.container.scrollLeft, graph.container.scrollTop);\n\t\t\t\t\t\tvar offset = mxUtils.getOffset(graph.container);\n\t\t\t\t\t\tvar prev = graph.view.scale;\n\t\t\t\t\t\tvar dx = 0;\n\t\t\t\t\t\tvar dy = 0;\n\n\t\t\t\t\t\tif (cursorPosition != null) {\n\t\t\t\t\t\t\tdx = graph.container.offsetWidth / 2 - cursorPosition.x + offset.x;\n\t\t\t\t\t\t\tdy = graph.container.offsetHeight / 2 - cursorPosition.y + offset.y;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tgraph.zoom(graph.cumulativeZoomFactor, null,\n\t\t\t\t\t\t\tgraph.isFastZoomEnabled() ? mult : null);\n\t\t\t\t\t\tvar s = graph.view.scale;\n\n\t\t\t\t\t\tif (s != prev) {\n\t\t\t\t\t\t\tif (scrollPosition != null) {\n\t\t\t\t\t\t\t\tdx += sp.x - scrollPosition.x;\n\t\t\t\t\t\t\t\tdy += sp.y - scrollPosition.y;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif (resize != null) {\n\t\t\t\t\t\t\t\tui.chromelessResize(false, null, dx * (graph.cumulativeZoomFactor - 1),\n\t\t\t\t\t\t\t\t\tdy * (graph.cumulativeZoomFactor - 1));\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif (mxUtils.hasScrollbars(graph.container) && (dx != 0 || dy != 0)) {\n\t\t\t\t\t\t\t\tgraph.container.scrollLeft -= dx * (graph.cumulativeZoomFactor - 1);\n\t\t\t\t\t\t\t\tgraph.container.scrollTop -= dy * (graph.cumulativeZoomFactor - 1);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (filter != null) {\n\t\t\t\t\t\t\tmainGroup.setAttribute('filter', filter);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tgraph.cumulativeZoomFactor = 1;\n\t\t\t\t\t\tupdateZoomTimeout = null;\n\t\t\t\t\t\tscrollPosition = null;\n\t\t\t\t\t\tcursorPosition = null;\n\t\t\t\t\t\tforcedZoom = null;\n\t\t\t\t\t\tfilter = null;\n\t\t\t\t\t}), (delay != null) ? delay : ((graph.isFastZoomEnabled()) ? ui.wheelZoomDelay : ui.lazyZoomDelay));\n\t\t\t\t}\n\t\t\t}, 0);\n\t\t}\n\t};\n\n\tgraph.lazyZoom = function (zoomIn, ignoreCursorPosition, delay, factor) {\n\t\tfactor = (factor != null) ? factor : this.zoomFactor;\n\n\t\t// TODO: Fix ignored cursor position if scrollbars are disabled\n\t\tignoreCursorPosition = ignoreCursorPosition || !graph.scrollbars;\n\n\t\tif (ignoreCursorPosition) {\n\t\t\tcursorPosition = new mxPoint(\n\t\t\t\tgraph.container.offsetLeft + graph.container.clientWidth / 2,\n\t\t\t\tgraph.container.offsetTop + graph.container.clientHeight / 2);\n\t\t}\n\n\t\t// Switches to 5% zoom steps below 15%\n\t\tif (zoomIn) {\n\t\t\tif (this.view.scale * this.cumulativeZoomFactor <= 0.15) {\n\t\t\t\tthis.cumulativeZoomFactor *= (this.view.scale + 0.05) / this.view.scale;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthis.cumulativeZoomFactor *= factor;\n\t\t\t\tthis.cumulativeZoomFactor = Math.round(this.view.scale * this.cumulativeZoomFactor * 100) / 100 / this.view.scale;\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tif (this.view.scale * this.cumulativeZoomFactor <= 0.15) {\n\t\t\t\tthis.cumulativeZoomFactor *= (this.view.scale - 0.05) / this.view.scale;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthis.cumulativeZoomFactor /= factor;\n\t\t\t\tthis.cumulativeZoomFactor = Math.round(this.view.scale * this.cumulativeZoomFactor * 100) / 100 / this.view.scale;\n\t\t\t}\n\t\t}\n\n\t\tthis.cumulativeZoomFactor = Math.max(0.05, Math.min(this.view.scale * this.cumulativeZoomFactor, 160)) / this.view.scale;\n\n\t\tif (graph.isFastZoomEnabled()) {\n\t\t\tif (filter == null && mainGroup.getAttribute('filter') != '') {\n\t\t\t\tfilter = mainGroup.getAttribute('filter');\n\t\t\t\tmainGroup.removeAttribute('filter');\n\t\t\t}\n\n\t\t\tscrollPosition = new mxPoint(graph.container.scrollLeft, graph.container.scrollTop);\n\n\t\t\t// Applies final rounding to preview\n\t\t\tvar f = Math.round((Math.round(this.view.scale * this.cumulativeZoomFactor *\n\t\t\t\t100) / 100) * mult) / (mult * this.view.scale);\n\n\t\t\tvar cx = (ignoreCursorPosition || cursorPosition == null) ?\n\t\t\t\tgraph.container.scrollLeft + graph.container.clientWidth / 2 :\n\t\t\t\tcursorPosition.x + graph.container.scrollLeft - graph.container.offsetLeft;\n\t\t\tvar cy = (ignoreCursorPosition || cursorPosition == null) ?\n\t\t\t\tgraph.container.scrollTop + graph.container.clientHeight / 2 :\n\t\t\t\tcursorPosition.y + graph.container.scrollTop - graph.container.offsetTop;\n\t\t\tmainGroup.style.transformOrigin = cx + 'px ' + cy + 'px';\n\t\t\tmainGroup.style.transform = 'scale(' + f + ')';\n\t\t\tbgGroup.style.transformOrigin = cx + 'px ' + cy + 'px';\n\t\t\tbgGroup.style.transform = 'scale(' + f + ')';\n\n\t\t\tif (graph.view.backgroundPageShape != null && graph.view.backgroundPageShape.node != null) {\n\t\t\t\tvar page = graph.view.backgroundPageShape.node;\n\n\t\t\t\tmxUtils.setPrefixedStyle(page.style, 'transform-origin',\n\t\t\t\t\t((ignoreCursorPosition || cursorPosition == null) ?\n\t\t\t\t\t\t((graph.container.clientWidth / 2 + graph.container.scrollLeft -\n\t\t\t\t\t\t\tpage.offsetLeft) + 'px') : ((cursorPosition.x + graph.container.scrollLeft -\n\t\t\t\t\t\t\t\tpage.offsetLeft - graph.container.offsetLeft) + 'px')) + ' ' +\n\t\t\t\t\t((ignoreCursorPosition || cursorPosition == null) ?\n\t\t\t\t\t\t((graph.container.clientHeight / 2 + graph.container.scrollTop -\n\t\t\t\t\t\t\tpage.offsetTop) + 'px') : ((cursorPosition.y + graph.container.scrollTop -\n\t\t\t\t\t\t\t\tpage.offsetTop - graph.container.offsetTop) + 'px')));\n\t\t\t\tmxUtils.setPrefixedStyle(page.style, 'transform', 'scale(' + f + ')');\n\t\t\t}\n\t\t\telse {\n\t\t\t\tgraph.view.validateBackgroundStyles(f, cx, cy);\n\t\t\t}\n\n\t\t\tgraph.view.getDecoratorPane().style.opacity = '0';\n\t\t\tgraph.view.getOverlayPane().style.opacity = '0';\n\n\t\t\tif (ui.hoverIcons != null) {\n\t\t\t\tui.hoverIcons.reset();\n\t\t\t}\n\n\t\t\tgraph.fireEvent(new mxEventObject('zoomPreview', 'factor', f));\n\t\t}\n\n\t\tscheduleZoom(graph.isFastZoomEnabled() ? delay : 0);\n\t};\n\n\t// Holds back repaint until after mouse gestures\n\tmxEvent.addGestureListeners(graph.container, function (evt) {\n\t\tif (updateZoomTimeout != null) {\n\t\t\twindow.clearTimeout(updateZoomTimeout);\n\t\t}\n\t}, null, function (evt) {\n\t\tif (graph.cumulativeZoomFactor != 1) {\n\t\t\tscheduleZoom(0);\n\t\t}\n\t});\n\n\t// Holds back repaint until scroll ends\n\tmxEvent.addListener(graph.container, 'scroll', function (evt) {\n\t\tif (updateZoomTimeout != null && !graph.isMouseDown && graph.cumulativeZoomFactor != 1) {\n\t\t\tscheduleZoom(0);\n\t\t}\n\t});\n\n\tmxEvent.addMouseWheelListener(mxUtils.bind(this, function (evt, up, force, cx, cy) {\n\t\tgraph.fireEvent(new mxEventObject('wheel'));\n\n\t\tif (this.dialogs == null || this.dialogs.length == 0) {\n\t\t\t// Scrolls with scrollbars turned off\n\t\t\tif (!graph.scrollbars && !force && graph.isScrollWheelEvent(evt)) {\n\t\t\t\tvar t = graph.view.getTranslate();\n\t\t\t\tvar step = 40 / graph.view.scale;\n\n\t\t\t\tif (!mxEvent.isShiftDown(evt)) {\n\t\t\t\t\tgraph.view.setTranslate(t.x, t.y + ((up) ? step : -step));\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tgraph.view.setTranslate(t.x + ((up) ? -step : step), t.y);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if (force || graph.isZoomWheelEvent(evt)) {\n\t\t\t\tvar source = mxEvent.getSource(evt);\n\n\t\t\t\twhile (source != null) {\n\t\t\t\t\tif (source == graph.container) {\n\t\t\t\t\t\tgraph.tooltipHandler.hideTooltip();\n\t\t\t\t\t\tcursorPosition = (cx != null && cy != null) ? new mxPoint(cx, cy) :\n\t\t\t\t\t\t\tnew mxPoint(mxEvent.getClientX(evt), mxEvent.getClientY(evt));\n\t\t\t\t\t\tforcedZoom = force;\n\t\t\t\t\t\tvar factor = graph.zoomFactor;\n\t\t\t\t\t\tvar delay = null;\n\n\t\t\t\t\t\t// Slower zoom for pinch gesture on trackpad with max delta to\n\t\t\t\t\t\t// filter out mouse wheel events in Brave browser for Windows \n\t\t\t\t\t\tif (evt.ctrlKey && evt.deltaY != null && Math.abs(evt.deltaY) < 40 &&\n\t\t\t\t\t\t\tMath.round(evt.deltaY) != evt.deltaY) {\n\t\t\t\t\t\t\tfactor = 1 + (Math.abs(evt.deltaY) / 20) * (factor - 1);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// Slower zoom for pinch gesture on touch screens\n\t\t\t\t\t\telse if (evt.movementY != null && evt.type == 'pointermove') {\n\t\t\t\t\t\t\tfactor = 1 + (Math.max(1, Math.abs(evt.movementY)) / 20) * (factor - 1);\n\t\t\t\t\t\t\tdelay = -1;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tgraph.lazyZoom(up, null, delay, factor);\n\t\t\t\t\t\tmxEvent.consume(evt);\n\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\n\t\t\t\t\tsource = source.parentNode;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}), graph.container);\n\n\t// Uses fast zoom for pinch gestures on iOS\n\tgraph.panningHandler.zoomGraph = function (evt) {\n\t\tgraph.cumulativeZoomFactor = evt.scale;\n\t\tgraph.lazyZoom(evt.scale > 0, true);\n\t\tmxEvent.consume(evt);\n\t};\n};\n\n/**\n * Creates a temporary graph instance for rendering off-screen content.\n */\nEditorUi.prototype.addChromelessToolbarItems = function (addButton) {\n\taddButton(mxUtils.bind(this, function (evt) {\n\t\tthis.actions.get('print').funct();\n\t\tmxEvent.consume(evt);\n\t}), Editor.printImage, mxResources.get('print'));\n};\n\n/**\n * Creates a temporary graph instance for rendering off-screen content.\n */\nEditorUi.prototype.isPagesEnabled = function () {\n\treturn this.editor.editable || urlParams['hide-pages'] != '1';\n};\n\n/**\n * Creates a temporary graph instance for rendering off-screen content.\n */\nEditorUi.prototype.createTemporaryGraph = function (stylesheet) {\n\treturn Graph.createOffscreenGraph(stylesheet);\n};\n\n/**\n * \n */\nEditorUi.prototype.addChromelessClickHandler = function () {\n\tvar hl = urlParams['highlight'];\n\n\t// Adds leading # for highlight color code\n\tif (hl != null && hl.length > 0) {\n\t\thl = '#' + hl;\n\t}\n\n\tthis.editor.graph.addClickHandler(hl);\n};\n\n/**\n * \n */\nEditorUi.prototype.toggleFormatPanel = function (visible) {\n\tvisible = (visible != null) ? visible : this.formatWidth == 0;\n\n\tif (this.format != null) {\n\t\tthis.formatWidth = (visible) ? 240 : 0;\n\t\tthis.formatContainer.style.width = this.formatWidth + 'px';\n\t\tthis.refresh();\n\t\tthis.format.refresh();\n\t\tthis.fireEvent(new mxEventObject('formatWidthChanged'));\n\t}\n};\n\n/**\n * \n */\nEditorUi.prototype.isFormatPanelVisible = function () {\n\treturn this.formatWidth > 0;\n};\n\n/**\n * Adds support for placeholders in labels.\n */\nEditorUi.prototype.lightboxFit = function (maxHeight) {\n\tif (this.isDiagramEmpty()) {\n\t\tthis.editor.graph.view.setScale(1);\n\t}\n\telse {\n\t\tvar p = urlParams['border'];\n\t\tvar border = 60;\n\n\t\tif (p != null) {\n\t\t\tborder = parseInt(p);\n\t\t}\n\n\t\t// LATER: Use initial graph bounds to avoid rounding errors\n\t\tthis.editor.graph.maxFitScale = this.lightboxMaxFitScale;\n\t\tthis.editor.graph.fit(border, null, null, null, null, null, maxHeight);\n\t\tthis.editor.graph.maxFitScale = null;\n\t}\n};\n\n/**\n * Translates this point by the given vector.\n * \n * @param {number} dx X-coordinate of the translation.\n * @param {number} dy Y-coordinate of the translation.\n */\nEditorUi.prototype.isDiagramEmpty = function () {\n\tvar model = this.editor.graph.getModel();\n\n\treturn model.getChildCount(model.root) == 1 && model.getChildCount(model.getChildAt(model.root, 0)) == 0;\n};\n\n/**\n * Hook for allowing selection and context menu for certain events.\n */\nEditorUi.prototype.isSelectionAllowed = function (evt) {\n\treturn mxEvent.getSource(evt).nodeName == 'SELECT' || (mxEvent.getSource(evt).nodeName == 'INPUT' &&\n\t\tmxUtils.isAncestorNode(this.formatContainer, mxEvent.getSource(evt)));\n};\n\n/**\n * Installs dialog if browser window is closed without saving\n * This must be disabled during save and image export.\n */\nEditorUi.prototype.addBeforeUnloadListener = function () {\n\t// Installs dialog if browser window is closed without saving\n\t// This must be disabled during save and image export\n\twindow.onbeforeunload = mxUtils.bind(this, function () {\n\t\tif (!this.editor.isChromelessView()) {\n\t\t\treturn this.onBeforeUnload();\n\t\t}\n\t});\n};\n\n/**\n * Sets the onbeforeunload for the application\n */\nEditorUi.prototype.onBeforeUnload = function () {\n\tif (this.editor.modified) {\n\t\treturn mxResources.get('allChangesLost');\n\t}\n};\n\n/**\n * Opens the current diagram via the window.opener if one exists.\n */\nEditorUi.prototype.open = function () {\n\t// Cross-domain window access is not allowed in FF, so if we\n\t// were opened from another domain then this will fail.\n\ttry {\n\t\tif (window.opener != null && window.opener.openFile != null) {\n\t\t\twindow.opener.openFile.setConsumer(mxUtils.bind(this, function (xml, filename) {\n\t\t\t\ttry {\n\t\t\t\t\tvar doc = mxUtils.parseXml(xml);\n\t\t\t\t\tthis.editor.setGraphXml(doc.documentElement);\n\t\t\t\t\tthis.editor.setModified(false);\n\t\t\t\t\tthis.editor.undoManager.clear();\n\n\t\t\t\t\tif (filename != null) {\n\t\t\t\t\t\tthis.editor.setFilename(filename);\n\t\t\t\t\t\tthis.updateDocumentTitle();\n\t\t\t\t\t}\n\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tcatch (e) {\n\t\t\t\t\tmxUtils.alert(mxResources.get('invalidOrMissingFile') + ': ' + e.message);\n\t\t\t\t}\n\t\t\t}));\n\t\t}\n\t}\n\tcatch (e) {\n\t\t// ignore\n\t}\n\n\t// Fires as the last step if no file was loaded\n\tthis.editor.graph.view.validate();\n\n\t// Required only in special cases where an initial file is opened\n\t// and the minimumGraphSize changes and CSS must be updated.\n\tthis.editor.graph.sizeDidChange();\n\tthis.editor.fireEvent(new mxEventObject('resetGraphView'));\n};\n\n/**\n * Shows the given popup menu.\n */\nEditorUi.prototype.showPopupMenu = function (fn, x, y, evt) {\n\tthis.editor.graph.popupMenuHandler.hideMenu();\n\n\tvar menu = new mxPopupMenu(fn);\n\tmenu.div.className += ' geMenubarMenu';\n\tmenu.smartSeparators = true;\n\tmenu.showDisabled = true;\n\tmenu.autoExpand = true;\n\n\t// Disables autoexpand and destroys menu when hidden\n\tmenu.hideMenu = mxUtils.bind(this, function () {\n\t\tmxPopupMenu.prototype.hideMenu.apply(menu, arguments);\n\t\tmenu.destroy();\n\t});\n\n\tmenu.popup(x, y, null, evt);\n\n\t// Allows hiding by clicking on document\n\tthis.setCurrentMenu(menu);\n};\n\n/**\n * Sets the current menu and element.\n */\nEditorUi.prototype.setCurrentMenu = function (menu, elt) {\n\tthis.currentMenuElt = elt;\n\tthis.currentMenu = menu;\n\tthis.hideShapePicker();\n};\n\n/**\n * Resets the current menu and element.\n */\nEditorUi.prototype.resetCurrentMenu = function () {\n\tthis.currentMenuElt = null;\n\tthis.currentMenu = null;\n};\n\n/**\n * Hides and destroys the current menu.\n */\nEditorUi.prototype.hideCurrentMenu = function () {\n\tif (this.currentMenu != null) {\n\t\tthis.currentMenu.hideMenu();\n\t\tthis.resetCurrentMenu();\n\t}\n};\n\n/**\n * Updates the document title.\n */\nEditorUi.prototype.updateDocumentTitle = function () {\n\tvar title = this.editor.getOrCreateFilename();\n\n\tif (this.editor.appName != null) {\n\t\ttitle += ' - ' + this.editor.appName;\n\t}\n\n\tdocument.title = title;\n};\n\n/**\n * Updates the document title.\n */\nEditorUi.prototype.createHoverIcons = function () {\n\treturn new HoverIcons(this.editor.graph);\n};\n\n/**\n * Returns the URL for a copy of this editor with no state.\n */\nEditorUi.prototype.redo = function () {\n\ttry {\n\t\tvar graph = this.editor.graph;\n\n\t\tif (graph.isEditing()) {\n\t\t\tdocument.execCommand('redo', false, null);\n\t\t}\n\t\telse {\n\t\t\tthis.editor.undoManager.redo();\n\t\t}\n\t}\n\tcatch (e) {\n\t\t// ignore all errors\n\t}\n};\n\n/**\n * Returns the URL for a copy of this editor with no state.\n */\nEditorUi.prototype.undo = function () {\n\ttry {\n\t\tvar graph = this.editor.graph;\n\n\t\tif (graph.isEditing()) {\n\t\t\t// Stops editing and executes undo on graph if native undo\n\t\t\t// does not affect current editing value\n\t\t\tvar value = graph.cellEditor.textarea.innerHTML;\n\t\t\tdocument.execCommand('undo', false, null);\n\n\t\t\tif (value == graph.cellEditor.textarea.innerHTML) {\n\t\t\t\tgraph.stopEditing(true);\n\t\t\t\tthis.editor.undoManager.undo();\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tthis.editor.undoManager.undo();\n\t\t}\n\t}\n\tcatch (e) {\n\t\t// ignore all errors\n\t}\n};\n\n/**\n * Returns the URL for a copy of this editor with no state.\n */\nEditorUi.prototype.canRedo = function () {\n\treturn this.editor.graph.isEditing() || this.editor.undoManager.canRedo();\n};\n\n/**\n * Returns the URL for a copy of this editor with no state.\n */\nEditorUi.prototype.canUndo = function () {\n\treturn this.editor.graph.isEditing() || this.editor.undoManager.canUndo();\n};\n\n/**\n * \n */\nEditorUi.prototype.getEditBlankXml = function () {\n\treturn mxUtils.getXml(this.editor.getGraphXml());\n};\n\n/**\n * Returns the URL for a copy of this editor with no state.\n */\nEditorUi.prototype.getUrl = function (pathname) {\n\tvar href = (pathname != null) ? pathname : window.location.pathname;\n\tvar parms = (href.indexOf('?') > 0) ? 1 : 0;\n\n\t// Removes template URL parameter for new blank diagram\n\tfor (var key in urlParams) {\n\t\tif (parms == 0) {\n\t\t\thref += '?';\n\t\t}\n\t\telse {\n\t\t\thref += '&';\n\t\t}\n\n\t\thref += key + '=' + urlParams[key];\n\t\tparms++;\n\t}\n\n\treturn href;\n};\n\n/**\n * Specifies if the graph has scrollbars.\n */\nEditorUi.prototype.setScrollbars = function (value) {\n\tvar graph = this.editor.graph;\n\tvar prev = graph.container.style.overflow;\n\tgraph.scrollbars = value;\n\tthis.editor.updateGraphComponents();\n\n\tif (prev != graph.container.style.overflow) {\n\t\tgraph.container.scrollTop = 0;\n\t\tgraph.container.scrollLeft = 0;\n\t\tgraph.view.scaleAndTranslate(1, 0, 0);\n\t\tthis.resetScrollbars();\n\t}\n\n\tthis.fireEvent(new mxEventObject('scrollbarsChanged'));\n};\n\n/**\n * Function: fitDiagramToWindow\n * \n * Zooms the diagram to fit into the window.\n */\nEditorUi.prototype.fitDiagramToWindow = function () {\n\tvar graph = this.editor.graph;\n\tvar bounds = (graph.isSelectionEmpty()) ?\n\t\tmxRectangle.fromRectangle(graph.getGraphBounds()) :\n\t\tgraph.getBoundingBox(graph.getSelectionCells())\n\tvar t = graph.view.translate;\n\tvar s = graph.view.scale;\n\n\tbounds.x = bounds.x / s - t.x;\n\tbounds.y = bounds.y / s - t.y;\n\tbounds.width /= s;\n\tbounds.height /= s;\n\n\tif (graph.backgroundImage != null) {\n\t\tbounds.add(new mxRectangle(0, 0,\n\t\t\tgraph.backgroundImage.width,\n\t\t\tgraph.backgroundImage.height));\n\t}\n\n\tif (bounds.width == 0 || bounds.height == 0) {\n\t\tgraph.zoomTo(1);\n\t\tthis.resetScrollbars();\n\t}\n\telse {\n\t\tvar b = Editor.fitWindowBorders;\n\n\t\tif (b != null) {\n\t\t\tbounds.x -= b.x;\n\t\t\tbounds.y -= b.y;\n\t\t\tbounds.width += b.width + b.x;\n\t\t\tbounds.height += b.height + b.y;\n\t\t}\n\n\t\tgraph.fitWindow(bounds);\n\t}\n};\n\n/**\n * Returns true if the graph has scrollbars.\n */\nEditorUi.prototype.hasScrollbars = function () {\n\treturn this.editor.graph.scrollbars;\n};\n\n/**\n * Resets the state of the scrollbars.\n */\nEditorUi.prototype.resetScrollbars = function () {\n\tvar graph = this.editor.graph;\n\tvar c = graph.container;\n\n\tif (!this.editor.extendCanvas) {\n\t\tc.scrollTop = 0;\n\t\tc.scrollLeft = 0;\n\n\t\tif (!mxUtils.hasScrollbars(c)) {\n\t\t\tgraph.view.setTranslate(0, 0);\n\t\t}\n\t}\n\telse if (!this.editor.isChromelessView()) {\n\t\tif (mxUtils.hasScrollbars(c)) {\n\t\t\tif (graph.pageVisible) {\n\t\t\t\tvar pad = graph.getPagePadding();\n\t\t\t\tc.scrollTop = Math.floor(pad.y - this.editor.initialTopSpacing) - 1;\n\t\t\t\tc.scrollLeft = Math.floor(Math.min(pad.x,\n\t\t\t\t\t(c.scrollWidth - c.clientWidth) / 2)) - 1;\n\n\t\t\t\t// Scrolls graph to visible area\n\t\t\t\tvar bounds = graph.getGraphBounds();\n\n\t\t\t\tif (bounds.width > 0 && bounds.height > 0) {\n\t\t\t\t\tif (bounds.x > c.scrollLeft + c.clientWidth * 0.9) {\n\t\t\t\t\t\tc.scrollLeft = Math.min(bounds.x + bounds.width - c.clientWidth, bounds.x - 10);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (bounds.y > c.scrollTop + c.clientHeight * 0.9) {\n\t\t\t\t\t\tc.scrollTop = Math.min(bounds.y + bounds.height - c.clientHeight, bounds.y - 10);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tvar bounds = graph.getGraphBounds();\n\n\t\t\t\tif (bounds.width == 0 && bounds.height == 0) {\n\t\t\t\t\tc.scrollLeft = (c.scrollWidth - c.clientWidth) / 2;\n\t\t\t\t\tc.scrollTop = (c.scrollHeight - c.clientHeight) / 2;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tvar width = Math.max(bounds.width, graph.scrollTileSize.width * graph.view.scale);\n\t\t\t\t\tvar height = Math.max(bounds.height, graph.scrollTileSize.height * graph.view.scale);\n\n\t\t\t\t\tc.scrollLeft = Math.floor(Math.max(0, bounds.x - Math.max(0, (c.clientWidth - width) / 2)));\n\t\t\t\t\tc.scrollTop = Math.floor(Math.max(0, bounds.y - Math.max(20, (c.clientHeight - height) / 4)));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tvar b = mxRectangle.fromRectangle((graph.pageVisible) ?\n\t\t\t\tgraph.view.getBackgroundPageBounds() :\n\t\t\t\tgraph.getGraphBounds())\n\t\t\tvar tr = graph.view.translate;\n\t\t\tvar s = graph.view.scale;\n\t\t\tb.x = b.x / s - tr.x;\n\t\t\tb.y = b.y / s - tr.y;\n\t\t\tb.width /= s;\n\t\t\tb.height /= s;\n\n\t\t\tvar dy = (graph.pageVisible) ? 0 : Math.max(0, (c.clientHeight - b.height) / 4);\n\n\t\t\tgraph.view.setTranslate(Math.floor(Math.max(0,\n\t\t\t\t(c.clientWidth - b.width) / 2) - b.x + 2),\n\t\t\t\tMath.floor(dy - b.y + 1));\n\t\t}\n\t}\n};\n\n/**\n * Loads the stylesheet for this graph.\n */\nEditorUi.prototype.setPageVisible = function (value) {\n\tvar graph = this.editor.graph;\n\tvar hasScrollbars = mxUtils.hasScrollbars(graph.container);\n\tvar tx = 0;\n\tvar ty = 0;\n\n\tif (hasScrollbars) {\n\t\ttx = graph.view.translate.x * graph.view.scale - graph.container.scrollLeft;\n\t\tty = graph.view.translate.y * graph.view.scale - graph.container.scrollTop;\n\t}\n\n\tgraph.pageVisible = value;\n\tgraph.pageBreaksVisible = value;\n\tgraph.preferPageSize = value;\n\tgraph.view.validateBackground();\n\n\t// Workaround for possible handle offset\n\tif (hasScrollbars) {\n\t\tvar cells = graph.getSelectionCells();\n\t\tgraph.clearSelection();\n\t\tgraph.setSelectionCells(cells);\n\t}\n\n\t// Calls updatePageBreaks\n\tgraph.sizeDidChange();\n\n\tif (hasScrollbars) {\n\t\tgraph.container.scrollLeft = graph.view.translate.x * graph.view.scale - tx;\n\t\tgraph.container.scrollTop = graph.view.translate.y * graph.view.scale - ty;\n\t}\n\n\tgraph.defaultPageVisible = value;\n\tthis.fireEvent(new mxEventObject('pageViewChanged'));\n};\n\n/**\n * Loads the stylesheet for this graph.\n */\nEditorUi.prototype.installResizeHandler = function (dialog, resizable, destroy) {\n\tif (resizable) {\n\t\tdialog.window.setSize = function (w, h) {\n\t\t\tif (!this.minimized) {\n\t\t\t\tvar iw = window.innerWidth || document.body.clientWidth || document.documentElement.clientWidth;\n\t\t\t\tvar ih = window.innerHeight || document.body.clientHeight || document.documentElement.clientHeight;\n\t\t\t\tw = Math.min(w, iw - this.getX());\n\t\t\t\th = Math.min(h, ih - this.getY());\n\t\t\t}\n\n\t\t\tmxWindow.prototype.setSize.apply(this, arguments);\n\t\t};\n\t}\n\n\tdialog.window.setLocation = function (x, y) {\n\t\tvar iw = window.innerWidth || document.body.clientWidth || document.documentElement.clientWidth;\n\t\tvar ih = window.innerHeight || document.body.clientHeight || document.documentElement.clientHeight;\n\n\t\tvar w = parseInt(this.div.style.width);\n\t\tvar h = parseInt(this.div.style.height);\n\n\t\tx = Math.max(0, Math.min(x, iw - w));\n\t\ty = Math.max(0, Math.min(y, ih - h));\n\n\t\tif (this.getX() != x || this.getY() != y) {\n\t\t\tmxWindow.prototype.setLocation.apply(this, arguments);\n\t\t}\n\n\t\tif (resizable && !this.minimized) {\n\t\t\tthis.setSize(w, h);\n\t\t}\n\t};\n\n\tvar resizeListener = mxUtils.bind(this, function () {\n\t\tvar x = dialog.window.getX();\n\t\tvar y = dialog.window.getY();\n\n\t\tdialog.window.setLocation(x, y);\n\t});\n\n\tmxEvent.addListener(window, 'resize', resizeListener);\n\n\tdialog.destroy = function () {\n\t\tmxEvent.removeListener(window, 'resize', resizeListener);\n\t\tdialog.window.destroy();\n\n\t\tif (destroy != null) {\n\t\t\tdestroy();\n\t\t}\n\t}\n};\n\n/**\n * Class: ChangeGridColor\n *\n * Undoable change to grid color.\n */\nfunction ChangeGridColor(ui, color) {\n\tthis.ui = ui;\n\tthis.color = color;\n};\n\n/**\n * Executes selection of a new page.\n */\nChangeGridColor.prototype.execute = function () {\n\tvar temp = this.ui.editor.graph.view.gridColor;\n\tthis.ui.setGridColor(this.color);\n\tthis.color = temp;\n};\n\n// Registers codec for ChangePageSetup\n(function () {\n\tvar codec = new mxObjectCodec(new ChangeGridColor(), ['ui']);\n\n\tmxCodecRegistry.register(codec);\n})();\n\n/**\n * Change types\n */\nfunction ChangePageSetup(ui, color, image, format, pageScale) {\n\tthis.ui = ui;\n\tthis.color = color;\n\tthis.previousColor = color;\n\tthis.image = image;\n\tthis.previousImage = image;\n\tthis.format = format;\n\tthis.previousFormat = format;\n\tthis.pageScale = pageScale;\n\tthis.previousPageScale = pageScale;\n\n\t// Needed since null are valid values for color and image\n\tthis.ignoreColor = false;\n\tthis.ignoreImage = false;\n}\n\n/**\n * Implementation of the undoable page rename.\n */\nChangePageSetup.prototype.execute = function () {\n\tvar graph = this.ui.editor.graph;\n\n\tif (!this.ignoreColor) {\n\t\tthis.color = this.previousColor;\n\t\tvar tmp = graph.background;\n\t\tthis.ui.setBackgroundColor(this.previousColor);\n\t\tthis.previousColor = tmp;\n\t}\n\n\tif (!this.ignoreImage) {\n\t\tthis.image = this.previousImage;\n\t\tvar tmp = graph.backgroundImage;\n\t\tvar img = this.previousImage;\n\n\t\tif (img != null && Graph.isPageLink(img.src)) {\n\t\t\timg = this.ui.createImageForPageLink(img.src, this.ui.currentPage);\n\t\t}\n\n\t\tthis.ui.setBackgroundImage(img);\n\t\tthis.previousImage = tmp;\n\t}\n\n\tif (this.previousFormat != null) {\n\t\tthis.format = this.previousFormat;\n\t\tvar tmp = graph.pageFormat;\n\n\t\tif (this.previousFormat.width != tmp.width ||\n\t\t\tthis.previousFormat.height != tmp.height) {\n\t\t\tthis.ui.setPageFormat(this.previousFormat);\n\t\t\tthis.previousFormat = tmp;\n\t\t}\n\t}\n\n\tif (this.foldingEnabled != null && this.foldingEnabled != this.ui.editor.graph.foldingEnabled) {\n\t\tthis.ui.setFoldingEnabled(this.foldingEnabled);\n\t\tthis.foldingEnabled = !this.foldingEnabled;\n\t}\n\n\tif (this.previousPageScale != null) {\n\t\tvar currentPageScale = this.ui.editor.graph.pageScale;\n\n\t\tif (this.previousPageScale != currentPageScale) {\n\t\t\tthis.ui.setPageScale(this.previousPageScale);\n\t\t\tthis.previousPageScale = currentPageScale;\n\t\t}\n\t}\n};\n\n// Registers codec for ChangePageSetup\n(function () {\n\tvar codec = new mxObjectCodec(new ChangePageSetup(), ['ui', 'previousColor', 'previousImage', 'previousFormat', 'previousPageScale']);\n\n\tcodec.afterDecode = function (dec, node, obj) {\n\t\tobj.previousColor = obj.color;\n\t\tobj.previousImage = obj.image;\n\t\tobj.previousFormat = obj.format;\n\t\tobj.previousPageScale = obj.pageScale;\n\n\t\tif (obj.foldingEnabled != null) {\n\t\t\tobj.foldingEnabled = !obj.foldingEnabled;\n\t\t}\n\n\t\treturn obj;\n\t};\n\n\tmxCodecRegistry.register(codec);\n})();\n\n/**\n * Loads the stylesheet for this graph.\n */\nEditorUi.prototype.setBackgroundColor = function (value) {\n\tthis.editor.graph.background = value;\n\tthis.editor.graph.view.validateBackground();\n\n\tthis.fireEvent(new mxEventObject('backgroundColorChanged'));\n};\n\n/**\n * Loads the stylesheet for this graph.\n */\nEditorUi.prototype.setFoldingEnabled = function (value) {\n\tthis.editor.graph.foldingEnabled = value;\n\tthis.editor.graph.view.revalidate();\n\n\tthis.fireEvent(new mxEventObject('foldingEnabledChanged'));\n};\n\n/**\n * Loads the stylesheet for this graph.\n */\nEditorUi.prototype.setPageFormat = function (value, ignorePageVisible) {\n\tignorePageVisible = (ignorePageVisible != null) ? ignorePageVisible : urlParams['sketch'] == '1';\n\tthis.editor.graph.pageFormat = value;\n\n\tif (!ignorePageVisible) {\n\t\tif (!this.editor.graph.pageVisible) {\n\t\t\tthis.actions.get('pageView').funct();\n\t\t}\n\t\telse {\n\t\t\tthis.editor.graph.view.validateBackground();\n\t\t\tthis.editor.graph.sizeDidChange();\n\t\t}\n\t}\n\n\tthis.fireEvent(new mxEventObject('pageFormatChanged'));\n};\n\n/**\n * Loads the stylesheet for this graph.\n */\nEditorUi.prototype.setPageScale = function (value) {\n\tthis.editor.graph.pageScale = value;\n\n\tif (!this.editor.graph.pageVisible) {\n\t\tthis.actions.get('pageView').funct();\n\t}\n\telse {\n\t\tthis.editor.graph.view.validateBackground();\n\t\tthis.editor.graph.sizeDidChange();\n\t}\n\n\tthis.fireEvent(new mxEventObject('pageScaleChanged'));\n};\n\n/**\n * Loads the stylesheet for this graph.\n */\nEditorUi.prototype.setGridColor = function (value) {\n\tthis.editor.graph.view.gridColor = value;\n\tthis.editor.graph.view.validateBackground();\n\tthis.fireEvent(new mxEventObject('gridColorChanged'));\n};\n\n/**\n * Updates the states of the given undo/redo items.\n */\nEditorUi.prototype.addUndoListener = function () {\n\tvar undoMgr = this.editor.undoManager;\n\n\tvar undoListener = mxUtils.bind(this, function () {\n\t\tthis.updateActionStates();\n\t});\n\n\tundoMgr.addListener(mxEvent.ADD, undoListener);\n\tundoMgr.addListener(mxEvent.UNDO, undoListener);\n\tundoMgr.addListener(mxEvent.REDO, undoListener);\n\tundoMgr.addListener(mxEvent.CLEAR, undoListener);\n\n\t// Overrides cell editor to update action states\n\tvar cellEditorStartEditing = this.editor.graph.cellEditor.startEditing;\n\n\tthis.editor.graph.cellEditor.startEditing = function () {\n\t\tcellEditorStartEditing.apply(this, arguments);\n\t\tundoListener();\n\t};\n\n\tvar cellEditorStopEditing = this.editor.graph.cellEditor.stopEditing;\n\n\tthis.editor.graph.cellEditor.stopEditing = function (cell, trigger) {\n\t\tcellEditorStopEditing.apply(this, arguments);\n\t\tundoListener();\n\t};\n\n\t// Updates the button states once\n\tundoListener();\n};\n\n/**\n* Updates the states of the given toolbar items based on the selection.\n*/\nEditorUi.prototype.updateActionStates = function () {\n\tvar graph = this.editor.graph;\n\tvar ss = this.getSelectionState();\n\tvar unlocked = graph.isEnabled() && !graph.isCellLocked(graph.getDefaultParent());\n\tvar editable = !this.editor.chromeless || this.editor.editable;\n\n\t// Updates action states\n\tvar actions = ['cut', 'copy', 'bold', 'italic', 'underline', 'delete', 'duplicate',\n\t\t'editStyle', 'editTooltip', 'editLink', 'backgroundColor', 'borderColor',\n\t\t'edit', 'toFront', 'toBack', 'solid', 'dashed', 'pasteSize',\n\t\t'dotted', 'fillColor', 'gradientColor', 'shadow', 'fontColor',\n\t\t'formattedText', 'rounded', 'toggleRounded', 'strokeColor',\n\t\t'sharp', 'snapToGrid'];\n\n\tfor (var i = 0; i < actions.length; i++) {\n\t\tthis.actions.get(actions[i]).setEnabled(ss.cells.length > 0);\n\t}\n\n\tthis.actions.get('grid').setEnabled(editable);\n\tthis.actions.get('undo').setEnabled(this.canUndo() && editable);\n\tthis.actions.get('redo').setEnabled(this.canRedo() && editable);\n\tthis.actions.get('pasteSize').setEnabled(this.copiedSize != null && ss.vertices.length > 0);\n\tthis.actions.get('pasteData').setEnabled(this.copiedValue != null && ss.cells.length > 0);\n\tthis.actions.get('setAsDefaultStyle').setEnabled(graph.getSelectionCount() == 1);\n\tthis.actions.get('lockUnlock').setEnabled(!graph.isSelectionEmpty());\n\tthis.actions.get('bringForward').setEnabled(ss.cells.length == 1);\n\tthis.actions.get('sendBackward').setEnabled(ss.cells.length == 1);\n\tthis.actions.get('rotation').setEnabled(ss.vertices.length == 1);\n\tthis.actions.get('wordWrap').setEnabled(ss.vertices.length == 1);\n\tthis.actions.get('autosize').setEnabled(ss.vertices.length > 0);\n\tthis.actions.get('copySize').setEnabled(ss.vertices.length == 1);\n\tthis.actions.get('clearWaypoints').setEnabled(ss.connections);\n\tthis.actions.get('curved').setEnabled(ss.edges.length > 0);\n\tthis.actions.get('turn').setEnabled(ss.cells.length > 0);\n\tthis.actions.get('group').setEnabled(!ss.row && !ss.cell &&\n\t\t(ss.cells.length > 1 || (ss.vertices.length == 1 &&\n\t\t\tgraph.model.getChildCount(ss.cells[0]) == 0 &&\n\t\t\t!graph.isContainer(ss.vertices[0]))));\n\tthis.actions.get('ungroup').setEnabled(!ss.row && !ss.cell && !ss.table &&\n\t\tss.vertices.length > 0 && (graph.isContainer(ss.vertices[0]) ||\n\t\t\tgraph.getModel().getChildCount(ss.vertices[0]) > 0));\n\tthis.actions.get('removeFromGroup').setEnabled(ss.cells.length == 1 &&\n\t\tgraph.getModel().isVertex(graph.getModel().getParent(ss.cells[0])));\n\tthis.actions.get('collapsible').setEnabled(ss.vertices.length == 1 &&\n\t\t(graph.model.getChildCount(ss.vertices[0]) > 0 ||\n\t\t\tgraph.isContainer(ss.vertices[0])));\n\tthis.actions.get('exitGroup').setEnabled(graph.view.currentRoot != null);\n\tthis.actions.get('home').setEnabled(graph.view.currentRoot != null);\n\tthis.actions.get('enterGroup').setEnabled(ss.cells.length == 1 &&\n\t\tgraph.isValidRoot(ss.cells[0]));\n\tthis.actions.get('copyData').setEnabled(ss.cells.length == 1);\n\tthis.actions.get('editLink').setEnabled(ss.cells.length == 1);\n\tthis.actions.get('editStyle').setEnabled(ss.cells.length == 1);\n\tthis.actions.get('editTooltip').setEnabled(ss.cells.length == 1);\n\tthis.actions.get('openLink').setEnabled(ss.cells.length == 1 &&\n\t\tgraph.getLinkForCell(ss.cells[0]) != null);\n\tthis.actions.get('guides').setEnabled(graph.isEnabled());\n\tthis.actions.get('selectVertices').setEnabled(unlocked);\n\tthis.actions.get('selectEdges').setEnabled(unlocked);\n\tthis.actions.get('selectAll').setEnabled(unlocked);\n\tthis.actions.get('selectNone').setEnabled(unlocked);\n\n\tvar foldable = ss.vertices.length == 1 &&\n\t\tgraph.isCellFoldable(ss.vertices[0]);\n\tthis.actions.get('expand').setEnabled(foldable);\n\tthis.actions.get('collapse').setEnabled(foldable);\n\n\t// Updates menu states\n\tthis.menus.get('navigation').setEnabled(ss.cells.length > 0 ||\n\t\tgraph.view.currentRoot != null);\n\tthis.menus.get('layout').setEnabled(unlocked);\n\tthis.menus.get('insert').setEnabled(unlocked);\n\tthis.menus.get('direction').setEnabled(ss.unlocked &&\n\t\tss.vertices.length == 1);\n\tthis.menus.get('distribute').setEnabled(ss.unlocked &&\n\t\tss.vertices.length > 1);\n\tthis.menus.get('align').setEnabled(ss.unlocked &&\n\t\tss.cells.length > 0);\n\n\tthis.updatePasteActionStates();\n};\n\nEditorUi.prototype.zeroOffset = new mxPoint(0, 0);\n\nEditorUi.prototype.getDiagramContainerOffset = function () {\n\treturn this.zeroOffset;\n};\n\n/**\n * Refreshes the viewport.\n */\nEditorUi.prototype.refresh = function (sizeDidChange) {\n\tsizeDidChange = (sizeDidChange != null) ? sizeDidChange : true;\n\n\tvar w = this.container.clientWidth;\n\tvar h = this.container.clientHeight;\n\n\tif (this.container == document.body) {\n\t\tw = document.body.clientWidth || document.documentElement.clientWidth;\n\t\th = document.documentElement.clientHeight;\n\t}\n\n\t// Workaround for bug on iOS see\n\t// http://stackoverflow.com/questions/19012135/ios-7-ipad-safari-landscape-innerheight-outerheight-layout-issue\n\t// FIXME: Fix if footer visible\n\tvar off = 0;\n\n\tif (mxClient.IS_IOS && !window.navigator.standalone && typeof Menus !== 'undefined') {\n\t\tif (window.innerHeight != document.documentElement.clientHeight) {\n\t\t\toff = document.documentElement.clientHeight - window.innerHeight;\n\t\t\twindow.scrollTo(0, 0);\n\t\t}\n\t}\n\n\tvar effHsplitPosition = Math.max(0, Math.min(\n\t\tthis.hsplitPosition, w - this.splitSize - 40));\n\tvar tmp = 0;\n\n\tif (this.menubar != null) {\n\t\tthis.menubarContainer.style.height = this.menubarHeight + 'px';\n\t\ttmp += this.menubarHeight;\n\t}\n\n\tif (this.toolbar != null) {\n\t\tthis.toolbarContainer.style.top = this.menubarHeight + 'px';\n\t\tthis.toolbarContainer.style.height = this.toolbarHeight + 'px';\n\t\ttmp += this.toolbarHeight;\n\t}\n\n\tif (tmp > 0) {\n\t\ttmp += 1;\n\t}\n\n\tvar fw = (this.format != null) ? this.formatWidth : 0;\n\tthis.sidebarContainer.style.top = tmp + 'px';\n\tthis.sidebarContainer.style.width = effHsplitPosition + 'px';\n\tthis.formatContainer.style.top = tmp + 'px';\n\tthis.formatContainer.style.width = fw + 'px';\n\tthis.formatContainer.style.display = (this.format != null) ? '' : 'none';\n\n\tvar diagContOffset = this.getDiagramContainerOffset();\n\tvar contLeft = (this.hsplit.parentNode != null) ? (effHsplitPosition) : 0;\n\tthis.footerContainer.style.height = this.footerHeight + 'px';\n\tthis.hsplit.style.top = this.sidebarContainer.style.top;\n\tthis.hsplit.style.left = effHsplitPosition + 'px';\n\tthis.footerContainer.style.display = (this.footerHeight == 0) ? 'none' : '';\n\n\tif (this.tabContainer != null) {\n\t\tthis.tabContainer.style.left = contLeft + 'px';\n\t\tthis.hsplit.style.bottom = this.tabContainer.offsetHeight + 'px';\n\t}\n\telse {\n\t\tthis.hsplit.style.bottom = (this.footerHeight + off) + 'px';\n\t}\n\n\tif (this.footerHeight > 0) {\n\t\tthis.footerContainer.style.bottom = off + 'px';\n\t}\n\n\tvar th = 0;\n\n\tif (this.tabContainer != null) {\n\t\tthis.tabContainer.style.bottom = (this.footerHeight + off) + 'px';\n\t\tthis.tabContainer.style.right = fw + 'px';\n\t\tth = this.tabContainer.clientHeight;\n\t\tthis.checkTabScrollerOverflow();\n\t}\n\n\tthis.sidebarContainer.style.bottom = (this.footerHeight + off) + 'px';\n\tthis.formatContainer.style.bottom = (this.footerHeight + off) + 'px';\n\n\tthis.diagramContainer.style.left = (contLeft + diagContOffset.x) + 'px';\n\tthis.diagramContainer.style.top = (tmp + diagContOffset.y) + 'px';\n\tthis.diagramContainer.style.right = fw + 'px';\n\tthis.diagramContainer.style.bottom = (this.footerHeight + off + th) + 'px';\n\n\tif (sizeDidChange) {\n\t\tthis.editor.graph.sizeDidChange();\n\t}\n};\n\n/**\n * Creates the required containers.\n */\nEditorUi.prototype.createTabContainer = function () {\n\treturn null;\n};\n\n/**\n * Creates the required containers.\n */\nEditorUi.prototype.createDivs = function () {\n\tthis.menubarContainer = this.createDiv('geMenubarContainer');\n\tthis.toolbarContainer = this.createDiv('geToolbarContainer');\n\tthis.sidebarContainer = this.createDiv('geSidebarContainer');\n\tthis.formatContainer = this.createDiv('geSidebarContainer geFormatContainer');\n\tthis.diagramContainer = this.createDiv('geDiagramContainer');\n\tthis.footerContainer = this.createDiv('geFooterContainer');\n\tthis.hsplit = this.createDiv('geHsplit');\n\n\t// Sets static style for containers\n\tthis.menubarContainer.style.top = '0px';\n\tthis.menubarContainer.style.left = '0px';\n\tthis.menubarContainer.style.right = '0px';\n\tthis.toolbarContainer.style.left = '0px';\n\tthis.toolbarContainer.style.right = '0px';\n\tthis.sidebarContainer.style.left = '0px';\n\tthis.sidebarContainer.style.zIndex = '1';\n\tthis.formatContainer.style.right = '0px';\n\tthis.formatContainer.style.zIndex = '1';\n\tthis.diagramContainer.style.right = ((this.format != null) ? this.formatWidth : 0) + 'px';\n\tthis.footerContainer.style.left = '0px';\n\tthis.footerContainer.style.right = '0px';\n\tthis.footerContainer.style.bottom = '0px';\n\tthis.footerContainer.style.zIndex = mxPopupMenu.prototype.zIndex - 3;\n\tthis.hsplit.style.width = this.splitSize + 'px';\n\tthis.hsplit.style.zIndex = '1';\n\n\tif (!this.editor.chromeless) {\n\t\tthis.tabContainer = this.createTabContainer();\n\t}\n\telse {\n\t\tthis.diagramContainer.style.border = 'none';\n\t}\n};\n\n/**\n * Hook for sidebar footer container. This implementation returns null.\n */\nEditorUi.prototype.createSidebarContainer = function () {\n\tvar div = document.createElement('div');\n\tdiv.className = 'geSidebarContainer';\n\n\treturn div;\n};\n\n/**\n * Creates the required containers.\n */\nEditorUi.prototype.createUi = function () {\n\t// Creates menubar\n\tthis.menubar = (this.editor.chromeless) ? null : this.menus.createMenubar(this.createDiv('geMenubar'));\n\n\tif (this.menubar != null) {\n\t\tthis.menubarContainer.appendChild(this.menubar.container);\n\t}\n\n\t// Adds status bar in menubar\n\tif (this.menubar != null) {\n\t\tthis.statusContainer = this.createStatusContainer();\n\n\t\t// Connects the status bar to the editor status\n\t\tthis.editor.addListener('statusChanged', mxUtils.bind(this, function () {\n\t\t\tthis.setStatusText(this.editor.getStatus());\n\t\t}));\n\n\t\tthis.setStatusText(this.editor.getStatus());\n\t\tthis.menubar.container.appendChild(this.statusContainer);\n\n\t\t// Inserts into DOM\n\t\tthis.container.appendChild(this.menubarContainer);\n\t}\n\n\t// Creates the sidebar\n\tthis.sidebar = (this.editor.chromeless) ? null : this.createSidebar(this.sidebarContainer);\n\n\tif (this.sidebar != null) {\n\t\tthis.container.appendChild(this.sidebarContainer);\n\t}\n\n\t// Creates the format sidebar\n\tthis.format = (this.editor.chromeless || !this.formatEnabled) ? null : this.createFormat(this.formatContainer);\n\n\tif (this.format != null) {\n\t\tthis.container.appendChild(this.formatContainer);\n\t}\n\n\t// Creates the footer\n\tvar footer = (this.editor.chromeless) ? null : this.createFooter();\n\n\tif (footer != null) {\n\t\tthis.footerContainer.appendChild(footer);\n\t\tthis.container.appendChild(this.footerContainer);\n\t}\n\n\tthis.container.appendChild(this.diagramContainer);\n\n\tif (this.container != null && this.tabContainer != null) {\n\t\tthis.container.appendChild(this.tabContainer);\n\t}\n\n\t// Creates toolbar\n\tthis.toolbar = (this.editor.chromeless) ? null : this.createToolbar(this.createDiv('geToolbar'));\n\n\tif (this.toolbar != null) {\n\t\tthis.toolbarContainer.appendChild(this.toolbar.container);\n\t\tthis.container.appendChild(this.toolbarContainer);\n\t}\n\n\t// HSplit\n\tif (this.sidebar != null) {\n\t\tthis.container.appendChild(this.hsplit);\n\n\t\tthis.addSplitHandler(this.hsplit, true, 0, mxUtils.bind(this, function (value) {\n\t\t\tthis.hsplitPosition = value;\n\t\t\tthis.refresh();\n\t\t}));\n\t}\n};\n\n/**\n * Creates a new toolbar for the given container.\n */\nEditorUi.prototype.createStatusContainer = function () {\n\tvar container = document.createElement('a');\n\tcontainer.className = 'geItem geStatus';\n\n\t// Handles data-action attribute\n\tmxEvent.addListener(container, 'click', mxUtils.bind(this, function (evt) {\n\t\tvar elt = mxEvent.getSource(evt);\n\n\t\tif (elt.nodeName != 'A') {\n\t\t\tvar name = elt.getAttribute('data-action');\n\n\t\t\t// Make generic\n\t\t\tif (name == 'statusFunction' && this.editor.statusFunction != null) {\n\t\t\t\tthis.editor.statusFunction();\n\t\t\t}\n\t\t\telse if (name != null) {\n\t\t\t\tvar action = this.actions.get(name);\n\n\t\t\t\tif (action != null) {\n\t\t\t\t\taction.funct();\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tvar title = elt.getAttribute('data-title');\n\t\t\t\tvar msg = elt.getAttribute('data-message');\n\n\t\t\t\tif (title != null && msg != null) {\n\t\t\t\t\tthis.showError(title, msg);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tvar link = elt.getAttribute('data-link');\n\n\t\t\t\t\tif (link != null) {\n\t\t\t\t\t\tthis.editor.graph.openLink(link);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tmxEvent.consume(evt);\n\t\t}\n\t}));\n\n\treturn container;\n};\n\n/**\n * Creates a new toolbar for the given container.\n */\nEditorUi.prototype.setStatusText = function (value) {\n\tthis.statusContainer.innerHTML = Graph.sanitizeHtml(value);\n\n\t// Wraps simple status messages in a div for styling\n\tif (this.statusContainer.getElementsByTagName('div').length == 0 &&\n\t\tvalue != null && value.length > 0) {\n\t\tthis.statusContainer.innerText = '';\n\t\tvar div = this.createStatusDiv(value);\n\t\tthis.statusContainer.appendChild(div);\n\t}\n\n\t// Handles data-effect attribute\n\tvar spans = this.statusContainer.querySelectorAll('[data-effect=\"fade\"]');\n\n\tif (spans != null) {\n\t\tfor (var i = 0; i < spans.length; i++) {\n\t\t\t(function (temp) {\n\t\t\t\tmxUtils.setOpacity(temp, 0);\n\t\t\t\tmxUtils.setPrefixedStyle(temp.style, 'transform', 'scaleX(0)');\n\t\t\t\tmxUtils.setPrefixedStyle(temp.style, 'transition', 'all 0.2s ease');\n\n\t\t\t\twindow.setTimeout(mxUtils.bind(this, function () {\n\t\t\t\t\tmxUtils.setOpacity(temp, 100);\n\t\t\t\t\tmxUtils.setPrefixedStyle(temp.style, 'transform', 'scaleX(1)');\n\t\t\t\t\tmxUtils.setPrefixedStyle(temp.style, 'transition', 'all 1s ease');\n\n\t\t\t\t\twindow.setTimeout(mxUtils.bind(this, function () {\n\t\t\t\t\t\tmxUtils.setPrefixedStyle(temp.style, 'transform', 'scaleX(0)');\n\t\t\t\t\t\tmxUtils.setOpacity(temp, 0);\n\n\t\t\t\t\t\twindow.setTimeout(mxUtils.bind(this, function () {\n\t\t\t\t\t\t\tif (temp.parentNode != null) {\n\t\t\t\t\t\t\t\ttemp.parentNode.removeChild(temp);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}), 1000);\n\t\t\t\t\t}), Editor.updateStatusInterval / 2);\n\t\t\t\t}), 0);\n\t\t\t})(spans[i]);\n\t\t}\n\t}\n};\n\n/**\n * Creates a new toolbar for the given container.\n */\nEditorUi.prototype.createStatusDiv = function (value) {\n\tvar div = document.createElement('div');\n\tdiv.style.textOverflow = 'ellipsis';\n\tdiv.style.display = 'inline-block';\n\tdiv.style.whiteSpace = 'nowrap';\n\tdiv.style.overflow = 'hidden';\n\tdiv.style.minWidth = '0';\n\n\tdiv.setAttribute('title', value);\n\tdiv.innerHTML = Graph.sanitizeHtml(value);\n\n\treturn div;\n};\n\n/**\n * Creates a new toolbar for the given container.\n */\nEditorUi.prototype.createToolbar = function (container) {\n\treturn new Toolbar(this, container);\n};\n\n/**\n * Creates a new sidebar for the given container.\n */\nEditorUi.prototype.createSidebar = function (container) {\n\treturn new Sidebar(this, container);\n};\n\n/**\n * Creates a new sidebar for the given container.\n */\nEditorUi.prototype.createFormat = function (container) {\n\treturn new Format(this, container);\n};\n\n/**\n * Creates and returns a new footer.\n */\nEditorUi.prototype.createFooter = function () {\n\treturn this.createDiv('geFooter');\n};\n\n/**\n * Creates the actual toolbar for the toolbar container.\n */\nEditorUi.prototype.createDiv = function (classname) {\n\tvar elt = document.createElement('div');\n\telt.className = classname;\n\n\treturn elt;\n};\n\n/**\n * Updates the states of the given undo/redo items.\n */\nEditorUi.prototype.addSplitHandler = function (elt, horizontal, dx, onChange) {\n\tvar start = null;\n\tvar initial = null;\n\tvar ignoreClick = true;\n\tvar last = null;\n\n\t// Disables built-in pan and zoom in IE10 and later\n\tif (mxClient.IS_POINTER) {\n\t\telt.style.touchAction = 'none';\n\t}\n\n\tvar getValue = mxUtils.bind(this, function () {\n\t\tvar result = parseInt(((horizontal) ? elt.style.left : elt.style.bottom));\n\n\t\t// Takes into account hidden footer\n\t\tif (!horizontal) {\n\t\t\tresult = result + dx - this.footerHeight;\n\t\t}\n\n\t\treturn result;\n\t});\n\n\tfunction moveHandler(evt) {\n\t\tif (start != null) {\n\t\t\tvar pt = new mxPoint(mxEvent.getClientX(evt), mxEvent.getClientY(evt));\n\t\t\tonChange(Math.max(0, initial + ((horizontal) ? (pt.x - start.x) : (start.y - pt.y)) - dx));\n\t\t\tmxEvent.consume(evt);\n\n\t\t\tif (initial != getValue()) {\n\t\t\t\tignoreClick = true;\n\t\t\t\tlast = null;\n\t\t\t}\n\t\t}\n\t};\n\n\tfunction dropHandler(evt) {\n\t\tmoveHandler(evt);\n\t\tinitial = null;\n\t\tstart = null;\n\t};\n\n\tmxEvent.addGestureListeners(elt, function (evt) {\n\t\tstart = new mxPoint(mxEvent.getClientX(evt), mxEvent.getClientY(evt));\n\t\tinitial = getValue();\n\t\tignoreClick = false;\n\t\tmxEvent.consume(evt);\n\t});\n\n\tmxEvent.addListener(elt, 'click', mxUtils.bind(this, function (evt) {\n\t\tif (!ignoreClick && this.hsplitClickEnabled) {\n\t\t\tvar next = (last != null) ? last - dx : 0;\n\t\t\tlast = getValue();\n\t\t\tonChange(next);\n\t\t\tmxEvent.consume(evt);\n\t\t}\n\t}));\n\n\tmxEvent.addGestureListeners(document, null, moveHandler, dropHandler);\n\n\tthis.destroyFunctions.push(function () {\n\t\tmxEvent.removeGestureListeners(document, null, moveHandler, dropHandler);\n\t});\n};\n\n/**\n * Translates this point by the given vector.\n * \n * @param {number} dx X-coordinate of the translation.\n * @param {number} dy Y-coordinate of the translation.\n */\nEditorUi.prototype.prompt = function (title, defaultValue, fn) {\n\tvar dlg = new FilenameDialog(this, defaultValue, mxResources.get('apply'), function (newValue) {\n\t\tfn(parseFloat(newValue));\n\t}, title);\n\n\tthis.showDialog(dlg.container, 300, 80, true, true);\n\tdlg.init();\n};\n\n/**\n * Translates this point by the given vector.\n * \n * @param {number} dx X-coordinate of the translation.\n * @param {number} dy Y-coordinate of the translation.\n */\nEditorUi.prototype.handleError = function (resp, title, fn, invokeFnOnClose, notFoundMessage) {\n\tvar e = (resp != null && resp.error != null) ? resp.error : resp;\n\n\tif (e != null || title != null) {\n\t\tvar msg = mxUtils.htmlEntities(mxResources.get('unknownError'));\n\t\tvar btn = mxResources.get('ok');\n\t\ttitle = (title != null) ? title : mxResources.get('error');\n\n\t\tif (e != null && e.message != null) {\n\t\t\tmsg = mxUtils.htmlEntities(e.message);\n\t\t}\n\n\t\tthis.showError(title, msg, btn, fn, null, null, null, null, null,\n\t\t\tnull, null, null, (invokeFnOnClose) ? fn : null);\n\t}\n\telse if (fn != null) {\n\t\tfn();\n\t}\n};\n\n/**\n * Translates this point by the given vector.\n * \n * @param {number} dx X-coordinate of the translation.\n * @param {number} dy Y-coordinate of the translation.\n */\nEditorUi.prototype.showError = function (title, msg, btn, fn, retry, btn2, fn2, btn3, fn3, w, h, hide, onClose) {\n\tvar dlg = new ErrorDialog(this, title, msg, btn || mxResources.get('ok'),\n\t\tfn, retry, btn2, fn2, hide, btn3, fn3);\n\tvar lines = Math.ceil((msg != null) ? msg.length / 50 : 1);\n\tthis.showDialog(dlg.container, w || 340, h || (100 + lines * 20), true, false, onClose);\n\tdlg.init();\n};\n\n/**\n * Displays a print dialog.\n */\nEditorUi.prototype.showDialog = function (elt, w, h, modal, closable, onClose, noScroll, transparent, onResize, ignoreBgClick) {\n\tthis.editor.graph.tooltipHandler.resetTimer();\n\tthis.editor.graph.tooltipHandler.hideTooltip();\n\n\tif (this.dialogs == null) {\n\t\tthis.dialogs = [];\n\t}\n\n\tthis.dialog = new Dialog(this, elt, w, h, modal, closable, onClose, noScroll, transparent, onResize, ignoreBgClick);\n\tthis.dialogs.push(this.dialog);\n};\n\n/**\n * Displays a print dialog.\n */\nEditorUi.prototype.hideDialog = function (cancel, isEsc, matchContainer) {\n\tif (this.dialogs != null && this.dialogs.length > 0) {\n\t\tif (matchContainer != null && matchContainer != this.dialog.container.firstChild) {\n\t\t\treturn;\n\t\t}\n\n\t\tvar dlg = this.dialogs.pop();\n\n\t\tif (dlg.close(cancel, isEsc) == false) {\n\t\t\t//add the dialog back if dialog closing is cancelled\n\t\t\tthis.dialogs.push(dlg);\n\t\t\treturn;\n\t\t}\n\n\t\tthis.dialog = (this.dialogs.length > 0) ? this.dialogs[this.dialogs.length - 1] : null;\n\t\tthis.editor.fireEvent(new mxEventObject('hideDialog'));\n\n\t\tif (this.dialog == null && this.editor.graph.container != null &&\n\t\t\tthis.editor.graph.container.style.visibility != 'hidden') {\n\t\t\twindow.setTimeout(mxUtils.bind(this, function () {\n\t\t\t\tif (this.editor != null && (this.dialogs == null || this.dialogs.length == 0)) {\n\t\t\t\t\tif (this.editor.graph.isEditing() && this.editor.graph.cellEditor.textarea != null) {\n\t\t\t\t\t\tthis.editor.graph.cellEditor.textarea.focus();\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tmxUtils.clearSelection();\n\t\t\t\t\t\tthis.editor.graph.container.focus();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}), 0);\n\t\t}\n\t}\n};\n\n/**\n * Handles ctrl+enter keystroke to clone cells.\n */\nEditorUi.prototype.ctrlEnter = function () {\n\tvar graph = this.editor.graph;\n\n\tif (graph.isEnabled()) {\n\t\ttry {\n\t\t\tvar cells = graph.getSelectionCells();\n\t\t\tvar lookup = new mxDictionary();\n\t\t\tvar newCells = [];\n\n\t\t\tfor (var i = 0; i < cells.length; i++) {\n\t\t\t\t// Clones table rows instead of cells\n\t\t\t\tvar cell = (graph.isTableCell(cells[i])) ? graph.model.getParent(cells[i]) : cells[i];\n\n\t\t\t\tif (cell != null && !lookup.get(cell)) {\n\t\t\t\t\tlookup.put(cell, true);\n\t\t\t\t\tnewCells.push(cell);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tgraph.setSelectionCells(graph.duplicateCells(newCells, false));\n\t\t}\n\t\tcatch (e) {\n\t\t\tthis.handleError(e);\n\t\t}\n\t}\n};\n\n/**\n * Display a color dialog.\n */\nEditorUi.prototype.pickColor = function (color, apply) {\n\tvar graph = this.editor.graph;\n\tvar selState = graph.cellEditor.saveSelection();\n\tvar h = 230 + ((Math.ceil(ColorDialog.prototype.presetColors.length / 12) +\n\t\tMath.ceil(ColorDialog.prototype.defaultColors.length / 12)) * 17);\n\n\tvar dlg = new ColorDialog(this, mxUtils.rgba2hex(color) || 'none', function (color) {\n\t\tgraph.cellEditor.restoreSelection(selState);\n\t\tapply(color);\n\t}, function () {\n\t\tgraph.cellEditor.restoreSelection(selState);\n\t});\n\n\tthis.showDialog(dlg.container, 230, h, true, false);\n\tdlg.init();\n};\n\n/**\n * Adds the label menu items to the given menu and parent.\n */\nEditorUi.prototype.openFile = function () {\n\t// Closes dialog after open\n\twindow.openFile = new OpenFile(mxUtils.bind(this, function (cancel) {\n\t\tthis.hideDialog(cancel);\n\t}));\n\n\t// Removes openFile if dialog is closed\n\tthis.showDialog(new OpenDialog(this).container, (Editor.useLocalStorage) ? 640 : 320,\n\t\t(Editor.useLocalStorage) ? 480 : 220, true, true, function () {\n\t\twindow.openFile = null;\n\t});\n};\n\n/**\n * Extracs the graph model from the given HTML data from a data transfer event.\n */\nEditorUi.prototype.extractGraphModelFromHtml = function (data) {\n\tvar result = null;\n\n\ttry {\n\t\tvar idx = data.indexOf('&lt;mxGraphModel ');\n\n\t\tif (idx >= 0) {\n\t\t\tvar idx2 = data.lastIndexOf('&lt;/mxGraphModel&gt;');\n\n\t\t\tif (idx2 > idx) {\n\t\t\t\tresult = data.substring(idx, idx2 + 21).replace(/&gt;/g, '>').\n\t\t\t\t\treplace(/&lt;/g, '<').replace(/\\\\&quot;/g, '\"').replace(/\\n/g, '');\n\t\t\t}\n\t\t}\n\t}\n\tcatch (e) {\n\t\t// ignore\n\t}\n\n\treturn result;\n};\n\n/**\n * Opens the given files in the editor.\n */\nEditorUi.prototype.readGraphModelFromClipboard = function (fn) {\n\tthis.readGraphModelFromClipboardWithType(mxUtils.bind(this, function (xml) {\n\t\tif (xml != null) {\n\t\t\tfn(xml);\n\t\t}\n\t\telse {\n\t\t\tthis.readGraphModelFromClipboardWithType(mxUtils.bind(this, function (xml) {\n\t\t\t\tif (xml != null) {\n\t\t\t\t\tvar tmp = decodeURIComponent(xml);\n\n\t\t\t\t\tif (this.isCompatibleString(tmp)) {\n\t\t\t\t\t\txml = tmp;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tfn(xml);\n\t\t\t}), 'text');\n\t\t}\n\t}), 'html');\n};\n\n/**\n * Opens the given files in the editor.\n */\nEditorUi.prototype.readGraphModelFromClipboardWithType = function (fn, type) {\n\tnavigator.clipboard.read().then(mxUtils.bind(this, function (data) {\n\t\tif (data != null && data.length > 0 && type == 'html' &&\n\t\t\tmxUtils.indexOf(data[0].types, 'text/html') >= 0) {\n\t\t\tdata[0].getType('text/html').then(mxUtils.bind(this, function (blob) {\n\t\t\t\tblob.text().then(mxUtils.bind(this, function (value) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tvar elt = this.parseHtmlData(value);\n\t\t\t\t\t\tvar asHtml = elt.getAttribute('data-type') != 'text/plain';\n\n\t\t\t\t\t\t// KNOWN: Paste from IE11 to other browsers on Windows\n\t\t\t\t\t\t// seems to paste the contents of index.html\n\t\t\t\t\t\tvar xml = (asHtml) ? elt.innerHTML :\n\t\t\t\t\t\t\tmxUtils.trim((elt.innerText == null) ?\n\t\t\t\t\t\t\t\tmxUtils.getTextContent(elt) : elt.innerText);\n\n\t\t\t\t\t\t// Workaround for junk after XML in VM\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tvar idx = xml.lastIndexOf('%3E');\n\n\t\t\t\t\t\t\tif (idx >= 0 && idx < xml.length - 3) {\n\t\t\t\t\t\t\t\txml = xml.substring(0, idx + 3);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcatch (e) {\n\t\t\t\t\t\t\t// ignore\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Checks for embedded XML content\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tvar spans = elt.getElementsByTagName('span');\n\t\t\t\t\t\t\tvar tmp = (spans != null && spans.length > 0) ?\n\t\t\t\t\t\t\t\tmxUtils.trim(decodeURIComponent(spans[0].textContent)) :\n\t\t\t\t\t\t\t\tdecodeURIComponent(xml);\n\n\t\t\t\t\t\t\tif (this.isCompatibleString(tmp)) {\n\t\t\t\t\t\t\t\txml = tmp;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcatch (e) {\n\t\t\t\t\t\t\t// ignore\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tcatch (e) {\n\t\t\t\t\t\t// ignore\n\t\t\t\t\t}\n\n\t\t\t\t\tfn(this.isCompatibleString(xml) ? xml : null);\n\t\t\t\t}))['catch'](function (data) {\n\t\t\t\t\tfn(null);\n\t\t\t\t});\n\t\t\t}))['catch'](function (data) {\n\t\t\t\tfn(null);\n\t\t\t});\n\t\t}\n\t\telse if (data != null && data.length > 0 && type == 'text' &&\n\t\t\tmxUtils.indexOf(data[0].types, 'text/plain') >= 0) {\n\t\t\tdata[0].getType('text/plain').then(function (blob) {\n\t\t\t\tblob.text().then(function (value) {\n\t\t\t\t\tfn(value);\n\t\t\t\t})['catch'](function () {\n\t\t\t\t\tfn(null);\n\t\t\t\t});\n\t\t\t})['catch'](function () {\n\t\t\t\tfn(null);\n\t\t\t});\n\t\t}\n\t\telse {\n\t\t\tfn(null);\n\t\t}\n\t}))['catch'](function (data) {\n\t\tfn(null);\n\t});\n};\n\n/**\n * Parses the given HTML data and returns a DIV.\n */\nEditorUi.prototype.parseHtmlData = function (data) {\n\tvar elt = null;\n\n\tif (data != null && data.length > 0) {\n\t\tvar hasMeta = data.substring(0, 6) == '<meta ';\n\t\telt = document.createElement('div');\n\t\telt.innerHTML = ((hasMeta) ? '<meta charset=\"utf-8\">' : '') +\n\t\t\tGraph.sanitizeHtml(data);\n\t\tasHtml = true;\n\n\t\t// Workaround for innerText not ignoring style elements in Chrome\n\t\tvar styles = elt.getElementsByTagName('style');\n\n\t\tif (styles != null) {\n\t\t\twhile (styles.length > 0) {\n\t\t\t\tstyles[0].parentNode.removeChild(styles[0]);\n\t\t\t}\n\t\t}\n\n\t\t// Special case of link pasting from Chrome\n\t\tif (elt.firstChild != null && elt.firstChild.nodeType == mxConstants.NODETYPE_ELEMENT &&\n\t\t\telt.firstChild.nextSibling != null && elt.firstChild.nextSibling.nodeType == mxConstants.NODETYPE_ELEMENT &&\n\t\t\telt.firstChild.nodeName == 'META' && elt.firstChild.nextSibling.nodeName == 'A' &&\n\t\t\telt.firstChild.nextSibling.nextSibling == null) {\n\t\t\tvar temp = (elt.firstChild.nextSibling.innerText == null) ?\n\t\t\t\tmxUtils.getTextContent(elt.firstChild.nextSibling) :\n\t\t\t\telt.firstChild.nextSibling.innerText;\n\n\t\t\tif (temp == elt.firstChild.nextSibling.getAttribute('href')) {\n\t\t\t\tmxUtils.setTextContent(elt, temp);\n\t\t\t\tasHtml = false;\n\t\t\t}\n\t\t}\n\n\t\t// Extracts single image source address with meta tag in markup\n\t\tvar img = (hasMeta && elt.firstChild != null) ? elt.firstChild.nextSibling : elt.firstChild;\n\n\t\tif (img != null && img.nextSibling == null &&\n\t\t\timg.nodeType == mxConstants.NODETYPE_ELEMENT &&\n\t\t\timg.nodeName == 'IMG') {\n\t\t\tvar temp = img.getAttribute('src');\n\n\t\t\tif (temp != null) {\n\t\t\t\tif (Editor.isPngDataUrl(temp)) {\n\t\t\t\t\tvar xml = Editor.extractGraphModelFromPng(temp);\n\n\t\t\t\t\tif (xml != null && xml.length > 0) {\n\t\t\t\t\t\ttemp = xml;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tmxUtils.setTextContent(elt, temp);\n\t\t\t\tasHtml = false;\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\t// Extracts embedded XML or image source address from single PNG image\n\t\t\tvar images = elt.getElementsByTagName('img');\n\n\t\t\tif (images.length == 1) {\n\t\t\t\tvar img = images[0];\n\t\t\t\tvar temp = img.getAttribute('src');\n\n\t\t\t\tif (temp != null && img.parentNode == elt && elt.children.length == 1) {\n\t\t\t\t\tif (Editor.isPngDataUrl(temp)) {\n\t\t\t\t\t\tvar xml = Editor.extractGraphModelFromPng(temp);\n\n\t\t\t\t\t\tif (xml != null && xml.length > 0) {\n\t\t\t\t\t\t\ttemp = xml;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tmxUtils.setTextContent(elt, temp);\n\t\t\t\t\tasHtml = false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (asHtml) {\n\t\t\tGraph.removePasteFormatting(elt);\n\t\t}\n\t}\n\n\tif (!asHtml) {\n\t\telt.setAttribute('data-type', 'text/plain');\n\t}\n\n\treturn elt;\n};\n\n/**\n * Opens the given files in the editor.\n */\nEditorUi.prototype.extractGraphModelFromEvent = function (evt) {\n\tvar result = null;\n\tvar data = null;\n\n\tif (evt != null) {\n\t\tvar provider = (evt.dataTransfer != null) ?\n\t\t\tevt.dataTransfer : evt.clipboardData;\n\n\t\tif (provider != null) {\n\t\t\tif (document.documentMode == 10 || document.documentMode == 11) {\n\t\t\t\tdata = provider.getData('Text');\n\t\t\t}\n\t\t\telse {\n\t\t\t\tdata = (mxUtils.indexOf(provider.types, 'text/html') >= 0) ?\n\t\t\t\t\tprovider.getData('text/html') : null;\n\n\t\t\t\tif (mxUtils.indexOf(provider.types, 'text/plain') >= 0 &&\n\t\t\t\t\t(data == null || data.length == 0)) {\n\t\t\t\t\tdata = provider.getData('text/plain');\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (data != null) {\n\t\t\t\tdata = Graph.zapGremlins(mxUtils.trim(data));\n\n\t\t\t\t// Tries parsing as HTML document with embedded XML\n\t\t\t\tvar xml = this.extractGraphModelFromHtml(data);\n\n\t\t\t\tif (xml != null) {\n\t\t\t\t\tdata = xml;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tif (data != null && this.isCompatibleString(data)) {\n\t\tresult = data;\n\t}\n\n\treturn result;\n};\n\n/**\n * Hook for subclassers to return true if event data is a supported format.\n * This implementation always returns false.\n */\nEditorUi.prototype.isCompatibleString = function (data) {\n\treturn false;\n};\n\n/**\n * Adds the label menu items to the given menu and parent.\n */\nEditorUi.prototype.saveFile = function (forceDialog) {\n\tif (!forceDialog && this.editor.filename != null) {\n\t\tthis.save(this.editor.getOrCreateFilename());\n\t}\n\telse {\n\t\tvar dlg = new FilenameDialog(this, this.editor.getOrCreateFilename(), mxResources.get('save'), mxUtils.bind(this, function (name) {\n\t\t\tthis.save(name);\n\t\t}), null, mxUtils.bind(this, function (name) {\n\t\t\tif (name != null && name.length > 0) {\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\tmxUtils.confirm(mxResources.get('invalidName'));\n\n\t\t\treturn false;\n\t\t}));\n\t\tthis.showDialog(dlg.container, 300, 100, true, true);\n\t\tdlg.init();\n\t}\n};\n\n/**\n * Saves the current graph under the given filename.\n */\nEditorUi.prototype.save = function (name) {\n\tif (name != null) {\n\t\tif (this.editor.graph.isEditing()) {\n\t\t\tthis.editor.graph.stopEditing();\n\t\t}\n\n\t\tvar xml = mxUtils.getXml(this.editor.getGraphXml());\n\n\t\ttry {\n\t\t\tif (Editor.useLocalStorage) {\n\t\t\t\tif (localStorage.getItem(name) != null &&\n\t\t\t\t\t!mxUtils.confirm(mxResources.get('replaceIt', [name]))) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tlocalStorage.setItem(name, xml);\n\t\t\t\tthis.editor.setStatus(mxUtils.htmlEntities(mxResources.get('saved')) + ' ' + new Date());\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif (xml.length < MAX_REQUEST_SIZE) {\n\t\t\t\t\tnew mxXmlRequest(SAVE_URL, 'filename=' + encodeURIComponent(name) +\n\t\t\t\t\t\t'&xml=' + encodeURIComponent(xml)).simulate(document, '_blank');\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tmxUtils.alert(mxResources.get('drawingTooLarge'));\n\t\t\t\t\tmxUtils.popup(xml);\n\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tthis.editor.setModified(false);\n\t\t\tthis.editor.setFilename(name);\n\t\t\tthis.updateDocumentTitle();\n\t\t}\n\t\tcatch (e) {\n\t\t\tthis.editor.setStatus(mxUtils.htmlEntities(mxResources.get('errorSavingFile')));\n\t\t}\n\t}\n};\n\n/**\n * Executes the given array of graph layouts using executeLayout and\n * calls done after the last layout has finished.\n */\nEditorUi.prototype.executeLayouts = function (layouts, post) {\n\tthis.executeLayout(mxUtils.bind(this, function () {\n\t\tvar layout = new mxCompositeLayout(this.editor.graph, layouts);\n\t\tvar cells = this.editor.graph.getSelectionCells();\n\n\t\tlayout.execute(this.editor.graph.getDefaultParent(),\n\t\t\tcells.length == 0 ? null : cells);\n\t}), true, post);\n};\n\n/**\n * Executes the given layout.\n */\nEditorUi.prototype.executeLayout = function (exec, animate, post) {\n\tvar graph = this.editor.graph;\n\tgraph.getModel().beginUpdate();\n\ttry {\n\t\texec();\n\t}\n\tcatch (e) {\n\t\tthrow e;\n\t}\n\tfinally {\n\t\t// Animates the changes in the graph model\n\t\tif (this.allowAnimation && animate && graph.isEnabled()) {\n\t\t\t// New API for animating graph layout results asynchronously\n\t\t\tvar morph = new mxMorphing(graph);\n\t\t\tmorph.addListener(mxEvent.DONE, mxUtils.bind(this, function () {\n\t\t\t\tgraph.getModel().endUpdate();\n\n\t\t\t\tif (post != null) {\n\t\t\t\t\tpost();\n\t\t\t\t}\n\t\t\t}));\n\n\t\t\tmorph.startAnimation();\n\t\t}\n\t\telse {\n\t\t\tgraph.getModel().endUpdate();\n\n\t\t\tif (post != null) {\n\t\t\t\tpost();\n\t\t\t}\n\t\t}\n\t}\n};\n\n/**\n * Hides the current menu.\n */\nEditorUi.prototype.showImageDialog = function (title, value, fn, ignoreExisting) {\n\tvar cellEditor = this.editor.graph.cellEditor;\n\tvar selState = cellEditor.saveSelection();\n\tvar newValue = mxUtils.prompt(title, value);\n\tcellEditor.restoreSelection(selState);\n\n\tif (newValue != null && newValue.length > 0) {\n\t\tvar img = new Image();\n\n\t\timg.onload = function () {\n\t\t\tfn(newValue, img.width, img.height);\n\t\t};\n\t\timg.onerror = function () {\n\t\t\tfn(null);\n\t\t\tmxUtils.alert(mxResources.get('fileNotFound'));\n\t\t};\n\n\t\timg.src = newValue;\n\t}\n\telse {\n\t\tfn(null);\n\t}\n};\n\n/**\n * Hides the current menu.\n */\nEditorUi.prototype.showLinkDialog = function (value, btnLabel, fn) {\n\tvar dlg = new LinkDialog(this, value, btnLabel, fn);\n\tthis.showDialog(dlg.container, 420, 90, true, true);\n\tdlg.init();\n};\n\n/**\n * Hides the current menu.\n */\nEditorUi.prototype.showDataDialog = function (cell) {\n\tif (cell != null && typeof window.EditDataDialog !== 'undefined') {\n\t\tvar dlg = new EditDataDialog(this, cell);\n\t\tthis.showDialog(dlg.container, 480, 420, true, false, null, false);\n\t\tdlg.init();\n\t}\n};\n\n/**\n * Hides the current menu.\n */\nEditorUi.prototype.showBackgroundImageDialog = function (apply, img) {\n\tapply = (apply != null) ? apply : mxUtils.bind(this, function (image) {\n\t\tvar change = new ChangePageSetup(this, null, image);\n\t\tchange.ignoreColor = true;\n\n\t\tthis.editor.graph.model.execute(change);\n\t});\n\n\tvar newValue = mxUtils.prompt(mxResources.get('backgroundImage'), (img != null) ? img.src : '');\n\n\tif (newValue != null && newValue.length > 0) {\n\t\tvar img = new Image();\n\n\t\timg.onload = function () {\n\t\t\tapply(new mxImage(newValue, img.width, img.height), false);\n\t\t};\n\t\timg.onerror = function () {\n\t\t\tapply(null, true);\n\t\t\tmxUtils.alert(mxResources.get('fileNotFound'));\n\t\t};\n\n\t\timg.src = newValue;\n\t}\n\telse {\n\t\tapply(null);\n\t}\n};\n\n/**\n * Loads the stylesheet for this graph.\n */\nEditorUi.prototype.setBackgroundImage = function (image) {\n\tthis.editor.graph.setBackgroundImage(image);\n\tthis.editor.graph.view.validateBackgroundImage();\n\n\tthis.fireEvent(new mxEventObject('backgroundImageChanged'));\n};\n\n/**\n * Creates the keyboard event handler for the current graph and history.\n */\nEditorUi.prototype.confirm = function (msg, okFn, cancelFn) {\n\tif (mxUtils.confirm(msg)) {\n\t\tif (okFn != null) {\n\t\t\tokFn();\n\t\t}\n\t}\n\telse if (cancelFn != null) {\n\t\tcancelFn();\n\t}\n};\n\n/**\n * Creates the keyboard event handler for the current graph and history.\n */\nEditorUi.prototype.createOutline = function (wnd) {\n\tvar outline = new mxOutline(this.editor.graph);\n\n\tmxEvent.addListener(window, 'resize', function () {\n\t\toutline.update(false);\n\t});\n\n\treturn outline;\n};\n\n// Alt+Shift+Keycode mapping to action\nEditorUi.prototype.altShiftActions = {\n\t65: 'connectionArrows', // Alt+Shift+A\n\t82: 'clearWaypoints', // Alt+Shift+R\n\t76: 'editLink', // Alt+Shift+L\n\t79: 'connectionPoints', // Alt+Shift+O\n\t81: 'editConnectionPoints', // Alt+Shift+Q\n\t84: 'editTooltip', // Alt+Shift+T\n\t86: 'pasteSize', // Alt+Shift+V\n\t70: 'copySize', // Alt+Shift+F\n\t66: 'copyData', // Alt+Shift+B\n\t69: 'pasteData' // Alt+Shift+E\n};\n\n/**\n * Creates the keyboard event handler for the current graph and history.\n */\nEditorUi.prototype.createKeyHandler = function (editor) {\n\tvar editorUi = this;\n\tvar graph = this.editor.graph;\n\tvar keyHandler = new mxKeyHandler(graph);\n\n\tvar isEventIgnored = keyHandler.isEventIgnored;\n\tkeyHandler.isEventIgnored = function (evt) {\n\t\t// Handles undo/redo/ctrl+./,/u via action and allows ctrl+b/i\n\t\t// only if editing value is HTML (except for FF and Safari)\n\t\t// 66, 73 are keycodes for editing actions like bold, italic\n\t\treturn !(mxEvent.isShiftDown(evt) && evt.keyCode == 9) &&\n\t\t\t((!this.isControlDown(evt) || mxEvent.isShiftDown(evt) ||\n\t\t\t\t(evt.keyCode != 90 && evt.keyCode != 89 && evt.keyCode != 188 &&\n\t\t\t\t\tevt.keyCode != 190 && evt.keyCode != 85)) && ((evt.keyCode != 66 && evt.keyCode != 73) ||\n\t\t\t\t\t\t!this.isControlDown(evt) || (this.graph.cellEditor.isContentEditing() &&\n\t\t\t\t\t\t\t!mxClient.IS_FF && !mxClient.IS_SF)) &&\n\t\t\t\t((evt.keyCode != 109 && evt.keyCode != 107) ||\n\t\t\t\t\t(!this.isControlDown(evt) && !mxEvent.isShiftDown(evt)) ||\n\t\t\t\t\t(!this.graph.cellEditor.isContentEditing() &&\n\t\t\t\t\t\t!mxClient.IS_FF && !mxClient.IS_SF)) &&\n\t\t\t\tisEventIgnored.apply(this, arguments));\n\t};\n\n\t// Ignores graph enabled state but not chromeless state\n\tkeyHandler.isEnabledForEvent = function (evt) {\n\t\treturn (!mxEvent.isConsumed(evt) && this.isGraphEvent(evt) && this.isEnabled() &&\n\t\t\t(editorUi.dialogs == null || editorUi.dialogs.length == 0));\n\t};\n\n\t// Routes command-key to control-key on Mac\n\tkeyHandler.isControlDown = function (evt) {\n\t\treturn mxEvent.isControlDown(evt) || (mxClient.IS_MAC && evt.metaKey);\n\t};\n\n\tvar thread = null;\n\n\t// Helper function to move cells with the cursor keys\n\tfunction nudge(keyCode, stepSize, resize) {\n\t\tif (!graph.isSelectionEmpty() && graph.isEnabled()) {\n\t\t\tstepSize = (stepSize != null) ? stepSize : 1;\n\n\t\t\tvar cells = graph.getCompositeParents(graph.getSelectionCells());\n\t\t\tvar cell = (cells.length > 0) ? cells[0] : null;\n\n\t\t\tif (cell != null) {\n\t\t\t\tif (resize) {\n\t\t\t\t\t// Resizes all selected vertices\n\t\t\t\t\tgraph.getModel().beginUpdate();\n\t\t\t\t\ttry {\n\t\t\t\t\t\tfor (var i = 0; i < cells.length; i++) {\n\t\t\t\t\t\t\tif (graph.getModel().isVertex(cells[i]) && graph.isCellResizable(cells[i])) {\n\t\t\t\t\t\t\t\tvar geo = graph.getCellGeometry(cells[i]);\n\n\t\t\t\t\t\t\t\tif (geo != null) {\n\t\t\t\t\t\t\t\t\tgeo = geo.clone();\n\n\t\t\t\t\t\t\t\t\tif (keyCode == 37) {\n\t\t\t\t\t\t\t\t\t\tgeo.width = Math.max(0, geo.width - stepSize);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\telse if (keyCode == 38) {\n\t\t\t\t\t\t\t\t\t\tgeo.height = Math.max(0, geo.height - stepSize);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\telse if (keyCode == 39) {\n\t\t\t\t\t\t\t\t\t\tgeo.width += stepSize;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\telse if (keyCode == 40) {\n\t\t\t\t\t\t\t\t\t\tgeo.height += stepSize;\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\tgraph.getModel().setGeometry(cells[i], geo);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tfinally {\n\t\t\t\t\t\tgraph.getModel().endUpdate();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t// Moves vertices up/down in a stack layout\n\t\t\t\t\tvar parent = graph.model.getParent(cell);\n\t\t\t\t\tvar scale = graph.getView().scale;\n\t\t\t\t\tvar layout = null;\n\n\t\t\t\t\tif (graph.getSelectionCount() == 1 && graph.model.isVertex(cell) &&\n\t\t\t\t\t\tgraph.layoutManager != null && !graph.isCellLocked(cell)) {\n\t\t\t\t\t\tlayout = graph.layoutManager.getLayout(parent);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (layout != null && layout.constructor == mxStackLayout) {\n\t\t\t\t\t\tvar index = parent.getIndex(cell);\n\n\t\t\t\t\t\tif (keyCode == 37 || keyCode == 38) {\n\t\t\t\t\t\t\tgraph.model.add(parent, cell, Math.max(0, index - 1));\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if (keyCode == 39 || keyCode == 40) {\n\t\t\t\t\t\t\tgraph.model.add(parent, cell, Math.min(graph.model.getChildCount(parent), index + 1));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tvar handler = graph.graphHandler;\n\n\t\t\t\t\t\tif (handler != null) {\n\t\t\t\t\t\t\tif (handler.first == null) {\n\t\t\t\t\t\t\t\thandler.start(cell, 0, 0, graph.getMovableCells(cells));\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif (handler.first != null) {\n\t\t\t\t\t\t\t\tvar dx = 0;\n\t\t\t\t\t\t\t\tvar dy = 0;\n\n\t\t\t\t\t\t\t\tif (keyCode == 37) {\n\t\t\t\t\t\t\t\t\tdx = -stepSize;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse if (keyCode == 38) {\n\t\t\t\t\t\t\t\t\tdy = -stepSize;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse if (keyCode == 39) {\n\t\t\t\t\t\t\t\t\tdx = stepSize;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse if (keyCode == 40) {\n\t\t\t\t\t\t\t\t\tdy = stepSize;\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\thandler.currentDx += dx * scale;\n\t\t\t\t\t\t\t\thandler.currentDy += dy * scale;\n\t\t\t\t\t\t\t\thandler.checkPreview();\n\t\t\t\t\t\t\t\thandler.updatePreview();\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// Groups move steps in undoable change\n\t\t\t\t\t\t\tif (thread != null) {\n\t\t\t\t\t\t\t\twindow.clearTimeout(thread);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tthread = window.setTimeout(function () {\n\t\t\t\t\t\t\t\tif (handler.first != null) {\n\t\t\t\t\t\t\t\t\tvar dx = handler.roundLength(handler.currentDx / scale);\n\t\t\t\t\t\t\t\t\tvar dy = handler.roundLength(handler.currentDy / scale);\n\t\t\t\t\t\t\t\t\thandler.moveCells(handler.cells, dx, dy);\n\t\t\t\t\t\t\t\t\thandler.reset();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}, 400);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t};\n\n\t// Overridden to handle special alt+shift+cursor keyboard shortcuts\n\tvar directions = {\n\t\t37: mxConstants.DIRECTION_WEST, 38: mxConstants.DIRECTION_NORTH,\n\t\t39: mxConstants.DIRECTION_EAST, 40: mxConstants.DIRECTION_SOUTH\n\t};\n\tvar keyHandlerGetFunction = keyHandler.getFunction;\n\n\tmxKeyHandler.prototype.getFunction = function (evt) {\n\t\tif (graph.isEnabled()) {\n\t\t\t// TODO: Add alt modifier state in core API, here are some specific cases\n\t\t\tif (mxEvent.isShiftDown(evt) && mxEvent.isAltDown(evt)) {\n\t\t\t\tvar action = editorUi.actions.get(editorUi.altShiftActions[evt.keyCode]);\n\n\t\t\t\tif (action != null) {\n\t\t\t\t\treturn action.funct;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (directions[evt.keyCode] != null && !graph.isSelectionEmpty()) {\n\t\t\t\t// On macOS, Control+Cursor is used by Expose so allow for Alt+Control to resize\n\t\t\t\tif (!this.isControlDown(evt) && mxEvent.isShiftDown(evt) && mxEvent.isAltDown(evt)) {\n\t\t\t\t\tif (graph.model.isVertex(graph.getSelectionCell())) {\n\t\t\t\t\t\treturn function () {\n\t\t\t\t\t\t\tvar cells = graph.connectVertex(graph.getSelectionCell(), directions[evt.keyCode],\n\t\t\t\t\t\t\t\tgraph.defaultEdgeLength, evt, true);\n\n\t\t\t\t\t\t\tif (cells != null && cells.length > 0) {\n\t\t\t\t\t\t\t\tif (cells.length == 1 && graph.model.isEdge(cells[0])) {\n\t\t\t\t\t\t\t\t\tgraph.setSelectionCell(graph.model.getTerminal(cells[0], false));\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\tgraph.setSelectionCell(cells[cells.length - 1]);\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tgraph.scrollCellToVisible(graph.getSelectionCell());\n\n\t\t\t\t\t\t\t\tif (editorUi.hoverIcons != null) {\n\t\t\t\t\t\t\t\t\teditorUi.hoverIcons.update(graph.view.getState(graph.getSelectionCell()));\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t};\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t// Avoids consuming event if no vertex is selected by returning null below\n\t\t\t\t\t// Cursor keys move and resize (ctrl) cells\n\t\t\t\t\tif (this.isControlDown(evt)) {\n\t\t\t\t\t\treturn function () {\n\t\t\t\t\t\t\tnudge(evt.keyCode, (mxEvent.isShiftDown(evt)) ? graph.gridSize : null, true);\n\t\t\t\t\t\t};\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\treturn function () {\n\t\t\t\t\t\t\tnudge(evt.keyCode, (mxEvent.isShiftDown(evt)) ? graph.gridSize : null);\n\t\t\t\t\t\t};\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn keyHandlerGetFunction.apply(this, arguments);\n\t};\n\n\t// Binds keystrokes to actions\n\tkeyHandler.bindAction = mxUtils.bind(this, function (code, control, key, shift) {\n\t\tvar action = this.actions.get(key);\n\n\t\tif (action != null) {\n\t\t\tvar f = function () {\n\t\t\t\tif (action.isEnabled()) {\n\t\t\t\t\taction.funct.apply(this, arguments);\n\t\t\t\t}\n\t\t\t};\n\n\t\t\tif (control) {\n\t\t\t\tif (shift) {\n\t\t\t\t\tkeyHandler.bindControlShiftKey(code, f);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tkeyHandler.bindControlKey(code, f);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif (shift) {\n\t\t\t\t\tkeyHandler.bindShiftKey(code, f);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tkeyHandler.bindKey(code, f);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t});\n\n\tvar ui = this;\n\tvar keyHandlerEscape = keyHandler.escape;\n\tkeyHandler.escape = function (evt) {\n\t\tkeyHandlerEscape.apply(this, arguments);\n\t};\n\n\t// Ignores enter keystroke. Remove this line if you want the\n\t// enter keystroke to stop editing. N, W, T are reserved.\n\tkeyHandler.enter = function () { };\n\n\tkeyHandler.bindControlShiftKey(36, function () { graph.exitGroup(); }); // Ctrl+Shift+Home\n\tkeyHandler.bindControlShiftKey(35, function () { graph.enterGroup(); }); // Ctrl+Shift+End\n\tkeyHandler.bindShiftKey(36, function () { graph.home(); }); // Ctrl+Shift+Home\n\tkeyHandler.bindKey(35, function () { graph.refresh(); }); // End\n\tkeyHandler.bindAction(107, true, 'zoomIn'); // Ctrl+Plus\n\tkeyHandler.bindAction(109, true, 'zoomOut'); // Ctrl+Minus\n\tkeyHandler.bindAction(80, true, 'print'); // Ctrl+P\n\n\tif (!this.editor.chromeless || this.editor.editable) {\n\t\tkeyHandler.bindAction(79, true, 'outline', true); // Ctrl+Shift+O\n\t\tkeyHandler.bindControlKey(36, function () { if (graph.isEnabled()) { graph.foldCells(true); } }); // Ctrl+Home\n\t\tkeyHandler.bindControlKey(35, function () { if (graph.isEnabled()) { graph.foldCells(false); } }); // Ctrl+End\n\t\tkeyHandler.bindControlKey(13, function () { ui.ctrlEnter(); }); // Ctrl+Enter\n\t\tkeyHandler.bindAction(8, false, 'delete'); // Backspace\n\t\tkeyHandler.bindAction(8, true, 'deleteAll'); // Ctrl+Backspace\n\t\tkeyHandler.bindAction(8, false, 'deleteLabels', true); // Shift+Backspace\n\t\tkeyHandler.bindAction(46, false, 'delete'); // Delete\n\t\tkeyHandler.bindAction(46, true, 'deleteAll'); // Ctrl+Delete\n\t\tkeyHandler.bindAction(46, false, 'deleteLabels', true); // Shift+Delete\n\t\tkeyHandler.bindAction(36, false, 'resetView'); // Home\n\t\tkeyHandler.bindAction(72, true, 'fitWindow', true); // Ctrl+Shift+H\n\t\tkeyHandler.bindAction(74, true, 'fitPage'); // Ctrl+J\n\t\tkeyHandler.bindAction(74, true, 'fitTwoPages', true); // Ctrl+Shift+J\n\t\tkeyHandler.bindAction(48, true, 'customZoom'); // Ctrl+0\n\t\tkeyHandler.bindAction(82, true, 'turn'); // Ctrl+R\n\t\tkeyHandler.bindAction(82, true, 'clearDefaultStyle', true); // Ctrl+Shift+R\n\t\tkeyHandler.bindAction(83, true, 'save'); // Ctrl+S\n\t\tkeyHandler.bindAction(83, true, 'saveAs', true); // Ctrl+Shift+S\n\t\tkeyHandler.bindAction(65, true, 'selectAll'); // Ctrl+A\n\t\tkeyHandler.bindAction(65, true, 'selectNone', true); // Ctrl+A\n\t\tkeyHandler.bindAction(73, true, 'selectVertices', true); // Ctrl+Shift+I\n\t\tkeyHandler.bindAction(69, true, 'selectEdges', true); // Ctrl+Shift+E\n\t\tkeyHandler.bindAction(69, true, 'editStyle'); // Ctrl+E\n\t\tkeyHandler.bindAction(66, true, 'bold'); // Ctrl+B\n\t\tkeyHandler.bindAction(66, true, 'toBack', true); // Ctrl+Shift+B\n\t\tkeyHandler.bindAction(70, true, 'toFront', true); // Ctrl+Shift+F\n\t\tkeyHandler.bindAction(68, true, 'duplicate'); // Ctrl+D\n\t\tkeyHandler.bindAction(68, true, 'setAsDefaultStyle', true); // Ctrl+Shift+D   \n\t\tkeyHandler.bindAction(90, true, 'undo'); // Ctrl+Z\n\t\tkeyHandler.bindAction(89, true, 'autosize', true); // Ctrl+Shift+Y\n\t\tkeyHandler.bindAction(88, true, 'cut'); // Ctrl+X\n\t\tkeyHandler.bindAction(67, true, 'copy'); // Ctrl+C\n\t\tkeyHandler.bindAction(86, true, 'paste'); // Ctrl+V\n\t\tkeyHandler.bindAction(71, true, 'group'); // Ctrl+G\n\t\tkeyHandler.bindAction(77, true, 'editData'); // Ctrl+M\n\t\tkeyHandler.bindAction(71, true, 'grid', true); // Ctrl+Shift+G\n\t\tkeyHandler.bindAction(73, true, 'italic'); // Ctrl+I\n\t\tkeyHandler.bindAction(76, true, 'lockUnlock'); // Ctrl+L\n\t\tkeyHandler.bindAction(76, true, 'layers', true); // Ctrl+Shift+L\n\t\tkeyHandler.bindAction(80, true, 'format', true); // Ctrl+Shift+P\n\t\tkeyHandler.bindAction(85, true, 'underline'); // Ctrl+U\n\t\tkeyHandler.bindAction(85, true, 'ungroup', true); // Ctrl+Shift+U\n\t\tkeyHandler.bindAction(109, true, 'decreaseFontSize', true); // Ctrl+Shift+Minus\n\t\tkeyHandler.bindAction(107, true, 'increaseFontSize', true); // Ctrl+Shift+Plus\n\t\tkeyHandler.bindAction(219, true, 'decreaseFontSize', true); // Ctrl+{\n\t\tkeyHandler.bindAction(221, true, 'increaseFontSize', true); // Ctrl+}\n\t\tkeyHandler.bindAction(190, true, 'superscript'); // Ctrl+.\n\t\tkeyHandler.bindAction(188, true, 'subscript'); // Ctrl+,\n\t\tkeyHandler.bindAction(13, false, 'keyPressEnter'); // Enter\n\t\tkeyHandler.bindKey(113, function () { if (graph.isEnabled()) { graph.startEditingAtCell(); } }); // F2\n\t}\n\n\tif (!mxClient.IS_WIN) {\n\t\tkeyHandler.bindAction(90, true, 'redo', true); // Ctrl+Shift+Z\n\t}\n\telse {\n\t\tkeyHandler.bindAction(89, true, 'redo'); // Ctrl+Y\n\t}\n\n\treturn keyHandler;\n};\n\n/**\n * Creates the keyboard event handler for the current graph and history.\n */\nEditorUi.prototype.destroy = function () {\n\tvar graph = this.editor.graph;\n\n\tif (graph != null && this.selectionStateListener != null) {\n\t\tgraph.getSelectionModel().removeListener(mxEvent.CHANGE, this.selectionStateListener);\n\t\tgraph.getModel().removeListener(mxEvent.CHANGE, this.selectionStateListener);\n\t\tgraph.removeListener(mxEvent.EDITING_STARTED, this.selectionStateListener);\n\t\tgraph.removeListener(mxEvent.EDITING_STOPPED, this.selectionStateListener);\n\t\tgraph.getView().removeListener('unitChanged', this.selectionStateListener);\n\t\tthis.selectionStateListener = null;\n\t}\n\n\tif (this.editor != null) {\n\t\tthis.editor.destroy();\n\t\tthis.editor = null;\n\t}\n\n\tif (this.menubar != null) {\n\t\tthis.menubar.destroy();\n\t\tthis.menubar = null;\n\t}\n\n\tif (this.toolbar != null) {\n\t\tthis.toolbar.destroy();\n\t\tthis.toolbar = null;\n\t}\n\n\tif (this.sidebar != null) {\n\t\tthis.sidebar.destroy();\n\t\tthis.sidebar = null;\n\t}\n\n\tif (this.keyHandler != null) {\n\t\tthis.keyHandler.destroy();\n\t\tthis.keyHandler = null;\n\t}\n\n\tif (this.keydownHandler != null) {\n\t\tmxEvent.removeListener(document, 'keydown', this.keydownHandler);\n\t\tthis.keydownHandler = null;\n\t}\n\n\tif (this.keyupHandler != null) {\n\t\tmxEvent.removeListener(document, 'keyup', this.keyupHandler);\n\t\tthis.keyupHandler = null;\n\t}\n\n\tif (this.resizeHandler != null) {\n\t\tmxEvent.removeListener(window, 'resize', this.resizeHandler);\n\t\tthis.resizeHandler = null;\n\t}\n\n\tif (this.gestureHandler != null) {\n\t\tmxEvent.removeGestureListeners(document, this.gestureHandler);\n\t\tthis.gestureHandler = null;\n\t}\n\n\tif (this.orientationChangeHandler != null) {\n\t\tmxEvent.removeListener(window, 'orientationchange', this.orientationChangeHandler);\n\t\tthis.orientationChangeHandler = null;\n\t}\n\n\tif (this.scrollHandler != null) {\n\t\tmxEvent.removeListener(window, 'scroll', this.scrollHandler);\n\t\tthis.scrollHandler = null;\n\t}\n\n\tif (this.destroyFunctions != null) {\n\t\tfor (var i = 0; i < this.destroyFunctions.length; i++) {\n\t\t\tthis.destroyFunctions[i]();\n\t\t}\n\n\t\tthis.destroyFunctions = null;\n\t}\n\n\tvar c = [this.menubarContainer, this.toolbarContainer, this.sidebarContainer,\n\tthis.formatContainer, this.diagramContainer, this.footerContainer,\n\tthis.chromelessToolbar, this.hsplit, this.layersDialog];\n\n\tfor (var i = 0; i < c.length; i++) {\n\t\tif (c[i] != null && c[i].parentNode != null) {\n\t\t\tc[i].parentNode.removeChild(c[i]);\n\t\t}\n\t}\n};\n\nEditorUi.prototype.exportImage = function (scale, transparentBackground, ignoreSelection, addShadow, editable, border, noCrop, format, exportHandler) {\n\tformat = (format != null) ? format : 'png';\n\n\tvar selectionEmpty = this.editor.graph.isSelectionEmpty();\n\tignoreSelection = (ignoreSelection != null) ? ignoreSelection : selectionEmpty;\n\n\t// Caches images\n\tif (this.thumbImageCache == null) {\n\t\tthis.thumbImageCache = new Object();\n\t}\n\n\ttry {\n\t\tthis.exportToCanvas(mxUtils.bind(this, function (canvas) {\n\n\t\t\ttry {\n\t\t\t\tthis.saveCanvas(canvas, (editable) ? this.getFileData(true, null,\n\t\t\t\t\tnull, null, ignoreSelection) : null, format, exportHandler);\n\t\t\t}\n\t\t\tcatch (e) {\n\t\t\t\tthis.handleError(e);\n\t\t\t}\n\t\t}), null, this.thumbImageCache, null, mxUtils.bind(this, function (e) {\n\t\t\tthis.handleError(e);\n\t\t}), null, ignoreSelection, scale || 1, transparentBackground,\n\t\t\taddShadow, null, null, border, noCrop);\n\t}\n\tcatch (e) {\n\t\tthis.handleError(e);\n\t}\n};\n\nEditorUi.prototype.handleError = function (error) {\n\tthrow error;\n}\n\n/**\n *\n */\nEditorUi.prototype.exportToCanvas = function (callback, width, imageCache, background, error, limitHeight,\n\tignoreSelection, scale, transparentBackground, addShadow, converter, graph, border, noCrop) {\n\tlimitHeight = (limitHeight != null) ? limitHeight : true;\n\tignoreSelection = (ignoreSelection != null) ? ignoreSelection : true;\n\tgraph = (graph != null) ? graph : this.editor.graph;\n\tborder = (border != null) ? border : 0;\n\n\tthis.convertImages(graph.getSvg(null, null, null),\n\t\tmxUtils.bind(this, function (svgRoot) {\n\t\t\tvar img = new Image();\n\n\n\t\t\timg.onload = mxUtils.bind(this, function () {\n\t\t\t\ttry {\n\t\t\t\t\tvar canvas = document.createElement('canvas');\n\t\t\t\t\tvar w = parseInt(svgRoot.getAttribute('width'));\n\t\t\t\t\tvar h = parseInt(svgRoot.getAttribute('height'));\n\t\t\t\t\tscale = (scale != null) ? scale : 1;\n\n\t\t\t\t\tif (width != null) {\n\t\t\t\t\t\tscale = (!limitHeight) ? width / w : Math.min(1, Math.min((width * 3) / (h * 4), width / w));\n\t\t\t\t\t}\n\n\t\t\t\t\tw = Math.ceil(scale * w) + 2 * border;\n\t\t\t\t\th = Math.ceil(scale * h) + 2 * border;\n\n\t\t\t\t\tcanvas.setAttribute('width', w);\n\t\t\t\t\tcanvas.setAttribute('height', h);\n\t\t\t\t\tvar ctx = canvas.getContext('2d');\n\n\t\t\t\t\tctx.scale(scale, scale);\n\n\t\t\t\t\t// Workaround for broken data URI images in Safari on first export\n\t\t\t\t\tif (mxClient.IS_SF) {\n\t\t\t\t\t\twindow.setTimeout(function () {\n\t\t\t\t\t\t\tctx.drawImage(img, border / scale, border / scale);\n\t\t\t\t\t\t\tcallback(canvas);\n\t\t\t\t\t\t}, 0);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tctx.drawImage(img, border / scale, border / scale);\n\t\t\t\t\t\tcallback(canvas);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcatch (e) {\n\t\t\t\t\tthis.handleError(e);\n\t\t\t\t}\n\t\t\t});\n\n\t\t\timg.onerror = function (e) {\n\t\t\t\tthis.handleError(e);\n\t\t\t};\n\n\t\t\ttry {\n\t\t\t\tif (addShadow) {\n\t\t\t\t\tthis.editor.graph.addSvgShadow(svgRoot);\n\t\t\t\t}\n\n\t\t\t\tvar done = mxUtils.bind(this, function () {\n\t\t\t\t\tif (this.editor.resolvedFontCss != null) {\n\t\t\t\t\t\tvar st = document.createElement('style');\n\t\t\t\t\t\tst.setAttribute('type', 'text/css');\n\t\t\t\t\t\tst.innerHTML = this.editor.resolvedFontCss;\n\n\t\t\t\t\t\t// Must be in defs section for FF to work\n\t\t\t\t\t\tvar defs = svgRoot.getElementsByTagName('defs');\n\t\t\t\t\t\tdefs[0].appendChild(st);\n\t\t\t\t\t}\n\t\t\t\t\timg.src = this.createSvgDataUri(mxUtils.getXml(svgRoot));\n\t\t\t\t});\n\n\t\t\t\tthis.loadFonts(done);\n\t\t\t}\n\t\t\tcatch (e) {\n\t\t\t\t//console.log('src', e, img.src);\n\t\t\t\tthis.handleError(e);\n\t\t\t}\n\t\t}), imageCache, converter);\n};\n\n/**\n * Converts all images in the SVG output to data URIs for immediate rendering\n */\nEditorUi.prototype.convertImages = function (svgRoot, callback, imageCache, converter) {\n\t// Converts images to data URLs for immediate painting\n\tif (converter == null) {\n\t\tconverter = this.createImageUrlConverter();\n\t}\n\n\t// Barrier for asynchronous image loading\n\tvar counter = 0;\n\n\tfunction inc() {\n\t\tcounter++;\n\t};\n\n\tfunction dec() {\n\t\tcounter--;\n\n\t\tif (counter == 0) {\n\t\t\tcallback(svgRoot);\n\t\t}\n\t};\n\n\tvar cache = imageCache || new Object();\n\n\tvar convertImages = mxUtils.bind(this, function (tagName, srcAttr) {\n\t\tvar images = svgRoot.getElementsByTagName(tagName);\n\n\t\tfor (var i = 0; i < images.length; i++) {\n\t\t\t(mxUtils.bind(this, function (img) {\n\t\t\t\tvar src = converter.convert(img.getAttribute(srcAttr));\n\t\t\t\tconsole.log(src)\n\t\t\t\t// Data URIs are pass-through\n\t\t\t\tif (src != null && src.substring(0, 5) != 'data:') {\n\t\t\t\t\tvar tmp = cache[src];\n\n\t\t\t\t\tif (tmp == null) {\n\t\t\t\t\t\tinc();\n\n\t\t\t\t\t\tthis.convertImageToDataUri(src, function (uri) {\n\t\t\t\t\t\t\tif (uri != null) {\n\t\t\t\t\t\t\t\tcache[src] = uri;\n\t\t\t\t\t\t\t\timg.setAttribute(srcAttr, uri);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tdec();\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\timg.setAttribute(srcAttr, tmp);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if (src != null) {\n\t\t\t\t\timg.setAttribute(srcAttr, src);\n\t\t\t\t}\n\t\t\t}))(images[i]);\n\t\t}\n\t});\n\n\t// Converts all known image tags in output\n\t// LATER: Add support for images in CSS\n\tconvertImages('image', 'xlink:href');\n\tconvertImages('img', 'src');\n\n\t// All from cache or no images\n\tif (counter == 0) {\n\t\tcallback(svgRoot);\n\t}\n};\n\n/**\n * Converts all images in the SVG output to data URIs for immediate rendering\n */\nEditorUi.prototype.createImageUrlConverter = function () {\n\tvar converter = new mxUrlConverter();\n\tconverter.updateBaseUrl();\n\n\t// Extends convert to avoid CORS using an image proxy server where needed\n\tvar convert = converter.convert;\n\tvar self = this;\n\n\tconverter.convert = function (src) {\n\t\t// if (src != null)\n\t\t// {\n\t\t// \tvar remote = src.substring(0, 7) == 'http://' || src.substring(0, 8) == 'https://';\n\n\t\t// \tif (remote && !navigator.onLine)\n\t\t// \t{\n\t\t// \t\tsrc = self.svgBrokenImage.src;\n\t\t// \t}\n\t\t// \telse if (remote && src.substring(0, converter.baseUrl.length) != converter.baseUrl &&\n\t\t// \t\t\t(!self.crossOriginImages || !self.isCorsEnabledForUrl(src)))\n\t\t// \t{\n\t\t// \t\tsrc = PROXY_URL + '?url=' + encodeURIComponent(src);\n\t\t// \t}\n\t\t// \telse if (src.substring(0, 19) != 'chrome-extension://')\n\t\t// \t{\n\t\t// \t\tsrc = convert.apply(this, arguments);\n\t\t// \t}\n\t\t// }\n\n\t\treturn src;\n\t};\n\n\treturn converter;\n};\n\n/**\n * For the fontCSS to be applied when rendering images on canvas, the actual\n * font data must be made available via a data URI encoding of the file.\n */\nEditorUi.prototype.loadFonts = function (then) {\n\tif (this.editor.fontCss != null && this.editor.resolvedFontCss == null) {\n\t\tvar parts = this.editor.fontCss.split('url(');\n\t\tvar waiting = 0;\n\t\tvar fonts = {};\n\n\t\t// Strips leading and trailing quotes and spaces\n\t\tfunction trimString(str) {\n\t\t\treturn str.replace(new RegExp(\"^[\\\\s\\\"']+\", \"g\"), \"\").replace(new RegExp(\"[\\\\s\\\"']+$\", \"g\"), \"\");\n\t\t};\n\n\t\tvar finish = mxUtils.bind(this, function () {\n\t\t\tif (waiting == 0) {\n\t\t\t\t// Constructs string\n\t\t\t\tvar result = [parts[0]];\n\n\t\t\t\tfor (var j = 1; j < parts.length; j++) {\n\t\t\t\t\tvar idx = parts[j].indexOf(')');\n\t\t\t\t\tresult.push('url(\"');\n\t\t\t\t\tresult.push(fonts[trimString(parts[j].substring(0, idx))]);\n\t\t\t\t\tresult.push('\"' + parts[j].substring(idx));\n\t\t\t\t}\n\n\t\t\t\tthis.editor.resolvedFontCss = result.join('');\n\t\t\t\tthen();\n\t\t\t}\n\t\t});\n\n\t\tif (parts.length > 0) {\n\t\t\tfor (var i = 1; i < parts.length; i++) {\n\t\t\t\tvar idx = parts[i].indexOf(')');\n\t\t\t\tvar format = null;\n\n\t\t\t\t// Checks if there is a format directive\n\t\t\t\tvar fmtIdx = parts[i].indexOf('format(', idx);\n\n\t\t\t\tif (fmtIdx > 0) {\n\t\t\t\t\tformat = trimString(parts[i].substring(fmtIdx + 7, parts[i].indexOf(')', fmtIdx)));\n\t\t\t\t}\n\n\t\t\t\t(mxUtils.bind(this, function (url) {\n\t\t\t\t\tif (fonts[url] == null) {\n\t\t\t\t\t\t// Mark font es being fetched and fetch it\n\t\t\t\t\t\tfonts[url] = url;\n\t\t\t\t\t\twaiting++;\n\n\t\t\t\t\t\tvar mime = 'application/x-font-ttf';\n\n\t\t\t\t\t\t// See https://stackoverflow.com/questions/2871655/proper-mime-type-for-fonts\n\t\t\t\t\t\tif (format == 'svg' || /(\\.svg)($|\\?)/i.test(url)) {\n\t\t\t\t\t\t\tmime = 'image/svg+xml';\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if (format == 'otf' || format == 'embedded-opentype' || /(\\.otf)($|\\?)/i.test(url)) {\n\t\t\t\t\t\t\tmime = 'application/x-font-opentype';\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if (format == 'woff' || /(\\.woff)($|\\?)/i.test(url)) {\n\t\t\t\t\t\t\tmime = 'application/font-woff';\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if (format == 'woff2' || /(\\.woff2)($|\\?)/i.test(url)) {\n\t\t\t\t\t\t\tmime = 'application/font-woff2';\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if (format == 'eot' || /(\\.eot)($|\\?)/i.test(url)) {\n\t\t\t\t\t\t\tmime = 'application/vnd.ms-fontobject';\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if (format == 'sfnt' || /(\\.sfnt)($|\\?)/i.test(url)) {\n\t\t\t\t\t\t\tmime = 'application/font-sfnt';\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tvar realUrl = url;\n\n\t\t\t\t\t\tif ((/^https?:\\/\\//.test(realUrl)) && !this.isCorsEnabledForUrl(realUrl)) {\n\t\t\t\t\t\t\trealUrl = PROXY_URL + '?url=' + encodeURIComponent(url);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// LATER: Remove cache-control header\n\t\t\t\t\t\tthis.loadUrl(realUrl, mxUtils.bind(this, function (uri) {\n\t\t\t\t\t\t\tfonts[url] = uri;\n\t\t\t\t\t\t\twaiting--;\n\t\t\t\t\t\t\tfinish();\n\t\t\t\t\t\t}), mxUtils.bind(this, function (err) {\n\t\t\t\t\t\t\t// LATER: handle error\n\t\t\t\t\t\t\twaiting--;\n\t\t\t\t\t\t\tfinish();\n\t\t\t\t\t\t}), true, null, 'data:' + mime + ';charset=utf-8;base64,');\n\t\t\t\t\t}\n\t\t\t\t}))(trimString(parts[i].substring(0, idx)), format);\n\t\t\t}\n\t\t}\n\t}\n\telse {\n\t\tthen();\n\t}\n};\n\n/**\n * Translates this point by the given vector.\n * \n * @param {number} dx X-coordinate of the translation.\n * @param {number} dy Y-coordinate of the translation.\n */\nEditorUi.prototype.createSvgDataUri = function (svg) {\n\treturn 'data:image/svg+xml;base64,' + btoa(unescape(encodeURIComponent(svg)));\n};\n\n/**\n * Translates this point by the given vector.\n * \n * @param {number} dx X-coordinate of the translation.\n * @param {number} dy Y-coordinate of the translation.\n */\nEditorUi.prototype.getFileData = function (forceXml, forceSvg, forceHtml, embeddedCallback, ignoreSelection, currentPage, node, compact, file) {\n\tignoreSelection = (ignoreSelection != null) ? ignoreSelection : true;\n\tcurrentPage = (currentPage != null) ? currentPage : false;\n\n\tnode = this.editor.getGraphXml(ignoreSelection);\n\tvar graph = this.editor.graph;\n\n\n\tvar result = this.createFileData(node, graph, file, window.location.href,\n\t\tforceXml, forceSvg, forceHtml, embeddedCallback, ignoreSelection, compact);\n\n\t// Removes temporary graph from DOM\n\tif (graph != this.editor.graph) {\n\t\tgraph.container.parentNode.removeChild(graph.container);\n\t}\n\n\treturn result;\n};\n\n/**\n * Translates this point by the given vector.\n * \n * @param {number} dx X-coordinate of the translation.\n * @param {number} dy Y-coordinate of the translation.\n */\nEditorUi.prototype.createFileData = function (node, graph, file, url, forceXml, forceSvg, forceHtml, embeddedCallback, ignoreSelection, compact) {\n\tgraph = (graph != null) ? graph : this.editor.graph;\n\tforceXml = (forceXml != null) ? forceXml : false;\n\tignoreSelection = (ignoreSelection != null) ? ignoreSelection : true;\n\n\tvar editLink = null;\n\tvar redirect = null;\n\n\tif (file == null || file.getMode() == App.MODE_DEVICE || file.getMode() == App.MODE_BROWSER) {\n\t\teditLink = '_blank';\n\t}\n\telse {\n\t\teditLink = url;\n\t\tredirect = editLink;\n\t}\n\n\tif (node == null) {\n\t\treturn '';\n\t}\n\telse {\n\t\tvar fileNode = node;\n\n\t\t// Ignores case for possible HTML or XML nodes\n\t\tif (fileNode.nodeName.toLowerCase() != 'mxfile') {\n\t\t\t// Removes control chars in input for correct roundtrip check\n\t\t\tvar text = graph.zapGremlins(mxUtils.getXml(node));\n\t\t\tvar data = graph.compress(text);\n\n\t\t\t// Fallback to plain XML for invalid compression\n\t\t\t// TODO: Remove this fallback with active pages\n\t\t\tif (graph.decompress(data) != text) {\n\t\t\t\treturn text;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tvar diagramNode = node.ownerDocument.createElement('diagram');\n\t\t\t\tdiagramNode.setAttribute('id', 'tapd-' + Editor.guid());\n\t\t\t\tmxUtils.setTextContent(diagramNode, data);\n\n\t\t\t\tfileNode = node.ownerDocument.createElement('mxfile');\n\t\t\t\tfileNode.appendChild(diagramNode);\n\t\t\t}\n\t\t}\n\n\t\tif (!compact) {\n\t\t\t// Removes old metadata\n\t\t\tfileNode.removeAttribute('userAgent');\n\t\t\tfileNode.removeAttribute('version');\n\t\t\tfileNode.removeAttribute('editor');\n\t\t\tfileNode.removeAttribute('type');\n\n\t\t\t// Adds new metadata\n\t\t\tfileNode.setAttribute('modified', new Date().toISOString());\n\t\t\tfileNode.setAttribute('host', window.location.hostname);\n\t\t\tfileNode.setAttribute('agent', navigator.userAgent);\n\t\t\tfileNode.setAttribute('version', EditorUi.VERSION);\n\t\t\tfileNode.setAttribute('etag', 'tapd-' + Editor.guid());\n\n\t\t\tvar md = (file != null) ? file.getMode() : this.mode;\n\n\t\t\tif (md != null) {\n\t\t\t\tfileNode.setAttribute('type', md);\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tfileNode = fileNode.cloneNode(true);\n\t\t\tfileNode.removeAttribute('userAgent');\n\t\t\tfileNode.removeAttribute('version');\n\t\t\tfileNode.removeAttribute('editor');\n\t\t\tfileNode.removeAttribute('type');\n\t\t}\n\n\t\tvar xml = mxUtils.getXml(fileNode);\n\n\t\treturn xml;\n\t}\n};\n\n/**\n * \n */\nEditorUi.prototype.saveCanvas = function (canvas, xml, format, exportHandler) {\n\tvar ext = ((format == 'jpeg') ? 'jpg' : format);\n\tvar filename = this.getBaseFilename() + '.' + ext;\n\tvar data = this.createImageDataUri(canvas, xml, format);\n\n\tif (exportHandler && typeof exportHandler === 'function') {\n\t\texportHandler(data, filename);\n\t} else {\n\t\tthis.doDownloadFile(data.substring(data.lastIndexOf(',') + 1), filename, 'image/' + format, true, format);\n\t}\n\n};\n\n\nEditorUi.prototype.getBaseFilename = function () {\n\treturn this.editor.getFilename();\n};\n\n\nEditorUi.prototype.convertImageToDataUri = function (src, call) {\n\tlet img = new Image();\n\timg.src = src;\n\timg.onload = function() {\n\t\tlet canvas = document.createElement('canvas');\n\t\tcanvas.width = img.width;\n\t\tcanvas.height = img.height;\n\t\tlet ctx = canvas.getContext('2d');\n\t\tctx.drawImage(img, 0, 0);\n\t\tlet base64 = canvas.toDataURL('image/png');\n\t\tcall(base64)\n\t};\n}\n\n\nEditorUi.prototype.createImageDataUri = function (canvas, xml, format) {\n\tvar data = canvas.toDataURL('image/' + format);\n\n\t// Checks if output is invalid or empty\n\tif (data.length <= 6 || data == canvas.cloneNode(false).toDataURL('image/' + format)) {\n\t\tthrow { message: 'Invalid image' };\n\t}\n\n\tif (xml != null) {\n\t\tdata = this.writeGraphModelToPng(data, 'zTXt', 'mxGraphModel', atob(this.editor.graph.compress(xml)));\n\t}\n\n\treturn data;\n};\n\n/**\n * Adds the given text to the compressed or non-compressed text chunk.\n */\nEditorUi.prototype.writeGraphModelToPng = function (data, type, key, value, error) {\n\tvar base64 = data.substring(data.indexOf(',') + 1);\n\tvar f = (window.atob) ? atob(base64) : Base64.decode(base64, true);\n\tvar pos = 0;\n\n\tfunction fread(d, count) {\n\t\tvar start = pos;\n\t\tpos += count;\n\n\t\treturn d.substring(start, pos);\n\t};\n\n\t// Reads unsigned long 32 bit big endian\n\tfunction _freadint(d) {\n\t\tvar bytes = fread(d, 4);\n\n\t\treturn bytes.charCodeAt(3) + (bytes.charCodeAt(2) << 8) +\n\t\t\t(bytes.charCodeAt(1) << 16) + (bytes.charCodeAt(0) << 24);\n\t};\n\n\tfunction writeInt(num) {\n\t\treturn String.fromCharCode((num >> 24) & 0x000000ff, (num >> 16) & 0x000000ff,\n\t\t\t(num >> 8) & 0x000000ff, num & 0x000000ff);\n\t};\n\n\t// Checks signature\n\tif (fread(f, 8) != String.fromCharCode(137) + 'PNG' + String.fromCharCode(13, 10, 26, 10)) {\n\t\tif (error != null) {\n\t\t\terror();\n\t\t}\n\n\t\treturn;\n\t}\n\n\t// Reads header chunk\n\tfread(f, 4);\n\n\tif (fread(f, 4) != 'IHDR') {\n\t\tif (error != null) {\n\t\t\terror();\n\t\t}\n\n\t\treturn;\n\t}\n\n\tfread(f, 17);\n\tvar result = f.substring(0, pos);\n\n\tdo {\n\t\tvar n = _freadint(f);\n\t\tvar chunk = fread(f, 4);\n\n\t\tif (chunk == 'IDAT') {\n\t\t\tresult = f.substring(0, pos - 8);\n\n\t\t\tvar chunkData = key + String.fromCharCode(0) +\n\t\t\t\t((type == 'zTXt') ? String.fromCharCode(0) : '') +\n\t\t\t\tvalue;\n\n\t\t\t// FIXME: Wrong crc\n\t\t\tvar crc = 0xffffffff;\n\t\t\tcrc = this.updateCRC(crc, type, 0, 4);\n\t\t\tcrc = this.updateCRC(crc, chunkData, 0, chunkData.length);\n\n\t\t\tresult += writeInt(chunkData.length) + type + chunkData + writeInt(crc ^ 0xffffffff);\n\t\t\tresult += f.substring(pos - 8, f.length);\n\n\t\t\tbreak;\n\t\t}\n\n\t\tresult += f.substring(pos - 8, pos - 4 + n);\n\t\tfread(f, n);\n\t\tfread(f, 4);\n\t}\n\twhile (n);\n\n\treturn 'data:image/png;base64,' + ((window.btoa) ? btoa(result) : Base64.encode(result, true));\n};\n\nEditorUi.prototype.crcTable = [];\n\nfor (var n = 0; n < 256; n++) {\n\tvar c = n;\n\n\tfor (var k = 0; k < 8; k++) {\n\t\tif ((c & 1) == 1) {\n\t\t\tc = 0xedb88320 ^ (c >>> 1);\n\t\t}\n\t\telse {\n\t\t\tc >>>= 1;\n\t\t}\n\n\t\tEditorUi.prototype.crcTable[n] = c;\n\t}\n}\n\nEditorUi.prototype.updateCRC = function (crc, data, off, len) {\n\tvar c = crc;\n\n\tfor (var n = 0; n < len; n++) {\n\t\tc = EditorUi.prototype.crcTable[(c ^ data[off + n]) & 0xff] ^ (c >>> 8);\n\t}\n\n\treturn c;\n};\n"
  },
  {
    "path": "static/cherry/drawio_demo/Format.js",
    "content": "/**\n * Copyright (c) 2006-2012, JGraph Ltd\n */\nFormat = function(editorUi, container)\n{\n\tthis.editorUi = editorUi;\n\tthis.container = container;\n};\n\n/**\n * Background color for inactive tabs.\n */\nFormat.inactiveTabBackgroundColor = '#e4e4e4';\n\n/**\n * Icons for markers (24x16).\n */\nFormat.classicFilledMarkerImage = Graph.createSvgImage(20, 22, '<path transform=\"translate(4,2)\" stroke-width=\"2\" d=\"M 0 8 L 10 2 L 5 8 L 10 14 Z M 0 8 L 24 8\" stroke=\"#404040\" fill=\"#404040\"/>', 32, 20);\nFormat.classicThinFilledMarkerImage = Graph.createSvgImage(20, 22, '<path transform=\"translate(4,2)\" stroke-width=\"2\" d=\"M 0 8 L 8 4 L 3 8 L 8 12 Z M 0 8 L 24 8\" stroke=\"#404040\" fill=\"#404040\"/>', 32, 20);\nFormat.openFilledMarkerImage = Graph.createSvgImage(20, 22, '<path transform=\"translate(4,2)\" stroke-width=\"2\" d=\"M 8 0 L 0 8 L 8 16 M 0 8 L 24 8\" stroke=\"#404040\" fill=\"transparent\"/>', 32, 20);\nFormat.openThinFilledMarkerImage = Graph.createSvgImage(20, 22, '<path transform=\"translate(4,2)\" stroke-width=\"2\" d=\"M 8 4 L 0 8 L 8 12 M 0 8 L 24 8\" stroke=\"#404040\" fill=\"transparent\"/>', 32, 20);\nFormat.openAsyncFilledMarkerImage = Graph.createSvgImage(20, 22, '<path transform=\"translate(4,2)\" stroke-width=\"2\" d=\"M 8 4 L 0 8 L 24 8\" stroke=\"#404040\" fill=\"transparent\"/>', 32, 20);\nFormat.blockFilledMarkerImage = Graph.createSvgImage(20, 22, '<path transform=\"translate(4,2)\" stroke-width=\"2\" d=\"M 0 8 L 8 2 L 8 14 Z M 0 8 L 24 8\" stroke=\"#404040\" fill=\"#404040\"/>', 32, 20);\nFormat.blockThinFilledMarkerImage = Graph.createSvgImage(20, 22, '<path transform=\"translate(4,2)\" stroke-width=\"2\" d=\"M 0 8 L 8 4 L 8 12 Z M 0 8 L 24 8\" stroke=\"#404040\" fill=\"#404040\"/>', 32, 20);\nFormat.asyncFilledMarkerImage = Graph.createSvgImage(20, 22, '<path transform=\"translate(4,2)\" stroke-width=\"2\" d=\"M 6 8 L 6 4 L 0 8 L 24 8\" stroke=\"#404040\" fill=\"#404040\"/>', 32, 20);\nFormat.ovalFilledMarkerImage = Graph.createSvgImage(20, 22, '<path transform=\"translate(4,2)\" stroke-width=\"2\" d=\"M 0 8 A 5 5 0 0 1 5 3 A 5 5 0 0 1 11 8 A 5 5 0 0 1 5 13 A 5 5 0 0 1 0 8 Z M 10 8 L 24 8\" stroke=\"#404040\" fill=\"#404040\"/>', 32, 20);\nFormat.diamondFilledMarkerImage = Graph.createSvgImage(20, 22, '<path transform=\"translate(4,2)\" stroke-width=\"2\" d=\"M 0 8 L 6 2 L 12 8 L 6 14 Z M 0 8 L 24 8\" stroke=\"#404040\" fill=\"#404040\"/>', 32, 20);\nFormat.diamondThinFilledMarkerImage = Graph.createSvgImage(20, 22, '<path transform=\"translate(4,2)\" stroke-width=\"2\" d=\"M 0 8 L 8 3 L 16 8 L 8 13 Z M 0 8 L 24 8\" stroke=\"#404040\" fill=\"#404040\"/>', 32, 20);\nFormat.classicMarkerImage = Graph.createSvgImage(20, 22, '<path transform=\"translate(4,2)\" stroke-width=\"2\" d=\"M 0 8 L 10 2 L 5 8 L 10 14 Z M 5 8 L 24 8\" stroke=\"#404040\" fill=\"transparent\"/>', 32, 20);\nFormat.classicThinMarkerImage = Graph.createSvgImage(20, 22, '<path transform=\"translate(4,2)\" stroke-width=\"2\" d=\"M 0 8 L 8 4 L 5 8 L 8 12 Z M 5 8 L 24 8\" stroke=\"#404040\" fill=\"transparent\"/>', 32, 20);\nFormat.blockMarkerImage = Graph.createSvgImage(20, 22, '<path transform=\"translate(4,2)\" stroke-width=\"2\" d=\"M 0 8 L 8 2 L 8 14 Z M 8 8 L 24 8\" stroke=\"#404040\" fill=\"transparent\"/>', 32, 20);\nFormat.blockThinMarkerImage = Graph.createSvgImage(20, 22, '<path transform=\"translate(4,2)\" stroke-width=\"2\" d=\"M 0 8 L 8 4 L 8 12 Z M 8 8 L 24 8\" stroke=\"#404040\" fill=\"transparent\"/>', 32, 20);\nFormat.asyncMarkerImage = Graph.createSvgImage(20, 22, '<path transform=\"translate(4,2)\" stroke-width=\"2\" d=\"M 6 8 L 6 4 L 0 8 L 24 8\" stroke=\"#404040\" fill=\"transparent\"/>', 32, 20);\nFormat.ovalMarkerImage = Graph.createSvgImage(20, 22, '<path transform=\"translate(4,2)\" stroke-width=\"2\" d=\"M 0 8 A 5 5 0 0 1 5 3 A 5 5 0 0 1 11 8 A 5 5 0 0 1 5 13 A 5 5 0 0 1 0 8 Z M 10 8 L 24 8\" stroke=\"#404040\" fill=\"transparent\"/>', 32, 20);\nFormat.diamondMarkerImage = Graph.createSvgImage(20, 22, '<path transform=\"translate(4,2)\" stroke-width=\"2\" d=\"M 0 8 L 6 2 L 12 8 L 6 14 Z M 12 8 L 24 8\" stroke=\"#404040\" fill=\"transparent\"/>', 32, 20);\nFormat.diamondThinMarkerImage = Graph.createSvgImage(20, 22, '<path transform=\"translate(4,2)\" stroke-width=\"2\" d=\"M 0 8 L 8 3 L 16 8 L 8 13 Z M 16 8 L 24 8\" stroke=\"#404040\" fill=\"transparent\"/>', 32, 20);\nFormat.boxMarkerImage = Graph.createSvgImage(20, 22, '<path transform=\"translate(4,2)\" stroke-width=\"2\" d=\"M 0 3 L 10 3 L 10 13 L 0 13 Z M 10 8 L 24 8\" stroke=\"#404040\" fill=\"transparent\"/>', 32, 20);\nFormat.halfCircleMarkerImage = Graph.createSvgImage(20, 22, '<path transform=\"translate(4,2)\" stroke-width=\"2\" d=\"M 0 3 A 5 5 0 0 1 5 8 A 5 5 0 0 1 0 13 M 5 8 L 24 8\" stroke=\"#404040\" fill=\"transparent\"/>', 32, 20);\nFormat.dashMarkerImage = Graph.createSvgImage(20, 22, '<path transform=\"translate(4,2)\" stroke-width=\"2\" d=\"M 0 2 L 12 14 M 0 8 L 24 8\" stroke=\"#404040\" fill=\"transparent\"/>', 32, 20);\nFormat.crossMarkerImage = Graph.createSvgImage(20, 22, '<path transform=\"translate(4,2)\" stroke-width=\"2\" d=\"M 0 2 L 12 14 M 12 2 L 0 14 M 0 8 L 24 8\" stroke=\"#404040\" fill=\"transparent\"/>', 32, 20);\nFormat.circlePlusMarkerImage = Graph.createSvgImage(20, 22, '<path transform=\"translate(4,2)\" stroke-width=\"2\" d=\"M 0 8 A 6 6 0 0 1 6 2 A 6 6 0 0 1 12 8 A 6 6 0 0 1 6 14 A 6 6 0 0 1 0 8 Z M 6 2 L 6 14 M 0 8 L 24 8\" stroke=\"#404040\" fill=\"transparent\"/>', 32, 20);\nFormat.circleMarkerImage = Graph.createSvgImage(20, 22, '<path transform=\"translate(4,2)\" stroke-width=\"2\" d=\"M 0 8 A 6 6 0 0 1 6 2 A 6 6 0 0 1 12 8 A 6 6 0 0 1 6 14 A 6 6 0 0 1 0 8 Z M 12 8 L 24 8\" stroke=\"#404040\" fill=\"transparent\"/>', 32, 20);\nFormat.ERmandOneMarkerImage = Graph.createSvgImage(20, 22, '<path transform=\"translate(4,2)\" stroke-width=\"2\" d=\"M 6 2 L 6 14 M 9 2 L 9 14 M 0 8 L 24 8\" stroke=\"#404040\" fill=\"transparent\"/>', 32, 20);\nFormat.ERmanyMarkerImage = Graph.createSvgImage(20, 22, '<path transform=\"translate(4,2)\" stroke-width=\"2\" d=\"M 0 2 L 12 8 L 0 14 M 0 8 L 24 8\" stroke=\"#404040\" fill=\"transparent\"/>', 32, 20);\nFormat.ERoneToManyMarkerImage = Graph.createSvgImage(20, 22, '<path transform=\"translate(4,2)\" stroke-width=\"2\" d=\"M 0 2 L 12 8 L 0 14 M 15 2 L 15 14 M 0 8 L 24 8\" stroke=\"#404040\" fill=\"transparent\"/>', 32, 20);\nFormat.ERzeroToOneMarkerImage = Graph.createSvgImage(20, 22, '<path transform=\"translate(4,2)\" stroke-width=\"2\" d=\"M 8 8 A 5 5 0 0 1 13 3 A 5 5 0 0 1 18 8 A 5 5 0 0 1 13 13 A 5 5 0 0 1 8 8 Z M 0 8 L 8 8 M 18 8 L 24 8 M 4 3 L 4 13\" stroke=\"#404040\" fill=\"transparent\"/>', 32, 20);\nFormat.ERzeroToManyMarkerImage = Graph.createSvgImage(20, 22, '<path transform=\"translate(4,2)\" stroke-width=\"2\" d=\"M 8 8 A 5 5 0 0 1 13 3 A 5 5 0 0 1 18 8 A 5 5 0 0 1 13 13 A 5 5 0 0 1 8 8 Z M 0 8 L 8 8 M 18 8 L 24 8 M 0 3 L 8 8 L 0 13\" stroke=\"#404040\" fill=\"transparent\"/>', 32, 20);\nFormat.EROneMarkerImage = Graph.createSvgImage(20, 22, '<path transform=\"translate(4,2)\" stroke-width=\"2\" d=\"M 5 2 L 5 14 M 0 8 L 24 8\" stroke=\"#404040\" fill=\"transparent\"/>', 32, 20);\nFormat.baseDashMarkerImage = Graph.createSvgImage(20, 22, '<path transform=\"translate(4,2)\" stroke-width=\"2\" d=\"M 0 2 L 0 14 M 0 8 L 24 8\" stroke=\"#404040\" fill=\"transparent\"/>', 32, 20);\nFormat.doubleBlockMarkerImage = Graph.createSvgImage(20, 22, '<path transform=\"translate(4,2)\" stroke-width=\"2\" d=\"M 0 8 L 8 2 L 8 14 Z M 8 8 L 16 2 L 16 14 Z M 16 8 L 24 8\" stroke=\"#404040\" fill=\"transparent\"/>', 32, 20);\nFormat.doubleBlockFilledMarkerImage = Graph.createSvgImage(20, 22, '<path transform=\"translate(4,2)\" stroke-width=\"2\" d=\"M 0 8 L 8 2 L 8 14 Z M 8 8 L 16 2 L 16 14 Z M 16 8 L 24 8\" stroke=\"#404040\" fill=\"#404040\"/>', 32, 20);\n\n/**\n * Adds a style change item to the given menu.\n */\nFormat.processMenuIcon = function(elt, transform)\n{\n\tvar imgs = elt.getElementsByTagName('img');\n\n\tif (imgs.length > 0)\n\t{\n\t\timgs[0].className = 'geIcon geAdaptiveAsset';\n\t\timgs[0].style.padding = '0px';\n\t\timgs[0].style.margin = '0 0 0 2px';\n\n\t\tif (transform != null)\n\t\t{\n\t\t\tmxUtils.setPrefixedStyle(imgs[0].style, 'transform', transform);\n\t\t}\n\t}\n\n\treturn elt;\n};\n\n/**\n * Returns information about the current selection.\n */\nFormat.prototype.labelIndex = 0;\n\n/**\n * Returns information about the current selection.\n */\nFormat.prototype.diagramIndex = 0;\n\n/**\n * Returns information about the current selection.\n */\nFormat.prototype.currentIndex = 0;\n\n/**\n * Returns information about the current selection.\n */\nFormat.prototype.showCloseButton = true;\n\n/**\n * Returns information about the current selection.\n */\nFormat.prototype.rounded = false;\n\n/**\n * Returns information about the current selection.\n */\nFormat.prototype.curved = false;\n\n/**\n * Adds the label menu items to the given menu and parent.\n */\nFormat.prototype.init = function()\n{\n\tvar ui = this.editorUi;\n\tvar editor = ui.editor;\n\tvar graph = editor.graph;\n\t\n\tthis.update = mxUtils.bind(this, function(sender, evt)\n\t{\n\t\tthis.refresh();\n\t});\n\t\n\tgraph.getSelectionModel().addListener(mxEvent.CHANGE, this.update);\n\tgraph.getModel().addListener(mxEvent.CHANGE, this.update);\n\tgraph.addListener(mxEvent.EDITING_STARTED, this.update);\n\tgraph.addListener(mxEvent.EDITING_STOPPED, this.update);\n\tgraph.getView().addListener('unitChanged', this.update);\n\teditor.addListener('autosaveChanged', this.update);\n\tgraph.addListener(mxEvent.ROOT, this.update);\n\tui.addListener('styleChanged', this.update);\n\tui.addListener('darkModeChanged', this.update);\n\t\n\tthis.refresh();\n};\n\n/**\n * Adds the label menu items to the given menu and parent.\n */\nFormat.prototype.clear = function()\n{\n\tthis.container.innerText = '';\n\t\n\t// Destroy existing panels\n\tif (this.panels != null)\n\t{\n\t\tfor (var i = 0; i < this.panels.length; i++)\n\t\t{\n\t\t\tthis.panels[i].destroy();\n\t\t}\n\t}\n\t\n\tthis.panels = [];\n};\n\n/**\n * Adds the label menu items to the given menu and parent.\n */\nFormat.prototype.refresh = function()\n{\n\tif (this.pendingRefresh != null)\n\t{\n\t\twindow.clearTimeout(this.pendingRefresh);\n\t\tthis.pendingRefresh = null;\n\t}\n\n\tthis.pendingRefresh = window.setTimeout(mxUtils.bind(this, function()\n\t{\n\t\tthis.immediateRefresh();\n\t}));\n};\n\n/**\n * Adds the label menu items to the given menu and parent.\n */\nFormat.prototype.immediateRefresh = function()\n{\n\t// Performance tweak: No refresh needed if not visible\n\tif (this.container.style.width == '0px')\n\t{\n\t\treturn;\n\t}\n\t\n\tthis.clear();\n\tvar ui = this.editorUi;\n\tvar graph = ui.editor.graph;\n\t\n\tvar div = document.createElement('div');\n\tdiv.style.whiteSpace = 'nowrap';\n\tdiv.style.color = 'rgb(112, 112, 112)';\n\tdiv.style.textAlign = 'left';\n\tdiv.style.cursor = 'default';\n\t\n\tvar label = document.createElement('div');\n\tlabel.className = 'geFormatSection';\n\tlabel.style.textAlign = 'center';\n\tlabel.style.fontWeight = 'bold';\n\tlabel.style.paddingTop = '8px';\n\tlabel.style.fontSize = '13px';\n\tlabel.style.borderWidth = '0px 0px 1px 1px';\n\tlabel.style.borderStyle = 'solid';\n\tlabel.style.display = 'inline-block';\n\tlabel.style.height = '25px';\n\tlabel.style.overflow = 'hidden';\n\tlabel.style.width = '100%';\n\tthis.container.appendChild(div);\n\t\n\t// Prevents text selection\n    mxEvent.addListener(label, (mxClient.IS_POINTER) ? 'pointerdown' : 'mousedown',\n        mxUtils.bind(this, function(evt)\n\t{\n\t\tevt.preventDefault();\n\t}));\n\n\tvar ss = ui.getSelectionState();\n\tvar containsLabel = ss.containsLabel;\n\tvar currentLabel = null;\n\tvar currentPanel = null;\n\t\n\tvar addClickHandler = mxUtils.bind(this, function(elt, panel, index, lastEntry)\n\t{\n\t\tvar clickHandler = mxUtils.bind(this, function(evt)\n\t\t{\n\t\t\tif (currentLabel != elt)\n\t\t\t{\n\t\t\t\tif (containsLabel)\n\t\t\t\t{\n\t\t\t\t\tthis.labelIndex = index;\n\t\t\t\t}\n\t\t\t\telse if (graph.isSelectionEmpty())\n\t\t\t\t{\n\t\t\t\t\tthis.diagramIndex = index;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tthis.currentIndex = index;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (currentLabel != null)\n\t\t\t\t{\n\t\t\t\t\tcurrentLabel.style.backgroundColor = Format.inactiveTabBackgroundColor;\n\t\t\t\t\tcurrentLabel.style.borderBottomWidth = '1px';\n\t\t\t\t}\n\n\t\t\t\tcurrentLabel = elt;\n\t\t\t\tcurrentLabel.style.backgroundColor = '';\n\t\t\t\tcurrentLabel.style.borderBottomWidth = '0px';\n\t\t\t\t\n\t\t\t\tif (currentPanel != panel)\n\t\t\t\t{\n\t\t\t\t\tif (currentPanel != null)\n\t\t\t\t\t{\n\t\t\t\t\t\tcurrentPanel.style.display = 'none';\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tcurrentPanel = panel;\n\t\t\t\t\tcurrentPanel.style.display = '';\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\t\n\t\tmxEvent.addListener(elt, 'click', clickHandler);\n\t\t\n\t\t// Prevents text selection\n\t    mxEvent.addListener(elt, (mxClient.IS_POINTER) ? 'pointerdown' : 'mousedown',\n        \tmxUtils.bind(this, function(evt)\n    \t{\n\t\t\tevt.preventDefault();\n\t\t}));\n\t\t\n\t\tif ((lastEntry && currentLabel == null) ||\n\t\t\t(index == ((containsLabel) ? this.labelIndex : ((graph.isSelectionEmpty()) ?\n\t\t\tthis.diagramIndex : this.currentIndex))))\n\t\t{\n\t\t\t// Invokes handler directly as a workaround for no click on DIV in KHTML.\n\t\t\tclickHandler();\n\t\t}\n\t});\n\t\n\tvar idx = 0;\n\n\tif (graph.isSelectionEmpty())\n\t{\n\t\tmxUtils.write(label, mxResources.get('diagram'));\n\t\tlabel.style.borderLeftWidth = '0px';\n\n\t\tdiv.appendChild(label);\n\t\tvar diagramPanel = div.cloneNode(false);\n\t\tthis.panels.push(new DiagramFormatPanel(this, ui, diagramPanel));\n\t\tthis.container.appendChild(diagramPanel);\n\t\t\n\t\tif (Editor.styles != null)\n\t\t{\n\t\t\tdiagramPanel.style.display = 'none';\n\t\t\tlabel.style.width = (this.showCloseButton) ? '106px' : '50%';\n\t\t\tlabel.style.cursor = 'pointer';\n\t\t\tlabel.style.backgroundColor = Format.inactiveTabBackgroundColor;\n\t\t\t\n\t\t\tvar label2 = label.cloneNode(false);\n\t\t\tlabel2.style.borderLeftWidth = '1px';\n\t\t\tlabel2.style.borderRightWidth = '1px';\n\t\t\tlabel2.style.backgroundColor = Format.inactiveTabBackgroundColor;\n\t\t\t\n\t\t\taddClickHandler(label, diagramPanel, idx++);\n\t\t\t\n\t\t\tvar stylePanel = div.cloneNode(false);\n\t\t\tstylePanel.style.display = 'none';\n\t\t\tmxUtils.write(label2, mxResources.get('style'));\n\t\t\tdiv.appendChild(label2);\n\t\t\tthis.panels.push(new DiagramStylePanel(this, ui, stylePanel));\n\t\t\tthis.container.appendChild(stylePanel);\n\t\t\t\n\t\t\taddClickHandler(label2, stylePanel, idx++);\n\t\t}\n\t\t\n\t\t// Adds button to hide the format panel since\n\t\t// people don't seem to find the toolbar button\n\t\t// and the menu item in the format menu\n\t\tif (this.showCloseButton)\n\t\t{\n\t\t\tvar label2 = label.cloneNode(false);\n\t\t\tlabel2.style.borderLeftWidth = '1px';\n\t\t\tlabel2.style.borderRightWidth = '1px';\n\t\t\tlabel2.style.borderBottomWidth = '1px';\n\t\t\tlabel2.style.backgroundColor = Format.inactiveTabBackgroundColor;\n\t\t\tlabel2.style.position = 'absolute';\n\t\t\tlabel2.style.right = '0px';\n\t\t\tlabel2.style.top = '0px';\n\t\t\tlabel2.style.width = '25px';\n\t\t\t\n\t\t\tvar img = document.createElement('img');\n\t\t\timg.setAttribute('border', '0');\n\t\t\timg.setAttribute('src', Dialog.prototype.closeImage);\n\t\t\timg.setAttribute('title', mxResources.get('hide'));\n\t\t\timg.style.position = 'absolute';\n\t\t\timg.style.display = 'block';\n\t\t\timg.style.right = '0px';\n\t\t\timg.style.top = '8px';\n\t\t\timg.style.cursor = 'pointer';\n\t\t\timg.style.marginTop = '1px';\n\t\t\timg.style.marginRight = '6px';\n\t\t\timg.style.border = '1px solid transparent';\n\t\t\timg.style.padding = '1px';\n\t\t\timg.style.opacity = 0.5;\n\t\t\tlabel2.appendChild(img)\n\t\t\t\n\t\t\tmxEvent.addListener(img, 'click', function()\n\t\t\t{\n\t\t\t\tui.actions.get('format').funct();\n\t\t\t});\n\t\t\t\n\t\t\tdiv.appendChild(label2);\n\t\t}\n\t}\n\telse if (graph.isEditing())\n\t{\n\t\tmxUtils.write(label, mxResources.get('text'));\n\t\tdiv.appendChild(label);\n\t\tlabel.style.borderLeftStyle = 'none';\n\t\tthis.panels.push(new TextFormatPanel(this, ui, div));\n\t}\n\telse\n\t{\n\t\tlabel.style.backgroundColor = Format.inactiveTabBackgroundColor;\n\t\tlabel.style.borderLeftWidth = '1px';\n\t\tlabel.style.cursor = 'pointer';\n\t\tlabel.style.width = ss.cells.length == 0 ? '100%' :\n\t\t\t(containsLabel ? '50%' : '33.3%');\n\t\tvar label2 = label.cloneNode(false);\n\t\tvar label3 = label2.cloneNode(false);\n\n\t\t// Workaround for ignored background in IE\n\t\tlabel2.style.backgroundColor = Format.inactiveTabBackgroundColor;\n\t\tlabel3.style.backgroundColor = Format.inactiveTabBackgroundColor;\n\t\t\n\t\t// Style\n\t\tif (containsLabel)\n\t\t{\n\t\t\tlabel2.style.borderLeftWidth = '0px';\n\t\t}\n\t\telse if (ss.cells.length > 0)\n\t\t{\n\t\t\tlabel.style.borderLeftWidth = '0px';\n\t\t\tmxUtils.write(label, mxResources.get('style'));\n\t\t\tdiv.appendChild(label);\n\t\t\t\n\t\t\tvar stylePanel = div.cloneNode(false);\n\t\t\tstylePanel.style.display = 'none';\n\t\t\tthis.panels.push(new StyleFormatPanel(this, ui, stylePanel));\n\t\t\tthis.container.appendChild(stylePanel);\n\n\t\t\taddClickHandler(label, stylePanel, idx++);\n\t\t}\n\t\t\n\t\t// Text\n\t\tmxUtils.write(label2, mxResources.get('text'));\n\t\tdiv.appendChild(label2);\n\n\t\tvar textPanel = div.cloneNode(false);\n\t\ttextPanel.style.display = 'none';\n\t\tthis.panels.push(new TextFormatPanel(this, ui, textPanel));\n\t\tthis.container.appendChild(textPanel);\n\t\t\n\t\t// Arrange\n\t\tmxUtils.write(label3, mxResources.get('arrange'));\n\t\tdiv.appendChild(label3);\n\n\t\tvar arrangePanel = div.cloneNode(false);\n\t\tarrangePanel.style.display = 'none';\n\t\tthis.panels.push(new ArrangePanel(this, ui, arrangePanel));\n\t\tthis.container.appendChild(arrangePanel);\n\n\t\tif (ss.cells.length > 0)\n\t\t{\n\t\t\taddClickHandler(label2, textPanel, idx + 1);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tlabel2.style.display = 'none';\n\t\t}\n\t\t\n\t\taddClickHandler(label3, arrangePanel, idx++, true);\n\t}\n};\n\n/**\n * Base class for format panels.\n */\nBaseFormatPanel = function(format, editorUi, container)\n{\n\tthis.format = format;\n\tthis.editorUi = editorUi;\n\tthis.container = container;\n\tthis.listeners = [];\n};\n\n/**\n * \n */\nBaseFormatPanel.prototype.buttonBackgroundColor = 'transparent';\n\n/**\n * Install input handler.\n */\nBaseFormatPanel.prototype.installInputHandler = function(input, key, defaultValue, min, max, unit, textEditFallback, isFloat)\n{\n\tunit = (unit != null) ? unit : '';\n\tisFloat = (isFloat != null) ? isFloat : false;\n\t\n\tvar ui = this.editorUi;\n\tvar graph = ui.editor.graph;\n\t\n\tmin = (min != null) ? min : 1;\n\tmax = (max != null) ? max : 999;\n\t\n\tvar selState = null;\n\tvar updating = false;\n\t\n\tvar update = mxUtils.bind(this, function(evt)\n\t{\n\t\tvar value = (isFloat) ? parseFloat(input.value) : parseInt(input.value);\n\n\t\t// Special case: angle mod 360\n\t\tif (!isNaN(value) && key == mxConstants.STYLE_ROTATION)\n\t\t{\n\t\t\t// Workaround for decimal rounding errors in floats is to\n\t\t\t// use integer and round all numbers to two decimal point\n\t\t\tvalue = mxUtils.mod(Math.round(value * 100), 36000) / 100;\n\t\t}\n\t\t\n\t\tvalue = Math.min(max, Math.max(min, (isNaN(value)) ? defaultValue : value));\n\t\t\n\t\tif (graph.cellEditor.isContentEditing() && textEditFallback)\n\t\t{\n\t\t\tif (!updating)\n\t\t\t{\n\t\t\t\tupdating = true;\n\t\t\t\t\n\t\t\t\tif (selState != null)\n\t\t\t\t{\n\t\t\t\t\tgraph.cellEditor.restoreSelection(selState);\n\t\t\t\t\tselState = null;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\ttextEditFallback(value);\n\t\t\t\tinput.value = value + unit;\n\t\n\t\t\t\t// Restore focus and selection in input\n\t\t\t\tupdating = false;\n\t\t\t}\n\t\t}\n\t\telse if (value != mxUtils.getValue(ui.getSelectionState().style, key, defaultValue))\n\t\t{\n\t\t\tif (graph.isEditing())\n\t\t\t{\n\t\t\t\tgraph.stopEditing(true);\n\t\t\t}\n\t\t\t\n\t\t\tgraph.getModel().beginUpdate();\n\t\t\ttry\n\t\t\t{\n\t\t\t\tvar cells = ui.getSelectionState().cells;\n\t\t\t\tgraph.setCellStyles(key, value, cells);\n\n\t\t\t\t// Handles special case for fontSize where HTML labels are parsed and updated\n\t\t\t\tif (key == mxConstants.STYLE_FONTSIZE)\n\t\t\t\t{\n\t\t\t\t\tgraph.updateLabelElements(cells, function(elt)\n\t\t\t\t\t{\n\t\t\t\t\t\telt.style.fontSize = value + 'px';\n\t\t\t\t\t\telt.removeAttribute('size');\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tfor (var i = 0; i < cells.length; i++)\n\t\t\t\t{\n\t\t\t\t\tif (graph.model.getChildCount(cells[i]) == 0)\n\t\t\t\t\t{\n\t\t\t\t\t\tgraph.autoSizeCell(cells[i], false);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tui.fireEvent(new mxEventObject('styleChanged', 'keys', [key],\n\t\t\t\t\t\t'values', [value], 'cells', cells));\n\t\t\t}\n\t\t\tfinally\n\t\t\t{\n\t\t\t\tgraph.getModel().endUpdate();\n\t\t\t}\n\t\t}\n\t\t\n\t\tinput.value = value + unit;\n\t\tmxEvent.consume(evt);\n\t});\n\n\tif (textEditFallback && graph.cellEditor.isContentEditing())\n\t{\n\t\t// KNOWN: Arrow up/down clear selection text in quirks/IE 8\n\t\t// Text size via arrow button limits to 16 in IE11. Why?\n\t\tmxEvent.addListener(input, 'mousedown', function()\n\t\t{\n\t\t\tif (document.activeElement == graph.cellEditor.textarea)\n\t\t\t{\n\t\t\t\tselState = graph.cellEditor.saveSelection();\n\t\t\t}\n\t\t});\n\t\t\n\t\tmxEvent.addListener(input, 'touchstart', function()\n\t\t{\n\t\t\tif (document.activeElement == graph.cellEditor.textarea)\n\t\t\t{\n\t\t\t\tselState = graph.cellEditor.saveSelection();\n\t\t\t}\n\t\t});\n\t}\n\t\n\tmxEvent.addListener(input, 'change', update);\n\tmxEvent.addListener(input, 'blur', update);\n\t\n\treturn update;\n};\n\n/**\n * Adds the given option.\n */\nBaseFormatPanel.prototype.createPanel = function()\n{\n\tvar div = document.createElement('div');\n\tdiv.className = 'geFormatSection';\n\tdiv.style.padding = '12px 0px 8px 14px';\n\t\n\treturn div;\n};\n\n/**\n * Adds the given option.\n */\nBaseFormatPanel.prototype.createTitle = function(title)\n{\n\tvar div = document.createElement('div');\n\tdiv.style.padding = '0px 0px 6px 0px';\n\tdiv.style.whiteSpace = 'nowrap';\n\tdiv.style.overflow = 'hidden';\n\tdiv.style.width = '200px';\n\tdiv.style.fontWeight = 'bold';\n\tmxUtils.write(div, title);\n\t\n\treturn div;\n};\n\n/**\n * \n */\nBaseFormatPanel.prototype.addAction = function(div, name)\n{\n\tvar action = this.editorUi.actions.get(name);\n\tvar btn = null;\n\n\tif (action != null && action.isEnabled())\n\t{\n\t\tbtn = mxUtils.button(action.label, mxUtils.bind(this, function(evt)\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\taction.funct(evt, evt);\n\t\t\t}\n\t\t\tcatch (e)\n\t\t\t{\n\t\t\t\tthis.editorUi.handleError(e);\n\t\t\t}\n\t\t}));\n\t\t\n\t\tvar short = (action.shortcut != null) ? ' (' + action.shortcut + ')' : '';\n\t\tbtn.setAttribute('title', action.label + short);\n\t\tbtn.style.marginBottom = '2px';\n\t\tbtn.style.width = '210px';\n\t\tdiv.appendChild(btn);\n\t\tresult = true;\n\t}\n\n\treturn btn;\n};\n\n/**\n * \n */\nBaseFormatPanel.prototype.addActions = function(div, names)\n{\n\tvar lastBr = null;\n\tvar last = null;\n\tvar count = 0;\n\n\tfor (var i = 0; i < names.length; i++)\n\t{\n\t\tvar btn = this.addAction(div, names[i]);\n\n\t\tif (btn != null)\n\t\t{\n\t\t\tcount++;\n\n\t\t\tif (mxUtils.mod(count, 2) == 0)\n\t\t\t{\n\t\t\t\tlast.style.marginRight = '2px';\n\t\t\t\tlast.style.width = '104px';\n\t\t\t\tbtn.style.width = '104px';\n\t\t\t\tlastBr.parentNode.removeChild(lastBr);\n\t\t\t}\n\n\t\t\tlastBr = mxUtils.br(div);\n\t\t\tlast = btn;\n\t\t}\n\t}\n\n\treturn count;\n};\n\n/**\n * \n */\nBaseFormatPanel.prototype.createStepper = function(input, update, step, height, disableFocus, defaultValue, isFloat)\n{\n\tstep = (step != null) ? step : 1;\n\theight = (height != null) ? height : 9;\n\tvar bigStep = 10 * step;\n\t\n\tvar stepper = document.createElement('div');\n\tstepper.className = 'geBtnStepper';\n\tstepper.style.position = 'absolute';\n\t\n\tvar up = document.createElement('div');\n\tup.style.position = 'relative';\n\tup.style.height = height + 'px';\n\tup.style.width = '10px';\n\tup.className = 'geBtnUp';\n\tstepper.appendChild(up);\n\t\n\tvar down = up.cloneNode(false);\n\tdown.style.border = 'none';\n\tdown.style.height = height + 'px';\n\tdown.className = 'geBtnDown';\n\tstepper.appendChild(down);\n\n\tmxEvent.addGestureListeners(down, function(evt)\n\t{\n\t\t// Stops text selection on shift+click\n\t\tmxEvent.consume(evt);\n\t}, null, function(evt)\n\t{\n\t\tif (input.value == '')\n\t\t{\n\t\t\tinput.value = defaultValue || '2';\n\t\t}\n\t\t\n\t\tvar val = isFloat? parseFloat(input.value) : parseInt(input.value);\n\t\t\n\t\tif (!isNaN(val))\n\t\t{\n\t\t\tinput.value = val - (mxEvent.isShiftDown(evt) ? bigStep : step);\n\t\t\t\n\t\t\tif (update != null)\n\t\t\t{\n\t\t\t\tupdate(evt);\n\t\t\t}\n\t\t}\n\n\t\tmxEvent.consume(evt);\n\t});\n\t\n\tmxEvent.addGestureListeners(up, function(evt)\n\t{\n\t\t// Stops text selection on shift+click\n\t\tmxEvent.consume(evt);\n\t}, null, function(evt)\n\t{\n\t\tif (input.value == '')\n\t\t{\n\t\t\tinput.value = defaultValue || '0';\n\t\t}\n\t\t\n\t\tvar val = isFloat? parseFloat(input.value) : parseInt(input.value);\n\t\t\n\t\tif (!isNaN(val))\n\t\t{\n\t\t\tinput.value = val + (mxEvent.isShiftDown(evt) ? bigStep : step);\n\t\t\t\n\t\t\tif (update != null)\n\t\t\t{\n\t\t\t\tupdate(evt);\n\t\t\t}\n\t\t}\n\n\t\tmxEvent.consume(evt);\n\t});\n\t\n\t// Disables transfer of focus to DIV but also :active CSS\n\t// so it's only used for fontSize where the focus should\n\t// stay on the selected text, but not for any other input.\n\tif (disableFocus)\n\t{\n\t\tvar currentSelection = null;\n\t\t\n\t\tmxEvent.addGestureListeners(stepper,\n\t\t\tfunction(evt)\n\t\t\t{\n\t\t\t\tmxEvent.consume(evt);\n\t\t\t},\n\t\t\tnull,\n\t\t\tfunction(evt)\n\t\t\t{\n\t\t\t\t// Workaround for lost current selection in page because of focus in IE\n\t\t\t\tif (currentSelection != null)\n\t\t\t\t{\n\t\t\t\t\ttry\n\t\t\t\t\t{\n\t\t\t\t\t\tcurrentSelection.select();\n\t\t\t\t\t}\n\t\t\t\t\tcatch (e)\n\t\t\t\t\t{\n\t\t\t\t\t\t// ignore\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tcurrentSelection = null;\n\t\t\t\t\tmxEvent.consume(evt);\n\t\t\t\t}\n\t\t\t}\n\t\t);\n\t}\n\telse\n\t{\n\t\t// Stops propagation on checkbox labels\n\t\tmxEvent.addListener(stepper, 'click', function(evt)\n\t\t{\n\t\t\tmxEvent.consume(evt);\n\t\t});\n\t}\n\t\n\treturn stepper;\n};\n\n/**\n * Adds the given option.\n */\nBaseFormatPanel.prototype.createOption = function(label, isCheckedFn, setCheckedFn, listener, fn)\n{\n\tvar div = document.createElement('div');\n\tdiv.style.display = 'flex';\n\tdiv.style.alignItems = 'center';\n\tdiv.style.padding = '3px 0px 3px 0px';\n\tdiv.style.height = '18px';\n\t\n\tvar cb = document.createElement('input');\n\tcb.setAttribute('type', 'checkbox');\n\tcb.style.margin = '1px 6px 0px 0px';\n\tcb.style.verticalAlign = 'top';\n\tdiv.appendChild(cb);\n\n\tvar elt = document.createElement('div');\n\telt.style.display = 'inline-block';\n\telt.style.whiteSpace = 'nowrap';\n\telt.style.textOverflow = 'ellipsis';\n\telt.style.overflow = 'hidden';\n\telt.style.maxWidth = '160px';\n\telt.style.maxWidth = '160px';\n\telt.style.userSelect = 'none';\n\tmxUtils.write(elt, label);\n\tdiv.appendChild(elt);\n\n\tvar applying = false;\n\tvar value = isCheckedFn();\n\t\n\tvar apply = function(newValue, evt)\n\t{\n\t\tif (!applying)\n\t\t{\n\t\t\tapplying = true;\n\t\t\t\n\t\t\tif (newValue)\n\t\t\t{\n\t\t\t\tcb.setAttribute('checked', 'checked');\n\t\t\t\tcb.defaultChecked = true;\n\t\t\t\tcb.checked = true;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tcb.removeAttribute('checked');\n\t\t\t\tcb.defaultChecked = false;\n\t\t\t\tcb.checked = false;\n\t\t\t}\n\t\t\t\n\t\t\tif (value != newValue)\n\t\t\t{\n\t\t\t\tvalue = newValue;\n\t\t\t\t\n\t\t\t\t// Checks if the color value needs to be updated in the model\n\t\t\t\tif (isCheckedFn() != value)\n\t\t\t\t{\n\t\t\t\t\tsetCheckedFn(value, evt);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tapplying = false;\n\t\t}\n\t};\n\n\tmxEvent.addListener(div, 'click', function(evt)\n\t{\n\t\tif (cb.getAttribute('disabled') != 'disabled')\n\t\t{\n\t\t\t// Toggles checkbox state for click on label\n\t\t\tvar source = mxEvent.getSource(evt);\n\t\t\t\n\t\t\tif (source == div || source == elt)\n\t\t\t{\n\t\t\t\tcb.checked = !cb.checked;\n\t\t\t}\n\t\t\t\n\t\t\tapply(cb.checked, evt);\n\t\t}\n\t});\n\t\n\tapply(value);\n\t\n\tif (listener != null)\n\t{\n\t\tlistener.install(apply);\n\t\tthis.listeners.push(listener);\n\t}\n\t\n\tif (fn != null)\n\t{\n\t\tfn(div);\n\t}\n\n\treturn div;\n};\n\n/**\n * The string 'null' means use null in values.\n */\nBaseFormatPanel.prototype.createCellOption = function(label, key, defaultValue, enabledValue, disabledValue, fn, action, stopEditing, cells)\n{\t\n\tvar ui = this.editorUi;\n\tvar editor = ui.editor;\n\tvar graph = editor.graph;\n\t\n\tenabledValue = (enabledValue != null) ? ((enabledValue == 'null') ? null : enabledValue) : 1;\n\tdisabledValue = (disabledValue != null) ? ((disabledValue == 'null') ? null : disabledValue) : 0;\n\n\tvar style = (cells != null) ? graph.getCommonStyle(cells) : ui.getSelectionState().style;\n\n\treturn this.createOption(label, function()\n\t{\n\t\treturn mxUtils.getValue(style, key, defaultValue) != disabledValue;\n\t}, function(checked)\n\t{\n\t\tif (stopEditing)\n\t\t{\n\t\t\tgraph.stopEditing();\n\t\t}\n\t\t\n\t\tif (action != null)\n\t\t{\n\t\t\taction.funct();\n\t\t}\n\t\telse\n\t\t{\n\t\t\tgraph.getModel().beginUpdate();\n\t\t\ttry\n\t\t\t{\n\t\t\t\tvar temp = (cells != null) ? cells : ui.getSelectionState().cells;\n\t\t\t\tvar value = (checked) ? enabledValue : disabledValue;\n\t\t\t\tgraph.setCellStyles(key, value, temp);\n\n\t\t\t\tif (fn != null)\n\t\t\t\t{\n\t\t\t\t\tfn(temp, value);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tui.fireEvent(new mxEventObject('styleChanged', 'keys',\n\t\t\t\t\t[key], 'values', [value], 'cells', temp));\n\t\t\t}\n\t\t\tfinally\n\t\t\t{\n\t\t\t\tgraph.getModel().endUpdate();\n\t\t\t}\n\t\t}\n\t},\n\t{\n\t\tinstall: function(apply)\n\t\t{\n\t\t\tthis.listener = function()\n\t\t\t{\n\t\t\t\tapply(mxUtils.getValue(style, key, defaultValue) != disabledValue);\n\t\t\t};\n\t\t\t\n\t\t\tgraph.getModel().addListener(mxEvent.CHANGE, this.listener);\n\t\t},\n\t\tdestroy: function()\n\t\t{\n\t\t\tgraph.getModel().removeListener(this.listener);\n\t\t}\n\t});\n};\n\n/**\n * Adds the given color option.\n */\nBaseFormatPanel.prototype.createColorOption = function(label, getColorFn, setColorFn,\n\tdefaultColor, listener, callbackFn, hideCheckbox, defaultColorValue)\n{\n\tvar graph = this.editorUi.editor.graph;\n\n\tvar div = document.createElement('div');\n\tdiv.style.padding = '3px 0px 3px 0px';\n\tdiv.style.whiteSpace = 'nowrap';\n\tdiv.style.overflow = 'hidden';\n\tdiv.style.width = '200px';\n\tdiv.style.height = '18px';\n\t\n\tvar cb = document.createElement('input');\n\tcb.setAttribute('type', 'checkbox');\n\tcb.style.margin = '1px 6px 0px 0px';\n\tcb.style.verticalAlign = 'top';\n\t\n\tif (!hideCheckbox)\n\t{\n\t\tdiv.appendChild(cb);\t\n\t}\n\n\tvar span = document.createElement('span');\n\tspan.style.verticalAlign = 'top';\n\tmxUtils.write(span, label);\n\tdiv.appendChild(span);\n\n\tvar value = getColorFn();\n\tvar applying = false;\n\tvar dropper = null;\n\tvar btn = null;\n\n\tvar clrInput = document.createElement('input');\n\tclrInput.setAttribute('type', 'color');\n\tclrInput.style.position = 'relative';\n\tclrInput.style.visibility = 'hidden';\n\tclrInput.style.top = '10px';\n\tclrInput.style.width = '0px';\n\tclrInput.style.height = '0px';\n\tclrInput.style.border = 'none';\n\n\t// Adds native color dialog\n\tif (!mxClient.IS_IE && !mxClient.IS_IE11 && !mxClient.IS_TOUCH)\n\t{\n\t\tdropper = document.createElement('img');\n\t\tdropper.src = Editor.colorDropperImage;\n\t\tdropper.className = 'geColorDropper geAdaptiveAsset';\n\t\tdropper.style.position = 'relative';\n\t\tdropper.style.right = '-20px';\n\t\tdropper.style.top = '-1px';\n\t\tdropper.style.width = 'auto';\n\t\tdropper.style.height = '14px';\n\n\t\tmxEvent.addListener(dropper, 'click', function(evt)\n\t\t{\n\t\t\tvar color = value;\n\n\t\t\tif (color == 'default')\n\t\t\t{\n\t\t\t\tcolor = defaultColorValue;\n\t\t\t}\n\t\t\n\t\t\tclrInput.value = color;\n\t\t\tclrInput.click();\n\n\t\t\tmxEvent.consume(evt);\n\t\t});\n\t}\n\n\tvar apply = function(color, disableUpdate, forceUpdate)\n\t{\n\t\tif (!applying)\n\t\t{\n\t\t\tvar defaultValue = (defaultColor == 'null') ? null : defaultColor;\n\n\t\t\tapplying = true;\n\t\t\tcolor = (/(^#?[a-zA-Z0-9]*$)/.test(color)) ? color : defaultValue;\n\t\t\tvar tempColor = (color != null && color != mxConstants.NONE) ? color : defaultValue;\n\n\t\t\tvar div = document.createElement('div');\n\t\t\tdiv.style.width = '21px';\n\t\t\tdiv.style.height = '12px';\n\t\t\tdiv.style.margin = '2px 18px 2px 3px';\n\t\t\tdiv.style.border = '1px solid black';\n\t\t\tdiv.style.backgroundColor = (tempColor == 'default') ? defaultColorValue : tempColor;\n\t\t\tbtn.innerText = '';\n\t\t\tbtn.appendChild(div);\n\n\t\t\tif (dropper != null)\n\t\t\t{\n\t\t\t\tdiv.style.width = '21px';\n\t\t\t\tdiv.style.margin = '2px 18px 2px 3px';\n\t\t\t\tdiv.appendChild(dropper);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tdiv.style.width = '36px';\n\t\t\t\tdiv.style.margin = '3px';\n\t\t\t}\n\n\t\t\tif (color != null && color != mxConstants.NONE && color.length > 1 && typeof color === 'string')\n\t\t\t{\n\t\t\t\tvar clr = (color.charAt(0) == '#') ? color.substring(1).toUpperCase() : color;\n\t\t\t\tvar name = ColorDialog.prototype.colorNames[clr];\n\n\t\t\t\tif (name != null)\n\t\t\t\t{\n\t\t\t\t\tbtn.setAttribute('title', name);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (color != null && color != mxConstants.NONE &&\n\t\t\t\t!graph.isSpecialColor(color))\n\t\t\t{\n\t\t\t\tcb.setAttribute('checked', 'checked');\n\t\t\t\tcb.defaultChecked = true;\n\t\t\t\tcb.checked = true;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tcb.removeAttribute('checked');\n\t\t\t\tcb.defaultChecked = false;\n\t\t\t\tcb.checked = false;\n\t\t\t}\n\t\n\t\t\tbtn.style.display = (cb.checked || hideCheckbox) ? '' : 'none';\n\n\t\t\tif (callbackFn != null)\n\t\t\t{\n\t\t\t\tcallbackFn(color == 'null' ? null : color);\n\t\t\t}\n\n\t\t\tvalue = color;\n\n\t\t\tif (!disableUpdate)\n\t\t\t{\n\t\t\t\t// Checks if the color value needs to be updated in the model\n\t\t\t\tif (forceUpdate || hideCheckbox || getColorFn() != value)\n\t\t\t\t{\n\t\t\t\t\tsetColorFn(value == 'null' ? null : value, value);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tapplying = false;\n\t\t}\n\t};\n\t\n\tdiv.appendChild(clrInput);\n\n\tmxEvent.addListener(clrInput, 'change', function()\n\t{\n\t\tapply(clrInput.value, null, true);\n\t});\n\n\tbtn = mxUtils.button('', mxUtils.bind(this, function(evt)\n\t{\n\t\tvar color = value;\n\n\t\tif (color == 'default')\n\t\t{\n\t\t\tcolor = defaultColorValue;\n\t\t}\n\t\t\n\t\tthis.editorUi.pickColor(color, function(newColor)\n\t\t{\n\t\t\tapply(newColor, null, true);\n\t\t}, defaultColorValue);\n\n\t\tmxEvent.consume(evt);\n\t}));\n\t\n\tbtn.style.position = 'absolute';\n\tbtn.style.marginTop = '-3px';\n\tbtn.style.left = '178px';\n\tbtn.style.height = '22px';\n\tbtn.className = 'geColorBtn';\n\tbtn.style.display = (cb.checked || hideCheckbox) ? '' : 'none';\n\tdiv.appendChild(btn);\n\n\tvar clr = (value != null && typeof value === 'string' && value.charAt(0) == '#') ? value.substring(1).toUpperCase() : value;\n\tvar name = ColorDialog.prototype.colorNames[clr];\n\n\tif (name != null)\n\t{\n\t\tbtn.setAttribute('title', name);\n\t}\n\n\tmxEvent.addListener(div, 'click', function(evt)\n\t{\n\t\tvar source = mxEvent.getSource(evt);\n\t\t\n\t\tif (source == cb || source.nodeName != 'INPUT')\n\t\t{\t\t\n\t\t\t// Toggles checkbox state for click on label\n\t\t\tif (source != cb)\n\t\t\t{\n\t\t\t\tcb.checked = !cb.checked;\n\t\t\t}\n\t\n\t\t\t// Overrides default value with current value to make it easier\n\t\t\t// to restore previous value if the checkbox is clicked twice\n\t\t\tif (!cb.checked && value != null && value != mxConstants.NONE &&\n\t\t\t\tdefaultColor != mxConstants.NONE)\n\t\t\t{\n\t\t\t\tdefaultColor = value;\n\t\t\t}\n\t\t\t\n\t\t\tapply((cb.checked) ? defaultColor : mxConstants.NONE);\n\t\t}\n\t});\n\t\n\tapply(value, true);\n\t\n\tif (listener != null)\n\t{\n\t\tlistener.install(apply);\n\t\tthis.listeners.push(listener);\n\t}\n\t\n\treturn div;\n};\n\n/**\n * \n */\nBaseFormatPanel.prototype.createCellColorOption = function(label, colorKey, defaultColor, callbackFn, setStyleFn, defaultColorValue)\n{\n\tvar ui = this.editorUi;\n\tvar editor = ui.editor;\n\tvar graph = editor.graph;\n\t\n\treturn this.createColorOption(label, function()\n\t{\n\t\t// Seems to be null sometimes, not sure why...\n\t\tvar state = graph.view.getState(ui.getSelectionState().cells[0]);\n\t\t\n\t\tif (state != null)\n\t\t{\n\t\t\treturn mxUtils.getValue(state.style, colorKey, null);\n\t\t}\n\t\t\n\t\treturn null;\n\t}, function(color)\n\t{\n\t\tgraph.getModel().beginUpdate();\n\t\ttry\n\t\t{\n\t\t\tvar cells = ui.getSelectionState().cells;\n\t\t\tgraph.setCellStyles(colorKey, color, cells);\n\n\t\t\tif (setStyleFn != null)\n\t\t\t{\n\t\t\t\tsetStyleFn(color);\n\t\t\t}\n\t\t\t\n\t\t\tui.fireEvent(new mxEventObject('styleChanged', 'keys', [colorKey],\n\t\t\t\t'values', [color], 'cells', cells));\n\t\t}\n\t\tfinally\n\t\t{\n\t\t\tgraph.getModel().endUpdate();\n\t\t}\n\t}, defaultColor || mxConstants.NONE,\n\t{\n\t\tinstall: function(apply)\n\t\t{\n\t\t\tthis.listener = function()\n\t\t\t{\n\t\t\t\t// Seems to be null sometimes, not sure why...\n\t\t\t\tvar state = graph.view.getState(ui.getSelectionState().cells[0]);\n\t\t\t\t\n\t\t\t\tif (state != null)\n\t\t\t\t{\n\t\t\t\t\tapply(mxUtils.getValue(state.style, colorKey, null), true);\n\t\t\t\t}\n\t\t\t};\n\t\t\t\n\t\t\tgraph.getModel().addListener(mxEvent.CHANGE, this.listener);\n\t\t},\n\t\tdestroy: function()\n\t\t{\n\t\t\tgraph.getModel().removeListener(this.listener);\n\t\t}\n\t}, callbackFn, null, defaultColorValue);\n};\n\n/**\n * \n */\nBaseFormatPanel.prototype.addArrow = function(elt)\n{\n\telt.className = 'geColorBtn';\n\telt.style.display = 'inline-flex';\n\telt.style.alignItems = 'top';\n\telt.style.boxSizing = 'border-box';\n\telt.style.width = '64px';\n\telt.style.height = '22px';\n\telt.style.borderWidth = '1px';\n\telt.style.borderStyle = 'solid';\n\telt.style.margin = '2px 2px 2px 3px';\n\n\tvar arrow = document.createElement('div');\n\tarrow.className = 'geAdaptiveAsset';\n\tarrow.style.display = 'inline-block';\n\tarrow.style.backgroundImage = 'url(' + Editor.thinExpandImage + ')';\n\tarrow.style.backgroundRepeat = 'no-repeat';\n\tarrow.style.backgroundPosition = '-2px 1px';\n\tarrow.style.backgroundSize = '18px 18px';\n\tarrow.style.opacity = '0.5';\n\tarrow.style.height = '100%';\n\tarrow.style.width = '14px';\n\t\n\telt.appendChild(arrow);\n\n\tvar symbol = elt.getElementsByTagName('div')[0];\n\t\n\tif (symbol != null)\n\t{\n\t\tsymbol.style.display = 'inline-block';\n\t\tsymbol.style.backgroundPositionX = 'center';\n\t\tsymbol.style.textAlign = 'center';\n\t\tsymbol.style.height = '100%';\n\t\tsymbol.style.flexGrow = '1';\n\t\tsymbol.style.opacity = '0.6';\n\t}\n\n\treturn symbol;\n};\n\n/**\n * \n */\nBaseFormatPanel.prototype.addUnitInput = function(container, unit, right, width, update, step, marginTop, disableFocus, isFloat)\n{\n\tmarginTop = (marginTop != null) ? marginTop : 0;\n\t\n\tvar input = document.createElement('input');\n\tinput.style.position = 'absolute';\n\tinput.style.textAlign = 'right';\n\tinput.style.marginTop = '-2px';\n\tinput.style.left = (228 - right - width) + 'px';\n\tinput.style.width = width + 'px';\n\tinput.style.height = '21px';\n\tinput.style.borderWidth = '1px';\n\tinput.style.borderStyle = 'solid';\n\tinput.style.boxSizing = 'border-box';\n\n\tcontainer.appendChild(input);\n\t\n\tvar stepper = this.createStepper(input, update, step, null, disableFocus, null, isFloat);\n\tstepper.style.marginTop = (marginTop - 2) + 'px';\n\tstepper.style.left = (228 - right) + 'px';\n\tcontainer.appendChild(stepper);\n\n\treturn input;\n};\n\n/**\n * \n */\nBaseFormatPanel.prototype.addGenericInput = function(container, unit, left, width, readFn, writeFn)\n{\n\tvar graph = this.editorUi.editor.graph;\n\n\tvar update = function()\n\t{\n\t\twriteFn(input.value);\n\t};\n\n\tvar input = this.addUnitInput(container, unit, left, width, update);\n\n\tvar listener = mxUtils.bind(this, function(sender, evt, force)\n\t{\n\t\tif (force || input != document.activeElement)\n\t\t{\n\t\t\tinput.value = readFn() + unit;\n\t\t}\n\t});\n\t\n\tmxEvent.addListener(input, 'keydown', function(e)\n\t{\n\t\tif (e.keyCode == 13)\n\t\t{\n\t\t\tgraph.container.focus();\n\t\t\tmxEvent.consume(e);\n\t\t}\n\t\telse if (e.keyCode == 27)\n\t\t{\n\t\t\tlistener(null, null, true);\n\t\t\tgraph.container.focus();\n\t\t\tmxEvent.consume(e);\n\t\t}\n\t});\n\t\n\tgraph.getModel().addListener(mxEvent.CHANGE, listener);\n\tthis.listeners.push({destroy: function() { graph.getModel().removeListener(listener); }});\n\tlistener();\n\n\tmxEvent.addListener(input, 'blur', update);\n\tmxEvent.addListener(input, 'change', update);\n\n\treturn input;\n};\n\n/**\n * \n */\nBaseFormatPanel.prototype.createRelativeOption = function(label, key, width, handler, init)\n{\n\twidth = (width != null) ? width : 52;\n\t\n\tvar ui = this.editorUi;\n\tvar graph = ui.editor.graph;\n\tvar div = this.createPanel();\n\tdiv.style.paddingTop = '10px';\n\tdiv.style.paddingBottom = '12px';\n\tmxUtils.write(div, label);\n\tdiv.style.fontWeight = 'bold';\n\t\n\tvar update = mxUtils.bind(this, function(evt)\n\t{\n\t\tif (handler != null)\n\t\t{\n\t\t\thandler(input);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tvar value = parseInt(input.value);\n\t\t\tvalue = Math.min(100, Math.max(0, (isNaN(value)) ? 100 : value));\n\t\t\tvar state = graph.view.getState(ui.getSelectionState().cells[0]);\n\t\t\t\n\t\t\tif (state != null && value != mxUtils.getValue(state.style, key, 100))\n\t\t\t{\n\t\t\t\t// Removes entry in style (assumes 100 is default for relative values)\n\t\t\t\tif (value == 100)\n\t\t\t\t{\n\t\t\t\t\tvalue = null;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tvar cells = ui.getSelectionState().cells;\n\t\t\t\tgraph.setCellStyles(key, value, cells);\n\t\t\t\tthis.editorUi.fireEvent(new mxEventObject('styleChanged', 'keys', [key],\n\t\t\t\t\t'values', [value], 'cells', cells));\n\t\t\t}\n\t\n\t\t\tinput.value = ((value != null) ? value : '100') + ' %';\n\t\t}\n\t\t\n\t\tmxEvent.consume(evt);\n\t});\n\n\tvar input = this.addUnitInput(div, '%', 16, width, update, 10,\n\t\t(mxClient.IS_MAC && mxClient.IS_GC) ? -14 :\n\t\t((mxClient.IS_WIN) ? -16 : -15), handler != null);\n\n\tif (key != null)\n\t{\n\t\tvar listener = mxUtils.bind(this, function(sender, evt, force)\n\t\t{\n\t\t\tif (force || input != document.activeElement)\n\t\t\t{\n\t\t\t\tvar ss = ui.getSelectionState();\n\t\t\t\tvar tmp = parseInt(mxUtils.getValue(ss.style, key, 100));\n\t\t\t\tinput.value = (isNaN(tmp)) ? '' : tmp + ' %';\n\t\t\t}\n\t\t});\n\t\t\n\t\tmxEvent.addListener(input, 'keydown', function(e)\n\t\t{\n\t\t\tif (e.keyCode == 13)\n\t\t\t{\n\t\t\t\tgraph.container.focus();\n\t\t\t\tmxEvent.consume(e);\n\t\t\t}\n\t\t\telse if (e.keyCode == 27)\n\t\t\t{\n\t\t\t\tlistener(null, null, true);\n\t\t\t\tgraph.container.focus();\n\t\t\t\tmxEvent.consume(e);\n\t\t\t}\n\t\t});\n\t\t\n\t\tgraph.getModel().addListener(mxEvent.CHANGE, listener);\n\t\tthis.listeners.push({destroy: function() { graph.getModel().removeListener(listener); }});\n\t\tlistener();\n\t}\n\n\tmxEvent.addListener(input, 'blur', update);\n\tmxEvent.addListener(input, 'change', update);\n\t\n\tif (init != null)\n\t{\n\t\tinit(input);\n\t}\n\n\treturn div;\n};\n\n/**\n * \n */\nBaseFormatPanel.prototype.addLabel = function(div, title, right, width)\n{\n\twidth = (width != null) ? width : 61;\n\t\n\tvar label = document.createElement('div');\n\tmxUtils.write(label, title);\n\tlabel.style.position = 'absolute';\n\tlabel.style.left = (240 - right - width) + 'px';\n\tlabel.style.width = width + 'px';\n\tlabel.style.marginTop = '6px';\n\tlabel.style.display = 'flex';\n\tlabel.style.justifyContent = 'center';\n\tdiv.appendChild(label);\n\n\treturn label;\n};\n\n/**\n * \n */\nBaseFormatPanel.prototype.addKeyHandler = function(input, listener)\n{\n\tmxEvent.addListener(input, 'keydown', mxUtils.bind(this, function(e)\n\t{\n\t\tif (e.keyCode == 13)\n\t\t{\n\t\t\tthis.editorUi.editor.graph.container.focus();\n\t\t\tmxEvent.consume(e);\n\t\t}\n\t\telse if (e.keyCode == 27)\n\t\t{\n\t\t\tif (listener != null)\n\t\t\t{\n\t\t\t\tlistener(null, null, true);\t\t\t\t\n\t\t\t}\n\n\t\t\tthis.editorUi.editor.graph.container.focus();\n\t\t\tmxEvent.consume(e);\n\t\t}\n\t}));\n};\n\n/**\n * \n */\nBaseFormatPanel.prototype.styleButtons = function(elts)\n{\n\tfor (var i = 0; i < elts.length; i++)\n\t{\n\t\tmxUtils.setPrefixedStyle(elts[i].style, 'borderRadius', '3px');\n\t\tmxUtils.setOpacity(elts[i], 100);\n\t\telts[i].style.border = '1px solid #a0a0a0';\n\t\telts[i].style.padding = '4px';\n\t\telts[i].style.paddingTop = '3px';\n\t\telts[i].style.paddingRight = '1px';\n\t\telts[i].style.margin = '1px';\n\t\telts[i].style.marginRight = '2px';\n\t\telts[i].style.width = '24px';\n\t\telts[i].style.height = '20px';\n\t\telts[i].className += ' geColorBtn';\n\t}\n};\n\n/**\n * Adds the label menu items to the given menu and parent.\n */\nBaseFormatPanel.prototype.destroy = function()\n{\n\tif (this.listeners != null)\n\t{\n\t\tfor (var i = 0; i < this.listeners.length; i++)\n\t\t{\n\t\t\tthis.listeners[i].destroy();\n\t\t}\n\t\t\n\t\tthis.listeners = null;\n\t}\n};\n\n/**\n * Adds the label menu items to the given menu and parent.\n */\nArrangePanel = function(format, editorUi, container)\n{\n\tBaseFormatPanel.call(this, format, editorUi, container);\n\tthis.init();\n};\n\nmxUtils.extend(ArrangePanel, BaseFormatPanel);\n\n/**\n * Adds the label menu items to the given menu and parent.\n */\nArrangePanel.prototype.init = function()\n{\n\tvar ss = this.editorUi.getSelectionState();\n\n\tif (ss.cells.length > 0)\n\t{\n\t\tthis.container.appendChild(this.addLayerOps(this.createPanel()));\n\t\t\n\t\t// Special case that adds two panels\n\t\tthis.addGeometry(this.container);\n\t\tthis.addEdgeGeometry(this.container);\n\t\n\t\tif (!ss.containsLabel || ss.edges.length == 0)\n\t\t{\n\t\t\tthis.container.appendChild(this.addAngle(this.createPanel()));\n\t\t}\n\t\t\n\t\tif (!ss.containsLabel)\n\t\t{\n\t\t\tthis.container.appendChild(this.addFlip(this.createPanel()));\n\t\t}\n\n\t\tthis.container.appendChild(this.addAlign(this.createPanel()));\n\t\t\n\t\tif (ss.vertices.length > 1 && !ss.cell && !ss.row)\n\t\t{\n\t\t\tthis.container.appendChild(this.addDistribute(this.createPanel()));\n\t\t}\n\n\t\tthis.container.appendChild(this.addTable(this.createPanel()));\n\t}\n\t\n\t// Allows to lock/unload button to be added\n\tthis.container.appendChild(this.addGroupOps(this.createPanel()));\n\n\tif (ss.containsLabel)\n\t{\n\t\t// Adds functions from hidden style format panel\n\t\tvar span = document.createElement('div');\n\t\tspan.style.width = '100%';\n\t\tspan.style.marginTop = '0px';\n\t\tspan.style.fontWeight = 'bold';\n\t\tspan.style.padding = '10px 0 0 14px';\n\t\tmxUtils.write(span, mxResources.get('style'));\n\t\tthis.container.appendChild(span);\n\t\t\t\n\t\tnew StyleFormatPanel(this.format, this.editorUi, this.container);\n\t}\n};\n\n/**\n * \n */\nArrangePanel.prototype.addTable = function(div)\n{\n\tvar ui = this.editorUi;\n\tvar editor = ui.editor;\n\tvar graph = editor.graph;\n\tvar ss = ui.getSelectionState();\n\tdiv.style.paddingTop = '6px';\n\tdiv.style.paddingBottom = '10px';\n\n\tvar span = document.createElement('div');\n\tspan.style.marginTop = '0px';\n\tspan.style.marginBottom = '6px';\n\tspan.style.fontWeight = 'bold';\n\tmxUtils.write(span, mxResources.get('table'));\n\tdiv.appendChild(span);\n\t\n\tvar panel = document.createElement('div');\n\tpanel.style.position = 'relative';\n\tpanel.style.paddingLeft = '0px';\n\tpanel.style.borderWidth = '0px';\n\tpanel.style.width = '220px';\n\tpanel.className = 'geToolbarContainer';\n\n\tvar cell = ss.vertices[0];\n\n\tif (graph.getSelectionCount() > 1)\n\t{\n\t\tif (graph.isTableCell(cell))\n\t\t{\n\t\t\tcell = graph.model.getParent(cell);\n\t\t}\n\n\t\tif (graph.isTableRow(cell))\n\t\t{\n\t\t\tcell = graph.model.getParent(cell);\n\t\t}\n\t}\n\n\tvar isTable = ss.table || ss.row || ss.cell;\n\tvar isStack = graph.isStack(cell) ||\n\t\tgraph.isStackChild(cell);\n\n\tvar showCols = isTable;\n\tvar showRows = isTable;\n\n\tif (isStack)\n\t{\n\t\tvar style = (graph.isStack(cell)) ? ss.style :\n\t\t\tgraph.getCellStyle(graph.model.getParent(cell));\n\n\t\tshowRows = style['horizontalStack'] == '0';\n\t\tshowCols = !showRows;\n\t}\n\n\tvar btns = [];\n\n\tif (showCols)\n\t{\n\t\tbtns = btns.concat([\n\t\t\tui.toolbar.addButton('geSprite-insertcolumnbefore', mxResources.get('insertColumnBefore'),\n\t\t\tmxUtils.bind(this, function()\n\t\t\t{\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tif (isStack)\n\t\t\t\t\t{\n\t\t\t\t\t\tgraph.insertLane(cell, true);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tgraph.insertTableColumn(cell, true);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcatch (e)\n\t\t\t\t{\n\t\t\t\t\tui.handleError(e);\n\t\t\t\t}\n\t\t\t}), panel),\n\t\t\tui.toolbar.addButton('geSprite-insertcolumnafter', mxResources.get('insertColumnAfter'),\n\t\t\tmxUtils.bind(this, function()\n\t\t\t{\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tif (isStack)\n\t\t\t\t\t{\n\t\t\t\t\t\tgraph.insertLane(cell, false);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tgraph.insertTableColumn(cell, false);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcatch (e)\n\t\t\t\t{\n\t\t\t\t\tui.handleError(e);\n\t\t\t\t}\n\t\t\t}), panel),\n\t\t\tui.toolbar.addButton('geSprite-deletecolumn', mxResources.get('deleteColumn'),\n\t\t\tmxUtils.bind(this, function()\n\t\t\t{\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tif (isStack)\n\t\t\t\t\t{\n\t\t\t\t\t\tgraph.deleteLane(cell);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tgraph.deleteTableColumn(cell);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcatch (e)\n\t\t\t\t{\n\t\t\t\t\tui.handleError(e);\n\t\t\t\t}\n\t\t\t}), panel)]);\n\t}\n\n\tif (showRows)\n\t{\n\t\tbtns = btns.concat([ui.toolbar.addButton('geSprite-insertrowbefore', mxResources.get('insertRowBefore'),\n\t\t\tmxUtils.bind(this, function()\n\t\t\t{\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tif (isStack)\n\t\t\t\t\t{\n\t\t\t\t\t\tgraph.insertLane(cell, true);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tgraph.insertTableRow(cell, true);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcatch (e)\n\t\t\t\t{\n\t\t\t\t\tui.handleError(e);\n\t\t\t\t}\n\t\t\t}), panel),\n\t\t\tui.toolbar.addButton('geSprite-insertrowafter', mxResources.get('insertRowAfter'),\n\t\t\tmxUtils.bind(this, function()\n\t\t\t{\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tif (isStack)\n\t\t\t\t\t{\n\t\t\t\t\t\tgraph.insertLane(cell, false);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tgraph.insertTableRow(cell, false);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcatch (e)\n\t\t\t\t{\n\t\t\t\t\tui.handleError(e);\n\t\t\t\t}\n\t\t\t}), panel),\n\t\t\tui.toolbar.addButton('geSprite-deleterow', mxResources.get('deleteRow'),\n\t\t\tmxUtils.bind(this, function()\n\t\t\t{\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tif (isStack)\n\t\t\t\t\t{\n\t\t\t\t\t\tgraph.deleteLane(cell);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tgraph.deleteTableRow(cell);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcatch (e)\n\t\t\t\t{\n\t\t\t\t\tui.handleError(e);\n\t\t\t\t}\n\t\t\t}), panel)]);\n\t}\n\n\tif (btns.length > 0)\n\t{\n\t\tthis.styleButtons(btns);\n\t\tdiv.appendChild(panel);\n\n\t\tif (btns.length > 3)\n\t\t{\n\t\t\tbtns[2].style.marginRight = '10px';\n\t\t}\n\n\t\tvar count = 0;\n\n\t\tif (ss.mergeCell != null)\n\t\t{\n\t\t\tcount += this.addActions(div, ['mergeCells']);\n\t\t}\n\t\telse if (ss.style['colspan'] > 1 || ss.style['rowspan'] > 1)\n\t\t{\n\t\t\tcount += this.addActions(div, ['unmergeCells']);\n\t\t}\n\n\t\tif (count > 0)\n\t\t{\n\t\t\tpanel.style.paddingBottom = '2px';\n\t\t}\n\t}\n\telse\n\t{\n\t\tdiv.style.display = 'none';\n\t}\n\t\n\treturn div;\n};\n\n/**\n * \n */\nArrangePanel.prototype.addLayerOps = function(div)\n{\n\tthis.addActions(div, ['toFront', 'toBack']);\n\tthis.addActions(div, ['bringForward', 'sendBackward']);\n\t\n\treturn div;\n};\n\n/**\n * \n */\nArrangePanel.prototype.addGroupOps = function(div)\n{\n\tvar ui = this.editorUi;\n\tvar graph = ui.editor.graph;\n\tvar ss = ui.getSelectionState();\n\t\n\tdiv.style.paddingTop = '8px';\n\tdiv.style.paddingBottom = '6px';\n\n\tvar count = 0;\n\t\n\tif (!ss.cell && !ss.row)\n\t{\n\t\tcount += this.addActions(div, ['group', 'ungroup', 'copySize', 'pasteSize']) +\n\t\t\tthis.addActions(div, ['removeFromGroup']);\n\t}\n\n\tvar clearWaypoints = this.addAction(div, 'clearWaypoints');\n\n\tif (clearWaypoints != null)\n\t{\n\t\tmxUtils.br(div);\n\t\tclearWaypoints.setAttribute('title', mxResources.get('clearWaypoints') +\n\t\t\t' (' + this.editorUi.actions.get('clearWaypoints').shortcut + ')' +\n\t\t\t' Shift+Click to Clear Anchor Points');\n\t\tcount++;\n\t}\n\n\tcount += this.addActions(div, ['lockUnlock']);\n\n\tif (count == 0)\n\t{\n\t\tdiv.style.display = 'none';\n\t}\n\t\n\treturn div;\n};\n\n/**\n * \n */\nArrangePanel.prototype.addAlign = function(div)\n{\n\tvar ss = this.editorUi.getSelectionState();\n\tvar graph = this.editorUi.editor.graph;\n\tdiv.style.paddingTop = '6px';\n\tdiv.style.paddingBottom = '8px';\n\tdiv.appendChild(this.createTitle(mxResources.get('align')));\n\t\n\tvar stylePanel = document.createElement('div');\n\tstylePanel.style.position = 'relative';\n\tstylePanel.style.whiteSpace = 'nowrap';\n\tstylePanel.style.paddingLeft = '0px';\n\tstylePanel.style.paddingBottom = '2px';\n\tstylePanel.style.borderWidth = '0px';\n\tstylePanel.style.width = '220px';\n\tstylePanel.className = 'geToolbarContainer';\n\n\tif (ss.vertices.length > 1)\n\t{\n\t\tvar left = this.editorUi.toolbar.addButton('geSprite-alignleft', mxResources.get('left'),\n\t\t\tfunction() { graph.alignCells(mxConstants.ALIGN_LEFT); }, stylePanel);\n\t\tvar center = this.editorUi.toolbar.addButton('geSprite-aligncenter', mxResources.get('center'),\n\t\t\tfunction() { graph.alignCells(mxConstants.ALIGN_CENTER); }, stylePanel);\n\t\tvar right = this.editorUi.toolbar.addButton('geSprite-alignright', mxResources.get('right'),\n\t\t\tfunction() { graph.alignCells(mxConstants.ALIGN_RIGHT); }, stylePanel);\n\n\t\tvar top = this.editorUi.toolbar.addButton('geSprite-aligntop', mxResources.get('top'),\n\t\t\tfunction() { graph.alignCells(mxConstants.ALIGN_TOP); }, stylePanel);\n\t\tvar middle = this.editorUi.toolbar.addButton('geSprite-alignmiddle', mxResources.get('middle'),\n\t\t\tfunction() { graph.alignCells(mxConstants.ALIGN_MIDDLE); }, stylePanel);\n\t\tvar bottom = this.editorUi.toolbar.addButton('geSprite-alignbottom', mxResources.get('bottom'),\n\t\t\tfunction() { graph.alignCells(mxConstants.ALIGN_BOTTOM); }, stylePanel);\n\t\t\n\t\tthis.styleButtons([left, center, right, top, middle, bottom]);\n\t\t\tright.style.marginRight = '10px';\n\t}\n\n\tdiv.appendChild(stylePanel);\n\tthis.addActions(div, ['snapToGrid']);\n\t\n\treturn div;\n};\n\n/**\n * \n */\nArrangePanel.prototype.addFlip = function(div)\n{\n\tvar ui = this.editorUi;\n\tvar editor = ui.editor;\n\tvar graph = editor.graph;\n\tdiv.style.paddingTop = '6px';\n\tdiv.style.paddingBottom = '10px';\n\tvar ss = this.editorUi.getSelectionState();\n\n\tvar span = document.createElement('div');\n\tspan.style.marginTop = '2px';\n\tspan.style.marginBottom = '8px';\n\tspan.style.fontWeight = 'bold';\n\tmxUtils.write(span, mxResources.get('flip'));\n\tdiv.appendChild(span);\n\t\n\tvar btn = mxUtils.button(mxResources.get('horizontal'), function(evt)\n\t{\n\t\tgraph.flipCells(ss.cells, true);\n\t})\n\t\n\tbtn.setAttribute('title', mxResources.get('horizontal'));\n\tbtn.style.width = '104px';\n\tbtn.style.marginRight = '2px';\n\tdiv.appendChild(btn);\n\t\n\tvar btn = mxUtils.button(mxResources.get('vertical'), function(evt)\n\t{\n\t\tgraph.flipCells(ss.cells, false);\n\t})\n\t\n\tbtn.setAttribute('title', mxResources.get('vertical'));\n\tbtn.style.width = '104px';\n\tdiv.appendChild(btn);\n\t\n\treturn div;\n};\n\n/**\n * \n */\nArrangePanel.prototype.addDistribute = function(div)\n{\n\tvar ui = this.editorUi;\n\tvar editor = ui.editor;\n\tvar graph = editor.graph;\n\tdiv.style.paddingTop = '6px';\n\tdiv.style.paddingBottom = '8px';\n\t\n\tdiv.appendChild(this.createTitle(mxResources.get('distribute')));\n\n\tvar btn = mxUtils.button(mxResources.get('horizontal'), function(evt)\n\t{\n\t\tgraph.distributeCells(true, null, cb.checked);\n\t})\n\t\n\tbtn.setAttribute('title', mxResources.get('horizontal'));\n\tbtn.style.width = '104px';\n\tbtn.style.marginRight = '2px';\n\tdiv.appendChild(btn);\n\t\n\tvar btn = mxUtils.button(mxResources.get('vertical'), function(evt)\n\t{\n\t\tgraph.distributeCells(false, null, cb.checked);\n\t})\n\t\n\tbtn.setAttribute('title', mxResources.get('vertical'));\n\tbtn.style.width = '104px';\n\tdiv.appendChild(btn);\n\t\n\tmxUtils.br(div);\n\n\tvar panel = document.createElement('div');\n\tpanel.style.margin = '6px 0 0 0';\n\tpanel.style.display = 'flex';\n\tpanel.style.justifyContent = 'center';\n\tpanel.style.alignItems = 'center';\n\n\tvar cb = document.createElement('input');\n\tcb.setAttribute('type', 'checkbox');\n\tcb.setAttribute('id', 'spacingCheckbox');\n\tcb.style.margin = '0 6px 0 0';\n\tpanel.appendChild(cb);\n\n\tvar label = document.createElement('label');\n\tlabel.style.verticalAlign = 'top';\n\tlabel.setAttribute('for', 'spacingCheckbox');\n\tlabel.style.userSelect = 'none';\n\tmxUtils.write(label, mxResources.get('spacing'));\n\tpanel.appendChild(label);\n\tdiv.appendChild(panel);\n\n\treturn div;\n};\n\n/**\n * \n */\nArrangePanel.prototype.addAngle = function(div)\n{\n\tvar ui = this.editorUi;\n\tvar editor = ui.editor;\n\tvar graph = editor.graph;\n\tvar ss = ui.getSelectionState();\n\n\tdiv.style.paddingBottom = '12px';\n\t\n\tvar span = document.createElement('div');\n\tspan.style.position = 'absolute';\n\tspan.style.width = '70px';\n\tspan.style.marginTop = '0px';\n\tspan.style.fontWeight = 'bold';\n\t\n\tvar input = null;\n\tvar update = null;\n\tvar btn = null;\n\t\n\tif (ss.rotatable && !ss.table && !ss.row && !ss.cell)\n\t{\n\t\tmxUtils.write(span, mxResources.get('angle'));\n\t\tdiv.appendChild(span);\n\t\t\n\t\tinput = this.addUnitInput(div, '°', 16, 52, function()\n\t\t{\n\t\t\tupdate.apply(this, arguments);\n\t\t});\n\t\t\n\t\tmxUtils.br(div);\n\t\tdiv.style.paddingTop = '10px';\n\t}\n\telse\n\t{\n\t\tdiv.style.paddingTop = '8px';\n\t}\n\n\tif (!ss.containsLabel)\n\t{\n\t\tvar label = mxResources.get('reverse');\n\t\t\n\t\tif (ss.vertices.length > 0 && ss.edges.length > 0)\n\t\t{\n\t\t\tlabel = mxResources.get('turn') + ' / ' + label;\n\t\t}\n\t\telse if (ss.vertices.length > 0)\n\t\t{\n\t\t\tlabel = mxResources.get('turn');\n\t\t}\n\n\t\tbtn = mxUtils.button(label, function(evt)\n\t\t{\n\t\t\tui.actions.get('turn').funct(evt);\n\t\t})\n\t\t\n\t\tbtn.setAttribute('title', label + ' (' + this.editorUi.actions.get('turn').shortcut + ')');\n\t\tbtn.style.width = '210px';\n\t\tdiv.appendChild(btn);\n\t\t\n\t\tif (input != null)\n\t\t{\n\t\t\tbtn.style.marginTop = '8px';\n\t\t}\n\t}\n\t\n\tif (input != null)\n\t{\n\t\tvar listener = mxUtils.bind(this, function(sender, evt, force)\n\t\t{\n\t\t\tif (force || document.activeElement != input)\n\t\t\t{\n\t\t\t\tss = ui.getSelectionState();\n\t\t\t\tvar tmp = parseFloat(mxUtils.getValue(ss.style, mxConstants.STYLE_ROTATION, 0));\n\t\t\t\tinput.value = (isNaN(tmp)) ? '' : tmp  + '°';\n\t\t\t}\n\t\t});\n\t\n\t\tupdate = this.installInputHandler(input, mxConstants.STYLE_ROTATION, 0, 0, 360, '°', null, true);\n\t\tthis.addKeyHandler(input, listener);\n\t\n\t\tgraph.getModel().addListener(mxEvent.CHANGE, listener);\n\t\tthis.listeners.push({destroy: function() { graph.getModel().removeListener(listener); }});\n\t\tlistener();\n\t}\n\n\treturn div;\n};\n\nBaseFormatPanel.prototype.getUnit = function()\n{\n\tvar unit = this.editorUi.editor.graph.view.unit;\n\t\n\tswitch(unit)\n\t{\n\t\tcase mxConstants.POINTS:\n\t\t\treturn 'pt';\n\t\tcase mxConstants.INCHES:\n\t\t\treturn '\"';\n\t\tcase mxConstants.MILLIMETERS:\n\t\t\treturn 'mm';\n\t\tcase mxConstants.METERS:\n\t\t\treturn 'm';\n\t}\n};\n\nBaseFormatPanel.prototype.inUnit = function(pixels)\n{\n\treturn this.editorUi.editor.graph.view.formatUnitText(pixels);\n};\n\nBaseFormatPanel.prototype.fromUnit = function(value)\n{\n\tvar unit = this.editorUi.editor.graph.view.unit;\n\t\n\tswitch(unit)\n\t{\n\t\tcase mxConstants.POINTS:\n\t\t\treturn value;\n\t\tcase mxConstants.INCHES:\n\t\t\treturn value * mxConstants.PIXELS_PER_INCH;\n\t\tcase mxConstants.MILLIMETERS:\n\t\t\treturn value * mxConstants.PIXELS_PER_MM;\n\t\tcase mxConstants.METERS:\n\t\t\treturn value * mxConstants.PIXELS_PER_MM * 1000;\n\t}\n};\n\nBaseFormatPanel.prototype.isFloatUnit = function()\n{\n\treturn this.editorUi.editor.graph.view.unit != mxConstants.POINTS;\n};\n\nBaseFormatPanel.prototype.getUnitStep = function()\n{\n\tvar unit = this.editorUi.editor.graph.view.unit;\n\t\n\tswitch(unit)\n\t{\n\t\tcase mxConstants.POINTS:\n\t\t\treturn 1;\n\t\tcase mxConstants.INCHES:\n\t\t\treturn 0.1;\n\t\tcase mxConstants.MILLIMETERS:\n\t\t\treturn 0.5;\n\t\tcase mxConstants.METERS:\n\t\t\treturn 0.001;\n\t}\n};\n\n/**\n * \n */\nArrangePanel.prototype.addGeometry = function(container)\n{\n\tvar panel = this;\n\tvar ui = this.editorUi;\n\tvar graph = ui.editor.graph;\n\tvar model = graph.getModel();\n\tvar rect = ui.getSelectionState();\n\n\tvar div = this.createPanel();\n\tdiv.style.paddingBottom = '8px';\n\t\t\n\tvar span = document.createElement('div');\n\tspan.style.position = 'absolute';\n\tspan.style.width = '50px';\n\tspan.style.marginTop = '0px';\n\tspan.style.fontWeight = 'bold';\n\tmxUtils.write(span, mxResources.get('size'));\n\tdiv.appendChild(span);\n\n\tvar widthUpdate, heightUpdate, leftUpdate, topUpdate;\n\tvar width = this.addUnitInput(div, this.getUnit(), 87, 52, function()\n\t{\n\t\twidthUpdate.apply(this, arguments);\n\t}, this.getUnitStep(), null, null, this.isFloatUnit());\n\tvar height = this.addUnitInput(div, this.getUnit(), 16, 52, function()\n\t{\n\t\theightUpdate.apply(this, arguments);\n\t}, this.getUnitStep(), null, null, this.isFloatUnit());\n\t\n\tvar autosizeBtn = document.createElement('div');\n\tautosizeBtn.className = 'geSprite geSprite-fit';\n\tautosizeBtn.setAttribute('title', mxResources.get('autosize') + ' (' + this.editorUi.actions.get('autosize').shortcut + ')');\n\tautosizeBtn.style.position = 'relative';\n\tautosizeBtn.style.cursor = 'pointer';\n\tautosizeBtn.style.marginTop = '-3px';\n\tautosizeBtn.style.border = '0px';\n\tautosizeBtn.style.left = '42px';\n\tmxUtils.setOpacity(autosizeBtn, 50);\n\t\n\tmxEvent.addListener(autosizeBtn, 'mouseenter', function()\n\t{\n\t\tmxUtils.setOpacity(autosizeBtn, 100);\n\t});\n\t\n\tmxEvent.addListener(autosizeBtn, 'mouseleave', function()\n\t{\n\t\tmxUtils.setOpacity(autosizeBtn, 50);\n\t});\n\n\tmxEvent.addListener(autosizeBtn, 'click', function()\n\t{\n\t\tui.actions.get('autosize').funct();\n\t});\n\t\n\tdiv.appendChild(autosizeBtn);\n\t\n\tif (rect.row)\n\t{\n\t\twidth.style.visibility = 'hidden';\n\t\twidth.nextSibling.style.visibility = 'hidden';\n\t}\n\telse\n\t{\n\t\tthis.addLabel(div, mxResources.get('width'), 87, 64);\n\t}\n\t\n\tthis.addLabel(div, mxResources.get('height'), 16, 64);\n\tmxUtils.br(div);\n\n\tvar wrapper = document.createElement('div');\n\twrapper.style.paddingTop = '8px';\n\twrapper.style.paddingRight = '20px';\n\twrapper.style.whiteSpace = 'nowrap';\n\twrapper.style.textAlign = 'right';\n\tvar opt = this.createCellOption(mxResources.get('constrainProportions'),\n\t\tmxConstants.STYLE_ASPECT, null, 'fixed', 'null');\n\topt.style.width = '210px';\n\twrapper.appendChild(opt);\n\t\t\n\tif (!rect.cell && !rect.row)\n\t{\n\t\tdiv.appendChild(wrapper);\n\t}\n\telse\n\t{\n\t\tautosizeBtn.style.visibility = 'hidden';\n\t}\n\t\n\tvar constrainCheckbox = opt.getElementsByTagName('input')[0];\n\tthis.addKeyHandler(width, listener);\n\tthis.addKeyHandler(height, listener);\n\t\n\twidthUpdate = this.addGeometryHandler(width, function(geo, value, cell)\n\t{\n\t\tif (graph.isTableCell(cell))\n\t\t{\n\t\t\tgraph.setTableColumnWidth(cell, value - geo.width, true);\n\t\t\t\n\t\t\t// Blocks processing in caller\n\t\t\treturn true;\n\t\t}\n\t\telse if (geo.width > 0)\n\t\t{\n\t\t\tvar value = Math.max(1, panel.fromUnit(value));\n\t\t\t\n\t\t\tif (constrainCheckbox.checked)\n\t\t\t{\n\t\t\t\tgeo.height = Math.round((geo.height * value * 100) / geo.width) / 100;\n\t\t\t}\n\t\t\t\n\t\t\tgeo.width = value;\n\t\t}\n\t});\n\theightUpdate = this.addGeometryHandler(height, function(geo, value, cell)\n\t{\n\t\tif (graph.isTableCell(cell))\n\t\t{\n\t\t\tcell = model.getParent(cell);\n\t\t}\n\t\t\n\t\tif (graph.isTableRow(cell))\n\t\t{\n\t\t\tgraph.setTableRowHeight(cell, value - geo.height);\n\t\t\t\n\t\t\t// Blocks processing in caller\n\t\t\treturn true;\n\t\t}\n\t\telse if (geo.height > 0)\n\t\t{\n\t\t\tvar value = Math.max(1, panel.fromUnit(value));\n\t\t\t\n\t\t\tif (constrainCheckbox.checked)\n\t\t\t{\n\t\t\t\tgeo.width = Math.round((geo.width  * value * 100) / geo.height) / 100;\n\t\t\t}\n\t\t\t\n\t\t\tgeo.height = value;\n\t\t}\n\t});\n\t\n\tif (rect.resizable || rect.row || rect.cell)\n\t{\n\t\tcontainer.appendChild(div);\n\t}\n\t\n\tvar div2 = this.createPanel();\n\tdiv2.style.paddingBottom = '30px';\n\t\n\tvar span = document.createElement('div');\n\tspan.style.position = 'absolute';\n\tspan.style.width = '70px';\n\tspan.style.marginTop = '0px';\n\tspan.style.fontWeight = 'bold';\n\tmxUtils.write(span, mxResources.get('position'));\n\tdiv2.appendChild(span);\n\n\tvar left = this.addUnitInput(div2, this.getUnit(), 87, 52, function()\n\t{\n\t\tleftUpdate.apply(this, arguments);\n\t}, this.getUnitStep(), null, null, this.isFloatUnit());\n\tvar top = this.addUnitInput(div2, this.getUnit(), 16, 52, function()\n\t{\n\t\ttopUpdate.apply(this, arguments);\n\t}, this.getUnitStep(), null, null, this.isFloatUnit());\n\n\tmxUtils.br(div2);\n\t\n\tvar coordinateLabels = true;\n\tvar dx = null;\n\tvar dy = null;\n\n\tif (rect.movable)\n\t{\n\t\tif (rect.edges.length == 0 && rect.vertices.length == 1)\n\t\t{\n\t\t\tvar geo = graph.getCellGeometry(rect.vertices[0]);\n\n\t\t\tif (geo != null && geo.relative)\n\t\t\t{\n\t\t\t\tmxUtils.br(div2);\n\n\t\t\t\tvar span = document.createElement('div');\n\t\t\t\tspan.style.position = 'absolute';\n\t\t\t\tspan.style.width = '70px';\n\t\t\t\tspan.style.marginTop = '0px';\n\t\t\t\tmxUtils.write(span, mxResources.get('relative'));\n\t\t\t\tdiv2.appendChild(span);\n\n\t\t\t\tdx = this.addGenericInput(div2, ' %', 87, 52, function()\n\t\t\t\t{\n\t\t\t\t\treturn (Math.round(geo.x * 1000) / 10);\n\t\t\t\t}, function(value)\n\t\t\t\t{\n\t\t\t\t\tvalue = parseFloat(value);\n\t\t\t\t\t\n\t\t\t\t\tif (!isNaN(value))\n\t\t\t\t\t{\n\t\t\t\t\t\tmodel.beginUpdate();\n\t\t\t\t\t\ttry\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tgeo = geo.clone();\n\t\t\t\t\t\t\tgeo.x = parseFloat(value) / 100;\n\t\t\t\t\t\t\tmodel.setGeometry(rect.vertices[0], geo);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfinally\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tmodel.endUpdate();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\tif (model.isEdge(model.getParent(rect.vertices[0])))\n\t\t\t\t{\n\t\t\t\t\tcoordinateLabels = false;\n\t\t\t\t\tvar dyUpdate = null;\n\n\t\t\t\t\tdy = this.addUnitInput(div2, this.getUnit(), 16, 52, function()\n\t\t\t\t\t{\n\t\t\t\t\t\tdyUpdate.apply(this, arguments);\n\t\t\t\t\t});\n\n\t\t\t\t\tdyUpdate = this.addGeometryHandler(dy, function(geo, value)\n\t\t\t\t\t{\n\t\t\t\t\t\tconsole.log('value', value);\n\n\t\t\t\t\t\tgeo.y = panel.fromUnit(value);\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tdy = this.addGenericInput(div2, ' %', 16, 52, function()\n\t\t\t\t\t{\n\t\t\t\t\t\treturn (Math.round(geo.y * 1000) / 10);\n\t\t\t\t\t}, function(value)\n\t\t\t\t\t{\n\t\t\t\t\t\tvalue = parseFloat(value);\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (!isNaN(value))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tmodel.beginUpdate();\n\t\t\t\t\t\t\ttry\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tgeo = geo.clone();\n\t\t\t\t\t\t\t\tgeo.y = parseFloat(value) / 100;\n\t\t\t\t\t\t\t\tmodel.setGeometry(rect.vertices[0], geo);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tfinally\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tmodel.endUpdate();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\n\t\t\t\tmxUtils.br(div2);\n\t\t\t}\n\t\t}\n\t\tcontainer.appendChild(div2);\n\t}\n\n\tthis.addLabel(div2, mxResources.get(coordinateLabels ? 'left' : 'line'), 87, 64).style.marginTop = '8px';\n\tthis.addLabel(div2, mxResources.get(coordinateLabels ? 'top' : 'orthogonal'), 16, 64).style.marginTop = '8px';\n\t\n\tvar listener = mxUtils.bind(this, function(sender, evt, force)\n\t{\n\t\trect = ui.getSelectionState();\n\n\t\tif (!rect.containsLabel && rect.vertices.length == graph.getSelectionCount() &&\n\t\t\trect.width != null && rect.height != null)\n\t\t{\n\t\t\tdiv.style.display = '';\n\t\t\t\n\t\t\tif (force || document.activeElement != width)\n\t\t\t{\n\t\t\t\twidth.value = this.inUnit(rect.width) + ' ' + this.getUnit();\n\t\t\t}\n\t\t\t\n\t\t\tif (force || document.activeElement != height)\n\t\t\t{\n\t\t\t\theight.value = this.inUnit(rect.height) + ' ' + this.getUnit();\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tdiv.style.display = 'none';\n\t\t}\n\t\t\n\t\tif (rect.vertices.length == graph.getSelectionCount() &&\n\t\t\trect.vertices.length > 0 && rect.x != null &&\n\t\t\trect.y != null)\n\t\t{\n\t\t\tvar geo = graph.getCellGeometry(rect.vertices[0]);\n\t\t\tdiv2.style.display = '';\n\t\t\t\n\t\t\tif (force || document.activeElement != left)\n\t\t\t{\n\t\t\t\tleft.value = this.inUnit(rect.x) + ' ' + this.getUnit();\n\t\t\t}\n\t\t\t\n\t\t\tif (force || document.activeElement != top)\n\t\t\t{\n\t\t\t\ttop.value = this.inUnit(rect.y) + ' ' + this.getUnit();\n\t\t\t}\n\n\t\t\tif (geo != null && geo.relative)\n\t\t\t{\n\t\t\t\tif (dx != null && (force || document.activeElement != dx))\n\t\t\t\t{\n\t\t\t\t\tdx.value = (Math.round(geo.x * 1000) / 10) + ' %';\n\t\t\t\t}\n\n\t\t\t\tif (dy != null && (force || document.activeElement != dy))\n\t\t\t\t{\n\t\t\t\t\tif (model.isEdge(model.getParent(rect.vertices[0])))\n\t\t\t\t\t{\n\t\t\t\t\t\tdy.value = this.inUnit(geo.y) + ' ' + this.getUnit();\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tdy.value = (Math.round(geo.y * 1000) / 10) + ' %';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tdiv2.style.display = 'none';\n\t\t}\n\t});\n\n\tthis.listeners.push({destroy: function() { model.removeListener(listener); }});\n\tmodel.addListener(mxEvent.CHANGE, listener);\n\tthis.addKeyHandler(left, listener);\n\tthis.addKeyHandler(top, listener);\n\tlistener();\n\t\n\tleftUpdate = this.addGeometryHandler(left, function(geo, value)\n\t{\n\t\tvalue = panel.fromUnit(value);\n\t\t\n\t\tif (geo.relative)\n\t\t{\n\t\t\tgeo.offset.x = value;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tgeo.x = value;\n\t\t}\n\t});\n\ttopUpdate = this.addGeometryHandler(top, function(geo, value)\n\t{\n\t\tvalue = panel.fromUnit(value);\n\t\t\n\t\tif (geo.relative)\n\t\t{\n\t\t\tgeo.offset.y = value;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tgeo.y = value;\n\t\t}\n\t});\n\n\tif (rect.movable)\n\t{\n\t\tif (rect.edges.length == 0 && rect.vertices.length == 1 &&\n\t\t\tmodel.isEdge(model.getParent(rect.vertices[0])))\n\t\t{\n\t\t\tvar geo = graph.getCellGeometry(rect.vertices[0]);\n\t\t\t\n\t\t\tif (geo != null && geo.relative)\n\t\t\t{\n\t\t\t\tvar btn = mxUtils.button(mxResources.get('center'), mxUtils.bind(this, function(evt)\n\t\t\t\t{\n\t\t\t\t\tmodel.beginUpdate();\n\t\t\t\t\ttry\n\t\t\t\t\t{\n\t\t\t\t\t\tgeo = geo.clone();\n\t\t\t\t\t\tgeo.x = 0;\n\t\t\t\t\t\tgeo.y = 0;\n\t\t\t\t\t\tgeo.offset = new mxPoint();\n\t\t\t\t\t\tmodel.setGeometry(rect.vertices[0], geo);\n\t\t\t\t\t}\n\t\t\t\t\tfinally\n\t\t\t\t\t{\n\t\t\t\t\t\tmodel.endUpdate();\n\t\t\t\t\t}\n\t\t\t\t}));\n\t\t\t\t\n\t\t\t\tbtn.setAttribute('title', mxResources.get('center'));\n\t\t\t\tbtn.style.width = '134px';\n\t\t\t\tbtn.style.left = '89px';\n\t\t\t\tbtn.style.position = 'absolute';\n\t\t\t\tmxUtils.br(div2);\n\t\t\t\tmxUtils.br(div2);\n\t\t\t\tdiv2.appendChild(btn);\n\t\t\t}\n\t\t}\n\t\tcontainer.appendChild(div2);\n\t}\n};\n\n/**\n * \n */\nArrangePanel.prototype.addGeometryHandler = function(input, fn)\n{\n\tvar ui = this.editorUi;\n\tvar graph = ui.editor.graph;\n\tvar initialValue = null;\n\tvar panel = this;\n\t\n\tfunction update(evt)\n\t{\n\t\tif (input.value != '')\n\t\t{\n\t\t\tvar value = parseFloat(input.value);\n\n\t\t\tif (isNaN(value)) \n\t\t\t{\n\t\t\t\tinput.value = initialValue + ' ' + panel.getUnit();\n\t\t\t}\n\t\t\telse if (value != initialValue)\n\t\t\t{\n\t\t\t\tgraph.getModel().beginUpdate();\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tvar cells = ui.getSelectionState().cells;\n\t\t\t\t\t\n\t\t\t\t\tfor (var i = 0; i < cells.length; i++)\n\t\t\t\t\t{\n\t\t\t\t\t\tif (graph.getModel().isVertex(cells[i]))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tvar geo = graph.getCellGeometry(cells[i]);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif (geo != null)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tgeo = geo.clone();\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tif (!fn(geo, value, cells[i]))\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tvar state = graph.view.getState(cells[i]);\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tif (state != null && graph.isRecursiveVertexResize(state))\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tgraph.resizeChildCells(cells[i], geo);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tgraph.getModel().setGeometry(cells[i], geo);\n\t\t\t\t\t\t\t\t\tgraph.constrainChildCells(cells[i]);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tfinally\n\t\t\t\t{\n\t\t\t\t\tgraph.getModel().endUpdate();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tinitialValue = value;\n\t\t\t\tinput.value = value + ' ' + panel.getUnit();\n\t\t\t}\n\t\t}\n\t\t\n\t\tmxEvent.consume(evt);\n\t};\n\n\tmxEvent.addListener(input, 'blur', update);\n\tmxEvent.addListener(input, 'change', update);\n\tmxEvent.addListener(input, 'focus', function()\n\t{\n\t\tinitialValue = input.value;\n\t});\n\t\n\treturn update;\n};\n\nArrangePanel.prototype.addEdgeGeometryHandler = function(input, fn)\n{\n    var ui = this.editorUi;\n    var graph = ui.editor.graph;\n    var initialValue = null;\n\n    function update(evt)\n    {\n        if (input.value != '')\n        {\n            var value = parseFloat(input.value);\n\n            if (isNaN(value))\n            {\n                input.value = initialValue + ' pt';\n            }\n            else if (value != initialValue)\n            {\n                graph.getModel().beginUpdate();\n                try\n                {\n                    var cells = ui.getSelectionState().cells;\n\n                    for (var i = 0; i < cells.length; i++)\n                    {\n                        if (graph.getModel().isEdge(cells[i]))\n                        {\n                            var geo = graph.getCellGeometry(cells[i]);\n\n                            if (geo != null)\n                            {\n                                geo = geo.clone();\n                                fn(geo, value);\n\n                                graph.getModel().setGeometry(cells[i], geo);\n                            }\n                        }\n                    }\n                }\n                finally\n                {\n                    graph.getModel().endUpdate();\n                }\n\n                initialValue = value;\n                input.value = value + ' pt';\n            }\n        }\n\n        mxEvent.consume(evt);\n    };\n\n    mxEvent.addListener(input, 'blur', update);\n    mxEvent.addListener(input, 'change', update);\n    mxEvent.addListener(input, 'focus', function()\n    {\n        initialValue = input.value;\n    });\n\n    return update;\n};\n\n/**\n * \n */\nArrangePanel.prototype.addEdgeGeometry = function(container)\n{\n\tvar ui = this.editorUi;\n\tvar graph = ui.editor.graph;\n\tvar rect = ui.getSelectionState();\n\tvar div = this.createPanel();\n\t\n\tvar span = document.createElement('div');\n\tspan.style.position = 'absolute';\n\tspan.style.width = '70px';\n\tspan.style.marginTop = '0px';\n\tspan.style.fontWeight = 'bold';\n\tmxUtils.write(span, mxResources.get('width'));\n\tdiv.appendChild(span);\n\n\tvar widthUpdate, xtUpdate, ytUpdate, xsUpdate, ysUpdate;\n\tvar width = this.addUnitInput(div, 'pt', 12, 44, function()\n\t{\n\t\twidthUpdate.apply(this, arguments);\n\t});\n\n\tmxUtils.br(div);\n\tthis.addKeyHandler(width, listener);\n\t\n\tvar widthUpdate = mxUtils.bind(this, function(evt)\n\t{\n\t\t// Maximum stroke width is 999\n\t\tvar value = parseInt(width.value);\n\t\tvalue = Math.min(999, Math.max(1, (isNaN(value)) ? 1 : value));\n\t\t\n\t\tif (value != mxUtils.getValue(rect.style, 'width', mxCellRenderer.defaultShapes['flexArrow'].prototype.defaultWidth))\n\t\t{\n\t\t\tvar cells = ui.getSelectionState().cells;\n\t\t\tgraph.setCellStyles('width', value, cells);\n\t\t\tui.fireEvent(new mxEventObject('styleChanged', 'keys', ['width'],\n\t\t\t\t\t'values', [value], 'cells', cells));\n\t\t}\n\n\t\twidth.value = value + ' pt';\n\t\tmxEvent.consume(evt);\n\t});\n\n\tmxEvent.addListener(width, 'blur', widthUpdate);\n\tmxEvent.addListener(width, 'change', widthUpdate);\n\n\tcontainer.appendChild(div);\n\n\tvar divs = this.createPanel();\n\tdivs.style.paddingBottom = '30px';\n\n\tvar span = document.createElement('div');\n\tspan.style.position = 'absolute';\n\tspan.style.width = '70px';\n\tspan.style.marginTop = '0px';\n\tmxUtils.write(span, mxResources.get('linestart'));\n\tdivs.appendChild(span);\n\n\tvar xs = this.addUnitInput(divs, 'pt', 87, 52, function()\n\t{\n\t\txsUpdate.apply(this, arguments);\n\t});\n\tvar ys = this.addUnitInput(divs, 'pt', 16, 52, function()\n\t{\n\t\tysUpdate.apply(this, arguments);\n\t});\n\n\tmxUtils.br(divs);\n\tthis.addLabel(divs, mxResources.get('left'), 87, 64);\n\tthis.addLabel(divs, mxResources.get('top'), 16, 64);\n\tcontainer.appendChild(divs);\n\tthis.addKeyHandler(xs, listener);\n\tthis.addKeyHandler(ys, listener);\n\n\tvar divt = this.createPanel();\n\tdivt.style.paddingBottom = '30px';\n\n\tvar span = document.createElement('div');\n\tspan.style.position = 'absolute';\n\tspan.style.width = '70px';\n\tspan.style.marginTop = '0px';\n\tmxUtils.write(span, mxResources.get('lineend'));\n\tdivt.appendChild(span);\n\n\tvar xt = this.addUnitInput(divt, 'pt', 87, 52, function()\n\t{\n\t\txtUpdate.apply(this, arguments);\n\t});\n\tvar yt = this.addUnitInput(divt, 'pt', 16, 52, function()\n\t{\n\t\tytUpdate.apply(this, arguments);\n\t});\n\n\tmxUtils.br(divt);\n\tthis.addLabel(divt, mxResources.get('left'), 87, 64);\n\tthis.addLabel(divt, mxResources.get('top'), 16, 64);\n\tcontainer.appendChild(divt);\n\tthis.addKeyHandler(xt, listener);\n\tthis.addKeyHandler(yt, listener);\n\n\tvar listener = mxUtils.bind(this, function(sender, evt, force)\n\t{\n\t\trect = ui.getSelectionState();\n\t\tvar cell = rect.cells[0];\n\t\t\n\t\tif (rect.style.shape == 'link' || rect.style.shape == 'flexArrow')\n\t\t{\n\t\t\tdiv.style.display = '';\n\t\t\t\n\t\t\tif (force || document.activeElement != width)\n\t\t\t{\n\t\t\t\tvar value = mxUtils.getValue(rect.style, 'width',\n\t\t\t\t\tmxCellRenderer.defaultShapes['flexArrow'].prototype.defaultWidth);\n\t\t\t\twidth.value = value + ' pt';\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tdiv.style.display = 'none';\n\t\t}\n\n\t\tif (rect.cells.length == 1 && graph.model.isEdge(cell))\n\t\t{\n\t\t\tvar geo = graph.model.getGeometry(cell);\n\t\t\t\n\t\t\tif (geo != null && geo.sourcePoint != null &&\n\t\t\t\tgraph.model.getTerminal(cell, true) == null)\n\t\t\t{\n\t\t\t\txs.value = geo.sourcePoint.x;\n\t\t\t\tys.value = geo.sourcePoint.y;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tdivs.style.display = 'none';\n\t\t\t}\n\t\t\t\n\t\t\tif (geo != null && geo.targetPoint != null &&\n\t\t\t\tgraph.model.getTerminal(cell, false) == null)\n\t\t\t{\n\t\t\t\txt.value = geo.targetPoint.x;\n\t\t\t\tyt.value = geo.targetPoint.y;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tdivt.style.display = 'none';\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tdivs.style.display = 'none';\n\t\t\tdivt.style.display = 'none';\n\t\t}\n\t});\n\n\txsUpdate = this.addEdgeGeometryHandler(xs, function(geo, value)\n\t{\n\t\tgeo.sourcePoint.x = value;\n\t});\n\n\tysUpdate = this.addEdgeGeometryHandler(ys, function(geo, value)\n\t{\n\t\tgeo.sourcePoint.y = value;\n\t});\n\n\txtUpdate = this.addEdgeGeometryHandler(xt, function(geo, value)\n\t{\n\t\tgeo.targetPoint.x = value;\n\t});\n\n\tytUpdate = this.addEdgeGeometryHandler(yt, function(geo, value)\n\t{\n\t\tgeo.targetPoint.y = value;\n\t});\n\n\tgraph.getModel().addListener(mxEvent.CHANGE, listener);\n\tthis.listeners.push({destroy: function() { graph.getModel().removeListener(listener); }});\n\tlistener();\n};\n\n/**\n * Adds the label menu items to the given menu and parent.\n */\nTextFormatPanel = function(format, editorUi, container)\n{\n\tBaseFormatPanel.call(this, format, editorUi, container);\n\tthis.init();\n};\n\nmxUtils.extend(TextFormatPanel, BaseFormatPanel);\n\n/**\n * Adds the label menu items to the given menu and parent.\n */\nTextFormatPanel.prototype.init = function()\n{\n\tthis.container.style.borderBottom = 'none';\n\tthis.addFont(this.container);\n\n\t// Allows to lock/unload button to be added\n\tthis.container.appendChild(this.addFontOps(this.createPanel()));\n};\n\n\n/**\n * \n */\nTextFormatPanel.prototype.addFontOps = function(div)\n{\n\tvar ui = this.editorUi;\n\tdiv.style.paddingTop = '8px';\n\tdiv.style.paddingBottom = '6px';\n\n\tvar count = this.addActions(div, ['removeFormat']);\n\n\tif (count == 0)\n\t{\n\t\tdiv.style.display = 'none';\n\t}\n\t\n\treturn div;\n};\n\n\n/**\n * Adds the label menu items to the given menu and parent.\n */\nTextFormatPanel.prototype.addFont = function(container)\n{\n\tvar ui = this.editorUi;\n\tvar editor = ui.editor;\n\tvar graph = editor.graph;\n\tvar ss = ui.getSelectionState();\n\t\n\tvar title = this.createTitle(mxResources.get('font'));\n\ttitle.style.paddingLeft = '14px';\n\ttitle.style.paddingTop = '10px';\n\ttitle.style.paddingBottom = '6px';\n\tcontainer.appendChild(title);\n\n\tvar stylePanel = this.createPanel();\n\tstylePanel.style.paddingTop = '2px';\n\tstylePanel.style.paddingBottom = '2px';\n\tstylePanel.style.position = 'relative';\n\tstylePanel.style.marginLeft = '-2px';\n\tstylePanel.style.borderWidth = '0px';\n\tstylePanel.className = 'geToolbarContainer';\n\t\n\tif (graph.cellEditor.isContentEditing())\n\t{\n\t\tvar cssPanel = stylePanel.cloneNode();\n\t\t\n\t\tvar cssMenu = this.editorUi.toolbar.addMenu(mxResources.get('style'),\n\t\t\tmxResources.get('style'), true, 'formatBlock', cssPanel, null, true);\n\t\tthis.addArrow(cssMenu);\n\t\tcssMenu.style.width = '211px';\n\t\tcssMenu.style.alignItems = 'center';\n\t\tcssMenu.style.justifyContent = 'center';\n\t\tcssMenu.style.whiteSpace = 'nowrap';\n\t\tcssMenu.style.overflow = 'hidden';\n\t\tcssMenu.style.margin = '0px';\n\t\tcssMenu.style.position = 'relative';\n\n\t\tvar arrow = cssMenu.getElementsByTagName('div')[0];\n\t\tarrow.style.position = 'absolute';\n\t\tarrow.style.right = '2px';\n\t\tcontainer.appendChild(cssPanel);\n\t}\n\t\n\tcontainer.appendChild(stylePanel);\n\t\n\tvar colorPanel = this.createPanel();\n\tcolorPanel.style.marginTop = '8px';\n\tcolorPanel.style.borderWidth = '1px';\n\tcolorPanel.style.borderStyle = 'solid';\n\tcolorPanel.style.paddingTop = '6px';\n\tcolorPanel.style.paddingBottom = '2px';\n\t\n\tvar fontMenu = this.editorUi.toolbar.addMenu('Helvetica', mxResources.get('fontFamily'),\n\t\ttrue, 'fontFamily', stylePanel, null, true);\n\t\n\tthis.addArrow(fontMenu);\n\tfontMenu.style.width = '211px';\n\tfontMenu.style.alignItems = 'center';\n\tfontMenu.style.justifyContent = 'center';\n\tfontMenu.style.whiteSpace = 'nowrap';\n\tfontMenu.style.overflow = 'hidden';\n\tfontMenu.style.margin = '0px';\n\tfontMenu.style.position = 'relative';\n\n\tvar arrow = fontMenu.getElementsByTagName('div')[0];\n\tarrow.style.position = 'absolute';\n\tarrow.style.right = '2px';\n\t\n\tvar stylePanel2 = stylePanel.cloneNode(false);\n\tstylePanel2.style.marginLeft = '-3px';\n\tvar fontStyleItems = this.editorUi.toolbar.addItems(['bold', 'italic', 'underline'], stylePanel2, true);\n\tfontStyleItems[0].setAttribute('title', mxResources.get('bold') + ' (' + this.editorUi.actions.get('bold').shortcut + ')');\n\tfontStyleItems[1].setAttribute('title', mxResources.get('italic') + ' (' + this.editorUi.actions.get('italic').shortcut + ')');\n\tfontStyleItems[2].setAttribute('title', mxResources.get('underline') + ' (' + this.editorUi.actions.get('underline').shortcut + ')');\n\t\n\tvar verticalItem = this.editorUi.toolbar.addItems(['vertical'], stylePanel2, true)[0];\n\t\n\tcontainer.appendChild(stylePanel2);\n\n\tthis.styleButtons(fontStyleItems);\n\tthis.styleButtons([verticalItem]);\n\t\n\tvar stylePanel3 = stylePanel.cloneNode(false);\n\tstylePanel3.style.marginLeft = '-3px';\n\tstylePanel3.style.paddingBottom = '0px';\n\t\n\t// Helper function to return a wrapper function does not pass any arguments\n\tvar callFn = function(fn)\n\t{\n\t\treturn function()\n\t\t{\n\t\t\treturn fn();\n\t\t};\n\t};\n\t\n\tvar left = this.editorUi.toolbar.addButton('geSprite-left', mxResources.get('left'),\n\t\t(graph.cellEditor.isContentEditing()) ?\n\t\tfunction(evt)\n\t\t{\n\t\t\tgraph.cellEditor.alignText(mxConstants.ALIGN_LEFT, evt);\n\t\t\tui.fireEvent(new mxEventObject('styleChanged',\n\t\t\t\t'keys', [mxConstants.STYLE_ALIGN],\n\t\t\t\t'values', [mxConstants.ALIGN_LEFT],\n\t\t\t\t'cells', ss.cells));\n\t\t} : callFn(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_ALIGN], [mxConstants.ALIGN_LEFT])), stylePanel3);\n\tvar center = this.editorUi.toolbar.addButton('geSprite-center', mxResources.get('center'),\n\t\t(graph.cellEditor.isContentEditing()) ?\n\t\tfunction(evt)\n\t\t{\n\t\t\tgraph.cellEditor.alignText(mxConstants.ALIGN_CENTER, evt);\n\t\t\tui.fireEvent(new mxEventObject('styleChanged',\n\t\t\t\t'keys', [mxConstants.STYLE_ALIGN],\n\t\t\t\t'values', [mxConstants.ALIGN_CENTER],\n\t\t\t\t'cells', ss.cells));\n\t\t} : callFn(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_ALIGN], [mxConstants.ALIGN_CENTER])), stylePanel3);\n\tvar right = this.editorUi.toolbar.addButton('geSprite-right', mxResources.get('right'),\n\t\t(graph.cellEditor.isContentEditing()) ?\n\t\tfunction(evt)\n\t\t{\n\t\t\tgraph.cellEditor.alignText(mxConstants.ALIGN_RIGHT, evt);\n\t\t\tui.fireEvent(new mxEventObject('styleChanged',\n\t\t\t\t'keys', [mxConstants.STYLE_ALIGN],\n\t\t\t\t'values', [mxConstants.ALIGN_RIGHT],\n\t\t\t\t'cells', ss.cells));\n\t\t} : callFn(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_ALIGN], [mxConstants.ALIGN_RIGHT])), stylePanel3);\n\n\tthis.styleButtons([left, center, right]);\n\t\n\t// Quick hack for strikethrough\n\t// TODO: Add translations and toggle state\n\tif (graph.cellEditor.isContentEditing())\n\t{\n\t\tvar strike = this.editorUi.toolbar.addButton('geSprite-removeformat', mxResources.get('strikethrough'),\n\t\t\tfunction()\n\t\t\t{\n\t\t\t\tdocument.execCommand('strikeThrough', false, null);\n\t\t\t}, stylePanel2);\n\t\tthis.styleButtons([strike]);\n\n\t\tstrike.firstChild.style.background = 'url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCI+PGRlZnM+PHBhdGggaWQ9ImEiIGQ9Ik0wIDBoMjR2MjRIMFYweiIvPjwvZGVmcz48Y2xpcFBhdGggaWQ9ImIiPjx1c2UgeGxpbms6aHJlZj0iI2EiIG92ZXJmbG93PSJ2aXNpYmxlIi8+PC9jbGlwUGF0aD48cGF0aCBjbGlwLXBhdGg9InVybCgjYikiIGZpbGw9IiMwMTAxMDEiIGQ9Ik03LjI0IDguNzVjLS4yNi0uNDgtLjM5LTEuMDMtLjM5LTEuNjcgMC0uNjEuMTMtMS4xNi40LTEuNjcuMjYtLjUuNjMtLjkzIDEuMTEtMS4yOS40OC0uMzUgMS4wNS0uNjMgMS43LS44My42Ni0uMTkgMS4zOS0uMjkgMi4xOC0uMjkuODEgMCAxLjU0LjExIDIuMjEuMzQuNjYuMjIgMS4yMy41NCAxLjY5Ljk0LjQ3LjQuODMuODggMS4wOCAxLjQzLjI1LjU1LjM4IDEuMTUuMzggMS44MWgtMy4wMWMwLS4zMS0uMDUtLjU5LS4xNS0uODUtLjA5LS4yNy0uMjQtLjQ5LS40NC0uNjgtLjItLjE5LS40NS0uMzMtLjc1LS40NC0uMy0uMS0uNjYtLjE2LTEuMDYtLjE2LS4zOSAwLS43NC4wNC0xLjAzLjEzLS4yOS4wOS0uNTMuMjEtLjcyLjM2LS4xOS4xNi0uMzQuMzQtLjQ0LjU1LS4xLjIxLS4xNS40My0uMTUuNjYgMCAuNDguMjUuODguNzQgMS4yMS4zOC4yNS43Ny40OCAxLjQxLjdINy4zOWMtLjA1LS4wOC0uMTEtLjE3LS4xNS0uMjV6TTIxIDEydi0ySDN2Mmg5LjYyYy4xOC4wNy40LjE0LjU1LjIuMzcuMTcuNjYuMzQuODcuNTEuMjEuMTcuMzUuMzYuNDMuNTcuMDcuMi4xMS40My4xMS42OSAwIC4yMy0uMDUuNDUtLjE0LjY2LS4wOS4yLS4yMy4zOC0uNDIuNTMtLjE5LjE1LS40Mi4yNi0uNzEuMzUtLjI5LjA4LS42My4xMy0xLjAxLjEzLS40MyAwLS44My0uMDQtMS4xOC0uMTNzLS42Ni0uMjMtLjkxLS40MmMtLjI1LS4xOS0uNDUtLjQ0LS41OS0uNzUtLjE0LS4zMS0uMjUtLjc2LS4yNS0xLjIxSDYuNGMwIC41NS4wOCAxLjEzLjI0IDEuNTguMTYuNDUuMzcuODUuNjUgMS4yMS4yOC4zNS42LjY2Ljk4LjkyLjM3LjI2Ljc4LjQ4IDEuMjIuNjUuNDQuMTcuOS4zIDEuMzguMzkuNDguMDguOTYuMTMgMS40NC4xMy44IDAgMS41My0uMDkgMi4xOC0uMjhzMS4yMS0uNDUgMS42Ny0uNzljLjQ2LS4zNC44Mi0uNzcgMS4wNy0xLjI3cy4zOC0xLjA3LjM4LTEuNzFjMC0uNi0uMS0xLjE0LS4zMS0xLjYxLS4wNS0uMTEtLjExLS4yMy0uMTctLjMzSDIxeiIvPjwvc3ZnPg==)';\n\t\tstrike.firstChild.style.backgroundPosition = '2px 2px';\n\t\tstrike.firstChild.style.backgroundSize = '18px 18px';\n\n\t\tthis.styleButtons([strike]);\n\t}\n\t\n\tvar top = this.editorUi.toolbar.addButton('geSprite-top', mxResources.get('top'),\n\t\tcallFn(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],\n\t\t\t[mxConstants.ALIGN_TOP])), stylePanel3);\n\tvar middle = this.editorUi.toolbar.addButton('geSprite-middle', mxResources.get('middle'),\n\t\tcallFn(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],\n\t\t\t[mxConstants.ALIGN_MIDDLE])), stylePanel3);\n\tvar bottom = this.editorUi.toolbar.addButton('geSprite-bottom', mxResources.get('bottom'),\n\t\tcallFn(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],\n\t\t\t[mxConstants.ALIGN_BOTTOM])), stylePanel3);\n\t\n\tthis.styleButtons([top, middle, bottom]);\n\t\n\tcontainer.appendChild(stylePanel3);\n\t\n\t// Hack for updating UI state below based on current text selection\n\t// currentTable is the current selected DOM table updated below\n\tvar sub, sup, full, tableWrapper, currentTable, tableCell, tableRow;\n\t\n\tif (graph.cellEditor.isContentEditing())\n\t{\n\t\ttop.style.display = 'none';\n\t\tmiddle.style.display = 'none';\n\t\tbottom.style.display = 'none';\n\t\tverticalItem.style.display = 'none';\n\t\t\n\t\tfull = this.editorUi.toolbar.addButton('geSprite-justifyfull', mxResources.get('block'),\n\t\t\tfunction()\n\t\t\t{\n\t\t\t\tif (full.style.opacity == 1)\n\t\t\t\t{\n\t\t\t\t\tdocument.execCommand('justifyfull', false, null);\n\t\t\t\t}\n\t\t\t}, stylePanel3);\n\t\tfull.style.marginRight = '9px';\n\t\tfull.style.opacity = 1;\n\n\t\tthis.styleButtons([full,\n       \t\tsub = this.editorUi.toolbar.addButton('geSprite-subscript',\n       \t\t\tmxResources.get('subscript') + ' (' + Editor.ctrlKey + '+,)',\n\t\t\tfunction()\n\t\t\t{\n\t\t\t\tdocument.execCommand('subscript', false, null);\n\t\t\t}, stylePanel3), sup = this.editorUi.toolbar.addButton('geSprite-superscript',\n\t\t\t\tmxResources.get('superscript') + ' (' + Editor.ctrlKey + '+.)',\n\t\t\tfunction()\n\t\t\t{\n\t\t\t\tdocument.execCommand('superscript', false, null);\n\t\t\t}, stylePanel3)]);\n\t\tsub.style.marginLeft = '10px';\n\t\t\n\t\tvar tmp = stylePanel3.cloneNode(false);\n\t\ttmp.style.paddingTop = '4px';\n\t\tvar btns = [this.editorUi.toolbar.addButton('geSprite-orderedlist', mxResources.get('numberedList'),\n\t\t\t\tfunction()\n\t\t\t\t{\n\t\t\t\t\tdocument.execCommand('insertorderedlist', false, null);\n\t\t\t\t}, tmp),\n\t\t\tthis.editorUi.toolbar.addButton('geSprite-unorderedlist', mxResources.get('bulletedList'),\n\t\t\t\tfunction()\n\t\t\t\t{\n\t\t\t\t\tdocument.execCommand('insertunorderedlist', false, null);\n\t\t\t\t}, tmp),\n\t\t\tthis.editorUi.toolbar.addButton('geSprite-outdent', mxResources.get('decreaseIndent'),\n\t\t\t\tfunction()\n\t\t\t\t{\n\t\t\t\t\tdocument.execCommand('outdent', false, null);\n\t\t\t\t}, tmp),\n\t\t\tthis.editorUi.toolbar.addButton('geSprite-indent', mxResources.get('increaseIndent'),\n\t\t\t\tfunction()\n\t\t\t\t{\n\t\t\t\t\tdocument.execCommand('indent', false, null);\n\t\t\t\t}, tmp),\n\t\t\tthis.editorUi.toolbar.addButton('geSprite-removeformat', mxResources.get('removeFormat'),\n\t\t\t\tfunction()\n\t\t\t\t{\n\t\t\t\t\tdocument.execCommand('removeformat', false, null);\n\t\t\t\t}, tmp),\n\t\t\tthis.editorUi.toolbar.addButton('geSprite-code', mxResources.get('html'),\n\t\t\t\tfunction()\n\t\t\t\t{\n\t\t\t\t\tgraph.cellEditor.toggleViewMode();\n\t\t\t\t}, tmp)];\n\t\tthis.styleButtons(btns);\n\t\tbtns[btns.length - 2].style.marginLeft = '10px';\n\t\t\n\t\tcontainer.appendChild(tmp);\n\t}\n\telse\n\t{\n\t\tfontStyleItems[2].style.marginRight = '12px';\n\t\tright.style.marginRight = '12px';\n\t}\n\t\n\t// Label position\n\tvar stylePanel4 = stylePanel.cloneNode(false);\n\tstylePanel4.removeAttribute('class');\n\tstylePanel4.style.marginLeft = '0px';\n\tstylePanel4.style.paddingTop = '8px';\n\tstylePanel4.style.paddingBottom = '4px';\n\tstylePanel4.style.fontWeight = 'normal';\n\t\n\tmxUtils.write(stylePanel4, mxResources.get('position'));\n\t\n\t// Adds label position options\n\tvar positionSelect = document.createElement('select');\n\tpositionSelect.style.position = 'absolute';\n\tpositionSelect.style.left = '126px';\n\tpositionSelect.style.width = '98px';\n\tpositionSelect.style.borderWidth = '1px';\n\tpositionSelect.style.borderStyle = 'solid';\n\tpositionSelect.style.marginTop = '-3px';\n\t\n\tvar directions = ['topLeft', 'top', 'topRight', 'left', 'center', 'right', 'bottomLeft', 'bottom', 'bottomRight'];\n\tvar lset = {'topLeft': [mxConstants.ALIGN_LEFT, mxConstants.ALIGN_TOP, mxConstants.ALIGN_RIGHT, mxConstants.ALIGN_BOTTOM],\n\t\t\t'top': [mxConstants.ALIGN_CENTER, mxConstants.ALIGN_TOP, mxConstants.ALIGN_CENTER, mxConstants.ALIGN_BOTTOM],\n\t\t\t'topRight': [mxConstants.ALIGN_RIGHT, mxConstants.ALIGN_TOP, mxConstants.ALIGN_LEFT, mxConstants.ALIGN_BOTTOM],\n\t\t\t'left': [mxConstants.ALIGN_LEFT, mxConstants.ALIGN_MIDDLE, mxConstants.ALIGN_RIGHT, mxConstants.ALIGN_MIDDLE],\n\t\t\t'center': [mxConstants.ALIGN_CENTER, mxConstants.ALIGN_MIDDLE, mxConstants.ALIGN_CENTER, mxConstants.ALIGN_MIDDLE],\n\t\t\t'right': [mxConstants.ALIGN_RIGHT, mxConstants.ALIGN_MIDDLE, mxConstants.ALIGN_LEFT, mxConstants.ALIGN_MIDDLE],\n\t\t\t'bottomLeft': [mxConstants.ALIGN_LEFT, mxConstants.ALIGN_BOTTOM, mxConstants.ALIGN_RIGHT, mxConstants.ALIGN_TOP],\n\t\t\t'bottom': [mxConstants.ALIGN_CENTER, mxConstants.ALIGN_BOTTOM, mxConstants.ALIGN_CENTER, mxConstants.ALIGN_TOP],\n\t\t\t'bottomRight': [mxConstants.ALIGN_RIGHT, mxConstants.ALIGN_BOTTOM, mxConstants.ALIGN_LEFT, mxConstants.ALIGN_TOP]};\n\n\tfor (var i = 0; i < directions.length; i++)\n\t{\n\t\tvar positionOption = document.createElement('option');\n\t\tpositionOption.setAttribute('value', directions[i]);\n\t\tmxUtils.write(positionOption, mxResources.get(directions[i]));\n\t\tpositionSelect.appendChild(positionOption);\n\t}\n\n\tstylePanel4.appendChild(positionSelect);\n\t\n\t// Writing direction\n\tvar stylePanel5 = stylePanel.cloneNode(false);\n\tstylePanel5.removeAttribute('class');\n\tstylePanel5.style.marginLeft = '0px';\n\tstylePanel5.style.paddingTop = '4px';\n\tstylePanel5.style.paddingBottom = '4px';\n\tstylePanel5.style.fontWeight = 'normal';\n\n\tmxUtils.write(stylePanel5, mxResources.get('writingDirection'));\n\t\n\t// Adds writing direction options\n\t// LATER: Handle reselect of same option in all selects (change event\n\t// is not fired for same option so have opened state on click) and\n\t// handle multiple different styles for current selection\n\tvar dirSelect = document.createElement('select');\n\tdirSelect.style.position = 'absolute';\n\tdirSelect.style.borderWidth = '1px';\n\tdirSelect.style.borderStyle = 'solid';\n\tdirSelect.style.left = '126px';\n\tdirSelect.style.width = '98px';\n\tdirSelect.style.marginTop = '-3px';\n\n\t// NOTE: For automatic we use the value null since automatic\n\t// requires the text to be non formatted and non-wrapped\n\tvar dirs = ['automatic', 'leftToRight', 'rightToLeft'];\n\tvar dirSet = {'automatic': null,\n\t\t\t'leftToRight': mxConstants.TEXT_DIRECTION_LTR,\n\t\t\t'rightToLeft': mxConstants.TEXT_DIRECTION_RTL};\n\n\tfor (var i = 0; i < dirs.length; i++)\n\t{\n\t\tvar dirOption = document.createElement('option');\n\t\tdirOption.setAttribute('value', dirs[i]);\n\t\tmxUtils.write(dirOption, mxResources.get(dirs[i]));\n\t\tdirSelect.appendChild(dirOption);\n\t}\n\n\tstylePanel5.appendChild(dirSelect);\n\t\n\tif (!graph.isEditing())\n\t{\n\t\tcontainer.appendChild(stylePanel4);\n\t\t\n\t\tmxEvent.addListener(positionSelect, 'change', function(evt)\n\t\t{\n\t\t\tgraph.getModel().beginUpdate();\n\t\t\ttry\n\t\t\t{\n\t\t\t\tvar vals = lset[positionSelect.value];\n\t\t\t\t\n\t\t\t\tif (vals != null)\n\t\t\t\t{\n\t\t\t\t\tgraph.setCellStyles(mxConstants.STYLE_LABEL_POSITION, vals[0], ss.cells);\n\t\t\t\t\tgraph.setCellStyles(mxConstants.STYLE_VERTICAL_LABEL_POSITION, vals[1], ss.cells);\n\t\t\t\t\tgraph.setCellStyles(mxConstants.STYLE_ALIGN, vals[2], ss.cells);\n\t\t\t\t\tgraph.setCellStyles(mxConstants.STYLE_VERTICAL_ALIGN, vals[3], ss.cells);\n\t\t\t\t}\n\t\t\t}\n\t\t\tfinally\n\t\t\t{\n\t\t\t\tgraph.getModel().endUpdate();\n\t\t\t}\n\t\t\t\n\t\t\tmxEvent.consume(evt);\n\t\t});\n\n\t\t// LATER: Update dir in text editor while editing and update style with label\n\t\t// NOTE: The tricky part is handling and passing on the auto value\n\t\tcontainer.appendChild(stylePanel5);\n\t\t\n\t\tmxEvent.addListener(dirSelect, 'change', function(evt)\n\t\t{\n\t\t\tgraph.setCellStyles(mxConstants.STYLE_TEXT_DIRECTION, dirSet[dirSelect.value], ss.cells);\n\t\t\tmxEvent.consume(evt);\n\t\t});\n\t}\n\n\t// Fontsize\n\tvar input = document.createElement('input');\n\tinput.style.position = 'absolute';\n\tinput.style.borderWidth = '1px';\n\tinput.style.borderStyle = 'solid';\n\tinput.style.textAlign = 'right';\n\tinput.style.marginTop = '4px';\n\tinput.style.left = '161px';\n\tinput.style.width = '53px';\n\tinput.style.height = '23px';\n\tinput.style.boxSizing = 'border-box';\n\tstylePanel2.appendChild(input);\n\t\n\t// Workaround for font size 4 if no text is selected is update font size below\n\t// after first character was entered (as the font element is lazy created)\n\tvar pendingFontSize = null;\n\n\tvar inputUpdate = this.installInputHandler(input, mxConstants.STYLE_FONTSIZE, Menus.prototype.defaultFontSize, 1, 999, ' pt',\n\tfunction(fontSize)\n\t{\n\t\t// IE does not support containsNode\n\t\t// KNOWN: Fixes font size issues but bypasses undo\n\t\tif (window.getSelection && !mxClient.IS_IE && !mxClient.IS_IE11)\n\t\t{\n\t\t\tvar selection = window.getSelection();\n\t\t\tvar container = (selection.rangeCount > 0) ? selection.getRangeAt(0).commonAncestorContainer :\n\t\t\t\tgraph.cellEditor.textarea;\n\n\t\t\tfunction updateSize(elt, ignoreContains)\n\t\t\t{\n\t\t\t\tif (graph.cellEditor.textarea != null && elt != graph.cellEditor.textarea &&\n\t\t\t\t\tgraph.cellEditor.textarea.contains(elt) &&\n\t\t\t\t\t(ignoreContains || selection.containsNode(elt, true)))\n\t\t\t\t{\n\t\t\t\t\tif (elt.nodeName == 'FONT')\n\t\t\t\t\t{\n\t\t\t\t\t\telt.removeAttribute('size');\n\t\t\t\t\t\telt.style.fontSize = fontSize + 'px';\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tvar css = mxUtils.getCurrentStyle(elt);\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (css.fontSize != fontSize + 'px')\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif (mxUtils.getCurrentStyle(elt.parentNode).fontSize != fontSize + 'px')\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\telt.style.fontSize = fontSize + 'px';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\telt.style.fontSize = '';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tui.fireEvent(new mxEventObject('styleChanged',\n\t\t\t\t\t'keys', [mxConstants.STYLE_FONTSIZE],\n\t\t\t\t\t'values', [fontSize], 'cells', ss.cells));\n\t\t\t};\n\t\t\t\n\t\t\t// Wraps text node or mixed selection with leading text in a font element\n\t\t\tif (container == graph.cellEditor.textarea ||\n\t\t\t\tcontainer.nodeType != mxConstants.NODETYPE_ELEMENT)\n\t\t\t{\n\t\t\t\tdocument.execCommand('fontSize', false, '1');\n\t\t\t}\n\n\t\t\tif (container != graph.cellEditor.textarea)\n\t\t\t{\n\t\t\t\tcontainer = container.parentNode;\n\t\t\t}\n\t\t\t\n\t\t\tif (container != null && container.nodeType == mxConstants.NODETYPE_ELEMENT)\n\t\t\t{\n\t\t\t\tvar elts = container.getElementsByTagName('*');\n\t\t\t\tupdateSize(container);\n\t\t\t\t\n\t\t\t\tfor (var i = 0; i < elts.length; i++)\n\t\t\t\t{\n\t\t\t\t\tupdateSize(elts[i]);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tinput.value = fontSize + ' pt';\n\t\t}\n\t\telse if (window.getSelection || document.selection)\n\t\t{\n\t\t\t// Checks selection\n\t\t\tvar par = null;\n\t\t\t\n\t\t\tif (document.selection)\n\t\t\t{\n\t\t\t\tpar = document.selection.createRange().parentElement();\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tvar selection = window.getSelection();\n\t\t\t\t\n\t\t\t\tif (selection.rangeCount > 0)\n\t\t\t\t{\n\t\t\t\t\tpar = selection.getRangeAt(0).commonAncestorContainer;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// Node.contains does not work for text nodes in IE11\n\t\t\tfunction isOrContains(container, node)\n\t\t\t{\n\t\t\t    while (node != null)\n\t\t\t    {\n\t\t\t        if (node === container)\n\t\t\t        {\n\t\t\t            return true;\n\t\t\t        }\n\t\t\t        \n\t\t\t        node = node.parentNode;\n\t\t\t    }\n\t\t\t    \n\t\t\t    return false;\n\t\t\t};\n\t\t\t\n\t\t\tif (par != null && isOrContains(graph.cellEditor.textarea, par))\n\t\t\t{\n\t\t\t\tpendingFontSize = fontSize;\n\t\t\t\t\n\t\t\t\t// Workaround for can't set font size in px is to change font size afterwards\n\t\t\t\tdocument.execCommand('fontSize', false, '4');\n\t\t\t\tvar elts = graph.cellEditor.textarea.getElementsByTagName('font');\n\t\t\t\t\n\t\t\t\tfor (var i = 0; i < elts.length; i++)\n\t\t\t\t{\n\t\t\t\t\tif (elts[i].getAttribute('size') == '4')\n\t\t\t\t\t{\n\t\t\t\t\t\telts[i].removeAttribute('size');\n\t\t\t\t\t\telts[i].style.fontSize = pendingFontSize + 'px';\n\t\t\t\n\t\t\t\t\t\t// Overrides fontSize in input with the one just assigned as a workaround\n\t\t\t\t\t\t// for potential fontSize values of parent elements that don't match\n\t\t\t\t\t\twindow.setTimeout(function()\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tinput.value = pendingFontSize + ' pt';\n\t\t\t\t\t\t\tpendingFontSize = null;\n\t\t\t\t\t\t}, 0);\n\t\t\t\t\t\t\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}, true);\n\t\n\tvar stepper = this.createStepper(input, inputUpdate, 1, 10, true, Menus.prototype.defaultFontSize);\n\tstepper.style.display = input.style.display;\n\tstepper.style.marginTop = '4px';\n\tstepper.style.left = '214px';\n\t\n\tstylePanel2.appendChild(stepper);\n\t\n\tvar arrow = fontMenu.getElementsByTagName('div')[0];\n\tarrow.style.cssFloat = 'right';\n\t\n\tvar bgColorApply = null;\n\tvar currentBgColor = graph.shapeBackgroundColor;\n\t\n\tvar fontColorApply = null;\n\tvar currentFontColor = graph.shapeForegroundColor;\n\t\t\n\tvar bgPanel = (graph.cellEditor.isContentEditing()) ? this.createColorOption(mxResources.get('backgroundColor'), function()\n\t{\n\t\treturn currentBgColor;\n\t}, function(color)\n\t{\n\t\tdocument.execCommand('backcolor', false, (color != mxConstants.NONE) ? color : 'transparent');\n\t\tui.fireEvent(new mxEventObject('styleChanged',\n\t\t\t'keys', [mxConstants.STYLE_LABEL_BACKGROUNDCOLOR],\n\t\t\t'values', [color], 'cells', ss.cells));\n\t}, graph.shapeBackgroundColor,\n\t{\n\t\tinstall: function(apply) { bgColorApply = apply; },\n\t\tdestroy: function() { bgColorApply = null; }\n\t}, null, true) : this.createCellColorOption(mxResources.get('backgroundColor'),\n\t\tmxConstants.STYLE_LABEL_BACKGROUNDCOLOR, 'default', null, function(color)\n\t{\n\t\tgraph.updateLabelElements(ss.cells, function(elt)\n\t\t{\n\t\t\telt.style.backgroundColor = null;\n\t\t});\n\t}, graph.shapeBackgroundColor);\n\tbgPanel.style.fontWeight = 'bold';\n\n\tvar borderPanel = this.createCellColorOption(mxResources.get('borderColor'),\n\t\tmxConstants.STYLE_LABEL_BORDERCOLOR, 'default', null, null,\n\t\tgraph.shapeForegroundColor);\n\tborderPanel.style.fontWeight = 'bold';\n\t\n\tvar defs = (ss.vertices.length >= 1) ?\n\t\tgraph.stylesheet.getDefaultVertexStyle() :\n\t\tgraph.stylesheet.getDefaultEdgeStyle();\n\n\tvar panel = (graph.cellEditor.isContentEditing()) ? this.createColorOption(mxResources.get('fontColor'), function()\n\t{\n\t\treturn currentFontColor;\n\t}, function(color)\n\t{\n\t\tif (mxClient.IS_FF)\n\t\t{\n\t\t\t// Workaround for Firefox that adds the font element around\n\t\t\t// anchor elements which ignore inherited colors is to move\n\t\t\t// the font element inside anchor elements\n\t\t\tvar tmp = graph.cellEditor.textarea.getElementsByTagName('font');\n\t\t\tvar oldFonts = [];\n\n\t\t\tfor (var i = 0; i < tmp.length; i++)\n\t\t\t{\n\t\t\t\toldFonts.push(\n\t\t\t\t{\n\t\t\t\t\tnode: tmp[i],\n\t\t\t\t\tcolor: tmp[i].getAttribute('color')\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tdocument.execCommand('forecolor', false, (color != mxConstants.NONE) ?\n\t\t\t\tcolor : 'transparent');\n\t\t\tui.fireEvent(new mxEventObject('styleChanged',\n\t\t\t\t'keys', [mxConstants.STYLE_FONTCOLOR],\n\t\t\t\t'values', [color], 'cells', ss.cells));\n\n\t\t\t// Finds the new or changed font element\n\t\t\tvar newFonts = graph.cellEditor.textarea.getElementsByTagName('font');\n\n\t\t\tfor (var i = 0; i < newFonts.length; i++)\n\t\t\t{\n\t\t\t\tif (i >= oldFonts.length || newFonts[i] != oldFonts[i].node ||\n\t\t\t\t\t(newFonts[i] == oldFonts[i].node &&\n\t\t\t\t\t\tnewFonts[i].getAttribute('color') != oldFonts[i].color))\n\t\t\t\t{\n\t\t\t\t\tvar child = newFonts[i].firstChild;\n\n\t\t\t\t\t// Moves the font element to inside the anchor element and adopts all children\n\t\t\t\t\tif (child != null && child.nodeName == 'A' && child.nextSibling == null &&\n\t\t\t\t\t\tchild.firstChild != null)\n\t\t\t\t\t{\n\t\t\t\t\t\tvar parent = newFonts[i].parentNode;\n\t\t\t\t\t\tparent.insertBefore(child, newFonts[i]);\n\t\t\t\t\t\tvar tmp = child.firstChild;\n\n\t\t\t\t\t\twhile (tmp != null)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tvar next = tmp.nextSibling;\n\t\t\t\t\t\t\tnewFonts[i].appendChild(tmp);\n\t\t\t\t\t\t\ttmp = next;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tchild.appendChild(newFonts[i]);\n\t\t\t\t\t}\n\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tdocument.execCommand('forecolor', false, (color != mxConstants.NONE) ?\n\t\t\t\tcolor : 'transparent');\n\t\t\tui.fireEvent(new mxEventObject('styleChanged',\n\t\t\t\t'keys', [mxConstants.STYLE_FONTCOLOR],\n\t\t\t\t'values', [color], 'cells', ss.cells));\n\t\t}\n\t}, (defs[mxConstants.STYLE_FONTCOLOR] != null) ? defs[mxConstants.STYLE_FONTCOLOR] : graph.shapeForegroundColor,\n\t{\n\t\tinstall: function(apply) { fontColorApply = apply; },\n\t\tdestroy: function() { fontColorApply = null; }\n\t}, null, true) : this.createCellColorOption(mxResources.get('fontColor'),\n\t\tmxConstants.STYLE_FONTCOLOR, 'default', function(color)\n\t{\n\t\tif (color == mxConstants.NONE)\n\t\t{\n\t\t\tbgPanel.style.display = 'none';\n\t\t}\n\t\telse\n\t\t{\n\t\t\tbgPanel.style.display = '';\n\t\t}\n\t\t\n\t\tborderPanel.style.display = bgPanel.style.display;\n\t}, function(color)\n\t{\n\t\tif (color == mxConstants.NONE)\n\t\t{\n\t\t\tgraph.setCellStyles(mxConstants.STYLE_NOLABEL, '1', ss.cells);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tgraph.setCellStyles(mxConstants.STYLE_NOLABEL, null, ss.cells);\n\t\t}\n\t\t\n\t\tgraph.setCellStyles(mxConstants.STYLE_FONTCOLOR, color, ss.cells);\n\n\t\tgraph.updateLabelElements(ss.cells, function(elt)\n\t\t{\n\t\t\telt.removeAttribute('color');\n\t\t\telt.style.color = null;\n\t\t});\n\t}, graph.shapeForegroundColor);\n\tpanel.style.fontWeight = 'bold';\n\t\n\tcolorPanel.appendChild(panel);\n\tcolorPanel.appendChild(bgPanel);\n\t\n\tif (!graph.cellEditor.isContentEditing())\n\t{\n\t\tcolorPanel.appendChild(borderPanel);\n\t}\n\t\n\tcontainer.appendChild(colorPanel);\n\n\tvar extraPanel = this.createPanel();\n\textraPanel.style.paddingTop = '2px';\n\textraPanel.style.paddingBottom = '4px';\n\t\n\tvar wwCells = graph.filterSelectionCells(mxUtils.bind(this, function(cell)\n\t{\n\t\tvar state = graph.view.getState(cell);\n\t\t\n\t\treturn state == null || graph.isAutoSizeState(state) ||\n\t\t\tgraph.getModel().isEdge(cell) || (!graph.isTableRow(cell) &&\n\t\t\t!graph.isTableCell(cell) && !graph.isCellResizable(cell));\n\t}));\n\t\n\tvar wwOpt = this.createCellOption(mxResources.get('wordWrap'), mxConstants.STYLE_WHITE_SPACE,\n\t\tnull, 'wrap', 'null', null, null, true, wwCells);\n\twwOpt.style.fontWeight = 'bold';\n\t\n\t// Word wrap in edge labels only supported via labelWidth style\n\tif (wwCells.length > 0)\n\t{\n\t\textraPanel.appendChild(wwOpt);\n\t}\n\t\n\t// Delegates switch of style to formattedText action as it also convertes newlines\n\tvar htmlOpt = this.createCellOption(mxResources.get('formattedText'), 'html', 0,\n\t\tnull, null, null, ui.actions.get('formattedText'));\n\thtmlOpt.style.fontWeight = 'bold';\n\textraPanel.appendChild(htmlOpt);\n\t\n\tvar spacingPanel = this.createPanel();\n\tspacingPanel.style.paddingTop = '10px';\n\tspacingPanel.style.paddingBottom = '28px';\n\tspacingPanel.style.fontWeight = 'normal';\n\t\n\tvar span = document.createElement('div');\n\tspan.style.position = 'absolute';\n\tspan.style.width = '70px';\n\tspan.style.marginTop = '0px';\n\tspan.style.fontWeight = 'bold';\n\tmxUtils.write(span, mxResources.get('spacing'));\n\tspacingPanel.appendChild(span);\n\n\tvar topUpdate, globalUpdate, leftUpdate, bottomUpdate, rightUpdate;\n\tvar topSpacing = this.addUnitInput(spacingPanel, 'pt', 87, 52, function()\n\t{\n\t\ttopUpdate.apply(this, arguments);\n\t});\n\tvar globalSpacing = this.addUnitInput(spacingPanel, 'pt', 16, 52, function()\n\t{\n\t\tglobalUpdate.apply(this, arguments);\n\t});\n\n\tmxUtils.br(spacingPanel);\n\tthis.addLabel(spacingPanel, mxResources.get('top'), 87, 64);\n\tthis.addLabel(spacingPanel, mxResources.get('global'), 16, 64);\n\tmxUtils.br(spacingPanel);\n\tmxUtils.br(spacingPanel);\n\n\tvar leftSpacing = this.addUnitInput(spacingPanel, 'pt', 158, 52, function()\n\t{\n\t\tleftUpdate.apply(this, arguments);\n\t});\n\tvar bottomSpacing = this.addUnitInput(spacingPanel, 'pt', 87, 52, function()\n\t{\n\t\tbottomUpdate.apply(this, arguments);\n\t});\n\tvar rightSpacing = this.addUnitInput(spacingPanel, 'pt', 16, 52, function()\n\t{\n\t\trightUpdate.apply(this, arguments);\n\t});\n\n\tmxUtils.br(spacingPanel);\n\tthis.addLabel(spacingPanel, mxResources.get('left'), 158, 64);\n\tthis.addLabel(spacingPanel, mxResources.get('bottom'), 87, 64);\n\tthis.addLabel(spacingPanel, mxResources.get('right'), 16, 64);\n\t\n\tif (!graph.cellEditor.isContentEditing())\n\t{\n\t\tcontainer.appendChild(extraPanel);\n\t\tcontainer.appendChild(this.createRelativeOption(mxResources.get('opacity'), mxConstants.STYLE_TEXT_OPACITY));\n\t\tcontainer.appendChild(spacingPanel);\n\t}\n\telse\n\t{\n\t\tvar selState = null;\n\t\tvar lineHeightInput = null;\n\t\t\n\t\tcontainer.appendChild(this.createRelativeOption(mxResources.get('lineheight'), null, null, function(input)\n\t\t{\n\t\t\tvar value = (input.value == '') ? 120 : parseInt(input.value);\n\t\t\tvalue = Math.max(0, (isNaN(value)) ? 120 : value);\n\n\t\t\tif (selState != null)\n\t\t\t{\n\t\t\t\tgraph.cellEditor.restoreSelection(selState);\n\t\t\t\tselState = null;\n\t\t\t}\n\n\t\t\tvar blocks = graph.getSelectedTextBlocks();\n\n\t\t\t// Adds paragraph tags if no block element is selected\n\t\t\tif (blocks.length == 0 && graph.cellEditor.textarea != null &&\n\t\t\t\tgraph.cellEditor.textarea.firstChild != null)\n\t\t\t{\n\t\t\t\tif (graph.cellEditor.textarea.firstChild.nodeName != 'P')\n\t\t\t\t{\n\t\t\t\t\tgraph.cellEditor.textarea.innerHTML = '<p>' + graph.cellEditor.textarea.innerHTML + '</p>';\n\t\t\t\t}\n\n\t\t\t\tblocks = [graph.cellEditor.textarea.firstChild];\n\t\t\t}\n\n\t\t\tfor (var i = 0; i < blocks.length; i++)\n\t\t\t{\n\t\t\t\tblocks[i].style.lineHeight = value + '%';\n\t\t\t}\n\t\t\t\n\t\t\tinput.value = value + ' %';\n\t\t}, function(input)\n\t\t{\n\t\t\t// Used in CSS handler to update current value\n\t\t\tlineHeightInput = input;\n\t\t\t\n\t\t\t// KNOWN: Arrow up/down clear selection text in quirks/IE 8\n\t\t\t// Text size via arrow button limits to 16 in IE11. Why?\n\t\t\tmxEvent.addListener(input, 'mousedown', function()\n\t\t\t{\n\t\t\t\tif (document.activeElement == graph.cellEditor.textarea)\n\t\t\t\t{\n\t\t\t\t\tselState = graph.cellEditor.saveSelection();\n\t\t\t\t}\n\t\t\t});\n\t\t\t\n\t\t\tmxEvent.addListener(input, 'touchstart', function()\n\t\t\t{\n\t\t\t\tif (document.activeElement == graph.cellEditor.textarea)\n\t\t\t\t{\n\t\t\t\t\tselState = graph.cellEditor.saveSelection();\n\t\t\t\t}\n\t\t\t});\n\t\t\t\n\t\t\tinput.value = '120 %';\n\t\t}));\n\t\t\n\t\tvar insertPanel = stylePanel.cloneNode(false);\n\t\tinsertPanel.style.paddingLeft = '0px';\n\t\tvar insertBtns = this.editorUi.toolbar.addItems(['link', 'image'], insertPanel, true);\n\n\t\tvar btns = [\n\t\t        this.editorUi.toolbar.addButton('geSprite-horizontalrule', mxResources.get('insertHorizontalRule'),\n\t\t\t\tfunction()\n\t\t\t\t{\n\t\t\t\t\tdocument.execCommand('inserthorizontalrule', false);\n\t\t\t\t}, insertPanel),\t\t\t\t\n\t\t\t\tthis.editorUi.toolbar.addMenuFunctionInContainer(insertPanel, 'geSprite-table', mxResources.get('table'), false, mxUtils.bind(this, function(menu)\n\t\t\t\t{\n\t\t\t\t\tthis.editorUi.menus.addInsertTableItem(menu, null, null, false);\n\t\t\t\t}))];\n\t\tthis.styleButtons(insertBtns);\n\t\tthis.styleButtons(btns);\n\t\t\n\t\tvar wrapper2 = this.createPanel();\n\t\twrapper2.style.paddingTop = '10px';\n\t\twrapper2.style.paddingBottom = '10px';\n\t\twrapper2.appendChild(this.createTitle(mxResources.get('insert')));\n\t\twrapper2.appendChild(insertPanel);\n\t\tcontainer.appendChild(wrapper2);\n\t\t\n\t\tvar tablePanel = stylePanel.cloneNode(false);\n\t\ttablePanel.style.paddingLeft = '0px';\n\t\t\n\t\tvar btns = [\n\t\t        this.editorUi.toolbar.addButton('geSprite-insertcolumnbefore', mxResources.get('insertColumnBefore'),\n\t     \t\tmxUtils.bind(this, function()\n\t\t\t\t{\n\t\t\t\t\ttry\n\t\t\t\t\t{\n\t\t\t\t       \tif (currentTable != null)\n\t\t\t\t       \t{\n\t\t\t\t       \t\tgraph.insertColumn(currentTable, (tableCell != null) ? tableCell.cellIndex : 0);\n\t\t\t\t       \t}\n\t\t\t\t\t}\n\t\t\t\t\tcatch (e)\n\t\t\t\t\t{\n\t\t\t\t\t\tthis.editorUi.handleError(e);\n\t\t\t\t\t}\n\t\t\t\t}), tablePanel),\n\t\t\t\tthis.editorUi.toolbar.addButton('geSprite-insertcolumnafter', mxResources.get('insertColumnAfter'),\n\t\t\t\tmxUtils.bind(this, function()\n\t\t\t\t{\n\t\t\t\t\ttry\n\t\t\t\t\t{\n\t\t\t\t\t\tif (currentTable != null)\n\t\t\t\t       \t{\n\t\t\t\t\t\t\tgraph.insertColumn(currentTable, (tableCell != null) ? tableCell.cellIndex + 1 : -1);\n\t\t\t\t       \t}\n\t\t\t\t\t}\n\t\t\t\t\tcatch (e)\n\t\t\t\t\t{\n\t\t\t\t\t\tthis.editorUi.handleError(e);\n\t\t\t\t\t}\n\t\t\t\t}), tablePanel),\n\t\t\t\tthis.editorUi.toolbar.addButton('geSprite-deletecolumn', mxResources.get('deleteColumn'),\n\t\t\t\tmxUtils.bind(this, function()\n\t\t\t\t{\n\t\t\t\t\ttry\n\t\t\t\t\t{\n\t\t\t\t\t\tif (currentTable != null && tableCell != null)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tgraph.deleteColumn(currentTable, tableCell.cellIndex);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tcatch (e)\n\t\t\t\t\t{\n\t\t\t\t\t\tthis.editorUi.handleError(e);\n\t\t\t\t\t}\n\t\t\t\t}), tablePanel),\n\t\t\t\tthis.editorUi.toolbar.addButton('geSprite-insertrowbefore', mxResources.get('insertRowBefore'),\n\t\t\t\tmxUtils.bind(this, function()\n\t\t\t\t{\n\t\t\t\t\ttry\n\t\t\t\t\t{\n\t\t\t\t\t\tif (currentTable != null && tableRow != null)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tgraph.insertRow(currentTable, tableRow.sectionRowIndex);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tcatch (e)\n\t\t\t\t\t{\n\t\t\t\t\t\tthis.editorUi.handleError(e);\n\t\t\t\t\t}\n\t\t\t\t}), tablePanel),\n\t\t\t\tthis.editorUi.toolbar.addButton('geSprite-insertrowafter', mxResources.get('insertRowAfter'),\n\t\t\t\tmxUtils.bind(this, function()\n\t\t\t\t{\n\t\t\t\t\ttry\n\t\t\t\t\t{\n\t\t\t\t\t\tif (currentTable != null && tableRow != null)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tgraph.insertRow(currentTable, tableRow.sectionRowIndex + 1);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tcatch (e)\n\t\t\t\t\t{\n\t\t\t\t\t\tthis.editorUi.handleError(e);\n\t\t\t\t\t}\n\t\t\t\t}), tablePanel),\n\t\t\t\tthis.editorUi.toolbar.addButton('geSprite-deleterow', mxResources.get('deleteRow'),\n\t\t\t\tmxUtils.bind(this, function()\n\t\t\t\t{\n\t\t\t\t\ttry\n\t\t\t\t\t{\n\t\t\t\t\t\tif (currentTable != null && tableRow != null)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tgraph.deleteRow(currentTable, tableRow.sectionRowIndex);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tcatch (e)\n\t\t\t\t\t{\n\t\t\t\t\t\tthis.editorUi.handleError(e);\n\t\t\t\t\t}\n\t\t\t\t}), tablePanel)];\n\t\tthis.styleButtons(btns);\n\t\tbtns[2].style.marginRight = '10px';\n\t\t\n\t\tvar wrapper3 = this.createPanel();\n\t\twrapper3.style.paddingTop = '10px';\n\t\twrapper3.style.paddingBottom = '10px';\n\t\twrapper3.appendChild(this.createTitle(mxResources.get('table')));\n\t\twrapper3.appendChild(tablePanel);\n\n\t\tvar tablePanel2 = stylePanel.cloneNode(false);\n\t\ttablePanel2.style.paddingLeft = '0px';\n\t\t\n\t\tvar btns = [\n\t\t        this.editorUi.toolbar.addButton('geSprite-strokecolor', mxResources.get('borderColor'),\n\t\t\t\tmxUtils.bind(this, function(evt)\n\t\t\t\t{\n\t\t\t\t\tif (currentTable != null)\n\t\t\t\t\t{\n\t\t\t\t\t\t// Converts rgb(r,g,b) values\n\t\t\t\t\t\tvar color = currentTable.style.borderColor.replace(\n\t\t\t\t\t\t\t    /\\brgb\\s*\\(\\s*(\\d+)\\s*,\\s*(\\d+)\\s*,\\s*(\\d+)\\s*\\)/g,\n\t\t\t\t\t\t\t    function($0, $1, $2, $3) {\n\t\t\t\t\t\t\t        return \"#\" + (\"0\"+Number($1).toString(16)).substr(-2) + (\"0\"+Number($2).toString(16)).substr(-2) + (\"0\"+Number($3).toString(16)).substr(-2);\n\t\t\t\t\t\t\t    });\n\t\t\t\t\t\tthis.editorUi.pickColor(color, function(newColor)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tvar targetElt = (tableCell != null && (evt == null || !mxEvent.isShiftDown(evt))) ? tableCell : currentTable;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tgraph.processElements(targetElt, function(elt)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\telt.style.border = null;\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif (newColor == null || newColor == mxConstants.NONE)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\ttargetElt.removeAttribute('border');\n\t\t\t\t\t\t\t\ttargetElt.style.border = '';\n\t\t\t\t\t\t\t\ttargetElt.style.borderCollapse = '';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\ttargetElt.setAttribute('border', '1');\n\t\t\t\t\t\t\t\ttargetElt.style.border = '1px solid ' + newColor;\n\t\t\t\t\t\t\t\ttargetElt.style.borderCollapse = 'collapse';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t}), tablePanel2),\n\t\t\t\tthis.editorUi.toolbar.addButton('geSprite-fillcolor', mxResources.get('backgroundColor'),\n\t\t\t\tmxUtils.bind(this, function(evt)\n\t\t\t\t{\n\t\t\t\t\t// Converts rgb(r,g,b) values\n\t\t\t\t\tif (currentTable != null)\n\t\t\t\t\t{\n\t\t\t\t\t\tvar color = currentTable.style.backgroundColor.replace(\n\t\t\t\t\t\t\t    /\\brgb\\s*\\(\\s*(\\d+)\\s*,\\s*(\\d+)\\s*,\\s*(\\d+)\\s*\\)/g,\n\t\t\t\t\t\t\t    function($0, $1, $2, $3) {\n\t\t\t\t\t\t\t        return \"#\" + (\"0\"+Number($1).toString(16)).substr(-2) + (\"0\"+Number($2).toString(16)).substr(-2) + (\"0\"+Number($3).toString(16)).substr(-2);\n\t\t\t\t\t\t\t    });\n\t\t\t\t\t\tthis.editorUi.pickColor(color, function(newColor)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tvar targetElt = (tableCell != null && (evt == null || !mxEvent.isShiftDown(evt))) ? tableCell : currentTable;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tgraph.processElements(targetElt, function(elt)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\telt.style.backgroundColor = null;\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif (newColor == null || newColor == mxConstants.NONE)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\ttargetElt.style.backgroundColor = '';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\ttargetElt.style.backgroundColor = newColor;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t}), tablePanel2),\n\t\t\t\tthis.editorUi.toolbar.addButton('geSprite-fit', mxResources.get('spacing'),\n\t\t\t\tfunction()\n\t\t\t\t{\n\t\t\t\t\tif (currentTable != null)\n\t\t\t\t\t{\n\t\t\t\t\t\tvar value = currentTable.getAttribute('cellPadding') || 0;\n\t\t\t\t\t\t\n\t\t\t\t\t\tvar dlg = new FilenameDialog(ui, value, mxResources.get('apply'), mxUtils.bind(this, function(newValue)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif (newValue != null && newValue.length > 0)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tcurrentTable.setAttribute('cellPadding', newValue);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tcurrentTable.removeAttribute('cellPadding');\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}), mxResources.get('spacing'));\n\t\t\t\t\t\tui.showDialog(dlg.container, 300, 80, true, true);\n\t\t\t\t\t\tdlg.init();\n\t\t\t\t\t}\n\t\t\t\t}, tablePanel2),\n\t\t\t\tthis.editorUi.toolbar.addButton('geSprite-left', mxResources.get('left'),\n\t\t\t\tfunction()\n\t\t\t\t{\n\t\t\t\t\tif (currentTable != null)\n\t\t\t\t\t{\n\t\t\t\t\t\tcurrentTable.setAttribute('align', 'left');\n\t\t\t\t\t}\n\t\t\t\t}, tablePanel2),\n\t\t\t\tthis.editorUi.toolbar.addButton('geSprite-center', mxResources.get('center'),\n\t\t\t\tfunction()\n\t\t\t\t{\n\t\t\t\t\tif (currentTable != null)\n\t\t\t\t\t{\n\t\t\t\t\t\tcurrentTable.setAttribute('align', 'center');\n\t\t\t\t\t}\n\t\t\t\t}, tablePanel2),\n\t\t\t\tthis.editorUi.toolbar.addButton('geSprite-right', mxResources.get('right'),\n\t\t\t\tfunction()\n\t\t\t\t{\n\t\t\t\t\tif (currentTable != null)\n\t\t\t\t\t{\n\t\t\t\t\t\tcurrentTable.setAttribute('align', 'right');\n\t\t\t\t\t}\n\t\t\t\t}, tablePanel2)];\n\t\tthis.styleButtons(btns);\n\t\tbtns[2].style.marginRight = '10px';\n\t\t\n\t\twrapper3.appendChild(tablePanel2);\n\t\tcontainer.appendChild(wrapper3);\n\t\t\n\t\ttableWrapper = wrapper3;\n\t}\n\t\n\tfunction setSelected(elt, selected)\n\t{\n\t\telt.style.backgroundImage = (selected) ? (Editor.isDarkMode() ?\n\t\t\t'linear-gradient(rgb(0 161 241) 0px, rgb(0, 97, 146) 100%)':\n\t\t\t'linear-gradient(#c5ecff 0px,#87d4fb 100%)') : '';\n\t};\n\n\t// Updates font style state before typing\n\tfor (var i = 0; i < 3; i++)\n\t{\n\t\t(function(index)\n\t\t{\n\t\t\tmxEvent.addListener(fontStyleItems[index], 'click', function()\n\t\t\t{\n\t\t\t\tsetSelected(fontStyleItems[index], fontStyleItems[index].style.backgroundImage == '');\n\t\t\t});\n\t\t})(i);\n\t}\n\n\tvar listener = mxUtils.bind(this, function(sender, evt, force)\n\t{\n\t\tss = ui.getSelectionState();\n\t\tvar fontStyle = mxUtils.getValue(ss.style, mxConstants.STYLE_FONTSTYLE, 0);\n\t\tsetSelected(fontStyleItems[0], (fontStyle & mxConstants.FONT_BOLD) == mxConstants.FONT_BOLD);\n\t\tsetSelected(fontStyleItems[1], (fontStyle & mxConstants.FONT_ITALIC) == mxConstants.FONT_ITALIC);\n\t\tsetSelected(fontStyleItems[2], (fontStyle & mxConstants.FONT_UNDERLINE) == mxConstants.FONT_UNDERLINE);\n\t\tfontMenu.firstChild.nodeValue = mxUtils.getValue(ss.style, mxConstants.STYLE_FONTFAMILY, Menus.prototype.defaultFont);\n\n\t\tsetSelected(verticalItem, mxUtils.getValue(ss.style, mxConstants.STYLE_HORIZONTAL, '1') == '0');\n\t\t\n\t\tif (force || document.activeElement != input)\n\t\t{\n\t\t\tvar tmp = parseFloat(mxUtils.getValue(ss.style, mxConstants.STYLE_FONTSIZE, Menus.prototype.defaultFontSize));\n\t\t\tinput.value = (isNaN(tmp)) ? '' : tmp  + ' pt';\n\t\t}\n\t\t\n\t\tvar align = mxUtils.getValue(ss.style, mxConstants.STYLE_ALIGN, mxConstants.ALIGN_CENTER);\n\t\tsetSelected(left, align == mxConstants.ALIGN_LEFT);\n\t\tsetSelected(center, align == mxConstants.ALIGN_CENTER);\n\t\tsetSelected(right, align == mxConstants.ALIGN_RIGHT);\n\t\t\n\t\tvar valign = mxUtils.getValue(ss.style, mxConstants.STYLE_VERTICAL_ALIGN, mxConstants.ALIGN_MIDDLE);\n\t\tsetSelected(top, valign == mxConstants.ALIGN_TOP);\n\t\tsetSelected(middle, valign == mxConstants.ALIGN_MIDDLE);\n\t\tsetSelected(bottom, valign == mxConstants.ALIGN_BOTTOM);\n\t\t\n\t\tvar pos = mxUtils.getValue(ss.style, mxConstants.STYLE_LABEL_POSITION, mxConstants.ALIGN_CENTER);\n\t\tvar vpos = mxUtils.getValue(ss.style, mxConstants.STYLE_VERTICAL_LABEL_POSITION, mxConstants.ALIGN_MIDDLE);\n\t\t\n\t\tif (pos == mxConstants.ALIGN_LEFT && vpos == mxConstants.ALIGN_TOP)\n\t\t{\n\t\t\tpositionSelect.value = 'topLeft';\n\t\t}\n\t\telse if (pos == mxConstants.ALIGN_CENTER && vpos == mxConstants.ALIGN_TOP)\n\t\t{\n\t\t\tpositionSelect.value = 'top';\n\t\t}\n\t\telse if (pos == mxConstants.ALIGN_RIGHT && vpos == mxConstants.ALIGN_TOP)\n\t\t{\n\t\t\tpositionSelect.value = 'topRight';\n\t\t}\n\t\telse if (pos == mxConstants.ALIGN_LEFT && vpos == mxConstants.ALIGN_BOTTOM)\n\t\t{\n\t\t\tpositionSelect.value = 'bottomLeft';\n\t\t}\n\t\telse if (pos == mxConstants.ALIGN_CENTER && vpos == mxConstants.ALIGN_BOTTOM)\n\t\t{\n\t\t\tpositionSelect.value = 'bottom';\n\t\t}\n\t\telse if (pos == mxConstants.ALIGN_RIGHT && vpos == mxConstants.ALIGN_BOTTOM)\n\t\t{\n\t\t\tpositionSelect.value = 'bottomRight';\n\t\t}\n\t\telse if (pos == mxConstants.ALIGN_LEFT)\n\t\t{\n\t\t\tpositionSelect.value = 'left';\n\t\t}\n\t\telse if (pos == mxConstants.ALIGN_RIGHT)\n\t\t{\n\t\t\tpositionSelect.value = 'right';\n\t\t}\n\t\telse\n\t\t{\n\t\t\tpositionSelect.value = 'center';\n\t\t}\n\t\t\n\t\tvar dir = mxUtils.getValue(ss.style, mxConstants.STYLE_TEXT_DIRECTION, mxConstants.DEFAULT_TEXT_DIRECTION);\n\t\t\n\t\tif (dir == mxConstants.TEXT_DIRECTION_RTL)\n\t\t{\n\t\t\tdirSelect.value = 'rightToLeft';\n\t\t}\n\t\telse if (dir == mxConstants.TEXT_DIRECTION_LTR)\n\t\t{\n\t\t\tdirSelect.value = 'leftToRight';\n\t\t}\n\t\telse if (dir == mxConstants.TEXT_DIRECTION_AUTO)\n\t\t{\n\t\t\tdirSelect.value = 'automatic';\n\t\t}\n\t\t\n\t\tif (force || document.activeElement != globalSpacing)\n\t\t{\n\t\t\tvar tmp = parseFloat(mxUtils.getValue(ss.style, mxConstants.STYLE_SPACING, 2));\n\t\t\tglobalSpacing.value = (isNaN(tmp)) ? '' : tmp  + ' pt';\n\t\t}\n\n\t\tif (force || document.activeElement != topSpacing)\n\t\t{\n\t\t\tvar tmp = parseFloat(mxUtils.getValue(ss.style, mxConstants.STYLE_SPACING_TOP, 0));\n\t\t\ttopSpacing.value = (isNaN(tmp)) ? '' : tmp  + ' pt';\n\t\t}\n\t\t\n\t\tif (force || document.activeElement != rightSpacing)\n\t\t{\n\t\t\tvar tmp = parseFloat(mxUtils.getValue(ss.style, mxConstants.STYLE_SPACING_RIGHT, 0));\n\t\t\trightSpacing.value = (isNaN(tmp)) ? '' : tmp  + ' pt';\n\t\t}\n\t\t\n\t\tif (force || document.activeElement != bottomSpacing)\n\t\t{\n\t\t\tvar tmp = parseFloat(mxUtils.getValue(ss.style, mxConstants.STYLE_SPACING_BOTTOM, 0));\n\t\t\tbottomSpacing.value = (isNaN(tmp)) ? '' : tmp  + ' pt';\n\t\t}\n\t\t\n\t\tif (force || document.activeElement != leftSpacing)\n\t\t{\n\t\t\tvar tmp = parseFloat(mxUtils.getValue(ss.style, mxConstants.STYLE_SPACING_LEFT, 0));\n\t\t\tleftSpacing.value = (isNaN(tmp)) ? '' : tmp  + ' pt';\n\t\t}\n\t});\n\n\tglobalUpdate = this.installInputHandler(globalSpacing, mxConstants.STYLE_SPACING, 2, -999, 999, ' pt');\n\ttopUpdate = this.installInputHandler(topSpacing, mxConstants.STYLE_SPACING_TOP, 0, -999, 999, ' pt');\n\trightUpdate = this.installInputHandler(rightSpacing, mxConstants.STYLE_SPACING_RIGHT, 0, -999, 999, ' pt');\n\tbottomUpdate = this.installInputHandler(bottomSpacing, mxConstants.STYLE_SPACING_BOTTOM, 0, -999, 999, ' pt');\n\tleftUpdate = this.installInputHandler(leftSpacing, mxConstants.STYLE_SPACING_LEFT, 0, -999, 999, ' pt');\n\n\tthis.addKeyHandler(input, listener);\n\tthis.addKeyHandler(globalSpacing, listener);\n\tthis.addKeyHandler(topSpacing, listener);\n\tthis.addKeyHandler(rightSpacing, listener);\n\tthis.addKeyHandler(bottomSpacing, listener);\n\tthis.addKeyHandler(leftSpacing, listener);\n\n\tgraph.getModel().addListener(mxEvent.CHANGE, listener);\n\tthis.listeners.push({destroy: function() { graph.getModel().removeListener(listener); }});\n\tlistener();\n\t\n\tif (graph.cellEditor.isContentEditing())\n\t{\n\t\tvar updating = false;\n\t\t\n\t\tvar updateCssHandler = function()\n\t\t{\n\t\t\tif (!updating)\n\t\t\t{\n\t\t\t\tupdating = true;\n\t\t\t\n\t\t\t\twindow.setTimeout(function()\n\t\t\t\t{\n\t\t\t\t\tvar node = graph.getSelectedEditingElement();\n\n\t\t\t\t\tif (node != null)\n\t\t\t\t\t{\n\t\t\t\t\t\tfunction getRelativeLineHeight(fontSize, css, elt)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif (elt.style != null && css != null)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tvar lineHeight = css.lineHeight\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tif (elt.style.lineHeight != null && elt.style.lineHeight.substring(elt.style.lineHeight.length - 1) == '%')\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\treturn parseInt(elt.style.lineHeight) / 100;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\treturn (lineHeight.substring(lineHeight.length - 2) == 'px') ?\n\t\t\t\t\t\t\t\t\t\t\tparseFloat(lineHeight) / fontSize : parseInt(lineHeight);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\treturn '';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t};\n\t\t\t\t\t\t\n\t\t\t\t\t\tfunction getAbsoluteFontSize(css)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tvar fontSize = (css != null) ? css.fontSize : null;\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif (fontSize != null && fontSize.substring(fontSize.length - 2) == 'px')\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\treturn parseFloat(fontSize);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\treturn mxConstants.DEFAULT_FONTSIZE;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t};\n\t\t\t\t\t\t\n\t\t\t\t\t\tvar css = mxUtils.getCurrentStyle(node);\n\t\t\t\t\t\tvar fontSize = getAbsoluteFontSize(css);\n\t\t\t\t\t\tvar lineHeight = getRelativeLineHeight(fontSize, css, node);\n\n\t\t\t\t\t\t// Finds common font size\n\t\t\t\t\t\tvar elts = node.getElementsByTagName('*');\n\n\t\t\t\t\t\t// IE does not support containsNode\n\t\t\t\t\t\tif (elts.length > 0 && window.getSelection && !mxClient.IS_IE && !mxClient.IS_IE11)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tvar selection = window.getSelection();\n\n\t\t\t\t\t\t\tfor (var i = 0; i < elts.length; i++)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif (selection.containsNode(elts[i], true))\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\ttemp = mxUtils.getCurrentStyle(elts[i]);\n\t\t\t\t\t\t\t\t\tfontSize = Math.max(getAbsoluteFontSize(temp), fontSize);\n\t\t\t\t\t\t\t\t\tvar lh = getRelativeLineHeight(fontSize, temp, elts[i]);\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tif (lh != lineHeight || isNaN(lh))\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tlineHeight = '';\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tfunction hasParentOrOnlyChild(name)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif (graph.getParentByName(node, name, graph.cellEditor.textarea) != null)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tvar child = node;\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\twhile (child != null && child.childNodes.length == 1)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tchild = child.childNodes[0];\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tif (child.nodeName == name)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t};\n\t\t\t\t\t\t\n\t\t\t\t\t\tfunction isEqualOrPrefixed(str, value)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif (str != null && value != null)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif (str == value)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse if (str.length > value.length + 1)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\treturn str.substring(str.length - value.length - 1, str.length) == '-' + value;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t};\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (css != null)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tsetSelected(fontStyleItems[0], css.fontWeight == 'bold' ||\n\t\t\t\t\t\t\t\tcss.fontWeight > 400 || hasParentOrOnlyChild('B') ||\n\t\t\t\t\t\t\t\thasParentOrOnlyChild('STRONG'));\n\t\t\t\t\t\t\tsetSelected(fontStyleItems[1], css.fontStyle == 'italic' ||\n\t\t\t\t\t\t\t\thasParentOrOnlyChild('I') || hasParentOrOnlyChild('EM'));\n\t\t\t\t\t\t\tsetSelected(fontStyleItems[2], hasParentOrOnlyChild('U'));\n\t\t\t\t\t\t\tsetSelected(sup, hasParentOrOnlyChild('SUP'));\n\t\t\t\t\t\t\tsetSelected(sub, hasParentOrOnlyChild('SUB'));\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif (!graph.cellEditor.isTableSelected())\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tvar align = graph.cellEditor.align || mxUtils.getValue(ss.style, mxConstants.STYLE_ALIGN, mxConstants.ALIGN_CENTER);\n\n\t\t\t\t\t\t\t\tif (isEqualOrPrefixed(css.textAlign, 'justify'))\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tsetSelected(full, isEqualOrPrefixed(css.textAlign, 'justify'));\n\t\t\t\t\t\t\t\t\tsetSelected(left, false);\n\t\t\t\t\t\t\t\t\tsetSelected(center, false);\n\t\t\t\t\t\t\t\t\tsetSelected(right, false);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tsetSelected(full, false);\n\t\t\t\t\t\t\t\t\tsetSelected(left, align == mxConstants.ALIGN_LEFT);\n\t\t\t\t\t\t\t\t\tsetSelected(center, align == mxConstants.ALIGN_CENTER);\n\t\t\t\t\t\t\t\t\tsetSelected(right, align == mxConstants.ALIGN_RIGHT);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tsetSelected(full, isEqualOrPrefixed(css.textAlign, 'justify'));\n\t\t\t\t\t\t\t\tsetSelected(left, isEqualOrPrefixed(css.textAlign, 'left'));\n\t\t\t\t\t\t\t\tsetSelected(center, isEqualOrPrefixed(css.textAlign, 'center'));\n\t\t\t\t\t\t\t\tsetSelected(right, isEqualOrPrefixed(css.textAlign, 'right'));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tcurrentTable = graph.getParentByName(node, 'TABLE', graph.cellEditor.textarea);\n\t\t\t\t\t\t\ttableRow = (currentTable == null) ? null : graph.getParentByName(node, 'TR', currentTable);\n\t\t\t\t\t\t\ttableCell = (currentTable == null) ? null : graph.getParentByNames(node, ['TD', 'TH'], currentTable);\n\t\t\t\t\t\t\ttableWrapper.style.display = (currentTable != null) ? '' : 'none';\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif (document.activeElement != input)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif (node.nodeName == 'FONT' && node.getAttribute('size') == '4' &&\n\t\t\t\t\t\t\t\t\tpendingFontSize != null)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tnode.removeAttribute('size');\n\t\t\t\t\t\t\t\t\tnode.style.fontSize = pendingFontSize + ' pt';\n\t\t\t\t\t\t\t\t\tpendingFontSize = null;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tinput.value = (isNaN(fontSize)) ? '' : fontSize + ' pt';\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tvar lh = parseFloat(lineHeight);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tif (!isNaN(lh))\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tlineHeightInput.value = Math.round(lh * 100) + ' %';\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tlineHeightInput.value = '100 %';\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Updates the color picker for the current font\n\t\t\t\t\t\t\tif (fontColorApply != null)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif (css.color == 'rgba(0, 0, 0, 0)' ||\n\t\t\t\t\t\t\t\t\tcss.color == 'transparent')\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tcurrentFontColor = mxConstants.NONE;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tcurrentFontColor = mxUtils.rgba2hex(css.color)\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tfontColorApply(currentFontColor, true);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif (bgColorApply != null)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif (css.backgroundColor == 'rgba(0, 0, 0, 0)' ||\n\t\t\t\t\t\t\t\t\tcss.backgroundColor == 'transparent')\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tcurrentBgColor = mxConstants.NONE;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tcurrentBgColor = mxUtils.rgba2hex(css.backgroundColor);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tbgColorApply(currentBgColor, true);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Workaround for firstChild is null or not an object\n\t\t\t\t\t\t\t// in the log which seems to be IE8- only / 29.01.15\n\t\t\t\t\t\t\tif (fontMenu.firstChild != null)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tfontMenu.firstChild.nodeValue = Graph.stripQuotes(css.fontFamily);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tupdating = false;\n\t\t\t\t}, 0);\n\t\t\t}\n\t\t};\n\t\t\n\t\tif (mxClient.IS_FF || mxClient.IS_EDGE || mxClient.IS_IE || mxClient.IS_IE11)\n\t\t{\n\t\t\tmxEvent.addListener(graph.cellEditor.textarea, 'DOMSubtreeModified', updateCssHandler);\n\t\t}\n\t\t\n\t\tmxEvent.addListener(graph.cellEditor.textarea, 'input', updateCssHandler);\n\t\tmxEvent.addListener(graph.cellEditor.textarea, 'touchend', updateCssHandler);\n\t\tmxEvent.addListener(graph.cellEditor.textarea, 'mouseup', updateCssHandler);\n\t\tmxEvent.addListener(graph.cellEditor.textarea, 'keyup', updateCssHandler);\n\t\tthis.listeners.push({destroy: function()\n\t\t{\n\t\t\t// No need to remove listener since textarea is destroyed after edit\n\t\t}});\n\t\tupdateCssHandler();\n\t}\n\n\treturn container;\n};\n\n/**\n * Adds the label menu items to the given menu and parent.\n */\nStyleFormatPanel = function(format, editorUi, container)\n{\n\tBaseFormatPanel.call(this, format, editorUi, container);\n\tthis.init();\n};\n\nmxUtils.extend(StyleFormatPanel, BaseFormatPanel);\n\n/**\n * \n */\nStyleFormatPanel.prototype.defaultStrokeColor = 'black';\n\n/**\n * Adds the label menu items to the given menu and parent.\n */\nStyleFormatPanel.prototype.init = function()\n{\n\tvar ui = this.editorUi;\n\tvar ss = ui.getSelectionState();\n\t\n\tif (!ss.containsLabel && ss.cells.length > 0)\n\t{\n\t\tif (ss.containsImage && ss.vertices.length == 1 && ss.style.shape == 'image' &&\n\t\t\tss.style.image != null && ss.style.image.substring(0, 19) == 'data:image/svg+xml;')\n\t\t{\n\t\t\tthis.container.appendChild(this.addSvgStyles(this.createPanel()));\n\t\t}\n\n\t\tif (ss.fill)\n\t\t{\n\t\t\tthis.container.appendChild(this.addFill(this.createPanel()));\n\t\t}\n\t\n\t\tthis.container.appendChild(this.addStroke(this.createPanel()));\n\t\tthis.container.appendChild(this.addLineJumps(this.createPanel()));\n\t\tvar opacityPanel = this.createRelativeOption(mxResources.get('opacity'), mxConstants.STYLE_OPACITY);\n\t\topacityPanel.style.paddingTop = '8px';\n\t\topacityPanel.style.paddingBottom = '10px';\n\t\tthis.container.appendChild(opacityPanel);\n\t\tthis.container.appendChild(this.addEffects(this.createPanel()));\n\t}\n\n\tvar opsPanel = this.createPanel();\n\topsPanel.style.paddingTop = '8px';\n\t\n\tif (ss.cells.length == 1)\n\t{\n\t\tthis.addEditOps(opsPanel);\n\t\t\n\t\tif (opsPanel.firstChild != null)\n\t\t{\n\t\t\tmxUtils.br(opsPanel);\n\t\t}\n\t}\n\n\tif (ss.cells.length >= 1)\n\t{\n\t\tthis.addStyleOps(opsPanel);\n\t}\n\n\tif (opsPanel.firstChild != null)\n\t{\n\t\tthis.container.appendChild(opsPanel);\n\t}\n};\n\n/**\n * Use browser for parsing CSS.\n */\nStyleFormatPanel.prototype.getCssRules = function(css)\n{\n\tvar doc = document.implementation.createHTMLDocument('');\n\tvar styleElement = document.createElement('style');\n\t\n\tmxUtils.setTextContent(styleElement, css);\n\tdoc.body.appendChild(styleElement);\n\t\n\treturn styleElement.sheet.cssRules;\n};\n\n/**\n * Adds the label menu items to the given menu and parent.\n */\nStyleFormatPanel.prototype.addSvgStyles = function(container)\n{\n\tvar ui = this.editorUi;\n\tvar ss = ui.getSelectionState();\n\tcontainer.style.paddingTop = '6px';\n\tcontainer.style.paddingBottom = '6px';\n\tcontainer.style.fontWeight = 'bold';\n\tcontainer.style.display = 'none';\n\n\ttry\n\t{\n\t\tvar exp = ss.style.editableCssRules;\n\t\t\n\t\tif (exp != null)\n\t\t{\n\t\t\tvar regex = new RegExp(exp);\n\t\t\t\n\t\t\tvar data = ss.style.image.substring(ss.style.image.indexOf(',') + 1);\n\t\t\tvar xml = (window.atob) ? atob(data) : Base64.decode(data, true);\n\t\t\tvar svg = mxUtils.parseXml(xml);\n\t\t\t\n\t\t\tif (svg != null)\n\t\t\t{\n\t\t\t\tvar styles = svg.getElementsByTagName('style');\n\t\t\t\t\n\t\t\t\tfor (var i = 0; i < styles.length; i++)\n\t\t\t\t{\n\t\t\t\t\tvar rules = this.getCssRules(mxUtils.getTextContent(styles[i]));\n\t\t\t\t\t\n\t\t\t\t\tfor (var j = 0; j < rules.length; j++)\n\t\t\t\t\t{\n\t\t\t\t\t\tthis.addSvgRule(container, rules[j], svg, styles[i], rules, j, regex);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\tcatch (e)\n\t{\n\t\t// ignore\n\t}\n\t\n\treturn container;\n};\n\n/**\n * Adds the label menu items to the given menu and parent.\n */\nStyleFormatPanel.prototype.addSvgRule = function(container, rule, svg, styleElem, rules, ruleIndex, regex)\n{\n\tvar ui = this.editorUi;\n\tvar graph = ui.editor.graph;\n\t\n\tif (regex.test(rule.selectorText))\n\t{\n\t\tfunction rgb2hex(rgb)\n\t\t{\n\t\t\t rgb = rgb.match(/^rgba?[\\s+]?\\([\\s+]?(\\d+)[\\s+]?,[\\s+]?(\\d+)[\\s+]?,[\\s+]?(\\d+)[\\s+]?/i);\n\t\t\t \n\t\t\t return (rgb && rgb.length === 4) ? \"#\" +\n\t\t\t  (\"0\" + parseInt(rgb[1],10).toString(16)).slice(-2) +\n\t\t\t  (\"0\" + parseInt(rgb[2],10).toString(16)).slice(-2) +\n\t\t\t  (\"0\" + parseInt(rgb[3],10).toString(16)).slice(-2) : '';\n\t\t};\n\t\t\n\t\tvar addStyleRule = mxUtils.bind(this, function(rule, key, label)\n\t\t{\n\t\t\tvar value = mxUtils.trim(rule.style[key]);\n\t\t\t\n\t\t\tif (value != '' && value.substring(0, 4) != 'url(')\n\t\t\t{\n\t\t\t\tvar option = this.createColorOption(label + ' ' + rule.selectorText, function()\n\t\t\t\t{\n\t\t\t\t\treturn rgb2hex(value);\n\t\t\t\t}, mxUtils.bind(this, function(color)\n\t\t\t\t{\n\t\t\t\t\trules[ruleIndex].style[key] = color;\n\t\t\t\t\tvar cssTxt = '';\n\t\t\t\t\t\n\t\t\t\t\tfor (var i = 0; i < rules.length; i++) \n\t\t\t\t\t{\n\t\t\t\t\t\tcssTxt += rules[i].cssText + ' ';\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tstyleElem.textContent = cssTxt;\n\t\t\t\t\tvar xml = mxUtils.getXml(svg.documentElement);\n\t\t\t\t\t\n\t\t\t\t\tgraph.setCellStyles(mxConstants.STYLE_IMAGE, 'data:image/svg+xml,' +\n\t\t\t\t\t\t((window.btoa) ? btoa(xml) : Base64.encode(xml, true)),\n\t\t\t\t\t\tui.getSelectionState().cells);\n\t\t\t\t}), '#ffffff',\n\t\t\t\t{\n\t\t\t\t\tinstall: function(apply)\n\t\t\t\t\t{\n\t\t\t\t\t\t// ignore\n\t\t\t\t\t},\n\t\t\t\t\tdestroy: function()\n\t\t\t\t\t{\n\t\t\t\t\t\t// ignore\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\n\t\t\t\tcontainer.appendChild(option);\n\t\t\t\t\n\t\t\t\t// Shows container if rules are added\n\t\t\t\tcontainer.style.display = '';\n\t\t\t}\n\t\t});\n\t\t\n\t\taddStyleRule(rule, 'fill', mxResources.get('fill'));\n\t\taddStyleRule(rule, 'stroke', mxResources.get('line'));\n\t\taddStyleRule(rule, 'stop-color', mxResources.get('gradient'));\n\t}\n};\n\n/**\n * Adds the label menu items to the given menu and parent.\n */\nStyleFormatPanel.prototype.addEditOps = function(div)\n{\n\tvar ss = this.editorUi.getSelectionState();\n\n\tif (ss.cells.length == 1)\n\t{\n\t\tvar editSelect = document.createElement('select');\n\t\teditSelect.style.width = '210px';\n\t\teditSelect.style.textAlign = 'center';\n\t\teditSelect.style.marginBottom = '2px';\n\t\t\n\t\tvar ops = ['edit', 'editLink', 'editShape', 'editImage', 'editData',\n\t\t\t'copyData', 'pasteData', 'editConnectionPoints', 'editGeometry',\n\t\t\t'editTooltip', 'editStyle'];\n\t\t\n\t\tfor (var i = 0; i < ops.length; i++)\n\t\t{\n\t\t\tvar action = this.editorUi.actions.get(ops[i]);\n\n\t\t\tif (action == null || action.enabled)\n\t\t\t{\n\t\t\t\tvar editOption = document.createElement('option');\n\t\t\t\teditOption.setAttribute('value', ops[i]);\n\t\t\t\tvar title = mxResources.get(ops[i]);\n\t\t\t\tmxUtils.write(editOption, title + ((ops[i] == 'edit') ? '' : '...'));\n\n\t\t\t\tif (action != null && action.shortcut != null)\n\t\t\t\t{\n\t\t\t\t\ttitle += ' (' + action.shortcut + ')';\n\t\t\t\t}\n\n\t\t\t\teditOption.setAttribute('title', title);\n\t\t\t\teditSelect.appendChild(editOption);\n\t\t\t}\n\t\t}\n\n\t\tif (editSelect.children.length > 1)\n\t\t{\n\t\t\tdiv.appendChild(editSelect);\n\n\t\t\tmxEvent.addListener(editSelect, 'change', mxUtils.bind(this, function(evt)\n\t\t\t{\n\t\t\t\tvar action = this.editorUi.actions.get(editSelect.value);\n\t\t\t\teditSelect.value = 'edit';\n\n\t\t\t\tif (action != null)\n\t\t\t\t{\n\t\t\t\t\taction.funct();\n\t\t\t\t}\n\t\t\t}));\n\t\t\t\n\t\t\tif (ss.image && ss.cells.length > 0)\n\t\t\t{\n\t\t\t\tvar graph = this.editorUi.editor.graph;\n\t\t\t\tvar state = graph.view.getState(graph.getSelectionCell());\n\n\t\t\t\tif (state != null && mxUtils.getValue(state.style, mxConstants.STYLE_IMAGE, null) != null)\n\t\t\t\t{\n\t\t\t\t\tvar btn = mxUtils.button(mxResources.get('crop') + '...',\n\t\t\t\t\t\tmxUtils.bind(this, function(evt)\n\t\t\t\t\t{\n\t\t\t\t\t\tthis.editorUi.actions.get('crop').funct();\n\t\t\t\t\t}));\n\n\t\t\t\t\tbtn.setAttribute('title', mxResources.get('crop'));\n\t\t\t\t\teditSelect.style.width = '104px';\n\t\t\t\t\tbtn.style.width = '104px';\n\t\t\t\t\tbtn.style.marginLeft = '2px';\n\t\t\t\t\tbtn.style.marginBottom = '2px';\n\n\t\t\t\t\tdiv.appendChild(btn);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn div;\n};\n\n/**\n * Adds the label menu items to the given menu and parent.\n */\nStyleFormatPanel.prototype.addFill = function(container)\n{\n\tvar ui = this.editorUi;\n\tvar graph = ui.editor.graph;\n\tvar ss = ui.getSelectionState();\n\tcontainer.style.paddingTop = '6px';\n\tcontainer.style.paddingBottom = '6px';\n\n\t// Adds gradient direction option\n\tvar gradientSelect = document.createElement('select');\n\tgradientSelect.style.position = 'absolute';\n\tgradientSelect.style.left = '104px';\n\tgradientSelect.style.width = '70px';\n\tgradientSelect.style.height = '22px';\n\tgradientSelect.style.padding = '0px';\n\tgradientSelect.style.marginTop = '-3px';\n\tgradientSelect.style.borderWidth = '1px';\n\tgradientSelect.style.borderStyle = 'solid';\n\tgradientSelect.style.boxSizing = 'border-box';\n\t\n\tvar fillStyleSelect = gradientSelect.cloneNode(false);\n\t\n\t// Stops events from bubbling to color option event handler\n\tmxEvent.addListener(gradientSelect, 'click', function(evt)\n\t{\n\t\tmxEvent.consume(evt);\n\t});\n\tmxEvent.addListener(fillStyleSelect, 'click', function(evt)\n\t{\n\t\tmxEvent.consume(evt);\n\t});\n\t\n\tvar gradientPanel = this.createCellColorOption(mxResources.get('gradient'),\n\t\tmxConstants.STYLE_GRADIENTCOLOR, 'default', function(color)\n\t{\n\t\tif (color == null || color == mxConstants.NONE)\n\t\t{\n\t\t\tgradientSelect.style.display = 'none';\n\t\t}\n\t\telse\n\t\t{\n\t\t\tgradientSelect.style.display = '';\n\t\t}\n\t}, function(color)\n\t{\n\t\tgraph.updateCellStyles({'gradientColor': color}, graph.getSelectionCells());\n\t}, graph.getDefaultColor(ss.style, mxConstants.STYLE_GRADIENTCOLOR,\n\t\tgraph.shapeForegroundColor, graph.shapeBackgroundColor));\n\n\tvar fillKey = (ss.style.shape == 'image') ? mxConstants.STYLE_IMAGE_BACKGROUND : mxConstants.STYLE_FILLCOLOR;\n\n\tvar fillPanel = this.createCellColorOption(mxResources.get('fill'),\n\t\tfillKey, 'default', null, mxUtils.bind(this, function(color)\n\t{\n\t\tgraph.setCellStyles(fillKey, color, ss.cells);\n\t}), graph.getDefaultColor(ss.style, fillKey, graph.shapeBackgroundColor,\n\t\tgraph.shapeForegroundColor));\n\n\tfillPanel.style.fontWeight = 'bold';\n\tvar tmpColor = mxUtils.getValue(ss.style, fillKey, null);\n\tgradientPanel.style.display = (tmpColor != null && tmpColor != mxConstants.NONE &&\n\t\tss.fill && ss.style.shape != 'image') ? '' : 'none';\n\n\tvar directions = [mxConstants.DIRECTION_NORTH, mxConstants.DIRECTION_EAST,\n\t                  mxConstants.DIRECTION_SOUTH, mxConstants.DIRECTION_WEST,\n\t\t\t\t\t  mxConstants.DIRECTION_RADIAL];\n\n\tfor (var i = 0; i < directions.length; i++)\n\t{\n\t\tvar gradientOption = document.createElement('option');\n\t\tgradientOption.setAttribute('value', directions[i]);\n\t\tmxUtils.write(gradientOption, mxResources.get(directions[i]));\n\t\tgradientSelect.appendChild(gradientOption);\n\t}\n\t\n\tgradientPanel.appendChild(gradientSelect);\n\t\n\tvar curFillStyle;\n\n\tfunction populateFillStyle()\n\t{\n\t\tfillStyleSelect.innerHTML = '';\n\t\tcurFillStyle = 1;\n\t\t\n\t\tfor (var i = 0; i < Editor.fillStyles.length; i++)\n\t\t{\n\t\t\tvar fillStyleOption = document.createElement('option');\n\t\t\tfillStyleOption.setAttribute('value', Editor.fillStyles[i].val);\n\t\t\tmxUtils.write(fillStyleOption, Editor.fillStyles[i].dispName);\n\t\t\tfillStyleSelect.appendChild(fillStyleOption);\n\t\t}\n\t};\n\n\tfunction populateRoughFillStyle()\n\t{\n\t\tfillStyleSelect.innerHTML = '';\n\t\tcurFillStyle = 2;\n\n\t\tfor (var i = 0; i < Editor.roughFillStyles.length; i++)\n\t\t{\n\t\t\tvar fillStyleOption = document.createElement('option');\n\t\t\tfillStyleOption.setAttribute('value', Editor.roughFillStyles[i].val);\n\t\t\tmxUtils.write(fillStyleOption, Editor.roughFillStyles[i].dispName);\n\t\t\tfillStyleSelect.appendChild(fillStyleOption);\n\t\t}\n\n\t\tfillStyleSelect.value = 'auto';\n\t};\n\n\tpopulateFillStyle();\n\n\tif (ss.gradient)\n\t{\n\t\tfillPanel.appendChild(fillStyleSelect);\n\t}\n\n\tvar listener = mxUtils.bind(this, function()\n\t{\n\t\tss = ui.getSelectionState();\n\t\tvar value = mxUtils.getValue(ss.style, mxConstants.STYLE_GRADIENT_DIRECTION,\n\t\t\tmxConstants.DIRECTION_SOUTH);\n\t\tvar fillStyle = mxUtils.getValue(ss.style, 'fillStyle', 'auto');\n\t\t\n\t\t// Handles empty string which is not allowed as a value\n\t\tif (value == '')\n\t\t{\n\t\t\tvalue = mxConstants.DIRECTION_SOUTH;\n\t\t}\n\t\t\n\t\tgradientSelect.value = value;\n\t\tcontainer.style.display = (ss.fill) ? '' : 'none';\n\t\t\n\t\tvar fillColor = mxUtils.getValue(ss.style, fillKey, null);\n\t\t\n\t\tif (!ss.fill || fillColor == null || fillColor == mxConstants.NONE ||\n\t\t\tss.style.shape == 'filledEdge')\n\t\t{\n\t\t\tfillStyleSelect.style.display = 'none';\n\t\t\tgradientPanel.style.display = 'none';\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif (ss.style.sketch == '1')\n\t\t\t{\n\t\t\t\tif (curFillStyle != 2)\n\t\t\t\t{\n\t\t\t\t\tpopulateRoughFillStyle()\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if (curFillStyle != 1)\n\t\t\t{\n\t\t\t\tpopulateFillStyle();\n\t\t\t}\n\t\t\t\n\t\t\tfillStyleSelect.value = fillStyle;\n\n\t\t\t//In case of switching from sketch to regular and fill type is not there\n\t\t\tif (!fillStyleSelect.value)\n\t\t\t{\n\t\t\t\tfillStyle = 'auto';\n\t\t\t\tfillStyleSelect.value = fillStyle;\n\t\t\t}\n\n\t\t\tfillStyleSelect.style.display = ss.style.sketch == '1' ||\n\t\t\t\tgradientSelect.style.display == 'none'? '' : 'none';\n\t\t\tgradientPanel.style.display = (ss.gradient &&\n\t\t\t\t!ss.containsImage && (ss.style.sketch != '1' ||\n\t\t\t\tfillStyle == 'solid' || fillStyle == 'auto')) ?\n\t\t\t\t'' : 'none';\n\t\t}\n\t});\n\t\n\tgraph.getModel().addListener(mxEvent.CHANGE, listener);\n\tthis.listeners.push({destroy: function() { graph.getModel().removeListener(listener); }});\n\tlistener();\n\n\tmxEvent.addListener(gradientSelect, 'change', function(evt)\n\t{\n\t\tgraph.setCellStyles(mxConstants.STYLE_GRADIENT_DIRECTION, gradientSelect.value, ss.cells);\n\t\tui.fireEvent(new mxEventObject('styleChanged', 'keys', [mxConstants.STYLE_GRADIENT_DIRECTION],\n\t\t\t'values', [gradientSelect.value], 'cells', ss.cells));\n\t\tmxEvent.consume(evt);\n\t});\n\t\n\tmxEvent.addListener(fillStyleSelect, 'change', function(evt)\n\t{\n\t\tgraph.setCellStyles('fillStyle', fillStyleSelect.value, ss.cells);\n\t\tui.fireEvent(new mxEventObject('styleChanged', 'keys', ['fillStyle'],\n\t\t\t'values', [fillStyleSelect.value], 'cells', ss.cells));\n\t\tmxEvent.consume(evt);\n\t});\n\t\n\tcontainer.appendChild(fillPanel);\n\tcontainer.appendChild(gradientPanel);\n\t\n\t// Adds custom colors\n\tvar custom = this.getCustomColors();\n\t\n\tfor (var i = 0; i < custom.length; i++)\n\t{\n\t\tcontainer.appendChild(this.createCellColorOption(custom[i].title,\n\t\t\tcustom[i].key, custom[i].defaultValue));\n\t}\n\t\n\treturn container;\n};\n\n/**\n * Adds the label menu items to the given menu and parent.\n */\nStyleFormatPanel.prototype.getCustomColors = function()\n{\n\tvar ss = this.editorUi.getSelectionState();\n\tvar result = [];\n\t\n\tif (ss.swimlane)\n\t{\n\t\tresult.push({title: mxResources.get('laneColor'),\n\t\t\tkey: 'swimlaneFillColor', defaultValue: 'default'});\n\t}\n\t\n\treturn result;\n};\n\n/**\n * Adds the label menu items to the given menu and parent.\n */\nStyleFormatPanel.prototype.addStroke = function(container)\n{\n\tvar ui = this.editorUi;\n\tvar graph = ui.editor.graph;\n\tvar ss = ui.getSelectionState();\n\t\n\tcontainer.style.paddingTop = '6px';\n\tcontainer.style.paddingBottom = '4px';\n\tcontainer.style.whiteSpace = 'normal';\n\t\n\tvar colorPanel = document.createElement('div');\n\tcolorPanel.style.fontWeight = 'bold';\n\t\n\tif (!ss.stroke)\n\t{\n\t\tcolorPanel.style.display = 'none';\n\t}\n\t\n\t// Adds gradient direction option\n\tvar styleSelect = document.createElement('select');\n\tstyleSelect.style.position = 'absolute';\n\tstyleSelect.style.height = '22px';\n\tstyleSelect.style.padding = '0px';\n\tstyleSelect.style.marginTop = '-3px';\n\tstyleSelect.style.textAlign = 'center';\n\tstyleSelect.style.boxSizing = 'border-box';\n\tstyleSelect.style.left = '90px';\n\tstyleSelect.style.width = '83px';\n\tstyleSelect.style.borderWidth = '1px';\n\tstyleSelect.style.borderStyle = 'solid';\n\n\tvar styles = ['sharp', 'rounded', 'curved'];\n\n\tfor (var i = 0; i < styles.length; i++)\n\t{\n\t\tvar styleOption = document.createElement('option');\n\t\tstyleOption.setAttribute('value', styles[i]);\n\t\tmxUtils.write(styleOption, mxResources.get(styles[i]));\n\t\tstyleSelect.appendChild(styleOption);\n\t}\n\t\n\tmxEvent.addListener(styleSelect, 'change', function(evt)\n\t{\n\t\tgraph.getModel().beginUpdate();\n\t\ttry\n\t\t{\n\t\t\tvar keys = [mxConstants.STYLE_ROUNDED, mxConstants.STYLE_CURVED];\n\t\t\t// Default for rounded is 1\n\t\t\tvar values = ['0', null];\n\t\t\t\n\t\t\tif (styleSelect.value == 'rounded')\n\t\t\t{\n\t\t\t\tvalues = ['1', null];\n\t\t\t}\n\t\t\telse if (styleSelect.value == 'curved')\n\t\t\t{\n\t\t\t\tvalues = [null, '1'];\n\t\t\t}\n\t\t\t\n\t\t\tfor (var i = 0; i < keys.length; i++)\n\t\t\t{\n\t\t\t\tgraph.setCellStyles(keys[i], values[i], ss.cells);\n\t\t\t}\n\t\t\t\n\t\t\tui.fireEvent(new mxEventObject('styleChanged', 'keys', keys,\n\t\t\t\t'values', values, 'cells', ss.cells));\n\t\t}\n\t\tfinally\n\t\t{\n\t\t\tgraph.getModel().endUpdate();\n\t\t}\n\t\t\n\t\tmxEvent.consume(evt);\n\t});\n\t\n\t// Stops events from bubbling to color option event handler\n\tmxEvent.addListener(styleSelect, 'click', function(evt)\n\t{\n\t\tmxEvent.consume(evt);\n\t});\n\n\tvar strokeKey = (ss.style.shape == 'image') ? mxConstants.STYLE_IMAGE_BORDER : mxConstants.STYLE_STROKECOLOR;\n\tvar label = (ss.style.shape == 'image') ? mxResources.get('border') : mxResources.get('line');\n\n\tvar lineColor = this.createCellColorOption(label, strokeKey, 'default', null, mxUtils.bind(this, function(color)\n\t{\n\t\tgraph.setCellStyles(strokeKey, color, ss.cells);\n\n\t\t// Sets strokeColor to inherit for rows and cells in tables\n\t\tif (color == null || color == mxConstants.NONE)\n\t\t{\n\t\t\tvar tableCells = [];\n\n\t\t\tfor (var i = 0; i < ss.cells.length; i++)\n\t\t\t{\n\t\t\t\tif (graph.isTableCell(ss.cells[i]) ||\n\t\t\t\t\tgraph.isTableRow(ss.cells[i]))\n\t\t\t\t{\n\t\t\t\t\ttableCells.push(ss.cells[i]);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (tableCells.length > 0)\n\t\t\t{\n\t\t\t\tgraph.setCellStyles(strokeKey, 'inherit', tableCells);\n\t\t\t}\n\t\t}\n\t}), graph.shapeForegroundColor);\n\t\n\tlineColor.appendChild(styleSelect);\n\tcolorPanel.appendChild(lineColor);\n\t\n\t// Used if only edges selected\n\tvar stylePanel = colorPanel.cloneNode(false);\n\tstylePanel.style.display = 'inline-flex';\n\tstylePanel.style.alignItems = 'top';\n\tstylePanel.style.fontWeight = 'normal';\n\tstylePanel.style.whiteSpace = 'nowrap';\n\tstylePanel.style.position = 'relative';\n\tstylePanel.style.paddingLeft = '5px';\n\tstylePanel.style.overflow = 'hidden';\n\tstylePanel.style.marginTop = '2px';\n\tstylePanel.style.width = '220px';\n\n\tvar addItem = mxUtils.bind(this, function(menu, width, cssName, keys, values)\n\t{\n\t\tvar item = this.editorUi.menus.styleChange(menu, '', keys, values, 'geIcon', null);\n\t\n\t\tvar pat = document.createElement('div');\n\t\tpat.style.width = width + 'px';\n\t\tpat.style.height = '1px';\n\t\tpat.style.borderBottom = '1px ' + cssName + ' ' + this.defaultStrokeColor;\n\t\tpat.style.paddingTop = '6px';\n\n\t\titem.firstChild.firstChild.style.padding = '0px 4px 0px 4px';\n\t\titem.firstChild.firstChild.style.width = width + 'px';\n\t\titem.firstChild.firstChild.appendChild(pat);\n\t\t\n\t\treturn item;\n\t});\n\n\tvar pattern = this.editorUi.toolbar.addMenuFunctionInContainer(stylePanel, 'geSprite-orthogonal', mxResources.get('pattern'), false, mxUtils.bind(this, function(menu)\n\t{\n\t\taddItem(menu, 75, 'solid', [mxConstants.STYLE_DASHED, mxConstants.STYLE_DASH_PATTERN], [null, null]).setAttribute('title', mxResources.get('solid'));\n\t\taddItem(menu, 75, 'dashed', [mxConstants.STYLE_DASHED, mxConstants.STYLE_DASH_PATTERN], ['1', null]).setAttribute('title', mxResources.get('dashed') + ' (1)');\n\t\taddItem(menu, 75, 'dashed', [mxConstants.STYLE_DASHED, mxConstants.STYLE_DASH_PATTERN], ['1', '8 8']).setAttribute('title', mxResources.get('dashed') + ' (2)');\n\t\taddItem(menu, 75, 'dashed', [mxConstants.STYLE_DASHED, mxConstants.STYLE_DASH_PATTERN], ['1', '12 12']).setAttribute('title', mxResources.get('dashed') + ' (3)');\n\t\taddItem(menu, 75, 'dotted', [mxConstants.STYLE_DASHED, mxConstants.STYLE_DASH_PATTERN], ['1', '1 1']).setAttribute('title', mxResources.get('dotted') + ' (1)');\n\t\taddItem(menu, 75, 'dotted', [mxConstants.STYLE_DASHED, mxConstants.STYLE_DASH_PATTERN], ['1', '1 2']).setAttribute('title', mxResources.get('dotted') + ' (2)');\n\t\taddItem(menu, 75, 'dotted', [mxConstants.STYLE_DASHED, mxConstants.STYLE_DASH_PATTERN], ['1', '1 4']).setAttribute('title', mxResources.get('dotted') + ' (3)');\n\t}));\n\t\n\t// Used for mixed selection (vertices and edges)\n\tvar altStylePanel = stylePanel.cloneNode(false);\n\n\tvar edgeShape = this.editorUi.toolbar.addMenuFunctionInContainer(altStylePanel, 'geSprite-connection', mxResources.get('connection'), false, mxUtils.bind(this, function(menu)\n\t{\n\t\tthis.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_SHAPE, mxConstants.STYLE_STARTSIZE, mxConstants.STYLE_ENDSIZE, 'width'],\n\t\t\t[null, null, null, null], 'geIcon geSprite geSprite-connection', null, null, null, true).setAttribute('title', mxResources.get('line'));\n\t\tthis.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_SHAPE, mxConstants.STYLE_STARTSIZE, mxConstants.STYLE_ENDSIZE, 'width'],\n\t\t\t['link', null, null, null], 'geIcon geSprite geSprite-linkedge', null, null, null, true).setAttribute('title', mxResources.get('link'));\n\t\tthis.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_SHAPE, mxConstants.STYLE_STARTSIZE, mxConstants.STYLE_ENDSIZE, 'width'],\n\t\t\t['flexArrow', null, null, null], 'geIcon geSprite geSprite-arrow', null, null, null, true).setAttribute('title', mxResources.get('arrow'));\n\t\tthis.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_SHAPE, mxConstants.STYLE_STARTSIZE, mxConstants.STYLE_ENDSIZE, 'width'],\n\t\t\t['arrow', null, null, null], 'geIcon geSprite geSprite-simplearrow', null, null, null, true).setAttribute('title', mxResources.get('simpleArrow')); \n\t}));\n\n\tvar altPattern = this.editorUi.toolbar.addMenuFunctionInContainer(altStylePanel, 'geSprite-orthogonal', mxResources.get('pattern'), false, mxUtils.bind(this, function(menu)\n\t{\n\t\taddItem(menu, 33, 'solid', [mxConstants.STYLE_DASHED, mxConstants.STYLE_DASH_PATTERN], [null, null]).setAttribute('title', mxResources.get('solid'));\n\t\taddItem(menu, 33, 'dashed', [mxConstants.STYLE_DASHED, mxConstants.STYLE_DASH_PATTERN], ['1', null]).setAttribute('title', mxResources.get('dashed') + ' (1)');\n\t\taddItem(menu, 33, 'dashed', [mxConstants.STYLE_DASHED, mxConstants.STYLE_DASH_PATTERN], ['1', '8 8']).setAttribute('title', mxResources.get('dashed') + ' (2)');\n\t\taddItem(menu, 33, 'dashed', [mxConstants.STYLE_DASHED, mxConstants.STYLE_DASH_PATTERN], ['1', '12 12']).setAttribute('title', mxResources.get('dashed') + ' (3)');\n\t\taddItem(menu, 33, 'dotted', [mxConstants.STYLE_DASHED, mxConstants.STYLE_DASH_PATTERN], ['1', '1 1']).setAttribute('title', mxResources.get('dotted') + ' (1)');\n\t\taddItem(menu, 33, 'dotted', [mxConstants.STYLE_DASHED, mxConstants.STYLE_DASH_PATTERN], ['1', '1 2']).setAttribute('title', mxResources.get('dotted') + ' (2)');\n\t\taddItem(menu, 33, 'dotted', [mxConstants.STYLE_DASHED, mxConstants.STYLE_DASH_PATTERN], ['1', '1 4']).setAttribute('title', mxResources.get('dotted') + ' (3)');\n\t}));\n\t\n\tvar stylePanel2 = stylePanel.cloneNode(false);\n\n\t// Stroke width\n\tvar input = document.createElement('input');\n\tinput.style.position = 'absolute';\n\tinput.style.textAlign = 'right';\n\tinput.style.marginTop = '2px';\n\tinput.style.width = '52px';\n\tinput.style.height = '22px';\n\tinput.style.left = '146px';\n\tinput.style.borderWidth = '1px';\n\tinput.style.borderStyle = 'solid';\n\tinput.style.boxSizing = 'border-box';\n\tinput.setAttribute('title', mxResources.get('linewidth'));\n\t\n\tstylePanel.appendChild(input);\n\t\n\tvar altInput = input.cloneNode(true);\n\taltStylePanel.appendChild(altInput);\n\n\tfunction update(evt)\n\t{\n\t\t// Maximum stroke width is 999\n\t\tvar value = parseFloat(input.value);\n\t\tvalue = Math.min(999, Math.max(0, (isNaN(value)) ? 1 : value));\n\t\t\n\t\tif (value != mxUtils.getValue(ss.style, mxConstants.STYLE_STROKEWIDTH, 1))\n\t\t{\n\t\t\tgraph.setCellStyles(mxConstants.STYLE_STROKEWIDTH, value, ss.cells);\n\t\t\tui.fireEvent(new mxEventObject('styleChanged', 'keys', [mxConstants.STYLE_STROKEWIDTH],\n\t\t\t\t\t'values', [value], 'cells', ss.cells));\n\t\t}\n\n\t\tinput.value = value + ' pt';\n\t\tmxEvent.consume(evt);\n\t};\n\n\tfunction altUpdate(evt)\n\t{\n\t\t// Maximum stroke width is 999\n\t\tvar value = parseFloat(altInput.value);\n\t\tvalue = Math.min(999, Math.max(0, (isNaN(value)) ? 1 : value));\n\t\t\n\t\tif (value != mxUtils.getValue(ss.style, mxConstants.STYLE_STROKEWIDTH, 1))\n\t\t{\n\t\t\tgraph.setCellStyles(mxConstants.STYLE_STROKEWIDTH, value, ss.cells);\n\t\t\tui.fireEvent(new mxEventObject('styleChanged', 'keys', [mxConstants.STYLE_STROKEWIDTH],\n\t\t\t\t\t'values', [value], 'cells', ss.cells));\n\t\t}\n\n\t\taltInput.value = value + ' pt';\n\t\tmxEvent.consume(evt);\n\t};\n\n\tvar stepper = this.createStepper(input, update, 1, 9);\n\tstepper.style.display = input.style.display;\n\tstepper.style.top = '2px';\n\tstepper.style.left = '198px';\n\tstylePanel.appendChild(stepper);\n\n\tvar altStepper = this.createStepper(altInput, altUpdate, 1, 9);\n\taltStepper.style.display = altInput.style.display;\n\taltInput.style.position = 'absolute';\n\taltStepper.style.top = '2px';\n\taltStepper.style.left = '198px';\n\taltStylePanel.appendChild(altStepper);\n\t\n\tmxEvent.addListener(input, 'blur', update);\n\tmxEvent.addListener(input, 'change', update);\n\n\tmxEvent.addListener(altInput, 'blur', altUpdate);\n\tmxEvent.addListener(altInput, 'change', altUpdate);\n\t\n\tvar edgeStyle = this.editorUi.toolbar.addMenuFunctionInContainer(stylePanel2, 'geSprite-orthogonal', mxResources.get('waypoints'), false, mxUtils.bind(this, function(menu)\n\t{\n\t\tif (ss.style.shape != 'arrow')\n\t\t{\n\t\t\tthis.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_EDGE, mxConstants.STYLE_CURVED, mxConstants.STYLE_NOEDGESTYLE], [null, null, null], 'geIcon geSprite geSprite-straight', null, true).setAttribute('title', mxResources.get('straight'));\n\t\t\tthis.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_EDGE, mxConstants.STYLE_CURVED, mxConstants.STYLE_NOEDGESTYLE], ['orthogonalEdgeStyle', null, null], 'geIcon geSprite geSprite-orthogonal', null, true).setAttribute('title', mxResources.get('orthogonal'));\n\t\t\tthis.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_EDGE, mxConstants.STYLE_ELBOW, mxConstants.STYLE_CURVED, mxConstants.STYLE_NOEDGESTYLE], ['elbowEdgeStyle', null, null, null], 'geIcon geSprite geSprite-horizontalelbow', null, true).setAttribute('title', mxResources.get('vertical'));\n\t\t\tthis.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_EDGE, mxConstants.STYLE_ELBOW, mxConstants.STYLE_CURVED, mxConstants.STYLE_NOEDGESTYLE], ['elbowEdgeStyle', 'vertical', null, null], 'geIcon geSprite geSprite-verticalelbow', null, true).setAttribute('title', mxResources.get('horizontal'));\n\t\t\tthis.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_EDGE, mxConstants.STYLE_ELBOW, mxConstants.STYLE_CURVED, mxConstants.STYLE_NOEDGESTYLE], ['isometricEdgeStyle', null, null, null], 'geIcon geSprite geSprite-horizontalisometric', null, true).setAttribute('title', mxResources.get('isometric'));\n\t\t\tthis.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_EDGE, mxConstants.STYLE_ELBOW, mxConstants.STYLE_CURVED, mxConstants.STYLE_NOEDGESTYLE], ['isometricEdgeStyle', 'vertical', null, null], 'geIcon geSprite geSprite-verticalisometric', null, true).setAttribute('title', mxResources.get('isometric'));\n\t\n\t\t\tif (ss.style.shape == 'connector')\n\t\t\t{\n\t\t\t\tthis.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_EDGE, mxConstants.STYLE_CURVED, mxConstants.STYLE_NOEDGESTYLE], ['orthogonalEdgeStyle', '1', null], 'geIcon geSprite geSprite-curved', null, true).setAttribute('title', mxResources.get('curved'));\n\t\t\t}\n\t\t\t\n\t\t\tthis.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_EDGE, mxConstants.STYLE_CURVED, mxConstants.STYLE_NOEDGESTYLE], ['entityRelationEdgeStyle', null, null], 'geIcon geSprite geSprite-entity', null, true).setAttribute('title', mxResources.get('entityRelation'));\n\t\t}\n\t}));\n\n\tvar lineStart = this.editorUi.toolbar.addMenuFunctionInContainer(stylePanel2, 'geSprite-startclassic', mxResources.get('linestart'), false, mxUtils.bind(this, function(menu)\n\t{\n\t\tif (ss.style.shape == 'connector' || ss.style.shape == 'flexArrow' || ss.style.shape == 'filledEdge' || ss.style.shape == 'wire')\n\t\t{\n\t\t\tvar item = this.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], [mxConstants.NONE, 0], 'geIcon', null, false);\n\t\t\titem.setAttribute('title', mxResources.get('none'));\n\n\t\t\tvar font = document.createElement('span');\n\t\t\tfont.style.fontSize = '11px';\n\t\t\tmxUtils.write(font, mxResources.get('none'));\n\t\t\titem.firstChild.firstChild.appendChild(font);\n\n\t\t\tif (ss.style.shape == 'connector' || ss.style.shape == 'filledEdge' || ss.style.shape == 'wire')\n\t\t\t{\n\t\t\t\tFormat.processMenuIcon(this.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], [mxConstants.ARROW_CLASSIC, 1], null, null, false, Format.classicFilledMarkerImage.src));\n\t\t\t\tFormat.processMenuIcon(this.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], [mxConstants.ARROW_CLASSIC_THIN, 1], null, null, false, Format.classicThinFilledMarkerImage.src));\n\t\t\t\tFormat.processMenuIcon(this.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], [mxConstants.ARROW_OPEN, 0], null, null, false, Format.openFilledMarkerImage.src));\n\t\t\t\tFormat.processMenuIcon(this.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], [mxConstants.ARROW_OPEN_THIN, 0], null, null, false, Format.openThinFilledMarkerImage.src));\n\t\t\t\tFormat.processMenuIcon(this.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], ['openAsync', 0], null, null, false, Format.openAsyncFilledMarkerImage.src));\n\t\t\t\tFormat.processMenuIcon(this.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], [mxConstants.ARROW_BLOCK, 1], null, null, false, Format.blockFilledMarkerImage.src));\n\t\t\t\tFormat.processMenuIcon(this.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], [mxConstants.ARROW_BLOCK_THIN, 1], null, null, false, Format.blockThinFilledMarkerImage.src));\n\t\t\t\tFormat.processMenuIcon(this.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], ['async', 1], null, null, false, Format.asyncFilledMarkerImage.src));\n\t\t\t\tFormat.processMenuIcon(this.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], [mxConstants.ARROW_OVAL, 1], null, null, false, Format.ovalFilledMarkerImage.src));\n\t\t\t\tFormat.processMenuIcon(this.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], [mxConstants.ARROW_DIAMOND, 1], null, null, false, Format.diamondFilledMarkerImage.src));\n\t\t\t\tFormat.processMenuIcon(this.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], [mxConstants.ARROW_DIAMOND_THIN, 1], null, null, false, Format.diamondThinFilledMarkerImage.src));\n\t\t\t\tFormat.processMenuIcon(this.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], [mxConstants.ARROW_CLASSIC, 0], null, null, false, Format.classicMarkerImage.src));\n\t\t\t\tFormat.processMenuIcon(this.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], [mxConstants.ARROW_CLASSIC_THIN, 0], null, null, false, Format.classicThinMarkerImage.src));\n\t\t\t\tFormat.processMenuIcon(this.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], [mxConstants.ARROW_BLOCK, 0], null, null, false, Format.blockMarkerImage.src));\n\t\t\t\tFormat.processMenuIcon(this.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], [mxConstants.ARROW_BLOCK_THIN, 0], null, null, false, Format.blockThinMarkerImage.src));\n\t\t\t\tFormat.processMenuIcon(this.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], ['async', 0], null, null, false, Format.asyncMarkerImage.src));\n\t\t\t\tFormat.processMenuIcon(this.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], [mxConstants.ARROW_OVAL, 0], null, null, false, Format.ovalMarkerImage.src));\n\t\t\t\tFormat.processMenuIcon(this.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], [mxConstants.ARROW_DIAMOND, 0], null, null, false, Format.diamondMarkerImage.src));\n\t\t\t\tFormat.processMenuIcon(this.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], [mxConstants.ARROW_DIAMOND_THIN, 0], null, null, false, Format.diamondThinMarkerImage.src));\n\t\t\t\tFormat.processMenuIcon(this.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], ['box', 0], null, null, false, Format.boxMarkerImage.src));\n\t\t\t\tFormat.processMenuIcon(this.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], ['halfCircle', 0], null, null, false, Format.halfCircleMarkerImage.src));\n\t\t\t\tFormat.processMenuIcon(this.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], ['dash', 0], null, null, false, Format.dashMarkerImage.src));\n\t\t\t\tFormat.processMenuIcon(this.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], ['cross', 0], null, null, false, Format.crossMarkerImage.src));\n\t\t\t\tFormat.processMenuIcon(this.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], ['circlePlus', 0], null, null, false, Format.circlePlusMarkerImage.src));\n\t\t\t\tFormat.processMenuIcon(this.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], ['circle', 1], null, null, false, Format.circleMarkerImage.src));\n\t\t\t\tFormat.processMenuIcon(this.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], ['baseDash', 0], null, null, false, Format.baseDashMarkerImage.src));\n\t\t\t\tFormat.processMenuIcon(this.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], ['ERone', 0], null, null, false, Format.EROneMarkerImage.src));\n\t\t\t\tFormat.processMenuIcon(this.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], ['ERmandOne', 0], null, null, false, Format.ERmandOneMarkerImage.src));\n\t\t\t\tFormat.processMenuIcon(this.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], ['ERmany', 0], null, null, false, Format.ERmanyMarkerImage.src));\n\t\t\t\tFormat.processMenuIcon(this.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], ['ERoneToMany', 0], null, null, false, Format.ERoneToManyMarkerImage.src));\n\t\t\t\tFormat.processMenuIcon(this.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], ['ERzeroToOne', 0], null, null, false, Format.ERzeroToOneMarkerImage.src));\n\t\t\t\tFormat.processMenuIcon(this.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], ['ERzeroToMany', 0], null, null, false, Format.ERzeroToManyMarkerImage.src));\n\t\t\t\tFormat.processMenuIcon(this.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], ['doubleBlock', 0], null, null, false, Format.doubleBlockMarkerImage.src));\n\t\t\t\tFormat.processMenuIcon(this.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], ['doubleBlock', 1], null, null, false, Format.doubleBlockFilledMarkerImage.src));\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tthis.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_STARTARROW], [mxConstants.ARROW_BLOCK], 'geIcon geSprite geSprite-startblocktrans', null, false).setAttribute('title', mxResources.get('block'));\n\t\t\t}\n\n\t\t\tmenu.div.style.width = '40px';\n\n\t\t\twindow.setTimeout(mxUtils.bind(this, function()\n\t\t\t{\n\t\t\t\tif (menu.div != null)\n\t\t\t\t{\n\t\t\t\t\tmxUtils.fit(menu.div);\n\t\t\t\t}\n\t\t\t}), 0);\n\t\t}\n\t}));\n\n\tvar lineEnd = this.editorUi.toolbar.addMenuFunctionInContainer(stylePanel2, 'geSprite-endclassic', mxResources.get('lineend'), false, mxUtils.bind(this, function(menu)\n\t{\n\t\tif (ss.style.shape == 'connector' || ss.style.shape == 'flexArrow' || ss.style.shape == 'filledEdge' || ss.style.shape == 'wire')\n\t\t{\n\t\t\tvar item = this.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], [mxConstants.NONE, 0], 'geIcon', null, false);\n\t\t\titem.setAttribute('title', mxResources.get('none'));\n\n\t\t\tvar font = document.createElement('span');\n\t\t\tfont.style.fontSize = '11px';\n\t\t\tmxUtils.write(font, mxResources.get('none'));\n\t\t\titem.firstChild.firstChild.appendChild(font);\n\t\t\t\n\t\t\tif (ss.style.shape == 'connector' || ss.style.shape == 'filledEdge' || ss.style.shape == 'wire')\n\t\t\t{\n\t\t\t\tFormat.processMenuIcon(this.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], [mxConstants.ARROW_CLASSIC, 1], null, null, false, Format.classicFilledMarkerImage.src), 'scaleX(-1)');\n\t\t\t\tFormat.processMenuIcon(this.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], [mxConstants.ARROW_CLASSIC_THIN, 1], null, null, false, Format.classicThinFilledMarkerImage.src), 'scaleX(-1)');\n\t\t\t\tFormat.processMenuIcon(this.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], [mxConstants.ARROW_OPEN, 0], null, null, false, Format.openFilledMarkerImage.src), 'scaleX(-1)');\n\t\t\t\tFormat.processMenuIcon(this.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], [mxConstants.ARROW_OPEN_THIN, 0], null, null, false, Format.openThinFilledMarkerImage.src), 'scaleX(-1)');\n\t\t\t\tFormat.processMenuIcon(this.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], ['openAsync', 0], null, null, false, Format.openAsyncFilledMarkerImage.src), 'scaleX(-1)');\n\t\t\t\tFormat.processMenuIcon(this.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], [mxConstants.ARROW_BLOCK, 1], null, null, false, Format.blockFilledMarkerImage.src), 'scaleX(-1)');\n\t\t\t\tFormat.processMenuIcon(this.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], [mxConstants.ARROW_BLOCK_THIN, 1], null, null, false, Format.blockThinFilledMarkerImage.src), 'scaleX(-1)');\n\t\t\t\tFormat.processMenuIcon(this.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], ['async', 1], null, null, false, Format.asyncFilledMarkerImage.src), 'scaleX(-1)');\n\t\t\t\tFormat.processMenuIcon(this.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], [mxConstants.ARROW_OVAL, 1], null, null, false, Format.ovalFilledMarkerImage.src), 'scaleX(-1)');\n\t\t\t\tFormat.processMenuIcon(this.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], [mxConstants.ARROW_DIAMOND, 1], null, null, false, Format.diamondFilledMarkerImage.src), 'scaleX(-1)');\n\t\t\t\tFormat.processMenuIcon(this.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], [mxConstants.ARROW_DIAMOND_THIN, 1], null, null, false, Format.diamondThinFilledMarkerImage.src), 'scaleX(-1)');\n\t\t\t\tFormat.processMenuIcon(this.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], [mxConstants.ARROW_CLASSIC, 0], null, null, false, Format.classicMarkerImage.src), 'scaleX(-1)');\n\t\t\t\tFormat.processMenuIcon(this.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], [mxConstants.ARROW_CLASSIC_THIN, 0], null, null, false, Format.classicThinMarkerImage.src), 'scaleX(-1)');\n\t\t\t\tFormat.processMenuIcon(this.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], [mxConstants.ARROW_BLOCK, 0], null, null, false, Format.blockMarkerImage.src), 'scaleX(-1)');\n\t\t\t\tFormat.processMenuIcon(this.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], [mxConstants.ARROW_BLOCK_THIN, 0], null, null, false, Format.blockThinMarkerImage.src), 'scaleX(-1)');\n\t\t\t\tFormat.processMenuIcon(this.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], ['async', 0], null, null, false, Format.asyncMarkerImage.src), 'scaleX(-1)');\n\t\t\t\tFormat.processMenuIcon(this.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], [mxConstants.ARROW_OVAL, 0], null, null, false, Format.ovalMarkerImage.src), 'scaleX(-1)');\n\t\t\t\tFormat.processMenuIcon(this.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], [mxConstants.ARROW_DIAMOND, 0], null, null, false, Format.diamondMarkerImage.src), 'scaleX(-1)');\n\t\t\t\tFormat.processMenuIcon(this.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], [mxConstants.ARROW_DIAMOND_THIN, 0], null, null, false, Format.diamondThinMarkerImage.src), 'scaleX(-1)');\n\t\t\t\tFormat.processMenuIcon(this.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], ['box', 0], null, null, false, Format.boxMarkerImage.src), 'scaleX(-1)');\n\t\t\t\tFormat.processMenuIcon(this.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], ['halfCircle', 0], null, null, false, Format.halfCircleMarkerImage.src), 'scaleX(-1)');\n\t\t\t\tFormat.processMenuIcon(this.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], ['dash', 0], null, null, false, Format.dashMarkerImage.src), 'scaleX(-1)');\n\t\t\t\tFormat.processMenuIcon(this.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], ['cross', 0], null, null, false, Format.crossMarkerImage.src), 'scaleX(-1)');\n\t\t\t\tFormat.processMenuIcon(this.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], ['circlePlus', 0], null, null, false, Format.circlePlusMarkerImage.src), 'scaleX(-1)');\n\t\t\t\tFormat.processMenuIcon(this.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], ['circle', 0], null, null, false, Format.circleMarkerImage.src), 'scaleX(-1)');\n\t\t\t\tFormat.processMenuIcon(this.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], ['baseDash', 0], null, null, false, Format.baseDashMarkerImage.src), 'scaleX(-1)');\n\t\t\t\tFormat.processMenuIcon(this.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], ['ERone', 0], null, null, false, Format.EROneMarkerImage.src), 'scaleX(-1)');\n\t\t\t\tFormat.processMenuIcon(this.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], ['ERmandOne', 0], null, null, false, Format.ERmandOneMarkerImage.src), 'scaleX(-1)');\n\t\t\t\tFormat.processMenuIcon(this.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], ['ERmany', 0], null, null, false, Format.ERmanyMarkerImage.src), 'scaleX(-1)');\n\t\t\t\tFormat.processMenuIcon(this.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], ['ERoneToMany', 0], null, null, false, Format.ERoneToManyMarkerImage.src), 'scaleX(-1)');\n\t\t\t\tFormat.processMenuIcon(this.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], ['ERzeroToOne', 0], null, null, false, Format.ERzeroToOneMarkerImage.src), 'scaleX(-1)');\n\t\t\t\tFormat.processMenuIcon(this.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], ['ERzeroToMany', 0], null, null, false, Format.ERzeroToManyMarkerImage.src), 'scaleX(-1)');\n\t\t\t\tFormat.processMenuIcon(this.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], ['doubleBlock', 0], null, null, false, Format.doubleBlockMarkerImage.src), 'scaleX(-1)');\n\t\t\t\tFormat.processMenuIcon(this.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], ['doubleBlock', 1], null, null, false, Format.doubleBlockFilledMarkerImage.src), 'scaleX(-1)');\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tthis.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_ENDARROW], [mxConstants.ARROW_BLOCK], 'geIcon geSprite geSprite-endblocktrans', null, false).setAttribute('title', mxResources.get('block'));\n\t\t\t}\n\n\t\t\tmenu.div.style.width = '40px';\n\n\t\t\twindow.setTimeout(mxUtils.bind(this, function()\n\t\t\t{\n\t\t\t\tif (menu.div != null)\n\t\t\t\t{\n\t\t\t\t\tmxUtils.fit(menu.div);\n\t\t\t\t}\n\t\t\t}), 0);\n\t\t}\n\t}));\n\n\tthis.addArrow(edgeShape);\n\tthis.addArrow(edgeStyle).style.marginTop = '-1px';\n\tthis.addArrow(lineStart);\n\tthis.addArrow(lineEnd);\n\t\n\tvar symbol = this.addArrow(pattern);\n\tsymbol.className = 'geIcon';\n\tpattern.style.width = '134px';\n\n\tvar altSymbol = this.addArrow(altPattern);\n\taltSymbol.className = 'geIcon';\n\taltSymbol.style.width = '22px';\n\t\n\tvar solid = document.createElement('div');\n\tsolid.style.width = '102px';\n\tsolid.style.height = '10px';\n\tsolid.style.borderBottom = '1px solid ' + this.defaultStrokeColor;\n\tsolid.style.marginLeft = '10px';\n\tsymbol.appendChild(solid);\n\t\n\tvar altSolid = document.createElement('div');\n\taltSolid.style.width = '30px';\n\taltSolid.style.height = '10px';\n\taltSolid.style.borderBottom = '1px solid ' + this.defaultStrokeColor;\n\taltSolid.style.marginLeft = '10px';\n\taltSymbol.appendChild(altSolid);\n\n\tcontainer.appendChild(colorPanel);\n\tcontainer.appendChild(altStylePanel);\n\tcontainer.appendChild(stylePanel);\n\n\tvar arrowPanel = stylePanel.cloneNode(false);\n\tarrowPanel.style.display = 'block';\n\tarrowPanel.style.padding = '5px 4px 6px 0px';\n\tarrowPanel.style.fontWeight = 'normal';\n\t\n\tvar span = document.createElement('div');\n\tspan.style.position = 'absolute';\n\tspan.style.maxWidth = '78px';\n\tspan.style.overflow = 'hidden';\n\tspan.style.textOverflow = 'ellipsis';\n\tspan.style.marginLeft = '0px';\n\tspan.style.marginBottom = '12px';\n\tspan.style.marginTop = '2px';\n\tspan.style.fontWeight = 'normal';\n\t\n\tmxUtils.write(span, mxResources.get('lineend'));\n\tarrowPanel.appendChild(span);\n\t\n\tvar endSpacingUpdate, endSizeUpdate;\n\tvar endSpacing = this.addUnitInput(arrowPanel, 'pt', 98, 52, function()\n\t{\n\t\tendSpacingUpdate.apply(this, arguments);\n\t});\n\tvar endSize = this.addUnitInput(arrowPanel, 'pt', 30, 52, function()\n\t{\n\t\tendSizeUpdate.apply(this, arguments);\n\t});\n\n\tmxUtils.br(arrowPanel);\n\t\n\tvar spacer = document.createElement('div');\n\tspacer.style.height = '8px';\n\tarrowPanel.appendChild(spacer);\n\t\n\tspan = span.cloneNode(false);\n\tmxUtils.write(span, mxResources.get('linestart'));\n\tarrowPanel.appendChild(span);\n\t\n\tvar startSpacingUpdate, startSizeUpdate;\n\tvar startSpacing = this.addUnitInput(arrowPanel, 'pt', 98, 52, function()\n\t{\n\t\tstartSpacingUpdate.apply(this, arguments);\n\t});\n\tvar startSize = this.addUnitInput(arrowPanel, 'pt', 30, 52, function()\n\t{\n\t\tstartSizeUpdate.apply(this, arguments);\n\t});\n\n\tmxUtils.br(arrowPanel);\n\tthis.addLabel(arrowPanel, mxResources.get('spacing'),\n\t\t98, 64).style.fontSize = '11px';\n\tthis.addLabel(arrowPanel, mxResources.get('size'),\n\t\t30, 64).style.fontSize = '11px';\n\tmxUtils.br(arrowPanel);\n\t\n\tvar perimeterPanel = colorPanel.cloneNode(false);\n\tperimeterPanel.style.fontWeight = 'normal';\n\tperimeterPanel.style.position = 'relative';\n\tperimeterPanel.style.paddingLeft = '16px'\n\tperimeterPanel.style.marginBottom = '2px';\n\tperimeterPanel.style.marginTop = '6px';\n\tperimeterPanel.style.borderWidth = '0px';\n\tperimeterPanel.style.paddingBottom = '18px';\n\t\n\tvar span = document.createElement('div');\n\tspan.style.position = 'absolute';\n\tspan.style.marginLeft = '3px';\n\tspan.style.marginBottom = '12px';\n\tspan.style.marginTop = '1px';\n\tspan.style.fontWeight = 'normal';\n\tspan.style.width = '120px';\n\tmxUtils.write(span, mxResources.get('perimeter'));\n\tperimeterPanel.appendChild(span);\n\t\n\tvar perimeterUpdate;\n\tvar perimeterSpacing = this.addUnitInput(perimeterPanel, 'pt', 30, 52, function()\n\t{\n\t\tperimeterUpdate.apply(this, arguments);\n\t});\n\n\tif (ss.edges.length == ss.cells.length)\n\t{\n\t\tcontainer.appendChild(stylePanel2);\n\t\tcontainer.appendChild(arrowPanel);\n\t}\n\telse if (ss.vertices.length == ss.cells.length)\n\t{\n\t\tcontainer.appendChild(perimeterPanel);\n\t}\n\t\n\tvar listener = mxUtils.bind(this, function(sender, evt, force)\n\t{\n\t\tss = ui.getSelectionState();\n\n\t\tif (force || document.activeElement != input)\n\t\t{\n\t\t\tvar tmp = parseFloat(mxUtils.getValue(ss.style, mxConstants.STYLE_STROKEWIDTH, 1));\n\t\t\tinput.value = (isNaN(tmp)) ? '' : tmp + ' pt';\n\t\t}\n\t\t\n\t\tif (force || document.activeElement != altInput)\n\t\t{\n\t\t\tvar tmp = parseFloat(mxUtils.getValue(ss.style, mxConstants.STYLE_STROKEWIDTH, 1));\n\t\t\taltInput.value = (isNaN(tmp)) ? '' : tmp + ' pt';\n\t\t}\n\t\t\n\t\tstyleSelect.style.visibility = (ss.style.shape == 'connector' ||\n\t\t\tss.style.shape == 'filledEdge' || ss.style.shape == 'wire') ?\n\t\t\t'' : 'hidden';\n\t\t\n\t\tif (mxUtils.getValue(ss.style, mxConstants.STYLE_CURVED, null) == '1')\n\t\t{\n\t\t\tstyleSelect.value = 'curved';\n\t\t}\n\t\telse if (mxUtils.getValue(ss.style, mxConstants.STYLE_ROUNDED, null) == '1')\n\t\t{\n\t\t\tstyleSelect.value = 'rounded';\n\t\t}\n\t\t\n\t\tif (mxUtils.getValue(ss.style, mxConstants.STYLE_DASHED, null) == '1')\n\t\t{\n\t\t\tif (mxUtils.getValue(ss.style, mxConstants.STYLE_DASH_PATTERN, null) == null ||\n\t\t\t\tString(mxUtils.getValue(ss.style, mxConstants.STYLE_DASH_PATTERN, '')).substring(0, 2) != '1 ')\n\t\t\t{\n\t\t\t\tsolid.style.borderBottom = '1px dashed ' + this.defaultStrokeColor;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tsolid.style.borderBottom = '1px dotted ' + this.defaultStrokeColor;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tsolid.style.borderBottom = '1px solid ' + this.defaultStrokeColor;\n\t\t}\n\t\t\n\t\taltSolid.style.borderBottom = solid.style.borderBottom;\n\t\t\n\t\t// Updates toolbar icon for edge style\n\t\tvar edgeStyleDiv = edgeStyle.getElementsByTagName('div')[0];\n\t\t\n\t\tif (edgeStyleDiv != null)\n\t\t{\n\t\t\tvar es = mxUtils.getValue(ss.style, mxConstants.STYLE_EDGE, null);\n\t\t\t\n\t\t\tif (mxUtils.getValue(ss.style, mxConstants.STYLE_NOEDGESTYLE, null) == '1')\n\t\t\t{\n\t\t\t\tes = null;\n\t\t\t}\n\t\t\t\n\t\t\tif (es == 'orthogonalEdgeStyle' && mxUtils.getValue(ss.style, mxConstants.STYLE_CURVED, null) == '1')\n\t\t\t{\n\t\t\t\tedgeStyleDiv.className = 'geSprite geSprite-curved';\n\t\t\t}\n\t\t\telse if (es == 'straight' || es == 'none' || es == null)\n\t\t\t{\n\t\t\t\tedgeStyleDiv.className = 'geSprite geSprite-straight';\n\t\t\t}\n\t\t\telse if (es == 'entityRelationEdgeStyle')\n\t\t\t{\n\t\t\t\tedgeStyleDiv.className = 'geSprite geSprite-entity';\n\t\t\t}\n\t\t\telse if (es == 'elbowEdgeStyle')\n\t\t\t{\n\t\t\t\tedgeStyleDiv.className = 'geSprite ' + ((mxUtils.getValue(ss.style,\n\t\t\t\t\tmxConstants.STYLE_ELBOW, null) == 'vertical') ?\n\t\t\t\t\t'geSprite-verticalelbow' : 'geSprite-horizontalelbow');\n\t\t\t}\n\t\t\telse if (es == 'isometricEdgeStyle')\n\t\t\t{\n\t\t\t\tedgeStyleDiv.className = 'geSprite ' + ((mxUtils.getValue(ss.style,\n\t\t\t\t\tmxConstants.STYLE_ELBOW, null) == 'vertical') ?\n\t\t\t\t\t'geSprite-verticalisometric' : 'geSprite-horizontalisometric');\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tedgeStyleDiv.className = 'geSprite geSprite-orthogonal';\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Updates icon for edge shape\n\t\tvar edgeShapeDiv = edgeShape.getElementsByTagName('div')[0];\n\t\t\n\t\tif (edgeShapeDiv != null)\n\t\t{\n\t\t\tif (ss.style.shape == 'link')\n\t\t\t{\n\t\t\t\tedgeShapeDiv.className = 'geSprite geSprite-linkedge';\n\t\t\t}\n\t\t\telse if (ss.style.shape == 'flexArrow')\n\t\t\t{\n\t\t\t\tedgeShapeDiv.className = 'geSprite geSprite-arrow';\n\t\t\t}\n\t\t\telse if (ss.style.shape == 'arrow')\n\t\t\t{\n\t\t\t\tedgeShapeDiv.className = 'geSprite geSprite-simplearrow';\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tedgeShapeDiv.className = 'geSprite geSprite-connection';\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (ss.edges.length == ss.cells.length)\n\t\t{\n\t\t\taltStylePanel.style.display = '';\n\t\t\tstylePanel.style.display = 'none';\n\t\t}\n\t\telse\n\t\t{\n\t\t\taltStylePanel.style.display = 'none';\n\t\t\tstylePanel.style.display = '';\n\t\t}\n\n\t\tif (Graph.lineJumpsEnabled && ss.edges.length > 0 &&\n\t\t\tss.vertices.length == 0 && ss.lineJumps)\n\t\t{\n\t\t\tcontainer.style.borderBottomStyle = 'none';\n\t\t}\n\n\t\tfunction updateArrow(marker, fill, elt, prefix)\n\t\t{\n\t\t\tvar markerDiv = elt.getElementsByTagName('div')[0];\n\t\t\t\n\t\t\tif (markerDiv != null)\n\t\t\t{\n\t\t\t\tui.updateCssForMarker(markerDiv, prefix, ss.style.shape, marker, fill);\n\t\t\t}\n\t\t\t\n\t\t\treturn markerDiv;\n\t\t};\n\t\t\n\t\tvar sourceDiv = updateArrow(mxUtils.getValue(ss.style, mxConstants.STYLE_STARTARROW, null),\n\t\t\t\tmxUtils.getValue(ss.style, 'startFill', '1'), lineStart, 'start');\n\t\tvar targetDiv = updateArrow(mxUtils.getValue(ss.style, mxConstants.STYLE_ENDARROW, null),\n\t\t\t\tmxUtils.getValue(ss.style, 'endFill', '1'), lineEnd, 'end');\n\n\t\t// Special cases for markers\n\t\tif (sourceDiv != null && targetDiv != null)\n\t\t{\n\t\t\tif (ss.style.shape == 'arrow')\n\t\t\t{\n\t\t\t\tsourceDiv.className = 'geSprite geSprite-noarrow';\n\t\t\t\ttargetDiv.className = 'geSprite geSprite-endblocktrans';\n\t\t\t}\n\t\t\telse if (ss.style.shape == 'link')\n\t\t\t{\n\t\t\t\tsourceDiv.className = 'geSprite geSprite-noarrow';\n\t\t\t\ttargetDiv.className = 'geSprite geSprite-noarrow';\n\t\t\t}\n\t\t}\n\n\t\tmxUtils.setOpacity(edgeStyle, (ss.style.shape == 'arrow') ? 30 : 100);\t\t\t\n\t\t\n\t\tif (ss.style.shape != 'connector' && ss.style.shape != 'flexArrow' &&\n\t\t\tss.style.shape != 'filledEdge' && ss.style.shape != 'wire')\n\t\t{\n\t\t\tmxUtils.setOpacity(lineStart, 30);\n\t\t\tmxUtils.setOpacity(lineEnd, 30);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tmxUtils.setOpacity(lineStart, 100);\n\t\t\tmxUtils.setOpacity(lineEnd, 100);\n\t\t}\n\n\t\tif (force || document.activeElement != startSize)\n\t\t{\n\t\t\tvar tmp = parseInt(mxUtils.getValue(ss.style, mxConstants.STYLE_STARTSIZE, mxConstants.DEFAULT_MARKERSIZE));\n\t\t\tstartSize.value = (isNaN(tmp)) ? '' : tmp  + ' pt';\n\t\t}\n\t\t\n\t\tif (force || document.activeElement != startSpacing)\n\t\t{\n\t\t\tvar tmp = parseInt(mxUtils.getValue(ss.style, mxConstants.STYLE_SOURCE_PERIMETER_SPACING, 0));\n\t\t\tstartSpacing.value = (isNaN(tmp)) ? '' : tmp  + ' pt';\n\t\t}\n\n\t\tif (force || document.activeElement != endSize)\n\t\t{\n\t\t\tvar tmp = parseInt(mxUtils.getValue(ss.style, mxConstants.STYLE_ENDSIZE, mxConstants.DEFAULT_MARKERSIZE));\n\t\t\tendSize.value = (isNaN(tmp)) ? '' : tmp  + ' pt';\n\t\t}\n\t\t\n\t\tif (force || document.activeElement != startSpacing)\n\t\t{\n\t\t\tvar tmp = parseInt(mxUtils.getValue(ss.style, mxConstants.STYLE_TARGET_PERIMETER_SPACING, 0));\n\t\t\tendSpacing.value = (isNaN(tmp)) ? '' : tmp  + ' pt';\n\t\t}\n\t\t\n\t\tif (force || document.activeElement != perimeterSpacing)\n\t\t{\n\t\t\tvar tmp = parseInt(mxUtils.getValue(ss.style, mxConstants.STYLE_PERIMETER_SPACING, 0));\n\t\t\tperimeterSpacing.value = (isNaN(tmp)) ? '' : tmp  + ' pt';\n\t\t}\n\t});\n\t\n\tstartSizeUpdate = this.installInputHandler(startSize, mxConstants.STYLE_STARTSIZE, mxConstants.DEFAULT_MARKERSIZE, 0, 999, ' pt');\n\tstartSpacingUpdate = this.installInputHandler(startSpacing, mxConstants.STYLE_SOURCE_PERIMETER_SPACING, 0, -999, 999, ' pt');\n\tendSizeUpdate = this.installInputHandler(endSize, mxConstants.STYLE_ENDSIZE, mxConstants.DEFAULT_MARKERSIZE, 0, 999, ' pt');\n\tendSpacingUpdate = this.installInputHandler(endSpacing, mxConstants.STYLE_TARGET_PERIMETER_SPACING, 0, -999, 999, ' pt');\n\tperimeterUpdate = this.installInputHandler(perimeterSpacing, mxConstants.STYLE_PERIMETER_SPACING, 0, 0, 999, ' pt');\n\n\tthis.addKeyHandler(input, listener);\n\tthis.addKeyHandler(startSize, listener);\n\tthis.addKeyHandler(startSpacing, listener);\n\tthis.addKeyHandler(endSize, listener);\n\tthis.addKeyHandler(endSpacing, listener);\n\tthis.addKeyHandler(perimeterSpacing, listener);\n\n\tgraph.getModel().addListener(mxEvent.CHANGE, listener);\n\tthis.listeners.push({destroy: function() { graph.getModel().removeListener(listener); }});\n\tlistener();\n\n\treturn container;\n};\n\n/**\n * Adds UI for configuring line jumps.\n */\nStyleFormatPanel.prototype.addLineJumps = function(container)\n{\n\tvar ui = this.editorUi;\n\tvar editor = ui.editor;\n\tvar graph = editor.graph;\n\tvar ss = ui.getSelectionState();\n\t\n\tif (Graph.lineJumpsEnabled && ss.edges.length > 0 &&\n\t\tss.vertices.length == 0 && ss.lineJumps)\n\t{\n\t\tcontainer.style.padding = '2px 0px 24px 14px';\n\t\t\n\t\tvar span = document.createElement('div');\n\t\tspan.style.position = 'absolute';\n\t\tspan.style.maxWidth = '78px';\n\t\tspan.style.overflow = 'hidden';\n\t\tspan.style.textOverflow = 'ellipsis';\n\t\t\n\t\tmxUtils.write(span, mxResources.get('lineJumps'));\n\t\tcontainer.appendChild(span);\n\t\t\n\t\tvar styleSelect = document.createElement('select');\n\t\tstyleSelect.style.position = 'absolute';\n\t\tstyleSelect.style.height = '21px';\n\t\tstyleSelect.style.padding = '0px';\n\t\tstyleSelect.style.marginTop = '-2px';\n\t\tstyleSelect.style.boxSizing = 'border-box';\n\t\tstyleSelect.style.textAlign = 'center';\n\t\tstyleSelect.style.right = '84px';\n\t\tstyleSelect.style.width = '64px';\n\t\tstyleSelect.style.borderWidth = '1px';\n\t\tstyleSelect.style.borderStyle = 'solid';\n\n\t\tvar styles = ['none', 'arc', 'gap', 'sharp', 'line'];\n\n\t\tfor (var i = 0; i < styles.length; i++)\n\t\t{\n\t\t\tvar styleOption = document.createElement('option');\n\t\t\tstyleOption.setAttribute('value', styles[i]);\n\t\t\tmxUtils.write(styleOption, mxResources.get(styles[i]));\n\t\t\tstyleSelect.appendChild(styleOption);\n\t\t}\n\t\t\n\t\tmxEvent.addListener(styleSelect, 'change', function(evt)\n\t\t{\n\t\t\tgraph.getModel().beginUpdate();\n\t\t\ttry\n\t\t\t{\n\t\t\t\tgraph.setCellStyles('jumpStyle', styleSelect.value, ss.cells);\n\t\t\t\tui.fireEvent(new mxEventObject('styleChanged', 'keys', ['jumpStyle'],\n\t\t\t\t\t'values', [styleSelect.value], 'cells', ss.cells));\n\t\t\t}\n\t\t\tfinally\n\t\t\t{\n\t\t\t\tgraph.getModel().endUpdate();\n\t\t\t}\n\t\t\t\n\t\t\tmxEvent.consume(evt);\n\t\t});\n\t\t\n\t\t// Stops events from bubbling to color option event handler\n\t\tmxEvent.addListener(styleSelect, 'click', function(evt)\n\t\t{\n\t\t\tmxEvent.consume(evt);\n\t\t});\n\t\t\n\t\tcontainer.appendChild(styleSelect);\n\t\t\n\t\tvar jumpSizeUpdate;\n\t\t\n\t\tvar jumpSize = this.addUnitInput(container, 'pt', 16, 52, function()\n\t\t{\n\t\t\tjumpSizeUpdate.apply(this, arguments);\n\t\t});\n\t\t\n\t\tjumpSizeUpdate = this.installInputHandler(jumpSize, 'jumpSize',\n\t\t\tGraph.defaultJumpSize, 0, 999, ' pt');\n\t\t\n\t\tvar listener = mxUtils.bind(this, function(sender, evt, force)\n\t\t{\n\t\t\tss = ui.getSelectionState();\n\t\t\tstyleSelect.value = mxUtils.getValue(ss.style, 'jumpStyle', 'none');\n\n\t\t\tif (force || document.activeElement != jumpSize)\n\t\t\t{\n\t\t\t\tvar tmp = parseInt(mxUtils.getValue(ss.style, 'jumpSize', Graph.defaultJumpSize));\n\t\t\t\tjumpSize.value = (isNaN(tmp)) ? '' : tmp  + ' pt';\n\t\t\t}\n\t\t});\n\n\t\tthis.addKeyHandler(jumpSize, listener);\n\n\t\tgraph.getModel().addListener(mxEvent.CHANGE, listener);\n\t\tthis.listeners.push({destroy: function() { graph.getModel().removeListener(listener); }});\n\t\tlistener();\n\t}\n\telse\n\t{\n\t\tcontainer.style.display = 'none';\n\t}\n\t\n\treturn container;\n};\n\n/**\n * Adds the label menu items to the given menu and parent.\n */\nStyleFormatPanel.prototype.addEffects = function(div)\n{\n\tvar ui = this.editorUi;\n\tvar editor = ui.editor;\n\tvar graph = editor.graph;\n\tvar ss = ui.getSelectionState();\n\t\n\tdiv.style.paddingTop = '4px';\n\tdiv.style.paddingBottom = '4px';\n\n\tvar table = document.createElement('table');\n\n\ttable.style.width = '210px';\n\ttable.style.fontWeight = 'bold';\n\ttable.style.tableLayout = 'fixed';\n\tvar tbody = document.createElement('tbody');\n\tvar row = document.createElement('tr');\n\trow.style.padding = '0px';\n\tvar left = document.createElement('td');\n\tleft.style.padding = '0px';\n\tleft.style.width = '50%';\n\tleft.setAttribute('valign', 'top');\n\t\n\tvar right = left.cloneNode(true);\n\tright.style.paddingLeft = '8px';\n\trow.appendChild(left);\n\trow.appendChild(right);\n\ttbody.appendChild(row);\n\ttable.appendChild(tbody);\n\tdiv.appendChild(table);\n\n\tvar current = left;\n\t\n\tvar addOption = mxUtils.bind(this, function(label, key, defaultValue, fn)\n\t{\n\t\tvar opt = this.createCellOption(label, key, defaultValue, null, null, fn);\n\t\topt.style.width = '100%';\n\t\tcurrent.appendChild(opt);\n\t\tcurrent = (current == left) ? right : left;\n\t});\n\n\tvar listener = mxUtils.bind(this, function(sender, evt, force)\n\t{\n\t\tss = ui.getSelectionState();\n\t\t\n\t\tleft.innerText = '';\n\t\tright.innerText = '';\n\t\tcurrent = left;\n\t\t\n\t\tif (ss.rounded)\n\t\t{\n\t\t\taddOption(mxResources.get('rounded'), mxConstants.STYLE_ROUNDED, 0);\n\t\t}\n\t\t\n\t\tif (ss.swimlane)\n\t\t{\n\t\t\taddOption(mxResources.get('divider'), 'swimlaneLine', 1);\n\t\t}\n\n\t\taddOption(mxResources.get('sketch'), 'sketch', 0, function(cells, enabled)\n\t\t{\n\t\t\tgraph.updateCellStyles({'sketch': (enabled) ? '1' : null,\n\t\t\t\t'curveFitting': (enabled) ? Editor.sketchDefaultCurveFitting : null,\n\t\t\t\t'jiggle': (enabled) ? Editor.sketchDefaultJiggle : null}, cells);\n\t\t});\n\n\t\tif (ss.glass)\n\t\t{\n\t\t\taddOption(mxResources.get('glass'), mxConstants.STYLE_GLASS, 0);\n\t\t}\n\t\t\n\t\tif (!ss.containsImage)\n\t\t{\n\t\t\taddOption(mxResources.get('shadow'), mxConstants.STYLE_SHADOW, 0);\n\t\t}\n\t});\n\t\n\tgraph.getModel().addListener(mxEvent.CHANGE, listener);\n\tthis.listeners.push({destroy: function() { graph.getModel().removeListener(listener); }});\n\tlistener();\n\n\treturn div;\n}\n\n/**\n * Adds the label menu items to the given menu and parent.\n */\nStyleFormatPanel.prototype.addStyleOps = function(div)\n{\n\tvar ss = this.editorUi.getSelectionState();\n\n\tif (ss.cells.length == 1)\n\t{\n\t\tthis.addActions(div, ['setAsDefaultStyle']);\n\t}\n\n\treturn div;\n};\n\n/**\n * Adds the label menu items to the given menu and parent.\n */\nDiagramStylePanel = function(format, editorUi, container)\n{\n\tBaseFormatPanel.call(this, format, editorUi, container);\n\tthis.init();\n};\n\nmxUtils.extend(DiagramStylePanel, BaseFormatPanel);\n\n/**\n * Adds the label menu items to the given menu and parent.\n */\nDiagramStylePanel.prototype.init = function()\n{\n\tvar ui = this.editorUi;\n\n\tthis.darkModeChangedListener = mxUtils.bind(this, function()\n\t{\n\t\tthis.format.cachedStyleEntries = [];\n\t});\n\n\tui.addListener('darkModeChanged', this.darkModeChangedListener);\n\tthis.container.appendChild(this.addView(this.createPanel()));\n};\n\n/**\n * Adds the label menu items to the given menu and parent.\n */\nDiagramStylePanel.prototype.getGlobalStyleButtons = function()\n{\n\tvar ui = this.editorUi;\n\tvar editor = ui.editor;\n\tvar graph = editor.graph;\n\n\tvar buttons = [mxUtils.button(mxResources.get('sketch'), mxUtils.bind(this, function(evt)\n\t{\n\t\tvar value = !Editor.sketchMode;\n\t\tgraph.updateCellStyles({'sketch': (value) ? '1' : null,\n\t\t\t'curveFitting': (value) ? Editor.sketchDefaultCurveFitting : null,\n\t\t\t'jiggle': (value) ? Editor.sketchDefaultJiggle : null},\n\t\t\tgraph.getVerticesAndEdges());\n\t\tui.setSketchMode(value);\n\t\tmxEvent.consume(evt);\n\t})), mxUtils.button(mxResources.get('rounded'), mxUtils.bind(this, function(evt)\n\t{\n\t\t// Checks if all cells are rounded\n\t\tvar cells = graph.getVerticesAndEdges();\n\t\tvar rounded = true;\n\n\t\tif (cells.length > 0)\n\t\t{\n\t\t\tfor (var i = 0; i < cells.length; i++)\n\t\t\t{\n\t\t\t\tvar style = graph.getCellStyle(cells[i]);\n\n\t\t\t\tif (mxUtils.getValue(style, mxConstants.STYLE_ROUNDED, 0) == 0)\n\t\t\t\t{\n\t\t\t\t\trounded = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\trounded = !rounded;\n\t\tgraph.updateCellStyles({'rounded': (rounded) ? '1' : '0'}, cells);\n\n\t\tif (rounded)\n\t\t{\n\t\t\tgraph.currentEdgeStyle['rounded'] = '1';\n\t\t\tgraph.currentVertexStyle['rounded'] = '1';\n\t\t}\n\t\telse\n\t\t{\n\t\t\tdelete graph.currentEdgeStyle['rounded'];\n\t\t\tdelete graph.currentVertexStyle['rounded'];\n\t\t}\n\n\t\tmxEvent.consume(evt);\n\t}))];\n\n\treturn buttons;\n};\n\n/**\n * Adds the label menu items to the given menu and parent.\n */\nDiagramStylePanel.prototype.addView = function(div)\n{\n\tvar ui = this.editorUi;\n\tvar editor = ui.editor;\n\tvar graph = editor.graph;\n\tvar model = graph.getModel();\n\tvar gridColor = graph.view.gridColor;\n\n\tdiv.style.paddingTop = '2px';\n\tdiv.style.whiteSpace = 'normal';\n\n\tvar opts = document.createElement('div');\n\topts.style.marginRight = '16px';\n\topts.style.paddingBottom = '2px';\n\t\n\tvar table = document.createElement('table');\n\ttable.style.width = '204px';\n\t\n\tvar tbody = document.createElement('tbody');\n\tvar row = document.createElement('tr');\n\trow.style.padding = '0px';\n\t\n\tvar left = document.createElement('td');\n\tleft.style.textAlign = 'center';\n\tleft.style.padding = '2px';\n\tleft.style.width = '50%';\n\t\n\tvar right = left.cloneNode(true);\n\tvar buttons = this.getGlobalStyleButtons();\n\n\tfor (var i = 0; i < buttons.length; i += 2)\n\t{\n\t\tvar btn = buttons[i];\n\t\tbtn.style.height = '22px';\n\t\tbtn.style.width = '92px';\n\n\t\tleft.appendChild(btn);\n\t\trow.appendChild(left);\n\n\t\tbtn = buttons[i + 1];\n\n\t\tif (btn != null)\n\t\t{\n\t\t\tbtn.style.height = '22px';\n\t\t\tbtn.style.width = '92px';\n\t\t\tright.appendChild(btn);\n\t\t}\n\n\t\trow.appendChild(right);\n\t\ttbody.appendChild(row);\n\n\t\tleft = left.cloneNode(false);\n\t\tright = right.cloneNode(false);\n\t\trow = row.cloneNode(false);\n\t}\n\n\ttable.appendChild(tbody);\n\topts.appendChild(table);\n\tdiv.appendChild(opts);\n\n\tvar defaultStyles = ['fillColor', 'strokeColor', 'fontColor', 'gradientColor'];\n\t\n\tdiv.style.whiteSpace = 'normal';\n\tdiv.style.paddingLeft = '18px';\n\tdiv.style.paddingTop = '6px';\n\t\n\tvar updateCells = mxUtils.bind(this, function(styles, graphStyle)\n\t{\n\t\tvar cells = graph.getVerticesAndEdges();\n\t\t\n\t\tmodel.beginUpdate();\n\t\ttry\n\t\t{\n\t\t\tfor (var i = 0; i < cells.length; i++)\n\t\t\t{\n\t\t\t\tvar style = graph.getCellStyle(cells[i]);\n\t\t\t\t\n\t\t\t\t// Handles special label background color\n\t\t\t\tif (!ignoreGraphStyle && style['labelBackgroundColor'] != null)\n\t\t\t\t{\n\t\t\t\t\tgraph.updateCellStyles({'labelBackgroundColor': (graphStyle != null) ?\n\t\t\t\t\t\tgraphStyle.background : null}, [cells[i]]);\n\t\t\t\t}\n\t\t\t\telse if (ignoreGraphStyle)\n\t\t\t\t{\n\t\t\t\t\tgraph.updateCellStyles({'labelBackgroundColor': mxConstants.NONE}, [cells[i]]);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tvar edge = model.isEdge(cells[i]);\n\t\t\t\tvar newStyle = model.getStyle(cells[i]);\n\t\t\t\tvar current = (edge) ? graph.currentEdgeStyle : graph.currentVertexStyle;\n\n\t\t\t\tfor (var j = 0; j < styles.length; j++)\n\t\t\t\t{\n\t\t\t\t\tif ((style[styles[j]] != null && style[styles[j]] != mxConstants.NONE) ||\n\t\t\t\t\t\t(styles[j] != mxConstants.STYLE_FILLCOLOR &&\n\t\t\t\t\t\tstyles[j] != mxConstants.STYLE_STROKECOLOR))\n\t\t\t\t\t{\n\t\t\t\t\t\tif (ignoreGraphStyle && edge && styles[j] == mxConstants.STYLE_FONTCOLOR)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tnewStyle = mxUtils.setStyle(newStyle, styles[j], 'default');\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tnewStyle = mxUtils.setStyle(newStyle, styles[j], current[styles[j]]);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tmodel.setStyle(cells[i], newStyle);\n\t\t\t}\n\t\t}\n\t\tfinally\n\t\t{\n\t\t\tmodel.endUpdate();\n\t\t}\n\t});\n\t\t\t\n\tvar removeStyles = mxUtils.bind(this, function(style, styles, defaultStyle)\n\t{\n\t\tif (style != null)\n\t\t{\n\t\t\tfor (var j = 0; j < styles.length; j++)\n\t\t\t{\n\t\t\t\tif (((style[styles[j]] != null &&\n\t\t\t\t\tstyle[styles[j]] != mxConstants.NONE) ||\n\t\t\t\t\t(styles[j] != mxConstants.STYLE_FILLCOLOR &&\n\t\t\t\t\tstyles[j] != mxConstants.STYLE_STROKECOLOR)))\n\t\t\t\t{\n\t\t\t\t\tstyle[styles[j]] = defaultStyle[styles[j]];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t});\n\n\tvar ignoreGraphStyle = true;\n\n\tvar applyStyle = mxUtils.bind(this, function(style, result, cell, graphStyle, theGraph)\n\t{\n\t\tif (style != null)\n\t\t{\n\t\t\tif (cell != null)\n\t\t\t{\n\t\t\t\t// Handles special label background color\n\t\t\t\tif (!ignoreGraphStyle && result['labelBackgroundColor'] != null)\n\t\t\t\t{\n\t\t\t\t\tvar bg = (graphStyle != null) ? graphStyle.background : null;\n\t\t\t\t\ttheGraph = (theGraph != null) ? theGraph : graph;\n\t\t\t\t\t\n\t\t\t\t\tif (bg == null)\n\t\t\t\t\t{\n\t\t\t\t\t\tbg = theGraph.background;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif (bg == null)\n\t\t\t\t\t{\n\t\t\t\t\t\tbg = theGraph.defaultPageBackgroundColor;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tresult['labelBackgroundColor'] = bg;\n\t\t\t\t}\n\t\t\t\telse if (ignoreGraphStyle)\n\t\t\t\t{\n\t\t\t\t\tresult['labelBackgroundColor'] = mxConstants.NONE;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tfor (var key in style)\n\t\t\t{\n\t\t\t\tif (cell == null || ((result[key] != null &&\n\t\t\t\t\tresult[key] != mxConstants.NONE) ||\n\t\t\t\t\t(key != mxConstants.STYLE_FILLCOLOR &&\n\t\t\t\t\tkey != mxConstants.STYLE_STROKECOLOR)))\n\t\t\t\t{\n\t\t\t\t\tif (ignoreGraphStyle && model.isEdge(cell) &&\n\t\t\t\t\t\tkey == mxConstants.STYLE_FONTCOLOR)\n\t\t\t\t\t{\n\t\t\t\t\t\tresult[key] = 'default';\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tresult[key] = style[key];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t});\n\n\tvar createPreview = mxUtils.bind(this, function(commonStyle, vertexStyle, edgeStyle, graphStyle, container)\n\t{\n\t\t// Wrapper needed to catch events\n\t\tvar div = document.createElement('div');\n\t\tdiv.style.background = (Editor.isDarkMode() ? '#2a252f' : '#f1f3f4');\n\t\tdiv.style.position = 'absolute';\n\t\tdiv.style.display = 'inline-block';\n\t\tdiv.style.overflow = 'hidden';\n\t\tdiv.style.pointerEvents = 'none';\n\t\tdiv.style.width = '100%';\n\t\tdiv.style.height = '100%';\n\t\tcontainer.appendChild(div);\n\t\t\n\t\tvar graph2 = new Graph(div, null, null, graph.getStylesheet());\n\t\tgraph2.shapeBackgroundColor = div.style.background;\n\t\tgraph2.resetViewOnRootChange = false;\n\t\tgraph2.foldingEnabled = false;\n\t\tgraph2.gridEnabled = false;\n\t\tgraph2.autoScroll = false;\n\t\tgraph2.setTooltips(false);\n\t\tgraph2.setConnectable(false);\n\t\tgraph2.setPanning(false);\n\t\tgraph2.setEnabled(false);\n\n\t\tgraph2.getCellStyle = function(cell, resolve)\n\t\t{\n\t\t\tresolve = (resolve != null) ? resolve : true;\n\t\t\tvar result = mxUtils.clone(graph.getCellStyle.apply(this, arguments));\n\t\t\tvar defaultStyle = graph.stylesheet.getDefaultVertexStyle();\n\t\t\tvar appliedStyle = vertexStyle;\n\t\t\t\n\t\t\tif (model.isEdge(cell))\n\t\t\t{\n\t\t\t\tdefaultStyle = graph.stylesheet.getDefaultEdgeStyle();\n\t\t\t\tappliedStyle = edgeStyle;\t\n\t\t\t}\n\t\t\t\n\t\t\tremoveStyles(result, defaultStyles, defaultStyle);\n\t\t\tapplyStyle(commonStyle, result, cell, graphStyle, graph2);\n\t\t\tapplyStyle(appliedStyle, result, cell, graphStyle, graph2);\n\t\t\t\n\t\t\tif (resolve)\n\t\t\t{\n\t\t\t\tresult = graph.postProcessCellStyle(cell, result);\n\t\t\t}\n\n\t\t\treturn result;\n\t\t};\n\t\t\n\t\t// Avoid HTML labels to capture events in bubble phase\n\t\tgraph2.model.beginUpdate();\n\t\ttry\n\t\t{\n\t\t\tvar v1 = graph2.insertVertex(graph2.getDefaultParent(), null, 'Shape', 14, 8, 70, 36, 'strokeWidth=2;');\n\t\t\tvar e1 = graph2.insertEdge(graph2.getDefaultParent(), null, 'Connector', v1, v1,\n\t\t\t\t'edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;endSize=5;strokeWidth=2;')\n\t\t\te1.geometry.points = [new mxPoint(32, 66)];\n\t\t\te1.geometry.offset = new mxPoint(0, 8);\n\t\t}\n\t\tfinally\n\t\t{\n\t\t\tgraph2.model.endUpdate();\n\t\t}\n\t});\n\t\n\t// Entries\n\tvar entries = document.createElement('div');\n\tentries.style.position = 'relative';\n\tentries.style.width = '210px';\n\tdiv.appendChild(entries);\n\t\n\t// Cached entries\n\tif (this.format.cachedStyleEntries == null)\n\t{\n\t\tthis.format.cachedStyleEntries = [];\n\t}\n\n\tfunction addKeys(style, result)\n\t{\n\t\tfor (var key in style)\n\t\t{\n\t\t\tresult.push(key);\n\t\t}\n\n\t\treturn result;\n\t};\n\n\tvar addEntry = mxUtils.bind(this, function(commonStyle, vertexStyle, edgeStyle, graphStyle, index)\n\t{\n\t\tvar panel = this.format.cachedStyleEntries[index];\n\t\t\n\t\tif (panel == null)\n\t\t{\n\t\t\tpanel = document.createElement('div');\n\t\t\tpanel.style.display = 'inline-block';\n\t\t\tpanel.style.position = 'relative';\n\t\t\tpanel.style.width = '96px';\n\t\t\tpanel.style.height = '86px';\n\t\t\tpanel.style.cursor = 'pointer';\n\t\t\tpanel.style.border = '1px solid gray';\n\t\t\tpanel.style.borderRadius = '8px';\n\t\t\tpanel.style.margin = '1px 2px';\n\t\t\tpanel.style.overflow = 'hidden';\n\t\n\t\t\tif (!ignoreGraphStyle && graphStyle != null && graphStyle.background != null)\n\t\t\t{\n\t\t\t\tpanel.style.backgroundColor = graphStyle.background;\n\t\t\t}\n\t\t\t\n\t\t\tcreatePreview(commonStyle, vertexStyle, edgeStyle, graphStyle, panel); \n\t\n\t\t\tmxEvent.addGestureListeners(panel, mxUtils.bind(this, function(evt)\n\t\t\t{\n\t\t\t\tpanel.style.opacity = 0.5;\n\t\t\t}), null, mxUtils.bind(this, function(evt)\n\t\t\t{\n\t\t\t\tpanel.style.opacity = 1;\n\t\t\t\tgraph.currentVertexStyle = mxUtils.clone(graph.defaultVertexStyle);\n\t\t\t\tgraph.currentEdgeStyle = mxUtils.clone(graph.defaultEdgeStyle);\n\t\t\t\t\n\t\t\t\tapplyStyle(commonStyle, graph.currentVertexStyle);\n\t\t\t\tapplyStyle(commonStyle, graph.currentEdgeStyle);\n\t\t\t\tapplyStyle(vertexStyle, graph.currentVertexStyle);\n\t\t\t\tapplyStyle(edgeStyle, graph.currentEdgeStyle);\n\n\t\t\t\tmodel.beginUpdate();\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tupdateCells(addKeys(commonStyle, defaultStyles.slice()), graphStyle);\n\t\t\t\t\t\n\t\t\t\t\tif (!ignoreGraphStyle)\n\t\t\t\t\t{\n\t\t\t\t\t\tvar change = new ChangePageSetup(ui, (graphStyle != null) ? graphStyle.background : null);\n\t\t\t\t\t\tchange.ignoreImage = true;\n\t\t\t\t\t\tmodel.execute(change);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\tmodel.execute(new ChangeGridColor(ui,\n\t\t\t\t\t\t\t(graphStyle != null && graphStyle.gridColor != null) ?\n\t\t\t\t\t\t\tgraphStyle.gridColor : gridColor));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tfinally\n\t\t\t\t{\n\t\t\t\t\tmodel.endUpdate();\n\t\t\t\t}\n\t\t\t}));\n\t\t\t\n\t\t\tmxEvent.addListener(panel, 'mouseenter', mxUtils.bind(this, function(evt)\n\t\t\t{\n\t\t\t\tvar prev = graph.getCellStyle;\n\t\t\t\tvar prevBg = graph.background;\n\t\t\t\tvar prevGrid = graph.view.gridColor;\n\t\n\t\t\t\tif (!ignoreGraphStyle)\n\t\t\t\t{\n\t\t\t\t\tgraph.background = (graphStyle != null) ? graphStyle.background : null;\n\t\t\t\t\tgraph.view.gridColor = (graphStyle != null && graphStyle.gridColor != null) ?\n\t\t\t\t\t\tgraphStyle.gridColor : gridColor;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tgraph.getCellStyle = function(cell, resolve)\n\t\t\t\t{\n\t\t\t\t\tresolve = (resolve != null) ? resolve : true;\n\t\t\t\t\tvar result = mxUtils.clone(prev.apply(this, arguments));\n\t\t\t\t\t\n\t\t\t\t\tvar defaultStyle = graph.stylesheet.getDefaultVertexStyle();\n\t\t\t\t\tvar appliedStyle = vertexStyle;\n\t\t\t\t\t\n\t\t\t\t\tif (model.isEdge(cell))\n\t\t\t\t\t{\n\t\t\t\t\t\tdefaultStyle = graph.stylesheet.getDefaultEdgeStyle();\n\t\t\t\t\t\tappliedStyle = edgeStyle;\t\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tremoveStyles(result, defaultStyles, defaultStyle);\n\t\t\t\t\tapplyStyle(commonStyle, result, cell, graphStyle);\n\t\t\t\t\tapplyStyle(appliedStyle, result, cell, graphStyle);\n\t\t\t\t\t\n\t\t\t\t\tif (resolve)\n\t\t\t\t\t{\n\t\t\t\t\t\tresult = this.postProcessCellStyle(cell, result);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\treturn result;\n\t\t\t\t};\n\t\t\t\t\n\t\t\t\tgraph.refresh();\n\t\t\t\tgraph.getCellStyle = prev;\n\t\t\t\tgraph.background = prevBg;\n\t\t\t\tgraph.view.gridColor = prevGrid;\n\t\t\t}));\n\t\t\t\n\t\t\tmxEvent.addListener(panel, 'mouseleave', mxUtils.bind(this, function(evt)\n\t\t\t{\n\t\t\t\tgraph.refresh();\n\t\t\t}));\n\t\t\t\n\t\t\t// Workaround for broken cache in IE11\n\t\t\tif (!mxClient.IS_IE && !mxClient.IS_IE11)\n\t\t\t{\n\t\t\t\tthis.format.cachedStyleEntries[index] = panel;\n\t\t\t}\n\t\t}\n\t\t\n\t\tentries.appendChild(panel);\n\t});\n\t\t\n\t// Maximum palettes to switch the switcher\n\tvar maxEntries = 10;\n\tvar pageCount = Math.ceil(Editor.styles.length / maxEntries);\n\tthis.format.currentStylePage = (this.format.currentStylePage != null) ? this.format.currentStylePage : 0;\n\tvar dots = [];\n\t\n\tvar addEntries = mxUtils.bind(this, function()\n\t{\n\t\tif (dots.length > 0)\n\t\t{\n\t\t\tdots[this.format.currentStylePage].style.background = '#84d7ff';\n\t\t}\n\t\t\n\t\tfor (var i = this.format.currentStylePage * maxEntries;\n\t\t\ti < Math.min((this.format.currentStylePage + 1) * maxEntries,\n\t\t\tEditor.styles.length); i++)\n\t\t{\n\t\t\tvar s = Editor.styles[i];\n\t\t\taddEntry(s.commonStyle, s.vertexStyle, s.edgeStyle, s.graph, i);\n\t\t}\n\t});\n\t\n\tvar selectPage = mxUtils.bind(this, function(index)\n\t{\n\t\tif (index >= 0 && index < pageCount)\n\t\t{\n\t\t\tdots[this.format.currentStylePage].style.background = 'transparent';\n\t\t\tentries.innerText = '';\n\t\t\tthis.format.currentStylePage = index;\n\t\t\taddEntries();\n\t\t}\n\t});\n\t\n\tif (pageCount > 1)\n\t{\n\t\t// Selector\n\t\tvar switcher = document.createElement('div');\n\t\tswitcher.style.whiteSpace = 'nowrap';\n\t\tswitcher.style.position = 'relative';\n\t\tswitcher.style.textAlign = 'center';\n\t\tswitcher.style.paddingTop = '4px';\n\t\tswitcher.style.width = '210px';\n\t\t\n\t\tfor (var i = 0; i < pageCount; i++)\n\t\t{\n\t\t\tvar dot = document.createElement('div');\n\t\t\tdot.style.display = 'inline-block';\n\t\t\tdot.style.width = '6px';\n\t\t\tdot.style.height = '6px';\n\t\t\tdot.style.marginLeft = '4px';\n\t\t\tdot.style.marginRight = '3px';\n\t\t\tdot.style.borderRadius = '3px';\n\t\t\tdot.style.cursor = 'pointer';\n\t\t\tdot.style.background = 'transparent';\n\t\t\tdot.style.border = '1px solid #b5b6b7';\n\t\t\t\n\t\t\t(mxUtils.bind(this, function(index, elt)\n\t\t\t{\n\t\t\t\tmxEvent.addListener(dot, 'click', mxUtils.bind(this, function()\n\t\t\t\t{\n\t\t\t\t\tselectPage(index);\n\t\t\t\t}));\n\t\t\t}))(i, dot);\n\t\t\t\n\t\t\tswitcher.appendChild(dot);\n\t\t\tdots.push(dot);\n\t\t}\n\t\t\n\t\tdiv.appendChild(switcher);\n\t\taddEntries();\n\t\t\n\t\tif (pageCount < 15)\n\t\t{\n\t\t\tvar left = document.createElement('div');\n\t\t\tleft.className = 'geAdaptiveAsset';\n\t\t\tleft.style.position = 'absolute';\n\t\t\tleft.style.left = '0px';\n\t\t\tleft.style.top = '0px';\n\t\t\tleft.style.bottom = '0px';\n\t\t\tleft.style.width = '24px';\n\t\t\tleft.style.height = '24px';\n\t\t\tleft.style.margin = '0px';\n\t\t\tleft.style.cursor = 'pointer';\n\t\t\tleft.style.opacity = '0.5';\n\t\t\tleft.style.backgroundRepeat = 'no-repeat';\n\t\t\tleft.style.backgroundPosition = 'center center';\n\t\t\tleft.style.backgroundSize = '24px 24px';\n\t\t\tleft.style.backgroundImage = 'url(' + Editor.previousImage + ')';\n\t\t\t\n\t\t\tvar right = left.cloneNode(false);\n\t\t\tright.style.backgroundImage = 'url(' + Editor.nextImage + ')';\n\t\t\tright.style.left = '';\n\t\t\tright.style.right = '2px';\n\n\t\t\tswitcher.appendChild(left);\n\t\t\tswitcher.appendChild(right);\n\t\t\t\n\t\t\tmxEvent.addListener(left, 'click', mxUtils.bind(this, function()\n\t\t\t{\n\t\t\t\tselectPage(mxUtils.mod(this.format.currentStylePage - 1, pageCount));\n\t\t\t}));\n\t\t\t\n\t\t\tmxEvent.addListener(right, 'click', mxUtils.bind(this, function()\n\t\t\t{\n\t\t\t\tselectPage(mxUtils.mod(this.format.currentStylePage + 1, pageCount));\n\t\t\t}));\n\t\t\t\t\t\n\t\t\t// Hover state\n\t\t\tfunction addHoverState(elt)\n\t\t\t{\n\t\t\t\tmxEvent.addListener(elt, 'mouseenter', function()\n\t\t\t\t{\n\t\t\t\t\telt.style.opacity = '1';\n\t\t\t\t});\n\t\t\t\tmxEvent.addListener(elt, 'mouseleave', function()\n\t\t\t\t{\n\t\t\t\t\telt.style.opacity = '0.5';\n\t\t\t\t});\n\t\t\t};\n\t\t\t\n\t\t\taddHoverState(left);\n\t\t\taddHoverState(right);\n\t\t}\n\t}\n\telse\n\t{\n\t\taddEntries();\n\t}\n\n\treturn div;\n};\n\n/**\n * Adds the label menu items to the given menu and parent.\n */\nDiagramStylePanel.prototype.destroy = function()\n{\n\tBaseFormatPanel.prototype.destroy.apply(this, arguments);\n\n\tif (this.darkModeChangedListener)\n\t{\n\t\tthis.editorUi.removeListener(this.darkModeChangedListener);\n\t\tthis.darkModeChangedListener = null;\n\t}\n};\n\n/**\n * Adds the label menu items to the given menu and parent.\n */\nDiagramFormatPanel = function(format, editorUi, container)\n{\n\tBaseFormatPanel.call(this, format, editorUi, container);\n\tthis.init();\n};\n\nmxUtils.extend(DiagramFormatPanel, BaseFormatPanel);\n\n/**\n * Switch to disable page view.\n */\nDiagramFormatPanel.showPageView = true;\n\n/**\n * Specifies if the background image option should be shown. Default is true.\n */\nDiagramFormatPanel.prototype.showBackgroundImageOption = true;\n\n/**\n * Adds the label menu items to the given menu and parent.\n */\nDiagramFormatPanel.prototype.init = function()\n{\n\tvar ui = this.editorUi;\n\tvar editor = ui.editor;\n\tvar graph = editor.graph;\n\n\tthis.container.appendChild(this.addView(this.createPanel()));\n\n\tif (graph.isEnabled())\n\t{\n\t\tthis.container.appendChild(this.addOptions(this.createPanel()));\n\t\tthis.container.appendChild(this.addPaperSize(this.createPanel()));\n\t\tthis.container.appendChild(this.addStyleOps(this.createPanel()));\n\t}\n};\n\n/**\n * Adds the label menu items to the given menu and parent.\n */\nDiagramFormatPanel.prototype.addView = function(div)\n{\n\tvar ui = this.editorUi;\n\tvar editor = ui.editor;\n\tvar graph = editor.graph;\n\t\n\tdiv.appendChild(this.createTitle(mxResources.get('view')));\n\t\n\t// Grid\n\tthis.addGridOption(div);\n\t\n\t// Page View\n\tif (DiagramFormatPanel.showPageView)\n\t{\n\t\tdiv.appendChild(this.createOption(mxResources.get('pageView'), function()\n\t\t{\n\t\t\treturn graph.pageVisible;\n\t\t}, function(checked)\n\t\t{\n\t\t\tui.actions.get('pageView').funct();\n\t\t},\n\t\t{\n\t\t\tinstall: function(apply)\n\t\t\t{\n\t\t\t\tthis.listener = function()\n\t\t\t\t{\n\t\t\t\t\tapply(graph.pageVisible);\n\t\t\t\t};\n\t\t\t\t\n\t\t\t\tui.addListener('pageViewChanged', this.listener);\n\t\t\t},\n\t\t\tdestroy: function()\n\t\t\t{\n\t\t\t\tui.removeListener(this.listener);\n\t\t\t}\n\t\t}));\n\t}\n\t\n\tif (graph.isEnabled())\n\t{\n\t\tif (this.showBackgroundImageOption)\n\t\t{\n\t\t\tvar bg = this.createOption(mxResources.get('background'), function()\n\t\t\t{\n\t\t\t\treturn graph.backgroundImage != null;\n\t\t\t}, function(checked)\n\t\t\t{\n\t\t\t\tif (!checked)\n\t\t\t\t{\n\t\t\t\t\tvar change = new ChangePageSetup(ui, null, null);\n\t\t\t\t\tchange.ignoreColor = true;\n\n\t\t\t\t\tgraph.model.execute(change);\n\t\t\t\t}\n\t\t\t},\n\t\t\t{\n\t\t\t\tinstall: function(apply)\n\t\t\t\t{\n\t\t\t\t\tthis.listener = function()\n\t\t\t\t\t{\n\t\t\t\t\t\tapply(graph.backgroundImage != null);\n\t\t\t\t\t};\n\t\t\t\t\t\n\t\t\t\t\tui.addListener('backgroundImageChanged', this.listener);\n\t\t\t\t},\n\t\t\t\tdestroy: function()\n\t\t\t\t{\n\t\t\t\t\tui.removeListener(this.listener);\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tvar input = bg.getElementsByTagName('input')[0];\n\n\t\t\tif (input != null)\n\t\t\t{\n\t\t\t\tinput.style.visibility = graph.backgroundImage != null ? 'visible' : 'hidden';\n\t\t\t}\n\t\t\t\n\t\t\tvar label = bg.getElementsByTagName('div')[0];\n\t\t\t\n\t\t\tif (label != null)\n\t\t\t{\n\t\t\t\tlabel.style.display = 'inline-block';\n\t\t\t\tlabel.style.textOverflow = 'ellipsis';\n\t\t\t\tlabel.style.overflow = 'hidden';\n\t\t\t\tlabel.style.maxWidth = '80px';\n\t\t\t}\n\n\t\t\tif (mxClient.IS_FF)\n\t\t\t{\n\t\t\t\tlabel.style.marginTop = '1px';\n\t\t\t}\n\n\t\t\tvar btn = mxUtils.button(mxResources.get('change') + '...', function(evt)\n\t\t\t{\n\t\t\t\tui.showBackgroundImageDialog(null,\n\t\t\t\t\tui.editor.graph.backgroundImage,\n\t\t\t\t\tui.editor.graph.background);\n\t\t\t\tmxEvent.consume(evt);\n\t\t\t})\n\t\t\t\n\t\t\tbtn.style.position = 'absolute';\n\t\t\tbtn.style.height = '22px';\n\t\t\tbtn.style.left = '47%';\n\t\t\tbtn.style.marginLeft = '1px';\n\t\t\tbtn.style.width = '110px';\n\t\t\tbtn.style.maxWidth = '110px';\n\t\t\t\n\t\t\tbg.appendChild(btn);\n\t\t\tdiv.appendChild(bg);\n\t\t}\n\n\t\tvar bgColor = this.createColorOption(mxResources.get('backgroundColor'), function()\n\t\t{\n\t\t\treturn graph.background;\n\t\t}, function(color)\n\t\t{\n\t\t\tvar change = new ChangePageSetup(ui, color);\n\t\t\tchange.ignoreImage = true;\n\n\t\t\tgraph.model.execute(change);\n\t\t}, '#ffffff');\n\n\t\tbgColor.style.padding = '5px 0 1px 0';\n\t\tdiv.appendChild(bgColor);\n\n\t\tvar option = this.createOption(mxResources.get('shadow'), function()\n\t\t{\n\t\t\treturn graph.shadowVisible;\n\t\t}, function(checked)\n\t\t{\n\t\t\tvar change = new ChangePageSetup(ui);\n\t\t\tchange.ignoreColor = true;\n\t\t\tchange.ignoreImage = true;\n\t\t\tchange.shadowVisible = checked;\n\t\t\t\n\t\t\tgraph.model.execute(change);\n\t\t},\n\t\t{\n\t\t\tinstall: function(apply)\n\t\t\t{\n\t\t\t\tthis.listener = function()\n\t\t\t\t{\n\t\t\t\t\tapply(graph.shadowVisible);\n\t\t\t\t};\n\t\t\t\t\n\t\t\t\tui.addListener('shadowVisibleChanged', this.listener);\n\t\t\t},\n\t\t\tdestroy: function()\n\t\t\t{\n\t\t\t\tui.removeListener(this.listener);\n\t\t\t}\n\t\t});\n\t\t\n\t\tif (!Editor.enableShadowOption)\n\t\t{\n\t\t\toption.getElementsByTagName('input')[0].setAttribute('disabled', 'disabled');\n\t\t\tmxUtils.setOpacity(option, 60);\n\t\t}\n\n\t\toption.style.display = 'inline-flex';\n\t\toption.style.width = '100px';\n\t\toption.style.maxWidth = '100px';\n\t\toption.style.marginRight = '4px';\n\t\tdiv.appendChild(option);\n\n\t\tvar sketchOption = this.createOption(mxResources.get('sketch'), function()\n\t\t{\n\t\t\treturn Editor.sketchMode;\n\t\t}, function(checked)\n\t\t{\n\t\t\tui.setSketchMode(checked);\n\t\t},\n\t\t{\n\t\t\tinstall: function(apply)\n\t\t\t{\n\t\t\t\tthis.listener = function()\n\t\t\t\t{\n\t\t\t\t\tapply(Editor.sketchMode);\n\t\t\t\t};\n\t\t\t\t\n\t\t\t\tui.addListener('sketchModeChanged', this.listener);\n\t\t\t},\n\t\t\tdestroy: function()\n\t\t\t{\n\t\t\t\tui.removeListener(this.listener);\n\t\t\t}\n\t\t});\n\t\t\n\t\tsketchOption.style.display = 'inline-flex';\n\t\tsketchOption.style.width = '104px';\n\t\tsketchOption.style.maxWidth = '104px';\n\t\tdiv.appendChild(sketchOption);\n\t}\n\t\n\treturn div;\n};\n\n/**\n * Adds the label menu items to the given menu and parent.\n */\nDiagramFormatPanel.prototype.addOptions = function(div)\n{\n\tvar ui = this.editorUi;\n\tvar editor = ui.editor;\n\tvar graph = editor.graph;\n\t\n\tdiv.appendChild(this.createTitle(mxResources.get('options')));\t\n\n\tif (graph.isEnabled())\n\t{\n\t\t// Connection arrows\n\t\tdiv.appendChild(this.createOption(mxResources.get('connectionArrows'), function()\n\t\t{\n\t\t\treturn graph.connectionArrowsEnabled;\n\t\t}, function(checked)\n\t\t{\n\t\t\tui.actions.get('connectionArrows').funct();\n\t\t},\n\t\t{\n\t\t\tinstall: function(apply)\n\t\t\t{\n\t\t\t\tthis.listener = function()\n\t\t\t\t{\n\t\t\t\t\tapply(graph.connectionArrowsEnabled);\n\t\t\t\t};\n\t\t\t\t\n\t\t\t\tui.addListener('connectionArrowsChanged', this.listener);\n\t\t\t},\n\t\t\tdestroy: function()\n\t\t\t{\n\t\t\t\tui.removeListener(this.listener);\n\t\t\t}\n\t\t}));\n\t\t\n\t\t// Connection points\n\t\tdiv.appendChild(this.createOption(mxResources.get('connectionPoints'), function()\n\t\t{\n\t\t\treturn graph.connectionHandler.isEnabled();\n\t\t}, function(checked)\n\t\t{\n\t\t\tui.actions.get('connectionPoints').funct();\n\t\t},\n\t\t{\n\t\t\tinstall: function(apply)\n\t\t\t{\n\t\t\t\tthis.listener = function()\n\t\t\t\t{\n\t\t\t\t\tapply(graph.connectionHandler.isEnabled());\n\t\t\t\t};\n\t\t\t\t\n\t\t\t\tui.addListener('connectionPointsChanged', this.listener);\n\t\t\t},\n\t\t\tdestroy: function()\n\t\t\t{\n\t\t\t\tui.removeListener(this.listener);\n\t\t\t}\n\t\t}));\n\n\t\t// Guides\n\t\tdiv.appendChild(this.createOption(mxResources.get('guides'), function()\n\t\t{\n\t\t\treturn graph.graphHandler.guidesEnabled;\n\t\t}, function(checked)\n\t\t{\n\t\t\tui.actions.get('guides').funct();\n\t\t},\n\t\t{\n\t\t\tinstall: function(apply)\n\t\t\t{\n\t\t\t\tthis.listener = function()\n\t\t\t\t{\n\t\t\t\t\tapply(graph.graphHandler.guidesEnabled);\n\t\t\t\t};\n\t\t\t\t\n\t\t\t\tui.addListener('guidesEnabledChanged', this.listener);\n\t\t\t},\n\t\t\tdestroy: function()\n\t\t\t{\n\t\t\t\tui.removeListener(this.listener);\n\t\t\t}\n\t\t}));\n\t}\n\n\treturn div;\n};\n\n/**\n * \n */\nDiagramFormatPanel.prototype.addGridOption = function(container)\n{\n\tvar fPanel = this;\n\tvar ui = this.editorUi;\n\tvar graph = ui.editor.graph;\n\t\n\tvar input = document.createElement('input');\n\tinput.style.position = 'absolute';\n\tinput.style.textAlign = 'right';\n\tinput.style.width = '48px';\n\tinput.style.marginTop = '-2px';\n\tinput.style.height = '21px';\n\tinput.style.borderWidth = '1px';\n\tinput.style.borderStyle = 'solid';\n\tinput.style.boxSizing = 'border-box';\n\tinput.value = this.inUnit(graph.getGridSize()) + ' ' + this.getUnit(); \n\t\n\tvar stepper = this.createStepper(input, update, this.getUnitStep(), null, null, null, this.isFloatUnit());\n\tinput.style.display = (graph.isGridEnabled()) ? '' : 'none';\n\tstepper.style.display = input.style.display;\n\n\tmxEvent.addListener(input, 'keydown', function(e)\n\t{\n\t\tif (e.keyCode == 13)\n\t\t{\n\t\t\tgraph.container.focus();\n\t\t\tmxEvent.consume(e);\n\t\t}\n\t\telse if (e.keyCode == 27)\n\t\t{\n\t\t\tinput.value = graph.getGridSize();\n\t\t\tgraph.container.focus();\n\t\t\tmxEvent.consume(e);\n\t\t}\n\t});\n\t\n\tfunction update(evt)\n\t{\n\t\tvar value = fPanel.isFloatUnit()? parseFloat(input.value) : parseInt(input.value);\n\t\tvalue = fPanel.fromUnit(Math.max(fPanel.inUnit(1), (isNaN(value)) ? fPanel.inUnit(10) : value));\n\t\t\n\t\tif (value != graph.getGridSize())\n\t\t{\n\t\t\tmxGraph.prototype.gridSize = value;\n\t\t\tgraph.setGridSize(value)\n\t\t}\n\n\t\tinput.value = fPanel.inUnit(value) + ' ' + fPanel.getUnit();\n\t\tmxEvent.consume(evt);\n\t};\n\n\tmxEvent.addListener(input, 'blur', update);\n\tmxEvent.addListener(input, 'change', update);\n\n\tinput.style.right = '78px';\n\tstepper.style.marginTop = (mxClient.IS_MAC && mxClient.IS_GC) ?\n\t\t'-16px' : ((mxClient.IS_WIN) ? '-18px' : '-17px');\n\tstepper.style.right = '66px';\n\n\tvar panel = this.createColorOption(mxResources.get('grid'), function()\n\t{\n\t\tvar color = graph.view.gridColor;\n\n\t\treturn (graph.isGridEnabled()) ? color : null;\n\t}, function(color)\n\t{\n\t\tvar enabled = graph.isGridEnabled();\n\t\t\n\t\tif (color == mxConstants.NONE)\n\t\t{\n\t\t\tgraph.setGridEnabled(false);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tgraph.setGridEnabled(true);\n\t\t\tui.setGridColor(color);\n\t\t}\n\n\t\tinput.style.display = (graph.isGridEnabled()) ? '' : 'none';\n\t\tstepper.style.display = input.style.display;\n\t\t\n\t\tif (enabled != graph.isGridEnabled())\n\t\t{\n\t\t\tgraph.defaultGridEnabled = graph.isGridEnabled();\n\t\t\tui.fireEvent(new mxEventObject('gridEnabledChanged'));\n\t\t}\n\t}, Editor.isDarkMode() ? graph.view.defaultDarkGridColor : graph.view.defaultGridColor,\n\t{\n\t\tinstall: function(apply)\n\t\t{\n\t\t\tthis.listener = function()\n\t\t\t{\n\t\t\t\tapply((graph.isGridEnabled()) ? graph.view.gridColor : null);\n\t\t\t};\n\t\t\t\n\t\t\tui.addListener('gridColorChanged', this.listener);\n\t\t\tui.addListener('gridEnabledChanged', this.listener);\n\t\t},\n\t\tdestroy: function()\n\t\t{\n\t\t\tui.removeListener(this.listener);\n\t\t}\n\t});\n\n\tpanel.style.padding = '6px 0 0 0';\n\tpanel.appendChild(input);\n\tpanel.appendChild(stepper);\n\tcontainer.appendChild(panel);\n};\n\n/**\n * Adds the label menu items to the given menu and parent.\n */\nDiagramFormatPanel.prototype.addDocumentProperties = function(div)\n{\n\t// Hook for subclassers\n\tvar ui = this.editorUi;\n\tvar editor = ui.editor;\n\tvar graph = editor.graph;\n\t\n\tdiv.appendChild(this.createTitle(mxResources.get('options')));\n\n\treturn div;\n};\n\n/**\n * Adds the label menu items to the given menu and parent.\n */\nDiagramFormatPanel.prototype.addPaperSize = function(div)\n{\n\tvar ui = this.editorUi;\n\tvar editor = ui.editor;\n\tvar graph = editor.graph;\n\t\n\tdiv.appendChild(this.createTitle(mxResources.get('paperSize')));\n\n\tvar accessor = PageSetupDialog.addPageFormatPanel(div, 'formatpanel', graph.pageFormat, function(pageFormat)\n\t{\n\t\tif (graph.pageFormat == null || graph.pageFormat.width != pageFormat.width ||\n\t\t\tgraph.pageFormat.height != pageFormat.height)\n\t\t{\n\t\t\tvar change = new ChangePageSetup(ui, null, null, pageFormat);\n\t\t\tchange.ignoreColor = true;\n\t\t\tchange.ignoreImage = true;\n\t\t\t\n\t\t\tgraph.model.execute(change);\n\t\t}\n\t});\n\t\n\tthis.addKeyHandler(accessor.widthInput, function()\n\t{\n\t\taccessor.set(graph.pageFormat);\n\t});\n\n\tthis.addKeyHandler(accessor.heightInput, function()\n\t{\n\t\taccessor.set(graph.pageFormat);\t\n\t});\n\t\n\tvar listener = function()\n\t{\n\t\taccessor.set(graph.pageFormat);\n\t};\n\t\n\tui.addListener('pageFormatChanged', listener);\n\tthis.listeners.push({destroy: function() { ui.removeListener(listener); }});\n\t\n\tgraph.getModel().addListener(mxEvent.CHANGE, listener);\n\tthis.listeners.push({destroy: function() { graph.getModel().removeListener(listener); }});\n\t\n\treturn div;\n};\n\n/**\n * Adds the label menu items to the given menu and parent.\n */\nDiagramFormatPanel.prototype.addStyleOps = function(div)\n{\n\tthis.addActions(div, ['editData']);\n\tthis.addActions(div, ['clearDefaultStyle']);\n\n\treturn div;\n};\n\n/**\n * Adds the label menu items to the given menu and parent.\n */\nDiagramFormatPanel.prototype.destroy = function()\n{\n\tBaseFormatPanel.prototype.destroy.apply(this, arguments);\n\t\n\tif (this.gridEnabledListener)\n\t{\n\t\tthis.editorUi.removeListener(this.gridEnabledListener);\n\t\tthis.gridEnabledListener = null;\n\t}\n};\n\n\n/**\n\t\t * Configures global color schemes.\n\t\t */\nStyleFormatPanel.prototype.defaultColorSchemes = [[{fill: '', stroke: ''}, {fill: '#f5f5f5', stroke: '#666666', font: '#333333'},\n{fill: '#dae8fc', stroke: '#6c8ebf'}, {fill: '#d5e8d4', stroke: '#82b366'},\n{fill: '#ffe6cc', stroke: '#d79b00'}, {fill: '#fff2cc', stroke: '#d6b656'},\n{fill: '#f8cecc', stroke: '#b85450'}, {fill: '#e1d5e7', stroke: '#9673a6'}],\n[{fill: '', stroke: ''}, {fill: '#60a917', stroke: '#2D7600', font: '#ffffff'},\n{fill: '#008a00', stroke: '#005700', font: '#ffffff'}, {fill: '#1ba1e2', stroke: '#006EAF', font: '#ffffff'},\n{fill: '#0050ef', stroke: '#001DBC', font: '#ffffff'}, {fill: '#6a00ff', stroke: '#3700CC', font: '#ffffff'},\n//{fill: '#aa00ff', stroke: '#7700CC', font: '#ffffff'},\n{fill: '#d80073', stroke: '#A50040', font: '#ffffff'}, {fill: '#a20025', stroke: '#6F0000', font: '#ffffff'}],\n[{fill: '#e51400', stroke: '#B20000', font: '#ffffff'}, {fill: '#fa6800', stroke: '#C73500', font: '#000000'},\n{fill: '#f0a30a', stroke: '#BD7000', font: '#000000'}, {fill: '#e3c800', stroke: '#B09500', font: '#000000'},\n{fill: '#6d8764', stroke: '#3A5431', font: '#ffffff'}, {fill: '#647687', stroke: '#314354', font: '#ffffff'},\n{fill: '#76608a', stroke: '#432D57', font: '#ffffff'}, {fill: '#a0522d', stroke: '#6D1F00', font: '#ffffff'}],\n[{fill: '', stroke: ''}, {fill: mxConstants.NONE, stroke: ''},\n{fill: '#fad7ac', stroke: '#b46504'}, {fill: '#fad9d5', stroke: '#ae4132'},\n{fill: '#b0e3e6', stroke: '#0e8088'}, {fill: '#b1ddf0', stroke: '#10739e'},\n{fill: '#d0cee2', stroke: '#56517e'}, {fill: '#bac8d3', stroke: '#23445d'}],\n[{fill: '', stroke: ''},\n{fill: '#f5f5f5', stroke: '#666666', gradient: '#b3b3b3'},\n{fill: '#dae8fc', stroke: '#6c8ebf', gradient: '#7ea6e0'},\n{fill: '#d5e8d4', stroke: '#82b366', gradient: '#97d077'},\n{fill: '#ffcd28', stroke: '#d79b00', gradient: '#ffa500'},\n{fill: '#fff2cc', stroke: '#d6b656', gradient: '#ffd966'},\n{fill: '#f8cecc', stroke: '#b85450', gradient: '#ea6b66'},\n{fill: '#e6d0de', stroke: '#996185', gradient: '#d5739d'}],\n[{fill: '', stroke: ''}, {fill: '#eeeeee', stroke: '#36393d'},\n{fill: '#f9f7ed', stroke: '#36393d'}, {fill: '#ffcc99', stroke: '#36393d'},\n{fill: '#cce5ff', stroke: '#36393d'}, {fill: '#ffff88', stroke: '#36393d'},\n{fill: '#cdeb8b', stroke: '#36393d'}, {fill: '#ffcccc', stroke: '#36393d'}]];\n\n/**\n* Configures custom color schemes.\n*/\nStyleFormatPanel.prototype.customColorSchemes = null;\n\nStyleFormatPanel.prototype.findCommonProperties = function(cell, properties, addAll)\n{\nif (properties == null) return;\n\nvar handleCustomProp = function(custProperties)\n{\n\tif (custProperties != null)\n\t{\n\t\tif (addAll)\n\t\t{\n\t\t\tfor (var i = 0; i < custProperties.length; i++)\n\t\t\t{\n\t\t\t\tproperties[custProperties[i].name] = custProperties[i];\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tfor (var key in properties)\n\t\t\t{\n\t\t\t\tvar found = false;\n\t\t\t\t\n\t\t\t\tfor (var i = 0; i < custProperties.length; i++)\n\t\t\t\t{\n\t\t\t\t\tif (custProperties[i].name == key && custProperties[i].type == properties[key].type)\n\t\t\t\t\t{\n\t\t\t\t\t\tfound = true;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (!found)\n\t\t\t\t{\n\t\t\t\t\tdelete properties[key];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n};\n\nvar view = this.editorUi.editor.graph.view;\nvar state = view.getState(cell);\n\nif (state != null && state.shape != null)\n{\n\t//Add common properties to all shapes\n\tif (!state.shape.commonCustomPropAdded)\n\t{\n\t\tstate.shape.commonCustomPropAdded = true;\n\t\tstate.shape.customProperties = state.shape.customProperties || [];\n\t\t\n\t\tif (state.cell.vertex)\n\t\t{\n\t\t\tArray.prototype.push.apply(state.shape.customProperties, Editor.commonVertexProperties);\t\t\t\t\t\n\t\t}\n\t\telse\n\t\t{\n\t\t\tArray.prototype.push.apply(state.shape.customProperties, Editor.commonEdgeProperties);\n\t\t}\n\t}\n\t\n\thandleCustomProp(state.shape.customProperties);\n}\n\n//This currently is not needed but let's keep it in case we needed in the future\nvar userCustomProp = cell.getAttribute('customProperties');\n\nif (userCustomProp != null)\n{\n\ttry\n\t{\n\t\thandleCustomProp(JSON.parse(userCustomProp));\n\t}\n\tcatch(e){}\n}\n};\n\n/**\n* Adds predefiend styles.\n*/\nvar styleFormatPanelInit = StyleFormatPanel.prototype.init;\n\nStyleFormatPanel.prototype.init = function()\n{\nvar sstate = this.editorUi.getSelectionState();\n\nif (this.defaultColorSchemes != null && this.defaultColorSchemes.length > 0 &&\n\tsstate.style.shape != 'image' && !sstate.containsLabel &&\n\tsstate.cells.length > 0)\n{\n\tthis.container.appendChild(this.addStyles(this.createPanel()));\n}\n\nstyleFormatPanelInit.apply(this, arguments);\n\nif (Editor.enableCustomProperties)\n{\n\tvar properties = {};\n\tvar vertices = sstate.vertices;\n\tvar edges = sstate.edges;\n\t\n\tfor (var i = 0; i < vertices.length; i++) \n\t{\n\t\tthis.findCommonProperties(vertices[i], properties, i == 0);\n\t}\n\t\n\tfor (var i = 0; i < edges.length; i++) \n\t{\n\t\tthis.findCommonProperties(edges[i], properties, vertices.length == 0 && i == 0);\n\t}\n\n\tif (Object.getOwnPropertyNames != null && Object.getOwnPropertyNames(properties).length > 0)\n\t{\n\t\tthis.container.appendChild(this.addProperties(this.createPanel(), properties, sstate));\n\t}\n}\n};\n\n/**\n* Overridden to add copy and paste style.\n*/\nvar styleFormatPanelAddStyleOps = StyleFormatPanel.prototype.addStyleOps;\n\nStyleFormatPanel.prototype.addStyleOps = function(div)\n{\nvar ss = this.editorUi.getSelectionState();\n\nif (ss.cells.length == 1)\n{\n\tthis.addActions(div, ['copyStyle', 'pasteStyle']);\n}\nelse if (ss.cells.length >= 1)\n{\n\tthis.addActions(div, ['pasteStyle', 'pasteData']);\n}\n\nreturn styleFormatPanelAddStyleOps.apply(this, arguments);\n};\n\n/**\n* Initial collapsed state of the properties panel.\n*/\nEditorUi.prototype.propertiesCollapsed = true;\n\n/**\n* Create Properties Panel\n*/\nStyleFormatPanel.prototype.addProperties = function(div, properties, state)\n{\nvar that = this;\nvar graph = this.editorUi.editor.graph;\nvar secondLevel = [];\n\nfunction insertAfter(newElem, curElem)\n{\n\tcurElem.parentNode.insertBefore(newElem, curElem.nextSibling);\n};\n\nfunction applyStyleVal(pName, newVal, prop, delIndex)\n{\n\tgraph.getModel().beginUpdate();\n\ttry\n\t{\n\t\tvar changedProps = [];\n\t\tvar changedVals = [];\n\n\t\tif (prop.index != null)\n\t\t{\n\t\t\tvar allVals = [];\n\t\t\tvar curVal = prop.parentRow.nextSibling;\n\t\t\t\n\t\t\twhile(curVal && curVal.getAttribute('data-pName') == pName)\n\t\t\t{\n\t\t\t\tallVals.push(curVal.getAttribute('data-pValue'));\n\t\t\t\tcurVal = curVal.nextSibling;\n\t\t\t}\n\t\t\t\n\t\t\tif (prop.index < allVals.length)\n\t\t\t{\n\t\t\t\tif (delIndex != null)\n\t\t\t\t{\n\t\t\t\t\tallVals.splice(delIndex, 1);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tallVals[prop.index] = newVal;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tallVals.push(newVal);\n\t\t\t}\n\t\t\t\n\t\t\tif (prop.size != null && allVals.length > prop.size) //trim the array to the specifies size\n\t\t\t{\n\t\t\t\tallVals = allVals.slice(0, prop.size);\n\t\t\t}\n\t\t\t\n\t\t\tnewVal = allVals.join(',');\n\t\t\t\n\t\t\tif (prop.countProperty != null)\n\t\t\t{\n\t\t\t\tgraph.setCellStyles(prop.countProperty, allVals.length, graph.getSelectionCells());\n\t\t\t\t\n\t\t\t\tchangedProps.push(prop.countProperty);\n\t\t\t\tchangedVals.push(allVals.length);\n\t\t\t}\n\t\t}\n\n\t\tgraph.setCellStyles(pName, newVal, graph.getSelectionCells());\n\t\tchangedProps.push(pName);\n\t\tchangedVals.push(newVal);\n\t\t\n\t\tif (prop.dependentProps != null)\n\t\t{\n\t\t\tfor (var i = 0; i < prop.dependentProps.length; i++)\n\t\t\t{\n\t\t\t\tvar defVal = prop.dependentPropsDefVal[i];\n\t\t\t\tvar vals = prop.dependentPropsVals[i];\n\t\t\t\t\n\t\t\t\tif (vals.length > newVal)\n\t\t\t\t{\n\t\t\t\t\tvals = vals.slice(0, newVal);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tfor (var j = vals.length; j < newVal; j++)\n\t\t\t\t\t{\n\t\t\t\t\t\tvals.push(defVal);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tvals = vals.join(',');\n\t\t\t\tgraph.setCellStyles(prop.dependentProps[i], vals, graph.getSelectionCells());\n\t\t\t\tchangedProps.push(prop.dependentProps[i]);\n\t\t\t\tchangedVals.push(vals);\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (typeof(prop.onChange) == 'function')\n\t\t{\n\t\t\tprop.onChange(graph, newVal);\n\t\t}\n\t\t\n\t\tthat.editorUi.fireEvent(new mxEventObject('styleChanged', 'keys', changedProps,\n\t\t\t'values', changedVals, 'cells', graph.getSelectionCells()));\n\t}\n\tfinally\n\t{\n\t\tgraph.getModel().endUpdate();\n\t}\n}\n\nfunction setElementPos(td, elem, adjustHeight)\n{\n\tvar divPos = mxUtils.getOffset(div, true);\n\tvar pos = mxUtils.getOffset(td, true);\n\telem.style.position = 'absolute';\n\telem.style.left = (pos.x - divPos.x) + 'px';\n\telem.style.top = (pos.y - divPos.y) + 'px';\n\telem.style.width = td.offsetWidth + 'px';\n\telem.style.height = (td.offsetHeight - (adjustHeight? 4 : 0)) + 'px';\n\telem.style.zIndex = 5;\n};\n\nfunction createColorBtn(pName, pValue, prop)\n{\n\tvar clrDiv = document.createElement('div');\n\tclrDiv.style.width = '32px';\n\tclrDiv.style.height = '4px';\n\tclrDiv.style.margin = '2px';\n\tclrDiv.style.border = '1px solid black';\n\tclrDiv.style.background = !pValue || pValue == 'none'? 'url(\\'' + Dialog.prototype.noColorImage + '\\')' : pValue;\n\n\tbtn = mxUtils.button('', mxUtils.bind(that, function(evt)\n\t{\n\t\tthis.editorUi.pickColor(pValue, function(color)\n\t\t{\n\t\t\tclrDiv.style.background = color == 'none'? 'url(\\'' + Dialog.prototype.noColorImage + '\\')' : color;\n\t\t\tapplyStyleVal(pName, color, prop);\n\t\t});\n\t\tmxEvent.consume(evt);\n\t}));\n\t\n\tbtn.style.height = '12px';\n\tbtn.style.width = '40px';\n\tbtn.className = 'geColorBtn';\n\t\n\tbtn.appendChild(clrDiv);\n\treturn btn;\n};\n\nfunction createDynArrList(pName, pValue, subType, defVal, countProperty, myRow, flipBkg)\n{\n\tif (pValue != null)\n\t{\n\t\tvar vals = pValue.split(',');\n\t\tsecondLevel.push({name: pName, values: vals, type: subType, defVal: defVal, countProperty: countProperty, parentRow: myRow, isDeletable: true, flipBkg: flipBkg});\n\t}\n\t\n\tbtn = mxUtils.button('+', mxUtils.bind(that, function(evt)\n\t{\n\t\tvar beforeElem = myRow;\n\t\tvar index = 0;\n\t\t\n\t\twhile (beforeElem.nextSibling != null)\n\t\t{\n\t\t\tvar cur = beforeElem.nextSibling;\n\t\t\tvar elemPName = cur.getAttribute('data-pName');\n\n\t\t\tif (elemPName == pName)\n\t\t\t{\n\t\t\t\tbeforeElem = beforeElem.nextSibling;\n\t\t\t\tindex++;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\tvar newProp = {type: subType, parentRow: myRow, index: index, isDeletable: true, defVal: defVal, countProperty: countProperty};\n\t\tvar arrItem = createPropertyRow(pName, '', newProp, index % 2 == 0, flipBkg);\n\t\tapplyStyleVal(pName, defVal, newProp);\n\t\tinsertAfter(arrItem, beforeElem);\n\t\t\n\t\tmxEvent.consume(evt);\n\t}));\n\t\n\tbtn.style.height = '16px';\n\tbtn.style.width = '25px';\n\tbtn.className = 'geColorBtn';\n\t\n\treturn btn;\n};\n\nfunction createStaticArrList(pName, pValue, subType, defVal, size, myRow, flipBkg)\n{\n\tif (size > 0)\n\t{\n\t\tvar vals = new Array(size);\n\t\t\n\t\tvar curVals = pValue != null? pValue.split(',') : [];\n\t\t\n\t\tfor (var i = 0; i < size; i++) \n\t\t{\n\t\t\tvals[i] = curVals[i] != null? curVals[i] : (defVal != null? defVal : '');\n\t\t}\n\t\t\n\t\tsecondLevel.push({name: pName, values: vals, type: subType, defVal: defVal, parentRow: myRow, flipBkg: flipBkg, size: size});\n\t}\n\t\n\treturn document.createElement('div'); //empty cell\n};\n\nfunction createCheckbox(pName, pValue, prop)\n{\n\tvar input = document.createElement('input');\n\tinput.type = 'checkbox';\n\tinput.checked = pValue == '1';\n\t\n\tmxEvent.addListener(input, 'change', function() \n\t{\n\t\tapplyStyleVal(pName, input.checked? '1' : '0', prop);\n\t});\n\treturn input;\n};\n\nfunction createPropertyRow(pName, pValue, prop, isOdd, flipBkg)\n{\n\tvar pDiplayName = prop.dispName;\n\tvar pType = prop.type;\n\tvar row = document.createElement('tr');\n\trow.className = 'gePropRow' + (flipBkg? 'Dark' : '') + (isOdd? 'Alt' : '') + ' gePropNonHeaderRow';\n\trow.setAttribute('data-pName', pName);\n\trow.setAttribute('data-pValue', pValue);\n\tvar rightAlig = false;\n\t\n\tif (prop.index != null)\n\t{\n\t\trow.setAttribute('data-index', prop.index);\n\t\tpDiplayName = (pDiplayName != null? pDiplayName : '') + '[' + prop.index + ']';\n\t\trightAlig = true;\n\t}\n\t\n\tvar td = document.createElement('td');\n\ttd.className = 'gePropRowCell';\n\tvar label = mxResources.get(pDiplayName, null, pDiplayName);\n\tmxUtils.write(td, label);\n\ttd.setAttribute('title', label);\n\t\n\tif (rightAlig)\n\t{\n\t\ttd.style.textAlign = 'right';\n\t}\n\t\t\n\trow.appendChild(td);\n\ttd = document.createElement('td');\n\ttd.className = 'gePropRowCell';\n\t\n\tif (pType == 'color')\n\t{\n\t\ttd.appendChild(createColorBtn(pName, pValue, prop));\n\t}\n\telse if (pType == 'bool' || pType == 'boolean')\n\t{\n\t\ttd.appendChild(createCheckbox(pName, pValue, prop));\n\t}\n\telse if (pType == 'enum')\n\t{\n\t\tvar pEnumList = prop.enumList;\n\t\t\n\t\tfor (var i = 0; i < pEnumList.length; i++)\n\t\t{\n\t\t\tvar op = pEnumList[i];\n\t\t\t\n\t\t\tif (op.val == pValue)\n\t\t\t{\n\t\t\t\tmxUtils.write(td, mxResources.get(op.dispName, null, op.dispName));\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\tmxEvent.addListener(td, 'click', mxUtils.bind(that, function()\n\t\t{\n\t\t\tvar select = document.createElement('select');\n\t\t\tsetElementPos(td, select);\n\n\t\t\tfor (var i = 0; i < pEnumList.length; i++)\n\t\t\t{\n\t\t\t\tvar op = pEnumList[i];\n\t\t\t\tvar opElem = document.createElement('option');\n\t\t\t\topElem.value = mxUtils.htmlEntities(op.val);\n\t\t\t\tmxUtils.write(opElem, mxResources.get(op.dispName, null, op.dispName));\n\t\t\t\tselect.appendChild(opElem);\n\t\t\t}\n\t\t\t\n\t\t\tselect.value = pValue;\n\t\t\t\n\t\t\tdiv.appendChild(select);\n\n\t\t\tmxEvent.addListener(select, 'change', function()\n\t\t\t{\n\t\t\t\tvar newVal = mxUtils.htmlEntities(select.value);\n\t\t\t\tapplyStyleVal(pName, newVal, prop);\n\t\t\t\t//set value triggers a redraw of the panel which removes the select and updates the row\n\t\t\t});\n\n\t\t\tselect.focus();\n\n\t\t\t//FF calls blur on focus! so set the event after focusing (not with selects but to be safe)\n\t\t\tmxEvent.addListener(select, 'blur', function()\n\t\t\t{\n\t\t\t\tdiv.removeChild(select);\n\t\t\t});\n\t\t}));\n\t}\n\telse if (pType == 'dynamicArr')\n\t{\n\t\ttd.appendChild(createDynArrList(pName, pValue, prop.subType, prop.subDefVal, prop.countProperty, row, flipBkg));\n\t}\n\telse if (pType == 'staticArr')\n\t{\n\t\ttd.appendChild(createStaticArrList(pName, pValue, prop.subType, prop.subDefVal, prop.size, row, flipBkg));\n\t}\n\telse if (pType == 'readOnly')\n\t{\n\t\tvar inp = document.createElement('input');\n\t\tinp.setAttribute('readonly', '');\n\t\tinp.value = pValue;\n\t\tinp.style.width = '96px';\n\t\tinp.style.borderWidth = '0px';\n\t\ttd.appendChild(inp);\n\t}\n\telse\n\t{\n\t\ttd.innerHTML = mxUtils.htmlEntities(decodeURIComponent(pValue));\n\t\t\n\t\tmxEvent.addListener(td, 'click', mxUtils.bind(that, function()\n\t\t{\n\t\t\tvar input = document.createElement('input');\n\t\t\tsetElementPos(td, input, true);\n\t\t\tinput.value = decodeURIComponent(pValue);\n\t\t\tinput.className = 'gePropEditor';\n\t\t\t\n\t\t\tif ((pType == 'int' || pType == 'float') && !prop.allowAuto)\n\t\t\t{\n\t\t\t\tinput.type = 'number';\n\t\t\t\tinput.step = pType == 'int'? '1' : 'any';\n\t\t\t\t\n\t\t\t\tif (prop.min != null)\n\t\t\t\t{\n\t\t\t\t\tinput.min = parseFloat(prop.min); \n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (prop.max != null)\n\t\t\t\t{\n\t\t\t\t\tinput.max = parseFloat(prop.max);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tdiv.appendChild(input);\n\n\t\t\tfunction setInputVal()\n\t\t\t{\n\t\t\t\tvar inputVal = input.value;\n\t\t\t\tinputVal = inputVal.length == 0 && pType != 'string'? 0 : inputVal;\n\t\t\t\t\n\t\t\t\tif (prop.allowAuto)\n\t\t\t\t{\n\t\t\t\t\tif (inputVal.trim != null && inputVal.trim().toLowerCase() == 'auto')\n\t\t\t\t\t{\n\t\t\t\t\t\tinputVal = 'auto';\n\t\t\t\t\t\tpType = 'string';\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tinputVal = parseFloat(inputVal);\n\t\t\t\t\t\tinputVal = isNaN(inputVal)? 0 : inputVal;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (prop.min != null && inputVal < prop.min)\n\t\t\t\t{\n\t\t\t\t\tinputVal = prop.min;\n\t\t\t\t} \n\t\t\t\telse if (prop.max != null && inputVal > prop.max)\n\t\t\t\t{\n\t\t\t\t\tinputVal = prop.max;\n\t\t\t\t}\n\n\t\t\t\tvar newVal = encodeURIComponent((pType == 'int'? parseInt(inputVal) : inputVal) + '');\n\t\t\t\t\n\t\t\t\tapplyStyleVal(pName, newVal, prop);\n\t\t\t}\n\t\t\t\n\t\t\tmxEvent.addListener(input, 'keypress', function(e)\n\t\t\t{\n\t\t\t\tif (e.keyCode == 13) \n\t\t\t\t{\n\t\t\t\t\tsetInputVal();\n\t\t\t\t\t//set value triggers a redraw of the panel which removes the input\n\t\t\t\t}\n\t\t\t});\n\t\t\t\n\t\t\tinput.focus();\n\t\t\t\n\t\t\t//FF calls blur on focus! so set the event after focusing\n\t\t\tmxEvent.addListener(input, 'blur', function() \n\t\t\t{\n\t\t\t\tsetInputVal();\n\t\t\t});\n\t\t}));\n\t}\n\n\tif (prop.isDeletable)\n\t{\n\t\tvar delBtn = mxUtils.button('-', mxUtils.bind(that, function(evt)\n\t\t{\n\t\t\t//delete the node by refreshing the properties\n\t\t\tapplyStyleVal(pName, '', prop, prop.index);\n\t\t\t\n\t\t\tmxEvent.consume(evt);\n\t\t}));\n\t\t\n\t\tdelBtn.style.height = '16px';\n\t\tdelBtn.style.width = '25px';\n\t\tdelBtn.style.float = 'right';\n\t\tdelBtn.className = 'geColorBtn';\n\t\ttd.appendChild(delBtn);\n\t}\n\t\n\trow.appendChild(td);\n\treturn row;\n};\n\ndiv.style.position = 'relative';\ndiv.style.padding = '0';\nvar grid = document.createElement('table');\ngrid.className = 'geProperties';\ngrid.style.whiteSpace = 'nowrap';\ngrid.style.width = '100%';\n//create header row\nvar hrow = document.createElement('tr');\nhrow.className = 'gePropHeader';\nvar th = document.createElement('th');\nth.className = 'gePropHeaderCell';\nvar collapseImg = document.createElement('img');\ncollapseImg.src = Sidebar.prototype.expandedImage;\ncollapseImg.style.verticalAlign = 'middle';\nth.appendChild(collapseImg);\nmxUtils.write(th, mxResources.get('property'));\nhrow.style.cursor = 'pointer';\n\nvar onFold = function()\n{\n\tvar rows = grid.querySelectorAll('.gePropNonHeaderRow');\n\tvar display;\n\t\n\tif (!that.editorUi.propertiesCollapsed)\n\t{\n\t\tcollapseImg.src = Sidebar.prototype.expandedImage;\n\t\tdisplay = '';\n\t}\n\telse\n\t{\n\t\tcollapseImg.src = Sidebar.prototype.collapsedImage;\n\t\tdisplay = 'none';\n\t\t\n\t\tfor (var e = div.childNodes.length - 1; e >= 0 ; e--)\n\t\t{\n\t\t\t//Blur can be executed concurrently with this method and the element is removed before removing it here\n\t\t\ttry\n\t\t\t{\n\t\t\t\tvar child = div.childNodes[e]; \n\t\t\t\tvar nodeName = child.nodeName.toUpperCase();\n\t\t\t\t\n\t\t\t\tif (nodeName == 'INPUT' || nodeName == 'SELECT')\n\t\t\t\t{\n\t\t\t\t\tdiv.removeChild(child);\n\t\t\t\t}\n\t\t\t}\n\t\t\tcatch(ex){}\n\t\t}\n\t}\n\t\n\tfor (var r = 0; r < rows.length; r++)\n\t{\n\t\trows[r].style.display = display;\n\t}\n};\n\nmxEvent.addListener(hrow, 'click', function()\n{\n\tthat.editorUi.propertiesCollapsed = !that.editorUi.propertiesCollapsed;\n\tonFold();\n});\nhrow.appendChild(th);\nth = document.createElement('th');\nth.className = 'gePropHeaderCell';\nth.innerHTML = mxResources.get('value');\nhrow.appendChild(th);\ngrid.appendChild(hrow);\n\nvar isOdd = false;\nvar flipBkg = false;\n\nvar cellId = null;\n\nif (state.vertices.length == 1 && state.edges.length == 0)\n{\n\tcellId = state.vertices[0].id;\n}\nelse if (state.vertices.length == 0 && state.edges.length == 1)\n{\n\tcellId = state.edges[0].id;\n}\n\n//Add it to top (always)\nif (cellId != null)\n{\n\tgrid.appendChild(createPropertyRow('id', mxUtils.htmlEntities(cellId), {dispName: 'ID', type: 'readOnly'}, true, false));\n}\n\nfor (var key in properties)\n{\n\tvar prop = properties[key];\n\t\n\tif (typeof(prop.isVisible) == 'function')\n\t{\n\t\tif (!prop.isVisible(state, this)) continue;\n\t}\n\t\n\tvar pValue = state.style[key] != null? mxUtils.htmlEntities(state.style[key] + '') :\n\t\t((prop.getDefaultValue != null) ? prop.getDefaultValue(state, this) : prop.defVal); //or undefined if defVal is undefined\n\n\tif (prop.type == 'separator')\n\t{\n\t\tflipBkg = !flipBkg;\n\t\tcontinue;\n\t}\n\telse if (prop.type == 'staticArr') //if dynamic values are needed, a more elegant technique is needed to replace such values\n\t{\n\t\tprop.size = parseInt(state.style[prop.sizeProperty] || properties[prop.sizeProperty].defVal) || 0;\n\t}\n\telse if (prop.dependentProps != null)\n\t{\n\t\tvar dependentProps = prop.dependentProps;\n\t\tvar dependentPropsVals = [];\n\t\tvar dependentPropsDefVal = [];\n\t\t\n\t\tfor (var i = 0; i < dependentProps.length; i++)\n\t\t{\n\t\t\tvar propVal = state.style[dependentProps[i]];\n\t\t\tdependentPropsDefVal.push(properties[dependentProps[i]].subDefVal);\n\t\t\tdependentPropsVals.push(propVal != null? propVal.split(',') : []);\n\t\t}\n\t\t\n\t\tprop.dependentPropsDefVal = dependentPropsDefVal;\n\t\tprop.dependentPropsVals = dependentPropsVals;\n\t}\n\t\n\tgrid.appendChild(createPropertyRow(key, pValue, prop, isOdd, flipBkg));\n\t\n\tisOdd = !isOdd;\n}\n\nfor (var i = 0; i < secondLevel.length; i++)\n{\n\tvar prop = secondLevel[i];\n\tvar insertElem = prop.parentRow;\n\t\t\n\tfor (var j = 0; j < prop.values.length; j++)\n\t{\n\t\t//mxUtils.clone failed because of the HTM element, so manual cloning is used\n\t\tvar iProp = {type: prop.type, parentRow: prop.parentRow, isDeletable: prop.isDeletable, index: j, defVal: prop.defVal, countProperty: prop.countProperty, size: prop.size};\n\t\tvar arrItem = createPropertyRow(prop.name, prop.values[j], iProp, j % 2 == 0, prop.flipBkg);\n\t\tinsertAfter(arrItem, insertElem);\n\t\tinsertElem = arrItem;\n\t}\n}\n\ndiv.appendChild(grid);\nonFold();\n\nreturn div;\n};\n\n/**\n* Creates the buttons for the predefined styles.\n*/\nStyleFormatPanel.prototype.addStyles = function(div)\n{\nif (this.defaultColorSchemes != null)\n{\n\tvar ui = this.editorUi;\n\tvar graph = ui.editor.graph;\n\tvar picker = document.createElement('div');\n\tpicker.style.whiteSpace = 'nowrap';\n\tpicker.style.paddingLeft = '24px';\n\tpicker.style.paddingRight = '20px';\n\tdiv.style.paddingLeft = '16px';\n\tdiv.style.paddingBottom = '6px';\n\tdiv.style.position = 'relative';\n\tdiv.appendChild(picker);\n\n\tvar stylenames = ['plain-gray', 'plain-blue', 'plain-green', 'plain-turquoise',\n\t\t'plain-orange', 'plain-yellow', 'plain-red', 'plain-pink', 'plain-purple', 'gray',\n\t\t'blue', 'green', 'turquoise', 'orange', 'yellow', 'red', 'pink', 'purple'];\n\t\n\t// Maximum palettes to switch the switcher\n\tvar maxEntries = 10;\n\t\t\t\t\n\t// Selector\n\tvar switcher = document.createElement('div');\n\tswitcher.style.whiteSpace = 'nowrap';\n\tswitcher.style.position = 'relative';\n\tswitcher.style.textAlign = 'center';\n\tswitcher.style.width = '210px';\n\t\n\tvar dots = [];\n\t\n\tfor (var i = 0; i < this.defaultColorSchemes.length; i++)\n\t{\n\t\tvar dot = document.createElement('div');\n\t\tdot.style.display = 'inline-block';\n\t\tdot.style.width = '6px';\n\t\tdot.style.height = '6px';\n\t\tdot.style.marginLeft = '4px';\n\t\tdot.style.marginRight = '3px';\n\t\tdot.style.borderRadius = '3px';\n\t\tdot.style.cursor = 'pointer';\n\t\tdot.style.background = 'transparent';\n\t\tdot.style.border = '1px solid #b5b6b7';\n\t\t\n\t\t(mxUtils.bind(this, function(index)\n\t\t{\n\t\t\tmxEvent.addListener(dot, 'click', mxUtils.bind(this, function()\n\t\t\t{\n\t\t\t\tsetScheme(index);\n\t\t\t}));\n\t\t}))(i);\n\t\t\n\t\tdots.push(dot);\n\t\tswitcher.appendChild(dot);\n\t}\n\t\n\tvar setScheme = mxUtils.bind(this, function(index)\n\t{\n\t\tif (dots[index] != null)\n\t\t{\n\t\t\tif (this.format.currentScheme != null && dots[this.format.currentScheme] != null)\n\t\t\t{\n\t\t\t\tdots[this.format.currentScheme].style.background = 'transparent';\n\t\t\t}\n\t\t\t\n\t\t\tthis.format.currentScheme = index;\n\t\t\tupdateScheme(this.defaultColorSchemes[this.format.currentScheme]);\n\t\t\tdots[this.format.currentScheme].style.background = '#84d7ff';\n\t\t}\n\t});\n\t\n\tvar updateScheme = mxUtils.bind(this, function(colorsets)\n\t{\n\t\tvar addButton = mxUtils.bind(this, function(colorset)\n\t\t{\n\t\t\tvar btn = mxUtils.button('', mxUtils.bind(this, function(evt)\n\t\t\t{\n\t\t\t\tgraph.getModel().beginUpdate();\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tvar cells = ui.getSelectionState().cells;\n\t\t\t\t\t\n\t\t\t\t\tfor (var i = 0; i < cells.length; i++)\n\t\t\t\t\t{\n\t\t\t\t\t\tvar style = graph.getModel().getStyle(cells[i]);\n\t\t\n\t\t\t\t\t\tfor (var j = 0; j < stylenames.length; j++)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tstyle = mxUtils.removeStylename(style, stylenames[j]);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tvar defaults = (graph.getModel().isVertex(cells[i])) ? graph.defaultVertexStyle : graph.defaultEdgeStyle;\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (colorset != null)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif (!mxEvent.isShiftDown(evt))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif (colorset['fill'] == '')\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tstyle = mxUtils.setStyle(style, mxConstants.STYLE_FILLCOLOR, null);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tstyle = mxUtils.setStyle(style, mxConstants.STYLE_FILLCOLOR, colorset['fill'] ||\n\t\t\t\t\t\t\t\t\t\tmxUtils.getValue(defaults, mxConstants.STYLE_FILLCOLOR, null));\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tstyle = mxUtils.setStyle(style, mxConstants.STYLE_GRADIENTCOLOR, colorset['gradient'] ||\n\t\t\t\t\t\t\t\t\tmxUtils.getValue(defaults, mxConstants.STYLE_GRADIENTCOLOR, null));\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tif (!mxEvent.isControlDown(evt) && (!mxClient.IS_MAC || !mxEvent.isMetaDown(evt)) &&\n\t\t\t\t\t\t\t\t\tgraph.getModel().isVertex(cells[i]))\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tstyle = mxUtils.setStyle(style, mxConstants.STYLE_FONTCOLOR, colorset['font'] ||\n\t\t\t\t\t\t\t\t\t\tmxUtils.getValue(defaults, mxConstants.STYLE_FONTCOLOR, null));\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif (!mxEvent.isAltDown(evt))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif (colorset['stroke'] == '')\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tstyle = mxUtils.setStyle(style, mxConstants.STYLE_STROKECOLOR, null);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tstyle = mxUtils.setStyle(style, mxConstants.STYLE_STROKECOLOR, colorset['stroke'] ||\n\t\t\t\t\t\t\t\t\t\tmxUtils.getValue(defaults, mxConstants.STYLE_STROKECOLOR, null));\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tstyle = mxUtils.setStyle(style, mxConstants.STYLE_FILLCOLOR,\n\t\t\t\t\t\t\t\tmxUtils.getValue(defaults, mxConstants.STYLE_FILLCOLOR, '#ffffff'));\n\t\t\t\t\t\t\tstyle = mxUtils.setStyle(style, mxConstants.STYLE_STROKECOLOR,\n\t\t\t\t\t\t\t\tmxUtils.getValue(defaults, mxConstants.STYLE_STROKECOLOR, '#000000'));\n\t\t\t\t\t\t\tstyle = mxUtils.setStyle(style, mxConstants.STYLE_GRADIENTCOLOR,\n\t\t\t\t\t\t\t\tmxUtils.getValue(defaults, mxConstants.STYLE_GRADIENTCOLOR, null));\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif (graph.getModel().isVertex(cells[i]))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tstyle = mxUtils.setStyle(style, mxConstants.STYLE_FONTCOLOR,\n\t\t\t\t\t\t\t\t\tmxUtils.getValue(defaults, mxConstants.STYLE_FONTCOLOR, null));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tgraph.getModel().setStyle(cells[i], style);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tfinally\n\t\t\t\t{\n\t\t\t\t\tgraph.getModel().endUpdate();\n\t\t\t\t}\n\t\t\t}));\n\n\t\t\tbtn.className = 'geStyleButton';\n\t\t\tbtn.style.width = '36px';\n\t\t\tbtn.style.height = (this.defaultColorSchemes.length <= maxEntries) ? '24px' : '30px';\n\t\t\tbtn.style.margin = '0px 6px 6px 0px';\n\t\t\t\n\t\t\tif (colorset != null)\n\t\t\t{\n\t\t\t\tvar b = (Editor.isDarkMode()) ? '2px solid' : '1px solid';\n\t\t\t\t\n\t\t\t\tif (colorset['border'] != null)\n\t\t\t\t{\n\t\t\t\t\tb = colorset['border'];\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (colorset['gradient'] != null)\n\t\t\t\t{\n\t\t\t\t\tif (mxClient.IS_IE && (document.documentMode < 10))\n\t\t\t\t\t{\n\t\t\t\t\t\tbtn.style.filter = 'progid:DXImageTransform.Microsoft.Gradient('+\n\t\t\t\t\t\t\t'StartColorStr=\\'' + colorset['fill'] +\n\t\t\t\t\t\t\t'\\', EndColorStr=\\'' + colorset['gradient'] + '\\', GradientType=0)';\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tbtn.style.backgroundImage = 'linear-gradient(' + colorset['fill'] + ' 0px,' +\n\t\t\t\t\t\t\tcolorset['gradient'] + ' 100%)';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if (colorset['fill'] == mxConstants.NONE)\n\t\t\t\t{\n\t\t\t\t\tbtn.style.background = 'url(\\'' + Dialog.prototype.noColorImage + '\\')';\n\t\t\t\t}\n\t\t\t\telse if (colorset['fill'] == '')\n\t\t\t\t{\n\t\t\t\t\tbtn.style.backgroundColor = mxUtils.getValue(graph.defaultVertexStyle,\n\t\t\t\t\t\tmxConstants.STYLE_FILLCOLOR, (Editor.isDarkMode()) ? Editor.darkColor : '#ffffff');\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tbtn.style.backgroundColor = colorset['fill'] || mxUtils.getValue(graph.defaultVertexStyle,\n\t\t\t\t\t\tmxConstants.STYLE_FILLCOLOR, (Editor.isDarkMode()) ? Editor.darkColor : '#ffffff');\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (colorset['stroke'] == mxConstants.NONE)\n\t\t\t\t{\n\t\t\t\t\tbtn.style.border = b + ' transparent';\n\t\t\t\t}\n\t\t\t\telse if (colorset['stroke'] == '')\n\t\t\t\t{\n\t\t\t\t\tbtn.style.border = b + ' ' + mxUtils.getValue(graph.defaultVertexStyle, \n\t\t\t\t\t\tmxConstants.STYLE_STROKECOLOR, (!Editor.isDarkMode()) ? Editor.darkColor : '#ffffff');\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tbtn.style.border = b + ' ' + (colorset['stroke'] || mxUtils.getValue(graph.defaultVertexStyle,\n\t\t\t\t\t\t\tmxConstants.STYLE_STROKECOLOR, (!Editor.isDarkMode()) ? Editor.darkColor : '#ffffff'));\n\t\t\t\t}\n\n\t\t\t\tif (colorset['title'] != null)\n\t\t\t\t{\n\t\t\t\t\tbtn.setAttribute('title', colorset['title']);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tvar bg = mxUtils.getValue(graph.defaultVertexStyle, mxConstants.STYLE_FILLCOLOR, '#ffffff');\n\t\t\t\tvar bd = mxUtils.getValue(graph.defaultVertexStyle, mxConstants.STYLE_STROKECOLOR, '#000000');\n\t\t\t\t\n\t\t\t\tbtn.style.backgroundColor = bg;\n\t\t\t\tbtn.style.border = '1px solid ' + bd;\n\t\t\t}\n\n\t\t\tbtn.style.borderRadius = '0';\n\t\t\t\n\t\t\tpicker.appendChild(btn);\n\t\t});\n\t\t\n\t\tpicker.innerText = '';\n\t\t\n\t\tfor (var i = 0; i < colorsets.length; i++)\n\t\t{\n\t\t\tif (i > 0 && mxUtils.mod(i, 4) == 0)\n\t\t\t{\n\t\t\t\tmxUtils.br(picker);\n\t\t\t}\n\t\t\t\n\t\t\taddButton(colorsets[i]);\n\t\t}\n\t});\n\n\tif (this.format.currentScheme == null)\n\t{\n\t\tsetScheme(Math.min(dots.length - 1, Editor.isDarkMode()\n\t\t\t? 1 : (urlParams['sketch'] == '1' ? 5 : 0)));\n\t}\n\telse\n\t{\n\t\tsetScheme(this.format.currentScheme);\n\t}\n\t\n\tvar bottom = (this.defaultColorSchemes.length <= maxEntries) ? 28 : 8;\n\n\tvar left = document.createElement('div');\n\tleft.style.cssText = 'position:absolute;left:10px;top:8px;bottom:' + bottom + 'px;width:20px;margin:4px;opacity:0.5;' +\n\t\t'background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ4eHh3d3d1dXVxcXF2dnZ2dnZ2dnZxcXF2dnYmb3w1AAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADRJREFUCNdjwACMAmBKaiGYs2oJmLPKAZ3DabU8AMRTXpUKopislqFyVzCAuUZgikkBZjoAcMYLnp53P/UAAAAASUVORK5CYII=);';\n\t\n\tmxEvent.addListener(left, 'click', mxUtils.bind(this, function()\n\t{\n\t\tsetScheme(mxUtils.mod(this.format.currentScheme - 1, this.defaultColorSchemes.length));\n\t}));\n\t\n\tvar right = document.createElement('div');\n\tright.style.cssText = 'position:absolute;left:202px;top:8px;bottom:' + bottom + 'px;width:20px;margin:4px;opacity:0.5;' +\n\t\t'background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnYBuwCcAAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADZJREFUCNdjQAOMAmBKaiGY8loF5rKswsZlrVo8AUiFrTICcbIWK8A5DF1gDoMymMPApIAwHwCS0Qx/U7qCBQAAAABJRU5ErkJggg==);';\n\n\tif (this.defaultColorSchemes.length > 1)\n\t{\n\t\tdiv.appendChild(left);\n\t\tdiv.appendChild(right);\n\t}\n\t\n\tmxEvent.addListener(right, 'click', mxUtils.bind(this, function()\n\t{\n\t\tsetScheme(mxUtils.mod(this.format.currentScheme + 1, this.defaultColorSchemes.length));\n\t}));\n\t\n\t// Hover state\n\tfunction addHoverState(elt)\n\t{\n\t\tmxEvent.addListener(elt, 'mouseenter', function()\n\t\t{\n\t\t\telt.style.opacity = '1';\n\t\t});\n\t\tmxEvent.addListener(elt, 'mouseleave', function()\n\t\t{\n\t\t\telt.style.opacity = '0.5';\n\t\t});\n\t};\n\t\n\taddHoverState(left);\n\taddHoverState(right);\n\t\n\tupdateScheme(this.defaultColorSchemes[this.format.currentScheme]);\n\t\n\tif (this.defaultColorSchemes.length <= maxEntries)\n\t{\n\t\tdiv.appendChild(switcher);\n\t}\n}\n\nreturn div;\n};\n"
  },
  {
    "path": "static/cherry/drawio_demo/Graph.js",
    "content": "/**\n * Copyright (c) 2006-2012, JGraph Ltd\n */\n// Workaround for handling named HTML entities in mxUtils.parseXml\n// LATER: How to configure DOMParser to just ignore all entities?\n(function()\n{\n\tvar entities = [\n\t\t['nbsp', '160'],\n\t\t['shy', '173']\n    ];\n\n\tvar parseXml = mxUtils.parseXml;\n\t\n\tmxUtils.parseXml = function(text)\n\t{\n\t\tfor (var i = 0; i < entities.length; i++)\n\t    {\n\t        text = text.replace(new RegExp(\n\t        \t'&' + entities[i][0] + ';', 'g'),\n\t\t        '&#' + entities[i][1] + ';');\n\t    }\n\n\t\treturn parseXml(text);\n\t};\n})();\n\n// Shim for missing toISOString in older versions of IE\n// See https://stackoverflow.com/questions/12907862\nif (!Date.prototype.toISOString)\n{         \n    (function()\n    {         \n        function pad(number)\n        {\n            var r = String(number);\n            \n            if (r.length === 1) \n            {\n                r = '0' + r;\n            }\n            \n            return r;\n        };\n        \n        Date.prototype.toISOString = function()\n        {\n            return this.getUTCFullYear()\n                + '-' + pad( this.getUTCMonth() + 1 )\n                + '-' + pad( this.getUTCDate() )\n                + 'T' + pad( this.getUTCHours() )\n                + ':' + pad( this.getUTCMinutes() )\n                + ':' + pad( this.getUTCSeconds() )\n                + '.' + String( (this.getUTCMilliseconds()/1000).toFixed(3) ).slice( 2, 5 )\n                + 'Z';\n        };       \n    }());\n}\n\n// Shim for Date.now()\nif (!Date.now)\n{\n\tDate.now = function()\n\t{\n\t\treturn new Date().getTime();\n\t};\n}\n\n// Polyfill for Uint8Array.from in IE11 used in Graph.decompress\n// See https://stackoverflow.com/questions/36810940/alternative-or-polyfill-for-array-from-on-the-internet-explorer\nif (!Uint8Array.from) {\n  Uint8Array.from = (function () {\n    var toStr = Object.prototype.toString;\n    var isCallable = function (fn) {\n      return typeof fn === 'function' || toStr.call(fn) === '[object Function]';\n    };\n    var toInteger = function (value) {\n      var number = Number(value);\n      if (isNaN(number)) { return 0; }\n      if (number === 0 || !isFinite(number)) { return number; }\n      return (number > 0 ? 1 : -1) * Math.floor(Math.abs(number));\n    };\n    var maxSafeInteger = Math.pow(2, 53) - 1;\n    var toLength = function (value) {\n      var len = toInteger(value);\n      return Math.min(Math.max(len, 0), maxSafeInteger);\n    };\n\n    // The length property of the from method is 1.\n    return function from(arrayLike/*, mapFn, thisArg */) {\n      // 1. Let C be the this value.\n      var C = this;\n\n      // 2. Let items be ToObject(arrayLike).\n      var items = Object(arrayLike);\n\n      // 3. ReturnIfAbrupt(items).\n      if (arrayLike == null) {\n        throw new TypeError(\"Array.from requires an array-like object - not null or undefined\");\n      }\n\n      // 4. If mapfn is undefined, then let mapping be false.\n      var mapFn = arguments.length > 1 ? arguments[1] : void undefined;\n      var T;\n      if (typeof mapFn !== 'undefined') {\n        // 5. else\n        // 5. a If IsCallable(mapfn) is false, throw a TypeError exception.\n        if (!isCallable(mapFn)) {\n          throw new TypeError('Array.from: when provided, the second argument must be a function');\n        }\n\n        // 5. b. If thisArg was supplied, let T be thisArg; else let T be undefined.\n        if (arguments.length > 2) {\n          T = arguments[2];\n        }\n      }\n\n      // 10. Let lenValue be Get(items, \"length\").\n      // 11. Let len be ToLength(lenValue).\n      var len = toLength(items.length);\n\n      // 13. If IsConstructor(C) is true, then\n      // 13. a. Let A be the result of calling the [[Construct]] internal method of C with an argument list containing the single item len.\n      // 14. a. Else, Let A be ArrayCreate(len).\n      var A = isCallable(C) ? Object(new C(len)) : new Array(len);\n\n      // 16. Let k be 0.\n      var k = 0;\n      // 17. Repeat, while k < len… (also steps a - h)\n      var kValue;\n      while (k < len) {\n        kValue = items[k];\n        if (mapFn) {\n          A[k] = typeof T === 'undefined' ? mapFn(kValue, k) : mapFn.call(T, kValue, k);\n        } else {\n          A[k] = kValue;\n        }\n        k += 1;\n      }\n      // 18. Let putStatus be Put(A, \"length\", len, true).\n      A.length = len;\n      // 20. Return A.\n      return A;\n    };\n  }());\n}\n\n/**\n * Measurements Units\n */\nmxConstants.POINTS = 1;\nmxConstants.MILLIMETERS = 2;\nmxConstants.INCHES = 3;\nmxConstants.METERS = 4;\n\n/**\n * This ratio is with page scale 1\n */\nmxConstants.PIXELS_PER_MM = 3.937;\nmxConstants.PIXELS_PER_INCH = 100;\nmxConstants.SHADOW_OPACITY = 0.25;\nmxConstants.SHADOWCOLOR = '#000000';\nmxConstants.VML_SHADOWCOLOR = '#d0d0d0';\n\nmxCodec.allowlist = ['mxStylesheet', 'Array', 'mxGraphModel',\n\t'mxCell', 'mxGeometry', 'mxRectangle', 'mxPoint',\n\t'mxChildChange', 'mxRootChange', 'mxTerminalChange',\n\t'mxValueChange', 'mxStyleChange', 'mxGeometryChange',\n\t'mxCollapseChange', 'mxVisibleChange', 'mxCellAttributeChange'];\nmxGraph.prototype.pageBreakColor = '#c0c0c0';\nmxGraph.prototype.pageScale = 1;\n\n// Letter page format is default in US, Canada and Mexico\n(function()\n{\n\ttry\n\t{\n\t\tif (navigator != null && navigator.language != null)\n\t\t{\n\t\t\tvar lang = navigator.language.toLowerCase();\n\t\t\tmxGraph.prototype.pageFormat = (lang === 'en-us' || lang === 'en-ca' || lang === 'es-mx') ?\n\t\t\t\tmxConstants.PAGE_FORMAT_LETTER_PORTRAIT : mxConstants.PAGE_FORMAT_A4_PORTRAIT;\n\t\t}\n\t}\n\tcatch (e)\n\t{\n\t\t// ignore\n\t}\n})();\n\n// Matches label positions of mxGraph 1.x\nmxText.prototype.baseSpacingTop = 5;\nmxText.prototype.baseSpacingBottom = 1;\n\n// Keeps edges between relative child cells inside parent\nmxGraphModel.prototype.ignoreRelativeEdgeParent = false;\n\n// Defines grid properties\nmxGraphView.prototype.gridImage = (mxClient.IS_SVG) ? 'data:image/gif;base64,R0lGODlhCgAKAJEAAAAAAP///8zMzP///yH5BAEAAAMALAAAAAAKAAoAAAIJ1I6py+0Po2wFADs=' :\n\tIMAGE_PATH + '/grid.gif';\nmxGraphView.prototype.gridSteps = 4;\nmxGraphView.prototype.minGridSize = 4;\n\n// UrlParams is null in embed mode\nmxGraphView.prototype.defaultGridColor = '#d0d0d0';\nmxGraphView.prototype.defaultDarkGridColor = '#424242';\nmxGraphView.prototype.gridColor = mxGraphView.prototype.defaultGridColor;\n\n// Units\nmxGraphView.prototype.unit = mxConstants.POINTS;\n\nmxGraphView.prototype.setUnit = function(unit) \n{\n\tif (this.unit != unit)\n\t{\n\t    this.unit = unit;\n\t    \n\t    this.fireEvent(new mxEventObject('unitChanged', 'unit', unit));\n\t}\n};\n\n// Alternative text for unsupported foreignObjects\nmxSvgCanvas2D.prototype.foAltText = '[Not supported by viewer]';\n\n// Hook for custom constraints\nmxShape.prototype.getConstraints = function(style, w, h)\n{\n\treturn null;\n};\n\n// Override for clipSvg style\nmxImageShape.prototype.getImageDataUri = function()\n{\n\tvar src = this.image;\n\n\tif (src.substring(0, 26) == 'data:image/svg+xml;base64,' && this.style != null &&\n\t\tmxUtils.getValue(this.style, 'clipSvg', '0') == '1')\n\t{\n\t\tif (this.clippedSvg == null || this.clippedImage != src)\n\t\t{\n\t\t\tthis.clippedSvg = Graph.clipSvgDataUri(src, true);\n\t\t\tthis.clippedImage = src;\n\t\t}\n\t\t\n\t\tsrc = this.clippedSvg;\n\t}\n\n\treturn src;\n};\n\n// Override to use key as fallback\n(function()\n{\n\tvar mxResourcesGet = mxResources.get;\n\n\tmxResources.get = function(key, params, defaultValue)\n\t{\n\t\tif (defaultValue == null)\n\t\t{\n\t\t\tdefaultValue = key;\n\t\t}\n\n\t\treturn mxResourcesGet.apply(this, [key, params, defaultValue]);\n\t};\n\n})();\n\n/**\n * Constructs a new graph instance. Note that the constructor does not take a\n * container because the graph instance is needed for creating the UI, which\n * in turn will create the container for the graph. Hence, the container is\n * assigned later in EditorUi.\n */\n/**\n * Defines graph class.\n */\nGraph = function(container, model, renderHint, stylesheet, themes, standalone)\n{\n\tmxGraph.call(this, container, model, renderHint, stylesheet);\n\t\n\tthis.themes = themes || this.defaultThemes;\n\tthis.currentEdgeStyle = mxUtils.clone(this.defaultEdgeStyle);\n\tthis.currentVertexStyle = mxUtils.clone(this.defaultVertexStyle);\n\tthis.standalone = (standalone != null) ? standalone : false;\n\n\t// Sets the base domain URL and domain path URL for relative links.\n\tvar b = this.baseUrl;\n\tvar p = b.indexOf('//');\n\tthis.domainUrl = '';\n\tthis.domainPathUrl = '';\n\t\n\tif (p > 0)\n\t{\n\t\tvar d = b.indexOf('/', p + 2);\n\n\t\tif (d > 0)\n\t\t{\n\t\t\tthis.domainUrl = b.substring(0, d);\n\t\t}\n\t\t\n\t\td = b.lastIndexOf('/');\n\t\t\n\t\tif (d > 0)\n\t\t{\n\t\t\tthis.domainPathUrl = b.substring(0, d + 1);\n\t\t}\n\t}\n\t\n    // Adds support for HTML labels via style. Note: Currently, only the Java\n    // backend supports HTML labels but CSS support is limited to the following:\n    // http://docs.oracle.com/javase/6/docs/api/index.html?javax/swing/text/html/CSS.html\n\t// TODO: Wrap should not affect isHtmlLabel output (should be handled later)\n\tthis.isHtmlLabel = function(cell)\n\t{\n\t\tvar style = this.getCurrentCellStyle(cell);\n\t\t\n\t\treturn (style != null) ? (style['html'] == '1' || style[mxConstants.STYLE_WHITE_SPACE] == 'wrap') : false;\n\t};\n\t\n\t// Implements a listener for hover and click handling on edges and tables\n\tif (this.immediateHandling)\n\t{\n\t\tvar start = {\n\t\t\tpoint: null,\n\t\t\tevent: null,\n\t\t\tstate: null,\n\t\t\thandle: null,\n\t\t\tselected: false\n\t\t};\n\t\t\n\t\tvar initialSelected = false;\n\n\t\t// Uses this event to process mouseDown to check the selection state before it is changed\n\t\tthis.addListener(mxEvent.FIRE_MOUSE_EVENT, mxUtils.bind(this, function(sender, evt)\n\t\t{\n\t\t\tif (evt.getProperty('eventName') == 'mouseDown' && this.isEnabled())\n\t\t\t{\n\t\t\t\tvar me = evt.getProperty('event');\n\t\t    \tvar state = me.getState();\n\t\t\t\tvar s = this.view.scale;\n\t\t\t\t\n\t\t    \tif (!mxEvent.isAltDown(me.getEvent()) && state != null)\n\t\t    \t{\n\t\t\t\t\tinitialSelected = this.isCellSelected(state.cell);\n\n\t\t    \t\tif (!this.panningHandler.isActive() && !mxEvent.isControlDown(me.getEvent()))\n\t\t    \t\t{\n\t\t\t   \t\t\tvar handler = this.selectionCellsHandler.getHandler(state.cell);\n\n\t\t\t   \t\t\t// Cell handles have precedence over row and col resize\n\t\t    \t\t\tif (handler == null || handler.getHandleForEvent(me) == null)\n\t\t    \t\t\t{\n\t\t\t\t    \t\tvar box = new mxRectangle(me.getGraphX() - 1, me.getGraphY() - 1);\n\t\t\t\t\t\t\tvar tol = mxEvent.isTouchEvent(me.getEvent()) ?\n\t\t\t\t\t\t\t\tmxShape.prototype.svgStrokeTolerance - 1 :\n\t\t\t\t\t\t\t\t(mxShape.prototype.svgStrokeTolerance + 2) / 2;\n\t\t\t\t\t\t\tvar t1 = tol + 2;\n\t\t\t    \t\t\tbox.grow(tol);\n\n\t\t\t\t\t\t\t// Ignores clicks inside cell to avoid delayed selection on\n\t\t\t\t\t\t\t// merged cells when clicking on invisible part of dividers\n\t\t\t    \t\t\tif (this.isTableCell(state.cell) && this.isCellMovable(state.cell) &&\n\t\t\t\t\t\t\t\t!this.isCellSelected(state.cell) &&\n\t\t\t\t\t\t\t\t(!mxUtils.contains(state, me.getGraphX() - t1, me.getGraphY() - t1) ||\n\t\t\t\t\t\t\t\t!mxUtils.contains(state, me.getGraphX() - t1, me.getGraphY() + t1) ||\n\t\t\t\t\t\t\t\t!mxUtils.contains(state, me.getGraphX() + t1, me.getGraphY() + t1) ||\n\t\t\t\t\t\t\t\t!mxUtils.contains(state, me.getGraphX() + t1, me.getGraphY() - t1)))\n\t\t\t    \t\t\t{\n\t\t\t    \t\t\t\tvar row = this.model.getParent(state.cell);\n\t\t\t    \t\t\t\tvar table = this.model.getParent(row);\n\t\t\t    \t\t\t\t\n\t\t\t    \t\t\t\tif (!this.isCellSelected(table))\n\t\t\t    \t\t\t\t{\n\t\t\t\t\t\t\t\t\tvar b = tol * s;\n\t\t\t\t\t\t\t\t\tvar b2 = 2 * b;\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t// Ignores events on top line of top row and left line of left column\n\t\t\t\t    \t\t\t\tif ((this.model.getChildAt(table, 0) != row) && mxUtils.intersects(box,\n\t\t\t\t\t\t\t\t\t\t\tnew mxRectangle(state.x, state.y - b, state.width, b2)) ||\n\t\t\t\t\t\t\t\t\t\t(this.model.getChildAt(row, 0) != state.cell) && mxUtils.intersects(box,\n\t\t\t\t\t\t\t\t\t\t\tnew mxRectangle(state.x - b, state.y, b2, state.height)) ||\n\t\t\t\t\t\t\t\t\t\tmxUtils.intersects(box, new mxRectangle(state.x, state.y + state.height - b, state.width, b2)) ||\n\t\t\t\t\t\t\t\t\t\tmxUtils.intersects(box, new mxRectangle(state.x + state.width - b, state.y, b2, state.height)))\n\t\t\t    \t\t\t\t\t{\n\t\t\t\t    \t\t\t\t\tvar wasSelected = this.selectionCellsHandler.isHandled(table);\n\t\t\t\t\t\t\t\t\t\tthis.selectCellForEvent(table, me.getEvent());\n\t\t\t\t\t\t    \t\t\thandler = this.selectionCellsHandler.getHandler(table);\n\t\t\t\n\t\t\t\t\t\t    \t\t\tif (handler != null)\n\t\t\t\t\t\t    \t\t\t{\n\t\t\t\t\t\t    \t\t\t\tvar handle = handler.getHandleForEvent(me);\n\t\t\t\t    \t\t\t\t\n\t\t\t\t\t\t    \t\t\t\tif (handle != null)\n\t\t\t\t\t\t    \t\t\t\t{\n\t\t\t\t\t\t    \t\t\t\t\thandler.start(me.getGraphX(), me.getGraphY(), handle);\n\t\t\t\t\t\t    \t\t\t\t\thandler.blockDelayedSelection = !wasSelected;\n\t\t\t\t\t\t    \t\t\t\t\tme.consume();\n\t\t\t\t\t\t    \t\t\t\t}\n\t\t\t\t\t\t    \t\t\t}\n\t\t\t    \t\t\t\t\t}\n\t\t\t    \t\t\t\t}\n\t\t    \t\t\t\t}\n\n\t\t\t    \t\t\t// Hover for swimlane start sizes inside tables\n\t\t\t\t    \t\tvar current = state;\n\t\t\t\t    \t\t\n\t\t\t\t    \t\twhile (!me.isConsumed() && current != null && (this.isTableCell(current.cell) ||\n\t\t\t\t    \t\t\tthis.isTableRow(current.cell) || this.isTable(current.cell)))\n\t\t\t\t    \t\t{\n\t\t\t\t\t    \t\tif (this.isSwimlane(current.cell) && this.isCellMovable(current.cell))\n\t\t\t\t\t    \t\t{\n\t\t\t\t\t    \t\t\tvar offset = this.getActualStartSize(current.cell);\n\t\t\t\t\t    \t\t\t\n\t\t    \t\t\t\t\t\tif (((offset.x > 0 || offset.width > 0) && mxUtils.intersects(box, new mxRectangle(\n\t\t    \t\t\t\t\t\t\tcurrent.x + (offset.x - offset.width - 1) * s + ((offset.x == 0) ? current.width : 0),\n\t\t    \t\t\t\t\t\t\tcurrent.y, 1, current.height))) || ((offset.y > 0 || offset.height > 0) &&\n\t\t    \t\t\t\t\t\t\tmxUtils.intersects(box, new mxRectangle(current.x, current.y + (offset.y -\n\t\t    \t\t\t\t\t\t\toffset.height - 1) * s + ((offset.y == 0) ? current.height : 0), current.width, 1))))\n\t\t    \t\t\t\t\t\t{\n\t\t    \t\t\t\t\t\t\tthis.selectCellForEvent(current.cell, me.getEvent());\n\t\t\t\t\t\t    \t\t\thandler = this.selectionCellsHandler.getHandler(current.cell);\n\t\t\t\n\t\t\t\t\t\t    \t\t\tif (handler != null && handler.customHandles != null)\n\t\t\t\t\t\t    \t\t\t{\n\t\t\t\t\t\t    \t\t\t\t// Swimlane start size handle is last custom handle\n\t\t\t\t\t\t    \t\t\t\tvar handle = mxEvent.CUSTOM_HANDLE - handler.customHandles.length + 1;\n\t\t\t\t\t    \t\t\t\t\thandler.start(me.getGraphX(), me.getGraphY(), handle);\n\t\t\t\t\t    \t\t\t\t\tme.consume();\n\t\t\t\t\t\t    \t\t\t}\n\t\t    \t\t\t\t\t\t}\n\t\t\t\t\t    \t\t}\n\t\t\t\t\t    \t\t\n\t\t\t\t\t    \t\tcurrent = this.view.getState(this.model.getParent(current.cell));\n\t\t\t\t    \t\t}\n\t\t    \t\t\t}\n\t\t    \t\t}\n\t\t    \t}\n\t\t\t}\n\t\t}));\n\t\t\n\t\t// Uses this event to process mouseDown to check the selection state before it is changed\n\t\tthis.addListener(mxEvent.CONSUME_MOUSE_EVENT, mxUtils.bind(this, function(sender, evt)\n\t\t{\n\t\t\tif (evt.getProperty('eventName') == 'mouseDown' && this.isEnabled())\n\t\t\t{\n\t\t\t\tvar me = evt.getProperty('event');\n\t\t\t\tvar state = me.getState();\n\t\t\t\t\n\t\t\t\tif (!mxEvent.isAltDown(me.getEvent()) && !mxEvent.isControlDown(evt) &&\n\t\t\t\t\t!mxEvent.isShiftDown(evt) && !initialSelected &&\n\t\t\t\t\tstate != null && this.model.isEdge(state.cell))\n\t\t\t\t{\n\t\t\t\t\tstart.point = new mxPoint(me.getGraphX(), me.getGraphY());\n\t\t\t\t\tstart.selected = this.isCellSelected(state.cell);\n\t\t\t\t\tstart.state = state;\n\t\t\t\t\tstart.event = me;\n\t\t\t\t\t\n\t\t\t\t\tif (state.text != null && state.text.boundingBox != null &&\n\t\t\t\t\t\tmxUtils.contains(state.text.boundingBox, me.getGraphX(), me.getGraphY()))\n\t\t\t\t\t{\n\t\t\t\t\t\tstart.handle = mxEvent.LABEL_HANDLE;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tvar handler = this.selectionCellsHandler.getHandler(state.cell);\n\n\t\t\t\t\t\tif (handler != null && handler.bends != null && handler.bends.length > 0)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tstart.handle = handler.getHandleForEvent(me);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}));\n\n\t\tthis.addMouseListener(\n\t\t{\n\t\t\tmouseDown: function(sender, me) {},\n\t\t    mouseMove: mxUtils.bind(this, function(sender, me)\n\t\t    {\n\t\t    \t// Checks if any other handler is active\n\t\t    \tvar handlerMap = this.selectionCellsHandler.handlers.map;\n\t\t    \t\n\t\t    \tfor (var key in handlerMap)\n\t\t    \t{\n\t\t    \t\tif (handlerMap[key].index != null)\n\t\t    \t\t{\n\t\t    \t\t\treturn;\n\t\t    \t\t}\n\t\t    \t}\n\t\t    \t\n\t\t    \tif (this.isEnabled() && !this.panningHandler.isActive() && !mxEvent.isAltDown(me.getEvent()))\n\t\t    \t{\n\t\t    \t\tvar tol = this.tolerance;\n\t\n\t\t\t    \tif (start.point != null && start.state != null && start.event != null)\n\t\t\t    \t{\n\t\t\t    \t\tvar state = start.state;\n\t\t\t    \t\t\n\t\t\t    \t\tif (start.handle != null || Math.abs(start.point.x - me.getGraphX()) > tol ||\n\t\t\t    \t\t\tMath.abs(start.point.y - me.getGraphY()) > tol)\n\t\t\t    \t\t{\n\t\t\t    \t\t\tvar handler = null;\n\n\t\t\t\t\t\t\tif (!mxEvent.isControlDown(me.getEvent()) &&\n\t\t\t\t\t\t\t\t!mxEvent.isShiftDown(me.getEvent()))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\thandler = this.selectionCellsHandler.getHandler(state.cell);\n\t\t\t\t\t\t\t}\n\t\t\t    \t\t\t\n\t\t\t    \t\t\tif (handler != null && handler.bends != null && handler.bends.length > 0)\n\t\t\t    \t\t\t{\n\t\t\t\t\t\t\t\thandler.redrawHandles();\n\t\t\t    \t\t\t\tvar handle = (start.handle != null) ? start.handle :\n\t\t\t\t\t\t\t\t\thandler.getHandleForEvent(start.event);\n\t\t\t    \t\t\t\tvar edgeStyle = this.view.getEdgeStyle(state);\n\t\t\t    \t\t\t\tvar entity = edgeStyle == mxEdgeStyle.EntityRelation;\n\n\t\t\t    \t\t\t\t// Handles special case where label was clicked on unselected edge in which\n\t\t\t    \t\t\t\t// case the label will be moved regardless of the handle that is returned\n\t\t\t    \t\t\t\tif (!start.selected && start.handle == mxEvent.LABEL_HANDLE)\n\t\t\t    \t\t\t\t{\n\t\t\t    \t\t\t\t\thandle = start.handle;\n\t\t\t    \t\t\t\t}\n\t\t\t    \t\t\t\t\n\t    \t\t\t\t\t\tif (!entity || handle == 0 || handle == handler.bends.length - 1 || handle == mxEvent.LABEL_HANDLE)\n\t    \t\t\t\t\t\t{\n\t\t\t\t    \t\t\t\t// Source or target handle or connected for direct handle access or orthogonal line\n\t\t\t\t    \t\t\t\t// with just two points where the central handle is moved regardless of mouse position\n\t\t\t\t    \t\t\t\tif (handle == mxEvent.LABEL_HANDLE || handle == 0 || state.visibleSourceState != null ||\n\t\t\t\t    \t\t\t\t\thandle == handler.bends.length - 1 || state.visibleTargetState != null)\n\t\t\t\t    \t\t\t\t{\n\t\t\t\t    \t\t\t\t\tif (!entity && handle != mxEvent.LABEL_HANDLE)\n\t\t\t\t    \t\t\t\t\t{\n\t\t\t\t\t    \t\t\t\t\tvar pts = state.absolutePoints;\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t    \t\t\t\t\t// Default case where handles are at corner points handles\n\t\t\t\t\t    \t\t\t\t\t// drag of corner as drag of existing point\n\t\t\t\t\t    \t\t\t\t\tif (pts != null && ((edgeStyle == null && handle == null) ||\n\t\t\t\t\t    \t\t\t\t\t\tedgeStyle == mxEdgeStyle.SegmentConnector ||\n\t\t\t\t\t    \t\t\t\t\t\tedgeStyle == mxEdgeStyle.OrthConnector))\n\t\t\t\t\t    \t\t\t\t\t{\n\t\t\t\t\t    \t\t\t\t\t\t// Does not use handles if they were not initially visible\n\t\t\t\t\t    \t\t\t\t\t\thandle = start.handle;\n\n\t\t\t\t\t    \t\t\t\t\t\tif (handle == null)\n\t\t\t\t\t    \t\t\t\t\t\t{\n\t\t\t\t\t\t\t    \t\t\t\t\tvar box = new mxRectangle(start.point.x, start.point.y);\n\t\t\t\t\t\t\t    \t\t\t\t\tbox.grow(mxEdgeHandler.prototype.handleImage.width / 2);\n\t\t\t\t\t\t\t    \t\t\t\t\t\n\t\t\t\t\t    \t\t\t\t\t\t\tif (mxUtils.contains(box, pts[0].x, pts[0].y))\n\t\t\t\t\t    \t\t\t\t\t\t\t{\n\t\t\t\t\t\t    \t\t\t\t\t\t\t// Moves source terminal handle\n\t\t\t\t\t    \t\t\t\t\t\t\t\thandle = 0;\n\t\t\t\t\t    \t\t\t\t\t\t\t}\n\t\t\t\t\t    \t\t\t\t\t\t\telse if (mxUtils.contains(box, pts[pts.length - 1].x, pts[pts.length - 1].y))\n\t\t\t\t\t    \t\t\t\t\t\t\t{\n\t\t\t\t\t    \t\t\t\t\t\t\t\t// Moves target terminal handle\n\t\t\t\t\t    \t\t\t\t\t\t\t\thandle = handler.bends.length - 1;\n\t\t\t\t\t    \t\t\t\t\t\t\t}\n\t\t\t\t\t    \t\t\t\t\t\t\telse\n\t\t\t\t\t    \t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t    \t\t\t\t\t\t// Checks if edge has no bends\n\t\t\t\t\t\t\t    \t\t\t\t\t\tvar nobends = edgeStyle != null && (pts.length == 2 || (pts.length == 3 &&\n\t\t\t\t\t\t    \t\t\t\t\t\t\t\t((Math.round(pts[0].x - pts[1].x) == 0 && Math.round(pts[1].x - pts[2].x) == 0) ||\n\t\t\t\t\t\t    \t\t\t\t\t\t\t\t(Math.round(pts[0].y - pts[1].y) == 0 && Math.round(pts[1].y - pts[2].y) == 0))));\n\t\t\t\t\t\t\t    \t\t\t\t\t\t\n\t\t\t\t\t\t    \t\t\t\t\t\t\tif (nobends)\n\t\t\t\t\t\t\t\t    \t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t    \t\t\t\t\t// Moves central handle for straight orthogonal edges\n\t\t\t\t\t\t\t\t    \t\t\t\t\t\thandle = 2;\n\t\t\t\t\t\t\t\t    \t\t\t\t\t}\n\t\t\t\t\t\t\t\t    \t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t    \t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t    \t\t\t\t// Finds and moves vertical or horizontal segment\n\t\t\t\t\t\t\t\t\t    \t\t\t\t\thandle = mxUtils.findNearestSegment(state, start.point.x, start.point.y);\n\t\t\t\t\t\t\t\t\t    \t\t\t\t\t\n\t\t\t\t\t\t\t\t\t    \t\t\t\t\t// Converts segment to virtual handle index\n\t\t\t\t\t\t\t\t\t    \t\t\t\t\tif (edgeStyle == null)\n\t\t\t\t\t\t\t\t\t    \t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t    \t\t\t\t\t\thandle = mxEvent.VIRTUAL_HANDLE - handle;\n\t\t\t\t\t\t\t\t\t    \t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t    \t\t\t\t\t// Maps segment to handle\n\t\t\t\t\t\t\t\t\t    \t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t    \t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t    \t\t\t\t\t\thandle += 1;\n\t\t\t\t\t\t\t\t\t    \t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t    \t\t\t\t}\n\t\t\t\t\t    \t\t\t\t\t\t\t}\n\t\t\t\t\t    \t\t\t\t\t\t}\n\t\t\t\t\t    \t\t\t\t\t}\n\t\t\t\t\t\t\t    \t\t\t\n\t\t\t\t\t\t    \t\t\t\t// Creates a new waypoint and starts moving it\n\t\t\t\t\t\t    \t\t\t\tif (handle == null)\n\t\t\t\t\t\t    \t\t\t\t{\n\t\t\t\t\t\t    \t\t\t\t\thandle = mxEvent.VIRTUAL_HANDLE;\n\t\t\t\t\t\t    \t\t\t\t}\n\t\t\t\t    \t\t\t\t\t}\n\t\t\t\t    \t\t\t\t\t\n\t\t\t\t    \t\t\t\t\thandler.start(me.getGraphX(), me.getGraphX(), handle);\n\t\t\t\t    \t\t\t\t\tme.consume();\n\t\n\t\t\t\t    \t\t\t\t\t// Removes preview rectangle in graph handler\n\t\t\t\t    \t\t\t\t\tthis.graphHandler.reset();\n\t\t\t\t    \t\t\t\t}\n\t    \t\t\t\t\t\t}\n\t    \t\t\t\t\t\telse if (entity && (state.visibleSourceState != null || state.visibleTargetState != null))\n\t    \t\t\t\t\t\t{\n\t    \t\t\t\t\t\t\t// Disables moves on entity to make it consistent\n\t\t\t    \t\t\t\t\tthis.graphHandler.reset();\n\t    \t\t\t\t\t\t\tme.consume();\n\t    \t\t\t\t\t\t}\n\t\t\t    \t\t\t}\n\t\t\t    \t\t\t\n\t\t\t    \t\t\tif (handler != null)\n\t\t\t    \t\t\t{\n\t\t\t\t    \t\t\t// Lazy selection for edges inside groups\n\t\t\t    \t\t\t\tif (this.selectionCellsHandler.isHandlerActive(handler))\n\t\t\t    \t\t\t\t{\n\t\t\t\t\t    \t\t\tif (!this.isCellSelected(state.cell))\n\t\t\t\t\t    \t\t\t{\n\t\t\t\t\t    \t\t\t\tthis.selectionCellsHandler.handlers.put(state.cell, handler);\n\t\t\t\t\t    \t\t\t\tthis.selectCellForEvent(state.cell, me.getEvent());\n\t\t\t\t\t    \t\t\t}\n\t\t\t    \t\t\t\t}\n\t\t\t\t    \t\t\telse if (!this.isCellSelected(state.cell))\n\t\t\t\t    \t\t\t{\n\t\t\t\t    \t\t\t\t// Destroy temporary handler\n\t\t\t\t    \t\t\t\thandler.destroy();\n\t\t\t\t    \t\t\t}\n\t\t\t    \t\t\t}\n\t\t\t    \n\t\t\t    \t\t\t// Reset start state\n\t\t    \t\t\t\tstart.selected = false;\n\t\t    \t\t\t\tstart.handle = null;\n\t    \t\t\t\t\tstart.state = null;\n\t\t    \t\t\t\tstart.event = null;\n\t\t    \t\t\t\tstart.point = null;\n\t\t\t    \t\t}\n\t\t\t    \t}\n\t\t\t    \telse\n\t\t\t    \t{\n\t\t\t    \t\t// Updates cursor for unselected edges under the mouse\n\t\t\t\t    \tvar state = me.getState();\n\t\t\t\t\t\t\n\t\t\t\t    \tif (state != null && this.isCellEditable(state.cell))\n\t\t\t\t    \t{\n\t\t\t\t    \t\tvar cursor = null;\n\t\t\t\t    \t\t\n\t\t\t\t    \t\t// Checks if state was removed in call to stopEditing above\n\t\t\t\t    \t\tif (this.model.isEdge(state.cell) &&\n\t\t\t\t\t\t\t\t!this.isCellSelected(state.cell) &&\n\t\t\t\t\t\t\t\t!mxEvent.isAltDown(me.getEvent()) &&\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t!mxEvent.isControlDown(me.getEvent()) &&\n\t\t\t\t\t\t\t\t!mxEvent.isShiftDown(me.getEvent()))\n\t\t\t\t    \t\t{\n\t\t\t\t    \t\t\tvar box = new mxRectangle(me.getGraphX(), me.getGraphY());\n\t\t    \t\t\t\t\tbox.grow(mxEdgeHandler.prototype.handleImage.width / 2);\n\t\t\t    \t\t\t\tvar pts = state.absolutePoints;\n\t\t\t    \t\t\t\t\n\t\t\t    \t\t\t\tif (pts != null)\n\t\t\t    \t\t\t\t{\n\t\t\t    \t\t\t\t\tif (state.text != null && state.text.boundingBox != null &&\n\t\t\t    \t\t\t\t\t\tmxUtils.contains(state.text.boundingBox, me.getGraphX(), me.getGraphY()))\n\t\t\t    \t\t\t\t\t{\n\t\t\t    \t\t\t\t\t\tcursor = 'move';\n\t\t\t    \t\t\t\t\t}\n\t\t\t    \t\t\t\t\telse if (mxUtils.contains(box, pts[0].x, pts[0].y) ||\n\t\t\t    \t\t\t\t\t\tmxUtils.contains(box, pts[pts.length - 1].x, pts[pts.length - 1].y))\n\t\t\t    \t\t\t\t\t{\n\t\t\t    \t\t\t\t\t\tcursor = 'pointer';\n\t\t\t    \t\t\t\t\t}\n\t\t\t    \t\t\t\t\telse if (state.visibleSourceState != null || state.visibleTargetState != null)\n\t\t\t    \t\t\t\t\t{\n\t\t    \t\t\t\t\t\t\t// Moving is not allowed for entity relation but still indicate hover state\n\t\t\t    \t\t\t\t\t\tvar tmp = this.view.getEdgeStyle(state);\n\t\t\t    \t\t\t\t\t\tcursor = 'crosshair';\n\t\t\t    \t\t\t\t\t\t\n\t\t\t    \t\t\t\t\t\tif (tmp != mxEdgeStyle.EntityRelation && this.isOrthogonal(state))\n\t\t\t\t\t\t    \t\t\t{\n\t\t\t\t\t\t    \t\t\t\tvar idx = mxUtils.findNearestSegment(state, me.getGraphX(), me.getGraphY());\n\t\t\t\t\t\t    \t\t\t\t\n\t\t\t\t\t\t    \t\t\t\tif (idx < pts.length - 1 && idx >= 0)\n\t\t\t\t\t\t    \t\t\t\t{\n\t\t\t\t\t    \t\t\t\t\t\tcursor = (Math.round(pts[idx].x - pts[idx + 1].x) == 0) ?\n\t\t\t\t\t    \t\t\t\t\t\t\t'col-resize' : 'row-resize';\n\t\t\t\t\t\t    \t\t\t\t}\n\t\t\t\t\t\t    \t\t\t}\n\t\t\t    \t\t\t\t\t}\n\t\t\t    \t\t\t\t}\n\t\t\t\t    \t\t}\n\t\t\t\t    \t\telse if (!mxEvent.isControlDown(me.getEvent()))\n\t\t\t\t    \t\t{\n\t\t\t\t\t\t\t\tvar tol = mxShape.prototype.svgStrokeTolerance / 2;\n\t\t\t\t    \t\t\tvar box = new mxRectangle(me.getGraphX(), me.getGraphY());\n\t\t\t    \t\t\t\tbox.grow(tol);\n\t\n\t\t\t\t\t    \t\tif (this.isTableCell(state.cell) && this.isCellMovable(state.cell))\n\t\t\t\t\t    \t\t{\n\t\t\t\t    \t\t\t\tvar row = this.model.getParent(state.cell);\n\t\t\t    \t\t\t\t\tvar table = this.model.getParent(row);\n\t\t\t    \t\t\t\t\t\n\t\t\t    \t\t\t\t\tif (!this.isCellSelected(table))\n\t\t\t    \t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tif ((mxUtils.intersects(box, new mxRectangle(state.x, state.y - 2, state.width, 4)) &&\n\t\t\t\t\t\t\t\t\t\t\tthis.model.getChildAt(table, 0) != row) || mxUtils.intersects(box,\n\t\t\t\t\t\t\t\t\t\t\tnew mxRectangle(state.x, state.y + state.height - 2, state.width, 4)))\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\tcursor ='row-resize';\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t    \t\t\t\t\telse if ((mxUtils.intersects(box, new mxRectangle(state.x - 2, state.y, 4, state.height)) &&\n\t\t\t\t\t\t    \t\t\t\tthis.model.getChildAt(row, 0) != state.cell) || mxUtils.intersects(box,\n\t\t\t\t\t\t    \t\t\t\tnew mxRectangle(state.x + state.width - 2, state.y, 4, state.height)))\n\t\t\t\t    \t\t\t\t\t{\n\t\t\t\t\t\t    \t\t\t\tcursor ='col-resize';\n\t\t\t\t    \t\t\t\t\t}\n\t\t\t    \t\t\t\t\t}\n\t\t\t\t\t    \t\t}\n\t\t\t\t\t    \t\t\n\t\t\t\t\t    \t\t// Hover for swimlane start sizes inside tables\n\t\t\t\t\t    \t\tvar current = state;\n\t\t\t\t\t    \t\t\n\t\t\t\t\t    \t\twhile (cursor == null && current != null && (this.isTableCell(current.cell) ||\n\t\t\t\t\t    \t\t\tthis.isTableRow(current.cell) || this.isTable(current.cell)))\n\t\t\t\t\t    \t\t{\n\t\t\t\t\t\t    \t\tif (this.isSwimlane(current.cell) && this.isCellMovable(current.cell))\n\t\t\t\t\t\t    \t\t{\n\t\t\t\t\t\t    \t\t\tvar offset = this.getActualStartSize(current.cell);\n\t\t\t\t\t\t    \t\t\tvar s = this.view.scale;\n\t\t\t\t\t\t    \t\t\t\n\t\t\t    \t\t\t\t\t\tif ((offset.x > 0 || offset.width > 0) && mxUtils.intersects(box, new mxRectangle(\n\t\t\t    \t\t\t\t\t\t\tcurrent.x + (offset.x - offset.width - 1) * s + ((offset.x == 0) ? current.width * s : 0),\n\t\t\t    \t\t\t\t\t\t\tcurrent.y, 1, current.height)))\n\t\t\t    \t\t\t\t\t\t{\n\t\t\t\t    \t\t\t\t\t\tcursor ='col-resize';\n\t\t\t    \t\t\t\t\t\t}\n\t\t\t    \t\t\t\t\t\telse if ((offset.y > 0 || offset.height > 0) && mxUtils.intersects(box, new mxRectangle(\n\t\t\t    \t\t\t\t\t\t\tcurrent.x, current.y + (offset.y - offset.height - 1) * s + ((offset.y == 0) ? current.height : 0),\n\t\t\t    \t\t\t\t\t\t\tcurrent.width, 1)))\n\t\t\t    \t\t\t\t\t\t{\n\t\t\t\t    \t\t\t\t\t\tcursor ='row-resize';\n\t\t\t    \t\t\t\t\t\t}\n\t\t\t\t\t\t    \t\t}\n\t\t\t\t\t\t    \t\t\n\t\t\t\t\t\t    \t\tcurrent = this.view.getState(this.model.getParent(current.cell));\n\t\t\t\t\t    \t\t}\n\t\t\t\t    \t\t}\n\t\t\t\t    \t\t\n\t\t    \t\t\t\tif (cursor != null)\n\t\t    \t\t\t\t{\n\t\t    \t\t\t\t\tstate.setCursor(cursor);\n\t\t    \t\t\t\t}\n\t\t\t\t    \t}\n\t\t\t    \t}\n\t\t    \t}\n\t\t    }),\n\t\t    mouseUp: mxUtils.bind(this, function(sender, me)\n\t\t    {\n\t\t\t\tstart.state = null;\n\t\t\t\tstart.event = null;\n\t\t\t\tstart.point = null;\n\t\t\t\tstart.handle = null;\n\t\t    })\n\t\t});\n\t}\n\t\n\tthis.cellRenderer.minSvgStrokeWidth = 0.1;\n\t\n\t// HTML entities are displayed as plain text in wrapped plain text labels\n\tthis.cellRenderer.getLabelValue = function(state)\n\t{\n\t\tvar result = mxCellRenderer.prototype.getLabelValue.apply(this, arguments);\n\t\t\n\t\tif (state.view.graph.isHtmlLabel(state.cell))\n\t\t{\n\t\t\tif (state.style['html'] != 1)\n\t\t\t{\n\t\t\t\tresult = mxUtils.htmlEntities(result, false);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// Skips sanitizeHtml for unchanged labels\n\t\t\t\tif (state.lastLabelValue != result)\n\t\t\t\t{\n\t\t\t\t\tstate.lastLabelValue = result;\n\t\t\t\t\tstate.lastSanitizedLabelValue = Graph.sanitizeHtml(result);\n\t\t\t\t}\n\n\t\t\t\tresult = state.lastSanitizedLabelValue;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn result;\n\t};\n\n\t// All code below not available and not needed in embed mode\n\tif (typeof mxVertexHandler !== 'undefined')\n\t{\n\t\tthis.setConnectable(true);\n\t\tthis.setDropEnabled(true);\n\t\tthis.setPanning(true);\n\t\tthis.setTooltips(true);\n\t\tthis.setAllowLoops(true);\n\t\tthis.allowAutoPanning = true;\n\t\tthis.resetEdgesOnConnect = false;\n\t\tthis.constrainChildren = false;\n\t\tthis.constrainRelativeChildren = true;\n\t\t\n\t\t// Do not scroll after moving cells\n\t\tthis.graphHandler.scrollOnMove = false;\n\t\tthis.graphHandler.scaleGrid = true;\n\n\t\t// Disables cloning of connection sources by default\n\t\tthis.connectionHandler.setCreateTarget(false);\n\t\tthis.connectionHandler.insertBeforeSource = true;\n\t\t\n\t\t// Disables built-in connection starts\n\t\tthis.connectionHandler.isValidSource = function(cell, me)\n\t\t{\n\t\t\treturn false;\n\t\t};\n\n\t\t// Sets the style to be used when an elbow edge is double clicked\n\t\tthis.alternateEdgeStyle = 'vertical';\n\n\t\tif (stylesheet == null)\n\t\t{\n\t\t\tthis.loadStylesheet();\n\t\t}\n\n\t\t// Adds page centers to the guides for moving cells\n\t\tvar graphHandlerGetGuideStates = this.graphHandler.getGuideStates;\n\t\tthis.graphHandler.getGuideStates = function()\n\t\t{\n\t\t\tvar result = graphHandlerGetGuideStates.apply(this, arguments);\n\t\t\t\n\t\t\t// Create virtual cell state for page centers\n\t\t\tif (this.graph.pageVisible)\n\t\t\t{\n\t\t\t\tvar guides = [];\n\t\t\t\t\n\t\t\t\tvar pf = this.graph.pageFormat;\n\t\t\t\tvar ps = this.graph.pageScale;\n\t\t\t\tvar pw = pf.width * ps;\n\t\t\t\tvar ph = pf.height * ps;\n\t\t\t\tvar t = this.graph.view.translate;\n\t\t\t\tvar s = this.graph.view.scale;\n\n\t\t\t\tvar layout = this.graph.getPageLayout();\n\t\t\t\t\n\t\t\t\tfor (var i = 0; i < layout.width; i++)\n\t\t\t\t{\n\t\t\t\t\tguides.push(new mxRectangle(((layout.x + i) * pw + t.x) * s,\n\t\t\t\t\t\t(layout.y * ph + t.y) * s, pw * s, ph * s));\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tfor (var j = 1; j < layout.height; j++)\n\t\t\t\t{\n\t\t\t\t\tguides.push(new mxRectangle((layout.x * pw + t.x) * s,\n\t\t\t\t\t\t((layout.y + j) * ph + t.y) * s, pw * s, ph * s));\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// Page center guides have precedence over normal guides\n\t\t\t\tresult = guides.concat(result);\n\t\t\t}\n\t\t\t\n\t\t\treturn result;\n\t\t};\n\n\t\t// Overrides zIndex for dragElement\n\t\tmxDragSource.prototype.dragElementZIndex = mxPopupMenu.prototype.zIndex;\n\t\t\n\t\t// Overrides color for virtual guides for page centers\n\t\tmxGuide.prototype.getGuideColor = function(state, horizontal)\n\t\t{\n\t\t\treturn (state.cell == null) ? '#ffa500' /* orange */ : mxConstants.GUIDE_COLOR;\n\t\t};\n\n\t\t// Changes color of move preview for black backgrounds\n\t\tthis.graphHandler.createPreviewShape = function(bounds)\n\t\t{\n\t\t\tthis.previewColor = (this.graph.background == '#000000') ? '#ffffff' : mxGraphHandler.prototype.previewColor;\n\t\t\t\n\t\t\treturn mxGraphHandler.prototype.createPreviewShape.apply(this, arguments);\n\t\t};\n\n\t\t// Handles parts of cells by checking if part=1 is in the style and returning the parent\n\t\t// if the parent is not already in the list of cells. container style is used to disable\n\t\t// step into swimlanes and dropTarget style is used to disable acting as a drop target.\n\t\t// LATER: Handle recursive parts\n\t\tvar graphHandlerGetCells = this.graphHandler.getCells;\n\t\t\n\t\tthis.graphHandler.getCells = function(initialCell)\n\t\t{\n\t\t    var cells = graphHandlerGetCells.apply(this, arguments);\n\t\t    var lookup = new mxDictionary();\n\t\t    var newCells = [];\n\n\t\t    for (var i = 0; i < cells.length; i++)\n\t\t    {\n\t\t    \t// Propagates to composite parents or moves selected table rows\n\t\t    \tvar cell = (this.graph.isTableCell(initialCell) &&\n\t\t    \t\tthis.graph.isTableCell(cells[i]) &&\n\t\t    \t\tthis.graph.isCellSelected(cells[i])) ?\n\t\t    \t\tthis.graph.model.getParent(cells[i]) :\n\t\t    \t\t((this.graph.isTableRow(initialCell) &&\n\t\t    \t\tthis.graph.isTableRow(cells[i]) &&\n\t\t    \t\tthis.graph.isCellSelected(cells[i])) ?\n\t\t    \t\tcells[i] : this.graph.getCompositeParent(cells[i]));\n\n\t\t    \tif (cell != null && !lookup.get(cell))\n\t\t    \t{\n\t\t    \t\tlookup.put(cell, true);\n\t\t            newCells.push(cell);\n\t\t        }\n\t\t    }\n\n\t\t    return newCells;\n\t\t};\n\n\t\t// Handles parts and selected rows in tables of cells for drag and drop\n\t\tvar graphHandlerStart = this.graphHandler.start;\n\t\t\n\t\tthis.graphHandler.start = function(cell, x, y, cells)\n\t\t{\n\t\t\t// Propagates to selected table row to start move\n\t\t\tvar ignoreParent = false;\n\t\t\t\n\t\t    if (this.graph.isTableCell(cell))\n\t\t    {\n\t\t    \tif (!this.graph.isCellSelected(cell))\n\t\t    \t{\n\t\t    \t\tcell = this.graph.model.getParent(cell);\n\t\t    \t}\n\t\t    \telse\n\t\t    \t{\n\t\t    \t\tignoreParent = true;\n\t\t    \t}\n\t\t    }\n\t\t    \n\t\t    if (!ignoreParent && (!this.graph.isTableRow(cell) || !this.graph.isCellSelected(cell)))\n\t\t    {\n\t\t    \tcell = this.graph.getCompositeParent(cell);\n\t\t    }\n\t\t    \n\t\t\tgraphHandlerStart.apply(this, arguments);\n\t\t};\n\t\t\n\t\t// Handles parts of cells when cloning the source for new connections\n\t\tthis.connectionHandler.createTargetVertex = function(evt, source)\n\t\t{\n\t\t\tsource = this.graph.getCompositeParent(source);\n\t\t\t\n\t\t\treturn mxConnectionHandler.prototype.createTargetVertex.apply(this, arguments);\n\t\t};\n\n\t\t// Applies newEdgeStyle\n\t\tthis.connectionHandler.insertEdge = function(parent, id, value, source, target, style)\n\t\t{\n\t\t\tvar edge = mxConnectionHandler.prototype.insertEdge.apply(this, arguments);\n\n\t\t\tif (source != null)\n\t\t\t{\n\t\t\t\tthis.graph.applyNewEdgeStyle(source, [edge]);\n\t\t\t}\n\t\t\t\n\t\t\treturn edge\n\t\t};\n\n\t\t// Creates rubberband selection and associates with graph instance\n\t    var rubberband = new mxRubberband(this);\n\t    \n\t    this.getRubberband = function()\n\t    {\n\t    \treturn rubberband;\n\t    };\n\t    \n\t    // Timer-based activation of outline connect in connection handler\n\t    var startTime = new Date().getTime();\n\t    var timeOnTarget = 0;\n\t    \n\t    var connectionHandlerMouseMove = this.connectionHandler.mouseMove;\n\t    \n\t    this.connectionHandler.mouseMove = function()\n\t    {\n\t    \tvar prev = this.currentState;\n\t    \tconnectionHandlerMouseMove.apply(this, arguments);\n\t    \t\n\t    \tif (prev != this.currentState)\n\t    \t{\n\t    \t\tstartTime = new Date().getTime();\n\t    \t\ttimeOnTarget = 0;\n\t    \t}\n\t    \telse\n\t    \t{\n\t\t    \ttimeOnTarget = new Date().getTime() - startTime;\n\t    \t}\n\t    };\n\n\t    // Activates outline connect after 1500ms with touch event or if alt is pressed inside the shape\n\t    // outlineConnect=0 is a custom style that means do not connect to strokes inside the shape,\n\t    // or in other words, connect to the shape's perimeter if the highlight is under the mouse\n\t    // (the name is because the highlight, including all strokes, is called outline in the code)\n\t    var connectionHandleIsOutlineConnectEvent = this.connectionHandler.isOutlineConnectEvent;\n\t    \n\t    this.connectionHandler.isOutlineConnectEvent = function(me)\n\t    {\n\t\t\tif (mxEvent.isShiftDown(me.getEvent()) && mxEvent.isAltDown(me.getEvent()))\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t    \treturn (this.currentState != null && me.getState() == this.currentState && timeOnTarget > 2000) ||\n\t\t    \t\t((this.currentState == null || mxUtils.getValue(this.currentState.style, 'outlineConnect', '1') != '0') &&\n\t\t    \t\tconnectionHandleIsOutlineConnectEvent.apply(this, arguments));\n\t\t\t}\n\t    };\n\t    \n\t    // Adds shift+click to toggle selection state\n\t    var isToggleEvent = this.isToggleEvent;\n\t    this.isToggleEvent = function(evt)\n\t    {\n\t    \treturn isToggleEvent.apply(this, arguments) || (!mxClient.IS_CHROMEOS && mxEvent.isShiftDown(evt));\n\t    };\n\t    \n\t    // Workaround for Firefox where first mouse down is received\n\t    // after tap and hold if scrollbars are visible, which means\n\t    // start rubberband immediately if no cell is under mouse.\n\t    var isForceRubberBandEvent = rubberband.isForceRubberbandEvent;\n\t    rubberband.isForceRubberbandEvent = function(me)\n\t    {\n\t    \treturn isForceRubberBandEvent.apply(this, arguments) ||\n\t\t\t\t(mxClient.IS_CHROMEOS && mxEvent.isShiftDown(me.getEvent())) ||\n\t    \t\t(mxUtils.hasScrollbars(this.graph.container) && mxClient.IS_FF &&\n\t    \t\tmxClient.IS_WIN && me.getState() == null && mxEvent.isTouchEvent(me.getEvent()));\n\t    };\n\t    \n\t    // Shows hand cursor while panning\n\t    var prevCursor = null;\n\t    \n\t\tthis.panningHandler.addListener(mxEvent.PAN_START, mxUtils.bind(this, function()\n\t\t{\n\t\t\tif (this.isEnabled())\n\t\t\t{\n\t\t\t\tprevCursor = this.container.style.cursor;\n\t\t\t\tthis.container.style.cursor = 'move';\n\t\t\t}\n\t\t}));\n\t\t\t\n\t\tthis.panningHandler.addListener(mxEvent.PAN_END, mxUtils.bind(this, function()\n\t\t{\n\t\t\tif (this.isEnabled())\n\t\t\t{\n\t\t\t\tthis.container.style.cursor = prevCursor;\n\t\t\t}\n\t\t}));\n\n\t\tthis.popupMenuHandler.autoExpand = true;\n\t\t\n\t\tthis.popupMenuHandler.isSelectOnPopup = function(me)\n\t\t{\n\t\t\treturn mxEvent.isMouseEvent(me.getEvent());\n\t\t};\n\t\n\t\t// Handles links in read-only graphs\n\t\t// and cells in locked layers\n\t\tvar click = this.click;\n\t\tthis.click = function(me)\n\t\t{\n\t\t\tvar locked = me.state == null && me.sourceState != null &&\n\t\t\t\tthis.isCellLocked(this.getLayerForCell(\n\t\t\t\t\tme.sourceState.cell));\n\t\t\t\n\t\t\tif ((!this.isEnabled() || locked) && !me.isConsumed())\n\t\t\t{\n\t\t\t\tvar cell = (locked) ? me.sourceState.cell : me.getCell();\n\t\t\t\t\n\t\t\t\tif (cell != null)\n\t\t\t\t{\n\t\t\t\t\tvar link = this.getClickableLinkForCell(cell);\n\n\t\t\t\t\tif (link != null)\n\t\t\t\t\t{\n\t\t\t\t\t\tif (this.isCustomLink(link))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tthis.customLinkClicked(link);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tthis.openLink(link);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn click.apply(this, arguments);\n\t\t\t}\n\t\t};\n\n\t\t// Redirects tooltips for locked cells\n\t\tthis.tooltipHandler.getStateForEvent = function(me)\n\t\t{\n\t\t\treturn me.sourceState;\n\t\t};\n\t\t\n\t\t// Opens links in tooltips in new windows\n\t\tvar tooltipHandlerShow = this.tooltipHandler.show;\n\t\tthis.tooltipHandler.show = function()\n\t\t{\n\t\t\ttooltipHandlerShow.apply(this, arguments);\n\t\t\t\n\t\t\tif (this.div != null)\n\t\t\t{\n\t\t\t\tvar links = this.div.getElementsByTagName('a');\n\t\t\t\t\n\t\t\t\tfor (var i = 0; i < links.length; i++)\n\t\t\t\t{\n\t\t\t\t\tif (links[i].getAttribute('href') != null &&\n\t\t\t\t\t\tlinks[i].getAttribute('target') == null)\n\t\t\t\t\t{\n\t\t\t\t\t\tlinks[i].setAttribute('target', '_blank');\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\t\n\t\t// Redirects tooltips for locked cells\n\t\tthis.tooltipHandler.getStateForEvent = function(me)\n\t\t{\n\t\t\treturn me.sourceState;\n\t\t};\n\t\t\n\t\t// Redirects cursor for locked cells\n\t\tvar getCursorForMouseEvent = this.getCursorForMouseEvent; \n\t\tthis.getCursorForMouseEvent = function(me)\n\t\t{\n\t\t\tvar locked = me.state == null && me.sourceState != null && this.isCellLocked(me.sourceState.cell);\n\t\t\t\n\t\t\treturn this.getCursorForCell((locked) ? me.sourceState.cell : me.getCell());\n\t\t};\n\t\t\n\t\t// Shows pointer cursor for clickable cells with links\n\t\t// ie. if the graph is disabled and cells cannot be selected\n\t\tvar getCursorForCell = this.getCursorForCell;\n\t\tthis.getCursorForCell = function(cell)\n\t\t{\n\t\t\tif (!this.isEnabled() || this.isCellLocked(cell))\n\t\t\t{\n\t\t\t\tvar link = this.getClickableLinkForCell(cell);\n\t\t\t\t\n\t\t\t\tif (link != null)\n\t\t\t\t{\n\t\t\t\t\treturn 'pointer';\n\t\t\t\t}\n\t\t\t\telse if (this.isCellLocked(cell))\n\t\t\t\t{\n\t\t\t\t\treturn 'default';\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn getCursorForCell.apply(this, arguments);\n\t\t};\n\t\t\n\t\t// Changes rubberband selection ignore locked cells\n\t\tthis.selectRegion = function(rect, evt)\n\t\t{\n\t\t\tvar isect = (mxEvent.isAltDown(evt)) ? rect : null;\n\t\t\tvar cells = this.getCells(rect.x, rect.y,\n\t\t\t\trect.width, rect.height, null, null,\n\t\t\t\tisect, null, true);\n\n\t\t\tif (this.isToggleEvent(evt))\n\t\t\t{\n\t\t\t\tfor (var i = 0; i < cells.length; i++)\n\t\t\t\t{\n\t\t\t\t\tthis.selectCellForEvent(cells[i], evt);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tthis.selectCellsForEvent(cells, evt);\n\t\t\t}\n\t\t\t\n\t\t\treturn cells;\n\t\t};\n\n\t\t// Never removes cells from parents that are being moved\n\t\tvar graphHandlerShouldRemoveCellsFromParent = this.graphHandler.shouldRemoveCellsFromParent;\n\t\tthis.graphHandler.shouldRemoveCellsFromParent = function(parent, cells, evt)\n\t\t{\n\t\t\tif (this.graph.isCellSelected(parent))\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t\n\t\t\treturn graphHandlerShouldRemoveCellsFromParent.apply(this, arguments);\n\t\t};\n\n\t\t// Enables rubberband selection on cells in locked layers\n\t\tvar graphUpdateMouseEvent = this.updateMouseEvent;\n\t\tthis.updateMouseEvent = function(me)\n\t\t{\n\t\t\tme = graphUpdateMouseEvent.apply(this, arguments);\n\n\t\t\tif (me.state != null && this.isCellLocked(this.getLayerForCell(me.getCell())))\n\t\t\t{\n\t\t\t\tme.state = null;\n\t\t\t}\n\n\t\t\treturn me;\n\t\t};\n\n\t\t// Cells in locked layers are not selectable\n\t\tvar graphIsCellSelectable = this.isCellSelectable;\n\t\tthis.isCellSelectable = function(cell)\n\t\t{\n\t\t\treturn graphIsCellSelectable.apply(this, arguments) &&\n\t\t\t\t!this.isCellLocked(this.getLayerForCell(cell));\n\t\t};\n\n\t\t// Returns true if the given cell is locked\n\t\tthis.isCellLocked = function(cell)\n\t\t{\n\t\t\twhile (cell != null)\n\t\t\t{\n\t\t\t\tif (mxUtils.getValue(this.getCurrentCellStyle(cell), 'locked', '0') == '1')\n\t\t\t\t{\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tcell = this.model.getParent(cell);\n\t\t\t}\n\t\t\t\n\t\t\treturn false;\n\t\t};\n\t\t\n\t\tvar tapAndHoldSelection = null;\n\t\t\n\t\t// Uses this event to process mouseDown to check the selection state before it is changed\n\t\tthis.addListener(mxEvent.FIRE_MOUSE_EVENT, mxUtils.bind(this, function(sender, evt)\n\t\t{\n\t\t\tif (evt.getProperty('eventName') == 'mouseDown')\n\t\t\t{\n\t\t\t\tvar me = evt.getProperty('event');\n\t\t\t\tvar state = me.getState();\n\t\t\t\t\n\t\t\t\tif (state != null && !this.isSelectionEmpty() && !this.isCellSelected(state.cell))\n\t\t\t\t{\n\t\t\t\t\ttapAndHoldSelection = this.getSelectionCells();\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\ttapAndHoldSelection = null;\n\t\t\t\t}\n\t\t\t}\n\t\t}));\n\t\t\n\t\t// Tap and hold on background starts rubberband for multiple selected\n\t\t// cells the cell associated with the event is deselected\n\t\tthis.addListener(mxEvent.TAP_AND_HOLD, mxUtils.bind(this, function(sender, evt)\n\t\t{\n\t\t\tif (!mxEvent.isMultiTouchEvent(evt))\n\t\t\t{\n\t\t\t\tvar me = evt.getProperty('event');\n\t\t\t\tvar cell = evt.getProperty('cell');\n\t\t\t\t\n\t\t\t\tif (cell == null)\n\t\t\t\t{\n\t\t\t\t\tvar pt = mxUtils.convertPoint(this.container,\n\t\t\t\t\t\t\tmxEvent.getClientX(me), mxEvent.getClientY(me));\n\t\t\t\t\trubberband.start(pt.x, pt.y);\n\t\t\t\t}\n\t\t\t\telse if (tapAndHoldSelection != null)\n\t\t\t\t{\n\t\t\t\t\tthis.addSelectionCells(tapAndHoldSelection);\n\t\t\t\t}\n\t\t\t\telse if (this.getSelectionCount() > 1 && this.isCellSelected(cell))\n\t\t\t\t{\n\t\t\t\t\tthis.removeSelectionCell(cell);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// Blocks further processing of the event\n\t\t\t\ttapAndHoldSelection = null;\n\t\t\t\tevt.consume();\n\t\t\t}\n\t\t}));\n\t\n\t\t// On connect the target is selected and we clone the cell of the preview edge for insert\n\t\tthis.connectionHandler.selectCells = function(edge, target)\n\t\t{\n\t\t\tthis.graph.setSelectionCell(target || edge);\n\t\t};\n\t\t\n\t\t// Shows connection points only if cell not selected and parent table not handled\n\t\tthis.connectionHandler.constraintHandler.isStateIgnored = function(state, source)\n\t\t{\n\t\t\tvar graph = state.view.graph;\n\n\t\t\treturn source && (graph.isCellSelected(state.cell) || (graph.isTableRow(state.cell) &&\n\t\t\t\tgraph.selectionCellsHandler.isHandled(graph.model.getParent(state.cell))));\n\t\t};\n\t\t\n\t\t// Updates constraint handler if the selection changes\n\t\tthis.selectionModel.addListener(mxEvent.CHANGE, mxUtils.bind(this, function()\n\t\t{\n\t\t\tvar ch = this.connectionHandler.constraintHandler;\n\t\t\t\n\t\t\tif (ch.currentFocus != null && ch.isStateIgnored(ch.currentFocus, true))\n\t\t\t{\n\t\t\t\tch.currentFocus = null;\n\t\t\t\tch.constraints = null;\n\t\t\t\tch.destroyIcons();\n\t\t\t}\n\t\t\t\n\t\t\tch.destroyFocusHighlight();\n\t\t}));\n\t\t\n\t\t// Initializes touch interface\n\t\tif (Graph.touchStyle)\n\t\t{\n\t\t\tthis.initTouch();\n\t\t}\n\t}\n\t\n\t//Create a unique offset object for each graph instance.\n\tthis.currentTranslate = new mxPoint(0, 0);\n};\n\n/**\n * Specifies if the touch UI should be used (cannot detect touch in FF so always on for Windows/Linux)\n */\nGraph.touchStyle = mxClient.IS_TOUCH || (mxClient.IS_FF && mxClient.IS_WIN) || navigator.maxTouchPoints > 0 ||\n\tnavigator.msMaxTouchPoints > 0 || window.urlParams == null || urlParams['touch'] == '1';\n\n/**\n * Shortcut for capability check.\n */\nGraph.fileSupport = window.File != null && window.FileReader != null && window.FileList != null &&\n\t(window.urlParams == null || urlParams['filesupport'] != '0');\n\n/**\n * Shortcut for capability check.\n */\nGraph.translateDiagram = urlParams['translate-diagram'] == '1';\n\n/**\n * Shortcut for capability check.\n */\nGraph.diagramLanguage = (urlParams['diagram-language'] != null) ? urlParams['diagram-language'] : mxClient.language;\n\n/**\n * Default size for line jumps.\n */\nGraph.lineJumpsEnabled = true;\n\n/**\n * Default size for line jumps.\n */\nGraph.defaultJumpSize = 6;\n\n/**\n * Specifies if the mouse wheel is used for zoom without any modifiers.\n */\nGraph.zoomWheel = false;\n\n/**\n * Minimum width for table columns.\n */\nGraph.minTableColumnWidth = 20;\n\n/**\n * Minimum height for table rows.\n */\nGraph.minTableRowHeight = 20;\n\n/**\n * Text for foreign object warning.\n */\nGraph.foreignObjectWarningText = 'Text is not SVG - cannot display';\n\n/**\n * Link for foreign object warning.\n */\nGraph.foreignObjectWarningLink = 'https://www.drawio.com/doc/faq/svg-export-text-problems';\n\n/**\n * \n */\nGraph.xmlDeclaration = '<?xml version=\"1.0\" encoding=\"UTF-8\"?>';\n\n/**\n * \n */\nGraph.svgDoctype = '<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\" ' +\n\t'\"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">';\n\n/**\n * \n */\nGraph.svgFileComment = '<!-- Do not edit this file with editors other than draw.io -->'\n\n/**\n * Minimum height for table rows.\n */\nGraph.pasteStyles = ['rounded', 'shadow', 'dashed', 'dashPattern', 'fontFamily', 'fontSource', 'fontSize', 'fontColor', 'fontStyle',\n\t\t\t\t\t'align', 'verticalAlign', 'strokeColor', 'strokeWidth', 'fillColor', 'gradientColor', 'swimlaneFillColor',\n\t\t\t\t\t'textOpacity', 'gradientDirection', 'glass', 'labelBackgroundColor', 'labelBorderColor', 'opacity',\n\t\t\t\t\t'spacing', 'spacingTop', 'spacingLeft', 'spacingBottom', 'spacingRight', 'endFill', 'endArrow',\n\t\t\t\t\t'endSize', 'targetPerimeterSpacing', 'startFill', 'startArrow', 'startSize', 'sourcePerimeterSpacing',\n\t\t\t\t\t'arcSize', 'comic', 'sketch', 'fillWeight', 'hachureGap', 'hachureAngle', 'jiggle', 'disableMultiStroke',\n\t\t\t\t\t'disableMultiStrokeFill', 'fillStyle', 'curveFitting', 'simplification', 'comicStyle'];\n\n/**\n * Whitelist for known layout names.\n */\nGraph.layoutNames = ['mxHierarchicalLayout', 'mxCircleLayout', 'mxCompactTreeLayout',\n\t'mxEdgeLabelLayout', 'mxFastOrganicLayout', 'mxParallelEdgeLayout',\n\t'mxPartitionLayout', 'mxRadialTreeLayout', 'mxStackLayout'];\n\n/**\n * Creates a temporary graph instance for rendering off-screen content.\n */\nGraph.createOffscreenGraph = function(stylesheet)\n{\n\tvar graph = new Graph(document.createElement('div'));\n\tgraph.stylesheet.styles = mxUtils.clone(stylesheet.styles);\n\tgraph.resetViewOnRootChange = false;\n\tgraph.setConnectable(false);\n\tgraph.gridEnabled = false;\n\tgraph.autoScroll = false;\n\tgraph.setTooltips(false);\n\tgraph.setEnabled(false);\n\n\t// Container must be in the DOM for correct HTML rendering\n\tgraph.container.style.visibility = 'hidden';\n\tgraph.container.style.position = 'absolute';\n\tgraph.container.style.overflow = 'hidden';\n\tgraph.container.style.height = '1px';\n\tgraph.container.style.width = '1px';\n\n\treturn graph;\n};\n \n/**\n * Helper function for creating SVG data URI.\n */\nGraph.createSvgImage = function(w, h, data, coordWidth, coordHeight)\n{\n\tvar tmp = unescape(encodeURIComponent(Graph.svgDoctype +\n        '<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"' + w + 'px\" height=\"' + h + 'px\" ' +\n        ((coordWidth != null && coordHeight != null) ? 'viewBox=\"0 0 ' + coordWidth + ' ' + coordHeight + '\" ' : '') +\n        'version=\"1.1\">' + data + '</svg>'));\n\n    return new mxImage('data:image/svg+xml;base64,' + ((window.btoa) ? btoa(tmp) : Base64.encode(tmp, true)), w, h)\n};\n \n/**\n * Helper function for creating an SVG node.\n */\nGraph.createSvgNode = function(x, y, w, h, background)\n{\n\tvar svgDoc = mxUtils.createXmlDocument();\n\tvar root = (svgDoc.createElementNS != null) ?\n\t\tsvgDoc.createElementNS(mxConstants.NS_SVG, 'svg') :\n\t\tsvgDoc.createElement('svg');\n\t\n\tif (background != null)\n\t{\n\t\tif (root.style != null)\n\t\t{\n\t\t\troot.style.backgroundColor = background;\n\t\t}\n\t\telse\n\t\t{\n\t\t\troot.setAttribute('style', 'background-color:' + background);\n\t\t}\n\t}\n\t\n\tif (svgDoc.createElementNS == null)\n\t{\n\t\troot.setAttribute('xmlns', mxConstants.NS_SVG);\n\t\troot.setAttribute('xmlns:xlink', mxConstants.NS_XLINK);\n\t}\n\telse\n\t{\n\t\t// KNOWN: Ignored in IE9-11, adds namespace for each image element instead. No workaround.\n\t\troot.setAttributeNS('http://www.w3.org/2000/xmlns/', 'xmlns:xlink', mxConstants.NS_XLINK);\n\t}\n\n\troot.setAttribute('version', '1.1');\n\troot.setAttribute('width', w + 'px');\n\troot.setAttribute('height', h + 'px');\n\troot.setAttribute('viewBox', x + ' ' + y + ' ' + w + ' ' + h);\n\tsvgDoc.appendChild(root);\n\n\treturn root;\n};\n \n/**\n * Helper function for creating an SVG node.\n */\nGraph.htmlToPng = function(html, w, h, fn)\n{\n\tvar canvas = document.createElement('canvas');\n\tcanvas.width = w;\n\tcanvas.height = h;\n\n\tvar img = document.createElement('img');\n\timg.onload = mxUtils.bind(this, function()\n\t{\n\t\tvar ctx = canvas.getContext('2d');\n\t\tctx.drawImage(img, 0, 0)\n\n\t\tfn(canvas.toDataURL());\n\t});\n\n\timg.src = 'data:image/svg+xml,' + encodeURIComponent('<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"100\" height=\"100\">' +\n\t\t'<foreignObject width=\"100%\" height=\"100%\"><div xmlns=\"http://www.w3.org/1999/xhtml\"><style>em{color:red;}</style><em>I</em> lick <span>cheese</span></div></foreignObject></svg>');\n};\n\n/**\n * Removes all illegal control characters with ASCII code <32 except TAB, LF\n * and CR.\n */\nGraph.zapGremlins = function(text)\n{\n\tvar lastIndex = 0;\n\tvar checked = [];\n\t\n\tfor (var i = 0; i < text.length; i++)\n\t{\n\t\tvar code = text.charCodeAt(i);\n\t\t\n\t\t// Removes all control chars except TAB, LF and CR\n\t\tif (!((code >= 32 || code == 9 || code == 10 || code == 13) &&\n\t\t\tcode != 0xFFFF && code != 0xFFFE))\n\t\t{\n\t\t\tchecked.push(text.substring(lastIndex, i));\n\t\t\tlastIndex = i + 1;\n\t\t}\n\t}\n\t\n\tif (lastIndex > 0 && lastIndex < text.length)\n\t{\n\t\tchecked.push(text.substring(lastIndex));\n\t}\n\t\n\treturn (checked.length == 0) ? text : checked.join('');\n};\n\n/**\n * Turns the given string into an array.\n */\nGraph.stringToBytes = function(str)\n{\n\tvar arr = new Array(str.length);\n\n    for (var i = 0; i < str.length; i++)\n    {\n        arr[i] = str.charCodeAt(i);\n    }\n    \n    return arr;\n};\n\n/**\n * Turns the given array into a string.\n */\nGraph.bytesToString = function(arr)\n{\n\tvar result = new Array(arr.length);\n\n    for (var i = 0; i < arr.length; i++)\n    {\n    \tresult[i] = String.fromCharCode(arr[i]);\n    }\n    \n    return result.join('');\n};\n\n/**\n * Turns the given array into a string.\n */\nGraph.base64EncodeUnicode = function(str)\n{\n    return btoa(encodeURIComponent(str).replace(/%([0-9A-F]{2})/g, function(match, p1) {\n        return String.fromCharCode(parseInt(p1, 16))\n    }));\n};\n\n/**\n * Turns the given array into a string.\n */\nGraph.base64DecodeUnicode = function(str)\n{\n    return decodeURIComponent(Array.prototype.map.call(atob(str), function(c) {\n        return '%' + ('00' + c.charCodeAt(0).toString(16)).slice(-2)\n    }).join(''));\n};\n\n/**\n * Returns a base64 encoded version of the compressed outer XML of the given node.\n */\nGraph.compressNode = function(node, checked)\n{\n\tvar xml = mxUtils.getXml(node);\n\t\n\treturn Graph.compress((checked) ? xml : Graph.zapGremlins(xml));\n};\n\n/**\n * Returns a string for the given array buffer.\n */\nGraph.arrayBufferToString = function(buffer)\n{\n    var binary = '';\n    var bytes = new Uint8Array(buffer);\n    var len = bytes.byteLength;\n\n    for (var i = 0; i < len; i++)\n\t{\n        binary += String.fromCharCode(bytes[i]);\n    }\n\n    return binary;\n};\n\n/**\n * Returns an array buffer for the given string.\n */\nGraph.stringToArrayBuffer = function(data)\n{\n\treturn Uint8Array.from(data, function (c)\n\t{\n\t  return c.charCodeAt(0);\n\t});\n};\n\n/**\n * Returns index of a string in an array buffer (UInt8Array)\n */\nGraph.arrayBufferIndexOfString = function (uint8Array, str, start)\n{\n\tvar c0 = str.charCodeAt(0), j = 1, p = -1;\n\t\n\t//Index of first char\n\tfor (var i = start || 0; i < uint8Array.byteLength; i++)\n\t{\n\t\tif (uint8Array[i] == c0)\n\t\t{\n\t\t\tp = i;\n\t\t\tbreak;\n\t\t}\n\t}\n\t\n\tfor (var i = p + 1; p > -1 && i < uint8Array.byteLength && i < p + str.length - 1; i++)\n\t{\n\t\tif (uint8Array[i] != str.charCodeAt(j))\n\t\t{\n\t\t\treturn Graph.arrayBufferIndexOfString(uint8Array, str, p + 1);\n\t\t}\n\t\t\n\t\tj++;\n\t}\n\t\n\treturn j == str.length - 1? p : -1;\n};\n\n/**\n * Returns a base64 encoded version of the compressed string.\n */\nGraph.compress = function(data, deflate)\n{\n\tif (data == null || data.length == 0 || typeof(pako) === 'undefined')\n\t{\n\t\treturn data;\n\t}\n\telse\n\t{\n   \t\tvar tmp = (deflate) ? pako.deflate(encodeURIComponent(data)) :\n   \t\t\tpako.deflateRaw(encodeURIComponent(data));\n   \t\t\n   \t\treturn btoa(Graph.arrayBufferToString(new Uint8Array(tmp)));\n\t}\n};\n\n/**\n * Returns a decompressed version of the base64 encoded string.\n */\nGraph.decompress = function(data, inflate, checked)\n{\n   \tif (data == null || data.length == 0 || typeof(pako) === 'undefined')\n\t{\n\t\treturn data;\n\t}\n\telse\n\t{\n\t\tvar tmp = Graph.stringToArrayBuffer(atob(data));\n\t\tvar inflated = decodeURIComponent((inflate) ?\n\t\t\tpako.inflate(tmp, {to: 'string'}) :\n\t\t\tpako.inflateRaw(tmp, {to: 'string'}));\n\n\t\treturn (checked) ? inflated : Graph.zapGremlins(inflated);\n\t}\n};\n\n/**\n * Fades the given nodes in or out.\n */\nGraph.fadeNodes = function(nodes, start, end, done, delay)\n{\n\tdelay = (delay != null) ? delay : 1000;\n\tGraph.setTransitionForNodes(nodes, null);\n\tGraph.setOpacityForNodes(nodes, start);\n\n\twindow.setTimeout(function()\n\t{\n\t\tGraph.setTransitionForNodes(nodes,\n\t\t\t'all ' + delay + 'ms ease-in-out');\n\t\tGraph.setOpacityForNodes(nodes, end);\n\n\t\twindow.setTimeout(function()\n\t\t{\n\t\t\tGraph.setTransitionForNodes(nodes, null);\n\n\t\t\tif (done != null)\n\t\t\t{\n\t\t\t\tdone();\n\t\t\t}\n\t\t}, delay);\n\t}, 0);\n};\n\n/**\n * Removes the elements from the map where the given function returns true.\n */\nGraph.removeKeys = function(map, ignoreFn)\n{\n\tfor (var key in map)\n\t{\n\t\tif (ignoreFn(key))\n\t\t{\n\t\t\tdelete map[key];\n\t\t}\n\t}\n};\n\n/**\n * Sets the transition for the given nodes.\n */\nGraph.setTransitionForNodes = function(nodes, transition)\n{\n\t for (var i = 0; i < nodes.length; i++)\n\t {\n\t\tmxUtils.setPrefixedStyle(nodes[i].style, 'transition', transition);\n\t }\n};\n\n/**\n * Sets the opacity for the given nodes.\n */\nGraph.setOpacityForNodes = function(nodes, opacity)\n{\n\t for (var i = 0; i < nodes.length; i++)\n\t {\n\t\tnodes[i].style.opacity = opacity;\n\t }\n};\n\n/**\n * Removes formatting from pasted HTML.\n */\nGraph.removePasteFormatting = function(elt, ignoreTabs)\n{\n\twhile (elt != null)\n\t{\n\t\tif (elt.firstChild != null)\n\t\t{\n\t\t\tGraph.removePasteFormatting(elt.firstChild, true);\n\t\t}\n\n\t\tvar next = elt.nextSibling;\n\t\t\n\t\tif (elt.nodeType == mxConstants.NODETYPE_ELEMENT && elt.style != null)\n\t\t{\n\t\t\telt.style.whiteSpace = '';\n\t\t\t\n\t\t\tif (elt.style.color == '#000000')\n\t\t\t{\n\t\t\t\telt.style.color = '';\n\t\t\t}\n\n\t\t\t// Replaces tabs from macOS TextEdit\n\t\t\tif (elt.nodeName == 'SPAN' && elt.className == 'Apple-tab-span')\n\t\t\t{\n\t\t\t\tvar temp = Graph.createTabNode(4);\n\t\t\t\telt.parentNode.replaceChild(temp, elt);\n\t\t\t\telt = temp;\n\t\t\t}\n\n\t\t\t// Replaces paragraphs from macOS TextEdit\n\t\t\tif (elt.nodeName == 'P' && elt.className == 'p1')\n\t\t\t{\n\t\t\t\twhile (elt.firstChild != null)\n\t\t\t\t{\n\t\t\t\t\telt.parentNode.insertBefore(elt.firstChild, elt);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (next != null && next.nodeName == 'P' &&\n\t\t\t\t\tnext.className == 'p1')\n\t\t\t\t{\n\t\t\t\t\telt.parentNode.insertBefore(elt.ownerDocument.\n\t\t\t\t\t\tcreateElement('br'), elt);\n\t\t\t\t}\n\n\t\t\t\telt.parentNode.removeChild(elt);\n\t\t\t}\n\n\t\t\t// Replaces tabs\n\t\t\tif (!ignoreTabs && elt.innerHTML != null)\n\t\t\t{\n\t\t\t\tvar tabNode = Graph.createTabNode(4);\n\t\t\t\telt.innerHTML = elt.innerHTML.replace(/\\t/g,\n\t\t\t\t\ttabNode.outerHTML);\n\t\t\t}\n\t\t}\n\n\t\telt = next;\n\t}\n};\n\n/**\n * Removes formatting from pasted HTML.\n */\nGraph.createTabNode = function(spaces)\n{\n\tvar str = '\\t';\n\t\t\t\n\tif (spaces != null)\n\t{\n\t\tstr = '';\n\t\t\n\t\twhile (spaces > 0)\n\t\t{\n\t\t\tstr += '\\xa0';\n\t\t\tspaces--;\n\t\t}\n\t}\n\n\t// LATER: Fix normalized tab after editing plain text labels\n\tvar tabNode = document.createElement('span');\n\ttabNode.style.whiteSpace = 'pre';\n\ttabNode.appendChild(document.createTextNode(str));\n\n\treturn tabNode;\n};\n\n/**\n * Sanitizes the given HTML markup, allowing target attributes and\n * data: protocol links to pages and custom actions.\n */\nGraph.sanitizeHtml = function(value, editing)\n{\n\treturn Graph.domPurify(value, false);\n};\n\n/**\n * Returns the size of the page format scaled with the page size.\n */\n Graph.sanitizeLink = function(href)\n {\n\t if (href == null)\n\t {\n\t\t return null;\n\t }\n\t else\n\t {\n\t\t var a = document.createElement('a');\n\t\t a.setAttribute('href', href);\n\t\t Graph.sanitizeNode(a);\n\t\t \n\t\t return a.getAttribute('href');\n\t }\n };\n\n/**\n * Sanitizes the given DOM node in-place.\n */\nGraph.sanitizeNode = function(value)\n{\n\treturn Graph.domPurify(value, true);\n};\n\n// Allows use tag in SVG with local references only\nDOMPurify.addHook('afterSanitizeAttributes', function(node)\n{\n\tif (node.nodeName == 'use' && ((node.getAttribute('xlink:href') != null &&\n\t\t!node.getAttribute('xlink:href').startsWith('#')) ||\n\t\t(node.getAttribute('href') != null && !node.getAttribute('href').startsWith('#'))))\n\t{\n\t\tnode.remove();\n\t}\n});\n\n// Workaround for removed content with empty nodes\nDOMPurify.addHook('uponSanitizeAttribute', function (node, evt)\n{\n\tif (node.nodeName == 'svg' && evt.attrName == 'content')\n\t{\n\t\tevt.forceKeepAttr = true;\n\t}\n\t\n\treturn node;\n});\n\n/**\n * Sanitizes the given value.\n */\nGraph.domPurify = function(value, inPlace)\n{\n\twindow.DOM_PURIFY_CONFIG.IN_PLACE = inPlace;\n\t\n\treturn DOMPurify.sanitize(value, window.DOM_PURIFY_CONFIG);\n};\n\n/**\n * Updates the viewbox, width and height in the given SVG data URI\n * and returns the updated data URI with all script tags and event\n * handlers removed.\n */\nGraph.clipSvgDataUri = function(dataUri, ignorePreserveAspect)\n{\n\t// LATER Add workaround for non-default NS declarations with empty URI not allowed in IE11\n\tif (!mxClient.IS_IE && !mxClient.IS_IE11 && dataUri != null &&\n\t\tdataUri.substring(0, 26) == 'data:image/svg+xml;base64,')\n\t{\n\t\ttry\n\t\t{\n\t\t\tvar div = document.createElement('div');\n\t\t\tdiv.style.position = 'absolute';\n\t\t\tdiv.style.visibility = 'hidden';\n\t\t\t\n\t\t\t// Adds the text and inserts into DOM for updating of size\n\t\t\tvar data = decodeURIComponent(escape(atob(dataUri.substring(26))));\n\t\t\tvar idx = data.indexOf('<svg');\n\t\t\t\n\t\t\tif (idx >= 0)\n\t\t\t{\n\t\t\t\t// Strips leading XML declaration and doctypes\n\t\t\t\tdiv.innerHTML = Graph.sanitizeHtml(data.substring(idx));\n\t\t\t\t\n\t\t\t\t// Gets the size and removes from DOM\n\t\t\t\tvar svgs = div.getElementsByTagName('svg');\n\n\t\t\t\tif (svgs.length > 0)\n\t\t\t\t{\n\t\t\t\t\t// Avoids getBBox as it ignores stroke option\n\t\t\t\t\tif (ignorePreserveAspect || svgs[0].getAttribute('preserveAspectRatio') != null)\n\t\t\t\t\t{\n\t\t\t\t\t\tdocument.body.appendChild(div);\n\t\t\t\t\t\t\n\t\t\t\t\t\ttry\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tvar fx = 1;\n\t\t\t\t\t\t\tvar fy = 1;\n\t\t\t\t\t\t\tvar w = svgs[0].getAttribute('width');\n\t\t\t\t\t\t\tvar h = svgs[0].getAttribute('height');\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif (w != null && w.charAt(w.length - 1) != '%')\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tw = parseFloat(w);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tw = NaN;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif (h != null && h.charAt(h.length - 1) != '%')\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\th = parseFloat(h);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\th = NaN;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tvar vb = svgs[0].getAttribute('viewBox');\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif (vb != null && !isNaN(w) && !isNaN(h))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tvar tokens = vb.split(' ');\n\n\t\t\t\t\t\t\t\tif (vb.length >= 4)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tfx = parseFloat(tokens[2]) / w;\n\t\t\t\t\t\t\t\t\tfy = parseFloat(tokens[3]) / h;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tvar size = svgs[0].getBBox();\n\n\t\t\t\t\t\t\tif (size.width > 0 && size.height > 0)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tdiv.getElementsByTagName('svg')[0].setAttribute('viewBox', size.x +\n\t\t\t\t\t\t\t\t\t' ' + size.y + ' ' + size.width + ' ' + size.height);\n\t\t\t\t\t\t\t\tdiv.getElementsByTagName('svg')[0].setAttribute('width', size.width / fx);\n\t\t\t\t\t\t\t\tdiv.getElementsByTagName('svg')[0].setAttribute('height', size.height / fy);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcatch (e)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t// ignore\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfinally\n\t\t\t\t\t\t{\t\n\t\t\t\t\t\t\tdocument.body.removeChild(div);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tdataUri = Editor.createSvgDataUri(mxUtils.getXml(svgs[0]));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tcatch (e)\n\t\t{\n\t\t\t// ignore\n\t\t}\n\t}\n\t\n\treturn dataUri;\n};\n\n/**\n * Returns the CSS font family from the given computed style.\n */\nGraph.stripQuotes = function(text)\n{\n\tif (text != null)\n\t{\n\t\tif (text.charAt(0) == '\\'')\n\t\t{\n\t\t\ttext = text.substring(1);\n\t\t}\n\t\t\n\t\tif (text.charAt(text.length - 1) == '\\'')\n\t\t{\n\t\t\ttext = text.substring(0, text.length - 1);\n\t\t}\n\t\n\t\tif (text.charAt(0) == '\"')\n\t\t{\n\t\t\ttext = text.substring(1);\n\t\t}\n\t\t\n\t\tif (text.charAt(text.length - 1) == '\"')\n\t\t{\n\t\t\ttext = text.substring(0, text.length - 1);\n\t\t}\n\t}\n\t\n\treturn text;\n};\n\n/**\n * Create remove icon. \n */\nGraph.createRemoveIcon = function(title, onclick)\n{\n\tvar removeLink = document.createElement('img');\n\tremoveLink.setAttribute('src', Dialog.prototype.clearImage);\n\tremoveLink.setAttribute('title', title);\n\tremoveLink.setAttribute('width', '13');\n\tremoveLink.setAttribute('height', '10');\n\tremoveLink.style.marginLeft = '4px';\n\tremoveLink.style.marginBottom = '-1px';\n\tremoveLink.style.cursor = 'pointer';\n\n\tmxEvent.addListener(removeLink, 'click', onclick);\n\n\treturn removeLink;\n};\n\n/**\n * Returns true if the given string is a page link.\n */\nGraph.isPageLink = function(text)\n{\n\treturn text != null && text.substring(0, 13) == 'data:page/id,';\n};\n\n/**\n * Returns true if the given string is a page link.\n */\nGraph.rewritePageLinks = function(doc)\n{\n\tvar links = doc.getElementsByTagName('a');\n\n\tfunction rewriteLink(link, attrib)\n\t{\n\t\tvar href = link.getAttribute(attrib);\n\n\t\tif (href != null && Graph.isPageLink(href))\n\t\t{\n\t\t\tlink.setAttribute(attrib, '#' + href.substring(href.indexOf(':') + 1));\n\t\t}\n\t};\n\n\tfor (var i = 0; i < links.length; i++)\n\t{\n\t\trewriteLink(links[i], 'href');\n\t\trewriteLink(links[i], 'xlink:href');\n\t}\n};\n\n/**\n * Returns true if the given string is a link.\n * \n * See https://stackoverflow.com/questions/5717093/check-if-a-javascript-string-is-a-url\n */\nGraph.isLink = function(text)\n{\n\treturn text != null && Graph.linkPattern.test(text);\n};\n\n/**\n * Regular expression for links.\n */\nGraph.linkPattern = new RegExp('^(https?:\\\\/\\\\/)?'+ // protocol\n\t'((([a-z\\\\d]([a-z\\\\d-]*[a-z\\\\d])*)\\\\.)+[a-z]{2,}|'+ // domain name\n\t'((\\\\d{1,3}\\\\.){3}\\\\d{1,3}))'+ // OR ip (v4) address\n\t'(\\\\:\\\\d+)?(\\\\/[-a-z\\\\d%_.~+]*)*'+ // port and path\n\t'(\\\\?[;&a-z\\\\d%_.~+=-]*)?'+ // query string\n\t'(\\\\#[-a-z\\\\d_]*)?$','i'); // fragment locator\n\n/**\n * Graph inherits from mxGraph.\n */\nmxUtils.extend(Graph, mxGraph);\n\n/**\n * Allows all values in fit.\n */\nGraph.prototype.minFitScale = null;\n\n/**\n * Allows all values in fit.\n */\nGraph.prototype.maxFitScale = null;\n\n/**\n * Sets the policy for links. Possible values are \"self\" to replace any framesets,\n * \"blank\" to load the URL in <linkTarget> and \"auto\" (default).\n */\nGraph.prototype.linkPolicy = (urlParams['target'] == 'frame') ? 'blank' : (urlParams['target'] || 'auto');\n\n/**\n * Target for links that open in a new window. Default is _blank.\n */\nGraph.prototype.linkTarget = (urlParams['target'] == 'frame') ? '_self' : '_blank';\n\n/**\n * Value to the rel attribute of links. Default is 'nofollow noopener noreferrer'.\n * NOTE: There are security implications when this is changed and if noopener is removed,\n * then <openLink> must be overridden to allow for the opener to be set by default.\n */\nGraph.prototype.linkRelation = 'nofollow noopener noreferrer';\n\n/**\n * Scrollbars setting is overriden in the editor, but not in the viewer.\n */\nGraph.prototype.defaultScrollbars = true;\n\n/**\n * Specifies if the page should be visible for new files. Default is true.\n */\nGraph.prototype.defaultPageVisible = true;\n\n/**\n * Specifies if the page should be visible for new files. Default is true.\n */\nGraph.prototype.defaultGridEnabled = urlParams['grid'] != '0';\n\n/**\n * Specifies if the app should run in chromeless mode. Default is false.\n * This default is only used if the contructor argument is null.\n */\nGraph.prototype.lightbox = false;\n\n/**\n * \n */\nGraph.prototype.defaultPageBackgroundColor = '#ffffff';\n\n/**\n * \n */\nGraph.prototype.diagramBackgroundColor = '#f0f0f0';\n\n/**\n * Whether to use diagramBackgroundColor for no page views.\n */\nGraph.prototype.enableDiagramBackground = false;\n\n/**\n * \n */\nGraph.prototype.defaultPageBorderColor = '#ffffff';\n\n/**\n * \n */\nGraph.prototype.shapeForegroundColor = '#000000';\n\n/**\n * \n */\nGraph.prototype.shapeBackgroundColor = '#ffffff';\n\n/**\n * Specifies the size of the size for \"tiles\" to be used for a graph with\n * scrollbars but no visible background page. A good value is large\n * enough to reduce the number of repaints that is caused for auto-\n * translation, which depends on this value, and small enough to give\n * a small empty buffer around the graph. Default is 400x400.\n */\nGraph.prototype.scrollTileSize = new mxRectangle(0, 0, 400, 400);\n\n/**\n * Overrides the background color and paints a transparent background.\n */\nGraph.prototype.transparentBackground = true;\n\n/**\n * Sets global constants.\n */\nGraph.prototype.selectParentAfterDelete = false;\n\n/**\n * Sets the default target for all links in cells.\n */\nGraph.prototype.defaultEdgeLength = 80;\n\n/**\n * Enables activation of special handles on unselected cells.\n */\nGraph.prototype.immediateHandling = true;\n\n/**\n * Allows all values in fit.\n */\nGraph.prototype.connectionArrowsEnabled = true;\n\n/**\n * Specifies the regular expression for matching placeholders.\n */\nGraph.prototype.placeholderPattern = new RegExp('%(date\\{.*\\}|[^%^\\{^\\}^ ^\"^ \\'^=^;]+)%', 'g');\n\n/**\n * Specifies the regular expression for matching placeholders.\n */\nGraph.prototype.absoluteUrlPattern = new RegExp('^(?:[a-z]+:)?//', 'i');\n\n/**\n * Specifies the default name for the theme. Default is 'default'.\n */\nGraph.prototype.defaultThemeName = 'default';\n\n/**\n * Specifies the default name for the theme. Default is 'default'.\n */\nGraph.prototype.defaultThemes = {};\n\n/**\n * Base URL for relative links.\n */\nGraph.prototype.baseUrl = (urlParams['base'] != null) ?\n\tdecodeURIComponent(urlParams['base']) :\n\t(((window != window.top) ? document.referrer :\n\tdocument.location.toString()).split('#')[0]);\n\n/**\n * Specifies if the label should be edited after an insert.\n */\nGraph.prototype.editAfterInsert = false;\n\n/**\n * Defines the built-in properties to be ignored in tooltips.\n */\nGraph.prototype.builtInProperties = ['label', 'tooltip', 'placeholders', 'placeholder'];\n\n/**\n * Defines if the graph is part of an EditorUi. If this is false the graph can\n * be used in an EditorUi instance but will not have a UI added, functions\n * overridden or event handlers added.\n */\nGraph.prototype.standalone = false;\n\n/**\n * Enables move of bends/segments without selecting.\n */\nGraph.prototype.enableFlowAnimation = false;\n\n/**\n * Background color for inactive tabs.\n */\nGraph.prototype.roundableShapes = ['label', 'rectangle', 'internalStorage', 'corner',\n\t'parallelogram', 'swimlane', 'triangle', 'trapezoid', 'ext', 'step', 'tee', 'process',\n\t'link', 'rhombus', 'offPageConnector', 'loopLimit', 'hexagon', 'manualInput', 'card',\n\t'curlyBracket', 'singleArrow', 'callout', 'doubleArrow', 'flexArrow', 'umlLifeline'];\n\n/**\n * Installs child layout styles.\n */\nGraph.prototype.init = function(container)\n{\n\tmxGraph.prototype.init.apply(this, arguments);\n\n\t// Intercepts links with no target attribute and opens in new window\n\tthis.cellRenderer.initializeLabel = function(state, shape)\n\t{\n\t\tmxCellRenderer.prototype.initializeLabel.apply(this, arguments);\n\t\t\n\t\t// Checks tolerance for clicks on links\n\t\tvar tol = state.view.graph.tolerance;\n\t\tvar handleClick = true;\n\t\tvar first = null;\n\t\t\n\t\tvar down = mxUtils.bind(this, function(evt)\n\t\t{\n\t\t\thandleClick = true;\n\t\t\tfirst = new mxPoint(mxEvent.getClientX(evt), mxEvent.getClientY(evt));\n\t\t});\n\t\t\n\t\tvar move = mxUtils.bind(this, function(evt)\n\t\t{\n\t\t\thandleClick = handleClick && first != null &&\n\t\t\t\tMath.abs(first.x - mxEvent.getClientX(evt)) < tol &&\n\t\t\t\tMath.abs(first.y - mxEvent.getClientY(evt)) < tol;\n\t\t});\n\t\t\n\t\tvar up = mxUtils.bind(this, function(evt)\n\t\t{\n\t\t\tif (handleClick)\n\t\t\t{\n\t\t\t\tvar elt = mxEvent.getSource(evt)\n\t\t\t\t\n\t\t\t\twhile (elt != null && elt != shape.node)\n\t\t\t\t{\n\t\t\t\t\tif (elt.nodeName.toLowerCase() == 'a')\n\t\t\t\t\t{\n\t\t\t\t\t\tstate.view.graph.labelLinkClicked(state, elt, evt);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\telt = elt.parentNode;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\t\n\t\tmxEvent.addGestureListeners(shape.node, down, move, up);\n\t\tmxEvent.addListener(shape.node, 'click', function(evt)\n\t\t{\n\t\t\tmxEvent.consume(evt);\n\t\t});\n\t};\n\t\n\t// Handles custom links in tooltips\n\tif (this.tooltipHandler != null)\n\t{\n\t\tvar tooltipHandlerInit = this.tooltipHandler.init;\n\t\t\n\t\tthis.tooltipHandler.init = function()\n\t\t{\n\t\t\ttooltipHandlerInit.apply(this, arguments);\n\t\t\t\n\t\t\tif (this.div != null)\n\t\t\t{\n\t\t\t\tmxEvent.addListener(this.div, 'click', mxUtils.bind(this, function(evt)\n\t\t\t\t{\n\t\t\t\t\tvar source = mxEvent.getSource(evt);\n\t\t\t\t\t\n\t\t\t\t\tif (source.nodeName == 'A')\n\t\t\t\t\t{\n\t\t\t\t\t\tvar href = source.getAttribute('href');\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (href != null && this.graph.isCustomLink(href) &&\n\t\t\t\t\t\t\t(mxEvent.isTouchEvent(evt) || !mxEvent.isPopupTrigger(evt)) &&\n\t\t\t\t\t\t\tthis.graph.customLinkClicked(href))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tmxEvent.consume(evt);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}));\n\t\t\t}\n\t\t};\n\t}\n\n\n\t// Adds or updates CSS for flowAnimation style\n\tthis.addListener(mxEvent.SIZE, mxUtils.bind(this, function(sender, evt)\n\t{\n\t\tif (this.container != null && this.flowAnimationStyle)\n\t\t{\n\t\t\tvar id = this.flowAnimationStyle.getAttribute('id');\n\t\t\tthis.flowAnimationStyle.innerHTML = this.getFlowAnimationStyleCss(id);\n\t\t}\n\t}));\n\n\tthis.initLayoutManager();\n};\n\n/**\n * Implements zoom and offset via CSS transforms. This is currently only used\n * in read-only as there are fewer issues with the mxCellState not being scaled\n * and translated.\n * \n * KNOWN ISSUES TO FIX:\n * - Apply CSS transforms to HTML labels in IE11\n */\n(function()\n{\n\t/**\n\t * Uses CSS transforms for scale and translate.\n\t */\n\tGraph.prototype.useCssTransforms = false;\n\n\t/**\n\t * Contains the scale.\n\t */\n\tGraph.prototype.currentScale = 1;\n\n\t/**\n\t * Contains the offset.\n\t */\n\tGraph.prototype.currentTranslate = new mxPoint(0, 0);\n\n\t/**\n\t * Returns information about the current selection.\n\t */\n\tGraph.prototype.isFillState = function(state)\n\t{\n\t\treturn !this.isSpecialColor(state.style[mxConstants.STYLE_FILLCOLOR]) &&\n\t\t\tmxUtils.getValue(state.style, 'lineShape', null) != '1' &&\n\t\t\t(this.model.isVertex(state.cell) ||\n\t\t\tmxUtils.getValue(state.style, mxConstants.STYLE_SHAPE, null) == 'arrow' ||\n\t\t\tmxUtils.getValue(state.style, mxConstants.STYLE_SHAPE, null) == 'wire' ||\n\t\t\tmxUtils.getValue(state.style, mxConstants.STYLE_SHAPE, null) == 'filledEdge' ||\n\t\t\tmxUtils.getValue(state.style, mxConstants.STYLE_SHAPE, null) == 'flexArrow' ||\n\t\t\tmxUtils.getValue(state.style, mxConstants.STYLE_SHAPE, null) == 'mxgraph.arrows2.wedgeArrow');\n\t};\n\t\n\t/**\n\t * Returns information about the current selection.\n\t */\n\tGraph.prototype.isGradientState = function(state)\n\t{\n\t\treturn this.isFillState(state) && mxUtils.getValue(state.style,\n\t\t\tmxConstants.STYLE_SHAPE, null) != 'wire';\n\t};\n\t\n\t/**\n\t * Returns information about the current selection.\n\t */\n\tGraph.prototype.isStrokeState = function(state)\n\t{\n\t\treturn true;\n\t};\n\t\n\t/**\n\t * Returns information about the current selection.\n\t */\n\tGraph.prototype.isSpecialColor = function(color)\n\t{\n\t\treturn mxUtils.indexOf([mxConstants.STYLE_STROKECOLOR,\n\t\t\tmxConstants.STYLE_FILLCOLOR, 'inherit', 'swimlane',\n\t\t\t'indicated'], color) >= 0;\n\t};\n\t\n\t/**\n\t * Returns information about the current selection.\n\t */\n\tGraph.prototype.isGlassState = function(state)\n\t{\n\t\tvar shape = mxUtils.getValue(state.style, mxConstants.STYLE_SHAPE, null);\n\t\t\n\t\treturn (shape == 'label' || shape == 'rectangle' || shape == 'internalStorage' ||\n\t\t\t\tshape == 'ext' || shape == 'umlLifeline' || shape == 'swimlane' ||\n\t\t\t\tshape == 'process');\n\t};\n\t\n\t/**\n\t * Returns information about the current selection.\n\t */\n\tGraph.prototype.isRoundedState = function(state)\n\t{\n\t\treturn (state.shape != null) ? state.shape.isRoundable() :\n\t\t\tmxUtils.indexOf(this.roundableShapes, mxUtils.getValue(state.style,\n\t\t\tmxConstants.STYLE_SHAPE, null)) >= 0;\n\t};\n\t\n\t/**\n\t * Returns information about the current selection.\n\t */\n\tGraph.prototype.isLineJumpState = function(state)\n\t{\n\t\tvar shape = mxUtils.getValue(state.style, mxConstants.STYLE_SHAPE, null);\n\t\tvar curved = mxUtils.getValue(state.style, mxConstants.STYLE_CURVED, false);\n\t\t\n\t\treturn !curved && (shape == 'connector' || shape == 'filledEdge' || shape == 'wire');\n\t};\n\t\n\t/**\n\t * Returns information about the current selection.\n\t */\n\tGraph.prototype.isAutoSizeState = function(state)\n\t{\n\t\treturn mxUtils.getValue(state.style, mxConstants.STYLE_AUTOSIZE, null) == '1';\n\t};\n\t\n\t/**\n\t * Returns information about the current selection.\n\t */\n\tGraph.prototype.isImageState = function(state)\n\t{\n\t\treturn mxUtils.getValue(state.style, mxConstants.STYLE_IMAGE, null) != null;\n\t};\n\t\n\t/**\n\t * Returns information about the current selection.\n\t */\n\tGraph.prototype.isShadowState = function(state)\n\t{\n\t\tvar shape = mxUtils.getValue(state.style, mxConstants.STYLE_SHAPE, null);\n\t\t\n\t\treturn (shape != 'image');\n\t};\n\t\n\t/**\n\t * \n\t */\n\tGraph.prototype.getVerticesAndEdges = function(vertices, edges)\n\t{\n\t\tvertices = (vertices != null) ? vertices : true;\n\t\tedges = (edges != null) ? edges : true;\n\t\tvar model = this.model;\n\t\t\n\t\treturn model.filterDescendants(function(cell)\n\t\t{\n\t\t\treturn (vertices && model.isVertex(cell)) || (edges && model.isEdge(cell));\n\t\t}, model.getRoot());\n\t};\n\t\n\t/**\n\t * Returns information about the current selection.\n\t */\n\tGraph.prototype.applyNewEdgeStyle = function(source, edges, dir)\n\t{\n\t\tvar style = this.getCellStyle(source);\n\t\tvar temp = style['newEdgeStyle'];\n\t\t\n\t\tif (temp != null)\n\t\t{\n\t\t\tthis.model.beginUpdate();\n\t\t\ttry\n\t\t\t{\n\t\t\t\tvar styles = JSON.parse(temp);\n\t\t\t\t\n\t\t\t\tfor (var key in styles)\n\t\t\t\t{\n\t\t\t\t\tthis.setCellStyles(key, styles[key], edges);\n\t\t\t\t\t\n\t\t\t\t\t// Sets elbow direction\n\t\t\t\t\tif (key == 'edgeStyle' && styles[key] == 'elbowEdgeStyle' && dir != null)\n\t\t\t\t\t{\n\t\t\t\t\t\tthis.setCellStyles('elbow', (dir == mxConstants.DIRECTION_SOUTH ||\n\t\t\t\t\t\t\tdir == mxConstants.DIRECTION_NOTH) ? 'vertical' : 'horizontal',\n\t\t\t\t\t\t\tedges);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tfinally\n\t\t\t{\n\t\t\t\tthis.model.endUpdate();\n\t\t\t}\n\t\t}\n\t};\n\t\n\t/**\n\t * Returns information about the current selection.\n\t */\n\tGraph.prototype.getCommonStyle = function(cells)\n\t{\n\t\tvar style = {};\n\t\t\n\t\tfor (var i = 0; i < cells.length; i++)\n\t\t{\n\t\t\tvar state = this.view.getState(cells[i]);\n\n\t\t\tif (state != null)\n\t\t\t{\n\t\t\t\tthis.mergeStyle(state.style, style, i == 0);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn style;\n\t};\n\t\n\t/**\n\t * Returns information about the current selection.\n\t */\n\tGraph.prototype.mergeStyle = function(style, into, initial)\n\t{\n\t\tif (style != null)\n\t\t{\n\t\t\tvar keys = {};\n\t\t\t\n\t\t\tfor (var key in style)\n\t\t\t{\n\t\t\t\tvar value = style[key];\n\t\t\t\t\n\t\t\t\tif (value != null)\n\t\t\t\t{\n\t\t\t\t\tkeys[key] = true;\n\t\t\t\t\t\n\t\t\t\t\tif (into[key] == null && initial)\n\t\t\t\t\t{\n\t\t\t\t\t\tinto[key] = value;\n\t\t\t\t\t}\n\t\t\t\t\telse if (into[key] != value)\n\t\t\t\t\t{\n\t\t\t\t\t\tdelete into[key];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tfor (var key in into)\n\t\t\t{\n\t\t\t\tif (!keys[key])\n\t\t\t\t{\n\t\t\t\t\tdelete into[key];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t};\n\n\t/**\n\t * Returns the cell for editing the given cell.\n\t */\n\tGraph.prototype.getStartEditingCell = function(cell, trigger)\n\t{\n\t\t// Redirect editing for tables\n\t\tvar style = this.getCellStyle(cell);\n\t\tvar size = parseInt(mxUtils.getValue(style, mxConstants.STYLE_STARTSIZE, 0));\n\t\t\n\t\tif (this.isTable(cell) && (!this.isSwimlane(cell) ||\n\t\t\tsize == 0) && this.getLabel(cell) == '' &&\n\t\t\tthis.model.getChildCount(cell) > 0)\n\t\t{\n\t\t\tcell = this.model.getChildAt(cell, 0);\n\t\t\t\n\t\t\tstyle = this.getCellStyle(cell);\n\t\t\tsize = parseInt(mxUtils.getValue(style, mxConstants.STYLE_STARTSIZE, 0));\n\t\t}\n\t\t\n\t\t// Redirect editing for table rows\n\t\tif (this.isTableRow(cell) && (!this.isSwimlane(cell) ||\n\t\t\tsize == 0) && this.getLabel(cell) == '' &&\n\t\t\tthis.model.getChildCount(cell) > 0)\n\t\t{\n\t\t\tfor (var i = 0; i < this.model.getChildCount(cell); i++)\n\t\t\t{\n\t\t\t\tvar temp = this.model.getChildAt(cell, i);\n\t\t\t\t\n\t\t\t\tif (this.isCellEditable(temp))\n\t\t\t\t{\n\t\t\t\t\tcell = temp;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn cell;\n\t};\n\n\t/**\n\t * Returns the style of the given cell as an object.\n\t */\n\tGraph.prototype.copyStyle = function(cell)\n\t{\n\t\treturn this.getCellStyle(cell, false);\n\t};\n\n\t/**\n\t * Returns true if fast zoom preview should be used.\n\t */\n\tGraph.prototype.pasteStyle = function(style, cells, keys)\n\t{\n\t\tkeys = (keys != null) ? keys : Graph.pasteStyles;\n\n\t\tGraph.removeKeys(style, function(key)\n\t\t{\n\t\t\treturn mxUtils.indexOf(keys, key) < 0;\n\t\t});\n\n\t\tthis.updateCellStyles(style, cells);\n\t};\n\t\t\t\n\t/**\n\t * Removes implicit styles from cell styles so that dark mode works using the\n\t * default values from the stylesheet.\n\t */\n\tGraph.prototype.updateCellStyles = function(style, cells)\n\t{\n\t\tthis.model.beginUpdate();\n\t\ttry\n\t\t{\n\t\t\tfor (var i = 0; i < cells.length; i++)\n\t\t\t{\n\t\t\t\tif (this.model.isVertex(cells[i]) || this.model.isEdge(cells[i]))\n\t\t\t\t{\n\t\t\t\t\tvar cellStyle = this.getCellStyle(cells[i], false);\n\t\t\t\t\tvar perimeter = cellStyle[mxConstants.STYLE_PERIMETER];\n\t\t\t\t\tvar restorePerimeter = false;\n\n\t\t\t\t\tfor (var key in style)\n\t\t\t\t\t{\n\t\t\t\t\t\tvar value = style[key];\n\n\t\t\t\t\t\tif (cellStyle[key] != value)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t// Handles paste of shape to UML lifeline\n\t\t\t\t\t\t\tif (key == mxConstants.STYLE_SHAPE &&\n\t\t\t\t\t\t\t\tcellStyle[key] == 'umlLifeline' &&\n\t\t\t\t\t\t\t\tvalue != 'umlLifeline')\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\trestorePerimeter = true;\n\t\t\t\t\t\t\t\tkey = 'participant';\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tthis.setCellStyles(key, value, [cells[i]]);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tif (restorePerimeter)\n\t\t\t\t\t{\n\t\t\t\t\t\tthis.setCellStyles(mxConstants.STYLE_PERIMETER, perimeter, [cells[i]]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tfinally\n\t\t{\n\t\t\tthis.model.endUpdate();\n\t\t}\n\t};\n\n\t/**\n\t * Returns true if fast zoom preview should be used.\n\t */\n\tGraph.prototype.isFastZoomEnabled = function()\n\t{\n\t\treturn urlParams['zoom'] != 'nocss' && !mxClient.NO_FO && !mxClient.IS_EDGE &&\n\t\t\t!this.useCssTransforms && (this.isCssTransformsSupported() || mxClient.IS_IOS);\n\t};\n\n\t/**\n\t * Only foreignObject supported for now (no IE11). Safari disabled as it ignores\n\t * overflow visible on foreignObject in negative space (lightbox and viewer).\n\t * Check the following test case on page 1 before enabling this in production:\n\t * https://devhost.jgraph.com/git/drawio/etc/embed/sf-math-fo-clipping.html?dev=1\n\t */\n\tGraph.prototype.isCssTransformsSupported = function()\n\t{\n\t\treturn this.dialect == mxConstants.DIALECT_SVG && !mxClient.NO_FO &&\n\t\t\t(!this.lightbox || !mxClient.IS_SF);\n\t};\n\n\t/**\n\t * Function: getCellAt\n\t * \n\t * Needs to modify original method for recursive call.\n\t */\n\tGraph.prototype.getCellAt = function(x, y, parent, vertices, edges, ignoreFn)\n\t{\n\t\tif (this.useCssTransforms)\n\t\t{\n\t\t\tx = x / this.currentScale - this.currentTranslate.x;\n\t\t\ty = y / this.currentScale - this.currentTranslate.y;\n\t\t}\n\t\t\n\t\treturn this.getScaledCellAt.apply(this, arguments);\n\t};\n\n\t/**\n\t * Function: getScaledCellAt\n\t * \n\t * Overridden for recursion.\n\t */\n\tGraph.prototype.getScaledCellAt = function(x, y, parent, vertices, edges, ignoreFn)\n\t{\n\t\tvertices = (vertices != null) ? vertices : true;\n\t\tedges = (edges != null) ? edges : true;\n\n\t\tif (parent == null)\n\t\t{\n\t\t\tparent = this.getCurrentRoot();\n\t\t\t\n\t\t\tif (parent == null)\n\t\t\t{\n\t\t\t\tparent = this.getModel().getRoot();\n\t\t\t}\n\t\t}\n\n\t\tif (parent != null)\n\t\t{\n\t\t\tvar childCount = this.model.getChildCount(parent);\n\t\t\t\n\t\t\tfor (var i = childCount - 1; i >= 0; i--)\n\t\t\t{\n\t\t\t\tvar cell = this.model.getChildAt(parent, i);\n\t\t\t\tvar result = this.getScaledCellAt(x, y, cell, vertices, edges, ignoreFn);\n\t\t\t\t\n\t\t\t\tif (result != null)\n\t\t\t\t{\n\t\t\t\t\treturn result;\n\t\t\t\t}\n\t\t\t\telse if (this.isCellVisible(cell) && (edges && this.model.isEdge(cell) ||\n\t\t\t\t\tvertices && this.model.isVertex(cell)))\n\t\t\t\t{\n\t\t\t\t\tvar state = this.view.getState(cell);\n\n\t\t\t\t\tif (state != null && (ignoreFn == null || !ignoreFn(state, x, y)) &&\n\t\t\t\t\t\tthis.intersects(state, x, y))\n\t\t\t\t\t{\n\t\t\t\t\t\treturn cell;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn null;\n\t};\n\n\t/**\n\t * Returns if the child cells of the given vertex cell state should be resized.\n\t */\n\tGraph.prototype.isRecursiveVertexResize = function(state)\n\t{\n\t\treturn !this.isSwimlane(state.cell) && this.model.getChildCount(state.cell) > 0 &&\n\t\t\t!this.isCellCollapsed(state.cell) && mxUtils.getValue(state.style, 'recursiveResize', '1') == '1' &&\n\t\t\tmxUtils.getValue(state.style, 'childLayout', null) == null;\n\t}\n\t\n\t/**\n\t * Returns the first parent with an absolute or no geometry.\n\t */\n\tGraph.prototype.getAbsoluteParent = function(cell)\n\t{\n\t\tvar result = cell;\n\t\tvar geo = this.getCellGeometry(result);\n\t\t\n\t\twhile (geo != null && geo.relative)\n\t\t{\n\t\t\tresult = this.getModel().getParent(result);\n\t\t\tgeo = this.getCellGeometry(result);\n\t\t}\n\t\t\n\t\treturn result;\n\t};\n\t\n\t/**\n\t * Returns the first parent that is not a part.\n\t */\n\tGraph.prototype.isPart = function(cell)\n\t{\n\t\treturn mxUtils.getValue(this.getCurrentCellStyle(cell), 'part', '0') == '1' ||\n\t\t\tthis.isTableCell(cell) || this.isTableRow(cell);\n\t};\n\t\n\t/**\n\t * Returns the first parent that is not a part.\n\t */\n\tGraph.prototype.getCompositeParents = function(cells)\n\t{\n\t\tvar lookup = new mxDictionary();\n\t\tvar newCells = [];\n\t\n\t\tfor (var i = 0; i < cells.length; i++)\n\t\t{\n\t\t\tvar cell = this.getCompositeParent(cells[i]);\n\n\t\t\tif (this.isTableCell(cell))\n\t\t\t{\n\t\t\t\tcell = this.graph.model.getParent(cell);\n\t\t\t}\n\n\t\t\tif (this.isTableRow(cell))\n\t\t\t{\n\t\t\t\tcell = this.graph.model.getParent(cell);\n\t\t\t}\n\n\t\t\tif (cell != null && !lookup.get(cell))\n\t\t\t{\n\t\t\t\tlookup.put(cell, true);\n\t\t\t\tnewCells.push(cell);\n\t\t\t}\n\t\t}\n\n\t\treturn newCells;\n\t};\n\n\t/**\n\t * Returns the given terminal that is not relative, an edge or a part.\n\t */\n\tGraph.prototype.getReferenceTerminal = function(terminal)\n\t{\n\t\tif (terminal != null)\n\t\t{\n\t\t\tvar geo = this.getCellGeometry(terminal);\n\n\t\t\tif (geo != null && geo.relative)\n\t\t\t{\n\t\t\t\tterminal = this.model.getParent(terminal);\n\t\t\t}\n\t\t}\n\n\t\tif (terminal != null && this.model.isEdge(terminal))\n\t\t{\n\t\t\tterminal = this.model.getParent(terminal);\n\t\t}\n\n\t\tif (terminal != null)\n\t\t{\n\t\t\tterminal = this.getCompositeParent(terminal);\n\t\t}\n\n\t\treturn terminal;\n\t};\n\n\t/**\n\t * Returns the first parent that is not a part.\n\t */\n\tGraph.prototype.getCompositeParent = function(cell)\n\t{\n\t\twhile (this.isPart(cell))\n\t\t{\n\t\t\tvar temp = this.model.getParent(cell);\n\t\t\t\n\t\t\tif (!this.model.isVertex(temp))\n\t\t\t{\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\tcell = temp;\n\t\t}\n\t\t\n\t\treturn cell;\n\t};\n\t\n\t/**\n\t * Returns the selection cells where the given function returns false.\n\t */\n\tGraph.prototype.filterSelectionCells = function(ignoreFn)\n\t{\n\t\tvar cells = this.getSelectionCells();\n\t\t\n\t\tif (ignoreFn != null)\n\t\t{\n\t\t\tvar temp = [];\n\t\t\t\n\t\t\tfor (var i = 0; i < cells.length; i++)\n\t\t\t{\n\t\t\t\tif (!ignoreFn(cells[i]))\n\t\t\t\t{\n\t\t\t\t\ttemp.push(cells[i]);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tcells = temp;\n\t\t}\n\t\t\n\t\treturn cells;\n\t};\n\n\t/**\n\t * Overrides scrollRectToVisible to fix ignored transform.\n\t */\n\tvar graphScrollRectToVisible = mxGraph.prototype.scrollRectToVisible;\n\tGraph.prototype.scrollRectToVisible = function(r)\n\t{\n\t\tif (this.useCssTransforms)\n\t\t{\n\t\t\tvar s = this.currentScale;\n\t\t\tvar t = this.currentTranslate;\n\t\t\tr = new mxRectangle((r.x + 2 * t.x) * s - t.x,\n\t\t\t\t(r.y + 2 * t.y) * s - t.y,\n\t\t\t\tr.width * s, r.height * s);\n\t\t}\n\n\t\tgraphScrollRectToVisible.apply(this, arguments);\n\t};\n\n\t/**\n\t * Function: repaint\n\t * \n\t * Updates the highlight after a change of the model or view.\n\t */\n\tmxCellHighlight.prototype.getStrokeWidth = function(state)\n\t{\n\t\tvar s = this.strokeWidth;\n\t\t\n\t\tif (this.graph.useCssTransforms)\n\t\t{\n\t\t\ts /= this.graph.currentScale;\n\t\t}\n\n\t\treturn s;\n\t};\n\n\t/**\n\t * Function: getGraphBounds\n\t * \n\t * Overrides getGraphBounds to use bounding box from SVG.\n\t */\n\tmxGraphView.prototype.getGraphBounds = function()\n\t{\n\t\tvar b = this.graphBounds;\n\t\t\n\t\tif (this.graph.useCssTransforms)\n\t\t{\n\t\t\tvar t = this.graph.currentTranslate;\n\t\t\tvar s = this.graph.currentScale;\n\n\t\t\tb = new mxRectangle(\n\t\t\t\t(b.x + t.x) * s, (b.y + t.y) * s,\n\t\t\t\tb.width * s, b.height * s);\n\t\t}\n\n\t\treturn b;\n\t};\n\t\n\t/**\n\t * Overrides to bypass full cell tree validation.\n\t * TODO: Check if this improves performance\n\t */\n\tmxGraphView.prototype.viewStateChanged = function()\n\t{\n\t\tif (this.graph.useCssTransforms)\n\t\t{\n\t\t\tthis.validate();\n\t\t\tthis.graph.sizeDidChange();\n\t\t}\n\t\telse\n\t\t{\n\t\t\tthis.revalidate();\n\t\t\tthis.graph.sizeDidChange();\n\t\t}\n\t};\n\n\t/**\n\t * Overrides validate to normalize validation view state and pass\n\t * current state to CSS transform.\n\t */\n\tvar graphViewValidate = mxGraphView.prototype.validate;\n\tmxGraphView.prototype.validate = function(cell)\n\t{\n\t\tif (this.graph.useCssTransforms)\n\t\t{\n\t\t\tthis.graph.currentScale = this.scale;\n\t\t\tthis.graph.currentTranslate.x = this.translate.x;\n\t\t\tthis.graph.currentTranslate.y = this.translate.y;\n\t\t\t\n\t\t\tthis.scale = 1;\n\t\t\tthis.translate.x = 0;\n\t\t\tthis.translate.y = 0;\n\t\t}\n\t\t\n\t\tgraphViewValidate.apply(this, arguments);\n\t\t\n\t\tif (this.graph.useCssTransforms)\n\t\t{\n\t\t\tthis.graph.updateCssTransform();\n\t\t\t\n\t\t\tthis.scale = this.graph.currentScale;\n\t\t\tthis.translate.x = this.graph.currentTranslate.x;\n\t\t\tthis.translate.y = this.graph.currentTranslate.y;\n\t\t}\n\t};\n\n\t/**\n\t * Overrides function to exclude table cells and rows from groups.\n\t */\n\tvar graphGetCellsForGroup = mxGraph.prototype.getCellsForGroup;\n\tGraph.prototype.getCellsForGroup = function(cells)\n\t{\n\t\tcells = graphGetCellsForGroup.apply(this, arguments);\n\t\tvar result = [];\n\t\t\n\t\t// Filters selection cells with the same parent\n\t\tfor (var i = 0; i < cells.length; i++)\n\t\t{\n\t\t\tif (!this.isTableRow(cells[i]) &&\n\t\t\t\t!this.isTableCell(cells[i]))\n\t\t\t{\n\t\t\t\tresult.push(cells[i]);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn result;\n\t};\n\t\n\t/**\n\t * Overrides function to exclude tables, rows and cells from ungrouping.\n\t */\n\tvar graphGetCellsForUngroup = mxGraph.prototype.getCellsForUngroup;\n\tGraph.prototype.getCellsForUngroup = function(cells)\n\t{\n\t\tcells = graphGetCellsForUngroup.apply(this, arguments);\n\t\tvar result = [];\n\t\t\n\t\t// Filters selection cells with the same parent\n\t\tfor (var i = 0; i < cells.length; i++)\n\t\t{\n\t\t\tif (!this.isTable(cells[i]) &&\n\t\t\t\t!this.isTableRow(cells[i]) &&\n\t\t\t\t!this.isTableCell(cells[i]))\n\t\t\t{\n\t\t\t\tresult.push(cells[i]);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn result;\n\t};\n\n\t/**\n\t * Function: updateCssTransform\n\t * \n\t * Zooms out of the graph by <zoomFactor>.\n\t */\n\tGraph.prototype.updateCssTransform = function()\n\t{\n\t\tvar temp = this.view.getDrawPane();\n\t\t\n\t\tif (temp != null)\n\t\t{\n\t\t\tvar g = temp.parentNode;\n\t\t\t\n\t\t\tif (!this.useCssTransforms)\n\t\t\t{\n\t\t\t\tg.removeAttribute('transformOrigin');\n\t\t\t\tg.removeAttribute('transform');\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tvar prev = g.getAttribute('transform');\n\t\t\t\tg.setAttribute('transformOrigin', '0 0');\n\t\t\t\tvar s = Math.round(this.currentScale * 100) / 100;\n\t\t\t\tvar dx = Math.round(this.currentTranslate.x * 100) / 100;\n\t\t\t\tvar dy = Math.round(this.currentTranslate.y * 100) / 100;\n\t\t\t\tg.setAttribute('transform', 'scale(' + s + ',' + s + ')' +\n\t\t\t\t\t'translate(' + dx + ',' + dy + ')');\n\t\n\t\t\t\t// Applies workarounds only if translate has changed\n\t\t\t\tif (prev != g.getAttribute('transform'))\n\t\t\t\t{\n\t\t\t\t\tthis.fireEvent(new mxEventObject('cssTransformChanged'),\n\t\t\t\t\t\t'transform', g.getAttribute('transform'));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t};\n\t\n\tvar graphViewValidateBackgroundPage = mxGraphView.prototype.validateBackgroundPage;\n\tmxGraphView.prototype.validateBackgroundPage = function()\n\t{\n\t\tvar useCssTranforms = this.graph.useCssTransforms, scale = this.scale, \n\t\t\ttranslate = this.translate;\n\t\t\n\t\tif (useCssTranforms)\n\t\t{\n\t\t\tthis.scale = this.graph.currentScale;\n\t\t\tthis.translate = this.graph.currentTranslate;\n\t\t}\n\t\t\n\t\tgraphViewValidateBackgroundPage.apply(this, arguments);\n\t\t\n\t\tif (useCssTranforms)\n\t\t{\n\t\t\tthis.scale = scale;\n\t\t\tthis.translate = translate;\n\t\t}\n\t};\n\n\tvar graphUpdatePageBreaks = mxGraph.prototype.updatePageBreaks;\n\tmxGraph.prototype.updatePageBreaks = function(visible, width, height)\n\t{\n\t\tvar useCssTranforms = this.useCssTransforms, scale = this.view.scale, \n\t\t\ttranslate = this.view.translate;\n\t\n\t\tif (useCssTranforms)\n\t\t{\n\t\t\tthis.view.scale = 1;\n\t\t\tthis.view.translate = new mxPoint(0, 0);\n\t\t\tthis.useCssTransforms = false;\n\t\t}\n\t\t\n\t\tgraphUpdatePageBreaks.apply(this, arguments);\n\t\t\n\t\tif (useCssTranforms)\n\t\t{\n\t\t\tthis.view.scale = scale;\n\t\t\tthis.view.translate = translate;\n\t\t\tthis.useCssTransforms = true;\n\t\t}\n\t};\n})();\n\n/**\n * Sets the XML node for the current diagram.\n */\nGraph.prototype.isLightboxView = function()\n{\n\treturn this.lightbox;\n};\n\n/**\n * Sets the XML node for the current diagram.\n */\nGraph.prototype.isViewer = function()\n{\n\treturn false;\n};\n\n/**\n * Installs automatic layout via styles\n */\nGraph.prototype.labelLinkClicked = function(state, elt, evt)\n{\n\tvar href = elt.getAttribute('href');\n\t\n\t// Blocks and removes unsafe links in labels\n\tif (href != Graph.sanitizeLink(href))\n\t{\n\t\tGraph.sanitizeNode(elt);\n\t}\n\t\n\tif (href != null && !this.isCustomLink(href) && ((mxEvent.isLeftMouseButton(evt) &&\n\t\t!mxEvent.isPopupTrigger(evt)) || mxEvent.isTouchEvent(evt)))\n\t{\n\t\tif (!this.isEnabled() || this.isCellLocked(state.cell))\n\t\t{\n\t\t\tvar target = this.isBlankLink(href) ? this.linkTarget : '_top';\n\t\t\tthis.openLink(this.getAbsoluteUrl(href), target);\n\t\t}\n\t\t\n\t\tmxEvent.consume(evt);\n\t}\n};\n\n/**\n * Returns the size of the page format scaled with the page size.\n */\nGraph.prototype.openLink = function(href, target, allowOpener)\n{\n\tvar result = window;\n\t\n\ttry\n\t{\n\t\thref = Graph.sanitizeLink(href);\n\n\t\tif (href != null)\n\t\t{\n\t\t\t// Workaround for blocking in same iframe\n\t\t\tif (target == '_self' && window != window.top)\n\t\t\t{\n\t\t\t\twindow.location.href = href;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// Avoids page reload for anchors (workaround for IE but used everywhere)\n\t\t\t\tif (href.substring(0, this.baseUrl.length) == this.baseUrl &&\n\t\t\t\t\thref.charAt(this.baseUrl.length) == '#' &&\n\t\t\t\t\ttarget == '_top' && window == window.top)\n\t\t\t\t{\n\t\t\t\t\tvar hash = href.split('#')[1];\n\t\t\n\t\t\t\t\t// Forces navigation if on same hash\n\t\t\t\t\tif (window.location.hash == '#' + hash)\n\t\t\t\t\t{\n\t\t\t\t\t\twindow.location.hash = '';\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\twindow.location.hash = hash;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tresult = window.open(href, (target != null) ?\n\t\t\t\t\t\ttarget : '_blank', (!allowOpener) ?\n\t\t\t\t\t\t'noopener,noreferrer' : null);\n\t\t\t\t\t\n\t\t\t\t\tif (result != null && !allowOpener)\n\t\t\t\t\t{\n\t\t\t\t\t\tresult.opener = null;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\tcatch (e)\n\t{\n\t\t// ignores permission denied\n\t}\n\t\n\treturn result;\n};\n\n/**\n * Adds support for page links.\n */\nGraph.prototype.getLinkTitle = function(href)\n{\n\treturn href.substring(href.lastIndexOf('/') + 1);\n};\n\n/**\n * Adds support for page links.\n */\nGraph.prototype.isCustomLink = function(href)\n{\n\treturn href.substring(0, 5) == 'data:';\n};\n\n/**\n * Adds support for page links.\n */\nGraph.prototype.customLinkClicked = function(link)\n{\n\treturn false;\n};\n\n/**\n * Returns true if the given href references an external protocol that\n * should never open in a new window. Default returns true for mailto.\n */\nGraph.prototype.isExternalProtocol = function(href)\n{\n\treturn href.substring(0, 7) === 'mailto:';\n};\n\n/**\n * Hook for links to open in same window. Default returns true for anchors,\n * links to same domain or if target == 'self' in the config.\n */\nGraph.prototype.isBlankLink = function(href)\n{\n\treturn !this.isExternalProtocol(href) &&\n\t\t(this.linkPolicy === 'blank' ||\n\t\t(this.linkPolicy !== 'self' &&\n\t\t!this.isRelativeUrl(href) &&\n\t\thref.substring(0, this.domainUrl.length) !== this.domainUrl));\n};\n\n/**\n * \n */\nGraph.prototype.isRelativeUrl = function(url)\n{\n\treturn url != null && !this.absoluteUrlPattern.test(url) &&\n\t\turl.substring(0, 5) !== 'data:' &&\n\t\t!this.isExternalProtocol(url);\n};\n\n/**\n * \n */\nGraph.prototype.getAbsoluteUrl = function(url)\n{\n\tif (url != null && this.isRelativeUrl(url))\n\t{\n\t\tif (url.charAt(0) == '#')\n\t\t{\n\t\t\turl = this.baseUrl + url;\n\t\t}\n\t\telse if (url.charAt(0) == '/')\n\t\t{\n\t\t\turl = this.domainUrl + url;\n\t\t}\n\t\telse\n\t\t{\n\t\t\turl = this.domainPathUrl + url;\n\t\t}\n\t}\n\t\n\treturn url;\n};\n\n/**\n * Installs automatic layout via styles\n */\nGraph.prototype.initLayoutManager = function()\n{\n\tthis.layoutManager = new mxLayoutManager(this);\n\t\n\tthis.layoutManager.hasLayout = function(cell)\n\t{\n\t\treturn this.graph.getCellStyle(cell)['childLayout'] != null;\n\t};\n\t\n\tthis.layoutManager.getLayout = function(cell, eventName)\n\t{\n\t\tvar parent = this.graph.model.getParent(cell);\n\t\t\n\t\t// Executes layouts from top to bottom except for nested layouts where\n\t\t// child layouts are executed before and after the parent layout runs\n\t\t// in case the layout changes the size of the child cell\n\t\tif (!this.graph.isCellCollapsed(cell) && (eventName != mxEvent.BEGIN_UPDATE ||\n\t\t\tthis.hasLayout(parent, eventName)))\n\t\t{\n\t\t\tvar style = this.graph.getCellStyle(cell);\n\t\t\t\n\t\t\tif (style['childLayout'] == 'stackLayout')\n\t\t\t{\n\t\t\t\tvar stackLayout = new mxStackLayout(this.graph, true);\n\t\t\t\tstackLayout.resizeParentMax = mxUtils.getValue(style, 'resizeParentMax', '1') == '1';\n\t\t\t\tstackLayout.horizontal = mxUtils.getValue(style, 'horizontalStack', '1') == '1';\n\t\t\t\tstackLayout.resizeParent = mxUtils.getValue(style, 'resizeParent', '1') == '1';\n\t\t\t\tstackLayout.resizeLast = mxUtils.getValue(style, 'resizeLast', '0') == '1';\n\t\t\t\tstackLayout.spacing = style['stackSpacing'] || stackLayout.spacing;\n\t\t\t\tstackLayout.border = style['stackBorder'] || stackLayout.border;\n\t\t\t\tstackLayout.marginLeft = style['marginLeft'] || 0;\n\t\t\t\tstackLayout.marginRight = style['marginRight'] || 0;\n\t\t\t\tstackLayout.marginTop = style['marginTop'] || 0;\n\t\t\t\tstackLayout.marginBottom = style['marginBottom'] || 0;\n\t\t\t\tstackLayout.allowGaps = style['allowGaps'] || 0;\n\t\t\t\tstackLayout.fill = true;\n\t\t\t\t\n\t\t\t\tif (stackLayout.allowGaps)\n\t\t\t\t{\n\t\t\t\t\tstackLayout.gridSize = parseFloat(mxUtils.getValue(style, 'stackUnitSize', 20));\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\treturn stackLayout;\n\t\t\t}\n\t\t\telse if (style['childLayout'] == 'treeLayout')\n\t\t\t{\n\t\t\t\tvar treeLayout = new mxCompactTreeLayout(this.graph);\n\t\t\t\ttreeLayout.horizontal = mxUtils.getValue(style, 'horizontalTree', '1') == '1';\n\t\t\t\ttreeLayout.resizeParent = mxUtils.getValue(style, 'resizeParent', '1') == '1';\n\t\t\t\ttreeLayout.groupPadding = mxUtils.getValue(style, 'parentPadding', 20);\n\t\t\t\ttreeLayout.levelDistance = mxUtils.getValue(style, 'treeLevelDistance', 30);\n\t\t\t\ttreeLayout.maintainParentLocation = true;\n\t\t\t\ttreeLayout.edgeRouting = false;\n\t\t\t\ttreeLayout.resetEdges = false;\n\t\t\t\t\n\t\t\t\treturn treeLayout;\n\t\t\t}\n\t\t\telse if (style['childLayout'] == 'flowLayout')\n\t\t\t{\n\t\t\t\tvar flowLayout = new mxHierarchicalLayout(this.graph, mxUtils.getValue(style,\n\t\t\t\t\t'flowOrientation', mxConstants.DIRECTION_EAST));\n\t\t\t\tflowLayout.resizeParent = mxUtils.getValue(style, 'resizeParent', '1') == '1';\n\t\t\t\tflowLayout.parentBorder = mxUtils.getValue(style, 'parentPadding', 20);\n\t\t\t\tflowLayout.maintainParentLocation = true;\n\t\t\t\t\n\t\t\t\t// Special undocumented styles for changing the hierarchical\n\t\t\t\tflowLayout.intraCellSpacing = mxUtils.getValue(style, 'intraCellSpacing',\n\t\t\t\t\tmxHierarchicalLayout.prototype.intraCellSpacing);\n\t\t\t\tflowLayout.interRankCellSpacing = mxUtils.getValue(style, 'interRankCellSpacing',\n\t\t\t\t\tmxHierarchicalLayout.prototype.interRankCellSpacing);\n\t\t\t\tflowLayout.interHierarchySpacing = mxUtils.getValue(style, 'interHierarchySpacing',\n\t\t\t\t\tmxHierarchicalLayout.prototype.interHierarchySpacing);\n\t\t\t\tflowLayout.parallelEdgeSpacing = mxUtils.getValue(style, 'parallelEdgeSpacing',\n\t\t\t\t\tmxHierarchicalLayout.prototype.parallelEdgeSpacing);\n\t\t\t\t\n\t\t\t\treturn flowLayout;\n\t\t\t}\n\t\t\telse if (style['childLayout'] == 'circleLayout')\n\t\t\t{\n\t\t\t\treturn new mxCircleLayout(this.graph);\n\t\t\t}\n\t\t\telse if (style['childLayout'] == 'organicLayout')\n\t\t\t{\n\t\t\t\treturn new mxFastOrganicLayout(this.graph);\n\t\t\t}\n\t\t\telse if (style['childLayout'] == 'tableLayout')\n\t\t\t{\n\t\t\t\treturn new TableLayout(this.graph);\n\t\t\t}\n\t\t\telse if (style['childLayout'] != null && style['childLayout'].charAt(0) == '[')\n\t\t\t{\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\treturn new mxCompositeLayout(this.graph,\n\t\t\t\t\t\tthis.graph.createLayouts(JSON.parse(\n\t\t\t\t\t\t\tstyle['childLayout'])));\n\t\t\t\t}\n\t\t\t\tcatch (e)\n\t\t\t\t{\n\t\t\t\t\tif (window.console != null)\n\t\t\t\t\t{\n\t\t\t\t\t\tconsole.error(e);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn null;\n\t};\n};\n\n/**\n * Creates an array of graph layouts from the given array of the form [{layout: name, config: obj}, ...]\n * where name is the layout constructor name and config contains the properties of the layout instance.\n */\nGraph.prototype.createLayouts = function(list)\n{\n\tvar layouts = [];\n\n\tfor (var i = 0; i < list.length; i++)\n\t{\n\t\tif (mxUtils.indexOf(Graph.layoutNames, list[i].layout) >= 0)\n\t\t{\n\t\t\t// Handles special case of branch optimizer in orgchart\n\t\t\tvar layout = (list[i].layout == 'mxOrgChartLayout' && list[i].config != null) ?\n\t\t\t\tnew window[list[i].layout](this, list[i].config['branchOptimizer']) :\n\t\t\t\tnew window[list[i].layout](this);\n\n\t\t\tif (list[i].config != null)\n\t\t\t{\n\t\t\t\tfor (var key in list[i].config)\n\t\t\t\t{\n\t\t\t\t\t// Ignores branch optimizer in orgchart (handled above)\n\t\t\t\t\tif (list[i].layout != 'mxOrgChartLayout' ||\n\t\t\t\t\t\tkey != 'branchOptimizer')\n\t\t\t\t\t{\n\t\t\t\t\t\tlayout[key] = list[i].config[key];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tlayouts.push(layout);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tthrow Error(mxResources.get('invalidCallFnNotFound', [list[i].layout]));\n\t\t}\n\t}\n\n\treturn layouts;\n};\n\n/**\n * Returns the metadata of the given cells as a JSON object.\n */\nGraph.prototype.getDataForCells = function(cells)\n{\n\tvar result = [];\n\n\tfor (var i = 0; i < cells.length; i++)\n\t{\n\t\tvar attrs = (cells[i].value != null) ? cells[i].value.attributes : null;\n\t\tvar row = {};\n\t\trow.id = cells[i].id;\n\n\t\tif (attrs != null)\n\t\t{\n\t\t\tfor (var j = 0; j < attrs.length; j++)\n\t\t\t{\n\t\t\t\trow[attrs[j].nodeName] = attrs[j].nodeValue;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\trow.label = this.convertValueToString(cells[i]);\n\t\t}\n\n\t\tresult.push(row);\n\t}\n\n\treturn result;\n};\n\n/**\n * Returns the DOM nodes for the given cells.\n */\nGraph.prototype.getNodesForCells = function(cells)\n{\n\tvar nodes = [];\n\t\n\tfor (var i = 0; i < cells.length; i++)\n\t{\n\t\tvar state = this.view.getState(cells[i]);\n\t\t\n\t\tif (state != null)\n\t\t{\n\t\t\tvar shapes = this.cellRenderer.getShapesForState(state);\n\t\t\t\n\t\t\tfor (var j = 0; j < shapes.length; j++)\n\t\t\t{\n\t\t\t\tif (shapes[j] != null && shapes[j].node != null)\n\t\t\t\t{\n\t\t\t\t\tnodes.push(shapes[j].node);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// Adds folding icon\n\t\t\tif (state.control != null && state.control.node != null)\n\t\t\t{\n\t\t\t\tnodes.push(state.control.node);\n\t\t\t}\n\t\t}\n\t}\n\t\n\treturn nodes;\n};\n\n/**\n * Creates animations for the given cells.\n */\n Graph.prototype.createWipeAnimations = function(cells, wipeIn)\n {\n\tvar animations = [];\n\t\n\tfor (var i = 0; i < cells.length; i++)\n\t{\n\t\tvar state = this.view.getState(cells[i]);\n\n\t\tif (state != null && state.shape != null)\n\t\t{\n\t\t\t// TODO: include descendants\n\t\t\tif (this.model.isEdge(state.cell) &&\n\t\t\t\tstate.absolutePoints != null &&\n\t\t\t\tstate.absolutePoints.length > 1)\n\t\t\t{\n\t\t\t\tanimations.push(this.createEdgeWipeAnimation(state, wipeIn));\n\t\t\t}\n\t\t\telse if (this.model.isVertex(state.cell) &&\n\t\t\t\tstate.shape.bounds != null)\n\t\t\t{\n\t\t\t\tanimations.push(this.createVertexWipeAnimation(state, wipeIn));\n\t\t\t}\n\t\t}\n\t}\n\n\treturn animations;\n};\n\n/**\n * Creates an object to show the given edge cell state.\n */\nGraph.prototype.createEdgeWipeAnimation = function(state, wipeIn)\n{\n\tvar pts = state.absolutePoints.slice();\n\tvar segs = state.segments;\n\tvar total = state.length;\n\tvar n = pts.length;\n \n\treturn {\n\t\texecute: mxUtils.bind(this, function(step, steps)\n\t\t{\n\t\t\tif (state.shape != null)\n\t\t\t{\n\t\t\t\tvar pts2 = [pts[0]];\n\t\t\t\tvar f = step / steps;\n\n\t\t\t\tif (!wipeIn)\n\t\t\t\t{\n\t\t\t\t\tf = 1 - f;\n\t\t\t\t}\n\n\t\t\t\tvar dist = total * f;\n\n\t\t\t\tfor (var i = 1; i < n; i++)\n\t\t\t\t{\n\t\t\t\t\tif (dist <= segs[i - 1])\n\t\t\t\t\t{\n\t\t\t\t\t\tpts2.push(new mxPoint(pts[i - 1].x + (pts[i].x - pts[i - 1].x) * dist / segs[i - 1],\n\t\t\t\t\t\t\tpts[i - 1].y + (pts[i].y - pts[i - 1].y) * dist / segs[i - 1]));\n\t\t\t\t\t\t \n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tdist -= segs[i - 1];\n\t\t\t\t\t\tpts2.push(pts[i]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\n\t\t\t\tstate.shape.points = pts2;\n\t\t\t\tstate.shape.redraw();\n\n\t\t\t\tif (step == 0)\n\t\t\t\t{\n\t\t\t\t\tGraph.setOpacityForNodes(this.getNodesForCells([state.cell]), 1);\n\t\t\t\t}\n\n\t\t\t\tif (state.text != null && state.text.node != null)\n\t\t\t\t{\n\t\t\t\t\tstate.text.node.style.opacity = f;\n\t\t\t\t}\n\t\t\t}\n\t\t}),\n\t\tstop: mxUtils.bind(this, function()\n\t\t{\n\t\t\tif (state.shape != null)\n\t\t\t{\n\t\t\t\tstate.shape.points = pts;\n\t\t\t\tstate.shape.redraw();\n\n\t\t\t\tif (state.text != null && state.text.node != null)\n\t\t\t\t{\n\t\t\t\t\tstate.text.node.style.opacity = ''\n\t\t\t\t}\n\n\t\t\t\tGraph.setOpacityForNodes(this.getNodesForCells([state.cell]), (wipeIn) ? 1 : 0);\n\t\t\t}\n\t\t})\n\t};\n};\n  \n /**\n  * Creates an object to show the given vertex cell state.\n  */\nGraph.prototype.createVertexWipeAnimation = function(state, wipeIn)\n{\n\tvar bds = new mxRectangle.fromRectangle(state.shape.bounds);\n\n\treturn {\n\t\texecute: mxUtils.bind(this, function(step, steps)\n\t\t{\n\t\t\tif (state.shape != null)\n\t\t\t{\n\t\t\t\tvar f = step / steps;\n\n\t\t\t\tif (!wipeIn)\n\t\t\t\t{\n\t\t\t\t\tf = 1 - f;\n\t\t\t\t}\n\n\t\t\t\tstate.shape.bounds = new mxRectangle(bds.x, bds.y, bds.width * f, bds.height);\n\t\t\t\tstate.shape.redraw();\n\n\t\t\t\tif (step == 0)\n\t\t\t\t{\n\t\t\t\t\tGraph.setOpacityForNodes(this.getNodesForCells([state.cell]), 1);\n\t\t\t\t}\n\n\t\t\t\tif (state.text != null && state.text.node != null)\n\t\t\t\t{\n\t\t\t\t\tstate.text.node.style.opacity = f;\n\t\t\t\t}\n\t\t\t}\n\t\t}),\n\t\tstop: mxUtils.bind(this, function()\n\t\t{\n\t\t\tif (state.shape != null)\n\t\t\t{\n\t\t\t\tstate.shape.bounds = bds;\n\t\t\t\tstate.shape.redraw();\n\t\t\t\n\t\t\t\tif (state.text != null && state.text.node != null)\n\t\t\t\t{\n\t\t\t\t\tstate.text.node.style.opacity = ''\n\t\t\t\t}\n\n\t\t\t\tGraph.setOpacityForNodes(this.getNodesForCells([state.cell]), (wipeIn) ? 1 : 0);\n\t\t\t}\n\t\t})\n\t};\n};\n\n/**\n * Runs the animations for the given cells.\n */\n Graph.prototype.executeAnimations = function(animations, done, steps, delay)\n {\n\tsteps = (steps != null) ? steps : 30;\n\tdelay = (delay != null) ? delay : 30;\n\tvar thread = null;\n\tvar step = 0;\n\t\n\tvar animate = mxUtils.bind(this, function()\n\t{\n\t\tif (step == steps || this.stoppingCustomActions)\n\t\t{\n\t\t\twindow.clearInterval(thread);\n\t\t\t\n\t\t\tfor (var i = 0; i < animations.length; i++)\n\t\t\t{\n\t\t\t\tanimations[i].stop();\n\t\t\t}\n\n\t\t\tif (done != null)\n\t\t\t{\n\t\t\t\tdone();\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tfor (var i = 0; i < animations.length; i++)\n\t\t\t{\n\t\t\t\tanimations[i].execute(step, steps);\n\t\t\t}\n\t\t}\n\n\t\tstep++;\n\t});\n\t\n\tthread = window.setInterval(animate, delay);\n\tanimate();\n};\n\n/**\n * Returns the size of the page format scaled with the page size.\n */\nGraph.prototype.getPageSize = function()\n{\n\treturn (this.pageVisible) ? new mxRectangle(0, 0, this.pageFormat.width * this.pageScale,\n\t\t\tthis.pageFormat.height * this.pageScale) : this.scrollTileSize;\n};\n\n/**\n * Returns a rectangle describing the position and count of the\n * background pages, where x and y are the position of the top,\n * left page and width and height are the vertical and horizontal\n * page count.\n */\nGraph.prototype.getPageLayout = function(bounds, tr, s)\n{\n\tbounds = (bounds != null) ? bounds : this.getGraphBounds();\n\ttr = (tr != null) ? tr : this.view.translate;\n\ts = (s != null) ? s : this.view.scale;\n\tvar size = this.getPageSize();\n\n\tif (bounds.width == 0 || bounds.height == 0)\n\t{\n\t\treturn new mxRectangle(0, 0, 1, 1);\n\t}\n\telse\n\t{\n\t\tvar x0 = Math.floor(Math.ceil(bounds.x / s - tr.x) / size.width);\n\t\tvar y0 = Math.floor(Math.ceil(bounds.y / s - tr.y) / size.height);\n\t\tvar w0 = Math.ceil((Math.floor((bounds.x + bounds.width) /\n\t\t\ts) - tr.x) / size.width) - x0;\n\t\tvar h0 = Math.ceil((Math.floor((bounds.y + bounds.height) /\n\t\t\ts) - tr.y) / size.height) - y0;\n\n\t\treturn new mxRectangle(x0, y0, w0, h0);\n\t}\n};\n\n/**\n * Returns the default view translation for the given page layout.\n */\nGraph.prototype.getDefaultTranslate = function(pageLayout)\n{\n\tvar pad = this.getPagePadding();\n\tvar size = this.getPageSize();\n\t\n\treturn new mxPoint(pad.x - pageLayout.x * size.width,\n\t\tpad.y - pageLayout.y * size.height);\n};\n\n/**\n * Updates the minimum graph size\n */\nGraph.prototype.updateMinimumSize = function()\n{\n\tvar pageLayout = this.getPageLayout();\n\tvar pad = this.getPagePadding();\n\tvar size = this.getPageSize();\n\t\n\tvar minw = Math.ceil(2 * pad.x + pageLayout.width * size.width);\n\tvar minh = Math.ceil(2 * pad.y + pageLayout.height * size.height);\n\t\n\tif (this.minimumGraphSize == null ||\n\t\tthis.minimumGraphSize.width != minw ||\n\t\tthis.minimumGraphSize.height != minh)\n\t{\n\t\tthis.minimumGraphSize = new mxRectangle(0, 0, minw, minh);\n\t}\n};\n\n/**\n * Sanitizes the given HTML markup.\n */\nGraph.prototype.sanitizeHtml = function(value, editing)\n{\n\treturn Graph.sanitizeHtml(value, editing);\n};\n\n/**\n * Revalidates all cells with placeholders in the current graph model.\n */\nGraph.prototype.updatePlaceholders = function()\n{\n\tvar model = this.model;\n\tvar validate = false;\n\t\n\tfor (var key in this.model.cells)\n\t{\n\t\tvar cell = this.model.cells[key];\n\t\t\n\t\tif (this.isReplacePlaceholders(cell))\n\t\t{\n\t\t\tthis.view.invalidate(cell, false, false);\n\t\t\tvalidate = true;\n\t\t}\n\t}\n\t\n\tif (validate)\n\t{\n\t\tthis.view.validate();\n\t}\n};\n\n/**\n * Adds support for placeholders in labels.\n */\nGraph.prototype.isReplacePlaceholders = function(cell)\n{\n\treturn cell.value != null && typeof(cell.value) == 'object' &&\n\t\tcell.value.getAttribute('placeholders') == '1';\n};\n\n/**\n * Returns true if the given mouse wheel event should be used for zooming. This\n * is invoked if no dialogs are showing and returns true with Alt or Control\n * (or cmd in macOS only) is pressed.\n */\nGraph.prototype.isZoomWheelEvent = function(evt)\n{\n\treturn (Graph.zoomWheel && !mxEvent.isShiftDown(evt) && !mxEvent.isMetaDown(evt) &&\n\t\t!mxEvent.isAltDown(evt) && (!mxEvent.isControlDown(evt) || mxClient.IS_MAC)) ||\n\t\t(!Graph.zoomWheel && (mxEvent.isAltDown(evt) || mxEvent.isControlDown(evt)));\n};\n\n/**\n * Returns true if the given scroll wheel event should be used for scrolling.\n */\nGraph.prototype.isScrollWheelEvent = function(evt)\n{\n\treturn !this.isZoomWheelEvent(evt);\n};\n\n/**\n * Adds Alt+click to select cells behind cells (Shift+Click on Chrome OS).\n */\nGraph.prototype.isTransparentClickEvent = function(evt)\n{\n\treturn mxEvent.isAltDown(evt) || (mxClient.IS_CHROMEOS && mxEvent.isShiftDown(evt));\n};\n\n/**\n * Adds ctrl+shift+connect to disable connections.\n */\nGraph.prototype.isIgnoreTerminalEvent = function(evt)\n{\n\treturn mxEvent.isAltDown(evt) && !mxEvent.isShiftDown(evt) &&\n\t\t!mxEvent.isControlDown(evt) && !mxEvent.isMetaDown(evt);\n};\n\n/**\n * Returns true if the given edge should be ignored.\n */\nGraph.prototype.isEdgeIgnored = function(cell)\n{\n\tvar result = false;\n\t\n\tif (cell != null)\n\t{\n\t\tvar style = this.getCurrentCellStyle(cell);\n\n\t\tresult = mxUtils.getValue(style, 'ignoreEdge', '0') == '1';\n\t}\n\t\n\treturn result;\n};\n\n/**\n * Adds support for placeholders in labels.\n */\nGraph.prototype.isSplitTarget = function(target, cells, evt)\n{\n\treturn !this.model.isEdge(cells[0]) &&\n\t\t!mxEvent.isAltDown(evt) && !mxEvent.isShiftDown(evt) &&\n\t\tmxGraph.prototype.isSplitTarget.apply(this, arguments);\n};\n\n/**\n * Adds support for placeholders in labels.\n */\nGraph.prototype.getLabel = function(cell)\n{\n\tvar result = mxGraph.prototype.getLabel.apply(this, arguments);\n\t\n\tif (result != null && this.isReplacePlaceholders(cell) && cell.getAttribute('placeholder') == null)\n\t{\n\t\tresult = this.replacePlaceholders(cell, result);\n\t}\n\t\n\treturn result;\n};\n\n/**\n * Adds labelMovable style.\n */\nGraph.prototype.isLabelMovable = function(cell)\n{\n\tvar style = this.getCurrentCellStyle(cell);\n\t\n\treturn !this.isCellLocked(cell) &&\n\t\t((this.model.isEdge(cell) && this.edgeLabelsMovable) ||\n\t\t(this.model.isVertex(cell) && (this.vertexLabelsMovable ||\n\t\tmxUtils.getValue(style, 'labelMovable', '0') == '1')));\n};\n\n/**\n * Adds event if grid size is changed.\n */\nGraph.prototype.setGridSize = function(value)\n{\n\tthis.gridSize = value;\n\tthis.fireEvent(new mxEventObject('gridSizeChanged'));\n};\n\n/**\n * Adds event if default parent is changed.\n */\nGraph.prototype.setDefaultParent = function(cell)\n{\n\tthis.defaultParent = cell;\n\tthis.fireEvent(new mxEventObject('defaultParentChanged'));\n};\n\n/**\n * Function: getClickableLinkForCell\n * \n * Returns the first non-null link for the cell or its ancestors.\n * \n * Parameters:\n * \n * cell - <mxCell> whose link should be returned.\n */\nGraph.prototype.getClickableLinkForCell = function(cell)\n{\n\tdo\n\t{\n\t\tvar link = this.getLinkForCell(cell);\n\t\t\n\t\tif (link != null)\n\t\t{\n\t\t\treturn link;\n\t\t}\n\t\t\n\t\tcell = this.model.getParent(cell);\n\t} while (cell != null);\n\t\n\treturn null;\n};\n\n/**\n * Private helper method.\n */\nGraph.prototype.getGlobalVariable = function(name)\n{\n\tvar val = null;\n\t\n\tif (name == 'date')\n\t{\n\t\tval = new Date().toLocaleDateString();\n\t}\n\telse if (name == 'time')\n\t{\n\t\tval = new Date().toLocaleTimeString();\n\t}\n\telse if (name == 'timestamp')\n\t{\n\t\tval = new Date().toLocaleString();\n\t}\n\telse if (name.substring(0, 5) == 'date{')\n\t{\n\t\tvar fmt = name.substring(5, name.length - 1);\n\t\tval = this.formatDate(new Date(), fmt);\n\t}\n\n\treturn val;\n};\n\n/**\n * Formats a date, see http://blog.stevenlevithan.com/archives/date-time-format\n */\nGraph.prototype.formatDate = function(date, mask, utc)\n{\n\t// LATER: Cache regexs\n\tif (this.dateFormatCache == null)\n\t{\n\t\tthis.dateFormatCache = {\n\t\t\ti18n: {\n\t\t\t    dayNames: [\n\t\t\t        \"Sun\", \"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\",\n\t\t\t        \"Sunday\", \"Monday\", \"Tuesday\", \"Wednesday\", \"Thursday\", \"Friday\", \"Saturday\"\n\t\t\t    ],\n\t\t\t    monthNames: [\n\t\t\t        \"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\",\n\t\t\t        \"January\", \"February\", \"March\", \"April\", \"May\", \"June\", \"July\", \"August\", \"September\", \"October\", \"November\", \"December\"\n\t\t\t    ]\n\t\t\t},\n\t\t\t\n\t\t\tmasks: {\n\t\t\t    \"default\":      \"ddd mmm dd yyyy HH:MM:ss\",\n\t\t\t    shortDate:      \"m/d/yy\",\n\t\t\t    mediumDate:     \"mmm d, yyyy\",\n\t\t\t    longDate:       \"mmmm d, yyyy\",\n\t\t\t    fullDate:       \"dddd, mmmm d, yyyy\",\n\t\t\t    shortTime:      \"h:MM TT\",\n\t\t\t    mediumTime:     \"h:MM:ss TT\",\n\t\t\t    longTime:       \"h:MM:ss TT Z\",\n\t\t\t    isoDate:        \"yyyy-mm-dd\",\n\t\t\t    isoTime:        \"HH:MM:ss\",\n\t\t\t    isoDateTime:    \"yyyy-mm-dd'T'HH:MM:ss\",\n\t\t\t    isoUtcDateTime: \"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'\"\n\t\t\t}\n\t\t};\n\t}\n    \n    var dF = this.dateFormatCache;\n\tvar token = /d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\\1?|[LloSZ]|\"[^\"]*\"|'[^']*'/g,\n    \ttimezone = /\\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\\d{4})?)\\b/g,\n    \ttimezoneClip = /[^-+\\dA-Z]/g,\n    \tpad = function (val, len) {\n\t\t\tval = String(val);\n\t\t\tlen = len || 2;\n\t\t\twhile (val.length < len) val = \"0\" + val;\n\t\t\treturn val;\n\t\t};\n\n    // You can't provide utc if you skip other args (use the \"UTC:\" mask prefix)\n    if (arguments.length == 1 && Object.prototype.toString.call(date) == \"[object String]\" && !/\\d/.test(date)) {\n        mask = date;\n        date = undefined;\n    }\n\n    // Passing date through Date applies Date.parse, if necessary\n    date = date ? new Date(date) : new Date;\n    if (isNaN(date)) throw SyntaxError(\"invalid date\");\n\n    mask = String(dF.masks[mask] || mask || dF.masks[\"default\"]);\n\n    // Allow setting the utc argument via the mask\n    if (mask.slice(0, 4) == \"UTC:\") {\n        mask = mask.slice(4);\n        utc = true;\n    }\n\n    var _ = utc ? \"getUTC\" : \"get\",\n        d = date[_ + \"Date\"](),\n        D = date[_ + \"Day\"](),\n        m = date[_ + \"Month\"](),\n        y = date[_ + \"FullYear\"](),\n        H = date[_ + \"Hours\"](),\n        M = date[_ + \"Minutes\"](),\n        s = date[_ + \"Seconds\"](),\n        L = date[_ + \"Milliseconds\"](),\n        o = utc ? 0 : date.getTimezoneOffset(),\n        flags = {\n            d:    d,\n            dd:   pad(d),\n            ddd:  dF.i18n.dayNames[D],\n            dddd: dF.i18n.dayNames[D + 7],\n            m:    m + 1,\n            mm:   pad(m + 1),\n            mmm:  dF.i18n.monthNames[m],\n            mmmm: dF.i18n.monthNames[m + 12],\n            yy:   String(y).slice(2),\n            yyyy: y,\n            h:    H % 12 || 12,\n            hh:   pad(H % 12 || 12),\n            H:    H,\n            HH:   pad(H),\n            M:    M,\n            MM:   pad(M),\n            s:    s,\n            ss:   pad(s),\n            l:    pad(L, 3),\n            L:    pad(L > 99 ? Math.round(L / 10) : L),\n            t:    H < 12 ? \"a\"  : \"p\",\n            tt:   H < 12 ? \"am\" : \"pm\",\n            T:    H < 12 ? \"A\"  : \"P\",\n            TT:   H < 12 ? \"AM\" : \"PM\",\n            Z:    utc ? \"UTC\" : (String(date).match(timezone) || [\"\"]).pop().replace(timezoneClip, \"\"),\n            o:    (o > 0 ? \"-\" : \"+\") + pad(Math.floor(Math.abs(o) / 60) * 100 + Math.abs(o) % 60, 4),\n            S:    [\"th\", \"st\", \"nd\", \"rd\"][d % 10 > 3 ? 0 : (d % 100 - d % 10 != 10) * d % 10]\n        };\n\n    return mask.replace(token, function ($0)\n    {\n        return $0 in flags ? flags[$0] : $0.slice(1, $0.length - 1);\n    });\n};\n\n/**\n * \n */\nGraph.prototype.getLayerForCell = function(cell)\n{\n\twhile (cell != null && !this.model.isLayer(cell))\n\t{\n\t\tcell = this.model.getParent(cell);\n\t}\n\n\treturn cell;\n};\n\n/**\n * \n */\nGraph.prototype.getLayerForCells = function(cells)\n{\n\tvar result = null;\n\t\n\tif (cells.length > 0)\n\t{\n\t\tresult = this.getLayerForCell(cells[0]);\n\t\t\n\t\tfor (var i = 1; i < cells.length; i++)\n\t\t{\n\t\t\tif (!this.model.isAncestor(result, cells[i]))\n\t\t\t{\n\t\t\t\tresult = null;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\t\t\n\treturn result;\n};\n\n/**\n * \n */\nGraph.prototype.createLayersDialog = function(onchange, inverted)\n{\n\tvar div = document.createElement('div');\n\tdiv.style.position = 'absolute';\n\t\n\tvar model = this.getModel();\n\tvar childCount = model.getChildCount(model.root);\n\t\n\tfor (var i = 0; i < childCount; i++)\n\t{\n\t\t(mxUtils.bind(this, function(layer)\n\t\t{\n\t\t\tvar title = this.convertValueToString(layer) ||\n\t\t\t\t(mxResources.get('background') || 'Background');\n\n\t\t\tvar span = document.createElement('div');\n\t\t\tspan.style.overflow = 'hidden';\n\t\t\tspan.style.textOverflow = 'ellipsis';\n\t\t\tspan.style.padding = '2px';\n\t\t\tspan.style.whiteSpace = 'nowrap';\n\t\t\tspan.style.cursor = 'pointer';\n\t\t\tspan.setAttribute('title', mxResources.get(\n\t\t\t\tmodel.isVisible(layer) ?\n\t\t\t\t'hideIt' : 'show', [title]));\n\n\t\t\tvar inp = document.createElement('img');\n\t\t\tinp.setAttribute('draggable', 'false');\n\t\t\tinp.setAttribute('align', 'absmiddle');\n\t\t\tinp.setAttribute('border', '0');\n\t\t\tinp.style.position = 'relative';\n\t\t\tinp.style.width = '16px';\n\t\t\tinp.style.padding = '0px 6px 0 4px';\n\n\t\t\tif (inverted)\n\t\t\t{\n\t\t\t\tinp.style.filter = 'invert(100%)';\n\t\t\t\tinp.style.top = '-2px';\n\t\t\t}\n\n\t\t\tspan.appendChild(inp);\n\t\t\t\n\t\t\tmxUtils.write(span, title);\n\t\t\tdiv.appendChild(span);\n\n\t\t\tfunction update()\n\t\t\t{\n\t\t\t\tif (model.isVisible(layer))\n\t\t\t\t{\n\t\t\t\t\tinp.setAttribute('src', Editor.visibleImage);\n\t\t\t\t\tmxUtils.setOpacity(span, 75);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tinp.setAttribute('src', Editor.hiddenImage);\n\t\t\t\t\tmxUtils.setOpacity(span, 25);\n\t\t\t\t}\n\t\t\t};\n\t\t\t\n\t\t\tmxEvent.addListener(span, 'click', function()\n\t\t\t{\n\t\t\t\tmodel.setVisible(layer, !model.isVisible(layer));\n\t\t\t\tupdate();\n\n\t\t\t\tif (onchange != null)\n\t\t\t\t{\n\t\t\t\t\tonchange(layer);\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tupdate();\n\t\t})(model.getChildAt(model.root, i)));\n\t}\n\t\n\treturn div;\n};\n\n/**\n * Private helper method.\n */\nGraph.prototype.replacePlaceholders = function(cell, str, vars, translate)\n{\n\tvar result = [];\n\t\n\tif (str != null)\n\t{\n\t\tvar last = 0;\n\t\t\n\t\twhile (match = this.placeholderPattern.exec(str))\n\t\t{\n\t\t\tvar val = match[0];\n\t\t\t\n\t\t\tif (val.length > 2 && val != '%label%' && val != '%tooltip%')\n\t\t\t{\n\t\t\t\tvar tmp = null;\n\t\n\t\t\t\tif (match.index > last && str.charAt(match.index - 1) == '%')\n\t\t\t\t{\n\t\t\t\t\ttmp = val.substring(1);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tvar name = val.substring(1, val.length - 1);\n\t\t\t\t\t\n\t\t\t\t\t// Workaround for invalid char for getting attribute in older versions of IE\n\t\t\t\t\tif (name == 'id')\n\t\t\t\t\t{\n\t\t\t\t\t\ttmp = cell.id;\n\t\t\t\t\t}\n\t\t\t\t\telse if (name.indexOf('{') < 0)\n\t\t\t\t\t{\n\t\t\t\t\t\tvar current = cell;\n\t\t\t\t\t\t\n\t\t\t\t\t\twhile (tmp == null && current != null)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif (current.value != null && typeof(current.value) == 'object')\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif (Graph.translateDiagram && Graph.diagramLanguage != null)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\ttmp = current.getAttribute(name + '_' + Graph.diagramLanguage);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tif (tmp == null)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\ttmp = (current.hasAttribute(name)) ? ((current.getAttribute(name) != null) ?\n\t\t\t\t\t\t\t\t\t\tcurrent.getAttribute(name) : '') : null;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tcurrent = this.model.getParent(current);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif (tmp == null)\n\t\t\t\t\t{\n\t\t\t\t\t\ttmp = this.getGlobalVariable(name);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif (tmp == null && vars != null)\n\t\t\t\t\t{\n\t\t\t\t\t\ttmp = vars[name];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\n\t\t\t\tresult.push(str.substring(last, match.index) + ((tmp != null) ? tmp : val));\n\t\t\t\tlast = match.index + val.length;\n\t\t\t}\n\t\t}\n\t\t\n\t\tresult.push(str.substring(last));\n\t}\n\n\treturn result.join('');\n};\n\n/**\n * Resolves the given cells in the model and selects them.\n */\nGraph.prototype.restoreSelection = function(cells)\n{\n\tif (cells != null && cells.length > 0)\n\t{\n\t\tvar temp = [];\n\n\t\tfor (var i = 0; i < cells.length; i++)\n\t\t{\n\t\t\tvar newCell = this.model.getCell(cells[i].id);\n\n\t\t\tif (newCell != null)\n\t\t\t{\n\t\t\t\ttemp.push(newCell);\n\t\t\t}\n\t\t}\n\n\t\tthis.setSelectionCells(temp);\n\t}\n\telse\n\t{\n\t\tthis.clearSelection();\n\t}\n};\n\n/**\n * Adds table range selection with Shift+Click.\n */\nGraph.prototype.selectCellForEvent = function(cell, evt)\n{\n\tif (!mxEvent.isShiftDown(evt) || this.isSelectionEmpty() ||\n\t\t!this.selectTableRange(this.getSelectionCell(), cell))\n\t{\n\t\tmxGraph.prototype.selectCellForEvent.apply(this, arguments);\n\t}\n};\n\n/**\n * Returns true if \n */\nGraph.prototype.selectTableRange = function(startCell, endCell)\n{\n\tvar result = false;\n\n\tif (this.isTableCell(startCell) && this.isTableCell(endCell))\n\t{\n\t\tvar startRow = this.model.getParent(startCell);\n\t\tvar table = this.model.getParent(startRow);\n\t\tvar endRow = this.model.getParent(endCell);\n\n\t\tif (table == this.model.getParent(endRow))\n\t\t{\n\t\t\tvar startCellIndex = startRow.getIndex(startCell);\n\t\t\tvar startRowIndex = table.getIndex(startRow);\n\t\t\tvar endCellIndex = endRow.getIndex(endCell);\n\t\t\tvar endRowIndex = table.getIndex(endRow);\n\n\t\t\tvar fromRow = Math.min(startRowIndex, endRowIndex);\n\t\t\tvar toRow = Math.max(startRowIndex, endRowIndex);\n\t\t\tvar fromCell = Math.min(startCellIndex, endCellIndex);\n\t\t\tvar toCell = Math.max(startCellIndex, endCellIndex);\n\t\t\t\n\t\t\tvar cells = [];\n\n\t\t\tfor (var row = fromRow; row <= toRow; row++)\n\t\t\t{\n\t\t\t\tvar currentRow = this.model.getChildAt(table, row);\n\t\t\t\t\n\t\t\t\tfor (var col = fromCell; col <= toCell; col++)\n\t\t\t\t{\n\t\t\t\t\tcells.push(this.model.getChildAt(currentRow, col));\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (cells.length > 0 && (cells.length > 1 ||\n\t\t\t\tthis.getSelectionCount() > 1 ||\n\t\t\t\t!this.isCellSelected(cells[0])))\n\t\t\t{\n\t\t\t\tthis.setSelectionCells(cells);\n\t\t\t\tresult = true;\n\t\t\t}\n\t\t}\n\t}\n\n\treturn result;\n};\n\n/**\n * Returns the cells for the given table range.\n */\nGraph.prototype.snapCellsToGrid = function(cells, gridSize)\n{\n\tthis.getModel().beginUpdate();\n\ttry\n\t{\n\t\tfor (var i = 0; i < cells.length; i++)\n\t\t{\n\t\t\tvar cell = cells[i];\n\t\t\tvar geo = this.getCellGeometry(cell);\n\n\t\t\tif (geo != null)\n\t\t\t{\n\t\t\t\tgeo = geo.clone();\n\n\t\t\t\tif (this.getModel().isVertex(cell))\n\t\t\t\t{\n\t\t\t\t\tgeo.x = Math.round(geo.x / gridSize) * gridSize;\n\t\t\t\t\tgeo.y = Math.round(geo.y / gridSize) * gridSize;\n\t\t\t\t\tgeo.width = Math.round(geo.width / gridSize) * gridSize;\n\t\t\t\t\tgeo.height = Math.round(geo.height / gridSize) * gridSize;\n\t\t\t\t}\n\t\t\t\telse if (this.getModel().isEdge(cell) && geo.points != null)\n\t\t\t\t{\n\t\t\t\t\tfor (var j = 0; j < geo.points.length; j++)\n\t\t\t\t\t{\n\t\t\t\t\t\tgeo.points[j].x = Math.round(geo.points[j].x / gridSize) * gridSize;\n\t\t\t\t\t\tgeo.points[j].y = Math.round(geo.points[j].y / gridSize) * gridSize;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tthis.getModel().setGeometry(cell, geo);\n\t\t\t}\n\t\t}\n\t}\n\tfinally\n\t{\n\t\tthis.getModel().endUpdate();\n\t}\n};\n\n/**\n * Creates a drop handler for inserting the given cells.\n */\nGraph.prototype.removeChildCells = function(cell)\n{\n\tthis.model.beginUpdate();\n\ttry\n\t{\n\t\tvar childCount = this.model.getChildCount(cell);\n\t\t\n\t\tfor (var j = childCount; j >= 0; j--)\n\t\t{\n\t\t\tthis.model.remove(this.model.getChildAt(cell, j));\n\t\t}\n\t}\n\tfinally\n\t{\n\t\tthis.model.endUpdate();\n\t}\n};\n\n/**\n * Creates a drop handler for inserting the given cells.\n */\nGraph.prototype.updateShapes = function(source, targets)\n{\n\tthis.model.beginUpdate();\n\ttry\n\t{\n\t\t// Replaces target styles and removes composite childs\n\t\tfor (var i = 0; i < targets.length; i++)\n\t\t{\n\t\t\tif ((this.model.isVertex(source) && this.model.isVertex(targets[i])) ||\n\t\t\t\tthis.model.isEdge(source) && this.model.isEdge(targets[i]))\n\t\t\t{\n\t\t\t\tvar style = this.copyStyle(targets[i]);\n\t\t\t\tthis.model.setStyle(targets[i], this.model.getStyle(source));\n\t\t\t\tthis.pasteStyle(style, [targets[i]]);\n\t\t\t}\n\t\t\t\n\t\t\tif (mxUtils.getValue(this.getCellStyle(targets[i],\n\t\t\t\tfalse), 'composite', '0') == '1')\n\t\t\t{\n\t\t\t\tthis.removeChildCells(targets[i]);\n\t\t\t}\n\t\t}\n\t}\n\tfinally\n\t{\n\t\tthis.model.endUpdate();\n\t}\n};\n\n/**\n * Selects cells for connect vertex return value.\n */\nGraph.prototype.selectCellsForConnectVertex = function(cells, evt, hoverIcons)\n{\n\t// Selects only target vertex if one exists\n\tif (cells.length == 2 && this.model.isVertex(cells[1]))\n\t{\n\t\tthis.setSelectionCell(cells[1]);\n\t\tthis.scrollCellToVisible(cells[1]);\n\t\t\n\t\tif (hoverIcons != null)\n\t\t{\n\t\t\t// Adds hover icons for cloned vertex or hides icons\n\t\t\tif (mxEvent.isTouchEvent(evt))\n\t\t\t{\n\t\t\t\thoverIcons.update(hoverIcons.getState(this.view.getState(cells[1])));\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\thoverIcons.reset();\n\t\t\t}\n\t\t}\n\t}\n\telse\n\t{\n\t\tthis.setSelectionCells(cells);\n\t}\n};\n\n/**\n * Never connects children in stack layouts or tables.\n */\nGraph.prototype.isCloneConnectSource = function(source)\n{\n\tvar layout = null;\n\n\tif (this.layoutManager != null)\n\t{\n\t\tlayout = this.layoutManager.getLayout(this.model.getParent(source));\n\t}\n\t\n\treturn this.isTableRow(source) || this.isTableCell(source) ||\n\t\t(layout != null && layout.constructor == mxStackLayout);\n};\n\n/**\n * Inserts the given edge before the given cell.\n */\nGraph.prototype.insertEdgeBeforeCell = function(edge, cell)\n{\n\tvar index = null;\n\tvar tmp = cell;\n\t\n\twhile (tmp.parent != null && tmp.geometry != null &&\n\t\ttmp.geometry.relative && tmp.parent != edge.parent)\n\t{\n\t\ttmp = this.model.getParent(tmp);\n\t}\n\n\tif (tmp != null && tmp.parent != null && tmp.parent == edge.parent)\n\t{\n\t\tvar index = tmp.parent.getIndex(tmp);\n\t\tthis.model.add(tmp.parent, edge, index);\n\t}\n};\n\n/**\n * Adds a connection to the given vertex or clones the vertex in special layout\n * containers without creating a connection.\n */\nGraph.prototype.connectVertex = function(source, direction, length, evt, forceClone, ignoreCellAt, createTarget, done)\n{\t\n\tignoreCellAt = (ignoreCellAt) ? ignoreCellAt : false;\n\t\n\t// Ignores relative edge labels\n\tif (source.geometry.relative && this.model.isEdge(source.parent))\n\t{\n\t\treturn [];\n\t}\n\t\n\t// Uses parent for relative child cells\n\twhile (source.geometry.relative && this.model.isVertex(source.parent))\n\t{\n\t\tsource = source.parent;\n\t}\n\t\n\t// Handles clone connect sources\n\tvar cloneSource = this.isCloneConnectSource(source);\n\tvar composite = (cloneSource) ? source : this.getCompositeParent(source);\n\t\n\tvar pt = (source.geometry.relative && source.parent.geometry != null) ?\n\t\tnew mxPoint(source.parent.geometry.width * source.geometry.x,\n\t\t\tsource.parent.geometry.height * source.geometry.y) :\n\t\tnew mxPoint(composite.geometry.x, composite.geometry.y);\n\t\t\n\tif (direction == mxConstants.DIRECTION_NORTH)\n\t{\n\t\tpt.x += composite.geometry.width / 2;\n\t\tpt.y -= length ;\n\t}\n\telse if (direction == mxConstants.DIRECTION_SOUTH)\n\t{\n\t\tpt.x += composite.geometry.width / 2;\n\t\tpt.y += composite.geometry.height + length;\n\t}\n\telse if (direction == mxConstants.DIRECTION_WEST)\n\t{\n\t\tpt.x -= length;\n\t\tpt.y += composite.geometry.height / 2;\n\t}\n\telse\n\t{\n\t\tpt.x += composite.geometry.width + length;\n\t\tpt.y += composite.geometry.height / 2;\n\t}\n\n\tvar parentState = this.view.getState(this.model.getParent(source));\n\tvar s = this.view.scale;\n\tvar t = this.view.translate;\n\tvar dx = t.x * s;\n\tvar dy = t.y * s;\n\t\n\tif (parentState != null && this.model.isVertex(parentState.cell))\n\t{\n\t\tdx = parentState.x;\n\t\tdy = parentState.y;\n\t}\n\n\t// Workaround for relative child cells\n\tif (this.model.isVertex(source.parent) && source.geometry.relative)\n\t{\n\t\tpt.x += source.parent.geometry.x;\n\t\tpt.y += source.parent.geometry.y;\n\t}\n\t\n\t// Checks end point for target cell and container\n\tvar rect = (!ignoreCellAt) ? new mxRectangle(dx + pt.x * s, dy + pt.y * s).grow(40 * s) : null;\n\tvar tempCells = (rect != null) ? this.getCells(0, 0, 0, 0, null, null, rect, null, true) : null;\n\tvar sourceState = this.view.getState(source);\n\tvar container = null;\n\tvar target = null;\n\t\n\tif (tempCells != null)\n\t{\n\t\ttempCells = tempCells.reverse();\n\t\t\n\t\tfor (var i = 0; i < tempCells.length; i++)\n\t\t{\n\t\t\tif (!this.isCellLocked(tempCells[i]) && !this.model.isEdge(tempCells[i]) && tempCells[i] != source)\n\t\t\t{\n\t\t\t\t// Direct parent overrides all possible containers\n\t\t\t\tif (!this.model.isAncestor(source, tempCells[i]) && this.isContainer(tempCells[i]) &&\n\t\t\t\t\t(container == null || tempCells[i] == this.model.getParent(source)))\n\t\t\t\t{\n\t\t\t\t\tcontainer = tempCells[i];\n\t\t\t\t}\n\t\t\t\t// Containers are used as target cells but swimlanes are used as parents\n\t\t\t\telse if (target == null && this.isCellConnectable(tempCells[i]) &&\n\t\t\t\t\t!this.model.isAncestor(tempCells[i], source) &&\n\t\t\t\t\t!this.isSwimlane(tempCells[i]))\n\t\t\t\t{\n\t\t\t\t\tvar targetState = this.view.getState(tempCells[i]);\n\t\t\t\t\t\n\t\t\t\t\tif (sourceState != null && targetState != null && !mxUtils.intersects(sourceState, targetState))\n\t\t\t\t\t{\n\t\t\t\t\t\ttarget = tempCells[i];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tvar duplicate = (!mxEvent.isShiftDown(evt) || mxEvent.isControlDown(evt)) || forceClone;\n\t\n\tif (duplicate && (urlParams['sketch'] != '1' || forceClone))\n\t{\n\t\tif (direction == mxConstants.DIRECTION_NORTH)\n\t\t{\n\t\t\tpt.y -= source.geometry.height / 2;\n\t\t}\n\t\telse if (direction == mxConstants.DIRECTION_SOUTH)\n\t\t{\n\t\t\tpt.y += source.geometry.height / 2;\n\t\t}\n\t\telse if (direction == mxConstants.DIRECTION_WEST)\n\t\t{\n\t\t\tpt.x -= source.geometry.width / 2;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tpt.x += source.geometry.width / 2;\n\t\t}\n\t}\n\n\tvar result = [];\n\tvar realTarget = target;\n\ttarget = container;\n\t\n\tvar execute = mxUtils.bind(this, function(targetCell)\n\t{\n\t\tif (createTarget == null || targetCell != null || (target == null && cloneSource))\n\t\t{\n\t\t\tthis.model.beginUpdate();\n\t\t\ttry\n\t\t\t{\n\t\t\t\tif (realTarget == null && duplicate)\n\t\t\t\t{\n\t\t\t\t\t// Handles relative and composite cells\n\t\t\t\t\tvar cellToClone = this.getAbsoluteParent((targetCell != null) ? targetCell : source);\n\t\t\t\t\tcellToClone =  (cloneSource) ? source : this.getCompositeParent(cellToClone);\n\t\t\t\t\trealTarget = (targetCell != null) ? targetCell : this.duplicateCells([cellToClone], false)[0];\n\t\t\t\t\t\n\t\t\t\t\tif (targetCell != null)\n\t\t\t\t\t{\n\t\t\t\t\t\tthis.addCells([realTarget], this.model.getParent(source), null, null, null, true);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tvar geo = this.getCellGeometry(realTarget);\n\t\n\t\t\t\t\tif (geo != null)\n\t\t\t\t\t{\n\t\t\t\t\t\tif (targetCell != null && urlParams['sketch'] == '1')\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif (direction == mxConstants.DIRECTION_NORTH)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tpt.y -= geo.height / 2;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse if (direction == mxConstants.DIRECTION_SOUTH)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tpt.y += geo.height / 2;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse if (direction == mxConstants.DIRECTION_WEST)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tpt.x -= geo.width / 2;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tpt.x += geo.width / 2;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\n\t\t\t\t\t\tgeo.x = pt.x - geo.width / 2;\n\t\t\t\t\t\tgeo.y = pt.y - geo.height / 2;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif (container != null)\n\t\t\t\t\t{\n\t\t\t\t\t\tthis.addCells([realTarget], container, null, null, null, true);\n\t\t\t\t\t\ttarget = null;\n\t\t\t\t\t}\n\t\t\t\t\telse if (duplicate && !cloneSource)\n\t\t\t\t\t{\n\t\t\t\t\t\tthis.addCells([realTarget], this.getDefaultParent(), null, null, null, true);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tvar edge = ((mxEvent.isControlDown(evt) && mxEvent.isShiftDown(evt) && duplicate) ||\n\t\t\t\t\t(target == null && cloneSource)) ? null : this.insertEdge(this.model.getParent(source),\n\t\t\t\t\t\tnull, '', source, realTarget, this.createCurrentEdgeStyle());\n\t\t\n\t\t\t\tif (edge != null)\n\t\t\t\t{\n\t\t\t\t\tresult.push(edge);\n\t\t\t\t\tthis.applyNewEdgeStyle(source, [edge], direction);\n\t\t\t\t\t\n\t\t\t\t\tif (this.connectionHandler.insertBeforeSource)\n\t\t\t\t\t{\n\t\t\t\t\t\tthis.insertEdgeBeforeCell(edge, source);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// Special case: Click on west icon puts clone before cell\n\t\t\t\tif (target == null && realTarget != null && source.parent != null &&\n\t\t\t\t\tcloneSource && direction == mxConstants.DIRECTION_WEST)\n\t\t\t\t{\n\t\t\t\t\tvar index = source.parent.getIndex(source);\n\t\t\t\t\tthis.model.add(source.parent, realTarget, index);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (target == null && realTarget != null)\n\t\t\t\t{\n\t\t\t\t\tresult.push(realTarget);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (realTarget == null && edge != null)\n\t\t\t\t{\n\t\t\t\t\tedge.geometry.setTerminalPoint(pt, false);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (edge != null)\n\t\t\t\t{\n\t\t\t\t\tthis.fireEvent(new mxEventObject('cellsInserted', 'cells', [edge]));\n\t\t\t\t}\n\t\t\t}\n\t\t\tfinally\n\t\t\t{\n\t\t\t\tthis.model.endUpdate();\n\t\t\t}\n\t\t}\n\t\t\t\n\t\tif (done != null)\n\t\t{\n\t\t\tdone(result);\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn result;\n\t\t}\n\t});\n\t\n\tif (createTarget != null && realTarget == null && duplicate &&\n\t\t(target != null || !cloneSource))\n\t{\n\t\tcreateTarget(dx + pt.x * s, dy + pt.y * s, execute);\n\t}\n\telse\n\t{\n\t\treturn execute(realTarget);\n\t}\n};\n\n/**\n * Returns all labels in the diagram as a string.\n */\nGraph.prototype.getIndexableText = function(cells)\n{\n\tcells = (cells != null) ? cells : this.model.\n\t\tgetDescendants(this.model.root);\n\tvar tmp = document.createElement('div');\n\tvar labels = [];\n\tvar label = '';\n\t\n\tfor (var i = 0; i < cells.length; i++)\n\t{\n\t\tvar cell = cells[i];\n\t\t\n\t\tif (this.model.isVertex(cell) || this.model.isEdge(cell))\n\t\t{\n\t\t\tif (this.isHtmlLabel(cell))\n\t\t\t{\n\t\t\t\ttmp.innerHTML = Graph.sanitizeHtml(this.getLabel(cell));\n\t\t\t\tlabel = mxUtils.extractTextWithWhitespace([tmp]);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tlabel = this.getLabel(cell);\n\t\t\t}\n\n\t\t\tlabel = mxUtils.trim(label.replace(/[\\x00-\\x1F\\x7F-\\x9F]|\\s+/g, ' '));\n\t\t\t\n\t\t\tif (label.length > 0)\n\t\t\t{\n\t\t\t\tlabels.push(label);\n\t\t\t}\n\t\t}\n\t}\n\t\n\treturn labels.join(' ');\n};\n\n/**\n * Returns the label for the given cell.\n */\nGraph.prototype.convertValueToString = function(cell)\n{\n\tvar value = this.model.getValue(cell);\n\t\n\tif (value != null && typeof(value) == 'object')\n\t{\n\t\tvar result = null;\n\t\t\n\t\tif (this.isReplacePlaceholders(cell) && cell.getAttribute('placeholder') != null)\n\t\t{\n\t\t\tvar name = cell.getAttribute('placeholder');\n\t\t\tvar current = cell;\n\t\t\t\t\t\n\t\t\twhile (result == null && current != null)\n\t\t\t{\n\t\t\t\tif (current.value != null && typeof(current.value) == 'object')\n\t\t\t\t{\n\t\t\t\t\tresult = (current.hasAttribute(name)) ? ((current.getAttribute(name) != null) ?\n\t\t\t\t\t\t\tcurrent.getAttribute(name) : '') : null;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tcurrent = this.model.getParent(current);\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tvar result = null;\n\t\t\t\n\t\t\tif (Graph.translateDiagram && Graph.diagramLanguage != null)\n\t\t\t{\n\t\t\t\tresult = value.getAttribute('label_' + Graph.diagramLanguage);\n\t\t\t}\n\t\t\t\n\t\t\tif (result == null)\n\t\t\t{\n\t\t\t\tresult = value.getAttribute('label') || '';\n\t\t\t}\n\t\t}\n\n\t\treturn result || '';\n\t}\n\t\n\treturn mxGraph.prototype.convertValueToString.apply(this, arguments);\n};\n\n/**\n * Returns the link for the given cell.\n */\nGraph.prototype.getLinksForState = function(state)\n{\n\tif (state != null && state.text != null && state.text.node != null)\n\t{\n\t\treturn state.text.node.getElementsByTagName('a');\n\t}\n\t\n\treturn null;\n};\n\n/**\n * Returns the link for the given cell.\n */\nGraph.prototype.getLinkForCell = function(cell)\n{\n\tif (cell.value != null && typeof(cell.value) == 'object')\n\t{\n\t\tvar link = cell.value.getAttribute('link');\n\t\t\n\t\t// Removes links with leading javascript: protocol\n\t\t// TODO: Check more possible attack vectors\n\t\tif (link != null && link.toLowerCase().substring(0, 11) === 'javascript:')\n\t\t{\n\t\t\tlink = link.substring(11);\n\t\t}\n\t\t\n\t\treturn link;\n\t}\n\t\n\treturn null;\n};\n\n/**\n * Returns the link target for the given cell.\n */\nGraph.prototype.getLinkTargetForCell = function(cell)\n{\n\tif (cell.value != null && typeof(cell.value) == 'object')\n\t{\n\t\treturn cell.value.getAttribute('linkTarget');\n\t}\n\n\treturn null;\n};\n\n/**\n * Adds style post processing steps.\n */\nGraph.prototype.postProcessCellStyle = function(cell, style)\n{\n\treturn this.updateHorizontalStyle(cell,this.replaceDefaultColors(cell,\n\t\tmxGraph.prototype.postProcessCellStyle.apply(this, arguments)));\n};\n\n/**\n * Overrides label orientation for collapsed swimlanes inside stack and\n * for partial rectangles inside tables.\n */\nGraph.prototype.updateHorizontalStyle = function(cell, style)\n{\n\tif (cell != null && style != null && this.layoutManager != null)\n\t{\n\t\tvar parent = this.model.getParent(cell);\n\t\t\n\t\tif (this.model.isVertex(parent) && this.isCellCollapsed(cell))\n\t\t{\n\t\t\tvar layout = this.layoutManager.getLayout(parent);\n\t\t\t\n\t\t\tif (layout != null && layout.constructor == mxStackLayout)\n\t\t\t{\n\t\t\t\tstyle[mxConstants.STYLE_HORIZONTAL] = !layout.horizontal;\n\t\t\t}\n\t\t}\n\t}\n\t\n\treturn style;\n};\n\n/**\n * Replaces default colors. \n */\nGraph.prototype.replaceDefaultColors = function(cell, style)\n{\n\tif (style != null)\n\t{\n\t\tvar bg = mxUtils.hex2rgb(this.shapeBackgroundColor);\n\t\tvar fg = mxUtils.hex2rgb(this.shapeForegroundColor);\n\n\t\tthis.replaceDefaultColor(style, mxConstants.STYLE_FONTCOLOR, fg, bg);\n\t\tthis.replaceDefaultColor(style, mxConstants.STYLE_FILLCOLOR, bg, fg);\n\t\tthis.replaceDefaultColor(style, mxConstants.STYLE_GRADIENTCOLOR, fg, bg);\n\t\tthis.replaceDefaultColor(style, mxConstants.STYLE_STROKECOLOR, fg, bg);\n\t\tthis.replaceDefaultColor(style, mxConstants.STYLE_IMAGE_BORDER, fg, bg);\n\t\tthis.replaceDefaultColor(style, mxConstants.STYLE_IMAGE_BACKGROUND, bg, fg);\n\t\tthis.replaceDefaultColor(style, mxConstants.STYLE_LABEL_BORDERCOLOR, fg, bg);\n\t\tthis.replaceDefaultColor(style, mxConstants.STYLE_SWIMLANE_FILLCOLOR, bg, fg);\n\t\tthis.replaceDefaultColor(style, mxConstants.STYLE_LABEL_BACKGROUNDCOLOR, bg, fg);\n\t}\n\n\treturn style;\n};\n\n/**\n * Replaces the colors for the given key.\n */\nGraph.prototype.replaceDefaultColor = function(style, key, value, inverseValue)\n{\n\tif (style != null && style[key] == 'default' && value != null)\n\t{\n\t\tstyle[key] = this.getDefaultColor(style, key, value, inverseValue);\n\t}\n};\n\n/**\n * Replaces the colors for the given key.\n */\nGraph.prototype.getDefaultColor = function(style, key, defaultValue, inverseDefaultValue)\n{\n\tvar temp = 'default' + key.charAt(0).toUpperCase() + key.substring(1);\n\n\tif (style[temp] == 'invert')\n\t{\n\t\tdefaultValue = inverseDefaultValue;\n\t}\n\n\treturn defaultValue;\n};\n\n/**\n * Disables alternate width persistence for stack layout parents\n */\nGraph.prototype.updateAlternateBounds = function(cell, geo, willCollapse)\n{\n\tif (cell != null && geo != null && this.layoutManager != null && geo.alternateBounds != null)\n\t{\n\t\tvar layout = this.layoutManager.getLayout(this.model.getParent(cell));\n\t\t\n\t\tif (layout != null && layout.constructor == mxStackLayout)\n\t\t{\n\t\t\tif (layout.horizontal)\n\t\t\t{\n\t\t\t\tgeo.alternateBounds.height = 0;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tgeo.alternateBounds.width = 0;\n\t\t\t}\n\t\t}\n\t}\n\t\n\tmxGraph.prototype.updateAlternateBounds.apply(this, arguments);\n};\n\n/**\n * Adds Shift+collapse/expand and size management for folding inside stack\n */\nGraph.prototype.isMoveCellsEvent = function(evt, state)\n{\n\treturn mxEvent.isShiftDown(evt) || mxUtils.getValue(state.style, 'moveCells', '0') == '1';\n};\n\n/**\n * Adds Shift+collapse/expand and size management for folding inside stack\n */\nGraph.prototype.foldCells = function(collapse, recurse, cells, checkFoldable, evt)\n{\n\trecurse = (recurse != null) ? recurse : false;\n\t\n\tif (cells == null)\n\t{\n\t\tcells = this.getFoldableCells(this.getSelectionCells(), collapse);\n\t}\n\t\n\tif (cells != null)\n\t{\n\t\tthis.model.beginUpdate();\n\t\t\n\t\ttry\n\t\t{\n\t\t\tmxGraph.prototype.foldCells.apply(this, arguments);\n\t\t\t\n\t\t\t// Resizes all parent stacks if alt is not pressed\n\t\t\tif (this.layoutManager != null)\n\t\t\t{\n\t\t\t\tfor (var i = 0; i < cells.length; i++)\n\t\t\t\t{\n\t\t\t\t\tvar state = this.view.getState(cells[i]);\n\t\t\t\t\tvar geo = this.getCellGeometry(cells[i]);\n\t\t\t\t\t\n\t\t\t\t\tif (state != null && geo != null)\n\t\t\t\t\t{\n\t\t\t\t\t\tvar dx = Math.round(geo.width - state.width / this.view.scale);\n\t\t\t\t\t\tvar dy = Math.round(geo.height - state.height / this.view.scale);\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (dy != 0 || dx != 0)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tvar parent = this.model.getParent(cells[i]);\n\t\t\t\t\t\t\tvar layout = this.layoutManager.getLayout(parent);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif (layout == null)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t// Moves cells to the right and down after collapse/expand\n\t\t\t\t\t\t\t\tif (evt != null && this.isMoveCellsEvent(evt, state))\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tthis.moveSiblings(state, parent, dx, dy);\n\t\t\t\t\t\t\t\t} \n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse if ((evt == null || !mxEvent.isAltDown(evt)) &&\n\t\t\t\t\t\t\t\tlayout.constructor == mxStackLayout && !layout.resizeLast)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tthis.resizeParentStacks(parent, layout, dx, dy);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tfinally\n\t\t{\n\t\t\tthis.model.endUpdate();\n\t\t}\n\t\t\n\t\t// Selects cells after folding\n\t\tif (this.isEnabled())\n\t\t{\n\t\t\tthis.setSelectionCells(cells);\n\t\t}\n\t}\n};\n\n/**\n * Overrides label orientation for collapsed swimlanes inside stack.\n */\nGraph.prototype.moveSiblings = function(state, parent, dx, dy)\n{\n\tthis.model.beginUpdate();\n\ttry\n\t{\n\t\tvar cells = this.getCellsBeyond(state.x, state.y, parent, true, true);\n\t\t\n\t\tfor (var i = 0; i < cells.length; i++)\n\t\t{\n\t\t\tif (cells[i] != state.cell)\n\t\t\t{\n\t\t\t\tvar tmp = this.view.getState(cells[i]);\n\t\t\t\tvar geo = this.getCellGeometry(cells[i]);\n\t\t\t\t\n\t\t\t\tif (tmp != null && geo != null)\n\t\t\t\t{\n\t\t\t\t\tgeo = geo.clone();\n\t\t\t\t\tgeo.translate(Math.round(dx * Math.max(0, Math.min(1, (tmp.x - state.x) / state.width))),\n\t\t\t\t\t\tMath.round(dy * Math.max(0, Math.min(1, (tmp.y - state.y) / state.height))));\n\t\t\t\t\tthis.model.setGeometry(cells[i], geo);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\tfinally\n\t{\n\t\tthis.model.endUpdate();\n\t}\n};\n\n/**\n * Overrides label orientation for collapsed swimlanes inside stack.\n */\nGraph.prototype.resizeParentStacks = function(parent, layout, dx, dy)\n{\n\tif (this.layoutManager != null && layout != null && layout.constructor == mxStackLayout && !layout.resizeLast)\n\t{\n\t\tthis.model.beginUpdate();\n\t\ttry\n\t\t{\n\t\t\tvar dir = layout.horizontal;\n\t\t\t\n\t\t\t// Bubble resize up for all parent stack layouts with same orientation\n\t\t\twhile (parent != null && layout != null && layout.constructor == mxStackLayout &&\n\t\t\t\tlayout.horizontal == dir && !layout.resizeLast)\n\t\t\t{\n\t\t\t\tvar pgeo = this.getCellGeometry(parent);\n\t\t\t\tvar pstate = this.view.getState(parent);\n\t\t\t\t\n\t\t\t\tif (pstate != null && pgeo != null)\n\t\t\t\t{\n\t\t\t\t\tpgeo = pgeo.clone();\n\t\t\t\t\t\n\t\t\t\t\tif (layout.horizontal)\n\t\t\t\t\t{\n\t\t\t\t\t\tpgeo.width += dx + Math.min(0, pstate.width / this.view.scale - pgeo.width);\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tpgeo.height += dy + Math.min(0, pstate.height / this.view.scale - pgeo.height);\n\t\t\t\t\t}\n\t\t\n\t\t\t\t\tthis.model.setGeometry(parent, pgeo);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tparent = this.model.getParent(parent);\n\t\t\t\tlayout = this.layoutManager.getLayout(parent);\n\t\t\t}\n\t\t}\n\t\tfinally\n\t\t{\n\t\t\tthis.model.endUpdate();\n\t\t}\n\t}\n};\n\n/**\n * Disables drill-down for non-swimlanes.\n */\nGraph.prototype.isContainer = function(cell)\n{\n\tvar style = this.getCurrentCellStyle(cell);\n\t\n\tif (this.isSwimlane(cell))\n\t{\n\t\treturn style['container'] != '0';\n\t}\n\telse\n\t{\n\t\treturn style['container'] == '1';\n\t}\n};\n\n/**\n * Adds a connectable style.\n */\nGraph.prototype.isCellConnectable = function(cell)\n{\n\tvar style = this.getCurrentCellStyle(cell);\n\t\n\treturn (style['connectable'] != null) ? style['connectable'] != '0' :\n\t\tmxGraph.prototype.isCellConnectable.apply(this, arguments);\n};\n\n/**\n * Adds labelMovable style.\n */\nGraph.prototype.isLabelMovable = function(cell)\n{\n\tvar style = this.getCurrentCellStyle(cell);\n\t\n\treturn (style['movableLabel'] != null) ? style['movableLabel'] != '0' :\n\t\tmxGraph.prototype.isLabelMovable.apply(this, arguments);\n};\n\n/**\n * Function: selectAll\n * \n * Selects all children of the given parent cell or the children of the\n * default parent if no parent is specified. To select leaf vertices and/or\n * edges use <selectCells>.\n * \n * Parameters:\n * \n * parent - Optional <mxCell> whose children should be selected.\n * Default is <defaultParent>.\n */\nGraph.prototype.selectAll = function(parent)\n{\n\tparent = parent || this.getDefaultParent();\n\n\tif (!this.isCellLocked(parent))\n\t{\n\t\tmxGraph.prototype.selectAll.apply(this, arguments);\n\t}\n};\n\n/**\n * Function: selectCells\n * \n * Selects all vertices and/or edges depending on the given boolean\n * arguments recursively, starting at the given parent or the default\n * parent if no parent is specified. Use <selectAll> to select all cells.\n * For vertices, only cells with no children are selected.\n * \n * Parameters:\n * \n * vertices - Boolean indicating if vertices should be selected.\n * edges - Boolean indicating if edges should be selected.\n * parent - Optional <mxCell> that acts as the root of the recursion.\n * Default is <defaultParent>.\n */\nGraph.prototype.selectCells = function(vertices, edges, parent)\n{\n\tparent = parent || this.getDefaultParent();\n\n\tif (!this.isCellLocked(parent))\n\t{\n\t\tmxGraph.prototype.selectCells.apply(this, arguments);\n\t}\n};\n\n/**\n * Function: getSwimlaneAt\n * \n * Returns the bottom-most swimlane that intersects the given point (x, y)\n * in the cell hierarchy that starts at the given parent.\n * \n * Parameters:\n * \n * x - X-coordinate of the location to be checked.\n * y - Y-coordinate of the location to be checked.\n * parent - <mxCell> that should be used as the root of the recursion.\n * Default is <defaultParent>.\n */\nGraph.prototype.getSwimlaneAt = function (x, y, parent)\n{\n\tvar result = mxGraph.prototype.getSwimlaneAt.apply(this, arguments);\n\t\n\tif (this.isCellLocked(result))\n\t{\n\t\tresult = null;\n\t}\n\t\n\treturn result;\n};\n\n/**\n * Disables folding for non-swimlanes.\n */\nGraph.prototype.isCellFoldable = function(cell)\n{\n\tvar style = this.getCurrentCellStyle(cell);\n\t\n\treturn this.foldingEnabled && mxUtils.getValue(style,\n\t\tmxConstants.STYLE_RESIZABLE, '1') != '0' &&\n\t\t(style['treeFolding'] == '1' ||\n\t\t(!this.isCellLocked(cell) &&\n\t\t((this.isContainer(cell) && style['collapsible'] != '0') ||\n\t\t(!this.isContainer(cell) && style['collapsible'] == '1'))));\n};\n\n/**\n * Stops all interactions and clears the selection.\n */\nGraph.prototype.reset = function()\n{\n\tif (this.isEditing())\n\t{\n\t\tthis.stopEditing(true);\n\t}\n\t\n\tthis.escape();\n\t\t\t\t\t\n\tif (!this.isSelectionEmpty())\n\t{\n\t\tthis.clearSelection();\n\t}\n};\n\n/**\n * Overridden to limit zoom to 1% - 16.000%.\n */\nGraph.prototype.zoom = function(factor, center)\n{\n\tfactor = Math.max(0.01, Math.min(this.view.scale * factor, 160)) / this.view.scale;\n\t\n\tmxGraph.prototype.zoom.apply(this, arguments);\n};\n\n/**\n * Function: zoomIn\n * \n * Zooms into the graph by <zoomFactor>.\n */\nGraph.prototype.zoomIn = function()\n{\n\t// Switches to 1% zoom steps below 15%\n\tif (this.view.scale < 0.15)\n\t{\n\t\tthis.zoom((this.view.scale + 0.01) / this.view.scale);\n\t}\n\telse\n\t{\n\t\t// Uses to 5% zoom steps for better grid rendering in webkit\n\t\t// and to avoid rounding errors for zoom steps\n\t\tthis.zoom((Math.round(this.view.scale * this.zoomFactor * 20) / 20) / this.view.scale);\n\t}\n};\n\n/**\n * Function: zoomOut\n * \n * Zooms out of the graph by <zoomFactor>.\n */\nGraph.prototype.zoomOut = function()\n{\n\t// Switches to 1% zoom steps below 15%\n\tif (this.view.scale <= 0.15)\n\t{\n\t\tthis.zoom((this.view.scale - 0.01) / this.view.scale);\n\t}\n\telse\n\t{\n\t\t// Uses to 5% zoom steps for better grid rendering in webkit\n\t\t// and to avoid rounding errors for zoom steps\n\t\tthis.zoom((Math.round(this.view.scale * (1 / this.zoomFactor) * 20) / 20) / this.view.scale);\n\t}\n};\n\n/**\n * Function: fitPages\n * \n * Fits the given number of pages to the current view horizontally.\n * If pageCount is null then all pages will be used. This should not\n * be called if pages are not visible.\n */\nGraph.prototype.fitPages = function(pageCount, ignoreHeight)\n{\n\tvar vcount = 1;\n\n\tif (pageCount == null)\n\t{\n\t\tvar layout = this.getPageLayout();\n\t\tpageCount = layout.width;\n\t\tvcount = layout.height;\n\t}\n\n\tvar ps = this.pageScale;\n\tvar fmt = this.pageFormat;\n\tvar cw = this.container.clientWidth - 10;\n\tvar ch = this.container.clientHeight - 10;\n\tvar sx = cw / (pageCount * fmt.width) / ps;\n\n\tvar scale = Math.floor(20 * ((ignoreHeight) ? sx :\n\t\tMath.min(sx, ch / (vcount * fmt.height) / ps))) / 20;\n\n\tthis.zoomTo(scale);\n\t\n\tif (mxUtils.hasScrollbars(this.container))\n\t{\n\t\tvar pad = this.getPagePadding();\n\t\tthis.container.scrollLeft = Math.min(pad.x * this.view.scale,\n\t\t\t(this.container.scrollWidth - this.container.clientWidth) / 2) - 1;\n\t\t\n\t\tif (!ignoreHeight)\n\t\t{\n\t\t\tif (pageCount >= 2)\n\t\t\t{\n\t\t\t\tthis.container.scrollTop = Math.min(pad.y,\n\t\t\t\t\t(this.container.scrollHeight -\n\t\t\t\t\tthis.container.clientHeight) / 2);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tthis.container.scrollTop = pad.y * this.view.scale - 1;\n\t\t\t}\n\t\t}\n\t}\n};\n\n/**\n * Function: fitWindow\n * \n * Sets the current visible rectangle of the window in graph coordinates.\n */\nGraph.prototype.fitWindow = function(bounds, border)\n{\n\tborder = (border != null) ? border : 10;\n\t\n\tvar cw = this.container.clientWidth - border;\n\tvar ch = this.container.clientHeight - border;\n\tvar scale = Math.floor(20 * Math.min(cw / bounds.width, ch / bounds.height)) / 20;\n\tthis.zoomTo(scale);\n\n\tif (mxUtils.hasScrollbars(this.container))\n\t{\n\t\tvar t = this.view.translate;\n\t\tthis.container.scrollLeft = (bounds.x + t.x) * this.view.scale -\n\t\t\tMath.max((cw - bounds.width * this.view.scale) / 2 + border / 2, 0);\n\t\tthis.container.scrollTop = (bounds.y + t.y) * this.view.scale -\n\t\t\tMath.max((ch - bounds.height * this.view.scale) / 2 + border / 2, 0);\n\t}\n};\n\n/**\n * Overrides tooltips to show custom tooltip or metadata.\n */\nGraph.prototype.convertValueToTooltip = function(cell)\n{\n\tvar tmp = null;\n\n\tif (mxUtils.isNode(cell.value))\n\t{\n\t\tif (Graph.translateDiagram && Graph.diagramLanguage != null)\n\t\t{\n\t\t\ttmp = cell.value.getAttribute('tooltip_' + Graph.diagramLanguage);\n\t\t}\n\t\t\n\t\tif (tmp == null)\n\t\t{\n\t\t\ttmp = cell.value.getAttribute('tooltip');\n\t\t}\n\t\t\n\t\tif (tmp != null)\n\t\t{\n\t\t\tif (tmp != null && this.isReplacePlaceholders(cell))\n\t\t\t{\n\t\t\t\ttmp = this.replacePlaceholders(cell, tmp);\n\t\t\t}\n\t\t\t\n\t\t\ttmp = Graph.sanitizeHtml(tmp);\n\t\t}\n\t}\n\n\treturn tmp;\n};\n\n/**\n * Overrides tooltips to show custom tooltip or metadata.\n */\nGraph.prototype.getTooltipForCell = function(cell)\n{\n\tvar tip = '';\n\t\n\tif (mxUtils.isNode(cell.value))\n\t{\n\t\ttip = this.convertValueToTooltip(cell);\n\n\t\tif (tip == null)\n\t\t{\n\t\t\tvar ignored = this.builtInProperties;\n\t\t\tvar attrs = cell.value.attributes;\n\t\t\tvar temp = [];\n\t\t\ttip = '';\n\n\t\t\t// Hides links in edit mode\n\t\t\tif (this.isEnabled())\n\t\t\t{\n\t\t\t\tignored.push('linkTarget');\n\t\t\t\tignored.push('link');\n\t\t\t}\n\t\t\t\n\t\t\tfor (var i = 0; i < attrs.length; i++)\n\t\t\t{\n\t\t\t\tif (((Graph.translateDiagram && attrs[i].nodeName == 'label') ||\n\t\t\t\t\tmxUtils.indexOf(ignored, attrs[i].nodeName) < 0) &&\n\t\t\t\t\tattrs[i].nodeValue.length > 0)\n\t\t\t\t{\n\t\t\t\t\ttemp.push({name: attrs[i].nodeName, value: attrs[i].nodeValue});\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// Sorts by name\n\t\t\ttemp.sort(function(a, b)\n\t\t\t{\n\t\t\t\tif (a.name < b.name)\n\t\t\t\t{\n\t\t\t\t\treturn -1;\n\t\t\t\t}\n\t\t\t\telse if (a.name > b.name)\n\t\t\t\t{\n\t\t\t\t\treturn 1;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\treturn 0;\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tfor (var i = 0; i < temp.length; i++)\n\t\t\t{\n\t\t\t\tif (temp[i].name != 'link' || !this.isCustomLink(temp[i].value))\n\t\t\t\t{\n\t\t\t\t\ttip += ((temp[i].name != 'link') ? '<b>' + mxUtils.htmlEntities(temp[i].name) +\n\t\t\t\t\t\t':</b> ' : '') + mxUtils.htmlEntities(temp[i].value) + '\\n';\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif (tip.length > 0)\n\t\t\t{\n\t\t\t\ttip = tip.substring(0, tip.length - 1);\n\t\t\t\t\n\t\t\t\tif (mxClient.IS_SVG)\n\t\t\t\t{\n\t\t\t\t\ttip = '<div style=\"max-width:360px;text-overflow:ellipsis;overflow:hidden;\">' +\n\t\t\t\t\t\ttip + '</div>';\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t\n\treturn tip;\n};\n\n/**\n * Adds rack child layout style.\n */\nGraph.prototype.getFlowAnimationStyle = function()\n{\n\tvar head = document.getElementsByTagName('head')[0];\n\t\n\tif (head != null && this.flowAnimationStyle == null)\n\t{\n\t\tthis.flowAnimationStyle = document.createElement('style')\n\t\tthis.flowAnimationStyle.setAttribute('id',\n\t\t\t'geEditorFlowAnimation-' + Editor.guid());\n\t\tthis.flowAnimationStyle.type = 'text/css';\n\t\tvar id = this.flowAnimationStyle.getAttribute('id');\n\t\tthis.flowAnimationStyle.innerHTML = this.getFlowAnimationStyleCss(id);\n\n\t\thead.appendChild(this.flowAnimationStyle);\n\t}\n\n\treturn this.flowAnimationStyle;\n};\n\n/**\n * Adds rack child layout style.\n */\nGraph.prototype.getFlowAnimationStyleCss = function(id)\n{\n\treturn '.' + id + ' {\\n' +\n\t  'animation: ' + id + ' 0.5s linear;\\n' +\n\t  'animation-iteration-count: infinite;\\n' +\n\t'}\\n' +\n\t'@keyframes ' + id + ' {\\n' +\n\t  'to {\\n' +\n\t    'stroke-dashoffset: ' + (this.view.scale * -16) + ';\\n' +\n\t  '}\\n' +\n\t'}';\n};\n\n/**\n * Turns the given string into an array.\n */\nGraph.prototype.stringToBytes = function(str)\n{\n\treturn Graph.stringToBytes(str);\n};\n\n/**\n * Turns the given array into a string.\n */\nGraph.prototype.bytesToString = function(arr)\n{\n\treturn Graph.bytesToString(arr);\n};\n\n/**\n * Returns a base64 encoded version of the compressed outer XML of the given node.\n */\nGraph.prototype.compressNode = function(node)\n{\n\treturn Graph.compressNode(node);\n};\n\n/**\n * Returns a base64 encoded version of the compressed string.\n */\nGraph.prototype.compress = function(data, deflate)\n{\n\treturn Graph.compress(data, deflate);\n};\n\n/**\n * Returns a decompressed version of the base64 encoded string.\n */\nGraph.prototype.decompress = function(data, inflate)\n{\n\treturn Graph.decompress(data, inflate);\n};\n\n/**\n * Redirects to Graph.zapGremlins.\n */\nGraph.prototype.zapGremlins = function(text)\n{\n\treturn Graph.zapGremlins(text);\n};\n\n/**\n * Hover icons are used for hover, vertex handler and drag from sidebar.\n */\nHoverIcons = function(graph)\n{\n\tmxEventSource.call(this);\n\tthis.graph = graph;\n\tthis.init();\n};\n\n// Extends mxEventSource\nmxUtils.extend(HoverIcons, mxEventSource);\n\n/**\n * Up arrow.\n */\nHoverIcons.prototype.arrowSpacing = 2;\n\n/**\n * Delay to switch to another state for overlapping bbox. Default is 500ms.\n */\nHoverIcons.prototype.updateDelay = 500;\n\n/**\n * Delay to switch between states. Default is 140ms.\n */\nHoverIcons.prototype.activationDelay = 140;\n\n/**\n * Up arrow.\n */\nHoverIcons.prototype.currentState = null;\n\n/**\n * Up arrow.\n */\nHoverIcons.prototype.activeArrow = null;\n\n/**\n * Up arrow.\n */\nHoverIcons.prototype.inactiveOpacity = 15;\n\n/**\n * Up arrow.\n */\nHoverIcons.prototype.cssCursor = 'copy';\n\n/**\n * Whether to hide arrows that collide with vertices.\n * LATER: Add keyboard override, touch support.\n */\nHoverIcons.prototype.checkCollisions = true;\n\n/**\n * Up arrow.\n */\nHoverIcons.prototype.arrowFill = '#29b6f2';\n\n/**\n * Up arrow.\n */\nHoverIcons.prototype.triangleUp = (!mxClient.IS_SVG) ? new mxImage(IMAGE_PATH + '/triangle-up.png', 26, 14) :\n\tGraph.createSvgImage(18, 28, '<path d=\"m 6 26 L 12 26 L 12 12 L 18 12 L 9 1 L 1 12 L 6 12 z\" ' +\n\t'stroke=\"#fff\" fill=\"' + HoverIcons.prototype.arrowFill + '\"/>');\n\n/**\n * Right arrow.\n */\nHoverIcons.prototype.triangleRight = (!mxClient.IS_SVG) ? new mxImage(IMAGE_PATH + '/triangle-right.png', 14, 26) :\n\tGraph.createSvgImage(26, 18, '<path d=\"m 1 6 L 14 6 L 14 1 L 26 9 L 14 18 L 14 12 L 1 12 z\" ' +\n\t'stroke=\"#fff\" fill=\"' + HoverIcons.prototype.arrowFill + '\"/>');\n\n/**\n * Down arrow.\n */\nHoverIcons.prototype.triangleDown = (!mxClient.IS_SVG) ? new mxImage(IMAGE_PATH + '/triangle-down.png', 26, 14) :\n\tGraph.createSvgImage(18, 26, '<path d=\"m 6 1 L 6 14 L 1 14 L 9 26 L 18 14 L 12 14 L 12 1 z\" ' +\n\t'stroke=\"#fff\" fill=\"' + HoverIcons.prototype.arrowFill + '\"/>');\n\n/**\n * Left arrow.\n */\nHoverIcons.prototype.triangleLeft = (!mxClient.IS_SVG) ? new mxImage(IMAGE_PATH + '/triangle-left.png', 14, 26) :\n\tGraph.createSvgImage(28, 18, '<path d=\"m 1 9 L 12 1 L 12 6 L 26 6 L 26 12 L 12 12 L 12 18 z\" ' +\n\t'stroke=\"#fff\" fill=\"' + HoverIcons.prototype.arrowFill + '\"/>');\n\n/**\n * Round target.\n */\nHoverIcons.prototype.roundDrop = (!mxClient.IS_SVG) ? new mxImage(IMAGE_PATH + '/round-drop.png', 26, 26) :\n\tGraph.createSvgImage(26, 26, '<circle cx=\"13\" cy=\"13\" r=\"12\" ' +\n\t'stroke=\"#fff\" fill=\"' + HoverIcons.prototype.arrowFill + '\"/>');\n\n/**\n * Refresh target.\n */\nHoverIcons.prototype.refreshTarget = new mxImage((mxClient.IS_SVG) ? 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCIgd2lkdGg9IjM2cHgiIGhlaWdodD0iMzZweCI+PGVsbGlwc2UgZmlsbD0iIzI5YjZmMiIgY3g9IjEyIiBjeT0iMTIiIHJ4PSIxMiIgcnk9IjEyIi8+PHBhdGggdHJhbnNmb3JtPSJzY2FsZSgwLjgpIHRyYW5zbGF0ZSgyLjQsIDIuNCkiIHN0cm9rZT0iI2ZmZiIgZmlsbD0iI2ZmZiIgZD0iTTEyIDZ2M2w0LTQtNC00djNjLTQuNDIgMC04IDMuNTgtOCA4IDAgMS41Ny40NiAzLjAzIDEuMjQgNC4yNkw2LjcgMTQuOGMtLjQ1LS44My0uNy0xLjc5LS43LTIuOCAwLTMuMzEgMi42OS02IDYtNnptNi43NiAxLjc0TDE3LjMgOS4yYy40NC44NC43IDEuNzkuNyAyLjggMCAzLjMxLTIuNjkgNi02IDZ2LTNsLTQgNCA0IDR2LTNjNC40MiAwIDgtMy41OCA4LTggMC0xLjU3LS40Ni0zLjAzLTEuMjQtNC4yNnoiLz48cGF0aCBkPSJNMCAwaDI0djI0SDB6IiBmaWxsPSJub25lIi8+PC9zdmc+Cg==' :\n\tIMAGE_PATH + '/refresh.png', 38, 38);\n\n/**\n * Tolerance for hover icon clicks.\n */\nHoverIcons.prototype.tolerance = (mxClient.IS_TOUCH) ? 6 : 0;\n\n/**\n * \n */\nHoverIcons.prototype.init = function()\n{\n\tthis.arrowUp = this.createArrow(this.triangleUp, mxResources.get('plusTooltip'), mxConstants.DIRECTION_NORTH);\n\tthis.arrowRight = this.createArrow(this.triangleRight, mxResources.get('plusTooltip'), mxConstants.DIRECTION_EAST);\n\tthis.arrowDown = this.createArrow(this.triangleDown, mxResources.get('plusTooltip'), mxConstants.DIRECTION_SOUTH);\n\tthis.arrowLeft = this.createArrow(this.triangleLeft, mxResources.get('plusTooltip'), mxConstants.DIRECTION_WEST);\n\n\tthis.elts = [this.arrowUp, this.arrowRight, this.arrowDown, this.arrowLeft];\n\n\tthis.resetHandler = mxUtils.bind(this, function()\n\t{\n\t\tthis.reset();\n\t});\n\t\n\tthis.repaintHandler = mxUtils.bind(this, function()\n\t{\n\t\tthis.repaint();\n\t});\n\n\tthis.graph.selectionModel.addListener(mxEvent.CHANGE, this.resetHandler);\n\tthis.graph.model.addListener(mxEvent.CHANGE, this.repaintHandler);\n\tthis.graph.view.addListener(mxEvent.SCALE_AND_TRANSLATE, this.repaintHandler);\n\tthis.graph.view.addListener(mxEvent.TRANSLATE, this.repaintHandler);\n\tthis.graph.view.addListener(mxEvent.SCALE, this.repaintHandler);\n\tthis.graph.view.addListener(mxEvent.DOWN, this.repaintHandler);\n\tthis.graph.view.addListener(mxEvent.UP, this.repaintHandler);\n\tthis.graph.addListener(mxEvent.ROOT, this.repaintHandler);\n\tthis.graph.addListener(mxEvent.ESCAPE, this.resetHandler);\n\tmxEvent.addListener(this.graph.container, 'scroll', this.resetHandler);\n\t\n\t// Resets the mouse point on escape\n\tthis.graph.addListener(mxEvent.ESCAPE, mxUtils.bind(this, function()\n\t{\n\t\tthis.mouseDownPoint = null;\n\t}));\n\n\t// Removes hover icons if mouse leaves the container\n\tmxEvent.addListener(this.graph.container, 'mouseleave',  mxUtils.bind(this, function(evt)\n\t{\n\t\t// Workaround for IE11 firing mouseleave for touch in diagram\n\t\tif (evt.relatedTarget != null && mxEvent.getSource(evt) == this.graph.container)\n\t\t{\n\t\t\tthis.setDisplay('none');\n\t\t}\n\t}));\n\t\n\t// Resets current state when in-place editor starts\n\tthis.graph.addListener(mxEvent.START_EDITING, mxUtils.bind(this, function(evt)\n\t{\n\t\tthis.reset();\n\t}));\n\t\n\t// Resets current state after update of selection state for touch events\n\tvar graphClick = this.graph.click;\n\tthis.graph.click = mxUtils.bind(this, function(me)\n\t{\n\t\tgraphClick.apply(this.graph, arguments);\n\t\t\n\t\tif (this.currentState != null && !this.graph.isCellSelected(this.currentState.cell) &&\n\t\t\tmxEvent.isTouchEvent(me.getEvent()) && !this.graph.model.isVertex(me.getCell()))\n\t\t{\n\t\t\tthis.reset();\n\t\t}\n\t});\n\t\n\t// Checks if connection handler was active in mouse move\n\t// as workaround for possible double connection inserted\n\tvar connectionHandlerActive = false;\n\t\n\t// Implements a listener for hover and click handling\n\tthis.graph.addMouseListener(\n\t{\n\t    mouseDown: mxUtils.bind(this, function(sender, me)\n\t    {\n\t    \tconnectionHandlerActive = false;\n\t    \tvar evt = me.getEvent();\n\t    \t\n\t    \tif (this.isResetEvent(evt))\n\t    \t{\n\t    \t\tthis.reset();\n\t    \t}\n\t    \telse if (!this.isActive())\n\t    \t{\n\t    \t\tvar state = this.getState(me.getState());\n\t    \t\t\n\t    \t\tif (state != null || !mxEvent.isTouchEvent(evt))\n\t    \t\t{\n\t    \t\t\tthis.update(state);\n\t    \t\t}\n\t    \t}\n\t    \t\n\t    \tthis.setDisplay('none');\n\t    }),\n\t    mouseMove: mxUtils.bind(this, function(sender, me)\n\t    {\n\t    \tvar evt = me.getEvent();\n\t    \t\n\t    \tif (this.isResetEvent(evt))\n\t    \t{\n\t    \t\tthis.reset();\n\t    \t}\n\t    \telse if (!this.graph.isMouseDown && !mxEvent.isTouchEvent(evt))\n\t    \t{\n\t    \t\tthis.update(this.getState(me.getState()),\n\t    \t\t\tme.getGraphX(), me.getGraphY());\n\t    \t}\n\t    \t\n\t    \tif (this.graph.connectionHandler != null &&\n\t    \t\tthis.graph.connectionHandler.shape != null)\n\t    \t{\n\t    \t\tconnectionHandlerActive = true;\n\t    \t}\n\t    }),\n\t    mouseUp: mxUtils.bind(this, function(sender, me)\n\t    {\n\t    \tvar evt = me.getEvent();\n\t    \tvar pt = mxUtils.convertPoint(this.graph.container,\n\t\t\t\tmxEvent.getClientX(evt), mxEvent.getClientY(evt))\n\t    \t\n\t    \tif (this.isResetEvent(evt))\n\t    \t{\n\t    \t\tthis.reset();\n\t    \t}\n\t    \telse if (this.isActive() && !connectionHandlerActive &&\n\t    \t\tthis.mouseDownPoint != null)\n\t    \t{\n    \t\t\tthis.click(this.currentState, this.getDirection(), me);\n\t    \t}\n\t    \telse if (this.isActive())\n\t    \t{\n\t    \t\t// Selects target vertex after drag and clone if not only new edge was inserted\n\t    \t\tif (this.graph.getSelectionCount() != 1 || !this.graph.model.isEdge(\n\t    \t\t\tthis.graph.getSelectionCell()))\n\t    \t\t{\n\t    \t\t\tthis.update(this.getState(this.graph.view.getState(\n\t    \t\t\t\tthis.graph.getCellAt(me.getGraphX(), me.getGraphY()))));\n\t    \t\t}\n\t    \t\telse\n\t    \t\t{\n\t    \t\t\tthis.reset();\n\t    \t\t}\n\t    \t}\n\t    \telse if (mxEvent.isTouchEvent(evt) || (this.bbox != null &&\n\t    \t\tmxUtils.contains(this.bbox, me.getGraphX(), me.getGraphY())))\n\t    \t{\n\t    \t\t// Shows existing hover icons if inside bounding box\n\t    \t\tthis.setDisplay('');\n\t    \t\tthis.repaint();\n\t    \t}\n\t    \telse if (!mxEvent.isTouchEvent(evt))\n\t    \t{\n\t    \t\tthis.reset();\n\t    \t}\n\t    \t\n\t    \tconnectionHandlerActive = false;\n\t    \tthis.resetActiveArrow();\n\t    })\n\t});\n};\n\n/**\n * \n */\nHoverIcons.prototype.isResetEvent = function(evt, allowShift)\n{\n\treturn mxEvent.isAltDown(evt) || (this.activeArrow == null && mxEvent.isShiftDown(evt)) ||\n\t\t(mxEvent.isPopupTrigger(evt) && !this.graph.isCloneEvent(evt));\n};\n\n/**\n * \n */\nHoverIcons.prototype.createArrow = function(img, tooltip, direction)\n{\n\tvar arrow = null;\n\tarrow = mxUtils.createImage(img.src);\n\tarrow.style.width = img.width + 'px';\n\tarrow.style.height = img.height + 'px';\n\tarrow.style.padding = this.tolerance + 'px';\n\t\n\tif (tooltip != null)\n\t{\n\t\tarrow.setAttribute('title', tooltip);\n\t}\n\t\n\tarrow.style.position = 'absolute';\n\tarrow.style.cursor = this.cssCursor;\n\n\tmxEvent.addGestureListeners(arrow, mxUtils.bind(this, function(evt)\n\t{\n\t\tif (this.currentState != null && !this.isResetEvent(evt))\n\t\t{\n\t\t\tthis.mouseDownPoint = mxUtils.convertPoint(this.graph.container,\n\t\t\t\t\tmxEvent.getClientX(evt), mxEvent.getClientY(evt));\n\t\t\tthis.drag(evt, this.mouseDownPoint.x, this.mouseDownPoint.y);\n\t\t\tthis.activeArrow = arrow;\n\t\t\tthis.setDisplay('none');\n\t\t\tmxEvent.consume(evt);\n\t\t}\n\t}));\n\t\n\t// Captures mouse events as events on graph\n\tmxEvent.redirectMouseEvents(arrow, this.graph, this.currentState);\n\t\n\tmxEvent.addListener(arrow, 'mouseenter', mxUtils.bind(this, function(evt)\n\t{\n\t\t// Workaround for Firefox firing mouseenter on touchend\n\t\tif (mxEvent.isMouseEvent(evt))\n\t\t{\n\t    \tif (this.activeArrow != null && this.activeArrow != arrow)\n\t    \t{\n\t    \t\tmxUtils.setOpacity(this.activeArrow, this.inactiveOpacity);\n\t    \t}\n\n\t\t\tthis.graph.connectionHandler.constraintHandler.reset();\n\t\t\tmxUtils.setOpacity(arrow, 100);\n\t\t\tthis.activeArrow = arrow;\n\n\t\t\tthis.fireEvent(new mxEventObject('focus', 'arrow', arrow,\n\t\t\t\t'direction', direction, 'event', evt));\n\t\t}\n\t}));\n\t\n\tmxEvent.addListener(arrow, 'mouseleave', mxUtils.bind(this, function(evt)\n\t{\n\t\tif (mxEvent.isMouseEvent(evt))\n\t\t{\n\t\t\tthis.fireEvent(new mxEventObject('blur', 'arrow', arrow,\n\t\t\t\t'direction', direction, 'event', evt));\n\t\t}\n\n\t\t// Workaround for IE11 firing this event on touch\n\t\tif (!this.graph.isMouseDown)\n\t\t{\n\t\t\tthis.resetActiveArrow();\n\t\t}\n\t}));\n\t\n\treturn arrow;\n};\n\n/**\n * \n */\nHoverIcons.prototype.resetActiveArrow = function()\n{\n\tif (this.activeArrow != null)\n\t{\n\t\tmxUtils.setOpacity(this.activeArrow, this.inactiveOpacity);\n\t\tthis.activeArrow = null;\n\t}\n};\n\n/**\n * \n */\nHoverIcons.prototype.getDirection = function()\n{\n\tvar dir = mxConstants.DIRECTION_EAST;\n\n\tif (this.activeArrow == this.arrowUp)\n\t{\n\t\tdir = mxConstants.DIRECTION_NORTH;\n\t}\n\telse if (this.activeArrow == this.arrowDown)\n\t{\n\t\tdir = mxConstants.DIRECTION_SOUTH;\n\t}\n\telse if (this.activeArrow == this.arrowLeft)\n\t{\n\t\tdir = mxConstants.DIRECTION_WEST;\n\t}\n\t\t\n\treturn dir;\n};\n\n/**\n * \n */\nHoverIcons.prototype.visitNodes = function(visitor)\n{\n\tfor (var i = 0; i < this.elts.length; i++)\n\t{\n\t\tif (this.elts[i] != null)\n\t\t{\n\t\t\tvisitor(this.elts[i]);\n\t\t}\n\t}\n};\n\n/**\n * \n */\nHoverIcons.prototype.removeNodes = function()\n{\n\tthis.visitNodes(function(elt)\n\t{\n\t\tif (elt.parentNode != null)\n\t\t{\n\t\t\telt.parentNode.removeChild(elt);\n\t\t}\n\t});\n};\n\n/**\n *\n */\nHoverIcons.prototype.setDisplay = function(display)\n{\n\tthis.visitNodes(function(elt)\n\t{\n\t\telt.style.display = display;\n\t});\n};\n\n/**\n *\n */\nHoverIcons.prototype.isActive = function()\n{\n\treturn this.activeArrow != null && this.currentState != null;\n};\n\n/**\n *\n */\nHoverIcons.prototype.drag = function(evt, x, y)\n{\n\tthis.graph.popupMenuHandler.hideMenu();\n\tthis.graph.stopEditing(false);\n\n\t// Checks if state was removed in call to stopEditing above\n\tif (this.currentState != null)\n\t{\n\t\tthis.graph.connectionHandler.start(this.currentState, x, y);\n\t\tthis.graph.isMouseTrigger = mxEvent.isMouseEvent(evt);\n\t\tthis.graph.isMouseDown = true;\n\t\t\n\t\t// Hides handles for selection cell\n\t\tvar handler = this.graph.selectionCellsHandler.getHandler(this.currentState.cell);\n\t\t\n\t\tif (handler != null)\n\t\t{\n\t\t\thandler.setHandlesVisible(false);\n\t\t}\n\t\t\n\t\t// Ctrl+shift drag sets source constraint\n\t\tvar es = this.graph.connectionHandler.edgeState;\n\n\t\tif (evt != null && mxEvent.isShiftDown(evt) && mxEvent.isControlDown(evt) && es != null &&\n\t\t\tmxUtils.getValue(es.style, mxConstants.STYLE_EDGE, null) === 'orthogonalEdgeStyle')\n\t\t{\n\t\t\tvar direction = this.getDirection();\n\t\t\tes.cell.style = mxUtils.setStyle(es.cell.style, 'sourcePortConstraint', direction);\n\t\t\tes.style['sourcePortConstraint'] = direction;\n\t\t}\n\t}\n};\n\n/**\n *\n */\nHoverIcons.prototype.getStateAt = function(state, x, y)\n{\n\treturn this.graph.view.getState(this.graph.getCellAt(x, y));\n};\n\n/**\n *\n */\nHoverIcons.prototype.click = function(state, dir, me)\n{\n\tvar evt = me.getEvent();\n\tvar x = me.getGraphX();\n\tvar y = me.getGraphY();\n\t\n\tvar tmp = this.getStateAt(state, x, y);\n\n\tif (tmp != null && this.graph.model.isEdge(tmp.cell) && !this.graph.isCloneEvent(evt) &&\n\t\t(tmp.getVisibleTerminalState(true) == state || tmp.getVisibleTerminalState(false) == state))\n\t{\n\t\tthis.graph.setSelectionCell(tmp.cell);\n\t\tthis.reset();\n\t}\n\telse if (state != null)\n\t{\n\t\tthis.execute(state, dir, me);\n\t}\n\t\n\tme.consume();\n};\n\n/**\n *\n */\nHoverIcons.prototype.execute = function(state, dir, me)\n{\n\tvar evt = me.getEvent();\n\n\tthis.graph.selectCellsForConnectVertex(this.graph.connectVertex(\n\t\tstate.cell, dir, this.graph.defaultEdgeLength, evt, this.graph.isCloneEvent(evt),\n\t\tthis.graph.isCloneEvent(evt)), evt, this);\n};\n\n/**\n * \n */\nHoverIcons.prototype.reset = function(clearTimeout)\n{\n\tclearTimeout = (clearTimeout == null) ? true : clearTimeout;\n\t\n\tif (clearTimeout && this.updateThread != null)\n\t{\n\t\twindow.clearTimeout(this.updateThread);\n\t}\n\n\tthis.mouseDownPoint = null;\n\tthis.currentState = null;\n\tthis.activeArrow = null;\n\tthis.removeNodes();\n\tthis.bbox = null;\n\n\tthis.fireEvent(new mxEventObject('reset'));\n};\n\n/**\n * \n */\nHoverIcons.prototype.repaint = function()\n{\n\tthis.bbox = null;\n\t\n\tif (this.currentState != null)\n\t{\n\t\t// Checks if cell was deleted\n\t\tthis.currentState = this.getState(this.currentState);\n\t\t\n\t\t// Cell was deleted\t\n\t\tif (this.currentState != null &&\n\t\t\tthis.graph.model.isVertex(this.currentState.cell) &&\n\t\t\tthis.graph.isCellConnectable(this.currentState.cell))\n\t\t{\n\t\t\tvar bds = mxRectangle.fromRectangle(this.currentState);\n\t\t\t\n\t\t\t// Uses outer bounding box to take rotation into account\n\t\t\tif (this.currentState.shape != null && this.currentState.shape.boundingBox != null)\n\t\t\t{\n\t\t\t\tbds = mxRectangle.fromRectangle(this.currentState.shape.boundingBox);\n\t\t\t}\n\n\t\t\tbds.grow(this.graph.tolerance);\n\t\t\tbds.grow(this.arrowSpacing);\n\t\t\t\n\t\t\tvar handler = this.graph.selectionCellsHandler.getHandler(this.currentState.cell);\n\t\t\t\n\t\t\tif (this.graph.isTableRow(this.currentState.cell))\n\t\t\t{\n\t\t\t\thandler = this.graph.selectionCellsHandler.getHandler(\n\t\t\t\t\tthis.graph.model.getParent(this.currentState.cell));\n\t\t\t}\n\t\t\t\n\t\t\tvar rotationBbox = null;\n\t\t\t\n\t\t\tif (handler != null)\n\t\t\t{\n\t\t\t\tbds.x -= handler.horizontalOffset / 2;\n\t\t\t\tbds.y -= handler.verticalOffset / 2;\n\t\t\t\tbds.width += handler.horizontalOffset;\n\t\t\t\tbds.height += handler.verticalOffset;\n\t\t\t\t\n\t\t\t\t// Adds bounding box of rotation handle to avoid overlap\n\t\t\t\tif (handler.rotationShape != null && handler.rotationShape.node != null &&\n\t\t\t\t\thandler.rotationShape.node.style.visibility != 'hidden' &&\n\t\t\t\t\thandler.rotationShape.node.style.display != 'none' &&\n\t\t\t\t\thandler.rotationShape.boundingBox != null)\n\t\t\t\t{\n\t\t\t\t\trotationBbox = handler.rotationShape.boundingBox;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// Positions arrows avoid collisions with rotation handle\n\t\t\tvar positionArrow = mxUtils.bind(this, function(arrow, x, y)\n\t\t\t{\n\t\t\t\tif (rotationBbox != null)\n\t\t\t\t{\n\t\t\t\t\tvar bbox = new mxRectangle(x, y, arrow.clientWidth, arrow.clientHeight);\n\t\t\t\t\t\n\t\t\t\t\tif (mxUtils.intersects(bbox, rotationBbox))\n\t\t\t\t\t{\n\t\t\t\t\t\tif (arrow == this.arrowUp)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\ty -= bbox.y + bbox.height - rotationBbox.y;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if (arrow == this.arrowRight)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tx += rotationBbox.x + rotationBbox.width - bbox.x;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if (arrow == this.arrowDown)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\ty += rotationBbox.y + rotationBbox.height - bbox.y;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if (arrow == this.arrowLeft)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tx -= bbox.x + bbox.width - rotationBbox.x;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\tarrow.style.left = x + 'px';\n\t\t\t\tarrow.style.top = y + 'px';\n\t\t\t\tmxUtils.setOpacity(arrow, this.inactiveOpacity);\n\t\t\t});\n\t\t\t\n\t\t\tpositionArrow(this.arrowUp,\n\t\t\t\tMath.round(this.currentState.getCenterX() - this.triangleUp.width / 2 - this.tolerance),\n\t\t\t\tMath.round(bds.y - this.triangleUp.height - this.tolerance));\n\t\t\t\n\t\t\tpositionArrow(this.arrowRight, Math.round(bds.x + bds.width - this.tolerance),\n\t\t\t\tMath.round(this.currentState.getCenterY() - this.triangleRight.height / 2 - this.tolerance));\n\t\t\t\n\t\t\tpositionArrow(this.arrowDown, parseInt(this.arrowUp.style.left),\n\t\t\t\tMath.round(bds.y + bds.height - this.tolerance));\n\t\t\t\n\t\t\tpositionArrow(this.arrowLeft, Math.round(bds.x - this.triangleLeft.width - this.tolerance),\n\t\t\t\tparseInt(this.arrowRight.style.top));\n\t\t\t\n\t\t\tif (this.checkCollisions)\n\t\t\t{\n\t\t\t\tvar right = this.graph.getCellAt(bds.x + bds.width +\n\t\t\t\t\t\tthis.triangleRight.width / 2, this.currentState.getCenterY());\n\t\t\t\tvar left = this.graph.getCellAt(bds.x - this.triangleLeft.width / 2, this.currentState.getCenterY()); \n\t\t\t\tvar top = this.graph.getCellAt(this.currentState.getCenterX(), bds.y - this.triangleUp.height / 2); \n\t\t\t\tvar bottom = this.graph.getCellAt(this.currentState.getCenterX(), bds.y + bds.height + this.triangleDown.height / 2); \n\n\t\t\t\t// Shows hover icons large cell is behind all directions of current cell\n\t\t\t\tif (right != null && right == left && left == top && top == bottom)\n\t\t\t\t{\n\t\t\t\t\tright = null;\n\t\t\t\t\tleft = null;\n\t\t\t\t\ttop = null;\n\t\t\t\t\tbottom = null;\n\t\t\t\t}\n\n\t\t\t\tvar currentGeo = this.graph.getCellGeometry(this.currentState.cell);\n\t\t\t\t\n\t\t\t\tvar checkCollision = mxUtils.bind(this, function(cell, arrow)\n\t\t\t\t{\n\t\t\t\t\tvar geo = this.graph.model.isVertex(cell) && this.graph.getCellGeometry(cell);\n\t\t\t\t\t\n\t\t\t\t\t// Ignores collision if vertex is more than 3 times the size of this vertex\n\t\t\t\t\tif (cell != null && !this.graph.model.isAncestor(cell, this.currentState.cell) &&\n\t\t\t\t\t\t!this.graph.isSwimlane(cell) && (geo == null || currentGeo == null ||\n\t\t\t\t\t\t(geo.height < 3 * currentGeo.height && geo.width < 3 * currentGeo.width)))\n\t\t\t\t\t{\n\t\t\t\t\t\tarrow.style.visibility = 'hidden';\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tarrow.style.visibility = 'visible';\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\t\n\t\t\t\tcheckCollision(right, this.arrowRight);\n\t\t\t\tcheckCollision(left, this.arrowLeft);\n\t\t\t\tcheckCollision(top, this.arrowUp);\n\t\t\t\tcheckCollision(bottom, this.arrowDown);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tthis.arrowLeft.style.visibility = 'visible';\n\t\t\t\tthis.arrowRight.style.visibility = 'visible';\n\t\t\t\tthis.arrowUp.style.visibility = 'visible';\n\t\t\t\tthis.arrowDown.style.visibility = 'visible';\n\t\t\t}\n\t\t\t\n\t\t\tif (this.graph.tooltipHandler.isEnabled())\n\t\t\t{\n\t\t\t\tthis.arrowLeft.setAttribute('title', mxResources.get('plusTooltip'));\n\t\t\t\tthis.arrowRight.setAttribute('title', mxResources.get('plusTooltip'));\n\t\t\t\tthis.arrowUp.setAttribute('title', mxResources.get('plusTooltip'));\n\t\t\t\tthis.arrowDown.setAttribute('title', mxResources.get('plusTooltip'));\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tthis.arrowLeft.removeAttribute('title');\n\t\t\t\tthis.arrowRight.removeAttribute('title');\n\t\t\t\tthis.arrowUp.removeAttribute('title');\n\t\t\t\tthis.arrowDown.removeAttribute('title');\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tthis.reset();\n\t\t}\n\t\t\n\t\t// Updates bounding box\n\t\tif (this.currentState != null)\n\t\t{\n\t\t\tthis.bbox = this.computeBoundingBox();\n\t\t\t\n\t\t\t// Adds tolerance for hover\n\t\t\tif (this.bbox != null)\n\t\t\t{\n\t\t\t\tthis.bbox.grow(10);\n\t\t\t}\n\t\t}\n\t}\n};\n\n/**\n * \n */\nHoverIcons.prototype.computeBoundingBox = function()\n{\n\tvar bbox = (!this.graph.model.isEdge(this.currentState.cell)) ? mxRectangle.fromRectangle(this.currentState) : null;\n\t\n\tthis.visitNodes(function(elt)\n\t{\n\t\tif (elt.parentNode != null)\n\t\t{\n\t\t\tvar tmp = new mxRectangle(elt.offsetLeft, elt.offsetTop, elt.offsetWidth, elt.offsetHeight);\n\t\t\t\n\t\t\tif (bbox == null)\n\t\t\t{\n\t\t\t\tbbox = tmp;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tbbox.add(tmp);\n\t\t\t}\n\t\t}\n\t});\n\t\n\treturn bbox;\n};\n\n/**\n * \n */\nHoverIcons.prototype.getState = function(state)\n{\n\tif (state != null)\n\t{\n\t\tvar cell = state.cell;\n\t\t\n\t\tif (!this.graph.getModel().contains(cell))\n\t\t{\n\t\t\tstate = null;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Uses connectable parent vertex if child is not connectable\n\t\t\tif (this.graph.getModel().isVertex(cell) && !this.graph.isCellConnectable(cell))\n\t\t\t{\n\t\t\t\tvar parent = this.graph.getModel().getParent(cell);\n\t\t\t\t\n\t\t\t\tif (this.graph.getModel().isVertex(parent) && this.graph.isCellConnectable(parent))\n\t\t\t\t{\n\t\t\t\t\tcell = parent;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// Ignores locked cells and edges\n\t\t\tif (this.graph.isCellLocked(cell) || this.graph.model.isEdge(cell))\n\t\t\t{\n\t\t\t\tcell = null;\n\t\t\t}\n\t\t\t\n\t\t\tstate = this.graph.view.getState(cell);\n\t\t\t\n\t\t\tif (state != null && state.style == null)\n\t\t\t{\n\t\t\t\tstate = null;\n\t\t\t}\n\t\t}\n\t}\n\t\n\treturn state;\n};\n\n/**\n * \n */\nHoverIcons.prototype.update = function(state, x, y)\n{\n\tif (!this.graph.connectionArrowsEnabled ||\n\t\t(this.graph.freehand != null && this.graph.freehand.isDrawing()) ||\n\t\t(state != null && mxUtils.getValue(state.style, 'allowArrows', '1') == '0'))\n\t{\n\t\tthis.reset();\n\t}\n\telse\n\t{\n\t\tif (state != null && state.cell.geometry != null && state.cell.geometry.relative &&\n\t\t\tthis.graph.model.isEdge(state.cell.parent))\n\t\t{\n\t\t\tstate = null;\n\t\t}\n\t\t\n\t\tvar timeOnTarget = null;\n\t\t\n\t\t// Time on target\n\t\tif (this.prev != state || this.isActive())\n\t\t{\n\t\t\tthis.startTime = new Date().getTime();\n\t\t\tthis.prev = state;\n\t\t\ttimeOnTarget = 0;\n\t\n\t\t\tif (this.updateThread != null)\n\t\t\t{\n\t\t\t\twindow.clearTimeout(this.updateThread);\n\t\t\t}\n\t\t\t\n\t\t\tif (state != null)\n\t\t\t{\n\t\t\t\t// Starts timer to update current state with no mouse events\n\t\t\t\tthis.updateThread = window.setTimeout(mxUtils.bind(this, function()\n\t\t\t\t{\n\t\t\t\t\tif (!this.isActive() && !this.graph.isMouseDown &&\n\t\t\t\t\t\t!this.graph.panningHandler.isActive())\n\t\t\t\t\t{\n\t\t\t\t\t\tthis.prev = state;\n\t\t\t\t\t\tthis.update(state, x, y);\n\t\t\t\t\t}\n\t\t\t\t}), this.updateDelay + 10);\n\t\t\t}\n\t\t}\n\t\telse if (this.startTime != null)\n\t\t{\n\t\t\ttimeOnTarget = new Date().getTime() - this.startTime;\n\t\t}\n\t\t\n\t\tthis.setDisplay('');\n\t\t\n\t\tif (this.currentState != null && this.currentState != state && timeOnTarget < this.activationDelay &&\n\t\t\tthis.bbox != null && !mxUtils.contains(this.bbox, x, y))\n\t\t{\n\t\t\tthis.reset(false);\n\t\t}\n\t\telse if (this.currentState != null || timeOnTarget > this.activationDelay)\n\t\t{\n\t\t\tif (this.currentState != state && ((timeOnTarget > this.updateDelay && state != null) ||\n\t\t\t\tthis.bbox == null || x == null || y == null || !mxUtils.contains(this.bbox, x, y)))\n\t\t\t{\n\t\t\t\tif (state != null && this.graph.isEnabled())\n\t\t\t\t{\n\t\t\t\t\tthis.removeNodes();\n\t\t\t\t\tthis.setCurrentState(state);\n\t\t\t\t\tthis.repaint();\n\t\t\t\t\t\n\t\t\t\t\t// Resets connection points on other focused cells\n\t\t\t\t\tif (this.graph.connectionHandler.constraintHandler.currentFocus != state)\n\t\t\t\t\t{\n\t\t\t\t\t\tthis.graph.connectionHandler.constraintHandler.reset();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tthis.reset();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n};\n\n/**\n * \n */\nHoverIcons.prototype.setCurrentState = function(state)\n{\n\tif (state.style['portConstraint'] != 'eastwest')\n\t{\n\t\tthis.graph.container.appendChild(this.arrowUp);\n\t\tthis.graph.container.appendChild(this.arrowDown);\n\t}\n\n\tthis.graph.container.appendChild(this.arrowRight);\n\tthis.graph.container.appendChild(this.arrowLeft);\n\tthis.currentState = state;\n};\n\n/**\n * Returns true if the given cell is a table.\n */\nGraph.prototype.removeTextStyleForCell = function(cell, removeCellStyles)\n{\n\tvar style = this.getCurrentCellStyle(cell);\n\tvar result = false;\n\n\tthis.getModel().beginUpdate();\n\ttry\n\t{\n\t\tif (mxUtils.getValue(style, 'html', '0') == '1')\n\t\t{\n\t\t\tvar label = this.convertValueToString(cell);\n\t\t\t\t\t\t\t\n\t\t\tif (mxUtils.getValue(style, 'nl2Br', '1') != '0')\n\t\t\t{\n\t\t\t\t// Removes newlines from HTML and converts breaks to newlines\n\t\t\t\t// to match the HTML output in plain text\n\t\t\t\tlabel = label.replace(/\\n/g, '').replace(/<br\\s*.?>/g, '\\n');\n\t\t\t}\n\t\t\t\n\t\t\tlabel = Editor.convertHtmlToText(label);\n\t\t\tthis.cellLabelChanged(cell, label);\n\t\t\tresult = true;\n\t\t}\n\n\t\tif (removeCellStyles)\n\t\t{\n\t\t\tthis.setCellStyles('fontSource', null, [cell]);\n\t\t\tthis.setCellStyles(mxConstants.STYLE_FONTFAMILY, null, [cell]);\n\t\t\tthis.setCellStyles(mxConstants.STYLE_FONTSIZE, null, [cell]);\n\t\t\tthis.setCellStyles(mxConstants.STYLE_FONTSTYLE, null, [cell]);\n\t\t\tthis.setCellStyles(mxConstants.STYLE_FONTCOLOR, null, [cell]);\n\t\t\tthis.setCellStyles(mxConstants.STYLE_LABEL_BORDERCOLOR, null, [cell]);\n\t\t\tthis.setCellStyles(mxConstants.STYLE_LABEL_BACKGROUNDCOLOR, null, [cell]);\n\t\t}\n\t}\n\tfinally\n\t{\n\t\tthis.getModel().endUpdate();\n\t}\n\n\treturn result;\n};\n\n/**\n * Returns true if the given cell is a table.\n */\nGraph.prototype.createParent = function(parent, child, childCount, dx, dy)\n{\n\tparent = this.cloneCell(parent);\n\t\n\tfor (var i = 0; i < childCount; i++)\n    {\n\t\tvar clone = this.cloneCell(child);\n\t\tvar geo = this.getCellGeometry(clone)\n\t\t\n\t\tif (geo != null)\n\t\t{\n\t\t\tgeo.x += i * dx;\n\t\t\tgeo.y += i * dy;\n\t\t}\n\t\t\n\t\tparent.insert(clone);\n    }\n\t\n\treturn parent;\n};\n\n/**\n * Returns true if the given cell is a table.\n */\nGraph.prototype.createTable = function(rowCount, colCount, w, h, title, startSize, tableStyle, rowStyle, cellStyle)\n{\n\tw = (w != null) ? w : 60;\n\th = (h != null) ? h : 40;\n\tstartSize = (startSize != null) ? startSize : 30;\n\ttableStyle = (tableStyle != null) ? tableStyle : 'shape=table;startSize=' +\n\t\t((title != null) ? startSize : '0') + ';container=1;collapsible=0;childLayout=tableLayout;';\n\trowStyle = (rowStyle != null) ? rowStyle : 'shape=tableRow;horizontal=0;startSize=0;swimlaneHead=0;swimlaneBody=0;strokeColor=inherit;' +\n    \t'top=0;left=0;bottom=0;right=0;collapsible=0;dropTarget=0;fillColor=none;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;';\n\tcellStyle = (cellStyle != null) ? cellStyle : 'shape=partialRectangle;html=1;whiteSpace=wrap;connectable=0;strokeColor=inherit;' +\n\t\t'overflow=hidden;fillColor=none;top=0;left=0;bottom=0;right=0;pointerEvents=1;';\n\t\n\treturn this.createParent(this.createVertex(null, null, (title != null) ? title : '',\n\t\t0, 0, colCount * w, rowCount * h + ((title != null) ? startSize : 0), tableStyle),\n\t\tthis.createParent(this.createVertex(null, null, '', 0, 0, colCount * w, h, rowStyle),\n\t\t\tthis.createVertex(null, null, '', 0, 0, w, h, cellStyle),\n\t\t\t\tcolCount, w, 0), rowCount, 0, h);\n};\n\n/**\n * Sets the values for the cells and rows in the given table and returns the table.\n */\nGraph.prototype.setTableValues = function(table, values, rowValues)\n{\n\tvar rows = this.model.getChildCells(table, true);\n\t\n\tfor (var i = 0; i < rows.length; i++)\n\t{\n\t\tif (rowValues != null)\n\t\t{\n\t\t\trows[i].value = rowValues[i];\n\t\t}\t\n\t\t\n\t\tif (values != null)\n\t\t{\n\t\t\tvar cells = this.model.getChildCells(rows[i], true);\n\t\t\t\n\t\t\tfor (var j = 0; j < cells.length; j++)\n\t\t\t{\n\t\t\t\tif (values[i][j] != null)\n\t\t\t\t{\n\t\t\t\t\tcells[j].value = values[i][j];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t\n\treturn table;\n};\n\n/**\n * \n */\nGraph.prototype.createCrossFunctionalSwimlane = function(rowCount, colCount, w, h, title, tableStyle, rowStyle, firstCellStyle, cellStyle)\n{\n\tw = (w != null) ? w : 120;\n\th = (h != null) ? h : 120;\n\t\n\tvar s = 'collapsible=0;recursiveResize=0;expand=0;';\n\ttableStyle = (tableStyle != null) ? tableStyle : 'shape=table;childLayout=tableLayout;' +\n\t\t((title == null) ? 'startSize=0;fillColor=none;' : 'startSize=40;') + s;\n\trowStyle = (rowStyle != null) ? rowStyle : 'shape=tableRow;horizontal=0;swimlaneHead=0;swimlaneBody=0;top=0;left=0;strokeColor=inherit;' +\n\t\t'bottom=0;right=0;dropTarget=0;fontStyle=0;fillColor=none;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;startSize=40;' + s;\n\tfirstCellStyle = (firstCellStyle != null) ? firstCellStyle : 'swimlane;swimlaneHead=0;swimlaneBody=0;fontStyle=0;strokeColor=inherit;' +\n\t\t'connectable=0;fillColor=none;startSize=40;' + s;\n\tcellStyle = (cellStyle != null) ? cellStyle : 'swimlane;swimlaneHead=0;swimlaneBody=0;fontStyle=0;connectable=0;strokeColor=inherit;' +\n\t\t'fillColor=none;startSize=0;' + s;\n\t\n\tvar table = this.createVertex(null, null, (title != null) ? title : '', 0, 0,\n\t\tcolCount * w, rowCount * h, tableStyle);\n\tvar t = mxUtils.getValue(this.getCellStyle(table), mxConstants.STYLE_STARTSIZE,\n\t\tmxConstants.DEFAULT_STARTSIZE);\n\ttable.geometry.width += t;\n\ttable.geometry.height += t;\n\t\n\tvar row = this.createVertex(null, null, '', 0, t, colCount * w + t, h, rowStyle);\n\ttable.insert(this.createParent(row, this.createVertex(null, null,\n\t\t'', t, 0, w, h, firstCellStyle), colCount, w, 0));\n\t\n\tif (rowCount > 1)\n\t{\n\t\trow.geometry.y = h + t;\n\t\t\n\t\treturn this.createParent(table, this.createParent(row,\n\t\t\tthis.createVertex(null, null,  '', t, 0, w, h, cellStyle),\n\t\t\tcolCount, w, 0), rowCount - 1, 0, h);\n\t}\n\telse\n\t{\n\t\treturn table;\n\t}\n};\n\n/**\n * Returns the row and column lines for the given table.\n */\nGraph.prototype.visitTableCells = function(cell, visitor)\n{\n\tvar lastRow = null;\n\tvar rows = this.model.getChildCells(cell, true);\n\tvar start = this.getActualStartSize(cell, true);\n\n\tfor (var i = 0; i < rows.length; i++)\n\t{\n\t\tvar rowStart = this.getActualStartSize(rows[i], true);\n\t\tvar cols = this.model.getChildCells(rows[i], true);\n\t\tvar rowStyle = this.getCellStyle(rows[i], true);\n\t\tvar lastCol = null;\n\t\tvar row = [];\n\n\t\tfor (var j = 0; j < cols.length; j++)\n\t\t{\n\t\t\tvar geo = this.getCellGeometry(cols[j]);\n\t\t\tvar col = {cell: cols[j], rospan: 1, colspan: 1, row: i, col: j, geo: geo};\n\t\t\tgeo = (geo.alternateBounds != null) ? geo.alternateBounds : geo;\n\t\t\tcol.point = new mxPoint(geo.width + (lastCol != null ? lastCol.point.x : start.x + rowStart.x),\n\t\t\t\tgeo.height + (lastRow != null && lastRow[0] != null ? lastRow[0].point.y : start.y + rowStart.y));\n\t\t\tcol.actual = col;\n\n\t\t\tif (lastRow != null && lastRow[j] != null && lastRow[j].rowspan > 1)\n\t\t\t{\n\t\t\t\tcol.rowspan = lastRow[j].rowspan - 1;\n\t\t\t\tcol.colspan = lastRow[j].colspan;\n\t\t\t\tcol.actual = lastRow[j].actual;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif (lastCol != null && lastCol.colspan > 1)\n\t\t\t\t{\n\t\t\t\t\tcol.rowspan = lastCol.rowspan;\n\t\t\t\t\tcol.colspan = lastCol.colspan - 1;\n\t\t\t\t\tcol.actual = lastCol.actual;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tvar style = this.getCurrentCellStyle(cols[j], true);\n\n\t\t\t\t\tif (style != null)\n\t\t\t\t\t{\n\t\t\t\t\t\tcol.rowspan = parseInt(style['rowspan'] || 1);\n\t\t\t\t\t\tcol.colspan = parseInt(style['colspan'] || 1);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tvar head = mxUtils.getValue(rowStyle, mxConstants.STYLE_SWIMLANE_HEAD, 1) == 1 &&\n\t\t\t\tmxUtils.getValue(rowStyle, mxConstants.STYLE_STROKECOLOR,\n\t\t\t\t\tmxConstants.NONE) != mxConstants.NONE;\n\t\t\t\t\n\t\t\tvisitor(col, cols.length, rows.length,\n\t\t\t\tstart.x + ((head) ? rowStart.x : 0),\n\t\t\t\tstart.y + ((head) ? rowStart.y : 0));\n\t\t\trow.push(col);\n\t\t\tlastCol = col;\n\t\t}\n\n\t\tlastRow = row;\n\t}\n\n};\n\n/**\n * Returns the row and column lines for the given table.\n */\nGraph.prototype.getTableLines = function(cell, horizontal, vertical)\n{\n\tvar hl = [];\n\tvar vl = [];\n\n\tif (horizontal || vertical)\n\t{\n\t\tthis.visitTableCells(cell, mxUtils.bind(this, function(iter, colCount, rowCount, x0, y0)\n\t\t{\n\t\t\t// Constructs horizontal lines\n\t\t\tif (horizontal && iter.row < rowCount - 1)\n\t\t\t{\n\t\t\t\tif (hl[iter.row] == null)\n\t\t\t\t{\n\t\t\t\t\thl[iter.row] = [new mxPoint(x0, iter.point.y)];\n\t\t\t\t}\n\n\t\t\t\tif (iter.rowspan > 1)\n\t\t\t\t{\n\t\t\t\t\thl[iter.row].push(null);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\thl[iter.row].push(iter.point);\n\t\t\t}\n\n\t\t\t// Constructs vertical lines\n\t\t\tif (vertical && iter.col < colCount - 1)\n\t\t\t{\n\t\t\t\tif (vl[iter.col] == null)\n\t\t\t\t{\n\t\t\t\t\tvl[iter.col] = [new mxPoint(iter.point.x, y0)];\n\t\t\t\t}\n\n\t\t\t\tif (iter.colspan > 1)\n\t\t\t\t{\n\t\t\t\t\tvl[iter.col].push(null);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tvl[iter.col].push(iter.point);\n\t\t\t}\n\t\t}));\n\t}\n\n\treturn hl.concat(vl);\n};\n\n/**\n * Returns true if the given cell is a table cell.\n */\nGraph.prototype.isTableCell = function(cell)\n{\n\treturn this.model.isVertex(cell) && this.isTableRow(this.model.getParent(cell));\n};\n\n/**\n * Returns true if the given cell is a table row.\n */\nGraph.prototype.isTableRow = function(cell)\n{\n\treturn this.model.isVertex(cell) && this.isTable(this.model.getParent(cell));\n};\n\n/**\n * Returns true if the given cell is a table.\n */\nGraph.prototype.isTable = function(cell)\n{\n\tvar style = this.getCellStyle(cell);\n\t\n\treturn style != null && style['childLayout'] == 'tableLayout';\n};\n\n/**\n * Returns true if the given cell is a table.\n */\nGraph.prototype.isStack = function(cell)\n{\n\tvar style = this.getCellStyle(cell);\n\t \n\treturn style != null && style['childLayout'] == 'stackLayout';\n};\n\n/**\n * Returns true if the given cell is a table row.\n */\nGraph.prototype.isStackChild = function(cell)\n{\n\treturn this.model.isVertex(cell) && this.isStack(this.model.getParent(cell));\n};\n\n/**\n * Updates the row and table heights.\n */\nGraph.prototype.setTableRowHeight = function(row, dy, extend)\n{\n\textend = (extend != null) ? extend : true;\n\tvar model = this.getModel();\n\t\n\tmodel.beginUpdate();\n\ttry\n\t{\n\t\tvar rgeo = this.getCellGeometry(row);\n\t\n\t\t// Sets height of row\n\t\tif (rgeo != null)\n\t\t{\n\t\t\trgeo = rgeo.clone();\n\t\t\trgeo.height += dy;\n\t\t\tmodel.setGeometry(row, rgeo);\n\t\t\t\n\t\t\tvar table = model.getParent(row);\n\t\t\tvar rows = model.getChildCells(table, true);\n\t\t\t\n\t\t\t// Shifts and resizes neighbor row\n\t\t\tif (!extend)\n\t\t\t{\n\t\t\t\tvar index = mxUtils.indexOf(rows, row);\n\t\n\t\t\t\tif (index < rows.length - 1)\n\t\t\t\t{\n\t\t\t\t\tvar nextRow = rows[index + 1];\n\t\t\t\t\tvar geo = this.getCellGeometry(nextRow);\n\t\t\t\t\n\t\t\t\t\tif (geo != null)\n\t\t\t\t\t{\n\t\t\t\t\t\tgeo = geo.clone();\n\t\t\t\t\t\tgeo.y += dy;\n\t\t\t\t\t\tgeo.height -= dy;\n\t\t\t\t\t\t\n\t\t\t\t\t\tmodel.setGeometry(nextRow, geo);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// Updates height of table\n\t\t\tvar tgeo = this.getCellGeometry(table);\n\t\t\t\n\t\t\tif (tgeo != null)\n\t\t\t{\n\t\t\t\t// Always extends for last row\n\t\t\t\tif (!extend)\n\t\t\t\t{\n\t\t\t\t\textend = row == rows[rows.length - 1];\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (extend)\n\t\t\t\t{\n\t\t\t\t\ttgeo = tgeo.clone();\n\t\t\t\t\ttgeo.height += dy;\n\t\t\t\t\tmodel.setGeometry(table, tgeo);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\tfinally\n\t{\n\t\tmodel.endUpdate();\n\t}\n};\n\n/**\n * Updates column width and row height.\n */\nGraph.prototype.setTableColumnWidth = function(col, dx, extend)\n{\n\textend = (extend != null) ? extend : false;\n\t\n\tvar model = this.getModel();\n\tvar row = model.getParent(col);\n\tvar table = model.getParent(row);\n\tvar cells = model.getChildCells(row, true);\n\tvar index = mxUtils.indexOf(cells, col);\n\tvar lastColumn = index == cells.length - 1;\n\t\n\tmodel.beginUpdate();\n\ttry\n\t{\n\t\t// Sets width of child cell\n\t\tvar rows = model.getChildCells(table, true);\n\t\t\n\t\tfor (var i = 0; i < rows.length; i++)\n\t\t{\n\t\t\trow = rows[i];\n\t\t\tcells = model.getChildCells(row, true);\n\t\t\tvar cell = cells[index];\n\t\t\tvar geo = this.getCellGeometry(cell);\n\t\t\n\t\t\tif (geo != null)\n\t\t\t{\n\t\t\t\tgeo = geo.clone();\n\t\t\t\tgeo.width += dx;\n\n\t\t\t\tif (geo.alternateBounds != null)\n\t\t\t\t{\n\t\t\t\t\tgeo.alternateBounds.width += dx;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tmodel.setGeometry(cell, geo);\n\t\t\t}\n\t\t\t\n\t\t\t// Shifts and resizes neighbor column\n\t\t\tif (index < cells.length - 1)\n\t\t\t{\n\t\t\t\tcell = cells[index + 1];\n\t\t\t\tvar geo = this.getCellGeometry(cell);\n\t\t\t\n\t\t\t\tif (geo != null)\n\t\t\t\t{\n\t\t\t\t\tgeo = geo.clone();\n\t\t\t\t\tgeo.x += dx;\n\t\t\t\t\t\n\t\t\t\t\tif (!extend)\n\t\t\t\t\t{\n\t\t\t\t\t\tgeo.width -= dx;\n\n\t\t\t\t\t\tif (geo.alternateBounds != null)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tgeo.alternateBounds.width -= dx;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tmodel.setGeometry(cell, geo);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (lastColumn || extend)\n\t\t{\n\t\t\t// Updates width of table\n\t\t\tvar tgeo = this.getCellGeometry(table);\n\t\t\t\n\t\t\tif (tgeo != null)\n\t\t\t{\n\t\t\t\ttgeo = tgeo.clone();\n\t\t\t\ttgeo.width += dx;\n\t\t\t\tmodel.setGeometry(table, tgeo);\n\t\t\t}\n\t\t}\n\n\t\tif (this.layoutManager != null)\n\t\t{\n\t\t\tthis.layoutManager.executeLayout(table);\n\t\t}\n\t}\n\tfinally\n\t{\n\t\tmodel.endUpdate();\n\t}\n};\n\n/**\n * Special Layout for tables.\n */\nfunction TableLayout(graph)\n{\n\tmxGraphLayout.call(this, graph);\n};\n\n/**\n * Extends mxGraphLayout.\n */\nTableLayout.prototype = new mxStackLayout();\nTableLayout.prototype.constructor = TableLayout;\n\n/**\n * Function: isHorizontal\n * \n * Overrides stack layout to handle row reorder.\n */\nTableLayout.prototype.isHorizontal = function()\t\n{\t\n\treturn false;\t\n};\n\n/**\n * Function: isVertexIgnored\n * \n * Overrides to allow for table rows and cells.\n */\nTableLayout.prototype.isVertexIgnored = function(vertex)\n{\n\treturn !this.graph.getModel().isVertex(vertex) ||\n\t\t!this.graph.isCellVisible(vertex);\n};\n\n/**\n * Function: getSize\n * \n * Returns the total vertical or horizontal size of the given cells.\n */\nTableLayout.prototype.getSize = function(cells, horizontal)\n{\n\tvar total = 0;\n\t\n\tfor (var i = 0; i < cells.length; i++)\n\t{\n\t\tif (!this.isVertexIgnored(cells[i]))\n\t\t{\n\t\t\tvar geo = this.graph.getCellGeometry(cells[i]);\n\t\t\t\n\t\t\tif (geo != null)\n\t\t\t{\n\t\t\t\ttotal += (horizontal) ? geo.width : geo.height;\n\t\t\t}\n\t\t}\n\t}\n\t\n\treturn total;\n};\n\n/**\n * Function: getRowLayout\n * \n * Returns the column positions for the given row and table width.\n */\nTableLayout.prototype.getRowLayout = function(row, width)\n{\n\tvar cells = this.graph.model.getChildCells(row, true);\n\tvar off = this.graph.getActualStartSize(row, true);\n\tvar sw = this.getSize(cells, true);\n\tvar rw = width - off.x - off.width;\n\tvar result = [];\n\tvar x = off.x;\n\t\n\tfor (var i = 0; i < cells.length; i++)\n\t{\n\t\tvar geo = this.graph.getCellGeometry(cells[i]);\n\t\t\n\t\tif (geo != null)\n\t\t{\n\t\t\tx += (geo.alternateBounds != null ?\n\t\t\t\tgeo.alternateBounds.width :\n\t\t\t\tgeo.width) * rw / sw;\n\t\t\tresult.push(Math.round(x));\n\t\t}\n\t}\n\t\n\treturn result;\n};\n\n/**\n * Function: layoutRow\n * \n * Places the cells at the given positions in the given row.\n */\nTableLayout.prototype.layoutRow = function(row, positions, height, tw)\n{\n\tvar model = this.graph.getModel();\n\tvar cells = model.getChildCells(row, true);\n\tvar off = this.graph.getActualStartSize(row, true);\n\tvar x = off.x;\n\tvar sw = 0;\n\t\n\tif (positions != null)\n\t{\n\t\tpositions = positions.slice();\n\t\tpositions.splice(0, 0, off.x);\n\t}\n\n\tfor (var i = 0; i < cells.length; i++)\n\t{\n\t\tvar geo = this.graph.getCellGeometry(cells[i]);\n\t\t\n\t\tif (geo != null)\n\t\t{\n\t\t\tgeo = geo.clone();\n\t\t\t\n\t\t\tgeo.y = off.y;\n\t\t\tgeo.height = height - off.y - off.height;\n\t\t\t\n\t\t\tif (positions != null)\n\t\t\t{\n\t\t\t\tgeo.x = positions[i];\n\t\t\t\tgeo.width = positions[i + 1] - geo.x;\n\n\t\t\t\t// Fills with last geo if not enough cells\n\t\t\t\tif (i == cells.length - 1 && i < positions.length - 2)\n\t\t\t\t{\n\t\t\t\t\tgeo.width = tw - geo.x - off.x - off.width;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tgeo.x = x;\n\t\t\t\tx += geo.width;\n\t\t\t\t\n\t\t\t\tif (i == cells.length - 1)\n\t\t\t\t{\n\t\t\t\t\tgeo.width = tw - off.x - off.width - sw;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\t\n\t\t\t\t\tsw += geo.width;\n\t\t\t\t}\n\t\t\t}\n\t\t\n\t\t\tgeo.alternateBounds = new mxRectangle(0, 0, geo.width, geo.height);\n\t\t\tmodel.setGeometry(cells[i], geo);\n\t\t}\n\t}\n\t\n\treturn sw;\n};\n\n/**\n * Function: execute\n * \n * Implements <mxGraphLayout.execute>.\n */\nTableLayout.prototype.execute = function(parent)\n{\n\tif (parent != null)\n\t{\n\t\tvar offset = this.graph.getActualStartSize(parent, true);\n\t\tvar table = this.graph.getCellGeometry(parent);\n\t\tvar style = this.graph.getCellStyle(parent);\n\t\tvar resizeLastRow = mxUtils.getValue(style,\n\t\t\t'resizeLastRow', '0') == '1';\n\t\tvar resizeLast = mxUtils.getValue(style,\n\t\t\t'resizeLast', '0') == '1';\n\t\tvar fixedRows = mxUtils.getValue(style,\n\t\t\t'fixedRows', '0') == '1';\n\t\tvar model = this.graph.getModel();\n\t\tvar sw = 0;\n\t\t\n\t\tmodel.beginUpdate();\n\t\ttry\n\t\t{\n\t\t\tvar th = table.height - offset.y - offset.height;\n\t\t\tvar tw = table.width - offset.x - offset.width;\n\t\t\tvar rows = model.getChildCells(parent, true);\n\n\t\t\t// Updates row visibilities\n\t\t\tfor (var i = 0; i < rows.length; i++)\n\t\t\t{\n\t\t\t\tmodel.setVisible(rows[i], true);\n\t\t\t}\n\t\t\t\n\t\t\tvar sh = this.getSize(rows, false);\n\t\t\t\n\t\t\tif (th > 0 && tw > 0 && rows.length > 0 && sh > 0)\n\t\t\t{\n\t\t\t\tif (resizeLastRow)\n\t\t\t\t{\n\t\t\t\t\tvar row = this.graph.getCellGeometry(rows[rows.length - 1]);\n\t\t\t\t\t\n\t\t\t\t\tif (row != null)\n\t\t\t\t\t{\n\t\t\t\t\t\trow = row.clone();\n\t\t\t\t\t\trow.height = th - sh + row.height;\n\t\t\t\t\t\tmodel.setGeometry(rows[rows.length - 1], row);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tvar pos = (resizeLast) ? null : this.getRowLayout(rows[0], tw);\n\t\t\t\tvar lastCells = [];\n\t\t\t\tvar y = offset.y;\n\t\t\t\n\t\t\t\t// Updates row geometries\n\t\t\t\tfor (var i = 0; i < rows.length; i++)\n\t\t\t\t{\n\t\t\t\t\tvar row = this.graph.getCellGeometry(rows[i]);\n\t\t\t\t\t\n\t\t\t\t\tif (row != null)\n\t\t\t\t\t{\n\t\t\t\t\t\trow = row.clone();\n\t\t\t\t\t\trow.x = offset.x;\n\t\t\t\t\t\trow.width = tw;\n\t\t\t\t\t\trow.y = Math.round(y);\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (resizeLastRow || fixedRows)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\ty += row.height;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\ty += (row.height / sh) * th;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\trow.height = Math.round(y) - row.y;\n\t\t\t\t\t\tmodel.setGeometry(rows[i], row);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// Updates cell geometries\n\t\t\t\t\tsw = Math.max(sw, this.layoutRow(rows[i], pos, row.height, tw, lastCells));\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (fixedRows && th < sh)\n\t\t\t\t{\n\t\t\t\t\ttable = table.clone();\n\t\t\t\t\ttable.height = y + offset.height;\n\t\t\t\t\tmodel.setGeometry(parent, table);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (resizeLast && tw < sw + Graph.minTableColumnWidth)\n\t\t\t\t{\n\t\t\t\t\ttable = table.clone();\n\t\t\t\t\ttable.width = sw + offset.width + offset.x + Graph.minTableColumnWidth;\n\t\t\t\t\tmodel.setGeometry(parent, table);\n\t\t\t\t}\n\n\t\t\t\t// All geometries cloned at this point so can change in-place below\n\t\t\t\tthis.graph.visitTableCells(parent, mxUtils.bind(this, function(iter)\n\t\t\t\t{\n\t\t\t\t\tmodel.setVisible(iter.cell, iter.actual.cell == iter.cell);\n\n\t\t\t\t\tif (iter.actual.cell != iter.cell)\n\t\t\t\t\t{\n\t\t\t\t\t\tif (iter.actual.row == iter.row)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tvar g = (iter.geo.alternateBounds != null) ?\n\t\t\t\t\t\t\t\titer.geo.alternateBounds : iter.geo;\n\t\t\t\t\t\t\titer.actual.geo.width += g.width;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (iter.actual.col == iter.col)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tvar g = (iter.geo.alternateBounds != null) ?\n\t\t\t\t\t\t\t\titer.geo.alternateBounds : iter.geo;\n\t\t\t\t\t\t\titer.actual.geo.height += g.height;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}));\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// Updates row visibilities\n\t\t\t\tfor (var i = 0; i < rows.length; i++)\n\t\t\t\t{\n\t\t\t\t\tmodel.setVisible(rows[i], false);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tfinally\n\t\t{\n\t\t\tmodel.endUpdate();\n\t\t}\n\t}\n};\n\n(function()\n{\n\t/**\n\t * Reset the list of processed edges.\n\t */\n\tvar mxGraphViewResetValidationState = mxGraphView.prototype.resetValidationState;\n\tmxGraphView.prototype.resetValidationState = function()\n\t{\n\t\tmxGraphViewResetValidationState.apply(this, arguments);\n\t\t\n\t\tthis.validEdges = [];\n\t};\n\t\n\t/**\n\t * Updates jumps for valid edges and repaints if needed.\n\t */\n\tvar mxGraphViewValidateCellState = mxGraphView.prototype.validateCellState;\n\tmxGraphView.prototype.validateCellState = function(cell, recurse)\n\t{\n\t\trecurse = (recurse != null) ? recurse : true;\n\t\tvar state = this.getState(cell);\n\t\t\n\t\t// Forces repaint if jumps change on a valid edge\n\t\tif (state != null && recurse && this.graph.model.isEdge(state.cell) &&\n\t\t\tstate.style != null && state.style[mxConstants.STYLE_CURVED] != 1 &&\n\t\t\t!state.invalid && this.updateLineJumps(state))\n\t\t{\n\t\t\tthis.graph.cellRenderer.redraw(state, false, this.isRendering());\n\t\t}\n\t\t\n\t\tstate = mxGraphViewValidateCellState.apply(this, arguments);\n\t\t\n\t\t// Adds to the list of edges that may intersect with later edges\n\t\tif (state != null && recurse && this.graph.model.isEdge(state.cell) &&\n\t\t\tstate.style != null && state.style[mxConstants.STYLE_CURVED] != 1)\n\t\t{\n\t\t\t// LATER: Reuse jumps for valid edges\n\t\t\tthis.validEdges.push(state);\n\t\t}\n\t\t\n\t\treturn state;\n\t};\n\t\n\t/**\n\t * Overrides paint to add flowAnimation style.\n\t */\n\tvar mxShapePaint = mxShape.prototype.paint;\n\t\n\tmxShape.prototype.paint = function()\n\t{\n\t\tmxShapePaint.apply(this, arguments);\n\n\t\tif (this.state != null && this.node != null &&\n\t\t\tthis.state.view.graph.enableFlowAnimation &&\n\t\t\tthis.state.view.graph.model.isEdge(this.state.cell) &&\n\t\t\tmxUtils.getValue(this.state.style, 'flowAnimation', '0') == '1')\n\t\t{\n\t\t\tvar paths = this.node.getElementsByTagName('path');\n\t\t\t\n\t\t\tif (paths.length > 1)\n\t\t\t{\n\t\t\t\tif (mxUtils.getValue(this.state.style, mxConstants.STYLE_DASHED, '0') != '1')\n\t\t\t\t{\n\t\t\t\t\tpaths[1].setAttribute('stroke-dasharray', (this.state.view.scale * 8));\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tvar anim = this.state.view.graph.getFlowAnimationStyle();\n\t\t\t\t\n\t\t\t\tif (anim != null)\n\t\t\t\t{\n\t\t\t\t\tpaths[1].setAttribute('class', anim.getAttribute('id'));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t};\n\t\n\t/**\n\t * Forces repaint if routed points have changed.\n\t */\n\tvar mxCellRendererIsShapeInvalid = mxCellRenderer.prototype.isShapeInvalid;\n\tmxCellRenderer.prototype.isShapeInvalid = function(state, shape)\n\t{\n\t\treturn mxCellRendererIsShapeInvalid.apply(this, arguments) ||\n\t\t\t(state.routedPoints != null && shape.routedPoints != null &&\n\t\t\t!mxUtils.equalPoints(shape.routedPoints, state.routedPoints))\n\t};\n\n\t/**\n\t * Updates jumps for invalid edges.\n\t */\n\tvar mxGraphViewUpdateCellState = mxGraphView.prototype.updateCellState;\n\tmxGraphView.prototype.updateCellState = function(state)\n\t{\n\t\tmxGraphViewUpdateCellState.apply(this, arguments);\n\n\t\t// Updates jumps on invalid edge before repaint\n\t\tif (this.graph.model.isEdge(state.cell) &&\n\t\t\tstate.style[mxConstants.STYLE_CURVED] != 1)\n\t\t{\n\t\t\tthis.updateLineJumps(state);\n\t\t}\n\t};\n\t\n\t/**\n\t * Updates the jumps between given state and processed edges.\n\t */\n\tmxGraphView.prototype.updateLineJumps = function(state)\n\t{\n\t\tvar pts = state.absolutePoints;\n\t\t\n\t\tif (Graph.lineJumpsEnabled)\n\t\t{\n\t\t\tvar changed = state.routedPoints != null;\n\t\t\tvar actual = null;\n\t\t\t\n\t\t\tif (pts != null && this.validEdges != null &&\n\t\t\t\tmxUtils.getValue(state.style, 'jumpStyle', 'none') !== 'none')\n\t\t\t{\n\t\t\t\tvar thresh = 0.5 * this.scale;\n\t\t\t\tchanged = false;\n\t\t\t\tactual = [];\n\t\t\t\t\n\t\t\t\t// Type 0 means normal waypoint, 1 means jump\n\t\t\t\tfunction addPoint(type, x, y)\n\t\t\t\t{\n\t\t\t\t\tvar rpt = new mxPoint(x, y);\n\t\t\t\t\trpt.type = type;\n\t\t\t\t\t\n\t\t\t\t\tactual.push(rpt);\n\t\t\t\t\tvar curr = (state.routedPoints != null) ? state.routedPoints[actual.length - 1] : null;\n\t\t\t\t\t\n\t\t\t\t\treturn curr == null || curr.type != type || curr.x != x || curr.y != y;\n\t\t\t\t};\n\t\t\t\t\n\t\t\t\tfor (var i = 0; i < pts.length - 1; i++)\n\t\t\t\t{\n\t\t\t\t\tvar p1 = pts[i + 1];\n\t\t\t\t\tvar p0 = pts[i];\n\t\t\t\t\tvar list = [];\n\t\t\t\t\t\n\t\t\t\t\t// Ignores waypoints on straight segments\n\t\t\t\t\tvar pn = pts[i + 2];\n\t\t\t\t\t\n\t\t\t\t\twhile (i < pts.length - 2 &&\n\t\t\t\t\t\tmxUtils.ptSegDistSq(p0.x, p0.y, pn.x, pn.y,\n\t\t\t\t\t\tp1.x, p1.y) < 1 * this.scale * this.scale)\n\t\t\t\t\t{\n\t\t\t\t\t\tp1 = pn;\n\t\t\t\t\t\ti++;\n\t\t\t\t\t\tpn = pts[i + 2];\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tchanged = addPoint(0, p0.x, p0.y) || changed;\n\t\t\t\t\t\n\t\t\t\t\t// Processes all previous edges\n\t\t\t\t\tfor (var e = 0; e < this.validEdges.length; e++)\n\t\t\t\t\t{\n\t\t\t\t\t\tvar state2 = this.validEdges[e];\n\t\t\t\t\t\tvar pts2 = state2.absolutePoints;\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (pts2 != null && mxUtils.intersects(state, state2) && state2.style['noJump'] != '1')\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t// Compares each segment of the edge with the current segment\n\t\t\t\t\t\t\tfor (var j = 0; j < pts2.length - 1; j++)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tvar p3 = pts2[j + 1];\n\t\t\t\t\t\t\t\tvar p2 = pts2[j];\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t// Ignores waypoints on straight segments\n\t\t\t\t\t\t\t\tpn = pts2[j + 2];\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\twhile (j < pts2.length - 2 &&\n\t\t\t\t\t\t\t\t\tmxUtils.ptSegDistSq(p2.x, p2.y, pn.x, pn.y,\n\t\t\t\t\t\t\t\t\tp3.x, p3.y) < 1 * this.scale * this.scale)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tp3 = pn;\n\t\t\t\t\t\t\t\t\tj++;\n\t\t\t\t\t\t\t\t\tpn = pts2[j + 2];\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tvar pt = mxUtils.intersection(p0.x, p0.y, p1.x, p1.y, p2.x, p2.y, p3.x, p3.y);\n\t\n\t\t\t\t\t\t\t\t// Handles intersection between two segments\n\t\t\t\t\t\t\t\tif (pt != null && (Math.abs(pt.x - p0.x) > thresh ||\n\t\t\t\t\t\t\t\t\tMath.abs(pt.y - p0.y) > thresh) &&\n\t\t\t\t\t\t\t\t\t(Math.abs(pt.x - p1.x) > thresh ||\n\t\t\t\t\t\t\t\t\tMath.abs(pt.y - p1.y) > thresh))\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tvar dx = pt.x - p0.x;\n\t\t\t\t\t\t\t\t\tvar dy = pt.y - p0.y;\n\t\t\t\t\t\t\t\t\tvar temp = {distSq: dx * dx + dy * dy, x: pt.x, y: pt.y};\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t// Intersections must be ordered by distance from start of segment\n\t\t\t\t\t\t\t\t\tfor (var t = 0; t < list.length; t++)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tif (list[t].distSq > temp.distSq)\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\tlist.splice(t, 0, temp);\n\t\t\t\t\t\t\t\t\t\t\ttemp = null;\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t// Ignores multiple intersections at segment joint\n\t\t\t\t\t\t\t\t\tif (temp != null && (list.length == 0 ||\n\t\t\t\t\t\t\t\t\t\tlist[list.length - 1].x !== temp.x ||\n\t\t\t\t\t\t\t\t\t\tlist[list.length - 1].y !== temp.y))\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tlist.push(temp);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// Adds ordered intersections to routed points\n\t\t\t\t\tfor (var j = 0; j < list.length; j++)\n\t\t\t\t\t{\n\t\t\t\t\t\tchanged = addPoint(1, list[j].x, list[j].y) || changed;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\n\t\t\t\tvar pt = pts[pts.length - 1];\n\t\t\t\tchanged = addPoint(0, pt.x, pt.y) || changed;\n\t\t\t}\n\t\t\t\n\t\t\tstate.routedPoints = actual;\n\t\t\t\n\t\t\treturn changed;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t};\n\t\n\t/**\n\t * Overrides painting the actual shape for taking into account jump style.\n\t */\n\tvar mxConnectorPaintLine = mxConnector.prototype.paintLine;\n\n\tmxConnector.prototype.paintLine = function (c, absPts, rounded)\n\t{\n\t\t// Required for checking dirty state\n\t\tthis.routedPoints = (this.state != null) ? this.state.routedPoints : null;\n\t\t\n\t\tif (this.outline || this.state == null || this.style == null ||\n\t\t\tthis.state.routedPoints == null || this.state.routedPoints.length == 0)\n\t\t{\n\t\t\tmxConnectorPaintLine.apply(this, arguments);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tvar arcSize = mxUtils.getValue(this.style, mxConstants.STYLE_ARCSIZE,\n\t\t\t\tmxConstants.LINE_ARCSIZE) / 2;\n\t\t\tvar size = (parseInt(mxUtils.getValue(this.style, 'jumpSize',\n\t\t\t\tGraph.defaultJumpSize)) - 2) / 2 + this.strokewidth;\n\t\t\tvar style = mxUtils.getValue(this.style, 'jumpStyle', 'none');\n\t\t\tvar moveTo = true;\n\t\t\tvar last = null;\n\t\t\tvar len = null;\n\t\t\tvar pts = [];\n\t\t\tvar n = null;\n\t\t\tc.begin();\n\t\t\t\n\t\t\tfor (var i = 0; i < this.state.routedPoints.length; i++)\n\t\t\t{\n\t\t\t\tvar rpt = this.state.routedPoints[i];\n\t\t\t\tvar pt = new mxPoint(rpt.x / this.scale, rpt.y / this.scale);\n\t\t\t\t\n\t\t\t\t// Takes first and last point from passed-in array\n\t\t\t\tif (i == 0)\n\t\t\t\t{\n\t\t\t\t\tpt = absPts[0];\n\t\t\t\t}\n\t\t\t\telse if (i == this.state.routedPoints.length - 1)\n\t\t\t\t{\n\t\t\t\t\tpt = absPts[absPts.length - 1];\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tvar done = false;\n\n\t\t\t\t// Type 1 is an intersection\n\t\t\t\tif (last != null && rpt.type == 1)\n\t\t\t\t{\n\t\t\t\t\t// Checks if next/previous points are too close\n\t\t\t\t\tvar next = this.state.routedPoints[i + 1];\n\t\t\t\t\tvar dx = next.x / this.scale - pt.x;\n\t\t\t\t\tvar dy = next.y / this.scale - pt.y;\n\t\t\t\t\tvar dist = dx * dx + dy * dy;\n\n\t\t\t\t\tif (n == null)\n\t\t\t\t\t{\n\t\t\t\t\t\tn = new mxPoint(pt.x - last.x, pt.y - last.y);\n\t\t\t\t\t\tlen = Math.sqrt(n.x * n.x + n.y * n.y);\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (len > 0)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tn.x = n.x * size / len;\n\t\t\t\t\t\t\tn.y = n.y * size / len;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tn = null;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif (dist > size * size && len > 0)\n\t\t\t\t\t{\n\t\t\t\t\t\tvar dx = last.x - pt.x;\n\t\t\t\t\t\tvar dy = last.y - pt.y;\n\t\t\t\t\t\tvar dist = dx * dx + dy * dy;\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (dist > size * size)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tvar p0 = new mxPoint(pt.x - n.x, pt.y - n.y);\n\t\t\t\t\t\t\tvar p1 = new mxPoint(pt.x + n.x, pt.y + n.y);\n\t\t\t\t\t\t\tpts.push(p0);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tthis.addPoints(c, pts, rounded, arcSize, false, null, moveTo);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tvar f = (Math.round(n.x) < 0 || (Math.round(n.x) == 0\n\t\t\t\t\t\t\t\t\t&& Math.round(n.y) <= 0)) ? 1 : -1;\n\t\t\t\t\t\t\tmoveTo = false;\n\n\t\t\t\t\t\t\tif (style == 'sharp')\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tc.lineTo(p0.x - n.y * f, p0.y + n.x * f);\n\t\t\t\t\t\t\t\tc.lineTo(p1.x - n.y * f, p1.y + n.x * f);\n\t\t\t\t\t\t\t\tc.lineTo(p1.x, p1.y);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse if (style == 'line')\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tc.moveTo(p0.x + n.y * f, p0.y - n.x * f);\n\t\t\t\t\t\t\t\tc.lineTo(p0.x - n.y * f, p0.y + n.x * f);\n\t\t\t\t\t\t\t\tc.moveTo(p1.x - n.y * f, p1.y + n.x * f);\n\t\t\t\t\t\t\t\tc.lineTo(p1.x + n.y * f, p1.y - n.x * f);\n\t\t\t\t\t\t\t\tc.moveTo(p1.x, p1.y);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse if (style == 'arc')\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tf *= 1.3;\n\t\t\t\t\t\t\t\tc.curveTo(p0.x - n.y * f, p0.y + n.x * f,\n\t\t\t\t\t\t\t\t\tp1.x - n.y * f, p1.y + n.x * f,\n\t\t\t\t\t\t\t\t\tp1.x, p1.y);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tc.moveTo(p1.x, p1.y);\n\t\t\t\t\t\t\t\tmoveTo = true;\n\t\t\t\t\t\t\t}\n\t\n\t\t\t\t\t\t\tpts = [p1];\n\t\t\t\t\t\t\tdone = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tn = null;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (!done)\n\t\t\t\t{\n\t\t\t\t\tpts.push(pt);\n\t\t\t\t\tlast = pt;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tthis.addPoints(c, pts, rounded, arcSize, false, null, moveTo);\n\t\t\tc.stroke();\n\t\t}\n\t};\n\t\n\t/**\n\t * Adds support for centerPerimeter which is a special case of a fixed point perimeter.\n\t */\n\tvar mxGraphViewGetFixedTerminalPoint = mxGraphView.prototype.getFixedTerminalPoint;\n\t\n\tmxGraphView.prototype.getFixedTerminalPoint = function(edge, terminal, source, constraint)\n\t{\n\t\tif (terminal != null && terminal.style[mxConstants.STYLE_PERIMETER] == 'centerPerimeter')\n\t\t{\n\t\t\treturn new mxPoint(terminal.getCenterX(), terminal.getCenterY());\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn mxGraphViewGetFixedTerminalPoint.apply(this, arguments);\n\t\t}\n\t};\n\n\t/**\n\t * Adds support for snapToPoint style.\n\t */\n\tvar mxGraphViewUpdateFloatingTerminalPoint = mxGraphView.prototype.updateFloatingTerminalPoint;\n\t\n\tmxGraphView.prototype.updateFloatingTerminalPoint = function(edge, start, end, source)\n\t{\n\t\tif (start != null && edge != null &&\n\t\t\t(start.style['snapToPoint'] == '1' ||\n\t\t\tedge.style['snapToPoint'] == '1'))\n\t\t{\n\t\t    start = this.getTerminalPort(edge, start, source);\n\t\t    var next = this.getNextPoint(edge, end, source);\n\t\t    \n\t\t    var orth = this.graph.isOrthogonal(edge);\n\t\t    var alpha = mxUtils.toRadians(Number(start.style[mxConstants.STYLE_ROTATION] || '0'));\n\t\t    var center = new mxPoint(start.getCenterX(), start.getCenterY());\n\t\t    \n\t\t    if (alpha != 0)\n\t\t    {\n\t\t        var cos = Math.cos(-alpha);\n\t\t        var sin = Math.sin(-alpha);\n\t\t        next = mxUtils.getRotatedPoint(next, cos, sin, center);\n\t\t    }\n\t\t    \n\t\t    var border = parseFloat(edge.style[mxConstants.STYLE_PERIMETER_SPACING] || 0);\n\t\t    border += parseFloat(edge.style[(source) ?\n\t\t        mxConstants.STYLE_SOURCE_PERIMETER_SPACING :\n\t\t        mxConstants.STYLE_TARGET_PERIMETER_SPACING] || 0);\n\t\t    var pt = this.getPerimeterPoint(start, next, alpha == 0 && orth, border);\n\t\t\n\t\t    if (alpha != 0)\n\t\t    {\n\t\t        var cos = Math.cos(alpha);\n\t\t        var sin = Math.sin(alpha);\n\t\t        pt = mxUtils.getRotatedPoint(pt, cos, sin, center);\n\t\t    }\n\t\t    \n\t\t    edge.setAbsoluteTerminalPoint(this.snapToAnchorPoint(edge, start, end, source, pt), source);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tmxGraphViewUpdateFloatingTerminalPoint.apply(this, arguments);\n\t\t}\n\t};\n\n\tmxGraphView.prototype.snapToAnchorPoint = function(edge, start, end, source, pt)\n\t{\n\t\tif (start != null && edge != null)\n\t\t{\n\t        var constraints = this.graph.getAllConnectionConstraints(start)\n\t        var nearest = null;\n\t        var dist = null;\n\t    \n\t        if (constraints != null)\n\t        {\n\t\t        for (var i = 0; i < constraints.length; i++)\n\t\t        {\n\t\t            var cp = this.graph.getConnectionPoint(start, constraints[i]);\n\t\t            \n\t\t            if (cp != null)\n\t\t            {\n\t\t                var tmp = (cp.x - pt.x) * (cp.x - pt.x) + (cp.y - pt.y) * (cp.y - pt.y);\n\t\t            \n\t\t                if (dist == null || tmp < dist)\n\t\t                {\n\t\t                    nearest = cp;\n\t\t                    dist = tmp;\n\t\t                }\n\t\t            }\n\t\t        }\n\t        }\n\t        \n\t        if (nearest != null)\n\t        {\n\t            pt = nearest;\n\t        }\n\t\t}\n\t\t\n\t\treturn pt;\n\t};\n\t\t\n\t/**\n\t * Adds support for placeholders in text elements of shapes.\n\t */\n\tvar mxStencilEvaluateTextAttribute = mxStencil.prototype.evaluateTextAttribute;\n\t\n\tmxStencil.prototype.evaluateTextAttribute = function(node, attribute, shape)\n\t{\n\t\tvar result = mxStencilEvaluateTextAttribute.apply(this, arguments);\n\t\tvar placeholders = node.getAttribute('placeholders');\n\t\t\n\t\tif (placeholders == '1' && shape.state != null)\n\t\t{\n\t\t\tresult = shape.state.view.graph.replacePlaceholders(shape.state.cell, result);\n\t\t}\n\t\t\n\t\treturn result;\n\t};\n\t\t\n\t/**\n\t * Adds custom stencils defined via shape=stencil(value) style. The value is a base64 encoded, compressed and\n\t * URL encoded XML definition of the shape according to the stencil definition language of mxGraph.\n\t * \n\t * Needs to be in this file to make sure its part of the embed client code. Also the check for ZLib is\n\t * different than for the Editor code.\n\t */\n\tvar mxCellRendererCreateShape = mxCellRenderer.prototype.createShape;\n\tmxCellRenderer.prototype.createShape = function(state)\n\t{\n\t\tif (state.style != null && typeof(pako) !== 'undefined')\n\t\t{\n\t    \tvar shape = mxUtils.getValue(state.style, mxConstants.STYLE_SHAPE, null);\n\t\n\t    \t// Extracts and decodes stencil XML if shape has the form shape=stencil(value)\n\t    \tif (shape != null && typeof shape === 'string' && shape.substring(0, 8) == 'stencil(')\n\t    \t{\n\t    \t\ttry\n\t    \t\t{\n\t    \t\t\tvar stencil = shape.substring(8, shape.length - 1);\n\t    \t\t\tvar doc = mxUtils.parseXml(Graph.decompress(stencil));\n\t    \t\t\t\n\t    \t\t\treturn new mxShape(new mxStencil(doc.documentElement));\n\t    \t\t}\n\t    \t\tcatch (e)\n\t    \t\t{\n\t    \t\t\tif (window.console != null)\n\t    \t\t\t{\n\t    \t\t\t\tconsole.log('Error in shape: ' + e);\n\t    \t\t\t}\n\t    \t\t}\n\t    \t}\n\t\t}\n\t\t\n\t\treturn mxCellRendererCreateShape.apply(this, arguments);\n\t};\n})();\n\n/**\n * Overrides stencil registry for dynamic loading of stencils.\n */\n/**\n * Maps from library names to an array of Javascript filenames,\n * which are synchronously loaded. Currently only stencil files\n * (.xml) and JS files (.js) are supported.\n * IMPORTANT: For embedded diagrams to work entries must also\n * be added in EmbedServlet.java.\n */\nmxStencilRegistry.libraries = {};\n\n/**\n * Global switch to disable dynamic loading.\n */\nmxStencilRegistry.dynamicLoading = true;\n\n/**\n * Global switch to disable eval for JS (preload all JS instead).\n */\nmxStencilRegistry.allowEval = true;\n\n/**\n * Stores all package names that have been dynamically loaded.\n * Each package is only loaded once.\n */\nmxStencilRegistry.packages = [];\n\n/**\n * Stores all package names that have been dynamically loaded.\n * Each package is only loaded once.\n */\nmxStencilRegistry.filesLoaded = {};\n\n// Extends the default stencil registry to add dynamic loading\nmxStencilRegistry.getStencil = function(name)\n{\n\tvar result = mxStencilRegistry.stencils[name];\n\t\n\tif (result == null && mxCellRenderer.defaultShapes[name] == null && mxStencilRegistry.dynamicLoading)\n\t{\n\t\tvar basename = mxStencilRegistry.getBasenameForStencil(name);\n\t\t\n\t\t// Loads stencil files and tries again\n\t\tif (basename != null)\n\t\t{\n\t\t\tvar libs = mxStencilRegistry.libraries[basename];\n\n\t\t\tif (libs != null)\n\t\t\t{\n\t\t\t\tif (mxStencilRegistry.packages[basename] == null)\n\t\t\t\t{\n\t\t\t\t\tfor (var i = 0; i < libs.length; i++)\n\t\t\t\t\t{\n\t\t\t\t\t\tvar fname = libs[i];\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (!mxStencilRegistry.filesLoaded[fname])\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tmxStencilRegistry.filesLoaded[fname] = true;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif (fname.toLowerCase().substring(fname.length - 4, fname.length) == '.xml')\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tmxStencilRegistry.loadStencilSet(fname, null);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse if (fname.toLowerCase().substring(fname.length - 3, fname.length) == '.js')\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\ttry\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tif (mxStencilRegistry.allowEval)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tvar req = mxUtils.load(fname);\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tif (req != null && req.getStatus() >= 200 && req.getStatus() <= 299)\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\teval.call(window, req.getText());\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tcatch (e)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tif (window.console != null)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tconsole.log('error in getStencil:', name, basename, libs, fname, e);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t// FIXME: This does not yet work as the loading is triggered after\n\t\t\t\t\t\t\t\t// the shape was used in the graph, at which point the keys have\n\t\t\t\t\t\t\t\t// typically been translated in the calling method.\n\t\t\t\t\t\t\t\t//mxResources.add(fname);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tmxStencilRegistry.packages[basename] = 1;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// Replaces '_-_' with '_'\n\t\t\t\tbasename = basename.replace('_-_', '_');\n\t\t\t\tmxStencilRegistry.loadStencilSet(STENCIL_PATH + '/' + basename + '.xml', null);\n\t\t\t}\n\t\t\t\n\t\t\tresult = mxStencilRegistry.stencils[name];\n\t\t}\n\t}\n\t\n\treturn result;\n};\n\n// Returns the basename for the given stencil or null if no file must be\n// loaded to render the given stencil.\nmxStencilRegistry.getBasenameForStencil = function(name)\n{\n\tvar tmp = null;\n\t\n\tif (name != null && typeof name === 'string')\n\t{\n\t\tvar parts = name.split('.');\n\t\t\n\t\tif (parts.length > 0 && parts[0] == 'mxgraph')\n\t\t{\n\t\t\ttmp = parts[1];\n\t\t\t\n\t\t\tfor (var i = 2; i < parts.length - 1; i++)\n\t\t\t{\n\t\t\t\ttmp += '/' + parts[i];\n\t\t\t}\n\t\t}\n\t}\n\n\treturn tmp;\n};\n\n// Loads the given stencil set\nmxStencilRegistry.loadStencilSet = function(stencilFile, postStencilLoad, force, async)\n{\n\tforce = (force != null) ? force : false;\n\t\n\t// Uses additional cache for detecting previous load attempts\n\tvar xmlDoc = mxStencilRegistry.packages[stencilFile];\n\t\n\tif (force || xmlDoc == null)\n\t{\n\t\tvar install = false;\n\t\t\n\t\tif (xmlDoc == null)\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\tif (async)\n\t\t\t\t{\n\t\t\t\t\tmxStencilRegistry.loadStencil(stencilFile, mxUtils.bind(this, function(xmlDoc2)\n\t\t\t\t\t{\n\t\t\t\t\t\tif (xmlDoc2 != null && xmlDoc2.documentElement != null)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tmxStencilRegistry.packages[stencilFile] = xmlDoc2;\n\t\t\t\t\t\t\tinstall = true;\n\t\t\t\t\t\t\tmxStencilRegistry.parseStencilSet(xmlDoc2.documentElement, postStencilLoad, install);\n\t\t\t\t\t\t}\n\t\t\t\t\t}));\n\t\t\t\t\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\txmlDoc = mxStencilRegistry.loadStencil(stencilFile);\n\t\t\t\t\tmxStencilRegistry.packages[stencilFile] = xmlDoc;\n\t\t\t\t\tinstall = true;\n\t\t\t\t}\n\t\t\t}\n\t\t\tcatch (e)\n\t\t\t{\n\t\t\t\tif (window.console != null)\n\t\t\t\t{\n\t\t\t\t\tconsole.log('error in loadStencilSet:', stencilFile, e);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\n\t\tif (xmlDoc != null && xmlDoc.documentElement != null)\n\t\t{\n\t\t\tmxStencilRegistry.parseStencilSet(xmlDoc.documentElement, postStencilLoad, install);\n\t\t}\n\t}\n};\n\n// Loads the given stencil XML file.\nmxStencilRegistry.loadStencil = function(filename, fn)\n{\n\tif (fn != null)\n\t{\n\t\tvar req = mxUtils.get(filename, mxUtils.bind(this, function(req)\n\t\t{\n\t\t\tfn((req.getStatus() >= 200 && req.getStatus() <= 299) ? req.getXml() : null);\n\t\t}), mxUtils.bind(this, function(req)\n\t\t{\n\t\t\tfn(null);\t\n\t\t}));\n\t}\n\telse\n\t{\n\t\treturn mxUtils.load(filename).getXml();\n\t}\n};\n\n// Takes array of strings\nmxStencilRegistry.parseStencilSets = function(stencils)\n{\n\tfor (var i = 0; i < stencils.length; i++)\n\t{\n\t\tmxStencilRegistry.parseStencilSet(mxUtils.parseXml(stencils[i]).documentElement);\n\t}\n};\n\n// Parses the given stencil set\nmxStencilRegistry.parseStencilSet = function(root, postStencilLoad, install)\n{\n\tif (root.nodeName == 'stencils')\n\t{\n\t\tvar shapes = root.firstChild;\n\t\t\n\t\twhile (shapes != null)\n\t\t{\n\t\t\tif (shapes.nodeName == 'shapes')\n\t\t\t{\n\t\t\t\tmxStencilRegistry.parseStencilSet(shapes, postStencilLoad, install);\n\t\t\t}\n\t\t\t\n\t\t\tshapes = shapes.nextSibling;\n\t\t}\n\t}\n\telse\n\t{\n\t\tinstall = (install != null) ? install : true;\n\t\tvar shape = root.firstChild;\n\t\tvar packageName = '';\n\t\tvar name = root.getAttribute('name');\n\t\t\n\t\tif (name != null)\n\t\t{\n\t\t\tpackageName = name + '.';\n\t\t}\n\t\t\n\t\twhile (shape != null)\n\t\t{\n\t\t\tif (shape.nodeType == mxConstants.NODETYPE_ELEMENT)\n\t\t\t{\n\t\t\t\tname = shape.getAttribute('name');\n\t\t\t\t\n\t\t\t\tif (name != null)\n\t\t\t\t{\n\t\t\t\t\tpackageName = packageName.toLowerCase();\n\t\t\t\t\tvar stencilName = name.replace(/ /g,\"_\");\n\t\t\t\t\t\t\n\t\t\t\t\tif (install)\n\t\t\t\t\t{\n\t\t\t\t\t\tmxStencilRegistry.addStencil(packageName + stencilName.toLowerCase(), new mxStencil(shape));\n\t\t\t\t\t}\n\t\n\t\t\t\t\tif (postStencilLoad != null)\n\t\t\t\t\t{\n\t\t\t\t\t\tvar w = shape.getAttribute('w');\n\t\t\t\t\t\tvar h = shape.getAttribute('h');\n\t\t\t\t\t\t\n\t\t\t\t\t\tw = (w == null) ? 80 : parseInt(w, 10);\n\t\t\t\t\t\th = (h == null) ? 80 : parseInt(h, 10);\n\t\n\t\t\t\t\t\tpostStencilLoad(packageName, stencilName, name, w, h);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tshape = shape.nextSibling;\n\t\t}\n\t}\n};\n\n/**\n * These overrides are only added if mxVertexHandler is defined (ie. not in embedded graph)\n */\nif (typeof mxVertexHandler !== 'undefined')\n{\n\t(function()\n\t{\n\t\t// Sets colors for handles\n\t\tmxConstants.HANDLE_FILLCOLOR = '#29b6f2';\n\t\tmxConstants.HANDLE_STROKECOLOR = '#0088cf';\n\t\tmxConstants.VERTEX_SELECTION_COLOR = '#00a8ff';\n\t\tmxConstants.OUTLINE_COLOR = '#00a8ff';\n\t\tmxConstants.OUTLINE_HANDLE_FILLCOLOR = '#99ccff';\n\t\tmxConstants.OUTLINE_HANDLE_STROKECOLOR = '#00a8ff';\n\t\tmxConstants.CONNECT_HANDLE_FILLCOLOR = '#cee7ff';\n\t\tmxConstants.EDGE_SELECTION_COLOR = '#00a8ff';\n\t\tmxConstants.DEFAULT_VALID_COLOR = '#00a8ff';\n\t\tmxConstants.LABEL_HANDLE_FILLCOLOR = '#cee7ff';\n\t\tmxConstants.GUIDE_COLOR = '#0088cf';\n\t\tmxConstants.HIGHLIGHT_STROKEWIDTH = 5;\n\t\tmxConstants.HIGHLIGHT_OPACITY = 50;\n\t    mxConstants.HIGHLIGHT_SIZE = 5;\n\n\t\t// Sets window decoration icons\n\t\tmxWindow.prototype.closeImage = Graph.createSvgImage(18, 10,\n\t\t\t'<path d=\"M 5 1 L 13 9 M 13 1 L 5 9\" stroke=\"#707070\" stroke-width=\"2\"/>').src;\n\t\tmxWindow.prototype.minimizeImage = Graph.createSvgImage(14, 10,\n\t\t\t'<path d=\"M 3 7 L 7 3 L 11 7\" stroke=\"#707070\" stroke-width=\"2\" fill=\"none\"/>').src;\n\t\tmxWindow.prototype.normalizeImage = Graph.createSvgImage(14, 10,\n\t\t\t'<path d=\"M 3 3 L 7 7 L 11 3\" stroke=\"#707070\" stroke-width=\"2\" fill=\"none\"/>').src;\n\t\tmxWindow.prototype.resizeImage = Graph.createSvgImage(10, 10,\n\t\t\t'<path d=\"Z\" stroke=\"#C0C0C0\" stroke-width=\"1\" fill=\"none\"/>').src;\n\t\t\n\t\t// Enables snapping to off-grid terminals for edge waypoints\n\t\tmxEdgeHandler.prototype.snapToTerminals = true;\n\t\n\t\t// Enables guides\n\t\tmxGraphHandler.prototype.guidesEnabled = true;\n\t\t\n\t\t// Removes parents where all child cells are moved out\n\t\tmxGraphHandler.prototype.removeEmptyParents = true;\n\t\n\t\t// Enables fading of rubberband\n\t\tmxRubberband.prototype.fadeOut = true;\n\t\t\n\t\t// Alt-move disables guides\n\t\tmxGuide.prototype.isEnabledForEvent = function(evt)\n\t\t{\n\t\t\treturn !mxEvent.isAltDown(evt);\n\t\t};\n\t\t\n\t\t// Ignores all table cells in layouts\n\t\tvar graphLayoutIsVertexIgnored = mxGraphLayout.prototype.isVertexIgnored; \n\t\tmxGraphLayout.prototype.isVertexIgnored = function(vertex)\n\t\t{\n\t\t\treturn graphLayoutIsVertexIgnored.apply(this, arguments) ||\n\t\t\t\tthis.graph.isTableRow(vertex) || this.graph.isTableCell(vertex);\n\t\t};\n\t\t\t\n\t\t// Adds support for ignoreEdge style\n\t\tvar graphLayoutIsEdgeIgnored = mxGraphLayout.prototype.isEdgeIgnored; \n\t\tmxGraphLayout.prototype.isEdgeIgnored = function(edge)\n\t\t{\n\t\t\treturn graphLayoutIsEdgeIgnored.apply(this, arguments) ||\n\t\t\t\tthis.graph.isEdgeIgnored(edge);\n\t\t};\n\n\t\t// Extends connection handler to enable ctrl+drag for cloning source cell\n\t\t// since copyOnConnect is now disabled by default\n\t\tvar mxConnectionHandlerCreateTarget = mxConnectionHandler.prototype.isCreateTarget;\n\t\tmxConnectionHandler.prototype.isCreateTarget = function(evt)\n\t\t{\n\t\t\treturn this.graph.isCloneEvent(evt) != mxConnectionHandlerCreateTarget.apply(this, arguments);\n\t\t};\n\n\t\t// Overrides highlight shape for connection points\n\t\tmxConstraintHandler.prototype.createHighlightShape = function()\n\t\t{\n\t\t\tvar hl = new mxEllipse(null, this.highlightColor, this.highlightColor, 0);\n\t\t\thl.opacity = mxConstants.HIGHLIGHT_OPACITY;\n\t\t\t\n\t\t\treturn hl;\n\t\t};\n\t\t\n\t\t// Overrides edge preview to use current edge shape and default style\n\t\tmxConnectionHandler.prototype.livePreview = true;\n\t\tmxConnectionHandler.prototype.cursor = 'crosshair';\n\t\t\n\t\t// Uses current edge style for connect preview\n\t\tmxConnectionHandler.prototype.createEdgeState = function(me)\n\t\t{\n\t\t\tvar style = this.graph.createCurrentEdgeStyle();\n\t\t\tvar edge = this.graph.createEdge(null, null, null, null, null, style);\n\t\t\tvar state = new mxCellState(this.graph.view, edge, this.graph.getCellStyle(edge));\n\t\t\t\n\t\t\tfor (var key in this.graph.currentEdgeStyle)\n\t\t\t{\n\t\t\t\tstate.style[key] = this.graph.currentEdgeStyle[key];\n\t\t\t}\n\t\t\t\n\t\t\t// Applies newEdgeStyle for preview\n\t\t\tif (this.previous != null)\n\t\t\t{\n\t\t\t\tvar temp = this.previous.style['newEdgeStyle'];\n\t\t\t\t\n\t\t\t\tif (temp != null)\n\t\t\t\t{\n\t\t\t\t\ttry\n\t\t\t\t\t{\n\t\t\t\t\t\tvar styles = JSON.parse(temp);\n\t\t\t\t\t\t\n\t\t\t\t\t\tfor (var key in styles)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tstate.style[key] = styles[key];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tcatch (e)\n\t\t\t\t\t{\n\t\t\t\t\t\t// ignore\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tstate.style = this.graph.postProcessCellStyle(state.cell, state.style);\n\t\t\t\n\t\t\treturn state;\n\t\t};\n\n\t\t// Overrides dashed state with current edge style\n\t\tvar connectionHandlerCreateShape = mxConnectionHandler.prototype.createShape;\n\t\tmxConnectionHandler.prototype.createShape = function()\n\t\t{\n\t\t\tvar shape = connectionHandlerCreateShape.apply(this, arguments);\n\t\t\t\n\t\t\tshape.isDashed = this.graph.currentEdgeStyle[mxConstants.STYLE_DASHED] == '1';\n\t\t\t\n\t\t\treturn shape;\n\t\t}\n\t\t\n\t\t// Overrides live preview to keep current style\n\t\tmxConnectionHandler.prototype.updatePreview = function(valid)\n\t\t{\n\t\t\t// do not change color of preview\n\t\t};\n\t\t\n\t\t// Overrides connection handler to ignore edges instead of not allowing connections\n\t\tvar mxConnectionHandlerCreateMarker = mxConnectionHandler.prototype.createMarker;\n\t\tmxConnectionHandler.prototype.createMarker = function()\n\t\t{\n\t\t\tvar marker = mxConnectionHandlerCreateMarker.apply(this, arguments);\n\t\t\n\t\t\tvar markerGetCell = marker.getCell;\n\t\t\tmarker.getCell = mxUtils.bind(this, function(me)\n\t\t\t{\n\t\t\t\tvar result = markerGetCell.apply(this, arguments);\n\t\t\t\n\t\t\t\tthis.error = null;\n\t\t\t\t\n\t\t\t\treturn result;\n\t\t\t});\n\t\t\t\n\t\t\treturn marker;\n\t\t};\n\n\t\t/**\n\t\t * \n\t\t */\n\t\tGraph.prototype.defaultVertexStyle = {};\n\n\t\t/**\n\t\t * Contains the default style for edges.\n\t\t */\n\t\tGraph.prototype.defaultEdgeStyle = {'edgeStyle': 'orthogonalEdgeStyle', 'rounded': '0',\n\t\t\t'jettySize': 'auto', 'orthogonalLoop': '1'};\n\n\t\t/**\n\t\t * Returns the current edge style as a string.\n\t\t */\n\t\tGraph.prototype.createCurrentEdgeStyle = function()\n\t\t{\n\t\t\tvar style = 'edgeStyle=' + (this.currentEdgeStyle['edgeStyle'] || 'none') + ';';\n\t\t\tvar keys = ['shape', 'curved', 'rounded', 'comic', 'sketch', 'fillWeight', 'hachureGap',\n\t\t\t\t'hachureAngle', 'jiggle', 'disableMultiStroke', 'disableMultiStrokeFill', 'fillStyle',\n\t\t\t\t'curveFitting', 'simplification', 'comicStyle', 'jumpStyle', 'jumpSize'];\n\t\t\t\n\t\t\tfor (var i = 0; i < keys.length; i++)\n\t\t\t{\n\t\t\t\tif (this.currentEdgeStyle[keys[i]] != null)\n\t\t\t\t{\n\t\t\t\t\tstyle += keys[i] + '=' + this.currentEdgeStyle[keys[i]] + ';';\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// Overrides the global default to match the default edge style\n\t\t\tif (this.currentEdgeStyle['orthogonalLoop'] != null)\n\t\t\t{\n\t\t\t\tstyle += 'orthogonalLoop=' + this.currentEdgeStyle['orthogonalLoop'] + ';';\n\t\t\t}\n\t\t\telse if (Graph.prototype.defaultEdgeStyle['orthogonalLoop'] != null)\n\t\t\t{\n\t\t\t\tstyle += 'orthogonalLoop=' + Graph.prototype.defaultEdgeStyle['orthogonalLoop'] + ';';\n\t\t\t}\n\n\t\t\t// Overrides the global default to match the default edge style\n\t\t\tif (this.currentEdgeStyle['jettySize'] != null)\n\t\t\t{\n\t\t\t\tstyle += 'jettySize=' + this.currentEdgeStyle['jettySize'] + ';';\n\t\t\t}\n\t\t\telse if (Graph.prototype.defaultEdgeStyle['jettySize'] != null)\n\t\t\t{\n\t\t\t\tstyle += 'jettySize=' + Graph.prototype.defaultEdgeStyle['jettySize'] + ';';\n\t\t\t}\n\t\t\t\n\t\t\t// Special logic for custom property of elbowEdgeStyle\n\t\t\tif (this.currentEdgeStyle['edgeStyle'] == 'elbowEdgeStyle' && this.currentEdgeStyle['elbow'] != null)\n\t\t\t{\n\t\t\t\tstyle += 'elbow=' + this.currentEdgeStyle['elbow'] + ';';\n\t\t\t}\n\t\t\t\n\t\t\tif (this.currentEdgeStyle['html'] != null)\n\t\t\t{\n\t\t\t\tstyle += 'html=' + this.currentEdgeStyle['html'] + ';';\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tstyle += 'html=1;';\n\t\t\t}\n\t\t\t\n\t\t\treturn style;\n\t\t};\n\n\t\t/**\n\t\t * Hook for subclassers.\n\t\t */\n\t\tGraph.prototype.getPagePadding = function()\n\t\t{\n\t\t\treturn new mxPoint(0, 0);\n\t\t};\n\t\t\n\t\t/**\n\t\t * Loads the stylesheet for this graph.\n\t\t */\n\t\tGraph.prototype.loadStylesheet = function()\n\t\t{\n\t\t\tvar node = (this.themes != null) ? this.themes[this.defaultThemeName] :\n\t\t\t\t(!mxStyleRegistry.dynamicLoading) ? null :\n\t\t\t\tmxUtils.load(STYLE_PATH + '/default.xml').getDocumentElement();\n\t\t\t\n\t\t\tif (node != null)\n\t\t\t{\n\t\t\t\tvar dec = new mxCodec(node.ownerDocument);\n\t\t\t\tdec.decode(node, this.getStylesheet());\n\t\t\t}\n\t\t};\n\n\t\t/**\n\t\t * Creates lookup from object IDs to cell IDs.\n\t\t */\n\t\tGraph.prototype.createCellLookup = function(cells, lookup)\n\t\t{\n\t\t\tlookup = (lookup != null) ? lookup : new Object();\n\t\t\t\n\t\t\tfor (var i = 0; i < cells.length; i++)\n\t\t\t{\n\t\t\t\tvar cell = cells[i];\n\t\t\t\tlookup[mxObjectIdentity.get(cell)] = cell.getId();\n\t\t\t\tvar childCount = this.model.getChildCount(cell);\n\t\t\t\t\n\t\t\t\tfor (var j = 0; j < childCount; j++)\n\t\t\t\t{\n\t\t\t\t\tthis.createCellLookup([this.model.getChildAt(cell, j)], lookup);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\treturn lookup;\n\t\t};\n\n\t\t/**\n\t\t * Creates lookup from original to cloned cell IDs where mapping is\n\t\t * the mapping used in cloneCells and lookup is a mapping from\n\t\t * object IDs to cell IDs.\n\t\t */\n\t\tGraph.prototype.createCellMapping = function(mapping, lookup, cellMapping)\n\t\t{\n\t\t\tcellMapping = (cellMapping != null) ? cellMapping : new Object();\n\t\t\t\n\t\t\tfor (var objectId in mapping)\n\t\t\t{\n\t\t\t\tvar cellId = lookup[objectId];\n\t\t\t\t\n\t\t\t\tif (cellMapping[cellId] == null)\n\t\t\t\t{\n\t\t\t\t\t// Uses empty string if clone ID was null which means\n\t\t\t\t\t// the cell was cloned but not inserted into the model.\n\t\t\t\t\tcellMapping[cellId] = mapping[objectId].getId() || '';\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\treturn cellMapping;\n\t\t};\n\t\t\n\t\t/**\n\t\t * \n\t\t */\n\t\tGraph.prototype.importGraphModel = function(node, dx, dy, crop)\n\t\t{\n\t\t\tdx = (dx != null) ? dx : 0;\n\t\t\tdy = (dy != null) ? dy : 0;\n\t\t\t\n\t\t\tvar codec = new mxCodec(node.ownerDocument);\n\t\t\tvar tempModel = new mxGraphModel();\n\t\t\tcodec.decode(node, tempModel);\n\t\t\tvar cells = []\n\t\t\t\n\t\t\t// Clones cells to remove invalid edges\n\t\t\tvar cloneMap = new Object();\n\t\t\tvar cellMapping = new Object();\n\t\t\tvar layers = tempModel.getChildren(this.cloneCell(tempModel.root,\n\t\t\t\tthis.isCloneInvalidEdges(), cloneMap));\n\t\t\t\n\t\t\tif (layers != null)\n\t\t\t{\n\t\t\t\t// Creates lookup from object IDs to cell IDs\n\t\t\t\tvar lookup = this.createCellLookup([tempModel.root]);\n\t\t\t\t\n\t\t\t\t// Uses copy as layers are removed from array inside loop\n\t\t\t\tlayers = layers.slice();\n\t\n\t\t\t\tthis.model.beginUpdate();\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\t// Merges into unlocked current layer if one layer is pasted\n\t\t\t\t\tif (layers.length == 1 && !this.isCellLocked(this.getDefaultParent()))\n\t\t\t\t\t{\n\t\t\t\t\t\tvar children = tempModel.getChildren(layers[0]);\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (children != null)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcells = this.moveCells(children,\n\t\t\t\t\t\t\t\tdx, dy, false, this.getDefaultParent());\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Imported default parent maps to local default parent\n\t\t\t\t\t\t\tcellMapping[tempModel.getChildAt(tempModel.root, 0).getId()] =\n\t\t\t\t\t\t\t\tthis.getDefaultParent().getId();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tfor (var i = 0; i < layers.length; i++)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tvar children = this.model.getChildren(this.moveCells(\n\t\t\t\t\t\t\t\t[layers[i]], dx, dy, false, this.model.getRoot())[0]);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif (children != null)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tcells = cells.concat(children);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif (cells != null)\n\t\t\t\t\t{\n\t\t\t\t\t\t// Adds mapping for all cloned entries from imported to local cell ID\n\t\t\t\t\t\tthis.createCellMapping(cloneMap, lookup, cellMapping);\n\t\t\t\t\t\tthis.updateCustomLinks(cellMapping, cells);\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (crop)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif (this.isGridEnabled())\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tdx = this.snap(dx);\n\t\t\t\t\t\t\t\tdy = this.snap(dy);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tvar bounds = this.getBoundingBoxFromGeometry(cells, true);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif (bounds != null)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tthis.moveCells(cells, dx - bounds.x, dy - bounds.y);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tfinally\n\t\t\t\t{\n\t\t\t\t\tthis.model.endUpdate();\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\treturn cells;\n\t\t};\n\t\t\n\t\t/**\n\t\t * Translates this point by the given vector.\n\t\t * \n\t\t * @param {number} dx X-coordinate of the translation.\n\t\t * @param {number} dy Y-coordinate of the translation.\n\t\t */\n\t\tGraph.prototype.encodeCells = function(cells)\n\t\t{\n\t\t\tvar cloneMap = new Object();\n\t\t\tvar clones = this.cloneCells(cells, null, cloneMap);\n\t\t\t\n\t\t\t// Creates a dictionary for fast lookups\n\t\t\tvar dict = new mxDictionary();\n\t\t\t\n\t\t\tfor (var i = 0; i < cells.length; i++)\n\t\t\t{\n\t\t\t\tdict.put(cells[i], true);\n\t\t\t}\n\t\t\t\n\t\t\tvar codec = new mxCodec();\n\t\t\tvar model = new mxGraphModel();\n\t\t\tvar parent = model.getChildAt(model.getRoot(), 0);\n\t\t\t\n\t\t\tfor (var i = 0; i < clones.length; i++)\n\t\t\t{\n\t\t\t\tmodel.add(parent, clones[i]);\n\t\t\t\n\t\t\t\t// Checks for orphaned relative children and makes absolute\n\t\t\t\tvar state = this.view.getState(cells[i]);\n\t\t\t\t\n\t\t\t\tif (state != null)\n\t\t\t\t{\n\t\t\t\t\tvar geo = this.getCellGeometry(clones[i]);\n\t\t\t\t\t\n\t\t\t\t\tif (geo != null && geo.relative && !this.model.isEdge(cells[i]) &&\n\t\t\t\t\t\tdict.get(this.model.getParent(cells[i])) == null)\n\t\t\t\t\t{\n\t\t\t\t\t\tgeo.offset = null;\n\t\t\t\t\t\tgeo.relative = false;\n\t\t\t\t\t\tgeo.x = state.x / state.view.scale - state.view.translate.x;\n\t\t\t\t\t\tgeo.y = state.y / state.view.scale - state.view.translate.y;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tthis.updateCustomLinks(this.createCellMapping(cloneMap,\n\t\t\t\tthis.createCellLookup(cells)), clones);\n\n\t\t\treturn codec.encode(model);\n\t\t};\n\n\t\t/**\n\t\t * Overridden to use table cell instead of table as parent.\n\t\t */\n\t\tGraph.prototype.isSwimlane = function(cell, ignoreState)\n\t\t{\n\t\t\tvar shape = null;\n\n\t\t\tif (cell != null && !this.model.isEdge(cell) &&\n\t\t\t\tthis.model.getParent(cell) !=\n\t\t\t\t\tthis.model.getRoot())\n\t\t\t{\n\t\t\t\tvar style = this.getCurrentCellStyle(cell, ignoreState)\n\t\t\t\tshape = style[mxConstants.STYLE_SHAPE];\n\t\t\t}\n\t\t\t\n\t\t\treturn shape == mxConstants.SHAPE_SWIMLANE ||\n\t\t\t\tshape == 'table' || shape == 'tableRow';\n\t\t};\n\t\t\n\t\t/**\n\t\t * Overridden to check table cells and rows.\n\t\t */\n\t\tvar graphIsCellEditable = Graph.prototype.isCellEditable;\n\t\tGraph.prototype.isCellEditable = function(cell)\n\t\t{\n\t\t\tif (cell == null || !graphIsCellEditable.apply(this, arguments))\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\telse if (this.isTableCell(cell) || this.isTableRow(cell))\n\t\t\t{\n\t\t\t\treturn this.isCellEditable(this.model.getParent(cell));\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn true;\n\t\t\t}\n\t\t};\n\t\t\n\t\t/**\n\t\t * Overridden to check table cells and rows.\n\t\t */\n\t\tvar graphIsCellMovable = Graph.prototype.isCellMovable;\n\t\tGraph.prototype.isCellMovable = function(cell)\n\t\t{\n\t\t\tif (cell == null || !graphIsCellMovable.apply(this, arguments))\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\telse if (this.isTableCell(cell) || this.isTableRow(cell))\n\t\t\t{\n\t\t\t\treturn this.isCellMovable(this.model.getParent(cell));\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn true;\n\t\t\t}\n\t\t};\n\t\t\n\t\t/**\n\t\t * Overridden to add expand style.\n\t\t */\n\t\tvar graphIsExtendParent = Graph.prototype.isExtendParent;\n\t\tGraph.prototype.isExtendParent = function(cell)\n\t\t{\n\t\t\tvar parent = this.model.getParent(cell);\n\t\t\t\n\t\t\tif (parent != null)\n\t\t\t{\n\t\t\t\tvar style = this.getCurrentCellStyle(parent);\n\t\t\t\t\n\t\t\t\tif (style['expand'] != null)\n\t\t\t\t{\n\t\t\t\t\treturn style['expand'] != '0';\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\treturn graphIsExtendParent.apply(this, arguments) &&\n\t\t\t\t(parent == null || !this.isTable(parent));\n\t\t};\n\t\t\n\t\t/**\n\t\t * Overridden to use table cell instead of table as parent.\n\t\t */\n\t\tvar graphSplitEdge = Graph.prototype.splitEdge;\n\t\tGraph.prototype.splitEdge = function(edge, cells, newEdge, dx, dy, x, y, parent)\n\t\t{\n\t\t\tif (parent == null)\n\t\t\t{\n\t\t\t\tparent = this.model.getParent(edge);\n\t\t\t\t\n\t\t\t\tif (this.isTable(parent) || this.isTableRow(parent))\n\t\t\t\t{\n\t\t\t\t\tparent = this.getCellAt(x, y, null, true, false);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tvar newEdge = null;\n\t\t\t\t\n\t\t\tthis.model.beginUpdate();\n\t\t\ttry\n\t\t\t{\n\t\t\t\tvar newEdge = graphSplitEdge.apply(this, [edge, cells, newEdge, dx, dy, x, y, parent]);\n\t\t\t\t\n\t\t\t\t// Removes cloned value on first segment\n\t\t\t\tthis.model.setValue(newEdge, '');\n\t\t\t\t\n\t\t\t\t// Removes child labels on first or second segment depending on coordinate\n\t\t\t\t// LATER: Split and reposition labels based on x and y\n\t\t\t\tvar sourceLabels = this.getChildCells(newEdge, true);\n\t\t\t\t\n\t\t\t\tfor (var i = 0; i < sourceLabels.length; i++)\n\t\t\t\t{\n\t\t\t\t\tvar geo = this.getCellGeometry(sourceLabels[i]);\n\t\t\t\t\t\n\t\t\t\t\tif (geo != null && geo.relative && geo.x > 0)\n\t\t\t\t\t{\n\t\t\t\t\t\tthis.model.remove(sourceLabels[i]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tvar targetLabels = this.getChildCells(edge, true);\n\t\t\t\t\n\t\t\t\tfor (var i = 0; i < targetLabels.length; i++)\n\t\t\t\t{\n\t\t\t\t\tvar geo = this.getCellGeometry(targetLabels[i]);\n\t\t\t\t\t\n\t\t\t\t\tif (geo != null && geo.relative && geo.x <= 0)\n\t\t\t\t\t{\n\t\t\t\t\t\tthis.model.remove(targetLabels[i]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// Removes entryX/Y and exitX/Y if snapToPoint is used\n\t\t\t\tvar target = this.model.getTerminal(newEdge, false);\n\t\t\t\t\n\t\t\t\tif (target != null)\n\t\t\t\t{\n\t\t\t\t\tvar style = this.getCurrentCellStyle(target);\n\t\t\t\t\t\n\t\t\t\t\tif (style != null && style['snapToPoint'] == '1')\n\t\t\t\t\t{\n\t\t\t\t\t\tthis.setCellStyles(mxConstants.STYLE_EXIT_X, null, [edge]);\n\t\t\t\t\t\tthis.setCellStyles(mxConstants.STYLE_EXIT_Y, null, [edge]);\n\t\t\t\t\t\tthis.setCellStyles(mxConstants.STYLE_ENTRY_X, null, [newEdge]);\n\t\t\t\t\t\tthis.setCellStyles(mxConstants.STYLE_ENTRY_Y, null, [newEdge]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\tfinally\n\t\t\t{\n\t\t\t\tthis.model.endUpdate();\n\t\t\t}\n\t\t\t\t\t\n\t\t\treturn newEdge;\n\t\t};\n\t\t\n\t\t/**\n\t\t * Overridden to flatten cell hierarchy for selecting next and previous.\n\t\t */\n\t\tvar graphSelectCell = Graph.prototype.selectCell;\n\t\tGraph.prototype.selectCell = function(isNext, isParent, isChild)\n\t\t{\n\t\t\tif (isParent || isChild)\n\t\t\t{\n\t\t\t\tgraphSelectCell.apply(this, arguments);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tvar cell = this.getSelectionCell();\n\t\t\t\tvar index = null;\n\t\t\t\tvar cells = [];\n\t\t\t\t\n\t\t\t\t// LATER: Reverse traverse order for !isNext\n\t\t\t\tvar flatten = mxUtils.bind(this, function(temp)\n\t\t\t\t{\n\t\t\t\t\tif (this.view.getState(temp) != null &&\n\t\t\t\t\t\t(this.model.isVertex(temp) ||\n\t\t\t\t\t\tthis.model.isEdge(temp)))\n\t\t\t\t\t{\n\t\t\t\t\t\tcells.push(temp);\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (temp == cell)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tindex = cells.length - 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if ((isNext && cell == null && cells.length > 0) ||\n\t\t\t\t\t\t\t(index != null && ((isNext && cells.length > index)) ||\n\t\t\t\t\t\t\t(!isNext && index > 0)))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\n\t\t\t\t\tfor (var i = 0; i < this.model.getChildCount(temp); i++)\n\t\t\t\t\t{\n\t\t\t\t\t\tflatten(this.model.getChildAt(temp, i));\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\t\n\t\t\t\tflatten(this.model.root);\n\t\t\t\t\n\t\t\t\tif (cells.length > 0)\n\t\t\t\t{\n\t\t\t\t\tif (index != null)\n\t\t\t\t\t{\n\t\t\t\t\t\tindex = mxUtils.mod(index + ((isNext) ? 1 : -1), cells.length)\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tindex = 0;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tthis.setSelectionCell(cells[index]);\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\t/**\n\t\t * Swaps the given shapes.\n\t\t */\n\t\tGraph.prototype.swapShapes = function(cells, dx, dy, clone, target, evt, mapping)\n\t\t{\n\t\t\tvar result = false;\n\n\t\t\tif (!clone && target != null && cells.length == 1)\n\t\t\t{\n\t\t\t\tvar targetState = this.view.getState(target);\n\t\t\t\tvar sourceState = this.view.getState(cells[0]);\n\n\t\t\t\tif (targetState != null && sourceState != null &&\n\t\t\t\t\t(evt != null && mxEvent.isShiftDown(evt)))\n\t\t\t\t{\n\t\t\t\t\tvar g1 = this.getCellGeometry(target);\n\t\t\t\t\tvar g2 = this.getCellGeometry(cells[0]);\n\n\t\t\t\t\tif (g1 != null && g2 != null)\n\t\t\t\t\t{\n\t\t\t\t\t\tvar ng1 = g1.clone();\n\t\t\t\t\t\tvar ng2 = g2.clone();\n\t\t\t\t\t\tng2.x = ng1.x;\n\t\t\t\t\t\tng2.y = ng1.y;\n\t\t\t\t\t\tng1.x = g2.x;\n\t\t\t\t\t\tng1.y = g2.y;\n\n\t\t\t\t\t\tthis.model.beginUpdate();\n\t\t\t\t\t\ttry\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tthis.model.setGeometry(target, ng1);\n\t\t\t\t\t\t\tthis.model.setGeometry(cells[0], ng2);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfinally\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tthis.model.endUpdate();\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tresult = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn result;\n\t\t};\n\n\t\t/**\n\t\t * Overrides cloning cells in moveCells.\n\t\t */\n\t\tvar graphMoveCells = Graph.prototype.moveCells;\n\t\tGraph.prototype.moveCells = function(cells, dx, dy, clone, target, evt, mapping)\n\t\t{\n\t\t\tif (this.swapShapes(cells, dx, dy, clone, target, evt, mapping))\n\t\t\t{\n\t\t\t\treturn cells;\n\t\t\t}\n\t\t\t\n\t\t\tmapping = (mapping != null) ? mapping : new Object();\n\t\t\t\n\t\t\t// Replaces source tables with rows\n\t\t\tif (this.isTable(target))\n\t\t\t{\n\t\t\t\tvar newCells = [];\n\t\t\t\t\n\t\t\t\tfor (var i = 0; i < cells.length; i++)\n\t\t\t\t{\n\t\t\t\t\tif (this.isTable(cells[i]))\n\t\t\t\t\t{\n\t\t\t\t\t\tnewCells = newCells.concat(this.model.getChildCells(cells[i], true).reverse());\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tnewCells.push(cells[i]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tcells = newCells;\n\t\t\t}\n\t\t\t\n\t\t\tthis.model.beginUpdate();\n\t\t\ttry\n\t\t\t{\n\t\t\t\t// Updates source and target table heights and matches\n\t\t\t\t// column count for moving rows between tables\n\t\t\t\tvar sourceTables = [];\n\t\t\t\t\n\t\t\t\tfor (var i = 0; i < cells.length; i++)\n\t\t\t\t{\n\t\t\t\t\tif (target != null && this.isTableRow(cells[i]))\n\t\t\t\t\t{\n\t\t\t\t\t\tvar parent = this.model.getParent(cells[i]);\n\t\t\t\t\t\tvar row = this.getCellGeometry(cells[i]);\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (this.isTable(parent))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tsourceTables.push(parent);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (parent != null && row != null &&\n\t\t\t\t\t\t\tthis.isTable(parent) &&\n\t\t\t\t\t\t\tthis.isTable(target) &&\n\t\t\t\t\t\t\t(clone || parent != target))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif (!clone)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tvar table = this.getCellGeometry(parent);\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tif (table != null)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\ttable = table.clone();\n\t\t\t\t\t\t\t\t\ttable.height -= row.height;\n\t\t\t\t\t\t\t\t\tthis.model.setGeometry(parent, table);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\n\t\t\t\t\t\t\tvar table = this.getCellGeometry(target);\n\t\t\t\t\t\n\t\t\t\t\t\t\tif (table != null)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\ttable = table.clone();\n\t\t\t\t\t\t\t\ttable.height += row.height;\n\t\t\t\t\t\t\t\tthis.model.setGeometry(target, table);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Matches column count\n\t\t\t\t\t\t\tvar rows = this.model.getChildCells(target, true);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif (rows.length > 0)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tcells[i] = (clone) ? this.cloneCell(cells[i]) : cells[i];\n\t\t\t\t\t\t\t\tvar sourceCols = this.model.getChildCells(cells[i], true);\n\t\t\t\t\t\t\t\tvar cols = this.model.getChildCells(rows[0], true);\n\t\t\t\t\t\t\t\tvar count = cols.length - sourceCols.length;\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tif (count > 0)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tfor (var j = 0; j < count; j++)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tvar col = this.cloneCell(sourceCols[sourceCols.length - 1]);\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tif (col != null)\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\tcol.value = '';\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\tthis.model.add(cells[i], col);\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse if (count < 0)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tfor (var j = 0; j > count; j--)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tthis.model.remove(sourceCols[sourceCols.length + j - 1]);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t// Updates column widths\n\t\t\t\t\t\t\t\tsourceCols = this.model.getChildCells(cells[i], true);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tfor (var j = 0; j < cols.length; j++)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tvar geo = this.getCellGeometry(cols[j]);\n\t\t\t\t\t\t\t\t\tvar geo2 = this.getCellGeometry(sourceCols[j]);\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tif (geo != null && geo2 != null)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tgeo2 = geo2.clone();\n\t\t\t\t\t\t\t\t\t\tgeo2.width = geo.width;\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tthis.model.setGeometry(sourceCols[j], geo2);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tvar result = graphMoveCells.apply(this, arguments);\n\t\t\t\t\n\t\t\t\t// Removes empty tables\n\t\t\t\tfor (var i = 0; i < sourceTables.length; i++)\n\t\t\t\t{\n\t\t\t\t\tif (!clone && this.model.contains(sourceTables[i]) &&\n\t\t\t\t\t\tthis.model.getChildCount(sourceTables[i]) == 0)\n\t\t\t\t\t{\n\t\t\t\t\t\tthis.model.remove(sourceTables[i]);\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (clone)\n\t\t\t\t{\n\t\t\t\t\tthis.updateCustomLinks(this.createCellMapping(mapping,\n\t\t\t\t\t\tthis.createCellLookup(cells)), result);\n\t\t\t\t}\n\t\t\t}\n\t\t\tfinally\n\t\t\t{\n\t\t\t\tthis.model.endUpdate();\n\t\t\t}\n\t\t\t\n\t\t\treturn result;\n\t\t};\n\t\t\t\t\n\t\t/**\n\t\t * Overriddes to delete label for table cells.\n\t\t */\n\t\tvar graphRemoveCells = Graph.prototype.removeCells;\n\t\tGraph.prototype.removeCells = function(cells, includeEdges)\n\t\t{\n\t\t\tvar result = [];\n\t\t\t\n\t\t\tthis.model.beginUpdate();\n\t\t\ttry\n\t\t\t{\n\t\t\t\t// Clears labels on table cells\n\t\t\t\tfor (var i = 0; i < cells.length; i++)\n\t\t\t\t{\n\t\t\t\t\tif (this.isTableCell(cells[i]))\n\t\t\t\t\t{\n\t\t\t\t\t\tvar row = this.model.getParent(cells[i]);\n\t\t\t\t\t\tvar table = this.model.getParent(row);\n\t\t\t\t\t\t\n\t\t\t\t\t\t// Removes table if one cell in one row left\n\t\t\t\t\t\tif (this.model.getChildCount(row) == 1 &&\n\t\t\t\t\t\t\tthis.model.getChildCount(table) == 1)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif (mxUtils.indexOf(cells, table) < 0 &&\n\t\t\t\t\t\t\t\tmxUtils.indexOf(result, table) < 0)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tresult.push(table);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tthis.labelChanged(cells[i], '');\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t// Deletes table if all rows are removed\n\t\t\t\t\t\tif (this.isTableRow(cells[i]))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tvar table = this.model.getParent(cells[i]);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif (mxUtils.indexOf(cells, table) < 0 &&\n\t\t\t\t\t\t\t\tmxUtils.indexOf(result, table) < 0)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tvar rows = this.model.getChildCells(table, true);\n\t\t\t\t\t\t\t\tvar deleteCount = 0;\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tfor (var j = 0; j < rows.length; j++)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tif (mxUtils.indexOf(cells, rows[j]) >= 0)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tdeleteCount++;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tif (deleteCount == rows.length)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tresult.push(table);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tresult.push(cells[i]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tresult = graphRemoveCells.apply(this, [result, includeEdges]);\n\t\t\t}\n\t\t\tfinally\n\t\t\t{\n\t\t\t\tthis.model.endUpdate();\n\t\t\t}\n\n\t\t\treturn result;\n\t\t};\n\t\t\n\t\t/**\n\t\t * Updates cells IDs for custom links in the given cells using an\n\t\t * optional graph to avoid changing the undo history.\n\t\t */\n\t\tGraph.prototype.updateCustomLinks = function(mapping, cells, graph)\n\t\t{\n\t\t\tgraph = (graph != null) ? graph : new Graph();\n\n\t\t\tfor (var i = 0; i < cells.length; i++)\n\t\t\t{\n\t\t\t\tif (cells[i] != null)\n\t\t\t\t{\n\t\t\t\t\tgraph.updateCustomLinksForCell(mapping, cells[i], graph);\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\t\n\t\t/**\n\t\t * Updates cell IDs in custom links on the given cell and its label.\n\t\t */\n\t\tGraph.prototype.updateCustomLinksForCell = function(mapping, cell)\n\t\t{\n\t\t\tthis.doUpdateCustomLinksForCell(mapping, cell);\n\t\t\tvar childCount = this.model.getChildCount(cell);\n\t\t\t\t\n\t\t\tfor (var i = 0; i < childCount; i++)\n\t\t\t{\n\t\t\t\tthis.updateCustomLinksForCell(mapping,\n\t\t\t\t\tthis.model.getChildAt(cell, i));\n\t\t\t}\n\t\t};\n\t\t\t\t\n\t\t/**\n\t\t * Updates cell IDs in custom links on the given cell and its label.\n\t\t */\n\t\t Graph.prototype.doUpdateCustomLinksForCell = function(mapping, cell)\n\t\t {\n\t\t\t // Hook for subclassers\n\t\t };\n\t\t \n\t\t/**\n\t\t * Overrides method to provide connection constraints for shapes.\n\t\t */\n\t\tGraph.prototype.getAllConnectionConstraints = function(terminal, source)\n\t\t{\n\t\t\tif (terminal != null)\n\t\t\t{\n\t\t\t\tvar constraints = mxUtils.getValue(terminal.style, 'points', null);\n\t\t\t\t\n\t\t\t\tif (constraints != null)\n\t\t\t\t{\n\t\t\t\t\t// Requires an array of arrays with x, y (0..1), an optional\n\t\t\t\t\t// [perimeter (0 or 1), dx, and dy] eg. points=[[0,0,1,-10,10],[0,1,0],[1,1]]\n\t\t\t\t\tvar result = [];\n\t\t\t\t\t\n\t\t\t\t\ttry\n\t\t\t\t\t{\n\t\t\t\t\t\tvar c = JSON.parse(constraints);\n\t\t\t\t\t\t\n\t\t\t\t\t\tfor (var i = 0; i < c.length; i++)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tvar tmp = c[i];\n\t\t\t\t\t\t\tresult.push(new mxConnectionConstraint(new mxPoint(tmp[0], tmp[1]), (tmp.length > 2) ? tmp[2] != '0' : true,\n\t\t\t\t\t\t\t\t\tnull, (tmp.length > 3) ? tmp[3] : 0, (tmp.length > 4) ? tmp[4] : 0));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tcatch (e)\n\t\t\t\t\t{\n\t\t\t\t\t\t// ignore\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\treturn result;\n\t\t\t\t}\n\t\t\t\telse if (terminal.shape != null && terminal.shape.bounds != null)\n\t\t\t\t{\n\t\t\t\t\tvar dir = terminal.shape.direction;\n\t\t\t\t\tvar bounds = terminal.shape.bounds;\n\t\t\t\t\tvar scale = terminal.shape.scale;\n\t\t\t\t\tvar w = bounds.width / scale;\n\t\t\t\t\tvar h = bounds.height / scale;\n\t\t\t\t\t\n\t\t\t\t\tif (dir == mxConstants.DIRECTION_NORTH || dir == mxConstants.DIRECTION_SOUTH)\n\t\t\t\t\t{\n\t\t\t\t\t\tvar tmp = w;\n\t\t\t\t\t\tw = h;\n\t\t\t\t\t\th = tmp;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tconstraints = terminal.shape.getConstraints(terminal.style, w, h);\n\t\t\t\t\t\n\t\t\t\t\tif (constraints != null)\n\t\t\t\t\t{\n\t\t\t\t\t\treturn constraints;\n\t\t\t\t\t}\n\t\t\t\t\telse if (terminal.shape.stencil != null && terminal.shape.stencil.constraints != null)\n\t\t\t\t\t{\n\t\t\t\t\t\treturn terminal.shape.stencil.constraints;\n\t\t\t\t\t}\n\t\t\t\t\telse if (terminal.shape.constraints != null)\n\t\t\t\t\t{\n\t\t\t\t\t\treturn terminal.shape.constraints;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\n\t\t\treturn null;\n\t\t};\n\t\t\n\t\t/**\n\t\t * Inverts the elbow edge style without removing existing styles.\n\t\t */\n\t\tGraph.prototype.flipEdge = function(edge)\n\t\t{\n\t\t\tif (edge != null)\n\t\t\t{\n\t\t\t\tvar style = this.getCurrentCellStyle(edge);\n\t\t\t\tvar elbow = mxUtils.getValue(style, mxConstants.STYLE_ELBOW,\n\t\t\t\t\tmxConstants.ELBOW_HORIZONTAL);\n\t\t\t\tvar value = (elbow == mxConstants.ELBOW_HORIZONTAL) ?\n\t\t\t\t\tmxConstants.ELBOW_VERTICAL : mxConstants.ELBOW_HORIZONTAL;\n\t\t\t\tthis.setCellStyles(mxConstants.STYLE_ELBOW, value, [edge]);\n\t\t\t}\n\t\t};\n\n\t\t/**\n\t\t * Disables drill-down for non-swimlanes.\n\t\t */\n\t\tGraph.prototype.isValidRoot = function(cell)\n\t\t{\n\t\t\t// Counts non-relative children\n\t\t\tvar childCount = this.model.getChildCount(cell);\n\t\t\tvar realChildCount = 0;\n\t\t\t\n\t\t\tfor (var i = 0; i < childCount; i++)\n\t\t\t{\n\t\t\t\tvar child = this.model.getChildAt(cell, i);\n\t\t\t\t\n\t\t\t\tif (this.model.isVertex(child))\n\t\t\t\t{\n\t\t\t\t\tvar geometry = this.getCellGeometry(child);\n\t\t\t\t\t\n\t\t\t\t\tif (geometry != null && !geometry.relative)\n\t\t\t\t\t{\n\t\t\t\t\t\trealChildCount++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\treturn realChildCount > 0 || this.isContainer(cell);\n\t\t};\n\t\t\n\t\t/**\n\t\t * Disables drill-down for non-swimlanes.\n\t\t */\n\t\tGraph.prototype.isValidDropTarget = function(cell, cells, evt)\n\t\t{\n\t\t\tvar style = this.getCurrentCellStyle(cell);\n\t\t\tvar tables = true;\n\t\t\tvar rows = true;\n\t\t\t\n\t\t\tfor (var i = 0; i < cells.length && rows; i++)\n\t\t\t{\n\t\t\t\ttables = tables && this.isTable(cells[i]);\n\t\t\t\trows = rows && this.isTableRow(cells[i]);\n\t\t\t}\n\n\t\t\treturn !this.isCellLocked(cell) && ((cells.length == 1 && evt != null &&\n\t\t\t\tmxEvent.isShiftDown(evt) && !mxEvent.isControlDown(evt) &&\n\t\t\t\t!mxEvent.isAltDown(evt)) || this.isTargetShape(cell, cells, evt) ||\n\t\t\t\t((mxUtils.getValue(style, 'part', '0') != '1' || this.isContainer(cell)) &&\n\t\t\t\tmxUtils.getValue(style, 'dropTarget', '1') != '0' && (mxGraph.prototype.\n\t\t\t\tisValidDropTarget.apply(this, arguments) || this.isContainer(cell)) &&\n\t\t\t\t!this.isTableRow(cell) && (!this.isTable(cell) || rows || tables)));\n\t\t};\n\t\n\t\t/**\n\t\t * Overrides createGroupCell to set the group style for new groups to 'group'.\n\t\t */\n\t\tGraph.prototype.createGroupCell = function()\n\t\t{\n\t\t\tvar group = mxGraph.prototype.createGroupCell.apply(this, arguments);\n\t\t\tgroup.setStyle('group');\n\t\t\t\n\t\t\treturn group;\n\t\t};\n\t\t\n\t\t/**\n\t\t * Disables extending parents with stack layouts on add\n\t\t */\n\t\tGraph.prototype.isExtendParentsOnAdd = function(cell)\n\t\t{\n\t\t\tvar result = mxGraph.prototype.isExtendParentsOnAdd.apply(this, arguments);\n\t\t\t\n\t\t\tif (result && cell != null && this.layoutManager != null)\n\t\t\t{\n\t\t\t\tvar parent = this.model.getParent(cell);\n\t\t\t\t\n\t\t\t\tif (parent != null)\n\t\t\t\t{\n\t\t\t\t\tvar layout = this.layoutManager.getLayout(parent);\n\t\t\t\t\t\n\t\t\t\t\tif (layout != null && layout.constructor == mxStackLayout)\n\t\t\t\t\t{\n\t\t\t\t\t\tresult = false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\treturn result;\n\t\t};\n\n\t\t/**\n\t\t * Overrides autosize to add a border.\n\t\t */\n\t\tGraph.prototype.getPreferredSizeForCell = function(cell)\n\t\t{\n\t\t\tvar result = mxGraph.prototype.getPreferredSizeForCell.apply(this, arguments);\n\t\t\t\n\t\t\t// Adds buffer\n\t\t\tif (result != null)\n\t\t\t{\n\t\t\t\tresult.width += 10;\n\t\t\t\tresult.height += 4;\n\t\t\t\t\n\t\t\t\tif (this.gridEnabled)\n\t\t\t\t{\n\t\t\t\t\tresult.width = this.snap(result.width);\n\t\t\t\t\tresult.height = this.snap(result.height);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\treturn result;\n\t\t}\n\n\t\t/**\n\t\t * Turns the given cells and returns the changed cells.\n\t\t */\n\t\tGraph.prototype.turnShapes = function(cells, backwards)\n\t\t{\n\t\t\tvar model = this.getModel();\n\t\t\tvar select = [];\n\t\t\t\n\t\t\tmodel.beginUpdate();\n\t\t\ttry\n\t\t\t{\n\t\t\t\tfor (var i = 0; i < cells.length; i++)\n\t\t\t\t{\n\t\t\t\t\tvar cell = cells[i];\n\t\t\t\t\t\n\t\t\t\t\tif (model.isEdge(cell))\n\t\t\t\t\t{\n\t\t\t\t\t\tvar src = model.getTerminal(cell, true);\n\t\t\t\t\t\tvar trg = model.getTerminal(cell, false);\n\t\t\t\t\t\t\n\t\t\t\t\t\tmodel.setTerminal(cell, trg, true);\n\t\t\t\t\t\tmodel.setTerminal(cell, src, false);\n\t\t\t\t\t\t\n\t\t\t\t\t\tvar geo = model.getGeometry(cell);\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (geo != null)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tgeo = geo.clone();\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif (geo.points != null)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tgeo.points.reverse();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tvar sp = geo.getTerminalPoint(true);\n\t\t\t\t\t\t\tvar tp = geo.getTerminalPoint(false)\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tgeo.setTerminalPoint(sp, false);\n\t\t\t\t\t\t\tgeo.setTerminalPoint(tp, true);\n\t\t\t\t\t\t\tmodel.setGeometry(cell, geo);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Inverts constraints\n\t\t\t\t\t\t\tvar edgeState = this.view.getState(cell);\n\t\t\t\t\t\t\tvar sourceState = this.view.getState(src);\n\t\t\t\t\t\t\tvar targetState = this.view.getState(trg);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif (edgeState != null)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tvar sc = (sourceState != null) ? this.getConnectionConstraint(edgeState, sourceState, true) : null;\n\t\t\t\t\t\t\t\tvar tc = (targetState != null) ? this.getConnectionConstraint(edgeState, targetState, false) : null;\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tthis.setConnectionConstraint(cell, src, true, tc);\n\t\t\t\t\t\t\t\tthis.setConnectionConstraint(cell, trg, false, sc);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t// Inverts perimeter spacings\n\t\t\t\t\t\t\t\tvar temp = mxUtils.getValue(edgeState.style, mxConstants.STYLE_SOURCE_PERIMETER_SPACING);\n\t\t\t\t\t\t\t\tthis.setCellStyles(mxConstants.STYLE_SOURCE_PERIMETER_SPACING, mxUtils.getValue(\n\t\t\t\t\t\t\t\t\tedgeState.style, mxConstants.STYLE_TARGET_PERIMETER_SPACING), [cell]);\n\t\t\t\t\t\t\t\tthis.setCellStyles(mxConstants.STYLE_TARGET_PERIMETER_SPACING, temp, [cell]);\n\t\t\t\t\t\t\t}\n\t\t\n\t\t\t\t\t\t\tselect.push(cell);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse if (model.isVertex(cell))\n\t\t\t\t\t{\n\t\t\t\t\t\tvar geo = this.getCellGeometry(cell);\n\t\t\t\n\t\t\t\t\t\tif (geo != null)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t// Rotates the size and position in the geometry\n\t\t\t\t\t\t\tif (!this.isTable(cell) && !this.isTableRow(cell) &&\n\t\t\t\t\t\t\t\t!this.isTableCell(cell) && !this.isSwimlane(cell))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tgeo = geo.clone();\n\t\t\t\t\t\t\t\tgeo.x += geo.width / 2 - geo.height / 2;\n\t\t\t\t\t\t\t\tgeo.y += geo.height / 2 - geo.width / 2;\n\t\t\t\t\t\t\t\tvar tmp = geo.width;\n\t\t\t\t\t\t\t\tgeo.width = geo.height;\n\t\t\t\t\t\t\t\tgeo.height = tmp;\n\t\t\t\t\t\t\t\tmodel.setGeometry(cell, geo);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Reads the current direction and advances by 90 degrees\n\t\t\t\t\t\t\tvar state = this.view.getState(cell);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif (state != null)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tvar dirs = [mxConstants.DIRECTION_EAST, mxConstants.DIRECTION_SOUTH,\n\t\t\t\t\t\t\t\t\tmxConstants.DIRECTION_WEST, mxConstants.DIRECTION_NORTH];\n\t\t\t\t\t\t\t\tvar dir = mxUtils.getValue(state.style, mxConstants.STYLE_DIRECTION,\n\t\t\t\t\t\t\t\t\tmxConstants.DIRECTION_EAST);\n\t\t\t\t\t\t\t\tthis.setCellStyles(mxConstants.STYLE_DIRECTION,\n\t\t\t\t\t\t\t\t\tdirs[mxUtils.mod(mxUtils.indexOf(dirs, dir) +\n\t\t\t\t\t\t\t\t\t((backwards) ? -1 : 1), dirs.length)], [cell]);\n\t\t\t\t\t\t\t}\n\t\t\n\t\t\t\t\t\t\tselect.push(cell);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tfinally\n\t\t\t{\n\t\t\t\tmodel.endUpdate();\n\t\t\t}\n\t\t\t\n\t\t\treturn select;\n\t\t};\n\t\t\n\t\t/**\n\t\t * Returns true if the given stencil contains any placeholder text.\n\t\t */\n\t\tGraph.prototype.stencilHasPlaceholders = function(stencil)\n\t\t{\n\t\t\tif (stencil != null && stencil.fgNode != null)\n\t\t\t{\n\t\t\t\tvar node = stencil.fgNode.firstChild;\n\t\t\t\t\n\t\t\t\twhile (node != null)\n\t\t\t\t{\n\t\t\t\t\tif (node.nodeName == 'text' && node.getAttribute('placeholders') == '1')\n\t\t\t\t\t{\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tnode = node.nextSibling;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\treturn false;\n\t\t};\n\t\t\n\t\t/**\n\t\t * Updates the child cells with placeholders if metadata of a\n\t\t * cell has changed and propagates geometry changes in tables.\n\t\t */\n\t\tvar graphProcessChange = Graph.prototype.processChange;\n\t\tGraph.prototype.processChange = function(change)\n\t\t{\n\t\t\tif (change instanceof mxGeometryChange &&\n\t\t\t\t(this.isTableCell(change.cell) || this.isTableRow(change.cell)) &&\n\t\t\t\t((change.previous == null && change.geometry != null) ||\n\t\t\t\t(change.previous != null && !change.previous.equals(change.geometry))))\n\t\t\t{\n\t\t\t\tvar cell = change.cell;\n\t\t\t\t\n\t\t\t\tif (this.isTableCell(cell))\n\t\t\t\t{\n\t\t\t\t\tcell = this.model.getParent(cell);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (this.isTableRow(cell))\n\t\t\t\t{\n\t\t\t\t\tcell = this.model.getParent(cell);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// Forces repaint of table with unchanged style and geometry\n\t\t\t\tvar state = this.view.getState(cell);\n\t\t\t\t\n\t\t\t\tif (state != null && state.shape != null)\n\t\t\t\t{\n\t\t\t\t\tthis.view.invalidate(cell);\n\t\t\t\t\tstate.shape.bounds = null;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tgraphProcessChange.apply(this, arguments);\n\t\t\t\n\t\t\tif (change instanceof mxValueChange && change.cell != null &&\n\t\t\t\tchange.cell.value != null && typeof(change.cell.value) == 'object')\n\t\t\t{\n\t\t\t\tthis.invalidateDescendantsWithPlaceholders(change.cell);\n\t\t\t}\n\t\t};\n\t\t\n\t\t/**\n\t\t * Replaces the given element with a span.\n\t\t */\n\t\tGraph.prototype.invalidateDescendantsWithPlaceholders = function(cell)\n\t\t{\n\t\t\t// Invalidates all descendants with placeholders\n\t\t\tvar desc = this.model.getDescendants(cell);\n\t\t\t\n\t\t\t// LATER: Check if only label or tooltip have changed\n\t\t\tif (desc.length > 0)\n\t\t\t{\n\t\t\t\tfor (var i = 0; i < desc.length; i++)\n\t\t\t\t{\n\t\t\t\t\tvar state = this.view.getState(desc[i]);\n\t\t\t\t\t\n\t\t\t\t\tif (state != null && state.shape != null && state.shape.stencil != null &&\n\t\t\t\t\t\tthis.stencilHasPlaceholders(state.shape.stencil))\n\t\t\t\t\t{\n\t\t\t\t\t\tthis.removeStateForCell(desc[i]);\n\t\t\t\t\t}\n\t\t\t\t\telse if (this.isReplacePlaceholders(desc[i]))\n\t\t\t\t\t{\n\t\t\t\t\t\tthis.view.invalidate(desc[i], false, false);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\t\n\t\t/**\n\t\t * Replaces the given element with a span.\n\t\t */\n\t\tGraph.prototype.replaceElement = function(elt, tagName)\n\t\t{\n\t\t\tvar span = elt.ownerDocument.createElement((tagName != null) ? tagName : 'span');\n\t\t\tvar attributes = Array.prototype.slice.call(elt.attributes);\n\t\t\t\n\t\t\twhile (attr = attributes.pop())\n\t\t\t{\n\t\t\t\tspan.setAttribute(attr.nodeName, attr.nodeValue);\n\t\t\t}\n\t\t\t\n\t\t\tspan.innerHTML = elt.innerHTML;\n\t\t\telt.parentNode.replaceChild(span, elt);\n\t\t};\n\n\t\t/**\n\t\t * \n\t\t */\n\t\tGraph.prototype.processElements = function(elt, fn)\n\t\t{\n\t\t\tif (elt != null)\n\t\t\t{\n\t\t\t\tvar elts = elt.getElementsByTagName('*');\n\t\t\t\t\n\t\t\t\tfor (var i = 0; i < elts.length; i++)\n\t\t\t\t{\n\t\t\t\t\tfn(elts[i]);\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\t\n\t\t/**\n\t\t * Handles label changes for XML user objects.\n\t\t */\n\t\tGraph.prototype.updateLabelElements = function(cells, fn, tagName)\n\t\t{\n\t\t\tcells = (cells != null) ? cells : this.getSelectionCells();\n\t\t\tvar div = document.createElement('div');\n\t\t\t\n\t\t\tfor (var i = 0; i < cells.length; i++)\n\t\t\t{\n\t\t\t\t// Changes font tags inside HTML labels\n\t\t\t\tvar style = this.getCurrentCellStyle(cells[i]);\n\n\t\t\t\tif (style != null && style['html'] == '1')\n\t\t\t\t{\n\t\t\t\t\tvar label = this.convertValueToString(cells[i]);\n\t\t\t\t\t\n\t\t\t\t\tif (label != null && label.length > 0)\n\t\t\t\t\t{\n\t\t\t\t\t\tdiv.innerHTML = label;\n\t\t\t\t\t\tvar elts = div.getElementsByTagName((tagName != null) ? tagName : '*');\n\t\t\t\t\t\t\n\t\t\t\t\t\tfor (var j = 0; j < elts.length; j++)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tfn(elts[j]);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (div.innerHTML != label)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tthis.cellLabelChanged(cells[i], div.innerHTML);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\t\n\t\t/**\n\t\t * Handles label changes for XML user objects.\n\t\t */\n\t\tGraph.prototype.cellLabelChanged = function(cell, value, autoSize)\n\t\t{\n\t\t\t// Removes all illegal control characters in user input\n\t\t\tvalue = Graph.zapGremlins(value);\n\n\t\t\tthis.model.beginUpdate();\n\t\t\ttry\n\t\t\t{\t\t\t\n\t\t\t\tif (cell.value != null && typeof cell.value == 'object')\n\t\t\t\t{\n\t\t\t\t\tif (this.isReplacePlaceholders(cell) &&\n\t\t\t\t\t\tcell.getAttribute('placeholder') != null)\n\t\t\t\t\t{\n\t\t\t\t\t\t// LATER: Handle delete, name change\n\t\t\t\t\t\tvar name = cell.getAttribute('placeholder');\n\t\t\t\t\t\tvar current = cell;\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\twhile (current != null)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif (current == this.model.getRoot() || (current.value != null &&\n\t\t\t\t\t\t\t\ttypeof(current.value) == 'object' && current.hasAttribute(name)))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tthis.setAttributeForCell(current, name, value);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tcurrent = this.model.getParent(current);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tvar tmp = cell.value.cloneNode(true);\n\t\t\t\t\t\n\t\t\t\t\tif (Graph.translateDiagram && Graph.diagramLanguage != null &&\n\t\t\t\t\t\ttmp.hasAttribute('label_' + Graph.diagramLanguage))\n\t\t\t\t\t{\n\t\t\t\t\t\ttmp.setAttribute('label_' + Graph.diagramLanguage, value);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\ttmp.setAttribute('label', value);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tvalue = tmp;\n\t\t\t\t}\n\n\t\t\t\tmxGraph.prototype.cellLabelChanged.apply(this, arguments);\n\t\t\t}\n\t\t\tfinally\n\t\t\t{\n\t\t\t\tthis.model.endUpdate();\n\t\t\t}\n\t\t};\n\n\t\t/**\n\t\t * Removes transparent empty groups if all children are removed.\n\t\t */\n\t\tGraph.prototype.cellsRemoved = function(cells)\n\t\t{\n\t\t\tif (cells != null)\n\t\t\t{\n\t\t\t\tvar dict = new mxDictionary();\n\t\t\t\t\n\t\t\t\tfor (var i = 0; i < cells.length; i++)\n\t\t\t\t{\n\t\t\t\t\tdict.put(cells[i], true);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// LATER: Recurse up the cell hierarchy\n\t\t\t\tvar parents = [];\n\t\t\t\t\n\t\t\t\tfor (var i = 0; i < cells.length; i++)\n\t\t\t\t{\n\t\t\t\t\tvar parent = this.model.getParent(cells[i]);\n\n\t\t\t\t\tif (parent != null && !dict.get(parent))\n\t\t\t\t\t{\n\t\t\t\t\t\tdict.put(parent, true);\n\t\t\t\t\t\tparents.push(parent);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tfor (var i = 0; i < parents.length; i++)\n\t\t\t\t{\n\t\t\t\t\tvar state = this.view.getState(parents[i]);\n\t\t\t\t\t\n\t\t\t\t\tif (state != null && (this.model.isEdge(state.cell) ||\n\t\t\t\t\t\tthis.model.isVertex(state.cell)) &&\n\t\t\t\t\t\tthis.isCellDeletable(state.cell) &&\n\t\t\t\t\t\tthis.isTransparentState(state))\n\t\t\t\t\t{\n\t\t\t\t\t\tvar allChildren = true;\n\t\t\t\t\t\t\n\t\t\t\t\t\tfor (var j = 0; j < this.model.getChildCount(state.cell) && allChildren; j++)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif (!dict.get(this.model.getChildAt(state.cell, j)))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tallChildren = false;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (allChildren)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcells.push(state.cell);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tmxGraph.prototype.cellsRemoved.apply(this, arguments);\n\t\t};\n\t\t\n\t\t/**\n\t\t * Overrides ungroup to check if group should be removed.\n\t\t */\n\t\tGraph.prototype.removeCellsAfterUngroup = function(cells)\n\t\t{\n\t\t\tvar cellsToRemove = [];\n\t\t\t\n\t\t\tfor (var i = 0; i < cells.length; i++)\n\t\t\t{\n\t\t\t\tif (this.isCellDeletable(cells[i]) &&\n\t\t\t\t\tthis.isTransparentState(\n\t\t\t\t\t\tthis.view.getState(cells[i])))\n\t\t\t\t{\n\t\t\t\t\tcellsToRemove.push(cells[i]);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tcells = cellsToRemove;\n\t\t\t\n\t\t\tmxGraph.prototype.removeCellsAfterUngroup.apply(this, arguments);\n\t\t};\n\n\t\t/**\n\t\t * Sets the link for the given cell.\n\t\t */\n\t\tGraph.prototype.setLinkForCell = function(cell, link)\n\t\t{\n\t\t\tthis.setAttributeForCell(cell, 'link', link);\n\t\t};\n\t\t\n\t\t/**\n\t\t * Sets the link for the given cell.\n\t\t */\n\t\tGraph.prototype.setTooltipForCell = function(cell, link)\n\t\t{\n\t\t\tvar key = 'tooltip';\n\t\t\t\n\t\t\tif (Graph.translateDiagram && Graph.diagramLanguage != null &&\n\t\t\t\tmxUtils.isNode(cell.value) && cell.value.hasAttribute('tooltip_' + Graph.diagramLanguage))\n\t\t\t{\n\t\t\t\tkey = 'tooltip_' + Graph.diagramLanguage;\n\t\t\t}\n\t\t\t\n\t\t\tthis.setAttributeForCell(cell, key, link);\n\t\t};\n\t\t\n\t\t/**\n\t\t * Returns the cells in the model (or given array) that have all of the\n\t\t * given tags in their tags property.\n\t\t */\n\t\tGraph.prototype.getAttributeForCell = function(cell, attributeName, defaultValue)\n\t\t{\n\t\t\tvar value = (cell.value != null && typeof cell.value === 'object') ?\n\t\t\t\tcell.value.getAttribute(attributeName) : null;\n\t\t\t\n\t\t\treturn (value != null) ? value : defaultValue;\n\t\t};\n\n\t\t/**\n\t\t * Sets the link for the given cell.\n\t\t */\n\t\tGraph.prototype.setAttributeForCell = function(cell, attributeName, attributeValue)\n\t\t{\n\t\t\tvar value = null;\n\t\t\t\n\t\t\tif (cell.value != null && typeof(cell.value) == 'object')\n\t\t\t{\n\t\t\t\tvalue = cell.value.cloneNode(true);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tvar doc = mxUtils.createXmlDocument();\n\t\t\t\t\n\t\t\t\tvalue = doc.createElement('UserObject');\n\t\t\t\tvalue.setAttribute('label', cell.value || '');\n\t\t\t}\n\t\t\t\n\t\t\tif (attributeValue != null)\n\t\t\t{\n\t\t\t\tvalue.setAttribute(attributeName, attributeValue);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tvalue.removeAttribute(attributeName);\n\t\t\t}\n\t\t\t\n\t\t\tthis.model.setValue(cell, value);\n\t\t};\n\n\t\t/**\n\t\t * \n\t\t */\n\t\tGraph.prototype.isTargetShape = function(target, cells, evt)\n\t\t{\n\t\t\tvar shape = mxUtils.getValue(\n\t\t\t\tthis.getCurrentCellStyle(target),\n\t\t\t\tmxConstants.STYLE_SHAPE, '');\n\n\t\t\tfor (var i = 0; i < cells.length; i++)\n\t\t\t{\n\t\t\t\tvar shapes = mxUtils.getValue(\n\t\t\t\t\tthis.getCurrentCellStyle(cells[i]),\n\t\t\t\t\t'targetShapes', '').split(',');\n\t\t\t\t\n\t\t\t\tif (mxUtils.indexOf(shapes, shape) >= 0)\n\t\t\t\t{\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn false;\n\t\t};\n\t\t\n\t\t/**\n\t\t * Overridden to stop moving edge labels between cells.\n\t\t */\n\t\tvar graphGetDropTarget = Graph.prototype.getDropTarget;\n\t\tGraph.prototype.getDropTarget = function(cells, evt, cell, clone)\n\t\t{\n\t\t\t// Disables drop into group if alt is pressed\n\t\t\tif (mxEvent.isAltDown(evt))\n\t\t\t{\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\t\n\t\t\t// Disables dragging edge labels out of edges\n\t\t\tfor (var i = 0; i < cells.length; i++)\n\t\t\t{\n\t\t\t\tvar parent = this.model.getParent(cells[i]);\n\t\t\t\t\n\t\t\t\tif (this.model.isEdge(parent) && mxUtils.indexOf(cells, parent) < 0)\n\t\t\t\t{\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tvar target = graphGetDropTarget.apply(this, arguments);\n\t\t\t\n\t\t\t// Always drops rows to tables\n\t\t\tvar rows = true;\n\t\t\t\n\t\t\tfor (var i = 0; i < cells.length && rows; i++)\n\t\t\t{\n\t\t\t\trows = rows && this.isTableRow(cells[i]);\n\t\t\t}\n\t\t\t\n\t\t\tif (rows)\n\t\t\t{\n\t\t\t\tif (this.isTableCell(target))\n\t\t\t\t{\n\t\t\t\t\ttarget = this.model.getParent(target);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (this.isTableRow(target))\n\t\t\t\t{\n\t\t\t\t\ttarget = this.model.getParent(target);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (!this.isTable(target))\n\t\t\t\t{\n\t\t\t\t\ttarget = null;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\treturn target;\n\t\t};\n\t\n\t\t/**\n\t\t * Overrides double click handling to avoid accidental inserts of new labels in dblClick below.\n\t\t */\n\t\tGraph.prototype.click = function(me)\n\t\t{\n\t\t\tmxGraph.prototype.click.call(this, me);\n\t\t\t\n\t\t\t// Stores state and source for checking in dblClick\n\t\t\tthis.firstClickState = me.getState();\n\t\t\tthis.firstClickSource = me.getSource();\n\t\t};\n\t\t\n\t\t/**\n\t\t * Overrides double click handling to add the tolerance and inserting text.\n\t\t */\n\t\tGraph.prototype.dblClick = function(evt, cell)\n\t\t{\n\t\t\tif (this.isEnabled())\n\t\t\t{\n\t\t\t\tcell = this.insertTextForEvent(evt, cell);\n\t\t\t\tmxGraph.prototype.dblClick.call(this, evt, cell);\n\t\t\t}\n\t\t};\n\n\t\t/**\n\t\t * Overrides double click handling to add the tolerance and inserting text.\n\t\t */\n\t\tGraph.prototype.insertTextForEvent = function(evt, cell)\n\t\t{\n\t\t\tvar pt = mxUtils.convertPoint(this.container, mxEvent.getClientX(evt), mxEvent.getClientY(evt));\n\t\n\t\t\t// Automatically adds new child cells to edges on double click\n\t\t\tif (evt != null && !this.model.isVertex(cell))\n\t\t\t{\n\t\t\t\tvar state = (this.model.isEdge(cell)) ? this.view.getState(cell) : null;\n\t\t\t\tvar src = mxEvent.getSource(evt);\n\t\t\t\t\n\t\t\t\tif ((this.firstClickState == state && this.firstClickSource == src) &&\n\t\t\t\t\t(state == null || (state.text == null || state.text.node == null ||\n\t\t\t\t\tstate.text.boundingBox == null || (!mxUtils.contains(state.text.boundingBox,\n\t\t\t\t\tpt.x, pt.y) && !mxUtils.isAncestorNode(state.text.node, mxEvent.getSource(evt))))) &&\n\t\t\t\t\t((state == null && !this.isCellLocked(this.getDefaultParent())) ||\n\t\t\t\t\t(state != null && !this.isCellLocked(state.cell))) &&\n\t\t\t\t\t(state != null ||\n\t\t\t\t\t(mxClient.IS_SVG && src == this.view.getCanvas().ownerSVGElement)))\n\t\t\t\t{\n\t\t\t\t\tif (state == null)\n\t\t\t\t\t{\n\t\t\t\t\t\tstate = this.view.getState(this.getCellAt(pt.x, pt.y));\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tcell = this.addText(pt.x, pt.y, state);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\treturn cell;\n\t\t};\n\t\t\n\t\t/**\n\t\t * Returns a point that specifies the location for inserting cells.\n\t\t */\n\t\tGraph.prototype.getInsertPoint = function()\n\t\t{\n\t\t\tvar gs = this.getGridSize();\n\t\t\tvar dx = this.container.scrollLeft / this.view.scale - this.view.translate.x;\n\t\t\tvar dy = this.container.scrollTop / this.view.scale - this.view.translate.y;\n\t\t\t\n\t\t\tif (this.pageVisible)\n\t\t\t{\n\t\t\t\tvar layout = this.getPageLayout();\n\t\t\t\tvar page = this.getPageSize();\n\t\t\t\tdx = Math.max(dx, layout.x * page.width);\n\t\t\t\tdy = Math.max(dy, layout.y * page.height);\n\t\t\t}\n\t\t\t\n\t\t\treturn new mxPoint(this.snap(dx + gs), this.snap(dy + gs));\n\t\t};\n\t\t\n\t\t/**\n\t\t * \n\t\t */\n\t\tGraph.prototype.getFreeInsertPoint = function()\n\t\t{\n\t\t\tvar view = this.view;\n\t\t\tvar bds = this.getGraphBounds();\n\t\t\tvar pt = this.getInsertPoint();\n\t\t\t\n\t\t\t// Places at same x-coord and 2 grid sizes below existing graph\n\t\t\tvar x = this.snap(Math.round(Math.max(pt.x, bds.x / view.scale - view.translate.x +\n\t\t\t\t((bds.width == 0) ? 2 * this.gridSize : 0))));\n\t\t\tvar y = this.snap(Math.round(Math.max(pt.y, (bds.y + bds.height) / view.scale - view.translate.y +\n\t\t\t\t2 * this.gridSize)));\n\t\t\t\n\t\t\treturn new mxPoint(x, y);\n\t\t};\n\t\t\t\t\n\t\t/**\n\t\t * \n\t\t */\n\t\tGraph.prototype.getCenterInsertPoint = function(bbox)\n\t\t{\n\t\t\tbbox = (bbox != null) ? bbox : new mxRectangle();\n\t\t\t\n\t\t\tif (mxUtils.hasScrollbars(this.container))\n\t\t\t{\n\t\t\t\treturn new mxPoint(\n\t\t\t\t\tthis.snap(Math.round((this.container.scrollLeft + this.container.clientWidth / 2) /\n\t\t\t\t\t\tthis.view.scale - this.view.translate.x - bbox.width / 2)),\n\t\t\t\t\tthis.snap(Math.round((this.container.scrollTop + this.container.clientHeight / 2) /\n\t\t\t\t\t\tthis.view.scale - this.view.translate.y - bbox.height / 2)));\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn new mxPoint(\n\t\t\t\t\tthis.snap(Math.round(this.container.clientWidth / 2 / this.view.scale -\n\t\t\t\t\t\tthis.view.translate.x - bbox.width / 2)),\n\t\t\t\t\tthis.snap(Math.round(this.container.clientHeight / 2 / this.view.scale -\n\t\t\t\t\t\tthis.view.translate.y - bbox.height / 2)));\n\t\t\t}\n\t\t};\n\t\t\n\t\t/**\n\t\t * Hook for subclassers to return true if the current insert point was defined\n\t\t * using a mouse hover event.\n\t\t */\n\t\tGraph.prototype.isMouseInsertPoint = function()\n\t\t{\t\t\t\n\t\t\treturn false;\n\t\t};\n\t\t\n\t\t/**\n\t\t * Adds a new label at the given position and returns the new cell. State is\n\t\t * an optional edge state to be used as the parent for the label. Vertices\n\t\t * are not allowed currently as states.\n\t\t */\n\t\tGraph.prototype.addText = function(x, y, state)\n\t\t{\n\t\t\t// Creates a new edge label with a predefined text\n\t\t\tvar label = new mxCell();\n\t\t\tlabel.value = 'Text';\n\t\t\tlabel.geometry = new mxGeometry(0, 0, 0, 0);\n\t\t\tlabel.vertex = true;\n\t\t\tvar style = 'html=1;align=center;verticalAlign=middle;resizable=0;points=[];';\n\n\t\t\tif (state != null && this.model.isEdge(state.cell))\n\t\t\t{\n\t\t\t\tlabel.style = 'edgeLabel;' + style;\n\t\t\t\tlabel.geometry.relative = true;\n\t\t\t\tlabel.connectable = false;\n\t\t    \n\t\t\t\t// Resets the relative location stored inside the geometry\n\t\t\t\tvar pt2 = this.view.getRelativePoint(state, x, y);\n\t\t\t\tlabel.geometry.x = Math.round(pt2.x * 10000) / 10000;\n\t\t\t\tlabel.geometry.y = Math.round(pt2.y);\n\t\t    \n\t\t    \t// Resets the offset inside the geometry to find the offset from the resulting point\n\t\t\t\tlabel.geometry.offset = new mxPoint(0, 0);\n\t\t\t\tpt2 = this.view.getPoint(state, label.geometry);\n\t\t  \n\t\t\t\tvar scale = this.view.scale;\n\t\t\t\tlabel.geometry.offset = new mxPoint(Math.round((x - pt2.x) / scale), Math.round((y - pt2.y) / scale));\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tvar tr = this.view.translate;\n\t\t\t\tlabel.style = 'text;' + style;\n\t\t\t\tlabel.geometry.width = 40;\n\t\t\t\tlabel.geometry.height = 20;\n\t\t\t\tlabel.geometry.x = Math.round(x / this.view.scale) -\n\t\t\t\t\ttr.x - ((state != null) ? state.origin.x : 0);\n\t\t\t\tlabel.geometry.y = Math.round(y / this.view.scale) -\n\t\t\t\t\ttr.y - ((state != null) ? state.origin.y : 0);\n\t\t\t\tlabel.style += 'autosize=1;'\n\t\t\t}\n\n\t\t\tthis.getModel().beginUpdate();\n\t\t\ttry\n\t\t\t{\n\t\t\t\tthis.addCells([label], (state != null) ? state.cell : null);\n\t\t\t\tthis.fireEvent(new mxEventObject('textInserted', 'cells', [label]));\n\t\t\t\t\n\t\t    \t// Updates size of text after possible change of style via event\n\t\t\t\tthis.autoSizeCell(label);\n\t\t\t}\n\t\t\tfinally\n\t\t\t{\n\t\t\t\tthis.getModel().endUpdate();\n\t\t\t}\n\n\t\t\treturn label;\n\t\t};\n\n\t\t/**\n\t\t * Adds a handler for clicking on shapes with links. This replaces all links in labels.\n\t\t */\n\t\tGraph.prototype.addClickHandler = function(highlight, beforeClick, onClick)\n\t\t{\n\t\t\t// Replaces links in labels for consistent right-clicks\n\t\t\tvar checkLinks = mxUtils.bind(this, function()\n\t\t\t{\n\t\t\t\tvar links = this.container.getElementsByTagName('a');\n\t\t\t\t\n\t\t\t\tif (links != null)\n\t\t\t\t{\n\t\t\t\t\tfor (var i = 0; i < links.length; i++)\n\t\t\t\t\t{\n\t\t\t\t\t\tvar href = this.getAbsoluteUrl(links[i].getAttribute('href'));\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (href != null)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tlinks[i].setAttribute('rel', this.linkRelation);\n\t\t\t\t\t\t\tlinks[i].setAttribute('href', href);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif (beforeClick != null)\n\t\t\t    \t\t\t{\n\t\t\t\t\t\t\t\tmxEvent.addGestureListeners(links[i], null, null, beforeClick);\n\t\t\t    \t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t\t\n\t\t\tthis.model.addListener(mxEvent.CHANGE, checkLinks);\n\t\t\tcheckLinks();\n\t\t\t\n\t\t\tvar cursor = this.container.style.cursor;\n\t\t\tvar tol = this.getTolerance();\n\t\t\tvar graph = this;\n\n\t\t\tvar mouseListener =\n\t\t\t{\n\t\t\t    currentState: null,\n\t\t\t    currentLink: null,\n\t\t\t\tcurrentTarget: null,\n\t\t\t    highlight: (highlight != null && highlight != '' && highlight != mxConstants.NONE) ?\n\t\t\t    \tnew mxCellHighlight(graph, highlight, 4) : null,\n\t\t\t    startX: 0,\n\t\t\t    startY: 0,\n\t\t\t    scrollLeft: 0,\n\t\t\t    scrollTop: 0,\n\t\t\t    updateCurrentState: function(me)\n\t\t\t    {\n\t\t\t    \tvar tmp = me.sourceState;\n\t\t\t    \t\n\t\t\t    \t// Gets first intersecting ancestor with link\n\t\t\t    \tif (tmp == null || graph.getLinkForCell(tmp.cell) == null)\n\t\t\t    \t{\n\t\t\t    \t\tvar cell = graph.getCellAt(me.getGraphX(), me.getGraphY(), null, null, null, function(state, x, y)\n\t    \t\t\t\t{\n\t\t\t    \t\t\treturn graph.getLinkForCell(state.cell) == null;\n\t    \t\t\t\t});\n\t\t\t    \t\t\n\t\t\t    \t\ttmp = (tmp != null && !graph.model.isAncestor(cell, tmp.cell)) ? null : graph.view.getState(cell);\n\t\t\t    \t}\n\n\t\t\t      \tif (tmp != this.currentState)\n\t\t\t      \t{\n\t\t\t        \tif (this.currentState != null)\n\t\t\t        \t{\n\t\t\t\t          \tthis.clear();\n\t\t\t        \t}\n\t\t\t\t        \n\t\t\t        \tthis.currentState = tmp;\n\t\t\t\t        \n\t\t\t        \tif (this.currentState != null)\n\t\t\t        \t{\n\t\t\t\t          \tthis.activate(this.currentState);\n\t\t\t        \t}\n\t\t\t      \t}\n\t\t\t    },\n\t\t\t    mouseDown: function(sender, me)\n\t\t\t    {\n\t\t\t    \tthis.startX = me.getGraphX();\n\t\t\t    \tthis.startY = me.getGraphY();\n\t\t\t\t    this.scrollLeft = graph.container.scrollLeft;\n\t\t\t\t    this.scrollTop = graph.container.scrollTop;\n\t\t\t\t    \n\t\t    \t\tif (this.currentLink == null && graph.container.style.overflow == 'auto')\n\t\t    \t\t{\n\t\t    \t\t\tgraph.container.style.cursor = 'move';\n\t\t    \t\t}\n\t\t    \t\t\n\t\t    \t\tthis.updateCurrentState(me);\n\t\t\t    },\n\t\t\t    mouseMove: function(sender, me)\n\t\t\t    {\n\t\t\t    \tif (graph.isMouseDown)\n\t\t\t    \t{\n\t\t\t    \t\tif (this.currentLink != null)\n\t\t\t    \t\t{\n\t\t\t\t\t    \tvar dx = Math.abs(this.startX - me.getGraphX());\n\t\t\t\t\t    \tvar dy = Math.abs(this.startY - me.getGraphY());\n\t\t\t\t\t    \t\n\t\t\t\t\t    \tif (dx > tol || dy > tol)\n\t\t\t\t\t    \t{\n\t\t\t\t\t    \t\tthis.clear();\n\t\t\t\t\t    \t}\n\t\t\t    \t\t}\n\t\t\t    \t}\n\t\t\t    \telse\n\t\t\t    \t{\n\t\t\t\t    \t// Checks for parent link\n\t\t\t\t    \tvar linkNode = me.getSource();\n\t\t\t\t    \t\n\t\t\t\t    \twhile (linkNode != null && linkNode.nodeName.toLowerCase() != 'a')\n\t\t\t\t    \t{\n\t\t\t\t    \t\tlinkNode = linkNode.parentNode;\n\t\t\t\t    \t}\n\t\t\t\t    \t\n\t\t\t    \t\tif (linkNode != null)\n\t\t\t    \t\t{\n\t\t\t    \t\t\tthis.clear();\n\t\t\t    \t\t}\n\t\t\t    \t\telse\n\t\t\t    \t\t{\n\t\t\t\t    \t\tif (graph.tooltipHandler != null && this.currentLink != null && this.currentState != null)\n\t\t\t\t    \t\t{\n\t\t\t\t    \t\t\tgraph.tooltipHandler.reset(me, true, this.currentState);\n\t\t\t\t    \t\t}\n\t\t\t\t    \t\t\n\t\t\t\t\t    \tif (this.currentState != null && (me.getState() == this.currentState || me.sourceState == null) &&\n\t\t\t\t\t    \t\tgraph.intersects(this.currentState, me.getGraphX(), me.getGraphY()))\n\t\t\t\t\t    \t{\n\t\t\t\t    \t\t\treturn;\n\t\t\t\t\t    \t}\n\t\t\t\t\t    \t\n\t\t\t\t\t    \tthis.updateCurrentState(me);\n\t\t\t    \t\t}\n\t\t\t    \t}\n\t\t\t    },\n\t\t\t    mouseUp: function(sender, me)\n\t\t\t    {\n\t\t\t    \tvar source = me.getSource();\n\t\t\t    \tvar evt = me.getEvent();\n\t\t\t    \t\n\t\t\t    \t// Checks for parent link\n\t\t\t    \tvar linkNode = source;\n\t\t\t    \t\n\t\t\t    \twhile (linkNode != null && linkNode.nodeName.toLowerCase() != 'a')\n\t\t\t    \t{\n\t\t\t    \t\tlinkNode = linkNode.parentNode;\n\t\t\t    \t}\n\n\t\t\t    \t// Ignores clicks on links and collapse/expand icon\n\t\t\t    \tif (linkNode == null &&\n\t\t\t    \t\t(((Math.abs(this.scrollLeft - graph.container.scrollLeft) < tol &&\n\t\t\t        \tMath.abs(this.scrollTop - graph.container.scrollTop) < tol) &&\n\t\t\t    \t\t(me.sourceState == null || !me.isSource(me.sourceState.control))) &&\n\t\t\t    \t\t(((mxEvent.isLeftMouseButton(evt) || mxEvent.isMiddleMouseButton(evt)) &&\n\t\t\t    \t\t!mxEvent.isPopupTrigger(evt)) || mxEvent.isTouchEvent(evt))))\n\t\t\t    \t{\n\t\t\t\t    \tif (this.currentLink != null)\n\t\t\t\t    \t{\n\t\t\t\t    \t\tvar blank = graph.isBlankLink(this.currentLink);\n\t\t\t\t    \t\t\n\t\t\t\t    \t\tif ((this.currentLink.substring(0, 5) === 'data:' ||\n\t\t\t\t    \t\t\t!blank) && beforeClick != null)\n\t\t\t\t    \t\t{\n\t\t\t    \t\t\t\tbeforeClick(evt, this.currentLink);\n\t\t\t\t    \t\t}\n\t\t\t\t    \t\t\n\t\t\t\t    \t\tif (!mxEvent.isConsumed(evt))\n\t\t\t\t    \t\t{\n\t\t\t\t\t    \t\tvar target = (this.currentTarget != null) ?\n\t\t\t\t\t\t\t\t\tthis.currentTarget : ((mxEvent.isMiddleMouseButton(evt)) ? '_blank' :\n\t\t\t\t\t    \t\t\t((blank) ? graph.linkTarget : '_top'));\n\n\t\t\t\t\t    \t\tgraph.openLink(this.currentLink, target);\n\t\t\t\t\t    \t\tme.consume();\n\t\t\t\t    \t\t}\n\t\t\t\t    \t}\n\t\t\t\t    \telse if (onClick != null && !me.isConsumed() &&\n\t\t\t    \t\t\t(Math.abs(this.scrollLeft - graph.container.scrollLeft) < tol &&\n\t\t\t        \t\tMath.abs(this.scrollTop - graph.container.scrollTop) < tol) &&\n\t\t\t        \t\t(Math.abs(this.startX - me.getGraphX()) < tol &&\n\t\t\t        \t\tMath.abs(this.startY - me.getGraphY()) < tol))\n\t\t\t        \t{\n\t\t\t\t    \t\tonClick(me.getEvent());\n\t\t\t    \t\t}\n\t\t\t    \t}\n\t\t\t    \t\n\t\t\t    \tthis.clear();\n\t\t\t    },\n\t\t\t    activate: function(state)\n\t\t\t    {\n\t\t\t    \tthis.currentLink = graph.getAbsoluteUrl(graph.getLinkForCell(state.cell));\n\n\t\t\t    \tif (this.currentLink != null)\n\t\t\t    \t{\n\t\t\t\t\t\tthis.currentTarget = graph.getLinkTargetForCell(state.cell)\n\t\t\t    \t\tgraph.container.style.cursor = 'pointer';\n\n\t\t\t    \t\tif (this.highlight != null)\n\t\t\t    \t\t{\n\t\t\t    \t\t\tthis.highlight.highlight(state);\n\t\t\t    \t\t}\n\t\t\t\t    }\n\t\t\t    },\n\t\t\t    clear: function()\n\t\t\t    {\n\t\t\t    \tif (graph.container != null)\n\t\t\t    \t{\n\t\t\t    \t\tgraph.container.style.cursor = cursor;\n\t\t\t    \t}\n\t\t\t    \t\n\t\t\t\t\tthis.currentTarget = null;\n\t\t\t    \tthis.currentState = null;\n\t\t\t    \tthis.currentLink = null;\n\t\t\t    \t\n\t\t\t    \tif (this.highlight != null)\n\t\t\t    \t{\n\t\t\t    \t\tthis.highlight.hide();\n\t\t\t    \t}\n\t\t\t    \t\n\t\t\t    \tif (graph.tooltipHandler != null)\n\t\t    \t\t{\n\t\t    \t\t\tgraph.tooltipHandler.hide();\n\t\t    \t\t}\n\t\t\t    }\n\t\t\t};\n\n\t\t\t// Ignores built-in click handling\n\t\t\tgraph.click = function(me) {};\n\t\t\tgraph.addMouseListener(mouseListener);\n\t\t\t\n\t\t\tmxEvent.addListener(document, 'mouseleave', function(evt)\n\t\t\t{\n\t\t\t\tmouseListener.clear();\n\t\t\t});\n\t\t};\n\t\t\n\t\t/**\n\t\t * Duplicates the given cells and returns the duplicates.\n\t\t */\n\t\tGraph.prototype.duplicateCells = function(cells, append)\n\t\t{\n\t\t\tcells = (cells != null) ? cells : this.getSelectionCells();\n\t\t\tappend = (append != null) ? append : true;\n\t\t\t\n\t\t\t// Duplicates rows for table cells\n\t\t\tfor (var i = 0; i < cells.length; i++)\n\t\t\t{\n\t\t\t\tif (this.isTableCell(cells[i]))\n\t\t\t\t{\n\t\t\t\t\tcells[i] = this.model.getParent(cells[i]);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tcells = this.model.getTopmostCells(cells);\n\t\t\t\n\t\t\tvar model = this.getModel();\n\t\t\tvar s = this.gridSize;\n\t\t\tvar select = [];\n\t\t\t\n\t\t\tmodel.beginUpdate();\n\t\t\ttry\n\t\t\t{\n\t\t\t\tvar cloneMap = new Object();\n\t\t\t\tvar lookup = this.createCellLookup(cells);\n\t\t\t\tvar clones = this.cloneCells(cells, false, cloneMap, true);\n\t\t\t\t\n\t\t\t\tfor (var i = 0; i < cells.length; i++)\n\t\t\t\t{\n\t\t\t\t\tvar parent = model.getParent(cells[i]);\n\n\t\t\t\t\tif (parent != null)\n\t\t\t\t\t{\n\t\t\t\t\t\tvar child = this.moveCells([clones[i]], s, s, false)[0];\n\t\t\t\t\t\tselect.push(child);\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (append)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tmodel.add(parent, clones[i]);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t// Maintains child index by inserting after clone in parent\n\t\t\t\t\t\t\tvar index = parent.getIndex(cells[i]);\n\t\t\t\t\t\t\tmodel.add(parent, clones[i], index + 1);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t// Extends tables\t\n\t\t\t\t\t\tif (this.isTable(parent))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tvar row = this.getCellGeometry(clones[i]);\n\t\t\t\t\t\t\tvar table = this.getCellGeometry(parent);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif (row != null && table != null)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\ttable = table.clone();\n\t\t\t\t\t\t\t\ttable.height += row.height;\n\t\t\t\t\t\t\t\tmodel.setGeometry(parent, table);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tselect.push(clones[i]);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Updates custom links after inserting into the model for cells to have new IDs\n\t\t\t\tthis.updateCustomLinks(this.createCellMapping(cloneMap, lookup), clones, this);\n\t\t\t\tthis.fireEvent(new mxEventObject(mxEvent.CELLS_ADDED, 'cells', clones));\n\t\t\t}\n\t\t\tfinally\n\t\t\t{\n\t\t\t\tmodel.endUpdate();\n\t\t\t}\n\t\t\t\n\t\t\treturn select;\n\t\t};\n\t\t\n\t\t/**\n\t\t * Inserts the given image at the cursor in a content editable text box using\n\t\t * the insertimage command on the document instance.\n\t\t */\n\t\tGraph.prototype.insertImage = function(newValue, w, h)\n\t\t{\n\t\t\t// To find the new image, we create a list of all existing links first\n\t\t\tif (newValue != null && this.cellEditor.textarea != null)\n\t\t\t{\n\t\t\t\tvar tmp = this.cellEditor.textarea.getElementsByTagName('img');\n\t\t\t\tvar oldImages = [];\n\t\t\t\t\n\t\t\t\tfor (var i = 0; i < tmp.length; i++)\n\t\t\t\t{\n\t\t\t\t\toldImages.push(tmp[i]);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// LATER: Fix inserting link/image in IE8/quirks after focus lost\n\t\t\t\tdocument.execCommand('insertimage', false, newValue);\n\t\t\t\t\n\t\t\t\t// Sets size of new image\n\t\t\t\tvar newImages = this.cellEditor.textarea.getElementsByTagName('img');\n\t\t\t\t\n\t\t\t\tif (newImages.length == oldImages.length + 1)\n\t\t\t\t{\n\t\t\t\t\t// Inverse order in favor of appended images\n\t\t\t\t\tfor (var i = newImages.length - 1; i >= 0; i--)\n\t\t\t\t\t{\n\t\t\t\t\t\tif (i == 0 || newImages[i] != oldImages[i - 1])\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t// Workaround for lost styles during undo and redo is using attributes\n\t\t\t\t\t\t\tnewImages[i].setAttribute('width', w);\n\t\t\t\t\t\t\tnewImages[i].setAttribute('height', h);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\t\t\t\n\t\t/**\n\t\t * Inserts the given image at the cursor in a content editable text box using\n\t\t * the insertimage command on the document instance.\n\t\t */\n\t\tGraph.prototype.insertLink = function(value)\n\t\t{\n\t\t\tif (this.cellEditor.textarea != null)\n\t\t\t{\n\t\t\t\tif (value.length == 0)\n\t\t\t\t{\n\t\t\t\t\tdocument.execCommand('unlink', false);\n\t\t\t\t}\n\t\t\t\telse if (mxClient.IS_FF)\n\t\t\t\t{\n\t\t\t\t\t// Workaround for Firefox that adds a new link and removes\n\t\t\t\t\t// the href from the inner link if its parent is a span is\n\t\t\t\t\t// to remove all inner links inside the new outer link\n\t\t\t\t\tvar tmp = this.cellEditor.textarea.getElementsByTagName('a');\n\t\t\t\t\tvar oldLinks = [];\n\t\t\t\t\t\n\t\t\t\t\tfor (var i = 0; i < tmp.length; i++)\n\t\t\t\t\t{\n\t\t\t\t\t\toldLinks.push(tmp[i]);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tdocument.execCommand('createlink', false, mxUtils.trim(value));\n\t\t\t\t\t\n\t\t\t\t\t// Finds the new link element\n\t\t\t\t\tvar newLinks = this.cellEditor.textarea.getElementsByTagName('a');\n\t\t\t\t\t\n\t\t\t\t\tif (newLinks.length == oldLinks.length + 1)\n\t\t\t\t\t{\n\t\t\t\t\t\t// Inverse order in favor of appended links\n\t\t\t\t\t\tfor (var i = newLinks.length - 1; i >= 0; i--)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif (newLinks[i] != oldLinks[i - 1])\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t// Removes all inner links from the new link and\n\t\t\t\t\t\t\t\t// moves the children to the inner link parent\n\t\t\t\t\t\t\t\tvar tmp = newLinks[i].getElementsByTagName('a');\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\twhile (tmp.length > 0)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tvar parent = tmp[0].parentNode;\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\twhile (tmp[0].firstChild != null)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tparent.insertBefore(tmp[0].firstChild, tmp[0]);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tparent.removeChild(tmp[0]);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t// LATER: Fix inserting link/image in IE8/quirks after focus lost\n\t\t\t\t\tdocument.execCommand('createlink', false, mxUtils.trim(value));\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\t\n\t\t/**\n\t\t * \n\t\t * @param cell\n\t\t * @returns {Boolean}\n\t\t */\n\t\tGraph.prototype.isCellResizable = function(cell)\n\t\t{\n\t\t\tvar result = mxGraph.prototype.isCellResizable.apply(this, arguments);\n\t\t\tvar style = this.getCurrentCellStyle(cell);\n\t\t\t\t\n\t\t\treturn !this.isTableCell(cell) && !this.isTableRow(cell) && (result ||\n\t\t\t\t(mxUtils.getValue(style, mxConstants.STYLE_RESIZABLE, '1') != '0' &&\n\t\t\t\tstyle[mxConstants.STYLE_WHITE_SPACE] == 'wrap'));\n\t\t};\n\t\t\n\t\t/**\n\t\t * Function: distributeCells\n\t\t * \n\t\t * Distribuets the centers of the given cells equally along the available\n\t\t * horizontal or vertical space.\n\t\t * \n\t\t * Parameters:\n\t\t * \n\t\t * horizontal - Boolean that specifies the direction of the distribution.\n\t\t * cells - Optional array of <mxCells> to be distributed. Edges are ignored.\n\t\t */\n\t\tGraph.prototype.distributeCells = function(horizontal, cells, spacing)\n\t\t{\n\t\t\tif (cells == null)\n\t\t\t{\n\t\t\t\tcells = this.getSelectionCells();\n\t\t\t}\n\t\t\t\n\t\t\tif (cells != null && cells.length > 1)\n\t\t\t{\n\t\t\t\tvar vertices = [];\n\t\t\t\tvar max = null;\n\t\t\t\tvar min = null;\n\t\t\t\tvar cellsSize = 0;\n\t\t\t\t\n\t\t\t\tfor (var i = 0; i < cells.length; i++)\n\t\t\t\t{\n\t\t\t\t\tif (this.getModel().isVertex(cells[i]))\n\t\t\t\t\t{\n\t\t\t\t\t\tvar state = this.view.getState(cells[i]);\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (state != null)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tvar tmp = (horizontal) ? state.getCenterX() : state.getCenterY();\n\t\t\t\t\t\t\tmax = (max != null) ? Math.max(max, tmp) : tmp;\n\t\t\t\t\t\t\tmin = (min != null) ? Math.min(min, tmp) : tmp;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif (spacing)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tcellsSize += (horizontal) ? state.width : state.height;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tvertices.push(state);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (vertices.length > 2)\n\t\t\t\t{\n\t\t\t\t\tvertices.sort(function(a, b)\n\t\t\t\t\t{\n\t\t\t\t\t\treturn (horizontal) ? a.x - b.x : a.y - b.y;\n\t\t\t\t\t});\n\t\t\n\t\t\t\t\tif (spacing)\n\t\t\t\t\t{\n\t\t\t\t\t\tcellsSize -= (horizontal? (vertices[0].width / 2 + vertices[vertices.length - 1].width / 2) :\n\t\t\t\t\t\t\t\t\t(vertices[0].height / 2 + vertices[vertices.length - 1].height / 2))\n\t\t\t\t\t}\n\n\t\t\t\t\tvar t = this.view.translate;\n\t\t\t\t\tvar s = this.view.scale;\n\t\t\t\t\t\n\t\t\t\t\tmin = min / s - ((horizontal) ? t.x : t.y);\n\t\t\t\t\tmax = max / s - ((horizontal) ? t.x : t.y);\n\t\t\t\t\t\n\t\t\t\t\tthis.getModel().beginUpdate();\n\t\t\t\t\ttry\n\t\t\t\t\t{\n\t\t\t\t\t\tvar dt = (max - min - cellsSize) / (vertices.length - 1);\n\t\t\t\t\t\tvar t0 = min + (spacing? (horizontal? vertices[0].width / 2 : vertices[0].height / 2) : 0);\n\t\t\t\t\t\t\n\t\t\t\t\t\tfor (var i = 1; i < vertices.length - 1; i++)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tvar pstate = this.view.getState(this.model.getParent(vertices[i].cell));\n\t\t\t\t\t\t\tvar geo = this.getCellGeometry(vertices[i].cell);\n\t\t\t\t\t\t\tt0 += dt;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif (geo != null && pstate != null)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tgeo = geo.clone();\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tif (horizontal)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tgeo.x = Math.round(t0 - (spacing? 0 : geo.width / 2)) - pstate.origin.x;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tgeo.y = Math.round(t0 - (spacing? 0 : geo.height / 2)) - pstate.origin.y;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tthis.getModel().setGeometry(vertices[i].cell, geo);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif (spacing)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tt0 += horizontal? vertices[i].width : vertices[i].height;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tfinally\n\t\t\t\t\t{\n\t\t\t\t\t\tthis.getModel().endUpdate();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\treturn cells;\n\t\t};\n\t\t\n\t\t/**\n\t\t * Adds meta-drag an Mac.\n\t\t * @param evt\n\t\t * @returns\n\t\t */\n\t\tGraph.prototype.isCloneEvent = function(evt)\n\t\t{\n\t\t\treturn (mxClient.IS_MAC && mxEvent.isMetaDown(evt)) || mxEvent.isControlDown(evt);\n\t\t};\n\n\t\t/**\n\t\t * Translates this point by the given vector.\n\t\t * \n\t\t * @param {number} dx X-coordinate of the translation.\n\t\t * @param {number} dy Y-coordinate of the translation.\n\t\t */\n\t\tGraph.prototype.createSvgImageExport = function()\n\t\t{\n\t\t\tvar exp = new mxImageExport();\n\t\t\t\n\t\t\t// Adds hyperlinks (experimental)\n\t\t\texp.getLinkForCellState = mxUtils.bind(this, function(state, canvas)\n\t\t\t{\n\t\t\t\treturn this.getLinkForCell(state.cell);\n\t\t\t});\n\n\t\t\t// Adds tooltips (experimental)\n\t\t\texp.getTitleForCellState = mxUtils.bind(this, function(state, canvas)\n\t\t\t{\n\t\t\t\treturn Editor.convertHtmlToText(this.convertValueToTooltip(state.cell));\n\t\t\t});\n\n\t\t\treturn exp;\n\t\t};\n\t\t\n\t\t/**\n\t\t * Parses the given background image.\n\t\t */\n\t\tGraph.prototype.parseBackgroundImage = function(json)\n\t\t{\n\t\t\tvar result = null;\n\n\t\t\tif (json != null && json.length > 0)\n\t\t\t{\n\t\t\t\tvar obj = JSON.parse(json);\n\t\t\t\tresult = new mxImage(obj.src, obj.width, obj.height)\n\t\t\t}\n\n\t\t\treturn result;\n\t\t};\n\t\t\n\t\t/**\n\t\t * Parses the given background image.\n\t\t */\n\t\tGraph.prototype.getBackgroundImageObject = function(obj)\n\t\t{\n\t\t\treturn obj;\n\t\t};\n\n\t\t/**\n\t\t * Translates this point by the given vector.\n\t\t * \n\t\t * @param {number} dx X-coordinate of the translation.\n\t\t * @param {number} dy Y-coordinate of the translation.\n\t\t */\n\t\tGraph.prototype.getSvg = function(background, scale, border, nocrop, crisp,\n\t\t\tignoreSelection, showText, imgExport, linkTarget, hasShadow, incExtFonts,\n\t\t\tkeepTheme, exportType, cells)\n\t\t{\n\t\t\tvar lookup = null;\n\t\t\t\n\t\t\tif (cells != null)\n\t\t\t{\n\t\t\t\tlookup = new mxDictionary();\n\t\t\t\t\n\t\t\t\tfor (var i = 0; i < cells.length; i++)\n\t\t    \t{\n\t\t    \t\tlookup.put(cells[i], true);\n\t\t        }\n\t\t\t}\n\t\t\t\n\t\t\t//Disable Css Transforms if it is used\n\t\t\tvar origUseCssTrans = this.useCssTransforms;\n\t\t\t\n\t\t\tif (origUseCssTrans) \n\t\t\t{\n\t\t\t\tthis.useCssTransforms = false;\n\t\t\t\tthis.view.revalidate();\n\t\t\t\tthis.sizeDidChange();\n\t\t\t}\n\n\t\t\ttry \n\t\t\t{\n\t\t\t\tscale = (scale != null) ? scale : 1;\n\t\t\t\tborder = (border != null) ? border : 0;\n\t\t\t\tcrisp = (crisp != null) ? crisp : true;\n\t\t\t\tignoreSelection = (ignoreSelection != null) ? ignoreSelection : true;\n\t\t\t\tshowText = (showText != null) ? showText : true;\n\t\t\t\thasShadow = (hasShadow != null) ? hasShadow : false;\n\t\n\t\t\t\tvar bounds = (exportType == 'page') ? this.view.getBackgroundPageBounds() :\n\t\t\t\t\t(((ignoreSelection && lookup == null) || nocrop ||\n\t\t\t\t\texportType == 'diagram') ? this.getGraphBounds() :\n\t\t\t\t\tthis.getBoundingBox(this.getSelectionCells()));\n\t\t\t\tvar vs = this.view.scale;\n\t\t\t\t\n\t\t\t\tif (exportType == 'diagram' && this.backgroundImage != null)\n\t\t\t\t{\n\t\t\t\t\tbounds = mxRectangle.fromRectangle(bounds);\n\t\t\t\t\tbounds.add(new mxRectangle(\n\t\t\t\t\t\t(this.view.translate.x + this.backgroundImage.x) * vs,\n\t\t\t\t\t\t(this.view.translate.y + this.backgroundImage.y) * vs,\n\t\t\t\t\t \tthis.backgroundImage.width * vs,\n\t\t\t\t\t \tthis.backgroundImage.height * vs));\n\t\t\t\t}\n\t\n\t\t\t\tif (bounds == null)\n\t\t\t\t{\n\t\t\t\t\tthrow Error(mxResources.get('drawingEmpty'));\n\t\t\t\t}\n\t\n\t\t\t\t// Prepares SVG document that holds the output\n\t\t\t\tvar s = scale / vs;\n\t\t\t\tvar w = Math.max(1, Math.ceil(bounds.width * s) + 2 * border) +\n\t\t\t\t\t((hasShadow && border == 0) ? 5 : 0);\n\t\t\t\tvar h = Math.max(1, Math.ceil(bounds.height * s) + 2 * border) +\n\t\t\t\t\t((hasShadow && border == 0) ? 5 : 0);\n\t\t\t\tvar tmp = (crisp) ? -0.5 : 0;\n\t\t\t\tvar root = Graph.createSvgNode(tmp, tmp, w, h, background);\n\t\t\t\tvar svgDoc = root.ownerDocument;\n\n\t\t\t    // Renders graph. Offset will be multiplied with state's scale when painting state.\n\t\t\t\t// TextOffset only seems to affect FF output but used everywhere for consistency.\n\t\t\t\tvar group = (svgDoc.createElementNS != null) ?\n\t\t\t    \tsvgDoc.createElementNS(mxConstants.NS_SVG, 'g') : svgDoc.createElement('g');\n\t\t\t    root.appendChild(group);\n\n\t\t\t\tvar svgCanvas = this.createSvgCanvas(group);\n\t\t\t\tsvgCanvas.foOffset = (crisp) ? -0.5 : 0;\n\t\t\t\tsvgCanvas.textOffset = (crisp) ? -0.5 : 0;\n\t\t\t\tsvgCanvas.imageOffset = (crisp) ? -0.5 : 0;\n\t\t\t\tsvgCanvas.translate(Math.floor(border / scale - bounds.x / vs),\n\t\t\t\t\tMath.floor(border / scale - bounds.y / vs));\n\t\t\t\t\n\t\t\t\t// Convert HTML entities\n\t\t\t\tvar htmlConverter = document.createElement('div');\n\t\t\t\t\n\t\t\t\t// Adds simple text fallback for viewers with no support for foreignObjects\n\t\t\t\tvar getAlternateText = svgCanvas.getAlternateText;\n\t\t\t\tsvgCanvas.getAlternateText = function(fo, x, y, w, h, str,\n\t\t\t\t\talign, valign, wrap, format, overflow, clip, rotation)\n\t\t\t\t{\n\t\t\t\t\t// Assumes a max character width of 0.5em\n\t\t\t\t\tif (str != null && this.state.fontSize > 0)\n\t\t\t\t\t{\n\t\t\t\t\t\ttry\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif (mxUtils.isNode(str))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tstr = str.innerText;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\thtmlConverter.innerHTML = str;\n\t\t\t\t\t\t\t\tstr = mxUtils.extractTextWithWhitespace(htmlConverter.childNodes);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Workaround for substring breaking double byte UTF\n\t\t\t\t\t\t\tvar exp = Math.ceil(2 * w / this.state.fontSize);\n\t\t\t\t\t\t\tvar result = [];\n\t\t\t\t\t\t\tvar length = 0;\n\t\t\t\t\t\t\tvar index = 0;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\twhile ((exp == 0 || length < exp) && index < str.length)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tvar char = str.charCodeAt(index);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tif (char == 10 || char == 13)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tif (length > 0)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tresult.push(str.charAt(index));\n\n\t\t\t\t\t\t\t\t\tif (char < 255)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tlength++;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tindex++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Uses result and adds ellipsis if more than 1 char remains\n\t\t\t\t\t\t\tif (result.length < str.length && str.length - result.length > 1)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tstr = mxUtils.trim(result.join('')) + '...';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\treturn str;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcatch (e)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\treturn getAlternateText.apply(this, arguments);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\treturn getAlternateText.apply(this, arguments);\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t\t\n\t\t\t\t// Paints background image\n\t\t\t\tvar bgImg = this.backgroundImage;\n\t\t\t\t\n\t\t\t\tif (bgImg != null)\n\t\t\t\t{\n\t\t\t\t\tvar s2 = vs / scale;\n\t\t\t\t\tvar tr = this.view.translate;\n\t\t\t\t\tvar tmp = new mxRectangle((bgImg.x + tr.x) * s2, (bgImg.y + tr.y) * s2,\n\t\t\t\t\t\tbgImg.width * s2, bgImg.height * s2);\n\t\t\t\t\t\n\t\t\t\t\t// Checks if visible\n\t\t\t\t\tif (mxUtils.intersects(bounds, tmp))\n\t\t\t\t\t{\n\t\t\t\t\t\tsvgCanvas.image(bgImg.x + tr.x, bgImg.y + tr.y,\n\t\t\t\t\t\t\tbgImg.width, bgImg.height, bgImg.src, true);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tsvgCanvas.scale(s);\n\t\t\t\tsvgCanvas.textEnabled = showText;\n\t\t\t\t\n\t\t\t\timgExport = (imgExport != null) ? imgExport : this.createSvgImageExport();\n\t\t\t\tvar imgExportDrawCellState = imgExport.drawCellState;\n\n\t\t\t\t// Ignores custom links\n\t\t\t\tvar imgExportGetLinkForCellState = imgExport.getLinkForCellState;\n\t\t\t\t\n\t\t\t\timgExport.getLinkForCellState = function(state, canvas)\n\t\t\t\t{\n\t\t\t\t\tvar result = imgExportGetLinkForCellState.apply(this, arguments);\n\t\t\t\t\t\n\t\t\t\t\treturn (result != null && !state.view.graph.isCustomLink(result)) ? result : null;\n\t\t\t\t};\n\t\t\t\t\n\t\t\t\timgExport.getLinkTargetForCellState = function(state, canvas)\n\t\t\t\t{\n\t\t\t\t\treturn state.view.graph.getLinkTargetForCell(state.cell);\n\t\t\t\t};\n\t\t\t\t\n\t\t\t\t// Implements ignoreSelection flag\n\t\t\t\timgExport.drawCellState = function(state, canvas)\n\t\t\t\t{\n\t\t\t\t\tvar graph = state.view.graph;\n\t\t\t\t\tvar selected = (lookup != null) ? lookup.get(state.cell) :\n\t\t\t\t\t\tgraph.isCellSelected(state.cell);\n\t\t\t\t\tvar parent = graph.model.getParent(state.cell);\n\t\t\t\t\t\n\t\t\t\t\t// Checks if parent cell is selected\n\t\t\t\t\twhile ((!ignoreSelection || lookup != null) &&\n\t\t\t\t\t\t!selected && parent != null)\n\t\t\t\t\t{\n\t\t\t\t\t\tselected = (lookup != null) ? lookup.get(parent) :\n\t\t\t\t\t\t\tgraph.isCellSelected(parent);\n\t\t\t\t\t\tparent = graph.model.getParent(parent);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif ((ignoreSelection && lookup == null) || selected)\n\t\t\t\t\t{\n\t\t\t\t\t\tgraph.view.redrawEnumerationState(state);\n\t\t\t\t\t\timgExportDrawCellState.apply(this, arguments);\n\t\t\t\t\t\tthis.doDrawShape(state.secondLabel, canvas);\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t\t\n\t\t\t\tvar viewRoot = (this.view.currentRoot != null) ?\n\t\t\t\t\tthis.view.currentRoot : this.model.root;\n\t\t\t\timgExport.drawState(this.getView().getState(viewRoot), svgCanvas);\n\t\t\t\tthis.updateSvgLinks(root, linkTarget, true);\n\t\t\t\tthis.addForeignObjectWarning(svgCanvas, root);\n\t\t\t\t\n\t\t\t\treturn root;\n\t\t\t}\n\t\t\tfinally\n\t\t\t{\n\t\t\t\tif (origUseCssTrans) \n\t\t\t\t{\n\t\t\t\t\tthis.useCssTransforms = true;\n\t\t\t\t\tthis.view.revalidate();\n\t\t\t\t\tthis.sizeDidChange();\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\t\n\t\t/**\n\t\t * Adds warning for truncated labels in older viewers.\n\t\t */\n\t\tGraph.prototype.addForeignObjectWarning = function(canvas, root)\n\t\t{\n\t\t\tif (urlParams['svg-warning'] != '0' && root.getElementsByTagName('foreignObject').length > 0)\n\t\t\t{\n\t\t\t\tvar sw = canvas.createElement('switch');\n\t\t\t\tvar g1 = canvas.createElement('g');\n\t\t\t\tg1.setAttribute('requiredFeatures', 'http://www.w3.org/TR/SVG11/feature#Extensibility');\n\t\t\t\tvar a = canvas.createElement('a');\n\t\t\t\ta.setAttribute('transform', 'translate(0,-5)');\n\t\t\t\t\n\t\t\t\t// Workaround for implicit namespace handling in HTML5 export, IE adds NS1 namespace so use code below\n\t\t\t\t// in all IE versions except quirks mode. KNOWN: Adds xlink namespace to each image tag in output.\n\t\t\t\tif (a.setAttributeNS == null || (root.ownerDocument != document && document.documentMode == null))\n\t\t\t\t{\n\t\t\t\t\ta.setAttribute('xlink:href', Graph.foreignObjectWarningLink);\n\t\t\t\t\ta.setAttribute('target', '_blank');\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\ta.setAttributeNS(mxConstants.NS_XLINK, 'xlink:href', Graph.foreignObjectWarningLink);\n\t\t\t\t\ta.setAttributeNS(mxConstants.NS_XLINK, 'target', '_blank');\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tvar text = canvas.createElement('text');\n\t\t\t\ttext.setAttribute('text-anchor', 'middle');\n\t\t\t\ttext.setAttribute('font-size', '10px');\n\t\t\t\ttext.setAttribute('x', '50%');\n\t\t\t\ttext.setAttribute('y', '100%');\n\t\t\t\tmxUtils.write(text, Graph.foreignObjectWarningText);\n\t\t\t\t\n\t\t\t\tsw.appendChild(g1);\n\t\t\t\ta.appendChild(text);\n\t\t\t\tsw.appendChild(a);\n\t\t\t\troot.appendChild(sw);\n\t\t\t}\n\t\t};\n\t\t\n\t\t/**\n\t\t * Hook for creating the canvas used in getSvg.\n\t\t */\n\t\tGraph.prototype.updateSvgLinks = function(node, target, removeCustom)\n\t\t{\n\t\t\tvar links = node.getElementsByTagName('a');\n\t\t\t\n\t\t\tfor (var i = 0; i < links.length; i++)\n\t\t\t{\n\t\t\t\tif (links[i].getAttribute('target') == null)\n\t\t\t\t{\n\t\t\t\t\tvar href = links[i].getAttribute('href');\n\t\t\t\t\t\n\t\t\t\t\tif (href == null)\n\t\t\t\t\t{\n\t\t\t\t\t\thref = links[i].getAttribute('xlink:href');\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif (href != null)\n\t\t\t\t\t{\n\t\t\t\t\t\tif (target != null && /^https?:\\/\\//.test(href))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tlinks[i].setAttribute('target', target);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if (removeCustom && this.isCustomLink(href))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tlinks[i].setAttribute('href', 'javascript:void(0);');\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\t\n\t\t/**\n\t\t * Hook for creating the canvas used in getSvg.\n\t\t */\n\t\tGraph.prototype.createSvgCanvas = function(node)\n\t\t{\n\t\t\tvar canvas = new mxSvgCanvas2D(node);\n\t\t\tcanvas.minStrokeWidth = this.cellRenderer.minSvgStrokeWidth;\n\t\t\tcanvas.pointerEvents = true;\n\t\t\t\n\t\t\treturn canvas;\n\t\t};\n\n\t\t/**\n\t\t * \n\t\t */\n\t\tGraph.prototype.getSelectedTextBlocks = function()\n\t\t{\n\t\t\t// See https://stackoverflow.com/questions/667951/how-to-get-nodes-lying-inside-a-range-with-javascript\n\t\t\tfunction getNextNode(node)\n\t\t\t{\n\t\t\t\tif (node.firstChild)\n\t\t\t\t\treturn node.firstChild;\n\t\t\t\twhile (node)\n\t\t\t\t{\n\t\t\t\t\tif (node.nextSibling)\n\t\t\t\t\t\treturn node.nextSibling;\n\t\t\t\t\tnode = node.parentNode;\n\t\t\t\t}\n\t\t\t};\n\t\t\t\n\t\t\tfunction getNodesInRange(range)\n\t\t\t{\n\t\t\t\tvar start = range.startContainer;\n\t\t\t\tvar end = range.endContainer;\n\t\t\t\tvar commonAncestor = range.commonAncestorContainer;\n\t\t\t\tvar nodes = [];\n\t\t\t\tvar node;\n\t\t\t\n\t\t\t\t// walk parent nodes from start to common ancestor\n\t\t\t\tfor (node = start.parentNode; node; node = node.parentNode)\n\t\t\t\t{\n\t\t\t\t\tnodes.push(node);\n\t\t\t\t\tif (node == commonAncestor)\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tnodes.reverse();\n\t\t\t\n\t\t\t\t// walk children and siblings from start until end is found\n\t\t\t\tfor (node = start; node; node = getNextNode(node))\n\t\t\t\t{\n\t\t\t\t\tnodes.push(node);\n\t\t\t\t\tif (node == end)\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\n\t\t\t\treturn nodes;\n\t\t\t};\n\n\t\t\tvar nodes = [this.getSelectedElement()];\n\n\t\t\tif (window.getSelection)\n\t\t\t{\n\t\t\t\tvar sel = window.getSelection();\n\t\t\t\t\n\t\t\t    if (sel.getRangeAt && sel.rangeCount)\n\t\t\t    {\n\t\t\t\t\tnodes = getNodesInRange(sel.getRangeAt(0));\n\t\t\t    }\n\t\t\t}\n\n\t\t\tvar result = [];\n\n\t\t\tfor (var i = 0; i < nodes.length; i++)\n\t\t\t{\n\t\t\t\tvar node = nodes[i];\n\n\t\t\t\twhile (this.cellEditor.textarea != null &&\n\t\t\t\t\tthis.cellEditor.textarea.contains(node) &&\n\t\t\t\t\tnode != this.cellEditor.textarea &&\n\t\t\t\t\tnode.parentNode != null)\n\t\t\t\t{\n\t\t\t\t\tif (node.nodeType == mxConstants.NODETYPE_ELEMENT &&\n\t\t\t\t\t\tmxUtils.getCurrentStyle(node).display == 'block')\n\t\t\t\t\t{\n\t\t\t\t\t\tif (mxUtils.indexOf(result, node) < 0)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tresult.push(node);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tnode = node.parentNode;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn result;\n\t\t};\n\n\t\t/**\n\t\t * Returns the first ancestor of the current selection with the given name.\n\t\t */\n\t\tGraph.prototype.getSelectedElement = function()\n\t\t{\n\t\t\tvar node = null;\n\t\t\t\n\t\t\tif (window.getSelection)\n\t\t\t{\n\t\t\t\tvar sel = window.getSelection();\n\t\t\t\t\n\t\t\t    if (sel.getRangeAt && sel.rangeCount)\n\t\t\t    {\n\t\t\t        var range = sel.getRangeAt(0);\n\t\t\t        node = range.commonAncestorContainer;\n\t\t\t    }\n\t\t\t}\n\t\t\telse if (document.selection)\n\t\t\t{\n\t\t\t\tnode = document.selection.createRange().parentElement();\n\t\t\t}\n\t\t\t\n\t\t\treturn node;\n\t\t};\n\t\t\t\n\t\t/**\n\t\t * Returns the text editing element.\n\t\t */\n\t\tGraph.prototype.getSelectedEditingElement = function()\n\t\t{\n\t\t\tvar node = this.getSelectedElement();\n\n\t\t\twhile (node != null && node.nodeType != mxConstants.NODETYPE_ELEMENT)\n\t\t\t{\n\t\t\t\tnode = node.parentNode;\n\t\t\t}\n\n\t\t\tif (node != null)\n\t\t\t{\n\t\t\t\t// Workaround for commonAncestor on range in IE11 returning parent of common ancestor\n\t\t\t\tif (node == this.cellEditor.textarea && this.cellEditor.textarea.children.length == 1 &&\n\t\t\t\t\tthis.cellEditor.textarea.firstChild.nodeType == mxConstants.NODETYPE_ELEMENT)\n\t\t\t\t{\n\t\t\t\t\tnode = this.cellEditor.textarea.firstChild;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\treturn node;\n\t\t};\n\t\t\n\t\t/**\n\t\t * Returns the first ancestor of the current selection with the given name.\n\t\t */\n\t\tGraph.prototype.getParentByName = function(node, name, stopAt)\n\t\t{\n\t\t\twhile (node != null)\n\t\t\t{\n\t\t\t\tif (node.nodeName == name)\n\t\t\t\t{\n\t\t\t\t\treturn node;\n\t\t\t\t}\n\t\t\n\t\t\t\tif (node == stopAt)\n\t\t\t\t{\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tnode = node.parentNode;\n\t\t\t}\n\t\t\t\n\t\t\treturn node;\n\t\t};\n\t\t\n\t\t/**\n\t\t * Returns the first ancestor of the current selection with the given name.\n\t\t */\n\t\tGraph.prototype.getParentByNames = function(node, names, stopAt)\n\t\t{\n\t\t\twhile (node != null)\n\t\t\t{\n\t\t\t\tif (mxUtils.indexOf(names, node.nodeName) >= 0)\n\t\t\t\t{\n\t\t\t\t\treturn node;\n\t\t\t\t}\n\t\t\n\t\t\t\tif (node == stopAt)\n\t\t\t\t{\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tnode = node.parentNode;\n\t\t\t}\n\t\t\t\n\t\t\treturn node;\n\t\t};\n\t\t\n\t\t/**\n\t\t * Selects the given node.\n\t\t */\n\t\tGraph.prototype.selectNode = function(node)\n\t\t{\n\t\t\tvar sel = null;\n\t\t\t\n\t\t    // IE9 and non-IE\n\t\t\tif (window.getSelection)\n\t\t    {\n\t\t    \tsel = window.getSelection();\n\t\t    \t\n\t\t        if (sel.getRangeAt && sel.rangeCount)\n\t\t        {\n\t\t        \tvar range = document.createRange();\n\t\t            range.selectNode(node);\n\t\t            sel.removeAllRanges();\n\t\t            sel.addRange(range);\n\t\t        }\n\t\t    }\n\t\t    // IE < 9\n\t\t\telse if ((sel = document.selection) && sel.type != 'Control')\n\t\t    {\n\t\t        var originalRange = sel.createRange();\n\t\t        originalRange.collapse(true);\n\t\t        var range = sel.createRange();\n\t\t        range.setEndPoint('StartToStart', originalRange);\n\t\t        range.select();\n\t\t    }\n\t\t};\n\t\t\n\t\t/**\n\t\t * Flips the given cells horizontally or vertically.\n\t\t */\n\t\tGraph.prototype.flipEdgePoints = function(cell, horizontal, c)\n\t\t{\n\t\t\tvar geo = this.getCellGeometry(cell);\n\n\t\t\tif (geo != null)\n\t\t\t{\n\t\t\t\tgeo = geo.clone();\n\n\t\t\t\tif (geo.points != null)\n\t\t\t\t{\n\t\t\t\t\tfor (var i = 0; i < geo.points.length; i++)\n\t\t\t\t\t{\n\t\t\t\t\t\tif (horizontal)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tgeo.points[i].x = c + (c - geo.points[i].x);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tgeo.points[i].y = c + (c - geo.points[i].y);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tvar flipTerminalPoint = function(pt)\n\t\t\t\t{\n\t\t\t\t\tif (pt != null)\n\t\t\t\t\t{\n\t\t\t\t\t\tif (horizontal)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tpt.x = c + (c - pt.x);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tpt.y = c + (c - pt.y);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t};\n\n\t\t\t\tflipTerminalPoint(geo.getTerminalPoint(true));\n\t\t\t\tflipTerminalPoint(geo.getTerminalPoint(false));\n\n\t\t\t\tthis.model.setGeometry(cell, geo);\n\t\t\t}\n\t\t};\n\t\t\n\t\t/**\n\t\t * Flips the given cells horizontally or vertically.\n\t\t */\n\t\tGraph.prototype.flipChildren = function(cell, horizontal, c)\n\t\t{\n\t\t\tthis.model.beginUpdate();\n\t\t\ttry\n\t\t\t{\n\t\t\t\tvar childCount = this.model.getChildCount(cell);\n\n\t\t\t\tfor (var i = 0; i < childCount; i++)\n\t\t\t\t{\n\t\t\t\t\tvar child = this.model.getChildAt(cell, i);\n\n\t\t\t\t\tif (this.model.isEdge(child))\n\t\t\t\t\t{\n\t\t\t\t\t\tthis.flipEdgePoints(child, horizontal, c);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tvar geo = this.getCellGeometry(child);\n\n\t\t\t\t\t\tif (geo != null)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tgeo = geo.clone();\n\n\t\t\t\t\t\t\tif (horizontal)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tgeo.x = c + (c - geo.x - geo.width);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tgeo.y = c + (c - geo.y - geo.height);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tthis.model.setGeometry(child, geo);\n\t\t\t\t\t\t}\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tfinally\n\t\t\t{\n\t\t\t\tthis.model.endUpdate();\n\t\t\t}\n\t\t};\n\t\t\n\t\t/**\n\t\t * Flips the given cells horizontally or vertically.\n\t\t */\n\t\tGraph.prototype.flipCells = function(cells, horizontal)\n\t\t{\n\t\t\tthis.model.beginUpdate();\n\t\t\ttry\n\t\t\t{\n\t\t\t\tcells = this.model.getTopmostCells(cells);\n\t\t\t\tvar vertices = [];\n\t\t\t\t\n\t\t\t\tfor (var i = 0; i < cells.length; i++)\n\t\t\t\t{\n\t\t\t\t\tif (this.model.isEdge(cells[i]))\n\t\t\t\t\t{\n\t\t\t\t\t\tvar state = this.view.getState(cells[i]);\n\n\t\t\t\t\t\tif (state != null)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tthis.flipEdgePoints(cells[i], horizontal, ((horizontal ? state.getCenterX() :\n\t\t\t\t\t\t\t\tstate.getCenterY()) / this.view.scale) - ((horizontal) ?\n\t\t\t\t\t\t\t\tstate.origin.x : state.origin.y) - ((horizontal) ?\n\t\t\t\t\t\t\t\tthis.view.translate.x : this.view.translate.y));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tvar geo = this.getCellGeometry(cells[i]);\n\n\t\t\t\t\t\tif (geo != null)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tthis.flipChildren(cells[i], horizontal, horizontal ?\n\t\t\t\t\t\t\t\tgeo.getCenterX() - geo.x :\n\t\t\t\t\t\t\t\tgeo.getCenterY() - geo.y);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tvertices.push(cells[i]);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tthis.toggleCellStyles(horizontal ? mxConstants.STYLE_FLIPH :\n\t\t\t\t\tmxConstants.STYLE_FLIPV, false, vertices);\n\t\t\t}\n\t\t\tfinally\n\t\t\t{\n\t\t\t\tthis.model.endUpdate();\n\t\t\t}\n\t\t};\n\t\n\t\t/**\n\t\t * Deletes the given cells  and returns the cells to be selected.\n\t\t */\n\t\tGraph.prototype.deleteCells = function(cells, includeEdges)\n\t\t{\n\t\t\tvar select = null;\n\n\t\t\tif (cells != null && cells.length > 0)\n\t\t\t{\n\t\t\t\tthis.model.beginUpdate();\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\t// Shrinks tables\t\n\t\t\t\t\tfor (var i = 0; i < cells.length; i++)\n\t\t\t\t\t{\n\t\t\t\t\t\tvar parent = this.model.getParent(cells[i]);\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (this.isTable(parent))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tvar row = this.getCellGeometry(cells[i]);\n\t\t\t\t\t\t\tvar table = this.getCellGeometry(parent);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif (row != null && table != null)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\ttable = table.clone();\n\t\t\t\t\t\t\t\ttable.height -= row.height;\n\t\t\t\t\t\t\t\tthis.model.setGeometry(parent, table);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tvar parents = (this.selectParentAfterDelete) ? this.model.getParents(cells) : null;\n\t\t\t\t\tthis.removeCells(cells, includeEdges);\n\t\t\t\t}\n\t\t\t\tfinally\n\t\t\t\t{\n\t\t\t\t\tthis.model.endUpdate();\n\t\t\t\t}\n\t\n\t\t\t\t// Selects parents for easier editing of groups\n\t\t\t\tif (parents != null)\n\t\t\t\t{\n\t\t\t\t\tselect = [];\n\t\t\t\t\t\n\t\t\t\t\tfor (var i = 0; i < parents.length; i++)\n\t\t\t\t\t{\n\t\t\t\t\t\tif (this.model.contains(parents[i]) &&\n\t\t\t\t\t\t\t(this.model.isVertex(parents[i]) ||\n\t\t\t\t\t\t\tthis.model.isEdge(parents[i])))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tselect.push(parents[i]);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\treturn select;\n\t\t};\n\t\t\n\t\t/**\n\t\t * Inserts a column in the table for the given cell.\n\t\t */\n\t\tGraph.prototype.insertTableColumn = function(cell, before)\n\t\t{\n\t\t\tvar model = this.getModel();\n\t\t\tmodel.beginUpdate();\n\t\t\t\n\t\t\ttry\n\t\t\t{\n\t\t\t\tvar table = cell;\n\t\t\t\tvar index = 0;\n\t\t\t\t\n\t\t\t\tif (this.isTableCell(cell))\n\t\t\t\t{\n\t\t\t\t\tvar row = model.getParent(cell);\n\t\t\t\t\ttable = model.getParent(row);\n\t\t\t\t\tindex = mxUtils.indexOf(model.getChildCells(row, true), cell);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tif (this.isTableRow(cell))\n\t\t\t\t\t{\n\t\t\t\t\t\ttable = model.getParent(cell);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tcell = model.getChildCells(table, true)[0];\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif (!before)\n\t\t\t\t\t{\n\t\t\t\t\t\tindex = model.getChildCells(cell, true).length - 1;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tvar rows = model.getChildCells(table, true);\n\t\t\t\tvar dw = Graph.minTableColumnWidth;\n\t\t\t\t\n\t\t\t\tfor (var i = 0; i < rows.length; i++)\n\t\t\t\t{\n\t\t\t\t\tvar child = model.getChildCells(rows[i], true)[index];\n\t\t\t\t\tvar clone = model.cloneCell(child, false);\n\n\t\t\t\t\t// Handles possible missing child in row\n\t\t\t\t\tif (clone == null)\n\t\t\t\t\t{\n\t\t\t\t\t\tclone = this.createVertex();\n\t\t\t\t\t}\n\n\t\t\t\t\tvar geo = this.getCellGeometry(clone);\n\n\t\t\t\t\t// Removes value, col/rowspan and alternate bounds\n\t\t\t\t\tclone.value = null;\n\t\t\t\t\tclone.style = mxUtils.setStyle(mxUtils.setStyle(\n\t\t\t\t\t\tclone.style, 'rowspan', null), 'colspan', null);\n\n\t\t\t\t\tif (geo != null)\n\t\t\t\t\t{\n\t\t\t\t\t\tif (geo.alternateBounds != null)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tgeo.width = geo.alternateBounds.width;\n\t\t\t\t\t\t\tgeo.height = geo.alternateBounds.height;\n\t\t\t\t\t\t\tgeo.alternateBounds = null;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tdw = geo.width;\n\t\t\t\t\t\tvar rowGeo = this.getCellGeometry(rows[i]);\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (rowGeo != null)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tgeo.height = rowGeo.height;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tmodel.add(rows[i], clone, index + ((before) ? 0 : 1));\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tvar tableGeo = this.getCellGeometry(table);\n\t\t\t\t\n\t\t\t\tif (tableGeo != null)\n\t\t\t\t{\n\t\t\t\t\ttableGeo = tableGeo.clone();\n\t\t\t\t\ttableGeo.width += dw;\n\t\t\t\t\t\n\t\t\t\t\tmodel.setGeometry(table, tableGeo);\n\t\t\t\t}\n\t\t\t}\n\t\t\tfinally\n\t\t\t{\n\t\t\t\tmodel.endUpdate();\n\t\t\t}\n\t\t};\n\n\t\t/**\n\t\t * Inserts a row in the table for the given cell.\n\t\t */\n\t\tGraph.prototype.deleteLane = function(cell)\n\t\t{\n\t\t\tvar model = this.getModel();\n\t\t\tmodel.beginUpdate();\n\t\t\t\n\t\t\ttry\n\t\t\t{\n\t\t\t\tvar pool = null;\n\t\t\t\tvar lane = cell;\n\t\t\t\tvar style = this.getCurrentCellStyle(lane);\n\n\t\t\t\tif (style['childLayout'] == 'stackLayout')\n\t\t\t\t{\n\t\t\t\t\tpool = lane;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tpool = model.getParent(lane);\n\t\t\t\t}\n\n\t\t\t\tvar lanes = model.getChildCells(pool, true);\n\n\t\t\t\tif (lanes.length == 0)\n\t\t\t\t{\n\t\t\t\t\tmodel.remove(pool);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tif (pool == lane)\n\t\t\t\t\t{\n\t\t\t\t\t\tlane = lanes[lanes.length - 1];\n\t\t\t\t\t}\n\n\t\t\t\t\tmodel.remove(lane);\n\t\t\t\t}\n\t\t\t}\n\t\t\tfinally\n\t\t\t{\n\t\t\t\tmodel.endUpdate();\n\t\t\t}\n\t\t};\n\n\t\t/**\n\t\t * Inserts a row in the table for the given cell.\n\t\t */\n\t\tGraph.prototype.insertLane = function(cell, before)\n\t\t{\n\t\t\tvar model = this.getModel();\n\t\t\tmodel.beginUpdate();\n\t\t\t\n\t\t\ttry\n\t\t\t{\n\t\t\t\tvar pool = null;\n\t\t\t\tvar lane = cell;\n\t\t\t\tvar style = this.getCurrentCellStyle(lane);\n\n\t\t\t\tif (style['childLayout'] == 'stackLayout')\n\t\t\t\t{\n\t\t\t\t\tpool = lane;\n\t\t\t\t\tvar lanes = model.getChildCells(pool, true);\n\t\t\t\t\tlane = lanes[(before) ? 0 : lanes.length - 1];\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tpool = model.getParent(lane);\n\t\t\t\t}\n\n\t\t\t\tvar index = pool.getIndex(lane);\n\t\t\t\tlane = model.cloneCell(lane, false);\n\t\t\t\tlane.value = null;\n\t\t\t\tmodel.add(pool, lane, index + ((before) ? 0 : 1));\n\t\t\t}\n\t\t\tfinally\n\t\t\t{\n\t\t\t\tmodel.endUpdate();\n\t\t\t}\n\t\t};\n\t\t\n\t\t/**\n\t\t * Inserts a row in the table for the given cell.\n\t\t */\n\t\tGraph.prototype.insertTableRow = function(cell, before)\n\t\t{\n\t\t\tvar model = this.getModel();\n\t\t\tmodel.beginUpdate();\n\t\t\t\n\t\t\ttry\n\t\t\t{\n\t\t\t\tvar table = cell;\n\t\t\t\tvar row = cell;\n\t\t\t\t\n\t\t\t\tif (this.isTableCell(cell))\n\t\t\t\t{\n\t\t\t\t\trow = model.getParent(cell);\n\t\t\t\t\ttable = model.getParent(row);\n\t\t\t\t}\n\t\t\t\telse if (this.isTableRow(cell))\n\t\t\t\t{\n\t\t\t\t\ttable = model.getParent(cell);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tvar rows = model.getChildCells(table, true);\n\t\t\t\t\trow = rows[(before) ? 0 : rows.length - 1];\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tvar cells = model.getChildCells(row, true);\n\t\t\t\tvar index = table.getIndex(row);\n\t\t\t\trow = model.cloneCell(row, false);\n\t\t\t\trow.value = null;\n\t\t\t\t\n\t\t\t\tvar rowGeo = this.getCellGeometry(row);\n\t\t\t\t\n\t\t\t\tif (rowGeo != null)\n\t\t\t\t{\n\t\t\t\t\tfor (var i = 0; i < cells.length; i++)\n\t\t\t\t\t{\n\t\t\t\t\t\tvar cell = model.cloneCell(cells[i], false);\n\n\t\t\t\t\t\t// Removes value, col/rowspan and alternate bounds\n\t\t\t\t\t\tcell.value = null;\n\t\t\t\t\t\tcell.style = mxUtils.setStyle(mxUtils.setStyle(\n\t\t\t\t\t\t\tcell.style, 'rowspan', null), 'colspan', null);\n\n\t\t\t\t\t\tvar geo = this.getCellGeometry(cell);\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (geo != null)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif (geo.alternateBounds != null)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tgeo.width = geo.alternateBounds.width;\n\t\t\t\t\t\t\t\tgeo.height = geo.alternateBounds.height;\n\t\t\t\t\t\t\t\tgeo.alternateBounds = null;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tgeo.height = rowGeo.height;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\trow.insert(cell);\n\t\t\t\t\t}\n\n\t\t\t\t\tmodel.add(table, row, index + ((before) ? 0 : 1));\n\t\t\t\t\t\n\t\t\t\t\tvar tableGeo = this.getCellGeometry(table);\n\t\t\t\t\t\n\t\t\t\t\tif (tableGeo != null)\n\t\t\t\t\t{\n\t\t\t\t\t\ttableGeo = tableGeo.clone();\n\t\t\t\t\t\ttableGeo.height += rowGeo.height;\n\t\t\t\t\t\t\n\t\t\t\t\t\tmodel.setGeometry(table, tableGeo);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tfinally\n\t\t\t{\n\t\t\t\tmodel.endUpdate();\n\t\t\t}\n\t\t};\n\t\n\t\t/**\n\t\t * \n\t\t */\n\t\tGraph.prototype.deleteTableColumn = function(cell)\n\t\t{\n\t\t\tvar model = this.getModel();\n\t\t\tmodel.beginUpdate();\n\t\t\t\n\t\t\ttry\n\t\t\t{\n\t\t\t\tvar table = cell;\n\t\t\t\tvar row = cell;\n\t\t\t\t\n\t\t\t\tif (this.isTableCell(cell))\n\t\t\t\t{\n\t\t\t\t\trow = model.getParent(cell);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (this.isTableRow(row))\n\t\t\t\t{\n\t\t\t\t\ttable = model.getParent(row);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tvar rows = model.getChildCells(table, true);\n\t\t\t\t\n\t\t\t\tif (rows.length == 0)\n\t\t\t\t{\n\t\t\t\t\tmodel.remove(table);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tif (!this.isTableRow(row))\n\t\t\t\t\t{\n\t\t\t\t\t\trow = rows[0];\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tvar cells = model.getChildCells(row, true);\n\t\t\t\t\t\n\t\t\t\t\tif (cells.length <= 1)\n\t\t\t\t\t{\n\t\t\t\t\t\tmodel.remove(table);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tvar index = cells.length - 1;\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (this.isTableCell(cell))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tindex = mxUtils.indexOf(cells, cell);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tvar width = 0;\n\t\t\n\t\t\t\t\t\tfor (var i = 0; i < rows.length; i++)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tvar child = model.getChildCells(rows[i], true)[index];\n\t\t\t\t\t\t\tmodel.remove(child);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tvar geo = this.getCellGeometry(child);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif (geo != null)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\twidth = Math.max(width, geo.width);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tvar tableGeo = this.getCellGeometry(table);\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (tableGeo != null)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\ttableGeo = tableGeo.clone();\n\t\t\t\t\t\t\ttableGeo.width -= width;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tmodel.setGeometry(table, tableGeo);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tfinally\n\t\t\t{\n\t\t\t\tmodel.endUpdate();\n\t\t\t}\n\t\t};\n\t\t\n\t\t/**\n\t\t * \n\t\t */\n\t\tGraph.prototype.deleteTableRow = function(cell)\n\t\t{\n\t\t\tvar model = this.getModel();\n\t\t\tmodel.beginUpdate();\n\t\t\t\n\t\t\ttry\n\t\t\t{\n\t\t\t\tvar table = cell;\n\t\t\t\tvar row = cell;\n\t\t\t\t\n\t\t\t\tif (this.isTableCell(cell))\n\t\t\t\t{\n\t\t\t\t\trow = model.getParent(cell);\n\t\t\t\t\tcell = row;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (this.isTableRow(cell))\n\t\t\t\t{\n\t\t\t\t\ttable = model.getParent(row);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tvar rows = model.getChildCells(table, true);\n\t\t\t\t\n\t\t\t\tif (rows.length <= 1)\n\t\t\t\t{\n\t\t\t\t\tmodel.remove(table);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tif (!this.isTableRow(row))\n\t\t\t\t\t{\n\t\t\t\t\t\trow = rows[rows.length - 1];\n\t\t\t\t\t}\t\n\t\t\t\t\t\n\t\t\t\t\tmodel.remove(row);\n\t\t\t\t\tvar height = 0;\n\t\t\t\t\t\n\t\t\t\t\tvar geo = this.getCellGeometry(row);\n\t\t\t\t\t\n\t\t\t\t\tif (geo != null)\n\t\t\t\t\t{\n\t\t\t\t\t\theight = geo.height;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tvar tableGeo = this.getCellGeometry(table);\n\t\t\t\t\t\n\t\t\t\t\tif (tableGeo != null)\n\t\t\t\t\t{\n\t\t\t\t\t\ttableGeo = tableGeo.clone();\n\t\t\t\t\t\ttableGeo.height -= height;\n\t\t\t\t\t\t\n\t\t\t\t\t\tmodel.setGeometry(table, tableGeo);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tfinally\n\t\t\t{\n\t\t\t\tmodel.endUpdate();\n\t\t\t}\n\t\t};\n\n\t\t/**\n\t\t * Inserts a new row into the given table.\n\t\t */\n\t\tGraph.prototype.insertRow = function(table, index)\n\t\t{\n\t\t\tvar bd = table.tBodies[0];\n\t\t\tvar cells = bd.rows[0].cells;\n\t\t\tvar cols = 0;\n\t\t\t\n\t\t\t// Counts columns including colspans\n\t\t\tfor (var i = 0; i < cells.length; i++)\n\t\t\t{\n\t\t\t\tvar colspan = cells[i].getAttribute('colspan');\n\t\t\t\tcols += (colspan != null) ? parseInt(colspan) : 1;\n\t\t\t}\n\t\t\t\n\t\t\tvar row = bd.insertRow(index);\n\t\t\t\n\t\t\tfor (var i = 0; i < cols; i++)\n\t\t\t{\n\t\t\t\tmxUtils.br(row.insertCell(-1));\n\t\t\t}\n\t\t\t\n\t\t\treturn row.cells[0];\n\t\t};\n\t\t\n\t\t/**\n\t\t * Deletes the given column.\n\t\t */\n\t\tGraph.prototype.deleteRow = function(table, index)\n\t\t{\n\t\t\ttable.tBodies[0].deleteRow(index);\n\t\t};\n\t\t\n\t\t/**\n\t\t * Deletes the given column.\n\t\t */\n\t\tGraph.prototype.insertColumn = function(table, index)\n\t\t{\n\t\t\tvar hd = table.tHead;\n\t\t\t\n\t\t\tif (hd != null)\n\t\t\t{\n\t\t\t\t// TODO: use colIndex\n\t\t\t\tfor (var h = 0; h < hd.rows.length; h++)\n\t\t\t\t{\n\t\t\t\t\tvar th = document.createElement('th');\n\t\t\t\t\thd.rows[h].appendChild(th);\n\t\t\t\t\tmxUtils.br(th);\n\t\t\t\t}\n\t\t\t}\n\t\t\n\t\t\tvar bd = table.tBodies[0];\n\t\t\t\n\t\t\tfor (var i = 0; i < bd.rows.length; i++)\n\t\t\t{\n\t\t\t\tvar cell = bd.rows[i].insertCell(index);\n\t\t\t\tmxUtils.br(cell);\n\t\t\t}\n\t\t\t\n\t\t\treturn bd.rows[0].cells[(index >= 0) ? index : bd.rows[0].cells.length - 1];\n\t\t};\n\t\t\n\t\t/**\n\t\t * Deletes the given column.\n\t\t */\n\t\tGraph.prototype.deleteColumn = function(table, index)\n\t\t{\n\t\t\tif (index >= 0)\n\t\t\t{\n\t\t\t\tvar bd = table.tBodies[0];\n\t\t\t\tvar rows = bd.rows;\n\t\t\t\t\n\t\t\t\tfor (var i = 0; i < rows.length; i++)\n\t\t\t\t{\n\t\t\t\t\tif (rows[i].cells.length > index)\n\t\t\t\t\t{\n\t\t\t\t\t\trows[i].deleteCell(index);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\t\n\t\t/**\n\t\t * Inserts the given HTML at the caret position (no undo).\n\t\t */\n\t\tGraph.prototype.pasteHtmlAtCaret = function(html)\n\t\t{\n\t\t    var sel, range;\n\t\t\n\t\t\t// IE9 and non-IE\n\t\t    if (window.getSelection)\n\t\t    {\n\t\t        sel = window.getSelection();\n\t\t        \n\t\t        if (sel.getRangeAt && sel.rangeCount)\n\t\t        {\n\t\t            range = sel.getRangeAt(0);\n\t\t            range.deleteContents();\n\t\t\n\t\t            // Range.createContextualFragment() would be useful here but is\n\t\t            // only relatively recently standardized and is not supported in\n\t\t            // some browsers (IE9, for one)\n\t\t            var el = document.createElement(\"div\");\n\t\t            el.innerHTML = html;\n\t\t            var frag = document.createDocumentFragment(), node;\n\t\t            \n\t\t            while ((node = el.firstChild))\n\t\t            {\n\t\t                lastNode = frag.appendChild(node);\n\t\t            }\n\t\t            \n\t\t            range.insertNode(frag);\n\t\t        }\n\t\t    }\n\t\t    // IE < 9\n\t\t    else if ((sel = document.selection) && sel.type != \"Control\")\n\t\t    {\n\t\t    \t// FIXME: Does not work if selection is empty\n\t\t        sel.createRange().pasteHTML(html);\n\t\t    }\n\t\t};\n\t\n\t\t/**\n\t\t * Creates an anchor elements for handling the given link in the\n\t\t * hint that is shown when the cell is selected.\n\t\t */\n\t\tGraph.prototype.createLinkForHint = function(link, label)\n\t\t{\n\t\t\tlink = (link != null) ? link : 'javascript:void(0);';\n\n\t\t\tif (label == null || label.length == 0)\n\t\t\t{\n\t\t\t\tif (this.isCustomLink(link))\n\t\t\t\t{\n\t\t\t\t\tlabel = this.getLinkTitle(link);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tlabel = link;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Helper function to shorten strings\n\t\t\tfunction short(str, max)\n\t\t\t{\n\t\t\t\tif (str.length > max)\n\t\t\t\t{\n\t\t\t\t\tstr = str.substring(0, Math.round(max / 2)) + '...' +\n\t\t\t\t\t\tstr.substring(str.length - Math.round(max / 4));\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\treturn str;\n\t\t\t};\n\t\t\t\n\t\t\tvar a = document.createElement('a');\n\t\t\ta.setAttribute('rel', this.linkRelation);\n\t\t\ta.setAttribute('href', this.getAbsoluteUrl(link));\n\t\t\ta.setAttribute('title', short((this.isCustomLink(link)) ?\n\t\t\t\tthis.getLinkTitle(link) : link, 80));\n\t\t\t\n\t\t\tif (this.linkTarget != null)\n\t\t\t{\n\t\t\t\ta.setAttribute('target', this.linkTarget);\n\t\t\t}\n\t\t\t\n\t\t\t// Adds shortened label to link\n\t\t\tmxUtils.write(a, short(label, 40));\n\t\t\t\n\t\t\t// Handles custom links\n\t\t\tif (this.isCustomLink(link))\n\t\t\t{\n\t\t\t\tmxEvent.addListener(a, 'click', mxUtils.bind(this, function(evt)\n\t\t\t\t{\n\t\t\t\t\tthis.customLinkClicked(link);\n\t\t\t\t\tmxEvent.consume(evt);\n\t\t\t\t}));\n\t\t\t}\n\t\t\t\n\t\t\treturn a;\n\t\t};\n\t\t\n\t\t/**\n\t\t * Customized graph for touch devices.\n\t\t */\n\t\tGraph.prototype.initTouch = function()\n\t\t{\n\t\t\t// Disables new connections via \"hotspot\"\n\t\t\tthis.connectionHandler.marker.isEnabled = function()\n\t\t\t{\n\t\t\t\treturn this.graph.connectionHandler.first != null;\n\t\t\t};\n\t\t\n\t\t\t// Hides menu when editing starts\n\t\t\tthis.addListener(mxEvent.START_EDITING, function(sender, evt)\n\t\t\t{\n\t\t\t\tthis.popupMenuHandler.hideMenu();\n\t\t\t});\n\t\t\n\t\t\t// Adds custom hit detection if native hit detection found no cell\n\t\t\tvar graphUpdateMouseEvent = this.updateMouseEvent;\n\t\t\tthis.updateMouseEvent = function(me)\n\t\t\t{\n\t\t\t\tme = graphUpdateMouseEvent.apply(this, arguments);\n\t\n\t\t\t\tif (mxEvent.isTouchEvent(me.getEvent()) && me.getState() == null)\n\t\t\t\t{\n\t\t\t\t\tvar cell = this.getCellAt(me.graphX, me.graphY);\n\t\t\n\t\t\t\t\tif (cell != null && this.isSwimlane(cell) && this.hitsSwimlaneContent(cell, me.graphX, me.graphY))\n\t\t\t\t\t{\n\t\t\t\t\t\tcell = null;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tme.state = this.view.getState(cell);\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (me.state != null && me.state.shape != null)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tthis.container.style.cursor = me.state.shape.node.style.cursor;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (me.getState() == null && this.isEnabled())\n\t\t\t\t{\n\t\t\t\t\tthis.container.style.cursor = 'default';\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\treturn me;\n\t\t\t};\n\t\t\n\t\t\t// Context menu trigger implementation depending on current selection state\n\t\t\t// combined with support for normal popup trigger.\n\t\t\tvar cellSelected = false;\n\t\t\tvar selectionEmpty = false;\n\t\t\tvar menuShowing = false;\n\t\t\t\n\t\t\tvar oldFireMouseEvent = this.fireMouseEvent;\n\t\t\t\n\t\t\tthis.fireMouseEvent = function(evtName, me, sender)\n\t\t\t{\n\t\t\t\tif (evtName == mxEvent.MOUSE_DOWN)\n\t\t\t\t{\n\t\t\t\t\t// For hit detection on edges\n\t\t\t\t\tme = this.updateMouseEvent(me);\n\t\t\t\t\t\n\t\t\t\t\tcellSelected = this.isCellSelected(me.getCell());\n\t\t\t\t\tselectionEmpty = this.isSelectionEmpty();\n\t\t\t\t\tmenuShowing = this.popupMenuHandler.isMenuShowing();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\toldFireMouseEvent.apply(this, arguments);\n\t\t\t};\n\t\t\t\n\t\t\t// Shows popup menu if cell was selected or selection was empty and background was clicked\n\t\t\t// FIXME: Conflicts with mxPopupMenuHandler.prototype.getCellForPopupEvent in Editor.js by\n\t\t\t// selecting parent for selected children in groups before this check can be made.\n\t\t\tthis.popupMenuHandler.mouseUp = mxUtils.bind(this, function(sender, me)\n\t\t\t{\n\t\t\t\tvar isMouseEvent = mxEvent.isMouseEvent(me.getEvent());\n\t\t\t\tthis.popupMenuHandler.popupTrigger = !this.isEditing() && this.isEnabled() &&\n\t\t\t\t\t(me.getState() == null || !me.isSource(me.getState().control)) &&\n\t\t\t\t\t(this.popupMenuHandler.popupTrigger || (!menuShowing && !isMouseEvent &&\n\t\t\t\t\t((selectionEmpty && me.getCell() == null && this.isSelectionEmpty()) ||\n\t\t\t\t\t(cellSelected && this.isCellSelected(me.getCell())))));\n\n\t\t\t\t// Delays popup menu to allow for double tap to start editing\n\t\t\t\tvar popup = (!cellSelected || isMouseEvent) ? null : mxUtils.bind(this, function(cell)\n\t\t\t\t{\n\t\t\t\t\twindow.setTimeout(mxUtils.bind(this, function()\n\t\t\t\t\t{\n\t\t\t\t\t\tif (!this.isEditing())\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tvar origin = mxUtils.getScrollOrigin();\n\t\t\t\t\t\t\tthis.popupMenuHandler.popup(me.getX() + origin.x + 1,\n\t\t\t\t\t\t\t\tme.getY() + origin.y + 1, cell, me.getEvent());\n\t\t\t\t\t\t}\n\t\t\t\t\t}), 300);\n\t\t\t\t});\n\n\t\t\t\tmxPopupMenuHandler.prototype.mouseUp.apply(this.popupMenuHandler, [sender, me, popup]);\n\t\t\t});\n\t\t};\n\t\t\n\t\t/**\n\t\t * HTML in-place editor\n\t\t */\n\t\tmxCellEditor.prototype.isContentEditing = function()\n\t\t{\n\t\t\tvar state = this.graph.view.getState(this.editingCell);\n\t\t\t\n\t\t\treturn state != null && state.style['html'] == 1;\n\t\t};\n\n\t\t/**\n\t\t * Returns true if all selected text is inside a table element.\n\t\t */\n\t\tmxCellEditor.prototype.isTableSelected = function()\n\t\t{\n\t\t\treturn this.graph.getParentByName(\n\t\t\t\tthis.graph.getSelectedElement(),\n\t\t\t\t'TABLE', this.textarea) != null;\n\t\t};\n\t\t\n\t\t/**\n\t\t * Returns true if text is selected.\n\t\t */\n\t\tmxCellEditor.prototype.isTextSelected = function()\n\t\t{\n\t\t    var txt = '';\n\n\t\t    if (window.getSelection)\n\t\t\t{\n\t\t        txt = window.getSelection();\n\t\t    } \n\t\t\telse if (document.getSelection)\n\t\t\t{\n\t\t        txt = document.getSelection();\n\t\t    }\n\t\t\telse if (document.selection)\n\t\t\t{\n\t\t        txt = document.selection.createRange().text;\n\t\t    }\n\n\t\t\treturn txt != '';\n\t\t};\n\n\t\t/**\n\t\t * Inserts a tab at the cursor position.\n\t\t */\n\t\tmxCellEditor.prototype.insertTab = function(spaces)\n\t\t{\n\t\t\tvar editor = this.textarea;\n\t        var doc = editor.ownerDocument.defaultView;\n\t        var sel = doc.getSelection();\n\t        var range = sel.getRangeAt(0);\n\t\t\tvar tabNode = Graph.createTabNode(spaces);\n\t\t\trange.insertNode(tabNode);\n\t        range.setStartAfter(tabNode);\n\t        range.setEndAfter(tabNode); \n\t        sel.removeAllRanges();\n\t        sel.addRange(range);\n\t\t};\n\t\t\n\t\t/**\n\t\t * Sets the alignment of the current selected cell. This sets the\n\t\t * alignment in the cell style, removes all alignment within the\n\t\t * text and invokes the built-in alignment function.\n\t\t * \n\t\t * Only the built-in function is invoked if shift is pressed or\n\t\t * if table cells are selected and shift is not pressed.\n\t\t */\n\t\tmxCellEditor.prototype.alignText = function(align, evt)\n\t\t{\n\t\t\tvar shiftPressed = evt != null && mxEvent.isShiftDown(evt);\n\t\t\t\n\t\t\tif (shiftPressed || (window.getSelection != null && window.getSelection().containsNode != null))\n\t\t\t{\n\t\t\t\tvar allSelected = true;\n\t\t\t\t\n\t\t\t\tthis.graph.processElements(this.textarea, function(node)\n\t\t\t\t{\n\t\t\t\t\tif (shiftPressed || window.getSelection().containsNode(node, true))\n\t\t\t\t\t{\n\t\t\t\t\t\tnode.removeAttribute('align');\n\t\t\t\t\t\tnode.style.textAlign = null;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tallSelected = false;\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\t\n\t\t\t\tif (allSelected)\n\t\t\t\t{\n\t\t\t\t\tthis.graph.cellEditor.setAlign(align);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tdocument.execCommand('justify' + align.toLowerCase(), false, null);\n\t\t};\n\t\t\n\t\t/**\n\t\t * Creates the keyboard event handler for the current graph and history.\n\t\t */\n\t\tmxCellEditor.prototype.saveSelection = function()\n\t\t{\n\t\t    if (window.getSelection)\n\t\t    {\n\t\t        var sel = window.getSelection();\n\t\t        \n\t\t        if (sel.getRangeAt && sel.rangeCount)\n\t\t        {\n\t\t            var ranges = [];\n\t\t            \n\t\t            for (var i = 0, len = sel.rangeCount; i < len; ++i)\n\t\t            {\n\t\t                ranges.push(sel.getRangeAt(i));\n\t\t            }\n\t\t            \n\t\t            return ranges;\n\t\t        }\n\t\t    }\n\t\t    else if (document.selection && document.selection.createRange)\n\t\t    {\n\t\t        return document.selection.createRange();\n\t\t    }\n\t\t    \n\t\t    return null;\n\t\t};\n\t\n\t\t/**\n\t\t * Creates the keyboard event handler for the current graph and history.\n\t\t */\n\t\tmxCellEditor.prototype.restoreSelection = function(savedSel)\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\tif (savedSel)\n\t\t\t\t{\n\t\t\t\t\tif (window.getSelection)\n\t\t\t\t\t{\n\t\t\t\t\t\tsel = window.getSelection();\n\t\t\t\t\t\tsel.removeAllRanges();\n\t\t\n\t\t\t\t\t\tfor (var i = 0, len = savedSel.length; i < len; ++i)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tsel.addRange(savedSel[i]);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse if (document.selection && savedSel.select)\n\t\t\t\t\t{\n\t\t\t\t\t\tsavedSel.select();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tcatch (e)\n\t\t\t{\n\t\t\t\t// ignore\n\t\t\t}\n\t\t};\n\n\t\t/**\n\t\t * Handling of special nl2Br style for not converting newlines to breaks in HTML labels.\n\t\t * NOTE: Since it's easier to set this when the label is created we assume that it does\n\t\t * not change during the lifetime of the mxText instance.\n\t\t */\n\t\tvar mxCellRendererInitializeLabel = mxCellRenderer.prototype.initializeLabel;\n\t\tmxCellRenderer.prototype.initializeLabel = function(state)\n\t\t{\n\t\t\tif (state.text != null)\n\t\t\t{\n\t\t\t\tstate.text.replaceLinefeeds = mxUtils.getValue(state.style, 'nl2Br', '1') != '0';\n\t\t\t}\n\t\t\t\n\t\t\tmxCellRendererInitializeLabel.apply(this, arguments);\n\t\t};\n\t\n\t\tvar mxConstraintHandlerUpdate = mxConstraintHandler.prototype.update;\n\t\tmxConstraintHandler.prototype.update = function(me, source)\n\t\t{\n\t\t\tif (this.isKeepFocusEvent(me) || !mxEvent.isAltDown(me.getEvent()))\n\t\t\t{\n\t\t\t\tmxConstraintHandlerUpdate.apply(this, arguments);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tthis.reset();\n\t\t\t}\n\t\t};\n\t\n\t\t/**\n\t\t * No dashed shapes.\n\t\t */\n\t\tmxGuide.prototype.createGuideShape = function(horizontal)\n\t\t{\n\t\t\tvar guide = new mxPolyline([], mxConstants.GUIDE_COLOR, mxConstants.GUIDE_STROKEWIDTH);\n\t\t\t\n\t\t\treturn guide;\n\t\t};\n\t\t\n\t\t/**\n\t\t * HTML in-place editor\n\t\t */\n\t\tmxCellEditor.prototype.escapeCancelsEditing = false;\n\n\t\t/**\n\t\t * Overridden to set CSS classes.\n\t\t */\n\t\tvar mxCellEditorStartEditing = mxCellEditor.prototype.startEditing;\n\t\tmxCellEditor.prototype.startEditing = function(cell, trigger)\n\t\t{\n\t\t\tcell = this.graph.getStartEditingCell(cell, trigger);\n\n\t\t\tmxCellEditorStartEditing.apply(this, arguments);\n\t\t\t\n\t\t\t// Overrides class in case of HTML content to add\n\t\t\t// dashed borders for divs and table cells\n\t\t\tvar state = this.graph.view.getState(cell);\n\t\n\t\t\tif (state != null && state.style['html'] == 1)\n\t\t\t{\n\t\t\t\tthis.textarea.className = 'mxCellEditor geContentEditable';\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tthis.textarea.className = 'mxCellEditor mxPlainTextEditor';\n\t\t\t}\n\t\t\t\n\t\t\t// Toggles markup vs wysiwyg mode\n\t\t\tthis.codeViewMode = false;\n\t\t\t\n\t\t\t// Stores current selection range when switching between markup and code\n\t\t\tthis.switchSelectionState = null;\n\t\t\t\n\t\t\t// Selects editing cell\n\t\t\tthis.graph.setSelectionCell(cell);\n\n\t\t\t// Enables focus outline for edges and edge labels\n\t\t\tvar parent = this.graph.getModel().getParent(cell);\n\t\t\tvar geo = this.graph.getCellGeometry(cell);\n\t\t\t\n\t\t\tif ((this.graph.getModel().isEdge(parent) && geo != null && geo.relative) ||\n\t\t\t\tthis.graph.getModel().isEdge(cell))\n\t\t\t{\n\t\t\t\t// IE>8 and FF on Windows uses outline default of none\n\t\t\t\tif (mxClient.IS_IE || mxClient.IS_IE11 || (mxClient.IS_FF && mxClient.IS_WIN))\n\t\t\t\t{\n\t\t\t\t\tthis.textarea.style.outline = 'gray dotted 1px';\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tthis.textarea.style.outline = '';\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * HTML in-place editor\n\t\t */\n\t\tvar cellEditorInstallListeners = mxCellEditor.prototype.installListeners;\n\t\tmxCellEditor.prototype.installListeners = function(elt)\n\t\t{\n\t\t\tcellEditorInstallListeners.apply(this, arguments);\n\n\t\t\t// Adds a reference from the clone to the original node, recursively\n\t\t\tfunction reference(node, clone)\n\t\t\t{\n\t\t\t\tclone.originalNode = node;\n\t\t\t\t\n\t\t\t\tnode = node.firstChild;\n\t\t\t\tvar child = clone.firstChild;\n\t\t\t\t\n\t\t\t\twhile (node != null && child != null)\n\t\t\t\t{\n\t\t\t\t\treference(node, child);\n\t\t\t\t\tnode = node.nextSibling;\n\t\t\t\t\tchild = child.nextSibling;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\treturn clone;\n\t\t\t};\n\t\t\t\n\t\t\t// Checks the given node for new nodes, recursively\n\t\t\tfunction checkNode(node, clone)\n\t\t\t{\n\t\t\t\tif (node != null)\n\t\t\t\t{\n\t\t\t\t\tif (clone.originalNode != node)\n\t\t\t\t\t{\n\t\t\t\t\t\tcleanNode(node);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tnode = node.firstChild;\n\t\t\t\t\t\tclone = clone.firstChild;\n\t\t\t\t\t\t\n\t\t\t\t\t\twhile (node != null)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tvar nextNode = node.nextSibling;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif (clone == null)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tcleanNode(node);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tcheckNode(node, clone);\n\t\t\t\t\t\t\t\tclone = clone.nextSibling;\n\t\t\t\t\t\t\t}\n\t\n\t\t\t\t\t\t\tnode = nextNode;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t};\n\n\t\t\t// Removes unused DOM nodes and attributes, recursively\n\t\t\tfunction cleanNode(node)\n\t\t\t{\n\t\t\t\tvar child = node.firstChild;\n\t\t\t\t\n\t\t\t\twhile (child != null)\n\t\t\t\t{\n\t\t\t\t\tvar next = child.nextSibling;\n\t\t\t\t\tcleanNode(child);\n\t\t\t\t\tchild = next;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif ((node.nodeType != 1 || (node.nodeName !== 'BR' && node.firstChild == null)) &&\n\t\t\t\t\t(node.nodeType != 3 || mxUtils.trim(mxUtils.getTextContent(node)).length == 0))\n\t\t\t\t{\n\t\t\t\t\tnode.parentNode.removeChild(node);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t// Removes linefeeds\n\t\t\t\t\tif (node.nodeType == 3)\n\t\t\t\t\t{\n\t\t\t\t\t\tmxUtils.setTextContent(node, mxUtils.getTextContent(node).replace(/\\n|\\r/g, ''));\n\t\t\t\t\t}\n\n\t\t\t\t\t// Removes CSS classes and styles (for Word and Excel)\n\t\t\t\t\tif (node.nodeType == 1)\n\t\t\t\t\t{\n\t\t\t\t\t\tnode.removeAttribute('style');\n\t\t\t\t\t\tnode.removeAttribute('class');\n\t\t\t\t\t\tnode.removeAttribute('width');\n\t\t\t\t\t\tnode.removeAttribute('cellpadding');\n\t\t\t\t\t\tnode.removeAttribute('cellspacing');\n\t\t\t\t\t\tnode.removeAttribute('border');\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t};\n\t\t\t\n\t\t\t// Handles paste from Word, Excel etc by removing styles, classnames and unused nodes\n\t\t\t// LATER: Fix undo/redo for paste\n\t\t\tif (document.documentMode !== 7 && document.documentMode !== 8)\n\t\t\t{\n\t\t\t\tmxEvent.addListener(this.textarea, 'paste', mxUtils.bind(this, function(evt)\n\t\t\t\t{\n\t\t\t\t\tvar clone = reference(this.textarea, this.textarea.cloneNode(true));\n\t\n\t\t\t\t\twindow.setTimeout(mxUtils.bind(this, function()\n\t\t\t\t\t{\n\t\t\t\t\t\tif (this.textarea != null)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t// Paste from Word or Excel\n\t\t\t\t\t\t\tif (this.textarea.innerHTML.indexOf('<o:OfficeDocumentSettings>') >= 0 ||\n\t\t\t\t\t\t\t\tthis.textarea.innerHTML.indexOf('<!--[if !mso]>') >= 0)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tcheckNode(this.textarea, clone);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tGraph.removePasteFormatting(this.textarea.firstChild);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}), 0);\n\t\t\t\t}));\n\t\t\t}\n\t\t};\n\t\t\n\t\tmxCellEditor.prototype.toggleViewMode = function()\n\t\t{\n\t\t\tvar state = this.graph.view.getState(this.editingCell);\n\t\t\t\n\t\t\tif (state != null)\n\t\t\t{\n\t\t\t\tvar nl2Br = state != null && mxUtils.getValue(state.style, 'nl2Br', '1') != '0';\n\t\t\t\tvar tmp = this.saveSelection();\n\t\t\t\t\n\t\t\t\tif (!this.codeViewMode)\n\t\t\t\t{\n\t\t\t\t\t// Clears the initial empty label on the first keystroke\n\t\t\t\t\tif (this.clearOnChange && this.textarea.innerHTML == this.getEmptyLabelText())\n\t\t\t\t\t{\n\t\t\t\t\t\tthis.clearOnChange = false;\n\t\t\t\t\t\tthis.textarea.innerText = '';\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// Removes newlines from HTML and converts breaks to newlines\n\t\t\t\t\t// to match the HTML output in plain text\n\t\t\t\t\tvar content = mxUtils.htmlEntities(this.textarea.innerHTML);\n\t\t\n\t\t\t\t    // Workaround for trailing line breaks being ignored in the editor\n\t\t\t\t\tif (document.documentMode != 8)\n\t\t\t\t\t{\n\t\t\t\t\t\tcontent = mxUtils.replaceTrailingNewlines(content, '<div><br></div>');\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t    content = Graph.sanitizeHtml((nl2Br) ? content.replace(/\\n/g, '').\n\t\t\t\t\t\treplace(/&lt;br\\s*.?&gt;/g, '<br>') : content, true);\n\t\t\t\t\tthis.textarea.className = 'mxCellEditor mxPlainTextEditor';\n\t\t\t\t\t\n\t\t\t\t\tvar size = mxConstants.DEFAULT_FONTSIZE;\n\t\t\t\t\t\n\t\t\t\t\tthis.textarea.style.lineHeight = (mxConstants.ABSOLUTE_LINE_HEIGHT) ?\n\t\t\t\t\t\tMath.round(size * mxConstants.LINE_HEIGHT) + 'px' : mxConstants.LINE_HEIGHT;\n\t\t\t\t\tthis.textarea.style.fontSize = Math.round(size) + 'px';\n\t\t\t\t\tthis.textarea.style.textDecoration = '';\n\t\t\t\t\tthis.textarea.style.fontWeight = 'normal';\n\t\t\t\t\tthis.textarea.style.fontStyle = '';\n\t\t\t\t\tthis.textarea.style.fontFamily = mxConstants.DEFAULT_FONTFAMILY;\n\t\t\t\t\tthis.textarea.style.textAlign = 'left';\n\t\t\t\t\tthis.textarea.style.width = '';\n\t\t\t\t\t\n\t\t\t\t\t// Adds padding to make cursor visible with borders\n\t\t\t\t\tthis.textarea.style.padding = '2px';\n\t\t\t\t\t\n\t\t\t\t\tif (this.textarea.innerHTML != content)\n\t\t\t\t\t{\n\t\t\t\t\t\tthis.textarea.innerHTML = content;\n\t\t\t\t\t}\n\t\t\n\t\t\t\t\tthis.codeViewMode = true;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tvar content = mxUtils.extractTextWithWhitespace(this.textarea.childNodes);\n\t\t\t\t    \n\t\t\t\t\t// Strips trailing line break\n\t\t\t\t    if (content.length > 0 && content.charAt(content.length - 1) == '\\n')\n\t\t\t\t    {\n\t\t\t\t    \tcontent = content.substring(0, content.length - 1);\n\t\t\t\t    }\n\t\t\t\t    \n\t\t\t\t\tcontent = Graph.sanitizeHtml((nl2Br) ? content.replace(/\\n/g, '<br/>') : content, true)\n\t\t\t\t\tthis.textarea.className = 'mxCellEditor geContentEditable';\n\t\t\t\t\t\n\t\t\t\t\tvar size = mxUtils.getValue(state.style, mxConstants.STYLE_FONTSIZE, mxConstants.DEFAULT_FONTSIZE);\n\t\t\t\t\tvar family = mxUtils.getValue(state.style, mxConstants.STYLE_FONTFAMILY, mxConstants.DEFAULT_FONTFAMILY);\n\t\t\t\t\tvar align = mxUtils.getValue(state.style, mxConstants.STYLE_ALIGN, mxConstants.ALIGN_LEFT);\n\t\t\t\t\tvar bold = (mxUtils.getValue(state.style, mxConstants.STYLE_FONTSTYLE, 0) &\n\t\t\t\t\t\t\tmxConstants.FONT_BOLD) == mxConstants.FONT_BOLD;\n\t\t\t\t\tvar italic = (mxUtils.getValue(state.style, mxConstants.STYLE_FONTSTYLE, 0) &\n\t\t\t\t\t\t\tmxConstants.FONT_ITALIC) == mxConstants.FONT_ITALIC;\n\t\t\t\t\tvar txtDecor = [];\n\t\t\t\t\t\n\t\t\t\t\tif ((mxUtils.getValue(state.style, mxConstants.STYLE_FONTSTYLE, 0) &\n\t\t\t\t\t\t\tmxConstants.FONT_UNDERLINE) == mxConstants.FONT_UNDERLINE)\n\t\t\t\t\t{\n\t\t\t\t\t\ttxtDecor.push('underline');\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif ((mxUtils.getValue(state.style, mxConstants.STYLE_FONTSTYLE, 0) &\n\t\t\t\t\t\t\tmxConstants.FONT_STRIKETHROUGH) == mxConstants.FONT_STRIKETHROUGH)\n\t\t\t\t\t{\n\t\t\t\t\t\ttxtDecor.push('line-through');\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tthis.textarea.style.lineHeight = (mxConstants.ABSOLUTE_LINE_HEIGHT) ? Math.round(size * mxConstants.LINE_HEIGHT) + 'px' : mxConstants.LINE_HEIGHT;\n\t\t\t\t\tthis.textarea.style.fontSize = Math.round(size) + 'px';\n\t\t\t\t\tthis.textarea.style.textDecoration = txtDecor.join(' ');\n\t\t\t\t\tthis.textarea.style.fontWeight = (bold) ? 'bold' : 'normal';\n\t\t\t\t\tthis.textarea.style.fontStyle = (italic) ? 'italic' : '';\n\t\t\t\t\tthis.textarea.style.fontFamily = family;\n\t\t\t\t\tthis.textarea.style.textAlign = align;\n\t\t\t\t\tthis.textarea.style.padding = '0px';\n\t\t\t\t\t\n\t\t\t\t\tif (this.textarea.innerHTML != content)\n\t\t\t\t\t{\n\t\t\t\t\t\tthis.textarea.innerHTML = content;\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (this.textarea.innerHTML.length == 0)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tthis.textarea.innerHTML = this.getEmptyLabelText();\n\t\t\t\t\t\t\tthis.clearOnChange = this.textarea.innerHTML.length > 0;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\n\t\t\t\t\tthis.codeViewMode = false;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tthis.textarea.focus();\n\t\t\t\n\t\t\t\tif (this.switchSelectionState != null)\n\t\t\t\t{\n\t\t\t\t\tthis.restoreSelection(this.switchSelectionState);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tthis.switchSelectionState = tmp;\n\t\t\t\tthis.resize();\n\t\t\t}\n\t\t};\n\t\t\n\t\tvar mxCellEditorResize = mxCellEditor.prototype.resize;\n\t\tmxCellEditor.prototype.resize = function(state, trigger)\n\t\t{\n\t\t\tif (this.textarea != null)\n\t\t\t{\n\t\t\t\tvar state = this.graph.getView().getState(this.editingCell);\n\t\t\t\t\n\t\t\t\tif (this.codeViewMode && state != null)\n\t\t\t\t{\n\t\t\t\t\tvar scale = state.view.scale;\n\t\t\t\t\tthis.bounds = mxRectangle.fromRectangle(state);\n\t\t\t\t\t\n\t\t\t\t\t// General placement of code editor if cell has no size\n\t\t\t\t\t// LATER: Fix HTML editor bounds for edge labels\n\t\t\t\t\tif (this.bounds.width == 0 && this.bounds.height == 0)\n\t\t\t\t\t{\n\t\t\t\t\t\tthis.bounds.width = 160 * scale;\n\t\t\t\t\t\tthis.bounds.height = 60 * scale;\n\t\t\t\t\t\t\n\t\t\t\t\t\tvar m = (state.text != null) ? state.text.margin : null;\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (m == null)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tm = mxUtils.getAlignmentAsPoint(mxUtils.getValue(state.style, mxConstants.STYLE_ALIGN, mxConstants.ALIGN_CENTER),\n\t\t\t\t\t\t\t\t\tmxUtils.getValue(state.style, mxConstants.STYLE_VERTICAL_ALIGN, mxConstants.ALIGN_MIDDLE));\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tthis.bounds.x += m.x * this.bounds.width;\n\t\t\t\t\t\tthis.bounds.y += m.y * this.bounds.height;\n\t\t\t\t\t}\n\t\t\n\t\t\t\t\tthis.textarea.style.width = Math.round((this.bounds.width - 4) / scale) + 'px';\n\t\t\t\t\tthis.textarea.style.height = Math.round((this.bounds.height - 4) / scale) + 'px';\n\t\t\t\t\tthis.textarea.style.overflow = 'auto';\n\t\t\n\t\t\t\t\t// Adds scrollbar offset if visible\n\t\t\t\t\tif (this.textarea.clientHeight < this.textarea.offsetHeight)\n\t\t\t\t\t{\n\t\t\t\t\t\tthis.textarea.style.height = Math.round((this.bounds.height / scale)) + (this.textarea.offsetHeight - this.textarea.clientHeight) + 'px';\n\t\t\t\t\t\tthis.bounds.height = parseInt(this.textarea.style.height) * scale;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif (this.textarea.clientWidth < this.textarea.offsetWidth)\n\t\t\t\t\t{\n\t\t\t\t\t\tthis.textarea.style.width = Math.round((this.bounds.width / scale)) + (this.textarea.offsetWidth - this.textarea.clientWidth) + 'px';\n\t\t\t\t\t\tthis.bounds.width = parseInt(this.textarea.style.width) * scale;\n\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\tthis.textarea.style.left = Math.round(this.bounds.x) + 'px';\n\t\t\t\t\tthis.textarea.style.top = Math.round(this.bounds.y) + 'px';\n\t\t\n\t\t\t\t\tmxUtils.setPrefixedStyle(this.textarea.style, 'transform', 'scale(' + scale + ',' + scale + ')');\t\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tthis.textarea.style.height = '';\n\t\t\t\t\tthis.textarea.style.overflow = '';\n\t\t\t\t\tmxCellEditorResize.apply(this, arguments);\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\t\n\t\tmxCellEditorGetInitialValue = mxCellEditor.prototype.getInitialValue;\n\t\tmxCellEditor.prototype.getInitialValue = function(state, trigger)\n\t\t{\n\t\t\tif (mxUtils.getValue(state.style, 'html', '0') == '0')\n\t\t\t{\n\t\t\t\treturn mxCellEditorGetInitialValue.apply(this, arguments);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tvar result = this.graph.getEditingValue(state.cell, trigger)\n\t\t\t\n\t\t\t\tif (mxUtils.getValue(state.style, 'nl2Br', '1') == '1')\n\t\t\t\t{\n\t\t\t\t\tresult = result.replace(/\\n/g, '<br/>');\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tresult = Graph.sanitizeHtml(result, true);\n\t\t\t\t\n\t\t\t\treturn result;\n\t\t\t}\n\t\t};\n\t\t\n\t\tmxCellEditorGetCurrentValue = mxCellEditor.prototype.getCurrentValue;\n\t\tmxCellEditor.prototype.getCurrentValue = function(state)\n\t\t{\n\t\t\tif (mxUtils.getValue(state.style, 'html', '0') == '0')\n\t\t\t{\n\t\t\t\treturn mxCellEditorGetCurrentValue.apply(this, arguments);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tvar result = Graph.sanitizeHtml(this.textarea.innerHTML, true);\n\t\n\t\t\t\tif (mxUtils.getValue(state.style, 'nl2Br', '1') == '1')\n\t\t\t\t{\n\t\t\t\t\tresult = result.replace(/\\r\\n/g, '<br/>').replace(/\\n/g, '<br/>');\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tresult = result.replace(/\\r\\n/g, '').replace(/\\n/g, '');\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\treturn result;\n\t\t\t}\n\t\t};\n\t\n\t\tvar mxCellEditorStopEditing = mxCellEditor.prototype.stopEditing;\n\t\tmxCellEditor.prototype.stopEditing = function(cancel)\n\t\t{\n\t\t\t// Restores default view mode before applying value\n\t\t\tif (this.codeViewMode)\n\t\t\t{\n\t\t\t\tthis.toggleViewMode();\n\t\t\t}\n\t\t\t\n\t\t\tmxCellEditorStopEditing.apply(this, arguments);\n\t\t\t\n\t\t\t// Tries to move focus back to container after editing if possible\n\t\t\tthis.focusContainer();\n\t\t};\n\t\t\n\t\tmxCellEditor.prototype.focusContainer = function()\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\tthis.graph.container.focus();\n\t\t\t}\n\t\t\tcatch (e)\n\t\t\t{\n\t\t\t\t// ignore\n\t\t\t}\n\t\t};\n\t\n\t\tvar mxCellEditorApplyValue = mxCellEditor.prototype.applyValue;\n\t\tmxCellEditor.prototype.applyValue = function(state, value)\n\t\t{\n\t\t\t// Removes empty relative child labels in edges\n\t\t\tthis.graph.getModel().beginUpdate();\n\t\t\t\n\t\t\ttry\n\t\t\t{\n\t\t\t\tmxCellEditorApplyValue.apply(this, arguments);\n\t\t\t\t\n\t\t\t\tif (value == '' && this.graph.isCellDeletable(state.cell) &&\n\t\t\t\t\tthis.graph.model.getChildCount(state.cell) == 0 &&\n\t\t\t\t\tthis.graph.isTransparentState(state))\n\t\t\t\t{\n\t\t\t\t\tthis.graph.removeCells([state.cell], false);\n\t\t\t\t}\n\t\t\t}\n\t\t\tfinally\n\t\t\t{\n\t\t\t\tthis.graph.getModel().endUpdate();\n\t\t\t}\n\t\t};\n\t\t\n\t\t/**\n\t\t * Returns the background color to be used for the editing box. This returns\n\t\t * the label background for edge labels and null for all other cases.\n\t\t */\n\t\tmxCellEditor.prototype.getBackgroundColor = function(state)\n\t\t{\n\t\t\tvar color = mxUtils.getValue(state.style, mxConstants.STYLE_LABEL_BACKGROUNDCOLOR, null);\n\n\t\t\tif ((color == null || color == mxConstants.NONE) &&\n\t\t\t\t(state.cell.geometry != null && state.cell.geometry.width > 0) &&\n\t\t\t\t(mxUtils.getValue(state.style, mxConstants.STYLE_ROTATION, 0) != 0 ||\n\t\t\t\tmxUtils.getValue(state.style, mxConstants.STYLE_HORIZONTAL, 1) == 0))\n\t\t\t{\n\t\t\t\tcolor = mxUtils.getValue(state.style, mxConstants.STYLE_FILLCOLOR, null);\n\t\t\t}\n\n\t\t\tif (color == mxConstants.NONE)\n\t\t\t{\n\t\t\t\tcolor = null;\n\t\t\t}\n\t\t\t\n\t\t\treturn color;\n\t\t};\n\t\t\t\t\n\t\t/**\n\t\t * Returns the border color to be used for the editing box. This returns\n\t\t * the label border for edge labels and null for all other cases.\n\t\t */\n\t\tmxCellEditor.prototype.getBorderColor = function(state)\n\t\t{\n\t\t\tvar color = mxUtils.getValue(state.style, mxConstants.STYLE_LABEL_BORDERCOLOR, null);\n\n\t\t\tif ((color == null || color == mxConstants.NONE) &&\n\t\t\t\t(state.cell.geometry != null && state.cell.geometry.width > 0) &&\n\t\t\t\t(mxUtils.getValue(state.style, mxConstants.STYLE_ROTATION, 0) != 0 ||\n\t\t\t\tmxUtils.getValue(state.style, mxConstants.STYLE_HORIZONTAL, 1) == 0))\n\t\t\t{\n\t\t\t\tcolor = mxUtils.getValue(state.style, mxConstants.STYLE_STROKECOLOR, null);\n\t\t\t}\n\n\t\t\tif (color == mxConstants.NONE)\n\t\t\t{\n\t\t\t\tcolor = null;\n\t\t\t}\n\t\t\t\n\t\t\treturn color;\n\t\t};\n\t\t\n\t\t/**\n\t\t * Returns the minimum editing size.\n\t\t */\n\t\tmxCellEditor.prototype.getMinimumSize = function(state)\n\t\t{\n\t\t\tvar scale = this.graph.getView().scale;\n\t\t\t\n\t\t\treturn new mxRectangle(0, 0, (state.text == null) ? 30 :  state.text.size * scale + 20, 30);\n\t\t};\n\t\t\n\t\t/**\n\t\t * Hold Alt to ignore drop target.\n\t\t */\n\t\tmxGraphHandlerIsValidDropTarget = mxGraphHandler.prototype.isValidDropTarget;\n\t\tmxGraphHandler.prototype.isValidDropTarget = function(target, me)\n\t\t{\n\t\t\treturn mxGraphHandlerIsValidDropTarget.apply(this, arguments) &&\n\t\t\t\t!mxEvent.isAltDown(me.getEvent);\n\t\t};\n\n\t\t/**\n\t\t * Hints on handlers\n\t\t */\n\t\tfunction createHint()\n\t\t{\n\t\t\tvar hint = document.createElement('div');\n\t\t\thint.className = 'geHint';\n\t\t\thint.style.whiteSpace = 'nowrap';\n\t\t\thint.style.position = 'absolute';\n\t\t\t\n\t\t\treturn hint;\n\t\t};\n\t\t\n\t\t/**\n\t\t * Format pixels in the given unit\n\t\t */\n\t\tfunction formatHintText(pixels, unit) \n\t\t{\n\t\t    switch(unit) \n\t\t    {\n\t\t        case mxConstants.POINTS:\n\t\t            return pixels;\n\t\t        case mxConstants.MILLIMETERS:\n\t\t            return (pixels / mxConstants.PIXELS_PER_MM).toFixed(1);\n\t\t\t\tcase mxConstants.METERS:\n            \t\treturn (pixels / (mxConstants.PIXELS_PER_MM * 1000)).toFixed(4);\n\t\t        case mxConstants.INCHES:\n\t\t            return (pixels / mxConstants.PIXELS_PER_INCH).toFixed(2);\n\t\t    }\n\t\t};\n\t\t\n\t\t\n\t\tmxGraphView.prototype.formatUnitText = function(pixels) \n\t\t{\n\t\t\treturn pixels? formatHintText(pixels, this.unit) : pixels;\n\t\t};\n\t\t\n\t\t/**\n\t\t * Updates the hint for the current operation.\n\t\t */\n\t\tmxGraphHandler.prototype.updateHint = function(me)\n\t\t{\n\t\t\tif (this.pBounds != null && (this.shape != null || this.livePreviewActive))\n\t\t\t{\n\t\t\t\tif (this.hint == null)\n\t\t\t\t{\n\t\t\t\t\tthis.hint = createHint();\n\t\t\t\t\tthis.graph.container.appendChild(this.hint);\n\t\t\t\t}\n\t\n\t\t\t\tvar t = this.graph.view.translate;\n\t\t\t\tvar s = this.graph.view.scale;\n\t\t\t\tvar x = this.roundLength((this.bounds.x + this.currentDx) / s - t.x);\n\t\t\t\tvar y = this.roundLength((this.bounds.y + this.currentDy) / s - t.y);\n\t\t\t\tvar unit = this.graph.view.unit;\n\t\t\t\t\n\t\t\t\tthis.hint.innerHTML = formatHintText(x, unit) + ', ' + formatHintText(y, unit);\n\t\t\t\t\n\t\t\t\tthis.hint.style.left = (this.pBounds.x + this.currentDx +\n\t\t\t\t\tMath.round((this.pBounds.width - this.hint.clientWidth) / 2)) + 'px';\n\t\t\t\tthis.hint.style.top = (this.pBounds.y + this.currentDy +\n\t\t\t\t\tthis.pBounds.height + Editor.hintOffset) + 'px';\n\t\t\t}\n\t\t};\n\t\n\t\t/**\n\t\t * Updates the hint for the current operation.\n\t\t */\n\t\tmxGraphHandler.prototype.removeHint = function()\n\t\t{\n\t\t\tif (this.hint != null)\n\t\t\t{\n\t\t\t\tthis.hint.parentNode.removeChild(this.hint);\n\t\t\t\tthis.hint = null;\n\t\t\t}\n\t\t};\n\t\t\t\t\t\t\t\t\n\t\t/**\n\t\t * Overridden to allow for shrinking pools when lanes are resized.\n\t\t */\n\t\tvar stackLayoutResizeCell = mxStackLayout.prototype.resizeCell;\n\t\tmxStackLayout.prototype.resizeCell = function(cell, bounds)\n\t\t{\n\t\t\tstackLayoutResizeCell.apply(this, arguments);\n\t\t\tvar style = this.graph.getCellStyle(cell);\n\t\t\t\t\n\t\t\tif (style['childLayout'] == null)\n\t\t\t{\n\t\t\t\tvar parent = this.graph.model.getParent(cell);\n\t\t\t\tvar geo = (parent != null) ? this.graph.getCellGeometry(parent) : null;\n\t\t\t\n\t\t\t\tif (geo != null)\n\t\t\t\t{\n\t\t\t\t\tstyle = this.graph.getCellStyle(parent);\n\t\t\t\t\t\n\t\t\t\t\tif (style['childLayout'] == 'stackLayout')\n\t\t\t\t\t{\n\t\t\t\t\t\tvar border = parseFloat(mxUtils.getValue(style, 'stackBorder', mxStackLayout.prototype.border));\n\t\t\t\t\t\tvar horizontal = mxUtils.getValue(style, 'horizontalStack', '1') == '1';\n\t\t\t\t\t\tvar start = this.graph.getActualStartSize(parent);\n\t\t\t\t\t\tgeo = geo.clone();\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (horizontal)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tgeo.height = bounds.height + start.y + start.height + 2 * border;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tgeo.width = bounds.width + start.x + start.width + 2 * border;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tthis.graph.model.setGeometry(parent, geo);\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\t/**\n\t\t * Shows handle for table instead of rows and cells.\n\t\t */\n\t\tvar selectionCellsHandlerGetHandledSelectionCells = mxSelectionCellsHandler.prototype.getHandledSelectionCells;\n\t\tmxSelectionCellsHandler.prototype.getHandledSelectionCells = function()\n\t\t{\n\t\t\tvar cells = selectionCellsHandlerGetHandledSelectionCells.apply(this, arguments);\n\t\t\tvar dict = new mxDictionary();\n\t\t\tvar model = this.graph.model;\n\t\t\tvar result = [];\n\t\t\t\n\t\t\tfunction addCell(cell)\n\t\t\t{\n\t\t\t\tif (!dict.get(cell))\n\t\t\t\t{\n\t\t\t\t\tdict.put(cell, true);\n\t\t\t\t\tresult.push(cell);\n\t\t\t\t}\n\t\t\t};\n\t\t\t\n\t\t\tfor (var i = 0; i < cells.length; i++)\n\t\t\t{\n\t\t\t\tvar cell = cells[i];\n\t\t\t\t\n\t\t\t\tif (this.graph.isTableCell(cell))\n\t\t\t\t{\n\t\t\t\t\taddCell(model.getParent(model.getParent(cell)));\n\t\t\t\t}\n\t\t\t\telse if (this.graph.isTableRow(cell))\n\t\t\t\t{\n\t\t\t\t\taddCell(model.getParent(cell));\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\taddCell(cell);\n\t\t\t}\n\t\t\t\n\t\t\treturn result;\n\t\t};\n\n\t\t/**\n\t\t * Disables starting new connections if control is pressed.\n\t\t */\n\t\tvar connectionHandlerIsStartEvent = mxConnectionHandler.prototype.isStartEvent;\n\t\tmxConnectionHandler.prototype.isStartEvent = function(me)\n\t\t{\n\t\t\treturn connectionHandlerIsStartEvent.apply(this, arguments) &&\n\t\t\t\t!mxEvent.isControlDown(me.getEvent()) &&\n\t\t\t\t!mxEvent.isShiftDown(me.getEvent());\n\t\t};\n\t\t\n\t\t/**\n\t\t * Forces preview for title size in tables, table rows, table cells and swimlanes.\n\t\t */\n\t\tvar vertexHandlerIsGhostPreview = mxVertexHandler.prototype.isGhostPreview;\n\t\tmxVertexHandler.prototype.isGhostPreview = function()\n\t\t{\n\t\t\treturn vertexHandlerIsGhostPreview.apply(this, arguments) && !this.graph.isTable(this.state.cell) &&\n\t\t\t\t!this.graph.isTableRow(this.state.cell) && !this.graph.isTableCell(this.state.cell) &&\n\t\t\t\t!this.graph.isSwimlane(this.state.cell);\n\t\t};\n\n\t\t/**\n\t\t * Creates the shape used to draw the selection border.\n\t\t */\n\t\tvar vertexHandlerCreateParentHighlightShape = mxVertexHandler.prototype.createParentHighlightShape;\n\t\tmxVertexHandler.prototype.createParentHighlightShape = function(bounds)\n\t\t{\n\t\t\tvar shape = vertexHandlerCreateParentHighlightShape.apply(this, arguments);\n\t\t\t\n\t\t\tshape.stroke = '#C0C0C0';\n\t\t\tshape.strokewidth = 1;\n\t\t\t\n\t\t\treturn shape;\n\t\t};\n\t\t\n\t\t/**\n\t\t * Creates the shape used to draw the selection border.\n\t\t */\n\t\tvar edgeHandlerCreateParentHighlightShape = mxEdgeHandler.prototype.createParentHighlightShape;\n\t\tmxEdgeHandler.prototype.createParentHighlightShape = function(bounds)\n\t\t{\n\t\t\tvar shape = edgeHandlerCreateParentHighlightShape.apply(this, arguments);\n\t\t\t\n\t\t\tshape.stroke = '#C0C0C0';\n\t\t\tshape.strokewidth = 1;\n\t\t\t\n\t\t\treturn shape;\n\t\t};\n\n\t\t/**\n\t\t * Moves rotation handle to top, right corner.\n\t\t */\n\t\tmxVertexHandler.prototype.rotationHandleVSpacing = -12;\n\t\tmxVertexHandler.prototype.getRotationHandlePosition = function()\n\t\t{\n\t\t\tvar padding = this.getHandlePadding();\n\t\t\t\n\t\t\treturn new mxPoint(this.bounds.x + this.bounds.width - this.rotationHandleVSpacing + padding.x / 2,\n\t\t\t\tthis.bounds.y + this.rotationHandleVSpacing - padding.y / 2)\n\t\t};\n\t\n\t\t/**\n\t\t * Enables recursive resize for groups.\n\t\t */\n\t\tmxVertexHandler.prototype.isRecursiveResize = function(state, me)\n\t\t{\n\t\t\treturn this.graph.isRecursiveVertexResize(state) &&\n\t\t\t\t!mxEvent.isAltDown(me.getEvent());\n\t\t};\n\t\t\n\t\t/**\n\t\t * Enables centered resize events.\n\t\t */\n\t\tmxVertexHandler.prototype.isCenteredEvent = function(state, me)\n\t\t{\n\t\t\treturn mxEvent.isControlDown(me.getEvent()) ||\n\t\t\t\tmxEvent.isMetaDown(me.getEvent());\n\t\t};\n\n\t\t/**\n\t\t * Hides rotation handle for table cells and rows.\n\t\t */\n\t\tvar vertexHandlerIsRotationHandleVisible = mxVertexHandler.prototype.isRotationHandleVisible;\n\t\tmxVertexHandler.prototype.isRotationHandleVisible = function()\n\t\t{\n\t\t\treturn vertexHandlerIsRotationHandleVisible.apply(this, arguments)  &&\n\t\t\t\t!this.graph.isTableCell(this.state.cell) &&\n\t\t\t\t!this.graph.isTableRow(this.state.cell) &&\n\t\t\t\t!this.graph.isTable(this.state.cell);\n\t\t};\n\t\t\n\t\t/**\n\t\t * Hides rotation handle for table cells and rows.\n\t\t */\n\t\tmxVertexHandler.prototype.getSizerBounds = function()\n\t\t{\n\t\t\tif (this.graph.isTableCell(this.state.cell))\n\t\t\t{\n\t\t\t\treturn this.graph.view.getState(this.graph.model.getParent(this.graph.model.getParent(this.state.cell)));\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn this.bounds;\n\t\t\t}\n\t\t};\n\n\t\t/**\n\t\t * Hides rotation handle for table cells and rows.\n\t\t */\n\t\tvar vertexHandlerIsParentHighlightVisible = mxVertexHandler.prototype.isParentHighlightVisible;\n\t\tmxVertexHandler.prototype.isParentHighlightVisible = function()\n\t\t{\n\t\t\treturn vertexHandlerIsParentHighlightVisible.apply(this, arguments) &&\n\t\t\t\t!this.graph.isTableCell(this.state.cell) &&\n\t\t\t\t!this.graph.isTableRow(this.state.cell);\n\t\t};\n\t\t\n\t\t/**\n\t\t * Hides rotation handle for table cells and rows.\n\t\t */\n\t\tvar vertexHandlerIsCustomHandleVisible = mxVertexHandler.prototype.isCustomHandleVisible;\n\t\tmxVertexHandler.prototype.isCustomHandleVisible = function(handle)\n\t\t{\n\t\t\treturn handle.tableHandle ||\n\t\t\t\t(vertexHandlerIsCustomHandleVisible.apply(this, arguments) &&\n\t\t\t\t(!this.graph.isTable(this.state.cell) ||\n\t\t\t\tthis.graph.isCellSelected(this.state.cell)));\n\t\t};\n\t\t\t\t\n\t\t/**\n\t\t * Adds selection border inset for table cells and rows.\n\t\t */\n\t\tmxVertexHandler.prototype.getSelectionBorderInset = function()\n\t\t{\n\t\t\tvar result = 0;\n\t\t\t\n\t\t\tif (this.graph.isTableRow(this.state.cell))\n\t\t\t{\n\t\t\t\tresult = 1;\n\t\t\t}\n\t\t\telse if (this.graph.isTableCell(this.state.cell))\n\t\t\t{\n\t\t\t\tresult = 2;\n\t\t\t}\n\t\t\t\n\t\t\treturn result;\n\t\t};\n\t\t\n\t\t/**\n\t\t * Adds custom handles for table cells.\n\t\t */\n\t\tvar vertexHandlerGetSelectionBorderBounds = mxVertexHandler.prototype.getSelectionBorderBounds;\n\t\tmxVertexHandler.prototype.getSelectionBorderBounds = function()\n\t\t{\n\t\t\treturn vertexHandlerGetSelectionBorderBounds.apply(this, arguments).grow(\n\t\t\t\t\t-this.getSelectionBorderInset());\n\t\t};\n\t\t\n\t\tvar TableLineShape = null;\n\n\t\t/**\n\t\t * Adds custom handles for table cells.\n\t\t */\n\t\tvar vertexHandlerCreateCustomHandles = mxVertexHandler.prototype.createCustomHandles;\n\t\tmxVertexHandler.prototype.createCustomHandles = function()\n\t\t{\n\t\t\t// Lazy lookup for shape constructor\n\t\t\tif (TableLineShape == null)\n\t\t\t{\n\t\t\t\tTableLineShape = mxCellRenderer.defaultShapes['tableLine'];\n\t\t\t}\n\n\t\t\tvar handles = vertexHandlerCreateCustomHandles.apply(this, arguments);\n\t\t\t\n\t\t\tif (this.graph.isTable(this.state.cell) && this.graph.isCellMovable(this.state.cell))\n\t\t\t{\n\t\t\t\tvar self = this;\n\t\t\t\tvar graph = this.graph;\n\t\t\t\tvar model = graph.model;\n\t\t\t\tvar s = graph.view.scale;\n\t\t\t\tvar tableState = this.state;\n\t\t\t\tvar sel = this.selectionBorder;\n\t\t\t\tvar x0 = this.state.origin.x + graph.view.translate.x;\n\t\t\t\tvar y0 = this.state.origin.y + graph.view.translate.y;\n\t\t\t\t\n\t\t\t\tif (handles == null)\n\t\t\t\t{\n\t\t\t\t\thandles = [];\n\t\t\t\t}\n\n\t\t\t\tfunction moveLine(line, dx, dy)\n\t\t\t\t{\n\t\t\t\t\tvar result = [];\n\n\t\t\t\t\tfor (var i = 0; i < line.length; i++)\n\t\t\t\t\t{\n\t\t\t\t\t\tvar pt = line[i];\n\t\t\t\t\t\tresult.push((pt == null) ? null : new mxPoint(\n\t\t\t\t\t\t\t(x0 + pt.x + dx) * s, (y0 + pt.y + dy) * s));\n\t\t\t\t\t}\n\n\t\t\t\t\treturn result;\n\t\t\t\t};\n\t\t\t\t\n\t\t\t\t// Adds handles for rows and columns\n\t\t\t\tvar rows = graph.view.getCellStates(model.getChildCells(this.state.cell, true));\n\n\t\t\t\tif (rows.length > 0)\n\t\t\t\t{\n\t\t\t\t\tvar cols = model.getChildCells(rows[0].cell, true);\n\t\t\t\t\tvar colLines = graph.getTableLines(this.state.cell, false, true);\n\t\t\t\t\tvar rowLines = graph.getTableLines(this.state.cell, true, false);\n\t\t\t\t\t\n\t\t\t\t\t// Adds row height handles\n\t\t\t\t\tfor (var i = 0; i < rows.length; i++)\n\t\t\t\t\t{\n\t\t\t\t\t\t(mxUtils.bind(this, function(index)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tvar rowState = rows[index];\n\t\t\t\t\t\t\tvar handle = null;\n\n\t\t\t\t\t\t\tif (graph.isCellMovable(rowState.cell))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tvar nextRow = (index < rows.length - 1) ? rows[index + 1] : null;\n\t\t\t\t\t\t\t\tvar ngeo = (nextRow != null) ? graph.getCellGeometry(nextRow.cell) : null;\n\t\t\t\t\t\t\t\tvar ng = (ngeo != null && ngeo.alternateBounds != null) ? ngeo.alternateBounds : ngeo;\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tvar shape = (rowLines[index] != null) ?\n\t\t\t\t\t\t\t\t\tnew TableLineShape(rowLines[index], mxConstants.NONE, 1) :\n\t\t\t\t\t\t\t\t\tnew mxLine(new mxRectangle(), mxConstants.NONE, 1, false);\n\t\t\t\t\t\t\t\tshape.isDashed = sel.isDashed;\n\t\t\t\t\t\t\t\tshape.svgStrokeTolerance++;\n\n\t\t\t\t\t\t\t\thandle = new mxHandle(rowState, 'row-resize', null, shape);\n\t\t\t\t\t\t\t\thandle.tableHandle = true;\n\t\t\t\t\t\t\t\tvar dy = 0;\n\t\t\n\t\t\t\t\t\t\t\thandle.shape.node.parentNode.insertBefore(handle.shape.node,\n\t\t\t\t\t\t\t\t\thandle.shape.node.parentNode.firstChild);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\thandle.redraw = function()\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tif (this.shape != null)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tthis.shape.stroke = (dy == 0) ? mxConstants.NONE : sel.stroke;\n\n\t\t\t\t\t\t\t\t\t\tif (this.shape.constructor == TableLineShape)\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\tthis.shape.line = moveLine(rowLines[index], 0, dy);\n\t\t\t\t\t\t\t\t\t\t\tthis.shape.updateBoundsFromLine();\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\tvar start = graph.getActualStartSize(tableState.cell, true);\n\t\t\t\t\t\t\t\t\t\t\tthis.shape.bounds.height = 1;\n\t\t\t\t\t\t\t\t\t\t\tthis.shape.bounds.y = this.state.y + this.state.height + dy * s;\n\t\t\t\t\t\t\t\t\t\t\tthis.shape.bounds.x = tableState.x + ((index == rows.length - 1) ?\n\t\t\t\t\t\t\t\t\t\t\t\t0 : start.x * s);\n\t\t\t\t\t\t\t\t\t\t\tthis.shape.bounds.width = tableState.width - ((index == rows.length - 1) ?\n\t\t\t\t\t\t\t\t\t\t\t\t0 : (start.width + start.x) + s);\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\tthis.shape.redraw();\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tvar shiftPressed = false;\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\thandle.setPosition = function(bounds, pt, me)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tdy = Math.max(Graph.minTableRowHeight - bounds.height,\n\t\t\t\t\t\t\t\t\t\tpt.y - bounds.y - bounds.height);\n\t\t\t\t\t\t\t\t\tshiftPressed = mxEvent.isShiftDown(me.getEvent());\n\n\t\t\t\t\t\t\t\t\tif (ng != null && shiftPressed)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tdy = Math.min(dy, ng.height - Graph.minTableRowHeight);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\thandle.execute = function(me)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tif (dy != 0)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tgraph.setTableRowHeight(this.state.cell,\n\t\t\t\t\t\t\t\t\t\t\tdy, !shiftPressed);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\telse if (!self.blockDelayedSelection)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tvar temp = graph.getCellAt(me.getGraphX(),\n\t\t\t\t\t\t\t\t\t\t\tme.getGraphY()) || tableState.cell; \n\t\t\t\t\t\t\t\t\t\tgraph.graphHandler.selectCellForEvent(temp, me);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tdy = 0;\n\t\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\thandle.reset = function()\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tdy = 0;\n\t\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\thandles.push(handle);\n\t\t\t\t\t\t}))(i);\n\t\t\t\t\t}\n\n\t\t\t\t\t// Adds column width handles\n\t\t\t\t\tfor (var i = 0; i < cols.length; i++)\n\t\t\t\t\t{\n\t\t\t\t\t\t(mxUtils.bind(this, function(index)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tvar colState = graph.view.getState(cols[index]);\n\t\t\t\t\t\t\tvar geo = graph.getCellGeometry(cols[index]);\n\t\t\t\t\t\t\tvar g = (geo.alternateBounds != null) ? geo.alternateBounds : geo;\n\n\t\t\t\t\t\t\tif (colState == null)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tcolState = new mxCellState(graph.view, cols[index],\n\t\t\t\t\t\t\t\t\tgraph.getCellStyle(cols[index]));\n\t\t\t\t\t\t\t\tcolState.x = tableState.x + geo.x * s;\n\t\t\t\t\t\t\t\tcolState.y = tableState.y + geo.y * s;\n\t\t\t\t\t\t\t\tcolState.width = g.width * s;\n\t\t\t\t\t\t\t\tcolState.height = g.height * s;\n\t\t\t\t\t\t\t\tcolState.updateCachedBounds();\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tvar nextCol = (index < cols.length - 1) ? cols[index + 1] : null;\n\t\t\t\t\t\t\tvar ngeo = (nextCol != null) ? graph.getCellGeometry(nextCol) : null;\n\t\t\t\t\t\t\tvar ng = (ngeo != null && ngeo.alternateBounds != null) ? ngeo.alternateBounds : ngeo;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tvar shape = (colLines[index] != null) ?\n\t\t\t\t\t\t\t\tnew TableLineShape(colLines[index], mxConstants.NONE, 1) :\n\t\t\t\t\t\t\t\tnew mxLine(new mxRectangle(), mxConstants.NONE, 1, true);\n\t\t\t\t\t\t\tshape.isDashed = sel.isDashed;\n\n\t\t\t\t\t\t\t// Workaround for event handling on overlapping cells with tolerance\n\t\t\t\t\t\t\tshape.svgStrokeTolerance++;\n\t\t\t\t\t\t\tvar handle = new mxHandle(colState, 'col-resize', null, shape);\n\t\t\t\t\t\t\thandle.tableHandle = true;\n\t\t\t\t\t\t\tvar dx = 0;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\thandle.shape.node.parentNode.insertBefore(handle.shape.node,\n\t\t\t\t\t\t\t\thandle.shape.node.parentNode.firstChild);\n\n\t\t\t\t\t\t\thandle.redraw = function()\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif (this.shape != null)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tthis.shape.stroke = (dx == 0) ? mxConstants.NONE : sel.stroke;\n\n\t\t\t\t\t\t\t\t\tif (this.shape.constructor == TableLineShape)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tthis.shape.line = moveLine(colLines[index], dx, 0);\n\t\t\t\t\t\t\t\t\t\tthis.shape.updateBoundsFromLine();\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tvar start = graph.getActualStartSize(tableState.cell, true);\n\t\t\t\t\t\t\t\t\t\tthis.shape.bounds.width = 1;\n\t\t\t\t\t\t\t\t\t\tthis.shape.bounds.x = this.state.x + (g.width + dx) * s;\n\t\t\t\t\t\t\t\t\t\tthis.shape.bounds.y = tableState.y + ((index == cols.length - 1) ?\n\t\t\t\t\t\t\t\t\t\t\t0 : start.y * s);\n\t\t\t\t\t\t\t\t\t\tthis.shape.bounds.height = tableState.height - ((index == cols.length - 1) ?\n\t\t\t\t\t\t\t\t\t\t\t0 : (start.height + start.y) * s);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tthis.shape.redraw();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tvar shiftPressed = false;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\thandle.setPosition = function(bounds, pt, me)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tdx = Math.max(Graph.minTableColumnWidth - g.width,\n\t\t\t\t\t\t\t\t\tpt.x - bounds.x - g.width);\n\t\t\t\t\t\t\t\tshiftPressed = mxEvent.isShiftDown(me.getEvent());\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tif (ng != null && !shiftPressed)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tdx = Math.min(dx, ng.width - Graph.minTableColumnWidth);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\thandle.execute = function(me)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif (dx != 0)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tgraph.setTableColumnWidth(this.state.cell,\n\t\t\t\t\t\t\t\t\t\tdx, shiftPressed);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse if (!self.blockDelayedSelection)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tvar temp = graph.getCellAt(me.getGraphX(),\n\t\t\t\t\t\t\t\t\t\tme.getGraphY()) || tableState.cell;\n\t\t\t\t\t\t\t\t\tgraph.graphHandler.selectCellForEvent(temp, me);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tdx = 0;\n\t\t\t\t\t\t\t};\n\n\t\t\t\t\t\t\t// Stops repaint of text label via vertex handler\n\t\t\t\t\t\t\thandle.positionChanged = function()\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t// do nothing\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\thandle.reset = function()\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tdx = 0;\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\thandles.push(handle);\n\t\t\t\t\t\t}))(i);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// Reserve gives point handles precedence over line handles\n\t\t\treturn (handles != null) ? handles.reverse() : null;\n\t\t};\n\n\t\t/**\n\t\t * Hides additional handles\n\t\t */\n\t\tvar vertexHandlerSetHandlesVisible = mxVertexHandler.prototype.setHandlesVisible;\n\n\t\tmxVertexHandler.prototype.setHandlesVisible = function(visible)\n\t\t{\n\t\t\tvertexHandlerSetHandlesVisible.apply(this, arguments);\n\n\t\t\tif (this.moveHandles != null)\n\t\t\t{\n\t\t\t\tfor (var i = 0; i < this.moveHandles.length; i++)\n\t\t\t\t{\n\t\t\t\t\tif (this.moveHandles[i] != null)\n\t\t\t\t\t{\n\t\t\t\t\t\tthis.moveHandles[i].node.style.visibility = (visible) ? '' : 'hidden';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif (this.cornerHandles != null)\n\t\t\t{\n\t\t\t\tfor (var i = 0; i < this.cornerHandles.length; i++)\n\t\t\t\t{\n\t\t\t\t\tthis.cornerHandles[i].node.style.visibility = (visible) ? '' : 'hidden';\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\t/**\n\t\t * Function: isMoveHandlesVisible\n\t\t * \n\t\t * Initializes the shapes required for this vertex handler.\n\t\t */\n\t\tmxVertexHandler.prototype.isMoveHandlesVisible = function()\n\t\t{\n\t\t\treturn this.graph.isTable(this.state.cell) &&\n\t\t\t\tthis.graph.isCellMovable(this.state.cell);\n\t\t};\n\n\t\t/**\n\t\t * Creates or updates special handles for moving rows.\n\t\t */\n\t\tmxVertexHandler.prototype.refreshMoveHandles = function()\n\t\t{\n\t\t\tvar showMoveHandles = this.isMoveHandlesVisible();\n\n\t\t\tif (showMoveHandles && this.moveHandles == null)\n\t\t\t{\n\t\t\t\tthis.moveHandles = this.createMoveHandles();\n\t\t\t}\n\t\t\telse if (!showMoveHandles && this.moveHandles != null)\n\t\t\t{\n\t\t\t\tthis.destroyMoveHandles();\n\t\t\t}\n\n\t\t\t// Destroys existing handles\n\t\t\tif (showMoveHandles && this.moveHandles == null)\n\t\t\t{\n\t\t\t\tfor (var i = 0; i < this.moveHandles.length; i++)\n\t\t\t\t{\n\t\t\t\t\tif (this.moveHandles[i] != null)\n\t\t\t\t\t{\n\t\t\t\t\t\tthis.moveHandles[i].parentNode.removeChild(this.moveHandles[i]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tthis.moveHandles = null;\n\t\t\t}\n\n\t\t};\n\t\t\n\t\t/**\n\t\t * Creates or updates special handles for moving rows.\n\t\t */\n\t\tmxVertexHandler.prototype.createMoveHandles = function()\n\t\t{\n\t\t\tvar graph = this.graph;\n\t\t\tvar model = graph.model;\n\t\t\tvar handles = [];\n\t\t\t\n\t\t\tfor (var i = 0; i < model.getChildCount(this.state.cell); i++)\n\t\t\t{\n\t\t\t\t(mxUtils.bind(this, function(rowState)\n\t\t\t\t{\n\t\t\t\t\tif (rowState != null && model.isVertex(rowState.cell) &&\n\t\t\t\t\t\tgraph.isCellMovable(rowState.cell))\n\t\t\t\t\t{\n\t\t\t\t\t\tvar bounds = new mxRectangle(0, 0, this.rowHandleImage.width, this.rowHandleImage.height);\n\t\t\t\t\t\tvar moveHandle = new mxImageShape(bounds, this.rowHandleImage.src);\n\t\t\t\t\t\tmoveHandle.rowState = rowState;\n\t\t\t\t\t\tmoveHandle.dialect = (this.graph.dialect != mxConstants.DIALECT_SVG) ?\n\t\t\t\t\t\t\tmxConstants.DIALECT_MIXEDHTML : mxConstants.DIALECT_SVG;\n\t\t\t\t\t\tmoveHandle.init(this.graph.getView().getOverlayPane());\n\t\t\t\t\t\tmoveHandle.node.style.cursor = 'move';\n\n\t\t\t\t\t\tmxEvent.addGestureListeners(moveHandle.node, mxUtils.bind(this, function(evt)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tthis.graph.popupMenuHandler.hideMenu();\n\t\t\t\t\t\t\tthis.graph.stopEditing(false);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif (this.graph.isToggleEvent(evt) ||\n\t\t\t\t\t\t\t\t!this.graph.isCellSelected(rowState.cell))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tthis.graph.selectCellForEvent(rowState.cell, evt);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif (!mxEvent.isPopupTrigger(evt))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tthis.graph.graphHandler.start(this.state.cell,\n\t\t\t\t\t\t\t\t\tmxEvent.getClientX(evt), mxEvent.getClientY(evt),\n\t\t\t\t\t\t\t\t\tthis.graph.getSelectionCells());\n\t\t\t\t\t\t\t\tthis.graph.graphHandler.cellWasClicked = true;\n\t\t\t\t\t\t\t\tthis.graph.isMouseTrigger = mxEvent.isMouseEvent(evt);\n\t\t\t\t\t\t\t\tthis.graph.isMouseDown = true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tmxEvent.consume(evt);\n\t\t\t\t\t\t}), null, mxUtils.bind(this, function(evt)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif (mxEvent.isPopupTrigger(evt))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tthis.graph.popupMenuHandler.popup(mxEvent.getClientX(evt),\n\t\t\t\t\t\t\t\t\tmxEvent.getClientY(evt), rowState.cell, evt);\n\t\t\t\t\t\t\t\tmxEvent.consume(evt);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}));\n\t\t\t\t\t\t\n\t\t\t\t\t\thandles.push(moveHandle);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\thandles.push(null);\n\t\t\t\t\t}\n\t\t\t\t}))(this.graph.view.getState(model.getChildAt(this.state.cell, i)));\n\t\t\t}\n\n\t\t\treturn handles;\n\t\t};\n\n\t\t/**\n\t\t * Function: destroyCustomHandles\n\t\t * \n\t\t * Destroys the handler and all its resources and DOM nodes.\n\t\t */\n\t\tmxVertexHandler.prototype.destroyMoveHandles = function()\n\t\t{\n\t\t\tif (this.moveHandles != null)\n\t\t\t{\n\t\t\t\tfor (var i = 0; i < this.moveHandles.length; i++)\n\t\t\t\t{\n\t\t\t\t\tif (this.moveHandles[i] != null)\n\t\t\t\t\t{\n\t\t\t\t\t\tthis.moveHandles[i].destroy();\n\t\t\t\t\t\t// this.moveHandles[i].parentNode.removeChild(this.moveHandles[i]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tthis.moveHandles = null;\n\t\t\t}\n\t\t};\n\n\t\t/**\n\t\t * Adds handle padding for editing cells and exceptions.\n\t\t */\n\t\tvar vertexHandlerRefresh = mxVertexHandler.prototype.refresh;\n\n\t\tmxVertexHandler.prototype.refresh = function()\n\t\t{\n\t\t\tvertexHandlerRefresh.apply(this, arguments);\n\n\t\t\tif (this.graph.isTable(this.state.cell) &&\n\t\t\t\tthis.graph.isCellMovable(this.state.cell))\n\t\t\t{\n\t\t\t\tthis.refreshMoveHandles();\n\t\t\t}\n\t\t};\n\n\t\t/**\n\t\t * Adds handle padding for editing cells and exceptions.\n\t\t */\n\t\tvar vertexHandlerGetHandlePadding = mxVertexHandler.prototype.getHandlePadding;\n\t\tmxVertexHandler.prototype.getHandlePadding = function()\n\t\t{\n\t\t\tvar result = new mxPoint(0, 0);\n\t\t\tvar tol = this.tolerance;\n\t\t\tvar name = this.state.style['shape'];\n\n\t\t\tif (mxCellRenderer.defaultShapes[name] == null &&\n\t\t\t\tmxStencilRegistry.getStencil(name) == null)\n\t\t\t{\n\t\t\t\tname = mxConstants.SHAPE_RECTANGLE;\n\t\t\t}\n\t\t\t\n\t\t\t// Checks if custom handles are overlapping with the shape border\n\t\t\tvar handlePadding = this.graph.isTable(this.state.cell) ||\n\t\t\t\tthis.graph.cellEditor.getEditingCell() == this.state.cell;\n\t\t\t\n\t\t\tif (!handlePadding)\n\t\t\t{\n\t\t\t\tif (this.customHandles != null)\n\t\t\t\t{\n\t\t\t\t\tfor (var i = 0; i < this.customHandles.length; i++)\n\t\t\t\t\t{\n\t\t\t\t\t\tif (this.customHandles[i] != null &&\n\t\t\t\t\t\t\tthis.customHandles[i].shape != null &&\n\t\t\t\t\t\t\tthis.customHandles[i].shape.bounds != null)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tvar b = this.customHandles[i].shape.bounds;\n\t\t\t\t\t\t\tvar px = b.getCenterX();\n\t\t\t\t\t\t\tvar py = b.getCenterY();\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif ((Math.abs(this.state.x - px) < b.width / 2) ||\n\t\t\t\t\t\t\t\t(Math.abs(this.state.y - py) < b.height / 2) ||\n\t\t\t\t\t\t\t\t(Math.abs(this.state.x + this.state.width - px) < b.width / 2) ||\n\t\t\t\t\t\t\t\t(Math.abs(this.state.y + this.state.height - py) < b.height / 2))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\thandlePadding = true;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif (handlePadding && this.sizers != null &&\n\t\t\t\tthis.sizers.length > 0 && this.sizers[0] != null)\n\t\t\t{\n\t\t\t\ttol /= 2;\n\t\t\t\t\n\t\t\t\t// Makes room for row move handle\n\t\t\t\tif (this.graph.isTable(this.state.cell))\n\t\t\t\t{\n\t\t\t\t\ttol += 7;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tresult.x = this.sizers[0].bounds.width + tol;\n\t\t\t\tresult.y = this.sizers[0].bounds.height + tol;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tresult = vertexHandlerGetHandlePadding.apply(this, arguments);\n\t\t\t}\n\t\t\t\n\t\t\treturn result;\n\t\t};\n\n\t\t/**\n\t\t * Updates the hint for the current operation.\n\t\t */\n\t\tmxVertexHandler.prototype.updateHint = function(me)\n\t\t{\n\t\t\tif (this.index != mxEvent.LABEL_HANDLE)\n\t\t\t{\n\t\t\t\tif (this.hint == null)\n\t\t\t\t{\n\t\t\t\t\tthis.hint = createHint();\n\t\t\t\t\tthis.state.view.graph.container.appendChild(this.hint);\n\t\t\t\t}\n\t\n\t\t\t\tif (this.index == mxEvent.ROTATION_HANDLE)\n\t\t\t\t{\n\t\t\t\t\tthis.hint.innerHTML = this.currentAlpha + '&deg;';\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tvar s = this.state.view.scale;\n\t\t\t\t\tvar unit = this.state.view.unit;\n\t\t\t\t\tthis.hint.innerHTML = formatHintText(this.roundLength(this.bounds.width / s), unit) + ' x ' + \n\t\t\t\t\t\tformatHintText(this.roundLength(this.bounds.height / s), unit);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tvar rot = (this.currentAlpha != null) ? this.currentAlpha : this.state.style[mxConstants.STYLE_ROTATION] || '0';\n\t\t\t\tvar bb = mxUtils.getBoundingBox(this.bounds, rot);\n\t\t\t\t\n\t\t\t\tif (bb == null)\n\t\t\t\t{\n\t\t\t\t\tbb = this.bounds;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tthis.hint.style.left = bb.x + Math.round((bb.width - this.hint.clientWidth) / 2) + 'px';\n\t\t\t\tthis.hint.style.top = (bb.y + bb.height + Editor.hintOffset) + 'px';\n\t\t\t\t\n\t\t\t\tif (this.linkHint != null)\n\t\t\t\t{\n\t\t\t\t\tthis.linkHint.style.display = 'none';\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\n\t\t/**\n\t\t * Updates the hint for the current operation.\n\t\t */\n\t\tmxVertexHandler.prototype.removeHint = function()\n\t\t{\n\t\t\tmxGraphHandler.prototype.removeHint.apply(this, arguments);\n\t\t\t\n\t\t\tif (this.linkHint != null)\n\t\t\t{\n\t\t\t\tthis.linkHint.style.display = '';\n\t\t\t}\n\t\t};\n\n\t\t/**\n\t\t * Hides link hint while moving cells.\n\t\t */\n\t\tvar edgeHandlerMouseMove = mxEdgeHandler.prototype.mouseMove;\n\t\t\n\t\tmxEdgeHandler.prototype.mouseMove = function(sender, me)\n\t\t{\n\t\t\tedgeHandlerMouseMove.apply(this, arguments);\n\t\t\t\n\t\t\tif (this.linkHint != null && this.linkHint.style.display != 'none' &&\n\t\t\t\tthis.graph.graphHandler != null && this.graph.graphHandler.first != null)\n\t\t\t{\n\t\t\t\tthis.linkHint.style.display = 'none';\n\t\t\t}\n\t\t}\n\t\t\n\t\t/**\n\t\t * Hides link hint while moving cells.\n\t\t */\n\t\tvar edgeHandlerMouseUp = mxEdgeHandler.prototype.mouseUp;\n\t\t\n\t\tmxEdgeHandler.prototype.mouseUp = function(sender, me)\n\t\t{\n\t\t\tedgeHandlerMouseUp.apply(this, arguments);\n\t\t\t\n\t\t\tif (this.linkHint != null && this.linkHint.style.display == 'none')\n\t\t\t{\n\t\t\t\tthis.linkHint.style.display = '';\n\t\t\t}\n\t\t}\n\t\n\t\t/**\n\t\t * Updates the hint for the current operation.\n\t\t */\n\t\tmxEdgeHandler.prototype.updateHint = function(me, point)\n\t\t{\n\t\t\tif (this.hint == null)\n\t\t\t{\n\t\t\t\tthis.hint = createHint();\n\t\t\t\tthis.state.view.graph.container.appendChild(this.hint);\n\t\t\t}\n\t\n\t\t\tvar t = this.graph.view.translate;\n\t\t\tvar s = this.graph.view.scale;\n\t\t\tvar x = this.roundLength(point.x / s - t.x);\n\t\t\tvar y = this.roundLength(point.y / s - t.y);\n\t\t\tvar unit = this.graph.view.unit;\n\t\t\t\n\t\t\tthis.hint.innerHTML = formatHintText(x, unit) + ', ' + formatHintText(y, unit);\n\t\t\tthis.hint.style.visibility = 'visible';\n\t\t\t\n\t\t\tif (this.isSource || this.isTarget)\n\t\t\t{\n\t\t\t\tif (this.constraintHandler != null &&\n\t\t\t\t\tthis.constraintHandler.currentConstraint != null &&\n\t\t\t\t\tthis.constraintHandler.currentFocus != null)\n\t\t\t\t{\n\t\t\t\t\tvar pt = this.constraintHandler.currentConstraint.point;\n\t\t\t\t\tthis.hint.innerHTML = '[' + Math.round(pt.x * 100) + '%, '+ Math.round(pt.y * 100) + '%]';\n\t\t\t\t}\n\t\t\t\telse if (this.marker.hasValidState())\n\t\t\t\t{\n\t\t\t\t\tthis.hint.style.visibility = 'hidden';\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tthis.hint.style.left = Math.round(me.getGraphX() - this.hint.clientWidth / 2) + 'px';\n\t\t\tthis.hint.style.top = (Math.max(me.getGraphY(), point.y) + Editor.hintOffset) + 'px';\n\t\t\t\n\t\t\tif (this.linkHint != null)\n\t\t\t{\n\t\t\t\tthis.linkHint.style.display = 'none';\n\t\t\t}\n\t\t};\n\n\t\t/**\n\t\t * Replaces folding icons with SVG.\n\t\t */\n\t\tGraph.prototype.expandedImage = Graph.createSvgImage(9, 9, '<defs><linearGradient id=\"grad1\" x1=\"50%\" y1=\"0%\" x2=\"50%\" y2=\"100%\">' +\n\t\t\t'<stop offset=\"30%\" style=\"stop-color:#f0f0f0;\" /><stop offset=\"100%\" style=\"stop-color:#AFB0B6;\" /></linearGradient></defs>' +\n\t\t\t'<rect x=\"0\" y=\"0\" width=\"9\" height=\"9\" stroke=\"#8A94A5\" fill=\"url(#grad1)\" stroke-width=\"2\"/>' +\n\t\t\t'<path d=\"M 2 4.5 L 7 4.5 z\" stroke=\"#000\"/>');\n\t\tGraph.prototype.collapsedImage = Graph.createSvgImage(9, 9, '<defs><linearGradient id=\"grad1\" x1=\"0%\" y1=\"0%\" x2=\"100%\" y2=\"100%\">' +\n\t\t\t'<stop offset=\"30%\" style=\"stop-color:#f0f0f0;\" /><stop offset=\"100%\" style=\"stop-color:#AFB0B6;\" /></linearGradient></defs>' +\n\t\t\t'<rect x=\"0\" y=\"0\" width=\"9\" height=\"9\" stroke=\"#8A94A5\" fill=\"url(#grad1)\" stroke-width=\"2\"/>' +\n\t\t\t'<path d=\"M 4.5 2 L 4.5 7 M 2 4.5 L 7 4.5 z\" stroke=\"#000\"/>');\n\n\t\t/**\n\t\t * Updates the hint for the current operation.\n\t\t */\n\t\tmxEdgeHandler.prototype.removeHint = mxVertexHandler.prototype.removeHint;\n\t\n\t\t/**\n\t\t * Defines the handles for the UI. Uses data-URIs to speed-up loading time where supported.\n\t\t */\n\t\tHoverIcons.prototype.mainHandle = Graph.createSvgImage(18, 18, '<circle cx=\"9\" cy=\"9\" r=\"5\" stroke=\"#fff\" fill=\"' + HoverIcons.prototype.arrowFill + '\"/>');\n\t\tHoverIcons.prototype.endMainHandle = Graph.createSvgImage(18, 18, '<circle cx=\"9\" cy=\"9\" r=\"6\" stroke=\"#fff\" fill=\"' + HoverIcons.prototype.arrowFill + '\"/>');\n\t\tHoverIcons.prototype.secondaryHandle = Graph.createSvgImage(16, 16, '<path d=\"m 8 3 L 13 8 L 8 13 L 3 8 z\" stroke=\"#fff\" fill=\"#fca000\"/>');\n\t\tHoverIcons.prototype.fixedHandle = Graph.createSvgImage(22, 22,\n\t\t\t'<circle cx=\"11\" cy=\"11\" r=\"6\" stroke=\"#fff\" fill=\"#01bd22\"/>' +\n\t\t\t'<path d=\"m 8 8 L 14 14M 8 14 L 14 8\" stroke=\"#fff\"/>');\n\t\tHoverIcons.prototype.endFixedHandle = Graph.createSvgImage(22, 22,\n\t\t\t'<circle cx=\"11\" cy=\"11\" r=\"7\" stroke=\"#fff\" fill=\"#01bd22\"/>' +\n\t\t\t'<path d=\"m 8 8 L 14 14M 8 14 L 14 8\" stroke=\"#fff\"/>');\n\t\tHoverIcons.prototype.terminalHandle = Graph.createSvgImage(22, 22,\n\t\t\t'<circle cx=\"11\" cy=\"11\" r=\"6\" stroke=\"#fff\" fill=\"' + HoverIcons.prototype.arrowFill +\n\t\t\t'\"/><circle cx=\"11\" cy=\"11\" r=\"3\" stroke=\"#fff\" fill=\"transparent\"/>');\n\t\tHoverIcons.prototype.endTerminalHandle = Graph.createSvgImage(22, 22,\n\t\t\t'<circle cx=\"11\" cy=\"11\" r=\"7\" stroke=\"#fff\" fill=\"' + HoverIcons.prototype.arrowFill +\n\t\t\t'\"/><circle cx=\"11\" cy=\"11\" r=\"3\" stroke=\"#fff\" fill=\"transparent\"/>');\n\t\tHoverIcons.prototype.rotationHandle = Graph.createSvgImage(16, 16,\n\t\t\t'<path stroke=\"' + HoverIcons.prototype.arrowFill + '\" fill=\"' + HoverIcons.prototype.arrowFill +\n\t\t\t\t'\" d=\"M15.55 5.55L11 1v3.07C7.06 4.56 4 7.92 4 12s3.05 7.44 7 7.93v-2.02c-2.84-.48-5-2.94-5-5.91s2.16-5.43 5-5.91V10l4.55-4.45zM19.93 11c-.17-1.39-.72-2.73-1.62-3.89l-1.42 1.42c.54.75.88 1.6 1.02 2.47h2.02zM13 17.9v2.02c1.39-.17 2.74-.71 3.9-1.61l-1.44-1.44c-.75.54-1.59.89-2.46 1.03zm3.89-2.42l1.42 1.41c.9-1.16 1.45-2.5 1.62-3.89h-2.02c-.14.87-.48 1.72-1.02 2.48z\"/>',\n\t\t\t\t24, 24);\n\t\n\t\tmxConstraintHandler.prototype.pointImage = Graph.createSvgImage(5, 5,\n\t\t\t'<path d=\"m 0 0 L 5 5 M 0 5 L 5 0\" stroke-width=\"2\" style=\"stroke-opacity:0.4\" stroke=\"#ffffff\"/>' +\n\t\t\t'<path d=\"m 0 0 L 5 5 M 0 5 L 5 0\" stroke=\"' + HoverIcons.prototype.arrowFill + '\"/>');\n\n\t\tmxVertexHandler.TABLE_HANDLE_COLOR = '#fca000';\n\t\tmxVertexHandler.prototype.handleImage = HoverIcons.prototype.mainHandle;\n\t\tmxVertexHandler.prototype.secondaryHandleImage = HoverIcons.prototype.secondaryHandle;\n\t\tmxVertexHandler.prototype.rowHandleImage = Graph.createSvgImage(14, 12,\n\t\t\t'<rect x=\"2\" y=\"2\" width=\"10\" height=\"3\" stroke-width=\"1\" stroke=\"#ffffff\" fill=\"' + HoverIcons.prototype.arrowFill + '\"/>' +\n\t\t\t'<rect x=\"2\" y=\"7\" width=\"10\" height=\"3\" stroke-width=\"1\" stroke=\"#ffffff\" fill=\"' + HoverIcons.prototype.arrowFill + '\"/>');\n\t\t\n\t\tmxEdgeHandler.prototype.handleImage = HoverIcons.prototype.mainHandle;\n\t\tmxEdgeHandler.prototype.endHandleImage = HoverIcons.prototype.endMainHandle;\n\t\tmxEdgeHandler.prototype.terminalHandleImage = HoverIcons.prototype.terminalHandle;\n\t\tmxEdgeHandler.prototype.endTerminalHandleImage = HoverIcons.prototype.endTerminalHandle;\n\t\tmxEdgeHandler.prototype.fixedHandleImage = HoverIcons.prototype.fixedHandle;\n\n\t\tmxEdgeHandler.prototype.endFixedHandleImage = HoverIcons.prototype.endFixedHandle;\n\t\tmxEdgeHandler.prototype.labelHandleImage = HoverIcons.prototype.secondaryHandle;\n\t\tmxOutline.prototype.sizerImage = HoverIcons.prototype.mainHandle;\n\t\t\n\t\tif (window.Sidebar != null)\n\t\t{\n\t\t\tSidebar.prototype.triangleUp = HoverIcons.prototype.triangleUp;\n\t\t\tSidebar.prototype.triangleRight = HoverIcons.prototype.triangleRight;\n\t\t\tSidebar.prototype.triangleDown = HoverIcons.prototype.triangleDown;\n\t\t\tSidebar.prototype.triangleLeft = HoverIcons.prototype.triangleLeft;\n\t\t\tSidebar.prototype.refreshTarget = HoverIcons.prototype.refreshTarget;\n\t\t\tSidebar.prototype.roundDrop = HoverIcons.prototype.roundDrop;\n\t\t}\n\n\t\t// Adds rotation handle and live preview\n\t\tmxVertexHandler.prototype.rotationEnabled = true;\n\t\tmxVertexHandler.prototype.manageSizers = true;\n\t\tmxVertexHandler.prototype.livePreview = true;\n\t\tmxGraphHandler.prototype.maxLivePreview = 16;\n\t\n\t\t// Increases default rubberband opacity (default is 20)\n\t\tmxRubberband.prototype.defaultOpacity = 30;\n\t\t\n\t\t// Enables connections along the outline, virtual waypoints, parent highlight etc\n\t\tmxConnectionHandler.prototype.outlineConnect = true;\n\t\tmxCellHighlight.prototype.keepOnTop = true;\n\t\tmxVertexHandler.prototype.parentHighlightEnabled = true;\n\t\t\n\t\tmxEdgeHandler.prototype.parentHighlightEnabled = true;\n\t\tmxEdgeHandler.prototype.dblClickRemoveEnabled = true;\n\t\tmxEdgeHandler.prototype.straightRemoveEnabled = true;\n\t\tmxEdgeHandler.prototype.virtualBendsEnabled = true;\n\t\tmxEdgeHandler.prototype.mergeRemoveEnabled = true;\n\t\tmxEdgeHandler.prototype.manageLabelHandle = true;\n\t\tmxEdgeHandler.prototype.outlineConnect = true;\n\t\t\n\t\t// Disables adding waypoints if shift is pressed\n\t\tmxEdgeHandler.prototype.isAddVirtualBendEvent = function(me)\n\t\t{\n\t\t\treturn !mxEvent.isShiftDown(me.getEvent());\n\t\t};\n\t\n\t\t// Disables custom handles if shift is pressed\n\t\tmxEdgeHandler.prototype.isCustomHandleEvent = function(me)\n\t\t{\n\t\t\treturn !mxEvent.isShiftDown(me.getEvent());\n\t\t};\n\t\t\n\t\t/**\n\t\t * Implements touch style\n\t\t */\n\t\tif (Graph.touchStyle)\n\t\t{\n\t\t\t// Larger tolerance for real touch devices\n\t\t\tif (mxClient.IS_TOUCH || navigator.maxTouchPoints > 0 || navigator.msMaxTouchPoints > 0)\n\t\t\t{\n\t\t\t\tmxShape.prototype.svgStrokeTolerance = 18;\n\t\t\t\tmxVertexHandler.prototype.tolerance = 12;\n\t\t\t\tmxEdgeHandler.prototype.tolerance = 12;\n\t\t\t\tGraph.prototype.tolerance = 12;\n\t\t\t\t\n\t\t\t\tmxVertexHandler.prototype.rotationHandleVSpacing = -16;\n\t\t\t\t\n\t\t\t\t// Implements a smaller tolerance for mouse events and a larger tolerance for touch\n\t\t\t\t// events on touch devices. The default tolerance (4px) is used for mouse events.\n\t\t\t\tmxConstraintHandler.prototype.getTolerance = function(me)\n\t\t\t\t{\n\t\t\t\t\treturn (mxEvent.isMouseEvent(me.getEvent())) ? 4 : this.graph.getTolerance();\n\t\t\t\t};\n\t\t\t}\n\t\t\t\t\n\t\t\t// One finger pans (no rubberband selection) must start regardless of mouse button\n\t\t\tmxPanningHandler.prototype.isPanningTrigger = function(me)\n\t\t\t{\n\t\t\t\tvar evt = me.getEvent();\n\t\t\t\t\n\t\t\t \treturn (me.getState() == null && !mxEvent.isMouseEvent(evt)) ||\n\t\t\t \t\t(mxEvent.isPopupTrigger(evt) && (me.getState() == null ||\n\t\t\t \t\tmxEvent.isControlDown(evt) || mxEvent.isShiftDown(evt)));\n\t\t\t};\n\t\t\t\n\t\t\t// Don't clear selection if multiple cells selected\n\t\t\tvar graphHandlerMouseDown = mxGraphHandler.prototype.mouseDown;\n\t\t\tmxGraphHandler.prototype.mouseDown = function(sender, me)\n\t\t\t{\n\t\t\t\tgraphHandlerMouseDown.apply(this, arguments);\n\t\n\t\t\t\tif (mxEvent.isTouchEvent(me.getEvent()) && this.graph.isCellSelected(me.getCell()) &&\n\t\t\t\t\tthis.graph.getSelectionCount() > 1)\n\t\t\t\t{\n\t\t\t\t\tthis.delayedSelection = false;\n\t\t\t\t}\n\t\t\t};\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Removes ctrl+shift as panning trigger for space splitting\n\t\t\tmxPanningHandler.prototype.isPanningTrigger = function(me)\n\t\t\t{\n\t\t\t\tvar evt = me.getEvent();\n\t\t\t\t\n\t\t\t\treturn (mxEvent.isLeftMouseButton(evt) && ((this.useLeftButtonForPanning &&\n\t\t\t\t\t\tme.getState() == null) || (mxEvent.isControlDown(evt) &&\n\t\t\t\t\t\t!mxEvent.isShiftDown(evt)))) || (this.usePopupTrigger &&\n\t\t\t\t\t\tmxEvent.isPopupTrigger(evt));\n\t\t\t};\n\t\t}\n\n\t\t// Overrides/extends rubberband for space handling with Ctrl+Shift(+Alt) drag (\"scissors tool\")\n\t\tmxRubberband.prototype.isSpaceEvent = function(me)\n\t\t{\n\t\t\treturn this.graph.isEnabled() && !this.graph.isCellLocked(this.graph.getDefaultParent()) &&\n\t\t\t\t(mxEvent.isControlDown(me.getEvent()) || mxEvent.isMetaDown(me.getEvent())) &&\n\t\t\t\tmxEvent.isShiftDown(me.getEvent()) && mxEvent.isAltDown(me.getEvent());\n\t\t};\n\n\t\t// Cancelled state\n\t\tmxRubberband.prototype.cancelled = false;\n\n\t\t// Cancels ongoing rubberband selection but consumed event to avoid reset of selection\n\t\tmxRubberband.prototype.cancel = function()\n\t\t{\n\t\t\tif (this.isActive())\n\t\t\t{\n\t\t\t\tthis.cancelled = true;\n\t\t\t\tthis.reset();\n\t\t\t}\n\t\t};\n\n\t\t// Handles moving of cells in both half panes\n\t\tmxRubberband.prototype.mouseUp = function(sender, me)\n\t\t{\n\t\t\tif (this.cancelled)\n\t\t\t{\n\t\t\t\tthis.cancelled = false;\n\t\t\t\tme.consume();\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tvar execute = this.div != null && this.div.style.display != 'none';\n\t\n\t\t\t\tvar x0 = null;\n\t\t\t\tvar y0 = null;\n\t\t\t\tvar dx = null;\n\t\t\t\tvar dy = null;\n\t\n\t\t\t\tif (this.first != null && this.currentX != null && this.currentY != null)\n\t\t\t\t{\n\t\t\t\t\tx0 = this.first.x;\n\t\t\t\t\ty0 = this.first.y;\n\t\t\t\t\tdx = (this.currentX - x0) / this.graph.view.scale;\n\t\t\t\t\tdy = (this.currentY - y0) / this.graph.view.scale;\n\t\n\t\t\t\t\tif (!mxEvent.isAltDown(me.getEvent()))\n\t\t\t\t\t{\n\t\t\t\t\t\tdx = this.graph.snap(dx);\n\t\t\t\t\t\tdy = this.graph.snap(dy);\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (!this.graph.isGridEnabled())\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif (Math.abs(dx) < this.graph.tolerance)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tdx = 0;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif (Math.abs(dy) < this.graph.tolerance)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tdy = 0;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tthis.reset();\n\t\t\t\t\n\t\t\t\tif (execute)\n\t\t\t\t{\n\t\t\t\t\tif (this.isSpaceEvent(me))\n\t\t\t\t\t{\n\t\t\t\t\t\tthis.graph.model.beginUpdate();\n\t\t\t\t\t\ttry\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tvar cells = this.graph.getCellsBeyond(x0, y0, this.graph.getDefaultParent(), true, true);\n\t\n\t\t\t\t\t\t\tfor (var i = 0; i < cells.length; i++)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif (this.graph.isCellMovable(cells[i]))\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tvar tmp = this.graph.view.getState(cells[i]);\n\t\t\t\t\t\t\t\t\tvar geo = this.graph.getCellGeometry(cells[i]);\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tif (tmp != null && geo != null)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tgeo = geo.clone();\n\t\t\t\t\t\t\t\t\t\tgeo.translate(dx, dy);\n\t\t\t\t\t\t\t\t\t\tthis.graph.model.setGeometry(cells[i], geo);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfinally\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tthis.graph.model.endUpdate();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tvar rect = new mxRectangle(this.x, this.y, this.width, this.height);\n\t\t\t\t\t\tthis.graph.selectRegion(rect, me.getEvent());\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tme.consume();\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\t\n\t\t// Handles preview for creating/removing space in diagram\n\t\tmxRubberband.prototype.mouseMove = function(sender, me)\n\t\t{\n\t\t\tif (!me.isConsumed() && this.first != null)\n\t\t\t{\n\t\t\t\tvar origin = mxUtils.getScrollOrigin(this.graph.container);\n\t\t\t\tvar offset = mxUtils.getOffset(this.graph.container);\n\t\t\t\torigin.x -= offset.x;\n\t\t\t\torigin.y -= offset.y;\n\t\t\t\tvar x = me.getX() + origin.x;\n\t\t\t\tvar y = me.getY() + origin.y;\n\t\t\t\tvar dx = this.first.x - x;\n\t\t\t\tvar dy = this.first.y - y;\n\t\t\t\tvar tol = this.graph.tolerance;\n\t\t\t\t\n\t\t\t\tif (this.div != null || Math.abs(dx) > tol ||  Math.abs(dy) > tol)\n\t\t\t\t{\n\t\t\t\t\tif (this.div == null)\n\t\t\t\t\t{\n\t\t\t\t\t\tthis.div = this.createShape();\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// Clears selection while rubberbanding. This is required because\n\t\t\t\t\t// the event is not consumed in mouseDown.\n\t\t\t\t\tmxUtils.clearSelection();\n\t\t\t\t\tthis.update(x, y);\n\t\t\t\t\t\n\t\t\t\t\tif (this.isSpaceEvent(me))\n\t\t\t\t\t{\n\t\t\t\t\t\tvar right = this.x + this.width;\n\t\t\t\t\t\tvar bottom = this.y + this.height;\n\t\t\t\t\t\tvar scale = this.graph.view.scale;\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (!mxEvent.isAltDown(me.getEvent()))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tthis.width = this.graph.snap(this.width / scale) * scale;\n\t\t\t\t\t\t\tthis.height = this.graph.snap(this.height / scale) * scale;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif (!this.graph.isGridEnabled())\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif (this.width < this.graph.tolerance)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tthis.width = 0;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tif (this.height < this.graph.tolerance)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tthis.height = 0;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif (this.x < this.first.x)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tthis.x = right - this.width;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif (this.y < this.first.y)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tthis.y = bottom - this.height;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tthis.div.style.borderStyle = 'dashed';\n\t\t\t\t\t\tthis.div.style.backgroundColor = 'white';\n\t\t\t\t\t\tthis.div.style.left = this.x + 'px';\n\t\t\t\t\t\tthis.div.style.top = this.y + 'px';\n\t\t\t\t\t\tthis.div.style.width = Math.max(0, this.width) + 'px';\n\t\t\t\t\t\tthis.div.style.height = this.graph.container.clientHeight + 'px';\n\t\t\t\t\t\tthis.div.style.borderWidth = (this.width <= 0) ? '0px 1px 0px 0px' : '0px 1px 0px 1px';\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (this.secondDiv == null)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tthis.secondDiv = this.div.cloneNode(true);\n\t\t\t\t\t\t\tthis.div.parentNode.appendChild(this.secondDiv);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tthis.secondDiv.style.left = this.x + 'px';\n\t\t\t\t\t\tthis.secondDiv.style.top = this.y + 'px';\n\t\t\t\t\t\tthis.secondDiv.style.width = this.graph.container.clientWidth + 'px';\n\t\t\t\t\t\tthis.secondDiv.style.height = Math.max(0, this.height) + 'px';\n\t\t\t\t\t\tthis.secondDiv.style.borderWidth = (this.height <= 0) ? '1px 0px 0px 0px' : '1px 0px 1px 0px';\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t// Hides second div and restores style\n\t\t\t\t\t\tthis.div.style.backgroundColor = '';\n\t\t\t\t\t\tthis.div.style.borderWidth = '';\n\t\t\t\t\t\tthis.div.style.borderStyle = '';\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (this.secondDiv != null)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tthis.secondDiv.parentNode.removeChild(this.secondDiv);\n\t\t\t\t\t\t\tthis.secondDiv = null;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tme.consume();\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\t\n\t\t// Removes preview\n\t\tvar mxRubberbandReset = mxRubberband.prototype.reset;\n\t\tmxRubberband.prototype.reset = function()\n\t\t{\n\t\t\tif (this.secondDiv != null)\n\t\t\t{\n\t\t\t\tthis.secondDiv.parentNode.removeChild(this.secondDiv);\n\t\t\t\tthis.secondDiv = null;\n\t\t\t}\n\t\t\t\n\t\t\tmxRubberbandReset.apply(this, arguments);\n\t\t};\n\t\t\n\t    // Timer-based activation of outline connect in connection handler\n\t    var startTime = new Date().getTime();\n\t    var timeOnTarget = 0;\n\t    \n\t\tvar mxEdgeHandlerUpdatePreviewState = mxEdgeHandler.prototype.updatePreviewState;\n\t\t\n\t\tmxEdgeHandler.prototype.updatePreviewState = function(edge, point, terminalState, me)\n\t\t{\n\t\t\tmxEdgeHandlerUpdatePreviewState.apply(this, arguments);\n\t\t\t\n\t    \tif (terminalState != this.currentTerminalState)\n\t    \t{\n\t    \t\tstartTime = new Date().getTime();\n\t    \t\ttimeOnTarget = 0;\n\t    \t}\n\t    \telse\n\t    \t{\n\t\t    \ttimeOnTarget = new Date().getTime() - startTime;\n\t    \t}\n\t\t\t\n\t\t\tthis.currentTerminalState = terminalState;\n\t\t};\n\t\n\t\t// Timer-based outline connect\n\t\tvar mxEdgeHandlerIsOutlineConnectEvent = mxEdgeHandler.prototype.isOutlineConnectEvent;\n\t\t\n\t\tmxEdgeHandler.prototype.isOutlineConnectEvent = function(me)\n\t\t{\n\t\t\tif (mxEvent.isShiftDown(me.getEvent()) && mxEvent.isAltDown(me.getEvent()))\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn (this.currentTerminalState != null && me.getState() == this.currentTerminalState && timeOnTarget > 2000) ||\n\t\t\t\t\t((this.currentTerminalState == null || mxUtils.getValue(this.currentTerminalState.style, 'outlineConnect', '1') != '0') &&\n\t\t\t\t\tmxEdgeHandlerIsOutlineConnectEvent.apply(this, arguments));\n\t\t\t}\n\t\t};\n\t\t\n\t\t// Shows secondary handle for fixed connection points\n\t\tmxEdgeHandler.prototype.createHandleShape = function(index, virtual, target)\n\t\t{\n\t\t\tvar source = index != null && index == 0;\n\t\t\tvar terminalState = this.state.getVisibleTerminalState(source);\n\t\t\tvar c = (index != null && (index == 0 || index >= this.state.absolutePoints.length - 1 ||\n\t\t\t\t(this.constructor == mxElbowEdgeHandler && index == 2))) ?\n\t\t\t\tthis.graph.getConnectionConstraint(this.state, terminalState, source) : null;\n\t\t\tvar pt = (c != null) ? this.graph.getConnectionPoint(this.state.getVisibleTerminalState(source), c) : null;\n\t\t\tvar img = (pt != null) ? (!target ? this.fixedHandleImage : this.endFixedHandleImage) :\n\t\t\t\t((c != null && terminalState != null) ? (!target ? this.terminalHandleImage : this.endTerminalHandleImage) :\n\t\t\t\t\t(!target ? this.handleImage : this.endHandleImage));\n\t\t\t\n\t\t\tif (img != null)\n\t\t\t{\n\t\t\t\tvar shape = new mxImageShape(new mxRectangle(0, 0, img.width, img.height), img.src);\n\t\t\t\t\n\t\t\t\t// Allows HTML rendering of the images\n\t\t\t\tshape.preserveImageAspect = false;\n\t\n\t\t\t\treturn shape;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tvar s = mxConstants.HANDLE_SIZE;\n\t\t\t\t\n\t\t\t\tif (this.preferHtml)\n\t\t\t\t{\n\t\t\t\t\ts -= 1;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\treturn new mxRectangleShape(new mxRectangle(0, 0, s, s), mxConstants.HANDLE_FILLCOLOR, mxConstants.HANDLE_STROKECOLOR);\n\t\t\t}\n\t\t};\n\t\n\t\tvar vertexHandlerCreateSizerShape = mxVertexHandler.prototype.createSizerShape;\n\t\tmxVertexHandler.prototype.createSizerShape = function(bounds, index, fillColor, image)\n\t\t{\n\t\t\timage = (index == mxEvent.ROTATION_HANDLE) ? HoverIcons.prototype.rotationHandle :\n\t\t\t\t(index == mxEvent.LABEL_HANDLE) ? this.secondaryHandleImage : image;\n\t\t\t\n\t\t\treturn vertexHandlerCreateSizerShape.apply(this, arguments);\n\t\t};\n\t\t\n\t\t// Special case for single edge label handle moving in which case the text bounding box is used\n\t\tvar mxGraphHandlerGetBoundingBox = mxGraphHandler.prototype.getBoundingBox;\n\t\tmxGraphHandler.prototype.getBoundingBox = function(cells)\n\t\t{\n\t\t\tif (cells != null && cells.length == 1)\n\t\t\t{\n\t\t\t\tvar model = this.graph.getModel();\n\t\t\t\tvar parent = model.getParent(cells[0]);\n\t\t\t\tvar geo = this.graph.getCellGeometry(cells[0]);\n\t\t\t\t\n\t\t\t\tif (model.isEdge(parent) && geo != null && geo.relative)\n\t\t\t\t{\n\t\t\t\t\tvar state = this.graph.view.getState(cells[0]);\n\t\t\t\t\t\n\t\t\t\t\tif (state != null && state.width < 2 && state.height < 2 && state.text != null &&\n\t\t\t\t\t\tstate.text.boundingBox != null)\n\t\t\t\t\t{\n\t\t\t\t\t\treturn mxRectangle.fromRectangle(state.text.boundingBox);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\treturn mxGraphHandlerGetBoundingBox.apply(this, arguments);\n\t\t};\n\n\t\t// Ignores child cells with part style as guides\n\t\tvar mxGraphHandlerGetGuideStates = mxGraphHandler.prototype.getGuideStates;\n\t\t\n\t\tmxGraphHandler.prototype.getGuideStates = function()\n\t\t{\n\t\t\tvar states = mxGraphHandlerGetGuideStates.apply(this, arguments);\n\t\t\tvar result = [];\n\t\t\t\n\t\t\t// NOTE: Could do via isStateIgnored hook\n\t\t\tfor (var i = 0; i < states.length; i++)\n\t\t\t{\n\t\t\t\tif (mxUtils.getValue(states[i].style, 'part', '0') != '1')\n\t\t\t\t{\n\t\t\t\t\tresult.push(states[i]);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\treturn result;\n\t\t};\n\n\t\t// Uses text bounding box for edge labels\n\t\tvar mxVertexHandlerGetSelectionBounds = mxVertexHandler.prototype.getSelectionBounds;\n\t\tmxVertexHandler.prototype.getSelectionBounds = function(state)\n\t\t{\n\t\t\tvar model = this.graph.getModel();\n\t\t\tvar parent = model.getParent(state.cell);\n\t\t\tvar geo = this.graph.getCellGeometry(state.cell);\n\t\t\t\n\t\t\tif (model.isEdge(parent) && geo != null && geo.relative && state.width < 2 && state.height < 2 && state.text != null && state.text.boundingBox != null)\n\t\t\t{\n\t\t\t\tvar bbox = state.text.unrotatedBoundingBox || state.text.boundingBox;\n\t\t\t\t\n\t\t\t\treturn new mxRectangle(Math.round(bbox.x), Math.round(bbox.y), Math.round(bbox.width), Math.round(bbox.height));\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn mxVertexHandlerGetSelectionBounds.apply(this, arguments);\n\t\t\t}\n\t\t};\n\t\n\t\t// Redirects moving of edge labels to mxGraphHandler by not starting here.\n\t\t// This will use the move preview of mxGraphHandler (see above).\n\t\tvar mxVertexHandlerMouseDown = mxVertexHandler.prototype.mouseDown;\n\t\tmxVertexHandler.prototype.mouseDown = function(sender, me)\n\t\t{\n\t\t\tvar model = this.graph.getModel();\n\t\t\tvar parent = model.getParent(this.state.cell);\n\t\t\tvar geo = this.graph.getCellGeometry(this.state.cell);\n\t\t\t\n\t\t\t// Lets rotation events through\n\t\t\tvar handle = this.getHandleForEvent(me);\n\t\t\t\n\t\t\tif (handle == mxEvent.ROTATION_HANDLE || !model.isEdge(parent) || geo == null || !geo.relative ||\n\t\t\t\tthis.state == null || this.state.width >= 2 || this.state.height >= 2)\n\t\t\t{\n\t\t\t\tmxVertexHandlerMouseDown.apply(this, arguments);\n\t\t\t}\n\t\t};\n\n\t\t// Invokes turn on single click on rotation handle\n\t\tmxVertexHandler.prototype.rotateClick = function()\n\t\t{\n\t\t\tvar stroke = mxUtils.getValue(this.state.style, mxConstants.STYLE_STROKECOLOR, mxConstants.NONE);\n\t\t\tvar fill = mxUtils.getValue(this.state.style, mxConstants.STYLE_FILLCOLOR, mxConstants.NONE);\n\t\t\t\n\t\t\tif (this.state.view.graph.model.isVertex(this.state.cell) &&\n\t\t\t\tstroke == mxConstants.NONE && fill == mxConstants.NONE)\n\t\t\t{\n\t\t\t\tvar angle = mxUtils.mod(mxUtils.getValue(this.state.style, mxConstants.STYLE_ROTATION, 0) + 90, 360);\n\t\t\t\tthis.state.view.graph.setCellStyles(mxConstants.STYLE_ROTATION, angle, [this.state.cell]);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tthis.state.view.graph.turnShapes([this.state.cell]);\n\t\t\t}\n\t\t};\n\n\t\tvar vertexHandlerMouseMove = mxVertexHandler.prototype.mouseMove;\n\t\n\t\t// Workaround for \"isConsumed not defined\" in MS Edge is to use arguments\n\t\tmxVertexHandler.prototype.mouseMove = function(sender, me)\n\t\t{\n\t\t\tvertexHandlerMouseMove.apply(this, arguments);\n\t\t\t\n\t\t\tif (this.graph.graphHandler.first != null)\n\t\t\t{\n\t\t\t\tif (this.rotationShape != null && this.rotationShape.node != null)\n\t\t\t\t{\n\t\t\t\t\tthis.rotationShape.node.style.display = 'none';\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (this.linkHint != null && this.linkHint.style.display != 'none')\n\t\t\t\t{\n\t\t\t\t\tthis.linkHint.style.display = 'none';\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\t\n\t\tvar vertexHandlerMouseUp = mxVertexHandler.prototype.mouseUp;\n\t\t\n\t\tmxVertexHandler.prototype.mouseUp = function(sender, me)\n\t\t{\n\t\t\tvertexHandlerMouseUp.apply(this, arguments);\n\t\t\t\n\t\t\t// Shows rotation handle only if one vertex is selected\n\t\t\tif (this.rotationShape != null && this.rotationShape.node != null)\n\t\t\t{\n\t\t\t\tthis.rotationShape.node.style.display = (this.graph.getSelectionCount() == 1) ? '' : 'none';\n\t\t\t}\n\t\t\t\n\t\t\tif (this.linkHint != null && this.linkHint.style.display == 'none')\n\t\t\t{\n\t\t\t\tthis.linkHint.style.display = '';\n\t\t\t}\n\t\t\t\n\t\t\t// Resets state after gesture\n\t\t\tthis.blockDelayedSelection = null;\n\t\t};\n\t\n\t\tvar vertexHandlerInit = mxVertexHandler.prototype.init;\n\t\tmxVertexHandler.prototype.init = function()\n\t\t{\n\t\t\tvertexHandlerInit.apply(this, arguments);\n\t\t\tvar redraw = false;\n\t\t\t\n\t\t\tif (this.rotationShape != null)\n\t\t\t{\n\t\t\t\tthis.rotationShape.node.setAttribute('title', mxResources.get('rotateTooltip'));\n\t\t\t}\n\n\t\t\tif (this.graph.isTable(this.state.cell) &&\n\t\t\t\tthis.graph.isCellMovable(this.state.cell))\n\t\t\t{\n\t\t\t\tthis.refreshMoveHandles();\n\t\t\t}\n\t\t\t// Draws corner rectangles for single selected table cells and rows\n\t\t\telse if (this.graph.getSelectionCount() == 1 &&\n\t\t\t\tthis.graph.isCellMovable(this.state.cell) &&\n\t\t\t\t(this.graph.isTableCell(this.state.cell) ||\n\t\t\t\tthis.graph.isTableRow(this.state.cell)))\n\t\t\t{\n\t\t\t\tthis.cornerHandles = []; \n\t\t\t\t\n\t\t\t\tfor (var i = 0; i < 4; i++)\n\t\t\t\t{\n\t\t\t\t\tvar shape = new mxRectangleShape(new mxRectangle(0, 0, 6, 6),\n\t\t\t\t\t\t'#ffffff', mxConstants.HANDLE_STROKECOLOR);\n\t\t\t\t\tshape.dialect =  mxConstants.DIALECT_SVG;\n\t\t\t\t\tshape.init(this.graph.view.getOverlayPane());\n\t\t\t\t\tthis.cornerHandles.push(shape);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tvar update = mxUtils.bind(this, function()\n\t\t\t{\n\t\t\t\tif (this.specialHandle != null)\n\t\t\t\t{\n\t\t\t\t\tthis.specialHandle.node.style.display = (this.graph.isEnabled() &&\n\t\t\t\t\t\tthis.graph.getSelectionCount() <= this.graph.graphHandler.maxCells) ?\n\t\t\t\t\t\t'' : 'none';\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tthis.redrawHandles();\n\t\t\t});\n\n\t\t\tthis.changeHandler = mxUtils.bind(this, function(sender, evt)\n\t\t\t{\n\t\t\t\tthis.updateLinkHint(this.graph.getLinkForCell(this.state.cell),\n\t\t\t\t\tthis.graph.getLinksForState(this.state));\n\t\t\t\tupdate();\n\t\t\t});\n\t\t\t\n\t\t\tthis.graph.getSelectionModel().addListener(mxEvent.CHANGE, this.changeHandler);\n\t\t\tthis.graph.getModel().addListener(mxEvent.CHANGE, this.changeHandler);\n\t\t\t\n\t\t\t// Repaint needed when editing stops and no change event is fired\n\t\t\tthis.editingHandler = mxUtils.bind(this, function(sender, evt)\n\t\t\t{\n\t\t\t\tthis.redrawHandles();\n\t\t\t});\n\t\t\t\n\t\t\tthis.graph.addListener(mxEvent.EDITING_STOPPED, this.editingHandler);\n\n\t\t\tvar link = this.graph.getLinkForCell(this.state.cell);\n\t\t\tvar links = this.graph.getLinksForState(this.state);\n\t\t\tthis.updateLinkHint(link, links);\n\t\t\t\n\t\t\tif (link != null || (links != null && links.length > 0))\n\t\t\t{\n\t\t\t\tredraw = true;\n\t\t\t}\n\t\t\t\n\t\t\tif (redraw)\n\t\t\t{\n\t\t\t\tthis.redrawHandles();\n\t\t\t}\n\t\t};\n\t\t\n\t\tmxVertexHandler.prototype.updateLinkHint = function(link, links)\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\tif ((link == null && (links == null || links.length == 0)) ||\n\t\t\t\t\tthis.graph.getSelectionCount() > 1)\n\t\t\t\t{\n\t\t\t\t\tif (this.linkHint != null)\n\t\t\t\t\t{\n\t\t\t\t\t\tthis.linkHint.parentNode.removeChild(this.linkHint);\n\t\t\t\t\t\tthis.linkHint = null;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if (link != null || (links != null && links.length > 0))\n\t\t\t\t{\n\t\t\t\t\tvar img = document.createElement('img');\n\t\t\t\t\timg.className = 'geAdaptiveAsset';\n\t\t\t\t\timg.setAttribute('src', Editor.editImage);\n\t\t\t\t\timg.setAttribute('title', mxResources.get('editLink'));\n\t\t\t\t\timg.setAttribute('width', '14');\n\t\t\t\t\timg.setAttribute('height', '14');\n\t\t\t\t\timg.style.paddingLeft = '8px';\n\t\t\t\t\timg.style.marginLeft = 'auto';\n\t\t\t\t\timg.style.marginBottom = '-1px';\n\t\t\t\t\timg.style.cursor = 'pointer';\n\n\t\t\t\t\tvar trash = img.cloneNode(true);\n\t\t\t\t\ttrash.setAttribute('src', Editor.trashImage);\n\t\t\t\t\ttrash.setAttribute('title', mxResources.get('removeIt',\n\t\t\t\t\t\t[mxResources.get('link')]));\n\t\t\t\t\ttrash.style.paddingLeft = '4px';\n\t\t\t\t\ttrash.style.marginLeft = '0';\n\n\t\t\t\t\tif (this.linkHint == null)\n\t\t\t\t\t{\n\t\t\t\t\t\tthis.linkHint = createHint();\n\t\t\t\t\t\tthis.linkHint.style.padding = '6px 8px 6px 8px';\n\t\t\t\t\t\tthis.linkHint.style.opacity = '1';\n\t\t\t\t\t\tthis.linkHint.style.filter = '';\n\t\t\t\t\t\t\n\t\t\t\t\t\tthis.graph.container.appendChild(this.linkHint);\n\n\t\t\t\t\t\tmxEvent.addListener(this.linkHint, 'mouseenter', mxUtils.bind(this, function()\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tthis.graph.tooltipHandler.hide();\n\t\t\t\t\t\t}));\n\t\t\t\t\t}\n\t\n\t\t\t\t\tthis.linkHint.innerText = '';\n\t\t\t\t\t\n\t\t\t\t\tif (link != null)\n\t\t\t\t\t{\n\t\t\t\t\t\tvar wrapper = document.createElement('div');\n\t\t\t\t\t\twrapper.style.display = 'flex';\n\t\t\t\t\t\twrapper.style.alignItems = 'center';\n\t\t\t\t\t\twrapper.appendChild(this.graph.createLinkForHint(link));\n\n\t\t\t\t\t\tthis.linkHint.appendChild(wrapper);\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (this.graph.isEnabled() && typeof this.graph.editLink === 'function' &&\n\t\t\t\t\t\t\t!this.graph.isCellLocked(this.state.cell))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tvar changeLink = img.cloneNode(true);\n\t\t\t\t\t\t\twrapper.appendChild(changeLink);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tmxEvent.addListener(changeLink, 'click', mxUtils.bind(this, function(evt)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tthis.graph.setSelectionCell(this.state.cell);\n\t\t\t\t\t\t\t\tthis.graph.editLink();\n\t\t\t\t\t\t\t\tmxEvent.consume(evt);\n\t\t\t\t\t\t\t}));\n\n\t\t\t\t\t\t\tvar trashLink = trash.cloneNode(true);\n\t\t\t\t\t\t\twrapper.appendChild(trashLink);\n\n\t\t\t\t\t\t\tmxEvent.addListener(trashLink, 'click', mxUtils.bind(this, function(evt)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tthis.graph.setLinkForCell(this.state.cell, null);\n\t\t\t\t\t\t\t\tmxEvent.consume(evt);\n\t\t\t\t\t\t\t}));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\n\t\t\t\t\tif (links != null)\n\t\t\t\t\t{\n\t\t\t\t\t\tfor (var i = 0; i < links.length; i++)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t(mxUtils.bind(this, function(currentLink, index)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tvar div = document.createElement('div');\n\t\t\t\t\t\t\t\tdiv.style.display = 'flex';\n\t\t\t\t\t\t\t\tdiv.style.alignItems = 'center';\n\t\t\t\t\t\t\t\tdiv.style.marginTop = (link != null || index > 0) ? '6px' : '0px';\n\t\t\t\t\t\t\t\tdiv.appendChild(this.graph.createLinkForHint(\n\t\t\t\t\t\t\t\t\tcurrentLink.getAttribute('href'),\n\t\t\t\t\t\t\t\t\tmxUtils.getTextContent(currentLink)));\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tvar changeLink = img.cloneNode(true);\n\t\t\t\t\t\t\t\tdiv.appendChild(changeLink);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tvar updateLink = mxUtils.bind(this, function(value)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tvar tmp = document.createElement('div');\n\t\t\t\t\t\t\t\t\ttmp.innerHTML = Graph.sanitizeHtml(this.graph.getLabel(this.state.cell));\n\t\t\t\t\t\t\t\t\tvar anchor = tmp.getElementsByTagName('a')[index];\n\n\t\t\t\t\t\t\t\t\tif (value == null || value == '')\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tvar child = anchor.cloneNode(true).firstChild;\n\n\t\t\t\t\t\t\t\t\t\twhile (child != null)\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\tanchor.parentNode.insertBefore(child.cloneNode(true), anchor);\n\t\t\t\t\t\t\t\t\t\t\tchild = child.nextSibling;\n\t\t\t\t\t\t\t\t\t\t}\n\t\n\t\t\t\t\t\t\t\t\t\tanchor.parentNode.removeChild(anchor);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tanchor.setAttribute('href', value);\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\tthis.graph.labelChanged(this.state.cell, tmp.innerHTML);\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tmxEvent.addListener(changeLink, 'click', mxUtils.bind(this, function(evt)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tthis.graph.showLinkDialog(currentLink.getAttribute('href') || '',\n\t\t\t\t\t\t\t\t\t\tmxResources.get('apply'), updateLink);\n\t\t\t\t\t\t\t\t\tmxEvent.consume(evt);\n\t\t\t\t\t\t\t\t}));\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tvar trashLink = trash.cloneNode(true);\n\t\t\t\t\t\t\t\tdiv.appendChild(trashLink);\n\n\t\t\t\t\t\t\t\tmxEvent.addListener(trashLink, 'click', mxUtils.bind(this, function(evt)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tupdateLink();\n\t\t\t\t\t\t\t\t\tmxEvent.consume(evt);\n\t\t\t\t\t\t\t\t}));\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tthis.linkHint.appendChild(div);\n\t\t\t\t\t\t\t}))(links[i], i);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (this.linkHint != null)\n\t\t\t\t{\n\t\t\t\t\tGraph.sanitizeNode(this.linkHint);\n\t\t\t\t}\n\t\t\t}\n\t\t\tcatch (e)\n\t\t\t{\n\t\t\t\t// ignore\n\t\t\t}\n\t\t};\n\n\t\tmxEdgeHandler.prototype.updateLinkHint = mxVertexHandler.prototype.updateLinkHint;\n\n\t\t// Extends constraint handler\n\t\tvar edgeHandlerCreateConstraintHandler = mxEdgeHandler.prototype.createConstraintHandler;\n\n\t\tmxEdgeHandler.prototype.createConstraintHandler = function()\n\t\t{\n\t\t\tvar handler = edgeHandlerCreateConstraintHandler.apply(this, arguments);\n\n\t\t\t// Disables connection points\n\t\t\thandler.isEnabled = mxUtils.bind(this, function()\n\t\t\t{\n\t\t\t\treturn this.state.view.graph.connectionHandler.isEnabled();\n\t\t\t});\n\t\t\t\n\t\t\treturn handler;\n\t\t};\n\t\t\n\t\t// Creates special handles\n\t\tvar edgeHandlerInit = mxEdgeHandler.prototype.init;\n\t\tmxEdgeHandler.prototype.init = function()\n\t\t{\n\t\t\tedgeHandlerInit.apply(this, arguments);\n\t\t\t\n\t\t\tvar update = mxUtils.bind(this, function()\n\t\t\t{\n\t\t\t\tif (this.linkHint != null)\n\t\t\t\t{\n\t\t\t\t\tthis.linkHint.style.display = (this.graph.getSelectionCount() == 1) ? '' : 'none';\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (this.labelShape != null)\n\t\t\t\t{\n\t\t\t\t\tthis.labelShape.node.style.display = (this.graph.isEnabled() &&\n\t\t\t\t\t\tthis.graph.getSelectionCount() <= this.graph.graphHandler.maxCells) ?\n\t\t\t\t\t\t'' : 'none';\n\t\t\t\t}\n\t\t\t});\n\t\t\t\n\t\t\tthis.changeHandler = mxUtils.bind(this, function(sender, evt)\n\t\t\t{\n\t\t\t\tthis.updateLinkHint(this.graph.getLinkForCell(this.state.cell),\n\t\t\t\t\tthis.graph.getLinksForState(this.state));\n\t\t\t\tupdate();\n\t\t\t\tthis.redrawHandles();\n\t\t\t});\n\n\t\t\tthis.graph.getSelectionModel().addListener(mxEvent.CHANGE, this.changeHandler);\n\t\t\tthis.graph.getModel().addListener(mxEvent.CHANGE, this.changeHandler);\n\t\n\t\t\tvar link = this.graph.getLinkForCell(this.state.cell);\n\t\t\tvar links = this.graph.getLinksForState(this.state);\n\t\t\t\t\t\t\t\t\t\n\t\t\tif (link != null || (links != null && links.length > 0))\n\t\t\t{\n\t\t\t\tthis.updateLinkHint(link, links);\n\t\t\t\tthis.redrawHandles();\n\t\t\t}\n\t\t};\n\t\n\t\t// Disables connection points\n\t\tvar connectionHandlerInit = mxConnectionHandler.prototype.init;\n\t\t\n\t\tmxConnectionHandler.prototype.init = function()\n\t\t{\n\t\t\tconnectionHandlerInit.apply(this, arguments);\n\t\t\t\n\t\t\tthis.constraintHandler.isEnabled = mxUtils.bind(this, function()\n\t\t\t{\n\t\t\t\treturn this.graph.connectionHandler.isEnabled();\n\t\t\t});\n\t\t};\n\t\n\t\t// Updates special handles\n\t\tvar vertexHandlerRedrawHandles = mxVertexHandler.prototype.redrawHandles;\n\t\tmxVertexHandler.prototype.redrawHandles = function()\n\t\t{\n\t\t\tif (this.moveHandles != null)\n\t\t\t{\n\t\t\t\tfor (var i = 0; i < this.moveHandles.length; i++)\n\t\t\t\t{\n\t\t\t\t\tif (this.moveHandles[i] != null)\n\t\t\t\t\t{\n\t\t\t\t\t\tthis.moveHandles[i].bounds.x = Math.round(this.moveHandles[i].rowState.x +\n\t\t\t\t\t\t\tthis.moveHandles[i].rowState.width - this.moveHandles[i].bounds.width / 2);\n\t\t\t\t\t\tthis.moveHandles[i].bounds.y = Math.round(this.moveHandles[i].rowState.y +\n\t\t\t\t\t\t\t(this.moveHandles[i].rowState.height - this.moveHandles[i].bounds.height) / 2);\n\t\t\t\t\t\tthis.moveHandles[i].redraw();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif (this.cornerHandles != null)\n\t\t\t{\n\t\t\t\tvar inset = this.getSelectionBorderInset();\n\t\t\t\tvar ch = this.cornerHandles;\n\t\t\t\tvar w = ch[0].bounds.width / 2;\n\t\t\t\tvar h = ch[0].bounds.height / 2;\n\t\t\t\t\n\t\t\t\tch[0].bounds.x = this.state.x - w + inset;\n\t\t\t\tch[0].bounds.y = this.state.y - h + inset;\n\t\t\t\tch[0].redraw();\n\t\t\t\tch[1].bounds.x = ch[0].bounds.x + this.state.width - 2 * inset;\n\t\t\t\tch[1].bounds.y = ch[0].bounds.y;\n\t\t\t\tch[1].redraw();\n\t\t\t\tch[2].bounds.x = ch[0].bounds.x;\n\t\t\t\tch[2].bounds.y = this.state.y + this.state.height - 2 * inset;\n\t\t\t\tch[2].redraw();\n\t\t\t\tch[3].bounds.x = ch[1].bounds.x;\n\t\t\t\tch[3].bounds.y = ch[2].bounds.y;\n\t\t\t\tch[3].redraw();\n\t\t\t\t\n\t\t\t\tfor (var i = 0; i < this.cornerHandles.length; i++)\n\t\t\t\t{\n\t\t\t\t\tthis.cornerHandles[i].node.style.display = (this.graph.getSelectionCount() == 1) ? '' : 'none';\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// Shows rotation handle only if one vertex is selected\n\t\t\tif (this.rotationShape != null && this.rotationShape.node != null)\n\t\t\t{\n\t\t\t\tthis.rotationShape.node.style.display = (this.moveHandles == null &&\n\t\t\t\t\t(this.graph.getSelectionCount() == 1 && (this.index == null ||\n\t\t\t\t\tthis.index == mxEvent.ROTATION_HANDLE))) ? '' : 'none';\n\t\t\t}\n\n\t\t\tvertexHandlerRedrawHandles.apply(this);\n\n\t\t\tif (this.state != null && this.linkHint != null)\n\t\t\t{\n\t\t\t\tvar c = new mxPoint(this.state.getCenterX(), this.state.getCenterY());\n\t\t\t\tvar tmp = new mxRectangle(this.state.x, this.state.y - 22, this.state.width + 24, this.state.height + 22);\n\t\t\t\tvar bb = mxUtils.getBoundingBox(tmp, this.state.style[mxConstants.STYLE_ROTATION] || '0', c);\n\t\t\t\tvar rs = (bb != null) ? mxUtils.getBoundingBox(this.state,\n\t\t\t\t\tthis.state.style[mxConstants.STYLE_ROTATION] || '0') : this.state;\n\t\t\t\tvar tb = (this.state.text != null) ? this.state.text.boundingBox : null;\n\t\t\t\t\n\t\t\t\tif (bb == null)\n\t\t\t\t{\n\t\t\t\t\tbb = this.state;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tvar b = bb.y + bb.height;\n\t\t\t\t\n\t\t\t\tif (tb != null)\n\t\t\t\t{\n\t\t\t\t\tb = Math.max(b, tb.y + tb.height);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tthis.linkHint.style.left = Math.max(0, Math.round(rs.x + (rs.width - this.linkHint.clientWidth) / 2)) + 'px';\n\t\t\t\tthis.linkHint.style.top = Math.round(b + this.verticalOffset / 2 + Editor.hintOffset) + 'px';\n\t\t\t}\n\t\t};\n\t\t\n\t\t// Destroys special handles\n\t\tvar vertexHandlerDestroy = mxVertexHandler.prototype.destroy;\n\t\tmxVertexHandler.prototype.destroy = function()\n\t\t{\n\t\t\tvertexHandlerDestroy.apply(this, arguments);\n\n\t\t\tthis.destroyMoveHandles();\n\t\t\t\n\t\t\tif (this.cornerHandles != null)\n\t\t\t{\n\t\t\t\tfor (var i = 0; i < this.cornerHandles.length; i++)\n\t\t\t\t{\n\t\t\t\t\tif (this.cornerHandles[i] != null && this.cornerHandles[i].node != null &&\n\t\t\t\t\t\tthis.cornerHandles[i].node.parentNode != null)\n\t\t\t\t\t{\n\t\t\t\t\t\tthis.cornerHandles[i].node.parentNode.removeChild(this.cornerHandles[i].node);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tthis.cornerHandles = null;\n\t\t\t}\n\t\t\t\n\t\t\tif (this.linkHint != null)\n\t\t\t{\n\t\t\t\tif (this.linkHint.parentNode != null)\n\t\t\t\t{\n\t\t\t\t\tthis.linkHint.parentNode.removeChild(this.linkHint);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tthis.linkHint = null;\n\t\t\t}\n\n\t\t\tif  (this.changeHandler != null)\n\t\t\t{\n\t\t\t\tthis.graph.getSelectionModel().removeListener(this.changeHandler);\n\t\t\t\tthis.graph.getModel().removeListener(this.changeHandler);\n\t\t\t\tthis.changeHandler = null;\n\t\t\t}\n\t\t\t\n\t\t\tif  (this.editingHandler != null)\n\t\t\t{\n\t\t\t\tthis.graph.removeListener(this.editingHandler);\n\t\t\t\tthis.editingHandler = null;\n\t\t\t}\n\t\t};\n\t\t\n\t\tvar edgeHandlerRedrawHandles = mxEdgeHandler.prototype.redrawHandles;\n\t\tmxEdgeHandler.prototype.redrawHandles = function()\n\t\t{\n\t\t\t// Workaround for special case where handler\n\t\t\t// is reset before this which leads to a NPE\n\t\t\tif (this.marker != null)\n\t\t\t{\n\t\t\t\tedgeHandlerRedrawHandles.apply(this);\n\t\t\n\t\t\t\tif (this.state != null && this.linkHint != null)\n\t\t\t\t{\n\t\t\t\t\tvar b = this.state;\n\t\t\t\t\t\n\t\t\t\t\tif (this.state.text != null && this.state.text.bounds != null)\n\t\t\t\t\t{\n\t\t\t\t\t\tb = new mxRectangle(b.x, b.y, b.width, b.height);\n\t\t\t\t\t\tb.add(this.state.text.bounds);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tthis.linkHint.style.left = Math.max(0, Math.round(b.x + (b.width - this.linkHint.clientWidth) / 2)) + 'px';\n\t\t\t\t\tthis.linkHint.style.top = Math.round(b.y + b.height + Editor.hintOffset) + 'px';\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\n\t\tvar edgeHandlerReset = mxEdgeHandler.prototype.reset;\n\t\tmxEdgeHandler.prototype.reset = function()\n\t\t{\n\t\t\tedgeHandlerReset.apply(this, arguments);\n\t\t\t\n\t\t\tif (this.linkHint != null)\n\t\t\t{\n\t\t\t\tthis.linkHint.style.visibility = '';\n\t\t\t}\n\t\t};\n\t\t\n\t\tvar edgeHandlerDestroy = mxEdgeHandler.prototype.destroy;\n\t\tmxEdgeHandler.prototype.destroy = function()\n\t\t{\n\t\t\tedgeHandlerDestroy.apply(this, arguments);\n\t\t\t\n\t\t\tif (this.linkHint != null)\n\t\t\t{\n\t\t\t\tthis.linkHint.parentNode.removeChild(this.linkHint);\n\t\t\t\tthis.linkHint = null;\n\t\t\t}\n\t\n\t\t\tif  (this.changeHandler != null)\n\t\t\t{\n\t\t\t\tthis.graph.getModel().removeListener(this.changeHandler);\n\t\t\t\tthis.graph.getSelectionModel().removeListener(this.changeHandler);\n\t\t\t\tthis.changeHandler = null;\n\t\t\t}\n\t\t};\n\t})();\n}\n"
  },
  {
    "path": "static/cherry/drawio_demo/Init.js",
    "content": "// urlParams is null when used for embedding\nwindow.urlParams = window.urlParams || {};\n\n// Public global variables\nwindow.DOM_PURIFY_CONFIG = window.DOM_PURIFY_CONFIG ||\n    {ADD_TAGS: ['use'], FORBID_TAGS: ['form'],\n    ALLOWED_URI_REGEXP: /^((?!javascript:).)*$/i,\n    ADD_ATTR: ['target', 'content']};\n// Public global variables\nwindow.MAX_REQUEST_SIZE = window.MAX_REQUEST_SIZE  || 10485760;\nwindow.MAX_AREA = window.MAX_AREA || 15000 * 15000;\n\n// URLs for save and export\nwindow.EXPORT_URL = window.EXPORT_URL || './drawio_demo';\nwindow.SAVE_URL = window.SAVE_URL || './drawio_demo';\nwindow.PROXY_URL = window.PROXY_URL || null;\nwindow.OPEN_URL = window.OPEN_URL || './drawio_demo';\nwindow.RESOURCES_PATH = window.RESOURCES_PATH || './drawio_demo/resources';\nwindow.STENCIL_PATH = window.STENCIL_PATH || './drawio_demo/image/stencils';\nwindow.IMAGE_PATH = window.IMAGE_PATH || './drawio_demo/image';\nwindow.STYLE_PATH = window.STYLE_PATH || './drawio_demo/src/css';\nwindow.CSS_PATH = window.CSS_PATH || './drawio_demo/src/css';\nwindow.OPEN_FORM = window.OPEN_FORM ||  './drawio_demo';\n\nwindow.mxBasePath = window.mxBasePath || './drawio_demo/src';\nwindow.mxLanguage = window.mxLanguage || window.RESOURCES_PATH + '/zh';\nwindow.mxLanguages = window.mxLanguages || ['zh'];\n"
  },
  {
    "path": "static/cherry/drawio_demo/Menus.js",
    "content": "/**\n * Copyright (c) 2006-2012, JGraph Ltd\n */\n/**\n * Constructs a new graph editor\n */\nMenus = function(editorUi)\n{\n\tthis.editorUi = editorUi;\n\tthis.menus = new Object();\n\tthis.init();\n\t\n\t// Pre-fetches checkmark image\n\tif (!mxClient.IS_SVG)\n\t{\n\t\tnew Image().src = this.checkmarkImage;\n\t}\n};\n\n/**\n * Sets the default font family.\n */\nMenus.prototype.defaultFont = 'Helvetica';\n\n/**\n * Sets the default font size.\n */\nMenus.prototype.defaultFontSize = '12';\n\n/**\n * Sets the default font size.\n */\nMenus.prototype.defaultMenuItems = ['file', 'edit', 'view', 'arrange', 'extras', 'help'];\n\n/**\n * Adds the label menu items to the given menu and parent.\n */\nMenus.prototype.defaultFonts = ['Helvetica', 'Verdana', 'Times New Roman', 'Garamond', 'Comic Sans MS',\n           \t\t             'Courier New', 'Georgia', 'Lucida Console', 'Tahoma'];\n\n/**\n * Adds the label menu items to the given menu and parent.\n */\nMenus.prototype.autoPopup = true;\n\n/**\n * Adds the label menu items to the given menu and parent.\n */\nMenus.prototype.init = function()\n{\n\tvar ui = this.editorUi;\n\tvar graph = ui.editor.graph;\n\tvar isGraphEnabled = mxUtils.bind(graph, graph.isEnabled);\n\n\tthis.customFonts = [];\n\tthis.customFontSizes = [];\n\t\n\tthis.put('fontFamily', new Menu(mxUtils.bind(this, function(menu, parent)\n\t{\n\t\tvar addItem = mxUtils.bind(this, function(fontFamily)\n\t\t{\n\t\t\tvar tr = this.styleChange(menu, fontFamily, [mxConstants.STYLE_FONTFAMILY],\n\t\t\t\t[fontFamily], null, parent, function()\n\t\t\t{\n\t\t\t\tdocument.execCommand('fontname', false, fontFamily);\n\t\t\t\tui.fireEvent(new mxEventObject('styleChanged',\n\t\t\t\t\t'keys', [mxConstants.STYLE_FONTFAMILY],\n\t\t\t\t\t'values', [fontFamily],\n\t\t\t\t\t'cells', [graph.cellEditor.getEditingCell()]));\n\t\t\t}, function()\n\t\t\t{\n\t\t\t\tgraph.updateLabelElements(graph.getSelectionCells(), function(elt)\n\t\t\t\t{\n\t\t\t\t\telt.removeAttribute('face');\n\t\t\t\t\telt.style.fontFamily = null;\n\t\t\t\t\t\n\t\t\t\t\tif (elt.nodeName == 'PRE')\n\t\t\t\t\t{\n\t\t\t\t\t\tgraph.replaceElement(elt, 'div');\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t});\n\n\t\t\ttr.firstChild.nextSibling.style.fontFamily = fontFamily;\n\t\t});\n\t\t\n\t\tfor (var i = 0; i < this.defaultFonts.length; i++)\n\t\t{\n\t\t\taddItem(this.defaultFonts[i]);\n\t\t}\n\n\t\tmenu.addSeparator(parent);\n\t\t\n\t\tif (this.customFonts.length > 0)\n\t\t{\n\t\t\tfor (var i = 0; i < this.customFonts.length; i++)\n\t\t\t{\n\t\t\t\taddItem(this.customFonts[i]);\n\t\t\t}\n\t\t\t\n\t\t\tmenu.addSeparator(parent);\n\t\t\t\n\t\t\tmenu.addItem(mxResources.get('reset'), null, mxUtils.bind(this, function()\n\t\t\t{\n\t\t\t\tthis.customFonts = [];\n\t\t\t\tthis.editorUi.fireEvent(new mxEventObject('customFontsChanged'));\n\t\t\t}), parent);\n\t\t\t\n\t\t\tmenu.addSeparator(parent);\n\t\t}\n\t\t\n\t\tthis.promptChange(menu, mxResources.get('custom') + '...', '', mxConstants.DEFAULT_FONTFAMILY, mxConstants.STYLE_FONTFAMILY, parent, true, mxUtils.bind(this, function(newValue)\n\t\t{\n\t\t\tif (mxUtils.indexOf(this.customFonts, newValue) < 0)\n\t\t\t{\n\t\t\t\tthis.customFonts.push(newValue);\n\t\t\t\tthis.editorUi.fireEvent(new mxEventObject('customFontsChanged'));\n\t\t\t}\n\t\t}));\n\t})));\n\tthis.put('formatBlock', new Menu(mxUtils.bind(this, function(menu, parent)\n\t{\n\t\tfunction addItem(label, tag)\n\t\t{\n\t\t\treturn menu.addItem(label, null, mxUtils.bind(this, function()\n\t\t\t{\n\t\t\t\t// TODO: Check if visible\n\t\t\t\tif (graph.cellEditor.textarea != null)\n\t\t\t\t{\n\t\t\t\t\tgraph.cellEditor.textarea.focus();\n\t\t      \t\tdocument.execCommand('formatBlock', false, '<' + tag + '>');\n\t\t\t\t}\n\t\t\t}), parent);\n\t\t};\n\t\t\n\t\taddItem(mxResources.get('normal'), 'p');\n\t\t\n\t\taddItem('', 'h1').firstChild.nextSibling.innerHTML = '<h1 style=\"margin:0px;\">' + mxResources.get('heading') + ' 1</h1>';\n\t\taddItem('', 'h2').firstChild.nextSibling.innerHTML = '<h2 style=\"margin:0px;\">' + mxResources.get('heading') + ' 2</h2>';\n\t\taddItem('', 'h3').firstChild.nextSibling.innerHTML = '<h3 style=\"margin:0px;\">' + mxResources.get('heading') + ' 3</h3>';\n\t\taddItem('', 'h4').firstChild.nextSibling.innerHTML = '<h4 style=\"margin:0px;\">' + mxResources.get('heading') + ' 4</h4>';\n\t\taddItem('', 'h5').firstChild.nextSibling.innerHTML = '<h5 style=\"margin:0px;\">' + mxResources.get('heading') + ' 5</h5>';\n\t\taddItem('', 'h6').firstChild.nextSibling.innerHTML = '<h6 style=\"margin:0px;\">' + mxResources.get('heading') + ' 6</h6>';\n\t\t\n\t\taddItem('', 'pre').firstChild.nextSibling.innerHTML = '<pre style=\"margin:0px;\">' + mxResources.get('formatted') + '</pre>';\n\t\taddItem('', 'blockquote').firstChild.nextSibling.innerHTML = '<blockquote style=\"margin-top:0px;margin-bottom:0px;\">' + mxResources.get('blockquote') + '</blockquote>';\n\t})));\n\tthis.put('fontSize', new Menu(mxUtils.bind(this, function(menu, parent)\n\t{\n\t\tvar sizes = [6, 8, 9, 10, 11, 12, 14, 18, 24, 36, 48, 72];\n\n\t\tif (mxUtils.indexOf(sizes, this.defaultFontSize) < 0)\n\t\t{\n\t\t\tsizes.push(this.defaultFontSize);\n\t\t\tsizes.sort(function(a, b)\n\t\t\t{\n\t\t\t\treturn a - b;\n\t\t\t});\n\t\t}\n\n\t\tvar setFontSize = mxUtils.bind(this, function(fontSize)\n\t\t{\n\t\t\tif (graph.cellEditor.textarea != null)\n\t\t\t{\n\t\t\t\t// Creates an element with arbitrary size 3\n\t\t\t\tdocument.execCommand('fontSize', false, '3');\n\t\t\t\t\n\t\t\t\t// Changes the css font size of the first font element inside the in-place editor with size 3\n\t\t\t\t// hopefully the above element that we've just created. LATER: Check for new element using\n\t\t\t\t// previous result of getElementsByTagName (see other actions)\n\t\t\t\tvar elts = graph.cellEditor.textarea.getElementsByTagName('font');\n\t\t\t\t\n\t\t\t\tfor (var i = 0; i < elts.length; i++)\n\t\t\t\t{\n\t\t\t\t\tif (elts[i].getAttribute('size') == '3')\n\t\t\t\t\t{\n\t\t\t\t\t\telts[i].removeAttribute('size');\n\t\t\t\t\t\telts[i].style.fontSize = fontSize + 'px';\n\t\t\t\t\t\t\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tui.fireEvent(new mxEventObject('styleChanged',\n\t\t\t\t\t'keys', [mxConstants.STYLE_FONTSIZE],\n\t\t\t\t\t'values', [fontSize],\n\t\t\t\t\t'cells', [graph.cellEditor.getEditingCell()]));\n\t\t\t}\n\t\t});\n\t\t\n\t\tvar addItem = mxUtils.bind(this, function(fontSize)\n\t\t{\n\t\t\tthis.styleChange(menu, fontSize, [mxConstants.STYLE_FONTSIZE],\n\t\t\t\t[fontSize], null, parent, function()\n\t\t\t{\n\t\t\t\tsetFontSize(fontSize);\n\t\t\t});\n\t\t});\n\t\t\n\t\tfor (var i = 0; i < sizes.length; i++)\n\t\t{\n\t\t\taddItem(sizes[i]);\n\t\t}\n\n\t\tmenu.addSeparator(parent);\n\t\t\n\t\tif (this.customFontSizes.length > 0)\n\t\t{\n\t\t\tvar counter = 0;\n\n\t\t\tfor (var i = 0; i < this.customFontSizes.length; i++)\n\t\t\t{\n\t\t\t\tif (mxUtils.indexOf(sizes, this.customFontSizes[i]) < 0)\n\t\t\t\t{\n\t\t\t\t\taddItem(this.customFontSizes[i]);\n\t\t\t\t\tcounter++;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif (counter > 0)\n\t\t\t{\n\t\t\t\tmenu.addSeparator(parent);\n\t\t\t}\n\t\t\t\n\t\t\tmenu.addItem(mxResources.get('reset'), null, mxUtils.bind(this, function()\n\t\t\t{\n\t\t\t\tthis.customFontSizes = [];\n\t\t\t}), parent);\n\t\t\t\n\t\t\tmenu.addSeparator(parent);\n\t\t}\n\n\t\tvar selState = null;\n\t\t\n\t\tthis.promptChange(menu, mxResources.get('custom') + '...',\n\t\t\t'(' + mxResources.get('points') + ')', this.defaultFontSize,\n\t\t\tmxConstants.STYLE_FONTSIZE, parent, true,\n\t\t\tmxUtils.bind(this, function(newValue)\n\t\t{\n\t\t\tif (selState != null && graph.cellEditor.textarea != null)\n\t\t\t{\n\t\t\t\tgraph.cellEditor.textarea.focus();\n\t\t\t\tgraph.cellEditor.restoreSelection(selState);\n\t\t\t}\n\n\t\t\tif (newValue != null && newValue.length > 0)\n\t\t\t{\n\t\t\t\tthis.customFontSizes.push(newValue);\n\t\t\t\tsetFontSize(newValue);\n\t\t\t}\n\t\t}), null, function()\n\t\t{\n\t\t\tselState = graph.cellEditor.saveSelection();\n\n\t\t\treturn false;\n\t\t});\n\t})));\n\tthis.put('direction', new Menu(mxUtils.bind(this, function(menu, parent)\n\t{\n\t\tmenu.addItem(mxResources.get('flipH'), null, function() { graph.toggleCellStyles(mxConstants.STYLE_FLIPH, false); }, parent);\n\t\tmenu.addItem(mxResources.get('flipV'), null, function() { graph.toggleCellStyles(mxConstants.STYLE_FLIPV, false); }, parent);\n\t\tthis.addMenuItems(menu, ['-', 'rotation'], parent);\n\t})));\n\tthis.put('align', new Menu(mxUtils.bind(this, function(menu, parent)\n\t{\n\t\tvar ss = this.editorUi.getSelectionState();\n\t\tvar enabled = ss.vertices.length > 1;\n\t\tmenu.addItem(mxResources.get('leftAlign'), null, function() { graph.alignCells(mxConstants.ALIGN_LEFT); }, parent, null, enabled);\n\t\tmenu.addItem(mxResources.get('center'), null, function() { graph.alignCells(mxConstants.ALIGN_CENTER); }, parent, null, enabled);\n\t\tmenu.addItem(mxResources.get('rightAlign'), null, function() { graph.alignCells(mxConstants.ALIGN_RIGHT); }, parent, null, enabled);\n\t\tmenu.addSeparator(parent);\n\t\tmenu.addItem(mxResources.get('topAlign'), null, function() { graph.alignCells(mxConstants.ALIGN_TOP); }, parent, null, enabled);\n\t\tmenu.addItem(mxResources.get('middle'), null, function() { graph.alignCells(mxConstants.ALIGN_MIDDLE); }, parent, null, enabled);\n\t\tmenu.addItem(mxResources.get('bottomAlign'), null, function() { graph.alignCells(mxConstants.ALIGN_BOTTOM); }, parent, null, enabled);\n\t\tthis.addMenuItems(menu, ['-', 'snapToGrid'], parent);\n\t})));\n\tthis.put('distribute', new Menu(mxUtils.bind(this, function(menu, parent)\n\t{\n\t\tmenu.addItem(mxResources.get('horizontal'), null, function() { graph.distributeCells(true); }, parent);\n\t\tmenu.addItem(mxResources.get('vertical'), null, function() { graph.distributeCells(false); }, parent);\n\t\tmenu.addSeparator(parent);\n\t\tthis.addSubmenu('distributeSpacing', menu, parent, mxResources.get('spacing'));\n\t})));\n\tthis.put('distributeSpacing', new Menu(mxUtils.bind(this, function(menu, parent)\n\t{\n\t\tmenu.addItem(mxResources.get('horizontal'), null, function() { graph.distributeCells(true, null, true); }, parent);\n\t\tmenu.addItem(mxResources.get('vertical'), null, function() { graph.distributeCells(false, null, true); }, parent);\n\t})));\n\tthis.put('line', new Menu(mxUtils.bind(this, function(menu, parent)\n\t{\n\t\tvar state = graph.view.getState(graph.getSelectionCell());\n\t\t\n\t\tif (state != null)\n\t\t{\n\t\t\tvar shape = mxUtils.getValue(state.style, mxConstants.STYLE_SHAPE);\n\t\t\n\t\t\tif (shape != 'arrow')\n\t\t\t{\n\t\t\t\tthis.edgeStyleChange(menu, '', [mxConstants.STYLE_EDGE, mxConstants.STYLE_CURVED, mxConstants.STYLE_NOEDGESTYLE],\n\t\t\t\t\t[null, null, null], 'geIcon geSprite geSprite-straight', parent, true).setAttribute('title', mxResources.get('straight'));\n\t\t\t\tthis.edgeStyleChange(menu, '', [mxConstants.STYLE_EDGE, mxConstants.STYLE_CURVED, mxConstants.STYLE_NOEDGESTYLE],\n\t\t\t\t\t['orthogonalEdgeStyle', null, null], 'geIcon geSprite geSprite-orthogonal', parent, true).setAttribute('title', mxResources.get('orthogonal'));\n\t\t\t\tthis.edgeStyleChange(menu, '', [mxConstants.STYLE_EDGE, mxConstants.STYLE_ELBOW, mxConstants.STYLE_CURVED, mxConstants.STYLE_NOEDGESTYLE],\n\t\t\t\t\t['elbowEdgeStyle', null, null, null], 'geIcon geSprite geSprite-horizontalelbow', parent, true).setAttribute('title', mxResources.get('simple'));\n\t\t\t\tthis.edgeStyleChange(menu, '', [mxConstants.STYLE_EDGE, mxConstants.STYLE_ELBOW, mxConstants.STYLE_CURVED, mxConstants.STYLE_NOEDGESTYLE],\n\t\t\t\t\t['elbowEdgeStyle', 'vertical', null, null], 'geIcon geSprite geSprite-verticalelbow', parent, true).setAttribute('title', mxResources.get('simple'));\n\t\t\t\tthis.edgeStyleChange(menu, '', [mxConstants.STYLE_EDGE, mxConstants.STYLE_ELBOW, mxConstants.STYLE_CURVED, mxConstants.STYLE_NOEDGESTYLE],\n\t\t\t\t\t['isometricEdgeStyle', null, null, null], 'geIcon geSprite geSprite-horizontalisometric', parent, true).setAttribute('title', mxResources.get('isometric'));\n\t\t\t\tthis.edgeStyleChange(menu, '', [mxConstants.STYLE_EDGE, mxConstants.STYLE_ELBOW, mxConstants.STYLE_CURVED, mxConstants.STYLE_NOEDGESTYLE],\n\t\t\t\t\t['isometricEdgeStyle', 'vertical', null, null], 'geIcon geSprite geSprite-verticalisometric', parent, true).setAttribute('title', mxResources.get('isometric'));\n\t\t\n\t\t\t\tif (shape == 'connector')\n\t\t\t\t{\n\t\t\t\t\tthis.edgeStyleChange(menu, '', [mxConstants.STYLE_EDGE, mxConstants.STYLE_CURVED, mxConstants.STYLE_NOEDGESTYLE],\n\t\t\t\t\t\t['orthogonalEdgeStyle', '1', null], 'geIcon geSprite geSprite-curved', parent, true).setAttribute('title', mxResources.get('curved'));\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tthis.edgeStyleChange(menu, '', [mxConstants.STYLE_EDGE, mxConstants.STYLE_CURVED, mxConstants.STYLE_NOEDGESTYLE],\n\t\t\t\t\t['entityRelationEdgeStyle', null, null], 'geIcon geSprite geSprite-entity', parent, true).setAttribute('title', mxResources.get('entityRelation'));\n\t\t\t}\n\t\t\t\n\t\t\tmenu.addSeparator(parent);\n\n\t\t\tthis.styleChange(menu, '', [mxConstants.STYLE_SHAPE, mxConstants.STYLE_STARTSIZE, mxConstants.STYLE_ENDSIZE, 'width'],\n\t\t\t\t[null, null, null, null], 'geIcon geSprite geSprite-connection', parent, null, null, true).setAttribute('title', mxResources.get('line'));\n\t\t\tthis.styleChange(menu, '', [mxConstants.STYLE_SHAPE, mxConstants.STYLE_STARTSIZE, mxConstants.STYLE_ENDSIZE, 'width'],\n\t\t\t\t['link', null, null, null], 'geIcon geSprite geSprite-linkedge', parent, null, null, true).setAttribute('title', mxResources.get('link'));\n\t\t\tthis.styleChange(menu, '', [mxConstants.STYLE_SHAPE, mxConstants.STYLE_STARTSIZE, mxConstants.STYLE_ENDSIZE, 'width'],\n\t\t\t\t['flexArrow', null, null, null], 'geIcon geSprite geSprite-arrow', parent, null, null, true).setAttribute('title', mxResources.get('arrow'));\n\t\t\tthis.styleChange(menu, '', [mxConstants.STYLE_SHAPE, mxConstants.STYLE_STARTSIZE, mxConstants.STYLE_ENDSIZE, 'width'],\n\t\t\t\t['arrow', null, null, null], 'geIcon geSprite geSprite-simplearrow', parent, null, null, true).setAttribute('title', mxResources.get('simpleArrow'));\n\t\t}\n\t})));\n\tthis.put('layout', new Menu(mxUtils.bind(this, function(menu, parent)\n\t{\n\t\tvar promptSpacing = mxUtils.bind(this, function(defaultValue, fn)\n\t\t{\n\t\t\tthis.editorUi.prompt(mxResources.get('spacing'), defaultValue, fn);\n\t\t});\n\n\t\tvar runTreeLayout = mxUtils.bind(this, function(layout)\n\t\t{\n\t\t\tthis.editorUi.tryAndHandle(mxUtils.bind(this, function()\n\t\t\t{\n\t\t\t\tvar tmp = graph.getSelectionCell();\n\t\t\t\tvar roots = null;\n\t\t\t\t\n\t\t\t\tif (tmp == null || graph.getModel().getChildCount(tmp) == 0)\n\t\t\t\t{\n\t\t\t\t\tif (graph.getModel().getEdgeCount(tmp) == 0)\n\t\t\t\t\t{\n\t\t\t\t\t\troots = graph.findTreeRoots(graph.getDefaultParent());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\troots = graph.findTreeRoots(tmp);\n\t\t\t\t}\n\t\n\t\t\t\tif (roots != null && roots.length > 0)\n\t\t\t\t{\n\t\t\t\t\ttmp = roots[0];\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (tmp != null)\n\t\t\t\t{\n\t\t\t\t\tthis.editorUi.executeLayout(function()\n\t\t\t\t\t{\n\t\t\t\t\t\tlayout.execute(graph.getDefaultParent(), tmp);\n\n\t\t\t\t\t\tif (!graph.isSelectionEmpty())\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\ttmp = graph.getModel().getParent(tmp);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif (graph.getModel().isVertex(tmp))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tgraph.updateGroupBounds([tmp], graph.gridSize * 2, true);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}, true);\n\t\t\t\t}\n\t\t\t}));\n\t\t});\n\n\t\tmenu.addItem(mxResources.get('horizontalFlow'), null, mxUtils.bind(this, function()\n\t\t{\n\t\t\tthis.editorUi.tryAndHandle(mxUtils.bind(this, function()\n\t\t\t{\n\t\t\t\tvar layout = new mxHierarchicalLayout(graph, mxConstants.DIRECTION_WEST);\n\n\t\t\t\tthis.editorUi.executeLayout(function()\n\t\t\t\t{\n\t\t\t\t\tvar selectionCells = graph.getSelectionCells();\n\t\t\t\t\tlayout.execute(graph.getDefaultParent(), selectionCells.length == 0 ? null : selectionCells);\n\t\t\t\t}, true);\n\t\t\t}));\n\t\t}), parent);\n\t\tmenu.addItem(mxResources.get('verticalFlow'), null, mxUtils.bind(this, function()\n\t\t{\n\t\t\tthis.editorUi.tryAndHandle(mxUtils.bind(this, function()\n\t\t\t{\n\t\t\t\tvar layout = new mxHierarchicalLayout(graph, mxConstants.DIRECTION_NORTH);\n\t\t\t\t\n\t\t\t\tthis.editorUi.executeLayout(function()\n\t\t\t\t{\n\t\t\t\t\tvar selectionCells = graph.getSelectionCells();\n\t\t\t\t\tlayout.execute(graph.getDefaultParent(), selectionCells.length == 0 ? null : selectionCells);\n\t\t\t\t}, true);\n\t\t\t}));\n\t\t}), parent);\n\t\tmenu.addSeparator(parent);\n\t\tmenu.addItem(mxResources.get('horizontalTree'), null, mxUtils.bind(this, function()\n\t\t{\n\t\t\tvar layout = new mxCompactTreeLayout(graph, true);\n\t\t\tlayout.edgeRouting = false;\n\t\t\tlayout.levelDistance = 30;\n\n\t\t\tpromptSpacing(layout.levelDistance, mxUtils.bind(this, function(spacing)\n\t\t\t{\n\t\t\t\tif (!isNaN(spacing))\n\t\t\t\t{\n\t\t\t\t\tlayout.levelDistance = spacing;\n\t\t\t\t\trunTreeLayout(layout);\n\t\t\t\t}\n\t\t\t}));\n\t\t}), parent);\n\t\tmenu.addItem(mxResources.get('verticalTree'), null, mxUtils.bind(this, function()\n\t\t{\n\t\t\tvar layout = new mxCompactTreeLayout(graph, false);\n\t\t\tlayout.edgeRouting = false;\n\t\t\tlayout.levelDistance = 30;\n\n\t\t\tpromptSpacing(layout.levelDistance, mxUtils.bind(this, function(spacing)\n\t\t\t{\n\t\t\t\tif (!isNaN(spacing))\n\t\t\t\t{\n\t\t\t\t\tlayout.levelDistance = spacing;\n\t\t\t\t\trunTreeLayout(layout);\n\t\t\t\t}\n\t\t\t}));\n\t\t}), parent);\n\t\tmenu.addItem(mxResources.get('radialTree'), null, mxUtils.bind(this, function()\n\t\t{\n\t\t\tvar layout = new mxRadialTreeLayout(graph);\n\t\t\tlayout.levelDistance = 80;\n\t\t\tlayout.autoRadius = true;\n\n\t\t\tpromptSpacing(layout.levelDistance, mxUtils.bind(this, function(spacing)\n\t\t\t{\n\t\t\t\tif (!isNaN(spacing))\n\t\t\t\t{\n\t\t\t\t\tlayout.levelDistance = spacing;\n\t\t\t\t\trunTreeLayout(layout);\n\t\t\t\t}\n\t\t\t}));\n\t\t}), parent);\n\t\tmenu.addSeparator(parent);\n\t\tmenu.addItem(mxResources.get('organic'), null, mxUtils.bind(this, function()\n\t\t{\n\t\t\tvar layout = new mxFastOrganicLayout(graph);\n\t\t\t\n\t\t\tpromptSpacing(layout.forceConstant, mxUtils.bind(this, function(newValue)\n\t\t\t{\n\t\t\t\tthis.editorUi.tryAndHandle(mxUtils.bind(this, function()\n\t\t\t\t{\n\t\t\t\t\tlayout.forceConstant = newValue;\n\t\t\t\t\t\n\t\t\t\t\tthis.editorUi.executeLayout(function()\n\t\t\t\t\t{\n\t\t\t\t\t\tvar tmp = graph.getSelectionCell();\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (tmp == null || graph.getModel().getChildCount(tmp) == 0)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\ttmp = graph.getDefaultParent();\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tlayout.execute(tmp);\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (graph.getModel().isVertex(tmp))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tgraph.updateGroupBounds([tmp], graph.gridSize * 2, true);\n\t\t\t\t\t\t}\n\t\t\t\t\t}, true);\n\t\t\t\t}));\n\t\t\t}));\n\t\t}), parent);\n\t\tmenu.addItem(mxResources.get('circle'), null, mxUtils.bind(this, function()\n\t\t{\n\t\t\tthis.editorUi.tryAndHandle(mxUtils.bind(this, function()\n\t\t\t{\n\t\t\t\tvar layout = new mxCircleLayout(graph);\n\t\t\t\t\n\t\t\t\tthis.editorUi.executeLayout(function()\n\t\t\t\t{\n\t\t\t\t\tvar tmp = graph.getSelectionCell();\n\t\t\t\t\t\n\t\t\t\t\tif (tmp == null || graph.getModel().getChildCount(tmp) == 0)\n\t\t\t\t\t{\n\t\t\t\t\t\ttmp = graph.getDefaultParent();\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tlayout.execute(tmp);\n\t\t\t\t\t\n\t\t\t\t\tif (graph.getModel().isVertex(tmp))\n\t\t\t\t\t{\n\t\t\t\t\t\tgraph.updateGroupBounds([tmp], graph.gridSize * 2, true);\n\t\t\t\t\t}\n\t\t\t\t}, true);\n\t\t\t}));\n\t\t}), parent);\n\t})));\n\tthis.put('navigation', new Menu(mxUtils.bind(this, function(menu, parent)\n\t{\n\t\tthis.addMenuItems(menu, ['home', '-', 'exitGroup', 'enterGroup', '-', 'expand', 'collapse', '-', 'collapsible'], parent);\n\t})));\n\tthis.put('arrange', new Menu(mxUtils.bind(this, function(menu, parent)\n\t{\n\t\tthis.addMenuItems(menu, ['toFront', 'toBack', 'bringForward', 'sendBackward', '-'], parent);\n\t\tthis.addSubmenu('direction', menu, parent);\n\t\tthis.addMenuItems(menu, ['turn', '-'], parent);\n\t\tthis.addSubmenu('align', menu, parent);\n\t\tthis.addSubmenu('distribute', menu, parent);\n\t\tmenu.addSeparator(parent);\n\t\tthis.addSubmenu('navigation', menu, parent);\n\t\tthis.addSubmenu('insert', menu, parent);\n\t\tthis.addSubmenu('layout', menu, parent);\n\t\tthis.addMenuItems(menu, ['-', 'group', 'ungroup', 'removeFromGroup', '-', 'clearWaypoints', 'autosize'], parent);\n\t}))).isEnabled = isGraphEnabled;\n\tthis.put('insert', new Menu(mxUtils.bind(this, function(menu, parent)\n\t{\n\t\tthis.addMenuItems(menu, ['insertLink', 'insertImage'], parent);\n\t})));\n\tthis.put('view', new Menu(mxUtils.bind(this, function(menu, parent)\n\t{\n\t\tthis.addMenuItems(menu, ((this.editorUi.format != null) ? ['format'] : []).\n\t\t\tconcat(['outline', 'layers', '-', 'pageView', 'pageScale', '-', 'tooltips',\n\t\t\t        'grid', 'guides', '-', 'connectionArrows', 'connectionPoints', '-',\n\t\t\t        'resetView', 'zoomIn', 'zoomOut'], parent));\n\t})));\n\t// Two special dropdowns that are only used in the toolbar\n\tthis.put('viewPanels', new Menu(mxUtils.bind(this, function(menu, parent)\n\t{\n\t\tif (this.editorUi.format != null)\n\t\t{\n\t\t\tthis.addMenuItems(menu, ['format'], parent);\n\t\t}\n\t\t\n\t\tthis.addMenuItems(menu, ['outline', 'layers'], parent);\n\t})));\n\tthis.put('viewZoom', new Menu(mxUtils.bind(this, function(menu, parent)\n\t{\n\t\tthis.addMenuItems(menu, ['smartFit', '-'], parent);\n\t\tvar scales = [0.25, 0.5, 0.75, 1, 1.25, 1.5, 2, 3, 4];\n\t\t\n\t\tfor (var i = 0; i < scales.length; i++)\n\t\t{\n\t\t\t(function(scale)\n\t\t\t{\n\t\t\t\tmenu.addItem((scale * 100) + '%', null, function()\n\t\t\t\t{\n\t\t\t\t\tgraph.zoomTo(scale);\n\t\t\t\t}, parent);\n\t\t\t})(scales[i]);\n\t\t}\n\n\t\tthis.addMenuItems(menu, ['-', 'fitWindow', 'fitPageWidth', 'fitPage', 'fitTwoPages', '-', 'customZoom'], parent);\n\t})));\n\tthis.put('file', new Menu(mxUtils.bind(this, function(menu, parent)\n\t{\n\t\tthis.addMenuItems(menu, ['new', 'open', '-', 'save', 'saveAs', '-', 'import', 'export', '-', 'pageSetup', 'print'], parent);\n\t})));\n\tthis.put('edit', new Menu(mxUtils.bind(this, function(menu, parent)\n\t{\n\t\tthis.addMenuItems(menu, ['undo', 'redo', '-', 'cut', 'copy', 'paste', 'delete', '-', 'duplicate', '-',\n\t\t\t'editData', 'editTooltip', '-', 'editStyle', '-', 'edit', '-', 'editLink', 'openLink', '-',\n\t\t\t'selectVertices', 'selectEdges', 'selectAll', 'selectNone', '-', 'lockUnlock']);\n\t})));\n\tthis.put('extras', new Menu(mxUtils.bind(this, function(menu, parent)\n\t{\n\t\tthis.addMenuItems(menu, ['copyConnect', 'collapseExpand', '-', 'editDiagram']);\n\t})));\n\tthis.put('help', new Menu(mxUtils.bind(this, function(menu, parent)\n\t{\n\t\tthis.addMenuItems(menu, ['help', '-', 'about']);\n\t})));\n};\n\n/**\n * Adds the label menu items to the given menu and parent.\n */\nMenus.prototype.put = function(name, menu)\n{\n\tthis.menus[name] = menu;\n\t\n\treturn menu;\n};\n\n/**\n * Adds the label menu items to the given menu and parent.\n */\nMenus.prototype.get = function(name)\n{\n\treturn this.menus[name];\n};\n\n/**\n * Adds the given submenu.\n */\nMenus.prototype.addSubmenu = function(name, menu, parent, label)\n{\n\tvar entry = this.get(name);\n\tvar submenu = null;\n\t\n\tif (entry != null)\n\t{\n\t\tvar enabled = entry.isEnabled();\n\t\n\t\tif (menu.showDisabled || enabled)\n\t\t{\n\t\t\tsubmenu = menu.addItem(label || mxResources.get(name),\n\t\t\t\tnull, null, parent, null, enabled);\n\t\t\tthis.addMenu(name, menu, submenu);\n\t\t}\n\t}\n\n\treturn submenu;\n};\n\n/**\n * Adds the label menu items to the given menu and parent.\n */\nMenus.prototype.addMenu = function(name, popupMenu, parent)\n{\n\tvar menu = this.get(name);\n\t\n\tif (menu != null && (popupMenu.showDisabled || menu.isEnabled()))\n\t{\n\t\tmenu.execute(popupMenu, parent);\n\t}\n};\n\n/**\n * Adds a menu item to insert a table cell.\n */\nMenus.prototype.addInsertTableCellItem = function(menu, parent)\n{\n\tvar graph = this.editorUi.editor.graph;\n\tvar cell = graph.getSelectionCell();\n\tvar style = graph.getCurrentCellStyle(cell);\n\n\tif (graph.getSelectionCount() > 1)\n\t{\n\t\tif (graph.isTableCell(cell))\n\t\t{\n\t\t\tcell = graph.model.getParent(cell);\n\t\t}\n\n\t\tif (graph.isTableRow(cell))\n\t\t{\n\t\t\tcell = graph.model.getParent(cell);\n\t\t}\n\t}\n\n\tvar isTable = graph.isTable(cell) ||\n\t\tgraph.isTableRow(cell) ||\n\t\tgraph.isTableCell(cell);\n\tvar isStack = graph.isStack(cell) ||\n\t\tgraph.isStackChild(cell);\n\n\tvar showCols = isTable;\n\tvar showRows = isTable;\n\n\tif (isStack)\n\t{\n\t\tvar style = (graph.isStack(cell)) ? style :\n\t\t\tgraph.getCellStyle(graph.model.getParent(cell));\n\n\t\tshowRows = style['horizontalStack'] == '0';\n\t\tshowCols = !showRows;\n\t}\n\n\tif (parent != null || (!isTable && !isStack))\n\t{\n\t\tthis.addInsertTableItem(menu, mxUtils.bind(this, function(evt, rows, cols, title, container)\n\t\t{\n\t\t\tvar table = (container || mxEvent.isControlDown(evt) || mxEvent.isMetaDown(evt)) ?\n\t\t\t\tgraph.createCrossFunctionalSwimlane(rows, cols, null, null,\n\t\t\t\t\t(title || mxEvent.isShiftDown(evt)) ? 'Cross-Functional Flowchart' : null) :\n\t\t\t\tgraph.createTable(rows, cols, null, null,\n\t\t\t\t\t(title || mxEvent.isShiftDown(evt)) ? 'Table' : null);\n\t\t\tvar pt = (mxEvent.isAltDown(evt)) ? graph.getFreeInsertPoint() :\n\t\t\t\tgraph.getCenterInsertPoint(graph.getBoundingBoxFromGeometry([table], true));\n\t\t\tvar select = null;\n\n\t\t\tgraph.getModel().beginUpdate();\n\t\t\ttry\n\t\t\t{\n\t\t\t\tselect = graph.importCells([table], pt.x, pt.y);\n\t\t\t\tgraph.fireEvent(new mxEventObject('cellsInserted', 'cells',\n\t\t\t\t\tgraph.model.getDescendants(select[0])));\n\t\t\t}\n\t\t\tfinally\n\t\t\t{\n\t\t\t\tgraph.getModel().endUpdate();\n\t\t\t}\n\t\t\t\n\t\t\tif (select != null && select.length > 0)\n\t\t\t{\n\t\t\t\tgraph.scrollCellToVisible(select[0]);\n\t\t\t\tgraph.setSelectionCells(select);\n\t\t\t}\n\t\t}), parent);\n\t}\n\telse\n\t{\n\t\tif (showCols)\n\t\t{\n\t\t\tvar elt = menu.addItem(mxResources.get('insertColumnBefore'), null, mxUtils.bind(this, function()\n\t\t\t{\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tif (isStack)\n\t\t\t\t\t{\n\t\t\t\t\t\tgraph.insertLane(cell, true);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tgraph.insertTableColumn(cell, true);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcatch (e)\n\t\t\t\t{\n\t\t\t\t\tthis.editorUi.handleError(e);\n\t\t\t\t}\n\t\t\t}), null, 'geIcon geSprite geSprite-insertcolumnbefore');\n\t\t\telt.setAttribute('title', mxResources.get('insertColumnBefore'));\n\t\t\t\n\t\t\telt = menu.addItem(mxResources.get('insertColumnAfter'), null, mxUtils.bind(this, function()\n\t\t\t{\t\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tif (isStack)\n\t\t\t\t\t{\n\t\t\t\t\t\tgraph.insertLane(cell, false);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tgraph.insertTableColumn(cell, false);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcatch (e)\n\t\t\t\t{\n\t\t\t\t\tthis.editorUi.handleError(e);\n\t\t\t\t}\n\t\t\t}), null, 'geIcon geSprite geSprite-insertcolumnafter');\n\t\t\telt.setAttribute('title', mxResources.get('insertColumnAfter'));\n\n\t\t\telt = menu.addItem(mxResources.get('deleteColumn'), null, mxUtils.bind(this, function()\n\t\t\t{\n\t\t\t\tif (cell != null)\n\t\t\t\t{\n\t\t\t\t\ttry\n\t\t\t\t\t{\n\t\t\t\t\t\tif (isStack)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tgraph.deleteLane(cell);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tgraph.deleteTableColumn(cell);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tcatch (e)\n\t\t\t\t\t{\n\t\t\t\t\t\tthis.editorUi.handleError(e);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}), null, 'geIcon geSprite geSprite-deletecolumn');\n\t\t\telt.setAttribute('title', mxResources.get('deleteColumn'));\n\t\t}\n\t\t\n\t\tif (showRows)\n\t\t{\n\t\t\telt = menu.addItem(mxResources.get('insertRowBefore'), null, mxUtils.bind(this, function()\n\t\t\t{\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tif (isStack)\n\t\t\t\t\t{\n\t\t\t\t\t\tgraph.insertLane(cell, true);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tgraph.insertTableRow(cell, true);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcatch (e)\n\t\t\t\t{\n\t\t\t\t\tthis.editorUi.handleError(e);\n\t\t\t\t}\n\t\t\t}), null, 'geIcon geSprite geSprite-insertrowbefore');\n\t\t\telt.setAttribute('title', mxResources.get('insertRowBefore'));\n\n\t\t\telt = menu.addItem(mxResources.get('insertRowAfter'), null, mxUtils.bind(this, function()\n\t\t\t{\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tif (isStack)\n\t\t\t\t\t{\n\t\t\t\t\t\tgraph.insertLane(cell, false);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tgraph.insertTableRow(cell, false);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcatch (e)\n\t\t\t\t{\n\t\t\t\t\tthis.editorUi.handleError(e);\n\t\t\t\t}\n\t\t\t}), null, 'geIcon geSprite geSprite-insertrowafter');\n\t\t\telt.setAttribute('title', mxResources.get('insertRowAfter'));\n\n\t\t\telt = menu.addItem(mxResources.get('deleteRow'), null, mxUtils.bind(this, function()\n\t\t\t{\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tif (isStack)\n\t\t\t\t\t{\n\t\t\t\t\t\tgraph.deleteLane(cell);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tgraph.deleteTableRow(cell);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcatch (e)\n\t\t\t\t{\n\t\t\t\t\tthis.editorUi.handleError(e);\n\t\t\t\t}\n\t\t\t}), null, 'geIcon geSprite geSprite-deleterow');\n\t\t\telt.setAttribute('title', mxResources.get('deleteRow'));\n\t\t\t\n\t\t\tvar ss = this.editorUi.getSelectionState();\n\t\t\t\n\t\t\tif (ss.mergeCell != null)\n\t\t\t{\n\t\t\t\tthis.addMenuItem(menu, 'mergeCells');\n\t\t\t}\n\t\t\telse if (ss.style['colspan'] > 1 || ss.style['rowspan'] > 1)\n\t\t\t{\n\t\t\t\tthis.addMenuItem(menu, 'unmergeCells');\n\t\t\t}\n\t\t}\n\t}\n};\t\n\n/**\n * Adds a menu item to insert a table.\n */\nMenus.prototype.addInsertTableItem = function(menu, insertFn, parent, showOptions)\n{\n\tshowOptions = (showOptions != null) ? showOptions : true;\n\n\tinsertFn = (insertFn != null) ? insertFn : mxUtils.bind(this, function(evt, rows, cols)\n\t{\n\t\tvar graph = this.editorUi.editor.graph;\n\t\tvar td = graph.getParentByName(mxEvent.getSource(evt), 'TD');\n\n\t\tif (td != null && graph.cellEditor.textarea != null)\n\t\t{\n\t\t\t// To find the new link, we create a list of all existing links first\n    \t\t// LATER: Refactor for reuse with code for finding inserted image below\n\t\t\tvar tmp = graph.cellEditor.textarea.getElementsByTagName('table');\n\t\t\tvar oldTables = [];\n\t\t\t\n\t\t\tfor (var i = 0; i < tmp.length; i++)\n\t\t\t{\n\t\t\t\toldTables.push(tmp[i]);\n\t\t\t}\n\t\t\t\n\t\t\t// Finding the new table will work with insertHTML, but IE does not support that\n\t\t\tgraph.container.focus();\n\t\t\tgraph.pasteHtmlAtCaret(createTable(rows, cols));\n\t\t\t\n\t\t\t// Moves cursor to first table cell\n\t\t\tvar newTables = graph.cellEditor.textarea.getElementsByTagName('table');\n\t\t\t\n\t\t\tif (newTables.length == oldTables.length + 1)\n\t\t\t{\n\t\t\t\t// Inverse order in favor of appended tables\n\t\t\t\tfor (var i = newTables.length - 1; i >= 0; i--)\n\t\t\t\t{\n\t\t\t\t\tif (i == 0 || newTables[i] != oldTables[i - 1])\n\t\t\t\t\t{\n\t\t\t\t\t\tgraph.selectNode(newTables[i].rows[0].cells[0]);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t});\n\t\n\t// KNOWN: Does not work in IE8 standards and quirks\n\tvar graph = this.editorUi.editor.graph;\n\tvar row2 = null;\n\tvar td = null;\n\t\n\tfunction createTable(rows, cols)\n\t{\n\t\tvar html = ['<table>'];\n\t\t\n\t\tfor (var i = 0; i < rows; i++)\n\t\t{\n\t\t\thtml.push('<tr>');\n\t\t\t\n\t\t\tfor (var j = 0; j < cols; j++)\n\t\t\t{\n\t\t\t\thtml.push('<td><br></td>');\n\t\t\t}\n\t\t\t\n\t\t\thtml.push('</tr>');\n\t\t}\n\t\t\n\t\thtml.push('</table>');\n\t\t\n\t\treturn html.join('');\n\t};\n\t\n\tif (parent == null)\n\t{\n\t\tmenu.div.className += ' geToolbarMenu';\n\t\tmenu.labels = false;\n\t}\n\n\tvar elt2 = menu.addItem('', null, null, parent, null, null, null, true);\n\telt2.firstChild.style.fontSize = Menus.prototype.defaultFontSize + 'px';\n\n\t// Hide empty rows in menu item\n\tvar tds = elt2.getElementsByTagName('td');\n\n\tif (tds.length > 1)\n\t{\n\t\ttds[1].style.display = 'none';\n\t\ttds[2].style.display = 'none';\n\t}\n\t\n\tfunction createPicker(rows, cols)\n\t{\n\t\tvar table2 = document.createElement('table');\n\t\ttable2.className = 'geInsertTablePicker';\n\t\ttable2.setAttribute('border', '1');\n\t\ttable2.style.borderCollapse = 'collapse';\n\t\ttable2.style.borderStyle = 'solid';\n\t\ttable2.style.marginBottom = '4px';\n\t\ttable2.style.marginTop = '8px';\n\t\ttable2.setAttribute('cellPadding', '8');\n\t\t\n\t\tfor (var i = 0; i < rows; i++)\n\t\t{\n\t\t\tvar row = table2.insertRow(i);\n\t\t\t\n\t\t\tfor (var j = 0; j < cols; j++)\n\t\t\t{\n\t\t\t\tvar cell = row.insertCell(-1);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn table2;\n\t};\n\n\tfunction extendPicker(picker, rows, cols)\n\t{\n\t\tfor (var i = picker.rows.length; i < rows; i++)\n\t\t{\n\t\t\tvar row = picker.insertRow(i);\n\t\t\t\n\t\t\tfor (var j = 0; j < picker.rows[0].cells.length; j++)\n\t\t\t{\n\t\t\t\tvar cell = row.insertCell(-1);\n\t\t\t}\n\t\t}\n\t\t\n\t\tfor (var i = 0; i < picker.rows.length; i++)\n\t\t{\n\t\t\tvar row = picker.rows[i];\n\t\t\t\n\t\t\tfor (var j = row.cells.length; j < cols; j++)\n\t\t\t{\n\t\t\t\tvar cell = row.insertCell(-1);\n\t\t\t}\n\t\t}\n\t};\n\t\n\telt2.firstChild.innerText = '';\n\t\n\tvar titleOption = document.createElement('input');\n\ttitleOption.setAttribute('id', 'geTitleOption');\n\ttitleOption.setAttribute('type', 'checkbox');\n\ttitleOption.style.verticalAlign = 'middle';\n\n\tvar titleLbl = document.createElement('label');\n\tmxUtils.write(titleLbl, mxResources.get('title'));\n\ttitleLbl.setAttribute('for', 'geTitleOption');\n\ttitleLbl.style.verticalAlign = 'middle';\n\n\tmxEvent.addGestureListeners(titleLbl, null, null, mxUtils.bind(this, function(e)\n\t{\n\t\tmxEvent.consume(e);\n\t}));\n\t\n\tmxEvent.addGestureListeners(titleOption, null, null, mxUtils.bind(this, function(e)\n\t{\n\t\tmxEvent.consume(e);\n\t}));\n\t\n\tvar containerOption = document.createElement('input');\n\tcontainerOption.setAttribute('id', 'geContainerOption');\n\tcontainerOption.setAttribute('type', 'checkbox');\n\tcontainerOption.style.verticalAlign = 'middle';\n\t\n\tvar containerLbl = document.createElement('label');\n\tmxUtils.write(containerLbl, mxResources.get('container'));\n\tcontainerLbl.setAttribute('for', 'geContainerOption');\n\tcontainerLbl.style.verticalAlign = 'middle';\n\n\tmxEvent.addGestureListeners(containerLbl, null, null, mxUtils.bind(this, function(e)\n\t{\n\t\tmxEvent.consume(e);\n\t}));\n\t\n\tmxEvent.addGestureListeners(containerOption, null, null, mxUtils.bind(this, function(e)\n\t{\n\t\tmxEvent.consume(e);\n\t}));\n\t\n\tif (showOptions)\n\t{\n\t\telt2.firstChild.appendChild(titleOption);\n\t\telt2.firstChild.appendChild(titleLbl);\n\t\tmxUtils.br(elt2.firstChild);\n\t\telt2.firstChild.appendChild(containerOption);\n\t\telt2.firstChild.appendChild(containerLbl);\n\t\tmxUtils.br(elt2.firstChild);\n\t}\n\t\n\tvar picker = createPicker(5, 5);\n\telt2.firstChild.appendChild(picker);\n\t\n\tvar label = document.createElement('div');\n\tlabel.style.textAlign = 'center';\n\tlabel.style.padding = '4px';\n\tlabel.style.width = '100%';\n\tlabel.innerHTML = '1x1';\n\telt2.firstChild.appendChild(label);\n\t\n\tfunction mouseover(e)\n\t{\n\t\ttd = graph.getParentByName(mxEvent.getSource(e), 'TD');\t\t\n\t\tvar selected = false;\n\t\t\n\t\tif (td != null)\n\t\t{\n\t\t\trow2 = graph.getParentByName(td, 'TR');\n\t\t\tvar ext = (mxEvent.isMouseEvent(e)) ? 2 : 4;\n\t\t\textendPicker(picker, Math.min(20, row2.sectionRowIndex + ext), Math.min(20, td.cellIndex + ext));\n\t\t\tlabel.innerHTML = (td.cellIndex + 1) + 'x' + (row2.sectionRowIndex + 1);\n\t\t\t\n\t\t\tfor (var i = 0; i < picker.rows.length; i++)\n\t\t\t{\n\t\t\t\tvar r = picker.rows[i];\n\t\t\t\t\n\t\t\t\tfor (var j = 0; j < r.cells.length; j++)\n\t\t\t\t{\n\t\t\t\t\tvar cell = r.cells[j];\n\t\t\t\t\t\n\t\t\t\t\tif (i == row2.sectionRowIndex &&\n\t\t\t\t\t\tj == td.cellIndex)\n\t\t\t\t\t{\n\t\t\t\t\t\tselected = cell.style.backgroundColor == 'blue';\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif (i <= row2.sectionRowIndex && j <= td.cellIndex)\n\t\t\t\t\t{\n\t\t\t\t\t\tcell.style.backgroundColor = 'blue';\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tcell.style.backgroundColor = 'transparent';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tmxEvent.consume(e);\n\n\t\treturn selected;\n\t};\n\t\n\tmxEvent.addGestureListeners(picker, null, null, mxUtils.bind(this, function(e)\n\t{\n\t\tvar selected = mouseover(e);\n\t\t\n\t\tif (td != null && row2 != null && selected)\n\t\t{\n\t\t\tinsertFn(e, row2.sectionRowIndex + 1, td.cellIndex + 1,\n\t\t\t\ttitleOption.checked, containerOption.checked);\n\t\t\t\n\t\t\t// Async required to block event for elements under menu\n\t\t\twindow.setTimeout(mxUtils.bind(this, function()\n\t\t\t{\n\t\t\t\tthis.editorUi.hideCurrentMenu();\n\t\t\t}), 0);\n\t\t}\n\t}));\n\t\n\tmxEvent.addListener(picker, 'mouseover', mouseover);\n};\n\n/**\n * Adds a style change item to the given menu.\n */\nMenus.prototype.edgeStyleChange = function(menu, label, keys, values, sprite, parent, reset, image)\n{\n\treturn this.showIconOnly(menu.addItem(label, image, mxUtils.bind(this, function()\n\t{\n\t\tvar graph = this.editorUi.editor.graph;\n\t\tgraph.stopEditing(false);\n\t\t\n\t\tgraph.getModel().beginUpdate();\n\t\ttry\n\t\t{\n\t\t\tvar cells = graph.getSelectionCells();\n\t\t\tvar edges = [];\n\t\t\t\n\t\t\tfor (var i = 0; i < cells.length; i++)\n\t\t\t{\n\t\t\t\tvar cell = cells[i];\n\t\t\t\t\n\t\t\t\tif (graph.getModel().isEdge(cell))\n\t\t\t\t{\n\t\t\t\t\tif (reset)\n\t\t\t\t\t{\n\t\t\t\t\t\tvar geo = graph.getCellGeometry(cell);\n\t\t\t\n\t\t\t\t\t\t// Resets all edge points\n\t\t\t\t\t\tif (geo != null)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tgeo = geo.clone();\n\t\t\t\t\t\t\tgeo.points = null;\n\t\t\t\t\t\t\tgraph.getModel().setGeometry(cell, geo);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tfor (var j = 0; j < keys.length; j++)\n\t\t\t\t\t{\n\t\t\t\t\t\tgraph.setCellStyles(keys[j], values[j], [cell]);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tedges.push(cell);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tthis.editorUi.fireEvent(new mxEventObject(\n\t\t\t\t'styleChanged', 'cells', edges,\n\t\t\t\t'keys', keys, 'values', values,\n\t\t\t\t'force', cells.length == 0));\n\t\t}\n\t\tfinally\n\t\t{\n\t\t\tgraph.getModel().endUpdate();\n\t\t}\n\t}), parent, sprite));\n};\n\n/**\n * Adds a style change item to the given menu.\n */\nMenus.prototype.showIconOnly = function(elt)\n{\n\tvar td = elt.getElementsByTagName('td');\n\t\n\tfor (i = 0; i < td.length; i++)\n\t{\n\t\tif (td[i].getAttribute('class') == 'mxPopupMenuItem')\n\t\t{\n\t\t\ttd[i].style.display = 'none';\n\t\t}\n\t}\n\t\n\treturn elt;\n};\n\n/**\n * Adds a style change item to the given menu.\n */\nMenus.prototype.styleChange = function(menu, label, keys, values, sprite, parent, fn, post, iconOnly)\n{\n\tvar apply = this.createStyleChangeFunction(keys, values);\n\t\n\tvar elt = menu.addItem(label, null, mxUtils.bind(this, function()\n\t{\n\t\tvar graph = this.editorUi.editor.graph;\n\t\t\n\t\tif (fn != null && graph.cellEditor.isContentEditing())\n\t\t{\n\t\t\tfn();\n\t\t}\n\t\telse\n\t\t{\n\t\t\tapply(post);\n\t\t}\n\t}), parent, sprite);\n\t\n\tif (iconOnly)\n\t{\n\t\tthis.showIconOnly(elt);\n\t}\n\t\n\treturn elt;\n};\n\n/**\n * \n */\nMenus.prototype.createStyleChangeFunction = function(keys, values)\n{\n\treturn mxUtils.bind(this, function(post)\n\t{\n\t\tvar graph = this.editorUi.editor.graph;\n\t\tgraph.stopEditing(false);\n\t\t\n\t\tgraph.getModel().beginUpdate();\n\t\ttry\n\t\t{\n\t\t\tvar cells = graph.getEditableCells(graph.getSelectionCells());\n\t\t\tvar autoSizeCells = false;\n\t\t\t\n\t\t\tfor (var i = 0; i < keys.length; i++)\n\t\t\t{\n\t\t\t\tgraph.setCellStyles(keys[i], values[i], cells);\n\n\t\t\t\t// Removes CSS alignment to produce consistent output\n\t\t\t\tif (keys[i] == mxConstants.STYLE_ALIGN)\n\t\t\t\t{\n\t\t\t\t\tgraph.updateLabelElements(cells, function(elt)\n\t\t\t\t\t{\n\t\t\t\t\t\telt.removeAttribute('align');\n\t\t\t\t\t\telt.style.textAlign = null;\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// Updates autosize after font changes\n\t\t\t\tif (keys[i] == mxConstants.STYLE_FONTFAMILY ||\n\t\t\t\t\tkeys[i] == 'fontSource')\n\t\t\t\t{\n\t\t\t\t\tautoSizeCells = true;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif (autoSizeCells)\n\t\t\t{\n\t\t\t\tfor (var j = 0; j < cells.length; j++)\n\t\t\t\t{\n\t\t\t\t\tif (graph.model.getChildCount(cells[j]) == 0)\n\t\t\t\t\t{\n\t\t\t\t\t\tgraph.autoSizeCell(cells[j], false);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif (post != null)\n\t\t\t{\n\t\t\t\tpost();\n\t\t\t}\n\t\t\t\n\t\t\tthis.editorUi.fireEvent(new mxEventObject('styleChanged',\n\t\t\t\t'keys', keys, 'values', values, 'cells', cells));\n\t\t}\n\t\tfinally\n\t\t{\n\t\t\tgraph.getModel().endUpdate();\n\t\t}\n\t});\n};\n\n/**\n * Adds a style change item with a prompt to the given menu.\n */\nMenus.prototype.promptChange = function(menu, label, hint, defaultValue, key, parent, enabled, fn, sprite, beforeFn)\n{\n\treturn menu.addItem(label, null, mxUtils.bind(this, function()\n\t{\n\t\tvar graph = this.editorUi.editor.graph;\n\t\tvar value = defaultValue;\n    \tvar state = graph.getView().getState(graph.getSelectionCell());\n    \t\n    \tif (state != null)\n    \t{\n    \t\tvalue = state.style[key] || value;\n    \t}\n\n\t\tvar doStopEditing = (beforeFn != null) ? beforeFn() : true;\n    \t\n\t\tvar dlg = new FilenameDialog(this.editorUi, value, mxResources.get('apply'), mxUtils.bind(this, function(newValue)\n\t\t{\n\t\t\tif (newValue != null && newValue.length > 0)\n\t\t\t{\n\t\t\t\tif (doStopEditing)\n\t\t\t\t{\n\t\t\t\t\tgraph.getModel().beginUpdate();\n\t\t\t\t\ttry\n\t\t\t\t\t{\n\t\t\t\t\t\tgraph.stopEditing(false);\n\t\t\t\t\t\tgraph.setCellStyles(key, newValue);\n\t\t\t\t\t}\n\t\t\t\t\tfinally\n\t\t\t\t\t{\n\t\t\t\t\t\tgraph.getModel().endUpdate();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (fn != null)\n\t\t\t\t{\n\t\t\t\t\tfn(newValue);\n\t\t\t\t}\n\t\t\t}\n\t\t}), mxResources.get('enterValue') + ((hint.length > 0) ? (' ' + hint) : ''),\n\t\t\tnull, null, null, null, function()\n\t\t{\n\t\t\tif (fn != null && beforeFn != null)\n\t\t\t{\n\t\t\t\tfn(null);\n\t\t\t}\n\t\t});\n\t\tthis.editorUi.showDialog(dlg.container, 300, 80, true, true);\n\t\tdlg.init();\n\t}), parent, sprite, enabled);\n};\n\n/**\n * Adds a handler for showing a menu in the given element.\n */\nMenus.prototype.pickColor = function(key, cmd, defaultValue)\n{\n\tvar ui = this.editorUi;\n\t\n\tui.tryAndHandle(mxUtils.bind(this, function()\n\t{\n\t\tvar graph = ui.editor.graph;\n\t\tvar h = 226 + ((Math.ceil(ColorDialog.prototype.presetColors.length / 12) +\n\t\t\t\tMath.ceil(ColorDialog.prototype.defaultColors.length / 12)) * 17);\n\t\t\n\t\tif (cmd != null && graph.cellEditor.isContentEditing())\n\t\t{\n\t\t\t// Saves and restores text selection for in-place editor\n\t\t\tvar selState = graph.cellEditor.saveSelection();\n\t\t\t\n\t\t\tvar dlg = new ColorDialog(this.editorUi, defaultValue || graph.shapeForegroundColor, mxUtils.bind(this, function(color)\n\t\t\t{\n\t\t\t\tgraph.cellEditor.restoreSelection(selState);\n\t\t\t\tdocument.execCommand(cmd, false, (color != mxConstants.NONE) ? color : 'transparent');\n\n\t\t\t\tvar cmdMapping = {\n\t\t\t\t\t'forecolor': mxConstants.STYLE_FONTCOLOR,\n\t\t\t\t\t'backcolor': mxConstants.STYLE_LABEL_BACKGROUNDCOLOR\n\t\t\t\t};\n\n\t\t\t\tvar style = cmdMapping[cmd];\n\n\t\t\t\tif (style != null)\n\t\t\t\t{\n\t\t\t\t\tui.fireEvent(new mxEventObject('styleChanged',\n\t\t\t\t\t\t'keys', [style], 'values', [color],\n\t\t\t\t\t\t'cells', [graph.cellEditor.getEditingCell()]));\n\t\t\t\t}\n\t\t\t}), function()\n\t\t\t{\n\t\t\t\tgraph.cellEditor.restoreSelection(selState);\n\t\t\t});\n\n\t\t\tthis.editorUi.showDialog(dlg.container, 230, h, true, true);\n\t\t\tdlg.init();\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif (this.colorDialog == null)\n\t\t\t{\n\t\t\t\tthis.colorDialog = new ColorDialog(this.editorUi);\n\t\t\t}\n\t\t\n\t\t\tthis.colorDialog.currentColorKey = key;\n\t\t\tvar state = graph.getView().getState(graph.getSelectionCell());\n\t\t\tvar color = mxConstants.NONE;\n\t\t\t\n\t\t\tif (state != null)\n\t\t\t{\n\t\t\t\tcolor = state.style[key] || color;\n\t\t\t}\n\t\t\t\n\t\t\tif (color == mxConstants.NONE)\n\t\t\t{\n\t\t\t\tcolor = graph.shapeBackgroundColor.substring(1);\n\t\t\t\tthis.colorDialog.picker.fromString(color);\n\t\t\t\tthis.colorDialog.colorInput.value = mxConstants.NONE;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tthis.colorDialog.picker.fromString(mxUtils.rgba2hex(color));\n\t\t\t}\n\t\t\n\t\t\tthis.editorUi.showDialog(this.colorDialog.container, 230, h, true, true);\n\t\t\tthis.colorDialog.init();\n\t\t}\n\t}));\n};\n\n/**\n * Adds a handler for showing a menu in the given element.\n */\nMenus.prototype.toggleStyle = function(key, defaultValue)\n{\n\tvar graph = this.editorUi.editor.graph;\n\tvar value = graph.toggleCellStyles(key, defaultValue);\n\tthis.editorUi.fireEvent(new mxEventObject('styleChanged', 'keys', [key], 'values', [value],\n\t\t\t'cells', graph.getSelectionCells()));\n};\n\n/**\n * Creates the keyboard event handler for the current graph and history.\n */\nMenus.prototype.addMenuItem = function(menu, key, parent, trigger, sprite, label)\n{\n\tvar action = this.editorUi.actions.get(key);\n\n\tif (action != null && (menu.showDisabled || action.isEnabled()) && action.visible)\n\t{\n\t\tvar item = menu.addItem(label || action.label, null, mxUtils.bind(this, function(evt)\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\taction.funct(trigger, evt);\n\t\t\t}\n\t\t\tcatch (e)\n\t\t\t{\n\t\t\t\tthis.editorUi.handleError(e);\n\t\t\t}\n\t\t}), parent, sprite, action.isEnabled());\n\t\t\n\t\t// Adds checkmark image\n\t\tif (action.toggleAction && action.isSelected())\n\t\t{\n\t\t\tmenu.addCheckmark(item, Editor.checkmarkImage);\n\t\t}\n\n\t\tthis.addShortcut(item, action, menu.hideShortcuts);\n\t\t\n\t\treturn item;\n\t}\n\t\n\treturn null;\n};\n\n/**\n * Adds a checkmark to the given menuitem.\n */\nMenus.prototype.addShortcut = function(item, action, asTooltip)\n{\n\tif (action.shortcut != null)\n\t{\n\t\tif (asTooltip)\n\t\t{\n\t\t\titem.setAttribute('title', action.shortcut);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tvar td = item.firstChild.nextSibling.nextSibling;\t\n\t\t\tvar span = document.createElement('span');\n\t\t\tspan.style.color = 'gray';\n\t\t\tmxUtils.write(span, action.shortcut);\n\t\t\ttd.appendChild(span);\n\t\t}\n\t}\n};\n\n/**\n * Creates the keyboard event handler for the current graph and history.\n */\nMenus.prototype.addMenuItems = function(menu, keys, parent, trigger, sprites)\n{\n\tfor (var i = 0; i < keys.length; i++)\n\t{\n\t\tif (keys[i] == '-')\n\t\t{\n\t\t\tmenu.addSeparator(parent);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tthis.addMenuItem(menu, keys[i], parent, trigger, (sprites != null) ? sprites[i] : null);\n\t\t}\n\t}\n};\n\n/**\n * Creates the keyboard event handler for the current graph and history.\n */\nMenus.prototype.createPopupMenu = function(menu, cell, evt)\n{\n\tmenu.smartSeparators = true;\n\tmenu.hideShortcuts = true;\n\tthis.addPopupMenuItems(menu, cell, evt);\n};\n\n/**\n * Creates the keyboard event handler for the current graph and history.\n */\nMenus.prototype.addPopupMenuItems = function(menu, cell, evt)\n{\n\tif (this.isShowHistoryItems())\n\t{\n\t\tthis.addPopupMenuHistoryItems(menu, cell, evt);\t\n\t}\n\n\tthis.addPopupMenuEditItems(menu, cell, evt);\n\n\tif (this.isShowStyleItems())\n\t{\n\t\tthis.addPopupMenuStyleItems(menu, cell, evt);\n\t}\n\n\tif (this.isShowArrangeItems())\n\t{\n\t\tthis.addPopupMenuArrangeItems(menu, cell, evt);\n\t}\n\n\tthis.addPopupMenuCellItems(menu, cell, evt);\n\tthis.addPopupMenuSelectionItems(menu, cell, evt);\n};\n\n/**\n * Creates the keyboard event handler for the current graph and history.\n */\nMenus.prototype.isShowHistoryItems = function()\n{\n\treturn true;\n};\n\n/**\n * Creates the keyboard event handler for the current graph and history.\n */\nMenus.prototype.addPopupMenuHistoryItems = function(menu, cell, evt)\n{\n\tif (this.editorUi.editor.graph.isSelectionEmpty())\n\t{\n\t\tthis.addMenuItems(menu, ['undo', 'redo'], null, evt);\n\t}\n};\n\n/**\n * Creates the keyboard event handler for the current graph and history.\n */\nMenus.prototype.addPopupDeleteItem = function(menu, cell, evt)\n{\n\tvar item = this.addMenuItem(menu, 'delete');\n\n\tif (item != null && item.firstChild != null &&\n\t\titem.firstChild.nextSibling != null)\n\t{\n\t\titem.firstChild.nextSibling.style.color = 'red';\n\t\tvar graph = this.editorUi.editor.graph;\n\n\t\tif (graph.getSelectionCount() > 1)\n\t\t{\n\t\t\titem.firstChild.nextSibling.innerHTML =\n\t\t\t\tmxUtils.htmlEntities(mxResources.get('delete') +\n\t\t\t\t' (' + graph.getSelectionCount() + ')');\n\t\t}\n\t}\n};\n\n/**\n * Creates the keyboard event handler for the current graph and history.\n */\nMenus.prototype.addPopupMenuEditItems = function(menu, cell, evt)\n{\n\tif (this.editorUi.editor.graph.isSelectionEmpty())\n\t{\n\t\tthis.addMenuItems(menu, ['pasteHere'], null, evt);\n\t}\n\telse\n\t{\n\t\tthis.addMenuItems(menu, ['cut', 'copy', 'duplicate',\n\t\t\t'-', 'delete', 'lockUnlock'], null, evt);\n\t}\n};\n\n/**\n * Creates the keyboard event handler for the current graph and history.\n */\nMenus.prototype.isShowStyleItems = function()\n{\n\treturn true;\n};\n\n/**\n * Creates the keyboard event handler for the current graph and history.\n */\nMenus.prototype.addPopupMenuStyleItems = function(menu, cell, evt)\n{\n\tif (this.editorUi.editor.graph.getSelectionCount() == 1)\n\t{\n\t\tthis.addMenuItems(menu, ['-', 'setAsDefaultStyle'], null, evt);\n\t}\n\telse if (this.editorUi.editor.graph.isSelectionEmpty())\n\t{\n\t\tthis.addMenuItems(menu, ['-', 'clearDefaultStyle'], null, evt);\n\t}\n};\n\n/**\n * Creates the keyboard event handler for the current graph and history.\n */\nMenus.prototype.isShowArrangeItems = function()\n{\n\treturn true;\n};\n\n/**\n * Creates the keyboard event handler for the current graph and history.\n */\nMenus.prototype.addPopupMenuArrangeItems = function(menu, cell, evt)\n{\n\tvar graph = this.editorUi.editor.graph;\n\t\n\t// Shows group actions\n\tif (graph.getSelectionCount() > 1 || (graph.getSelectionCount() > 0 &&\n\t\t!graph.getModel().isEdge(cell) && !graph.isSwimlane(cell) &&\n\t\tgraph.getModel().getChildCount(cell) > 0 && graph.isCellEditable(cell)))\n\t{\n\t\tthis.addMenuItems(menu, ['group', 'ungroup'], null, evt);\n\t}\n\n\tvar count = graph.getEditableCells(graph.getSelectionCells()).length;\n\n\tif (count > 1)\n\t{\n\t\tmenu.addSeparator();\n\t\tthis.addSubmenu('align', menu);\n\t\tthis.addSubmenu('distribute', menu);\n\t}\n\n\tif (count >= 1)\n\t{\n\t\tthis.addMenuItems(menu, ['-', 'toFront', 'toBack'], null, evt);\n\t\t\n\t\tif (this.isShowCellEditItems() && graph.getSelectionCount() == 1)\n\t\t{\n\t\t\tthis.addMenuItems(menu, ['bringForward', 'sendBackward'], null, evt);\n\t\t}\n\t}\n};\n\n/**\n * Creates the keyboard event handler for the current graph and history.\n */\nMenus.prototype.addPopupMenuCellItems = function(menu, cell, evt)\n{\n\tvar graph = this.editorUi.editor.graph;\n\tvar state = graph.view.getState(cell);\n\t\n\tif (state != null)\n\t{\n\t\t// Adds reset waypoints option if waypoints exist\n\t\tvar geo = graph.getModel().getGeometry(cell);\n\t\tvar hasWaypoints = geo != null && geo.points != null && geo.points.length > 0;\n\t\t\n\t\tif (this.isShowStyleItems() && graph.getSelectionCount() == 1 &&\n\t\t\tgraph.getModel().isEdge(cell))\n\t\t{\n\t\t\tmenu.addSeparator();\n\t\t\tthis.addSubmenu('line', menu);\n\t\t}\n\n\t\tif (graph.getModel().isEdge(cell) && mxUtils.getValue(state.style, mxConstants.STYLE_EDGE, null) != 'entityRelationEdgeStyle' &&\n\t\t\tmxUtils.getValue(state.style, mxConstants.STYLE_SHAPE, null) != 'arrow')\n\t\t{\n\t\t\tvar handler = graph.selectionCellsHandler.getHandler(cell);\n\t\t\tvar isWaypoint = false;\n\t\t\t\n\t\t\tif (hasWaypoints && handler instanceof mxEdgeHandler && handler.bends != null && handler.bends.length > 2)\n\t\t\t{\n\t\t\t\tvar index = handler.getHandleForEvent(graph.updateMouseEvent(new mxMouseEvent(evt)));\n\n\t\t\t\t// Ignores ghosted and virtual waypoints\n\t\t\t\tif (index > 0 && index < handler.bends.length - 1 &&\n\t\t\t\t\t(handler.bends[index] == null ||\n\t\t\t\t\thandler.bends[index].node == null ||\n\t\t\t\t\thandler.bends[index].node.style.opacity == ''))\n\t\t\t\t{\n\t\t\t\t\t// Configures removeWaypoint action before execution\n\t\t\t\t\t// Using trigger parameter is cleaner but have to find waypoint here anyway.\n\t\t\t\t\tvar rmWaypointAction = this.editorUi.actions.get('removeWaypoint');\n\t\t\t\t\trmWaypointAction.handler = handler;\n\t\t\t\t\trmWaypointAction.index = index;\n\n\t\t\t\t\tisWaypoint = true;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif (this.isShowCellEditItems())\n\t\t\t{\n\t\t\t\tthis.addMenuItem(menu, 'turn', null, evt, null, mxResources.get('reverse'));\n\t\t\t}\n\t\t\t\n\t\t\tthis.addMenuItems(menu, [(isWaypoint) ? 'removeWaypoint' : 'addWaypoint'], null, evt);\n\t\t}\n\n\t\tif (graph.getSelectionCount() == 1 && this.isShowCellEditItems() && \n\t\t\t(hasWaypoints || (graph.getModel().isVertex(cell) &&\n\t\t\tgraph.getModel().getEdgeCount(cell) > 0)))\n\t\t{\n\t\t\tthis.addMenuItems(menu, ['clearWaypoints'], null, evt);\n\t\t}\n\t\t\n\t\tif (this.isShowCellEditItems() &&\n\t\t\tgraph.getSelectionCount() == 1 &&\n\t\t\tgraph.isCellEditable(cell))\n\t\t{\n\t\t\tthis.addPopupMenuCellEditItems(menu, cell, evt);\n\t\t}\n\t}\n};\n\n/**\n * Creates the keyboard event handler for the current graph and history.\n */\nMenus.prototype.isShowCellEditItems = function()\n{\n\treturn true;\n};\n\n/**\n * Creates the keyboard event handler for the current graph and history.\n */\nMenus.prototype.addPopupMenuCellEditItems = function(menu, cell, evt, parent)\n{\n\tvar graph = this.editorUi.editor.graph;\n\tvar state = graph.view.getState(cell);\n\tthis.addMenuItems(menu, ['-', 'editStyle', 'editData', 'editLink'], parent, evt);\n\t\n\t// Shows edit image action if there is an image in the style\n\tif (graph.getModel().isVertex(cell) && mxUtils.getValue(state.style, mxConstants.STYLE_IMAGE, null) != null)\n\t{\n\t\tmenu.addSeparator();\n\t\tthis.addMenuItem(menu, 'image', parent, evt).firstChild.nextSibling.innerHTML = mxResources.get('editImage') + '...';\n\t\tthis.addMenuItem(menu, 'crop', parent, evt);\n\t}\n\n\tif (graph.getModel().isVertex(cell) && graph.isCellConnectable(cell))\n\t{\n\t\tthis.addMenuItem(menu, 'editConnectionPoints', parent, evt);\n\t}\n};\n\n/**\n * Creates the keyboard event handler for the current graph and history.\n */\nMenus.prototype.addPopupMenuSelectionItems = function(menu, cell, evt)\n{\n\tif (this.editorUi.editor.graph.isSelectionEmpty())\n\t{\n\t\tthis.addMenuItems(menu, ['-', 'selectAll', 'selectVertices', 'selectEdges'], null, evt);\n\t}\n};\n\n/**\n * Creates the keyboard event handler for the current graph and history.\n */\nMenus.prototype.createMenubar = function(container)\n{\n\tvar menubar = new Menubar(this.editorUi, container);\n\tvar menus = this.defaultMenuItems;\n\t\n\tfor (var i = 0; i < menus.length; i++)\n\t{\n\t\t(mxUtils.bind(this, function(menu)\n\t\t{\n\t\t\tvar elt = menubar.addMenu(mxResources.get(menus[i]), mxUtils.bind(this, function()\n\t\t\t{\n\t\t\t\t// Allows extensions of menu.funct\n\t\t\t\tmenu.funct.apply(this, arguments);\n\t\t\t}));\n\t\t\t\n\t\t\tthis.menuCreated(menu, elt);\n\t\t}))(this.get(menus[i]));\n\t}\n\n\treturn menubar;\n};\n\n/**\n * Creates the keyboard event handler for the current graph and history.\n */\nMenus.prototype.menuCreated = function(menu, elt, className)\n{\n\tif (elt != null)\n\t{\n\t\tclassName = (className != null) ? className : 'geItem';\n\t\telt.className = className;\n\t\t\n\t\tmenu.addListener('stateChanged', function()\n\t\t{\n\t\t\telt.enabled = menu.enabled;\n\t\t\t\n\t\t\tif (!menu.enabled)\n\t\t\t{\n\t\t\t\telt.className = className + ' mxDisabled';\n\t\t\t\t\n\t\t\t\tif (document.documentMode == 8)\n\t\t\t\t{\n\t\t\t\t\telt.style.color = '#c3c3c3';\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\telt.className = className;\n\t\t\t\t\n\t\t\t\tif (document.documentMode == 8)\n\t\t\t\t{\n\t\t\t\t\telt.style.color = '';\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n};\n\n/**\n * Construcs a new menubar for the given editor.\n */\nfunction Menubar(editorUi, container)\n{\n\tthis.editorUi = editorUi;\n\tthis.container = container;\n};\n\n/**\n * Adds the menubar elements.\n */\nMenubar.prototype.hideMenu = function()\n{\n\tthis.editorUi.hideCurrentMenu();\n};\n\n/**\n * Adds a submenu to this menubar.\n */\nMenubar.prototype.addMenu = function(label, funct, before, clickFn)\n{\n\tvar elt = document.createElement('a');\n\telt.className = 'geItem';\n\tmxUtils.write(elt, label);\n\tthis.addMenuHandler(elt, funct, clickFn);\n\t\n    if (before != null)\n    {\n    \tthis.container.insertBefore(elt, before);\n    }\n    else\n    {\n    \tthis.container.appendChild(elt);\n    }\n\t\n\treturn elt;\n};\n\n/**\n * Adds a handler for showing a menu in the given element.\n */\nMenubar.prototype.addMenuHandler = function(elt, funct, clickFn)\n{\n\tif (funct != null)\n\t{\n\t\tvar show = true;\n\t\t\n\t\tvar clickHandler = mxUtils.bind(this, function(evt)\n\t\t{\n\t\t\tif (clickFn != null)\n\t\t\t{\n\t\t\t\tclickFn(evt);\n\t\t\t}\n\n\t\t\tif (!mxEvent.isConsumed(evt) && show &&\n\t\t\t\t(elt.enabled == null || elt.enabled))\n\t\t\t{\n\t\t\t\tthis.editorUi.editor.graph.popupMenuHandler.hideMenu();\n\t\t\t\tvar menu = new mxPopupMenu(funct);\n\t\t\t\tmenu.div.className += ' geMenubarMenu';\n\t\t\t\tmenu.smartSeparators = true;\n\t\t\t\tmenu.showDisabled = true;\n\t\t\t\tmenu.autoExpand = true;\n\t\t\t\t\n\t\t\t\t// Disables autoexpand and destroys menu when hidden\n\t\t\t\tmenu.hideMenu = mxUtils.bind(this, function()\n\t\t\t\t{\n\t\t\t\t\tmxPopupMenu.prototype.hideMenu.apply(menu, arguments);\n\t\t\t\t\tthis.editorUi.resetCurrentMenu();\n\t\t\t\t\tmenu.destroy();\n\t\t\t\t});\n\n\t\t\t\tvar offset = mxUtils.getOffset(elt);\n\t\t\t\tmenu.popup(offset.x, offset.y + elt.offsetHeight, null, evt);\n\t\t\t\tthis.editorUi.setCurrentMenu(menu, elt);\n\t\t\t}\n\t\t\t\n\t\t\tmxEvent.consume(evt);\n\t\t});\n\t\t\n\t\t// Shows menu automatically while in expanded state\n\t\tmxEvent.addListener(elt, 'mousemove', mxUtils.bind(this, function(evt)\n\t\t{\n\t\t\tif (this.editorUi.menus.autoPopup && this.editorUi.currentMenu != null &&\n\t\t\t\tthis.editorUi.currentMenuElt != elt)\n\t\t\t{\n\t\t\t\tthis.editorUi.hideCurrentMenu();\n\t\t\t\tclickHandler(evt);\n\t\t\t}\n\t\t}));\n\t\t\n\t\t// Hides menu if already showing and prevents focus\n        mxEvent.addListener(elt, (mxClient.IS_POINTER) ? 'pointerdown' : 'mousedown',\n        \tmxUtils.bind(this, function(evt)\n\t\t{\n\t\t\tif (!this.editorUi.menus.autoPopup && this.editorUi.currentMenu != null &&\n\t\t\t\tthis.editorUi.currentMenuElt != elt && mxEvent.isMouseEvent(evt))\n\t\t\t{\n\t\t\t\tthis.editorUi.hideCurrentMenu();\n\t\t\t}\n\n\t\t\tshow = this.editorUi.currentMenu == null;\n\t\t\tevt.preventDefault();\n\t\t}));\n\n\t\tmxEvent.addListener(elt, 'click', mxUtils.bind(this, function(evt)\n\t\t{\n\t\t\tclickHandler(evt);\n\t\t\tshow = true;\n\t\t}));\n\t}\n};\n\n/**\n * Creates the keyboard event handler for the current graph and history.\n */\nMenubar.prototype.destroy = function()\n{\n\t// do nothing\n};\n\n/**\n * Constructs a new action for the given parameters.\n */\nfunction Menu(funct, enabled)\n{\n\tmxEventSource.call(this);\n\tthis.funct = funct;\n\tthis.enabled = (enabled != null) ? enabled : true;\n};\n\n// Menu inherits from mxEventSource\nmxUtils.extend(Menu, mxEventSource);\n\n/**\n * Sets the enabled state of the action and fires a stateChanged event.\n */\nMenu.prototype.isEnabled = function()\n{\n\treturn this.enabled;\n};\n\n/**\n * Sets the enabled state of the action and fires a stateChanged event.\n */\nMenu.prototype.setEnabled = function(value)\n{\n\tif (this.enabled != value)\n\t{\n\t\tthis.enabled = value;\n\t\tthis.fireEvent(new mxEventObject('stateChanged'));\n\t}\n};\n\n/**\n * Sets the enabled state of the action and fires a stateChanged event.\n */\nMenu.prototype.execute = function(menu, parent)\n{\n\tthis.funct(menu, parent);\n};\n\n/**\n * \"Installs\" menus in EditorUi.\n */\nEditorUi.prototype.createMenus = function()\n{\n\treturn new Menus(this);\n};\n"
  },
  {
    "path": "static/cherry/drawio_demo/Shapes.js",
    "content": "/**\n * Copyright (c) 2006-2015, JGraph Ltd\n */\n\n/**\n * Registers shapes.\n */\n(function()\n{\n\tfunction TableLineShape(line, stroke, strokewidth)\n\t{\n\t\tmxShape.call(this);\n\t\tthis.line = line;\n\t\tthis.stroke = stroke;\n\t\tthis.strokewidth = (strokewidth != null) ? strokewidth : 1;\n\t\tthis.updateBoundsFromLine();\n\t};\n\n\t/**\n\t * Extends mxShape.\n\t */\n\tmxUtils.extend(TableLineShape, mxShape);\n\n\t/**\n\t * Function: paintVertexShape\n\t * \n\t * Redirects to redrawPath for subclasses to work.\n\t */\n\tTableLineShape.prototype.updateBoundsFromLine = function()\n\t{\n\t\tvar box = null;\n\n\t\tif (this.line != null)\n\t\t{\n\t\t\tfor (var i = 0; i < this.line.length; i++)\n\t\t\t{\n\t\t\t\tvar curr = this.line[i];\n\n\t\t\t\tif (curr != null)\n\t\t\t\t{\n\t\t\t\t\tvar temp = new mxRectangle(curr.x, curr.y,\n\t\t\t\t\t\tthis.strokewidth, this.strokewidth);\n\n\t\t\t\t\tif (box == null)\n\t\t\t\t\t{\n\t\t\t\t\t\tbox = temp;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tbox.add(temp);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tthis.bounds = (box != null) ? box : new mxRectangle();\n\t};\n\n\t/**\n\t * Function: paintVertexShape\n\t * \n\t * Redirects to redrawPath for subclasses to work.\n\t */\n\tTableLineShape.prototype.paintVertexShape = function(c, x, y, w, h)\n\t{\n\t\tthis.paintTableLine(c, this.line, 0, 0);\n\t};\n\n\t/**\n\t * Function: paintTableLine\n\t * \n\t * Redirects to redrawPath for subclasses to work.\n\t */\n\tTableLineShape.prototype.paintTableLine = function(c, line, dx, dy)\n\t{\n\t\tif (line != null)\n\t\t{\n\t\t\tvar last = null;\n\t\t\tc.begin();\n\n\t\t\tfor (var i = 0; i < line.length; i++)\n\t\t\t{\n\t\t\t\tvar curr = line[i];\n\n\t\t\t\tif (curr != null)\n\t\t\t\t{\n\t\t\t\t\tif (last == null)\n\t\t\t\t\t{\n\t\t\t\t\t\tc.moveTo(curr.x + dx, curr.y + dy);\n\t\t\t\t\t}\n\t\t\t\t\telse if (last != null)\n\t\t\t\t\t{\n\t\t\t\t\t\tc.lineTo(curr.x + dx, curr.y + dy);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tlast = curr;\n\t\t\t}\n\n\t\t\tc.end();\n\t\t\tc.stroke();\n\t\t}\n\t};\n\n\t/**\n\t * Function: intersectsRectangle\n\t * \n\t * Returns true if the shape intersects the given rectangle.\n\t */\n\tTableLineShape.prototype.intersectsRectangle = function(rect)\n\t{\n\t\tvar result = false;\n\n\t\tif (mxShape.prototype.intersectsRectangle.apply(this, arguments))\n\t\t{\n\t\t\tif (this.line != null)\n\t\t\t{\n\t\t\t\tvar last = null;\n\t\n\t\t\t\tfor (var i = 0; i < this.line.length && !result; i++)\n\t\t\t\t{\n\t\t\t\t\tvar curr = this.line[i];\n\t\n\t\t\t\t\tif (curr != null && last != null)\n\t\t\t\t\t{\n\t\t\t\t\t\tresult = mxUtils.rectangleIntersectsSegment(rect, last, curr);\n\t\t\t\t\t}\n\t\n\t\t\t\t\tlast = curr;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn result;\n\t};\n\n\tmxCellRenderer.registerShape('tableLine', TableLineShape);\n\n\t// LATER: Use this to implement striping\n\tfunction paintTableBackground(state, c, x, y, w, h, r)\n\t{\n\t\tif (state != null)\n\t\t{\n\t\t\tvar graph = state.view.graph;\n\t\t\tvar start = graph.getActualStartSize(state.cell, true);\n\t\t\tvar rows = graph.model.getChildCells(state.cell, true);\n\t\t\t\n\t\t\tif (rows.length > 0)\n\t\t\t{\n\t\t\t\tvar events = false;\n\t\t\t\t\n\t\t\t\tif (this.style != null)\n\t\t\t\t{\n\t\t\t\t\tevents = mxUtils.getValue(this.style, mxConstants.STYLE_POINTER_EVENTS, '1') == '1';\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (!events)\n\t\t\t\t{\n\t\t\t\t\tc.pointerEvents = false;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tvar evenRowColor = mxUtils.getValue(state.style,\n\t\t\t\t\t'evenRowColor', mxConstants.NONE);\n\t\t\t\tvar oddRowColor = mxUtils.getValue(state.style,\n\t\t\t\t\t'oddRowColor', mxConstants.NONE);\n\t\t\t\tvar evenColColor = mxUtils.getValue(state.style,\n\t\t\t\t\t'evenColumnColor', mxConstants.NONE);\n\t\t\t\tvar oddColColor = mxUtils.getValue(state.style,\n\t\t\t\t\t'oddColumnColor', mxConstants.NONE);\n\t\t\t\tvar cols = graph.model.getChildCells(rows[0], true);\n\t\t\t\t\n\t\t\t\t// Paints column backgrounds\n\t\t\t\tfor (var i = 0; i < cols.length; i++)\n\t\t\t\t{\n\t\t\t\t\tvar clr = (mxUtils.mod(i, 2) == 1) ? evenColColor : oddColColor;\n\t\t\t\t\tvar geo = graph.getCellGeometry(cols[i]);\n\t\t\t\t\t\n\t\t\t\t\tif (geo != null && clr != mxConstants.NONE)\n\t\t\t\t\t{\n\t\t\t\t\t\tc.setFillColor(clr);\n\t\t\t\t\t\tc.begin();\n\t\t\t\t\t\tc.moveTo(x + geo.x, y + start.y);\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (r > 0 && i == cols.length - 1)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tc.lineTo(x + geo.x + geo.width - r, y);\n\t\t\t\t\t\t\tc.quadTo(x + geo.x + geo.width, y, x + geo.x + geo.width, y + r);\n\t\t\t\t\t\t\tc.lineTo(x + geo.x + geo.width, y + h - r);\n\t\t\t\t\t\t\tc.quadTo(x + geo.x + geo.width, y + h, x + geo.x + geo.width - r, y + h);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tc.lineTo(x + geo.x + geo.width, y + start.y);\n\t\t\t\t\t\t\tc.lineTo(x + geo.x + geo.width, y + h - start.height);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tc.lineTo(x + geo.x, y + h);\n\t\t\t\t\t\tc.close();\n\t\t\t\t\t\tc.fill();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// Paints row backgrounds\n\t\t\t\tfor (var i = 0; i < rows.length; i++)\n\t\t\t\t{\n\t\t\t\t\tvar clr = (mxUtils.mod(i, 2) == 1) ? evenRowColor : oddRowColor;\n\t\t\t\t\tvar geo = graph.getCellGeometry(rows[i]);\n\t\n\t\t\t\t\tif (geo != null && clr != mxConstants.NONE)\n\t\t\t\t\t{\n\t\t\t\t\t\tvar b = (i == rows.length - 1) ? y + h : y + geo.y + geo.height;\n\t\t\t\t\t\tc.setFillColor(clr);\n\t\t\t\t\t\t\n\t\t\t\t\t\tc.begin();\n\t\t\t\t\t\tc.moveTo(x + start.x, y + geo.y);\n\t\t\t\t\t\tc.lineTo(x + w - start.width, y + geo.y);\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (r > 0 && i == rows.length - 1)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tc.lineTo(x + w, b - r);\n\t\t\t\t\t\t\tc.quadTo(x + w, b, x + w - r, b);\n\t\t\t\t\t\t\tc.lineTo(x + r, b);\n\t\t\t\t\t\t\tc.quadTo(x, b, x, b - r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tc.lineTo(x + w - start.width, b);\n\t\t\t\t\t\t\tc.lineTo(x + start.x, b);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tc.close();\n\t\t\t\t\t\tc.fill();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t};\n\n\t// Table Shape\n\tfunction TableShape()\n\t{\n\t\tmxSwimlane.call(this);\n\t};\n\t\n\tmxUtils.extend(TableShape, mxSwimlane);\n\n\tTableShape.prototype.getLabelBounds = function(rect)\n\t{\n\t\tvar start = this.getTitleSize();\n\t\t\n\t\tif (start == 0)\n\t\t{\n\t\t\treturn mxShape.prototype.getLabelBounds.apply(this, arguments);\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn mxSwimlane.prototype.getLabelBounds.apply(this, arguments);\n\t\t}\n\t};\n\t\n\tTableShape.prototype.paintVertexShape = function(c, x, y, w, h)\n\t{\n\t\t// LATER: Split background to add striping, paint rows and cells\n\t\t//paintTableBackground(this.state, c, x, y, w, h);\n\t\tvar collapsed = (this.state != null) ? this.state.view.graph.\n\t\t\tisCellCollapsed(this.state.cell) : false;\n\t\tvar horizontal = this.isHorizontal();\n\t\tvar start = this.getTitleSize();\n\t\t\n\t\tif (start == 0 || this.outline)\n\t\t{\n\t\t\tPartialRectangleShape.prototype.paintVertexShape.apply(this, arguments);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tmxSwimlane.prototype.paintVertexShape.apply(this, arguments);\n\t\t\tc.translate(-x, -y);\n\t\t}\n\n\t\tif (!collapsed && !this.outline &&\n\t\t\t((horizontal && start < h) ||\n\t\t\t(!horizontal && start < w)))\n\t\t{\n\t\t\tthis.paintForeground(c, x, y, w, h);\n\t\t}\n\t};\n\n\tTableShape.prototype.paintForeground = function(c, x, y, w, h)\n\t{\n\t\tif (this.state != null)\n\t\t{\n\t\t\tvar flipH = this.flipH;\n\t\t\tvar flipV = this.flipV;\n\t\t\t\n\t\t\tif (this.direction == mxConstants.DIRECTION_NORTH || this.direction == mxConstants.DIRECTION_SOUTH)\n\t\t\t{\n\t\t\t\tvar tmp = flipH;\n\t\t\t\tflipH = flipV;\n\t\t\t\tflipV = tmp;\n\t\t\t}\n\t\t\t\n\t\t\t// Negative transform to avoid save/restore\n\t\t\tc.rotate(-this.getShapeRotation(), flipH, flipV, x + w / 2, y + h / 2);\n\t\t\t\n\t\t\ts = this.scale;\n\t\t\tx = this.bounds.x / s;\n\t\t\ty = this.bounds.y / s;\n\t\t\tw = this.bounds.width / s;\n\t\t\th = this.bounds.height / s;\n\t\t\tthis.paintTableForeground(c, x, y, w, h);\n\t\t}\n\t};\n\n\tTableShape.prototype.paintTableForeground = function(c, x, y, w, h)\n\t{\n\t\tvar lines = this.state.view.graph.getTableLines(this.state.cell,\n\t\t\tmxUtils.getValue(this.state.style, 'rowLines', '1') != '0',\n\t\t\tmxUtils.getValue(this.state.style, 'columnLines', '1') != '0');\n\n\t\tfor (var i = 0; i < lines.length; i++)\n\t\t{\n\t\t\tTableLineShape.prototype.paintTableLine(c, lines[i], x, y);\n\t\t}\n\t}\n\t\n\tTableShape.prototype.configurePointerEvents = function(c)\n\t{\n\t\tvar start = this.getTitleSize();\n\n\t\tif (start == 0)\n\t\t{\n\t\t\tc.pointerEvents = false;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tmxSwimlane.prototype.configurePointerEvents.apply(this, arguments);\n\t\t}\n\t};\n\n\tmxCellRenderer.registerShape('table', TableShape);\n\n\t// Table Row Shape\n\tfunction TableRowShape()\n\t{\n\t\tTableShape.call(this);\n\t};\n\t\n\tmxUtils.extend(TableRowShape, TableShape);\n\n\tTableRowShape.prototype.paintForeground = function()\n\t{\n\t\t// overridden to do nothing\n\t};\n\t\n\tmxCellRenderer.registerShape('tableRow', TableRowShape);\n\n\t// Cube Shape, supports size style\n\tfunction CubeShape()\n\t{\n\t\tmxCylinder.call(this);\n\t};\n\n\tmxUtils.extend(CubeShape, mxCylinder);\n\n\tCubeShape.prototype.size = 20;\n\n\tCubeShape.prototype.darkOpacity = 0;\n\n\tCubeShape.prototype.darkOpacity2 = 0;\n\t\n\tCubeShape.prototype.paintVertexShape = function(c, x, y, w, h)\n\t{\n\t\tvar s = Math.max(0, Math.min(w, Math.min(h, parseFloat(mxUtils.getValue(this.style, 'size', this.size)))));\n\t\tvar op = Math.max(-1, Math.min(1, parseFloat(mxUtils.getValue(this.style, 'darkOpacity', this.darkOpacity))));\n\t\tvar op2 = Math.max(-1, Math.min(1, parseFloat(mxUtils.getValue(this.style, 'darkOpacity2', this.darkOpacity2))));\n\t\tc.translate(x, y);\n\t\t\n\t\tc.begin();\n\t\tc.moveTo(0, 0);\n\t\tc.lineTo(w - s, 0);\n\t\tc.lineTo(w, s);\n\t\tc.lineTo(w, h);\n\t\tc.lineTo(s, h);\n\t\tc.lineTo(0, h - s);\n\t\tc.lineTo(0, 0);\n\t\tc.close();\n\t\tc.end();\n\t\tc.fillAndStroke();\n\t\t\n\t\tif (!this.outline)\n\t\t{\n\t\t\tc.setShadow(false);\n\t\n\t\t\tif (op != 0)\n\t\t\t{\n\t\t\t\tc.setFillAlpha(Math.abs(op));\n\t\t\t\tc.setFillColor((op < 0) ? '#FFFFFF' : '#000000');\n\t\t\t\tc.begin();\n\t\t\t\tc.moveTo(0, 0);\n\t\t\t\tc.lineTo(w - s, 0);\n\t\t\t\tc.lineTo(w, s);\n\t\t\t\tc.lineTo(s, s);\n\t\t\t\tc.close();\n\t\t\t\tc.fill();\n\t\t\t}\n\n\t\t\tif (op2 != 0)\n\t\t\t{\n\t\t\t\tc.setFillAlpha(Math.abs(op2));\n\t\t\t\tc.setFillColor((op2 < 0) ? '#FFFFFF' : '#000000');\n\t\t\t\tc.begin();\n\t\t\t\tc.moveTo(0, 0);\n\t\t\t\tc.lineTo(s, s);\n\t\t\t\tc.lineTo(s, h);\n\t\t\t\tc.lineTo(0, h - s);\n\t\t\t\tc.close();\n\t\t\t\tc.fill();\n\t\t\t}\n\t\t\t\n\t\t\tc.begin();\n\t\t\tc.moveTo(s, h);\n\t\t\tc.lineTo(s, s);\n\t\t\tc.lineTo(0, 0);\n\t\t\tc.moveTo(s, s);\n\t\t\tc.lineTo(w, s);\n\t\t\tc.end();\n\t\t\tc.stroke();\n\t\t}\n\t};\n\n\tCubeShape.prototype.getLabelMargins = function(rect)\n\t{\n\t\tif (mxUtils.getValue(this.style, 'boundedLbl', false))\n\t\t{\n\t\t\tvar s = parseFloat(mxUtils.getValue(this.style, 'size', this.size)) * this.scale;\n\t\t\t\n\t\t\treturn new mxRectangle(s, s, 0, 0);\n\t\t}\n\t\t\n\t\treturn null;\n\t};\n\t\n\tmxCellRenderer.registerShape('cube', CubeShape);\n\t\n\tvar tan30 = Math.tan(mxUtils.toRadians(30));\n\n\tvar tan30Dx = (0.5 - tan30) / 2;\n\n\tmxCellRenderer.registerShape('isoRectangle', IsoRectangleShape);\n\t\n\t// Wire Shape\n\tfunction WireShape()\n\t{\n\t\tmxConnector.call(this);\n\t};\n\n\tmxUtils.extend(WireShape, mxConnector);\n\n\tWireShape.prototype.paintEdgeShape = function(c, pts)\n\t{\n\t\t// The indirection via functions for markers is needed in\n\t\t// order to apply the offsets before painting the line and\n\t\t// paint the markers after painting the line.\n\t\tvar sourceMarker = this.createMarker(c, pts, true);\n\t\tvar targetMarker = this.createMarker(c, pts, false);\n\n\t\t// Paints base line without dash pattern\n\t\tc.setDashed(false);\n\t\tmxPolyline.prototype.paintEdgeShape.apply(this, arguments);\n\t\t\n\t\t// Paints dashed line with dash pattern and fill color\n\t\tif (this.isDashed != null)\n\t\t{\n\t\t\tc.setDashed(this.isDashed, (this.style != null) ?\n\t\t\t\tmxUtils.getValue(this.style, mxConstants.STYLE_FIX_DASH, false) == 1 : false);\n\t\t}\n\n\t\tc.setShadow(false);\n\t\tc.setStrokeColor(this.fill);\n\t\tmxPolyline.prototype.paintEdgeShape.apply(this, arguments);\n\n\t\t// Paints markers with stroke color\n\t\tc.setStrokeColor(this.stroke);\n\t\tc.setFillColor(this.stroke);\n\t\tc.setDashed(false);\n\t\t\n\t\tif (sourceMarker != null)\n\t\t{\n\t\t\tsourceMarker();\n\t\t}\n\t\t\n\t\tif (targetMarker != null)\n\t\t{\n\t\t\ttargetMarker();\n\t\t}\n\t};\n\n\tmxCellRenderer.registerShape('wire', WireShape);\n\t\n\t// Cube Shape, supports size style\n\tfunction WaypointShape()\n\t{\n\t\tmxCylinder.call(this);\n\t};\n\n\tmxUtils.extend(WaypointShape, mxCylinder);\n\n\tWaypointShape.prototype.size = 6;\n\t\n\tWaypointShape.prototype.paintVertexShape = function(c, x, y, w, h)\n\t{\n\t\tc.setFillColor(this.stroke);\n\t\tvar s = Math.max(0, parseFloat(mxUtils.getValue(this.style, 'size', this.size)) - 2) + 2 * this.strokewidth;\n\t\tc.ellipse(x + (w - s) * 0.5, y + (h - s) * 0.5, s, s);\n\t\tc.fill();\n\t\t\n\t\tc.setFillColor(mxConstants.NONE);\n\t\tc.rect(x, y, w, h);\n\t\tc.fill();\n\t};\n\n\tmxCellRenderer.registerShape('waypoint', WaypointShape);\n\t\n\t// Cube Shape, supports size style\n\tfunction IsoRectangleShape()\n\t{\n\t\tmxActor.call(this);\n\t};\n\n\tmxUtils.extend(IsoRectangleShape, mxActor);\n\n\tIsoRectangleShape.prototype.size = 20;\n\n\tIsoRectangleShape.prototype.redrawPath = function(path, x, y, w, h)\n\t{\n\t\tvar m = Math.min(w, h / tan30);\n\n\t\tpath.translate((w - m) / 2, (h - m) / 2 + m / 4);\n\t\tpath.moveTo(0, 0.25 * m);\n\t\tpath.lineTo(0.5 * m, m * tan30Dx);\n\t\tpath.lineTo(m, 0.25 * m);\n\t\tpath.lineTo(0.5 * m, (0.5 - tan30Dx) * m);\n\t\tpath.lineTo(0, 0.25 * m);\n\t\tpath.close();\n\t\tpath.end();\n\t};\n\n\tmxCellRenderer.registerShape('isoRectangle', IsoRectangleShape);\n\n\t// Cube Shape, supports size style\n\tfunction IsoCubeShape()\n\t{\n\t\tmxCylinder.call(this);\n\t};\n\n\tmxUtils.extend(IsoCubeShape, mxCylinder);\n\n\tIsoCubeShape.prototype.size = 20;\n\n\tIsoCubeShape.prototype.redrawPath = function(path, x, y, w, h, isForeground)\n\t{\n\t\tvar m = Math.min(w, h / (0.5 + tan30));\n\n\t\tif (isForeground)\n\t\t{\n\t\t\tpath.moveTo(0, 0.25 * m);\n\t\t\tpath.lineTo(0.5 * m, (0.5 - tan30Dx) * m);\n\t\t\tpath.lineTo(m, 0.25 * m);\n\t\t\tpath.moveTo(0.5 * m, (0.5 - tan30Dx) * m);\n\t\t\tpath.lineTo(0.5 * m, (1 - tan30Dx) * m);\n\t\t\tpath.end();\n\t\t}\n\t\telse\n\t\t{\n\t\t\tpath.translate((w - m) / 2, (h - m) / 2);\n\t\t\tpath.moveTo(0, 0.25 * m);\n\t\t\tpath.lineTo(0.5 * m, m * tan30Dx);\n\t\t\tpath.lineTo(m, 0.25 * m);\n\t\t\tpath.lineTo(m, 0.75 * m);\n\t\t\tpath.lineTo(0.5 * m, (1 - tan30Dx) * m);\n\t\t\tpath.lineTo(0, 0.75 * m);\n\t\t\tpath.close();\n\t\t\tpath.end();\n\t\t}\n\t};\n\n\tmxCellRenderer.registerShape('isoCube', IsoCubeShape);\n\n\t// DataStore Shape, supports size style\n\tfunction DataStoreShape()\n\t{\n\t\tmxCylinder.call(this);\n\t};\n\n\tmxUtils.extend(DataStoreShape, mxCylinder);\n\n\tDataStoreShape.prototype.redrawPath = function(c, x, y, w, h, isForeground)\n\t{\n\t\tvar dy = Math.min(h / 2, Math.round(h / 8) + this.strokewidth - 1);\n\t\t\n\t\tif ((isForeground && this.fill != null) || (!isForeground && this.fill == null))\n\t\t{\n\t\t\tc.moveTo(0, dy);\n\t\t\tc.curveTo(0, 2 * dy, w, 2 * dy, w, dy);\n\t\t\t\n\t\t\t// Needs separate shapes for correct hit-detection\n\t\t\tif (!isForeground)\n\t\t\t{\n\t\t\t\tc.stroke();\n\t\t\t\tc.begin();\n\t\t\t}\n\t\t\t\n\t\t\tc.translate(0, dy / 2);\n\t\t\tc.moveTo(0, dy);\n\t\t\tc.curveTo(0, 2 * dy, w, 2 * dy, w, dy);\n\t\t\t\n\t\t\t// Needs separate shapes for correct hit-detection\n\t\t\tif (!isForeground)\n\t\t\t{\n\t\t\t\tc.stroke();\n\t\t\t\tc.begin();\n\t\t\t}\n\t\t\t\n\t\t\tc.translate(0, dy / 2);\n\t\t\tc.moveTo(0, dy);\n\t\t\tc.curveTo(0, 2 * dy, w, 2 * dy, w, dy);\n\t\t\t\n\t\t\t// Needs separate shapes for correct hit-detection\n\t\t\tif (!isForeground)\n\t\t\t{\n\t\t\t\tc.stroke();\n\t\t\t\tc.begin();\n\t\t\t}\n\t\t\t\n\t\t\tc.translate(0, -dy);\n\t\t}\n\t\t\n\t\tif (!isForeground)\n\t\t{\n\t\t\tc.moveTo(0, dy);\n\t\t\tc.curveTo(0, -dy / 3, w, -dy / 3, w, dy);\n\t\t\tc.lineTo(w, h - dy);\n\t\t\tc.curveTo(w, h + dy / 3, 0, h + dy / 3, 0, h - dy);\n\t\t\tc.close();\n\t\t}\n\t};\n\n\tDataStoreShape.prototype.getLabelMargins = function(rect)\n\t{\n\t\treturn new mxRectangle(0, 2.5 * Math.min(rect.height / 2,\n\t\t\tMath.round(rect.height / 8) + this.strokewidth - 1), 0, 0);\n\t}\n\n\tmxCellRenderer.registerShape('datastore', DataStoreShape);\n\n\t// Note Shape, supports size style\n\tfunction NoteShape()\n\t{\n\t\tmxCylinder.call(this);\n\t};\n\n\tmxUtils.extend(NoteShape, mxCylinder);\n\n\tNoteShape.prototype.size = 30;\n\n\tNoteShape.prototype.darkOpacity = 0;\n\t\n\tNoteShape.prototype.paintVertexShape = function(c, x, y, w, h)\n\t{\n\t\tvar s = Math.max(0, Math.min(w, Math.min(h, parseFloat(mxUtils.getValue(this.style, 'size', this.size)))));\n\t\tvar op = Math.max(-1, Math.min(1, parseFloat(mxUtils.getValue(this.style, 'darkOpacity', this.darkOpacity))));\n\t\tc.translate(x, y);\n\t\t\n\t\tc.begin();\n\t\tc.moveTo(0, 0);\n\t\tc.lineTo(w - s, 0);\n\t\tc.lineTo(w, s);\n\t\tc.lineTo(w, h);\n\t\tc.lineTo(0, h);\n\t\tc.lineTo(0, 0);\n\t\tc.close();\n\t\tc.end();\n\t\tc.fillAndStroke();\n\t\t\n\t\tif (!this.outline)\n\t\t{\n\t\t\tc.setShadow(false);\n\t\n\t\t\tif (op != 0)\n\t\t\t{\n\t\t\t\tc.setFillAlpha(Math.abs(op));\n\t\t\t\tc.setFillColor((op < 0) ? '#FFFFFF' : '#000000');\n\t\t\t\tc.begin();\n\t\t\t\tc.moveTo(w - s, 0);\n\t\t\t\tc.lineTo(w - s, s);\n\t\t\t\tc.lineTo(w, s);\n\t\t\t\tc.close();\n\t\t\t\tc.fill();\n\t\t\t}\n\t\t\t\n\t\t\tc.begin();\n\t\t\tc.moveTo(w - s, 0);\n\t\t\tc.lineTo(w - s, s);\n\t\t\tc.lineTo(w, s);\n\t\t\tc.end();\n\t\t\tc.stroke();\n\t\t}\n\t};\n\n\tmxCellRenderer.registerShape('note', NoteShape);\n\n\t// Note Shape, supports size style\n\tfunction NoteShape2()\n\t{\n\t\tNoteShape.call(this);\n\t};\n\tmxUtils.extend(NoteShape2, NoteShape);\n\t\n\tmxCellRenderer.registerShape('note2', NoteShape2);\n\n\tNoteShape2.prototype.getLabelMargins = function(rect)\n\t{\n\t\tif (mxUtils.getValue(this.style, 'boundedLbl', false))\n\t\t{\n\t\t\tvar size = mxUtils.getValue(this.style, 'size', 15);\n\t\t\t\n\t\t\treturn new mxRectangle(0, Math.min(rect.height * this.scale, size * this.scale), 0, 0);\n\t\t}\n\t\t\n\t\treturn null;\n\t};\n\n\t// Flexible cube Shape\n\tfunction IsoCubeShape2()\n\t{\n\t\tmxShape.call(this);\n\t};\n\n\tmxUtils.extend(IsoCubeShape2, mxShape);\n\n\tIsoCubeShape2.prototype.isoAngle = 15;\n\t\n\tIsoCubeShape2.prototype.paintVertexShape = function(c, x, y, w, h)\n\t{\n\t\tvar isoAngle = Math.max(0.01, Math.min(94, parseFloat(mxUtils.getValue(this.style, 'isoAngle', this.isoAngle)))) * Math.PI / 200 ;\n\t\tvar isoH = Math.min(w * Math.tan(isoAngle), h * 0.5);\n\n\t\tc.translate(x,y);\n\t\t\n\t\tc.begin();\n\t\tc.moveTo(w * 0.5, 0);\n\t\tc.lineTo(w, isoH);\n\t\tc.lineTo(w, h - isoH);\n\t\tc.lineTo(w * 0.5, h);\n\t\tc.lineTo(0, h - isoH);\n\t\tc.lineTo(0, isoH);\n\t\tc.close();\n\t\tc.fillAndStroke();\n\t\t\n\t\tc.setShadow(false);\n\t\t\n\t\tc.begin();\n\t\tc.moveTo(0, isoH);\n\t\tc.lineTo(w * 0.5, 2 * isoH);\n\t\tc.lineTo(w, isoH);\n\t\tc.moveTo(w * 0.5, 2 * isoH);\n\t\tc.lineTo(w * 0.5, h);\n\t\tc.stroke();\n\t};\n\t\n\tmxCellRenderer.registerShape('isoCube2', IsoCubeShape2);\n\t\n\t// (LEGACY) Flexible cylinder Shape\n\tfunction CylinderShape()\n\t{\n\t\tmxShape.call(this);\n\t};\n\t\n\tmxUtils.extend(CylinderShape, mxShape);\n\t\n\tCylinderShape.prototype.size = 15;\n\t\n\tCylinderShape.prototype.paintVertexShape = function(c, x, y, w, h)\n\t{\n\t\tvar size = Math.max(0, Math.min(h * 0.5, parseFloat(mxUtils.getValue(this.style, 'size', this.size))));\n\n\t\tc.translate(x,y);\n\n\t\tif (size == 0)\n\t\t{\n\t\t\tc.rect(0, 0, w, h);\n\t\t\tc.fillAndStroke();\n\t\t}\n\t\telse\n\t\t{\n\t\t\tc.begin();\n\t\t\tc.moveTo(0, size);\n\t\t\tc.arcTo(w * 0.5, size, 0, 0, 1, w * 0.5, 0);\n\t\t\tc.arcTo(w * 0.5, size, 0, 0, 1, w, size);\n\t\t\tc.lineTo(w, h - size);\n\t\t\tc.arcTo(w * 0.5, size, 0, 0, 1, w * 0.5, h);\n\t\t\tc.arcTo(w * 0.5, size, 0, 0, 1, 0, h - size);\n\t\t\tc.close();\n\t\t\tc.fillAndStroke();\n\t\t\t\n\t\t\tc.setShadow(false);\n\t\t\t\n\t\t\tc.begin();\n\t\t\tc.moveTo(w, size);\n\t\t\tc.arcTo(w * 0.5, size, 0, 0, 1, w * 0.5, 2 * size);\n\t\t\tc.arcTo(w * 0.5, size, 0, 0, 1, 0, size);\n\t\t\tc.stroke();\n\t\t}\n\t};\n\t\n\tmxCellRenderer.registerShape('cylinder2', CylinderShape);\n\t\n\t// Flexible cylinder3 Shape with offset label\n\tfunction CylinderShape3(bounds, fill, stroke, strokewidth)\n\t{\n\t\tmxShape.call(this);\n\t\tthis.bounds = bounds;\n\t\tthis.fill = fill;\n\t\tthis.stroke = stroke;\n\t\tthis.strokewidth = (strokewidth != null) ? strokewidth : 1;\n\t};\n\t\n\tmxUtils.extend(CylinderShape3, mxCylinder);\n\n\tCylinderShape3.prototype.size = 15;\n\t\n\tCylinderShape3.prototype.paintVertexShape = function(c, x, y, w, h)\n\t{\n\t\tvar size = Math.max(0, Math.min(h * 0.5, parseFloat(mxUtils.getValue(this.style, 'size', this.size))));\n\t\tvar lid = mxUtils.getValue(this.style, 'lid', true);\n\n\t\tc.translate(x,y);\n\n\t\tif (size == 0)\n\t\t{\n\t\t\tc.rect(0, 0, w, h);\n\t\t\tc.fillAndStroke();\n\t\t}\n\t\telse\n\t\t{\n\t\t\tc.begin();\n\t\t\t\n\t\t\tif (lid)\n\t\t\t{\n\t\t\t\tc.moveTo(0, size);\n\t\t\t\tc.arcTo(w * 0.5, size, 0, 0, 1, w * 0.5, 0);\n\t\t\t\tc.arcTo(w * 0.5, size, 0, 0, 1, w, size);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tc.moveTo(0, 0);\n\t\t\t\tc.arcTo(w * 0.5, size, 0, 0, 0, w * 0.5, size);\n\t\t\t\tc.arcTo(w * 0.5, size, 0, 0, 0, w, 0);\n\t\t\t}\n\n\t\t\tc.lineTo(w, h - size);\n\t\t\tc.arcTo(w * 0.5, size, 0, 0, 1, w * 0.5, h);\n\t\t\tc.arcTo(w * 0.5, size, 0, 0, 1, 0, h - size);\n\t\t\tc.close();\n\t\t\tc.fillAndStroke();\n\t\t\t\n\t\t\tc.setShadow(false);\n\t\t\t\n\t\t\tif (lid)\n\t\t\t{\n\t\t\t\tc.begin();\n\t\t\t\tc.moveTo(w, size);\n\t\t\t\tc.arcTo(w * 0.5, size, 0, 0, 1, w * 0.5, 2 * size);\n\t\t\t\tc.arcTo(w * 0.5, size, 0, 0, 1, 0, size);\n\t\t\t\tc.stroke();\n\t\t\t}\n\t\t}\n\t};\n\n\tmxCellRenderer.registerShape('cylinder3', CylinderShape3);\n\t\n\t// Switch Shape, supports size style\n\tfunction SwitchShape()\n\t{\n\t\tmxActor.call(this);\n\t};\n\n\tmxUtils.extend(SwitchShape, mxActor);\n\n\tSwitchShape.prototype.redrawPath = function(c, x, y, w, h)\n\t{\n\t\tvar curve = 0.5;\n\t\tc.moveTo(0, 0);\n\t\tc.quadTo(w / 2, h * curve,  w, 0);\n\t\tc.quadTo(w * (1 - curve), h / 2, w, h);\n\t\tc.quadTo(w / 2, h * (1 - curve), 0, h);\n\t\tc.quadTo(w * curve, h / 2, 0, 0);\n\t\tc.end();\n\t};\n\n\tmxCellRenderer.registerShape('switch', SwitchShape);\n\n\t// Folder Shape, supports tabWidth, tabHeight styles\n\tfunction FolderShape()\n\t{\n\t\tmxCylinder.call(this);\n\t};\n\n\tmxUtils.extend(FolderShape, mxCylinder);\n\n\tFolderShape.prototype.tabWidth = 60;\n\n\tFolderShape.prototype.tabHeight = 20;\n\n\tFolderShape.prototype.tabPosition = 'right';\n\n\tFolderShape.prototype.arcSize = 0.1;\n\t\n\tFolderShape.prototype.paintVertexShape = function(c, x, y, w, h)\n\t{\n\t\tc.translate(x, y);\n\t\t\n\t\tvar dx = Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'tabWidth', this.tabWidth))));\n\t\tvar dy = Math.max(0, Math.min(h, parseFloat(mxUtils.getValue(this.style, 'tabHeight', this.tabHeight))));\n\t\tvar tp = mxUtils.getValue(this.style, 'tabPosition', this.tabPosition);\n\t\tvar rounded = mxUtils.getValue(this.style, 'rounded', false);\n\t\tvar absArcSize = mxUtils.getValue(this.style, 'absoluteArcSize', false);\n\t\tvar arcSize = parseFloat(mxUtils.getValue(this.style, 'arcSize', this.arcSize));\n\t\t\n\t\tif (!absArcSize)\n\t\t{\n\t\t\tarcSize = Math.min(w, h) * arcSize;\n\t\t}\n\t\t\n\t\tarcSize = Math.min(arcSize, w * 0.5, (h - dy) * 0.5);\n\t\t\n\t\tdx = Math.max(dx, arcSize);\n\t\tdx = Math.min(w - arcSize, dx);\n\t\t\t\n\t\tif (!rounded)\n\t\t{\n\t\t\tarcSize = 0;\n\t\t}\n\t\t\n\t\tc.begin();\n\t\t\n\t\tif (tp == 'left')\n\t\t{\n\t\t\tc.moveTo(Math.max(arcSize, 0), dy);\n\t\t\tc.lineTo(Math.max(arcSize, 0), 0);\n\t\t\tc.lineTo(dx, 0);\n\t\t\tc.lineTo(dx, dy);\n\t\t}\n\t\t// Right is default\n\t\telse\n\t\t{\n\t\t\tc.moveTo(w - dx, dy);\n\t\t\tc.lineTo(w - dx, 0);\n\t\t\tc.lineTo(w - Math.max(arcSize, 0), 0);\n\t\t\tc.lineTo(w - Math.max(arcSize, 0), dy);\n\t\t}\n\t\t\n\t\tif (rounded)\n\t\t{\n\t\t\tc.moveTo(0, arcSize + dy);\n\t\t\tc.arcTo(arcSize, arcSize, 0, 0, 1, arcSize, dy);\n\t\t\tc.lineTo(w - arcSize, dy);\n\t\t\tc.arcTo(arcSize, arcSize, 0, 0, 1, w, arcSize + dy);\n\t\t\tc.lineTo(w, h - arcSize);\n\t\t\tc.arcTo(arcSize, arcSize, 0, 0, 1, w - arcSize, h);\n\t\t\tc.lineTo(arcSize, h);\n\t\t\tc.arcTo(arcSize, arcSize, 0, 0, 1, 0, h - arcSize);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tc.moveTo(0, dy);\n\t\t\tc.lineTo(w, dy);\n\t\t\tc.lineTo(w, h);\n\t\t\tc.lineTo(0, h);\n\t\t}\n\t\t\n\t\tc.close();\n\t\tc.fillAndStroke();\n\t\t\n\t\tc.setShadow(false);\n\t\n\t\tvar sym = mxUtils.getValue(this.style, 'folderSymbol', null);\n\t\t\n\t\tif (sym == 'triangle')\n\t\t{\n\t\t\tc.begin();\n\t\t\tc.moveTo(w - 30, dy + 20);\n\t\t\tc.lineTo(w - 20, dy + 10);\n\t\t\tc.lineTo(w - 10, dy + 20);\n\t\t\tc.close();\n\t\t\tc.stroke();\n\t\t}\n\t};\n\n\tmxCellRenderer.registerShape('folder', FolderShape);\n\n\tFolderShape.prototype.getLabelMargins = function(rect)\n\t{\n\t\tif (mxUtils.getValue(this.style, 'boundedLbl', false))\n\t\t{\n\t\t\tvar sizeY = mxUtils.getValue(this.style, 'tabHeight', 15) * this.scale;\n\n\t\t\tif (mxUtils.getValue(this.style, 'labelInHeader', false))\n\t\t\t{\n\t\t\t\tvar sizeX = mxUtils.getValue(this.style, 'tabWidth', 15) * this.scale;\n\t\t\t\tvar sizeY = mxUtils.getValue(this.style, 'tabHeight', 15) * this.scale;\n\t\t\t\tvar rounded = mxUtils.getValue(this.style, 'rounded', false);\n\t\t\t\tvar absArcSize = mxUtils.getValue(this.style, 'absoluteArcSize', false);\n\t\t\t\tvar arcSize = parseFloat(mxUtils.getValue(this.style, 'arcSize', this.arcSize));\n\t\t\t\t\n\t\t\t\tif (!absArcSize)\n\t\t\t\t{\n\t\t\t\t\tarcSize = Math.min(rect.width, rect.height) * arcSize;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tarcSize = Math.min(arcSize, rect.width * 0.5, (rect.height - sizeY) * 0.5);\n\t\t\t\t\t\n\t\t\t\tif (!rounded)\n\t\t\t\t{\n\t\t\t\t\tarcSize = 0;\n\t\t\t\t}\n\n\t\t\t\tif (mxUtils.getValue(this.style, 'tabPosition', this.tabPosition) == 'left')\n\t\t\t\t{\n\t\t\t\t\treturn new mxRectangle(arcSize, 0, Math.min(rect.width, rect.width - sizeX), Math.min(rect.height, rect.height - sizeY));\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\treturn new mxRectangle(Math.min(rect.width, rect.width - sizeX), 0, arcSize, Math.min(rect.height, rect.height - sizeY));\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn new mxRectangle(0, Math.min(rect.height, sizeY), 0, 0);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn null;\n\t};\n\t\t\n\t//**********************************************************************************************************************************************************\n\t//UML State shape\n\t//**********************************************************************************************************************************************************\n\tfunction UMLStateShape()\n\t{\n\t\tmxCylinder.call(this);\n\t};\n\n\tmxUtils.extend(UMLStateShape, mxCylinder);\n\n\tUMLStateShape.prototype.arcSize = 0.1;\n\n\tUMLStateShape.prototype.paintVertexShape = function(c, x, y, w, h)\n\t{\n\t\tc.translate(x, y);\n\t\t\n\t\tvar rounded = mxUtils.getValue(this.style, 'rounded', false);\n\t\tvar absArcSize = mxUtils.getValue(this.style, 'absoluteArcSize', false);\n\t\tvar arcSize = parseFloat(mxUtils.getValue(this.style, 'arcSize', this.arcSize));\n\t\tvar connPoint = mxUtils.getValue(this.style, 'umlStateConnection', null);\n\t\t\n\t\tif (!absArcSize)\n\t\t{\n\t\t\tarcSize = Math.min(w, h) * arcSize;\n\t\t}\n\t\t\n\t\tarcSize = Math.min(arcSize, w * 0.5, h * 0.5);\n\t\t\n\t\tif (!rounded)\n\t\t{\n\t\t\tarcSize = 0;\n\t\t}\n\t\t\n\t\tvar dx = 0;\n\t\t\n\t\tif (connPoint != null)\n\t\t{\n\t\t\tdx = 10;\n\t\t}\n\t\t\n\t\tc.begin();\n\t\tc.moveTo(dx, arcSize);\n\t\tc.arcTo(arcSize, arcSize, 0, 0, 1, dx + arcSize, 0);\n\t\tc.lineTo(w - arcSize, 0);\n\t\tc.arcTo(arcSize, arcSize, 0, 0, 1, w, arcSize);\n\t\tc.lineTo(w, h - arcSize);\n\t\tc.arcTo(arcSize, arcSize, 0, 0, 1, w - arcSize, h);\n\t\tc.lineTo(dx + arcSize, h);\n\t\tc.arcTo(arcSize, arcSize, 0, 0, 1, dx, h - arcSize);\n\t\tc.close();\n\t\tc.fillAndStroke();\n\t\t\n\t\tc.setShadow(false);\n\n\t\tvar sym = mxUtils.getValue(this.style, 'umlStateSymbol', null);\n\t\t\n\t\tif (sym == 'collapseState')\n\t\t{\n\t\t\tc.roundrect(w - 40, h - 20, 10, 10, 3, 3);\n\t\t\tc.stroke();\n\t\t\tc.roundrect(w - 20, h - 20, 10, 10, 3, 3);\n\t\t\tc.stroke();\n\t\t\tc.begin();\n\t\t\tc.moveTo(w - 30, h - 15);\n\t\t\tc.lineTo(w - 20, h - 15);\n\t\t\tc.stroke();\n\t\t}\n\n\t\tif (connPoint == 'connPointRefEntry')\n\t\t{\n\t\t\tc.ellipse(0, h * 0.5 - 10, 20, 20);\n\t\t\tc.fillAndStroke();\n\t\t}\n\t\telse if (connPoint == 'connPointRefExit')\n\t\t{\n\t\t\tc.ellipse(0, h * 0.5 - 10, 20, 20);\n\t\t\tc.fillAndStroke();\n\t\t\t\n\t\t\tc.begin();\n\t\t\tc.moveTo(5, h * 0.5 - 5);\n\t\t\tc.lineTo(15, h * 0.5 + 5);\n\t\t\tc.moveTo(15, h * 0.5 - 5);\n\t\t\tc.lineTo(5, h * 0.5 + 5);\n\t\t\tc.stroke();\n\t\t}\n\t};\n\n\tUMLStateShape.prototype.getLabelMargins = function(rect)\n\t{\n\t\tif (mxUtils.getValue(this.style, 'boundedLbl', false))\n\t\t{\n\t\t\tvar connPoint = mxUtils.getValue(this.style, 'umlStateConnection', null);\n\t\t\t\n\t\t\tif (connPoint != null)\n\t\t\t{\n\t\t\t\treturn new mxRectangle(10 * this.scale, 0, 0, 0);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn null;\n\t};\n\n\tmxCellRenderer.registerShape('umlState', UMLStateShape);\n\n\t// Card shape\n\tfunction CardShape()\n\t{\n\t\tmxActor.call(this);\n\t};\n\n\tmxUtils.extend(CardShape, mxActor);\n\n\tCardShape.prototype.size = 30;\n\n\tCardShape.prototype.isRoundable = function()\n\t{\n\t\treturn true;\n\t};\n\n\tCardShape.prototype.redrawPath = function(c, x, y, w, h)\n\t{\n\t\tvar s = Math.max(0, Math.min(w, Math.min(h, parseFloat(mxUtils.getValue(this.style, 'size', this.size)))));\n\t\tvar arcSize = mxUtils.getValue(this.style, mxConstants.STYLE_ARCSIZE, mxConstants.LINE_ARCSIZE) / 2;\n\t\tthis.addPoints(c, [new mxPoint(s, 0), new mxPoint(w, 0), new mxPoint(w, h), new mxPoint(0, h), new mxPoint(0, s)],\n\t\t\t\tthis.isRounded, arcSize, true);\n\t\tc.end();\n\t};\n\n\tmxCellRenderer.registerShape('card', CardShape);\n\n\t// Tape shape\n\tfunction TapeShape()\n\t{\n\t\tmxActor.call(this);\n\t};\n\n\tmxUtils.extend(TapeShape, mxActor);\n\n\tTapeShape.prototype.size = 0.4;\n\n\tTapeShape.prototype.redrawPath = function(c, x, y, w, h)\n\t{\n\t\tvar dy = h * Math.max(0, Math.min(1, parseFloat(mxUtils.getValue(this.style, 'size', this.size))));\n\t\tvar fy = 1.4;\n\t\t\n\t\tc.moveTo(0, dy / 2);\n\t\tc.quadTo(w / 4, dy * fy, w / 2, dy / 2);\n\t\tc.quadTo(w * 3 / 4, dy * (1 - fy), w, dy / 2);\n\t\tc.lineTo(w, h - dy / 2);\n\t\tc.quadTo(w * 3 / 4, h - dy * fy, w / 2, h - dy / 2);\n\t\tc.quadTo(w / 4, h - dy * (1 - fy), 0, h - dy / 2);\n\t\tc.lineTo(0, dy / 2);\n\t\tc.close();\n\t\tc.end();\n\t};\n\t\n\tTapeShape.prototype.getLabelBounds = function(rect)\n\t{\n\t\tif (mxUtils.getValue(this.style, 'boundedLbl', false))\n\t\t{\n\t\t\tvar size = mxUtils.getValue(this.style, 'size', this.size);\t\t\t\n\t\t\tvar w = rect.width;\n\t\t\tvar h = rect.height;\n\t\t\t\n\t\t\tif (this.direction == null ||\n\t\t\t\t\tthis.direction == mxConstants.DIRECTION_EAST ||\n\t\t\t\t\tthis.direction == mxConstants.DIRECTION_WEST)\n\t\t\t{\n\t\t\t\tvar dy = h * size;\n\t\t\t\t\n\t\t\t\treturn new mxRectangle(rect.x, rect.y + dy, w, h - 2 * dy);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tvar dx = w * size;\n\t\t\t\t\n\t\t\t\treturn new mxRectangle(rect.x + dx, rect.y, w - 2 * dx, h);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn rect;\n\t};\n\t\n\tmxCellRenderer.registerShape('tape', TapeShape);\n\n\t// Document shape\n\tfunction DocumentShape()\n\t{\n\t\tmxActor.call(this);\n\t};\n\n\tmxUtils.extend(DocumentShape, mxActor);\n\n\tDocumentShape.prototype.size = 0.3;\n\n\tDocumentShape.prototype.getLabelMargins = function(rect)\n\t{\n\t\tif (mxUtils.getValue(this.style, 'boundedLbl', false))\n\t\t{\n\t\t\treturn new mxRectangle(0, 0, 0, parseFloat(mxUtils.getValue(\n\t\t\t\tthis.style, 'size', this.size)) * rect.height);\n\t\t}\n\t\t\n\t\treturn null;\n\t};\n\n\tDocumentShape.prototype.redrawPath = function(c, x, y, w, h)\n\t{\n\t\tvar dy = h * Math.max(0, Math.min(1, parseFloat(mxUtils.getValue(this.style, 'size', this.size))));\n\t\tvar fy = 1.4;\n\t\t\n\t\tc.moveTo(0, 0);\n\t\tc.lineTo(w, 0);\n\t\tc.lineTo(w, h - dy / 2);\n\t\tc.quadTo(w * 3 / 4, h - dy * fy, w / 2, h - dy / 2);\n\t\tc.quadTo(w / 4, h - dy * (1 - fy), 0, h - dy / 2);\n\t\tc.lineTo(0, dy / 2);\n\t\tc.close();\n\t\tc.end();\n\t};\n\n\tmxCellRenderer.registerShape('document', DocumentShape);\n\n\tvar cylinderGetCylinderSize = mxCylinder.prototype.getCylinderSize;\n\t\n\tmxCylinder.prototype.getCylinderSize = function(x, y, w, h)\n\t{\n\t\tvar size = mxUtils.getValue(this.style, 'size');\n\t\t\n\t\tif (size != null)\n\t\t{\n\t\t\treturn h * Math.max(0, Math.min(1, size));\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn cylinderGetCylinderSize.apply(this, arguments);\n\t\t}\n\t};\n\t\n\tmxCylinder.prototype.getLabelMargins = function(rect)\n\t{\n\t\tif (mxUtils.getValue(this.style, 'boundedLbl', false))\n\t\t{\n\t\t\tvar size = mxUtils.getValue(this.style, 'size', 0.15) * 2;\n\t\t\t\n\t\t\treturn new mxRectangle(0, Math.min(this.maxHeight * this.scale, rect.height * size), 0, 0);\n\t\t}\n\t\t\n\t\treturn null;\n\t};\n\n\tCylinderShape3.prototype.getLabelMargins = function(rect)\n\t{\n\t\tif (mxUtils.getValue(this.style, 'boundedLbl', false))\n\t\t{\n\t\t\tvar size = mxUtils.getValue(this.style, 'size', 15);\n\t\t\t\n\t\t\tif (!mxUtils.getValue(this.style, 'lid', true))\n\t\t\t{\n\t\t\t\tsize /= 2;\n\t\t\t}\n\t\t\t\n\t\t\treturn new mxRectangle(0, Math.min(rect.height * this.scale, size * 2 * this.scale), 0, Math.max(0, size * 0.3 * this.scale));\n\t\t}\n\t\t\n\t\treturn null;\n\t};\n\n\tFolderShape.prototype.getLabelMargins = function(rect)\n\t{\n\t\tif (mxUtils.getValue(this.style, 'boundedLbl', false))\n\t\t{\n\t\t\tvar sizeY = mxUtils.getValue(this.style, 'tabHeight', 15) * this.scale;\n\n\t\t\tif (mxUtils.getValue(this.style, 'labelInHeader', false))\n\t\t\t{\n\t\t\t\tvar sizeX = mxUtils.getValue(this.style, 'tabWidth', 15) * this.scale;\n\t\t\t\tvar sizeY = mxUtils.getValue(this.style, 'tabHeight', 15) * this.scale;\n\t\t\t\tvar rounded = mxUtils.getValue(this.style, 'rounded', false);\n\t\t\t\tvar absArcSize = mxUtils.getValue(this.style, 'absoluteArcSize', false);\n\t\t\t\tvar arcSize = parseFloat(mxUtils.getValue(this.style, 'arcSize', this.arcSize));\n\t\t\t\t\n\t\t\t\tif (!absArcSize)\n\t\t\t\t{\n\t\t\t\t\tarcSize = Math.min(rect.width, rect.height) * arcSize;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tarcSize = Math.min(arcSize, rect.width * 0.5, (rect.height - sizeY) * 0.5);\n\t\t\t\t\t\n\t\t\t\tif (!rounded)\n\t\t\t\t{\n\t\t\t\t\tarcSize = 0;\n\t\t\t\t}\n\t\n\t\t\t\tif (mxUtils.getValue(this.style, 'tabPosition', this.tabPosition) == 'left')\n\t\t\t\t{\n\t\t\t\t\treturn new mxRectangle(arcSize, 0, Math.min(rect.width, rect.width - sizeX), Math.min(rect.height, rect.height - sizeY));\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\treturn new mxRectangle(Math.min(rect.width, rect.width - sizeX), 0, arcSize, Math.min(rect.height, rect.height - sizeY));\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn new mxRectangle(0, Math.min(rect.height, sizeY), 0, 0);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn null;\n\t};\n\n\tUMLStateShape.prototype.getLabelMargins = function(rect)\n\t{\n\t\tif (mxUtils.getValue(this.style, 'boundedLbl', false))\n\t\t{\n\t\t\tvar connPoint = mxUtils.getValue(this.style, 'umlStateConnection', null);\n\t\t\t\n\t\t\tif (connPoint != null)\n\t\t\t{\n\t\t\t\treturn new mxRectangle(10 * this.scale, 0, 0, 0);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn null;\n\t};\n\n\tNoteShape2.prototype.getLabelMargins = function(rect)\n\t{\n\t\tif (mxUtils.getValue(this.style, 'boundedLbl', false))\n\t\t{\n\t\t\tvar size = mxUtils.getValue(this.style, 'size', 15);\n\t\t\t\n\t\t\treturn new mxRectangle(0, Math.min(rect.height * this.scale, size * this.scale), 0, Math.max(0, size * this.scale));\n\t\t}\n\t\t\n\t\treturn null;\n\t};\n\n\t// Parallelogram shape\n\tfunction ParallelogramShape()\n\t{\n\t\tmxActor.call(this);\n\t};\n\n\tmxUtils.extend(ParallelogramShape, mxActor);\n\n\tParallelogramShape.prototype.size = 0.2;\n\n\tParallelogramShape.prototype.fixedSize = 20;\n\n\tParallelogramShape.prototype.isRoundable = function()\n\t{\n\t\treturn true;\n\t};\n\n\tParallelogramShape.prototype.redrawPath = function(c, x, y, w, h)\n\t{\n\t\tvar fixed = mxUtils.getValue(this.style, 'fixedSize', '0') != '0';\n\n\t\tvar dx = (fixed) ? Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'size', this.fixedSize)))) : w * Math.max(0, Math.min(1, parseFloat(mxUtils.getValue(this.style, 'size', this.size))));\n\t\tvar arcSize = mxUtils.getValue(this.style, mxConstants.STYLE_ARCSIZE, mxConstants.LINE_ARCSIZE) / 2;\n\t\tthis.addPoints(c, [new mxPoint(0, h), new mxPoint(dx, 0), new mxPoint(w, 0), new mxPoint(w - dx, h)],\n\t\t\t\tthis.isRounded, arcSize, true);\n\t\tc.end();\n\t};\n\n\tmxCellRenderer.registerShape('parallelogram', ParallelogramShape);\n\n\t// Trapezoid shape\n\tfunction TrapezoidShape()\n\t{\n\t\tmxActor.call(this);\n\t};\n\n\tmxUtils.extend(TrapezoidShape, mxActor);\n\n\tTrapezoidShape.prototype.size = 0.2;\n\n\tTrapezoidShape.prototype.fixedSize = 20;\n\n\tTrapezoidShape.prototype.isRoundable = function()\n\t{\n\t\treturn true;\n\t};\n\n\tTrapezoidShape.prototype.redrawPath = function(c, x, y, w, h)\n\t{\n\t\t\n\t\tvar fixed = mxUtils.getValue(this.style, 'fixedSize', '0') != '0';\n\n\t\tvar dx = (fixed) ? Math.max(0, Math.min(w * 0.5, parseFloat(mxUtils.getValue(this.style, 'size', this.fixedSize)))) : w * Math.max(0, Math.min(0.5, parseFloat(mxUtils.getValue(this.style, 'size', this.size))));\n\t\tvar arcSize = mxUtils.getValue(this.style, mxConstants.STYLE_ARCSIZE, mxConstants.LINE_ARCSIZE) / 2;\n\t\tthis.addPoints(c, [new mxPoint(0, h), new mxPoint(dx, 0), new mxPoint(w - dx, 0), new mxPoint(w, h)],\n\t\t\t\tthis.isRounded, arcSize, true);\n\t};\n\n\tmxCellRenderer.registerShape('trapezoid', TrapezoidShape);\n\n\t// Curly Bracket shape\n\tfunction CurlyBracketShape()\n\t{\n\t\tmxActor.call(this);\n\t};\n\n\tmxUtils.extend(CurlyBracketShape, mxActor);\n\n\tCurlyBracketShape.prototype.size = 0.5;\n\n\tCurlyBracketShape.prototype.redrawPath = function(c, x, y, w, h)\n\t{\n\t\tc.setFillColor(null);\n\t\tvar s = w * Math.max(0, Math.min(1, parseFloat(mxUtils.getValue(this.style, 'size', this.size))));\n\t\tvar arcSize = mxUtils.getValue(this.style, mxConstants.STYLE_ARCSIZE, mxConstants.LINE_ARCSIZE) / 2;\n\t\tthis.addPoints(c, [new mxPoint(w, 0), new mxPoint(s, 0), new mxPoint(s, h / 2),\n\t\t                   new mxPoint(0, h / 2), new mxPoint(s, h / 2), new mxPoint(s, h),\n\t\t                   new mxPoint(w, h)], this.isRounded, arcSize, false);\n\t\tc.end();\n\t};\n\n\tmxCellRenderer.registerShape('curlyBracket', CurlyBracketShape);\n\n\t// Parallel marker shape\n\tfunction ParallelMarkerShape()\n\t{\n\t\tmxActor.call(this);\n\t};\n\tmxUtils.extend(ParallelMarkerShape, mxActor);\n\tParallelMarkerShape.prototype.redrawPath = function(c, x, y, w, h)\n\t{\n\t\tc.setStrokeWidth(1);\n\t\tc.setFillColor(this.stroke);\n\t\tvar w2 = w / 5;\n\t\tc.rect(0, 0, w2, h);\n\t\tc.fillAndStroke();\n\t\tc.rect(2 * w2, 0, w2, h);\n\t\tc.fillAndStroke();\n\t\tc.rect(4 * w2, 0, w2, h);\n\t\tc.fillAndStroke();\n\t};\n\n\tmxCellRenderer.registerShape('parallelMarker', ParallelMarkerShape);\n\n\t/**\n\t * Adds handJiggle style (jiggle=n sets jiggle)\n\t */\n\tfunction HandJiggle(canvas, defaultVariation)\n\t{\n\t\tthis.canvas = canvas;\n\t\t\n\t\t// Avoids \"spikes\" in the output\n\t\tthis.canvas.setLineJoin('round');\n\t\tthis.canvas.setLineCap('round');\n\t\t\n\t\tthis.defaultVariation = defaultVariation;\n\t\t\n\t\tthis.originalLineTo = this.canvas.lineTo;\n\t\tthis.canvas.lineTo = mxUtils.bind(this, HandJiggle.prototype.lineTo);\n\t\t\n\t\tthis.originalMoveTo = this.canvas.moveTo;\n\t\tthis.canvas.moveTo = mxUtils.bind(this, HandJiggle.prototype.moveTo);\n\t\t\n\t\tthis.originalClose = this.canvas.close;\n\t\tthis.canvas.close = mxUtils.bind(this, HandJiggle.prototype.close);\n\t\t\n\t\tthis.originalQuadTo = this.canvas.quadTo;\n\t\tthis.canvas.quadTo = mxUtils.bind(this, HandJiggle.prototype.quadTo);\n\t\t\n\t\tthis.originalCurveTo = this.canvas.curveTo;\n\t\tthis.canvas.curveTo = mxUtils.bind(this, HandJiggle.prototype.curveTo);\n\t\t\n\t\tthis.originalArcTo = this.canvas.arcTo;\n\t\tthis.canvas.arcTo = mxUtils.bind(this, HandJiggle.prototype.arcTo);\n\t};\n\t\n\tHandJiggle.prototype.moveTo = function(endX, endY)\n\t{\n\t\tthis.originalMoveTo.apply(this.canvas, arguments);\n\t\tthis.lastX = endX;\n\t\tthis.lastY = endY;\n\t\tthis.firstX = endX;\n\t\tthis.firstY = endY;\n\t};\n\t\n\tHandJiggle.prototype.close = function()\n\t{\n\t\tif (this.firstX != null && this.firstY != null)\n\t\t{\n\t\t\tthis.lineTo(this.firstX, this.firstY);\n\t\t\tthis.originalClose.apply(this.canvas, arguments);\n\t\t}\n\t\t\n\t\tthis.originalClose.apply(this.canvas, arguments);\n\t};\n\t\n\tHandJiggle.prototype.quadTo = function(x1, y1, x2, y2)\n\t{\n\t\tthis.originalQuadTo.apply(this.canvas, arguments);\n\t\tthis.lastX = x2;\n\t\tthis.lastY = y2;\n\t};\n\t\n\tHandJiggle.prototype.curveTo = function(x1, y1, x2, y2, x3, y3)\n\t{\n\t\tthis.originalCurveTo.apply(this.canvas, arguments);\n\t\tthis.lastX = x3;\n\t\tthis.lastY = y3;\n\t};\n\t\n\tHandJiggle.prototype.arcTo = function(rx, ry, angle, largeArcFlag, sweepFlag, x, y)\n\t{\n\t\tthis.originalArcTo.apply(this.canvas, arguments);\n\t\tthis.lastX = x;\n\t\tthis.lastY = y;\n\t};\n\n\tHandJiggle.prototype.lineTo = function(endX, endY)\n\t{\n\t\t// LATER: Check why this.canvas.lastX cannot be used\n\t\tif (this.lastX != null && this.lastY != null)\n\t\t{\n\t\t\tvar dx = Math.abs(endX - this.lastX);\n\t\t\tvar dy = Math.abs(endY - this.lastY);\n\t\t\tvar dist = Math.sqrt(dx * dx + dy * dy);\n\t\t\t\n\t\t\tif (dist < 2)\n\t\t\t{\n\t\t\t\tthis.originalLineTo.apply(this.canvas, arguments);\n\t\t\t\tthis.lastX = endX;\n\t\t\t\tthis.lastY = endY;\n\t\t\t\t\n\t\t\t\treturn;\n\t\t\t}\n\t\n\t\t\tvar segs = Math.round(dist / 10);\n\t\t\tvar variation = this.defaultVariation;\n\t\t\t\n\t\t\tif (segs < 5)\n\t\t\t{\n\t\t\t\tsegs = 5;\n\t\t\t\tvariation /= 3;\n\t\t\t}\n\t\t\t\n\t\t\tfunction sign(x)\n\t\t\t{\n\t\t\t    return typeof x === 'number' ? x ? x < 0 ? -1 : 1 : x === x ? 0 : NaN : NaN;\n\t\t\t}\n\t\n\t\t\tvar stepX = sign(endX - this.lastX) * dx / segs;\n\t\t\tvar stepY = sign(endY - this.lastY) * dy / segs;\n\t\n\t\t\tvar fx = dx / dist;\n\t\t\tvar fy = dy / dist;\n\t\n\t\t\tfor (var s = 0; s < segs; s++)\n\t\t\t{\n\t\t\t\tvar x = stepX * s + this.lastX;\n\t\t\t\tvar y = stepY * s + this.lastY;\n\t\n\t\t\t\tvar offset = (Math.random() - 0.5) * variation;\n\t\t\t\tthis.originalLineTo.call(this.canvas, x - offset * fy, y - offset * fx);\n\t\t\t}\n\t\t\t\n\t\t\tthis.originalLineTo.call(this.canvas, endX, endY);\n\t\t\tthis.lastX = endX;\n\t\t\tthis.lastY = endY;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tthis.originalLineTo.apply(this.canvas, arguments);\n\t\t\tthis.lastX = endX;\n\t\t\tthis.lastY = endY;\n\t\t}\n\t};\n\t\n\tHandJiggle.prototype.destroy = function()\n\t{\n\t\t this.canvas.lineTo = this.originalLineTo;\n\t\t this.canvas.moveTo = this.originalMoveTo;\n\t\t this.canvas.close = this.originalClose;\n\t\t this.canvas.quadTo = this.originalQuadTo;\n\t\t this.canvas.curveTo = this.originalCurveTo;\n\t\t this.canvas.arcTo = this.originalArcTo;\n\t};\n\t\n\t// Installs hand jiggle for comic and sketch style\n\tvar shapeBeforePaint = mxShape.prototype.beforePaint;\n\tmxShape.prototype.beforePaint = function(c)\n\t{\n\t\tshapeBeforePaint.apply(this, arguments);\n\t\t\n\t\tif (c.handJiggle == null)\n\t\t{\n\t\t\tc.handJiggle = this.createHandJiggle(c);\n\t\t}\n\t};\n\t\n\tvar shapeAfterPaint = mxShape.prototype.afterPaint;\n\tmxShape.prototype.afterPaint = function(c)\n\t{\n\t\tshapeAfterPaint.apply(this, arguments);\n\t\t\n\t\tif (c.handJiggle != null)\n\t\t{\n\t\t\tc.handJiggle.destroy();\n\t\t\tdelete c.handJiggle;\n\t\t}\n\t};\n\t\t\n\t// Returns a new HandJiggle canvas\n\tmxShape.prototype.createComicCanvas = function(c)\n\t{\n\t\treturn new HandJiggle(c, mxUtils.getValue(this.style, 'jiggle', Editor.sketchDefaultJiggle));\n\t};\n\t\n\t// Overrides to avoid call to rect\n\tmxShape.prototype.createHandJiggle = function(c)\n\t{\n\t\tif (!this.outline && this.style != null && mxUtils.getValue(this.style, 'comic', '0') != '0')\n\t\t{\n\t\t\treturn this.createComicCanvas(c);\n\t\t}\n\t\t\n\t\treturn null;\n\t};\n\t\n\t// Overrides to avoid call to rect\n\tvar mxRectangleShapeIsHtmlAllowed0 = mxRectangleShape.prototype.isHtmlAllowed;\n\tmxRectangleShape.prototype.isHtmlAllowed = function()\n\t{\n\t\treturn !this.outline && (this.style == null || (mxUtils.getValue(this.style, 'comic', '0') == '0' &&\n\t\t\tmxUtils.getValue(this.style, 'sketch', (urlParams['rough'] == '1') ? '1' : '0') == '0')) &&\n\t\t\tmxRectangleShapeIsHtmlAllowed0.apply(this, arguments);\n\t};\n\t\n\tvar mxRectangleShapePaintBackground0 = mxRectangleShape.prototype.paintBackground;\n\tmxRectangleShape.prototype.paintBackground = function(c, x, y, w, h)\n\t{\n\t\tif (c.handJiggle == null || c.handJiggle.constructor != HandJiggle)\n\t\t{\n\t\t\tmxRectangleShapePaintBackground0.apply(this, arguments);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tvar events = true;\n\n\t\t\tif (this.style != null)\n\t\t\t{\n\t\t\t\tevents = mxUtils.getValue(this.style, mxConstants.STYLE_POINTER_EVENTS, '1') == '1';\t\t\n\t\t\t}\n\n\t\t\tif (events || (this.fill != null && this.fill != mxConstants.NONE) ||\n\t\t\t\t(this.stroke != null && this.stroke != mxConstants.NONE))\n\t\t\t{\n\t\t\t\tif (!events && (this.fill == null || this.fill == mxConstants.NONE))\n\t\t\t\t{\n\t\t\t\t\tc.pointerEvents = false;\n\t\t\t\t}\n\n\t\t\t\tc.begin();\n\n\t\t\t\tif (this.isRounded)\n\t\t\t\t{\n\t\t\t\t\tvar r = 0;\n\n\t\t\t\t\tif (mxUtils.getValue(this.style, mxConstants.STYLE_ABSOLUTE_ARCSIZE, 0) == '1')\n\t\t\t\t\t{\n\t\t\t\t\t\tr = Math.min(w / 2, Math.min(h / 2, mxUtils.getValue(this.style,\n\t\t\t\t\t\t\tmxConstants.STYLE_ARCSIZE, mxConstants.LINE_ARCSIZE) / 2));\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tvar f = mxUtils.getValue(this.style, mxConstants.STYLE_ARCSIZE,\n\t\t\t\t\t\t\tmxConstants.RECTANGLE_ROUNDING_FACTOR * 100) / 100;\n\t\t\t\t\t\tr = Math.min(w * f, h * f);\n\t\t\t\t\t}\n\n\t\t\t\t\tc.moveTo(x + r, y);\n\t\t\t\t\tc.lineTo(x + w - r, y);\n\t\t\t\t\tc.quadTo(x + w, y, x + w, y + r);\n\t\t\t\t\tc.lineTo(x + w, y + h - r);\n\t\t\t\t\tc.quadTo(x + w, y + h, x + w - r, y + h);\n\t\t\t\t\tc.lineTo(x + r, y + h);\n\t\t\t\t\tc.quadTo(x, y + h, x, y + h - r);\n\t\t\t\t\tc.lineTo(x, y + r);\n\t\t\t\t\tc.quadTo(x, y, x + r, y);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tc.moveTo(x, y);\n\t\t\t\t\tc.lineTo(x + w, y);\n\t\t\t\t\tc.lineTo(x + w, y + h);\n\t\t\t\t\tc.lineTo(x, y + h);\n\t\t\t\t\tc.lineTo(x, y);\n\t\t\t\t}\n\n\t\t\t\t// LATER: Check if close is needed here\n\t\t\t\tc.close();\n\t\t\t\tc.end();\n\n\t\t\t\tc.fillAndStroke();\n\t\t\t}\t\t\t\n\t\t}\n\t};\n\t// End of hand jiggle integration\n\t\n\t// Process Shape\n\tfunction ProcessShape()\n\t{\n\t\tmxRectangleShape.call(this);\n\t};\n\n\tmxUtils.extend(ProcessShape, mxRectangleShape);\n\n\tProcessShape.prototype.size = 0.1;\n\n\tProcessShape.prototype.fixedSize = false;\n\t\n\tProcessShape.prototype.isHtmlAllowed = function()\n\t{\n\t\treturn false;\n\t};\n\tProcessShape.prototype.getLabelBounds = function(rect)\n\t{\n\t\tif (mxUtils.getValue(this.state.style, mxConstants.STYLE_HORIZONTAL, true) ==\n\t\t\t(this.direction == null ||\n\t\t\tthis.direction == mxConstants.DIRECTION_EAST ||\n\t\t\tthis.direction == mxConstants.DIRECTION_WEST))\n\t\t{\n\t\t\tvar w = rect.width;\n\t\t\tvar h = rect.height;\n\t\t\tvar r = new mxRectangle(rect.x, rect.y, w, h);\n\t\n\t\t\tvar inset = w * Math.max(0, Math.min(1, parseFloat(mxUtils.getValue(this.style, 'size', this.size))));\n\t\n\t\t\tif (this.isRounded)\n\t\t\t{\n\t\t\t\tvar f = mxUtils.getValue(this.style, mxConstants.STYLE_ARCSIZE,\n\t\t\t\t\tmxConstants.RECTANGLE_ROUNDING_FACTOR * 100) / 100;\n\t\t\t\tinset = Math.max(inset, Math.min(w * f, h * f));\n\t\t\t}\n\t\t\t\n\t\t\tr.x += Math.round(inset);\n\t\t\tr.width -= Math.round(2 * inset);\n\t\t\t\n\t\t\treturn r;\n\t\t}\n\t\t\n\t\treturn rect;\n\t};\n\n\tProcessShape.prototype.paintForeground = function(c, x, y, w, h)\n\t{\n\t\tvar isFixedSize = mxUtils.getValue(this.style, 'fixedSize', this.fixedSize);\n\t\tvar inset = parseFloat(mxUtils.getValue(this.style, 'size', this.size));\n\t\t\n\t\tif (isFixedSize)\n\t\t{\n\t\t\tinset = Math.max(0, Math.min(w, inset));\n\t\t}\n\t\telse\n\t\t{\n\t\t\tinset = w * Math.max(0, Math.min(1, inset));\n\t\t}\n\t\n\t\tif (this.isRounded)\n\t\t{\n\t\t\tvar f = mxUtils.getValue(this.style, mxConstants.STYLE_ARCSIZE,\n\t\t\t\tmxConstants.RECTANGLE_ROUNDING_FACTOR * 100) / 100;\n\t\t\tinset = Math.max(inset, Math.min(w * f, h * f));\n\t\t}\n\t\t\n\t\t// Crisp rendering of inner lines\n\t\tinset = Math.round(inset);\n\t\t\n\t\tc.begin();\n\t\tc.moveTo(x + inset, y);\n\t\tc.lineTo(x + inset, y + h);\n\t\tc.moveTo(x + w - inset, y);\n\t\tc.lineTo(x + w - inset, y + h);\n\t\tc.end();\n\t\tc.stroke();\n\t\tmxRectangleShape.prototype.paintForeground.apply(this, arguments);\n\t};\n\n\tmxCellRenderer.registerShape('process', ProcessShape);\n\t//Register the same shape with another name for backwards compatibility\n\tmxCellRenderer.registerShape('process2', ProcessShape);\n\t\n\t// Transparent Shape\n\tfunction TransparentShape()\n\t{\n\t\tmxRectangleShape.call(this);\n\t};\n\n\tmxUtils.extend(TransparentShape, mxRectangleShape);\n\n\tTransparentShape.prototype.paintBackground = function(c, x, y, w, h)\n\t{\n\t\tc.setFillColor(mxConstants.NONE);\n\t\tc.rect(x, y, w, h);\n\t\tc.fill();\n\t};\n\n\tTransparentShape.prototype.paintForeground = function(c, x, y, w, h) \t{ };\n\n\tmxCellRenderer.registerShape('transparent', TransparentShape);\n\n\t// Callout shape\n\tfunction CalloutShape()\n\t{\n\t\tmxActor.call(this);\n\t};\n\n\tmxUtils.extend(CalloutShape, mxHexagon);\n\n\tCalloutShape.prototype.size = 30;\n\n\tCalloutShape.prototype.position = 0.5;\n\n\tCalloutShape.prototype.position2 = 0.5;\n\n\tCalloutShape.prototype.base = 20;\n\n\tCalloutShape.prototype.getLabelMargins = function()\n\t{\n\t\treturn new mxRectangle(0, 0, 0, parseFloat(mxUtils.getValue(\n\t\t\tthis.style, 'size', this.size)) * this.scale);\n\t};\n\n\tCalloutShape.prototype.isRoundable = function()\n\t{\n\t\treturn true;\n\t};\n\n\tCalloutShape.prototype.redrawPath = function(c, x, y, w, h)\n\t{\n\t\tvar arcSize = mxUtils.getValue(this.style, mxConstants.STYLE_ARCSIZE, mxConstants.LINE_ARCSIZE) / 2;\n\t\tvar s = Math.max(0, Math.min(h, parseFloat(mxUtils.getValue(this.style, 'size', this.size))));\n\t\tvar dx = w * Math.max(0, Math.min(1, parseFloat(mxUtils.getValue(this.style, 'position', this.position))));\n\t\tvar dx2 = w * Math.max(0, Math.min(1, parseFloat(mxUtils.getValue(this.style, 'position2', this.position2))));\n\t\tvar base = Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'base', this.base))));\n\t\t\n\t\tthis.addPoints(c, [new mxPoint(0, 0), new mxPoint(w, 0), new mxPoint(w, h - s),\n\t\t\tnew mxPoint(Math.min(w, dx + base), h - s), new mxPoint(dx2, h),\n\t\t\tnew mxPoint(Math.max(0, dx), h - s), new mxPoint(0, h - s)],\n\t\t\tthis.isRounded, arcSize, true, [4]);\n\t};\n\n\tmxCellRenderer.registerShape('callout', CalloutShape);\n\n\t// Step shape\n\tfunction StepShape()\n\t{\n\t\tmxActor.call(this);\n\t};\n\n\tmxUtils.extend(StepShape, mxActor);\n\n\tStepShape.prototype.size = 0.2;\n\n\tStepShape.prototype.fixedSize = 20;\n\n\tStepShape.prototype.isRoundable = function()\n\t{\n\t\treturn true;\n\t};\n\n\tStepShape.prototype.redrawPath = function(c, x, y, w, h)\n\t{\n\t\tvar fixed = mxUtils.getValue(this.style, 'fixedSize', '0') != '0';\n\t\tvar s = (fixed) ? Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'size', this.fixedSize)))) :\n\t\t\tw * Math.max(0, Math.min(1, parseFloat(mxUtils.getValue(this.style, 'size', this.size))));\n\t\tvar arcSize = mxUtils.getValue(this.style, mxConstants.STYLE_ARCSIZE, mxConstants.LINE_ARCSIZE) / 2;\n\t\tthis.addPoints(c, [new mxPoint(0, 0), new mxPoint(w - s, 0), new mxPoint(w, h / 2), new mxPoint(w - s, h),\n\t\t                   new mxPoint(0, h), new mxPoint(s, h / 2)], this.isRounded, arcSize, true);\n\t\tc.end();\n\t};\n\n\tmxCellRenderer.registerShape('step', StepShape);\n\n\t// Hexagon shape\n\tfunction HexagonShape()\n\t{\n\t\tmxActor.call(this);\n\t};\n\n\tmxUtils.extend(HexagonShape, mxHexagon);\n\n\tHexagonShape.prototype.size = 0.25;\n\n\tHexagonShape.prototype.fixedSize = 20;\n\n\tHexagonShape.prototype.isRoundable = function()\n\t{\n\t\treturn true;\n\t};\n\tHexagonShape.prototype.redrawPath = function(c, x, y, w, h)\n\t{\n\t\tvar fixed = mxUtils.getValue(this.style, 'fixedSize', '0') != '0';\n\t\tvar s = (fixed) ? Math.max(0, Math.min(w * 0.5, parseFloat(mxUtils.getValue(this.style, 'size', this.fixedSize)))) :\n\t\t\tw * Math.max(0, Math.min(1, parseFloat(mxUtils.getValue(this.style, 'size', this.size))));\n\t\tvar arcSize = mxUtils.getValue(this.style, mxConstants.STYLE_ARCSIZE, mxConstants.LINE_ARCSIZE) / 2;\n\t\tthis.addPoints(c, [new mxPoint(s, 0), new mxPoint(w - s, 0), new mxPoint(w, 0.5 * h), new mxPoint(w - s, h),\n\t\t                   new mxPoint(s, h), new mxPoint(0, 0.5 * h)], this.isRounded, arcSize, true);\n\t};\n\n\tmxCellRenderer.registerShape('hexagon', HexagonShape);\n\n\t// Plus Shape\n\tfunction PlusShape()\n\t{\n\t\tmxRectangleShape.call(this);\n\t};\n\n\tmxUtils.extend(PlusShape, mxRectangleShape);\n\n\tPlusShape.prototype.isHtmlAllowed = function()\n\t{\n\t\treturn false;\n\t};\n\n\tPlusShape.prototype.paintForeground = function(c, x, y, w, h)\n\t{\n\t\tvar border = Math.min(w / 5, h / 5) + 1;\n\t\t\n\t\tc.begin();\n\t\tc.moveTo(x + w / 2, y + border);\n\t\tc.lineTo(x + w / 2, y + h - border);\n\t\tc.moveTo(x + border, y + h / 2);\n\t\tc.lineTo(x + w - border, y + h / 2);\n\t\tc.end();\n\t\tc.stroke();\n\t\tmxRectangleShape.prototype.paintForeground.apply(this, arguments);\n\t};\n\n\tmxCellRenderer.registerShape('plus', PlusShape);\n\t\n\t// Overrides painting of rhombus shape to allow for double style\n\tvar mxRhombusPaintVertexShape = mxRhombus.prototype.paintVertexShape;\n\tmxRhombus.prototype.getLabelBounds = function(rect)\n\t{\n\t\tif (this.style['double'] == 1)\n\t\t{\n\t\t\tvar margin = (Math.max(2, this.strokewidth + 1) * 2 + parseFloat(\n\t\t\t\tthis.style[mxConstants.STYLE_MARGIN] || 0)) * this.scale;\n\t\t\n\t\t\treturn new mxRectangle(rect.x + margin, rect.y + margin,\n\t\t\t\trect.width - 2 * margin, rect.height - 2 * margin);\n\t\t}\n\t\t\n\t\treturn rect;\n\t};\n\tmxRhombus.prototype.paintVertexShape = function(c, x, y, w, h)\n\t{\n\t\tmxRhombusPaintVertexShape.apply(this, arguments);\n\n\t\tif (!this.outline && this.style['double'] == 1)\n\t\t{\n\t\t\tvar margin = Math.max(2, this.strokewidth + 1) * 2 +\n\t\t\t\tparseFloat(this.style[mxConstants.STYLE_MARGIN] || 0);\n\t\t\tx += margin;\n\t\t\ty += margin;\n\t\t\tw -= 2 * margin;\n\t\t\th -= 2 * margin;\n\t\t\t\n\t\t\tif (w > 0 && h > 0)\n\t\t\t{\n\t\t\t\tc.setShadow(false);\n\t\t\t\t\n\t\t\t\t// Workaround for closure compiler bug where the lines with x and y above\n\t\t\t\t// are removed if arguments is used as second argument in call below.\n\t\t\t\tmxRhombusPaintVertexShape.apply(this, [c, x, y, w, h]);\n\t\t\t}\n\t\t}\n\t};\n\n\t// CompositeShape\n\tfunction ExtendedShape()\n\t{\n\t\tmxRectangleShape.call(this);\n\t};\n\n\tmxUtils.extend(ExtendedShape, mxRectangleShape);\n\n\tExtendedShape.prototype.isHtmlAllowed = function()\n\t{\n\t\treturn false;\n\t};\n\tExtendedShape.prototype.getLabelBounds = function(rect)\n\t{\n\t\tif (this.style['double'] == 1)\n\t\t{\n\t\t\tvar margin = (Math.max(2, this.strokewidth + 1) + parseFloat(\n\t\t\t\tthis.style[mxConstants.STYLE_MARGIN] || 0)) * this.scale;\n\t\t\n\t\t\treturn new mxRectangle(rect.x + margin, rect.y + margin,\n\t\t\t\trect.width - 2 * margin, rect.height - 2 * margin);\n\t\t}\n\t\t\n\t\treturn rect;\n\t};\n\t\n\tExtendedShape.prototype.paintForeground = function(c, x, y, w, h)\n\t{\n\t\tif (this.style != null)\n\t\t{\n\t\t\tif (!this.outline && this.style['double'] == 1)\n\t\t\t{\n\t\t\t\tvar margin = Math.max(2, this.strokewidth + 1) + parseFloat(this.style[mxConstants.STYLE_MARGIN] || 0);\n\t\t\t\tx += margin;\n\t\t\t\ty += margin;\n\t\t\t\tw -= 2 * margin;\n\t\t\t\th -= 2 * margin;\n\t\t\t\t\n\t\t\t\tif (w > 0 && h > 0)\n\t\t\t\t{\n\t\t\t\t\tmxRectangleShape.prototype.paintBackground.apply(this, arguments);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tc.setDashed(false);\n\t\t\t\n\t\t\t// Draws the symbols defined in the style. The symbols are\n\t\t\t// numbered from 1...n. Possible postfixes are align,\n\t\t\t// verticalAlign, spacing, arcSpacing, width, height\n\t\t\tvar counter = 0;\n\t\t\tvar shape = null;\n\t\t\t\n\t\t\tdo\n\t\t\t{\n\t\t\t\tshape = mxCellRenderer.defaultShapes[this.style['symbol' + counter]];\n\t\t\t\t\n\t\t\t\tif (shape != null)\n\t\t\t\t{\n\t\t\t\t\tvar align = this.style['symbol' + counter + 'Align'];\n\t\t\t\t\tvar valign = this.style['symbol' + counter + 'VerticalAlign'];\n\t\t\t\t\tvar width = this.style['symbol' + counter + 'Width'];\n\t\t\t\t\tvar height = this.style['symbol' + counter + 'Height'];\n\t\t\t\t\tvar spacing = this.style['symbol' + counter + 'Spacing'] || 0;\n\t\t\t\t\tvar vspacing = this.style['symbol' + counter + 'VSpacing'] || spacing;\n\t\t\t\t\tvar arcspacing = this.style['symbol' + counter + 'ArcSpacing'];\n\t\t\t\t\t\n\t\t\t\t\tif (arcspacing != null)\n\t\t\t\t\t{\n\t\t\t\t\t\tvar arcSize = this.getArcSize(w + this.strokewidth, h + this.strokewidth) * arcspacing;\n\t\t\t\t\t\tspacing += arcSize;\n\t\t\t\t\t\tvspacing += arcSize;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tvar x2 = x;\n\t\t\t\t\tvar y2 = y;\n\t\t\t\t\t\n\t\t\t\t\tif (align == mxConstants.ALIGN_CENTER)\n\t\t\t\t\t{\n\t\t\t\t\t\tx2 += (w - width) / 2;\n\t\t\t\t\t}\n\t\t\t\t\telse if (align == mxConstants.ALIGN_RIGHT)\n\t\t\t\t\t{\n\t\t\t\t\t\tx2 += w - width - spacing;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tx2 += spacing;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif (valign == mxConstants.ALIGN_MIDDLE)\n\t\t\t\t\t{\n\t\t\t\t\t\ty2 += (h - height) / 2;\n\t\t\t\t\t}\n\t\t\t\t\telse if (valign == mxConstants.ALIGN_BOTTOM)\n\t\t\t\t\t{\n\t\t\t\t\t\ty2 += h - height - vspacing;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\ty2 += vspacing;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tc.save();\n\t\t\t\t\t\n\t\t\t\t\t// Small hack to pass style along into subshape\n\t\t\t\t\tvar tmp = new shape();\n\t\t\t\t\t// TODO: Clone style and override settings (eg. strokewidth)\n\t\t\t\t\ttmp.style = this.style;\n\t\t\t\t\tshape.prototype.paintVertexShape.call(tmp, c, x2, y2, width, height);\n\t\t\t\t\tc.restore();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tcounter++;\n\t\t\t}\n\t\t\twhile (shape != null);\n\t\t}\n\t\t\n\t\t// Paints glass effect\n\t\tmxRectangleShape.prototype.paintForeground.apply(this, arguments);\n\t};\n\n\tmxCellRenderer.registerShape('ext', ExtendedShape);\n\t\n\t// Tape Shape, supports size style\n\tfunction MessageShape()\n\t{\n\t\tmxCylinder.call(this);\n\t};\n\n\tmxUtils.extend(MessageShape, mxCylinder);\n\n\tMessageShape.prototype.redrawPath = function(path, x, y, w, h, isForeground)\n\t{\n\t\tif (isForeground)\n\t\t{\n\t\t\tpath.moveTo(0, 0);\n\t\t\tpath.lineTo(w / 2, h / 2);\n\t\t\tpath.lineTo(w, 0);\n\t\t\tpath.end();\n\t\t}\n\t\telse\n\t\t{\n\t\t\tpath.moveTo(0, 0);\n\t\t\tpath.lineTo(w, 0);\n\t\t\tpath.lineTo(w, h);\n\t\t\tpath.lineTo(0, h);\n\t\t\tpath.close();\n\t\t}\n\t};\n\n\tmxCellRenderer.registerShape('message', MessageShape);\n\t\n\t// UML Actor Shape\n\tfunction UmlActorShape()\n\t{\n\t\tmxShape.call(this);\n\t};\n\n\tmxUtils.extend(UmlActorShape, mxShape);\n\n\tUmlActorShape.prototype.paintBackground = function(c, x, y, w, h)\n\t{\n\t\tc.translate(x, y);\n\n\t\t// Head\n\t\tc.ellipse(w / 4, 0, w / 2, h / 4);\n\t\tc.fillAndStroke();\n\n\t\tc.begin();\n\t\tc.moveTo(w / 2, h / 4);\n\t\tc.lineTo(w / 2, 2 * h / 3);\n\t\t\n\t\t// Arms\n\t\tc.moveTo(w / 2, h / 3);\n\t\tc.lineTo(0, h / 3);\n\t\tc.moveTo(w / 2, h / 3);\n\t\tc.lineTo(w, h / 3);\n\t\t\n\t\t// Legs\n\t\tc.moveTo(w / 2, 2 * h / 3);\n\t\tc.lineTo(0, h);\n\t\tc.moveTo(w / 2, 2 * h / 3);\n\t\tc.lineTo(w, h);\n\t\tc.end();\n\t\t\n\t\tc.stroke();\n\t};\n\n\t// Replaces existing actor shape\n\tmxCellRenderer.registerShape('umlActor', UmlActorShape);\n\t\n\t////////////// UML Boundary Shape ///////////////\n\tfunction UmlBoundaryShape()\n\t{\n\t\tmxShape.call(this);\n\t};\n\tmxUtils.extend(UmlBoundaryShape, mxShape);\n\n\tUmlBoundaryShape.prototype.getLabelMargins = function(rect)\n\t{\n\t\treturn new mxRectangle(rect.width / 6, 0, 0, 0);\n\t};\n\n\tUmlBoundaryShape.prototype.paintBackground = function(c, x, y, w, h)\n\t{\n\t\tc.translate(x, y);\n\t\t\n\t\t// Base line\n\t\tc.begin();\n\t\tc.moveTo(0, h / 4);\n\t\tc.lineTo(0, h * 3 / 4);\n\t\tc.end();\n\t\tc.stroke();\n\t\t\n\t\t// Horizontal line\n\t\tc.begin();\n\t\tc.moveTo(0, h / 2);\n\t\tc.lineTo(w / 6, h / 2);\n\t\tc.end();\n\t\tc.stroke();\n\t\t\n\t\t// Circle\n\t\tc.ellipse(w / 6, 0, w * 5 / 6, h);\n\t\tc.fillAndStroke();\n\t};\n\n\tmxCellRenderer.registerShape('umlBoundary', UmlBoundaryShape);\n\n\t// UML Entity Shape\n\tfunction UmlEntityShape()\n\t{\n\t\tmxEllipse.call(this);\n\t};\n\n\tmxUtils.extend(UmlEntityShape, mxEllipse);\n\n\tUmlEntityShape.prototype.paintVertexShape = function(c, x, y, w, h)\n\t{\n\t\tmxEllipse.prototype.paintVertexShape.apply(this, arguments);\n\t\t\n\t\tc.begin();\n\t\tc.moveTo(x + w / 8, y + h);\n\t\tc.lineTo(x + w * 7 / 8, y + h);\n\t\tc.end();\n\t\tc.stroke();\n\t};\n\n\tmxCellRenderer.registerShape('umlEntity', UmlEntityShape);\n\n\t// UML Destroy Shape\n\tfunction UmlDestroyShape()\n\t{\n\t\tmxShape.call(this);\n\t};\n\n\tmxUtils.extend(UmlDestroyShape, mxShape);\n\n\tUmlDestroyShape.prototype.paintVertexShape = function(c, x, y, w, h)\n\t{\n\t\tc.translate(x, y);\n\n\t\tc.begin();\n\t\tc.moveTo(w, 0);\n\t\tc.lineTo(0, h);\n\t\tc.moveTo(0, 0);\n\t\tc.lineTo(w, h);\n\t\tc.end();\n\t\tc.stroke();\n\t};\n\n\tmxCellRenderer.registerShape('umlDestroy', UmlDestroyShape);\n\t\n\t// UML Control Shape\n\tfunction UmlControlShape()\n\t{\n\t\tmxShape.call(this);\n\t};\n\n\tmxUtils.extend(UmlControlShape, mxShape);\n\n\tUmlControlShape.prototype.getLabelBounds = function(rect)\n\t{\n\t\treturn new mxRectangle(rect.x, rect.y + rect.height / 8, rect.width, rect.height * 7 / 8);\n\t};\n\n\tUmlControlShape.prototype.paintBackground = function(c, x, y, w, h)\n\t{\n\t\tc.translate(x, y);\n\n\t\t// Upper line\n\t\tc.begin();\n\t\tc.moveTo(w * 3 / 8, h / 8 * 1.1);\n\t\tc.lineTo(w * 5 / 8, 0);\n\t\tc.end();\n\t\tc.stroke();\n\t\t\n\t\t// Circle\n\t\tc.ellipse(0, h / 8, w, h * 7 / 8);\n\t\tc.fillAndStroke();\n\t};\n\tUmlControlShape.prototype.paintForeground = function(c, x, y, w, h)\n\t{\n\t\t// Lower line\n\t\tc.begin();\n\t\tc.moveTo(w * 3 / 8, h / 8 * 1.1);\n\t\tc.lineTo(w * 5 / 8, h / 4);\n\t\tc.end();\n\t\tc.stroke();\n\t};\n\n\t// Replaces existing actor shape\n\tmxCellRenderer.registerShape('umlControl', UmlControlShape);\n\n\t// UML Lifeline Shape\n\tfunction UmlLifeline()\n\t{\n\t\tmxRectangleShape.call(this);\n\t};\n\n\tmxUtils.extend(UmlLifeline, mxRectangleShape);\n\n\tUmlLifeline.prototype.size = 40;\n\n\tUmlLifeline.prototype.isHtmlAllowed = function()\n\t{\n\t\treturn false;\n\t};\n\n\tUmlLifeline.prototype.getLabelBounds = function(rect)\n\t{\n\t\tvar size = Math.max(0, Math.min(rect.height, parseFloat(\n\t\t\tmxUtils.getValue(this.style, 'size', this.size)) * this.scale));\n\t\t\n\t\treturn new mxRectangle(rect.x, rect.y, rect.width, size);\n\t};\n\n\tUmlLifeline.prototype.paintBackground = function(c, x, y, w, h)\n\t{\n\t\tvar size = Math.max(0, Math.min(h, parseFloat(mxUtils.getValue(this.style, 'size', this.size))));\n\t\tvar participant = mxUtils.getValue(this.style, 'participant');\n\t\t\n\t\tif (participant == null || this.state == null)\n\t\t{\n\t\t\tmxRectangleShape.prototype.paintBackground.call(this, c, x, y, w, size);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tvar ctor = this.state.view.graph.cellRenderer.getShape(participant);\n\t\t\t\n\t\t\tif (ctor != null && ctor != UmlLifeline)\n\t\t\t{\n\t\t\t\tvar shape = new ctor();\n\t\t\t\tshape.apply(this.state);\n\t\t\t\tc.save();\n\t\t\t\tshape.paintVertexShape(c, x, y, w, size);\n\t\t\t\tc.restore();\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (size < h)\n\t\t{\n\t\t\tc.setDashed(mxUtils.getValue(this.style, 'lifelineDashed', '1') == '1');\n\t\t\tc.begin();\n\t\t\tc.moveTo(x + w / 2, y + size);\n\t\t\tc.lineTo(x + w / 2, y + h);\n\t\t\tc.end();\n\t\t\tc.stroke();\n\t\t}\n\t};\n\tUmlLifeline.prototype.paintForeground = function(c, x, y, w, h)\n\t{\n\t\tvar size = Math.max(0, Math.min(h, parseFloat(mxUtils.getValue(this.style, 'size', this.size))));\n\t\tmxRectangleShape.prototype.paintForeground.call(this, c, x, y, w, Math.min(h, size));\n\t};\n\n\tmxCellRenderer.registerShape('umlLifeline', UmlLifeline);\n\t\n\t// UML Frame Shape\n\tfunction UmlFrame()\n\t{\n\t\tmxShape.call(this);\n\t};\n\n\tmxUtils.extend(UmlFrame, mxShape);\n\t\n\tUmlFrame.prototype.width = 60;\n\n\tUmlFrame.prototype.height = 30;\n\n\tUmlFrame.prototype.corner = 10;\n\n\tUmlFrame.prototype.configurePointerEvents = function(c)\n\t{\n\t\tvar bg = mxUtils.getValue(this.style, mxConstants.STYLE_SWIMLANE_FILLCOLOR, mxConstants.NONE);\n\n\t\tif (this.style != null && (bg == null ||\n\t\t\tbg == mxConstants.NONE || this.opacity == 0 ||\n\t\t\tthis.fillOpacity == 0) && mxUtils.getValue(this.style,\n\t\t\tmxConstants.STYLE_POINTER_EVENTS, '1') == '0')\n\t\t{\n\t\t\tc.pointerEvents = false;\n\t\t}\n\t};\n\n\tUmlFrame.prototype.getLabelMargins = function(rect)\n\t{\n\t\treturn new mxRectangle(0, 0,\n\t\t\trect.width - (parseFloat(mxUtils.getValue(this.style, 'width', this.width) * this.scale)),\n\t\t\trect.height - (parseFloat(mxUtils.getValue(this.style, 'height', this.height) * this.scale)));\n\t};\n\n\tUmlFrame.prototype.paintBackground = function(c, x, y, w, h)\n\t{\n\t\tvar co = this.corner;\n\t\tvar w0 = Math.min(w, Math.max(co, parseFloat(mxUtils.getValue(this.style, 'width', this.width))));\n\t\tvar h0 = Math.min(h, Math.max(co * 1.5, parseFloat(mxUtils.getValue(this.style, 'height', this.height))));\n\t\tvar bg = mxUtils.getValue(this.style, mxConstants.STYLE_SWIMLANE_FILLCOLOR, mxConstants.NONE);\n\t\t\n\t\tif (bg != mxConstants.NONE)\n\t\t{\n\t\t\tc.setFillColor(bg);\n\t\t\tc.rect(x, y, w, h);\n\t\t\tc.fill();\n\t\t}\n\t\t\n\t\tif (this.fill != null && this.fill != mxConstants.NONE && this.gradient && this.gradient != mxConstants.NONE)\n\t\t{\n\t\t\tvar b = this.getGradientBounds(c, x, y, w, h);\n\t\t\tc.setGradient(this.fill, this.gradient, x, y, w, h, this.gradientDirection);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tc.setFillColor(this.fill);\n\t\t}\n\n\t\t// Label part handles events\n\t\tc.pointerEvents = true;\n\n\t\tc.begin();\n\t\tc.moveTo(x, y);\n\t\tc.lineTo(x + w0, y);\n\t\tc.lineTo(x + w0, y + Math.max(0, h0 - co * 1.5));\n\t\tc.lineTo(x + Math.max(0, w0 - co), y + h0);\n\t\tc.lineTo(x, y + h0);\n\t\tc.close();\n\t\tc.fillAndStroke();\n\n\t\tthis.configurePointerEvents(c);\n\t\t\n\t\tc.begin();\n\t\tc.moveTo(x + w0, y);\n\t\tc.lineTo(x + w, y);\n\t\tc.lineTo(x + w, y + h);\n\t\tc.lineTo(x, y + h);\n\t\tc.lineTo(x, y + h0);\n\t\tc.stroke();\n\t};\n\n\tmxCellRenderer.registerShape('umlFrame', UmlFrame);\n\t\t\n\tmxPerimeter.CenterPerimeter = function (bounds, vertex, next, orthogonal)\n\t{\n\t\treturn new mxPoint(bounds.getCenterX(), bounds.getCenterY());\n\t};\n\t\n\tmxStyleRegistry.putValue('centerPerimeter', mxPerimeter.CenterPerimeter);\n\t\n\tmxPerimeter.LifelinePerimeter = function (bounds, vertex, next, orthogonal)\n\t{\n\t\tvar size = UmlLifeline.prototype.size;\n\t\t\n\t\tif (vertex != null)\n\t\t{\n\t\t\tsize = mxUtils.getValue(vertex.style, 'size', size) * vertex.view.scale;\n\t\t}\n\t\t\n\t\tvar sw = (parseFloat(vertex.style[mxConstants.STYLE_STROKEWIDTH] || 1) * vertex.view.scale / 2) - 1;\n\n\t\tif (next.x < bounds.getCenterX())\n\t\t{\n\t\t\tsw += 1;\n\t\t\tsw *= -1;\n\t\t}\n\t\t\n\t\treturn new mxPoint(bounds.getCenterX() + sw, Math.min(bounds.y + bounds.height,\n\t\t\t\tMath.max(bounds.y + size, next.y)));\n\t};\n\t\n\tmxStyleRegistry.putValue('lifelinePerimeter', mxPerimeter.LifelinePerimeter);\n\t\n\tmxPerimeter.OrthogonalPerimeter = function (bounds, vertex, next, orthogonal)\n\t{\n\t\torthogonal = true;\n\t\t\n\t\treturn mxPerimeter.RectanglePerimeter.apply(this, arguments);\n\t};\n\t\n\tmxStyleRegistry.putValue('orthogonalPerimeter', mxPerimeter.OrthogonalPerimeter);\n\n\tmxPerimeter.BackbonePerimeter = function (bounds, vertex, next, orthogonal)\n\t{\n\t\tvar sw = (parseFloat(vertex.style[mxConstants.STYLE_STROKEWIDTH] || 1) * vertex.view.scale / 2) - 1;\n\t\t\n\t\tif (vertex.style['backboneSize'] != null)\n\t\t{\n\t\t\tsw += (parseFloat(vertex.style['backboneSize']) * vertex.view.scale / 2) - 1;\n\t\t}\n\t\t\n\t\tif (vertex.style[mxConstants.STYLE_DIRECTION] == 'south' ||\n\t\t\tvertex.style[mxConstants.STYLE_DIRECTION] == 'north')\n\t\t{\n\t\t\tif (next.x < bounds.getCenterX())\n\t\t\t{\n\t\t\t\tsw += 1;\n\t\t\t\tsw *= -1;\n\t\t\t}\n\t\t\t\n\t\t\treturn new mxPoint(bounds.getCenterX() + sw, Math.min(bounds.y + bounds.height,\n\t\t\t\t\tMath.max(bounds.y, next.y)));\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif (next.y < bounds.getCenterY())\n\t\t\t{\n\t\t\t\tsw += 1;\n\t\t\t\tsw *= -1;\n\t\t\t}\n\t\t\t\n\t\t\treturn new mxPoint(Math.min(bounds.x + bounds.width, Math.max(bounds.x, next.x)),\n\t\t\t\tbounds.getCenterY() + sw);\n\t\t}\n\t};\n\t\n\tmxStyleRegistry.putValue('backbonePerimeter', mxPerimeter.BackbonePerimeter);\n\n\t// Callout Perimeter\n\tmxPerimeter.CalloutPerimeter = function (bounds, vertex, next, orthogonal)\n\t{\n\t\treturn mxPerimeter.RectanglePerimeter(mxUtils.getDirectedBounds(bounds, new mxRectangle(0, 0, 0,\n\t\t\tMath.max(0, Math.min(bounds.height, parseFloat(mxUtils.getValue(vertex.style, 'size',\n\t\t\tCalloutShape.prototype.size)) * vertex.view.scale))),\n\t\t\tvertex.style), vertex, next, orthogonal);\n\t};\n\t\n\tmxStyleRegistry.putValue('calloutPerimeter', mxPerimeter.CalloutPerimeter);\n\t\n\t// Parallelogram Perimeter\n\tmxPerimeter.ParallelogramPerimeter = function (bounds, vertex, next, orthogonal)\n\t{\n\t\tvar fixed = mxUtils.getValue(vertex.style, 'fixedSize', '0') != '0';\n\t\tvar size = (fixed) ? ParallelogramShape.prototype.fixedSize : ParallelogramShape.prototype.size;\n\t\t\n\t\tif (vertex != null)\n\t\t{\n\t\t\tsize = mxUtils.getValue(vertex.style, 'size', size);\n\t\t}\n\t\t\n\t\tif (fixed)\n\t\t{\n\t\t\tsize *= vertex.view.scale;\n\t\t}\n\t\t\n\t\tvar x = bounds.x;\n\t\tvar y = bounds.y;\n\t\tvar w = bounds.width;\n\t\tvar h = bounds.height;\n\n\t\tvar direction = (vertex != null) ? mxUtils.getValue(\n\t\t\tvertex.style, mxConstants.STYLE_DIRECTION,\n\t\t\tmxConstants.DIRECTION_EAST) : mxConstants.DIRECTION_EAST;\n\t\tvar vertical = direction == mxConstants.DIRECTION_NORTH ||\n\t\t\tdirection == mxConstants.DIRECTION_SOUTH;\n\t\tvar points;\n\t\t\n\t\tif (vertical)\n\t\t{\n\t\t\tvar dy = (fixed) ? Math.max(0, Math.min(h, size)) : h * Math.max(0, Math.min(1, size));\n\t\t\tpoints = [new mxPoint(x, y), new mxPoint(x + w, y + dy),\n\t\t\t\t\t\tnew mxPoint(x + w, y + h), new mxPoint(x, y + h - dy), new mxPoint(x, y)];\n\t\t}\n\t\telse\n\t\t{\n\t\t\tvar dx = (fixed) ? Math.max(0, Math.min(w * 0.5, size)) : w * Math.max(0, Math.min(1, size));\n\t\t\tpoints = [new mxPoint(x + dx, y), new mxPoint(x + w, y),\n\t\t\t\t\t\t\tnew mxPoint(x + w - dx, y + h), new mxPoint(x, y + h), new mxPoint(x + dx, y)];\n\t\t}\t\n\t\t\n\t\tvar cx = bounds.getCenterX();\n\t\tvar cy = bounds.getCenterY();\n\t\t\n\t\tvar p1 = new mxPoint(cx, cy);\n\t\t\n\t\tif (orthogonal)\n\t\t{\n\t\t\tif (next.x < x || next.x > x + w)\n\t\t\t{\n\t\t\t\tp1.y = next.y;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tp1.x = next.x;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn mxUtils.getPerimeterPoint(points, p1, next);\n\t};\n\t\n\tmxStyleRegistry.putValue('parallelogramPerimeter', mxPerimeter.ParallelogramPerimeter);\n\t\n\t// Trapezoid Perimeter\n\tmxPerimeter.TrapezoidPerimeter = function (bounds, vertex, next, orthogonal)\n\t{\n\t\tvar fixed = mxUtils.getValue(vertex.style, 'fixedSize', '0') != '0';\n\t\tvar size = (fixed) ? TrapezoidShape.prototype.fixedSize : TrapezoidShape.prototype.size;\n\t\t\n\t\tif (vertex != null)\n\t\t{\n\t\t\tsize = mxUtils.getValue(vertex.style, 'size', size);\n\t\t}\n\t\t\n\t\tif (fixed)\n\t\t{\n\t\t\tsize *= vertex.view.scale;\n\t\t}\n\t\t\n\t\tvar x = bounds.x;\n\t\tvar y = bounds.y;\n\t\tvar w = bounds.width;\n\t\tvar h = bounds.height;\n\n\t\tvar direction = (vertex != null) ? mxUtils.getValue(\n\t\t\t\tvertex.style, mxConstants.STYLE_DIRECTION,\n\t\t\t\tmxConstants.DIRECTION_EAST) : mxConstants.DIRECTION_EAST;\n\t\tvar points = [];\n\t\t\n\t\tif (direction == mxConstants.DIRECTION_EAST)\n\t\t{\n\t\t\tvar dx = (fixed) ? Math.max(0, Math.min(w * 0.5, size)) : w * Math.max(0, Math.min(1, size));\n\t\t\tpoints = [new mxPoint(x + dx, y), new mxPoint(x + w - dx, y),\n\t\t\t\t\t\tnew mxPoint(x + w, y + h), new mxPoint(x, y + h), new mxPoint(x + dx, y)];\n\t\t}\n\t\telse if (direction == mxConstants.DIRECTION_WEST)\n\t\t{\n\t\t\tvar dx = (fixed) ? Math.max(0, Math.min(w, size)) : w * Math.max(0, Math.min(1, size));\n\t\t\tpoints = [new mxPoint(x, y), new mxPoint(x + w, y),\n\t\t\t\t\t\tnew mxPoint(x + w - dx, y + h), new mxPoint(x + dx, y + h), new mxPoint(x, y)];\n\t\t}\n\t\telse if (direction == mxConstants.DIRECTION_NORTH)\n\t\t{\n\t\t\tvar dy = (fixed) ? Math.max(0, Math.min(h, size)) : h * Math.max(0, Math.min(1, size));\n\t\t\tpoints = [new mxPoint(x, y + dy), new mxPoint(x + w, y),\n\t\t\t\t\t\tnew mxPoint(x + w, y + h), new mxPoint(x, y + h - dy), new mxPoint(x, y + dy)];\n\t\t}\n\t\telse\n\t\t{\n\t\t\tvar dy = (fixed) ? Math.max(0, Math.min(h, size)) : h * Math.max(0, Math.min(1, size));\n\t\t\tpoints = [new mxPoint(x, y), new mxPoint(x + w, y + dy),\n\t\t\t\t\t\tnew mxPoint(x + w, y + h - dy), new mxPoint(x, y + h), new mxPoint(x, y)];\n\t\t}\t\t\n\n\t\tvar cx = bounds.getCenterX();\n\t\tvar cy = bounds.getCenterY();\n\t\t\n\t\tvar p1 = new mxPoint(cx, cy);\n\t\t\n\t\tif (orthogonal)\n\t\t{\n\t\t\tif (next.x < x || next.x > x + w)\n\t\t\t{\n\t\t\t\tp1.y = next.y;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tp1.x = next.x;\n\t\t\t}\n\t\t}\n\n\t\treturn mxUtils.getPerimeterPoint(points, p1, next);\n\t};\n\t\n\tmxStyleRegistry.putValue('trapezoidPerimeter', mxPerimeter.TrapezoidPerimeter);\n\t\n\t// Step Perimeter\n\tmxPerimeter.StepPerimeter = function (bounds, vertex, next, orthogonal)\n\t{\n\t\tvar fixed = mxUtils.getValue(vertex.style, 'fixedSize', '0') != '0';\n\t\tvar size = (fixed) ? StepShape.prototype.fixedSize : StepShape.prototype.size;\n\t\t\n\t\tif (vertex != null)\n\t\t{\n\t\t\tsize = mxUtils.getValue(vertex.style, 'size', size);\n\t\t}\n\t\t\n\t\tif (fixed)\n\t\t{\n\t\t\tsize *= vertex.view.scale;\n\t\t}\n\t\t\n\t\tvar x = bounds.x;\n\t\tvar y = bounds.y;\n\t\tvar w = bounds.width;\n\t\tvar h = bounds.height;\n\n\t\tvar cx = bounds.getCenterX();\n\t\tvar cy = bounds.getCenterY();\n\t\t\n\t\tvar direction = (vertex != null) ? mxUtils.getValue(\n\t\t\t\tvertex.style, mxConstants.STYLE_DIRECTION,\n\t\t\t\tmxConstants.DIRECTION_EAST) : mxConstants.DIRECTION_EAST;\n\t\tvar points;\n\t\t\n\t\tif (direction == mxConstants.DIRECTION_EAST)\n\t\t{\n\t\t\tvar dx = (fixed) ? Math.max(0, Math.min(w, size)) : w * Math.max(0, Math.min(1, size));\n\t\t\tpoints = [new mxPoint(x, y), new mxPoint(x + w - dx, y), new mxPoint(x + w, cy),\n\t\t\t\t\t\t\tnew mxPoint(x + w - dx, y + h), new mxPoint(x, y + h),\n\t\t\t\t\t\t\tnew mxPoint(x + dx, cy), new mxPoint(x, y)];\n\t\t}\n\t\telse if (direction == mxConstants.DIRECTION_WEST)\n\t\t{\n\t\t\tvar dx = (fixed) ? Math.max(0, Math.min(w, size)) : w * Math.max(0, Math.min(1, size));\n\t\t\tpoints = [new mxPoint(x + dx, y), new mxPoint(x + w, y), new mxPoint(x + w - dx, cy),\n\t\t\t\t\t\t\tnew mxPoint(x + w, y + h), new mxPoint(x + dx, y + h),\n\t\t\t\t\t\t\tnew mxPoint(x, cy), new mxPoint(x + dx, y)];\n\t\t}\n\t\telse if (direction == mxConstants.DIRECTION_NORTH)\n\t\t{\n\t\t\tvar dy = (fixed) ? Math.max(0, Math.min(h, size)) : h * Math.max(0, Math.min(1, size));\n\t\t\tpoints = [new mxPoint(x, y + dy), new mxPoint(cx, y), new mxPoint(x + w, y + dy),\n\t\t\t\t\t\t\tnew mxPoint(x + w, y + h), new mxPoint(cx, y + h - dy),\n\t\t\t\t\t\t\tnew mxPoint(x, y + h), new mxPoint(x, y + dy)];\n\t\t}\n\t\telse\n\t\t{\n\t\t\tvar dy = (fixed) ? Math.max(0, Math.min(h, size)) : h * Math.max(0, Math.min(1, size));\n\t\t\tpoints = [new mxPoint(x, y), new mxPoint(cx, y + dy), new mxPoint(x + w, y),\n\t\t\t\t\t\t\tnew mxPoint(x + w, y + h - dy), new mxPoint(cx, y + h),\n\t\t\t\t\t\t\tnew mxPoint(x, y + h - dy), new mxPoint(x, y)];\n\t\t}\t\t\n\t\t\n\t\tvar p1 = new mxPoint(cx, cy);\n\t\t\n\t\tif (orthogonal)\n\t\t{\n\t\t\tif (next.x < x || next.x > x + w)\n\t\t\t{\n\t\t\t\tp1.y = next.y;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tp1.x = next.x;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn mxUtils.getPerimeterPoint(points, p1, next);\n\t};\n\t\n\tmxStyleRegistry.putValue('stepPerimeter', mxPerimeter.StepPerimeter);\n\t\n\t// Hexagon Perimeter 2 (keep existing one)\n\tmxPerimeter.HexagonPerimeter2 = function (bounds, vertex, next, orthogonal)\n\t{\n\t\tvar fixed = mxUtils.getValue(vertex.style, 'fixedSize', '0') != '0';\n\t\tvar size = (fixed) ? HexagonShape.prototype.fixedSize : HexagonShape.prototype.size;\n\t\t\n\t\tif (vertex != null)\n\t\t{\n\t\t\tsize = mxUtils.getValue(vertex.style, 'size', size);\n\t\t}\n\t\t\n\t\tif (fixed)\n\t\t{\n\t\t\tsize *= vertex.view.scale;\n\t\t}\n\t\t\n\t\tvar x = bounds.x;\n\t\tvar y = bounds.y;\n\t\tvar w = bounds.width;\n\t\tvar h = bounds.height;\n\n\t\tvar cx = bounds.getCenterX();\n\t\tvar cy = bounds.getCenterY();\n\t\t\n\t\tvar direction = (vertex != null) ? mxUtils.getValue(\n\t\t\tvertex.style, mxConstants.STYLE_DIRECTION,\n\t\t\tmxConstants.DIRECTION_EAST) : mxConstants.DIRECTION_EAST;\n\t\tvar vertical = direction == mxConstants.DIRECTION_NORTH ||\n\t\t\tdirection == mxConstants.DIRECTION_SOUTH;\n\t\tvar points;\n\t\t\n\t\tif (vertical)\n\t\t{\n\t\t\tvar dy = (fixed) ? Math.max(0, Math.min(h, size)) : h * Math.max(0, Math.min(1, size));\n\t\t\tpoints = [new mxPoint(cx, y), new mxPoint(x + w, y + dy), new mxPoint(x + w, y + h - dy),\n\t\t\t\t\t\t\tnew mxPoint(cx, y + h), new mxPoint(x, y + h - dy),\n\t\t\t\t\t\t\tnew mxPoint(x, y + dy), new mxPoint(cx, y)];\n\t\t}\n\t\telse\n\t\t{\n\t\t\tvar dx = (fixed) ? Math.max(0, Math.min(w, size)) : w * Math.max(0, Math.min(1, size));\n\t\t\tpoints = [new mxPoint(x + dx, y), new mxPoint(x + w - dx, y), new mxPoint(x + w, cy),\n\t\t\t\t\t\tnew mxPoint(x + w - dx, y + h), new mxPoint(x + dx, y + h),\n\t\t\t\t\t\tnew mxPoint(x, cy), new mxPoint(x + dx, y)];\n\t\t}\t\t\n\n\t\tvar p1 = new mxPoint(cx, cy);\n\t\t\n\t\tif (orthogonal)\n\t\t{\n\t\t\tif (next.x < x || next.x > x + w)\n\t\t\t{\n\t\t\t\tp1.y = next.y;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tp1.x = next.x;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn mxUtils.getPerimeterPoint(points, p1, next);\n\t};\n\t\n\tmxStyleRegistry.putValue('hexagonPerimeter2', mxPerimeter.HexagonPerimeter2);\n\t\n\t// Provided Interface Shape (aka Lollipop)\n\tfunction LollipopShape()\n\t{\n\t\tmxShape.call(this);\n\t};\n\n\tmxUtils.extend(LollipopShape, mxShape);\n\n\tLollipopShape.prototype.size = 10;\n\n\tLollipopShape.prototype.paintBackground = function(c, x, y, w, h)\n\t{\n\t\tvar sz = parseFloat(mxUtils.getValue(this.style, 'size', this.size));\n\t\tc.translate(x, y);\n\t\t\n\t\tc.ellipse((w - sz) / 2, 0, sz, sz);\n\t\tc.fillAndStroke();\n\n\t\tc.begin();\n\t\tc.moveTo(w / 2, sz);\n\t\tc.lineTo(w / 2, h);\n\t\tc.end();\n\t\tc.stroke();\n\t};\n\n\tmxCellRenderer.registerShape('lollipop', LollipopShape);\n\n\t// Required Interface Shape\n\tfunction RequiresShape()\n\t{\n\t\tmxShape.call(this);\n\t};\n\n\tmxUtils.extend(RequiresShape, mxShape);\n\n\tRequiresShape.prototype.size = 10;\n\n\tRequiresShape.prototype.inset = 2;\n\n\tRequiresShape.prototype.paintBackground = function(c, x, y, w, h)\n\t{\n\t\tvar sz = parseFloat(mxUtils.getValue(this.style, 'size', this.size));\n\t\tvar inset = parseFloat(mxUtils.getValue(this.style, 'inset', this.inset)) + this.strokewidth;\n\t\tc.translate(x, y);\n\n\t\tc.begin();\n\t\tc.moveTo(w / 2, sz + inset);\n\t\tc.lineTo(w / 2, h);\n\t\tc.end();\n\t\tc.stroke();\n\t\t\n\t\tc.begin();\n\t\tc.moveTo((w - sz) / 2 - inset, sz / 2);\n\t\tc.quadTo((w - sz) / 2 - inset, sz + inset, w / 2, sz + inset);\n\t\tc.quadTo((w + sz) / 2 + inset, sz + inset, (w + sz) / 2 + inset, sz / 2);\n\t\tc.end();\n\t\tc.stroke();\n\t};\n\n\tmxCellRenderer.registerShape('requires', RequiresShape);\n\n\t// Required Interface Shape\n\tfunction RequiredInterfaceShape()\n\t{\n\t\tmxShape.call(this);\n\t};\n\n\tmxUtils.extend(RequiredInterfaceShape, mxShape);\n\t\n\tRequiredInterfaceShape.prototype.paintBackground = function(c, x, y, w, h)\n\t{\n\t\tc.translate(x, y);\n\n\t\tc.begin();\n\t\tc.moveTo(0, 0);\n\t\tc.quadTo(w, 0, w, h / 2);\n\t\tc.quadTo(w, h, 0, h);\n\t\tc.end();\n\t\tc.stroke();\n\t};\n\n\tmxCellRenderer.registerShape('requiredInterface', RequiredInterfaceShape);\n\n\t// Provided and Required Interface Shape\n\tfunction ProvidedRequiredInterfaceShape()\n\t{\n\t\tmxShape.call(this);\n\t};\n\n\tmxUtils.extend(ProvidedRequiredInterfaceShape, mxShape);\n\n\tProvidedRequiredInterfaceShape.prototype.inset = 2;\n\n\tProvidedRequiredInterfaceShape.prototype.paintBackground = function(c, x, y, w, h)\n\t{\n\t\tvar inset = parseFloat(mxUtils.getValue(this.style, 'inset', this.inset)) + this.strokewidth;\n\t\tc.translate(x, y);\n\n\t\tc.ellipse(0, inset, w - 2 * inset, h - 2 * inset);\n\t\tc.fillAndStroke();\n\t\t\n\t\tc.begin();\n\t\tc.moveTo(w / 2, 0);\n\t\tc.quadTo(w, 0, w, h / 2);\n\t\tc.quadTo(w, h, w / 2, h);\n\t\tc.end();\n\t\tc.stroke();\n\t};\n\n\tmxCellRenderer.registerShape('providedRequiredInterface', ProvidedRequiredInterfaceShape);\n\t\t\n\t// Module shape\n\tfunction ModuleShape()\n\t{\n\t\tmxCylinder.call(this);\n\t};\n\n\tmxUtils.extend(ModuleShape, mxCylinder);\n\n\tModuleShape.prototype.jettyWidth = 20;\n\n\tModuleShape.prototype.jettyHeight = 10;\n\n\tModuleShape.prototype.redrawPath = function(path, x, y, w, h, isForeground)\n\t{\n\t\tvar dx = parseFloat(mxUtils.getValue(this.style, 'jettyWidth', this.jettyWidth));\n\t\tvar dy = parseFloat(mxUtils.getValue(this.style, 'jettyHeight', this.jettyHeight));\n\t\tvar x0 = dx / 2;\n\t\tvar x1 = x0 + dx / 2;\n\t\tvar y0 = Math.min(dy, h - dy);\n\t\tvar y1 = Math.min(y0 + 2 * dy, h - dy);\n\n\t\tif (isForeground)\n\t\t{\n\t\t\tpath.moveTo(x0, y0);\n\t\t\tpath.lineTo(x1, y0);\n\t\t\tpath.lineTo(x1, y0 + dy);\n\t\t\tpath.lineTo(x0, y0 + dy);\n\t\t\tpath.moveTo(x0, y1);\n\t\t\tpath.lineTo(x1, y1);\n\t\t\tpath.lineTo(x1, y1 + dy);\n\t\t\tpath.lineTo(x0, y1 + dy);\n\t\t\tpath.end();\n\t\t}\n\t\telse\n\t\t{\n\t\t\tpath.moveTo(x0, 0);\n\t\t\tpath.lineTo(w, 0);\n\t\t\tpath.lineTo(w, h);\n\t\t\tpath.lineTo(x0, h);\n\t\t\tpath.lineTo(x0, y1 + dy);\n\t\t\tpath.lineTo(0, y1 + dy);\n\t\t\tpath.lineTo(0, y1);\n\t\t\tpath.lineTo(x0, y1);\n\t\t\tpath.lineTo(x0, y0 + dy);\n\t\t\tpath.lineTo(0, y0 + dy);\n\t\t\tpath.lineTo(0, y0);\n\t\t\tpath.lineTo(x0, y0);\n\t\t\tpath.close();\n\t\t\tpath.end();\n\t\t}\n\t};\n\n\tmxCellRenderer.registerShape('module', ModuleShape);\n\t\n\t// Component shape\n\tfunction ComponentShape()\n\t{\n\t\tmxCylinder.call(this);\n\t};\n\n\tmxUtils.extend(ComponentShape, mxCylinder);\n\n\tComponentShape.prototype.jettyWidth = 32;\n\n\tComponentShape.prototype.jettyHeight = 12;\n\n\tComponentShape.prototype.redrawPath = function(path, x, y, w, h, isForeground)\n\t{\n\t\tvar dx = parseFloat(mxUtils.getValue(this.style, 'jettyWidth', this.jettyWidth));\n\t\tvar dy = parseFloat(mxUtils.getValue(this.style, 'jettyHeight', this.jettyHeight));\n\t\tvar x0 = dx / 2;\n\t\tvar x1 = x0 + dx / 2;\n\t\tvar y0 = 0.3 * h - dy / 2;\n\t\tvar y1 = 0.7 * h - dy / 2;\n\n\t\tif (isForeground)\n\t\t{\n\t\t\tpath.moveTo(x0, y0);\n\t\t\tpath.lineTo(x1, y0);\n\t\t\tpath.lineTo(x1, y0 + dy);\n\t\t\tpath.lineTo(x0, y0 + dy);\n\t\t\tpath.moveTo(x0, y1);\n\t\t\tpath.lineTo(x1, y1);\n\t\t\tpath.lineTo(x1, y1 + dy);\n\t\t\tpath.lineTo(x0, y1 + dy);\n\t\t\tpath.end();\n\t\t}\n\t\telse\n\t\t{\n\t\t\tpath.moveTo(x0, 0);\n\t\t\tpath.lineTo(w, 0);\n\t\t\tpath.lineTo(w, h);\n\t\t\tpath.lineTo(x0, h);\n\t\t\tpath.lineTo(x0, y1 + dy);\n\t\t\tpath.lineTo(0, y1 + dy);\n\t\t\tpath.lineTo(0, y1);\n\t\t\tpath.lineTo(x0, y1);\n\t\t\tpath.lineTo(x0, y0 + dy);\n\t\t\tpath.lineTo(0, y0 + dy);\n\t\t\tpath.lineTo(0, y0);\n\t\t\tpath.lineTo(x0, y0);\n\t\t\tpath.close();\n\t\t\tpath.end();\n\t\t}\n\t};\n\n\tmxCellRenderer.registerShape('component', ComponentShape);\n\t\n\t// Associative entity derived from rectangle shape\n\tfunction AssociativeEntity()\n\t{\n\t\tmxRectangleShape.call(this);\n\t};\n\n\tmxUtils.extend(AssociativeEntity, mxRectangleShape);\n\n\tAssociativeEntity.prototype.paintForeground = function(c, x, y, w, h)\n\t{\n\t\tvar hw = w / 2;\n\t\tvar hh = h / 2;\n\t\t\n\t\tvar arcSize = mxUtils.getValue(this.style, mxConstants.STYLE_ARCSIZE, mxConstants.LINE_ARCSIZE) / 2;\n\t\tc.begin();\n\t\tthis.addPoints(c, [new mxPoint(x + hw, y), new mxPoint(x + w, y + hh), new mxPoint(x + hw, y + h),\n\t\t     new mxPoint(x, y + hh)], this.isRounded, arcSize, true);\n\t\tc.stroke();\n\n\t\tmxRectangleShape.prototype.paintForeground.apply(this, arguments);\n\t};\n\n\tmxCellRenderer.registerShape('associativeEntity', AssociativeEntity);\n\n\t// State Shapes derives from double ellipse\n\tfunction StateShape()\n\t{\n\t\tmxDoubleEllipse.call(this);\n\t};\n\n\tmxUtils.extend(StateShape, mxDoubleEllipse);\n\n\tStateShape.prototype.outerStroke = true;\n\n\tStateShape.prototype.paintVertexShape = function(c, x, y, w, h)\n\t{\n\t\tvar inset = Math.min(4, Math.min(w / 5, h / 5));\n\t\t\n\t\tif (w > 0 && h > 0)\n\t\t{\n\t\t\tc.ellipse(x + inset, y + inset, w - 2 * inset, h - 2 * inset);\n\t\t\tc.fillAndStroke();\n\t\t}\n\t\t\n\t\tc.setShadow(false);\n\n\t\tif (this.outerStroke)\n\t\t{\n\t\t\tc.ellipse(x, y, w, h);\n\t\t\tc.stroke();\t\t\t\n\t\t}\n\t};\n\n\tmxCellRenderer.registerShape('endState', StateShape);\n\n\tfunction StartStateShape()\n\t{\n\t\tStateShape.call(this);\n\t};\n\n\tmxUtils.extend(StartStateShape, StateShape);\n\n\tStartStateShape.prototype.outerStroke = false;\n\t\n\tmxCellRenderer.registerShape('startState', StartStateShape);\n\n\t// Link shape\n\tfunction LinkShape()\n\t{\n\t\tmxArrowConnector.call(this);\n\t\tthis.spacing = 0;\n\t};\n\n\tmxUtils.extend(LinkShape, mxArrowConnector);\n\n\tLinkShape.prototype.defaultWidth = 4;\n\t\n\tLinkShape.prototype.isOpenEnded = function()\n\t{\n\t\treturn true;\n\t};\n\n\tLinkShape.prototype.getEdgeWidth = function()\n\t{\n\t\treturn mxUtils.getNumber(this.style, 'width', this.defaultWidth) + Math.max(0, this.strokewidth - 1);\n\t};\n\t\n\tLinkShape.prototype.isArrowRounded = function()\n\t{\n\t\treturn this.isRounded;\n\t};\n\n\t// Registers the link shape\n\tmxCellRenderer.registerShape('link', LinkShape);\n\t\n\t// Generic arrow\n\tfunction FlexArrowShape()\n\t{\n\t\tmxArrowConnector.call(this);\n\t\tthis.spacing = 0;\n\t};\n\n\tmxUtils.extend(FlexArrowShape, mxArrowConnector);\n\n\tFlexArrowShape.prototype.defaultWidth = 10;\n\n\tFlexArrowShape.prototype.defaultArrowWidth = 20;\n\n\tFlexArrowShape.prototype.getStartArrowWidth = function()\n\t{\n\t\treturn this.getEdgeWidth() + mxUtils.getNumber(this.style, 'startWidth', this.defaultArrowWidth);\n\t};\n\n\tFlexArrowShape.prototype.getEndArrowWidth = function()\n\t{\n\t\treturn this.getEdgeWidth() + mxUtils.getNumber(this.style, 'endWidth', this.defaultArrowWidth);;\n\t};\n\n\tFlexArrowShape.prototype.getEdgeWidth = function()\n\t{\n\t\treturn mxUtils.getNumber(this.style, 'width', this.defaultWidth) + Math.max(0, this.strokewidth - 1);\n\t};\n\t\n\t// Registers the link shape\n\tmxCellRenderer.registerShape('flexArrow', FlexArrowShape);\n\t\n\t// Manual Input shape\n\tfunction ManualInputShape()\n\t{\n\t\tmxActor.call(this);\n\t};\n\n\tmxUtils.extend(ManualInputShape, mxActor);\n\n\tManualInputShape.prototype.size = 30;\n\n\tManualInputShape.prototype.isRoundable = function()\n\t{\n\t\treturn true;\n\t};\n\tManualInputShape.prototype.redrawPath = function(c, x, y, w, h)\n\t{\n\t\tvar s = Math.min(h, parseFloat(mxUtils.getValue(this.style, 'size', this.size)));\n\t\tvar arcSize = mxUtils.getValue(this.style, mxConstants.STYLE_ARCSIZE, mxConstants.LINE_ARCSIZE) / 2;\n\t\tthis.addPoints(c, [new mxPoint(0, h), new mxPoint(0, s), new mxPoint(w, 0), new mxPoint(w, h)],\n\t\t\t\tthis.isRounded, arcSize, true);\n\t\tc.end();\n\t};\n\n\tmxCellRenderer.registerShape('manualInput', ManualInputShape);\n\n\t// Internal storage\n\tfunction InternalStorageShape()\n\t{\n\t\tmxRectangleShape.call(this);\n\t};\n\n\tmxUtils.extend(InternalStorageShape, mxRectangleShape);\n\n\tInternalStorageShape.prototype.dx = 20;\n\n\tInternalStorageShape.prototype.dy = 20;\n\n\tInternalStorageShape.prototype.isHtmlAllowed = function()\n\t{\n\t\treturn false;\n\t};\n\n\tInternalStorageShape.prototype.paintForeground = function(c, x, y, w, h)\n\t{\n\t\tmxRectangleShape.prototype.paintForeground.apply(this, arguments);\n\t\tvar inset = 0;\n\t\t\n\t\tif (this.isRounded)\n\t\t{\n\t\t\tvar f = mxUtils.getValue(this.style, mxConstants.STYLE_ARCSIZE,\n\t\t\t\tmxConstants.RECTANGLE_ROUNDING_FACTOR * 100) / 100;\n\t\t\tinset = Math.max(inset, Math.min(w * f, h * f));\n\t\t}\n\t\t\n\t\tvar dx = Math.max(inset, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'dx', this.dx))));\n\t\tvar dy = Math.max(inset, Math.min(h, parseFloat(mxUtils.getValue(this.style, 'dy', this.dy))));\n\t\t\n\t\tc.begin();\n\t\tc.moveTo(x, y + dy);\n\t\tc.lineTo(x + w, y + dy);\n\t\tc.end();\n\t\tc.stroke();\n\t\t\n\t\tc.begin();\n\t\tc.moveTo(x + dx, y);\n\t\tc.lineTo(x + dx, y + h);\n\t\tc.end();\n\t\tc.stroke();\n\t};\n\n\tmxCellRenderer.registerShape('internalStorage', InternalStorageShape);\n\n\t// Internal storage\n\tfunction CornerShape()\n\t{\n\t\tmxActor.call(this);\n\t};\n\n\tmxUtils.extend(CornerShape, mxActor);\n\n\tCornerShape.prototype.dx = 20;\n\n\tCornerShape.prototype.dy = 20;\n\t\n\t// Corner\n\tCornerShape.prototype.redrawPath = function(c, x, y, w, h)\n\t{\n\t\tvar dx = Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'dx', this.dx))));\n\t\tvar dy = Math.max(0, Math.min(h, parseFloat(mxUtils.getValue(this.style, 'dy', this.dy))));\n\t\t\n\t\tvar s = Math.min(w / 2, Math.min(h, parseFloat(mxUtils.getValue(this.style, 'size', this.size))));\n\t\tvar arcSize = mxUtils.getValue(this.style, mxConstants.STYLE_ARCSIZE, mxConstants.LINE_ARCSIZE) / 2;\n\t\tthis.addPoints(c, [new mxPoint(0, 0), new mxPoint(w, 0), new mxPoint(w, dy), new mxPoint(dx, dy),\n\t\t                   new mxPoint(dx, h), new mxPoint(0, h)], this.isRounded, arcSize, true);\n\t\tc.end();\n\t};\n\n\tmxCellRenderer.registerShape('corner', CornerShape);\n\n\t// Crossbar shape\n\tfunction CrossbarShape()\n\t{\n\t\tmxActor.call(this);\n\t};\n\n\tmxUtils.extend(CrossbarShape, mxActor);\n\t\n\tCrossbarShape.prototype.redrawPath = function(c, x, y, w, h)\n\t{\n\t\tc.moveTo(0, 0);\n\t\tc.lineTo(0, h);\n\t\tc.end();\n\t\t\n\t\tc.moveTo(w, 0);\n\t\tc.lineTo(w, h);\n\t\tc.end();\n\t\t\n\t\tc.moveTo(0, h / 2);\n\t\tc.lineTo(w, h / 2);\n\t\tc.end();\n\t};\n\n\tmxCellRenderer.registerShape('crossbar', CrossbarShape);\n\n\t// Internal storage\n\tfunction TeeShape()\n\t{\n\t\tmxActor.call(this);\n\t};\n\n\tmxUtils.extend(TeeShape, mxActor);\n\n\tTeeShape.prototype.dx = 20;\n\n\tTeeShape.prototype.dy = 20;\n\t\n\t// Corner\n\tTeeShape.prototype.redrawPath = function(c, x, y, w, h)\n\t{\n\t\tvar dx = Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'dx', this.dx))));\n\t\tvar dy = Math.max(0, Math.min(h, parseFloat(mxUtils.getValue(this.style, 'dy', this.dy))));\n\t\tvar w2 = Math.abs(w - dx) / 2;\n\t\t\n\t\tvar s = Math.min(w / 2, Math.min(h, parseFloat(mxUtils.getValue(this.style, 'size', this.size))));\n\t\tvar arcSize = mxUtils.getValue(this.style, mxConstants.STYLE_ARCSIZE, mxConstants.LINE_ARCSIZE) / 2;\n\t\tthis.addPoints(c, [new mxPoint(0, 0), new mxPoint(w, 0), new mxPoint(w, dy), new mxPoint((w + dx) / 2, dy),\n\t\t                   new mxPoint((w + dx) / 2, h), new mxPoint((w - dx) / 2, h), new mxPoint((w - dx) / 2, dy),\n\t\t                   new mxPoint(0, dy)], this.isRounded, arcSize, true);\n\t\tc.end();\n\t};\n\n\tmxCellRenderer.registerShape('tee', TeeShape);\n\n\t// Arrow\n\tfunction SingleArrowShape()\n\t{\n\t\tmxActor.call(this);\n\t};\n\n\tmxUtils.extend(SingleArrowShape, mxActor);\n\n\tSingleArrowShape.prototype.arrowWidth = 0.3;\n\n\tSingleArrowShape.prototype.arrowSize = 0.2;\n\n\tSingleArrowShape.prototype.redrawPath = function(c, x, y, w, h)\n\t{\n\t\tvar aw = h * Math.max(0, Math.min(1, parseFloat(mxUtils.getValue(this.style, 'arrowWidth', this.arrowWidth))));\n\t\tvar as = w * Math.max(0, Math.min(1, parseFloat(mxUtils.getValue(this.style, 'arrowSize', this.arrowSize))));\n\t\tvar at = (h - aw) / 2;\n\t\tvar ab = at + aw;\n\t\t\n\t\tvar arcSize = mxUtils.getValue(this.style, mxConstants.STYLE_ARCSIZE, mxConstants.LINE_ARCSIZE) / 2;\n\t\tthis.addPoints(c, [new mxPoint(0, at), new mxPoint(w - as, at), new mxPoint(w - as, 0), new mxPoint(w, h / 2),\n\t\t                   new mxPoint(w - as, h), new mxPoint(w - as, ab), new mxPoint(0, ab)],\n\t\t                   this.isRounded, arcSize, true);\n\t\tc.end();\n\t};\n\n\tmxCellRenderer.registerShape('singleArrow', SingleArrowShape);\n\n\t// Arrow\n\tfunction DoubleArrowShape()\n\t{\n\t\tmxActor.call(this);\n\t};\n\n\tmxUtils.extend(DoubleArrowShape, mxActor);\n\n\tDoubleArrowShape.prototype.redrawPath = function(c, x, y, w, h)\n\t{\n\t\tvar aw = h * Math.max(0, Math.min(1, parseFloat(mxUtils.getValue(this.style, 'arrowWidth', SingleArrowShape.prototype.arrowWidth))));\n\t\tvar as = w * Math.max(0, Math.min(1, parseFloat(mxUtils.getValue(this.style, 'arrowSize', SingleArrowShape.prototype.arrowSize))));\n\t\tvar at = (h - aw) / 2;\n\t\tvar ab = at + aw;\n\t\t\n\t\tvar arcSize = mxUtils.getValue(this.style, mxConstants.STYLE_ARCSIZE, mxConstants.LINE_ARCSIZE) / 2;\n\t\tthis.addPoints(c, [new mxPoint(0, h / 2), new mxPoint(as, 0), new mxPoint(as, at), new mxPoint(w - as, at),\n\t\t                   new mxPoint(w - as, 0), new mxPoint(w, h / 2), new mxPoint(w - as, h),\n\t\t                   new mxPoint(w - as, ab), new mxPoint(as, ab), new mxPoint(as, h)],\n\t\t                   this.isRounded, arcSize, true);\n\t\tc.end();\n\t};\n\n\tmxCellRenderer.registerShape('doubleArrow', DoubleArrowShape);\n\n\t// Data storage\n\tfunction DataStorageShape()\n\t{\n\t\tmxActor.call(this);\n\t};\n\n\tmxUtils.extend(DataStorageShape, mxActor);\n\n\tDataStorageShape.prototype.size = 0.1;\n\n\tDataStorageShape.prototype.fixedSize = 20;\n\n\tDataStorageShape.prototype.redrawPath = function(c, x, y, w, h)\n\t{\n\t\tvar fixed = mxUtils.getValue(this.style, 'fixedSize', '0') != '0';\n\t\tvar s = (fixed) ? Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'size', this.fixedSize)))) :\n\t\t\tw * Math.max(0, Math.min(1, parseFloat(mxUtils.getValue(this.style, 'size', this.size))));\n\t\t\n\t\tc.moveTo(s, 0);\n\t\tc.lineTo(w, 0);\n\t\tc.quadTo(w - s * 2, h / 2, w, h);\n\t\tc.lineTo(s, h);\n\t\tc.quadTo(s - s * 2, h / 2, s, 0);\n\t\tc.close();\n\t\tc.end();\n\t};\n\n\tmxCellRenderer.registerShape('dataStorage', DataStorageShape);\n\n\t// Or\n\tfunction OrShape()\n\t{\n\t\tmxActor.call(this);\n\t};\n\n\tmxUtils.extend(OrShape, mxActor);\n\n\tOrShape.prototype.redrawPath = function(c, x, y, w, h)\n\t{\n\t\tc.moveTo(0, 0);\n\t\tc.quadTo(w, 0, w, h / 2);\n\t\tc.quadTo(w, h, 0, h);\n\t\tc.close();\n\t\tc.end();\n\t};\n\n\tmxCellRenderer.registerShape('or', OrShape);\n\n\t// Xor\n\tfunction XorShape()\n\t{\n\t\tmxActor.call(this);\n\t};\n\n\tmxUtils.extend(XorShape, mxActor);\n\n\tXorShape.prototype.redrawPath = function(c, x, y, w, h)\n\t{\n\t\tc.moveTo(0, 0);\n\t\tc.quadTo(w, 0, w, h / 2);\n\t\tc.quadTo(w, h, 0, h);\n\t\tc.quadTo(w / 2, h / 2, 0, 0);\n\t\tc.close();\n\t\tc.end();\n\t};\n\n\tmxCellRenderer.registerShape('xor', XorShape);\n\n\t// Loop limit\n\tfunction LoopLimitShape()\n\t{\n\t\tmxActor.call(this);\n\t};\n\n\tmxUtils.extend(LoopLimitShape, mxActor);\n\n\tLoopLimitShape.prototype.size = 20;\n\n\tLoopLimitShape.prototype.isRoundable = function()\n\t{\n\t\treturn true;\n\t};\n\n\tLoopLimitShape.prototype.redrawPath = function(c, x, y, w, h)\n\t{\n\t\tvar s = Math.min(w / 2, Math.min(h, parseFloat(mxUtils.getValue(this.style, 'size', this.size))));\n\t\tvar arcSize = mxUtils.getValue(this.style, mxConstants.STYLE_ARCSIZE, mxConstants.LINE_ARCSIZE) / 2;\n\t\tthis.addPoints(c, [new mxPoint(s, 0), new mxPoint(w - s, 0), new mxPoint(w, s * 0.8), new mxPoint(w, h),\n\t\t                   new mxPoint(0, h), new mxPoint(0, s * 0.8)], this.isRounded, arcSize, true);\n\t\tc.end();\n\t};\n\n\tmxCellRenderer.registerShape('loopLimit', LoopLimitShape);\n\n\t// Off page connector\n\tfunction OffPageConnectorShape()\n\t{\n\t\tmxActor.call(this);\n\t};\n\n\tmxUtils.extend(OffPageConnectorShape, mxActor);\n\n\tOffPageConnectorShape.prototype.size = 3 / 8;\n\n\tOffPageConnectorShape.prototype.isRoundable = function()\n\t{\n\t\treturn true;\n\t};\n\tOffPageConnectorShape.prototype.redrawPath = function(c, x, y, w, h)\n\t{\n\t\tvar s = h * Math.max(0, Math.min(1, parseFloat(mxUtils.getValue(this.style, 'size', this.size))));\n\t\tvar arcSize = mxUtils.getValue(this.style, mxConstants.STYLE_ARCSIZE, mxConstants.LINE_ARCSIZE) / 2;\n\t\tthis.addPoints(c, [new mxPoint(0, 0), new mxPoint(w, 0), new mxPoint(w, h - s), new mxPoint(w / 2, h),\n\t\t                   new mxPoint(0, h - s)], this.isRounded, arcSize, true);\n\t\tc.end();\n\t};\n\n\tmxCellRenderer.registerShape('offPageConnector', OffPageConnectorShape);\n\n\t// Internal storage\n\tfunction TapeDataShape()\n\t{\n\t\tmxEllipse.call(this);\n\t};\n\n\tmxUtils.extend(TapeDataShape, mxEllipse);\n\n\tTapeDataShape.prototype.paintVertexShape = function(c, x, y, w, h)\n\t{\n\t\tmxEllipse.prototype.paintVertexShape.apply(this, arguments);\n\t\t\n\t\tc.begin();\n\t\tc.moveTo(x + w / 2, y + h);\n\t\tc.lineTo(x + w, y + h);\n\t\tc.end();\n\t\tc.stroke();\n\t};\n\n\tmxCellRenderer.registerShape('tapeData', TapeDataShape);\n\n\t// OrEllipseShape\n\tfunction OrEllipseShape()\n\t{\n\t\tmxEllipse.call(this);\n\t};\n\n\tmxUtils.extend(OrEllipseShape, mxEllipse);\n\n\tOrEllipseShape.prototype.paintVertexShape = function(c, x, y, w, h)\n\t{\n\t\tmxEllipse.prototype.paintVertexShape.apply(this, arguments);\n\t\t\n\t\tc.setShadow(false);\n\t\tc.begin();\n\t\tc.moveTo(x, y + h / 2);\n\t\tc.lineTo(x + w, y + h / 2);\n\t\tc.end();\n\t\tc.stroke();\n\t\t\n\t\tc.begin();\n\t\tc.moveTo(x + w / 2, y);\n\t\tc.lineTo(x + w / 2, y + h);\n\t\tc.end();\n\t\tc.stroke();\n\t};\n\n\tmxCellRenderer.registerShape('orEllipse', OrEllipseShape);\n\n\t// SumEllipseShape\n\tfunction SumEllipseShape()\n\t{\n\t\tmxEllipse.call(this);\n\t};\n\n\tmxUtils.extend(SumEllipseShape, mxEllipse);\n\n\tSumEllipseShape.prototype.paintVertexShape = function(c, x, y, w, h)\n\t{\n\t\tmxEllipse.prototype.paintVertexShape.apply(this, arguments);\n\t\tvar s2 = 0.145;\n\t\t\n\t\tc.setShadow(false);\n\t\tc.begin();\n\t\tc.moveTo(x + w * s2, y + h * s2);\n\t\tc.lineTo(x + w * (1 - s2), y + h * (1 - s2));\n\t\tc.end();\n\t\tc.stroke();\n\t\t\n\t\tc.begin();\n\t\tc.moveTo(x + w * (1 - s2), y + h * s2);\n\t\tc.lineTo(x + w * s2, y + h * (1 - s2));\n\t\tc.end();\n\t\tc.stroke();\n\t};\n\n\tmxCellRenderer.registerShape('sumEllipse', SumEllipseShape);\n\n\t// SortShape\n\tfunction SortShape()\n\t{\n\t\tmxRhombus.call(this);\n\t};\n\n\tmxUtils.extend(SortShape, mxRhombus);\n\n\tSortShape.prototype.paintVertexShape = function(c, x, y, w, h)\n\t{\n\t\tmxRhombus.prototype.paintVertexShape.apply(this, arguments);\n\t\t\n\t\tc.setShadow(false);\n\t\tc.begin();\n\t\tc.moveTo(x, y + h / 2);\n\t\tc.lineTo(x + w, y + h / 2);\n\t\tc.end();\n\t\tc.stroke();\n\t};\n\n\tmxCellRenderer.registerShape('sortShape', SortShape);\n\n\t// CollateShape\n\tfunction CollateShape()\n\t{\n\t\tmxEllipse.call(this);\n\t};\n\n\tmxUtils.extend(CollateShape, mxEllipse);\n\n\tCollateShape.prototype.paintVertexShape = function(c, x, y, w, h)\n\t{\n\t\tc.begin();\n\t\tc.moveTo(x, y);\n\t\tc.lineTo(x + w, y);\n\t\tc.lineTo(x + w / 2, y + h / 2);\n\t\tc.close();\n\t\tc.fillAndStroke();\n\t\t\n\t\tc.begin();\n\t\tc.moveTo(x, y + h);\n\t\tc.lineTo(x + w, y + h);\n\t\tc.lineTo(x + w / 2, y + h / 2);\n\t\tc.close();\n\t\tc.fillAndStroke();\n\t};\n\n\tmxCellRenderer.registerShape('collate', CollateShape);\n\n\t// DimensionShape\n\tfunction DimensionShape()\n\t{\n\t\tmxEllipse.call(this);\n\t};\n\n\tmxUtils.extend(DimensionShape, mxEllipse);\n\n\tDimensionShape.prototype.paintVertexShape = function(c, x, y, w, h)\n\t{\n\t\tvar sw = c.state.strokeWidth / 2;\n\t\t// Arrow size\n\t\tvar al = 10 + 2 * sw;\n\t\tvar cy = y + h - al / 2;\n\t\t\n\t\tc.begin();\n\t\tc.moveTo(x, y);\n\t\tc.lineTo(x, y + h);\n\t\tc.moveTo(x + sw, cy);\n\t\tc.lineTo(x + sw + al, cy - al / 2);\n\t\tc.moveTo(x + sw, cy);\n\t\tc.lineTo(x + sw + al, cy + al / 2);\n\t\tc.moveTo(x + sw, cy);\n\t\tc.lineTo(x + w - sw, cy);\n\n\t\t// Opposite side\n\t\tc.moveTo(x + w, y);\n\t\tc.lineTo(x + w, y + h);\n\t\tc.moveTo(x + w - sw, cy);\n\t\tc.lineTo(x + w - al - sw, cy - al / 2);\n\t\tc.moveTo(x + w - sw, cy);\n\t\tc.lineTo(x + w - al - sw, cy + al / 2);\n\t\tc.end();\n\t\tc.stroke();\n\t};\n\n\tmxCellRenderer.registerShape('dimension', DimensionShape);\n\n\t// PartialRectangleShape\n\tfunction PartialRectangleShape()\n\t{\n\t\tmxEllipse.call(this);\n\t};\n\n\tmxUtils.extend(PartialRectangleShape, mxEllipse);\n\n\tPartialRectangleShape.prototype.drawHidden = true;\n\n\tPartialRectangleShape.prototype.paintVertexShape = function(c, x, y, w, h)\n\t{\n\t\tif (!this.outline)\n\t\t{\n\t\t\tc.setStrokeColor(null);\n\t\t}\n\n\t\tif (this.style != null)\n\t\t{\n\t\t\tvar pointerEvents = c.pointerEvents;\n\t\t\tvar filled = this.fill != null && this.fill != mxConstants.NONE;\n\t\t\tvar events = mxUtils.getValue(this.style, mxConstants.STYLE_POINTER_EVENTS, '1') == '1';\n\t\t\t\n\t\t\tif (!events && !filled)\n\t\t\t{\n\t\t\t\tc.pointerEvents = false;\n\t\t\t}\n\n\t\t\tvar top = mxUtils.getValue(this.style, 'top', '1') == '1';\n\t\t\tvar left = mxUtils.getValue(this.style, 'left', '1') == '1';\n\t\t\tvar right = mxUtils.getValue(this.style, 'right', '1') == '1';\n\t\t\tvar bottom = mxUtils.getValue(this.style, 'bottom', '1') == '1';\n\n\t\t\tif (this.drawHidden || filled || this.outline || top || right || bottom || left)\n\t\t\t{\n\t\t\t\tc.rect(x, y, w, h);\n\t\t\t\tc.fill();\n\n\t\t\t\tc.pointerEvents = pointerEvents;\n\t\t\t\tc.setStrokeColor(this.stroke);\n\t\t\t\tc.setLineCap('square');\n\t\t\t\tc.begin();\n\t\t\t\tc.moveTo(x, y);\n\t\t\t\t\n\t\t\t\tif (this.outline || top)\n\t\t\t\t{\n\t\t\t\t\tc.lineTo(x + w, y);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tc.moveTo(x + w, y);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (this.outline || right)\n\t\t\t\t{\n\t\t\t\t\tc.lineTo(x + w, y + h);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tc.moveTo(x + w, y + h);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (this.outline || bottom)\n\t\t\t\t{\n\t\t\t\t\tc.lineTo(x, y + h);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tc.moveTo(x, y + h);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (this.outline || left)\n\t\t\t\t{\n\t\t\t\t\tc.lineTo(x, y);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tc.end();\n\t\t\t\tc.stroke();\n\t\t\t\tc.setLineCap('flat');\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tc.setStrokeColor(this.stroke);\n\t\t\t}\n\t\t}\n\t};\n\n\tmxCellRenderer.registerShape('partialRectangle', PartialRectangleShape);\n\n\t// LineEllipseShape\n\tfunction LineEllipseShape()\n\t{\n\t\tmxEllipse.call(this);\n\t};\n\n\tmxUtils.extend(LineEllipseShape, mxEllipse);\n\n\tLineEllipseShape.prototype.paintVertexShape = function(c, x, y, w, h)\n\t{\n\t\tmxEllipse.prototype.paintVertexShape.apply(this, arguments);\n\t\t\n\t\tc.setShadow(false);\n\t\tc.begin();\n\t\t\n\t\tif (mxUtils.getValue(this.style, 'line') == 'vertical')\n\t\t{\n\t\t\tc.moveTo(x + w / 2, y);\n\t\t\tc.lineTo(x + w / 2, y + h);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tc.moveTo(x, y + h / 2);\n\t\t\tc.lineTo(x + w, y + h / 2);\n\t\t}\n\n\t\tc.end();\t\t\t\n\t\tc.stroke();\n\t};\n\n\tmxCellRenderer.registerShape('lineEllipse', LineEllipseShape);\n\n\t// Delay\n\tfunction DelayShape()\n\t{\n\t\tmxActor.call(this);\n\t};\n\n\tmxUtils.extend(DelayShape, mxActor);\n\n\tDelayShape.prototype.redrawPath = function(c, x, y, w, h)\n\t{\n\t\tvar dx = Math.min(w, h / 2);\n\t\tc.moveTo(0, 0);\n\t\tc.lineTo(w - dx, 0);\n\t\tc.quadTo(w, 0, w, h / 2);\n\t\tc.quadTo(w, h, w - dx, h);\n\t\tc.lineTo(0, h);\n\t\tc.close();\n\t\tc.end();\n\t};\n\n\tmxCellRenderer.registerShape('delay', DelayShape);\n\n\t// Cross Shape\n\tfunction CrossShape()\n\t{\n\t\tmxActor.call(this);\n\t};\n\n\tmxUtils.extend(CrossShape, mxActor);\n\n\tCrossShape.prototype.size = 0.2;\n\n\tCrossShape.prototype.redrawPath = function(c, x, y, w, h)\n\t{\n\t\tvar m = Math.min(h, w);\n\t\tvar size = Math.max(0, Math.min(m, m * parseFloat(mxUtils.getValue(this.style, 'size', this.size))));\n\t\tvar t = (h - size) / 2;\n\t\tvar b = t + size;\n\t\tvar l = (w - size) / 2;\n\t\tvar r = l + size;\n\t\t\n\t\tc.moveTo(0, t);\n\t\tc.lineTo(l, t);\n\t\tc.lineTo(l, 0);\n\t\tc.lineTo(r, 0);\n\t\tc.lineTo(r, t);\n\t\tc.lineTo(w, t);\n\t\tc.lineTo(w, b);\n\t\tc.lineTo(r, b);\n\t\tc.lineTo(r, h);\n\t\tc.lineTo(l, h);\n\t\tc.lineTo(l, b);\n\t\tc.lineTo(0, b);\n\t\tc.close();\n\t\tc.end();\n\t};\n\n\tmxCellRenderer.registerShape('cross', CrossShape);\n\n\t// Display\n\tfunction DisplayShape()\n\t{\n\t\tmxActor.call(this);\n\t};\n\n\tmxUtils.extend(DisplayShape, mxActor);\n\n\tDisplayShape.prototype.size = 0.25;\n\n\tDisplayShape.prototype.redrawPath = function(c, x, y, w, h)\n\t{\n\t\tvar dx = Math.min(w, h / 2);\n\t\tvar s = Math.min(w - dx, Math.max(0, parseFloat(mxUtils.getValue(this.style, 'size', this.size))) * w);\n\t\t\n\t\tc.moveTo(0, h / 2);\n\t\tc.lineTo(s, 0);\n\t\tc.lineTo(w - dx, 0);\n\t\tc.quadTo(w, 0, w, h / 2);\n\t\tc.quadTo(w, h, w - dx, h);\n\t\tc.lineTo(s, h);\n\t\tc.close();\n\t\tc.end();\n\t};\n\n\tmxCellRenderer.registerShape('display', DisplayShape);\n\n\t//**********************************************************************************************************************************************************\n\t//Rectangle v2\n\t//**********************************************************************************************************************************************************\n\t/**\n\t* Extends mxShape.\n\t*/\n\tfunction mxShapeBasicRect2(bounds, fill, stroke, strokewidth)\n\t{\n\t\tmxShape.call(this);\n\t\tthis.bounds = bounds;\n\t\tthis.fill = fill;\n\t\tthis.stroke = stroke;\n\t\tthis.strokewidth = (strokewidth != null) ? strokewidth : 1;\n\t\tthis.rectStyle = 'square';\n\t\tthis.size = 10;\n\t\tthis.absoluteCornerSize = true;\n\t\tthis.indent = 2;\n\t\tthis.rectOutline = 'single';\n\t};\n\n\t/**\n\t* Extends mxShape.\n\t*/\n\tmxUtils.extend(mxShapeBasicRect2, mxActor);\n\n\tmxShapeBasicRect2.prototype.cst = {RECT2 : 'mxgraph.basic.rect'};\n\n\tmxShapeBasicRect2.prototype.customProperties = [\n\t\t{name: 'rectStyle', dispName: 'Style', type: 'enum', defVal:'square',\n\t\t\tenumList:[\n\t\t\t\t{val:'square', dispName:'Square'},\n\t\t\t\t{val:'rounded', dispName:'Round'},\n\t\t\t\t{val:'snip', dispName:'Snip'},\n\t\t\t\t{val:'invRound', dispName:'Inv. Round'},\n\t\t\t\t{val:'fold', dispName:'Fold'}\n\t\t\t]},\n\t\t{name: 'size', dispName: 'Corner Size', type: 'float', defVal:10},\n\t\t{name: 'absoluteCornerSize', dispName: 'Abs. Corner Size', type: 'bool', defVal:true},\n\t\t{name: 'indent', dispName:'Indent', type:'float', defVal:2},\n\t\t{name: 'rectOutline', dispName: 'Outline', type: 'enum', defVal:'single',\n\t\t\tenumList:[\n\t\t\t\t{val:'single', dispName:'Single'},\n\t\t\t\t{val:'double', dispName:'Double'},\n\t\t\t\t{val:'frame', dispName:'Frame'}\n\t\t\t]},\n\t\t{name: 'fillColor2', dispName:'Inside Fill Color', type:'color', defVal:'none'},\n\t\t{name: 'gradientColor2', dispName:'Inside Gradient Color', type:'color', defVal:'none'},\n\t\t{name: 'gradientDirection2', dispName: 'Inside Gradient Direction', type: 'enum', defVal:'south',\n\t\t\tenumList:[\n\t\t\t\t{val:'south', dispName:'South'},\n\t\t\t\t{val:'west', dispName:'West'},\n\t\t\t\t{val:'north', dispName:'North'},\n\t\t\t\t{val:'east', dispName:'East'}\n\t\t]},\n\t\t{name: 'top', dispName:'Top Line', type:'bool', defVal:true},\n\t\t{name: 'right', dispName:'Right', type:'bool', defVal:true},\n\t\t{name: 'bottom', dispName:'Bottom Line', type:'bool', defVal:true},\n\t\t{name: 'left', dispName:'Left ', type:'bool', defVal:true},\n\t\t{name: 'topLeftStyle', dispName: 'Top Left Style', type: 'enum', defVal:'default',\n\t\tenumList:[\n\t\t\t{val:'default', dispName:'Default'},\n\t\t\t{val:'square', dispName:'Square'},\n\t\t\t{val:'rounded', dispName:'Round'},\n\t\t\t{val:'snip', dispName:'Snip'},\n\t\t\t{val:'invRound', dispName:'Inv. Round'},\n\t\t\t{val:'fold', dispName:'Fold'}\n\t\t]},\n\t\t{name: 'topRightStyle', dispName: 'Top Right Style', type: 'enum', defVal:'default',\n\t\t\tenumList:[\n\t\t\t\t{val:'default', dispName:'Default'},\n\t\t\t\t{val:'square', dispName:'Square'},\n\t\t\t\t{val:'rounded', dispName:'Round'},\n\t\t\t\t{val:'snip', dispName:'Snip'},\n\t\t\t\t{val:'invRound', dispName:'Inv. Round'},\n\t\t\t\t{val:'fold', dispName:'Fold'}\n\t\t]},\n\t\t{name: 'bottomRightStyle', dispName: 'Bottom Right Style', type: 'enum', defVal:'default',\n\t\t\tenumList:[\n\t\t\t\t{val:'default', dispName:'Default'},\n\t\t\t\t{val:'square', dispName:'Square'},\n\t\t\t\t{val:'rounded', dispName:'Round'},\n\t\t\t\t{val:'snip', dispName:'Snip'},\n\t\t\t\t{val:'invRound', dispName:'Inv. Round'},\n\t\t\t\t{val:'fold', dispName:'Fold'}\n\t\t]},\n\t\t{name: 'bottomLeftStyle', dispName: 'Bottom Left Style', type: 'enum', defVal:'default',\n\t\t\tenumList:[\n\t\t\t\t{val:'default', dispName:'Default'},\n\t\t\t\t{val:'square', dispName:'Square'},\n\t\t\t\t{val:'rounded', dispName:'Round'},\n\t\t\t\t{val:'snip', dispName:'Snip'},\n\t\t\t\t{val:'invRound', dispName:'Inv. Round'},\n\t\t\t\t{val:'fold', dispName:'Fold'}\n\t\t]},\n\t];\n\n\t/**\n\t* Function: paintVertexShape\n\t* \n\t* Paints the vertex shape.\n\t*/\n\tmxShapeBasicRect2.prototype.paintVertexShape = function(c, x, y, w, h)\n\t{\n\t\tc.translate(x, y);\n\t\tthis.strictDrawShape(c, 0, 0, w, h);\n\t}\n\n\t//\n\tmxShapeBasicRect2.prototype.strictDrawShape = function(c, x, y, w, h, os)\n\t{\n\t\t// read styles or optionally override them externally via \"os\" variable\n\t\tvar rectStyle =\t(os && os.rectStyle) ? os.rectStyle : mxUtils.getValue(this.style, 'rectStyle', this.rectStyle);\n\t\tvar absoluteCornerSize = (os && os.absoluteCornerSize) ? os.absoluteCornerSize : mxUtils.getValue(this.style, 'absoluteCornerSize', this.absoluteCornerSize);\n\t\tvar size =\t(os && os.size) ? os.size : Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'size', this.size))));\n\t\tvar rectOutline = (os && os.rectOutline) ? os.rectOutline : mxUtils.getValue(this.style, 'rectOutline', this.rectOutline);\n\t\tvar indent = (os && os.indent) ? os.indent : Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'indent', this.indent))));\n\t\tvar dashed = (os && os.dashed) ? os.dashed : mxUtils.getValue(this.style, 'dashed', false);\n\t\tvar dashPattern = (os && os.dashPattern) ? os.dashPattern : mxUtils.getValue(this.style, 'dashPattern', null);\n\t\tvar relIndent = (os && os.relIndent) ? os.relIndent : Math.max(0, Math.min(50, indent));\n\t\tvar top = (os && os.top) ? os.top : mxUtils.getValue(this.style, 'top', true);\n\t\tvar right = (os && os.right) ? os.right : mxUtils.getValue(this.style, 'right', true);\n\t\tvar bottom = (os && os.bottom) ? os.bottom : mxUtils.getValue(this.style, 'bottom', true);\n\t\tvar left = (os && os.left) ? os.left : mxUtils.getValue(this.style, 'left', true);\n\t\tvar topLeftStyle = (os && os.topLeftStyle) ? os.topLeftStyle : mxUtils.getValue(this.style, 'topLeftStyle', 'default');\n\t\tvar topRightStyle = (os && os.topRightStyle) ? os.topRightStyle : mxUtils.getValue(this.style, 'topRightStyle', 'default');\n\t\tvar bottomRightStyle = (os && os.bottomRightStyle) ? os.bottomRightStyle : mxUtils.getValue(this.style, 'bottomRightStyle', 'default');\n\t\tvar bottomLeftStyle = (os && os.bottomLeftStyle) ? os.bottomLeftStyle : mxUtils.getValue(this.style, 'bottomLeftStyle', 'default');\n\t\tvar fillColor = (os && os.fillColor) ? os.fillColor : mxUtils.getValue(this.style, 'fillColor', '#ffffff');\n\t\tvar strokeColor = (os && os.strokeColor) ? os.strokeColor : mxUtils.getValue(this.style, 'strokeColor', '#000000');\n\t\tvar strokeWidth = (os && os.strokeWidth) ? os.strokeWidth : mxUtils.getValue(this.style, 'strokeWidth', '1');\n\t\tvar fillColor2 = (os && os.fillColor2) ? os.fillColor2 : mxUtils.getValue(this.style, 'fillColor2', 'none');\n\t\tvar gradientColor2 = (os && os.gradientColor2) ? os.gradientColor2 : mxUtils.getValue(this.style, 'gradientColor2', 'none');\n\t\tvar gdir2 = (os && os.gradientDirection2) ? os.gradientDirection2 : mxUtils.getValue(this.style, 'gradientDirection2', 'south');\n\t\tvar opacity = (os && os.opacity) ? os.opacity : mxUtils.getValue(this.style, 'opacity', '100');\n\t\t\n\t\tvar relSize = Math.max(0, Math.min(50, size));\n\t\tvar sc = mxShapeBasicRect2.prototype;\n\t\t\n\t\tc.setDashed(dashed);\n\t\t\n\t\tif (dashPattern && dashPattern != '')\n\t\t{\n\t\t\tc.setDashPattern(dashPattern);\n\t\t}\n\t\t\n\t\tc.setStrokeWidth(strokeWidth);\n\t\t\n\t\tsize = Math.min(h * 0.5, w * 0.5, size);\n\t\t\n\t\tif (!absoluteCornerSize)\n\t\t{\n\t\t\tsize = relSize * Math.min(w, h) / 100;\n\t\t}\n\t\t\n\t\tsize = Math.min(size, Math.min(w, h) * 0.5);\n\t\t\n\t\tif (!absoluteCornerSize)\n\t\t{\n\t\t\tindent = Math.min(relIndent * Math.min(w, h) / 100);\n\t\t}\n\n\t\tindent = Math.min(indent, Math.min(w, h) * 0.5 - size);\n\t\t\n\t\tif ((top || right || bottom || left) && rectOutline != 'frame')\n\t\t{\n\t\t\t\n\t\t\t//outline fill\n\t\t\tc.begin();\n\t\t\tif (!top)\n\t\t\t{\n\t\t\t\tc.moveTo(0,0);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tsc.moveNW(c, x, y, w, h, rectStyle, topLeftStyle, size, left);\n\t\t\t}\n\t\t\t\n\t\t\tif (top)\n\t\t\t{\n\t\t\t\tsc.paintNW(c, x, y, w, h, rectStyle, topLeftStyle, size, left);\n\t\t\t}\n\n\t\t\tsc.paintTop(c, x, y, w, h, rectStyle, topRightStyle, size, right);\n\t\t\t\n\t\t\tif (right)\n\t\t\t{\n\t\t\t\tsc.paintNE(c, x, y, w, h, rectStyle, topRightStyle, size, top);\n\t\t\t}\n\n\t\t\tsc.paintRight(c, x, y, w, h, rectStyle, bottomRightStyle, size, bottom);\n\t\t\t\n\t\t\tif (bottom)\n\t\t\t{\n\t\t\t\tsc.paintSE(c, x, y, w, h, rectStyle, bottomRightStyle, size, right);\n\t\t\t}\n\t\t\t\n\t\t\tsc.paintBottom(c, x, y, w, h, rectStyle, bottomLeftStyle, size, left);\n\t\t\t\n\t\t\tif (left)\n\t\t\t{\n\t\t\t\tsc.paintSW(c, x, y, w, h, rectStyle, bottomLeftStyle, size, bottom);\n\t\t\t}\n\n\t\t\tsc.paintLeft(c, x, y, w, h, rectStyle, topLeftStyle, size, top);\n\t\t\tc.close();\n\t\t\tc.fill();\n\n\t\t\tc.setShadow(false);\n\n\t\t\t//inner fill\n\t\t\tc.setFillColor(fillColor2);\n\t\t\tvar op1 = opacity;\n\t\t\tvar op2 = opacity;\n\t\t\t\n\t\t\tif (fillColor2 == 'none')\n\t\t\t{\n\t\t\t\top1 = 0;\n\t\t\t}\n\t\t\t\n\t\t\tif (gradientColor2 == 'none')\n\t\t\t{\n\t\t\t\top2 = 0;\n\t\t\t}\n\t\t\t\n\t\t\tc.setGradient(fillColor2, gradientColor2, 0, 0, w, h, gdir2, op1, op2);\n\t\t\t\n\t\t\tc.begin();\n\n\t\t\tif (!top)\n\t\t\t{\n\t\t\t\tc.moveTo(indent,0);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tsc.moveNWInner(c, x, y, w, h, rectStyle, topLeftStyle, size, indent, top, left);\n\t\t\t}\n\n\t\t\tsc.paintLeftInner(c, x, y, w, h, rectStyle, bottomLeftStyle, size, indent, bottom, left);\n\t\t\t\n\t\t\tif (left && bottom)\n\t\t\t{\n\t\t\t\tsc.paintSWInner(c, x, y, w, h, rectStyle, bottomLeftStyle, size, indent, bottom);\n\t\t\t}\n\n\t\t\tsc.paintBottomInner(c, x, y, w, h, rectStyle, bottomRightStyle, size, indent, right, bottom);\n\t\t\t\n\t\t\tif (bottom && right)\n\t\t\t{\n\t\t\t\tsc.paintSEInner(c, x, y, w, h, rectStyle, bottomRightStyle, size, indent);\n\t\t\t}\n\t\t\t\n\t\t\tsc.paintRightInner(c, x, y, w, h, rectStyle, topRightStyle, size, indent, top, right);\n\t\t\t\n\t\t\tif (right && top)\n\t\t\t{\n\t\t\t\tsc.paintNEInner(c, x, y, w, h, rectStyle, topRightStyle, size, indent);\n\t\t\t}\n\n\t\t\tsc.paintTopInner(c, x, y, w, h, rectStyle, topLeftStyle, size, indent, left, top);\n\t\t\t\n\t\t\tif (top && left)\n\t\t\t{\n\t\t\t\tsc.paintNWInner(c, x, y, w, h, rectStyle, topLeftStyle, size, indent);\n\t\t\t}\n\n\t\t\tc.fill();\n\n\t\t\tif (fillColor == 'none')\n\t\t\t{\n\t\t\t\tc.begin();\n\t\t\t\tsc.paintFolds(c, x, y, w, h, rectStyle, topLeftStyle, topRightStyle, bottomRightStyle, bottomLeftStyle, size, top, right, bottom, left);\n\t\t\t\tc.stroke();\n\t\t\t}\n\t\t}\n\n\t\t//draw all the combinations\n\t\tif (!top && !right && !bottom && left)\n\t\t{\n\t\t\t\n\t\t\tif (rectOutline != 'frame')\n\t\t\t{\n\t\t\t\tc.begin();\n\t\t\t\tsc.moveSW(c, x, y, w, h, rectStyle, topLeftStyle, size, bottom);\n\t\t\t\tsc.paintLeft(c, x, y, w, h, rectStyle, topLeftStyle, size, top);\n\n\t\t\t\tif (rectOutline == 'double')\n\t\t\t\t{\n\t\t\t\t\tsc.moveNWInner(c, x, y, w, h, rectStyle, topLeftStyle, size, indent, top, left);\n\t\t\t\t\tsc.paintLeftInner(c, x, y, w, h, rectStyle, bottomLeftStyle, size, indent, bottom, left);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tc.stroke();\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tc.begin();\n\t\t\t\tsc.moveSW(c, x, y, w, h, rectStyle, topLeftStyle, size, bottom);\n\t\t\t\tsc.paintLeft(c, x, y, w, h, rectStyle, topLeftStyle, size, top);\n\t\t\t\tsc.lineNWInner(c, x, y, w, h, rectStyle, topLeftStyle, size, indent, top, left);\n\t\t\t\tsc.paintLeftInner(c, x, y, w, h, rectStyle, bottomLeftStyle, size, indent, bottom, left);\n\t\t\t\tc.close();\n\t\t\t\tc.fillAndStroke();\n\t\t\t}\n\t\t}\n\t\telse if (!top && !right && bottom && !left)\n\t\t{\n\t\t\tif (rectOutline != 'frame')\n\t\t\t{\n\t\t\t\tc.begin();\n\t\t\t\tsc.moveSE(c, x, y, w, h, rectStyle, bottomRightStyle, size, right);\n\t\t\t\tsc.paintBottom(c, x, y, w, h, rectStyle, bottomLeftStyle, size, left);\n\t\t\n\t\t\t\tif (rectOutline == 'double')\n\t\t\t\t{\n\t\t\t\t\tsc.moveSWInner(c, x, y, w, h, rectStyle, bottomLeftStyle, size, indent, left);\n\t\t\t\t\tsc.paintBottomInner(c, x, y, w, h, rectStyle, bottomRightStyle, size, indent, right, bottom);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tc.stroke();\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tc.begin();\n\t\t\t\tsc.moveSE(c, x, y, w, h, rectStyle, bottomRightStyle, size, right);\n\t\t\t\tsc.paintBottom(c, x, y, w, h, rectStyle, bottomLeftStyle, size, left);\n\t\t\t\tsc.lineSWInner(c, x, y, w, h, rectStyle, bottomLeftStyle, size, indent, left);\n\t\t\t\tsc.paintBottomInner(c, x, y, w, h, rectStyle, bottomRightStyle, size, indent, right, bottom);\n\t\t\t\tc.close();\n\t\t\t\tc.fillAndStroke();\n\t\t\t}\n\t\t}\n\t\telse if (!top && !right && bottom && left)\n\t\t{\n\t\t\tif (rectOutline != 'frame')\n\t\t\t{\n\t\t\t\tc.begin();\n\t\t\t\tsc.moveSE(c, x, y, w, h, rectStyle, bottomRightStyle, size, right);\n\t\t\t\tsc.paintBottom(c, x, y, w, h, rectStyle, bottomLeftStyle, size, left);\n\t\t\t\tsc.paintSW(c, x, y, w, h, rectStyle, bottomLeftStyle, size, bottom);\n\t\t\t\tsc.paintLeft(c, x, y, w, h, rectStyle, topLeftStyle, size, top);\n\t\t\n\t\t\t\tif (rectOutline == 'double')\n\t\t\t\t{\n\t\t\t\t\tsc.moveNWInner(c, x, y, w, h, rectStyle, topLeftStyle, size, indent, top, left);\n\t\t\t\t\tsc.paintLeftInner(c, x, y, w, h, rectStyle, bottomLeftStyle, size, indent, bottom, left);\n\t\t\t\t\tsc.paintSWInner(c, x, y, w, h, rectStyle, bottomLeftStyle, size, indent, bottom);\n\t\t\t\t\tsc.paintBottomInner(c, x, y, w, h, rectStyle, bottomRightStyle, size, indent, right, bottom);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tc.stroke();\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tc.begin();\n\t\t\t\tsc.moveSE(c, x, y, w, h, rectStyle, bottomRightStyle, size, right);\n\t\t\t\tsc.paintBottom(c, x, y, w, h, rectStyle, bottomLeftStyle, size, left);\n\t\t\t\tsc.paintSW(c, x, y, w, h, rectStyle, bottomLeftStyle, size, bottom);\n\t\t\t\tsc.paintLeft(c, x, y, w, h, rectStyle, topLeftStyle, size, top);\n\t\t\t\tsc.lineNWInner(c, x, y, w, h, rectStyle, topLeftStyle, size, indent, top, left);\n\t\t\t\tsc.paintLeftInner(c, x, y, w, h, rectStyle, bottomLeftStyle, size, indent, bottom, left);\n\t\t\t\tsc.paintSWInner(c, x, y, w, h, rectStyle, bottomLeftStyle, size, indent, bottom);\n\t\t\t\tsc.paintBottomInner(c, x, y, w, h, rectStyle, bottomRightStyle, size, indent, right, bottom);\n\t\t\t\tc.close();\n\t\t\t\tc.fillAndStroke();\n\t\t\t}\n\t\t}\n\t\telse if (!top && right && !bottom && !left)\n\t\t{\n\t\t\tif (rectOutline != 'frame')\n\t\t\t{\n\t\t\t\tc.begin();\n\t\t\t\tsc.moveNE(c, x, y, w, h, rectStyle, topRightStyle, size, top);\n\t\t\t\tsc.paintRight(c, x, y, w, h, rectStyle, bottomRightStyle, size, bottom);\n\t\t\n\t\t\t\tif (rectOutline == 'double')\n\t\t\t\t{\n\t\t\t\t\tsc.moveSEInner(c, x, y, w, h, rectStyle, bottomRightStyle, size, indent, bottom);\n\t\t\t\t\tsc.paintRightInner(c, x, y, w, h, rectStyle, topRightStyle, size, indent, top, right);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tc.stroke();\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tc.begin();\n\t\t\t\tsc.moveNE(c, x, y, w, h, rectStyle, topRightStyle, size, top);\n\t\t\t\tsc.paintRight(c, x, y, w, h, rectStyle, bottomRightStyle, size, bottom);\n\t\t\t\tsc.lineSEInner(c, x, y, w, h, rectStyle, bottomRightStyle, size, indent, bottom);\n\t\t\t\tsc.paintRightInner(c, x, y, w, h, rectStyle, topRightStyle, size, indent, top, right);\n\t\t\t\tc.close();\n\t\t\t\tc.fillAndStroke();\n\t\t\t}\n\t\t}\n\t\telse if (!top && right && !bottom && left)\n\t\t{\n\t\t\tif (rectOutline != 'frame')\n\t\t\t{\n\t\t\t\tc.begin();\n\t\t\t\tsc.moveSW(c, x, y, w, h, rectStyle, topLeftStyle, size, bottom);\n\t\t\t\tsc.paintLeft(c, x, y, w, h, rectStyle, topLeftStyle, size, top);\n\t\t\n\t\t\t\tif (rectOutline == 'double')\n\t\t\t\t{\n\t\t\t\t\tsc.moveNWInner(c, x, y, w, h, rectStyle, topLeftStyle, size, indent, top, left);\n\t\t\t\t\tsc.paintLeftInner(c, x, y, w, h, rectStyle, bottomLeftStyle, size, indent, bottom, left);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tc.stroke();\n\t\t\t\t\n\t\t\t\tc.begin();\n\t\t\t\tsc.moveNE(c, x, y, w, h, rectStyle, topRightStyle, size, top);\n\t\t\t\tsc.paintRight(c, x, y, w, h, rectStyle, bottomRightStyle, size, bottom);\n\t\t\n\t\t\t\tif (rectOutline == 'double')\n\t\t\t\t{\n\t\t\t\t\tsc.moveSEInner(c, x, y, w, h, rectStyle, bottomRightStyle, size, indent, bottom);\n\t\t\t\t\tsc.paintRightInner(c, x, y, w, h, rectStyle, topRightStyle, size, indent, top, right);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tc.stroke();\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tc.begin();\n\t\t\t\tsc.moveSW(c, x, y, w, h, rectStyle, topLeftStyle, size, bottom);\n\t\t\t\tsc.paintLeft(c, x, y, w, h, rectStyle, topLeftStyle, size, top);\n\t\t\t\tsc.lineNWInner(c, x, y, w, h, rectStyle, topLeftStyle, size, indent, top, left);\n\t\t\t\tsc.paintLeftInner(c, x, y, w, h, rectStyle, bottomLeftStyle, size, indent, bottom, left);\n\t\t\t\tc.close();\n\t\t\t\tc.fillAndStroke();\n\t\t\t\t\n\t\t\t\tc.begin();\n\t\t\t\tsc.moveNE(c, x, y, w, h, rectStyle, topRightStyle, size, top);\n\t\t\t\tsc.paintRight(c, x, y, w, h, rectStyle, bottomRightStyle, size, bottom);\n\t\t\t\tsc.lineSEInner(c, x, y, w, h, rectStyle, bottomRightStyle, size, indent, bottom);\n\t\t\t\tsc.paintRightInner(c, x, y, w, h, rectStyle, topRightStyle, size, indent, top, right);\n\t\t\t\tc.close();\n\t\t\t\tc.fillAndStroke();\n\t\t\t}\n\t\t}\n\t\telse if (!top && right && bottom && !left)\n\t\t{\n\t\t\tif (rectOutline != 'frame')\n\t\t\t{\n\t\t\t\tc.begin();\n\t\t\t\tsc.moveNE(c, x, y, w, h, rectStyle, topRightStyle, size, top);\n\t\t\t\tsc.paintRight(c, x, y, w, h, rectStyle, bottomRightStyle, size, bottom);\n\t\t\t\tsc.paintSE(c, x, y, w, h, rectStyle, bottomRightStyle, size, right);\n\t\t\t\tsc.paintBottom(c, x, y, w, h, rectStyle, bottomLeftStyle, size, left);\n\n\t\t\t\tif (rectOutline == 'double')\n\t\t\t\t{\n\t\t\t\t\tsc.moveSWInner(c, x, y, w, h, rectStyle, bottomLeftStyle, size, indent, left);\n\t\t\t\t\tsc.paintBottomInner(c, x, y, w, h, rectStyle, bottomRightStyle, size, indent, right, bottom);\n\t\t\t\t\tsc.paintSEInner(c, x, y, w, h, rectStyle, bottomRightStyle, size, indent);\n\t\t\t\t\tsc.paintRightInner(c, x, y, w, h, rectStyle, topRightStyle, size, indent, top, right);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tc.stroke();\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tc.begin();\n\t\t\t\tsc.moveNE(c, x, y, w, h, rectStyle, topRightStyle, size, top);\n\t\t\t\tsc.paintRight(c, x, y, w, h, rectStyle, bottomRightStyle, size, bottom);\n\t\t\t\tsc.paintSE(c, x, y, w, h, rectStyle, bottomRightStyle, size, right);\n\t\t\t\tsc.paintBottom(c, x, y, w, h, rectStyle, bottomLeftStyle, size, left);\n\t\t\t\tsc.lineSWInner(c, x, y, w, h, rectStyle, bottomLeftStyle, size, indent, left);\n\t\t\t\tsc.paintBottomInner(c, x, y, w, h, rectStyle, bottomRightStyle, size, indent, right, bottom);\n\t\t\t\tsc.paintSEInner(c, x, y, w, h, rectStyle, bottomRightStyle, size, indent);\n\t\t\t\tsc.paintRightInner(c, x, y, w, h, rectStyle, topRightStyle, size, indent, top, right);\n\t\t\t\tc.close();\n\t\t\t\tc.fillAndStroke();\n\t\t\t}\n\t\t}\n\t\telse if (!top && right && bottom && left)\n\t\t{\n\t\t\tif (rectOutline != 'frame')\n\t\t\t{\n\t\t\t\tc.begin();\n\t\t\t\tsc.moveNE(c, x, y, w, h, rectStyle, topRightStyle, size, top);\n\t\t\t\tsc.paintRight(c, x, y, w, h, rectStyle, bottomRightStyle, size, bottom);\n\t\t\t\tsc.paintSE(c, x, y, w, h, rectStyle, bottomRightStyle, size, right);\n\t\t\t\tsc.paintBottom(c, x, y, w, h, rectStyle, bottomLeftStyle, size, left);\n\t\t\t\tsc.paintSW(c, x, y, w, h, rectStyle, bottomLeftStyle, size, bottom);\n\t\t\t\tsc.paintLeft(c, x, y, w, h, rectStyle, topLeftStyle, size, top);\n\t\t\n\t\t\t\tif (rectOutline == 'double')\n\t\t\t\t{\n\t\t\t\t\tsc.moveNWInner(c, x, y, w, h, rectStyle, topLeftStyle, size, indent, top, left);\n\t\t\t\t\tsc.paintLeftInner(c, x, y, w, h, rectStyle, bottomLeftStyle, size, indent, bottom, left);\n\t\t\t\t\tsc.paintSWInner(c, x, y, w, h, rectStyle, bottomLeftStyle, size, indent, bottom);\n\t\t\t\t\tsc.paintBottomInner(c, x, y, w, h, rectStyle, bottomRightStyle, size, indent, right, bottom);\n\t\t\t\t\tsc.paintSEInner(c, x, y, w, h, rectStyle, bottomRightStyle, size, indent);\n\t\t\t\t\tsc.paintRightInner(c, x, y, w, h, rectStyle, topRightStyle, size, indent, top, right);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tc.stroke();\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tc.begin();\n\t\t\t\tsc.moveNE(c, x, y, w, h, rectStyle, topRightStyle, size, top);\n\t\t\t\tsc.paintRight(c, x, y, w, h, rectStyle, bottomRightStyle, size, bottom);\n\t\t\t\tsc.paintSE(c, x, y, w, h, rectStyle, bottomRightStyle, size, right);\n\t\t\t\tsc.paintBottom(c, x, y, w, h, rectStyle, bottomLeftStyle, size, left);\n\t\t\t\tsc.paintSW(c, x, y, w, h, rectStyle, bottomLeftStyle, size, bottom);\n\t\t\t\tsc.paintLeft(c, x, y, w, h, rectStyle, topLeftStyle, size, top);\n\t\t\t\tsc.lineNWInner(c, x, y, w, h, rectStyle, topLeftStyle, size, indent, top, left);\n\t\t\t\tsc.paintLeftInner(c, x, y, w, h, rectStyle, bottomLeftStyle, size, indent, bottom, left);\n\t\t\t\tsc.paintSWInner(c, x, y, w, h, rectStyle, bottomLeftStyle, size, indent, bottom);\n\t\t\t\tsc.paintBottomInner(c, x, y, w, h, rectStyle, bottomRightStyle, size, indent, right, bottom);\n\t\t\t\tsc.paintSEInner(c, x, y, w, h, rectStyle, bottomRightStyle, size, indent);\n\t\t\t\tsc.paintRightInner(c, x, y, w, h, rectStyle, topRightStyle, size, indent, top, right);\n\t\t\t\tc.close();\n\t\t\t\tc.fillAndStroke();\n\t\t\t}\n\t\t}\n\t\telse if (top && !right && !bottom && !left)\n\t\t{\n\t\t\tif (rectOutline != 'frame')\n\t\t\t{\n\t\t\t\tc.begin();\n\t\t\t\tsc.moveNW(c, x, y, w, h, rectStyle, topLeftStyle, size, left);\n\t\t\t\tsc.paintTop(c, x, y, w, h, rectStyle, topRightStyle, size, right);\n\t\t\n\t\t\t\tif (rectOutline == 'double')\n\t\t\t\t{\n\t\t\t\t\tsc.moveNEInner(c, x, y, w, h, rectStyle, topRightStyle, size, indent, right);\n\t\t\t\t\tsc.paintTopInner(c, x, y, w, h, rectStyle, topLeftStyle, size, indent, left, top);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tc.stroke();\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tc.begin();\n\t\t\t\tsc.moveNW(c, x, y, w, h, rectStyle, topLeftStyle, size, left);\n\t\t\t\tsc.paintTop(c, x, y, w, h, rectStyle, topRightStyle, size, right);\n\t\t\t\tsc.lineNEInner(c, x, y, w, h, rectStyle, topRightStyle, size, indent, right);\n\t\t\t\tsc.paintTopInner(c, x, y, w, h, rectStyle, topLeftStyle, size, indent, left, top);\n\t\t\t\tc.close();\n\t\t\t\tc.fillAndStroke();\n\t\t\t}\n\t\t}\n\t\telse if (top && !right && !bottom && left)\n\t\t{\n\t\t\tif (rectOutline != 'frame')\n\t\t\t{\n\t\t\t\tc.begin();\n\t\t\t\tsc.moveSW(c, x, y, w, h, rectStyle, bottomLeftStyle, size, bottom);\n\t\t\t\tsc.paintLeft(c, x, y, w, h, rectStyle, topLeftStyle, size, top);\n\t\t\t\tsc.paintNW(c, x, y, w, h, rectStyle, topLeftStyle, size, left);\n\t\t\t\tsc.paintTop(c, x, y, w, h, rectStyle, topRightStyle, size, right);\n\t\t\n\t\t\t\tif (rectOutline == 'double')\n\t\t\t\t{\n\t\t\t\t\tsc.moveNEInner(c, x, y, w, h, rectStyle, topRightStyle, size, indent, right);\n\t\t\t\t\tsc.paintTopInner(c, x, y, w, h, rectStyle, topLeftStyle, size, indent, left, top);\n\t\t\t\t\tsc.paintNWInner(c, x, y, w, h, rectStyle, topLeftStyle, size, indent);\n\t\t\t\t\tsc.paintLeftInner(c, x, y, w, h, rectStyle, bottomLeftStyle, size, indent, bottom, left);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tc.stroke();\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tc.begin();\n\t\t\t\tsc.moveSW(c, x, y, w, h, rectStyle, bottomLeftStyle, size, bottom);\n\t\t\t\tsc.paintLeft(c, x, y, w, h, rectStyle, topLeftStyle, size, top);\n\t\t\t\tsc.paintNW(c, x, y, w, h, rectStyle, topLeftStyle, size, left);\n\t\t\t\tsc.paintTop(c, x, y, w, h, rectStyle, topRightStyle, size, right);\n\t\t\t\tsc.lineNEInner(c, x, y, w, h, rectStyle, topRightStyle, size, indent, right);\n\t\t\t\tsc.paintTopInner(c, x, y, w, h, rectStyle, topLeftStyle, size, indent, left, top);\n\t\t\t\tsc.paintNWInner(c, x, y, w, h, rectStyle, topLeftStyle, size, indent);\n\t\t\t\tsc.paintLeftInner(c, x, y, w, h, rectStyle, bottomLeftStyle, size, indent, bottom, left);\n\t\t\t\tc.close();\n\t\t\t\tc.fillAndStroke();\n\t\t\t}\n\t\t}\n\t\telse if (top && !right && bottom && !left)\n\t\t{\n\t\t\tif (rectOutline != 'frame')\n\t\t\t{\n\t\t\t\tc.begin();\n\t\t\t\tsc.moveNW(c, x, y, w, h, rectStyle, topLeftStyle, size, left);\n\t\t\t\tsc.paintTop(c, x, y, w, h, rectStyle, topRightStyle, size, right);\n\t\t\n\t\t\t\tif (rectOutline == 'double')\n\t\t\t\t{\n\t\t\t\t\tsc.moveNEInner(c, x, y, w, h, rectStyle, topRightStyle, size, indent, right);\n\t\t\t\t\tsc.paintTopInner(c, x, y, w, h, rectStyle, topLeftStyle, size, indent, left, top);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tc.stroke();\n\t\t\n\t\t\t\tc.begin();\n\t\t\t\tsc.moveSE(c, x, y, w, h, rectStyle, bottomRightStyle, size, right);\n\t\t\t\tsc.paintBottom(c, x, y, w, h, rectStyle, bottomLeftStyle, size, left);\n\t\t\n\t\t\t\tif (rectOutline == 'double')\n\t\t\t\t{\n\t\t\t\t\tsc.moveSWInner(c, x, y, w, h, rectStyle, bottomLeftStyle, size, indent, left);\n\t\t\t\t\tsc.paintBottomInner(c, x, y, w, h, rectStyle, bottomRightStyle, size, indent, right, bottom);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tc.stroke();\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tc.begin();\n\t\t\t\tsc.moveNW(c, x, y, w, h, rectStyle, topLeftStyle, size, left);\n\t\t\t\tsc.paintTop(c, x, y, w, h, rectStyle, topRightStyle, size, right);\n\t\t\t\tsc.lineNEInner(c, x, y, w, h, rectStyle, topRightStyle, size, indent, right);\n\t\t\t\tsc.paintTopInner(c, x, y, w, h, rectStyle, topLeftStyle, size, indent, left, top);\n\t\t\t\tc.close();\n\t\t\t\tc.fillAndStroke();\n\t\t\n\t\t\t\tc.begin();\n\t\t\t\tsc.moveSE(c, x, y, w, h, rectStyle, bottomRightStyle, size, right);\n\t\t\t\tsc.paintBottom(c, x, y, w, h, rectStyle, bottomLeftStyle, size, left);\n\t\t\t\tsc.lineSWInner(c, x, y, w, h, rectStyle, bottomLeftStyle, size, indent, left);\n\t\t\t\tsc.paintBottomInner(c, x, y, w, h, rectStyle, bottomRightStyle, size, indent, right, bottom);\n\t\t\t\tc.close();\n\t\t\t\tc.fillAndStroke();\n\t\t\t}\n\t\t}\n\t\telse if (top && !right && bottom && left)\n\t\t{\n\t\t\tif (rectOutline != 'frame')\n\t\t\t{\n\t\t\t\tc.begin();\n\t\t\t\tsc.moveSE(c, x, y, w, h, rectStyle, bottomRightStyle, size, right);\n\t\t\t\tsc.paintBottom(c, x, y, w, h, rectStyle, bottomLeftStyle, size, left);\n\t\t\t\tsc.paintSW(c, x, y, w, h, rectStyle, bottomLeftStyle, size, bottom);\n\t\t\t\tsc.paintLeft(c, x, y, w, h, rectStyle, topLeftStyle, size, top);\n\t\t\t\tsc.paintNW(c, x, y, w, h, rectStyle, topLeftStyle, size, left);\n\t\t\t\tsc.paintTop(c, x, y, w, h, rectStyle, topRightStyle, size, right);\n\t\t\n\t\t\t\tif (rectOutline == 'double')\n\t\t\t\t{\n\t\t\t\t\tsc.moveNEInner(c, x, y, w, h, rectStyle, topRightStyle, size, indent, right);\n\t\t\t\t\tsc.paintTopInner(c, x, y, w, h, rectStyle, topLeftStyle, size, indent, left, top);\n\t\t\t\t\tsc.paintNWInner(c, x, y, w, h, rectStyle, topLeftStyle, size, indent);\n\t\t\t\t\tsc.paintLeftInner(c, x, y, w, h, rectStyle, bottomLeftStyle, size, indent, bottom, left);\n\t\t\t\t\tsc.paintSWInner(c, x, y, w, h, rectStyle, bottomLeftStyle, size, indent, bottom);\n\t\t\t\t\tsc.paintBottomInner(c, x, y, w, h, rectStyle, bottomRightStyle, size, indent, right, bottom);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tc.stroke();\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tc.begin();\n\t\t\t\tsc.moveSE(c, x, y, w, h, rectStyle, bottomRightStyle, size, right);\n\t\t\t\tsc.paintBottom(c, x, y, w, h, rectStyle, bottomLeftStyle, size, left);\n\t\t\t\tsc.paintSW(c, x, y, w, h, rectStyle, bottomLeftStyle, size, bottom);\n\t\t\t\tsc.paintLeft(c, x, y, w, h, rectStyle, topLeftStyle, size, top);\n\t\t\t\tsc.paintNW(c, x, y, w, h, rectStyle, topLeftStyle, size, left);\n\t\t\t\tsc.paintTop(c, x, y, w, h, rectStyle, topRightStyle, size, right);\n\t\t\t\tsc.lineNEInner(c, x, y, w, h, rectStyle, topRightStyle, size, indent, right);\n\t\t\t\tsc.paintTopInner(c, x, y, w, h, rectStyle, topLeftStyle, size, indent, left, top);\n\t\t\t\tsc.paintNWInner(c, x, y, w, h, rectStyle, topLeftStyle, size, indent);\n\t\t\t\tsc.paintLeftInner(c, x, y, w, h, rectStyle, bottomLeftStyle, size, indent, bottom, left);\n\t\t\t\tsc.paintSWInner(c, x, y, w, h, rectStyle, bottomLeftStyle, size, indent, bottom);\n\t\t\t\tsc.paintBottomInner(c, x, y, w, h, rectStyle, bottomRightStyle, size, indent, right, bottom);\n\t\t\t\tc.close();\n\t\t\t\tc.fillAndStroke();\n\t\t\t}\n\t\t}\n\t\telse if (top && right && !bottom && !left)\n\t\t{\n\t\t\tif (rectOutline != 'frame')\n\t\t\t{\n\t\t\t\tc.begin();\n\t\t\t\tsc.moveNW(c, x, y, w, h, rectStyle, topLeftStyle, size, left);\n\t\t\t\tsc.paintTop(c, x, y, w, h, rectStyle, topRightStyle, size, right);\n\t\t\t\tsc.paintNE(c, x, y, w, h, rectStyle, topRightStyle, size, top);\n\t\t\t\tsc.paintRight(c, x, y, w, h, rectStyle, bottomRightStyle, size, bottom);\n\t\t\n\t\t\t\tif (rectOutline == 'double')\n\t\t\t\t{\n\t\t\t\t\tsc.moveSEInner(c, x, y, w, h, rectStyle, bottomRightStyle, size, indent, bottom);\n\t\t\t\t\tsc.paintRightInner(c, x, y, w, h, rectStyle, topRightStyle, size, indent, top, right);\n\t\t\t\t\tsc.paintNEInner(c, x, y, w, h, rectStyle, topRightStyle, size, indent);\n\t\t\t\t\tsc.paintTopInner(c, x, y, w, h, rectStyle, topLeftStyle, size, indent, left, top);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tc.stroke();\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tc.begin();\n\t\t\t\tsc.moveNW(c, x, y, w, h, rectStyle, topLeftStyle, size, left);\n\t\t\t\tsc.paintTop(c, x, y, w, h, rectStyle, topRightStyle, size, right);\n\t\t\t\tsc.paintNE(c, x, y, w, h, rectStyle, topRightStyle, size, top);\n\t\t\t\tsc.paintRight(c, x, y, w, h, rectStyle, bottomRightStyle, size, bottom);\n\t\t\t\tsc.lineSEInner(c, x, y, w, h, rectStyle, bottomRightStyle, size, indent, bottom);\n\t\t\t\tsc.paintRightInner(c, x, y, w, h, rectStyle, topRightStyle, size, indent, top, right);\n\t\t\t\tsc.paintNEInner(c, x, y, w, h, rectStyle, topRightStyle, size, indent);\n\t\t\t\tsc.paintTopInner(c, x, y, w, h, rectStyle, topLeftStyle, size, indent, left, top);\n\t\t\t\tc.close();\n\t\t\t\tc.fillAndStroke();\n\t\t\t}\n\t\t}\n\t\telse if (top && right && !bottom && left)\n\t\t{\n\t\t\tif (rectOutline != 'frame')\n\t\t\t{\n\t\t\t\tc.begin();\n\t\t\t\tsc.moveSW(c, x, y, w, h, rectStyle, bottomLeftStyle, size, bottom);\n\t\t\t\tsc.paintLeft(c, x, y, w, h, rectStyle, topLeftStyle, size, top);\n\t\t\t\tsc.paintNW(c, x, y, w, h, rectStyle, topLeftStyle, size, left);\n\t\t\t\tsc.paintTop(c, x, y, w, h, rectStyle, topRightStyle, size, right);\n\t\t\t\tsc.paintNE(c, x, y, w, h, rectStyle, topRightStyle, size, top);\n\t\t\t\tsc.paintRight(c, x, y, w, h, rectStyle, bottomRightStyle, size, bottom);\n\t\t\n\t\t\t\tif (rectOutline == 'double')\n\t\t\t\t{\n\t\t\t\t\tsc.moveSEInner(c, x, y, w, h, rectStyle, bottomRightStyle, size, indent, bottom);\n\t\t\t\t\tsc.paintRightInner(c, x, y, w, h, rectStyle, topRightStyle, size, indent, top, right);\n\t\t\t\t\tsc.paintNEInner(c, x, y, w, h, rectStyle, topRightStyle, size, indent);\n\t\t\t\t\tsc.paintTopInner(c, x, y, w, h, rectStyle, topLeftStyle, size, indent, left, top);\n\t\t\t\t\tsc.paintNWInner(c, x, y, w, h, rectStyle, topLeftStyle, size, indent);\n\t\t\t\t\tsc.paintLeftInner(c, x, y, w, h, rectStyle, bottomLeftStyle, size, indent, bottom, left);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tc.stroke();\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tc.begin();\n\t\t\t\tsc.moveSW(c, x, y, w, h, rectStyle, bottomLeftStyle, size, bottom);\n\t\t\t\tsc.paintLeft(c, x, y, w, h, rectStyle, topLeftStyle, size, top);\n\t\t\t\tsc.paintNW(c, x, y, w, h, rectStyle, topLeftStyle, size, left);\n\t\t\t\tsc.paintTop(c, x, y, w, h, rectStyle, topRightStyle, size, right);\n\t\t\t\tsc.paintNE(c, x, y, w, h, rectStyle, topRightStyle, size, top);\n\t\t\t\tsc.paintRight(c, x, y, w, h, rectStyle, bottomRightStyle, size, bottom);\n\t\t\t\tsc.lineSEInner(c, x, y, w, h, rectStyle, bottomRightStyle, size, indent, bottom);\n\t\t\t\tsc.paintRightInner(c, x, y, w, h, rectStyle, topRightStyle, size, indent, top, right);\n\t\t\t\tsc.paintNEInner(c, x, y, w, h, rectStyle, topRightStyle, size, indent);\n\t\t\t\tsc.paintTopInner(c, x, y, w, h, rectStyle, topLeftStyle, size, indent, left, top);\n\t\t\t\tsc.paintNWInner(c, x, y, w, h, rectStyle, topLeftStyle, size, indent);\n\t\t\t\tsc.paintLeftInner(c, x, y, w, h, rectStyle, bottomLeftStyle, size, indent, bottom, left);\n\t\t\t\tc.close();\n\t\t\t\tc.fillAndStroke();\n\t\t\t}\n\t\t}\n\t\telse if (top && right && bottom && !left)\n\t\t{\n\t\t\tif (rectOutline != 'frame')\n\t\t\t{\n\t\t\t\tc.begin();\n\t\t\t\tsc.moveNW(c, x, y, w, h, rectStyle, topLeftStyle, size, left);\n\t\t\t\tsc.paintTop(c, x, y, w, h, rectStyle, topRightStyle, size, right);\n\t\t\t\tsc.paintNE(c, x, y, w, h, rectStyle, topRightStyle, size, top);\n\t\t\t\tsc.paintRight(c, x, y, w, h, rectStyle, bottomRightStyle, size, bottom);\n\t\t\t\tsc.paintSE(c, x, y, w, h, rectStyle, bottomRightStyle, size, right);\n\t\t\t\tsc.paintBottom(c, x, y, w, h, rectStyle, bottomLeftStyle, size, left);\n\t\t\n\t\t\t\tif (rectOutline == 'double')\n\t\t\t\t{\n\t\t\t\t\tsc.moveSWInner(c, x, y, w, h, rectStyle, bottomLeftStyle, size, indent, left);\n\t\t\t\t\tsc.paintBottomInner(c, x, y, w, h, rectStyle, bottomRightStyle, size, indent, right, bottom);\n\t\t\t\t\tsc.paintSEInner(c, x, y, w, h, rectStyle, bottomRightStyle, size, indent);\n\t\t\t\t\tsc.paintRightInner(c, x, y, w, h, rectStyle, topRightStyle, size, indent, top, right);\n\t\t\t\t\tsc.paintNEInner(c, x, y, w, h, rectStyle, topRightStyle, size, indent);\n\t\t\t\t\tsc.paintTopInner(c, x, y, w, h, rectStyle, topLeftStyle, size, indent, left, top);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tc.stroke();\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tc.begin();\n\t\t\t\tsc.moveNW(c, x, y, w, h, rectStyle, topLeftStyle, size, left);\n\t\t\t\tsc.paintTop(c, x, y, w, h, rectStyle, topRightStyle, size, right);\n\t\t\t\tsc.paintNE(c, x, y, w, h, rectStyle, topRightStyle, size, top);\n\t\t\t\tsc.paintRight(c, x, y, w, h, rectStyle, bottomRightStyle, size, bottom);\n\t\t\t\tsc.paintSE(c, x, y, w, h, rectStyle, bottomRightStyle, size, right);\n\t\t\t\tsc.paintBottom(c, x, y, w, h, rectStyle, bottomLeftStyle, size, left);\n\t\t\t\tsc.lineSWInner(c, x, y, w, h, rectStyle, bottomLeftStyle, size, indent, left);\n\t\t\t\tsc.paintBottomInner(c, x, y, w, h, rectStyle, bottomRightStyle, size, indent, right, bottom);\n\t\t\t\tsc.paintSEInner(c, x, y, w, h, rectStyle, bottomRightStyle, size, indent);\n\t\t\t\tsc.paintRightInner(c, x, y, w, h, rectStyle, topRightStyle, size, indent, top, right);\n\t\t\t\tsc.paintNEInner(c, x, y, w, h, rectStyle, topRightStyle, size, indent);\n\t\t\t\tsc.paintTopInner(c, x, y, w, h, rectStyle, topLeftStyle, size, indent, left, top);\n\t\t\t\tc.close();\n\t\t\t\tc.fillAndStroke();\n\t\t\t}\n\t\t}\n\t\telse if (top && right && bottom && left)\n\t\t{\n\t\t\tif (rectOutline != 'frame')\n\t\t\t{\n\t\t\t\tc.begin();\n\t\t\t\tsc.moveNW(c, x, y, w, h, rectStyle, topLeftStyle, size, left);\n\t\t\t\tsc.paintNW(c, x, y, w, h, rectStyle, topLeftStyle, size, left);\n\t\t\t\tsc.paintTop(c, x, y, w, h, rectStyle, topRightStyle, size, right);\n\t\t\t\tsc.paintNE(c, x, y, w, h, rectStyle, topRightStyle, size, top);\n\t\t\t\tsc.paintRight(c, x, y, w, h, rectStyle, bottomRightStyle, size, bottom);\n\t\t\t\tsc.paintSE(c, x, y, w, h, rectStyle, bottomRightStyle, size, right);\n\t\t\t\tsc.paintBottom(c, x, y, w, h, rectStyle, bottomLeftStyle, size, left);\n\t\t\t\tsc.paintSW(c, x, y, w, h, rectStyle, bottomLeftStyle, size, bottom);\n\t\t\t\tsc.paintLeft(c, x, y, w, h, rectStyle, topLeftStyle, size, top);\n\t\t\t\tc.close();\n\t\t\t\t\n\t\t\t\tif (rectOutline == 'double')\n\t\t\t\t{\n\t\t\t\t\tsc.moveSWInner(c, x, y, w, h, rectStyle, bottomLeftStyle, size, indent, left);\n\t\t\t\t\tsc.paintSWInner(c, x, y, w, h, rectStyle, bottomLeftStyle, size, indent, bottom);\n\t\t\t\t\tsc.paintBottomInner(c, x, y, w, h, rectStyle, bottomRightStyle, size, indent, right, bottom);\n\t\t\t\t\tsc.paintSEInner(c, x, y, w, h, rectStyle, bottomRightStyle, size, indent);\n\t\t\t\t\tsc.paintRightInner(c, x, y, w, h, rectStyle, topRightStyle, size, indent, top, right);\n\t\t\t\t\tsc.paintNEInner(c, x, y, w, h, rectStyle, topRightStyle, size, indent);\n\t\t\t\t\tsc.paintTopInner(c, x, y, w, h, rectStyle, topLeftStyle, size, indent, left, top);\n\t\t\t\t\tsc.paintNWInner(c, x, y, w, h, rectStyle, topLeftStyle, size, indent);\n\t\t\t\t\tsc.paintLeftInner(c, x, y, w, h, rectStyle, bottomLeftStyle, size, indent, bottom, left);\n\t\t\t\t\tc.close();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tc.stroke();\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tc.begin();\n\t\t\t\tsc.moveNW(c, x, y, w, h, rectStyle, topLeftStyle, size, left);\n\t\t\t\tsc.paintNW(c, x, y, w, h, rectStyle, topLeftStyle, size, left);\n\t\t\t\tsc.paintTop(c, x, y, w, h, rectStyle, topRightStyle, size, right);\n\t\t\t\tsc.paintNE(c, x, y, w, h, rectStyle, topRightStyle, size, top);\n\t\t\t\tsc.paintRight(c, x, y, w, h, rectStyle, bottomRightStyle, size, bottom);\n\t\t\t\tsc.paintSE(c, x, y, w, h, rectStyle, bottomRightStyle, size, right);\n\t\t\t\tsc.paintBottom(c, x, y, w, h, rectStyle, bottomLeftStyle, size, left);\n\t\t\t\tsc.paintSW(c, x, y, w, h, rectStyle, bottomLeftStyle, size, bottom);\n\t\t\t\tsc.paintLeft(c, x, y, w, h, rectStyle, topLeftStyle, size, top);\n\t\t\t\tc.close();\n\t\t\t\tsc.moveSWInner(c, x, y, w, h, rectStyle, bottomLeftStyle, size, indent, left);\n\t\t\t\tsc.paintSWInner(c, x, y, w, h, rectStyle, bottomLeftStyle, size, indent, bottom);\n\t\t\t\tsc.paintBottomInner(c, x, y, w, h, rectStyle, bottomRightStyle, size, indent, right, bottom);\n\t\t\t\tsc.paintSEInner(c, x, y, w, h, rectStyle, bottomRightStyle, size, indent);\n\t\t\t\tsc.paintRightInner(c, x, y, w, h, rectStyle, topRightStyle, size, indent, top, right);\n\t\t\t\tsc.paintNEInner(c, x, y, w, h, rectStyle, topRightStyle, size, indent);\n\t\t\t\tsc.paintTopInner(c, x, y, w, h, rectStyle, topLeftStyle, size, indent, left, top);\n\t\t\t\tsc.paintNWInner(c, x, y, w, h, rectStyle, topLeftStyle, size, indent);\n\t\t\t\tsc.paintLeftInner(c, x, y, w, h, rectStyle, bottomLeftStyle, size, indent, bottom, left);\n\t\t\t\tc.close();\n\t\t\t\tc.fillAndStroke();\n\t\t\t}\n\t\t}\n\n\t\tc.begin();\n\t\tsc.paintFolds(c, x, y, w, h, rectStyle, topLeftStyle, topRightStyle, bottomRightStyle, bottomLeftStyle, size, top, right, bottom, left);\n\t\tc.stroke();\n\t};\n\n\tmxShapeBasicRect2.prototype.moveNW = function(c, x, y, w, h, rectStyle, topLeftStyle, size, left)\n\t{\n\t\tif((topLeftStyle == 'square' || (topLeftStyle == 'default' && rectStyle == 'square' )) || !left)\n\t\t{\n\t\t\tc.moveTo(0, 0);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tc.moveTo(0, size);\n\t\t}\n\t};\n\n\tmxShapeBasicRect2.prototype.moveNE = function(c, x, y, w, h, rectStyle, topRightStyle, size, top)\n\t{\n\t\tif((topRightStyle == 'square' || (topRightStyle == 'default' && rectStyle == 'square' )) || !top)\n\t\t{\n\t\t\tc.moveTo(w, 0);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tc.moveTo(w - size, 0);\n\t\t}\n\t};\n\n\tmxShapeBasicRect2.prototype.moveSE = function(c, x, y, w, h, rectStyle, bottomRightStyle, size, right)\n\t{\n\t\tif((bottomRightStyle == 'square' || (bottomRightStyle == 'default' && rectStyle == 'square' )) || !right)\n\t\t{\n\t\t\tc.moveTo(w, h);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tc.moveTo(w, h - size);\n\t\t}\n\t};\n\n\tmxShapeBasicRect2.prototype.moveSW = function(c, x, y, w, h, rectStyle, bottomLeftStyle, size, bottom)\n\t{\n\t\tif((bottomLeftStyle == 'square' || (bottomLeftStyle == 'default' && rectStyle == 'square' )) || !bottom)\n\t\t{\n\t\t\tc.moveTo(0, h);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tc.moveTo(size, h);\n\t\t}\n\t};\n\n\tmxShapeBasicRect2.prototype.paintNW = function(c, x, y, w, h, rectStyle, topLeftStyle, size, left)\n\t{\n\t\tif (!left)\n\t\t{\n\t\t\tc.lineTo(0, 0);\n\t\t}\n\t\telse if((topLeftStyle == 'rounded' || (topLeftStyle == 'default' && rectStyle == 'rounded' )) ||\n\t\t\t\t(topLeftStyle == 'invRound' || (topLeftStyle == 'default' && rectStyle == 'invRound' )) )\n\t\t{\n\t\t\tvar inv = 0;\n\t\t\t\n\t\t\tif (topLeftStyle == 'rounded' || (topLeftStyle == 'default' && rectStyle == 'rounded' ))\n\t\t\t{\n\t\t\t\tinv = 1;\n\t\t\t}\n\t\t\t\n\t\t\tc.arcTo(size, size, 0, 0, inv, size, 0);\n\t\t}\n\t\telse if((topLeftStyle == 'snip' || (topLeftStyle == 'default' && rectStyle == 'snip' )) ||\n\t\t\t\t(topLeftStyle == 'fold' || (topLeftStyle == 'default' && rectStyle == 'fold' )))\n\t\t{\n\t\t\tc.lineTo(size, 0);\n\t\t}\n\t};\n\n\tmxShapeBasicRect2.prototype.paintTop = function(c, x, y, w, h, rectStyle, topRightStyle, size, right)\n\t{\n\t\tif((topRightStyle == 'square' || (topRightStyle == 'default' && rectStyle == 'square' )) || !right)\n\t\t{\n\t\t\tc.lineTo(w, 0);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tc.lineTo(w - size, 0);\n\t\t}\n\t};\n\n\tmxShapeBasicRect2.prototype.paintNE = function(c, x, y, w, h, rectStyle, topRightStyle, size, top)\n\t{\n\t\tif (!top)\n\t\t{\n\t\t\tc.lineTo(w, 0);\n\t\t}\n\t\telse if((topRightStyle == 'rounded' || (topRightStyle == 'default' && rectStyle == 'rounded' )) ||\n\t\t\t\t(topRightStyle == 'invRound' || (topRightStyle == 'default' && rectStyle == 'invRound' )) )\n\t\t{\n\t\t\tvar inv = 0;\n\t\t\t\n\t\t\tif (topRightStyle == 'rounded' || (topRightStyle == 'default' && rectStyle == 'rounded' ))\n\t\t\t{\n\t\t\t\tinv = 1;\n\t\t\t}\n\t\t\t\n\t\t\tc.arcTo(size, size, 0, 0, inv, w, size);\n\t\t}\n\t\telse if((topRightStyle == 'snip' || (topRightStyle == 'default' && rectStyle == 'snip' )) ||\n\t\t\t\t(topRightStyle == 'fold' || (topRightStyle == 'default' && rectStyle == 'fold' )))\n\t\t{\n\t\t\tc.lineTo(w, size);\n\t\t}\n\t};\n\n\tmxShapeBasicRect2.prototype.paintRight = function(c, x, y, w, h, rectStyle, bottomRightStyle, size, bottom)\n\t{\n\t\tif((bottomRightStyle == 'square' || (bottomRightStyle == 'default' && rectStyle == 'square' )) || !bottom)\n\t\t{\n\t\t\tc.lineTo(w, h);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tc.lineTo(w, h - size);\n\t\t}\n\t};\n\n\tmxShapeBasicRect2.prototype.paintLeft = function(c, x, y, w, h, rectStyle, topLeftStyle, size, top)\n\t{\n\t\tif((topLeftStyle == 'square' || (topLeftStyle == 'default' && rectStyle == 'square' )) || !top)\n\t\t{\n\t\t\tc.lineTo(0, 0);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tc.lineTo(0, size);\n\t\t}\n\t};\n\n\tmxShapeBasicRect2.prototype.paintSE = function(c, x, y, w, h, rectStyle, bottomRightStyle, size, right)\n\t{\n\t\tif (!right)\n\t\t{\n\t\t\tc.lineTo(w, h);\n\t\t}\n\t\telse if((bottomRightStyle == 'rounded' || (bottomRightStyle == 'default' && rectStyle == 'rounded' )) ||\n\t\t\t\t(bottomRightStyle == 'invRound' || (bottomRightStyle == 'default' && rectStyle == 'invRound' )) )\n\t\t{\n\t\t\tvar inv = 0;\n\t\t\t\n\t\t\tif (bottomRightStyle == 'rounded' || (bottomRightStyle == 'default' && rectStyle == 'rounded' ))\n\t\t\t{\n\t\t\t\tinv = 1;\n\t\t\t}\n\t\t\t\n\t\t\tc.arcTo(size, size, 0, 0, inv, w - size, h);\n\t\t}\n\t\telse if((bottomRightStyle == 'snip' || (bottomRightStyle == 'default' && rectStyle == 'snip' )) ||\n\t\t\t\t(bottomRightStyle == 'fold' || (bottomRightStyle == 'default' && rectStyle == 'fold' )))\n\t\t{\n\t\t\tc.lineTo(w - size, h);\n\t\t}\n\t};\n\n\tmxShapeBasicRect2.prototype.paintBottom = function(c, x, y, w, h, rectStyle, bottomLeftStyle, size, left)\n\t{\n\t\tif((bottomLeftStyle == 'square' || (bottomLeftStyle == 'default' && rectStyle == 'square' )) || !left)\n\t\t{\n\t\t\tc.lineTo(0, h);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tc.lineTo(size, h);\n\t\t}\n\t};\n\n\tmxShapeBasicRect2.prototype.paintSW = function(c, x, y, w, h, rectStyle, bottomLeftStyle, size, bottom)\n\t{\n\t\tif (!bottom)\n\t\t{\n\t\t\tc.lineTo(0, h);\n\t\t}\n\t\telse if((bottomLeftStyle == 'rounded' || (bottomLeftStyle == 'default' && rectStyle == 'rounded' )) ||\n\t\t\t\t(bottomLeftStyle == 'invRound' || (bottomLeftStyle == 'default' && rectStyle == 'invRound' )) )\n\t\t{\n\t\t\tvar inv = 0;\n\t\t\t\n\t\t\tif (bottomLeftStyle == 'rounded' || (bottomLeftStyle == 'default' && rectStyle == 'rounded' ))\n\t\t\t{\n\t\t\t\tinv = 1;\n\t\t\t}\n\t\t\t\n\t\t\tc.arcTo(size, size, 0, 0, inv, 0, h - size);\n\t\t}\n\t\telse if((bottomLeftStyle == 'snip' || (bottomLeftStyle == 'default' && rectStyle == 'snip' )) ||\n\t\t\t\t(bottomLeftStyle == 'fold' || (bottomLeftStyle == 'default' && rectStyle == 'fold' )))\n\t\t{\n\t\t\tc.lineTo(0, h - size);\n\t\t}\n\t};\n\n\tmxShapeBasicRect2.prototype.paintNWInner = function(c, x, y, w, h, rectStyle, topLeftStyle, size, indent)\n\t{\n\t\tif(topLeftStyle == 'rounded' || (topLeftStyle == 'default' && rectStyle == 'rounded' ))\n\t\t{\n\t\t\tc.arcTo(size - indent * 0.5, size - indent * 0.5, 0, 0, 0, indent, indent * 0.5 + size);\n\t\t}\n\t\telse if(topLeftStyle == 'invRound' || (topLeftStyle == 'default' && rectStyle == 'invRound' ))\n\t\t{\n\t\t\tc.arcTo(size + indent, size + indent, 0, 0, 1, indent, indent + size);\n\t\t}\n\t\telse if(topLeftStyle == 'snip' || (topLeftStyle == 'default' && rectStyle == 'snip' ))\n\t\t{\n\t\t\tc.lineTo(indent, indent * 0.5 + size);\n\t\t}\n\t\telse if(topLeftStyle == 'fold' || (topLeftStyle == 'default' && rectStyle == 'fold' ))\n\t\t{\n\t\t\tc.lineTo(indent + size, indent + size);\n\t\t\tc.lineTo(indent, indent + size);\n\t\t}\n\t};\n\n\tmxShapeBasicRect2.prototype.paintTopInner = function(c, x, y, w, h, rectStyle, topLeftStyle, size, indent, left, top)\n\t{\n\t\tif (!left && !top)\n\t\t{\n\t\t\tc.lineTo(0, 0);\n\t\t}\n\t\telse if (!left && top)\n\t\t{\n\t\t\tc.lineTo(0, indent);\n\t\t}\n\t\telse if (left && !top)\n\t\t{\n\t\t\tc.lineTo(indent, 0);\n\t\t}\n\t\telse if (!left)\n\t\t{\n\t\t\tc.lineTo(0, indent);\n\t\t}\n\t\telse if(topLeftStyle == 'square' || (topLeftStyle == 'default' && rectStyle == 'square' ))\n\t\t{\n\t\t\tc.lineTo(indent, indent);\n\t\t}\n\t\telse if((topLeftStyle == 'rounded' || (topLeftStyle == 'default' && rectStyle == 'rounded' )) ||\n\t\t\t\t(topLeftStyle == 'snip' || (topLeftStyle == 'default' && rectStyle == 'snip' )))\n\t\t{\n\t\t\tc.lineTo(size + indent * 0.5, indent);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tc.lineTo(size + indent, indent);\n\t\t}\n\t};\n\n\tmxShapeBasicRect2.prototype.paintNEInner = function(c, x, y, w, h, rectStyle, topRightStyle, size, indent)\n\t{\n\t\tif(topRightStyle == 'rounded' || (topRightStyle == 'default' && rectStyle == 'rounded' ))\n\t\t{\n\t\t\tc.arcTo(size - indent * 0.5, size - indent * 0.5, 0, 0, 0, w - size - indent * 0.5, indent);\n\t\t}\n\t\telse if(topRightStyle == 'invRound' || (topRightStyle == 'default' && rectStyle == 'invRound' ))\n\t\t{\n\t\t\tc.arcTo(size + indent, size + indent, 0, 0, 1, w - size - indent, indent);\n\t\t}\n\t\telse if(topRightStyle == 'snip' || (topRightStyle == 'default' && rectStyle == 'snip' ))\n\t\t{\n\t\t\tc.lineTo(w - size - indent * 0.5, indent);\n\t\t}\n\t\telse if(topRightStyle == 'fold' || (topRightStyle == 'default' && rectStyle == 'fold' ))\n\t\t{\n\t\t\tc.lineTo(w - size - indent, size + indent);\n\t\t\tc.lineTo(w - size - indent, indent);\n\t\t}\n\t};\n\n\tmxShapeBasicRect2.prototype.paintRightInner = function(c, x, y, w, h, rectStyle, topRightStyle, size, indent, top, right)\n\t{\n\t\tif (!top && !right)\n\t\t{\n\t\t\tc.lineTo(w, 0);\n\t\t}\n\t\telse if (!top && right)\n\t\t{\n\t\t\tc.lineTo(w - indent, 0);\n\t\t}\n\t\telse if (top && !right)\n\t\t{\n\t\t\tc.lineTo(w, indent);\n\t\t}\n\t\telse if (!top)\n\t\t{\n\t\t\tc.lineTo(w - indent, 0);\n\t\t}\n\t\telse if(topRightStyle == 'square' || (topRightStyle == 'default' && rectStyle == 'square' ))\n\t\t{\n\t\t\tc.lineTo(w - indent, indent);\n\t\t}\n\t\telse if((topRightStyle == 'rounded' || (topRightStyle == 'default' && rectStyle == 'rounded' )) ||\n\t\t\t\t(topRightStyle == 'snip' || (topRightStyle == 'default' && rectStyle == 'snip' )))\n\t\t{\n\t\t\tc.lineTo(w - indent, size + indent * 0.5);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tc.lineTo(w - indent, size + indent);\n\t\t}\n\t};\n\n\tmxShapeBasicRect2.prototype.paintLeftInner = function(c, x, y, w, h, rectStyle, bottomLeftStyle, size, indent, bottom, left)\n\t{\n\t\tif (!bottom && !left)\n\t\t{\n\t\t\tc.lineTo(0, h);\n\t\t}\n\t\telse if (!bottom && left)\n\t\t{\n\t\t\tc.lineTo(indent, h);\n\t\t}\n\t\telse if (bottom && !left)\n\t\t{\n\t\t\tc.lineTo(0, h - indent);\n\t\t}\n\t\telse if (!bottom)\n\t\t{\n\t\t\tc.lineTo(indent, h);\n\t\t}\n\t\telse if(bottomLeftStyle == 'square' || (bottomLeftStyle == 'default' && rectStyle == 'square' ))\n\t\t{\n\t\t\tc.lineTo(indent, h - indent);\n\t\t}\n\t\telse if((bottomLeftStyle == 'rounded' || (bottomLeftStyle == 'default' && rectStyle == 'rounded' )) ||\n\t\t\t\t(bottomLeftStyle == 'snip' || (bottomLeftStyle == 'default' && rectStyle == 'snip' )))\n\t\t{\n\t\t\tc.lineTo(indent, h - size - indent * 0.5);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tc.lineTo(indent, h - size - indent);\n\t\t}\n\t};\n\n\tmxShapeBasicRect2.prototype.paintSEInner = function(c, x, y, w, h, rectStyle, bottomRightStyle, size, indent)\n\t{\n\t\tif(bottomRightStyle == 'rounded' || (bottomRightStyle == 'default' && rectStyle == 'rounded' ))\n\t\t{\n\t\t\tc.arcTo(size - indent * 0.5, size - indent * 0.5, 0, 0, 0, w - indent, h - size - indent * 0.5);\n\t\t}\n\t\telse if(bottomRightStyle == 'invRound' || (bottomRightStyle == 'default' && rectStyle == 'invRound' ))\n\t\t{\n\t\t\tc.arcTo(size + indent, size + indent, 0, 0, 1, w - indent, h - size - indent);\n\t\t}\n\t\telse if(bottomRightStyle == 'snip' || (bottomRightStyle == 'default' && rectStyle == 'snip' ))\n\t\t{\n\t\t\tc.lineTo(w - indent, h - size - indent * 0.5);\n\t\t}\n\t\telse if(bottomRightStyle == 'fold' || (bottomRightStyle == 'default' && rectStyle == 'fold' ))\n\t\t{\n\t\t\tc.lineTo(w - size - indent, h - size - indent);\n\t\t\tc.lineTo(w - indent, h - size - indent);\n\t\t}\n\t};\n\n\tmxShapeBasicRect2.prototype.paintBottomInner = function(c, x, y, w, h, rectStyle, bottomRightStyle, size, indent, right, bottom)\n\t{\n\t\tif (!right && !bottom)\n\t\t{\n\t\t\tc.lineTo(w, h);\n\t\t}\n\t\telse if (!right && bottom)\n\t\t{\n\t\t\tc.lineTo(w, h - indent);\n\t\t}\n\t\telse if (right && !bottom)\n\t\t{\n\t\t\tc.lineTo(w - indent, h);\n\t\t}\n\t\telse if((bottomRightStyle == 'square' || (bottomRightStyle == 'default' && rectStyle == 'square' )) || !right)\n\t\t{\n\t\t\tc.lineTo(w - indent, h - indent);\n\t\t}\n\t\telse if((bottomRightStyle == 'rounded' || (bottomRightStyle == 'default' && rectStyle == 'rounded' )) ||\n\t\t\t\t(bottomRightStyle == 'snip' || (bottomRightStyle == 'default' && rectStyle == 'snip' )))\n\t\t{\n\t\t\tc.lineTo(w - size - indent * 0.5, h - indent);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tc.lineTo(w - size - indent, h - indent);\n\t\t}\n\t};\n\n\tmxShapeBasicRect2.prototype.paintSWInner = function(c, x, y, w, h, rectStyle, bottomLeftStyle, size, indent, bottom)\n\t{\n\t\tif (!bottom)\n\t\t{\n\t\t\tc.lineTo(indent, h);\n\t\t}\n\t\telse if(bottomLeftStyle == 'square' || (bottomLeftStyle == 'default' && rectStyle == 'square' ))\n\t\t{\n\t\t\tc.lineTo(indent, h - indent);\n\t\t}\n\t\telse if(bottomLeftStyle == 'rounded' || (bottomLeftStyle == 'default' && rectStyle == 'rounded' ))\n\t\t{\n\t\t\tc.arcTo(size - indent * 0.5, size - indent * 0.5, 0, 0, 0, size + indent * 0.5, h - indent);\n\t\t}\n\t\telse if(bottomLeftStyle == 'invRound' || (bottomLeftStyle == 'default' && rectStyle == 'invRound' ))\n\t\t{\n\t\t\tc.arcTo(size + indent, size + indent, 0, 0, 1, size + indent, h - indent);\n\t\t}\n\t\telse if(bottomLeftStyle == 'snip' || (bottomLeftStyle == 'default' && rectStyle == 'snip' ))\n\t\t{\n\t\t\tc.lineTo(size + indent * 0.5, h - indent);\n\t\t}\n\t\telse if(bottomLeftStyle == 'fold' || (bottomLeftStyle == 'default' && rectStyle == 'fold' ))\n\t\t{\n\t\t\tc.lineTo(indent + size, h - size - indent);\n\t\t\tc.lineTo(indent + size, h - indent);\n\t\t}\n\t};\n\n\tmxShapeBasicRect2.prototype.moveSWInner = function(c, x, y, w, h, rectStyle, bottomLeftStyle, size, indent, left)\n\t{\n\t\tif (!left)\n\t\t{\n\t\t\tc.moveTo(0, h - indent);\n\t\t}\n\t\telse if(bottomLeftStyle == 'square' || (bottomLeftStyle == 'default' && rectStyle == 'square' ))\n\t\t{\n\t\t\tc.moveTo(indent, h - indent);\n\t\t}\n\t\telse if((bottomLeftStyle == 'rounded' || (bottomLeftStyle == 'default' && rectStyle == 'rounded' )) ||\n\t\t\t\t(bottomLeftStyle == 'snip' || (bottomLeftStyle == 'default' && rectStyle == 'snip' )))\n\t\t{\n\t\t\tc.moveTo(indent, h - size - indent * 0.5);\n\t\t}\n\t\telse if((bottomLeftStyle == 'invRound' || (bottomLeftStyle == 'default' && rectStyle == 'invRound' )) ||\n\t\t\t\t(bottomLeftStyle == 'fold' || (bottomLeftStyle == 'default' && rectStyle == 'fold' )))\n\t\t{\n\t\t\tc.moveTo(indent, h - size - indent);\n\t\t}\n\t};\n\n\tmxShapeBasicRect2.prototype.lineSWInner = function(c, x, y, w, h, rectStyle, bottomLeftStyle, size, indent, left)\n\t{\n\t\tif (!left)\n\t\t{\n\t\t\tc.lineTo(0, h - indent);\n\t\t}\n\t\telse if(bottomLeftStyle == 'square' || (bottomLeftStyle == 'default' && rectStyle == 'square' ))\n\t\t{\n\t\t\tc.lineTo(indent, h - indent);\n\t\t}\n\t\telse if((bottomLeftStyle == 'rounded' || (bottomLeftStyle == 'default' && rectStyle == 'rounded' )) ||\n\t\t\t\t(bottomLeftStyle == 'snip' || (bottomLeftStyle == 'default' && rectStyle == 'snip' )))\n\t\t{\n\t\t\tc.lineTo(indent, h - size - indent * 0.5);\n\t\t}\n\t\telse if((bottomLeftStyle == 'invRound' || (bottomLeftStyle == 'default' && rectStyle == 'invRound' )) ||\n\t\t\t\t(bottomLeftStyle == 'fold' || (bottomLeftStyle == 'default' && rectStyle == 'fold' )))\n\t\t{\n\t\t\t\tc.lineTo(indent, h - size - indent);\n\t\t}\n\t};\n\n\tmxShapeBasicRect2.prototype.moveSEInner = function(c, x, y, w, h, rectStyle, bottomRightStyle, size, indent, bottom)\n\t{\n\t\tif (!bottom)\n\t\t{\n\t\t\tc.moveTo(w - indent, h);\n\t\t}\n\t\telse if(bottomRightStyle == 'square' || (bottomRightStyle == 'default' && rectStyle == 'square' ))\n\t\t{\n\t\t\tc.moveTo(w - indent, h - indent);\n\t\t}\n\t\telse if((bottomRightStyle == 'rounded' || (bottomRightStyle == 'default' && rectStyle == 'rounded' )) ||\n\t\t\t\t(bottomRightStyle == 'snip' || (bottomRightStyle == 'default' && rectStyle == 'snip' )))\n\t\t{\n\t\t\tc.moveTo(w - indent, h - size - indent * 0.5);\n\t\t}\n\t\telse if((bottomRightStyle == 'invRound' || (bottomRightStyle == 'default' && rectStyle == 'invRound' )) ||\n\t\t\t\t(bottomRightStyle == 'fold' || (bottomRightStyle == 'default' && rectStyle == 'fold' )))\n\t\t{\n\t\t\tc.moveTo(w - indent, h - size - indent);\n\t\t}\n\t};\n\n\tmxShapeBasicRect2.prototype.lineSEInner = function(c, x, y, w, h, rectStyle, bottomRightStyle, size, indent, bottom)\n\t{\n\t\tif (!bottom)\n\t\t{\n\t\t\tc.lineTo(w - indent, h);\n\t\t}\n\t\telse if(bottomRightStyle == 'square' || (bottomRightStyle == 'default' && rectStyle == 'square' ))\n\t\t{\n\t\t\tc.lineTo(w - indent, h - indent);\n\t\t}\n\t\telse if((bottomRightStyle == 'rounded' || (bottomRightStyle == 'default' && rectStyle == 'rounded' )) ||\n\t\t\t\t(bottomRightStyle == 'snip' || (bottomRightStyle == 'default' && rectStyle == 'snip' )))\n\t\t{\n\t\t\tc.lineTo(w - indent, h - size - indent * 0.5);\n\t\t}\n\t\telse if((bottomRightStyle == 'invRound' || (bottomRightStyle == 'default' && rectStyle == 'invRound' )) ||\n\t\t\t\t(bottomRightStyle == 'fold' || (bottomRightStyle == 'default' && rectStyle == 'fold' )))\n\t\t{\n\t\t\tc.lineTo(w - indent, h - size - indent);\n\t\t}\n\t};\n\n\tmxShapeBasicRect2.prototype.moveNEInner = function(c, x, y, w, h, rectStyle, topRightStyle, size, indent, right)\n\t{\n\t\tif (!right)\n\t\t{\n\t\t\tc.moveTo(w, indent);\n\t\t}\n\t\telse if((topRightStyle == 'square' || (topRightStyle == 'default' && rectStyle == 'square' )) || right)\n\t\t{\n\t\t\tc.moveTo(w - indent, indent);\n\t\t}\n\t\telse if((topRightStyle == 'rounded' || (topRightStyle == 'default' && rectStyle == 'rounded' )) ||\n\t\t\t\t(topRightStyle == 'snip' || (topRightStyle == 'default' && rectStyle == 'snip' )))\n\t\t{\n\t\t\tc.moveTo(w - indent, size + indent * 0.5);\n\t\t}\n\t\telse if((topRightStyle == 'invRound' || (topRightStyle == 'default' && rectStyle == 'invRound' )) ||\n\t\t\t\t(topRightStyle == 'fold' || (topRightStyle == 'default' && rectStyle == 'fold' )))\n\t\t{\n\t\t\tc.moveTo(w - indent, size + indent);\n\t\t}\n\t};\n\n\tmxShapeBasicRect2.prototype.lineNEInner = function(c, x, y, w, h, rectStyle, topRightStyle, size, indent, right)\n\t{\n\t\tif (!right)\n\t\t{\n\t\t\tc.lineTo(w, indent);\n\t\t}\n\t\telse if((topRightStyle == 'square' || (topRightStyle == 'default' && rectStyle == 'square' )) || right)\n\t\t{\n\t\t\tc.lineTo(w - indent, indent);\n\t\t}\n\t\telse if((topRightStyle == 'rounded' || (topRightStyle == 'default' && rectStyle == 'rounded' )) ||\n\t\t\t\t(topRightStyle == 'snip' || (topRightStyle == 'default' && rectStyle == 'snip' )))\n\t\t{\n\t\t\tc.lineTo(w - indent, size + indent * 0.5);\n\t\t}\n\t\telse if((topRightStyle == 'invRound' || (topRightStyle == 'default' && rectStyle == 'invRound' )) ||\n\t\t\t\t(topRightStyle == 'fold' || (topRightStyle == 'default' && rectStyle == 'fold' )))\n\t\t{\n\t\t\tc.lineTo(w - indent, size + indent);\n\t\t}\n\t};\n\n\tmxShapeBasicRect2.prototype.moveNWInner = function(c, x, y, w, h, rectStyle, topLeftStyle, size, indent, top, left)\n\t{\n\t\tif (!top && !left)\n\t\t{\n\t\t\tc.moveTo(0, 0);\n\t\t}\n\t\telse if (!top && left)\n\t\t{\n\t\t\tc.moveTo(indent, 0);\n\t\t}\n\t\telse if (top && !left)\n\t\t{\n\t\t\tc.moveTo(0, indent);\n\t\t}\n\t\telse if(topLeftStyle == 'square' || (topLeftStyle == 'default' && rectStyle == 'square' ))\n\t\t{\n\t\t\tc.moveTo(indent, indent);\n\t\t}\n\t\telse if((topLeftStyle == 'rounded' || (topLeftStyle == 'default' && rectStyle == 'rounded' )) ||\n\t\t\t\t(topLeftStyle == 'snip' || (topLeftStyle == 'default' && rectStyle == 'snip' )))\n\t\t{\n\t\t\tc.moveTo(indent, size + indent * 0.5);\n\t\t}\n\t\telse if((topLeftStyle == 'invRound' || (topLeftStyle == 'default' && rectStyle == 'invRound' )) ||\n\t\t\t\t(topLeftStyle == 'fold' || (topLeftStyle == 'default' && rectStyle == 'fold' )))\n\t\t{\n\t\t\tc.moveTo(indent, size + indent);\n\t\t}\n\t};\n\n\tmxShapeBasicRect2.prototype.lineNWInner = function(c, x, y, w, h, rectStyle, topLeftStyle, size, indent, top, left)\n\t{\n\t\tif (!top && !left)\n\t\t{\n\t\t\tc.lineTo(0, 0);\n\t\t}\n\t\telse if (!top && left)\n\t\t{\n\t\t\tc.lineTo(indent, 0);\n\t\t}\n\t\telse if (top && !left)\n\t\t{\n\t\t\tc.lineTo(0, indent);\n\t\t}\n\t\telse if(topLeftStyle == 'square' || (topLeftStyle == 'default' && rectStyle == 'square' ))\n\t\t{\n\t\t\tc.lineTo(indent, indent);\n\t\t}\n\t\telse if((topLeftStyle == 'rounded' || (topLeftStyle == 'default' && rectStyle == 'rounded' )) ||\n\t\t\t\t(topLeftStyle == 'snip' || (topLeftStyle == 'default' && rectStyle == 'snip' )))\n\t\t{\n\t\t\tc.lineTo(indent, size + indent * 0.5);\n\t\t}\n\t\telse if((topLeftStyle == 'invRound' || (topLeftStyle == 'default' && rectStyle == 'invRound' )) ||\n\t\t\t\t(topLeftStyle == 'fold' || (topLeftStyle == 'default' && rectStyle == 'fold' )))\n\t\t{\n\t\t\tc.lineTo(indent, size + indent);\n\t\t}\n\t};\n\n\tmxShapeBasicRect2.prototype.paintFolds = function(c, x, y, w, h, rectStyle, topLeftStyle, topRightStyle, bottomRightStyle, bottomLeftStyle, size, top, right, bottom, left)\n\t{\n\t\tif (rectStyle == 'fold' || topLeftStyle == 'fold' || topRightStyle == 'fold' || bottomRightStyle == 'fold' || bottomLeftStyle == 'fold')\n\t\t{\n\t\t\tif ((topLeftStyle == 'fold' || (topLeftStyle == 'default' && rectStyle == 'fold' )) && (top && left))\n\t\t\t{\n\t\t\t\tc.moveTo(0, size);\n\t\t\t\tc.lineTo(size, size);\n\t\t\t\tc.lineTo(size, 0);\n\t\t\t}\n\t\t\t\n\t\t\tif ((topRightStyle == 'fold' || (topRightStyle == 'default' && rectStyle == 'fold' )) && (top && right))\n\t\t\t{\n\t\t\t\tc.moveTo(w - size, 0);\n\t\t\t\tc.lineTo(w - size, size);\n\t\t\t\tc.lineTo(w, size);\n\t\t\t}\n\t\t\t\n\t\t\tif ((bottomRightStyle == 'fold' || (bottomRightStyle == 'default' && rectStyle == 'fold' )) && (bottom && right))\n\t\t\t{\n\t\t\t\tc.moveTo(w - size, h);\n\t\t\t\tc.lineTo(w - size, h - size);\n\t\t\t\tc.lineTo(w, h - size);\n\t\t\t}\n\t\t\t\n\t\t\tif ((bottomLeftStyle == 'fold' || (bottomLeftStyle == 'default' && rectStyle == 'fold' )) && (bottom && left))\n\t\t\t{\n\t\t\t\tc.moveTo(0, h - size);\n\t\t\t\tc.lineTo(size, h - size);\n\t\t\t\tc.lineTo(size, h);\n\t\t\t}\n\t\t}\n\t};\n\n\tmxCellRenderer.registerShape(mxShapeBasicRect2.prototype.cst.RECT2, mxShapeBasicRect2);\n\n\tmxShapeBasicRect2.prototype.constraints = null;\n\n\t// FilledEdge shape\n\tfunction FilledEdge()\n\t{\n\t\tmxConnector.call(this);\n\t};\n\tmxUtils.extend(FilledEdge, mxConnector);\n\t\n\tFilledEdge.prototype.origPaintEdgeShape = FilledEdge.prototype.paintEdgeShape;\n\tFilledEdge.prototype.paintEdgeShape = function(c, pts, rounded)\n\t{\n\t\t// Markers modify incoming points array\n\t\tvar temp = [];\n\t\t\n\t\tfor (var i = 0; i < pts.length; i++)\n\t\t{\n\t\t\ttemp.push(mxUtils.clone(pts[i]));\n\t\t}\n\t\t\n\t\t// paintEdgeShape resets dashed to false\n\t\tvar dashed = c.state.dashed;\n\t\tvar fixDash = c.state.fixDash;\n\t\tFilledEdge.prototype.origPaintEdgeShape.apply(this, [c, temp, rounded]);\n\n\t\tif (c.state.strokeWidth >= 3)\n\t\t{\n\t\t\tvar fillClr = mxUtils.getValue(this.style, 'fillColor', null);\n\t\t\t\n\t\t\tif (fillClr != null)\n\t\t\t{\n\t\t\t\tc.setStrokeColor(fillClr);\n\t\t\t\tc.setStrokeWidth(c.state.strokeWidth - 2);\n\t\t\t\tc.setDashed(dashed, fixDash);\n\t\t\t\t\n\t\t\t\tFilledEdge.prototype.origPaintEdgeShape.apply(this, [c, pts, rounded]);\n\t\t\t}\n\t\t}\n\t};\n\n\t// Registers the link shape\n\tmxCellRenderer.registerShape('filledEdge', FilledEdge);\n\n\t// Implements custom colors for shapes\n\tif (typeof StyleFormatPanel !== 'undefined')\n\t{\n\t\t(function()\n\t\t{\n\t\t\tvar styleFormatPanelGetCustomColors = StyleFormatPanel.prototype.getCustomColors;\n\t\t\t\n\t\t\tStyleFormatPanel.prototype.getCustomColors = function()\n\t\t\t{\n\t\t\t\tvar ss = this.editorUi.getSelectionState();\n\t\t\t\tvar result = styleFormatPanelGetCustomColors.apply(this, arguments);\n\t\t\t\t\n\t\t\t\tif (ss.style.shape == 'umlFrame')\n\t\t\t\t{\n\t\t\t\t\tresult.push({title: mxResources.get('laneColor'),\n\t\t\t\t\t\tkey: 'swimlaneFillColor',\n\t\t\t\t\t\tdefaultValue: 'default'});\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\treturn result;\n\t\t\t};\n\t\t})();\n\t}\n\t\n\t// Registers and defines the custom marker\n\tmxMarker.addMarker('dash', function(c, shape, type, pe, unitX, unitY, size, source, sw, filled)\n\t{\n\t\tvar nx = unitX * (size + sw + 1);\n\t\tvar ny = unitY * (size + sw + 1);\n\n\t\treturn function()\n\t\t{\n\t\t\tc.begin();\n\t\t\tc.moveTo(pe.x - nx / 2 - ny / 2, pe.y - ny / 2 + nx / 2);\n\t\t\tc.lineTo(pe.x + ny / 2 - 3 * nx / 2, pe.y - 3 * ny / 2 - nx / 2);\n\t\t\tc.stroke();\n\t\t};\n\t});\n\n\t// Registers and defines the custom marker\n\tmxMarker.addMarker('box', function(c, shape, type, pe, unitX, unitY, size, source, sw, filled)\n\t{\n\t\tvar nx = unitX * (size + sw + 1);\n\t\tvar ny = unitY * (size + sw + 1);\n\t\tvar px = pe.x + nx / 2;\n\t\tvar py = pe.y + ny / 2;\n\t\t\n\t\tpe.x -= nx;\n\t\tpe.y -= ny;\n\n\t\treturn function()\n\t\t{\n\t\t\tc.begin();\n\t\t\tc.moveTo(px - nx / 2 - ny / 2, py - ny / 2 + nx / 2);\n\t\t\tc.lineTo(px - nx / 2 + ny / 2, py - ny / 2 - nx / 2);\n\t\t\tc.lineTo(px + ny / 2 - 3 * nx / 2, py - 3 * ny / 2 - nx / 2);\n\t\t\tc.lineTo(px - ny / 2 - 3 * nx / 2, py - 3 * ny / 2 + nx / 2);\n\t\t\tc.close();\n\t\t\t\n\t\t\tif (filled)\n\t\t\t{\n\t\t\t\tc.fillAndStroke();\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tc.stroke();\n\t\t\t}\n\t\t};\n\t});\n\t\n\t// Registers and defines the custom marker\n\tmxMarker.addMarker('cross', function(c, shape, type, pe, unitX, unitY, size, source, sw, filled)\n\t{\n\t\tvar nx = unitX * (size + sw + 1);\n\t\tvar ny = unitY * (size + sw + 1);\n\n\t\treturn function()\n\t\t{\n\t\t\tc.begin();\n\t\t\tc.moveTo(pe.x - nx / 2 - ny / 2, pe.y - ny / 2 + nx / 2);\n\t\t\tc.lineTo(pe.x + ny / 2 - 3 * nx / 2, pe.y - 3 * ny / 2 - nx / 2);\n\t\t\tc.moveTo(pe.x - nx / 2 + ny / 2, pe.y - ny / 2 - nx / 2);\n\t\t\tc.lineTo(pe.x - ny / 2 - 3 * nx / 2, pe.y - 3 * ny / 2 + nx / 2);\n\t\t\tc.stroke();\n\t\t};\n\t});\n\t\n\tfunction circleMarker(c, shape, type, pe, unitX, unitY, size, source, sw, filled)\n\t{\n\t\tvar a = size / 2;\n\t\tvar size = size + sw;\n\n\t\tvar pt = pe.clone();\n\t\t\n\t\tpe.x -= unitX * (2 * size + sw);\n\t\tpe.y -= unitY * (2 * size + sw);\n\t\t\n\t\tunitX = unitX * (size + sw);\n\t\tunitY = unitY * (size + sw);\n\n\t\treturn function()\n\t\t{\n\t\t\tc.ellipse(pt.x - unitX - size, pt.y - unitY - size, 2 * size, 2 * size);\n\t\t\t\n\t\t\tif (filled)\n\t\t\t{\n\t\t\t\tc.fillAndStroke();\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tc.stroke();\n\t\t\t}\n\t\t};\n\t};\n\t\n\tmxMarker.addMarker('circle', circleMarker);\n\tmxMarker.addMarker('circlePlus', function(c, shape, type, pe, unitX, unitY, size, source, sw, filled)\n\t{\n\t\tvar pt = pe.clone();\n\t\tvar fn = circleMarker.apply(this, arguments);\n\t\tvar nx = unitX * (size + 2 * sw); // (size + sw + 1);\n\t\tvar ny = unitY * (size + 2 * sw); //(size + sw + 1);\n\n\t\treturn function()\n\t\t{\n\t\t\tfn.apply(this, arguments);\n\n\t\t\tc.begin();\n\t\t\tc.moveTo(pt.x - unitX * (sw), pt.y - unitY * (sw));\n\t\t\tc.lineTo(pt.x - 2 * nx + unitX * (sw), pt.y - 2 * ny + unitY * (sw));\n\t\t\tc.moveTo(pt.x - nx - ny + unitY * sw, pt.y - ny + nx - unitX * sw);\n\t\t\tc.lineTo(pt.x + ny - nx - unitY * sw, pt.y - ny - nx + unitX * sw);\n\t\t\tc.stroke();\n\t\t};\n\t});\n\t\n\t// Registers and defines the custom marker\n\tmxMarker.addMarker('halfCircle', function(c, shape, type, pe, unitX, unitY, size, source, sw, filled)\n\t{\n\t\tvar nx = unitX * (size + sw + 1);\n\t\tvar ny = unitY * (size + sw + 1);\n\t\tvar pt = pe.clone();\n\t\t\n\t\tpe.x -= nx;\n\t\tpe.y -= ny;\n\n\t\treturn function()\n\t\t{\n\t\t\tc.begin();\n\t\t\tc.moveTo(pt.x - ny, pt.y + nx);\n\t\t\tc.quadTo(pe.x - ny, pe.y + nx, pe.x, pe.y);\n\t\t\tc.quadTo(pe.x + ny, pe.y - nx, pt.x + ny, pt.y - nx);\n\t\t\tc.stroke();\n\t\t};\n\t});\n\n\tmxMarker.addMarker('async', function(c, shape, type, pe, unitX, unitY, size, source, sw, filled)\n\t{\n\t\t// The angle of the forward facing arrow sides against the x axis is\n\t\t// 26.565 degrees, 1/sin(26.565) = 2.236 / 2 = 1.118 ( / 2 allows for\n\t\t// only half the strokewidth is processed ).\n\t\tvar endOffsetX = unitX * sw * 1.118;\n\t\tvar endOffsetY = unitY * sw * 1.118;\n\t\t\n\t\tunitX = unitX * (size + sw);\n\t\tunitY = unitY * (size + sw);\n\n\t\tvar pt = pe.clone();\n\t\tpt.x -= endOffsetX;\n\t\tpt.y -= endOffsetY;\n\t\t\n\t\tvar f = 1;\n\t\tpe.x += -unitX * f - endOffsetX;\n\t\tpe.y += -unitY * f - endOffsetY;\n\t\t\n\t\treturn function()\n\t\t{\n\t\t\tc.begin();\n\t\t\tc.moveTo(pt.x, pt.y);\n\t\t\t\n\t\t\tif (source)\n\t\t\t{\n\t\t\t\tc.lineTo(pt.x - unitX - unitY / 2, pt.y - unitY + unitX / 2);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tc.lineTo(pt.x + unitY / 2 - unitX, pt.y - unitY - unitX / 2);\n\t\t\t}\n\t\t\t\n\t\t\tc.lineTo(pt.x - unitX, pt.y - unitY);\n\t\t\tc.close();\n\n\t\t\tif (filled)\n\t\t\t{\n\t\t\t\tc.fillAndStroke();\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tc.stroke();\n\t\t\t}\n\t\t};\n\t});\n\t\n\tfunction createOpenAsyncArrow(widthFactor)\n\t{\n\t\twidthFactor = (widthFactor != null) ? widthFactor : 2;\n\t\t\n\t\treturn function(c, shape, type, pe, unitX, unitY, size, source, sw, filled)\n\t\t{\n\t\t\tunitX = unitX * (size + sw);\n\t\t\tunitY = unitY * (size + sw);\n\t\t\t\n\t\t\tvar pt = pe.clone();\n\n\t\t\treturn function()\n\t\t\t{\n\t\t\t\tc.begin();\n\t\t\t\tc.moveTo(pt.x, pt.y);\n\t\t\t\t\n\t\t\t\tif (source)\n\t\t\t\t{\n\t\t\t\t\tc.lineTo(pt.x - unitX - unitY / widthFactor, pt.y - unitY + unitX / widthFactor);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tc.lineTo(pt.x + unitY / widthFactor - unitX, pt.y - unitY - unitX / widthFactor);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tc.stroke();\n\t\t\t};\n\t\t}\n\t};\n\t\n\tmxMarker.addMarker('openAsync', createOpenAsyncArrow(2));\n\t\n\tfunction arrow(canvas, shape, type, pe, unitX, unitY, size, source, sw, filled)\n\t{\n\t\t// The angle of the forward facing arrow sides against the x axis is\n\t\t// 26.565 degrees, 1/sin(26.565) = 2.236 / 2 = 1.118 ( / 2 allows for\n\t\t// only half the strokewidth is processed ).\n\t\tvar endOffsetX = unitX * sw * 1.118;\n\t\tvar endOffsetY = unitY * sw * 1.118;\n\t\t\n\t\tunitX = unitX * (size + sw);\n\t\tunitY = unitY * (size + sw);\n\n\t\tvar pt = pe.clone();\n\t\tpt.x -= endOffsetX;\n\t\tpt.y -= endOffsetY;\n\t\t\n\t\tvar f = (type != mxConstants.ARROW_CLASSIC && type != mxConstants.ARROW_CLASSIC_THIN) ? 1 : 3 / 4;\n\t\tpe.x += -unitX * f - endOffsetX;\n\t\tpe.y += -unitY * f - endOffsetY;\n\t\t\n\t\treturn function()\n\t\t{\n\t\t\tcanvas.begin();\n\t\t\tcanvas.moveTo(pt.x, pt.y);\n\t\t\tcanvas.lineTo(pt.x - unitX - unitY / widthFactor, pt.y - unitY + unitX / widthFactor);\n\t\t\n\t\t\tif (type == mxConstants.ARROW_CLASSIC || type == mxConstants.ARROW_CLASSIC_THIN)\n\t\t\t{\n\t\t\t\tcanvas.lineTo(pt.x - unitX * 3 / 4, pt.y - unitY * 3 / 4);\n\t\t\t}\n\t\t\n\t\t\tcanvas.lineTo(pt.x + unitY / widthFactor - unitX, pt.y - unitY - unitX / widthFactor);\n\t\t\tcanvas.close();\n\n\t\t\tif (filled)\n\t\t\t{\n\t\t\t\tcanvas.fillAndStroke();\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tcanvas.stroke();\n\t\t\t}\n\t\t};\n\t}\n\t\n\t// Handlers are only added if mxVertexHandler is defined (ie. not in embedded graph)\n\tif (typeof mxVertexHandler !== 'undefined')\n\t{\n\t\tfunction createHandle(state, keys, getPositionFn, setPositionFn, ignoreGrid, redrawEdges, executeFn)\n\t\t{\n\t\t\tvar handle = new mxHandle(state, null, mxVertexHandler.prototype.secondaryHandleImage);\n\t\t\t\n\t\t\thandle.execute = function(me)\n\t\t\t{\n\t\t\t\tfor (var i = 0; i < keys.length; i++)\n\t\t\t\t{\t\n\t\t\t\t\tthis.copyStyle(keys[i]);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (executeFn)\n\t\t\t\t{\n\t\t\t\t\texecuteFn(me);\n\t\t\t\t}\n\t\t\t};\n\t\t\t\n\t\t\thandle.getPosition = getPositionFn;\n\t\t\thandle.setPosition = setPositionFn;\n\t\t\thandle.ignoreGrid = (ignoreGrid != null) ? ignoreGrid : true;\n\t\t\t\n\t\t\t// Overridden to update connected edges\n\t\t\tif (redrawEdges)\n\t\t\t{\n\t\t\t\tvar positionChanged = handle.positionChanged;\n\t\t\t\t\n\t\t\t\thandle.positionChanged = function()\n\t\t\t\t{\n\t\t\t\t\tpositionChanged.apply(this, arguments);\n\t\t\t\t\t\n\t\t\t\t\t// Redraws connected edges TODO: Include child edges\n\t\t\t\t\tstate.view.invalidate(this.state.cell);\n\t\t\t\t\tstate.view.validate();\n\t\t\t\t};\n\t\t\t}\n\t\t\t\n\t\t\treturn handle;\n\t\t};\n\t\t\n\t\tfunction createArcHandle(state, yOffset)\n\t\t{\n\t\t\treturn createHandle(state, [mxConstants.STYLE_ARCSIZE], function(bounds)\n\t\t\t{\n\t\t\t\tvar tmp = (yOffset != null) ? yOffset : bounds.height / 8;\n\t\t\t\t\n\t\t\t\tif (mxUtils.getValue(state.style, mxConstants.STYLE_ABSOLUTE_ARCSIZE, 0) == '1')\n\t\t\t\t{\n\t\t\t\t\tvar arcSize = mxUtils.getValue(state.style, mxConstants.STYLE_ARCSIZE, mxConstants.LINE_ARCSIZE) / 2;\n\t\t\t\t\t\n\t\t\t\t\treturn new mxPoint(bounds.x + bounds.width - Math.min(bounds.width / 2, arcSize), bounds.y + tmp);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tvar arcSize = Math.max(0, parseFloat(mxUtils.getValue(state.style,\n\t\t\t\t\t\tmxConstants.STYLE_ARCSIZE, mxConstants.RECTANGLE_ROUNDING_FACTOR * 100))) / 100;\n\t\t\t\t\t\n\t\t\t\t\treturn new mxPoint(bounds.x + bounds.width - Math.min(Math.max(bounds.width / 2, bounds.height / 2),\n\t\t\t\t\t\tMath.min(bounds.width, bounds.height) * arcSize), bounds.y + tmp);\n\t\t\t\t}\n\t\t\t}, function(bounds, pt, me)\n\t\t\t{\n\t\t\t\tif (mxUtils.getValue(state.style, mxConstants.STYLE_ABSOLUTE_ARCSIZE, 0) == '1')\n\t\t\t\t{\n\t\t\t\t\tthis.state.style[mxConstants.STYLE_ARCSIZE] = Math.round(Math.max(0, Math.min(bounds.width,\n\t\t\t\t\t\t(bounds.x + bounds.width - pt.x) * 2)));\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tvar f = Math.min(50, Math.max(0, (bounds.width - pt.x + bounds.x) * 100 /\n\t\t\t\t\t\tMath.min(bounds.width, bounds.height)));\n\t\t\t\t\tthis.state.style[mxConstants.STYLE_ARCSIZE] = Math.round(f);\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\n\t\tfunction createArcHandleFunction()\n\t\t{\n\t\t\treturn function(state)\n\t\t\t{\n\t\t\t\tvar handles = [];\n\t\t\t\t\n\t\t\t\tif (mxUtils.getValue(state.style, mxConstants.STYLE_ROUNDED, false))\n\t\t\t\t{\n\t\t\t\t\thandles.push(createArcHandle(state));\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\treturn handles;\n\t\t\t};\n\t\t};\n\t\t\n\t\tfunction createTrapezoidHandleFunction(max, defaultValue, fixedDefaultValue)\n\t\t{\n\t\t\tmax = (max != null) ? max : 0.5;\n\t\t\t\n\t\t\treturn function(state)\n\t\t\t{\n\t\t\t\tvar handles = [createHandle(state, ['size'], function(bounds)\n\t\t\t\t{\n\t\t\t\t\tvar fixed = (fixedDefaultValue != null) ? mxUtils.getValue(this.state.style, 'fixedSize', '0') != '0' : null;\n\t\t\t\t\tvar size = Math.max(0, parseFloat(mxUtils.getValue(this.state.style, 'size', (fixed) ? fixedDefaultValue : defaultValue)));\n\t\t\t\t\t\n\t\t\t\t\treturn new mxPoint(bounds.x + Math.min(bounds.width * 0.75 * max, size * ((fixed) ? 0.75 : bounds.width * 0.75)), bounds.y + bounds.height / 4);\n\t\t\t\t}, function(bounds, pt)\n\t\t\t\t{\n\t\t\t\t\tvar fixed = (fixedDefaultValue != null) ? mxUtils.getValue(this.state.style, 'fixedSize', '0') != '0' : null;\n\t\t\t\t\tvar size = (fixed) ? (pt.x - bounds.x) : Math.max(0, Math.min(max, (pt.x - bounds.x) / bounds.width * 0.75));\n\t\t\t\t\t\n\t\t\t\t\tthis.state.style['size'] = size;\n\t\t\t\t}, false, true)];\n\t\t\t\t\n\t\t\t\tif (mxUtils.getValue(state.style, mxConstants.STYLE_ROUNDED, false))\n\t\t\t\t{\n\t\t\t\t\thandles.push(createArcHandle(state));\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\treturn handles;\n\t\t\t};\n\t\t};\n\t\t\n\t\tfunction createDisplayHandleFunction(defaultValue, allowArcHandle, max, redrawEdges, fixedDefaultValue)\n\t\t{\n\t\t\tmax = (max != null) ? max : 0.5;\n\t\t\t\n\t\t\treturn function(state)\n\t\t\t{\n\t\t\t\tvar handles = [createHandle(state, ['size'], function(bounds)\n\t\t\t\t{\n\t\t\t\t\tvar fixed = (fixedDefaultValue != null) ? mxUtils.getValue(this.state.style, 'fixedSize', '0') != '0' : null;\n\t\t\t\t\tvar size = parseFloat(mxUtils.getValue(this.state.style, 'size', (fixed) ? fixedDefaultValue : defaultValue));\n\t\n\t\t\t\t\treturn new mxPoint(bounds.x + Math.max(0, Math.min(bounds.width * 0.5, size * ((fixed) ? 1 : bounds.width))), bounds.getCenterY());\n\t\t\t\t}, function(bounds, pt, me)\n\t\t\t\t{\n\t\t\t\t\tvar fixed = (fixedDefaultValue != null) ? mxUtils.getValue(this.state.style, 'fixedSize', '0') != '0' : null;\n\t\t\t\t\tvar size = (fixed) ? (pt.x - bounds.x) : Math.max(0, Math.min(max, (pt.x - bounds.x) / bounds.width));\n\t\t\t\t\t\n\t\t\t\t\tthis.state.style['size'] = size;\n\t\t\t\t}, false, redrawEdges)];\n\t\t\t\t\n\t\t\t\tif (allowArcHandle && mxUtils.getValue(state.style, mxConstants.STYLE_ROUNDED, false))\n\t\t\t\t{\n\t\t\t\t\thandles.push(createArcHandle(state));\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\treturn handles;\n\t\t\t};\n\t\t};\n\t\t\n\t\tfunction createCubeHandleFunction(factor, defaultValue, allowArcHandle)\n\t\t{\n\t\t\treturn function(state)\n\t\t\t{\n\t\t\t\tvar handles = [createHandle(state, ['size'], function(bounds)\n\t\t\t\t{\n\t\t\t\t\tvar size = Math.max(0, Math.min(bounds.width, Math.min(bounds.height, parseFloat(\n\t\t\t\t\t\tmxUtils.getValue(this.state.style, 'size', defaultValue))))) * factor;\n\t\t\t\t\t\n\t\t\t\t\treturn new mxPoint(bounds.x + size, bounds.y + size);\n\t\t\t\t}, function(bounds, pt)\n\t\t\t\t{\n\t\t\t\t\tthis.state.style['size'] = Math.round(Math.max(0, Math.min(Math.min(bounds.width, pt.x - bounds.x),\n\t\t\t\t\t\t\tMath.min(bounds.height, pt.y - bounds.y))) / factor);\n\t\t\t\t}, false)];\n\t\t\t\t\n\t\t\t\tif (allowArcHandle && mxUtils.getValue(state.style, mxConstants.STYLE_ROUNDED, false))\n\t\t\t\t{\n\t\t\t\t\thandles.push(createArcHandle(state));\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\treturn handles;\n\t\t\t};\n\t\t};\n\t\t\n\t\tfunction createCylinderHandleFunction(defaultValue)\n\t\t{\n\t\t\treturn function(state)\n\t\t\t{\n\t\t\t\treturn [createHandle(state, ['size'], function(bounds)\n\t\t\t\t{\n\t\t\t\t\tvar size = Math.max(0, Math.min(bounds.height * 0.5, parseFloat(mxUtils.getValue(this.state.style, 'size', defaultValue))));\n\n\t\t\t\t\treturn new mxPoint(bounds.x, bounds.y + size);\n\t\t\t\t}, function(bounds, pt)\n\t\t\t\t{\n\t\t\t\t\tthis.state.style['size'] = Math.max(0, pt.y - bounds.y);\n\t\t\t\t}, true)];\n\t\t\t}\n\t\t};\n\t\t\n\t\tfunction createArrowHandleFunction(maxSize)\n\t\t{\n\t\t\treturn function(state)\n\t\t\t{\n\t\t\t\treturn [createHandle(state, ['arrowWidth', 'arrowSize'], function(bounds)\n\t\t\t\t{\n\t\t\t\t\tvar aw = Math.max(0, Math.min(1, mxUtils.getValue(this.state.style, 'arrowWidth', SingleArrowShape.prototype.arrowWidth)));\n\t\t\t\t\tvar as = Math.max(0, Math.min(maxSize, mxUtils.getValue(this.state.style, 'arrowSize', SingleArrowShape.prototype.arrowSize)));\n\t\t\t\t\t\n\t\t\t\t\treturn new mxPoint(bounds.x + (1 - as) * bounds.width, bounds.y + (1 - aw) * bounds.height / 2);\n\t\t\t\t}, function(bounds, pt)\n\t\t\t\t{\n\t\t\t\t\tthis.state.style['arrowWidth'] = Math.max(0, Math.min(1, Math.abs(bounds.y + bounds.height / 2 - pt.y) / bounds.height * 2));\n\t\t\t\t\tthis.state.style['arrowSize'] = Math.max(0, Math.min(maxSize, (bounds.x + bounds.width - pt.x) / (bounds.width)));\n\t\t\t\t})];\n\t\t\t};\n\t\t};\n\t\t\n\t\tfunction createWedgeHandleFunction(defaultValue, spacing)\n\t\t{\n\t\t\treturn function(state)\n\t\t\t{\n\t\t\t\treturn [createEdgeHandle(state, ['startWidth'], true, function(dist, nx, ny, p0, p1)\n\t\t\t\t{\n\t\t\t\t\tvar w = mxUtils.getNumber(state.style, 'startWidth', defaultValue) * state.view.scale + spacing;\n\t\n\t\t\t\t\treturn new mxPoint(p0.x + nx * dist / 4 + ny * w / 2, p0.y + ny * dist / 4 - nx * w / 2);\n\t\t\t\t}, function(dist, nx, ny, p0, p1, pt)\n\t\t\t\t{\n\t\t\t\t\tvar w = Math.sqrt(mxUtils.ptSegDistSq(p0.x, p0.y, p1.x, p1.y, pt.x, pt.y));\t\t\t\t\t\n\t\t\t\t\tstate.style['startWidth'] = Math.round(w * 2) / state.view.scale - spacing;\n\t\t\t\t})];\n\t\t\t};\n\t\t};\n\n\t\tfunction createEdgeHandle(state, keys, start, getPosition, setPosition)\n\t\t{\n\t\t\treturn createHandle(state, keys, function(bounds)\n\t\t\t{\n\t\t\t\tvar pts = state.absolutePoints;\n\n\t\t\t\tif (pts != null && pts.length > 0)\n\t\t\t\t{\n\t\t\t\t\tvar n = pts.length - 1;\n\t\t\t\t\t\n\t\t\t\t\tvar tr = state.view.translate;\n\t\t\t\t\tvar s = state.view.scale;\n\t\t\t\t\t\n\t\t\t\t\tvar p0 = (start) ? pts[0] : pts[n];\n\t\t\t\t\tvar p1 = (start) ? pts[1] : pts[n - 1];\n\t\t\t\t\tvar dx = (start) ? p1.x - p0.x : p1.x - p0.x;\n\t\t\t\t\tvar dy = (start) ? p1.y - p0.y : p1.y - p0.y;\n\n\t\t\t\t\tvar dist = Math.sqrt(dx * dx + dy * dy);\n\t\t\t\t\t\n\t\t\t\t\tvar pt = getPosition.call(this, dist, dx / dist, dy / dist, p0, p1);\n\t\t\t\t\t\n\t\t\t\t\treturn new mxPoint(pt.x / s - tr.x, pt.y / s - tr.y);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t}, function(bounds, pt, me)\n\t\t\t{\n\t\t\t\tvar pts = state.absolutePoints;\n\t\t\t\tvar n = pts.length - 1;\n\t\t\t\t\n\t\t\t\tvar tr = state.view.translate;\n\t\t\t\tvar s = state.view.scale;\n\t\t\t\t\n\t\t\t\tvar p0 = (start) ? pts[0] : pts[n];\n\t\t\t\tvar p1 = (start) ? pts[1] : pts[n - 1];\n\t\t\t\tvar dx = (start) ? p1.x - p0.x : p1.x - p0.x;\n\t\t\t\tvar dy = (start) ? p1.y - p0.y : p1.y - p0.y;\n\n\t\t\t\tvar dist = Math.sqrt(dx * dx + dy * dy);\n\t\t\t\tpt.x = (pt.x + tr.x) * s;\n\t\t\t\tpt.y = (pt.y + tr.y) * s;\n\n\t\t\t\tsetPosition.call(this, dist, dx / dist, dy / dist, p0, p1, pt, me);\n\t\t\t});\n\t\t};\n\t\t\n\t\tfunction createEdgeWidthHandle(state, start, spacing)\n\t\t{\n\t\t\treturn createEdgeHandle(state, ['width'], start, function(dist, nx, ny, p0, p1)\n\t\t\t{\n\t\t\t\tvar w = state.shape.getEdgeWidth() * state.view.scale + spacing;\n\n\t\t\t\treturn new mxPoint(p0.x + nx * dist / 4 + ny * w / 2, p0.y + ny * dist / 4 - nx * w / 2);\n\t\t\t}, function(dist, nx, ny, p0, p1, pt)\n\t\t\t{\n\t\t\t\tvar w = Math.sqrt(mxUtils.ptSegDistSq(p0.x, p0.y, p1.x, p1.y, pt.x, pt.y));\t\t\t\t\t\n\t\t\t\tstate.style['width'] = Math.round(w * 2) / state.view.scale - spacing;\n\t\t\t});\n\t\t};\n\t\t\n\t\tfunction ptLineDistance(x1, y1, x2, y2, x0, y0)\n\t\t{\n\t\t\treturn Math.abs((y2 - y1) * x0 - (x2 - x1) * y0 + x2 * y1 - y2 * x1) / Math.sqrt((y2 - y1) * (y2 - y1) + (x2 - x1) * (x2 - x1));\n\t\t}\n\n\t\tvar handleFactory = {\n\t\t\t'link': function(state)\n\t\t\t{\n\t\t\t\tvar spacing = 10;\n\n\t\t\t\treturn [createEdgeWidthHandle(state, true, spacing), createEdgeWidthHandle(state, false, spacing)];\n\t\t\t},\n\t\t\t'flexArrow': function(state)\n\t\t\t{\n\t\t\t\t// Do not use state.shape.startSize/endSize since it is cached\n\t\t\t\tvar tol = state.view.graph.gridSize / state.view.scale;\n\t\t\t\tvar handles = [];\n\t\t\t\t\n\t\t\t\tif (mxUtils.getValue(state.style, mxConstants.STYLE_STARTARROW, mxConstants.NONE) != mxConstants.NONE)\n\t\t\t\t{\n\t\t\t\t\thandles.push(createEdgeHandle(state, ['width', mxConstants.STYLE_STARTSIZE, mxConstants.STYLE_ENDSIZE], true, function(dist, nx, ny, p0, p1)\n\t\t\t\t\t{\n\t\t\t\t\t\tvar w = (state.shape.getEdgeWidth() - state.shape.strokewidth) * state.view.scale;\n\t\t\t\t\t\tvar l = mxUtils.getNumber(state.style, mxConstants.STYLE_STARTSIZE, mxConstants.ARROW_SIZE / 5) * 3 * state.view.scale;\n\t\t\t\t\t\t\n\t\t\t\t\t\treturn new mxPoint(p0.x + nx * (l + state.shape.strokewidth * state.view.scale) + ny * w / 2,\n\t\t\t\t\t\t\tp0.y + ny * (l + state.shape.strokewidth * state.view.scale) - nx * w / 2);\n\t\t\t\t\t}, function(dist, nx, ny, p0, p1, pt, me)\n\t\t\t\t\t{\n\t\t\t\t\t\tvar w = Math.sqrt(mxUtils.ptSegDistSq(p0.x, p0.y, p1.x, p1.y, pt.x, pt.y));\n\t\t\t\t\t\tvar l = mxUtils.ptLineDist(p0.x, p0.y, p0.x + ny, p0.y - nx, pt.x, pt.y);\n\t\t\t\t\t\t\n\t\t\t\t\t\tstate.style[mxConstants.STYLE_STARTSIZE] = Math.round((l - state.shape.strokewidth) * 100 / 3) / 100 / state.view.scale;\n\t\t\t\t\t\tstate.style['width'] = Math.round(w * 2) / state.view.scale;\n\t\t\t\t\t\t\n\t\t\t\t\t\t// Applies to opposite side\n\t\t\t\t\t\tif (mxEvent.isShiftDown(me.getEvent()) || mxEvent.isControlDown(me.getEvent()))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tstate.style[mxConstants.STYLE_ENDSIZE] = state.style[mxConstants.STYLE_STARTSIZE];\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Snaps to end geometry\n\t\t\t\t\t\tif (!mxEvent.isAltDown(me.getEvent()))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif (Math.abs(parseFloat(state.style[mxConstants.STYLE_STARTSIZE]) - parseFloat(state.style[mxConstants.STYLE_ENDSIZE])) < tol / 6)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tstate.style[mxConstants.STYLE_STARTSIZE] = state.style[mxConstants.STYLE_ENDSIZE];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}));\n\t\t\t\t\t\n\t\t\t\t\thandles.push(createEdgeHandle(state, ['startWidth', 'endWidth', mxConstants.STYLE_STARTSIZE, mxConstants.STYLE_ENDSIZE], true, function(dist, nx, ny, p0, p1)\n\t\t\t\t\t{\n\t\t\t\t\t\tvar w = (state.shape.getStartArrowWidth() - state.shape.strokewidth) * state.view.scale;\n\t\t\t\t\t\tvar l = mxUtils.getNumber(state.style, mxConstants.STYLE_STARTSIZE, mxConstants.ARROW_SIZE / 5) * 3 * state.view.scale;\n\t\t\t\t\t\t\n\t\t\t\t\t\treturn new mxPoint(p0.x + nx * (l + state.shape.strokewidth * state.view.scale) + ny * w / 2,\n\t\t\t\t\t\t\tp0.y + ny * (l + state.shape.strokewidth * state.view.scale) - nx * w / 2);\n\t\t\t\t\t}, function(dist, nx, ny, p0, p1, pt, me)\n\t\t\t\t\t{\n\t\t\t\t\t\tvar w = Math.sqrt(mxUtils.ptSegDistSq(p0.x, p0.y, p1.x, p1.y, pt.x, pt.y));\n\t\t\t\t\t\tvar l = mxUtils.ptLineDist(p0.x, p0.y, p0.x + ny, p0.y - nx, pt.x, pt.y);\n\t\t\t\t\t\t\n\t\t\t\t\t\tstate.style[mxConstants.STYLE_STARTSIZE] = Math.round((l - state.shape.strokewidth) * 100 / 3) / 100 / state.view.scale;\n\t\t\t\t\t\tstate.style['startWidth'] = Math.max(0, Math.round(w * 2) - state.shape.getEdgeWidth()) / state.view.scale;\n\t\t\t\t\t\t\n\t\t\t\t\t\t// Applies to opposite side\n\t\t\t\t\t\tif (mxEvent.isShiftDown(me.getEvent()) || mxEvent.isControlDown(me.getEvent()))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tstate.style[mxConstants.STYLE_ENDSIZE] = state.style[mxConstants.STYLE_STARTSIZE];\n\t\t\t\t\t\t\tstate.style['endWidth'] = state.style['startWidth'];\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t// Snaps to endWidth\n\t\t\t\t\t\tif (!mxEvent.isAltDown(me.getEvent()))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif (Math.abs(parseFloat(state.style[mxConstants.STYLE_STARTSIZE]) - parseFloat(state.style[mxConstants.STYLE_ENDSIZE])) < tol / 6)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tstate.style[mxConstants.STYLE_STARTSIZE] = state.style[mxConstants.STYLE_ENDSIZE];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif (Math.abs(parseFloat(state.style['startWidth']) - parseFloat(state.style['endWidth'])) < tol)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tstate.style['startWidth'] = state.style['endWidth'];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}));\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (mxUtils.getValue(state.style, mxConstants.STYLE_ENDARROW, mxConstants.NONE) != mxConstants.NONE)\n\t\t\t\t{\n\t\t\t\t\thandles.push(createEdgeHandle(state, ['width', mxConstants.STYLE_STARTSIZE, mxConstants.STYLE_ENDSIZE], false, function(dist, nx, ny, p0, p1)\n\t\t\t\t\t{\n\t\t\t\t\t\tvar w = (state.shape.getEdgeWidth() - state.shape.strokewidth) * state.view.scale;\n\t\t\t\t\t\tvar l = mxUtils.getNumber(state.style, mxConstants.STYLE_ENDSIZE, mxConstants.ARROW_SIZE / 5) * 3 * state.view.scale;\n\t\t\t\t\t\t\n\t\t\t\t\t\treturn new mxPoint(p0.x + nx * (l + state.shape.strokewidth * state.view.scale) - ny * w / 2,\n\t\t\t\t\t\t\tp0.y + ny * (l + state.shape.strokewidth * state.view.scale) + nx * w / 2);\n\t\t\t\t\t}, function(dist, nx, ny, p0, p1, pt, me)\n\t\t\t\t\t{\n\t\t\t\t\t\tvar w = Math.sqrt(mxUtils.ptSegDistSq(p0.x, p0.y, p1.x, p1.y, pt.x, pt.y));\n\t\t\t\t\t\tvar l = mxUtils.ptLineDist(p0.x, p0.y, p0.x + ny, p0.y - nx, pt.x, pt.y);\n\t\t\t\t\t\t\n\t\t\t\t\t\tstate.style[mxConstants.STYLE_ENDSIZE] = Math.round((l - state.shape.strokewidth) * 100 / 3) / 100 / state.view.scale;\n\t\t\t\t\t\tstate.style['width'] = Math.round(w * 2) / state.view.scale;\n\t\t\t\t\t\t\n\t\t\t\t\t\t// Applies to opposite side\n\t\t\t\t\t\tif (mxEvent.isShiftDown(me.getEvent()) || mxEvent.isControlDown(me.getEvent()))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tstate.style[mxConstants.STYLE_STARTSIZE] = state.style[mxConstants.STYLE_ENDSIZE];\n\t\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\t// Snaps to start geometry\n\t\t\t\t\t\tif (!mxEvent.isAltDown(me.getEvent()))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif (Math.abs(parseFloat(state.style[mxConstants.STYLE_ENDSIZE]) - parseFloat(state.style[mxConstants.STYLE_STARTSIZE])) < tol / 6)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tstate.style[mxConstants.STYLE_ENDSIZE] = state.style[mxConstants.STYLE_STARTSIZE];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}));\n\t\t\t\t\t\n\t\t\t\t\thandles.push(createEdgeHandle(state, ['startWidth', 'endWidth', mxConstants.STYLE_STARTSIZE, mxConstants.STYLE_ENDSIZE], false, function(dist, nx, ny, p0, p1)\n\t\t\t\t\t{\n\t\t\t\t\t\tvar w = (state.shape.getEndArrowWidth() - state.shape.strokewidth) * state.view.scale;\n\t\t\t\t\t\tvar l = mxUtils.getNumber(state.style, mxConstants.STYLE_ENDSIZE, mxConstants.ARROW_SIZE / 5) * 3 * state.view.scale;\n\t\t\t\t\t\t\n\t\t\t\t\t\treturn new mxPoint(p0.x + nx * (l + state.shape.strokewidth * state.view.scale) - ny * w / 2,\n\t\t\t\t\t\t\tp0.y + ny * (l + state.shape.strokewidth * state.view.scale) + nx * w / 2);\n\t\t\t\t\t}, function(dist, nx, ny, p0, p1, pt, me)\n\t\t\t\t\t{\n\t\t\t\t\t\tvar w = Math.sqrt(mxUtils.ptSegDistSq(p0.x, p0.y, p1.x, p1.y, pt.x, pt.y));\n\t\t\t\t\t\tvar l = mxUtils.ptLineDist(p0.x, p0.y, p0.x + ny, p0.y - nx, pt.x, pt.y);\n\t\t\t\t\t\t\n\t\t\t\t\t\tstate.style[mxConstants.STYLE_ENDSIZE] = Math.round((l - state.shape.strokewidth) * 100 / 3) / 100 / state.view.scale;\n\t\t\t\t\t\tstate.style['endWidth'] = Math.max(0, Math.round(w * 2) - state.shape.getEdgeWidth()) / state.view.scale;\n\t\t\t\t\t\t\n\t\t\t\t\t\t// Applies to opposite side\n\t\t\t\t\t\tif (mxEvent.isShiftDown(me.getEvent()) || mxEvent.isControlDown(me.getEvent()))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tstate.style[mxConstants.STYLE_STARTSIZE] = state.style[mxConstants.STYLE_ENDSIZE];\n\t\t\t\t\t\t\tstate.style['startWidth'] = state.style['endWidth'];\n\t\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\t// Snaps to start geometry\n\t\t\t\t\t\tif (!mxEvent.isAltDown(me.getEvent()))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif (Math.abs(parseFloat(state.style[mxConstants.STYLE_ENDSIZE]) - parseFloat(state.style[mxConstants.STYLE_STARTSIZE])) < tol / 6)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tstate.style[mxConstants.STYLE_ENDSIZE] = state.style[mxConstants.STYLE_STARTSIZE];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif (Math.abs(parseFloat(state.style['endWidth']) - parseFloat(state.style['startWidth'])) < tol)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tstate.style['endWidth'] = state.style['startWidth'];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}));\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\treturn handles;\n\t\t\t},\n\t\t\t'swimlane': function(state)\n\t\t\t{\n\t\t\t\tvar handles = [];\n\t\t\t\t\n\t\t\t\tif (mxUtils.getValue(state.style, mxConstants.STYLE_ROUNDED))\n\t\t\t\t{\n\t\t\t\t\tvar size = parseFloat(mxUtils.getValue(state.style, mxConstants.STYLE_STARTSIZE, mxConstants.DEFAULT_STARTSIZE));\n\t\t\t\t\thandles.push(createArcHandle(state, size / 2));\n\t\t\t\t}\n\n\t\t\t\t// Start size handle must be last item in handles for hover to work in tables (see mouse event handler in Graph)\n\t\t\t\thandles.push(createHandle(state, [mxConstants.STYLE_STARTSIZE], function(bounds)\n\t\t\t\t{\n\t\t\t\t\tvar size = parseFloat(mxUtils.getValue(state.style, mxConstants.STYLE_STARTSIZE, mxConstants.DEFAULT_STARTSIZE));\n\t\t\t\t\t\n\t\t\t\t\tif (mxUtils.getValue(state.style, mxConstants.STYLE_HORIZONTAL, 1) == 1)\n\t\t\t\t\t{\n\t\t\t\t\t\treturn new mxPoint(bounds.getCenterX(), bounds.y + Math.max(0, Math.min(bounds.height, size)));\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\treturn new mxPoint(bounds.x + Math.max(0, Math.min(bounds.width, size)), bounds.getCenterY());\n\t\t\t\t\t}\n\t\t\t\t}, function(bounds, pt)\n\t\t\t\t{\t\n\t\t\t\t\tstate.style[mxConstants.STYLE_STARTSIZE] =\n\t\t\t\t\t\t(mxUtils.getValue(this.state.style, mxConstants.STYLE_HORIZONTAL, 1) == 1) ?\n\t\t\t\t\t\t\tMath.round(Math.max(0, Math.min(bounds.height, pt.y - bounds.y))) :\n\t\t\t\t\t\t\tMath.round(Math.max(0, Math.min(bounds.width, pt.x - bounds.x)));\n\t\t\t\t}, false, null, function(me)\n\t\t\t\t{\n\t\t\t\t\tvar graph = state.view.graph;\n\t\t\t\t\t\n\t\t\t\t\tif (!mxEvent.isShiftDown(me.getEvent()) && !mxEvent.isControlDown(me.getEvent()) &&\n\t\t\t\t\t\t(graph.isTableRow(state.cell) || graph.isTableCell(state.cell)))\n\t\t\t\t\t{\n\t\t\t\t\t\tvar dir = graph.getSwimlaneDirection(state.style);\n\t\t\t\t\t\tvar parent = graph.model.getParent(state.cell);\n\t\t\t\t\t\tvar cells = graph.model.getChildCells(parent, true);\n\t\t\t\t\t\tvar temp = [];\n\t\t\t\t\t\t\n\t\t\t\t\t\tfor (var i = 0; i < cells.length; i++)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t// Finds siblings with the same direction and to set start size\n\t\t\t\t\t\t\tif (cells[i] != state.cell && graph.isSwimlane(cells[i]) &&\n\t\t\t\t\t\t\t\tgraph.getSwimlaneDirection(graph.getCurrentCellStyle(\n\t\t\t\t\t\t\t\tcells[i])) == dir)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\ttemp.push(cells[i]);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tgraph.setCellStyles(mxConstants.STYLE_STARTSIZE,\n\t\t\t\t\t\t\tstate.style[mxConstants.STYLE_STARTSIZE], temp);\n\t\t\t\t\t}\t\t\t\t\t\n\t\t\t\t}));\n\t\t\t\t\n\t\t\t\treturn handles;\n\t\t\t},\n\t\t\t'label': createArcHandleFunction(),\n\t\t\t'ext': createArcHandleFunction(),\n\t\t\t'rectangle': createArcHandleFunction(),\n\t\t\t'triangle': createArcHandleFunction(),\n\t\t\t'rhombus': createArcHandleFunction(),\n\t\t\t'umlLifeline': function(state)\n\t\t\t{\n\t\t\t\treturn [createHandle(state, ['size'], function(bounds)\n\t\t\t\t{\n\t\t\t\t\tvar size = Math.max(0, Math.min(bounds.height, parseFloat(mxUtils.getValue(this.state.style, 'size', UmlLifeline.prototype.size))));\n\t\t\t\t\t\n\t\t\t\t\treturn new mxPoint(bounds.getCenterX(), bounds.y + size);\n\t\t\t\t}, function(bounds, pt)\n\t\t\t\t{\t\n\t\t\t\t\tthis.state.style['size'] = Math.round(Math.max(0, Math.min(bounds.height, pt.y - bounds.y)));\n\t\t\t\t}, false)];\n\t\t\t},\n\t\t\t'umlFrame': function(state)\n\t\t\t{\n\t\t\t\tvar handles = [createHandle(state, ['width', 'height'], function(bounds)\n\t\t\t\t{\n\t\t\t\t\tvar w0 = Math.max(UmlFrame.prototype.corner, Math.min(bounds.width, mxUtils.getValue(this.state.style, 'width', UmlFrame.prototype.width)));\n\t\t\t\t\tvar h0 = Math.max(UmlFrame.prototype.corner * 1.5, Math.min(bounds.height, mxUtils.getValue(this.state.style, 'height', UmlFrame.prototype.height)));\n\n\t\t\t\t\treturn new mxPoint(bounds.x + w0, bounds.y + h0);\n\t\t\t\t}, function(bounds, pt)\n\t\t\t\t{\n\t\t\t\t\tthis.state.style['width'] = Math.round(Math.max(UmlFrame.prototype.corner, Math.min(bounds.width, pt.x - bounds.x)));\n\t\t\t\t\tthis.state.style['height'] = Math.round(Math.max(UmlFrame.prototype.corner * 1.5, Math.min(bounds.height, pt.y - bounds.y)));\n\t\t\t\t}, false)];\n\t\t\t\t\n\t\t\t\treturn handles;\n\t\t\t},\n\t\t\t'process': function(state)\n\t\t\t{\n\t\t\t\tvar handles = [createHandle(state, ['size'], function(bounds)\n\t\t\t\t{\n\t\t\t\t\t\n\t\t\t\t\tvar fixed = mxUtils.getValue(this.state.style, 'fixedSize', '0') != '0';\n\t\t\t\t\tvar size = parseFloat(mxUtils.getValue(this.state.style, 'size', ProcessShape.prototype.size));\n\t\t\t\t\t\n\t\t\t\t\treturn (fixed) ? new mxPoint(bounds.x + size, bounds.y + bounds.height / 4) : new mxPoint(bounds.x + bounds.width * size, bounds.y + bounds.height / 4);\n\t\t\t\t}, function(bounds, pt)\n\t\t\t\t{\n\t\t\t\t\tvar fixed = mxUtils.getValue(this.state.style, 'fixedSize', '0') != '0';\n\t\t\t\t\tvar size = (fixed) ? Math.max(0, Math.min(bounds.width * 0.5, (pt.x - bounds.x))) : Math.max(0, Math.min(0.5, (pt.x - bounds.x) / bounds.width));\n\t\t\t\t\tthis.state.style['size'] = size;\n\t\t\t\t}, false)];\n\t\t\t\t\n\t\t\t\tif (mxUtils.getValue(state.style, mxConstants.STYLE_ROUNDED, false))\n\t\t\t\t{\n\t\t\t\t\thandles.push(createArcHandle(state));\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\treturn handles;\n\t\t\t},\n\t\t\t'cross': function(state)\n\t\t\t{\n\t\t\t\treturn [createHandle(state, ['size'], function(bounds)\n\t\t\t\t{\n\t\t\t\t\tvar m = Math.min(bounds.width, bounds.height);\n\t\t\t\t\tvar size = Math.max(0, Math.min(1, mxUtils.getValue(this.state.style, 'size', CrossShape.prototype.size))) * m / 2;\n\n\t\t\t\t\treturn new mxPoint(bounds.getCenterX() - size, bounds.getCenterY() - size);\n\t\t\t\t}, function(bounds, pt)\n\t\t\t\t{\n\t\t\t\t\tvar m = Math.min(bounds.width, bounds.height);\n\t\t\t\t\tthis.state.style['size'] = Math.max(0, Math.min(1, Math.min((Math.max(0, bounds.getCenterY() - pt.y) / m) * 2,\n\t\t\t\t\t\t\t(Math.max(0, bounds.getCenterX() - pt.x) / m) * 2)));\n\t\t\t\t})];\n\t\t\t},\n\t\t\t'note': function(state)\n\t\t\t{\n\t\t\t\treturn [createHandle(state, ['size'], function(bounds)\n\t\t\t\t{\n\t\t\t\t\tvar size = Math.max(0, Math.min(bounds.width, Math.min(bounds.height, parseFloat(\n\t\t\t\t\t\tmxUtils.getValue(this.state.style, 'size', NoteShape.prototype.size)))));\n\t\t\t\t\t\n\t\t\t\t\treturn new mxPoint(bounds.x + bounds.width - size, bounds.y + size);\n\t\t\t\t}, function(bounds, pt)\n\t\t\t\t{\n\t\t\t\t\tthis.state.style['size'] = Math.round(Math.max(0, Math.min(Math.min(bounds.width, bounds.x + bounds.width - pt.x),\n\t\t\t\t\t\t\tMath.min(bounds.height, pt.y - bounds.y))));\n\t\t\t\t})];\n\t\t\t},\n\t\t\t'note2': function(state)\n\t\t\t{\n\t\t\t\treturn [createHandle(state, ['size'], function(bounds)\n\t\t\t\t{\n\t\t\t\t\tvar size = Math.max(0, Math.min(bounds.width, Math.min(bounds.height, parseFloat(\n\t\t\t\t\t\tmxUtils.getValue(this.state.style, 'size', NoteShape2.prototype.size)))));\n\t\t\t\t\t\n\t\t\t\t\treturn new mxPoint(bounds.x + bounds.width - size, bounds.y + size);\n\t\t\t\t}, function(bounds, pt)\n\t\t\t\t{\n\t\t\t\t\tthis.state.style['size'] = Math.round(Math.max(0, Math.min(Math.min(bounds.width, bounds.x + bounds.width - pt.x),\n\t\t\t\t\t\t\tMath.min(bounds.height, pt.y - bounds.y))));\n\t\t\t\t})];\n\t\t\t},\n\t\t\t'manualInput': function(state)\n\t\t\t{\n\t\t\t\tvar handles = [createHandle(state, ['size'], function(bounds)\n\t\t\t\t{\n\t\t\t\t\tvar size = Math.max(0, Math.min(bounds.height, mxUtils.getValue(this.state.style, 'size', ManualInputShape.prototype.size)));\n\t\t\t\t\t\n\t\t\t\t\treturn new mxPoint(bounds.x + bounds.width / 4, bounds.y + size * 3 / 4);\n\t\t\t\t}, function(bounds, pt)\n\t\t\t\t{\n\t\t\t\t\tthis.state.style['size'] = Math.round(Math.max(0, Math.min(bounds.height, (pt.y - bounds.y) * 4 / 3)));\n\t\t\t\t}, false)];\n\t\t\t\t\n\t\t\t\tif (mxUtils.getValue(state.style, mxConstants.STYLE_ROUNDED, false))\n\t\t\t\t{\n\t\t\t\t\thandles.push(createArcHandle(state));\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\treturn handles;\n\t\t\t},\n\t\t\t'dataStorage': function(state)\n\t\t\t{\n\t\t\t\treturn [createHandle(state, ['size'], function(bounds)\n\t\t\t\t{\n\t\t\t\t\tvar fixed = mxUtils.getValue(this.state.style, 'fixedSize', '0') != '0';\n\t\t\t\t\tvar size = parseFloat(mxUtils.getValue(this.state.style, 'size', (fixed) ? DataStorageShape.prototype.fixedSize : DataStorageShape.prototype.size));\n\n\t\t\t\t\treturn new mxPoint(bounds.x + bounds.width - size * ((fixed) ? 1 : bounds.width), bounds.getCenterY());\n\t\t\t\t}, function(bounds, pt)\n\t\t\t\t{\n\t\t\t\t\tvar fixed = mxUtils.getValue(this.state.style, 'fixedSize', '0') != '0';\n\t\t\t\t\tvar size = (fixed) ? Math.max(0, Math.min(bounds.width, (bounds.x + bounds.width - pt.x))) : Math.max(0, Math.min(1, (bounds.x + bounds.width - pt.x) / bounds.width));\n\t\t\t\t\t\n\t\t\t\t\tthis.state.style['size'] = size;\n\t\t\t\t}, false)];\n\t\t\t},\n\t\t\t'callout': function(state)\n\t\t\t{\n\t\t\t\tvar handles = [createHandle(state, ['size', 'position'], function(bounds)\n\t\t\t\t{\n\t\t\t\t\tvar size = Math.max(0, Math.min(bounds.height, mxUtils.getValue(this.state.style, 'size', CalloutShape.prototype.size)));\n\t\t\t\t\tvar position = Math.max(0, Math.min(1, mxUtils.getValue(this.state.style, 'position', CalloutShape.prototype.position)));\n\t\t\t\t\tvar base = Math.max(0, Math.min(bounds.width, mxUtils.getValue(this.state.style, 'base', CalloutShape.prototype.base)));\n\t\t\t\t\t\n\t\t\t\t\treturn new mxPoint(bounds.x + position * bounds.width, bounds.y + bounds.height - size);\n\t\t\t\t}, function(bounds, pt)\n\t\t\t\t{\n\t\t\t\t\tvar base = Math.max(0, Math.min(bounds.width, mxUtils.getValue(this.state.style, 'base', CalloutShape.prototype.base)));\n\t\t\t\t\tthis.state.style['size'] = Math.round(Math.max(0, Math.min(bounds.height, bounds.y + bounds.height - pt.y)));\n\t\t\t\t\tthis.state.style['position'] = Math.round(Math.max(0, Math.min(1, (pt.x - bounds.x) / bounds.width)) * 100) / 100;\n\t\t\t\t}, false), createHandle(state, ['position2'], function(bounds)\n\t\t\t\t{\n\t\t\t\t\tvar position2 = Math.max(0, Math.min(1, mxUtils.getValue(this.state.style, 'position2', CalloutShape.prototype.position2)));\n\n\t\t\t\t\treturn new mxPoint(bounds.x + position2 * bounds.width, bounds.y + bounds.height);\n\t\t\t\t}, function(bounds, pt)\n\t\t\t\t{\n\t\t\t\t\tthis.state.style['position2'] = Math.round(Math.max(0, Math.min(1, (pt.x - bounds.x) / bounds.width)) * 100) / 100;\n\t\t\t\t}, false), createHandle(state, ['base'], function(bounds)\n\t\t\t\t{\n\t\t\t\t\tvar size = Math.max(0, Math.min(bounds.height, mxUtils.getValue(this.state.style, 'size', CalloutShape.prototype.size)));\n\t\t\t\t\tvar position = Math.max(0, Math.min(1, mxUtils.getValue(this.state.style, 'position', CalloutShape.prototype.position)));\n\t\t\t\t\tvar base = Math.max(0, Math.min(bounds.width, mxUtils.getValue(this.state.style, 'base', CalloutShape.prototype.base)));\n\t\t\t\t\t\n\t\t\t\t\treturn new mxPoint(bounds.x + Math.min(bounds.width, position * bounds.width + base), bounds.y + bounds.height - size);\n\t\t\t\t}, function(bounds, pt)\n\t\t\t\t{\n\t\t\t\t\tvar position = Math.max(0, Math.min(1, mxUtils.getValue(this.state.style, 'position', CalloutShape.prototype.position)));\n\n\t\t\t\t\tthis.state.style['base'] = Math.round(Math.max(0, Math.min(bounds.width, pt.x - bounds.x - position * bounds.width)));\n\t\t\t\t}, false)];\n\t\t\t\t\n\t\t\t\tif (mxUtils.getValue(state.style, mxConstants.STYLE_ROUNDED, false))\n\t\t\t\t{\n\t\t\t\t\thandles.push(createArcHandle(state));\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\treturn handles;\n\t\t\t},\n\t\t\t'internalStorage': function(state)\n\t\t\t{\n\t\t\t\tvar handles = [createHandle(state, ['dx', 'dy'], function(bounds)\n\t\t\t\t{\n\t\t\t\t\tvar dx = Math.max(0, Math.min(bounds.width, mxUtils.getValue(this.state.style, 'dx', InternalStorageShape.prototype.dx)));\n\t\t\t\t\tvar dy = Math.max(0, Math.min(bounds.height, mxUtils.getValue(this.state.style, 'dy', InternalStorageShape.prototype.dy)));\n\n\t\t\t\t\treturn new mxPoint(bounds.x + dx, bounds.y + dy);\n\t\t\t\t}, function(bounds, pt)\n\t\t\t\t{\n\t\t\t\t\tthis.state.style['dx'] = Math.round(Math.max(0, Math.min(bounds.width, pt.x - bounds.x)));\n\t\t\t\t\tthis.state.style['dy'] = Math.round(Math.max(0, Math.min(bounds.height, pt.y - bounds.y)));\n\t\t\t\t}, false)];\n\t\t\t\t\n\t\t\t\tif (mxUtils.getValue(state.style, mxConstants.STYLE_ROUNDED, false))\n\t\t\t\t{\n\t\t\t\t\thandles.push(createArcHandle(state));\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\treturn handles;\n\t\t\t},\n\t\t\t'module': function(state)\n\t\t\t{\n\t\t\t\tvar handles = [createHandle(state, ['jettyWidth', 'jettyHeight'], function(bounds)\n\t\t\t\t{\n\t\t\t\t\tvar dx = Math.max(0, Math.min(bounds.width, mxUtils.getValue(this.state.style, 'jettyWidth', ModuleShape.prototype.jettyWidth)));\n\t\t\t\t\tvar dy = Math.max(0, Math.min(bounds.height, mxUtils.getValue(this.state.style, 'jettyHeight', ModuleShape.prototype.jettyHeight)));\n\n\t\t\t\t\treturn new mxPoint(bounds.x + dx / 2, bounds.y + dy * 2);\n\t\t\t\t}, function(bounds, pt)\n\t\t\t\t{\n\t\t\t\t\tthis.state.style['jettyWidth'] = Math.round(Math.max(0, Math.min(bounds.width, pt.x - bounds.x)) * 2);\n\t\t\t\t\tthis.state.style['jettyHeight'] = Math.round(Math.max(0, Math.min(bounds.height, pt.y - bounds.y)) / 2);\n\t\t\t\t})];\n\t\t\t\t\n\t\t\t\treturn handles;\n\t\t\t},\n\t\t\t'corner': function(state)\n\t\t\t{\n\t\t\t\treturn [createHandle(state, ['dx', 'dy'], function(bounds)\n\t\t\t\t{\n\t\t\t\t\tvar dx = Math.max(0, Math.min(bounds.width, mxUtils.getValue(this.state.style, 'dx', CornerShape.prototype.dx)));\n\t\t\t\t\tvar dy = Math.max(0, Math.min(bounds.height, mxUtils.getValue(this.state.style, 'dy', CornerShape.prototype.dy)));\n\n\t\t\t\t\treturn new mxPoint(bounds.x + dx, bounds.y + dy);\n\t\t\t\t}, function(bounds, pt)\n\t\t\t\t{\n\t\t\t\t\tthis.state.style['dx'] = Math.round(Math.max(0, Math.min(bounds.width, pt.x - bounds.x)));\n\t\t\t\t\tthis.state.style['dy'] = Math.round(Math.max(0, Math.min(bounds.height, pt.y - bounds.y)));\n\t\t\t\t}, false)];\n\t\t\t},\n\t\t\t'tee': function(state)\n\t\t\t{\n\t\t\t\treturn [createHandle(state, ['dx', 'dy'], function(bounds)\n\t\t\t\t{\n\t\t\t\t\tvar dx = Math.max(0, Math.min(bounds.width, mxUtils.getValue(this.state.style, 'dx', TeeShape.prototype.dx)));\n\t\t\t\t\tvar dy = Math.max(0, Math.min(bounds.height, mxUtils.getValue(this.state.style, 'dy', TeeShape.prototype.dy)));\n\n\t\t\t\t\treturn new mxPoint(bounds.x + (bounds.width + dx) / 2, bounds.y + dy);\n\t\t\t\t}, function(bounds, pt)\n\t\t\t\t{\n\t\t\t\t\tthis.state.style['dx'] = Math.round(Math.max(0, Math.min(bounds.width / 2, (pt.x - bounds.x - bounds.width / 2)) * 2));\n\t\t\t\t\tthis.state.style['dy'] = Math.round(Math.max(0, Math.min(bounds.height, pt.y - bounds.y)));\n\t\t\t\t}, false)];\n\t\t\t},\n\t\t\t'singleArrow': createArrowHandleFunction(1),\n\t\t\t'doubleArrow': createArrowHandleFunction(0.5),\n\t\t\t'mxgraph.arrows2.wedgeArrow': createWedgeHandleFunction(20, 20),\n\t\t\t'mxgraph.arrows2.wedgeArrowDashed': createWedgeHandleFunction(20, 20),\n\t\t\t'mxgraph.arrows2.wedgeArrowDashed2': createWedgeHandleFunction(20, 20),\n\t\t\t'folder': function(state)\n\t\t\t{\n\t\t\t\treturn [createHandle(state, ['tabWidth', 'tabHeight'], function(bounds)\n\t\t\t\t{\n\t\t\t\t\tvar tw = Math.max(0, Math.min(bounds.width, mxUtils.getValue(this.state.style, 'tabWidth', FolderShape.prototype.tabWidth)));\n\t\t\t\t\tvar th = Math.max(0, Math.min(bounds.height, mxUtils.getValue(this.state.style, 'tabHeight', FolderShape.prototype.tabHeight)));\n\t\t\t\t\t\n\t\t\t\t\tif (mxUtils.getValue(this.state.style, 'tabPosition', FolderShape.prototype.tabPosition) == mxConstants.ALIGN_RIGHT)\n\t\t\t\t\t{\n\t\t\t\t\t\ttw = bounds.width - tw;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\treturn new mxPoint(bounds.x + tw, bounds.y + th);\n\t\t\t\t}, function(bounds, pt)\n\t\t\t\t{\n\t\t\t\t\tvar tw = Math.max(0, Math.min(bounds.width, pt.x - bounds.x));\n\t\t\t\t\t\n\t\t\t\t\tif (mxUtils.getValue(this.state.style, 'tabPosition', FolderShape.prototype.tabPosition) == mxConstants.ALIGN_RIGHT)\n\t\t\t\t\t{\n\t\t\t\t\t\ttw = bounds.width - tw;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tthis.state.style['tabWidth'] = Math.round(tw);\n\t\t\t\t\tthis.state.style['tabHeight'] = Math.round(Math.max(0, Math.min(bounds.height, pt.y - bounds.y)));\n\t\t\t\t}, false)];\n\t\t\t},\n\t\t\t'document': function(state)\n\t\t\t{\n\t\t\t\treturn [createHandle(state, ['size'], function(bounds)\n\t\t\t\t{\n\t\t\t\t\tvar size = Math.max(0, Math.min(1, parseFloat(mxUtils.getValue(this.state.style, 'size', DocumentShape.prototype.size))));\n\n\t\t\t\t\treturn new mxPoint(bounds.x + 3 * bounds.width / 4, bounds.y + (1 - size) * bounds.height);\n\t\t\t\t}, function(bounds, pt)\n\t\t\t\t{\n\t\t\t\t\tthis.state.style['size'] = Math.max(0, Math.min(1, (bounds.y + bounds.height - pt.y) / bounds.height));\n\t\t\t\t}, false)];\n\t\t\t},\n\t\t\t'tape': function(state)\n\t\t\t{\n\t\t\t\treturn [createHandle(state, ['size'], function(bounds)\n\t\t\t\t{\n\t\t\t\t\tvar size = Math.max(0, Math.min(1, parseFloat(mxUtils.getValue(this.state.style, 'size', TapeShape.prototype.size))));\n\n\t\t\t\t\treturn new mxPoint(bounds.getCenterX(), bounds.y + size * bounds.height / 2);\n\t\t\t\t}, function(bounds, pt)\n\t\t\t\t{\n\t\t\t\t\tthis.state.style['size'] = Math.max(0, Math.min(1, ((pt.y - bounds.y) / bounds.height) * 2));\n\t\t\t\t}, false)];\n\t\t\t},\n\t\t\t'isoCube2' : function(state)\n\t\t\t{\n\t\t\t\treturn [createHandle(state, ['isoAngle'], function(bounds)\n\t\t\t\t{\n\t\t\t\t\tvar isoAngle = Math.max(0.01, Math.min(94, parseFloat(mxUtils.getValue(this.state.style, 'isoAngle', IsoCubeShape2.isoAngle)))) * Math.PI / 200 ;\n\t\t\t\t\tvar isoH = Math.min(bounds.width * Math.tan(isoAngle), bounds.height * 0.5);\n\n\t\t\t\t\treturn new mxPoint(bounds.x, bounds.y + isoH);\n\t\t\t\t}, function(bounds, pt)\n\t\t\t\t{\n\t\t\t\t\tthis.state.style['isoAngle'] = Math.max(0, (pt.y - bounds.y) * 50 / bounds.height);\n\t\t\t\t}, true)];\n\t\t\t},\n\t\t\t'cylinder2' : createCylinderHandleFunction(CylinderShape.prototype.size),\n\t\t\t'cylinder3' : createCylinderHandleFunction(CylinderShape3.prototype.size),\n\t\t\t'offPageConnector': function(state)\n\t\t\t{\n\t\t\t\treturn [createHandle(state, ['size'], function(bounds)\n\t\t\t\t{\n\t\t\t\t\tvar size = Math.max(0, Math.min(1, parseFloat(mxUtils.getValue(this.state.style, 'size', OffPageConnectorShape.prototype.size))));\n\n\t\t\t\t\treturn new mxPoint(bounds.getCenterX(), bounds.y + (1 - size) * bounds.height);\n\t\t\t\t}, function(bounds, pt)\n\t\t\t\t{\n\t\t\t\t\tthis.state.style['size'] = Math.max(0, Math.min(1, (bounds.y + bounds.height - pt.y) / bounds.height));\n\t\t\t\t}, false)];\n\t\t\t},\n\t\t\t'mxgraph.basic.rect': function(state)\n\t\t\t{\n\t\t\t\tvar handles = [Graph.createHandle(state, ['size'], function(bounds)\n\t\t\t\t{\n\t\t\t\t\tvar size = Math.max(0, Math.min(bounds.width / 2, bounds.height / 2, parseFloat(mxUtils.getValue(this.state.style, 'size', this.size))));\n\t\t\n\t\t\t\t\treturn new mxPoint(bounds.x + size, bounds.y + size);\n\t\t\t\t}, function(bounds, pt)\n\t\t\t\t{\n\t\t\t\t\tthis.state.style['size'] = Math.round(100 * Math.max(0, Math.min(bounds.height / 2, bounds.width / 2, pt.x - bounds.x))) / 100;\n\t\t\t\t})];\n\t\t\t\t\t\t\n\t\t\t\tvar handle2 = Graph.createHandle(state, ['indent'], function(bounds)\n\t\t\t\t{\n\t\t\t\t\tvar dx2 = Math.max(0, Math.min(100, parseFloat(mxUtils.getValue(this.state.style, 'indent', this.dx2))));\n\t\t\n\t\t\t\t\treturn new mxPoint(bounds.x + bounds.width * 0.75, bounds.y + dx2 * bounds.height / 200);\n\t\t\t\t}, function(bounds, pt)\n\t\t\t\t{\n\t\t\t\t\tthis.state.style['indent'] = Math.round(100 * Math.max(0, Math.min(100, 200 * (pt.y - bounds.y) / bounds.height))) / 100;\n\t\t\t\t});\n\t\t\t\t\n\t\t\t\thandles.push(handle2);\n\t\t\t\t\n\t\t\t\treturn handles;\n\t\t\t},\n\t\t\t'step': createDisplayHandleFunction(StepShape.prototype.size, true, null, true, StepShape.prototype.fixedSize),\n\t\t\t'hexagon': createDisplayHandleFunction(HexagonShape.prototype.size, true, 0.5, true, HexagonShape.prototype.fixedSize),\n\t\t\t'curlyBracket': createDisplayHandleFunction(CurlyBracketShape.prototype.size, false),\n\t\t\t'display': createDisplayHandleFunction(DisplayShape.prototype.size, false),\n\t\t\t'cube': createCubeHandleFunction(1, CubeShape.prototype.size, false),\n\t\t\t'card': createCubeHandleFunction(0.5, CardShape.prototype.size, true),\n\t\t\t'loopLimit': createCubeHandleFunction(0.5, LoopLimitShape.prototype.size, true),\n\t\t\t'trapezoid': createTrapezoidHandleFunction(0.5, TrapezoidShape.prototype.size, TrapezoidShape.prototype.fixedSize),\n\t\t\t'parallelogram': createTrapezoidHandleFunction(1, ParallelogramShape.prototype.size, ParallelogramShape.prototype.fixedSize)\n\t\t};\n\t\t\n\t\t// Exposes custom handles\n\t\tGraph.createHandle = createHandle;\n\t\tGraph.handleFactory = handleFactory;\n\n\t\tvar vertexHandlerCreateCustomHandles = mxVertexHandler.prototype.createCustomHandles;\n\n\t\tmxVertexHandler.prototype.createCustomHandles = function()\n\t\t{\n\t\t\tvar handles = vertexHandlerCreateCustomHandles.apply(this, arguments);\n\t\t\t\n\t\t\tif (this.graph.isCellRotatable(this.state.cell))\n\t\t\t// LATER: Make locked state independent of rotatable flag, fix toggle if default is false\n\t\t\t//if (this.graph.isCellResizable(this.state.cell) || this.graph.isCellMovable(this.state.cell))\n\t\t\t{\n\t\t\t\tvar name = this.state.style['shape'];\n\n\t\t\t\tif (mxCellRenderer.defaultShapes[name] == null &&\n\t\t\t\t\tmxStencilRegistry.getStencil(name) == null)\n\t\t\t\t{\n\t\t\t\t\tname = mxConstants.SHAPE_RECTANGLE;\n\t\t\t\t}\n\t\t\t\telse if (this.state.view.graph.isSwimlane(this.state.cell))\n\t\t\t\t{\n\t\t\t\t\tname = mxConstants.SHAPE_SWIMLANE;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tvar fn = handleFactory[name];\n\t\t\t\t\n\t\t\t\tif (fn == null && this.state.shape != null && this.state.shape.isRoundable())\n\t\t\t\t{\n\t\t\t\t\tfn = handleFactory[mxConstants.SHAPE_RECTANGLE];\n\t\t\t\t}\n\t\t\t\n\t\t\t\tif (fn != null)\n\t\t\t\t{\n\t\t\t\t\tvar temp = fn(this.state);\n\t\t\t\t\t\n\t\t\t\t\tif (temp != null)\n\t\t\t\t\t{\n\t\t\t\t\t\tif (handles == null)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\thandles = temp;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\thandles = handles.concat(temp);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\treturn handles;\n\t\t};\n\n\t\tmxEdgeHandler.prototype.createCustomHandles = function()\n\t\t{\n\t\t\tvar name = this.state.style['shape'];\n\t\t\t\n\t\t\tif (mxCellRenderer.defaultShapes[name] == null &&\n\t\t\t\tmxStencilRegistry.getStencil(name) == null)\n\t\t\t{\n\t\t\t\tname = mxConstants.SHAPE_CONNECTOR;\n\t\t\t}\n\t\t\t\n\t\t\tvar fn = handleFactory[name];\n\t\t\t\n\t\t\tif (fn != null)\n\t\t\t{\n\t\t\t\treturn fn(this.state);\n\t\t\t}\n\t\t\t\n\t\t\treturn null;\n\t\t}\n\t}\n\telse\n\t{\n\t\t// Dummy entries to avoid NPE in embed mode\n\t\tGraph.createHandle = function() {};\n\t\tGraph.handleFactory = {};\n\t}\n\n\t var isoHVector = new mxPoint(1, 0);\n\t var isoVVector = new mxPoint(1, 0);\n\t\t\n\t var alpha1 = mxUtils.toRadians(-30);\n\t\t\n\t var cos1 = Math.cos(alpha1);\n\t var sin1 = Math.sin(alpha1);\n\n\t isoHVector = mxUtils.getRotatedPoint(isoHVector, cos1, sin1);\n\n\t var alpha2 = mxUtils.toRadians(-150);\n\t \n\t var cos2 = Math.cos(alpha2);\n\t var sin2 = Math.sin(alpha2);\n\n\t isoVVector = mxUtils.getRotatedPoint(isoVVector, cos2, sin2);\n\t\n\t mxEdgeStyle.IsometricConnector = function (state, source, target, points, result)\n\t {\n\t\tvar view = state.view;\n\t\tvar pt = (points != null && points.length > 0) ? points[0] : null;\n\t\tvar pts = state.absolutePoints;\n\t\tvar p0 = pts[0];\n\t\tvar pe = pts[pts.length-1];\n\t\t\n\t\tif (pt != null)\n\t\t{\n\t\t\tpt = view.transformControlPoint(state, pt);\n\t\t}\n\t\t\n\t\tif (p0 == null)\n\t\t{\n\t\t\tif (source != null)\n\t\t\t{\n\t\t\t\tp0 = new mxPoint(source.getCenterX(), source.getCenterY());\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (pe == null)\n\t\t{\n\t\t\tif (target != null)\n\t\t\t{\n\t\t\t\tpe = new mxPoint(target.getCenterX(), target.getCenterY());\n\t\t\t}\n\t\t}\t\t\n\t\t\n\t\tvar a1 = isoHVector.x;\n\t\tvar a2 = isoHVector.y;\n\t\t\n\t\tvar b1 = isoVVector.x;\n\t\tvar b2 = isoVVector.y;\n\t\t\n\t\tvar elbow = mxUtils.getValue(state.style, 'elbow', 'horizontal') == 'horizontal';\n\t\t\n\t\tif (pe != null && p0 != null)\n\t\t{\n\t\t\tvar last = p0;\n\t\t\t\n\t\t\tfunction isoLineTo(x, y, ignoreFirst)\n\t\t\t{\n\t\t\t\tvar c1 = x - last.x;\n\t\t\t\tvar c2 = y - last.y;\n\n\t\t\t\t// Solves for isometric base vectors\n\t\t\t\tvar h = (b2 * c1 - b1 * c2) / (a1 * b2 - a2 * b1);\n\t\t\t\tvar v = (a2 * c1 - a1 * c2) / (a2 * b1 - a1 * b2);\n\t\t\t\t\n\t\t\t\tif (elbow)\n\t\t\t\t{\n\t\t\t\t\tif (ignoreFirst)\n\t\t\t\t\t{\n\t\t\t\t\t\tlast = new mxPoint(last.x + a1 * h, last.y + a2 * h);\n\t\t\t\t\t\tresult.push(last);\n\t\t\t\t\t}\n\t\n\t\t\t\t\tlast = new mxPoint(last.x + b1 * v, last.y + b2 * v);\n\t\t\t\t\tresult.push(last);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tif (ignoreFirst)\n\t\t\t\t\t{\n\t\t\t\t\t\tlast = new mxPoint(last.x + b1 * v, last.y + b2 * v);\n\t\t\t\t\t\tresult.push(last);\n\t\t\t\t\t}\n\n\t\t\t\t\tlast = new mxPoint(last.x + a1 * h, last.y + a2 * h);\n\t\t\t\t\tresult.push(last);\n\t\t\t\t}\n\t\t\t};\n\n\t\t\tif (pt == null)\n\t\t\t{\n\t\t\t\tpt = new mxPoint(p0.x + (pe.x - p0.x) / 2, p0.y + (pe.y - p0.y) / 2);\n\t\t\t}\n\t\t\t\n\t\t\tisoLineTo(pt.x, pt.y, true);\n\t\t\tisoLineTo(pe.x, pe.y, false);\n\t\t}\n\t };\n\n\t mxStyleRegistry.putValue('isometricEdgeStyle', mxEdgeStyle.IsometricConnector);\n\t\n\t var graphCreateEdgeHandler = Graph.prototype.createEdgeHandler;\n\t Graph.prototype.createEdgeHandler = function(state, edgeStyle)\n\t {\n\t \tif (edgeStyle == mxEdgeStyle.IsometricConnector)\n\t \t{\n\t \t\tvar handler = new mxElbowEdgeHandler(state);\n\t \t\thandler.snapToTerminals = false;\n\t \t\t\n\t \t\treturn handler;\n\t \t}\n\t \t\n\t \treturn graphCreateEdgeHandler.apply(this, arguments);\n\t };\n\n\t// Defines connection points for all shapes\n\tIsoRectangleShape.prototype.constraints = [];\n\t\n\tIsoCubeShape.prototype.getConstraints = function(style, w, h)\n\t{\n\t\tvar constr = [];\n\t\tvar tan30 = Math.tan(mxUtils.toRadians(30));\n\t\tvar tan30Dx = (0.5 - tan30) / 2;\n\t\tvar m = Math.min(w, h / (0.5 + tan30));\n\t\tvar dx = (w - m) / 2;\n\t\tvar dy = (h - m) / 2;\n\n\t\tconstr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, dx, dy + 0.25 * m));\n\t\tconstr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, dx + 0.5 * m, dy + m * tan30Dx));\n\t\tconstr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, dx + m, dy + 0.25 * m));\n\t\tconstr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, dx + m, dy + 0.75 * m));\n\t\tconstr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, dx + 0.5 * m, dy + (1 - tan30Dx) * m));\n\t\tconstr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, dx, dy + 0.75 * m));\n\n\t\treturn (constr);\n\t};\n\n\tIsoCubeShape2.prototype.getConstraints = function(style, w, h)\n\t{\n\t\tvar constr = [];\n\t\tvar isoAngle = Math.max(0.01, Math.min(94, parseFloat(mxUtils.getValue(this.style, 'isoAngle', this.isoAngle)))) * Math.PI / 200 ;\n\t\tvar isoH = Math.min(w * Math.tan(isoAngle), h * 0.5);\n\t\t\n\t\tconstr.push(new mxConnectionConstraint(new mxPoint(0.5, 0), false));\n\t\tconstr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w, isoH));\n\t\tconstr.push(new mxConnectionConstraint(new mxPoint(1, 0.5), false));\n\t\tconstr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w, h - isoH));\n\t\tconstr.push(new mxConnectionConstraint(new mxPoint(0.5, 1), false));\n\t\tconstr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, 0, h - isoH));\n\t\tconstr.push(new mxConnectionConstraint(new mxPoint(0, 0.5), false));\n\t\tconstr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, 0, isoH));\n\n\t\treturn (constr);\n\t}\n\t\n\tCalloutShape.prototype.getConstraints = function(style, w, h)\n\t{\n\t\tvar constr = [];\n\t\tvar arcSize = mxUtils.getValue(this.style, mxConstants.STYLE_ARCSIZE, mxConstants.LINE_ARCSIZE) / 2;\n\t\tvar s = Math.max(0, Math.min(h, parseFloat(mxUtils.getValue(this.style, 'size', this.size))));\n\t\tvar dx = w * Math.max(0, Math.min(1, parseFloat(mxUtils.getValue(this.style, 'position', this.position))));\n\t\tvar dx2 = w * Math.max(0, Math.min(1, parseFloat(mxUtils.getValue(this.style, 'position2', this.position2))));\n\t\tvar base = Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'base', this.base))));\n\t\t\n\t\tconstr.push(new mxConnectionConstraint(new mxPoint(0, 0), false));\n\t\tconstr.push(new mxConnectionConstraint(new mxPoint(0.25, 0), false));\n\t\tconstr.push(new mxConnectionConstraint(new mxPoint(0.5, 0), false));\n\t\tconstr.push(new mxConnectionConstraint(new mxPoint(0.75, 0), false));\n\t\tconstr.push(new mxConnectionConstraint(new mxPoint(1, 0), false));\n\t\tconstr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w, (h - s) * 0.5));\n\t\tconstr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w, h - s));\n\t\tconstr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, dx2, h));\n\t\tconstr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, 0, h - s));\n\t\tconstr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, 0, (h - s) * 0.5));\n\t\t\n\t\tif (w >= s * 2)\n\t\t{\n\t\t\tconstr.push(new mxConnectionConstraint(new mxPoint(0.5, 0), false));\n\t\t}\n\n\t\treturn (constr);\n\t};\n\t\n\tmxRectangleShape.prototype.constraints = [new mxConnectionConstraint(new mxPoint(0, 0), true),\n\t\t\t\t\t\t\t\t\t\t\t  new mxConnectionConstraint(new mxPoint(0.25, 0), true),\n\t                                          new mxConnectionConstraint(new mxPoint(0.5, 0), true),\n\t                                          new mxConnectionConstraint(new mxPoint(0.75, 0), true),\n\t                                          new mxConnectionConstraint(new mxPoint(1, 0), true),\n\t        \t              \t\t new mxConnectionConstraint(new mxPoint(0, 0.25), true),\n\t        \t              \t\t new mxConnectionConstraint(new mxPoint(0, 0.5), true),\n\t        \t              \t\t new mxConnectionConstraint(new mxPoint(0, 0.75), true),\n\t        \t            \t\t new mxConnectionConstraint(new mxPoint(1, 0.25), true),\n\t        \t            \t\t new mxConnectionConstraint(new mxPoint(1, 0.5), true),\n\t        \t            \t\t new mxConnectionConstraint(new mxPoint(1, 0.75), true),\n\t        \t            \t\t new mxConnectionConstraint(new mxPoint(0, 1), true),\n\t        \t            \t\t new mxConnectionConstraint(new mxPoint(0.25, 1), true),\n\t        \t            \t\t new mxConnectionConstraint(new mxPoint(0.5, 1), true),\n\t        \t            \t\t new mxConnectionConstraint(new mxPoint(0.75, 1), true),\n\t        \t            \t\t new mxConnectionConstraint(new mxPoint(1, 1), true)];\n\tmxEllipse.prototype.constraints = [new mxConnectionConstraint(new mxPoint(0, 0), true), new mxConnectionConstraint(new mxPoint(1, 0), true),\n\t                                   new mxConnectionConstraint(new mxPoint(0, 1), true), new mxConnectionConstraint(new mxPoint(1, 1), true),\n\t                                   new mxConnectionConstraint(new mxPoint(0.5, 0), true), new mxConnectionConstraint(new mxPoint(0.5, 1), true),\n\t          \t              \t\t   new mxConnectionConstraint(new mxPoint(0, 0.5), true), new mxConnectionConstraint(new mxPoint(1, 0.5))];\n\tPartialRectangleShape.prototype.constraints = mxRectangleShape.prototype.constraints;\n\tmxImageShape.prototype.constraints = mxRectangleShape.prototype.constraints;\n\tmxSwimlane.prototype.constraints = mxRectangleShape.prototype.constraints;\n\tPlusShape.prototype.constraints = mxRectangleShape.prototype.constraints;\n\tmxLabel.prototype.constraints = mxRectangleShape.prototype.constraints;\n\t\n\tNoteShape.prototype.getConstraints = function(style, w, h)\n\t{\n\t\tvar constr = [];\n\t\tvar s = Math.max(0, Math.min(w, Math.min(h, parseFloat(mxUtils.getValue(this.style, 'size', this.size)))));\n\t\t\n\t\tconstr.push(new mxConnectionConstraint(new mxPoint(0, 0), false));\n\t\tconstr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, (w - s) * 0.5, 0));\n\t\tconstr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w - s, 0));\n\t\tconstr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w - s * 0.5, s * 0.5));\n\t\tconstr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w, s));\n\t\tconstr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w, (h + s) * 0.5 ));\n\t\tconstr.push(new mxConnectionConstraint(new mxPoint(1, 1), false));\n\t\tconstr.push(new mxConnectionConstraint(new mxPoint(0.5, 1), false));\n\t\tconstr.push(new mxConnectionConstraint(new mxPoint(0, 1), false));\n\t\tconstr.push(new mxConnectionConstraint(new mxPoint(0, 0.5), false));\n\t\t\n\t\tif (w >= s * 2)\n\t\t{\n\t\t\tconstr.push(new mxConnectionConstraint(new mxPoint(0.5, 0), false));\n\t\t}\n\n\t\treturn (constr);\n\t};\n\t\n\tCardShape.prototype.getConstraints = function(style, w, h)\n\t{\n\t\tvar constr = [];\n\t\tvar s = Math.max(0, Math.min(w, Math.min(h, parseFloat(mxUtils.getValue(this.style, 'size', this.size)))));\n\t\t\n\t\tconstr.push(new mxConnectionConstraint(new mxPoint(1, 0), false));\n\t\tconstr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, (w + s) * 0.5, 0));\n\t\tconstr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, s, 0));\n\t\tconstr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, s * 0.5, s * 0.5));\n\t\tconstr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, 0, s));\n\t\tconstr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, 0, (h + s) * 0.5 ));\n\t\tconstr.push(new mxConnectionConstraint(new mxPoint(0, 1), false));\n\t\tconstr.push(new mxConnectionConstraint(new mxPoint(0.5, 1), false));\n\t\tconstr.push(new mxConnectionConstraint(new mxPoint(1, 1), false));\n\t\tconstr.push(new mxConnectionConstraint(new mxPoint(1, 0.5), false));\n\t\t\n\t\tif (w >= s * 2)\n\t\t{\n\t\t\tconstr.push(new mxConnectionConstraint(new mxPoint(0.5, 0), false));\n\t\t}\n\n\t\treturn (constr);\n\t};\n\t\n\tCubeShape.prototype.getConstraints = function(style, w, h)\n\t{\n\t\tvar constr = [];\n\t\tvar s = Math.max(0, Math.min(w, Math.min(h, parseFloat(mxUtils.getValue(this.style, 'size', this.size)))));\n\t\t\n\t\tconstr.push(new mxConnectionConstraint(new mxPoint(0, 0), false));\n\t\tconstr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, (w - s) * 0.5, 0));\n\t\tconstr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w - s, 0));\n\t\tconstr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w - s * 0.5, s * 0.5));\n\t\tconstr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w, s));\n\t\tconstr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w, (h + s) * 0.5));\n\t\tconstr.push(new mxConnectionConstraint(new mxPoint(1, 1), false));\n\t\tconstr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, (w + s) * 0.5, h));\n\t\tconstr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, s, h));\n\t\tconstr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, s * 0.5, h - s * 0.5));\n\t\tconstr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, 0, h - s));\n\t\tconstr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, 0, (h - s) * 0.5));\n\t\t\n\t\treturn (constr);\n\t};\n\t\n\tCylinderShape3.prototype.getConstraints = function(style, w, h)\n\t{\n\t\tvar constr = [];\n\t\tvar s = Math.max(0, Math.min(h, parseFloat(mxUtils.getValue(this.style, 'size', this.size))));\n\t\t\n\t\tconstr.push(new mxConnectionConstraint(new mxPoint(0.5, 0), false));\n\t\tconstr.push(new mxConnectionConstraint(new mxPoint(0, 0.5), false));\n\t\tconstr.push(new mxConnectionConstraint(new mxPoint(0.5, 1), false));\n\t\tconstr.push(new mxConnectionConstraint(new mxPoint(1, 0.5), false));\n\t\t\n\t\tconstr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, 0, s));\n\t\tconstr.push(new mxConnectionConstraint(new mxPoint(1, 0), false, null, 0, s));\n\t\tconstr.push(new mxConnectionConstraint(new mxPoint(1, 1), false, null, 0, -s));\n\t\tconstr.push(new mxConnectionConstraint(new mxPoint(0, 1), false, null, 0, -s));\n\t\t\n\t\tconstr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, 0, s + (h * 0.5 - s) * 0.5));\n\t\tconstr.push(new mxConnectionConstraint(new mxPoint(1, 0), false, null, 0, s + (h * 0.5 - s) * 0.5));\n\t\tconstr.push(new mxConnectionConstraint(new mxPoint(1, 0), false, null, 0, h - s - (h * 0.5 - s) * 0.5));\n\t\tconstr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, 0, h - s - (h * 0.5 - s) * 0.5));\n\n\t\tconstr.push(new mxConnectionConstraint(new mxPoint(0.145, 0), false, null, 0, s * 0.29));\n\t\tconstr.push(new mxConnectionConstraint(new mxPoint(0.855, 0), false, null, 0, s * 0.29));\n\t\tconstr.push(new mxConnectionConstraint(new mxPoint(0.855, 1), false, null, 0, -s * 0.29));\n\t\tconstr.push(new mxConnectionConstraint(new mxPoint(0.145, 1), false, null, 0, -s * 0.29));\n\t\t\n\t\treturn (constr);\n\t};\n\t\n\tFolderShape.prototype.getConstraints = function(style, w, h)\n\t{\n\t\tvar constr = [];\n\t\tvar dx = Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'tabWidth', this.tabWidth))));\n\t\tvar dy = Math.max(0, Math.min(h, parseFloat(mxUtils.getValue(this.style, 'tabHeight', this.tabHeight))));\n\t\tvar tp = mxUtils.getValue(this.style, 'tabPosition', this.tabPosition);\n\n\t\tif (tp == 'left')\n\t\t{\n\t\t\tconstr.push(new mxConnectionConstraint(new mxPoint(0, 0), false));\n\t\t\tconstr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, dx * 0.5, 0));\n\t\t\tconstr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, dx, 0));\n\t\t\tconstr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, dx, dy));\n\t\t\tconstr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, (w + dx) * 0.5, dy));\n\t\t}\n\t\telse\n\t\t{\n\t\t\tconstr.push(new mxConnectionConstraint(new mxPoint(1, 0), false));\n\t\t\tconstr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w - dx * 0.5, 0));\n\t\t\tconstr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w - dx, 0));\n\t\t\tconstr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w - dx, dy));\n\t\t\tconstr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, (w - dx) * 0.5, dy));\n\t\t}\n\t\t\n\t\tconstr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w, dy));\n\t\tconstr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w, (h - dy) * 0.25 + dy));\n\t\tconstr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w, (h - dy) * 0.5 + dy));\n\t\tconstr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w, (h - dy) * 0.75 + dy));\n\t\tconstr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w, h));\n\t\tconstr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, 0, dy));\n\t\tconstr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, 0, (h - dy) * 0.25 + dy));\n\t\tconstr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, 0, (h - dy) * 0.5 + dy));\n\t\tconstr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, 0, (h - dy) * 0.75 + dy));\n\t\tconstr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, 0, h));\n\t\tconstr.push(new mxConnectionConstraint(new mxPoint(0.25, 1), false));\n\t\tconstr.push(new mxConnectionConstraint(new mxPoint(0.5, 1), false));\n\t\tconstr.push(new mxConnectionConstraint(new mxPoint(0.75, 1), false));\n\n\t\treturn (constr);\n\t}\n\n\tInternalStorageShape.prototype.constraints = mxRectangleShape.prototype.constraints;\n\tDataStorageShape.prototype.constraints = mxRectangleShape.prototype.constraints;\n\tTapeDataShape.prototype.constraints = mxEllipse.prototype.constraints;\n\tOrEllipseShape.prototype.constraints = mxEllipse.prototype.constraints;\n\tSumEllipseShape.prototype.constraints = mxEllipse.prototype.constraints;\n\tLineEllipseShape.prototype.constraints = mxEllipse.prototype.constraints;\n\tManualInputShape.prototype.constraints = mxRectangleShape.prototype.constraints;\n\tDelayShape.prototype.constraints = mxRectangleShape.prototype.constraints;\n\n\tDisplayShape.prototype.getConstraints = function(style, w, h)\n\t{\n\t\tvar constr = [];\n\t\tvar dx = Math.min(w, h / 2);\n\t\tvar s = Math.min(w - dx, Math.max(0, parseFloat(mxUtils.getValue(this.style, 'size', this.size))) * w);\n\t\t\n\t\tconstr.push(new mxConnectionConstraint(new mxPoint(0, 0.5), false, null));\n\t\tconstr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, s, 0));\n\t\tconstr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, (s + w - dx) * 0.5, 0));\n\t\tconstr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w - dx, 0));\n\t\tconstr.push(new mxConnectionConstraint(new mxPoint(1, 0.5), false, null));\n\t\tconstr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w - dx, h));\n\t\tconstr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, (s + w - dx) * 0.5, h));\n\t\tconstr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, s, h));\n\t\t\n\t\treturn (constr);\n\t};\n\t\n\tModuleShape.prototype.getConstraints = function(style, w, h)\n\t{\n\t\tvar x0 = parseFloat(mxUtils.getValue(style, 'jettyWidth', ModuleShape.prototype.jettyWidth)) / 2;\n\t\tvar dy = parseFloat(mxUtils.getValue(style, 'jettyHeight', ModuleShape.prototype.jettyHeight));\n\t\tvar constr = [new mxConnectionConstraint(new mxPoint(0, 0), false, null, x0),\n\t\t\tnew mxConnectionConstraint(new mxPoint(0.25, 0), true),\n\t\t\tnew mxConnectionConstraint(new mxPoint(0.5, 0), true),\n\t\t\tnew mxConnectionConstraint(new mxPoint(0.75, 0), true),\n\t\t\tnew mxConnectionConstraint(new mxPoint(1, 0), true),\n\t\t\tnew mxConnectionConstraint(new mxPoint(1, 0.25), true),\n\t\t\tnew mxConnectionConstraint(new mxPoint(1, 0.5), true),\n\t\t\tnew mxConnectionConstraint(new mxPoint(1, 0.75), true),\n\t\t\tnew mxConnectionConstraint(new mxPoint(0, 1), false, null, x0),\n\t\t\tnew mxConnectionConstraint(new mxPoint(0.25, 1), true),\n\t\t\tnew mxConnectionConstraint(new mxPoint(0.5, 1), true),\n\t\t\tnew mxConnectionConstraint(new mxPoint(0.75, 1), true),\n\t\t\tnew mxConnectionConstraint(new mxPoint(1, 1), true),\n\t\t\tnew mxConnectionConstraint(new mxPoint(0, 0), false, null, 0, Math.min(h - 0.5 * dy, 1.5 * dy)),\n\t\t\tnew mxConnectionConstraint(new mxPoint(0, 0), false, null, 0, Math.min(h - 0.5 * dy, 3.5 * dy))];\n\t\t\n\t\tif (h > 5 * dy)\n\t\t{\n\t\t\tconstr.push(new mxConnectionConstraint(new mxPoint(0, 0.75), false, null, x0));\n\t\t}\n\t\t\n\t\tif (h > 8 * dy)\n\t\t{\n\t\t\tconstr.push(new mxConnectionConstraint(new mxPoint(0, 0.5), false, null, x0));\n\t\t}\n\t\t\n\t\tif (h > 15 * dy)\n\t\t{\n\t\t\tconstr.push(new mxConnectionConstraint(new mxPoint(0, 0.25), false, null, x0));\n\t\t}\n\t\t\n\t\treturn constr;\n\t};\n\t\n\tLoopLimitShape.prototype.constraints = mxRectangleShape.prototype.constraints;\n\tOffPageConnectorShape.prototype.constraints = mxRectangleShape.prototype.constraints;\n\tmxCylinder.prototype.constraints = [new mxConnectionConstraint(new mxPoint(0.15, 0.05), false),\n                                        new mxConnectionConstraint(new mxPoint(0.5, 0), true),\n                                        new mxConnectionConstraint(new mxPoint(0.85, 0.05), false),\n      \t              \t\t new mxConnectionConstraint(new mxPoint(0, 0.3), true),\n      \t              \t\t new mxConnectionConstraint(new mxPoint(0, 0.5), true),\n      \t              \t\t new mxConnectionConstraint(new mxPoint(0, 0.7), true),\n      \t            \t\t new mxConnectionConstraint(new mxPoint(1, 0.3), true),\n      \t            \t\t new mxConnectionConstraint(new mxPoint(1, 0.5), true),\n      \t            \t\t new mxConnectionConstraint(new mxPoint(1, 0.7), true),\n      \t            \t\t new mxConnectionConstraint(new mxPoint(0.15, 0.95), false),\n      \t            \t\t new mxConnectionConstraint(new mxPoint(0.5, 1), true),\n      \t            \t\t new mxConnectionConstraint(new mxPoint(0.85, 0.95), false)];\n\tUmlActorShape.prototype.constraints = [new mxConnectionConstraint(new mxPoint(0.25, 0.1), false),\n\t                                          new mxConnectionConstraint(new mxPoint(0.5, 0), false),\n\t                                          new mxConnectionConstraint(new mxPoint(0.75, 0.1), false),\n\t        \t              \t\t new mxConnectionConstraint(new mxPoint(0, 1/3), false),\n\t        \t              \t\t new mxConnectionConstraint(new mxPoint(0, 1), false),\n\t        \t            \t\t new mxConnectionConstraint(new mxPoint(1, 1/3), false),\n\t        \t            \t\t new mxConnectionConstraint(new mxPoint(1, 1), false),\n\t        \t            \t\t new mxConnectionConstraint(new mxPoint(0.5, 0.5), false)];\n\tComponentShape.prototype.constraints = [new mxConnectionConstraint(new mxPoint(0.25, 0), true),\n\t                                          new mxConnectionConstraint(new mxPoint(0.5, 0), true),\n\t                                          new mxConnectionConstraint(new mxPoint(0.75, 0), true),\n\t        \t              \t\t new mxConnectionConstraint(new mxPoint(0, 0.3), true),\n\t        \t              \t\t new mxConnectionConstraint(new mxPoint(0, 0.7), true),\n\t        \t            \t\t new mxConnectionConstraint(new mxPoint(1, 0.25), true),\n\t        \t            \t\t new mxConnectionConstraint(new mxPoint(1, 0.5), true),\n\t        \t            \t\t new mxConnectionConstraint(new mxPoint(1, 0.75), true),\n\t        \t            \t\t new mxConnectionConstraint(new mxPoint(0.25, 1), true),\n\t        \t            \t\t new mxConnectionConstraint(new mxPoint(0.5, 1), true),\n\t        \t            \t\t new mxConnectionConstraint(new mxPoint(0.75, 1), true)];\n\tmxActor.prototype.constraints = [new mxConnectionConstraint(new mxPoint(0.5, 0), true),\n   \t              \t\t new mxConnectionConstraint(new mxPoint(0.25, 0.2), false),\n   \t              \t\t new mxConnectionConstraint(new mxPoint(0.1, 0.5), false),\n   \t              \t\t new mxConnectionConstraint(new mxPoint(0, 0.75), true),\n   \t            \t\t new mxConnectionConstraint(new mxPoint(0.75, 0.25), false),\n   \t            \t\t new mxConnectionConstraint(new mxPoint(0.9, 0.5), false),\n   \t            \t\t new mxConnectionConstraint(new mxPoint(1, 0.75), true),\n   \t            \t\t new mxConnectionConstraint(new mxPoint(0.25, 1), true),\n   \t            \t\t new mxConnectionConstraint(new mxPoint(0.5, 1), true),\n   \t            \t\t new mxConnectionConstraint(new mxPoint(0.75, 1), true)];\n\tSwitchShape.prototype.constraints = [new mxConnectionConstraint(new mxPoint(0, 0), false),\n                                         new mxConnectionConstraint(new mxPoint(0.5, 0.25), false),\n                                         new mxConnectionConstraint(new mxPoint(1, 0), false),\n\t\t\t       \t              \t\t new mxConnectionConstraint(new mxPoint(0.25, 0.5), false),\n\t\t\t       \t              \t\t new mxConnectionConstraint(new mxPoint(0.75, 0.5), false),\n\t\t\t       \t              \t\t new mxConnectionConstraint(new mxPoint(0, 1), false),\n\t\t\t       \t            \t\t new mxConnectionConstraint(new mxPoint(0.5, 0.75), false),\n\t\t\t       \t            \t\t new mxConnectionConstraint(new mxPoint(1, 1), false)];\n\tTapeShape.prototype.constraints = [new mxConnectionConstraint(new mxPoint(0, 0.35), false),\n\t                                   new mxConnectionConstraint(new mxPoint(0, 0.5), false),\n\t                                   new mxConnectionConstraint(new mxPoint(0, 0.65), false),\n\t                                   new mxConnectionConstraint(new mxPoint(1, 0.35), false),\n\t\t                                new mxConnectionConstraint(new mxPoint(1, 0.5), false),\n\t\t                                new mxConnectionConstraint(new mxPoint(1, 0.65), false),\n\t\t\t\t\t\t\t\t\t\tnew mxConnectionConstraint(new mxPoint(0.25, 1), false),\n\t\t\t\t\t\t\t\t\t\tnew mxConnectionConstraint(new mxPoint(0.75, 0), false)];\n\tStepShape.prototype.constraints = [new mxConnectionConstraint(new mxPoint(0.25, 0), true),\n\t\t\t\t\t\t\t\t\tnew mxConnectionConstraint(new mxPoint(0.5, 0), true),\n\t\t\t\t\t\t\t\t\tnew mxConnectionConstraint(new mxPoint(0.75, 0), true),\n\t\t\t\t\t\t\t\t\tnew mxConnectionConstraint(new mxPoint(0.25, 1), true),\n\t\t\t\t\t\t\t\t\tnew mxConnectionConstraint(new mxPoint(0.5, 1), true),\n\t\t\t\t\t\t\t\t\tnew mxConnectionConstraint(new mxPoint(0.75, 1), true),\n\t\t\t\t\t\t\t\t\tnew mxConnectionConstraint(new mxPoint(0, 0.25), true),\n\t\t\t\t\t\t\t\t\tnew mxConnectionConstraint(new mxPoint(0, 0.5), true),\n\t\t\t\t\t\t\t\t\tnew mxConnectionConstraint(new mxPoint(0, 0.75), true),\n\t\t\t\t\t\t\t\t\tnew mxConnectionConstraint(new mxPoint(1, 0.25), true),\n\t\t\t\t\t\t\t\t\tnew mxConnectionConstraint(new mxPoint(1, 0.5), true),\n\t\t\t\t\t\t\t\t\tnew mxConnectionConstraint(new mxPoint(1, 0.75), true)];\n\tmxLine.prototype.constraints = [new mxConnectionConstraint(new mxPoint(0, 0.5), false),\n\t                                new mxConnectionConstraint(new mxPoint(0.25, 0.5), false),\n\t                                new mxConnectionConstraint(new mxPoint(0.75, 0.5), false),\n\t\t\t\t\t\t\t\t\tnew mxConnectionConstraint(new mxPoint(1, 0.5), false)];\n\tLollipopShape.prototype.constraints = [new mxConnectionConstraint(new mxPoint(0.5, 0), false),\n\t\t\t\t\t\t\t\t\t\tnew mxConnectionConstraint(new mxPoint(0.5, 1), false)];\n\tmxDoubleEllipse.prototype.constraints = mxEllipse.prototype.constraints;\n\tmxRhombus.prototype.constraints = mxEllipse.prototype.constraints;\n\tmxTriangle.prototype.constraints = [new mxConnectionConstraint(new mxPoint(0, 0.25), true),\n\t                                    new mxConnectionConstraint(new mxPoint(0, 0.5), true),\n\t                                   new mxConnectionConstraint(new mxPoint(0, 0.75), true),\n\t                                   new mxConnectionConstraint(new mxPoint(0.5, 0), true),\n\t                                   new mxConnectionConstraint(new mxPoint(0.5, 1), true),\n\t                                   new mxConnectionConstraint(new mxPoint(1, 0.5), true)];\n\tmxHexagon.prototype.constraints = [new mxConnectionConstraint(new mxPoint(0.375, 0), true),\n\t                                    new mxConnectionConstraint(new mxPoint(0.5, 0), true),\n\t                                   new mxConnectionConstraint(new mxPoint(0.625, 0), true),\n\t                                   new mxConnectionConstraint(new mxPoint(0, 0.25), true),\n\t                                   new mxConnectionConstraint(new mxPoint(0, 0.5), true),\n\t                                   new mxConnectionConstraint(new mxPoint(0, 0.75), true),\n\t                                   new mxConnectionConstraint(new mxPoint(1, 0.25), true),\n\t                                   new mxConnectionConstraint(new mxPoint(1, 0.5), true),\n\t                                   new mxConnectionConstraint(new mxPoint(1, 0.75), true),\n\t                                   new mxConnectionConstraint(new mxPoint(0.375, 1), true),\n\t                                    new mxConnectionConstraint(new mxPoint(0.5, 1), true),\n\t                                   new mxConnectionConstraint(new mxPoint(0.625, 1), true)];\n\tmxCloud.prototype.constraints = [new mxConnectionConstraint(new mxPoint(0.25, 0.25), false),\n\t                                 new mxConnectionConstraint(new mxPoint(0.4, 0.1), false),\n\t                                 new mxConnectionConstraint(new mxPoint(0.16, 0.55), false),\n\t                                 new mxConnectionConstraint(new mxPoint(0.07, 0.4), false),\n\t                                 new mxConnectionConstraint(new mxPoint(0.31, 0.8), false),\n\t                                 new mxConnectionConstraint(new mxPoint(0.13, 0.77), false),\n\t                                 new mxConnectionConstraint(new mxPoint(0.8, 0.8), false),\n\t                                 new mxConnectionConstraint(new mxPoint(0.55, 0.95), false),\n\t                                 new mxConnectionConstraint(new mxPoint(0.875, 0.5), false),\n\t                                 new mxConnectionConstraint(new mxPoint(0.96, 0.7), false),\n\t                                 new mxConnectionConstraint(new mxPoint(0.625, 0.2), false),\n\t                                 new mxConnectionConstraint(new mxPoint(0.88, 0.25), false)];\n\tParallelogramShape.prototype.constraints = mxRectangleShape.prototype.constraints;\n\tTrapezoidShape.prototype.constraints = mxRectangleShape.prototype.constraints;\n\tDocumentShape.prototype.constraints = [new mxConnectionConstraint(new mxPoint(0.25, 0), true),\n\t                                          new mxConnectionConstraint(new mxPoint(0.5, 0), true),\n\t                                          new mxConnectionConstraint(new mxPoint(0.75, 0), true),\n\t        \t              \t\t new mxConnectionConstraint(new mxPoint(0, 0.25), true),\n\t        \t              \t\t new mxConnectionConstraint(new mxPoint(0, 0.5), true),\n\t        \t              \t\t new mxConnectionConstraint(new mxPoint(0, 0.75), true),\n\t        \t            \t\t new mxConnectionConstraint(new mxPoint(1, 0.25), true),\n\t        \t            \t\t new mxConnectionConstraint(new mxPoint(1, 0.5), true),\n\t        \t            \t\t new mxConnectionConstraint(new mxPoint(1, 0.75), true)];\n\tmxArrow.prototype.constraints = null;\n\n\tTeeShape.prototype.getConstraints = function(style, w, h)\n\t{\n\t\tvar constr = [];\n\t\tvar dx = Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'dx', this.dx))));\n\t\tvar dy = Math.max(0, Math.min(h, parseFloat(mxUtils.getValue(this.style, 'dy', this.dy))));\n\t\tvar w2 = Math.abs(w - dx) / 2;\n\t\t\n\t\tconstr.push(new mxConnectionConstraint(new mxPoint(0, 0), false));\n\t\tconstr.push(new mxConnectionConstraint(new mxPoint(0.5, 0), false));\n\t\tconstr.push(new mxConnectionConstraint(new mxPoint(1, 0), false));\n\t\tconstr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w, dy * 0.5));\n\t\tconstr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w, dy));\n\t\tconstr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w * 0.75 + dx * 0.25, dy));\n\t\tconstr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, (w + dx) * 0.5, dy));\n\t\tconstr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, (w + dx) * 0.5, (h + dy) * 0.5));\n\t\tconstr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, (w + dx) * 0.5, h));\n\t\tconstr.push(new mxConnectionConstraint(new mxPoint(0.5, 1), false));\n\t\tconstr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, (w - dx) * 0.5, h));\n\t\tconstr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, (w - dx) * 0.5, (h + dy) * 0.5));\n\t\tconstr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, (w - dx) * 0.5, dy));\n\t\tconstr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w * 0.25 - dx * 0.25, dy));\n\t\tconstr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, 0, dy));\n\t\tconstr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, 0, dy * 0.5));\n\t\t\n\t\treturn (constr);\n\t};\n\n\tCornerShape.prototype.getConstraints = function(style, w, h)\n\t{\n\t\tvar constr = [];\n\t\tvar dx = Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'dx', this.dx))));\n\t\tvar dy = Math.max(0, Math.min(h, parseFloat(mxUtils.getValue(this.style, 'dy', this.dy))));\n\t\t\n\t\tconstr.push(new mxConnectionConstraint(new mxPoint(0, 0), false));\n\t\tconstr.push(new mxConnectionConstraint(new mxPoint(0.5, 0), false));\n\t\tconstr.push(new mxConnectionConstraint(new mxPoint(1, 0), false));\n\t\tconstr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w, dy * 0.5));\n\t\tconstr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w, dy));\n\t\tconstr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, (w + dx) * 0.5, dy));\n\t\tconstr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, dx, dy));\n\t\tconstr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, dx, (h + dy) * 0.5));\n\t\tconstr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, dx, h));\n\t\tconstr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, dx * 0.5, h));\n\t\tconstr.push(new mxConnectionConstraint(new mxPoint(0, 0.5), false));\n\t\tconstr.push(new mxConnectionConstraint(new mxPoint(0, 1), false));\n\t\t\n\t\treturn (constr);\n\t};\n\n\tCrossbarShape.prototype.constraints = [new mxConnectionConstraint(new mxPoint(0, 0), false),\n        new mxConnectionConstraint(new mxPoint(0, 0.5), false),\n        new mxConnectionConstraint(new mxPoint(0, 1), false),\n        new mxConnectionConstraint(new mxPoint(0.25, 0.5), false),\n        new mxConnectionConstraint(new mxPoint(0.5, 0.5), false),\n        new mxConnectionConstraint(new mxPoint(0.75, 0.5), false),\n        new mxConnectionConstraint(new mxPoint(1, 0), false),\n        new mxConnectionConstraint(new mxPoint(1, 0.5), false),\n        new mxConnectionConstraint(new mxPoint(1, 1), false)];\n\n\tSingleArrowShape.prototype.getConstraints = function(style, w, h)\n\t{\n\t\tvar constr = [];\n\t\tvar aw = h * Math.max(0, Math.min(1, parseFloat(mxUtils.getValue(this.style, 'arrowWidth', this.arrowWidth))));\n\t\tvar as = w * Math.max(0, Math.min(1, parseFloat(mxUtils.getValue(this.style, 'arrowSize', this.arrowSize))));\n\t\tvar at = (h - aw) / 2;\n\t\tvar ab = at + aw;\n\t\t\n\t\tconstr.push(new mxConnectionConstraint(new mxPoint(0, 0.5), false));\n\t\tconstr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, 0, at));\n\t\tconstr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, (w - as) * 0.5, at));\n\t\tconstr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w - as, 0));\n\t\tconstr.push(new mxConnectionConstraint(new mxPoint(1, 0.5), false));\n\t\tconstr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w - as, h));\n\t\tconstr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, (w - as) * 0.5, h - at));\n\t\tconstr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, 0, h - at));\n\t\t\n\t\treturn (constr);\n\t};\n\t\n\tDoubleArrowShape.prototype.getConstraints = function(style, w, h)\n\t{\n\t\tvar constr = [];\n\t\tvar aw = h * Math.max(0, Math.min(1, parseFloat(mxUtils.getValue(this.style, 'arrowWidth', SingleArrowShape.prototype.arrowWidth))));\n\t\tvar as = w * Math.max(0, Math.min(1, parseFloat(mxUtils.getValue(this.style, 'arrowSize', SingleArrowShape.prototype.arrowSize))));\n\t\tvar at = (h - aw) / 2;\n\t\tvar ab = at + aw;\n\t\t\n\t\tconstr.push(new mxConnectionConstraint(new mxPoint(0, 0.5), false));\n\t\tconstr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, as, 0));\n\t\tconstr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w * 0.5, at));\n\t\tconstr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w - as, 0));\n\t\tconstr.push(new mxConnectionConstraint(new mxPoint(1, 0.5), false));\n\t\tconstr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w - as, h));\n\t\tconstr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w * 0.5, h - at));\n\t\tconstr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, as, h));\n\t\t\n\t\treturn (constr);\n\t};\n\t\n\tCrossShape.prototype.getConstraints = function(style, w, h)\n\t{\n\t\tvar constr = [];\n\t\tvar m = Math.min(h, w);\n\t\tvar size = Math.max(0, Math.min(m, m * parseFloat(mxUtils.getValue(this.style, 'size', this.size))));\n\t\tvar t = (h - size) / 2;\n\t\tvar b = t + size;\n\t\tvar l = (w - size) / 2;\n\t\tvar r = l + size;\n\t\t\n\t\tconstr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, l, t * 0.5));\n\t\tconstr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, l, 0));\n\t\tconstr.push(new mxConnectionConstraint(new mxPoint(0.5, 0), false));\n\t\tconstr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, r, 0));\n\t\tconstr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, r, t * 0.5));\n\t\tconstr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, r, t));\n\t\tconstr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, l, h - t * 0.5));\n\t\tconstr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, l, h));\n\t\tconstr.push(new mxConnectionConstraint(new mxPoint(0.5, 1), false));\n\t\tconstr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, r, h));\n\t\tconstr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, r, h - t * 0.5));\n\t\tconstr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, r, b));\n\t\tconstr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, (w + r) * 0.5, t));\n\t\tconstr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w, t));\n\t\tconstr.push(new mxConnectionConstraint(new mxPoint(1, 0.5), false));\n\t\tconstr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w, b));\n\t\tconstr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, (w + r) * 0.5, b));\n\t\tconstr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, l, b));\n\t\tconstr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, l * 0.5, t));\n\t\tconstr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, 0, t));\n\t\tconstr.push(new mxConnectionConstraint(new mxPoint(0, 0.5), false));\n\t\tconstr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, 0, b));\n\t\tconstr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, l * 0.5, b));\n\t\tconstr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, l, t));\n\n\t\treturn (constr);\n\t};\n\t\n\tUmlLifeline.prototype.constraints = null;\n\tOrShape.prototype.constraints = [new mxConnectionConstraint(new mxPoint(0, 0.25), false),\n\t  \t                             new mxConnectionConstraint(new mxPoint(0, 0.5), false),\n\t  \t                             new mxConnectionConstraint(new mxPoint(0, 0.75), false),\n\t  \t                             new mxConnectionConstraint(new mxPoint(1, 0.5), false),\n\t  \t                             new mxConnectionConstraint(new mxPoint(0.7, 0.1), false),\n\t  \t                             new mxConnectionConstraint(new mxPoint(0.7, 0.9), false)];\n\tXorShape.prototype.constraints = [new mxConnectionConstraint(new mxPoint(0.175, 0.25), false),\n\t  \t                             new mxConnectionConstraint(new mxPoint(0.25, 0.5), false),\n\t  \t                             new mxConnectionConstraint(new mxPoint(0.175, 0.75), false),\n\t  \t                             new mxConnectionConstraint(new mxPoint(1, 0.5), false),\n\t  \t                             new mxConnectionConstraint(new mxPoint(0.7, 0.1), false),\n\t  \t                             new mxConnectionConstraint(new mxPoint(0.7, 0.9), false)];\n\tRequiredInterfaceShape.prototype.constraints = [new mxConnectionConstraint(new mxPoint(0, 0.5), false),\n          new mxConnectionConstraint(new mxPoint(1, 0.5), false)];\n\tProvidedRequiredInterfaceShape.prototype.constraints = [new mxConnectionConstraint(new mxPoint(0, 0.5), false),\n        new mxConnectionConstraint(new mxPoint(1, 0.5), false)];\n})();\n"
  },
  {
    "path": "static/cherry/drawio_demo/Sidebar.js",
    "content": "/**\n * Copyright (c) 2006-2012, JGraph Ltd\n */\n/**\n * Construcs a new sidebar for the given editor.\n */\nfunction Sidebar(editorUi, container)\n{\n\tthis.editorUi = editorUi;\n\tthis.container = container;\n\tthis.palettes = new Object();\n\tthis.taglist = new Object();\n\tthis.lastCreated = 0;\n\tthis.showTooltips = true;\n\tthis.graph = editorUi.createTemporaryGraph(this.editorUi.editor.graph.getStylesheet());\n    this.graph.cellRenderer.minSvgStrokeWidth = this.minThumbStrokeWidth;\n\tthis.graph.cellRenderer.antiAlias = this.thumbAntiAlias;\n\tthis.graph.container.style.visibility = 'hidden';\n\tthis.graph.shapeBackgroundColor = 'transparent';\n\tthis.graph.foldingEnabled = false;\n\n\t// Wrapper for entries and footer\n\tthis.container.style.overflow = 'visible';\n\tthis.wrapper = document.createElement('div');\n\tthis.wrapper.style.position = 'relative';\n\tthis.wrapper.style.overflowX = 'hidden';\n\tthis.wrapper.style.overflowY = 'auto';\n\tthis.wrapper.style.left = '0px';\n\tthis.wrapper.style.top = '0px';\n\tthis.wrapper.style.right = '0px';\n\tthis.wrapper.style.boxSizing = 'border-box';\n\tthis.wrapper.style.maxHeight = 'calc(100% - ' + this.moreShapesHeight + 'px)';\n\tthis.container.appendChild(this.wrapper);\n\n\t//var title = this.createMoreShapes();\n\t//this.container.appendChild(title);\n\n\tdocument.body.appendChild(this.graph.container);\n\t\n\tthis.pointerUpHandler = mxUtils.bind(this, function()\n\t{\n\t\tif (this.tooltipCloseImage == null || this.tooltipCloseImage.style.display == 'none')\n\t\t{\n\t\t\tthis.showTooltips = true;\n\t\t\tthis.hideTooltip();\n\t\t}\n\t});\n\n\tmxEvent.addListener(document, (mxClient.IS_POINTER) ? 'pointerup' : 'mouseup', this.pointerUpHandler);\n\n\tthis.pointerDownHandler = mxUtils.bind(this, function()\n\t{\n\t\tif (this.tooltipCloseImage == null || this.tooltipCloseImage.style.display == 'none')\n\t\t{\n\t\t\tthis.showTooltips = false;\n\t\t\tthis.hideTooltip();\n\t\t}\n\t});\n\t\n\tmxEvent.addListener(document, (mxClient.IS_POINTER) ? 'pointerdown' : 'mousedown', this.pointerDownHandler);\n\t\n\tthis.pointerMoveHandler = mxUtils.bind(this, function(evt)\n\t{\n\t\tif (Date.now() - this.lastCreated > 300 && (this.tooltipCloseImage == null ||\n\t\t\tthis.tooltipCloseImage.style.display == 'none'))\n\t\t{\n\t\t\tvar src = mxEvent.getSource(evt);\n\t\t\t\n\t\t\twhile (src != null)\n\t\t\t{\n\t\t\t\tif (src == this.currentElt)\n\t\t\t\t{\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tsrc = src.parentNode;\n\t\t\t}\n\t\t\t\n\t\t\tthis.hideTooltip();\n\t\t}\n\t});\n\n\tmxEvent.addListener(document, (mxClient.IS_POINTER) ? 'pointermove' : 'mousemove', this.pointerMoveHandler);\n\n\t// Handles mouse leaving the window\n\tthis.pointerOutHandler = mxUtils.bind(this, function(evt)\n\t{\n\t\tif (evt.toElement == null && evt.relatedTarget == null)\n\t\t{\n\t\t\tthis.hideTooltip();\n\t\t}\n\t});\n\t\n\tmxEvent.addListener(document, (mxClient.IS_POINTER) ? 'pointerout' : 'mouseout', this.pointerOutHandler);\n\n\t// Enables tooltips after scroll\n\tmxEvent.addListener(container, 'scroll', mxUtils.bind(this, function()\n\t{\n\t\tthis.showTooltips = true;\n\t\tthis.hideTooltip();\n\t}));\n\t\n\tthis.init();\n};\n\n/**\n * Adds all palettes to the sidebar.\n */\nSidebar.prototype.init = function()\n{\n\tvar dir = STENCIL_PATH;\n\t\n\tthis.addSearchPalette(true);\n\tthis.addGeneralPalette(true);\n\tthis.addMiscPalette(false);\n\tthis.addAdvancedPalette(false);\n\tthis.addBasicPalette(dir);\n\t\n\tthis.setCurrentSearchEntryLibrary('arrows');\n\tthis.addStencilPalette('arrows', mxResources.get('arrows'), dir + '/arrows.xml',\n\t\t';whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#000000;strokeWidth=2');\n\tthis.setCurrentSearchEntryLibrary();\n\t\n\tthis.addUmlPalette(false);\n\tif(this['addBpmnPalette'] !== undefined){ this.addBpmnPalette(dir, false); }\n\t\n\tthis.setCurrentSearchEntryLibrary('flowchart');\n\tthis.addStencilPalette('flowchart', 'Flowchart', dir + '/flowchart.xml',\n\t\t';whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#000000;strokeWidth=2');\n\tthis.setCurrentSearchEntryLibrary();\n\t\n\tthis.setCurrentSearchEntryLibrary('clipart');\n\tthis.addImagePalette('clipart', mxResources.get('clipart'), dir + '/clipart/', '_128x128.png',\n\t\t['Earth_globe', 'Empty_Folder', 'Full_Folder', 'Gear', 'Lock', 'Software', 'Virus', 'Email',\n\t\t 'Database', 'Router_Icon', 'iPad', 'iMac', 'Laptop', 'MacBook', 'Monitor_Tower', 'Printer',\n\t\t 'Server_Tower', 'Workstation', 'Firewall_02', 'Wireless_Router_N', 'Credit_Card',\n\t\t 'Piggy_Bank', 'Graph', 'Safe', 'Shopping_Cart', 'Suit1', 'Suit2', 'Suit3', 'Pilot1',\n\t\t 'Worker1', 'Soldier1', 'Doctor1', 'Tech1', 'Security1', 'Telesales1'], null,\n\t\t {'Wireless_Router_N': 'wireless router switch wap wifi access point wlan',\n\t\t  'Router_Icon': 'router switch'});\n\tthis.setCurrentSearchEntryLibrary();\n};\n\n/**\n * Sets the default font size.\n */\nSidebar.prototype.collapsedImage = (!mxClient.IS_SVG) ? IMAGE_PATH + '/collapsed.gif' : 'data:image/gif;base64,R0lGODlhDQANAIABAJmZmf///yH/C1hNUCBEYXRhWE1QPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS4wLWMwNjAgNjEuMTM0Nzc3LCAyMDEwLzAyLzEyLTE3OjMyOjAwICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOnhtcE1NPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvbW0vIiB4bWxuczpzdFJlZj0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL3NUeXBlL1Jlc291cmNlUmVmIyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1IE1hY2ludG9zaCIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDozNUQyRTJFNjZGNUYxMUU1QjZEOThCNDYxMDQ2MzNCQiIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDozNUQyRTJFNzZGNUYxMUU1QjZEOThCNDYxMDQ2MzNCQiI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOjFERjc3MEUxNkY1RjExRTVCNkQ5OEI0NjEwNDYzM0JCIiBzdFJlZjpkb2N1bWVudElEPSJ4bXAuZGlkOjFERjc3MEUyNkY1RjExRTVCNkQ5OEI0NjEwNDYzM0JCIi8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+Af/+/fz7+vn49/b19PPy8fDv7u3s6+rp6Ofm5eTj4uHg397d3Nva2djX1tXU09LR0M/OzczLysnIx8bFxMPCwcC/vr28u7q5uLe2tbSzsrGwr66trKuqqainpqWko6KhoJ+enZybmpmYl5aVlJOSkZCPjo2Mi4qJiIeGhYSDgoGAf359fHt6eXh3dnV0c3JxcG9ubWxramloZ2ZlZGNiYWBfXl1cW1pZWFdWVVRTUlFQT05NTEtKSUhHRkVEQ0JBQD8+PTw7Ojk4NzY1NDMyMTAvLi0sKyopKCcmJSQjIiEgHx4dHBsaGRgXFhUUExIREA8ODQwLCgkIBwYFBAMCAQAAIfkEAQAAAQAsAAAAAA0ADQAAAhSMj6lrwAjcC1GyahV+dcZJgeIIFgA7';\n\n/**\n * Sets the default font size.\n */\nSidebar.prototype.expandedImage = (!mxClient.IS_SVG) ? IMAGE_PATH + '/expanded.gif' : 'data:image/gif;base64,R0lGODlhDQANAIABAJmZmf///yH/C1hNUCBEYXRhWE1QPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS4wLWMwNjAgNjEuMTM0Nzc3LCAyMDEwLzAyLzEyLTE3OjMyOjAwICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOnhtcE1NPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvbW0vIiB4bWxuczpzdFJlZj0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL3NUeXBlL1Jlc291cmNlUmVmIyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1IE1hY2ludG9zaCIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDoxREY3NzBERjZGNUYxMUU1QjZEOThCNDYxMDQ2MzNCQiIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDoxREY3NzBFMDZGNUYxMUU1QjZEOThCNDYxMDQ2MzNCQiI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOjFERjc3MERENkY1RjExRTVCNkQ5OEI0NjEwNDYzM0JCIiBzdFJlZjpkb2N1bWVudElEPSJ4bXAuZGlkOjFERjc3MERFNkY1RjExRTVCNkQ5OEI0NjEwNDYzM0JCIi8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+Af/+/fz7+vn49/b19PPy8fDv7u3s6+rp6Ofm5eTj4uHg397d3Nva2djX1tXU09LR0M/OzczLysnIx8bFxMPCwcC/vr28u7q5uLe2tbSzsrGwr66trKuqqainpqWko6KhoJ+enZybmpmYl5aVlJOSkZCPjo2Mi4qJiIeGhYSDgoGAf359fHt6eXh3dnV0c3JxcG9ubWxramloZ2ZlZGNiYWBfXl1cW1pZWFdWVVRTUlFQT05NTEtKSUhHRkVEQ0JBQD8+PTw7Ojk4NzY1NDMyMTAvLi0sKyopKCcmJSQjIiEgHx4dHBsaGRgXFhUUExIREA8ODQwLCgkIBwYFBAMCAQAAIfkEAQAAAQAsAAAAAA0ADQAAAhGMj6nL3QAjVHIu6azbvPtWAAA7';\n\n/**\n * \n */\nSidebar.prototype.searchImage = (!mxClient.IS_SVG) ? IMAGE_PATH + '/search.png' : 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAYAAABWdVznAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAEaSURBVHjabNGxS5VxFIfxz71XaWuQUJCG/gCHhgTD9VpEETg4aMOlQRp0EoezObgcd220KQiXmpretTAHQRBdojlQEJyukPdt+b1ywfvAGc7wnHP4nlZd1yKijQW8xzNc4Su+ZOYfQ3T6/f4YNvEJYzjELXp4VVXVz263+7cR2niBxAFeZ2YPi3iHR/gYERPDwhpOsd6sz8x/mfkNG3iOlWFhFj8y89J9KvzGXER0GuEaD42mgwHqUtoljbcRsTBCeINpfM/MgZLKPpaxFxGbOCqDXmILN7hoJrTKH+axhxmcYRxP0MIDnOBDZv5q1XUNIuJxifJp+UNV7t7BFM6xeic0RMQ4Bpl5W/ol7GISx/eEUUTECrbx+f8A8xhiZht9zsgAAAAASUVORK5CYII=';\n\n/**\n * Specifies if tooltips should be visible. Default is true.\n */\nSidebar.prototype.enableTooltips = true;\n\n/**\n * Specifies the delay for the tooltip. Default is 16 px.\n */\nSidebar.prototype.tooltipBorder = 16;\n\n/**\n * Specifies the delay for the tooltip. Default is 300 ms.\n */\nSidebar.prototype.tooltipDelay = 300;\n\n/**\n * Specifies the delay for the drop target icons. Default is 200 ms.\n */\nSidebar.prototype.dropTargetDelay = 200;\n\n/**\n * Specifies the URL of the gear image.\n */\nSidebar.prototype.gearImage = STENCIL_PATH + '/clipart/Gear_128x128.png';\n\n/**\n * Specifies the width of the thumbnails.\n */\nSidebar.prototype.thumbWidth = 42;\n\n/**\n * Specifies the height of the thumbnails.\n */\nSidebar.prototype.thumbHeight = 42;\n\n/**\n * Specifies the width of the thumbnails.\n */\nSidebar.prototype.minThumbStrokeWidth = 1;\n\n/**\n * Specifies the width of the thumbnails.\n */\nSidebar.prototype.thumbAntiAlias = false;\n\n/**\n * Specifies the padding for the thumbnails. Default is 3.\n */\nSidebar.prototype.thumbPadding = (document.documentMode >= 5) ? 2 : 3;\n\n/**\n * Specifies the delay for the tooltip. Default is 2 px.\n */\nSidebar.prototype.thumbBorder = 2;\n\n/**\n * Allows for two buttons in the sidebar footer.\n */\nSidebar.prototype.moreShapesHeight = 52;\n\n/**\n * Whether live preview should be enabled. Default is true.\n */\nSidebar.prototype.livePreview = true;\n\n/*\n * Experimental smaller sidebar entries\n */\nif (urlParams['sidebar-entries'] != 'large')\n{\n\tSidebar.prototype.thumbPadding = (document.documentMode >= 5) ? 0 : 1;\n\tSidebar.prototype.thumbBorder = 1;\n\tSidebar.prototype.thumbWidth = 32;\n\tSidebar.prototype.thumbHeight = 30;\n\tSidebar.prototype.minThumbStrokeWidth = 1.3;\n\tSidebar.prototype.thumbAntiAlias = true;\n}\n\n/**\n * Specifies the size of the sidebar titles.\n */\nSidebar.prototype.sidebarTitleSize = 8;\n\n/**\n * Specifies if titles in the sidebar should be enabled.\n */\nSidebar.prototype.sidebarTitles = false;\n\n/**\n * Specifies if titles in the tooltips should be enabled.\n */\nSidebar.prototype.tooltipTitles = true;\n\n/**\n * Specifies if titles in the tooltips should be enabled.\n */\nSidebar.prototype.maxTooltipWidth = 400;\n\n/**\n * Specifies if titles in the tooltips should be enabled.\n */\nSidebar.prototype.maxTooltipHeight = 400;\n\n/**\n * Specifies if stencil files should be loaded and added to the search index\n * when stencil palettes are added. If this is false then the stencil files\n * are lazy-loaded when the palette is shown.\n */\nSidebar.prototype.addStencilsToIndex = true;\n\n/**\n * Specifies the width for clipart images. Default is 80.\n */\nSidebar.prototype.defaultImageWidth = 80;\n\n/**\n * Specifies the height for clipart images. Default is 80.\n */\nSidebar.prototype.defaultImageHeight = 80;\n\n/**\n * Specifies the height for clipart images. Default is 80.\n */\nSidebar.prototype.tooltipMouseDown = null;\n\n/**\n * Reloads the sidebar.\n */\nSidebar.prototype.refresh = function()\n{\n\tvar graph = this.editorUi.editor.graph;\n\tthis.graph.stylesheet.styles = mxUtils.clone(\n\t\tgraph.getDefaultStylesheet().styles);\n\tvar scrollTop = this.wrapper.scrollTop;\n\tthis.wrapper.innerText = '';\n\tvar temp = this.palettes;\n\tthis.palettes = new Object();\n\n\t// Overrides addPalette to restore expanded state\n\tvar addPalette = this.addPalette;\n\n\tthis.addPalette = function(id, title, expanded, onInit)\n\t{\n\t\texpanded = this.wasPaletteExpanded(temp, id, expanded);\n\n\t\treturn addPalette.apply(this, arguments);\n\t};\n\n\tthis.init(temp);\n\n\t// Restores previous implementation\n\tthis.addPalette = addPalette;\n\n\t// Restores scrollbar position\n\twindow.setTimeout(mxUtils.bind(this, function()\n\t{\t\n\t\tthis.wrapper.scrollTop = scrollTop;\n\t}), 0);\n};\n\n/**\n * Overrides the sidebar init.\n */\nSidebar.prototype.wasPaletteExpanded = function(paletteStates, id, defaultExpanded)\n{\n\tvar elts = (paletteStates != null && id != null) ? paletteStates[id] : null;\n\tvar result = defaultExpanded\n\n\tif (elts != null && elts.length == 2 &&\n\t\telts[1].firstChild != null)\n\t{\n\t\tresult = elts[1].firstChild.style.display != 'none';\n\t}\n\n\treturn result;\n};\n\n/**\n * Adds the general palette to the sidebar.\n */\nSidebar.prototype.getEntryContainer = function()\n{\n\treturn this.wrapper;\n};\n\n/**\n * Adds the general palette to the sidebar.\n */\nSidebar.prototype.appendChild = function(child)\n{\n\tthis.wrapper.appendChild(child);\n};\n\n/**\n * Adds all palettes to the sidebar.\n */\nSidebar.prototype.getTooltipOffset = function(elt, bounds)\n{\n\tvar b = document.body;\n\tvar d = document.documentElement;\n\tvar bottom = Math.max(b.clientHeight || 0, d.clientHeight);\n\tvar height = bounds.height + 2 * this.tooltipBorder;\n\t\n\treturn new mxPoint(this.container.offsetWidth + 2 + this.editorUi.container.offsetLeft,\n\t\tMath.min(bottom - height - 20 /*status bar*/, Math.max(0, (this.editorUi.container.offsetTop +\n\t\t\tthis.container.offsetTop + elt.offsetTop - this.wrapper.scrollTop - height / 2 + 16))));\n};\n\n/**\n * Adds all palettes to the sidebar.\n */\nSidebar.prototype.createMoreShapes = function()\n{\n\tvar div =  this.editorUi.createDiv('geSidebarFooter');\n\tdiv.style.position = 'absolute';\n\tdiv.style.overflow = 'hidden';\n\tdiv.style.display = 'inline-flex';\n\tdiv.style.alignItems = 'center';\n\tdiv.style.justifyContent = 'center';\n\tdiv.style.width = '100%';\n\tdiv.style.marginTop = '-1px';\n\tdiv.style.height = this.moreShapesHeight+ 'px';\n\t\n\tvar title = document.createElement('button');\n\ttitle.className = 'geBtn gePrimaryBtn';\n\ttitle.style.display = 'inline-flex';\n\ttitle.style.alignItems = 'center';\n\ttitle.style.whiteSpace = 'nowrap';\n\ttitle.style.padding = '8px';\n\ttitle.style.margin = '0px';\n\ttitle.innerHTML = '<span>+</span>';\n\t\n\tvar span = title.getElementsByTagName('span')[0];\n\tspan.style.fontSize = '18px';\n\tspan.style.marginRight = '5px';\n\n\tmxUtils.write(title, mxResources.get('moreShapes'));\n\n\t// Prevents focus\n\tmxEvent.addListener(title, (mxClient.IS_POINTER) ? 'pointerdown' : 'mousedown',\n\t\tmxUtils.bind(this, function(evt)\n\t{\n\t\tevt.preventDefault();\n\t}));\n\t\n\tmxEvent.addListener(title, 'click', mxUtils.bind(this, function(evt)\n\t{\n\t\tthis.editorUi.actions.get('shapes').funct();\n\t\tmxEvent.consume(evt);\n\t}));\n\t\n\tdiv.appendChild(title);\n\t\n\treturn div;\n};\n\n/**\n * Adds all palettes to the sidebar.\n */\nSidebar.prototype.createTooltip = function(elt, cells, w, h, title, showLabel, off, maxSize, mouseDown, closable, applyAllStyles)\n{\n\tapplyAllStyles = (applyAllStyles != null) ? applyAllStyles : true;\n\tthis.tooltipMouseDown = mouseDown;\n\t\n\t// Lazy creation of the DOM nodes and graph instance\n\tif (this.tooltip == null)\n\t{\n\t\tthis.tooltip = document.createElement('div');\n\t\tthis.tooltip.className = 'geSidebarTooltip';\n\t\tthis.tooltip.style.userSelect = 'none';\n\t\tthis.tooltip.style.zIndex = mxPopupMenu.prototype.zIndex - 1;\n\t\tdocument.body.appendChild(this.tooltip);\n\n\t\tmxEvent.addMouseWheelListener(mxUtils.bind(this, function(evt)\n\t\t{\n\t\t\tthis.hideTooltip();\n\t\t}), this.tooltip);\n\t\t\n\t\tthis.graph2 = new Graph(this.tooltip, null, null, this.editorUi.editor.graph.getStylesheet());\n\t\tthis.graph2.shapeBackgroundColor = 'transparent';\n\t\tthis.graph2.resetViewOnRootChange = false;\n\t\tthis.graph2.foldingEnabled = false;\n\t\tthis.graph2.gridEnabled = false;\n\t\tthis.graph2.autoScroll = false;\n\t\tthis.graph2.setTooltips(false);\n\t\tthis.graph2.setConnectable(false);\n\t\tthis.graph2.setPanning(false);\n\t\tthis.graph2.setEnabled(false);\n\t\t\n\t\t// Blocks all links\n\t\tthis.graph2.openLink = mxUtils.bind(this, function()\n\t\t{\n\t\t\tthis.hideTooltip();\n\t\t});\n\t\t\n\t\tmxEvent.addGestureListeners(this.tooltip, mxUtils.bind(this, function(evt)\n\t\t{\n\t\t\tif (this.tooltipMouseDown != null)\n\t\t\t{\n\t\t\t\tthis.tooltipMouseDown(evt);\n\t\t\t}\n\t\t\t\n\t\t\twindow.setTimeout(mxUtils.bind(this, function()\n\t\t\t{\n\t\t\t\tif (this.tooltipCloseImage == null || this.tooltipCloseImage.style.display == 'none')\n\t\t\t\t{\n\t\t\t\t\tthis.hideTooltip();\n\t\t\t\t}\n\t\t\t}), 0);\n\t\t}), null, mxUtils.bind(this, function(evt)\n\t\t{\n\t\t\tthis.hideTooltip();\n\t\t}));\n\t\t\n\t\tif (!mxClient.IS_SVG)\n\t\t{\n\t\t\tthis.graph2.view.canvas.style.position = 'relative';\n\t\t}\n\n\t\tvar close = document.createElement('img');\n\t\tclose.setAttribute('src', Dialog.prototype.closeImage);\n\t\tclose.setAttribute('title', mxResources.get('close'));\n\t\tclose.style.position = 'absolute';\n\t\tclose.style.cursor = 'default';\n\t\tclose.style.padding = '8px';\n\t\tclose.style.right = '2px';\n\t\tclose.style.top = '2px';\n\t\tthis.tooltip.appendChild(close);\n\t\tthis.tooltipCloseImage = close;\n\t\t\n\t\tmxEvent.addListener(close, 'click', mxUtils.bind(this, function(evt)\n\t\t{\n\t\t\tthis.hideTooltip();\n\t\t\tmxEvent.consume(evt);\n\t\t}));\n\t}\n\t\n\tthis.tooltipCloseImage.style.display = (closable) ? '' : 'none';\n\tthis.graph2.model.clear();\n\tthis.graph2.view.setTranslate(this.tooltipBorder, this.tooltipBorder);\n\t\n\tif (!maxSize && (w > this.maxTooltipWidth || h > this.maxTooltipHeight))\n\t{\n\t\tthis.graph2.view.scale = Math.round(Math.min(this.maxTooltipWidth / w, this.maxTooltipHeight / h) * 100) / 100;\n\t}\n\telse\n\t{\n\t\tthis.graph2.view.scale = 1;\n\t}\n\t\n\tthis.tooltip.style.display = 'block';\n\tthis.graph2.labelsVisible = (showLabel == null || showLabel);\n\tvar fo = mxClient.NO_FO;\n\tmxClient.NO_FO = Editor.prototype.originalNoForeignObject;\n\n\t// Ensures opaque background for edge labels\n\tvar style = mxUtils.getCurrentStyle(this.tooltip);\n\tthis.graph2.shapeBackgroundColor = style.backgroundColor;\n\n\t// Applies current style for preview\n\tvar temp = this.graph2.cloneCells(cells);\n\tthis.editorUi.insertHandler(temp, null, this.graph2.model,\n\t\t(!applyAllStyles) ? this.editorUi.editor.graph.defaultVertexStyle : null,\n\t\t(!applyAllStyles) ? this.editorUi.editor.graph.defaultEdgeStyle : null,\n\t\tapplyAllStyles, true);\n\t\n\tthis.graph2.addCells(temp);\n\n\tmxClient.NO_FO = fo;\n\tvar bounds = this.graph2.getGraphBounds();\n\t\n\t// Maximum size applied with transform for faster repaint\n\tif (maxSize && w > 0 && h > 0 && (bounds.width > w || bounds.height > h))\n\t{\n\t\tvar s = Math.round(Math.min(w / bounds.width, h / bounds.height) * 100) / 100;\n\t\t\n\t\tif (!mxClient.NO_FO)\n\t\t{\n\t\t\tthis.graph2.view.getDrawPane().ownerSVGElement.style.transform = 'scale(' + s + ')';\n\t\t\tthis.graph2.view.getDrawPane().ownerSVGElement.style.transformOrigin = '0 0';\n\t\t\tbounds.width *= s;\n\t\t\tbounds.height *= s;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tthis.graph2.view.setScale(Math.round(Math.min(\n\t\t\t\tthis.maxTooltipWidth / bounds.width,\n\t\t\t\tthis.maxTooltipHeight / bounds.height) * 100) / 100);\n\t\t\tbounds = this.graph2.getGraphBounds();\n\t\t}\n\t}\n\telse if (!mxClient.NO_FO)\n\t{\n\t\tthis.graph2.view.getDrawPane().ownerSVGElement.style.transform = '';\n\t}\n\t\n\tvar width = bounds.width + 2 * this.tooltipBorder + 4;\n\tvar height = bounds.height + 2 * this.tooltipBorder;\n\t\n\tthis.tooltip.style.overflow = 'visible';\n\tthis.tooltip.style.width = width + 'px';\n\tvar w2 = width;\n\t\n\t// Adds title for entry\n\tif (this.tooltipTitles && title != null && title.length > 0)\n\t{\n\t\tif (this.tooltipTitle == null)\n\t\t{\n\t\t\tthis.tooltipTitle = document.createElement('div');\n\t\t\tthis.tooltipTitle.style.borderTop = '1px solid gray';\n\t\t\tthis.tooltipTitle.style.textAlign = 'center';\n\t\t\tthis.tooltipTitle.style.width = '100%';\n\t\t\tthis.tooltipTitle.style.overflow = 'hidden';\n\t\t\tthis.tooltipTitle.style.position = 'absolute';\n\t\t\tthis.tooltipTitle.style.paddingTop = '6px';\n\t\t\tthis.tooltipTitle.style.bottom = '6px';\n\n\t\t\tthis.tooltip.appendChild(this.tooltipTitle);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tthis.tooltipTitle.innerText = '';\n\t\t}\n\t\t\n\t\tthis.tooltipTitle.style.display = '';\n\t\tmxUtils.write(this.tooltipTitle, title);\n\t\t\n\t\t// Allows for wider labels\n\t\tw2 = Math.min(this.maxTooltipWidth, Math.max(width, this.tooltipTitle.scrollWidth + 4));\n\t\tvar ddy = this.tooltipTitle.offsetHeight + 10;\n\t\theight += ddy;\n\t\t\n\t\tif (mxClient.IS_SVG)\n\t\t{\n\t\t\tthis.tooltipTitle.style.marginTop = (2 - ddy) + 'px';\n\t\t}\n\t\telse\n\t\t{\n\t\t\theight -= 6;\n\t\t\tthis.tooltipTitle.style.top = (height - ddy) + 'px';\t\n\t\t}\n\t}\n\telse if (this.tooltipTitle != null && this.tooltipTitle.parentNode != null)\n\t{\n\t\tthis.tooltipTitle.style.display = 'none';\n\t}\n\n\t// Updates width if label is wider\n\tif (w2 > width)\n\t{\n\t\tthis.tooltip.style.width = w2 + 'px';\n\t}\n\t\n\tthis.tooltip.style.height = height + 'px';\n\tvar x0 = -Math.round(bounds.x - this.tooltipBorder) +\n\t\t((w2 > width) ? (w2 - width) / 2 : 0);\n\tvar y0 = -Math.round(bounds.y - this.tooltipBorder);\n\toff = (off != null) ? off : this.getTooltipOffset(elt, bounds);\n\tvar left = off.x;\n\tvar top = off.y;\n\t\n\tif (mxClient.IS_SVG)\n\t{\n\t\tif (x0 != 0 || y0 != 0)\n\t\t{\n\t\t\tthis.graph2.view.canvas.setAttribute('transform', 'translate(' + x0 + ',' + y0 + ')');\n\t\t}\n\t\telse\n\t\t{\n\t\t\tthis.graph2.view.canvas.removeAttribute('transform');\n\t\t}\n\t}\n\telse\n\t{\n\t\tthis.graph2.view.drawPane.style.left = x0 + 'px';\n\t\tthis.graph2.view.drawPane.style.top = y0 + 'px';\n\t}\n\t\n\t// Workaround for ignored position CSS style in IE9\n\t// (changes to relative without the following line)\n\tthis.tooltip.style.position = 'absolute';\n\tthis.tooltip.style.left = left + 'px';\n\tthis.tooltip.style.top = top + 'px';\n\t\n\tmxUtils.fit(this.tooltip);\n\tthis.lastCreated = Date.now();\n};\n\n/**\n * Adds all palettes to the sidebar.\n */\nSidebar.prototype.showTooltip = function(elt, cells, w, h, title, showLabel)\n{\n\tif (this.enableTooltips && this.showTooltips)\n\t{\n\t\tif (this.currentElt != elt)\n\t\t{\n\t\t\tif (this.thread != null)\n\t\t\t{\n\t\t\t\twindow.clearTimeout(this.thread);\n\t\t\t\tthis.thread = null;\n\t\t\t}\n\t\t\t\n\t\t\tvar show = mxUtils.bind(this, function()\n\t\t\t{\n\t\t\t\tthis.createTooltip(elt, cells, w, h, title, showLabel);\n\t\t\t});\n\n\t\t\tif (this.tooltip != null && this.tooltip.style.display != 'none')\n\t\t\t{\n\t\t\t\tshow();\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tthis.thread = window.setTimeout(show, this.tooltipDelay);\n\t\t\t}\n\n\t\t\tthis.currentElt = elt;\n\t\t}\n\t}\n};\n\n/**\n * Hides the current tooltip.\n */\nSidebar.prototype.hideTooltip = function()\n{\n\tif (this.thread != null)\n\t{\n\t\twindow.clearTimeout(this.thread);\n\t\tthis.thread = null;\n\t}\n\t\n\tif (this.tooltip != null)\n\t{\n\t\tthis.tooltip.style.display = 'none';\n\t\tthis.currentElt = null;\n\t}\n\t\n\tthis.tooltipMouseDown = null;\n};\n\n/**\n * Hides the current tooltip.\n */\nSidebar.prototype.addDataEntry = function(tags, width, height, title, data)\n{\n\tif (tags == null)\n\t{\n\t\ttags = '';\n\t}\n\n\tif (title != null)\n\t{\n\t\ttags += ' ' + title;\n\t}\n\n\treturn this.addEntry(tags, mxUtils.bind(this, function()\n\t{\n\t   \treturn this.createVertexTemplateFromData(data, width, height, title);\n\t}));\n};\n\n/**\n * Adds the give entries to the search index.\n */\nSidebar.prototype.addEntries = function(images)\n{\n\tfor (var i = 0; i < images.length; i++)\n\t{\n\t\t(mxUtils.bind(this, function(img)\n\t\t{\n\t\t\tvar data = img.data;\n\t\t\tvar tags = (img.title != null) ? img.title : '';\n\t\t\t\n\t\t\tif (img.tags != null)\n\t\t\t{\n\t\t\t\ttags += ' ' + img.tags;\n\t\t\t}\n\n\t\t\tif (data != null && tags.length > 0)\n\t\t\t{\n\t\t\t\tthis.addEntry(tags, mxUtils.bind(this, function()\n\t\t\t\t{\n\t\t\t\t\tdata = this.editorUi.convertDataUri(data);\n\t\t\t\t\tvar s = 'shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;';\n\t\t\t\t\t\n\t\t\t\t\tif (img.aspect == 'fixed')\n\t\t\t\t\t{\n\t\t\t\t\t\ts += 'aspect=fixed;'\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\treturn this.createVertexTemplate(s + 'image=' +\n\t\t\t\t\t\tdata, img.w, img.h, '', img.title || '', false, false, true)\n\t\t\t\t}));\n\t\t\t}\n\t\t\telse if (img.xml != null && tags.length > 0)\n\t\t\t{\n\t\t\t\tthis.addEntry(tags, mxUtils.bind(this, function()\n\t\t\t\t{\n\t\t\t\t\tvar cells = this.editorUi.stringToCells(Graph.decompress(img.xml));\n\n\t\t\t\t\treturn this.createVertexTemplateFromCells(\n\t\t\t\t\t\tcells, img.w, img.h, img.title || '', true, false, true);\n\t\t\t\t}));\n\t\t\t}\n\t\t}))(images[i]);\n\t}\n};\n\n/**\n * Hides the current tooltip.\n */\nSidebar.prototype.setCurrentSearchEntryLibrary = function(id, lib)\n{\n\tthis.currentSearchEntryLibrary = (id != null) ? {id: id, lib: lib} : null;\n};\n\n/**\n * Hides the current tooltip.\n */\nSidebar.prototype.addEntry = function(tags, fn)\n{\n\tif (this.taglist != null && tags != null && tags.length > 0)\n\t{\n\t\tif (this.currentSearchEntryLibrary != null)\n\t\t{\n\t\t\tfn.parentLibraries = [this.currentSearchEntryLibrary];\n\t\t}\n\t\t\n\t\t// Replaces special characters\n\t\tvar tmp = tags.toLowerCase().replace(/[\\/\\,\\(\\)]/g, ' ').split(' ');\n\t\tvar tagList = [];\n\t\tvar hash = {};\n\n\t\t// Finds unique tags\n\t\tfor (var i = 0; i < tmp.length; i++)\n\t\t{\n\t\t\tif (hash[tmp[i]] == null)\n\t\t\t{\n\t\t\t\thash[tmp[i]] = true;\n\t\t\t\ttagList.push(tmp[i]);\n\t\t\t}\n\t\t\t\n\t\t\t// Adds additional entry with removed trailing numbers\n\t\t\tvar normalized = Editor.soundex(tmp[i].replace(/\\.*\\d*$/, ''));\n\n\t\t\tif (normalized != tmp[i])\n\t\t\t{\n\t\t\t\tif (hash[normalized] == null)\n\t\t\t\t{\n\t\t\t\t\thash[normalized] = true;\n\t\t\t\t\ttagList.push(normalized);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tfor (var i = 0; i < tagList.length; i++)\n\t\t{\n\t\t\tthis.addEntryForTag(tagList[i], fn);\n\t\t}\n\t}\n\n\treturn fn;\n};\n\n/**\n * Hides the current tooltip.\n */\nSidebar.prototype.addEntryForTag = function(tag, fn)\n{\n\tif (tag != null && tag.length > 1)\n\t{\n\t\tvar entry = this.taglist[tag];\n\t\t\n\t\tif (typeof entry !== 'object')\n\t\t{\n\t\t\tentry = {entries: []};\n\t\t\tthis.taglist[tag] = entry;\n\t\t}\n\n\t\tentry.entries.push(fn);\n\t}\n};\n\n/**\n * Adds shape search UI.\n */\nSidebar.prototype.searchEntries = function(searchTerms, count, page, success, error)\n{\n\tif (this.taglist != null && searchTerms != null)\n\t{\n\t\tvar tmp = searchTerms.toLowerCase().split(' ');\n\t\tvar dict = new mxDictionary();\n\t\tvar max = (page + 1) * count;\n\t\tvar results = [];\n\t\tvar index = 0;\n\t\t\n\t\tfor (var i = 0; i < tmp.length; i++)\n\t\t{\n\t\t\tvar normalized = Editor.soundex(tmp[i].replace(/\\.*\\d*$/, ''));\n\n\t\t\tif (normalized.length > 0)\n\t\t\t{\n\t\t\t\tvar entry = this.taglist[normalized];\n\t\t\t\tvar tmpDict = new mxDictionary();\n\t\t\t\t\n\t\t\t\tif (entry != null)\n\t\t\t\t{\n\t\t\t\t\tvar arr = entry.entries;\n\t\t\t\t\tresults = [];\n\n\t\t\t\t\tfor (var j = 0; j < arr.length; j++)\n\t\t\t\t\t{\n\t\t\t\t\t\tvar entry = arr[j];\n\t\n\t\t\t\t\t\t// NOTE Array does not contain duplicates\n\t\t\t\t\t\tif ((index == 0) == (dict.get(entry) == null))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\ttmpDict.put(entry, entry);\n\t\t\t\t\t\t\tresults.push(entry);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif (i == tmp.length - 1 && results.length == max)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tsuccess(results.slice(page * count, max), max, true, tmp);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tresults = [];\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tdict = tmpDict;\n\t\t\t\tindex++;\n\t\t\t}\n\t\t}\n\t\t\n\t\tvar len = results.length;\n\t\tsuccess(results.slice(page * count, (page + 1) * count), len, false, tmp);\n\t}\n\telse\n\t{\n\t\tsuccess([], null, null, tmp);\n\t}\n};\n\n/**\n * Adds shape search UI.\n */\nSidebar.prototype.filterTags = function(tags)\n{\n\tif (tags != null)\n\t{\n\t\tvar arr = tags.split(' ');\n\t\tvar result = [];\n\t\tvar hash = {};\n\t\t\n\t\t// Ignores tags with leading numbers, strips trailing numbers\n\t\tfor (var i = 0; i < arr.length; i++)\n\t\t{\n\t\t\t// Removes duplicates\n\t\t\tif (hash[arr[i]] == null)\n\t\t\t{\n\t\t\t\thash[arr[i]] = '1';\n\t\t\t\tresult.push(arr[i]);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn result.join(' ');\n\t}\n\t\n\treturn null;\n};\n\n/**\n * Adds the general palette to the sidebar.\n */\nSidebar.prototype.cloneCell = function(cell, value)\n{\n\tvar clone = cell.clone();\n\t\n\tif (value != null)\n\t{\n\t\tclone.value = value;\n\t}\n\t\n\treturn clone;\n};\n\n/**\n * Adds shape search UI.\n */\nSidebar.prototype.showPopupMenuForEntry = function(elt, libs, evt)\n{\t\t\t\t\t\t\t\t\t\t\t\t\n\t// Hook for subclassers\n};\n\n/**\n * Adds shape search UI.\n */\nSidebar.prototype.addSearchPalette = function(expand)\n{\n\tvar elt = document.createElement('div');\n\telt.style.visibility = 'hidden';\n\tthis.appendChild(elt);\n\t\t\n\tvar div = document.createElement('div');\n\tdiv.className = 'geSidebar geSearchSidebar';\n\n\tif (!expand)\n\t{\n\t\tdiv.style.display = 'none';\n\t}\n\t\n\tvar inner = document.createElement('div');\n\tinner.style.whiteSpace = 'nowrap';\n\tinner.style.textOverflow = 'clip';\n\tinner.style.paddingBottom = '8px';\n\tinner.style.cursor = 'default';\n\n\tvar input = document.createElement('input');\n\tinput.setAttribute('placeholder', mxResources.get('searchShapes'));\n\tinput.setAttribute('type', 'text');\n\tinner.appendChild(input);\n\n\tvar cross = document.createElement('img');\n\tcross.setAttribute('src', Sidebar.prototype.searchImage);\n\tcross.setAttribute('title', mxResources.get('search'));\n\tcross.style.position = 'relative';\n\tcross.style.left = '-18px';\n\tcross.style.top = '1px';\n\n\t// Needed to block event transparency in IE\n\tcross.style.background = 'url(\\'' + this.editorUi.editor.transparentImage + '\\')';\n\t\n\tvar find;\n\n\tinner.appendChild(cross);\n\tdiv.appendChild(inner);\n\n\tvar center = document.createElement('center');\n\tvar button = mxUtils.button(mxResources.get('moreResults'), function()\n\t{\n\t\tfind();\n\t});\n\tbutton.style.display = 'none';\n\t\n\t// Workaround for inherited line-height in quirks mode\n\tbutton.style.lineHeight = 'normal';\n\tbutton.style.fontSize = '12px';\n\tbutton.style.padding = '6px 12px 6px 12px';\n\tbutton.style.marginTop = '4px';\n\tbutton.style.marginBottom = '8px';\n\tcenter.style.paddingTop = '4px';\n\tcenter.style.paddingBottom = '4px';\n\t\n\tcenter.appendChild(button);\n\tdiv.appendChild(center);\n\t\n\tvar searchTerm = '';\n\tvar active = false;\n\tvar complete = false;\n\tvar page = 0;\n\tvar hash = new Object();\n\n\t// Count is dynamically updated below\n\tvar count = 12;\n\t\n\tvar clearDiv = mxUtils.bind(this, function()\n\t{\n\t\tactive = false;\n\t\tthis.currentSearch = null;\n\t\tvar child = div.firstChild;\n\t\t\n\t\twhile (child != null)\n\t\t{\n\t\t\tvar next = child.nextSibling;\n\t\t\t\n\t\t\tif (child != inner && child != center)\n\t\t\t{\n\t\t\t\tchild.parentNode.removeChild(child);\n\t\t\t}\n\t\t\t\n\t\t\tchild = next;\n\t\t}\n\t});\n\t\t\n\tmxEvent.addListener(cross, 'click', function()\n\t{\n\t\tif (cross.getAttribute('src') == Dialog.prototype.closeImage)\n\t\t{\n\t\t\tcross.setAttribute('src', Sidebar.prototype.searchImage);\n\t\t\tcross.setAttribute('title', mxResources.get('search'));\n\t\t\tbutton.style.display = 'none';\n\t\t\tinput.value = '';\n\t\t\tsearchTerm = '';\n\t\t\tclearDiv();\n\t\t}\n\n\t\tinput.focus();\n\t});\n\n\tfind = mxUtils.bind(this, function()\n\t{\n\t\t// Shows 4 rows (minimum 4 results)\n\t\tcount = 4 * Math.max(1, Math.floor(this.container.clientWidth / (this.thumbWidth + 10)));\n\t\tthis.hideTooltip();\n\t\t\n\t\tif (input.value != '')\n\t\t{\n\t\t\tif (center.parentNode != null)\n\t\t\t{\n\t\t\t\tif (searchTerm != input.value)\n\t\t\t\t{\n\t\t\t\t\tclearDiv();\n\t\t\t\t\tsearchTerm = input.value;\n\t\t\t\t\thash = new Object();\n\t\t\t\t\tcomplete = false;\n\t\t\t\t\tpage = 0;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (!active && !complete)\n\t\t\t\t{\n\t\t\t\t\tbutton.setAttribute('disabled', 'true');\n\t\t\t\t\tbutton.style.display = '';\n\t\t\t\t\tbutton.style.cursor = 'wait';\n\t\t\t\t\tbutton.innerHTML = mxResources.get('loading') + '...';\n\t\t\t\t\tactive = true;\n\t\t\t\t\t\n\t\t\t\t\t// Ignores old results\n\t\t\t\t\tvar current = new Object();\n\t\t\t\t\tthis.currentSearch = current;\n\t\t\t\t\t\n\t\t\t\t\tthis.searchEntries(searchTerm, count, page, mxUtils.bind(this, function(results, len, more, terms)\n\t\t\t\t\t{\n\t\t\t\t\t\tif (this.currentSearch == current)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tresults = (results != null) ? results : [];\n\t\t\t\t\t\t\tactive = false;\n\t\t\t\t\t\t\tpage++;\n\t\t\t\t\t\t\tthis.insertSearchHint(div, searchTerm, count, page, results, len, more, terms);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Allows to repeat the search\n\t\t\t\t\t\t\tif (results.length == 0 && page == 1)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tsearchTerm = '';\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif (center.parentNode != null)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tcenter.parentNode.removeChild(center);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tfor (var i = 0; i < results.length; i++)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t(mxUtils.bind(this, function(result)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\ttry\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tvar elt = result();\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t// Avoids duplicates in results\n\t\t\t\t\t\t\t\t\t\tif (hash[elt.innerHTML] == null)\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\thash[elt.innerHTML] = (result.parentLibraries != null) ? result.parentLibraries.slice() : [];\n\t\t\t\t\t\t\t\t\t\t\tdiv.appendChild(elt);\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\telse if (result.parentLibraries != null)\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\thash[elt.innerHTML] = hash[elt.innerHTML].concat(result.parentLibraries);\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\tmxEvent.addGestureListeners(elt, null, null, mxUtils.bind(this, function(evt)\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\tvar libs = hash[elt.innerHTML];\n\t\n\t\t\t\t\t\t\t\t\t\t\tif (mxEvent.isPopupTrigger(evt))\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\tthis.showPopupMenuForEntry(elt, libs, evt);\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}));\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t// Disables the built-in context menu\n\t\t\t\t\t\t\t\t\t\tmxEvent.disableContextMenu(elt);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tcatch (e)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t// ignore\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}))(results[i]);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif (more)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tbutton.removeAttribute('disabled');\n\t\t\t\t\t\t\t\tbutton.innerHTML = mxResources.get('moreResults');\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tbutton.innerHTML = mxResources.get('reset');\n\t\t\t\t\t\t\t\tbutton.style.display = 'none';\n\t\t\t\t\t\t\t\tcomplete = true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tbutton.style.cursor = '';\n\t\t\t\t\t\t\tdiv.appendChild(center);\n\t\t\t\t\t\t}\n\t\t\t\t\t}), mxUtils.bind(this, function()\n\t\t\t\t\t{\n\t\t\t\t\t\t// TODO: Error handling\n\t\t\t\t\t\tbutton.style.cursor = '';\n\t\t\t\t\t}));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tclearDiv();\n\t\t\tinput.value = '';\n\t\t\tsearchTerm = '';\n\t\t\thash = new Object();\n\t\t\tbutton.style.display = 'none';\n\t\t\tcomplete = false;\n\t\t\tinput.focus();\n\t\t}\n\t});\n\n\tthis.searchShapes = function(value)\n\t{\n\t\tinput.value = value;\n\t\tfind();\n\t};\n\t\n\tmxEvent.addListener(input, 'keydown', mxUtils.bind(this, function(evt)\n\t{\n\t\tif (evt.keyCode == 13 /* Enter */)\n\t\t{\n\t\t\tfind();\n\t\t\tmxEvent.consume(evt);\n\t\t}\n\t}));\n\n\tvar searchChanged = mxUtils.bind(this, function()\n\t{\n\t\twindow.setTimeout(mxUtils.bind(this, function()\n\t\t{\n\t\t\tif (input.value == '')\n\t\t\t{\n\t\t\t\tcross.setAttribute('src', Sidebar.prototype.searchImage);\n\t\t\t\tcross.setAttribute('title', mxResources.get('search'));\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tcross.setAttribute('src', Dialog.prototype.closeImage);\n\t\t\t\tcross.setAttribute('title', mxResources.get('reset'));\n\t\t\t}\n\t\t\t\n\t\t\tif (input.value == '')\n\t\t\t{\n\t\t\t\tcomplete = true;\n\t\t\t\tbutton.style.display = 'none';\n\t\t\t}\n\t\t\telse if (input.value != searchTerm)\n\t\t\t{\n\t\t\t\tbutton.style.display = 'none';\n\t\t\t\tcomplete = false;\n\t\t\t}\n\t\t\telse if (!active)\n\t\t\t{\n\t\t\t\tif (complete)\n\t\t\t\t{\n\t\t\t\t\tbutton.style.display = 'none';\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tbutton.style.display = '';\n\t\t\t\t}\n\t\t\t}\n\t\t}), 0);\n\t});\n\t\n\tmxEvent.addListener(input, 'keyup', searchChanged);\n\tmxEvent.addListener(input, 'paste', searchChanged);\n\tmxEvent.addListener(input, 'cut', searchChanged);\n\n    // Workaround for blocked text selection in Editor\n    mxEvent.addListener(input, 'mousedown', function(evt)\n    {\n    \tif (evt.stopPropagation)\n    \t{\n    \t\tevt.stopPropagation();\n    \t}\n    \t\n    \tevt.cancelBubble = true;\n    });\n    \n    // Workaround for blocked text selection in Editor\n    mxEvent.addListener(input, 'selectstart', function(evt)\n    {\n    \tif (evt.stopPropagation)\n    \t{\n    \t\tevt.stopPropagation();\n    \t}\n    \t\n    \tevt.cancelBubble = true;\n    });\n\n\tvar outer = document.createElement('div');\n    outer.appendChild(div);\n    this.appendChild(outer);\n\t\n    // Keeps references to the DOM nodes\n\tthis.palettes['search'] = [elt, outer];\n};\n\n/**\n * Adds the general palette to the sidebar.\n */\nSidebar.prototype.insertSearchHint = function(div, searchTerm, count, page, results, len, more, terms)\n{\n\tif (results.length == 0 && page == 1)\n\t{\n\t\tvar err = document.createElement('div');\n\t\terr.className = 'geTitle';\n\t\terr.style.cssText = 'background-color:transparent;border-color:transparent;' +\n\t\t\t'padding:6px 0px 0px 0px !important;margin:4px 8px 4px 8px;text-align:center;' +\n\t\t\t'cursor:default !important;font-size:11px;font-weight:normal;';\n\t\t\n\t\tmxUtils.write(err, mxResources.get('noResultsFor', [searchTerm]));\n\t\tdiv.appendChild(err);\n\t}\n};\n\n/**\n * Adds the general palette to the sidebar.\n */\nSidebar.prototype.addGeneralPalette = function(expand)\n{\n\tvar lineTags = 'line lines connector connectors connection connections arrow arrows ';\n\tthis.setCurrentSearchEntryLibrary('general', 'general');\n\tvar sb = this;\n\n\tvar temp = parseInt(this.editorUi.editor.graph.defaultVertexStyle['fontSize']);\n\tvar fontSize = !isNaN(temp) ? 'fontSize=' + Math.min(16, temp) + ';' : '';\n\n\t// Reusable cells\n\tvar field = new mxCell('List Item', new mxGeometry(0, 0, 80, 30),\n\t\t'text;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;' +\n\t\t'spacingLeft=4;spacingRight=4;overflow=hidden;points=[[0,0.5],[1,0.5]];' +\n\t\t'portConstraint=eastwest;rotatable=0;whiteSpace=wrap;html=1;' + fontSize);\n\tfield.vertex = true;\n\n\tvar fns = [\n\t \tthis.createVertexTemplateEntry('rounded=0;whiteSpace=wrap;html=1;', 120, 60, '', 'Rectangle', null, null, 'rect rectangle box'),\n\t \tthis.createVertexTemplateEntry('rounded=1;whiteSpace=wrap;html=1;', 120, 60, '', 'Rounded Rectangle', null, null, 'rounded rect rectangle box'),\n\t \t// Explicit strokecolor/fillcolor=none is a workaround to maintain transparent background regardless of current style\n\t \tthis.createVertexTemplateEntry('text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;',\n \t\t\t60, 30, 'Text', 'Text', null, null, 'text textbox textarea label'),\n\t \tthis.createVertexTemplateEntry('text;html=1;strokeColor=none;fillColor=none;spacing=5;spacingTop=-20;whiteSpace=wrap;overflow=hidden;rounded=0;', 190, 120,\n\t\t\t'<h1>Heading</h1><p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>',\n\t\t\t'Textbox', null, null, 'text textbox textarea'),\n \t\tthis.createVertexTemplateEntry('ellipse;whiteSpace=wrap;html=1;', 120, 80, '', 'Ellipse', null, null, 'oval ellipse state'),\n\t\tthis.createVertexTemplateEntry('whiteSpace=wrap;html=1;aspect=fixed;', 80, 80, '', 'Square', null, null, 'square'),\n\t\tthis.createVertexTemplateEntry('ellipse;whiteSpace=wrap;html=1;aspect=fixed;', 80, 80, '', 'Circle', null, null, 'circle'),\n\t \tthis.createVertexTemplateEntry('shape=process;whiteSpace=wrap;html=1;backgroundOutline=1;', 120, 60, '', 'Process', null, null, 'process task'),\n\t \tthis.createVertexTemplateEntry('rhombus;whiteSpace=wrap;html=1;', 80, 80, '', 'Diamond', null, null, 'diamond rhombus if condition decision conditional question test'),\n\t \tthis.createVertexTemplateEntry('shape=parallelogram;perimeter=parallelogramPerimeter;whiteSpace=wrap;html=1;fixedSize=1;', 120, 60, '', 'Parallelogram'),\n\t \tthis.createVertexTemplateEntry('shape=hexagon;perimeter=hexagonPerimeter2;whiteSpace=wrap;html=1;fixedSize=1;', 120, 80, '', 'Hexagon', null, null, 'hexagon preparation'),\n\t \tthis.createVertexTemplateEntry('triangle;whiteSpace=wrap;html=1;', 60, 80, '', 'Triangle', null, null, 'triangle logic inverter buffer'),\n\t \tthis.createVertexTemplateEntry('shape=cylinder3;whiteSpace=wrap;html=1;boundedLbl=1;backgroundOutline=1;size=15;', 60, 80, '', 'Cylinder', null, null, 'cylinder data database'),\n\t \tthis.createVertexTemplateEntry('ellipse;shape=cloud;whiteSpace=wrap;html=1;', 120, 80, '', 'Cloud', null, null, 'cloud network'),\n\t \tthis.createVertexTemplateEntry('shape=document;whiteSpace=wrap;html=1;boundedLbl=1;', 120, 80, '', 'Document'),\n\t \tthis.createVertexTemplateEntry('shape=internalStorage;whiteSpace=wrap;html=1;backgroundOutline=1;', 80, 80, '', 'Internal Storage'),\n\t \tthis.createVertexTemplateEntry('shape=cube;whiteSpace=wrap;html=1;boundedLbl=1;backgroundOutline=1;darkOpacity=0.05;darkOpacity2=0.1;', 120, 80, '', 'Cube'),\n\t \tthis.createVertexTemplateEntry('shape=step;perimeter=stepPerimeter;whiteSpace=wrap;html=1;fixedSize=1;', 120, 80, '', 'Step'),\n\t \tthis.createVertexTemplateEntry('shape=trapezoid;perimeter=trapezoidPerimeter;whiteSpace=wrap;html=1;fixedSize=1;', 120, 60, '', 'Trapezoid'),\n\t \tthis.createVertexTemplateEntry('shape=tape;whiteSpace=wrap;html=1;', 120, 100, '', 'Tape'),\n\t \tthis.createVertexTemplateEntry('shape=note;whiteSpace=wrap;html=1;backgroundOutline=1;darkOpacity=0.05;', 80, 100, '', 'Note'),\n\t    this.createVertexTemplateEntry('shape=card;whiteSpace=wrap;html=1;', 80, 100, '', 'Card'),\n\t    this.createVertexTemplateEntry('shape=callout;whiteSpace=wrap;html=1;perimeter=calloutPerimeter;', 120, 80, '', 'Callout', null, null, 'bubble chat thought speech message'),\n\t \tthis.createVertexTemplateEntry('shape=umlActor;verticalLabelPosition=bottom;verticalAlign=top;html=1;outlineConnect=0;', 30, 60, 'Actor', 'Actor', false, null, 'user person human stickman'),\n\t \tthis.createVertexTemplateEntry('shape=xor;whiteSpace=wrap;html=1;', 60, 80, '', 'Or', null, null, 'logic or'),\n\t \tthis.createVertexTemplateEntry('shape=or;whiteSpace=wrap;html=1;', 60, 80, '', 'And', null, null, 'logic and'),\n\t \tthis.createVertexTemplateEntry('shape=dataStorage;whiteSpace=wrap;html=1;fixedSize=1;', 100, 80, '', 'Data Storage'),\n\t\tthis.createVertexTemplateEntry('swimlane;startSize=0;', 200, 200, '', 'Container', null, null, 'container swimlane lane pool group'),\n\t\tthis.createVertexTemplateEntry('swimlane;whiteSpace=wrap;html=1;', 200, 200, 'Vertical Container', 'Container', null, null, 'container swimlane lane pool group'),\n\t\tthis.createVertexTemplateEntry('swimlane;horizontal=0;whiteSpace=wrap;html=1;', 200, 200, 'Horizontal Container', 'Horizontal Container', null, null, 'container swimlane lane pool group'),\n\t\tthis.addEntry('list group erd table', function()\n\t\t{\n\t\t\tvar cell = new mxCell('List', new mxGeometry(0, 0, 140, 120),\n\t\t    \t'swimlane;fontStyle=0;childLayout=stackLayout;horizontal=1;startSize=30;horizontalStack=0;' +\n\t\t    \t'resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;whiteSpace=wrap;html=1;');\n\t\t\tcell.vertex = true;\n\t\t\tcell.insert(sb.cloneCell(field, 'Item 1'));\n\t\t\tcell.insert(sb.cloneCell(field, 'Item 2'));\n\t\t\tcell.insert(sb.cloneCell(field, 'Item 3'));\n\t\t\t\n\t\t\treturn sb.createVertexTemplateFromCells([cell], cell.geometry.width, cell.geometry.height, 'List');\n\t\t}),\n\t\tthis.addEntry('list item entry value group erd table', function()\n\t\t{\n\t\t\treturn sb.createVertexTemplateFromCells([sb.cloneCell(field, 'List Item')], field.geometry.width, field.geometry.height, 'List Item');\n\t\t}),\n\t\tthis.addEntry('curve', mxUtils.bind(this, function()\n\t \t{\n\t\t\tvar cell = new mxCell('', new mxGeometry(0, 0, 50, 50), 'curved=1;endArrow=classic;html=1;');\n\t\t\tcell.geometry.setTerminalPoint(new mxPoint(0, 50), true);\n\t\t\tcell.geometry.setTerminalPoint(new mxPoint(50, 0), false);\n\t\t\tcell.geometry.points = [new mxPoint(50, 50), new mxPoint(0, 0)];\n\t\t\tcell.geometry.relative = true;\n\t\t\tcell.edge = true;\n\t\t\t\n\t\t    return this.createEdgeTemplateFromCells([cell], cell.geometry.width, cell.geometry.height, 'Curve');\n\t \t})),\n\t \tthis.createEdgeTemplateEntry('shape=flexArrow;endArrow=classic;startArrow=classic;html=1;', 100, 100, '', 'Bidirectional Arrow', null, lineTags + 'bidirectional'),\n\t \tthis.createEdgeTemplateEntry('shape=flexArrow;endArrow=classic;html=1;', 50, 50, '', 'Arrow', null, lineTags + 'directional directed'),\n\t \tthis.createEdgeTemplateEntry('endArrow=none;dashed=1;html=1;', 50, 50, '', 'Dashed Line', null, lineTags + 'dashed undirected no'),\n\t \tthis.createEdgeTemplateEntry('endArrow=none;dashed=1;html=1;dashPattern=1 3;strokeWidth=2;', 50, 50, '', 'Dotted Line', null, lineTags + 'dotted undirected no'),\n\t \tthis.createEdgeTemplateEntry('endArrow=none;html=1;', 50, 50, '', 'Line', null, lineTags + 'simple undirected plain blank no'),\n\t \tthis.createEdgeTemplateEntry('endArrow=classic;startArrow=classic;html=1;', 50, 50, '', 'Bidirectional Connector', null, lineTags + 'bidirectional'),\n\t \tthis.createEdgeTemplateEntry('endArrow=classic;html=1;', 50, 50, '', 'Directional Connector', null, lineTags + 'directional directed'),\n\t \tthis.createEdgeTemplateEntry('shape=link;html=1;', 100, 0, '', 'Link', null, lineTags + 'link'),\n\t \tthis.addEntry(lineTags + 'edge title', mxUtils.bind(this, function()\n\t\t{\n\t\t\tvar edge = new mxCell('', new mxGeometry(0, 0, 0, 0), 'endArrow=classic;html=1;');\n\t\t\tedge.geometry.setTerminalPoint(new mxPoint(0, 0), true);\n\t\t\tedge.geometry.setTerminalPoint(new mxPoint(100, 0), false);\n\t\t\tedge.geometry.relative = true;\n\t\t\tedge.edge = true;\n\t\t\t\n\t    \tvar cell0 = new mxCell('Label', new mxGeometry(0, 0, 0, 0), 'edgeLabel;resizable=0;html=1;align=center;verticalAlign=middle;');\n\t    \tcell0.geometry.relative = true;\n\t    \tcell0.setConnectable(false);\n\t    \tcell0.vertex = true;\n\t    \tedge.insert(cell0);\n\t\t\t\n\t\t\treturn this.createEdgeTemplateFromCells([edge], 100, 0, 'Connector with Label');\n\t\t})),\n\t\tthis.addEntry(lineTags + 'edge title multiplicity', mxUtils.bind(this, function()\n\t\t{\n\t\t\tvar edge = new mxCell('', new mxGeometry(0, 0, 0, 0), 'endArrow=classic;html=1;');\n\t\t\tedge.geometry.setTerminalPoint(new mxPoint(0, 0), true);\n\t\t\tedge.geometry.setTerminalPoint(new mxPoint(160, 0), false);\n\t\t\tedge.geometry.relative = true;\n\t\t\tedge.edge = true;\n\n\t    \tvar cell0 = new mxCell('Label', new mxGeometry(0, 0, 0, 0), 'edgeLabel;resizable=0;html=1;align=center;verticalAlign=middle;');\n\t    \tcell0.geometry.relative = true;\n\t    \tcell0.setConnectable(false);\n\t    \tcell0.vertex = true;\n\t    \tedge.insert(cell0);\n\t    \t\n\t    \tvar cell1 = new mxCell('Source', new mxGeometry(-1, 0, 0, 0), 'edgeLabel;resizable=0;html=1;align=left;verticalAlign=bottom;');\n\t    \tcell1.geometry.relative = true;\n\t    \tcell1.setConnectable(false);\n\t    \tcell1.vertex = true;\n\t    \tedge.insert(cell1);\n\t\t\t\n\t\t\treturn this.createEdgeTemplateFromCells([edge], 160, 0, 'Connector with 2 Labels');\n\t\t})),\n\t\tthis.addEntry(lineTags + 'edge title multiplicity', mxUtils.bind(this, function()\n\t\t{\n\t\t\tvar edge = new mxCell('', new mxGeometry(0, 0, 0, 0), 'endArrow=classic;html=1;');\n\t\t\tedge.geometry.setTerminalPoint(new mxPoint(0, 0), true);\n\t\t\tedge.geometry.setTerminalPoint(new mxPoint(160, 0), false);\n\t\t\tedge.geometry.relative = true;\n\t\t\tedge.edge = true;\n\t\t\t\n\t    \tvar cell0 = new mxCell('Label', new mxGeometry(0, 0, 0, 0), 'edgeLabel;resizable=0;html=1;align=center;verticalAlign=middle;');\n\t    \tcell0.geometry.relative = true;\n\t    \tcell0.setConnectable(false);\n\t    \tcell0.vertex = true;\n\t    \tedge.insert(cell0);\n\t    \t\n\t    \tvar cell1 = new mxCell('Source', new mxGeometry(-1, 0, 0, 0), 'edgeLabel;resizable=0;html=1;align=left;verticalAlign=bottom;');\n\t    \tcell1.geometry.relative = true;\n\t    \tcell1.setConnectable(false);\n\t    \tcell1.vertex = true;\n\t    \tedge.insert(cell1);\n\t\t\t\n\t    \tvar cell2 = new mxCell('Target', new mxGeometry(1, 0, 0, 0), 'edgeLabel;resizable=0;html=1;align=right;verticalAlign=bottom;');\n\t    \tcell2.geometry.relative = true;\n\t    \tcell2.setConnectable(false);\n\t    \tcell2.vertex = true;\n\t    \tedge.insert(cell2);\n\t    \t\n\t\t\treturn this.createEdgeTemplateFromCells([edge], 160, 0, 'Connector with 3 Labels');\n\t\t})),\n\t \tthis.addEntry(lineTags + 'edge shape symbol message mail email', mxUtils.bind(this, function()\n\t\t{\n\t\t\tvar edge = new mxCell('', new mxGeometry(0, 0, 0, 0), 'endArrow=classic;html=1;');\n\t\t\tedge.geometry.setTerminalPoint(new mxPoint(0, 0), true);\n\t\t\tedge.geometry.setTerminalPoint(new mxPoint(100, 0), false);\n\t\t\tedge.geometry.relative = true;\n\t\t\tedge.edge = true;\n\t\t\t\n\t    \tvar cell = new mxCell('', new mxGeometry(0, 0, 20, 14), 'shape=message;html=1;outlineConnect=0;');\n\t    \tcell.geometry.relative = true;\n\t    \tcell.vertex = true;\n\t    \tcell.geometry.offset = new mxPoint(-10, -7);\n\t    \tedge.insert(cell);\n\n\t\t\treturn this.createEdgeTemplateFromCells([edge], 100, 0, 'Connector with Symbol');\n\t\t}))\n\t];\n\t\n\tthis.addPaletteFunctions('general', mxResources.get('general'), (expand != null) ? expand : true, fns);\n\tthis.setCurrentSearchEntryLibrary();\n};\n\n/**\n * Adds the general palette to the sidebar.\n */\nSidebar.prototype.addMiscPalette = function(expand)\n{\n\tvar sb = this;\n\tvar lineTags = 'line lines connector connectors connection connections arrow arrows '\n\tthis.setCurrentSearchEntryLibrary('general', 'misc');\n\n\tvar fns = [\n   \t \tthis.createVertexTemplateEntry('text;strokeColor=none;fillColor=none;html=1;fontSize=24;fontStyle=1;verticalAlign=middle;align=center;', 100, 40, 'Title', 'Title', null, null, 'text heading title'),\n\t \tthis.createVertexTemplateEntry('text;strokeColor=none;fillColor=none;html=1;whiteSpace=wrap;verticalAlign=middle;overflow=hidden;', 100, 80,\n \t\t\t'<ul><li>Value 1</li><li>Value 2</li><li>Value 3</li></ul>', 'Unordered List'),\n\t \tthis.createVertexTemplateEntry('text;strokeColor=none;fillColor=none;html=1;whiteSpace=wrap;verticalAlign=middle;overflow=hidden;', 100, 80,\n \t\t\t'<ol><li>Value 1</li><li>Value 2</li><li>Value 3</li></ol>', 'Ordered List'),\n \t\tthis.addDataEntry('table', 180, 120, 'Table 1', '7VnbcpswEP0aXjtcYsd9NUnTh/Yl6Q8o1trSVEiMWAeTr+8KhGlSe2xwJpMSZvCMdtmVteccwY4IkjTb3VmWi5+GgwqS2yBJrTHYjLJdCkoFcSh5kNwEcRzSL4i/Hbkb1XfDnFnQeE5C3CQ8MbWFxtM4CqyUdxSC5W6I7NG5lgUyiw/y2flCsldGI5MaLNlRbSvF8kLW0U2EkIr/YJXZYjtPay3XlO0ni+Zk+/WARdgdral2+YLuwGSAtqKQUnIUPmLR1B0KkBvRpnkwQlY0js0+t4OIBh6lw4glPRG7NyWVJYyVzw4o5TF5jWJRykwxDd+B8VeupeHVPsua35AaZRzaUguw0qGIJvcRCtboh48G0WTesB6G8CBD3Jr8F7MbaEPWUqn2b7TRjvfcSI01cLMlXQRlGn6ZBTOqOCU76my6XLjF1GhaMYnDTQuswBKKwaTHw0i/egPOr87nnFaMkql7WCHTm3rDCMyU3xulkAgPOVu50JJ2fbN/tIvu2DjGsiGE1srp6UZIzkEfJqqfGGpawd4+QcNuNJSf5CQ/8570+Mk6LHvPxhSVphnSHtpqXvzD+X6dZ8lgNslgsAx2L0kbkSrmkyouVcX+xTwiWVxPfcKH6hOql6S/R9uwmJ4Mp+m6Hn3b8HWSwWAZjLdtiMJJFpfKYox9QxRNjcNHbBwW79g4RD2O5T7vsyE6fQz43z8Mepw2TkL4RM3DdCJ5uS5G0D2Q2X0rasL//pT0Bw=='),\n \t\tthis.addDataEntry('table', 180, 120, 'Table 2', '7ZlLc9owEMc/ja8dP3jlimnSQ3pJOr0reMGayFqPvNSQT9+VLUMCOEDbyaTYM2ZGWq9e/99K7MheFGfrOyPy9DsmoLzoqxfFBpHqUraOQSkv9GXiRTMvDH3+eeFty9ugeuvnwoCmcxqEdYNfQq2gttSGgjbKGYpU5LZI4smapillPM1ZwMUylQSPuZjb9yUvgm0FCUOP8sWafK7PUZOQGoxrM0elRF7IqrPaI5UquRcbXFEzTFOz3qtM33P7wnkbLF9XF9y9Gy0YVcMbfIYYFdoBE1iIlbIduXWCIVi3alWZnFB3gBmQ2bBLKRNKncek1tNPQS7TppkT2RdFbVhu2+6k54JT/ziJ6EISD1haGGjki1VYOT325S9KmSmh4RuIZM80xWTjTIS5KylYkCs+IRFmjexuuf5RhInB/IcwS2hcFlKpBoJGbeMmR6mpEmg45Ycli/0vQ2/IK4u5Huzq/Fh3QzFq5snRY7sFUVAJBZ2ELnUKRp4NPfwz6IN/wHxwwPxnVQz9oBU+T52kUA8wJ6GX5+xI3oHaeu9wHaFzWQQga7pQNgJnqUwS0HtQwr+FEp2EMrqQietsp9vFvQlFYLQg3jgrnRQHoLfzPIv9sJV9+8bvNPv1W1JXFAqj1lCI+lB4JxS2/7tXFAvjPg34VGnA5i30j8gKJq3HwaDjx8H46rOCm1b2w559t7KCwG+NhVEfCx1LC4Kgzws+Y14w+cC8IDi8rGsOhHHHD4Tg9M3df38CHF4QNvQnPf2u5QbtN4c3fTBceXLA1d0Hotr99fej3w=='),\n\t\tthis.addDataEntry('table title', 180, 150, 'Table with Title 1', '7VnbbtswDP0avw6WXSfda5yue9he2v6AGjGRMFkyZKZO+vWjbOWyJVluQ9G6BmxApChaOudIIOQozYvFveOl/GkF6Ci9i9LcWYttq1jkoHWUxEpE6ThKkpjeKPl2oJc1vXHJHRg8ZUDSDnjheg6t54k/a2i9FS518FaSl76JTW86qpA7fFSv3pfG5JhYg1wZcORgja01LyvVhI+bCKm0+MGXdo6rRCuL0jn7C3KrrR8vYMrn2vunlDV8hQ3IDrMFh7A4uOLGFZZ7D7YAdEsKqZVAGSJuW1RiCWomV8Oy4ORV65itx24ApEbAcD+e6Q6e/4bywda0LGmdevUA6oDVNryNXatCcwPfgYu/XCMrlutR2ygqI8EpjyLaMkRomGJoPltEWwTDBRjivcwJZ8sn7mawCpkqrVefMdZ4QZRWGWyAy0b0EJR5/CWLMlpxTjbb2PT4cIe5NTRjEo1PC7zCGqqLSU/2k74MtARqj2ng5j9I4OZ0CdACUHH9ABPkZtZsLImFDluolgrhseQTH1rTEdFuM+OjN+QcIt0SYFPt5TWWSggw+3k7TxsNy+DuXqAlm11KV3p0jw7OpCck22B5djauaWmGI22puRHVDufreZ4kg6yXwcUyWPxJWodUMehVca0qWNI9WQz7suE9lg3DNywbbvuT4Thdw86XDV97GVwsg+6WDSzuZXGtLLpYNzDWFw7vsXBg7A0rB7Z7idcfDru3gsevBT/8aXDG7WMvhE9UPfRXktfrogPlA5mbP0tt+PaPp98='),\n\t\tthis.addDataEntry('table title', 180, 120, 'Table with Title 2', '7VhNb6MwEP01XFd8NNnmGtLtHrKXptq7Gw9grbGRmZSkv34HbEJ3CdtklaYoqgSSZxgP+L1nPwkvivPtvWFF9kNzkF5050Wx0RrtKN/GIKUX+oJ70cILQ59uL/w28DRonvoFM6DwmAmhnfDM5AZs5pE9SbDZEnfSZcuMFfUQm6fRvERmcCVe6lzkU2KtFTKhwFAiaGIpWVGKpnzRVGRC8iXb6Q22jdponogt8AddlW620dWSmpVuakLNV+5j/ObtRv+CWEtdv45DwjYS2zr7UcGUYrc4MAjbQYCalEPnHnQOaHZUUgmOmau4tSD6GYg0a6c5ZH1W2kS6n9vhTQMH+WH4ox78/0aeIKJlZdqIlxpvucejY6OJK5FLpuA7MP5Xaq75zqVQF24kIUE3fNKIOneBccv1DxLKjS4emUmhLUmElC0pSqtaJ4UWChuAJnO6CLLY/zLxJrSymOKgi+mqyw3GWhG/pKW6LbASKyixR7pQGRjx36SHh0nfOVoctW9pIDqDBG56EggGNUArQMHkA6yRqbTZiBnm0m2aKhMIq4Kt69KKjhS7LVVd3bF2gKTThKAJ2kTWQlxkgnNQLc1g7p7Bsh2cm6/ozU16cyI/rlmH5cndmKQlK4a0pzaKlz3S9995lA4mPR38bIahP3I9MClS0sDC1s5LeqFQ6dLOnA4I5hLi2P5J5evNfF6xHNXuvGqZfhrHGI1jekHj+NqTwLAGRnFQvPs5ML16k7gdNImRc//xJjEgjms2idmnSYzRJGYXNInA72kgGvdJ8e4HwezqXSIIBm1i5OR/vE0MqOOKbILC7v+iLX/9+/E3'),\n\t\tthis.addDataEntry('crossfunctional cross-functional cross functional flowchart swimlane table', 400, 400, 'Cross-Functional Flowchart',\n\t\t\t'7ZnfbpswFMafhstN/EnS7nIhS3fRSlO2F3DhNFhzfJB90iR9+tlgkirgFUXtqjIkItmHY2O+84v1yQRJutnfKFYWd5iDCJJvQZIqRKpbm30KQgRxyPMgWQRxHJpfEC89d6PqblgyBZL6DIjrAY9MbKGOmIdr/Wm5lRlxlMwmLwXusoIpqpM1HYRL1gUrbZPYvQ3Ns4KL/JYdcEtNtOnNNZkZfvInmz8JbTIKwUrNq6ELG1GQbZXmj7ACXSfaKOxLJnPXeUDZTBLNTN+tHxTB3qtBFXIC3ABugNTBpOx4TkWdMQlrncIC+LqgsyDTdWB9HHuS1DScqt0KJy2Fv2aEyoSiv8u5wp15vwIVfzLvbApRC6B3fCOYhO/A8rPQHPODCxGWriXggZo8UvgbUhTm8cmCywIUt5W5RyLcNDVw72/bucLyF1NroOfqu/VWfS5EM59EaREokUuq9JrOzWUUTMPP02Bq3i81/ejUN5dNV5SiNEtjvCoXME070O9MTNxNzKEBox7xEkBR/AoATVoA/SiYhm6AHAm9OTkvqA+RDKWEzP3NfaV/x3ol3fXae+t1LE3vernZV1YGuRZwyXxMECjJyJRgK3PdwuC49F5kTL1kxCMZ/ciIZsNEY+ZFIxnR6IdGfD1MNK68hqRj1xgNyYcwJF3b2Ns5kusWQa+/p7T3Dh8sL+wp/7ZMV/+jD/ky8nAZD0N1H1E4EnEZEUM1HVHkdR0dhnR0HR/CdXTB+nauI2qfVY6bSiOw54Rz2L4jap+tjkT0I2KwzqN9Wjoi0Q+JgVgP0z19PqvTn39d+wM='),\n\t\t\n \t\tthis.addDataEntry('table', 280, 160, 'Table', '7Zpdc6IwFIZ/DfcksSqX1X7sxe6NdvY+ylEyjYQJsWp//QZIrDXSIkUdcZ3pTDiSNHmfHF5yRo8MF+tnSZPojwiBe+TRI0MphCpai/UQOPewz0KPPHgY+/rPw08l36L8Wz+hEmJVpQMuOrxRvoQicp+moNIinKoNN+FpxHj4m27EMhtX0QkHezWQMF3KlL3BCFL2nnXwdTRVUrzCUHAh8yFI0J/M9AzJYMY434nf94ZBB2c9IhqKlQ5mN5mJgVSwLl1cHjIrewaxACU3+pYVC1VkFtgvBPAjYPPIduuaIE2LwHzb90Mr3TByHZaOOBrp+Sdg1RllKxlEQrJ3ESvKt6pQqcY7Kq3YgtMYfgEN90IDEW5MSInEtDjMlGlOhFJiYS6kWV3WDqVIXqicgw1MBec0SdmE2397GBmsExrbacz0tMdmcS5PFkcgmXJpzvJPVYC4HkBCfs6v42z9F6b0arGP3N0v4himOdcvBayo0XbHU87msY5NtSAg90RH5nqn41P+yfaVWvBjEoV8q3NAjpPZDDbKZInnuW5Hjka5XnNMld7oyzhMHXbbeVbCeVeKE98MzvVn8Xd5dBqlW2G0Zul2S+m6j+GW00X9nov3ypO35+D9b64nM9fNZ6Lfei3+udf2Hb5/8+apvfYj6iTvKmIKxgmdZuOt9At4jUTt1XPVLwStkZh7ozWbmEEpuNO66mXAHemf9TlWGK1ZjsgvBXlaA70oyMpWeUUZidAteyWq7pWP90/4gTTjld27il6Jfu6VyK3J2FTtnClVm8hM9H1t5mDyfKFgjVTcG63hVCSlpO5aQOpIN6wPrsJoDYNzaz8WXLc94Cq73zWlnFvmuSH3u9BJMehWdL8GqrLIrfTY1OydKTX3FT/Ji2uxkVtdkUVuVcei7N8CyvZWY1F5PSe4IbJtrMQit+JzQwZ7oeMlsnW2c5wvcXkpyFaJruPtN6jnoFf0tovdWs8W1bkK56dE1d4Tpn1qHiLnPlCvllwLjpj68uPnVsXtu7/G+gc='),\n\t\t\n \t\tthis.addDataEntry('table', 180, 140, 'Table', '7ZhNc5swEIZ/DXc+HH9cTdv00F7sTu8yWoOmi8QIOUB+fSUjJXEwMbZzgcl4PKNdIVn7PlovkhfFef0oSZH9FhTQi757USyFUG0rr2NA9EKfUS/65oWhr79e+KOnNzj2+gWRwNWQAWE74IngAVpP6yhVg9aRZAzpL9KIg5lRkR2Cs9YSkoMs2RNsoGTPZoCvvWVGqKissWeIsUAhtc0FB9OvpPgHzumFUeybj+6xqwGpoO6N6Oiy4TyCyEHJRj9SMaoy+8SyjdrPgKWZGzazTlK2jvRl7KtAumE1Oq9XdFkvHX0BTqmN0WGdCcmeBVcEnUKKSLV9o1jFciQcfgKh71xrQRvrUqKwLYS9ss2dUErk1pA2XNOmUhR/iEzBORKBSIqS7dD97Hl8UBeEu2Xs9bK3NrgenIOghbdBmy3uZzbrMPt7bIZ+0N3sgnNIjug+1Oh0C1shzmhDkKVcm4kWArR/XWVMwbYgiZmp0nlvtofKzcYIhmoZXdRyfqWUdrKNCZ2nCNfPRlDHx4nS+/XAadnh87LOQcgeepGd+X8aMbL6VOAJEZz3EoymSDAIp4dw8VXa7iltzSmji5Vufn+lW/Ym3WycSbe4rdJ9IOUNSfZuts9NslUvsodJIbuy0o2IYOD3IpxPEeHgUjcmht2TwFetu77WraKBte4TTnVB9+rCpV33xWUUaRdcvtgY+ytl0L0/cdCW04I23ZNd0H+fspokwwmc7bT5eqfcPv72yvk/'),\n\t\t\n \t\tthis.addDataEntry('table', 180, 140, 'Table', '7ZhLc5swEMc/DXcejh9X3CY9tBe707uM1qCpkBixDpBPX2GkvLBi7LgHmBw8s1okof3/tF4kL1rn9YMiRfZLUuBe9N2L1kpK7Ky8XgPnXugz6kXfvDD09c8L7x1Pg+NTvyAKBA4ZEHYDHgk/QOfpHCU23DiSjHH6kzTy0M6IZMfBtmIFyUGV7BE2ULKndoCvvWVGqKxMY884X0sulW4LKXSf2LwTFELtXPfRZRb9ADIHVI3uUjGKmemx7GLzM2BpZofNjJOUnSN9HvsigzaMEqdVic6romMswOqxaaONM6nYkxRIuNUBicLtK10qlnMi4AcQ+s4VS9oYF8rCWBz2aMydRJS5aSgTbmtTJYvfRKVgHYnknBQl23H72tOQoC6IsMvY62VvTXAOaCUq+Resk4kMFMOhMMPrYM4Wn2c567H8czRDP+hvdSkEJEekH2rn0uKEbISzVOhmorUA7Y+rjCFsC5K0k1U68dudg3m7Z4KhckZn5ZxfqKaZbNNGL1IOl89GuI5PENRb+SBo2UP0vM5B1O6c1E78QY2bWv1W4wlBnDshRhOFGITTo7j4qn3/o/Y1b9mdLYXzz5fCpTMfZ6PNx8V1pfADNa/Iv3ez3Tb/Vk5qd1OjdmEpHBHEwHdSnE+U4uBaOCaM/TPDVzG8XTFcRQOL4Q3OhUH/6sNmZP+LZywZGZy/NRn752jQv5yx3JaT4zbds2HgvpdZTRXjBE6HuvlyOd11f313/Q8='),\n\t\t\n\t \tthis.createVertexTemplateEntry('text;html=1;whiteSpace=wrap;strokeColor=none;fillColor=none;overflow=fill;', 180, 180,\n \t\t\t'<table border=\"1\" width=\"100%\" height=\"100%\" cellpadding=\"4\" style=\"width:100%;height:100%;border-collapse:collapse;\">' +\n \t\t\t'<tr><th align=\"center\"><b>Title</b></th></tr>' +\n \t\t\t'<tr><td align=\"center\">Section 1.1\\nSection 1.2\\nSection 1.3</td></tr>' +\n \t\t\t'<tr><td align=\"center\">Section 2.1\\nSection 2.2\\nSection 2.3</td></tr></table>', 'HTML Table 4'),\n\n\t \tthis.addEntry('link hyperlink', mxUtils.bind(this, function()\n\t \t{\n\t \t\tvar cell = new mxCell('Link', new mxGeometry(0, 0, 60, 40), 'text;html=1;strokeColor=none;fillColor=none;whiteSpace=wrap;align=center;verticalAlign=middle;fontColor=#0000EE;fontStyle=4;');\n\t \t\tcell.vertex = true;\n\t \t\tthis.graph.setLinkForCell(cell, 'https://www.draw.io');\n\n\t \t\treturn this.createVertexTemplateFromCells([cell], cell.geometry.width, cell.geometry.height, 'Link');\n\t \t})),\n\t \tthis.addEntry('timestamp date time text label', mxUtils.bind(this, function()\n\t \t{\n\t \t\tvar cell = new mxCell('%date{ddd mmm dd yyyy HH:MM:ss}%', new mxGeometry(0, 0, 160, 20), 'text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;overflow=hidden;');\n\t \t\tcell.vertex = true;\n\t \t\tthis.graph.setAttributeForCell(cell, 'placeholders', '1');\n\n\t \t\treturn this.createVertexTemplateFromCells([cell], cell.geometry.width, cell.geometry.height, 'Timestamp');\n\t \t})),\n\t \tthis.addEntry('variable placeholder metadata hello world text label', mxUtils.bind(this, function()\n\t \t{\n\t \t\tvar cell = new mxCell('%name% Text', new mxGeometry(0, 0, 80, 20), 'text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;overflow=hidden;');\n\t \t\tcell.vertex = true;\n\t \t\tthis.graph.setAttributeForCell(cell, 'placeholders', '1');\n\t \t\tthis.graph.setAttributeForCell(cell, 'name', 'Variable');\n\n\t \t\treturn this.createVertexTemplateFromCells([cell], cell.geometry.width, cell.geometry.height, 'Variable');\n\t \t})),\n\t\tthis.createVertexTemplateEntry('shape=ext;double=1;rounded=0;whiteSpace=wrap;html=1;', 120, 80, '', 'Double Rectangle', null, null, 'rect rectangle box double'),\n\t \tthis.createVertexTemplateEntry('shape=ext;double=1;rounded=1;whiteSpace=wrap;html=1;', 120, 80, '', 'Double Rounded Rectangle', null, null, 'rounded rect rectangle box double'),\n \t\tthis.createVertexTemplateEntry('ellipse;shape=doubleEllipse;whiteSpace=wrap;html=1;', 100, 60, '', 'Double Ellipse', null, null, 'oval ellipse start end state double'),\n\t\tthis.createVertexTemplateEntry('shape=ext;double=1;whiteSpace=wrap;html=1;aspect=fixed;', 80, 80, '', 'Double Square', null, null, 'double square'),\n\t\tthis.createVertexTemplateEntry('ellipse;shape=doubleEllipse;whiteSpace=wrap;html=1;aspect=fixed;', 80, 80, '', 'Double Circle', null, null, 'double circle'),\n\t\tthis.createVertexTemplateEntry('rounded=1;whiteSpace=wrap;html=1;strokeWidth=2;fillWeight=4;hachureGap=8;hachureAngle=45;fillColor=#1ba1e2;sketch=1;', 120, 60, '', 'Rectangle Sketch', true, null, 'rectangle rect box text sketch comic retro'),\n\t\tthis.createVertexTemplateEntry('ellipse;whiteSpace=wrap;html=1;strokeWidth=2;fillWeight=2;hachureGap=8;fillColor=#990000;fillStyle=dots;sketch=1;', 120, 60, '', 'Ellipse Sketch', true, null, 'ellipse oval sketch comic retro'),\n\t\tthis.createVertexTemplateEntry('rhombus;whiteSpace=wrap;html=1;strokeWidth=2;fillWeight=-1;hachureGap=8;fillStyle=cross-hatch;fillColor=#006600;sketch=1;', 120, 60, '', 'Diamond Sketch', true, null, 'diamond sketch comic retro'),\n\t \tthis.createVertexTemplateEntry('html=1;whiteSpace=wrap;shape=isoCube2;backgroundOutline=1;isoAngle=15;', 90, 100, '', 'Isometric Cube', true, null, 'cube box iso isometric'),\n\t \tthis.createVertexTemplateEntry('html=1;whiteSpace=wrap;aspect=fixed;shape=isoRectangle;', 150, 90, '', 'Isometric Square', true, null, 'rectangle rect box iso isometric'),\n\t \tthis.createEdgeTemplateEntry('edgeStyle=isometricEdgeStyle;endArrow=none;html=1;', 50, 100, '', 'Isometric Edge 1'),\n\t \tthis.createEdgeTemplateEntry('edgeStyle=isometricEdgeStyle;endArrow=none;html=1;elbow=vertical;', 50, 100, '', 'Isometric Edge 2'),\n\t \tthis.createVertexTemplateEntry('shape=curlyBracket;whiteSpace=wrap;html=1;rounded=1;labelPosition=left;verticalLabelPosition=middle;align=right;verticalAlign=middle;', 20, 120, '', 'Left Curly Bracket'),\n\t\tthis.createVertexTemplateEntry('shape=curlyBracket;whiteSpace=wrap;html=1;rounded=1;flipH=1;labelPosition=right;verticalLabelPosition=middle;align=left;verticalAlign=middle;', 20, 120, '', 'Right Curly Bracket'),\n\t \tthis.createVertexTemplateEntry('line;strokeWidth=2;html=1;', 160, 10, '', 'Horizontal Line'),\n\t \tthis.createVertexTemplateEntry('line;strokeWidth=2;direction=south;html=1;', 10, 160, '', 'Vertical Line'),\n\t \tthis.createVertexTemplateEntry('line;strokeWidth=4;html=1;perimeter=backbonePerimeter;points=[];outlineConnect=0;', 160, 10, '', 'Horizontal Backbone', false, null, 'backbone bus network'),\n\t \tthis.createVertexTemplateEntry('line;strokeWidth=4;direction=south;html=1;perimeter=backbonePerimeter;points=[];outlineConnect=0;', 10, 160, '', 'Vertical Backbone', false, null, 'backbone bus network'),\n\t \tthis.createVertexTemplateEntry('shape=crossbar;whiteSpace=wrap;html=1;rounded=1;', 120, 20, '', 'Horizontal Crossbar', false, null, 'crossbar distance measure dimension unit'),\n\t\tthis.createVertexTemplateEntry('shape=crossbar;whiteSpace=wrap;html=1;rounded=1;direction=south;', 20, 120, '', 'Vertical Crossbar', false, null, 'crossbar distance measure dimension unit'),\n\t \tthis.createVertexTemplateEntry('shape=image;html=1;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=1;aspect=fixed;image=' + this.gearImage, 52, 61, '', 'Image (Fixed Aspect)', false, null, 'fixed image icon symbol'),\n\t \tthis.createVertexTemplateEntry('shape=image;html=1;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;image=' + this.gearImage, 50, 60, '', 'Image (Variable Aspect)', false, null, 'strechted image icon symbol'),\n\t \tthis.createVertexTemplateEntry('icon;html=1;image=' + this.gearImage, 60, 60, 'Icon', 'Icon', false, null, 'icon image symbol'),\n\t \tthis.createVertexTemplateEntry('label;whiteSpace=wrap;html=1;image=' + this.gearImage, 140, 60, 'Label', 'Label 1', null, null, 'label image icon symbol'),\n\t \tthis.createVertexTemplateEntry('label;whiteSpace=wrap;html=1;align=center;verticalAlign=bottom;spacingLeft=0;spacingBottom=4;imageAlign=center;imageVerticalAlign=top;image=' + this.gearImage, 120, 80, 'Label', 'Label 2', null, null, 'label image icon symbol'),\n\t\tthis.addEntry('shape group container', function()\n\t\t{\n\t\t    var cell = new mxCell('Label', new mxGeometry(0, 0, 160, 70),\n\t\t\t\t'html=1;whiteSpace=wrap;container=1;recursiveResize=0;collapsible=0;');\n\t\t    cell.vertex = true;\n\t\t    \n\t\t\tvar symbol = new mxCell('', new mxGeometry(20, 20, 20, 30), 'triangle;html=1;whiteSpace=wrap;');\n\t\t\tsymbol.vertex = true;\n\t\t\tcell.insert(symbol);\n\t    \t\n    \t\treturn sb.createVertexTemplateFromCells([cell], cell.geometry.width, cell.geometry.height, 'Shape Group');\n\t\t}),\n\t \tthis.createVertexTemplateEntry('shape=partialRectangle;whiteSpace=wrap;html=1;left=0;right=0;fillColor=none;', 120, 60, '', 'Partial Rectangle'),\n\t\tthis.createVertexTemplateEntry('shape=partialRectangle;whiteSpace=wrap;html=1;bottom=0;top=0;fillColor=none;', 120, 60, '', 'Partial Rectangle'),\n\t\tthis.createVertexTemplateEntry('shape=partialRectangle;whiteSpace=wrap;html=1;bottom=0;right=0;fillColor=none;', 120, 60, '', 'Partial Rectangle'),\n\t\tthis.createVertexTemplateEntry('shape=partialRectangle;whiteSpace=wrap;html=1;bottom=1;right=1;left=1;top=0;fillColor=none;routingCenterX=-0.5;', 120, 60, '', 'Partial Rectangle'),\n\t\tthis.createVertexTemplateEntry('shape=waypoint;sketch=0;fillStyle=solid;size=6;pointerEvents=1;points=[];fillColor=none;resizable=0;rotatable=0;perimeter=centerPerimeter;snapToPoint=1;', 20, 20, '', 'Waypoint'),\n\t\tthis.createEdgeTemplateEntry('edgeStyle=segmentEdgeStyle;endArrow=classic;html=1;curved=0;rounded=0;endSize=8;startSize=8;', 50, 50, '', 'Manual Line', null, lineTags + 'manual'),\n\t \tthis.createEdgeTemplateEntry('shape=filledEdge;curved=0;rounded=0;fixDash=1;endArrow=none;strokeWidth=10;fillColor=#ffffff;edgeStyle=orthogonalEdgeStyle;html=1;', 60, 40, '', 'Filled Edge'),\n\t \tthis.createEdgeTemplateEntry('edgeStyle=elbowEdgeStyle;elbow=horizontal;endArrow=classic;html=1;curved=0;rounded=0;endSize=8;startSize=8;', 50, 50, '', 'Horizontal Elbow', null, lineTags + 'elbow horizontal'),\n\t \tthis.createEdgeTemplateEntry('edgeStyle=elbowEdgeStyle;elbow=vertical;endArrow=classic;html=1;curved=0;rounded=0;endSize=8;startSize=8;', 50, 50, '', 'Vertical Elbow', null, lineTags + 'elbow vertical')\n\t];\n\n\tthis.addPaletteFunctions('misc', mxResources.get('misc'), (expand != null) ? expand : true, fns);\n\tthis.setCurrentSearchEntryLibrary();\n};\n/**\n * Adds the container palette to the sidebar.\n */\nSidebar.prototype.addAdvancedPalette = function(expand)\n{\n\tthis.setCurrentSearchEntryLibrary('general', 'advanced');\n\tthis.addPaletteFunctions('advanced', mxResources.get('advanced'), (expand != null) ? expand : false, this.createAdvancedShapes());\n\tthis.setCurrentSearchEntryLibrary();\n};\n\n/**\n * Adds the general palette to the sidebar.\n */\nSidebar.prototype.addBasicPalette = function(dir)\n{\n\tthis.setCurrentSearchEntryLibrary('basic');\n\tthis.addStencilPalette('basic', mxResources.get('basic'), dir + '/basic.xml',\n\t\t';whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#000000;strokeWidth=2',\n\t\tnull, null, null, null, [\n\t\t\tthis.createVertexTemplateEntry('shape=partialRectangle;whiteSpace=wrap;html=1;top=0;bottom=0;fillColor=none;', 120, 60, '', 'Partial Rectangle'),\n\t\t\tthis.createVertexTemplateEntry('shape=partialRectangle;whiteSpace=wrap;html=1;right=0;top=0;bottom=0;fillColor=none;routingCenterX=-0.5;', 120, 60, '', 'Partial Rectangle'),\n\t\t\tthis.createVertexTemplateEntry('shape=partialRectangle;whiteSpace=wrap;html=1;bottom=0;right=0;fillColor=none;', 120, 60, '', 'Partial Rectangle'),\n\t\t\tthis.createVertexTemplateEntry('shape=partialRectangle;whiteSpace=wrap;html=1;top=0;left=0;fillColor=none;', 120, 60, '', 'Partial Rectangle')\n\t]);\n\tthis.setCurrentSearchEntryLibrary();\n};\n\n/**\n * Adds the container palette to the sidebar.\n */\nSidebar.prototype.createAdvancedShapes = function()\n{\n\t// Avoids having to bind all functions to \"this\"\n\tvar sb = this;\n\n\t// Reusable cells\n\tvar field = new mxCell('List Item', new mxGeometry(0, 0, 60, 26), 'text;strokeColor=none;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;whiteSpace=wrap;html=1;');\n\tfield.vertex = true;\n\n\treturn [\n\t \tthis.createVertexTemplateEntry('shape=tapeData;whiteSpace=wrap;html=1;perimeter=ellipsePerimeter;', 80, 80, '', 'Tape Data'),\n\t \tthis.createVertexTemplateEntry('shape=manualInput;whiteSpace=wrap;html=1;', 80, 80, '', 'Manual Input'),\n\t \tthis.createVertexTemplateEntry('shape=loopLimit;whiteSpace=wrap;html=1;', 100, 80, '', 'Loop Limit'),\n\t \tthis.createVertexTemplateEntry('shape=offPageConnector;whiteSpace=wrap;html=1;', 80, 80, '', 'Off Page Connector'),\n\t \tthis.createVertexTemplateEntry('shape=delay;whiteSpace=wrap;html=1;', 80, 40, '', 'Delay'),\n\t \tthis.createVertexTemplateEntry('shape=display;whiteSpace=wrap;html=1;', 80, 40, '', 'Display'),\n\t \tthis.createVertexTemplateEntry('shape=singleArrow;direction=west;whiteSpace=wrap;html=1;', 100, 60, '', 'Arrow Left'),\n\t \tthis.createVertexTemplateEntry('shape=singleArrow;whiteSpace=wrap;html=1;', 100, 60, '', 'Arrow Right'),\n\t \tthis.createVertexTemplateEntry('shape=singleArrow;direction=north;whiteSpace=wrap;html=1;', 60, 100, '', 'Arrow Up'),\n\t \tthis.createVertexTemplateEntry('shape=singleArrow;direction=south;whiteSpace=wrap;html=1;', 60, 100, '', 'Arrow Down'),\n\t \tthis.createVertexTemplateEntry('shape=doubleArrow;whiteSpace=wrap;html=1;', 100, 60, '', 'Double Arrow'),\n\t \tthis.createVertexTemplateEntry('shape=doubleArrow;direction=south;whiteSpace=wrap;html=1;', 60, 100, '', 'Double Arrow Vertical', null, null, 'double arrow'),\n\t \tthis.createVertexTemplateEntry('shape=actor;whiteSpace=wrap;html=1;', 40, 60, '', 'User', null, null, 'user person human'),\n\t \tthis.createVertexTemplateEntry('shape=cross;whiteSpace=wrap;html=1;', 80, 80, '', 'Cross'),\n\t \tthis.createVertexTemplateEntry('shape=corner;whiteSpace=wrap;html=1;', 80, 80, '', 'Corner'),\n\t \tthis.createVertexTemplateEntry('shape=tee;whiteSpace=wrap;html=1;', 80, 80, '', 'Tee'),\n\t \tthis.createVertexTemplateEntry('shape=datastore;whiteSpace=wrap;html=1;', 60, 60, '', 'Data Store', null, null, 'data store cylinder database'),\n\t \tthis.createVertexTemplateEntry('shape=orEllipse;perimeter=ellipsePerimeter;whiteSpace=wrap;html=1;backgroundOutline=1;', 80, 80, '', 'Or', null, null, 'or circle oval ellipse'),\n\t \tthis.createVertexTemplateEntry('shape=sumEllipse;perimeter=ellipsePerimeter;whiteSpace=wrap;html=1;backgroundOutline=1;', 80, 80, '', 'Sum', null, null, 'sum circle oval ellipse'),\n\t \tthis.createVertexTemplateEntry('shape=lineEllipse;perimeter=ellipsePerimeter;whiteSpace=wrap;html=1;backgroundOutline=1;', 80, 80, '', 'Ellipse with horizontal divider', null, null, 'circle oval ellipse'),\n\t \tthis.createVertexTemplateEntry('shape=lineEllipse;line=vertical;perimeter=ellipsePerimeter;whiteSpace=wrap;html=1;backgroundOutline=1;', 80, 80, '', 'Ellipse with vertical divider', null, null, 'circle oval ellipse'),\n\t \tthis.createVertexTemplateEntry('shape=sortShape;perimeter=rhombusPerimeter;whiteSpace=wrap;html=1;', 80, 80, '', 'Sort', null, null, 'sort'),\n\t \tthis.createVertexTemplateEntry('shape=collate;whiteSpace=wrap;html=1;', 80, 80, '', 'Collate', null, null, 'collate'),\n\t \tthis.createVertexTemplateEntry('shape=switch;whiteSpace=wrap;html=1;', 60, 60, '', 'Switch', null, null, 'switch router'),\n\n\t\tthis.addEntry('process bar', function()\n\t\t{\n\t\t\treturn sb.createVertexTemplateFromData('1ZVNboMwEIVP42UlfkqabCFtNokUiRO4MAWrBiPbKZDTd2xMSJMgVaraKgskzxs/e+YbS5AwqbqNpE25EzlwEj6TMJFC6GFVdQlwTgKP5SRckyDw8CPBy0zWt1mvoRJq/R1DMBg+KD/AoOylyEApFGMqh6zSPXdZ1bKK0xqjOCsZz7e0Fwdzk9I0ex+juBSSHUWtKTa09lF4Y5wngguJcS2sf9qTGq/bKEGxI+zHBi6lHe1Q9U7qlirthExwThvFXm2tRlFaine4uNYWGguZgxF9b5TShmasLlB78IPxfDocZqqgnBU1rjOswljjRrBaK4Mlikm0RqUtmQZzjvG0OFPTpa5GBg41SA3d7Lis5Ga1AVGBlj1uaVmuSzey1WKwlcCKcrR5w5w9qgahOHmn6ePCPYDbjyG8egyphgYV//odlLQBO3YwXTYgGV5nkRppP8U4+g7yFGflMPwOt+A2t9Hg6PSuUdfpGdUTwHOq0dPPoT7OQQ3uHepq+W9Qozmo4b1D9ZeLv6KK4fSjsbkv/6FP', 296, 100, 'Process Bar');\n\t\t}),\n\t \tthis.createVertexTemplateEntry('swimlane;', 200, 200, 'Container', 'Container', null, null, 'container swimlane lane pool group'),\n\t\tthis.addEntry('list group erd table', function()\n\t\t{\n\t\t\tvar cell = new mxCell('List', new mxGeometry(0, 0, 140, 110),\n\t\t    \t'swimlane;fontStyle=0;childLayout=stackLayout;horizontal=1;startSize=26;fillColor=none;horizontalStack=0;' +\n\t\t    \t'resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;html=1;');\n\t\t\tcell.vertex = true;\n\t\t\tcell.insert(sb.cloneCell(field, 'Item 1'));\n\t\t\tcell.insert(sb.cloneCell(field, 'Item 2'));\n\t\t\tcell.insert(sb.cloneCell(field, 'Item 3'));\n\t\t\t\n\t\t\treturn sb.createVertexTemplateFromCells([cell], cell.geometry.width, cell.geometry.height, 'List');\n\t\t}),\n\t\tthis.addEntry('list item entry value group erd table', function()\n\t\t{\n\t\t\treturn sb.createVertexTemplateFromCells([sb.cloneCell(field, 'List Item')], field.geometry.width, field.geometry.height, 'List Item');\n\t\t})\n\t];\n};\n\n/**\n * Adds the general palette to the sidebar.\n */\nSidebar.prototype.addBasicPalette = function(dir)\n{\n\tthis.setCurrentSearchEntryLibrary('basic');\n\tthis.addStencilPalette('basic', mxResources.get('basic'), dir + '/basic.xml',\n\t\t';whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#000000;strokeWidth=2',\n\t\tnull, null, null, null, [\n\t\t\tthis.createVertexTemplateEntry('shape=partialRectangle;whiteSpace=wrap;html=1;top=0;bottom=0;fillColor=none;', 120, 60, '', 'Partial Rectangle'),\n\t\t\tthis.createVertexTemplateEntry('shape=partialRectangle;whiteSpace=wrap;html=1;right=0;top=0;bottom=0;fillColor=none;routingCenterX=-0.5;', 120, 60, '', 'Partial Rectangle'),\n\t\t\tthis.createVertexTemplateEntry('shape=partialRectangle;whiteSpace=wrap;html=1;bottom=0;right=0;fillColor=none;', 120, 60, '', 'Partial Rectangle'),\n\t\t\tthis.createVertexTemplateEntry('shape=partialRectangle;whiteSpace=wrap;html=1;top=0;left=0;fillColor=none;', 120, 60, '', 'Partial Rectangle')\n\t]);\n\tthis.setCurrentSearchEntryLibrary();\n};\n\n/**\n * Adds the general palette to the sidebar.\n */\nSidebar.prototype.addUmlPalette = function(expand)\n{\n\t// Avoids having to bind all functions to \"this\"\n\tvar sb = this;\n\n\t// Reusable cells\n\tvar field = new mxCell('+ field: type', new mxGeometry(0, 0, 100, 26), 'text;strokeColor=none;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;whiteSpace=wrap;html=1;');\n\tfield.vertex = true;\n\n\tvar divider = new mxCell('', new mxGeometry(0, 0, 40, 8), 'line;strokeWidth=1;fillColor=none;align=left;verticalAlign=middle;spacingTop=-1;spacingLeft=3;spacingRight=3;rotatable=0;labelPosition=right;points=[];portConstraint=eastwest;strokeColor=inherit;');\n\tdivider.vertex = true;\n\n\tvar sequenceEdgeStyle = 'newEdgeStyle={\"edgeStyle\":\"elbowEdgeStyle\",\"elbow\":\"vertical\",\"curved\":0,\"rounded\":0};';\n\tvar lifelineStyle = 'shape=umlLifeline;perimeter=lifelinePerimeter;whiteSpace=wrap;html=1;container=1;dropTarget=0;' +\n\t\t'collapsible=0;recursiveResize=0;outlineConnect=0;portConstraint=eastwest;' + sequenceEdgeStyle;\n\tvar activationStyle = 'html=1;points=[];perimeter=orthogonalPerimeter;outlineConnect=0;' +\n\t\t'targetShapes=umlLifeline;portConstraint=eastwest;' + sequenceEdgeStyle;\n\t\n\t// Default tags\n\tvar dt = 'uml static class ';\n\tthis.setCurrentSearchEntryLibrary('uml');\n\t\n\tvar fns = [\n   \t\tthis.createVertexTemplateEntry('html=1;whiteSpace=wrap;', 110, 50, 'Object', 'Object', null, null, dt + 'object instance'),\n   \t\tthis.createVertexTemplateEntry('html=1;whiteSpace=wrap;', 110, 50, '&laquo;interface&raquo;<br><b>Name</b>', 'Interface', null, null, dt + 'interface object instance annotated annotation'),\n\t \tthis.addEntry(dt + 'object instance', function()\n\t\t{\n\t\t\tvar cell = new mxCell('Classname', new mxGeometry(0, 0, 160, 90),\n\t\t    \t'swimlane;fontStyle=1;align=center;verticalAlign=top;childLayout=stackLayout;horizontal=1;startSize=26;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;whiteSpace=wrap;html=1;');\n\t\t\tcell.vertex = true;\n\t\t\tcell.insert(field.clone());\n\t\t\tcell.insert(divider.clone());\n\t\t\tcell.insert(sb.cloneCell(field, '+ method(type): type'));\n\t\t\t\n\t\t\treturn sb.createVertexTemplateFromCells([cell], cell.geometry.width, cell.geometry.height, 'Class'); \n\t\t}),\n\t\tthis.addEntry(dt + 'section subsection', function()\n\t\t{\n\t\t\tvar cell = new mxCell('Classname', new mxGeometry(0, 0, 140, 110),\n\t\t    \t'swimlane;fontStyle=0;childLayout=stackLayout;horizontal=1;startSize=26;fillColor=none;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;whiteSpace=wrap;html=1;');\n\t\t\tcell.vertex = true;\n\t\t\tcell.insert(field.clone());\n\t\t\tcell.insert(field.clone());\n\t\t\tcell.insert(field.clone());\n\t\t\t\n\t\t\treturn sb.createVertexTemplateFromCells([cell], cell.geometry.width, cell.geometry.height, 'Class 2');\n\t\t}),\n\t\tthis.addEntry(dt + 'item member method function variable field attribute label', function()\n\t\t{\n\t\t\treturn sb.createVertexTemplateFromCells([sb.cloneCell(field, '+ item: attribute')], field.geometry.width, field.geometry.height, 'Item 1');\n\t\t}),\n   \t\tthis.addEntry(dt + 'item member method function variable field attribute label', function()\n\t\t{\n   \t\t\tvar cell = new mxCell('item: attribute', new mxGeometry(0, 0, 120, field.geometry.height), 'label;fontStyle=0;strokeColor=none;fillColor=none;align=left;verticalAlign=top;overflow=hidden;' +\n   \t\t\t\t'spacingLeft=28;spacingRight=4;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;imageWidth=16;imageHeight=16;whiteSpace=wrap;html=1;image=' + sb.gearImage);\n   \t\t\tcell.vertex = true;\n   \t\t\t\n\t\t\treturn sb.createVertexTemplateFromCells([cell], cell.geometry.width, cell.geometry.height, 'Item 2');\n\t\t}),\n\t\tthis.addEntry(dt + 'divider hline line separator', function()\n\t\t{\n\t\t\treturn sb.createVertexTemplateFromCells([divider.clone()], divider.geometry.width, divider.geometry.height, 'Divider');\n\t\t}),\n\t\tthis.addEntry(dt + 'spacer space gap separator', function()\n\t\t{\n\t\t\tvar cell = new mxCell('', new mxGeometry(0, 0, 20, 14), 'text;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;spacingTop=-1;spacingLeft=4;spacingRight=4;rotatable=0;labelPosition=right;points=[];portConstraint=eastwest;');\n\t\t\tcell.vertex = true;\n\t\t\t\n\t\t\treturn sb.createVertexTemplateFromCells([cell.clone()], cell.geometry.width, cell.geometry.height, 'Spacer');\n\t\t}),\n\t\tthis.createVertexTemplateEntry('text;align=center;fontStyle=1;verticalAlign=middle;spacingLeft=3;spacingRight=3;strokeColor=none;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;html=1;',\n\t\t\t80, 26, 'Title', 'Title', null, null, dt + 'title label'),\n\t\tthis.addEntry(dt + 'component', function()\n\t\t{\n\t\t    var cell = new mxCell('&laquo;Annotation&raquo;<br/><b>Component</b>', new mxGeometry(0, 0, 180, 90), 'html=1;dropTarget=0;whiteSpace=wrap;');\n\t\t    cell.vertex = true;\n\t\t    \n\t\t\tvar symbol = new mxCell('', new mxGeometry(1, 0, 20, 20), 'shape=module;jettyWidth=8;jettyHeight=4;');\n\t\t\tsymbol.vertex = true;\n\t\t\tsymbol.geometry.relative = true;\n\t\t\tsymbol.geometry.offset = new mxPoint(-27, 7);\n\t\t\tcell.insert(symbol);\n\t    \t\n\t    \treturn sb.createVertexTemplateFromCells([cell], cell.geometry.width, cell.geometry.height, 'Component');\n\t\t}),\n\t\tthis.addEntry(dt + 'component', function()\n\t\t{\n\t\t    var cell = new mxCell('<p style=\"margin:0px;margin-top:6px;text-align:center;\"><b>Component</b></p>' +\n\t\t\t\t'<hr/><p style=\"margin:0px;margin-left:8px;\">+ Attribute1: Type<br/>+ Attribute2: Type</p>', new mxGeometry(0, 0, 180, 90),\n\t\t\t\t'align=left;overflow=fill;html=1;dropTarget=0;whiteSpace=wrap;');\n\t\t    cell.vertex = true;\n\t\t    \n\t\t\tvar symbol = new mxCell('', new mxGeometry(1, 0, 20, 20), 'shape=component;jettyWidth=8;jettyHeight=4;');\n\t\t\tsymbol.vertex = true;\n\t\t\tsymbol.geometry.relative = true;\n\t\t\tsymbol.geometry.offset = new mxPoint(-24, 4);\n\t\t\tcell.insert(symbol);\n\t    \t\n\t    \treturn sb.createVertexTemplateFromCells([cell], cell.geometry.width, cell.geometry.height, 'Component with Attributes');\n\t\t}),\n\t\tthis.createVertexTemplateEntry('verticalAlign=top;align=left;spacingTop=8;spacingLeft=2;spacingRight=12;shape=cube;size=10;direction=south;fontStyle=4;html=1;whiteSpace=wrap;',\n\t\t\t180, 120, 'Block', 'Block', null, null, dt + 'block'),\n\t\tthis.createVertexTemplateEntry('shape=module;align=left;spacingLeft=20;align=center;verticalAlign=top;whiteSpace=wrap;html=1;', 100, 50, 'Module', 'Module', null, null, dt + 'module component'),\n\t\tthis.createVertexTemplateEntry('shape=folder;fontStyle=1;spacingTop=10;tabWidth=40;tabHeight=14;tabPosition=left;html=1;whiteSpace=wrap;', 70, 50,\n\t\t   \t'package', 'Package', null, null, dt + 'package'),\n\t\tthis.createVertexTemplateEntry('verticalAlign=top;align=left;overflow=fill;fontSize=12;fontFamily=Helvetica;html=1;whiteSpace=wrap;',\n\t\t\t160, 90, '<p style=\"margin:0px;margin-top:4px;text-align:center;text-decoration:underline;\"><b>Object:Type</b></p><hr/>' +\n\t\t\t'<p style=\"margin:0px;margin-left:8px;\">field1 = value1<br/>field2 = value2<br>field3 = value3</p>', 'Object',\n\t\t\tnull, null, dt + 'object instance'),\n\t\tthis.createVertexTemplateEntry('verticalAlign=top;align=left;overflow=fill;html=1;whiteSpace=wrap;',180, 90,\n\t\t\t'<div style=\"box-sizing:border-box;width:100%;background:#e4e4e4;padding:2px;\">Tablename</div>' +\n\t\t\t'<table style=\"width:100%;font-size:1em;\" cellpadding=\"2\" cellspacing=\"0\">' +\n\t\t\t'<tr><td>PK</td><td>uniqueId</td></tr><tr><td>FK1</td><td>' +\n\t\t\t'foreignKey</td></tr><tr><td></td><td>fieldname</td></tr></table>', 'Entity', null, null, 'er entity table'),\n\t\tthis.addEntry(dt + 'object instance', function()\n\t\t{\n\t\t    var cell = new mxCell('<p style=\"margin:0px;margin-top:4px;text-align:center;\">' +\n\t    \t\t\t'<b>Class</b></p>' +\n\t\t\t\t\t'<hr size=\"1\"/><div style=\"height:2px;\"></div>', new mxGeometry(0, 0, 140, 60),\n\t\t\t\t\t'verticalAlign=top;align=left;overflow=fill;fontSize=12;fontFamily=Helvetica;html=1;whiteSpace=wrap;');\n\t\t    cell.vertex = true;\n\t\t\t\n\t\t\treturn sb.createVertexTemplateFromCells([cell.clone()], cell.geometry.width, cell.geometry.height, 'Class 3');\n\t\t}),\n\t\tthis.addEntry(dt + 'object instance', function()\n\t\t{\n\t\t    var cell = new mxCell('<p style=\"margin:0px;margin-top:4px;text-align:center;\">' +\n\t    \t\t\t'<b>Class</b></p>' +\n\t\t\t\t\t'<hr size=\"1\"/><div style=\"height:2px;\"></div><hr size=\"1\"/><div style=\"height:2px;\"></div>', new mxGeometry(0, 0, 140, 60),\n\t\t\t\t\t'verticalAlign=top;align=left;overflow=fill;fontSize=12;fontFamily=Helvetica;html=1;whiteSpace=wrap;');\n\t\t    cell.vertex = true;\n\t\t\t\n\t\t\treturn sb.createVertexTemplateFromCells([cell.clone()], cell.geometry.width, cell.geometry.height, 'Class 4');\n\t\t}),\n\t\tthis.addEntry(dt + 'object instance', function()\n\t\t{\n\t\t    var cell = new mxCell('<p style=\"margin:0px;margin-top:4px;text-align:center;\">' +\n\t    \t\t\t'<b>Class</b></p>' +\n\t\t\t\t\t'<hr size=\"1\"/><p style=\"margin:0px;margin-left:4px;\">+ field: Type</p><hr size=\"1\"/>' +\n\t\t\t\t\t'<p style=\"margin:0px;margin-left:4px;\">+ method(): Type</p>', new mxGeometry(0, 0, 160, 90),\n\t\t\t\t\t'verticalAlign=top;align=left;overflow=fill;fontSize=12;fontFamily=Helvetica;html=1;whiteSpace=wrap;');\n\t\t    cell.vertex = true;\n\t\t\t\n\t\t\treturn sb.createVertexTemplateFromCells([cell.clone()], cell.geometry.width, cell.geometry.height, 'Class 5');\n\t\t}),\n\t\tthis.addEntry(dt + 'object instance', function()\n\t\t{\n\t\t    var cell = new mxCell('<p style=\"margin:0px;margin-top:4px;text-align:center;\">' +\n\t    \t\t\t'<i>&lt;&lt;Interface&gt;&gt;</i><br/><b>Interface</b></p>' +\n\t\t\t\t\t'<hr size=\"1\"/><p style=\"margin:0px;margin-left:4px;\">+ field1: Type<br/>' +\n\t\t\t\t\t'+ field2: Type</p>' +\n\t\t\t\t\t'<hr size=\"1\"/><p style=\"margin:0px;margin-left:4px;\">' +\n\t\t\t\t\t'+ method1(Type): Type<br/>' +\n\t\t\t\t\t'+ method2(Type, Type): Type</p>', new mxGeometry(0, 0, 190, 140),\n\t\t\t\t\t'verticalAlign=top;align=left;overflow=fill;fontSize=12;fontFamily=Helvetica;html=1;whiteSpace=wrap;');\n\t\t    cell.vertex = true;\n\t\t\t\n\t\t\treturn sb.createVertexTemplateFromCells([cell.clone()], cell.geometry.width, cell.geometry.height, 'Interface 2');\n\t\t}),\n\t\tthis.createVertexTemplateEntry('shape=providedRequiredInterface;html=1;verticalLabelPosition=bottom;sketch=0;', 20, 20, '', 'Provided/Required Interface', null, null, 'uml provided required interface lollipop notation'),\n\t\tthis.createVertexTemplateEntry('shape=requiredInterface;html=1;verticalLabelPosition=bottom;sketch=0;', 10, 20, '', 'Required Interface', null, null, 'uml required interface lollipop notation'),\n\t\tthis.addDataEntry('uml lollipop notation provided required interface', 20, 20, 'Required Interface',\n\t\t\t'jVNNb6MwEP01XCsCYu8NaXvZlSr1sNujCxPsreNBw5CQ/vrOYDcJbaNdySC/Nx+237Ozst5ND2R6+wtb8Fl5l5U1IXKc7aYavM+K3LVZucmKIpcvK+6vRFdzNO8NQeD/KShiwd74ESITiYGPPhGEY2hB8/OsXCOxxQ6D8T8ReyFXQv4F5uOTe9MKMzIKZXnnUxRCe0uEB4HW+G3tqNHeyt8771Nj2TAd/yi4qT7g8wVsU/8fggYmfIXfrmWb1hhegRubWm0xcMpeFYKbkfbzATQzng/aDhaSsaEOkmTlVxXnrCThA+AOZHeSQuANu/2ylRki7E55p9JHdNKxyKekfhUrjhFWy/oBR2oglZw9lMnFHs7U7Oz3Lpf/dlkKXD+oLQfrGJ5602jkIDdz6abxrgsyb0QbICWGHhqVaesmVXm9FVNr9CjBTcAAJ8M+kQSDezMv8w7Utl5POp+9WstQ44ta/9VGh9y9kb0L0iaEuGJ+8nMPxDBdfQRX7DukG6QZ8Z3kFlxnecl9Z+jCjbP0As+PNzp1+bbfAQ=='),\n\t\tthis.addEntry('uml lollipop notation provided required interface', function()\n\t\t{\n\t\t\treturn sb.createVertexTemplateFromData('zVRNT8MwDP01uaLSMu6sfFxAmrQDcAytaQJZXLnu2u7XkzQZXTUmuIA4VIqf/ZzkvdQiyzf9HclaPWAJRmQ3IssJkcNq0+dgjEgTXYrsWqRp4j6R3p7Ino/ZpJYEln9CSANhK00LAQlAw4OJAGFrS/D1iciWSKywQivNPWLtwHMHvgHzsNY7z5Ato4MUb0zMgi2viLBzoUULAbnVxsSWzTtwofYBtlTACkhvgIHWtSy0rWKSJVXAJ5Lh4FBWMNMicAJ0cSzPWBW1uQN0fWlwJQRGst7OW8kmhNVn3Sd1hdp1TJMhVCzmhHipUDO54RYHm07Q6NHXfmV/65eS5jXXVJhj15yCNDz54GyxD58PwjL2v/SmMuE7POqSVdxj5vm/cK6PG4X/5deNvPjeSEfQdeOV75Rm8K/dZzo3LOaGSaMr69aF0wbIA00NhZfpVff+JSwJGr2TL2Nnr3jtbzDeabEUi2v/Tlo22kKO1gbq0Z8ZDwzE0J+cNidM2ROinF18CR6KeivQleI59pVrM8knfV04Dc1gx+FM/QA=',\n\t\t\t\t40, 10, 'Lollipop Notation');\n\t\t}),\n\t\tthis.createVertexTemplateEntry('shape=umlBoundary;whiteSpace=wrap;html=1;', 100, 80, 'Boundary Object', 'Boundary Object', null, null, 'uml boundary object'),\n\t\tthis.createVertexTemplateEntry('ellipse;shape=umlEntity;whiteSpace=wrap;html=1;', 80, 80, 'Entity Object', 'Entity Object', null, null, 'uml entity object'),\n\t\tthis.createVertexTemplateEntry('ellipse;shape=umlControl;whiteSpace=wrap;html=1;', 70, 80, 'Control Object', 'Control Object', null, null, 'uml control object'),\n\t\tthis.createVertexTemplateEntry('shape=umlActor;verticalLabelPosition=bottom;verticalAlign=top;html=1;', 30, 60, 'Actor', 'Actor', false, null, 'uml actor'),\n\t\tthis.createVertexTemplateEntry('ellipse;whiteSpace=wrap;html=1;', 140, 70, 'Use Case', 'Use Case', null, null, 'uml use case usecase'),\n\t\tthis.addEntry('uml activity state start', function()\n\t\t{\n\t    \tvar cell = new mxCell('', new mxGeometry(0, 0, 30, 30),\n\t    \t\t'ellipse;html=1;shape=startState;fillColor=#000000;strokeColor=#ff0000;');\n\t    \tcell.vertex = true;\n\t    \t\n\t\t\tvar edge = new mxCell('', new mxGeometry(0, 0, 0, 0), 'edgeStyle=orthogonalEdgeStyle;html=1;verticalAlign=bottom;endArrow=open;endSize=8;strokeColor=#ff0000;');\n\t\t\tedge.geometry.setTerminalPoint(new mxPoint(15, 90), false);\n\t\t\tedge.geometry.relative = true;\n\t\t\tedge.edge = true;\n\t\t\t\n\t\t\tcell.insertEdge(edge, true);\n\t    \t\n\t\t\treturn sb.createVertexTemplateFromCells([cell, edge], 30, 90, 'Start');\n\t\t}),\n\t\tthis.addEntry('uml activity state', function()\n\t\t{\n\t\t\tvar cell = new mxCell('Activity', new mxGeometry(0, 0, 120, 40),\n\t\t\t\t'rounded=1;whiteSpace=wrap;html=1;arcSize=40;fontColor=#000000;fillColor=#ffffc0;strokeColor=#ff0000;');\n\t\t\tcell.vertex = true;\n\t\t\t\n\t\t\tvar edge = new mxCell('', new mxGeometry(0, 0, 0, 0), 'edgeStyle=orthogonalEdgeStyle;html=1;verticalAlign=bottom;endArrow=open;endSize=8;strokeColor=#ff0000;');\n\t\t\tedge.geometry.setTerminalPoint(new mxPoint(60, 100), false);\n\t\t\tedge.geometry.relative = true;\n\t\t\tedge.edge = true;\n\t\t\t\n\t\t\tcell.insertEdge(edge, true);\n\t\t\t\n\t\t\treturn sb.createVertexTemplateFromCells([cell, edge], 120, 100, 'Activity');\n\t\t}),\n\t\tthis.addEntry('uml activity composite state', function()\n\t\t{\n\t\t\tvar cell = new mxCell('Composite State', new mxGeometry(0, 0, 160, 60),\n\t\t\t\t\t'swimlane;fontStyle=1;align=center;verticalAlign=middle;childLayout=stackLayout;horizontal=1;startSize=30;horizontalStack=0;resizeParent=0;resizeLast=1;container=0;fontColor=#000000;collapsible=0;rounded=1;arcSize=30;strokeColor=#ff0000;fillColor=#ffffc0;swimlaneFillColor=#ffffc0;dropTarget=0;');\n\t\t\tcell.vertex = true;\n\t\t\t\n\t\t\tvar cell1 = new mxCell('Subtitle', new mxGeometry(0, 0, 200, 26), 'text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;spacingLeft=4;spacingRight=4;whiteSpace=wrap;overflow=hidden;rotatable=0;fontColor=#000000;');\n\t\t\tcell1.vertex = true;\n\t\t\tcell.insert(cell1);\n\t\t\t\n\t\t\tvar edge = new mxCell('', new mxGeometry(0, 0, 0, 0), 'edgeStyle=orthogonalEdgeStyle;html=1;verticalAlign=bottom;endArrow=open;endSize=8;strokeColor=#ff0000;');\n\t\t\tedge.geometry.setTerminalPoint(new mxPoint(80, 120), false);\n\t\t\tedge.geometry.relative = true;\n\t\t\tedge.edge = true;\n\t\t\t\n\t\t\tcell.insertEdge(edge, true);\n\t\t\t\n\t\t\treturn sb.createVertexTemplateFromCells([cell, edge], 160, 120, 'Composite State');\n\t\t}),\n\t\tthis.addEntry('uml activity condition', function()\n\t\t{\n\t    \tvar cell = new mxCell('Condition', new mxGeometry(0, 0, 80, 40), 'rhombus;whiteSpace=wrap;html=1;fontColor=#000000;fillColor=#ffffc0;strokeColor=#ff0000;');\n\t    \tcell.vertex = true;\n\t    \t\n\t\t\tvar edge1 = new mxCell('no', new mxGeometry(0, 0, 0, 0), 'edgeStyle=orthogonalEdgeStyle;html=1;align=left;verticalAlign=bottom;endArrow=open;endSize=8;strokeColor=#ff0000;');\n\t\t\tedge1.geometry.setTerminalPoint(new mxPoint(180, 20), false);\n\t\t\tedge1.geometry.relative = true;\n\t\t\tedge1.geometry.x = -1;\n\t\t\tedge1.edge = true;\n\t\t\t\n\t\t\tcell.insertEdge(edge1, true);\n\t    \t\n\t\t\tvar edge2 = new mxCell('yes', new mxGeometry(0, 0, 0, 0), 'edgeStyle=orthogonalEdgeStyle;html=1;align=left;verticalAlign=top;endArrow=open;endSize=8;strokeColor=#ff0000;');\n\t\t\tedge2.geometry.setTerminalPoint(new mxPoint(40, 100), false);\n\t\t\tedge2.geometry.relative = true;\n\t\t\tedge2.geometry.x = -1;\n\t\t\tedge2.edge = true;\n\t\t\t\n\t\t\tcell.insertEdge(edge2, true);\n\t\t\t\n\t\t\treturn sb.createVertexTemplateFromCells([cell, edge1, edge2], 180, 100, 'Condition');\n\t\t}),\n\t\tthis.addEntry('uml activity fork join', function()\n\t\t{\n\t    \tvar cell = new mxCell('', new mxGeometry(0, 0, 200, 10), 'shape=line;html=1;strokeWidth=6;strokeColor=#ff0000;');\n\t    \tcell.vertex = true;\n\t\t\t\n\t\t\tvar edge = new mxCell('', new mxGeometry(0, 0, 0, 0), 'edgeStyle=orthogonalEdgeStyle;html=1;verticalAlign=bottom;endArrow=open;endSize=8;strokeColor=#ff0000;');\n\t\t\tedge.geometry.setTerminalPoint(new mxPoint(100, 80), false);\n\t\t\tedge.geometry.relative = true;\n\t\t\tedge.edge = true;\n\t\t\t\n\t\t\tcell.insertEdge(edge, true);\n\t\t\n\t\t\treturn sb.createVertexTemplateFromCells([cell, edge], 200, 80, 'Fork/Join');\n\t\t}),\n\t\tthis.createVertexTemplateEntry('ellipse;html=1;shape=endState;fillColor=#000000;strokeColor=#ff0000;', 30, 30, '', 'End', null, null, 'uml activity state end'),\n\t\tthis.createVertexTemplateEntry(lifelineStyle, 100, 300, ':Object', 'Lifeline', null, null, 'uml sequence participant lifeline'),\n\t\tthis.createVertexTemplateEntry(lifelineStyle + 'participant=umlActor;', 20, 300, '', 'Actor Lifeline', null, null, 'uml sequence participant lifeline actor'),\n\t\tthis.createVertexTemplateEntry(lifelineStyle + 'participant=umlBoundary;', 50, 300, '', 'Boundary Lifeline', null, null, 'uml sequence participant lifeline boundary'),\n\t\tthis.createVertexTemplateEntry(lifelineStyle + 'participant=umlEntity;', 40, 300, '', 'Entity Lifeline', null, null, 'uml sequence participant lifeline entity'),\n\t\tthis.createVertexTemplateEntry(lifelineStyle + 'participant=umlControl;', 40, 300, '', 'Control Lifeline', null, null, 'uml sequence participant lifeline control'),\n\t\tthis.createVertexTemplateEntry('shape=umlFrame;whiteSpace=wrap;html=1;pointerEvents=0;', 300, 200, 'frame', 'Frame', null, null, 'uml sequence frame'),\n\t\tthis.createVertexTemplateEntry('shape=umlDestroy;whiteSpace=wrap;html=1;strokeWidth=3;targetShapes=umlLifeline;',\n\t\t\t30, 30, '', 'Destruction', null, null, 'uml sequence destruction destroy'),\n\t\tthis.addEntry('uml sequence invoke invocation call activation bar', function()\n\t\t{\n\t    \tvar cell = new mxCell('', new mxGeometry(0, 0, 10, 80), activationStyle);\n\t    \tcell.vertex = true;\n\t    \t\n\t\t\tvar edge = new mxCell('dispatch', new mxGeometry(0, 0, 0, 0), 'html=1;verticalAlign=bottom;startArrow=oval;endArrow=block;' +\n\t\t\t\t'startSize=8;edgeStyle=elbowEdgeStyle;elbow=vertical;curved=0;rounded=0;');\n\t\t\tedge.geometry.setTerminalPoint(new mxPoint(-60, 0), true);\n\t\t\tedge.geometry.relative = true;\n\t\t\tedge.edge = true;\n\t\t\t\n\t\t\tcell.insertEdge(edge, false);\n\t\n\t\t\treturn sb.createVertexTemplateFromCells([cell, edge], 10, 80, 'Found Message');\n\t\t}),\n\t\tthis.addEntry('uml sequence invoke call delegation synchronous invocation activation bar', function()\n\t\t{\n\t    \tvar cell = new mxCell('', new mxGeometry(0, 0, 10, 80), activationStyle);\n\t    \tcell.vertex = true;\n\t    \t\n\t\t\tvar edge1 = new mxCell('dispatch', new mxGeometry(0, 0, 0, 0), 'html=1;verticalAlign=bottom;endArrow=block;' +\n\t\t\t\t'edgeStyle=elbowEdgeStyle;elbow=vertical;curved=0;rounded=0;');\n\t\t\tedge1.geometry.setTerminalPoint(new mxPoint(-70, 0), true);\n\t\t\tedge1.geometry.relative = true;\n\t\t\tedge1.edge = true;\n\n\t\t\tcell.insertEdge(edge1, false);\n\t\t\t\n\t\t\tvar edge2 = new mxCell('return', new mxGeometry(0, 0, 0, 0), 'html=1;verticalAlign=bottom;endArrow=open;dashed=1;' +\n\t\t\t\t'endSize=8;edgeStyle=elbowEdgeStyle;elbow=vertical;curved=0;rounded=0;');\n\t\t\tedge2.geometry.setTerminalPoint(new mxPoint(-70, 75), false);\n\t\t\tedge2.geometry.relative = true;\n\t\t\tedge2.edge = true;\n\t\t\t\n\t\t\tcell.insertEdge(edge2, true);\n\t\t\t\n\t\t\treturn sb.createVertexTemplateFromCells([cell, edge1, edge2], 10, 80, 'Synchronous Invocation');\n\t\t}),\n\t\tthis.addEntry('uml sequence self call recursion delegation activation bar', function()\n\t\t{\n\t    \tvar cell = new mxCell('', new mxGeometry(-5, 20, 10, 40), activationStyle);\n\t    \tcell.vertex = true;\n\t\n\t\t\tvar edge = new mxCell('self call', new mxGeometry(0, 0, 0, 0), 'html=1;align=left;spacingLeft=2;endArrow=block;' +\n\t\t\t\t'rounded=0;edgeStyle=orthogonalEdgeStyle;curved=0;rounded=0;');\n\t\t\tedge.geometry.setTerminalPoint(new mxPoint(0, 0), true);\n\t\t\tedge.geometry.points = [new mxPoint(30, 30)];\n\t\t\tedge.geometry.relative = true;\n\t\t\tedge.edge = true;\n\t\t\t\n\t\t\tcell.insertEdge(edge, false);\n\t\n\t\t\treturn sb.createVertexTemplateFromCells([cell, edge], 10, 60, 'Self Call');\n\t\t}),\n\t\tthis.addEntry('uml sequence invoke call delegation callback activation bar', function()\n\t\t{\n\t\t\tvar cell = new mxCell('', new mxGeometry(0, 0, 10, 80), activationStyle);\n\t\t\tcell.vertex = true;\n\n\t\t\tvar edge1 = new mxCell('callback', new mxGeometry(0, 0, 0, 0), 'html=1;verticalAlign=bottom;endArrow=block;' +\n\t\t\t\t'edgeStyle=elbowEdgeStyle;elbow=vertical;curved=0;rounded=0;');\n\t\t\tedge1.geometry.setTerminalPoint(new mxPoint(80, 0), true);\n\t\t\tedge1.geometry.relative = true;\n\t\t\tedge1.edge = true;\n\n\t\t\tcell.insertEdge(edge1, false);\n\n\t\t\tvar edge2 = new mxCell('return', new mxGeometry(0, 0, 0, 0), 'html=1;verticalAlign=bottom;endArrow=open;dashed=1;' +\n\t\t\t\t'endSize=8;edgeStyle=elbowEdgeStyle;elbow=vertical;curved=0;rounded=0;');\n\t\t\tedge2.geometry.setTerminalPoint(new mxPoint(80, 75), false);\n\t\t\tedge2.geometry.relative = true;\n\t\t\tedge2.edge = true;\n\n\t\t\tcell.insertEdge(edge2, true);\n\n\t\t\treturn sb.createVertexTemplateFromCells([cell, edge1, edge2], 10, 80, 'Callback');\n\n\t\t}),\n\t\tthis.createVertexTemplateEntry(activationStyle, 10, 80, '', 'Activation Bar', null, null, 'uml sequence activation bar'),\n\t \tthis.createEdgeTemplateEntry('html=1;verticalAlign=bottom;startArrow=oval;startFill=1;endArrow=block;startSize=8;' +\n\t\t \t'edgeStyle=elbowEdgeStyle;elbow=vertical;curved=0;rounded=0;', 60, 0, 'dispatch', 'Found Message 1', null, 'uml sequence message call invoke dispatch'),\n\t \tthis.createEdgeTemplateEntry('html=1;verticalAlign=bottom;startArrow=circle;startFill=1;endArrow=open;startSize=6;endSize=8;' +\n\t\t\t 'edgeStyle=elbowEdgeStyle;elbow=vertical;curved=0;rounded=0;', 80, 0, 'dispatch', 'Found Message 2', null, 'uml sequence message call invoke dispatch'),\n\t \tthis.createEdgeTemplateEntry('html=1;verticalAlign=bottom;endArrow=block;edgeStyle=elbowEdgeStyle;elbow=vertical;curved=0;rounded=0;',\n\t\t\t80, 0, 'dispatch', 'Message', null, 'uml sequence message call invoke dispatch'),\n\t\tthis.addEntry('uml sequence return message', function()\n\t\t{\n\t\t\tvar edge = new mxCell('return', new mxGeometry(0, 0, 0, 0), 'html=1;verticalAlign=bottom;endArrow=open;dashed=1;endSize=8;' +\n\t\t\t\t'edgeStyle=elbowEdgeStyle;elbow=vertical;curved=0;rounded=0;');\n\t\t\tedge.geometry.setTerminalPoint(new mxPoint(80, 0), true);\n\t\t\tedge.geometry.setTerminalPoint(new mxPoint(0, 0), false);\n\t\t\tedge.geometry.relative = true;\n\t\t\tedge.edge = true;\n\t\t\t\n\t\t\treturn sb.createEdgeTemplateFromCells([edge], 80, 0, 'Return');\n\t\t}),\n\t\tthis.addEntry('uml relation', function()\n\t\t{\n\t\t\tvar edge = new mxCell('name', new mxGeometry(0, 0, 0, 0), 'endArrow=block;endFill=1;html=1;edgeStyle=orthogonalEdgeStyle;align=left;verticalAlign=top;');\n\t\t\tedge.geometry.setTerminalPoint(new mxPoint(0, 0), true);\n\t\t\tedge.geometry.setTerminalPoint(new mxPoint(160, 0), false);\n\t\t\tedge.geometry.relative = true;\n\t\t\tedge.geometry.x = -1;\n\t\t\tedge.edge = true;\n\t\t\t\n\t    \tvar cell = new mxCell('1', new mxGeometry(-1, 0, 0, 0), 'edgeLabel;resizable=0;html=1;align=left;verticalAlign=bottom;');\n\t    \tcell.geometry.relative = true;\n\t    \tcell.setConnectable(false);\n\t    \tcell.vertex = true;\n\t    \tedge.insert(cell);\n\t    \t\n\t\t\treturn sb.createEdgeTemplateFromCells([edge], 160, 0, 'Relation 1');\n\t\t}),\n\t\tthis.addEntry('uml association', function()\n\t\t{\n\t\t\tvar edge = new mxCell('', new mxGeometry(0, 0, 0, 0), 'endArrow=none;html=1;edgeStyle=orthogonalEdgeStyle;');\n\t\t\tedge.geometry.setTerminalPoint(new mxPoint(0, 0), true);\n\t\t\tedge.geometry.setTerminalPoint(new mxPoint(160, 0), false);\n\t\t\tedge.geometry.relative = true;\n\t\t\tedge.edge = true;\n\t\t\t\n\t    \tvar cell1 = new mxCell('parent', new mxGeometry(-1, 0, 0, 0), 'edgeLabel;resizable=0;html=1;align=left;verticalAlign=bottom;');\n\t    \tcell1.geometry.relative = true;\n\t    \tcell1.setConnectable(false);\n\t    \tcell1.vertex = true;\n\t    \tedge.insert(cell1);\n\t\t\t\n\t    \tvar cell2 = new mxCell('child', new mxGeometry(1, 0, 0, 0), 'edgeLabel;resizable=0;html=1;align=right;verticalAlign=bottom;');\n\t    \tcell2.geometry.relative = true;\n\t    \tcell2.setConnectable(false);\n\t    \tcell2.vertex = true;\n\t    \tedge.insert(cell2);\n\t    \t\n\t\t\treturn sb.createEdgeTemplateFromCells([edge], 160, 0, 'Association 1');\n\t\t}),\n\t\tthis.addEntry('uml aggregation', function()\n\t\t{\n\t\t\tvar edge = new mxCell('1', new mxGeometry(0, 0, 0, 0), 'endArrow=open;html=1;endSize=12;startArrow=diamondThin;startSize=14;startFill=0;edgeStyle=orthogonalEdgeStyle;align=left;verticalAlign=bottom;');\n\t\t\tedge.geometry.setTerminalPoint(new mxPoint(0, 0), true);\n\t\t\tedge.geometry.setTerminalPoint(new mxPoint(160, 0), false);\n\t\t\tedge.geometry.relative = true;\n\t\t\tedge.geometry.x = -1;\n\t\t\tedge.geometry.y = 3;\n\t\t\tedge.edge = true;\n\t\t\n\t\t\treturn sb.createEdgeTemplateFromCells([edge], 160, 0, 'Aggregation 1');\n\t\t}),\n\t\tthis.addEntry('uml composition', function()\n\t\t{\n\t\t\tvar edge = new mxCell('1', new mxGeometry(0, 0, 0, 0), 'endArrow=open;html=1;endSize=12;startArrow=diamondThin;startSize=14;startFill=1;edgeStyle=orthogonalEdgeStyle;align=left;verticalAlign=bottom;');\n\t\t\tedge.geometry.setTerminalPoint(new mxPoint(0, 0), true);\n\t\t\tedge.geometry.setTerminalPoint(new mxPoint(160, 0), false);\n\t\t\tedge.geometry.relative = true;\n\t\t\tedge.geometry.x = -1;\n\t\t\tedge.geometry.y = 3;\n\t\t\tedge.edge = true;\n\t\t\t\n\t\t\treturn sb.createEdgeTemplateFromCells([edge], 160, 0, 'Composition 1');\n\t\t}),\n\t\tthis.addEntry('uml relation', function()\n\t\t{\n\t\t\tvar edge = new mxCell('Relation', new mxGeometry(0, 0, 0, 0), 'endArrow=open;html=1;endSize=12;startArrow=diamondThin;startSize=14;startFill=0;edgeStyle=orthogonalEdgeStyle;');\n\t\t\tedge.geometry.setTerminalPoint(new mxPoint(0, 0), true);\n\t\t\tedge.geometry.setTerminalPoint(new mxPoint(160, 0), false);\n\t\t\tedge.geometry.relative = true;\n\t\t\tedge.edge = true;\n\t\t\t\n\t    \tvar cell1 = new mxCell('0..n', new mxGeometry(-1, 0, 0, 0), 'edgeLabel;resizable=0;html=1;align=left;verticalAlign=top;');\n\t    \tcell1.geometry.relative = true;\n\t    \tcell1.setConnectable(false);\n\t    \tcell1.vertex = true;\n\t    \tedge.insert(cell1);\n\t\t\t\n\t    \tvar cell2 = new mxCell('1', new mxGeometry(1, 0, 0, 0), 'edgeLabel;resizable=0;html=1;align=right;verticalAlign=top;');\n\t    \tcell2.geometry.relative = true;\n\t    \tcell2.setConnectable(false);\n\t    \tcell2.vertex = true;\n\t    \tedge.insert(cell2);\n\t    \t\n\t\t\treturn sb.createEdgeTemplateFromCells([edge], 160, 0, 'Relation 2');\n\t\t}),\n\t\tthis.createEdgeTemplateEntry('endArrow=open;endSize=12;dashed=1;html=1;', 160, 0, 'Use', 'Dependency', null, 'uml dependency use'),\n\t\tthis.createEdgeTemplateEntry('endArrow=block;endSize=16;endFill=0;html=1;', 160, 0, 'Extends', 'Generalization', null, 'uml generalization extend'),\n\t \tthis.createEdgeTemplateEntry('endArrow=block;startArrow=block;endFill=1;startFill=1;html=1;', 160, 0, '', 'Association 2', null, 'uml association'),\n\t \tthis.createEdgeTemplateEntry('endArrow=open;startArrow=circlePlus;endFill=0;startFill=0;endSize=8;html=1;', 160, 0, '', 'Inner Class', null, 'uml inner class'),\n\t \tthis.createEdgeTemplateEntry('endArrow=open;startArrow=cross;endFill=0;startFill=0;endSize=8;startSize=10;html=1;', 160, 0, '', 'Terminate', null, 'uml terminate'),\n\t \tthis.createEdgeTemplateEntry('endArrow=block;dashed=1;endFill=0;endSize=12;html=1;', 160, 0, '', 'Implementation', null, 'uml realization implementation'),\n\t \tthis.createEdgeTemplateEntry('endArrow=diamondThin;endFill=0;endSize=24;html=1;', 160, 0, '', 'Aggregation 2', null, 'uml aggregation'),\n\t \tthis.createEdgeTemplateEntry('endArrow=diamondThin;endFill=1;endSize=24;html=1;', 160, 0, '', 'Composition 2', null, 'uml composition'),\n\t \tthis.createEdgeTemplateEntry('endArrow=open;endFill=1;endSize=12;html=1;', 160, 0, '', 'Association 3', null, 'uml association')\n\t];\n\t\n\tthis.addPaletteFunctions('uml', mxResources.get('uml'), expand || false, fns);\n\tthis.setCurrentSearchEntryLibrary();\n};\n\n/**\n * Creates and returns the given title element.\n */\nSidebar.prototype.createTitle = function(label)\n{\n\tvar elt = document.createElement('a');\n\telt.setAttribute('title', mxResources.get('sidebarTooltip'));\n\telt.className = 'geTitle';\n\tmxUtils.write(elt, label);\n\n\treturn elt;\n};\n\n/**\n * Creates a thumbnail for the given cells.\n */\nSidebar.prototype.createThumb = function(cells, width, height, parent, title, showLabel, showTitle, w, h, bg, border, scale)\n{\n\tthis.graph.labelsVisible = (showLabel == null || showLabel);\n\tvar fo = mxClient.NO_FO;\n\tmxClient.NO_FO = Editor.prototype.originalNoForeignObject;\n\n\t// Tries to avoid transparent color but can't use computed\n\t// style due to async CSS\n\tthis.graph.shapeBackgroundColor = (bg != null) ? bg :\n\t\t(Editor.isDarkMode() ? '#2a252f' : '#f1f3f4');\n\tthis.graph.view.scaleAndTranslate((scale != null) ? scale : 1, 0, 0);\n\tthis.graph.addCells(cells);\n\tvar bounds = this.graph.getGraphBounds();\n\n\tif (scale == null)\n\t{\n\t\tvar s = Math.floor(Math.min((width - 2 * this.thumbBorder) / bounds.width,\n\t\t\t(height - 2 * this.thumbBorder) / bounds.height) * 100) / 100;\n\t\tthis.graph.view.scaleAndTranslate(s,\n\t\t\tMath.floor((width - bounds.width * s) / 2 / s - bounds.x),\n\t\t\tMath.floor((height - bounds.height * s) / 2 / s - bounds.y));\n\t}\n\n\tvar node = null;\n\t\n\t// For supporting HTML labels in IE9 standards mode the container is cloned instead\n\tif (this.graph.dialect == mxConstants.DIALECT_SVG && !mxClient.NO_FO &&\n\t\tthis.graph.view.getCanvas().ownerSVGElement != null)\n\t{\n\t\tnode = this.graph.view.getCanvas().ownerSVGElement.cloneNode(true);\n\t}\n\t// LATER: Check if deep clone can be used for quirks if container in DOM\n\telse\n\t{\n\t\tnode = this.graph.container.cloneNode(false);\n\t\tnode.innerHTML = this.graph.container.innerHTML;\n\t}\n\n\tthis.graph.getModel().clear();\n\tthis.graph.view.scaleAndTranslate(1, 0, 0);\n\tthis.graph.shapeBackgroundColor = (Editor.isDarkMode() ?\n\t\t'#2a252f' : '#f1f3f4');\n\tmxClient.NO_FO = fo;\n\t\n\tnode.style.position = 'relative';\n\tnode.style.overflow = (scale != null) ? 'visible' : 'hidden';\n\tnode.style.left = ((border != null) ? border : this.thumbBorder) + 'px';\n\tnode.style.top = node.style.left;\n\tnode.style.width = width + 'px';\n\tnode.style.height = height + 'px';\n\tnode.style.visibility = '';\n\tnode.style.minWidth = '';\n\tnode.style.minHeight = '';\n\tthis.disablePointerEvents(node);\n\t\n\tparent.appendChild(node);\n\t\n\t// Adds title for sidebar entries\n\tif (this.sidebarTitles && title != null && showTitle != false)\n\t{\n\t\tvar border = 0;\n\t\tparent.style.height = (this.thumbHeight + border + this.sidebarTitleSize + 8) + 'px';\n\t\t\n\t\tvar div = document.createElement('div');\n\t\tdiv.style.color = Editor.isDarkMode() ? '#A0A0A0' : '#303030';\n\t\tdiv.style.fontSize = this.sidebarTitleSize + 'px';\n\t\tdiv.style.textAlign = 'center';\n\t\tdiv.style.whiteSpace = 'nowrap';\n\t\tdiv.style.overflow = 'hidden';\n\t\tdiv.style.textOverflow = 'ellipsis';\n\t\t\n\t\tif (mxClient.IS_IE)\n\t\t{\n\t\t\tdiv.style.height = (this.sidebarTitleSize + 12) + 'px';\n\t\t}\n\n\t\tdiv.style.paddingTop = '4px';\n\t\tmxUtils.write(div, title);\n\t\tparent.appendChild(div);\n\t}\n\n\treturn bounds;\n};\n\n/**\n * Returns a function that creates a title.\n */\nSidebar.prototype.createSection = function(title)\n{\n\treturn mxUtils.bind(this, function()\n\t{\n\t\tvar elt = document.createElement('div');\n\t\telt.setAttribute('title', title);\n\t\telt.style.textOverflow = 'ellipsis';\n\t\telt.style.whiteSpace = 'nowrap';\n\t\telt.style.textAlign = 'center';\n\t\telt.style.overflow = 'hidden';\n\t\telt.style.width = '100%';\n\t\telt.style.padding = '14px 0';\n\t\t\n\t\tmxUtils.write(elt, title);\n\t\t\n\t\treturn elt;\n\t});\n};\n\n/**\n * Creates and returns a new palette item for the given image.\n */\nSidebar.prototype.createItem = function(cells, title, showLabel, showTitle, width, height,\n\tallowCellsInserted, showTooltip, clickFn, thumbWidth, thumbHeight, icon, startEditing,\n\tsourceCell)\n{\n\tshowTooltip = (showTooltip != null) ? showTooltip : true;\n\tthumbWidth = (thumbWidth != null) ? thumbWidth : this.thumbWidth;\n\tthumbHeight = (thumbHeight != null) ? thumbHeight : this.thumbHeight;\n\t\n\tvar elt = document.createElement('a');\n\telt.className = 'geItem';\n\telt.style.overflow = 'hidden';\n\tvar border = 2 * this.thumbBorder;\n\telt.style.width = (thumbWidth + border) + 'px';\n\telt.style.height = (thumbHeight + border) + 'px';\n\telt.style.padding = this.thumbPadding + 'px';\n\t\n\t// Blocks default click action\n\tmxEvent.addListener(elt, 'click', function(evt)\n\t{\n\t\tmxEvent.consume(evt);\n\t});\n\t\n\t// Applies default styles\n\tvar originalCells = cells;\n\tcells = this.graph.cloneCells(cells);\n\tthis.editorUi.insertHandler(originalCells, null, this.graph.model,\n\t\tthis.editorUi.editor.graph.defaultVertexStyle,\n\t\tthis.editorUi.editor.graph.defaultEdgeStyle,\n\t\ttrue, true);\n\n\tif (icon != null)\n\t{\n\t\telt.style.backgroundImage = 'url(' + icon + ')';\n\t\telt.style.backgroundRepeat = 'no-repeat';\n\t\telt.style.backgroundPosition = 'center';\n\t\telt.style.backgroundSize = '24px 24px';\n\t}\n\telse\n\t{\n\t\tthis.createThumb(originalCells, thumbWidth, thumbHeight,\n\t\t\telt, title, showLabel, showTitle, width, height);\n\t}\n\t\n\tvar bounds = new mxRectangle(0, 0, width, height);\n\t\n\tif (cells.length > 1 || cells[0].vertex)\n\t{\n\t\tvar ds = this.createDragSource(elt, this.createDropHandler(cells, true, allowCellsInserted,\n\t\t\tbounds, startEditing, sourceCell), this.createDragPreview(width, height),\n\t\t\tcells, bounds, startEditing);\n\t\tthis.addClickHandler(elt, ds, cells, clickFn, startEditing);\n\t\n\t\t// Uses guides for vertices only if enabled in graph\n\t\tds.isGuidesEnabled = mxUtils.bind(this, function()\n\t\t{\n\t\t\treturn this.editorUi.editor.graph.graphHandler.guidesEnabled;\n\t\t});\n\t}\n\telse if (cells[0] != null && cells[0].edge)\n\t{\n\t\tvar ds = this.createDragSource(elt, this.createDropHandler(cells, false, allowCellsInserted,\n\t\t\tbounds, startEditing, sourceCell), this.createDragPreview(width, height),\n\t\t\tcells, bounds, startEditing);\n\t\tthis.addClickHandler(elt, ds, cells, clickFn);\n\t}\n\t\n\t// Shows a tooltip with the rendered cell\n\tif (!mxClient.IS_IOS && showTooltip)\n\t{\n\t\tmxEvent.addGestureListeners(elt, null, mxUtils.bind(this, function(evt)\n\t\t{\n\t\t\tif (mxEvent.isMouseEvent(evt))\n\t\t\t{\n\t\t\t\tthis.showTooltip(elt, cells, bounds.width, bounds.height, title, showLabel);\n\t\t\t}\n\t\t}));\n\t}\n\t\n\treturn elt;\n};\n\n/**\n * Creates a drop handler for inserting the given cells.\n */\nSidebar.prototype.createDropHandler = function(cells, allowSplit, allowCellsInserted, bounds, startEditing, sourceCell)\n{\n\tallowCellsInserted = (allowCellsInserted != null) ? allowCellsInserted : true;\n\t\n\treturn mxUtils.bind(this, function(graph, evt, target, x, y, force)\n\t{\n\t\tvar elt = (force) ? null : ((mxEvent.isTouchEvent(evt) || mxEvent.isPenEvent(evt)) ?\n\t\t\tdocument.elementFromPoint(mxEvent.getClientX(evt), mxEvent.getClientY(evt)) :\n\t\t\tmxEvent.getSource(evt));\n\t\t\n\t\twhile (elt != null && elt != this.container)\n\t\t{\n\t\t\telt = elt.parentNode;\n\t\t}\n\t\t\n\t\tif (elt == null && graph.isEnabled())\n\t\t{\n\t\t\tcells = graph.getImportableCells(cells);\n\t\t\t\n\t\t\tif (cells.length > 0)\n\t\t\t{\n\t\t\t\tgraph.stopEditing();\n\t\t\t\t\n\t\t\t\t// Holding alt while mouse is released ignores drop target\n\t\t\t\tvar validDropTarget = (target != null && !mxEvent.isAltDown(evt)) ?\n\t\t\t\t\tgraph.isValidDropTarget(target, cells, evt) : false;\n\t\t\t\t\t\n\t\t\t\tvar select = null;\n\n\t\t\t\tif (target != null && !validDropTarget)\n\t\t\t\t{\n\t\t\t\t\ttarget = null;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (!graph.isCellLocked(target || graph.getDefaultParent()))\n\t\t\t\t{\n\t\t\t\t\tgraph.model.beginUpdate();\n\t\t\t\t\ttry\n\t\t\t\t\t{\n\t\t\t\t\t\tx = Math.round(x);\n\t\t\t\t\t\ty = Math.round(y);\n\t\t\t\t\t\t\n\t\t\t\t\t\t// Splits the target edge or inserts into target group\n\t\t\t\t\t\tif (allowSplit && graph.isSplitTarget(target, cells, evt))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tvar s = graph.view.scale;\n\t\t\t\t\t\t\tvar tr = graph.view.translate;\n\t\t\t\t\t\t\tvar tx = (x + tr.x) * s;\n\t\t\t\t\t\t\tvar ty = (y + tr.y) * s;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tvar clones = graph.cloneCells(cells);\n\t\t\t\t\t\t\tgraph.splitEdge(target, clones, null,\n\t\t\t\t\t\t\t\tx - bounds.width / 2, y - bounds.height / 2,\n\t\t\t\t\t\t\t\ttx, ty);\n\t\t\t\t\t\t\tselect = clones;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if (cells.length > 0)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tselect = graph.importCells(cells, x, y, target);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif (graph.model.isVertex(sourceCell) && select.length == 1 &&\n\t\t\t\t\t\t\t\tgraph.model.isVertex(select[0]))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tvar edge = graph.insertEdge(graph.model.getParent(sourceCell),\n\t\t\t\t\t\t\t\t\tnull, '', sourceCell, select[0], graph.createCurrentEdgeStyle());\n\t\t\t\t\t\t\t\tgraph.applyNewEdgeStyle(sourceCell, [edge]);\n\t\t\t\t\t\t\t\tselect.push(edge);\n\n\t\t\t\t\t\t\t\tif (graph.connectionHandler.insertBeforeSource)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tgraph.insertEdgeBeforeCell(edge, sourceCell);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t// Executes parent layout hooks for position/order\n\t\t\t\t\t\tif (graph.layoutManager != null)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tvar layout = graph.layoutManager.getLayout(target);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif (layout != null)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tvar s = graph.view.scale;\n\t\t\t\t\t\t\t\tvar tr = graph.view.translate;\n\t\t\t\t\t\t\t\tvar tx = (x + tr.x) * s;\n\t\t\t\t\t\t\t\tvar ty = (y + tr.y) * s;\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tfor (var i = 0; i < select.length; i++)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tlayout.moveCell(select[i], tx, ty);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (allowCellsInserted && (evt == null || !mxEvent.isShiftDown(evt)))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tgraph.fireEvent(new mxEventObject('cellsInserted', 'cells', select));\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tfor (var i = 0; i < select.length; i++)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif (graph.model.isVertex(select[i]) &&\n\t\t\t\t\t\t\t\tgraph.isAutoSizeCell(select[i]))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tgraph.updateCellSize(select[i]);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tcatch (e)\n\t\t\t\t\t{\n\t\t\t\t\t\tthis.editorUi.handleError(e);\n\t\t\t\t\t}\n\t\t\t\t\tfinally\n\t\t\t\t\t{\n\t\t\t\t\t\tgraph.model.endUpdate();\n\t\t\t\t\t}\n\t\n\t\t\t\t\tif (select != null && select.length > 0)\n\t\t\t\t\t{\n\t\t\t\t\t\tgraph.scrollCellToVisible(select[0]);\n\t\t\t\t\t\tgraph.setSelectionCells(select);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (startEditing || (graph.editAfterInsert && evt != null &&\n\t\t\t\t\t\tmxEvent.isMouseEvent(evt) && select != null &&\n\t\t\t\t\t\tselect.length == 1))\n\t\t\t\t\t{\n\t\t\t\t\t\twindow.setTimeout(function()\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tgraph.startEditing(select[0]);\n\t\t\t\t\t\t}, 0);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tmxEvent.consume(evt);\n\t\t}\n\t});\n};\n\n/**\n * Creates and returns a preview element for the given width and height.\n */\nSidebar.prototype.createDragPreview = function(width, height)\n{\n\tvar elt = document.createElement('div');\n\telt.className = 'geDragPreview';\n\telt.style.width = width + 'px';\n\telt.style.height = height + 'px';\n\t\n\treturn elt;\n};\n\n/**\n * Creates a drag source for the given element.\n */\nSidebar.prototype.dropAndConnect = function(source, targets, direction, dropCellIndex, evt, firstVertex, freeSourceEdge)\n{\n\tvar graph = this.editorUi.editor.graph;\n\tvar index = (graph.model.isEdge(source) || firstVertex != null) ? firstVertex : freeSourceEdge;\n\tvar geo = this.getDropAndConnectGeometry(source, targets[index], direction, targets);\n\t\n\t// Targets without the new edge for selection\n\tvar tmp = [];\n\t\n\tif (geo != null)\n\t{\n\t\tvar editingCell = null;\n\n\t\tgraph.model.beginUpdate();\n\t\ttry\n\t\t{\n\t\t\tvar sourceGeo = graph.getCellGeometry(source);\n\t\t\tvar geo2 = graph.getCellGeometry(targets[dropCellIndex]);\n\n\t\t\t// Handles special case where target should be ignored for stack layouts\n\t\t\tvar targetParent = graph.model.getParent(source);\n\t\t\tvar validLayout = true;\n\t\t\t\n\t\t\t// Ignores parent if it has a stack layout or if it is a table or row\n\t\t\tif (graph.layoutManager != null)\n\t\t\t{\n\t\t\t\tvar layout = graph.layoutManager.getLayout(targetParent);\n\t\t\t\n\t\t\t\t// LATER: Use parent of parent if valid layout\n\t\t\t\tif (layout != null && layout.constructor == mxStackLayout)\n\t\t\t\t{\n\t\t\t\t\tvalidLayout = false;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// Checks if another container is at the drop location\n\t\t\tvar tmp = (graph.model.isEdge(source)) ? null : graph.view.getState(targetParent);\n\t\t\tvar dx = 0;\n\t\t\tvar dy = 0;\n\t\t\t\n\t\t\t// Offsets by parent position\n\t\t\tif (tmp != null)\n\t\t\t{\n\t\t\t\tvar offset = tmp.origin;\n\t\t\t\tdx = offset.x;\n\t\t\t\tdy = offset.y;\n\t\t\t}\n\t\t\t\n\t\t\tvar useParent = !graph.isTableRow(source) && !graph.isTableCell(source) &&\n\t\t\t\t(graph.model.isEdge(source) || (sourceGeo != null &&\n\t\t\t\t!sourceGeo.relative && validLayout));\n\t\t\t\n\t\t\tvar tempTarget = graph.getCellAt((geo.x + dx + graph.view.translate.x) * graph.view.scale,\n\t\t\t\t(geo.y + dy + graph.view.translate.y) * graph.view.scale, null, null, null, function(state, x, y)\n\t\t\t\t{\n\t\t\t\t\treturn !graph.isContainer(state.cell);\n\t\t\t\t});\n\t\t\t\n\t\t\tif (tempTarget != null && tempTarget != targetParent)\n\t\t\t{\n\t\t\t\ttmp = graph.view.getState(tempTarget);\n\t\t\t\n\t\t\t\t// Offsets by new parent position\n\t\t\t\tif (tmp != null)\n\t\t\t\t{\n\t\t\t\t\tvar offset = tmp.origin;\n\t\t\t\t\ttargetParent = tempTarget;\n\t\t\t\t\tuseParent = true;\n\t\t\t\t\t\n\t\t\t\t\tif (!graph.model.isEdge(source))\n\t\t\t\t\t{\n\t\t\t\t\t\tgeo.x -= offset.x - dx;\n\t\t\t\t\t\tgeo.y -= offset.y - dy;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if (!validLayout || graph.isTableRow(source) || graph.isTableCell(source))\n\t\t\t{\n\t\t\t\tgeo.x += dx;\n\t\t\t\tgeo.y += dy;\n\t\t\t}\n\n\t\t\tdx = geo2.x;\n\t\t\tdy = geo2.y;\n\t\t\t\n\t\t\t// Ignores geometry of edges\n\t\t\tif (graph.model.isEdge(targets[dropCellIndex]))\n\t\t\t{\n\t\t\t\tdx = 0;\n\t\t\t\tdy = 0;\n\t\t\t}\n\t\t\t\n\t\t\ttargets = graph.importCells(targets, (geo.x - (useParent ? dx : 0)),\n\t\t\t\t(geo.y - (useParent ? dy : 0)), (useParent) ? targetParent : null);\n\t\t\ttmp = targets;\n\n\t\t\tif (graph.model.isEdge(source))\n\t\t\t{\n\t\t\t\t// Adds new terminal to edge\n\t\t\t\t// LATER: Push new terminal out radially from edge start point\n\t\t\t\tgraph.model.setTerminal(source, targets[dropCellIndex],\n\t\t\t\t\tdirection == mxConstants.DIRECTION_NORTH);\n\t\t\t\t\n\t\t\t\t// Replaces the source edge style with the dangling edge and\n\t\t\t\t// removes the dangling edge from the graph\n\t\t\t\tif (freeSourceEdge != null && firstVertex != null)\n\t\t\t\t{\n\t\t\t\t\tgraph.model.remove(targets[freeSourceEdge]);\n\t\t\t\t\tgraph.updateShapes(targets[freeSourceEdge], [source]);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if (graph.model.isEdge(targets[dropCellIndex]) && firstVertex == null)\n\t\t\t{\n\t\t\t\t// Adds new outgoing connection to vertex and clears points\n\t\t\t\tgraph.model.setTerminal(targets[dropCellIndex], source, true);\n\t\t\t\tvar geo3 = graph.getCellGeometry(targets[dropCellIndex]);\n\t\t\t\tvar tp = (geo3 != null) ? geo3.getTerminalPoint(true) : null;\n\t\t\t\tgeo3.points = null;\n\n\t\t\t\t// Connects edge terminal points at the same location to the source\n\t\t\t\tif (tp != null)\n\t\t\t\t{\n\t\t\t\t\tfor (var i = 0; i < targets.length; i++)\n\t\t\t\t\t{\n\t\t\t\t\t\tif (graph.model.isEdge(targets[i]) && i != dropCellIndex)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tvar geo4 = graph.getCellGeometry(targets[i]);\n\t\t\t\t\t\t\tvar pt = (geo4 != null) ? geo4.getTerminalPoint(true) : null;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif (pt != null)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif (pt.x == tp.x && pt.y == tp.y)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tgraph.model.setTerminal(targets[i], source, true);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (geo3.getTerminalPoint(false) != null)\n\t\t\t\t{\n\t\t\t\t\tgeo3.setTerminalPoint(geo.getTerminalPoint(false), false);\n\t\t\t\t}\n\t\t\t\telse if (useParent && graph.model.isVertex(targetParent))\n\t\t\t\t{\n\t\t\t\t\t// Adds parent offset to other nodes\n\t\t\t\t\tvar tmpState = graph.view.getState(targetParent);\n\t\t\t\t\tvar offset = (tmpState.cell != graph.view.currentRoot) ?\n\t\t\t\t\t\ttmpState.origin : new mxPoint(0, 0);\n\n\t\t\t\t\tgraph.cellsMoved(targets, offset.x, offset.y, null, null, true);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if (firstVertex != null)\n\t\t\t{\n\t\t\t\tgeo2 = graph.getCellGeometry(targets[firstVertex]);\n\t\t\t\tdx = geo.x - Math.round(geo2.x);\n\t\t\t\tdy = geo.y - Math.round(geo2.y);\n\t\t\t\tgeo.x = Math.round(geo2.x);\n\t\t\t\tgeo.y = Math.round(geo2.y);\n\t\t\t\tgraph.model.setGeometry(targets[dropCellIndex], geo);\n\t\t\t\tgraph.cellsMoved(targets, dx, dy, null, null, true);\n\t\t\t\ttmp = targets.slice();\n\t\t\t\teditingCell = (tmp.length == 1) ? tmp[0] : null;\n\n\t\t\t\tif (freeSourceEdge != null)\n\t\t\t\t{\n\t\t\t\t\tgraph.model.setTerminal(targets[freeSourceEdge], source, true);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\ttargets.push(graph.insertEdge(null, null, '', source, targets[dropCellIndex],\n\t\t\t\t\t\tgraph.createCurrentEdgeStyle()));\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif (evt == null || !mxEvent.isShiftDown(evt))\n\t\t\t{\n\t\t\t\tgraph.fireEvent(new mxEventObject('cellsInserted', 'cells', targets));\n\t\t\t}\n\t\t}\n\t\tcatch (e)\n\t\t{\n\t\t\tthis.editorUi.handleError(e);\n\t\t}\n\t\tfinally\n\t\t{\n\t\t\tgraph.model.endUpdate();\n\t\t}\n\t\t\n\t\tif (graph.editAfterInsert && evt != null && mxEvent.isMouseEvent(evt) &&\n\t\t\teditingCell != null)\n\t\t{\n\t\t\twindow.setTimeout(function()\n\t\t\t{\n\t\t\t\tgraph.startEditing(editingCell);\n\t\t\t}, 0);\n\t\t}\n\t}\n\n\t// Removes connected edge from selection\n\t// cells to avoid disconnecting on move\n\tif (freeSourceEdge != null && tmp.length > 1)\n\t{\n\t\ttmp.splice(freeSourceEdge, 1);\n\t}\n\t\n\treturn tmp;\n};\n\n/**\n * Creates a drag source for the given element.\n */\nSidebar.prototype.getDropAndConnectGeometry = function(source, target, direction, targets)\n{\n\tvar graph = this.editorUi.editor.graph;\n\tvar view = graph.view;\n\tvar keepSize = targets.length > 1;\n\tvar state = graph.view.getState(source);\n\tvar geo = graph.getCellGeometry(source);\n\tvar geo2 = graph.getCellGeometry(target);\n\n\tif (state != null && geo != null && geo2 != null)\n\t{\n\t\tgeo2 = geo2.clone();\n\n\t\tif (graph.model.isEdge(source))\n\t\t{\n\t\t\tvar pts = state.absolutePoints;\n\t\t\tvar p0 = pts[0];\n\t\t\tvar pe = pts[pts.length - 1];\n\t\t\t\n\t\t\tif (direction == mxConstants.DIRECTION_NORTH)\n\t\t\t{\n\t\t\t\tgeo2.x = p0.x / view.scale - view.translate.x - geo2.width / 2;\n\t\t\t\tgeo2.y = p0.y / view.scale - view.translate.y - geo2.height / 2;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tgeo2.x = pe.x / view.scale - view.translate.x - geo2.width / 2;\n\t\t\t\tgeo2.y = pe.y / view.scale - view.translate.y - geo2.height / 2;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif (geo.relative)\n\t\t\t{\n\t\t\t\tgeo = geo.clone();\n\t\t\t\tgeo.x = (state.x - view.translate.x) / view.scale;\n\t\t\t\tgeo.y = (state.y - view.translate.y) / view.scale;\n\t\t\t}\n\t\t\t\n\t\t\tvar length = graph.defaultEdgeLength;\n\t\t\t\n\t\t\t// Maintains edge length\n\t\t\tif (graph.model.isEdge(target) && geo2.getTerminalPoint(true) != null &&\n\t\t\t\tgeo2.getTerminalPoint(false) != null)\n\t\t\t{\n\t\t\t\tvar p0 = geo2.getTerminalPoint(true);\n\t\t\t\tvar pe = geo2.getTerminalPoint(false);\n\t\t\t\tvar dx = pe.x - p0.x;\n\t\t\t\tvar dy = pe.y - p0.y;\n\t\t\t\t\n\t\t\t\tlength = Math.sqrt(dx * dx + dy * dy);\n\t\t\t\t\n\t\t\t\tgeo2.x = geo.getCenterX();\n\t\t\t\tgeo2.y = geo.getCenterY();\n\t\t\t\tgeo2.width = 1;\n\t\t\t\tgeo2.height = 1;\n\t\t\t\t\n\t\t\t\tif (direction == mxConstants.DIRECTION_NORTH)\n\t\t\t\t{\n\t\t\t\t\tgeo2.height = length\n\t\t\t\t\tgeo2.y = geo.y - length;\n\t\t\t\t\tgeo2.setTerminalPoint(new mxPoint(geo2.x, geo2.y), false);\n\t\t\t\t}\n\t\t\t\telse if (direction == mxConstants.DIRECTION_EAST)\n\t\t\t\t{\n\t\t\t\t\tgeo2.width = length\n\t\t\t\t\tgeo2.x = geo.x + geo.width;\n\t\t\t\t\tgeo2.setTerminalPoint(new mxPoint(geo2.x + geo2.width, geo2.y), false);\n\t\t\t\t}\n\t\t\t\telse if (direction == mxConstants.DIRECTION_SOUTH)\n\t\t\t\t{\n\t\t\t\t\tgeo2.height = length\n\t\t\t\t\tgeo2.y = geo.y + geo.height;\n\t\t\t\t\tgeo2.setTerminalPoint(new mxPoint(geo2.x, geo2.y + geo2.height), false);\n\t\t\t\t}\n\t\t\t\telse if (direction == mxConstants.DIRECTION_WEST)\n\t\t\t\t{\n\t\t\t\t\tgeo2.width = length\n\t\t\t\t\tgeo2.x = geo.x - length;\n\t\t\t\t\tgeo2.setTerminalPoint(new mxPoint(geo2.x, geo2.y), false);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// Try match size or ignore if width or height < 45 which\n\t\t\t\t// is considered special enough to be ignored here\n\t\t\t\tif (!keepSize && geo2.width > 45 && geo2.height > 45 &&\n\t\t\t\t\tgeo.width > 45 && geo.height > 45)\n\t\t\t\t{\n\t\t\t\t\tgeo2.width = geo2.width * (geo.height / geo2.height);\n\t\t\t\t\tgeo2.height = geo.height;\n\t\t\t\t}\n\t\n\t\t\t\tgeo2.x = geo.x + geo.width / 2 - geo2.width / 2;\n\t\t\t\tgeo2.y = geo.y + geo.height / 2 - geo2.height / 2;\n\n\t\t\t\tif (direction == mxConstants.DIRECTION_NORTH)\n\t\t\t\t{\n\t\t\t\t\tgeo2.y = geo2.y - geo.height / 2 - geo2.height / 2 - length;\n\t\t\t\t}\n\t\t\t\telse if (direction == mxConstants.DIRECTION_EAST)\n\t\t\t\t{\n\t\t\t\t\tgeo2.x = geo2.x + geo.width / 2 + geo2.width / 2 + length;\n\t\t\t\t}\n\t\t\t\telse if (direction == mxConstants.DIRECTION_SOUTH)\n\t\t\t\t{\n\t\t\t\t\tgeo2.y = geo2.y + geo.height / 2 + geo2.height / 2 + length;\n\t\t\t\t}\n\t\t\t\telse if (direction == mxConstants.DIRECTION_WEST)\n\t\t\t\t{\n\t\t\t\t\tgeo2.x = geo2.x - geo.width / 2 - geo2.width / 2 - length;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// Adds offset to match cells without connecting edge\n\t\t\t\tif (graph.model.isEdge(target) && geo2.getTerminalPoint(true) != null &&\n\t\t\t\t\ttarget.getTerminal(false) != null)\n\t\t\t\t{\n\t\t\t\t\tvar targetGeo = graph.getCellGeometry(target.getTerminal(false));\n\t\t\t\t\t\n\t\t\t\t\tif (targetGeo != null)\n\t\t\t\t\t{\n\t\t\t\t\t\tif (direction == mxConstants.DIRECTION_NORTH)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tgeo2.x -= targetGeo.getCenterX();\n\t\t\t\t\t\t\tgeo2.y -= targetGeo.getCenterY() + targetGeo.height / 2;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if (direction == mxConstants.DIRECTION_EAST)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tgeo2.x -= targetGeo.getCenterX() - targetGeo.width / 2;\n\t\t\t\t\t\t\tgeo2.y -= targetGeo.getCenterY();\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if (direction == mxConstants.DIRECTION_SOUTH)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tgeo2.x -= targetGeo.getCenterX();\n\t\t\t\t\t\t\tgeo2.y -= targetGeo.getCenterY() - targetGeo.height / 2;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if (direction == mxConstants.DIRECTION_WEST)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tgeo2.x -= targetGeo.getCenterX() + targetGeo.width / 2;\n\t\t\t\t\t\t\tgeo2.y -= targetGeo.getCenterY();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t\n\treturn geo2;\n};\n\n/**\n * Limits drop style to non-transparent source shapes.\n */\nSidebar.prototype.isDropStyleEnabled = function(cells, firstVertex)\n{\n\tvar result = true;\n\t\n\tif (firstVertex != null && cells.length == 1)\n\t{\n\t\tvar vstyle = this.graph.getCellStyle(cells[firstVertex]);\n\t\t\n\t\tif (vstyle != null)\n\t\t{\n\t\t\tresult = mxUtils.getValue(vstyle, mxConstants.STYLE_STROKECOLOR, mxConstants.NONE) != mxConstants.NONE ||\n\t\t\t\tmxUtils.getValue(vstyle, mxConstants.STYLE_FILLCOLOR, mxConstants.NONE) != mxConstants.NONE;\n\t\t}\n\t}\n\t\n\treturn result;\n};\n\n/**\n * Ignores swimlanes as drop style targets.\n */\nSidebar.prototype.isDropStyleTargetIgnored = function(state)\n{\n\treturn this.graph.isSwimlane(state.cell) || this.graph.isTableCell(state.cell) ||\n\t\tthis.graph.isTableRow(state.cell) || this.graph.isTable(state.cell);\n};\n\n/**\n * Creates a drag source for the given element.\n */\nSidebar.prototype.disablePointerEvents = function(node)\n{\n\tmxUtils.visitNodes(node, mxUtils.bind(this, function(node)\n\t{\n\t\tif (node.nodeType == mxConstants.NODETYPE_ELEMENT)\n\t\t{\n\t\t\tnode.style.pointerEvents = 'none';\n\t\t\tnode.removeAttribute('pointer-events');\n\t\t}\n\t}));\n};\n\n/**\n * Creates a drag source for the given element.\n */\nSidebar.prototype.createDragSource = function(elt, dropHandler, preview, cells, bounds, startEditing)\n{\n\t// Checks if the cells contain any vertices\n\tvar ui = this.editorUi;\n\tvar graph = ui.editor.graph;\n\tvar freeSourceEdge = null;\n\tvar firstVertex = null;\n\tvar sidebar = this;\n\tvar count = 0;\n\tvar livePreview = this.livePreview;\n\n\tfor (var i = 0; i < cells.length && livePreview; i++)\n\t{\n\t\tcount += graph.model.getDescendants(cells[i]).length;\n\t\tlivePreview = count < graph.graphHandler.maxLivePreview;\n\t}\n\n\tfor (var i = 0; i < cells.length; i++)\n\t{\n\t\tif (firstVertex == null && graph.model.isVertex(cells[i]))\n\t\t{\n\t\t\tfirstVertex = i;\n\t\t}\n\t\telse if (freeSourceEdge == null && graph.model.isEdge(cells[i]) &&\n\t\t\t\tgraph.model.getTerminal(cells[i], true) == null)\n\t\t{\n\t\t\tfreeSourceEdge = i;\n\t\t}\n\t\t\n\t\tif (firstVertex != null && freeSourceEdge != null)\n\t\t{\n\t\t\tbreak;\n\t\t}\n\t}\n\t\n\tvar dropStyleEnabled = this.isDropStyleEnabled(cells, firstVertex);\n\t\n\tvar dragSource = mxUtils.makeDraggable(elt, graph, mxUtils.bind(this, function(graph, evt, target, x, y)\n\t{\n\t\tif (this.updateThread != null)\n\t\t{\n\t\t\twindow.clearTimeout(this.updateThread);\n\t\t}\n\t\t\n\t\tif (cells != null && currentStyleTarget != null && activeArrow == styleTarget)\n\t\t{\n\t\t\tvar tmp = graph.isCellSelected(currentStyleTarget.cell) ? graph.getSelectionCells() : [currentStyleTarget.cell];\n\t\t\tgraph.updateShapes((graph.model.isEdge(currentStyleTarget.cell)) ? cells[0] : cells[firstVertex], tmp);\n\t\t\tgraph.setSelectionCells(tmp);\n\t\t}\n\t\telse if (cells != null && activeArrow != null && currentTargetState != null && activeArrow != styleTarget)\n\t\t{\n\t\t\tvar index = (graph.model.isEdge(currentTargetState.cell) || freeSourceEdge == null) ? firstVertex : freeSourceEdge;\n\t\t\tgraph.setSelectionCells(this.dropAndConnect(currentTargetState.cell, cells, direction, index, evt, firstVertex, freeSourceEdge));\n\t\t}\n\t\telse\n\t\t{\n\t\t\tdropHandler.apply(this, arguments);\n\t\t}\n\t\t\n\t\tif (this.editorUi.hoverIcons != null)\n\t\t{\n\t\t\tthis.editorUi.hoverIcons.update(graph.view.getState(graph.getSelectionCell()));\n\t\t}\n\t}), preview, 0, 0, graph.autoscroll, true, true);\n\n\tif (livePreview)\n\t{\n\t\tdragSource.createDragElement = mxUtils.bind(this, function()\n\t\t{\n\t\t\treturn dragSource.createPreviewElement(this.graph);\n\t\t});\n\t\t\n\t\tdragSource.createPreviewElement = mxUtils.bind(this, function(targetGraph)\n\t\t{\n\t\t\tvar elt = document.createElement('a');\n\t\t\telt.className = 'geItem';\n\t\t\telt.style.overflow = 'visible';\n\t\t\tvar s = targetGraph.view.scale;\n\t\t\telt.style.width = (s * Math.max(1, bounds.width)) + 'px';\n\t\t\telt.style.height = (s * Math.max(1, bounds.height)) + 'px';\n\t\t\t\n\t\t\t// Transparency for guides and target highlights\n\t\t\tmxUtils.setOpacity(elt, 50);\n\n\t\t\tvar clones = graph.cloneCells(cells);\n\t\t\tui.insertHandler(clones, null, this.graph.model,\n\t\t\t\tnull, null, true, true);\n\t\t\t\n\t\t\tsidebar.createThumb(clones, s * Math.max(1, bounds.width),\n\t\t\t\ts * Math.max(1, bounds.height), elt, null, null, null,\n\t\t\t\tnull, null, graph.shapeBackgroundColor, 0, s);\n\t\t\t\n\t\t\treturn elt;\n\t\t});\n\t}\n\t\n\t// Stops dragging if cancel is pressed\n\tgraph.addListener(mxEvent.ESCAPE, function(sender, evt)\n\t{\n\t\tif (dragSource.isActive())\n\t\t{\n\t\t\tdragSource.reset();\n\t\t}\n\t});\n\n\t// Overrides mouseDown to ignore popup triggers\n\tvar mouseDown = dragSource.mouseDown;\n\t\n\tdragSource.mouseDown = function(evt)\n\t{\n\t\tif (!mxEvent.isPopupTrigger(evt) && !mxEvent.isMultiTouchEvent(evt) &&\n\t\t\t!graph.isCellLocked(graph.getDefaultParent()))\n\t\t{\n\t\t\tgraph.stopEditing();\n\t\t\tmouseDown.apply(this, arguments);\n\t\t}\n\t};\n\n\t// Workaround for event redirection via image tag in quirks and IE8\n\tfunction createArrow(img, tooltip)\n\t{\n\t\tvar arrow = null;\n\t\tarrow = mxUtils.createImage(img.src);\n\t\tarrow.style.width = img.width + 'px';\n\t\tarrow.style.height = img.height + 'px';\n\t\t\n\t\tif (tooltip != null)\n\t\t{\n\t\t\tarrow.setAttribute('title', tooltip);\n\t\t}\n\t\t\n\t\tmxUtils.setOpacity(arrow, (img == this.refreshTarget) ? 30 : 20);\n\t\tarrow.style.position = 'absolute';\n\t\tarrow.style.cursor = 'crosshair';\n\t\t\n\t\treturn arrow;\n\t};\n\n\tvar currentTargetState = null;\n\tvar currentStateHandle = null;\n\tvar currentStyleTarget = null;\n\tvar activeTarget = false;\n\t\n\tvar arrowUp = createArrow(this.triangleUp, mxResources.get('connect'));\n\tvar arrowRight = createArrow(this.triangleRight, mxResources.get('connect'));\n\tvar arrowDown = createArrow(this.triangleDown, mxResources.get('connect'));\n\tvar arrowLeft = createArrow(this.triangleLeft, mxResources.get('connect'));\n\tvar styleTarget = createArrow(this.refreshTarget, mxResources.get('replace'));\n\n\t// Workaround for actual parentNode not being updated in old IE\n\tvar styleTargetParent = null;\n\tvar roundSource = createArrow(this.roundDrop);\n\tvar roundTarget = createArrow(this.roundDrop);\n\tvar direction = mxConstants.DIRECTION_NORTH;\n\tvar activeArrow = null;\n\t\n\tfunction checkArrow(x, y, bounds, arrow)\n\t{\n\t\tif (arrow.parentNode != null)\n\t\t{\n\t\t\tif (mxUtils.contains(bounds, x, y))\n\t\t\t{\n\t\t\t\tmxUtils.setOpacity(arrow, 100);\n\t\t\t\tactiveArrow = arrow;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tmxUtils.setOpacity(arrow, (arrow == styleTarget) ? 30 : 20);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn bounds;\n\t};\n\t\n\t// Hides guides and preview if target is active\n\tvar dsCreatePreviewElement = dragSource.createPreviewElement;\n\t\n\t// Stores initial size of preview element\n\tdragSource.createPreviewElement = function(graph)\n\t{\n\t\tvar elt = dsCreatePreviewElement.apply(this, arguments);\n\t\t\n\t\t// Pass-through events required to tooltip on replace shape\n\t\tif (mxClient.IS_SVG)\n\t\t{\n\t\t\telt.style.pointerEvents = 'none';\n\t\t}\n\t\t\n\t\tthis.previewElementWidth = elt.style.width;\n\t\tthis.previewElementHeight = elt.style.height;\n\t\t\n\t\treturn elt;\n\t};\n\t\n\t// Shows/hides hover icons\n\tvar dragEnter = dragSource.dragEnter;\n\tdragSource.dragEnter = function(graph, evt)\n\t{\n\t\tif (ui.hoverIcons != null)\n\t\t{\n\t\t\tui.hoverIcons.setDisplay('none');\n\t\t}\n\t\t\n\t\tdragEnter.apply(this, arguments);\n\t};\n\t\n\tvar dragExit = dragSource.dragExit;\n\tdragSource.dragExit = function(graph, evt)\n\t{\n\t\tif (ui.hoverIcons != null)\n\t\t{\n\t\t\tui.hoverIcons.setDisplay('');\n\t\t}\n\t\t\n\t\tdragExit.apply(this, arguments);\n\t};\n\t\n\tdragSource.dragOver = function(graph, evt)\n\t{\n\t\tmxDragSource.prototype.dragOver.apply(this, arguments);\n\n\t\tif (this.currentGuide != null && activeArrow != null)\n\t\t{\n\t\t\tthis.currentGuide.hide();\n\t\t}\n\n\t\tif (this.previewElement != null)\n\t\t{\n\t\t\tui.hideShapePicker();\n\t\t\tvar view = graph.view;\n\t\t\t\n\t\t\tif (currentStyleTarget != null && activeArrow == styleTarget)\n\t\t\t{\n\t\t\t\tthis.previewElement.style.display = 'none';\n\t\t\t}\n\t\t\telse if (currentTargetState != null && activeArrow != null)\n\t\t\t{\n\t\t\t\tif (dragSource.currentHighlight != null && dragSource.currentHighlight.state != null)\n\t\t\t\t{\n\t\t\t\t\tdragSource.currentHighlight.hide();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tvar index = (graph.model.isEdge(currentTargetState.cell) || firstVertex != null) ? firstVertex : freeSourceEdge;\n\t\t\t\tvar geo = sidebar.getDropAndConnectGeometry(currentTargetState.cell, cells[index], direction, cells);\n\t\t\t\tvar geo2 = (!graph.model.isEdge(currentTargetState.cell)) ? graph.getCellGeometry(currentTargetState.cell) : null;\n\t\t\t\tvar geo3 = graph.getCellGeometry(cells[index]);\n\t\t\t\tvar parent = graph.model.getParent(currentTargetState.cell);\n\t\t\t\tvar dx = view.translate.x * view.scale;\n\t\t\t\tvar dy = view.translate.y * view.scale;\n\t\t\t\t\n\t\t\t\tif (geo2 != null && !geo2.relative && graph.model.isVertex(parent) && parent != view.currentRoot)\n\t\t\t\t{\n\t\t\t\t\tvar pState = view.getState(parent);\n\t\t\t\t\t\n\t\t\t\t\tdx = pState.x;\n\t\t\t\t\tdy = pState.y;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tvar dx2 = geo3.x;\n\t\t\t\tvar dy2 = geo3.y;\n\n\t\t\t\t// Ignores geometry of edges\n\t\t\t\tif (graph.model.isEdge(cells[index]))\n\t\t\t\t{\n\t\t\t\t\tdx2 = 0;\n\t\t\t\t\tdy2 = 0;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// Shows preview at drop location\n\t\t\t\tthis.previewElement.style.left = ((geo.x - dx2) * view.scale + dx) + 'px';\n\t\t\t\tthis.previewElement.style.top = ((geo.y - dy2) * view.scale + dy) + 'px';\n\t\t\t\t\n\t\t\t\tif (cells.length == 1)\n\t\t\t\t{\n\t\t\t\t\tthis.previewElement.style.width = (geo.width * view.scale) + 'px';\n\t\t\t\t\tthis.previewElement.style.height = (geo.height * view.scale) + 'px';\n\n\t\t\t\t\tif (this.previewElement.firstChild != null)\n\t\t\t\t\t{\n\t\t\t\t\t\tthis.previewElement.firstChild.style.display = 'none';\n\t\t\t\t\t\tthis.previewElement.className = 'geDragPreview';\n\t\t\t\t\t\tmxUtils.setOpacity(this.previewElement, 100);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tthis.previewElement.style.display = '';\n\t\t\t}\n\t\t\telse if (dragSource.currentHighlight.state != null &&\n\t\t\t\tgraph.model.isEdge(dragSource.currentHighlight.state.cell))\n\t\t\t{\n\t\t\t\t// Centers drop cells when splitting edges\n\t\t\t\tthis.previewElement.style.left = Math.round(parseInt(this.previewElement.style.left) -\n\t\t\t\t\tbounds.width * view.scale / 2) + 'px';\n\t\t\t\tthis.previewElement.style.top = Math.round(parseInt(this.previewElement.style.top) -\n\t\t\t\t\tbounds.height * view.scale / 2) + 'px';\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tthis.previewElement.style.width = this.previewElementWidth;\n\t\t\t\tthis.previewElement.style.height = this.previewElementHeight;\n\t\t\t\tthis.previewElement.style.display = '';\n\n\t\t\t\tif (this.previewElement.firstChild != null)\n\t\t\t\t{\n\t\t\t\t\tthis.previewElement.firstChild.style.display = '';\n\t\t\t\t\tmxUtils.setOpacity(this.previewElement, 50);\n\t\t\t\t\tthis.previewElement.className = '';\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t};\n\t\n\tvar startTime = new Date().getTime();\n\tvar timeOnTarget = 0;\n\tvar prev = null;\n\t\n\t// Gets source cell style to compare shape below\n\tvar sourceCellStyle = this.editorUi.editor.graph.getCellStyle(cells[0]);\n\t\n\t// Allows drop into cell only if target is a valid root\n\tdragSource.getDropTarget = mxUtils.bind(this, function(graph, x, y, evt)\n\t{\n\t\t// Alt means no targets at all\n\t\t// LATER: Show preview where result will go\n\t\tvar cell = (!mxEvent.isAltDown(evt) && cells != null) ?\n\t\t\tgraph.getCellAt(x, y, null, null, null, function(state, x, y)\n\t\t\t{\n\t\t\t\treturn graph.isContainer(state.cell);\n\t\t\t}) : null;\n\t\t\n\t\t// Uses connectable parent vertex if one exists\n\t\tif (cell != null && !this.graph.isCellConnectable(cell) &&\n\t\t\t!this.graph.model.isEdge(cell))\n\t\t{\n\t\t\tvar parent = this.graph.getModel().getParent(cell);\n\t\t\t\n\t\t\tif (this.graph.getModel().isVertex(parent) &&\n\t\t\t\tthis.graph.isCellConnectable(parent))\n\t\t\t{\n\t\t\t\tcell = parent;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Ignores locked cells\n\t\tif (graph.isCellLocked(cell))\n\t\t{\n\t\t\tcell = null;\n\t\t}\n\t\t\n\t\tvar state = graph.view.getState(cell);\n\t\tactiveArrow = null;\n\t\tvar bbox = null;\n\n\t\t// Time on target\n\t\tif (prev != state)\n\t\t{\n\t\t\tstartTime = new Date().getTime();\n\t\t\ttimeOnTarget = 0;\n\t\t\tprev = state;\n\n\t\t\tif (this.updateThread != null)\n\t\t\t{\n\t\t\t\twindow.clearTimeout(this.updateThread);\n\t\t\t}\n\t\t\t\n\t\t\tif (state != null)\n\t\t\t{\n\t\t\t\tthis.updateThread = window.setTimeout(function()\n\t\t\t\t{\n\t\t\t\t\tif (activeArrow == null)\n\t\t\t\t\t{\n\t\t\t\t\t\tprev = state;\n\t\t\t\t\t\tdragSource.getDropTarget(graph, x, y, evt);\n\t\t\t\t\t}\n\t\t\t\t}, this.dropTargetDelay + 10);\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\ttimeOnTarget = new Date().getTime() - startTime;\n\t\t}\n\n\t\t// Shift means disabled, delayed on cells with children, shows after this.dropTargetDelay, hides after 2500ms\n\t\tif (dropStyleEnabled && (timeOnTarget < 2500) && state != null && !mxEvent.isShiftDown(evt) &&\n\t\t\t// If shape is equal or target has no stroke, fill and gradient then use longer delay except for images\n\t\t\t(((mxUtils.getValue(state.style, mxConstants.STYLE_SHAPE) != mxUtils.getValue(sourceCellStyle, mxConstants.STYLE_SHAPE) &&\n\t\t\t(mxUtils.getValue(state.style, mxConstants.STYLE_STROKECOLOR, mxConstants.NONE) != mxConstants.NONE ||\n\t\t\tmxUtils.getValue(state.style, mxConstants.STYLE_FILLCOLOR, mxConstants.NONE) != mxConstants.NONE ||\n\t\t\tmxUtils.getValue(state.style, mxConstants.STYLE_GRADIENTCOLOR, mxConstants.NONE) != mxConstants.NONE)) ||\n\t\t\tmxUtils.getValue(sourceCellStyle, mxConstants.STYLE_SHAPE) == 'image') ||\n\t\t\ttimeOnTarget > 1500 || graph.model.isEdge(state.cell)) && (timeOnTarget > this.dropTargetDelay) &&\n\t\t\t!this.isDropStyleTargetIgnored(state) && ((graph.model.isVertex(state.cell) && firstVertex != null) ||\n\t\t\t(graph.model.isEdge(state.cell) && graph.model.isEdge(cells[0]))))\n\t\t{\n\t\t\tif (graph.isCellEditable(state.cell))\n\t\t\t{\n\t\t\t\tcurrentStyleTarget = state;\n\t\t\t\tvar tmp = (graph.model.isEdge(state.cell)) ? graph.view.getPoint(state) :\n\t\t\t\t\tnew mxPoint(state.getCenterX(), state.getCenterY());\n\t\t\t\ttmp = new mxRectangle(tmp.x - this.refreshTarget.width / 2, tmp.y - this.refreshTarget.height / 2,\n\t\t\t\t\tthis.refreshTarget.width, this.refreshTarget.height);\n\t\t\t\t\n\t\t\t\tstyleTarget.style.left = Math.floor(tmp.x) + 'px';\n\t\t\t\tstyleTarget.style.top = Math.floor(tmp.y) + 'px';\n\t\t\t\t\n\t\t\t\tif (styleTargetParent == null)\n\t\t\t\t{\n\t\t\t\t\tgraph.container.appendChild(styleTarget);\n\t\t\t\t\tstyleTargetParent = styleTarget.parentNode;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tcheckArrow(x, y, tmp, styleTarget);\n\t\t\t}\n\t\t}\n\t\t// Does not reset on ignored edges\n\t\telse if (currentStyleTarget == null || !mxUtils.contains(currentStyleTarget, x, y) ||\n\t\t\t(timeOnTarget > 1500 && !mxEvent.isShiftDown(evt)))\n\t\t{\n\t\t\tcurrentStyleTarget = null;\n\t\t\t\n\t\t\tif (styleTargetParent != null)\n\t\t\t{\n\t\t\t\tstyleTarget.parentNode.removeChild(styleTarget);\n\t\t\t\tstyleTargetParent = null;\n\t\t\t}\n\t\t}\n\t\telse if (currentStyleTarget != null && styleTargetParent != null)\n\t\t{\n\t\t\t// Sets active Arrow as side effect\n\t\t\tvar tmp = (graph.model.isEdge(currentStyleTarget.cell)) ? graph.view.getPoint(currentStyleTarget) :\n\t\t\t\tnew mxPoint(currentStyleTarget.getCenterX(), currentStyleTarget.getCenterY());\n\t\t\ttmp = new mxRectangle(tmp.x - this.refreshTarget.width / 2, tmp.y - this.refreshTarget.height / 2,\n\t\t\t\tthis.refreshTarget.width, this.refreshTarget.height);\n\t\t\tcheckArrow(x, y, tmp, styleTarget);\n\t\t}\n\t\t\n\t\t// Checks if inside bounds\n\t\tif (activeTarget && currentTargetState != null && !mxEvent.isAltDown(evt) && activeArrow == null)\n\t\t{\n\t\t\t// LATER: Use hit-detection for edges\n\t\t\tbbox = mxRectangle.fromRectangle(currentTargetState);\n\t\t\t\n\t\t\tif (graph.model.isEdge(currentTargetState.cell))\n\t\t\t{\n\t\t\t\tvar pts = currentTargetState.absolutePoints;\n\t\t\t\t\n\t\t\t\tif (roundSource.parentNode != null)\n\t\t\t\t{\n\t\t\t\t\tvar p0 = pts[0];\n\t\t\t\t\tbbox.add(checkArrow(x, y, new mxRectangle(p0.x - this.roundDrop.width / 2,\n\t\t\t\t\t\tp0.y - this.roundDrop.height / 2, this.roundDrop.width,\n\t\t\t\t\t\tthis.roundDrop.height), roundSource));\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (roundTarget.parentNode != null)\n\t\t\t\t{\n\t\t\t\t\tvar pe = pts[pts.length - 1];\n\t\t\t\t\tbbox.add(checkArrow(x, y, new mxRectangle(pe.x - this.roundDrop.width / 2,\n\t\t\t\t\t\tpe.y - this.roundDrop.height / 2, this.roundDrop.width,\n\t\t\t\t\t\tthis.roundDrop.height), roundTarget));\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tvar bds = mxRectangle.fromRectangle(currentTargetState);\n\t\t\t\t\n\t\t\t\t// Uses outer bounding box to take rotation into account\n\t\t\t\tif (currentTargetState.shape != null && currentTargetState.shape.boundingBox != null)\n\t\t\t\t{\n\t\t\t\t\tbds = mxRectangle.fromRectangle(currentTargetState.shape.boundingBox);\n\t\t\t\t}\n\n\t\t\t\tbds.grow(this.graph.tolerance);\n\t\t\t\tbds.grow(HoverIcons.prototype.arrowSpacing);\n\t\t\t\t\n\t\t\t\tvar handler = this.graph.selectionCellsHandler.getHandler(currentTargetState.cell);\n\t\t\t\t\n\t\t\t\tif (handler != null)\n\t\t\t\t{\n\t\t\t\t\tbds.x -= handler.horizontalOffset / 2;\n\t\t\t\t\tbds.y -= handler.verticalOffset / 2;\n\t\t\t\t\tbds.width += handler.horizontalOffset;\n\t\t\t\t\tbds.height += handler.verticalOffset;\n\t\t\t\t\t\n\t\t\t\t\t// Adds bounding box of rotation handle to avoid overlap\n\t\t\t\t\tif (handler.rotationShape != null && handler.rotationShape.node != null &&\n\t\t\t\t\t\thandler.rotationShape.node.style.visibility != 'hidden' &&\n\t\t\t\t\t\thandler.rotationShape.node.style.display != 'none' &&\n\t\t\t\t\t\thandler.rotationShape.boundingBox != null)\n\t\t\t\t\t{\n\t\t\t\t\t\tbds.add(handler.rotationShape.boundingBox);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tbbox.add(checkArrow(x, y, new mxRectangle(currentTargetState.getCenterX() - this.triangleUp.width / 2,\n\t\t\t\t\tbds.y - this.triangleUp.height, this.triangleUp.width, this.triangleUp.height), arrowUp));\n\t\t\t\tbbox.add(checkArrow(x, y, new mxRectangle(bds.x + bds.width,\n\t\t\t\t\tcurrentTargetState.getCenterY() - this.triangleRight.height / 2,\n\t\t\t\t\tthis.triangleRight.width, this.triangleRight.height), arrowRight));\n\t\t\t\tbbox.add(checkArrow(x, y, new mxRectangle(currentTargetState.getCenterX() - this.triangleDown.width / 2,\n\t\t\t\t\t\tbds.y + bds.height, this.triangleDown.width, this.triangleDown.height), arrowDown));\n\t\t\t\tbbox.add(checkArrow(x, y, new mxRectangle(bds.x - this.triangleLeft.width,\n\t\t\t\t\t\tcurrentTargetState.getCenterY() - this.triangleLeft.height / 2,\n\t\t\t\t\t\tthis.triangleLeft.width, this.triangleLeft.height), arrowLeft));\n\t\t\t}\n\t\t\t\n\t\t\t// Adds tolerance\n\t\t\tif (bbox != null)\n\t\t\t{\n\t\t\t\tbbox.grow(10);\n\t\t\t}\n\t\t}\n\t\t\n\t\tdirection = mxConstants.DIRECTION_NORTH;\n\t\t\n\t\tif (activeArrow == arrowRight)\n\t\t{\n\t\t\tdirection = mxConstants.DIRECTION_EAST;\n\t\t}\n\t\telse if (activeArrow == arrowDown || activeArrow == roundTarget)\n\t\t{\n\t\t\tdirection = mxConstants.DIRECTION_SOUTH;\n\t\t}\n\t\telse if (activeArrow == arrowLeft)\n\t\t{\n\t\t\tdirection = mxConstants.DIRECTION_WEST;\n\t\t}\n\t\t\n\t\tif (currentStyleTarget != null && activeArrow == styleTarget)\n\t\t{\n\t\t\tstate = currentStyleTarget;\n\t\t}\n\n\t\tvar validTarget = (firstVertex == null || graph.isCellConnectable(cells[firstVertex])) &&\n\t\t\t((graph.model.isEdge(cell) && firstVertex != null) ||\n\t\t\t(graph.model.isVertex(cell) && graph.isCellConnectable(cell)));\n\t\t\n\t\t// Drop arrows shown after this.dropTargetDelay, hidden after 5 secs, switches arrows after 500ms\n\t\tif ((currentTargetState != null && timeOnTarget >= 5000) ||\n\t\t\t(currentTargetState != state &&\n\t\t\t(bbox == null || !mxUtils.contains(bbox, x, y) ||\n\t\t\t(timeOnTarget > 500 && activeArrow == null && validTarget))))\n\t\t{\n\t\t\tactiveTarget = false;\n\t\t\tcurrentTargetState = ((timeOnTarget < 5000 && timeOnTarget > this.dropTargetDelay) ||\n\t\t\t\tgraph.model.isEdge(cell)) ? state : null;\n\n\t\t\tif (currentTargetState != null && validTarget)\n\t\t\t{\n\t\t\t\tvar elts = [roundSource, roundTarget, arrowUp, arrowRight, arrowDown, arrowLeft];\n\t\t\t\t\n\t\t\t\tfor (var i = 0; i < elts.length; i++)\n\t\t\t\t{\n\t\t\t\t\tif (elts[i].parentNode != null)\n\t\t\t\t\t{\n\t\t\t\t\t\telts[i].parentNode.removeChild(elts[i]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (graph.model.isEdge(cell))\n\t\t\t\t{\n\t\t\t\t\tvar pts = state.absolutePoints;\n\t\t\t\t\t\n\t\t\t\t\tif (pts != null)\n\t\t\t\t\t{\n\t\t\t\t\t\tvar p0 = pts[0];\n\t\t\t\t\t\tvar pe = pts[pts.length - 1];\n\t\t\t\t\t\t\n\t\t\t\t\t\troundSource.style.left = Math.floor(p0.x - this.roundDrop.width / 2) + 'px';\n\t\t\t\t\t\troundSource.style.top = Math.floor(p0.y - this.roundDrop.height / 2) + 'px';\n\t\t\t\t\t\t\n\t\t\t\t\t\troundTarget.style.left = Math.floor(pe.x - this.roundDrop.width / 2) + 'px';\n\t\t\t\t\t\troundTarget.style.top = Math.floor(pe.y - this.roundDrop.height / 2) + 'px';\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (graph.model.getTerminal(cell, true) == null)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tgraph.container.appendChild(roundSource);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (graph.model.getTerminal(cell, false) == null)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tgraph.container.appendChild(roundTarget);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tvar bds = mxRectangle.fromRectangle(state);\n\t\t\t\t\t\n\t\t\t\t\t// Uses outer bounding box to take rotation into account\n\t\t\t\t\tif (state.shape != null && state.shape.boundingBox != null)\n\t\t\t\t\t{\n\t\t\t\t\t\tbds = mxRectangle.fromRectangle(state.shape.boundingBox);\n\t\t\t\t\t}\n\n\t\t\t\t\tbds.grow(this.graph.tolerance);\n\t\t\t\t\tbds.grow(HoverIcons.prototype.arrowSpacing);\n\t\t\t\t\t\n\t\t\t\t\tvar handler = this.graph.selectionCellsHandler.getHandler(state.cell);\n\t\t\t\t\t\n\t\t\t\t\tif (handler != null)\n\t\t\t\t\t{\n\t\t\t\t\t\tbds.x -= handler.horizontalOffset / 2;\n\t\t\t\t\t\tbds.y -= handler.verticalOffset / 2;\n\t\t\t\t\t\tbds.width += handler.horizontalOffset;\n\t\t\t\t\t\tbds.height += handler.verticalOffset;\n\t\t\t\t\t\t\n\t\t\t\t\t\t// Adds bounding box of rotation handle to avoid overlap\n\t\t\t\t\t\tif (handler.rotationShape != null && handler.rotationShape.node != null &&\n\t\t\t\t\t\t\thandler.rotationShape.node.style.visibility != 'hidden' &&\n\t\t\t\t\t\t\thandler.rotationShape.node.style.display != 'none' &&\n\t\t\t\t\t\t\thandler.rotationShape.boundingBox != null)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tbds.add(handler.rotationShape.boundingBox);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tarrowUp.style.left = Math.floor(state.getCenterX() - this.triangleUp.width / 2) + 'px';\n\t\t\t\t\tarrowUp.style.top = Math.floor(bds.y - this.triangleUp.height) + 'px';\n\t\t\t\t\t\n\t\t\t\t\tarrowRight.style.left = Math.floor(bds.x + bds.width) + 'px';\n\t\t\t\t\tarrowRight.style.top = Math.floor(state.getCenterY() - this.triangleRight.height / 2) + 'px';\n\t\t\t\t\t\n\t\t\t\t\tarrowDown.style.left = arrowUp.style.left\n\t\t\t\t\tarrowDown.style.top = Math.floor(bds.y + bds.height) + 'px';\n\t\t\t\t\t\n\t\t\t\t\tarrowLeft.style.left = Math.floor(bds.x - this.triangleLeft.width) + 'px';\n\t\t\t\t\tarrowLeft.style.top = arrowRight.style.top;\n\t\t\t\t\t\n\t\t\t\t\tif (state.style['portConstraint'] != 'eastwest')\n\t\t\t\t\t{\n\t\t\t\t\t\tgraph.container.appendChild(arrowUp);\n\t\t\t\t\t\tgraph.container.appendChild(arrowDown);\n\t\t\t\t\t}\n\n\t\t\t\t\tgraph.container.appendChild(arrowRight);\n\t\t\t\t\tgraph.container.appendChild(arrowLeft);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// Hides handle for cell under mouse\n\t\t\t\tif (state != null)\n\t\t\t\t{\n\t\t\t\t\tcurrentStateHandle = graph.selectionCellsHandler.getHandler(state.cell);\n\t\t\t\t\t\n\t\t\t\t\tif (currentStateHandle != null && currentStateHandle.setHandlesVisible != null)\n\t\t\t\t\t{\n\t\t\t\t\t\tcurrentStateHandle.setHandlesVisible(false);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tactiveTarget = true;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tvar elts = [roundSource, roundTarget, arrowUp, arrowRight, arrowDown, arrowLeft];\n\t\t\t\t\n\t\t\t\tfor (var i = 0; i < elts.length; i++)\n\t\t\t\t{\n\t\t\t\t\tif (elts[i].parentNode != null)\n\t\t\t\t\t{\n\t\t\t\t\t\telts[i].parentNode.removeChild(elts[i]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (!activeTarget && currentStateHandle != null)\n\t\t{\n\t\t\tcurrentStateHandle.setHandlesVisible(true);\n\t\t}\n\t\t\n\t\t// Handles drop target\n\t\tvar target = ((!mxEvent.isAltDown(evt) || mxEvent.isShiftDown(evt)) &&\n\t\t\t!(currentStyleTarget != null && activeArrow == styleTarget)) ?\n\t\t\tmxDragSource.prototype.getDropTarget.apply(this, arguments) : null;\n\n\t\tif (target != null && (activeArrow != null ||\n\t\t\t!graph.isSplitTarget(target, cells, evt)))\n\t\t{\n\t\t\ttarget = graph.getDropTarget(cells, evt, target, true);\n\t\t}\n\t\t\n\t\treturn target;\n\t});\n\t\n\tdragSource.stopDrag = function()\n\t{\n\t\tmxDragSource.prototype.stopDrag.apply(this, arguments);\n\t\t\n\t\tvar elts = [roundSource, roundTarget, styleTarget, arrowUp, arrowRight, arrowDown, arrowLeft];\n\t\t\n\t\tfor (var i = 0; i < elts.length; i++)\n\t\t{\n\t\t\tif (elts[i].parentNode != null)\n\t\t\t{\n\t\t\t\telts[i].parentNode.removeChild(elts[i]);\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (currentTargetState != null && currentStateHandle != null)\n\t\t{\n\t\t\tcurrentStateHandle.reset();\n\t\t}\n\t\t\n\t\tcurrentStateHandle = null;\n\t\tcurrentTargetState = null;\n\t\tcurrentStyleTarget = null;\n\t\tstyleTargetParent = null;\n\t\tactiveArrow = null;\n\t};\n\t\n\treturn dragSource;\n};\n\n/**\n * Adds a handler for inserting the cell with a single click.\n */\nSidebar.prototype.itemClicked = function(cells, ds, evt, elt)\n{\n\tvar graph = this.editorUi.editor.graph;\n\tgraph.container.focus();\n\t\n\t// Alt+Click inserts and connects\n\tif (mxEvent.isAltDown(evt) && graph.getSelectionCount() == 1 &&\n\t\tgraph.model.isVertex(graph.getSelectionCell()))\n\t{\n\t\tvar firstVertex = null;\n\t\t\n\t\tfor (var i = 0; i < cells.length && firstVertex == null; i++)\n\t\t{\n\t\t\tif (graph.model.isVertex(cells[i]))\n\t\t\t{\n\t\t\t\tfirstVertex = i;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (firstVertex != null)\n\t\t{\n\t\t\tgraph.setSelectionCells(this.dropAndConnect(graph.getSelectionCell(), cells,\n\t\t\t\t(mxEvent.isMetaDown(evt) || mxEvent.isControlDown(evt)) ?\n\t\t\t\t(mxEvent.isShiftDown(evt) ? mxConstants.DIRECTION_WEST : mxConstants.DIRECTION_NORTH) : \n\t\t\t\t(mxEvent.isShiftDown(evt) ? mxConstants.DIRECTION_EAST : mxConstants.DIRECTION_SOUTH),\n\t\t\t\tfirstVertex, evt));\n\t\t\tgraph.scrollCellToVisible(graph.getSelectionCell());\n\t\t}\n\t}\n\t// Shift+Click updates shape\n\telse if (mxEvent.isShiftDown(evt) && !graph.isSelectionEmpty())\n\t{\n\t\tvar temp = graph.getEditableCells(graph.getSelectionCells());\n\t\tgraph.updateShapes(cells[0], temp);\n\t\tgraph.scrollCellToVisible(temp);\n\t}\n\telse\n\t{\n\t\tvar pt = (mxEvent.isAltDown(evt)) ? graph.getFreeInsertPoint() :\n\t\t\tgraph.getCenterInsertPoint(graph.getBoundingBoxFromGeometry(cells, true));\n\t\tds.drop(graph, evt, null, pt.x, pt.y, true);\n\t}\n};\n\n/**\n * Adds a handler for inserting the cell with a single click.\n */\nSidebar.prototype.addClickHandler = function(elt, ds, cells, clickFn)\n{\n\tvar graph = this.editorUi.editor.graph;\n\tvar oldGetGraphForEvent = ds.getGraphForEvent;\n\tvar oldMouseDown = ds.mouseDown;\n\tvar oldMouseMove = ds.mouseMove;\n\tvar oldMouseUp = ds.mouseUp;\n\tvar tol = graph.tolerance;\n\tvar active = false;\n\tvar first = null;\n\tvar sb = this;\n\tvar op = null;\n\n\tds.getGraphForEvent = function(evt)\n\t{\n\t\tif (active)\n\t\t{\n\t\t\treturn oldGetGraphForEvent.apply(this, arguments);\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn null;\n\t\t}\n\t};\n\n\tds.mouseDown =function(evt)\n\t{\n\t\toldMouseDown.apply(this, arguments);\n\t\tfirst = new mxPoint(mxEvent.getClientX(evt), mxEvent.getClientY(evt));\n\t\top = elt.style.opacity;\n\t\tactive = false;\n\n\t\tif (op == '')\n\t\t{\n\t\t\top = '1';\n\t\t}\n\t\t\n\t\tif (this.dragElement != null)\n\t\t{\n\t\t\tthis.dragElement.style.display = 'none';\n\t\t\tmxUtils.setOpacity(elt, 50);\n\t\t}\n\t};\n\t\n\tds.mouseMove = function(evt)\n\t{\n\t\tactive = first != null && (Math.abs(first.x - mxEvent.getClientX(evt)) > tol ||\n\t\t\tMath.abs(first.y - mxEvent.getClientY(evt)) > tol);\n\n\t\tif (active && this.dragElement != null &&\n\t\t\tthis.dragElement.style.display == 'none')\n\t\t{\n\t\t\tthis.dragElement.style.display = '';\n\t\t\tmxUtils.setOpacity(elt, op * 100);\n\t\t}\n\t\t\n\t\toldMouseMove.apply(this, arguments);\n\t};\n\t\n\tds.mouseUp = function(evt)\n\t{\n\t\ttry\n\t\t{\n\t\t\tif (!mxEvent.isPopupTrigger(evt) && this.currentGraph == null &&\n\t\t\t\tthis.dragElement != null && this.dragElement.style.display == 'none')\n\t\t\t{\n\t\t\t\tif (clickFn != null)\n\t\t\t\t{\n\t\t\t\t\tclickFn(evt);\n\t\t\t\t}\n\n\t\t\t\tif (!mxEvent.isConsumed(evt))\n\t\t\t\t{\n\t\t\t\t\tsb.itemClicked(cells, ds, evt, elt);\n\t\t\t\t}\n\t\t\t}\n\t\n\t\t\toldMouseUp.apply(ds, arguments);\n\t\t\tmxUtils.setOpacity(elt, op * 100);\n\t\t\tfirst = null;\n\t\t\t\n\t\t\t// Blocks tooltips on this element after single click\n\t\t\tsb.currentElt = elt;\n\t\t}\n\t\tcatch (e)\n\t\t{\n\t\t\tds.reset();\n\t\t\tsb.editorUi.handleError(e);\n\t\t}\n\t};\n};\n\n/**\n * Creates a drop handler for inserting the given cells.\n */\nSidebar.prototype.createVertexTemplateEntry = function(style, width, height, value, title, showLabel, showTitle, tags)\n{\n\tif (tags != null && title != null)\n\t{\n\t\ttags += ' ' + title;\n\t}\n\n\ttags = (tags != null && tags.length > 0) ? tags : ((title != null) ? title.toLowerCase() : '');\n\t\n\treturn this.addEntry(tags, mxUtils.bind(this, function()\n \t{\n \t\treturn this.createVertexTemplate(style, width, height, value, title, showLabel, showTitle);\n \t}));\n}\n\n/**\n * Creates a drop handler for inserting the given cells.\n */\nSidebar.prototype.createVertexTemplate = function(style, width, height, value, title, showLabel, showTitle,\n\tallowCellsInserted, showTooltip, clickFn, thumbWidth, thumbHeight, icon, startEditing)\n{\n\tvar cells = [new mxCell((value != null) ? value : '', new mxGeometry(0, 0, width, height), style)];\n\tcells[0].vertex = true;\n\n\treturn this.createVertexTemplateFromCells(cells, width, height, title, showLabel, showTitle,\n\t\tallowCellsInserted, showTooltip, clickFn, thumbWidth, thumbHeight, icon, startEditing);\n};\n\n/**\n * Creates a drop handler for inserting the given cells.\n */\nSidebar.prototype.createVertexTemplateFromData = function(data, width, height, title, showLabel,\n\tshowTitle, allowCellsInserted, showTooltip)\n{\n\tvar doc = mxUtils.parseXml(Graph.decompress(data));\n\tvar codec = new mxCodec(doc);\n\n\tvar model = new mxGraphModel();\n\tcodec.decode(doc.documentElement, model);\n\t\n\tvar cells = this.graph.cloneCells(model.root.getChildAt(0).children);\n\n\treturn this.createVertexTemplateFromCells(cells, width, height, title, showLabel, showTitle,\n\t\tallowCellsInserted, showTooltip);\n};\n\n/**\n * Creates a drop handler for inserting the given cells.\n */\nSidebar.prototype.createVertexTemplateFromCells = function(cells, width, height, title, showLabel,\n\tshowTitle, allowCellsInserted, showTooltip, clickFn, thumbWidth, thumbHeight, icon, startEditing,\n\tsourceCell)\n{\n\t// Use this line to convert calls to this function with lots of boilerplate code for creating cells\n\t//console.trace('xml', Graph.compress(mxUtils.getXml(this.graph.encodeCells(cells))), cells);\n\treturn this.createItem(cells, title, showLabel, showTitle, width, height, allowCellsInserted,\n\t\tshowTooltip, clickFn, thumbWidth, thumbHeight, icon, startEditing, sourceCell);\n};\n\n/**\n * \n */\nSidebar.prototype.createEdgeTemplateEntry = function(style, width, height, value, title, showLabel,\n\ttags, allowCellsInserted, showTooltip)\n{\n\ttags = (tags != null && tags.length > 0) ? tags : title.toLowerCase();\n\t\n \treturn this.addEntry(tags, mxUtils.bind(this, function()\n \t{\n \t\treturn this.createEdgeTemplate(style, width, height, value, title, showLabel, allowCellsInserted, showTooltip);\n \t}));\n};\n\n/**\n * Creates a drop handler for inserting the given cells.\n */\nSidebar.prototype.createEdgeTemplate = function(style, width, height, value, title, showLabel,\n\tallowCellsInserted, showTooltip)\n{\n\tvar cell = new mxCell((value != null) ? value : '', new mxGeometry(0, 0, width, height), style);\n\tcell.geometry.setTerminalPoint(new mxPoint(0, height), true);\n\tcell.geometry.setTerminalPoint(new mxPoint(width, 0), false);\n\tcell.geometry.relative = true;\n\tcell.edge = true;\n\t\n\treturn this.createEdgeTemplateFromCells([cell], width, height, title, showLabel, allowCellsInserted, showTooltip);\n};\n\n/**\n * Creates a drop handler for inserting the given cells.\n */\nSidebar.prototype.createEdgeTemplateFromCells = function(cells, width, height, title, showLabel,\n\tallowCellsInserted, showTooltip, showTitle, clickFn, thumbWidth, thumbHeight, icon)\n{\n\treturn this.createItem(cells, title, showLabel, (showTitle != null) ? showTitle : true, width, height,\n\t\tallowCellsInserted, showTooltip, clickFn, thumbWidth, thumbHeight, icon);\n};\n\n/**\n * Adds the given palette.\n */\nSidebar.prototype.addPaletteFunctions = function(id, title, expanded, fns)\n{\n\tthis.addPalette(id, title, expanded, mxUtils.bind(this, function(content)\n\t{\n\t\tfor (var i = 0; i < fns.length; i++)\n\t\t{\n\t\t\tcontent.appendChild(fns[i](content));\n\t\t}\n\t}));\n};\n\n/**\n * Adds the given palette.\n */\nSidebar.prototype.addPalette = function(id, title, expanded, onInit)\n{\n\tvar elt = this.createTitle(title);\n\tthis.appendChild(elt);\n\t\n\tvar div = document.createElement('div');\n\tdiv.className = 'geSidebar';\n\t\n\t// Disables built-in pan and zoom on touch devices\n\tif (mxClient.IS_POINTER)\n\t{\n\t\tdiv.style.touchAction = 'none';\n\t}\n\n\tif (expanded)\n\t{\n\t\tonInit(div);\n\t\tonInit = null;\n\t}\n\telse\n\t{\n\t\tdiv.style.display = 'none';\n\t}\n\t\n    this.addFoldingHandler(elt, div, onInit);\n\t\n\tvar outer = document.createElement('div');\n    outer.appendChild(div);\n    this.appendChild(outer);\n    \n    // Keeps references to the DOM nodes\n    if (id != null)\n    {\n    \tthis.palettes[id] = [elt, outer];\n    }\n    \n    return div;\n};\n\n/**\n * Create the given title element.\n */\nSidebar.prototype.addFoldingHandler = function(title, content, funct)\n{\n\tvar initialized = false;\n\n\t// Avoids mixed content warning in IE6-8\n\tif (!mxClient.IS_IE || document.documentMode >= 8)\n\t{\n\t\ttitle.style.backgroundImage = (content.style.display == 'none') ?\n\t\t\t'url(\\'' + this.collapsedImage + '\\')' : 'url(\\'' + this.expandedImage + '\\')';\n\t}\n\t\n\ttitle.style.backgroundRepeat = 'no-repeat';\n\ttitle.style.backgroundPosition = '4px 50%';\n\n\tmxEvent.addListener(title, 'click', mxUtils.bind(this, function(evt)\n\t{\n\t\tif (mxEvent.getSource(evt) == title)\n\t\t{\n\t\t\tif (content.style.display == 'none')\n\t\t\t{\n\t\t\t\tif (!initialized)\n\t\t\t\t{\n\t\t\t\t\tinitialized = true;\n\t\t\t\t\t\n\t\t\t\t\tif (funct != null)\n\t\t\t\t\t{\n\t\t\t\t\t\t// Wait cursor does not show up on Mac\n\t\t\t\t\t\ttitle.style.cursor = 'wait';\n\n\t\t\t\t\t\t// Captures child nodes\n\t\t\t\t\t\tvar children = [];\n\n\t\t\t\t\t\tfor (var i = 0; i < title.children.length; i++)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tchildren.push(title.children[i]);\n\t\t\t\t\t\t\ttitle.removeChild(title.children[i]);\n\t\t\t\t\t\t}\t\t\t\n\n\t\t\t\t\t\tvar prev = title.innerHTML;\n\t\t\t\t\t\ttitle.innerHTML = mxResources.get('loading') + '...';\n\t\t\t\t\t\t\n\t\t\t\t\t\twindow.setTimeout(mxUtils.bind(this, function()\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tthis.setContentVisible(content, true);\n\t\t\t\t\t\t\ttitle.style.cursor = '';\n\t\t\t\t\t\t\ttitle.innerHTML = prev;\n\n\t\t\t\t\t\t\t// Restores child nodes\n\t\t\t\t\t\t\tfor (var i = 0; i < children.length; i++)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\ttitle.appendChild(children[i]);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tvar fo = mxClient.NO_FO;\n\t\t\t\t\t\t\tmxClient.NO_FO = Editor.prototype.originalNoForeignObject;\n\t\t\t\t\t\t\tfunct(content, title);\n\t\t\t\t\t\t\tmxClient.NO_FO = fo;\n\t\t\t\t\t\t}), (mxClient.IS_FF) ? 20 : 0);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tthis.setContentVisible(content, true);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tthis.setContentVisible(content, true);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\ttitle.style.backgroundImage = 'url(\\'' + this.expandedImage + '\\')';\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\ttitle.style.backgroundImage = 'url(\\'' + this.collapsedImage + '\\')';\n\t\t\t\tthis.setContentVisible(content, false);\n\t\t\t}\n\t\t\t\n\t\t\tmxEvent.consume(evt);\n\t\t}\n\t}));\n\t\n\t// Prevents focus\n\tmxEvent.addListener(title, (mxClient.IS_POINTER) ? 'pointerdown' : 'mousedown',\n\t\tmxUtils.bind(this, function(evt)\n\t{\n\t\tevt.preventDefault();\n\t}));\n};\n\n/**\n * Removes the palette for the given ID.\n */\nSidebar.prototype.setContentVisible = function(content, visible)\n{\n\tmxUtils.setPrefixedStyle(content.style, 'transition', 'all 0.2s linear');\n\tmxUtils.setPrefixedStyle(content.style, 'transform-origin', 'top left');\n\n\tif (visible)\n\t{\n\t\tmxUtils.setPrefixedStyle(content.style, 'transform', 'scaleY(0)');\n\t\tcontent.style.display = 'block';\n\n\t\twindow.setTimeout(mxUtils.bind(this, function()\n\t\t{\n\t\t\tmxUtils.setPrefixedStyle(content.style, 'transform', 'scaleY(1)');\n\n\t\t\twindow.setTimeout(mxUtils.bind(this, function()\n\t\t\t{\n\t\t\t\tmxUtils.setPrefixedStyle(content.style, 'transform', null);\n\t\t\t\tmxUtils.setPrefixedStyle(content.style, 'transition', null);\n\t\t\t}), 200);\n\t\t}), 0);\n\t}\n\telse\n\t{\n\t\tmxUtils.setPrefixedStyle(content.style, 'transform', 'scaleY(0)');\n\n\t\twindow.setTimeout(mxUtils.bind(this, function()\n\t\t{\n\t\t\tmxUtils.setPrefixedStyle(content.style, 'transform', null);\n\t\t\tmxUtils.setPrefixedStyle(content.style, 'transition', null);\n\t\t\tcontent.style.display = 'none';\n\t\t}), 200);\n\t}\n};\n\n/**\n * Removes the palette for the given ID.\n */\nSidebar.prototype.removePalette = function(id)\n{\n\tvar elts = this.palettes[id];\n\t\n\tif (elts != null)\n\t{\n\t\tthis.palettes[id] = null;\n\t\t\n\t\tfor (var i = 0; i < elts.length; i++)\n\t\t{\n\t\t\tthis.container.removeChild(elts[i]);\n\t\t}\n\t\t\n\t\treturn true;\n\t}\n\t\n\treturn false;\n};\n\n/**\n * Adds the given image palette.\n */\nSidebar.prototype.addImagePalette = function(id, title, prefix, postfix, items, titles, tags)\n{\n\tvar showTitles = titles != null;\n\tvar fns = [];\n\t\n\tfor (var i = 0; i < items.length; i++)\n\t{\n\t\t(mxUtils.bind(this, function(item, title, tmpTags)\n\t\t{\n\t\t\tif (tmpTags == null)\n\t\t\t{\n\t\t\t\tvar slash = item.lastIndexOf('/');\n\t\t\t\tvar dot = item.lastIndexOf('.');\n\t\t\t\ttmpTags = item.substring((slash >= 0) ? slash + 1 : 0, (dot >= 0) ? dot : item.length).replace(/[-_]/g, ' ');\n\t\t\t}\n\t\t\t\n\t\t\tfns.push(this.createVertexTemplateEntry('image;html=1;image=' + prefix + item + postfix,\n\t\t\t\tthis.defaultImageWidth, this.defaultImageHeight, '', title, title != null, null, this.filterTags(tmpTags)));\n\t\t}))(items[i], (titles != null) ? titles[i] : null, (tags != null) ? tags[items[i]] : null);\n\t}\n\n\tthis.addPaletteFunctions(id, title, false, fns);\n};\n\n/**\n * Creates the array of tags for the given stencil. Duplicates are allowed and will be filtered out later.\n */\nSidebar.prototype.getTagsForStencil = function(packageName, stencilName, moreTags)\n{\n\tvar tags = packageName.split('.');\n\t\n\tfor (var i = 1; i < tags.length; i++)\n\t{\n\t\ttags[i] = tags[i].replace(/_/g, ' ')\n\t}\n\t\n\ttags.push(stencilName.replace(/_/g, ' '));\n\t\n\tif (moreTags != null)\n\t{\n\t\ttags.push(moreTags);\n\t}\n\t\n\treturn tags.slice(1, tags.length);\n};\n\n/**\n * Adds the given stencil palette.\n */\nSidebar.prototype.addStencilPalette = function(id, title, stencilFile, style, ignore, onInit, scale, tags, customFns, groupId)\n{\n\tscale = (scale != null) ? scale : 1;\n\n\tif (this.addStencilsToIndex)\n\t{\n\t\t// LATER: Handle asynchronous loading dependency\n\t\tvar fns = [];\n\t\t\n\t\tif (customFns != null)\n\t\t{\n\t\t\tfor (var i = 0; i < customFns.length; i++)\n\t\t\t{\n\t\t\t\tfns.push(customFns[i]);\n\t\t\t}\n\t\t}\n\n\t\tmxStencilRegistry.loadStencilSet(stencilFile, mxUtils.bind(this, function(packageName, stencilName, displayName, w, h)\n\t\t{\n\t\t\tif (ignore == null || mxUtils.indexOf(ignore, stencilName) < 0)\n\t\t\t{\n\t\t\t\tvar tmp = this.getTagsForStencil(packageName, stencilName);\n\t\t\t\tvar tmpTags = (tags != null) ? tags[stencilName] : null;\n\n\t\t\t\tif (tmpTags != null)\n\t\t\t\t{\n\t\t\t\t\ttmp.push(tmpTags);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tfns.push(this.createVertexTemplateEntry('shape=' + packageName + stencilName.toLowerCase() + style,\n\t\t\t\t\tMath.round(w * scale), Math.round(h * scale), '', stencilName.replace(/_/g, ' '), null, null,\n\t\t\t\t\tthis.filterTags(tmp.join(' '))));\n\t\t\t}\n\t\t}), true, true);\n\t\n\t\tthis.addPaletteFunctions(id, title, false, fns);\n\t}\n\telse\n\t{\n\t\tthis.addPalette(id, title, false, mxUtils.bind(this, function(content)\n\t    {\n\t\t\tif (style == null)\n\t\t\t{\n\t\t\t\tstyle = '';\n\t\t\t}\n\t\t\t\n\t\t\tif (onInit != null)\n\t\t\t{\n\t\t\t\tonInit.call(this, content);\n\t\t\t}\n\t\t\t\n\t\t\tif (customFns != null)\n\t\t\t{\n\t\t\t\tfor (var i = 0; i < customFns.length; i++)\n\t\t\t\t{\n\t\t\t\t\tcustomFns[i](content);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tmxStencilRegistry.loadStencilSet(stencilFile, mxUtils.bind(this, function(packageName, stencilName, displayName, w, h)\n\t\t\t{\n\t\t\t\tif (ignore == null || mxUtils.indexOf(ignore, stencilName) < 0)\n\t\t\t\t{\n\t\t\t\t\tcontent.appendChild(this.createVertexTemplate('shape=' + packageName + stencilName.toLowerCase() + style,\n\t\t\t\t\t\tMath.round(w * scale), Math.round(h * scale), '', stencilName.replace(/_/g, ' '), true));\n\t\t\t\t}\n\t\t\t}), true);\n\t    }));\n\t}\n};\n\n/**\n * Adds the given stencil palette.\n */\nSidebar.prototype.destroy = function()\n{\n\tif (this.graph != null)\n\t{\n\t\tif (this.graph.container != null && this.graph.container.parentNode != null)\n\t\t{\n\t\t\tthis.graph.container.parentNode.removeChild(this.graph.container);\n\t\t}\n\t\t\n\t\tthis.graph.destroy();\n\t\tthis.graph = null;\n\t}\n\t\n\tif (this.pointerUpHandler != null)\n\t{\n\t\tmxEvent.removeListener(document, (mxClient.IS_POINTER) ? 'pointerup' : 'mouseup', this.pointerUpHandler);\n\t\tthis.pointerUpHandler = null;\n\t}\n\n\tif (this.pointerDownHandler != null)\n\t{\n\t\tmxEvent.removeListener(document, (mxClient.IS_POINTER) ? 'pointerdown' : 'mousedown', this.pointerDownHandler);\n\t\tthis.pointerDownHandler = null;\n\t}\n\t\n\tif (this.pointerMoveHandler != null)\n\t{\n\t\tmxEvent.removeListener(document, (mxClient.IS_POINTER) ? 'pointermove' : 'mousemove', this.pointerMoveHandler);\n\t\tthis.pointerMoveHandler = null;\n\t}\n\t\n\tif (this.pointerOutHandler != null)\n\t{\n\t\tmxEvent.removeListener(document, (mxClient.IS_POINTER) ? 'pointerout' : 'mouseout', this.pointerOutHandler);\n\t\tthis.pointerOutHandler = null;\n\t}\n};\n"
  },
  {
    "path": "static/cherry/drawio_demo/Toolbar.js",
    "content": "/**\n * Copyright (c) 2006-2012, JGraph Ltd\n */\n/**\n * Construcs a new toolbar for the given editor.\n */\nfunction Toolbar(editorUi, container)\n{\n\tthis.editorUi = editorUi;\n\tthis.container = container;\n\tthis.staticElements = [];\n\tthis.init();\n\n\t// Global handler to hide the current menu\n\tthis.gestureHandler = mxUtils.bind(this, function(evt)\n\t{\n\t\tif (this.editorUi.currentMenu != null && mxEvent.getSource(evt) != this.editorUi.currentMenu.div)\n\t\t{\n\t\t\tthis.hideMenu();\n\t\t}\n\t});\n\n\tmxEvent.addGestureListeners(document, this.gestureHandler);\n};\n\n/**\n * Image for the dropdown arrow.\n */\nToolbar.prototype.dropDownImage = (!mxClient.IS_SVG) ? IMAGE_PATH + '/dropdown.gif' : 'data:image/gif;base64,R0lGODlhDQANAIABAHt7e////yH/C1hNUCBEYXRhWE1QPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS4wLWMwNjAgNjEuMTM0Nzc3LCAyMDEwLzAyLzEyLTE3OjMyOjAwICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOnhtcE1NPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvbW0vIiB4bWxuczpzdFJlZj0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL3NUeXBlL1Jlc291cmNlUmVmIyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1IE1hY2ludG9zaCIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDpCREM1NkJFMjE0NEMxMUU1ODk1Q0M5MjQ0MTA4QjNDMSIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDpCREM1NkJFMzE0NEMxMUU1ODk1Q0M5MjQ0MTA4QjNDMSI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOkQzOUMzMjZCMTQ0QjExRTU4OTVDQzkyNDQxMDhCM0MxIiBzdFJlZjpkb2N1bWVudElEPSJ4bXAuZGlkOkQzOUMzMjZDMTQ0QjExRTU4OTVDQzkyNDQxMDhCM0MxIi8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+Af/+/fz7+vn49/b19PPy8fDv7u3s6+rp6Ofm5eTj4uHg397d3Nva2djX1tXU09LR0M/OzczLysnIx8bFxMPCwcC/vr28u7q5uLe2tbSzsrGwr66trKuqqainpqWko6KhoJ+enZybmpmYl5aVlJOSkZCPjo2Mi4qJiIeGhYSDgoGAf359fHt6eXh3dnV0c3JxcG9ubWxramloZ2ZlZGNiYWBfXl1cW1pZWFdWVVRTUlFQT05NTEtKSUhHRkVEQ0JBQD8+PTw7Ojk4NzY1NDMyMTAvLi0sKyopKCcmJSQjIiEgHx4dHBsaGRgXFhUUExIREA8ODQwLCgkIBwYFBAMCAQAAIfkEAQAAAQAsAAAAAA0ADQAAAhGMj6nL3QAjVHIu6azbvPtWAAA7';\n\n/**\n * Defines the background for selected buttons.\n */\nToolbar.prototype.selectedBackground = '#d0d0d0';\n\n/**\n * Defines the background for selected buttons.\n */\nToolbar.prototype.unselectedBackground = 'none';\n\n/**\n * Array that contains the DOM nodes that should never be removed.\n */\nToolbar.prototype.staticElements = null;\n\n/**\n * Adds the toolbar elements.\n */\nToolbar.prototype.init = function()\n{\n\tvar sw = screen.width;\n\t\n\t// Takes into account initial compact mode\n\tsw -= (screen.height > 740) ? 56 : 0;\n\t\n\tif (sw >= 700)\n\t{\n\t\tvar formatMenu = this.addMenu('', mxResources.get('view') + ' (' + mxResources.get('panTooltip') + ')', true, 'viewPanels', null, true);\n\t\tthis.addDropDownArrow(formatMenu, 'geSprite-formatpanel', 38, 50, -4, -3, 36, -8);\n\t\tthis.addSeparator();\n\t}\n\t\n\tvar viewMenu = this.addMenu('', mxResources.get('zoom') + ' (Alt+Mousewheel)', true, 'viewZoom', null, true);\n\tviewMenu.showDisabled = true;\n\tviewMenu.style.whiteSpace = 'nowrap';\n\tviewMenu.style.position = 'relative';\n\tviewMenu.style.overflow = 'hidden';\n\t\n\tif (EditorUi.compactUi)\n\t{\n\t\tviewMenu.style.width = '50px';\n\t}\n\telse\n\t{\n\t\tviewMenu.style.width = '36px';\n\t}\n\t\n\tif (sw >= 420)\n\t{\n\t\tthis.addSeparator();\n\t\tvar elts = this.addItems(['zoomIn', 'zoomOut']);\n\t\telts[0].setAttribute('title', mxResources.get('zoomIn') + ' (' + this.editorUi.actions.get('zoomIn').shortcut + ')');\n\t\telts[1].setAttribute('title', mxResources.get('zoomOut') + ' (' + this.editorUi.actions.get('zoomOut').shortcut + ')');\n\t}\n\t\n\t// Updates the label if the scale changes\n\tthis.updateZoom = mxUtils.bind(this, function(sender, evt, f)\n\t{\n\t\tf = (f != null) ? f : 1;\n\t\tviewMenu.innerHTML = Math.round(this.editorUi.editor.graph.view.scale * 100 * f) + '%';\n\t\tthis.appendDropDownImageHtml(viewMenu);\n\t\t\n\t\tif (EditorUi.compactUi)\n\t\t{\n\t\t\tviewMenu.getElementsByTagName('img')[0].style.right = '1px';\n\t\t\tviewMenu.getElementsByTagName('img')[0].style.top = '5px';\n\t\t}\n\t});\n\n\tthis.editorUi.editor.graph.view.addListener(mxEvent.EVENT_SCALE, this.updateZoom);\n\tthis.editorUi.editor.addListener('resetGraphView', this.updateZoom);\n\n\t// Zoom Preview\n\tthis.editorUi.editor.graph.addListener('zoomPreview', mxUtils.bind(this, function(sender, evt)\n\t{\n\t\tthis.updateZoom(sender, evt, evt.getProperty('factor'));\n\t}));\n\n\tvar elts = this.addItems(['-', 'undo', 'redo']);\n\telts[1].setAttribute('title', mxResources.get('undo') + ' (' + this.editorUi.actions.get('undo').shortcut + ')');\n\telts[2].setAttribute('title', mxResources.get('redo') + ' (' + this.editorUi.actions.get('redo').shortcut + ')');\n\t\n\tif (sw >= 320)\n\t{\n\t\tvar elts = this.addItems(['-', 'delete']);\n\t\telts[1].setAttribute('title', mxResources.get('delete') + ' (' + this.editorUi.actions.get('delete').shortcut + ')');\n\t}\n\t\n\tif (sw >= 550)\n\t{\n\t\tthis.addItems(['-', 'toFront', 'toBack']);\n\t}\n\n\tif (sw >= 740)\n\t{\n\t\tthis.addItems(['-', 'fillColor']);\n\t\t\n\t\tif (sw >= 780)\n\t\t{\n\t\t\tthis.addItems(['strokeColor']);\n\t\t\t\n\t\t\tif (sw >= 820)\n\t\t\t{\n\t\t\t\tthis.addItems(['shadow']);\n\t\t\t}\n\t\t}\n\t}\n\t\n\tif (sw >= 400)\n\t{\n\t\tthis.addSeparator();\n\t\t\n\t\tif (sw >= 440)\n\t\t{\n\t\t\tthis.edgeShapeMenu = this.addMenuFunction('', mxResources.get('connection'), false, mxUtils.bind(this, function(menu)\n\t\t\t{\n\t\t\t\tthis.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_SHAPE, 'width'], [null, null], 'geIcon geSprite geSprite-connection', null, true).setAttribute('title', mxResources.get('line'));\n\t\t\t\tthis.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_SHAPE, 'width'], ['link', null], 'geIcon geSprite geSprite-linkedge', null, true).setAttribute('title', mxResources.get('link'));\n\t\t\t\tthis.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_SHAPE, 'width'], ['flexArrow', null], 'geIcon geSprite geSprite-arrow', null, true).setAttribute('title', mxResources.get('arrow'));\n\t\t\t\tthis.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_SHAPE, 'width'], ['arrow', null], 'geIcon geSprite geSprite-simplearrow', null, true).setAttribute('title', mxResources.get('simpleArrow'));\n\t\t\t}));\n\t\n\t\t\tthis.addDropDownArrow(this.edgeShapeMenu, 'geSprite-connection', 44, 50, 0, 0, 22, -4);\n\t\t}\n\t\n\t\tthis.edgeStyleMenu = this.addMenuFunction('geSprite-orthogonal', mxResources.get('waypoints'), false, mxUtils.bind(this, function(menu)\n\t\t{\n\t\t\tthis.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_EDGE, mxConstants.STYLE_CURVED, mxConstants.STYLE_NOEDGESTYLE], [null, null, null], 'geIcon geSprite geSprite-straight', null, true).setAttribute('title', mxResources.get('straight'));\n\t\t\tthis.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_EDGE, mxConstants.STYLE_CURVED, mxConstants.STYLE_NOEDGESTYLE], ['orthogonalEdgeStyle', null, null], 'geIcon geSprite geSprite-orthogonal', null, true).setAttribute('title', mxResources.get('orthogonal'));\n\t\t\tthis.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_EDGE, mxConstants.STYLE_ELBOW, mxConstants.STYLE_CURVED, mxConstants.STYLE_NOEDGESTYLE], ['elbowEdgeStyle', null, null, null], 'geIcon geSprite geSprite-horizontalelbow', null, true).setAttribute('title', mxResources.get('simple'));\n\t\t\tthis.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_EDGE, mxConstants.STYLE_ELBOW, mxConstants.STYLE_CURVED, mxConstants.STYLE_NOEDGESTYLE], ['elbowEdgeStyle', 'vertical', null, null], 'geIcon geSprite geSprite-verticalelbow', null, true).setAttribute('title', mxResources.get('simple'));\n\t\t\tthis.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_EDGE, mxConstants.STYLE_ELBOW, mxConstants.STYLE_CURVED, mxConstants.STYLE_NOEDGESTYLE], ['isometricEdgeStyle', null, null, null], 'geIcon geSprite geSprite-horizontalisometric', null, true).setAttribute('title', mxResources.get('isometric'));\n\t\t\tthis.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_EDGE, mxConstants.STYLE_ELBOW, mxConstants.STYLE_CURVED, mxConstants.STYLE_NOEDGESTYLE], ['isometricEdgeStyle', 'vertical', null, null], 'geIcon geSprite geSprite-verticalisometric', null, true).setAttribute('title', mxResources.get('isometric'));\n\t\t\tthis.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_EDGE, mxConstants.STYLE_CURVED, mxConstants.STYLE_NOEDGESTYLE], ['orthogonalEdgeStyle', '1', null], 'geIcon geSprite geSprite-curved', null, true).setAttribute('title', mxResources.get('curved'));\n\t\t\tthis.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_EDGE, mxConstants.STYLE_CURVED, mxConstants.STYLE_NOEDGESTYLE], ['entityRelationEdgeStyle', null, null], 'geIcon geSprite geSprite-entity', null, true).setAttribute('title', mxResources.get('entityRelation'));\n\t\t}));\n\t\t\n\t\tthis.addDropDownArrow(this.edgeStyleMenu, 'geSprite-orthogonal', 44, 50, 0, 0, 22, -4);\n\t}\n\n\tthis.addSeparator();\n\tvar insertMenu = this.addMenu('', mxResources.get('insert') + ' (' + mxResources.get('doubleClickTooltip') + ')', true, 'insert', null, true);\n\tthis.addDropDownArrow(insertMenu, 'geSprite-plus', 38, 48, -4, -3, 36, -8);\n\tthis.addSeparator();\n\tthis.addTableDropDown();\n};\n\n/**\n * Adds the toolbar elements.\n */\nToolbar.prototype.appendDropDownImageHtml = function(elt)\n{\n\tvar img = document.createElement('img');\n\timg.setAttribute('border', '0');\n\timg.setAttribute('valign', 'middle');\n\timg.setAttribute('src', Toolbar.prototype.dropDownImage);\n\telt.appendChild(img);\n\n\timg.style.position = 'absolute';\n\timg.style.right = '4px';\n\timg.style.top = (!EditorUi.compactUi ? 8 : 6) + 'px';\n};\n\n/**\n * Adds the toolbar elements.\n */\nToolbar.prototype.addTableDropDown = function()\n{\n\t// KNOWN: All table stuff does not work with undo/redo\n\t// KNOWN: Lost focus after click on submenu with text (not icon) in quirks and IE8. This is because the TD seems\n\t// to catch the focus on click in these browsers. NOTE: Workaround in mxPopupMenu for icon items (without text).\n\tvar menuElt = this.addMenuFunction('geIcon geSprite geSprite-table', mxResources.get('table'), false, mxUtils.bind(this, function(menu)\n\t{\n\t\tthis.editorUi.menus.addInsertTableCellItem(menu);\n\t}));\n\t\n\tmenuElt.style.position = 'relative';\n\tmenuElt.style.whiteSpace = 'nowrap';\n\tmenuElt.style.overflow = 'hidden';\n\tmenuElt.style.width = '30px';\n\tmenuElt.innerHTML = '<div class=\"geSprite geSprite-table\"></div>';\n\n\tthis.appendDropDownImageHtml(menuElt);\n\t\n\tvar div = menuElt.getElementsByTagName('div')[0];\n\tdiv.style.marginLeft = '-2px';\n\n\t// Fix for item size in kennedy theme\n\tif (EditorUi.compactUi)\n\t{\n\t\tmenuElt.getElementsByTagName('img')[0].style.left = '22px';\n\t\tmenuElt.getElementsByTagName('img')[0].style.top = '5px';\n\t}\n\t\n\t// Connects to insert menu enabled state\n\tvar menu = this.editorUi.menus.get('insert');\n\t\n\t// Workaround for possible not a function\n\t// when extending HTML objects\n\tif (menu != null && typeof menuElt.setEnabled === 'function')\n\t{\n\t\tmenu.addListener('stateChanged', function()\n\t\t{\n\t\t\tmenuElt.setEnabled(menu.enabled);\n\t\t});\n\t}\n\t\n\treturn menuElt;\n};\n\n/**\n * Adds the toolbar elements.\n */\nToolbar.prototype.addDropDownArrow = function(menu, sprite, width, atlasWidth, left, top, atlasDelta, atlasLeft)\n{\n\tatlasDelta = (atlasDelta != null) ? atlasDelta : 32;\n\tleft = (EditorUi.compactUi) ? left : atlasLeft;\n\t\n\tmenu.style.whiteSpace = 'nowrap';\n\tmenu.style.overflow = 'hidden';\n\tmenu.style.position = 'relative';\n\tmenu.style.width = (atlasWidth - atlasDelta) + 'px';\n\t\n\tmenu.innerHTML = '<div class=\"geSprite ' + sprite + '\"></div>';\n\tthis.appendDropDownImageHtml(menu);\n\t\n\tvar div = menu.getElementsByTagName('div')[0];\n\tdiv.style.marginLeft = left + 'px';\n\tdiv.style.marginTop = top + 'px';\n\n\t// Fix for item size in kennedy theme\n\tif (EditorUi.compactUi)\n\t{\n\t\tmenu.getElementsByTagName('img')[0].style.left = '24px';\n\t\tmenu.getElementsByTagName('img')[0].style.top = '5px';\n\t\tmenu.style.width = (width - 10) + 'px';\n\t}\n};\n\n/**\n * Sets the current font name.\n */\nToolbar.prototype.setFontName = function(value)\n{\n\tif (this.fontMenu != null)\n\t{\n\t\tthis.fontMenu.innerText = '';\n\t\tvar div = document.createElement('div');\n\t\tdiv.style.display = 'inline-block';\n\t\tdiv.style.overflow = 'hidden';\n\t\tdiv.style.textOverflow = 'ellipsis';\n\t\tdiv.style.maxWidth = '66px';\n\t\tmxUtils.write(div, value);\n\t\tthis.fontMenu.appendChild(div);\n\n\t\tthis.appendDropDownImageHtml(this.fontMenu);\n\t}\n};\n\n/**\n * Sets the current font name.\n */\nToolbar.prototype.setFontSize = function(value)\n{\n\tif (this.sizeMenu != null)\n\t{\n\t\tthis.sizeMenu.innerText = '';\n\t\tvar div = document.createElement('div');\n\t\tdiv.style.display = 'inline-block';\n\t\tdiv.style.overflow = 'hidden';\n\t\tdiv.style.textOverflow = 'ellipsis';\n\t\tdiv.style.maxWidth = '24px';\n\t\tmxUtils.write(div, value);\n\t\tthis.sizeMenu.appendChild(div);\n\t\t\n\t\tthis.appendDropDownImageHtml(this.sizeMenu);\n\t}\n};\n\n/**\n * Hides the current menu.\n */\nToolbar.prototype.createTextToolbar = function()\n{\n\tvar ui = this.editorUi;\n\tvar graph = ui.editor.graph;\n\n\tvar styleElt = this.addMenu('', mxResources.get('style'), true, 'formatBlock');\n\tstyleElt.style.position = 'relative';\n\tstyleElt.style.whiteSpace = 'nowrap';\n\tstyleElt.style.overflow = 'hidden';\n\tstyleElt.innerHTML = mxResources.get('style');\n\tthis.appendDropDownImageHtml(styleElt);\n\t\n\tif (EditorUi.compactUi)\n\t{\n\t\tstyleElt.style.paddingRight = '18px';\n\t\tstyleElt.getElementsByTagName('img')[0].style.right = '1px';\n\t\tstyleElt.getElementsByTagName('img')[0].style.top = '5px';\n\t}\n\t\n\tthis.addSeparator();\n\t\n\tthis.fontMenu = this.addMenu('', mxResources.get('fontFamily'), true, 'fontFamily');\n\tthis.fontMenu.style.position = 'relative';\n\tthis.fontMenu.style.whiteSpace = 'nowrap';\n\tthis.fontMenu.style.overflow = 'hidden';\n\tthis.fontMenu.style.width = '68px';\n\t\n\tthis.setFontName(Menus.prototype.defaultFont);\n\t\n\tif (EditorUi.compactUi)\n\t{\n\t\tthis.fontMenu.style.paddingRight = '18px';\n\t\tthis.fontMenu.getElementsByTagName('img')[0].style.right = '1px';\n\t\tthis.fontMenu.getElementsByTagName('img')[0].style.top = '5px';\n\t}\n\t\n\tthis.addSeparator();\n\t\n\tthis.sizeMenu = this.addMenu(Menus.prototype.defaultFontSize, mxResources.get('fontSize'), true, 'fontSize');\n\tthis.sizeMenu.style.position = 'relative';\n\tthis.sizeMenu.style.whiteSpace = 'nowrap';\n\tthis.sizeMenu.style.overflow = 'hidden';\n\tthis.sizeMenu.style.width = '24px';\n\t\n\tthis.setFontSize(Menus.prototype.defaultFontSize);\n\t\n\tif (EditorUi.compactUi)\n\t{\n\t\tthis.sizeMenu.style.paddingRight = '18px';\n\t\tthis.sizeMenu.getElementsByTagName('img')[0].style.right = '1px';\n\t\tthis.sizeMenu.getElementsByTagName('img')[0].style.top = '5px';\n\t}\n\t\n\tvar elts = this.addItems(['-', 'undo', 'redo','-', 'bold', 'italic', 'underline']);\n\telts[1].setAttribute('title', mxResources.get('undo') + ' (' + ui.actions.get('undo').shortcut + ')');\n\telts[2].setAttribute('title', mxResources.get('redo') + ' (' + ui.actions.get('redo').shortcut + ')');\n\telts[4].setAttribute('title', mxResources.get('bold') + ' (' + ui.actions.get('bold').shortcut + ')');\n\telts[5].setAttribute('title', mxResources.get('italic') + ' (' + ui.actions.get('italic').shortcut + ')');\n\telts[6].setAttribute('title', mxResources.get('underline') + ' (' + ui.actions.get('underline').shortcut + ')');\n\n\t// KNOWN: Lost focus after click on submenu with text (not icon) in quirks and IE8. This is because the TD seems\n\t// to catch the focus on click in these browsers. NOTE: Workaround in mxPopupMenu for icon items (without text).\n\tvar alignMenu = this.addMenuFunction('', mxResources.get('align'), false, mxUtils.bind(this, function(menu)\n\t{\n\t\telt = menu.addItem('', null, mxUtils.bind(this, function(evt)\n\t\t{\n\t\t\tgraph.cellEditor.alignText(mxConstants.ALIGN_LEFT, evt);\n\t\t\tui.fireEvent(new mxEventObject('styleChanged',\n\t\t\t\t'keys', [mxConstants.STYLE_ALIGN],\n\t\t\t\t'values', [mxConstants.ALIGN_LEFT],\n\t\t\t\t'cells', [graph.cellEditor.getEditingCell()]));\n\t\t}), null, 'geIcon geSprite geSprite-left');\n\t\telt.setAttribute('title', mxResources.get('left'));\n\n\t\telt = menu.addItem('', null, mxUtils.bind(this, function(evt)\n\t\t{\n\t\t\tgraph.cellEditor.alignText(mxConstants.ALIGN_CENTER, evt);\n\t\t\tui.fireEvent(new mxEventObject('styleChanged',\n\t\t\t\t'keys', [mxConstants.STYLE_ALIGN],\n\t\t\t\t'values', [mxConstants.ALIGN_CENTER],\n\t\t\t\t'cells', [graph.cellEditor.getEditingCell()]));\n\t\t}), null, 'geIcon geSprite geSprite-center');\n\t\telt.setAttribute('title', mxResources.get('center'));\n\n\t\telt = menu.addItem('', null, mxUtils.bind(this, function(evt)\n\t\t{\n\t\t\tgraph.cellEditor.alignText(mxConstants.ALIGN_RIGHT, evt);\n\t\t\tui.fireEvent(new mxEventObject('styleChanged',\n\t\t\t\t'keys', [mxConstants.STYLE_ALIGN],\n\t\t\t\t'values', [mxConstants.ALIGN_RIGHT],\n\t\t\t\t'cells', [graph.cellEditor.getEditingCell()]));\n\t\t}), null, 'geIcon geSprite geSprite-right');\n\t\telt.setAttribute('title', mxResources.get('right'));\n\n\t\telt = menu.addItem('', null, mxUtils.bind(this, function()\n\t\t{\n\t\t\tdocument.execCommand('justifyfull', false, null);\n\t\t}), null, 'geIcon geSprite geSprite-justifyfull');\n\t\telt.setAttribute('title', mxResources.get('justifyfull'));\n\t\t\n\t\telt = menu.addItem('', null, mxUtils.bind(this, function()\n\t\t{\n\t\t\tdocument.execCommand('insertorderedlist', false, null);\n\t\t}), null, 'geIcon geSprite geSprite-orderedlist');\n\t\telt.setAttribute('title', mxResources.get('numberedList'));\n\t\t\n\t\telt = menu.addItem('', null, mxUtils.bind(this, function()\n\t\t{\n\t\t\tdocument.execCommand('insertunorderedlist', false, null);\n\t\t}), null, 'geIcon geSprite geSprite-unorderedlist');\n\t\telt.setAttribute('title', mxResources.get('bulletedList'));\n\t\t\n\t\telt = menu.addItem('', null, mxUtils.bind(this, function()\n\t\t{\n\t\t\tdocument.execCommand('outdent', false, null);\n\t\t}), null, 'geIcon geSprite geSprite-outdent');\n\t\telt.setAttribute('title', mxResources.get('decreaseIndent'));\n\t\t\n\t\telt = menu.addItem('', null, mxUtils.bind(this, function()\n\t\t{\n\t\t\tdocument.execCommand('indent', false, null);\n\t\t}), null, 'geIcon geSprite geSprite-indent');\n\t\telt.setAttribute('title', mxResources.get('increaseIndent'));\n\t}));\n\n\talignMenu.style.position = 'relative';\n\talignMenu.style.whiteSpace = 'nowrap';\n\talignMenu.style.overflow = 'hidden';\n\talignMenu.style.width = '30px';\n\talignMenu.innerText = '';\n\n\tvar div = document.createElement('div');\n\tdiv.className = 'geSprite geSprite-left';\n\tdiv.style.marginLeft = '-2px';\n\talignMenu.appendChild(div);\n\n\tthis.appendDropDownImageHtml(alignMenu);\n\n\tif (EditorUi.compactUi)\n\t{\n\t\talignMenu.getElementsByTagName('img')[0].style.left = '22px';\n\t\talignMenu.getElementsByTagName('img')[0].style.top = '5px';\n\t}\n\t\n\tvar formatMenu = this.addMenuFunction('', mxResources.get('format'), false, mxUtils.bind(this, function(menu)\n\t{\n\t\telt = menu.addItem('', null, this.editorUi.actions.get('subscript').funct,\n\t\t\tnull, 'geIcon geSprite geSprite-subscript');\n\t\telt.setAttribute('title', mxResources.get('subscript') + ' (' + Editor.ctrlKey + '+,)');\n\n\t\telt = menu.addItem('', null, this.editorUi.actions.get('superscript').funct,\n\t\t\tnull, 'geIcon geSprite geSprite-superscript');\n\t\telt.setAttribute('title', mxResources.get('superscript') + ' (' + Editor.ctrlKey + '+.)');\n\n\t\t// KNOWN: IE+FF don't return keyboard focus after color dialog (calling focus doesn't help)\n\t\telt = menu.addItem('', null, this.editorUi.actions.get('fontColor').funct,\n\t\t\tnull, 'geIcon geSprite geSprite-fontcolor');\n\t\telt.setAttribute('title', mxResources.get('fontColor'));\n\t\t\n\t\telt = menu.addItem('', null, this.editorUi.actions.get('backgroundColor').funct,\n\t\t\tnull, 'geIcon geSprite geSprite-fontbackground');\n\t\telt.setAttribute('title', mxResources.get('backgroundColor'));\n\t\t\n\t\telt = menu.addItem('', null, mxUtils.bind(this, function()\n\t\t{\n\t\t\tdocument.execCommand('removeformat', false, null);\n\t\t}), null, 'geIcon geSprite geSprite-removeformat');\n\t\telt.setAttribute('title', mxResources.get('removeFormat'));\n\t}));\n\n\tformatMenu.style.position = 'relative';\n\tformatMenu.style.whiteSpace = 'nowrap';\n\tformatMenu.style.overflow = 'hidden';\n\tformatMenu.style.width = '30px';\n\tformatMenu.innerText = '';\n\t\n\tvar div = document.createElement('div');\n\tdiv.className = 'geSprite geSprite-dots';\n\tdiv.style.marginLeft = '-2px';\n\tformatMenu.appendChild(div);\n\n\tthis.appendDropDownImageHtml(formatMenu);\n\n\tif (EditorUi.compactUi)\n\t{\n\t\tformatMenu.getElementsByTagName('img')[0].style.left = '22px';\n\t\tformatMenu.getElementsByTagName('img')[0].style.top = '5px';\n\t}\n\n\tthis.addSeparator();\n\n\tthis.addButton('geIcon geSprite geSprite-code', mxResources.get('html'), function()\n\t{\n\t\tgraph.cellEditor.toggleViewMode();\n\t\t\n\t\tif (graph.cellEditor.textarea.innerHTML.length > 0 && (graph.cellEditor.textarea.innerHTML != '&nbsp;' || !graph.cellEditor.clearOnChange))\n\t\t{\n\t\t\twindow.setTimeout(function()\n\t\t\t{\n\t\t\t\tdocument.execCommand('selectAll', false, null);\n\t\t\t});\n\t\t}\n\t});\n\t\n\tthis.addSeparator();\n\t\n\tvar insertMenu = this.addMenuFunction('', mxResources.get('insert'), true, mxUtils.bind(this, function(menu)\n\t{\n\t\tmenu.addItem(mxResources.get('insertLink'), null, mxUtils.bind(this, function()\n\t\t{\n\t\t\tthis.editorUi.actions.get('link').funct();\n\t\t}));\n\t\t\n\t\tmenu.addItem(mxResources.get('insertImage'), null, mxUtils.bind(this, function()\n\t\t{\n\t\t\tthis.editorUi.actions.get('image').funct();\n\t\t}));\n\t\t\n\t\tmenu.addItem(mxResources.get('insertHorizontalRule'), null, mxUtils.bind(this, function()\n\t\t{\n\t\t\tdocument.execCommand('inserthorizontalrule', false, null);\n\t\t}));\n\t}));\n\t\n\tinsertMenu.style.whiteSpace = 'nowrap';\n\tinsertMenu.style.overflow = 'hidden';\n\tinsertMenu.style.position = 'relative';\n\tinsertMenu.style.width = '16px';\n\tinsertMenu.innerText = '';\n\n\tvar div = document.createElement('div');\n\tdiv.className = 'geSprite geSprite-plus';\n\tdiv.style.marginLeft = '-4px';\n\tdiv.style.marginTop = '-3px';\n\tinsertMenu.appendChild(div);\n\n\tthis.appendDropDownImageHtml(insertMenu);\n\t\n\t// Fix for item size in kennedy theme\n\tif (EditorUi.compactUi)\n\t{\n\t\tinsertMenu.getElementsByTagName('img')[0].style.left = '24px';\n\t\tinsertMenu.getElementsByTagName('img')[0].style.top = '5px';\n\t\tinsertMenu.style.width = '30px';\n\t}\n\t\n\tthis.addSeparator();\n\t\n\t// KNOWN: All table stuff does not work with undo/redo\n\t// KNOWN: Lost focus after click on submenu with text (not icon) in quirks and IE8. This is because the TD seems\n\t// to catch the focus on click in these browsers. NOTE: Workaround in mxPopupMenu for icon items (without text).\n\tvar elt = this.addMenuFunction('geIcon geSprite geSprite-table', mxResources.get('table'), false, mxUtils.bind(this, function(menu)\n\t{\n\t\tvar elt = graph.getSelectedElement();\n\t\tvar cell = graph.getParentByNames(elt, ['TD', 'TH'], graph.cellEditor.text2);\n\t\tvar row = graph.getParentByName(elt, 'TR', graph.cellEditor.text2);\n\n\t\tif (row == null)\n    \t{\n\t\t\tfunction createTable(rows, cols)\n\t\t\t{\n\t\t\t\tvar html = ['<table>'];\n\t\t\t\t\n\t\t\t\tfor (var i = 0; i < rows; i++)\n\t\t\t\t{\n\t\t\t\t\thtml.push('<tr>');\n\t\t\t\t\t\n\t\t\t\t\tfor (var j = 0; j < cols; j++)\n\t\t\t\t\t{\n\t\t\t\t\t\thtml.push('<td><br></td>');\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\thtml.push('</tr>');\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\thtml.push('</table>');\n\t\t\t\t\n\t\t\t\treturn html.join('');\n\t\t\t};\n\t\t\t\n\t\t\tthis.editorUi.menus.addInsertTableItem(menu);\n    \t}\n\t\telse\n    \t{\n\t\t\tvar table = graph.getParentByName(row, 'TABLE', graph.cellEditor.text2);\n\n\t\t\telt = menu.addItem('', null, mxUtils.bind(this, function()\n\t\t\t{\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tgraph.selectNode(graph.insertColumn(table, (cell != null) ? cell.cellIndex : 0));\n\t\t\t\t}\n\t\t\t\tcatch (e)\n\t\t\t\t{\n\t\t\t\t\tthis.editorUi.handleError(e);\n\t\t\t\t}\n\t\t\t}), null, 'geIcon geSprite geSprite-insertcolumnbefore');\n\t\t\telt.setAttribute('title', mxResources.get('insertColumnBefore'));\n\t\t\t\n\t\t\telt = menu.addItem('', null, mxUtils.bind(this, function()\n\t\t\t{\t\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tgraph.selectNode(graph.insertColumn(table, (cell != null) ? cell.cellIndex + 1 : -1));\n\t\t\t\t}\n\t\t\t\tcatch (e)\n\t\t\t\t{\n\t\t\t\t\tthis.editorUi.handleError(e);\n\t\t\t\t}\n\t\t\t}), null, 'geIcon geSprite geSprite-insertcolumnafter');\n\t\t\telt.setAttribute('title', mxResources.get('insertColumnAfter'));\n\n\t\t\telt = menu.addItem('Delete column', null, mxUtils.bind(this, function()\n\t\t\t{\n\t\t\t\tif (cell != null)\n\t\t\t\t{\n\t\t\t\t\ttry\n\t\t\t\t\t{\n\t\t\t\t\t\tgraph.deleteColumn(table, cell.cellIndex);\n\t\t\t\t\t}\n\t\t\t\t\tcatch (e)\n\t\t\t\t\t{\n\t\t\t\t\t\tthis.editorUi.handleError(e);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}), null, 'geIcon geSprite geSprite-deletecolumn');\n\t\t\telt.setAttribute('title', mxResources.get('deleteColumn'));\n\t\t\t\n\t\t\telt = menu.addItem('', null, mxUtils.bind(this, function()\n\t\t\t{\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tgraph.selectNode(graph.insertRow(table, row.sectionRowIndex));\n\t\t\t\t}\n\t\t\t\tcatch (e)\n\t\t\t\t{\n\t\t\t\t\tthis.editorUi.handleError(e);\n\t\t\t\t}\n\t\t\t}), null, 'geIcon geSprite geSprite-insertrowbefore');\n\t\t\telt.setAttribute('title', mxResources.get('insertRowBefore'));\n\n\t\t\telt = menu.addItem('', null, mxUtils.bind(this, function()\n\t\t\t{\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tgraph.selectNode(graph.insertRow(table, row.sectionRowIndex + 1));\n\t\t\t\t}\n\t\t\t\tcatch (e)\n\t\t\t\t{\n\t\t\t\t\tthis.editorUi.handleError(e);\n\t\t\t\t}\n\t\t\t}), null, 'geIcon geSprite geSprite-insertrowafter');\n\t\t\telt.setAttribute('title', mxResources.get('insertRowAfter'));\n\n\t\t\telt = menu.addItem('', null, mxUtils.bind(this, function()\n\t\t\t{\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tgraph.deleteRow(table, row.sectionRowIndex);\n\t\t\t\t}\n\t\t\t\tcatch (e)\n\t\t\t\t{\n\t\t\t\t\tthis.editorUi.handleError(e);\n\t\t\t\t}\n\t\t\t}), null, 'geIcon geSprite geSprite-deleterow');\n\t\t\telt.setAttribute('title', mxResources.get('deleteRow'));\n\t\t\t\n\t\t\telt = menu.addItem('', null, mxUtils.bind(this, function()\n\t\t\t{\n\t\t\t\t// Converts rgb(r,g,b) values\n\t\t\t\tvar color = table.style.borderColor.replace(\n\t\t\t\t\t    /\\brgb\\s*\\(\\s*(\\d+)\\s*,\\s*(\\d+)\\s*,\\s*(\\d+)\\s*\\)/g,\n\t\t\t\t\t    function($0, $1, $2, $3) {\n\t\t\t\t\t        return \"#\" + (\"0\"+Number($1).toString(16)).substr(-2) + (\"0\"+Number($2).toString(16)).substr(-2) + (\"0\"+Number($3).toString(16)).substr(-2);\n\t\t\t\t\t    });\n\t\t\t\tthis.editorUi.pickColor(color, function(newColor)\n\t\t\t\t{\n\t\t\t\t\tif (newColor == null || newColor == mxConstants.NONE)\n\t\t\t\t\t{\n\t\t\t\t\t\ttable.removeAttribute('border');\n\t\t\t\t\t\ttable.style.border = '';\n\t\t\t\t\t\ttable.style.borderCollapse = '';\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\ttable.setAttribute('border', '1');\n\t\t\t\t\t\ttable.style.border = '1px solid ' + newColor;\n\t\t\t\t\t\ttable.style.borderCollapse = 'collapse';\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}), null, 'geIcon geSprite geSprite-strokecolor');\n\t\t\telt.setAttribute('title', mxResources.get('borderColor'));\n\t\t\t\n\t\t\telt = menu.addItem('', null, mxUtils.bind(this, function()\n\t\t\t{\n\t\t\t\t// Converts rgb(r,g,b) values\n\t\t\t\tvar color = table.style.backgroundColor.replace(\n\t\t\t\t\t    /\\brgb\\s*\\(\\s*(\\d+)\\s*,\\s*(\\d+)\\s*,\\s*(\\d+)\\s*\\)/g,\n\t\t\t\t\t    function($0, $1, $2, $3) {\n\t\t\t\t\t        return \"#\" + (\"0\"+Number($1).toString(16)).substr(-2) + (\"0\"+Number($2).toString(16)).substr(-2) + (\"0\"+Number($3).toString(16)).substr(-2);\n\t\t\t\t\t    });\n\t\t\t\tthis.editorUi.pickColor(color, function(newColor)\n\t\t\t\t{\n\t\t\t\t\tif (newColor == null || newColor == mxConstants.NONE)\n\t\t\t\t\t{\n\t\t\t\t\t\ttable.style.backgroundColor = '';\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\ttable.style.backgroundColor = newColor;\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}), null, 'geIcon geSprite geSprite-fillcolor');\n\t\t\telt.setAttribute('title', mxResources.get('backgroundColor'));\n\t\t\t\n\t\t\telt = menu.addItem('', null, mxUtils.bind(this, function()\n\t\t\t{\n\t\t\t\tvar value = table.getAttribute('cellPadding') || 0;\n\t\t\t\t\n\t\t\t\tvar dlg = new FilenameDialog(this.editorUi, value, mxResources.get('apply'), mxUtils.bind(this, function(newValue)\n\t\t\t\t{\n\t\t\t\t\tif (newValue != null && newValue.length > 0)\n\t\t\t\t\t{\n\t\t\t\t\t\ttable.setAttribute('cellPadding', newValue);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\ttable.removeAttribute('cellPadding');\n\t\t\t\t\t}\n\t\t\t\t}), mxResources.get('spacing'));\n\t\t\t\tthis.editorUi.showDialog(dlg.container, 300, 80, true, true);\n\t\t\t\tdlg.init();\n\t\t\t}), null, 'geIcon geSprite geSprite-fit');\n\t\t\telt.setAttribute('title', mxResources.get('spacing'));\n\t\t\t\n\t\t\telt = menu.addItem('', null, mxUtils.bind(this, function()\n\t\t\t{\n\t\t\t\ttable.setAttribute('align', 'left');\n\t\t\t}), null, 'geIcon geSprite geSprite-left');\n\t\t\telt.setAttribute('title', mxResources.get('left'));\n\n\t\t\telt = menu.addItem('', null, mxUtils.bind(this, function()\n\t\t\t{\n\t\t\t\ttable.setAttribute('align', 'center');\n\t\t\t}), null, 'geIcon geSprite geSprite-center');\n\t\t\telt.setAttribute('title', mxResources.get('center'));\n\t\t\t\t\n\t\t\telt = menu.addItem('', null, mxUtils.bind(this, function()\n\t\t\t{\n\t\t\t\ttable.setAttribute('align', 'right');\n\t\t\t}), null, 'geIcon geSprite geSprite-right');\n\t\t\telt.setAttribute('title', mxResources.get('right'));\n    \t}\n\t}));\n\t\n\telt.style.position = 'relative';\n\telt.style.whiteSpace = 'nowrap';\n\telt.style.overflow = 'hidden';\n\telt.style.width = '30px';\n\telt.innerText = '';\n\n\tvar div = document.createElement('div');\n\tdiv.className = 'geSprite geSprite-table';\n\tdiv.style.marginLeft = '-2px';\n\telt.appendChild(div);\n\n\tthis.appendDropDownImageHtml(elt);\n\n\t// Fix for item size in kennedy theme\n\tif (EditorUi.compactUi)\n\t{\n\t\telt.getElementsByTagName('img')[0].style.left = '22px';\n\t\telt.getElementsByTagName('img')[0].style.top = '5px';\n\t}\n};\n\n/**\n * Hides the current menu.\n */\nToolbar.prototype.hideMenu = function()\n{\n\tthis.editorUi.hideCurrentMenu();\n};\n\n/**\n * Adds a label to the toolbar.\n */\nToolbar.prototype.addMenu = function(label, tooltip, showLabels, name, c, showAll, ignoreState)\n{\n\tvar menu = this.editorUi.menus.get(name);\n\tvar elt = this.addMenuFunction(label, tooltip, showLabels, function()\n\t{\n\t\tmenu.funct.apply(menu, arguments);\n\t}, c, showAll);\n\t\n\t// Workaround for possible not a function\n\t// when extending HTML objects\n\tif (!ignoreState && typeof elt.setEnabled === 'function')\n\t{\n\t\tmenu.addListener('stateChanged', function()\n\t\t{\n\t\t\telt.setEnabled(menu.enabled);\n\t\t});\n\t}\n\t\n\treturn elt;\n};\n\n/**\n * Adds a label to the toolbar.\n */\nToolbar.prototype.addMenuFunction = function(label, tooltip, showLabels, funct, c, showAll)\n{\n\treturn this.addMenuFunctionInContainer((c != null) ? c : this.container, label, tooltip, showLabels, funct, showAll);\n};\n\n/**\n * Adds a label to the toolbar.\n */\nToolbar.prototype.addMenuFunctionInContainer = function(container, label, tooltip, showLabels, funct, showAll)\n{\n\tvar elt = (showLabels) ? this.createLabel(label) : this.createButton(label);\n\tthis.initElement(elt, tooltip);\n\tthis.addMenuHandler(elt, showLabels, funct, showAll);\n\tcontainer.appendChild(elt);\n\t\n\treturn elt;\n};\n\n/**\n * Adds a separator to the separator.\n */\nToolbar.prototype.addSeparator = function(c)\n{\n\tc = (c != null) ? c : this.container;\n\tvar elt = document.createElement('div');\n\telt.className = 'geSeparator';\n\tc.appendChild(elt);\n\t\n\treturn elt;\n};\n\n/**\n * Adds given action item\n */\nToolbar.prototype.addItems = function(keys, c, ignoreDisabled)\n{\n\tvar items = [];\n\t\n\tfor (var i = 0; i < keys.length; i++)\n\t{\n\t\tvar key = keys[i];\n\t\t\n\t\tif (key == '-')\n\t\t{\n\t\t\titems.push(this.addSeparator(c));\n\t\t}\n\t\telse\n\t\t{\n\t\t\titems.push(this.addItem('geSprite-' + key.toLowerCase(), key, c, ignoreDisabled));\n\t\t}\n\t}\n\t\n\treturn items;\n};\n\n/**\n * Adds given action item\n */\nToolbar.prototype.addItem = function(sprite, key, c, ignoreDisabled)\n{\n\tvar action = this.editorUi.actions.get(key);\n\tvar elt = null;\n\t\n\tif (action != null)\n\t{\n\t\tvar tooltip = action.label;\n\t\t\n\t\tif (action.shortcut != null)\n\t\t{\n\t\t\ttooltip += ' (' + action.shortcut + ')';\n\t\t}\n\t\t\n\t\telt = this.addButton(sprite, tooltip, action.funct, c);\n\n\t\t// Workaround for possible not a function\n\t\t// when extending HTML objects\n\t\tif (!ignoreDisabled && typeof elt.setEnabled === 'function')\n\t\t{\n\t\t\telt.setEnabled(action.enabled);\n\t\t\t\n\t\t\taction.addListener('stateChanged', function()\n\t\t\t{\n\t\t\t\telt.setEnabled(action.enabled);\n\t\t\t});\n\t\t}\n\t}\n\t\n\treturn elt;\n};\n\n/**\n * Adds a button to the toolbar.\n */\nToolbar.prototype.addButton = function(classname, tooltip, funct, c)\n{\n\tvar elt = this.createButton(classname);\n\tc = (c != null) ? c : this.container;\n\t\n\tthis.initElement(elt, tooltip);\n\tthis.addClickHandler(elt, funct);\n\tc.appendChild(elt);\n\t\n\treturn elt;\n};\n\n/**\n * Initializes the given toolbar element.\n */\nToolbar.prototype.initElement = function(elt, tooltip)\n{\n\t// Adds tooltip\n\tif (tooltip != null)\n\t{\n\t\telt.setAttribute('title', tooltip);\n\t}\n\n\tthis.addEnabledState(elt);\n};\n\n/**\n * Adds enabled state with setter to DOM node (avoids JS wrapper).\n */\nToolbar.prototype.addEnabledState = function(elt)\n{\n\tvar classname = elt.className;\n\t\n\telt.setEnabled = function(value)\n\t{\n\t\telt.enabled = value;\n\t\t\n\t\tif (value)\n\t\t{\n\t\t\telt.className = classname;\n\t\t}\n\t\telse\n\t\t{\n\t\t\telt.className = classname + ' mxDisabled';\n\t\t}\n\t};\n\t\n\telt.setEnabled(true);\n};\n\n/**\n * Adds enabled state with setter to DOM node (avoids JS wrapper).\n */\nToolbar.prototype.addClickHandler = function(elt, funct)\n{\n\tif (funct != null)\n\t{\n\t\tmxEvent.addListener(elt, 'click', function(evt)\n\t\t{\n\t\t\tif (elt.enabled)\n\t\t\t{\n\t\t\t\tfunct(evt);\n\t\t\t}\n\t\t\t\n\t\t\tmxEvent.consume(evt);\n\t\t});\n\t\t\n\t\t// Prevents focus\n\t    mxEvent.addListener(elt, (mxClient.IS_POINTER) ? 'pointerdown' : 'mousedown',\n        \tmxUtils.bind(this, function(evt)\n    \t{\n\t\t\tevt.preventDefault();\n\t\t}));\n\t}\n};\n\n/**\n * Creates and returns a new button.\n */\nToolbar.prototype.createButton = function(classname)\n{\n\tvar elt = document.createElement('a');\n\telt.className = 'geButton';\n\n\tvar inner = document.createElement('div');\n\t\n\tif (classname != null)\n\t{\n\t\tinner.className = 'geSprite ' + classname;\n\t}\n\t\n\telt.appendChild(inner);\n\t\n\treturn elt;\n};\n\n/**\n * Creates and returns a new button.\n */\nToolbar.prototype.createLabel = function(label, tooltip)\n{\n\tvar elt = document.createElement('a');\n\telt.className = 'geLabel';\n\tmxUtils.write(elt, label);\n\t\n\treturn elt;\n};\n\n/**\n * Adds a handler for showing a menu in the given element.\n */\nToolbar.prototype.addMenuHandler = function(elt, showLabels, funct, showAll)\n{\n\tif (funct != null)\n\t{\n\t\tvar graph = this.editorUi.editor.graph;\n\t\tvar menu = null;\n\t\tvar show = true;\n\n\t\tmxEvent.addListener(elt, 'click', mxUtils.bind(this, function(evt)\n\t\t{\n\t\t\tif (show && (elt.enabled == null || elt.enabled))\n\t\t\t{\n\t\t\t\tgraph.popupMenuHandler.hideMenu();\n\t\t\t\tmenu = new mxPopupMenu(funct);\n\t\t\t\tmenu.smartSeparators = true;\n\t\t\t\tmenu.div.className += ' geToolbarMenu';\n\t\t\t\tmenu.showDisabled = showAll;\n\t\t\t\tmenu.labels = showLabels;\n\t\t\t\tmenu.autoExpand = true;\n\n\t\t\t\t// Workaround for scrollbar hiding menu items\n\t\t\t\tif (!showLabels && menu.div.scrollHeight > menu.div.clientHeight)\n\t\t\t\t{\n\t\t\t\t\tmenu.div.style.width = '40px';\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tmenu.hideMenu = mxUtils.bind(this, function()\n\t\t\t\t{\n\t\t\t\t\tmxPopupMenu.prototype.hideMenu.apply(menu, arguments);\n\t\t\t\t\tthis.editorUi.resetCurrentMenu();\n\t\t\t\t\tmenu.destroy();\n\t\t\t\t});\n\n\t\t\t\tvar offset = mxUtils.getOffset(elt);\n\t\t\t\tmenu.popup(offset.x, offset.y + elt.offsetHeight, null, evt);\n\t\t\t\tthis.editorUi.setCurrentMenu(menu, elt);\n\t\t\t}\n\t\t\t\n\t\t\tshow = true;\n\t\t\tmxEvent.consume(evt);\n\t\t}));\n\n\t\t// Hides menu if already showing and prevents focus\n        mxEvent.addListener(elt, (mxClient.IS_POINTER) ? 'pointerdown' : 'mousedown',\n        \tmxUtils.bind(this, function(evt)\n\t\t{\n\t\t\tshow = menu == null || menu.div == null ||\n\t\t\t\tmenu.div.parentNode == null;\n\t\t\tevt.preventDefault();\n\t\t}));\n\t}\n};\n\n/**\n * Adds a handler for showing a menu in the given element.\n */\nToolbar.prototype.destroy = function()\n{\n\tif (this.gestureHandler != null)\n\t{\t\n\t\tmxEvent.removeGestureListeners(document, this.gestureHandler);\n\t\tthis.gestureHandler = null;\n\t}\n};\n"
  },
  {
    "path": "static/cherry/drawio_demo/atlas.css",
    "content": "html body .geToolbarContainer .geButton, html body .geToolbarContainer .geLabel {\n\tpadding:3px 5px 5px 5px;\n\tposition: relative;\n\ttext-align: center;\n\tvertical-align: middle;\n\tborder-radius:3px;\n}\nhtml body .geMenubarContainer .geBigButton {\n\tmargin-top: 4px;\n}\nhtml body .geBigStandardButton:active, .geSidebarContainer .geTitle:active {\n\tbackground-color: #DEEBFF;\n\tcolor: #0052CC;\n}\nbody .geToolbarContainer .geButton:active, body .geToolbarContainer .geLabel:active {\n\tbackground-color: #DEEBFF;\n\tcolor: #0052CC;\n}\nbody > .geToolbarContainer .geLabel, body > .geToolbarContainer .geButton {\n\t-webkit-box-shadow: none !important;\n\t-moz-box-shadow: none !important;\n\tbox-shadow: none !important;\n\tborder: 1px solid transparent !important;\n}\nbody > .geToolbarContainer {\n\tbackground: #f5f5f5 !important;\n\tborder-bottom: 1px solid #ccc !important;\n\t-webkit-box-shadow: none !important;\n\t-moz-box-shadow: none !important;\n\tbox-shadow: none !important;\n}\nbody > .geToolbarContainer > .geToolbar {\n\tpadding-top:4px !important;\n}\nbody > .geToolbarContainer > .geToolbar .geSeparator {\n\twidth:1px !important;\n\tbackground:#cccccc !important;\n\tmargin-top:3px;\n\theight:24px;\n}\n.geSidebarContainer .geToolbarContainer .geButton {\n\tpadding:0px 2px 4px 2px;\n}\n.geToolbarContainer .geLabel {\n\theight:18px;\n\t_height:31px;\n}\nhtml body .geStatus .geStatusAlert {\n\tcolor:#ffffff !important;\n\tfont-size:12px;\n\tborder:none;\n\tborder-radius:6px;\n\ttext-shadow: rgb(41, 89, 137) 0px 1px 0px;\n\tbackground-color:#428bca;\n\tbackground-image:linear-gradient(rgb(70, 135, 206) 0px, rgb(48, 104, 162) 100%);\n\t-webkit-box-shadow: rgba(255, 255, 255, 0.0980392) 0px 1px 0px 0px inset, rgba(0, 0, 0, 0.2) 0px 1px 1px 0px;\n\t-moz-box-shadow: rgba(255, 255, 255, 0.0980392) 0px 1px 0px 0px inset, rgba(0, 0, 0, 0.2) 0px 1px 1px 0px;\n\tbox-shadow: rgba(255, 255, 255, 0.0980392) 0px 1px 0px 0px inset, rgba(0, 0, 0, 0.2) 0px 1px 1px 0px;\n}\nhtml body .geStatus .geStatusAlert:hover {\n    background-color: #2d6ca2;\n    background-image: linear-gradient(rgb(90, 148, 211) 0px, rgb(54, 115, 181) 100%);\n}\nhtml body .geStatus .geStatusMessage {\n\tcolor:#ffffff !important;\n\tfont-size:12px;\n\tborder:none;\n\tborder-radius:6px;\n\ttext-shadow: rgb(41, 89, 137) 0px 1px 0px;\n\tbackground-color:#428bca;\n\tbackground-image:linear-gradient(rgb(70, 135, 206) 0px, rgb(48, 104, 162) 100%);\n\t-webkit-box-shadow: rgba(255, 255, 255, 0.0980392) 0px 1px 0px 0px inset, rgba(0, 0, 0, 0.2) 0px 1px 1px 0px;\n\t-moz-box-shadow: rgba(255, 255, 255, 0.0980392) 0px 1px 0px 0px inset, rgba(0, 0, 0, 0.2) 0px 1px 1px 0px;\n\tbox-shadow: rgba(255, 255, 255, 0.0980392) 0px 1px 0px 0px inset, rgba(0, 0, 0, 0.2) 0px 1px 1px 0px;\n}\nhtml body .geStatus .geStatusMessage:hover {\n    background-color: #2d6ca2;\n    background-image: linear-gradient(rgb(90, 148, 211) 0px, rgb(54, 115, 181) 100%);\n}\nhtml body div.mxWindow .geToolbarContainer {\n\tfont-size:11px !important;\t\n\tcolor: #000000 !important;\n\t-webkit-box-shadow: none !important;\n\t-moz-box-shadow: none !important;\n\tbox-shadow: none !important;\n\tborder-width: 0px 0px 1px !important;\n\tborder-color: rgb(195, 195, 195) !important;\n\tborder-style: solid !important;\n\tborder-bottom:1px solid #e0e0e0;\n}\nhtml body div.mxWindow .geButton, .mxWindow .geLabel {\n\t-webkit-box-shadow: none !important;\n\t-moz-box-shadow: none !important;\n\tbox-shadow: none !important;\n\tbackground-image: none !important;\n\tborder:1px solid transparent !important;\n}\ndiv.mxWindow .geButton {\n\tmargin:1px !important;\n}\ndiv.mxWindow .geLabel {\n\tpadding:3px 5px 3px 5px !important;\n\tmargin:2px;\n}\ndiv.mxWindow .geButton:hover, .mxWindow .geLabel:hover {\n\t-webkit-box-shadow: none !important;\n\t-moz-box-shadow: none !important;\n\tbox-shadow: none !important;\n\tbackground: none !important;\n\tborder:1px solid gray;\n}\ndiv.mxWindow .geButton:active, .mxWindow .geLabel:active {\n\t-webkit-box-shadow: none !important;\n\t-moz-box-shadow: none !important;\n\tbox-shadow: none !important;\n\tbackground-image: none !important;\n\tborder:1px solid black;\n}\nbody > .geToolbarContainer .geButton {\n\tmargin:0px -1px 0px 0px !important;\n\theight:20px;\n}\nhtml body .geSidebarTooltip, .geSidebarTooltipImage {\n\tz-index:2;\n}\nhtml body .geSidebarContainer .geTitle {\n\tfont-size:13px;\n\tpadding:8px 0px 8px 16px;\n}\nhtml body .geMenubarContainer * {\n\tcolor: #DEEBFF;\n}\nhtml body .geMenubarContainer .geStatus {\n\tcolor: rgb(179, 179, 179);\n}\n.geMenubarContainer .geItem:hover:not(.geStatus) {\n\tbackground-color: rgba(9, 30, 66, 0.48) !important;\n}\nhtml body .geToolbarContainer .geLabel {\n\tmargin:0px;\n\tpadding:6px 20px 4px 10px !important;\n}\n.geToolbar .geSeparator {\n\twidth:0px !important;\n}\n.geMenubarContainer .geItem, .geToolbar .geButton, .geToolbar .geLabel, .geSidebar, .geSidebarContainer .geTitle, .geSidebar .geItem, .mxPopupMenuItem {\n\t-webkit-transition: none;\n\t-moz-transition: none;\n\t-o-transition: none;\n\t-ms-transition: none;\n\ttransition: none;\n}\nhtml body .geMenubarContainer {\n\tbackground-color: #0049B0;\n\tcolor: #ffffff;\n\tfont-size: 14px;\n}\nhtml body .geMenubar > .geItem {\n\tpadding-left:14px;\n\tpadding-right:15px;\n}\nhtml body .geSidebarContainer .geToolbarContainer {\n\t-webkit-box-shadow: none;\n\t-moz-box-shadow: none;\n\tbox-shadow: none;\n\tborder:none;\n}\nhtml body .geSidebarContainer .geToolbarContainer .geButton {\n\tmargin:2px !important;\n\theight:20px !important;\n}\nhtml body .geSidebarContainer .geToolbarContainer .geLabel {\n\tmargin:2px !important;\n\tpadding:4px !important;\n}\nhtml body .geToolbar {\n\tmargin:0px;\n\tpadding:8px 10px 0px 10px;\n\t-webkit-box-shadow:none;\n\t-moz-box-shadow:none;\n\tbox-shadow:none;\n\tborder:none;\n}\nhtml body .geMenubarContainer .mxDisabled {\n\topacity: 1;\n\tcolor: rgb(179, 179, 179);\n}\nhtml .geButtonContainer {\n\tpadding-right:10px;\n}\n.geDialogTitle {\n\tbox-sizing:border-box;\n\twhite-space:nowrap;\n\tbackground:rgb(32, 80, 129);\n\tborder-bottom:1px solid rgb(192, 192, 192);\n\tfont-size:15px;\n\tfont-weight:bold;\n\ttext-align:center;\n\tcolor:white;\n}\n.geDialogFooter {\n\tbackground:whiteSmoke;\n\twhite-space:nowrap;\n\ttext-align:right;\n\tbox-sizing:border-box;\n\tborder-top:1px solid #e5e5e5;\n\tcolor:darkGray;\n}\nhtml .geNotification-bell {\n  opacity: 1;\n}\nhtml .geNotification-bell * {\n  background-color: #DEEBFF;\n  box-shadow: 0px 0px 10px #DEEBFF;\n}"
  },
  {
    "path": "static/cherry/drawio_demo/dark-default.xml",
    "content": "<mxStylesheet>\n\t<add as=\"defaultVertex\">\n\t\t<add as=\"shape\" value=\"label\"/>\n\t\t<add as=\"perimeter\" value=\"rectanglePerimeter\"/>\n\t\t<add as=\"fontSize\" value=\"12\"/>\n\t\t<add as=\"fontFamily\" value=\"Helvetica\"/>\n\t\t<add as=\"align\" value=\"center\"/>\n\t\t<add as=\"verticalAlign\" value=\"middle\"/>\n\t\t<add as=\"fillColor\" value=\"default\"/>\n\t\t<add as=\"strokeColor\" value=\"default\"/>\n\t\t<add as=\"fontColor\" value=\"default\"/>\n\t</add>\n\t<add as=\"defaultEdge\">\n\t\t<add as=\"shape\" value=\"connector\"/>\n\t\t<add as=\"labelBackgroundColor\" value=\"default\"/>\n\t\t<add as=\"endArrow\" value=\"classic\"/>\n\t\t<add as=\"fontSize\" value=\"11\"/>\n\t\t<add as=\"fontFamily\" value=\"Helvetica\"/>\n\t\t<add as=\"align\" value=\"center\"/>\n\t\t<add as=\"verticalAlign\" value=\"middle\"/>\n\t\t<add as=\"rounded\" value=\"1\"/>\n\t\t<add as=\"strokeColor\" value=\"default\"/>\n\t\t<add as=\"fontColor\" value=\"default\"/>\n\t</add>\n\t<add as=\"text\">\n\t\t<add as=\"fillColor\" value=\"none\"/>\n\t\t<add as=\"gradientColor\" value=\"none\"/>\n\t\t<add as=\"strokeColor\" value=\"none\"/>\n\t\t<add as=\"align\" value=\"left\"/>\n\t\t<add as=\"verticalAlign\" value=\"top\"/>\n\t</add>\n\t<add as=\"edgeLabel\" extend=\"text\">\n\t\t<add as=\"labelBackgroundColor\" value=\"default\"/>\n\t\t<add as=\"fontSize\" value=\"11\"/>\n\t</add>\n\t<add as=\"label\">\n\t\t<add as=\"fontStyle\" value=\"1\"/>\n\t\t<add as=\"align\" value=\"left\"/>\n\t\t<add as=\"verticalAlign\" value=\"middle\"/>\n\t\t<add as=\"spacing\" value=\"2\"/>\n\t\t<add as=\"spacingLeft\" value=\"52\"/>\n\t\t<add as=\"imageWidth\" value=\"42\"/>\n\t\t<add as=\"imageHeight\" value=\"42\"/>\n\t\t<add as=\"rounded\" value=\"1\"/>\n\t</add>\n\t<add as=\"icon\" extend=\"label\">\n\t\t<add as=\"align\" value=\"center\"/>\n\t\t<add as=\"imageAlign\" value=\"center\"/>\n\t\t<add as=\"verticalLabelPosition\" value=\"bottom\"/>\n\t\t<add as=\"verticalAlign\" value=\"top\"/>\n\t\t<add as=\"spacingTop\" value=\"4\"/>\n\t\t<add as=\"labelBackgroundColor\" value=\"default\"/>\n\t\t<add as=\"spacing\" value=\"0\"/>\n\t\t<add as=\"spacingLeft\" value=\"0\"/>\n\t\t<add as=\"spacingTop\" value=\"6\"/>\n\t\t<add as=\"fontStyle\" value=\"0\"/>\n\t\t<add as=\"imageWidth\" value=\"48\"/>\n\t\t<add as=\"imageHeight\" value=\"48\"/>\n\t</add>\n\t<add as=\"swimlane\">\n\t\t<add as=\"shape\" value=\"swimlane\"/>\n\t\t<add as=\"fontSize\" value=\"12\"/>\n\t\t<add as=\"fontStyle\" value=\"1\"/>\n\t\t<add as=\"startSize\" value=\"23\"/>\n\t</add>\n\t<add as=\"group\">\n\t\t<add as=\"verticalAlign\" value=\"top\"/>\n\t\t<add as=\"fillColor\" value=\"none\"/>\n\t\t<add as=\"strokeColor\" value=\"none\"/>\n\t\t<add as=\"gradientColor\" value=\"none\"/>\n\t\t<add as=\"pointerEvents\" value=\"0\"/>\n\t</add>\n\t<add as=\"ellipse\">\n\t\t<add as=\"shape\" value=\"ellipse\"/>\n\t\t<add as=\"perimeter\" value=\"ellipsePerimeter\"/>\n\t</add>\n\t<add as=\"rhombus\">\n\t\t<add as=\"shape\" value=\"rhombus\"/>\n\t\t<add as=\"perimeter\" value=\"rhombusPerimeter\"/>\n\t</add>\n\t<add as=\"triangle\">\n\t\t<add as=\"shape\" value=\"triangle\"/>\n\t\t<add as=\"perimeter\" value=\"trianglePerimeter\"/>\n\t</add>\n\t<add as=\"line\">\n\t\t<add as=\"shape\" value=\"line\"/>\n\t\t<add as=\"strokeWidth\" value=\"4\"/>\n\t\t<add as=\"labelBackgroundColor\" value=\"default\"/>\n\t\t<add as=\"verticalAlign\" value=\"top\"/>\n\t\t<add as=\"spacingTop\" value=\"8\"/>\n\t</add>\n\t<add as=\"image\">\n\t\t<add as=\"shape\" value=\"image\"/>\n\t\t<add as=\"labelBackgroundColor\" value=\"default\"/>\n\t\t<add as=\"verticalAlign\" value=\"top\"/>\n\t\t<add as=\"verticalLabelPosition\" value=\"bottom\"/>\n\t</add>\n\t<add as=\"roundImage\" extend=\"image\">\n\t\t<add as=\"perimeter\" value=\"ellipsePerimeter\"/>\n\t</add>\n\t<add as=\"rhombusImage\" extend=\"image\">\n\t\t<add as=\"perimeter\" value=\"rhombusPerimeter\"/>\n\t</add>\n\t<add as=\"arrow\">\n\t\t<add as=\"shape\" value=\"arrow\"/>\n\t\t<add as=\"edgeStyle\" value=\"none\"/>\n\t\t<add as=\"fillColor\" value=\"default\"/>\n\t</add>\n</mxStylesheet>\n"
  },
  {
    "path": "static/cherry/drawio_demo/dark.css",
    "content": ":root {\n\t--dark-color: #18141D;\n\t--header-color: #363238;\n\t--panel-color: #2A252F;\n\t--text-color: #888888;\n\t--border-color: #505759;\n}\n.geEditor * {\n\tborder-color:#000;\n}\nhtml body .geBackground {\n\tbackground:var(--dark-color);\n}\nhtml body .geStatus > *, html body .geUser {\n\tcolor:var(--text-color);\n}\nhtml body .geDiagramContainer {\n\tbackground-color:var(--dark-color);\n}\nhtml body div.geMenubarContainer, html body .geFormatContainer,\nhtml body div.geMenubarContainer .geStatus:hover {\n\tbackground-color:var(--panel-color);\n\tborder-color:#000000;\n}\nhtml body .geActiveItem {\n\tbackground-color:#e0e0e0;\n}\nhtml body .mxCellEditor {\n\tcolor: #f0f0f0;\n}\nhtml body.geEditor div.mxPopupMenu {\n\tborder:1px solid var(--border-color);\n\tbackground:var(--panel-color);\n\tbox-shadow:none;\n}\n.geEditor .geTabItem {\n\tbackground:var(--panel-color);\n\tborder-color:#000000;\n}\n.geTabContainer {\n\tborder-left-color:#000000;\n\tborder-right-color:#000000;\n}\n.geTabContainer div {\n\tborder-color:var(--dark-color);\n}\nhtml body .geShapePicker {\n\tbox-shadow:none;\n}\nhtml body .geTabContainer div.geActivePage, html body .geRuler {\n\tbackground:var(--dark-color);\n}\n.geSearchSidebar input, .geBtnStepper, .geBtnUp,\nhtml body a.geStatus .geStatusBox {\n\tborder-color: var(--border-color);\n}\nhtml body.geEditor div.mxPopupMenu hr {\n\tbackground-color:var(--border-color);\n}\nhtml body .geDragPreview {\n\tborder: 1px dashed #cccccc;\n}\nhtml body .geMenubarContainer .geItem:active, html .geSidebarContainer button:active {\n\topacity: 0.7;\n}\nhtml body, html body .geFooterContainer, html body #geFooterItem1, html body textarea,\nhtml body .mxWindowTitle, html body .geDialogTitle, html body .geDialogFooter,\nhtml .geEditor div.mxTooltip, html .geHint\n{\n\tbackground: var(--panel-color);\n\tcolor:#c0c0c0;\n}\nhtml > body > div > div.geToolbarContainer.geSimpleMainMenu,\nhtml > body > div > div.geToolbarContainer.geSimpleMainMenu .geToolbarContainer {\n\tbackground:var(--header-color);\n}\nhtml > body > div > div.geToolbarContainer.geSimpleMainMenu,\nhtml body .mxWindowTitle, .geDialogTitle, .geDialogFooter {\n\tborder-color:black !important;\n}\nhtml body .geFooterContainer a, html body .geDiagramContainer a, html body .geStatus a {\n\tcolor:#337ab7;\n}\nhtml body div.mxRubberband {\n\tborder:1px dashed #ffffff !important;\n\tbackground:var(--border-color) !important;\n}\nhtml body .geTemplate {\n\tcolor:#000000;\n}\nhtml body .geSidebar {\n\topacity:0.7;\n}\nhtml body.geEditor .geSidebarContainer div.geDropTarget {\n\tcolor:#767676;\n\tborder-color:#767676;\n}\nhtml body.geEditor .gePrimaryBtn:not([disabled]),\nhtml body.geEditor .geBigButton:not([disabled]) {\n\tbackground:var(--header-color);\n\tborder: 1px solid var(--border-color);\n\tcolor:#aaaaaa;\n}\nhtml body.geEditor .geBtn, html body.geEditor button,\nhtml body.geEditor button:hover:not([disabled]),\nhtml body.geEditor button:focus, html body.geEditor select,\nhtml body.geEditor .geColorBtn {\n\tbackground:none;\n\tborder: 1px solid var(--border-color);\n\tcolor:#aaaaaa;\n}\nhtml body .geBtn:hover:not([disabled]) {\n\tcolor: #c0c0c0;\n}\nhtml body.geEditor button.geAdaptiveAsset:hover:not([disabled]) {\n\tbackground:#fff;\n}\nhtml body.geEditor button.geAdaptiveAsset:not([disabled]) {\n\tborder-color:#a2a2a2;\n}\nhtml body.geEditor button:hover:not([disabled]):not(.geAdaptiveAsset),\nhtml body.geEditor select:hover:not([disabled]),\nhtml body.geEditor .geColorBtn:hover:not([disabled]) {\n\tbackground:var(--dark-color);\n\tborder: 1px solid var(--border-color);\n}\nhtml body.geEditor .geSidebar, html body.geEditor .geSidebarContainer .geTitle, html body.geEditor input, html body.geEditor textarea,\nhtml body.geEditor .geBaseButton, html body.geEditor .geSidebarTooltip, html body.geEditor .geBaseButton, html body.geEditor select,\nhtml body.geEditor .geSidebarContainer .geDropTarget, html body.geEditor .geToolbarContainer {\n\tbackground:var(--panel-color);\n\tborder-color:var(--dark-color);\n\tcolor:#aaaaaa;\n}\nhtml body.geEditor .geSidebar, html body.geEditor .geSidebarContainer .geTitle, html body.geEditor input, html body.geEditor textarea,\nhtml body.geEditor .geBaseButton, html body.geEditor .geSidebarTooltip, html body.geEditor .geBaseButton, html body.geEditor select,\nhtml body.geEditor .geSidebarContainer .geDropTarget {\n\tbox-shadow:none;\n}\nhtml body.geEditor button, html body.geEditor input,\nhtml body.geEditor textarea, html body.geEditor select,\n.geInsertTablePicker, .geInsertTablePicker * {\n\tborder-color:var(--border-color);\n}\nhtml body .geMenubarContainer .geToolbarContainer, html body div.geToolbarContainer, html body .geToolbar {\n\tborder-color:#000000;\n\tbox-shadow:none;\n}\nhtml body .geSketch .geToolbarContainer {\n\tborder-style:none;\n}\nhtml body.geEditor .geColorBtn, html body .geToolbarContainer {\n\tbox-shadow:none;\n}\nhtml body .geSidebarTooltip {\n\tborder:1px solid var(--border-color);\n}\nhtml body .geSprite, html body .geSocialFooter img, html body .mxPopupMenuItem>img, .geAdaptiveAsset {\n\tfilter:invert(100%);\n}\n.geAdaptiveAsset {\n\tcolor: #333333;\n}\n.geInverseAdaptiveAsset {\n\tfilter:none !important\n}\nhtml body .geSidebarFooter {\n\tborder-color:var(--dark-color);\n}\nhtml body .geFormatSection {\n\tborder-bottom:1px solid var(--dark-color);\n\tborder-color:var(--dark-color);\n}\nhtml body .geDiagramContainer {\n\tborder-color:var(--border-color);\n}\nhtml body .geSidebarContainer a, html body .geMenubarContainer a, html body .geToolbar a {\n\tcolor:#cccccc;\n}\nhtml body .geMenubarMenu {\n\tborder-color:var(--border-color) !important;\n}\nhtml body .geToolbarMenu, html body .geFooterContainer, html body .geFooterContainer td {\n\tborder-color:var(--border-color);\n}\nhtml body .geFooterContainer a {\n\tbackground-color:none;\n}\nhtml body .geBigStandardButton {\n\tborder: 1px solid var(--border-color);\n}\nhtml body .geFooterContainer td:hover, html body #geFooterItem1:hover, html body .geBigStandardButton:hover {\n\tbackground-color:#000000;\n}\nhtml body .geSidebarContainer, html body .geDiagramBackdrop {\n\tbackground:var(--panel-color);\n}\nhtml body .geBackgroundPage {\n\tbox-shadow:none;\n}\n.gePropHeader, .gePropRow, .gePropRowDark, .gePropRowCell, .gePropRow>.gePropRowCell, .gePropRowAlt>.gePropRowCell, .gePropRowDark>.gePropRowCell, .gePropRowDarkAlt>.gePropRowCell {\n\tbackground:var(--panel-color) !important;\n\tborder-color:var(--panel-color) !important;\n\tcolor:#cccccc !important;\n\tfont-weight:normal !important;\n}\nhtml body tr.mxPopupMenuItem {\n\tcolor:#cccccc;\n}\nhtml body.geEditor table.mxPopupMenu tr.mxPopupMenuItemHover {\n\tbackground:var(--dark-color);\n\tcolor:#cccccc;\n}\nhtml body .geSidebarContainer .geTitle:hover, html body .geSidebarContainer .geItem:hover,\nhtml body .geMenubarContainer .geItem:hover, html body.geEditor .geBaseButton:hover {\n\tbackground:var(--dark-color);\n}\nhtml body .geToolbarContainer .geSeparator {\n\tbackground-color:var(--border-color);\n}\nhtml body .geVsplit, html body table.mxPopupMenu hr {\n\tborder-color:var(--border-color);\n\tbackground-color:var(--dark-color);\n}\nhtml body .geHsplit {\n\tborder-color:#000;\n}\nhtml body .geHsplit:hover {\n\tbackground-color:#000;\n}\nhtml body .geToolbarContainer .geButton:hover, html body .geToolbarContainer .geButton:active,\nhtml body .geToolbarContainer .geLabel:hover, html body .geToolbarContainer .geLabel:active,\nhtml body .geVsplit:hover, html .geSidebarContainer button:active:not([disabled]) {\n\tbackground-color:var(--dark-color);\n}\nhtml body .geToolbarContainer .geButton.geAdaptiveAsset:hover {\n\tbackground-color: #fff;\n}\nhtml body .geDialog, html body div.mxWindow {\n\tbackground:var(--panel-color);\n\tborder-color:var(--header-color);\n}\nhtml body .geDialog {\n\tbox-shadow:none;\n}\n.geHint {\n\t-webkit-box-shadow: 1px 1px 1px 0px #ccc;\n\t-moz-box-shadow: 1px 1px 1px 0px #ccc;\n\tbox-shadow: 1px 1px 1px 0px #ccc;\n}\nhtml .geEditor ::-webkit-scrollbar-thumb {\n\tbackground-color: var(--header-color);\n}\nhtml .geEditor ::-webkit-scrollbar-thumb:hover, .geVsplit:hover {\n\tbackground-color:#a0a0a0;\n}\nhtml body a.geStatus .geStatusAlertOrange {\n\tbackground-color:rgb(187, 103, 0);\n\tborder:rgb(240, 135, 5);\n}\nhtml body a.geStatus .geStatusAlert {\n\tbackground-color:#a20025;\n\tborder:1px solid #bd002b;\n\tcolor:#fff !important;\n}\nhtml body a.geStatus .geStatusAlert:hover {\n\tbackground-color:#a20025;\n\tborder-color:#bd002b;\n}\nhtml body .geCommentContainer {\n\tbackground-color: transparent;\n\tborder-width: 1px;\n\tbox-shadow: none;\n\tcolor: inherit;\n}\n\nhtml .geNotification-bell * {\n  background-color: #aaa;\n  box-shadow: none;\n}\n\nhtml .geNotification-count {\n  color: #DEEBFF;\n}\n\nhtml .geNotifPanel .header {\n  height: 30px;\n  width: 100%;\n  background: #424242;\n  color: #ccc;\n}\n\n.geNotifPanel .notifications {\n    background-color: #707070;\n}\n"
  },
  {
    "path": "static/cherry/drawio_demo/default-old.xml",
    "content": "<mxStylesheet>\n\t<add as=\"defaultVertex\">\n\t\t<add as=\"shape\" value=\"label\"/>\n\t\t<add as=\"perimeter\" value=\"rectanglePerimeter\"/>\n\t\t<add as=\"fontSize\" value=\"12\"/>\n\t\t<add as=\"fontFamily\" value=\"Verdana\"/>\n\t\t<add as=\"align\" value=\"center\"/>\n\t\t<add as=\"verticalAlign\" value=\"middle\"/>\n\t\t<add as=\"fillColor\" value=\"#adc5ff\"/>\n\t\t<add as=\"gradientColor\" value=\"#7d85df\"/>\n\t\t<add as=\"strokeColor\" value=\"#5d65df\"/>\n\t\t<add as=\"fontColor\" value=\"#1d258f\"/>\n\t</add>\n\t<add as=\"defaultEdge\">\n\t\t<add as=\"shape\" value=\"connector\"/>\n\t\t<add as=\"labelBackgroundColor\" value=\"#FFFFFF\"/>\n\t\t<add as=\"endArrow\" value=\"classic\"/>\n\t\t<add as=\"fontSize\" value=\"11\"/>\n\t\t<add as=\"fontFamily\" value=\"Verdana\"/>\n\t\t<add as=\"align\" value=\"center\"/>\n\t\t<add as=\"verticalAlign\" value=\"middle\"/>\n\t\t<add as=\"labelBackgroundColor\" value=\"#FFFFFF\"/>\n\t\t<add as=\"rounded\" value=\"1\"/>\n\t\t<add as=\"strokeColor\" value=\"#5d65df\"/>\n\t\t<add as=\"fontColor\" value=\"#1d258f\"/>\n\t</add>\n\t<add as=\"text\">\n\t\t<add as=\"fillColor\" value=\"none\"/>\n\t\t<add as=\"gradientColor\" value=\"none\"/>\n\t\t<add as=\"strokeColor\" value=\"none\"/>\n\t\t<add as=\"align\" value=\"left\"/>\n\t\t<add as=\"verticalAlign\" value=\"top\"/>\n\t</add>\n\t<add as=\"label\">\n\t\t<add as=\"fontStyle\" value=\"1\"/>\n\t\t<add as=\"align\" value=\"left\"/>\n\t\t<add as=\"verticalAlign\" value=\"middle\"/>\n\t\t<add as=\"spacing\" value=\"2\"/>\n\t\t<add as=\"spacingLeft\" value=\"50\"/>\n\t\t<add as=\"imageWidth\" value=\"42\"/>\n\t\t<add as=\"imageHeight\" value=\"42\"/>\n\t\t<add as=\"rounded\" value=\"1\"/>\n\t\t<add as=\"shadow\" value=\"1\"/>\n\t\t<add as=\"glass\" value=\"1\"/>\n\t</add>\n\t<add as=\"icon\" extend=\"label\">\n\t\t<add as=\"align\" value=\"center\"/>\n\t\t<add as=\"imageAlign\" value=\"center\"/>\n\t\t<add as=\"verticalLabelPosition\" value=\"bottom\"/>\n\t\t<add as=\"verticalAlign\" value=\"top\"/>\n\t\t<add as=\"spacingTop\" value=\"4\"/>\n\t\t<add as=\"labelBackgroundColor\" value=\"#FFFFFF\"/>\n\t\t<add as=\"spacing\" value=\"0\"/>\n\t\t<add as=\"spacingLeft\" value=\"0\"/>\n\t\t<add as=\"spacingTop\" value=\"6\"/>\n\t\t<add as=\"fontStyle\" value=\"0\"/>\n\t\t<add as=\"imageWidth\" value=\"48\"/>\n\t\t<add as=\"imageHeight\" value=\"48\"/>\n\t</add>\n\t<add as=\"swimlane\">\n\t\t<add as=\"shape\" value=\"swimlane\"/>\n\t\t<add as=\"fontSize\" value=\"12\"/>\n\t\t<add as=\"fontStyle\" value=\"1\"/>\n\t\t<add as=\"startSize\" value=\"23\"/>\n\t</add>\n\t<add as=\"group\">\n\t\t<add as=\"verticalAlign\" value=\"top\"/>\n\t\t<add as=\"fillColor\" value=\"none\"/>\n\t\t<add as=\"strokeColor\" value=\"none\"/>\n\t\t<add as=\"gradientColor\" value=\"none\"/>\n\t</add>\n\t<add as=\"ellipse\">\n\t\t<add as=\"shape\" value=\"ellipse\"/>\n\t\t<add as=\"perimeter\" value=\"ellipsePerimeter\"/>\n\t</add>\n\t<add as=\"rhombus\">\n\t\t<add as=\"shape\" value=\"rhombus\"/>\n\t\t<add as=\"perimeter\" value=\"rhombusPerimeter\"/>\n\t</add>\n\t<add as=\"triangle\">\n\t\t<add as=\"shape\" value=\"triangle\"/>\n\t\t<add as=\"perimeter\" value=\"trianglePerimeter\"/>\n\t</add>\n\t<add as=\"line\">\n\t\t<add as=\"shape\" value=\"line\"/>\n\t\t<add as=\"strokeWidth\" value=\"4\"/>\n\t\t<add as=\"labelBackgroundColor\" value=\"#FFFFFF\"/>\n\t\t<add as=\"verticalAlign\" value=\"top\"/>\n\t\t<add as=\"spacingTop\" value=\"8\"/>\n\t</add>\n\t<add as=\"image\">\n\t\t<add as=\"shape\" value=\"image\"/>\n\t\t<add as=\"labelBackgroundColor\" value=\"white\"/>\n\t\t<add as=\"verticalAlign\" value=\"top\"/>\n\t\t<add as=\"verticalLabelPosition\" value=\"bottom\"/>\n\t</add>\n\t<add as=\"roundImage\" extend=\"image\">\n\t\t<add as=\"perimeter\" value=\"ellipsePerimeter\"/>\n\t</add>\n\t<add as=\"rhombusImage\" extend=\"image\">\n\t\t<add as=\"perimeter\" value=\"rhombusPerimeter\"/>\n\t</add>\n\t<add as=\"arrow\">\n\t\t<add as=\"shape\" value=\"arrow\"/>\n\t\t<add as=\"edgeStyle\" value=\"none\"/>\n\t\t<add as=\"fillColor\" value=\"#adc5ff\"/>\n\t\t<add as=\"gradientColor\" value=\"#7d85df\"/>\n\t</add>\n</mxStylesheet>\n"
  },
  {
    "path": "static/cherry/drawio_demo/default.xml",
    "content": "<mxStylesheet>\n\t<add as=\"defaultVertex\">\n\t\t<add as=\"shape\" value=\"label\"/>\n\t\t<add as=\"perimeter\" value=\"rectanglePerimeter\"/>\n\t\t<add as=\"fontSize\" value=\"12\"/>\n\t\t<add as=\"fontFamily\" value=\"Helvetica\"/>\n\t\t<add as=\"align\" value=\"center\"/>\n\t\t<add as=\"verticalAlign\" value=\"middle\"/>\n\t\t<add as=\"fillColor\" value=\"default\"/>\n\t\t<add as=\"strokeColor\" value=\"default\"/>\n\t\t<add as=\"fontColor\" value=\"default\"/>\n\t</add>\n\t<add as=\"defaultEdge\">\n\t\t<add as=\"shape\" value=\"connector\"/>\n\t\t<add as=\"labelBackgroundColor\" value=\"default\"/>\n\t\t<add as=\"endArrow\" value=\"classic\"/>\n\t\t<add as=\"fontSize\" value=\"11\"/>\n\t\t<add as=\"fontFamily\" value=\"Helvetica\"/>\n\t\t<add as=\"align\" value=\"center\"/>\n\t\t<add as=\"verticalAlign\" value=\"middle\"/>\n\t\t<add as=\"rounded\" value=\"1\"/>\n\t\t<add as=\"strokeColor\" value=\"default\"/>\n\t\t<add as=\"fontColor\" value=\"default\"/>\n\t</add>\n\t<add as=\"text\">\n\t\t<add as=\"fillColor\" value=\"none\"/>\n\t\t<add as=\"gradientColor\" value=\"none\"/>\n\t\t<add as=\"strokeColor\" value=\"none\"/>\n\t\t<add as=\"align\" value=\"left\"/>\n\t\t<add as=\"verticalAlign\" value=\"top\"/>\n\t</add>\n\t<add as=\"edgeLabel\" extend=\"text\">\n\t\t<add as=\"labelBackgroundColor\" value=\"default\"/>\n\t\t<add as=\"fontSize\" value=\"11\"/>\n\t</add>\n\t<add as=\"label\">\n\t\t<add as=\"fontStyle\" value=\"1\"/>\n\t\t<add as=\"align\" value=\"left\"/>\n\t\t<add as=\"verticalAlign\" value=\"middle\"/>\n\t\t<add as=\"spacing\" value=\"2\"/>\n\t\t<add as=\"spacingLeft\" value=\"52\"/>\n\t\t<add as=\"imageWidth\" value=\"42\"/>\n\t\t<add as=\"imageHeight\" value=\"42\"/>\n\t\t<add as=\"rounded\" value=\"1\"/>\n\t</add>\n\t<add as=\"icon\" extend=\"label\">\n\t\t<add as=\"align\" value=\"center\"/>\n\t\t<add as=\"imageAlign\" value=\"center\"/>\n\t\t<add as=\"verticalLabelPosition\" value=\"bottom\"/>\n\t\t<add as=\"verticalAlign\" value=\"top\"/>\n\t\t<add as=\"spacingTop\" value=\"4\"/>\n\t\t<add as=\"labelBackgroundColor\" value=\"default\"/>\n\t\t<add as=\"spacing\" value=\"0\"/>\n\t\t<add as=\"spacingLeft\" value=\"0\"/>\n\t\t<add as=\"spacingTop\" value=\"6\"/>\n\t\t<add as=\"fontStyle\" value=\"0\"/>\n\t\t<add as=\"imageWidth\" value=\"48\"/>\n\t\t<add as=\"imageHeight\" value=\"48\"/>\n\t</add>\n\t<add as=\"swimlane\">\n\t\t<add as=\"shape\" value=\"swimlane\"/>\n\t\t<add as=\"fontSize\" value=\"12\"/>\n\t\t<add as=\"fontStyle\" value=\"1\"/>\n\t\t<add as=\"startSize\" value=\"23\"/>\n\t</add>\n\t<add as=\"group\">\n\t\t<add as=\"verticalAlign\" value=\"top\"/>\n\t\t<add as=\"fillColor\" value=\"none\"/>\n\t\t<add as=\"strokeColor\" value=\"none\"/>\n\t\t<add as=\"gradientColor\" value=\"none\"/>\n\t\t<add as=\"pointerEvents\" value=\"0\"/>\n\t</add>\n\t<add as=\"ellipse\">\n\t\t<add as=\"shape\" value=\"ellipse\"/>\n\t\t<add as=\"perimeter\" value=\"ellipsePerimeter\"/>\n\t</add>\n\t<add as=\"rhombus\">\n\t\t<add as=\"shape\" value=\"rhombus\"/>\n\t\t<add as=\"perimeter\" value=\"rhombusPerimeter\"/>\n\t</add>\n\t<add as=\"triangle\">\n\t\t<add as=\"shape\" value=\"triangle\"/>\n\t\t<add as=\"perimeter\" value=\"trianglePerimeter\"/>\n\t</add>\n\t<add as=\"line\">\n\t\t<add as=\"shape\" value=\"line\"/>\n\t\t<add as=\"strokeWidth\" value=\"4\"/>\n\t\t<add as=\"labelBackgroundColor\" value=\"default\"/>\n\t\t<add as=\"verticalAlign\" value=\"top\"/>\n\t\t<add as=\"spacingTop\" value=\"8\"/>\n\t</add>\n\t<add as=\"image\">\n\t\t<add as=\"shape\" value=\"image\"/>\n\t\t<add as=\"labelBackgroundColor\" value=\"default\"/>\n\t\t<add as=\"verticalAlign\" value=\"top\"/>\n\t\t<add as=\"verticalLabelPosition\" value=\"bottom\"/>\n\t</add>\n\t<add as=\"roundImage\" extend=\"image\">\n\t\t<add as=\"perimeter\" value=\"ellipsePerimeter\"/>\n\t</add>\n\t<add as=\"rhombusImage\" extend=\"image\">\n\t\t<add as=\"perimeter\" value=\"rhombusPerimeter\"/>\n\t</add>\n\t<add as=\"arrow\">\n\t\t<add as=\"shape\" value=\"arrow\"/>\n\t\t<add as=\"edgeStyle\" value=\"none\"/>\n\t\t<add as=\"fillColor\" value=\"default\"/>\n\t</add>\n\t<add as=\"fancy\">\n\t\t<add as=\"shadow\" value=\"1\"/>\n\t\t<add as=\"glass\" value=\"1\"/>\n\t</add>\n\t<add as=\"gray\" extend=\"fancy\">\n\t\t<add as=\"gradientColor\" value=\"#B3B3B3\"/>\n\t\t<add as=\"fillColor\" value=\"#F5F5F5\"/>\n\t\t<add as=\"strokeColor\" value=\"#666666\"/>\n\t</add>\n\t<add as=\"blue\" extend=\"fancy\">\n\t\t<add as=\"gradientColor\" value=\"#7EA6E0\"/>\n\t\t<add as=\"fillColor\" value=\"#DAE8FC\"/>\n\t\t<add as=\"strokeColor\" value=\"#6C8EBF\"/>\n\t</add>\n\t<add as=\"green\" extend=\"fancy\">\n\t\t<add as=\"gradientColor\" value=\"#97D077\"/>\n\t\t<add as=\"fillColor\" value=\"#D5E8D4\"/>\n\t\t<add as=\"strokeColor\" value=\"#82B366\"/>\n\t</add>\n\t<add as=\"turquoise\" extend=\"fancy\">\n\t\t<add as=\"gradientColor\" value=\"#67AB9F\"/>\n\t\t<add as=\"fillColor\" value=\"#D5E8D4\"/>\n\t\t<add as=\"strokeColor\" value=\"#6A9153\"/>\n\t</add>\n\t<add as=\"yellow\" extend=\"fancy\">\n\t\t<add as=\"gradientColor\" value=\"#FFD966\"/>\n\t\t<add as=\"fillColor\" value=\"#FFF2CC\"/>\n\t\t<add as=\"strokeColor\" value=\"#D6B656\"/>\n\t</add>\n\t<add as=\"orange\" extend=\"fancy\">\n\t\t<add as=\"gradientColor\" value=\"#FFA500\"/>\n\t\t<add as=\"fillColor\" value=\"#FFCD28\"/>\n\t\t<add as=\"strokeColor\" value=\"#D79B00\"/>\n\t</add>\n\t<add as=\"red\" extend=\"fancy\">\n\t\t<add as=\"gradientColor\" value=\"#EA6B66\"/>\n\t\t<add as=\"fillColor\" value=\"#F8CECC\"/>\n\t\t<add as=\"strokeColor\" value=\"#B85450\"/>\n\t</add>\n\t<add as=\"pink\" extend=\"fancy\">\n\t\t<add as=\"gradientColor\" value=\"#B5739D\"/>\n\t\t<add as=\"fillColor\" value=\"#E6D0DE\"/>\n\t\t<add as=\"strokeColor\" value=\"#996185\"/>\n\t</add>\n\t<add as=\"purple\" extend=\"fancy\">\n\t\t<add as=\"gradientColor\" value=\"#8C6C9C\"/>\n\t\t<add as=\"fillColor\" value=\"#E1D5E7\"/>\n\t\t<add as=\"strokeColor\" value=\"#9673A6\"/>\n\t</add>\n\t<add as=\"plain-gray\">\n\t\t<add as=\"gradientColor\" value=\"#B3B3B3\"/>\n\t\t<add as=\"fillColor\" value=\"#F5F5F5\"/>\n\t\t<add as=\"strokeColor\" value=\"#666666\"/>\n\t</add>\n\t<add as=\"plain-blue\">\n\t\t<add as=\"gradientColor\" value=\"#7EA6E0\"/>\n\t\t<add as=\"fillColor\" value=\"#DAE8FC\"/>\n\t\t<add as=\"strokeColor\" value=\"#6C8EBF\"/>\n\t</add>\n\t<add as=\"plain-green\">\n\t\t<add as=\"gradientColor\" value=\"#97D077\"/>\n\t\t<add as=\"fillColor\" value=\"#D5E8D4\"/>\n\t\t<add as=\"strokeColor\" value=\"#82B366\"/>\n\t</add>\n\t<add as=\"plain-turquoise\">\n\t\t<add as=\"gradientColor\" value=\"#67AB9F\"/>\n\t\t<add as=\"fillColor\" value=\"#D5E8D4\"/>\n\t\t<add as=\"strokeColor\" value=\"#6A9153\"/>\n\t</add>\n\t<add as=\"plain-yellow\">\n\t\t<add as=\"gradientColor\" value=\"#FFD966\"/>\n\t\t<add as=\"fillColor\" value=\"#FFF2CC\"/>\n\t\t<add as=\"strokeColor\" value=\"#D6B656\"/>\n\t</add>\n\t<add as=\"plain-orange\">\n\t\t<add as=\"gradientColor\" value=\"#FFA500\"/>\n\t\t<add as=\"fillColor\" value=\"#FFCD28\"/>\n\t\t<add as=\"strokeColor\" value=\"#D79B00\"/>\n\t</add>\n\t<add as=\"plain-red\">\n\t\t<add as=\"gradientColor\" value=\"#EA6B66\"/>\n\t\t<add as=\"fillColor\" value=\"#F8CECC\"/>\n\t\t<add as=\"strokeColor\" value=\"#B85450\"/>\n\t</add>\n\t<add as=\"plain-pink\">\n\t\t<add as=\"gradientColor\" value=\"#B5739D\"/>\n\t\t<add as=\"fillColor\" value=\"#E6D0DE\"/>\n\t\t<add as=\"strokeColor\" value=\"#996185\"/>\n\t</add>\n\t<add as=\"plain-purple\">\n\t\t<add as=\"gradientColor\" value=\"#8C6C9C\"/>\n\t\t<add as=\"fillColor\" value=\"#E1D5E7\"/>\n\t\t<add as=\"strokeColor\" value=\"#9673A6\"/>\n\t</add>\n</mxStylesheet>\n"
  },
  {
    "path": "static/cherry/drawio_demo/drawio-demo.js",
    "content": "// Extends EditorUi to update I/O action states based on availability of backend\n(function()\n{\n\tvar editorUiInit = EditorUi.prototype.init;\n\t\n\tEditorUi.prototype.init = function()\n\t{\n\t\teditorUiInit.apply(this, arguments);\n\t};\n\t\n\t// Adds required resources (disables loading of fallback properties, this can only\n\t// be used if we know that all keys are defined in the language specific file)\n\tmxResources.loadDefaultBundle = false;\n\tvar bundle = mxResources.getDefaultBundle(mxLanguage);\n\t\n\t// Fixes possible asynchronous requests\n\tmxUtils.getAll([bundle, './drawio_demo/theme/default.xml'], function(xhr)\n\t{\n\t\t// Adds bundle text to resources\n\t\tmxResources.parse(xhr[0].getText());\n\t\t\n\t\t// Configures the default graph theme\n\t\tvar themes = new Object();\n\t\tthemes[Graph.prototype.defaultThemeName] = xhr[1].getDocumentElement(); \n\t\t\n\t\t// Main\n    window.editorUIInstance = new EditorUi(new Editor(false, themes));\n    \n    try {\n      addPostMessageListener(editorUIInstance.editor);\n    } catch (error) {\n      console.log(error);\n    }\n    window.parent.postMessage({eventName: 'ready', value: ''}, '*');\n\n\t}, function()\n\t{\n\t\tdocument.body.innerHTML = '<center style=\"margin-top:10%;\">Error loading resource files. Please check browser console.</center>';\n\t});\n})();\n\nfunction addPostMessageListener(graphEditor) {\n  window.addEventListener('message', function(event) {\n    if(!event.data || !event.data.eventName) {\n        return \n    }\n    switch (event.data.eventName) {\n      case 'setData':\n        var value = event.data.value;\n        var doc = mxUtils.parseXml(value);\n        var documentName = 'cherry-drawio-' + new Date().getTime();\n        editorUIInstance.editor.setGraphXml(null);\n        graphEditor.graph.importGraphModel(doc.documentElement);\n        graphEditor.setFilename(documentName);\n        window.parent.postMessage({eventName: 'setData:success', value: ''}, '*');\n        break;\n      case 'getData':\n        editorUIInstance.editor.graph.stopEditing();\n        var xmlData = mxUtils.getXml(editorUIInstance.editor.getGraphXml());\n        editorUIInstance.exportImage(1, \"#ffffff\", true, null, true, 50, null, \"png\", function(base64, filename){\n          window.parent.postMessage({\n            mceAction: 'getData:success',\n            eventName: 'getData:success',\n            value: {\n              xmlData: xmlData,\n              base64: base64,\n            }\n          }, '*');\n        })\n        break;\n      case 'ready?':\n        window.parent.postMessage({eventName: 'ready', value: ''}, '*');\n        break;\n      default:\n        break;\n    }\n  }); \n}\n"
  },
  {
    "path": "static/cherry/drawio_demo/font/graph.iconfont.less",
    "content": "/* \n  _____   ____  ____   ____ _______ \n |  __ \\ / __ \\|  _ \\ / __ \\__   __|\n | |__) | |  | | |_) | |  | | | |   \n |  _  /| |  | |  _ <| |  | | | |   \n | | \\ \\| |__| | |_) | |__| | | |   \n |_|  \\_\\\\____/|____/ \\____/  |_|   \n \n  */\n@font-face {\n  font-family: \"graph.iconfont\";\n  src: url('@{iconfont-path}iconfont/graph.iconfont.eot');\n  src: url('@{iconfont-path}iconfont/graph.iconfont.eot?#iefix') format('eot'),\n    url('@{iconfont-path}iconfont/graph.iconfont.woff') format('woff'),\n    url('@{iconfont-path}iconfont/graph.iconfont.ttf') format('truetype');\n  font-weight: normal;\n  font-style: normal;\n}\n\n.font-graph {\n  vertical-align: middle;\n}\n\n.font-graph:after {\n  display: inline-block;\n  font-family: \"graph.iconfont\";\n  font-style: normal;\n  font-weight: normal;\n  line-height: 1;\n  -webkit-font-smoothing: antialiased;\n  -moz-osx-font-smoothing: grayscale;\n}\n\n.font-graph-lg {\n  font-size: 1.3333333333333333em;\n  line-height: 0.75em;\n  vertical-align: -15%;\n}\n.font-graph-2x { font-size: 2em; }\n.font-graph-3x { font-size: 3em; }\n.font-graph-4x { font-size: 4em; }\n.font-graph-5x { font-size: 5em; }\n.font-graph-fw {\n  width: 1.2857142857142858em;\n  text-align: center;\n}\n\n.font-graph-geSprite-arrow:after { content: \"\\EA01\" }\n.font-graph-geSprite-bold:after { content: \"\\EA02\" }\n.font-graph-geSprite-bottom:after { content: \"\\EA03\" }\n.font-graph-geSprite-center:after { content: \"\\EA04\" }\n.font-graph-geSprite-code:after { content: \"\\EA05\" }\n.font-graph-geSprite-connection:after { content: \"\\EA06\" }\n.font-graph-geSprite-curved:after { content: \"\\EA07\" }\n.font-graph-geSprite-delete:after { content: \"\\EA08\" }\n.font-graph-geSprite-dots:after { content: \"\\EA09\" }\n.font-graph-geSprite-entity:after { content: \"\\EA0A\" }\n.font-graph-geSprite-fit:after { content: \"\\EA0B\" }\n.font-graph-geSprite-fontbackground:after { content: \"\\EA0C\" }\n.font-graph-geSprite-fontcolor:after { content: \"\\EA0D\" }\n.font-graph-geSprite-formatpanel:after { content: \"\\EA0E\" }\n.font-graph-geSprite-horizontalelbow:after { content: \"\\EA0F\" }\n.font-graph-geSprite-horizontalisometric:after { content: \"\\EA10\" }\n.font-graph-geSprite-horizontalrule:after { content: \"\\EA11\" }\n.font-graph-geSprite-indent:after { content: \"\\EA12\" }\n.font-graph-geSprite-italic:after { content: \"\\EA13\" }\n.font-graph-geSprite-justifyfull:after { content: \"\\EA14\" }\n.font-graph-geSprite-left:after { content: \"\\EA15\" }\n.font-graph-geSprite-link:after { content: \"\\EA16\" }\n.font-graph-geSprite-linkedge:after { content: \"\\EA17\" }\n.font-graph-geSprite-middle:after { content: \"\\EA18\" }\n.font-graph-geSprite-orderedlist:after { content: \"\\EA19\" }\n.font-graph-geSprite-orthogonal:after { content: \"\\EA1A\" }\n.font-graph-geSprite-outdent:after { content: \"\\EA1B\" }\n.font-graph-geSprite-plus:after { content: \"\\EA1C\" }\n.font-graph-geSprite-redo:after { content: \"\\EA1D\" }\n.font-graph-geSprite-removeformat:after { content: \"\\EA1E\" }\n.font-graph-geSprite-right:after { content: \"\\EA1F\" }\n.font-graph-geSprite-shadow:after { content: \"\\EA20\" }\n.font-graph-geSprite-simplearrow:after { content: \"\\EA21\" }\n.font-graph-geSprite-straight:after { content: \"\\EA22\" }\n.font-graph-geSprite-strokecolor:after { content: \"\\EA23\" }\n.font-graph-geSprite-subscript:after { content: \"\\EA24\" }\n.font-graph-geSprite-superscript:after { content: \"\\EA25\" }\n.font-graph-geSprite-table:after { content: \"\\EA26\" }\n.font-graph-geSprite-toback:after { content: \"\\EA27\" }\n.font-graph-geSprite-tofront:after { content: \"\\EA28\" }\n.font-graph-geSprite-top:after { content: \"\\EA29\" }\n.font-graph-geSprite-underline:after { content: \"\\EA2A\" }\n.font-graph-geSprite-undo:after { content: \"\\EA2B\" }\n.font-graph-geSprite-unorderedlist:after { content: \"\\EA2C\" }\n.font-graph-geSprite-vertical:after { content: \"\\EA2D\" }\n.font-graph-geSprite-verticalelbow:after { content: \"\\EA2E\" }\n.font-graph-geSprite-verticalisometric:after { content: \"\\EA2F\" }\n.font-graph-geSprite-zoomin:after { content: \"\\EA30\" }\n.font-graph-geSprite-zoomout:after { content: \"\\EA31\" }\n.font-graph-geSprite-zz-填充色_icon:after { content: \"\\EA32\" }\n.font-graph-geSprite-zz-复选框:after { content: \"\\EA33\" }\n.font-graph-geSprite-zz-查看画图2:after { content: \"\\EA34\" }\n.font-graph-geSprite-zz-线条颜色_icon:after { content: \"\\EA35\" }\r"
  },
  {
    "path": "static/cherry/drawio_demo/grapheditor.css",
    "content": ":root {\n\t--panel-color: #f1f3f4;\n\t--border-color: #dadce0;\n\t--text-color: #707070;\n}\n.geEditor *, div.mxWindow, .mxWindowTitle,\n.geEditor .geToolbarContainer .geColorButton {\n\tborder-color:var(--border-color);\n}\nhtml div.mxWindow, .geDialog, .geSketch .geToolbarContainer {\n\tborder-radius: 5px;\n\tbox-shadow: 0px 0px 2px #C0C0C0;\n}\ndiv td.mxWindowTitle {\n\tborder-bottom-style:solid;\n\tborder-bottom-width:1px;\n\tfont-size: 13px;\n\theight: 22px;\n}\n.mxWindowTitle > div > img {\n\tpadding: 4px;\n}\n.geEditor {\n\tfont-family:-apple-system, BlinkMacSystemFont, \"Segoe UI Variable\", \"Segoe UI\", system-ui, ui-sans-serif, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\";\n\tfont-size:14px;\n\tborder:none;\n\tmargin:0px;\n}\n.geBackground {\n\tbackground:white;\n}\n.geEditor input[type=text]::-ms-clear {\n\tdisplay: none;\n}\n.geEditor input, .geEditor select,\n.geEditor textarea, .geEditor button {\n    font-size: inherit;\n}\n.geMenubarContainer, .geToolbarContainer, .geHsplit,\n.geVsplit, .mxWindowTitle, .geSidebarContainer,\n.geEditor .geTabItem {\n\tbackground:var(--panel-color);\n}\n.geButtonContainer {\n\tdisplay: inline-flex;\n\talign-items: center;\n\tpadding: 0 32px 0 0;\n\tmargin-left: auto;\n}\n.geEditor .geTabItem {\n\tborder-width:1px;\n\tborder-top-style:solid;\n}\n.geEditor .geTabItem {\n\tcursor:default;\n\tuser-select:none;\n}\n.geEditor div.mxTooltip {\n\tbackground: var(--panel-color);\n\tfont-size: 11px;\n\tcolor: black;\n\tpadding:6px;\n}\n.geDragPreview {\n\tborder: 1px dashed black;\n}\nhtml > body > div > div.geToolbarContainer.geSimpleMainMenu,\nhtml > body > div > div.geToolbarContainer.geSimpleMainMenu .geToolbarContainer{\n\tborder-top: none !important;\n\tborder-left: none !important;\n\tborder-right: none !important;\n}\nhtml > body > div > div.geToolbarContainer.geSimpleMainMenu .geToolbarContainer{\n\tborder:none !important;\n}\n.geMenubarContainer {\n\tdisplay:inline-flex;\n\talign-items:center;\n}\n.geMenubarContainer .geItem, .geToolbar .geButton, .geToolbar .geLabel {\n\tcursor:pointer !important;\n}\n.geSidebarContainer .geTitle {\n\tcursor:default !important;\n}\n.geBackgroundPage {\n  \tbox-shadow:0px 0px 2px 1px #d1d1d1;\n}\n.geSidebarContainer a, .geMenubarContainer a, .geToolbar a {\n\tcolor:#000000;\n\ttext-decoration:none;\n}\n.geMenubarContainer, .geToolbarContainer, .geDiagramContainer, .geSidebarContainer, .geFooterContainer, .geHsplit, .geVsplit {\n\toverflow:hidden;\n\tposition:absolute;\n\tcursor:default;\n}\n.geFormatContainer {\n\toverflow-x:hidden !important;\n\toverflow-y:auto !important;\n\tfont-size:12px;\n\tborder-left:1px solid #dadce0;\n\ttransition:width 0.3s;\n}\n.geFormatContainer button:not(.geColorBtn), .geFormatContainer select {\n\tborder-radius:4px;\n\tpadding:2px;\n}\n.geSidebarFooter {\n\tborder-top:1px solid #dadce0;\n}\n.geFormatSection {\n\tborder-bottom:1px solid #dadce0;\n\tborder-color:#dadce0;\n}\n.geDiagramContainer {\n\tbackground-color:#ffffff;\n\tfont-size:0px;\n\toutline:none;\n}\n.geMenubar, .geToolbar {\n\twhite-space:nowrap;\n\tdisplay:block;\n\twidth:100%;\n}\n.geMenubarContainer .geItem, .geToolbar .geButton, .geToolbar .geLabel,\n.geSidebar, .geSidebar .geItem, .mxPopupMenuItem {\n\t-webkit-transition: all 0.1s ease-in-out;\n\t-moz-transition: all 0.1s ease-in-out;\n\t-o-transition: all 0.1s ease-in-out;\n\t-ms-transition: all 0.1s ease-in-out;\n\ttransition: all 0.1s ease-in-out;\n}\n.geHint {\n\tbackground-color: #ffffff;\n\tborder: 1px solid gray;\n\tpadding: 4px 16px 4px 16px;\n\tborder-radius:3px;\n\t-webkit-box-shadow: 1px 1px 2px 0px #ddd;\n\t-moz-box-shadow: 1px 1px 2px 0px #ddd;\n\tbox-shadow: 1px 1px 2px 0px #ddd;\n\topacity:0.8;\n\tfont-size:9pt;\n}\n.geHint img {\n\topacity: 0.7;\n}\n.geHint img:hover\n{\n\topacity: 1;\n}\n.geUser {\n\tcolor:var(--text-color);\n\tdisplay:inline-block;\n\tcursor:pointer;\n\tfont-size:10px;\n}\n.geStatus > * {\n\toverflow:hidden;\n\twhite-space:nowrap;\n\tvertical-align:middle;\n\tdisplay:inline-block;\n\tfont-size:12px;\n\tcolor:var(--text-color);\n}\na.geStatus {\n\tdisplay:inline-flex;\n\talign-items:center;\n\twhite-space:nowrap;\n\tmin-width:0;\n\theight:100%;\n}\n.geStatus *[data-action] {\n\tcursor:pointer;\n}\n.geStatus img {\n\tmax-width:16px;\n\tvertical-align:bottom;\n}\na.geStatus div + div {\n\tmargin-left:8px;\n}\na.geStatus .geStatusBox {\n\tborder-style: solid;\n\tborder-width: 1px;\n\tborder-radius: 3px;\n\tfont-size: 10px;\n\tpadding: 3px;\n}\na.geStatus .geStatusAlert {\n\tpadding:4px 8px;\n\tbackground-color:#eacccc;\n\tborder:1px solid #dca4ad;\n\tcolor:#b62623 !important;\n\tborder-radius:3px;\n}\na.geStatus .geStatusAlertOrange {\n\tpadding:4px 8px;\n\tbackground-color:rgb(242, 147, 30);\n\tborder:rgb(240, 135, 5);\n\tcolor:#000000 !important;\n\tborder-radius:3px;\n}\nhtml body div.geSmallBanner {\n\tbackground-color: #F2931E;\n\tbackground-image: linear-gradient(#F2931E 0px,#F08707 100%);\n\tborder: 1px solid #F08707;\n\tcolor: #000;\n}\nhtml body div.geSmallBanner:hover:not([disabled]) {\n\tbackground-color: #ffb75e;\n\tbackground-image: linear-gradient(#ffb75e 0px,#F2931E 100%);\n\tborder: 1px solid #F08707;\n\tcolor: #000;\n}\na.geStatus .geStatusMessage {\n\tpadding:4px 6px 4px 6px;\n\tfont-size:12px;\n\tbackground: -webkit-linear-gradient(top,#dff0d8 0,#c8e5bc 100%);\n    background: -o-linear-gradient(top,#dff0d8 0,#c8e5bc 100%);\n    background: -webkit-gradient(linear,left top,left bottom,from(#dff0d8),to(#c8e5bc));\n    background: linear-gradient(to bottom,#dff0d8 0,#c8e5bc 100%);\n    background-repeat: repeat-x;\n    border:1px solid #b2dba1;\n\tborder-radius:3px;\n\tcolor:#3c763d !important;\n}\n.geAlert {\n\tposition:absolute;\n\twhite-space:nowrap;\n\tpadding:14px;\n\tbackground-color:#f2dede;\n\tborder:1px solid #ebccd1;\n\tcolor:#a94442;\n\tborder-radius:3px;\n\t-webkit-box-shadow: 2px 2px 3px 0px #ddd;\n\t-moz-box-shadow: 2px 2px 3px 0px #ddd;\n\tbox-shadow: 2px 2px 3px 0px #ddd;\n}\n.geEditor input, .geEditor button, .geEditor select, .geColorBtn {\n\tborder: 1px solid #d8d8d8;\n\tborder-radius: 4px;\n}\n.geEditor button, .geEditor select, .geColorBtn {\n\tbackground:#eee;\n}\n.geEditor button:hover:not([disabled], .geBigButton, .geShareBtn),\n.geEditor select:hover:not([disabled]), .geColorBtn:hover:not([disabled]) {\n\tbackground:#e5e5e5;\n}\n.geColorDropper {\n\tcursor:pointer;\n\topacity:0.7;\n}\n.geColorDropper:hover {\n\topacity:1;\n}\n.geBtn, .mxWindow .geBtn {\n\tfont-size: 13px;\n\tfont-weight: 500;\n\tborder-radius: 4px;\n\theight: 30px;\n\tmargin: 0 0 0 8px;\n\tmin-width: 72px;\n\toutline: 0;\n\tpadding: 0 8px;\n}\n.geBtn:hover:not([disabled]), .geBtn:focus {\n\t-webkit-box-shadow: 0px 1px 1px rgba(0,0,0,0.1);\n\t-moz-box-shadow: 0px 1px 1px rgba(0,0,0,0.1);\n\tbox-shadow: 0px 1px 1px rgba(0,0,0,0.1);\n\tcolor: #111;\n}\n.geToolbarContainer {\n\tborder-width:1px;\n\tborder-color:lightgray;\n\tborder-style:none none solid none;\n\tbox-shadow:none;\n\tz-index:1;\n}\n.geShapePicker {\n\tposition:absolute;\n\tborder-radius:10px;\n\tborder-style:solid;\n\tborder-width:1px;\n\tpadding:6px 0 8px 0;\n\ttext-align:center;\n\tbox-shadow:0px 0px 3px 1px #d1d1d1;\n}\n.geBtnStepper {\n\tborder-radius:3px;\n\tborder-style:solid;\n\tborder-width:1px;\n}\n.geBtnUp {\n\tbackground-image: url(data:image/gif;base64,R0lGODlhCgAGAJECAGZmZtXV1f///wAAACH/C1hNUCBEYXRhWE1QPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS4wLWMwNjAgNjEuMTM0Nzc3LCAyMDEwLzAyLzEyLTE3OjMyOjAwICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOnhtcE1NPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvbW0vIiB4bWxuczpzdFJlZj0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL3NUeXBlL1Jlc291cmNlUmVmIyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1IE1hY2ludG9zaCIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDo0QzM3ODJERjg4NUQxMUU0OTFEQ0E2MzRGQzcwNUY3NCIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDo0QzM3ODJFMDg4NUQxMUU0OTFEQ0E2MzRGQzcwNUY3NCI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOjRDMzc4MkREODg1RDExRTQ5MURDQTYzNEZDNzA1Rjc0IiBzdFJlZjpkb2N1bWVudElEPSJ4bXAuZGlkOjRDMzc4MkRFODg1RDExRTQ5MURDQTYzNEZDNzA1Rjc0Ii8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+Af/+/fz7+vn49/b19PPy8fDv7u3s6+rp6Ofm5eTj4uHg397d3Nva2djX1tXU09LR0M/OzczLysnIx8bFxMPCwcC/vr28u7q5uLe2tbSzsrGwr66trKuqqainpqWko6KhoJ+enZybmpmYl5aVlJOSkZCPjo2Mi4qJiIeGhYSDgoGAf359fHt6eXh3dnV0c3JxcG9ubWxramloZ2ZlZGNiYWBfXl1cW1pZWFdWVVRTUlFQT05NTEtKSUhHRkVEQ0JBQD8+PTw7Ojk4NzY1NDMyMTAvLi0sKyopKCcmJSQjIiEgHx4dHBsaGRgXFhUUExIREA8ODQwLCgkIBwYFBAMCAQAAIfkEAQAAAgAsAAAAAAoABgAAAg6UjwiQBhGYglCKhXFLBQA7);\n\tbackground-position: center center;\n\tbackground-repeat: no-repeat;\n\tborder-bottom-style:solid;\n\tborder-width:1px;\n}\n.geBtnUp:active {\n\tbackground-color: #4d90fe;\n\tbackground-image: linear-gradient(#4d90fe 0px,#357ae8 100%);\n}\n.geBtnDown {\n\tbackground-image: url(data:image/gif;base64,R0lGODlhCgAGAJECANXV1WZmZv///wAAACH/C1hNUCBEYXRhWE1QPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS4wLWMwNjAgNjEuMTM0Nzc3LCAyMDEwLzAyLzEyLTE3OjMyOjAwICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOnhtcE1NPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvbW0vIiB4bWxuczpzdFJlZj0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL3NUeXBlL1Jlc291cmNlUmVmIyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1IE1hY2ludG9zaCIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDo0QzM3ODJEQjg4NUQxMUU0OTFEQ0E2MzRGQzcwNUY3NCIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDo0QzM3ODJEQzg4NUQxMUU0OTFEQ0E2MzRGQzcwNUY3NCI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOjRDMzc4MkQ5ODg1RDExRTQ5MURDQTYzNEZDNzA1Rjc0IiBzdFJlZjpkb2N1bWVudElEPSJ4bXAuZGlkOjRDMzc4MkRBODg1RDExRTQ5MURDQTYzNEZDNzA1Rjc0Ii8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+Af/+/fz7+vn49/b19PPy8fDv7u3s6+rp6Ofm5eTj4uHg397d3Nva2djX1tXU09LR0M/OzczLysnIx8bFxMPCwcC/vr28u7q5uLe2tbSzsrGwr66trKuqqainpqWko6KhoJ+enZybmpmYl5aVlJOSkZCPjo2Mi4qJiIeGhYSDgoGAf359fHt6eXh3dnV0c3JxcG9ubWxramloZ2ZlZGNiYWBfXl1cW1pZWFdWVVRTUlFQT05NTEtKSUhHRkVEQ0JBQD8+PTw7Ojk4NzY1NDMyMTAvLi0sKyopKCcmJSQjIiEgHx4dHBsaGRgXFhUUExIREA8ODQwLCgkIBwYFBAMCAQAAIfkEAQAAAgAsAAAAAAoABgAAAg6UjxLLewEiCAnOZBzeBQA7);\n\tbackground-position: center center;\n\tbackground-repeat: no-repeat;\n\tborder-style:solid;\n\tborder-width:1px;\n}\n.geBtnDown:active {\n\tbackground-color: #4d90fe;\n\tbackground-image: linear-gradient(#4d90fe 0px,#357ae8 100%);\n}\nhtml .geColorBtn {\n\tpadding: 0px;\n}\nhtml .geColorBtn:disabled {\n\topacity: 0.5;\n}\nhtml .gePrimaryBtn {\n\tbackground-color: #4d90fe;\n\tbackground-image: linear-gradient(#4d90fe 0px,#4787ed 100%);\n\tborder: 1px solid #3079ed;\n\tcolor: #fff;\n}\nhtml .gePrimaryBtn:hover:not([disabled]), html .gePrimaryBtn:focus {\n\tbackground-color: #357ae8;\n\tbackground-image: linear-gradient(#4d90fe 0px,#357ae8 100%);\n\tborder: 1px solid #2f5bb7;\n\tcolor: #fff;\n}\n.gePrimaryBtn:disabled {\n\topacity: .5;\n}\nbutton.geShareBtn {\n\tbackground-color: #F2931E;\n\tborder-color: #F08705;\n\tcolor:#000000;\n}\n.geAlertLink {\n\tcolor:#843534;\n\tfont-weight:700;\n\ttext-decoration:none;\n}\n.geMenubar {\n\tpadding:0px 2px 0px 2px;\n\tdisplay:inline-flex;\n\talign-items:center;\n}\n.geMenubarContainer .geItem, .geToolbar .geItem {\n\tpadding:6px 6px 6px 9px;\n\tcursor:default;\n}\n.geItem:hover:not([disabled]), .geToolbarButton:hover:not([disabled]),\n.geBtn:hover:not([disabled]) {\n\topacity: 1 !important;\n}\n.geItem:active:not([disabled]):not(.geStatus), .geBtn:active:not([disabled]),\n.geStatus div[data-action]:active:not([disabled]),\nhtml .geToolbarButton:active:not([disabled]) {\n\topacity: 0.7 !important;\n}\n.geBtn:disabled {\n\topacity: 0.5;\n}\n.geMenubarContainer .geItem:active {\n\tbackground: #F8C382;\n}\n.geToolbarContainer .geButton:hover {\n\topacity:1;\n\tbackground: #eee;\n\tborder-radius:2px;\n}\n.geToolbarContainer .geButton:active, .geToolbarContainer .geLabel:active {\n\tbackground: #F8C382;\n}\n.geToolbarContainer .geLabel:hover {\n\tbackground: #eee;\n\tborder-radius:2px;\n}\n.geActiveButton:hover {\n\topacity: 0.7;\n}\n.geActiveButton:active {\n\topacity: 0.3;\n}\n.geToolbarButton {\n\topacity: 0.6;\n}\n.geToolbarButton:active {\n\topacity: 0.2 !important;\n}\n.mxDisabled:hover {\n\tbackground:inherit !important;\n}\n.geMenubar a.geStatus {\n\tcolor:#888888;\n\tpadding:0px 0px 0px 10px;\n\tdisplay:inline-flex;\n\talign-items:center;\n\tcursor:default !important;\n}\n.geMenubar a.geStatus:hover {\n\tbackground:transparent;\n}\n.geSidebarContainer .geToolbarContainer {\n\tbackground:transparent;\n\tborder-bottom:none;\n}\n.geSidebarContainer button {\n\ttext-overflow:ellipsis;\n\toverflow:hidden;\n}\n.geToolbar {\n\tpadding:5px 0px 0px 6px;\n\tborder-top:1px solid #dadce0;\n\t-webkit-box-shadow: inset 0 1px 0 0 #fff;\n\t-moz-box-shadow: inset 0 1px 0 0 #fff;\n\tbox-shadow: inset 0 1px 0 0 #fff;\n}\n.geToolbarContainer .geSeparator {\n\tfloat:left;\n\twidth:1px;\n\theight:20px;\n\tbackground:#e5e5e5;\n\tmargin-left:6px;\n\tmargin-right:6px;\n\tmargin-top:4px;\n}\n.geToolbarContainer .geButton {\n\tfloat:left;\n\twidth:20px;\n\theight:20px;\n\tpadding:0px 2px 4px 2px;\n\tmargin:2px;\n\tborder:1px solid transparent;\n\tcursor:pointer;\n\topacity:0.6;\n}\ndiv.mxWindow .geButton {\n\tmargin: -1px 2px 2px 2px;\n\tpadding: 1px 2px 2px 1px;\n}\n.geToolbarContainer .geLabel {\n\tfloat:left;\n\tmargin:2px;\n\tcursor:pointer;\n\tpadding:3px 5px 3px 5px;\n\tborder:1px solid transparent;\n}\n.geToolbarContainer .mxDisabled:hover {\n\tborder:1px solid transparent !important;\n\topacity:0.2 !important;\n}\n.geDiagramBackdrop {\n\tbackground-color: #fbfbfb;\n}\n.geSidebarContainer {\n\tposition:absolute;\n\toverflow-x:hidden;\n\toverflow-y:auto;\n}\n.mxWindowPane .geSidebarContainer {\n\twidth:100%;\n\theight:100%;\n}\n.geEditor > div > .geMenubarContainer {\n\tborder-bottom-style:solid;\n\tborder-bottom-width:1px;\n}\n.geTabContainer {\n\tborder-width:1px;\n\tborder-top-style:solid;\n\tborder-left-style:solid;\n\tborder-right-style:solid;\n\tdisplay:flex;\n\twhite-space:nowrap;\n\toverflow:hidden;\n\tposition:absolute;\n\tz-index:1;\n}\n.geTabScroller {\n\tdisplay:inline-block;\n\tposition:relative;\n\tmax-width:calc(100% - 90px);\n\twhite-space:nowrap;\n\toverflow:hidden;\n\toverflow-x:auto;\n\t-ms-overflow-style: none;\n\tscrollbar-width: none;\n\tleft:0px;\n}\n.geTabScroller::-webkit-scrollbar {\n\tdisplay: none;\n}\n.geToggleItem {\n\tpadding:4px;\n\tborder-radius:8px;\n}\n.geActiveItem {\n\tbackground-color:var(--border-color);\n}\nhtml body div.geActivePage, .geRuler {\n\tbackground:#fff;\n}\n.geInactivePage:hover, .geControlTab:hover {\n\topacity:0.5;\n}\n.geTabMenuButton {\n\twidth:14px;\n\theight:14px;\n\tmargin-left:4px;\n\tmargin-right:-6px;\n\tcursor:pointer;\n}\n.geInactivePage .geTabMenuButton {\n\tdisplay:none;\n}\n.geTabMenuButton {\n\tdisplay:inline-block;\n\topacity:1;\n}\n.geTabMenuButton:hover {\n\topacity:0.7;\n}\n.geTabContainer > :first-child {\n\tborder-left-style:none;\n}\n.geTabContainer > :first-child > :first-child {\n\tborder-left-style:none;\n}\n.geTab {\n\theight: 100%;\n\tborder-left-width:1px;\n\tborder-left-style:solid;\n\ttext-overflow:ellipsis;\n\tborder-color:#dadce0;\n\tcolor:rgb(112, 112, 112);\n\tfont-size:12px;\n\tfont-weight: 600;\n\tdisplay: inline-flex;\n\talign-items: center;\n}\n.gePageTab {\n\tpadding: 0px 12px 0px 12px;\n}\n.geSidebar {\n\tborder-bottom:1px solid #e5e5e5;\n\tpadding:6px;\n\tpadding-left:10px;\n\tpadding-bottom:6px;\n\toverflow:hidden;\n}\n.geSidebarContainer .geTitle {\n\tdisplay:block;\n\tfont-size:13px;\n\tborder-color: #e5e5e5;\n\tborder-bottom:1px solid #e5e5e5;\n\tfont-weight:500;\n\tpadding:8px 0px 8px 20px;\n\tmargin:0px;\n\tcursor:default;\n\twhite-space:nowrap;\n\toverflow:hidden;\n\ttext-overflow:ellipsis;\n\tline-height:1.4em;\n}\n.geSidebarContainer .geTitle:hover {\n\tbackground: #eee;\n\tborder-radius:2px;\n}\n.geSidebarContainer .geTitle:active {\n\tbackground-color:#F8C382;\n}\n.geSidebarContainer .geDropTarget {\n\tborder-radius:10px;\n\tborder:2px dotted #b0b0b0;\n\ttext-align:center;\n\tpadding:6px;\n\tmargin:6px;\n\tcolor:#a0a0a0;\n\tfont-size:13px;\n}\n.geTitle img {\n\topacity:0.5;\n}\n.geTitle img:hover {\n\topacity:1;\n}\n.geTitle .geButton {\n\tborder:1px solid transparent;\n\tpadding:3px;\n\tborder-radius:2px;\n}\n.geTitle .geButton:hover {\n\tborder:1px solid gray;\n}\n.geSidebar .geItem {\n\tdisplay:inline-block;\n\tbackground-repeat:no-repeat;\n\tbackground-position:50% 50%;\n\tborder-radius: 8px;\n}\n.geSidebar .geItem, .geShapePicker .geItem {\n\ttransition: transform 100ms ease-out;\n}\n.geSidebar .geItem:hover {\n\tbackground-color:#e0e0e0;\n}\n.geSidebar .geItem:active, .geShapePicker .geItem:active {\n\ttransform: scale(0.8,0.8);\n}\n.geItem {\n\tvertical-align: top;\n\tdisplay: inline-block;\n}\n.geSidebarTooltip {\n\tposition:absolute;\n\tbackground:#fbfbfb;\n\toverflow:hidden;\n\tbox-shadow:0 2px 6px 2px rgba(60,64,67,.15);\n\tborder-radius:6px;\n}\n.geFooterContainer {\n\tbackground:#e5e5e5;\n\tborder-top:1px solid #c0c0c0;\n}\n.geFooterContainer a {\n\tdisplay:inline-block;\n\tbox-sizing:border-box;\n\twidth:100%;\n\twhite-space:nowrap;\n\tfont-size:14px;\n\tcolor:#235695;\n\tfont-weight:bold;\n\ttext-decoration:none;\n}\n.geFooterContainer table {\n\tborder-collapse:collapse;\n\tmargin:0 auto;\n}\n.geFooterContainer td {\n\tborder-left:1px solid #c0c0c0;\n\tborder-right:1px solid #c0c0c0;\n}\n.geToolbarButton {\n\tborder-color:#333333;\n}\n.geFooterContainer td:hover {\n\tbackground-color: #b3b3b3;\n}\n.geHsplit {\n\tcursor:col-resize;\n}\n.geVsplit {\n\tfont-size:1pt;\n\tcursor:row-resize;\n}\n.geHsplit {\n\tborder-left:1px solid var(--border-color);\n\tbackground-color:transparent;\n}\n.geVSplit {\n\tborder-top:1px solid var(--border-color);\n\tborder-bottom:1px solid var(--border-color);\n}\n.geHsplit:hover, .geVsplit:hover {\n\tbackground-color:var(--border-color);\n\topacity:0.7;\n}\n.mxWindow {\n\tbackground:var(--panel-color);\n}\n.geDialog {\n\tposition:absolute;\n\tbackground:white;\n\tline-height:1em;\n\toverflow:hidden;\n\tpadding:30px;\n\tborder:1px solid #acacac;\n\t-webkit-box-shadow:0px 0px 2px 2px #d5d5d5;\n\t-moz-box-shadow:0px 0px 2px 2px #d5d5d5;\n\tbox-shadow:0px 0px 2px 2px #d5d5d5;\n\tz-index: 2;\n}\n.geTransDialog {\n\tposition:absolute;\n\toverflow:hidden;\n\tz-index: 2;\n}\n.geDialogClose {\n\tposition:absolute;\n\twidth:9px;\n\theight:9px;\n\topacity:0.5;\n\tcursor:pointer;\n}\n.geDialogClose:hover {\n\topacity:1;\n}\n.geDialogTitle {\n\tbox-sizing:border-box;\n\twhite-space:nowrap;\n\tbackground:rgb(229, 229, 229);\n\tborder-bottom:1px solid rgb(192, 192, 192);\n\tfont-size:15px;\n\tfont-weight:bold;\n\ttext-align:center;\n\tcolor:rgb(35, 86, 149);\n}\n.geDialogFooter {\n\tbackground:whiteSmoke;\n\twhite-space:nowrap;\n\ttext-align:right;\n\tbox-sizing:border-box;\n\tborder-top:1px solid #e5e5e5;\n\tcolor:darkGray;\n}\n.geSprite {\n\tbackground:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAABeQCAMAAAByzXKPAAAA1VBMVEUAAAAzMzIzMzIzMzE1NTUzMzIzMzIzMzEzMzIyMjIzMzIzMzIzMzIzMzE6OjoyMjIzMzIzMzIzMzEzMzI0NDA0NDIwMDAyMjEzMzIzMzEzMzE0NDAzMzMzMzIyMjIzMzI0NDE0NDQyMjIzMzIzMzIzMzIzMzM5OTkAAAC1tbX///9mZmYwMDAQEBAmJiZTiPJ7e3v/Z2RwcHAgICB+fn5hYWFzc3NAQECoqKiampqMjIxTU1NGRkY3NzcbGxsNDQ3w8PBQUFDg4ODAwMCwsLCgoKBPT09W+xp5AAAAKHRSTlMAh4DDEd187+mljnhvVge5nmhMQi4hA8uxk2IlHOOYc102M/jW088J/2liTQAACt5JREFUeNrs3O1um0AQheG5nIPCoIq1Q7+r/Mn9X1K9xtEAM9RLQmODzyO1cV+NtzjShhjHkRkAgn9DMCaYnRXIGOQdtWmk1zRWm0vNN6az+Y+v2fXZ5iTX/kZ4ZGvUNT6/RJuCM/VVRKFB7YBwtnY1k3h2wboaHy8RFQC2VGuc1D730WWLS2GIZ27aM4yUT+9tXaLNw9m0mI9uokepRLeC+ZyCfFCoqwckqV3WBHFZaxHLFrNxVpgUVRWjg/jli2WbfH4WyxYnWcVV0Rz7FYj26X9ezQcuE3VYkXzFSYpm9eq6pqSiuNYAaj+r0GiFxKv5tEOqxVfV0utrCkZF/HCXTuOdGz2IHKbDR5wdJ6PdeRmIsfviED0C5ZV7ojf487v59fPHsT18//a1Yn1HJdoSjIUXBG5XgaBejhMYVmT9B1dRUONj4KtyRHNmNkULDYeD2CGVjiZ0paOK1jVuYKIpjJTO7m9dovvEn3bz/DH4440f2+d9fvlVh+4LLuK6cM8GVcKKkmq3ZqqBfbhaef4n+pijBudNZH3H+OW3No+rbTmVXjfciPbs/GVQ7QU6tWqUW5lonefHfn5f6xI9DAxdqQU3n55uU821mj2ZuUq0SYo2ivA5tThxk3rK6u+urYtZiqKuGiWMEkbp4/OFLITIvyrfekt35WGvjvP6OlERwP6+VU39z+ansp+0SThP8jk+0SeoAehRjObmdha0f2YwfucMss7uaPVF3rThN/EH6fH3YhEt3bD1zMlwGtu8/8a5zrHJuR6NyrkKMK5N5qqf9ev6Y4hfGfSPrc7ZWZqPQrQPa+x5Cfe8FO55m3Xrcs8T3TFUYQ0zqj5jTPoMmagQz4brFh8D3x5L9OngyRy+IEa0JgBRlaBWAIJYyVYjYDF47PwNV/TwAIRfB+BiFcyeolchija6+P7xd//IveI+JlpwnrdZP7xexdD6/4N/PDzP06NZdc8vP4H7WKFXLbqjQcU9T7QZvFhHdN/+sndmy6lCQRQ9KOA8Ro1TxjttYuUlX5BK5f+/6YJIWjlNFREkpLJXGQuWO01e2mPaU4pA17qH7iEeKfRsrrqh4/t0hJQPEJSokULPFpJse0Iu0PNQNVSNnOu8ZHPWZc8TUhkBgECRikZMrp4Xq9W1NPubkIIUm4hnrtyikSIjq+jck3bOBQkpnSBrkU97ALl73pJqXfFc5AlJqN3cXvoTEKIzJcu5PSEFqHiGp6ahz+33Z3rWtpzhEfK16DO8XXi3S2vIvfUCHnpWrcsZHiHVAFUG0KQJoEgjGjGRFG1l9bq25gyPkIoANBcEab9DEPf27iCk40VbWa0uP86WkMsTQHPQHBSnJJHCytp1dW9Uz2cBQoo0PEqVes/r2bM0131CLtLzUCVUidw9n6uuaPY8IdnUYMet2BTccUtIfShnz60mBe65JaTunL/tVqTAbbeE1ImCc3vl16McIEiWc3tCClD5DM9Ak7ZFZCBkZEVzhkfI5/n6Hbdp+wF33BJSH8rZc6vISB/gnltCas/Z225FStdz2y0hZXE19lrt5p177NyR11+OHb/THhzJP86wP2uYrjvz1h92eTseNEzDbB2nd/OY1Py9WNw6/qjnN+fmvnmwnYkxjf1t+mAW7XlsbzaJ3a7DzH1sf3Udp7m/dcOf615sW26SdfvGrCaxbV4l9nEan0X0xqEaRrbvmnlrGFu3PTN3ndUoLOuapW8ODLzudLVomMHA71z/MwmT9mTmN+bOZnS9NcJDs+V53t+WPzQnbNa9/nRoCPl2AKqObKFvltEBoPvcVwNwmavxOy3IDwFAlkWCWPBqhJDC8GtsCPlGYI8ciQyRI+3/CLHHscysXvf0ynzWIOQsPr3wWllkxNQskD+b82/Ihi8qCCm150XpObXnc2RFs+cJqRhAE5AHpI8BOZbH5TQdlXB8JAUEIC4AvkFPSMEl/dQ+v74+2/bl6enFtm/v72+W/c/eHSW3CUNRGNZyjgiZNHE6fW2b6f63VGScCHSvI7CxjfH/tYnTU43CywFiAfnT/On+lunH3274R5G2zbv03rTj9F+z92+U7pqPX52PZjdM35uf6vxs3ofp799Kulf2B8CEc2JVjvJm6OIT5CO9PekvD/8T767XgTc2z1umnEdggyT5eX2s+k9yGpvH1kqvI523IVfSAzdlW2gbu3zn5+6j/JFcfIft0lBOi4/J6cbmBTZJTdPo9fV1/3pamqTUFCalOVkunVdNTU5bSa2Nn7ULjl0A7o5/aGt6Z6TKUpVC7/VLSrWzqTo7b+yzO+9i28shHtugl5cXXS9NLnyYHVZ+Nz79UG7y4in7Aqza9po+tBsXP1B8wCW3m01yVqq9G3w3q/X+/1lpZ5WEbKdOTnNsxiYtd+ngjl28Fw+zhwGwLA0/mDeIS46AxWnO2MVnUFD627+sasuAxyJpTsp3A+6WgnplGpILpL1JR21lZt5k2ZSrFPE41AteEy+Q9qrn58qW77lNM877sXXq+fcGLp/2giETZO5tTYumHObxKDQ0aezhxb2feNE0MWlvqZS1SzwsJZdslu3x9fYae8HFXYeAKcIVejxwzgwc0YE6jTzuWOAuqOS+GTY3rc+rmDxAKn7VEPAt+amm/7Yu8ev0gfnkHckljT8nSoaf/RkeNgUejaKburGiYt696FNIcXrt/3yJh8Qba+advg0BwJCk66Qamp3WvxtX1gMzSDZya+BU8y2OR+ogyk7w5h+Nox+/6S04pNunwKqpt9Db9yemA2GokjqThGR+ms1JeYMe92hu5y2Zbs5O5be7mkru2Hlpgc5j434M1NPiq0qqgXoaDkwqTU21V0s7dgY/TfLX9XMT1udx56RJqTqf5aqlR3vVqtOWaYpbp4NtW2tmPaXbwAZI0U1zroI/tiRW9oBVOtL5QT6uu2TH0nlgnXRSqsLkGXg+JnBTCjopVeGceXk2FnAtColkUynGMn1SrHXejq3Py4U5wHXZvtluJtXO27H+vFyMB9xElFIxNQ6fUmFj9Xm6Sr67SrA6b94Gfp4HLsb2rSM53VSMpseK1c7bsXbechs4zgO3EiUvs6kK7tgsUmlglaLkZiZVStzOBzoPrJHOS1VgVR5YuTPXz1VgXR5YM/+u9xglkyZRT2WqghlbnVc8CA+4mtxRp5vB7XxW7bw3LwvywI0pr5MN6HNNrUi/fUZO4o6tzxuiuO0GuLzUUdu3GOV3M6raeTu2Nm8aR+eBlVD1BnoVjowt0HBgnY51PrqdT/9yxtJ5YHWkeGKswoxJuMcGuIYoKdowKOQ4Xxov+4Zb/khU8Mf681a3gZ/0gYt1PjGdV1J2/mBS5z/58zrbQOeBE6zpGZgA7smRzgc6D2xKlORlCiUVKrfSslMAVulI56PX+XHv81g6D6yPFM+MVWCJDliLJdfoMhVYowPWYsk1ukwF1uiAu1R/Hh5v2wNb8r+9O0pBGAaiKLqdm/1vUCiFSCdhTIjWhntAwefY5sMxRW1ToJnZ89KjQTnuGzGUWB1DLkJtul0ofocn3SOf5wMu3mu97q30GN2e99he2gKEpj6Dkvwjj4tebb5d8EBAuhuUJJ87f96f4aT/1OlNz7GRfgg+WheCUFsfE16cpEFNx5exIUmHx09zd34AaRdACCDp+TVLSlFv1blzgKR2egx5zx/see0pn+djbR4FIVofz4/UeV67G3+vr3niC+H04Oz/nbwA7lqtm+wByfQAAAAASUVORK5CYII=') no-repeat;\n\twidth:21px;\n\theight:21px;\n}\n.geEditor .geBaseButton {\n\tpadding:10px;\n\tborder-radius:6px;\n\tborder:1px solid #c0c0c0;\n\tcursor:pointer;\n\tbackground-color:#ececec;\n\tbackground-image:linear-gradient(#ececec 0%, #fcfcfc 100%);\n}\n.geEditor .geBaseButton:hover {\n\tbackground:#ececec;\n}\n.geEditor .geBigButton {\n\tcolor:#ffffff;\n\tborder: none;\n\tpadding:4px 10px;\n\tfont-size:14px;\n\twhite-space: nowrap;\n\tborder-radius:3px;\n\tbackground-color:#0052cc;\n\tcursor:pointer;\n\ttransition: background-color 0.1s ease-out;\n\toverflow:hidden;\n\ttext-overflow: ellipsis;\n}\n.geEditor .geBigButton:hover {\n\tbackground-color:#0065ff;\n}\n.geEditor .geBigButton:active {\n\tbackground-color:#0747a6;\n\topacity:1;\n}\nhtml body .geBigStandardButton {\n\tcolor: #344563;\n\tbackground-color: rgba(9, 30, 66, 0.08);\n}\nhtml body .geBigStandardButton:hover {\n\tbackground-color: rgba(9, 30, 66, 0.13);\n}\nhtml body .geBigStandardButton:active {\n\tbackground-color: #F8C382;\n\tcolor: #600000;\n}\n@media print {\n\tdiv.geNoPrint { display: none !important; }\n}\n.geSprite-actualsize { background-position: 0 0; }\n.geSprite-bold { background-position: 0 -46px; }\n.geSprite-bottom { background-position: 0 -92px; }\n.geSprite-center { background-position: 0 -138px; }\n.geSprite-delete { background-position: 0 -184px; }\n.geSprite-fillcolor { background-position: 0 -229px; }\n.geSprite-fit { background-position: 0 -277px; }\n.geSprite-fontcolor { background-position: 0 -322px; }\n.geSprite-gradientcolor { background-position: 0 -368px; }\n.geSprite-image { background-position: 0 -414px; }\n.geSprite-italic { background-position: 0 -460px; }\n.geSprite-left { background-position: 0 -505px; }\n.geSprite-middle { background-position: 0 -552px; }\n.geSprite-print { background-position: 0 -598px; }\n.geSprite-redo { background-position: 0 -644px; }\n.geSprite-right { background-position: 0 -689px; }\n.geSprite-shadow { background-position: 0 -735px; }\n.geSprite-strokecolor { background-position: 0 -782px; }\n.geSprite-top { background-position: 0 -828px; }\n.geSprite-underline { background-position: 0 -874px; }\n.geSprite-undo { background-position: 0 -920px; }\n.geSprite-zoomin { background-position: 0 -966px; }\n.geSprite-zoomout { background-position: 0 -1012px; }\n.geSprite-arrow { background-position: 0 -1059px; }\n.geSprite-linkedge { background-position: 0 -1105px; }\n.geSprite-straight { background-position: 0 -1150px; }\n.geSprite-entity { background-position: 0 -1196px; }\n.geSprite-orthogonal { background-position: 0 -1242px; }\n.geSprite-curved { background-position: 0 -1288px; }\n.geSprite-noarrow { background-position: 0 -1334px; }\n.geSprite-endclassic { background-position: 0 -1380px; }\n.geSprite-endopen { background-position: 0 -1426px; }\n.geSprite-endblock { background-position: 0 -1472px; }\n.geSprite-endoval { background-position: 0 -1518px; }\n.geSprite-enddiamond { background-position: 0 -1564px; }\n.geSprite-endthindiamond { background-position: 0 -1610px; }\n.geSprite-endclassictrans { background-position: 0 -1656px; }\n.geSprite-endblocktrans { background-position: 0 -1702px; }\n.geSprite-endovaltrans { background-position: 0 -1748px; }\n.geSprite-enddiamondtrans { background-position: 0 -1794px; }\n.geSprite-endthindiamondtrans { background-position: 0 -1840px; }\n.geSprite-startclassic { background-position: 0 -1886px; }\n.geSprite-startopen { background-position: 0 -1932px; }\n.geSprite-startblock { background-position: 0 -1978px; }\n.geSprite-startoval { background-position: 0 -2024px; }\n.geSprite-startdiamond { background-position: 0 -2070px; }\n.geSprite-startthindiamond { background-position: 0 -2116px; }\n.geSprite-startclassictrans { background-position: 0 -2162px; }\n.geSprite-startblocktrans { background-position: 0 -2208px; }\n.geSprite-startovaltrans { background-position: 0 -2254px; }\n.geSprite-startdiamondtrans { background-position: 0 -2300px; }\n.geSprite-startthindiamondtrans { background-position: 0 -2346px; }\n.geSprite-globe { background-position: 0 -2392px; }\n.geSprite-orderedlist { background-position: 0 -2438px; }\n.geSprite-unorderedlist { background-position: 0 -2484px; }\n.geSprite-horizontalrule { background-position: 0 -2530px; }\n.geSprite-link { background-position: 0 -2576px; }\n.geSprite-indent { background-position: 0 -2622px; }\n.geSprite-outdent { background-position: 0 -2668px; }\n.geSprite-code { background-position: 0 -2714px; }\n.geSprite-fontbackground { background-position: 0 -2760px; }\n.geSprite-removeformat { background-position: 0 -2806px; }\n.geSprite-superscript { background-position: 0 -2852px; }\n.geSprite-subscript { background-position: 0 -2898px; }\n.geSprite-table { background-position: 0 -2944px; }\n.geSprite-deletecolumn { background-position: 0 -2990px; }\n.geSprite-deleterow { background-position: 0 -3036px; }\n.geSprite-insertcolumnafter { background-position: 0 -3082px; }\n.geSprite-insertcolumnbefore { background-position: 0 -3128px; }\n.geSprite-insertrowafter { background-position: 0 -3174px; }\n.geSprite-insertrowbefore { background-position: 0 -3220px; }\n.geSprite-grid { background-position: 0 -3272px; }\n.geSprite-guides { background-position: 0 -3324px; }\n.geSprite-dots { background-position: 0 -3370px; }\n.geSprite-alignleft { background-position: 0 -3416px; }\n.geSprite-alignright { background-position: 0 -3462px; }\n.geSprite-aligncenter { background-position: 0 -3508px; }\n.geSprite-aligntop { background-position: 0 -3554px; }\n.geSprite-alignbottom { background-position: 0 -3600px; }\n.geSprite-alignmiddle { background-position: 0 -3646px; }\n.geSprite-justifyfull { background-position: 0 -3692px; }\n.geSprite-formatpanel { background-position: 0 -3738px; }\n.geSprite-connection { background-position: 0 -3784px; }\n.geSprite-vertical { background-position: 0 -3830px; }\n.geSprite-simplearrow { background-position: 0 -3876px; }\n.geSprite-plus { background-position: 0 -3922px; }\n.geSprite-rounded { background-position: 0 -3968px; }\n.geSprite-toback { background-position: 0 -4014px; }\n.geSprite-tofront { background-position: 0 -4060px; }\n.geSprite-duplicate { background-position: 0 -4106px; }\n.geSprite-insert { background-position: 0 -4152px; }\n.geSprite-endblockthin { background-position: 0 -4201px; }\n.geSprite-endblockthintrans { background-position: 0 -4247px; }\n.geSprite-enderone { background-position: 0 -4293px; }\n.geSprite-enderonetoone { background-position: 0 -4339px; }\n.geSprite-enderonetomany { background-position: 0 -4385px; }\n.geSprite-endermany { background-position: 0 -4431px; }\n.geSprite-enderoneopt { background-position: 0 -4477px; }\n.geSprite-endermanyopt { background-position: 0 -4523px; }\n.geSprite-endclassicthin { background-position: 0 -4938px; }\n.geSprite-endclassicthintrans { background-position: 0 -4984px; }\n.geSprite-enddash { background-position: 0 -5029px; }\n.geSprite-endcircleplus { background-position: 0 -5075px; }\n.geSprite-endcircle { background-position: 0 -5121px; }\n.geSprite-endasync { background-position: 0 -5167px; }\n.geSprite-endasynctrans { background-position: 0 -5213px; }\n.geSprite-startblockthin { background-position: 0 -4569px; }\n.geSprite-startblockthintrans { background-position: 0 -4615px; }\n.geSprite-starterone { background-position: 0 -4661px; }\n.geSprite-starteronetoone { background-position: 0 -4707px; }\n.geSprite-starteronetomany { background-position: 0 -4753px; }\n.geSprite-startermany { background-position: 0 -4799px; }\n.geSprite-starteroneopt { background-position: 0 -4845px; }\n.geSprite-startermanyopt { background-position: 0 -4891px; }\n.geSprite-startclassicthin { background-position: 0 -5259px; }\n.geSprite-startclassicthintrans { background-position: 0 -5305px; }\n.geSprite-startdash { background-position: 0 -5351px; }\n.geSprite-startcircleplus { background-position: 0 -5397px; }\n.geSprite-startcircle { background-position: 0 -5443px; }\n.geSprite-startasync { background-position: 0 -5489px; }\n.geSprite-startasynctrans { background-position: 0 -5535px; }\n.geSprite-startcross { background-position: 0 -5581px; }\n.geSprite-startopenthin { background-position: 0 -5627px; }\n.geSprite-startopenasync { background-position: 0 -5673px; }\n.geSprite-endcross { background-position: 0 -5719px; }\n.geSprite-endopenthin { background-position: 0 -5765px; }\n.geSprite-endopenasync { background-position: 0 -5811px; }\n.geSprite-verticalelbow { background-position: 0 -5857px; }\n.geSprite-horizontalelbow { background-position: 0 -5903px; }\n.geSprite-horizontalisometric { background-position: 0 -5949px; }\n.geSprite-verticalisometric { background-position: 0 -5995px; }\n.geSvgSprite {\n\tbackground-position: center center;\n}\n.geFlipSprite {\n\ttransform:scaleX(-1);\n}\n.geSprite-box {\n\tbackground-image: url(\"data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='20' height='10' transform='translate(0.5,0.5)'><rect stroke='black' fill='none' x='2' y='2' width='6' height='6'/><path stroke='black' d='M8 5 L 18 5'/></svg>\");\n}\n.geSprite-halfCircle {\n\tbackground-image: url(\"data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='20' height='10' transform='translate(0.5,0.5)'><path stroke='black' fill='none' d='M 2 2 Q 6 2 6 5 Q 6 8 2 8 M 6 5 L 18 5'/></svg>\");\n}\nhtml div.mxRubberband {\n\tborder-color:#0000DD;\n\tbackground:#99ccff;\n}\ntd.mxPopupMenuIcon div {\n\twidth:16px;\n\theight:16px;\n}\n.geEditor div.mxPopupMenu {\n\tbox-shadow: 0px 0px 2px #C0C0C0;\n\tbackground:var(--panel-color);\n\tborder-radius:4px;\n\tborder-style:solid;\n\tborder-width:1px;\n\tborder-color:lightgray;\n\tpadding:3px;\n}\n.geSearchSidebar {\n\tpadding: 14px 8px 0px 8px;\n\tbox-sizing: border-box;\n\tmin-height: 60px;\n\toverflow: hidden;\n\twidth: 100%;\n}\n.geSearchSidebar input {\n\tfont-size: 12px;\n\tbox-sizing: border-box;\n\tborder: 1px solid #d5d5d5;\n\tborder-radius: 4px;\n\twidth: 100%;\n\toutline: none;\n\tpadding: 6px 20px 6px 6px\n}\nhtml table.mxPopupMenu {\n\tborder-collapse:collapse;\n\tmargin:0px;\n}\nhtml td.mxPopupMenuItem {\n\tpadding:7px 30px 7px 30px;\n\tfont-family:-apple-system, BlinkMacSystemFont, \"Segoe UI Variable\", \"Segoe UI\", system-ui, ui-sans-serif, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\";\n\tfont-size:10pt;\n}\nhtml td.mxPopupMenuIcon {\n\tbackground-color:transparent;\n\tpadding:0px;\n}\ntd.mxPopupMenuIcon .geIcon {\n\tpadding:2px;\n\tpadding-bottom:4px;\n\tmargin:2px;\n\tborder:1px solid transparent;\n\topacity:0.5;\n}\nhtml tr.mxPopupMenuItemHover {\n\tbackground-color: #e0e0e0;\n\tcolor: black;\n}\ntable.mxPopupMenu hr {\n\tcolor:#cccccc;\n\tbackground-color:#cccccc;\n\tborder:none;\n\theight:1px;\n}\ntable.mxPopupMenu tr {\n\tfont-size:4pt;\n}\nhtml td.mxWindowTitle {\n \tcolor:rgb(112, 112, 112);\n\tbackground:#f1f3f4;\n \tpadding:4px;\n}\ntable.geProperties {\n\ttable-layout:fixed;\n}\ntable.geProperties tr td {\n\theight:21px;\n}\n.gePropHeader, .gePropRow {\n\tborder: 1px solid #e9e9e9;\t\n}\n.gePropRowDark {\n\tborder: 1px solid #4472C4;\n}\n.gePropHeader>.gePropHeaderCell {\n    border-top: 0;\n    border-bottom: 0;\n    text-align: left;\n\twidth: 50%;\n}\n.gePropHeader>.gePropHeaderCell:first-child {\n    border-left: none;\n}\n.gePropHeader>.gePropHeaderCell:last-child {\n    border-right: none;\n}\n.gePropHeader {\n    background: #e5e5e5;\n    color: black;\n}\n.gePropRowCell {\n    border-left: 1px solid #f3f3f3;\n\twhite-space:nowrap;\n\ttext-overflow:ellipsis;\n\toverflow:hidden;\n    max-width: 50%;\n}\n.gePropRow>.gePropRowCell {\n    background: #fff;\n}\n.gePropRowAlt>.gePropRowCell {\n    background: #fcfcfc;\n}\n.gePropRowDark>.gePropRowCell {\n    background: #fff;\n    color: #305496;\n    font-weight: bold;\n}\n.gePropRowDarkAlt>.gePropRowCell {\n    background: #D9E1F2;\n    color: #305496;\n    font-weight: bold;\n}\n.gePropEditor input:invalid {\n  border: 1px solid red;\n}\n/* Templates dialog css */\n.geTemplateDlg {\n\twidth: 100%;\n\theight: 100%;\n}\n.geTemplateDlg ::-webkit-scrollbar {\n    width:12px;\n    height:12px;\n}\n.geTemplateDlg ::-webkit-scrollbar-track {\n\tbackground:whiteSmoke;\n\tbox-shadow:inset 0 0 4px rgba(0,0,0,0.1);\n}\n.geTemplateDlg ::-webkit-scrollbar-thumb {\n\tbackground:#c5c5c5;\n    border-radius:10px;\n\tborder:whiteSmoke solid 3px;\n}\n.geTemplateDlg ::-webkit-scrollbar-thumb:hover {\n\tbackground:#b5b5b5;\n}\n\n.geTempDlgHeader {\n\tbox-sizing: border-box;\n\theight: 62px;\n\twidth: 100%;\n\tborder: 1px solid #CCCCCC;\n\tborder-radius: 5px 5px 0 0;\n\tbackground-color: #F5F5F5;\n}\n.geTempDlgHeaderLogo {\n\theight: 34px;\n\tmargin: 14px 14px 14px 20px;\n}\n.geTempDlgSearchBox {\n    color:#888888;\n    background:url(\"/images/icon-search.svg\") no-repeat;\n\tbackground-color: #FFFFFF;\n\tbackground-position: 15px;\n\theight: 40px;\n\twidth: 40%;\n\tmax-width: 400px;\n\tborder: 1px solid #CCCCCC;\n\tborder-radius: 3px;\n    float:right;\n    font-family:Arial,Helvetica,sans-serif;\n    font-size:15px;\n    line-height:36px;\n    margin: 11px 36px 0 0;\n    outline:medium none;\n    padding:0 0 0 36px;\n    text-shadow:1px 1px 0 white;\n}\n.geTemplatesList {\n\tbox-sizing: border-box;\n\tfloat: left;\n\theight: calc(100% - 118px);\n\twidth: 20%;\n\tborder: 1px solid #CCCCCC;\n\tbackground-color: #FFFFFF;\n\tdisplay: inline-block;\n\toverflow-x: hidden;\n\toverflow-y: auto;\n}\n.geTempDlgContent {\n\tbox-sizing: border-box;\n\tfloat: right;\n\theight: calc(100% - 118px);\n\twidth: 80%;\n\tborder: 1px solid #CCCCCC;\n\tbackground-color: #FFFFFF;\n\tdisplay: inline-block;\n\toverflow-x: hidden;\n\toverflow-y: auto;\n\tposition: relative;\n}\n.geTempDlgFooter {\n\tbox-sizing: border-box;\n\theight: 52px;\n\twidth: 100%;\n\tborder: 1px solid #CCCCCC;\n\tborder-radius: 0 0 5px 5px;\n\tbackground-color: #F5F5F5;\n\ttext-align: right;\n\tfont-family: Helvetica;\n\tfont-size: 14px;\n\tline-height: 17px;\n\tpadding-top: 11px;\n}\n.geTempDlgCreateBtn, .geTempDlgOpenBtn {\n\tdisplay: inline-block;\n\twidth: 67px;\n    border-radius: 3px;\n    background-color: #3D72AD;\n    padding: 6px;\n    text-align: center;\n    color: #fff;\n    cursor: pointer;\n    margin-left: 5px;\n}\n.geTempDlgCancelBtn {\n\tdisplay: inline-block;\n\twidth: 67px;\n    padding: 6px;\n    text-align: center;\n    color: #3D72AD;\n    cursor: pointer;\n}\n.geTempDlgCancelBtn:active, .geTempDlgCreateBtn:active, \n.geTempDlgOpenBtn:active, .geTempDlgShowAllBtn:active {\n\ttransform: translateY(2px);\n}\n.geTempDlgBtnDisabled {\n    background-color: #9fbddd;\n}\n.geTempDlgBtnDisabled:active {\n    transform: translateY(0px);\n}\n\n.geTempDlgBtnBusy {\n\tbackground-image: url(/images/aui-wait.gif);\n    background-repeat: no-repeat;\n    background-position: 62px 7px;\n}\n\n.geTempDlgBack {\n\theight: 17px;\n\tcolor: #333333;\n\tfont-family: Helvetica;\n\tfont-size: 14px;\n\tfont-weight: bold;\n\tline-height: 17px;\n\tpadding: 25px 0 0 20px;\n\tcursor: pointer;\n}\n.geTempDlgHLine {\n\theight: 1px;\n\twidth: calc(100% - 22px);\n\tbackground-color: #CCCCCC;\n\tmargin: 20px 0 0 11px;\n}\n.geTemplatesLbl {\n\theight: 17px;\n\tcolor: #6D6D6D;\n\tfont-family: Helvetica;\n\tfont-size: 14px;\n\tfont-weight: bold;\n\tline-height: 17px;\n\ttext-transform: uppercase;\n\tmargin: 20px 0 3px 20px;\n}\n.geTemplateCatLink {\n\theight: 17px;\n\tcolor: #3D72AD;\n\tfont-family: Helvetica;\n\tfont-size: 14px;\n\tline-height: 17px;\n\tmargin: 12px 0 0 20px;\n\tcursor: pointer;\n}\n.geTempDlgNewDiagramCat {\n\theight: 280px;\n\twidth: 100%;\n\tbackground-color: #555555;\n}\n.geTempDlgNewDiagramCatLbl {\n\theight: 17px;\n\tcolor: #FFFFFF;\n\tfont-family: Helvetica;\n\tfont-size: 14px;\n\tfont-weight: bold;\n\tline-height: 17px;\n\tpadding: 25px 0 0 20px;\n\ttext-transform: uppercase;\n}\n.geTempDlgNewDiagramCatList {\n\twidth: 100%;\n\theight: 190px;\n\tpadding-left: 9px;\n\tbox-sizing: border-box;\n\toverflow-y: auto;\n\toverflow-x: hidden; \n}\n.geTempDlgNewDiagramCatFooter {\n\twidth: 100%;\n}\n.geTempDlgShowAllBtn {\n\twidth: 78px;\n\tborder: 1px solid #777777;\n\tborder-radius: 3px;\n\tcursor: pointer;\n\ttext-align: center;\n\tcolor: #DDDDDD;\n\tfont-family: Helvetica;\n\tfont-size: 14px;\n\tline-height: 17px;\n\tpadding: 4px;\n\tfloat: right;\n\tmargin-right: 30px;\n}\n.geTempDlgNewDiagramCatItem {\n\theight: 155px;\n\twidth: 134px;\n\tpadding: 18px 6px 0 9px;\n\tdisplay: inline-block;\n}\n\n.geTempDlgNewDiagramCatItemImg {\n\tbox-sizing: border-box;\n\theight: 134px;\n\twidth: 134px;\n\tborder: 1px solid #CCCCCC;\n\tborder-radius: 3px;\n\tbackground-color: #FFFFFF;\n\tdisplay:table-cell;\n\tvertical-align:middle;\n\ttext-align:center;\n\tcursor: pointer;\n}\n\n.geTempDlgNewDiagramCatItemActive > .geTempDlgNewDiagramCatItemImg {\n\tborder: 4px solid #3D72AD;\n}\n\n.geTempDlgNewDiagramCatItemLbl {\n\theight: 17px;\n\twidth: 100%;\n\tcolor: #FFFFFF;\n\tfont-family: Helvetica;\n\tfont-size: 14px;\n\tline-height: 17px;\n\ttext-align: center;\n\tpadding-top: 4px;\n\tcursor: pointer;\n}\n\n.geTempDlgDiagramsList {\n\tbox-sizing: border-box;\n\twidth: 100%;\n\tmin-height: calc(100% - 280px);\n\tpadding-left: 9px;\n\tbox-sizing: border-box;\n\tbackground-color: #E5E5E5;\n}\n\n.geTempDlgDiagramsListHeader {\n\twidth: 100%;\n    height: 45px;\n\tpadding: 18px 20px 0 11px;\n\tbox-sizing: border-box;\n}\n.geTempDlgDiagramsListTitle {\n\tbox-sizing: border-box;\n\theight: 17px;\n\tcolor: #666666;\n\tfont-family: Helvetica;\n\tfont-size: 14px;\n\tfont-weight: bold;\n\tline-height: 17px;\n\ttext-transform: uppercase;\n\tpadding-top: 5px;\n\tdisplay: inline-block;\n}\n.geTempDlgDiagramsListBtns {\n\tfloat: right;\n\tmargin-top: -9px;\n}\t\t\n.geTempDlgRadioBtn {\n\tbox-sizing: border-box;\n\tborder: 1px solid #CCCCCC;\n\tborder-radius: 3px;\n\tbackground-color: #FFFFFF;\n\tcolor: #333333;\n\tdisplay: inline-block;\n\tfont-family: Helvetica;\n\tfont-size: 14px;\n\tline-height: 17px;\n\ttext-align: center;\n\tpadding: 4px;\n\tcursor: pointer;\n}\n.geTempDlgRadioBtnActive {\n\tbackground-color: #555555;\n\tcolor: #FFFFFF;\n}\n.geTempDlgRadioBtnLarge {\n\theight: 27px;\n\twidth: 120px;\n}\n/* TODO is there a better way for these buttons */\n.geTempDlgRadioBtnSmall {\n\tposition: relative;\n\ttop: 9px;\n\theight: 27px;\n\twidth: 27px;\n}\n.geTempDlgRadioBtnSmall img {\n\tposition: absolute;\n\ttop: 6px;\n\tleft: 6px;\n\theight: 13px;\n\twidth: 13px;\n}\n.geTempDlgSpacer {\n    display: inline-block;\n\twidth: 10px;\n}\n\n.geTempDlgDiagramsListGrid {\n\twidth: 100%;\n\twhite-space: nowrap;\n\tfont-size: 13px;\n\tpadding: 0px 20px 20px 10px;\n    box-sizing: border-box;\n    border-spacing: 0;\n}\n\n.geTempDlgDiagramsListGrid tr {\n\theight: 40px;\n}\n\n.geTempDlgDiagramsListGrid th {\n\tbackground-color: #E5E5E5;\n\tcolor: #8E8E8E;\n\tfont-weight: bold;\n\ttext-align: left;\n\tpadding: 5px;\n\tborder-bottom: 1px solid #CCCCCC;\n\tfont-size: 14px;\n}\n\n.geTempDlgDiagramsListGrid td {\n\tbackground-color: #FFFFFF;\n\tcolor: #888888;\n\tpadding: 5px;\n\tborder-bottom: 1px solid #CCCCCC;\n\toverflow: hidden;\n}\n\n.geTempDlgDiagramsListGridActive td {\n\tborder-bottom: 2px solid #3D72AD;\n\tborder-top: 2px solid #3D72AD;\n}\n\n.geTempDlgDiagramsListGridActive td:first-child  {\n\tborder-left: 2px solid #3D72AD;\n}\n\n.geTempDlgDiagramsListGridActive td:last-child  {\n\tborder-right: 2px solid #3D72AD;\n}\n\n.geTempDlgDiagramTitle {\n\tfont-weight: bold;\n\tcolor: #666666 !important;\n}\n\n.geTempDlgDiagramsTiles {\n\tposition: relative;\n\tmin-height: 100px;\n}\n\n.geTempDlgDiagramTile {\n\theight: 152px;\n\twidth: 130px;\n\tpadding: 20px 7px 0 10px;\n\tdisplay: inline-block;\n\tposition: relative;\n}\n\n.geTempDlgDiagramTileImg {\n\tbox-sizing: border-box;\n\theight: 130px;\n\twidth: 130px;\n\tborder: 1px solid #CCCCCC;\n\tborder-radius: 3px;\n\tbackground-color: #FFFFFF;\n\tdisplay:table-cell;\n\tvertical-align:middle;\n\ttext-align:center;\n}\n\n.geTempDlgDiagramTileImgLoading {\n\tbackground-image: url(/images/aui-wait.gif);\n    background-repeat: no-repeat;\n    background-position: center;\n}\n\n.geTempDlgDiagramTileImgError {\n\tbackground-image: url(/images/broken.png);\n    background-repeat: no-repeat;\n    background-position: center;\n    background-color: #be3730;\n}\n\n.geTempDlgDiagramTileImg img{\n\tmax-width: 117px;\n    max-height: 117px;\n    cursor: pointer;\n}\n\n.geTempDlgDiagramTileActive > .geTempDlgDiagramTileImg{\n\tborder: 4px solid #3D72AD;\n}\n\n.geTempDlgDiagramTileLbl {\n\theight: 17px;\n\twidth: 100%;\n\tcolor: #333333;\n\tfont-family: Helvetica;\n\tfont-size: 14px;\n\tline-height: 17px;\n\ttext-align: center;\n\tpadding-top: 5px;\n\tcursor: pointer;\n}\n\n.geTempDlgDiagramPreviewBtn {\n\tposition: absolute;\n\ttop: 28px;\n\tright: 15px;\n\tcursor: pointer;\n}\n\n.geTempDlgDiagramListPreviewBtn {\n\tcursor: pointer;\n\tpadding-left: 5px;\n\tpadding-right: 15px;\n}\n\n.geTempDlgDiagramPreviewBox {\n\tposition: absolute;\n    top: 3%;\n    left: 10%;\n    width: 80%;\n    height: 94%;\n    background: white;\n    border: 4px solid #3D72AD;\n    border-radius: 6px;\n    box-sizing: border-box;\n\tdisplay:table-cell;\n\tvertical-align:middle;\n\ttext-align:center;\n    z-index: 2;\n}\n\n.geTempDlgDialogMask {\n\tposition: absolute;\n    top: 0;\n    left: 0;\n    width: 100%;\n    height: 100%;\n    z-index: 1;\n}\n\n.geTempDlgDiagramPreviewBox img {\n\tmax-width: 95%;\n    max-height: 95%;\n    vertical-align: middle;\n}\n\n.geTempDlgPreviewCloseBtn {\n\tposition: absolute;\n\ttop: 5px;\n\tright: 5px;\n\tcursor: pointer;\n}\n\n.geTempDlgLinkToDiagramHint {\n\tcolor: #555;\n}\n\n.geTempDlgLinkToDiagramBtn {\n\tcolor: #555;\n    margin: 0 10px 0 10px;\n    height: 27px;\n    font-size: 14px;\n}\n\n.geTempDlgErrMsg {\n\tdisplay: none;\n\tcolor: red;\n    position: absolute;\n    width: 100%;\n    text-align: center;\n}\n\n.geTempDlgImportCat {\n\tfont-weight: bold;\n    background: #f9f9f9;\n    padding: 5px 0px;\n    padding: 10px;\n    margin: 10px 10px 0px 0px;\n}\n/* Comments CSS */\n.geCommentsWin {\n\tuser-select: none;\n\tborder: 1px solid whiteSmoke;\n\theight: 100%;\n\tmargin-bottom: 10px;\n\toverflow: auto;\t\n}\n\n.geCommentsToolbar {\n\tposition: absolute;\n\tbottom: 0px;\n\tleft: 0px;\n\tright: 0px;\n\toverflow: hidden;\n\tborder-width: 1px 0px 0px 0px;\n\tborder-color: #c3c3c3;\n\tborder-style: solid;\n\tdisplay: block;\n\twhite-space: nowrap;\n}\n\n.geCommentsList {\n\tposition: absolute;\n\toverflow: auto;\n\tleft: 0px;\n\tright: 0px;\n\ttop: 0px;\t\n}\n\n.geCommentContainer {\n\tposition: relative;\n\tpadding: 12px;\n\tmargin: 5px;\n\tmin-height: 50px;\n\tdisplay: block;\n\tbackground-color: white;\n\tborder-width: 0px 0px 1px 0px;\n\tborder-color: #c3c3c3;\n\tborder-style: solid;\n\tborder-radius: 10px;\n\twhite-space: nowrap;\n\tbox-shadow: 2px 2px 6px rgba(60,64,67,.15);\n\tcolor: #3C4043;\n}\n\n.geCommentHeader {\n\twidth: 100%;\n\theight: 32px;\n}\n\n.geCommentUserImg {\n\twidth: 32px;\n\theight: 32px;\n\tborder-radius: 50%;\n\tfloat: left;\n\tbackground-color: whitesmoke;\n}\n\n.geCommentHeaderTxt {\n\toverflow: hidden;\n\theight: 32px;\n\tpadding-left: 5px;\n}\n\n.geCommentUsername {\n\toverflow: hidden;\n\theight: 18px;\n\tfont-size: 15px;\n\tfont-weight: bold;\n\ttext-overflow: ellipsis;\n}\n\n.geCommentDate {\n\tcolor: #707070;\n\toverflow: hidden;\n\theight: 14px;\n\tfont-size: 11px;\n\ttext-overflow: ellipsis;\n}\n\n.geCommentDate::first-letter {\n    text-transform: uppercase;\n}\n\n.geCommentTxt {\n\tfont-size: 14px;\n    padding-top: 5px;\n    white-space: normal;\n    min-height: 12px;\n}\n\n.geCommentEditTxtArea {\n    margin-top: 5px;\n    font-size: 14px !important;\n    min-height: 12px;\n    max-width: 100%;\n    min-width: 100%;\n\twidth: 100%;\n    box-sizing: border-box;\n}\n\n.geCommentEditBtns {\n\twidth: 100%;\n    box-sizing: border-box;\n    padding-top: 5px;\n    height: 20px;\n}\n\n.geCommentEditBtn {\n\tpadding: 3px 8px 3px 8px !important;\n    float: right !important;\n    margin-left: 5px;\n}\n\n.geCommentActions {\n\tcolor: #707070;\n\tfont-size: 12px;\n}\n\n.geCommentActionsList {\n\tlist-style-type: disc;\n\tmargin: 0px;\n\tpadding: 10px 0 0 0;\n}\n\n.geCommentAction {\n\tdisplay: inline-block;\n    padding: 0;\n}\n\n.geCommentAction:before {\n\tcontent: \"\\2022\";\n\tpadding: 5px;\n} \n\n.geCommentAction:first-child:before {\n\tcontent: \"\";\n\tpadding: 0;\n} \n\n.geCommentActionLnk {\n\tcursor: pointer;\n\tcolor: #707070;\n\ttext-decoration: none;\n}\n\n.geCommentActionLnk:hover {\n\ttext-decoration: underline;\n}\n\n.geCheckedBtn {\n\tbackground-color: #ccc;\n    border-top: 1px solid black !important;\n    border-left: 1px solid black !important;\n}\n\n.geCommentBusyImg {\n\tposition: absolute;\n\ttop: 5px;\n\tright: 5px;\n}\n\n.geAspectDlgListItem \n{\n\twidth : 120px;\n\theight : 120px;\n\tdisplay : inline-block;\n\tborder: 3px solid #F0F0F0;\n\tborder-radius: 5px;\n\tpadding: 5px;\n\tmargin : 2px 2px 20px 2px;\n}\n\n.geAspectDlgListItem:hover\n{\n\tborder: 3px solid #c5c5c5;\n}\n\n.geAspectDlgListItemSelected \n{\n\tborder: 3px solid #3b73af;\n}\n\n.geAspectDlgListItemSelected:hover\n{\n\tborder: 3px solid #405a86;\n}\n\n.geAspectDlgListItemText\n{\n\ttext-overflow: ellipsis;\n\tmax-width: 100%;\n\tmin-height : 2em;\n\toverflow : hidden;\n\ttext-align : center;\n\tmargin-top : 10px;\n}\n\n.geAspectDlgList\n{\n\tmin-height: 184px;\n\twhite-space: nowrap;\n}\n\n.geStripedTable\n{\n\tborder-collapse: collapse;\n \twidth: 100%;\n \ttable-layout: fixed;\n}\n\n.geStripedTable td, .geStripedTable th\n{\n\tborder: 1px solid #ddd;\n\ttext-align: left;\n\tpadding: 2px;\n\twhite-space: nowrap;\n\toverflow: hidden;\n\ttext-overflow: ellipsis;\n}\n\n.geStripedTable tr:nth-child(odd){background-color: #f2f2f2;}\n\n.geStripedTable tr:hover {background-color: #ddd;}\n\n.geStripedTable th {\n  padding-top: 4px;\n  padding-bottom: 4px;\n  background-color: #bbb;\n}\n\n.geNotification-box {\n\tdisplay:flex;\n\ttext-align: center;\n\tposition: relative;\n\tcursor: pointer;\n\twidth: 20px;\n}\n.geNotification-bell {\n  animation: geBellAnim 1s 1s both;\n}\n.geNotification-bell * {\n  display: block;\n  margin: 0 auto;\n  background-color: #656565;\n}\n\n.geBell-top {\n  width: 2px;\n  height: 2px;\n  border-radius: 1px 1px 0 0;\n}\n.geBell-middle {\n  width: 12px;\n  height: 12px;\n  margin-top: -1px;\n  border-radius: 7px 7px 0 0;\n}\n.geBell-bottom {\n  position: relative;\n  z-index: 0;\n  width: 16px;\n  height: 1px;\n}\n.geBell-bottom::before,\n.geBell-bottom::after {\n  content: '';\n  position: absolute;\n  top: -4px;\n}\n.geBell-bottom::before {\n  left: 1px;\n  border-bottom-width: 4px;\n  border-right: 0 solid transparent;\n  border-left: 4px solid transparent;\n}\n.geBell-bottom::after {\n  right: 1px;\n  border-bottom-width: 4px;\n  border-right: 4px solid transparent;\n  border-left: 0 solid transparent;\n}\n.geBell-rad {\n  width: 3px;\n  height: 2px;\n  margin-top: 0.5px;\n  border-radius: 0 0 2px 2px;\n  animation: geRadAnim 1s 2s both;\n}\n.geNotification-count {\n  position: absolute;\n  z-index: 1;\n  top: -5px;\n  right: -4px;\n  width: 13px;\n  height: 13px;\n  line-height: 13px;\n  font-size: 8px;\n  border-radius: 50%;\n  background-color: #ff4927;\n  color: #FFF;\n  animation: geZoomAnim 1s 1s both;\n}\n@keyframes geBellAnim {\n  0% { transform: rotate(0); }\n  10% { transform: rotate(30deg); }\n  20% { transform: rotate(0); }\n  80% { transform: rotate(0); }\n  90% { transform: rotate(-30deg); }\n  100% { transform: rotate(0); }\n}\n@keyframes geRadAnim {\n  0% { transform: translateX(0); }\n  10% { transform: translateX(5px); }\n  20% { transform: translateX(0); }\n  80% { transform: translateX(0); }\n  90% { transform: translateX(-5px); }\n  100% { transform: translateX(0); }\n}\n@keyframes geZoomAnim {\n  0% { opacity: 0; transform: scale(0); }\n  50% { opacity: 1; transform: scale(1); }\n  100% { opacity: 1; }\n}\n\n.geNotifPanel {\n  height: 300px;\n  width: 300px;\n  background: #fff;\n  border-radius: 3px;\n  overflow: hidden;\n  -webkit-box-shadow: 10px 10px 15px 0 rgba(0, 0, 0, 0.3);\n          box-shadow: 10px 10px 15px 0 rgba(0, 0, 0, 0.3);\n  -webkit-transition: all .5s ease-in-out;\n  transition: all .5s ease-in-out;\n  position: absolute;\n  right: 100px;\n  top: 42px;\n  z-index: 150;\n}\n.geNotifPanel .header {\n  background: #cecece;\n  color: #707070;\n  font-size: 15px;\n}\n.geNotifPanel .header .title {\n  display: block;\n  text-align: center;\n  line-height: 30px;\n  font-weight: 600;\n}\n.geNotifPanel .header .closeBtn {\n  position: absolute;\n  line-height: 30px;\n  cursor: pointer;\n  right: 15px;\n  top: 0;\n}\n.geNotifPanel .notifications {\n  position: relative;\n  height: 270px;\n  overflow-x: hidden;\n  overflow-y: auto;\n}\n.geNotifPanel .notifications .line {\n  position: absolute;\n  top: 0;\n  left: 27px;\n  height: 100%;\n  width: 3px;\n  background: #EBEBEB;\n}\n.geNotifPanel .notifications .notification {\n  position: relative;\n  z-index: 2;\n  margin: 25px 20px 25px 43px;\n}\n.geNotifPanel .notifications .notification:nth-child(n+1) {\n  animation: geHere-am-i 0.5s ease-out 0.4s;\n  animation-fill-mode: both;\n}\n.geNotifPanel .notifications .notification:hover {\n  color: #1B95E0;\n  cursor: pointer;\n}\n.geNotifPanel .notifications .notification .circle {\n  -webkit-box-sizing: border-box;\n          box-sizing: border-box;\n  position: absolute;\n  height: 11px;\n  width: 11px;\n  background: #fff;\n  border: 2px solid #1B95E0;\n  -webkit-box-shadow: 0 0 0 3px #fff;\n          box-shadow: 0 0 0 3px #fff;\n  border-radius: 6px;\n  top: 0;\n  left: -20px;\n}\n\n.geNotifPanel .notifications .notification .circle.active {\n  background: #1B95E0;\n}\n\n.geNotifPanel .notifications .notification .time {\n  display: block;\n  font-size: 11px;\n  line-height: 11px;\n  margin-bottom: 2px;\n}\n.geNotifPanel .notifications .notification p {\n  font-size: 15px;\n  line-height: 20px;\n  margin: 0;\n}\n.geNotifPanel .notifications .notification p b {\n  font-weight: 600;\n}\n@-webkit-keyframes geHere-am-i {\n  from {\n    -webkit-transform: translate3d(0, 50px, 0);\n            transform: translate3d(0, 50px, 0);\n    opacity: 0;\n  }\n  to {\n    -webkit-transform: translate3d(0, 0, 0);\n            transform: translate3d(0, 0, 0);\n    opacity: 1;\n  }\n}\n\n@keyframes geHere-am-i {\n  from {\n    -webkit-transform: translate3d(0, 50px, 0);\n            transform: translate3d(0, 50px, 0);\n    opacity: 0;\n  }\n  to {\n    -webkit-transform: translate3d(0, 0, 0);\n            transform: translate3d(0, 0, 0);\n    opacity: 1;\n  }\n}\n\n.geTempTree {\n  margin: 0;\n  padding: 0;\n}\n\n.geTempTree, .geTempTreeActive, .geTempTreeNested {\n  list-style-type: none;\n  transition: all 0.5s;\n}\n\n.geTempTreeCaret {\n  box-sizing: border-box;\n  cursor: pointer;\n  user-select: none;\n  padding: 6px;\n  width: 100%;\n  transition: all 0.5s;\n}\n\n.geTempTreeCaret::before {\n  content: \"\\25B6\";\n  display: inline-block;\n  font-size: 10px;\n  margin-right: 6px;\n}\n\n.geTempTreeCaret-down::before {\n  transform: rotate(90deg);  \n}\n\n.geTempTreeNested {\n  height: 0;\n  opacity: 0;\n}\n\n.geTempTreeActive {\n  height: 100%;\n  opacity: 1;\n}\n\n.geTempTreeActive, .geTempTreeNested {\n  padding-left: 15px;\n}\n\n.geTempTreeActive > li, .geTempTreeNested > li {\n  box-sizing: border-box;\n  padding: 3px;\n  width: 100%;\n  cursor: pointer;\n  user-select: none;\n  transition: all 0.5s;\n}\n\n/*Electron Window Controls*/\n#geWindow-controls {\n  display: grid;\n  grid-template-columns: repeat(3, 30px);\n  position: absolute;\n  top: 2px;\n  right: 3px;\n  height: 22px;\n  -webkit-app-region: no-drag;\n}\n\n#geWindow-controls .button {\n  grid-row: 1 / span 1;\n  display: flex;\n  justify-content: center;\n  align-items: center;\n  width: 100%;\n  height: 100%;\n  user-select: none;\n}\n#min-button {\n  grid-column: 1;\n}\n#max-button, #restore-button {\n  grid-column: 2;\n}\n#close-button {\n  grid-column: 3;\n}\n#geWindow-controls .button.dark:hover {\n  background: rgba(255,255,255,0.1);\n}\n#geWindow-controls .button.dark:active {\n  background: rgba(255,255,255,0.2);\n}\n\n#geWindow-controls .button.white:hover {\n  background: rgba(0,0,0,0.1);\n}\n#geWindow-controls .button.white:active {\n  background: rgba(0,0,0,0.2);\n}\n\n#close-button:hover {\n  background: #E81123 !important;\n}\n#close-button:active {\n  background: #F1707A !important;\n}\n\n#restore-button {\n  display: none !important;\n}\n/*\n.geMaximized #titlebar {\n  width: 100%;\n  padding: 0;\n}\n*/\n.geMaximized #restore-button {\n  display: flex !important;\n}\n\n.geMaximized #max-button {\n  display: none;\n}\n[draggable=\"true\"] {\n    transform: translate(0, 0);\n    z-index: 0;\n}\n"
  },
  {
    "path": "static/cherry/drawio_demo/image/stencils/arrows.xml",
    "content": "<shapes name=\"mxGraph.arrows\">\n<shape name=\"Arrow Down\" h=\"97.5\" w=\"70\" aspect=\"variable\" strokewidth=\"inherit\">\n<connections>\n<constraint x=\"0.5\" y=\"0\" perimeter=\"0\" name=\"N\"/>\n<constraint x=\"0.5\" y=\"1\" perimeter=\"0\" name=\"S\"/>\n</connections>\n<background>\n<path>\n<move x=\"20\" y=\"0\"/>\n<line x=\"20\" y=\"59\"/>\n<line x=\"0\" y=\"59\"/>\n<line x=\"35\" y=\"97.5\"/>\n<line x=\"70\" y=\"59\"/>\n<line x=\"50\" y=\"59\"/>\n<line x=\"50\" y=\"0\"/>\n<close/>\n</path>\n</background>\n<foreground>\n<fillstroke/>\n</foreground>\n</shape>\n<shape name=\"Arrow Left\" h=\"70\" w=\"97.5\" aspect=\"variable\" strokewidth=\"inherit\">\n<connections>\n<constraint x=\"0\" y=\"0.5\" perimeter=\"0\" name=\"W\"/>\n<constraint x=\"1\" y=\"0.5\" perimeter=\"0\" name=\"E\"/>\n</connections>\n<background>\n<path>\n<move x=\"97.5\" y=\"20\"/>\n<line x=\"38.5\" y=\"20\"/>\n<line x=\"38.5\" y=\"0\"/>\n<line x=\"0\" y=\"35\"/>\n<line x=\"38.5\" y=\"70\"/>\n<line x=\"38.5\" y=\"50\"/>\n<line x=\"97.5\" y=\"50\"/>\n<close/>\n</path>\n</background>\n<foreground>\n<fillstroke/>\n</foreground>\n</shape>\n<shape name=\"Arrow Right\" h=\"70\" w=\"97.5\" aspect=\"variable\" strokewidth=\"inherit\">\n<connections>\n<constraint x=\"0\" y=\"0.5\" perimeter=\"0\" name=\"W\"/>\n<constraint x=\"1\" y=\"0.5\" perimeter=\"0\" name=\"E\"/>\n</connections>\n<background>\n<path>\n<move x=\"0\" y=\"20\"/>\n<line x=\"59\" y=\"20\"/>\n<line x=\"59\" y=\"0\"/>\n<line x=\"97.5\" y=\"35\"/>\n<line x=\"59\" y=\"70\"/>\n<line x=\"59\" y=\"50\"/>\n<line x=\"0\" y=\"50\"/>\n<close/>\n</path>\n</background>\n<foreground>\n<fillstroke/>\n</foreground>\n</shape>\n<shape name=\"Arrow Up\" h=\"97.5\" w=\"70\" aspect=\"variable\" strokewidth=\"inherit\">\n<connections>\n<constraint x=\"0.5\" y=\"0\" perimeter=\"0\" name=\"N\"/>\n<constraint x=\"0.5\" y=\"1\" perimeter=\"0\" name=\"S\"/>\n</connections>\n<background>\n<path>\n<move x=\"20\" y=\"97.5\"/>\n<line x=\"20\" y=\"38.5\"/>\n<line x=\"0\" y=\"38.5\"/>\n<line x=\"35\" y=\"0\"/>\n<line x=\"70\" y=\"38.5\"/>\n<line x=\"50\" y=\"38.5\"/>\n<line x=\"50\" y=\"97.5\"/>\n<close/>\n</path>\n</background>\n<foreground>\n<fillstroke/>\n</foreground>\n</shape>\n<shape name=\"Bent Left Arrow\" h=\"97\" w=\"97.01\" aspect=\"variable\" strokewidth=\"inherit\">\n<connections>\n<constraint x=\"0.85\" y=\"1\" perimeter=\"0\" name=\"S\"/>\n<constraint x=\"0\" y=\"0.29\" perimeter=\"0\" name=\"W\"/>\n</connections>\n<background>\n<path>\n<move x=\"68\" y=\"97\"/>\n<line x=\"68\" y=\"48\"/>\n<arc rx=\"5\" ry=\"5\" x-axis-rotation=\"0\" large-arc-flag=\"0\" sweep-flag=\"0\" x=\"63\" y=\"43\"/>\n<line x=\"38\" y=\"43\"/>\n<line x=\"38\" y=\"56\"/>\n<line x=\"0\" y=\"28\"/>\n<line x=\"38\" y=\"0\"/>\n<line x=\"38\" y=\"13\"/>\n<line x=\"63\" y=\"13\"/>\n<arc rx=\"35\" ry=\"35\" x-axis-rotation=\"0\" large-arc-flag=\"0\" sweep-flag=\"1\" x=\"97\" y=\"48\"/>\n<line x=\"97\" y=\"97\"/>\n<close/>\n</path>\n</background>\n<foreground>\n<fillstroke/>\n</foreground>\n</shape>\n<shape name=\"Bent Right Arrow\" h=\"97\" w=\"97.01\" aspect=\"variable\" strokewidth=\"inherit\">\n<connections>\n<constraint x=\"0.15\" y=\"1\" perimeter=\"0\" name=\"S\"/>\n<constraint x=\"1\" y=\"0.29\" perimeter=\"0\" name=\"E\"/>\n</connections>\n<background>\n<path>\n<move x=\"29.01\" y=\"97\"/>\n<line x=\"29.01\" y=\"48\"/>\n<arc rx=\"5\" ry=\"5\" x-axis-rotation=\"0\" large-arc-flag=\"0\" sweep-flag=\"1\" x=\"34.01\" y=\"43\"/>\n<line x=\"59.01\" y=\"43\"/>\n<line x=\"59.01\" y=\"56\"/>\n<line x=\"97.01\" y=\"28\"/>\n<line x=\"59.01\" y=\"0\"/>\n<line x=\"59.01\" y=\"13\"/>\n<line x=\"34.01\" y=\"13\"/>\n<arc rx=\"35\" ry=\"35\" x-axis-rotation=\"0\" large-arc-flag=\"0\" sweep-flag=\"0\" x=\"0.01\" y=\"48\"/>\n<line x=\"0.01\" y=\"97\"/>\n<close/>\n</path>\n</background>\n<foreground>\n<fillstroke/>\n</foreground>\n</shape>\n<shape name=\"Bent Up Arrow\" h=\"83.5\" w=\"97\" aspect=\"variable\" strokewidth=\"inherit\">\n<connections>\n<constraint x=\"0.71\" y=\"0\" perimeter=\"0\" name=\"N\"/>\n<constraint x=\"0\" y=\"0.82\" perimeter=\"0\" name=\"W\"/>\n</connections>\n<background>\n<path>\n<move x=\"0\" y=\"53.5\"/>\n<line x=\"54\" y=\"53.5\"/>\n<line x=\"54\" y=\"23.5\"/>\n<line x=\"42\" y=\"23.5\"/>\n<line x=\"69\" y=\"0\"/>\n<line x=\"97\" y=\"23.5\"/>\n<line x=\"84\" y=\"23.5\"/>\n<line x=\"84\" y=\"83.5\"/>\n<line x=\"0\" y=\"83.5\"/>\n<close/>\n</path>\n</background>\n<foreground>\n<fillstroke/>\n</foreground>\n</shape>\n<shape name=\"Callout Double Arrow\" h=\"97.5\" w=\"50\" aspect=\"variable\" strokewidth=\"inherit\">\n<connections>\n<constraint x=\"0.5\" y=\"0\" perimeter=\"0\" name=\"N\"/>\n<constraint x=\"0.5\" y=\"1\" perimeter=\"0\" name=\"S\"/>\n</connections>\n<background>\n<path>\n<move x=\"15\" y=\"24\"/>\n<line x=\"15\" y=\"19\"/>\n<line x=\"6\" y=\"19\"/>\n<line x=\"25\" y=\"0\"/>\n<line x=\"44\" y=\"19\"/>\n<line x=\"35\" y=\"19\"/>\n<line x=\"35\" y=\"24\"/>\n<line x=\"50\" y=\"24\"/>\n<line x=\"50\" y=\"74\"/>\n<line x=\"35\" y=\"74\"/>\n<line x=\"35\" y=\"79\"/>\n<line x=\"44\" y=\"79\"/>\n<line x=\"25\" y=\"97.5\"/>\n<line x=\"6\" y=\"79\"/>\n<line x=\"15\" y=\"79\"/>\n<line x=\"15\" y=\"74\"/>\n<line x=\"0\" y=\"74\"/>\n<line x=\"0\" y=\"24\"/>\n<close/>\n</path>\n</background>\n<foreground>\n<fillstroke/>\n</foreground>\n</shape>\n<shape name=\"Callout Quad Arrow\" h=\"97\" w=\"97\" aspect=\"variable\" strokewidth=\"inherit\">\n<connections>\n<constraint x=\"0.5\" y=\"0\" perimeter=\"0\" name=\"N\"/>\n<constraint x=\"0.5\" y=\"1\" perimeter=\"0\" name=\"S\"/>\n<constraint x=\"0\" y=\"0.5\" perimeter=\"0\" name=\"W\"/>\n<constraint x=\"1\" y=\"0.5\" perimeter=\"0\" name=\"E\"/>\n</connections>\n<background>\n<path>\n<move x=\"38.5\" y=\"23.5\"/>\n<line x=\"38.5\" y=\"18.5\"/>\n<line x=\"29.5\" y=\"18.5\"/>\n<line x=\"48.5\" y=\"0\"/>\n<line x=\"67.5\" y=\"18.5\"/>\n<line x=\"58.5\" y=\"18.5\"/>\n<line x=\"58.5\" y=\"23.5\"/>\n<line x=\"73.5\" y=\"23.5\"/>\n<line x=\"73.5\" y=\"38.5\"/>\n<line x=\"78.5\" y=\"38.5\"/>\n<line x=\"78.5\" y=\"29.5\"/>\n<line x=\"97\" y=\"48.5\"/>\n<line x=\"78.5\" y=\"67.5\"/>\n<line x=\"78.5\" y=\"58.5\"/>\n<line x=\"73.5\" y=\"58.5\"/>\n<line x=\"73.5\" y=\"73.5\"/>\n<line x=\"58.5\" y=\"73.5\"/>\n<line x=\"58.5\" y=\"78.5\"/>\n<line x=\"67.5\" y=\"78.5\"/>\n<line x=\"48.5\" y=\"97\"/>\n<line x=\"29.5\" y=\"78.5\"/>\n<line x=\"38.5\" y=\"78.5\"/>\n<line x=\"38.5\" y=\"73.5\"/>\n<line x=\"23.5\" y=\"73.5\"/>\n<line x=\"23.5\" y=\"58.5\"/>\n<line x=\"18.5\" y=\"58.5\"/>\n<line x=\"18.5\" y=\"67.5\"/>\n<line x=\"0\" y=\"48.5\"/>\n<line x=\"18.5\" y=\"29.5\"/>\n<line x=\"18.5\" y=\"38.5\"/>\n<line x=\"23.5\" y=\"38.5\"/>\n<line x=\"23.5\" y=\"23.5\"/>\n<close/>\n</path>\n</background>\n<foreground>\n<fillstroke/>\n</foreground>\n</shape>\n<shape name=\"Callout Up Arrow\" h=\"98\" w=\"60\" aspect=\"variable\" strokewidth=\"inherit\">\n<connections>\n<constraint x=\"0.5\" y=\"0\" perimeter=\"0\" name=\"N\"/>\n</connections>\n<background>\n<path>\n<move x=\"20\" y=\"39\"/>\n<line x=\"20\" y=\"19\"/>\n<line x=\"11\" y=\"19\"/>\n<line x=\"30\" y=\"0\"/>\n<line x=\"49\" y=\"19\"/>\n<line x=\"40\" y=\"19\"/>\n<line x=\"40\" y=\"39\"/>\n<line x=\"60\" y=\"39\"/>\n<line x=\"60\" y=\"98\"/>\n<line x=\"0\" y=\"98\"/>\n<line x=\"0\" y=\"39\"/>\n<close/>\n</path>\n</background>\n<foreground>\n<fillstroke/>\n</foreground>\n</shape>\n<shape name=\"Chevron Arrow\" h=\"60\" w=\"96\" aspect=\"variable\" strokewidth=\"inherit\">\n<connections>\n<constraint x=\"0.31\" y=\"0.5\" perimeter=\"0\" name=\"W\"/>\n<constraint x=\"1\" y=\"0.5\" perimeter=\"0\" name=\"E\"/>\n</connections>\n<background>\n<path>\n<move x=\"30\" y=\"30\"/>\n<line x=\"0\" y=\"0\"/>\n<line x=\"66\" y=\"0\"/>\n<line x=\"96\" y=\"30\"/>\n<line x=\"66\" y=\"60\"/>\n<line x=\"0\" y=\"60\"/>\n<close/>\n</path>\n</background>\n<foreground>\n<fillstroke/>\n</foreground>\n</shape>\n<shape name=\"Circular Arrow\" h=\"69.5\" w=\"97\" aspect=\"variable\" strokewidth=\"inherit\">\n<connections>\n<constraint x=\"0.12\" y=\"0.64\" perimeter=\"0\" name=\"SW\"/>\n<constraint x=\"0.794\" y=\"1\" perimeter=\"0\" name=\"SE\"/>\n</connections>\n<background>\n<path>\n<move x=\"0\" y=\"44.5\"/>\n<arc rx=\"44.5\" ry=\"44.5\" x-axis-rotation=\"0\" large-arc-flag=\"0\" sweep-flag=\"1\" x=\"89\" y=\"44.5\"/>\n<line x=\"97\" y=\"44.5\"/>\n<line x=\"77\" y=\"69.5\"/>\n<line x=\"57\" y=\"44.5\"/>\n<line x=\"65\" y=\"44.5\"/>\n<arc rx=\"20.5\" ry=\"20.5\" x-axis-rotation=\"0\" large-arc-flag=\"0\" sweep-flag=\"0\" x=\"24\" y=\"44.5\"/>\n<close/>\n</path>\n</background>\n<foreground>\n<fillstroke/>\n</foreground>\n</shape>\n<shape name=\"Jump-in Arrow 1\" h=\"99.41\" w=\"96\" aspect=\"variable\" strokewidth=\"inherit\">\n<connections>\n<constraint x=\"0\" y=\"0.024\" perimeter=\"0\" name=\"NW\"/>\n<constraint x=\"0.657\" y=\"1\" perimeter=\"0\" name=\"S\"/>\n</connections>\n<background>\n\n<linejoin join=\"round\"/>\n<path>\n<move x=\"30\" y=\"60.41\"/>\n<line x=\"48\" y=\"60.41\"/>\n<arc rx=\"60\" ry=\"60\" x-axis-rotation=\"0\" large-arc-flag=\"0\" sweep-flag=\"0\" x=\"0\" y=\"2.41\"/>\n<arc rx=\"75\" ry=\"75\" x-axis-rotation=\"0\" large-arc-flag=\"0\" sweep-flag=\"1\" x=\"78\" y=\"60.41\"/>\n<line x=\"96\" y=\"60.41\"/>\n<line x=\"63\" y=\"99.41\"/>\n<close/>\n</path>\n</background>\n<foreground>\n<fillstroke/>\n</foreground>\n</shape>\n<shape name=\"Jump-in Arrow 2\" h=\"99.41\" w=\"96\" aspect=\"variable\" strokewidth=\"inherit\">\n<connections>\n<constraint x=\"1\" y=\"0.024\" perimeter=\"0\" name=\"NE\"/>\n<constraint x=\"0.343\" y=\"1\" perimeter=\"0\" name=\"S\"/>\n</connections>\n<background>\n\n<linejoin join=\"round\"/>\n<path>\n<move x=\"66\" y=\"60.41\"/>\n<line x=\"48\" y=\"60.41\"/>\n<arc rx=\"60\" ry=\"60\" x-axis-rotation=\"0\" large-arc-flag=\"0\" sweep-flag=\"1\" x=\"96\" y=\"2.41\"/>\n<arc rx=\"75\" ry=\"75\" x-axis-rotation=\"0\" large-arc-flag=\"0\" sweep-flag=\"0\" x=\"18\" y=\"60.41\"/>\n<line x=\"0\" y=\"60.41\"/>\n<line x=\"33\" y=\"99.41\"/>\n<close/>\n</path>\n</background>\n<foreground>\n<fillstroke/>\n</foreground>\n</shape>\n<shape name=\"Left and Up Arrow\" h=\"96.5\" w=\"96.5\" aspect=\"variable\" strokewidth=\"inherit\">\n<connections>\n<constraint x=\"0\" y=\"0.71\" perimeter=\"0\" name=\"W\"/>\n<constraint x=\"0.71\" y=\"0\" perimeter=\"0\" name=\"N\"/>\n</connections>\n<background>\n<path>\n<move x=\"23.5\" y=\"53.5\"/>\n<line x=\"53.5\" y=\"53.5\"/>\n<line x=\"53.5\" y=\"23.5\"/>\n<line x=\"41.5\" y=\"23.5\"/>\n<line x=\"68.5\" y=\"0\"/>\n<line x=\"96.5\" y=\"23.5\"/>\n<line x=\"83.5\" y=\"23.5\"/>\n<line x=\"83.5\" y=\"83.5\"/>\n<line x=\"23.5\" y=\"83.5\"/>\n<line x=\"23.5\" y=\"96.5\"/>\n<line x=\"0\" y=\"68.5\"/>\n<line x=\"23.5\" y=\"41.5\"/>\n<close/>\n</path>\n</background>\n<foreground>\n<fillstroke/>\n</foreground>\n</shape>\n<shape name=\"Left Sharp Edged Head Arrow\" h=\"60\" w=\"97.5\" aspect=\"variable\" strokewidth=\"inherit\">\n<connections>\n<constraint x=\"0\" y=\"0.5\" perimeter=\"0\" name=\"W\"/>\n<constraint x=\"1\" y=\"0.5\" perimeter=\"0\" name=\"E\"/>\n</connections>\n<background>\n<path>\n<move x=\"97.5\" y=\"20\"/>\n<line x=\"18.5\" y=\"20\"/>\n<line x=\"30.5\" y=\"0\"/>\n<line x=\"18.5\" y=\"0\"/>\n<line x=\"0\" y=\"30\"/>\n<line x=\"18.5\" y=\"60\"/>\n<line x=\"30.5\" y=\"60\"/>\n<line x=\"18.5\" y=\"40\"/>\n<line x=\"97.5\" y=\"40\"/>\n<close/>\n</path>\n</background>\n<foreground>\n<fillstroke/>\n</foreground>\n</shape>\n<shape name=\"Notched Signal-in Arrow\" h=\"30\" w=\"96.5\" aspect=\"variable\" strokewidth=\"inherit\">\n<connections>\n<constraint x=\"0.13\" y=\"0.5\" perimeter=\"0\" name=\"W\"/>\n<constraint x=\"1\" y=\"0.5\" perimeter=\"0\" name=\"E\"/>\n</connections>\n<background>\n<path>\n<move x=\"0\" y=\"0\"/>\n<line x=\"83\" y=\"0\"/>\n<line x=\"96.5\" y=\"15\"/>\n<line x=\"83\" y=\"30\"/>\n<line x=\"0\" y=\"30\"/>\n<line x=\"13\" y=\"15\"/>\n<close/>\n</path>\n</background>\n<foreground>\n<fillstroke/>\n</foreground>\n</shape>\n<shape name=\"Quad Arrow\" h=\"97.5\" w=\"97.5\" aspect=\"variable\" strokewidth=\"inherit\">\n<connections>\n<constraint x=\"0.5\" y=\"0\" perimeter=\"0\" name=\"N\"/>\n<constraint x=\"0.5\" y=\"1\" perimeter=\"0\" name=\"S\"/>\n<constraint x=\"0\" y=\"0.5\" perimeter=\"0\" name=\"W\"/>\n<constraint x=\"1\" y=\"0.5\" perimeter=\"0\" name=\"E\"/>\n</connections>\n<background>\n<path>\n<move x=\"39\" y=\"39\"/>\n<line x=\"39\" y=\"19\"/>\n<line x=\"30\" y=\"19\"/>\n<line x=\"49\" y=\"0\"/>\n<line x=\"68\" y=\"19\"/>\n<line x=\"59\" y=\"19\"/>\n<line x=\"59\" y=\"39\"/>\n<line x=\"79\" y=\"39\"/>\n<line x=\"79\" y=\"30\"/>\n<line x=\"97.5\" y=\"49\"/>\n<line x=\"79\" y=\"68\"/>\n<line x=\"79\" y=\"59\"/>\n<line x=\"59\" y=\"59\"/>\n<line x=\"59\" y=\"79\"/>\n<line x=\"68\" y=\"79\"/>\n<line x=\"49\" y=\"97.5\"/>\n<line x=\"30\" y=\"79\"/>\n<line x=\"39\" y=\"79\"/>\n<line x=\"39\" y=\"59\"/>\n<line x=\"19\" y=\"59\"/>\n<line x=\"19\" y=\"68\"/>\n<line x=\"0\" y=\"49\"/>\n<line x=\"19\" y=\"30\"/>\n<line x=\"19\" y=\"39\"/>\n<close/>\n</path>\n</background>\n<foreground>\n<fillstroke/>\n</foreground>\n</shape>\n<shape name=\"Right Notched Arrow\" h=\"70\" w=\"96.5\" aspect=\"variable\" strokewidth=\"inherit\">\n<connections>\n<constraint x=\"0.13\" y=\"0.5\" perimeter=\"0\" name=\"W\"/>\n<constraint x=\"1\" y=\"0.5\" perimeter=\"0\" name=\"E\"/>\n</connections>\n<background>\n<path>\n<move x=\"0\" y=\"20\"/>\n<line x=\"58\" y=\"20\"/>\n<line x=\"58\" y=\"0\"/>\n<line x=\"96.5\" y=\"35\"/>\n<line x=\"58\" y=\"70\"/>\n<line x=\"58\" y=\"50\"/>\n<line x=\"0\" y=\"50\"/>\n<line x=\"13\" y=\"35\"/>\n<close/>\n</path>\n</background>\n<foreground>\n<fillstroke/>\n</foreground>\n</shape>\n<shape name=\"Sharp Edged Arrow\" h=\"60\" w=\"97.5\" aspect=\"variable\" strokewidth=\"inherit\">\n<connections>\n<constraint x=\"0\" y=\"0.5\" perimeter=\"0\" name=\"W\"/>\n<constraint x=\"1\" y=\"0.5\" perimeter=\"0\" name=\"E\"/>\n</connections>\n<background>\n<path>\n<move x=\"97.5\" y=\"20\"/>\n<line x=\"18.5\" y=\"20\"/>\n<line x=\"27.5\" y=\"5\"/>\n<line x=\"18.5\" y=\"0\"/>\n<line x=\"0\" y=\"30\"/>\n<line x=\"18.5\" y=\"60\"/>\n<line x=\"27.5\" y=\"55\"/>\n<line x=\"18.5\" y=\"40\"/>\n<line x=\"97.5\" y=\"40\"/>\n<close/>\n</path>\n</background>\n<foreground>\n<fillstroke/>\n</foreground>\n</shape>\n<shape name=\"Signal-in Arrow\" h=\"30\" w=\"97.5\" aspect=\"variable\" strokewidth=\"inherit\">\n<connections>\n<constraint x=\"0\" y=\"0.5\" perimeter=\"0\" name=\"W\"/>\n<constraint x=\"1\" y=\"0.5\" perimeter=\"0\" name=\"E\"/>\n</connections>\n<background>\n<path>\n<move x=\"0\" y=\"0\"/>\n<line x=\"84\" y=\"0\"/>\n<line x=\"97.5\" y=\"15\"/>\n<line x=\"84\" y=\"30\"/>\n<line x=\"0\" y=\"30\"/>\n<close/>\n</path>\n</background>\n<foreground>\n<fillstroke/>\n</foreground>\n</shape>\n<shape name=\"Slender Left Arrow\" h=\"60\" w=\"97.5\" aspect=\"variable\" strokewidth=\"inherit\">\n<connections>\n<constraint x=\"0\" y=\"0.5\" perimeter=\"0\" name=\"W\"/>\n<constraint x=\"1\" y=\"0.5\" perimeter=\"0\" name=\"E\"/>\n</connections>\n<background>\n<path>\n<move x=\"97.5\" y=\"20\"/>\n<line x=\"18.5\" y=\"20\"/>\n<line x=\"18.5\" y=\"0\"/>\n<line x=\"0\" y=\"30\"/>\n<line x=\"18.5\" y=\"60\"/>\n<line x=\"18.5\" y=\"40\"/>\n<line x=\"97.5\" y=\"40\"/>\n<close/>\n</path>\n</background>\n<foreground>\n<fillstroke/>\n</foreground>\n</shape>\n<shape name=\"Slender Two Way Arrow\" h=\"60\" w=\"97.5\" aspect=\"variable\" strokewidth=\"inherit\">\n<connections>\n<constraint x=\"0\" y=\"0.5\" perimeter=\"0\" name=\"W\"/>\n<constraint x=\"1\" y=\"0.5\" perimeter=\"0\" name=\"E\"/>\n</connections>\n<background>\n<path>\n<move x=\"78.5\" y=\"20\"/>\n<line x=\"18.5\" y=\"20\"/>\n<line x=\"18.5\" y=\"0\"/>\n<line x=\"0\" y=\"30\"/>\n<line x=\"18.5\" y=\"60\"/>\n<line x=\"18.5\" y=\"40\"/>\n<line x=\"78.5\" y=\"40\"/>\n<line x=\"78.5\" y=\"60\"/>\n<line x=\"97.5\" y=\"30\"/>\n<line x=\"78.5\" y=\"0\"/>\n<close/>\n</path>\n</background>\n<foreground>\n<fillstroke/>\n</foreground>\n</shape>\n<shape name=\"Slender Wide Tailed Arrow\" h=\"60\" w=\"96.5\" aspect=\"variable\" strokewidth=\"inherit\">\n<connections>\n<constraint x=\"0\" y=\"0.5\" perimeter=\"0\" name=\"W\"/>\n<constraint x=\"0.8\" y=\"0.5\" perimeter=\"0\" name=\"E\"/>\n</connections>\n<background>\n<path>\n<move x=\"58.5\" y=\"20\"/>\n<line x=\"18.5\" y=\"20\"/>\n<line x=\"18.5\" y=\"0\"/>\n<line x=\"0\" y=\"30\"/>\n<line x=\"18.5\" y=\"60\"/>\n<line x=\"18.5\" y=\"40\"/>\n<line x=\"58.5\" y=\"40\"/>\n<line x=\"73.5\" y=\"60\"/>\n<line x=\"96.5\" y=\"60\"/>\n<line x=\"76.5\" y=\"30\"/>\n<line x=\"96.5\" y=\"0\"/>\n<line x=\"73.5\" y=\"0\"/>\n<close/>\n</path>\n</background>\n<foreground>\n<fillstroke/>\n</foreground>\n</shape>\n<shape name=\"Striped Arrow\" h=\"70\" w=\"97.5\" aspect=\"variable\" strokewidth=\"inherit\">\n<connections>\n<constraint x=\"0\" y=\"0.5\" perimeter=\"0\" name=\"W\"/>\n<constraint x=\"1\" y=\"0.5\" perimeter=\"0\" name=\"E\"/>\n</connections>\n<background>\n<path>\n<move x=\"24\" y=\"20\"/>\n<line x=\"59\" y=\"20\"/>\n<line x=\"59\" y=\"0\"/>\n<line x=\"97.5\" y=\"35\"/>\n<line x=\"59\" y=\"70\"/>\n<line x=\"59\" y=\"50\"/>\n<line x=\"24\" y=\"50\"/>\n<close/>\n</path>\n</background>\n<foreground>\n<fillstroke/>\n<rect x=\"8\" y=\"20\" w=\"12\" h=\"30\"/>\n<fillstroke/>\n<rect x=\"0\" y=\"20\" w=\"4\" h=\"30\"/>\n<fillstroke/>\n</foreground>\n</shape>\n<shape name=\"Stylised Notched Arrow\" h=\"60\" w=\"96.5\" aspect=\"variable\" strokewidth=\"inherit\">\n<connections>\n<constraint x=\"0.13\" y=\"0.5\" perimeter=\"0\" name=\"W\"/>\n<constraint x=\"1\" y=\"0.5\" perimeter=\"0\" name=\"E\"/>\n</connections>\n<background>\n\n<miterlimit limit=\"8\"/>\n<path>\n<move x=\"0\" y=\"5\"/>\n<line x=\"68\" y=\"20\"/>\n<line x=\"58\" y=\"0\"/>\n<line x=\"96.5\" y=\"30\"/>\n<line x=\"58\" y=\"60\"/>\n<line x=\"68\" y=\"45\"/>\n<line x=\"0\" y=\"55\"/>\n<line x=\"13\" y=\"30\"/>\n<close/>\n</path>\n</background>\n<foreground>\n<fillstroke/>\n</foreground>\n</shape>\n<shape name=\"Triad Arrow\" h=\"68\" w=\"97.5\" aspect=\"variable\" strokewidth=\"inherit\">\n<connections>\n<constraint x=\"0\" y=\"0.72\" perimeter=\"0\" name=\"W\"/>\n<constraint x=\"1\" y=\"0.72\" perimeter=\"0\" name=\"E\"/>\n<constraint x=\"0.5\" y=\"0\" perimeter=\"0\" name=\"N\"/>\n</connections>\n<background>\n<path>\n<move x=\"39\" y=\"39\"/>\n<line x=\"39\" y=\"19\"/>\n<line x=\"30\" y=\"19\"/>\n<line x=\"49\" y=\"0\"/>\n<line x=\"68\" y=\"19\"/>\n<line x=\"59\" y=\"19\"/>\n<line x=\"59\" y=\"39\"/>\n<line x=\"79\" y=\"39\"/>\n<line x=\"79\" y=\"30\"/>\n<line x=\"97.5\" y=\"49\"/>\n<line x=\"79\" y=\"68\"/>\n<line x=\"79\" y=\"59\"/>\n<line x=\"39\" y=\"59\"/>\n<line x=\"19\" y=\"59\"/>\n<line x=\"19\" y=\"68\"/>\n<line x=\"0\" y=\"49\"/>\n<line x=\"19\" y=\"30\"/>\n<line x=\"19\" y=\"39\"/>\n<close/>\n</path>\n</background>\n<foreground>\n<fillstroke/>\n</foreground>\n</shape>\n<shape name=\"Two Way Arrow Horizontal\" h=\"60\" w=\"96\" aspect=\"variable\" strokewidth=\"inherit\">\n<connections>\n<constraint x=\"0\" y=\"0.5\" perimeter=\"0\" name=\"W\"/>\n<constraint x=\"1\" y=\"0.5\" perimeter=\"0\" name=\"E\"/>\n</connections>\n<background>\n<path>\n<move x=\"63\" y=\"15\"/>\n<line x=\"63\" y=\"0\"/>\n<line x=\"96\" y=\"30\"/>\n<line x=\"63\" y=\"60\"/>\n<line x=\"63\" y=\"45\"/>\n<line x=\"33\" y=\"45\"/>\n<line x=\"33\" y=\"60\"/>\n<line x=\"0\" y=\"30\"/>\n<line x=\"33\" y=\"0\"/>\n<line x=\"33\" y=\"15\"/>\n<close/>\n</path>\n</background>\n<foreground>\n<fillstroke/>\n</foreground>\n</shape>\n<shape name=\"Two Way Arrow Vertical\" h=\"96\" w=\"60\" aspect=\"variable\" strokewidth=\"inherit\">\n<connections>\n<constraint x=\"0.5\" y=\"0\" perimeter=\"0\" name=\"N\"/>\n<constraint x=\"0.5\" y=\"1\" perimeter=\"0\" name=\"S\"/>\n</connections>\n<background>\n<path>\n<move x=\"15\" y=\"63\"/>\n<line x=\"0\" y=\"63\"/>\n<line x=\"30\" y=\"96\"/>\n<line x=\"60\" y=\"63\"/>\n<line x=\"45\" y=\"63\"/>\n<line x=\"45\" y=\"33\"/>\n<line x=\"60\" y=\"33\"/>\n<line x=\"30\" y=\"0\"/>\n<line x=\"0\" y=\"33\"/>\n<line x=\"15\" y=\"33\"/>\n<close/>\n</path>\n</background>\n<foreground>\n<fillstroke/>\n</foreground>\n</shape>\n<shape name=\"U Turn Arrow\" h=\"98\" w=\"97\" aspect=\"variable\" strokewidth=\"inherit\">\n<connections>\n<constraint x=\"0.12\" y=\"1\" perimeter=\"0\" name=\"SW\"/>\n<constraint x=\"0.792\" y=\"0.71\" perimeter=\"0\" name=\"SE\"/>\n</connections>\n<background>\n<path>\n<move x=\"0\" y=\"44.5\"/>\n<arc rx=\"44.5\" ry=\"44.5\" x-axis-rotation=\"0\" large-arc-flag=\"0\" sweep-flag=\"1\" x=\"89\" y=\"44.5\"/>\n<line x=\"97\" y=\"44.5\"/>\n<line x=\"77\" y=\"69.5\"/>\n<line x=\"57\" y=\"44.5\"/>\n<line x=\"65\" y=\"44.5\"/>\n<arc rx=\"20.5\" ry=\"20.5\" x-axis-rotation=\"0\" large-arc-flag=\"0\" sweep-flag=\"0\" x=\"24\" y=\"44.83\"/>\n<line x=\"24\" y=\"98\"/>\n<line x=\"0\" y=\"98\"/>\n<close/>\n</path>\n</background>\n<foreground>\n<fillstroke/>\n</foreground>\n</shape>\n<shape name=\"U Turn Down Arrow\" h=\"62\" w=\"97\" aspect=\"variable\" strokewidth=\"inherit\">\n<connections>\n<constraint x=\"0.91\" y=\"1\" perimeter=\"0\" name=\"SE\"/>\n<constraint x=\"0.237\" y=\"1\" perimeter=\"0\" name=\"SW\"/>\n</connections>\n<background>\n<path>\n<move x=\"97\" y=\"62\"/>\n<line x=\"97\" y=\"32\"/>\n<arc rx=\"30\" ry=\"30\" x-axis-rotation=\"0\" large-arc-flag=\"0\" sweep-flag=\"0\" x=\"33\" y=\"32\"/>\n<line x=\"46\" y=\"32\"/>\n<line x=\"23\" y=\"62\"/>\n<line x=\"0\" y=\"32\"/>\n<line x=\"13\" y=\"32\"/>\n<arc rx=\"32\" ry=\"32\" x-axis-rotation=\"0\" large-arc-flag=\"0\" sweep-flag=\"1\" x=\"45\" y=\"0\"/>\n<line x=\"65\" y=\"0\"/>\n<arc rx=\"30\" ry=\"30\" x-axis-rotation=\"0\" large-arc-flag=\"0\" sweep-flag=\"0\" x=\"53\" y=\"3\"/>\n<arc rx=\"30\" ry=\"30\" x-axis-rotation=\"0\" large-arc-flag=\"0\" sweep-flag=\"1\" x=\"78\" y=\"32\"/>\n<line x=\"78\" y=\"62\"/>\n<close/>\n</path>\n</background>\n<foreground>\n<fillstroke/>\n</foreground>\n</shape>\n<shape name=\"U Turn Left Arrow\" h=\"97.07\" w=\"62.23\" aspect=\"variable\" strokewidth=\"inherit\">\n<connections>\n<constraint x=\"0\" y=\"0.76\" perimeter=\"0\" name=\"SW\"/>\n<constraint x=\"0\" y=\"0.1\" perimeter=\"0\" name=\"NW\"/>\n</connections>\n<background>\n<path>\n<move x=\"0\" y=\"0.19\"/>\n<line x=\"30\" y=\"0.07\"/>\n<arc rx=\"30\" ry=\"30\" x-axis-rotation=\"-90.22\" large-arc-flag=\"0\" sweep-flag=\"1\" x=\"30.25\" y=\"64.07\"/>\n<line x=\"30.2\" y=\"51.07\"/>\n<line x=\"0.29\" y=\"74.19\"/>\n<line x=\"30.37\" y=\"97.07\"/>\n<line x=\"30.32\" y=\"84.07\"/>\n<arc rx=\"32\" ry=\"32\" x-axis-rotation=\"-90.22\" large-arc-flag=\"0\" sweep-flag=\"0\" x=\"62.2\" y=\"51.95\"/>\n<line x=\"62.13\" y=\"31.95\"/>\n<arc rx=\"30\" ry=\"30\" x-axis-rotation=\"-90.22\" large-arc-flag=\"0\" sweep-flag=\"1\" x=\"59.17\" y=\"43.96\"/>\n<arc rx=\"30\" ry=\"30\" x-axis-rotation=\"-90.22\" large-arc-flag=\"0\" sweep-flag=\"0\" x=\"30.08\" y=\"19.07\"/>\n<line x=\"0.08\" y=\"19.19\"/>\n<close/>\n</path>\n</background>\n<foreground>\n<fillstroke/>\n</foreground>\n</shape>\n<shape name=\"U Turn Right Arrow\" h=\"97.07\" w=\"62.23\" aspect=\"variable\" strokewidth=\"inherit\">\n<connections>\n<constraint x=\"1\" y=\"0.76\" perimeter=\"0\" name=\"SW\"/>\n<constraint x=\"1\" y=\"0.1\" perimeter=\"0\" name=\"NW\"/>\n</connections>\n<background>\n<path>\n<move x=\"62.23\" y=\"0.19\"/>\n<line x=\"32.23\" y=\"0.07\"/>\n<arc rx=\"30\" ry=\"30\" x-axis-rotation=\"-89.78\" large-arc-flag=\"0\" sweep-flag=\"0\" x=\"31.99\" y=\"64.07\"/>\n<line x=\"32.03\" y=\"51.07\"/>\n<line x=\"61.95\" y=\"74.19\"/>\n<line x=\"31.86\" y=\"97.07\"/>\n<line x=\"31.91\" y=\"84.07\"/>\n<arc rx=\"32\" ry=\"32\" x-axis-rotation=\"-89.78\" large-arc-flag=\"0\" sweep-flag=\"1\" x=\"0.03\" y=\"51.95\"/>\n<line x=\"0.11\" y=\"31.95\"/>\n<arc rx=\"30\" ry=\"30\" x-axis-rotation=\"-89.78\" large-arc-flag=\"0\" sweep-flag=\"0\" x=\"3.06\" y=\"43.96\"/>\n<arc rx=\"30\" ry=\"30\" x-axis-rotation=\"-89.78\" large-arc-flag=\"0\" sweep-flag=\"1\" x=\"32.16\" y=\"19.07\"/>\n<line x=\"62.16\" y=\"19.19\"/>\n<close/>\n</path>\n</background>\n<foreground>\n<fillstroke/>\n</foreground>\n</shape>\n<shape name=\"U Turn Up Arrow\" h=\"62\" w=\"97\" aspect=\"variable\" strokewidth=\"inherit\">\n<connections>\n<constraint x=\"0.91\" y=\"0\" perimeter=\"0\" name=\"NE\"/>\n<constraint x=\"0.237\" y=\"0\" perimeter=\"0\" name=\"NW\"/>\n</connections>\n<background>\n<path>\n<move x=\"97\" y=\"0\"/>\n<line x=\"97\" y=\"30\"/>\n<arc rx=\"30\" ry=\"30\" x-axis-rotation=\"0\" large-arc-flag=\"0\" sweep-flag=\"1\" x=\"33\" y=\"30\"/>\n<line x=\"46\" y=\"30\"/>\n<line x=\"23\" y=\"0\"/>\n<line x=\"0\" y=\"30\"/>\n<line x=\"13\" y=\"30\"/>\n<arc rx=\"32\" ry=\"32\" x-axis-rotation=\"0\" large-arc-flag=\"0\" sweep-flag=\"0\" x=\"45\" y=\"62\"/>\n<line x=\"65\" y=\"62\"/>\n<arc rx=\"30\" ry=\"30\" x-axis-rotation=\"0\" large-arc-flag=\"0\" sweep-flag=\"1\" x=\"53\" y=\"59\"/>\n<arc rx=\"30\" ry=\"30\" x-axis-rotation=\"0\" large-arc-flag=\"0\" sweep-flag=\"0\" x=\"78\" y=\"30\"/>\n<line x=\"78\" y=\"0\"/>\n<close/>\n</path>\n</background>\n<foreground>\n<fillstroke/>\n</foreground>\n</shape>\n</shapes>"
  },
  {
    "path": "static/cherry/drawio_demo/image/stencils/basic.xml",
    "content": "<shapes name=\"mxgraph.basic\">\n<shape name=\"4 Point Star\" h=\"92\" w=\"92\" aspect=\"variable\" strokewidth=\"inherit\">\n<connections>\n<constraint x=\"0.5\" y=\"0\" perimeter=\"0\" name=\"N\"/>\n<constraint x=\"0.5\" y=\"1\" perimeter=\"0\" name=\"S\"/>\n<constraint x=\"0\" y=\"0.5\" perimeter=\"0\" name=\"W\"/>\n<constraint x=\"1\" y=\"0.5\" perimeter=\"0\" name=\"E\"/>\n</connections>\n<background>\n<path>\n<move x=\"46\" y=\"0\"/>\n<line x=\"56\" y=\"36\"/>\n<line x=\"92\" y=\"46\"/>\n<line x=\"56\" y=\"56\"/>\n<line x=\"46\" y=\"92\"/>\n<line x=\"36\" y=\"56\"/>\n<line x=\"0\" y=\"46\"/>\n<line x=\"36\" y=\"36\"/>\n<close/>\n</path>\n</background>\n<foreground>\n<fillstroke/>\n</foreground>\n</shape>\n<shape name=\"6 Point Star\" h=\"84.5\" w=\"96\" aspect=\"variable\" strokewidth=\"inherit\">\n<connections>\n<constraint x=\"0.24\" y=\"0\" perimeter=\"0\" name=\"N1\"/>\n<constraint x=\"0.24\" y=\"1\" perimeter=\"0\" name=\"S1\"/>\n<constraint x=\"0.76\" y=\"0\" perimeter=\"0\" name=\"N2\"/>\n<constraint x=\"0.76\" y=\"1\" perimeter=\"0\" name=\"S2\"/>\n<constraint x=\"0\" y=\"0.5\" perimeter=\"0\" name=\"W\"/>\n<constraint x=\"1\" y=\"0.5\" perimeter=\"0\" name=\"E\"/>\n</connections>\n<background>\n<path>\n<move x=\"23\" y=\"28.9\"/>\n<line x=\"23\" y=\"0\"/>\n<line x=\"48\" y=\"14.4\"/>\n<line x=\"73\" y=\"0\"/>\n<line x=\"73\" y=\"28.9\"/>\n<line x=\"96\" y=\"42.2\"/>\n<line x=\"73\" y=\"55.6\"/>\n<line x=\"73\" y=\"84.5\"/>\n<line x=\"48\" y=\"70\"/>\n<line x=\"23\" y=\"84.5\"/>\n<line x=\"23\" y=\"55.6\"/>\n<line x=\"0\" y=\"42.2\"/>\n<close/>\n</path>\n</background>\n<foreground>\n<fillstroke/>\n</foreground>\n</shape>\n<shape name=\"8 Point Star\" h=\"96\" w=\"96\" aspect=\"variable\" strokewidth=\"inherit\">\n<connections>\n<constraint x=\"0.29\" y=\"0\" perimeter=\"0\" name=\"N1\"/>\n<constraint x=\"0.29\" y=\"1\" perimeter=\"0\" name=\"S1\"/>\n<constraint x=\"0.71\" y=\"0\" perimeter=\"0\" name=\"N2\"/>\n<constraint x=\"0.71\" y=\"1\" perimeter=\"0\" name=\"S2\"/>\n<constraint x=\"0\" y=\"0.29\" perimeter=\"0\" name=\"W1\"/>\n<constraint x=\"0\" y=\"0.71\" perimeter=\"0\" name=\"W2\"/>\n<constraint x=\"1\" y=\"0.29\" perimeter=\"0\" name=\"E1\"/>\n<constraint x=\"1\" y=\"0.71\" perimeter=\"0\" name=\"E2\"/>\n</connections>\n<background>\n<path>\n<move x=\"28\" y=\"28\"/>\n<line x=\"28\" y=\"0\"/>\n<line x=\"48\" y=\"20\"/>\n<line x=\"68\" y=\"0\"/>\n<line x=\"68\" y=\"28\"/>\n<line x=\"96\" y=\"28\"/>\n<line x=\"76\" y=\"48\"/>\n<line x=\"96\" y=\"68\"/>\n<line x=\"68\" y=\"68\"/>\n<line x=\"68\" y=\"96\"/>\n<line x=\"48\" y=\"76\"/>\n<line x=\"28\" y=\"96\"/>\n<line x=\"28\" y=\"68\"/>\n<line x=\"0\" y=\"68\"/>\n<line x=\"20\" y=\"48\"/>\n<line x=\"0\" y=\"28\"/>\n<close/>\n</path>\n</background>\n<foreground>\n<fillstroke/>\n</foreground>\n</shape>\n<shape name=\"Banner\" h=\"50\" w=\"96\" aspect=\"variable\" strokewidth=\"inherit\">\n<connections>\n<constraint x=\"0.5\" y=\"0\" perimeter=\"0\" name=\"N\"/>\n<constraint x=\"0.5\" y=\"0.8\" perimeter=\"0\" name=\"S\"/>\n<constraint x=\"0.13\" y=\"0.6\" perimeter=\"0\" name=\"W\"/>\n<constraint x=\"0.87\" y=\"0.6\" perimeter=\"0\" name=\"E\"/>\n</connections>\n<background>\n<path>\n<move x=\"0\" y=\"50\"/>\n<line x=\"38\" y=\"50\"/>\n<arc rx=\"2.5\" ry=\"2.5\" x-axis-rotation=\"0\" large-arc-flag=\"0\" sweep-flag=\"0\" x=\"40.5\" y=\"47.5\"/>\n<line x=\"40.5\" y=\"40\"/>\n<line x=\"55.5\" y=\"40\"/>\n<line x=\"55.5\" y=\"47.5\"/>\n<arc rx=\"2.5\" ry=\"2.5\" x-axis-rotation=\"0\" large-arc-flag=\"0\" sweep-flag=\"0\" x=\"58\" y=\"50\"/>\n<line x=\"96\" y=\"50\"/>\n<line x=\"83\" y=\"30\"/>\n<line x=\"96\" y=\"10\"/>\n<line x=\"70.5\" y=\"10\"/>\n<line x=\"70.5\" y=\"2.5\"/>\n<arc rx=\"2.5\" ry=\"2.5\" x-axis-rotation=\"0\" large-arc-flag=\"0\" sweep-flag=\"0\" x=\"68\" y=\"0\"/>\n<line x=\"28\" y=\"0\"/>\n<arc rx=\"2.5\" ry=\"2.5\" x-axis-rotation=\"0\" large-arc-flag=\"0\" sweep-flag=\"0\" x=\"25.5\" y=\"2.5\"/>\n<line x=\"25.5\" y=\"10\"/>\n<line x=\"0\" y=\"10\"/>\n<line x=\"13\" y=\"30\"/>\n<close/>\n</path>\n</background>\n<foreground>\n<fillstroke/>\n<path>\n<move x=\"40.5\" y=\"47.5\"/>\n<arc rx=\"2.5\" ry=\"2.5\" x-axis-rotation=\"0\" large-arc-flag=\"0\" sweep-flag=\"0\" x=\"38\" y=\"45\"/>\n<line x=\"28\" y=\"45\"/>\n<arc rx=\"2.5\" ry=\"2.5\" x-axis-rotation=\"0\" large-arc-flag=\"1\" sweep-flag=\"1\" x=\"28\" y=\"40\"/>\n<line x=\"68\" y=\"40\"/>\n<arc rx=\"2.5\" ry=\"2.5\" x-axis-rotation=\"0\" large-arc-flag=\"0\" sweep-flag=\"1\" x=\"68\" y=\"45\"/>\n<line x=\"58\" y=\"45\"/>\n<arc rx=\"2.5\" ry=\"2.5\" x-axis-rotation=\"0\" large-arc-flag=\"0\" sweep-flag=\"0\" x=\"55.5\" y=\"47.5\"/>\n<move x=\"25.5\" y=\"42.5\"/>\n<line x=\"25.5\" y=\"10\"/>\n<move x=\"70.5\" y=\"42.5\"/>\n<line x=\"70.5\" y=\"10\"/>\n</path>\n<stroke/>\n</foreground>\n</shape>\n<shape name=\"Cloud Callout\" h=\"61.4\" w=\"90.41\" aspect=\"variable\" strokewidth=\"inherit\">\n<connections>\n<constraint x=\"0.5\" y=\"0\" perimeter=\"0\" name=\"N\"/>\n<constraint x=\"0.5\" y=\"0.74\" perimeter=\"0\" name=\"S\"/>\n<constraint x=\"0.015\" y=\"0.4\" perimeter=\"0\" name=\"W\"/>\n<constraint x=\"0.993\" y=\"0.4\" perimeter=\"0\" name=\"E\"/>\n<constraint x=\"0.01\" y=\"0.995\" perimeter=\"0\" name=\"SW\"/>\n</connections>\n<background>\n<save/>\n<linejoin join=\"round\"/>\n<path>\n<move x=\"12.1\" y=\"31.8\"/>\n<arc rx=\"8\" ry=\"8\" x-axis-rotation=\"0\" large-arc-flag=\"1\" sweep-flag=\"1\" x=\"12.1\" y=\"16.8\"/>\n<arc rx=\"12\" ry=\"12\" x-axis-rotation=\"0\" large-arc-flag=\"0\" sweep-flag=\"1\" x=\"33.1\" y=\"8.8\"/>\n<arc rx=\"14\" ry=\"14\" x-axis-rotation=\"0\" large-arc-flag=\"0\" sweep-flag=\"1\" x=\"59.1\" y=\"8.8\"/>\n<arc rx=\"12\" ry=\"12\" x-axis-rotation=\"0\" large-arc-flag=\"0\" sweep-flag=\"1\" x=\"79.1\" y=\"16.8\"/>\n<arc rx=\"8\" ry=\"8\" x-axis-rotation=\"0\" large-arc-flag=\"1\" sweep-flag=\"1\" x=\"79.1\" y=\"31.8\"/>\n<arc rx=\"12\" ry=\"12\" x-axis-rotation=\"0\" large-arc-flag=\"0\" sweep-flag=\"1\" x=\"58.1\" y=\"38.8\"/>\n<arc rx=\"14\" ry=\"14\" x-axis-rotation=\"0\" large-arc-flag=\"0\" sweep-flag=\"1\" x=\"34.1\" y=\"38.8\"/>\n<arc rx=\"10\" ry=\"8\" x-axis-rotation=\"0\" large-arc-flag=\"0\" sweep-flag=\"1\" x=\"12.1\" y=\"31.8\"/>\n<close/>\n</path>\n</background>\n<foreground>\n<fillstroke/>\n<restore/>\n<linejoin join=\"miter\"/>\n<ellipse x=\"9.1\" y=\"46.1\" w=\"12\" h=\"5.4\"/>\n<fillstroke/>\n<ellipse x=\"4.3\" y=\"53.5\" w=\"7.6\" h=\"3.6\"/>\n<fillstroke/>\n<ellipse x=\"0\" y=\"58.8\" w=\"4.8\" h=\"2.6\"/>\n<fillstroke/>\n</foreground>\n</shape>\n<shape name=\"Cone\" h=\"96.91\" w=\"99\" aspect=\"variable\" strokewidth=\"inherit\">\n<connections>\n<constraint x=\"0.5\" y=\"0\" perimeter=\"0\" name=\"N\"/>\n<constraint x=\"0.5\" y=\"1\" perimeter=\"0\" name=\"S\"/>\n</connections>\n<background>\n<path>\n<move x=\"49.5\" y=\"0\"/>\n<line x=\"99\" y=\"88\"/>\n<arc rx=\"25\" ry=\"4.5\" x-axis-rotation=\"0\" large-arc-flag=\"1\" sweep-flag=\"1\" x=\"0\" y=\"88\"/>\n<close/>\n</path>\n</background>\n<foreground>\n<fillstroke/>\n<path>\n<move x=\"0\" y=\"88\"/>\n<arc rx=\"25\" ry=\"4.5\" x-axis-rotation=\"0\" large-arc-flag=\"1\" sweep-flag=\"1\" x=\"99\" y=\"88\"/>\n</path>\n<fillstroke/>\n</foreground>\n</shape>\n<shape name=\"Cross\" h=\"98\" w=\"98\" aspect=\"variable\" strokewidth=\"inherit\">\n<connections>\n<constraint x=\"0.5\" y=\"0\" perimeter=\"0\" name=\"N\"/>\n<constraint x=\"0.5\" y=\"1\" perimeter=\"0\" name=\"S\"/>\n<constraint x=\"0\" y=\"0.5\" perimeter=\"0\" name=\"W\"/>\n<constraint x=\"1\" y=\"0.5\" perimeter=\"0\" name=\"E\"/>\n</connections>\n<background>\n<path>\n<move x=\"0\" y=\"34\"/>\n<line x=\"34\" y=\"34\"/>\n<line x=\"34\" y=\"0\"/>\n<line x=\"64\" y=\"0\"/>\n<line x=\"64\" y=\"34\"/>\n<line x=\"98\" y=\"34\"/>\n<line x=\"98\" y=\"64\"/>\n<line x=\"64\" y=\"64\"/>\n<line x=\"64\" y=\"98\"/>\n<line x=\"34\" y=\"98\"/>\n<line x=\"34\" y=\"64\"/>\n<line x=\"0\" y=\"64\"/>\n<close/>\n</path>\n</background>\n<foreground>\n<fillstroke/>\n</foreground>\n</shape>\n<shape name=\"Document\" h=\"98\" w=\"98\" aspect=\"variable\" strokewidth=\"inherit\">\n<connections>\n<constraint x=\"0.5\" y=\"0\" perimeter=\"0\" name=\"N\"/>\n<constraint x=\"0.5\" y=\"1\" perimeter=\"0\" name=\"S\"/>\n<constraint x=\"0\" y=\"0.5\" perimeter=\"0\" name=\"W\"/>\n<constraint x=\"1\" y=\"0.5\" perimeter=\"0\" name=\"E\"/>\n</connections>\n<background>\n<path>\n<move x=\"98\" y=\"14\"/>\n<line x=\"98\" y=\"98\"/>\n<line x=\"0\" y=\"98\"/>\n<line x=\"0\" y=\"0\"/>\n<line x=\"84\" y=\"0\"/>\n<close/>\n</path>\n</background>\n<foreground>\n<fillstroke/>\n<path>\n<move x=\"84\" y=\"0\"/>\n<arc rx=\"18\" ry=\"10\" x-axis-rotation=\"0\" large-arc-flag=\"0\" sweep-flag=\"1\" x=\"79\" y=\"9\"/>\n<line x=\"98\" y=\"14\"/>\n</path>\n<stroke/>\n</foreground>\n</shape>\n<shape name=\"Flash\" h=\"95.5\" w=\"60\" aspect=\"variable\" strokewidth=\"inherit\">\n<connections>\n<constraint x=\"0.565\" y=\"0\" perimeter=\"0\" name=\"N\"/>\n<constraint x=\"0\" y=\"0.995\" perimeter=\"0\" name=\"SW\"/>\n</connections>\n<background>\n\n<miterlimit limit=\"6\"/>\n<path>\n<move x=\"0\" y=\"95.5\"/>\n<line x=\"20\" y=\"75.5\"/>\n<line x=\"3\" y=\"61.5\"/>\n<line x=\"20\" y=\"49.5\"/>\n<line x=\"3\" y=\"31.5\"/>\n<line x=\"34\" y=\"0\"/>\n<line x=\"60\" y=\"25.5\"/>\n<line x=\"36\" y=\"39.5\"/>\n<line x=\"50\" y=\"53.5\"/>\n<line x=\"29\" y=\"65.5\"/>\n<line x=\"42\" y=\"76.5\"/>\n<close/>\n</path>\n</background>\n<foreground>\n<fillstroke/>\n</foreground>\n</shape>\n<shape name=\"Half Circle\" h=\"49\" w=\"98\" aspect=\"variable\" strokewidth=\"inherit\">\n<connections>\n<constraint x=\"0.5\" y=\"0\" perimeter=\"0\" name=\"N\"/>\n<constraint x=\"0.5\" y=\"1\" perimeter=\"0\" name=\"S\"/>\n</connections>\n<background>\n<path>\n<move x=\"0\" y=\"0\"/>\n<arc rx=\"44.5\" ry=\"44.5\" x-axis-rotation=\"0\" large-arc-flag=\"1\" sweep-flag=\"0\" x=\"98\" y=\"0\"/>\n<close/>\n</path>\n</background>\n<foreground>\n<fillstroke/>\n</foreground>\n</shape>\n<shape name=\"Heart\" h=\"94.74\" w=\"103.89\" aspect=\"variable\" strokewidth=\"inherit\">\n<connections>\n<constraint x=\"0.5\" y=\"0.115\" perimeter=\"0\" name=\"N\"/>\n<constraint x=\"0.5\" y=\"1\" perimeter=\"0\" name=\"S\"/>\n<constraint x=\"0.07\" y=\"0.5\" perimeter=\"0\" name=\"W\"/>\n<constraint x=\"0.93\" y=\"0.5\" perimeter=\"0\" name=\"E\"/>\n</connections>\n<background>\n<path>\n<move x=\"51.94\" y=\"94.74\"/>\n<curve x1=\"55.79\" y1=\"90.78\" x2=\"77.8\" y2=\"68.16\" x3=\"91.56\" y3=\"54.03\"/>\n<curve x1=\"103.89\" y1=\"41.37\" x2=\"103.62\" y2=\"22.91\" x3=\"92.42\" y3=\"11.46\"/>\n<curve x1=\"81.21\" y1=\"0\" x2=\"63.09\" y2=\"0.05\" x3=\"51.94\" y3=\"11.56\"/>\n<curve x1=\"40.79\" y1=\"0.05\" x2=\"22.67\" y2=\"0\" x3=\"11.47\" y3=\"11.45\"/>\n<curve x1=\"0.26\" y1=\"22.9\" x2=\"0\" y2=\"41.36\" x3=\"12.32\" y3=\"54.03\"/>\n<curve x1=\"26.08\" y1=\"68.16\" x2=\"48.09\" y2=\"90.78\" x3=\"51.94\" y3=\"94.74\"/>\n<close/>\n</path>\n</background>\n<foreground>\n<fillstroke/>\n</foreground>\n</shape>\n<shape name=\"Loud Callout\" h=\"59.9\" w=\"93.3\" aspect=\"variable\" strokewidth=\"inherit\">\n<connections>\n<constraint x=\"0.49\" y=\"0\" perimeter=\"0\" name=\"N\"/>\n<constraint x=\"0.52\" y=\"0.91\" perimeter=\"0\" name=\"S\"/>\n<constraint x=\"0\" y=\"0.51\" perimeter=\"0\" name=\"W\"/>\n<constraint x=\"0.99\" y=\"0.503\" perimeter=\"0\" name=\"E\"/>\n<constraint x=\"0.04\" y=\"1\" perimeter=\"0\" name=\"SE\"/>\n</connections>\n<background>\n\n<miterlimit limit=\"10\"/>\n<path>\n<move x=\"14.9\" y=\"43.9\"/>\n<line x=\"9.3\" y=\"46.7\"/>\n<line x=\"11.1\" y=\"40.9\"/>\n<line x=\"6.6\" y=\"43.9\"/>\n<line x=\"8.3\" y=\"39.2\"/>\n<line x=\"2.8\" y=\"40.8\"/>\n<line x=\"6.6\" y=\"36.4\"/>\n<line x=\"0.9\" y=\"36.2\"/>\n<line x=\"5.8\" y=\"32.7\"/>\n<line x=\"0\" y=\"30.8\"/>\n<line x=\"5.3\" y=\"28.2\"/>\n<line x=\"0.3\" y=\"25.6\"/>\n<line x=\"5.9\" y=\"24.19\"/>\n<line x=\"0.8\" y=\"19.9\"/>\n<line x=\"6.5\" y=\"19.8\"/>\n<line x=\"2.8\" y=\"15.1\"/>\n<line x=\"8.2\" y=\"16.1\"/>\n<line x=\"5.9\" y=\"11.3\"/>\n<line x=\"11.5\" y=\"13.2\"/>\n<line x=\"10.2\" y=\"8.7\"/>\n<line x=\"15.7\" y=\"10.6\"/>\n<line x=\"14.9\" y=\"6.15\"/>\n<line x=\"19.2\" y=\"9.3\"/>\n<line x=\"19.8\" y=\"4.3\"/>\n<line x=\"23.4\" y=\"8\"/>\n<line x=\"23.8\" y=\"3.4\"/>\n<line x=\"28.5\" y=\"6.9\"/>\n<line x=\"30.3\" y=\"1.3\"/>\n<line x=\"33.3\" y=\"6.2\"/>\n<line x=\"34.7\" y=\"0.6\"/>\n<line x=\"38.2\" y=\"6\"/>\n<line x=\"40.6\" y=\"0\"/>\n<line x=\"42.8\" y=\"5.8\"/>\n<line x=\"45.6\" y=\"0\"/>\n<line x=\"47.1\" y=\"6\"/>\n<line x=\"51.3\" y=\"1\"/>\n<line x=\"50.8\" y=\"6.3\"/>\n<line x=\"55.4\" y=\"0.6\"/>\n<line x=\"55.1\" y=\"6.6\"/>\n<line x=\"60.5\" y=\"1.4\"/>\n<line x=\"61.1\" y=\"7.1\"/>\n<line x=\"66.1\" y=\"2.7\"/>\n<line x=\"66.2\" y=\"8.7\"/>\n<line x=\"71.9\" y=\"4.4\"/>\n<line x=\"70.5\" y=\"10\"/>\n<line x=\"77.6\" y=\"6.2\"/>\n<line x=\"74.9\" y=\"11.8\"/>\n<line x=\"83.9\" y=\"7.8\"/>\n<line x=\"80.1\" y=\"13.6\"/>\n<line x=\"88.1\" y=\"11.9\"/>\n<line x=\"85.2\" y=\"17\"/>\n<line x=\"91.2\" y=\"16.9\"/>\n<line x=\"87\" y=\"20.1\"/>\n<line x=\"93.3\" y=\"21.2\"/>\n<line x=\"87.9\" y=\"24\"/>\n<line x=\"93.2\" y=\"25.8\"/>\n<line x=\"86.8\" y=\"26.8\"/>\n<line x=\"92.4\" y=\"30.3\"/>\n<line x=\"86.6\" y=\"30.8\"/>\n<line x=\"90.9\" y=\"34.8\"/>\n<line x=\"84.2\" y=\"33.5\"/>\n<line x=\"87.8\" y=\"38.8\"/>\n<line x=\"82\" y=\"36.6\"/>\n<line x=\"84.7\" y=\"41.7\"/>\n<line x=\"79.2\" y=\"40.7\"/>\n<line x=\"79.8\" y=\"46\"/>\n<line x=\"76.3\" y=\"42.9\"/>\n<line x=\"75.6\" y=\"48.6\"/>\n<line x=\"72\" y=\"44.7\"/>\n<line x=\"71.7\" y=\"51.2\"/>\n<line x=\"68\" y=\"46\"/>\n<line x=\"66.2\" y=\"52.1\"/>\n<line x=\"63.7\" y=\"46.6\"/>\n<line x=\"61.2\" y=\"53.7\"/>\n<line x=\"59.7\" y=\"47.6\"/>\n<line x=\"56.9\" y=\"53.8\"/>\n<line x=\"55\" y=\"48.1\"/>\n<line x=\"52.8\" y=\"53.9\"/>\n<line x=\"50.9\" y=\"48.1\"/>\n<line x=\"48.4\" y=\"54.5\"/>\n<line x=\"47\" y=\"48.1\"/>\n<line x=\"44.4\" y=\"53.7\"/>\n<line x=\"43.2\" y=\"47.4\"/>\n<line x=\"40.1\" y=\"54.2\"/>\n<line x=\"38.8\" y=\"47.4\"/>\n<line x=\"36.3\" y=\"54.7\"/>\n<line x=\"35.6\" y=\"47.8\"/>\n<line x=\"32.4\" y=\"55.1\"/>\n<line x=\"30.9\" y=\"46.6\"/>\n<line x=\"28.6\" y=\"53.3\"/>\n<line x=\"26.8\" y=\"47.8\"/>\n<line x=\"3.8\" y=\"59.9\"/>\n<close/>\n</path>\n</background>\n<foreground>\n<fillstroke/>\n</foreground>\n</shape>\n<shape name=\"Moon\" h=\"103.05\" w=\"77.05\" aspect=\"variable\" strokewidth=\"inherit\">\n<connections>\n<constraint x=\"0.48\" y=\"0\" perimeter=\"0\" name=\"N\"/>\n<constraint x=\"1\" y=\"0.89\" perimeter=\"0\" name=\"SE\"/>\n</connections>\n<background>\n<path>\n<move x=\"37.05\" y=\"0\"/>\n<arc rx=\"48\" ry=\"48\" x-axis-rotation=\"0\" large-arc-flag=\"1\" sweep-flag=\"0\" x=\"77.05\" y=\"92\"/>\n<arc rx=\"60\" ry=\"60\" x-axis-rotation=\"0\" large-arc-flag=\"0\" sweep-flag=\"1\" x=\"37.05\" y=\"0\"/>\n<close/>\n</path>\n</background>\n<foreground>\n<fillstroke/>\n</foreground>\n</shape>\n<shape name=\"No Symbol\" h=\"100\" w=\"100\" aspect=\"variable\" strokewidth=\"inherit\">\n<connections>\n<constraint x=\"0.5\" y=\"0\" perimeter=\"0\" name=\"N\"/>\n<constraint x=\"0.5\" y=\"1\" perimeter=\"0\" name=\"S\"/>\n<constraint x=\"0\" y=\"0.5\" perimeter=\"0\" name=\"W\"/>\n<constraint x=\"1\" y=\"0.5\" perimeter=\"0\" name=\"E\"/>\n<constraint x=\"0.145\" y=\"0.145\" perimeter=\"0\" name=\"NW\"/>\n<constraint x=\"0.145\" y=\"0.855\" perimeter=\"0\" name=\"SW\"/>\n<constraint x=\"0.855\" y=\"0.145\" perimeter=\"0\" name=\"NE\"/>\n<constraint x=\"0.855\" y=\"0.855\" perimeter=\"0\" name=\"SE\"/>\n</connections>\n<background>\n<path>\n<move x=\"0\" y=\"50\"/>\n<arc rx=\"35\" ry=\"35\" x-axis-rotation=\"0\" large-arc-flag=\"0\" sweep-flag=\"1\" x=\"100\" y=\"50\"/>\n<arc rx=\"35\" ry=\"35\" x-axis-rotation=\"0\" large-arc-flag=\"0\" sweep-flag=\"1\" x=\"0\" y=\"50\"/>\n<close/>\n<move x=\"78.95\" y=\"69.7\"/>\n<arc rx=\"35\" ry=\"35\" x-axis-rotation=\"0\" large-arc-flag=\"0\" sweep-flag=\"0\" x=\"30.3\" y=\"21.05\"/>\n<close/>\n<move x=\"21.15\" y=\"30.3\"/>\n<arc rx=\"35\" ry=\"35\" x-axis-rotation=\"0\" large-arc-flag=\"0\" sweep-flag=\"0\" x=\"69.7\" y=\"79\"/>\n<close/>\n</path>\n</background>\n<foreground>\n<fillstroke/>\n</foreground>\n</shape>\n<shape name=\"Octagon\" h=\"98\" w=\"98\" aspect=\"variable\" strokewidth=\"inherit\">\n<connections>\n<constraint x=\"0.5\" y=\"0\" perimeter=\"0\" name=\"N\"/>\n<constraint x=\"0.5\" y=\"1\" perimeter=\"0\" name=\"S\"/>\n<constraint x=\"0\" y=\"0.5\" perimeter=\"0\" name=\"W\"/>\n<constraint x=\"1\" y=\"0.5\" perimeter=\"0\" name=\"E\"/>\n</connections>\n<background>\n<path>\n<move x=\"0\" y=\"29\"/>\n<line x=\"29\" y=\"0\"/>\n<line x=\"69\" y=\"0\"/>\n<line x=\"98\" y=\"29\"/>\n<line x=\"98\" y=\"69\"/>\n<line x=\"69\" y=\"98\"/>\n<line x=\"29\" y=\"98\"/>\n<line x=\"0\" y=\"69\"/>\n<close/>\n</path>\n</background>\n<foreground>\n<fillstroke/>\n</foreground>\n</shape>\n<shape name=\"Orthogonal Triangle\" h=\"97\" w=\"97\" aspect=\"variable\" strokewidth=\"inherit\">\n<connections>\n<constraint x=\"0\" y=\"0\" perimeter=\"0\" name=\"NW\"/>\n<constraint x=\"0\" y=\"1\" perimeter=\"0\" name=\"SW\"/>\n<constraint x=\"1\" y=\"1\" perimeter=\"0\" name=\"SE\"/>\n<constraint x=\"0.5\" y=\"0.5\" perimeter=\"0\" name=\"center\"/>\n</connections>\n<background>\n<path>\n<move x=\"0\" y=\"97\"/>\n<line x=\"0\" y=\"0\"/>\n<line x=\"97\" y=\"97\"/>\n<close/>\n</path>\n</background>\n<foreground>\n<fillstroke/>\n</foreground>\n</shape>\n<shape name=\"Oval Callout\" h=\"63.15\" w=\"109.43\" aspect=\"variable\" strokewidth=\"inherit\">\n<connections>\n<constraint x=\"0.5\" y=\"0.045\" perimeter=\"0\" name=\"N\"/>\n<constraint x=\"0.5\" y=\"0.84\" perimeter=\"0\" name=\"S\"/>\n<constraint x=\"0.045\" y=\"0.45\" perimeter=\"0\" name=\"W\"/>\n<constraint x=\"0.945\" y=\"0.45\" perimeter=\"0\" name=\"E\"/>\n<constraint x=\"0.08\" y=\"1\" perimeter=\"0\" name=\"SW\"/>\n</connections>\n<background>\n\n<miterlimit limit=\"15\"/>\n<path>\n<move x=\"20.53\" y=\"46.15\"/>\n<arc rx=\"49\" ry=\"25\" x-axis-rotation=\"0\" large-arc-flag=\"1\" sweep-flag=\"1\" x=\"31.53\" y=\"50.15\"/>\n<arc rx=\"30\" ry=\"30\" x-axis-rotation=\"0\" large-arc-flag=\"0\" sweep-flag=\"1\" x=\"9.03\" y=\"63.15\"/>\n<arc rx=\"30\" ry=\"30\" x-axis-rotation=\"0\" large-arc-flag=\"0\" sweep-flag=\"0\" x=\"20.53\" y=\"46.15\"/>\n<close/>\n</path>\n</background>\n<foreground>\n<fillstroke/>\n</foreground>\n</shape>\n<shape name=\"Parallelepiped\" h=\"60\" w=\"97\" aspect=\"variable\" strokewidth=\"inherit\">\n<connections>\n<constraint x=\"0.5\" y=\"0\" perimeter=\"0\" name=\"N\"/>\n<constraint x=\"0.5\" y=\"1\" perimeter=\"0\" name=\"S\"/>\n<constraint x=\"0.12\" y=\"0.5\" perimeter=\"0\" name=\"W\"/>\n<constraint x=\"0.88\" y=\"0.5\" perimeter=\"0\" name=\"E\"/>\n<constraint x=\"0.24\" y=\"0\" perimeter=\"0\" name=\"NW\"/>\n<constraint x=\"1\" y=\"0\" perimeter=\"0\" name=\"NE\"/>\n<constraint x=\"0.76\" y=\"1\" perimeter=\"0\" name=\"SE\"/>\n<constraint x=\"0\" y=\"1\" perimeter=\"0\" name=\"SW\"/>\n</connections>\n<background>\n<path>\n<move x=\"0\" y=\"60\"/>\n<line x=\"23.5\" y=\"0\"/>\n<line x=\"97\" y=\"0\"/>\n<line x=\"73.5\" y=\"60\"/>\n<close/>\n</path>\n</background>\n<foreground>\n<fillstroke/>\n</foreground>\n</shape>\n<shape name=\"Pentagon\" h=\"90\" w=\"97\" aspect=\"variable\" strokewidth=\"inherit\">\n<connections>\n<constraint x=\"0.5\" y=\"0\" perimeter=\"0\" name=\"N\"/>\n<constraint x=\"0\" y=\"0.365\" perimeter=\"0\" name=\"W\"/>\n<constraint x=\"1\" y=\"0.365\" perimeter=\"0\" name=\"E\"/>\n<constraint x=\"0.81\" y=\"1\" perimeter=\"0\" name=\"SE\"/>\n<constraint x=\"0.19\" y=\"1\" perimeter=\"0\" name=\"SW\"/>\n</connections>\n<background>\n<path>\n<move x=\"18.5\" y=\"90\"/>\n<line x=\"0\" y=\"33\"/>\n<line x=\"48.5\" y=\"0\"/>\n<line x=\"97\" y=\"33\"/>\n<line x=\"78.5\" y=\"90\"/>\n<close/>\n</path>\n</background>\n<foreground>\n<fillstroke/>\n</foreground>\n</shape>\n<shape name=\"Rectangular Callout\" h=\"60\" w=\"98\" aspect=\"variable\" strokewidth=\"inherit\">\n<connections>\n<constraint x=\"0.5\" y=\"0\" perimeter=\"0\" name=\"N\"/>\n<constraint x=\"0.5\" y=\"0.715\" perimeter=\"0\" name=\"S\"/>\n<constraint x=\"0\" y=\"0.355\" perimeter=\"0\" name=\"W\"/>\n<constraint x=\"1\" y=\"0.355\" perimeter=\"0\" name=\"E\"/>\n<constraint x=\"0.04\" y=\"1\" perimeter=\"0\" name=\"SW\"/>\n</connections>\n<background>\n\n<miterlimit limit=\"10\"/>\n<path>\n<move x=\"15\" y=\"43\"/>\n<line x=\"0\" y=\"43\"/>\n<line x=\"0\" y=\"0\"/>\n<line x=\"98\" y=\"0\"/>\n<line x=\"98\" y=\"43\"/>\n<line x=\"29\" y=\"43\"/>\n<line x=\"4\" y=\"60\"/>\n<close/>\n</path>\n</background>\n<foreground>\n<fillstroke/>\n</foreground>\n</shape>\n<shape name=\"Rounded Rectangular Callout\" h=\"60\" w=\"98\" aspect=\"variable\" strokewidth=\"inherit\">\n<connections>\n<constraint x=\"0.5\" y=\"0\" perimeter=\"0\" name=\"N\"/>\n<constraint x=\"0.5\" y=\"0.715\" perimeter=\"0\" name=\"S\"/>\n<constraint x=\"0\" y=\"0.355\" perimeter=\"0\" name=\"W\"/>\n<constraint x=\"1\" y=\"0.355\" perimeter=\"0\" name=\"E\"/>\n<constraint x=\"0.04\" y=\"1\" perimeter=\"0\" name=\"SW\"/>\n</connections>\n<background>\n\n<miterlimit limit=\"15\"/>\n<path>\n<move x=\"15.5\" y=\"43\"/>\n<line x=\"5\" y=\"43\"/>\n<arc rx=\"5\" ry=\"5\" x-axis-rotation=\"0\" large-arc-flag=\"0\" sweep-flag=\"1\" x=\"0\" y=\"38\"/>\n<line x=\"0\" y=\"5\"/>\n<arc rx=\"5\" ry=\"5\" x-axis-rotation=\"0\" large-arc-flag=\"0\" sweep-flag=\"1\" x=\"5\" y=\"0\"/>\n<line x=\"93\" y=\"0\"/>\n<arc rx=\"5\" ry=\"5\" x-axis-rotation=\"0\" large-arc-flag=\"0\" sweep-flag=\"1\" x=\"98\" y=\"5\"/>\n<line x=\"98\" y=\"38\"/>\n<arc rx=\"5\" ry=\"5\" x-axis-rotation=\"0\" large-arc-flag=\"0\" sweep-flag=\"1\" x=\"93\" y=\"43\"/>\n<line x=\"29\" y=\"43\"/>\n<arc rx=\"30\" ry=\"30\" x-axis-rotation=\"0\" large-arc-flag=\"0\" sweep-flag=\"1\" x=\"4\" y=\"60\"/>\n<arc rx=\"30\" ry=\"30\" x-axis-rotation=\"0\" large-arc-flag=\"0\" sweep-flag=\"0\" x=\"15.5\" y=\"43\"/>\n<close/>\n</path>\n</background>\n<foreground>\n<fillstroke/>\n</foreground>\n</shape>\n<shape name=\"Smiley\" h=\"98\" w=\"98\" aspect=\"variable\" strokewidth=\"inherit\">\n<connections>\n<constraint x=\"0.5\" y=\"0\" perimeter=\"0\" name=\"N\"/>\n<constraint x=\"0.5\" y=\"1\" perimeter=\"0\" name=\"S\"/>\n<constraint x=\"0\" y=\"0.5\" perimeter=\"0\" name=\"W\"/>\n<constraint x=\"1\" y=\"0.5\" perimeter=\"0\" name=\"E\"/>\n<constraint x=\"0.145\" y=\"0.145\" perimeter=\"0\" name=\"NW\"/>\n<constraint x=\"0.145\" y=\"0.855\" perimeter=\"0\" name=\"SW\"/>\n<constraint x=\"0.855\" y=\"0.145\" perimeter=\"0\" name=\"NE\"/>\n<constraint x=\"0.855\" y=\"0.855\" perimeter=\"0\" name=\"SE\"/>\n</connections>\n<background>\n<ellipse x=\"0\" y=\"0\" w=\"98\" h=\"98\"/>\n</background>\n<foreground>\n<fillstroke/>\n<save/>\n<path>\n<move x=\"11\" y=\"54\"/>\n<arc rx=\"38\" ry=\"27\" x-axis-rotation=\"0\" large-arc-flag=\"1\" sweep-flag=\"0\" x=\"87\" y=\"54\"/>\n</path>\n<stroke/>\n<restore/>\n<strokewidth width=\"1\"/>\n<path>\n<move x=\"16\" y=\"51\"/>\n<line x=\"6\" y=\"57\"/>\n</path>\n<stroke/>\n<path>\n<move x=\"82\" y=\"51\"/>\n<line x=\"92\" y=\"57\"/>\n</path>\n<stroke/>\n<strokewidth width=\"6\"/>\n<ellipse x=\"24\" y=\"27\" w=\"6\" h=\"16\"/>\n<fillstroke/>\n<ellipse x=\"68\" y=\"27\" w=\"6\" h=\"16\"/>\n<fillstroke/>\n</foreground>\n</shape>\n<shape name=\"Star\" h=\"90\" w=\"95\" aspect=\"variable\" strokewidth=\"inherit\">\n<connections>\n<constraint x=\"0.5\" y=\"0\" perimeter=\"0\" name=\"N\"/>\n<constraint x=\"0.5\" y=\"0.76\" perimeter=\"0\" name=\"S\"/>\n<constraint x=\"0\" y=\"0.367\" perimeter=\"0\" name=\"W\"/>\n<constraint x=\"1\" y=\"0.367\" perimeter=\"0\" name=\"E\"/>\n<constraint x=\"0.185\" y=\"1\" perimeter=\"0\" name=\"SW\"/>\n<constraint x=\"0.815\" y=\"1\" perimeter=\"0\" name=\"SE\"/>\n</connections>\n<background>\n<path>\n<move x=\"0\" y=\"33\"/>\n<line x=\"36.4\" y=\"33\"/>\n<line x=\"47.5\" y=\"0\"/>\n<line x=\"58.6\" y=\"33\"/>\n<line x=\"95\" y=\"33\"/>\n<line x=\"66\" y=\"55.1\"/>\n<line x=\"77.5\" y=\"90\"/>\n<line x=\"47.5\" y=\"68.4\"/>\n<line x=\"17.5\" y=\"90\"/>\n<line x=\"29\" y=\"55.1\"/>\n<close/>\n</path>\n</background>\n<foreground>\n<fillstroke/>\n</foreground>\n</shape>\n<shape name=\"Sun\" h=\"95\" w=\"95\" aspect=\"variable\" strokewidth=\"inherit\">\n<connections>\n<constraint x=\"0.5\" y=\"0\" perimeter=\"0\" name=\"N\"/>\n<constraint x=\"0.5\" y=\"1\" perimeter=\"0\" name=\"S\"/>\n<constraint x=\"0\" y=\"0.5\" perimeter=\"0\" name=\"W\"/>\n<constraint x=\"1\" y=\"0.5\" perimeter=\"0\" name=\"E\"/>\n<constraint x=\"0.145\" y=\"0.145\" perimeter=\"0\" name=\"NW\"/>\n<constraint x=\"0.145\" y=\"0.855\" perimeter=\"0\" name=\"SW\"/>\n<constraint x=\"0.855\" y=\"0.145\" perimeter=\"0\" name=\"NE\"/>\n<constraint x=\"0.855\" y=\"0.855\" perimeter=\"0\" name=\"SE\"/>\n</connections>\n<background>\n<ellipse x=\"17.5\" y=\"17.5\" w=\"60\" h=\"60\"/>\n</background>\n<foreground>\n<fillstroke/>\n<path>\n<move x=\"42.5\" y=\"14.5\"/>\n<line x=\"47.5\" y=\"0\"/>\n<line x=\"52.5\" y=\"14.5\"/>\n<close/>\n</path>\n<fillstroke/>\n<path>\n<move x=\"42.5\" y=\"80.5\"/>\n<line x=\"47.5\" y=\"95\"/>\n<line x=\"52.5\" y=\"80.5\"/>\n<close/>\n</path>\n<fillstroke/>\n<path>\n<move x=\"14.5\" y=\"42.5\"/>\n<line x=\"0\" y=\"47.5\"/>\n<line x=\"14.5\" y=\"52.5\"/>\n<close/>\n</path>\n<fillstroke/>\n<path>\n<move x=\"80.5\" y=\"42.5\"/>\n<line x=\"95\" y=\"47.5\"/>\n<line x=\"80.5\" y=\"52.5\"/>\n<close/>\n</path>\n<fillstroke/>\n<path>\n<move x=\"67.5\" y=\"20.5\"/>\n<line x=\"81.2\" y=\"13.9\"/>\n<line x=\"74.5\" y=\"27.5\"/>\n<close/>\n</path>\n<fillstroke/>\n<path>\n<move x=\"67.5\" y=\"74.5\"/>\n<line x=\"81.2\" y=\"81.1\"/>\n<line x=\"74.5\" y=\"67.5\"/>\n<close/>\n</path>\n<fillstroke/>\n<path>\n<move x=\"27.5\" y=\"20.5\"/>\n<line x=\"13.8\" y=\"13.9\"/>\n<line x=\"20.5\" y=\"27.5\"/>\n<close/>\n</path>\n<fillstroke/>\n<path>\n<move x=\"27.5\" y=\"74.5\"/>\n<line x=\"13.8\" y=\"81.1\"/>\n<line x=\"20.5\" y=\"67.5\"/>\n<close/>\n</path>\n<fillstroke/>\n</foreground>\n</shape>\n<shape name=\"Tick\" h=\"97.54\" w=\"84.4\" aspect=\"variable\" strokewidth=\"inherit\">\n<connections>\n<constraint x=\"0.9\" y=\"0.01\" perimeter=\"0\" name=\"N\"/>\n<constraint x=\"0.32\" y=\"0.992\" perimeter=\"0\" name=\"S\"/>\n<constraint x=\"0\" y=\"0.7\" perimeter=\"0\" name=\"W\"/>\n<constraint x=\"1\" y=\"0.06\" perimeter=\"0\" name=\"E\"/>\n</connections>\n<background>\n<path>\n<move x=\"0.36\" y=\"66.69\"/>\n<arc rx=\"12\" ry=\"12\" x-axis-rotation=\"0\" large-arc-flag=\"0\" sweep-flag=\"1\" x=\"16.36\" y=\"58.69\"/>\n<arc rx=\"20\" ry=\"20\" x-axis-rotation=\"0\" large-arc-flag=\"0\" sweep-flag=\"1\" x=\"26.36\" y=\"69.69\"/>\n<arc rx=\"200\" ry=\"200\" x-axis-rotation=\"0\" large-arc-flag=\"0\" sweep-flag=\"1\" x=\"63.36\" y=\"5.69\"/>\n<arc rx=\"18\" ry=\"18\" x-axis-rotation=\"0\" large-arc-flag=\"0\" sweep-flag=\"1\" x=\"80.36\" y=\"1.69\"/>\n<arc rx=\"4.5\" ry=\"4.5\" x-axis-rotation=\"0\" large-arc-flag=\"0\" sweep-flag=\"1\" x=\"83.36\" y=\"8.69\"/>\n<arc rx=\"230\" ry=\"230\" x-axis-rotation=\"0\" large-arc-flag=\"0\" sweep-flag=\"0\" x=\"35.36\" y=\"94.69\"/>\n<arc rx=\"20\" ry=\"20\" x-axis-rotation=\"0\" large-arc-flag=\"0\" sweep-flag=\"1\" x=\"17.36\" y=\"94.69\"/>\n<arc rx=\"100\" ry=\"100\" x-axis-rotation=\"0\" large-arc-flag=\"0\" sweep-flag=\"0\" x=\"0.36\" y=\"68.69\"/>\n<arc rx=\"2\" ry=\"2\" x-axis-rotation=\"0\" large-arc-flag=\"0\" sweep-flag=\"1\" x=\"0.36\" y=\"66.69\"/>\n<close/>\n</path>\n</background>\n<foreground>\n<fillstroke/>\n</foreground>\n</shape>\n<shape name=\"Trapezoid\" h=\"98\" w=\"97\" aspect=\"variable\" strokewidth=\"inherit\">\n<connections>\n<constraint x=\"0.5\" y=\"0\" perimeter=\"0\" name=\"N\"/>\n<constraint x=\"0.5\" y=\"1\" perimeter=\"0\" name=\"S\"/>\n<constraint x=\"0.12\" y=\"0.5\" perimeter=\"0\" name=\"W\"/>\n<constraint x=\"0.88\" y=\"0.5\" perimeter=\"0\" name=\"E\"/>\n<constraint x=\"0.24\" y=\"0\" perimeter=\"0\" name=\"NW\"/>\n<constraint x=\"0\" y=\"1\" perimeter=\"0\" name=\"SW\"/>\n<constraint x=\"0.76\" y=\"0\" perimeter=\"0\" name=\"NE\"/>\n<constraint x=\"1\" y=\"1\" perimeter=\"0\" name=\"SE\"/>\n</connections>\n<background>\n<path>\n<move x=\"0\" y=\"98\"/>\n<line x=\"23.5\" y=\"0\"/>\n<line x=\"73.5\" y=\"0\"/>\n<line x=\"97\" y=\"98\"/>\n<close/>\n</path>\n</background>\n<foreground>\n<fillstroke/>\n</foreground>\n</shape>\n<shape name=\"Wave\" h=\"56.7\" w=\"98\" aspect=\"variable\" strokewidth=\"inherit\">\n<connections>\n<constraint x=\"0.5\" y=\"0.295\" perimeter=\"0\" name=\"N\"/>\n<constraint x=\"0.5\" y=\"1\" perimeter=\"0\" name=\"S\"/>\n<constraint x=\"0\" y=\"0.5\" perimeter=\"0\" name=\"W\"/>\n<constraint x=\"1\" y=\"0.5\" perimeter=\"0\" name=\"E\"/>\n</connections>\n<background>\n<path>\n<move x=\"0\" y=\"8.7\"/>\n<arc rx=\"20\" ry=\"20\" x-axis-rotation=\"0\" large-arc-flag=\"0\" sweep-flag=\"1\" x=\"33\" y=\"8.7\"/>\n<arc rx=\"20\" ry=\"20\" x-axis-rotation=\"0\" large-arc-flag=\"0\" sweep-flag=\"0\" x=\"65\" y=\"8.7\"/>\n<arc rx=\"20\" ry=\"20\" x-axis-rotation=\"0\" large-arc-flag=\"0\" sweep-flag=\"1\" x=\"98\" y=\"8.7\"/>\n<line x=\"98\" y=\"48.7\"/>\n<arc rx=\"20\" ry=\"20\" x-axis-rotation=\"0\" large-arc-flag=\"0\" sweep-flag=\"0\" x=\"65\" y=\"48.7\"/>\n<arc rx=\"20\" ry=\"20\" x-axis-rotation=\"0\" large-arc-flag=\"0\" sweep-flag=\"1\" x=\"33\" y=\"48.7\"/>\n<arc rx=\"20\" ry=\"20\" x-axis-rotation=\"0\" large-arc-flag=\"0\" sweep-flag=\"0\" x=\"0\" y=\"48.7\"/>\n<close/>\n</path>\n</background>\n<foreground>\n<fillstroke/>\n</foreground>\n</shape>\n<shape name=\"X\" h=\"98\" w=\"96\" aspect=\"variable\" strokewidth=\"inherit\">\n<connections>\n<constraint x=\"0.5\" y=\"0.29\" perimeter=\"0\" name=\"N\"/>\n<constraint x=\"0.5\" y=\"0.71\" perimeter=\"0\" name=\"S\"/>\n<constraint x=\"0.33\" y=\"0.5\" perimeter=\"0\" name=\"W\"/>\n<constraint x=\"0.65\" y=\"0.5\" perimeter=\"0\" name=\"E\"/>\n<constraint x=\"0\" y=\"0\" perimeter=\"0\" name=\"NW\"/>\n<constraint x=\"0\" y=\"1\" perimeter=\"0\" name=\"SW\"/>\n<constraint x=\"1\" y=\"0\" perimeter=\"0\" name=\"NE\"/>\n<constraint x=\"1\" y=\"1\" perimeter=\"0\" name=\"SE\"/>\n</connections>\n<background>\n<path>\n<move x=\"0\" y=\"0\"/>\n<line x=\"28\" y=\"0\"/>\n<line x=\"48\" y=\"29\"/>\n<line x=\"68\" y=\"0\"/>\n<line x=\"96\" y=\"0\"/>\n<line x=\"62\" y=\"49\"/>\n<line x=\"96\" y=\"98\"/>\n<line x=\"68\" y=\"98\"/>\n<line x=\"48\" y=\"69\"/>\n<line x=\"28\" y=\"98\"/>\n<line x=\"0\" y=\"98\"/>\n<line x=\"32\" y=\"49\"/>\n<close/>\n</path>\n</background>\n<foreground>\n<fillstroke/>\n</foreground>\n</shape>\n</shapes>"
  },
  {
    "path": "static/cherry/drawio_demo/image/stencils/bpmn.xml",
    "content": "<shapes name=\"mxgraph.bpmn\">\n<shape h=\"10.39\" name=\"Ad Hoc\" strokewidth=\"inherit\" w=\"15\">\n    <connections/>\n    <background>\n        <path>\n            <move x=\"0\" y=\"1.69\"/>\n            <arc large-arc-flag=\"0\" rx=\"5\" ry=\"5\" sweep-flag=\"1\" x=\"7.5\" x-axis-rotation=\"0\" y=\"1.69\"/>\n            <arc large-arc-flag=\"0\" rx=\"5\" ry=\"5\" sweep-flag=\"0\" x=\"15\" x-axis-rotation=\"0\" y=\"1.69\"/>\n            <line x=\"15\" y=\"8.69\"/>\n            <arc large-arc-flag=\"0\" rx=\"5\" ry=\"5\" sweep-flag=\"1\" x=\"7.5\" x-axis-rotation=\"0\" y=\"8.69\"/>\n            <arc large-arc-flag=\"0\" rx=\"5\" ry=\"5\" sweep-flag=\"0\" x=\"0\" x-axis-rotation=\"0\" y=\"8.69\"/>\n            <close/>\n        </path>\n    </background>\n    <foreground>\n        <fillstroke/>\n    </foreground>\n</shape>\n<shape h=\"65\" name=\"Business Rule Task\" strokewidth=\"inherit\" w=\"100\">\n    <connections/>\n    <background>\n        <rect h=\"65\" w=\"100\" x=\"0\" y=\"0\"/>\n    </background>\n    <foreground>\n        <fillstroke/>\n        <path>\n            <move x=\"0\" y=\"15\"/>\n            <line x=\"100\" y=\"15\"/>\n            <move x=\"1\" y=\"40\"/>\n            <line x=\"99.4\" y=\"40\"/>\n            <move x=\"25\" y=\"15\"/>\n            <line x=\"25\" y=\"65\"/>\n        </path>\n        <stroke/>\n    </foreground>\n</shape>\n<shape aspect=\"fixed\" h=\"97\" name=\"Cancel End\" strokewidth=\"inherit\" w=\"97\">\n    <connections>\n        <constraint name=\"N\" perimeter=\"0\" x=\"0.5\" y=\"0\"/>\n        <constraint name=\"S\" perimeter=\"0\" x=\"0.5\" y=\"1\"/>\n        <constraint name=\"W\" perimeter=\"0\" x=\"0\" y=\"0.5\"/>\n        <constraint name=\"E\" perimeter=\"0\" x=\"1\" y=\"0.5\"/>\n        <constraint name=\"NW\" perimeter=\"0\" x=\"0.145\" y=\"0.145\"/>\n        <constraint name=\"SW\" perimeter=\"0\" x=\"0.145\" y=\"0.855\"/>\n        <constraint name=\"NE\" perimeter=\"0\" x=\"0.855\" y=\"0.145\"/>\n        <constraint name=\"SE\" perimeter=\"0\" x=\"0.855\" y=\"0.855\"/>\n    </connections>\n    <background>\n        <ellipse h=\"97\" w=\"97\" x=\"0\" y=\"0\"/>\n    </background>\n    <foreground>\n        <strokewidth width=\"3\"/>\n        <fillstroke/>\n        <path>\n            <move x=\"23.5\" y=\"23.5\"/>\n            <line x=\"73.5\" y=\"73.5\"/>\n            <move x=\"73.5\" y=\"23.5\"/>\n            <line x=\"23.5\" y=\"73.5\"/>\n        </path>\n        <stroke/>\n    </foreground>\n</shape>\n<shape aspect=\"fixed\" h=\"99\" name=\"Cancel Intermediate\" strokewidth=\"inherit\" w=\"99\">\n    <connections>\n        <constraint name=\"N\" perimeter=\"0\" x=\"0.5\" y=\"0\"/>\n        <constraint name=\"S\" perimeter=\"0\" x=\"0.5\" y=\"1\"/>\n        <constraint name=\"W\" perimeter=\"0\" x=\"0\" y=\"0.5\"/>\n        <constraint name=\"E\" perimeter=\"0\" x=\"1\" y=\"0.5\"/>\n        <constraint name=\"NW\" perimeter=\"0\" x=\"0.145\" y=\"0.145\"/>\n        <constraint name=\"SW\" perimeter=\"0\" x=\"0.145\" y=\"0.855\"/>\n        <constraint name=\"NE\" perimeter=\"0\" x=\"0.855\" y=\"0.145\"/>\n        <constraint name=\"SE\" perimeter=\"0\" x=\"0.855\" y=\"0.855\"/>\n    </connections>\n    <background>\n        <ellipse h=\"99\" w=\"99\" x=\"0\" y=\"0\"/>\n    </background>\n    <foreground>\n        <fillstroke/>\n        <ellipse h=\"92\" w=\"92\" x=\"3.5\" y=\"3.5\"/>\n        <fillstroke/>\n        <strokewidth width=\"3\"/>\n        <path>\n            <move x=\"24.5\" y=\"24.5\"/>\n            <line x=\"74.5\" y=\"74.5\"/>\n            <move x=\"74.5\" y=\"24.5\"/>\n            <line x=\"24.5\" y=\"74.5\"/>\n        </path>\n        <stroke/>\n    </foreground>\n</shape>\n<shape h=\"10\" name=\"Compensation\" strokewidth=\"inherit\" w=\"15\">\n    <connections/>\n    <background>\n        <path>\n            <move x=\"0\" y=\"5\"/>\n            <line x=\"7.5\" y=\"0\"/>\n            <line x=\"7.5\" y=\"10\"/>\n            <close/>\n            <move x=\"7.5\" y=\"5\"/>\n            <line x=\"15\" y=\"0\"/>\n            <line x=\"15\" y=\"10\"/>\n            <close/>\n        </path>\n    </background>\n    <foreground>\n        <fillstroke/>\n    </foreground>\n</shape>\n<shape aspect=\"fixed\" h=\"97\" name=\"Compensation End\" strokewidth=\"inherit\" w=\"97\">\n    <connections>\n        <constraint name=\"N\" perimeter=\"0\" x=\"0.5\" y=\"0\"/>\n        <constraint name=\"S\" perimeter=\"0\" x=\"0.5\" y=\"1\"/>\n        <constraint name=\"W\" perimeter=\"0\" x=\"0\" y=\"0.5\"/>\n        <constraint name=\"E\" perimeter=\"0\" x=\"1\" y=\"0.5\"/>\n        <constraint name=\"NW\" perimeter=\"0\" x=\"0.145\" y=\"0.145\"/>\n        <constraint name=\"SW\" perimeter=\"0\" x=\"0.145\" y=\"0.855\"/>\n        <constraint name=\"NE\" perimeter=\"0\" x=\"0.855\" y=\"0.145\"/>\n        <constraint name=\"SE\" perimeter=\"0\" x=\"0.855\" y=\"0.855\"/>\n    </connections>\n    <background>\n        <save/>\n        <ellipse h=\"97\" w=\"97\" x=\"0\" y=\"0\"/>\n    </background>\n    <foreground>\n        <strokewidth width=\"3\"/>\n        <fillstroke/>\n        <restore/>\n        <rect/>\n        <stroke/>\n        <path>\n            <move x=\"26.5\" y=\"48.5\"/>\n            <line x=\"48.5\" y=\"33.5\"/>\n            <line x=\"48.5\" y=\"63.5\"/>\n            <close/>\n            <move x=\"48.5\" y=\"48.5\"/>\n            <line x=\"70.5\" y=\"33.5\"/>\n            <line x=\"70.5\" y=\"63.5\"/>\n            <close/>\n        </path>\n        <stroke/>\n    </foreground>\n</shape>\n<shape aspect=\"fixed\" h=\"99\" name=\"Compensation Intermediate\" strokewidth=\"inherit\" w=\"99\">\n    <connections>\n        <constraint name=\"N\" perimeter=\"0\" x=\"0.5\" y=\"0\"/>\n        <constraint name=\"S\" perimeter=\"0\" x=\"0.5\" y=\"1\"/>\n        <constraint name=\"W\" perimeter=\"0\" x=\"0\" y=\"0.5\"/>\n        <constraint name=\"E\" perimeter=\"0\" x=\"1\" y=\"0.5\"/>\n        <constraint name=\"NW\" perimeter=\"0\" x=\"0.145\" y=\"0.145\"/>\n        <constraint name=\"SW\" perimeter=\"0\" x=\"0.145\" y=\"0.855\"/>\n        <constraint name=\"NE\" perimeter=\"0\" x=\"0.855\" y=\"0.145\"/>\n        <constraint name=\"SE\" perimeter=\"0\" x=\"0.855\" y=\"0.855\"/>\n    </connections>\n    <background>\n        <ellipse h=\"99\" w=\"99\" x=\"0\" y=\"0\"/>\n    </background>\n    <foreground>\n        <fillstroke/>\n        <ellipse h=\"92\" w=\"92\" x=\"3.5\" y=\"3.5\"/>\n        <fillstroke/>\n        <path>\n            <move x=\"27.5\" y=\"49.5\"/>\n            <line x=\"49.5\" y=\"34.5\"/>\n            <line x=\"49.5\" y=\"64.5\"/>\n            <close/>\n            <move x=\"49.5\" y=\"49.5\"/>\n            <line x=\"71.5\" y=\"34.5\"/>\n            <line x=\"71.5\" y=\"64.5\"/>\n            <close/>\n        </path>\n        <stroke/>\n    </foreground>\n</shape>\n<shape aspect=\"fixed\" h=\"97\" name=\"Error End\" strokewidth=\"inherit\" w=\"97\">\n    <connections>\n        <constraint name=\"N\" perimeter=\"0\" x=\"0.5\" y=\"0\"/>\n        <constraint name=\"S\" perimeter=\"0\" x=\"0.5\" y=\"1\"/>\n        <constraint name=\"W\" perimeter=\"0\" x=\"0\" y=\"0.5\"/>\n        <constraint name=\"E\" perimeter=\"0\" x=\"1\" y=\"0.5\"/>\n        <constraint name=\"NW\" perimeter=\"0\" x=\"0.145\" y=\"0.145\"/>\n        <constraint name=\"SW\" perimeter=\"0\" x=\"0.145\" y=\"0.855\"/>\n        <constraint name=\"NE\" perimeter=\"0\" x=\"0.855\" y=\"0.145\"/>\n        <constraint name=\"SE\" perimeter=\"0\" x=\"0.855\" y=\"0.855\"/>\n    </connections>\n    <background>\n        <save/>\n        <ellipse h=\"97\" w=\"97\" x=\"0\" y=\"0\"/>\n    </background>\n    <foreground>\n        <strokewidth width=\"3\"/>\n        <fillstroke/>\n        <restore/>\n        <rect/>\n        <stroke/>\n        <path>\n            <move x=\"26.5\" y=\"79.5\"/>\n            <line x=\"39.5\" y=\"24.5\"/>\n            <line x=\"58.5\" y=\"61.5\"/>\n            <line x=\"69.5\" y=\"18.5\"/>\n        </path>\n        <stroke/>\n    </foreground>\n</shape>\n<shape aspect=\"fixed\" h=\"99\" name=\"Error Intermediate\" strokewidth=\"inherit\" w=\"99\">\n    <connections>\n        <constraint name=\"N\" perimeter=\"0\" x=\"0.5\" y=\"0\"/>\n        <constraint name=\"S\" perimeter=\"0\" x=\"0.5\" y=\"1\"/>\n        <constraint name=\"W\" perimeter=\"0\" x=\"0\" y=\"0.5\"/>\n        <constraint name=\"E\" perimeter=\"0\" x=\"1\" y=\"0.5\"/>\n        <constraint name=\"NW\" perimeter=\"0\" x=\"0.145\" y=\"0.145\"/>\n        <constraint name=\"SW\" perimeter=\"0\" x=\"0.145\" y=\"0.855\"/>\n        <constraint name=\"NE\" perimeter=\"0\" x=\"0.855\" y=\"0.145\"/>\n        <constraint name=\"SE\" perimeter=\"0\" x=\"0.855\" y=\"0.855\"/>\n    </connections>\n    <background>\n        <ellipse h=\"99\" w=\"99\" x=\"0\" y=\"0\"/>\n    </background>\n    <foreground>\n        <fillstroke/>\n        <ellipse h=\"92\" w=\"92\" x=\"3.5\" y=\"3.5\"/>\n        <stroke/>\n        <path>\n            <move x=\"27.5\" y=\"80.5\"/>\n            <line x=\"40.5\" y=\"25.5\"/>\n            <line x=\"59.5\" y=\"62.5\"/>\n            <line x=\"70.5\" y=\"19.5\"/>\n        </path>\n        <stroke/>\n    </foreground>\n</shape>\n<shape aspect=\"fixed\" h=\"99\" name=\"Gateway\" strokewidth=\"inherit\" w=\"99\">\n    <connections>\n        <constraint name=\"N\" perimeter=\"0\" x=\"0.5\" y=\"0\"/>\n        <constraint name=\"S\" perimeter=\"0\" x=\"0.5\" y=\"1\"/>\n        <constraint name=\"W\" perimeter=\"0\" x=\"0\" y=\"0.5\"/>\n        <constraint name=\"E\" perimeter=\"0\" x=\"1\" y=\"0.5\"/>\n    </connections>\n    <background>\n        <path>\n            <move x=\"49.5\" y=\"0\"/>\n            <line x=\"99\" y=\"49.5\"/>\n            <line x=\"49.5\" y=\"99\"/>\n            <line x=\"0\" y=\"49.5\"/>\n            <close/>\n        </path>\n    </background>\n    <foreground>\n        <fillstroke/>\n    </foreground>\n</shape>\n<shape aspect=\"fixed\" h=\"99\" name=\"Gateway AND\" strokewidth=\"inherit\" w=\"99\">\n    <connections>\n        <constraint name=\"N\" perimeter=\"0\" x=\"0.5\" y=\"0\"/>\n        <constraint name=\"S\" perimeter=\"0\" x=\"0.5\" y=\"1\"/>\n        <constraint name=\"W\" perimeter=\"0\" x=\"0\" y=\"0.5\"/>\n        <constraint name=\"E\" perimeter=\"0\" x=\"1\" y=\"0.5\"/>\n    </connections>\n    <background>\n        <path>\n            <move x=\"49.5\" y=\"0\"/>\n            <line x=\"99\" y=\"49.5\"/>\n            <line x=\"49.5\" y=\"99\"/>\n            <line x=\"0\" y=\"49.5\"/>\n            <close/>\n        </path>\n    </background>\n    <foreground>\n        <fillstroke/>\n        <path>\n            <move x=\"49.5\" y=\"19.5\"/>\n            <line x=\"49.5\" y=\"79.5\"/>\n            <move x=\"79.5\" y=\"49.5\"/>\n            <line x=\"19.5\" y=\"49.5\"/>\n        </path>\n        <stroke/>\n    </foreground>\n</shape>\n<shape aspect=\"fixed\" h=\"99\" name=\"Gateway COMPLEX\" strokewidth=\"inherit\" w=\"99\">\n    <connections>\n        <constraint name=\"N\" perimeter=\"0\" x=\"0.5\" y=\"0\"/>\n        <constraint name=\"S\" perimeter=\"0\" x=\"0.5\" y=\"1\"/>\n        <constraint name=\"W\" perimeter=\"0\" x=\"0\" y=\"0.5\"/>\n        <constraint name=\"E\" perimeter=\"0\" x=\"1\" y=\"0.5\"/>\n    </connections>\n    <background>\n        <path>\n            <move x=\"49.5\" y=\"0\"/>\n            <line x=\"99\" y=\"49.5\"/>\n            <line x=\"49.5\" y=\"99\"/>\n            <line x=\"0\" y=\"49.5\"/>\n            <close/>\n        </path>\n    </background>\n    <foreground>\n        <fillstroke/>\n        <strokewidth width=\"3\"/>\n        <path>\n            <move x=\"79.5\" y=\"49.5\"/>\n            <line x=\"19.5\" y=\"49.5\"/>\n            <move x=\"49.5\" y=\"19.5\"/>\n            <line x=\"49.5\" y=\"79.5\"/>\n            <move x=\"28.5\" y=\"28.5\"/>\n            <line x=\"70.5\" y=\"70.5\"/>\n            <move x=\"70.5\" y=\"28.5\"/>\n            <line x=\"28.5\" y=\"70.5\"/>\n        </path>\n        <stroke/>\n    </foreground>\n</shape>\n<shape aspect=\"fixed\" h=\"99\" name=\"Gateway OR\" strokewidth=\"inherit\" w=\"99\">\n    <connections>\n        <constraint name=\"N\" perimeter=\"0\" x=\"0.5\" y=\"0\"/>\n        <constraint name=\"S\" perimeter=\"0\" x=\"0.5\" y=\"1\"/>\n        <constraint name=\"W\" perimeter=\"0\" x=\"0\" y=\"0.5\"/>\n        <constraint name=\"E\" perimeter=\"0\" x=\"1\" y=\"0.5\"/>\n    </connections>\n    <background>\n        <path>\n            <move x=\"49.5\" y=\"0\"/>\n            <line x=\"99\" y=\"49.5\"/>\n            <line x=\"49.5\" y=\"99\"/>\n            <line x=\"0\" y=\"49.5\"/>\n            <close/>\n        </path>\n    </background>\n    <foreground>\n        <fillstroke/>\n        <strokewidth width=\"3\"/>\n        <ellipse h=\"50\" w=\"50\" x=\"24.5\" y=\"24.5\"/>\n        <stroke/>\n    </foreground>\n</shape>\n<shape aspect=\"fixed\" h=\"99\" name=\"Gateway XOR (data)\" strokewidth=\"inherit\" w=\"99\">\n    <connections>\n        <constraint name=\"N\" perimeter=\"0\" x=\"0.5\" y=\"0\"/>\n        <constraint name=\"S\" perimeter=\"0\" x=\"0.5\" y=\"1\"/>\n        <constraint name=\"W\" perimeter=\"0\" x=\"0\" y=\"0.5\"/>\n        <constraint name=\"E\" perimeter=\"0\" x=\"1\" y=\"0.5\"/>\n    </connections>\n    <background>\n        <path>\n            <move x=\"49.5\" y=\"0\"/>\n            <line x=\"99\" y=\"49.5\"/>\n            <line x=\"49.5\" y=\"99\"/>\n            <line x=\"0\" y=\"49.5\"/>\n            <close/>\n            <move x=\"37.5\" y=\"23.5\"/>\n            <line x=\"61.5\" y=\"75.5\"/>\n            <move x=\"61.5\" y=\"23.5\"/>\n            <line x=\"37.5\" y=\"75.5\"/>\n        </path>\n    </background>\n    <foreground>\n        <fillstroke/>\n    </foreground>\n</shape>\n<shape aspect=\"fixed\" h=\"99\" name=\"Gateway XOR (event)\" strokewidth=\"inherit\" w=\"99\">\n    <connections>\n        <constraint name=\"N\" perimeter=\"0\" x=\"0.5\" y=\"0\"/>\n        <constraint name=\"S\" perimeter=\"0\" x=\"0.5\" y=\"1\"/>\n        <constraint name=\"W\" perimeter=\"0\" x=\"0\" y=\"0.5\"/>\n        <constraint name=\"E\" perimeter=\"0\" x=\"1\" y=\"0.5\"/>\n    </connections>\n    <background>\n        <path>\n            <move x=\"49.5\" y=\"0\"/>\n            <line x=\"99\" y=\"49.5\"/>\n            <line x=\"49.5\" y=\"99\"/>\n            <line x=\"0\" y=\"49.5\"/>\n            <close/>\n        </path>\n    </background>\n    <foreground>\n        <fillstroke/>\n        <ellipse h=\"49.8\" w=\"49.8\" x=\"24.6\" y=\"24.6\"/>\n        <stroke/>\n        <ellipse h=\"46.2\" w=\"46.2\" x=\"26.4\" y=\"26.4\"/>\n        <stroke/>\n        <path>\n            <move x=\"49.5\" y=\"37.1\"/>\n            <line x=\"60.2\" y=\"55.7\"/>\n            <line x=\"38.8\" y=\"55.7\"/>\n            <close/>\n            <move x=\"49.5\" y=\"61.9\"/>\n            <line x=\"59.5\" y=\"43.3\"/>\n            <line x=\"38.5\" y=\"43.3\"/>\n            <close/>\n        </path>\n        <stroke/>\n    </foreground>\n</shape>\n<shape aspect=\"fixed\" h=\"97\" name=\"General End\" strokewidth=\"inherit\" w=\"97\">\n    <connections>\n        <constraint name=\"N\" perimeter=\"0\" x=\"0.5\" y=\"0\"/>\n        <constraint name=\"S\" perimeter=\"0\" x=\"0.5\" y=\"1\"/>\n        <constraint name=\"W\" perimeter=\"0\" x=\"0\" y=\"0.5\"/>\n        <constraint name=\"E\" perimeter=\"0\" x=\"1\" y=\"0.5\"/>\n        <constraint name=\"NW\" perimeter=\"0\" x=\"0.145\" y=\"0.145\"/>\n        <constraint name=\"SW\" perimeter=\"0\" x=\"0.145\" y=\"0.855\"/>\n        <constraint name=\"NE\" perimeter=\"0\" x=\"0.855\" y=\"0.145\"/>\n        <constraint name=\"SE\" perimeter=\"0\" x=\"0.855\" y=\"0.855\"/>\n    </connections>\n    <background>\n        <ellipse h=\"97\" w=\"97\" x=\"0\" y=\"0\"/>\n    </background>\n    <foreground>\n        <strokewidth width=\"3\"/>\n        <fillstroke/>\n    </foreground>\n</shape>\n<shape aspect=\"fixed\" h=\"99\" name=\"General Intermediate\" strokewidth=\"inherit\" w=\"99\">\n    <connections>\n        <constraint name=\"N\" perimeter=\"0\" x=\"0.5\" y=\"0\"/>\n        <constraint name=\"S\" perimeter=\"0\" x=\"0.5\" y=\"1\"/>\n        <constraint name=\"W\" perimeter=\"0\" x=\"0\" y=\"0.5\"/>\n        <constraint name=\"E\" perimeter=\"0\" x=\"1\" y=\"0.5\"/>\n        <constraint name=\"NW\" perimeter=\"0\" x=\"0.145\" y=\"0.145\"/>\n        <constraint name=\"SW\" perimeter=\"0\" x=\"0.145\" y=\"0.855\"/>\n        <constraint name=\"NE\" perimeter=\"0\" x=\"0.855\" y=\"0.145\"/>\n        <constraint name=\"SE\" perimeter=\"0\" x=\"0.855\" y=\"0.855\"/>\n    </connections>\n    <background>\n        <ellipse h=\"99\" w=\"99\" x=\"0\" y=\"0\"/>\n    </background>\n    <foreground>\n        <fillstroke/>\n        <ellipse h=\"92\" w=\"92\" x=\"3.5\" y=\"3.5\"/>\n        <stroke/>\n    </foreground>\n</shape>\n<shape aspect=\"fixed\" h=\"99\" name=\"General Start\" strokewidth=\"inherit\" w=\"99\">\n    <connections>\n        <constraint name=\"N\" perimeter=\"0\" x=\"0.5\" y=\"0\"/>\n        <constraint name=\"S\" perimeter=\"0\" x=\"0.5\" y=\"1\"/>\n        <constraint name=\"W\" perimeter=\"0\" x=\"0\" y=\"0.5\"/>\n        <constraint name=\"E\" perimeter=\"0\" x=\"1\" y=\"0.5\"/>\n        <constraint name=\"NW\" perimeter=\"0\" x=\"0.145\" y=\"0.145\"/>\n        <constraint name=\"SW\" perimeter=\"0\" x=\"0.145\" y=\"0.855\"/>\n        <constraint name=\"NE\" perimeter=\"0\" x=\"0.855\" y=\"0.145\"/>\n        <constraint name=\"SE\" perimeter=\"0\" x=\"0.855\" y=\"0.855\"/>\n    </connections>\n    <background>\n        <ellipse h=\"99\" w=\"99\" x=\"0\" y=\"0\"/>\n    </background>\n    <foreground>\n        <fillstroke/>\n    </foreground>\n</shape>\n<shape aspect=\"fixed\" h=\"97\" name=\"Link End\" strokewidth=\"inherit\" w=\"97\">\n    <connections>\n        <constraint name=\"N\" perimeter=\"0\" x=\"0.5\" y=\"0\"/>\n        <constraint name=\"S\" perimeter=\"0\" x=\"0.5\" y=\"1\"/>\n        <constraint name=\"W\" perimeter=\"0\" x=\"0\" y=\"0.5\"/>\n        <constraint name=\"E\" perimeter=\"0\" x=\"1\" y=\"0.5\"/>\n        <constraint name=\"NW\" perimeter=\"0\" x=\"0.145\" y=\"0.145\"/>\n        <constraint name=\"SW\" perimeter=\"0\" x=\"0.145\" y=\"0.855\"/>\n        <constraint name=\"NE\" perimeter=\"0\" x=\"0.855\" y=\"0.145\"/>\n        <constraint name=\"SE\" perimeter=\"0\" x=\"0.855\" y=\"0.855\"/>\n    </connections>\n    <background>\n        <save/>\n        <ellipse h=\"97\" w=\"97\" x=\"0\" y=\"0\"/>\n    </background>\n    <foreground>\n        <strokewidth width=\"3\"/>\n        <fillstroke/>\n        <restore/>\n        <rect/>\n        <stroke/>\n        <path>\n            <move x=\"25.5\" y=\"57.5\"/>\n            <line x=\"25.5\" y=\"39.5\"/>\n            <line x=\"54.5\" y=\"39.5\"/>\n            <line x=\"54.5\" y=\"31.5\"/>\n            <line x=\"71.5\" y=\"48.5\"/>\n            <line x=\"54.5\" y=\"65.5\"/>\n            <line x=\"54.5\" y=\"57.5\"/>\n            <close/>\n        </path>\n        <stroke/>\n    </foreground>\n</shape>\n<shape aspect=\"fixed\" h=\"99\" name=\"Link Intermediate\" strokewidth=\"inherit\" w=\"99\">\n    <connections>\n        <constraint name=\"N\" perimeter=\"0\" x=\"0.5\" y=\"0\"/>\n        <constraint name=\"S\" perimeter=\"0\" x=\"0.5\" y=\"1\"/>\n        <constraint name=\"W\" perimeter=\"0\" x=\"0\" y=\"0.5\"/>\n        <constraint name=\"E\" perimeter=\"0\" x=\"1\" y=\"0.5\"/>\n        <constraint name=\"NW\" perimeter=\"0\" x=\"0.145\" y=\"0.145\"/>\n        <constraint name=\"SW\" perimeter=\"0\" x=\"0.145\" y=\"0.855\"/>\n        <constraint name=\"NE\" perimeter=\"0\" x=\"0.855\" y=\"0.145\"/>\n        <constraint name=\"SE\" perimeter=\"0\" x=\"0.855\" y=\"0.855\"/>\n    </connections>\n    <background>\n        <ellipse h=\"99\" w=\"99\" x=\"0\" y=\"0\"/>\n    </background>\n    <foreground>\n        <fillstroke/>\n        <ellipse h=\"92\" w=\"92\" x=\"3.5\" y=\"3.5\"/>\n        <stroke/>\n        <path>\n            <move x=\"26.5\" y=\"58.5\"/>\n            <line x=\"26.5\" y=\"40.5\"/>\n            <line x=\"55.5\" y=\"40.5\"/>\n            <line x=\"55.5\" y=\"32.5\"/>\n            <line x=\"72.5\" y=\"49.5\"/>\n            <line x=\"55.5\" y=\"66.5\"/>\n            <line x=\"55.5\" y=\"58.5\"/>\n            <close/>\n        </path>\n        <stroke/>\n    </foreground>\n</shape>\n<shape aspect=\"fixed\" h=\"99\" name=\"Link Start\" strokewidth=\"inherit\" w=\"99\">\n    <connections>\n        <constraint name=\"N\" perimeter=\"0\" x=\"0.5\" y=\"0\"/>\n        <constraint name=\"S\" perimeter=\"0\" x=\"0.5\" y=\"1\"/>\n        <constraint name=\"W\" perimeter=\"0\" x=\"0\" y=\"0.5\"/>\n        <constraint name=\"E\" perimeter=\"0\" x=\"1\" y=\"0.5\"/>\n        <constraint name=\"NW\" perimeter=\"0\" x=\"0.145\" y=\"0.145\"/>\n        <constraint name=\"SW\" perimeter=\"0\" x=\"0.145\" y=\"0.855\"/>\n        <constraint name=\"NE\" perimeter=\"0\" x=\"0.855\" y=\"0.145\"/>\n        <constraint name=\"SE\" perimeter=\"0\" x=\"0.855\" y=\"0.855\"/>\n    </connections>\n    <background>\n        <ellipse h=\"99\" w=\"99\" x=\"0\" y=\"0\"/>\n    </background>\n    <foreground>\n        <fillstroke/>\n        <path>\n            <move x=\"26.5\" y=\"58.5\"/>\n            <line x=\"26.5\" y=\"40.5\"/>\n            <line x=\"55.5\" y=\"40.5\"/>\n            <line x=\"55.5\" y=\"32.5\"/>\n            <line x=\"72.5\" y=\"49.5\"/>\n            <line x=\"55.5\" y=\"66.5\"/>\n            <line x=\"55.5\" y=\"58.5\"/>\n            <close/>\n        </path>\n        <stroke/>\n    </foreground>\n</shape>\n<shape h=\"21.62\" name=\"Loop\" strokewidth=\"inherit\" w=\"22.49\">\n    <connections/>\n    <background>\n        <path>\n            <move x=\"5.5\" y=\"19.08\"/>\n            <arc large-arc-flag=\"1\" rx=\"10\" ry=\"10\" sweep-flag=\"1\" x=\"10.5\" x-axis-rotation=\"0\" y=\"21.08\"/>\n            <move x=\"5.5\" y=\"14.08\"/>\n            <line x=\"5.5\" y=\"19.08\"/>\n            <line x=\"0\" y=\"17.58\"/>\n        </path>\n    </background>\n    <foreground>\n        <stroke/>\n    </foreground>\n</shape>\n<shape aspect=\"fixed\" h=\"10.39\" name=\"Loop Marker\" strokewidth=\"inherit\" w=\"15\">\n    <connections/>\n    <background>\n        <path>\n            <move x=\"0\" y=\"1.69\"/>\n            <arc large-arc-flag=\"0\" rx=\"5\" ry=\"5\" sweep-flag=\"1\" x=\"7.5\" x-axis-rotation=\"0\" y=\"1.69\"/>\n            <arc large-arc-flag=\"0\" rx=\"5\" ry=\"5\" sweep-flag=\"0\" x=\"15\" x-axis-rotation=\"0\" y=\"1.69\"/>\n            <line x=\"15\" y=\"8.69\"/>\n            <arc large-arc-flag=\"0\" rx=\"5\" ry=\"5\" sweep-flag=\"1\" x=\"7.5\" x-axis-rotation=\"0\" y=\"8.69\"/>\n            <arc large-arc-flag=\"0\" rx=\"5\" ry=\"5\" sweep-flag=\"0\" x=\"0\" x-axis-rotation=\"0\" y=\"8.69\"/>\n            <close/>\n            <close/>\n        </path>\n    </background>\n    <foreground>\n        <fillstroke/>\n    </foreground>\n</shape>\n<shape h=\"59.28\" name=\"Manual Task\" strokewidth=\"inherit\" w=\"91.4\">\n    <connections/>\n    <background>\n        <path>\n            <move x=\"0\" y=\"14\"/>\n            <arc large-arc-flag=\"0\" rx=\"20\" ry=\"20\" sweep-flag=\"1\" x=\"14\" x-axis-rotation=\"0\" y=\"0\"/>\n            <line x=\"50\" y=\"0\"/>\n            <arc large-arc-flag=\"0\" rx=\"6\" ry=\"6\" sweep-flag=\"1\" x=\"50\" x-axis-rotation=\"0\" y=\"11\"/>\n            <line x=\"26\" y=\"11\"/>\n            <line x=\"87\" y=\"11\"/>\n            <arc large-arc-flag=\"0\" rx=\"7\" ry=\"7\" sweep-flag=\"1\" x=\"87\" x-axis-rotation=\"0\" y=\"24\"/>\n            <line x=\"45\" y=\"24\"/>\n            <line x=\"87\" y=\"24\"/>\n            <arc large-arc-flag=\"0\" rx=\"7\" ry=\"7\" sweep-flag=\"1\" x=\"87\" x-axis-rotation=\"0\" y=\"37\"/>\n            <line x=\"49\" y=\"37\"/>\n            <line x=\"82\" y=\"37\"/>\n            <arc large-arc-flag=\"0\" rx=\"6\" ry=\"6\" sweep-flag=\"1\" x=\"82\" x-axis-rotation=\"0\" y=\"49\"/>\n            <line x=\"48\" y=\"49\"/>\n            <line x=\"75\" y=\"49\"/>\n            <arc large-arc-flag=\"0\" rx=\"5\" ry=\"5\" sweep-flag=\"1\" x=\"75\" x-axis-rotation=\"0\" y=\"59\"/>\n            <line x=\"9\" y=\"59\"/>\n            <arc large-arc-flag=\"0\" rx=\"8\" ry=\"8\" sweep-flag=\"1\" x=\"0\" x-axis-rotation=\"0\" y=\"52\"/>\n            <close/>\n        </path>\n    </background>\n    <foreground>\n        <fillstroke/>\n    </foreground>\n</shape>\n<shape aspect=\"fixed\" h=\"97\" name=\"Message End\" strokewidth=\"inherit\" w=\"97\">\n    <connections>\n        <constraint name=\"N\" perimeter=\"0\" x=\"0.5\" y=\"0\"/>\n        <constraint name=\"S\" perimeter=\"0\" x=\"0.5\" y=\"1\"/>\n        <constraint name=\"W\" perimeter=\"0\" x=\"0\" y=\"0.5\"/>\n        <constraint name=\"E\" perimeter=\"0\" x=\"1\" y=\"0.5\"/>\n        <constraint name=\"NW\" perimeter=\"0\" x=\"0.145\" y=\"0.145\"/>\n        <constraint name=\"SW\" perimeter=\"0\" x=\"0.145\" y=\"0.855\"/>\n        <constraint name=\"NE\" perimeter=\"0\" x=\"0.855\" y=\"0.145\"/>\n        <constraint name=\"SE\" perimeter=\"0\" x=\"0.855\" y=\"0.855\"/>\n    </connections>\n    <background>\n        <save/>\n        <ellipse h=\"97\" w=\"97\" x=\"0\" y=\"0\"/>\n    </background>\n    <foreground>\n        <strokewidth width=\"3\"/>\n        <fillstroke/>\n        <restore/>\n        <rect/>\n        <stroke/>\n        <rect h=\"40\" w=\"70\" x=\"13.5\" y=\"28.5\"/>\n        <stroke/>\n        <path>\n            <move x=\"13.5\" y=\"28.5\"/>\n            <line x=\"48.5\" y=\"48.5\"/>\n            <line x=\"83.5\" y=\"28.5\"/>\n        </path>\n        <stroke/>\n    </foreground>\n</shape>\n<shape aspect=\"fixed\" h=\"99\" name=\"Message Intermediate\" strokewidth=\"inherit\" w=\"99\">\n    <connections>\n        <constraint name=\"N\" perimeter=\"0\" x=\"0.5\" y=\"0\"/>\n        <constraint name=\"S\" perimeter=\"0\" x=\"0.5\" y=\"1\"/>\n        <constraint name=\"W\" perimeter=\"0\" x=\"0\" y=\"0.5\"/>\n        <constraint name=\"E\" perimeter=\"0\" x=\"1\" y=\"0.5\"/>\n        <constraint name=\"NW\" perimeter=\"0\" x=\"0.145\" y=\"0.145\"/>\n        <constraint name=\"SW\" perimeter=\"0\" x=\"0.145\" y=\"0.855\"/>\n        <constraint name=\"NE\" perimeter=\"0\" x=\"0.855\" y=\"0.145\"/>\n        <constraint name=\"SE\" perimeter=\"0\" x=\"0.855\" y=\"0.855\"/>\n    </connections>\n    <background>\n        <ellipse h=\"99\" w=\"99\" x=\"0\" y=\"0\"/>\n    </background>\n    <foreground>\n        <fillstroke/>\n        <ellipse h=\"92\" w=\"92\" x=\"3.5\" y=\"3.5\"/>\n        <stroke/>\n        <rect h=\"40\" w=\"70\" x=\"14.5\" y=\"29.5\"/>\n        <stroke/>\n        <path>\n            <move x=\"14.5\" y=\"29.5\"/>\n            <line x=\"49.5\" y=\"49.5\"/>\n            <line x=\"84.5\" y=\"29.5\"/>\n        </path>\n        <stroke/>\n    </foreground>\n</shape>\n<shape aspect=\"fixed\" h=\"99\" name=\"Message Start\" strokewidth=\"inherit\" w=\"99\">\n    <connections>\n        <constraint name=\"N\" perimeter=\"0\" x=\"0.5\" y=\"0\"/>\n        <constraint name=\"S\" perimeter=\"0\" x=\"0.5\" y=\"1\"/>\n        <constraint name=\"W\" perimeter=\"0\" x=\"0\" y=\"0.5\"/>\n        <constraint name=\"E\" perimeter=\"0\" x=\"1\" y=\"0.5\"/>\n        <constraint name=\"NW\" perimeter=\"0\" x=\"0.145\" y=\"0.145\"/>\n        <constraint name=\"SW\" perimeter=\"0\" x=\"0.145\" y=\"0.855\"/>\n        <constraint name=\"NE\" perimeter=\"0\" x=\"0.855\" y=\"0.145\"/>\n        <constraint name=\"SE\" perimeter=\"0\" x=\"0.855\" y=\"0.855\"/>\n    </connections>\n    <background>\n        <ellipse h=\"99\" w=\"99\" x=\"0\" y=\"0\"/>\n    </background>\n    <foreground>\n        <fillstroke/>\n        <rect h=\"40\" w=\"70\" x=\"14.5\" y=\"29.5\"/>\n        <stroke/>\n        <path>\n            <move x=\"14.5\" y=\"29.5\"/>\n            <line x=\"49.5\" y=\"49.5\"/>\n            <line x=\"84.5\" y=\"29.5\"/>\n        </path>\n        <stroke/>\n    </foreground>\n</shape>\n<shape aspect=\"fixed\" h=\"97\" name=\"Multiple End\" strokewidth=\"inherit\" w=\"97\">\n    <connections>\n        <constraint name=\"N\" perimeter=\"0\" x=\"0.5\" y=\"0\"/>\n        <constraint name=\"S\" perimeter=\"0\" x=\"0.5\" y=\"1\"/>\n        <constraint name=\"W\" perimeter=\"0\" x=\"0\" y=\"0.5\"/>\n        <constraint name=\"E\" perimeter=\"0\" x=\"1\" y=\"0.5\"/>\n        <constraint name=\"NW\" perimeter=\"0\" x=\"0.145\" y=\"0.145\"/>\n        <constraint name=\"SW\" perimeter=\"0\" x=\"0.145\" y=\"0.855\"/>\n        <constraint name=\"NE\" perimeter=\"0\" x=\"0.855\" y=\"0.145\"/>\n        <constraint name=\"SE\" perimeter=\"0\" x=\"0.855\" y=\"0.855\"/>\n    </connections>\n    <background>\n        <save/>\n        <ellipse h=\"97\" w=\"97\" x=\"0\" y=\"0\"/>\n    </background>\n    <foreground>\n        <strokewidth width=\"3\"/>\n        <fillstroke/>\n        <restore/>\n        <rect/>\n        <stroke/>\n        <path>\n            <move x=\"48.5\" y=\"23.5\"/>\n            <line x=\"70.5\" y=\"60.5\"/>\n            <line x=\"26.5\" y=\"60.5\"/>\n            <close/>\n            <move x=\"48.5\" y=\"73.5\"/>\n            <line x=\"70.5\" y=\"36.5\"/>\n            <line x=\"26.5\" y=\"36.5\"/>\n            <close/>\n        </path>\n        <stroke/>\n    </foreground>\n</shape>\n<shape aspect=\"fixed\" h=\"14\" name=\"Multiple Instances\" strokewidth=\"inherit\" w=\"9\">\n    <connections/>\n    <background>\n        <path>\n            <move x=\"0\" y=\"0\"/>\n            <line x=\"3\" y=\"0\"/>\n            <line x=\"3\" y=\"14\"/>\n            <line x=\"0\" y=\"14\"/>\n            <close/>\n            <move x=\"6\" y=\"0\"/>\n            <line x=\"9\" y=\"0\"/>\n            <line x=\"9\" y=\"14\"/>\n            <line x=\"6\" y=\"14\"/>\n            <close/>\n        </path>\n    </background>\n    <foreground>\n        <fillstroke/>\n    </foreground>\n</shape>\n<shape aspect=\"fixed\" h=\"99\" name=\"Multiple Intermediate\" strokewidth=\"inherit\" w=\"99\">\n    <connections>\n        <constraint name=\"N\" perimeter=\"0\" x=\"0.5\" y=\"0\"/>\n        <constraint name=\"S\" perimeter=\"0\" x=\"0.5\" y=\"1\"/>\n        <constraint name=\"W\" perimeter=\"0\" x=\"0\" y=\"0.5\"/>\n        <constraint name=\"E\" perimeter=\"0\" x=\"1\" y=\"0.5\"/>\n        <constraint name=\"NW\" perimeter=\"0\" x=\"0.145\" y=\"0.145\"/>\n        <constraint name=\"SW\" perimeter=\"0\" x=\"0.145\" y=\"0.855\"/>\n        <constraint name=\"NE\" perimeter=\"0\" x=\"0.855\" y=\"0.145\"/>\n        <constraint name=\"SE\" perimeter=\"0\" x=\"0.855\" y=\"0.855\"/>\n    </connections>\n    <background>\n        <ellipse h=\"99\" w=\"99\" x=\"0\" y=\"0\"/>\n    </background>\n    <foreground>\n        <fillstroke/>\n        <ellipse h=\"92\" w=\"92\" x=\"3.5\" y=\"3.5\"/>\n        <stroke/>\n        <path>\n            <move x=\"49.5\" y=\"24.5\"/>\n            <line x=\"71.5\" y=\"61.5\"/>\n            <line x=\"27.5\" y=\"61.5\"/>\n            <close/>\n            <move x=\"49.5\" y=\"74.5\"/>\n            <line x=\"71.5\" y=\"37.5\"/>\n            <line x=\"27.5\" y=\"37.5\"/>\n            <close/>\n        </path>\n        <stroke/>\n    </foreground>\n</shape>\n<shape aspect=\"fixed\" h=\"99\" name=\"Multiple Start\" strokewidth=\"inherit\" w=\"99\">\n    <connections>\n        <constraint name=\"N\" perimeter=\"0\" x=\"0.5\" y=\"0\"/>\n        <constraint name=\"S\" perimeter=\"0\" x=\"0.5\" y=\"1\"/>\n        <constraint name=\"W\" perimeter=\"0\" x=\"0\" y=\"0.5\"/>\n        <constraint name=\"E\" perimeter=\"0\" x=\"1\" y=\"0.5\"/>\n        <constraint name=\"NW\" perimeter=\"0\" x=\"0.145\" y=\"0.145\"/>\n        <constraint name=\"SW\" perimeter=\"0\" x=\"0.145\" y=\"0.855\"/>\n        <constraint name=\"NE\" perimeter=\"0\" x=\"0.855\" y=\"0.145\"/>\n        <constraint name=\"SE\" perimeter=\"0\" x=\"0.855\" y=\"0.855\"/>\n    </connections>\n    <background>\n        <ellipse h=\"99\" w=\"99\" x=\"0\" y=\"0\"/>\n    </background>\n    <foreground>\n        <fillstroke/>\n        <path>\n            <move x=\"49.5\" y=\"24.5\"/>\n            <line x=\"71.5\" y=\"61.5\"/>\n            <line x=\"27.5\" y=\"61.5\"/>\n            <close/>\n            <move x=\"49.5\" y=\"74.5\"/>\n            <line x=\"71.5\" y=\"37.5\"/>\n            <line x=\"27.5\" y=\"37.5\"/>\n            <close/>\n        </path>\n        <stroke/>\n    </foreground>\n</shape>\n<shape aspect=\"fixed\" h=\"99\" name=\"Rule Intermediate\" strokewidth=\"inherit\" w=\"99\">\n    <connections>\n        <constraint name=\"N\" perimeter=\"0\" x=\"0.5\" y=\"0\"/>\n        <constraint name=\"S\" perimeter=\"0\" x=\"0.5\" y=\"1\"/>\n        <constraint name=\"W\" perimeter=\"0\" x=\"0\" y=\"0.5\"/>\n        <constraint name=\"E\" perimeter=\"0\" x=\"1\" y=\"0.5\"/>\n        <constraint name=\"NW\" perimeter=\"0\" x=\"0.145\" y=\"0.145\"/>\n        <constraint name=\"SW\" perimeter=\"0\" x=\"0.145\" y=\"0.855\"/>\n        <constraint name=\"NE\" perimeter=\"0\" x=\"0.855\" y=\"0.145\"/>\n        <constraint name=\"SE\" perimeter=\"0\" x=\"0.855\" y=\"0.855\"/>\n    </connections>\n    <background>\n        <ellipse h=\"99\" w=\"99\" x=\"0\" y=\"0\"/>\n    </background>\n    <foreground>\n        <fillstroke/>\n        <ellipse h=\"92\" w=\"92\" x=\"3.5\" y=\"3.5\"/>\n        <stroke/>\n        <rect h=\"68\" w=\"40\" x=\"29.5\" y=\"15.5\"/>\n        <stroke/>\n        <path>\n            <move x=\"29.5\" y=\"22.5\"/>\n            <line x=\"61.5\" y=\"22.5\"/>\n            <move x=\"29.5\" y=\"40.5\"/>\n            <line x=\"61.5\" y=\"40.5\"/>\n            <move x=\"29.5\" y=\"58.5\"/>\n            <line x=\"61.5\" y=\"58.5\"/>\n            <move x=\"29.5\" y=\"76.5\"/>\n            <line x=\"61.5\" y=\"76.5\"/>\n        </path>\n        <stroke/>\n    </foreground>\n</shape>\n<shape aspect=\"fixed\" h=\"99\" name=\"Rule Start\" strokewidth=\"inherit\" w=\"99\">\n    <connections>\n        <constraint name=\"N\" perimeter=\"0\" x=\"0.5\" y=\"0\"/>\n        <constraint name=\"S\" perimeter=\"0\" x=\"0.5\" y=\"1\"/>\n        <constraint name=\"W\" perimeter=\"0\" x=\"0\" y=\"0.5\"/>\n        <constraint name=\"E\" perimeter=\"0\" x=\"1\" y=\"0.5\"/>\n        <constraint name=\"NW\" perimeter=\"0\" x=\"0.145\" y=\"0.145\"/>\n        <constraint name=\"SW\" perimeter=\"0\" x=\"0.145\" y=\"0.855\"/>\n        <constraint name=\"NE\" perimeter=\"0\" x=\"0.855\" y=\"0.145\"/>\n        <constraint name=\"SE\" perimeter=\"0\" x=\"0.855\" y=\"0.855\"/>\n    </connections>\n    <background>\n        <ellipse h=\"99\" w=\"99\" x=\"0\" y=\"0\"/>\n    </background>\n    <foreground>\n        <fillstroke/>\n        <rect h=\"68\" w=\"40\" x=\"29.5\" y=\"15.5\"/>\n        <stroke/>\n        <path>\n            <move x=\"29.5\" y=\"22.5\"/>\n            <line x=\"61.5\" y=\"22.5\"/>\n            <move x=\"29.5\" y=\"40.5\"/>\n            <line x=\"61.5\" y=\"40.5\"/>\n            <move x=\"29.5\" y=\"58.5\"/>\n            <line x=\"61.5\" y=\"58.5\"/>\n            <move x=\"29.5\" y=\"76.5\"/>\n            <line x=\"61.5\" y=\"76.5\"/>\n        </path>\n        <stroke/>\n    </foreground>\n</shape>\n<shape h=\"100\" name=\"Script Task\" strokewidth=\"inherit\" w=\"73.4\">\n    <connections/>\n    <background>\n        <path>\n            <move x=\"61.7\" y=\"0\"/>\n            <arc large-arc-flag=\"0\" rx=\"40\" ry=\"40\" sweep-flag=\"0\" x=\"61.7\" x-axis-rotation=\"0\" y=\"50\"/>\n            <arc large-arc-flag=\"0\" rx=\"40\" ry=\"40\" sweep-flag=\"1\" x=\"61.7\" x-axis-rotation=\"0\" y=\"100\"/>\n            <line x=\"11.7\" y=\"100\"/>\n            <arc large-arc-flag=\"0\" rx=\"40\" ry=\"40\" sweep-flag=\"0\" x=\"11.7\" x-axis-rotation=\"0\" y=\"50\"/>\n            <arc large-arc-flag=\"0\" rx=\"40\" ry=\"40\" sweep-flag=\"1\" x=\"11.7\" x-axis-rotation=\"0\" y=\"0\"/>\n            <close/>\n        </path>\n    </background>\n    <foreground>\n        <fillstroke/>\n        <path>\n            <move x=\"21.7\" y=\"50\"/>\n            <line x=\"51.7\" y=\"50\"/>\n            <move x=\"13.7\" y=\"30\"/>\n            <line x=\"43.7\" y=\"30\"/>\n            <move x=\"15.7\" y=\"10\"/>\n            <line x=\"45.7\" y=\"10\"/>\n            <move x=\"29.7\" y=\"70\"/>\n            <line x=\"59.7\" y=\"70\"/>\n            <move x=\"27.7\" y=\"90\"/>\n            <line x=\"57.7\" y=\"90\"/>\n        </path>\n        <stroke/>\n    </foreground>\n</shape>\n<shape h=\"93.3\" name=\"Service Task\" strokewidth=\"inherit\" w=\"90.9\">\n    <connections/>\n    <background>\n        <path>\n            <move x=\"2.06\" y=\"24.62\"/>\n            <line x=\"10.17\" y=\"30.95\"/>\n            <line x=\"9.29\" y=\"37.73\"/>\n            <line x=\"0\" y=\"41.42\"/>\n            <line x=\"2.95\" y=\"54.24\"/>\n            <line x=\"13.41\" y=\"52.92\"/>\n            <line x=\"17.39\" y=\"58.52\"/>\n            <line x=\"13.56\" y=\"67.66\"/>\n            <line x=\"24.47\" y=\"74.44\"/>\n            <line x=\"30.81\" y=\"66.33\"/>\n            <line x=\"37.88\" y=\"67.21\"/>\n            <line x=\"41.57\" y=\"76.5\"/>\n            <line x=\"54.24\" y=\"73.55\"/>\n            <line x=\"53.06\" y=\"62.94\"/>\n            <line x=\"58.52\" y=\"58.52\"/>\n            <line x=\"67.21\" y=\"63.09\"/>\n            <line x=\"74.58\" y=\"51.88\"/>\n            <line x=\"66.03\" y=\"45.25\"/>\n            <line x=\"66.92\" y=\"38.62\"/>\n            <line x=\"76.5\" y=\"34.93\"/>\n            <line x=\"73.7\" y=\"22.26\"/>\n            <line x=\"62.64\" y=\"23.44\"/>\n            <line x=\"58.81\" y=\"18.42\"/>\n            <line x=\"62.79\" y=\"8.7\"/>\n            <line x=\"51.74\" y=\"2.21\"/>\n            <line x=\"44.81\" y=\"10.47\"/>\n            <line x=\"38.03\" y=\"9.43\"/>\n            <line x=\"33.75\" y=\"0\"/>\n            <line x=\"21.52\" y=\"3.24\"/>\n            <line x=\"22.7\" y=\"13.56\"/>\n            <line x=\"18.13\" y=\"17.54\"/>\n            <line x=\"8.7\" y=\"13.56\"/>\n            <close/>\n            <move x=\"24.8\" y=\"39\"/>\n            <arc large-arc-flag=\"1\" rx=\"12\" ry=\"12\" sweep-flag=\"1\" x=\"51.8\" x-axis-rotation=\"0\" y=\"39\"/>\n            <arc large-arc-flag=\"0\" rx=\"12\" ry=\"12\" sweep-flag=\"1\" x=\"24.8\" x-axis-rotation=\"0\" y=\"39\"/>\n            <close/>\n        </path>\n    </background>\n    <foreground>\n        <fillstroke/>\n        <path>\n            <move x=\"16.46\" y=\"41.42\"/>\n            <line x=\"24.57\" y=\"47.75\"/>\n            <line x=\"23.69\" y=\"54.53\"/>\n            <line x=\"14.4\" y=\"58.22\"/>\n            <line x=\"17.35\" y=\"71.04\"/>\n            <line x=\"27.81\" y=\"69.72\"/>\n            <line x=\"31.79\" y=\"75.32\"/>\n            <line x=\"27.96\" y=\"84.46\"/>\n            <line x=\"38.87\" y=\"91.24\"/>\n            <line x=\"45.21\" y=\"83.13\"/>\n            <line x=\"52.28\" y=\"84.01\"/>\n            <line x=\"55.97\" y=\"93.3\"/>\n            <line x=\"68.64\" y=\"90.35\"/>\n            <line x=\"67.46\" y=\"79.74\"/>\n            <line x=\"72.92\" y=\"75.32\"/>\n            <line x=\"81.61\" y=\"79.89\"/>\n            <line x=\"88.98\" y=\"68.68\"/>\n            <line x=\"80.43\" y=\"62.05\"/>\n            <line x=\"81.32\" y=\"55.42\"/>\n            <line x=\"90.9\" y=\"51.73\"/>\n            <line x=\"88.1\" y=\"39.06\"/>\n            <line x=\"77.04\" y=\"40.24\"/>\n            <line x=\"73.21\" y=\"35.22\"/>\n            <line x=\"77.19\" y=\"25.5\"/>\n            <line x=\"66.14\" y=\"19.01\"/>\n            <line x=\"59.21\" y=\"27.27\"/>\n            <line x=\"52.43\" y=\"26.23\"/>\n            <line x=\"48.15\" y=\"16.8\"/>\n            <line x=\"35.92\" y=\"20.04\"/>\n            <line x=\"37.1\" y=\"30.36\"/>\n            <line x=\"32.53\" y=\"34.34\"/>\n            <line x=\"23.1\" y=\"30.36\"/>\n            <close/>\n            <move x=\"39.2\" y=\"55.8\"/>\n            <arc large-arc-flag=\"1\" rx=\"12\" ry=\"12\" sweep-flag=\"1\" x=\"66.2\" x-axis-rotation=\"0\" y=\"55.8\"/>\n            <arc large-arc-flag=\"0\" rx=\"12\" ry=\"12\" sweep-flag=\"1\" x=\"39.2\" x-axis-rotation=\"0\" y=\"55.8\"/>\n            <close/>\n        </path>\n        <fillstroke/>\n    </foreground>\n</shape>\n<shape aspect=\"fixed\" h=\"97\" name=\"Terminate\" strokewidth=\"inherit\" w=\"97\">\n    <connections>\n        <constraint name=\"N\" perimeter=\"0\" x=\"0.5\" y=\"0\"/>\n        <constraint name=\"S\" perimeter=\"0\" x=\"0.5\" y=\"1\"/>\n        <constraint name=\"W\" perimeter=\"0\" x=\"0\" y=\"0.5\"/>\n        <constraint name=\"E\" perimeter=\"0\" x=\"1\" y=\"0.5\"/>\n        <constraint name=\"NW\" perimeter=\"0\" x=\"0.145\" y=\"0.145\"/>\n        <constraint name=\"SW\" perimeter=\"0\" x=\"0.145\" y=\"0.855\"/>\n        <constraint name=\"NE\" perimeter=\"0\" x=\"0.855\" y=\"0.145\"/>\n        <constraint name=\"SE\" perimeter=\"0\" x=\"0.855\" y=\"0.855\"/>\n    </connections>\n    <background>\n        <ellipse h=\"97\" w=\"97\" x=\"0\" y=\"0\"/>\n    </background>\n    <foreground>\n        <strokewidth width=\"3\"/>\n        <fillstroke/>\n        <strokewidth width=\"42\"/>\n        <ellipse h=\"42\" w=\"42\" x=\"27.5\" y=\"27.5\"/>\n        <fillstroke/>\n    </foreground>\n</shape>\n<shape aspect=\"fixed\" h=\"99\" name=\"Timer Intermediate\" strokewidth=\"inherit\" w=\"99\">\n    <connections>\n        <constraint name=\"N\" perimeter=\"0\" x=\"0.5\" y=\"0\"/>\n        <constraint name=\"S\" perimeter=\"0\" x=\"0.5\" y=\"1\"/>\n        <constraint name=\"W\" perimeter=\"0\" x=\"0\" y=\"0.5\"/>\n        <constraint name=\"E\" perimeter=\"0\" x=\"1\" y=\"0.5\"/>\n        <constraint name=\"NW\" perimeter=\"0\" x=\"0.145\" y=\"0.145\"/>\n        <constraint name=\"SW\" perimeter=\"0\" x=\"0.145\" y=\"0.855\"/>\n        <constraint name=\"NE\" perimeter=\"0\" x=\"0.855\" y=\"0.145\"/>\n        <constraint name=\"SE\" perimeter=\"0\" x=\"0.855\" y=\"0.855\"/>\n    </connections>\n    <background>\n        <ellipse h=\"99\" w=\"99\" x=\"0\" y=\"0\"/>\n    </background>\n    <foreground>\n        <fillstroke/>\n        <ellipse h=\"92\" w=\"92\" x=\"3.5\" y=\"3.5\"/>\n        <stroke/>\n        <ellipse h=\"78\" w=\"78\" x=\"10.5\" y=\"10.5\"/>\n        <stroke/>\n        <path>\n            <move x=\"49.5\" y=\"49.5\"/>\n            <line x=\"51.5\" y=\"16\"/>\n            <move x=\"49.5\" y=\"49.5\"/>\n            <line x=\"71.5\" y=\"49.5\"/>\n            <move x=\"49.5\" y=\"10.5\"/>\n            <line x=\"49.5\" y=\"15.5\"/>\n            <move x=\"69\" y=\"15.6\"/>\n            <line x=\"66.2\" y=\"20.5\"/>\n            <move x=\"83.2\" y=\"29.8\"/>\n            <line x=\"78.3\" y=\"32.8\"/>\n            <move x=\"88.5\" y=\"49.5\"/>\n            <line x=\"83.5\" y=\"49.5\"/>\n            <move x=\"83.2\" y=\"69.2\"/>\n            <line x=\"78.3\" y=\"66.2\"/>\n            <move x=\"30\" y=\"15.6\"/>\n            <line x=\"32.8\" y=\"20.5\"/>\n            <move x=\"69\" y=\"83.4\"/>\n            <line x=\"66.2\" y=\"78.5\"/>\n            <move x=\"49.5\" y=\"83.5\"/>\n            <line x=\"49.5\" y=\"88.5\"/>\n            <move x=\"30\" y=\"83.4\"/>\n            <line x=\"32.8\" y=\"78.5\"/>\n            <move x=\"15.8\" y=\"69.2\"/>\n            <line x=\"20.7\" y=\"66.2\"/>\n            <move x=\"10.5\" y=\"49.5\"/>\n            <line x=\"15.5\" y=\"49.5\"/>\n            <move x=\"15.8\" y=\"29.8\"/>\n            <line x=\"20.7\" y=\"32.8\"/>\n        </path>\n        <stroke/>\n    </foreground>\n</shape>\n<shape aspect=\"fixed\" h=\"99\" name=\"Timer Start\" strokewidth=\"inherit\" w=\"99\">\n    <connections>\n        <constraint name=\"N\" perimeter=\"0\" x=\"0.5\" y=\"0\"/>\n        <constraint name=\"S\" perimeter=\"0\" x=\"0.5\" y=\"1\"/>\n        <constraint name=\"W\" perimeter=\"0\" x=\"0\" y=\"0.5\"/>\n        <constraint name=\"E\" perimeter=\"0\" x=\"1\" y=\"0.5\"/>\n        <constraint name=\"NW\" perimeter=\"0\" x=\"0.145\" y=\"0.145\"/>\n        <constraint name=\"SW\" perimeter=\"0\" x=\"0.145\" y=\"0.855\"/>\n        <constraint name=\"NE\" perimeter=\"0\" x=\"0.855\" y=\"0.145\"/>\n        <constraint name=\"SE\" perimeter=\"0\" x=\"0.855\" y=\"0.855\"/>\n    </connections>\n    <background>\n        <ellipse h=\"99\" w=\"99\" x=\"0\" y=\"0\"/>\n    </background>\n    <foreground>\n        <fillstroke/>\n        <ellipse h=\"78\" w=\"78\" x=\"10.5\" y=\"10.5\"/>\n        <stroke/>\n        <path>\n            <move x=\"49.5\" y=\"49.5\"/>\n            <line x=\"51.5\" y=\"16\"/>\n            <move x=\"49.5\" y=\"49.5\"/>\n            <line x=\"71.5\" y=\"49.5\"/>\n            <move x=\"49.5\" y=\"10.5\"/>\n            <line x=\"49.5\" y=\"15.5\"/>\n            <move x=\"69\" y=\"15.6\"/>\n            <line x=\"66.2\" y=\"20.5\"/>\n            <move x=\"83.2\" y=\"29.8\"/>\n            <line x=\"78.3\" y=\"32.8\"/>\n            <move x=\"88.5\" y=\"49.5\"/>\n            <line x=\"83.5\" y=\"49.5\"/>\n            <move x=\"83.2\" y=\"69.2\"/>\n            <line x=\"78.3\" y=\"66.2\"/>\n            <move x=\"30\" y=\"15.6\"/>\n            <line x=\"32.8\" y=\"20.5\"/>\n            <move x=\"69\" y=\"83.4\"/>\n            <line x=\"66.2\" y=\"78.5\"/>\n            <move x=\"49.5\" y=\"83.5\"/>\n            <line x=\"49.5\" y=\"88.5\"/>\n            <move x=\"30\" y=\"83.4\"/>\n            <line x=\"32.8\" y=\"78.5\"/>\n            <move x=\"15.8\" y=\"69.2\"/>\n            <line x=\"20.7\" y=\"66.2\"/>\n            <move x=\"10.5\" y=\"49.5\"/>\n            <line x=\"15.5\" y=\"49.5\"/>\n            <move x=\"15.8\" y=\"29.8\"/>\n            <line x=\"20.7\" y=\"32.8\"/>\n        </path>\n        <stroke/>\n    </foreground>\n</shape>\n<shape h=\"91.81\" name=\"User Task\" strokewidth=\"inherit\" w=\"94\">\n    <connections/>\n    <background>\n        <path>\n            <move x=\"0\" y=\"91.81\"/>\n            <line x=\"0\" y=\"63.81\"/>\n            <arc large-arc-flag=\"0\" rx=\"50\" ry=\"50\" sweep-flag=\"1\" x=\"24\" x-axis-rotation=\"0\" y=\"42.81\"/>\n            <arc large-arc-flag=\"0\" rx=\"25\" ry=\"25\" sweep-flag=\"1\" x=\"33\" x-axis-rotation=\"0\" y=\"41.81\"/>\n            <arc large-arc-flag=\"0\" rx=\"17\" ry=\"17\" sweep-flag=\"0\" x=\"48\" x-axis-rotation=\"0\" y=\"58.81\"/>\n            <arc large-arc-flag=\"0\" rx=\"17\" ry=\"17\" sweep-flag=\"0\" x=\"66\" x-axis-rotation=\"0\" y=\"41.81\"/>\n            <arc large-arc-flag=\"0\" rx=\"25\" ry=\"25\" sweep-flag=\"1\" x=\"76.8\" x-axis-rotation=\"0\" y=\"42.81\"/>\n            <arc large-arc-flag=\"0\" rx=\"35\" ry=\"35\" sweep-flag=\"1\" x=\"94\" x-axis-rotation=\"0\" y=\"63.81\"/>\n            <line x=\"94\" y=\"91.81\"/>\n            <close/>\n            <move x=\"66\" y=\"41.81\"/>\n            <arc large-arc-flag=\"0\" rx=\"17\" ry=\"17\" sweep-flag=\"1\" x=\"48\" x-axis-rotation=\"0\" y=\"58.81\"/>\n            <arc large-arc-flag=\"0\" rx=\"17\" ry=\"17\" sweep-flag=\"1\" x=\"33\" x-axis-rotation=\"0\" y=\"41.81\"/>\n            <arc large-arc-flag=\"0\" rx=\"25\" ry=\"25\" sweep-flag=\"0\" x=\"38\" x-axis-rotation=\"0\" y=\"40.81\"/>\n            <line x=\"39\" y=\"36.81\"/>\n            <arc large-arc-flag=\"0\" rx=\"10\" ry=\"10\" sweep-flag=\"1\" x=\"32\" x-axis-rotation=\"0\" y=\"30.81\"/>\n            <arc large-arc-flag=\"1\" rx=\"18\" ry=\"12\" sweep-flag=\"1\" x=\"66\" x-axis-rotation=\"0\" y=\"30.81\"/>\n            <arc large-arc-flag=\"0\" rx=\"12\" ry=\"12\" sweep-flag=\"1\" x=\"58\" x-axis-rotation=\"0\" y=\"36.81\"/>\n            <line x=\"59\" y=\"40.81\"/>\n            <close/>\n        </path>\n    </background>\n    <foreground>\n        <fillstroke/>\n        <path>\n            <move x=\"16\" y=\"75.81\"/>\n            <line x=\"16\" y=\"90.81\"/>\n            <move x=\"75\" y=\"75.81\"/>\n            <line x=\"75\" y=\"90.81\"/>\n        </path>\n        <stroke/>\n        <fillcolor color=\"#000000\"/>\n        <path>\n            <move x=\"32\" y=\"30.81\"/>\n            <arc large-arc-flag=\"0\" rx=\"15\" ry=\"15\" sweep-flag=\"1\" x=\"29\" x-axis-rotation=\"0\" y=\"13.81\"/>\n            <arc large-arc-flag=\"0\" rx=\"22\" ry=\"22\" sweep-flag=\"1\" x=\"48\" x-axis-rotation=\"0\" y=\"0.81\"/>\n            <arc large-arc-flag=\"0\" rx=\"22\" ry=\"22\" sweep-flag=\"1\" x=\"70\" x-axis-rotation=\"0\" y=\"13.81\"/>\n            <arc large-arc-flag=\"0\" rx=\"15\" ry=\"15\" sweep-flag=\"1\" x=\"66\" x-axis-rotation=\"0\" y=\"30.81\"/>\n            <arc large-arc-flag=\"0\" rx=\"15\" ry=\"15\" sweep-flag=\"0\" x=\"64\" x-axis-rotation=\"0\" y=\"21.81\"/>\n            <arc large-arc-flag=\"0\" rx=\"15\" ry=\"15\" sweep-flag=\"0\" x=\"50\" x-axis-rotation=\"0\" y=\"20.81\"/>\n            <arc large-arc-flag=\"0\" rx=\"15\" ry=\"15\" sweep-flag=\"0\" x=\"35\" x-axis-rotation=\"0\" y=\"21.81\"/>\n            <arc large-arc-flag=\"0\" rx=\"15\" ry=\"15\" sweep-flag=\"0\" x=\"32\" x-axis-rotation=\"0\" y=\"30.81\"/>\n            <close/>\n        </path>\n        <fillstroke/>\n    </foreground>\n</shape>\n</shapes>"
  },
  {
    "path": "static/cherry/drawio_demo/image/stencils/flowchart.xml",
    "content": "<shapes name=\"mxGraph.flowchart\">\n<shape name=\"Annotation 1\" h=\"98\" w=\"50\" aspect=\"variable\" strokewidth=\"inherit\">\n<connections>\n<constraint x=\"0.5\" y=\"0\" perimeter=\"0\" name=\"N\"/>\n<constraint x=\"0.5\" y=\"1\" perimeter=\"0\" name=\"S\"/>\n<constraint x=\"0\" y=\"0.5\" perimeter=\"0\" name=\"W\"/>\n<constraint x=\"1\" y=\"0.5\" perimeter=\"0\" name=\"E\"/>\n<constraint x=\"0\" y=\"0\" perimeter=\"0\" name=\"NW\"/>\n<constraint x=\"0\" y=\"1\" perimeter=\"0\" name=\"SW\"/>\n<constraint x=\"1\" y=\"0\" perimeter=\"0\" name=\"NE\"/>\n<constraint x=\"1\" y=\"1\" perimeter=\"0\" name=\"SE\"/>\n</connections>\n<background>\n<path>\n<move x=\"50\" y=\"0\"/>\n<line x=\"0\" y=\"0\"/>\n<line x=\"0\" y=\"98\"/>\n<line x=\"50\" y=\"98\"/>\n</path>\n</background>\n<foreground>\n<stroke/>\n</foreground>\n</shape>\n<shape name=\"Annotation 2\" h=\"98\" w=\"100\" aspect=\"variable\" strokewidth=\"inherit\">\n<connections>\n<constraint x=\"0.5\" y=\"0\" perimeter=\"0\" name=\"N\"/>\n<constraint x=\"0.5\" y=\"1\" perimeter=\"0\" name=\"S\"/>\n<constraint x=\"0\" y=\"0.5\" perimeter=\"0\" name=\"W\"/>\n<constraint x=\"1\" y=\"0.5\" perimeter=\"0\" name=\"E\"/>\n<constraint x=\"1\" y=\"0\" perimeter=\"0\" name=\"NE\"/>\n<constraint x=\"1\" y=\"1\" perimeter=\"0\" name=\"SE\"/>\n</connections>\n<background>\n<path>\n<move x=\"100\" y=\"0\"/>\n<line x=\"50\" y=\"0\"/>\n<line x=\"50\" y=\"98\"/>\n<line x=\"100\" y=\"98\"/>\n</path>\n</background>\n<foreground>\n<stroke/>\n<path>\n<move x=\"0\" y=\"49\"/>\n<line x=\"50\" y=\"49\"/>\n</path>\n<stroke/>\n</foreground>\n</shape>\n<shape name=\"Card\" h=\"60\" w=\"98\" aspect=\"variable\" strokewidth=\"inherit\">\n<connections>\n<constraint x=\"0.5\" y=\"0\" perimeter=\"0\" name=\"N\"/>\n<constraint x=\"0.5\" y=\"1\" perimeter=\"0\" name=\"S\"/>\n<constraint x=\"0\" y=\"0.5\" perimeter=\"0\" name=\"W\"/>\n<constraint x=\"1\" y=\"0.5\" perimeter=\"0\" name=\"E\"/>\n<constraint x=\"0.1\" y=\"0.16\" perimeter=\"0\" name=\"NW\"/>\n<constraint x=\"0.015\" y=\"0.98\" perimeter=\"0\" name=\"SW\"/>\n<constraint x=\"0.985\" y=\"0.02\" perimeter=\"0\" name=\"NE\"/>\n<constraint x=\"0.985\" y=\"0.98\" perimeter=\"0\" name=\"SE\"/>\n</connections>\n<background>\n<path>\n<move x=\"19\" y=\"0\"/>\n<line x=\"93\" y=\"0\"/>\n<arc rx=\"5\" ry=\"5\" x-axis-rotation=\"0\" large-arc-flag=\"0\" sweep-flag=\"1\" x=\"98\" y=\"5\"/>\n<line x=\"98\" y=\"55\"/>\n<arc rx=\"5\" ry=\"5\" x-axis-rotation=\"0\" large-arc-flag=\"0\" sweep-flag=\"1\" x=\"93\" y=\"60\"/>\n<line x=\"5\" y=\"60\"/>\n<arc rx=\"5\" ry=\"5\" x-axis-rotation=\"0\" large-arc-flag=\"0\" sweep-flag=\"1\" x=\"0\" y=\"55\"/>\n<line x=\"0\" y=\"20\"/>\n<line x=\"19\" y=\"0\"/>\n<close/>\n</path>\n</background>\n<foreground>\n<fillstroke/>\n</foreground>\n</shape>\n<shape name=\"Collate\" h=\"98\" w=\"96.82\" aspect=\"variable\" strokewidth=\"inherit\">\n<connections>\n<constraint x=\"0.5\" y=\"0\" perimeter=\"0\" name=\"N\"/>\n<constraint x=\"0.5\" y=\"1\" perimeter=\"0\" name=\"S\"/>\n<constraint x=\"0\" y=\"0.02\" perimeter=\"0\" name=\"NW\"/>\n<constraint x=\"0\" y=\"0.98\" perimeter=\"0\" name=\"SW\"/>\n<constraint x=\"1\" y=\"0.02\" perimeter=\"0\" name=\"NE\"/>\n<constraint x=\"1\" y=\"0.98\" perimeter=\"0\" name=\"SE\"/>\n</connections>\n<background>\n<path>\n<move x=\"92.41\" y=\"0\"/>\n<arc rx=\"6\" ry=\"3.5\" x-axis-rotation=\"-15\" large-arc-flag=\"0\" sweep-flag=\"1\" x=\"95.41\" y=\"5\"/>\n<line x=\"1.41\" y=\"93\"/>\n<arc rx=\"6\" ry=\"3.5\" x-axis-rotation=\"-15\" large-arc-flag=\"0\" sweep-flag=\"0\" x=\"4.41\" y=\"98\"/>\n<line x=\"92.41\" y=\"98\"/>\n<arc rx=\"6\" ry=\"3.5\" x-axis-rotation=\"15\" large-arc-flag=\"0\" sweep-flag=\"0\" x=\"95.41\" y=\"93\"/>\n<line x=\"1.41\" y=\"5\"/>\n<arc rx=\"6\" ry=\"3.5\" x-axis-rotation=\"15\" large-arc-flag=\"0\" sweep-flag=\"1\" x=\"4.41\" y=\"0\"/>\n<line x=\"92.41\" y=\"0\"/>\n<close/>\n</path>\n</background>\n<foreground>\n<fillstroke/>\n</foreground>\n</shape>\n<shape name=\"Data\" h=\"60.24\" w=\"98.77\" aspect=\"variable\" strokewidth=\"inherit\">\n<connections>\n<constraint x=\"0.5\" y=\"0\" perimeter=\"0\" name=\"N\"/>\n<constraint x=\"0.5\" y=\"1\" perimeter=\"0\" name=\"S\"/>\n<constraint x=\"0.095\" y=\"0.5\" perimeter=\"0\" name=\"W\"/>\n<constraint x=\"0.905\" y=\"0.5\" perimeter=\"0\" name=\"E\"/>\n<constraint x=\"0.23\" y=\"0.02\" perimeter=\"0\" name=\"NW\"/>\n<constraint x=\"0.015\" y=\"0.98\" perimeter=\"0\" name=\"SW\"/>\n<constraint x=\"0.985\" y=\"0.02\" perimeter=\"0\" name=\"NE\"/>\n<constraint x=\"0.77\" y=\"0.98\" perimeter=\"0\" name=\"SE\"/>\n</connections>\n<background>\n<path>\n<move x=\"19.37\" y=\"5.12\"/>\n<arc rx=\"6\" ry=\"12\" x-axis-rotation=\"0\" large-arc-flag=\"0\" sweep-flag=\"1\" x=\"24.37\" y=\"0.12\"/>\n<line x=\"93.37\" y=\"0.12\"/>\n<arc rx=\"5\" ry=\"4\" x-axis-rotation=\"0\" large-arc-flag=\"0\" sweep-flag=\"1\" x=\"98.37\" y=\"5.12\"/>\n<line x=\"79.37\" y=\"55.12\"/>\n<arc rx=\"6\" ry=\"12\" x-axis-rotation=\"0\" large-arc-flag=\"0\" sweep-flag=\"1\" x=\"74.37\" y=\"60.12\"/>\n<line x=\"4.37\" y=\"60.12\"/>\n<arc rx=\"5\" ry=\"4\" x-axis-rotation=\"0\" large-arc-flag=\"0\" sweep-flag=\"1\" x=\"0.37\" y=\"55.12\"/>\n<close/>\n</path>\n</background>\n<foreground>\n<fillstroke/>\n</foreground>\n</shape>\n<shape name=\"Database\" h=\"60\" w=\"60\" aspect=\"variable\" strokewidth=\"inherit\">\n<connections>\n<constraint x=\"0.5\" y=\"0\" perimeter=\"0\" name=\"N\"/>\n<constraint x=\"0.5\" y=\"1\" perimeter=\"0\" name=\"S\"/>\n<constraint x=\"0\" y=\"0.5\" perimeter=\"0\" name=\"W\"/>\n<constraint x=\"1\" y=\"0.5\" perimeter=\"0\" name=\"E\"/>\n<constraint x=\"0\" y=\"0.15\" perimeter=\"0\" name=\"NW\"/>\n<constraint x=\"0\" y=\"0.85\" perimeter=\"0\" name=\"SW\"/>\n<constraint x=\"1\" y=\"0.15\" perimeter=\"0\" name=\"NE\"/>\n<constraint x=\"1\" y=\"0.85\" perimeter=\"0\" name=\"SE\"/>\n</connections>\n<background>\n<path>\n<move x=\"0\" y=\"50\"/>\n<line x=\"0\" y=\"10\"/>\n<arc rx=\"30\" ry=\"10\" x-axis-rotation=\"0\" large-arc-flag=\"0\" sweep-flag=\"1\" x=\"60\" y=\"10\"/>\n<line x=\"60\" y=\"50\"/>\n<arc rx=\"30\" ry=\"10\" x-axis-rotation=\"0\" large-arc-flag=\"0\" sweep-flag=\"1\" x=\"0\" y=\"50\"/>\n<close/>\n</path>\n</background>\n<foreground>\n<fillstroke/>\n<path>\n<move x=\"0\" y=\"10\"/>\n<arc rx=\"30\" ry=\"10\" x-axis-rotation=\"0\" large-arc-flag=\"0\" sweep-flag=\"0\" x=\"60\" y=\"10\"/>\n</path>\n<stroke/>\n</foreground>\n</shape>\n<shape name=\"Decision\" aspect=\"variable\" strokewidth=\"inherit\">\n<connections>\n<constraint x=\"0.5\" y=\"0\" perimeter=\"0\" name=\"N\"/>\n<constraint x=\"0.5\" y=\"1\" perimeter=\"0\" name=\"S\"/>\n<constraint x=\"0\" y=\"0.5\" perimeter=\"0\" name=\"W\"/>\n<constraint x=\"1\" y=\"0.5\" perimeter=\"0\" name=\"E\"/>\n</connections>\n<background>\n<path>\n<move x=\"50\" y=\"0\"/>\n<line x=\"100\" y=\"50\"/>\n<line x=\"50\" y=\"100\"/>\n<line x=\"0\" y=\"50\"/>\n<close/>\n</path>\n</background>\n<foreground>\n<fillstroke/>\n</foreground>\n</shape>\n<shape name=\"Delay\" h=\"60\" w=\"98.25\" aspect=\"variable\" strokewidth=\"inherit\">\n<connections>\n<constraint x=\"0.5\" y=\"0\" perimeter=\"0\" name=\"N\"/>\n<constraint x=\"0.5\" y=\"1\" perimeter=\"0\" name=\"S\"/>\n<constraint x=\"0\" y=\"0.5\" perimeter=\"0\" name=\"W\"/>\n<constraint x=\"1\" y=\"0.5\" perimeter=\"0\" name=\"E\"/>\n<constraint x=\"0.02\" y=\"0.015\" perimeter=\"0\" name=\"NW\"/>\n<constraint x=\"0.02\" y=\"0.985\" perimeter=\"0\" name=\"SW\"/>\n<constraint x=\"0.81\" y=\"0\" perimeter=\"0\" name=\"NE\"/>\n<constraint x=\"0.81\" y=\"1\" perimeter=\"0\" name=\"SE\"/>\n</connections>\n<background>\n<path>\n<move x=\"0\" y=\"5\"/>\n<arc rx=\"5\" ry=\"5\" x-axis-rotation=\"0\" large-arc-flag=\"0\" sweep-flag=\"1\" x=\"5\" y=\"0\"/>\n<line x=\"79\" y=\"0\"/>\n<arc rx=\"33\" ry=\"33\" x-axis-rotation=\"0\" large-arc-flag=\"0\" sweep-flag=\"1\" x=\"79\" y=\"60\"/>\n<line x=\"5\" y=\"60\"/>\n<arc rx=\"5\" ry=\"5\" x-axis-rotation=\"0\" large-arc-flag=\"0\" sweep-flag=\"1\" x=\"0\" y=\"55\"/>\n<line x=\"0\" y=\"5\"/>\n<close/>\n</path>\n</background>\n<foreground>\n<fillstroke/>\n</foreground>\n</shape>\n<shape name=\"Direct Data\" h=\"60\" w=\"98\" aspect=\"variable\" strokewidth=\"inherit\">\n<connections>\n<constraint x=\"0.5\" y=\"0\" perimeter=\"0\" name=\"N\"/>\n<constraint x=\"0.5\" y=\"1\" perimeter=\"0\" name=\"S\"/>\n<constraint x=\"0\" y=\"0.5\" perimeter=\"0\" name=\"W\"/>\n<constraint x=\"1\" y=\"0.5\" perimeter=\"0\" name=\"E\"/>\n<constraint x=\"0.08\" y=\"0\" perimeter=\"0\" name=\"NW\"/>\n<constraint x=\"0.08\" y=\"1\" perimeter=\"0\" name=\"SW\"/>\n<constraint x=\"0.91\" y=\"0\" perimeter=\"0\" name=\"NE\"/>\n<constraint x=\"0.91\" y=\"1\" perimeter=\"0\" name=\"SE\"/>\n</connections>\n<background>\n<path>\n<move x=\"9\" y=\"0\"/>\n<line x=\"89\" y=\"0\"/>\n<arc rx=\"9\" ry=\"30\" x-axis-rotation=\"0\" large-arc-flag=\"1\" sweep-flag=\"1\" x=\"89\" y=\"60\"/>\n<line x=\"9\" y=\"60\"/>\n<arc rx=\"9\" ry=\"30\" x-axis-rotation=\"0\" large-arc-flag=\"1\" sweep-flag=\"1\" x=\"9\" y=\"0\"/>\n<close/>\n</path>\n</background>\n<foreground>\n<fillstroke/>\n<path>\n<move x=\"89\" y=\"0\"/>\n<arc rx=\"9\" ry=\"30\" x-axis-rotation=\"0\" large-arc-flag=\"1\" sweep-flag=\"0\" x=\"89\" y=\"60\"/>\n</path>\n<stroke/>\n</foreground>\n</shape>\n<shape name=\"Display\" h=\"60\" w=\"98.25\" aspect=\"variable\" strokewidth=\"inherit\">\n<connections>\n<constraint x=\"0.5\" y=\"0\" perimeter=\"0\" name=\"N\"/>\n<constraint x=\"0.5\" y=\"1\" perimeter=\"0\" name=\"S\"/>\n<constraint x=\"0\" y=\"0.5\" perimeter=\"0\" name=\"W\"/>\n<constraint x=\"1\" y=\"0.5\" perimeter=\"0\" name=\"E\"/>\n<constraint x=\"0.2\" y=\"0.14\" perimeter=\"0\" name=\"NW\"/>\n<constraint x=\"0.2\" y=\"0.86\" perimeter=\"0\" name=\"SW\"/>\n<constraint x=\"0.92\" y=\"0.14\" perimeter=\"0\" name=\"NE\"/>\n<constraint x=\"0.92\" y=\"0.86\" perimeter=\"0\" name=\"SE\"/>\n</connections>\n<background>\n<path>\n<move x=\"0\" y=\"30\"/>\n<arc rx=\"60\" ry=\"60\" x-axis-rotation=\"0\" large-arc-flag=\"0\" sweep-flag=\"1\" x=\"39\" y=\"0\"/>\n<line x=\"79\" y=\"0\"/>\n<arc rx=\"33\" ry=\"33\" x-axis-rotation=\"0\" large-arc-flag=\"0\" sweep-flag=\"1\" x=\"79\" y=\"60\"/>\n<line x=\"39\" y=\"60\"/>\n<arc rx=\"60\" ry=\"60\" x-axis-rotation=\"0\" large-arc-flag=\"0\" sweep-flag=\"1\" x=\"0\" y=\"30\"/>\n<close/>\n</path>\n</background>\n<foreground>\n<fillstroke/>\n</foreground>\n</shape>\n<shape name=\"Document\" h=\"60.9\" w=\"98\" aspect=\"variable\" strokewidth=\"inherit\">\n<connections>\n<constraint x=\"0.5\" y=\"0\" perimeter=\"0\" name=\"N\"/>\n<constraint x=\"0.5\" y=\"0.9\" perimeter=\"0\" name=\"S\"/>\n<constraint x=\"0\" y=\"0.5\" perimeter=\"0\" name=\"W\"/>\n<constraint x=\"1\" y=\"0.5\" perimeter=\"0\" name=\"E\"/>\n<constraint x=\"0.02\" y=\"0.015\" perimeter=\"0\" name=\"NW\"/>\n<constraint x=\"0\" y=\"0.9\" perimeter=\"0\" name=\"SW\"/>\n<constraint x=\"0.98\" y=\"0.015\" perimeter=\"0\" name=\"NE\"/>\n<constraint x=\"1\" y=\"0.9\" perimeter=\"0\" name=\"SE\"/>\n</connections>\n<background>\n<path>\n<move x=\"0\" y=\"5\"/>\n<arc rx=\"5\" ry=\"5\" x-axis-rotation=\"0\" large-arc-flag=\"0\" sweep-flag=\"1\" x=\"5\" y=\"0\"/>\n<line x=\"93\" y=\"0\"/>\n<arc rx=\"5\" ry=\"5\" x-axis-rotation=\"0\" large-arc-flag=\"0\" sweep-flag=\"1\" x=\"98\" y=\"5\"/>\n<line x=\"98\" y=\"55\"/>\n<arc rx=\"70\" ry=\"70\" x-axis-rotation=\"0\" large-arc-flag=\"0\" sweep-flag=\"0\" x=\"49\" y=\"55\"/>\n<arc rx=\"70\" ry=\"70\" x-axis-rotation=\"0\" large-arc-flag=\"0\" sweep-flag=\"1\" x=\"0\" y=\"55\"/>\n<close/>\n</path>\n</background>\n<foreground>\n<fillstroke/>\n</foreground>\n</shape>\n<shape name=\"Extract or Measurement\" h=\"61.03\" w=\"95.34\" aspect=\"variable\" strokewidth=\"inherit\">\n<connections>\n<constraint x=\"0.5\" y=\"0\" perimeter=\"0\" name=\"N\"/>\n<constraint x=\"0.5\" y=\"1\" perimeter=\"0\" name=\"S\"/>\n<constraint x=\"0.22\" y=\"0.5\" perimeter=\"0\" name=\"W\"/>\n<constraint x=\"0.78\" y=\"0.5\" perimeter=\"0\" name=\"E\"/>\n<constraint x=\"0.01\" y=\"0.97\" perimeter=\"0\" name=\"SW\"/>\n<constraint x=\"0.99\" y=\"0.97\" perimeter=\"0\" name=\"SE\"/>\n</connections>\n<background>\n<path>\n<move x=\"3.64\" y=\"61.02\"/>\n<line x=\"91.64\" y=\"61.02\"/>\n<arc rx=\"6\" ry=\"4\" x-axis-rotation=\"30\" large-arc-flag=\"0\" sweep-flag=\"0\" x=\"94.64\" y=\"56.02\"/>\n<line x=\"49.64\" y=\"1.02\"/>\n<arc rx=\"3\" ry=\"3\" x-axis-rotation=\"0\" large-arc-flag=\"0\" sweep-flag=\"0\" x=\"45.64\" y=\"1.02\"/>\n<line x=\"0.64\" y=\"56.02\"/>\n<arc rx=\"6\" ry=\"4\" x-axis-rotation=\"-35\" large-arc-flag=\"0\" sweep-flag=\"0\" x=\"3.64\" y=\"61.02\"/>\n<close/>\n</path>\n</background>\n<foreground>\n<fillstroke/>\n</foreground>\n</shape>\n<shape name=\"Internal Storage\" h=\"70\" w=\"70\" aspect=\"variable\" strokewidth=\"inherit\">\n<connections>\n<constraint x=\"0.5\" y=\"0\" perimeter=\"0\" name=\"N\"/>\n<constraint x=\"0.5\" y=\"1\" perimeter=\"0\" name=\"S\"/>\n<constraint x=\"0\" y=\"0.5\" perimeter=\"0\" name=\"W\"/>\n<constraint x=\"1\" y=\"0.5\" perimeter=\"0\" name=\"E\"/>\n<constraint x=\"0.02\" y=\"0.015\" perimeter=\"0\" name=\"NW\"/>\n<constraint x=\"0.02\" y=\"0.985\" perimeter=\"0\" name=\"SW\"/>\n<constraint x=\"0.98\" y=\"0.015\" perimeter=\"0\" name=\"NE\"/>\n<constraint x=\"0.98\" y=\"0.985\" perimeter=\"0\" name=\"SE\"/>\n</connections>\n<background>\n<roundrect x=\"0\" y=\"0\" w=\"70\" h=\"70\" arcsize=\"7.142857142857142\"/>\n</background>\n<foreground>\n<fillstroke/>\n<path>\n<move x=\"0\" y=\"15\"/>\n<line x=\"70\" y=\"15\"/>\n</path>\n<stroke/>\n<path>\n<move x=\"15\" y=\"0\"/>\n<line x=\"15\" y=\"70\"/>\n</path>\n<stroke/>\n</foreground>\n</shape>\n<shape name=\"Loop Limit\" h=\"60\" w=\"98\" aspect=\"variable\" strokewidth=\"inherit\">\n<connections>\n<constraint x=\"0.5\" y=\"0\" perimeter=\"0\" name=\"N\"/>\n<constraint x=\"0.5\" y=\"1\" perimeter=\"0\" name=\"S\"/>\n<constraint x=\"0\" y=\"0.5\" perimeter=\"0\" name=\"W\"/>\n<constraint x=\"1\" y=\"0.5\" perimeter=\"0\" name=\"E\"/>\n<constraint x=\"0.1\" y=\"0.15\" perimeter=\"0\" name=\"NW\"/>\n<constraint x=\"0.02\" y=\"0.985\" perimeter=\"0\" name=\"SW\"/>\n<constraint x=\"0.9\" y=\"0.15\" perimeter=\"0\" name=\"NE\"/>\n<constraint x=\"0.98\" y=\"0.985\" perimeter=\"0\" name=\"SE\"/>\n</connections>\n<background>\n<path>\n<move x=\"19\" y=\"0\"/>\n<line x=\"79\" y=\"0\"/>\n<line x=\"98\" y=\"20\"/>\n<line x=\"98\" y=\"55\"/>\n<arc rx=\"5\" ry=\"5\" x-axis-rotation=\"0\" large-arc-flag=\"0\" sweep-flag=\"1\" x=\"93\" y=\"60\"/>\n<line x=\"5\" y=\"60\"/>\n<arc rx=\"5\" ry=\"5\" x-axis-rotation=\"0\" large-arc-flag=\"0\" sweep-flag=\"1\" x=\"0\" y=\"55\"/>\n<line x=\"0\" y=\"20\"/>\n<line x=\"19\" y=\"0\"/>\n<close/>\n</path>\n</background>\n<foreground>\n<fillstroke/>\n</foreground>\n</shape>\n<shape name=\"Manual Input\" h=\"60\" w=\"98.05\" aspect=\"variable\" strokewidth=\"inherit\">\n<connections>\n<constraint x=\"0.5\" y=\"0.195\" perimeter=\"0\" name=\"N\"/>\n<constraint x=\"0.5\" y=\"1\" perimeter=\"0\" name=\"S\"/>\n<constraint x=\"0\" y=\"0.5\" perimeter=\"0\" name=\"W\"/>\n<constraint x=\"1\" y=\"0.5\" perimeter=\"0\" name=\"E\"/>\n<constraint x=\"0.02\" y=\"0.985\" perimeter=\"0\" name=\"SW\"/>\n<constraint x=\"0.98\" y=\"0.015\" perimeter=\"0\" name=\"NE\"/>\n<constraint x=\"0.98\" y=\"0.985\" perimeter=\"0\" name=\"SE\"/>\n</connections>\n<background>\n<path>\n<move x=\"0\" y=\"25\"/>\n<line x=\"93\" y=\"0\"/>\n<arc rx=\"5\" ry=\"5\" x-axis-rotation=\"0\" large-arc-flag=\"0\" sweep-flag=\"1\" x=\"98\" y=\"5\"/>\n<line x=\"98\" y=\"55\"/>\n<arc rx=\"5\" ry=\"5\" x-axis-rotation=\"0\" large-arc-flag=\"0\" sweep-flag=\"1\" x=\"94\" y=\"60\"/>\n<line x=\"5\" y=\"60\"/>\n<arc rx=\"5\" ry=\"5\" x-axis-rotation=\"0\" large-arc-flag=\"0\" sweep-flag=\"1\" x=\"0\" y=\"55\"/>\n<line x=\"0\" y=\"25\"/>\n<close/>\n</path>\n</background>\n<foreground>\n<fillstroke/>\n</foreground>\n</shape>\n<shape name=\"Manual Operation\" h=\"60.04\" w=\"98.79\" aspect=\"variable\" strokewidth=\"inherit\">\n<connections>\n<constraint x=\"0.5\" y=\"0\" perimeter=\"0\" name=\"N\"/>\n<constraint x=\"0.5\" y=\"1\" perimeter=\"0\" name=\"S\"/>\n<constraint x=\"0.1\" y=\"0.5\" perimeter=\"0\" name=\"W\"/>\n<constraint x=\"0.9\" y=\"0.5\" perimeter=\"0\" name=\"E\"/>\n<constraint x=\"0.02\" y=\"0.015\" perimeter=\"0\" name=\"NW\"/>\n<constraint x=\"0.22\" y=\"0.985\" perimeter=\"0\" name=\"SW\"/>\n<constraint x=\"0.98\" y=\"0.015\" perimeter=\"0\" name=\"NE\"/>\n<constraint x=\"0.78\" y=\"0.985\" perimeter=\"0\" name=\"SE\"/>\n</connections>\n<background>\n<path>\n<move x=\"0.39\" y=\"5.04\"/>\n<arc rx=\"5\" ry=\"4\" x-axis-rotation=\"0\" large-arc-flag=\"0\" sweep-flag=\"1\" x=\"5.39\" y=\"0.04\"/>\n<line x=\"93.39\" y=\"0.04\"/>\n<arc rx=\"5\" ry=\"4\" x-axis-rotation=\"0\" large-arc-flag=\"0\" sweep-flag=\"1\" x=\"98.39\" y=\"5.04\"/>\n<line x=\"79.39\" y=\"55.04\"/>\n<arc rx=\"6.5\" ry=\"6.5\" x-axis-rotation=\"0\" large-arc-flag=\"0\" sweep-flag=\"1\" x=\"74.39\" y=\"60.04\"/>\n<line x=\"24.39\" y=\"60.04\"/>\n<arc rx=\"6.5\" ry=\"6.5\" x-axis-rotation=\"0\" large-arc-flag=\"0\" sweep-flag=\"1\" x=\"19.39\" y=\"55.04\"/>\n<line x=\"0.39\" y=\"5.04\"/>\n<close/>\n</path>\n</background>\n<foreground>\n<fillstroke/>\n</foreground>\n</shape>\n<shape name=\"Merge or Storage\" h=\"61.03\" w=\"95.34\" aspect=\"variable\" strokewidth=\"inherit\">\n<connections>\n<constraint x=\"0.5\" y=\"0\" perimeter=\"0\" name=\"N\"/>\n<constraint x=\"0.5\" y=\"1\" perimeter=\"0\" name=\"S\"/>\n<constraint x=\"0\" y=\"0.5\" perimeter=\"0\" name=\"W\"/>\n<constraint x=\"1\" y=\"0.5\" perimeter=\"0\" name=\"E\"/>\n<constraint x=\"0\" y=\"0\" perimeter=\"0\" name=\"NW\"/>\n<constraint x=\"0\" y=\"1\" perimeter=\"0\" name=\"SW\"/>\n<constraint x=\"1\" y=\"0\" perimeter=\"0\" name=\"NE\"/>\n<constraint x=\"1\" y=\"1\" perimeter=\"0\" name=\"SE\"/>\n</connections>\n<background>\n<path>\n<move x=\"3.64\" y=\"0.01\"/>\n<line x=\"91.64\" y=\"0.01\"/>\n<arc rx=\"6\" ry=\"4\" x-axis-rotation=\"-30\" large-arc-flag=\"0\" sweep-flag=\"1\" x=\"94.64\" y=\"5.01\"/>\n<line x=\"49.64\" y=\"60.01\"/>\n<arc rx=\"3\" ry=\"3\" x-axis-rotation=\"0\" large-arc-flag=\"0\" sweep-flag=\"1\" x=\"45.64\" y=\"60.01\"/>\n<line x=\"0.64\" y=\"5.01\"/>\n<arc rx=\"6\" ry=\"4\" x-axis-rotation=\"35\" large-arc-flag=\"0\" sweep-flag=\"1\" x=\"3.64\" y=\"0.01\"/>\n<close/>\n</path>\n</background>\n<foreground>\n<fillstroke/>\n</foreground>\n</shape>\n<shape name=\"Multi-Document\" h=\"60.28\" w=\"88\" aspect=\"variable\" strokewidth=\"inherit\">\n<connections>\n<constraint x=\"0.5\" y=\"0\" perimeter=\"0\" name=\"N\"/>\n<constraint x=\"0.5\" y=\"0.88\" perimeter=\"0\" name=\"S\"/>\n<constraint x=\"0\" y=\"0.5\" perimeter=\"0\" name=\"W\"/>\n<constraint x=\"1\" y=\"0.5\" perimeter=\"0\" name=\"E\"/>\n<constraint x=\"0.08\" y=\"0.1\" perimeter=\"0\" name=\"NW\"/>\n<constraint x=\"0\" y=\"0.91\" perimeter=\"0\" name=\"SW\"/>\n<constraint x=\"0.98\" y=\"0.02\" perimeter=\"0\" name=\"NE\"/>\n<constraint x=\"0.885\" y=\"0.91\" perimeter=\"0\" name=\"SE\"/>\n</connections>\n<background>\n<path>\n<move x=\"10\" y=\"5\"/>\n<arc rx=\"5\" ry=\"5\" x-axis-rotation=\"0\" large-arc-flag=\"0\" sweep-flag=\"1\" x=\"15\" y=\"0\"/>\n<line x=\"83\" y=\"0\"/>\n<arc rx=\"5\" ry=\"5\" x-axis-rotation=\"0\" large-arc-flag=\"0\" sweep-flag=\"1\" x=\"88\" y=\"5\"/>\n<line x=\"88\" y=\"45\"/>\n<arc rx=\"50\" ry=\"50\" x-axis-rotation=\"0\" large-arc-flag=\"0\" sweep-flag=\"0\" x=\"49\" y=\"45\"/>\n<arc rx=\"50\" ry=\"50\" x-axis-rotation=\"0\" large-arc-flag=\"0\" sweep-flag=\"1\" x=\"10\" y=\"45\"/>\n<close/>\n</path>\n</background>\n<foreground>\n<fillstroke/>\n<path>\n<move x=\"5\" y=\"10\"/>\n<arc rx=\"5\" ry=\"5\" x-axis-rotation=\"0\" large-arc-flag=\"0\" sweep-flag=\"1\" x=\"10\" y=\"5\"/>\n<line x=\"78\" y=\"5\"/>\n<arc rx=\"5\" ry=\"5\" x-axis-rotation=\"0\" large-arc-flag=\"0\" sweep-flag=\"1\" x=\"83\" y=\"10\"/>\n<line x=\"83\" y=\"50\"/>\n<arc rx=\"50\" ry=\"50\" x-axis-rotation=\"0\" large-arc-flag=\"0\" sweep-flag=\"0\" x=\"44\" y=\"50\"/>\n<arc rx=\"50\" ry=\"50\" x-axis-rotation=\"0\" large-arc-flag=\"0\" sweep-flag=\"1\" x=\"5\" y=\"50\"/>\n<close/>\n</path>\n<fillstroke/>\n<path>\n<move x=\"0\" y=\"15\"/>\n<arc rx=\"5\" ry=\"5\" x-axis-rotation=\"0\" large-arc-flag=\"0\" sweep-flag=\"1\" x=\"5\" y=\"10\"/>\n<line x=\"73\" y=\"10\"/>\n<arc rx=\"5\" ry=\"5\" x-axis-rotation=\"0\" large-arc-flag=\"0\" sweep-flag=\"1\" x=\"78\" y=\"15\"/>\n<line x=\"78\" y=\"55\"/>\n<arc rx=\"50\" ry=\"50\" x-axis-rotation=\"0\" large-arc-flag=\"0\" sweep-flag=\"0\" x=\"39\" y=\"55\"/>\n<arc rx=\"50\" ry=\"50\" x-axis-rotation=\"0\" large-arc-flag=\"0\" sweep-flag=\"1\" x=\"0\" y=\"55\"/>\n<close/>\n</path>\n<fillstroke/>\n</foreground>\n</shape>\n<shape name=\"Off-page Reference\" h=\"60\" w=\"60\" aspect=\"variable\" strokewidth=\"inherit\">\n<connections>\n<constraint x=\"0.5\" y=\"0\" perimeter=\"0\" name=\"N\"/>\n<constraint x=\"0.5\" y=\"1\" perimeter=\"0\" name=\"S\"/>\n<constraint x=\"0\" y=\"0.5\" perimeter=\"0\" name=\"W\"/>\n<constraint x=\"1\" y=\"0.5\" perimeter=\"0\" name=\"E\"/>\n<constraint x=\"0\" y=\"0\" perimeter=\"0\" name=\"NW\"/>\n<constraint x=\"1\" y=\"0\" perimeter=\"0\" name=\"NE\"/>\n</connections>\n<background>\n<path>\n<move x=\"0\" y=\"0\"/>\n<line x=\"60\" y=\"0\"/>\n<line x=\"60\" y=\"30\"/>\n<line x=\"30\" y=\"60\"/>\n<line x=\"0\" y=\"30\"/>\n<close/>\n</path>\n</background>\n<foreground>\n<fillstroke/>\n</foreground>\n</shape>\n<shape name=\"On-page Reference\" h=\"60\" w=\"60\" aspect=\"variable\" strokewidth=\"inherit\">\n<connections>\n<constraint x=\"0.5\" y=\"0\" perimeter=\"0\" name=\"N\"/>\n<constraint x=\"0.5\" y=\"1\" perimeter=\"0\" name=\"S\"/>\n<constraint x=\"0\" y=\"0.5\" perimeter=\"0\" name=\"W\"/>\n<constraint x=\"1\" y=\"0.5\" perimeter=\"0\" name=\"E\"/>\n<constraint x=\"0.145\" y=\"0.145\" perimeter=\"0\" name=\"NW\"/>\n<constraint x=\"0.145\" y=\"0.855\" perimeter=\"0\" name=\"SW\"/>\n<constraint x=\"0.855\" y=\"0.145\" perimeter=\"0\" name=\"NE\"/>\n<constraint x=\"0.855\" y=\"0.855\" perimeter=\"0\" name=\"SE\"/>\n</connections>\n<background>\n<ellipse x=\"0\" y=\"0\" w=\"60\" h=\"60\"/>\n</background>\n<foreground>\n<fillstroke/>\n</foreground>\n</shape>\n<shape name=\"Or\" h=\"70\" w=\"70\" aspect=\"variable\" strokewidth=\"inherit\">\n<connections>\n<constraint x=\"0.5\" y=\"0\" perimeter=\"0\" name=\"N\"/>\n<constraint x=\"0.5\" y=\"1\" perimeter=\"0\" name=\"S\"/>\n<constraint x=\"0\" y=\"0.5\" perimeter=\"0\" name=\"W\"/>\n<constraint x=\"1\" y=\"0.5\" perimeter=\"0\" name=\"E\"/>\n<constraint x=\"0.145\" y=\"0.145\" perimeter=\"0\" name=\"NW\"/>\n<constraint x=\"0.145\" y=\"0.855\" perimeter=\"0\" name=\"SW\"/>\n<constraint x=\"0.855\" y=\"0.145\" perimeter=\"0\" name=\"NE\"/>\n<constraint x=\"0.855\" y=\"0.855\" perimeter=\"0\" name=\"SE\"/>\n</connections>\n<background>\n<ellipse x=\"0\" y=\"0\" w=\"70\" h=\"70\"/>\n</background>\n<foreground>\n<fillstroke/>\n<path>\n<move x=\"10\" y=\"60\"/>\n<line x=\"60\" y=\"10\"/>\n</path>\n<stroke/>\n<path>\n<move x=\"10\" y=\"10\"/>\n<line x=\"60\" y=\"60\"/>\n</path>\n<stroke/>\n</foreground>\n</shape>\n<shape name=\"Paper Tape\" h=\"61.81\" w=\"98\" aspect=\"variable\" strokewidth=\"inherit\">\n<connections>\n<constraint x=\"0.5\" y=\"0.09\" perimeter=\"0\" name=\"N\"/>\n<constraint x=\"0.5\" y=\"0.91\" perimeter=\"0\" name=\"S\"/>\n<constraint x=\"0\" y=\"0.5\" perimeter=\"0\" name=\"W\"/>\n<constraint x=\"1\" y=\"0.5\" perimeter=\"0\" name=\"E\"/>\n<constraint x=\"0\" y=\"0.09\" perimeter=\"0\" name=\"NW\"/>\n<constraint x=\"0\" y=\"0.91\" perimeter=\"0\" name=\"SW\"/>\n<constraint x=\"1\" y=\"0.09\" perimeter=\"0\" name=\"NE\"/>\n<constraint x=\"1\" y=\"0.91\" perimeter=\"0\" name=\"SE\"/>\n</connections>\n<background>\n<path>\n<move x=\"0\" y=\"5.9\"/>\n<arc rx=\"70\" ry=\"70\" x-axis-rotation=\"0\" large-arc-flag=\"0\" sweep-flag=\"0\" x=\"49\" y=\"5.9\"/>\n<arc rx=\"70\" ry=\"70\" x-axis-rotation=\"0\" large-arc-flag=\"0\" sweep-flag=\"1\" x=\"98\" y=\"5.9\"/>\n<line x=\"98\" y=\"55.9\"/>\n<arc rx=\"70\" ry=\"70\" x-axis-rotation=\"0\" large-arc-flag=\"0\" sweep-flag=\"0\" x=\"49\" y=\"55.9\"/>\n<arc rx=\"70\" ry=\"70\" x-axis-rotation=\"0\" large-arc-flag=\"0\" sweep-flag=\"1\" x=\"0\" y=\"55.9\"/>\n<line x=\"0\" y=\"5.9\"/>\n<close/>\n</path>\n</background>\n<foreground>\n<fillstroke/>\n</foreground>\n</shape>\n<shape name=\"Parallel Mode\" h=\"40\" w=\"94\" aspect=\"variable\" strokewidth=\"inherit\">\n<connections>\n<constraint x=\"0.5\" y=\"0\" perimeter=\"0\" name=\"N\"/>\n<constraint x=\"0.5\" y=\"1\" perimeter=\"0\" name=\"S\"/>\n<constraint x=\"0\" y=\"0.5\" perimeter=\"0\" name=\"W\"/>\n<constraint x=\"1\" y=\"0.5\" perimeter=\"0\" name=\"E\"/>\n<constraint x=\"0\" y=\"0\" perimeter=\"0\" name=\"NW\"/>\n<constraint x=\"0\" y=\"1\" perimeter=\"0\" name=\"SW\"/>\n<constraint x=\"1\" y=\"0\" perimeter=\"0\" name=\"NE\"/>\n<constraint x=\"1\" y=\"1\" perimeter=\"0\" name=\"SE\"/>\n</connections>\n<background>\n<save/>\n<fillcolor color=\"#ffff00\"/>\n<path>\n<move x=\"47\" y=\"15\"/>\n<line x=\"52\" y=\"20\"/>\n<line x=\"47\" y=\"25\"/>\n<line x=\"42\" y=\"20\"/>\n<line x=\"47\" y=\"15\"/>\n<close/>\n<move x=\"27\" y=\"15\"/>\n<line x=\"32\" y=\"20\"/>\n<line x=\"27\" y=\"25\"/>\n<line x=\"22\" y=\"20\"/>\n<line x=\"27\" y=\"15\"/>\n<close/>\n<move x=\"67\" y=\"15\"/>\n<line x=\"72\" y=\"20\"/>\n<line x=\"67\" y=\"25\"/>\n<line x=\"62\" y=\"20\"/>\n<line x=\"67\" y=\"15\"/>\n<close/>\n</path>\n</background>\n<foreground>\n<fillstroke/>\n<restore/>\n<path>\n<move x=\"0\" y=\"0\"/>\n<line x=\"94\" y=\"0\"/>\n</path>\n<stroke/>\n<path>\n<move x=\"0\" y=\"40\"/>\n<line x=\"94\" y=\"40\"/>\n</path>\n<stroke/>\n</foreground>\n</shape>\n<shape name=\"Predefined Process\" h=\"60\" w=\"98\" aspect=\"variable\" strokewidth=\"inherit\">\n<connections>\n<constraint x=\"0.5\" y=\"0\" perimeter=\"0\" name=\"N\"/>\n<constraint x=\"0.5\" y=\"1\" perimeter=\"0\" name=\"S\"/>\n<constraint x=\"0\" y=\"0.5\" perimeter=\"0\" name=\"W\"/>\n<constraint x=\"1\" y=\"0.5\" perimeter=\"0\" name=\"E\"/>\n<constraint x=\"0.02\" y=\"0.015\" perimeter=\"0\" name=\"NW\"/>\n<constraint x=\"0.02\" y=\"0.985\" perimeter=\"0\" name=\"SW\"/>\n<constraint x=\"0.98\" y=\"0.015\" perimeter=\"0\" name=\"NE\"/>\n<constraint x=\"0.98\" y=\"0.985\" perimeter=\"0\" name=\"SE\"/>\n</connections>\n<background>\n<roundrect x=\"0\" y=\"0\" w=\"98\" h=\"60\" arcsize=\"6.717687074829931\"/>\n</background>\n<foreground>\n<fillstroke/>\n<path>\n<move x=\"14\" y=\"0\"/>\n<line x=\"14\" y=\"60\"/>\n</path>\n<stroke/>\n<path>\n<move x=\"84\" y=\"0\"/>\n<line x=\"84\" y=\"60\"/>\n</path>\n<stroke/>\n</foreground>\n</shape>\n<shape name=\"Preparation\" h=\"60\" w=\"97.11\" aspect=\"variable\" strokewidth=\"inherit\">\n<connections>\n<constraint x=\"0.5\" y=\"0\" perimeter=\"0\" name=\"N\"/>\n<constraint x=\"0.5\" y=\"1\" perimeter=\"0\" name=\"S\"/>\n<constraint x=\"0\" y=\"0.5\" perimeter=\"0\" name=\"W\"/>\n<constraint x=\"1\" y=\"0.5\" perimeter=\"0\" name=\"E\"/>\n<constraint x=\"0.26\" y=\"0.02\" perimeter=\"0\" name=\"NW\"/>\n<constraint x=\"0.26\" y=\"0.98\" perimeter=\"0\" name=\"SW\"/>\n<constraint x=\"0.74\" y=\"0.02\" perimeter=\"0\" name=\"NE\"/>\n<constraint x=\"0.74\" y=\"0.98\" perimeter=\"0\" name=\"SE\"/>\n</connections>\n<background>\n<path>\n<move x=\"20.56\" y=\"5\"/>\n<arc rx=\"15\" ry=\"15\" x-axis-rotation=\"0\" large-arc-flag=\"0\" sweep-flag=\"1\" x=\"31.56\" y=\"0\"/>\n<line x=\"65.56\" y=\"0\"/>\n<arc rx=\"15\" ry=\"15\" x-axis-rotation=\"0\" large-arc-flag=\"0\" sweep-flag=\"1\" x=\"76.56\" y=\"5\"/>\n<line x=\"96.56\" y=\"28\"/>\n<arc rx=\"5\" ry=\"5\" x-axis-rotation=\"0\" large-arc-flag=\"0\" sweep-flag=\"1\" x=\"96.56\" y=\"32\"/>\n<line x=\"76.56\" y=\"55\"/>\n<arc rx=\"15\" ry=\"15\" x-axis-rotation=\"0\" large-arc-flag=\"0\" sweep-flag=\"1\" x=\"65.56\" y=\"60\"/>\n<line x=\"31.56\" y=\"60\"/>\n<arc rx=\"15\" ry=\"15\" x-axis-rotation=\"0\" large-arc-flag=\"0\" sweep-flag=\"1\" x=\"20.56\" y=\"55\"/>\n<line x=\"0.56\" y=\"32\"/>\n<arc rx=\"5\" ry=\"5\" x-axis-rotation=\"0\" large-arc-flag=\"0\" sweep-flag=\"1\" x=\"0.56\" y=\"28\"/>\n<line x=\"20.56\" y=\"5\"/>\n<close/>\n</path>\n</background>\n<foreground>\n<fillstroke/>\n</foreground>\n</shape>\n<shape name=\"Process\" aspect=\"variable\" strokewidth=\"inherit\">\n<connections>\n<constraint x=\"0.5\" y=\"0\" perimeter=\"0\" name=\"N\"/>\n<constraint x=\"0.5\" y=\"1\" perimeter=\"0\" name=\"S\"/>\n<constraint x=\"0\" y=\"0.5\" perimeter=\"0\" name=\"W\"/>\n<constraint x=\"1\" y=\"0.5\" perimeter=\"0\" name=\"E\"/>\n</connections>\n<background>\n<roundrect x=\"0\" y=\"0\" w=\"100\" h=\"100\" arcsize=\"6\"/>\n</background>\n<foreground>\n<fillstroke/>\n</foreground>\n</shape>\n<shape name=\"Sequential Data\" h=\"99\" w=\"99\" aspect=\"variable\" strokewidth=\"inherit\">\n<connections>\n<constraint x=\"0.5\" y=\"0\" perimeter=\"0\" name=\"N\"/>\n<constraint x=\"0.5\" y=\"1\" perimeter=\"0\" name=\"S\"/>\n<constraint x=\"0\" y=\"0.5\" perimeter=\"0\" name=\"W\"/>\n<constraint x=\"1\" y=\"0.5\" perimeter=\"0\" name=\"E\"/>\n<constraint x=\"0.145\" y=\"0.145\" perimeter=\"0\" name=\"NW\"/>\n<constraint x=\"0.145\" y=\"0.855\" perimeter=\"0\" name=\"SW\"/>\n<constraint x=\"0.855\" y=\"0.145\" perimeter=\"0\" name=\"NE\"/>\n<constraint x=\"1\" y=\"1\" perimeter=\"0\" name=\"SE\"/>\n</connections>\n<background>\n<ellipse x=\"0\" y=\"0\" w=\"99\" h=\"99\"/>\n</background>\n<foreground>\n<fillstroke/>\n<path>\n<move x=\"49.5\" y=\"99\"/>\n<line x=\"99\" y=\"99\"/>\n</path>\n<stroke/>\n</foreground>\n</shape>\n<shape name=\"Sort\" h=\"98\" w=\"98\" aspect=\"variable\" strokewidth=\"inherit\">\n<connections>\n<constraint x=\"0.5\" y=\"0\" perimeter=\"0\" name=\"N\"/>\n<constraint x=\"0.5\" y=\"1\" perimeter=\"0\" name=\"S\"/>\n<constraint x=\"0\" y=\"0.5\" perimeter=\"0\" name=\"W\"/>\n<constraint x=\"1\" y=\"0.5\" perimeter=\"0\" name=\"E\"/>\n</connections>\n<background>\n<path>\n<move x=\"51\" y=\"1\"/>\n<line x=\"97\" y=\"47\"/>\n<arc rx=\"2.5\" ry=\"2.5\" x-axis-rotation=\"0\" large-arc-flag=\"0\" sweep-flag=\"1\" x=\"97\" y=\"51\"/>\n<line x=\"51\" y=\"97\"/>\n<arc rx=\"2.5\" ry=\"2.5\" x-axis-rotation=\"0\" large-arc-flag=\"0\" sweep-flag=\"1\" x=\"47\" y=\"97\"/>\n<line x=\"1\" y=\"51\"/>\n<arc rx=\"2.5\" ry=\"2.5\" x-axis-rotation=\"0\" large-arc-flag=\"0\" sweep-flag=\"1\" x=\"1\" y=\"47\"/>\n<line x=\"47\" y=\"1\"/>\n<arc rx=\"2.5\" ry=\"2.5\" x-axis-rotation=\"0\" large-arc-flag=\"0\" sweep-flag=\"1\" x=\"51\" y=\"1\"/>\n<close/>\n</path>\n</background>\n<foreground>\n<fillstroke/>\n<path>\n<move x=\"0\" y=\"49\"/>\n<line x=\"98\" y=\"49\"/>\n</path>\n<stroke/>\n</foreground>\n</shape>\n<shape name=\"Start 1\" h=\"60\" w=\"99\" aspect=\"variable\" strokewidth=\"inherit\">\n<connections>\n<constraint x=\"0.5\" y=\"0\" perimeter=\"0\" name=\"N\"/>\n<constraint x=\"0.5\" y=\"1\" perimeter=\"0\" name=\"S\"/>\n<constraint x=\"0\" y=\"0.5\" perimeter=\"0\" name=\"W\"/>\n<constraint x=\"1\" y=\"0.5\" perimeter=\"0\" name=\"E\"/>\n<constraint x=\"0.145\" y=\"0.145\" perimeter=\"0\" name=\"NW\"/>\n<constraint x=\"0.145\" y=\"0.855\" perimeter=\"0\" name=\"SW\"/>\n<constraint x=\"0.855\" y=\"0.145\" perimeter=\"0\" name=\"NE\"/>\n<constraint x=\"0.855\" y=\"0.855\" perimeter=\"0\" name=\"SE\"/>\n</connections>\n<background>\n<ellipse x=\"0\" y=\"0\" w=\"99\" h=\"60\"/>\n</background>\n<foreground>\n<fillstroke/>\n</foreground>\n</shape>\n<shape name=\"Start 2\" h=\"99\" w=\"99\" aspect=\"variable\" strokewidth=\"inherit\">\n<connections>\n<constraint x=\"0.5\" y=\"0\" perimeter=\"0\" name=\"N\"/>\n<constraint x=\"0.5\" y=\"1\" perimeter=\"0\" name=\"S\"/>\n<constraint x=\"0\" y=\"0.5\" perimeter=\"0\" name=\"W\"/>\n<constraint x=\"1\" y=\"0.5\" perimeter=\"0\" name=\"E\"/>\n<constraint x=\"0.145\" y=\"0.145\" perimeter=\"0\" name=\"NW\"/>\n<constraint x=\"0.145\" y=\"0.855\" perimeter=\"0\" name=\"SW\"/>\n<constraint x=\"0.855\" y=\"0.145\" perimeter=\"0\" name=\"NE\"/>\n<constraint x=\"0.855\" y=\"0.855\" perimeter=\"0\" name=\"SE\"/>\n</connections>\n<background>\n<ellipse x=\"0\" y=\"0\" w=\"99\" h=\"99\"/>\n</background>\n<foreground>\n<fillstroke/>\n</foreground>\n</shape>\n<shape name=\"Stored Data\" h=\"60\" w=\"96.51\" aspect=\"variable\" strokewidth=\"inherit\">\n<connections>\n<constraint x=\"0.5\" y=\"0\" perimeter=\"0\" name=\"N\"/>\n<constraint x=\"0.5\" y=\"1\" perimeter=\"0\" name=\"S\"/>\n<constraint x=\"0\" y=\"0.5\" perimeter=\"0\" name=\"W\"/>\n<constraint x=\"0.93\" y=\"0.5\" perimeter=\"0\" name=\"E\"/>\n<constraint x=\"0.1\" y=\"0\" perimeter=\"0\" name=\"NW\"/>\n<constraint x=\"0.1\" y=\"1\" perimeter=\"0\" name=\"SW\"/>\n<constraint x=\"0.995\" y=\"0.01\" perimeter=\"0\" name=\"NE\"/>\n<constraint x=\"0.995\" y=\"0.99\" perimeter=\"0\" name=\"SE\"/>\n</connections>\n<background>\n<path>\n<move x=\"10\" y=\"0\"/>\n<line x=\"96\" y=\"0\"/>\n<arc rx=\"1.5\" ry=\"1.5\" x-axis-rotation=\"0\" large-arc-flag=\"0\" sweep-flag=\"1\" x=\"96\" y=\"2\"/>\n<arc rx=\"10\" ry=\"30\" x-axis-rotation=\"0\" large-arc-flag=\"0\" sweep-flag=\"0\" x=\"96\" y=\"58\"/>\n<arc rx=\"1.5\" ry=\"1.5\" x-axis-rotation=\"0\" large-arc-flag=\"0\" sweep-flag=\"1\" x=\"96\" y=\"60\"/>\n<line x=\"10\" y=\"60\"/>\n<arc rx=\"10\" ry=\"30\" x-axis-rotation=\"0\" large-arc-flag=\"0\" sweep-flag=\"1\" x=\"10\" y=\"0\"/>\n<close/>\n</path>\n</background>\n<foreground>\n<fillstroke/>\n</foreground>\n</shape>\n<shape name=\"Summing Function\" h=\"70\" w=\"70\" aspect=\"variable\" strokewidth=\"inherit\">\n<connections>\n<constraint x=\"0.5\" y=\"0\" perimeter=\"0\" name=\"N\"/>\n<constraint x=\"0.5\" y=\"1\" perimeter=\"0\" name=\"S\"/>\n<constraint x=\"0\" y=\"0.5\" perimeter=\"0\" name=\"W\"/>\n<constraint x=\"1\" y=\"0.5\" perimeter=\"0\" name=\"E\"/>\n<constraint x=\"0.145\" y=\"0.145\" perimeter=\"0\" name=\"NW\"/>\n<constraint x=\"0.145\" y=\"0.855\" perimeter=\"0\" name=\"SW\"/>\n<constraint x=\"0.855\" y=\"0.145\" perimeter=\"0\" name=\"NE\"/>\n<constraint x=\"0.855\" y=\"0.855\" perimeter=\"0\" name=\"SE\"/>\n</connections>\n<background>\n<ellipse x=\"0\" y=\"0\" w=\"70\" h=\"70\"/>\n</background>\n<foreground>\n<fillstroke/>\n<path>\n<move x=\"0\" y=\"35\"/>\n<line x=\"70\" y=\"35\"/>\n</path>\n<stroke/>\n<path>\n<move x=\"35\" y=\"0\"/>\n<line x=\"35\" y=\"70\"/>\n</path>\n<stroke/>\n</foreground>\n</shape>\n<shape name=\"Terminator\" h=\"60\" w=\"98\" aspect=\"variable\" strokewidth=\"inherit\">\n<connections>\n<constraint x=\"0.5\" y=\"0\" perimeter=\"0\" name=\"N\"/>\n<constraint x=\"0.5\" y=\"1\" perimeter=\"0\" name=\"S\"/>\n<constraint x=\"0\" y=\"0.5\" perimeter=\"0\" name=\"W\"/>\n<constraint x=\"1\" y=\"0.5\" perimeter=\"0\" name=\"E\"/>\n<constraint x=\"0.11\" y=\"0.11\" perimeter=\"0\" name=\"NW\"/>\n<constraint x=\"0.11\" y=\"0.89\" perimeter=\"0\" name=\"SW\"/>\n<constraint x=\"0.89\" y=\"0.11\" perimeter=\"0\" name=\"NE\"/>\n<constraint x=\"0.89\" y=\"0.89\" perimeter=\"0\" name=\"SE\"/>\n</connections>\n<background>\n<path>\n<move x=\"30\" y=\"0\"/>\n<line x=\"68\" y=\"0\"/>\n<arc rx=\"30\" ry=\"30\" x-axis-rotation=\"0\" large-arc-flag=\"0\" sweep-flag=\"1\" x=\"68\" y=\"60\"/>\n<line x=\"30\" y=\"60\"/>\n<arc rx=\"30\" ry=\"30\" x-axis-rotation=\"0\" large-arc-flag=\"0\" sweep-flag=\"1\" x=\"30\" y=\"0\"/>\n<close/>\n</path>\n</background>\n<foreground>\n<fillstroke/>\n</foreground>\n</shape>\n<shape name=\"Transfer\" h=\"70\" w=\"97.5\" aspect=\"variable\" strokewidth=\"inherit\">\n<connections>\n<constraint x=\"0\" y=\"0.5\" perimeter=\"0\" name=\"W\"/>\n<constraint x=\"1\" y=\"0.5\" perimeter=\"0\" name=\"E\"/>\n</connections>\n<background>\n<path>\n<move x=\"0\" y=\"20\"/>\n<line x=\"59\" y=\"20\"/>\n<line x=\"59\" y=\"0\"/>\n<line x=\"97.5\" y=\"35\"/>\n<line x=\"59\" y=\"70\"/>\n<line x=\"59\" y=\"50\"/>\n<line x=\"0\" y=\"50\"/>\n<close/>\n</path>\n</background>\n<foreground>\n<fillstroke/>\n</foreground>\n</shape>\n</shapes>"
  },
  {
    "path": "static/cherry/drawio_demo/jscolor/jscolor.js",
    "content": "/**\n * jscolor, JavaScript Color Picker (name changed to mxJSColor to avoid conflicts)\n *\n * @version 1.3.13\n * @license GNU Lesser General Public License, http://www.gnu.org/copyleft/lesser.html\n * @author  Jan Odvarko, http://odvarko.cz\n * @created 2008-06-15\n * @updated 2012-01-19\n * @link    http://jscolor.com\n */\n\n\nvar mxJSColor = {\n\n\tbindClass : 'color', // class name\n\tbinding : true, // automatic binding via <input class=\"...\">\n\tpreloading : true, // use image preloading?\n\n\n\tinstall : function() {\n\t\t//mxJSColor.addEvent(window, 'load', mxJSColor.init);\n\t},\n\n\n\tinit : function() {\n\t\tif(mxJSColor.preloading) {\n\t\t\tmxJSColor.preload();\n\t\t}\n\t},\n\n\n\tgetDir : function() {\n\t\treturn IMAGE_PATH + '/';\n\t},\n\n\n\tdetectDir : function() {\n\t\tvar base = location.href;\n\n\t\tvar e = document.getElementsByTagName('base');\n\t\tfor(var i=0; i<e.length; i+=1) {\n\t\t\tif(e[i].href) { base = e[i].href; }\n\t\t}\n\n\t\tvar e = document.getElementsByTagName('script');\n\t\tfor(var i=0; i<e.length; i+=1) {\n\t\t\tif(e[i].src && /(^|\\/)jscolor\\.js([?#].*)?$/i.test(e[i].src)) {\n\t\t\t\tvar src = new mxJSColor.URI(e[i].src);\n\t\t\t\tvar srcAbs = src.toAbsolute(base);\n\t\t\t\tsrcAbs.path = srcAbs.path.replace(/[^\\/]+$/, ''); // remove filename\n\t\t\t\tsrcAbs.query = null;\n\t\t\t\tsrcAbs.fragment = null;\n\t\t\t\treturn srcAbs.toString();\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t},\n\n\tpreload : function() {\n\t\tfor(var fn in mxJSColor.imgRequire) {\n\t\t\tif(mxJSColor.imgRequire.hasOwnProperty(fn)) {\n\t\t\t\tmxJSColor.loadImage(fn);\n\t\t\t}\n\t\t}\n\t},\n\n\n\timages : {\n\t\tpad : [ 181, 101 ],\n\t\tsld : [ 16, 101 ],\n\t\tcross : [ 15, 15 ],\n\t\tarrow : [ 7, 11 ]\n\t},\n\n\n\timgRequire : {},\n\timgLoaded : {},\n\n\n\trequireImage : function(filename) {\n\t\tmxJSColor.imgRequire[filename] = true;\n\t},\n\n\n\tloadImage : function(filename) {\n\t\tif(!mxJSColor.imgLoaded[filename]) {\n\t\t\tmxJSColor.imgLoaded[filename] = new Image();\n\t\t\tmxJSColor.imgLoaded[filename].src = mxJSColor.getDir()+filename;\n\t\t}\n\t},\n\n\n\tfetchElement : function(mixed) {\n\t\treturn typeof mixed === 'string' ? document.getElementById(mixed) : mixed;\n\t},\n\n\n\taddEvent : function(el, evnt, func) {\n\t\tif(el.addEventListener) {\n\t\t\tel.addEventListener(evnt, func, false);\n\t\t} else if(el.attachEvent) {\n\t\t\tel.attachEvent('on'+evnt, func);\n\t\t}\n\t},\n\n\n\tfireEvent : function(el, evnt) {\n\t\tif(!el) {\n\t\t\treturn;\n\t\t}\n\t\tif(document.createEvent) {\n\t\t\tvar ev = document.createEvent('HTMLEvents');\n\t\t\tev.initEvent(evnt, true, true);\n\t\t\tel.dispatchEvent(ev);\n\t\t} else if(document.createEventObject) {\n\t\t\tvar ev = document.createEventObject();\n\t\t\tel.fireEvent('on'+evnt, ev);\n\t\t} else if(el['on'+evnt]) { // alternatively use the traditional event model (IE5)\n\t\t\tel['on'+evnt]();\n\t\t}\n\t},\n\n\n\tgetElementPos : function(e) {\n\t\tvar e1=e, e2=e;\n\t\tvar x=0, y=0;\n\t\tif(e1.offsetParent) {\n\t\t\tdo {\n\t\t\t\tx += e1.offsetLeft;\n\t\t\t\ty += e1.offsetTop;\n\t\t\t} while(e1 = e1.offsetParent);\n\t\t}\n\t\twhile((e2 = e2.parentNode) && e2.nodeName.toUpperCase() !== 'BODY') {\n\t\t\tx -= e2.scrollLeft;\n\t\t\ty -= e2.scrollTop;\n\t\t}\n\t\treturn [x, y];\n\t},\n\n\n\tgetElementSize : function(e) {\n\t\treturn [e.offsetWidth, e.offsetHeight];\n\t},\n\n\n\tgetRelMousePos : function(e) {\n\t\tvar x = 0, y = 0;\n\t\tif (!e) { e = window.event; }\n\t\tif (typeof e.offsetX === 'number') {\n\t\t\tx = e.offsetX;\n\t\t\ty = e.offsetY;\n\t\t} else if (typeof e.layerX === 'number') {\n\t\t\tx = e.layerX;\n\t\t\ty = e.layerY;\n\t\t}\n\t\treturn { x: x, y: y };\n\t},\n\n\n\tgetViewPos : function() {\n\t\tif(typeof window.pageYOffset === 'number') {\n\t\t\treturn [window.pageXOffset, window.pageYOffset];\n\t\t} else if(document.body && (document.body.scrollLeft || document.body.scrollTop)) {\n\t\t\treturn [document.body.scrollLeft, document.body.scrollTop];\n\t\t} else if(document.documentElement && (document.documentElement.scrollLeft || document.documentElement.scrollTop)) {\n\t\t\treturn [document.documentElement.scrollLeft, document.documentElement.scrollTop];\n\t\t} else {\n\t\t\treturn [0, 0];\n\t\t}\n\t},\n\n\n\tgetViewSize : function() {\n\t\tif(typeof window.innerWidth === 'number') {\n\t\t\treturn [window.innerWidth, window.innerHeight];\n\t\t} else if(document.body && (document.body.clientWidth || document.body.clientHeight)) {\n\t\t\treturn [document.body.clientWidth, document.body.clientHeight];\n\t\t} else if(document.documentElement && (document.documentElement.clientWidth || document.documentElement.clientHeight)) {\n\t\t\treturn [document.documentElement.clientWidth, document.documentElement.clientHeight];\n\t\t} else {\n\t\t\treturn [0, 0];\n\t\t}\n\t},\n\n\n\tURI : function(uri) { // See RFC3986\n\n\t\tthis.scheme = null;\n\t\tthis.authority = null;\n\t\tthis.path = '';\n\t\tthis.query = null;\n\t\tthis.fragment = null;\n\n\t\tthis.parse = function(uri) {\n\t\t\tvar m = uri.match(/^(([A-Za-z][0-9A-Za-z+.-]*)(:))?((\\/\\/)([^\\/?#]*))?([^?#]*)((\\?)([^#]*))?((#)(.*))?/);\n\t\t\tthis.scheme = m[3] ? m[2] : null;\n\t\t\tthis.authority = m[5] ? m[6] : null;\n\t\t\tthis.path = m[7];\n\t\t\tthis.query = m[9] ? m[10] : null;\n\t\t\tthis.fragment = m[12] ? m[13] : null;\n\t\t\treturn this;\n\t\t};\n\n\t\tthis.toString = function() {\n\t\t\tvar result = '';\n\t\t\tif(this.scheme !== null) { result = result + this.scheme + ':'; }\n\t\t\tif(this.authority !== null) { result = result + '//' + this.authority; }\n\t\t\tif(this.path !== null) { result = result + this.path; }\n\t\t\tif(this.query !== null) { result = result + '?' + this.query; }\n\t\t\tif(this.fragment !== null) { result = result + '#' + this.fragment; }\n\t\t\treturn result;\n\t\t};\n\n\t\tthis.toAbsolute = function(base) {\n\t\t\tvar base = new mxJSColor.URI(base);\n\t\t\tvar r = this;\n\t\t\tvar t = new mxJSColor.URI;\n\n\t\t\tif(base.scheme === null) { return false; }\n\n\t\t\tif(r.scheme !== null && r.scheme.toLowerCase() === base.scheme.toLowerCase()) {\n\t\t\t\tr.scheme = null;\n\t\t\t}\n\n\t\t\tif(r.scheme !== null) {\n\t\t\t\tt.scheme = r.scheme;\n\t\t\t\tt.authority = r.authority;\n\t\t\t\tt.path = removeDotSegments(r.path);\n\t\t\t\tt.query = r.query;\n\t\t\t} else {\n\t\t\t\tif(r.authority !== null) {\n\t\t\t\t\tt.authority = r.authority;\n\t\t\t\t\tt.path = removeDotSegments(r.path);\n\t\t\t\t\tt.query = r.query;\n\t\t\t\t} else {\n\t\t\t\t\tif(r.path === '') { // TODO: == or === ?\n\t\t\t\t\t\tt.path = base.path;\n\t\t\t\t\t\tif(r.query !== null) {\n\t\t\t\t\t\t\tt.query = r.query;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tt.query = base.query;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif(r.path.substr(0,1) === '/') {\n\t\t\t\t\t\t\tt.path = removeDotSegments(r.path);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tif(base.authority !== null && base.path === '') { // TODO: == or === ?\n\t\t\t\t\t\t\t\tt.path = '/'+r.path;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tt.path = base.path.replace(/[^\\/]+$/,'')+r.path;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tt.path = removeDotSegments(t.path);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tt.query = r.query;\n\t\t\t\t\t}\n\t\t\t\t\tt.authority = base.authority;\n\t\t\t\t}\n\t\t\t\tt.scheme = base.scheme;\n\t\t\t}\n\t\t\tt.fragment = r.fragment;\n\n\t\t\treturn t;\n\t\t};\n\n\t\tfunction removeDotSegments(path) {\n\t\t\tvar out = '';\n\t\t\twhile(path) {\n\t\t\t\tif(path.substr(0,3)==='../' || path.substr(0,2)==='./') {\n\t\t\t\t\tpath = path.replace(/^\\.+/,'').substr(1);\n\t\t\t\t} else if(path.substr(0,3)==='/./' || path==='/.') {\n\t\t\t\t\tpath = '/'+path.substr(3);\n\t\t\t\t} else if(path.substr(0,4)==='/../' || path==='/..') {\n\t\t\t\t\tpath = '/'+path.substr(4);\n\t\t\t\t\tout = out.replace(/\\/?[^\\/]*$/, '');\n\t\t\t\t} else if(path==='.' || path==='..') {\n\t\t\t\t\tpath = '';\n\t\t\t\t} else {\n\t\t\t\t\tvar rm = path.match(/^\\/?[^\\/]*/)[0];\n\t\t\t\t\tpath = path.substr(rm.length);\n\t\t\t\t\tout = out + rm;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn out;\n\t\t}\n\n\t\tif(uri) {\n\t\t\tthis.parse(uri);\n\t\t}\n\n\t},\n\n\n\t/*\n\t * Usage example:\n\t * var myColor = new mxJSColor.color(myInputElement)\n\t */\n\n\tcolor : function(target, prop) {\n\n\n\t\tthis.required = true; // refuse empty values?\n\t\tthis.adjust = true; // adjust value to uniform notation?\n\t\tthis.hash = false; // prefix color with # symbol?\n\t\tthis.caps = true; // uppercase?\n\t\tthis.slider = true; // show the value/saturation slider?\n\t\tthis.valueElement = target; // value holder\n\t\tthis.styleElement = target; // where to reflect current color\n\t\tthis.onImmediateChange = null; // onchange callback (can be either string or function)\n\t\tthis.hsv = [0, 0, 1]; // read-only  0-6, 0-1, 0-1\n\t\tthis.rgb = [1, 1, 1]; // read-only  0-1, 0-1, 0-1\n\n\t\tthis.pickerOnfocus = true; // display picker on focus?\n\t\tthis.pickerMode = 'HSV'; // HSV | HVS\n\t\tthis.pickerPosition = 'bottom'; // left | right | top | bottom\n\t\tthis.pickerSmartPosition = true; // automatically adjust picker position when necessary\n\t\tthis.pickerButtonHeight = 20; // px\n\t\tthis.pickerClosable = false;\n\t\tthis.pickerCloseText = 'Close';\n\t\tthis.pickerButtonColor = 'ButtonText'; // px\n\t\tthis.pickerFace = 0; // px\n\t\tthis.pickerFaceColor = 'ThreeDFace'; // CSS color\n\t\tthis.pickerBorder = 1; // px\n\t\tthis.pickerBorderColor = 'ThreeDHighlight ThreeDShadow ThreeDShadow ThreeDHighlight'; // CSS color\n\t\tthis.pickerInset = 1; // px\n\t\tthis.pickerInsetColor = 'ThreeDShadow ThreeDHighlight ThreeDHighlight ThreeDShadow'; // CSS color\n\t\tthis.pickerZIndex = 10000;\n\n\n\t\tfor(var p in prop) {\n\t\t\tif(prop.hasOwnProperty(p)) {\n\t\t\t\tthis[p] = prop[p];\n\t\t\t}\n\t\t}\n\n\n\t\tthis.hidePicker = function() {\n\t\t\tif(isPickerOwner()) {\n\t\t\t\tremovePicker();\n\t\t\t}\n\t\t};\n\n\n\t\tthis.showPicker = function() {\n\t\t\tif(!isPickerOwner()) {\n\t\t\t\tvar tp = mxJSColor.getElementPos(target); // target pos\n\t\t\t\tvar ts = mxJSColor.getElementSize(target); // target size\n\t\t\t\tvar vp = mxJSColor.getViewPos(); // view pos\n\t\t\t\tvar vs = mxJSColor.getViewSize(); // view size\n\t\t\t\tvar ps = getPickerDims(this); // picker size\n\t\t\t\tvar a, b, c;\n\t\t\t\tswitch(this.pickerPosition.toLowerCase()) {\n\t\t\t\t\tcase 'left': a=1; b=0; c=-1; break;\n\t\t\t\t\tcase 'right':a=1; b=0; c=1; break;\n\t\t\t\t\tcase 'top':  a=0; b=1; c=-1; break;\n\t\t\t\t\tdefault:     a=0; b=1; c=1; break;\n\t\t\t\t}\n\t\t\t\tvar l = (ts[b]+ps[b])/2;\n\n\t\t\t\t// picker pos\n\t\t\t\tif (!this.pickerSmartPosition) {\n\t\t\t\t\tvar pp = [\n\t\t\t\t\t\ttp[a],\n\t\t\t\t\t\ttp[b]+ts[b]-l+l*c\n\t\t\t\t\t];\n\t\t\t\t} else {\n\t\t\t\t\tvar pp = [\n\t\t\t\t\t\t-vp[a]+tp[a]+ps[a] > vs[a] ?\n\t\t\t\t\t\t\t(-vp[a]+tp[a]+ts[a]/2 > vs[a]/2 && tp[a]+ts[a]-ps[a] >= 0 ? tp[a]+ts[a]-ps[a] : tp[a]) :\n\t\t\t\t\t\t\ttp[a],\n\t\t\t\t\t\t-vp[b]+tp[b]+ts[b]+ps[b]-l+l*c > vs[b] ?\n\t\t\t\t\t\t\t(-vp[b]+tp[b]+ts[b]/2 > vs[b]/2 && tp[b]+ts[b]-l-l*c >= 0 ? tp[b]+ts[b]-l-l*c : tp[b]+ts[b]-l+l*c) :\n\t\t\t\t\t\t\t(tp[b]+ts[b]-l+l*c >= 0 ? tp[b]+ts[b]-l+l*c : tp[b]+ts[b]-l-l*c)\n\t\t\t\t\t];\n\t\t\t\t}\n\t\t\t\tdrawPicker(0, 0);\n\t\t\t}\n\t\t};\n\n\n\t\tthis.importColor = function() {\n\t\t\tif(!valueElement) {\n\t\t\t\tthis.exportColor();\n\t\t\t} else {\n\t\t\t\tif(!this.adjust) {\n\t\t\t\t\tif(!this.fromString(valueElement.value, leaveValue)) {\n\t\t\t\t\t\tstyleElement.style.backgroundImage = styleElement.jscStyle.backgroundImage;\n\t\t\t\t\t\tstyleElement.style.backgroundColor = styleElement.jscStyle.backgroundColor;\n\t\t\t\t\t\tstyleElement.style.color = styleElement.jscStyle.color;\n\t\t\t\t\t\tthis.exportColor(leaveValue | leaveStyle);\n\t\t\t\t\t}\n\t\t\t\t} else if(!this.required && /^\\s*$/.test(valueElement.value)) {\n\t\t\t\t\tvalueElement.value = '';\n\t\t\t\t\tstyleElement.style.backgroundImage = styleElement.jscStyle.backgroundImage;\n\t\t\t\t\tstyleElement.style.backgroundColor = styleElement.jscStyle.backgroundColor;\n\t\t\t\t\tstyleElement.style.color = styleElement.jscStyle.color;\n\t\t\t\t\tthis.exportColor(leaveValue | leaveStyle);\n\n\t\t\t\t} else if(this.fromString(valueElement.value)) {\n\t\t\t\t\t// OK\n\t\t\t\t} else {\n\t\t\t\t\tthis.exportColor();\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\n\t\tthis.exportColor = function(flags) {\n\t\t\tif(!(flags & leaveValue) && valueElement) {\n\t\t\t\tvar value = this.toString();\n\t\t\t\tif(this.caps) { value = value.toUpperCase(); }\n\t\t\t\tif(this.hash) { value = '#'+value; }\n\t\t\t\tvalueElement.value = value;\n\t\t\t}\n\t\t\tif(!(flags & leaveStyle) && styleElement) {\n\t\t\t\tstyleElement.style.backgroundImage = \"none\";\n\t\t\t\tstyleElement.style.backgroundColor =\n\t\t\t\t\t'#'+this.toString();\n\t\t\t\tstyleElement.style.color =\n\t\t\t\t\t0.213 * this.rgb[0] +\n\t\t\t\t\t0.715 * this.rgb[1] +\n\t\t\t\t\t0.072 * this.rgb[2]\n\t\t\t\t\t< 0.5 ? '#FFF' : '#000';\n\t\t\t}\n\t\t\tif(!(flags & leavePad) && isPickerOwner()) {\n\t\t\t\tredrawPad();\n\t\t\t}\n\t\t\tif(!(flags & leaveSld) && isPickerOwner()) {\n\t\t\t\tredrawSld();\n\t\t\t}\n\t\t};\n\n\n\t\tthis.fromHSV = function(h, s, v, flags) { // null = don't change\n\t\t\th<0 && (h=0) || h>6 && (h=6);\n\t\t\ts<0 && (s=0) || s>1 && (s=1);\n\t\t\tv<0 && (v=0) || v>1 && (v=1);\n\t\t\tthis.rgb = HSV_RGB(\n\t\t\t\th===null ? this.hsv[0] : (this.hsv[0]=h),\n\t\t\t\ts===null ? this.hsv[1] : (this.hsv[1]=s),\n\t\t\t\tv===null ? this.hsv[2] : (this.hsv[2]=v)\n\t\t\t);\n\t\t\tthis.exportColor(flags);\n\t\t};\n\n\n\t\tthis.fromRGB = function(r, g, b, flags) { // null = don't change\n\t\t\tr<0 && (r=0) || r>1 && (r=1);\n\t\t\tg<0 && (g=0) || g>1 && (g=1);\n\t\t\tb<0 && (b=0) || b>1 && (b=1);\n\t\t\tvar hsv = RGB_HSV(\n\t\t\t\tr===null ? this.rgb[0] : (this.rgb[0]=r),\n\t\t\t\tg===null ? this.rgb[1] : (this.rgb[1]=g),\n\t\t\t\tb===null ? this.rgb[2] : (this.rgb[2]=b)\n\t\t\t);\n\t\t\tif(hsv[0] !== null) {\n\t\t\t\tthis.hsv[0] = hsv[0];\n\t\t\t}\n\t\t\tif(hsv[2] !== 0) {\n\t\t\t\tthis.hsv[1] = hsv[1];\n\t\t\t}\n\t\t\tthis.hsv[2] = hsv[2];\n\t\t\tthis.exportColor(flags);\n\t\t};\n\n\n\t\tthis.fromString = function(hex, flags) {\n\t\t\tvar m = hex.match(/^\\W*([0-9A-F]{3}([0-9A-F]{3})?)\\W*$/i);\n\t\t\tif(!m) {\n\t\t\t\treturn false;\n\t\t\t} else {\n\t\t\t\tif(m[1].length === 6) { // 6-char notation\n\t\t\t\t\tthis.fromRGB(\n\t\t\t\t\t\tparseInt(m[1].substr(0,2),16) / 255,\n\t\t\t\t\t\tparseInt(m[1].substr(2,2),16) / 255,\n\t\t\t\t\t\tparseInt(m[1].substr(4,2),16) / 255,\n\t\t\t\t\t\tflags\n\t\t\t\t\t);\n\t\t\t\t} else { // 3-char notation\n\t\t\t\t\tthis.fromRGB(\n\t\t\t\t\t\tparseInt(m[1].charAt(0)+m[1].charAt(0),16) / 255,\n\t\t\t\t\t\tparseInt(m[1].charAt(1)+m[1].charAt(1),16) / 255,\n\t\t\t\t\t\tparseInt(m[1].charAt(2)+m[1].charAt(2),16) / 255,\n\t\t\t\t\t\tflags\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\treturn true;\n\t\t\t}\n\t\t};\n\n\n\t\tthis.toString = function() {\n\t\t\treturn (\n\t\t\t\t(0x100 | Math.round(255*this.rgb[0])).toString(16).substr(1) +\n\t\t\t\t(0x100 | Math.round(255*this.rgb[1])).toString(16).substr(1) +\n\t\t\t\t(0x100 | Math.round(255*this.rgb[2])).toString(16).substr(1)\n\t\t\t);\n\t\t};\n\n\n\t\tfunction RGB_HSV(r, g, b) {\n\t\t\tvar n = Math.min(Math.min(r,g),b);\n\t\t\tvar v = Math.max(Math.max(r,g),b);\n\t\t\tvar m = v - n;\n\t\t\tif(m === 0) { return [ null, 0, v ]; }\n\t\t\tvar h = r===n ? 3+(b-g)/m : (g===n ? 5+(r-b)/m : 1+(g-r)/m);\n\t\t\treturn [ h===6?0:h, m/v, v ];\n\t\t}\n\n\n\t\tfunction HSV_RGB(h, s, v) {\n\t\t\tif(h === null) { return [ v, v, v ]; }\n\t\t\tvar i = Math.floor(h);\n\t\t\tvar f = i%2 ? h-i : 1-(h-i);\n\t\t\tvar m = v * (1 - s);\n\t\t\tvar n = v * (1 - s*f);\n\t\t\tswitch(i) {\n\t\t\t\tcase 6:\n\t\t\t\tcase 0: return [v,n,m];\n\t\t\t\tcase 1: return [n,v,m];\n\t\t\t\tcase 2: return [m,v,n];\n\t\t\t\tcase 3: return [m,n,v];\n\t\t\t\tcase 4: return [n,m,v];\n\t\t\t\tcase 5: return [v,m,n];\n\t\t\t}\n\t\t}\n\n\n\t\tfunction removePicker() {\n\t\t\tdelete mxJSColor.picker.owner;\n\t\t\tdocument.getElementsByTagName('body')[0].removeChild(mxJSColor.picker.boxB);\n\t\t}\n\n\n\t\tfunction drawPicker(x, y) {\n\t\t\tif(!mxJSColor.picker) {\n\t\t\t\tmxJSColor.picker = {\n\t\t\t\t\tbox : document.createElement('div'),\n\t\t\t\t\tboxB : document.createElement('div'),\n\t\t\t\t\tpad : document.createElement('div'),\n\t\t\t\t\tpadB : document.createElement('div'),\n\t\t\t\t\tpadM : document.createElement('div'),\n\t\t\t\t\tsld : document.createElement('div'),\n\t\t\t\t\tsldB : document.createElement('div'),\n\t\t\t\t\tsldM : document.createElement('div'),\n\t\t\t\t\tbtn : document.createElement('div'),\n\t\t\t\t\tbtnS : document.createElement('span'),\n\t\t\t\t\tbtnT : document.createTextNode(THIS.pickerCloseText)\n\t\t\t\t};\n\t\t\t\tfor(var i=0,segSize=4; i<mxJSColor.images.sld[1]; i+=segSize) {\n\t\t\t\t\tvar seg = document.createElement('div');\n\t\t\t\t\tseg.style.height = segSize+'px';\n\t\t\t\t\tseg.style.fontSize = '1px';\n\t\t\t\t\tseg.style.lineHeight = '0';\n\t\t\t\t\tmxJSColor.picker.sld.appendChild(seg);\n\t\t\t\t}\n\t\t\t\tmxJSColor.picker.sldB.appendChild(mxJSColor.picker.sld);\n\t\t\t\tmxJSColor.picker.box.appendChild(mxJSColor.picker.sldB);\n\t\t\t\tmxJSColor.picker.box.appendChild(mxJSColor.picker.sldM);\n\t\t\t\tmxJSColor.picker.padB.appendChild(mxJSColor.picker.pad);\n\t\t\t\tmxJSColor.picker.box.appendChild(mxJSColor.picker.padB);\n\t\t\t\tmxJSColor.picker.box.appendChild(mxJSColor.picker.padM);\n\t\t\t\tmxJSColor.picker.btnS.appendChild(mxJSColor.picker.btnT);\n\t\t\t\tmxJSColor.picker.btn.appendChild(mxJSColor.picker.btnS);\n\t\t\t\tmxJSColor.picker.box.appendChild(mxJSColor.picker.btn);\n\t\t\t\tmxJSColor.picker.boxB.appendChild(mxJSColor.picker.box);\n\t\t\t}\n\n\t\t\tvar p = mxJSColor.picker;\n\n\t\t\t// controls interaction\n\t\t\tp.box.onmouseup =\n\t\t\tp.box.onmouseout = function() { if (!mxClient.IS_TOUCH) { target.focus(); } };\n\t\t\tp.box.onmousedown = function() { abortBlur=true; };\n\t\t\tp.box.onmousemove = function(e) {\n\t\t\t\tif (holdPad || holdSld) {\n\t\t\t\t\tholdPad && setPad(e);\n\t\t\t\t\tholdSld && setSld(e);\n\t\t\t\t\tif (document.selection) {\n\t\t\t\t\t\tdocument.selection.empty();\n\t\t\t\t\t} else if (window.getSelection) {\n\t\t\t\t\t\twindow.getSelection().removeAllRanges();\n\t\t\t\t\t}\n\t\t\t\t\tdispatchImmediateChange();\n\t\t\t\t}\n\t\t\t};\n\t\t\tp.padM.onmouseup =\n\t\t\tp.padM.onmouseout = function() { if(holdPad) { holdPad=false; mxJSColor.fireEvent(valueElement,'change'); } };\n\t\t\tp.padM.onmousedown = function(e) {\n\t\t\t\t// if the slider is at the bottom, move it up\n\t\t\t\tswitch(modeID) {\n\t\t\t\t\tcase 0: if (THIS.hsv[2] === 0) { THIS.fromHSV(null, null, 1.0); }; break;\n\t\t\t\t\tcase 1: if (THIS.hsv[1] === 0) { THIS.fromHSV(null, 1.0, null); }; break;\n\t\t\t\t}\n\t\t\t\tholdPad=true;\n\t\t\t\tsetPad(e);\n\t\t\t\tdispatchImmediateChange();\n\t\t\t};\n\t\t\tp.sldM.onmouseup =\n\t\t\tp.sldM.onmouseout = function() { if(holdSld) { holdSld=false; mxJSColor.fireEvent(valueElement,'change'); } };\n\t\t\tp.sldM.onmousedown = function(e) {\n\t\t\t\tholdSld=true;\n\t\t\t\tsetSld(e);\n\t\t\t\tdispatchImmediateChange();\n\t\t\t};\n\n\t\t\t// picker\n\t\t\tvar dims = getPickerDims(THIS);\n\t\t\tp.box.style.width = dims[0] + 'px';\n\t\t\tp.box.style.height = dims[1] + 'px';\n\n\t\t\t// picker border\n\t\t\tp.boxB.style.position = 'absolute';\n\t\t\tp.boxB.style.clear = 'both';\n\t\t\tp.boxB.style.left = x+'px';\n\t\t\tp.boxB.style.top = y+'px';\n\t\t\tp.boxB.style.zIndex = THIS.pickerZIndex;\n\t\t\tp.boxB.style.border = THIS.pickerBorder+'px solid';\n\t\t\tp.boxB.style.borderColor = THIS.pickerBorderColor;\n\t\t\tp.boxB.style.background = THIS.pickerFaceColor;\n\n\t\t\t// pad image\n\t\t\tp.pad.style.width = mxJSColor.images.pad[0]+'px';\n\t\t\tp.pad.style.height = mxJSColor.images.pad[1]+'px';\n\n\t\t\t// pad border\n\t\t\tp.padB.style.position = 'absolute';\n\t\t\tp.padB.style.left = THIS.pickerFace+'px';\n\t\t\tp.padB.style.top = THIS.pickerFace+'px';\n\t\t\tp.padB.style.border = THIS.pickerInset+'px solid';\n\t\t\tp.padB.style.borderColor = THIS.pickerInsetColor;\n\n\t\t\t// pad mouse area\n\t\t\tp.padM.style.position = 'absolute';\n\t\t\tp.padM.style.left = '0';\n\t\t\tp.padM.style.top = '0';\n\t\t\tp.padM.style.width = THIS.pickerFace + 2*THIS.pickerInset + mxJSColor.images.pad[0] + mxJSColor.images.arrow[0] + 'px';\n\t\t\tp.padM.style.height = p.box.style.height;\n\t\t\tp.padM.style.cursor = 'crosshair';\n\n\t\t\t// slider image\n\t\t\tp.sld.style.overflow = 'hidden';\n\t\t\tp.sld.style.width = mxJSColor.images.sld[0]+'px';\n\t\t\tp.sld.style.height = mxJSColor.images.sld[1]+'px';\n\n\t\t\t// slider border\n\t\t\tp.sldB.style.display = THIS.slider ? 'block' : 'none';\n\t\t\tp.sldB.style.position = 'absolute';\n\t\t\tp.sldB.style.right = THIS.pickerFace+'px';\n\t\t\tp.sldB.style.top = THIS.pickerFace+'px';\n\t\t\tp.sldB.style.border = THIS.pickerInset+'px solid';\n\t\t\tp.sldB.style.borderColor = THIS.pickerInsetColor;\n\n\t\t\t// slider mouse area\n\t\t\tp.sldM.style.display = THIS.slider ? 'block' : 'none';\n\t\t\tp.sldM.style.position = 'absolute';\n\t\t\tp.sldM.style.right = '0';\n\t\t\tp.sldM.style.top = '0';\n\t\t\tp.sldM.style.width = mxJSColor.images.sld[0] + mxJSColor.images.arrow[0] + THIS.pickerFace + 2*THIS.pickerInset + 'px';\n\t\t\tp.sldM.style.height = p.box.style.height;\n\t\t\ttry {\n\t\t\t\tp.sldM.style.cursor = 'pointer';\n\t\t\t} catch(eOldIE) {\n\t\t\t\tp.sldM.style.cursor = 'hand';\n\t\t\t}\n\n\t\t\t// \"close\" button\n\t\t\tfunction setBtnBorder() {\n\t\t\t\tvar insetColors = THIS.pickerInsetColor.split(/\\s+/);\n\t\t\t\tvar pickerOutsetColor = insetColors.length < 2 ? insetColors[0] : insetColors[1] + ' ' + insetColors[0] + ' ' + insetColors[0] + ' ' + insetColors[1];\n\t\t\t\tp.btn.style.borderColor = pickerOutsetColor;\n\t\t\t}\n\t\t\tp.btn.style.display = THIS.pickerClosable ? 'block' : 'none';\n\t\t\tp.btn.style.position = 'absolute';\n\t\t\tp.btn.style.left = THIS.pickerFace + 'px';\n\t\t\tp.btn.style.bottom = THIS.pickerFace + 'px';\n\t\t\tp.btn.style.padding = '0 15px';\n\t\t\tp.btn.style.height = '18px';\n\t\t\tp.btn.style.border = THIS.pickerInset + 'px solid';\n\t\t\tsetBtnBorder();\n\t\t\tp.btn.style.color = THIS.pickerButtonColor;\n\t\t\tp.btn.style.font = '12px sans-serif';\n\t\t\tp.btn.style.textAlign = 'center';\n\t\t\ttry {\n\t\t\t\tp.btn.style.cursor = 'pointer';\n\t\t\t} catch(eOldIE) {\n\t\t\t\tp.btn.style.cursor = 'hand';\n\t\t\t}\n\t\t\tp.btn.onmousedown = function () {\n\t\t\t\tTHIS.hidePicker();\n\t\t\t};\n\t\t\tp.btnS.style.lineHeight = p.btn.style.height;\n\n\t\t\t// load images in optimal order\n\t\t\tswitch(modeID) {\n\t\t\t\tcase 0: var padImg = 'hs.png'; break;\n\t\t\t\tcase 1: var padImg = 'hv.png'; break;\n\t\t\t}\n\t\t\tp.padM.style.backgroundImage = \"url(data:image/gif;base64,R0lGODlhDwAPAKEBAAAAAP///////////yH5BAEKAAIALAAAAAAPAA8AAAIklB8Qx53b4otSUWcvyiz4/4AeQJbmKY4p1HHapBlwPL/uVRsFADs=)\";\n\t\t\tp.padM.style.backgroundRepeat = \"no-repeat\";\n\t\t\tp.sldM.style.backgroundImage = \"url(data:image/gif;base64,R0lGODlhBwALAKECAAAAAP///6g8eKg8eCH5BAEKAAIALAAAAAAHAAsAAAITTIQYcLnsgGxvijrxqdQq6DRJAQA7)\";\n\t\t\tp.sldM.style.backgroundRepeat = \"no-repeat\";\n\t\t\tp.pad.style.backgroundImage = \"url('\"+mxJSColor.getDir()+padImg+\"')\";\n\t\t\tp.pad.style.backgroundRepeat = \"no-repeat\";\n\t\t\tp.pad.style.backgroundPosition = \"0 0\";\n\n\t\t\t// place pointers\n\t\t\tredrawPad();\n\t\t\tredrawSld();\n\n\t\t\tmxJSColor.picker.owner = THIS;\n\t\t\tdocument.getElementsByTagName('body')[0].appendChild(p.boxB);\n\t\t}\n\n\n\t\tfunction getPickerDims(o) {\n\t\t\tvar dims = [\n\t\t\t\t2*o.pickerInset + 2*o.pickerFace + mxJSColor.images.pad[0] +\n\t\t\t\t\t(o.slider ? 2*o.pickerInset + 2*mxJSColor.images.arrow[0] + mxJSColor.images.sld[0] : 0),\n\t\t\t\to.pickerClosable ?\n\t\t\t\t\t4*o.pickerInset + 3*o.pickerFace + mxJSColor.images.pad[1] + o.pickerButtonHeight :\n\t\t\t\t\t2*o.pickerInset + 2*o.pickerFace + mxJSColor.images.pad[1]\n\t\t\t];\n\t\t\treturn dims;\n\t\t}\n\n\n\t\tfunction redrawPad() {\n\t\t\t// redraw the pad pointer\n\t\t\tswitch(modeID) {\n\t\t\t\tcase 0: var yComponent = 1; break;\n\t\t\t\tcase 1: var yComponent = 2; break;\n\t\t\t}\n\t\t\tvar x = Math.round((THIS.hsv[0]/6) * (mxJSColor.images.pad[0]-1));\n\t\t\tvar y = Math.round((1-THIS.hsv[yComponent]) * (mxJSColor.images.pad[1]-1));\n\t\t\tmxJSColor.picker.padM.style.backgroundPosition =\n\t\t\t\t(THIS.pickerFace+THIS.pickerInset+x - Math.floor(mxJSColor.images.cross[0]/2)) + 'px ' +\n\t\t\t\t(THIS.pickerFace+THIS.pickerInset+y - Math.floor(mxJSColor.images.cross[1]/2)) + 'px';\n\n\t\t\t// redraw the slider image\n\t\t\tvar seg = mxJSColor.picker.sld.childNodes;\n\n\t\t\tswitch(modeID) {\n\t\t\t\tcase 0:\n\t\t\t\t\tvar rgb = HSV_RGB(THIS.hsv[0], THIS.hsv[1], 1);\n\t\t\t\t\tfor(var i=0; i<seg.length; i+=1) {\n\t\t\t\t\t\tseg[i].style.backgroundColor = 'rgb('+\n\t\t\t\t\t\t\t(rgb[0]*(1-i/seg.length)*100)+'%,'+\n\t\t\t\t\t\t\t(rgb[1]*(1-i/seg.length)*100)+'%,'+\n\t\t\t\t\t\t\t(rgb[2]*(1-i/seg.length)*100)+'%)';\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 1:\n\t\t\t\t\tvar rgb, s, c = [ THIS.hsv[2], 0, 0 ];\n\t\t\t\t\tvar i = Math.floor(THIS.hsv[0]);\n\t\t\t\t\tvar f = i%2 ? THIS.hsv[0]-i : 1-(THIS.hsv[0]-i);\n\t\t\t\t\tswitch(i) {\n\t\t\t\t\t\tcase 6:\n\t\t\t\t\t\tcase 0: rgb=[0,1,2]; break;\n\t\t\t\t\t\tcase 1: rgb=[1,0,2]; break;\n\t\t\t\t\t\tcase 2: rgb=[2,0,1]; break;\n\t\t\t\t\t\tcase 3: rgb=[2,1,0]; break;\n\t\t\t\t\t\tcase 4: rgb=[1,2,0]; break;\n\t\t\t\t\t\tcase 5: rgb=[0,2,1]; break;\n\t\t\t\t\t}\n\t\t\t\t\tfor(var i=0; i<seg.length; i+=1) {\n\t\t\t\t\t\ts = 1 - 1/(seg.length-1)*i;\n\t\t\t\t\t\tc[1] = c[0] * (1 - s*f);\n\t\t\t\t\t\tc[2] = c[0] * (1 - s);\n\t\t\t\t\t\tseg[i].style.backgroundColor = 'rgb('+\n\t\t\t\t\t\t\t(c[rgb[0]]*100)+'%,'+\n\t\t\t\t\t\t\t(c[rgb[1]]*100)+'%,'+\n\t\t\t\t\t\t\t(c[rgb[2]]*100)+'%)';\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\n\t\tfunction redrawSld() {\n\t\t\t// redraw the slider pointer\n\t\t\tswitch(modeID) {\n\t\t\t\tcase 0: var yComponent = 2; break;\n\t\t\t\tcase 1: var yComponent = 1; break;\n\t\t\t}\n\t\t\tvar y = Math.round((1-THIS.hsv[yComponent]) * (mxJSColor.images.sld[1]-1));\n\t\t\tmxJSColor.picker.sldM.style.backgroundPosition =\n\t\t\t\t'0 ' + (THIS.pickerFace+THIS.pickerInset+y - Math.floor(mxJSColor.images.arrow[1]/2)) + 'px';\n\t\t}\n\n\n\t\tfunction isPickerOwner() {\n\t\t\treturn mxJSColor.picker && mxJSColor.picker.owner === THIS;\n\t\t}\n\n\n\t\tfunction blurTarget() {\n\t\t\tif(valueElement === target) {\n\t\t\t\tTHIS.importColor();\n\t\t\t}\n\t\t\tif(THIS.pickerOnfocus) {\n\t\t\t\tTHIS.hidePicker();\n\t\t\t}\n\t\t}\n\n\n\t\tfunction blurValue() {\n\t\t\tif(valueElement !== target) {\n\t\t\t\tTHIS.importColor();\n\t\t\t}\n\t\t}\n\n\n\t\tfunction setPad(e) {\n\t\t\tvar mpos = mxJSColor.getRelMousePos(e);\n\t\t\tvar x = mpos.x - THIS.pickerFace - THIS.pickerInset;\n\t\t\tvar y = mpos.y - THIS.pickerFace - THIS.pickerInset;\n\t\t\tswitch(modeID) {\n\t\t\t\tcase 0: THIS.fromHSV(x*(6/(mxJSColor.images.pad[0]-1)), 1 - y/(mxJSColor.images.pad[1]-1), null, leaveSld); break;\n\t\t\t\tcase 1: THIS.fromHSV(x*(6/(mxJSColor.images.pad[0]-1)), null, 1 - y/(mxJSColor.images.pad[1]-1), leaveSld); break;\n\t\t\t}\n\t\t}\n\n\n\t\tfunction setSld(e) {\n\t\t\tvar mpos = mxJSColor.getRelMousePos(e);\n\t\t\tvar y = mpos.y - THIS.pickerFace - THIS.pickerInset;\n\t\t\tswitch(modeID) {\n\t\t\t\tcase 0: THIS.fromHSV(null, null, 1 - y/(mxJSColor.images.sld[1]-1), leavePad); break;\n\t\t\t\tcase 1: THIS.fromHSV(null, 1 - y/(mxJSColor.images.sld[1]-1), null, leavePad); break;\n\t\t\t}\n\t\t}\n\n\n\t\tfunction dispatchImmediateChange() {\n\t\t\tif (THIS.onImmediateChange) {\n\t\t\t\tif (typeof THIS.onImmediateChange === 'string') {\n\t\t\t\t\t// eval(THIS.onImmediateChange); // Blocked by CSP\n\t\t\t\t} else {\n\t\t\t\t\tTHIS.onImmediateChange(THIS);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\n\t\tvar THIS = this;\n\t\tvar modeID = this.pickerMode.toLowerCase()==='hvs' ? 1 : 0;\n\t\tvar abortBlur = false;\n\t\tvar\n\t\t\tvalueElement = mxJSColor.fetchElement(this.valueElement),\n\t\t\tstyleElement = mxJSColor.fetchElement(this.styleElement);\n\t\tvar\n\t\t\tholdPad = false,\n\t\t\tholdSld = false;\n\t\tvar\n\t\t\tleaveValue = 1<<0,\n\t\t\tleaveStyle = 1<<1,\n\t\t\tleavePad = 1<<2,\n\t\t\tleaveSld = 1<<3;\n\n\t\t// target\n\t\t/*mxJSColor.addEvent(target, 'focus', function() {\n\t\t\tif(THIS.pickerOnfocus) { THIS.showPicker(); }\n\t\t});\n\t\tmxJSColor.addEvent(target, 'blur', function() {\n\t\t\tif(!abortBlur) {\n\t\t\t\twindow.setTimeout(function(){ abortBlur || blurTarget(); abortBlur=false; }, 0);\n\t\t\t} else {\n\t\t\t\tabortBlur = false;\n\t\t\t}\n\t\t});*/\n\n\t\t// valueElement\n\t\tif(valueElement) {\n\t\t\tvar updateField = function() {\n\t\t\t\tTHIS.fromString(valueElement.value, leaveValue);\n\t\t\t\tdispatchImmediateChange();\n\t\t\t};\n\t\t\tmxJSColor.addEvent(valueElement, 'keyup', updateField);\n\t\t\tmxJSColor.addEvent(valueElement, 'input', updateField);\n\t\t\tmxJSColor.addEvent(valueElement, 'blur', blurValue);\n\t\t\tvalueElement.setAttribute('autocomplete', 'off');\n\t\t}\n\n\t\t// styleElement\n\t\tif(styleElement) {\n\t\t\tstyleElement.jscStyle = {\n\t\t\t\tbackgroundImage : styleElement.style.backgroundImage,\n\t\t\t\tbackgroundColor : styleElement.style.backgroundColor,\n\t\t\t\tcolor : styleElement.style.color\n\t\t\t};\n\t\t}\n\n\t\t// require images\n\t\tswitch(modeID) {\n\t\t\tcase 0: mxJSColor.requireImage('hs.png'); break;\n\t\t\tcase 1: mxJSColor.requireImage('hv.png'); break;\n\t\t}\n\n\t\tthis.importColor();\n\t}\n\n};\n\n\nmxJSColor.install();\n"
  },
  {
    "path": "static/cherry/drawio_demo/lib/base64.js",
    "content": "\n/**\n*\n*  Base64 encode / decode\n*  http://www.webtoolkit.info/\n*\n**/\n\nvar Base64 = {\n\n\t// private property\n\t_keyStr : \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\",\n\n\t// public method for encoding\n\tencode : function (input, binary) {\n\t\tbinary = (binary != null) ? binary : false;\n\t\tvar output = \"\";\n\t\tvar chr1, chr2, chr3, enc1, enc2, enc3, enc4;\n\t\tvar i = 0;\n\n\t\tif (!binary)\n\t\t{\n\t\t\tinput = Base64._utf8_encode(input);\n\t\t}\n\n\t\twhile (i < input.length) {\n\n\t\t\tchr1 = input.charCodeAt(i++);\n\t\t\tchr2 = input.charCodeAt(i++);\n\t\t\tchr3 = input.charCodeAt(i++);\n\n\t\t\tenc1 = chr1 >> 2;\n\t\t\tenc2 = ((chr1 & 3) << 4) | (chr2 >> 4);\n\t\t\tenc3 = ((chr2 & 15) << 2) | (chr3 >> 6);\n\t\t\tenc4 = chr3 & 63;\n\n\t\t\tif (isNaN(chr2)) {\n\t\t\t\tenc3 = enc4 = 64;\n\t\t\t} else if (isNaN(chr3)) {\n\t\t\t\tenc4 = 64;\n\t\t\t}\n\n\t\t\toutput = output +\n\t\t\tthis._keyStr.charAt(enc1) + this._keyStr.charAt(enc2) +\n\t\t\tthis._keyStr.charAt(enc3) + this._keyStr.charAt(enc4);\n\n\t\t}\n\n\t\treturn output;\n\t},\n\n\t// public method for decoding\n\tdecode : function (input, binary) {\n\t\tbinary = (binary != null) ? binary : false;\n\t\tvar output = \"\";\n\t\tvar chr1, chr2, chr3;\n\t\tvar enc1, enc2, enc3, enc4;\n\t\tvar i = 0;\n\n\t\tinput = input.replace(/[^A-Za-z0-9\\+\\/\\=]/g, \"\");\n\n\t\twhile (i < input.length) {\n\n\t\t\tenc1 = this._keyStr.indexOf(input.charAt(i++));\n\t\t\tenc2 = this._keyStr.indexOf(input.charAt(i++));\n\t\t\tenc3 = this._keyStr.indexOf(input.charAt(i++));\n\t\t\tenc4 = this._keyStr.indexOf(input.charAt(i++));\n\n\t\t\tchr1 = (enc1 << 2) | (enc2 >> 4);\n\t\t\tchr2 = ((enc2 & 15) << 4) | (enc3 >> 2);\n\t\t\tchr3 = ((enc3 & 3) << 6) | enc4;\n\n\t\t\toutput = output + String.fromCharCode(chr1);\n\n\t\t\tif (enc3 != 64) {\n\t\t\t\toutput = output + String.fromCharCode(chr2);\n\t\t\t}\n\t\t\tif (enc4 != 64) {\n\t\t\t\toutput = output + String.fromCharCode(chr3);\n\t\t\t}\n\n\t\t}\n\n\t\tif (!binary)\n\t\t{\n\t\t\toutput = Base64._utf8_decode(output);\n\t\t}\n\n\t\treturn output;\n\n\t},\n\n\t// private method for UTF-8 encoding\n\t_utf8_encode : function (string) {\n\t\tstring = string.replace(/\\r\\n/g,\"\\n\");\n\t\tvar utftext = \"\";\n\n\t\tfor (var n = 0; n < string.length; n++) {\n\n\t\t\tvar c = string.charCodeAt(n);\n\n\t\t\tif (c < 128) {\n\t\t\t\tutftext += String.fromCharCode(c);\n\t\t\t}\n\t\t\telse if((c > 127) && (c < 2048)) {\n\t\t\t\tutftext += String.fromCharCode((c >> 6) | 192);\n\t\t\t\tutftext += String.fromCharCode((c & 63) | 128);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tutftext += String.fromCharCode((c >> 12) | 224);\n\t\t\t\tutftext += String.fromCharCode(((c >> 6) & 63) | 128);\n\t\t\t\tutftext += String.fromCharCode((c & 63) | 128);\n\t\t\t}\n\n\t\t}\n\n\t\treturn utftext;\n\t},\n\n\t// private method for UTF-8 decoding\n\t_utf8_decode : function (utftext) {\n\t\tvar string = \"\";\n\t\tvar i = 0;\n\t\tvar c = c1 = c2 = 0;\n\n\t\twhile ( i < utftext.length ) {\n\n\t\t\tc = utftext.charCodeAt(i);\n\n\t\t\tif (c < 128) {\n\t\t\t\tstring += String.fromCharCode(c);\n\t\t\t\ti++;\n\t\t\t}\n\t\t\telse if((c > 191) && (c < 224)) {\n\t\t\t\tc2 = utftext.charCodeAt(i+1);\n\t\t\t\tstring += String.fromCharCode(((c & 31) << 6) | (c2 & 63));\n\t\t\t\ti += 2;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tc2 = utftext.charCodeAt(i+1);\n\t\t\t\tc3 = utftext.charCodeAt(i+2);\n\t\t\t\tstring += String.fromCharCode(((c & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63));\n\t\t\t\ti += 3;\n\t\t\t}\n\n\t\t}\n\n\t\treturn string;\n\t}\n\n}\n"
  },
  {
    "path": "static/cherry/drawio_demo/resources/en.txt",
    "content": "# Resources from graph.properties\nalreadyConnected=Knoten schon verbunden\ncancel=Abbrechen\nclose=Schliessen\ncollapse-expand=Einklappen/Ausklappen\ncontainsValidationErrors=Enthält Validierungsfehler\ndone=Fertig\ndoubleClickOrientation=Doppelklicken um Orientierung zu ändern\nerror=Fehler\nerrorSavingFile=Fehler beim Speichern der Datei\nok=OK\nupdatingDocument=Aktualisiere Dokument. Bitte warten...\nupdatingSelection=Aktualisiere Markierung. Bitte warten...\n# Custom resources\nabout=Über\nactualSize=Tatsächliche Grösse\nadd=Hinzufügen\naddLayer=Ebene einfügen\naddProperty=Eigenschaft einfügen\naddToExistingDrawing=In vorhandene Zeichnung einfügen\naddWaypoint=Wegpunkt einfügen\nadvanced=Erweitert\nalign=Ausrichten\nalignment=Ausrichtung\nallChangesLost=Alle Änderungen gehen verloren!\nangle=Winkel\napply=Anwenden\narc=Bogen\narrange=Anordnen\narrow=Pfeil\narrows=Pfeile\nautomatic=Automatisch\nautosave=Automatisch Speichern\nautosize=Grösse anpassen\nbackground=Hintergrund\nbackgroundColor=Hintergrundfarbe\nbackgroundImage=Hintergrundbild\nbasic=Einfach\nblock=Block\nblockquote=Zitat\nbold=Fett\nborder=Rahmen\nborderWidth=Rahmenbreite\nborderColor=Rahmenfarbe\nbottom=Unten\nbottomAlign=Unten\nbottomLeft=Unten links\nbottomRight=Unten rechts\nbulletedList=Aufzählungsliste\ncannotOpenFile=Kann Datei nicht öffnen\ncenter=Zentriert\nchange=Ändern\nchangeOrientation=Orientierung ändern\ncircle=Kreis\nclassic=Klassisch\nclearDefaultStyle=Standardstyle löschen\nclearWaypoints=Wegpunkte löschen\nclipart=Clipart\ncollapse=Einklappen\ncollapseExpand=Ein-/Ausklappen\ncollapsible=Einklappbar\ncomic=Comic\nconnect=Verbinden\nconnection=Verbindung\nconnectionPoints=Verbindungspunkte\nconnectionArrows=Verbindungspfeile\nconstrainProportions=Proportionen beibehalten\ncopy=Kopieren\ncopyConnect=Beim Verbinden kopieren\ncopySize=Grösse kopieren\ncreate=Erstellen\ncurved=Gebogen\ncustom=Benutzerdefiniert\ncut=Ausschneiden\ndashed=Gestrichelt\ndecreaseIndent=Einzug verringern\ndefault=Vorgegeben\ndelete=Löschen\ndeleteColumn=Spalte löschen\ndeleteRow=Zeile löschen\ndiagram=Diagramm\ndiamond=Diamant\ndiamondThin=Diamant (Schmal)\ndirection=Richtung\ndistribute=Verteilen\ndivider=Treelinie\ndotted=Punktiert\ndocumentProperties=Dokumenteigenschaften\ndrawing=Zeichnung{1}\ndrawingEmpty=Zeichnung ist leer\ndrawingTooLarge=Zeichnung ist zu gross\nduplicate=Duplizieren\nduplicateIt={1} duplizieren\neast=Ost\nedit=Bearbeiten\neditData=Metadaten bearbeiten\neditDiagram=Diagramm bearbeiten\neditImage=Bild bearbeiten\neditLink=Link bearbeiten\neditStyle=Style bearbeiten\neditTooltip=Tooltip bearbeiten\nenterGroup=In Gruppe hinein\nenterValue=Wert eingeben\nenterName=Namen eingeben\nenterPropertyName=Eigenschaftsname eingeben\nentityRelation=Entity Relation\nexitGroup=Aus Gruppe heraus\nexpand=Ausklappen\nexport=Exportieren\nextras=Extras\nfile=Datei\nfileNotFound=Datei nicht gefunden\nfilename=Dateiname\nfill=Füllen\nfillColor=Füllfarbe\nfitPage=Ganze Seite\nfitPageWidth=Seitenbreite\nfitTwoPages=Zwei Seiten\nfitWindow=An Fenstergrösse anpassen\nflip=Spiegeln\nflipH=Horizontal Spiegeln\nflipV=Vertikal Spiegeln\nfont=Schrift\nfontFamily=Schriftart\nfontColor=Schriftfarbe\nfontSize=Schriftgrösse\nformat=Format\nformatPanel=Bereich \"Formatieren\"\ngeneral=Allgemein\nformatPdf=PDF\nformatPng=PNG\nformatGif=GIF\nformatJpg=JPEG\nformatSvg=SVG\nformatXml=XML\nformatted=Formatiert\nformattedText=Formatierter Text\ngap=Gap\nglass=Glas\ngeneral=Allgemein\nglobal=Global\ngradient=Verlauf\ngradientColor=Farbe\ngrid=Gitternetz\ngridSize=Gitternetzgrösse\ngroup=Gruppieren\nguides=Führungslinien\nheading=Überschrift\nheight=Höhe\nhelp=Hilfe\nhide=Verstecken\nhideIt={1} verstecken\nhidden=Versteckt\nhome=Ursprung\nhorizontal=Horizontal\nhorizontalFlow=Horizontaler Fluss\nhorizontalTree=Horizontaler Baum\nhtml=HTML\nid=ID\nimage=Bild\nimages=Bilder\nimport=Importieren\nincreaseIndent=Einzug vergrössern\ninsert=Einfügen\ninsertColumnBefore=Spalte links einfügen\ninsertColumnAfter=Spalte rechts einfügen\ninsertHorizontalRule=Horizontale Linie einfügen\ninsertImage=Bild einfügen\ninsertLink=Link einfügen\ninsertRowBefore=Zeile oberhalb einfügen\ninsertRowAfter=Zeile unterhalb einfügen\ninvalidName=Ungültiger Name\ninvalidOrMissingFile=Ungültige oder fehlende Datei\nisometric=Isometrisch\nitalic=Kursiv\nlayers=Ebenen\nlandscape=Querformat\nlaneColor=Lane-Farbe\nlayout=Layout\nleft=Links\nleftAlign=Links\nleftToRight=Von links nach rechts\nline=Linie\nlineJumps=Liniensprünge\nlink=Link\nlineend=Linienende\nlineheight=Zeilenhöhe\nlinestart=Linienanfang\nlinewidth=Linienbreite\nloading=Wird geladen\nlockUnlock=Sperren/Entsperren\nmanual=Manuell\nmiddle=Mitte\nmisc=Verschiedenes\nmore=Mehr\nmoreResults=Mehr Resultate\nmove=Verschieben\nmoveSelectionTo=Markierung in {1} einfügen\nnavigation=Navigation\nnew=Neu\nnoColor=Keine Farbe\nnoFiles=Keine Dateien\nnoMoreResults=Keine Weiteren Resultate\nnone=Ohne\nnoResultsFor=Keine Resultate für '{1}'\nnormal=Normal\nnorth=Nord\nnumberedList=Nummerierte Liste\nopacity=Deckkraft\nopen=Öffnen\nopenArrow=Offen\nopenFile=Datei öffnen\nopenLink=Link öffnen\nopenSupported=Unterstützte Formate sind mit dieser Anwendung erstellte .XML Dateien\nopenInNewWindow=In neuem Fenster öffnen\nopenInThisWindow=In diesem Fenster öffnen\noptions=Optionen\norganic=Organisch\northogonal=Orthogonal\noutline=Übersicht\noval=Oval\npages=Seiten\npageView=Seitenansicht\npageScale=Seitenskalierung\npageSetup=Seite einrichten\npanTooltip=Leertaste+Ziehen um zu scrollen\npaperSize=Papiergrösse\npaste=Einfügen\npasteHere=Hier einfügen\npasteSize=Grösse einfügen\npattern=Muster\nperimeter=Umfang\nplaceholders=Platzhalter\nplusTooltip=Klicken zum Verbinden und Klonen (Ctrl-Taste gedrückt halten zum Klonen, Shift+Klick zum Verbinden). Ziehen zum verbinden (Ctrl-Taste gedrückt halten zum Klonen).\nportrait=Hochformat\nposition=Position\nposterPrint=Posterdruck\npreview=Vorschau\nprint=Drucken\nradialTree=Radialer Baum\nredo=Wiederherstellen\nremoveFormat=Formatierung entfernen\nremoveFromGroup=Aus Gruppe entfernen\nremoveIt={1} entfernen\nremoveWaypoint=Wegpunkt entfernen\nrename=Umbenennen\nrenameIt={1} umbenennen\nreplace=Ersetzen\nreplaceIt={1} existiert bereits. Soll die Datei überschrieben werden?\nreplaceExistingDrawing=Vorhandene Zeichnung ersetzen\nreset=Zurücksetzen\nresetView=Ansicht zurücksetzen\nreverse=Umdrehen\nright=Rechts\nrightAlign=Rechts\nrightToLeft=Von rechts nach links\nrotate=Rotieren\nrotateTooltip=Klicken und ziehen um zu rotieren, klicken um nur Form um 90 Grad zu drehen\nrotation=Rotation\nrounded=Abgerundet\nsave=Speichern\nsaveAs=Speichern unter\nsaved=Gespeichert\nscrollbars=Scrollbars\nsearch=Suchen\nsearchShapes=Formen suchen\nselectAll=Alles markieren\nselectEdges=Kanten markieren\nselectFont=Schriftart wählen\nselectNone=Markierung aufheben\nselectVertices=Knoten markieren\nsetAsDefaultStyle=Als Standardstyle festlegen\nshadow=Schatten\nshape=Shape\nsharp=Eckig\nsidebarTooltip=Klicken um zu erweitern. Objekte per Drag & Drop ins Diagramm einfügen. Shift+Klick um die Markierung zu ändern. Alt+Klick zum Einfügen und Verbinden.\nsimple=Einfach\nsimpleArrow=Einfacher Pfeil\nsize=Grösse\nsolid=Durchgehend\nsourceSpacing=Anfangsabstand\nsouth=Süd\nspacing=Abstand\nstraight=Gerade\nstrokeColor=Linienfarbe\nstyle=Style\nsubscript=Tiefgestellt\nsuperscript=Hochgestellt\ntable=Tabelle\ntargetSpacing=Endabstand\ntext=Text\ntextAlignment=Text Ausrichtung\ntextOpacity=Text Deckkraft\ntoBack=Nach hinten\ntoFront=Nach vorne\ntooltips=Tooltips\ntop=Oben\ntopLeft=Oben links\ntopRight=Oben rechts\ntopAlign=Oben\ntransparent=Transparent\nturn=Nur Form um 90° drehen\numl=UML\nunderline=Unterstrichen\nundo=Rückgängig\nungroup=Gruppierung aufheben\nuntitledLayer=Unbenannte Ebene\nurl=URL\nvertical=Vertikal\nverticalFlow=Vertikaler Fluss\nverticalTree=Vertikaler Baum\nview=Ansicht\nwaypoints=Wegpunkte\nwest=West\nwidth=Breite\nwordWrap=Autom. Zeilenumbruch\nwritingDirection=Textrichtung\nzoom=Zoom\nzoomIn=Hineinzoomen\nzoomOut=Herauszoomen\n"
  },
  {
    "path": "static/cherry/drawio_demo/resources/zh.txt",
    "content": "action=Action\nactualSize=实际尺寸\nadd=添加\naddedFile=已添加 {1}\naddImages=添加图片\naddImageUrl=添加图片链接\naddLayer=添加图层\naddProperty=添加属性\naddress=地址\naddToExistingDrawing=添加至当前的图纸\naddWaypoint=添加航点\nadjustTo=调至\nadvanced=高级\nalign=对齐\nalignment=对齐\nallChangesLost=所有修改均将会丢失！\nallPages=所有页面\nallProjects=所有方案\nallSpaces=所有部分\nallTags=所有标签\nanchor=锚\nandroid=Android\nangle=角度\narc=Arc\nareYouSure=您确定吗？\nensureDataSaved=关闭前请确保您的数据已保存。\nallChangesSaved=所有更改均已保存\nallChangesSavedInDrive=所有更改均保存至Google Drive中\nallowPopups=允许弹出式窗口用以阻止此对话框\nallowRelativeUrl=Allow relative URL\nalreadyConnected=节点已连接\napply=应用\narchiMate21=ArchiMate 2.1\narrange=调整图形\narrow=箭头\narrows=箭头\nasNew=作为新图纸\natlas=Atlas\nauthor=作者\nauthorizationRequired=需要授权\nauthorizeThisAppIn=在{1}里授权此应用软件：\nauthorize=授权\nauthorizing=授权中\nautomatic=自动\nautosave=自动保存\nautosize=自动调整\nattachments=附件\naws=AWS\naws3d=AWS 3D\nazure=Azure\nback=Back\nbackground=背景\nbackgroundColor=背景色\nbackgroundImage=背景图\nbasic=基本\nblankDrawing=空白图纸\nblankDiagram=空白图表\nblock=区块\nblockquote=块引用\nblog=博客\nbold=粗体\nbootstrap=Bootstrap\nborder=Border\nborderColor=文本边框\nborderWidth=边框宽度\nbottom=底\nbottomAlign=向下对齐\nbottomLeft=左下\nbottomRight=右下\nbpmn=BPMN\nbrowser=浏览器\nbulletedList=项目符号列表\nbusiness=商务\nbusy=处理中\ncabinets=机箱\ncancel=取消\ncenter=居中\ncannotLoad=载入失败。请稍后重试。\ncannotLogin=登录失败。请稍后重试。\ncannotOpenFile=无法打开文件\nchange=更改\nchangeOrientation=改变方向\nchangeUser=更改用户\nchangeStorage=Change storage\nchangesNotSaved=更改尚未保存\nuserJoined={1}已加入\nuserLeft={1}已离开\nchatWindowTitle=聊天\nchooseAnOption=请选择一项\nchromeApp=Chrome应用软件\ncollaborativeEditingNotice=Important Notice for Collaborative Editing\ncompressed=已压缩\ncommitMessage=提交信息\ncsv=CSV\ndark=Dark\ndraftFound={1}的草图已找到。载入其进行编辑或丢弃以继续。\ndragAndDropNotSupported=暂不支持图片拖放功能。要选择导入选项吗？\ndropboxCharsNotAllowed=系统不允许使用下列字符：\\ / : ? * \" |\ncheck=核查\nchecksum=Checksum\ncircle=圆形\ncisco=思科\nclassic=经典\nclearDefaultStyle=清除默认风格\nclearWaypoints=清除航点\nclipart=剪贴画\nclose=关闭\ncollaborator=合作者\ncollaborators=合作者\ncollapse=收起\ncollapseExpand=收起/展开\ncollapse-expand=点击实现收起/展开\\nShift-点击以移动周边图形 \\nAlt-点击以保护组别尺寸\ncollapsible=可收起\ncomic=手绘\ncomment=评论\ncommentsNotes=评论/备注\ncompress=Compress\nconnect=连接\nconnecting=连接中\nconnectWithDrive=连接Google Drive\nconnection=连接\nconnectionArrows=连接箭头\nconnectionPoints=连接点\nconstrainProportions=限制比例\ncontainsValidationErrors=包含验证错误\ncopiedToClipboard=已复制到剪贴板\ncopy=复制\ncopyConnect=连接时复制\ncopyOf={1}的副本\ncopyOfDrawing=图纸副本\ncopySize=Copy Size\ncopyStyle=复制风格\ncreate=创建\ncreateNewDiagram=创建新图表\ncreateRevision=创建修订版\ncreateShape=创建图形\ncrop=单页导出\ncurved=曲线\ncustom=自定义\ncurrent=当前\ncut=剪切\ndashed=虚线\ndecideLater=稍后再决定\ndefault=默认值\ndelete=删除\ndeleteColumn=删除列\ndeleteLibrary401=没有足够的许可权删除此图库\ndeleteLibrary404=未找到所选图库\ndeleteLibrary500=删除图库时出错\ndeleteLibraryConfirm=您即将永久删除此图库。您确定要这样操作吗？\ndeleteRow=删除行\ndescription=说明\ndevice=电脑或手机设备\ndiagram=图表\ndiagramContent=图表内容\ndiagramLocked=图表已加锁以避免进一步的数据丢失。\ndiagramLockedBySince=The diagram is locked by {1} since {2} ago\ndiagramName=图表名称\ndiagramIsPublic=图表为公开状态\ndiagramIsNotPublic=图表为未公开状态\ndiamond=菱形\ndiamondThin=菱形（细）\ndidYouKnow=您知道吗......\ndirection=方向\ndiscard=丢弃\ndiscardChangesAndReconnect=取消更改并重新连接\ngoogleDriveMissingClickHere=找不到Google Drive？请点击这里！\ndiscardChanges=取消更改\ndisconnected=未连接\ndistribute=等距分布\ndone=完成\ndotted=点线风格\ndoubleClickOrientation=双击以改变方向\ndoubleClickTooltip=双击以插入文字\ndoubleClickChangeProperty=双击以更改属性名\ndownload=下载\ndownloadDesktop=Download draw.io Desktop\ndownloadAs=下载为\nclickHereToSave=点击此处保存。\ndraftDiscarded=草稿已丢弃\ndraftSaved=草稿已保存\ndragElementsHere=把元素拖至此处\ndragImagesHere=把图像或网络链接拖至此处\ndragUrlsHere=把URL地址拖至此处\ndraw.io=draw.io\ndrawing=图纸{1}\ndrawingEmpty=图纸空白\ndrawingTooLarge=图纸过大\ndrawioForWork=Draw.io支持GSuite\ndropbox=Dropbox\nduplicate=复制\nduplicateIt=复制{1}\ndivider=分隔线\ndx=Dx\ndy=Dy\neast=向右\nedit=编辑\neditData=编辑数据\neditDiagram=编辑图表\nxmlImport=xml导入\neditGeometry=编辑几何图形\neditImage=编辑图像\neditImageUrl=编辑图片URL地址\neditLink=编辑链接\neditShape=编辑图形\neditStyle=编辑样式\neditText=编辑文字\neditTooltip=编辑提示\nglass=玻璃效果\ngoogleImages=Google图片\nimageSearch=图片搜索\neip=EIP\nembed=嵌入\nembedImages=嵌入图片\nmainEmbedNotice=将此粘贴至页面上\nelectrical=电路\nellipse=Ellipse\nembedNotice=将此一次性粘贴至本页页尾\nenterGroup=进入组进行编辑\nenterName=输入名称\nenterPropertyName=输入属性名\nenterValue=输入值\nentityRelation=实体关系\nerror=出错\nerrorDeletingFile=删除文件出错\nerrorLoadingFile=加载文件出错\nerrorRenamingFile=文件更名出错\nerrorRenamingFileNotFound=文件更名出错。找不到文件。\nerrorRenamingFileForbidden=文件更名出错。没有足够的访问权限。\nerrorSavingDraft=保存草稿出错\nerrorSavingFile=保存文件出错\nerrorSavingFileUnknown=Google服务器授权出错。请刷新页面，然后重试。\nerrorSavingFileForbidden=保存文件时出错。没有足够的访问权限。\nerrorSavingFileNameConflict=无法保存此图表。当前页面已经包含名为'{1}'的文件。\nerrorSavingFileNotFound=保存文件时出错，文件未找到。\nerrorSavingFileReadOnlyMode=Could not save diagram while read-only mode is active.\nerrorSavingFileSessionTimeout=您的会话已经结束。请<a target='_blank'href='{1}'>{2}</a>，然后返回此标签以尝试再次保存。\nerrorSendingFeedback=发送反馈出错。\nerrorUpdatingPreview=更新预览出错。\nexit=退出\nexitGroup=退出编辑组\nexpand=展开\nexport=导出\nexporting=导出中\nexportAs=导出为\nexportAsPng=导出为png\nexportAsXml=导出为xml\nexportOptionsDisabled=已禁止导出\nexportOptionsDisabledDetails=所有者已禁止评论者及浏览者下载、打印或复制该文件。\nexternalChanges=External Changes\nextras=其它\nfacebook=Facebook\nfailedToSaveTryReconnect=保存失败，正在尝试重新连接\nfeatureRequest=增加功能请求\nfeedback=反馈\nfeedbackSent=反馈发送成功\nfloorplans=平面图\nfile=文件\nfileChangedOverwriteDialog=文件已更改。是否覆盖更改？\nfileChangedSyncDialog=The file has been modified. Do you want to synchronize those changes?\nfileChangedSync=The file has been modified. Click here to synchronize.\noverwrite=覆盖\nsynchronize=Synchronize\nfilename=文件名\nfileExists=文件已存在\nfileNearlyFullSeeFaq=文件即将达到上限，请参阅常见问题一栏\nfileNotFound=未找到文件\nrepositoryNotFound=未找到资源库\nfileNotFoundOrDenied=文件未找到。其不存在或您没有查阅权限。\nfileNotLoaded=文件无法加载\nfileNotSaved=文件无法保存\nfileOpenLocation=你想如何打开这些文件？\nfiletypeHtml=.html causes file to save as HTML with redirect to cloud URL\nfiletypePng=.png causes file to save as PNG with embedded data\nfiletypeSvg=.svg causes file to save as SVG with embedded data\nfileWillBeSavedInAppFolder={1}将保存至应用软件文件夹\nfill=填充\nfillColor=填充色\nfilterCards=Filter Cards\nfind=查找\nfit=适应大小\nfitContainer=调整容器尺寸\nfitIntoContainer=适应容器尺寸\nfitPage=整页显示\nfitPageWidth=适应页面宽度\nfitTo=适应\nfitToSheetsAcross=横向页面\nfitToBy=按\nfitToSheetsDown=纵向页面\nfitTwoPages=双页\nfitWindow=适应视窗大小\nflip=翻转\nflipH=水平翻转\nflipV=垂直翻转\nflowchart=流程图\nfolder=文件夹\nfont=字体\nfontColor=字体颜色\nfontFamily=字体\nfontSize=字体大小\nforbidden=您没有该文件的访问权限\nformat=格式\nformatPanel=格式面板\nformatted=已格式化\nformattedText=已格式化文本\nformatPng=PNG\nformatGif=GIF\nformatJpg=JPEG\nformatPdf=PDF\nformatSql=SQL\nformatSvg=SVG\nformatHtmlEmbedded=HTML\nformatSvgEmbedded=SVG（含XML）\nformatVsdx=VSDX\nformatVssx=VSSX\nformatXmlPlain=XML（普通）\nformatXml=XML\nforum=讨论组/帮助论坛\nfromTemplate=从模板\nfromTemplateUrl=从模板URL地址\nfromText=从文本\nfromUrl=从URL地址\nfromThisPage=从当前页\nfullscreen=全屏\ngap=Gap\ngcp=GCP\ngeneral=通用\ngithub=GitHub\ngliffy=Gliffy\nglobal=全局\ngoogleDocs=Google Docs\ngoogleDrive=Google Drive\ngoogleGadget=Google Gadget\ngooglePlus=Google+\ngoogleSharingNotAvailable=Sharing is only available via Google Drive. Please click Open below and share from the more actions menu:\ngoogleSlides=Google Slides\ngoogleSites=Google Sites\ngradient=渐变\ngradientColor=颜色\ngrid=网格\ngridColor=网格线颜色\ngridSize=网格大小\ngroup=组合\nguides=参考线\nhateApp=我讨厌draw.io\nheading=标题\nheight=高\nhelp=帮助\nhelpTranslate=帮助我们翻译此应用\nhide=隐藏\nhideIt=隐藏{1}\nhidden=已隐藏\nhome=首页\nhorizontal=水平\nhorizontalFlow=水平流动\nhorizontalTree=水平树状\nhowTranslate=按您的母语水平评判，该翻译如何？\nhtml=HTML\nhtmlText=HTML文本\nid=ID\niframe=IFrame\nignore=忽略\nimage=图片\nimageUrl=图片URL地址\nimages=图片\nimagePreviewError=无法预览图片。请检查URL地址。\nimageTooBig=图片太大\nimgur=Imgur\nimport=导入\nimportFrom=从...导入\nincludeCopyOfMyDiagram=包含图表副本\nincreaseIndent=增加缩进\ndecreaseIndent=减少缩进\ninsert=插入\ninsertColumnBefore=左边插入列\ninsertColumnAfter=右边插入列\ninsertEllipse=插入椭圆\ninsertImage=插入图片\ninsertHorizontalRule=插入水平标尺\ninsertLink=插入链接\ninsertPage=插入页面\ninsertRectangle=插入矩形\ninsertRhombus=Insert Rhombus\ninsertRowBefore=上方插入行\ninsertRowAfter=下方插入行\ninsertText=插入文本\ninserting=正在插入\ninvalidFilename=图表名称不能包含以下特殊字符： \\ / | : ; { } < > & + ? = \"\ninvalidLicenseSeeThisPage=您的许可无效，请参阅此<a target=\"_blank\" href=\"https://support.draw.io/display/DFCS/Licensing+your+draw.io+plugin\">页面</a>。\ninvalidName=无效名称\ninvalidOrMissingFile=无效或丢失的文件\ninvalidPublicUrl=无效的公开URL地址\nisometric=等尺寸\nios=iOS\nitalic=斜体\nkennedy=Kennedy\nkeyboardShortcuts=快捷键\nlayers=图层\nlandscape=横向\nlanguage=语言\nleanMapping=价值流图\nlastChange={1}以前最新更改\nlessThanAMinute=一分钟以内\nlicensingError=授权出错\nlicenseHasExpired={1} 的许可证已于 {2} 过期。请点击此处。\nlicenseWillExpire={1} 的许可证将于 {2} 过期。请点击此处。\nlineJumps=Line jumps\nlinkAccountRequired=如果图表未公开，则需要提供谷歌账户才能查看该链接。\nlinkText=链接文本\nlist=列表\nminute=分钟\nminutes=分钟\nhours=小时\ndays=天\nmonths=月\nyears=年\nrestartForChangeRequired=更改将在页面刷新后生效。\nlaneColor=泳道颜色\nlastModified=最近修改\nlayout=布局\nleft=左\nleftAlign=左对齐\nleftToRight=右对齐\nlibraryTooltip=将图形拖放至此或单击+以插入。双击进行编辑。\nlightbox=光箱特效\nline=边框\nlineend=线末端\nlineheight=行距\nlinestart=线始端\nlinewidth=线宽\nlink=链接\nlinks=链接\nloading=加载中\nlockUnlock=加锁/解锁\nloggedOut=登出\nlogIn=登入\nloveIt=我爱{1}\nlucidchart=Lucidchart\nmaps=Maps\nmathematicalTypesetting=数学排版\nmakeCopy=创建副本\nmanual=手册\nmicrosoftExcel=Microsoft Excel\nmicrosoftPowerPoint=Microsoft PowerPoint\nmicrosoftWord=Microsoft Word\nmiddle=垂直居中\nminimal=Minimal\nmisc=杂项\nmockups=实体模型\nmodificationDate=修改日期\nmodifiedBy=修改者\nmore=更多\nmoreResults=更多结果\nmoreShapes=更多图形\nmove=移动\nmoveToFolder=移动至文件夹\nmoving=移动中\nmoveSelectionTo=将所选移至{1}\nname=名称\nnavigation=导航\nnetwork=Network\nnetworking=网络\nnew=新增\nnewLibrary=新增图库\nnextPage=下一页\nno=没有\nnoPickFolder=No, pick folder\nnoAttachments=未找到附件\nnoColor=无颜色\nnoFiles=无文件\nnoFileSelected=未选择文件\nnoLibraries=未找到图库\nnoMoreResults=无其他结果\nnone=无\nnoOtherViewers=无其他查阅者\nnoPlugins=无插件\nnoPreview=无预览\nnoResponse=服务器无响应\nnoResultsFor=未找到'{1}'的相关结果\nnoRevisions=无修订\nnoSearchResults=查询无结果\nnoPageContentOrNotSaved=此页面上找不到锚点，或尚未保存\nnormal=正常\nnorth=向上\nnotADiagramFile=非图表文件\nnotALibraryFile=非图库文件\nnotAvailable=不可用\nnotAUtf8File=非 UTF-8 格式文件\nnotConnected=未连接\nnote=备注\nnotUsingService=未使用{1}?\nnumberedList=编号列表\noffline=离线\nok=确定\noneDrive=OneDrive\nonline=线上\nopacity=不透明度\nopen=打开\nopenArrow=开放的箭头\nopenExistingDiagram=打开现有图表\nopenFile=打开文件\nopenFrom=从...打开\nopenLibrary=打开图库\nopenLibraryFrom=从...打开图库\nopenLink=打开链接\nopenInNewWindow=在新窗口打开\nopenInThisWindow=在当前窗口打开\nopenIt=打开{1}\nopenRecent=打开最近使用的文件\nopenSupported=此软件支持的格式为从本软件(.xml), .vsdx 及 .gliffy存储的文件\noptions=选项\norganic=力导向布局图\northogonal=正交\notherViewer=其他查阅者\notherViewers=其他查阅者\noutline=缩略图\noval=椭圆形\npage=页面\npageContent=页面内容\npageNotFound=未找到页面\npageWithNumber=第 {1} 页\npages=页面\npageView=页面视图\npageSetup=页面设置\npageScale=页面比例\npan=移动画布\npanTooltip=按住空格键并拖拽以移动画布\npaperSize=页面尺寸\npattern=样式\npaste=粘贴\npasteHere=贴于此处\npasteSize=Paste Size\npasteStyle=粘贴样式\nperimeter=周长\npermissionAnyone=任何人均可编辑\npermissionAuthor=只有本人可编辑\npickFolder=选择文件夹\npickLibraryDialogTitle=选择图库\npublicDiagramUrl=图表的公共URL地址\nplaceholders=占位符\nplantUml=PlantUML\nplugins=插件\npluginUrl=插件URL地址\npluginWarning=本页面已要求载入以下插件：\\n \\n {1}\\n \\n 是否现在载入这些插件？\\n \\n 备注：确保在完全理解与此相关的安全问题的情况下再允许这些插件运行。\\n\nplusTooltip=单击进行连接与复制（ctrl+单击进行复制，shift+单击进行连接）。拖拽进行连接（xtrl+拖拽进行复制）。\nportrait=竖向\nposition=位置\nposterPrint=海报样式\npreferences=喜好\npreview=预览\npreviousPage=上一页\nprint=打印\nprintAllPages=打印所有页\nprocEng=工艺流程\nproject=方案\npriority=优先级\nproperties=属性\npublish=发布\nquickStart=快速入门视频\nrack=机架\nradialTree=径向树\nreadOnly=只读\nreconnecting=重新连接\nrecentlyUpdated=最近更新\nrecentlyViewed=最近阅览\nrectangle=Rectangle\nredirectToNewApp=该文件是在此应用软件的新版本中所创建或修改的。正在重新定向。\nrealtimeTimeout=似乎您在离线状态下做过更改。对不起，这些更改不予保存。\nredo=重做\nrefresh=刷新\nregularExpression=正则表达式\nrelative=Relative\nrelativeUrlNotAllowed=Relative URL not allowed\nrememberMe=记住我\nrememberThisSetting=记住此设置\nremoveFormat=清除格式\nremoveFromGroup=移出组\nremoveIt=删除{1}\nremoveWaypoint=删除航点\nrename=重命名\nrenamed=已重命名\nrenameIt=重命名{1}\nrenaming=正在重命名\nreplace=替换\nreplaceIt={1}已经存在了。要替换它吗？\nreplaceExistingDrawing=替换当前图形\nrequired=必填\nreset=重置\nresetView=重置视图\nresize=调整大小\nresizeLargeImages=Do you want to resize large images to make the application run faster?\nretina=Retina\nresponsive=响应式\nrestore=恢复\nrestoring=恢复中\nretryingIn={1}秒后重试\nretryingLoad=载入失败，正在重试...\nretryingLogin=登录超时，正在重试...\nreverse=翻转\nrevision=修订\nrevisionHistory=修订历史\nrhombus=Rhombus\nright=右\nrightAlign=右对齐\nrightToLeft=从右至左\nrotate=旋转\nrotateTooltip=点选拖拽旋转，或点击选择90度\nrotation=旋转\nrounded=圆角\nsave=保存\nsaveAndExit=储存并退出\nsaveAs=另存为\nsaveAsXmlFile=另存为XML文件？\nsaved=已保存\nsaveDiagramsTo=把图表存至\nsaveLibrary403=没有足够的权限编辑此图库\nsaveLibrary500=保存图库时出错\nsaving=保存中\nscratchpad=便笺本\nscrollbars=滚动条\nsearch=搜索\nsearchShapes=搜索图形\nselectAll=全选\nselectionOnly=仅所选内容\nselectCard=Select Card\nselectEdges=选择边线\nselectFile=选择文件\nselectFolder=选择文件夹\nselectFont=选择字体\nselectNone=全不选\nselectTemplate=Select Template\nselectVertices=选择顶点\nsendMessage=发送\nsendYourFeedbackToDrawIo=将您的反馈发送至draw.io\nserviceUnavailableOrBlocked=服务无法使用或已被屏蔽\nsessionExpired=会话已过期，请刷新浏览器窗口。\nsessionTimeoutOnSave=会话已超时，您的Google Drive的连接已断开。按OK键登录并保存。\nsetAsDefaultStyle=设置为默认样式\nshadow=阴影\nshape=形状\nshapes=形状\nshare=共享\nshareLink=共享编辑的链接\nsharp=尖角\nshow=显示\nshowStartScreen=显示开始画面\nsidebarTooltip=单击以展开。将图形拖拽至图表中。Shift+单击以改变所选内容。Alt+单击以插入及连接。\nsigns=标识\nsignOut=登出\nsimple=简单\nsimpleArrow=简单箭头\nsimpleViewer=Simple Viewer\nsize=大小\nsolid=实线\nsourceSpacing=源距\nsouth=向下\nsoftware=软件\nspace=空间\nspacing=间距\nspecialLink=特殊链接\nstandard=标准\nstarting=开启中\nstraight=直线\nstrikethrough=Strikethrough\nstrokeColor=线条颜色\nstyle=样式\nsubscript=下标\nsummary=概要\nsuperscript=上标\nsupport=支持\nsysml=SysML\ntags=标签\ntable=表格\ntables=Tables\ntakeOver=Take Over\ntargetSpacing=目标间距\ntemplate=模板\ntemplates=模板\ntext=文本\ntextAlignment=文本对齐\ntextOpacity=字体不透明度\ntheme=主题\ntimeout=超时\ntitle=标题\nto=至\ntoBack=移至最后\ntoFront=移至最前\ntoolbar=Toolbar\ntooltips=提示\ntop=顶\ntopAlign=向上对齐\ntopLeft=左上\ntopRight=右上\ntransparent=透明\ntransparentBackground=透明背景\ntrello=Trello\ntryAgain=重试\ntryOpeningViaThisPage=尝试通过此页面开启\nturn=旋转90°\ntype=类型\ntwitter=Twitter\numl=UML\nunderline=下划线\nundo=取消操作\nungroup=取消群组\nunsavedChanges=未保存的更改\nunsavedChangesClickHereToSave=修改未保存。点击此处保存。\nuntitled=未命名\nuntitledDiagram=未命名表单\nuntitledLayer=未命名图层\nuntitledLibrary=未命名图库\nunknownError=未知错误\nupdateFile=更新{1}\nupdatingDocument=文件更新中。请稍候...\nupdatingPreview=预览更新中。请稍候...\nupdatingSelection=选择更新中。请稍候...\nupload=上传\nurl=URL地址\nuseOffline=Use Offline\nuseRootFolder=Use root folder?\nuserManual=用户手册\nvertical=垂直\nverticalFlow=垂直流\nverticalTree=垂直树状\nview=查看\nviewerSettings=Viewer Settings\nviewUrl=用于查看的链接：{1}\nvoiceAssistant=语音助手（测试版）\nwarning=警告\nwaypoints=航点\nwest=向左\nwidth=宽度\nwiki=Wiki\nwordWrap=自动换行\nwritingDirection=书写方向\nyes=是\nyourEmailAddress=您的电子邮件地址\nzoom=缩放\nzoomIn=放大\nzoomOut=缩小\nbasic=基本图形\nbusinessprocess=业务流程图\ncharts=图表\nengineering=工程图\nflowcharts=流程图\ngmdl=材料设计\nmindmaps=思维导图\nmockups=模型图\nnetworkdiagrams=网络结构图\nnothingIsSelected=未选择\nother=其他\nsoftwaredesign=软件设计图\nvenndiagrams=文氏图\nwebEmailOrOther=网站、电邮或其他网络地址\nwebLink=Web链接\nwireframes=线框图"
  },
  {
    "path": "static/cherry/drawio_demo/src/css/common.css",
    "content": "div.mxRubberband {\n\tposition: absolute;\n\toverflow: hidden;\n\tborder-style: solid;\n\tborder-width: 1px;\n\tborder-color: #0000FF;\n\tbackground: #0077FF;\n}\n.mxCellEditor {\n\tbackground: url(data:image/gif;base64,R0lGODlhMAAwAIAAAP///wAAACH5BAEAAAAALAAAAAAwADAAAAIxhI+py+0Po5y02ouz3rz7D4biSJbmiabqyrbuC8fyTNf2jef6zvf+DwwKh8Si8egpAAA7);\n\t_background: url('../images/transparent.gif');\n\tborder-color: transparent;\n\tborder-style: solid;\n\tdisplay: inline-block;\n\tposition: absolute;\n\toverflow: visible;\n\tword-wrap: normal;\n\tborder-width: 0;\n\tmin-width: 1px;\n\tresize: none;\n\tpadding: 0px;\n\tmargin: 0px;\n}\n.mxPlainTextEditor * {\n\tpadding: 0px;\n\tmargin: 0px;\n}\ndiv.mxWindow {\n\t-webkit-box-shadow: 3px 3px 12px #C0C0C0;\n\t-moz-box-shadow: 3px 3px 12px #C0C0C0;\n\tbox-shadow: 3px 3px 12px #C0C0C0;\n\tbackground: url('../images/window.gif');\n\tborder:1px solid #c3c3c3;\n\tposition: absolute;\n\toverflow: hidden;\n\tz-index: 1;\n}\ntable.mxWindow {\n\tborder-collapse: collapse;\n\ttable-layout: fixed;\n  \tfont-family: Arial;\n\tfont-size: 8pt;\n}\ntd.mxWindowTitle {\n\tbackground: url('../images/window-title.gif') repeat-x;\n\ttext-overflow: ellipsis;\n\twhite-space: nowrap;\n \ttext-align: center;\n \tfont-weight: bold;\n \toverflow: hidden;\n\theight: 13px;\n\tpadding: 2px;\n \tpadding-top: 4px;\n \tpadding-bottom: 6px;\n \tcolor: black;\n}\ntd.mxWindowPane {\n\tvertical-align: top;\n\tpadding: 0px;\n}\ndiv.mxWindowPane {\n\toverflow: hidden;\n\tposition: relative;\n}\ntd.mxWindowPane td {\n  \tfont-family: Arial;\n\tfont-size: 8pt;\n}\ntd.mxWindowPane input, td.mxWindowPane select, td.mxWindowPane textarea, td.mxWindowPane radio {\n  \tborder-color: #8C8C8C;\n  \tborder-style: solid;\n  \tborder-width: 1px;\n  \tfont-family: Arial;\n\tfont-size: 8pt;\n \tpadding: 1px;\n}\ntd.mxWindowPane button {\n\tbackground: url('../images/button.gif') repeat-x;\n  \tfont-family: Arial;\n  \tfont-size: 8pt;\n  \tpadding: 2px;\n\tfloat: left;\n}\nimg.mxToolbarItem {\n\tmargin-right: 6px;\n\tmargin-bottom: 6px;\n\tborder-width: 1px;\n}\nselect.mxToolbarCombo {\n\tvertical-align: top;\n\tborder-style: inset;\n\tborder-width: 2px;\n}\ndiv.mxToolbarComboContainer {\n\tpadding: 2px;\n}\nimg.mxToolbarMode {\n\tmargin: 2px;\n\tmargin-right: 4px;\n\tmargin-bottom: 4px;\n\tborder-width: 0px;\n}\nimg.mxToolbarModeSelected {\n\tmargin: 0px;\n\tmargin-right: 2px;\n\tmargin-bottom: 2px;\n\tborder-width: 2px;\n\tborder-style: inset;\n}\ndiv.mxTooltip {\n\t-webkit-box-shadow: 3px 3px 12px #C0C0C0;\n\t-moz-box-shadow: 3px 3px 12px #C0C0C0;\n\tbox-shadow: 3px 3px 12px #C0C0C0;\n\tbackground: #FFFFCC;\n\tborder-style: solid;\n\tborder-width: 1px;\n\tborder-color: black;\n\tfont-family: Arial;\n\tfont-size: 8pt;\n\tposition: absolute;\n\tcursor: default;\n\tpadding: 4px;\n\tcolor: black;\n}\ndiv.mxPopupMenu {\n\t-webkit-box-shadow: 3px 3px 12px #C0C0C0;\n\t-moz-box-shadow: 3px 3px 12px #C0C0C0;\n\tbox-shadow: 3px 3px 12px #C0C0C0;\n\tbackground: url('../images/window.gif');\n\tposition: absolute;\n\tborder-style: solid;\n\tborder-width: 1px;\n\tborder-color: black;\n}\ntable.mxPopupMenu {\n\tborder-collapse: collapse;\n\tmargin-top: 1px;\n\tmargin-bottom: 1px;\n}\ntr.mxPopupMenuItem {\n\tcolor: black;\n\tcursor: pointer;\n}\ntr.mxPopupMenuItemHover {\n\tbackground-color: #000066;\n\tcolor: #FFFFFF;\n\tcursor: pointer;\n}\ntd.mxPopupMenuItem {\n\tpadding: 2px 30px 2px 10px;\n\twhite-space: nowrap;\n\tfont-family: Arial;\n\tfont-size: 8pt;\n}\ntd.mxPopupMenuIcon {\n\tbackground-color: #D0D0D0;\n\tpadding: 2px 4px 2px 4px;\n}\n.mxDisabled {\n\topacity: 0.2 !important;\n\tcursor:default !important;\n}\n"
  },
  {
    "path": "static/cherry/drawio_demo/src/css/explorer.css",
    "content": "div.mxTooltip {\n\tfilter:progid:DXImageTransform.Microsoft.DropShadow(OffX=4, OffY=4, \n        Color='#A2A2A2', Positive='true');\n}\ndiv.mxPopupMenu {\n\tfilter:progid:DXImageTransform.Microsoft.DropShadow(OffX=4, OffY=4, \n        Color='#C0C0C0', Positive='true');\n}\ndiv.mxWindow {\n\t_filter:progid:DXImageTransform.Microsoft.DropShadow(OffX=4, OffY=4, \n        Color='#C0C0C0', Positive='true');\n}\ntd.mxWindowTitle {\n\t_height: 23px;\n}\n.mxDisabled {\n\tfilter:alpha(opacity=20) !important;\n}\n"
  },
  {
    "path": "static/cherry/drawio_demo/src/grapheditor.less",
    "content": "@iconfont-path : '../../../';\n@import '../../../iconfont/graph.iconfont.less';\n\n.msgbox {\n\tz-index: 100;\n}\n\n.geEditor {\n\tfont-family: Helvetica Neue, Helvetica, Arial Unicode MS, Arial;\n\tfont-size: 10pt;\n\tborder: none;\n\tmargin: 0px;\n}\n\n.geEditor input[type=text]::-ms-clear {\n\tdisplay: none;\n}\n\n.geItem,\n.geToolbar .geButton,\n.geToolbar .geLabel,\n.geSidebarContainer .geTitle {\n\tcursor: pointer !important;\n}\n\n.geBackgroundPage {\n\t-webkit-box-shadow: 0px 0px 3px 0px #d9d9d9;\n\t-moz-box-shadow: 0px 0px 3px 0px #d9d9d9;\n\tbox-shadow: 0px 0px 3px 0px #d9d9d9;\n}\n\n.geSidebarContainer a,\na,\n.geToolbar a {\n\tcolor: #182b50;\n\ttext-decoration: none;\n}\n\n.geMenubarContainer,\n.geToolbarContainer,\n.geDiagramContainer,\n.geSidebarContainer,\n.geFooterContainer,\n.geHsplit,\n.geVsplit {\n\toverflow: hidden;\n\tposition: absolute;\n\tcursor: default;\n}\n.geMenubarContainer {\n\tbackground-color:#fbfbfb !important;\n\theight: 32px;\n}\n.geFormatContainer {\n\tbackground-color: whiteSmoke !important;\n\toverflow-x: hidden !important;\n\toverflow-y: auto !important;\n\tfont-size: 12px;\n}\ndiv.geFormatContainer .geColorBtn.geButton>.geSprite{\n\tpadding-left: 2.5px;\n\tpadding-top: 1.5px;\n}\ndiv.geFormatContainer  button{\n\tbackground-color: #f3f4f6;\n\tcolor:#3582fb;\n\tborder: 1px solid #e8eaee;\n\theight: 30px;\n}\ndiv.geFormatContainer button{\n\tbackground: #f3f4f6;\n}\ndiv.geFormatContainer input{\n\tborder-top: 1px solid #e8eaee;\n\tborder-bottom: 1px solid #e8eaee;\n\tborder-left: 1px solid #e8eaee;\n\tcolor: #8c95a8;\n}\ndiv.geFormatContainer {\n\tspan{\n    position: absolute;\n\t\tmargin-top: -2px;\n\t}\n\tinput[value=\"landscape\"]{\n\t\tmargin-left: 35px!important;\n\t}\n\tdiv[style=\"margin-left: 4px; width: 210px; height: 24px;\"]{\n\t\tspan{\n\t\t\tmargin-top: 1px;\n\t\t}\n\t}\n}\ndiv[style=\"right: 0px; z-index: 1; top: 35px; width: 240px; bottom: 28px;\"]{\n\tbackground: #fff!important;\n}\nbutton[title=\"Copy Size (Alt+Shit+X)\"]{\n\tbackground: red;\n}\ndiv[style=\"display: inline; z-index: 10006; left: 898px; top: 130px;\"],div[style=\"display: inline; z-index: 10006; left: 77.6719px; top: 29px;\"],div[style=\"display: inline; z-index: 10006; left: 1696px; top: 130px;\"],div[style=\"display: inline; z-index: 10006; left: 898px; top: 158px;\"]{\n\ttable.mxPopupMenu{\n\t\ttr:nth-last-child(1){\n\t\t\tdisplay: none\n\t\t}\n\t\ttr:nth-last-child(2){\n\t\t\tdisplay: none\n\t\t}\n\t}\n\t\n}\n.geDiagramContainer::-webkit-scrollbar {\n\twidth: 6px;\n\theight: 6px;\n}\n\n.geDiagramContainer::-webkit-scrollbar-thumb {\n\tborder-radius: 10px;\n\tbackground: #bac0cb;\n}\n\n.geDiagramContainer::-webkit-scrollbar-track {\n\tborder-radius: 10px;\n\tbackground: #fff\n}\ndiv[style=\"text-align: center; font-weight: bold; overflow: hidden; display: inline-block; padding-top: 8px; height: 25px; width: 100%;\"]{\n\ttext-indent: 18px;\n\tfont-size: 14px;\n\ttext-align: left!important;\n}\ndiv.geToolbar{\n\ta[title=\"字体\"]{\n\t\tdiv{\n\t\t\tmargin-top: 2px\n\t\t}\n\t}\n\ta[title=\"插入\"]{\n\t\tdiv{\n\t\t\tmargin-top: -1px!important;\n\t\t}\n\t}\n}\ndiv[style=\"white-space: nowrap; color: rgb(63, 74, 86); text-align: left; cursor: default; border-bottom: none;\"]{\n\tdiv[style=\"padding: 2px 0px 4px 18px; border-bottom: 1px solid rgb(223, 230, 238);\"]{\n\t\tdiv{\n\t\t\tmargin: 5px 0;\n\t\t}\n\t}\n}\ndiv[tietle=\"自动调整 (Ctrl+Shift+Y)\"]{\n\tmargin-top: -1px;\n}\ndiv[style=\"border: 20px; position: absolute; margin-top: 2px; right: 20px;\"]{\n\tdiv.geBtnUp,div.geBtnDown{\n\t\twidth: 12px;\n\t\theight: 12px;\n\t}\n}\nbutton[title=\"设置为默认样式 (Ctrl+Shift+D)\"]{\n\tdisplay: none;\n}\ndiv[style=\"padding: 10px 0px 10px 18px; border-bottom: 1px solid rgb(223, 230, 238);\"]{\n\tbutton{\n\t\tcursor: pointer;\n\t}\n}\nbutton[style=\"line-height: normal; margin-top: 4px; margin-bottom: 8px;\"]{\n\tline-height: normal;\n\tmargin-top: 20px;\n\tmargin-bottom: 8px;\n\theight: 30px;\n\twidth: 120px;\n\tfont-size: 12px;\n\tbackground-color: #f3f4f6;\n\tcolor: #3582fb;\n\tborder: 1px solid #e8eaee;\n\tcursor: pointer;\n}\n// div[style=\"white-space: nowrap; color: rgb(63, 74, 86); text-align: left; cursor: default;\"]{\n// \ta[class=\"geButton geColorBtn\"]{\n// \t\tposition: relative;\n//     width: 50px!important;\n// \t\tdiv:first-child{\n// \t\t\tposition: absolute;\n// \t\t\tleft: 0;\n// \t\t}\n// \t\tdiv:last-child{\n// \t\t\tposition: absolute;\n// \t\t\tright: 0;\n// \t\t}\n\t\t\n// \t}\n// }\ndiv[class=\"geSidebarContainer geFormatContainer\"]{\n\tbutton{\n\t\tcursor: pointer;\n\t}\n}\n.geDiagramContainer {\n\tbackground-color: #ebebeb;\n\tborder: 1px solid #e5e5e5;\n\tfont-size: 0px;\n\toutline: none;\n\tmin-width: 100px;\n\ttable{\n\t\tmin-width: 100px;\n\t}\n}\n\n.geMenubar,\n.geToolbar {\n\twhite-space: nowrap;\n\tdisplay: block;\n\twidth: 100%;\n}\n\n.geItem,\n.geToolbar .geButton,\n.geToolbar .geLabel,\n.geSidebar,\n.geSidebarContainer .geTitle,\n.geSidebar .geItem,\n.mxPopupMenuItem {\n\t-webkit-transition: all 0.1s ease-in-out;\n\t-moz-transition: all 0.1s ease-in-out;\n\t-o-transition: all 0.1s ease-in-out;\n\t-ms-transition: all 0.1s ease-in-out;\n\ttransition: all 0.1s ease-in-out;\n}\n\n.geHint {\n\tbackground-color: #ffffff;\n\tborder: 1px solid gray;\n\tpadding: 4px 16px 4px 16px;\n\tborder-radius: 3px;\n\t-webkit-box-shadow: 1px 1px 2px 0px #ddd;\n\t-moz-box-shadow: 1px 1px 2px 0px #ddd;\n\tbox-shadow: 1px 1px 2px 0px #ddd;\n\topacity: 0.8;\n\tfilter: alpha(opacity=80);\n\tfont-size: 9pt;\n}\n\n.geStatusAlert {\n\twhite-space: nowrap;\n\tmargin-top: -5px;\n\tfont-size: 12px;\n\tpadding: 4px 6px 4px 6px;\n\tbackground-color: #f2dede;\n\tborder: 1px solid #ebccd1;\n\tcolor: #a94442 !important;\n\tborder-radius: 3px;\n}\n\n.geStatusAlert:hover {\n\tbackground-color: #f1d8d8;\n\tborder-color: #d6b2b8;\n}\n\n.geStatusMessage {\n\twhite-space: nowrap;\n\tmargin-top: -5px;\n\tpadding: 4px 6px 4px 6px;\n\tfont-size: 12px;\n\tbackground-image: -webkit-linear-gradient(top, #dff0d8 0, #c8e5bc 100%);\n\tbackground-image: -o-linear-gradient(top, #dff0d8 0, #c8e5bc 100%);\n\tbackground-image: -webkit-gradient(linear, left top, left bottom, from(#dff0d8), to(#c8e5bc));\n\tbackground-image: linear-gradient(to bottom, #dff0d8 0, #c8e5bc 100%);\n\tfilter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8', endColorstr='#ffc8e5bc', GradientType=0);\n\tbackground-repeat: repeat-x;\n\tborder: 1px solid #b2dba1;\n\tborder-radius: 3px;\n\tcolor: #3c763d !important;\n}\n\n.geStatusMessage:hover {\n\tbackground: #c8e5bc;\n\tborder-color: #b2dba1;\n}\n\n.geAlert {\n\tposition: absolute;\n\twhite-space: nowrap;\n\tpadding: 14px;\n\tbackground-color: #f2dede;\n\tborder: 1px solid #ebccd1;\n\tcolor: #a94442;\n\tborder-radius: 3px;\n\t-webkit-box-shadow: 2px 2px 3px 0px #ddd;\n\t-moz-box-shadow: 2px 2px 3px 0px #ddd;\n\tbox-shadow: 2px 2px 3px 0px #ddd;\n}\n\n.geBtn,\n.mxWindow .geBtn {\n\tbackground-image: none;\n\tbackground-color: #fff;\n\tborder-radius: 2px;\n\tborder: 1px solid #d8d8d8;\n\tcolor: #333;\n\tfont-size: 11px;\n\tfont-weight: bold;\n\theight: 29px;\n\tline-height: 27px;\n\tmargin: 0 0 0 8px;\n\tmin-width: 72px;\n\toutline: 0;\n\tpadding: 0 8px;\n\tcursor: pointer;\n}\n\n.geBtn:hover,\n.geBtn:focus {\n\t-webkit-box-shadow: 0px 1px 1px rgba(0, 0, 0, 0.1);\n\t-moz-box-shadow: 0px 1px 1px rgba(0, 0, 0, 0.1);\n\tbox-shadow: 0px 1px 1px rgba(0, 0, 0, 0.1);\n\tborder: 1px solid #c6c6c6;\n\tbackground-color: #f3f4f6;\n\tbackground-image: linear-gradient(#f3f4f6 0px, #f1f1f1 100%);\n\tcolor: #111;\n}\n\n.geBtn:disabled {\n\topacity: .5;\n}\n\n.geBtnUp {//上箭头\n\tbackground-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAGCAYAAAD68A/GAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyZpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTQ1IDc5LjE2MzQ5OSwgMjAxOC8wOC8xMy0xNjo0MDoyMiAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTkgKFdpbmRvd3MpIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOkQ2RDQyMEMzQkYzQzExRTlCNzY1RkIxNzk1N0NBRTIxIiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOkQ2RDQyMEM0QkYzQzExRTlCNzY1RkIxNzk1N0NBRTIxIj4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6RDZENDIwQzFCRjNDMTFFOUI3NjVGQjE3OTU3Q0FFMjEiIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6RDZENDIwQzJCRjNDMTFFOUI3NjVGQjE3OTU3Q0FFMjEiLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz5GWB76AAAAS0lEQVR42mL8//8/AzGABcbYuPsYjNkKpatBhL+rFapCKAgA4ioo+zQQb4BJMCEpUgfiRUj8RVAxDIXrgJgXic8LFQMDRmI9AxBgAHIsD1ZPQxaeAAAAAElFTkSuQmCC);\n\tbackground-position: center center;\n\tbackground-repeat: no-repeat;\n}\n\n.geBtnUp:active {\n\tbackground-color: #4d90fe;\n\tbackground-image: linear-gradient(#4d90fe 0px, #357ae8 100%);\n}\n\n.geBtnDown {//下箭头\n\tbackground-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAGCAYAAAD68A/GAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyZpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTQ1IDc5LjE2MzQ5OSwgMjAxOC8wOC8xMy0xNjo0MDoyMiAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTkgKFdpbmRvd3MpIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOkM1RjQ1RDYzQkYzQzExRTk5QUUxOTk1NzhDMkFFNTkzIiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOkM1RjQ1RDY0QkYzQzExRTk5QUUxOTk1NzhDMkFFNTkzIj4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6QzVGNDVENjFCRjNDMTFFOTlBRTE5OTU3OEMyQUU1OTMiIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6QzVGNDVENjJCRjNDMTFFOTlBRTE5OTU3OEMyQUU1OTMiLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz51P1COAAAASklEQVR42mL8//8/AzGABcbYuPvYVSClhSZ/zd/VShvEYEISDALiz0j8z1AxBnSFN4E4DokfBxVDtRoKNgBxGxIbDhiJ9QxAgAEAyjMR5zuovT4AAAAASUVORK5CYII=);\n\tbackground-position: center center;\n\tbackground-repeat: no-repeat;\n}\n\n.geBtnDown:active {\n\tbackground-color: #4d90fe;\n\tbackground-image: linear-gradient(#4d90fe 0px, #357ae8 100%);\n}\n\n.geColorBtn {\n\tbackground-color: #f3f4f6!important;\n\tborder-radius: 4px;\n\tborder: 1px solid rgba(0, 0, 0, 0.5);\n\tcolor: #333;\n\tmargin: 0px;\n\toutline: 0;\n\tpadding: 0px;\n\tcursor: pointer;\n}\ndiv.geToolbarContainer{\n\ta[class=\"geButton geColorBtn\"]:hover {\n\t\tbackground-color: #eaf2ff!important;\n\t\tcolor: #3582fb;\n\t}\n\t.geColorBtn:checked {\n\t\tbackground-color: #3582fb!important;\n\t}\n\n\ta[class=\"geButton geColorBtn\"]:active {\n\t\tbackground-color: #3582fb!important;\n\t}\n\n\t.geColorBtn:disabled {\n\t\topacity: .5;\n\t}\n}\n\n\n.gePrimaryBtn,\n.mxWindow .gePrimaryBtn {\n\tbackground-color: #3582fb;\n\tbackground-image: linear-gradient(#3582fb 0px, #3582fb 100%);\n\tborder: 1px solid #3582fb;\n\tcolor: #fff;\n\tfont-weight: normal;\n}\n\n.gePrimaryBtn:hover,\n.gePrimaryBtn:focus {\n\tbackground-color: #5d9bfc;\n\tbackground-image: linear-gradient(#5d9bfc 0px, #5d9bfc 100%);\n\tborder: 1px solid #5d9bfc;\n\tcolor: #fff;\n\tfont-weight: normal;\n}\n\n.gePrimaryBtn:disabled {\n\topacity: .5;\n}\n\n.geAlertLink {\n\tcolor: #843534;\n\tfont-weight: 700;\n\ttext-decoration: none;\n}\n\n.geMenubar {\n\tpadding: 0px 2px 0px 2px;\n\tvertical-align: middle;\n}\n\n.geItem,\n.geToolbar .geItem {\n\tpadding: 6px 8px 6px 8px;\n\tcursor: default;\n}\n\n.geItem:hover {\n\tbackground: #eeeeee;\n}\n\n.mxDisabled:hover {\n\tbackground: inherit !important;\n}\n\n.geMenubar a.geStatus {\n\tcolor: #b3b3b3;\n\tpadding-left: 6px;\n\tdisplay: inline-block;\n\tcursor: default !important;\n}\n\n.geMenubar a.geStatus:hover {\n\tbackground: transparent;\n}\n\n.geMenubarMenu {\n\tborder: 1px solid #d5d5d5 !important;\n}\n\n.geToolbarContainer {\n\tbackground: #fff!important;\n\tborder-bottom: 1px solid #e0e0e0;\n}\n\n.geSidebarContainer .geToolbarContainer {\n\tbackground: transparent;\n\tborder-bottom: none;\n}\n\n.geSidebarContainer button {\n\ttext-overflow: ellipsis;\n\toverflow: hidden;\n}\n\n.geToolbar {\n\tpadding: 1px 0px 0px 6px;\n\tborder-top: 1px solid #e0e0e0;\n\t-webkit-box-shadow: inset 0 1px 0 0 #fff;\n\t-moz-box-shadow: inset 0 1px 0 0 #fff;\n\tbox-shadow: inset 0 1px 0 0 #fff;\n}\n\n.geToolbarContainer .geSeparator {\n\tfloat: left;\n\twidth: 1px;\n\theight: 40px;\n\tbackground: #e5e5e5;\n\tmargin-left: 6px;\n\tmargin-right: 6px;\n\tmargin-top: -2px;\n}\n\n.geToolbarContainer .geButton {\n\tfloat: left;\n\twidth: 20px;\n\theight: 20px;\n\tpadding: 5px 0px 3px 6px;\n\tmargin: 2px;\n\tborder: 1px solid transparent;\n\tcursor: pointer;\n\topacity: 0.6;\n\tfilter: alpha(opacity=60);\n}\n\n.geToolbarContainer .geButton:hover {\n\tborder-radius: 2px;\n\topacity: 1;\n\tfilter: none !important;\n}\n\n.geToolbarContainer .geButton:active {\n\tborder: 1px solid black;\n}\n\ndiv.mxWindow .geButton {\n\tmargin: -1px 2px 2px 2px;\n\tpadding: 1px 2px 2px 1px;\n}\n\n.geToolbarContainer .geLabel {\n\tfloat: left;\n\tcursor: pointer;\n\t// padding:7px 5px 3px 6px;\n\tpadding: 2px 5px 0px 6px;\n\tborder: 1px solid transparent;\n\topacity: 0.6;\n\tfilter: alpha(opacity=60);\n\tmargin: 2px;\n\tmargin-top: 3px;\n}\n\n.geToolbarContainer .geLabel:hover {\n\tborder: 1px solid gray;\n\tborder-radius: 2px;\n\topacity: 0.9;\n\tfilter: alpha(opacity=90) !important;\n}\n\n.geToolbarContainer .geLabel:active {\n\tborder: 1px solid black;\n\topacity: 1;\n\tfilter: none !important;\n}\n\n.geToolbarContainer .mxDisabled:hover {\n\tborder: 1px solid transparent !important;\n\topacity: 0.2 !important;\n\tfilter: alpha(opacity=20) !important;\n}\n\n.geToolbarMenu {\n\tborder: 1px solid #DFDFDF !important;\n\t-webkit-box-shadow: none !important;\n\t-moz-box-shadow: none !important;\n\tbox-shadow: #DFDFDF 5px 5px 10px 1px !important;\n\tfilter: none !important;\n}\n\n.geDiagramBackdrop {\n\tbackground-color: #ebebeb;\n}\n\n.geSidebarContainer {\n\tbackground: #ffffff;\n\toverflow: hidden;\n\tposition: absolute;\n\tborder-top: 1px solid #e5e5e5;\n\toverflow: auto;\n}\ninput[type=checkbox] {\n  position: relative;\n  width: 12px;\n\theight: 12px;\n\t-webkit-apprarence: none;\n}\ninput[type=checkbox]::before{\n\tcontent: '';\n\tposition: absolute;\n\ttop: -11px;\n\twidth: 12px;\n\theight: 0;\n\ttext-align: center;\n\tfont-size: 16px;\n  background-image: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMi4xLjAsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0i5Zu+5b2iIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4PSIwcHgiIHk9IjBweCINCgkgdmlld0JveD0iMCAwIDg1MC40IDg1MC40IiBzdHlsZT0iZW5hYmxlLWJhY2tncm91bmQ6bmV3IDAgMCA4NTAuNCA4NTAuNDsiIHhtbDpzcGFjZT0icHJlc2VydmUiPg0KPHN0eWxlIHR5cGU9InRleHQvY3NzIj4NCgkuc3Qwe2ZpbGw6I0IwQkFDNTt9DQo8L3N0eWxlPg0KPGc+DQoJPHBhdGggY2xhc3M9InN0MCIgZD0iTTgwOC40LDg1MC40SDQyYy0yMy4yLDAtNDItMTguOC00Mi00MlY0MkMwLDE4LjgsMTguOCwwLDQyLDBoNzY2LjRjMjMuMiwwLDQyLDE4LjgsNDIsNDJ2NzY2LjQNCgkJQzg1MC40LDgzMS42LDgzMS42LDg1MC40LDgwOC40LDg1MC40eiBNNjAsNzkwLjRoNzMwLjRWNjBINjBWNzkwLjR6Ii8+DQo8L2c+DQo8L3N2Zz4NCg==);\n\tborder-radius: 2px;\n\tbackground-repeat: no-repeat;\n\toverflow: hidden;\n}\ninput[type=checkbox]:checked::before {\n  background-image: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMi4xLjAsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0i5Zu+5b2iIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4PSIwcHgiIHk9IjBweCINCgkgdmlld0JveD0iMCAwIDg1MC40IDg1MC40IiBzdHlsZT0iZW5hYmxlLWJhY2tncm91bmQ6bmV3IDAgMCA4NTAuNCA4NTAuNDsiIHhtbDpzcGFjZT0icHJlc2VydmUiPg0KPHN0eWxlIHR5cGU9InRleHQvY3NzIj4NCgkuc3Qwe2ZpbGw6IzM1ODJGQjt9DQo8L3N0eWxlPg0KPHBhdGggY2xhc3M9InN0MCIgZD0iTTc5My43LDBoLTczN0MyNS41LDAsMCwyNS41LDAsNTYuN3Y3MzdjMCwzMS4yLDI1LjUsNTYuNyw1Ni43LDU2LjdoNzM3YzMxLjIsMCw1Ni43LTI1LjUsNTYuNy01Ni43di03MzcNCglDODUwLjQsMjUuNSw4MjQuOSwwLDc5My43LDB6IE03MDAsMjgzLjZMMzc3LjQsNjA5Yy01LjYsNS43LTEzLjMsOC45LTIxLjMsOC45cy0xNS43LTMuMi0yMS4zLTguOWwtMTg0LjMtMTg2DQoJYy0xMS43LTExLjgtMTEuNi0zMC44LDAuMi00Mi40YzExLjgtMTEuNywzMC44LTExLjYsNDIuNCwwLjJsMTYzLDE2NC41bDMwMS4zLTMwMy45YzExLjctMTEuOCwzMC43LTExLjksNDIuNC0wLjINCglDNzExLjUsMjUyLjgsNzExLjYsMjcxLjgsNzAwLDI4My42eiIvPg0KPC9zdmc+DQo=);\t\n\tbackground-repeat: no-repeat;\n}\n\ninput[type=radio] {\n  position: relative;\n  width: 10px;\n  height: 0px;\n}\ninput[type=radio]::before{\n\tcontent: '';\n\tposition: absolute;\n\ttop: -9px;\n\twidth: 14px;\n\theight: 14px;\n\ttext-align: center;\n\tfont-size: 16px;\n  background-image: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMi4xLjAsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0i5Zu+5b2iIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4PSIwcHgiIHk9IjBweCINCgkgdmlld0JveD0iOTAuMjg4IDU4LjgwOSA4NTAuMzk0IDg1MC4zOTQiIGVuYWJsZS1iYWNrZ3JvdW5kPSJuZXcgOTAuMjg4IDU4LjgwOSA4NTAuMzk0IDg1MC4zOTQiIHhtbDpzcGFjZT0icHJlc2VydmUiPg0KPGc+DQoJPHBhdGggZmlsbD0iI0IwQkFDNSIgZD0iTTUxNS40ODUsOTA3LjA4NmMtNTcuMzY4LDAtMTEzLjAzOC0xMS4xODMtMTY1LjQ2Mi0zMy4yMzdjLTUwLjYzMS0yMS4zMDEtOTYuMDk5LTUxLjc5MS0xMzUuMTQxLTkwLjYyMw0KCQljLTM5LjA1My0zOC44NDQtNjkuNzE4LTg0LjA4OC05MS4xNDYtMTM0LjQ3NmMtMjIuMTk1LTUyLjE5NC0zMy40NDktMTA3LjYyMi0zMy40NDktMTY0Ljc0NQ0KCQljMC01Ny4xMjIsMTEuMjU0LTExMi41NSwzMy40NDktMTY0Ljc0NGMyMS40MjctNTAuMzg4LDUyLjA5My05NS42MzIsOTEuMTQ2LTEzNC40NzZjMzkuMDQyLTM4LjgzMiw4NC41MDktNjkuMzIyLDEzNS4xNDEtOTAuNjIzDQoJCWM1Mi40MjQtMjIuMDU1LDEwOC4wOTQtMzMuMjM4LDE2NS40NjItMzMuMjM4czExMy4wMzgsMTEuMTgzLDE2NS40NjIsMzMuMjM4YzUwLjYzMiwyMS4zLDk2LjEsNTEuNzkxLDEzNS4xNDEsOTAuNjIzDQoJCWMzOS4wNTMsMzguODQzLDY5LjcxOSw4NC4wODgsOTEuMTQ2LDEzNC40NzZjMjIuMTk1LDUyLjE5NCwzMy40NDksMTA3LjYyMiwzMy40NDksMTY0Ljc0NGMwLDU3LjEyMy0xMS4yNTQsMTEyLjU1LTMzLjQ0OSwxNjQuNzQ1DQoJCWMtMjEuNDI3LDUwLjM4OC01Mi4wOTMsOTUuNjMyLTkxLjE0NiwxMzQuNDc2Yy0zOS4wNDEsMzguODMyLTg0LjUwOSw2OS4zMjItMTM1LjE0MSw5MC42MjMNCgkJQzYyOC41MjMsODk1LjkwNCw1NzIuODUzLDkwNy4wODYsNTE1LjQ4NSw5MDcuMDg2eiBNNTE1LjQ4NSwxMjAuOTI2Yy0yMDEuMzcsMC0zNjUuMTk3LDE2Mi44NzctMzY1LjE5NywzNjMuMDgNCgkJYzAsMjAwLjIwNCwxNjMuODI3LDM2My4wODEsMzY1LjE5NywzNjMuMDgxczM2NS4xOTctMTYyLjg3NywzNjUuMTk3LTM2My4wODFDODgwLjY4MiwyODMuODAzLDcxNi44NTUsMTIwLjkyNiw1MTUuNDg1LDEyMC45MjZ6Ii8+DQo8L2c+DQo8L3N2Zz4NCg==);\n\tborder-radius: 2px;\n\tbackground-repeat: no-repeat;\n}\ninput[type=radio]:checked::before {\n  background-image: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMi4xLjAsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0i5Zu+5b2iIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4PSIwcHgiIHk9IjBweCINCgkgdmlld0JveD0iOTAuMjg4IDU4LjgwOSA4NTAuMzk0IDg1MC4zOTQiIGVuYWJsZS1iYWNrZ3JvdW5kPSJuZXcgOTAuMjg4IDU4LjgwOSA4NTAuMzk0IDg1MC4zOTQiIHhtbDpzcGFjZT0icHJlc2VydmUiPg0KPHBhdGggZmlsbD0iIzM1ODJGQiIgZD0iTTUxNS40ODUsNTguODA5Yy0yMzQuODMsMC00MjUuMTk3LDE5MC4zNjctNDI1LjE5Nyw0MjUuMTk3czE5MC4zNjcsNDI1LjE5Nyw0MjUuMTk3LDQyNS4xOTcNCglzNDI1LjE5Ny0xOTAuMzY3LDQyNS4xOTctNDI1LjE5N1M3NTAuMzE1LDU4LjgwOSw1MTUuNDg1LDU4LjgwOXogTTUxNS40ODUsNjgyLjQzMWMtMTA5LjU4NywwLTE5OC40MjUtODguODM4LTE5OC40MjUtMTk4LjQyNQ0KCXM4OC44MzgtMTk4LjQyNSwxOTguNDI1LTE5OC40MjVTNzEzLjkxLDM3NC40MTksNzEzLjkxLDQ4NC4wMDZTNjI1LjA3Miw2ODIuNDMxLDUxNS40ODUsNjgyLjQzMXoiLz4NCjwvc3ZnPg0K);\t\n\tbackground-repeat: no-repeat;\n}\ninput[type=radio]:hover::before {\n  background-image: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMi4xLjAsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0i5Zu+5b2iIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4PSIwcHgiIHk9IjBweCINCgkgdmlld0JveD0iOTAuMjg4IDU4LjgwOSA4NTAuMzk0IDg1MC4zOTQiIGVuYWJsZS1iYWNrZ3JvdW5kPSJuZXcgOTAuMjg4IDU4LjgwOSA4NTAuMzk0IDg1MC4zOTQiIHhtbDpzcGFjZT0icHJlc2VydmUiPg0KPGc+DQoJPHBhdGggZmlsbD0iIzM1ODJGQiIgZD0iTTUxNS40ODUsOTA3LjA4NmMtNTcuMzY4LDAtMTEzLjAzOC0xMS4xODMtMTY1LjQ2Mi0zMy4yMzdjLTUwLjYzMS0yMS4zMDEtOTYuMDk5LTUxLjc5MS0xMzUuMTQxLTkwLjYyMw0KCQljLTM5LjA1My0zOC44NDQtNjkuNzE4LTg0LjA4OC05MS4xNDYtMTM0LjQ3NmMtMjIuMTk1LTUyLjE5NC0zMy40NDktMTA3LjYyMi0zMy40NDktMTY0Ljc0NQ0KCQljMC01Ny4xMjIsMTEuMjU0LTExMi41NSwzMy40NDktMTY0Ljc0NGMyMS40MjctNTAuMzg4LDUyLjA5My05NS42MzIsOTEuMTQ2LTEzNC40NzZjMzkuMDQyLTM4LjgzMiw4NC41MDktNjkuMzIyLDEzNS4xNDEtOTAuNjIzDQoJCWM1Mi40MjQtMjIuMDU1LDEwOC4wOTQtMzMuMjM4LDE2NS40NjItMzMuMjM4czExMy4wMzgsMTEuMTgzLDE2NS40NjIsMzMuMjM4YzUwLjYzMiwyMS4zLDk2LjEsNTEuNzkxLDEzNS4xNDEsOTAuNjIzDQoJCWMzOS4wNTMsMzguODQzLDY5LjcxOSw4NC4wODgsOTEuMTQ2LDEzNC40NzZjMjIuMTk1LDUyLjE5NCwzMy40NDksMTA3LjYyMiwzMy40NDksMTY0Ljc0NGMwLDU3LjEyMy0xMS4yNTQsMTEyLjU1LTMzLjQ0OSwxNjQuNzQ1DQoJCWMtMjEuNDI3LDUwLjM4OC01Mi4wOTMsOTUuNjMyLTkxLjE0NiwxMzQuNDc2Yy0zOS4wNDEsMzguODMyLTg0LjUwOSw2OS4zMjItMTM1LjE0MSw5MC42MjMNCgkJQzYyOC41MjMsODk1LjkwNCw1NzIuODUzLDkwNy4wODYsNTE1LjQ4NSw5MDcuMDg2eiBNNTE1LjQ4NSwxMjAuOTI2Yy0yMDEuMzcsMC0zNjUuMTk3LDE2Mi44NzctMzY1LjE5NywzNjMuMDgNCgkJYzAsMjAwLjIwNCwxNjMuODI3LDM2My4wODEsMzY1LjE5NywzNjMuMDgxczM2NS4xOTctMTYyLjg3NywzNjUuMTk3LTM2My4wODFDODgwLjY4MiwyODMuODAzLDcxNi44NTUsMTIwLjkyNiw1MTUuNDg1LDEyMC45MjZ6Ii8+DQo8L2c+DQo8L3N2Zz4NCg==);\t\n\tbackground-repeat: no-repeat;\n}\ninput[type=radio]:checked:hover::before {\n  background-image: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMi4xLjAsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0i5Zu+5b2iIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4PSIwcHgiIHk9IjBweCINCgkgdmlld0JveD0iOTAuMjg4IDU4LjgwOSA4NTAuMzk0IDg1MC4zOTQiIGVuYWJsZS1iYWNrZ3JvdW5kPSJuZXcgOTAuMjg4IDU4LjgwOSA4NTAuMzk0IDg1MC4zOTQiIHhtbDpzcGFjZT0icHJlc2VydmUiPg0KPHBhdGggZmlsbD0iIzM1ODJGQiIgZD0iTTUxNS40ODUsNTguODA5Yy0yMzQuODMsMC00MjUuMTk3LDE5MC4zNjctNDI1LjE5Nyw0MjUuMTk3czE5MC4zNjcsNDI1LjE5Nyw0MjUuMTk3LDQyNS4xOTcNCglzNDI1LjE5Ny0xOTAuMzY3LDQyNS4xOTctNDI1LjE5N1M3NTAuMzE1LDU4LjgwOSw1MTUuNDg1LDU4LjgwOXogTTUxNS40ODUsNjgyLjQzMWMtMTA5LjU4NywwLTE5OC40MjUtODguODM4LTE5OC40MjUtMTk4LjQyNQ0KCXM4OC44MzgtMTk4LjQyNSwxOTguNDI1LTE5OC40MjVTNzEzLjkxLDM3NC40MTksNzEzLjkxLDQ4NC4wMDZTNjI1LjA3Miw2ODIuNDMxLDUxNS40ODUsNjgyLjQzMXoiLz4NCjwvc3ZnPg0K);\t\n\tbackground-repeat: no-repeat;\n}\n.geSidebar {\n\tbackground: #fff!important;\n\tborder-bottom: 1px solid #e5e5e5;\n\tpadding: 5px;\n\t_padding: 1px;\n\tpadding-bottom: 12px;\n\toverflow: hidden;\n}\n\n.geSidebarContainer .geTitle {\n\tdisplay: block;\n\tfont-size: 9pt;\n\tborder-bottom: 1px solid #e5e5e5;\n\tfont-weight: normal;\n\tpadding: 6px 0px 6px 14px;\n\tmargin: 0px;\n\tcursor: default;\n\tbackground: #eeeeee;\n\twhite-space: nowrap;\n\toverflow: hidden;\n\ttext-overflow: ellipsis;\n\tline-height: 1.4em;\n\ttext-indent: 18px;\n\tbackground-position: 6% 50%!important;\n\tcolor:#182b50;\n}\ndiv[style=\"position: relative; cursor: pointer; margin-top: -3px; border: 0px; left: 52px; opacity: 0.5;\"]{\n\tmargin-top: -1px;\n}\n.geSidebarContainer .geTitle:hover {\n\tbackground: #e5e5e5;\n}\n\n.geTitle img {\n\topacity: 0.5;\n\t_filter: alpha(opacity=50);\n}\n\n.geTitle img:hover {\n\topacity: 1;\n\t_filter: alpha(opacity=100);\n}\n\n.geTitle .geButton {\n\tborder: 1px solid transparent;\n\tpadding: 3px;\n\tborder-radius: 2px;\n}\n\n.geTitle .geButton:hover {\n\tborder: 1px solid gray;\n}\n\n.geSidebar .geItem {\n\tdisplay: inline-block;\n\tbackground-repeat: no-repeat;\n\tbackground-position: 50% 50%;\n\tborder: 1px solid transparent;\n\tborder-radius: 2px;\n\tcursor: move;\n}\n\n.geSidebar .geItem:hover {\n\tborder: 1px solid gray !important;\n}\n\n.geItem {\n\tvertical-align: top;\n\tdisplay: inline-block;\n}\n\n.geSidebarTooltip {\n\tposition: absolute;\n\tbackground: white;\n\toverflow: hidden;\n\tborder: 1px solid gray;\n\tborder-radius: 8px;\n\t-webkit-box-shadow: 0px 0px 2px 2px #d5d5d5;\n\t-moz-box-shadow: 0px 0px 2px 2px #d5d5d5;\n\tbox-shadow: 0px 0px 2px 2px #d5d5d5;\n\t_filter: progid:DXImageTransform.Microsoft.DropShadow(OffX=2, OffY=2, Color='#d5d5d5', Positive='true');\n}\n\n.geFooterContainer {\n\tbackground: #e5e5e5;\n\tborder-top: 1px solid #c0c0c0;\n}\n\n.geFooterContainer a {\n\tdisplay: inline-block;\n\tbox-sizing: border-box;\n\twidth: 100%;\n\twhite-space: nowrap;\n\tfont-size: 14px;\n\tcolor: #235695;\n\tfont-weight: bold;\n\ttext-decoration: none;\n}\n\n.geFooterContainer table {\n\tborder-collapse: collapse;\n\tmargin: 0 auto;\n}\n\n.geFooterContainer td {\n\tborder-left: 1px solid #c0c0c0;\n\tborder-right: 1px solid #c0c0c0;\n}\n\n.geFooterContainer td:hover {\n\tbackground-color: #b3b3b3;\n}\n\n.geHsplit {\n\tcursor: col-resize;\n\tbackground-color: #e8eaee;\n\tbackground-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAHBAMAAADdS/HjAAAAGFBMVEUzMzP///9tbW1QUFCKiopBQUF8fHxfX1/IXlmXAAAAHUlEQVQImWMQEGAQFWUQFmYQF2cQEmIQE2MQEQEACy4BF67hpEwAAAAASUVORK5CYII=);\n\tbackground-repeat: no-repeat;\n\tbackground-position: center center;\n}\n\n.geVsplit {\n\tfont-size: 1pt;\n\tcursor: row-resize;\n\tbackground-color: #e5e5e5;\n\tbackground-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAEBAMAAACw6DhOAAAAGFBMVEUzMzP///9tbW1QUFCKiopBQUF8fHxfX1/IXlmXAAAAFElEQVQImWNgNVdzYBAUFBRggLMAEzYBy29kEPgAAAAASUVORK5CYII=);\n\tbackground-repeat: no-repeat;\n\tbackground-position: center center;\n}\n\n.geHsplit:hover,\n.geVsplit:hover {\n\tbackground-color: #d5d5d5;\n}\n\n.geDialog {\n\tposition: absolute;\n\tbackground: white;\n\tline-height: 1em;\n\toverflow: hidden;\n\tpadding: 30px;\n\tborder: 1px solid #acacac;\n\t-webkit-box-shadow: 0px 0px 2px 2px #d5d5d5;\n\t-moz-box-shadow: 0px 0px 2px 2px #d5d5d5;\n\tbox-shadow: 0px 0px 2px 2px #d5d5d5;\n\t_filter: progid:DXImageTransform.Microsoft.DropShadow(OffX=2, OffY=2, Color='#d5d5d5', Positive='true');\n\tz-index: 2;\n}\n\n.geDialogClose {\n\tposition: absolute;\n\twidth: 9px;\n\theight: 9px;\n\topacity: 0.5;\n\tcursor: pointer;\n\t_filter: alpha(opacity=50);\n}\n\n.geDialogClose:hover {\n\topacity: 1;\n}\n\n.geDialogTitle {\n\tbox-sizing: border-box;\n\twhite-space: nowrap;\n\tbackground: rgb(229, 229, 229);\n\tborder-bottom: 1px solid rgb(192, 192, 192);\n\tfont-size: 15px;\n\tfont-weight: bold;\n\ttext-align: center;\n\tcolor: rgb(35, 86, 149);\n}\n\n.geDialogFooter {\n\tbackground: whiteSmoke;\n\twhite-space: nowrap;\n\ttext-align: right;\n\tbox-sizing: border-box;\n\tborder-top: 1px solid #e5e5e5;\n\tcolor: darkGray;\n}\n\n.geBaseButton {\n\tpadding: 10px;\n\tborder-radius: 6px;\n\tborder: 1px solid #c0c0c0;\n\tcursor: pointer;\n\tbackground-color: #ececec;\n\tbackground-image: linear-gradient(#ececec 0%, #fcfcfc 100%);\n}\n\n.geBaseButton:hover {\n\tbackground: #ececec;\n}\n\n.geBigButton {\n\tcolor: #ffffff;\n\tborder: none;\n\tpadding: 10px;\n\tfont-size: 14pt;\n\twhite-space: nowrap;\n\tborder-radius: 6px;\n\ttext-shadow: rgb(41, 89, 137) 0px 1px 0px;\n\tbackground-color: #428bca;\n\tbackground-image: linear-gradient(rgb(70, 135, 206) 0px, rgb(48, 104, 162) 100%);\n\t-webkit-box-shadow: rgba(255, 255, 255, 0.0980392) 0px 1px 0px 0px inset, rgba(0, 0, 0, 0.2) 0px 1px 1px 0px;\n\t-moz-box-shadow: rgba(255, 255, 255, 0.0980392) 0px 1px 0px 0px inset, rgba(0, 0, 0, 0.2) 0px 1px 1px 0px;\n\tbox-shadow: rgba(255, 255, 255, 0.0980392) 0px 1px 0px 0px inset, rgba(0, 0, 0, 0.2) 0px 1px 1px 0px;\n}\n\n.geBigButton:hover {\n\tbackground-color: #2d6ca2;\n\tbackground-image: linear-gradient(rgb(90, 148, 211) 0px, rgb(54, 115, 181) 100%);\n}\n\n.geBigButton:active {\n\tbackground-color: rgb(54, 115, 181);\n\tbackground-image: none;\n}\n\n@media print {\n\tdiv.geNoPrint {\n\t\tdisplay: none !important;\n\t}\n}\n\n.font-graph-geSprite-actualsize {\n\tbackground: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAABeQCAMAAAByzXKPAAAA1VBMVEUAAAAzMzIzMzIzMzE1NTUzMzIzMzIzMzEzMzIyMjIzMzIzMzIzMzIzMzE6OjoyMjIzMzIzMzIzMzEzMzI0NDA0NDIwMDAyMjEzMzIzMzEzMzE0NDAzMzMzMzIyMjIzMzI0NDE0NDQyMjIzMzIzMzIzMzIzMzM5OTkAAAC1tbX///9mZmYwMDAQEBAmJiZTiPJ7e3v/Z2RwcHAgICB+fn5hYWFzc3NAQECoqKiampqMjIxTU1NGRkY3NzcbGxsNDQ3w8PBQUFDg4ODAwMCwsLCgoKBPT09W+xp5AAAAKHRSTlMAh4DDEd187+mljnhvVge5nmhMQi4hA8uxk2IlHOOYc102M/jW088J/2liTQAACt5JREFUeNrs3O1um0AQheG5nIPCoIq1Q7+r/Mn9X1K9xtEAM9RLQmODzyO1cV+NtzjShhjHkRkAgn9DMCaYnRXIGOQdtWmk1zRWm0vNN6az+Y+v2fXZ5iTX/kZ4ZGvUNT6/RJuCM/VVRKFB7YBwtnY1k3h2wboaHy8RFQC2VGuc1D730WWLS2GIZ27aM4yUT+9tXaLNw9m0mI9uokepRLeC+ZyCfFCoqwckqV3WBHFZaxHLFrNxVpgUVRWjg/jli2WbfH4WyxYnWcVV0Rz7FYj26X9ezQcuE3VYkXzFSYpm9eq6pqSiuNYAaj+r0GiFxKv5tEOqxVfV0utrCkZF/HCXTuOdGz2IHKbDR5wdJ6PdeRmIsfviED0C5ZV7ojf487v59fPHsT18//a1Yn1HJdoSjIUXBG5XgaBejhMYVmT9B1dRUONj4KtyRHNmNkULDYeD2CGVjiZ0paOK1jVuYKIpjJTO7m9dovvEn3bz/DH4440f2+d9fvlVh+4LLuK6cM8GVcKKkmq3ZqqBfbhaef4n+pijBudNZH3H+OW3No+rbTmVXjfciPbs/GVQ7QU6tWqUW5lonefHfn5f6xI9DAxdqQU3n55uU821mj2ZuUq0SYo2ivA5tThxk3rK6u+urYtZiqKuGiWMEkbp4/OFLITIvyrfekt35WGvjvP6OlERwP6+VU39z+ansp+0SThP8jk+0SeoAehRjObmdha0f2YwfucMss7uaPVF3rThN/EH6fH3YhEt3bD1zMlwGtu8/8a5zrHJuR6NyrkKMK5N5qqf9ev6Y4hfGfSPrc7ZWZqPQrQPa+x5Cfe8FO55m3Xrcs8T3TFUYQ0zqj5jTPoMmagQz4brFh8D3x5L9OngyRy+IEa0JgBRlaBWAIJYyVYjYDF47PwNV/TwAIRfB+BiFcyeolchija6+P7xd//IveI+JlpwnrdZP7xexdD6/4N/PDzP06NZdc8vP4H7WKFXLbqjQcU9T7QZvFhHdN/+sndmy6lCQRQ9KOA8Ro1TxjttYuUlX5BK5f+/6YJIWjlNFREkpLJXGQuWO01e2mPaU4pA17qH7iEeKfRsrrqh4/t0hJQPEJSokULPFpJse0Iu0PNQNVSNnOu8ZHPWZc8TUhkBgECRikZMrp4Xq9W1NPubkIIUm4hnrtyikSIjq+jck3bOBQkpnSBrkU97ALl73pJqXfFc5AlJqN3cXvoTEKIzJcu5PSEFqHiGp6ahz+33Z3rWtpzhEfK16DO8XXi3S2vIvfUCHnpWrcsZHiHVAFUG0KQJoEgjGjGRFG1l9bq25gyPkIoANBcEab9DEPf27iCk40VbWa0uP86WkMsTQHPQHBSnJJHCytp1dW9Uz2cBQoo0PEqVes/r2bM0131CLtLzUCVUidw9n6uuaPY8IdnUYMet2BTccUtIfShnz60mBe65JaTunL/tVqTAbbeE1ImCc3vl16McIEiWc3tCClD5DM9Ak7ZFZCBkZEVzhkfI5/n6Hbdp+wF33BJSH8rZc6vISB/gnltCas/Z225FStdz2y0hZXE19lrt5p177NyR11+OHb/THhzJP86wP2uYrjvz1h92eTseNEzDbB2nd/OY1Py9WNw6/qjnN+fmvnmwnYkxjf1t+mAW7XlsbzaJ3a7DzH1sf3Udp7m/dcOf615sW26SdfvGrCaxbV4l9nEan0X0xqEaRrbvmnlrGFu3PTN3ndUoLOuapW8ODLzudLVomMHA71z/MwmT9mTmN+bOZnS9NcJDs+V53t+WPzQnbNa9/nRoCPl2AKqObKFvltEBoPvcVwNwmavxOy3IDwFAlkWCWPBqhJDC8GtsCPlGYI8ciQyRI+3/CLHHscysXvf0ynzWIOQsPr3wWllkxNQskD+b82/Ihi8qCCm150XpObXnc2RFs+cJqRhAE5AHpI8BOZbH5TQdlXB8JAUEIC4AvkFPSMEl/dQ+v74+2/bl6enFtm/v72+W/c/eHSW3CUNRGNZyjgiZNHE6fW2b6f63VGScCHSvI7CxjfH/tYnTU43CywFiAfnT/On+lunH3274R5G2zbv03rTj9F+z92+U7pqPX52PZjdM35uf6vxs3ofp799Kulf2B8CEc2JVjvJm6OIT5CO9PekvD/8T767XgTc2z1umnEdggyT5eX2s+k9yGpvH1kqvI523IVfSAzdlW2gbu3zn5+6j/JFcfIft0lBOi4/J6cbmBTZJTdPo9fV1/3pamqTUFCalOVkunVdNTU5bSa2Nn7ULjl0A7o5/aGt6Z6TKUpVC7/VLSrWzqTo7b+yzO+9i28shHtugl5cXXS9NLnyYHVZ+Nz79UG7y4in7Aqza9po+tBsXP1B8wCW3m01yVqq9G3w3q/X+/1lpZ5WEbKdOTnNsxiYtd+ngjl28Fw+zhwGwLA0/mDeIS46AxWnO2MVnUFD627+sasuAxyJpTsp3A+6WgnplGpILpL1JR21lZt5k2ZSrFPE41AteEy+Q9qrn58qW77lNM877sXXq+fcGLp/2giETZO5tTYumHObxKDQ0aezhxb2feNE0MWlvqZS1SzwsJZdslu3x9fYae8HFXYeAKcIVejxwzgwc0YE6jTzuWOAuqOS+GTY3rc+rmDxAKn7VEPAt+amm/7Yu8ev0gfnkHckljT8nSoaf/RkeNgUejaKburGiYt696FNIcXrt/3yJh8Qba+advg0BwJCk66Qamp3WvxtX1gMzSDZya+BU8y2OR+ogyk7w5h+Nox+/6S04pNunwKqpt9Db9yemA2GokjqThGR+ms1JeYMe92hu5y2Zbs5O5be7mkru2Hlpgc5j434M1NPiq0qqgXoaDkwqTU21V0s7dgY/TfLX9XMT1udx56RJqTqf5aqlR3vVqtOWaYpbp4NtW2tmPaXbwAZI0U1zroI/tiRW9oBVOtL5QT6uu2TH0nlgnXRSqsLkGXg+JnBTCjopVeGceXk2FnAtColkUynGMn1SrHXejq3Py4U5wHXZvtluJtXO27H+vFyMB9xElFIxNQ6fUmFj9Xm6Sr67SrA6b94Gfp4HLsb2rSM53VSMpseK1c7bsXbechs4zgO3EiUvs6kK7tgsUmlglaLkZiZVStzOBzoPrJHOS1VgVR5YuTPXz1VgXR5YM/+u9xglkyZRT2WqghlbnVc8CA+4mtxRp5vB7XxW7bw3LwvywI0pr5MN6HNNrUi/fUZO4o6tzxuiuO0GuLzUUdu3GOV3M6raeTu2Nm8aR+eBlVD1BnoVjowt0HBgnY51PrqdT/9yxtJ5YHWkeGKswoxJuMcGuIYoKdowKOQ4Xxov+4Zb/khU8Mf681a3gZ/0gYt1PjGdV1J2/mBS5z/58zrbQOeBE6zpGZgA7smRzgc6D2xKlORlCiUVKrfSslMAVulI56PX+XHv81g6D6yPFM+MVWCJDliLJdfoMhVYowPWYsk1ukwF1uiAu1R/Hh5v2wNb8r+9O0pBGAaiKLqdm/1vUCiFSCdhTIjWhntAwefY5sMxRW1ToJnZ89KjQTnuGzGUWB1DLkJtul0ofocn3SOf5wMu3mu97q30GN2e99he2gKEpj6Dkvwjj4tebb5d8EBAuhuUJJ87f96f4aT/1OlNz7GRfgg+WheCUFsfE16cpEFNx5exIUmHx09zd34AaRdACCDp+TVLSlFv1blzgKR2egx5zx/see0pn+djbR4FIVofz4/UeV67G3+vr3niC+H04Oz/nbwA7lqtm+wByfQAAAAASUVORK5CYII=') no-repeat;\n\twidth: 21px;\n\theight: 21px;\n\tbackground-position: 0 0;\n}\n\n.font-graph-geSprite-fillcolor {\n\tbackground: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAABeQCAMAAAByzXKPAAAA1VBMVEUAAAAzMzIzMzIzMzE1NTUzMzIzMzIzMzEzMzIyMjIzMzIzMzIzMzIzMzE6OjoyMjIzMzIzMzIzMzEzMzI0NDA0NDIwMDAyMjEzMzIzMzEzMzE0NDAzMzMzMzIyMjIzMzI0NDE0NDQyMjIzMzIzMzIzMzIzMzM5OTkAAAC1tbX///9mZmYwMDAQEBAmJiZTiPJ7e3v/Z2RwcHAgICB+fn5hYWFzc3NAQECoqKiampqMjIxTU1NGRkY3NzcbGxsNDQ3w8PBQUFDg4ODAwMCwsLCgoKBPT09W+xp5AAAAKHRSTlMAh4DDEd187+mljnhvVge5nmhMQi4hA8uxk2IlHOOYc102M/jW088J/2liTQAACt5JREFUeNrs3O1um0AQheG5nIPCoIq1Q7+r/Mn9X1K9xtEAM9RLQmODzyO1cV+NtzjShhjHkRkAgn9DMCaYnRXIGOQdtWmk1zRWm0vNN6az+Y+v2fXZ5iTX/kZ4ZGvUNT6/RJuCM/VVRKFB7YBwtnY1k3h2wboaHy8RFQC2VGuc1D730WWLS2GIZ27aM4yUT+9tXaLNw9m0mI9uokepRLeC+ZyCfFCoqwckqV3WBHFZaxHLFrNxVpgUVRWjg/jli2WbfH4WyxYnWcVV0Rz7FYj26X9ezQcuE3VYkXzFSYpm9eq6pqSiuNYAaj+r0GiFxKv5tEOqxVfV0utrCkZF/HCXTuOdGz2IHKbDR5wdJ6PdeRmIsfviED0C5ZV7ojf487v59fPHsT18//a1Yn1HJdoSjIUXBG5XgaBejhMYVmT9B1dRUONj4KtyRHNmNkULDYeD2CGVjiZ0paOK1jVuYKIpjJTO7m9dovvEn3bz/DH4440f2+d9fvlVh+4LLuK6cM8GVcKKkmq3ZqqBfbhaef4n+pijBudNZH3H+OW3No+rbTmVXjfciPbs/GVQ7QU6tWqUW5lonefHfn5f6xI9DAxdqQU3n55uU821mj2ZuUq0SYo2ivA5tThxk3rK6u+urYtZiqKuGiWMEkbp4/OFLITIvyrfekt35WGvjvP6OlERwP6+VU39z+ansp+0SThP8jk+0SeoAehRjObmdha0f2YwfucMss7uaPVF3rThN/EH6fH3YhEt3bD1zMlwGtu8/8a5zrHJuR6NyrkKMK5N5qqf9ev6Y4hfGfSPrc7ZWZqPQrQPa+x5Cfe8FO55m3Xrcs8T3TFUYQ0zqj5jTPoMmagQz4brFh8D3x5L9OngyRy+IEa0JgBRlaBWAIJYyVYjYDF47PwNV/TwAIRfB+BiFcyeolchija6+P7xd//IveI+JlpwnrdZP7xexdD6/4N/PDzP06NZdc8vP4H7WKFXLbqjQcU9T7QZvFhHdN/+sndmy6lCQRQ9KOA8Ro1TxjttYuUlX5BK5f+/6YJIWjlNFREkpLJXGQuWO01e2mPaU4pA17qH7iEeKfRsrrqh4/t0hJQPEJSokULPFpJse0Iu0PNQNVSNnOu8ZHPWZc8TUhkBgECRikZMrp4Xq9W1NPubkIIUm4hnrtyikSIjq+jck3bOBQkpnSBrkU97ALl73pJqXfFc5AlJqN3cXvoTEKIzJcu5PSEFqHiGp6ahz+33Z3rWtpzhEfK16DO8XXi3S2vIvfUCHnpWrcsZHiHVAFUG0KQJoEgjGjGRFG1l9bq25gyPkIoANBcEab9DEPf27iCk40VbWa0uP86WkMsTQHPQHBSnJJHCytp1dW9Uz2cBQoo0PEqVes/r2bM0131CLtLzUCVUidw9n6uuaPY8IdnUYMet2BTccUtIfShnz60mBe65JaTunL/tVqTAbbeE1ImCc3vl16McIEiWc3tCClD5DM9Ak7ZFZCBkZEVzhkfI5/n6Hbdp+wF33BJSH8rZc6vISB/gnltCas/Z225FStdz2y0hZXE19lrt5p177NyR11+OHb/THhzJP86wP2uYrjvz1h92eTseNEzDbB2nd/OY1Py9WNw6/qjnN+fmvnmwnYkxjf1t+mAW7XlsbzaJ3a7DzH1sf3Udp7m/dcOf615sW26SdfvGrCaxbV4l9nEan0X0xqEaRrbvmnlrGFu3PTN3ndUoLOuapW8ODLzudLVomMHA71z/MwmT9mTmN+bOZnS9NcJDs+V53t+WPzQnbNa9/nRoCPl2AKqObKFvltEBoPvcVwNwmavxOy3IDwFAlkWCWPBqhJDC8GtsCPlGYI8ciQyRI+3/CLHHscysXvf0ynzWIOQsPr3wWllkxNQskD+b82/Ihi8qCCm150XpObXnc2RFs+cJqRhAE5AHpI8BOZbH5TQdlXB8JAUEIC4AvkFPSMEl/dQ+v74+2/bl6enFtm/v72+W/c/eHSW3CUNRGNZyjgiZNHE6fW2b6f63VGScCHSvI7CxjfH/tYnTU43CywFiAfnT/On+lunH3274R5G2zbv03rTj9F+z92+U7pqPX52PZjdM35uf6vxs3ofp799Kulf2B8CEc2JVjvJm6OIT5CO9PekvD/8T767XgTc2z1umnEdggyT5eX2s+k9yGpvH1kqvI523IVfSAzdlW2gbu3zn5+6j/JFcfIft0lBOi4/J6cbmBTZJTdPo9fV1/3pamqTUFCalOVkunVdNTU5bSa2Nn7ULjl0A7o5/aGt6Z6TKUpVC7/VLSrWzqTo7b+yzO+9i28shHtugl5cXXS9NLnyYHVZ+Nz79UG7y4in7Aqza9po+tBsXP1B8wCW3m01yVqq9G3w3q/X+/1lpZ5WEbKdOTnNsxiYtd+ngjl28Fw+zhwGwLA0/mDeIS46AxWnO2MVnUFD627+sasuAxyJpTsp3A+6WgnplGpILpL1JR21lZt5k2ZSrFPE41AteEy+Q9qrn58qW77lNM877sXXq+fcGLp/2giETZO5tTYumHObxKDQ0aezhxb2feNE0MWlvqZS1SzwsJZdslu3x9fYae8HFXYeAKcIVejxwzgwc0YE6jTzuWOAuqOS+GTY3rc+rmDxAKn7VEPAt+amm/7Yu8ev0gfnkHckljT8nSoaf/RkeNgUejaKburGiYt696FNIcXrt/3yJh8Qba+advg0BwJCk66Qamp3WvxtX1gMzSDZya+BU8y2OR+ogyk7w5h+Nox+/6S04pNunwKqpt9Db9yemA2GokjqThGR+ms1JeYMe92hu5y2Zbs5O5be7mkru2Hlpgc5j434M1NPiq0qqgXoaDkwqTU21V0s7dgY/TfLX9XMT1udx56RJqTqf5aqlR3vVqtOWaYpbp4NtW2tmPaXbwAZI0U1zroI/tiRW9oBVOtL5QT6uu2TH0nlgnXRSqsLkGXg+JnBTCjopVeGceXk2FnAtColkUynGMn1SrHXejq3Py4U5wHXZvtluJtXO27H+vFyMB9xElFIxNQ6fUmFj9Xm6Sr67SrA6b94Gfp4HLsb2rSM53VSMpseK1c7bsXbechs4zgO3EiUvs6kK7tgsUmlglaLkZiZVStzOBzoPrJHOS1VgVR5YuTPXz1VgXR5YM/+u9xglkyZRT2WqghlbnVc8CA+4mtxRp5vB7XxW7bw3LwvywI0pr5MN6HNNrUi/fUZO4o6tzxuiuO0GuLzUUdu3GOV3M6raeTu2Nm8aR+eBlVD1BnoVjowt0HBgnY51PrqdT/9yxtJ5YHWkeGKswoxJuMcGuIYoKdowKOQ4Xxov+4Zb/khU8Mf681a3gZ/0gYt1PjGdV1J2/mBS5z/58zrbQOeBE6zpGZgA7smRzgc6D2xKlORlCiUVKrfSslMAVulI56PX+XHv81g6D6yPFM+MVWCJDliLJdfoMhVYowPWYsk1ukwF1uiAu1R/Hh5v2wNb8r+9O0pBGAaiKLqdm/1vUCiFSCdhTIjWhntAwefY5sMxRW1ToJnZ89KjQTnuGzGUWB1DLkJtul0ofocn3SOf5wMu3mu97q30GN2e99he2gKEpj6Dkvwjj4tebb5d8EBAuhuUJJ87f96f4aT/1OlNz7GRfgg+WheCUFsfE16cpEFNx5exIUmHx09zd34AaRdACCDp+TVLSlFv1blzgKR2egx5zx/see0pn+djbR4FIVofz4/UeV67G3+vr3niC+H04Oz/nbwA7lqtm+wByfQAAAAASUVORK5CYII=') no-repeat;\n\twidth: 21px;\n\theight: 21px;\n\tbackground-position: 0 -229px;\n\tmargin-top: -3px;\n}\n\n.font-graph-geSprite-gradientcolor {\n\tbackground: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAABeQCAMAAAByzXKPAAAA1VBMVEUAAAAzMzIzMzIzMzE1NTUzMzIzMzIzMzEzMzIyMjIzMzIzMzIzMzIzMzE6OjoyMjIzMzIzMzIzMzEzMzI0NDA0NDIwMDAyMjEzMzIzMzEzMzE0NDAzMzMzMzIyMjIzMzI0NDE0NDQyMjIzMzIzMzIzMzIzMzM5OTkAAAC1tbX///9mZmYwMDAQEBAmJiZTiPJ7e3v/Z2RwcHAgICB+fn5hYWFzc3NAQECoqKiampqMjIxTU1NGRkY3NzcbGxsNDQ3w8PBQUFDg4ODAwMCwsLCgoKBPT09W+xp5AAAAKHRSTlMAh4DDEd187+mljnhvVge5nmhMQi4hA8uxk2IlHOOYc102M/jW088J/2liTQAACt5JREFUeNrs3O1um0AQheG5nIPCoIq1Q7+r/Mn9X1K9xtEAM9RLQmODzyO1cV+NtzjShhjHkRkAgn9DMCaYnRXIGOQdtWmk1zRWm0vNN6az+Y+v2fXZ5iTX/kZ4ZGvUNT6/RJuCM/VVRKFB7YBwtnY1k3h2wboaHy8RFQC2VGuc1D730WWLS2GIZ27aM4yUT+9tXaLNw9m0mI9uokepRLeC+ZyCfFCoqwckqV3WBHFZaxHLFrNxVpgUVRWjg/jli2WbfH4WyxYnWcVV0Rz7FYj26X9ezQcuE3VYkXzFSYpm9eq6pqSiuNYAaj+r0GiFxKv5tEOqxVfV0utrCkZF/HCXTuOdGz2IHKbDR5wdJ6PdeRmIsfviED0C5ZV7ojf487v59fPHsT18//a1Yn1HJdoSjIUXBG5XgaBejhMYVmT9B1dRUONj4KtyRHNmNkULDYeD2CGVjiZ0paOK1jVuYKIpjJTO7m9dovvEn3bz/DH4440f2+d9fvlVh+4LLuK6cM8GVcKKkmq3ZqqBfbhaef4n+pijBudNZH3H+OW3No+rbTmVXjfciPbs/GVQ7QU6tWqUW5lonefHfn5f6xI9DAxdqQU3n55uU821mj2ZuUq0SYo2ivA5tThxk3rK6u+urYtZiqKuGiWMEkbp4/OFLITIvyrfekt35WGvjvP6OlERwP6+VU39z+ansp+0SThP8jk+0SeoAehRjObmdha0f2YwfucMss7uaPVF3rThN/EH6fH3YhEt3bD1zMlwGtu8/8a5zrHJuR6NyrkKMK5N5qqf9ev6Y4hfGfSPrc7ZWZqPQrQPa+x5Cfe8FO55m3Xrcs8T3TFUYQ0zqj5jTPoMmagQz4brFh8D3x5L9OngyRy+IEa0JgBRlaBWAIJYyVYjYDF47PwNV/TwAIRfB+BiFcyeolchija6+P7xd//IveI+JlpwnrdZP7xexdD6/4N/PDzP06NZdc8vP4H7WKFXLbqjQcU9T7QZvFhHdN/+sndmy6lCQRQ9KOA8Ro1TxjttYuUlX5BK5f+/6YJIWjlNFREkpLJXGQuWO01e2mPaU4pA17qH7iEeKfRsrrqh4/t0hJQPEJSokULPFpJse0Iu0PNQNVSNnOu8ZHPWZc8TUhkBgECRikZMrp4Xq9W1NPubkIIUm4hnrtyikSIjq+jck3bOBQkpnSBrkU97ALl73pJqXfFc5AlJqN3cXvoTEKIzJcu5PSEFqHiGp6ahz+33Z3rWtpzhEfK16DO8XXi3S2vIvfUCHnpWrcsZHiHVAFUG0KQJoEgjGjGRFG1l9bq25gyPkIoANBcEab9DEPf27iCk40VbWa0uP86WkMsTQHPQHBSnJJHCytp1dW9Uz2cBQoo0PEqVes/r2bM0131CLtLzUCVUidw9n6uuaPY8IdnUYMet2BTccUtIfShnz60mBe65JaTunL/tVqTAbbeE1ImCc3vl16McIEiWc3tCClD5DM9Ak7ZFZCBkZEVzhkfI5/n6Hbdp+wF33BJSH8rZc6vISB/gnltCas/Z225FStdz2y0hZXE19lrt5p177NyR11+OHb/THhzJP86wP2uYrjvz1h92eTseNEzDbB2nd/OY1Py9WNw6/qjnN+fmvnmwnYkxjf1t+mAW7XlsbzaJ3a7DzH1sf3Udp7m/dcOf615sW26SdfvGrCaxbV4l9nEan0X0xqEaRrbvmnlrGFu3PTN3ndUoLOuapW8ODLzudLVomMHA71z/MwmT9mTmN+bOZnS9NcJDs+V53t+WPzQnbNa9/nRoCPl2AKqObKFvltEBoPvcVwNwmavxOy3IDwFAlkWCWPBqhJDC8GtsCPlGYI8ciQyRI+3/CLHHscysXvf0ynzWIOQsPr3wWllkxNQskD+b82/Ihi8qCCm150XpObXnc2RFs+cJqRhAE5AHpI8BOZbH5TQdlXB8JAUEIC4AvkFPSMEl/dQ+v74+2/bl6enFtm/v72+W/c/eHSW3CUNRGNZyjgiZNHE6fW2b6f63VGScCHSvI7CxjfH/tYnTU43CywFiAfnT/On+lunH3274R5G2zbv03rTj9F+z92+U7pqPX52PZjdM35uf6vxs3ofp799Kulf2B8CEc2JVjvJm6OIT5CO9PekvD/8T767XgTc2z1umnEdggyT5eX2s+k9yGpvH1kqvI523IVfSAzdlW2gbu3zn5+6j/JFcfIft0lBOi4/J6cbmBTZJTdPo9fV1/3pamqTUFCalOVkunVdNTU5bSa2Nn7ULjl0A7o5/aGt6Z6TKUpVC7/VLSrWzqTo7b+yzO+9i28shHtugl5cXXS9NLnyYHVZ+Nz79UG7y4in7Aqza9po+tBsXP1B8wCW3m01yVqq9G3w3q/X+/1lpZ5WEbKdOTnNsxiYtd+ngjl28Fw+zhwGwLA0/mDeIS46AxWnO2MVnUFD627+sasuAxyJpTsp3A+6WgnplGpILpL1JR21lZt5k2ZSrFPE41AteEy+Q9qrn58qW77lNM877sXXq+fcGLp/2giETZO5tTYumHObxKDQ0aezhxb2feNE0MWlvqZS1SzwsJZdslu3x9fYae8HFXYeAKcIVejxwzgwc0YE6jTzuWOAuqOS+GTY3rc+rmDxAKn7VEPAt+amm/7Yu8ev0gfnkHckljT8nSoaf/RkeNgUejaKburGiYt696FNIcXrt/3yJh8Qba+advg0BwJCk66Qamp3WvxtX1gMzSDZya+BU8y2OR+ogyk7w5h+Nox+/6S04pNunwKqpt9Db9yemA2GokjqThGR+ms1JeYMe92hu5y2Zbs5O5be7mkru2Hlpgc5j434M1NPiq0qqgXoaDkwqTU21V0s7dgY/TfLX9XMT1udx56RJqTqf5aqlR3vVqtOWaYpbp4NtW2tmPaXbwAZI0U1zroI/tiRW9oBVOtL5QT6uu2TH0nlgnXRSqsLkGXg+JnBTCjopVeGceXk2FnAtColkUynGMn1SrHXejq3Py4U5wHXZvtluJtXO27H+vFyMB9xElFIxNQ6fUmFj9Xm6Sr67SrA6b94Gfp4HLsb2rSM53VSMpseK1c7bsXbechs4zgO3EiUvs6kK7tgsUmlglaLkZiZVStzOBzoPrJHOS1VgVR5YuTPXz1VgXR5YM/+u9xglkyZRT2WqghlbnVc8CA+4mtxRp5vB7XxW7bw3LwvywI0pr5MN6HNNrUi/fUZO4o6tzxuiuO0GuLzUUdu3GOV3M6raeTu2Nm8aR+eBlVD1BnoVjowt0HBgnY51PrqdT/9yxtJ5YHWkeGKswoxJuMcGuIYoKdowKOQ4Xxov+4Zb/khU8Mf681a3gZ/0gYt1PjGdV1J2/mBS5z/58zrbQOeBE6zpGZgA7smRzgc6D2xKlORlCiUVKrfSslMAVulI56PX+XHv81g6D6yPFM+MVWCJDliLJdfoMhVYowPWYsk1ukwF1uiAu1R/Hh5v2wNb8r+9O0pBGAaiKLqdm/1vUCiFSCdhTIjWhntAwefY5sMxRW1ToJnZ89KjQTnuGzGUWB1DLkJtul0ofocn3SOf5wMu3mu97q30GN2e99he2gKEpj6Dkvwjj4tebb5d8EBAuhuUJJ87f96f4aT/1OlNz7GRfgg+WheCUFsfE16cpEFNx5exIUmHx09zd34AaRdACCDp+TVLSlFv1blzgKR2egx5zx/see0pn+djbR4FIVofz4/UeV67G3+vr3niC+H04Oz/nbwA7lqtm+wByfQAAAAASUVORK5CYII=') no-repeat;\n\twidth: 21px;\n\theight: 21px;\n\tbackground-position: 0 -368px;\n}\n\n.font-graph-geSprite-image {\n\tbackground: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAABeQCAMAAAByzXKPAAAA1VBMVEUAAAAzMzIzMzIzMzE1NTUzMzIzMzIzMzEzMzIyMjIzMzIzMzIzMzIzMzE6OjoyMjIzMzIzMzIzMzEzMzI0NDA0NDIwMDAyMjEzMzIzMzEzMzE0NDAzMzMzMzIyMjIzMzI0NDE0NDQyMjIzMzIzMzIzMzIzMzM5OTkAAAC1tbX///9mZmYwMDAQEBAmJiZTiPJ7e3v/Z2RwcHAgICB+fn5hYWFzc3NAQECoqKiampqMjIxTU1NGRkY3NzcbGxsNDQ3w8PBQUFDg4ODAwMCwsLCgoKBPT09W+xp5AAAAKHRSTlMAh4DDEd187+mljnhvVge5nmhMQi4hA8uxk2IlHOOYc102M/jW088J/2liTQAACt5JREFUeNrs3O1um0AQheG5nIPCoIq1Q7+r/Mn9X1K9xtEAM9RLQmODzyO1cV+NtzjShhjHkRkAgn9DMCaYnRXIGOQdtWmk1zRWm0vNN6az+Y+v2fXZ5iTX/kZ4ZGvUNT6/RJuCM/VVRKFB7YBwtnY1k3h2wboaHy8RFQC2VGuc1D730WWLS2GIZ27aM4yUT+9tXaLNw9m0mI9uokepRLeC+ZyCfFCoqwckqV3WBHFZaxHLFrNxVpgUVRWjg/jli2WbfH4WyxYnWcVV0Rz7FYj26X9ezQcuE3VYkXzFSYpm9eq6pqSiuNYAaj+r0GiFxKv5tEOqxVfV0utrCkZF/HCXTuOdGz2IHKbDR5wdJ6PdeRmIsfviED0C5ZV7ojf487v59fPHsT18//a1Yn1HJdoSjIUXBG5XgaBejhMYVmT9B1dRUONj4KtyRHNmNkULDYeD2CGVjiZ0paOK1jVuYKIpjJTO7m9dovvEn3bz/DH4440f2+d9fvlVh+4LLuK6cM8GVcKKkmq3ZqqBfbhaef4n+pijBudNZH3H+OW3No+rbTmVXjfciPbs/GVQ7QU6tWqUW5lonefHfn5f6xI9DAxdqQU3n55uU821mj2ZuUq0SYo2ivA5tThxk3rK6u+urYtZiqKuGiWMEkbp4/OFLITIvyrfekt35WGvjvP6OlERwP6+VU39z+ansp+0SThP8jk+0SeoAehRjObmdha0f2YwfucMss7uaPVF3rThN/EH6fH3YhEt3bD1zMlwGtu8/8a5zrHJuR6NyrkKMK5N5qqf9ev6Y4hfGfSPrc7ZWZqPQrQPa+x5Cfe8FO55m3Xrcs8T3TFUYQ0zqj5jTPoMmagQz4brFh8D3x5L9OngyRy+IEa0JgBRlaBWAIJYyVYjYDF47PwNV/TwAIRfB+BiFcyeolchija6+P7xd//IveI+JlpwnrdZP7xexdD6/4N/PDzP06NZdc8vP4H7WKFXLbqjQcU9T7QZvFhHdN/+sndmy6lCQRQ9KOA8Ro1TxjttYuUlX5BK5f+/6YJIWjlNFREkpLJXGQuWO01e2mPaU4pA17qH7iEeKfRsrrqh4/t0hJQPEJSokULPFpJse0Iu0PNQNVSNnOu8ZHPWZc8TUhkBgECRikZMrp4Xq9W1NPubkIIUm4hnrtyikSIjq+jck3bOBQkpnSBrkU97ALl73pJqXfFc5AlJqN3cXvoTEKIzJcu5PSEFqHiGp6ahz+33Z3rWtpzhEfK16DO8XXi3S2vIvfUCHnpWrcsZHiHVAFUG0KQJoEgjGjGRFG1l9bq25gyPkIoANBcEab9DEPf27iCk40VbWa0uP86WkMsTQHPQHBSnJJHCytp1dW9Uz2cBQoo0PEqVes/r2bM0131CLtLzUCVUidw9n6uuaPY8IdnUYMet2BTccUtIfShnz60mBe65JaTunL/tVqTAbbeE1ImCc3vl16McIEiWc3tCClD5DM9Ak7ZFZCBkZEVzhkfI5/n6Hbdp+wF33BJSH8rZc6vISB/gnltCas/Z225FStdz2y0hZXE19lrt5p177NyR11+OHb/THhzJP86wP2uYrjvz1h92eTseNEzDbB2nd/OY1Py9WNw6/qjnN+fmvnmwnYkxjf1t+mAW7XlsbzaJ3a7DzH1sf3Udp7m/dcOf615sW26SdfvGrCaxbV4l9nEan0X0xqEaRrbvmnlrGFu3PTN3ndUoLOuapW8ODLzudLVomMHA71z/MwmT9mTmN+bOZnS9NcJDs+V53t+WPzQnbNa9/nRoCPl2AKqObKFvltEBoPvcVwNwmavxOy3IDwFAlkWCWPBqhJDC8GtsCPlGYI8ciQyRI+3/CLHHscysXvf0ynzWIOQsPr3wWllkxNQskD+b82/Ihi8qCCm150XpObXnc2RFs+cJqRhAE5AHpI8BOZbH5TQdlXB8JAUEIC4AvkFPSMEl/dQ+v74+2/bl6enFtm/v72+W/c/eHSW3CUNRGNZyjgiZNHE6fW2b6f63VGScCHSvI7CxjfH/tYnTU43CywFiAfnT/On+lunH3274R5G2zbv03rTj9F+z92+U7pqPX52PZjdM35uf6vxs3ofp799Kulf2B8CEc2JVjvJm6OIT5CO9PekvD/8T767XgTc2z1umnEdggyT5eX2s+k9yGpvH1kqvI523IVfSAzdlW2gbu3zn5+6j/JFcfIft0lBOi4/J6cbmBTZJTdPo9fV1/3pamqTUFCalOVkunVdNTU5bSa2Nn7ULjl0A7o5/aGt6Z6TKUpVC7/VLSrWzqTo7b+yzO+9i28shHtugl5cXXS9NLnyYHVZ+Nz79UG7y4in7Aqza9po+tBsXP1B8wCW3m01yVqq9G3w3q/X+/1lpZ5WEbKdOTnNsxiYtd+ngjl28Fw+zhwGwLA0/mDeIS46AxWnO2MVnUFD627+sasuAxyJpTsp3A+6WgnplGpILpL1JR21lZt5k2ZSrFPE41AteEy+Q9qrn58qW77lNM877sXXq+fcGLp/2giETZO5tTYumHObxKDQ0aezhxb2feNE0MWlvqZS1SzwsJZdslu3x9fYae8HFXYeAKcIVejxwzgwc0YE6jTzuWOAuqOS+GTY3rc+rmDxAKn7VEPAt+amm/7Yu8ev0gfnkHckljT8nSoaf/RkeNgUejaKburGiYt696FNIcXrt/3yJh8Qba+advg0BwJCk66Qamp3WvxtX1gMzSDZya+BU8y2OR+ogyk7w5h+Nox+/6S04pNunwKqpt9Db9yemA2GokjqThGR+ms1JeYMe92hu5y2Zbs5O5be7mkru2Hlpgc5j434M1NPiq0qqgXoaDkwqTU21V0s7dgY/TfLX9XMT1udx56RJqTqf5aqlR3vVqtOWaYpbp4NtW2tmPaXbwAZI0U1zroI/tiRW9oBVOtL5QT6uu2TH0nlgnXRSqsLkGXg+JnBTCjopVeGceXk2FnAtColkUynGMn1SrHXejq3Py4U5wHXZvtluJtXO27H+vFyMB9xElFIxNQ6fUmFj9Xm6Sr67SrA6b94Gfp4HLsb2rSM53VSMpseK1c7bsXbechs4zgO3EiUvs6kK7tgsUmlglaLkZiZVStzOBzoPrJHOS1VgVR5YuTPXz1VgXR5YM/+u9xglkyZRT2WqghlbnVc8CA+4mtxRp5vB7XxW7bw3LwvywI0pr5MN6HNNrUi/fUZO4o6tzxuiuO0GuLzUUdu3GOV3M6raeTu2Nm8aR+eBlVD1BnoVjowt0HBgnY51PrqdT/9yxtJ5YHWkeGKswoxJuMcGuIYoKdowKOQ4Xxov+4Zb/khU8Mf681a3gZ/0gYt1PjGdV1J2/mBS5z/58zrbQOeBE6zpGZgA7smRzgc6D2xKlORlCiUVKrfSslMAVulI56PX+XHv81g6D6yPFM+MVWCJDliLJdfoMhVYowPWYsk1ukwF1uiAu1R/Hh5v2wNb8r+9O0pBGAaiKLqdm/1vUCiFSCdhTIjWhntAwefY5sMxRW1ToJnZ89KjQTnuGzGUWB1DLkJtul0ofocn3SOf5wMu3mu97q30GN2e99he2gKEpj6Dkvwjj4tebb5d8EBAuhuUJJ87f96f4aT/1OlNz7GRfgg+WheCUFsfE16cpEFNx5exIUmHx09zd34AaRdACCDp+TVLSlFv1blzgKR2egx5zx/see0pn+djbR4FIVofz4/UeV67G3+vr3niC+H04Oz/nbwA7lqtm+wByfQAAAAASUVORK5CYII=') no-repeat;\n\twidth: 21px;\n\theight: 21px;\n\tbackground-position: 0 -414px;\n}\n\n.font-graph-geSprite-print {\n\tbackground: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAABeQCAMAAAByzXKPAAAA1VBMVEUAAAAzMzIzMzIzMzE1NTUzMzIzMzIzMzEzMzIyMjIzMzIzMzIzMzIzMzE6OjoyMjIzMzIzMzIzMzEzMzI0NDA0NDIwMDAyMjEzMzIzMzEzMzE0NDAzMzMzMzIyMjIzMzI0NDE0NDQyMjIzMzIzMzIzMzIzMzM5OTkAAAC1tbX///9mZmYwMDAQEBAmJiZTiPJ7e3v/Z2RwcHAgICB+fn5hYWFzc3NAQECoqKiampqMjIxTU1NGRkY3NzcbGxsNDQ3w8PBQUFDg4ODAwMCwsLCgoKBPT09W+xp5AAAAKHRSTlMAh4DDEd187+mljnhvVge5nmhMQi4hA8uxk2IlHOOYc102M/jW088J/2liTQAACt5JREFUeNrs3O1um0AQheG5nIPCoIq1Q7+r/Mn9X1K9xtEAM9RLQmODzyO1cV+NtzjShhjHkRkAgn9DMCaYnRXIGOQdtWmk1zRWm0vNN6az+Y+v2fXZ5iTX/kZ4ZGvUNT6/RJuCM/VVRKFB7YBwtnY1k3h2wboaHy8RFQC2VGuc1D730WWLS2GIZ27aM4yUT+9tXaLNw9m0mI9uokepRLeC+ZyCfFCoqwckqV3WBHFZaxHLFrNxVpgUVRWjg/jli2WbfH4WyxYnWcVV0Rz7FYj26X9ezQcuE3VYkXzFSYpm9eq6pqSiuNYAaj+r0GiFxKv5tEOqxVfV0utrCkZF/HCXTuOdGz2IHKbDR5wdJ6PdeRmIsfviED0C5ZV7ojf487v59fPHsT18//a1Yn1HJdoSjIUXBG5XgaBejhMYVmT9B1dRUONj4KtyRHNmNkULDYeD2CGVjiZ0paOK1jVuYKIpjJTO7m9dovvEn3bz/DH4440f2+d9fvlVh+4LLuK6cM8GVcKKkmq3ZqqBfbhaef4n+pijBudNZH3H+OW3No+rbTmVXjfciPbs/GVQ7QU6tWqUW5lonefHfn5f6xI9DAxdqQU3n55uU821mj2ZuUq0SYo2ivA5tThxk3rK6u+urYtZiqKuGiWMEkbp4/OFLITIvyrfekt35WGvjvP6OlERwP6+VU39z+ansp+0SThP8jk+0SeoAehRjObmdha0f2YwfucMss7uaPVF3rThN/EH6fH3YhEt3bD1zMlwGtu8/8a5zrHJuR6NyrkKMK5N5qqf9ev6Y4hfGfSPrc7ZWZqPQrQPa+x5Cfe8FO55m3Xrcs8T3TFUYQ0zqj5jTPoMmagQz4brFh8D3x5L9OngyRy+IEa0JgBRlaBWAIJYyVYjYDF47PwNV/TwAIRfB+BiFcyeolchija6+P7xd//IveI+JlpwnrdZP7xexdD6/4N/PDzP06NZdc8vP4H7WKFXLbqjQcU9T7QZvFhHdN/+sndmy6lCQRQ9KOA8Ro1TxjttYuUlX5BK5f+/6YJIWjlNFREkpLJXGQuWO01e2mPaU4pA17qH7iEeKfRsrrqh4/t0hJQPEJSokULPFpJse0Iu0PNQNVSNnOu8ZHPWZc8TUhkBgECRikZMrp4Xq9W1NPubkIIUm4hnrtyikSIjq+jck3bOBQkpnSBrkU97ALl73pJqXfFc5AlJqN3cXvoTEKIzJcu5PSEFqHiGp6ahz+33Z3rWtpzhEfK16DO8XXi3S2vIvfUCHnpWrcsZHiHVAFUG0KQJoEgjGjGRFG1l9bq25gyPkIoANBcEab9DEPf27iCk40VbWa0uP86WkMsTQHPQHBSnJJHCytp1dW9Uz2cBQoo0PEqVes/r2bM0131CLtLzUCVUidw9n6uuaPY8IdnUYMet2BTccUtIfShnz60mBe65JaTunL/tVqTAbbeE1ImCc3vl16McIEiWc3tCClD5DM9Ak7ZFZCBkZEVzhkfI5/n6Hbdp+wF33BJSH8rZc6vISB/gnltCas/Z225FStdz2y0hZXE19lrt5p177NyR11+OHb/THhzJP86wP2uYrjvz1h92eTseNEzDbB2nd/OY1Py9WNw6/qjnN+fmvnmwnYkxjf1t+mAW7XlsbzaJ3a7DzH1sf3Udp7m/dcOf615sW26SdfvGrCaxbV4l9nEan0X0xqEaRrbvmnlrGFu3PTN3ndUoLOuapW8ODLzudLVomMHA71z/MwmT9mTmN+bOZnS9NcJDs+V53t+WPzQnbNa9/nRoCPl2AKqObKFvltEBoPvcVwNwmavxOy3IDwFAlkWCWPBqhJDC8GtsCPlGYI8ciQyRI+3/CLHHscysXvf0ynzWIOQsPr3wWllkxNQskD+b82/Ihi8qCCm150XpObXnc2RFs+cJqRhAE5AHpI8BOZbH5TQdlXB8JAUEIC4AvkFPSMEl/dQ+v74+2/bl6enFtm/v72+W/c/eHSW3CUNRGNZyjgiZNHE6fW2b6f63VGScCHSvI7CxjfH/tYnTU43CywFiAfnT/On+lunH3274R5G2zbv03rTj9F+z92+U7pqPX52PZjdM35uf6vxs3ofp799Kulf2B8CEc2JVjvJm6OIT5CO9PekvD/8T767XgTc2z1umnEdggyT5eX2s+k9yGpvH1kqvI523IVfSAzdlW2gbu3zn5+6j/JFcfIft0lBOi4/J6cbmBTZJTdPo9fV1/3pamqTUFCalOVkunVdNTU5bSa2Nn7ULjl0A7o5/aGt6Z6TKUpVC7/VLSrWzqTo7b+yzO+9i28shHtugl5cXXS9NLnyYHVZ+Nz79UG7y4in7Aqza9po+tBsXP1B8wCW3m01yVqq9G3w3q/X+/1lpZ5WEbKdOTnNsxiYtd+ngjl28Fw+zhwGwLA0/mDeIS46AxWnO2MVnUFD627+sasuAxyJpTsp3A+6WgnplGpILpL1JR21lZt5k2ZSrFPE41AteEy+Q9qrn58qW77lNM877sXXq+fcGLp/2giETZO5tTYumHObxKDQ0aezhxb2feNE0MWlvqZS1SzwsJZdslu3x9fYae8HFXYeAKcIVejxwzgwc0YE6jTzuWOAuqOS+GTY3rc+rmDxAKn7VEPAt+amm/7Yu8ev0gfnkHckljT8nSoaf/RkeNgUejaKburGiYt696FNIcXrt/3yJh8Qba+advg0BwJCk66Qamp3WvxtX1gMzSDZya+BU8y2OR+ogyk7w5h+Nox+/6S04pNunwKqpt9Db9yemA2GokjqThGR+ms1JeYMe92hu5y2Zbs5O5be7mkru2Hlpgc5j434M1NPiq0qqgXoaDkwqTU21V0s7dgY/TfLX9XMT1udx56RJqTqf5aqlR3vVqtOWaYpbp4NtW2tmPaXbwAZI0U1zroI/tiRW9oBVOtL5QT6uu2TH0nlgnXRSqsLkGXg+JnBTCjopVeGceXk2FnAtColkUynGMn1SrHXejq3Py4U5wHXZvtluJtXO27H+vFyMB9xElFIxNQ6fUmFj9Xm6Sr67SrA6b94Gfp4HLsb2rSM53VSMpseK1c7bsXbechs4zgO3EiUvs6kK7tgsUmlglaLkZiZVStzOBzoPrJHOS1VgVR5YuTPXz1VgXR5YM/+u9xglkyZRT2WqghlbnVc8CA+4mtxRp5vB7XxW7bw3LwvywI0pr5MN6HNNrUi/fUZO4o6tzxuiuO0GuLzUUdu3GOV3M6raeTu2Nm8aR+eBlVD1BnoVjowt0HBgnY51PrqdT/9yxtJ5YHWkeGKswoxJuMcGuIYoKdowKOQ4Xxov+4Zb/khU8Mf681a3gZ/0gYt1PjGdV1J2/mBS5z/58zrbQOeBE6zpGZgA7smRzgc6D2xKlORlCiUVKrfSslMAVulI56PX+XHv81g6D6yPFM+MVWCJDliLJdfoMhVYowPWYsk1ukwF1uiAu1R/Hh5v2wNb8r+9O0pBGAaiKLqdm/1vUCiFSCdhTIjWhntAwefY5sMxRW1ToJnZ89KjQTnuGzGUWB1DLkJtul0ofocn3SOf5wMu3mu97q30GN2e99he2gKEpj6Dkvwjj4tebb5d8EBAuhuUJJ87f96f4aT/1OlNz7GRfgg+WheCUFsfE16cpEFNx5exIUmHx09zd34AaRdACCDp+TVLSlFv1blzgKR2egx5zx/see0pn+djbR4FIVofz4/UeV67G3+vr3niC+H04Oz/nbwA7lqtm+wByfQAAAAASUVORK5CYII=') no-repeat;\n\twidth: 21px;\n\theight: 21px;\n\tbackground-position: 0 -598px;\n}\n\n.font-graph-geSprite-noarrow {\n\tbackground: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAABeQCAMAAAByzXKPAAAA1VBMVEUAAAAzMzIzMzIzMzE1NTUzMzIzMzIzMzEzMzIyMjIzMzIzMzIzMzIzMzE6OjoyMjIzMzIzMzIzMzEzMzI0NDA0NDIwMDAyMjEzMzIzMzEzMzE0NDAzMzMzMzIyMjIzMzI0NDE0NDQyMjIzMzIzMzIzMzIzMzM5OTkAAAC1tbX///9mZmYwMDAQEBAmJiZTiPJ7e3v/Z2RwcHAgICB+fn5hYWFzc3NAQECoqKiampqMjIxTU1NGRkY3NzcbGxsNDQ3w8PBQUFDg4ODAwMCwsLCgoKBPT09W+xp5AAAAKHRSTlMAh4DDEd187+mljnhvVge5nmhMQi4hA8uxk2IlHOOYc102M/jW088J/2liTQAACt5JREFUeNrs3O1um0AQheG5nIPCoIq1Q7+r/Mn9X1K9xtEAM9RLQmODzyO1cV+NtzjShhjHkRkAgn9DMCaYnRXIGOQdtWmk1zRWm0vNN6az+Y+v2fXZ5iTX/kZ4ZGvUNT6/RJuCM/VVRKFB7YBwtnY1k3h2wboaHy8RFQC2VGuc1D730WWLS2GIZ27aM4yUT+9tXaLNw9m0mI9uokepRLeC+ZyCfFCoqwckqV3WBHFZaxHLFrNxVpgUVRWjg/jli2WbfH4WyxYnWcVV0Rz7FYj26X9ezQcuE3VYkXzFSYpm9eq6pqSiuNYAaj+r0GiFxKv5tEOqxVfV0utrCkZF/HCXTuOdGz2IHKbDR5wdJ6PdeRmIsfviED0C5ZV7ojf487v59fPHsT18//a1Yn1HJdoSjIUXBG5XgaBejhMYVmT9B1dRUONj4KtyRHNmNkULDYeD2CGVjiZ0paOK1jVuYKIpjJTO7m9dovvEn3bz/DH4440f2+d9fvlVh+4LLuK6cM8GVcKKkmq3ZqqBfbhaef4n+pijBudNZH3H+OW3No+rbTmVXjfciPbs/GVQ7QU6tWqUW5lonefHfn5f6xI9DAxdqQU3n55uU821mj2ZuUq0SYo2ivA5tThxk3rK6u+urYtZiqKuGiWMEkbp4/OFLITIvyrfekt35WGvjvP6OlERwP6+VU39z+ansp+0SThP8jk+0SeoAehRjObmdha0f2YwfucMss7uaPVF3rThN/EH6fH3YhEt3bD1zMlwGtu8/8a5zrHJuR6NyrkKMK5N5qqf9ev6Y4hfGfSPrc7ZWZqPQrQPa+x5Cfe8FO55m3Xrcs8T3TFUYQ0zqj5jTPoMmagQz4brFh8D3x5L9OngyRy+IEa0JgBRlaBWAIJYyVYjYDF47PwNV/TwAIRfB+BiFcyeolchija6+P7xd//IveI+JlpwnrdZP7xexdD6/4N/PDzP06NZdc8vP4H7WKFXLbqjQcU9T7QZvFhHdN/+sndmy6lCQRQ9KOA8Ro1TxjttYuUlX5BK5f+/6YJIWjlNFREkpLJXGQuWO01e2mPaU4pA17qH7iEeKfRsrrqh4/t0hJQPEJSokULPFpJse0Iu0PNQNVSNnOu8ZHPWZc8TUhkBgECRikZMrp4Xq9W1NPubkIIUm4hnrtyikSIjq+jck3bOBQkpnSBrkU97ALl73pJqXfFc5AlJqN3cXvoTEKIzJcu5PSEFqHiGp6ahz+33Z3rWtpzhEfK16DO8XXi3S2vIvfUCHnpWrcsZHiHVAFUG0KQJoEgjGjGRFG1l9bq25gyPkIoANBcEab9DEPf27iCk40VbWa0uP86WkMsTQHPQHBSnJJHCytp1dW9Uz2cBQoo0PEqVes/r2bM0131CLtLzUCVUidw9n6uuaPY8IdnUYMet2BTccUtIfShnz60mBe65JaTunL/tVqTAbbeE1ImCc3vl16McIEiWc3tCClD5DM9Ak7ZFZCBkZEVzhkfI5/n6Hbdp+wF33BJSH8rZc6vISB/gnltCas/Z225FStdz2y0hZXE19lrt5p177NyR11+OHb/THhzJP86wP2uYrjvz1h92eTseNEzDbB2nd/OY1Py9WNw6/qjnN+fmvnmwnYkxjf1t+mAW7XlsbzaJ3a7DzH1sf3Udp7m/dcOf615sW26SdfvGrCaxbV4l9nEan0X0xqEaRrbvmnlrGFu3PTN3ndUoLOuapW8ODLzudLVomMHA71z/MwmT9mTmN+bOZnS9NcJDs+V53t+WPzQnbNa9/nRoCPl2AKqObKFvltEBoPvcVwNwmavxOy3IDwFAlkWCWPBqhJDC8GtsCPlGYI8ciQyRI+3/CLHHscysXvf0ynzWIOQsPr3wWllkxNQskD+b82/Ihi8qCCm150XpObXnc2RFs+cJqRhAE5AHpI8BOZbH5TQdlXB8JAUEIC4AvkFPSMEl/dQ+v74+2/bl6enFtm/v72+W/c/eHSW3CUNRGNZyjgiZNHE6fW2b6f63VGScCHSvI7CxjfH/tYnTU43CywFiAfnT/On+lunH3274R5G2zbv03rTj9F+z92+U7pqPX52PZjdM35uf6vxs3ofp799Kulf2B8CEc2JVjvJm6OIT5CO9PekvD/8T767XgTc2z1umnEdggyT5eX2s+k9yGpvH1kqvI523IVfSAzdlW2gbu3zn5+6j/JFcfIft0lBOi4/J6cbmBTZJTdPo9fV1/3pamqTUFCalOVkunVdNTU5bSa2Nn7ULjl0A7o5/aGt6Z6TKUpVC7/VLSrWzqTo7b+yzO+9i28shHtugl5cXXS9NLnyYHVZ+Nz79UG7y4in7Aqza9po+tBsXP1B8wCW3m01yVqq9G3w3q/X+/1lpZ5WEbKdOTnNsxiYtd+ngjl28Fw+zhwGwLA0/mDeIS46AxWnO2MVnUFD627+sasuAxyJpTsp3A+6WgnplGpILpL1JR21lZt5k2ZSrFPE41AteEy+Q9qrn58qW77lNM877sXXq+fcGLp/2giETZO5tTYumHObxKDQ0aezhxb2feNE0MWlvqZS1SzwsJZdslu3x9fYae8HFXYeAKcIVejxwzgwc0YE6jTzuWOAuqOS+GTY3rc+rmDxAKn7VEPAt+amm/7Yu8ev0gfnkHckljT8nSoaf/RkeNgUejaKburGiYt696FNIcXrt/3yJh8Qba+advg0BwJCk66Qamp3WvxtX1gMzSDZya+BU8y2OR+ogyk7w5h+Nox+/6S04pNunwKqpt9Db9yemA2GokjqThGR+ms1JeYMe92hu5y2Zbs5O5be7mkru2Hlpgc5j434M1NPiq0qqgXoaDkwqTU21V0s7dgY/TfLX9XMT1udx56RJqTqf5aqlR3vVqtOWaYpbp4NtW2tmPaXbwAZI0U1zroI/tiRW9oBVOtL5QT6uu2TH0nlgnXRSqsLkGXg+JnBTCjopVeGceXk2FnAtColkUynGMn1SrHXejq3Py4U5wHXZvtluJtXO27H+vFyMB9xElFIxNQ6fUmFj9Xm6Sr67SrA6b94Gfp4HLsb2rSM53VSMpseK1c7bsXbechs4zgO3EiUvs6kK7tgsUmlglaLkZiZVStzOBzoPrJHOS1VgVR5YuTPXz1VgXR5YM/+u9xglkyZRT2WqghlbnVc8CA+4mtxRp5vB7XxW7bw3LwvywI0pr5MN6HNNrUi/fUZO4o6tzxuiuO0GuLzUUdu3GOV3M6raeTu2Nm8aR+eBlVD1BnoVjowt0HBgnY51PrqdT/9yxtJ5YHWkeGKswoxJuMcGuIYoKdowKOQ4Xxov+4Zb/khU8Mf681a3gZ/0gYt1PjGdV1J2/mBS5z/58zrbQOeBE6zpGZgA7smRzgc6D2xKlORlCiUVKrfSslMAVulI56PX+XHv81g6D6yPFM+MVWCJDliLJdfoMhVYowPWYsk1ukwF1uiAu1R/Hh5v2wNb8r+9O0pBGAaiKLqdm/1vUCiFSCdhTIjWhntAwefY5sMxRW1ToJnZ89KjQTnuGzGUWB1DLkJtul0ofocn3SOf5wMu3mu97q30GN2e99he2gKEpj6Dkvwjj4tebb5d8EBAuhuUJJ87f96f4aT/1OlNz7GRfgg+WheCUFsfE16cpEFNx5exIUmHx09zd34AaRdACCDp+TVLSlFv1blzgKR2egx5zx/see0pn+djbR4FIVofz4/UeV67G3+vr3niC+H04Oz/nbwA7lqtm+wByfQAAAAASUVORK5CYII=') no-repeat;\n\twidth: 21px;\n\theight: 21px;\n\tbackground-position: 0 -1334px;\n}\n\n.font-graph-geSprite-endclassic {\n\tbackground: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAABeQCAMAAAByzXKPAAAA1VBMVEUAAAAzMzIzMzIzMzE1NTUzMzIzMzIzMzEzMzIyMjIzMzIzMzIzMzIzMzE6OjoyMjIzMzIzMzIzMzEzMzI0NDA0NDIwMDAyMjEzMzIzMzEzMzE0NDAzMzMzMzIyMjIzMzI0NDE0NDQyMjIzMzIzMzIzMzIzMzM5OTkAAAC1tbX///9mZmYwMDAQEBAmJiZTiPJ7e3v/Z2RwcHAgICB+fn5hYWFzc3NAQECoqKiampqMjIxTU1NGRkY3NzcbGxsNDQ3w8PBQUFDg4ODAwMCwsLCgoKBPT09W+xp5AAAAKHRSTlMAh4DDEd187+mljnhvVge5nmhMQi4hA8uxk2IlHOOYc102M/jW088J/2liTQAACt5JREFUeNrs3O1um0AQheG5nIPCoIq1Q7+r/Mn9X1K9xtEAM9RLQmODzyO1cV+NtzjShhjHkRkAgn9DMCaYnRXIGOQdtWmk1zRWm0vNN6az+Y+v2fXZ5iTX/kZ4ZGvUNT6/RJuCM/VVRKFB7YBwtnY1k3h2wboaHy8RFQC2VGuc1D730WWLS2GIZ27aM4yUT+9tXaLNw9m0mI9uokepRLeC+ZyCfFCoqwckqV3WBHFZaxHLFrNxVpgUVRWjg/jli2WbfH4WyxYnWcVV0Rz7FYj26X9ezQcuE3VYkXzFSYpm9eq6pqSiuNYAaj+r0GiFxKv5tEOqxVfV0utrCkZF/HCXTuOdGz2IHKbDR5wdJ6PdeRmIsfviED0C5ZV7ojf487v59fPHsT18//a1Yn1HJdoSjIUXBG5XgaBejhMYVmT9B1dRUONj4KtyRHNmNkULDYeD2CGVjiZ0paOK1jVuYKIpjJTO7m9dovvEn3bz/DH4440f2+d9fvlVh+4LLuK6cM8GVcKKkmq3ZqqBfbhaef4n+pijBudNZH3H+OW3No+rbTmVXjfciPbs/GVQ7QU6tWqUW5lonefHfn5f6xI9DAxdqQU3n55uU821mj2ZuUq0SYo2ivA5tThxk3rK6u+urYtZiqKuGiWMEkbp4/OFLITIvyrfekt35WGvjvP6OlERwP6+VU39z+ansp+0SThP8jk+0SeoAehRjObmdha0f2YwfucMss7uaPVF3rThN/EH6fH3YhEt3bD1zMlwGtu8/8a5zrHJuR6NyrkKMK5N5qqf9ev6Y4hfGfSPrc7ZWZqPQrQPa+x5Cfe8FO55m3Xrcs8T3TFUYQ0zqj5jTPoMmagQz4brFh8D3x5L9OngyRy+IEa0JgBRlaBWAIJYyVYjYDF47PwNV/TwAIRfB+BiFcyeolchija6+P7xd//IveI+JlpwnrdZP7xexdD6/4N/PDzP06NZdc8vP4H7WKFXLbqjQcU9T7QZvFhHdN/+sndmy6lCQRQ9KOA8Ro1TxjttYuUlX5BK5f+/6YJIWjlNFREkpLJXGQuWO01e2mPaU4pA17qH7iEeKfRsrrqh4/t0hJQPEJSokULPFpJse0Iu0PNQNVSNnOu8ZHPWZc8TUhkBgECRikZMrp4Xq9W1NPubkIIUm4hnrtyikSIjq+jck3bOBQkpnSBrkU97ALl73pJqXfFc5AlJqN3cXvoTEKIzJcu5PSEFqHiGp6ahz+33Z3rWtpzhEfK16DO8XXi3S2vIvfUCHnpWrcsZHiHVAFUG0KQJoEgjGjGRFG1l9bq25gyPkIoANBcEab9DEPf27iCk40VbWa0uP86WkMsTQHPQHBSnJJHCytp1dW9Uz2cBQoo0PEqVes/r2bM0131CLtLzUCVUidw9n6uuaPY8IdnUYMet2BTccUtIfShnz60mBe65JaTunL/tVqTAbbeE1ImCc3vl16McIEiWc3tCClD5DM9Ak7ZFZCBkZEVzhkfI5/n6Hbdp+wF33BJSH8rZc6vISB/gnltCas/Z225FStdz2y0hZXE19lrt5p177NyR11+OHb/THhzJP86wP2uYrjvz1h92eTseNEzDbB2nd/OY1Py9WNw6/qjnN+fmvnmwnYkxjf1t+mAW7XlsbzaJ3a7DzH1sf3Udp7m/dcOf615sW26SdfvGrCaxbV4l9nEan0X0xqEaRrbvmnlrGFu3PTN3ndUoLOuapW8ODLzudLVomMHA71z/MwmT9mTmN+bOZnS9NcJDs+V53t+WPzQnbNa9/nRoCPl2AKqObKFvltEBoPvcVwNwmavxOy3IDwFAlkWCWPBqhJDC8GtsCPlGYI8ciQyRI+3/CLHHscysXvf0ynzWIOQsPr3wWllkxNQskD+b82/Ihi8qCCm150XpObXnc2RFs+cJqRhAE5AHpI8BOZbH5TQdlXB8JAUEIC4AvkFPSMEl/dQ+v74+2/bl6enFtm/v72+W/c/eHSW3CUNRGNZyjgiZNHE6fW2b6f63VGScCHSvI7CxjfH/tYnTU43CywFiAfnT/On+lunH3274R5G2zbv03rTj9F+z92+U7pqPX52PZjdM35uf6vxs3ofp799Kulf2B8CEc2JVjvJm6OIT5CO9PekvD/8T767XgTc2z1umnEdggyT5eX2s+k9yGpvH1kqvI523IVfSAzdlW2gbu3zn5+6j/JFcfIft0lBOi4/J6cbmBTZJTdPo9fV1/3pamqTUFCalOVkunVdNTU5bSa2Nn7ULjl0A7o5/aGt6Z6TKUpVC7/VLSrWzqTo7b+yzO+9i28shHtugl5cXXS9NLnyYHVZ+Nz79UG7y4in7Aqza9po+tBsXP1B8wCW3m01yVqq9G3w3q/X+/1lpZ5WEbKdOTnNsxiYtd+ngjl28Fw+zhwGwLA0/mDeIS46AxWnO2MVnUFD627+sasuAxyJpTsp3A+6WgnplGpILpL1JR21lZt5k2ZSrFPE41AteEy+Q9qrn58qW77lNM877sXXq+fcGLp/2giETZO5tTYumHObxKDQ0aezhxb2feNE0MWlvqZS1SzwsJZdslu3x9fYae8HFXYeAKcIVejxwzgwc0YE6jTzuWOAuqOS+GTY3rc+rmDxAKn7VEPAt+amm/7Yu8ev0gfnkHckljT8nSoaf/RkeNgUejaKburGiYt696FNIcXrt/3yJh8Qba+advg0BwJCk66Qamp3WvxtX1gMzSDZya+BU8y2OR+ogyk7w5h+Nox+/6S04pNunwKqpt9Db9yemA2GokjqThGR+ms1JeYMe92hu5y2Zbs5O5be7mkru2Hlpgc5j434M1NPiq0qqgXoaDkwqTU21V0s7dgY/TfLX9XMT1udx56RJqTqf5aqlR3vVqtOWaYpbp4NtW2tmPaXbwAZI0U1zroI/tiRW9oBVOtL5QT6uu2TH0nlgnXRSqsLkGXg+JnBTCjopVeGceXk2FnAtColkUynGMn1SrHXejq3Py4U5wHXZvtluJtXO27H+vFyMB9xElFIxNQ6fUmFj9Xm6Sr67SrA6b94Gfp4HLsb2rSM53VSMpseK1c7bsXbechs4zgO3EiUvs6kK7tgsUmlglaLkZiZVStzOBzoPrJHOS1VgVR5YuTPXz1VgXR5YM/+u9xglkyZRT2WqghlbnVc8CA+4mtxRp5vB7XxW7bw3LwvywI0pr5MN6HNNrUi/fUZO4o6tzxuiuO0GuLzUUdu3GOV3M6raeTu2Nm8aR+eBlVD1BnoVjowt0HBgnY51PrqdT/9yxtJ5YHWkeGKswoxJuMcGuIYoKdowKOQ4Xxov+4Zb/khU8Mf681a3gZ/0gYt1PjGdV1J2/mBS5z/58zrbQOeBE6zpGZgA7smRzgc6D2xKlORlCiUVKrfSslMAVulI56PX+XHv81g6D6yPFM+MVWCJDliLJdfoMhVYowPWYsk1ukwF1uiAu1R/Hh5v2wNb8r+9O0pBGAaiKLqdm/1vUCiFSCdhTIjWhntAwefY5sMxRW1ToJnZ89KjQTnuGzGUWB1DLkJtul0ofocn3SOf5wMu3mu97q30GN2e99he2gKEpj6Dkvwjj4tebb5d8EBAuhuUJJ87f96f4aT/1OlNz7GRfgg+WheCUFsfE16cpEFNx5exIUmHx09zd34AaRdACCDp+TVLSlFv1blzgKR2egx5zx/see0pn+djbR4FIVofz4/UeV67G3+vr3niC+H04Oz/nbwA7lqtm+wByfQAAAAASUVORK5CYII=') no-repeat;\n\twidth: 21px;\n\theight: 21px;\n\tbackground-position: 0 -1380px;\n}\n\n.font-graph-geSprite-endopen {\n\tbackground: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAABeQCAMAAAByzXKPAAAA1VBMVEUAAAAzMzIzMzIzMzE1NTUzMzIzMzIzMzEzMzIyMjIzMzIzMzIzMzIzMzE6OjoyMjIzMzIzMzIzMzEzMzI0NDA0NDIwMDAyMjEzMzIzMzEzMzE0NDAzMzMzMzIyMjIzMzI0NDE0NDQyMjIzMzIzMzIzMzIzMzM5OTkAAAC1tbX///9mZmYwMDAQEBAmJiZTiPJ7e3v/Z2RwcHAgICB+fn5hYWFzc3NAQECoqKiampqMjIxTU1NGRkY3NzcbGxsNDQ3w8PBQUFDg4ODAwMCwsLCgoKBPT09W+xp5AAAAKHRSTlMAh4DDEd187+mljnhvVge5nmhMQi4hA8uxk2IlHOOYc102M/jW088J/2liTQAACt5JREFUeNrs3O1um0AQheG5nIPCoIq1Q7+r/Mn9X1K9xtEAM9RLQmODzyO1cV+NtzjShhjHkRkAgn9DMCaYnRXIGOQdtWmk1zRWm0vNN6az+Y+v2fXZ5iTX/kZ4ZGvUNT6/RJuCM/VVRKFB7YBwtnY1k3h2wboaHy8RFQC2VGuc1D730WWLS2GIZ27aM4yUT+9tXaLNw9m0mI9uokepRLeC+ZyCfFCoqwckqV3WBHFZaxHLFrNxVpgUVRWjg/jli2WbfH4WyxYnWcVV0Rz7FYj26X9ezQcuE3VYkXzFSYpm9eq6pqSiuNYAaj+r0GiFxKv5tEOqxVfV0utrCkZF/HCXTuOdGz2IHKbDR5wdJ6PdeRmIsfviED0C5ZV7ojf487v59fPHsT18//a1Yn1HJdoSjIUXBG5XgaBejhMYVmT9B1dRUONj4KtyRHNmNkULDYeD2CGVjiZ0paOK1jVuYKIpjJTO7m9dovvEn3bz/DH4440f2+d9fvlVh+4LLuK6cM8GVcKKkmq3ZqqBfbhaef4n+pijBudNZH3H+OW3No+rbTmVXjfciPbs/GVQ7QU6tWqUW5lonefHfn5f6xI9DAxdqQU3n55uU821mj2ZuUq0SYo2ivA5tThxk3rK6u+urYtZiqKuGiWMEkbp4/OFLITIvyrfekt35WGvjvP6OlERwP6+VU39z+ansp+0SThP8jk+0SeoAehRjObmdha0f2YwfucMss7uaPVF3rThN/EH6fH3YhEt3bD1zMlwGtu8/8a5zrHJuR6NyrkKMK5N5qqf9ev6Y4hfGfSPrc7ZWZqPQrQPa+x5Cfe8FO55m3Xrcs8T3TFUYQ0zqj5jTPoMmagQz4brFh8D3x5L9OngyRy+IEa0JgBRlaBWAIJYyVYjYDF47PwNV/TwAIRfB+BiFcyeolchija6+P7xd//IveI+JlpwnrdZP7xexdD6/4N/PDzP06NZdc8vP4H7WKFXLbqjQcU9T7QZvFhHdN/+sndmy6lCQRQ9KOA8Ro1TxjttYuUlX5BK5f+/6YJIWjlNFREkpLJXGQuWO01e2mPaU4pA17qH7iEeKfRsrrqh4/t0hJQPEJSokULPFpJse0Iu0PNQNVSNnOu8ZHPWZc8TUhkBgECRikZMrp4Xq9W1NPubkIIUm4hnrtyikSIjq+jck3bOBQkpnSBrkU97ALl73pJqXfFc5AlJqN3cXvoTEKIzJcu5PSEFqHiGp6ahz+33Z3rWtpzhEfK16DO8XXi3S2vIvfUCHnpWrcsZHiHVAFUG0KQJoEgjGjGRFG1l9bq25gyPkIoANBcEab9DEPf27iCk40VbWa0uP86WkMsTQHPQHBSnJJHCytp1dW9Uz2cBQoo0PEqVes/r2bM0131CLtLzUCVUidw9n6uuaPY8IdnUYMet2BTccUtIfShnz60mBe65JaTunL/tVqTAbbeE1ImCc3vl16McIEiWc3tCClD5DM9Ak7ZFZCBkZEVzhkfI5/n6Hbdp+wF33BJSH8rZc6vISB/gnltCas/Z225FStdz2y0hZXE19lrt5p177NyR11+OHb/THhzJP86wP2uYrjvz1h92eTseNEzDbB2nd/OY1Py9WNw6/qjnN+fmvnmwnYkxjf1t+mAW7XlsbzaJ3a7DzH1sf3Udp7m/dcOf615sW26SdfvGrCaxbV4l9nEan0X0xqEaRrbvmnlrGFu3PTN3ndUoLOuapW8ODLzudLVomMHA71z/MwmT9mTmN+bOZnS9NcJDs+V53t+WPzQnbNa9/nRoCPl2AKqObKFvltEBoPvcVwNwmavxOy3IDwFAlkWCWPBqhJDC8GtsCPlGYI8ciQyRI+3/CLHHscysXvf0ynzWIOQsPr3wWllkxNQskD+b82/Ihi8qCCm150XpObXnc2RFs+cJqRhAE5AHpI8BOZbH5TQdlXB8JAUEIC4AvkFPSMEl/dQ+v74+2/bl6enFtm/v72+W/c/eHSW3CUNRGNZyjgiZNHE6fW2b6f63VGScCHSvI7CxjfH/tYnTU43CywFiAfnT/On+lunH3274R5G2zbv03rTj9F+z92+U7pqPX52PZjdM35uf6vxs3ofp799Kulf2B8CEc2JVjvJm6OIT5CO9PekvD/8T767XgTc2z1umnEdggyT5eX2s+k9yGpvH1kqvI523IVfSAzdlW2gbu3zn5+6j/JFcfIft0lBOi4/J6cbmBTZJTdPo9fV1/3pamqTUFCalOVkunVdNTU5bSa2Nn7ULjl0A7o5/aGt6Z6TKUpVC7/VLSrWzqTo7b+yzO+9i28shHtugl5cXXS9NLnyYHVZ+Nz79UG7y4in7Aqza9po+tBsXP1B8wCW3m01yVqq9G3w3q/X+/1lpZ5WEbKdOTnNsxiYtd+ngjl28Fw+zhwGwLA0/mDeIS46AxWnO2MVnUFD627+sasuAxyJpTsp3A+6WgnplGpILpL1JR21lZt5k2ZSrFPE41AteEy+Q9qrn58qW77lNM877sXXq+fcGLp/2giETZO5tTYumHObxKDQ0aezhxb2feNE0MWlvqZS1SzwsJZdslu3x9fYae8HFXYeAKcIVejxwzgwc0YE6jTzuWOAuqOS+GTY3rc+rmDxAKn7VEPAt+amm/7Yu8ev0gfnkHckljT8nSoaf/RkeNgUejaKburGiYt696FNIcXrt/3yJh8Qba+advg0BwJCk66Qamp3WvxtX1gMzSDZya+BU8y2OR+ogyk7w5h+Nox+/6S04pNunwKqpt9Db9yemA2GokjqThGR+ms1JeYMe92hu5y2Zbs5O5be7mkru2Hlpgc5j434M1NPiq0qqgXoaDkwqTU21V0s7dgY/TfLX9XMT1udx56RJqTqf5aqlR3vVqtOWaYpbp4NtW2tmPaXbwAZI0U1zroI/tiRW9oBVOtL5QT6uu2TH0nlgnXRSqsLkGXg+JnBTCjopVeGceXk2FnAtColkUynGMn1SrHXejq3Py4U5wHXZvtluJtXO27H+vFyMB9xElFIxNQ6fUmFj9Xm6Sr67SrA6b94Gfp4HLsb2rSM53VSMpseK1c7bsXbechs4zgO3EiUvs6kK7tgsUmlglaLkZiZVStzOBzoPrJHOS1VgVR5YuTPXz1VgXR5YM/+u9xglkyZRT2WqghlbnVc8CA+4mtxRp5vB7XxW7bw3LwvywI0pr5MN6HNNrUi/fUZO4o6tzxuiuO0GuLzUUdu3GOV3M6raeTu2Nm8aR+eBlVD1BnoVjowt0HBgnY51PrqdT/9yxtJ5YHWkeGKswoxJuMcGuIYoKdowKOQ4Xxov+4Zb/khU8Mf681a3gZ/0gYt1PjGdV1J2/mBS5z/58zrbQOeBE6zpGZgA7smRzgc6D2xKlORlCiUVKrfSslMAVulI56PX+XHv81g6D6yPFM+MVWCJDliLJdfoMhVYowPWYsk1ukwF1uiAu1R/Hh5v2wNb8r+9O0pBGAaiKLqdm/1vUCiFSCdhTIjWhntAwefY5sMxRW1ToJnZ89KjQTnuGzGUWB1DLkJtul0ofocn3SOf5wMu3mu97q30GN2e99he2gKEpj6Dkvwjj4tebb5d8EBAuhuUJJ87f96f4aT/1OlNz7GRfgg+WheCUFsfE16cpEFNx5exIUmHx09zd34AaRdACCDp+TVLSlFv1blzgKR2egx5zx/see0pn+djbR4FIVofz4/UeV67G3+vr3niC+H04Oz/nbwA7lqtm+wByfQAAAAASUVORK5CYII=') no-repeat;\n\twidth: 21px;\n\theight: 21px;\n\tbackground-position: 0 -1426px;\n}\n\n.font-graph-geSprite-endblock {\n\tbackground: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAABeQCAMAAAByzXKPAAAA1VBMVEUAAAAzMzIzMzIzMzE1NTUzMzIzMzIzMzEzMzIyMjIzMzIzMzIzMzIzMzE6OjoyMjIzMzIzMzIzMzEzMzI0NDA0NDIwMDAyMjEzMzIzMzEzMzE0NDAzMzMzMzIyMjIzMzI0NDE0NDQyMjIzMzIzMzIzMzIzMzM5OTkAAAC1tbX///9mZmYwMDAQEBAmJiZTiPJ7e3v/Z2RwcHAgICB+fn5hYWFzc3NAQECoqKiampqMjIxTU1NGRkY3NzcbGxsNDQ3w8PBQUFDg4ODAwMCwsLCgoKBPT09W+xp5AAAAKHRSTlMAh4DDEd187+mljnhvVge5nmhMQi4hA8uxk2IlHOOYc102M/jW088J/2liTQAACt5JREFUeNrs3O1um0AQheG5nIPCoIq1Q7+r/Mn9X1K9xtEAM9RLQmODzyO1cV+NtzjShhjHkRkAgn9DMCaYnRXIGOQdtWmk1zRWm0vNN6az+Y+v2fXZ5iTX/kZ4ZGvUNT6/RJuCM/VVRKFB7YBwtnY1k3h2wboaHy8RFQC2VGuc1D730WWLS2GIZ27aM4yUT+9tXaLNw9m0mI9uokepRLeC+ZyCfFCoqwckqV3WBHFZaxHLFrNxVpgUVRWjg/jli2WbfH4WyxYnWcVV0Rz7FYj26X9ezQcuE3VYkXzFSYpm9eq6pqSiuNYAaj+r0GiFxKv5tEOqxVfV0utrCkZF/HCXTuOdGz2IHKbDR5wdJ6PdeRmIsfviED0C5ZV7ojf487v59fPHsT18//a1Yn1HJdoSjIUXBG5XgaBejhMYVmT9B1dRUONj4KtyRHNmNkULDYeD2CGVjiZ0paOK1jVuYKIpjJTO7m9dovvEn3bz/DH4440f2+d9fvlVh+4LLuK6cM8GVcKKkmq3ZqqBfbhaef4n+pijBudNZH3H+OW3No+rbTmVXjfciPbs/GVQ7QU6tWqUW5lonefHfn5f6xI9DAxdqQU3n55uU821mj2ZuUq0SYo2ivA5tThxk3rK6u+urYtZiqKuGiWMEkbp4/OFLITIvyrfekt35WGvjvP6OlERwP6+VU39z+ansp+0SThP8jk+0SeoAehRjObmdha0f2YwfucMss7uaPVF3rThN/EH6fH3YhEt3bD1zMlwGtu8/8a5zrHJuR6NyrkKMK5N5qqf9ev6Y4hfGfSPrc7ZWZqPQrQPa+x5Cfe8FO55m3Xrcs8T3TFUYQ0zqj5jTPoMmagQz4brFh8D3x5L9OngyRy+IEa0JgBRlaBWAIJYyVYjYDF47PwNV/TwAIRfB+BiFcyeolchija6+P7xd//IveI+JlpwnrdZP7xexdD6/4N/PDzP06NZdc8vP4H7WKFXLbqjQcU9T7QZvFhHdN/+sndmy6lCQRQ9KOA8Ro1TxjttYuUlX5BK5f+/6YJIWjlNFREkpLJXGQuWO01e2mPaU4pA17qH7iEeKfRsrrqh4/t0hJQPEJSokULPFpJse0Iu0PNQNVSNnOu8ZHPWZc8TUhkBgECRikZMrp4Xq9W1NPubkIIUm4hnrtyikSIjq+jck3bOBQkpnSBrkU97ALl73pJqXfFc5AlJqN3cXvoTEKIzJcu5PSEFqHiGp6ahz+33Z3rWtpzhEfK16DO8XXi3S2vIvfUCHnpWrcsZHiHVAFUG0KQJoEgjGjGRFG1l9bq25gyPkIoANBcEab9DEPf27iCk40VbWa0uP86WkMsTQHPQHBSnJJHCytp1dW9Uz2cBQoo0PEqVes/r2bM0131CLtLzUCVUidw9n6uuaPY8IdnUYMet2BTccUtIfShnz60mBe65JaTunL/tVqTAbbeE1ImCc3vl16McIEiWc3tCClD5DM9Ak7ZFZCBkZEVzhkfI5/n6Hbdp+wF33BJSH8rZc6vISB/gnltCas/Z225FStdz2y0hZXE19lrt5p177NyR11+OHb/THhzJP86wP2uYrjvz1h92eTseNEzDbB2nd/OY1Py9WNw6/qjnN+fmvnmwnYkxjf1t+mAW7XlsbzaJ3a7DzH1sf3Udp7m/dcOf615sW26SdfvGrCaxbV4l9nEan0X0xqEaRrbvmnlrGFu3PTN3ndUoLOuapW8ODLzudLVomMHA71z/MwmT9mTmN+bOZnS9NcJDs+V53t+WPzQnbNa9/nRoCPl2AKqObKFvltEBoPvcVwNwmavxOy3IDwFAlkWCWPBqhJDC8GtsCPlGYI8ciQyRI+3/CLHHscysXvf0ynzWIOQsPr3wWllkxNQskD+b82/Ihi8qCCm150XpObXnc2RFs+cJqRhAE5AHpI8BOZbH5TQdlXB8JAUEIC4AvkFPSMEl/dQ+v74+2/bl6enFtm/v72+W/c/eHSW3CUNRGNZyjgiZNHE6fW2b6f63VGScCHSvI7CxjfH/tYnTU43CywFiAfnT/On+lunH3274R5G2zbv03rTj9F+z92+U7pqPX52PZjdM35uf6vxs3ofp799Kulf2B8CEc2JVjvJm6OIT5CO9PekvD/8T767XgTc2z1umnEdggyT5eX2s+k9yGpvH1kqvI523IVfSAzdlW2gbu3zn5+6j/JFcfIft0lBOi4/J6cbmBTZJTdPo9fV1/3pamqTUFCalOVkunVdNTU5bSa2Nn7ULjl0A7o5/aGt6Z6TKUpVC7/VLSrWzqTo7b+yzO+9i28shHtugl5cXXS9NLnyYHVZ+Nz79UG7y4in7Aqza9po+tBsXP1B8wCW3m01yVqq9G3w3q/X+/1lpZ5WEbKdOTnNsxiYtd+ngjl28Fw+zhwGwLA0/mDeIS46AxWnO2MVnUFD627+sasuAxyJpTsp3A+6WgnplGpILpL1JR21lZt5k2ZSrFPE41AteEy+Q9qrn58qW77lNM877sXXq+fcGLp/2giETZO5tTYumHObxKDQ0aezhxb2feNE0MWlvqZS1SzwsJZdslu3x9fYae8HFXYeAKcIVejxwzgwc0YE6jTzuWOAuqOS+GTY3rc+rmDxAKn7VEPAt+amm/7Yu8ev0gfnkHckljT8nSoaf/RkeNgUejaKburGiYt696FNIcXrt/3yJh8Qba+advg0BwJCk66Qamp3WvxtX1gMzSDZya+BU8y2OR+ogyk7w5h+Nox+/6S04pNunwKqpt9Db9yemA2GokjqThGR+ms1JeYMe92hu5y2Zbs5O5be7mkru2Hlpgc5j434M1NPiq0qqgXoaDkwqTU21V0s7dgY/TfLX9XMT1udx56RJqTqf5aqlR3vVqtOWaYpbp4NtW2tmPaXbwAZI0U1zroI/tiRW9oBVOtL5QT6uu2TH0nlgnXRSqsLkGXg+JnBTCjopVeGceXk2FnAtColkUynGMn1SrHXejq3Py4U5wHXZvtluJtXO27H+vFyMB9xElFIxNQ6fUmFj9Xm6Sr67SrA6b94Gfp4HLsb2rSM53VSMpseK1c7bsXbechs4zgO3EiUvs6kK7tgsUmlglaLkZiZVStzOBzoPrJHOS1VgVR5YuTPXz1VgXR5YM/+u9xglkyZRT2WqghlbnVc8CA+4mtxRp5vB7XxW7bw3LwvywI0pr5MN6HNNrUi/fUZO4o6tzxuiuO0GuLzUUdu3GOV3M6raeTu2Nm8aR+eBlVD1BnoVjowt0HBgnY51PrqdT/9yxtJ5YHWkeGKswoxJuMcGuIYoKdowKOQ4Xxov+4Zb/khU8Mf681a3gZ/0gYt1PjGdV1J2/mBS5z/58zrbQOeBE6zpGZgA7smRzgc6D2xKlORlCiUVKrfSslMAVulI56PX+XHv81g6D6yPFM+MVWCJDliLJdfoMhVYowPWYsk1ukwF1uiAu1R/Hh5v2wNb8r+9O0pBGAaiKLqdm/1vUCiFSCdhTIjWhntAwefY5sMxRW1ToJnZ89KjQTnuGzGUWB1DLkJtul0ofocn3SOf5wMu3mu97q30GN2e99he2gKEpj6Dkvwjj4tebb5d8EBAuhuUJJ87f96f4aT/1OlNz7GRfgg+WheCUFsfE16cpEFNx5exIUmHx09zd34AaRdACCDp+TVLSlFv1blzgKR2egx5zx/see0pn+djbR4FIVofz4/UeV67G3+vr3niC+H04Oz/nbwA7lqtm+wByfQAAAAASUVORK5CYII=') no-repeat;\n\twidth: 21px;\n\theight: 21px;\n\tbackground-position: 0 -1472px;\n}\n\n.font-graph-geSprite-endoval {\n\tbackground: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAABeQCAMAAAByzXKPAAAA1VBMVEUAAAAzMzIzMzIzMzE1NTUzMzIzMzIzMzEzMzIyMjIzMzIzMzIzMzIzMzE6OjoyMjIzMzIzMzIzMzEzMzI0NDA0NDIwMDAyMjEzMzIzMzEzMzE0NDAzMzMzMzIyMjIzMzI0NDE0NDQyMjIzMzIzMzIzMzIzMzM5OTkAAAC1tbX///9mZmYwMDAQEBAmJiZTiPJ7e3v/Z2RwcHAgICB+fn5hYWFzc3NAQECoqKiampqMjIxTU1NGRkY3NzcbGxsNDQ3w8PBQUFDg4ODAwMCwsLCgoKBPT09W+xp5AAAAKHRSTlMAh4DDEd187+mljnhvVge5nmhMQi4hA8uxk2IlHOOYc102M/jW088J/2liTQAACt5JREFUeNrs3O1um0AQheG5nIPCoIq1Q7+r/Mn9X1K9xtEAM9RLQmODzyO1cV+NtzjShhjHkRkAgn9DMCaYnRXIGOQdtWmk1zRWm0vNN6az+Y+v2fXZ5iTX/kZ4ZGvUNT6/RJuCM/VVRKFB7YBwtnY1k3h2wboaHy8RFQC2VGuc1D730WWLS2GIZ27aM4yUT+9tXaLNw9m0mI9uokepRLeC+ZyCfFCoqwckqV3WBHFZaxHLFrNxVpgUVRWjg/jli2WbfH4WyxYnWcVV0Rz7FYj26X9ezQcuE3VYkXzFSYpm9eq6pqSiuNYAaj+r0GiFxKv5tEOqxVfV0utrCkZF/HCXTuOdGz2IHKbDR5wdJ6PdeRmIsfviED0C5ZV7ojf487v59fPHsT18//a1Yn1HJdoSjIUXBG5XgaBejhMYVmT9B1dRUONj4KtyRHNmNkULDYeD2CGVjiZ0paOK1jVuYKIpjJTO7m9dovvEn3bz/DH4440f2+d9fvlVh+4LLuK6cM8GVcKKkmq3ZqqBfbhaef4n+pijBudNZH3H+OW3No+rbTmVXjfciPbs/GVQ7QU6tWqUW5lonefHfn5f6xI9DAxdqQU3n55uU821mj2ZuUq0SYo2ivA5tThxk3rK6u+urYtZiqKuGiWMEkbp4/OFLITIvyrfekt35WGvjvP6OlERwP6+VU39z+ansp+0SThP8jk+0SeoAehRjObmdha0f2YwfucMss7uaPVF3rThN/EH6fH3YhEt3bD1zMlwGtu8/8a5zrHJuR6NyrkKMK5N5qqf9ev6Y4hfGfSPrc7ZWZqPQrQPa+x5Cfe8FO55m3Xrcs8T3TFUYQ0zqj5jTPoMmagQz4brFh8D3x5L9OngyRy+IEa0JgBRlaBWAIJYyVYjYDF47PwNV/TwAIRfB+BiFcyeolchija6+P7xd//IveI+JlpwnrdZP7xexdD6/4N/PDzP06NZdc8vP4H7WKFXLbqjQcU9T7QZvFhHdN/+sndmy6lCQRQ9KOA8Ro1TxjttYuUlX5BK5f+/6YJIWjlNFREkpLJXGQuWO01e2mPaU4pA17qH7iEeKfRsrrqh4/t0hJQPEJSokULPFpJse0Iu0PNQNVSNnOu8ZHPWZc8TUhkBgECRikZMrp4Xq9W1NPubkIIUm4hnrtyikSIjq+jck3bOBQkpnSBrkU97ALl73pJqXfFc5AlJqN3cXvoTEKIzJcu5PSEFqHiGp6ahz+33Z3rWtpzhEfK16DO8XXi3S2vIvfUCHnpWrcsZHiHVAFUG0KQJoEgjGjGRFG1l9bq25gyPkIoANBcEab9DEPf27iCk40VbWa0uP86WkMsTQHPQHBSnJJHCytp1dW9Uz2cBQoo0PEqVes/r2bM0131CLtLzUCVUidw9n6uuaPY8IdnUYMet2BTccUtIfShnz60mBe65JaTunL/tVqTAbbeE1ImCc3vl16McIEiWc3tCClD5DM9Ak7ZFZCBkZEVzhkfI5/n6Hbdp+wF33BJSH8rZc6vISB/gnltCas/Z225FStdz2y0hZXE19lrt5p177NyR11+OHb/THhzJP86wP2uYrjvz1h92eTseNEzDbB2nd/OY1Py9WNw6/qjnN+fmvnmwnYkxjf1t+mAW7XlsbzaJ3a7DzH1sf3Udp7m/dcOf615sW26SdfvGrCaxbV4l9nEan0X0xqEaRrbvmnlrGFu3PTN3ndUoLOuapW8ODLzudLVomMHA71z/MwmT9mTmN+bOZnS9NcJDs+V53t+WPzQnbNa9/nRoCPl2AKqObKFvltEBoPvcVwNwmavxOy3IDwFAlkWCWPBqhJDC8GtsCPlGYI8ciQyRI+3/CLHHscysXvf0ynzWIOQsPr3wWllkxNQskD+b82/Ihi8qCCm150XpObXnc2RFs+cJqRhAE5AHpI8BOZbH5TQdlXB8JAUEIC4AvkFPSMEl/dQ+v74+2/bl6enFtm/v72+W/c/eHSW3CUNRGNZyjgiZNHE6fW2b6f63VGScCHSvI7CxjfH/tYnTU43CywFiAfnT/On+lunH3274R5G2zbv03rTj9F+z92+U7pqPX52PZjdM35uf6vxs3ofp799Kulf2B8CEc2JVjvJm6OIT5CO9PekvD/8T767XgTc2z1umnEdggyT5eX2s+k9yGpvH1kqvI523IVfSAzdlW2gbu3zn5+6j/JFcfIft0lBOi4/J6cbmBTZJTdPo9fV1/3pamqTUFCalOVkunVdNTU5bSa2Nn7ULjl0A7o5/aGt6Z6TKUpVC7/VLSrWzqTo7b+yzO+9i28shHtugl5cXXS9NLnyYHVZ+Nz79UG7y4in7Aqza9po+tBsXP1B8wCW3m01yVqq9G3w3q/X+/1lpZ5WEbKdOTnNsxiYtd+ngjl28Fw+zhwGwLA0/mDeIS46AxWnO2MVnUFD627+sasuAxyJpTsp3A+6WgnplGpILpL1JR21lZt5k2ZSrFPE41AteEy+Q9qrn58qW77lNM877sXXq+fcGLp/2giETZO5tTYumHObxKDQ0aezhxb2feNE0MWlvqZS1SzwsJZdslu3x9fYae8HFXYeAKcIVejxwzgwc0YE6jTzuWOAuqOS+GTY3rc+rmDxAKn7VEPAt+amm/7Yu8ev0gfnkHckljT8nSoaf/RkeNgUejaKburGiYt696FNIcXrt/3yJh8Qba+advg0BwJCk66Qamp3WvxtX1gMzSDZya+BU8y2OR+ogyk7w5h+Nox+/6S04pNunwKqpt9Db9yemA2GokjqThGR+ms1JeYMe92hu5y2Zbs5O5be7mkru2Hlpgc5j434M1NPiq0qqgXoaDkwqTU21V0s7dgY/TfLX9XMT1udx56RJqTqf5aqlR3vVqtOWaYpbp4NtW2tmPaXbwAZI0U1zroI/tiRW9oBVOtL5QT6uu2TH0nlgnXRSqsLkGXg+JnBTCjopVeGceXk2FnAtColkUynGMn1SrHXejq3Py4U5wHXZvtluJtXO27H+vFyMB9xElFIxNQ6fUmFj9Xm6Sr67SrA6b94Gfp4HLsb2rSM53VSMpseK1c7bsXbechs4zgO3EiUvs6kK7tgsUmlglaLkZiZVStzOBzoPrJHOS1VgVR5YuTPXz1VgXR5YM/+u9xglkyZRT2WqghlbnVc8CA+4mtxRp5vB7XxW7bw3LwvywI0pr5MN6HNNrUi/fUZO4o6tzxuiuO0GuLzUUdu3GOV3M6raeTu2Nm8aR+eBlVD1BnoVjowt0HBgnY51PrqdT/9yxtJ5YHWkeGKswoxJuMcGuIYoKdowKOQ4Xxov+4Zb/khU8Mf681a3gZ/0gYt1PjGdV1J2/mBS5z/58zrbQOeBE6zpGZgA7smRzgc6D2xKlORlCiUVKrfSslMAVulI56PX+XHv81g6D6yPFM+MVWCJDliLJdfoMhVYowPWYsk1ukwF1uiAu1R/Hh5v2wNb8r+9O0pBGAaiKLqdm/1vUCiFSCdhTIjWhntAwefY5sMxRW1ToJnZ89KjQTnuGzGUWB1DLkJtul0ofocn3SOf5wMu3mu97q30GN2e99he2gKEpj6Dkvwjj4tebb5d8EBAuhuUJJ87f96f4aT/1OlNz7GRfgg+WheCUFsfE16cpEFNx5exIUmHx09zd34AaRdACCDp+TVLSlFv1blzgKR2egx5zx/see0pn+djbR4FIVofz4/UeV67G3+vr3niC+H04Oz/nbwA7lqtm+wByfQAAAAASUVORK5CYII=') no-repeat;\n\twidth: 21px;\n\theight: 21px;\n\tbackground-position: 0 -1518px;\n}\n\n.font-graph-geSprite-enddiamond {\n\tbackground: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAABeQCAMAAAByzXKPAAAA1VBMVEUAAAAzMzIzMzIzMzE1NTUzMzIzMzIzMzEzMzIyMjIzMzIzMzIzMzIzMzE6OjoyMjIzMzIzMzIzMzEzMzI0NDA0NDIwMDAyMjEzMzIzMzEzMzE0NDAzMzMzMzIyMjIzMzI0NDE0NDQyMjIzMzIzMzIzMzIzMzM5OTkAAAC1tbX///9mZmYwMDAQEBAmJiZTiPJ7e3v/Z2RwcHAgICB+fn5hYWFzc3NAQECoqKiampqMjIxTU1NGRkY3NzcbGxsNDQ3w8PBQUFDg4ODAwMCwsLCgoKBPT09W+xp5AAAAKHRSTlMAh4DDEd187+mljnhvVge5nmhMQi4hA8uxk2IlHOOYc102M/jW088J/2liTQAACt5JREFUeNrs3O1um0AQheG5nIPCoIq1Q7+r/Mn9X1K9xtEAM9RLQmODzyO1cV+NtzjShhjHkRkAgn9DMCaYnRXIGOQdtWmk1zRWm0vNN6az+Y+v2fXZ5iTX/kZ4ZGvUNT6/RJuCM/VVRKFB7YBwtnY1k3h2wboaHy8RFQC2VGuc1D730WWLS2GIZ27aM4yUT+9tXaLNw9m0mI9uokepRLeC+ZyCfFCoqwckqV3WBHFZaxHLFrNxVpgUVRWjg/jli2WbfH4WyxYnWcVV0Rz7FYj26X9ezQcuE3VYkXzFSYpm9eq6pqSiuNYAaj+r0GiFxKv5tEOqxVfV0utrCkZF/HCXTuOdGz2IHKbDR5wdJ6PdeRmIsfviED0C5ZV7ojf487v59fPHsT18//a1Yn1HJdoSjIUXBG5XgaBejhMYVmT9B1dRUONj4KtyRHNmNkULDYeD2CGVjiZ0paOK1jVuYKIpjJTO7m9dovvEn3bz/DH4440f2+d9fvlVh+4LLuK6cM8GVcKKkmq3ZqqBfbhaef4n+pijBudNZH3H+OW3No+rbTmVXjfciPbs/GVQ7QU6tWqUW5lonefHfn5f6xI9DAxdqQU3n55uU821mj2ZuUq0SYo2ivA5tThxk3rK6u+urYtZiqKuGiWMEkbp4/OFLITIvyrfekt35WGvjvP6OlERwP6+VU39z+ansp+0SThP8jk+0SeoAehRjObmdha0f2YwfucMss7uaPVF3rThN/EH6fH3YhEt3bD1zMlwGtu8/8a5zrHJuR6NyrkKMK5N5qqf9ev6Y4hfGfSPrc7ZWZqPQrQPa+x5Cfe8FO55m3Xrcs8T3TFUYQ0zqj5jTPoMmagQz4brFh8D3x5L9OngyRy+IEa0JgBRlaBWAIJYyVYjYDF47PwNV/TwAIRfB+BiFcyeolchija6+P7xd//IveI+JlpwnrdZP7xexdD6/4N/PDzP06NZdc8vP4H7WKFXLbqjQcU9T7QZvFhHdN/+sndmy6lCQRQ9KOA8Ro1TxjttYuUlX5BK5f+/6YJIWjlNFREkpLJXGQuWO01e2mPaU4pA17qH7iEeKfRsrrqh4/t0hJQPEJSokULPFpJse0Iu0PNQNVSNnOu8ZHPWZc8TUhkBgECRikZMrp4Xq9W1NPubkIIUm4hnrtyikSIjq+jck3bOBQkpnSBrkU97ALl73pJqXfFc5AlJqN3cXvoTEKIzJcu5PSEFqHiGp6ahz+33Z3rWtpzhEfK16DO8XXi3S2vIvfUCHnpWrcsZHiHVAFUG0KQJoEgjGjGRFG1l9bq25gyPkIoANBcEab9DEPf27iCk40VbWa0uP86WkMsTQHPQHBSnJJHCytp1dW9Uz2cBQoo0PEqVes/r2bM0131CLtLzUCVUidw9n6uuaPY8IdnUYMet2BTccUtIfShnz60mBe65JaTunL/tVqTAbbeE1ImCc3vl16McIEiWc3tCClD5DM9Ak7ZFZCBkZEVzhkfI5/n6Hbdp+wF33BJSH8rZc6vISB/gnltCas/Z225FStdz2y0hZXE19lrt5p177NyR11+OHb/THhzJP86wP2uYrjvz1h92eTseNEzDbB2nd/OY1Py9WNw6/qjnN+fmvnmwnYkxjf1t+mAW7XlsbzaJ3a7DzH1sf3Udp7m/dcOf615sW26SdfvGrCaxbV4l9nEan0X0xqEaRrbvmnlrGFu3PTN3ndUoLOuapW8ODLzudLVomMHA71z/MwmT9mTmN+bOZnS9NcJDs+V53t+WPzQnbNa9/nRoCPl2AKqObKFvltEBoPvcVwNwmavxOy3IDwFAlkWCWPBqhJDC8GtsCPlGYI8ciQyRI+3/CLHHscysXvf0ynzWIOQsPr3wWllkxNQskD+b82/Ihi8qCCm150XpObXnc2RFs+cJqRhAE5AHpI8BOZbH5TQdlXB8JAUEIC4AvkFPSMEl/dQ+v74+2/bl6enFtm/v72+W/c/eHSW3CUNRGNZyjgiZNHE6fW2b6f63VGScCHSvI7CxjfH/tYnTU43CywFiAfnT/On+lunH3274R5G2zbv03rTj9F+z92+U7pqPX52PZjdM35uf6vxs3ofp799Kulf2B8CEc2JVjvJm6OIT5CO9PekvD/8T767XgTc2z1umnEdggyT5eX2s+k9yGpvH1kqvI523IVfSAzdlW2gbu3zn5+6j/JFcfIft0lBOi4/J6cbmBTZJTdPo9fV1/3pamqTUFCalOVkunVdNTU5bSa2Nn7ULjl0A7o5/aGt6Z6TKUpVC7/VLSrWzqTo7b+yzO+9i28shHtugl5cXXS9NLnyYHVZ+Nz79UG7y4in7Aqza9po+tBsXP1B8wCW3m01yVqq9G3w3q/X+/1lpZ5WEbKdOTnNsxiYtd+ngjl28Fw+zhwGwLA0/mDeIS46AxWnO2MVnUFD627+sasuAxyJpTsp3A+6WgnplGpILpL1JR21lZt5k2ZSrFPE41AteEy+Q9qrn58qW77lNM877sXXq+fcGLp/2giETZO5tTYumHObxKDQ0aezhxb2feNE0MWlvqZS1SzwsJZdslu3x9fYae8HFXYeAKcIVejxwzgwc0YE6jTzuWOAuqOS+GTY3rc+rmDxAKn7VEPAt+amm/7Yu8ev0gfnkHckljT8nSoaf/RkeNgUejaKburGiYt696FNIcXrt/3yJh8Qba+advg0BwJCk66Qamp3WvxtX1gMzSDZya+BU8y2OR+ogyk7w5h+Nox+/6S04pNunwKqpt9Db9yemA2GokjqThGR+ms1JeYMe92hu5y2Zbs5O5be7mkru2Hlpgc5j434M1NPiq0qqgXoaDkwqTU21V0s7dgY/TfLX9XMT1udx56RJqTqf5aqlR3vVqtOWaYpbp4NtW2tmPaXbwAZI0U1zroI/tiRW9oBVOtL5QT6uu2TH0nlgnXRSqsLkGXg+JnBTCjopVeGceXk2FnAtColkUynGMn1SrHXejq3Py4U5wHXZvtluJtXO27H+vFyMB9xElFIxNQ6fUmFj9Xm6Sr67SrA6b94Gfp4HLsb2rSM53VSMpseK1c7bsXbechs4zgO3EiUvs6kK7tgsUmlglaLkZiZVStzOBzoPrJHOS1VgVR5YuTPXz1VgXR5YM/+u9xglkyZRT2WqghlbnVc8CA+4mtxRp5vB7XxW7bw3LwvywI0pr5MN6HNNrUi/fUZO4o6tzxuiuO0GuLzUUdu3GOV3M6raeTu2Nm8aR+eBlVD1BnoVjowt0HBgnY51PrqdT/9yxtJ5YHWkeGKswoxJuMcGuIYoKdowKOQ4Xxov+4Zb/khU8Mf681a3gZ/0gYt1PjGdV1J2/mBS5z/58zrbQOeBE6zpGZgA7smRzgc6D2xKlORlCiUVKrfSslMAVulI56PX+XHv81g6D6yPFM+MVWCJDliLJdfoMhVYowPWYsk1ukwF1uiAu1R/Hh5v2wNb8r+9O0pBGAaiKLqdm/1vUCiFSCdhTIjWhntAwefY5sMxRW1ToJnZ89KjQTnuGzGUWB1DLkJtul0ofocn3SOf5wMu3mu97q30GN2e99he2gKEpj6Dkvwjj4tebb5d8EBAuhuUJJ87f96f4aT/1OlNz7GRfgg+WheCUFsfE16cpEFNx5exIUmHx09zd34AaRdACCDp+TVLSlFv1blzgKR2egx5zx/see0pn+djbR4FIVofz4/UeV67G3+vr3niC+H04Oz/nbwA7lqtm+wByfQAAAAASUVORK5CYII=') no-repeat;\n\twidth: 21px;\n\theight: 21px;\n\tbackground-position: 0 -1564px;\n}\n\n.font-graph-geSprite-endthindiamond {\n\tbackground: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAABeQCAMAAAByzXKPAAAA1VBMVEUAAAAzMzIzMzIzMzE1NTUzMzIzMzIzMzEzMzIyMjIzMzIzMzIzMzIzMzE6OjoyMjIzMzIzMzIzMzEzMzI0NDA0NDIwMDAyMjEzMzIzMzEzMzE0NDAzMzMzMzIyMjIzMzI0NDE0NDQyMjIzMzIzMzIzMzIzMzM5OTkAAAC1tbX///9mZmYwMDAQEBAmJiZTiPJ7e3v/Z2RwcHAgICB+fn5hYWFzc3NAQECoqKiampqMjIxTU1NGRkY3NzcbGxsNDQ3w8PBQUFDg4ODAwMCwsLCgoKBPT09W+xp5AAAAKHRSTlMAh4DDEd187+mljnhvVge5nmhMQi4hA8uxk2IlHOOYc102M/jW088J/2liTQAACt5JREFUeNrs3O1um0AQheG5nIPCoIq1Q7+r/Mn9X1K9xtEAM9RLQmODzyO1cV+NtzjShhjHkRkAgn9DMCaYnRXIGOQdtWmk1zRWm0vNN6az+Y+v2fXZ5iTX/kZ4ZGvUNT6/RJuCM/VVRKFB7YBwtnY1k3h2wboaHy8RFQC2VGuc1D730WWLS2GIZ27aM4yUT+9tXaLNw9m0mI9uokepRLeC+ZyCfFCoqwckqV3WBHFZaxHLFrNxVpgUVRWjg/jli2WbfH4WyxYnWcVV0Rz7FYj26X9ezQcuE3VYkXzFSYpm9eq6pqSiuNYAaj+r0GiFxKv5tEOqxVfV0utrCkZF/HCXTuOdGz2IHKbDR5wdJ6PdeRmIsfviED0C5ZV7ojf487v59fPHsT18//a1Yn1HJdoSjIUXBG5XgaBejhMYVmT9B1dRUONj4KtyRHNmNkULDYeD2CGVjiZ0paOK1jVuYKIpjJTO7m9dovvEn3bz/DH4440f2+d9fvlVh+4LLuK6cM8GVcKKkmq3ZqqBfbhaef4n+pijBudNZH3H+OW3No+rbTmVXjfciPbs/GVQ7QU6tWqUW5lonefHfn5f6xI9DAxdqQU3n55uU821mj2ZuUq0SYo2ivA5tThxk3rK6u+urYtZiqKuGiWMEkbp4/OFLITIvyrfekt35WGvjvP6OlERwP6+VU39z+ansp+0SThP8jk+0SeoAehRjObmdha0f2YwfucMss7uaPVF3rThN/EH6fH3YhEt3bD1zMlwGtu8/8a5zrHJuR6NyrkKMK5N5qqf9ev6Y4hfGfSPrc7ZWZqPQrQPa+x5Cfe8FO55m3Xrcs8T3TFUYQ0zqj5jTPoMmagQz4brFh8D3x5L9OngyRy+IEa0JgBRlaBWAIJYyVYjYDF47PwNV/TwAIRfB+BiFcyeolchija6+P7xd//IveI+JlpwnrdZP7xexdD6/4N/PDzP06NZdc8vP4H7WKFXLbqjQcU9T7QZvFhHdN/+sndmy6lCQRQ9KOA8Ro1TxjttYuUlX5BK5f+/6YJIWjlNFREkpLJXGQuWO01e2mPaU4pA17qH7iEeKfRsrrqh4/t0hJQPEJSokULPFpJse0Iu0PNQNVSNnOu8ZHPWZc8TUhkBgECRikZMrp4Xq9W1NPubkIIUm4hnrtyikSIjq+jck3bOBQkpnSBrkU97ALl73pJqXfFc5AlJqN3cXvoTEKIzJcu5PSEFqHiGp6ahz+33Z3rWtpzhEfK16DO8XXi3S2vIvfUCHnpWrcsZHiHVAFUG0KQJoEgjGjGRFG1l9bq25gyPkIoANBcEab9DEPf27iCk40VbWa0uP86WkMsTQHPQHBSnJJHCytp1dW9Uz2cBQoo0PEqVes/r2bM0131CLtLzUCVUidw9n6uuaPY8IdnUYMet2BTccUtIfShnz60mBe65JaTunL/tVqTAbbeE1ImCc3vl16McIEiWc3tCClD5DM9Ak7ZFZCBkZEVzhkfI5/n6Hbdp+wF33BJSH8rZc6vISB/gnltCas/Z225FStdz2y0hZXE19lrt5p177NyR11+OHb/THhzJP86wP2uYrjvz1h92eTseNEzDbB2nd/OY1Py9WNw6/qjnN+fmvnmwnYkxjf1t+mAW7XlsbzaJ3a7DzH1sf3Udp7m/dcOf615sW26SdfvGrCaxbV4l9nEan0X0xqEaRrbvmnlrGFu3PTN3ndUoLOuapW8ODLzudLVomMHA71z/MwmT9mTmN+bOZnS9NcJDs+V53t+WPzQnbNa9/nRoCPl2AKqObKFvltEBoPvcVwNwmavxOy3IDwFAlkWCWPBqhJDC8GtsCPlGYI8ciQyRI+3/CLHHscysXvf0ynzWIOQsPr3wWllkxNQskD+b82/Ihi8qCCm150XpObXnc2RFs+cJqRhAE5AHpI8BOZbH5TQdlXB8JAUEIC4AvkFPSMEl/dQ+v74+2/bl6enFtm/v72+W/c/eHSW3CUNRGNZyjgiZNHE6fW2b6f63VGScCHSvI7CxjfH/tYnTU43CywFiAfnT/On+lunH3274R5G2zbv03rTj9F+z92+U7pqPX52PZjdM35uf6vxs3ofp799Kulf2B8CEc2JVjvJm6OIT5CO9PekvD/8T767XgTc2z1umnEdggyT5eX2s+k9yGpvH1kqvI523IVfSAzdlW2gbu3zn5+6j/JFcfIft0lBOi4/J6cbmBTZJTdPo9fV1/3pamqTUFCalOVkunVdNTU5bSa2Nn7ULjl0A7o5/aGt6Z6TKUpVC7/VLSrWzqTo7b+yzO+9i28shHtugl5cXXS9NLnyYHVZ+Nz79UG7y4in7Aqza9po+tBsXP1B8wCW3m01yVqq9G3w3q/X+/1lpZ5WEbKdOTnNsxiYtd+ngjl28Fw+zhwGwLA0/mDeIS46AxWnO2MVnUFD627+sasuAxyJpTsp3A+6WgnplGpILpL1JR21lZt5k2ZSrFPE41AteEy+Q9qrn58qW77lNM877sXXq+fcGLp/2giETZO5tTYumHObxKDQ0aezhxb2feNE0MWlvqZS1SzwsJZdslu3x9fYae8HFXYeAKcIVejxwzgwc0YE6jTzuWOAuqOS+GTY3rc+rmDxAKn7VEPAt+amm/7Yu8ev0gfnkHckljT8nSoaf/RkeNgUejaKburGiYt696FNIcXrt/3yJh8Qba+advg0BwJCk66Qamp3WvxtX1gMzSDZya+BU8y2OR+ogyk7w5h+Nox+/6S04pNunwKqpt9Db9yemA2GokjqThGR+ms1JeYMe92hu5y2Zbs5O5be7mkru2Hlpgc5j434M1NPiq0qqgXoaDkwqTU21V0s7dgY/TfLX9XMT1udx56RJqTqf5aqlR3vVqtOWaYpbp4NtW2tmPaXbwAZI0U1zroI/tiRW9oBVOtL5QT6uu2TH0nlgnXRSqsLkGXg+JnBTCjopVeGceXk2FnAtColkUynGMn1SrHXejq3Py4U5wHXZvtluJtXO27H+vFyMB9xElFIxNQ6fUmFj9Xm6Sr67SrA6b94Gfp4HLsb2rSM53VSMpseK1c7bsXbechs4zgO3EiUvs6kK7tgsUmlglaLkZiZVStzOBzoPrJHOS1VgVR5YuTPXz1VgXR5YM/+u9xglkyZRT2WqghlbnVc8CA+4mtxRp5vB7XxW7bw3LwvywI0pr5MN6HNNrUi/fUZO4o6tzxuiuO0GuLzUUdu3GOV3M6raeTu2Nm8aR+eBlVD1BnoVjowt0HBgnY51PrqdT/9yxtJ5YHWkeGKswoxJuMcGuIYoKdowKOQ4Xxov+4Zb/khU8Mf681a3gZ/0gYt1PjGdV1J2/mBS5z/58zrbQOeBE6zpGZgA7smRzgc6D2xKlORlCiUVKrfSslMAVulI56PX+XHv81g6D6yPFM+MVWCJDliLJdfoMhVYowPWYsk1ukwF1uiAu1R/Hh5v2wNb8r+9O0pBGAaiKLqdm/1vUCiFSCdhTIjWhntAwefY5sMxRW1ToJnZ89KjQTnuGzGUWB1DLkJtul0ofocn3SOf5wMu3mu97q30GN2e99he2gKEpj6Dkvwjj4tebb5d8EBAuhuUJJ87f96f4aT/1OlNz7GRfgg+WheCUFsfE16cpEFNx5exIUmHx09zd34AaRdACCDp+TVLSlFv1blzgKR2egx5zx/see0pn+djbR4FIVofz4/UeV67G3+vr3niC+H04Oz/nbwA7lqtm+wByfQAAAAASUVORK5CYII=') no-repeat;\n\twidth: 21px;\n\theight: 21px;\n\tbackground-position: 0 -1610px;\n}\n\n.font-graph-geSprite-endclassictrans {\n\tbackground: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAABeQCAMAAAByzXKPAAAA1VBMVEUAAAAzMzIzMzIzMzE1NTUzMzIzMzIzMzEzMzIyMjIzMzIzMzIzMzIzMzE6OjoyMjIzMzIzMzIzMzEzMzI0NDA0NDIwMDAyMjEzMzIzMzEzMzE0NDAzMzMzMzIyMjIzMzI0NDE0NDQyMjIzMzIzMzIzMzIzMzM5OTkAAAC1tbX///9mZmYwMDAQEBAmJiZTiPJ7e3v/Z2RwcHAgICB+fn5hYWFzc3NAQECoqKiampqMjIxTU1NGRkY3NzcbGxsNDQ3w8PBQUFDg4ODAwMCwsLCgoKBPT09W+xp5AAAAKHRSTlMAh4DDEd187+mljnhvVge5nmhMQi4hA8uxk2IlHOOYc102M/jW088J/2liTQAACt5JREFUeNrs3O1um0AQheG5nIPCoIq1Q7+r/Mn9X1K9xtEAM9RLQmODzyO1cV+NtzjShhjHkRkAgn9DMCaYnRXIGOQdtWmk1zRWm0vNN6az+Y+v2fXZ5iTX/kZ4ZGvUNT6/RJuCM/VVRKFB7YBwtnY1k3h2wboaHy8RFQC2VGuc1D730WWLS2GIZ27aM4yUT+9tXaLNw9m0mI9uokepRLeC+ZyCfFCoqwckqV3WBHFZaxHLFrNxVpgUVRWjg/jli2WbfH4WyxYnWcVV0Rz7FYj26X9ezQcuE3VYkXzFSYpm9eq6pqSiuNYAaj+r0GiFxKv5tEOqxVfV0utrCkZF/HCXTuOdGz2IHKbDR5wdJ6PdeRmIsfviED0C5ZV7ojf487v59fPHsT18//a1Yn1HJdoSjIUXBG5XgaBejhMYVmT9B1dRUONj4KtyRHNmNkULDYeD2CGVjiZ0paOK1jVuYKIpjJTO7m9dovvEn3bz/DH4440f2+d9fvlVh+4LLuK6cM8GVcKKkmq3ZqqBfbhaef4n+pijBudNZH3H+OW3No+rbTmVXjfciPbs/GVQ7QU6tWqUW5lonefHfn5f6xI9DAxdqQU3n55uU821mj2ZuUq0SYo2ivA5tThxk3rK6u+urYtZiqKuGiWMEkbp4/OFLITIvyrfekt35WGvjvP6OlERwP6+VU39z+ansp+0SThP8jk+0SeoAehRjObmdha0f2YwfucMss7uaPVF3rThN/EH6fH3YhEt3bD1zMlwGtu8/8a5zrHJuR6NyrkKMK5N5qqf9ev6Y4hfGfSPrc7ZWZqPQrQPa+x5Cfe8FO55m3Xrcs8T3TFUYQ0zqj5jTPoMmagQz4brFh8D3x5L9OngyRy+IEa0JgBRlaBWAIJYyVYjYDF47PwNV/TwAIRfB+BiFcyeolchija6+P7xd//IveI+JlpwnrdZP7xexdD6/4N/PDzP06NZdc8vP4H7WKFXLbqjQcU9T7QZvFhHdN/+sndmy6lCQRQ9KOA8Ro1TxjttYuUlX5BK5f+/6YJIWjlNFREkpLJXGQuWO01e2mPaU4pA17qH7iEeKfRsrrqh4/t0hJQPEJSokULPFpJse0Iu0PNQNVSNnOu8ZHPWZc8TUhkBgECRikZMrp4Xq9W1NPubkIIUm4hnrtyikSIjq+jck3bOBQkpnSBrkU97ALl73pJqXfFc5AlJqN3cXvoTEKIzJcu5PSEFqHiGp6ahz+33Z3rWtpzhEfK16DO8XXi3S2vIvfUCHnpWrcsZHiHVAFUG0KQJoEgjGjGRFG1l9bq25gyPkIoANBcEab9DEPf27iCk40VbWa0uP86WkMsTQHPQHBSnJJHCytp1dW9Uz2cBQoo0PEqVes/r2bM0131CLtLzUCVUidw9n6uuaPY8IdnUYMet2BTccUtIfShnz60mBe65JaTunL/tVqTAbbeE1ImCc3vl16McIEiWc3tCClD5DM9Ak7ZFZCBkZEVzhkfI5/n6Hbdp+wF33BJSH8rZc6vISB/gnltCas/Z225FStdz2y0hZXE19lrt5p177NyR11+OHb/THhzJP86wP2uYrjvz1h92eTseNEzDbB2nd/OY1Py9WNw6/qjnN+fmvnmwnYkxjf1t+mAW7XlsbzaJ3a7DzH1sf3Udp7m/dcOf615sW26SdfvGrCaxbV4l9nEan0X0xqEaRrbvmnlrGFu3PTN3ndUoLOuapW8ODLzudLVomMHA71z/MwmT9mTmN+bOZnS9NcJDs+V53t+WPzQnbNa9/nRoCPl2AKqObKFvltEBoPvcVwNwmavxOy3IDwFAlkWCWPBqhJDC8GtsCPlGYI8ciQyRI+3/CLHHscysXvf0ynzWIOQsPr3wWllkxNQskD+b82/Ihi8qCCm150XpObXnc2RFs+cJqRhAE5AHpI8BOZbH5TQdlXB8JAUEIC4AvkFPSMEl/dQ+v74+2/bl6enFtm/v72+W/c/eHSW3CUNRGNZyjgiZNHE6fW2b6f63VGScCHSvI7CxjfH/tYnTU43CywFiAfnT/On+lunH3274R5G2zbv03rTj9F+z92+U7pqPX52PZjdM35uf6vxs3ofp799Kulf2B8CEc2JVjvJm6OIT5CO9PekvD/8T767XgTc2z1umnEdggyT5eX2s+k9yGpvH1kqvI523IVfSAzdlW2gbu3zn5+6j/JFcfIft0lBOi4/J6cbmBTZJTdPo9fV1/3pamqTUFCalOVkunVdNTU5bSa2Nn7ULjl0A7o5/aGt6Z6TKUpVC7/VLSrWzqTo7b+yzO+9i28shHtugl5cXXS9NLnyYHVZ+Nz79UG7y4in7Aqza9po+tBsXP1B8wCW3m01yVqq9G3w3q/X+/1lpZ5WEbKdOTnNsxiYtd+ngjl28Fw+zhwGwLA0/mDeIS46AxWnO2MVnUFD627+sasuAxyJpTsp3A+6WgnplGpILpL1JR21lZt5k2ZSrFPE41AteEy+Q9qrn58qW77lNM877sXXq+fcGLp/2giETZO5tTYumHObxKDQ0aezhxb2feNE0MWlvqZS1SzwsJZdslu3x9fYae8HFXYeAKcIVejxwzgwc0YE6jTzuWOAuqOS+GTY3rc+rmDxAKn7VEPAt+amm/7Yu8ev0gfnkHckljT8nSoaf/RkeNgUejaKburGiYt696FNIcXrt/3yJh8Qba+advg0BwJCk66Qamp3WvxtX1gMzSDZya+BU8y2OR+ogyk7w5h+Nox+/6S04pNunwKqpt9Db9yemA2GokjqThGR+ms1JeYMe92hu5y2Zbs5O5be7mkru2Hlpgc5j434M1NPiq0qqgXoaDkwqTU21V0s7dgY/TfLX9XMT1udx56RJqTqf5aqlR3vVqtOWaYpbp4NtW2tmPaXbwAZI0U1zroI/tiRW9oBVOtL5QT6uu2TH0nlgnXRSqsLkGXg+JnBTCjopVeGceXk2FnAtColkUynGMn1SrHXejq3Py4U5wHXZvtluJtXO27H+vFyMB9xElFIxNQ6fUmFj9Xm6Sr67SrA6b94Gfp4HLsb2rSM53VSMpseK1c7bsXbechs4zgO3EiUvs6kK7tgsUmlglaLkZiZVStzOBzoPrJHOS1VgVR5YuTPXz1VgXR5YM/+u9xglkyZRT2WqghlbnVc8CA+4mtxRp5vB7XxW7bw3LwvywI0pr5MN6HNNrUi/fUZO4o6tzxuiuO0GuLzUUdu3GOV3M6raeTu2Nm8aR+eBlVD1BnoVjowt0HBgnY51PrqdT/9yxtJ5YHWkeGKswoxJuMcGuIYoKdowKOQ4Xxov+4Zb/khU8Mf681a3gZ/0gYt1PjGdV1J2/mBS5z/58zrbQOeBE6zpGZgA7smRzgc6D2xKlORlCiUVKrfSslMAVulI56PX+XHv81g6D6yPFM+MVWCJDliLJdfoMhVYowPWYsk1ukwF1uiAu1R/Hh5v2wNb8r+9O0pBGAaiKLqdm/1vUCiFSCdhTIjWhntAwefY5sMxRW1ToJnZ89KjQTnuGzGUWB1DLkJtul0ofocn3SOf5wMu3mu97q30GN2e99he2gKEpj6Dkvwjj4tebb5d8EBAuhuUJJ87f96f4aT/1OlNz7GRfgg+WheCUFsfE16cpEFNx5exIUmHx09zd34AaRdACCDp+TVLSlFv1blzgKR2egx5zx/see0pn+djbR4FIVofz4/UeV67G3+vr3niC+H04Oz/nbwA7lqtm+wByfQAAAAASUVORK5CYII=') no-repeat;\n\twidth: 21px;\n\theight: 21px;\n\tbackground-position: 0 -1656px;\n}\n\n.font-graph-geSprite-endblocktrans {\n\tbackground: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAABeQCAMAAAByzXKPAAAA1VBMVEUAAAAzMzIzMzIzMzE1NTUzMzIzMzIzMzEzMzIyMjIzMzIzMzIzMzIzMzE6OjoyMjIzMzIzMzIzMzEzMzI0NDA0NDIwMDAyMjEzMzIzMzEzMzE0NDAzMzMzMzIyMjIzMzI0NDE0NDQyMjIzMzIzMzIzMzIzMzM5OTkAAAC1tbX///9mZmYwMDAQEBAmJiZTiPJ7e3v/Z2RwcHAgICB+fn5hYWFzc3NAQECoqKiampqMjIxTU1NGRkY3NzcbGxsNDQ3w8PBQUFDg4ODAwMCwsLCgoKBPT09W+xp5AAAAKHRSTlMAh4DDEd187+mljnhvVge5nmhMQi4hA8uxk2IlHOOYc102M/jW088J/2liTQAACt5JREFUeNrs3O1um0AQheG5nIPCoIq1Q7+r/Mn9X1K9xtEAM9RLQmODzyO1cV+NtzjShhjHkRkAgn9DMCaYnRXIGOQdtWmk1zRWm0vNN6az+Y+v2fXZ5iTX/kZ4ZGvUNT6/RJuCM/VVRKFB7YBwtnY1k3h2wboaHy8RFQC2VGuc1D730WWLS2GIZ27aM4yUT+9tXaLNw9m0mI9uokepRLeC+ZyCfFCoqwckqV3WBHFZaxHLFrNxVpgUVRWjg/jli2WbfH4WyxYnWcVV0Rz7FYj26X9ezQcuE3VYkXzFSYpm9eq6pqSiuNYAaj+r0GiFxKv5tEOqxVfV0utrCkZF/HCXTuOdGz2IHKbDR5wdJ6PdeRmIsfviED0C5ZV7ojf487v59fPHsT18//a1Yn1HJdoSjIUXBG5XgaBejhMYVmT9B1dRUONj4KtyRHNmNkULDYeD2CGVjiZ0paOK1jVuYKIpjJTO7m9dovvEn3bz/DH4440f2+d9fvlVh+4LLuK6cM8GVcKKkmq3ZqqBfbhaef4n+pijBudNZH3H+OW3No+rbTmVXjfciPbs/GVQ7QU6tWqUW5lonefHfn5f6xI9DAxdqQU3n55uU821mj2ZuUq0SYo2ivA5tThxk3rK6u+urYtZiqKuGiWMEkbp4/OFLITIvyrfekt35WGvjvP6OlERwP6+VU39z+ansp+0SThP8jk+0SeoAehRjObmdha0f2YwfucMss7uaPVF3rThN/EH6fH3YhEt3bD1zMlwGtu8/8a5zrHJuR6NyrkKMK5N5qqf9ev6Y4hfGfSPrc7ZWZqPQrQPa+x5Cfe8FO55m3Xrcs8T3TFUYQ0zqj5jTPoMmagQz4brFh8D3x5L9OngyRy+IEa0JgBRlaBWAIJYyVYjYDF47PwNV/TwAIRfB+BiFcyeolchija6+P7xd//IveI+JlpwnrdZP7xexdD6/4N/PDzP06NZdc8vP4H7WKFXLbqjQcU9T7QZvFhHdN/+sndmy6lCQRQ9KOA8Ro1TxjttYuUlX5BK5f+/6YJIWjlNFREkpLJXGQuWO01e2mPaU4pA17qH7iEeKfRsrrqh4/t0hJQPEJSokULPFpJse0Iu0PNQNVSNnOu8ZHPWZc8TUhkBgECRikZMrp4Xq9W1NPubkIIUm4hnrtyikSIjq+jck3bOBQkpnSBrkU97ALl73pJqXfFc5AlJqN3cXvoTEKIzJcu5PSEFqHiGp6ahz+33Z3rWtpzhEfK16DO8XXi3S2vIvfUCHnpWrcsZHiHVAFUG0KQJoEgjGjGRFG1l9bq25gyPkIoANBcEab9DEPf27iCk40VbWa0uP86WkMsTQHPQHBSnJJHCytp1dW9Uz2cBQoo0PEqVes/r2bM0131CLtLzUCVUidw9n6uuaPY8IdnUYMet2BTccUtIfShnz60mBe65JaTunL/tVqTAbbeE1ImCc3vl16McIEiWc3tCClD5DM9Ak7ZFZCBkZEVzhkfI5/n6Hbdp+wF33BJSH8rZc6vISB/gnltCas/Z225FStdz2y0hZXE19lrt5p177NyR11+OHb/THhzJP86wP2uYrjvz1h92eTseNEzDbB2nd/OY1Py9WNw6/qjnN+fmvnmwnYkxjf1t+mAW7XlsbzaJ3a7DzH1sf3Udp7m/dcOf615sW26SdfvGrCaxbV4l9nEan0X0xqEaRrbvmnlrGFu3PTN3ndUoLOuapW8ODLzudLVomMHA71z/MwmT9mTmN+bOZnS9NcJDs+V53t+WPzQnbNa9/nRoCPl2AKqObKFvltEBoPvcVwNwmavxOy3IDwFAlkWCWPBqhJDC8GtsCPlGYI8ciQyRI+3/CLHHscysXvf0ynzWIOQsPr3wWllkxNQskD+b82/Ihi8qCCm150XpObXnc2RFs+cJqRhAE5AHpI8BOZbH5TQdlXB8JAUEIC4AvkFPSMEl/dQ+v74+2/bl6enFtm/v72+W/c/eHSW3CUNRGNZyjgiZNHE6fW2b6f63VGScCHSvI7CxjfH/tYnTU43CywFiAfnT/On+lunH3274R5G2zbv03rTj9F+z92+U7pqPX52PZjdM35uf6vxs3ofp799Kulf2B8CEc2JVjvJm6OIT5CO9PekvD/8T767XgTc2z1umnEdggyT5eX2s+k9yGpvH1kqvI523IVfSAzdlW2gbu3zn5+6j/JFcfIft0lBOi4/J6cbmBTZJTdPo9fV1/3pamqTUFCalOVkunVdNTU5bSa2Nn7ULjl0A7o5/aGt6Z6TKUpVC7/VLSrWzqTo7b+yzO+9i28shHtugl5cXXS9NLnyYHVZ+Nz79UG7y4in7Aqza9po+tBsXP1B8wCW3m01yVqq9G3w3q/X+/1lpZ5WEbKdOTnNsxiYtd+ngjl28Fw+zhwGwLA0/mDeIS46AxWnO2MVnUFD627+sasuAxyJpTsp3A+6WgnplGpILpL1JR21lZt5k2ZSrFPE41AteEy+Q9qrn58qW77lNM877sXXq+fcGLp/2giETZO5tTYumHObxKDQ0aezhxb2feNE0MWlvqZS1SzwsJZdslu3x9fYae8HFXYeAKcIVejxwzgwc0YE6jTzuWOAuqOS+GTY3rc+rmDxAKn7VEPAt+amm/7Yu8ev0gfnkHckljT8nSoaf/RkeNgUejaKburGiYt696FNIcXrt/3yJh8Qba+advg0BwJCk66Qamp3WvxtX1gMzSDZya+BU8y2OR+ogyk7w5h+Nox+/6S04pNunwKqpt9Db9yemA2GokjqThGR+ms1JeYMe92hu5y2Zbs5O5be7mkru2Hlpgc5j434M1NPiq0qqgXoaDkwqTU21V0s7dgY/TfLX9XMT1udx56RJqTqf5aqlR3vVqtOWaYpbp4NtW2tmPaXbwAZI0U1zroI/tiRW9oBVOtL5QT6uu2TH0nlgnXRSqsLkGXg+JnBTCjopVeGceXk2FnAtColkUynGMn1SrHXejq3Py4U5wHXZvtluJtXO27H+vFyMB9xElFIxNQ6fUmFj9Xm6Sr67SrA6b94Gfp4HLsb2rSM53VSMpseK1c7bsXbechs4zgO3EiUvs6kK7tgsUmlglaLkZiZVStzOBzoPrJHOS1VgVR5YuTPXz1VgXR5YM/+u9xglkyZRT2WqghlbnVc8CA+4mtxRp5vB7XxW7bw3LwvywI0pr5MN6HNNrUi/fUZO4o6tzxuiuO0GuLzUUdu3GOV3M6raeTu2Nm8aR+eBlVD1BnoVjowt0HBgnY51PrqdT/9yxtJ5YHWkeGKswoxJuMcGuIYoKdowKOQ4Xxov+4Zb/khU8Mf681a3gZ/0gYt1PjGdV1J2/mBS5z/58zrbQOeBE6zpGZgA7smRzgc6D2xKlORlCiUVKrfSslMAVulI56PX+XHv81g6D6yPFM+MVWCJDliLJdfoMhVYowPWYsk1ukwF1uiAu1R/Hh5v2wNb8r+9O0pBGAaiKLqdm/1vUCiFSCdhTIjWhntAwefY5sMxRW1ToJnZ89KjQTnuGzGUWB1DLkJtul0ofocn3SOf5wMu3mu97q30GN2e99he2gKEpj6Dkvwjj4tebb5d8EBAuhuUJJ87f96f4aT/1OlNz7GRfgg+WheCUFsfE16cpEFNx5exIUmHx09zd34AaRdACCDp+TVLSlFv1blzgKR2egx5zx/see0pn+djbR4FIVofz4/UeV67G3+vr3niC+H04Oz/nbwA7lqtm+wByfQAAAAASUVORK5CYII=') no-repeat;\n\twidth: 21px;\n\theight: 21px;\n\tbackground-position: 0 -1702px;\n}\n\n.font-graph-geSprite-endovaltrans {\n\tbackground: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAABeQCAMAAAByzXKPAAAA1VBMVEUAAAAzMzIzMzIzMzE1NTUzMzIzMzIzMzEzMzIyMjIzMzIzMzIzMzIzMzE6OjoyMjIzMzIzMzIzMzEzMzI0NDA0NDIwMDAyMjEzMzIzMzEzMzE0NDAzMzMzMzIyMjIzMzI0NDE0NDQyMjIzMzIzMzIzMzIzMzM5OTkAAAC1tbX///9mZmYwMDAQEBAmJiZTiPJ7e3v/Z2RwcHAgICB+fn5hYWFzc3NAQECoqKiampqMjIxTU1NGRkY3NzcbGxsNDQ3w8PBQUFDg4ODAwMCwsLCgoKBPT09W+xp5AAAAKHRSTlMAh4DDEd187+mljnhvVge5nmhMQi4hA8uxk2IlHOOYc102M/jW088J/2liTQAACt5JREFUeNrs3O1um0AQheG5nIPCoIq1Q7+r/Mn9X1K9xtEAM9RLQmODzyO1cV+NtzjShhjHkRkAgn9DMCaYnRXIGOQdtWmk1zRWm0vNN6az+Y+v2fXZ5iTX/kZ4ZGvUNT6/RJuCM/VVRKFB7YBwtnY1k3h2wboaHy8RFQC2VGuc1D730WWLS2GIZ27aM4yUT+9tXaLNw9m0mI9uokepRLeC+ZyCfFCoqwckqV3WBHFZaxHLFrNxVpgUVRWjg/jli2WbfH4WyxYnWcVV0Rz7FYj26X9ezQcuE3VYkXzFSYpm9eq6pqSiuNYAaj+r0GiFxKv5tEOqxVfV0utrCkZF/HCXTuOdGz2IHKbDR5wdJ6PdeRmIsfviED0C5ZV7ojf487v59fPHsT18//a1Yn1HJdoSjIUXBG5XgaBejhMYVmT9B1dRUONj4KtyRHNmNkULDYeD2CGVjiZ0paOK1jVuYKIpjJTO7m9dovvEn3bz/DH4440f2+d9fvlVh+4LLuK6cM8GVcKKkmq3ZqqBfbhaef4n+pijBudNZH3H+OW3No+rbTmVXjfciPbs/GVQ7QU6tWqUW5lonefHfn5f6xI9DAxdqQU3n55uU821mj2ZuUq0SYo2ivA5tThxk3rK6u+urYtZiqKuGiWMEkbp4/OFLITIvyrfekt35WGvjvP6OlERwP6+VU39z+ansp+0SThP8jk+0SeoAehRjObmdha0f2YwfucMss7uaPVF3rThN/EH6fH3YhEt3bD1zMlwGtu8/8a5zrHJuR6NyrkKMK5N5qqf9ev6Y4hfGfSPrc7ZWZqPQrQPa+x5Cfe8FO55m3Xrcs8T3TFUYQ0zqj5jTPoMmagQz4brFh8D3x5L9OngyRy+IEa0JgBRlaBWAIJYyVYjYDF47PwNV/TwAIRfB+BiFcyeolchija6+P7xd//IveI+JlpwnrdZP7xexdD6/4N/PDzP06NZdc8vP4H7WKFXLbqjQcU9T7QZvFhHdN/+sndmy6lCQRQ9KOA8Ro1TxjttYuUlX5BK5f+/6YJIWjlNFREkpLJXGQuWO01e2mPaU4pA17qH7iEeKfRsrrqh4/t0hJQPEJSokULPFpJse0Iu0PNQNVSNnOu8ZHPWZc8TUhkBgECRikZMrp4Xq9W1NPubkIIUm4hnrtyikSIjq+jck3bOBQkpnSBrkU97ALl73pJqXfFc5AlJqN3cXvoTEKIzJcu5PSEFqHiGp6ahz+33Z3rWtpzhEfK16DO8XXi3S2vIvfUCHnpWrcsZHiHVAFUG0KQJoEgjGjGRFG1l9bq25gyPkIoANBcEab9DEPf27iCk40VbWa0uP86WkMsTQHPQHBSnJJHCytp1dW9Uz2cBQoo0PEqVes/r2bM0131CLtLzUCVUidw9n6uuaPY8IdnUYMet2BTccUtIfShnz60mBe65JaTunL/tVqTAbbeE1ImCc3vl16McIEiWc3tCClD5DM9Ak7ZFZCBkZEVzhkfI5/n6Hbdp+wF33BJSH8rZc6vISB/gnltCas/Z225FStdz2y0hZXE19lrt5p177NyR11+OHb/THhzJP86wP2uYrjvz1h92eTseNEzDbB2nd/OY1Py9WNw6/qjnN+fmvnmwnYkxjf1t+mAW7XlsbzaJ3a7DzH1sf3Udp7m/dcOf615sW26SdfvGrCaxbV4l9nEan0X0xqEaRrbvmnlrGFu3PTN3ndUoLOuapW8ODLzudLVomMHA71z/MwmT9mTmN+bOZnS9NcJDs+V53t+WPzQnbNa9/nRoCPl2AKqObKFvltEBoPvcVwNwmavxOy3IDwFAlkWCWPBqhJDC8GtsCPlGYI8ciQyRI+3/CLHHscysXvf0ynzWIOQsPr3wWllkxNQskD+b82/Ihi8qCCm150XpObXnc2RFs+cJqRhAE5AHpI8BOZbH5TQdlXB8JAUEIC4AvkFPSMEl/dQ+v74+2/bl6enFtm/v72+W/c/eHSW3CUNRGNZyjgiZNHE6fW2b6f63VGScCHSvI7CxjfH/tYnTU43CywFiAfnT/On+lunH3274R5G2zbv03rTj9F+z92+U7pqPX52PZjdM35uf6vxs3ofp799Kulf2B8CEc2JVjvJm6OIT5CO9PekvD/8T767XgTc2z1umnEdggyT5eX2s+k9yGpvH1kqvI523IVfSAzdlW2gbu3zn5+6j/JFcfIft0lBOi4/J6cbmBTZJTdPo9fV1/3pamqTUFCalOVkunVdNTU5bSa2Nn7ULjl0A7o5/aGt6Z6TKUpVC7/VLSrWzqTo7b+yzO+9i28shHtugl5cXXS9NLnyYHVZ+Nz79UG7y4in7Aqza9po+tBsXP1B8wCW3m01yVqq9G3w3q/X+/1lpZ5WEbKdOTnNsxiYtd+ngjl28Fw+zhwGwLA0/mDeIS46AxWnO2MVnUFD627+sasuAxyJpTsp3A+6WgnplGpILpL1JR21lZt5k2ZSrFPE41AteEy+Q9qrn58qW77lNM877sXXq+fcGLp/2giETZO5tTYumHObxKDQ0aezhxb2feNE0MWlvqZS1SzwsJZdslu3x9fYae8HFXYeAKcIVejxwzgwc0YE6jTzuWOAuqOS+GTY3rc+rmDxAKn7VEPAt+amm/7Yu8ev0gfnkHckljT8nSoaf/RkeNgUejaKburGiYt696FNIcXrt/3yJh8Qba+advg0BwJCk66Qamp3WvxtX1gMzSDZya+BU8y2OR+ogyk7w5h+Nox+/6S04pNunwKqpt9Db9yemA2GokjqThGR+ms1JeYMe92hu5y2Zbs5O5be7mkru2Hlpgc5j434M1NPiq0qqgXoaDkwqTU21V0s7dgY/TfLX9XMT1udx56RJqTqf5aqlR3vVqtOWaYpbp4NtW2tmPaXbwAZI0U1zroI/tiRW9oBVOtL5QT6uu2TH0nlgnXRSqsLkGXg+JnBTCjopVeGceXk2FnAtColkUynGMn1SrHXejq3Py4U5wHXZvtluJtXO27H+vFyMB9xElFIxNQ6fUmFj9Xm6Sr67SrA6b94Gfp4HLsb2rSM53VSMpseK1c7bsXbechs4zgO3EiUvs6kK7tgsUmlglaLkZiZVStzOBzoPrJHOS1VgVR5YuTPXz1VgXR5YM/+u9xglkyZRT2WqghlbnVc8CA+4mtxRp5vB7XxW7bw3LwvywI0pr5MN6HNNrUi/fUZO4o6tzxuiuO0GuLzUUdu3GOV3M6raeTu2Nm8aR+eBlVD1BnoVjowt0HBgnY51PrqdT/9yxtJ5YHWkeGKswoxJuMcGuIYoKdowKOQ4Xxov+4Zb/khU8Mf681a3gZ/0gYt1PjGdV1J2/mBS5z/58zrbQOeBE6zpGZgA7smRzgc6D2xKlORlCiUVKrfSslMAVulI56PX+XHv81g6D6yPFM+MVWCJDliLJdfoMhVYowPWYsk1ukwF1uiAu1R/Hh5v2wNb8r+9O0pBGAaiKLqdm/1vUCiFSCdhTIjWhntAwefY5sMxRW1ToJnZ89KjQTnuGzGUWB1DLkJtul0ofocn3SOf5wMu3mu97q30GN2e99he2gKEpj6Dkvwjj4tebb5d8EBAuhuUJJ87f96f4aT/1OlNz7GRfgg+WheCUFsfE16cpEFNx5exIUmHx09zd34AaRdACCDp+TVLSlFv1blzgKR2egx5zx/see0pn+djbR4FIVofz4/UeV67G3+vr3niC+H04Oz/nbwA7lqtm+wByfQAAAAASUVORK5CYII=') no-repeat;\n\twidth: 21px;\n\theight: 21px;\n\tbackground-position: 0 -1748px;\n}\n\n.font-graph-geSprite-enddiamondtrans {\n\tbackground: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAABeQCAMAAAByzXKPAAAA1VBMVEUAAAAzMzIzMzIzMzE1NTUzMzIzMzIzMzEzMzIyMjIzMzIzMzIzMzIzMzE6OjoyMjIzMzIzMzIzMzEzMzI0NDA0NDIwMDAyMjEzMzIzMzEzMzE0NDAzMzMzMzIyMjIzMzI0NDE0NDQyMjIzMzIzMzIzMzIzMzM5OTkAAAC1tbX///9mZmYwMDAQEBAmJiZTiPJ7e3v/Z2RwcHAgICB+fn5hYWFzc3NAQECoqKiampqMjIxTU1NGRkY3NzcbGxsNDQ3w8PBQUFDg4ODAwMCwsLCgoKBPT09W+xp5AAAAKHRSTlMAh4DDEd187+mljnhvVge5nmhMQi4hA8uxk2IlHOOYc102M/jW088J/2liTQAACt5JREFUeNrs3O1um0AQheG5nIPCoIq1Q7+r/Mn9X1K9xtEAM9RLQmODzyO1cV+NtzjShhjHkRkAgn9DMCaYnRXIGOQdtWmk1zRWm0vNN6az+Y+v2fXZ5iTX/kZ4ZGvUNT6/RJuCM/VVRKFB7YBwtnY1k3h2wboaHy8RFQC2VGuc1D730WWLS2GIZ27aM4yUT+9tXaLNw9m0mI9uokepRLeC+ZyCfFCoqwckqV3WBHFZaxHLFrNxVpgUVRWjg/jli2WbfH4WyxYnWcVV0Rz7FYj26X9ezQcuE3VYkXzFSYpm9eq6pqSiuNYAaj+r0GiFxKv5tEOqxVfV0utrCkZF/HCXTuOdGz2IHKbDR5wdJ6PdeRmIsfviED0C5ZV7ojf487v59fPHsT18//a1Yn1HJdoSjIUXBG5XgaBejhMYVmT9B1dRUONj4KtyRHNmNkULDYeD2CGVjiZ0paOK1jVuYKIpjJTO7m9dovvEn3bz/DH4440f2+d9fvlVh+4LLuK6cM8GVcKKkmq3ZqqBfbhaef4n+pijBudNZH3H+OW3No+rbTmVXjfciPbs/GVQ7QU6tWqUW5lonefHfn5f6xI9DAxdqQU3n55uU821mj2ZuUq0SYo2ivA5tThxk3rK6u+urYtZiqKuGiWMEkbp4/OFLITIvyrfekt35WGvjvP6OlERwP6+VU39z+ansp+0SThP8jk+0SeoAehRjObmdha0f2YwfucMss7uaPVF3rThN/EH6fH3YhEt3bD1zMlwGtu8/8a5zrHJuR6NyrkKMK5N5qqf9ev6Y4hfGfSPrc7ZWZqPQrQPa+x5Cfe8FO55m3Xrcs8T3TFUYQ0zqj5jTPoMmagQz4brFh8D3x5L9OngyRy+IEa0JgBRlaBWAIJYyVYjYDF47PwNV/TwAIRfB+BiFcyeolchija6+P7xd//IveI+JlpwnrdZP7xexdD6/4N/PDzP06NZdc8vP4H7WKFXLbqjQcU9T7QZvFhHdN/+sndmy6lCQRQ9KOA8Ro1TxjttYuUlX5BK5f+/6YJIWjlNFREkpLJXGQuWO01e2mPaU4pA17qH7iEeKfRsrrqh4/t0hJQPEJSokULPFpJse0Iu0PNQNVSNnOu8ZHPWZc8TUhkBgECRikZMrp4Xq9W1NPubkIIUm4hnrtyikSIjq+jck3bOBQkpnSBrkU97ALl73pJqXfFc5AlJqN3cXvoTEKIzJcu5PSEFqHiGp6ahz+33Z3rWtpzhEfK16DO8XXi3S2vIvfUCHnpWrcsZHiHVAFUG0KQJoEgjGjGRFG1l9bq25gyPkIoANBcEab9DEPf27iCk40VbWa0uP86WkMsTQHPQHBSnJJHCytp1dW9Uz2cBQoo0PEqVes/r2bM0131CLtLzUCVUidw9n6uuaPY8IdnUYMet2BTccUtIfShnz60mBe65JaTunL/tVqTAbbeE1ImCc3vl16McIEiWc3tCClD5DM9Ak7ZFZCBkZEVzhkfI5/n6Hbdp+wF33BJSH8rZc6vISB/gnltCas/Z225FStdz2y0hZXE19lrt5p177NyR11+OHb/THhzJP86wP2uYrjvz1h92eTseNEzDbB2nd/OY1Py9WNw6/qjnN+fmvnmwnYkxjf1t+mAW7XlsbzaJ3a7DzH1sf3Udp7m/dcOf615sW26SdfvGrCaxbV4l9nEan0X0xqEaRrbvmnlrGFu3PTN3ndUoLOuapW8ODLzudLVomMHA71z/MwmT9mTmN+bOZnS9NcJDs+V53t+WPzQnbNa9/nRoCPl2AKqObKFvltEBoPvcVwNwmavxOy3IDwFAlkWCWPBqhJDC8GtsCPlGYI8ciQyRI+3/CLHHscysXvf0ynzWIOQsPr3wWllkxNQskD+b82/Ihi8qCCm150XpObXnc2RFs+cJqRhAE5AHpI8BOZbH5TQdlXB8JAUEIC4AvkFPSMEl/dQ+v74+2/bl6enFtm/v72+W/c/eHSW3CUNRGNZyjgiZNHE6fW2b6f63VGScCHSvI7CxjfH/tYnTU43CywFiAfnT/On+lunH3274R5G2zbv03rTj9F+z92+U7pqPX52PZjdM35uf6vxs3ofp799Kulf2B8CEc2JVjvJm6OIT5CO9PekvD/8T767XgTc2z1umnEdggyT5eX2s+k9yGpvH1kqvI523IVfSAzdlW2gbu3zn5+6j/JFcfIft0lBOi4/J6cbmBTZJTdPo9fV1/3pamqTUFCalOVkunVdNTU5bSa2Nn7ULjl0A7o5/aGt6Z6TKUpVC7/VLSrWzqTo7b+yzO+9i28shHtugl5cXXS9NLnyYHVZ+Nz79UG7y4in7Aqza9po+tBsXP1B8wCW3m01yVqq9G3w3q/X+/1lpZ5WEbKdOTnNsxiYtd+ngjl28Fw+zhwGwLA0/mDeIS46AxWnO2MVnUFD627+sasuAxyJpTsp3A+6WgnplGpILpL1JR21lZt5k2ZSrFPE41AteEy+Q9qrn58qW77lNM877sXXq+fcGLp/2giETZO5tTYumHObxKDQ0aezhxb2feNE0MWlvqZS1SzwsJZdslu3x9fYae8HFXYeAKcIVejxwzgwc0YE6jTzuWOAuqOS+GTY3rc+rmDxAKn7VEPAt+amm/7Yu8ev0gfnkHckljT8nSoaf/RkeNgUejaKburGiYt696FNIcXrt/3yJh8Qba+advg0BwJCk66Qamp3WvxtX1gMzSDZya+BU8y2OR+ogyk7w5h+Nox+/6S04pNunwKqpt9Db9yemA2GokjqThGR+ms1JeYMe92hu5y2Zbs5O5be7mkru2Hlpgc5j434M1NPiq0qqgXoaDkwqTU21V0s7dgY/TfLX9XMT1udx56RJqTqf5aqlR3vVqtOWaYpbp4NtW2tmPaXbwAZI0U1zroI/tiRW9oBVOtL5QT6uu2TH0nlgnXRSqsLkGXg+JnBTCjopVeGceXk2FnAtColkUynGMn1SrHXejq3Py4U5wHXZvtluJtXO27H+vFyMB9xElFIxNQ6fUmFj9Xm6Sr67SrA6b94Gfp4HLsb2rSM53VSMpseK1c7bsXbechs4zgO3EiUvs6kK7tgsUmlglaLkZiZVStzOBzoPrJHOS1VgVR5YuTPXz1VgXR5YM/+u9xglkyZRT2WqghlbnVc8CA+4mtxRp5vB7XxW7bw3LwvywI0pr5MN6HNNrUi/fUZO4o6tzxuiuO0GuLzUUdu3GOV3M6raeTu2Nm8aR+eBlVD1BnoVjowt0HBgnY51PrqdT/9yxtJ5YHWkeGKswoxJuMcGuIYoKdowKOQ4Xxov+4Zb/khU8Mf681a3gZ/0gYt1PjGdV1J2/mBS5z/58zrbQOeBE6zpGZgA7smRzgc6D2xKlORlCiUVKrfSslMAVulI56PX+XHv81g6D6yPFM+MVWCJDliLJdfoMhVYowPWYsk1ukwF1uiAu1R/Hh5v2wNb8r+9O0pBGAaiKLqdm/1vUCiFSCdhTIjWhntAwefY5sMxRW1ToJnZ89KjQTnuGzGUWB1DLkJtul0ofocn3SOf5wMu3mu97q30GN2e99he2gKEpj6Dkvwjj4tebb5d8EBAuhuUJJ87f96f4aT/1OlNz7GRfgg+WheCUFsfE16cpEFNx5exIUmHx09zd34AaRdACCDp+TVLSlFv1blzgKR2egx5zx/see0pn+djbR4FIVofz4/UeV67G3+vr3niC+H04Oz/nbwA7lqtm+wByfQAAAAASUVORK5CYII=') no-repeat;\n\twidth: 21px;\n\theight: 21px;\n\tbackground-position: 0 -1794px;\n}\n\n.font-graph-geSprite-endthindiamondtrans {\n\tbackground: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAABeQCAMAAAByzXKPAAAA1VBMVEUAAAAzMzIzMzIzMzE1NTUzMzIzMzIzMzEzMzIyMjIzMzIzMzIzMzIzMzE6OjoyMjIzMzIzMzIzMzEzMzI0NDA0NDIwMDAyMjEzMzIzMzEzMzE0NDAzMzMzMzIyMjIzMzI0NDE0NDQyMjIzMzIzMzIzMzIzMzM5OTkAAAC1tbX///9mZmYwMDAQEBAmJiZTiPJ7e3v/Z2RwcHAgICB+fn5hYWFzc3NAQECoqKiampqMjIxTU1NGRkY3NzcbGxsNDQ3w8PBQUFDg4ODAwMCwsLCgoKBPT09W+xp5AAAAKHRSTlMAh4DDEd187+mljnhvVge5nmhMQi4hA8uxk2IlHOOYc102M/jW088J/2liTQAACt5JREFUeNrs3O1um0AQheG5nIPCoIq1Q7+r/Mn9X1K9xtEAM9RLQmODzyO1cV+NtzjShhjHkRkAgn9DMCaYnRXIGOQdtWmk1zRWm0vNN6az+Y+v2fXZ5iTX/kZ4ZGvUNT6/RJuCM/VVRKFB7YBwtnY1k3h2wboaHy8RFQC2VGuc1D730WWLS2GIZ27aM4yUT+9tXaLNw9m0mI9uokepRLeC+ZyCfFCoqwckqV3WBHFZaxHLFrNxVpgUVRWjg/jli2WbfH4WyxYnWcVV0Rz7FYj26X9ezQcuE3VYkXzFSYpm9eq6pqSiuNYAaj+r0GiFxKv5tEOqxVfV0utrCkZF/HCXTuOdGz2IHKbDR5wdJ6PdeRmIsfviED0C5ZV7ojf487v59fPHsT18//a1Yn1HJdoSjIUXBG5XgaBejhMYVmT9B1dRUONj4KtyRHNmNkULDYeD2CGVjiZ0paOK1jVuYKIpjJTO7m9dovvEn3bz/DH4440f2+d9fvlVh+4LLuK6cM8GVcKKkmq3ZqqBfbhaef4n+pijBudNZH3H+OW3No+rbTmVXjfciPbs/GVQ7QU6tWqUW5lonefHfn5f6xI9DAxdqQU3n55uU821mj2ZuUq0SYo2ivA5tThxk3rK6u+urYtZiqKuGiWMEkbp4/OFLITIvyrfekt35WGvjvP6OlERwP6+VU39z+ansp+0SThP8jk+0SeoAehRjObmdha0f2YwfucMss7uaPVF3rThN/EH6fH3YhEt3bD1zMlwGtu8/8a5zrHJuR6NyrkKMK5N5qqf9ev6Y4hfGfSPrc7ZWZqPQrQPa+x5Cfe8FO55m3Xrcs8T3TFUYQ0zqj5jTPoMmagQz4brFh8D3x5L9OngyRy+IEa0JgBRlaBWAIJYyVYjYDF47PwNV/TwAIRfB+BiFcyeolchija6+P7xd//IveI+JlpwnrdZP7xexdD6/4N/PDzP06NZdc8vP4H7WKFXLbqjQcU9T7QZvFhHdN/+sndmy6lCQRQ9KOA8Ro1TxjttYuUlX5BK5f+/6YJIWjlNFREkpLJXGQuWO01e2mPaU4pA17qH7iEeKfRsrrqh4/t0hJQPEJSokULPFpJse0Iu0PNQNVSNnOu8ZHPWZc8TUhkBgECRikZMrp4Xq9W1NPubkIIUm4hnrtyikSIjq+jck3bOBQkpnSBrkU97ALl73pJqXfFc5AlJqN3cXvoTEKIzJcu5PSEFqHiGp6ahz+33Z3rWtpzhEfK16DO8XXi3S2vIvfUCHnpWrcsZHiHVAFUG0KQJoEgjGjGRFG1l9bq25gyPkIoANBcEab9DEPf27iCk40VbWa0uP86WkMsTQHPQHBSnJJHCytp1dW9Uz2cBQoo0PEqVes/r2bM0131CLtLzUCVUidw9n6uuaPY8IdnUYMet2BTccUtIfShnz60mBe65JaTunL/tVqTAbbeE1ImCc3vl16McIEiWc3tCClD5DM9Ak7ZFZCBkZEVzhkfI5/n6Hbdp+wF33BJSH8rZc6vISB/gnltCas/Z225FStdz2y0hZXE19lrt5p177NyR11+OHb/THhzJP86wP2uYrjvz1h92eTseNEzDbB2nd/OY1Py9WNw6/qjnN+fmvnmwnYkxjf1t+mAW7XlsbzaJ3a7DzH1sf3Udp7m/dcOf615sW26SdfvGrCaxbV4l9nEan0X0xqEaRrbvmnlrGFu3PTN3ndUoLOuapW8ODLzudLVomMHA71z/MwmT9mTmN+bOZnS9NcJDs+V53t+WPzQnbNa9/nRoCPl2AKqObKFvltEBoPvcVwNwmavxOy3IDwFAlkWCWPBqhJDC8GtsCPlGYI8ciQyRI+3/CLHHscysXvf0ynzWIOQsPr3wWllkxNQskD+b82/Ihi8qCCm150XpObXnc2RFs+cJqRhAE5AHpI8BOZbH5TQdlXB8JAUEIC4AvkFPSMEl/dQ+v74+2/bl6enFtm/v72+W/c/eHSW3CUNRGNZyjgiZNHE6fW2b6f63VGScCHSvI7CxjfH/tYnTU43CywFiAfnT/On+lunH3274R5G2zbv03rTj9F+z92+U7pqPX52PZjdM35uf6vxs3ofp799Kulf2B8CEc2JVjvJm6OIT5CO9PekvD/8T767XgTc2z1umnEdggyT5eX2s+k9yGpvH1kqvI523IVfSAzdlW2gbu3zn5+6j/JFcfIft0lBOi4/J6cbmBTZJTdPo9fV1/3pamqTUFCalOVkunVdNTU5bSa2Nn7ULjl0A7o5/aGt6Z6TKUpVC7/VLSrWzqTo7b+yzO+9i28shHtugl5cXXS9NLnyYHVZ+Nz79UG7y4in7Aqza9po+tBsXP1B8wCW3m01yVqq9G3w3q/X+/1lpZ5WEbKdOTnNsxiYtd+ngjl28Fw+zhwGwLA0/mDeIS46AxWnO2MVnUFD627+sasuAxyJpTsp3A+6WgnplGpILpL1JR21lZt5k2ZSrFPE41AteEy+Q9qrn58qW77lNM877sXXq+fcGLp/2giETZO5tTYumHObxKDQ0aezhxb2feNE0MWlvqZS1SzwsJZdslu3x9fYae8HFXYeAKcIVejxwzgwc0YE6jTzuWOAuqOS+GTY3rc+rmDxAKn7VEPAt+amm/7Yu8ev0gfnkHckljT8nSoaf/RkeNgUejaKburGiYt696FNIcXrt/3yJh8Qba+advg0BwJCk66Qamp3WvxtX1gMzSDZya+BU8y2OR+ogyk7w5h+Nox+/6S04pNunwKqpt9Db9yemA2GokjqThGR+ms1JeYMe92hu5y2Zbs5O5be7mkru2Hlpgc5j434M1NPiq0qqgXoaDkwqTU21V0s7dgY/TfLX9XMT1udx56RJqTqf5aqlR3vVqtOWaYpbp4NtW2tmPaXbwAZI0U1zroI/tiRW9oBVOtL5QT6uu2TH0nlgnXRSqsLkGXg+JnBTCjopVeGceXk2FnAtColkUynGMn1SrHXejq3Py4U5wHXZvtluJtXO27H+vFyMB9xElFIxNQ6fUmFj9Xm6Sr67SrA6b94Gfp4HLsb2rSM53VSMpseK1c7bsXbechs4zgO3EiUvs6kK7tgsUmlglaLkZiZVStzOBzoPrJHOS1VgVR5YuTPXz1VgXR5YM/+u9xglkyZRT2WqghlbnVc8CA+4mtxRp5vB7XxW7bw3LwvywI0pr5MN6HNNrUi/fUZO4o6tzxuiuO0GuLzUUdu3GOV3M6raeTu2Nm8aR+eBlVD1BnoVjowt0HBgnY51PrqdT/9yxtJ5YHWkeGKswoxJuMcGuIYoKdowKOQ4Xxov+4Zb/khU8Mf681a3gZ/0gYt1PjGdV1J2/mBS5z/58zrbQOeBE6zpGZgA7smRzgc6D2xKlORlCiUVKrfSslMAVulI56PX+XHv81g6D6yPFM+MVWCJDliLJdfoMhVYowPWYsk1ukwF1uiAu1R/Hh5v2wNb8r+9O0pBGAaiKLqdm/1vUCiFSCdhTIjWhntAwefY5sMxRW1ToJnZ89KjQTnuGzGUWB1DLkJtul0ofocn3SOf5wMu3mu97q30GN2e99he2gKEpj6Dkvwjj4tebb5d8EBAuhuUJJ87f96f4aT/1OlNz7GRfgg+WheCUFsfE16cpEFNx5exIUmHx09zd34AaRdACCDp+TVLSlFv1blzgKR2egx5zx/see0pn+djbR4FIVofz4/UeV67G3+vr3niC+H04Oz/nbwA7lqtm+wByfQAAAAASUVORK5CYII=') no-repeat;\n\twidth: 21px;\n\theight: 21px;\n\tbackground-position: 0 -1840px;\n}\n\n.font-graph-geSprite-startclassic {\n\tbackground: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAABeQCAMAAAByzXKPAAAA1VBMVEUAAAAzMzIzMzIzMzE1NTUzMzIzMzIzMzEzMzIyMjIzMzIzMzIzMzIzMzE6OjoyMjIzMzIzMzIzMzEzMzI0NDA0NDIwMDAyMjEzMzIzMzEzMzE0NDAzMzMzMzIyMjIzMzI0NDE0NDQyMjIzMzIzMzIzMzIzMzM5OTkAAAC1tbX///9mZmYwMDAQEBAmJiZTiPJ7e3v/Z2RwcHAgICB+fn5hYWFzc3NAQECoqKiampqMjIxTU1NGRkY3NzcbGxsNDQ3w8PBQUFDg4ODAwMCwsLCgoKBPT09W+xp5AAAAKHRSTlMAh4DDEd187+mljnhvVge5nmhMQi4hA8uxk2IlHOOYc102M/jW088J/2liTQAACt5JREFUeNrs3O1um0AQheG5nIPCoIq1Q7+r/Mn9X1K9xtEAM9RLQmODzyO1cV+NtzjShhjHkRkAgn9DMCaYnRXIGOQdtWmk1zRWm0vNN6az+Y+v2fXZ5iTX/kZ4ZGvUNT6/RJuCM/VVRKFB7YBwtnY1k3h2wboaHy8RFQC2VGuc1D730WWLS2GIZ27aM4yUT+9tXaLNw9m0mI9uokepRLeC+ZyCfFCoqwckqV3WBHFZaxHLFrNxVpgUVRWjg/jli2WbfH4WyxYnWcVV0Rz7FYj26X9ezQcuE3VYkXzFSYpm9eq6pqSiuNYAaj+r0GiFxKv5tEOqxVfV0utrCkZF/HCXTuOdGz2IHKbDR5wdJ6PdeRmIsfviED0C5ZV7ojf487v59fPHsT18//a1Yn1HJdoSjIUXBG5XgaBejhMYVmT9B1dRUONj4KtyRHNmNkULDYeD2CGVjiZ0paOK1jVuYKIpjJTO7m9dovvEn3bz/DH4440f2+d9fvlVh+4LLuK6cM8GVcKKkmq3ZqqBfbhaef4n+pijBudNZH3H+OW3No+rbTmVXjfciPbs/GVQ7QU6tWqUW5lonefHfn5f6xI9DAxdqQU3n55uU821mj2ZuUq0SYo2ivA5tThxk3rK6u+urYtZiqKuGiWMEkbp4/OFLITIvyrfekt35WGvjvP6OlERwP6+VU39z+ansp+0SThP8jk+0SeoAehRjObmdha0f2YwfucMss7uaPVF3rThN/EH6fH3YhEt3bD1zMlwGtu8/8a5zrHJuR6NyrkKMK5N5qqf9ev6Y4hfGfSPrc7ZWZqPQrQPa+x5Cfe8FO55m3Xrcs8T3TFUYQ0zqj5jTPoMmagQz4brFh8D3x5L9OngyRy+IEa0JgBRlaBWAIJYyVYjYDF47PwNV/TwAIRfB+BiFcyeolchija6+P7xd//IveI+JlpwnrdZP7xexdD6/4N/PDzP06NZdc8vP4H7WKFXLbqjQcU9T7QZvFhHdN/+sndmy6lCQRQ9KOA8Ro1TxjttYuUlX5BK5f+/6YJIWjlNFREkpLJXGQuWO01e2mPaU4pA17qH7iEeKfRsrrqh4/t0hJQPEJSokULPFpJse0Iu0PNQNVSNnOu8ZHPWZc8TUhkBgECRikZMrp4Xq9W1NPubkIIUm4hnrtyikSIjq+jck3bOBQkpnSBrkU97ALl73pJqXfFc5AlJqN3cXvoTEKIzJcu5PSEFqHiGp6ahz+33Z3rWtpzhEfK16DO8XXi3S2vIvfUCHnpWrcsZHiHVAFUG0KQJoEgjGjGRFG1l9bq25gyPkIoANBcEab9DEPf27iCk40VbWa0uP86WkMsTQHPQHBSnJJHCytp1dW9Uz2cBQoo0PEqVes/r2bM0131CLtLzUCVUidw9n6uuaPY8IdnUYMet2BTccUtIfShnz60mBe65JaTunL/tVqTAbbeE1ImCc3vl16McIEiWc3tCClD5DM9Ak7ZFZCBkZEVzhkfI5/n6Hbdp+wF33BJSH8rZc6vISB/gnltCas/Z225FStdz2y0hZXE19lrt5p177NyR11+OHb/THhzJP86wP2uYrjvz1h92eTseNEzDbB2nd/OY1Py9WNw6/qjnN+fmvnmwnYkxjf1t+mAW7XlsbzaJ3a7DzH1sf3Udp7m/dcOf615sW26SdfvGrCaxbV4l9nEan0X0xqEaRrbvmnlrGFu3PTN3ndUoLOuapW8ODLzudLVomMHA71z/MwmT9mTmN+bOZnS9NcJDs+V53t+WPzQnbNa9/nRoCPl2AKqObKFvltEBoPvcVwNwmavxOy3IDwFAlkWCWPBqhJDC8GtsCPlGYI8ciQyRI+3/CLHHscysXvf0ynzWIOQsPr3wWllkxNQskD+b82/Ihi8qCCm150XpObXnc2RFs+cJqRhAE5AHpI8BOZbH5TQdlXB8JAUEIC4AvkFPSMEl/dQ+v74+2/bl6enFtm/v72+W/c/eHSW3CUNRGNZyjgiZNHE6fW2b6f63VGScCHSvI7CxjfH/tYnTU43CywFiAfnT/On+lunH3274R5G2zbv03rTj9F+z92+U7pqPX52PZjdM35uf6vxs3ofp799Kulf2B8CEc2JVjvJm6OIT5CO9PekvD/8T767XgTc2z1umnEdggyT5eX2s+k9yGpvH1kqvI523IVfSAzdlW2gbu3zn5+6j/JFcfIft0lBOi4/J6cbmBTZJTdPo9fV1/3pamqTUFCalOVkunVdNTU5bSa2Nn7ULjl0A7o5/aGt6Z6TKUpVC7/VLSrWzqTo7b+yzO+9i28shHtugl5cXXS9NLnyYHVZ+Nz79UG7y4in7Aqza9po+tBsXP1B8wCW3m01yVqq9G3w3q/X+/1lpZ5WEbKdOTnNsxiYtd+ngjl28Fw+zhwGwLA0/mDeIS46AxWnO2MVnUFD627+sasuAxyJpTsp3A+6WgnplGpILpL1JR21lZt5k2ZSrFPE41AteEy+Q9qrn58qW77lNM877sXXq+fcGLp/2giETZO5tTYumHObxKDQ0aezhxb2feNE0MWlvqZS1SzwsJZdslu3x9fYae8HFXYeAKcIVejxwzgwc0YE6jTzuWOAuqOS+GTY3rc+rmDxAKn7VEPAt+amm/7Yu8ev0gfnkHckljT8nSoaf/RkeNgUejaKburGiYt696FNIcXrt/3yJh8Qba+advg0BwJCk66Qamp3WvxtX1gMzSDZya+BU8y2OR+ogyk7w5h+Nox+/6S04pNunwKqpt9Db9yemA2GokjqThGR+ms1JeYMe92hu5y2Zbs5O5be7mkru2Hlpgc5j434M1NPiq0qqgXoaDkwqTU21V0s7dgY/TfLX9XMT1udx56RJqTqf5aqlR3vVqtOWaYpbp4NtW2tmPaXbwAZI0U1zroI/tiRW9oBVOtL5QT6uu2TH0nlgnXRSqsLkGXg+JnBTCjopVeGceXk2FnAtColkUynGMn1SrHXejq3Py4U5wHXZvtluJtXO27H+vFyMB9xElFIxNQ6fUmFj9Xm6Sr67SrA6b94Gfp4HLsb2rSM53VSMpseK1c7bsXbechs4zgO3EiUvs6kK7tgsUmlglaLkZiZVStzOBzoPrJHOS1VgVR5YuTPXz1VgXR5YM/+u9xglkyZRT2WqghlbnVc8CA+4mtxRp5vB7XxW7bw3LwvywI0pr5MN6HNNrUi/fUZO4o6tzxuiuO0GuLzUUdu3GOV3M6raeTu2Nm8aR+eBlVD1BnoVjowt0HBgnY51PrqdT/9yxtJ5YHWkeGKswoxJuMcGuIYoKdowKOQ4Xxov+4Zb/khU8Mf681a3gZ/0gYt1PjGdV1J2/mBS5z/58zrbQOeBE6zpGZgA7smRzgc6D2xKlORlCiUVKrfSslMAVulI56PX+XHv81g6D6yPFM+MVWCJDliLJdfoMhVYowPWYsk1ukwF1uiAu1R/Hh5v2wNb8r+9O0pBGAaiKLqdm/1vUCiFSCdhTIjWhntAwefY5sMxRW1ToJnZ89KjQTnuGzGUWB1DLkJtul0ofocn3SOf5wMu3mu97q30GN2e99he2gKEpj6Dkvwjj4tebb5d8EBAuhuUJJ87f96f4aT/1OlNz7GRfgg+WheCUFsfE16cpEFNx5exIUmHx09zd34AaRdACCDp+TVLSlFv1blzgKR2egx5zx/see0pn+djbR4FIVofz4/UeV67G3+vr3niC+H04Oz/nbwA7lqtm+wByfQAAAAASUVORK5CYII=') no-repeat;\n\twidth: 21px;\n\theight: 21px;\n\tbackground-position: 0 -1886px;\n}\n\n.font-graph-geSprite-startopen {\n\tbackground: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAABeQCAMAAAByzXKPAAAA1VBMVEUAAAAzMzIzMzIzMzE1NTUzMzIzMzIzMzEzMzIyMjIzMzIzMzIzMzIzMzE6OjoyMjIzMzIzMzIzMzEzMzI0NDA0NDIwMDAyMjEzMzIzMzEzMzE0NDAzMzMzMzIyMjIzMzI0NDE0NDQyMjIzMzIzMzIzMzIzMzM5OTkAAAC1tbX///9mZmYwMDAQEBAmJiZTiPJ7e3v/Z2RwcHAgICB+fn5hYWFzc3NAQECoqKiampqMjIxTU1NGRkY3NzcbGxsNDQ3w8PBQUFDg4ODAwMCwsLCgoKBPT09W+xp5AAAAKHRSTlMAh4DDEd187+mljnhvVge5nmhMQi4hA8uxk2IlHOOYc102M/jW088J/2liTQAACt5JREFUeNrs3O1um0AQheG5nIPCoIq1Q7+r/Mn9X1K9xtEAM9RLQmODzyO1cV+NtzjShhjHkRkAgn9DMCaYnRXIGOQdtWmk1zRWm0vNN6az+Y+v2fXZ5iTX/kZ4ZGvUNT6/RJuCM/VVRKFB7YBwtnY1k3h2wboaHy8RFQC2VGuc1D730WWLS2GIZ27aM4yUT+9tXaLNw9m0mI9uokepRLeC+ZyCfFCoqwckqV3WBHFZaxHLFrNxVpgUVRWjg/jli2WbfH4WyxYnWcVV0Rz7FYj26X9ezQcuE3VYkXzFSYpm9eq6pqSiuNYAaj+r0GiFxKv5tEOqxVfV0utrCkZF/HCXTuOdGz2IHKbDR5wdJ6PdeRmIsfviED0C5ZV7ojf487v59fPHsT18//a1Yn1HJdoSjIUXBG5XgaBejhMYVmT9B1dRUONj4KtyRHNmNkULDYeD2CGVjiZ0paOK1jVuYKIpjJTO7m9dovvEn3bz/DH4440f2+d9fvlVh+4LLuK6cM8GVcKKkmq3ZqqBfbhaef4n+pijBudNZH3H+OW3No+rbTmVXjfciPbs/GVQ7QU6tWqUW5lonefHfn5f6xI9DAxdqQU3n55uU821mj2ZuUq0SYo2ivA5tThxk3rK6u+urYtZiqKuGiWMEkbp4/OFLITIvyrfekt35WGvjvP6OlERwP6+VU39z+ansp+0SThP8jk+0SeoAehRjObmdha0f2YwfucMss7uaPVF3rThN/EH6fH3YhEt3bD1zMlwGtu8/8a5zrHJuR6NyrkKMK5N5qqf9ev6Y4hfGfSPrc7ZWZqPQrQPa+x5Cfe8FO55m3Xrcs8T3TFUYQ0zqj5jTPoMmagQz4brFh8D3x5L9OngyRy+IEa0JgBRlaBWAIJYyVYjYDF47PwNV/TwAIRfB+BiFcyeolchija6+P7xd//IveI+JlpwnrdZP7xexdD6/4N/PDzP06NZdc8vP4H7WKFXLbqjQcU9T7QZvFhHdN/+sndmy6lCQRQ9KOA8Ro1TxjttYuUlX5BK5f+/6YJIWjlNFREkpLJXGQuWO01e2mPaU4pA17qH7iEeKfRsrrqh4/t0hJQPEJSokULPFpJse0Iu0PNQNVSNnOu8ZHPWZc8TUhkBgECRikZMrp4Xq9W1NPubkIIUm4hnrtyikSIjq+jck3bOBQkpnSBrkU97ALl73pJqXfFc5AlJqN3cXvoTEKIzJcu5PSEFqHiGp6ahz+33Z3rWtpzhEfK16DO8XXi3S2vIvfUCHnpWrcsZHiHVAFUG0KQJoEgjGjGRFG1l9bq25gyPkIoANBcEab9DEPf27iCk40VbWa0uP86WkMsTQHPQHBSnJJHCytp1dW9Uz2cBQoo0PEqVes/r2bM0131CLtLzUCVUidw9n6uuaPY8IdnUYMet2BTccUtIfShnz60mBe65JaTunL/tVqTAbbeE1ImCc3vl16McIEiWc3tCClD5DM9Ak7ZFZCBkZEVzhkfI5/n6Hbdp+wF33BJSH8rZc6vISB/gnltCas/Z225FStdz2y0hZXE19lrt5p177NyR11+OHb/THhzJP86wP2uYrjvz1h92eTseNEzDbB2nd/OY1Py9WNw6/qjnN+fmvnmwnYkxjf1t+mAW7XlsbzaJ3a7DzH1sf3Udp7m/dcOf615sW26SdfvGrCaxbV4l9nEan0X0xqEaRrbvmnlrGFu3PTN3ndUoLOuapW8ODLzudLVomMHA71z/MwmT9mTmN+bOZnS9NcJDs+V53t+WPzQnbNa9/nRoCPl2AKqObKFvltEBoPvcVwNwmavxOy3IDwFAlkWCWPBqhJDC8GtsCPlGYI8ciQyRI+3/CLHHscysXvf0ynzWIOQsPr3wWllkxNQskD+b82/Ihi8qCCm150XpObXnc2RFs+cJqRhAE5AHpI8BOZbH5TQdlXB8JAUEIC4AvkFPSMEl/dQ+v74+2/bl6enFtm/v72+W/c/eHSW3CUNRGNZyjgiZNHE6fW2b6f63VGScCHSvI7CxjfH/tYnTU43CywFiAfnT/On+lunH3274R5G2zbv03rTj9F+z92+U7pqPX52PZjdM35uf6vxs3ofp799Kulf2B8CEc2JVjvJm6OIT5CO9PekvD/8T767XgTc2z1umnEdggyT5eX2s+k9yGpvH1kqvI523IVfSAzdlW2gbu3zn5+6j/JFcfIft0lBOi4/J6cbmBTZJTdPo9fV1/3pamqTUFCalOVkunVdNTU5bSa2Nn7ULjl0A7o5/aGt6Z6TKUpVC7/VLSrWzqTo7b+yzO+9i28shHtugl5cXXS9NLnyYHVZ+Nz79UG7y4in7Aqza9po+tBsXP1B8wCW3m01yVqq9G3w3q/X+/1lpZ5WEbKdOTnNsxiYtd+ngjl28Fw+zhwGwLA0/mDeIS46AxWnO2MVnUFD627+sasuAxyJpTsp3A+6WgnplGpILpL1JR21lZt5k2ZSrFPE41AteEy+Q9qrn58qW77lNM877sXXq+fcGLp/2giETZO5tTYumHObxKDQ0aezhxb2feNE0MWlvqZS1SzwsJZdslu3x9fYae8HFXYeAKcIVejxwzgwc0YE6jTzuWOAuqOS+GTY3rc+rmDxAKn7VEPAt+amm/7Yu8ev0gfnkHckljT8nSoaf/RkeNgUejaKburGiYt696FNIcXrt/3yJh8Qba+advg0BwJCk66Qamp3WvxtX1gMzSDZya+BU8y2OR+ogyk7w5h+Nox+/6S04pNunwKqpt9Db9yemA2GokjqThGR+ms1JeYMe92hu5y2Zbs5O5be7mkru2Hlpgc5j434M1NPiq0qqgXoaDkwqTU21V0s7dgY/TfLX9XMT1udx56RJqTqf5aqlR3vVqtOWaYpbp4NtW2tmPaXbwAZI0U1zroI/tiRW9oBVOtL5QT6uu2TH0nlgnXRSqsLkGXg+JnBTCjopVeGceXk2FnAtColkUynGMn1SrHXejq3Py4U5wHXZvtluJtXO27H+vFyMB9xElFIxNQ6fUmFj9Xm6Sr67SrA6b94Gfp4HLsb2rSM53VSMpseK1c7bsXbechs4zgO3EiUvs6kK7tgsUmlglaLkZiZVStzOBzoPrJHOS1VgVR5YuTPXz1VgXR5YM/+u9xglkyZRT2WqghlbnVc8CA+4mtxRp5vB7XxW7bw3LwvywI0pr5MN6HNNrUi/fUZO4o6tzxuiuO0GuLzUUdu3GOV3M6raeTu2Nm8aR+eBlVD1BnoVjowt0HBgnY51PrqdT/9yxtJ5YHWkeGKswoxJuMcGuIYoKdowKOQ4Xxov+4Zb/khU8Mf681a3gZ/0gYt1PjGdV1J2/mBS5z/58zrbQOeBE6zpGZgA7smRzgc6D2xKlORlCiUVKrfSslMAVulI56PX+XHv81g6D6yPFM+MVWCJDliLJdfoMhVYowPWYsk1ukwF1uiAu1R/Hh5v2wNb8r+9O0pBGAaiKLqdm/1vUCiFSCdhTIjWhntAwefY5sMxRW1ToJnZ89KjQTnuGzGUWB1DLkJtul0ofocn3SOf5wMu3mu97q30GN2e99he2gKEpj6Dkvwjj4tebb5d8EBAuhuUJJ87f96f4aT/1OlNz7GRfgg+WheCUFsfE16cpEFNx5exIUmHx09zd34AaRdACCDp+TVLSlFv1blzgKR2egx5zx/see0pn+djbR4FIVofz4/UeV67G3+vr3niC+H04Oz/nbwA7lqtm+wByfQAAAAASUVORK5CYII=') no-repeat;\n\twidth: 21px;\n\theight: 21px;\n\tbackground-position: 0 -1932px;\n}\n\n.font-graph-geSprite-startblock {\n\tbackground: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAABeQCAMAAAByzXKPAAAA1VBMVEUAAAAzMzIzMzIzMzE1NTUzMzIzMzIzMzEzMzIyMjIzMzIzMzIzMzIzMzE6OjoyMjIzMzIzMzIzMzEzMzI0NDA0NDIwMDAyMjEzMzIzMzEzMzE0NDAzMzMzMzIyMjIzMzI0NDE0NDQyMjIzMzIzMzIzMzIzMzM5OTkAAAC1tbX///9mZmYwMDAQEBAmJiZTiPJ7e3v/Z2RwcHAgICB+fn5hYWFzc3NAQECoqKiampqMjIxTU1NGRkY3NzcbGxsNDQ3w8PBQUFDg4ODAwMCwsLCgoKBPT09W+xp5AAAAKHRSTlMAh4DDEd187+mljnhvVge5nmhMQi4hA8uxk2IlHOOYc102M/jW088J/2liTQAACt5JREFUeNrs3O1um0AQheG5nIPCoIq1Q7+r/Mn9X1K9xtEAM9RLQmODzyO1cV+NtzjShhjHkRkAgn9DMCaYnRXIGOQdtWmk1zRWm0vNN6az+Y+v2fXZ5iTX/kZ4ZGvUNT6/RJuCM/VVRKFB7YBwtnY1k3h2wboaHy8RFQC2VGuc1D730WWLS2GIZ27aM4yUT+9tXaLNw9m0mI9uokepRLeC+ZyCfFCoqwckqV3WBHFZaxHLFrNxVpgUVRWjg/jli2WbfH4WyxYnWcVV0Rz7FYj26X9ezQcuE3VYkXzFSYpm9eq6pqSiuNYAaj+r0GiFxKv5tEOqxVfV0utrCkZF/HCXTuOdGz2IHKbDR5wdJ6PdeRmIsfviED0C5ZV7ojf487v59fPHsT18//a1Yn1HJdoSjIUXBG5XgaBejhMYVmT9B1dRUONj4KtyRHNmNkULDYeD2CGVjiZ0paOK1jVuYKIpjJTO7m9dovvEn3bz/DH4440f2+d9fvlVh+4LLuK6cM8GVcKKkmq3ZqqBfbhaef4n+pijBudNZH3H+OW3No+rbTmVXjfciPbs/GVQ7QU6tWqUW5lonefHfn5f6xI9DAxdqQU3n55uU821mj2ZuUq0SYo2ivA5tThxk3rK6u+urYtZiqKuGiWMEkbp4/OFLITIvyrfekt35WGvjvP6OlERwP6+VU39z+ansp+0SThP8jk+0SeoAehRjObmdha0f2YwfucMss7uaPVF3rThN/EH6fH3YhEt3bD1zMlwGtu8/8a5zrHJuR6NyrkKMK5N5qqf9ev6Y4hfGfSPrc7ZWZqPQrQPa+x5Cfe8FO55m3Xrcs8T3TFUYQ0zqj5jTPoMmagQz4brFh8D3x5L9OngyRy+IEa0JgBRlaBWAIJYyVYjYDF47PwNV/TwAIRfB+BiFcyeolchija6+P7xd//IveI+JlpwnrdZP7xexdD6/4N/PDzP06NZdc8vP4H7WKFXLbqjQcU9T7QZvFhHdN/+sndmy6lCQRQ9KOA8Ro1TxjttYuUlX5BK5f+/6YJIWjlNFREkpLJXGQuWO01e2mPaU4pA17qH7iEeKfRsrrqh4/t0hJQPEJSokULPFpJse0Iu0PNQNVSNnOu8ZHPWZc8TUhkBgECRikZMrp4Xq9W1NPubkIIUm4hnrtyikSIjq+jck3bOBQkpnSBrkU97ALl73pJqXfFc5AlJqN3cXvoTEKIzJcu5PSEFqHiGp6ahz+33Z3rWtpzhEfK16DO8XXi3S2vIvfUCHnpWrcsZHiHVAFUG0KQJoEgjGjGRFG1l9bq25gyPkIoANBcEab9DEPf27iCk40VbWa0uP86WkMsTQHPQHBSnJJHCytp1dW9Uz2cBQoo0PEqVes/r2bM0131CLtLzUCVUidw9n6uuaPY8IdnUYMet2BTccUtIfShnz60mBe65JaTunL/tVqTAbbeE1ImCc3vl16McIEiWc3tCClD5DM9Ak7ZFZCBkZEVzhkfI5/n6Hbdp+wF33BJSH8rZc6vISB/gnltCas/Z225FStdz2y0hZXE19lrt5p177NyR11+OHb/THhzJP86wP2uYrjvz1h92eTseNEzDbB2nd/OY1Py9WNw6/qjnN+fmvnmwnYkxjf1t+mAW7XlsbzaJ3a7DzH1sf3Udp7m/dcOf615sW26SdfvGrCaxbV4l9nEan0X0xqEaRrbvmnlrGFu3PTN3ndUoLOuapW8ODLzudLVomMHA71z/MwmT9mTmN+bOZnS9NcJDs+V53t+WPzQnbNa9/nRoCPl2AKqObKFvltEBoPvcVwNwmavxOy3IDwFAlkWCWPBqhJDC8GtsCPlGYI8ciQyRI+3/CLHHscysXvf0ynzWIOQsPr3wWllkxNQskD+b82/Ihi8qCCm150XpObXnc2RFs+cJqRhAE5AHpI8BOZbH5TQdlXB8JAUEIC4AvkFPSMEl/dQ+v74+2/bl6enFtm/v72+W/c/eHSW3CUNRGNZyjgiZNHE6fW2b6f63VGScCHSvI7CxjfH/tYnTU43CywFiAfnT/On+lunH3274R5G2zbv03rTj9F+z92+U7pqPX52PZjdM35uf6vxs3ofp799Kulf2B8CEc2JVjvJm6OIT5CO9PekvD/8T767XgTc2z1umnEdggyT5eX2s+k9yGpvH1kqvI523IVfSAzdlW2gbu3zn5+6j/JFcfIft0lBOi4/J6cbmBTZJTdPo9fV1/3pamqTUFCalOVkunVdNTU5bSa2Nn7ULjl0A7o5/aGt6Z6TKUpVC7/VLSrWzqTo7b+yzO+9i28shHtugl5cXXS9NLnyYHVZ+Nz79UG7y4in7Aqza9po+tBsXP1B8wCW3m01yVqq9G3w3q/X+/1lpZ5WEbKdOTnNsxiYtd+ngjl28Fw+zhwGwLA0/mDeIS46AxWnO2MVnUFD627+sasuAxyJpTsp3A+6WgnplGpILpL1JR21lZt5k2ZSrFPE41AteEy+Q9qrn58qW77lNM877sXXq+fcGLp/2giETZO5tTYumHObxKDQ0aezhxb2feNE0MWlvqZS1SzwsJZdslu3x9fYae8HFXYeAKcIVejxwzgwc0YE6jTzuWOAuqOS+GTY3rc+rmDxAKn7VEPAt+amm/7Yu8ev0gfnkHckljT8nSoaf/RkeNgUejaKburGiYt696FNIcXrt/3yJh8Qba+advg0BwJCk66Qamp3WvxtX1gMzSDZya+BU8y2OR+ogyk7w5h+Nox+/6S04pNunwKqpt9Db9yemA2GokjqThGR+ms1JeYMe92hu5y2Zbs5O5be7mkru2Hlpgc5j434M1NPiq0qqgXoaDkwqTU21V0s7dgY/TfLX9XMT1udx56RJqTqf5aqlR3vVqtOWaYpbp4NtW2tmPaXbwAZI0U1zroI/tiRW9oBVOtL5QT6uu2TH0nlgnXRSqsLkGXg+JnBTCjopVeGceXk2FnAtColkUynGMn1SrHXejq3Py4U5wHXZvtluJtXO27H+vFyMB9xElFIxNQ6fUmFj9Xm6Sr67SrA6b94Gfp4HLsb2rSM53VSMpseK1c7bsXbechs4zgO3EiUvs6kK7tgsUmlglaLkZiZVStzOBzoPrJHOS1VgVR5YuTPXz1VgXR5YM/+u9xglkyZRT2WqghlbnVc8CA+4mtxRp5vB7XxW7bw3LwvywI0pr5MN6HNNrUi/fUZO4o6tzxuiuO0GuLzUUdu3GOV3M6raeTu2Nm8aR+eBlVD1BnoVjowt0HBgnY51PrqdT/9yxtJ5YHWkeGKswoxJuMcGuIYoKdowKOQ4Xxov+4Zb/khU8Mf681a3gZ/0gYt1PjGdV1J2/mBS5z/58zrbQOeBE6zpGZgA7smRzgc6D2xKlORlCiUVKrfSslMAVulI56PX+XHv81g6D6yPFM+MVWCJDliLJdfoMhVYowPWYsk1ukwF1uiAu1R/Hh5v2wNb8r+9O0pBGAaiKLqdm/1vUCiFSCdhTIjWhntAwefY5sMxRW1ToJnZ89KjQTnuGzGUWB1DLkJtul0ofocn3SOf5wMu3mu97q30GN2e99he2gKEpj6Dkvwjj4tebb5d8EBAuhuUJJ87f96f4aT/1OlNz7GRfgg+WheCUFsfE16cpEFNx5exIUmHx09zd34AaRdACCDp+TVLSlFv1blzgKR2egx5zx/see0pn+djbR4FIVofz4/UeV67G3+vr3niC+H04Oz/nbwA7lqtm+wByfQAAAAASUVORK5CYII=') no-repeat;\n\twidth: 21px;\n\theight: 21px;\n\tbackground-position: 0 -1978px;\n}\n\n.font-graph-geSprite-startoval {\n\tbackground: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAABeQCAMAAAByzXKPAAAA1VBMVEUAAAAzMzIzMzIzMzE1NTUzMzIzMzIzMzEzMzIyMjIzMzIzMzIzMzIzMzE6OjoyMjIzMzIzMzIzMzEzMzI0NDA0NDIwMDAyMjEzMzIzMzEzMzE0NDAzMzMzMzIyMjIzMzI0NDE0NDQyMjIzMzIzMzIzMzIzMzM5OTkAAAC1tbX///9mZmYwMDAQEBAmJiZTiPJ7e3v/Z2RwcHAgICB+fn5hYWFzc3NAQECoqKiampqMjIxTU1NGRkY3NzcbGxsNDQ3w8PBQUFDg4ODAwMCwsLCgoKBPT09W+xp5AAAAKHRSTlMAh4DDEd187+mljnhvVge5nmhMQi4hA8uxk2IlHOOYc102M/jW088J/2liTQAACt5JREFUeNrs3O1um0AQheG5nIPCoIq1Q7+r/Mn9X1K9xtEAM9RLQmODzyO1cV+NtzjShhjHkRkAgn9DMCaYnRXIGOQdtWmk1zRWm0vNN6az+Y+v2fXZ5iTX/kZ4ZGvUNT6/RJuCM/VVRKFB7YBwtnY1k3h2wboaHy8RFQC2VGuc1D730WWLS2GIZ27aM4yUT+9tXaLNw9m0mI9uokepRLeC+ZyCfFCoqwckqV3WBHFZaxHLFrNxVpgUVRWjg/jli2WbfH4WyxYnWcVV0Rz7FYj26X9ezQcuE3VYkXzFSYpm9eq6pqSiuNYAaj+r0GiFxKv5tEOqxVfV0utrCkZF/HCXTuOdGz2IHKbDR5wdJ6PdeRmIsfviED0C5ZV7ojf487v59fPHsT18//a1Yn1HJdoSjIUXBG5XgaBejhMYVmT9B1dRUONj4KtyRHNmNkULDYeD2CGVjiZ0paOK1jVuYKIpjJTO7m9dovvEn3bz/DH4440f2+d9fvlVh+4LLuK6cM8GVcKKkmq3ZqqBfbhaef4n+pijBudNZH3H+OW3No+rbTmVXjfciPbs/GVQ7QU6tWqUW5lonefHfn5f6xI9DAxdqQU3n55uU821mj2ZuUq0SYo2ivA5tThxk3rK6u+urYtZiqKuGiWMEkbp4/OFLITIvyrfekt35WGvjvP6OlERwP6+VU39z+ansp+0SThP8jk+0SeoAehRjObmdha0f2YwfucMss7uaPVF3rThN/EH6fH3YhEt3bD1zMlwGtu8/8a5zrHJuR6NyrkKMK5N5qqf9ev6Y4hfGfSPrc7ZWZqPQrQPa+x5Cfe8FO55m3Xrcs8T3TFUYQ0zqj5jTPoMmagQz4brFh8D3x5L9OngyRy+IEa0JgBRlaBWAIJYyVYjYDF47PwNV/TwAIRfB+BiFcyeolchija6+P7xd//IveI+JlpwnrdZP7xexdD6/4N/PDzP06NZdc8vP4H7WKFXLbqjQcU9T7QZvFhHdN/+sndmy6lCQRQ9KOA8Ro1TxjttYuUlX5BK5f+/6YJIWjlNFREkpLJXGQuWO01e2mPaU4pA17qH7iEeKfRsrrqh4/t0hJQPEJSokULPFpJse0Iu0PNQNVSNnOu8ZHPWZc8TUhkBgECRikZMrp4Xq9W1NPubkIIUm4hnrtyikSIjq+jck3bOBQkpnSBrkU97ALl73pJqXfFc5AlJqN3cXvoTEKIzJcu5PSEFqHiGp6ahz+33Z3rWtpzhEfK16DO8XXi3S2vIvfUCHnpWrcsZHiHVAFUG0KQJoEgjGjGRFG1l9bq25gyPkIoANBcEab9DEPf27iCk40VbWa0uP86WkMsTQHPQHBSnJJHCytp1dW9Uz2cBQoo0PEqVes/r2bM0131CLtLzUCVUidw9n6uuaPY8IdnUYMet2BTccUtIfShnz60mBe65JaTunL/tVqTAbbeE1ImCc3vl16McIEiWc3tCClD5DM9Ak7ZFZCBkZEVzhkfI5/n6Hbdp+wF33BJSH8rZc6vISB/gnltCas/Z225FStdz2y0hZXE19lrt5p177NyR11+OHb/THhzJP86wP2uYrjvz1h92eTseNEzDbB2nd/OY1Py9WNw6/qjnN+fmvnmwnYkxjf1t+mAW7XlsbzaJ3a7DzH1sf3Udp7m/dcOf615sW26SdfvGrCaxbV4l9nEan0X0xqEaRrbvmnlrGFu3PTN3ndUoLOuapW8ODLzudLVomMHA71z/MwmT9mTmN+bOZnS9NcJDs+V53t+WPzQnbNa9/nRoCPl2AKqObKFvltEBoPvcVwNwmavxOy3IDwFAlkWCWPBqhJDC8GtsCPlGYI8ciQyRI+3/CLHHscysXvf0ynzWIOQsPr3wWllkxNQskD+b82/Ihi8qCCm150XpObXnc2RFs+cJqRhAE5AHpI8BOZbH5TQdlXB8JAUEIC4AvkFPSMEl/dQ+v74+2/bl6enFtm/v72+W/c/eHSW3CUNRGNZyjgiZNHE6fW2b6f63VGScCHSvI7CxjfH/tYnTU43CywFiAfnT/On+lunH3274R5G2zbv03rTj9F+z92+U7pqPX52PZjdM35uf6vxs3ofp799Kulf2B8CEc2JVjvJm6OIT5CO9PekvD/8T767XgTc2z1umnEdggyT5eX2s+k9yGpvH1kqvI523IVfSAzdlW2gbu3zn5+6j/JFcfIft0lBOi4/J6cbmBTZJTdPo9fV1/3pamqTUFCalOVkunVdNTU5bSa2Nn7ULjl0A7o5/aGt6Z6TKUpVC7/VLSrWzqTo7b+yzO+9i28shHtugl5cXXS9NLnyYHVZ+Nz79UG7y4in7Aqza9po+tBsXP1B8wCW3m01yVqq9G3w3q/X+/1lpZ5WEbKdOTnNsxiYtd+ngjl28Fw+zhwGwLA0/mDeIS46AxWnO2MVnUFD627+sasuAxyJpTsp3A+6WgnplGpILpL1JR21lZt5k2ZSrFPE41AteEy+Q9qrn58qW77lNM877sXXq+fcGLp/2giETZO5tTYumHObxKDQ0aezhxb2feNE0MWlvqZS1SzwsJZdslu3x9fYae8HFXYeAKcIVejxwzgwc0YE6jTzuWOAuqOS+GTY3rc+rmDxAKn7VEPAt+amm/7Yu8ev0gfnkHckljT8nSoaf/RkeNgUejaKburGiYt696FNIcXrt/3yJh8Qba+advg0BwJCk66Qamp3WvxtX1gMzSDZya+BU8y2OR+ogyk7w5h+Nox+/6S04pNunwKqpt9Db9yemA2GokjqThGR+ms1JeYMe92hu5y2Zbs5O5be7mkru2Hlpgc5j434M1NPiq0qqgXoaDkwqTU21V0s7dgY/TfLX9XMT1udx56RJqTqf5aqlR3vVqtOWaYpbp4NtW2tmPaXbwAZI0U1zroI/tiRW9oBVOtL5QT6uu2TH0nlgnXRSqsLkGXg+JnBTCjopVeGceXk2FnAtColkUynGMn1SrHXejq3Py4U5wHXZvtluJtXO27H+vFyMB9xElFIxNQ6fUmFj9Xm6Sr67SrA6b94Gfp4HLsb2rSM53VSMpseK1c7bsXbechs4zgO3EiUvs6kK7tgsUmlglaLkZiZVStzOBzoPrJHOS1VgVR5YuTPXz1VgXR5YM/+u9xglkyZRT2WqghlbnVc8CA+4mtxRp5vB7XxW7bw3LwvywI0pr5MN6HNNrUi/fUZO4o6tzxuiuO0GuLzUUdu3GOV3M6raeTu2Nm8aR+eBlVD1BnoVjowt0HBgnY51PrqdT/9yxtJ5YHWkeGKswoxJuMcGuIYoKdowKOQ4Xxov+4Zb/khU8Mf681a3gZ/0gYt1PjGdV1J2/mBS5z/58zrbQOeBE6zpGZgA7smRzgc6D2xKlORlCiUVKrfSslMAVulI56PX+XHv81g6D6yPFM+MVWCJDliLJdfoMhVYowPWYsk1ukwF1uiAu1R/Hh5v2wNb8r+9O0pBGAaiKLqdm/1vUCiFSCdhTIjWhntAwefY5sMxRW1ToJnZ89KjQTnuGzGUWB1DLkJtul0ofocn3SOf5wMu3mu97q30GN2e99he2gKEpj6Dkvwjj4tebb5d8EBAuhuUJJ87f96f4aT/1OlNz7GRfgg+WheCUFsfE16cpEFNx5exIUmHx09zd34AaRdACCDp+TVLSlFv1blzgKR2egx5zx/see0pn+djbR4FIVofz4/UeV67G3+vr3niC+H04Oz/nbwA7lqtm+wByfQAAAAASUVORK5CYII=') no-repeat;\n\twidth: 21px;\n\theight: 21px;\n\tbackground-position: 0 -2024px;\n}\n\n.font-graph-geSprite-startdiamond {\n\tbackground: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAABeQCAMAAAByzXKPAAAA1VBMVEUAAAAzMzIzMzIzMzE1NTUzMzIzMzIzMzEzMzIyMjIzMzIzMzIzMzIzMzE6OjoyMjIzMzIzMzIzMzEzMzI0NDA0NDIwMDAyMjEzMzIzMzEzMzE0NDAzMzMzMzIyMjIzMzI0NDE0NDQyMjIzMzIzMzIzMzIzMzM5OTkAAAC1tbX///9mZmYwMDAQEBAmJiZTiPJ7e3v/Z2RwcHAgICB+fn5hYWFzc3NAQECoqKiampqMjIxTU1NGRkY3NzcbGxsNDQ3w8PBQUFDg4ODAwMCwsLCgoKBPT09W+xp5AAAAKHRSTlMAh4DDEd187+mljnhvVge5nmhMQi4hA8uxk2IlHOOYc102M/jW088J/2liTQAACt5JREFUeNrs3O1um0AQheG5nIPCoIq1Q7+r/Mn9X1K9xtEAM9RLQmODzyO1cV+NtzjShhjHkRkAgn9DMCaYnRXIGOQdtWmk1zRWm0vNN6az+Y+v2fXZ5iTX/kZ4ZGvUNT6/RJuCM/VVRKFB7YBwtnY1k3h2wboaHy8RFQC2VGuc1D730WWLS2GIZ27aM4yUT+9tXaLNw9m0mI9uokepRLeC+ZyCfFCoqwckqV3WBHFZaxHLFrNxVpgUVRWjg/jli2WbfH4WyxYnWcVV0Rz7FYj26X9ezQcuE3VYkXzFSYpm9eq6pqSiuNYAaj+r0GiFxKv5tEOqxVfV0utrCkZF/HCXTuOdGz2IHKbDR5wdJ6PdeRmIsfviED0C5ZV7ojf487v59fPHsT18//a1Yn1HJdoSjIUXBG5XgaBejhMYVmT9B1dRUONj4KtyRHNmNkULDYeD2CGVjiZ0paOK1jVuYKIpjJTO7m9dovvEn3bz/DH4440f2+d9fvlVh+4LLuK6cM8GVcKKkmq3ZqqBfbhaef4n+pijBudNZH3H+OW3No+rbTmVXjfciPbs/GVQ7QU6tWqUW5lonefHfn5f6xI9DAxdqQU3n55uU821mj2ZuUq0SYo2ivA5tThxk3rK6u+urYtZiqKuGiWMEkbp4/OFLITIvyrfekt35WGvjvP6OlERwP6+VU39z+ansp+0SThP8jk+0SeoAehRjObmdha0f2YwfucMss7uaPVF3rThN/EH6fH3YhEt3bD1zMlwGtu8/8a5zrHJuR6NyrkKMK5N5qqf9ev6Y4hfGfSPrc7ZWZqPQrQPa+x5Cfe8FO55m3Xrcs8T3TFUYQ0zqj5jTPoMmagQz4brFh8D3x5L9OngyRy+IEa0JgBRlaBWAIJYyVYjYDF47PwNV/TwAIRfB+BiFcyeolchija6+P7xd//IveI+JlpwnrdZP7xexdD6/4N/PDzP06NZdc8vP4H7WKFXLbqjQcU9T7QZvFhHdN/+sndmy6lCQRQ9KOA8Ro1TxjttYuUlX5BK5f+/6YJIWjlNFREkpLJXGQuWO01e2mPaU4pA17qH7iEeKfRsrrqh4/t0hJQPEJSokULPFpJse0Iu0PNQNVSNnOu8ZHPWZc8TUhkBgECRikZMrp4Xq9W1NPubkIIUm4hnrtyikSIjq+jck3bOBQkpnSBrkU97ALl73pJqXfFc5AlJqN3cXvoTEKIzJcu5PSEFqHiGp6ahz+33Z3rWtpzhEfK16DO8XXi3S2vIvfUCHnpWrcsZHiHVAFUG0KQJoEgjGjGRFG1l9bq25gyPkIoANBcEab9DEPf27iCk40VbWa0uP86WkMsTQHPQHBSnJJHCytp1dW9Uz2cBQoo0PEqVes/r2bM0131CLtLzUCVUidw9n6uuaPY8IdnUYMet2BTccUtIfShnz60mBe65JaTunL/tVqTAbbeE1ImCc3vl16McIEiWc3tCClD5DM9Ak7ZFZCBkZEVzhkfI5/n6Hbdp+wF33BJSH8rZc6vISB/gnltCas/Z225FStdz2y0hZXE19lrt5p177NyR11+OHb/THhzJP86wP2uYrjvz1h92eTseNEzDbB2nd/OY1Py9WNw6/qjnN+fmvnmwnYkxjf1t+mAW7XlsbzaJ3a7DzH1sf3Udp7m/dcOf615sW26SdfvGrCaxbV4l9nEan0X0xqEaRrbvmnlrGFu3PTN3ndUoLOuapW8ODLzudLVomMHA71z/MwmT9mTmN+bOZnS9NcJDs+V53t+WPzQnbNa9/nRoCPl2AKqObKFvltEBoPvcVwNwmavxOy3IDwFAlkWCWPBqhJDC8GtsCPlGYI8ciQyRI+3/CLHHscysXvf0ynzWIOQsPr3wWllkxNQskD+b82/Ihi8qCCm150XpObXnc2RFs+cJqRhAE5AHpI8BOZbH5TQdlXB8JAUEIC4AvkFPSMEl/dQ+v74+2/bl6enFtm/v72+W/c/eHSW3CUNRGNZyjgiZNHE6fW2b6f63VGScCHSvI7CxjfH/tYnTU43CywFiAfnT/On+lunH3274R5G2zbv03rTj9F+z92+U7pqPX52PZjdM35uf6vxs3ofp799Kulf2B8CEc2JVjvJm6OIT5CO9PekvD/8T767XgTc2z1umnEdggyT5eX2s+k9yGpvH1kqvI523IVfSAzdlW2gbu3zn5+6j/JFcfIft0lBOi4/J6cbmBTZJTdPo9fV1/3pamqTUFCalOVkunVdNTU5bSa2Nn7ULjl0A7o5/aGt6Z6TKUpVC7/VLSrWzqTo7b+yzO+9i28shHtugl5cXXS9NLnyYHVZ+Nz79UG7y4in7Aqza9po+tBsXP1B8wCW3m01yVqq9G3w3q/X+/1lpZ5WEbKdOTnNsxiYtd+ngjl28Fw+zhwGwLA0/mDeIS46AxWnO2MVnUFD627+sasuAxyJpTsp3A+6WgnplGpILpL1JR21lZt5k2ZSrFPE41AteEy+Q9qrn58qW77lNM877sXXq+fcGLp/2giETZO5tTYumHObxKDQ0aezhxb2feNE0MWlvqZS1SzwsJZdslu3x9fYae8HFXYeAKcIVejxwzgwc0YE6jTzuWOAuqOS+GTY3rc+rmDxAKn7VEPAt+amm/7Yu8ev0gfnkHckljT8nSoaf/RkeNgUejaKburGiYt696FNIcXrt/3yJh8Qba+advg0BwJCk66Qamp3WvxtX1gMzSDZya+BU8y2OR+ogyk7w5h+Nox+/6S04pNunwKqpt9Db9yemA2GokjqThGR+ms1JeYMe92hu5y2Zbs5O5be7mkru2Hlpgc5j434M1NPiq0qqgXoaDkwqTU21V0s7dgY/TfLX9XMT1udx56RJqTqf5aqlR3vVqtOWaYpbp4NtW2tmPaXbwAZI0U1zroI/tiRW9oBVOtL5QT6uu2TH0nlgnXRSqsLkGXg+JnBTCjopVeGceXk2FnAtColkUynGMn1SrHXejq3Py4U5wHXZvtluJtXO27H+vFyMB9xElFIxNQ6fUmFj9Xm6Sr67SrA6b94Gfp4HLsb2rSM53VSMpseK1c7bsXbechs4zgO3EiUvs6kK7tgsUmlglaLkZiZVStzOBzoPrJHOS1VgVR5YuTPXz1VgXR5YM/+u9xglkyZRT2WqghlbnVc8CA+4mtxRp5vB7XxW7bw3LwvywI0pr5MN6HNNrUi/fUZO4o6tzxuiuO0GuLzUUdu3GOV3M6raeTu2Nm8aR+eBlVD1BnoVjowt0HBgnY51PrqdT/9yxtJ5YHWkeGKswoxJuMcGuIYoKdowKOQ4Xxov+4Zb/khU8Mf681a3gZ/0gYt1PjGdV1J2/mBS5z/58zrbQOeBE6zpGZgA7smRzgc6D2xKlORlCiUVKrfSslMAVulI56PX+XHv81g6D6yPFM+MVWCJDliLJdfoMhVYowPWYsk1ukwF1uiAu1R/Hh5v2wNb8r+9O0pBGAaiKLqdm/1vUCiFSCdhTIjWhntAwefY5sMxRW1ToJnZ89KjQTnuGzGUWB1DLkJtul0ofocn3SOf5wMu3mu97q30GN2e99he2gKEpj6Dkvwjj4tebb5d8EBAuhuUJJ87f96f4aT/1OlNz7GRfgg+WheCUFsfE16cpEFNx5exIUmHx09zd34AaRdACCDp+TVLSlFv1blzgKR2egx5zx/see0pn+djbR4FIVofz4/UeV67G3+vr3niC+H04Oz/nbwA7lqtm+wByfQAAAAASUVORK5CYII=') no-repeat;\n\twidth: 21px;\n\theight: 21px;\n\tbackground-position: 0 -2070px;\n}\n\n.font-graph-geSprite-startthindiamond {\n\tbackground: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAABeQCAMAAAByzXKPAAAA1VBMVEUAAAAzMzIzMzIzMzE1NTUzMzIzMzIzMzEzMzIyMjIzMzIzMzIzMzIzMzE6OjoyMjIzMzIzMzIzMzEzMzI0NDA0NDIwMDAyMjEzMzIzMzEzMzE0NDAzMzMzMzIyMjIzMzI0NDE0NDQyMjIzMzIzMzIzMzIzMzM5OTkAAAC1tbX///9mZmYwMDAQEBAmJiZTiPJ7e3v/Z2RwcHAgICB+fn5hYWFzc3NAQECoqKiampqMjIxTU1NGRkY3NzcbGxsNDQ3w8PBQUFDg4ODAwMCwsLCgoKBPT09W+xp5AAAAKHRSTlMAh4DDEd187+mljnhvVge5nmhMQi4hA8uxk2IlHOOYc102M/jW088J/2liTQAACt5JREFUeNrs3O1um0AQheG5nIPCoIq1Q7+r/Mn9X1K9xtEAM9RLQmODzyO1cV+NtzjShhjHkRkAgn9DMCaYnRXIGOQdtWmk1zRWm0vNN6az+Y+v2fXZ5iTX/kZ4ZGvUNT6/RJuCM/VVRKFB7YBwtnY1k3h2wboaHy8RFQC2VGuc1D730WWLS2GIZ27aM4yUT+9tXaLNw9m0mI9uokepRLeC+ZyCfFCoqwckqV3WBHFZaxHLFrNxVpgUVRWjg/jli2WbfH4WyxYnWcVV0Rz7FYj26X9ezQcuE3VYkXzFSYpm9eq6pqSiuNYAaj+r0GiFxKv5tEOqxVfV0utrCkZF/HCXTuOdGz2IHKbDR5wdJ6PdeRmIsfviED0C5ZV7ojf487v59fPHsT18//a1Yn1HJdoSjIUXBG5XgaBejhMYVmT9B1dRUONj4KtyRHNmNkULDYeD2CGVjiZ0paOK1jVuYKIpjJTO7m9dovvEn3bz/DH4440f2+d9fvlVh+4LLuK6cM8GVcKKkmq3ZqqBfbhaef4n+pijBudNZH3H+OW3No+rbTmVXjfciPbs/GVQ7QU6tWqUW5lonefHfn5f6xI9DAxdqQU3n55uU821mj2ZuUq0SYo2ivA5tThxk3rK6u+urYtZiqKuGiWMEkbp4/OFLITIvyrfekt35WGvjvP6OlERwP6+VU39z+ansp+0SThP8jk+0SeoAehRjObmdha0f2YwfucMss7uaPVF3rThN/EH6fH3YhEt3bD1zMlwGtu8/8a5zrHJuR6NyrkKMK5N5qqf9ev6Y4hfGfSPrc7ZWZqPQrQPa+x5Cfe8FO55m3Xrcs8T3TFUYQ0zqj5jTPoMmagQz4brFh8D3x5L9OngyRy+IEa0JgBRlaBWAIJYyVYjYDF47PwNV/TwAIRfB+BiFcyeolchija6+P7xd//IveI+JlpwnrdZP7xexdD6/4N/PDzP06NZdc8vP4H7WKFXLbqjQcU9T7QZvFhHdN/+sndmy6lCQRQ9KOA8Ro1TxjttYuUlX5BK5f+/6YJIWjlNFREkpLJXGQuWO01e2mPaU4pA17qH7iEeKfRsrrqh4/t0hJQPEJSokULPFpJse0Iu0PNQNVSNnOu8ZHPWZc8TUhkBgECRikZMrp4Xq9W1NPubkIIUm4hnrtyikSIjq+jck3bOBQkpnSBrkU97ALl73pJqXfFc5AlJqN3cXvoTEKIzJcu5PSEFqHiGp6ahz+33Z3rWtpzhEfK16DO8XXi3S2vIvfUCHnpWrcsZHiHVAFUG0KQJoEgjGjGRFG1l9bq25gyPkIoANBcEab9DEPf27iCk40VbWa0uP86WkMsTQHPQHBSnJJHCytp1dW9Uz2cBQoo0PEqVes/r2bM0131CLtLzUCVUidw9n6uuaPY8IdnUYMet2BTccUtIfShnz60mBe65JaTunL/tVqTAbbeE1ImCc3vl16McIEiWc3tCClD5DM9Ak7ZFZCBkZEVzhkfI5/n6Hbdp+wF33BJSH8rZc6vISB/gnltCas/Z225FStdz2y0hZXE19lrt5p177NyR11+OHb/THhzJP86wP2uYrjvz1h92eTseNEzDbB2nd/OY1Py9WNw6/qjnN+fmvnmwnYkxjf1t+mAW7XlsbzaJ3a7DzH1sf3Udp7m/dcOf615sW26SdfvGrCaxbV4l9nEan0X0xqEaRrbvmnlrGFu3PTN3ndUoLOuapW8ODLzudLVomMHA71z/MwmT9mTmN+bOZnS9NcJDs+V53t+WPzQnbNa9/nRoCPl2AKqObKFvltEBoPvcVwNwmavxOy3IDwFAlkWCWPBqhJDC8GtsCPlGYI8ciQyRI+3/CLHHscysXvf0ynzWIOQsPr3wWllkxNQskD+b82/Ihi8qCCm150XpObXnc2RFs+cJqRhAE5AHpI8BOZbH5TQdlXB8JAUEIC4AvkFPSMEl/dQ+v74+2/bl6enFtm/v72+W/c/eHSW3CUNRGNZyjgiZNHE6fW2b6f63VGScCHSvI7CxjfH/tYnTU43CywFiAfnT/On+lunH3274R5G2zbv03rTj9F+z92+U7pqPX52PZjdM35uf6vxs3ofp799Kulf2B8CEc2JVjvJm6OIT5CO9PekvD/8T767XgTc2z1umnEdggyT5eX2s+k9yGpvH1kqvI523IVfSAzdlW2gbu3zn5+6j/JFcfIft0lBOi4/J6cbmBTZJTdPo9fV1/3pamqTUFCalOVkunVdNTU5bSa2Nn7ULjl0A7o5/aGt6Z6TKUpVC7/VLSrWzqTo7b+yzO+9i28shHtugl5cXXS9NLnyYHVZ+Nz79UG7y4in7Aqza9po+tBsXP1B8wCW3m01yVqq9G3w3q/X+/1lpZ5WEbKdOTnNsxiYtd+ngjl28Fw+zhwGwLA0/mDeIS46AxWnO2MVnUFD627+sasuAxyJpTsp3A+6WgnplGpILpL1JR21lZt5k2ZSrFPE41AteEy+Q9qrn58qW77lNM877sXXq+fcGLp/2giETZO5tTYumHObxKDQ0aezhxb2feNE0MWlvqZS1SzwsJZdslu3x9fYae8HFXYeAKcIVejxwzgwc0YE6jTzuWOAuqOS+GTY3rc+rmDxAKn7VEPAt+amm/7Yu8ev0gfnkHckljT8nSoaf/RkeNgUejaKburGiYt696FNIcXrt/3yJh8Qba+advg0BwJCk66Qamp3WvxtX1gMzSDZya+BU8y2OR+ogyk7w5h+Nox+/6S04pNunwKqpt9Db9yemA2GokjqThGR+ms1JeYMe92hu5y2Zbs5O5be7mkru2Hlpgc5j434M1NPiq0qqgXoaDkwqTU21V0s7dgY/TfLX9XMT1udx56RJqTqf5aqlR3vVqtOWaYpbp4NtW2tmPaXbwAZI0U1zroI/tiRW9oBVOtL5QT6uu2TH0nlgnXRSqsLkGXg+JnBTCjopVeGceXk2FnAtColkUynGMn1SrHXejq3Py4U5wHXZvtluJtXO27H+vFyMB9xElFIxNQ6fUmFj9Xm6Sr67SrA6b94Gfp4HLsb2rSM53VSMpseK1c7bsXbechs4zgO3EiUvs6kK7tgsUmlglaLkZiZVStzOBzoPrJHOS1VgVR5YuTPXz1VgXR5YM/+u9xglkyZRT2WqghlbnVc8CA+4mtxRp5vB7XxW7bw3LwvywI0pr5MN6HNNrUi/fUZO4o6tzxuiuO0GuLzUUdu3GOV3M6raeTu2Nm8aR+eBlVD1BnoVjowt0HBgnY51PrqdT/9yxtJ5YHWkeGKswoxJuMcGuIYoKdowKOQ4Xxov+4Zb/khU8Mf681a3gZ/0gYt1PjGdV1J2/mBS5z/58zrbQOeBE6zpGZgA7smRzgc6D2xKlORlCiUVKrfSslMAVulI56PX+XHv81g6D6yPFM+MVWCJDliLJdfoMhVYowPWYsk1ukwF1uiAu1R/Hh5v2wNb8r+9O0pBGAaiKLqdm/1vUCiFSCdhTIjWhntAwefY5sMxRW1ToJnZ89KjQTnuGzGUWB1DLkJtul0ofocn3SOf5wMu3mu97q30GN2e99he2gKEpj6Dkvwjj4tebb5d8EBAuhuUJJ87f96f4aT/1OlNz7GRfgg+WheCUFsfE16cpEFNx5exIUmHx09zd34AaRdACCDp+TVLSlFv1blzgKR2egx5zx/see0pn+djbR4FIVofz4/UeV67G3+vr3niC+H04Oz/nbwA7lqtm+wByfQAAAAASUVORK5CYII=') no-repeat;\n\twidth: 21px;\n\theight: 21px;\n\tbackground-position: 0 -2116px;\n}\n\n.font-graph-geSprite-startclassictrans {\n\tbackground: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAABeQCAMAAAByzXKPAAAA1VBMVEUAAAAzMzIzMzIzMzE1NTUzMzIzMzIzMzEzMzIyMjIzMzIzMzIzMzIzMzE6OjoyMjIzMzIzMzIzMzEzMzI0NDA0NDIwMDAyMjEzMzIzMzEzMzE0NDAzMzMzMzIyMjIzMzI0NDE0NDQyMjIzMzIzMzIzMzIzMzM5OTkAAAC1tbX///9mZmYwMDAQEBAmJiZTiPJ7e3v/Z2RwcHAgICB+fn5hYWFzc3NAQECoqKiampqMjIxTU1NGRkY3NzcbGxsNDQ3w8PBQUFDg4ODAwMCwsLCgoKBPT09W+xp5AAAAKHRSTlMAh4DDEd187+mljnhvVge5nmhMQi4hA8uxk2IlHOOYc102M/jW088J/2liTQAACt5JREFUeNrs3O1um0AQheG5nIPCoIq1Q7+r/Mn9X1K9xtEAM9RLQmODzyO1cV+NtzjShhjHkRkAgn9DMCaYnRXIGOQdtWmk1zRWm0vNN6az+Y+v2fXZ5iTX/kZ4ZGvUNT6/RJuCM/VVRKFB7YBwtnY1k3h2wboaHy8RFQC2VGuc1D730WWLS2GIZ27aM4yUT+9tXaLNw9m0mI9uokepRLeC+ZyCfFCoqwckqV3WBHFZaxHLFrNxVpgUVRWjg/jli2WbfH4WyxYnWcVV0Rz7FYj26X9ezQcuE3VYkXzFSYpm9eq6pqSiuNYAaj+r0GiFxKv5tEOqxVfV0utrCkZF/HCXTuOdGz2IHKbDR5wdJ6PdeRmIsfviED0C5ZV7ojf487v59fPHsT18//a1Yn1HJdoSjIUXBG5XgaBejhMYVmT9B1dRUONj4KtyRHNmNkULDYeD2CGVjiZ0paOK1jVuYKIpjJTO7m9dovvEn3bz/DH4440f2+d9fvlVh+4LLuK6cM8GVcKKkmq3ZqqBfbhaef4n+pijBudNZH3H+OW3No+rbTmVXjfciPbs/GVQ7QU6tWqUW5lonefHfn5f6xI9DAxdqQU3n55uU821mj2ZuUq0SYo2ivA5tThxk3rK6u+urYtZiqKuGiWMEkbp4/OFLITIvyrfekt35WGvjvP6OlERwP6+VU39z+ansp+0SThP8jk+0SeoAehRjObmdha0f2YwfucMss7uaPVF3rThN/EH6fH3YhEt3bD1zMlwGtu8/8a5zrHJuR6NyrkKMK5N5qqf9ev6Y4hfGfSPrc7ZWZqPQrQPa+x5Cfe8FO55m3Xrcs8T3TFUYQ0zqj5jTPoMmagQz4brFh8D3x5L9OngyRy+IEa0JgBRlaBWAIJYyVYjYDF47PwNV/TwAIRfB+BiFcyeolchija6+P7xd//IveI+JlpwnrdZP7xexdD6/4N/PDzP06NZdc8vP4H7WKFXLbqjQcU9T7QZvFhHdN/+sndmy6lCQRQ9KOA8Ro1TxjttYuUlX5BK5f+/6YJIWjlNFREkpLJXGQuWO01e2mPaU4pA17qH7iEeKfRsrrqh4/t0hJQPEJSokULPFpJse0Iu0PNQNVSNnOu8ZHPWZc8TUhkBgECRikZMrp4Xq9W1NPubkIIUm4hnrtyikSIjq+jck3bOBQkpnSBrkU97ALl73pJqXfFc5AlJqN3cXvoTEKIzJcu5PSEFqHiGp6ahz+33Z3rWtpzhEfK16DO8XXi3S2vIvfUCHnpWrcsZHiHVAFUG0KQJoEgjGjGRFG1l9bq25gyPkIoANBcEab9DEPf27iCk40VbWa0uP86WkMsTQHPQHBSnJJHCytp1dW9Uz2cBQoo0PEqVes/r2bM0131CLtLzUCVUidw9n6uuaPY8IdnUYMet2BTccUtIfShnz60mBe65JaTunL/tVqTAbbeE1ImCc3vl16McIEiWc3tCClD5DM9Ak7ZFZCBkZEVzhkfI5/n6Hbdp+wF33BJSH8rZc6vISB/gnltCas/Z225FStdz2y0hZXE19lrt5p177NyR11+OHb/THhzJP86wP2uYrjvz1h92eTseNEzDbB2nd/OY1Py9WNw6/qjnN+fmvnmwnYkxjf1t+mAW7XlsbzaJ3a7DzH1sf3Udp7m/dcOf615sW26SdfvGrCaxbV4l9nEan0X0xqEaRrbvmnlrGFu3PTN3ndUoLOuapW8ODLzudLVomMHA71z/MwmT9mTmN+bOZnS9NcJDs+V53t+WPzQnbNa9/nRoCPl2AKqObKFvltEBoPvcVwNwmavxOy3IDwFAlkWCWPBqhJDC8GtsCPlGYI8ciQyRI+3/CLHHscysXvf0ynzWIOQsPr3wWllkxNQskD+b82/Ihi8qCCm150XpObXnc2RFs+cJqRhAE5AHpI8BOZbH5TQdlXB8JAUEIC4AvkFPSMEl/dQ+v74+2/bl6enFtm/v72+W/c/eHSW3CUNRGNZyjgiZNHE6fW2b6f63VGScCHSvI7CxjfH/tYnTU43CywFiAfnT/On+lunH3274R5G2zbv03rTj9F+z92+U7pqPX52PZjdM35uf6vxs3ofp799Kulf2B8CEc2JVjvJm6OIT5CO9PekvD/8T767XgTc2z1umnEdggyT5eX2s+k9yGpvH1kqvI523IVfSAzdlW2gbu3zn5+6j/JFcfIft0lBOi4/J6cbmBTZJTdPo9fV1/3pamqTUFCalOVkunVdNTU5bSa2Nn7ULjl0A7o5/aGt6Z6TKUpVC7/VLSrWzqTo7b+yzO+9i28shHtugl5cXXS9NLnyYHVZ+Nz79UG7y4in7Aqza9po+tBsXP1B8wCW3m01yVqq9G3w3q/X+/1lpZ5WEbKdOTnNsxiYtd+ngjl28Fw+zhwGwLA0/mDeIS46AxWnO2MVnUFD627+sasuAxyJpTsp3A+6WgnplGpILpL1JR21lZt5k2ZSrFPE41AteEy+Q9qrn58qW77lNM877sXXq+fcGLp/2giETZO5tTYumHObxKDQ0aezhxb2feNE0MWlvqZS1SzwsJZdslu3x9fYae8HFXYeAKcIVejxwzgwc0YE6jTzuWOAuqOS+GTY3rc+rmDxAKn7VEPAt+amm/7Yu8ev0gfnkHckljT8nSoaf/RkeNgUejaKburGiYt696FNIcXrt/3yJh8Qba+advg0BwJCk66Qamp3WvxtX1gMzSDZya+BU8y2OR+ogyk7w5h+Nox+/6S04pNunwKqpt9Db9yemA2GokjqThGR+ms1JeYMe92hu5y2Zbs5O5be7mkru2Hlpgc5j434M1NPiq0qqgXoaDkwqTU21V0s7dgY/TfLX9XMT1udx56RJqTqf5aqlR3vVqtOWaYpbp4NtW2tmPaXbwAZI0U1zroI/tiRW9oBVOtL5QT6uu2TH0nlgnXRSqsLkGXg+JnBTCjopVeGceXk2FnAtColkUynGMn1SrHXejq3Py4U5wHXZvtluJtXO27H+vFyMB9xElFIxNQ6fUmFj9Xm6Sr67SrA6b94Gfp4HLsb2rSM53VSMpseK1c7bsXbechs4zgO3EiUvs6kK7tgsUmlglaLkZiZVStzOBzoPrJHOS1VgVR5YuTPXz1VgXR5YM/+u9xglkyZRT2WqghlbnVc8CA+4mtxRp5vB7XxW7bw3LwvywI0pr5MN6HNNrUi/fUZO4o6tzxuiuO0GuLzUUdu3GOV3M6raeTu2Nm8aR+eBlVD1BnoVjowt0HBgnY51PrqdT/9yxtJ5YHWkeGKswoxJuMcGuIYoKdowKOQ4Xxov+4Zb/khU8Mf681a3gZ/0gYt1PjGdV1J2/mBS5z/58zrbQOeBE6zpGZgA7smRzgc6D2xKlORlCiUVKrfSslMAVulI56PX+XHv81g6D6yPFM+MVWCJDliLJdfoMhVYowPWYsk1ukwF1uiAu1R/Hh5v2wNb8r+9O0pBGAaiKLqdm/1vUCiFSCdhTIjWhntAwefY5sMxRW1ToJnZ89KjQTnuGzGUWB1DLkJtul0ofocn3SOf5wMu3mu97q30GN2e99he2gKEpj6Dkvwjj4tebb5d8EBAuhuUJJ87f96f4aT/1OlNz7GRfgg+WheCUFsfE16cpEFNx5exIUmHx09zd34AaRdACCDp+TVLSlFv1blzgKR2egx5zx/see0pn+djbR4FIVofz4/UeV67G3+vr3niC+H04Oz/nbwA7lqtm+wByfQAAAAASUVORK5CYII=') no-repeat;\n\twidth: 21px;\n\theight: 21px;\n\tbackground-position: 0 -2162px;\n}\n\n.font-graph-geSprite-startblocktrans {\n\tbackground: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAABeQCAMAAAByzXKPAAAA1VBMVEUAAAAzMzIzMzIzMzE1NTUzMzIzMzIzMzEzMzIyMjIzMzIzMzIzMzIzMzE6OjoyMjIzMzIzMzIzMzEzMzI0NDA0NDIwMDAyMjEzMzIzMzEzMzE0NDAzMzMzMzIyMjIzMzI0NDE0NDQyMjIzMzIzMzIzMzIzMzM5OTkAAAC1tbX///9mZmYwMDAQEBAmJiZTiPJ7e3v/Z2RwcHAgICB+fn5hYWFzc3NAQECoqKiampqMjIxTU1NGRkY3NzcbGxsNDQ3w8PBQUFDg4ODAwMCwsLCgoKBPT09W+xp5AAAAKHRSTlMAh4DDEd187+mljnhvVge5nmhMQi4hA8uxk2IlHOOYc102M/jW088J/2liTQAACt5JREFUeNrs3O1um0AQheG5nIPCoIq1Q7+r/Mn9X1K9xtEAM9RLQmODzyO1cV+NtzjShhjHkRkAgn9DMCaYnRXIGOQdtWmk1zRWm0vNN6az+Y+v2fXZ5iTX/kZ4ZGvUNT6/RJuCM/VVRKFB7YBwtnY1k3h2wboaHy8RFQC2VGuc1D730WWLS2GIZ27aM4yUT+9tXaLNw9m0mI9uokepRLeC+ZyCfFCoqwckqV3WBHFZaxHLFrNxVpgUVRWjg/jli2WbfH4WyxYnWcVV0Rz7FYj26X9ezQcuE3VYkXzFSYpm9eq6pqSiuNYAaj+r0GiFxKv5tEOqxVfV0utrCkZF/HCXTuOdGz2IHKbDR5wdJ6PdeRmIsfviED0C5ZV7ojf487v59fPHsT18//a1Yn1HJdoSjIUXBG5XgaBejhMYVmT9B1dRUONj4KtyRHNmNkULDYeD2CGVjiZ0paOK1jVuYKIpjJTO7m9dovvEn3bz/DH4440f2+d9fvlVh+4LLuK6cM8GVcKKkmq3ZqqBfbhaef4n+pijBudNZH3H+OW3No+rbTmVXjfciPbs/GVQ7QU6tWqUW5lonefHfn5f6xI9DAxdqQU3n55uU821mj2ZuUq0SYo2ivA5tThxk3rK6u+urYtZiqKuGiWMEkbp4/OFLITIvyrfekt35WGvjvP6OlERwP6+VU39z+ansp+0SThP8jk+0SeoAehRjObmdha0f2YwfucMss7uaPVF3rThN/EH6fH3YhEt3bD1zMlwGtu8/8a5zrHJuR6NyrkKMK5N5qqf9ev6Y4hfGfSPrc7ZWZqPQrQPa+x5Cfe8FO55m3Xrcs8T3TFUYQ0zqj5jTPoMmagQz4brFh8D3x5L9OngyRy+IEa0JgBRlaBWAIJYyVYjYDF47PwNV/TwAIRfB+BiFcyeolchija6+P7xd//IveI+JlpwnrdZP7xexdD6/4N/PDzP06NZdc8vP4H7WKFXLbqjQcU9T7QZvFhHdN/+sndmy6lCQRQ9KOA8Ro1TxjttYuUlX5BK5f+/6YJIWjlNFREkpLJXGQuWO01e2mPaU4pA17qH7iEeKfRsrrqh4/t0hJQPEJSokULPFpJse0Iu0PNQNVSNnOu8ZHPWZc8TUhkBgECRikZMrp4Xq9W1NPubkIIUm4hnrtyikSIjq+jck3bOBQkpnSBrkU97ALl73pJqXfFc5AlJqN3cXvoTEKIzJcu5PSEFqHiGp6ahz+33Z3rWtpzhEfK16DO8XXi3S2vIvfUCHnpWrcsZHiHVAFUG0KQJoEgjGjGRFG1l9bq25gyPkIoANBcEab9DEPf27iCk40VbWa0uP86WkMsTQHPQHBSnJJHCytp1dW9Uz2cBQoo0PEqVes/r2bM0131CLtLzUCVUidw9n6uuaPY8IdnUYMet2BTccUtIfShnz60mBe65JaTunL/tVqTAbbeE1ImCc3vl16McIEiWc3tCClD5DM9Ak7ZFZCBkZEVzhkfI5/n6Hbdp+wF33BJSH8rZc6vISB/gnltCas/Z225FStdz2y0hZXE19lrt5p177NyR11+OHb/THhzJP86wP2uYrjvz1h92eTseNEzDbB2nd/OY1Py9WNw6/qjnN+fmvnmwnYkxjf1t+mAW7XlsbzaJ3a7DzH1sf3Udp7m/dcOf615sW26SdfvGrCaxbV4l9nEan0X0xqEaRrbvmnlrGFu3PTN3ndUoLOuapW8ODLzudLVomMHA71z/MwmT9mTmN+bOZnS9NcJDs+V53t+WPzQnbNa9/nRoCPl2AKqObKFvltEBoPvcVwNwmavxOy3IDwFAlkWCWPBqhJDC8GtsCPlGYI8ciQyRI+3/CLHHscysXvf0ynzWIOQsPr3wWllkxNQskD+b82/Ihi8qCCm150XpObXnc2RFs+cJqRhAE5AHpI8BOZbH5TQdlXB8JAUEIC4AvkFPSMEl/dQ+v74+2/bl6enFtm/v72+W/c/eHSW3CUNRGNZyjgiZNHE6fW2b6f63VGScCHSvI7CxjfH/tYnTU43CywFiAfnT/On+lunH3274R5G2zbv03rTj9F+z92+U7pqPX52PZjdM35uf6vxs3ofp799Kulf2B8CEc2JVjvJm6OIT5CO9PekvD/8T767XgTc2z1umnEdggyT5eX2s+k9yGpvH1kqvI523IVfSAzdlW2gbu3zn5+6j/JFcfIft0lBOi4/J6cbmBTZJTdPo9fV1/3pamqTUFCalOVkunVdNTU5bSa2Nn7ULjl0A7o5/aGt6Z6TKUpVC7/VLSrWzqTo7b+yzO+9i28shHtugl5cXXS9NLnyYHVZ+Nz79UG7y4in7Aqza9po+tBsXP1B8wCW3m01yVqq9G3w3q/X+/1lpZ5WEbKdOTnNsxiYtd+ngjl28Fw+zhwGwLA0/mDeIS46AxWnO2MVnUFD627+sasuAxyJpTsp3A+6WgnplGpILpL1JR21lZt5k2ZSrFPE41AteEy+Q9qrn58qW77lNM877sXXq+fcGLp/2giETZO5tTYumHObxKDQ0aezhxb2feNE0MWlvqZS1SzwsJZdslu3x9fYae8HFXYeAKcIVejxwzgwc0YE6jTzuWOAuqOS+GTY3rc+rmDxAKn7VEPAt+amm/7Yu8ev0gfnkHckljT8nSoaf/RkeNgUejaKburGiYt696FNIcXrt/3yJh8Qba+advg0BwJCk66Qamp3WvxtX1gMzSDZya+BU8y2OR+ogyk7w5h+Nox+/6S04pNunwKqpt9Db9yemA2GokjqThGR+ms1JeYMe92hu5y2Zbs5O5be7mkru2Hlpgc5j434M1NPiq0qqgXoaDkwqTU21V0s7dgY/TfLX9XMT1udx56RJqTqf5aqlR3vVqtOWaYpbp4NtW2tmPaXbwAZI0U1zroI/tiRW9oBVOtL5QT6uu2TH0nlgnXRSqsLkGXg+JnBTCjopVeGceXk2FnAtColkUynGMn1SrHXejq3Py4U5wHXZvtluJtXO27H+vFyMB9xElFIxNQ6fUmFj9Xm6Sr67SrA6b94Gfp4HLsb2rSM53VSMpseK1c7bsXbechs4zgO3EiUvs6kK7tgsUmlglaLkZiZVStzOBzoPrJHOS1VgVR5YuTPXz1VgXR5YM/+u9xglkyZRT2WqghlbnVc8CA+4mtxRp5vB7XxW7bw3LwvywI0pr5MN6HNNrUi/fUZO4o6tzxuiuO0GuLzUUdu3GOV3M6raeTu2Nm8aR+eBlVD1BnoVjowt0HBgnY51PrqdT/9yxtJ5YHWkeGKswoxJuMcGuIYoKdowKOQ4Xxov+4Zb/khU8Mf681a3gZ/0gYt1PjGdV1J2/mBS5z/58zrbQOeBE6zpGZgA7smRzgc6D2xKlORlCiUVKrfSslMAVulI56PX+XHv81g6D6yPFM+MVWCJDliLJdfoMhVYowPWYsk1ukwF1uiAu1R/Hh5v2wNb8r+9O0pBGAaiKLqdm/1vUCiFSCdhTIjWhntAwefY5sMxRW1ToJnZ89KjQTnuGzGUWB1DLkJtul0ofocn3SOf5wMu3mu97q30GN2e99he2gKEpj6Dkvwjj4tebb5d8EBAuhuUJJ87f96f4aT/1OlNz7GRfgg+WheCUFsfE16cpEFNx5exIUmHx09zd34AaRdACCDp+TVLSlFv1blzgKR2egx5zx/see0pn+djbR4FIVofz4/UeV67G3+vr3niC+H04Oz/nbwA7lqtm+wByfQAAAAASUVORK5CYII=') no-repeat;\n\twidth: 21px;\n\theight: 21px;\n\tbackground-position: 0 -2208px;\n}\n\n.font-graph-geSprite-startovaltrans {\n\tbackground: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAABeQCAMAAAByzXKPAAAA1VBMVEUAAAAzMzIzMzIzMzE1NTUzMzIzMzIzMzEzMzIyMjIzMzIzMzIzMzIzMzE6OjoyMjIzMzIzMzIzMzEzMzI0NDA0NDIwMDAyMjEzMzIzMzEzMzE0NDAzMzMzMzIyMjIzMzI0NDE0NDQyMjIzMzIzMzIzMzIzMzM5OTkAAAC1tbX///9mZmYwMDAQEBAmJiZTiPJ7e3v/Z2RwcHAgICB+fn5hYWFzc3NAQECoqKiampqMjIxTU1NGRkY3NzcbGxsNDQ3w8PBQUFDg4ODAwMCwsLCgoKBPT09W+xp5AAAAKHRSTlMAh4DDEd187+mljnhvVge5nmhMQi4hA8uxk2IlHOOYc102M/jW088J/2liTQAACt5JREFUeNrs3O1um0AQheG5nIPCoIq1Q7+r/Mn9X1K9xtEAM9RLQmODzyO1cV+NtzjShhjHkRkAgn9DMCaYnRXIGOQdtWmk1zRWm0vNN6az+Y+v2fXZ5iTX/kZ4ZGvUNT6/RJuCM/VVRKFB7YBwtnY1k3h2wboaHy8RFQC2VGuc1D730WWLS2GIZ27aM4yUT+9tXaLNw9m0mI9uokepRLeC+ZyCfFCoqwckqV3WBHFZaxHLFrNxVpgUVRWjg/jli2WbfH4WyxYnWcVV0Rz7FYj26X9ezQcuE3VYkXzFSYpm9eq6pqSiuNYAaj+r0GiFxKv5tEOqxVfV0utrCkZF/HCXTuOdGz2IHKbDR5wdJ6PdeRmIsfviED0C5ZV7ojf487v59fPHsT18//a1Yn1HJdoSjIUXBG5XgaBejhMYVmT9B1dRUONj4KtyRHNmNkULDYeD2CGVjiZ0paOK1jVuYKIpjJTO7m9dovvEn3bz/DH4440f2+d9fvlVh+4LLuK6cM8GVcKKkmq3ZqqBfbhaef4n+pijBudNZH3H+OW3No+rbTmVXjfciPbs/GVQ7QU6tWqUW5lonefHfn5f6xI9DAxdqQU3n55uU821mj2ZuUq0SYo2ivA5tThxk3rK6u+urYtZiqKuGiWMEkbp4/OFLITIvyrfekt35WGvjvP6OlERwP6+VU39z+ansp+0SThP8jk+0SeoAehRjObmdha0f2YwfucMss7uaPVF3rThN/EH6fH3YhEt3bD1zMlwGtu8/8a5zrHJuR6NyrkKMK5N5qqf9ev6Y4hfGfSPrc7ZWZqPQrQPa+x5Cfe8FO55m3Xrcs8T3TFUYQ0zqj5jTPoMmagQz4brFh8D3x5L9OngyRy+IEa0JgBRlaBWAIJYyVYjYDF47PwNV/TwAIRfB+BiFcyeolchija6+P7xd//IveI+JlpwnrdZP7xexdD6/4N/PDzP06NZdc8vP4H7WKFXLbqjQcU9T7QZvFhHdN/+sndmy6lCQRQ9KOA8Ro1TxjttYuUlX5BK5f+/6YJIWjlNFREkpLJXGQuWO01e2mPaU4pA17qH7iEeKfRsrrqh4/t0hJQPEJSokULPFpJse0Iu0PNQNVSNnOu8ZHPWZc8TUhkBgECRikZMrp4Xq9W1NPubkIIUm4hnrtyikSIjq+jck3bOBQkpnSBrkU97ALl73pJqXfFc5AlJqN3cXvoTEKIzJcu5PSEFqHiGp6ahz+33Z3rWtpzhEfK16DO8XXi3S2vIvfUCHnpWrcsZHiHVAFUG0KQJoEgjGjGRFG1l9bq25gyPkIoANBcEab9DEPf27iCk40VbWa0uP86WkMsTQHPQHBSnJJHCytp1dW9Uz2cBQoo0PEqVes/r2bM0131CLtLzUCVUidw9n6uuaPY8IdnUYMet2BTccUtIfShnz60mBe65JaTunL/tVqTAbbeE1ImCc3vl16McIEiWc3tCClD5DM9Ak7ZFZCBkZEVzhkfI5/n6Hbdp+wF33BJSH8rZc6vISB/gnltCas/Z225FStdz2y0hZXE19lrt5p177NyR11+OHb/THhzJP86wP2uYrjvz1h92eTseNEzDbB2nd/OY1Py9WNw6/qjnN+fmvnmwnYkxjf1t+mAW7XlsbzaJ3a7DzH1sf3Udp7m/dcOf615sW26SdfvGrCaxbV4l9nEan0X0xqEaRrbvmnlrGFu3PTN3ndUoLOuapW8ODLzudLVomMHA71z/MwmT9mTmN+bOZnS9NcJDs+V53t+WPzQnbNa9/nRoCPl2AKqObKFvltEBoPvcVwNwmavxOy3IDwFAlkWCWPBqhJDC8GtsCPlGYI8ciQyRI+3/CLHHscysXvf0ynzWIOQsPr3wWllkxNQskD+b82/Ihi8qCCm150XpObXnc2RFs+cJqRhAE5AHpI8BOZbH5TQdlXB8JAUEIC4AvkFPSMEl/dQ+v74+2/bl6enFtm/v72+W/c/eHSW3CUNRGNZyjgiZNHE6fW2b6f63VGScCHSvI7CxjfH/tYnTU43CywFiAfnT/On+lunH3274R5G2zbv03rTj9F+z92+U7pqPX52PZjdM35uf6vxs3ofp799Kulf2B8CEc2JVjvJm6OIT5CO9PekvD/8T767XgTc2z1umnEdggyT5eX2s+k9yGpvH1kqvI523IVfSAzdlW2gbu3zn5+6j/JFcfIft0lBOi4/J6cbmBTZJTdPo9fV1/3pamqTUFCalOVkunVdNTU5bSa2Nn7ULjl0A7o5/aGt6Z6TKUpVC7/VLSrWzqTo7b+yzO+9i28shHtugl5cXXS9NLnyYHVZ+Nz79UG7y4in7Aqza9po+tBsXP1B8wCW3m01yVqq9G3w3q/X+/1lpZ5WEbKdOTnNsxiYtd+ngjl28Fw+zhwGwLA0/mDeIS46AxWnO2MVnUFD627+sasuAxyJpTsp3A+6WgnplGpILpL1JR21lZt5k2ZSrFPE41AteEy+Q9qrn58qW77lNM877sXXq+fcGLp/2giETZO5tTYumHObxKDQ0aezhxb2feNE0MWlvqZS1SzwsJZdslu3x9fYae8HFXYeAKcIVejxwzgwc0YE6jTzuWOAuqOS+GTY3rc+rmDxAKn7VEPAt+amm/7Yu8ev0gfnkHckljT8nSoaf/RkeNgUejaKburGiYt696FNIcXrt/3yJh8Qba+advg0BwJCk66Qamp3WvxtX1gMzSDZya+BU8y2OR+ogyk7w5h+Nox+/6S04pNunwKqpt9Db9yemA2GokjqThGR+ms1JeYMe92hu5y2Zbs5O5be7mkru2Hlpgc5j434M1NPiq0qqgXoaDkwqTU21V0s7dgY/TfLX9XMT1udx56RJqTqf5aqlR3vVqtOWaYpbp4NtW2tmPaXbwAZI0U1zroI/tiRW9oBVOtL5QT6uu2TH0nlgnXRSqsLkGXg+JnBTCjopVeGceXk2FnAtColkUynGMn1SrHXejq3Py4U5wHXZvtluJtXO27H+vFyMB9xElFIxNQ6fUmFj9Xm6Sr67SrA6b94Gfp4HLsb2rSM53VSMpseK1c7bsXbechs4zgO3EiUvs6kK7tgsUmlglaLkZiZVStzOBzoPrJHOS1VgVR5YuTPXz1VgXR5YM/+u9xglkyZRT2WqghlbnVc8CA+4mtxRp5vB7XxW7bw3LwvywI0pr5MN6HNNrUi/fUZO4o6tzxuiuO0GuLzUUdu3GOV3M6raeTu2Nm8aR+eBlVD1BnoVjowt0HBgnY51PrqdT/9yxtJ5YHWkeGKswoxJuMcGuIYoKdowKOQ4Xxov+4Zb/khU8Mf681a3gZ/0gYt1PjGdV1J2/mBS5z/58zrbQOeBE6zpGZgA7smRzgc6D2xKlORlCiUVKrfSslMAVulI56PX+XHv81g6D6yPFM+MVWCJDliLJdfoMhVYowPWYsk1ukwF1uiAu1R/Hh5v2wNb8r+9O0pBGAaiKLqdm/1vUCiFSCdhTIjWhntAwefY5sMxRW1ToJnZ89KjQTnuGzGUWB1DLkJtul0ofocn3SOf5wMu3mu97q30GN2e99he2gKEpj6Dkvwjj4tebb5d8EBAuhuUJJ87f96f4aT/1OlNz7GRfgg+WheCUFsfE16cpEFNx5exIUmHx09zd34AaRdACCDp+TVLSlFv1blzgKR2egx5zx/see0pn+djbR4FIVofz4/UeV67G3+vr3niC+H04Oz/nbwA7lqtm+wByfQAAAAASUVORK5CYII=') no-repeat;\n\twidth: 21px;\n\theight: 21px;\n\tbackground-position: 0 -2254px;\n}\n\n.font-graph-geSprite-startdiamondtrans {\n\tbackground: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAABeQCAMAAAByzXKPAAAA1VBMVEUAAAAzMzIzMzIzMzE1NTUzMzIzMzIzMzEzMzIyMjIzMzIzMzIzMzIzMzE6OjoyMjIzMzIzMzIzMzEzMzI0NDA0NDIwMDAyMjEzMzIzMzEzMzE0NDAzMzMzMzIyMjIzMzI0NDE0NDQyMjIzMzIzMzIzMzIzMzM5OTkAAAC1tbX///9mZmYwMDAQEBAmJiZTiPJ7e3v/Z2RwcHAgICB+fn5hYWFzc3NAQECoqKiampqMjIxTU1NGRkY3NzcbGxsNDQ3w8PBQUFDg4ODAwMCwsLCgoKBPT09W+xp5AAAAKHRSTlMAh4DDEd187+mljnhvVge5nmhMQi4hA8uxk2IlHOOYc102M/jW088J/2liTQAACt5JREFUeNrs3O1um0AQheG5nIPCoIq1Q7+r/Mn9X1K9xtEAM9RLQmODzyO1cV+NtzjShhjHkRkAgn9DMCaYnRXIGOQdtWmk1zRWm0vNN6az+Y+v2fXZ5iTX/kZ4ZGvUNT6/RJuCM/VVRKFB7YBwtnY1k3h2wboaHy8RFQC2VGuc1D730WWLS2GIZ27aM4yUT+9tXaLNw9m0mI9uokepRLeC+ZyCfFCoqwckqV3WBHFZaxHLFrNxVpgUVRWjg/jli2WbfH4WyxYnWcVV0Rz7FYj26X9ezQcuE3VYkXzFSYpm9eq6pqSiuNYAaj+r0GiFxKv5tEOqxVfV0utrCkZF/HCXTuOdGz2IHKbDR5wdJ6PdeRmIsfviED0C5ZV7ojf487v59fPHsT18//a1Yn1HJdoSjIUXBG5XgaBejhMYVmT9B1dRUONj4KtyRHNmNkULDYeD2CGVjiZ0paOK1jVuYKIpjJTO7m9dovvEn3bz/DH4440f2+d9fvlVh+4LLuK6cM8GVcKKkmq3ZqqBfbhaef4n+pijBudNZH3H+OW3No+rbTmVXjfciPbs/GVQ7QU6tWqUW5lonefHfn5f6xI9DAxdqQU3n55uU821mj2ZuUq0SYo2ivA5tThxk3rK6u+urYtZiqKuGiWMEkbp4/OFLITIvyrfekt35WGvjvP6OlERwP6+VU39z+ansp+0SThP8jk+0SeoAehRjObmdha0f2YwfucMss7uaPVF3rThN/EH6fH3YhEt3bD1zMlwGtu8/8a5zrHJuR6NyrkKMK5N5qqf9ev6Y4hfGfSPrc7ZWZqPQrQPa+x5Cfe8FO55m3Xrcs8T3TFUYQ0zqj5jTPoMmagQz4brFh8D3x5L9OngyRy+IEa0JgBRlaBWAIJYyVYjYDF47PwNV/TwAIRfB+BiFcyeolchija6+P7xd//IveI+JlpwnrdZP7xexdD6/4N/PDzP06NZdc8vP4H7WKFXLbqjQcU9T7QZvFhHdN/+sndmy6lCQRQ9KOA8Ro1TxjttYuUlX5BK5f+/6YJIWjlNFREkpLJXGQuWO01e2mPaU4pA17qH7iEeKfRsrrqh4/t0hJQPEJSokULPFpJse0Iu0PNQNVSNnOu8ZHPWZc8TUhkBgECRikZMrp4Xq9W1NPubkIIUm4hnrtyikSIjq+jck3bOBQkpnSBrkU97ALl73pJqXfFc5AlJqN3cXvoTEKIzJcu5PSEFqHiGp6ahz+33Z3rWtpzhEfK16DO8XXi3S2vIvfUCHnpWrcsZHiHVAFUG0KQJoEgjGjGRFG1l9bq25gyPkIoANBcEab9DEPf27iCk40VbWa0uP86WkMsTQHPQHBSnJJHCytp1dW9Uz2cBQoo0PEqVes/r2bM0131CLtLzUCVUidw9n6uuaPY8IdnUYMet2BTccUtIfShnz60mBe65JaTunL/tVqTAbbeE1ImCc3vl16McIEiWc3tCClD5DM9Ak7ZFZCBkZEVzhkfI5/n6Hbdp+wF33BJSH8rZc6vISB/gnltCas/Z225FStdz2y0hZXE19lrt5p177NyR11+OHb/THhzJP86wP2uYrjvz1h92eTseNEzDbB2nd/OY1Py9WNw6/qjnN+fmvnmwnYkxjf1t+mAW7XlsbzaJ3a7DzH1sf3Udp7m/dcOf615sW26SdfvGrCaxbV4l9nEan0X0xqEaRrbvmnlrGFu3PTN3ndUoLOuapW8ODLzudLVomMHA71z/MwmT9mTmN+bOZnS9NcJDs+V53t+WPzQnbNa9/nRoCPl2AKqObKFvltEBoPvcVwNwmavxOy3IDwFAlkWCWPBqhJDC8GtsCPlGYI8ciQyRI+3/CLHHscysXvf0ynzWIOQsPr3wWllkxNQskD+b82/Ihi8qCCm150XpObXnc2RFs+cJqRhAE5AHpI8BOZbH5TQdlXB8JAUEIC4AvkFPSMEl/dQ+v74+2/bl6enFtm/v72+W/c/eHSW3CUNRGNZyjgiZNHE6fW2b6f63VGScCHSvI7CxjfH/tYnTU43CywFiAfnT/On+lunH3274R5G2zbv03rTj9F+z92+U7pqPX52PZjdM35uf6vxs3ofp799Kulf2B8CEc2JVjvJm6OIT5CO9PekvD/8T767XgTc2z1umnEdggyT5eX2s+k9yGpvH1kqvI523IVfSAzdlW2gbu3zn5+6j/JFcfIft0lBOi4/J6cbmBTZJTdPo9fV1/3pamqTUFCalOVkunVdNTU5bSa2Nn7ULjl0A7o5/aGt6Z6TKUpVC7/VLSrWzqTo7b+yzO+9i28shHtugl5cXXS9NLnyYHVZ+Nz79UG7y4in7Aqza9po+tBsXP1B8wCW3m01yVqq9G3w3q/X+/1lpZ5WEbKdOTnNsxiYtd+ngjl28Fw+zhwGwLA0/mDeIS46AxWnO2MVnUFD627+sasuAxyJpTsp3A+6WgnplGpILpL1JR21lZt5k2ZSrFPE41AteEy+Q9qrn58qW77lNM877sXXq+fcGLp/2giETZO5tTYumHObxKDQ0aezhxb2feNE0MWlvqZS1SzwsJZdslu3x9fYae8HFXYeAKcIVejxwzgwc0YE6jTzuWOAuqOS+GTY3rc+rmDxAKn7VEPAt+amm/7Yu8ev0gfnkHckljT8nSoaf/RkeNgUejaKburGiYt696FNIcXrt/3yJh8Qba+advg0BwJCk66Qamp3WvxtX1gMzSDZya+BU8y2OR+ogyk7w5h+Nox+/6S04pNunwKqpt9Db9yemA2GokjqThGR+ms1JeYMe92hu5y2Zbs5O5be7mkru2Hlpgc5j434M1NPiq0qqgXoaDkwqTU21V0s7dgY/TfLX9XMT1udx56RJqTqf5aqlR3vVqtOWaYpbp4NtW2tmPaXbwAZI0U1zroI/tiRW9oBVOtL5QT6uu2TH0nlgnXRSqsLkGXg+JnBTCjopVeGceXk2FnAtColkUynGMn1SrHXejq3Py4U5wHXZvtluJtXO27H+vFyMB9xElFIxNQ6fUmFj9Xm6Sr67SrA6b94Gfp4HLsb2rSM53VSMpseK1c7bsXbechs4zgO3EiUvs6kK7tgsUmlglaLkZiZVStzOBzoPrJHOS1VgVR5YuTPXz1VgXR5YM/+u9xglkyZRT2WqghlbnVc8CA+4mtxRp5vB7XxW7bw3LwvywI0pr5MN6HNNrUi/fUZO4o6tzxuiuO0GuLzUUdu3GOV3M6raeTu2Nm8aR+eBlVD1BnoVjowt0HBgnY51PrqdT/9yxtJ5YHWkeGKswoxJuMcGuIYoKdowKOQ4Xxov+4Zb/khU8Mf681a3gZ/0gYt1PjGdV1J2/mBS5z/58zrbQOeBE6zpGZgA7smRzgc6D2xKlORlCiUVKrfSslMAVulI56PX+XHv81g6D6yPFM+MVWCJDliLJdfoMhVYowPWYsk1ukwF1uiAu1R/Hh5v2wNb8r+9O0pBGAaiKLqdm/1vUCiFSCdhTIjWhntAwefY5sMxRW1ToJnZ89KjQTnuGzGUWB1DLkJtul0ofocn3SOf5wMu3mu97q30GN2e99he2gKEpj6Dkvwjj4tebb5d8EBAuhuUJJ87f96f4aT/1OlNz7GRfgg+WheCUFsfE16cpEFNx5exIUmHx09zd34AaRdACCDp+TVLSlFv1blzgKR2egx5zx/see0pn+djbR4FIVofz4/UeV67G3+vr3niC+H04Oz/nbwA7lqtm+wByfQAAAAASUVORK5CYII=') no-repeat;\n\twidth: 21px;\n\theight: 21px;\n\tbackground-position: 0 -2300px;\n}\n\n.font-graph-geSprite-startthindiamondtrans {\n\tbackground: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAABeQCAMAAAByzXKPAAAA1VBMVEUAAAAzMzIzMzIzMzE1NTUzMzIzMzIzMzEzMzIyMjIzMzIzMzIzMzIzMzE6OjoyMjIzMzIzMzIzMzEzMzI0NDA0NDIwMDAyMjEzMzIzMzEzMzE0NDAzMzMzMzIyMjIzMzI0NDE0NDQyMjIzMzIzMzIzMzIzMzM5OTkAAAC1tbX///9mZmYwMDAQEBAmJiZTiPJ7e3v/Z2RwcHAgICB+fn5hYWFzc3NAQECoqKiampqMjIxTU1NGRkY3NzcbGxsNDQ3w8PBQUFDg4ODAwMCwsLCgoKBPT09W+xp5AAAAKHRSTlMAh4DDEd187+mljnhvVge5nmhMQi4hA8uxk2IlHOOYc102M/jW088J/2liTQAACt5JREFUeNrs3O1um0AQheG5nIPCoIq1Q7+r/Mn9X1K9xtEAM9RLQmODzyO1cV+NtzjShhjHkRkAgn9DMCaYnRXIGOQdtWmk1zRWm0vNN6az+Y+v2fXZ5iTX/kZ4ZGvUNT6/RJuCM/VVRKFB7YBwtnY1k3h2wboaHy8RFQC2VGuc1D730WWLS2GIZ27aM4yUT+9tXaLNw9m0mI9uokepRLeC+ZyCfFCoqwckqV3WBHFZaxHLFrNxVpgUVRWjg/jli2WbfH4WyxYnWcVV0Rz7FYj26X9ezQcuE3VYkXzFSYpm9eq6pqSiuNYAaj+r0GiFxKv5tEOqxVfV0utrCkZF/HCXTuOdGz2IHKbDR5wdJ6PdeRmIsfviED0C5ZV7ojf487v59fPHsT18//a1Yn1HJdoSjIUXBG5XgaBejhMYVmT9B1dRUONj4KtyRHNmNkULDYeD2CGVjiZ0paOK1jVuYKIpjJTO7m9dovvEn3bz/DH4440f2+d9fvlVh+4LLuK6cM8GVcKKkmq3ZqqBfbhaef4n+pijBudNZH3H+OW3No+rbTmVXjfciPbs/GVQ7QU6tWqUW5lonefHfn5f6xI9DAxdqQU3n55uU821mj2ZuUq0SYo2ivA5tThxk3rK6u+urYtZiqKuGiWMEkbp4/OFLITIvyrfekt35WGvjvP6OlERwP6+VU39z+ansp+0SThP8jk+0SeoAehRjObmdha0f2YwfucMss7uaPVF3rThN/EH6fH3YhEt3bD1zMlwGtu8/8a5zrHJuR6NyrkKMK5N5qqf9ev6Y4hfGfSPrc7ZWZqPQrQPa+x5Cfe8FO55m3Xrcs8T3TFUYQ0zqj5jTPoMmagQz4brFh8D3x5L9OngyRy+IEa0JgBRlaBWAIJYyVYjYDF47PwNV/TwAIRfB+BiFcyeolchija6+P7xd//IveI+JlpwnrdZP7xexdD6/4N/PDzP06NZdc8vP4H7WKFXLbqjQcU9T7QZvFhHdN/+sndmy6lCQRQ9KOA8Ro1TxjttYuUlX5BK5f+/6YJIWjlNFREkpLJXGQuWO01e2mPaU4pA17qH7iEeKfRsrrqh4/t0hJQPEJSokULPFpJse0Iu0PNQNVSNnOu8ZHPWZc8TUhkBgECRikZMrp4Xq9W1NPubkIIUm4hnrtyikSIjq+jck3bOBQkpnSBrkU97ALl73pJqXfFc5AlJqN3cXvoTEKIzJcu5PSEFqHiGp6ahz+33Z3rWtpzhEfK16DO8XXi3S2vIvfUCHnpWrcsZHiHVAFUG0KQJoEgjGjGRFG1l9bq25gyPkIoANBcEab9DEPf27iCk40VbWa0uP86WkMsTQHPQHBSnJJHCytp1dW9Uz2cBQoo0PEqVes/r2bM0131CLtLzUCVUidw9n6uuaPY8IdnUYMet2BTccUtIfShnz60mBe65JaTunL/tVqTAbbeE1ImCc3vl16McIEiWc3tCClD5DM9Ak7ZFZCBkZEVzhkfI5/n6Hbdp+wF33BJSH8rZc6vISB/gnltCas/Z225FStdz2y0hZXE19lrt5p177NyR11+OHb/THhzJP86wP2uYrjvz1h92eTseNEzDbB2nd/OY1Py9WNw6/qjnN+fmvnmwnYkxjf1t+mAW7XlsbzaJ3a7DzH1sf3Udp7m/dcOf615sW26SdfvGrCaxbV4l9nEan0X0xqEaRrbvmnlrGFu3PTN3ndUoLOuapW8ODLzudLVomMHA71z/MwmT9mTmN+bOZnS9NcJDs+V53t+WPzQnbNa9/nRoCPl2AKqObKFvltEBoPvcVwNwmavxOy3IDwFAlkWCWPBqhJDC8GtsCPlGYI8ciQyRI+3/CLHHscysXvf0ynzWIOQsPr3wWllkxNQskD+b82/Ihi8qCCm150XpObXnc2RFs+cJqRhAE5AHpI8BOZbH5TQdlXB8JAUEIC4AvkFPSMEl/dQ+v74+2/bl6enFtm/v72+W/c/eHSW3CUNRGNZyjgiZNHE6fW2b6f63VGScCHSvI7CxjfH/tYnTU43CywFiAfnT/On+lunH3274R5G2zbv03rTj9F+z92+U7pqPX52PZjdM35uf6vxs3ofp799Kulf2B8CEc2JVjvJm6OIT5CO9PekvD/8T767XgTc2z1umnEdggyT5eX2s+k9yGpvH1kqvI523IVfSAzdlW2gbu3zn5+6j/JFcfIft0lBOi4/J6cbmBTZJTdPo9fV1/3pamqTUFCalOVkunVdNTU5bSa2Nn7ULjl0A7o5/aGt6Z6TKUpVC7/VLSrWzqTo7b+yzO+9i28shHtugl5cXXS9NLnyYHVZ+Nz79UG7y4in7Aqza9po+tBsXP1B8wCW3m01yVqq9G3w3q/X+/1lpZ5WEbKdOTnNsxiYtd+ngjl28Fw+zhwGwLA0/mDeIS46AxWnO2MVnUFD627+sasuAxyJpTsp3A+6WgnplGpILpL1JR21lZt5k2ZSrFPE41AteEy+Q9qrn58qW77lNM877sXXq+fcGLp/2giETZO5tTYumHObxKDQ0aezhxb2feNE0MWlvqZS1SzwsJZdslu3x9fYae8HFXYeAKcIVejxwzgwc0YE6jTzuWOAuqOS+GTY3rc+rmDxAKn7VEPAt+amm/7Yu8ev0gfnkHckljT8nSoaf/RkeNgUejaKburGiYt696FNIcXrt/3yJh8Qba+advg0BwJCk66Qamp3WvxtX1gMzSDZya+BU8y2OR+ogyk7w5h+Nox+/6S04pNunwKqpt9Db9yemA2GokjqThGR+ms1JeYMe92hu5y2Zbs5O5be7mkru2Hlpgc5j434M1NPiq0qqgXoaDkwqTU21V0s7dgY/TfLX9XMT1udx56RJqTqf5aqlR3vVqtOWaYpbp4NtW2tmPaXbwAZI0U1zroI/tiRW9oBVOtL5QT6uu2TH0nlgnXRSqsLkGXg+JnBTCjopVeGceXk2FnAtColkUynGMn1SrHXejq3Py4U5wHXZvtluJtXO27H+vFyMB9xElFIxNQ6fUmFj9Xm6Sr67SrA6b94Gfp4HLsb2rSM53VSMpseK1c7bsXbechs4zgO3EiUvs6kK7tgsUmlglaLkZiZVStzOBzoPrJHOS1VgVR5YuTPXz1VgXR5YM/+u9xglkyZRT2WqghlbnVc8CA+4mtxRp5vB7XxW7bw3LwvywI0pr5MN6HNNrUi/fUZO4o6tzxuiuO0GuLzUUdu3GOV3M6raeTu2Nm8aR+eBlVD1BnoVjowt0HBgnY51PrqdT/9yxtJ5YHWkeGKswoxJuMcGuIYoKdowKOQ4Xxov+4Zb/khU8Mf681a3gZ/0gYt1PjGdV1J2/mBS5z/58zrbQOeBE6zpGZgA7smRzgc6D2xKlORlCiUVKrfSslMAVulI56PX+XHv81g6D6yPFM+MVWCJDliLJdfoMhVYowPWYsk1ukwF1uiAu1R/Hh5v2wNb8r+9O0pBGAaiKLqdm/1vUCiFSCdhTIjWhntAwefY5sMxRW1ToJnZ89KjQTnuGzGUWB1DLkJtul0ofocn3SOf5wMu3mu97q30GN2e99he2gKEpj6Dkvwjj4tebb5d8EBAuhuUJJ87f96f4aT/1OlNz7GRfgg+WheCUFsfE16cpEFNx5exIUmHx09zd34AaRdACCDp+TVLSlFv1blzgKR2egx5zx/see0pn+djbR4FIVofz4/UeV67G3+vr3niC+H04Oz/nbwA7lqtm+wByfQAAAAASUVORK5CYII=') no-repeat;\n\twidth: 21px;\n\theight: 21px;\n\tbackground-position: 0 -2346px;\n}\n\n.font-graph-geSprite-globe {\n\tbackground: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAABeQCAMAAAByzXKPAAAA1VBMVEUAAAAzMzIzMzIzMzE1NTUzMzIzMzIzMzEzMzIyMjIzMzIzMzIzMzIzMzE6OjoyMjIzMzIzMzIzMzEzMzI0NDA0NDIwMDAyMjEzMzIzMzEzMzE0NDAzMzMzMzIyMjIzMzI0NDE0NDQyMjIzMzIzMzIzMzIzMzM5OTkAAAC1tbX///9mZmYwMDAQEBAmJiZTiPJ7e3v/Z2RwcHAgICB+fn5hYWFzc3NAQECoqKiampqMjIxTU1NGRkY3NzcbGxsNDQ3w8PBQUFDg4ODAwMCwsLCgoKBPT09W+xp5AAAAKHRSTlMAh4DDEd187+mljnhvVge5nmhMQi4hA8uxk2IlHOOYc102M/jW088J/2liTQAACt5JREFUeNrs3O1um0AQheG5nIPCoIq1Q7+r/Mn9X1K9xtEAM9RLQmODzyO1cV+NtzjShhjHkRkAgn9DMCaYnRXIGOQdtWmk1zRWm0vNN6az+Y+v2fXZ5iTX/kZ4ZGvUNT6/RJuCM/VVRKFB7YBwtnY1k3h2wboaHy8RFQC2VGuc1D730WWLS2GIZ27aM4yUT+9tXaLNw9m0mI9uokepRLeC+ZyCfFCoqwckqV3WBHFZaxHLFrNxVpgUVRWjg/jli2WbfH4WyxYnWcVV0Rz7FYj26X9ezQcuE3VYkXzFSYpm9eq6pqSiuNYAaj+r0GiFxKv5tEOqxVfV0utrCkZF/HCXTuOdGz2IHKbDR5wdJ6PdeRmIsfviED0C5ZV7ojf487v59fPHsT18//a1Yn1HJdoSjIUXBG5XgaBejhMYVmT9B1dRUONj4KtyRHNmNkULDYeD2CGVjiZ0paOK1jVuYKIpjJTO7m9dovvEn3bz/DH4440f2+d9fvlVh+4LLuK6cM8GVcKKkmq3ZqqBfbhaef4n+pijBudNZH3H+OW3No+rbTmVXjfciPbs/GVQ7QU6tWqUW5lonefHfn5f6xI9DAxdqQU3n55uU821mj2ZuUq0SYo2ivA5tThxk3rK6u+urYtZiqKuGiWMEkbp4/OFLITIvyrfekt35WGvjvP6OlERwP6+VU39z+ansp+0SThP8jk+0SeoAehRjObmdha0f2YwfucMss7uaPVF3rThN/EH6fH3YhEt3bD1zMlwGtu8/8a5zrHJuR6NyrkKMK5N5qqf9ev6Y4hfGfSPrc7ZWZqPQrQPa+x5Cfe8FO55m3Xrcs8T3TFUYQ0zqj5jTPoMmagQz4brFh8D3x5L9OngyRy+IEa0JgBRlaBWAIJYyVYjYDF47PwNV/TwAIRfB+BiFcyeolchija6+P7xd//IveI+JlpwnrdZP7xexdD6/4N/PDzP06NZdc8vP4H7WKFXLbqjQcU9T7QZvFhHdN/+sndmy6lCQRQ9KOA8Ro1TxjttYuUlX5BK5f+/6YJIWjlNFREkpLJXGQuWO01e2mPaU4pA17qH7iEeKfRsrrqh4/t0hJQPEJSokULPFpJse0Iu0PNQNVSNnOu8ZHPWZc8TUhkBgECRikZMrp4Xq9W1NPubkIIUm4hnrtyikSIjq+jck3bOBQkpnSBrkU97ALl73pJqXfFc5AlJqN3cXvoTEKIzJcu5PSEFqHiGp6ahz+33Z3rWtpzhEfK16DO8XXi3S2vIvfUCHnpWrcsZHiHVAFUG0KQJoEgjGjGRFG1l9bq25gyPkIoANBcEab9DEPf27iCk40VbWa0uP86WkMsTQHPQHBSnJJHCytp1dW9Uz2cBQoo0PEqVes/r2bM0131CLtLzUCVUidw9n6uuaPY8IdnUYMet2BTccUtIfShnz60mBe65JaTunL/tVqTAbbeE1ImCc3vl16McIEiWc3tCClD5DM9Ak7ZFZCBkZEVzhkfI5/n6Hbdp+wF33BJSH8rZc6vISB/gnltCas/Z225FStdz2y0hZXE19lrt5p177NyR11+OHb/THhzJP86wP2uYrjvz1h92eTseNEzDbB2nd/OY1Py9WNw6/qjnN+fmvnmwnYkxjf1t+mAW7XlsbzaJ3a7DzH1sf3Udp7m/dcOf615sW26SdfvGrCaxbV4l9nEan0X0xqEaRrbvmnlrGFu3PTN3ndUoLOuapW8ODLzudLVomMHA71z/MwmT9mTmN+bOZnS9NcJDs+V53t+WPzQnbNa9/nRoCPl2AKqObKFvltEBoPvcVwNwmavxOy3IDwFAlkWCWPBqhJDC8GtsCPlGYI8ciQyRI+3/CLHHscysXvf0ynzWIOQsPr3wWllkxNQskD+b82/Ihi8qCCm150XpObXnc2RFs+cJqRhAE5AHpI8BOZbH5TQdlXB8JAUEIC4AvkFPSMEl/dQ+v74+2/bl6enFtm/v72+W/c/eHSW3CUNRGNZyjgiZNHE6fW2b6f63VGScCHSvI7CxjfH/tYnTU43CywFiAfnT/On+lunH3274R5G2zbv03rTj9F+z92+U7pqPX52PZjdM35uf6vxs3ofp799Kulf2B8CEc2JVjvJm6OIT5CO9PekvD/8T767XgTc2z1umnEdggyT5eX2s+k9yGpvH1kqvI523IVfSAzdlW2gbu3zn5+6j/JFcfIft0lBOi4/J6cbmBTZJTdPo9fV1/3pamqTUFCalOVkunVdNTU5bSa2Nn7ULjl0A7o5/aGt6Z6TKUpVC7/VLSrWzqTo7b+yzO+9i28shHtugl5cXXS9NLnyYHVZ+Nz79UG7y4in7Aqza9po+tBsXP1B8wCW3m01yVqq9G3w3q/X+/1lpZ5WEbKdOTnNsxiYtd+ngjl28Fw+zhwGwLA0/mDeIS46AxWnO2MVnUFD627+sasuAxyJpTsp3A+6WgnplGpILpL1JR21lZt5k2ZSrFPE41AteEy+Q9qrn58qW77lNM877sXXq+fcGLp/2giETZO5tTYumHObxKDQ0aezhxb2feNE0MWlvqZS1SzwsJZdslu3x9fYae8HFXYeAKcIVejxwzgwc0YE6jTzuWOAuqOS+GTY3rc+rmDxAKn7VEPAt+amm/7Yu8ev0gfnkHckljT8nSoaf/RkeNgUejaKburGiYt696FNIcXrt/3yJh8Qba+advg0BwJCk66Qamp3WvxtX1gMzSDZya+BU8y2OR+ogyk7w5h+Nox+/6S04pNunwKqpt9Db9yemA2GokjqThGR+ms1JeYMe92hu5y2Zbs5O5be7mkru2Hlpgc5j434M1NPiq0qqgXoaDkwqTU21V0s7dgY/TfLX9XMT1udx56RJqTqf5aqlR3vVqtOWaYpbp4NtW2tmPaXbwAZI0U1zroI/tiRW9oBVOtL5QT6uu2TH0nlgnXRSqsLkGXg+JnBTCjopVeGceXk2FnAtColkUynGMn1SrHXejq3Py4U5wHXZvtluJtXO27H+vFyMB9xElFIxNQ6fUmFj9Xm6Sr67SrA6b94Gfp4HLsb2rSM53VSMpseK1c7bsXbechs4zgO3EiUvs6kK7tgsUmlglaLkZiZVStzOBzoPrJHOS1VgVR5YuTPXz1VgXR5YM/+u9xglkyZRT2WqghlbnVc8CA+4mtxRp5vB7XxW7bw3LwvywI0pr5MN6HNNrUi/fUZO4o6tzxuiuO0GuLzUUdu3GOV3M6raeTu2Nm8aR+eBlVD1BnoVjowt0HBgnY51PrqdT/9yxtJ5YHWkeGKswoxJuMcGuIYoKdowKOQ4Xxov+4Zb/khU8Mf681a3gZ/0gYt1PjGdV1J2/mBS5z/58zrbQOeBE6zpGZgA7smRzgc6D2xKlORlCiUVKrfSslMAVulI56PX+XHv81g6D6yPFM+MVWCJDliLJdfoMhVYowPWYsk1ukwF1uiAu1R/Hh5v2wNb8r+9O0pBGAaiKLqdm/1vUCiFSCdhTIjWhntAwefY5sMxRW1ToJnZ89KjQTnuGzGUWB1DLkJtul0ofocn3SOf5wMu3mu97q30GN2e99he2gKEpj6Dkvwjj4tebb5d8EBAuhuUJJ87f96f4aT/1OlNz7GRfgg+WheCUFsfE16cpEFNx5exIUmHx09zd34AaRdACCDp+TVLSlFv1blzgKR2egx5zx/see0pn+djbR4FIVofz4/UeV67G3+vr3niC+H04Oz/nbwA7lqtm+wByfQAAAAASUVORK5CYII=') no-repeat;\n\twidth: 21px;\n\theight: 21px;\n\tbackground-position: 0 -2392px;\n}\n\n.font-graph-geSprite-deletecolumn {\n\tbackground: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAABeQCAMAAAByzXKPAAAA1VBMVEUAAAAzMzIzMzIzMzE1NTUzMzIzMzIzMzEzMzIyMjIzMzIzMzIzMzIzMzE6OjoyMjIzMzIzMzIzMzEzMzI0NDA0NDIwMDAyMjEzMzIzMzEzMzE0NDAzMzMzMzIyMjIzMzI0NDE0NDQyMjIzMzIzMzIzMzIzMzM5OTkAAAC1tbX///9mZmYwMDAQEBAmJiZTiPJ7e3v/Z2RwcHAgICB+fn5hYWFzc3NAQECoqKiampqMjIxTU1NGRkY3NzcbGxsNDQ3w8PBQUFDg4ODAwMCwsLCgoKBPT09W+xp5AAAAKHRSTlMAh4DDEd187+mljnhvVge5nmhMQi4hA8uxk2IlHOOYc102M/jW088J/2liTQAACt5JREFUeNrs3O1um0AQheG5nIPCoIq1Q7+r/Mn9X1K9xtEAM9RLQmODzyO1cV+NtzjShhjHkRkAgn9DMCaYnRXIGOQdtWmk1zRWm0vNN6az+Y+v2fXZ5iTX/kZ4ZGvUNT6/RJuCM/VVRKFB7YBwtnY1k3h2wboaHy8RFQC2VGuc1D730WWLS2GIZ27aM4yUT+9tXaLNw9m0mI9uokepRLeC+ZyCfFCoqwckqV3WBHFZaxHLFrNxVpgUVRWjg/jli2WbfH4WyxYnWcVV0Rz7FYj26X9ezQcuE3VYkXzFSYpm9eq6pqSiuNYAaj+r0GiFxKv5tEOqxVfV0utrCkZF/HCXTuOdGz2IHKbDR5wdJ6PdeRmIsfviED0C5ZV7ojf487v59fPHsT18//a1Yn1HJdoSjIUXBG5XgaBejhMYVmT9B1dRUONj4KtyRHNmNkULDYeD2CGVjiZ0paOK1jVuYKIpjJTO7m9dovvEn3bz/DH4440f2+d9fvlVh+4LLuK6cM8GVcKKkmq3ZqqBfbhaef4n+pijBudNZH3H+OW3No+rbTmVXjfciPbs/GVQ7QU6tWqUW5lonefHfn5f6xI9DAxdqQU3n55uU821mj2ZuUq0SYo2ivA5tThxk3rK6u+urYtZiqKuGiWMEkbp4/OFLITIvyrfekt35WGvjvP6OlERwP6+VU39z+ansp+0SThP8jk+0SeoAehRjObmdha0f2YwfucMss7uaPVF3rThN/EH6fH3YhEt3bD1zMlwGtu8/8a5zrHJuR6NyrkKMK5N5qqf9ev6Y4hfGfSPrc7ZWZqPQrQPa+x5Cfe8FO55m3Xrcs8T3TFUYQ0zqj5jTPoMmagQz4brFh8D3x5L9OngyRy+IEa0JgBRlaBWAIJYyVYjYDF47PwNV/TwAIRfB+BiFcyeolchija6+P7xd//IveI+JlpwnrdZP7xexdD6/4N/PDzP06NZdc8vP4H7WKFXLbqjQcU9T7QZvFhHdN/+sndmy6lCQRQ9KOA8Ro1TxjttYuUlX5BK5f+/6YJIWjlNFREkpLJXGQuWO01e2mPaU4pA17qH7iEeKfRsrrqh4/t0hJQPEJSokULPFpJse0Iu0PNQNVSNnOu8ZHPWZc8TUhkBgECRikZMrp4Xq9W1NPubkIIUm4hnrtyikSIjq+jck3bOBQkpnSBrkU97ALl73pJqXfFc5AlJqN3cXvoTEKIzJcu5PSEFqHiGp6ahz+33Z3rWtpzhEfK16DO8XXi3S2vIvfUCHnpWrcsZHiHVAFUG0KQJoEgjGjGRFG1l9bq25gyPkIoANBcEab9DEPf27iCk40VbWa0uP86WkMsTQHPQHBSnJJHCytp1dW9Uz2cBQoo0PEqVes/r2bM0131CLtLzUCVUidw9n6uuaPY8IdnUYMet2BTccUtIfShnz60mBe65JaTunL/tVqTAbbeE1ImCc3vl16McIEiWc3tCClD5DM9Ak7ZFZCBkZEVzhkfI5/n6Hbdp+wF33BJSH8rZc6vISB/gnltCas/Z225FStdz2y0hZXE19lrt5p177NyR11+OHb/THhzJP86wP2uYrjvz1h92eTseNEzDbB2nd/OY1Py9WNw6/qjnN+fmvnmwnYkxjf1t+mAW7XlsbzaJ3a7DzH1sf3Udp7m/dcOf615sW26SdfvGrCaxbV4l9nEan0X0xqEaRrbvmnlrGFu3PTN3ndUoLOuapW8ODLzudLVomMHA71z/MwmT9mTmN+bOZnS9NcJDs+V53t+WPzQnbNa9/nRoCPl2AKqObKFvltEBoPvcVwNwmavxOy3IDwFAlkWCWPBqhJDC8GtsCPlGYI8ciQyRI+3/CLHHscysXvf0ynzWIOQsPr3wWllkxNQskD+b82/Ihi8qCCm150XpObXnc2RFs+cJqRhAE5AHpI8BOZbH5TQdlXB8JAUEIC4AvkFPSMEl/dQ+v74+2/bl6enFtm/v72+W/c/eHSW3CUNRGNZyjgiZNHE6fW2b6f63VGScCHSvI7CxjfH/tYnTU43CywFiAfnT/On+lunH3274R5G2zbv03rTj9F+z92+U7pqPX52PZjdM35uf6vxs3ofp799Kulf2B8CEc2JVjvJm6OIT5CO9PekvD/8T767XgTc2z1umnEdggyT5eX2s+k9yGpvH1kqvI523IVfSAzdlW2gbu3zn5+6j/JFcfIft0lBOi4/J6cbmBTZJTdPo9fV1/3pamqTUFCalOVkunVdNTU5bSa2Nn7ULjl0A7o5/aGt6Z6TKUpVC7/VLSrWzqTo7b+yzO+9i28shHtugl5cXXS9NLnyYHVZ+Nz79UG7y4in7Aqza9po+tBsXP1B8wCW3m01yVqq9G3w3q/X+/1lpZ5WEbKdOTnNsxiYtd+ngjl28Fw+zhwGwLA0/mDeIS46AxWnO2MVnUFD627+sasuAxyJpTsp3A+6WgnplGpILpL1JR21lZt5k2ZSrFPE41AteEy+Q9qrn58qW77lNM877sXXq+fcGLp/2giETZO5tTYumHObxKDQ0aezhxb2feNE0MWlvqZS1SzwsJZdslu3x9fYae8HFXYeAKcIVejxwzgwc0YE6jTzuWOAuqOS+GTY3rc+rmDxAKn7VEPAt+amm/7Yu8ev0gfnkHckljT8nSoaf/RkeNgUejaKburGiYt696FNIcXrt/3yJh8Qba+advg0BwJCk66Qamp3WvxtX1gMzSDZya+BU8y2OR+ogyk7w5h+Nox+/6S04pNunwKqpt9Db9yemA2GokjqThGR+ms1JeYMe92hu5y2Zbs5O5be7mkru2Hlpgc5j434M1NPiq0qqgXoaDkwqTU21V0s7dgY/TfLX9XMT1udx56RJqTqf5aqlR3vVqtOWaYpbp4NtW2tmPaXbwAZI0U1zroI/tiRW9oBVOtL5QT6uu2TH0nlgnXRSqsLkGXg+JnBTCjopVeGceXk2FnAtColkUynGMn1SrHXejq3Py4U5wHXZvtluJtXO27H+vFyMB9xElFIxNQ6fUmFj9Xm6Sr67SrA6b94Gfp4HLsb2rSM53VSMpseK1c7bsXbechs4zgO3EiUvs6kK7tgsUmlglaLkZiZVStzOBzoPrJHOS1VgVR5YuTPXz1VgXR5YM/+u9xglkyZRT2WqghlbnVc8CA+4mtxRp5vB7XxW7bw3LwvywI0pr5MN6HNNrUi/fUZO4o6tzxuiuO0GuLzUUdu3GOV3M6raeTu2Nm8aR+eBlVD1BnoVjowt0HBgnY51PrqdT/9yxtJ5YHWkeGKswoxJuMcGuIYoKdowKOQ4Xxov+4Zb/khU8Mf681a3gZ/0gYt1PjGdV1J2/mBS5z/58zrbQOeBE6zpGZgA7smRzgc6D2xKlORlCiUVKrfSslMAVulI56PX+XHv81g6D6yPFM+MVWCJDliLJdfoMhVYowPWYsk1ukwF1uiAu1R/Hh5v2wNb8r+9O0pBGAaiKLqdm/1vUCiFSCdhTIjWhntAwefY5sMxRW1ToJnZ89KjQTnuGzGUWB1DLkJtul0ofocn3SOf5wMu3mu97q30GN2e99he2gKEpj6Dkvwjj4tebb5d8EBAuhuUJJ87f96f4aT/1OlNz7GRfgg+WheCUFsfE16cpEFNx5exIUmHx09zd34AaRdACCDp+TVLSlFv1blzgKR2egx5zx/see0pn+djbR4FIVofz4/UeV67G3+vr3niC+H04Oz/nbwA7lqtm+wByfQAAAAASUVORK5CYII=') no-repeat;\n\twidth: 21px;\n\theight: 21px;\n\tbackground-position: 0 -2990px;\n}\n\n.font-graph-geSprite-deleterow {\n\tbackground: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAABeQCAMAAAByzXKPAAAA1VBMVEUAAAAzMzIzMzIzMzE1NTUzMzIzMzIzMzEzMzIyMjIzMzIzMzIzMzIzMzE6OjoyMjIzMzIzMzIzMzEzMzI0NDA0NDIwMDAyMjEzMzIzMzEzMzE0NDAzMzMzMzIyMjIzMzI0NDE0NDQyMjIzMzIzMzIzMzIzMzM5OTkAAAC1tbX///9mZmYwMDAQEBAmJiZTiPJ7e3v/Z2RwcHAgICB+fn5hYWFzc3NAQECoqKiampqMjIxTU1NGRkY3NzcbGxsNDQ3w8PBQUFDg4ODAwMCwsLCgoKBPT09W+xp5AAAAKHRSTlMAh4DDEd187+mljnhvVge5nmhMQi4hA8uxk2IlHOOYc102M/jW088J/2liTQAACt5JREFUeNrs3O1um0AQheG5nIPCoIq1Q7+r/Mn9X1K9xtEAM9RLQmODzyO1cV+NtzjShhjHkRkAgn9DMCaYnRXIGOQdtWmk1zRWm0vNN6az+Y+v2fXZ5iTX/kZ4ZGvUNT6/RJuCM/VVRKFB7YBwtnY1k3h2wboaHy8RFQC2VGuc1D730WWLS2GIZ27aM4yUT+9tXaLNw9m0mI9uokepRLeC+ZyCfFCoqwckqV3WBHFZaxHLFrNxVpgUVRWjg/jli2WbfH4WyxYnWcVV0Rz7FYj26X9ezQcuE3VYkXzFSYpm9eq6pqSiuNYAaj+r0GiFxKv5tEOqxVfV0utrCkZF/HCXTuOdGz2IHKbDR5wdJ6PdeRmIsfviED0C5ZV7ojf487v59fPHsT18//a1Yn1HJdoSjIUXBG5XgaBejhMYVmT9B1dRUONj4KtyRHNmNkULDYeD2CGVjiZ0paOK1jVuYKIpjJTO7m9dovvEn3bz/DH4440f2+d9fvlVh+4LLuK6cM8GVcKKkmq3ZqqBfbhaef4n+pijBudNZH3H+OW3No+rbTmVXjfciPbs/GVQ7QU6tWqUW5lonefHfn5f6xI9DAxdqQU3n55uU821mj2ZuUq0SYo2ivA5tThxk3rK6u+urYtZiqKuGiWMEkbp4/OFLITIvyrfekt35WGvjvP6OlERwP6+VU39z+ansp+0SThP8jk+0SeoAehRjObmdha0f2YwfucMss7uaPVF3rThN/EH6fH3YhEt3bD1zMlwGtu8/8a5zrHJuR6NyrkKMK5N5qqf9ev6Y4hfGfSPrc7ZWZqPQrQPa+x5Cfe8FO55m3Xrcs8T3TFUYQ0zqj5jTPoMmagQz4brFh8D3x5L9OngyRy+IEa0JgBRlaBWAIJYyVYjYDF47PwNV/TwAIRfB+BiFcyeolchija6+P7xd//IveI+JlpwnrdZP7xexdD6/4N/PDzP06NZdc8vP4H7WKFXLbqjQcU9T7QZvFhHdN/+sndmy6lCQRQ9KOA8Ro1TxjttYuUlX5BK5f+/6YJIWjlNFREkpLJXGQuWO01e2mPaU4pA17qH7iEeKfRsrrqh4/t0hJQPEJSokULPFpJse0Iu0PNQNVSNnOu8ZHPWZc8TUhkBgECRikZMrp4Xq9W1NPubkIIUm4hnrtyikSIjq+jck3bOBQkpnSBrkU97ALl73pJqXfFc5AlJqN3cXvoTEKIzJcu5PSEFqHiGp6ahz+33Z3rWtpzhEfK16DO8XXi3S2vIvfUCHnpWrcsZHiHVAFUG0KQJoEgjGjGRFG1l9bq25gyPkIoANBcEab9DEPf27iCk40VbWa0uP86WkMsTQHPQHBSnJJHCytp1dW9Uz2cBQoo0PEqVes/r2bM0131CLtLzUCVUidw9n6uuaPY8IdnUYMet2BTccUtIfShnz60mBe65JaTunL/tVqTAbbeE1ImCc3vl16McIEiWc3tCClD5DM9Ak7ZFZCBkZEVzhkfI5/n6Hbdp+wF33BJSH8rZc6vISB/gnltCas/Z225FStdz2y0hZXE19lrt5p177NyR11+OHb/THhzJP86wP2uYrjvz1h92eTseNEzDbB2nd/OY1Py9WNw6/qjnN+fmvnmwnYkxjf1t+mAW7XlsbzaJ3a7DzH1sf3Udp7m/dcOf615sW26SdfvGrCaxbV4l9nEan0X0xqEaRrbvmnlrGFu3PTN3ndUoLOuapW8ODLzudLVomMHA71z/MwmT9mTmN+bOZnS9NcJDs+V53t+WPzQnbNa9/nRoCPl2AKqObKFvltEBoPvcVwNwmavxOy3IDwFAlkWCWPBqhJDC8GtsCPlGYI8ciQyRI+3/CLHHscysXvf0ynzWIOQsPr3wWllkxNQskD+b82/Ihi8qCCm150XpObXnc2RFs+cJqRhAE5AHpI8BOZbH5TQdlXB8JAUEIC4AvkFPSMEl/dQ+v74+2/bl6enFtm/v72+W/c/eHSW3CUNRGNZyjgiZNHE6fW2b6f63VGScCHSvI7CxjfH/tYnTU43CywFiAfnT/On+lunH3274R5G2zbv03rTj9F+z92+U7pqPX52PZjdM35uf6vxs3ofp799Kulf2B8CEc2JVjvJm6OIT5CO9PekvD/8T767XgTc2z1umnEdggyT5eX2s+k9yGpvH1kqvI523IVfSAzdlW2gbu3zn5+6j/JFcfIft0lBOi4/J6cbmBTZJTdPo9fV1/3pamqTUFCalOVkunVdNTU5bSa2Nn7ULjl0A7o5/aGt6Z6TKUpVC7/VLSrWzqTo7b+yzO+9i28shHtugl5cXXS9NLnyYHVZ+Nz79UG7y4in7Aqza9po+tBsXP1B8wCW3m01yVqq9G3w3q/X+/1lpZ5WEbKdOTnNsxiYtd+ngjl28Fw+zhwGwLA0/mDeIS46AxWnO2MVnUFD627+sasuAxyJpTsp3A+6WgnplGpILpL1JR21lZt5k2ZSrFPE41AteEy+Q9qrn58qW77lNM877sXXq+fcGLp/2giETZO5tTYumHObxKDQ0aezhxb2feNE0MWlvqZS1SzwsJZdslu3x9fYae8HFXYeAKcIVejxwzgwc0YE6jTzuWOAuqOS+GTY3rc+rmDxAKn7VEPAt+amm/7Yu8ev0gfnkHckljT8nSoaf/RkeNgUejaKburGiYt696FNIcXrt/3yJh8Qba+advg0BwJCk66Qamp3WvxtX1gMzSDZya+BU8y2OR+ogyk7w5h+Nox+/6S04pNunwKqpt9Db9yemA2GokjqThGR+ms1JeYMe92hu5y2Zbs5O5be7mkru2Hlpgc5j434M1NPiq0qqgXoaDkwqTU21V0s7dgY/TfLX9XMT1udx56RJqTqf5aqlR3vVqtOWaYpbp4NtW2tmPaXbwAZI0U1zroI/tiRW9oBVOtL5QT6uu2TH0nlgnXRSqsLkGXg+JnBTCjopVeGceXk2FnAtColkUynGMn1SrHXejq3Py4U5wHXZvtluJtXO27H+vFyMB9xElFIxNQ6fUmFj9Xm6Sr67SrA6b94Gfp4HLsb2rSM53VSMpseK1c7bsXbechs4zgO3EiUvs6kK7tgsUmlglaLkZiZVStzOBzoPrJHOS1VgVR5YuTPXz1VgXR5YM/+u9xglkyZRT2WqghlbnVc8CA+4mtxRp5vB7XxW7bw3LwvywI0pr5MN6HNNrUi/fUZO4o6tzxuiuO0GuLzUUdu3GOV3M6raeTu2Nm8aR+eBlVD1BnoVjowt0HBgnY51PrqdT/9yxtJ5YHWkeGKswoxJuMcGuIYoKdowKOQ4Xxov+4Zb/khU8Mf681a3gZ/0gYt1PjGdV1J2/mBS5z/58zrbQOeBE6zpGZgA7smRzgc6D2xKlORlCiUVKrfSslMAVulI56PX+XHv81g6D6yPFM+MVWCJDliLJdfoMhVYowPWYsk1ukwF1uiAu1R/Hh5v2wNb8r+9O0pBGAaiKLqdm/1vUCiFSCdhTIjWhntAwefY5sMxRW1ToJnZ89KjQTnuGzGUWB1DLkJtul0ofocn3SOf5wMu3mu97q30GN2e99he2gKEpj6Dkvwjj4tebb5d8EBAuhuUJJ87f96f4aT/1OlNz7GRfgg+WheCUFsfE16cpEFNx5exIUmHx09zd34AaRdACCDp+TVLSlFv1blzgKR2egx5zx/see0pn+djbR4FIVofz4/UeV67G3+vr3niC+H04Oz/nbwA7lqtm+wByfQAAAAASUVORK5CYII=') no-repeat;\n\twidth: 21px;\n\theight: 21px;\n\tbackground-position: 0 -3036px;\n}\n\n.font-graph-geSprite-insertcolumnafter {\n\tbackground: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAABeQCAMAAAByzXKPAAAA1VBMVEUAAAAzMzIzMzIzMzE1NTUzMzIzMzIzMzEzMzIyMjIzMzIzMzIzMzIzMzE6OjoyMjIzMzIzMzIzMzEzMzI0NDA0NDIwMDAyMjEzMzIzMzEzMzE0NDAzMzMzMzIyMjIzMzI0NDE0NDQyMjIzMzIzMzIzMzIzMzM5OTkAAAC1tbX///9mZmYwMDAQEBAmJiZTiPJ7e3v/Z2RwcHAgICB+fn5hYWFzc3NAQECoqKiampqMjIxTU1NGRkY3NzcbGxsNDQ3w8PBQUFDg4ODAwMCwsLCgoKBPT09W+xp5AAAAKHRSTlMAh4DDEd187+mljnhvVge5nmhMQi4hA8uxk2IlHOOYc102M/jW088J/2liTQAACt5JREFUeNrs3O1um0AQheG5nIPCoIq1Q7+r/Mn9X1K9xtEAM9RLQmODzyO1cV+NtzjShhjHkRkAgn9DMCaYnRXIGOQdtWmk1zRWm0vNN6az+Y+v2fXZ5iTX/kZ4ZGvUNT6/RJuCM/VVRKFB7YBwtnY1k3h2wboaHy8RFQC2VGuc1D730WWLS2GIZ27aM4yUT+9tXaLNw9m0mI9uokepRLeC+ZyCfFCoqwckqV3WBHFZaxHLFrNxVpgUVRWjg/jli2WbfH4WyxYnWcVV0Rz7FYj26X9ezQcuE3VYkXzFSYpm9eq6pqSiuNYAaj+r0GiFxKv5tEOqxVfV0utrCkZF/HCXTuOdGz2IHKbDR5wdJ6PdeRmIsfviED0C5ZV7ojf487v59fPHsT18//a1Yn1HJdoSjIUXBG5XgaBejhMYVmT9B1dRUONj4KtyRHNmNkULDYeD2CGVjiZ0paOK1jVuYKIpjJTO7m9dovvEn3bz/DH4440f2+d9fvlVh+4LLuK6cM8GVcKKkmq3ZqqBfbhaef4n+pijBudNZH3H+OW3No+rbTmVXjfciPbs/GVQ7QU6tWqUW5lonefHfn5f6xI9DAxdqQU3n55uU821mj2ZuUq0SYo2ivA5tThxk3rK6u+urYtZiqKuGiWMEkbp4/OFLITIvyrfekt35WGvjvP6OlERwP6+VU39z+ansp+0SThP8jk+0SeoAehRjObmdha0f2YwfucMss7uaPVF3rThN/EH6fH3YhEt3bD1zMlwGtu8/8a5zrHJuR6NyrkKMK5N5qqf9ev6Y4hfGfSPrc7ZWZqPQrQPa+x5Cfe8FO55m3Xrcs8T3TFUYQ0zqj5jTPoMmagQz4brFh8D3x5L9OngyRy+IEa0JgBRlaBWAIJYyVYjYDF47PwNV/TwAIRfB+BiFcyeolchija6+P7xd//IveI+JlpwnrdZP7xexdD6/4N/PDzP06NZdc8vP4H7WKFXLbqjQcU9T7QZvFhHdN/+sndmy6lCQRQ9KOA8Ro1TxjttYuUlX5BK5f+/6YJIWjlNFREkpLJXGQuWO01e2mPaU4pA17qH7iEeKfRsrrqh4/t0hJQPEJSokULPFpJse0Iu0PNQNVSNnOu8ZHPWZc8TUhkBgECRikZMrp4Xq9W1NPubkIIUm4hnrtyikSIjq+jck3bOBQkpnSBrkU97ALl73pJqXfFc5AlJqN3cXvoTEKIzJcu5PSEFqHiGp6ahz+33Z3rWtpzhEfK16DO8XXi3S2vIvfUCHnpWrcsZHiHVAFUG0KQJoEgjGjGRFG1l9bq25gyPkIoANBcEab9DEPf27iCk40VbWa0uP86WkMsTQHPQHBSnJJHCytp1dW9Uz2cBQoo0PEqVes/r2bM0131CLtLzUCVUidw9n6uuaPY8IdnUYMet2BTccUtIfShnz60mBe65JaTunL/tVqTAbbeE1ImCc3vl16McIEiWc3tCClD5DM9Ak7ZFZCBkZEVzhkfI5/n6Hbdp+wF33BJSH8rZc6vISB/gnltCas/Z225FStdz2y0hZXE19lrt5p177NyR11+OHb/THhzJP86wP2uYrjvz1h92eTseNEzDbB2nd/OY1Py9WNw6/qjnN+fmvnmwnYkxjf1t+mAW7XlsbzaJ3a7DzH1sf3Udp7m/dcOf615sW26SdfvGrCaxbV4l9nEan0X0xqEaRrbvmnlrGFu3PTN3ndUoLOuapW8ODLzudLVomMHA71z/MwmT9mTmN+bOZnS9NcJDs+V53t+WPzQnbNa9/nRoCPl2AKqObKFvltEBoPvcVwNwmavxOy3IDwFAlkWCWPBqhJDC8GtsCPlGYI8ciQyRI+3/CLHHscysXvf0ynzWIOQsPr3wWllkxNQskD+b82/Ihi8qCCm150XpObXnc2RFs+cJqRhAE5AHpI8BOZbH5TQdlXB8JAUEIC4AvkFPSMEl/dQ+v74+2/bl6enFtm/v72+W/c/eHSW3CUNRGNZyjgiZNHE6fW2b6f63VGScCHSvI7CxjfH/tYnTU43CywFiAfnT/On+lunH3274R5G2zbv03rTj9F+z92+U7pqPX52PZjdM35uf6vxs3ofp799Kulf2B8CEc2JVjvJm6OIT5CO9PekvD/8T767XgTc2z1umnEdggyT5eX2s+k9yGpvH1kqvI523IVfSAzdlW2gbu3zn5+6j/JFcfIft0lBOi4/J6cbmBTZJTdPo9fV1/3pamqTUFCalOVkunVdNTU5bSa2Nn7ULjl0A7o5/aGt6Z6TKUpVC7/VLSrWzqTo7b+yzO+9i28shHtugl5cXXS9NLnyYHVZ+Nz79UG7y4in7Aqza9po+tBsXP1B8wCW3m01yVqq9G3w3q/X+/1lpZ5WEbKdOTnNsxiYtd+ngjl28Fw+zhwGwLA0/mDeIS46AxWnO2MVnUFD627+sasuAxyJpTsp3A+6WgnplGpILpL1JR21lZt5k2ZSrFPE41AteEy+Q9qrn58qW77lNM877sXXq+fcGLp/2giETZO5tTYumHObxKDQ0aezhxb2feNE0MWlvqZS1SzwsJZdslu3x9fYae8HFXYeAKcIVejxwzgwc0YE6jTzuWOAuqOS+GTY3rc+rmDxAKn7VEPAt+amm/7Yu8ev0gfnkHckljT8nSoaf/RkeNgUejaKburGiYt696FNIcXrt/3yJh8Qba+advg0BwJCk66Qamp3WvxtX1gMzSDZya+BU8y2OR+ogyk7w5h+Nox+/6S04pNunwKqpt9Db9yemA2GokjqThGR+ms1JeYMe92hu5y2Zbs5O5be7mkru2Hlpgc5j434M1NPiq0qqgXoaDkwqTU21V0s7dgY/TfLX9XMT1udx56RJqTqf5aqlR3vVqtOWaYpbp4NtW2tmPaXbwAZI0U1zroI/tiRW9oBVOtL5QT6uu2TH0nlgnXRSqsLkGXg+JnBTCjopVeGceXk2FnAtColkUynGMn1SrHXejq3Py4U5wHXZvtluJtXO27H+vFyMB9xElFIxNQ6fUmFj9Xm6Sr67SrA6b94Gfp4HLsb2rSM53VSMpseK1c7bsXbechs4zgO3EiUvs6kK7tgsUmlglaLkZiZVStzOBzoPrJHOS1VgVR5YuTPXz1VgXR5YM/+u9xglkyZRT2WqghlbnVc8CA+4mtxRp5vB7XxW7bw3LwvywI0pr5MN6HNNrUi/fUZO4o6tzxuiuO0GuLzUUdu3GOV3M6raeTu2Nm8aR+eBlVD1BnoVjowt0HBgnY51PrqdT/9yxtJ5YHWkeGKswoxJuMcGuIYoKdowKOQ4Xxov+4Zb/khU8Mf681a3gZ/0gYt1PjGdV1J2/mBS5z/58zrbQOeBE6zpGZgA7smRzgc6D2xKlORlCiUVKrfSslMAVulI56PX+XHv81g6D6yPFM+MVWCJDliLJdfoMhVYowPWYsk1ukwF1uiAu1R/Hh5v2wNb8r+9O0pBGAaiKLqdm/1vUCiFSCdhTIjWhntAwefY5sMxRW1ToJnZ89KjQTnuGzGUWB1DLkJtul0ofocn3SOf5wMu3mu97q30GN2e99he2gKEpj6Dkvwjj4tebb5d8EBAuhuUJJ87f96f4aT/1OlNz7GRfgg+WheCUFsfE16cpEFNx5exIUmHx09zd34AaRdACCDp+TVLSlFv1blzgKR2egx5zx/see0pn+djbR4FIVofz4/UeV67G3+vr3niC+H04Oz/nbwA7lqtm+wByfQAAAAASUVORK5CYII=') no-repeat;\n\twidth: 21px;\n\theight: 21px;\n\tbackground-position: 0 -3082px;\n}\n\n.font-graph-geSprite-insertcolumnbefore {\n\tbackground: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAABeQCAMAAAByzXKPAAAA1VBMVEUAAAAzMzIzMzIzMzE1NTUzMzIzMzIzMzEzMzIyMjIzMzIzMzIzMzIzMzE6OjoyMjIzMzIzMzIzMzEzMzI0NDA0NDIwMDAyMjEzMzIzMzEzMzE0NDAzMzMzMzIyMjIzMzI0NDE0NDQyMjIzMzIzMzIzMzIzMzM5OTkAAAC1tbX///9mZmYwMDAQEBAmJiZTiPJ7e3v/Z2RwcHAgICB+fn5hYWFzc3NAQECoqKiampqMjIxTU1NGRkY3NzcbGxsNDQ3w8PBQUFDg4ODAwMCwsLCgoKBPT09W+xp5AAAAKHRSTlMAh4DDEd187+mljnhvVge5nmhMQi4hA8uxk2IlHOOYc102M/jW088J/2liTQAACt5JREFUeNrs3O1um0AQheG5nIPCoIq1Q7+r/Mn9X1K9xtEAM9RLQmODzyO1cV+NtzjShhjHkRkAgn9DMCaYnRXIGOQdtWmk1zRWm0vNN6az+Y+v2fXZ5iTX/kZ4ZGvUNT6/RJuCM/VVRKFB7YBwtnY1k3h2wboaHy8RFQC2VGuc1D730WWLS2GIZ27aM4yUT+9tXaLNw9m0mI9uokepRLeC+ZyCfFCoqwckqV3WBHFZaxHLFrNxVpgUVRWjg/jli2WbfH4WyxYnWcVV0Rz7FYj26X9ezQcuE3VYkXzFSYpm9eq6pqSiuNYAaj+r0GiFxKv5tEOqxVfV0utrCkZF/HCXTuOdGz2IHKbDR5wdJ6PdeRmIsfviED0C5ZV7ojf487v59fPHsT18//a1Yn1HJdoSjIUXBG5XgaBejhMYVmT9B1dRUONj4KtyRHNmNkULDYeD2CGVjiZ0paOK1jVuYKIpjJTO7m9dovvEn3bz/DH4440f2+d9fvlVh+4LLuK6cM8GVcKKkmq3ZqqBfbhaef4n+pijBudNZH3H+OW3No+rbTmVXjfciPbs/GVQ7QU6tWqUW5lonefHfn5f6xI9DAxdqQU3n55uU821mj2ZuUq0SYo2ivA5tThxk3rK6u+urYtZiqKuGiWMEkbp4/OFLITIvyrfekt35WGvjvP6OlERwP6+VU39z+ansp+0SThP8jk+0SeoAehRjObmdha0f2YwfucMss7uaPVF3rThN/EH6fH3YhEt3bD1zMlwGtu8/8a5zrHJuR6NyrkKMK5N5qqf9ev6Y4hfGfSPrc7ZWZqPQrQPa+x5Cfe8FO55m3Xrcs8T3TFUYQ0zqj5jTPoMmagQz4brFh8D3x5L9OngyRy+IEa0JgBRlaBWAIJYyVYjYDF47PwNV/TwAIRfB+BiFcyeolchija6+P7xd//IveI+JlpwnrdZP7xexdD6/4N/PDzP06NZdc8vP4H7WKFXLbqjQcU9T7QZvFhHdN/+sndmy6lCQRQ9KOA8Ro1TxjttYuUlX5BK5f+/6YJIWjlNFREkpLJXGQuWO01e2mPaU4pA17qH7iEeKfRsrrqh4/t0hJQPEJSokULPFpJse0Iu0PNQNVSNnOu8ZHPWZc8TUhkBgECRikZMrp4Xq9W1NPubkIIUm4hnrtyikSIjq+jck3bOBQkpnSBrkU97ALl73pJqXfFc5AlJqN3cXvoTEKIzJcu5PSEFqHiGp6ahz+33Z3rWtpzhEfK16DO8XXi3S2vIvfUCHnpWrcsZHiHVAFUG0KQJoEgjGjGRFG1l9bq25gyPkIoANBcEab9DEPf27iCk40VbWa0uP86WkMsTQHPQHBSnJJHCytp1dW9Uz2cBQoo0PEqVes/r2bM0131CLtLzUCVUidw9n6uuaPY8IdnUYMet2BTccUtIfShnz60mBe65JaTunL/tVqTAbbeE1ImCc3vl16McIEiWc3tCClD5DM9Ak7ZFZCBkZEVzhkfI5/n6Hbdp+wF33BJSH8rZc6vISB/gnltCas/Z225FStdz2y0hZXE19lrt5p177NyR11+OHb/THhzJP86wP2uYrjvz1h92eTseNEzDbB2nd/OY1Py9WNw6/qjnN+fmvnmwnYkxjf1t+mAW7XlsbzaJ3a7DzH1sf3Udp7m/dcOf615sW26SdfvGrCaxbV4l9nEan0X0xqEaRrbvmnlrGFu3PTN3ndUoLOuapW8ODLzudLVomMHA71z/MwmT9mTmN+bOZnS9NcJDs+V53t+WPzQnbNa9/nRoCPl2AKqObKFvltEBoPvcVwNwmavxOy3IDwFAlkWCWPBqhJDC8GtsCPlGYI8ciQyRI+3/CLHHscysXvf0ynzWIOQsPr3wWllkxNQskD+b82/Ihi8qCCm150XpObXnc2RFs+cJqRhAE5AHpI8BOZbH5TQdlXB8JAUEIC4AvkFPSMEl/dQ+v74+2/bl6enFtm/v72+W/c/eHSW3CUNRGNZyjgiZNHE6fW2b6f63VGScCHSvI7CxjfH/tYnTU43CywFiAfnT/On+lunH3274R5G2zbv03rTj9F+z92+U7pqPX52PZjdM35uf6vxs3ofp799Kulf2B8CEc2JVjvJm6OIT5CO9PekvD/8T767XgTc2z1umnEdggyT5eX2s+k9yGpvH1kqvI523IVfSAzdlW2gbu3zn5+6j/JFcfIft0lBOi4/J6cbmBTZJTdPo9fV1/3pamqTUFCalOVkunVdNTU5bSa2Nn7ULjl0A7o5/aGt6Z6TKUpVC7/VLSrWzqTo7b+yzO+9i28shHtugl5cXXS9NLnyYHVZ+Nz79UG7y4in7Aqza9po+tBsXP1B8wCW3m01yVqq9G3w3q/X+/1lpZ5WEbKdOTnNsxiYtd+ngjl28Fw+zhwGwLA0/mDeIS46AxWnO2MVnUFD627+sasuAxyJpTsp3A+6WgnplGpILpL1JR21lZt5k2ZSrFPE41AteEy+Q9qrn58qW77lNM877sXXq+fcGLp/2giETZO5tTYumHObxKDQ0aezhxb2feNE0MWlvqZS1SzwsJZdslu3x9fYae8HFXYeAKcIVejxwzgwc0YE6jTzuWOAuqOS+GTY3rc+rmDxAKn7VEPAt+amm/7Yu8ev0gfnkHckljT8nSoaf/RkeNgUejaKburGiYt696FNIcXrt/3yJh8Qba+advg0BwJCk66Qamp3WvxtX1gMzSDZya+BU8y2OR+ogyk7w5h+Nox+/6S04pNunwKqpt9Db9yemA2GokjqThGR+ms1JeYMe92hu5y2Zbs5O5be7mkru2Hlpgc5j434M1NPiq0qqgXoaDkwqTU21V0s7dgY/TfLX9XMT1udx56RJqTqf5aqlR3vVqtOWaYpbp4NtW2tmPaXbwAZI0U1zroI/tiRW9oBVOtL5QT6uu2TH0nlgnXRSqsLkGXg+JnBTCjopVeGceXk2FnAtColkUynGMn1SrHXejq3Py4U5wHXZvtluJtXO27H+vFyMB9xElFIxNQ6fUmFj9Xm6Sr67SrA6b94Gfp4HLsb2rSM53VSMpseK1c7bsXbechs4zgO3EiUvs6kK7tgsUmlglaLkZiZVStzOBzoPrJHOS1VgVR5YuTPXz1VgXR5YM/+u9xglkyZRT2WqghlbnVc8CA+4mtxRp5vB7XxW7bw3LwvywI0pr5MN6HNNrUi/fUZO4o6tzxuiuO0GuLzUUdu3GOV3M6raeTu2Nm8aR+eBlVD1BnoVjowt0HBgnY51PrqdT/9yxtJ5YHWkeGKswoxJuMcGuIYoKdowKOQ4Xxov+4Zb/khU8Mf681a3gZ/0gYt1PjGdV1J2/mBS5z/58zrbQOeBE6zpGZgA7smRzgc6D2xKlORlCiUVKrfSslMAVulI56PX+XHv81g6D6yPFM+MVWCJDliLJdfoMhVYowPWYsk1ukwF1uiAu1R/Hh5v2wNb8r+9O0pBGAaiKLqdm/1vUCiFSCdhTIjWhntAwefY5sMxRW1ToJnZ89KjQTnuGzGUWB1DLkJtul0ofocn3SOf5wMu3mu97q30GN2e99he2gKEpj6Dkvwjj4tebb5d8EBAuhuUJJ87f96f4aT/1OlNz7GRfgg+WheCUFsfE16cpEFNx5exIUmHx09zd34AaRdACCDp+TVLSlFv1blzgKR2egx5zx/see0pn+djbR4FIVofz4/UeV67G3+vr3niC+H04Oz/nbwA7lqtm+wByfQAAAAASUVORK5CYII=') no-repeat;\n\twidth: 21px;\n\theight: 21px;\n\tbackground-position: 0 -3128px;\n}\n\n.font-graph-geSprite-insertrowafter {\n\tbackground: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAABeQCAMAAAByzXKPAAAA1VBMVEUAAAAzMzIzMzIzMzE1NTUzMzIzMzIzMzEzMzIyMjIzMzIzMzIzMzIzMzE6OjoyMjIzMzIzMzIzMzEzMzI0NDA0NDIwMDAyMjEzMzIzMzEzMzE0NDAzMzMzMzIyMjIzMzI0NDE0NDQyMjIzMzIzMzIzMzIzMzM5OTkAAAC1tbX///9mZmYwMDAQEBAmJiZTiPJ7e3v/Z2RwcHAgICB+fn5hYWFzc3NAQECoqKiampqMjIxTU1NGRkY3NzcbGxsNDQ3w8PBQUFDg4ODAwMCwsLCgoKBPT09W+xp5AAAAKHRSTlMAh4DDEd187+mljnhvVge5nmhMQi4hA8uxk2IlHOOYc102M/jW088J/2liTQAACt5JREFUeNrs3O1um0AQheG5nIPCoIq1Q7+r/Mn9X1K9xtEAM9RLQmODzyO1cV+NtzjShhjHkRkAgn9DMCaYnRXIGOQdtWmk1zRWm0vNN6az+Y+v2fXZ5iTX/kZ4ZGvUNT6/RJuCM/VVRKFB7YBwtnY1k3h2wboaHy8RFQC2VGuc1D730WWLS2GIZ27aM4yUT+9tXaLNw9m0mI9uokepRLeC+ZyCfFCoqwckqV3WBHFZaxHLFrNxVpgUVRWjg/jli2WbfH4WyxYnWcVV0Rz7FYj26X9ezQcuE3VYkXzFSYpm9eq6pqSiuNYAaj+r0GiFxKv5tEOqxVfV0utrCkZF/HCXTuOdGz2IHKbDR5wdJ6PdeRmIsfviED0C5ZV7ojf487v59fPHsT18//a1Yn1HJdoSjIUXBG5XgaBejhMYVmT9B1dRUONj4KtyRHNmNkULDYeD2CGVjiZ0paOK1jVuYKIpjJTO7m9dovvEn3bz/DH4440f2+d9fvlVh+4LLuK6cM8GVcKKkmq3ZqqBfbhaef4n+pijBudNZH3H+OW3No+rbTmVXjfciPbs/GVQ7QU6tWqUW5lonefHfn5f6xI9DAxdqQU3n55uU821mj2ZuUq0SYo2ivA5tThxk3rK6u+urYtZiqKuGiWMEkbp4/OFLITIvyrfekt35WGvjvP6OlERwP6+VU39z+ansp+0SThP8jk+0SeoAehRjObmdha0f2YwfucMss7uaPVF3rThN/EH6fH3YhEt3bD1zMlwGtu8/8a5zrHJuR6NyrkKMK5N5qqf9ev6Y4hfGfSPrc7ZWZqPQrQPa+x5Cfe8FO55m3Xrcs8T3TFUYQ0zqj5jTPoMmagQz4brFh8D3x5L9OngyRy+IEa0JgBRlaBWAIJYyVYjYDF47PwNV/TwAIRfB+BiFcyeolchija6+P7xd//IveI+JlpwnrdZP7xexdD6/4N/PDzP06NZdc8vP4H7WKFXLbqjQcU9T7QZvFhHdN/+sndmy6lCQRQ9KOA8Ro1TxjttYuUlX5BK5f+/6YJIWjlNFREkpLJXGQuWO01e2mPaU4pA17qH7iEeKfRsrrqh4/t0hJQPEJSokULPFpJse0Iu0PNQNVSNnOu8ZHPWZc8TUhkBgECRikZMrp4Xq9W1NPubkIIUm4hnrtyikSIjq+jck3bOBQkpnSBrkU97ALl73pJqXfFc5AlJqN3cXvoTEKIzJcu5PSEFqHiGp6ahz+33Z3rWtpzhEfK16DO8XXi3S2vIvfUCHnpWrcsZHiHVAFUG0KQJoEgjGjGRFG1l9bq25gyPkIoANBcEab9DEPf27iCk40VbWa0uP86WkMsTQHPQHBSnJJHCytp1dW9Uz2cBQoo0PEqVes/r2bM0131CLtLzUCVUidw9n6uuaPY8IdnUYMet2BTccUtIfShnz60mBe65JaTunL/tVqTAbbeE1ImCc3vl16McIEiWc3tCClD5DM9Ak7ZFZCBkZEVzhkfI5/n6Hbdp+wF33BJSH8rZc6vISB/gnltCas/Z225FStdz2y0hZXE19lrt5p177NyR11+OHb/THhzJP86wP2uYrjvz1h92eTseNEzDbB2nd/OY1Py9WNw6/qjnN+fmvnmwnYkxjf1t+mAW7XlsbzaJ3a7DzH1sf3Udp7m/dcOf615sW26SdfvGrCaxbV4l9nEan0X0xqEaRrbvmnlrGFu3PTN3ndUoLOuapW8ODLzudLVomMHA71z/MwmT9mTmN+bOZnS9NcJDs+V53t+WPzQnbNa9/nRoCPl2AKqObKFvltEBoPvcVwNwmavxOy3IDwFAlkWCWPBqhJDC8GtsCPlGYI8ciQyRI+3/CLHHscysXvf0ynzWIOQsPr3wWllkxNQskD+b82/Ihi8qCCm150XpObXnc2RFs+cJqRhAE5AHpI8BOZbH5TQdlXB8JAUEIC4AvkFPSMEl/dQ+v74+2/bl6enFtm/v72+W/c/eHSW3CUNRGNZyjgiZNHE6fW2b6f63VGScCHSvI7CxjfH/tYnTU43CywFiAfnT/On+lunH3274R5G2zbv03rTj9F+z92+U7pqPX52PZjdM35uf6vxs3ofp799Kulf2B8CEc2JVjvJm6OIT5CO9PekvD/8T767XgTc2z1umnEdggyT5eX2s+k9yGpvH1kqvI523IVfSAzdlW2gbu3zn5+6j/JFcfIft0lBOi4/J6cbmBTZJTdPo9fV1/3pamqTUFCalOVkunVdNTU5bSa2Nn7ULjl0A7o5/aGt6Z6TKUpVC7/VLSrWzqTo7b+yzO+9i28shHtugl5cXXS9NLnyYHVZ+Nz79UG7y4in7Aqza9po+tBsXP1B8wCW3m01yVqq9G3w3q/X+/1lpZ5WEbKdOTnNsxiYtd+ngjl28Fw+zhwGwLA0/mDeIS46AxWnO2MVnUFD627+sasuAxyJpTsp3A+6WgnplGpILpL1JR21lZt5k2ZSrFPE41AteEy+Q9qrn58qW77lNM877sXXq+fcGLp/2giETZO5tTYumHObxKDQ0aezhxb2feNE0MWlvqZS1SzwsJZdslu3x9fYae8HFXYeAKcIVejxwzgwc0YE6jTzuWOAuqOS+GTY3rc+rmDxAKn7VEPAt+amm/7Yu8ev0gfnkHckljT8nSoaf/RkeNgUejaKburGiYt696FNIcXrt/3yJh8Qba+advg0BwJCk66Qamp3WvxtX1gMzSDZya+BU8y2OR+ogyk7w5h+Nox+/6S04pNunwKqpt9Db9yemA2GokjqThGR+ms1JeYMe92hu5y2Zbs5O5be7mkru2Hlpgc5j434M1NPiq0qqgXoaDkwqTU21V0s7dgY/TfLX9XMT1udx56RJqTqf5aqlR3vVqtOWaYpbp4NtW2tmPaXbwAZI0U1zroI/tiRW9oBVOtL5QT6uu2TH0nlgnXRSqsLkGXg+JnBTCjopVeGceXk2FnAtColkUynGMn1SrHXejq3Py4U5wHXZvtluJtXO27H+vFyMB9xElFIxNQ6fUmFj9Xm6Sr67SrA6b94Gfp4HLsb2rSM53VSMpseK1c7bsXbechs4zgO3EiUvs6kK7tgsUmlglaLkZiZVStzOBzoPrJHOS1VgVR5YuTPXz1VgXR5YM/+u9xglkyZRT2WqghlbnVc8CA+4mtxRp5vB7XxW7bw3LwvywI0pr5MN6HNNrUi/fUZO4o6tzxuiuO0GuLzUUdu3GOV3M6raeTu2Nm8aR+eBlVD1BnoVjowt0HBgnY51PrqdT/9yxtJ5YHWkeGKswoxJuMcGuIYoKdowKOQ4Xxov+4Zb/khU8Mf681a3gZ/0gYt1PjGdV1J2/mBS5z/58zrbQOeBE6zpGZgA7smRzgc6D2xKlORlCiUVKrfSslMAVulI56PX+XHv81g6D6yPFM+MVWCJDliLJdfoMhVYowPWYsk1ukwF1uiAu1R/Hh5v2wNb8r+9O0pBGAaiKLqdm/1vUCiFSCdhTIjWhntAwefY5sMxRW1ToJnZ89KjQTnuGzGUWB1DLkJtul0ofocn3SOf5wMu3mu97q30GN2e99he2gKEpj6Dkvwjj4tebb5d8EBAuhuUJJ87f96f4aT/1OlNz7GRfgg+WheCUFsfE16cpEFNx5exIUmHx09zd34AaRdACCDp+TVLSlFv1blzgKR2egx5zx/see0pn+djbR4FIVofz4/UeV67G3+vr3niC+H04Oz/nbwA7lqtm+wByfQAAAAASUVORK5CYII=') no-repeat;\n\twidth: 21px;\n\theight: 21px;\n\tbackground-position: 0 -3174px;\n}\n\n.font-graph-geSprite-insertrowbefore {\n\tbackground: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAABeQCAMAAAByzXKPAAAA1VBMVEUAAAAzMzIzMzIzMzE1NTUzMzIzMzIzMzEzMzIyMjIzMzIzMzIzMzIzMzE6OjoyMjIzMzIzMzIzMzEzMzI0NDA0NDIwMDAyMjEzMzIzMzEzMzE0NDAzMzMzMzIyMjIzMzI0NDE0NDQyMjIzMzIzMzIzMzIzMzM5OTkAAAC1tbX///9mZmYwMDAQEBAmJiZTiPJ7e3v/Z2RwcHAgICB+fn5hYWFzc3NAQECoqKiampqMjIxTU1NGRkY3NzcbGxsNDQ3w8PBQUFDg4ODAwMCwsLCgoKBPT09W+xp5AAAAKHRSTlMAh4DDEd187+mljnhvVge5nmhMQi4hA8uxk2IlHOOYc102M/jW088J/2liTQAACt5JREFUeNrs3O1um0AQheG5nIPCoIq1Q7+r/Mn9X1K9xtEAM9RLQmODzyO1cV+NtzjShhjHkRkAgn9DMCaYnRXIGOQdtWmk1zRWm0vNN6az+Y+v2fXZ5iTX/kZ4ZGvUNT6/RJuCM/VVRKFB7YBwtnY1k3h2wboaHy8RFQC2VGuc1D730WWLS2GIZ27aM4yUT+9tXaLNw9m0mI9uokepRLeC+ZyCfFCoqwckqV3WBHFZaxHLFrNxVpgUVRWjg/jli2WbfH4WyxYnWcVV0Rz7FYj26X9ezQcuE3VYkXzFSYpm9eq6pqSiuNYAaj+r0GiFxKv5tEOqxVfV0utrCkZF/HCXTuOdGz2IHKbDR5wdJ6PdeRmIsfviED0C5ZV7ojf487v59fPHsT18//a1Yn1HJdoSjIUXBG5XgaBejhMYVmT9B1dRUONj4KtyRHNmNkULDYeD2CGVjiZ0paOK1jVuYKIpjJTO7m9dovvEn3bz/DH4440f2+d9fvlVh+4LLuK6cM8GVcKKkmq3ZqqBfbhaef4n+pijBudNZH3H+OW3No+rbTmVXjfciPbs/GVQ7QU6tWqUW5lonefHfn5f6xI9DAxdqQU3n55uU821mj2ZuUq0SYo2ivA5tThxk3rK6u+urYtZiqKuGiWMEkbp4/OFLITIvyrfekt35WGvjvP6OlERwP6+VU39z+ansp+0SThP8jk+0SeoAehRjObmdha0f2YwfucMss7uaPVF3rThN/EH6fH3YhEt3bD1zMlwGtu8/8a5zrHJuR6NyrkKMK5N5qqf9ev6Y4hfGfSPrc7ZWZqPQrQPa+x5Cfe8FO55m3Xrcs8T3TFUYQ0zqj5jTPoMmagQz4brFh8D3x5L9OngyRy+IEa0JgBRlaBWAIJYyVYjYDF47PwNV/TwAIRfB+BiFcyeolchija6+P7xd//IveI+JlpwnrdZP7xexdD6/4N/PDzP06NZdc8vP4H7WKFXLbqjQcU9T7QZvFhHdN/+sndmy6lCQRQ9KOA8Ro1TxjttYuUlX5BK5f+/6YJIWjlNFREkpLJXGQuWO01e2mPaU4pA17qH7iEeKfRsrrqh4/t0hJQPEJSokULPFpJse0Iu0PNQNVSNnOu8ZHPWZc8TUhkBgECRikZMrp4Xq9W1NPubkIIUm4hnrtyikSIjq+jck3bOBQkpnSBrkU97ALl73pJqXfFc5AlJqN3cXvoTEKIzJcu5PSEFqHiGp6ahz+33Z3rWtpzhEfK16DO8XXi3S2vIvfUCHnpWrcsZHiHVAFUG0KQJoEgjGjGRFG1l9bq25gyPkIoANBcEab9DEPf27iCk40VbWa0uP86WkMsTQHPQHBSnJJHCytp1dW9Uz2cBQoo0PEqVes/r2bM0131CLtLzUCVUidw9n6uuaPY8IdnUYMet2BTccUtIfShnz60mBe65JaTunL/tVqTAbbeE1ImCc3vl16McIEiWc3tCClD5DM9Ak7ZFZCBkZEVzhkfI5/n6Hbdp+wF33BJSH8rZc6vISB/gnltCas/Z225FStdz2y0hZXE19lrt5p177NyR11+OHb/THhzJP86wP2uYrjvz1h92eTseNEzDbB2nd/OY1Py9WNw6/qjnN+fmvnmwnYkxjf1t+mAW7XlsbzaJ3a7DzH1sf3Udp7m/dcOf615sW26SdfvGrCaxbV4l9nEan0X0xqEaRrbvmnlrGFu3PTN3ndUoLOuapW8ODLzudLVomMHA71z/MwmT9mTmN+bOZnS9NcJDs+V53t+WPzQnbNa9/nRoCPl2AKqObKFvltEBoPvcVwNwmavxOy3IDwFAlkWCWPBqhJDC8GtsCPlGYI8ciQyRI+3/CLHHscysXvf0ynzWIOQsPr3wWllkxNQskD+b82/Ihi8qCCm150XpObXnc2RFs+cJqRhAE5AHpI8BOZbH5TQdlXB8JAUEIC4AvkFPSMEl/dQ+v74+2/bl6enFtm/v72+W/c/eHSW3CUNRGNZyjgiZNHE6fW2b6f63VGScCHSvI7CxjfH/tYnTU43CywFiAfnT/On+lunH3274R5G2zbv03rTj9F+z92+U7pqPX52PZjdM35uf6vxs3ofp799Kulf2B8CEc2JVjvJm6OIT5CO9PekvD/8T767XgTc2z1umnEdggyT5eX2s+k9yGpvH1kqvI523IVfSAzdlW2gbu3zn5+6j/JFcfIft0lBOi4/J6cbmBTZJTdPo9fV1/3pamqTUFCalOVkunVdNTU5bSa2Nn7ULjl0A7o5/aGt6Z6TKUpVC7/VLSrWzqTo7b+yzO+9i28shHtugl5cXXS9NLnyYHVZ+Nz79UG7y4in7Aqza9po+tBsXP1B8wCW3m01yVqq9G3w3q/X+/1lpZ5WEbKdOTnNsxiYtd+ngjl28Fw+zhwGwLA0/mDeIS46AxWnO2MVnUFD627+sasuAxyJpTsp3A+6WgnplGpILpL1JR21lZt5k2ZSrFPE41AteEy+Q9qrn58qW77lNM877sXXq+fcGLp/2giETZO5tTYumHObxKDQ0aezhxb2feNE0MWlvqZS1SzwsJZdslu3x9fYae8HFXYeAKcIVejxwzgwc0YE6jTzuWOAuqOS+GTY3rc+rmDxAKn7VEPAt+amm/7Yu8ev0gfnkHckljT8nSoaf/RkeNgUejaKburGiYt696FNIcXrt/3yJh8Qba+advg0BwJCk66Qamp3WvxtX1gMzSDZya+BU8y2OR+ogyk7w5h+Nox+/6S04pNunwKqpt9Db9yemA2GokjqThGR+ms1JeYMe92hu5y2Zbs5O5be7mkru2Hlpgc5j434M1NPiq0qqgXoaDkwqTU21V0s7dgY/TfLX9XMT1udx56RJqTqf5aqlR3vVqtOWaYpbp4NtW2tmPaXbwAZI0U1zroI/tiRW9oBVOtL5QT6uu2TH0nlgnXRSqsLkGXg+JnBTCjopVeGceXk2FnAtColkUynGMn1SrHXejq3Py4U5wHXZvtluJtXO27H+vFyMB9xElFIxNQ6fUmFj9Xm6Sr67SrA6b94Gfp4HLsb2rSM53VSMpseK1c7bsXbechs4zgO3EiUvs6kK7tgsUmlglaLkZiZVStzOBzoPrJHOS1VgVR5YuTPXz1VgXR5YM/+u9xglkyZRT2WqghlbnVc8CA+4mtxRp5vB7XxW7bw3LwvywI0pr5MN6HNNrUi/fUZO4o6tzxuiuO0GuLzUUdu3GOV3M6raeTu2Nm8aR+eBlVD1BnoVjowt0HBgnY51PrqdT/9yxtJ5YHWkeGKswoxJuMcGuIYoKdowKOQ4Xxov+4Zb/khU8Mf681a3gZ/0gYt1PjGdV1J2/mBS5z/58zrbQOeBE6zpGZgA7smRzgc6D2xKlORlCiUVKrfSslMAVulI56PX+XHv81g6D6yPFM+MVWCJDliLJdfoMhVYowPWYsk1ukwF1uiAu1R/Hh5v2wNb8r+9O0pBGAaiKLqdm/1vUCiFSCdhTIjWhntAwefY5sMxRW1ToJnZ89KjQTnuGzGUWB1DLkJtul0ofocn3SOf5wMu3mu97q30GN2e99he2gKEpj6Dkvwjj4tebb5d8EBAuhuUJJ87f96f4aT/1OlNz7GRfgg+WheCUFsfE16cpEFNx5exIUmHx09zd34AaRdACCDp+TVLSlFv1blzgKR2egx5zx/see0pn+djbR4FIVofz4/UeV67G3+vr3niC+H04Oz/nbwA7lqtm+wByfQAAAAASUVORK5CYII=') no-repeat;\n\twidth: 21px;\n\theight: 21px;\n\tbackground-position: 0 -3220px;\n}\n\n.font-graph-geSprite-grid {\n\tbackground: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAABeQCAMAAAByzXKPAAAA1VBMVEUAAAAzMzIzMzIzMzE1NTUzMzIzMzIzMzEzMzIyMjIzMzIzMzIzMzIzMzE6OjoyMjIzMzIzMzIzMzEzMzI0NDA0NDIwMDAyMjEzMzIzMzEzMzE0NDAzMzMzMzIyMjIzMzI0NDE0NDQyMjIzMzIzMzIzMzIzMzM5OTkAAAC1tbX///9mZmYwMDAQEBAmJiZTiPJ7e3v/Z2RwcHAgICB+fn5hYWFzc3NAQECoqKiampqMjIxTU1NGRkY3NzcbGxsNDQ3w8PBQUFDg4ODAwMCwsLCgoKBPT09W+xp5AAAAKHRSTlMAh4DDEd187+mljnhvVge5nmhMQi4hA8uxk2IlHOOYc102M/jW088J/2liTQAACt5JREFUeNrs3O1um0AQheG5nIPCoIq1Q7+r/Mn9X1K9xtEAM9RLQmODzyO1cV+NtzjShhjHkRkAgn9DMCaYnRXIGOQdtWmk1zRWm0vNN6az+Y+v2fXZ5iTX/kZ4ZGvUNT6/RJuCM/VVRKFB7YBwtnY1k3h2wboaHy8RFQC2VGuc1D730WWLS2GIZ27aM4yUT+9tXaLNw9m0mI9uokepRLeC+ZyCfFCoqwckqV3WBHFZaxHLFrNxVpgUVRWjg/jli2WbfH4WyxYnWcVV0Rz7FYj26X9ezQcuE3VYkXzFSYpm9eq6pqSiuNYAaj+r0GiFxKv5tEOqxVfV0utrCkZF/HCXTuOdGz2IHKbDR5wdJ6PdeRmIsfviED0C5ZV7ojf487v59fPHsT18//a1Yn1HJdoSjIUXBG5XgaBejhMYVmT9B1dRUONj4KtyRHNmNkULDYeD2CGVjiZ0paOK1jVuYKIpjJTO7m9dovvEn3bz/DH4440f2+d9fvlVh+4LLuK6cM8GVcKKkmq3ZqqBfbhaef4n+pijBudNZH3H+OW3No+rbTmVXjfciPbs/GVQ7QU6tWqUW5lonefHfn5f6xI9DAxdqQU3n55uU821mj2ZuUq0SYo2ivA5tThxk3rK6u+urYtZiqKuGiWMEkbp4/OFLITIvyrfekt35WGvjvP6OlERwP6+VU39z+ansp+0SThP8jk+0SeoAehRjObmdha0f2YwfucMss7uaPVF3rThN/EH6fH3YhEt3bD1zMlwGtu8/8a5zrHJuR6NyrkKMK5N5qqf9ev6Y4hfGfSPrc7ZWZqPQrQPa+x5Cfe8FO55m3Xrcs8T3TFUYQ0zqj5jTPoMmagQz4brFh8D3x5L9OngyRy+IEa0JgBRlaBWAIJYyVYjYDF47PwNV/TwAIRfB+BiFcyeolchija6+P7xd//IveI+JlpwnrdZP7xexdD6/4N/PDzP06NZdc8vP4H7WKFXLbqjQcU9T7QZvFhHdN/+sndmy6lCQRQ9KOA8Ro1TxjttYuUlX5BK5f+/6YJIWjlNFREkpLJXGQuWO01e2mPaU4pA17qH7iEeKfRsrrqh4/t0hJQPEJSokULPFpJse0Iu0PNQNVSNnOu8ZHPWZc8TUhkBgECRikZMrp4Xq9W1NPubkIIUm4hnrtyikSIjq+jck3bOBQkpnSBrkU97ALl73pJqXfFc5AlJqN3cXvoTEKIzJcu5PSEFqHiGp6ahz+33Z3rWtpzhEfK16DO8XXi3S2vIvfUCHnpWrcsZHiHVAFUG0KQJoEgjGjGRFG1l9bq25gyPkIoANBcEab9DEPf27iCk40VbWa0uP86WkMsTQHPQHBSnJJHCytp1dW9Uz2cBQoo0PEqVes/r2bM0131CLtLzUCVUidw9n6uuaPY8IdnUYMet2BTccUtIfShnz60mBe65JaTunL/tVqTAbbeE1ImCc3vl16McIEiWc3tCClD5DM9Ak7ZFZCBkZEVzhkfI5/n6Hbdp+wF33BJSH8rZc6vISB/gnltCas/Z225FStdz2y0hZXE19lrt5p177NyR11+OHb/THhzJP86wP2uYrjvz1h92eTseNEzDbB2nd/OY1Py9WNw6/qjnN+fmvnmwnYkxjf1t+mAW7XlsbzaJ3a7DzH1sf3Udp7m/dcOf615sW26SdfvGrCaxbV4l9nEan0X0xqEaRrbvmnlrGFu3PTN3ndUoLOuapW8ODLzudLVomMHA71z/MwmT9mTmN+bOZnS9NcJDs+V53t+WPzQnbNa9/nRoCPl2AKqObKFvltEBoPvcVwNwmavxOy3IDwFAlkWCWPBqhJDC8GtsCPlGYI8ciQyRI+3/CLHHscysXvf0ynzWIOQsPr3wWllkxNQskD+b82/Ihi8qCCm150XpObXnc2RFs+cJqRhAE5AHpI8BOZbH5TQdlXB8JAUEIC4AvkFPSMEl/dQ+v74+2/bl6enFtm/v72+W/c/eHSW3CUNRGNZyjgiZNHE6fW2b6f63VGScCHSvI7CxjfH/tYnTU43CywFiAfnT/On+lunH3274R5G2zbv03rTj9F+z92+U7pqPX52PZjdM35uf6vxs3ofp799Kulf2B8CEc2JVjvJm6OIT5CO9PekvD/8T767XgTc2z1umnEdggyT5eX2s+k9yGpvH1kqvI523IVfSAzdlW2gbu3zn5+6j/JFcfIft0lBOi4/J6cbmBTZJTdPo9fV1/3pamqTUFCalOVkunVdNTU5bSa2Nn7ULjl0A7o5/aGt6Z6TKUpVC7/VLSrWzqTo7b+yzO+9i28shHtugl5cXXS9NLnyYHVZ+Nz79UG7y4in7Aqza9po+tBsXP1B8wCW3m01yVqq9G3w3q/X+/1lpZ5WEbKdOTnNsxiYtd+ngjl28Fw+zhwGwLA0/mDeIS46AxWnO2MVnUFD627+sasuAxyJpTsp3A+6WgnplGpILpL1JR21lZt5k2ZSrFPE41AteEy+Q9qrn58qW77lNM877sXXq+fcGLp/2giETZO5tTYumHObxKDQ0aezhxb2feNE0MWlvqZS1SzwsJZdslu3x9fYae8HFXYeAKcIVejxwzgwc0YE6jTzuWOAuqOS+GTY3rc+rmDxAKn7VEPAt+amm/7Yu8ev0gfnkHckljT8nSoaf/RkeNgUejaKburGiYt696FNIcXrt/3yJh8Qba+advg0BwJCk66Qamp3WvxtX1gMzSDZya+BU8y2OR+ogyk7w5h+Nox+/6S04pNunwKqpt9Db9yemA2GokjqThGR+ms1JeYMe92hu5y2Zbs5O5be7mkru2Hlpgc5j434M1NPiq0qqgXoaDkwqTU21V0s7dgY/TfLX9XMT1udx56RJqTqf5aqlR3vVqtOWaYpbp4NtW2tmPaXbwAZI0U1zroI/tiRW9oBVOtL5QT6uu2TH0nlgnXRSqsLkGXg+JnBTCjopVeGceXk2FnAtColkUynGMn1SrHXejq3Py4U5wHXZvtluJtXO27H+vFyMB9xElFIxNQ6fUmFj9Xm6Sr67SrA6b94Gfp4HLsb2rSM53VSMpseK1c7bsXbechs4zgO3EiUvs6kK7tgsUmlglaLkZiZVStzOBzoPrJHOS1VgVR5YuTPXz1VgXR5YM/+u9xglkyZRT2WqghlbnVc8CA+4mtxRp5vB7XxW7bw3LwvywI0pr5MN6HNNrUi/fUZO4o6tzxuiuO0GuLzUUdu3GOV3M6raeTu2Nm8aR+eBlVD1BnoVjowt0HBgnY51PrqdT/9yxtJ5YHWkeGKswoxJuMcGuIYoKdowKOQ4Xxov+4Zb/khU8Mf681a3gZ/0gYt1PjGdV1J2/mBS5z/58zrbQOeBE6zpGZgA7smRzgc6D2xKlORlCiUVKrfSslMAVulI56PX+XHv81g6D6yPFM+MVWCJDliLJdfoMhVYowPWYsk1ukwF1uiAu1R/Hh5v2wNb8r+9O0pBGAaiKLqdm/1vUCiFSCdhTIjWhntAwefY5sMxRW1ToJnZ89KjQTnuGzGUWB1DLkJtul0ofocn3SOf5wMu3mu97q30GN2e99he2gKEpj6Dkvwjj4tebb5d8EBAuhuUJJ87f96f4aT/1OlNz7GRfgg+WheCUFsfE16cpEFNx5exIUmHx09zd34AaRdACCDp+TVLSlFv1blzgKR2egx5zx/see0pn+djbR4FIVofz4/UeV67G3+vr3niC+H04Oz/nbwA7lqtm+wByfQAAAAASUVORK5CYII=') no-repeat;\n\twidth: 21px;\n\theight: 21px;\n\tbackground-position: 0 -3272px;\n}\n\n.font-graph-geSprite-guides {\n\tbackground: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAABeQCAMAAAByzXKPAAAA1VBMVEUAAAAzMzIzMzIzMzE1NTUzMzIzMzIzMzEzMzIyMjIzMzIzMzIzMzIzMzE6OjoyMjIzMzIzMzIzMzEzMzI0NDA0NDIwMDAyMjEzMzIzMzEzMzE0NDAzMzMzMzIyMjIzMzI0NDE0NDQyMjIzMzIzMzIzMzIzMzM5OTkAAAC1tbX///9mZmYwMDAQEBAmJiZTiPJ7e3v/Z2RwcHAgICB+fn5hYWFzc3NAQECoqKiampqMjIxTU1NGRkY3NzcbGxsNDQ3w8PBQUFDg4ODAwMCwsLCgoKBPT09W+xp5AAAAKHRSTlMAh4DDEd187+mljnhvVge5nmhMQi4hA8uxk2IlHOOYc102M/jW088J/2liTQAACt5JREFUeNrs3O1um0AQheG5nIPCoIq1Q7+r/Mn9X1K9xtEAM9RLQmODzyO1cV+NtzjShhjHkRkAgn9DMCaYnRXIGOQdtWmk1zRWm0vNN6az+Y+v2fXZ5iTX/kZ4ZGvUNT6/RJuCM/VVRKFB7YBwtnY1k3h2wboaHy8RFQC2VGuc1D730WWLS2GIZ27aM4yUT+9tXaLNw9m0mI9uokepRLeC+ZyCfFCoqwckqV3WBHFZaxHLFrNxVpgUVRWjg/jli2WbfH4WyxYnWcVV0Rz7FYj26X9ezQcuE3VYkXzFSYpm9eq6pqSiuNYAaj+r0GiFxKv5tEOqxVfV0utrCkZF/HCXTuOdGz2IHKbDR5wdJ6PdeRmIsfviED0C5ZV7ojf487v59fPHsT18//a1Yn1HJdoSjIUXBG5XgaBejhMYVmT9B1dRUONj4KtyRHNmNkULDYeD2CGVjiZ0paOK1jVuYKIpjJTO7m9dovvEn3bz/DH4440f2+d9fvlVh+4LLuK6cM8GVcKKkmq3ZqqBfbhaef4n+pijBudNZH3H+OW3No+rbTmVXjfciPbs/GVQ7QU6tWqUW5lonefHfn5f6xI9DAxdqQU3n55uU821mj2ZuUq0SYo2ivA5tThxk3rK6u+urYtZiqKuGiWMEkbp4/OFLITIvyrfekt35WGvjvP6OlERwP6+VU39z+ansp+0SThP8jk+0SeoAehRjObmdha0f2YwfucMss7uaPVF3rThN/EH6fH3YhEt3bD1zMlwGtu8/8a5zrHJuR6NyrkKMK5N5qqf9ev6Y4hfGfSPrc7ZWZqPQrQPa+x5Cfe8FO55m3Xrcs8T3TFUYQ0zqj5jTPoMmagQz4brFh8D3x5L9OngyRy+IEa0JgBRlaBWAIJYyVYjYDF47PwNV/TwAIRfB+BiFcyeolchija6+P7xd//IveI+JlpwnrdZP7xexdD6/4N/PDzP06NZdc8vP4H7WKFXLbqjQcU9T7QZvFhHdN/+sndmy6lCQRQ9KOA8Ro1TxjttYuUlX5BK5f+/6YJIWjlNFREkpLJXGQuWO01e2mPaU4pA17qH7iEeKfRsrrqh4/t0hJQPEJSokULPFpJse0Iu0PNQNVSNnOu8ZHPWZc8TUhkBgECRikZMrp4Xq9W1NPubkIIUm4hnrtyikSIjq+jck3bOBQkpnSBrkU97ALl73pJqXfFc5AlJqN3cXvoTEKIzJcu5PSEFqHiGp6ahz+33Z3rWtpzhEfK16DO8XXi3S2vIvfUCHnpWrcsZHiHVAFUG0KQJoEgjGjGRFG1l9bq25gyPkIoANBcEab9DEPf27iCk40VbWa0uP86WkMsTQHPQHBSnJJHCytp1dW9Uz2cBQoo0PEqVes/r2bM0131CLtLzUCVUidw9n6uuaPY8IdnUYMet2BTccUtIfShnz60mBe65JaTunL/tVqTAbbeE1ImCc3vl16McIEiWc3tCClD5DM9Ak7ZFZCBkZEVzhkfI5/n6Hbdp+wF33BJSH8rZc6vISB/gnltCas/Z225FStdz2y0hZXE19lrt5p177NyR11+OHb/THhzJP86wP2uYrjvz1h92eTseNEzDbB2nd/OY1Py9WNw6/qjnN+fmvnmwnYkxjf1t+mAW7XlsbzaJ3a7DzH1sf3Udp7m/dcOf615sW26SdfvGrCaxbV4l9nEan0X0xqEaRrbvmnlrGFu3PTN3ndUoLOuapW8ODLzudLVomMHA71z/MwmT9mTmN+bOZnS9NcJDs+V53t+WPzQnbNa9/nRoCPl2AKqObKFvltEBoPvcVwNwmavxOy3IDwFAlkWCWPBqhJDC8GtsCPlGYI8ciQyRI+3/CLHHscysXvf0ynzWIOQsPr3wWllkxNQskD+b82/Ihi8qCCm150XpObXnc2RFs+cJqRhAE5AHpI8BOZbH5TQdlXB8JAUEIC4AvkFPSMEl/dQ+v74+2/bl6enFtm/v72+W/c/eHSW3CUNRGNZyjgiZNHE6fW2b6f63VGScCHSvI7CxjfH/tYnTU43CywFiAfnT/On+lunH3274R5G2zbv03rTj9F+z92+U7pqPX52PZjdM35uf6vxs3ofp799Kulf2B8CEc2JVjvJm6OIT5CO9PekvD/8T767XgTc2z1umnEdggyT5eX2s+k9yGpvH1kqvI523IVfSAzdlW2gbu3zn5+6j/JFcfIft0lBOi4/J6cbmBTZJTdPo9fV1/3pamqTUFCalOVkunVdNTU5bSa2Nn7ULjl0A7o5/aGt6Z6TKUpVC7/VLSrWzqTo7b+yzO+9i28shHtugl5cXXS9NLnyYHVZ+Nz79UG7y4in7Aqza9po+tBsXP1B8wCW3m01yVqq9G3w3q/X+/1lpZ5WEbKdOTnNsxiYtd+ngjl28Fw+zhwGwLA0/mDeIS46AxWnO2MVnUFD627+sasuAxyJpTsp3A+6WgnplGpILpL1JR21lZt5k2ZSrFPE41AteEy+Q9qrn58qW77lNM877sXXq+fcGLp/2giETZO5tTYumHObxKDQ0aezhxb2feNE0MWlvqZS1SzwsJZdslu3x9fYae8HFXYeAKcIVejxwzgwc0YE6jTzuWOAuqOS+GTY3rc+rmDxAKn7VEPAt+amm/7Yu8ev0gfnkHckljT8nSoaf/RkeNgUejaKburGiYt696FNIcXrt/3yJh8Qba+advg0BwJCk66Qamp3WvxtX1gMzSDZya+BU8y2OR+ogyk7w5h+Nox+/6S04pNunwKqpt9Db9yemA2GokjqThGR+ms1JeYMe92hu5y2Zbs5O5be7mkru2Hlpgc5j434M1NPiq0qqgXoaDkwqTU21V0s7dgY/TfLX9XMT1udx56RJqTqf5aqlR3vVqtOWaYpbp4NtW2tmPaXbwAZI0U1zroI/tiRW9oBVOtL5QT6uu2TH0nlgnXRSqsLkGXg+JnBTCjopVeGceXk2FnAtColkUynGMn1SrHXejq3Py4U5wHXZvtluJtXO27H+vFyMB9xElFIxNQ6fUmFj9Xm6Sr67SrA6b94Gfp4HLsb2rSM53VSMpseK1c7bsXbechs4zgO3EiUvs6kK7tgsUmlglaLkZiZVStzOBzoPrJHOS1VgVR5YuTPXz1VgXR5YM/+u9xglkyZRT2WqghlbnVc8CA+4mtxRp5vB7XxW7bw3LwvywI0pr5MN6HNNrUi/fUZO4o6tzxuiuO0GuLzUUdu3GOV3M6raeTu2Nm8aR+eBlVD1BnoVjowt0HBgnY51PrqdT/9yxtJ5YHWkeGKswoxJuMcGuIYoKdowKOQ4Xxov+4Zb/khU8Mf681a3gZ/0gYt1PjGdV1J2/mBS5z/58zrbQOeBE6zpGZgA7smRzgc6D2xKlORlCiUVKrfSslMAVulI56PX+XHv81g6D6yPFM+MVWCJDliLJdfoMhVYowPWYsk1ukwF1uiAu1R/Hh5v2wNb8r+9O0pBGAaiKLqdm/1vUCiFSCdhTIjWhntAwefY5sMxRW1ToJnZ89KjQTnuGzGUWB1DLkJtul0ofocn3SOf5wMu3mu97q30GN2e99he2gKEpj6Dkvwjj4tebb5d8EBAuhuUJJ87f96f4aT/1OlNz7GRfgg+WheCUFsfE16cpEFNx5exIUmHx09zd34AaRdACCDp+TVLSlFv1blzgKR2egx5zx/see0pn+djbR4FIVofz4/UeV67G3+vr3niC+H04Oz/nbwA7lqtm+wByfQAAAAASUVORK5CYII=') no-repeat;\n\twidth: 21px;\n\theight: 21px;\n\tbackground-position: 0 -3324px;\n}\n\n.font-graph-geSprite-alignleft {\n\tbackground: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAABeQCAMAAAByzXKPAAAA1VBMVEUAAAAzMzIzMzIzMzE1NTUzMzIzMzIzMzEzMzIyMjIzMzIzMzIzMzIzMzE6OjoyMjIzMzIzMzIzMzEzMzI0NDA0NDIwMDAyMjEzMzIzMzEzMzE0NDAzMzMzMzIyMjIzMzI0NDE0NDQyMjIzMzIzMzIzMzIzMzM5OTkAAAC1tbX///9mZmYwMDAQEBAmJiZTiPJ7e3v/Z2RwcHAgICB+fn5hYWFzc3NAQECoqKiampqMjIxTU1NGRkY3NzcbGxsNDQ3w8PBQUFDg4ODAwMCwsLCgoKBPT09W+xp5AAAAKHRSTlMAh4DDEd187+mljnhvVge5nmhMQi4hA8uxk2IlHOOYc102M/jW088J/2liTQAACt5JREFUeNrs3O1um0AQheG5nIPCoIq1Q7+r/Mn9X1K9xtEAM9RLQmODzyO1cV+NtzjShhjHkRkAgn9DMCaYnRXIGOQdtWmk1zRWm0vNN6az+Y+v2fXZ5iTX/kZ4ZGvUNT6/RJuCM/VVRKFB7YBwtnY1k3h2wboaHy8RFQC2VGuc1D730WWLS2GIZ27aM4yUT+9tXaLNw9m0mI9uokepRLeC+ZyCfFCoqwckqV3WBHFZaxHLFrNxVpgUVRWjg/jli2WbfH4WyxYnWcVV0Rz7FYj26X9ezQcuE3VYkXzFSYpm9eq6pqSiuNYAaj+r0GiFxKv5tEOqxVfV0utrCkZF/HCXTuOdGz2IHKbDR5wdJ6PdeRmIsfviED0C5ZV7ojf487v59fPHsT18//a1Yn1HJdoSjIUXBG5XgaBejhMYVmT9B1dRUONj4KtyRHNmNkULDYeD2CGVjiZ0paOK1jVuYKIpjJTO7m9dovvEn3bz/DH4440f2+d9fvlVh+4LLuK6cM8GVcKKkmq3ZqqBfbhaef4n+pijBudNZH3H+OW3No+rbTmVXjfciPbs/GVQ7QU6tWqUW5lonefHfn5f6xI9DAxdqQU3n55uU821mj2ZuUq0SYo2ivA5tThxk3rK6u+urYtZiqKuGiWMEkbp4/OFLITIvyrfekt35WGvjvP6OlERwP6+VU39z+ansp+0SThP8jk+0SeoAehRjObmdha0f2YwfucMss7uaPVF3rThN/EH6fH3YhEt3bD1zMlwGtu8/8a5zrHJuR6NyrkKMK5N5qqf9ev6Y4hfGfSPrc7ZWZqPQrQPa+x5Cfe8FO55m3Xrcs8T3TFUYQ0zqj5jTPoMmagQz4brFh8D3x5L9OngyRy+IEa0JgBRlaBWAIJYyVYjYDF47PwNV/TwAIRfB+BiFcyeolchija6+P7xd//IveI+JlpwnrdZP7xexdD6/4N/PDzP06NZdc8vP4H7WKFXLbqjQcU9T7QZvFhHdN/+sndmy6lCQRQ9KOA8Ro1TxjttYuUlX5BK5f+/6YJIWjlNFREkpLJXGQuWO01e2mPaU4pA17qH7iEeKfRsrrqh4/t0hJQPEJSokULPFpJse0Iu0PNQNVSNnOu8ZHPWZc8TUhkBgECRikZMrp4Xq9W1NPubkIIUm4hnrtyikSIjq+jck3bOBQkpnSBrkU97ALl73pJqXfFc5AlJqN3cXvoTEKIzJcu5PSEFqHiGp6ahz+33Z3rWtpzhEfK16DO8XXi3S2vIvfUCHnpWrcsZHiHVAFUG0KQJoEgjGjGRFG1l9bq25gyPkIoANBcEab9DEPf27iCk40VbWa0uP86WkMsTQHPQHBSnJJHCytp1dW9Uz2cBQoo0PEqVes/r2bM0131CLtLzUCVUidw9n6uuaPY8IdnUYMet2BTccUtIfShnz60mBe65JaTunL/tVqTAbbeE1ImCc3vl16McIEiWc3tCClD5DM9Ak7ZFZCBkZEVzhkfI5/n6Hbdp+wF33BJSH8rZc6vISB/gnltCas/Z225FStdz2y0hZXE19lrt5p177NyR11+OHb/THhzJP86wP2uYrjvz1h92eTseNEzDbB2nd/OY1Py9WNw6/qjnN+fmvnmwnYkxjf1t+mAW7XlsbzaJ3a7DzH1sf3Udp7m/dcOf615sW26SdfvGrCaxbV4l9nEan0X0xqEaRrbvmnlrGFu3PTN3ndUoLOuapW8ODLzudLVomMHA71z/MwmT9mTmN+bOZnS9NcJDs+V53t+WPzQnbNa9/nRoCPl2AKqObKFvltEBoPvcVwNwmavxOy3IDwFAlkWCWPBqhJDC8GtsCPlGYI8ciQyRI+3/CLHHscysXvf0ynzWIOQsPr3wWllkxNQskD+b82/Ihi8qCCm150XpObXnc2RFs+cJqRhAE5AHpI8BOZbH5TQdlXB8JAUEIC4AvkFPSMEl/dQ+v74+2/bl6enFtm/v72+W/c/eHSW3CUNRGNZyjgiZNHE6fW2b6f63VGScCHSvI7CxjfH/tYnTU43CywFiAfnT/On+lunH3274R5G2zbv03rTj9F+z92+U7pqPX52PZjdM35uf6vxs3ofp799Kulf2B8CEc2JVjvJm6OIT5CO9PekvD/8T767XgTc2z1umnEdggyT5eX2s+k9yGpvH1kqvI523IVfSAzdlW2gbu3zn5+6j/JFcfIft0lBOi4/J6cbmBTZJTdPo9fV1/3pamqTUFCalOVkunVdNTU5bSa2Nn7ULjl0A7o5/aGt6Z6TKUpVC7/VLSrWzqTo7b+yzO+9i28shHtugl5cXXS9NLnyYHVZ+Nz79UG7y4in7Aqza9po+tBsXP1B8wCW3m01yVqq9G3w3q/X+/1lpZ5WEbKdOTnNsxiYtd+ngjl28Fw+zhwGwLA0/mDeIS46AxWnO2MVnUFD627+sasuAxyJpTsp3A+6WgnplGpILpL1JR21lZt5k2ZSrFPE41AteEy+Q9qrn58qW77lNM877sXXq+fcGLp/2giETZO5tTYumHObxKDQ0aezhxb2feNE0MWlvqZS1SzwsJZdslu3x9fYae8HFXYeAKcIVejxwzgwc0YE6jTzuWOAuqOS+GTY3rc+rmDxAKn7VEPAt+amm/7Yu8ev0gfnkHckljT8nSoaf/RkeNgUejaKburGiYt696FNIcXrt/3yJh8Qba+advg0BwJCk66Qamp3WvxtX1gMzSDZya+BU8y2OR+ogyk7w5h+Nox+/6S04pNunwKqpt9Db9yemA2GokjqThGR+ms1JeYMe92hu5y2Zbs5O5be7mkru2Hlpgc5j434M1NPiq0qqgXoaDkwqTU21V0s7dgY/TfLX9XMT1udx56RJqTqf5aqlR3vVqtOWaYpbp4NtW2tmPaXbwAZI0U1zroI/tiRW9oBVOtL5QT6uu2TH0nlgnXRSqsLkGXg+JnBTCjopVeGceXk2FnAtColkUynGMn1SrHXejq3Py4U5wHXZvtluJtXO27H+vFyMB9xElFIxNQ6fUmFj9Xm6Sr67SrA6b94Gfp4HLsb2rSM53VSMpseK1c7bsXbechs4zgO3EiUvs6kK7tgsUmlglaLkZiZVStzOBzoPrJHOS1VgVR5YuTPXz1VgXR5YM/+u9xglkyZRT2WqghlbnVc8CA+4mtxRp5vB7XxW7bw3LwvywI0pr5MN6HNNrUi/fUZO4o6tzxuiuO0GuLzUUdu3GOV3M6raeTu2Nm8aR+eBlVD1BnoVjowt0HBgnY51PrqdT/9yxtJ5YHWkeGKswoxJuMcGuIYoKdowKOQ4Xxov+4Zb/khU8Mf681a3gZ/0gYt1PjGdV1J2/mBS5z/58zrbQOeBE6zpGZgA7smRzgc6D2xKlORlCiUVKrfSslMAVulI56PX+XHv81g6D6yPFM+MVWCJDliLJdfoMhVYowPWYsk1ukwF1uiAu1R/Hh5v2wNb8r+9O0pBGAaiKLqdm/1vUCiFSCdhTIjWhntAwefY5sMxRW1ToJnZ89KjQTnuGzGUWB1DLkJtul0ofocn3SOf5wMu3mu97q30GN2e99he2gKEpj6Dkvwjj4tebb5d8EBAuhuUJJ87f96f4aT/1OlNz7GRfgg+WheCUFsfE16cpEFNx5exIUmHx09zd34AaRdACCDp+TVLSlFv1blzgKR2egx5zx/see0pn+djbR4FIVofz4/UeV67G3+vr3niC+H04Oz/nbwA7lqtm+wByfQAAAAASUVORK5CYII=') no-repeat;\n\twidth: 21px;\n\theight: 21px;\n\tbackground-position: 0 -3416px;\n}\n\n.font-graph-geSprite-alignright {\n\tbackground: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAABeQCAMAAAByzXKPAAAA1VBMVEUAAAAzMzIzMzIzMzE1NTUzMzIzMzIzMzEzMzIyMjIzMzIzMzIzMzIzMzE6OjoyMjIzMzIzMzIzMzEzMzI0NDA0NDIwMDAyMjEzMzIzMzEzMzE0NDAzMzMzMzIyMjIzMzI0NDE0NDQyMjIzMzIzMzIzMzIzMzM5OTkAAAC1tbX///9mZmYwMDAQEBAmJiZTiPJ7e3v/Z2RwcHAgICB+fn5hYWFzc3NAQECoqKiampqMjIxTU1NGRkY3NzcbGxsNDQ3w8PBQUFDg4ODAwMCwsLCgoKBPT09W+xp5AAAAKHRSTlMAh4DDEd187+mljnhvVge5nmhMQi4hA8uxk2IlHOOYc102M/jW088J/2liTQAACt5JREFUeNrs3O1um0AQheG5nIPCoIq1Q7+r/Mn9X1K9xtEAM9RLQmODzyO1cV+NtzjShhjHkRkAgn9DMCaYnRXIGOQdtWmk1zRWm0vNN6az+Y+v2fXZ5iTX/kZ4ZGvUNT6/RJuCM/VVRKFB7YBwtnY1k3h2wboaHy8RFQC2VGuc1D730WWLS2GIZ27aM4yUT+9tXaLNw9m0mI9uokepRLeC+ZyCfFCoqwckqV3WBHFZaxHLFrNxVpgUVRWjg/jli2WbfH4WyxYnWcVV0Rz7FYj26X9ezQcuE3VYkXzFSYpm9eq6pqSiuNYAaj+r0GiFxKv5tEOqxVfV0utrCkZF/HCXTuOdGz2IHKbDR5wdJ6PdeRmIsfviED0C5ZV7ojf487v59fPHsT18//a1Yn1HJdoSjIUXBG5XgaBejhMYVmT9B1dRUONj4KtyRHNmNkULDYeD2CGVjiZ0paOK1jVuYKIpjJTO7m9dovvEn3bz/DH4440f2+d9fvlVh+4LLuK6cM8GVcKKkmq3ZqqBfbhaef4n+pijBudNZH3H+OW3No+rbTmVXjfciPbs/GVQ7QU6tWqUW5lonefHfn5f6xI9DAxdqQU3n55uU821mj2ZuUq0SYo2ivA5tThxk3rK6u+urYtZiqKuGiWMEkbp4/OFLITIvyrfekt35WGvjvP6OlERwP6+VU39z+ansp+0SThP8jk+0SeoAehRjObmdha0f2YwfucMss7uaPVF3rThN/EH6fH3YhEt3bD1zMlwGtu8/8a5zrHJuR6NyrkKMK5N5qqf9ev6Y4hfGfSPrc7ZWZqPQrQPa+x5Cfe8FO55m3Xrcs8T3TFUYQ0zqj5jTPoMmagQz4brFh8D3x5L9OngyRy+IEa0JgBRlaBWAIJYyVYjYDF47PwNV/TwAIRfB+BiFcyeolchija6+P7xd//IveI+JlpwnrdZP7xexdD6/4N/PDzP06NZdc8vP4H7WKFXLbqjQcU9T7QZvFhHdN/+sndmy6lCQRQ9KOA8Ro1TxjttYuUlX5BK5f+/6YJIWjlNFREkpLJXGQuWO01e2mPaU4pA17qH7iEeKfRsrrqh4/t0hJQPEJSokULPFpJse0Iu0PNQNVSNnOu8ZHPWZc8TUhkBgECRikZMrp4Xq9W1NPubkIIUm4hnrtyikSIjq+jck3bOBQkpnSBrkU97ALl73pJqXfFc5AlJqN3cXvoTEKIzJcu5PSEFqHiGp6ahz+33Z3rWtpzhEfK16DO8XXi3S2vIvfUCHnpWrcsZHiHVAFUG0KQJoEgjGjGRFG1l9bq25gyPkIoANBcEab9DEPf27iCk40VbWa0uP86WkMsTQHPQHBSnJJHCytp1dW9Uz2cBQoo0PEqVes/r2bM0131CLtLzUCVUidw9n6uuaPY8IdnUYMet2BTccUtIfShnz60mBe65JaTunL/tVqTAbbeE1ImCc3vl16McIEiWc3tCClD5DM9Ak7ZFZCBkZEVzhkfI5/n6Hbdp+wF33BJSH8rZc6vISB/gnltCas/Z225FStdz2y0hZXE19lrt5p177NyR11+OHb/THhzJP86wP2uYrjvz1h92eTseNEzDbB2nd/OY1Py9WNw6/qjnN+fmvnmwnYkxjf1t+mAW7XlsbzaJ3a7DzH1sf3Udp7m/dcOf615sW26SdfvGrCaxbV4l9nEan0X0xqEaRrbvmnlrGFu3PTN3ndUoLOuapW8ODLzudLVomMHA71z/MwmT9mTmN+bOZnS9NcJDs+V53t+WPzQnbNa9/nRoCPl2AKqObKFvltEBoPvcVwNwmavxOy3IDwFAlkWCWPBqhJDC8GtsCPlGYI8ciQyRI+3/CLHHscysXvf0ynzWIOQsPr3wWllkxNQskD+b82/Ihi8qCCm150XpObXnc2RFs+cJqRhAE5AHpI8BOZbH5TQdlXB8JAUEIC4AvkFPSMEl/dQ+v74+2/bl6enFtm/v72+W/c/eHSW3CUNRGNZyjgiZNHE6fW2b6f63VGScCHSvI7CxjfH/tYnTU43CywFiAfnT/On+lunH3274R5G2zbv03rTj9F+z92+U7pqPX52PZjdM35uf6vxs3ofp799Kulf2B8CEc2JVjvJm6OIT5CO9PekvD/8T767XgTc2z1umnEdggyT5eX2s+k9yGpvH1kqvI523IVfSAzdlW2gbu3zn5+6j/JFcfIft0lBOi4/J6cbmBTZJTdPo9fV1/3pamqTUFCalOVkunVdNTU5bSa2Nn7ULjl0A7o5/aGt6Z6TKUpVC7/VLSrWzqTo7b+yzO+9i28shHtugl5cXXS9NLnyYHVZ+Nz79UG7y4in7Aqza9po+tBsXP1B8wCW3m01yVqq9G3w3q/X+/1lpZ5WEbKdOTnNsxiYtd+ngjl28Fw+zhwGwLA0/mDeIS46AxWnO2MVnUFD627+sasuAxyJpTsp3A+6WgnplGpILpL1JR21lZt5k2ZSrFPE41AteEy+Q9qrn58qW77lNM877sXXq+fcGLp/2giETZO5tTYumHObxKDQ0aezhxb2feNE0MWlvqZS1SzwsJZdslu3x9fYae8HFXYeAKcIVejxwzgwc0YE6jTzuWOAuqOS+GTY3rc+rmDxAKn7VEPAt+amm/7Yu8ev0gfnkHckljT8nSoaf/RkeNgUejaKburGiYt696FNIcXrt/3yJh8Qba+advg0BwJCk66Qamp3WvxtX1gMzSDZya+BU8y2OR+ogyk7w5h+Nox+/6S04pNunwKqpt9Db9yemA2GokjqThGR+ms1JeYMe92hu5y2Zbs5O5be7mkru2Hlpgc5j434M1NPiq0qqgXoaDkwqTU21V0s7dgY/TfLX9XMT1udx56RJqTqf5aqlR3vVqtOWaYpbp4NtW2tmPaXbwAZI0U1zroI/tiRW9oBVOtL5QT6uu2TH0nlgnXRSqsLkGXg+JnBTCjopVeGceXk2FnAtColkUynGMn1SrHXejq3Py4U5wHXZvtluJtXO27H+vFyMB9xElFIxNQ6fUmFj9Xm6Sr67SrA6b94Gfp4HLsb2rSM53VSMpseK1c7bsXbechs4zgO3EiUvs6kK7tgsUmlglaLkZiZVStzOBzoPrJHOS1VgVR5YuTPXz1VgXR5YM/+u9xglkyZRT2WqghlbnVc8CA+4mtxRp5vB7XxW7bw3LwvywI0pr5MN6HNNrUi/fUZO4o6tzxuiuO0GuLzUUdu3GOV3M6raeTu2Nm8aR+eBlVD1BnoVjowt0HBgnY51PrqdT/9yxtJ5YHWkeGKswoxJuMcGuIYoKdowKOQ4Xxov+4Zb/khU8Mf681a3gZ/0gYt1PjGdV1J2/mBS5z/58zrbQOeBE6zpGZgA7smRzgc6D2xKlORlCiUVKrfSslMAVulI56PX+XHv81g6D6yPFM+MVWCJDliLJdfoMhVYowPWYsk1ukwF1uiAu1R/Hh5v2wNb8r+9O0pBGAaiKLqdm/1vUCiFSCdhTIjWhntAwefY5sMxRW1ToJnZ89KjQTnuGzGUWB1DLkJtul0ofocn3SOf5wMu3mu97q30GN2e99he2gKEpj6Dkvwjj4tebb5d8EBAuhuUJJ87f96f4aT/1OlNz7GRfgg+WheCUFsfE16cpEFNx5exIUmHx09zd34AaRdACCDp+TVLSlFv1blzgKR2egx5zx/see0pn+djbR4FIVofz4/UeV67G3+vr3niC+H04Oz/nbwA7lqtm+wByfQAAAAASUVORK5CYII=') no-repeat;\n\twidth: 21px;\n\theight: 21px;\n\tbackground-position: 0 -3462px;\n}\n\n.font-graph-geSprite-aligncenter {\n\tbackground: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAABeQCAMAAAByzXKPAAAA1VBMVEUAAAAzMzIzMzIzMzE1NTUzMzIzMzIzMzEzMzIyMjIzMzIzMzIzMzIzMzE6OjoyMjIzMzIzMzIzMzEzMzI0NDA0NDIwMDAyMjEzMzIzMzEzMzE0NDAzMzMzMzIyMjIzMzI0NDE0NDQyMjIzMzIzMzIzMzIzMzM5OTkAAAC1tbX///9mZmYwMDAQEBAmJiZTiPJ7e3v/Z2RwcHAgICB+fn5hYWFzc3NAQECoqKiampqMjIxTU1NGRkY3NzcbGxsNDQ3w8PBQUFDg4ODAwMCwsLCgoKBPT09W+xp5AAAAKHRSTlMAh4DDEd187+mljnhvVge5nmhMQi4hA8uxk2IlHOOYc102M/jW088J/2liTQAACt5JREFUeNrs3O1um0AQheG5nIPCoIq1Q7+r/Mn9X1K9xtEAM9RLQmODzyO1cV+NtzjShhjHkRkAgn9DMCaYnRXIGOQdtWmk1zRWm0vNN6az+Y+v2fXZ5iTX/kZ4ZGvUNT6/RJuCM/VVRKFB7YBwtnY1k3h2wboaHy8RFQC2VGuc1D730WWLS2GIZ27aM4yUT+9tXaLNw9m0mI9uokepRLeC+ZyCfFCoqwckqV3WBHFZaxHLFrNxVpgUVRWjg/jli2WbfH4WyxYnWcVV0Rz7FYj26X9ezQcuE3VYkXzFSYpm9eq6pqSiuNYAaj+r0GiFxKv5tEOqxVfV0utrCkZF/HCXTuOdGz2IHKbDR5wdJ6PdeRmIsfviED0C5ZV7ojf487v59fPHsT18//a1Yn1HJdoSjIUXBG5XgaBejhMYVmT9B1dRUONj4KtyRHNmNkULDYeD2CGVjiZ0paOK1jVuYKIpjJTO7m9dovvEn3bz/DH4440f2+d9fvlVh+4LLuK6cM8GVcKKkmq3ZqqBfbhaef4n+pijBudNZH3H+OW3No+rbTmVXjfciPbs/GVQ7QU6tWqUW5lonefHfn5f6xI9DAxdqQU3n55uU821mj2ZuUq0SYo2ivA5tThxk3rK6u+urYtZiqKuGiWMEkbp4/OFLITIvyrfekt35WGvjvP6OlERwP6+VU39z+ansp+0SThP8jk+0SeoAehRjObmdha0f2YwfucMss7uaPVF3rThN/EH6fH3YhEt3bD1zMlwGtu8/8a5zrHJuR6NyrkKMK5N5qqf9ev6Y4hfGfSPrc7ZWZqPQrQPa+x5Cfe8FO55m3Xrcs8T3TFUYQ0zqj5jTPoMmagQz4brFh8D3x5L9OngyRy+IEa0JgBRlaBWAIJYyVYjYDF47PwNV/TwAIRfB+BiFcyeolchija6+P7xd//IveI+JlpwnrdZP7xexdD6/4N/PDzP06NZdc8vP4H7WKFXLbqjQcU9T7QZvFhHdN/+sndmy6lCQRQ9KOA8Ro1TxjttYuUlX5BK5f+/6YJIWjlNFREkpLJXGQuWO01e2mPaU4pA17qH7iEeKfRsrrqh4/t0hJQPEJSokULPFpJse0Iu0PNQNVSNnOu8ZHPWZc8TUhkBgECRikZMrp4Xq9W1NPubkIIUm4hnrtyikSIjq+jck3bOBQkpnSBrkU97ALl73pJqXfFc5AlJqN3cXvoTEKIzJcu5PSEFqHiGp6ahz+33Z3rWtpzhEfK16DO8XXi3S2vIvfUCHnpWrcsZHiHVAFUG0KQJoEgjGjGRFG1l9bq25gyPkIoANBcEab9DEPf27iCk40VbWa0uP86WkMsTQHPQHBSnJJHCytp1dW9Uz2cBQoo0PEqVes/r2bM0131CLtLzUCVUidw9n6uuaPY8IdnUYMet2BTccUtIfShnz60mBe65JaTunL/tVqTAbbeE1ImCc3vl16McIEiWc3tCClD5DM9Ak7ZFZCBkZEVzhkfI5/n6Hbdp+wF33BJSH8rZc6vISB/gnltCas/Z225FStdz2y0hZXE19lrt5p177NyR11+OHb/THhzJP86wP2uYrjvz1h92eTseNEzDbB2nd/OY1Py9WNw6/qjnN+fmvnmwnYkxjf1t+mAW7XlsbzaJ3a7DzH1sf3Udp7m/dcOf615sW26SdfvGrCaxbV4l9nEan0X0xqEaRrbvmnlrGFu3PTN3ndUoLOuapW8ODLzudLVomMHA71z/MwmT9mTmN+bOZnS9NcJDs+V53t+WPzQnbNa9/nRoCPl2AKqObKFvltEBoPvcVwNwmavxOy3IDwFAlkWCWPBqhJDC8GtsCPlGYI8ciQyRI+3/CLHHscysXvf0ynzWIOQsPr3wWllkxNQskD+b82/Ihi8qCCm150XpObXnc2RFs+cJqRhAE5AHpI8BOZbH5TQdlXB8JAUEIC4AvkFPSMEl/dQ+v74+2/bl6enFtm/v72+W/c/eHSW3CUNRGNZyjgiZNHE6fW2b6f63VGScCHSvI7CxjfH/tYnTU43CywFiAfnT/On+lunH3274R5G2zbv03rTj9F+z92+U7pqPX52PZjdM35uf6vxs3ofp799Kulf2B8CEc2JVjvJm6OIT5CO9PekvD/8T767XgTc2z1umnEdggyT5eX2s+k9yGpvH1kqvI523IVfSAzdlW2gbu3zn5+6j/JFcfIft0lBOi4/J6cbmBTZJTdPo9fV1/3pamqTUFCalOVkunVdNTU5bSa2Nn7ULjl0A7o5/aGt6Z6TKUpVC7/VLSrWzqTo7b+yzO+9i28shHtugl5cXXS9NLnyYHVZ+Nz79UG7y4in7Aqza9po+tBsXP1B8wCW3m01yVqq9G3w3q/X+/1lpZ5WEbKdOTnNsxiYtd+ngjl28Fw+zhwGwLA0/mDeIS46AxWnO2MVnUFD627+sasuAxyJpTsp3A+6WgnplGpILpL1JR21lZt5k2ZSrFPE41AteEy+Q9qrn58qW77lNM877sXXq+fcGLp/2giETZO5tTYumHObxKDQ0aezhxb2feNE0MWlvqZS1SzwsJZdslu3x9fYae8HFXYeAKcIVejxwzgwc0YE6jTzuWOAuqOS+GTY3rc+rmDxAKn7VEPAt+amm/7Yu8ev0gfnkHckljT8nSoaf/RkeNgUejaKburGiYt696FNIcXrt/3yJh8Qba+advg0BwJCk66Qamp3WvxtX1gMzSDZya+BU8y2OR+ogyk7w5h+Nox+/6S04pNunwKqpt9Db9yemA2GokjqThGR+ms1JeYMe92hu5y2Zbs5O5be7mkru2Hlpgc5j434M1NPiq0qqgXoaDkwqTU21V0s7dgY/TfLX9XMT1udx56RJqTqf5aqlR3vVqtOWaYpbp4NtW2tmPaXbwAZI0U1zroI/tiRW9oBVOtL5QT6uu2TH0nlgnXRSqsLkGXg+JnBTCjopVeGceXk2FnAtColkUynGMn1SrHXejq3Py4U5wHXZvtluJtXO27H+vFyMB9xElFIxNQ6fUmFj9Xm6Sr67SrA6b94Gfp4HLsb2rSM53VSMpseK1c7bsXbechs4zgO3EiUvs6kK7tgsUmlglaLkZiZVStzOBzoPrJHOS1VgVR5YuTPXz1VgXR5YM/+u9xglkyZRT2WqghlbnVc8CA+4mtxRp5vB7XxW7bw3LwvywI0pr5MN6HNNrUi/fUZO4o6tzxuiuO0GuLzUUdu3GOV3M6raeTu2Nm8aR+eBlVD1BnoVjowt0HBgnY51PrqdT/9yxtJ5YHWkeGKswoxJuMcGuIYoKdowKOQ4Xxov+4Zb/khU8Mf681a3gZ/0gYt1PjGdV1J2/mBS5z/58zrbQOeBE6zpGZgA7smRzgc6D2xKlORlCiUVKrfSslMAVulI56PX+XHv81g6D6yPFM+MVWCJDliLJdfoMhVYowPWYsk1ukwF1uiAu1R/Hh5v2wNb8r+9O0pBGAaiKLqdm/1vUCiFSCdhTIjWhntAwefY5sMxRW1ToJnZ89KjQTnuGzGUWB1DLkJtul0ofocn3SOf5wMu3mu97q30GN2e99he2gKEpj6Dkvwjj4tebb5d8EBAuhuUJJ87f96f4aT/1OlNz7GRfgg+WheCUFsfE16cpEFNx5exIUmHx09zd34AaRdACCDp+TVLSlFv1blzgKR2egx5zx/see0pn+djbR4FIVofz4/UeV67G3+vr3niC+H04Oz/nbwA7lqtm+wByfQAAAAASUVORK5CYII=') no-repeat;\n\twidth: 21px;\n\theight: 21px;\n\tbackground-position: 0 -3508px;\n}\n.font-graph-geSprite-aligntop {\n\tbackground: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAABeQCAMAAAByzXKPAAAA1VBMVEUAAAAzMzIzMzIzMzE1NTUzMzIzMzIzMzEzMzIyMjIzMzIzMzIzMzIzMzE6OjoyMjIzMzIzMzIzMzEzMzI0NDA0NDIwMDAyMjEzMzIzMzEzMzE0NDAzMzMzMzIyMjIzMzI0NDE0NDQyMjIzMzIzMzIzMzIzMzM5OTkAAAC1tbX///9mZmYwMDAQEBAmJiZTiPJ7e3v/Z2RwcHAgICB+fn5hYWFzc3NAQECoqKiampqMjIxTU1NGRkY3NzcbGxsNDQ3w8PBQUFDg4ODAwMCwsLCgoKBPT09W+xp5AAAAKHRSTlMAh4DDEd187+mljnhvVge5nmhMQi4hA8uxk2IlHOOYc102M/jW088J/2liTQAACt5JREFUeNrs3O1um0AQheG5nIPCoIq1Q7+r/Mn9X1K9xtEAM9RLQmODzyO1cV+NtzjShhjHkRkAgn9DMCaYnRXIGOQdtWmk1zRWm0vNN6az+Y+v2fXZ5iTX/kZ4ZGvUNT6/RJuCM/VVRKFB7YBwtnY1k3h2wboaHy8RFQC2VGuc1D730WWLS2GIZ27aM4yUT+9tXaLNw9m0mI9uokepRLeC+ZyCfFCoqwckqV3WBHFZaxHLFrNxVpgUVRWjg/jli2WbfH4WyxYnWcVV0Rz7FYj26X9ezQcuE3VYkXzFSYpm9eq6pqSiuNYAaj+r0GiFxKv5tEOqxVfV0utrCkZF/HCXTuOdGz2IHKbDR5wdJ6PdeRmIsfviED0C5ZV7ojf487v59fPHsT18//a1Yn1HJdoSjIUXBG5XgaBejhMYVmT9B1dRUONj4KtyRHNmNkULDYeD2CGVjiZ0paOK1jVuYKIpjJTO7m9dovvEn3bz/DH4440f2+d9fvlVh+4LLuK6cM8GVcKKkmq3ZqqBfbhaef4n+pijBudNZH3H+OW3No+rbTmVXjfciPbs/GVQ7QU6tWqUW5lonefHfn5f6xI9DAxdqQU3n55uU821mj2ZuUq0SYo2ivA5tThxk3rK6u+urYtZiqKuGiWMEkbp4/OFLITIvyrfekt35WGvjvP6OlERwP6+VU39z+ansp+0SThP8jk+0SeoAehRjObmdha0f2YwfucMss7uaPVF3rThN/EH6fH3YhEt3bD1zMlwGtu8/8a5zrHJuR6NyrkKMK5N5qqf9ev6Y4hfGfSPrc7ZWZqPQrQPa+x5Cfe8FO55m3Xrcs8T3TFUYQ0zqj5jTPoMmagQz4brFh8D3x5L9OngyRy+IEa0JgBRlaBWAIJYyVYjYDF47PwNV/TwAIRfB+BiFcyeolchija6+P7xd//IveI+JlpwnrdZP7xexdD6/4N/PDzP06NZdc8vP4H7WKFXLbqjQcU9T7QZvFhHdN/+sndmy6lCQRQ9KOA8Ro1TxjttYuUlX5BK5f+/6YJIWjlNFREkpLJXGQuWO01e2mPaU4pA17qH7iEeKfRsrrqh4/t0hJQPEJSokULPFpJse0Iu0PNQNVSNnOu8ZHPWZc8TUhkBgECRikZMrp4Xq9W1NPubkIIUm4hnrtyikSIjq+jck3bOBQkpnSBrkU97ALl73pJqXfFc5AlJqN3cXvoTEKIzJcu5PSEFqHiGp6ahz+33Z3rWtpzhEfK16DO8XXi3S2vIvfUCHnpWrcsZHiHVAFUG0KQJoEgjGjGRFG1l9bq25gyPkIoANBcEab9DEPf27iCk40VbWa0uP86WkMsTQHPQHBSnJJHCytp1dW9Uz2cBQoo0PEqVes/r2bM0131CLtLzUCVUidw9n6uuaPY8IdnUYMet2BTccUtIfShnz60mBe65JaTunL/tVqTAbbeE1ImCc3vl16McIEiWc3tCClD5DM9Ak7ZFZCBkZEVzhkfI5/n6Hbdp+wF33BJSH8rZc6vISB/gnltCas/Z225FStdz2y0hZXE19lrt5p177NyR11+OHb/THhzJP86wP2uYrjvz1h92eTseNEzDbB2nd/OY1Py9WNw6/qjnN+fmvnmwnYkxjf1t+mAW7XlsbzaJ3a7DzH1sf3Udp7m/dcOf615sW26SdfvGrCaxbV4l9nEan0X0xqEaRrbvmnlrGFu3PTN3ndUoLOuapW8ODLzudLVomMHA71z/MwmT9mTmN+bOZnS9NcJDs+V53t+WPzQnbNa9/nRoCPl2AKqObKFvltEBoPvcVwNwmavxOy3IDwFAlkWCWPBqhJDC8GtsCPlGYI8ciQyRI+3/CLHHscysXvf0ynzWIOQsPr3wWllkxNQskD+b82/Ihi8qCCm150XpObXnc2RFs+cJqRhAE5AHpI8BOZbH5TQdlXB8JAUEIC4AvkFPSMEl/dQ+v74+2/bl6enFtm/v72+W/c/eHSW3CUNRGNZyjgiZNHE6fW2b6f63VGScCHSvI7CxjfH/tYnTU43CywFiAfnT/On+lunH3274R5G2zbv03rTj9F+z92+U7pqPX52PZjdM35uf6vxs3ofp799Kulf2B8CEc2JVjvJm6OIT5CO9PekvD/8T767XgTc2z1umnEdggyT5eX2s+k9yGpvH1kqvI523IVfSAzdlW2gbu3zn5+6j/JFcfIft0lBOi4/J6cbmBTZJTdPo9fV1/3pamqTUFCalOVkunVdNTU5bSa2Nn7ULjl0A7o5/aGt6Z6TKUpVC7/VLSrWzqTo7b+yzO+9i28shHtugl5cXXS9NLnyYHVZ+Nz79UG7y4in7Aqza9po+tBsXP1B8wCW3m01yVqq9G3w3q/X+/1lpZ5WEbKdOTnNsxiYtd+ngjl28Fw+zhwGwLA0/mDeIS46AxWnO2MVnUFD627+sasuAxyJpTsp3A+6WgnplGpILpL1JR21lZt5k2ZSrFPE41AteEy+Q9qrn58qW77lNM877sXXq+fcGLp/2giETZO5tTYumHObxKDQ0aezhxb2feNE0MWlvqZS1SzwsJZdslu3x9fYae8HFXYeAKcIVejxwzgwc0YE6jTzuWOAuqOS+GTY3rc+rmDxAKn7VEPAt+amm/7Yu8ev0gfnkHckljT8nSoaf/RkeNgUejaKburGiYt696FNIcXrt/3yJh8Qba+advg0BwJCk66Qamp3WvxtX1gMzSDZya+BU8y2OR+ogyk7w5h+Nox+/6S04pNunwKqpt9Db9yemA2GokjqThGR+ms1JeYMe92hu5y2Zbs5O5be7mkru2Hlpgc5j434M1NPiq0qqgXoaDkwqTU21V0s7dgY/TfLX9XMT1udx56RJqTqf5aqlR3vVqtOWaYpbp4NtW2tmPaXbwAZI0U1zroI/tiRW9oBVOtL5QT6uu2TH0nlgnXRSqsLkGXg+JnBTCjopVeGceXk2FnAtColkUynGMn1SrHXejq3Py4U5wHXZvtluJtXO27H+vFyMB9xElFIxNQ6fUmFj9Xm6Sr67SrA6b94Gfp4HLsb2rSM53VSMpseK1c7bsXbechs4zgO3EiUvs6kK7tgsUmlglaLkZiZVStzOBzoPrJHOS1VgVR5YuTPXz1VgXR5YM/+u9xglkyZRT2WqghlbnVc8CA+4mtxRp5vB7XxW7bw3LwvywI0pr5MN6HNNrUi/fUZO4o6tzxuiuO0GuLzUUdu3GOV3M6raeTu2Nm8aR+eBlVD1BnoVjowt0HBgnY51PrqdT/9yxtJ5YHWkeGKswoxJuMcGuIYoKdowKOQ4Xxov+4Zb/khU8Mf681a3gZ/0gYt1PjGdV1J2/mBS5z/58zrbQOeBE6zpGZgA7smRzgc6D2xKlORlCiUVKrfSslMAVulI56PX+XHv81g6D6yPFM+MVWCJDliLJdfoMhVYowPWYsk1ukwF1uiAu1R/Hh5v2wNb8r+9O0pBGAaiKLqdm/1vUCiFSCdhTIjWhntAwefY5sMxRW1ToJnZ89KjQTnuGzGUWB1DLkJtul0ofocn3SOf5wMu3mu97q30GN2e99he2gKEpj6Dkvwjj4tebb5d8EBAuhuUJJ87f96f4aT/1OlNz7GRfgg+WheCUFsfE16cpEFNx5exIUmHx09zd34AaRdACCDp+TVLSlFv1blzgKR2egx5zx/see0pn+djbR4FIVofz4/UeV67G3+vr3niC+H04Oz/nbwA7lqtm+wByfQAAAAASUVORK5CYII=') no-repeat;\n\twidth: 21px;\n\theight: 21px;\n\tbackground-position: 0 -3554px;\n}\n\n.font-graph-geSprite-alignbottom {\n\tbackground: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAABeQCAMAAAByzXKPAAAA1VBMVEUAAAAzMzIzMzIzMzE1NTUzMzIzMzIzMzEzMzIyMjIzMzIzMzIzMzIzMzE6OjoyMjIzMzIzMzIzMzEzMzI0NDA0NDIwMDAyMjEzMzIzMzEzMzE0NDAzMzMzMzIyMjIzMzI0NDE0NDQyMjIzMzIzMzIzMzIzMzM5OTkAAAC1tbX///9mZmYwMDAQEBAmJiZTiPJ7e3v/Z2RwcHAgICB+fn5hYWFzc3NAQECoqKiampqMjIxTU1NGRkY3NzcbGxsNDQ3w8PBQUFDg4ODAwMCwsLCgoKBPT09W+xp5AAAAKHRSTlMAh4DDEd187+mljnhvVge5nmhMQi4hA8uxk2IlHOOYc102M/jW088J/2liTQAACt5JREFUeNrs3O1um0AQheG5nIPCoIq1Q7+r/Mn9X1K9xtEAM9RLQmODzyO1cV+NtzjShhjHkRkAgn9DMCaYnRXIGOQdtWmk1zRWm0vNN6az+Y+v2fXZ5iTX/kZ4ZGvUNT6/RJuCM/VVRKFB7YBwtnY1k3h2wboaHy8RFQC2VGuc1D730WWLS2GIZ27aM4yUT+9tXaLNw9m0mI9uokepRLeC+ZyCfFCoqwckqV3WBHFZaxHLFrNxVpgUVRWjg/jli2WbfH4WyxYnWcVV0Rz7FYj26X9ezQcuE3VYkXzFSYpm9eq6pqSiuNYAaj+r0GiFxKv5tEOqxVfV0utrCkZF/HCXTuOdGz2IHKbDR5wdJ6PdeRmIsfviED0C5ZV7ojf487v59fPHsT18//a1Yn1HJdoSjIUXBG5XgaBejhMYVmT9B1dRUONj4KtyRHNmNkULDYeD2CGVjiZ0paOK1jVuYKIpjJTO7m9dovvEn3bz/DH4440f2+d9fvlVh+4LLuK6cM8GVcKKkmq3ZqqBfbhaef4n+pijBudNZH3H+OW3No+rbTmVXjfciPbs/GVQ7QU6tWqUW5lonefHfn5f6xI9DAxdqQU3n55uU821mj2ZuUq0SYo2ivA5tThxk3rK6u+urYtZiqKuGiWMEkbp4/OFLITIvyrfekt35WGvjvP6OlERwP6+VU39z+ansp+0SThP8jk+0SeoAehRjObmdha0f2YwfucMss7uaPVF3rThN/EH6fH3YhEt3bD1zMlwGtu8/8a5zrHJuR6NyrkKMK5N5qqf9ev6Y4hfGfSPrc7ZWZqPQrQPa+x5Cfe8FO55m3Xrcs8T3TFUYQ0zqj5jTPoMmagQz4brFh8D3x5L9OngyRy+IEa0JgBRlaBWAIJYyVYjYDF47PwNV/TwAIRfB+BiFcyeolchija6+P7xd//IveI+JlpwnrdZP7xexdD6/4N/PDzP06NZdc8vP4H7WKFXLbqjQcU9T7QZvFhHdN/+sndmy6lCQRQ9KOA8Ro1TxjttYuUlX5BK5f+/6YJIWjlNFREkpLJXGQuWO01e2mPaU4pA17qH7iEeKfRsrrqh4/t0hJQPEJSokULPFpJse0Iu0PNQNVSNnOu8ZHPWZc8TUhkBgECRikZMrp4Xq9W1NPubkIIUm4hnrtyikSIjq+jck3bOBQkpnSBrkU97ALl73pJqXfFc5AlJqN3cXvoTEKIzJcu5PSEFqHiGp6ahz+33Z3rWtpzhEfK16DO8XXi3S2vIvfUCHnpWrcsZHiHVAFUG0KQJoEgjGjGRFG1l9bq25gyPkIoANBcEab9DEPf27iCk40VbWa0uP86WkMsTQHPQHBSnJJHCytp1dW9Uz2cBQoo0PEqVes/r2bM0131CLtLzUCVUidw9n6uuaPY8IdnUYMet2BTccUtIfShnz60mBe65JaTunL/tVqTAbbeE1ImCc3vl16McIEiWc3tCClD5DM9Ak7ZFZCBkZEVzhkfI5/n6Hbdp+wF33BJSH8rZc6vISB/gnltCas/Z225FStdz2y0hZXE19lrt5p177NyR11+OHb/THhzJP86wP2uYrjvz1h92eTseNEzDbB2nd/OY1Py9WNw6/qjnN+fmvnmwnYkxjf1t+mAW7XlsbzaJ3a7DzH1sf3Udp7m/dcOf615sW26SdfvGrCaxbV4l9nEan0X0xqEaRrbvmnlrGFu3PTN3ndUoLOuapW8ODLzudLVomMHA71z/MwmT9mTmN+bOZnS9NcJDs+V53t+WPzQnbNa9/nRoCPl2AKqObKFvltEBoPvcVwNwmavxOy3IDwFAlkWCWPBqhJDC8GtsCPlGYI8ciQyRI+3/CLHHscysXvf0ynzWIOQsPr3wWllkxNQskD+b82/Ihi8qCCm150XpObXnc2RFs+cJqRhAE5AHpI8BOZbH5TQdlXB8JAUEIC4AvkFPSMEl/dQ+v74+2/bl6enFtm/v72+W/c/eHSW3CUNRGNZyjgiZNHE6fW2b6f63VGScCHSvI7CxjfH/tYnTU43CywFiAfnT/On+lunH3274R5G2zbv03rTj9F+z92+U7pqPX52PZjdM35uf6vxs3ofp799Kulf2B8CEc2JVjvJm6OIT5CO9PekvD/8T767XgTc2z1umnEdggyT5eX2s+k9yGpvH1kqvI523IVfSAzdlW2gbu3zn5+6j/JFcfIft0lBOi4/J6cbmBTZJTdPo9fV1/3pamqTUFCalOVkunVdNTU5bSa2Nn7ULjl0A7o5/aGt6Z6TKUpVC7/VLSrWzqTo7b+yzO+9i28shHtugl5cXXS9NLnyYHVZ+Nz79UG7y4in7Aqza9po+tBsXP1B8wCW3m01yVqq9G3w3q/X+/1lpZ5WEbKdOTnNsxiYtd+ngjl28Fw+zhwGwLA0/mDeIS46AxWnO2MVnUFD627+sasuAxyJpTsp3A+6WgnplGpILpL1JR21lZt5k2ZSrFPE41AteEy+Q9qrn58qW77lNM877sXXq+fcGLp/2giETZO5tTYumHObxKDQ0aezhxb2feNE0MWlvqZS1SzwsJZdslu3x9fYae8HFXYeAKcIVejxwzgwc0YE6jTzuWOAuqOS+GTY3rc+rmDxAKn7VEPAt+amm/7Yu8ev0gfnkHckljT8nSoaf/RkeNgUejaKburGiYt696FNIcXrt/3yJh8Qba+advg0BwJCk66Qamp3WvxtX1gMzSDZya+BU8y2OR+ogyk7w5h+Nox+/6S04pNunwKqpt9Db9yemA2GokjqThGR+ms1JeYMe92hu5y2Zbs5O5be7mkru2Hlpgc5j434M1NPiq0qqgXoaDkwqTU21V0s7dgY/TfLX9XMT1udx56RJqTqf5aqlR3vVqtOWaYpbp4NtW2tmPaXbwAZI0U1zroI/tiRW9oBVOtL5QT6uu2TH0nlgnXRSqsLkGXg+JnBTCjopVeGceXk2FnAtColkUynGMn1SrHXejq3Py4U5wHXZvtluJtXO27H+vFyMB9xElFIxNQ6fUmFj9Xm6Sr67SrA6b94Gfp4HLsb2rSM53VSMpseK1c7bsXbechs4zgO3EiUvs6kK7tgsUmlglaLkZiZVStzOBzoPrJHOS1VgVR5YuTPXz1VgXR5YM/+u9xglkyZRT2WqghlbnVc8CA+4mtxRp5vB7XxW7bw3LwvywI0pr5MN6HNNrUi/fUZO4o6tzxuiuO0GuLzUUdu3GOV3M6raeTu2Nm8aR+eBlVD1BnoVjowt0HBgnY51PrqdT/9yxtJ5YHWkeGKswoxJuMcGuIYoKdowKOQ4Xxov+4Zb/khU8Mf681a3gZ/0gYt1PjGdV1J2/mBS5z/58zrbQOeBE6zpGZgA7smRzgc6D2xKlORlCiUVKrfSslMAVulI56PX+XHv81g6D6yPFM+MVWCJDliLJdfoMhVYowPWYsk1ukwF1uiAu1R/Hh5v2wNb8r+9O0pBGAaiKLqdm/1vUCiFSCdhTIjWhntAwefY5sMxRW1ToJnZ89KjQTnuGzGUWB1DLkJtul0ofocn3SOf5wMu3mu97q30GN2e99he2gKEpj6Dkvwjj4tebb5d8EBAuhuUJJ87f96f4aT/1OlNz7GRfgg+WheCUFsfE16cpEFNx5exIUmHx09zd34AaRdACCDp+TVLSlFv1blzgKR2egx5zx/see0pn+djbR4FIVofz4/UeV67G3+vr3niC+H04Oz/nbwA7lqtm+wByfQAAAAASUVORK5CYII=') no-repeat;\n\twidth: 21px;\n\theight: 21px;\n\tbackground-position: 0 -3600px;\n}\n\n.font-graph-geSprite-alignmiddle {\n\tbackground: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAABeQCAMAAAByzXKPAAAA1VBMVEUAAAAzMzIzMzIzMzE1NTUzMzIzMzIzMzEzMzIyMjIzMzIzMzIzMzIzMzE6OjoyMjIzMzIzMzIzMzEzMzI0NDA0NDIwMDAyMjEzMzIzMzEzMzE0NDAzMzMzMzIyMjIzMzI0NDE0NDQyMjIzMzIzMzIzMzIzMzM5OTkAAAC1tbX///9mZmYwMDAQEBAmJiZTiPJ7e3v/Z2RwcHAgICB+fn5hYWFzc3NAQECoqKiampqMjIxTU1NGRkY3NzcbGxsNDQ3w8PBQUFDg4ODAwMCwsLCgoKBPT09W+xp5AAAAKHRSTlMAh4DDEd187+mljnhvVge5nmhMQi4hA8uxk2IlHOOYc102M/jW088J/2liTQAACt5JREFUeNrs3O1um0AQheG5nIPCoIq1Q7+r/Mn9X1K9xtEAM9RLQmODzyO1cV+NtzjShhjHkRkAgn9DMCaYnRXIGOQdtWmk1zRWm0vNN6az+Y+v2fXZ5iTX/kZ4ZGvUNT6/RJuCM/VVRKFB7YBwtnY1k3h2wboaHy8RFQC2VGuc1D730WWLS2GIZ27aM4yUT+9tXaLNw9m0mI9uokepRLeC+ZyCfFCoqwckqV3WBHFZaxHLFrNxVpgUVRWjg/jli2WbfH4WyxYnWcVV0Rz7FYj26X9ezQcuE3VYkXzFSYpm9eq6pqSiuNYAaj+r0GiFxKv5tEOqxVfV0utrCkZF/HCXTuOdGz2IHKbDR5wdJ6PdeRmIsfviED0C5ZV7ojf487v59fPHsT18//a1Yn1HJdoSjIUXBG5XgaBejhMYVmT9B1dRUONj4KtyRHNmNkULDYeD2CGVjiZ0paOK1jVuYKIpjJTO7m9dovvEn3bz/DH4440f2+d9fvlVh+4LLuK6cM8GVcKKkmq3ZqqBfbhaef4n+pijBudNZH3H+OW3No+rbTmVXjfciPbs/GVQ7QU6tWqUW5lonefHfn5f6xI9DAxdqQU3n55uU821mj2ZuUq0SYo2ivA5tThxk3rK6u+urYtZiqKuGiWMEkbp4/OFLITIvyrfekt35WGvjvP6OlERwP6+VU39z+ansp+0SThP8jk+0SeoAehRjObmdha0f2YwfucMss7uaPVF3rThN/EH6fH3YhEt3bD1zMlwGtu8/8a5zrHJuR6NyrkKMK5N5qqf9ev6Y4hfGfSPrc7ZWZqPQrQPa+x5Cfe8FO55m3Xrcs8T3TFUYQ0zqj5jTPoMmagQz4brFh8D3x5L9OngyRy+IEa0JgBRlaBWAIJYyVYjYDF47PwNV/TwAIRfB+BiFcyeolchija6+P7xd//IveI+JlpwnrdZP7xexdD6/4N/PDzP06NZdc8vP4H7WKFXLbqjQcU9T7QZvFhHdN/+sndmy6lCQRQ9KOA8Ro1TxjttYuUlX5BK5f+/6YJIWjlNFREkpLJXGQuWO01e2mPaU4pA17qH7iEeKfRsrrqh4/t0hJQPEJSokULPFpJse0Iu0PNQNVSNnOu8ZHPWZc8TUhkBgECRikZMrp4Xq9W1NPubkIIUm4hnrtyikSIjq+jck3bOBQkpnSBrkU97ALl73pJqXfFc5AlJqN3cXvoTEKIzJcu5PSEFqHiGp6ahz+33Z3rWtpzhEfK16DO8XXi3S2vIvfUCHnpWrcsZHiHVAFUG0KQJoEgjGjGRFG1l9bq25gyPkIoANBcEab9DEPf27iCk40VbWa0uP86WkMsTQHPQHBSnJJHCytp1dW9Uz2cBQoo0PEqVes/r2bM0131CLtLzUCVUidw9n6uuaPY8IdnUYMet2BTccUtIfShnz60mBe65JaTunL/tVqTAbbeE1ImCc3vl16McIEiWc3tCClD5DM9Ak7ZFZCBkZEVzhkfI5/n6Hbdp+wF33BJSH8rZc6vISB/gnltCas/Z225FStdz2y0hZXE19lrt5p177NyR11+OHb/THhzJP86wP2uYrjvz1h92eTseNEzDbB2nd/OY1Py9WNw6/qjnN+fmvnmwnYkxjf1t+mAW7XlsbzaJ3a7DzH1sf3Udp7m/dcOf615sW26SdfvGrCaxbV4l9nEan0X0xqEaRrbvmnlrGFu3PTN3ndUoLOuapW8ODLzudLVomMHA71z/MwmT9mTmN+bOZnS9NcJDs+V53t+WPzQnbNa9/nRoCPl2AKqObKFvltEBoPvcVwNwmavxOy3IDwFAlkWCWPBqhJDC8GtsCPlGYI8ciQyRI+3/CLHHscysXvf0ynzWIOQsPr3wWllkxNQskD+b82/Ihi8qCCm150XpObXnc2RFs+cJqRhAE5AHpI8BOZbH5TQdlXB8JAUEIC4AvkFPSMEl/dQ+v74+2/bl6enFtm/v72+W/c/eHSW3CUNRGNZyjgiZNHE6fW2b6f63VGScCHSvI7CxjfH/tYnTU43CywFiAfnT/On+lunH3274R5G2zbv03rTj9F+z92+U7pqPX52PZjdM35uf6vxs3ofp799Kulf2B8CEc2JVjvJm6OIT5CO9PekvD/8T767XgTc2z1umnEdggyT5eX2s+k9yGpvH1kqvI523IVfSAzdlW2gbu3zn5+6j/JFcfIft0lBOi4/J6cbmBTZJTdPo9fV1/3pamqTUFCalOVkunVdNTU5bSa2Nn7ULjl0A7o5/aGt6Z6TKUpVC7/VLSrWzqTo7b+yzO+9i28shHtugl5cXXS9NLnyYHVZ+Nz79UG7y4in7Aqza9po+tBsXP1B8wCW3m01yVqq9G3w3q/X+/1lpZ5WEbKdOTnNsxiYtd+ngjl28Fw+zhwGwLA0/mDeIS46AxWnO2MVnUFD627+sasuAxyJpTsp3A+6WgnplGpILpL1JR21lZt5k2ZSrFPE41AteEy+Q9qrn58qW77lNM877sXXq+fcGLp/2giETZO5tTYumHObxKDQ0aezhxb2feNE0MWlvqZS1SzwsJZdslu3x9fYae8HFXYeAKcIVejxwzgwc0YE6jTzuWOAuqOS+GTY3rc+rmDxAKn7VEPAt+amm/7Yu8ev0gfnkHckljT8nSoaf/RkeNgUejaKburGiYt696FNIcXrt/3yJh8Qba+advg0BwJCk66Qamp3WvxtX1gMzSDZya+BU8y2OR+ogyk7w5h+Nox+/6S04pNunwKqpt9Db9yemA2GokjqThGR+ms1JeYMe92hu5y2Zbs5O5be7mkru2Hlpgc5j434M1NPiq0qqgXoaDkwqTU21V0s7dgY/TfLX9XMT1udx56RJqTqf5aqlR3vVqtOWaYpbp4NtW2tmPaXbwAZI0U1zroI/tiRW9oBVOtL5QT6uu2TH0nlgnXRSqsLkGXg+JnBTCjopVeGceXk2FnAtColkUynGMn1SrHXejq3Py4U5wHXZvtluJtXO27H+vFyMB9xElFIxNQ6fUmFj9Xm6Sr67SrA6b94Gfp4HLsb2rSM53VSMpseK1c7bsXbechs4zgO3EiUvs6kK7tgsUmlglaLkZiZVStzOBzoPrJHOS1VgVR5YuTPXz1VgXR5YM/+u9xglkyZRT2WqghlbnVc8CA+4mtxRp5vB7XxW7bw3LwvywI0pr5MN6HNNrUi/fUZO4o6tzxuiuO0GuLzUUdu3GOV3M6raeTu2Nm8aR+eBlVD1BnoVjowt0HBgnY51PrqdT/9yxtJ5YHWkeGKswoxJuMcGuIYoKdowKOQ4Xxov+4Zb/khU8Mf681a3gZ/0gYt1PjGdV1J2/mBS5z/58zrbQOeBE6zpGZgA7smRzgc6D2xKlORlCiUVKrfSslMAVulI56PX+XHv81g6D6yPFM+MVWCJDliLJdfoMhVYowPWYsk1ukwF1uiAu1R/Hh5v2wNb8r+9O0pBGAaiKLqdm/1vUCiFSCdhTIjWhntAwefY5sMxRW1ToJnZ89KjQTnuGzGUWB1DLkJtul0ofocn3SOf5wMu3mu97q30GN2e99he2gKEpj6Dkvwjj4tebb5d8EBAuhuUJJ87f96f4aT/1OlNz7GRfgg+WheCUFsfE16cpEFNx5exIUmHx09zd34AaRdACCDp+TVLSlFv1blzgKR2egx5zx/see0pn+djbR4FIVofz4/UeV67G3+vr3niC+H04Oz/nbwA7lqtm+wByfQAAAAASUVORK5CYII=') no-repeat;\n\twidth: 21px;\n\theight: 21px;\n\tbackground-position: 0 -3646px;\n}\n\n\n.font-graph-geSprite-rounded {\n\tbackground: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAABeQCAMAAAByzXKPAAAA1VBMVEUAAAAzMzIzMzIzMzE1NTUzMzIzMzIzMzEzMzIyMjIzMzIzMzIzMzIzMzE6OjoyMjIzMzIzMzIzMzEzMzI0NDA0NDIwMDAyMjEzMzIzMzEzMzE0NDAzMzMzMzIyMjIzMzI0NDE0NDQyMjIzMzIzMzIzMzIzMzM5OTkAAAC1tbX///9mZmYwMDAQEBAmJiZTiPJ7e3v/Z2RwcHAgICB+fn5hYWFzc3NAQECoqKiampqMjIxTU1NGRkY3NzcbGxsNDQ3w8PBQUFDg4ODAwMCwsLCgoKBPT09W+xp5AAAAKHRSTlMAh4DDEd187+mljnhvVge5nmhMQi4hA8uxk2IlHOOYc102M/jW088J/2liTQAACt5JREFUeNrs3O1um0AQheG5nIPCoIq1Q7+r/Mn9X1K9xtEAM9RLQmODzyO1cV+NtzjShhjHkRkAgn9DMCaYnRXIGOQdtWmk1zRWm0vNN6az+Y+v2fXZ5iTX/kZ4ZGvUNT6/RJuCM/VVRKFB7YBwtnY1k3h2wboaHy8RFQC2VGuc1D730WWLS2GIZ27aM4yUT+9tXaLNw9m0mI9uokepRLeC+ZyCfFCoqwckqV3WBHFZaxHLFrNxVpgUVRWjg/jli2WbfH4WyxYnWcVV0Rz7FYj26X9ezQcuE3VYkXzFSYpm9eq6pqSiuNYAaj+r0GiFxKv5tEOqxVfV0utrCkZF/HCXTuOdGz2IHKbDR5wdJ6PdeRmIsfviED0C5ZV7ojf487v59fPHsT18//a1Yn1HJdoSjIUXBG5XgaBejhMYVmT9B1dRUONj4KtyRHNmNkULDYeD2CGVjiZ0paOK1jVuYKIpjJTO7m9dovvEn3bz/DH4440f2+d9fvlVh+4LLuK6cM8GVcKKkmq3ZqqBfbhaef4n+pijBudNZH3H+OW3No+rbTmVXjfciPbs/GVQ7QU6tWqUW5lonefHfn5f6xI9DAxdqQU3n55uU821mj2ZuUq0SYo2ivA5tThxk3rK6u+urYtZiqKuGiWMEkbp4/OFLITIvyrfekt35WGvjvP6OlERwP6+VU39z+ansp+0SThP8jk+0SeoAehRjObmdha0f2YwfucMss7uaPVF3rThN/EH6fH3YhEt3bD1zMlwGtu8/8a5zrHJuR6NyrkKMK5N5qqf9ev6Y4hfGfSPrc7ZWZqPQrQPa+x5Cfe8FO55m3Xrcs8T3TFUYQ0zqj5jTPoMmagQz4brFh8D3x5L9OngyRy+IEa0JgBRlaBWAIJYyVYjYDF47PwNV/TwAIRfB+BiFcyeolchija6+P7xd//IveI+JlpwnrdZP7xexdD6/4N/PDzP06NZdc8vP4H7WKFXLbqjQcU9T7QZvFhHdN/+sndmy6lCQRQ9KOA8Ro1TxjttYuUlX5BK5f+/6YJIWjlNFREkpLJXGQuWO01e2mPaU4pA17qH7iEeKfRsrrqh4/t0hJQPEJSokULPFpJse0Iu0PNQNVSNnOu8ZHPWZc8TUhkBgECRikZMrp4Xq9W1NPubkIIUm4hnrtyikSIjq+jck3bOBQkpnSBrkU97ALl73pJqXfFc5AlJqN3cXvoTEKIzJcu5PSEFqHiGp6ahz+33Z3rWtpzhEfK16DO8XXi3S2vIvfUCHnpWrcsZHiHVAFUG0KQJoEgjGjGRFG1l9bq25gyPkIoANBcEab9DEPf27iCk40VbWa0uP86WkMsTQHPQHBSnJJHCytp1dW9Uz2cBQoo0PEqVes/r2bM0131CLtLzUCVUidw9n6uuaPY8IdnUYMet2BTccUtIfShnz60mBe65JaTunL/tVqTAbbeE1ImCc3vl16McIEiWc3tCClD5DM9Ak7ZFZCBkZEVzhkfI5/n6Hbdp+wF33BJSH8rZc6vISB/gnltCas/Z225FStdz2y0hZXE19lrt5p177NyR11+OHb/THhzJP86wP2uYrjvz1h92eTseNEzDbB2nd/OY1Py9WNw6/qjnN+fmvnmwnYkxjf1t+mAW7XlsbzaJ3a7DzH1sf3Udp7m/dcOf615sW26SdfvGrCaxbV4l9nEan0X0xqEaRrbvmnlrGFu3PTN3ndUoLOuapW8ODLzudLVomMHA71z/MwmT9mTmN+bOZnS9NcJDs+V53t+WPzQnbNa9/nRoCPl2AKqObKFvltEBoPvcVwNwmavxOy3IDwFAlkWCWPBqhJDC8GtsCPlGYI8ciQyRI+3/CLHHscysXvf0ynzWIOQsPr3wWllkxNQskD+b82/Ihi8qCCm150XpObXnc2RFs+cJqRhAE5AHpI8BOZbH5TQdlXB8JAUEIC4AvkFPSMEl/dQ+v74+2/bl6enFtm/v72+W/c/eHSW3CUNRGNZyjgiZNHE6fW2b6f63VGScCHSvI7CxjfH/tYnTU43CywFiAfnT/On+lunH3274R5G2zbv03rTj9F+z92+U7pqPX52PZjdM35uf6vxs3ofp799Kulf2B8CEc2JVjvJm6OIT5CO9PekvD/8T767XgTc2z1umnEdggyT5eX2s+k9yGpvH1kqvI523IVfSAzdlW2gbu3zn5+6j/JFcfIft0lBOi4/J6cbmBTZJTdPo9fV1/3pamqTUFCalOVkunVdNTU5bSa2Nn7ULjl0A7o5/aGt6Z6TKUpVC7/VLSrWzqTo7b+yzO+9i28shHtugl5cXXS9NLnyYHVZ+Nz79UG7y4in7Aqza9po+tBsXP1B8wCW3m01yVqq9G3w3q/X+/1lpZ5WEbKdOTnNsxiYtd+ngjl28Fw+zhwGwLA0/mDeIS46AxWnO2MVnUFD627+sasuAxyJpTsp3A+6WgnplGpILpL1JR21lZt5k2ZSrFPE41AteEy+Q9qrn58qW77lNM877sXXq+fcGLp/2giETZO5tTYumHObxKDQ0aezhxb2feNE0MWlvqZS1SzwsJZdslu3x9fYae8HFXYeAKcIVejxwzgwc0YE6jTzuWOAuqOS+GTY3rc+rmDxAKn7VEPAt+amm/7Yu8ev0gfnkHckljT8nSoaf/RkeNgUejaKburGiYt696FNIcXrt/3yJh8Qba+advg0BwJCk66Qamp3WvxtX1gMzSDZya+BU8y2OR+ogyk7w5h+Nox+/6S04pNunwKqpt9Db9yemA2GokjqThGR+ms1JeYMe92hu5y2Zbs5O5be7mkru2Hlpgc5j434M1NPiq0qqgXoaDkwqTU21V0s7dgY/TfLX9XMT1udx56RJqTqf5aqlR3vVqtOWaYpbp4NtW2tmPaXbwAZI0U1zroI/tiRW9oBVOtL5QT6uu2TH0nlgnXRSqsLkGXg+JnBTCjopVeGceXk2FnAtColkUynGMn1SrHXejq3Py4U5wHXZvtluJtXO27H+vFyMB9xElFIxNQ6fUmFj9Xm6Sr67SrA6b94Gfp4HLsb2rSM53VSMpseK1c7bsXbechs4zgO3EiUvs6kK7tgsUmlglaLkZiZVStzOBzoPrJHOS1VgVR5YuTPXz1VgXR5YM/+u9xglkyZRT2WqghlbnVc8CA+4mtxRp5vB7XxW7bw3LwvywI0pr5MN6HNNrUi/fUZO4o6tzxuiuO0GuLzUUdu3GOV3M6raeTu2Nm8aR+eBlVD1BnoVjowt0HBgnY51PrqdT/9yxtJ5YHWkeGKswoxJuMcGuIYoKdowKOQ4Xxov+4Zb/khU8Mf681a3gZ/0gYt1PjGdV1J2/mBS5z/58zrbQOeBE6zpGZgA7smRzgc6D2xKlORlCiUVKrfSslMAVulI56PX+XHv81g6D6yPFM+MVWCJDliLJdfoMhVYowPWYsk1ukwF1uiAu1R/Hh5v2wNb8r+9O0pBGAaiKLqdm/1vUCiFSCdhTIjWhntAwefY5sMxRW1ToJnZ89KjQTnuGzGUWB1DLkJtul0ofocn3SOf5wMu3mu97q30GN2e99he2gKEpj6Dkvwjj4tebb5d8EBAuhuUJJ87f96f4aT/1OlNz7GRfgg+WheCUFsfE16cpEFNx5exIUmHx09zd34AaRdACCDp+TVLSlFv1blzgKR2egx5zx/see0pn+djbR4FIVofz4/UeV67G3+vr3niC+H04Oz/nbwA7lqtm+wByfQAAAAASUVORK5CYII=') no-repeat;\n\twidth: 21px;\n\theight: 21px;\n\tbackground-position: 0 -3968px;\n}\n\n.font-graph-geSprite-duplicate {\n\tbackground: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAABeQCAMAAAByzXKPAAAA1VBMVEUAAAAzMzIzMzIzMzE1NTUzMzIzMzIzMzEzMzIyMjIzMzIzMzIzMzIzMzE6OjoyMjIzMzIzMzIzMzEzMzI0NDA0NDIwMDAyMjEzMzIzMzEzMzE0NDAzMzMzMzIyMjIzMzI0NDE0NDQyMjIzMzIzMzIzMzIzMzM5OTkAAAC1tbX///9mZmYwMDAQEBAmJiZTiPJ7e3v/Z2RwcHAgICB+fn5hYWFzc3NAQECoqKiampqMjIxTU1NGRkY3NzcbGxsNDQ3w8PBQUFDg4ODAwMCwsLCgoKBPT09W+xp5AAAAKHRSTlMAh4DDEd187+mljnhvVge5nmhMQi4hA8uxk2IlHOOYc102M/jW088J/2liTQAACt5JREFUeNrs3O1um0AQheG5nIPCoIq1Q7+r/Mn9X1K9xtEAM9RLQmODzyO1cV+NtzjShhjHkRkAgn9DMCaYnRXIGOQdtWmk1zRWm0vNN6az+Y+v2fXZ5iTX/kZ4ZGvUNT6/RJuCM/VVRKFB7YBwtnY1k3h2wboaHy8RFQC2VGuc1D730WWLS2GIZ27aM4yUT+9tXaLNw9m0mI9uokepRLeC+ZyCfFCoqwckqV3WBHFZaxHLFrNxVpgUVRWjg/jli2WbfH4WyxYnWcVV0Rz7FYj26X9ezQcuE3VYkXzFSYpm9eq6pqSiuNYAaj+r0GiFxKv5tEOqxVfV0utrCkZF/HCXTuOdGz2IHKbDR5wdJ6PdeRmIsfviED0C5ZV7ojf487v59fPHsT18//a1Yn1HJdoSjIUXBG5XgaBejhMYVmT9B1dRUONj4KtyRHNmNkULDYeD2CGVjiZ0paOK1jVuYKIpjJTO7m9dovvEn3bz/DH4440f2+d9fvlVh+4LLuK6cM8GVcKKkmq3ZqqBfbhaef4n+pijBudNZH3H+OW3No+rbTmVXjfciPbs/GVQ7QU6tWqUW5lonefHfn5f6xI9DAxdqQU3n55uU821mj2ZuUq0SYo2ivA5tThxk3rK6u+urYtZiqKuGiWMEkbp4/OFLITIvyrfekt35WGvjvP6OlERwP6+VU39z+ansp+0SThP8jk+0SeoAehRjObmdha0f2YwfucMss7uaPVF3rThN/EH6fH3YhEt3bD1zMlwGtu8/8a5zrHJuR6NyrkKMK5N5qqf9ev6Y4hfGfSPrc7ZWZqPQrQPa+x5Cfe8FO55m3Xrcs8T3TFUYQ0zqj5jTPoMmagQz4brFh8D3x5L9OngyRy+IEa0JgBRlaBWAIJYyVYjYDF47PwNV/TwAIRfB+BiFcyeolchija6+P7xd//IveI+JlpwnrdZP7xexdD6/4N/PDzP06NZdc8vP4H7WKFXLbqjQcU9T7QZvFhHdN/+sndmy6lCQRQ9KOA8Ro1TxjttYuUlX5BK5f+/6YJIWjlNFREkpLJXGQuWO01e2mPaU4pA17qH7iEeKfRsrrqh4/t0hJQPEJSokULPFpJse0Iu0PNQNVSNnOu8ZHPWZc8TUhkBgECRikZMrp4Xq9W1NPubkIIUm4hnrtyikSIjq+jck3bOBQkpnSBrkU97ALl73pJqXfFc5AlJqN3cXvoTEKIzJcu5PSEFqHiGp6ahz+33Z3rWtpzhEfK16DO8XXi3S2vIvfUCHnpWrcsZHiHVAFUG0KQJoEgjGjGRFG1l9bq25gyPkIoANBcEab9DEPf27iCk40VbWa0uP86WkMsTQHPQHBSnJJHCytp1dW9Uz2cBQoo0PEqVes/r2bM0131CLtLzUCVUidw9n6uuaPY8IdnUYMet2BTccUtIfShnz60mBe65JaTunL/tVqTAbbeE1ImCc3vl16McIEiWc3tCClD5DM9Ak7ZFZCBkZEVzhkfI5/n6Hbdp+wF33BJSH8rZc6vISB/gnltCas/Z225FStdz2y0hZXE19lrt5p177NyR11+OHb/THhzJP86wP2uYrjvz1h92eTseNEzDbB2nd/OY1Py9WNw6/qjnN+fmvnmwnYkxjf1t+mAW7XlsbzaJ3a7DzH1sf3Udp7m/dcOf615sW26SdfvGrCaxbV4l9nEan0X0xqEaRrbvmnlrGFu3PTN3ndUoLOuapW8ODLzudLVomMHA71z/MwmT9mTmN+bOZnS9NcJDs+V53t+WPzQnbNa9/nRoCPl2AKqObKFvltEBoPvcVwNwmavxOy3IDwFAlkWCWPBqhJDC8GtsCPlGYI8ciQyRI+3/CLHHscysXvf0ynzWIOQsPr3wWllkxNQskD+b82/Ihi8qCCm150XpObXnc2RFs+cJqRhAE5AHpI8BOZbH5TQdlXB8JAUEIC4AvkFPSMEl/dQ+v74+2/bl6enFtm/v72+W/c/eHSW3CUNRGNZyjgiZNHE6fW2b6f63VGScCHSvI7CxjfH/tYnTU43CywFiAfnT/On+lunH3274R5G2zbv03rTj9F+z92+U7pqPX52PZjdM35uf6vxs3ofp799Kulf2B8CEc2JVjvJm6OIT5CO9PekvD/8T767XgTc2z1umnEdggyT5eX2s+k9yGpvH1kqvI523IVfSAzdlW2gbu3zn5+6j/JFcfIft0lBOi4/J6cbmBTZJTdPo9fV1/3pamqTUFCalOVkunVdNTU5bSa2Nn7ULjl0A7o5/aGt6Z6TKUpVC7/VLSrWzqTo7b+yzO+9i28shHtugl5cXXS9NLnyYHVZ+Nz79UG7y4in7Aqza9po+tBsXP1B8wCW3m01yVqq9G3w3q/X+/1lpZ5WEbKdOTnNsxiYtd+ngjl28Fw+zhwGwLA0/mDeIS46AxWnO2MVnUFD627+sasuAxyJpTsp3A+6WgnplGpILpL1JR21lZt5k2ZSrFPE41AteEy+Q9qrn58qW77lNM877sXXq+fcGLp/2giETZO5tTYumHObxKDQ0aezhxb2feNE0MWlvqZS1SzwsJZdslu3x9fYae8HFXYeAKcIVejxwzgwc0YE6jTzuWOAuqOS+GTY3rc+rmDxAKn7VEPAt+amm/7Yu8ev0gfnkHckljT8nSoaf/RkeNgUejaKburGiYt696FNIcXrt/3yJh8Qba+advg0BwJCk66Qamp3WvxtX1gMzSDZya+BU8y2OR+ogyk7w5h+Nox+/6S04pNunwKqpt9Db9yemA2GokjqThGR+ms1JeYMe92hu5y2Zbs5O5be7mkru2Hlpgc5j434M1NPiq0qqgXoaDkwqTU21V0s7dgY/TfLX9XMT1udx56RJqTqf5aqlR3vVqtOWaYpbp4NtW2tmPaXbwAZI0U1zroI/tiRW9oBVOtL5QT6uu2TH0nlgnXRSqsLkGXg+JnBTCjopVeGceXk2FnAtColkUynGMn1SrHXejq3Py4U5wHXZvtluJtXO27H+vFyMB9xElFIxNQ6fUmFj9Xm6Sr67SrA6b94Gfp4HLsb2rSM53VSMpseK1c7bsXbechs4zgO3EiUvs6kK7tgsUmlglaLkZiZVStzOBzoPrJHOS1VgVR5YuTPXz1VgXR5YM/+u9xglkyZRT2WqghlbnVc8CA+4mtxRp5vB7XxW7bw3LwvywI0pr5MN6HNNrUi/fUZO4o6tzxuiuO0GuLzUUdu3GOV3M6raeTu2Nm8aR+eBlVD1BnoVjowt0HBgnY51PrqdT/9yxtJ5YHWkeGKswoxJuMcGuIYoKdowKOQ4Xxov+4Zb/khU8Mf681a3gZ/0gYt1PjGdV1J2/mBS5z/58zrbQOeBE6zpGZgA7smRzgc6D2xKlORlCiUVKrfSslMAVulI56PX+XHv81g6D6yPFM+MVWCJDliLJdfoMhVYowPWYsk1ukwF1uiAu1R/Hh5v2wNb8r+9O0pBGAaiKLqdm/1vUCiFSCdhTIjWhntAwefY5sMxRW1ToJnZ89KjQTnuGzGUWB1DLkJtul0ofocn3SOf5wMu3mu97q30GN2e99he2gKEpj6Dkvwjj4tebb5d8EBAuhuUJJ87f96f4aT/1OlNz7GRfgg+WheCUFsfE16cpEFNx5exIUmHx09zd34AaRdACCDp+TVLSlFv1blzgKR2egx5zx/see0pn+djbR4FIVofz4/UeV67G3+vr3niC+H04Oz/nbwA7lqtm+wByfQAAAAASUVORK5CYII=') no-repeat;\n\twidth: 21px;\n\theight: 21px;\n\tbackground-position: 0 -4106px;\n}\n\n.font-graph-geSprite-insert {\n\tbackground: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAABeQCAMAAAByzXKPAAAA1VBMVEUAAAAzMzIzMzIzMzE1NTUzMzIzMzIzMzEzMzIyMjIzMzIzMzIzMzIzMzE6OjoyMjIzMzIzMzIzMzEzMzI0NDA0NDIwMDAyMjEzMzIzMzEzMzE0NDAzMzMzMzIyMjIzMzI0NDE0NDQyMjIzMzIzMzIzMzIzMzM5OTkAAAC1tbX///9mZmYwMDAQEBAmJiZTiPJ7e3v/Z2RwcHAgICB+fn5hYWFzc3NAQECoqKiampqMjIxTU1NGRkY3NzcbGxsNDQ3w8PBQUFDg4ODAwMCwsLCgoKBPT09W+xp5AAAAKHRSTlMAh4DDEd187+mljnhvVge5nmhMQi4hA8uxk2IlHOOYc102M/jW088J/2liTQAACt5JREFUeNrs3O1um0AQheG5nIPCoIq1Q7+r/Mn9X1K9xtEAM9RLQmODzyO1cV+NtzjShhjHkRkAgn9DMCaYnRXIGOQdtWmk1zRWm0vNN6az+Y+v2fXZ5iTX/kZ4ZGvUNT6/RJuCM/VVRKFB7YBwtnY1k3h2wboaHy8RFQC2VGuc1D730WWLS2GIZ27aM4yUT+9tXaLNw9m0mI9uokepRLeC+ZyCfFCoqwckqV3WBHFZaxHLFrNxVpgUVRWjg/jli2WbfH4WyxYnWcVV0Rz7FYj26X9ezQcuE3VYkXzFSYpm9eq6pqSiuNYAaj+r0GiFxKv5tEOqxVfV0utrCkZF/HCXTuOdGz2IHKbDR5wdJ6PdeRmIsfviED0C5ZV7ojf487v59fPHsT18//a1Yn1HJdoSjIUXBG5XgaBejhMYVmT9B1dRUONj4KtyRHNmNkULDYeD2CGVjiZ0paOK1jVuYKIpjJTO7m9dovvEn3bz/DH4440f2+d9fvlVh+4LLuK6cM8GVcKKkmq3ZqqBfbhaef4n+pijBudNZH3H+OW3No+rbTmVXjfciPbs/GVQ7QU6tWqUW5lonefHfn5f6xI9DAxdqQU3n55uU821mj2ZuUq0SYo2ivA5tThxk3rK6u+urYtZiqKuGiWMEkbp4/OFLITIvyrfekt35WGvjvP6OlERwP6+VU39z+ansp+0SThP8jk+0SeoAehRjObmdha0f2YwfucMss7uaPVF3rThN/EH6fH3YhEt3bD1zMlwGtu8/8a5zrHJuR6NyrkKMK5N5qqf9ev6Y4hfGfSPrc7ZWZqPQrQPa+x5Cfe8FO55m3Xrcs8T3TFUYQ0zqj5jTPoMmagQz4brFh8D3x5L9OngyRy+IEa0JgBRlaBWAIJYyVYjYDF47PwNV/TwAIRfB+BiFcyeolchija6+P7xd//IveI+JlpwnrdZP7xexdD6/4N/PDzP06NZdc8vP4H7WKFXLbqjQcU9T7QZvFhHdN/+sndmy6lCQRQ9KOA8Ro1TxjttYuUlX5BK5f+/6YJIWjlNFREkpLJXGQuWO01e2mPaU4pA17qH7iEeKfRsrrqh4/t0hJQPEJSokULPFpJse0Iu0PNQNVSNnOu8ZHPWZc8TUhkBgECRikZMrp4Xq9W1NPubkIIUm4hnrtyikSIjq+jck3bOBQkpnSBrkU97ALl73pJqXfFc5AlJqN3cXvoTEKIzJcu5PSEFqHiGp6ahz+33Z3rWtpzhEfK16DO8XXi3S2vIvfUCHnpWrcsZHiHVAFUG0KQJoEgjGjGRFG1l9bq25gyPkIoANBcEab9DEPf27iCk40VbWa0uP86WkMsTQHPQHBSnJJHCytp1dW9Uz2cBQoo0PEqVes/r2bM0131CLtLzUCVUidw9n6uuaPY8IdnUYMet2BTccUtIfShnz60mBe65JaTunL/tVqTAbbeE1ImCc3vl16McIEiWc3tCClD5DM9Ak7ZFZCBkZEVzhkfI5/n6Hbdp+wF33BJSH8rZc6vISB/gnltCas/Z225FStdz2y0hZXE19lrt5p177NyR11+OHb/THhzJP86wP2uYrjvz1h92eTseNEzDbB2nd/OY1Py9WNw6/qjnN+fmvnmwnYkxjf1t+mAW7XlsbzaJ3a7DzH1sf3Udp7m/dcOf615sW26SdfvGrCaxbV4l9nEan0X0xqEaRrbvmnlrGFu3PTN3ndUoLOuapW8ODLzudLVomMHA71z/MwmT9mTmN+bOZnS9NcJDs+V53t+WPzQnbNa9/nRoCPl2AKqObKFvltEBoPvcVwNwmavxOy3IDwFAlkWCWPBqhJDC8GtsCPlGYI8ciQyRI+3/CLHHscysXvf0ynzWIOQsPr3wWllkxNQskD+b82/Ihi8qCCm150XpObXnc2RFs+cJqRhAE5AHpI8BOZbH5TQdlXB8JAUEIC4AvkFPSMEl/dQ+v74+2/bl6enFtm/v72+W/c/eHSW3CUNRGNZyjgiZNHE6fW2b6f63VGScCHSvI7CxjfH/tYnTU43CywFiAfnT/On+lunH3274R5G2zbv03rTj9F+z92+U7pqPX52PZjdM35uf6vxs3ofp799Kulf2B8CEc2JVjvJm6OIT5CO9PekvD/8T767XgTc2z1umnEdggyT5eX2s+k9yGpvH1kqvI523IVfSAzdlW2gbu3zn5+6j/JFcfIft0lBOi4/J6cbmBTZJTdPo9fV1/3pamqTUFCalOVkunVdNTU5bSa2Nn7ULjl0A7o5/aGt6Z6TKUpVC7/VLSrWzqTo7b+yzO+9i28shHtugl5cXXS9NLnyYHVZ+Nz79UG7y4in7Aqza9po+tBsXP1B8wCW3m01yVqq9G3w3q/X+/1lpZ5WEbKdOTnNsxiYtd+ngjl28Fw+zhwGwLA0/mDeIS46AxWnO2MVnUFD627+sasuAxyJpTsp3A+6WgnplGpILpL1JR21lZt5k2ZSrFPE41AteEy+Q9qrn58qW77lNM877sXXq+fcGLp/2giETZO5tTYumHObxKDQ0aezhxb2feNE0MWlvqZS1SzwsJZdslu3x9fYae8HFXYeAKcIVejxwzgwc0YE6jTzuWOAuqOS+GTY3rc+rmDxAKn7VEPAt+amm/7Yu8ev0gfnkHckljT8nSoaf/RkeNgUejaKburGiYt696FNIcXrt/3yJh8Qba+advg0BwJCk66Qamp3WvxtX1gMzSDZya+BU8y2OR+ogyk7w5h+Nox+/6S04pNunwKqpt9Db9yemA2GokjqThGR+ms1JeYMe92hu5y2Zbs5O5be7mkru2Hlpgc5j434M1NPiq0qqgXoaDkwqTU21V0s7dgY/TfLX9XMT1udx56RJqTqf5aqlR3vVqtOWaYpbp4NtW2tmPaXbwAZI0U1zroI/tiRW9oBVOtL5QT6uu2TH0nlgnXRSqsLkGXg+JnBTCjopVeGceXk2FnAtColkUynGMn1SrHXejq3Py4U5wHXZvtluJtXO27H+vFyMB9xElFIxNQ6fUmFj9Xm6Sr67SrA6b94Gfp4HLsb2rSM53VSMpseK1c7bsXbechs4zgO3EiUvs6kK7tgsUmlglaLkZiZVStzOBzoPrJHOS1VgVR5YuTPXz1VgXR5YM/+u9xglkyZRT2WqghlbnVc8CA+4mtxRp5vB7XxW7bw3LwvywI0pr5MN6HNNrUi/fUZO4o6tzxuiuO0GuLzUUdu3GOV3M6raeTu2Nm8aR+eBlVD1BnoVjowt0HBgnY51PrqdT/9yxtJ5YHWkeGKswoxJuMcGuIYoKdowKOQ4Xxov+4Zb/khU8Mf681a3gZ/0gYt1PjGdV1J2/mBS5z/58zrbQOeBE6zpGZgA7smRzgc6D2xKlORlCiUVKrfSslMAVulI56PX+XHv81g6D6yPFM+MVWCJDliLJdfoMhVYowPWYsk1ukwF1uiAu1R/Hh5v2wNb8r+9O0pBGAaiKLqdm/1vUCiFSCdhTIjWhntAwefY5sMxRW1ToJnZ89KjQTnuGzGUWB1DLkJtul0ofocn3SOf5wMu3mu97q30GN2e99he2gKEpj6Dkvwjj4tebb5d8EBAuhuUJJ87f96f4aT/1OlNz7GRfgg+WheCUFsfE16cpEFNx5exIUmHx09zd34AaRdACCDp+TVLSlFv1blzgKR2egx5zx/see0pn+djbR4FIVofz4/UeV67G3+vr3niC+H04Oz/nbwA7lqtm+wByfQAAAAASUVORK5CYII=') no-repeat;\n\twidth: 21px;\n\theight: 21px;\n\tbackground-position: 0 -4152px;\n}\n\n.font-graph-geSprite-endblockthin {\n\tbackground: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAABeQCAMAAAByzXKPAAAA1VBMVEUAAAAzMzIzMzIzMzE1NTUzMzIzMzIzMzEzMzIyMjIzMzIzMzIzMzIzMzE6OjoyMjIzMzIzMzIzMzEzMzI0NDA0NDIwMDAyMjEzMzIzMzEzMzE0NDAzMzMzMzIyMjIzMzI0NDE0NDQyMjIzMzIzMzIzMzIzMzM5OTkAAAC1tbX///9mZmYwMDAQEBAmJiZTiPJ7e3v/Z2RwcHAgICB+fn5hYWFzc3NAQECoqKiampqMjIxTU1NGRkY3NzcbGxsNDQ3w8PBQUFDg4ODAwMCwsLCgoKBPT09W+xp5AAAAKHRSTlMAh4DDEd187+mljnhvVge5nmhMQi4hA8uxk2IlHOOYc102M/jW088J/2liTQAACt5JREFUeNrs3O1um0AQheG5nIPCoIq1Q7+r/Mn9X1K9xtEAM9RLQmODzyO1cV+NtzjShhjHkRkAgn9DMCaYnRXIGOQdtWmk1zRWm0vNN6az+Y+v2fXZ5iTX/kZ4ZGvUNT6/RJuCM/VVRKFB7YBwtnY1k3h2wboaHy8RFQC2VGuc1D730WWLS2GIZ27aM4yUT+9tXaLNw9m0mI9uokepRLeC+ZyCfFCoqwckqV3WBHFZaxHLFrNxVpgUVRWjg/jli2WbfH4WyxYnWcVV0Rz7FYj26X9ezQcuE3VYkXzFSYpm9eq6pqSiuNYAaj+r0GiFxKv5tEOqxVfV0utrCkZF/HCXTuOdGz2IHKbDR5wdJ6PdeRmIsfviED0C5ZV7ojf487v59fPHsT18//a1Yn1HJdoSjIUXBG5XgaBejhMYVmT9B1dRUONj4KtyRHNmNkULDYeD2CGVjiZ0paOK1jVuYKIpjJTO7m9dovvEn3bz/DH4440f2+d9fvlVh+4LLuK6cM8GVcKKkmq3ZqqBfbhaef4n+pijBudNZH3H+OW3No+rbTmVXjfciPbs/GVQ7QU6tWqUW5lonefHfn5f6xI9DAxdqQU3n55uU821mj2ZuUq0SYo2ivA5tThxk3rK6u+urYtZiqKuGiWMEkbp4/OFLITIvyrfekt35WGvjvP6OlERwP6+VU39z+ansp+0SThP8jk+0SeoAehRjObmdha0f2YwfucMss7uaPVF3rThN/EH6fH3YhEt3bD1zMlwGtu8/8a5zrHJuR6NyrkKMK5N5qqf9ev6Y4hfGfSPrc7ZWZqPQrQPa+x5Cfe8FO55m3Xrcs8T3TFUYQ0zqj5jTPoMmagQz4brFh8D3x5L9OngyRy+IEa0JgBRlaBWAIJYyVYjYDF47PwNV/TwAIRfB+BiFcyeolchija6+P7xd//IveI+JlpwnrdZP7xexdD6/4N/PDzP06NZdc8vP4H7WKFXLbqjQcU9T7QZvFhHdN/+sndmy6lCQRQ9KOA8Ro1TxjttYuUlX5BK5f+/6YJIWjlNFREkpLJXGQuWO01e2mPaU4pA17qH7iEeKfRsrrqh4/t0hJQPEJSokULPFpJse0Iu0PNQNVSNnOu8ZHPWZc8TUhkBgECRikZMrp4Xq9W1NPubkIIUm4hnrtyikSIjq+jck3bOBQkpnSBrkU97ALl73pJqXfFc5AlJqN3cXvoTEKIzJcu5PSEFqHiGp6ahz+33Z3rWtpzhEfK16DO8XXi3S2vIvfUCHnpWrcsZHiHVAFUG0KQJoEgjGjGRFG1l9bq25gyPkIoANBcEab9DEPf27iCk40VbWa0uP86WkMsTQHPQHBSnJJHCytp1dW9Uz2cBQoo0PEqVes/r2bM0131CLtLzUCVUidw9n6uuaPY8IdnUYMet2BTccUtIfShnz60mBe65JaTunL/tVqTAbbeE1ImCc3vl16McIEiWc3tCClD5DM9Ak7ZFZCBkZEVzhkfI5/n6Hbdp+wF33BJSH8rZc6vISB/gnltCas/Z225FStdz2y0hZXE19lrt5p177NyR11+OHb/THhzJP86wP2uYrjvz1h92eTseNEzDbB2nd/OY1Py9WNw6/qjnN+fmvnmwnYkxjf1t+mAW7XlsbzaJ3a7DzH1sf3Udp7m/dcOf615sW26SdfvGrCaxbV4l9nEan0X0xqEaRrbvmnlrGFu3PTN3ndUoLOuapW8ODLzudLVomMHA71z/MwmT9mTmN+bOZnS9NcJDs+V53t+WPzQnbNa9/nRoCPl2AKqObKFvltEBoPvcVwNwmavxOy3IDwFAlkWCWPBqhJDC8GtsCPlGYI8ciQyRI+3/CLHHscysXvf0ynzWIOQsPr3wWllkxNQskD+b82/Ihi8qCCm150XpObXnc2RFs+cJqRhAE5AHpI8BOZbH5TQdlXB8JAUEIC4AvkFPSMEl/dQ+v74+2/bl6enFtm/v72+W/c/eHSW3CUNRGNZyjgiZNHE6fW2b6f63VGScCHSvI7CxjfH/tYnTU43CywFiAfnT/On+lunH3274R5G2zbv03rTj9F+z92+U7pqPX52PZjdM35uf6vxs3ofp799Kulf2B8CEc2JVjvJm6OIT5CO9PekvD/8T767XgTc2z1umnEdggyT5eX2s+k9yGpvH1kqvI523IVfSAzdlW2gbu3zn5+6j/JFcfIft0lBOi4/J6cbmBTZJTdPo9fV1/3pamqTUFCalOVkunVdNTU5bSa2Nn7ULjl0A7o5/aGt6Z6TKUpVC7/VLSrWzqTo7b+yzO+9i28shHtugl5cXXS9NLnyYHVZ+Nz79UG7y4in7Aqza9po+tBsXP1B8wCW3m01yVqq9G3w3q/X+/1lpZ5WEbKdOTnNsxiYtd+ngjl28Fw+zhwGwLA0/mDeIS46AxWnO2MVnUFD627+sasuAxyJpTsp3A+6WgnplGpILpL1JR21lZt5k2ZSrFPE41AteEy+Q9qrn58qW77lNM877sXXq+fcGLp/2giETZO5tTYumHObxKDQ0aezhxb2feNE0MWlvqZS1SzwsJZdslu3x9fYae8HFXYeAKcIVejxwzgwc0YE6jTzuWOAuqOS+GTY3rc+rmDxAKn7VEPAt+amm/7Yu8ev0gfnkHckljT8nSoaf/RkeNgUejaKburGiYt696FNIcXrt/3yJh8Qba+advg0BwJCk66Qamp3WvxtX1gMzSDZya+BU8y2OR+ogyk7w5h+Nox+/6S04pNunwKqpt9Db9yemA2GokjqThGR+ms1JeYMe92hu5y2Zbs5O5be7mkru2Hlpgc5j434M1NPiq0qqgXoaDkwqTU21V0s7dgY/TfLX9XMT1udx56RJqTqf5aqlR3vVqtOWaYpbp4NtW2tmPaXbwAZI0U1zroI/tiRW9oBVOtL5QT6uu2TH0nlgnXRSqsLkGXg+JnBTCjopVeGceXk2FnAtColkUynGMn1SrHXejq3Py4U5wHXZvtluJtXO27H+vFyMB9xElFIxNQ6fUmFj9Xm6Sr67SrA6b94Gfp4HLsb2rSM53VSMpseK1c7bsXbechs4zgO3EiUvs6kK7tgsUmlglaLkZiZVStzOBzoPrJHOS1VgVR5YuTPXz1VgXR5YM/+u9xglkyZRT2WqghlbnVc8CA+4mtxRp5vB7XxW7bw3LwvywI0pr5MN6HNNrUi/fUZO4o6tzxuiuO0GuLzUUdu3GOV3M6raeTu2Nm8aR+eBlVD1BnoVjowt0HBgnY51PrqdT/9yxtJ5YHWkeGKswoxJuMcGuIYoKdowKOQ4Xxov+4Zb/khU8Mf681a3gZ/0gYt1PjGdV1J2/mBS5z/58zrbQOeBE6zpGZgA7smRzgc6D2xKlORlCiUVKrfSslMAVulI56PX+XHv81g6D6yPFM+MVWCJDliLJdfoMhVYowPWYsk1ukwF1uiAu1R/Hh5v2wNb8r+9O0pBGAaiKLqdm/1vUCiFSCdhTIjWhntAwefY5sMxRW1ToJnZ89KjQTnuGzGUWB1DLkJtul0ofocn3SOf5wMu3mu97q30GN2e99he2gKEpj6Dkvwjj4tebb5d8EBAuhuUJJ87f96f4aT/1OlNz7GRfgg+WheCUFsfE16cpEFNx5exIUmHx09zd34AaRdACCDp+TVLSlFv1blzgKR2egx5zx/see0pn+djbR4FIVofz4/UeV67G3+vr3niC+H04Oz/nbwA7lqtm+wByfQAAAAASUVORK5CYII=') no-repeat;\n\twidth: 21px;\n\theight: 21px;\n\tbackground-position: 0 -4201px;\n}\n\n.font-graph-geSprite-endblockthintrans {\n\tbackground: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAABeQCAMAAAByzXKPAAAA1VBMVEUAAAAzMzIzMzIzMzE1NTUzMzIzMzIzMzEzMzIyMjIzMzIzMzIzMzIzMzE6OjoyMjIzMzIzMzIzMzEzMzI0NDA0NDIwMDAyMjEzMzIzMzEzMzE0NDAzMzMzMzIyMjIzMzI0NDE0NDQyMjIzMzIzMzIzMzIzMzM5OTkAAAC1tbX///9mZmYwMDAQEBAmJiZTiPJ7e3v/Z2RwcHAgICB+fn5hYWFzc3NAQECoqKiampqMjIxTU1NGRkY3NzcbGxsNDQ3w8PBQUFDg4ODAwMCwsLCgoKBPT09W+xp5AAAAKHRSTlMAh4DDEd187+mljnhvVge5nmhMQi4hA8uxk2IlHOOYc102M/jW088J/2liTQAACt5JREFUeNrs3O1um0AQheG5nIPCoIq1Q7+r/Mn9X1K9xtEAM9RLQmODzyO1cV+NtzjShhjHkRkAgn9DMCaYnRXIGOQdtWmk1zRWm0vNN6az+Y+v2fXZ5iTX/kZ4ZGvUNT6/RJuCM/VVRKFB7YBwtnY1k3h2wboaHy8RFQC2VGuc1D730WWLS2GIZ27aM4yUT+9tXaLNw9m0mI9uokepRLeC+ZyCfFCoqwckqV3WBHFZaxHLFrNxVpgUVRWjg/jli2WbfH4WyxYnWcVV0Rz7FYj26X9ezQcuE3VYkXzFSYpm9eq6pqSiuNYAaj+r0GiFxKv5tEOqxVfV0utrCkZF/HCXTuOdGz2IHKbDR5wdJ6PdeRmIsfviED0C5ZV7ojf487v59fPHsT18//a1Yn1HJdoSjIUXBG5XgaBejhMYVmT9B1dRUONj4KtyRHNmNkULDYeD2CGVjiZ0paOK1jVuYKIpjJTO7m9dovvEn3bz/DH4440f2+d9fvlVh+4LLuK6cM8GVcKKkmq3ZqqBfbhaef4n+pijBudNZH3H+OW3No+rbTmVXjfciPbs/GVQ7QU6tWqUW5lonefHfn5f6xI9DAxdqQU3n55uU821mj2ZuUq0SYo2ivA5tThxk3rK6u+urYtZiqKuGiWMEkbp4/OFLITIvyrfekt35WGvjvP6OlERwP6+VU39z+ansp+0SThP8jk+0SeoAehRjObmdha0f2YwfucMss7uaPVF3rThN/EH6fH3YhEt3bD1zMlwGtu8/8a5zrHJuR6NyrkKMK5N5qqf9ev6Y4hfGfSPrc7ZWZqPQrQPa+x5Cfe8FO55m3Xrcs8T3TFUYQ0zqj5jTPoMmagQz4brFh8D3x5L9OngyRy+IEa0JgBRlaBWAIJYyVYjYDF47PwNV/TwAIRfB+BiFcyeolchija6+P7xd//IveI+JlpwnrdZP7xexdD6/4N/PDzP06NZdc8vP4H7WKFXLbqjQcU9T7QZvFhHdN/+sndmy6lCQRQ9KOA8Ro1TxjttYuUlX5BK5f+/6YJIWjlNFREkpLJXGQuWO01e2mPaU4pA17qH7iEeKfRsrrqh4/t0hJQPEJSokULPFpJse0Iu0PNQNVSNnOu8ZHPWZc8TUhkBgECRikZMrp4Xq9W1NPubkIIUm4hnrtyikSIjq+jck3bOBQkpnSBrkU97ALl73pJqXfFc5AlJqN3cXvoTEKIzJcu5PSEFqHiGp6ahz+33Z3rWtpzhEfK16DO8XXi3S2vIvfUCHnpWrcsZHiHVAFUG0KQJoEgjGjGRFG1l9bq25gyPkIoANBcEab9DEPf27iCk40VbWa0uP86WkMsTQHPQHBSnJJHCytp1dW9Uz2cBQoo0PEqVes/r2bM0131CLtLzUCVUidw9n6uuaPY8IdnUYMet2BTccUtIfShnz60mBe65JaTunL/tVqTAbbeE1ImCc3vl16McIEiWc3tCClD5DM9Ak7ZFZCBkZEVzhkfI5/n6Hbdp+wF33BJSH8rZc6vISB/gnltCas/Z225FStdz2y0hZXE19lrt5p177NyR11+OHb/THhzJP86wP2uYrjvz1h92eTseNEzDbB2nd/OY1Py9WNw6/qjnN+fmvnmwnYkxjf1t+mAW7XlsbzaJ3a7DzH1sf3Udp7m/dcOf615sW26SdfvGrCaxbV4l9nEan0X0xqEaRrbvmnlrGFu3PTN3ndUoLOuapW8ODLzudLVomMHA71z/MwmT9mTmN+bOZnS9NcJDs+V53t+WPzQnbNa9/nRoCPl2AKqObKFvltEBoPvcVwNwmavxOy3IDwFAlkWCWPBqhJDC8GtsCPlGYI8ciQyRI+3/CLHHscysXvf0ynzWIOQsPr3wWllkxNQskD+b82/Ihi8qCCm150XpObXnc2RFs+cJqRhAE5AHpI8BOZbH5TQdlXB8JAUEIC4AvkFPSMEl/dQ+v74+2/bl6enFtm/v72+W/c/eHSW3CUNRGNZyjgiZNHE6fW2b6f63VGScCHSvI7CxjfH/tYnTU43CywFiAfnT/On+lunH3274R5G2zbv03rTj9F+z92+U7pqPX52PZjdM35uf6vxs3ofp799Kulf2B8CEc2JVjvJm6OIT5CO9PekvD/8T767XgTc2z1umnEdggyT5eX2s+k9yGpvH1kqvI523IVfSAzdlW2gbu3zn5+6j/JFcfIft0lBOi4/J6cbmBTZJTdPo9fV1/3pamqTUFCalOVkunVdNTU5bSa2Nn7ULjl0A7o5/aGt6Z6TKUpVC7/VLSrWzqTo7b+yzO+9i28shHtugl5cXXS9NLnyYHVZ+Nz79UG7y4in7Aqza9po+tBsXP1B8wCW3m01yVqq9G3w3q/X+/1lpZ5WEbKdOTnNsxiYtd+ngjl28Fw+zhwGwLA0/mDeIS46AxWnO2MVnUFD627+sasuAxyJpTsp3A+6WgnplGpILpL1JR21lZt5k2ZSrFPE41AteEy+Q9qrn58qW77lNM877sXXq+fcGLp/2giETZO5tTYumHObxKDQ0aezhxb2feNE0MWlvqZS1SzwsJZdslu3x9fYae8HFXYeAKcIVejxwzgwc0YE6jTzuWOAuqOS+GTY3rc+rmDxAKn7VEPAt+amm/7Yu8ev0gfnkHckljT8nSoaf/RkeNgUejaKburGiYt696FNIcXrt/3yJh8Qba+advg0BwJCk66Qamp3WvxtX1gMzSDZya+BU8y2OR+ogyk7w5h+Nox+/6S04pNunwKqpt9Db9yemA2GokjqThGR+ms1JeYMe92hu5y2Zbs5O5be7mkru2Hlpgc5j434M1NPiq0qqgXoaDkwqTU21V0s7dgY/TfLX9XMT1udx56RJqTqf5aqlR3vVqtOWaYpbp4NtW2tmPaXbwAZI0U1zroI/tiRW9oBVOtL5QT6uu2TH0nlgnXRSqsLkGXg+JnBTCjopVeGceXk2FnAtColkUynGMn1SrHXejq3Py4U5wHXZvtluJtXO27H+vFyMB9xElFIxNQ6fUmFj9Xm6Sr67SrA6b94Gfp4HLsb2rSM53VSMpseK1c7bsXbechs4zgO3EiUvs6kK7tgsUmlglaLkZiZVStzOBzoPrJHOS1VgVR5YuTPXz1VgXR5YM/+u9xglkyZRT2WqghlbnVc8CA+4mtxRp5vB7XxW7bw3LwvywI0pr5MN6HNNrUi/fUZO4o6tzxuiuO0GuLzUUdu3GOV3M6raeTu2Nm8aR+eBlVD1BnoVjowt0HBgnY51PrqdT/9yxtJ5YHWkeGKswoxJuMcGuIYoKdowKOQ4Xxov+4Zb/khU8Mf681a3gZ/0gYt1PjGdV1J2/mBS5z/58zrbQOeBE6zpGZgA7smRzgc6D2xKlORlCiUVKrfSslMAVulI56PX+XHv81g6D6yPFM+MVWCJDliLJdfoMhVYowPWYsk1ukwF1uiAu1R/Hh5v2wNb8r+9O0pBGAaiKLqdm/1vUCiFSCdhTIjWhntAwefY5sMxRW1ToJnZ89KjQTnuGzGUWB1DLkJtul0ofocn3SOf5wMu3mu97q30GN2e99he2gKEpj6Dkvwjj4tebb5d8EBAuhuUJJ87f96f4aT/1OlNz7GRfgg+WheCUFsfE16cpEFNx5exIUmHx09zd34AaRdACCDp+TVLSlFv1blzgKR2egx5zx/see0pn+djbR4FIVofz4/UeV67G3+vr3niC+H04Oz/nbwA7lqtm+wByfQAAAAASUVORK5CYII=') no-repeat;\n\twidth: 21px;\n\theight: 21px;\n\tbackground-position: 0 -4247px;\n}\n\n.font-graph-geSprite-enderone {\n\tbackground: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAABeQCAMAAAByzXKPAAAA1VBMVEUAAAAzMzIzMzIzMzE1NTUzMzIzMzIzMzEzMzIyMjIzMzIzMzIzMzIzMzE6OjoyMjIzMzIzMzIzMzEzMzI0NDA0NDIwMDAyMjEzMzIzMzEzMzE0NDAzMzMzMzIyMjIzMzI0NDE0NDQyMjIzMzIzMzIzMzIzMzM5OTkAAAC1tbX///9mZmYwMDAQEBAmJiZTiPJ7e3v/Z2RwcHAgICB+fn5hYWFzc3NAQECoqKiampqMjIxTU1NGRkY3NzcbGxsNDQ3w8PBQUFDg4ODAwMCwsLCgoKBPT09W+xp5AAAAKHRSTlMAh4DDEd187+mljnhvVge5nmhMQi4hA8uxk2IlHOOYc102M/jW088J/2liTQAACt5JREFUeNrs3O1um0AQheG5nIPCoIq1Q7+r/Mn9X1K9xtEAM9RLQmODzyO1cV+NtzjShhjHkRkAgn9DMCaYnRXIGOQdtWmk1zRWm0vNN6az+Y+v2fXZ5iTX/kZ4ZGvUNT6/RJuCM/VVRKFB7YBwtnY1k3h2wboaHy8RFQC2VGuc1D730WWLS2GIZ27aM4yUT+9tXaLNw9m0mI9uokepRLeC+ZyCfFCoqwckqV3WBHFZaxHLFrNxVpgUVRWjg/jli2WbfH4WyxYnWcVV0Rz7FYj26X9ezQcuE3VYkXzFSYpm9eq6pqSiuNYAaj+r0GiFxKv5tEOqxVfV0utrCkZF/HCXTuOdGz2IHKbDR5wdJ6PdeRmIsfviED0C5ZV7ojf487v59fPHsT18//a1Yn1HJdoSjIUXBG5XgaBejhMYVmT9B1dRUONj4KtyRHNmNkULDYeD2CGVjiZ0paOK1jVuYKIpjJTO7m9dovvEn3bz/DH4440f2+d9fvlVh+4LLuK6cM8GVcKKkmq3ZqqBfbhaef4n+pijBudNZH3H+OW3No+rbTmVXjfciPbs/GVQ7QU6tWqUW5lonefHfn5f6xI9DAxdqQU3n55uU821mj2ZuUq0SYo2ivA5tThxk3rK6u+urYtZiqKuGiWMEkbp4/OFLITIvyrfekt35WGvjvP6OlERwP6+VU39z+ansp+0SThP8jk+0SeoAehRjObmdha0f2YwfucMss7uaPVF3rThN/EH6fH3YhEt3bD1zMlwGtu8/8a5zrHJuR6NyrkKMK5N5qqf9ev6Y4hfGfSPrc7ZWZqPQrQPa+x5Cfe8FO55m3Xrcs8T3TFUYQ0zqj5jTPoMmagQz4brFh8D3x5L9OngyRy+IEa0JgBRlaBWAIJYyVYjYDF47PwNV/TwAIRfB+BiFcyeolchija6+P7xd//IveI+JlpwnrdZP7xexdD6/4N/PDzP06NZdc8vP4H7WKFXLbqjQcU9T7QZvFhHdN/+sndmy6lCQRQ9KOA8Ro1TxjttYuUlX5BK5f+/6YJIWjlNFREkpLJXGQuWO01e2mPaU4pA17qH7iEeKfRsrrqh4/t0hJQPEJSokULPFpJse0Iu0PNQNVSNnOu8ZHPWZc8TUhkBgECRikZMrp4Xq9W1NPubkIIUm4hnrtyikSIjq+jck3bOBQkpnSBrkU97ALl73pJqXfFc5AlJqN3cXvoTEKIzJcu5PSEFqHiGp6ahz+33Z3rWtpzhEfK16DO8XXi3S2vIvfUCHnpWrcsZHiHVAFUG0KQJoEgjGjGRFG1l9bq25gyPkIoANBcEab9DEPf27iCk40VbWa0uP86WkMsTQHPQHBSnJJHCytp1dW9Uz2cBQoo0PEqVes/r2bM0131CLtLzUCVUidw9n6uuaPY8IdnUYMet2BTccUtIfShnz60mBe65JaTunL/tVqTAbbeE1ImCc3vl16McIEiWc3tCClD5DM9Ak7ZFZCBkZEVzhkfI5/n6Hbdp+wF33BJSH8rZc6vISB/gnltCas/Z225FStdz2y0hZXE19lrt5p177NyR11+OHb/THhzJP86wP2uYrjvz1h92eTseNEzDbB2nd/OY1Py9WNw6/qjnN+fmvnmwnYkxjf1t+mAW7XlsbzaJ3a7DzH1sf3Udp7m/dcOf615sW26SdfvGrCaxbV4l9nEan0X0xqEaRrbvmnlrGFu3PTN3ndUoLOuapW8ODLzudLVomMHA71z/MwmT9mTmN+bOZnS9NcJDs+V53t+WPzQnbNa9/nRoCPl2AKqObKFvltEBoPvcVwNwmavxOy3IDwFAlkWCWPBqhJDC8GtsCPlGYI8ciQyRI+3/CLHHscysXvf0ynzWIOQsPr3wWllkxNQskD+b82/Ihi8qCCm150XpObXnc2RFs+cJqRhAE5AHpI8BOZbH5TQdlXB8JAUEIC4AvkFPSMEl/dQ+v74+2/bl6enFtm/v72+W/c/eHSW3CUNRGNZyjgiZNHE6fW2b6f63VGScCHSvI7CxjfH/tYnTU43CywFiAfnT/On+lunH3274R5G2zbv03rTj9F+z92+U7pqPX52PZjdM35uf6vxs3ofp799Kulf2B8CEc2JVjvJm6OIT5CO9PekvD/8T767XgTc2z1umnEdggyT5eX2s+k9yGpvH1kqvI523IVfSAzdlW2gbu3zn5+6j/JFcfIft0lBOi4/J6cbmBTZJTdPo9fV1/3pamqTUFCalOVkunVdNTU5bSa2Nn7ULjl0A7o5/aGt6Z6TKUpVC7/VLSrWzqTo7b+yzO+9i28shHtugl5cXXS9NLnyYHVZ+Nz79UG7y4in7Aqza9po+tBsXP1B8wCW3m01yVqq9G3w3q/X+/1lpZ5WEbKdOTnNsxiYtd+ngjl28Fw+zhwGwLA0/mDeIS46AxWnO2MVnUFD627+sasuAxyJpTsp3A+6WgnplGpILpL1JR21lZt5k2ZSrFPE41AteEy+Q9qrn58qW77lNM877sXXq+fcGLp/2giETZO5tTYumHObxKDQ0aezhxb2feNE0MWlvqZS1SzwsJZdslu3x9fYae8HFXYeAKcIVejxwzgwc0YE6jTzuWOAuqOS+GTY3rc+rmDxAKn7VEPAt+amm/7Yu8ev0gfnkHckljT8nSoaf/RkeNgUejaKburGiYt696FNIcXrt/3yJh8Qba+advg0BwJCk66Qamp3WvxtX1gMzSDZya+BU8y2OR+ogyk7w5h+Nox+/6S04pNunwKqpt9Db9yemA2GokjqThGR+ms1JeYMe92hu5y2Zbs5O5be7mkru2Hlpgc5j434M1NPiq0qqgXoaDkwqTU21V0s7dgY/TfLX9XMT1udx56RJqTqf5aqlR3vVqtOWaYpbp4NtW2tmPaXbwAZI0U1zroI/tiRW9oBVOtL5QT6uu2TH0nlgnXRSqsLkGXg+JnBTCjopVeGceXk2FnAtColkUynGMn1SrHXejq3Py4U5wHXZvtluJtXO27H+vFyMB9xElFIxNQ6fUmFj9Xm6Sr67SrA6b94Gfp4HLsb2rSM53VSMpseK1c7bsXbechs4zgO3EiUvs6kK7tgsUmlglaLkZiZVStzOBzoPrJHOS1VgVR5YuTPXz1VgXR5YM/+u9xglkyZRT2WqghlbnVc8CA+4mtxRp5vB7XxW7bw3LwvywI0pr5MN6HNNrUi/fUZO4o6tzxuiuO0GuLzUUdu3GOV3M6raeTu2Nm8aR+eBlVD1BnoVjowt0HBgnY51PrqdT/9yxtJ5YHWkeGKswoxJuMcGuIYoKdowKOQ4Xxov+4Zb/khU8Mf681a3gZ/0gYt1PjGdV1J2/mBS5z/58zrbQOeBE6zpGZgA7smRzgc6D2xKlORlCiUVKrfSslMAVulI56PX+XHv81g6D6yPFM+MVWCJDliLJdfoMhVYowPWYsk1ukwF1uiAu1R/Hh5v2wNb8r+9O0pBGAaiKLqdm/1vUCiFSCdhTIjWhntAwefY5sMxRW1ToJnZ89KjQTnuGzGUWB1DLkJtul0ofocn3SOf5wMu3mu97q30GN2e99he2gKEpj6Dkvwjj4tebb5d8EBAuhuUJJ87f96f4aT/1OlNz7GRfgg+WheCUFsfE16cpEFNx5exIUmHx09zd34AaRdACCDp+TVLSlFv1blzgKR2egx5zx/see0pn+djbR4FIVofz4/UeV67G3+vr3niC+H04Oz/nbwA7lqtm+wByfQAAAAASUVORK5CYII=') no-repeat;\n\twidth: 21px;\n\theight: 21px;\n\tbackground-position: 0 -4293px;\n}\n\n.font-graph-geSprite-enderonetoone {\n\tbackground: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAABeQCAMAAAByzXKPAAAA1VBMVEUAAAAzMzIzMzIzMzE1NTUzMzIzMzIzMzEzMzIyMjIzMzIzMzIzMzIzMzE6OjoyMjIzMzIzMzIzMzEzMzI0NDA0NDIwMDAyMjEzMzIzMzEzMzE0NDAzMzMzMzIyMjIzMzI0NDE0NDQyMjIzMzIzMzIzMzIzMzM5OTkAAAC1tbX///9mZmYwMDAQEBAmJiZTiPJ7e3v/Z2RwcHAgICB+fn5hYWFzc3NAQECoqKiampqMjIxTU1NGRkY3NzcbGxsNDQ3w8PBQUFDg4ODAwMCwsLCgoKBPT09W+xp5AAAAKHRSTlMAh4DDEd187+mljnhvVge5nmhMQi4hA8uxk2IlHOOYc102M/jW088J/2liTQAACt5JREFUeNrs3O1um0AQheG5nIPCoIq1Q7+r/Mn9X1K9xtEAM9RLQmODzyO1cV+NtzjShhjHkRkAgn9DMCaYnRXIGOQdtWmk1zRWm0vNN6az+Y+v2fXZ5iTX/kZ4ZGvUNT6/RJuCM/VVRKFB7YBwtnY1k3h2wboaHy8RFQC2VGuc1D730WWLS2GIZ27aM4yUT+9tXaLNw9m0mI9uokepRLeC+ZyCfFCoqwckqV3WBHFZaxHLFrNxVpgUVRWjg/jli2WbfH4WyxYnWcVV0Rz7FYj26X9ezQcuE3VYkXzFSYpm9eq6pqSiuNYAaj+r0GiFxKv5tEOqxVfV0utrCkZF/HCXTuOdGz2IHKbDR5wdJ6PdeRmIsfviED0C5ZV7ojf487v59fPHsT18//a1Yn1HJdoSjIUXBG5XgaBejhMYVmT9B1dRUONj4KtyRHNmNkULDYeD2CGVjiZ0paOK1jVuYKIpjJTO7m9dovvEn3bz/DH4440f2+d9fvlVh+4LLuK6cM8GVcKKkmq3ZqqBfbhaef4n+pijBudNZH3H+OW3No+rbTmVXjfciPbs/GVQ7QU6tWqUW5lonefHfn5f6xI9DAxdqQU3n55uU821mj2ZuUq0SYo2ivA5tThxk3rK6u+urYtZiqKuGiWMEkbp4/OFLITIvyrfekt35WGvjvP6OlERwP6+VU39z+ansp+0SThP8jk+0SeoAehRjObmdha0f2YwfucMss7uaPVF3rThN/EH6fH3YhEt3bD1zMlwGtu8/8a5zrHJuR6NyrkKMK5N5qqf9ev6Y4hfGfSPrc7ZWZqPQrQPa+x5Cfe8FO55m3Xrcs8T3TFUYQ0zqj5jTPoMmagQz4brFh8D3x5L9OngyRy+IEa0JgBRlaBWAIJYyVYjYDF47PwNV/TwAIRfB+BiFcyeolchija6+P7xd//IveI+JlpwnrdZP7xexdD6/4N/PDzP06NZdc8vP4H7WKFXLbqjQcU9T7QZvFhHdN/+sndmy6lCQRQ9KOA8Ro1TxjttYuUlX5BK5f+/6YJIWjlNFREkpLJXGQuWO01e2mPaU4pA17qH7iEeKfRsrrqh4/t0hJQPEJSokULPFpJse0Iu0PNQNVSNnOu8ZHPWZc8TUhkBgECRikZMrp4Xq9W1NPubkIIUm4hnrtyikSIjq+jck3bOBQkpnSBrkU97ALl73pJqXfFc5AlJqN3cXvoTEKIzJcu5PSEFqHiGp6ahz+33Z3rWtpzhEfK16DO8XXi3S2vIvfUCHnpWrcsZHiHVAFUG0KQJoEgjGjGRFG1l9bq25gyPkIoANBcEab9DEPf27iCk40VbWa0uP86WkMsTQHPQHBSnJJHCytp1dW9Uz2cBQoo0PEqVes/r2bM0131CLtLzUCVUidw9n6uuaPY8IdnUYMet2BTccUtIfShnz60mBe65JaTunL/tVqTAbbeE1ImCc3vl16McIEiWc3tCClD5DM9Ak7ZFZCBkZEVzhkfI5/n6Hbdp+wF33BJSH8rZc6vISB/gnltCas/Z225FStdz2y0hZXE19lrt5p177NyR11+OHb/THhzJP86wP2uYrjvz1h92eTseNEzDbB2nd/OY1Py9WNw6/qjnN+fmvnmwnYkxjf1t+mAW7XlsbzaJ3a7DzH1sf3Udp7m/dcOf615sW26SdfvGrCaxbV4l9nEan0X0xqEaRrbvmnlrGFu3PTN3ndUoLOuapW8ODLzudLVomMHA71z/MwmT9mTmN+bOZnS9NcJDs+V53t+WPzQnbNa9/nRoCPl2AKqObKFvltEBoPvcVwNwmavxOy3IDwFAlkWCWPBqhJDC8GtsCPlGYI8ciQyRI+3/CLHHscysXvf0ynzWIOQsPr3wWllkxNQskD+b82/Ihi8qCCm150XpObXnc2RFs+cJqRhAE5AHpI8BOZbH5TQdlXB8JAUEIC4AvkFPSMEl/dQ+v74+2/bl6enFtm/v72+W/c/eHSW3CUNRGNZyjgiZNHE6fW2b6f63VGScCHSvI7CxjfH/tYnTU43CywFiAfnT/On+lunH3274R5G2zbv03rTj9F+z92+U7pqPX52PZjdM35uf6vxs3ofp799Kulf2B8CEc2JVjvJm6OIT5CO9PekvD/8T767XgTc2z1umnEdggyT5eX2s+k9yGpvH1kqvI523IVfSAzdlW2gbu3zn5+6j/JFcfIft0lBOi4/J6cbmBTZJTdPo9fV1/3pamqTUFCalOVkunVdNTU5bSa2Nn7ULjl0A7o5/aGt6Z6TKUpVC7/VLSrWzqTo7b+yzO+9i28shHtugl5cXXS9NLnyYHVZ+Nz79UG7y4in7Aqza9po+tBsXP1B8wCW3m01yVqq9G3w3q/X+/1lpZ5WEbKdOTnNsxiYtd+ngjl28Fw+zhwGwLA0/mDeIS46AxWnO2MVnUFD627+sasuAxyJpTsp3A+6WgnplGpILpL1JR21lZt5k2ZSrFPE41AteEy+Q9qrn58qW77lNM877sXXq+fcGLp/2giETZO5tTYumHObxKDQ0aezhxb2feNE0MWlvqZS1SzwsJZdslu3x9fYae8HFXYeAKcIVejxwzgwc0YE6jTzuWOAuqOS+GTY3rc+rmDxAKn7VEPAt+amm/7Yu8ev0gfnkHckljT8nSoaf/RkeNgUejaKburGiYt696FNIcXrt/3yJh8Qba+advg0BwJCk66Qamp3WvxtX1gMzSDZya+BU8y2OR+ogyk7w5h+Nox+/6S04pNunwKqpt9Db9yemA2GokjqThGR+ms1JeYMe92hu5y2Zbs5O5be7mkru2Hlpgc5j434M1NPiq0qqgXoaDkwqTU21V0s7dgY/TfLX9XMT1udx56RJqTqf5aqlR3vVqtOWaYpbp4NtW2tmPaXbwAZI0U1zroI/tiRW9oBVOtL5QT6uu2TH0nlgnXRSqsLkGXg+JnBTCjopVeGceXk2FnAtColkUynGMn1SrHXejq3Py4U5wHXZvtluJtXO27H+vFyMB9xElFIxNQ6fUmFj9Xm6Sr67SrA6b94Gfp4HLsb2rSM53VSMpseK1c7bsXbechs4zgO3EiUvs6kK7tgsUmlglaLkZiZVStzOBzoPrJHOS1VgVR5YuTPXz1VgXR5YM/+u9xglkyZRT2WqghlbnVc8CA+4mtxRp5vB7XxW7bw3LwvywI0pr5MN6HNNrUi/fUZO4o6tzxuiuO0GuLzUUdu3GOV3M6raeTu2Nm8aR+eBlVD1BnoVjowt0HBgnY51PrqdT/9yxtJ5YHWkeGKswoxJuMcGuIYoKdowKOQ4Xxov+4Zb/khU8Mf681a3gZ/0gYt1PjGdV1J2/mBS5z/58zrbQOeBE6zpGZgA7smRzgc6D2xKlORlCiUVKrfSslMAVulI56PX+XHv81g6D6yPFM+MVWCJDliLJdfoMhVYowPWYsk1ukwF1uiAu1R/Hh5v2wNb8r+9O0pBGAaiKLqdm/1vUCiFSCdhTIjWhntAwefY5sMxRW1ToJnZ89KjQTnuGzGUWB1DLkJtul0ofocn3SOf5wMu3mu97q30GN2e99he2gKEpj6Dkvwjj4tebb5d8EBAuhuUJJ87f96f4aT/1OlNz7GRfgg+WheCUFsfE16cpEFNx5exIUmHx09zd34AaRdACCDp+TVLSlFv1blzgKR2egx5zx/see0pn+djbR4FIVofz4/UeV67G3+vr3niC+H04Oz/nbwA7lqtm+wByfQAAAAASUVORK5CYII=') no-repeat;\n\twidth: 21px;\n\theight: 21px;\n\tbackground-position: 0 -4339px;\n}\n\n.font-graph-geSprite-enderonetomany {\n\tbackground: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAABeQCAMAAAByzXKPAAAA1VBMVEUAAAAzMzIzMzIzMzE1NTUzMzIzMzIzMzEzMzIyMjIzMzIzMzIzMzIzMzE6OjoyMjIzMzIzMzIzMzEzMzI0NDA0NDIwMDAyMjEzMzIzMzEzMzE0NDAzMzMzMzIyMjIzMzI0NDE0NDQyMjIzMzIzMzIzMzIzMzM5OTkAAAC1tbX///9mZmYwMDAQEBAmJiZTiPJ7e3v/Z2RwcHAgICB+fn5hYWFzc3NAQECoqKiampqMjIxTU1NGRkY3NzcbGxsNDQ3w8PBQUFDg4ODAwMCwsLCgoKBPT09W+xp5AAAAKHRSTlMAh4DDEd187+mljnhvVge5nmhMQi4hA8uxk2IlHOOYc102M/jW088J/2liTQAACt5JREFUeNrs3O1um0AQheG5nIPCoIq1Q7+r/Mn9X1K9xtEAM9RLQmODzyO1cV+NtzjShhjHkRkAgn9DMCaYnRXIGOQdtWmk1zRWm0vNN6az+Y+v2fXZ5iTX/kZ4ZGvUNT6/RJuCM/VVRKFB7YBwtnY1k3h2wboaHy8RFQC2VGuc1D730WWLS2GIZ27aM4yUT+9tXaLNw9m0mI9uokepRLeC+ZyCfFCoqwckqV3WBHFZaxHLFrNxVpgUVRWjg/jli2WbfH4WyxYnWcVV0Rz7FYj26X9ezQcuE3VYkXzFSYpm9eq6pqSiuNYAaj+r0GiFxKv5tEOqxVfV0utrCkZF/HCXTuOdGz2IHKbDR5wdJ6PdeRmIsfviED0C5ZV7ojf487v59fPHsT18//a1Yn1HJdoSjIUXBG5XgaBejhMYVmT9B1dRUONj4KtyRHNmNkULDYeD2CGVjiZ0paOK1jVuYKIpjJTO7m9dovvEn3bz/DH4440f2+d9fvlVh+4LLuK6cM8GVcKKkmq3ZqqBfbhaef4n+pijBudNZH3H+OW3No+rbTmVXjfciPbs/GVQ7QU6tWqUW5lonefHfn5f6xI9DAxdqQU3n55uU821mj2ZuUq0SYo2ivA5tThxk3rK6u+urYtZiqKuGiWMEkbp4/OFLITIvyrfekt35WGvjvP6OlERwP6+VU39z+ansp+0SThP8jk+0SeoAehRjObmdha0f2YwfucMss7uaPVF3rThN/EH6fH3YhEt3bD1zMlwGtu8/8a5zrHJuR6NyrkKMK5N5qqf9ev6Y4hfGfSPrc7ZWZqPQrQPa+x5Cfe8FO55m3Xrcs8T3TFUYQ0zqj5jTPoMmagQz4brFh8D3x5L9OngyRy+IEa0JgBRlaBWAIJYyVYjYDF47PwNV/TwAIRfB+BiFcyeolchija6+P7xd//IveI+JlpwnrdZP7xexdD6/4N/PDzP06NZdc8vP4H7WKFXLbqjQcU9T7QZvFhHdN/+sndmy6lCQRQ9KOA8Ro1TxjttYuUlX5BK5f+/6YJIWjlNFREkpLJXGQuWO01e2mPaU4pA17qH7iEeKfRsrrqh4/t0hJQPEJSokULPFpJse0Iu0PNQNVSNnOu8ZHPWZc8TUhkBgECRikZMrp4Xq9W1NPubkIIUm4hnrtyikSIjq+jck3bOBQkpnSBrkU97ALl73pJqXfFc5AlJqN3cXvoTEKIzJcu5PSEFqHiGp6ahz+33Z3rWtpzhEfK16DO8XXi3S2vIvfUCHnpWrcsZHiHVAFUG0KQJoEgjGjGRFG1l9bq25gyPkIoANBcEab9DEPf27iCk40VbWa0uP86WkMsTQHPQHBSnJJHCytp1dW9Uz2cBQoo0PEqVes/r2bM0131CLtLzUCVUidw9n6uuaPY8IdnUYMet2BTccUtIfShnz60mBe65JaTunL/tVqTAbbeE1ImCc3vl16McIEiWc3tCClD5DM9Ak7ZFZCBkZEVzhkfI5/n6Hbdp+wF33BJSH8rZc6vISB/gnltCas/Z225FStdz2y0hZXE19lrt5p177NyR11+OHb/THhzJP86wP2uYrjvz1h92eTseNEzDbB2nd/OY1Py9WNw6/qjnN+fmvnmwnYkxjf1t+mAW7XlsbzaJ3a7DzH1sf3Udp7m/dcOf615sW26SdfvGrCaxbV4l9nEan0X0xqEaRrbvmnlrGFu3PTN3ndUoLOuapW8ODLzudLVomMHA71z/MwmT9mTmN+bOZnS9NcJDs+V53t+WPzQnbNa9/nRoCPl2AKqObKFvltEBoPvcVwNwmavxOy3IDwFAlkWCWPBqhJDC8GtsCPlGYI8ciQyRI+3/CLHHscysXvf0ynzWIOQsPr3wWllkxNQskD+b82/Ihi8qCCm150XpObXnc2RFs+cJqRhAE5AHpI8BOZbH5TQdlXB8JAUEIC4AvkFPSMEl/dQ+v74+2/bl6enFtm/v72+W/c/eHSW3CUNRGNZyjgiZNHE6fW2b6f63VGScCHSvI7CxjfH/tYnTU43CywFiAfnT/On+lunH3274R5G2zbv03rTj9F+z92+U7pqPX52PZjdM35uf6vxs3ofp799Kulf2B8CEc2JVjvJm6OIT5CO9PekvD/8T767XgTc2z1umnEdggyT5eX2s+k9yGpvH1kqvI523IVfSAzdlW2gbu3zn5+6j/JFcfIft0lBOi4/J6cbmBTZJTdPo9fV1/3pamqTUFCalOVkunVdNTU5bSa2Nn7ULjl0A7o5/aGt6Z6TKUpVC7/VLSrWzqTo7b+yzO+9i28shHtugl5cXXS9NLnyYHVZ+Nz79UG7y4in7Aqza9po+tBsXP1B8wCW3m01yVqq9G3w3q/X+/1lpZ5WEbKdOTnNsxiYtd+ngjl28Fw+zhwGwLA0/mDeIS46AxWnO2MVnUFD627+sasuAxyJpTsp3A+6WgnplGpILpL1JR21lZt5k2ZSrFPE41AteEy+Q9qrn58qW77lNM877sXXq+fcGLp/2giETZO5tTYumHObxKDQ0aezhxb2feNE0MWlvqZS1SzwsJZdslu3x9fYae8HFXYeAKcIVejxwzgwc0YE6jTzuWOAuqOS+GTY3rc+rmDxAKn7VEPAt+amm/7Yu8ev0gfnkHckljT8nSoaf/RkeNgUejaKburGiYt696FNIcXrt/3yJh8Qba+advg0BwJCk66Qamp3WvxtX1gMzSDZya+BU8y2OR+ogyk7w5h+Nox+/6S04pNunwKqpt9Db9yemA2GokjqThGR+ms1JeYMe92hu5y2Zbs5O5be7mkru2Hlpgc5j434M1NPiq0qqgXoaDkwqTU21V0s7dgY/TfLX9XMT1udx56RJqTqf5aqlR3vVqtOWaYpbp4NtW2tmPaXbwAZI0U1zroI/tiRW9oBVOtL5QT6uu2TH0nlgnXRSqsLkGXg+JnBTCjopVeGceXk2FnAtColkUynGMn1SrHXejq3Py4U5wHXZvtluJtXO27H+vFyMB9xElFIxNQ6fUmFj9Xm6Sr67SrA6b94Gfp4HLsb2rSM53VSMpseK1c7bsXbechs4zgO3EiUvs6kK7tgsUmlglaLkZiZVStzOBzoPrJHOS1VgVR5YuTPXz1VgXR5YM/+u9xglkyZRT2WqghlbnVc8CA+4mtxRp5vB7XxW7bw3LwvywI0pr5MN6HNNrUi/fUZO4o6tzxuiuO0GuLzUUdu3GOV3M6raeTu2Nm8aR+eBlVD1BnoVjowt0HBgnY51PrqdT/9yxtJ5YHWkeGKswoxJuMcGuIYoKdowKOQ4Xxov+4Zb/khU8Mf681a3gZ/0gYt1PjGdV1J2/mBS5z/58zrbQOeBE6zpGZgA7smRzgc6D2xKlORlCiUVKrfSslMAVulI56PX+XHv81g6D6yPFM+MVWCJDliLJdfoMhVYowPWYsk1ukwF1uiAu1R/Hh5v2wNb8r+9O0pBGAaiKLqdm/1vUCiFSCdhTIjWhntAwefY5sMxRW1ToJnZ89KjQTnuGzGUWB1DLkJtul0ofocn3SOf5wMu3mu97q30GN2e99he2gKEpj6Dkvwjj4tebb5d8EBAuhuUJJ87f96f4aT/1OlNz7GRfgg+WheCUFsfE16cpEFNx5exIUmHx09zd34AaRdACCDp+TVLSlFv1blzgKR2egx5zx/see0pn+djbR4FIVofz4/UeV67G3+vr3niC+H04Oz/nbwA7lqtm+wByfQAAAAASUVORK5CYII=') no-repeat;\n\twidth: 21px;\n\theight: 21px;\n\tbackground-position: 0 -4385px;\n}\n\n.font-graph-geSprite-endermany {\n\tbackground: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAABeQCAMAAAByzXKPAAAA1VBMVEUAAAAzMzIzMzIzMzE1NTUzMzIzMzIzMzEzMzIyMjIzMzIzMzIzMzIzMzE6OjoyMjIzMzIzMzIzMzEzMzI0NDA0NDIwMDAyMjEzMzIzMzEzMzE0NDAzMzMzMzIyMjIzMzI0NDE0NDQyMjIzMzIzMzIzMzIzMzM5OTkAAAC1tbX///9mZmYwMDAQEBAmJiZTiPJ7e3v/Z2RwcHAgICB+fn5hYWFzc3NAQECoqKiampqMjIxTU1NGRkY3NzcbGxsNDQ3w8PBQUFDg4ODAwMCwsLCgoKBPT09W+xp5AAAAKHRSTlMAh4DDEd187+mljnhvVge5nmhMQi4hA8uxk2IlHOOYc102M/jW088J/2liTQAACt5JREFUeNrs3O1um0AQheG5nIPCoIq1Q7+r/Mn9X1K9xtEAM9RLQmODzyO1cV+NtzjShhjHkRkAgn9DMCaYnRXIGOQdtWmk1zRWm0vNN6az+Y+v2fXZ5iTX/kZ4ZGvUNT6/RJuCM/VVRKFB7YBwtnY1k3h2wboaHy8RFQC2VGuc1D730WWLS2GIZ27aM4yUT+9tXaLNw9m0mI9uokepRLeC+ZyCfFCoqwckqV3WBHFZaxHLFrNxVpgUVRWjg/jli2WbfH4WyxYnWcVV0Rz7FYj26X9ezQcuE3VYkXzFSYpm9eq6pqSiuNYAaj+r0GiFxKv5tEOqxVfV0utrCkZF/HCXTuOdGz2IHKbDR5wdJ6PdeRmIsfviED0C5ZV7ojf487v59fPHsT18//a1Yn1HJdoSjIUXBG5XgaBejhMYVmT9B1dRUONj4KtyRHNmNkULDYeD2CGVjiZ0paOK1jVuYKIpjJTO7m9dovvEn3bz/DH4440f2+d9fvlVh+4LLuK6cM8GVcKKkmq3ZqqBfbhaef4n+pijBudNZH3H+OW3No+rbTmVXjfciPbs/GVQ7QU6tWqUW5lonefHfn5f6xI9DAxdqQU3n55uU821mj2ZuUq0SYo2ivA5tThxk3rK6u+urYtZiqKuGiWMEkbp4/OFLITIvyrfekt35WGvjvP6OlERwP6+VU39z+ansp+0SThP8jk+0SeoAehRjObmdha0f2YwfucMss7uaPVF3rThN/EH6fH3YhEt3bD1zMlwGtu8/8a5zrHJuR6NyrkKMK5N5qqf9ev6Y4hfGfSPrc7ZWZqPQrQPa+x5Cfe8FO55m3Xrcs8T3TFUYQ0zqj5jTPoMmagQz4brFh8D3x5L9OngyRy+IEa0JgBRlaBWAIJYyVYjYDF47PwNV/TwAIRfB+BiFcyeolchija6+P7xd//IveI+JlpwnrdZP7xexdD6/4N/PDzP06NZdc8vP4H7WKFXLbqjQcU9T7QZvFhHdN/+sndmy6lCQRQ9KOA8Ro1TxjttYuUlX5BK5f+/6YJIWjlNFREkpLJXGQuWO01e2mPaU4pA17qH7iEeKfRsrrqh4/t0hJQPEJSokULPFpJse0Iu0PNQNVSNnOu8ZHPWZc8TUhkBgECRikZMrp4Xq9W1NPubkIIUm4hnrtyikSIjq+jck3bOBQkpnSBrkU97ALl73pJqXfFc5AlJqN3cXvoTEKIzJcu5PSEFqHiGp6ahz+33Z3rWtpzhEfK16DO8XXi3S2vIvfUCHnpWrcsZHiHVAFUG0KQJoEgjGjGRFG1l9bq25gyPkIoANBcEab9DEPf27iCk40VbWa0uP86WkMsTQHPQHBSnJJHCytp1dW9Uz2cBQoo0PEqVes/r2bM0131CLtLzUCVUidw9n6uuaPY8IdnUYMet2BTccUtIfShnz60mBe65JaTunL/tVqTAbbeE1ImCc3vl16McIEiWc3tCClD5DM9Ak7ZFZCBkZEVzhkfI5/n6Hbdp+wF33BJSH8rZc6vISB/gnltCas/Z225FStdz2y0hZXE19lrt5p177NyR11+OHb/THhzJP86wP2uYrjvz1h92eTseNEzDbB2nd/OY1Py9WNw6/qjnN+fmvnmwnYkxjf1t+mAW7XlsbzaJ3a7DzH1sf3Udp7m/dcOf615sW26SdfvGrCaxbV4l9nEan0X0xqEaRrbvmnlrGFu3PTN3ndUoLOuapW8ODLzudLVomMHA71z/MwmT9mTmN+bOZnS9NcJDs+V53t+WPzQnbNa9/nRoCPl2AKqObKFvltEBoPvcVwNwmavxOy3IDwFAlkWCWPBqhJDC8GtsCPlGYI8ciQyRI+3/CLHHscysXvf0ynzWIOQsPr3wWllkxNQskD+b82/Ihi8qCCm150XpObXnc2RFs+cJqRhAE5AHpI8BOZbH5TQdlXB8JAUEIC4AvkFPSMEl/dQ+v74+2/bl6enFtm/v72+W/c/eHSW3CUNRGNZyjgiZNHE6fW2b6f63VGScCHSvI7CxjfH/tYnTU43CywFiAfnT/On+lunH3274R5G2zbv03rTj9F+z92+U7pqPX52PZjdM35uf6vxs3ofp799Kulf2B8CEc2JVjvJm6OIT5CO9PekvD/8T767XgTc2z1umnEdggyT5eX2s+k9yGpvH1kqvI523IVfSAzdlW2gbu3zn5+6j/JFcfIft0lBOi4/J6cbmBTZJTdPo9fV1/3pamqTUFCalOVkunVdNTU5bSa2Nn7ULjl0A7o5/aGt6Z6TKUpVC7/VLSrWzqTo7b+yzO+9i28shHtugl5cXXS9NLnyYHVZ+Nz79UG7y4in7Aqza9po+tBsXP1B8wCW3m01yVqq9G3w3q/X+/1lpZ5WEbKdOTnNsxiYtd+ngjl28Fw+zhwGwLA0/mDeIS46AxWnO2MVnUFD627+sasuAxyJpTsp3A+6WgnplGpILpL1JR21lZt5k2ZSrFPE41AteEy+Q9qrn58qW77lNM877sXXq+fcGLp/2giETZO5tTYumHObxKDQ0aezhxb2feNE0MWlvqZS1SzwsJZdslu3x9fYae8HFXYeAKcIVejxwzgwc0YE6jTzuWOAuqOS+GTY3rc+rmDxAKn7VEPAt+amm/7Yu8ev0gfnkHckljT8nSoaf/RkeNgUejaKburGiYt696FNIcXrt/3yJh8Qba+advg0BwJCk66Qamp3WvxtX1gMzSDZya+BU8y2OR+ogyk7w5h+Nox+/6S04pNunwKqpt9Db9yemA2GokjqThGR+ms1JeYMe92hu5y2Zbs5O5be7mkru2Hlpgc5j434M1NPiq0qqgXoaDkwqTU21V0s7dgY/TfLX9XMT1udx56RJqTqf5aqlR3vVqtOWaYpbp4NtW2tmPaXbwAZI0U1zroI/tiRW9oBVOtL5QT6uu2TH0nlgnXRSqsLkGXg+JnBTCjopVeGceXk2FnAtColkUynGMn1SrHXejq3Py4U5wHXZvtluJtXO27H+vFyMB9xElFIxNQ6fUmFj9Xm6Sr67SrA6b94Gfp4HLsb2rSM53VSMpseK1c7bsXbechs4zgO3EiUvs6kK7tgsUmlglaLkZiZVStzOBzoPrJHOS1VgVR5YuTPXz1VgXR5YM/+u9xglkyZRT2WqghlbnVc8CA+4mtxRp5vB7XxW7bw3LwvywI0pr5MN6HNNrUi/fUZO4o6tzxuiuO0GuLzUUdu3GOV3M6raeTu2Nm8aR+eBlVD1BnoVjowt0HBgnY51PrqdT/9yxtJ5YHWkeGKswoxJuMcGuIYoKdowKOQ4Xxov+4Zb/khU8Mf681a3gZ/0gYt1PjGdV1J2/mBS5z/58zrbQOeBE6zpGZgA7smRzgc6D2xKlORlCiUVKrfSslMAVulI56PX+XHv81g6D6yPFM+MVWCJDliLJdfoMhVYowPWYsk1ukwF1uiAu1R/Hh5v2wNb8r+9O0pBGAaiKLqdm/1vUCiFSCdhTIjWhntAwefY5sMxRW1ToJnZ89KjQTnuGzGUWB1DLkJtul0ofocn3SOf5wMu3mu97q30GN2e99he2gKEpj6Dkvwjj4tebb5d8EBAuhuUJJ87f96f4aT/1OlNz7GRfgg+WheCUFsfE16cpEFNx5exIUmHx09zd34AaRdACCDp+TVLSlFv1blzgKR2egx5zx/see0pn+djbR4FIVofz4/UeV67G3+vr3niC+H04Oz/nbwA7lqtm+wByfQAAAAASUVORK5CYII=') no-repeat;\n\twidth: 21px;\n\theight: 21px;\n\tbackground-position: 0 -4431px;\n}\n\n.font-graph-geSprite-enderoneopt {\n\tbackground: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAABeQCAMAAAByzXKPAAAA1VBMVEUAAAAzMzIzMzIzMzE1NTUzMzIzMzIzMzEzMzIyMjIzMzIzMzIzMzIzMzE6OjoyMjIzMzIzMzIzMzEzMzI0NDA0NDIwMDAyMjEzMzIzMzEzMzE0NDAzMzMzMzIyMjIzMzI0NDE0NDQyMjIzMzIzMzIzMzIzMzM5OTkAAAC1tbX///9mZmYwMDAQEBAmJiZTiPJ7e3v/Z2RwcHAgICB+fn5hYWFzc3NAQECoqKiampqMjIxTU1NGRkY3NzcbGxsNDQ3w8PBQUFDg4ODAwMCwsLCgoKBPT09W+xp5AAAAKHRSTlMAh4DDEd187+mljnhvVge5nmhMQi4hA8uxk2IlHOOYc102M/jW088J/2liTQAACt5JREFUeNrs3O1um0AQheG5nIPCoIq1Q7+r/Mn9X1K9xtEAM9RLQmODzyO1cV+NtzjShhjHkRkAgn9DMCaYnRXIGOQdtWmk1zRWm0vNN6az+Y+v2fXZ5iTX/kZ4ZGvUNT6/RJuCM/VVRKFB7YBwtnY1k3h2wboaHy8RFQC2VGuc1D730WWLS2GIZ27aM4yUT+9tXaLNw9m0mI9uokepRLeC+ZyCfFCoqwckqV3WBHFZaxHLFrNxVpgUVRWjg/jli2WbfH4WyxYnWcVV0Rz7FYj26X9ezQcuE3VYkXzFSYpm9eq6pqSiuNYAaj+r0GiFxKv5tEOqxVfV0utrCkZF/HCXTuOdGz2IHKbDR5wdJ6PdeRmIsfviED0C5ZV7ojf487v59fPHsT18//a1Yn1HJdoSjIUXBG5XgaBejhMYVmT9B1dRUONj4KtyRHNmNkULDYeD2CGVjiZ0paOK1jVuYKIpjJTO7m9dovvEn3bz/DH4440f2+d9fvlVh+4LLuK6cM8GVcKKkmq3ZqqBfbhaef4n+pijBudNZH3H+OW3No+rbTmVXjfciPbs/GVQ7QU6tWqUW5lonefHfn5f6xI9DAxdqQU3n55uU821mj2ZuUq0SYo2ivA5tThxk3rK6u+urYtZiqKuGiWMEkbp4/OFLITIvyrfekt35WGvjvP6OlERwP6+VU39z+ansp+0SThP8jk+0SeoAehRjObmdha0f2YwfucMss7uaPVF3rThN/EH6fH3YhEt3bD1zMlwGtu8/8a5zrHJuR6NyrkKMK5N5qqf9ev6Y4hfGfSPrc7ZWZqPQrQPa+x5Cfe8FO55m3Xrcs8T3TFUYQ0zqj5jTPoMmagQz4brFh8D3x5L9OngyRy+IEa0JgBRlaBWAIJYyVYjYDF47PwNV/TwAIRfB+BiFcyeolchija6+P7xd//IveI+JlpwnrdZP7xexdD6/4N/PDzP06NZdc8vP4H7WKFXLbqjQcU9T7QZvFhHdN/+sndmy6lCQRQ9KOA8Ro1TxjttYuUlX5BK5f+/6YJIWjlNFREkpLJXGQuWO01e2mPaU4pA17qH7iEeKfRsrrqh4/t0hJQPEJSokULPFpJse0Iu0PNQNVSNnOu8ZHPWZc8TUhkBgECRikZMrp4Xq9W1NPubkIIUm4hnrtyikSIjq+jck3bOBQkpnSBrkU97ALl73pJqXfFc5AlJqN3cXvoTEKIzJcu5PSEFqHiGp6ahz+33Z3rWtpzhEfK16DO8XXi3S2vIvfUCHnpWrcsZHiHVAFUG0KQJoEgjGjGRFG1l9bq25gyPkIoANBcEab9DEPf27iCk40VbWa0uP86WkMsTQHPQHBSnJJHCytp1dW9Uz2cBQoo0PEqVes/r2bM0131CLtLzUCVUidw9n6uuaPY8IdnUYMet2BTccUtIfShnz60mBe65JaTunL/tVqTAbbeE1ImCc3vl16McIEiWc3tCClD5DM9Ak7ZFZCBkZEVzhkfI5/n6Hbdp+wF33BJSH8rZc6vISB/gnltCas/Z225FStdz2y0hZXE19lrt5p177NyR11+OHb/THhzJP86wP2uYrjvz1h92eTseNEzDbB2nd/OY1Py9WNw6/qjnN+fmvnmwnYkxjf1t+mAW7XlsbzaJ3a7DzH1sf3Udp7m/dcOf615sW26SdfvGrCaxbV4l9nEan0X0xqEaRrbvmnlrGFu3PTN3ndUoLOuapW8ODLzudLVomMHA71z/MwmT9mTmN+bOZnS9NcJDs+V53t+WPzQnbNa9/nRoCPl2AKqObKFvltEBoPvcVwNwmavxOy3IDwFAlkWCWPBqhJDC8GtsCPlGYI8ciQyRI+3/CLHHscysXvf0ynzWIOQsPr3wWllkxNQskD+b82/Ihi8qCCm150XpObXnc2RFs+cJqRhAE5AHpI8BOZbH5TQdlXB8JAUEIC4AvkFPSMEl/dQ+v74+2/bl6enFtm/v72+W/c/eHSW3CUNRGNZyjgiZNHE6fW2b6f63VGScCHSvI7CxjfH/tYnTU43CywFiAfnT/On+lunH3274R5G2zbv03rTj9F+z92+U7pqPX52PZjdM35uf6vxs3ofp799Kulf2B8CEc2JVjvJm6OIT5CO9PekvD/8T767XgTc2z1umnEdggyT5eX2s+k9yGpvH1kqvI523IVfSAzdlW2gbu3zn5+6j/JFcfIft0lBOi4/J6cbmBTZJTdPo9fV1/3pamqTUFCalOVkunVdNTU5bSa2Nn7ULjl0A7o5/aGt6Z6TKUpVC7/VLSrWzqTo7b+yzO+9i28shHtugl5cXXS9NLnyYHVZ+Nz79UG7y4in7Aqza9po+tBsXP1B8wCW3m01yVqq9G3w3q/X+/1lpZ5WEbKdOTnNsxiYtd+ngjl28Fw+zhwGwLA0/mDeIS46AxWnO2MVnUFD627+sasuAxyJpTsp3A+6WgnplGpILpL1JR21lZt5k2ZSrFPE41AteEy+Q9qrn58qW77lNM877sXXq+fcGLp/2giETZO5tTYumHObxKDQ0aezhxb2feNE0MWlvqZS1SzwsJZdslu3x9fYae8HFXYeAKcIVejxwzgwc0YE6jTzuWOAuqOS+GTY3rc+rmDxAKn7VEPAt+amm/7Yu8ev0gfnkHckljT8nSoaf/RkeNgUejaKburGiYt696FNIcXrt/3yJh8Qba+advg0BwJCk66Qamp3WvxtX1gMzSDZya+BU8y2OR+ogyk7w5h+Nox+/6S04pNunwKqpt9Db9yemA2GokjqThGR+ms1JeYMe92hu5y2Zbs5O5be7mkru2Hlpgc5j434M1NPiq0qqgXoaDkwqTU21V0s7dgY/TfLX9XMT1udx56RJqTqf5aqlR3vVqtOWaYpbp4NtW2tmPaXbwAZI0U1zroI/tiRW9oBVOtL5QT6uu2TH0nlgnXRSqsLkGXg+JnBTCjopVeGceXk2FnAtColkUynGMn1SrHXejq3Py4U5wHXZvtluJtXO27H+vFyMB9xElFIxNQ6fUmFj9Xm6Sr67SrA6b94Gfp4HLsb2rSM53VSMpseK1c7bsXbechs4zgO3EiUvs6kK7tgsUmlglaLkZiZVStzOBzoPrJHOS1VgVR5YuTPXz1VgXR5YM/+u9xglkyZRT2WqghlbnVc8CA+4mtxRp5vB7XxW7bw3LwvywI0pr5MN6HNNrUi/fUZO4o6tzxuiuO0GuLzUUdu3GOV3M6raeTu2Nm8aR+eBlVD1BnoVjowt0HBgnY51PrqdT/9yxtJ5YHWkeGKswoxJuMcGuIYoKdowKOQ4Xxov+4Zb/khU8Mf681a3gZ/0gYt1PjGdV1J2/mBS5z/58zrbQOeBE6zpGZgA7smRzgc6D2xKlORlCiUVKrfSslMAVulI56PX+XHv81g6D6yPFM+MVWCJDliLJdfoMhVYowPWYsk1ukwF1uiAu1R/Hh5v2wNb8r+9O0pBGAaiKLqdm/1vUCiFSCdhTIjWhntAwefY5sMxRW1ToJnZ89KjQTnuGzGUWB1DLkJtul0ofocn3SOf5wMu3mu97q30GN2e99he2gKEpj6Dkvwjj4tebb5d8EBAuhuUJJ87f96f4aT/1OlNz7GRfgg+WheCUFsfE16cpEFNx5exIUmHx09zd34AaRdACCDp+TVLSlFv1blzgKR2egx5zx/see0pn+djbR4FIVofz4/UeV67G3+vr3niC+H04Oz/nbwA7lqtm+wByfQAAAAASUVORK5CYII=') no-repeat;\n\twidth: 21px;\n\theight: 21px;\n\tbackground-position: 0 -4477px;\n}\n\n.font-graph-geSprite-endermanyopt {\n\tbackground: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAABeQCAMAAAByzXKPAAAA1VBMVEUAAAAzMzIzMzIzMzE1NTUzMzIzMzIzMzEzMzIyMjIzMzIzMzIzMzIzMzE6OjoyMjIzMzIzMzIzMzEzMzI0NDA0NDIwMDAyMjEzMzIzMzEzMzE0NDAzMzMzMzIyMjIzMzI0NDE0NDQyMjIzMzIzMzIzMzIzMzM5OTkAAAC1tbX///9mZmYwMDAQEBAmJiZTiPJ7e3v/Z2RwcHAgICB+fn5hYWFzc3NAQECoqKiampqMjIxTU1NGRkY3NzcbGxsNDQ3w8PBQUFDg4ODAwMCwsLCgoKBPT09W+xp5AAAAKHRSTlMAh4DDEd187+mljnhvVge5nmhMQi4hA8uxk2IlHOOYc102M/jW088J/2liTQAACt5JREFUeNrs3O1um0AQheG5nIPCoIq1Q7+r/Mn9X1K9xtEAM9RLQmODzyO1cV+NtzjShhjHkRkAgn9DMCaYnRXIGOQdtWmk1zRWm0vNN6az+Y+v2fXZ5iTX/kZ4ZGvUNT6/RJuCM/VVRKFB7YBwtnY1k3h2wboaHy8RFQC2VGuc1D730WWLS2GIZ27aM4yUT+9tXaLNw9m0mI9uokepRLeC+ZyCfFCoqwckqV3WBHFZaxHLFrNxVpgUVRWjg/jli2WbfH4WyxYnWcVV0Rz7FYj26X9ezQcuE3VYkXzFSYpm9eq6pqSiuNYAaj+r0GiFxKv5tEOqxVfV0utrCkZF/HCXTuOdGz2IHKbDR5wdJ6PdeRmIsfviED0C5ZV7ojf487v59fPHsT18//a1Yn1HJdoSjIUXBG5XgaBejhMYVmT9B1dRUONj4KtyRHNmNkULDYeD2CGVjiZ0paOK1jVuYKIpjJTO7m9dovvEn3bz/DH4440f2+d9fvlVh+4LLuK6cM8GVcKKkmq3ZqqBfbhaef4n+pijBudNZH3H+OW3No+rbTmVXjfciPbs/GVQ7QU6tWqUW5lonefHfn5f6xI9DAxdqQU3n55uU821mj2ZuUq0SYo2ivA5tThxk3rK6u+urYtZiqKuGiWMEkbp4/OFLITIvyrfekt35WGvjvP6OlERwP6+VU39z+ansp+0SThP8jk+0SeoAehRjObmdha0f2YwfucMss7uaPVF3rThN/EH6fH3YhEt3bD1zMlwGtu8/8a5zrHJuR6NyrkKMK5N5qqf9ev6Y4hfGfSPrc7ZWZqPQrQPa+x5Cfe8FO55m3Xrcs8T3TFUYQ0zqj5jTPoMmagQz4brFh8D3x5L9OngyRy+IEa0JgBRlaBWAIJYyVYjYDF47PwNV/TwAIRfB+BiFcyeolchija6+P7xd//IveI+JlpwnrdZP7xexdD6/4N/PDzP06NZdc8vP4H7WKFXLbqjQcU9T7QZvFhHdN/+sndmy6lCQRQ9KOA8Ro1TxjttYuUlX5BK5f+/6YJIWjlNFREkpLJXGQuWO01e2mPaU4pA17qH7iEeKfRsrrqh4/t0hJQPEJSokULPFpJse0Iu0PNQNVSNnOu8ZHPWZc8TUhkBgECRikZMrp4Xq9W1NPubkIIUm4hnrtyikSIjq+jck3bOBQkpnSBrkU97ALl73pJqXfFc5AlJqN3cXvoTEKIzJcu5PSEFqHiGp6ahz+33Z3rWtpzhEfK16DO8XXi3S2vIvfUCHnpWrcsZHiHVAFUG0KQJoEgjGjGRFG1l9bq25gyPkIoANBcEab9DEPf27iCk40VbWa0uP86WkMsTQHPQHBSnJJHCytp1dW9Uz2cBQoo0PEqVes/r2bM0131CLtLzUCVUidw9n6uuaPY8IdnUYMet2BTccUtIfShnz60mBe65JaTunL/tVqTAbbeE1ImCc3vl16McIEiWc3tCClD5DM9Ak7ZFZCBkZEVzhkfI5/n6Hbdp+wF33BJSH8rZc6vISB/gnltCas/Z225FStdz2y0hZXE19lrt5p177NyR11+OHb/THhzJP86wP2uYrjvz1h92eTseNEzDbB2nd/OY1Py9WNw6/qjnN+fmvnmwnYkxjf1t+mAW7XlsbzaJ3a7DzH1sf3Udp7m/dcOf615sW26SdfvGrCaxbV4l9nEan0X0xqEaRrbvmnlrGFu3PTN3ndUoLOuapW8ODLzudLVomMHA71z/MwmT9mTmN+bOZnS9NcJDs+V53t+WPzQnbNa9/nRoCPl2AKqObKFvltEBoPvcVwNwmavxOy3IDwFAlkWCWPBqhJDC8GtsCPlGYI8ciQyRI+3/CLHHscysXvf0ynzWIOQsPr3wWllkxNQskD+b82/Ihi8qCCm150XpObXnc2RFs+cJqRhAE5AHpI8BOZbH5TQdlXB8JAUEIC4AvkFPSMEl/dQ+v74+2/bl6enFtm/v72+W/c/eHSW3CUNRGNZyjgiZNHE6fW2b6f63VGScCHSvI7CxjfH/tYnTU43CywFiAfnT/On+lunH3274R5G2zbv03rTj9F+z92+U7pqPX52PZjdM35uf6vxs3ofp799Kulf2B8CEc2JVjvJm6OIT5CO9PekvD/8T767XgTc2z1umnEdggyT5eX2s+k9yGpvH1kqvI523IVfSAzdlW2gbu3zn5+6j/JFcfIft0lBOi4/J6cbmBTZJTdPo9fV1/3pamqTUFCalOVkunVdNTU5bSa2Nn7ULjl0A7o5/aGt6Z6TKUpVC7/VLSrWzqTo7b+yzO+9i28shHtugl5cXXS9NLnyYHVZ+Nz79UG7y4in7Aqza9po+tBsXP1B8wCW3m01yVqq9G3w3q/X+/1lpZ5WEbKdOTnNsxiYtd+ngjl28Fw+zhwGwLA0/mDeIS46AxWnO2MVnUFD627+sasuAxyJpTsp3A+6WgnplGpILpL1JR21lZt5k2ZSrFPE41AteEy+Q9qrn58qW77lNM877sXXq+fcGLp/2giETZO5tTYumHObxKDQ0aezhxb2feNE0MWlvqZS1SzwsJZdslu3x9fYae8HFXYeAKcIVejxwzgwc0YE6jTzuWOAuqOS+GTY3rc+rmDxAKn7VEPAt+amm/7Yu8ev0gfnkHckljT8nSoaf/RkeNgUejaKburGiYt696FNIcXrt/3yJh8Qba+advg0BwJCk66Qamp3WvxtX1gMzSDZya+BU8y2OR+ogyk7w5h+Nox+/6S04pNunwKqpt9Db9yemA2GokjqThGR+ms1JeYMe92hu5y2Zbs5O5be7mkru2Hlpgc5j434M1NPiq0qqgXoaDkwqTU21V0s7dgY/TfLX9XMT1udx56RJqTqf5aqlR3vVqtOWaYpbp4NtW2tmPaXbwAZI0U1zroI/tiRW9oBVOtL5QT6uu2TH0nlgnXRSqsLkGXg+JnBTCjopVeGceXk2FnAtColkUynGMn1SrHXejq3Py4U5wHXZvtluJtXO27H+vFyMB9xElFIxNQ6fUmFj9Xm6Sr67SrA6b94Gfp4HLsb2rSM53VSMpseK1c7bsXbechs4zgO3EiUvs6kK7tgsUmlglaLkZiZVStzOBzoPrJHOS1VgVR5YuTPXz1VgXR5YM/+u9xglkyZRT2WqghlbnVc8CA+4mtxRp5vB7XxW7bw3LwvywI0pr5MN6HNNrUi/fUZO4o6tzxuiuO0GuLzUUdu3GOV3M6raeTu2Nm8aR+eBlVD1BnoVjowt0HBgnY51PrqdT/9yxtJ5YHWkeGKswoxJuMcGuIYoKdowKOQ4Xxov+4Zb/khU8Mf681a3gZ/0gYt1PjGdV1J2/mBS5z/58zrbQOeBE6zpGZgA7smRzgc6D2xKlORlCiUVKrfSslMAVulI56PX+XHv81g6D6yPFM+MVWCJDliLJdfoMhVYowPWYsk1ukwF1uiAu1R/Hh5v2wNb8r+9O0pBGAaiKLqdm/1vUCiFSCdhTIjWhntAwefY5sMxRW1ToJnZ89KjQTnuGzGUWB1DLkJtul0ofocn3SOf5wMu3mu97q30GN2e99he2gKEpj6Dkvwjj4tebb5d8EBAuhuUJJ87f96f4aT/1OlNz7GRfgg+WheCUFsfE16cpEFNx5exIUmHx09zd34AaRdACCDp+TVLSlFv1blzgKR2egx5zx/see0pn+djbR4FIVofz4/UeV67G3+vr3niC+H04Oz/nbwA7lqtm+wByfQAAAAASUVORK5CYII=') no-repeat;\n\twidth: 21px;\n\theight: 21px;\n\tbackground-position: 0 -4523px;\n}\n\n.font-graph-geSprite-endclassicthin {\n\tbackground: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAABeQCAMAAAByzXKPAAAA1VBMVEUAAAAzMzIzMzIzMzE1NTUzMzIzMzIzMzEzMzIyMjIzMzIzMzIzMzIzMzE6OjoyMjIzMzIzMzIzMzEzMzI0NDA0NDIwMDAyMjEzMzIzMzEzMzE0NDAzMzMzMzIyMjIzMzI0NDE0NDQyMjIzMzIzMzIzMzIzMzM5OTkAAAC1tbX///9mZmYwMDAQEBAmJiZTiPJ7e3v/Z2RwcHAgICB+fn5hYWFzc3NAQECoqKiampqMjIxTU1NGRkY3NzcbGxsNDQ3w8PBQUFDg4ODAwMCwsLCgoKBPT09W+xp5AAAAKHRSTlMAh4DDEd187+mljnhvVge5nmhMQi4hA8uxk2IlHOOYc102M/jW088J/2liTQAACt5JREFUeNrs3O1um0AQheG5nIPCoIq1Q7+r/Mn9X1K9xtEAM9RLQmODzyO1cV+NtzjShhjHkRkAgn9DMCaYnRXIGOQdtWmk1zRWm0vNN6az+Y+v2fXZ5iTX/kZ4ZGvUNT6/RJuCM/VVRKFB7YBwtnY1k3h2wboaHy8RFQC2VGuc1D730WWLS2GIZ27aM4yUT+9tXaLNw9m0mI9uokepRLeC+ZyCfFCoqwckqV3WBHFZaxHLFrNxVpgUVRWjg/jli2WbfH4WyxYnWcVV0Rz7FYj26X9ezQcuE3VYkXzFSYpm9eq6pqSiuNYAaj+r0GiFxKv5tEOqxVfV0utrCkZF/HCXTuOdGz2IHKbDR5wdJ6PdeRmIsfviED0C5ZV7ojf487v59fPHsT18//a1Yn1HJdoSjIUXBG5XgaBejhMYVmT9B1dRUONj4KtyRHNmNkULDYeD2CGVjiZ0paOK1jVuYKIpjJTO7m9dovvEn3bz/DH4440f2+d9fvlVh+4LLuK6cM8GVcKKkmq3ZqqBfbhaef4n+pijBudNZH3H+OW3No+rbTmVXjfciPbs/GVQ7QU6tWqUW5lonefHfn5f6xI9DAxdqQU3n55uU821mj2ZuUq0SYo2ivA5tThxk3rK6u+urYtZiqKuGiWMEkbp4/OFLITIvyrfekt35WGvjvP6OlERwP6+VU39z+ansp+0SThP8jk+0SeoAehRjObmdha0f2YwfucMss7uaPVF3rThN/EH6fH3YhEt3bD1zMlwGtu8/8a5zrHJuR6NyrkKMK5N5qqf9ev6Y4hfGfSPrc7ZWZqPQrQPa+x5Cfe8FO55m3Xrcs8T3TFUYQ0zqj5jTPoMmagQz4brFh8D3x5L9OngyRy+IEa0JgBRlaBWAIJYyVYjYDF47PwNV/TwAIRfB+BiFcyeolchija6+P7xd//IveI+JlpwnrdZP7xexdD6/4N/PDzP06NZdc8vP4H7WKFXLbqjQcU9T7QZvFhHdN/+sndmy6lCQRQ9KOA8Ro1TxjttYuUlX5BK5f+/6YJIWjlNFREkpLJXGQuWO01e2mPaU4pA17qH7iEeKfRsrrqh4/t0hJQPEJSokULPFpJse0Iu0PNQNVSNnOu8ZHPWZc8TUhkBgECRikZMrp4Xq9W1NPubkIIUm4hnrtyikSIjq+jck3bOBQkpnSBrkU97ALl73pJqXfFc5AlJqN3cXvoTEKIzJcu5PSEFqHiGp6ahz+33Z3rWtpzhEfK16DO8XXi3S2vIvfUCHnpWrcsZHiHVAFUG0KQJoEgjGjGRFG1l9bq25gyPkIoANBcEab9DEPf27iCk40VbWa0uP86WkMsTQHPQHBSnJJHCytp1dW9Uz2cBQoo0PEqVes/r2bM0131CLtLzUCVUidw9n6uuaPY8IdnUYMet2BTccUtIfShnz60mBe65JaTunL/tVqTAbbeE1ImCc3vl16McIEiWc3tCClD5DM9Ak7ZFZCBkZEVzhkfI5/n6Hbdp+wF33BJSH8rZc6vISB/gnltCas/Z225FStdz2y0hZXE19lrt5p177NyR11+OHb/THhzJP86wP2uYrjvz1h92eTseNEzDbB2nd/OY1Py9WNw6/qjnN+fmvnmwnYkxjf1t+mAW7XlsbzaJ3a7DzH1sf3Udp7m/dcOf615sW26SdfvGrCaxbV4l9nEan0X0xqEaRrbvmnlrGFu3PTN3ndUoLOuapW8ODLzudLVomMHA71z/MwmT9mTmN+bOZnS9NcJDs+V53t+WPzQnbNa9/nRoCPl2AKqObKFvltEBoPvcVwNwmavxOy3IDwFAlkWCWPBqhJDC8GtsCPlGYI8ciQyRI+3/CLHHscysXvf0ynzWIOQsPr3wWllkxNQskD+b82/Ihi8qCCm150XpObXnc2RFs+cJqRhAE5AHpI8BOZbH5TQdlXB8JAUEIC4AvkFPSMEl/dQ+v74+2/bl6enFtm/v72+W/c/eHSW3CUNRGNZyjgiZNHE6fW2b6f63VGScCHSvI7CxjfH/tYnTU43CywFiAfnT/On+lunH3274R5G2zbv03rTj9F+z92+U7pqPX52PZjdM35uf6vxs3ofp799Kulf2B8CEc2JVjvJm6OIT5CO9PekvD/8T767XgTc2z1umnEdggyT5eX2s+k9yGpvH1kqvI523IVfSAzdlW2gbu3zn5+6j/JFcfIft0lBOi4/J6cbmBTZJTdPo9fV1/3pamqTUFCalOVkunVdNTU5bSa2Nn7ULjl0A7o5/aGt6Z6TKUpVC7/VLSrWzqTo7b+yzO+9i28shHtugl5cXXS9NLnyYHVZ+Nz79UG7y4in7Aqza9po+tBsXP1B8wCW3m01yVqq9G3w3q/X+/1lpZ5WEbKdOTnNsxiYtd+ngjl28Fw+zhwGwLA0/mDeIS46AxWnO2MVnUFD627+sasuAxyJpTsp3A+6WgnplGpILpL1JR21lZt5k2ZSrFPE41AteEy+Q9qrn58qW77lNM877sXXq+fcGLp/2giETZO5tTYumHObxKDQ0aezhxb2feNE0MWlvqZS1SzwsJZdslu3x9fYae8HFXYeAKcIVejxwzgwc0YE6jTzuWOAuqOS+GTY3rc+rmDxAKn7VEPAt+amm/7Yu8ev0gfnkHckljT8nSoaf/RkeNgUejaKburGiYt696FNIcXrt/3yJh8Qba+advg0BwJCk66Qamp3WvxtX1gMzSDZya+BU8y2OR+ogyk7w5h+Nox+/6S04pNunwKqpt9Db9yemA2GokjqThGR+ms1JeYMe92hu5y2Zbs5O5be7mkru2Hlpgc5j434M1NPiq0qqgXoaDkwqTU21V0s7dgY/TfLX9XMT1udx56RJqTqf5aqlR3vVqtOWaYpbp4NtW2tmPaXbwAZI0U1zroI/tiRW9oBVOtL5QT6uu2TH0nlgnXRSqsLkGXg+JnBTCjopVeGceXk2FnAtColkUynGMn1SrHXejq3Py4U5wHXZvtluJtXO27H+vFyMB9xElFIxNQ6fUmFj9Xm6Sr67SrA6b94Gfp4HLsb2rSM53VSMpseK1c7bsXbechs4zgO3EiUvs6kK7tgsUmlglaLkZiZVStzOBzoPrJHOS1VgVR5YuTPXz1VgXR5YM/+u9xglkyZRT2WqghlbnVc8CA+4mtxRp5vB7XxW7bw3LwvywI0pr5MN6HNNrUi/fUZO4o6tzxuiuO0GuLzUUdu3GOV3M6raeTu2Nm8aR+eBlVD1BnoVjowt0HBgnY51PrqdT/9yxtJ5YHWkeGKswoxJuMcGuIYoKdowKOQ4Xxov+4Zb/khU8Mf681a3gZ/0gYt1PjGdV1J2/mBS5z/58zrbQOeBE6zpGZgA7smRzgc6D2xKlORlCiUVKrfSslMAVulI56PX+XHv81g6D6yPFM+MVWCJDliLJdfoMhVYowPWYsk1ukwF1uiAu1R/Hh5v2wNb8r+9O0pBGAaiKLqdm/1vUCiFSCdhTIjWhntAwefY5sMxRW1ToJnZ89KjQTnuGzGUWB1DLkJtul0ofocn3SOf5wMu3mu97q30GN2e99he2gKEpj6Dkvwjj4tebb5d8EBAuhuUJJ87f96f4aT/1OlNz7GRfgg+WheCUFsfE16cpEFNx5exIUmHx09zd34AaRdACCDp+TVLSlFv1blzgKR2egx5zx/see0pn+djbR4FIVofz4/UeV67G3+vr3niC+H04Oz/nbwA7lqtm+wByfQAAAAASUVORK5CYII=') no-repeat;\n\twidth: 21px;\n\theight: 21px;\n\tbackground-position: 0 -4938px;\n}\n\n.font-graph-geSprite-endclassicthintrans {\n\tbackground: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAABeQCAMAAAByzXKPAAAA1VBMVEUAAAAzMzIzMzIzMzE1NTUzMzIzMzIzMzEzMzIyMjIzMzIzMzIzMzIzMzE6OjoyMjIzMzIzMzIzMzEzMzI0NDA0NDIwMDAyMjEzMzIzMzEzMzE0NDAzMzMzMzIyMjIzMzI0NDE0NDQyMjIzMzIzMzIzMzIzMzM5OTkAAAC1tbX///9mZmYwMDAQEBAmJiZTiPJ7e3v/Z2RwcHAgICB+fn5hYWFzc3NAQECoqKiampqMjIxTU1NGRkY3NzcbGxsNDQ3w8PBQUFDg4ODAwMCwsLCgoKBPT09W+xp5AAAAKHRSTlMAh4DDEd187+mljnhvVge5nmhMQi4hA8uxk2IlHOOYc102M/jW088J/2liTQAACt5JREFUeNrs3O1um0AQheG5nIPCoIq1Q7+r/Mn9X1K9xtEAM9RLQmODzyO1cV+NtzjShhjHkRkAgn9DMCaYnRXIGOQdtWmk1zRWm0vNN6az+Y+v2fXZ5iTX/kZ4ZGvUNT6/RJuCM/VVRKFB7YBwtnY1k3h2wboaHy8RFQC2VGuc1D730WWLS2GIZ27aM4yUT+9tXaLNw9m0mI9uokepRLeC+ZyCfFCoqwckqV3WBHFZaxHLFrNxVpgUVRWjg/jli2WbfH4WyxYnWcVV0Rz7FYj26X9ezQcuE3VYkXzFSYpm9eq6pqSiuNYAaj+r0GiFxKv5tEOqxVfV0utrCkZF/HCXTuOdGz2IHKbDR5wdJ6PdeRmIsfviED0C5ZV7ojf487v59fPHsT18//a1Yn1HJdoSjIUXBG5XgaBejhMYVmT9B1dRUONj4KtyRHNmNkULDYeD2CGVjiZ0paOK1jVuYKIpjJTO7m9dovvEn3bz/DH4440f2+d9fvlVh+4LLuK6cM8GVcKKkmq3ZqqBfbhaef4n+pijBudNZH3H+OW3No+rbTmVXjfciPbs/GVQ7QU6tWqUW5lonefHfn5f6xI9DAxdqQU3n55uU821mj2ZuUq0SYo2ivA5tThxk3rK6u+urYtZiqKuGiWMEkbp4/OFLITIvyrfekt35WGvjvP6OlERwP6+VU39z+ansp+0SThP8jk+0SeoAehRjObmdha0f2YwfucMss7uaPVF3rThN/EH6fH3YhEt3bD1zMlwGtu8/8a5zrHJuR6NyrkKMK5N5qqf9ev6Y4hfGfSPrc7ZWZqPQrQPa+x5Cfe8FO55m3Xrcs8T3TFUYQ0zqj5jTPoMmagQz4brFh8D3x5L9OngyRy+IEa0JgBRlaBWAIJYyVYjYDF47PwNV/TwAIRfB+BiFcyeolchija6+P7xd//IveI+JlpwnrdZP7xexdD6/4N/PDzP06NZdc8vP4H7WKFXLbqjQcU9T7QZvFhHdN/+sndmy6lCQRQ9KOA8Ro1TxjttYuUlX5BK5f+/6YJIWjlNFREkpLJXGQuWO01e2mPaU4pA17qH7iEeKfRsrrqh4/t0hJQPEJSokULPFpJse0Iu0PNQNVSNnOu8ZHPWZc8TUhkBgECRikZMrp4Xq9W1NPubkIIUm4hnrtyikSIjq+jck3bOBQkpnSBrkU97ALl73pJqXfFc5AlJqN3cXvoTEKIzJcu5PSEFqHiGp6ahz+33Z3rWtpzhEfK16DO8XXi3S2vIvfUCHnpWrcsZHiHVAFUG0KQJoEgjGjGRFG1l9bq25gyPkIoANBcEab9DEPf27iCk40VbWa0uP86WkMsTQHPQHBSnJJHCytp1dW9Uz2cBQoo0PEqVes/r2bM0131CLtLzUCVUidw9n6uuaPY8IdnUYMet2BTccUtIfShnz60mBe65JaTunL/tVqTAbbeE1ImCc3vl16McIEiWc3tCClD5DM9Ak7ZFZCBkZEVzhkfI5/n6Hbdp+wF33BJSH8rZc6vISB/gnltCas/Z225FStdz2y0hZXE19lrt5p177NyR11+OHb/THhzJP86wP2uYrjvz1h92eTseNEzDbB2nd/OY1Py9WNw6/qjnN+fmvnmwnYkxjf1t+mAW7XlsbzaJ3a7DzH1sf3Udp7m/dcOf615sW26SdfvGrCaxbV4l9nEan0X0xqEaRrbvmnlrGFu3PTN3ndUoLOuapW8ODLzudLVomMHA71z/MwmT9mTmN+bOZnS9NcJDs+V53t+WPzQnbNa9/nRoCPl2AKqObKFvltEBoPvcVwNwmavxOy3IDwFAlkWCWPBqhJDC8GtsCPlGYI8ciQyRI+3/CLHHscysXvf0ynzWIOQsPr3wWllkxNQskD+b82/Ihi8qCCm150XpObXnc2RFs+cJqRhAE5AHpI8BOZbH5TQdlXB8JAUEIC4AvkFPSMEl/dQ+v74+2/bl6enFtm/v72+W/c/eHSW3CUNRGNZyjgiZNHE6fW2b6f63VGScCHSvI7CxjfH/tYnTU43CywFiAfnT/On+lunH3274R5G2zbv03rTj9F+z92+U7pqPX52PZjdM35uf6vxs3ofp799Kulf2B8CEc2JVjvJm6OIT5CO9PekvD/8T767XgTc2z1umnEdggyT5eX2s+k9yGpvH1kqvI523IVfSAzdlW2gbu3zn5+6j/JFcfIft0lBOi4/J6cbmBTZJTdPo9fV1/3pamqTUFCalOVkunVdNTU5bSa2Nn7ULjl0A7o5/aGt6Z6TKUpVC7/VLSrWzqTo7b+yzO+9i28shHtugl5cXXS9NLnyYHVZ+Nz79UG7y4in7Aqza9po+tBsXP1B8wCW3m01yVqq9G3w3q/X+/1lpZ5WEbKdOTnNsxiYtd+ngjl28Fw+zhwGwLA0/mDeIS46AxWnO2MVnUFD627+sasuAxyJpTsp3A+6WgnplGpILpL1JR21lZt5k2ZSrFPE41AteEy+Q9qrn58qW77lNM877sXXq+fcGLp/2giETZO5tTYumHObxKDQ0aezhxb2feNE0MWlvqZS1SzwsJZdslu3x9fYae8HFXYeAKcIVejxwzgwc0YE6jTzuWOAuqOS+GTY3rc+rmDxAKn7VEPAt+amm/7Yu8ev0gfnkHckljT8nSoaf/RkeNgUejaKburGiYt696FNIcXrt/3yJh8Qba+advg0BwJCk66Qamp3WvxtX1gMzSDZya+BU8y2OR+ogyk7w5h+Nox+/6S04pNunwKqpt9Db9yemA2GokjqThGR+ms1JeYMe92hu5y2Zbs5O5be7mkru2Hlpgc5j434M1NPiq0qqgXoaDkwqTU21V0s7dgY/TfLX9XMT1udx56RJqTqf5aqlR3vVqtOWaYpbp4NtW2tmPaXbwAZI0U1zroI/tiRW9oBVOtL5QT6uu2TH0nlgnXRSqsLkGXg+JnBTCjopVeGceXk2FnAtColkUynGMn1SrHXejq3Py4U5wHXZvtluJtXO27H+vFyMB9xElFIxNQ6fUmFj9Xm6Sr67SrA6b94Gfp4HLsb2rSM53VSMpseK1c7bsXbechs4zgO3EiUvs6kK7tgsUmlglaLkZiZVStzOBzoPrJHOS1VgVR5YuTPXz1VgXR5YM/+u9xglkyZRT2WqghlbnVc8CA+4mtxRp5vB7XxW7bw3LwvywI0pr5MN6HNNrUi/fUZO4o6tzxuiuO0GuLzUUdu3GOV3M6raeTu2Nm8aR+eBlVD1BnoVjowt0HBgnY51PrqdT/9yxtJ5YHWkeGKswoxJuMcGuIYoKdowKOQ4Xxov+4Zb/khU8Mf681a3gZ/0gYt1PjGdV1J2/mBS5z/58zrbQOeBE6zpGZgA7smRzgc6D2xKlORlCiUVKrfSslMAVulI56PX+XHv81g6D6yPFM+MVWCJDliLJdfoMhVYowPWYsk1ukwF1uiAu1R/Hh5v2wNb8r+9O0pBGAaiKLqdm/1vUCiFSCdhTIjWhntAwefY5sMxRW1ToJnZ89KjQTnuGzGUWB1DLkJtul0ofocn3SOf5wMu3mu97q30GN2e99he2gKEpj6Dkvwjj4tebb5d8EBAuhuUJJ87f96f4aT/1OlNz7GRfgg+WheCUFsfE16cpEFNx5exIUmHx09zd34AaRdACCDp+TVLSlFv1blzgKR2egx5zx/see0pn+djbR4FIVofz4/UeV67G3+vr3niC+H04Oz/nbwA7lqtm+wByfQAAAAASUVORK5CYII=') no-repeat;\n\twidth: 21px;\n\theight: 21px;\n\tbackground-position: 0 -4984px;\n}\n\n.font-graph-geSprite-enddash {\n\tbackground: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAABeQCAMAAAByzXKPAAAA1VBMVEUAAAAzMzIzMzIzMzE1NTUzMzIzMzIzMzEzMzIyMjIzMzIzMzIzMzIzMzE6OjoyMjIzMzIzMzIzMzEzMzI0NDA0NDIwMDAyMjEzMzIzMzEzMzE0NDAzMzMzMzIyMjIzMzI0NDE0NDQyMjIzMzIzMzIzMzIzMzM5OTkAAAC1tbX///9mZmYwMDAQEBAmJiZTiPJ7e3v/Z2RwcHAgICB+fn5hYWFzc3NAQECoqKiampqMjIxTU1NGRkY3NzcbGxsNDQ3w8PBQUFDg4ODAwMCwsLCgoKBPT09W+xp5AAAAKHRSTlMAh4DDEd187+mljnhvVge5nmhMQi4hA8uxk2IlHOOYc102M/jW088J/2liTQAACt5JREFUeNrs3O1um0AQheG5nIPCoIq1Q7+r/Mn9X1K9xtEAM9RLQmODzyO1cV+NtzjShhjHkRkAgn9DMCaYnRXIGOQdtWmk1zRWm0vNN6az+Y+v2fXZ5iTX/kZ4ZGvUNT6/RJuCM/VVRKFB7YBwtnY1k3h2wboaHy8RFQC2VGuc1D730WWLS2GIZ27aM4yUT+9tXaLNw9m0mI9uokepRLeC+ZyCfFCoqwckqV3WBHFZaxHLFrNxVpgUVRWjg/jli2WbfH4WyxYnWcVV0Rz7FYj26X9ezQcuE3VYkXzFSYpm9eq6pqSiuNYAaj+r0GiFxKv5tEOqxVfV0utrCkZF/HCXTuOdGz2IHKbDR5wdJ6PdeRmIsfviED0C5ZV7ojf487v59fPHsT18//a1Yn1HJdoSjIUXBG5XgaBejhMYVmT9B1dRUONj4KtyRHNmNkULDYeD2CGVjiZ0paOK1jVuYKIpjJTO7m9dovvEn3bz/DH4440f2+d9fvlVh+4LLuK6cM8GVcKKkmq3ZqqBfbhaef4n+pijBudNZH3H+OW3No+rbTmVXjfciPbs/GVQ7QU6tWqUW5lonefHfn5f6xI9DAxdqQU3n55uU821mj2ZuUq0SYo2ivA5tThxk3rK6u+urYtZiqKuGiWMEkbp4/OFLITIvyrfekt35WGvjvP6OlERwP6+VU39z+ansp+0SThP8jk+0SeoAehRjObmdha0f2YwfucMss7uaPVF3rThN/EH6fH3YhEt3bD1zMlwGtu8/8a5zrHJuR6NyrkKMK5N5qqf9ev6Y4hfGfSPrc7ZWZqPQrQPa+x5Cfe8FO55m3Xrcs8T3TFUYQ0zqj5jTPoMmagQz4brFh8D3x5L9OngyRy+IEa0JgBRlaBWAIJYyVYjYDF47PwNV/TwAIRfB+BiFcyeolchija6+P7xd//IveI+JlpwnrdZP7xexdD6/4N/PDzP06NZdc8vP4H7WKFXLbqjQcU9T7QZvFhHdN/+sndmy6lCQRQ9KOA8Ro1TxjttYuUlX5BK5f+/6YJIWjlNFREkpLJXGQuWO01e2mPaU4pA17qH7iEeKfRsrrqh4/t0hJQPEJSokULPFpJse0Iu0PNQNVSNnOu8ZHPWZc8TUhkBgECRikZMrp4Xq9W1NPubkIIUm4hnrtyikSIjq+jck3bOBQkpnSBrkU97ALl73pJqXfFc5AlJqN3cXvoTEKIzJcu5PSEFqHiGp6ahz+33Z3rWtpzhEfK16DO8XXi3S2vIvfUCHnpWrcsZHiHVAFUG0KQJoEgjGjGRFG1l9bq25gyPkIoANBcEab9DEPf27iCk40VbWa0uP86WkMsTQHPQHBSnJJHCytp1dW9Uz2cBQoo0PEqVes/r2bM0131CLtLzUCVUidw9n6uuaPY8IdnUYMet2BTccUtIfShnz60mBe65JaTunL/tVqTAbbeE1ImCc3vl16McIEiWc3tCClD5DM9Ak7ZFZCBkZEVzhkfI5/n6Hbdp+wF33BJSH8rZc6vISB/gnltCas/Z225FStdz2y0hZXE19lrt5p177NyR11+OHb/THhzJP86wP2uYrjvz1h92eTseNEzDbB2nd/OY1Py9WNw6/qjnN+fmvnmwnYkxjf1t+mAW7XlsbzaJ3a7DzH1sf3Udp7m/dcOf615sW26SdfvGrCaxbV4l9nEan0X0xqEaRrbvmnlrGFu3PTN3ndUoLOuapW8ODLzudLVomMHA71z/MwmT9mTmN+bOZnS9NcJDs+V53t+WPzQnbNa9/nRoCPl2AKqObKFvltEBoPvcVwNwmavxOy3IDwFAlkWCWPBqhJDC8GtsCPlGYI8ciQyRI+3/CLHHscysXvf0ynzWIOQsPr3wWllkxNQskD+b82/Ihi8qCCm150XpObXnc2RFs+cJqRhAE5AHpI8BOZbH5TQdlXB8JAUEIC4AvkFPSMEl/dQ+v74+2/bl6enFtm/v72+W/c/eHSW3CUNRGNZyjgiZNHE6fW2b6f63VGScCHSvI7CxjfH/tYnTU43CywFiAfnT/On+lunH3274R5G2zbv03rTj9F+z92+U7pqPX52PZjdM35uf6vxs3ofp799Kulf2B8CEc2JVjvJm6OIT5CO9PekvD/8T767XgTc2z1umnEdggyT5eX2s+k9yGpvH1kqvI523IVfSAzdlW2gbu3zn5+6j/JFcfIft0lBOi4/J6cbmBTZJTdPo9fV1/3pamqTUFCalOVkunVdNTU5bSa2Nn7ULjl0A7o5/aGt6Z6TKUpVC7/VLSrWzqTo7b+yzO+9i28shHtugl5cXXS9NLnyYHVZ+Nz79UG7y4in7Aqza9po+tBsXP1B8wCW3m01yVqq9G3w3q/X+/1lpZ5WEbKdOTnNsxiYtd+ngjl28Fw+zhwGwLA0/mDeIS46AxWnO2MVnUFD627+sasuAxyJpTsp3A+6WgnplGpILpL1JR21lZt5k2ZSrFPE41AteEy+Q9qrn58qW77lNM877sXXq+fcGLp/2giETZO5tTYumHObxKDQ0aezhxb2feNE0MWlvqZS1SzwsJZdslu3x9fYae8HFXYeAKcIVejxwzgwc0YE6jTzuWOAuqOS+GTY3rc+rmDxAKn7VEPAt+amm/7Yu8ev0gfnkHckljT8nSoaf/RkeNgUejaKburGiYt696FNIcXrt/3yJh8Qba+advg0BwJCk66Qamp3WvxtX1gMzSDZya+BU8y2OR+ogyk7w5h+Nox+/6S04pNunwKqpt9Db9yemA2GokjqThGR+ms1JeYMe92hu5y2Zbs5O5be7mkru2Hlpgc5j434M1NPiq0qqgXoaDkwqTU21V0s7dgY/TfLX9XMT1udx56RJqTqf5aqlR3vVqtOWaYpbp4NtW2tmPaXbwAZI0U1zroI/tiRW9oBVOtL5QT6uu2TH0nlgnXRSqsLkGXg+JnBTCjopVeGceXk2FnAtColkUynGMn1SrHXejq3Py4U5wHXZvtluJtXO27H+vFyMB9xElFIxNQ6fUmFj9Xm6Sr67SrA6b94Gfp4HLsb2rSM53VSMpseK1c7bsXbechs4zgO3EiUvs6kK7tgsUmlglaLkZiZVStzOBzoPrJHOS1VgVR5YuTPXz1VgXR5YM/+u9xglkyZRT2WqghlbnVc8CA+4mtxRp5vB7XxW7bw3LwvywI0pr5MN6HNNrUi/fUZO4o6tzxuiuO0GuLzUUdu3GOV3M6raeTu2Nm8aR+eBlVD1BnoVjowt0HBgnY51PrqdT/9yxtJ5YHWkeGKswoxJuMcGuIYoKdowKOQ4Xxov+4Zb/khU8Mf681a3gZ/0gYt1PjGdV1J2/mBS5z/58zrbQOeBE6zpGZgA7smRzgc6D2xKlORlCiUVKrfSslMAVulI56PX+XHv81g6D6yPFM+MVWCJDliLJdfoMhVYowPWYsk1ukwF1uiAu1R/Hh5v2wNb8r+9O0pBGAaiKLqdm/1vUCiFSCdhTIjWhntAwefY5sMxRW1ToJnZ89KjQTnuGzGUWB1DLkJtul0ofocn3SOf5wMu3mu97q30GN2e99he2gKEpj6Dkvwjj4tebb5d8EBAuhuUJJ87f96f4aT/1OlNz7GRfgg+WheCUFsfE16cpEFNx5exIUmHx09zd34AaRdACCDp+TVLSlFv1blzgKR2egx5zx/see0pn+djbR4FIVofz4/UeV67G3+vr3niC+H04Oz/nbwA7lqtm+wByfQAAAAASUVORK5CYII=') no-repeat;\n\twidth: 21px;\n\theight: 21px;\n\tbackground-position: 0 -5029px;\n}\n\n.font-graph-geSprite-endcircleplus {\n\tbackground: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAABeQCAMAAAByzXKPAAAA1VBMVEUAAAAzMzIzMzIzMzE1NTUzMzIzMzIzMzEzMzIyMjIzMzIzMzIzMzIzMzE6OjoyMjIzMzIzMzIzMzEzMzI0NDA0NDIwMDAyMjEzMzIzMzEzMzE0NDAzMzMzMzIyMjIzMzI0NDE0NDQyMjIzMzIzMzIzMzIzMzM5OTkAAAC1tbX///9mZmYwMDAQEBAmJiZTiPJ7e3v/Z2RwcHAgICB+fn5hYWFzc3NAQECoqKiampqMjIxTU1NGRkY3NzcbGxsNDQ3w8PBQUFDg4ODAwMCwsLCgoKBPT09W+xp5AAAAKHRSTlMAh4DDEd187+mljnhvVge5nmhMQi4hA8uxk2IlHOOYc102M/jW088J/2liTQAACt5JREFUeNrs3O1um0AQheG5nIPCoIq1Q7+r/Mn9X1K9xtEAM9RLQmODzyO1cV+NtzjShhjHkRkAgn9DMCaYnRXIGOQdtWmk1zRWm0vNN6az+Y+v2fXZ5iTX/kZ4ZGvUNT6/RJuCM/VVRKFB7YBwtnY1k3h2wboaHy8RFQC2VGuc1D730WWLS2GIZ27aM4yUT+9tXaLNw9m0mI9uokepRLeC+ZyCfFCoqwckqV3WBHFZaxHLFrNxVpgUVRWjg/jli2WbfH4WyxYnWcVV0Rz7FYj26X9ezQcuE3VYkXzFSYpm9eq6pqSiuNYAaj+r0GiFxKv5tEOqxVfV0utrCkZF/HCXTuOdGz2IHKbDR5wdJ6PdeRmIsfviED0C5ZV7ojf487v59fPHsT18//a1Yn1HJdoSjIUXBG5XgaBejhMYVmT9B1dRUONj4KtyRHNmNkULDYeD2CGVjiZ0paOK1jVuYKIpjJTO7m9dovvEn3bz/DH4440f2+d9fvlVh+4LLuK6cM8GVcKKkmq3ZqqBfbhaef4n+pijBudNZH3H+OW3No+rbTmVXjfciPbs/GVQ7QU6tWqUW5lonefHfn5f6xI9DAxdqQU3n55uU821mj2ZuUq0SYo2ivA5tThxk3rK6u+urYtZiqKuGiWMEkbp4/OFLITIvyrfekt35WGvjvP6OlERwP6+VU39z+ansp+0SThP8jk+0SeoAehRjObmdha0f2YwfucMss7uaPVF3rThN/EH6fH3YhEt3bD1zMlwGtu8/8a5zrHJuR6NyrkKMK5N5qqf9ev6Y4hfGfSPrc7ZWZqPQrQPa+x5Cfe8FO55m3Xrcs8T3TFUYQ0zqj5jTPoMmagQz4brFh8D3x5L9OngyRy+IEa0JgBRlaBWAIJYyVYjYDF47PwNV/TwAIRfB+BiFcyeolchija6+P7xd//IveI+JlpwnrdZP7xexdD6/4N/PDzP06NZdc8vP4H7WKFXLbqjQcU9T7QZvFhHdN/+sndmy6lCQRQ9KOA8Ro1TxjttYuUlX5BK5f+/6YJIWjlNFREkpLJXGQuWO01e2mPaU4pA17qH7iEeKfRsrrqh4/t0hJQPEJSokULPFpJse0Iu0PNQNVSNnOu8ZHPWZc8TUhkBgECRikZMrp4Xq9W1NPubkIIUm4hnrtyikSIjq+jck3bOBQkpnSBrkU97ALl73pJqXfFc5AlJqN3cXvoTEKIzJcu5PSEFqHiGp6ahz+33Z3rWtpzhEfK16DO8XXi3S2vIvfUCHnpWrcsZHiHVAFUG0KQJoEgjGjGRFG1l9bq25gyPkIoANBcEab9DEPf27iCk40VbWa0uP86WkMsTQHPQHBSnJJHCytp1dW9Uz2cBQoo0PEqVes/r2bM0131CLtLzUCVUidw9n6uuaPY8IdnUYMet2BTccUtIfShnz60mBe65JaTunL/tVqTAbbeE1ImCc3vl16McIEiWc3tCClD5DM9Ak7ZFZCBkZEVzhkfI5/n6Hbdp+wF33BJSH8rZc6vISB/gnltCas/Z225FStdz2y0hZXE19lrt5p177NyR11+OHb/THhzJP86wP2uYrjvz1h92eTseNEzDbB2nd/OY1Py9WNw6/qjnN+fmvnmwnYkxjf1t+mAW7XlsbzaJ3a7DzH1sf3Udp7m/dcOf615sW26SdfvGrCaxbV4l9nEan0X0xqEaRrbvmnlrGFu3PTN3ndUoLOuapW8ODLzudLVomMHA71z/MwmT9mTmN+bOZnS9NcJDs+V53t+WPzQnbNa9/nRoCPl2AKqObKFvltEBoPvcVwNwmavxOy3IDwFAlkWCWPBqhJDC8GtsCPlGYI8ciQyRI+3/CLHHscysXvf0ynzWIOQsPr3wWllkxNQskD+b82/Ihi8qCCm150XpObXnc2RFs+cJqRhAE5AHpI8BOZbH5TQdlXB8JAUEIC4AvkFPSMEl/dQ+v74+2/bl6enFtm/v72+W/c/eHSW3CUNRGNZyjgiZNHE6fW2b6f63VGScCHSvI7CxjfH/tYnTU43CywFiAfnT/On+lunH3274R5G2zbv03rTj9F+z92+U7pqPX52PZjdM35uf6vxs3ofp799Kulf2B8CEc2JVjvJm6OIT5CO9PekvD/8T767XgTc2z1umnEdggyT5eX2s+k9yGpvH1kqvI523IVfSAzdlW2gbu3zn5+6j/JFcfIft0lBOi4/J6cbmBTZJTdPo9fV1/3pamqTUFCalOVkunVdNTU5bSa2Nn7ULjl0A7o5/aGt6Z6TKUpVC7/VLSrWzqTo7b+yzO+9i28shHtugl5cXXS9NLnyYHVZ+Nz79UG7y4in7Aqza9po+tBsXP1B8wCW3m01yVqq9G3w3q/X+/1lpZ5WEbKdOTnNsxiYtd+ngjl28Fw+zhwGwLA0/mDeIS46AxWnO2MVnUFD627+sasuAxyJpTsp3A+6WgnplGpILpL1JR21lZt5k2ZSrFPE41AteEy+Q9qrn58qW77lNM877sXXq+fcGLp/2giETZO5tTYumHObxKDQ0aezhxb2feNE0MWlvqZS1SzwsJZdslu3x9fYae8HFXYeAKcIVejxwzgwc0YE6jTzuWOAuqOS+GTY3rc+rmDxAKn7VEPAt+amm/7Yu8ev0gfnkHckljT8nSoaf/RkeNgUejaKburGiYt696FNIcXrt/3yJh8Qba+advg0BwJCk66Qamp3WvxtX1gMzSDZya+BU8y2OR+ogyk7w5h+Nox+/6S04pNunwKqpt9Db9yemA2GokjqThGR+ms1JeYMe92hu5y2Zbs5O5be7mkru2Hlpgc5j434M1NPiq0qqgXoaDkwqTU21V0s7dgY/TfLX9XMT1udx56RJqTqf5aqlR3vVqtOWaYpbp4NtW2tmPaXbwAZI0U1zroI/tiRW9oBVOtL5QT6uu2TH0nlgnXRSqsLkGXg+JnBTCjopVeGceXk2FnAtColkUynGMn1SrHXejq3Py4U5wHXZvtluJtXO27H+vFyMB9xElFIxNQ6fUmFj9Xm6Sr67SrA6b94Gfp4HLsb2rSM53VSMpseK1c7bsXbechs4zgO3EiUvs6kK7tgsUmlglaLkZiZVStzOBzoPrJHOS1VgVR5YuTPXz1VgXR5YM/+u9xglkyZRT2WqghlbnVc8CA+4mtxRp5vB7XxW7bw3LwvywI0pr5MN6HNNrUi/fUZO4o6tzxuiuO0GuLzUUdu3GOV3M6raeTu2Nm8aR+eBlVD1BnoVjowt0HBgnY51PrqdT/9yxtJ5YHWkeGKswoxJuMcGuIYoKdowKOQ4Xxov+4Zb/khU8Mf681a3gZ/0gYt1PjGdV1J2/mBS5z/58zrbQOeBE6zpGZgA7smRzgc6D2xKlORlCiUVKrfSslMAVulI56PX+XHv81g6D6yPFM+MVWCJDliLJdfoMhVYowPWYsk1ukwF1uiAu1R/Hh5v2wNb8r+9O0pBGAaiKLqdm/1vUCiFSCdhTIjWhntAwefY5sMxRW1ToJnZ89KjQTnuGzGUWB1DLkJtul0ofocn3SOf5wMu3mu97q30GN2e99he2gKEpj6Dkvwjj4tebb5d8EBAuhuUJJ87f96f4aT/1OlNz7GRfgg+WheCUFsfE16cpEFNx5exIUmHx09zd34AaRdACCDp+TVLSlFv1blzgKR2egx5zx/see0pn+djbR4FIVofz4/UeV67G3+vr3niC+H04Oz/nbwA7lqtm+wByfQAAAAASUVORK5CYII=') no-repeat;\n\twidth: 21px;\n\theight: 21px;\n\tbackground-position: 0 -5075px;\n}\n\n.font-graph-geSprite-endcircle {\n\tbackground: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAABeQCAMAAAByzXKPAAAA1VBMVEUAAAAzMzIzMzIzMzE1NTUzMzIzMzIzMzEzMzIyMjIzMzIzMzIzMzIzMzE6OjoyMjIzMzIzMzIzMzEzMzI0NDA0NDIwMDAyMjEzMzIzMzEzMzE0NDAzMzMzMzIyMjIzMzI0NDE0NDQyMjIzMzIzMzIzMzIzMzM5OTkAAAC1tbX///9mZmYwMDAQEBAmJiZTiPJ7e3v/Z2RwcHAgICB+fn5hYWFzc3NAQECoqKiampqMjIxTU1NGRkY3NzcbGxsNDQ3w8PBQUFDg4ODAwMCwsLCgoKBPT09W+xp5AAAAKHRSTlMAh4DDEd187+mljnhvVge5nmhMQi4hA8uxk2IlHOOYc102M/jW088J/2liTQAACt5JREFUeNrs3O1um0AQheG5nIPCoIq1Q7+r/Mn9X1K9xtEAM9RLQmODzyO1cV+NtzjShhjHkRkAgn9DMCaYnRXIGOQdtWmk1zRWm0vNN6az+Y+v2fXZ5iTX/kZ4ZGvUNT6/RJuCM/VVRKFB7YBwtnY1k3h2wboaHy8RFQC2VGuc1D730WWLS2GIZ27aM4yUT+9tXaLNw9m0mI9uokepRLeC+ZyCfFCoqwckqV3WBHFZaxHLFrNxVpgUVRWjg/jli2WbfH4WyxYnWcVV0Rz7FYj26X9ezQcuE3VYkXzFSYpm9eq6pqSiuNYAaj+r0GiFxKv5tEOqxVfV0utrCkZF/HCXTuOdGz2IHKbDR5wdJ6PdeRmIsfviED0C5ZV7ojf487v59fPHsT18//a1Yn1HJdoSjIUXBG5XgaBejhMYVmT9B1dRUONj4KtyRHNmNkULDYeD2CGVjiZ0paOK1jVuYKIpjJTO7m9dovvEn3bz/DH4440f2+d9fvlVh+4LLuK6cM8GVcKKkmq3ZqqBfbhaef4n+pijBudNZH3H+OW3No+rbTmVXjfciPbs/GVQ7QU6tWqUW5lonefHfn5f6xI9DAxdqQU3n55uU821mj2ZuUq0SYo2ivA5tThxk3rK6u+urYtZiqKuGiWMEkbp4/OFLITIvyrfekt35WGvjvP6OlERwP6+VU39z+ansp+0SThP8jk+0SeoAehRjObmdha0f2YwfucMss7uaPVF3rThN/EH6fH3YhEt3bD1zMlwGtu8/8a5zrHJuR6NyrkKMK5N5qqf9ev6Y4hfGfSPrc7ZWZqPQrQPa+x5Cfe8FO55m3Xrcs8T3TFUYQ0zqj5jTPoMmagQz4brFh8D3x5L9OngyRy+IEa0JgBRlaBWAIJYyVYjYDF47PwNV/TwAIRfB+BiFcyeolchija6+P7xd//IveI+JlpwnrdZP7xexdD6/4N/PDzP06NZdc8vP4H7WKFXLbqjQcU9T7QZvFhHdN/+sndmy6lCQRQ9KOA8Ro1TxjttYuUlX5BK5f+/6YJIWjlNFREkpLJXGQuWO01e2mPaU4pA17qH7iEeKfRsrrqh4/t0hJQPEJSokULPFpJse0Iu0PNQNVSNnOu8ZHPWZc8TUhkBgECRikZMrp4Xq9W1NPubkIIUm4hnrtyikSIjq+jck3bOBQkpnSBrkU97ALl73pJqXfFc5AlJqN3cXvoTEKIzJcu5PSEFqHiGp6ahz+33Z3rWtpzhEfK16DO8XXi3S2vIvfUCHnpWrcsZHiHVAFUG0KQJoEgjGjGRFG1l9bq25gyPkIoANBcEab9DEPf27iCk40VbWa0uP86WkMsTQHPQHBSnJJHCytp1dW9Uz2cBQoo0PEqVes/r2bM0131CLtLzUCVUidw9n6uuaPY8IdnUYMet2BTccUtIfShnz60mBe65JaTunL/tVqTAbbeE1ImCc3vl16McIEiWc3tCClD5DM9Ak7ZFZCBkZEVzhkfI5/n6Hbdp+wF33BJSH8rZc6vISB/gnltCas/Z225FStdz2y0hZXE19lrt5p177NyR11+OHb/THhzJP86wP2uYrjvz1h92eTseNEzDbB2nd/OY1Py9WNw6/qjnN+fmvnmwnYkxjf1t+mAW7XlsbzaJ3a7DzH1sf3Udp7m/dcOf615sW26SdfvGrCaxbV4l9nEan0X0xqEaRrbvmnlrGFu3PTN3ndUoLOuapW8ODLzudLVomMHA71z/MwmT9mTmN+bOZnS9NcJDs+V53t+WPzQnbNa9/nRoCPl2AKqObKFvltEBoPvcVwNwmavxOy3IDwFAlkWCWPBqhJDC8GtsCPlGYI8ciQyRI+3/CLHHscysXvf0ynzWIOQsPr3wWllkxNQskD+b82/Ihi8qCCm150XpObXnc2RFs+cJqRhAE5AHpI8BOZbH5TQdlXB8JAUEIC4AvkFPSMEl/dQ+v74+2/bl6enFtm/v72+W/c/eHSW3CUNRGNZyjgiZNHE6fW2b6f63VGScCHSvI7CxjfH/tYnTU43CywFiAfnT/On+lunH3274R5G2zbv03rTj9F+z92+U7pqPX52PZjdM35uf6vxs3ofp799Kulf2B8CEc2JVjvJm6OIT5CO9PekvD/8T767XgTc2z1umnEdggyT5eX2s+k9yGpvH1kqvI523IVfSAzdlW2gbu3zn5+6j/JFcfIft0lBOi4/J6cbmBTZJTdPo9fV1/3pamqTUFCalOVkunVdNTU5bSa2Nn7ULjl0A7o5/aGt6Z6TKUpVC7/VLSrWzqTo7b+yzO+9i28shHtugl5cXXS9NLnyYHVZ+Nz79UG7y4in7Aqza9po+tBsXP1B8wCW3m01yVqq9G3w3q/X+/1lpZ5WEbKdOTnNsxiYtd+ngjl28Fw+zhwGwLA0/mDeIS46AxWnO2MVnUFD627+sasuAxyJpTsp3A+6WgnplGpILpL1JR21lZt5k2ZSrFPE41AteEy+Q9qrn58qW77lNM877sXXq+fcGLp/2giETZO5tTYumHObxKDQ0aezhxb2feNE0MWlvqZS1SzwsJZdslu3x9fYae8HFXYeAKcIVejxwzgwc0YE6jTzuWOAuqOS+GTY3rc+rmDxAKn7VEPAt+amm/7Yu8ev0gfnkHckljT8nSoaf/RkeNgUejaKburGiYt696FNIcXrt/3yJh8Qba+advg0BwJCk66Qamp3WvxtX1gMzSDZya+BU8y2OR+ogyk7w5h+Nox+/6S04pNunwKqpt9Db9yemA2GokjqThGR+ms1JeYMe92hu5y2Zbs5O5be7mkru2Hlpgc5j434M1NPiq0qqgXoaDkwqTU21V0s7dgY/TfLX9XMT1udx56RJqTqf5aqlR3vVqtOWaYpbp4NtW2tmPaXbwAZI0U1zroI/tiRW9oBVOtL5QT6uu2TH0nlgnXRSqsLkGXg+JnBTCjopVeGceXk2FnAtColkUynGMn1SrHXejq3Py4U5wHXZvtluJtXO27H+vFyMB9xElFIxNQ6fUmFj9Xm6Sr67SrA6b94Gfp4HLsb2rSM53VSMpseK1c7bsXbechs4zgO3EiUvs6kK7tgsUmlglaLkZiZVStzOBzoPrJHOS1VgVR5YuTPXz1VgXR5YM/+u9xglkyZRT2WqghlbnVc8CA+4mtxRp5vB7XxW7bw3LwvywI0pr5MN6HNNrUi/fUZO4o6tzxuiuO0GuLzUUdu3GOV3M6raeTu2Nm8aR+eBlVD1BnoVjowt0HBgnY51PrqdT/9yxtJ5YHWkeGKswoxJuMcGuIYoKdowKOQ4Xxov+4Zb/khU8Mf681a3gZ/0gYt1PjGdV1J2/mBS5z/58zrbQOeBE6zpGZgA7smRzgc6D2xKlORlCiUVKrfSslMAVulI56PX+XHv81g6D6yPFM+MVWCJDliLJdfoMhVYowPWYsk1ukwF1uiAu1R/Hh5v2wNb8r+9O0pBGAaiKLqdm/1vUCiFSCdhTIjWhntAwefY5sMxRW1ToJnZ89KjQTnuGzGUWB1DLkJtul0ofocn3SOf5wMu3mu97q30GN2e99he2gKEpj6Dkvwjj4tebb5d8EBAuhuUJJ87f96f4aT/1OlNz7GRfgg+WheCUFsfE16cpEFNx5exIUmHx09zd34AaRdACCDp+TVLSlFv1blzgKR2egx5zx/see0pn+djbR4FIVofz4/UeV67G3+vr3niC+H04Oz/nbwA7lqtm+wByfQAAAAASUVORK5CYII=') no-repeat;\n\twidth: 21px;\n\theight: 21px;\n\tbackground-position: 0 -5121px;\n}\n\n.font-graph-geSprite-endasync {\n\tbackground: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAABeQCAMAAAByzXKPAAAA1VBMVEUAAAAzMzIzMzIzMzE1NTUzMzIzMzIzMzEzMzIyMjIzMzIzMzIzMzIzMzE6OjoyMjIzMzIzMzIzMzEzMzI0NDA0NDIwMDAyMjEzMzIzMzEzMzE0NDAzMzMzMzIyMjIzMzI0NDE0NDQyMjIzMzIzMzIzMzIzMzM5OTkAAAC1tbX///9mZmYwMDAQEBAmJiZTiPJ7e3v/Z2RwcHAgICB+fn5hYWFzc3NAQECoqKiampqMjIxTU1NGRkY3NzcbGxsNDQ3w8PBQUFDg4ODAwMCwsLCgoKBPT09W+xp5AAAAKHRSTlMAh4DDEd187+mljnhvVge5nmhMQi4hA8uxk2IlHOOYc102M/jW088J/2liTQAACt5JREFUeNrs3O1um0AQheG5nIPCoIq1Q7+r/Mn9X1K9xtEAM9RLQmODzyO1cV+NtzjShhjHkRkAgn9DMCaYnRXIGOQdtWmk1zRWm0vNN6az+Y+v2fXZ5iTX/kZ4ZGvUNT6/RJuCM/VVRKFB7YBwtnY1k3h2wboaHy8RFQC2VGuc1D730WWLS2GIZ27aM4yUT+9tXaLNw9m0mI9uokepRLeC+ZyCfFCoqwckqV3WBHFZaxHLFrNxVpgUVRWjg/jli2WbfH4WyxYnWcVV0Rz7FYj26X9ezQcuE3VYkXzFSYpm9eq6pqSiuNYAaj+r0GiFxKv5tEOqxVfV0utrCkZF/HCXTuOdGz2IHKbDR5wdJ6PdeRmIsfviED0C5ZV7ojf487v59fPHsT18//a1Yn1HJdoSjIUXBG5XgaBejhMYVmT9B1dRUONj4KtyRHNmNkULDYeD2CGVjiZ0paOK1jVuYKIpjJTO7m9dovvEn3bz/DH4440f2+d9fvlVh+4LLuK6cM8GVcKKkmq3ZqqBfbhaef4n+pijBudNZH3H+OW3No+rbTmVXjfciPbs/GVQ7QU6tWqUW5lonefHfn5f6xI9DAxdqQU3n55uU821mj2ZuUq0SYo2ivA5tThxk3rK6u+urYtZiqKuGiWMEkbp4/OFLITIvyrfekt35WGvjvP6OlERwP6+VU39z+ansp+0SThP8jk+0SeoAehRjObmdha0f2YwfucMss7uaPVF3rThN/EH6fH3YhEt3bD1zMlwGtu8/8a5zrHJuR6NyrkKMK5N5qqf9ev6Y4hfGfSPrc7ZWZqPQrQPa+x5Cfe8FO55m3Xrcs8T3TFUYQ0zqj5jTPoMmagQz4brFh8D3x5L9OngyRy+IEa0JgBRlaBWAIJYyVYjYDF47PwNV/TwAIRfB+BiFcyeolchija6+P7xd//IveI+JlpwnrdZP7xexdD6/4N/PDzP06NZdc8vP4H7WKFXLbqjQcU9T7QZvFhHdN/+sndmy6lCQRQ9KOA8Ro1TxjttYuUlX5BK5f+/6YJIWjlNFREkpLJXGQuWO01e2mPaU4pA17qH7iEeKfRsrrqh4/t0hJQPEJSokULPFpJse0Iu0PNQNVSNnOu8ZHPWZc8TUhkBgECRikZMrp4Xq9W1NPubkIIUm4hnrtyikSIjq+jck3bOBQkpnSBrkU97ALl73pJqXfFc5AlJqN3cXvoTEKIzJcu5PSEFqHiGp6ahz+33Z3rWtpzhEfK16DO8XXi3S2vIvfUCHnpWrcsZHiHVAFUG0KQJoEgjGjGRFG1l9bq25gyPkIoANBcEab9DEPf27iCk40VbWa0uP86WkMsTQHPQHBSnJJHCytp1dW9Uz2cBQoo0PEqVes/r2bM0131CLtLzUCVUidw9n6uuaPY8IdnUYMet2BTccUtIfShnz60mBe65JaTunL/tVqTAbbeE1ImCc3vl16McIEiWc3tCClD5DM9Ak7ZFZCBkZEVzhkfI5/n6Hbdp+wF33BJSH8rZc6vISB/gnltCas/Z225FStdz2y0hZXE19lrt5p177NyR11+OHb/THhzJP86wP2uYrjvz1h92eTseNEzDbB2nd/OY1Py9WNw6/qjnN+fmvnmwnYkxjf1t+mAW7XlsbzaJ3a7DzH1sf3Udp7m/dcOf615sW26SdfvGrCaxbV4l9nEan0X0xqEaRrbvmnlrGFu3PTN3ndUoLOuapW8ODLzudLVomMHA71z/MwmT9mTmN+bOZnS9NcJDs+V53t+WPzQnbNa9/nRoCPl2AKqObKFvltEBoPvcVwNwmavxOy3IDwFAlkWCWPBqhJDC8GtsCPlGYI8ciQyRI+3/CLHHscysXvf0ynzWIOQsPr3wWllkxNQskD+b82/Ihi8qCCm150XpObXnc2RFs+cJqRhAE5AHpI8BOZbH5TQdlXB8JAUEIC4AvkFPSMEl/dQ+v74+2/bl6enFtm/v72+W/c/eHSW3CUNRGNZyjgiZNHE6fW2b6f63VGScCHSvI7CxjfH/tYnTU43CywFiAfnT/On+lunH3274R5G2zbv03rTj9F+z92+U7pqPX52PZjdM35uf6vxs3ofp799Kulf2B8CEc2JVjvJm6OIT5CO9PekvD/8T767XgTc2z1umnEdggyT5eX2s+k9yGpvH1kqvI523IVfSAzdlW2gbu3zn5+6j/JFcfIft0lBOi4/J6cbmBTZJTdPo9fV1/3pamqTUFCalOVkunVdNTU5bSa2Nn7ULjl0A7o5/aGt6Z6TKUpVC7/VLSrWzqTo7b+yzO+9i28shHtugl5cXXS9NLnyYHVZ+Nz79UG7y4in7Aqza9po+tBsXP1B8wCW3m01yVqq9G3w3q/X+/1lpZ5WEbKdOTnNsxiYtd+ngjl28Fw+zhwGwLA0/mDeIS46AxWnO2MVnUFD627+sasuAxyJpTsp3A+6WgnplGpILpL1JR21lZt5k2ZSrFPE41AteEy+Q9qrn58qW77lNM877sXXq+fcGLp/2giETZO5tTYumHObxKDQ0aezhxb2feNE0MWlvqZS1SzwsJZdslu3x9fYae8HFXYeAKcIVejxwzgwc0YE6jTzuWOAuqOS+GTY3rc+rmDxAKn7VEPAt+amm/7Yu8ev0gfnkHckljT8nSoaf/RkeNgUejaKburGiYt696FNIcXrt/3yJh8Qba+advg0BwJCk66Qamp3WvxtX1gMzSDZya+BU8y2OR+ogyk7w5h+Nox+/6S04pNunwKqpt9Db9yemA2GokjqThGR+ms1JeYMe92hu5y2Zbs5O5be7mkru2Hlpgc5j434M1NPiq0qqgXoaDkwqTU21V0s7dgY/TfLX9XMT1udx56RJqTqf5aqlR3vVqtOWaYpbp4NtW2tmPaXbwAZI0U1zroI/tiRW9oBVOtL5QT6uu2TH0nlgnXRSqsLkGXg+JnBTCjopVeGceXk2FnAtColkUynGMn1SrHXejq3Py4U5wHXZvtluJtXO27H+vFyMB9xElFIxNQ6fUmFj9Xm6Sr67SrA6b94Gfp4HLsb2rSM53VSMpseK1c7bsXbechs4zgO3EiUvs6kK7tgsUmlglaLkZiZVStzOBzoPrJHOS1VgVR5YuTPXz1VgXR5YM/+u9xglkyZRT2WqghlbnVc8CA+4mtxRp5vB7XxW7bw3LwvywI0pr5MN6HNNrUi/fUZO4o6tzxuiuO0GuLzUUdu3GOV3M6raeTu2Nm8aR+eBlVD1BnoVjowt0HBgnY51PrqdT/9yxtJ5YHWkeGKswoxJuMcGuIYoKdowKOQ4Xxov+4Zb/khU8Mf681a3gZ/0gYt1PjGdV1J2/mBS5z/58zrbQOeBE6zpGZgA7smRzgc6D2xKlORlCiUVKrfSslMAVulI56PX+XHv81g6D6yPFM+MVWCJDliLJdfoMhVYowPWYsk1ukwF1uiAu1R/Hh5v2wNb8r+9O0pBGAaiKLqdm/1vUCiFSCdhTIjWhntAwefY5sMxRW1ToJnZ89KjQTnuGzGUWB1DLkJtul0ofocn3SOf5wMu3mu97q30GN2e99he2gKEpj6Dkvwjj4tebb5d8EBAuhuUJJ87f96f4aT/1OlNz7GRfgg+WheCUFsfE16cpEFNx5exIUmHx09zd34AaRdACCDp+TVLSlFv1blzgKR2egx5zx/see0pn+djbR4FIVofz4/UeV67G3+vr3niC+H04Oz/nbwA7lqtm+wByfQAAAAASUVORK5CYII=') no-repeat;\n\twidth: 21px;\n\theight: 21px;\n\tbackground-position: 0 -5167px;\n}\n\n.font-graph-geSprite-endasynctrans {\n\tbackground: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAABeQCAMAAAByzXKPAAAA1VBMVEUAAAAzMzIzMzIzMzE1NTUzMzIzMzIzMzEzMzIyMjIzMzIzMzIzMzIzMzE6OjoyMjIzMzIzMzIzMzEzMzI0NDA0NDIwMDAyMjEzMzIzMzEzMzE0NDAzMzMzMzIyMjIzMzI0NDE0NDQyMjIzMzIzMzIzMzIzMzM5OTkAAAC1tbX///9mZmYwMDAQEBAmJiZTiPJ7e3v/Z2RwcHAgICB+fn5hYWFzc3NAQECoqKiampqMjIxTU1NGRkY3NzcbGxsNDQ3w8PBQUFDg4ODAwMCwsLCgoKBPT09W+xp5AAAAKHRSTlMAh4DDEd187+mljnhvVge5nmhMQi4hA8uxk2IlHOOYc102M/jW088J/2liTQAACt5JREFUeNrs3O1um0AQheG5nIPCoIq1Q7+r/Mn9X1K9xtEAM9RLQmODzyO1cV+NtzjShhjHkRkAgn9DMCaYnRXIGOQdtWmk1zRWm0vNN6az+Y+v2fXZ5iTX/kZ4ZGvUNT6/RJuCM/VVRKFB7YBwtnY1k3h2wboaHy8RFQC2VGuc1D730WWLS2GIZ27aM4yUT+9tXaLNw9m0mI9uokepRLeC+ZyCfFCoqwckqV3WBHFZaxHLFrNxVpgUVRWjg/jli2WbfH4WyxYnWcVV0Rz7FYj26X9ezQcuE3VYkXzFSYpm9eq6pqSiuNYAaj+r0GiFxKv5tEOqxVfV0utrCkZF/HCXTuOdGz2IHKbDR5wdJ6PdeRmIsfviED0C5ZV7ojf487v59fPHsT18//a1Yn1HJdoSjIUXBG5XgaBejhMYVmT9B1dRUONj4KtyRHNmNkULDYeD2CGVjiZ0paOK1jVuYKIpjJTO7m9dovvEn3bz/DH4440f2+d9fvlVh+4LLuK6cM8GVcKKkmq3ZqqBfbhaef4n+pijBudNZH3H+OW3No+rbTmVXjfciPbs/GVQ7QU6tWqUW5lonefHfn5f6xI9DAxdqQU3n55uU821mj2ZuUq0SYo2ivA5tThxk3rK6u+urYtZiqKuGiWMEkbp4/OFLITIvyrfekt35WGvjvP6OlERwP6+VU39z+ansp+0SThP8jk+0SeoAehRjObmdha0f2YwfucMss7uaPVF3rThN/EH6fH3YhEt3bD1zMlwGtu8/8a5zrHJuR6NyrkKMK5N5qqf9ev6Y4hfGfSPrc7ZWZqPQrQPa+x5Cfe8FO55m3Xrcs8T3TFUYQ0zqj5jTPoMmagQz4brFh8D3x5L9OngyRy+IEa0JgBRlaBWAIJYyVYjYDF47PwNV/TwAIRfB+BiFcyeolchija6+P7xd//IveI+JlpwnrdZP7xexdD6/4N/PDzP06NZdc8vP4H7WKFXLbqjQcU9T7QZvFhHdN/+sndmy6lCQRQ9KOA8Ro1TxjttYuUlX5BK5f+/6YJIWjlNFREkpLJXGQuWO01e2mPaU4pA17qH7iEeKfRsrrqh4/t0hJQPEJSokULPFpJse0Iu0PNQNVSNnOu8ZHPWZc8TUhkBgECRikZMrp4Xq9W1NPubkIIUm4hnrtyikSIjq+jck3bOBQkpnSBrkU97ALl73pJqXfFc5AlJqN3cXvoTEKIzJcu5PSEFqHiGp6ahz+33Z3rWtpzhEfK16DO8XXi3S2vIvfUCHnpWrcsZHiHVAFUG0KQJoEgjGjGRFG1l9bq25gyPkIoANBcEab9DEPf27iCk40VbWa0uP86WkMsTQHPQHBSnJJHCytp1dW9Uz2cBQoo0PEqVes/r2bM0131CLtLzUCVUidw9n6uuaPY8IdnUYMet2BTccUtIfShnz60mBe65JaTunL/tVqTAbbeE1ImCc3vl16McIEiWc3tCClD5DM9Ak7ZFZCBkZEVzhkfI5/n6Hbdp+wF33BJSH8rZc6vISB/gnltCas/Z225FStdz2y0hZXE19lrt5p177NyR11+OHb/THhzJP86wP2uYrjvz1h92eTseNEzDbB2nd/OY1Py9WNw6/qjnN+fmvnmwnYkxjf1t+mAW7XlsbzaJ3a7DzH1sf3Udp7m/dcOf615sW26SdfvGrCaxbV4l9nEan0X0xqEaRrbvmnlrGFu3PTN3ndUoLOuapW8ODLzudLVomMHA71z/MwmT9mTmN+bOZnS9NcJDs+V53t+WPzQnbNa9/nRoCPl2AKqObKFvltEBoPvcVwNwmavxOy3IDwFAlkWCWPBqhJDC8GtsCPlGYI8ciQyRI+3/CLHHscysXvf0ynzWIOQsPr3wWllkxNQskD+b82/Ihi8qCCm150XpObXnc2RFs+cJqRhAE5AHpI8BOZbH5TQdlXB8JAUEIC4AvkFPSMEl/dQ+v74+2/bl6enFtm/v72+W/c/eHSW3CUNRGNZyjgiZNHE6fW2b6f63VGScCHSvI7CxjfH/tYnTU43CywFiAfnT/On+lunH3274R5G2zbv03rTj9F+z92+U7pqPX52PZjdM35uf6vxs3ofp799Kulf2B8CEc2JVjvJm6OIT5CO9PekvD/8T767XgTc2z1umnEdggyT5eX2s+k9yGpvH1kqvI523IVfSAzdlW2gbu3zn5+6j/JFcfIft0lBOi4/J6cbmBTZJTdPo9fV1/3pamqTUFCalOVkunVdNTU5bSa2Nn7ULjl0A7o5/aGt6Z6TKUpVC7/VLSrWzqTo7b+yzO+9i28shHtugl5cXXS9NLnyYHVZ+Nz79UG7y4in7Aqza9po+tBsXP1B8wCW3m01yVqq9G3w3q/X+/1lpZ5WEbKdOTnNsxiYtd+ngjl28Fw+zhwGwLA0/mDeIS46AxWnO2MVnUFD627+sasuAxyJpTsp3A+6WgnplGpILpL1JR21lZt5k2ZSrFPE41AteEy+Q9qrn58qW77lNM877sXXq+fcGLp/2giETZO5tTYumHObxKDQ0aezhxb2feNE0MWlvqZS1SzwsJZdslu3x9fYae8HFXYeAKcIVejxwzgwc0YE6jTzuWOAuqOS+GTY3rc+rmDxAKn7VEPAt+amm/7Yu8ev0gfnkHckljT8nSoaf/RkeNgUejaKburGiYt696FNIcXrt/3yJh8Qba+advg0BwJCk66Qamp3WvxtX1gMzSDZya+BU8y2OR+ogyk7w5h+Nox+/6S04pNunwKqpt9Db9yemA2GokjqThGR+ms1JeYMe92hu5y2Zbs5O5be7mkru2Hlpgc5j434M1NPiq0qqgXoaDkwqTU21V0s7dgY/TfLX9XMT1udx56RJqTqf5aqlR3vVqtOWaYpbp4NtW2tmPaXbwAZI0U1zroI/tiRW9oBVOtL5QT6uu2TH0nlgnXRSqsLkGXg+JnBTCjopVeGceXk2FnAtColkUynGMn1SrHXejq3Py4U5wHXZvtluJtXO27H+vFyMB9xElFIxNQ6fUmFj9Xm6Sr67SrA6b94Gfp4HLsb2rSM53VSMpseK1c7bsXbechs4zgO3EiUvs6kK7tgsUmlglaLkZiZVStzOBzoPrJHOS1VgVR5YuTPXz1VgXR5YM/+u9xglkyZRT2WqghlbnVc8CA+4mtxRp5vB7XxW7bw3LwvywI0pr5MN6HNNrUi/fUZO4o6tzxuiuO0GuLzUUdu3GOV3M6raeTu2Nm8aR+eBlVD1BnoVjowt0HBgnY51PrqdT/9yxtJ5YHWkeGKswoxJuMcGuIYoKdowKOQ4Xxov+4Zb/khU8Mf681a3gZ/0gYt1PjGdV1J2/mBS5z/58zrbQOeBE6zpGZgA7smRzgc6D2xKlORlCiUVKrfSslMAVulI56PX+XHv81g6D6yPFM+MVWCJDliLJdfoMhVYowPWYsk1ukwF1uiAu1R/Hh5v2wNb8r+9O0pBGAaiKLqdm/1vUCiFSCdhTIjWhntAwefY5sMxRW1ToJnZ89KjQTnuGzGUWB1DLkJtul0ofocn3SOf5wMu3mu97q30GN2e99he2gKEpj6Dkvwjj4tebb5d8EBAuhuUJJ87f96f4aT/1OlNz7GRfgg+WheCUFsfE16cpEFNx5exIUmHx09zd34AaRdACCDp+TVLSlFv1blzgKR2egx5zx/see0pn+djbR4FIVofz4/UeV67G3+vr3niC+H04Oz/nbwA7lqtm+wByfQAAAAASUVORK5CYII=') no-repeat;\n\twidth: 21px;\n\theight: 21px;\n\tbackground-position: 0 -5213px;\n}\n\n.font-graph-geSprite-startblockthin {\n\tbackground: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAABeQCAMAAAByzXKPAAAA1VBMVEUAAAAzMzIzMzIzMzE1NTUzMzIzMzIzMzEzMzIyMjIzMzIzMzIzMzIzMzE6OjoyMjIzMzIzMzIzMzEzMzI0NDA0NDIwMDAyMjEzMzIzMzEzMzE0NDAzMzMzMzIyMjIzMzI0NDE0NDQyMjIzMzIzMzIzMzIzMzM5OTkAAAC1tbX///9mZmYwMDAQEBAmJiZTiPJ7e3v/Z2RwcHAgICB+fn5hYWFzc3NAQECoqKiampqMjIxTU1NGRkY3NzcbGxsNDQ3w8PBQUFDg4ODAwMCwsLCgoKBPT09W+xp5AAAAKHRSTlMAh4DDEd187+mljnhvVge5nmhMQi4hA8uxk2IlHOOYc102M/jW088J/2liTQAACt5JREFUeNrs3O1um0AQheG5nIPCoIq1Q7+r/Mn9X1K9xtEAM9RLQmODzyO1cV+NtzjShhjHkRkAgn9DMCaYnRXIGOQdtWmk1zRWm0vNN6az+Y+v2fXZ5iTX/kZ4ZGvUNT6/RJuCM/VVRKFB7YBwtnY1k3h2wboaHy8RFQC2VGuc1D730WWLS2GIZ27aM4yUT+9tXaLNw9m0mI9uokepRLeC+ZyCfFCoqwckqV3WBHFZaxHLFrNxVpgUVRWjg/jli2WbfH4WyxYnWcVV0Rz7FYj26X9ezQcuE3VYkXzFSYpm9eq6pqSiuNYAaj+r0GiFxKv5tEOqxVfV0utrCkZF/HCXTuOdGz2IHKbDR5wdJ6PdeRmIsfviED0C5ZV7ojf487v59fPHsT18//a1Yn1HJdoSjIUXBG5XgaBejhMYVmT9B1dRUONj4KtyRHNmNkULDYeD2CGVjiZ0paOK1jVuYKIpjJTO7m9dovvEn3bz/DH4440f2+d9fvlVh+4LLuK6cM8GVcKKkmq3ZqqBfbhaef4n+pijBudNZH3H+OW3No+rbTmVXjfciPbs/GVQ7QU6tWqUW5lonefHfn5f6xI9DAxdqQU3n55uU821mj2ZuUq0SYo2ivA5tThxk3rK6u+urYtZiqKuGiWMEkbp4/OFLITIvyrfekt35WGvjvP6OlERwP6+VU39z+ansp+0SThP8jk+0SeoAehRjObmdha0f2YwfucMss7uaPVF3rThN/EH6fH3YhEt3bD1zMlwGtu8/8a5zrHJuR6NyrkKMK5N5qqf9ev6Y4hfGfSPrc7ZWZqPQrQPa+x5Cfe8FO55m3Xrcs8T3TFUYQ0zqj5jTPoMmagQz4brFh8D3x5L9OngyRy+IEa0JgBRlaBWAIJYyVYjYDF47PwNV/TwAIRfB+BiFcyeolchija6+P7xd//IveI+JlpwnrdZP7xexdD6/4N/PDzP06NZdc8vP4H7WKFXLbqjQcU9T7QZvFhHdN/+sndmy6lCQRQ9KOA8Ro1TxjttYuUlX5BK5f+/6YJIWjlNFREkpLJXGQuWO01e2mPaU4pA17qH7iEeKfRsrrqh4/t0hJQPEJSokULPFpJse0Iu0PNQNVSNnOu8ZHPWZc8TUhkBgECRikZMrp4Xq9W1NPubkIIUm4hnrtyikSIjq+jck3bOBQkpnSBrkU97ALl73pJqXfFc5AlJqN3cXvoTEKIzJcu5PSEFqHiGp6ahz+33Z3rWtpzhEfK16DO8XXi3S2vIvfUCHnpWrcsZHiHVAFUG0KQJoEgjGjGRFG1l9bq25gyPkIoANBcEab9DEPf27iCk40VbWa0uP86WkMsTQHPQHBSnJJHCytp1dW9Uz2cBQoo0PEqVes/r2bM0131CLtLzUCVUidw9n6uuaPY8IdnUYMet2BTccUtIfShnz60mBe65JaTunL/tVqTAbbeE1ImCc3vl16McIEiWc3tCClD5DM9Ak7ZFZCBkZEVzhkfI5/n6Hbdp+wF33BJSH8rZc6vISB/gnltCas/Z225FStdz2y0hZXE19lrt5p177NyR11+OHb/THhzJP86wP2uYrjvz1h92eTseNEzDbB2nd/OY1Py9WNw6/qjnN+fmvnmwnYkxjf1t+mAW7XlsbzaJ3a7DzH1sf3Udp7m/dcOf615sW26SdfvGrCaxbV4l9nEan0X0xqEaRrbvmnlrGFu3PTN3ndUoLOuapW8ODLzudLVomMHA71z/MwmT9mTmN+bOZnS9NcJDs+V53t+WPzQnbNa9/nRoCPl2AKqObKFvltEBoPvcVwNwmavxOy3IDwFAlkWCWPBqhJDC8GtsCPlGYI8ciQyRI+3/CLHHscysXvf0ynzWIOQsPr3wWllkxNQskD+b82/Ihi8qCCm150XpObXnc2RFs+cJqRhAE5AHpI8BOZbH5TQdlXB8JAUEIC4AvkFPSMEl/dQ+v74+2/bl6enFtm/v72+W/c/eHSW3CUNRGNZyjgiZNHE6fW2b6f63VGScCHSvI7CxjfH/tYnTU43CywFiAfnT/On+lunH3274R5G2zbv03rTj9F+z92+U7pqPX52PZjdM35uf6vxs3ofp799Kulf2B8CEc2JVjvJm6OIT5CO9PekvD/8T767XgTc2z1umnEdggyT5eX2s+k9yGpvH1kqvI523IVfSAzdlW2gbu3zn5+6j/JFcfIft0lBOi4/J6cbmBTZJTdPo9fV1/3pamqTUFCalOVkunVdNTU5bSa2Nn7ULjl0A7o5/aGt6Z6TKUpVC7/VLSrWzqTo7b+yzO+9i28shHtugl5cXXS9NLnyYHVZ+Nz79UG7y4in7Aqza9po+tBsXP1B8wCW3m01yVqq9G3w3q/X+/1lpZ5WEbKdOTnNsxiYtd+ngjl28Fw+zhwGwLA0/mDeIS46AxWnO2MVnUFD627+sasuAxyJpTsp3A+6WgnplGpILpL1JR21lZt5k2ZSrFPE41AteEy+Q9qrn58qW77lNM877sXXq+fcGLp/2giETZO5tTYumHObxKDQ0aezhxb2feNE0MWlvqZS1SzwsJZdslu3x9fYae8HFXYeAKcIVejxwzgwc0YE6jTzuWOAuqOS+GTY3rc+rmDxAKn7VEPAt+amm/7Yu8ev0gfnkHckljT8nSoaf/RkeNgUejaKburGiYt696FNIcXrt/3yJh8Qba+advg0BwJCk66Qamp3WvxtX1gMzSDZya+BU8y2OR+ogyk7w5h+Nox+/6S04pNunwKqpt9Db9yemA2GokjqThGR+ms1JeYMe92hu5y2Zbs5O5be7mkru2Hlpgc5j434M1NPiq0qqgXoaDkwqTU21V0s7dgY/TfLX9XMT1udx56RJqTqf5aqlR3vVqtOWaYpbp4NtW2tmPaXbwAZI0U1zroI/tiRW9oBVOtL5QT6uu2TH0nlgnXRSqsLkGXg+JnBTCjopVeGceXk2FnAtColkUynGMn1SrHXejq3Py4U5wHXZvtluJtXO27H+vFyMB9xElFIxNQ6fUmFj9Xm6Sr67SrA6b94Gfp4HLsb2rSM53VSMpseK1c7bsXbechs4zgO3EiUvs6kK7tgsUmlglaLkZiZVStzOBzoPrJHOS1VgVR5YuTPXz1VgXR5YM/+u9xglkyZRT2WqghlbnVc8CA+4mtxRp5vB7XxW7bw3LwvywI0pr5MN6HNNrUi/fUZO4o6tzxuiuO0GuLzUUdu3GOV3M6raeTu2Nm8aR+eBlVD1BnoVjowt0HBgnY51PrqdT/9yxtJ5YHWkeGKswoxJuMcGuIYoKdowKOQ4Xxov+4Zb/khU8Mf681a3gZ/0gYt1PjGdV1J2/mBS5z/58zrbQOeBE6zpGZgA7smRzgc6D2xKlORlCiUVKrfSslMAVulI56PX+XHv81g6D6yPFM+MVWCJDliLJdfoMhVYowPWYsk1ukwF1uiAu1R/Hh5v2wNb8r+9O0pBGAaiKLqdm/1vUCiFSCdhTIjWhntAwefY5sMxRW1ToJnZ89KjQTnuGzGUWB1DLkJtul0ofocn3SOf5wMu3mu97q30GN2e99he2gKEpj6Dkvwjj4tebb5d8EBAuhuUJJ87f96f4aT/1OlNz7GRfgg+WheCUFsfE16cpEFNx5exIUmHx09zd34AaRdACCDp+TVLSlFv1blzgKR2egx5zx/see0pn+djbR4FIVofz4/UeV67G3+vr3niC+H04Oz/nbwA7lqtm+wByfQAAAAASUVORK5CYII=') no-repeat;\n\twidth: 21px;\n\theight: 21px;\n\tbackground-position: 0 -4569px;\n}\n\n.font-graph-geSprite-startblockthintrans {\n\tbackground: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAABeQCAMAAAByzXKPAAAA1VBMVEUAAAAzMzIzMzIzMzE1NTUzMzIzMzIzMzEzMzIyMjIzMzIzMzIzMzIzMzE6OjoyMjIzMzIzMzIzMzEzMzI0NDA0NDIwMDAyMjEzMzIzMzEzMzE0NDAzMzMzMzIyMjIzMzI0NDE0NDQyMjIzMzIzMzIzMzIzMzM5OTkAAAC1tbX///9mZmYwMDAQEBAmJiZTiPJ7e3v/Z2RwcHAgICB+fn5hYWFzc3NAQECoqKiampqMjIxTU1NGRkY3NzcbGxsNDQ3w8PBQUFDg4ODAwMCwsLCgoKBPT09W+xp5AAAAKHRSTlMAh4DDEd187+mljnhvVge5nmhMQi4hA8uxk2IlHOOYc102M/jW088J/2liTQAACt5JREFUeNrs3O1um0AQheG5nIPCoIq1Q7+r/Mn9X1K9xtEAM9RLQmODzyO1cV+NtzjShhjHkRkAgn9DMCaYnRXIGOQdtWmk1zRWm0vNN6az+Y+v2fXZ5iTX/kZ4ZGvUNT6/RJuCM/VVRKFB7YBwtnY1k3h2wboaHy8RFQC2VGuc1D730WWLS2GIZ27aM4yUT+9tXaLNw9m0mI9uokepRLeC+ZyCfFCoqwckqV3WBHFZaxHLFrNxVpgUVRWjg/jli2WbfH4WyxYnWcVV0Rz7FYj26X9ezQcuE3VYkXzFSYpm9eq6pqSiuNYAaj+r0GiFxKv5tEOqxVfV0utrCkZF/HCXTuOdGz2IHKbDR5wdJ6PdeRmIsfviED0C5ZV7ojf487v59fPHsT18//a1Yn1HJdoSjIUXBG5XgaBejhMYVmT9B1dRUONj4KtyRHNmNkULDYeD2CGVjiZ0paOK1jVuYKIpjJTO7m9dovvEn3bz/DH4440f2+d9fvlVh+4LLuK6cM8GVcKKkmq3ZqqBfbhaef4n+pijBudNZH3H+OW3No+rbTmVXjfciPbs/GVQ7QU6tWqUW5lonefHfn5f6xI9DAxdqQU3n55uU821mj2ZuUq0SYo2ivA5tThxk3rK6u+urYtZiqKuGiWMEkbp4/OFLITIvyrfekt35WGvjvP6OlERwP6+VU39z+ansp+0SThP8jk+0SeoAehRjObmdha0f2YwfucMss7uaPVF3rThN/EH6fH3YhEt3bD1zMlwGtu8/8a5zrHJuR6NyrkKMK5N5qqf9ev6Y4hfGfSPrc7ZWZqPQrQPa+x5Cfe8FO55m3Xrcs8T3TFUYQ0zqj5jTPoMmagQz4brFh8D3x5L9OngyRy+IEa0JgBRlaBWAIJYyVYjYDF47PwNV/TwAIRfB+BiFcyeolchija6+P7xd//IveI+JlpwnrdZP7xexdD6/4N/PDzP06NZdc8vP4H7WKFXLbqjQcU9T7QZvFhHdN/+sndmy6lCQRQ9KOA8Ro1TxjttYuUlX5BK5f+/6YJIWjlNFREkpLJXGQuWO01e2mPaU4pA17qH7iEeKfRsrrqh4/t0hJQPEJSokULPFpJse0Iu0PNQNVSNnOu8ZHPWZc8TUhkBgECRikZMrp4Xq9W1NPubkIIUm4hnrtyikSIjq+jck3bOBQkpnSBrkU97ALl73pJqXfFc5AlJqN3cXvoTEKIzJcu5PSEFqHiGp6ahz+33Z3rWtpzhEfK16DO8XXi3S2vIvfUCHnpWrcsZHiHVAFUG0KQJoEgjGjGRFG1l9bq25gyPkIoANBcEab9DEPf27iCk40VbWa0uP86WkMsTQHPQHBSnJJHCytp1dW9Uz2cBQoo0PEqVes/r2bM0131CLtLzUCVUidw9n6uuaPY8IdnUYMet2BTccUtIfShnz60mBe65JaTunL/tVqTAbbeE1ImCc3vl16McIEiWc3tCClD5DM9Ak7ZFZCBkZEVzhkfI5/n6Hbdp+wF33BJSH8rZc6vISB/gnltCas/Z225FStdz2y0hZXE19lrt5p177NyR11+OHb/THhzJP86wP2uYrjvz1h92eTseNEzDbB2nd/OY1Py9WNw6/qjnN+fmvnmwnYkxjf1t+mAW7XlsbzaJ3a7DzH1sf3Udp7m/dcOf615sW26SdfvGrCaxbV4l9nEan0X0xqEaRrbvmnlrGFu3PTN3ndUoLOuapW8ODLzudLVomMHA71z/MwmT9mTmN+bOZnS9NcJDs+V53t+WPzQnbNa9/nRoCPl2AKqObKFvltEBoPvcVwNwmavxOy3IDwFAlkWCWPBqhJDC8GtsCPlGYI8ciQyRI+3/CLHHscysXvf0ynzWIOQsPr3wWllkxNQskD+b82/Ihi8qCCm150XpObXnc2RFs+cJqRhAE5AHpI8BOZbH5TQdlXB8JAUEIC4AvkFPSMEl/dQ+v74+2/bl6enFtm/v72+W/c/eHSW3CUNRGNZyjgiZNHE6fW2b6f63VGScCHSvI7CxjfH/tYnTU43CywFiAfnT/On+lunH3274R5G2zbv03rTj9F+z92+U7pqPX52PZjdM35uf6vxs3ofp799Kulf2B8CEc2JVjvJm6OIT5CO9PekvD/8T767XgTc2z1umnEdggyT5eX2s+k9yGpvH1kqvI523IVfSAzdlW2gbu3zn5+6j/JFcfIft0lBOi4/J6cbmBTZJTdPo9fV1/3pamqTUFCalOVkunVdNTU5bSa2Nn7ULjl0A7o5/aGt6Z6TKUpVC7/VLSrWzqTo7b+yzO+9i28shHtugl5cXXS9NLnyYHVZ+Nz79UG7y4in7Aqza9po+tBsXP1B8wCW3m01yVqq9G3w3q/X+/1lpZ5WEbKdOTnNsxiYtd+ngjl28Fw+zhwGwLA0/mDeIS46AxWnO2MVnUFD627+sasuAxyJpTsp3A+6WgnplGpILpL1JR21lZt5k2ZSrFPE41AteEy+Q9qrn58qW77lNM877sXXq+fcGLp/2giETZO5tTYumHObxKDQ0aezhxb2feNE0MWlvqZS1SzwsJZdslu3x9fYae8HFXYeAKcIVejxwzgwc0YE6jTzuWOAuqOS+GTY3rc+rmDxAKn7VEPAt+amm/7Yu8ev0gfnkHckljT8nSoaf/RkeNgUejaKburGiYt696FNIcXrt/3yJh8Qba+advg0BwJCk66Qamp3WvxtX1gMzSDZya+BU8y2OR+ogyk7w5h+Nox+/6S04pNunwKqpt9Db9yemA2GokjqThGR+ms1JeYMe92hu5y2Zbs5O5be7mkru2Hlpgc5j434M1NPiq0qqgXoaDkwqTU21V0s7dgY/TfLX9XMT1udx56RJqTqf5aqlR3vVqtOWaYpbp4NtW2tmPaXbwAZI0U1zroI/tiRW9oBVOtL5QT6uu2TH0nlgnXRSqsLkGXg+JnBTCjopVeGceXk2FnAtColkUynGMn1SrHXejq3Py4U5wHXZvtluJtXO27H+vFyMB9xElFIxNQ6fUmFj9Xm6Sr67SrA6b94Gfp4HLsb2rSM53VSMpseK1c7bsXbechs4zgO3EiUvs6kK7tgsUmlglaLkZiZVStzOBzoPrJHOS1VgVR5YuTPXz1VgXR5YM/+u9xglkyZRT2WqghlbnVc8CA+4mtxRp5vB7XxW7bw3LwvywI0pr5MN6HNNrUi/fUZO4o6tzxuiuO0GuLzUUdu3GOV3M6raeTu2Nm8aR+eBlVD1BnoVjowt0HBgnY51PrqdT/9yxtJ5YHWkeGKswoxJuMcGuIYoKdowKOQ4Xxov+4Zb/khU8Mf681a3gZ/0gYt1PjGdV1J2/mBS5z/58zrbQOeBE6zpGZgA7smRzgc6D2xKlORlCiUVKrfSslMAVulI56PX+XHv81g6D6yPFM+MVWCJDliLJdfoMhVYowPWYsk1ukwF1uiAu1R/Hh5v2wNb8r+9O0pBGAaiKLqdm/1vUCiFSCdhTIjWhntAwefY5sMxRW1ToJnZ89KjQTnuGzGUWB1DLkJtul0ofocn3SOf5wMu3mu97q30GN2e99he2gKEpj6Dkvwjj4tebb5d8EBAuhuUJJ87f96f4aT/1OlNz7GRfgg+WheCUFsfE16cpEFNx5exIUmHx09zd34AaRdACCDp+TVLSlFv1blzgKR2egx5zx/see0pn+djbR4FIVofz4/UeV67G3+vr3niC+H04Oz/nbwA7lqtm+wByfQAAAAASUVORK5CYII=') no-repeat;\n\twidth: 21px;\n\theight: 21px;\n\tbackground-position: 0 -4615px;\n}\n\n.font-graph-geSprite-starterone {\n\tbackground: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAABeQCAMAAAByzXKPAAAA1VBMVEUAAAAzMzIzMzIzMzE1NTUzMzIzMzIzMzEzMzIyMjIzMzIzMzIzMzIzMzE6OjoyMjIzMzIzMzIzMzEzMzI0NDA0NDIwMDAyMjEzMzIzMzEzMzE0NDAzMzMzMzIyMjIzMzI0NDE0NDQyMjIzMzIzMzIzMzIzMzM5OTkAAAC1tbX///9mZmYwMDAQEBAmJiZTiPJ7e3v/Z2RwcHAgICB+fn5hYWFzc3NAQECoqKiampqMjIxTU1NGRkY3NzcbGxsNDQ3w8PBQUFDg4ODAwMCwsLCgoKBPT09W+xp5AAAAKHRSTlMAh4DDEd187+mljnhvVge5nmhMQi4hA8uxk2IlHOOYc102M/jW088J/2liTQAACt5JREFUeNrs3O1um0AQheG5nIPCoIq1Q7+r/Mn9X1K9xtEAM9RLQmODzyO1cV+NtzjShhjHkRkAgn9DMCaYnRXIGOQdtWmk1zRWm0vNN6az+Y+v2fXZ5iTX/kZ4ZGvUNT6/RJuCM/VVRKFB7YBwtnY1k3h2wboaHy8RFQC2VGuc1D730WWLS2GIZ27aM4yUT+9tXaLNw9m0mI9uokepRLeC+ZyCfFCoqwckqV3WBHFZaxHLFrNxVpgUVRWjg/jli2WbfH4WyxYnWcVV0Rz7FYj26X9ezQcuE3VYkXzFSYpm9eq6pqSiuNYAaj+r0GiFxKv5tEOqxVfV0utrCkZF/HCXTuOdGz2IHKbDR5wdJ6PdeRmIsfviED0C5ZV7ojf487v59fPHsT18//a1Yn1HJdoSjIUXBG5XgaBejhMYVmT9B1dRUONj4KtyRHNmNkULDYeD2CGVjiZ0paOK1jVuYKIpjJTO7m9dovvEn3bz/DH4440f2+d9fvlVh+4LLuK6cM8GVcKKkmq3ZqqBfbhaef4n+pijBudNZH3H+OW3No+rbTmVXjfciPbs/GVQ7QU6tWqUW5lonefHfn5f6xI9DAxdqQU3n55uU821mj2ZuUq0SYo2ivA5tThxk3rK6u+urYtZiqKuGiWMEkbp4/OFLITIvyrfekt35WGvjvP6OlERwP6+VU39z+ansp+0SThP8jk+0SeoAehRjObmdha0f2YwfucMss7uaPVF3rThN/EH6fH3YhEt3bD1zMlwGtu8/8a5zrHJuR6NyrkKMK5N5qqf9ev6Y4hfGfSPrc7ZWZqPQrQPa+x5Cfe8FO55m3Xrcs8T3TFUYQ0zqj5jTPoMmagQz4brFh8D3x5L9OngyRy+IEa0JgBRlaBWAIJYyVYjYDF47PwNV/TwAIRfB+BiFcyeolchija6+P7xd//IveI+JlpwnrdZP7xexdD6/4N/PDzP06NZdc8vP4H7WKFXLbqjQcU9T7QZvFhHdN/+sndmy6lCQRQ9KOA8Ro1TxjttYuUlX5BK5f+/6YJIWjlNFREkpLJXGQuWO01e2mPaU4pA17qH7iEeKfRsrrqh4/t0hJQPEJSokULPFpJse0Iu0PNQNVSNnOu8ZHPWZc8TUhkBgECRikZMrp4Xq9W1NPubkIIUm4hnrtyikSIjq+jck3bOBQkpnSBrkU97ALl73pJqXfFc5AlJqN3cXvoTEKIzJcu5PSEFqHiGp6ahz+33Z3rWtpzhEfK16DO8XXi3S2vIvfUCHnpWrcsZHiHVAFUG0KQJoEgjGjGRFG1l9bq25gyPkIoANBcEab9DEPf27iCk40VbWa0uP86WkMsTQHPQHBSnJJHCytp1dW9Uz2cBQoo0PEqVes/r2bM0131CLtLzUCVUidw9n6uuaPY8IdnUYMet2BTccUtIfShnz60mBe65JaTunL/tVqTAbbeE1ImCc3vl16McIEiWc3tCClD5DM9Ak7ZFZCBkZEVzhkfI5/n6Hbdp+wF33BJSH8rZc6vISB/gnltCas/Z225FStdz2y0hZXE19lrt5p177NyR11+OHb/THhzJP86wP2uYrjvz1h92eTseNEzDbB2nd/OY1Py9WNw6/qjnN+fmvnmwnYkxjf1t+mAW7XlsbzaJ3a7DzH1sf3Udp7m/dcOf615sW26SdfvGrCaxbV4l9nEan0X0xqEaRrbvmnlrGFu3PTN3ndUoLOuapW8ODLzudLVomMHA71z/MwmT9mTmN+bOZnS9NcJDs+V53t+WPzQnbNa9/nRoCPl2AKqObKFvltEBoPvcVwNwmavxOy3IDwFAlkWCWPBqhJDC8GtsCPlGYI8ciQyRI+3/CLHHscysXvf0ynzWIOQsPr3wWllkxNQskD+b82/Ihi8qCCm150XpObXnc2RFs+cJqRhAE5AHpI8BOZbH5TQdlXB8JAUEIC4AvkFPSMEl/dQ+v74+2/bl6enFtm/v72+W/c/eHSW3CUNRGNZyjgiZNHE6fW2b6f63VGScCHSvI7CxjfH/tYnTU43CywFiAfnT/On+lunH3274R5G2zbv03rTj9F+z92+U7pqPX52PZjdM35uf6vxs3ofp799Kulf2B8CEc2JVjvJm6OIT5CO9PekvD/8T767XgTc2z1umnEdggyT5eX2s+k9yGpvH1kqvI523IVfSAzdlW2gbu3zn5+6j/JFcfIft0lBOi4/J6cbmBTZJTdPo9fV1/3pamqTUFCalOVkunVdNTU5bSa2Nn7ULjl0A7o5/aGt6Z6TKUpVC7/VLSrWzqTo7b+yzO+9i28shHtugl5cXXS9NLnyYHVZ+Nz79UG7y4in7Aqza9po+tBsXP1B8wCW3m01yVqq9G3w3q/X+/1lpZ5WEbKdOTnNsxiYtd+ngjl28Fw+zhwGwLA0/mDeIS46AxWnO2MVnUFD627+sasuAxyJpTsp3A+6WgnplGpILpL1JR21lZt5k2ZSrFPE41AteEy+Q9qrn58qW77lNM877sXXq+fcGLp/2giETZO5tTYumHObxKDQ0aezhxb2feNE0MWlvqZS1SzwsJZdslu3x9fYae8HFXYeAKcIVejxwzgwc0YE6jTzuWOAuqOS+GTY3rc+rmDxAKn7VEPAt+amm/7Yu8ev0gfnkHckljT8nSoaf/RkeNgUejaKburGiYt696FNIcXrt/3yJh8Qba+advg0BwJCk66Qamp3WvxtX1gMzSDZya+BU8y2OR+ogyk7w5h+Nox+/6S04pNunwKqpt9Db9yemA2GokjqThGR+ms1JeYMe92hu5y2Zbs5O5be7mkru2Hlpgc5j434M1NPiq0qqgXoaDkwqTU21V0s7dgY/TfLX9XMT1udx56RJqTqf5aqlR3vVqtOWaYpbp4NtW2tmPaXbwAZI0U1zroI/tiRW9oBVOtL5QT6uu2TH0nlgnXRSqsLkGXg+JnBTCjopVeGceXk2FnAtColkUynGMn1SrHXejq3Py4U5wHXZvtluJtXO27H+vFyMB9xElFIxNQ6fUmFj9Xm6Sr67SrA6b94Gfp4HLsb2rSM53VSMpseK1c7bsXbechs4zgO3EiUvs6kK7tgsUmlglaLkZiZVStzOBzoPrJHOS1VgVR5YuTPXz1VgXR5YM/+u9xglkyZRT2WqghlbnVc8CA+4mtxRp5vB7XxW7bw3LwvywI0pr5MN6HNNrUi/fUZO4o6tzxuiuO0GuLzUUdu3GOV3M6raeTu2Nm8aR+eBlVD1BnoVjowt0HBgnY51PrqdT/9yxtJ5YHWkeGKswoxJuMcGuIYoKdowKOQ4Xxov+4Zb/khU8Mf681a3gZ/0gYt1PjGdV1J2/mBS5z/58zrbQOeBE6zpGZgA7smRzgc6D2xKlORlCiUVKrfSslMAVulI56PX+XHv81g6D6yPFM+MVWCJDliLJdfoMhVYowPWYsk1ukwF1uiAu1R/Hh5v2wNb8r+9O0pBGAaiKLqdm/1vUCiFSCdhTIjWhntAwefY5sMxRW1ToJnZ89KjQTnuGzGUWB1DLkJtul0ofocn3SOf5wMu3mu97q30GN2e99he2gKEpj6Dkvwjj4tebb5d8EBAuhuUJJ87f96f4aT/1OlNz7GRfgg+WheCUFsfE16cpEFNx5exIUmHx09zd34AaRdACCDp+TVLSlFv1blzgKR2egx5zx/see0pn+djbR4FIVofz4/UeV67G3+vr3niC+H04Oz/nbwA7lqtm+wByfQAAAAASUVORK5CYII=') no-repeat;\n\twidth: 21px;\n\theight: 21px;\n\tbackground-position: 0 -4661px;\n}\n\n.font-graph-geSprite-starteronetoone {\n\tbackground: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAABeQCAMAAAByzXKPAAAA1VBMVEUAAAAzMzIzMzIzMzE1NTUzMzIzMzIzMzEzMzIyMjIzMzIzMzIzMzIzMzE6OjoyMjIzMzIzMzIzMzEzMzI0NDA0NDIwMDAyMjEzMzIzMzEzMzE0NDAzMzMzMzIyMjIzMzI0NDE0NDQyMjIzMzIzMzIzMzIzMzM5OTkAAAC1tbX///9mZmYwMDAQEBAmJiZTiPJ7e3v/Z2RwcHAgICB+fn5hYWFzc3NAQECoqKiampqMjIxTU1NGRkY3NzcbGxsNDQ3w8PBQUFDg4ODAwMCwsLCgoKBPT09W+xp5AAAAKHRSTlMAh4DDEd187+mljnhvVge5nmhMQi4hA8uxk2IlHOOYc102M/jW088J/2liTQAACt5JREFUeNrs3O1um0AQheG5nIPCoIq1Q7+r/Mn9X1K9xtEAM9RLQmODzyO1cV+NtzjShhjHkRkAgn9DMCaYnRXIGOQdtWmk1zRWm0vNN6az+Y+v2fXZ5iTX/kZ4ZGvUNT6/RJuCM/VVRKFB7YBwtnY1k3h2wboaHy8RFQC2VGuc1D730WWLS2GIZ27aM4yUT+9tXaLNw9m0mI9uokepRLeC+ZyCfFCoqwckqV3WBHFZaxHLFrNxVpgUVRWjg/jli2WbfH4WyxYnWcVV0Rz7FYj26X9ezQcuE3VYkXzFSYpm9eq6pqSiuNYAaj+r0GiFxKv5tEOqxVfV0utrCkZF/HCXTuOdGz2IHKbDR5wdJ6PdeRmIsfviED0C5ZV7ojf487v59fPHsT18//a1Yn1HJdoSjIUXBG5XgaBejhMYVmT9B1dRUONj4KtyRHNmNkULDYeD2CGVjiZ0paOK1jVuYKIpjJTO7m9dovvEn3bz/DH4440f2+d9fvlVh+4LLuK6cM8GVcKKkmq3ZqqBfbhaef4n+pijBudNZH3H+OW3No+rbTmVXjfciPbs/GVQ7QU6tWqUW5lonefHfn5f6xI9DAxdqQU3n55uU821mj2ZuUq0SYo2ivA5tThxk3rK6u+urYtZiqKuGiWMEkbp4/OFLITIvyrfekt35WGvjvP6OlERwP6+VU39z+ansp+0SThP8jk+0SeoAehRjObmdha0f2YwfucMss7uaPVF3rThN/EH6fH3YhEt3bD1zMlwGtu8/8a5zrHJuR6NyrkKMK5N5qqf9ev6Y4hfGfSPrc7ZWZqPQrQPa+x5Cfe8FO55m3Xrcs8T3TFUYQ0zqj5jTPoMmagQz4brFh8D3x5L9OngyRy+IEa0JgBRlaBWAIJYyVYjYDF47PwNV/TwAIRfB+BiFcyeolchija6+P7xd//IveI+JlpwnrdZP7xexdD6/4N/PDzP06NZdc8vP4H7WKFXLbqjQcU9T7QZvFhHdN/+sndmy6lCQRQ9KOA8Ro1TxjttYuUlX5BK5f+/6YJIWjlNFREkpLJXGQuWO01e2mPaU4pA17qH7iEeKfRsrrqh4/t0hJQPEJSokULPFpJse0Iu0PNQNVSNnOu8ZHPWZc8TUhkBgECRikZMrp4Xq9W1NPubkIIUm4hnrtyikSIjq+jck3bOBQkpnSBrkU97ALl73pJqXfFc5AlJqN3cXvoTEKIzJcu5PSEFqHiGp6ahz+33Z3rWtpzhEfK16DO8XXi3S2vIvfUCHnpWrcsZHiHVAFUG0KQJoEgjGjGRFG1l9bq25gyPkIoANBcEab9DEPf27iCk40VbWa0uP86WkMsTQHPQHBSnJJHCytp1dW9Uz2cBQoo0PEqVes/r2bM0131CLtLzUCVUidw9n6uuaPY8IdnUYMet2BTccUtIfShnz60mBe65JaTunL/tVqTAbbeE1ImCc3vl16McIEiWc3tCClD5DM9Ak7ZFZCBkZEVzhkfI5/n6Hbdp+wF33BJSH8rZc6vISB/gnltCas/Z225FStdz2y0hZXE19lrt5p177NyR11+OHb/THhzJP86wP2uYrjvz1h92eTseNEzDbB2nd/OY1Py9WNw6/qjnN+fmvnmwnYkxjf1t+mAW7XlsbzaJ3a7DzH1sf3Udp7m/dcOf615sW26SdfvGrCaxbV4l9nEan0X0xqEaRrbvmnlrGFu3PTN3ndUoLOuapW8ODLzudLVomMHA71z/MwmT9mTmN+bOZnS9NcJDs+V53t+WPzQnbNa9/nRoCPl2AKqObKFvltEBoPvcVwNwmavxOy3IDwFAlkWCWPBqhJDC8GtsCPlGYI8ciQyRI+3/CLHHscysXvf0ynzWIOQsPr3wWllkxNQskD+b82/Ihi8qCCm150XpObXnc2RFs+cJqRhAE5AHpI8BOZbH5TQdlXB8JAUEIC4AvkFPSMEl/dQ+v74+2/bl6enFtm/v72+W/c/eHSW3CUNRGNZyjgiZNHE6fW2b6f63VGScCHSvI7CxjfH/tYnTU43CywFiAfnT/On+lunH3274R5G2zbv03rTj9F+z92+U7pqPX52PZjdM35uf6vxs3ofp799Kulf2B8CEc2JVjvJm6OIT5CO9PekvD/8T767XgTc2z1umnEdggyT5eX2s+k9yGpvH1kqvI523IVfSAzdlW2gbu3zn5+6j/JFcfIft0lBOi4/J6cbmBTZJTdPo9fV1/3pamqTUFCalOVkunVdNTU5bSa2Nn7ULjl0A7o5/aGt6Z6TKUpVC7/VLSrWzqTo7b+yzO+9i28shHtugl5cXXS9NLnyYHVZ+Nz79UG7y4in7Aqza9po+tBsXP1B8wCW3m01yVqq9G3w3q/X+/1lpZ5WEbKdOTnNsxiYtd+ngjl28Fw+zhwGwLA0/mDeIS46AxWnO2MVnUFD627+sasuAxyJpTsp3A+6WgnplGpILpL1JR21lZt5k2ZSrFPE41AteEy+Q9qrn58qW77lNM877sXXq+fcGLp/2giETZO5tTYumHObxKDQ0aezhxb2feNE0MWlvqZS1SzwsJZdslu3x9fYae8HFXYeAKcIVejxwzgwc0YE6jTzuWOAuqOS+GTY3rc+rmDxAKn7VEPAt+amm/7Yu8ev0gfnkHckljT8nSoaf/RkeNgUejaKburGiYt696FNIcXrt/3yJh8Qba+advg0BwJCk66Qamp3WvxtX1gMzSDZya+BU8y2OR+ogyk7w5h+Nox+/6S04pNunwKqpt9Db9yemA2GokjqThGR+ms1JeYMe92hu5y2Zbs5O5be7mkru2Hlpgc5j434M1NPiq0qqgXoaDkwqTU21V0s7dgY/TfLX9XMT1udx56RJqTqf5aqlR3vVqtOWaYpbp4NtW2tmPaXbwAZI0U1zroI/tiRW9oBVOtL5QT6uu2TH0nlgnXRSqsLkGXg+JnBTCjopVeGceXk2FnAtColkUynGMn1SrHXejq3Py4U5wHXZvtluJtXO27H+vFyMB9xElFIxNQ6fUmFj9Xm6Sr67SrA6b94Gfp4HLsb2rSM53VSMpseK1c7bsXbechs4zgO3EiUvs6kK7tgsUmlglaLkZiZVStzOBzoPrJHOS1VgVR5YuTPXz1VgXR5YM/+u9xglkyZRT2WqghlbnVc8CA+4mtxRp5vB7XxW7bw3LwvywI0pr5MN6HNNrUi/fUZO4o6tzxuiuO0GuLzUUdu3GOV3M6raeTu2Nm8aR+eBlVD1BnoVjowt0HBgnY51PrqdT/9yxtJ5YHWkeGKswoxJuMcGuIYoKdowKOQ4Xxov+4Zb/khU8Mf681a3gZ/0gYt1PjGdV1J2/mBS5z/58zrbQOeBE6zpGZgA7smRzgc6D2xKlORlCiUVKrfSslMAVulI56PX+XHv81g6D6yPFM+MVWCJDliLJdfoMhVYowPWYsk1ukwF1uiAu1R/Hh5v2wNb8r+9O0pBGAaiKLqdm/1vUCiFSCdhTIjWhntAwefY5sMxRW1ToJnZ89KjQTnuGzGUWB1DLkJtul0ofocn3SOf5wMu3mu97q30GN2e99he2gKEpj6Dkvwjj4tebb5d8EBAuhuUJJ87f96f4aT/1OlNz7GRfgg+WheCUFsfE16cpEFNx5exIUmHx09zd34AaRdACCDp+TVLSlFv1blzgKR2egx5zx/see0pn+djbR4FIVofz4/UeV67G3+vr3niC+H04Oz/nbwA7lqtm+wByfQAAAAASUVORK5CYII=') no-repeat;\n\twidth: 21px;\n\theight: 21px;\n\tbackground-position: 0 -4707px;\n}\n\n.font-graph-geSprite-starteronetomany {\n\tbackground: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAABeQCAMAAAByzXKPAAAA1VBMVEUAAAAzMzIzMzIzMzE1NTUzMzIzMzIzMzEzMzIyMjIzMzIzMzIzMzIzMzE6OjoyMjIzMzIzMzIzMzEzMzI0NDA0NDIwMDAyMjEzMzIzMzEzMzE0NDAzMzMzMzIyMjIzMzI0NDE0NDQyMjIzMzIzMzIzMzIzMzM5OTkAAAC1tbX///9mZmYwMDAQEBAmJiZTiPJ7e3v/Z2RwcHAgICB+fn5hYWFzc3NAQECoqKiampqMjIxTU1NGRkY3NzcbGxsNDQ3w8PBQUFDg4ODAwMCwsLCgoKBPT09W+xp5AAAAKHRSTlMAh4DDEd187+mljnhvVge5nmhMQi4hA8uxk2IlHOOYc102M/jW088J/2liTQAACt5JREFUeNrs3O1um0AQheG5nIPCoIq1Q7+r/Mn9X1K9xtEAM9RLQmODzyO1cV+NtzjShhjHkRkAgn9DMCaYnRXIGOQdtWmk1zRWm0vNN6az+Y+v2fXZ5iTX/kZ4ZGvUNT6/RJuCM/VVRKFB7YBwtnY1k3h2wboaHy8RFQC2VGuc1D730WWLS2GIZ27aM4yUT+9tXaLNw9m0mI9uokepRLeC+ZyCfFCoqwckqV3WBHFZaxHLFrNxVpgUVRWjg/jli2WbfH4WyxYnWcVV0Rz7FYj26X9ezQcuE3VYkXzFSYpm9eq6pqSiuNYAaj+r0GiFxKv5tEOqxVfV0utrCkZF/HCXTuOdGz2IHKbDR5wdJ6PdeRmIsfviED0C5ZV7ojf487v59fPHsT18//a1Yn1HJdoSjIUXBG5XgaBejhMYVmT9B1dRUONj4KtyRHNmNkULDYeD2CGVjiZ0paOK1jVuYKIpjJTO7m9dovvEn3bz/DH4440f2+d9fvlVh+4LLuK6cM8GVcKKkmq3ZqqBfbhaef4n+pijBudNZH3H+OW3No+rbTmVXjfciPbs/GVQ7QU6tWqUW5lonefHfn5f6xI9DAxdqQU3n55uU821mj2ZuUq0SYo2ivA5tThxk3rK6u+urYtZiqKuGiWMEkbp4/OFLITIvyrfekt35WGvjvP6OlERwP6+VU39z+ansp+0SThP8jk+0SeoAehRjObmdha0f2YwfucMss7uaPVF3rThN/EH6fH3YhEt3bD1zMlwGtu8/8a5zrHJuR6NyrkKMK5N5qqf9ev6Y4hfGfSPrc7ZWZqPQrQPa+x5Cfe8FO55m3Xrcs8T3TFUYQ0zqj5jTPoMmagQz4brFh8D3x5L9OngyRy+IEa0JgBRlaBWAIJYyVYjYDF47PwNV/TwAIRfB+BiFcyeolchija6+P7xd//IveI+JlpwnrdZP7xexdD6/4N/PDzP06NZdc8vP4H7WKFXLbqjQcU9T7QZvFhHdN/+sndmy6lCQRQ9KOA8Ro1TxjttYuUlX5BK5f+/6YJIWjlNFREkpLJXGQuWO01e2mPaU4pA17qH7iEeKfRsrrqh4/t0hJQPEJSokULPFpJse0Iu0PNQNVSNnOu8ZHPWZc8TUhkBgECRikZMrp4Xq9W1NPubkIIUm4hnrtyikSIjq+jck3bOBQkpnSBrkU97ALl73pJqXfFc5AlJqN3cXvoTEKIzJcu5PSEFqHiGp6ahz+33Z3rWtpzhEfK16DO8XXi3S2vIvfUCHnpWrcsZHiHVAFUG0KQJoEgjGjGRFG1l9bq25gyPkIoANBcEab9DEPf27iCk40VbWa0uP86WkMsTQHPQHBSnJJHCytp1dW9Uz2cBQoo0PEqVes/r2bM0131CLtLzUCVUidw9n6uuaPY8IdnUYMet2BTccUtIfShnz60mBe65JaTunL/tVqTAbbeE1ImCc3vl16McIEiWc3tCClD5DM9Ak7ZFZCBkZEVzhkfI5/n6Hbdp+wF33BJSH8rZc6vISB/gnltCas/Z225FStdz2y0hZXE19lrt5p177NyR11+OHb/THhzJP86wP2uYrjvz1h92eTseNEzDbB2nd/OY1Py9WNw6/qjnN+fmvnmwnYkxjf1t+mAW7XlsbzaJ3a7DzH1sf3Udp7m/dcOf615sW26SdfvGrCaxbV4l9nEan0X0xqEaRrbvmnlrGFu3PTN3ndUoLOuapW8ODLzudLVomMHA71z/MwmT9mTmN+bOZnS9NcJDs+V53t+WPzQnbNa9/nRoCPl2AKqObKFvltEBoPvcVwNwmavxOy3IDwFAlkWCWPBqhJDC8GtsCPlGYI8ciQyRI+3/CLHHscysXvf0ynzWIOQsPr3wWllkxNQskD+b82/Ihi8qCCm150XpObXnc2RFs+cJqRhAE5AHpI8BOZbH5TQdlXB8JAUEIC4AvkFPSMEl/dQ+v74+2/bl6enFtm/v72+W/c/eHSW3CUNRGNZyjgiZNHE6fW2b6f63VGScCHSvI7CxjfH/tYnTU43CywFiAfnT/On+lunH3274R5G2zbv03rTj9F+z92+U7pqPX52PZjdM35uf6vxs3ofp799Kulf2B8CEc2JVjvJm6OIT5CO9PekvD/8T767XgTc2z1umnEdggyT5eX2s+k9yGpvH1kqvI523IVfSAzdlW2gbu3zn5+6j/JFcfIft0lBOi4/J6cbmBTZJTdPo9fV1/3pamqTUFCalOVkunVdNTU5bSa2Nn7ULjl0A7o5/aGt6Z6TKUpVC7/VLSrWzqTo7b+yzO+9i28shHtugl5cXXS9NLnyYHVZ+Nz79UG7y4in7Aqza9po+tBsXP1B8wCW3m01yVqq9G3w3q/X+/1lpZ5WEbKdOTnNsxiYtd+ngjl28Fw+zhwGwLA0/mDeIS46AxWnO2MVnUFD627+sasuAxyJpTsp3A+6WgnplGpILpL1JR21lZt5k2ZSrFPE41AteEy+Q9qrn58qW77lNM877sXXq+fcGLp/2giETZO5tTYumHObxKDQ0aezhxb2feNE0MWlvqZS1SzwsJZdslu3x9fYae8HFXYeAKcIVejxwzgwc0YE6jTzuWOAuqOS+GTY3rc+rmDxAKn7VEPAt+amm/7Yu8ev0gfnkHckljT8nSoaf/RkeNgUejaKburGiYt696FNIcXrt/3yJh8Qba+advg0BwJCk66Qamp3WvxtX1gMzSDZya+BU8y2OR+ogyk7w5h+Nox+/6S04pNunwKqpt9Db9yemA2GokjqThGR+ms1JeYMe92hu5y2Zbs5O5be7mkru2Hlpgc5j434M1NPiq0qqgXoaDkwqTU21V0s7dgY/TfLX9XMT1udx56RJqTqf5aqlR3vVqtOWaYpbp4NtW2tmPaXbwAZI0U1zroI/tiRW9oBVOtL5QT6uu2TH0nlgnXRSqsLkGXg+JnBTCjopVeGceXk2FnAtColkUynGMn1SrHXejq3Py4U5wHXZvtluJtXO27H+vFyMB9xElFIxNQ6fUmFj9Xm6Sr67SrA6b94Gfp4HLsb2rSM53VSMpseK1c7bsXbechs4zgO3EiUvs6kK7tgsUmlglaLkZiZVStzOBzoPrJHOS1VgVR5YuTPXz1VgXR5YM/+u9xglkyZRT2WqghlbnVc8CA+4mtxRp5vB7XxW7bw3LwvywI0pr5MN6HNNrUi/fUZO4o6tzxuiuO0GuLzUUdu3GOV3M6raeTu2Nm8aR+eBlVD1BnoVjowt0HBgnY51PrqdT/9yxtJ5YHWkeGKswoxJuMcGuIYoKdowKOQ4Xxov+4Zb/khU8Mf681a3gZ/0gYt1PjGdV1J2/mBS5z/58zrbQOeBE6zpGZgA7smRzgc6D2xKlORlCiUVKrfSslMAVulI56PX+XHv81g6D6yPFM+MVWCJDliLJdfoMhVYowPWYsk1ukwF1uiAu1R/Hh5v2wNb8r+9O0pBGAaiKLqdm/1vUCiFSCdhTIjWhntAwefY5sMxRW1ToJnZ89KjQTnuGzGUWB1DLkJtul0ofocn3SOf5wMu3mu97q30GN2e99he2gKEpj6Dkvwjj4tebb5d8EBAuhuUJJ87f96f4aT/1OlNz7GRfgg+WheCUFsfE16cpEFNx5exIUmHx09zd34AaRdACCDp+TVLSlFv1blzgKR2egx5zx/see0pn+djbR4FIVofz4/UeV67G3+vr3niC+H04Oz/nbwA7lqtm+wByfQAAAAASUVORK5CYII=') no-repeat;\n\twidth: 21px;\n\theight: 21px;\n\tbackground-position: 0 -4753px;\n}\n\n.font-graph-geSprite-startermany {\n\tbackground: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAABeQCAMAAAByzXKPAAAA1VBMVEUAAAAzMzIzMzIzMzE1NTUzMzIzMzIzMzEzMzIyMjIzMzIzMzIzMzIzMzE6OjoyMjIzMzIzMzIzMzEzMzI0NDA0NDIwMDAyMjEzMzIzMzEzMzE0NDAzMzMzMzIyMjIzMzI0NDE0NDQyMjIzMzIzMzIzMzIzMzM5OTkAAAC1tbX///9mZmYwMDAQEBAmJiZTiPJ7e3v/Z2RwcHAgICB+fn5hYWFzc3NAQECoqKiampqMjIxTU1NGRkY3NzcbGxsNDQ3w8PBQUFDg4ODAwMCwsLCgoKBPT09W+xp5AAAAKHRSTlMAh4DDEd187+mljnhvVge5nmhMQi4hA8uxk2IlHOOYc102M/jW088J/2liTQAACt5JREFUeNrs3O1um0AQheG5nIPCoIq1Q7+r/Mn9X1K9xtEAM9RLQmODzyO1cV+NtzjShhjHkRkAgn9DMCaYnRXIGOQdtWmk1zRWm0vNN6az+Y+v2fXZ5iTX/kZ4ZGvUNT6/RJuCM/VVRKFB7YBwtnY1k3h2wboaHy8RFQC2VGuc1D730WWLS2GIZ27aM4yUT+9tXaLNw9m0mI9uokepRLeC+ZyCfFCoqwckqV3WBHFZaxHLFrNxVpgUVRWjg/jli2WbfH4WyxYnWcVV0Rz7FYj26X9ezQcuE3VYkXzFSYpm9eq6pqSiuNYAaj+r0GiFxKv5tEOqxVfV0utrCkZF/HCXTuOdGz2IHKbDR5wdJ6PdeRmIsfviED0C5ZV7ojf487v59fPHsT18//a1Yn1HJdoSjIUXBG5XgaBejhMYVmT9B1dRUONj4KtyRHNmNkULDYeD2CGVjiZ0paOK1jVuYKIpjJTO7m9dovvEn3bz/DH4440f2+d9fvlVh+4LLuK6cM8GVcKKkmq3ZqqBfbhaef4n+pijBudNZH3H+OW3No+rbTmVXjfciPbs/GVQ7QU6tWqUW5lonefHfn5f6xI9DAxdqQU3n55uU821mj2ZuUq0SYo2ivA5tThxk3rK6u+urYtZiqKuGiWMEkbp4/OFLITIvyrfekt35WGvjvP6OlERwP6+VU39z+ansp+0SThP8jk+0SeoAehRjObmdha0f2YwfucMss7uaPVF3rThN/EH6fH3YhEt3bD1zMlwGtu8/8a5zrHJuR6NyrkKMK5N5qqf9ev6Y4hfGfSPrc7ZWZqPQrQPa+x5Cfe8FO55m3Xrcs8T3TFUYQ0zqj5jTPoMmagQz4brFh8D3x5L9OngyRy+IEa0JgBRlaBWAIJYyVYjYDF47PwNV/TwAIRfB+BiFcyeolchija6+P7xd//IveI+JlpwnrdZP7xexdD6/4N/PDzP06NZdc8vP4H7WKFXLbqjQcU9T7QZvFhHdN/+sndmy6lCQRQ9KOA8Ro1TxjttYuUlX5BK5f+/6YJIWjlNFREkpLJXGQuWO01e2mPaU4pA17qH7iEeKfRsrrqh4/t0hJQPEJSokULPFpJse0Iu0PNQNVSNnOu8ZHPWZc8TUhkBgECRikZMrp4Xq9W1NPubkIIUm4hnrtyikSIjq+jck3bOBQkpnSBrkU97ALl73pJqXfFc5AlJqN3cXvoTEKIzJcu5PSEFqHiGp6ahz+33Z3rWtpzhEfK16DO8XXi3S2vIvfUCHnpWrcsZHiHVAFUG0KQJoEgjGjGRFG1l9bq25gyPkIoANBcEab9DEPf27iCk40VbWa0uP86WkMsTQHPQHBSnJJHCytp1dW9Uz2cBQoo0PEqVes/r2bM0131CLtLzUCVUidw9n6uuaPY8IdnUYMet2BTccUtIfShnz60mBe65JaTunL/tVqTAbbeE1ImCc3vl16McIEiWc3tCClD5DM9Ak7ZFZCBkZEVzhkfI5/n6Hbdp+wF33BJSH8rZc6vISB/gnltCas/Z225FStdz2y0hZXE19lrt5p177NyR11+OHb/THhzJP86wP2uYrjvz1h92eTseNEzDbB2nd/OY1Py9WNw6/qjnN+fmvnmwnYkxjf1t+mAW7XlsbzaJ3a7DzH1sf3Udp7m/dcOf615sW26SdfvGrCaxbV4l9nEan0X0xqEaRrbvmnlrGFu3PTN3ndUoLOuapW8ODLzudLVomMHA71z/MwmT9mTmN+bOZnS9NcJDs+V53t+WPzQnbNa9/nRoCPl2AKqObKFvltEBoPvcVwNwmavxOy3IDwFAlkWCWPBqhJDC8GtsCPlGYI8ciQyRI+3/CLHHscysXvf0ynzWIOQsPr3wWllkxNQskD+b82/Ihi8qCCm150XpObXnc2RFs+cJqRhAE5AHpI8BOZbH5TQdlXB8JAUEIC4AvkFPSMEl/dQ+v74+2/bl6enFtm/v72+W/c/eHSW3CUNRGNZyjgiZNHE6fW2b6f63VGScCHSvI7CxjfH/tYnTU43CywFiAfnT/On+lunH3274R5G2zbv03rTj9F+z92+U7pqPX52PZjdM35uf6vxs3ofp799Kulf2B8CEc2JVjvJm6OIT5CO9PekvD/8T767XgTc2z1umnEdggyT5eX2s+k9yGpvH1kqvI523IVfSAzdlW2gbu3zn5+6j/JFcfIft0lBOi4/J6cbmBTZJTdPo9fV1/3pamqTUFCalOVkunVdNTU5bSa2Nn7ULjl0A7o5/aGt6Z6TKUpVC7/VLSrWzqTo7b+yzO+9i28shHtugl5cXXS9NLnyYHVZ+Nz79UG7y4in7Aqza9po+tBsXP1B8wCW3m01yVqq9G3w3q/X+/1lpZ5WEbKdOTnNsxiYtd+ngjl28Fw+zhwGwLA0/mDeIS46AxWnO2MVnUFD627+sasuAxyJpTsp3A+6WgnplGpILpL1JR21lZt5k2ZSrFPE41AteEy+Q9qrn58qW77lNM877sXXq+fcGLp/2giETZO5tTYumHObxKDQ0aezhxb2feNE0MWlvqZS1SzwsJZdslu3x9fYae8HFXYeAKcIVejxwzgwc0YE6jTzuWOAuqOS+GTY3rc+rmDxAKn7VEPAt+amm/7Yu8ev0gfnkHckljT8nSoaf/RkeNgUejaKburGiYt696FNIcXrt/3yJh8Qba+advg0BwJCk66Qamp3WvxtX1gMzSDZya+BU8y2OR+ogyk7w5h+Nox+/6S04pNunwKqpt9Db9yemA2GokjqThGR+ms1JeYMe92hu5y2Zbs5O5be7mkru2Hlpgc5j434M1NPiq0qqgXoaDkwqTU21V0s7dgY/TfLX9XMT1udx56RJqTqf5aqlR3vVqtOWaYpbp4NtW2tmPaXbwAZI0U1zroI/tiRW9oBVOtL5QT6uu2TH0nlgnXRSqsLkGXg+JnBTCjopVeGceXk2FnAtColkUynGMn1SrHXejq3Py4U5wHXZvtluJtXO27H+vFyMB9xElFIxNQ6fUmFj9Xm6Sr67SrA6b94Gfp4HLsb2rSM53VSMpseK1c7bsXbechs4zgO3EiUvs6kK7tgsUmlglaLkZiZVStzOBzoPrJHOS1VgVR5YuTPXz1VgXR5YM/+u9xglkyZRT2WqghlbnVc8CA+4mtxRp5vB7XxW7bw3LwvywI0pr5MN6HNNrUi/fUZO4o6tzxuiuO0GuLzUUdu3GOV3M6raeTu2Nm8aR+eBlVD1BnoVjowt0HBgnY51PrqdT/9yxtJ5YHWkeGKswoxJuMcGuIYoKdowKOQ4Xxov+4Zb/khU8Mf681a3gZ/0gYt1PjGdV1J2/mBS5z/58zrbQOeBE6zpGZgA7smRzgc6D2xKlORlCiUVKrfSslMAVulI56PX+XHv81g6D6yPFM+MVWCJDliLJdfoMhVYowPWYsk1ukwF1uiAu1R/Hh5v2wNb8r+9O0pBGAaiKLqdm/1vUCiFSCdhTIjWhntAwefY5sMxRW1ToJnZ89KjQTnuGzGUWB1DLkJtul0ofocn3SOf5wMu3mu97q30GN2e99he2gKEpj6Dkvwjj4tebb5d8EBAuhuUJJ87f96f4aT/1OlNz7GRfgg+WheCUFsfE16cpEFNx5exIUmHx09zd34AaRdACCDp+TVLSlFv1blzgKR2egx5zx/see0pn+djbR4FIVofz4/UeV67G3+vr3niC+H04Oz/nbwA7lqtm+wByfQAAAAASUVORK5CYII=') no-repeat;\n\twidth: 21px;\n\theight: 21px;\n\tbackground-position: 0 -4799px;\n}\n\n.font-graph-geSprite-starteroneopt {\n\tbackground: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAABeQCAMAAAByzXKPAAAA1VBMVEUAAAAzMzIzMzIzMzE1NTUzMzIzMzIzMzEzMzIyMjIzMzIzMzIzMzIzMzE6OjoyMjIzMzIzMzIzMzEzMzI0NDA0NDIwMDAyMjEzMzIzMzEzMzE0NDAzMzMzMzIyMjIzMzI0NDE0NDQyMjIzMzIzMzIzMzIzMzM5OTkAAAC1tbX///9mZmYwMDAQEBAmJiZTiPJ7e3v/Z2RwcHAgICB+fn5hYWFzc3NAQECoqKiampqMjIxTU1NGRkY3NzcbGxsNDQ3w8PBQUFDg4ODAwMCwsLCgoKBPT09W+xp5AAAAKHRSTlMAh4DDEd187+mljnhvVge5nmhMQi4hA8uxk2IlHOOYc102M/jW088J/2liTQAACt5JREFUeNrs3O1um0AQheG5nIPCoIq1Q7+r/Mn9X1K9xtEAM9RLQmODzyO1cV+NtzjShhjHkRkAgn9DMCaYnRXIGOQdtWmk1zRWm0vNN6az+Y+v2fXZ5iTX/kZ4ZGvUNT6/RJuCM/VVRKFB7YBwtnY1k3h2wboaHy8RFQC2VGuc1D730WWLS2GIZ27aM4yUT+9tXaLNw9m0mI9uokepRLeC+ZyCfFCoqwckqV3WBHFZaxHLFrNxVpgUVRWjg/jli2WbfH4WyxYnWcVV0Rz7FYj26X9ezQcuE3VYkXzFSYpm9eq6pqSiuNYAaj+r0GiFxKv5tEOqxVfV0utrCkZF/HCXTuOdGz2IHKbDR5wdJ6PdeRmIsfviED0C5ZV7ojf487v59fPHsT18//a1Yn1HJdoSjIUXBG5XgaBejhMYVmT9B1dRUONj4KtyRHNmNkULDYeD2CGVjiZ0paOK1jVuYKIpjJTO7m9dovvEn3bz/DH4440f2+d9fvlVh+4LLuK6cM8GVcKKkmq3ZqqBfbhaef4n+pijBudNZH3H+OW3No+rbTmVXjfciPbs/GVQ7QU6tWqUW5lonefHfn5f6xI9DAxdqQU3n55uU821mj2ZuUq0SYo2ivA5tThxk3rK6u+urYtZiqKuGiWMEkbp4/OFLITIvyrfekt35WGvjvP6OlERwP6+VU39z+ansp+0SThP8jk+0SeoAehRjObmdha0f2YwfucMss7uaPVF3rThN/EH6fH3YhEt3bD1zMlwGtu8/8a5zrHJuR6NyrkKMK5N5qqf9ev6Y4hfGfSPrc7ZWZqPQrQPa+x5Cfe8FO55m3Xrcs8T3TFUYQ0zqj5jTPoMmagQz4brFh8D3x5L9OngyRy+IEa0JgBRlaBWAIJYyVYjYDF47PwNV/TwAIRfB+BiFcyeolchija6+P7xd//IveI+JlpwnrdZP7xexdD6/4N/PDzP06NZdc8vP4H7WKFXLbqjQcU9T7QZvFhHdN/+sndmy6lCQRQ9KOA8Ro1TxjttYuUlX5BK5f+/6YJIWjlNFREkpLJXGQuWO01e2mPaU4pA17qH7iEeKfRsrrqh4/t0hJQPEJSokULPFpJse0Iu0PNQNVSNnOu8ZHPWZc8TUhkBgECRikZMrp4Xq9W1NPubkIIUm4hnrtyikSIjq+jck3bOBQkpnSBrkU97ALl73pJqXfFc5AlJqN3cXvoTEKIzJcu5PSEFqHiGp6ahz+33Z3rWtpzhEfK16DO8XXi3S2vIvfUCHnpWrcsZHiHVAFUG0KQJoEgjGjGRFG1l9bq25gyPkIoANBcEab9DEPf27iCk40VbWa0uP86WkMsTQHPQHBSnJJHCytp1dW9Uz2cBQoo0PEqVes/r2bM0131CLtLzUCVUidw9n6uuaPY8IdnUYMet2BTccUtIfShnz60mBe65JaTunL/tVqTAbbeE1ImCc3vl16McIEiWc3tCClD5DM9Ak7ZFZCBkZEVzhkfI5/n6Hbdp+wF33BJSH8rZc6vISB/gnltCas/Z225FStdz2y0hZXE19lrt5p177NyR11+OHb/THhzJP86wP2uYrjvz1h92eTseNEzDbB2nd/OY1Py9WNw6/qjnN+fmvnmwnYkxjf1t+mAW7XlsbzaJ3a7DzH1sf3Udp7m/dcOf615sW26SdfvGrCaxbV4l9nEan0X0xqEaRrbvmnlrGFu3PTN3ndUoLOuapW8ODLzudLVomMHA71z/MwmT9mTmN+bOZnS9NcJDs+V53t+WPzQnbNa9/nRoCPl2AKqObKFvltEBoPvcVwNwmavxOy3IDwFAlkWCWPBqhJDC8GtsCPlGYI8ciQyRI+3/CLHHscysXvf0ynzWIOQsPr3wWllkxNQskD+b82/Ihi8qCCm150XpObXnc2RFs+cJqRhAE5AHpI8BOZbH5TQdlXB8JAUEIC4AvkFPSMEl/dQ+v74+2/bl6enFtm/v72+W/c/eHSW3CUNRGNZyjgiZNHE6fW2b6f63VGScCHSvI7CxjfH/tYnTU43CywFiAfnT/On+lunH3274R5G2zbv03rTj9F+z92+U7pqPX52PZjdM35uf6vxs3ofp799Kulf2B8CEc2JVjvJm6OIT5CO9PekvD/8T767XgTc2z1umnEdggyT5eX2s+k9yGpvH1kqvI523IVfSAzdlW2gbu3zn5+6j/JFcfIft0lBOi4/J6cbmBTZJTdPo9fV1/3pamqTUFCalOVkunVdNTU5bSa2Nn7ULjl0A7o5/aGt6Z6TKUpVC7/VLSrWzqTo7b+yzO+9i28shHtugl5cXXS9NLnyYHVZ+Nz79UG7y4in7Aqza9po+tBsXP1B8wCW3m01yVqq9G3w3q/X+/1lpZ5WEbKdOTnNsxiYtd+ngjl28Fw+zhwGwLA0/mDeIS46AxWnO2MVnUFD627+sasuAxyJpTsp3A+6WgnplGpILpL1JR21lZt5k2ZSrFPE41AteEy+Q9qrn58qW77lNM877sXXq+fcGLp/2giETZO5tTYumHObxKDQ0aezhxb2feNE0MWlvqZS1SzwsJZdslu3x9fYae8HFXYeAKcIVejxwzgwc0YE6jTzuWOAuqOS+GTY3rc+rmDxAKn7VEPAt+amm/7Yu8ev0gfnkHckljT8nSoaf/RkeNgUejaKburGiYt696FNIcXrt/3yJh8Qba+advg0BwJCk66Qamp3WvxtX1gMzSDZya+BU8y2OR+ogyk7w5h+Nox+/6S04pNunwKqpt9Db9yemA2GokjqThGR+ms1JeYMe92hu5y2Zbs5O5be7mkru2Hlpgc5j434M1NPiq0qqgXoaDkwqTU21V0s7dgY/TfLX9XMT1udx56RJqTqf5aqlR3vVqtOWaYpbp4NtW2tmPaXbwAZI0U1zroI/tiRW9oBVOtL5QT6uu2TH0nlgnXRSqsLkGXg+JnBTCjopVeGceXk2FnAtColkUynGMn1SrHXejq3Py4U5wHXZvtluJtXO27H+vFyMB9xElFIxNQ6fUmFj9Xm6Sr67SrA6b94Gfp4HLsb2rSM53VSMpseK1c7bsXbechs4zgO3EiUvs6kK7tgsUmlglaLkZiZVStzOBzoPrJHOS1VgVR5YuTPXz1VgXR5YM/+u9xglkyZRT2WqghlbnVc8CA+4mtxRp5vB7XxW7bw3LwvywI0pr5MN6HNNrUi/fUZO4o6tzxuiuO0GuLzUUdu3GOV3M6raeTu2Nm8aR+eBlVD1BnoVjowt0HBgnY51PrqdT/9yxtJ5YHWkeGKswoxJuMcGuIYoKdowKOQ4Xxov+4Zb/khU8Mf681a3gZ/0gYt1PjGdV1J2/mBS5z/58zrbQOeBE6zpGZgA7smRzgc6D2xKlORlCiUVKrfSslMAVulI56PX+XHv81g6D6yPFM+MVWCJDliLJdfoMhVYowPWYsk1ukwF1uiAu1R/Hh5v2wNb8r+9O0pBGAaiKLqdm/1vUCiFSCdhTIjWhntAwefY5sMxRW1ToJnZ89KjQTnuGzGUWB1DLkJtul0ofocn3SOf5wMu3mu97q30GN2e99he2gKEpj6Dkvwjj4tebb5d8EBAuhuUJJ87f96f4aT/1OlNz7GRfgg+WheCUFsfE16cpEFNx5exIUmHx09zd34AaRdACCDp+TVLSlFv1blzgKR2egx5zx/see0pn+djbR4FIVofz4/UeV67G3+vr3niC+H04Oz/nbwA7lqtm+wByfQAAAAASUVORK5CYII=') no-repeat;\n\twidth: 21px;\n\theight: 21px;\n\tbackground-position: 0 -4845px;\n}\n\n.font-graph-geSprite-startermanyopt {\n\tbackground: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAABeQCAMAAAByzXKPAAAA1VBMVEUAAAAzMzIzMzIzMzE1NTUzMzIzMzIzMzEzMzIyMjIzMzIzMzIzMzIzMzE6OjoyMjIzMzIzMzIzMzEzMzI0NDA0NDIwMDAyMjEzMzIzMzEzMzE0NDAzMzMzMzIyMjIzMzI0NDE0NDQyMjIzMzIzMzIzMzIzMzM5OTkAAAC1tbX///9mZmYwMDAQEBAmJiZTiPJ7e3v/Z2RwcHAgICB+fn5hYWFzc3NAQECoqKiampqMjIxTU1NGRkY3NzcbGxsNDQ3w8PBQUFDg4ODAwMCwsLCgoKBPT09W+xp5AAAAKHRSTlMAh4DDEd187+mljnhvVge5nmhMQi4hA8uxk2IlHOOYc102M/jW088J/2liTQAACt5JREFUeNrs3O1um0AQheG5nIPCoIq1Q7+r/Mn9X1K9xtEAM9RLQmODzyO1cV+NtzjShhjHkRkAgn9DMCaYnRXIGOQdtWmk1zRWm0vNN6az+Y+v2fXZ5iTX/kZ4ZGvUNT6/RJuCM/VVRKFB7YBwtnY1k3h2wboaHy8RFQC2VGuc1D730WWLS2GIZ27aM4yUT+9tXaLNw9m0mI9uokepRLeC+ZyCfFCoqwckqV3WBHFZaxHLFrNxVpgUVRWjg/jli2WbfH4WyxYnWcVV0Rz7FYj26X9ezQcuE3VYkXzFSYpm9eq6pqSiuNYAaj+r0GiFxKv5tEOqxVfV0utrCkZF/HCXTuOdGz2IHKbDR5wdJ6PdeRmIsfviED0C5ZV7ojf487v59fPHsT18//a1Yn1HJdoSjIUXBG5XgaBejhMYVmT9B1dRUONj4KtyRHNmNkULDYeD2CGVjiZ0paOK1jVuYKIpjJTO7m9dovvEn3bz/DH4440f2+d9fvlVh+4LLuK6cM8GVcKKkmq3ZqqBfbhaef4n+pijBudNZH3H+OW3No+rbTmVXjfciPbs/GVQ7QU6tWqUW5lonefHfn5f6xI9DAxdqQU3n55uU821mj2ZuUq0SYo2ivA5tThxk3rK6u+urYtZiqKuGiWMEkbp4/OFLITIvyrfekt35WGvjvP6OlERwP6+VU39z+ansp+0SThP8jk+0SeoAehRjObmdha0f2YwfucMss7uaPVF3rThN/EH6fH3YhEt3bD1zMlwGtu8/8a5zrHJuR6NyrkKMK5N5qqf9ev6Y4hfGfSPrc7ZWZqPQrQPa+x5Cfe8FO55m3Xrcs8T3TFUYQ0zqj5jTPoMmagQz4brFh8D3x5L9OngyRy+IEa0JgBRlaBWAIJYyVYjYDF47PwNV/TwAIRfB+BiFcyeolchija6+P7xd//IveI+JlpwnrdZP7xexdD6/4N/PDzP06NZdc8vP4H7WKFXLbqjQcU9T7QZvFhHdN/+sndmy6lCQRQ9KOA8Ro1TxjttYuUlX5BK5f+/6YJIWjlNFREkpLJXGQuWO01e2mPaU4pA17qH7iEeKfRsrrqh4/t0hJQPEJSokULPFpJse0Iu0PNQNVSNnOu8ZHPWZc8TUhkBgECRikZMrp4Xq9W1NPubkIIUm4hnrtyikSIjq+jck3bOBQkpnSBrkU97ALl73pJqXfFc5AlJqN3cXvoTEKIzJcu5PSEFqHiGp6ahz+33Z3rWtpzhEfK16DO8XXi3S2vIvfUCHnpWrcsZHiHVAFUG0KQJoEgjGjGRFG1l9bq25gyPkIoANBcEab9DEPf27iCk40VbWa0uP86WkMsTQHPQHBSnJJHCytp1dW9Uz2cBQoo0PEqVes/r2bM0131CLtLzUCVUidw9n6uuaPY8IdnUYMet2BTccUtIfShnz60mBe65JaTunL/tVqTAbbeE1ImCc3vl16McIEiWc3tCClD5DM9Ak7ZFZCBkZEVzhkfI5/n6Hbdp+wF33BJSH8rZc6vISB/gnltCas/Z225FStdz2y0hZXE19lrt5p177NyR11+OHb/THhzJP86wP2uYrjvz1h92eTseNEzDbB2nd/OY1Py9WNw6/qjnN+fmvnmwnYkxjf1t+mAW7XlsbzaJ3a7DzH1sf3Udp7m/dcOf615sW26SdfvGrCaxbV4l9nEan0X0xqEaRrbvmnlrGFu3PTN3ndUoLOuapW8ODLzudLVomMHA71z/MwmT9mTmN+bOZnS9NcJDs+V53t+WPzQnbNa9/nRoCPl2AKqObKFvltEBoPvcVwNwmavxOy3IDwFAlkWCWPBqhJDC8GtsCPlGYI8ciQyRI+3/CLHHscysXvf0ynzWIOQsPr3wWllkxNQskD+b82/Ihi8qCCm150XpObXnc2RFs+cJqRhAE5AHpI8BOZbH5TQdlXB8JAUEIC4AvkFPSMEl/dQ+v74+2/bl6enFtm/v72+W/c/eHSW3CUNRGNZyjgiZNHE6fW2b6f63VGScCHSvI7CxjfH/tYnTU43CywFiAfnT/On+lunH3274R5G2zbv03rTj9F+z92+U7pqPX52PZjdM35uf6vxs3ofp799Kulf2B8CEc2JVjvJm6OIT5CO9PekvD/8T767XgTc2z1umnEdggyT5eX2s+k9yGpvH1kqvI523IVfSAzdlW2gbu3zn5+6j/JFcfIft0lBOi4/J6cbmBTZJTdPo9fV1/3pamqTUFCalOVkunVdNTU5bSa2Nn7ULjl0A7o5/aGt6Z6TKUpVC7/VLSrWzqTo7b+yzO+9i28shHtugl5cXXS9NLnyYHVZ+Nz79UG7y4in7Aqza9po+tBsXP1B8wCW3m01yVqq9G3w3q/X+/1lpZ5WEbKdOTnNsxiYtd+ngjl28Fw+zhwGwLA0/mDeIS46AxWnO2MVnUFD627+sasuAxyJpTsp3A+6WgnplGpILpL1JR21lZt5k2ZSrFPE41AteEy+Q9qrn58qW77lNM877sXXq+fcGLp/2giETZO5tTYumHObxKDQ0aezhxb2feNE0MWlvqZS1SzwsJZdslu3x9fYae8HFXYeAKcIVejxwzgwc0YE6jTzuWOAuqOS+GTY3rc+rmDxAKn7VEPAt+amm/7Yu8ev0gfnkHckljT8nSoaf/RkeNgUejaKburGiYt696FNIcXrt/3yJh8Qba+advg0BwJCk66Qamp3WvxtX1gMzSDZya+BU8y2OR+ogyk7w5h+Nox+/6S04pNunwKqpt9Db9yemA2GokjqThGR+ms1JeYMe92hu5y2Zbs5O5be7mkru2Hlpgc5j434M1NPiq0qqgXoaDkwqTU21V0s7dgY/TfLX9XMT1udx56RJqTqf5aqlR3vVqtOWaYpbp4NtW2tmPaXbwAZI0U1zroI/tiRW9oBVOtL5QT6uu2TH0nlgnXRSqsLkGXg+JnBTCjopVeGceXk2FnAtColkUynGMn1SrHXejq3Py4U5wHXZvtluJtXO27H+vFyMB9xElFIxNQ6fUmFj9Xm6Sr67SrA6b94Gfp4HLsb2rSM53VSMpseK1c7bsXbechs4zgO3EiUvs6kK7tgsUmlglaLkZiZVStzOBzoPrJHOS1VgVR5YuTPXz1VgXR5YM/+u9xglkyZRT2WqghlbnVc8CA+4mtxRp5vB7XxW7bw3LwvywI0pr5MN6HNNrUi/fUZO4o6tzxuiuO0GuLzUUdu3GOV3M6raeTu2Nm8aR+eBlVD1BnoVjowt0HBgnY51PrqdT/9yxtJ5YHWkeGKswoxJuMcGuIYoKdowKOQ4Xxov+4Zb/khU8Mf681a3gZ/0gYt1PjGdV1J2/mBS5z/58zrbQOeBE6zpGZgA7smRzgc6D2xKlORlCiUVKrfSslMAVulI56PX+XHv81g6D6yPFM+MVWCJDliLJdfoMhVYowPWYsk1ukwF1uiAu1R/Hh5v2wNb8r+9O0pBGAaiKLqdm/1vUCiFSCdhTIjWhntAwefY5sMxRW1ToJnZ89KjQTnuGzGUWB1DLkJtul0ofocn3SOf5wMu3mu97q30GN2e99he2gKEpj6Dkvwjj4tebb5d8EBAuhuUJJ87f96f4aT/1OlNz7GRfgg+WheCUFsfE16cpEFNx5exIUmHx09zd34AaRdACCDp+TVLSlFv1blzgKR2egx5zx/see0pn+djbR4FIVofz4/UeV67G3+vr3niC+H04Oz/nbwA7lqtm+wByfQAAAAASUVORK5CYII=') no-repeat;\n\twidth: 21px;\n\theight: 21px;\n\tbackground-position: 0 -4891px;\n}\n\n.font-graph-geSprite-startclassicthin {\n\tbackground: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAABeQCAMAAAByzXKPAAAA1VBMVEUAAAAzMzIzMzIzMzE1NTUzMzIzMzIzMzEzMzIyMjIzMzIzMzIzMzIzMzE6OjoyMjIzMzIzMzIzMzEzMzI0NDA0NDIwMDAyMjEzMzIzMzEzMzE0NDAzMzMzMzIyMjIzMzI0NDE0NDQyMjIzMzIzMzIzMzIzMzM5OTkAAAC1tbX///9mZmYwMDAQEBAmJiZTiPJ7e3v/Z2RwcHAgICB+fn5hYWFzc3NAQECoqKiampqMjIxTU1NGRkY3NzcbGxsNDQ3w8PBQUFDg4ODAwMCwsLCgoKBPT09W+xp5AAAAKHRSTlMAh4DDEd187+mljnhvVge5nmhMQi4hA8uxk2IlHOOYc102M/jW088J/2liTQAACt5JREFUeNrs3O1um0AQheG5nIPCoIq1Q7+r/Mn9X1K9xtEAM9RLQmODzyO1cV+NtzjShhjHkRkAgn9DMCaYnRXIGOQdtWmk1zRWm0vNN6az+Y+v2fXZ5iTX/kZ4ZGvUNT6/RJuCM/VVRKFB7YBwtnY1k3h2wboaHy8RFQC2VGuc1D730WWLS2GIZ27aM4yUT+9tXaLNw9m0mI9uokepRLeC+ZyCfFCoqwckqV3WBHFZaxHLFrNxVpgUVRWjg/jli2WbfH4WyxYnWcVV0Rz7FYj26X9ezQcuE3VYkXzFSYpm9eq6pqSiuNYAaj+r0GiFxKv5tEOqxVfV0utrCkZF/HCXTuOdGz2IHKbDR5wdJ6PdeRmIsfviED0C5ZV7ojf487v59fPHsT18//a1Yn1HJdoSjIUXBG5XgaBejhMYVmT9B1dRUONj4KtyRHNmNkULDYeD2CGVjiZ0paOK1jVuYKIpjJTO7m9dovvEn3bz/DH4440f2+d9fvlVh+4LLuK6cM8GVcKKkmq3ZqqBfbhaef4n+pijBudNZH3H+OW3No+rbTmVXjfciPbs/GVQ7QU6tWqUW5lonefHfn5f6xI9DAxdqQU3n55uU821mj2ZuUq0SYo2ivA5tThxk3rK6u+urYtZiqKuGiWMEkbp4/OFLITIvyrfekt35WGvjvP6OlERwP6+VU39z+ansp+0SThP8jk+0SeoAehRjObmdha0f2YwfucMss7uaPVF3rThN/EH6fH3YhEt3bD1zMlwGtu8/8a5zrHJuR6NyrkKMK5N5qqf9ev6Y4hfGfSPrc7ZWZqPQrQPa+x5Cfe8FO55m3Xrcs8T3TFUYQ0zqj5jTPoMmagQz4brFh8D3x5L9OngyRy+IEa0JgBRlaBWAIJYyVYjYDF47PwNV/TwAIRfB+BiFcyeolchija6+P7xd//IveI+JlpwnrdZP7xexdD6/4N/PDzP06NZdc8vP4H7WKFXLbqjQcU9T7QZvFhHdN/+sndmy6lCQRQ9KOA8Ro1TxjttYuUlX5BK5f+/6YJIWjlNFREkpLJXGQuWO01e2mPaU4pA17qH7iEeKfRsrrqh4/t0hJQPEJSokULPFpJse0Iu0PNQNVSNnOu8ZHPWZc8TUhkBgECRikZMrp4Xq9W1NPubkIIUm4hnrtyikSIjq+jck3bOBQkpnSBrkU97ALl73pJqXfFc5AlJqN3cXvoTEKIzJcu5PSEFqHiGp6ahz+33Z3rWtpzhEfK16DO8XXi3S2vIvfUCHnpWrcsZHiHVAFUG0KQJoEgjGjGRFG1l9bq25gyPkIoANBcEab9DEPf27iCk40VbWa0uP86WkMsTQHPQHBSnJJHCytp1dW9Uz2cBQoo0PEqVes/r2bM0131CLtLzUCVUidw9n6uuaPY8IdnUYMet2BTccUtIfShnz60mBe65JaTunL/tVqTAbbeE1ImCc3vl16McIEiWc3tCClD5DM9Ak7ZFZCBkZEVzhkfI5/n6Hbdp+wF33BJSH8rZc6vISB/gnltCas/Z225FStdz2y0hZXE19lrt5p177NyR11+OHb/THhzJP86wP2uYrjvz1h92eTseNEzDbB2nd/OY1Py9WNw6/qjnN+fmvnmwnYkxjf1t+mAW7XlsbzaJ3a7DzH1sf3Udp7m/dcOf615sW26SdfvGrCaxbV4l9nEan0X0xqEaRrbvmnlrGFu3PTN3ndUoLOuapW8ODLzudLVomMHA71z/MwmT9mTmN+bOZnS9NcJDs+V53t+WPzQnbNa9/nRoCPl2AKqObKFvltEBoPvcVwNwmavxOy3IDwFAlkWCWPBqhJDC8GtsCPlGYI8ciQyRI+3/CLHHscysXvf0ynzWIOQsPr3wWllkxNQskD+b82/Ihi8qCCm150XpObXnc2RFs+cJqRhAE5AHpI8BOZbH5TQdlXB8JAUEIC4AvkFPSMEl/dQ+v74+2/bl6enFtm/v72+W/c/eHSW3CUNRGNZyjgiZNHE6fW2b6f63VGScCHSvI7CxjfH/tYnTU43CywFiAfnT/On+lunH3274R5G2zbv03rTj9F+z92+U7pqPX52PZjdM35uf6vxs3ofp799Kulf2B8CEc2JVjvJm6OIT5CO9PekvD/8T767XgTc2z1umnEdggyT5eX2s+k9yGpvH1kqvI523IVfSAzdlW2gbu3zn5+6j/JFcfIft0lBOi4/J6cbmBTZJTdPo9fV1/3pamqTUFCalOVkunVdNTU5bSa2Nn7ULjl0A7o5/aGt6Z6TKUpVC7/VLSrWzqTo7b+yzO+9i28shHtugl5cXXS9NLnyYHVZ+Nz79UG7y4in7Aqza9po+tBsXP1B8wCW3m01yVqq9G3w3q/X+/1lpZ5WEbKdOTnNsxiYtd+ngjl28Fw+zhwGwLA0/mDeIS46AxWnO2MVnUFD627+sasuAxyJpTsp3A+6WgnplGpILpL1JR21lZt5k2ZSrFPE41AteEy+Q9qrn58qW77lNM877sXXq+fcGLp/2giETZO5tTYumHObxKDQ0aezhxb2feNE0MWlvqZS1SzwsJZdslu3x9fYae8HFXYeAKcIVejxwzgwc0YE6jTzuWOAuqOS+GTY3rc+rmDxAKn7VEPAt+amm/7Yu8ev0gfnkHckljT8nSoaf/RkeNgUejaKburGiYt696FNIcXrt/3yJh8Qba+advg0BwJCk66Qamp3WvxtX1gMzSDZya+BU8y2OR+ogyk7w5h+Nox+/6S04pNunwKqpt9Db9yemA2GokjqThGR+ms1JeYMe92hu5y2Zbs5O5be7mkru2Hlpgc5j434M1NPiq0qqgXoaDkwqTU21V0s7dgY/TfLX9XMT1udx56RJqTqf5aqlR3vVqtOWaYpbp4NtW2tmPaXbwAZI0U1zroI/tiRW9oBVOtL5QT6uu2TH0nlgnXRSqsLkGXg+JnBTCjopVeGceXk2FnAtColkUynGMn1SrHXejq3Py4U5wHXZvtluJtXO27H+vFyMB9xElFIxNQ6fUmFj9Xm6Sr67SrA6b94Gfp4HLsb2rSM53VSMpseK1c7bsXbechs4zgO3EiUvs6kK7tgsUmlglaLkZiZVStzOBzoPrJHOS1VgVR5YuTPXz1VgXR5YM/+u9xglkyZRT2WqghlbnVc8CA+4mtxRp5vB7XxW7bw3LwvywI0pr5MN6HNNrUi/fUZO4o6tzxuiuO0GuLzUUdu3GOV3M6raeTu2Nm8aR+eBlVD1BnoVjowt0HBgnY51PrqdT/9yxtJ5YHWkeGKswoxJuMcGuIYoKdowKOQ4Xxov+4Zb/khU8Mf681a3gZ/0gYt1PjGdV1J2/mBS5z/58zrbQOeBE6zpGZgA7smRzgc6D2xKlORlCiUVKrfSslMAVulI56PX+XHv81g6D6yPFM+MVWCJDliLJdfoMhVYowPWYsk1ukwF1uiAu1R/Hh5v2wNb8r+9O0pBGAaiKLqdm/1vUCiFSCdhTIjWhntAwefY5sMxRW1ToJnZ89KjQTnuGzGUWB1DLkJtul0ofocn3SOf5wMu3mu97q30GN2e99he2gKEpj6Dkvwjj4tebb5d8EBAuhuUJJ87f96f4aT/1OlNz7GRfgg+WheCUFsfE16cpEFNx5exIUmHx09zd34AaRdACCDp+TVLSlFv1blzgKR2egx5zx/see0pn+djbR4FIVofz4/UeV67G3+vr3niC+H04Oz/nbwA7lqtm+wByfQAAAAASUVORK5CYII=') no-repeat;\n\twidth: 21px;\n\theight: 21px;\n\tbackground-position: 0 -5259px;\n}\n\n.font-graph-geSprite-startclassicthintrans {\n\tbackground: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAABeQCAMAAAByzXKPAAAA1VBMVEUAAAAzMzIzMzIzMzE1NTUzMzIzMzIzMzEzMzIyMjIzMzIzMzIzMzIzMzE6OjoyMjIzMzIzMzIzMzEzMzI0NDA0NDIwMDAyMjEzMzIzMzEzMzE0NDAzMzMzMzIyMjIzMzI0NDE0NDQyMjIzMzIzMzIzMzIzMzM5OTkAAAC1tbX///9mZmYwMDAQEBAmJiZTiPJ7e3v/Z2RwcHAgICB+fn5hYWFzc3NAQECoqKiampqMjIxTU1NGRkY3NzcbGxsNDQ3w8PBQUFDg4ODAwMCwsLCgoKBPT09W+xp5AAAAKHRSTlMAh4DDEd187+mljnhvVge5nmhMQi4hA8uxk2IlHOOYc102M/jW088J/2liTQAACt5JREFUeNrs3O1um0AQheG5nIPCoIq1Q7+r/Mn9X1K9xtEAM9RLQmODzyO1cV+NtzjShhjHkRkAgn9DMCaYnRXIGOQdtWmk1zRWm0vNN6az+Y+v2fXZ5iTX/kZ4ZGvUNT6/RJuCM/VVRKFB7YBwtnY1k3h2wboaHy8RFQC2VGuc1D730WWLS2GIZ27aM4yUT+9tXaLNw9m0mI9uokepRLeC+ZyCfFCoqwckqV3WBHFZaxHLFrNxVpgUVRWjg/jli2WbfH4WyxYnWcVV0Rz7FYj26X9ezQcuE3VYkXzFSYpm9eq6pqSiuNYAaj+r0GiFxKv5tEOqxVfV0utrCkZF/HCXTuOdGz2IHKbDR5wdJ6PdeRmIsfviED0C5ZV7ojf487v59fPHsT18//a1Yn1HJdoSjIUXBG5XgaBejhMYVmT9B1dRUONj4KtyRHNmNkULDYeD2CGVjiZ0paOK1jVuYKIpjJTO7m9dovvEn3bz/DH4440f2+d9fvlVh+4LLuK6cM8GVcKKkmq3ZqqBfbhaef4n+pijBudNZH3H+OW3No+rbTmVXjfciPbs/GVQ7QU6tWqUW5lonefHfn5f6xI9DAxdqQU3n55uU821mj2ZuUq0SYo2ivA5tThxk3rK6u+urYtZiqKuGiWMEkbp4/OFLITIvyrfekt35WGvjvP6OlERwP6+VU39z+ansp+0SThP8jk+0SeoAehRjObmdha0f2YwfucMss7uaPVF3rThN/EH6fH3YhEt3bD1zMlwGtu8/8a5zrHJuR6NyrkKMK5N5qqf9ev6Y4hfGfSPrc7ZWZqPQrQPa+x5Cfe8FO55m3Xrcs8T3TFUYQ0zqj5jTPoMmagQz4brFh8D3x5L9OngyRy+IEa0JgBRlaBWAIJYyVYjYDF47PwNV/TwAIRfB+BiFcyeolchija6+P7xd//IveI+JlpwnrdZP7xexdD6/4N/PDzP06NZdc8vP4H7WKFXLbqjQcU9T7QZvFhHdN/+sndmy6lCQRQ9KOA8Ro1TxjttYuUlX5BK5f+/6YJIWjlNFREkpLJXGQuWO01e2mPaU4pA17qH7iEeKfRsrrqh4/t0hJQPEJSokULPFpJse0Iu0PNQNVSNnOu8ZHPWZc8TUhkBgECRikZMrp4Xq9W1NPubkIIUm4hnrtyikSIjq+jck3bOBQkpnSBrkU97ALl73pJqXfFc5AlJqN3cXvoTEKIzJcu5PSEFqHiGp6ahz+33Z3rWtpzhEfK16DO8XXi3S2vIvfUCHnpWrcsZHiHVAFUG0KQJoEgjGjGRFG1l9bq25gyPkIoANBcEab9DEPf27iCk40VbWa0uP86WkMsTQHPQHBSnJJHCytp1dW9Uz2cBQoo0PEqVes/r2bM0131CLtLzUCVUidw9n6uuaPY8IdnUYMet2BTccUtIfShnz60mBe65JaTunL/tVqTAbbeE1ImCc3vl16McIEiWc3tCClD5DM9Ak7ZFZCBkZEVzhkfI5/n6Hbdp+wF33BJSH8rZc6vISB/gnltCas/Z225FStdz2y0hZXE19lrt5p177NyR11+OHb/THhzJP86wP2uYrjvz1h92eTseNEzDbB2nd/OY1Py9WNw6/qjnN+fmvnmwnYkxjf1t+mAW7XlsbzaJ3a7DzH1sf3Udp7m/dcOf615sW26SdfvGrCaxbV4l9nEan0X0xqEaRrbvmnlrGFu3PTN3ndUoLOuapW8ODLzudLVomMHA71z/MwmT9mTmN+bOZnS9NcJDs+V53t+WPzQnbNa9/nRoCPl2AKqObKFvltEBoPvcVwNwmavxOy3IDwFAlkWCWPBqhJDC8GtsCPlGYI8ciQyRI+3/CLHHscysXvf0ynzWIOQsPr3wWllkxNQskD+b82/Ihi8qCCm150XpObXnc2RFs+cJqRhAE5AHpI8BOZbH5TQdlXB8JAUEIC4AvkFPSMEl/dQ+v74+2/bl6enFtm/v72+W/c/eHSW3CUNRGNZyjgiZNHE6fW2b6f63VGScCHSvI7CxjfH/tYnTU43CywFiAfnT/On+lunH3274R5G2zbv03rTj9F+z92+U7pqPX52PZjdM35uf6vxs3ofp799Kulf2B8CEc2JVjvJm6OIT5CO9PekvD/8T767XgTc2z1umnEdggyT5eX2s+k9yGpvH1kqvI523IVfSAzdlW2gbu3zn5+6j/JFcfIft0lBOi4/J6cbmBTZJTdPo9fV1/3pamqTUFCalOVkunVdNTU5bSa2Nn7ULjl0A7o5/aGt6Z6TKUpVC7/VLSrWzqTo7b+yzO+9i28shHtugl5cXXS9NLnyYHVZ+Nz79UG7y4in7Aqza9po+tBsXP1B8wCW3m01yVqq9G3w3q/X+/1lpZ5WEbKdOTnNsxiYtd+ngjl28Fw+zhwGwLA0/mDeIS46AxWnO2MVnUFD627+sasuAxyJpTsp3A+6WgnplGpILpL1JR21lZt5k2ZSrFPE41AteEy+Q9qrn58qW77lNM877sXXq+fcGLp/2giETZO5tTYumHObxKDQ0aezhxb2feNE0MWlvqZS1SzwsJZdslu3x9fYae8HFXYeAKcIVejxwzgwc0YE6jTzuWOAuqOS+GTY3rc+rmDxAKn7VEPAt+amm/7Yu8ev0gfnkHckljT8nSoaf/RkeNgUejaKburGiYt696FNIcXrt/3yJh8Qba+advg0BwJCk66Qamp3WvxtX1gMzSDZya+BU8y2OR+ogyk7w5h+Nox+/6S04pNunwKqpt9Db9yemA2GokjqThGR+ms1JeYMe92hu5y2Zbs5O5be7mkru2Hlpgc5j434M1NPiq0qqgXoaDkwqTU21V0s7dgY/TfLX9XMT1udx56RJqTqf5aqlR3vVqtOWaYpbp4NtW2tmPaXbwAZI0U1zroI/tiRW9oBVOtL5QT6uu2TH0nlgnXRSqsLkGXg+JnBTCjopVeGceXk2FnAtColkUynGMn1SrHXejq3Py4U5wHXZvtluJtXO27H+vFyMB9xElFIxNQ6fUmFj9Xm6Sr67SrA6b94Gfp4HLsb2rSM53VSMpseK1c7bsXbechs4zgO3EiUvs6kK7tgsUmlglaLkZiZVStzOBzoPrJHOS1VgVR5YuTPXz1VgXR5YM/+u9xglkyZRT2WqghlbnVc8CA+4mtxRp5vB7XxW7bw3LwvywI0pr5MN6HNNrUi/fUZO4o6tzxuiuO0GuLzUUdu3GOV3M6raeTu2Nm8aR+eBlVD1BnoVjowt0HBgnY51PrqdT/9yxtJ5YHWkeGKswoxJuMcGuIYoKdowKOQ4Xxov+4Zb/khU8Mf681a3gZ/0gYt1PjGdV1J2/mBS5z/58zrbQOeBE6zpGZgA7smRzgc6D2xKlORlCiUVKrfSslMAVulI56PX+XHv81g6D6yPFM+MVWCJDliLJdfoMhVYowPWYsk1ukwF1uiAu1R/Hh5v2wNb8r+9O0pBGAaiKLqdm/1vUCiFSCdhTIjWhntAwefY5sMxRW1ToJnZ89KjQTnuGzGUWB1DLkJtul0ofocn3SOf5wMu3mu97q30GN2e99he2gKEpj6Dkvwjj4tebb5d8EBAuhuUJJ87f96f4aT/1OlNz7GRfgg+WheCUFsfE16cpEFNx5exIUmHx09zd34AaRdACCDp+TVLSlFv1blzgKR2egx5zx/see0pn+djbR4FIVofz4/UeV67G3+vr3niC+H04Oz/nbwA7lqtm+wByfQAAAAASUVORK5CYII=') no-repeat;\n\twidth: 21px;\n\theight: 21px;\n\tbackground-position: 0 -5305px;\n}\n\n.font-graph-geSprite-startdash {\n\tbackground: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAABeQCAMAAAByzXKPAAAA1VBMVEUAAAAzMzIzMzIzMzE1NTUzMzIzMzIzMzEzMzIyMjIzMzIzMzIzMzIzMzE6OjoyMjIzMzIzMzIzMzEzMzI0NDA0NDIwMDAyMjEzMzIzMzEzMzE0NDAzMzMzMzIyMjIzMzI0NDE0NDQyMjIzMzIzMzIzMzIzMzM5OTkAAAC1tbX///9mZmYwMDAQEBAmJiZTiPJ7e3v/Z2RwcHAgICB+fn5hYWFzc3NAQECoqKiampqMjIxTU1NGRkY3NzcbGxsNDQ3w8PBQUFDg4ODAwMCwsLCgoKBPT09W+xp5AAAAKHRSTlMAh4DDEd187+mljnhvVge5nmhMQi4hA8uxk2IlHOOYc102M/jW088J/2liTQAACt5JREFUeNrs3O1um0AQheG5nIPCoIq1Q7+r/Mn9X1K9xtEAM9RLQmODzyO1cV+NtzjShhjHkRkAgn9DMCaYnRXIGOQdtWmk1zRWm0vNN6az+Y+v2fXZ5iTX/kZ4ZGvUNT6/RJuCM/VVRKFB7YBwtnY1k3h2wboaHy8RFQC2VGuc1D730WWLS2GIZ27aM4yUT+9tXaLNw9m0mI9uokepRLeC+ZyCfFCoqwckqV3WBHFZaxHLFrNxVpgUVRWjg/jli2WbfH4WyxYnWcVV0Rz7FYj26X9ezQcuE3VYkXzFSYpm9eq6pqSiuNYAaj+r0GiFxKv5tEOqxVfV0utrCkZF/HCXTuOdGz2IHKbDR5wdJ6PdeRmIsfviED0C5ZV7ojf487v59fPHsT18//a1Yn1HJdoSjIUXBG5XgaBejhMYVmT9B1dRUONj4KtyRHNmNkULDYeD2CGVjiZ0paOK1jVuYKIpjJTO7m9dovvEn3bz/DH4440f2+d9fvlVh+4LLuK6cM8GVcKKkmq3ZqqBfbhaef4n+pijBudNZH3H+OW3No+rbTmVXjfciPbs/GVQ7QU6tWqUW5lonefHfn5f6xI9DAxdqQU3n55uU821mj2ZuUq0SYo2ivA5tThxk3rK6u+urYtZiqKuGiWMEkbp4/OFLITIvyrfekt35WGvjvP6OlERwP6+VU39z+ansp+0SThP8jk+0SeoAehRjObmdha0f2YwfucMss7uaPVF3rThN/EH6fH3YhEt3bD1zMlwGtu8/8a5zrHJuR6NyrkKMK5N5qqf9ev6Y4hfGfSPrc7ZWZqPQrQPa+x5Cfe8FO55m3Xrcs8T3TFUYQ0zqj5jTPoMmagQz4brFh8D3x5L9OngyRy+IEa0JgBRlaBWAIJYyVYjYDF47PwNV/TwAIRfB+BiFcyeolchija6+P7xd//IveI+JlpwnrdZP7xexdD6/4N/PDzP06NZdc8vP4H7WKFXLbqjQcU9T7QZvFhHdN/+sndmy6lCQRQ9KOA8Ro1TxjttYuUlX5BK5f+/6YJIWjlNFREkpLJXGQuWO01e2mPaU4pA17qH7iEeKfRsrrqh4/t0hJQPEJSokULPFpJse0Iu0PNQNVSNnOu8ZHPWZc8TUhkBgECRikZMrp4Xq9W1NPubkIIUm4hnrtyikSIjq+jck3bOBQkpnSBrkU97ALl73pJqXfFc5AlJqN3cXvoTEKIzJcu5PSEFqHiGp6ahz+33Z3rWtpzhEfK16DO8XXi3S2vIvfUCHnpWrcsZHiHVAFUG0KQJoEgjGjGRFG1l9bq25gyPkIoANBcEab9DEPf27iCk40VbWa0uP86WkMsTQHPQHBSnJJHCytp1dW9Uz2cBQoo0PEqVes/r2bM0131CLtLzUCVUidw9n6uuaPY8IdnUYMet2BTccUtIfShnz60mBe65JaTunL/tVqTAbbeE1ImCc3vl16McIEiWc3tCClD5DM9Ak7ZFZCBkZEVzhkfI5/n6Hbdp+wF33BJSH8rZc6vISB/gnltCas/Z225FStdz2y0hZXE19lrt5p177NyR11+OHb/THhzJP86wP2uYrjvz1h92eTseNEzDbB2nd/OY1Py9WNw6/qjnN+fmvnmwnYkxjf1t+mAW7XlsbzaJ3a7DzH1sf3Udp7m/dcOf615sW26SdfvGrCaxbV4l9nEan0X0xqEaRrbvmnlrGFu3PTN3ndUoLOuapW8ODLzudLVomMHA71z/MwmT9mTmN+bOZnS9NcJDs+V53t+WPzQnbNa9/nRoCPl2AKqObKFvltEBoPvcVwNwmavxOy3IDwFAlkWCWPBqhJDC8GtsCPlGYI8ciQyRI+3/CLHHscysXvf0ynzWIOQsPr3wWllkxNQskD+b82/Ihi8qCCm150XpObXnc2RFs+cJqRhAE5AHpI8BOZbH5TQdlXB8JAUEIC4AvkFPSMEl/dQ+v74+2/bl6enFtm/v72+W/c/eHSW3CUNRGNZyjgiZNHE6fW2b6f63VGScCHSvI7CxjfH/tYnTU43CywFiAfnT/On+lunH3274R5G2zbv03rTj9F+z92+U7pqPX52PZjdM35uf6vxs3ofp799Kulf2B8CEc2JVjvJm6OIT5CO9PekvD/8T767XgTc2z1umnEdggyT5eX2s+k9yGpvH1kqvI523IVfSAzdlW2gbu3zn5+6j/JFcfIft0lBOi4/J6cbmBTZJTdPo9fV1/3pamqTUFCalOVkunVdNTU5bSa2Nn7ULjl0A7o5/aGt6Z6TKUpVC7/VLSrWzqTo7b+yzO+9i28shHtugl5cXXS9NLnyYHVZ+Nz79UG7y4in7Aqza9po+tBsXP1B8wCW3m01yVqq9G3w3q/X+/1lpZ5WEbKdOTnNsxiYtd+ngjl28Fw+zhwGwLA0/mDeIS46AxWnO2MVnUFD627+sasuAxyJpTsp3A+6WgnplGpILpL1JR21lZt5k2ZSrFPE41AteEy+Q9qrn58qW77lNM877sXXq+fcGLp/2giETZO5tTYumHObxKDQ0aezhxb2feNE0MWlvqZS1SzwsJZdslu3x9fYae8HFXYeAKcIVejxwzgwc0YE6jTzuWOAuqOS+GTY3rc+rmDxAKn7VEPAt+amm/7Yu8ev0gfnkHckljT8nSoaf/RkeNgUejaKburGiYt696FNIcXrt/3yJh8Qba+advg0BwJCk66Qamp3WvxtX1gMzSDZya+BU8y2OR+ogyk7w5h+Nox+/6S04pNunwKqpt9Db9yemA2GokjqThGR+ms1JeYMe92hu5y2Zbs5O5be7mkru2Hlpgc5j434M1NPiq0qqgXoaDkwqTU21V0s7dgY/TfLX9XMT1udx56RJqTqf5aqlR3vVqtOWaYpbp4NtW2tmPaXbwAZI0U1zroI/tiRW9oBVOtL5QT6uu2TH0nlgnXRSqsLkGXg+JnBTCjopVeGceXk2FnAtColkUynGMn1SrHXejq3Py4U5wHXZvtluJtXO27H+vFyMB9xElFIxNQ6fUmFj9Xm6Sr67SrA6b94Gfp4HLsb2rSM53VSMpseK1c7bsXbechs4zgO3EiUvs6kK7tgsUmlglaLkZiZVStzOBzoPrJHOS1VgVR5YuTPXz1VgXR5YM/+u9xglkyZRT2WqghlbnVc8CA+4mtxRp5vB7XxW7bw3LwvywI0pr5MN6HNNrUi/fUZO4o6tzxuiuO0GuLzUUdu3GOV3M6raeTu2Nm8aR+eBlVD1BnoVjowt0HBgnY51PrqdT/9yxtJ5YHWkeGKswoxJuMcGuIYoKdowKOQ4Xxov+4Zb/khU8Mf681a3gZ/0gYt1PjGdV1J2/mBS5z/58zrbQOeBE6zpGZgA7smRzgc6D2xKlORlCiUVKrfSslMAVulI56PX+XHv81g6D6yPFM+MVWCJDliLJdfoMhVYowPWYsk1ukwF1uiAu1R/Hh5v2wNb8r+9O0pBGAaiKLqdm/1vUCiFSCdhTIjWhntAwefY5sMxRW1ToJnZ89KjQTnuGzGUWB1DLkJtul0ofocn3SOf5wMu3mu97q30GN2e99he2gKEpj6Dkvwjj4tebb5d8EBAuhuUJJ87f96f4aT/1OlNz7GRfgg+WheCUFsfE16cpEFNx5exIUmHx09zd34AaRdACCDp+TVLSlFv1blzgKR2egx5zx/see0pn+djbR4FIVofz4/UeV67G3+vr3niC+H04Oz/nbwA7lqtm+wByfQAAAAASUVORK5CYII=') no-repeat;\n\twidth: 21px;\n\theight: 21px;\n\tbackground-position: 0 -5351px;\n}\n\n.font-graph-geSprite-startcircleplus {\n\tbackground: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAABeQCAMAAAByzXKPAAAA1VBMVEUAAAAzMzIzMzIzMzE1NTUzMzIzMzIzMzEzMzIyMjIzMzIzMzIzMzIzMzE6OjoyMjIzMzIzMzIzMzEzMzI0NDA0NDIwMDAyMjEzMzIzMzEzMzE0NDAzMzMzMzIyMjIzMzI0NDE0NDQyMjIzMzIzMzIzMzIzMzM5OTkAAAC1tbX///9mZmYwMDAQEBAmJiZTiPJ7e3v/Z2RwcHAgICB+fn5hYWFzc3NAQECoqKiampqMjIxTU1NGRkY3NzcbGxsNDQ3w8PBQUFDg4ODAwMCwsLCgoKBPT09W+xp5AAAAKHRSTlMAh4DDEd187+mljnhvVge5nmhMQi4hA8uxk2IlHOOYc102M/jW088J/2liTQAACt5JREFUeNrs3O1um0AQheG5nIPCoIq1Q7+r/Mn9X1K9xtEAM9RLQmODzyO1cV+NtzjShhjHkRkAgn9DMCaYnRXIGOQdtWmk1zRWm0vNN6az+Y+v2fXZ5iTX/kZ4ZGvUNT6/RJuCM/VVRKFB7YBwtnY1k3h2wboaHy8RFQC2VGuc1D730WWLS2GIZ27aM4yUT+9tXaLNw9m0mI9uokepRLeC+ZyCfFCoqwckqV3WBHFZaxHLFrNxVpgUVRWjg/jli2WbfH4WyxYnWcVV0Rz7FYj26X9ezQcuE3VYkXzFSYpm9eq6pqSiuNYAaj+r0GiFxKv5tEOqxVfV0utrCkZF/HCXTuOdGz2IHKbDR5wdJ6PdeRmIsfviED0C5ZV7ojf487v59fPHsT18//a1Yn1HJdoSjIUXBG5XgaBejhMYVmT9B1dRUONj4KtyRHNmNkULDYeD2CGVjiZ0paOK1jVuYKIpjJTO7m9dovvEn3bz/DH4440f2+d9fvlVh+4LLuK6cM8GVcKKkmq3ZqqBfbhaef4n+pijBudNZH3H+OW3No+rbTmVXjfciPbs/GVQ7QU6tWqUW5lonefHfn5f6xI9DAxdqQU3n55uU821mj2ZuUq0SYo2ivA5tThxk3rK6u+urYtZiqKuGiWMEkbp4/OFLITIvyrfekt35WGvjvP6OlERwP6+VU39z+ansp+0SThP8jk+0SeoAehRjObmdha0f2YwfucMss7uaPVF3rThN/EH6fH3YhEt3bD1zMlwGtu8/8a5zrHJuR6NyrkKMK5N5qqf9ev6Y4hfGfSPrc7ZWZqPQrQPa+x5Cfe8FO55m3Xrcs8T3TFUYQ0zqj5jTPoMmagQz4brFh8D3x5L9OngyRy+IEa0JgBRlaBWAIJYyVYjYDF47PwNV/TwAIRfB+BiFcyeolchija6+P7xd//IveI+JlpwnrdZP7xexdD6/4N/PDzP06NZdc8vP4H7WKFXLbqjQcU9T7QZvFhHdN/+sndmy6lCQRQ9KOA8Ro1TxjttYuUlX5BK5f+/6YJIWjlNFREkpLJXGQuWO01e2mPaU4pA17qH7iEeKfRsrrqh4/t0hJQPEJSokULPFpJse0Iu0PNQNVSNnOu8ZHPWZc8TUhkBgECRikZMrp4Xq9W1NPubkIIUm4hnrtyikSIjq+jck3bOBQkpnSBrkU97ALl73pJqXfFc5AlJqN3cXvoTEKIzJcu5PSEFqHiGp6ahz+33Z3rWtpzhEfK16DO8XXi3S2vIvfUCHnpWrcsZHiHVAFUG0KQJoEgjGjGRFG1l9bq25gyPkIoANBcEab9DEPf27iCk40VbWa0uP86WkMsTQHPQHBSnJJHCytp1dW9Uz2cBQoo0PEqVes/r2bM0131CLtLzUCVUidw9n6uuaPY8IdnUYMet2BTccUtIfShnz60mBe65JaTunL/tVqTAbbeE1ImCc3vl16McIEiWc3tCClD5DM9Ak7ZFZCBkZEVzhkfI5/n6Hbdp+wF33BJSH8rZc6vISB/gnltCas/Z225FStdz2y0hZXE19lrt5p177NyR11+OHb/THhzJP86wP2uYrjvz1h92eTseNEzDbB2nd/OY1Py9WNw6/qjnN+fmvnmwnYkxjf1t+mAW7XlsbzaJ3a7DzH1sf3Udp7m/dcOf615sW26SdfvGrCaxbV4l9nEan0X0xqEaRrbvmnlrGFu3PTN3ndUoLOuapW8ODLzudLVomMHA71z/MwmT9mTmN+bOZnS9NcJDs+V53t+WPzQnbNa9/nRoCPl2AKqObKFvltEBoPvcVwNwmavxOy3IDwFAlkWCWPBqhJDC8GtsCPlGYI8ciQyRI+3/CLHHscysXvf0ynzWIOQsPr3wWllkxNQskD+b82/Ihi8qCCm150XpObXnc2RFs+cJqRhAE5AHpI8BOZbH5TQdlXB8JAUEIC4AvkFPSMEl/dQ+v74+2/bl6enFtm/v72+W/c/eHSW3CUNRGNZyjgiZNHE6fW2b6f63VGScCHSvI7CxjfH/tYnTU43CywFiAfnT/On+lunH3274R5G2zbv03rTj9F+z92+U7pqPX52PZjdM35uf6vxs3ofp799Kulf2B8CEc2JVjvJm6OIT5CO9PekvD/8T767XgTc2z1umnEdggyT5eX2s+k9yGpvH1kqvI523IVfSAzdlW2gbu3zn5+6j/JFcfIft0lBOi4/J6cbmBTZJTdPo9fV1/3pamqTUFCalOVkunVdNTU5bSa2Nn7ULjl0A7o5/aGt6Z6TKUpVC7/VLSrWzqTo7b+yzO+9i28shHtugl5cXXS9NLnyYHVZ+Nz79UG7y4in7Aqza9po+tBsXP1B8wCW3m01yVqq9G3w3q/X+/1lpZ5WEbKdOTnNsxiYtd+ngjl28Fw+zhwGwLA0/mDeIS46AxWnO2MVnUFD627+sasuAxyJpTsp3A+6WgnplGpILpL1JR21lZt5k2ZSrFPE41AteEy+Q9qrn58qW77lNM877sXXq+fcGLp/2giETZO5tTYumHObxKDQ0aezhxb2feNE0MWlvqZS1SzwsJZdslu3x9fYae8HFXYeAKcIVejxwzgwc0YE6jTzuWOAuqOS+GTY3rc+rmDxAKn7VEPAt+amm/7Yu8ev0gfnkHckljT8nSoaf/RkeNgUejaKburGiYt696FNIcXrt/3yJh8Qba+advg0BwJCk66Qamp3WvxtX1gMzSDZya+BU8y2OR+ogyk7w5h+Nox+/6S04pNunwKqpt9Db9yemA2GokjqThGR+ms1JeYMe92hu5y2Zbs5O5be7mkru2Hlpgc5j434M1NPiq0qqgXoaDkwqTU21V0s7dgY/TfLX9XMT1udx56RJqTqf5aqlR3vVqtOWaYpbp4NtW2tmPaXbwAZI0U1zroI/tiRW9oBVOtL5QT6uu2TH0nlgnXRSqsLkGXg+JnBTCjopVeGceXk2FnAtColkUynGMn1SrHXejq3Py4U5wHXZvtluJtXO27H+vFyMB9xElFIxNQ6fUmFj9Xm6Sr67SrA6b94Gfp4HLsb2rSM53VSMpseK1c7bsXbechs4zgO3EiUvs6kK7tgsUmlglaLkZiZVStzOBzoPrJHOS1VgVR5YuTPXz1VgXR5YM/+u9xglkyZRT2WqghlbnVc8CA+4mtxRp5vB7XxW7bw3LwvywI0pr5MN6HNNrUi/fUZO4o6tzxuiuO0GuLzUUdu3GOV3M6raeTu2Nm8aR+eBlVD1BnoVjowt0HBgnY51PrqdT/9yxtJ5YHWkeGKswoxJuMcGuIYoKdowKOQ4Xxov+4Zb/khU8Mf681a3gZ/0gYt1PjGdV1J2/mBS5z/58zrbQOeBE6zpGZgA7smRzgc6D2xKlORlCiUVKrfSslMAVulI56PX+XHv81g6D6yPFM+MVWCJDliLJdfoMhVYowPWYsk1ukwF1uiAu1R/Hh5v2wNb8r+9O0pBGAaiKLqdm/1vUCiFSCdhTIjWhntAwefY5sMxRW1ToJnZ89KjQTnuGzGUWB1DLkJtul0ofocn3SOf5wMu3mu97q30GN2e99he2gKEpj6Dkvwjj4tebb5d8EBAuhuUJJ87f96f4aT/1OlNz7GRfgg+WheCUFsfE16cpEFNx5exIUmHx09zd34AaRdACCDp+TVLSlFv1blzgKR2egx5zx/see0pn+djbR4FIVofz4/UeV67G3+vr3niC+H04Oz/nbwA7lqtm+wByfQAAAAASUVORK5CYII=') no-repeat;\n\twidth: 21px;\n\theight: 21px;\n\tbackground-position: 0 -5397px;\n}\n\n.font-graph-geSprite-startcircle {\n\tbackground: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAABeQCAMAAAByzXKPAAAA1VBMVEUAAAAzMzIzMzIzMzE1NTUzMzIzMzIzMzEzMzIyMjIzMzIzMzIzMzIzMzE6OjoyMjIzMzIzMzIzMzEzMzI0NDA0NDIwMDAyMjEzMzIzMzEzMzE0NDAzMzMzMzIyMjIzMzI0NDE0NDQyMjIzMzIzMzIzMzIzMzM5OTkAAAC1tbX///9mZmYwMDAQEBAmJiZTiPJ7e3v/Z2RwcHAgICB+fn5hYWFzc3NAQECoqKiampqMjIxTU1NGRkY3NzcbGxsNDQ3w8PBQUFDg4ODAwMCwsLCgoKBPT09W+xp5AAAAKHRSTlMAh4DDEd187+mljnhvVge5nmhMQi4hA8uxk2IlHOOYc102M/jW088J/2liTQAACt5JREFUeNrs3O1um0AQheG5nIPCoIq1Q7+r/Mn9X1K9xtEAM9RLQmODzyO1cV+NtzjShhjHkRkAgn9DMCaYnRXIGOQdtWmk1zRWm0vNN6az+Y+v2fXZ5iTX/kZ4ZGvUNT6/RJuCM/VVRKFB7YBwtnY1k3h2wboaHy8RFQC2VGuc1D730WWLS2GIZ27aM4yUT+9tXaLNw9m0mI9uokepRLeC+ZyCfFCoqwckqV3WBHFZaxHLFrNxVpgUVRWjg/jli2WbfH4WyxYnWcVV0Rz7FYj26X9ezQcuE3VYkXzFSYpm9eq6pqSiuNYAaj+r0GiFxKv5tEOqxVfV0utrCkZF/HCXTuOdGz2IHKbDR5wdJ6PdeRmIsfviED0C5ZV7ojf487v59fPHsT18//a1Yn1HJdoSjIUXBG5XgaBejhMYVmT9B1dRUONj4KtyRHNmNkULDYeD2CGVjiZ0paOK1jVuYKIpjJTO7m9dovvEn3bz/DH4440f2+d9fvlVh+4LLuK6cM8GVcKKkmq3ZqqBfbhaef4n+pijBudNZH3H+OW3No+rbTmVXjfciPbs/GVQ7QU6tWqUW5lonefHfn5f6xI9DAxdqQU3n55uU821mj2ZuUq0SYo2ivA5tThxk3rK6u+urYtZiqKuGiWMEkbp4/OFLITIvyrfekt35WGvjvP6OlERwP6+VU39z+ansp+0SThP8jk+0SeoAehRjObmdha0f2YwfucMss7uaPVF3rThN/EH6fH3YhEt3bD1zMlwGtu8/8a5zrHJuR6NyrkKMK5N5qqf9ev6Y4hfGfSPrc7ZWZqPQrQPa+x5Cfe8FO55m3Xrcs8T3TFUYQ0zqj5jTPoMmagQz4brFh8D3x5L9OngyRy+IEa0JgBRlaBWAIJYyVYjYDF47PwNV/TwAIRfB+BiFcyeolchija6+P7xd//IveI+JlpwnrdZP7xexdD6/4N/PDzP06NZdc8vP4H7WKFXLbqjQcU9T7QZvFhHdN/+sndmy6lCQRQ9KOA8Ro1TxjttYuUlX5BK5f+/6YJIWjlNFREkpLJXGQuWO01e2mPaU4pA17qH7iEeKfRsrrqh4/t0hJQPEJSokULPFpJse0Iu0PNQNVSNnOu8ZHPWZc8TUhkBgECRikZMrp4Xq9W1NPubkIIUm4hnrtyikSIjq+jck3bOBQkpnSBrkU97ALl73pJqXfFc5AlJqN3cXvoTEKIzJcu5PSEFqHiGp6ahz+33Z3rWtpzhEfK16DO8XXi3S2vIvfUCHnpWrcsZHiHVAFUG0KQJoEgjGjGRFG1l9bq25gyPkIoANBcEab9DEPf27iCk40VbWa0uP86WkMsTQHPQHBSnJJHCytp1dW9Uz2cBQoo0PEqVes/r2bM0131CLtLzUCVUidw9n6uuaPY8IdnUYMet2BTccUtIfShnz60mBe65JaTunL/tVqTAbbeE1ImCc3vl16McIEiWc3tCClD5DM9Ak7ZFZCBkZEVzhkfI5/n6Hbdp+wF33BJSH8rZc6vISB/gnltCas/Z225FStdz2y0hZXE19lrt5p177NyR11+OHb/THhzJP86wP2uYrjvz1h92eTseNEzDbB2nd/OY1Py9WNw6/qjnN+fmvnmwnYkxjf1t+mAW7XlsbzaJ3a7DzH1sf3Udp7m/dcOf615sW26SdfvGrCaxbV4l9nEan0X0xqEaRrbvmnlrGFu3PTN3ndUoLOuapW8ODLzudLVomMHA71z/MwmT9mTmN+bOZnS9NcJDs+V53t+WPzQnbNa9/nRoCPl2AKqObKFvltEBoPvcVwNwmavxOy3IDwFAlkWCWPBqhJDC8GtsCPlGYI8ciQyRI+3/CLHHscysXvf0ynzWIOQsPr3wWllkxNQskD+b82/Ihi8qCCm150XpObXnc2RFs+cJqRhAE5AHpI8BOZbH5TQdlXB8JAUEIC4AvkFPSMEl/dQ+v74+2/bl6enFtm/v72+W/c/eHSW3CUNRGNZyjgiZNHE6fW2b6f63VGScCHSvI7CxjfH/tYnTU43CywFiAfnT/On+lunH3274R5G2zbv03rTj9F+z92+U7pqPX52PZjdM35uf6vxs3ofp799Kulf2B8CEc2JVjvJm6OIT5CO9PekvD/8T767XgTc2z1umnEdggyT5eX2s+k9yGpvH1kqvI523IVfSAzdlW2gbu3zn5+6j/JFcfIft0lBOi4/J6cbmBTZJTdPo9fV1/3pamqTUFCalOVkunVdNTU5bSa2Nn7ULjl0A7o5/aGt6Z6TKUpVC7/VLSrWzqTo7b+yzO+9i28shHtugl5cXXS9NLnyYHVZ+Nz79UG7y4in7Aqza9po+tBsXP1B8wCW3m01yVqq9G3w3q/X+/1lpZ5WEbKdOTnNsxiYtd+ngjl28Fw+zhwGwLA0/mDeIS46AxWnO2MVnUFD627+sasuAxyJpTsp3A+6WgnplGpILpL1JR21lZt5k2ZSrFPE41AteEy+Q9qrn58qW77lNM877sXXq+fcGLp/2giETZO5tTYumHObxKDQ0aezhxb2feNE0MWlvqZS1SzwsJZdslu3x9fYae8HFXYeAKcIVejxwzgwc0YE6jTzuWOAuqOS+GTY3rc+rmDxAKn7VEPAt+amm/7Yu8ev0gfnkHckljT8nSoaf/RkeNgUejaKburGiYt696FNIcXrt/3yJh8Qba+advg0BwJCk66Qamp3WvxtX1gMzSDZya+BU8y2OR+ogyk7w5h+Nox+/6S04pNunwKqpt9Db9yemA2GokjqThGR+ms1JeYMe92hu5y2Zbs5O5be7mkru2Hlpgc5j434M1NPiq0qqgXoaDkwqTU21V0s7dgY/TfLX9XMT1udx56RJqTqf5aqlR3vVqtOWaYpbp4NtW2tmPaXbwAZI0U1zroI/tiRW9oBVOtL5QT6uu2TH0nlgnXRSqsLkGXg+JnBTCjopVeGceXk2FnAtColkUynGMn1SrHXejq3Py4U5wHXZvtluJtXO27H+vFyMB9xElFIxNQ6fUmFj9Xm6Sr67SrA6b94Gfp4HLsb2rSM53VSMpseK1c7bsXbechs4zgO3EiUvs6kK7tgsUmlglaLkZiZVStzOBzoPrJHOS1VgVR5YuTPXz1VgXR5YM/+u9xglkyZRT2WqghlbnVc8CA+4mtxRp5vB7XxW7bw3LwvywI0pr5MN6HNNrUi/fUZO4o6tzxuiuO0GuLzUUdu3GOV3M6raeTu2Nm8aR+eBlVD1BnoVjowt0HBgnY51PrqdT/9yxtJ5YHWkeGKswoxJuMcGuIYoKdowKOQ4Xxov+4Zb/khU8Mf681a3gZ/0gYt1PjGdV1J2/mBS5z/58zrbQOeBE6zpGZgA7smRzgc6D2xKlORlCiUVKrfSslMAVulI56PX+XHv81g6D6yPFM+MVWCJDliLJdfoMhVYowPWYsk1ukwF1uiAu1R/Hh5v2wNb8r+9O0pBGAaiKLqdm/1vUCiFSCdhTIjWhntAwefY5sMxRW1ToJnZ89KjQTnuGzGUWB1DLkJtul0ofocn3SOf5wMu3mu97q30GN2e99he2gKEpj6Dkvwjj4tebb5d8EBAuhuUJJ87f96f4aT/1OlNz7GRfgg+WheCUFsfE16cpEFNx5exIUmHx09zd34AaRdACCDp+TVLSlFv1blzgKR2egx5zx/see0pn+djbR4FIVofz4/UeV67G3+vr3niC+H04Oz/nbwA7lqtm+wByfQAAAAASUVORK5CYII=') no-repeat;\n\twidth: 21px;\n\theight: 21px;\n\tbackground-position: 0 -5443px;\n}\n\n.font-graph-geSprite-startasync {\n\tbackground: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAABeQCAMAAAByzXKPAAAA1VBMVEUAAAAzMzIzMzIzMzE1NTUzMzIzMzIzMzEzMzIyMjIzMzIzMzIzMzIzMzE6OjoyMjIzMzIzMzIzMzEzMzI0NDA0NDIwMDAyMjEzMzIzMzEzMzE0NDAzMzMzMzIyMjIzMzI0NDE0NDQyMjIzMzIzMzIzMzIzMzM5OTkAAAC1tbX///9mZmYwMDAQEBAmJiZTiPJ7e3v/Z2RwcHAgICB+fn5hYWFzc3NAQECoqKiampqMjIxTU1NGRkY3NzcbGxsNDQ3w8PBQUFDg4ODAwMCwsLCgoKBPT09W+xp5AAAAKHRSTlMAh4DDEd187+mljnhvVge5nmhMQi4hA8uxk2IlHOOYc102M/jW088J/2liTQAACt5JREFUeNrs3O1um0AQheG5nIPCoIq1Q7+r/Mn9X1K9xtEAM9RLQmODzyO1cV+NtzjShhjHkRkAgn9DMCaYnRXIGOQdtWmk1zRWm0vNN6az+Y+v2fXZ5iTX/kZ4ZGvUNT6/RJuCM/VVRKFB7YBwtnY1k3h2wboaHy8RFQC2VGuc1D730WWLS2GIZ27aM4yUT+9tXaLNw9m0mI9uokepRLeC+ZyCfFCoqwckqV3WBHFZaxHLFrNxVpgUVRWjg/jli2WbfH4WyxYnWcVV0Rz7FYj26X9ezQcuE3VYkXzFSYpm9eq6pqSiuNYAaj+r0GiFxKv5tEOqxVfV0utrCkZF/HCXTuOdGz2IHKbDR5wdJ6PdeRmIsfviED0C5ZV7ojf487v59fPHsT18//a1Yn1HJdoSjIUXBG5XgaBejhMYVmT9B1dRUONj4KtyRHNmNkULDYeD2CGVjiZ0paOK1jVuYKIpjJTO7m9dovvEn3bz/DH4440f2+d9fvlVh+4LLuK6cM8GVcKKkmq3ZqqBfbhaef4n+pijBudNZH3H+OW3No+rbTmVXjfciPbs/GVQ7QU6tWqUW5lonefHfn5f6xI9DAxdqQU3n55uU821mj2ZuUq0SYo2ivA5tThxk3rK6u+urYtZiqKuGiWMEkbp4/OFLITIvyrfekt35WGvjvP6OlERwP6+VU39z+ansp+0SThP8jk+0SeoAehRjObmdha0f2YwfucMss7uaPVF3rThN/EH6fH3YhEt3bD1zMlwGtu8/8a5zrHJuR6NyrkKMK5N5qqf9ev6Y4hfGfSPrc7ZWZqPQrQPa+x5Cfe8FO55m3Xrcs8T3TFUYQ0zqj5jTPoMmagQz4brFh8D3x5L9OngyRy+IEa0JgBRlaBWAIJYyVYjYDF47PwNV/TwAIRfB+BiFcyeolchija6+P7xd//IveI+JlpwnrdZP7xexdD6/4N/PDzP06NZdc8vP4H7WKFXLbqjQcU9T7QZvFhHdN/+sndmy6lCQRQ9KOA8Ro1TxjttYuUlX5BK5f+/6YJIWjlNFREkpLJXGQuWO01e2mPaU4pA17qH7iEeKfRsrrqh4/t0hJQPEJSokULPFpJse0Iu0PNQNVSNnOu8ZHPWZc8TUhkBgECRikZMrp4Xq9W1NPubkIIUm4hnrtyikSIjq+jck3bOBQkpnSBrkU97ALl73pJqXfFc5AlJqN3cXvoTEKIzJcu5PSEFqHiGp6ahz+33Z3rWtpzhEfK16DO8XXi3S2vIvfUCHnpWrcsZHiHVAFUG0KQJoEgjGjGRFG1l9bq25gyPkIoANBcEab9DEPf27iCk40VbWa0uP86WkMsTQHPQHBSnJJHCytp1dW9Uz2cBQoo0PEqVes/r2bM0131CLtLzUCVUidw9n6uuaPY8IdnUYMet2BTccUtIfShnz60mBe65JaTunL/tVqTAbbeE1ImCc3vl16McIEiWc3tCClD5DM9Ak7ZFZCBkZEVzhkfI5/n6Hbdp+wF33BJSH8rZc6vISB/gnltCas/Z225FStdz2y0hZXE19lrt5p177NyR11+OHb/THhzJP86wP2uYrjvz1h92eTseNEzDbB2nd/OY1Py9WNw6/qjnN+fmvnmwnYkxjf1t+mAW7XlsbzaJ3a7DzH1sf3Udp7m/dcOf615sW26SdfvGrCaxbV4l9nEan0X0xqEaRrbvmnlrGFu3PTN3ndUoLOuapW8ODLzudLVomMHA71z/MwmT9mTmN+bOZnS9NcJDs+V53t+WPzQnbNa9/nRoCPl2AKqObKFvltEBoPvcVwNwmavxOy3IDwFAlkWCWPBqhJDC8GtsCPlGYI8ciQyRI+3/CLHHscysXvf0ynzWIOQsPr3wWllkxNQskD+b82/Ihi8qCCm150XpObXnc2RFs+cJqRhAE5AHpI8BOZbH5TQdlXB8JAUEIC4AvkFPSMEl/dQ+v74+2/bl6enFtm/v72+W/c/eHSW3CUNRGNZyjgiZNHE6fW2b6f63VGScCHSvI7CxjfH/tYnTU43CywFiAfnT/On+lunH3274R5G2zbv03rTj9F+z92+U7pqPX52PZjdM35uf6vxs3ofp799Kulf2B8CEc2JVjvJm6OIT5CO9PekvD/8T767XgTc2z1umnEdggyT5eX2s+k9yGpvH1kqvI523IVfSAzdlW2gbu3zn5+6j/JFcfIft0lBOi4/J6cbmBTZJTdPo9fV1/3pamqTUFCalOVkunVdNTU5bSa2Nn7ULjl0A7o5/aGt6Z6TKUpVC7/VLSrWzqTo7b+yzO+9i28shHtugl5cXXS9NLnyYHVZ+Nz79UG7y4in7Aqza9po+tBsXP1B8wCW3m01yVqq9G3w3q/X+/1lpZ5WEbKdOTnNsxiYtd+ngjl28Fw+zhwGwLA0/mDeIS46AxWnO2MVnUFD627+sasuAxyJpTsp3A+6WgnplGpILpL1JR21lZt5k2ZSrFPE41AteEy+Q9qrn58qW77lNM877sXXq+fcGLp/2giETZO5tTYumHObxKDQ0aezhxb2feNE0MWlvqZS1SzwsJZdslu3x9fYae8HFXYeAKcIVejxwzgwc0YE6jTzuWOAuqOS+GTY3rc+rmDxAKn7VEPAt+amm/7Yu8ev0gfnkHckljT8nSoaf/RkeNgUejaKburGiYt696FNIcXrt/3yJh8Qba+advg0BwJCk66Qamp3WvxtX1gMzSDZya+BU8y2OR+ogyk7w5h+Nox+/6S04pNunwKqpt9Db9yemA2GokjqThGR+ms1JeYMe92hu5y2Zbs5O5be7mkru2Hlpgc5j434M1NPiq0qqgXoaDkwqTU21V0s7dgY/TfLX9XMT1udx56RJqTqf5aqlR3vVqtOWaYpbp4NtW2tmPaXbwAZI0U1zroI/tiRW9oBVOtL5QT6uu2TH0nlgnXRSqsLkGXg+JnBTCjopVeGceXk2FnAtColkUynGMn1SrHXejq3Py4U5wHXZvtluJtXO27H+vFyMB9xElFIxNQ6fUmFj9Xm6Sr67SrA6b94Gfp4HLsb2rSM53VSMpseK1c7bsXbechs4zgO3EiUvs6kK7tgsUmlglaLkZiZVStzOBzoPrJHOS1VgVR5YuTPXz1VgXR5YM/+u9xglkyZRT2WqghlbnVc8CA+4mtxRp5vB7XxW7bw3LwvywI0pr5MN6HNNrUi/fUZO4o6tzxuiuO0GuLzUUdu3GOV3M6raeTu2Nm8aR+eBlVD1BnoVjowt0HBgnY51PrqdT/9yxtJ5YHWkeGKswoxJuMcGuIYoKdowKOQ4Xxov+4Zb/khU8Mf681a3gZ/0gYt1PjGdV1J2/mBS5z/58zrbQOeBE6zpGZgA7smRzgc6D2xKlORlCiUVKrfSslMAVulI56PX+XHv81g6D6yPFM+MVWCJDliLJdfoMhVYowPWYsk1ukwF1uiAu1R/Hh5v2wNb8r+9O0pBGAaiKLqdm/1vUCiFSCdhTIjWhntAwefY5sMxRW1ToJnZ89KjQTnuGzGUWB1DLkJtul0ofocn3SOf5wMu3mu97q30GN2e99he2gKEpj6Dkvwjj4tebb5d8EBAuhuUJJ87f96f4aT/1OlNz7GRfgg+WheCUFsfE16cpEFNx5exIUmHx09zd34AaRdACCDp+TVLSlFv1blzgKR2egx5zx/see0pn+djbR4FIVofz4/UeV67G3+vr3niC+H04Oz/nbwA7lqtm+wByfQAAAAASUVORK5CYII=') no-repeat;\n\twidth: 21px;\n\theight: 21px;\n\tbackground-position: 0 -5489px;\n}\n\n.font-graph-geSprite-startasynctrans {\n\tbackground: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAABeQCAMAAAByzXKPAAAA1VBMVEUAAAAzMzIzMzIzMzE1NTUzMzIzMzIzMzEzMzIyMjIzMzIzMzIzMzIzMzE6OjoyMjIzMzIzMzIzMzEzMzI0NDA0NDIwMDAyMjEzMzIzMzEzMzE0NDAzMzMzMzIyMjIzMzI0NDE0NDQyMjIzMzIzMzIzMzIzMzM5OTkAAAC1tbX///9mZmYwMDAQEBAmJiZTiPJ7e3v/Z2RwcHAgICB+fn5hYWFzc3NAQECoqKiampqMjIxTU1NGRkY3NzcbGxsNDQ3w8PBQUFDg4ODAwMCwsLCgoKBPT09W+xp5AAAAKHRSTlMAh4DDEd187+mljnhvVge5nmhMQi4hA8uxk2IlHOOYc102M/jW088J/2liTQAACt5JREFUeNrs3O1um0AQheG5nIPCoIq1Q7+r/Mn9X1K9xtEAM9RLQmODzyO1cV+NtzjShhjHkRkAgn9DMCaYnRXIGOQdtWmk1zRWm0vNN6az+Y+v2fXZ5iTX/kZ4ZGvUNT6/RJuCM/VVRKFB7YBwtnY1k3h2wboaHy8RFQC2VGuc1D730WWLS2GIZ27aM4yUT+9tXaLNw9m0mI9uokepRLeC+ZyCfFCoqwckqV3WBHFZaxHLFrNxVpgUVRWjg/jli2WbfH4WyxYnWcVV0Rz7FYj26X9ezQcuE3VYkXzFSYpm9eq6pqSiuNYAaj+r0GiFxKv5tEOqxVfV0utrCkZF/HCXTuOdGz2IHKbDR5wdJ6PdeRmIsfviED0C5ZV7ojf487v59fPHsT18//a1Yn1HJdoSjIUXBG5XgaBejhMYVmT9B1dRUONj4KtyRHNmNkULDYeD2CGVjiZ0paOK1jVuYKIpjJTO7m9dovvEn3bz/DH4440f2+d9fvlVh+4LLuK6cM8GVcKKkmq3ZqqBfbhaef4n+pijBudNZH3H+OW3No+rbTmVXjfciPbs/GVQ7QU6tWqUW5lonefHfn5f6xI9DAxdqQU3n55uU821mj2ZuUq0SYo2ivA5tThxk3rK6u+urYtZiqKuGiWMEkbp4/OFLITIvyrfekt35WGvjvP6OlERwP6+VU39z+ansp+0SThP8jk+0SeoAehRjObmdha0f2YwfucMss7uaPVF3rThN/EH6fH3YhEt3bD1zMlwGtu8/8a5zrHJuR6NyrkKMK5N5qqf9ev6Y4hfGfSPrc7ZWZqPQrQPa+x5Cfe8FO55m3Xrcs8T3TFUYQ0zqj5jTPoMmagQz4brFh8D3x5L9OngyRy+IEa0JgBRlaBWAIJYyVYjYDF47PwNV/TwAIRfB+BiFcyeolchija6+P7xd//IveI+JlpwnrdZP7xexdD6/4N/PDzP06NZdc8vP4H7WKFXLbqjQcU9T7QZvFhHdN/+sndmy6lCQRQ9KOA8Ro1TxjttYuUlX5BK5f+/6YJIWjlNFREkpLJXGQuWO01e2mPaU4pA17qH7iEeKfRsrrqh4/t0hJQPEJSokULPFpJse0Iu0PNQNVSNnOu8ZHPWZc8TUhkBgECRikZMrp4Xq9W1NPubkIIUm4hnrtyikSIjq+jck3bOBQkpnSBrkU97ALl73pJqXfFc5AlJqN3cXvoTEKIzJcu5PSEFqHiGp6ahz+33Z3rWtpzhEfK16DO8XXi3S2vIvfUCHnpWrcsZHiHVAFUG0KQJoEgjGjGRFG1l9bq25gyPkIoANBcEab9DEPf27iCk40VbWa0uP86WkMsTQHPQHBSnJJHCytp1dW9Uz2cBQoo0PEqVes/r2bM0131CLtLzUCVUidw9n6uuaPY8IdnUYMet2BTccUtIfShnz60mBe65JaTunL/tVqTAbbeE1ImCc3vl16McIEiWc3tCClD5DM9Ak7ZFZCBkZEVzhkfI5/n6Hbdp+wF33BJSH8rZc6vISB/gnltCas/Z225FStdz2y0hZXE19lrt5p177NyR11+OHb/THhzJP86wP2uYrjvz1h92eTseNEzDbB2nd/OY1Py9WNw6/qjnN+fmvnmwnYkxjf1t+mAW7XlsbzaJ3a7DzH1sf3Udp7m/dcOf615sW26SdfvGrCaxbV4l9nEan0X0xqEaRrbvmnlrGFu3PTN3ndUoLOuapW8ODLzudLVomMHA71z/MwmT9mTmN+bOZnS9NcJDs+V53t+WPzQnbNa9/nRoCPl2AKqObKFvltEBoPvcVwNwmavxOy3IDwFAlkWCWPBqhJDC8GtsCPlGYI8ciQyRI+3/CLHHscysXvf0ynzWIOQsPr3wWllkxNQskD+b82/Ihi8qCCm150XpObXnc2RFs+cJqRhAE5AHpI8BOZbH5TQdlXB8JAUEIC4AvkFPSMEl/dQ+v74+2/bl6enFtm/v72+W/c/eHSW3CUNRGNZyjgiZNHE6fW2b6f63VGScCHSvI7CxjfH/tYnTU43CywFiAfnT/On+lunH3274R5G2zbv03rTj9F+z92+U7pqPX52PZjdM35uf6vxs3ofp799Kulf2B8CEc2JVjvJm6OIT5CO9PekvD/8T767XgTc2z1umnEdggyT5eX2s+k9yGpvH1kqvI523IVfSAzdlW2gbu3zn5+6j/JFcfIft0lBOi4/J6cbmBTZJTdPo9fV1/3pamqTUFCalOVkunVdNTU5bSa2Nn7ULjl0A7o5/aGt6Z6TKUpVC7/VLSrWzqTo7b+yzO+9i28shHtugl5cXXS9NLnyYHVZ+Nz79UG7y4in7Aqza9po+tBsXP1B8wCW3m01yVqq9G3w3q/X+/1lpZ5WEbKdOTnNsxiYtd+ngjl28Fw+zhwGwLA0/mDeIS46AxWnO2MVnUFD627+sasuAxyJpTsp3A+6WgnplGpILpL1JR21lZt5k2ZSrFPE41AteEy+Q9qrn58qW77lNM877sXXq+fcGLp/2giETZO5tTYumHObxKDQ0aezhxb2feNE0MWlvqZS1SzwsJZdslu3x9fYae8HFXYeAKcIVejxwzgwc0YE6jTzuWOAuqOS+GTY3rc+rmDxAKn7VEPAt+amm/7Yu8ev0gfnkHckljT8nSoaf/RkeNgUejaKburGiYt696FNIcXrt/3yJh8Qba+advg0BwJCk66Qamp3WvxtX1gMzSDZya+BU8y2OR+ogyk7w5h+Nox+/6S04pNunwKqpt9Db9yemA2GokjqThGR+ms1JeYMe92hu5y2Zbs5O5be7mkru2Hlpgc5j434M1NPiq0qqgXoaDkwqTU21V0s7dgY/TfLX9XMT1udx56RJqTqf5aqlR3vVqtOWaYpbp4NtW2tmPaXbwAZI0U1zroI/tiRW9oBVOtL5QT6uu2TH0nlgnXRSqsLkGXg+JnBTCjopVeGceXk2FnAtColkUynGMn1SrHXejq3Py4U5wHXZvtluJtXO27H+vFyMB9xElFIxNQ6fUmFj9Xm6Sr67SrA6b94Gfp4HLsb2rSM53VSMpseK1c7bsXbechs4zgO3EiUvs6kK7tgsUmlglaLkZiZVStzOBzoPrJHOS1VgVR5YuTPXz1VgXR5YM/+u9xglkyZRT2WqghlbnVc8CA+4mtxRp5vB7XxW7bw3LwvywI0pr5MN6HNNrUi/fUZO4o6tzxuiuO0GuLzUUdu3GOV3M6raeTu2Nm8aR+eBlVD1BnoVjowt0HBgnY51PrqdT/9yxtJ5YHWkeGKswoxJuMcGuIYoKdowKOQ4Xxov+4Zb/khU8Mf681a3gZ/0gYt1PjGdV1J2/mBS5z/58zrbQOeBE6zpGZgA7smRzgc6D2xKlORlCiUVKrfSslMAVulI56PX+XHv81g6D6yPFM+MVWCJDliLJdfoMhVYowPWYsk1ukwF1uiAu1R/Hh5v2wNb8r+9O0pBGAaiKLqdm/1vUCiFSCdhTIjWhntAwefY5sMxRW1ToJnZ89KjQTnuGzGUWB1DLkJtul0ofocn3SOf5wMu3mu97q30GN2e99he2gKEpj6Dkvwjj4tebb5d8EBAuhuUJJ87f96f4aT/1OlNz7GRfgg+WheCUFsfE16cpEFNx5exIUmHx09zd34AaRdACCDp+TVLSlFv1blzgKR2egx5zx/see0pn+djbR4FIVofz4/UeV67G3+vr3niC+H04Oz/nbwA7lqtm+wByfQAAAAASUVORK5CYII=') no-repeat;\n\twidth: 21px;\n\theight: 21px;\n\tbackground-position: 0 -5535px;\n}\n\n.font-graph-geSprite-startcross {\n\tbackground: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAABeQCAMAAAByzXKPAAAA1VBMVEUAAAAzMzIzMzIzMzE1NTUzMzIzMzIzMzEzMzIyMjIzMzIzMzIzMzIzMzE6OjoyMjIzMzIzMzIzMzEzMzI0NDA0NDIwMDAyMjEzMzIzMzEzMzE0NDAzMzMzMzIyMjIzMzI0NDE0NDQyMjIzMzIzMzIzMzIzMzM5OTkAAAC1tbX///9mZmYwMDAQEBAmJiZTiPJ7e3v/Z2RwcHAgICB+fn5hYWFzc3NAQECoqKiampqMjIxTU1NGRkY3NzcbGxsNDQ3w8PBQUFDg4ODAwMCwsLCgoKBPT09W+xp5AAAAKHRSTlMAh4DDEd187+mljnhvVge5nmhMQi4hA8uxk2IlHOOYc102M/jW088J/2liTQAACt5JREFUeNrs3O1um0AQheG5nIPCoIq1Q7+r/Mn9X1K9xtEAM9RLQmODzyO1cV+NtzjShhjHkRkAgn9DMCaYnRXIGOQdtWmk1zRWm0vNN6az+Y+v2fXZ5iTX/kZ4ZGvUNT6/RJuCM/VVRKFB7YBwtnY1k3h2wboaHy8RFQC2VGuc1D730WWLS2GIZ27aM4yUT+9tXaLNw9m0mI9uokepRLeC+ZyCfFCoqwckqV3WBHFZaxHLFrNxVpgUVRWjg/jli2WbfH4WyxYnWcVV0Rz7FYj26X9ezQcuE3VYkXzFSYpm9eq6pqSiuNYAaj+r0GiFxKv5tEOqxVfV0utrCkZF/HCXTuOdGz2IHKbDR5wdJ6PdeRmIsfviED0C5ZV7ojf487v59fPHsT18//a1Yn1HJdoSjIUXBG5XgaBejhMYVmT9B1dRUONj4KtyRHNmNkULDYeD2CGVjiZ0paOK1jVuYKIpjJTO7m9dovvEn3bz/DH4440f2+d9fvlVh+4LLuK6cM8GVcKKkmq3ZqqBfbhaef4n+pijBudNZH3H+OW3No+rbTmVXjfciPbs/GVQ7QU6tWqUW5lonefHfn5f6xI9DAxdqQU3n55uU821mj2ZuUq0SYo2ivA5tThxk3rK6u+urYtZiqKuGiWMEkbp4/OFLITIvyrfekt35WGvjvP6OlERwP6+VU39z+ansp+0SThP8jk+0SeoAehRjObmdha0f2YwfucMss7uaPVF3rThN/EH6fH3YhEt3bD1zMlwGtu8/8a5zrHJuR6NyrkKMK5N5qqf9ev6Y4hfGfSPrc7ZWZqPQrQPa+x5Cfe8FO55m3Xrcs8T3TFUYQ0zqj5jTPoMmagQz4brFh8D3x5L9OngyRy+IEa0JgBRlaBWAIJYyVYjYDF47PwNV/TwAIRfB+BiFcyeolchija6+P7xd//IveI+JlpwnrdZP7xexdD6/4N/PDzP06NZdc8vP4H7WKFXLbqjQcU9T7QZvFhHdN/+sndmy6lCQRQ9KOA8Ro1TxjttYuUlX5BK5f+/6YJIWjlNFREkpLJXGQuWO01e2mPaU4pA17qH7iEeKfRsrrqh4/t0hJQPEJSokULPFpJse0Iu0PNQNVSNnOu8ZHPWZc8TUhkBgECRikZMrp4Xq9W1NPubkIIUm4hnrtyikSIjq+jck3bOBQkpnSBrkU97ALl73pJqXfFc5AlJqN3cXvoTEKIzJcu5PSEFqHiGp6ahz+33Z3rWtpzhEfK16DO8XXi3S2vIvfUCHnpWrcsZHiHVAFUG0KQJoEgjGjGRFG1l9bq25gyPkIoANBcEab9DEPf27iCk40VbWa0uP86WkMsTQHPQHBSnJJHCytp1dW9Uz2cBQoo0PEqVes/r2bM0131CLtLzUCVUidw9n6uuaPY8IdnUYMet2BTccUtIfShnz60mBe65JaTunL/tVqTAbbeE1ImCc3vl16McIEiWc3tCClD5DM9Ak7ZFZCBkZEVzhkfI5/n6Hbdp+wF33BJSH8rZc6vISB/gnltCas/Z225FStdz2y0hZXE19lrt5p177NyR11+OHb/THhzJP86wP2uYrjvz1h92eTseNEzDbB2nd/OY1Py9WNw6/qjnN+fmvnmwnYkxjf1t+mAW7XlsbzaJ3a7DzH1sf3Udp7m/dcOf615sW26SdfvGrCaxbV4l9nEan0X0xqEaRrbvmnlrGFu3PTN3ndUoLOuapW8ODLzudLVomMHA71z/MwmT9mTmN+bOZnS9NcJDs+V53t+WPzQnbNa9/nRoCPl2AKqObKFvltEBoPvcVwNwmavxOy3IDwFAlkWCWPBqhJDC8GtsCPlGYI8ciQyRI+3/CLHHscysXvf0ynzWIOQsPr3wWllkxNQskD+b82/Ihi8qCCm150XpObXnc2RFs+cJqRhAE5AHpI8BOZbH5TQdlXB8JAUEIC4AvkFPSMEl/dQ+v74+2/bl6enFtm/v72+W/c/eHSW3CUNRGNZyjgiZNHE6fW2b6f63VGScCHSvI7CxjfH/tYnTU43CywFiAfnT/On+lunH3274R5G2zbv03rTj9F+z92+U7pqPX52PZjdM35uf6vxs3ofp799Kulf2B8CEc2JVjvJm6OIT5CO9PekvD/8T767XgTc2z1umnEdggyT5eX2s+k9yGpvH1kqvI523IVfSAzdlW2gbu3zn5+6j/JFcfIft0lBOi4/J6cbmBTZJTdPo9fV1/3pamqTUFCalOVkunVdNTU5bSa2Nn7ULjl0A7o5/aGt6Z6TKUpVC7/VLSrWzqTo7b+yzO+9i28shHtugl5cXXS9NLnyYHVZ+Nz79UG7y4in7Aqza9po+tBsXP1B8wCW3m01yVqq9G3w3q/X+/1lpZ5WEbKdOTnNsxiYtd+ngjl28Fw+zhwGwLA0/mDeIS46AxWnO2MVnUFD627+sasuAxyJpTsp3A+6WgnplGpILpL1JR21lZt5k2ZSrFPE41AteEy+Q9qrn58qW77lNM877sXXq+fcGLp/2giETZO5tTYumHObxKDQ0aezhxb2feNE0MWlvqZS1SzwsJZdslu3x9fYae8HFXYeAKcIVejxwzgwc0YE6jTzuWOAuqOS+GTY3rc+rmDxAKn7VEPAt+amm/7Yu8ev0gfnkHckljT8nSoaf/RkeNgUejaKburGiYt696FNIcXrt/3yJh8Qba+advg0BwJCk66Qamp3WvxtX1gMzSDZya+BU8y2OR+ogyk7w5h+Nox+/6S04pNunwKqpt9Db9yemA2GokjqThGR+ms1JeYMe92hu5y2Zbs5O5be7mkru2Hlpgc5j434M1NPiq0qqgXoaDkwqTU21V0s7dgY/TfLX9XMT1udx56RJqTqf5aqlR3vVqtOWaYpbp4NtW2tmPaXbwAZI0U1zroI/tiRW9oBVOtL5QT6uu2TH0nlgnXRSqsLkGXg+JnBTCjopVeGceXk2FnAtColkUynGMn1SrHXejq3Py4U5wHXZvtluJtXO27H+vFyMB9xElFIxNQ6fUmFj9Xm6Sr67SrA6b94Gfp4HLsb2rSM53VSMpseK1c7bsXbechs4zgO3EiUvs6kK7tgsUmlglaLkZiZVStzOBzoPrJHOS1VgVR5YuTPXz1VgXR5YM/+u9xglkyZRT2WqghlbnVc8CA+4mtxRp5vB7XxW7bw3LwvywI0pr5MN6HNNrUi/fUZO4o6tzxuiuO0GuLzUUdu3GOV3M6raeTu2Nm8aR+eBlVD1BnoVjowt0HBgnY51PrqdT/9yxtJ5YHWkeGKswoxJuMcGuIYoKdowKOQ4Xxov+4Zb/khU8Mf681a3gZ/0gYt1PjGdV1J2/mBS5z/58zrbQOeBE6zpGZgA7smRzgc6D2xKlORlCiUVKrfSslMAVulI56PX+XHv81g6D6yPFM+MVWCJDliLJdfoMhVYowPWYsk1ukwF1uiAu1R/Hh5v2wNb8r+9O0pBGAaiKLqdm/1vUCiFSCdhTIjWhntAwefY5sMxRW1ToJnZ89KjQTnuGzGUWB1DLkJtul0ofocn3SOf5wMu3mu97q30GN2e99he2gKEpj6Dkvwjj4tebb5d8EBAuhuUJJ87f96f4aT/1OlNz7GRfgg+WheCUFsfE16cpEFNx5exIUmHx09zd34AaRdACCDp+TVLSlFv1blzgKR2egx5zx/see0pn+djbR4FIVofz4/UeV67G3+vr3niC+H04Oz/nbwA7lqtm+wByfQAAAAASUVORK5CYII=') no-repeat;\n\twidth: 21px;\n\theight: 21px;\n\tbackground-position: 0 -5581px;\n}\n\n.font-graph-geSprite-startopenthin {\n\tbackground: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAABeQCAMAAAByzXKPAAAA1VBMVEUAAAAzMzIzMzIzMzE1NTUzMzIzMzIzMzEzMzIyMjIzMzIzMzIzMzIzMzE6OjoyMjIzMzIzMzIzMzEzMzI0NDA0NDIwMDAyMjEzMzIzMzEzMzE0NDAzMzMzMzIyMjIzMzI0NDE0NDQyMjIzMzIzMzIzMzIzMzM5OTkAAAC1tbX///9mZmYwMDAQEBAmJiZTiPJ7e3v/Z2RwcHAgICB+fn5hYWFzc3NAQECoqKiampqMjIxTU1NGRkY3NzcbGxsNDQ3w8PBQUFDg4ODAwMCwsLCgoKBPT09W+xp5AAAAKHRSTlMAh4DDEd187+mljnhvVge5nmhMQi4hA8uxk2IlHOOYc102M/jW088J/2liTQAACt5JREFUeNrs3O1um0AQheG5nIPCoIq1Q7+r/Mn9X1K9xtEAM9RLQmODzyO1cV+NtzjShhjHkRkAgn9DMCaYnRXIGOQdtWmk1zRWm0vNN6az+Y+v2fXZ5iTX/kZ4ZGvUNT6/RJuCM/VVRKFB7YBwtnY1k3h2wboaHy8RFQC2VGuc1D730WWLS2GIZ27aM4yUT+9tXaLNw9m0mI9uokepRLeC+ZyCfFCoqwckqV3WBHFZaxHLFrNxVpgUVRWjg/jli2WbfH4WyxYnWcVV0Rz7FYj26X9ezQcuE3VYkXzFSYpm9eq6pqSiuNYAaj+r0GiFxKv5tEOqxVfV0utrCkZF/HCXTuOdGz2IHKbDR5wdJ6PdeRmIsfviED0C5ZV7ojf487v59fPHsT18//a1Yn1HJdoSjIUXBG5XgaBejhMYVmT9B1dRUONj4KtyRHNmNkULDYeD2CGVjiZ0paOK1jVuYKIpjJTO7m9dovvEn3bz/DH4440f2+d9fvlVh+4LLuK6cM8GVcKKkmq3ZqqBfbhaef4n+pijBudNZH3H+OW3No+rbTmVXjfciPbs/GVQ7QU6tWqUW5lonefHfn5f6xI9DAxdqQU3n55uU821mj2ZuUq0SYo2ivA5tThxk3rK6u+urYtZiqKuGiWMEkbp4/OFLITIvyrfekt35WGvjvP6OlERwP6+VU39z+ansp+0SThP8jk+0SeoAehRjObmdha0f2YwfucMss7uaPVF3rThN/EH6fH3YhEt3bD1zMlwGtu8/8a5zrHJuR6NyrkKMK5N5qqf9ev6Y4hfGfSPrc7ZWZqPQrQPa+x5Cfe8FO55m3Xrcs8T3TFUYQ0zqj5jTPoMmagQz4brFh8D3x5L9OngyRy+IEa0JgBRlaBWAIJYyVYjYDF47PwNV/TwAIRfB+BiFcyeolchija6+P7xd//IveI+JlpwnrdZP7xexdD6/4N/PDzP06NZdc8vP4H7WKFXLbqjQcU9T7QZvFhHdN/+sndmy6lCQRQ9KOA8Ro1TxjttYuUlX5BK5f+/6YJIWjlNFREkpLJXGQuWO01e2mPaU4pA17qH7iEeKfRsrrqh4/t0hJQPEJSokULPFpJse0Iu0PNQNVSNnOu8ZHPWZc8TUhkBgECRikZMrp4Xq9W1NPubkIIUm4hnrtyikSIjq+jck3bOBQkpnSBrkU97ALl73pJqXfFc5AlJqN3cXvoTEKIzJcu5PSEFqHiGp6ahz+33Z3rWtpzhEfK16DO8XXi3S2vIvfUCHnpWrcsZHiHVAFUG0KQJoEgjGjGRFG1l9bq25gyPkIoANBcEab9DEPf27iCk40VbWa0uP86WkMsTQHPQHBSnJJHCytp1dW9Uz2cBQoo0PEqVes/r2bM0131CLtLzUCVUidw9n6uuaPY8IdnUYMet2BTccUtIfShnz60mBe65JaTunL/tVqTAbbeE1ImCc3vl16McIEiWc3tCClD5DM9Ak7ZFZCBkZEVzhkfI5/n6Hbdp+wF33BJSH8rZc6vISB/gnltCas/Z225FStdz2y0hZXE19lrt5p177NyR11+OHb/THhzJP86wP2uYrjvz1h92eTseNEzDbB2nd/OY1Py9WNw6/qjnN+fmvnmwnYkxjf1t+mAW7XlsbzaJ3a7DzH1sf3Udp7m/dcOf615sW26SdfvGrCaxbV4l9nEan0X0xqEaRrbvmnlrGFu3PTN3ndUoLOuapW8ODLzudLVomMHA71z/MwmT9mTmN+bOZnS9NcJDs+V53t+WPzQnbNa9/nRoCPl2AKqObKFvltEBoPvcVwNwmavxOy3IDwFAlkWCWPBqhJDC8GtsCPlGYI8ciQyRI+3/CLHHscysXvf0ynzWIOQsPr3wWllkxNQskD+b82/Ihi8qCCm150XpObXnc2RFs+cJqRhAE5AHpI8BOZbH5TQdlXB8JAUEIC4AvkFPSMEl/dQ+v74+2/bl6enFtm/v72+W/c/eHSW3CUNRGNZyjgiZNHE6fW2b6f63VGScCHSvI7CxjfH/tYnTU43CywFiAfnT/On+lunH3274R5G2zbv03rTj9F+z92+U7pqPX52PZjdM35uf6vxs3ofp799Kulf2B8CEc2JVjvJm6OIT5CO9PekvD/8T767XgTc2z1umnEdggyT5eX2s+k9yGpvH1kqvI523IVfSAzdlW2gbu3zn5+6j/JFcfIft0lBOi4/J6cbmBTZJTdPo9fV1/3pamqTUFCalOVkunVdNTU5bSa2Nn7ULjl0A7o5/aGt6Z6TKUpVC7/VLSrWzqTo7b+yzO+9i28shHtugl5cXXS9NLnyYHVZ+Nz79UG7y4in7Aqza9po+tBsXP1B8wCW3m01yVqq9G3w3q/X+/1lpZ5WEbKdOTnNsxiYtd+ngjl28Fw+zhwGwLA0/mDeIS46AxWnO2MVnUFD627+sasuAxyJpTsp3A+6WgnplGpILpL1JR21lZt5k2ZSrFPE41AteEy+Q9qrn58qW77lNM877sXXq+fcGLp/2giETZO5tTYumHObxKDQ0aezhxb2feNE0MWlvqZS1SzwsJZdslu3x9fYae8HFXYeAKcIVejxwzgwc0YE6jTzuWOAuqOS+GTY3rc+rmDxAKn7VEPAt+amm/7Yu8ev0gfnkHckljT8nSoaf/RkeNgUejaKburGiYt696FNIcXrt/3yJh8Qba+advg0BwJCk66Qamp3WvxtX1gMzSDZya+BU8y2OR+ogyk7w5h+Nox+/6S04pNunwKqpt9Db9yemA2GokjqThGR+ms1JeYMe92hu5y2Zbs5O5be7mkru2Hlpgc5j434M1NPiq0qqgXoaDkwqTU21V0s7dgY/TfLX9XMT1udx56RJqTqf5aqlR3vVqtOWaYpbp4NtW2tmPaXbwAZI0U1zroI/tiRW9oBVOtL5QT6uu2TH0nlgnXRSqsLkGXg+JnBTCjopVeGceXk2FnAtColkUynGMn1SrHXejq3Py4U5wHXZvtluJtXO27H+vFyMB9xElFIxNQ6fUmFj9Xm6Sr67SrA6b94Gfp4HLsb2rSM53VSMpseK1c7bsXbechs4zgO3EiUvs6kK7tgsUmlglaLkZiZVStzOBzoPrJHOS1VgVR5YuTPXz1VgXR5YM/+u9xglkyZRT2WqghlbnVc8CA+4mtxRp5vB7XxW7bw3LwvywI0pr5MN6HNNrUi/fUZO4o6tzxuiuO0GuLzUUdu3GOV3M6raeTu2Nm8aR+eBlVD1BnoVjowt0HBgnY51PrqdT/9yxtJ5YHWkeGKswoxJuMcGuIYoKdowKOQ4Xxov+4Zb/khU8Mf681a3gZ/0gYt1PjGdV1J2/mBS5z/58zrbQOeBE6zpGZgA7smRzgc6D2xKlORlCiUVKrfSslMAVulI56PX+XHv81g6D6yPFM+MVWCJDliLJdfoMhVYowPWYsk1ukwF1uiAu1R/Hh5v2wNb8r+9O0pBGAaiKLqdm/1vUCiFSCdhTIjWhntAwefY5sMxRW1ToJnZ89KjQTnuGzGUWB1DLkJtul0ofocn3SOf5wMu3mu97q30GN2e99he2gKEpj6Dkvwjj4tebb5d8EBAuhuUJJ87f96f4aT/1OlNz7GRfgg+WheCUFsfE16cpEFNx5exIUmHx09zd34AaRdACCDp+TVLSlFv1blzgKR2egx5zx/see0pn+djbR4FIVofz4/UeV67G3+vr3niC+H04Oz/nbwA7lqtm+wByfQAAAAASUVORK5CYII=') no-repeat;\n\twidth: 21px;\n\theight: 21px;\n\tbackground-position: 0 -5627px;\n}\n\n.font-graph-geSprite-startopenasync {\n\tbackground: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAABeQCAMAAAByzXKPAAAA1VBMVEUAAAAzMzIzMzIzMzE1NTUzMzIzMzIzMzEzMzIyMjIzMzIzMzIzMzIzMzE6OjoyMjIzMzIzMzIzMzEzMzI0NDA0NDIwMDAyMjEzMzIzMzEzMzE0NDAzMzMzMzIyMjIzMzI0NDE0NDQyMjIzMzIzMzIzMzIzMzM5OTkAAAC1tbX///9mZmYwMDAQEBAmJiZTiPJ7e3v/Z2RwcHAgICB+fn5hYWFzc3NAQECoqKiampqMjIxTU1NGRkY3NzcbGxsNDQ3w8PBQUFDg4ODAwMCwsLCgoKBPT09W+xp5AAAAKHRSTlMAh4DDEd187+mljnhvVge5nmhMQi4hA8uxk2IlHOOYc102M/jW088J/2liTQAACt5JREFUeNrs3O1um0AQheG5nIPCoIq1Q7+r/Mn9X1K9xtEAM9RLQmODzyO1cV+NtzjShhjHkRkAgn9DMCaYnRXIGOQdtWmk1zRWm0vNN6az+Y+v2fXZ5iTX/kZ4ZGvUNT6/RJuCM/VVRKFB7YBwtnY1k3h2wboaHy8RFQC2VGuc1D730WWLS2GIZ27aM4yUT+9tXaLNw9m0mI9uokepRLeC+ZyCfFCoqwckqV3WBHFZaxHLFrNxVpgUVRWjg/jli2WbfH4WyxYnWcVV0Rz7FYj26X9ezQcuE3VYkXzFSYpm9eq6pqSiuNYAaj+r0GiFxKv5tEOqxVfV0utrCkZF/HCXTuOdGz2IHKbDR5wdJ6PdeRmIsfviED0C5ZV7ojf487v59fPHsT18//a1Yn1HJdoSjIUXBG5XgaBejhMYVmT9B1dRUONj4KtyRHNmNkULDYeD2CGVjiZ0paOK1jVuYKIpjJTO7m9dovvEn3bz/DH4440f2+d9fvlVh+4LLuK6cM8GVcKKkmq3ZqqBfbhaef4n+pijBudNZH3H+OW3No+rbTmVXjfciPbs/GVQ7QU6tWqUW5lonefHfn5f6xI9DAxdqQU3n55uU821mj2ZuUq0SYo2ivA5tThxk3rK6u+urYtZiqKuGiWMEkbp4/OFLITIvyrfekt35WGvjvP6OlERwP6+VU39z+ansp+0SThP8jk+0SeoAehRjObmdha0f2YwfucMss7uaPVF3rThN/EH6fH3YhEt3bD1zMlwGtu8/8a5zrHJuR6NyrkKMK5N5qqf9ev6Y4hfGfSPrc7ZWZqPQrQPa+x5Cfe8FO55m3Xrcs8T3TFUYQ0zqj5jTPoMmagQz4brFh8D3x5L9OngyRy+IEa0JgBRlaBWAIJYyVYjYDF47PwNV/TwAIRfB+BiFcyeolchija6+P7xd//IveI+JlpwnrdZP7xexdD6/4N/PDzP06NZdc8vP4H7WKFXLbqjQcU9T7QZvFhHdN/+sndmy6lCQRQ9KOA8Ro1TxjttYuUlX5BK5f+/6YJIWjlNFREkpLJXGQuWO01e2mPaU4pA17qH7iEeKfRsrrqh4/t0hJQPEJSokULPFpJse0Iu0PNQNVSNnOu8ZHPWZc8TUhkBgECRikZMrp4Xq9W1NPubkIIUm4hnrtyikSIjq+jck3bOBQkpnSBrkU97ALl73pJqXfFc5AlJqN3cXvoTEKIzJcu5PSEFqHiGp6ahz+33Z3rWtpzhEfK16DO8XXi3S2vIvfUCHnpWrcsZHiHVAFUG0KQJoEgjGjGRFG1l9bq25gyPkIoANBcEab9DEPf27iCk40VbWa0uP86WkMsTQHPQHBSnJJHCytp1dW9Uz2cBQoo0PEqVes/r2bM0131CLtLzUCVUidw9n6uuaPY8IdnUYMet2BTccUtIfShnz60mBe65JaTunL/tVqTAbbeE1ImCc3vl16McIEiWc3tCClD5DM9Ak7ZFZCBkZEVzhkfI5/n6Hbdp+wF33BJSH8rZc6vISB/gnltCas/Z225FStdz2y0hZXE19lrt5p177NyR11+OHb/THhzJP86wP2uYrjvz1h92eTseNEzDbB2nd/OY1Py9WNw6/qjnN+fmvnmwnYkxjf1t+mAW7XlsbzaJ3a7DzH1sf3Udp7m/dcOf615sW26SdfvGrCaxbV4l9nEan0X0xqEaRrbvmnlrGFu3PTN3ndUoLOuapW8ODLzudLVomMHA71z/MwmT9mTmN+bOZnS9NcJDs+V53t+WPzQnbNa9/nRoCPl2AKqObKFvltEBoPvcVwNwmavxOy3IDwFAlkWCWPBqhJDC8GtsCPlGYI8ciQyRI+3/CLHHscysXvf0ynzWIOQsPr3wWllkxNQskD+b82/Ihi8qCCm150XpObXnc2RFs+cJqRhAE5AHpI8BOZbH5TQdlXB8JAUEIC4AvkFPSMEl/dQ+v74+2/bl6enFtm/v72+W/c/eHSW3CUNRGNZyjgiZNHE6fW2b6f63VGScCHSvI7CxjfH/tYnTU43CywFiAfnT/On+lunH3274R5G2zbv03rTj9F+z92+U7pqPX52PZjdM35uf6vxs3ofp799Kulf2B8CEc2JVjvJm6OIT5CO9PekvD/8T767XgTc2z1umnEdggyT5eX2s+k9yGpvH1kqvI523IVfSAzdlW2gbu3zn5+6j/JFcfIft0lBOi4/J6cbmBTZJTdPo9fV1/3pamqTUFCalOVkunVdNTU5bSa2Nn7ULjl0A7o5/aGt6Z6TKUpVC7/VLSrWzqTo7b+yzO+9i28shHtugl5cXXS9NLnyYHVZ+Nz79UG7y4in7Aqza9po+tBsXP1B8wCW3m01yVqq9G3w3q/X+/1lpZ5WEbKdOTnNsxiYtd+ngjl28Fw+zhwGwLA0/mDeIS46AxWnO2MVnUFD627+sasuAxyJpTsp3A+6WgnplGpILpL1JR21lZt5k2ZSrFPE41AteEy+Q9qrn58qW77lNM877sXXq+fcGLp/2giETZO5tTYumHObxKDQ0aezhxb2feNE0MWlvqZS1SzwsJZdslu3x9fYae8HFXYeAKcIVejxwzgwc0YE6jTzuWOAuqOS+GTY3rc+rmDxAKn7VEPAt+amm/7Yu8ev0gfnkHckljT8nSoaf/RkeNgUejaKburGiYt696FNIcXrt/3yJh8Qba+advg0BwJCk66Qamp3WvxtX1gMzSDZya+BU8y2OR+ogyk7w5h+Nox+/6S04pNunwKqpt9Db9yemA2GokjqThGR+ms1JeYMe92hu5y2Zbs5O5be7mkru2Hlpgc5j434M1NPiq0qqgXoaDkwqTU21V0s7dgY/TfLX9XMT1udx56RJqTqf5aqlR3vVqtOWaYpbp4NtW2tmPaXbwAZI0U1zroI/tiRW9oBVOtL5QT6uu2TH0nlgnXRSqsLkGXg+JnBTCjopVeGceXk2FnAtColkUynGMn1SrHXejq3Py4U5wHXZvtluJtXO27H+vFyMB9xElFIxNQ6fUmFj9Xm6Sr67SrA6b94Gfp4HLsb2rSM53VSMpseK1c7bsXbechs4zgO3EiUvs6kK7tgsUmlglaLkZiZVStzOBzoPrJHOS1VgVR5YuTPXz1VgXR5YM/+u9xglkyZRT2WqghlbnVc8CA+4mtxRp5vB7XxW7bw3LwvywI0pr5MN6HNNrUi/fUZO4o6tzxuiuO0GuLzUUdu3GOV3M6raeTu2Nm8aR+eBlVD1BnoVjowt0HBgnY51PrqdT/9yxtJ5YHWkeGKswoxJuMcGuIYoKdowKOQ4Xxov+4Zb/khU8Mf681a3gZ/0gYt1PjGdV1J2/mBS5z/58zrbQOeBE6zpGZgA7smRzgc6D2xKlORlCiUVKrfSslMAVulI56PX+XHv81g6D6yPFM+MVWCJDliLJdfoMhVYowPWYsk1ukwF1uiAu1R/Hh5v2wNb8r+9O0pBGAaiKLqdm/1vUCiFSCdhTIjWhntAwefY5sMxRW1ToJnZ89KjQTnuGzGUWB1DLkJtul0ofocn3SOf5wMu3mu97q30GN2e99he2gKEpj6Dkvwjj4tebb5d8EBAuhuUJJ87f96f4aT/1OlNz7GRfgg+WheCUFsfE16cpEFNx5exIUmHx09zd34AaRdACCDp+TVLSlFv1blzgKR2egx5zx/see0pn+djbR4FIVofz4/UeV67G3+vr3niC+H04Oz/nbwA7lqtm+wByfQAAAAASUVORK5CYII=') no-repeat;\n\twidth: 21px;\n\theight: 21px;\n\tbackground-position: 0 -5673px;\n}\n\n.font-graph-geSprite-endcross {\n\tbackground: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAABeQCAMAAAByzXKPAAAA1VBMVEUAAAAzMzIzMzIzMzE1NTUzMzIzMzIzMzEzMzIyMjIzMzIzMzIzMzIzMzE6OjoyMjIzMzIzMzIzMzEzMzI0NDA0NDIwMDAyMjEzMzIzMzEzMzE0NDAzMzMzMzIyMjIzMzI0NDE0NDQyMjIzMzIzMzIzMzIzMzM5OTkAAAC1tbX///9mZmYwMDAQEBAmJiZTiPJ7e3v/Z2RwcHAgICB+fn5hYWFzc3NAQECoqKiampqMjIxTU1NGRkY3NzcbGxsNDQ3w8PBQUFDg4ODAwMCwsLCgoKBPT09W+xp5AAAAKHRSTlMAh4DDEd187+mljnhvVge5nmhMQi4hA8uxk2IlHOOYc102M/jW088J/2liTQAACt5JREFUeNrs3O1um0AQheG5nIPCoIq1Q7+r/Mn9X1K9xtEAM9RLQmODzyO1cV+NtzjShhjHkRkAgn9DMCaYnRXIGOQdtWmk1zRWm0vNN6az+Y+v2fXZ5iTX/kZ4ZGvUNT6/RJuCM/VVRKFB7YBwtnY1k3h2wboaHy8RFQC2VGuc1D730WWLS2GIZ27aM4yUT+9tXaLNw9m0mI9uokepRLeC+ZyCfFCoqwckqV3WBHFZaxHLFrNxVpgUVRWjg/jli2WbfH4WyxYnWcVV0Rz7FYj26X9ezQcuE3VYkXzFSYpm9eq6pqSiuNYAaj+r0GiFxKv5tEOqxVfV0utrCkZF/HCXTuOdGz2IHKbDR5wdJ6PdeRmIsfviED0C5ZV7ojf487v59fPHsT18//a1Yn1HJdoSjIUXBG5XgaBejhMYVmT9B1dRUONj4KtyRHNmNkULDYeD2CGVjiZ0paOK1jVuYKIpjJTO7m9dovvEn3bz/DH4440f2+d9fvlVh+4LLuK6cM8GVcKKkmq3ZqqBfbhaef4n+pijBudNZH3H+OW3No+rbTmVXjfciPbs/GVQ7QU6tWqUW5lonefHfn5f6xI9DAxdqQU3n55uU821mj2ZuUq0SYo2ivA5tThxk3rK6u+urYtZiqKuGiWMEkbp4/OFLITIvyrfekt35WGvjvP6OlERwP6+VU39z+ansp+0SThP8jk+0SeoAehRjObmdha0f2YwfucMss7uaPVF3rThN/EH6fH3YhEt3bD1zMlwGtu8/8a5zrHJuR6NyrkKMK5N5qqf9ev6Y4hfGfSPrc7ZWZqPQrQPa+x5Cfe8FO55m3Xrcs8T3TFUYQ0zqj5jTPoMmagQz4brFh8D3x5L9OngyRy+IEa0JgBRlaBWAIJYyVYjYDF47PwNV/TwAIRfB+BiFcyeolchija6+P7xd//IveI+JlpwnrdZP7xexdD6/4N/PDzP06NZdc8vP4H7WKFXLbqjQcU9T7QZvFhHdN/+sndmy6lCQRQ9KOA8Ro1TxjttYuUlX5BK5f+/6YJIWjlNFREkpLJXGQuWO01e2mPaU4pA17qH7iEeKfRsrrqh4/t0hJQPEJSokULPFpJse0Iu0PNQNVSNnOu8ZHPWZc8TUhkBgECRikZMrp4Xq9W1NPubkIIUm4hnrtyikSIjq+jck3bOBQkpnSBrkU97ALl73pJqXfFc5AlJqN3cXvoTEKIzJcu5PSEFqHiGp6ahz+33Z3rWtpzhEfK16DO8XXi3S2vIvfUCHnpWrcsZHiHVAFUG0KQJoEgjGjGRFG1l9bq25gyPkIoANBcEab9DEPf27iCk40VbWa0uP86WkMsTQHPQHBSnJJHCytp1dW9Uz2cBQoo0PEqVes/r2bM0131CLtLzUCVUidw9n6uuaPY8IdnUYMet2BTccUtIfShnz60mBe65JaTunL/tVqTAbbeE1ImCc3vl16McIEiWc3tCClD5DM9Ak7ZFZCBkZEVzhkfI5/n6Hbdp+wF33BJSH8rZc6vISB/gnltCas/Z225FStdz2y0hZXE19lrt5p177NyR11+OHb/THhzJP86wP2uYrjvz1h92eTseNEzDbB2nd/OY1Py9WNw6/qjnN+fmvnmwnYkxjf1t+mAW7XlsbzaJ3a7DzH1sf3Udp7m/dcOf615sW26SdfvGrCaxbV4l9nEan0X0xqEaRrbvmnlrGFu3PTN3ndUoLOuapW8ODLzudLVomMHA71z/MwmT9mTmN+bOZnS9NcJDs+V53t+WPzQnbNa9/nRoCPl2AKqObKFvltEBoPvcVwNwmavxOy3IDwFAlkWCWPBqhJDC8GtsCPlGYI8ciQyRI+3/CLHHscysXvf0ynzWIOQsPr3wWllkxNQskD+b82/Ihi8qCCm150XpObXnc2RFs+cJqRhAE5AHpI8BOZbH5TQdlXB8JAUEIC4AvkFPSMEl/dQ+v74+2/bl6enFtm/v72+W/c/eHSW3CUNRGNZyjgiZNHE6fW2b6f63VGScCHSvI7CxjfH/tYnTU43CywFiAfnT/On+lunH3274R5G2zbv03rTj9F+z92+U7pqPX52PZjdM35uf6vxs3ofp799Kulf2B8CEc2JVjvJm6OIT5CO9PekvD/8T767XgTc2z1umnEdggyT5eX2s+k9yGpvH1kqvI523IVfSAzdlW2gbu3zn5+6j/JFcfIft0lBOi4/J6cbmBTZJTdPo9fV1/3pamqTUFCalOVkunVdNTU5bSa2Nn7ULjl0A7o5/aGt6Z6TKUpVC7/VLSrWzqTo7b+yzO+9i28shHtugl5cXXS9NLnyYHVZ+Nz79UG7y4in7Aqza9po+tBsXP1B8wCW3m01yVqq9G3w3q/X+/1lpZ5WEbKdOTnNsxiYtd+ngjl28Fw+zhwGwLA0/mDeIS46AxWnO2MVnUFD627+sasuAxyJpTsp3A+6WgnplGpILpL1JR21lZt5k2ZSrFPE41AteEy+Q9qrn58qW77lNM877sXXq+fcGLp/2giETZO5tTYumHObxKDQ0aezhxb2feNE0MWlvqZS1SzwsJZdslu3x9fYae8HFXYeAKcIVejxwzgwc0YE6jTzuWOAuqOS+GTY3rc+rmDxAKn7VEPAt+amm/7Yu8ev0gfnkHckljT8nSoaf/RkeNgUejaKburGiYt696FNIcXrt/3yJh8Qba+advg0BwJCk66Qamp3WvxtX1gMzSDZya+BU8y2OR+ogyk7w5h+Nox+/6S04pNunwKqpt9Db9yemA2GokjqThGR+ms1JeYMe92hu5y2Zbs5O5be7mkru2Hlpgc5j434M1NPiq0qqgXoaDkwqTU21V0s7dgY/TfLX9XMT1udx56RJqTqf5aqlR3vVqtOWaYpbp4NtW2tmPaXbwAZI0U1zroI/tiRW9oBVOtL5QT6uu2TH0nlgnXRSqsLkGXg+JnBTCjopVeGceXk2FnAtColkUynGMn1SrHXejq3Py4U5wHXZvtluJtXO27H+vFyMB9xElFIxNQ6fUmFj9Xm6Sr67SrA6b94Gfp4HLsb2rSM53VSMpseK1c7bsXbechs4zgO3EiUvs6kK7tgsUmlglaLkZiZVStzOBzoPrJHOS1VgVR5YuTPXz1VgXR5YM/+u9xglkyZRT2WqghlbnVc8CA+4mtxRp5vB7XxW7bw3LwvywI0pr5MN6HNNrUi/fUZO4o6tzxuiuO0GuLzUUdu3GOV3M6raeTu2Nm8aR+eBlVD1BnoVjowt0HBgnY51PrqdT/9yxtJ5YHWkeGKswoxJuMcGuIYoKdowKOQ4Xxov+4Zb/khU8Mf681a3gZ/0gYt1PjGdV1J2/mBS5z/58zrbQOeBE6zpGZgA7smRzgc6D2xKlORlCiUVKrfSslMAVulI56PX+XHv81g6D6yPFM+MVWCJDliLJdfoMhVYowPWYsk1ukwF1uiAu1R/Hh5v2wNb8r+9O0pBGAaiKLqdm/1vUCiFSCdhTIjWhntAwefY5sMxRW1ToJnZ89KjQTnuGzGUWB1DLkJtul0ofocn3SOf5wMu3mu97q30GN2e99he2gKEpj6Dkvwjj4tebb5d8EBAuhuUJJ87f96f4aT/1OlNz7GRfgg+WheCUFsfE16cpEFNx5exIUmHx09zd34AaRdACCDp+TVLSlFv1blzgKR2egx5zx/see0pn+djbR4FIVofz4/UeV67G3+vr3niC+H04Oz/nbwA7lqtm+wByfQAAAAASUVORK5CYII=') no-repeat;\n\twidth: 21px;\n\theight: 21px;\n\tbackground-position: 0 -5719px;\n}\n\n.font-graph-geSprite-endopenthin {\n\tbackground: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAABeQCAMAAAByzXKPAAAA1VBMVEUAAAAzMzIzMzIzMzE1NTUzMzIzMzIzMzEzMzIyMjIzMzIzMzIzMzIzMzE6OjoyMjIzMzIzMzIzMzEzMzI0NDA0NDIwMDAyMjEzMzIzMzEzMzE0NDAzMzMzMzIyMjIzMzI0NDE0NDQyMjIzMzIzMzIzMzIzMzM5OTkAAAC1tbX///9mZmYwMDAQEBAmJiZTiPJ7e3v/Z2RwcHAgICB+fn5hYWFzc3NAQECoqKiampqMjIxTU1NGRkY3NzcbGxsNDQ3w8PBQUFDg4ODAwMCwsLCgoKBPT09W+xp5AAAAKHRSTlMAh4DDEd187+mljnhvVge5nmhMQi4hA8uxk2IlHOOYc102M/jW088J/2liTQAACt5JREFUeNrs3O1um0AQheG5nIPCoIq1Q7+r/Mn9X1K9xtEAM9RLQmODzyO1cV+NtzjShhjHkRkAgn9DMCaYnRXIGOQdtWmk1zRWm0vNN6az+Y+v2fXZ5iTX/kZ4ZGvUNT6/RJuCM/VVRKFB7YBwtnY1k3h2wboaHy8RFQC2VGuc1D730WWLS2GIZ27aM4yUT+9tXaLNw9m0mI9uokepRLeC+ZyCfFCoqwckqV3WBHFZaxHLFrNxVpgUVRWjg/jli2WbfH4WyxYnWcVV0Rz7FYj26X9ezQcuE3VYkXzFSYpm9eq6pqSiuNYAaj+r0GiFxKv5tEOqxVfV0utrCkZF/HCXTuOdGz2IHKbDR5wdJ6PdeRmIsfviED0C5ZV7ojf487v59fPHsT18//a1Yn1HJdoSjIUXBG5XgaBejhMYVmT9B1dRUONj4KtyRHNmNkULDYeD2CGVjiZ0paOK1jVuYKIpjJTO7m9dovvEn3bz/DH4440f2+d9fvlVh+4LLuK6cM8GVcKKkmq3ZqqBfbhaef4n+pijBudNZH3H+OW3No+rbTmVXjfciPbs/GVQ7QU6tWqUW5lonefHfn5f6xI9DAxdqQU3n55uU821mj2ZuUq0SYo2ivA5tThxk3rK6u+urYtZiqKuGiWMEkbp4/OFLITIvyrfekt35WGvjvP6OlERwP6+VU39z+ansp+0SThP8jk+0SeoAehRjObmdha0f2YwfucMss7uaPVF3rThN/EH6fH3YhEt3bD1zMlwGtu8/8a5zrHJuR6NyrkKMK5N5qqf9ev6Y4hfGfSPrc7ZWZqPQrQPa+x5Cfe8FO55m3Xrcs8T3TFUYQ0zqj5jTPoMmagQz4brFh8D3x5L9OngyRy+IEa0JgBRlaBWAIJYyVYjYDF47PwNV/TwAIRfB+BiFcyeolchija6+P7xd//IveI+JlpwnrdZP7xexdD6/4N/PDzP06NZdc8vP4H7WKFXLbqjQcU9T7QZvFhHdN/+sndmy6lCQRQ9KOA8Ro1TxjttYuUlX5BK5f+/6YJIWjlNFREkpLJXGQuWO01e2mPaU4pA17qH7iEeKfRsrrqh4/t0hJQPEJSokULPFpJse0Iu0PNQNVSNnOu8ZHPWZc8TUhkBgECRikZMrp4Xq9W1NPubkIIUm4hnrtyikSIjq+jck3bOBQkpnSBrkU97ALl73pJqXfFc5AlJqN3cXvoTEKIzJcu5PSEFqHiGp6ahz+33Z3rWtpzhEfK16DO8XXi3S2vIvfUCHnpWrcsZHiHVAFUG0KQJoEgjGjGRFG1l9bq25gyPkIoANBcEab9DEPf27iCk40VbWa0uP86WkMsTQHPQHBSnJJHCytp1dW9Uz2cBQoo0PEqVes/r2bM0131CLtLzUCVUidw9n6uuaPY8IdnUYMet2BTccUtIfShnz60mBe65JaTunL/tVqTAbbeE1ImCc3vl16McIEiWc3tCClD5DM9Ak7ZFZCBkZEVzhkfI5/n6Hbdp+wF33BJSH8rZc6vISB/gnltCas/Z225FStdz2y0hZXE19lrt5p177NyR11+OHb/THhzJP86wP2uYrjvz1h92eTseNEzDbB2nd/OY1Py9WNw6/qjnN+fmvnmwnYkxjf1t+mAW7XlsbzaJ3a7DzH1sf3Udp7m/dcOf615sW26SdfvGrCaxbV4l9nEan0X0xqEaRrbvmnlrGFu3PTN3ndUoLOuapW8ODLzudLVomMHA71z/MwmT9mTmN+bOZnS9NcJDs+V53t+WPzQnbNa9/nRoCPl2AKqObKFvltEBoPvcVwNwmavxOy3IDwFAlkWCWPBqhJDC8GtsCPlGYI8ciQyRI+3/CLHHscysXvf0ynzWIOQsPr3wWllkxNQskD+b82/Ihi8qCCm150XpObXnc2RFs+cJqRhAE5AHpI8BOZbH5TQdlXB8JAUEIC4AvkFPSMEl/dQ+v74+2/bl6enFtm/v72+W/c/eHSW3CUNRGNZyjgiZNHE6fW2b6f63VGScCHSvI7CxjfH/tYnTU43CywFiAfnT/On+lunH3274R5G2zbv03rTj9F+z92+U7pqPX52PZjdM35uf6vxs3ofp799Kulf2B8CEc2JVjvJm6OIT5CO9PekvD/8T767XgTc2z1umnEdggyT5eX2s+k9yGpvH1kqvI523IVfSAzdlW2gbu3zn5+6j/JFcfIft0lBOi4/J6cbmBTZJTdPo9fV1/3pamqTUFCalOVkunVdNTU5bSa2Nn7ULjl0A7o5/aGt6Z6TKUpVC7/VLSrWzqTo7b+yzO+9i28shHtugl5cXXS9NLnyYHVZ+Nz79UG7y4in7Aqza9po+tBsXP1B8wCW3m01yVqq9G3w3q/X+/1lpZ5WEbKdOTnNsxiYtd+ngjl28Fw+zhwGwLA0/mDeIS46AxWnO2MVnUFD627+sasuAxyJpTsp3A+6WgnplGpILpL1JR21lZt5k2ZSrFPE41AteEy+Q9qrn58qW77lNM877sXXq+fcGLp/2giETZO5tTYumHObxKDQ0aezhxb2feNE0MWlvqZS1SzwsJZdslu3x9fYae8HFXYeAKcIVejxwzgwc0YE6jTzuWOAuqOS+GTY3rc+rmDxAKn7VEPAt+amm/7Yu8ev0gfnkHckljT8nSoaf/RkeNgUejaKburGiYt696FNIcXrt/3yJh8Qba+advg0BwJCk66Qamp3WvxtX1gMzSDZya+BU8y2OR+ogyk7w5h+Nox+/6S04pNunwKqpt9Db9yemA2GokjqThGR+ms1JeYMe92hu5y2Zbs5O5be7mkru2Hlpgc5j434M1NPiq0qqgXoaDkwqTU21V0s7dgY/TfLX9XMT1udx56RJqTqf5aqlR3vVqtOWaYpbp4NtW2tmPaXbwAZI0U1zroI/tiRW9oBVOtL5QT6uu2TH0nlgnXRSqsLkGXg+JnBTCjopVeGceXk2FnAtColkUynGMn1SrHXejq3Py4U5wHXZvtluJtXO27H+vFyMB9xElFIxNQ6fUmFj9Xm6Sr67SrA6b94Gfp4HLsb2rSM53VSMpseK1c7bsXbechs4zgO3EiUvs6kK7tgsUmlglaLkZiZVStzOBzoPrJHOS1VgVR5YuTPXz1VgXR5YM/+u9xglkyZRT2WqghlbnVc8CA+4mtxRp5vB7XxW7bw3LwvywI0pr5MN6HNNrUi/fUZO4o6tzxuiuO0GuLzUUdu3GOV3M6raeTu2Nm8aR+eBlVD1BnoVjowt0HBgnY51PrqdT/9yxtJ5YHWkeGKswoxJuMcGuIYoKdowKOQ4Xxov+4Zb/khU8Mf681a3gZ/0gYt1PjGdV1J2/mBS5z/58zrbQOeBE6zpGZgA7smRzgc6D2xKlORlCiUVKrfSslMAVulI56PX+XHv81g6D6yPFM+MVWCJDliLJdfoMhVYowPWYsk1ukwF1uiAu1R/Hh5v2wNb8r+9O0pBGAaiKLqdm/1vUCiFSCdhTIjWhntAwefY5sMxRW1ToJnZ89KjQTnuGzGUWB1DLkJtul0ofocn3SOf5wMu3mu97q30GN2e99he2gKEpj6Dkvwjj4tebb5d8EBAuhuUJJ87f96f4aT/1OlNz7GRfgg+WheCUFsfE16cpEFNx5exIUmHx09zd34AaRdACCDp+TVLSlFv1blzgKR2egx5zx/see0pn+djbR4FIVofz4/UeV67G3+vr3niC+H04Oz/nbwA7lqtm+wByfQAAAAASUVORK5CYII=') no-repeat;\n\twidth: 21px;\n\theight: 21px;\n\tbackground-position: 0 -5765px;\n}\n\n.font-graph-geSprite-endopenasync {\n\tbackground: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAABeQCAMAAAByzXKPAAAA1VBMVEUAAAAzMzIzMzIzMzE1NTUzMzIzMzIzMzEzMzIyMjIzMzIzMzIzMzIzMzE6OjoyMjIzMzIzMzIzMzEzMzI0NDA0NDIwMDAyMjEzMzIzMzEzMzE0NDAzMzMzMzIyMjIzMzI0NDE0NDQyMjIzMzIzMzIzMzIzMzM5OTkAAAC1tbX///9mZmYwMDAQEBAmJiZTiPJ7e3v/Z2RwcHAgICB+fn5hYWFzc3NAQECoqKiampqMjIxTU1NGRkY3NzcbGxsNDQ3w8PBQUFDg4ODAwMCwsLCgoKBPT09W+xp5AAAAKHRSTlMAh4DDEd187+mljnhvVge5nmhMQi4hA8uxk2IlHOOYc102M/jW088J/2liTQAACt5JREFUeNrs3O1um0AQheG5nIPCoIq1Q7+r/Mn9X1K9xtEAM9RLQmODzyO1cV+NtzjShhjHkRkAgn9DMCaYnRXIGOQdtWmk1zRWm0vNN6az+Y+v2fXZ5iTX/kZ4ZGvUNT6/RJuCM/VVRKFB7YBwtnY1k3h2wboaHy8RFQC2VGuc1D730WWLS2GIZ27aM4yUT+9tXaLNw9m0mI9uokepRLeC+ZyCfFCoqwckqV3WBHFZaxHLFrNxVpgUVRWjg/jli2WbfH4WyxYnWcVV0Rz7FYj26X9ezQcuE3VYkXzFSYpm9eq6pqSiuNYAaj+r0GiFxKv5tEOqxVfV0utrCkZF/HCXTuOdGz2IHKbDR5wdJ6PdeRmIsfviED0C5ZV7ojf487v59fPHsT18//a1Yn1HJdoSjIUXBG5XgaBejhMYVmT9B1dRUONj4KtyRHNmNkULDYeD2CGVjiZ0paOK1jVuYKIpjJTO7m9dovvEn3bz/DH4440f2+d9fvlVh+4LLuK6cM8GVcKKkmq3ZqqBfbhaef4n+pijBudNZH3H+OW3No+rbTmVXjfciPbs/GVQ7QU6tWqUW5lonefHfn5f6xI9DAxdqQU3n55uU821mj2ZuUq0SYo2ivA5tThxk3rK6u+urYtZiqKuGiWMEkbp4/OFLITIvyrfekt35WGvjvP6OlERwP6+VU39z+ansp+0SThP8jk+0SeoAehRjObmdha0f2YwfucMss7uaPVF3rThN/EH6fH3YhEt3bD1zMlwGtu8/8a5zrHJuR6NyrkKMK5N5qqf9ev6Y4hfGfSPrc7ZWZqPQrQPa+x5Cfe8FO55m3Xrcs8T3TFUYQ0zqj5jTPoMmagQz4brFh8D3x5L9OngyRy+IEa0JgBRlaBWAIJYyVYjYDF47PwNV/TwAIRfB+BiFcyeolchija6+P7xd//IveI+JlpwnrdZP7xexdD6/4N/PDzP06NZdc8vP4H7WKFXLbqjQcU9T7QZvFhHdN/+sndmy6lCQRQ9KOA8Ro1TxjttYuUlX5BK5f+/6YJIWjlNFREkpLJXGQuWO01e2mPaU4pA17qH7iEeKfRsrrqh4/t0hJQPEJSokULPFpJse0Iu0PNQNVSNnOu8ZHPWZc8TUhkBgECRikZMrp4Xq9W1NPubkIIUm4hnrtyikSIjq+jck3bOBQkpnSBrkU97ALl73pJqXfFc5AlJqN3cXvoTEKIzJcu5PSEFqHiGp6ahz+33Z3rWtpzhEfK16DO8XXi3S2vIvfUCHnpWrcsZHiHVAFUG0KQJoEgjGjGRFG1l9bq25gyPkIoANBcEab9DEPf27iCk40VbWa0uP86WkMsTQHPQHBSnJJHCytp1dW9Uz2cBQoo0PEqVes/r2bM0131CLtLzUCVUidw9n6uuaPY8IdnUYMet2BTccUtIfShnz60mBe65JaTunL/tVqTAbbeE1ImCc3vl16McIEiWc3tCClD5DM9Ak7ZFZCBkZEVzhkfI5/n6Hbdp+wF33BJSH8rZc6vISB/gnltCas/Z225FStdz2y0hZXE19lrt5p177NyR11+OHb/THhzJP86wP2uYrjvz1h92eTseNEzDbB2nd/OY1Py9WNw6/qjnN+fmvnmwnYkxjf1t+mAW7XlsbzaJ3a7DzH1sf3Udp7m/dcOf615sW26SdfvGrCaxbV4l9nEan0X0xqEaRrbvmnlrGFu3PTN3ndUoLOuapW8ODLzudLVomMHA71z/MwmT9mTmN+bOZnS9NcJDs+V53t+WPzQnbNa9/nRoCPl2AKqObKFvltEBoPvcVwNwmavxOy3IDwFAlkWCWPBqhJDC8GtsCPlGYI8ciQyRI+3/CLHHscysXvf0ynzWIOQsPr3wWllkxNQskD+b82/Ihi8qCCm150XpObXnc2RFs+cJqRhAE5AHpI8BOZbH5TQdlXB8JAUEIC4AvkFPSMEl/dQ+v74+2/bl6enFtm/v72+W/c/eHSW3CUNRGNZyjgiZNHE6fW2b6f63VGScCHSvI7CxjfH/tYnTU43CywFiAfnT/On+lunH3274R5G2zbv03rTj9F+z92+U7pqPX52PZjdM35uf6vxs3ofp799Kulf2B8CEc2JVjvJm6OIT5CO9PekvD/8T767XgTc2z1umnEdggyT5eX2s+k9yGpvH1kqvI523IVfSAzdlW2gbu3zn5+6j/JFcfIft0lBOi4/J6cbmBTZJTdPo9fV1/3pamqTUFCalOVkunVdNTU5bSa2Nn7ULjl0A7o5/aGt6Z6TKUpVC7/VLSrWzqTo7b+yzO+9i28shHtugl5cXXS9NLnyYHVZ+Nz79UG7y4in7Aqza9po+tBsXP1B8wCW3m01yVqq9G3w3q/X+/1lpZ5WEbKdOTnNsxiYtd+ngjl28Fw+zhwGwLA0/mDeIS46AxWnO2MVnUFD627+sasuAxyJpTsp3A+6WgnplGpILpL1JR21lZt5k2ZSrFPE41AteEy+Q9qrn58qW77lNM877sXXq+fcGLp/2giETZO5tTYumHObxKDQ0aezhxb2feNE0MWlvqZS1SzwsJZdslu3x9fYae8HFXYeAKcIVejxwzgwc0YE6jTzuWOAuqOS+GTY3rc+rmDxAKn7VEPAt+amm/7Yu8ev0gfnkHckljT8nSoaf/RkeNgUejaKburGiYt696FNIcXrt/3yJh8Qba+advg0BwJCk66Qamp3WvxtX1gMzSDZya+BU8y2OR+ogyk7w5h+Nox+/6S04pNunwKqpt9Db9yemA2GokjqThGR+ms1JeYMe92hu5y2Zbs5O5be7mkru2Hlpgc5j434M1NPiq0qqgXoaDkwqTU21V0s7dgY/TfLX9XMT1udx56RJqTqf5aqlR3vVqtOWaYpbp4NtW2tmPaXbwAZI0U1zroI/tiRW9oBVOtL5QT6uu2TH0nlgnXRSqsLkGXg+JnBTCjopVeGceXk2FnAtColkUynGMn1SrHXejq3Py4U5wHXZvtluJtXO27H+vFyMB9xElFIxNQ6fUmFj9Xm6Sr67SrA6b94Gfp4HLsb2rSM53VSMpseK1c7bsXbechs4zgO3EiUvs6kK7tgsUmlglaLkZiZVStzOBzoPrJHOS1VgVR5YuTPXz1VgXR5YM/+u9xglkyZRT2WqghlbnVc8CA+4mtxRp5vB7XxW7bw3LwvywI0pr5MN6HNNrUi/fUZO4o6tzxuiuO0GuLzUUdu3GOV3M6raeTu2Nm8aR+eBlVD1BnoVjowt0HBgnY51PrqdT/9yxtJ5YHWkeGKswoxJuMcGuIYoKdowKOQ4Xxov+4Zb/khU8Mf681a3gZ/0gYt1PjGdV1J2/mBS5z/58zrbQOeBE6zpGZgA7smRzgc6D2xKlORlCiUVKrfSslMAVulI56PX+XHv81g6D6yPFM+MVWCJDliLJdfoMhVYowPWYsk1ukwF1uiAu1R/Hh5v2wNb8r+9O0pBGAaiKLqdm/1vUCiFSCdhTIjWhntAwefY5sMxRW1ToJnZ89KjQTnuGzGUWB1DLkJtul0ofocn3SOf5wMu3mu97q30GN2e99he2gKEpj6Dkvwjj4tebb5d8EBAuhuUJJ87f96f4aT/1OlNz7GRfgg+WheCUFsfE16cpEFNx5exIUmHx09zd34AaRdACCDp+TVLSlFv1blzgKR2egx5zx/see0pn+djbR4FIVofz4/UeV67G3+vr3niC+H04Oz/nbwA7lqtm+wByfQAAAAASUVORK5CYII=') no-repeat;\n\twidth: 21px;\n\theight: 21px;\n\tbackground-position: 0 -5811px;\n}\n\n\n.geSprite-delete {\n\tbackground: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAABeQCAMAAAByzXKPAAAA1VBMVEUAAAAzMzIzMzIzMzE1NTUzMzIzMzIzMzEzMzIyMjIzMzIzMzIzMzIzMzE6OjoyMjIzMzIzMzIzMzEzMzI0NDA0NDIwMDAyMjEzMzIzMzEzMzE0NDAzMzMzMzIyMjIzMzI0NDE0NDQyMjIzMzIzMzIzMzIzMzM5OTkAAAC1tbX///9mZmYwMDAQEBAmJiZTiPJ7e3v/Z2RwcHAgICB+fn5hYWFzc3NAQECoqKiampqMjIxTU1NGRkY3NzcbGxsNDQ3w8PBQUFDg4ODAwMCwsLCgoKBPT09W+xp5AAAAKHRSTlMAh4DDEd187+mljnhvVge5nmhMQi4hA8uxk2IlHOOYc102M/jW088J/2liTQAACt5JREFUeNrs3O1um0AQheG5nIPCoIq1Q7+r/Mn9X1K9xtEAM9RLQmODzyO1cV+NtzjShhjHkRkAgn9DMCaYnRXIGOQdtWmk1zRWm0vNN6az+Y+v2fXZ5iTX/kZ4ZGvUNT6/RJuCM/VVRKFB7YBwtnY1k3h2wboaHy8RFQC2VGuc1D730WWLS2GIZ27aM4yUT+9tXaLNw9m0mI9uokepRLeC+ZyCfFCoqwckqV3WBHFZaxHLFrNxVpgUVRWjg/jli2WbfH4WyxYnWcVV0Rz7FYj26X9ezQcuE3VYkXzFSYpm9eq6pqSiuNYAaj+r0GiFxKv5tEOqxVfV0utrCkZF/HCXTuOdGz2IHKbDR5wdJ6PdeRmIsfviED0C5ZV7ojf487v59fPHsT18//a1Yn1HJdoSjIUXBG5XgaBejhMYVmT9B1dRUONj4KtyRHNmNkULDYeD2CGVjiZ0paOK1jVuYKIpjJTO7m9dovvEn3bz/DH4440f2+d9fvlVh+4LLuK6cM8GVcKKkmq3ZqqBfbhaef4n+pijBudNZH3H+OW3No+rbTmVXjfciPbs/GVQ7QU6tWqUW5lonefHfn5f6xI9DAxdqQU3n55uU821mj2ZuUq0SYo2ivA5tThxk3rK6u+urYtZiqKuGiWMEkbp4/OFLITIvyrfekt35WGvjvP6OlERwP6+VU39z+ansp+0SThP8jk+0SeoAehRjObmdha0f2YwfucMss7uaPVF3rThN/EH6fH3YhEt3bD1zMlwGtu8/8a5zrHJuR6NyrkKMK5N5qqf9ev6Y4hfGfSPrc7ZWZqPQrQPa+x5Cfe8FO55m3Xrcs8T3TFUYQ0zqj5jTPoMmagQz4brFh8D3x5L9OngyRy+IEa0JgBRlaBWAIJYyVYjYDF47PwNV/TwAIRfB+BiFcyeolchija6+P7xd//IveI+JlpwnrdZP7xexdD6/4N/PDzP06NZdc8vP4H7WKFXLbqjQcU9T7QZvFhHdN/+sndmy6lCQRQ9KOA8Ro1TxjttYuUlX5BK5f+/6YJIWjlNFREkpLJXGQuWO01e2mPaU4pA17qH7iEeKfRsrrqh4/t0hJQPEJSokULPFpJse0Iu0PNQNVSNnOu8ZHPWZc8TUhkBgECRikZMrp4Xq9W1NPubkIIUm4hnrtyikSIjq+jck3bOBQkpnSBrkU97ALl73pJqXfFc5AlJqN3cXvoTEKIzJcu5PSEFqHiGp6ahz+33Z3rWtpzhEfK16DO8XXi3S2vIvfUCHnpWrcsZHiHVAFUG0KQJoEgjGjGRFG1l9bq25gyPkIoANBcEab9DEPf27iCk40VbWa0uP86WkMsTQHPQHBSnJJHCytp1dW9Uz2cBQoo0PEqVes/r2bM0131CLtLzUCVUidw9n6uuaPY8IdnUYMet2BTccUtIfShnz60mBe65JaTunL/tVqTAbbeE1ImCc3vl16McIEiWc3tCClD5DM9Ak7ZFZCBkZEVzhkfI5/n6Hbdp+wF33BJSH8rZc6vISB/gnltCas/Z225FStdz2y0hZXE19lrt5p177NyR11+OHb/THhzJP86wP2uYrjvz1h92eTseNEzDbB2nd/OY1Py9WNw6/qjnN+fmvnmwnYkxjf1t+mAW7XlsbzaJ3a7DzH1sf3Udp7m/dcOf615sW26SdfvGrCaxbV4l9nEan0X0xqEaRrbvmnlrGFu3PTN3ndUoLOuapW8ODLzudLVomMHA71z/MwmT9mTmN+bOZnS9NcJDs+V53t+WPzQnbNa9/nRoCPl2AKqObKFvltEBoPvcVwNwmavxOy3IDwFAlkWCWPBqhJDC8GtsCPlGYI8ciQyRI+3/CLHHscysXvf0ynzWIOQsPr3wWllkxNQskD+b82/Ihi8qCCm150XpObXnc2RFs+cJqRhAE5AHpI8BOZbH5TQdlXB8JAUEIC4AvkFPSMEl/dQ+v74+2/bl6enFtm/v72+W/c/eHSW3CUNRGNZyjgiZNHE6fW2b6f63VGScCHSvI7CxjfH/tYnTU43CywFiAfnT/On+lunH3274R5G2zbv03rTj9F+z92+U7pqPX52PZjdM35uf6vxs3ofp799Kulf2B8CEc2JVjvJm6OIT5CO9PekvD/8T767XgTc2z1umnEdggyT5eX2s+k9yGpvH1kqvI523IVfSAzdlW2gbu3zn5+6j/JFcfIft0lBOi4/J6cbmBTZJTdPo9fV1/3pamqTUFCalOVkunVdNTU5bSa2Nn7ULjl0A7o5/aGt6Z6TKUpVC7/VLSrWzqTo7b+yzO+9i28shHtugl5cXXS9NLnyYHVZ+Nz79UG7y4in7Aqza9po+tBsXP1B8wCW3m01yVqq9G3w3q/X+/1lpZ5WEbKdOTnNsxiYtd+ngjl28Fw+zhwGwLA0/mDeIS46AxWnO2MVnUFD627+sasuAxyJpTsp3A+6WgnplGpILpL1JR21lZt5k2ZSrFPE41AteEy+Q9qrn58qW77lNM877sXXq+fcGLp/2giETZO5tTYumHObxKDQ0aezhxb2feNE0MWlvqZS1SzwsJZdslu3x9fYae8HFXYeAKcIVejxwzgwc0YE6jTzuWOAuqOS+GTY3rc+rmDxAKn7VEPAt+amm/7Yu8ev0gfnkHckljT8nSoaf/RkeNgUejaKburGiYt696FNIcXrt/3yJh8Qba+advg0BwJCk66Qamp3WvxtX1gMzSDZya+BU8y2OR+ogyk7w5h+Nox+/6S04pNunwKqpt9Db9yemA2GokjqThGR+ms1JeYMe92hu5y2Zbs5O5be7mkru2Hlpgc5j434M1NPiq0qqgXoaDkwqTU21V0s7dgY/TfLX9XMT1udx56RJqTqf5aqlR3vVqtOWaYpbp4NtW2tmPaXbwAZI0U1zroI/tiRW9oBVOtL5QT6uu2TH0nlgnXRSqsLkGXg+JnBTCjopVeGceXk2FnAtColkUynGMn1SrHXejq3Py4U5wHXZvtluJtXO27H+vFyMB9xElFIxNQ6fUmFj9Xm6Sr67SrA6b94Gfp4HLsb2rSM53VSMpseK1c7bsXbechs4zgO3EiUvs6kK7tgsUmlglaLkZiZVStzOBzoPrJHOS1VgVR5YuTPXz1VgXR5YM/+u9xglkyZRT2WqghlbnVc8CA+4mtxRp5vB7XxW7bw3LwvywI0pr5MN6HNNrUi/fUZO4o6tzxuiuO0GuLzUUdu3GOV3M6raeTu2Nm8aR+eBlVD1BnoVjowt0HBgnY51PrqdT/9yxtJ5YHWkeGKswoxJuMcGuIYoKdowKOQ4Xxov+4Zb/khU8Mf681a3gZ/0gYt1PjGdV1J2/mBS5z/58zrbQOeBE6zpGZgA7smRzgc6D2xKlORlCiUVKrfSslMAVulI56PX+XHv81g6D6yPFM+MVWCJDliLJdfoMhVYowPWYsk1ukwF1uiAu1R/Hh5v2wNb8r+9O0pBGAaiKLqdm/1vUCiFSCdhTIjWhntAwefY5sMxRW1ToJnZ89KjQTnuGzGUWB1DLkJtul0ofocn3SOf5wMu3mu97q30GN2e99he2gKEpj6Dkvwjj4tebb5d8EBAuhuUJJ87f96f4aT/1OlNz7GRfgg+WheCUFsfE16cpEFNx5exIUmHx09zd34AaRdACCDp+TVLSlFv1blzgKR2egx5zx/see0pn+djbR4FIVofz4/UeV67G3+vr3niC+H04Oz/nbwA7lqtm+wByfQAAAAASUVORK5CYII=) no-repeat;\n    width: 21px;\n    height: 21px;\n\tbackground-position: 0 -184px;\n}\n\n.geSprite-insert {\n\tbackground: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAABeQCAMAAAByzXKPAAAA1VBMVEUAAAAzMzIzMzIzMzE1NTUzMzIzMzIzMzEzMzIyMjIzMzIzMzIzMzIzMzE6OjoyMjIzMzIzMzIzMzEzMzI0NDA0NDIwMDAyMjEzMzIzMzEzMzE0NDAzMzMzMzIyMjIzMzI0NDE0NDQyMjIzMzIzMzIzMzIzMzM5OTkAAAC1tbX///9mZmYwMDAQEBAmJiZTiPJ7e3v/Z2RwcHAgICB+fn5hYWFzc3NAQECoqKiampqMjIxTU1NGRkY3NzcbGxsNDQ3w8PBQUFDg4ODAwMCwsLCgoKBPT09W+xp5AAAAKHRSTlMAh4DDEd187+mljnhvVge5nmhMQi4hA8uxk2IlHOOYc102M/jW088J/2liTQAACt5JREFUeNrs3O1um0AQheG5nIPCoIq1Q7+r/Mn9X1K9xtEAM9RLQmODzyO1cV+NtzjShhjHkRkAgn9DMCaYnRXIGOQdtWmk1zRWm0vNN6az+Y+v2fXZ5iTX/kZ4ZGvUNT6/RJuCM/VVRKFB7YBwtnY1k3h2wboaHy8RFQC2VGuc1D730WWLS2GIZ27aM4yUT+9tXaLNw9m0mI9uokepRLeC+ZyCfFCoqwckqV3WBHFZaxHLFrNxVpgUVRWjg/jli2WbfH4WyxYnWcVV0Rz7FYj26X9ezQcuE3VYkXzFSYpm9eq6pqSiuNYAaj+r0GiFxKv5tEOqxVfV0utrCkZF/HCXTuOdGz2IHKbDR5wdJ6PdeRmIsfviED0C5ZV7ojf487v59fPHsT18//a1Yn1HJdoSjIUXBG5XgaBejhMYVmT9B1dRUONj4KtyRHNmNkULDYeD2CGVjiZ0paOK1jVuYKIpjJTO7m9dovvEn3bz/DH4440f2+d9fvlVh+4LLuK6cM8GVcKKkmq3ZqqBfbhaef4n+pijBudNZH3H+OW3No+rbTmVXjfciPbs/GVQ7QU6tWqUW5lonefHfn5f6xI9DAxdqQU3n55uU821mj2ZuUq0SYo2ivA5tThxk3rK6u+urYtZiqKuGiWMEkbp4/OFLITIvyrfekt35WGvjvP6OlERwP6+VU39z+ansp+0SThP8jk+0SeoAehRjObmdha0f2YwfucMss7uaPVF3rThN/EH6fH3YhEt3bD1zMlwGtu8/8a5zrHJuR6NyrkKMK5N5qqf9ev6Y4hfGfSPrc7ZWZqPQrQPa+x5Cfe8FO55m3Xrcs8T3TFUYQ0zqj5jTPoMmagQz4brFh8D3x5L9OngyRy+IEa0JgBRlaBWAIJYyVYjYDF47PwNV/TwAIRfB+BiFcyeolchija6+P7xd//IveI+JlpwnrdZP7xexdD6/4N/PDzP06NZdc8vP4H7WKFXLbqjQcU9T7QZvFhHdN/+sndmy6lCQRQ9KOA8Ro1TxjttYuUlX5BK5f+/6YJIWjlNFREkpLJXGQuWO01e2mPaU4pA17qH7iEeKfRsrrqh4/t0hJQPEJSokULPFpJse0Iu0PNQNVSNnOu8ZHPWZc8TUhkBgECRikZMrp4Xq9W1NPubkIIUm4hnrtyikSIjq+jck3bOBQkpnSBrkU97ALl73pJqXfFc5AlJqN3cXvoTEKIzJcu5PSEFqHiGp6ahz+33Z3rWtpzhEfK16DO8XXi3S2vIvfUCHnpWrcsZHiHVAFUG0KQJoEgjGjGRFG1l9bq25gyPkIoANBcEab9DEPf27iCk40VbWa0uP86WkMsTQHPQHBSnJJHCytp1dW9Uz2cBQoo0PEqVes/r2bM0131CLtLzUCVUidw9n6uuaPY8IdnUYMet2BTccUtIfShnz60mBe65JaTunL/tVqTAbbeE1ImCc3vl16McIEiWc3tCClD5DM9Ak7ZFZCBkZEVzhkfI5/n6Hbdp+wF33BJSH8rZc6vISB/gnltCas/Z225FStdz2y0hZXE19lrt5p177NyR11+OHb/THhzJP86wP2uYrjvz1h92eTseNEzDbB2nd/OY1Py9WNw6/qjnN+fmvnmwnYkxjf1t+mAW7XlsbzaJ3a7DzH1sf3Udp7m/dcOf615sW26SdfvGrCaxbV4l9nEan0X0xqEaRrbvmnlrGFu3PTN3ndUoLOuapW8ODLzudLVomMHA71z/MwmT9mTmN+bOZnS9NcJDs+V53t+WPzQnbNa9/nRoCPl2AKqObKFvltEBoPvcVwNwmavxOy3IDwFAlkWCWPBqhJDC8GtsCPlGYI8ciQyRI+3/CLHHscysXvf0ynzWIOQsPr3wWllkxNQskD+b82/Ihi8qCCm150XpObXnc2RFs+cJqRhAE5AHpI8BOZbH5TQdlXB8JAUEIC4AvkFPSMEl/dQ+v74+2/bl6enFtm/v72+W/c/eHSW3CUNRGNZyjgiZNHE6fW2b6f63VGScCHSvI7CxjfH/tYnTU43CywFiAfnT/On+lunH3274R5G2zbv03rTj9F+z92+U7pqPX52PZjdM35uf6vxs3ofp799Kulf2B8CEc2JVjvJm6OIT5CO9PekvD/8T767XgTc2z1umnEdggyT5eX2s+k9yGpvH1kqvI523IVfSAzdlW2gbu3zn5+6j/JFcfIft0lBOi4/J6cbmBTZJTdPo9fV1/3pamqTUFCalOVkunVdNTU5bSa2Nn7ULjl0A7o5/aGt6Z6TKUpVC7/VLSrWzqTo7b+yzO+9i28shHtugl5cXXS9NLnyYHVZ+Nz79UG7y4in7Aqza9po+tBsXP1B8wCW3m01yVqq9G3w3q/X+/1lpZ5WEbKdOTnNsxiYtd+ngjl28Fw+zhwGwLA0/mDeIS46AxWnO2MVnUFD627+sasuAxyJpTsp3A+6WgnplGpILpL1JR21lZt5k2ZSrFPE41AteEy+Q9qrn58qW77lNM877sXXq+fcGLp/2giETZO5tTYumHObxKDQ0aezhxb2feNE0MWlvqZS1SzwsJZdslu3x9fYae8HFXYeAKcIVejxwzgwc0YE6jTzuWOAuqOS+GTY3rc+rmDxAKn7VEPAt+amm/7Yu8ev0gfnkHckljT8nSoaf/RkeNgUejaKburGiYt696FNIcXrt/3yJh8Qba+advg0BwJCk66Qamp3WvxtX1gMzSDZya+BU8y2OR+ogyk7w5h+Nox+/6S04pNunwKqpt9Db9yemA2GokjqThGR+ms1JeYMe92hu5y2Zbs5O5be7mkru2Hlpgc5j434M1NPiq0qqgXoaDkwqTU21V0s7dgY/TfLX9XMT1udx56RJqTqf5aqlR3vVqtOWaYpbp4NtW2tmPaXbwAZI0U1zroI/tiRW9oBVOtL5QT6uu2TH0nlgnXRSqsLkGXg+JnBTCjopVeGceXk2FnAtColkUynGMn1SrHXejq3Py4U5wHXZvtluJtXO27H+vFyMB9xElFIxNQ6fUmFj9Xm6Sr67SrA6b94Gfp4HLsb2rSM53VSMpseK1c7bsXbechs4zgO3EiUvs6kK7tgsUmlglaLkZiZVStzOBzoPrJHOS1VgVR5YuTPXz1VgXR5YM/+u9xglkyZRT2WqghlbnVc8CA+4mtxRp5vB7XxW7bw3LwvywI0pr5MN6HNNrUi/fUZO4o6tzxuiuO0GuLzUUdu3GOV3M6raeTu2Nm8aR+eBlVD1BnoVjowt0HBgnY51PrqdT/9yxtJ5YHWkeGKswoxJuMcGuIYoKdowKOQ4Xxov+4Zb/khU8Mf681a3gZ/0gYt1PjGdV1J2/mBS5z/58zrbQOeBE6zpGZgA7smRzgc6D2xKlORlCiUVKrfSslMAVulI56PX+XHv81g6D6yPFM+MVWCJDliLJdfoMhVYowPWYsk1ukwF1uiAu1R/Hh5v2wNb8r+9O0pBGAaiKLqdm/1vUCiFSCdhTIjWhntAwefY5sMxRW1ToJnZ89KjQTnuGzGUWB1DLkJtul0ofocn3SOf5wMu3mu97q30GN2e99he2gKEpj6Dkvwjj4tebb5d8EBAuhuUJJ87f96f4aT/1OlNz7GRfgg+WheCUFsfE16cpEFNx5exIUmHx09zd34AaRdACCDp+TVLSlFv1blzgKR2egx5zx/see0pn+djbR4FIVofz4/UeV67G3+vr3niC+H04Oz/nbwA7lqtm+wByfQAAAAASUVORK5CYII=) no-repeat;\n    width: 21px;\n    height: 21px;\n\tbackground-position: 0 -4152px;\n}\n\n.geSprite-dots {\n\tbackground: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAABeQCAMAAAByzXKPAAAA1VBMVEUAAAAzMzIzMzIzMzE1NTUzMzIzMzIzMzEzMzIyMjIzMzIzMzIzMzIzMzE6OjoyMjIzMzIzMzIzMzEzMzI0NDA0NDIwMDAyMjEzMzIzMzEzMzE0NDAzMzMzMzIyMjIzMzI0NDE0NDQyMjIzMzIzMzIzMzIzMzM5OTkAAAC1tbX///9mZmYwMDAQEBAmJiZTiPJ7e3v/Z2RwcHAgICB+fn5hYWFzc3NAQECoqKiampqMjIxTU1NGRkY3NzcbGxsNDQ3w8PBQUFDg4ODAwMCwsLCgoKBPT09W+xp5AAAAKHRSTlMAh4DDEd187+mljnhvVge5nmhMQi4hA8uxk2IlHOOYc102M/jW088J/2liTQAACt5JREFUeNrs3O1um0AQheG5nIPCoIq1Q7+r/Mn9X1K9xtEAM9RLQmODzyO1cV+NtzjShhjHkRkAgn9DMCaYnRXIGOQdtWmk1zRWm0vNN6az+Y+v2fXZ5iTX/kZ4ZGvUNT6/RJuCM/VVRKFB7YBwtnY1k3h2wboaHy8RFQC2VGuc1D730WWLS2GIZ27aM4yUT+9tXaLNw9m0mI9uokepRLeC+ZyCfFCoqwckqV3WBHFZaxHLFrNxVpgUVRWjg/jli2WbfH4WyxYnWcVV0Rz7FYj26X9ezQcuE3VYkXzFSYpm9eq6pqSiuNYAaj+r0GiFxKv5tEOqxVfV0utrCkZF/HCXTuOdGz2IHKbDR5wdJ6PdeRmIsfviED0C5ZV7ojf487v59fPHsT18//a1Yn1HJdoSjIUXBG5XgaBejhMYVmT9B1dRUONj4KtyRHNmNkULDYeD2CGVjiZ0paOK1jVuYKIpjJTO7m9dovvEn3bz/DH4440f2+d9fvlVh+4LLuK6cM8GVcKKkmq3ZqqBfbhaef4n+pijBudNZH3H+OW3No+rbTmVXjfciPbs/GVQ7QU6tWqUW5lonefHfn5f6xI9DAxdqQU3n55uU821mj2ZuUq0SYo2ivA5tThxk3rK6u+urYtZiqKuGiWMEkbp4/OFLITIvyrfekt35WGvjvP6OlERwP6+VU39z+ansp+0SThP8jk+0SeoAehRjObmdha0f2YwfucMss7uaPVF3rThN/EH6fH3YhEt3bD1zMlwGtu8/8a5zrHJuR6NyrkKMK5N5qqf9ev6Y4hfGfSPrc7ZWZqPQrQPa+x5Cfe8FO55m3Xrcs8T3TFUYQ0zqj5jTPoMmagQz4brFh8D3x5L9OngyRy+IEa0JgBRlaBWAIJYyVYjYDF47PwNV/TwAIRfB+BiFcyeolchija6+P7xd//IveI+JlpwnrdZP7xexdD6/4N/PDzP06NZdc8vP4H7WKFXLbqjQcU9T7QZvFhHdN/+sndmy6lCQRQ9KOA8Ro1TxjttYuUlX5BK5f+/6YJIWjlNFREkpLJXGQuWO01e2mPaU4pA17qH7iEeKfRsrrqh4/t0hJQPEJSokULPFpJse0Iu0PNQNVSNnOu8ZHPWZc8TUhkBgECRikZMrp4Xq9W1NPubkIIUm4hnrtyikSIjq+jck3bOBQkpnSBrkU97ALl73pJqXfFc5AlJqN3cXvoTEKIzJcu5PSEFqHiGp6ahz+33Z3rWtpzhEfK16DO8XXi3S2vIvfUCHnpWrcsZHiHVAFUG0KQJoEgjGjGRFG1l9bq25gyPkIoANBcEab9DEPf27iCk40VbWa0uP86WkMsTQHPQHBSnJJHCytp1dW9Uz2cBQoo0PEqVes/r2bM0131CLtLzUCVUidw9n6uuaPY8IdnUYMet2BTccUtIfShnz60mBe65JaTunL/tVqTAbbeE1ImCc3vl16McIEiWc3tCClD5DM9Ak7ZFZCBkZEVzhkfI5/n6Hbdp+wF33BJSH8rZc6vISB/gnltCas/Z225FStdz2y0hZXE19lrt5p177NyR11+OHb/THhzJP86wP2uYrjvz1h92eTseNEzDbB2nd/OY1Py9WNw6/qjnN+fmvnmwnYkxjf1t+mAW7XlsbzaJ3a7DzH1sf3Udp7m/dcOf615sW26SdfvGrCaxbV4l9nEan0X0xqEaRrbvmnlrGFu3PTN3ndUoLOuapW8ODLzudLVomMHA71z/MwmT9mTmN+bOZnS9NcJDs+V53t+WPzQnbNa9/nRoCPl2AKqObKFvltEBoPvcVwNwmavxOy3IDwFAlkWCWPBqhJDC8GtsCPlGYI8ciQyRI+3/CLHHscysXvf0ynzWIOQsPr3wWllkxNQskD+b82/Ihi8qCCm150XpObXnc2RFs+cJqRhAE5AHpI8BOZbH5TQdlXB8JAUEIC4AvkFPSMEl/dQ+v74+2/bl6enFtm/v72+W/c/eHSW3CUNRGNZyjgiZNHE6fW2b6f63VGScCHSvI7CxjfH/tYnTU43CywFiAfnT/On+lunH3274R5G2zbv03rTj9F+z92+U7pqPX52PZjdM35uf6vxs3ofp799Kulf2B8CEc2JVjvJm6OIT5CO9PekvD/8T767XgTc2z1umnEdggyT5eX2s+k9yGpvH1kqvI523IVfSAzdlW2gbu3zn5+6j/JFcfIft0lBOi4/J6cbmBTZJTdPo9fV1/3pamqTUFCalOVkunVdNTU5bSa2Nn7ULjl0A7o5/aGt6Z6TKUpVC7/VLSrWzqTo7b+yzO+9i28shHtugl5cXXS9NLnyYHVZ+Nz79UG7y4in7Aqza9po+tBsXP1B8wCW3m01yVqq9G3w3q/X+/1lpZ5WEbKdOTnNsxiYtd+ngjl28Fw+zhwGwLA0/mDeIS46AxWnO2MVnUFD627+sasuAxyJpTsp3A+6WgnplGpILpL1JR21lZt5k2ZSrFPE41AteEy+Q9qrn58qW77lNM877sXXq+fcGLp/2giETZO5tTYumHObxKDQ0aezhxb2feNE0MWlvqZS1SzwsJZdslu3x9fYae8HFXYeAKcIVejxwzgwc0YE6jTzuWOAuqOS+GTY3rc+rmDxAKn7VEPAt+amm/7Yu8ev0gfnkHckljT8nSoaf/RkeNgUejaKburGiYt696FNIcXrt/3yJh8Qba+advg0BwJCk66Qamp3WvxtX1gMzSDZya+BU8y2OR+ogyk7w5h+Nox+/6S04pNunwKqpt9Db9yemA2GokjqThGR+ms1JeYMe92hu5y2Zbs5O5be7mkru2Hlpgc5j434M1NPiq0qqgXoaDkwqTU21V0s7dgY/TfLX9XMT1udx56RJqTqf5aqlR3vVqtOWaYpbp4NtW2tmPaXbwAZI0U1zroI/tiRW9oBVOtL5QT6uu2TH0nlgnXRSqsLkGXg+JnBTCjopVeGceXk2FnAtColkUynGMn1SrHXejq3Py4U5wHXZvtluJtXO27H+vFyMB9xElFIxNQ6fUmFj9Xm6Sr67SrA6b94Gfp4HLsb2rSM53VSMpseK1c7bsXbechs4zgO3EiUvs6kK7tgsUmlglaLkZiZVStzOBzoPrJHOS1VgVR5YuTPXz1VgXR5YM/+u9xglkyZRT2WqghlbnVc8CA+4mtxRp5vB7XxW7bw3LwvywI0pr5MN6HNNrUi/fUZO4o6tzxuiuO0GuLzUUdu3GOV3M6raeTu2Nm8aR+eBlVD1BnoVjowt0HBgnY51PrqdT/9yxtJ5YHWkeGKswoxJuMcGuIYoKdowKOQ4Xxov+4Zb/khU8Mf681a3gZ/0gYt1PjGdV1J2/mBS5z/58zrbQOeBE6zpGZgA7smRzgc6D2xKlORlCiUVKrfSslMAVulI56PX+XHv81g6D6yPFM+MVWCJDliLJdfoMhVYowPWYsk1ukwF1uiAu1R/Hh5v2wNb8r+9O0pBGAaiKLqdm/1vUCiFSCdhTIjWhntAwefY5sMxRW1ToJnZ89KjQTnuGzGUWB1DLkJtul0ofocn3SOf5wMu3mu97q30GN2e99he2gKEpj6Dkvwjj4tebb5d8EBAuhuUJJ87f96f4aT/1OlNz7GRfgg+WheCUFsfE16cpEFNx5exIUmHx09zd34AaRdACCDp+TVLSlFv1blzgKR2egx5zx/see0pn+djbR4FIVofz4/UeV67G3+vr3niC+H04Oz/nbwA7lqtm+wByfQAAAAASUVORK5CYII=) no-repeat;\n    width: 21px;\n    height: 21px;\n\tbackground-position: 0 -3370px;\n}\n\n.geSprite-duplicate {\n\tbackground: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAABeQCAMAAAByzXKPAAAA1VBMVEUAAAAzMzIzMzIzMzE1NTUzMzIzMzIzMzEzMzIyMjIzMzIzMzIzMzIzMzE6OjoyMjIzMzIzMzIzMzEzMzI0NDA0NDIwMDAyMjEzMzIzMzEzMzE0NDAzMzMzMzIyMjIzMzI0NDE0NDQyMjIzMzIzMzIzMzIzMzM5OTkAAAC1tbX///9mZmYwMDAQEBAmJiZTiPJ7e3v/Z2RwcHAgICB+fn5hYWFzc3NAQECoqKiampqMjIxTU1NGRkY3NzcbGxsNDQ3w8PBQUFDg4ODAwMCwsLCgoKBPT09W+xp5AAAAKHRSTlMAh4DDEd187+mljnhvVge5nmhMQi4hA8uxk2IlHOOYc102M/jW088J/2liTQAACt5JREFUeNrs3O1um0AQheG5nIPCoIq1Q7+r/Mn9X1K9xtEAM9RLQmODzyO1cV+NtzjShhjHkRkAgn9DMCaYnRXIGOQdtWmk1zRWm0vNN6az+Y+v2fXZ5iTX/kZ4ZGvUNT6/RJuCM/VVRKFB7YBwtnY1k3h2wboaHy8RFQC2VGuc1D730WWLS2GIZ27aM4yUT+9tXaLNw9m0mI9uokepRLeC+ZyCfFCoqwckqV3WBHFZaxHLFrNxVpgUVRWjg/jli2WbfH4WyxYnWcVV0Rz7FYj26X9ezQcuE3VYkXzFSYpm9eq6pqSiuNYAaj+r0GiFxKv5tEOqxVfV0utrCkZF/HCXTuOdGz2IHKbDR5wdJ6PdeRmIsfviED0C5ZV7ojf487v59fPHsT18//a1Yn1HJdoSjIUXBG5XgaBejhMYVmT9B1dRUONj4KtyRHNmNkULDYeD2CGVjiZ0paOK1jVuYKIpjJTO7m9dovvEn3bz/DH4440f2+d9fvlVh+4LLuK6cM8GVcKKkmq3ZqqBfbhaef4n+pijBudNZH3H+OW3No+rbTmVXjfciPbs/GVQ7QU6tWqUW5lonefHfn5f6xI9DAxdqQU3n55uU821mj2ZuUq0SYo2ivA5tThxk3rK6u+urYtZiqKuGiWMEkbp4/OFLITIvyrfekt35WGvjvP6OlERwP6+VU39z+ansp+0SThP8jk+0SeoAehRjObmdha0f2YwfucMss7uaPVF3rThN/EH6fH3YhEt3bD1zMlwGtu8/8a5zrHJuR6NyrkKMK5N5qqf9ev6Y4hfGfSPrc7ZWZqPQrQPa+x5Cfe8FO55m3Xrcs8T3TFUYQ0zqj5jTPoMmagQz4brFh8D3x5L9OngyRy+IEa0JgBRlaBWAIJYyVYjYDF47PwNV/TwAIRfB+BiFcyeolchija6+P7xd//IveI+JlpwnrdZP7xexdD6/4N/PDzP06NZdc8vP4H7WKFXLbqjQcU9T7QZvFhHdN/+sndmy6lCQRQ9KOA8Ro1TxjttYuUlX5BK5f+/6YJIWjlNFREkpLJXGQuWO01e2mPaU4pA17qH7iEeKfRsrrqh4/t0hJQPEJSokULPFpJse0Iu0PNQNVSNnOu8ZHPWZc8TUhkBgECRikZMrp4Xq9W1NPubkIIUm4hnrtyikSIjq+jck3bOBQkpnSBrkU97ALl73pJqXfFc5AlJqN3cXvoTEKIzJcu5PSEFqHiGp6ahz+33Z3rWtpzhEfK16DO8XXi3S2vIvfUCHnpWrcsZHiHVAFUG0KQJoEgjGjGRFG1l9bq25gyPkIoANBcEab9DEPf27iCk40VbWa0uP86WkMsTQHPQHBSnJJHCytp1dW9Uz2cBQoo0PEqVes/r2bM0131CLtLzUCVUidw9n6uuaPY8IdnUYMet2BTccUtIfShnz60mBe65JaTunL/tVqTAbbeE1ImCc3vl16McIEiWc3tCClD5DM9Ak7ZFZCBkZEVzhkfI5/n6Hbdp+wF33BJSH8rZc6vISB/gnltCas/Z225FStdz2y0hZXE19lrt5p177NyR11+OHb/THhzJP86wP2uYrjvz1h92eTseNEzDbB2nd/OY1Py9WNw6/qjnN+fmvnmwnYkxjf1t+mAW7XlsbzaJ3a7DzH1sf3Udp7m/dcOf615sW26SdfvGrCaxbV4l9nEan0X0xqEaRrbvmnlrGFu3PTN3ndUoLOuapW8ODLzudLVomMHA71z/MwmT9mTmN+bOZnS9NcJDs+V53t+WPzQnbNa9/nRoCPl2AKqObKFvltEBoPvcVwNwmavxOy3IDwFAlkWCWPBqhJDC8GtsCPlGYI8ciQyRI+3/CLHHscysXvf0ynzWIOQsPr3wWllkxNQskD+b82/Ihi8qCCm150XpObXnc2RFs+cJqRhAE5AHpI8BOZbH5TQdlXB8JAUEIC4AvkFPSMEl/dQ+v74+2/bl6enFtm/v72+W/c/eHSW3CUNRGNZyjgiZNHE6fW2b6f63VGScCHSvI7CxjfH/tYnTU43CywFiAfnT/On+lunH3274R5G2zbv03rTj9F+z92+U7pqPX52PZjdM35uf6vxs3ofp799Kulf2B8CEc2JVjvJm6OIT5CO9PekvD/8T767XgTc2z1umnEdggyT5eX2s+k9yGpvH1kqvI523IVfSAzdlW2gbu3zn5+6j/JFcfIft0lBOi4/J6cbmBTZJTdPo9fV1/3pamqTUFCalOVkunVdNTU5bSa2Nn7ULjl0A7o5/aGt6Z6TKUpVC7/VLSrWzqTo7b+yzO+9i28shHtugl5cXXS9NLnyYHVZ+Nz79UG7y4in7Aqza9po+tBsXP1B8wCW3m01yVqq9G3w3q/X+/1lpZ5WEbKdOTnNsxiYtd+ngjl28Fw+zhwGwLA0/mDeIS46AxWnO2MVnUFD627+sasuAxyJpTsp3A+6WgnplGpILpL1JR21lZt5k2ZSrFPE41AteEy+Q9qrn58qW77lNM877sXXq+fcGLp/2giETZO5tTYumHObxKDQ0aezhxb2feNE0MWlvqZS1SzwsJZdslu3x9fYae8HFXYeAKcIVejxwzgwc0YE6jTzuWOAuqOS+GTY3rc+rmDxAKn7VEPAt+amm/7Yu8ev0gfnkHckljT8nSoaf/RkeNgUejaKburGiYt696FNIcXrt/3yJh8Qba+advg0BwJCk66Qamp3WvxtX1gMzSDZya+BU8y2OR+ogyk7w5h+Nox+/6S04pNunwKqpt9Db9yemA2GokjqThGR+ms1JeYMe92hu5y2Zbs5O5be7mkru2Hlpgc5j434M1NPiq0qqgXoaDkwqTU21V0s7dgY/TfLX9XMT1udx56RJqTqf5aqlR3vVqtOWaYpbp4NtW2tmPaXbwAZI0U1zroI/tiRW9oBVOtL5QT6uu2TH0nlgnXRSqsLkGXg+JnBTCjopVeGceXk2FnAtColkUynGMn1SrHXejq3Py4U5wHXZvtluJtXO27H+vFyMB9xElFIxNQ6fUmFj9Xm6Sr67SrA6b94Gfp4HLsb2rSM53VSMpseK1c7bsXbechs4zgO3EiUvs6kK7tgsUmlglaLkZiZVStzOBzoPrJHOS1VgVR5YuTPXz1VgXR5YM/+u9xglkyZRT2WqghlbnVc8CA+4mtxRp5vB7XxW7bw3LwvywI0pr5MN6HNNrUi/fUZO4o6tzxuiuO0GuLzUUdu3GOV3M6raeTu2Nm8aR+eBlVD1BnoVjowt0HBgnY51PrqdT/9yxtJ5YHWkeGKswoxJuMcGuIYoKdowKOQ4Xxov+4Zb/khU8Mf681a3gZ/0gYt1PjGdV1J2/mBS5z/58zrbQOeBE6zpGZgA7smRzgc6D2xKlORlCiUVKrfSslMAVulI56PX+XHv81g6D6yPFM+MVWCJDliLJdfoMhVYowPWYsk1ukwF1uiAu1R/Hh5v2wNb8r+9O0pBGAaiKLqdm/1vUCiFSCdhTIjWhntAwefY5sMxRW1ToJnZ89KjQTnuGzGUWB1DLkJtul0ofocn3SOf5wMu3mu97q30GN2e99he2gKEpj6Dkvwjj4tebb5d8EBAuhuUJJ87f96f4aT/1OlNz7GRfgg+WheCUFsfE16cpEFNx5exIUmHx09zd34AaRdACCDp+TVLSlFv1blzgKR2egx5zx/see0pn+djbR4FIVofz4/UeV67G3+vr3niC+H04Oz/nbwA7lqtm+wByfQAAAAASUVORK5CYII=) no-repeat;\n    width: 21px;\n    height: 21px;\n\tbackground-position: 0 -4106px;\n}\n\n.geSprite-plus {\n\tbackground: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAABeQCAMAAAByzXKPAAAA1VBMVEUAAAAzMzIzMzIzMzE1NTUzMzIzMzIzMzEzMzIyMjIzMzIzMzIzMzIzMzE6OjoyMjIzMzIzMzIzMzEzMzI0NDA0NDIwMDAyMjEzMzIzMzEzMzE0NDAzMzMzMzIyMjIzMzI0NDE0NDQyMjIzMzIzMzIzMzIzMzM5OTkAAAC1tbX///9mZmYwMDAQEBAmJiZTiPJ7e3v/Z2RwcHAgICB+fn5hYWFzc3NAQECoqKiampqMjIxTU1NGRkY3NzcbGxsNDQ3w8PBQUFDg4ODAwMCwsLCgoKBPT09W+xp5AAAAKHRSTlMAh4DDEd187+mljnhvVge5nmhMQi4hA8uxk2IlHOOYc102M/jW088J/2liTQAACt5JREFUeNrs3O1um0AQheG5nIPCoIq1Q7+r/Mn9X1K9xtEAM9RLQmODzyO1cV+NtzjShhjHkRkAgn9DMCaYnRXIGOQdtWmk1zRWm0vNN6az+Y+v2fXZ5iTX/kZ4ZGvUNT6/RJuCM/VVRKFB7YBwtnY1k3h2wboaHy8RFQC2VGuc1D730WWLS2GIZ27aM4yUT+9tXaLNw9m0mI9uokepRLeC+ZyCfFCoqwckqV3WBHFZaxHLFrNxVpgUVRWjg/jli2WbfH4WyxYnWcVV0Rz7FYj26X9ezQcuE3VYkXzFSYpm9eq6pqSiuNYAaj+r0GiFxKv5tEOqxVfV0utrCkZF/HCXTuOdGz2IHKbDR5wdJ6PdeRmIsfviED0C5ZV7ojf487v59fPHsT18//a1Yn1HJdoSjIUXBG5XgaBejhMYVmT9B1dRUONj4KtyRHNmNkULDYeD2CGVjiZ0paOK1jVuYKIpjJTO7m9dovvEn3bz/DH4440f2+d9fvlVh+4LLuK6cM8GVcKKkmq3ZqqBfbhaef4n+pijBudNZH3H+OW3No+rbTmVXjfciPbs/GVQ7QU6tWqUW5lonefHfn5f6xI9DAxdqQU3n55uU821mj2ZuUq0SYo2ivA5tThxk3rK6u+urYtZiqKuGiWMEkbp4/OFLITIvyrfekt35WGvjvP6OlERwP6+VU39z+ansp+0SThP8jk+0SeoAehRjObmdha0f2YwfucMss7uaPVF3rThN/EH6fH3YhEt3bD1zMlwGtu8/8a5zrHJuR6NyrkKMK5N5qqf9ev6Y4hfGfSPrc7ZWZqPQrQPa+x5Cfe8FO55m3Xrcs8T3TFUYQ0zqj5jTPoMmagQz4brFh8D3x5L9OngyRy+IEa0JgBRlaBWAIJYyVYjYDF47PwNV/TwAIRfB+BiFcyeolchija6+P7xd//IveI+JlpwnrdZP7xexdD6/4N/PDzP06NZdc8vP4H7WKFXLbqjQcU9T7QZvFhHdN/+sndmy6lCQRQ9KOA8Ro1TxjttYuUlX5BK5f+/6YJIWjlNFREkpLJXGQuWO01e2mPaU4pA17qH7iEeKfRsrrqh4/t0hJQPEJSokULPFpJse0Iu0PNQNVSNnOu8ZHPWZc8TUhkBgECRikZMrp4Xq9W1NPubkIIUm4hnrtyikSIjq+jck3bOBQkpnSBrkU97ALl73pJqXfFc5AlJqN3cXvoTEKIzJcu5PSEFqHiGp6ahz+33Z3rWtpzhEfK16DO8XXi3S2vIvfUCHnpWrcsZHiHVAFUG0KQJoEgjGjGRFG1l9bq25gyPkIoANBcEab9DEPf27iCk40VbWa0uP86WkMsTQHPQHBSnJJHCytp1dW9Uz2cBQoo0PEqVes/r2bM0131CLtLzUCVUidw9n6uuaPY8IdnUYMet2BTccUtIfShnz60mBe65JaTunL/tVqTAbbeE1ImCc3vl16McIEiWc3tCClD5DM9Ak7ZFZCBkZEVzhkfI5/n6Hbdp+wF33BJSH8rZc6vISB/gnltCas/Z225FStdz2y0hZXE19lrt5p177NyR11+OHb/THhzJP86wP2uYrjvz1h92eTseNEzDbB2nd/OY1Py9WNw6/qjnN+fmvnmwnYkxjf1t+mAW7XlsbzaJ3a7DzH1sf3Udp7m/dcOf615sW26SdfvGrCaxbV4l9nEan0X0xqEaRrbvmnlrGFu3PTN3ndUoLOuapW8ODLzudLVomMHA71z/MwmT9mTmN+bOZnS9NcJDs+V53t+WPzQnbNa9/nRoCPl2AKqObKFvltEBoPvcVwNwmavxOy3IDwFAlkWCWPBqhJDC8GtsCPlGYI8ciQyRI+3/CLHHscysXvf0ynzWIOQsPr3wWllkxNQskD+b82/Ihi8qCCm150XpObXnc2RFs+cJqRhAE5AHpI8BOZbH5TQdlXB8JAUEIC4AvkFPSMEl/dQ+v74+2/bl6enFtm/v72+W/c/eHSW3CUNRGNZyjgiZNHE6fW2b6f63VGScCHSvI7CxjfH/tYnTU43CywFiAfnT/On+lunH3274R5G2zbv03rTj9F+z92+U7pqPX52PZjdM35uf6vxs3ofp799Kulf2B8CEc2JVjvJm6OIT5CO9PekvD/8T767XgTc2z1umnEdggyT5eX2s+k9yGpvH1kqvI523IVfSAzdlW2gbu3zn5+6j/JFcfIft0lBOi4/J6cbmBTZJTdPo9fV1/3pamqTUFCalOVkunVdNTU5bSa2Nn7ULjl0A7o5/aGt6Z6TKUpVC7/VLSrWzqTo7b+yzO+9i28shHtugl5cXXS9NLnyYHVZ+Nz79UG7y4in7Aqza9po+tBsXP1B8wCW3m01yVqq9G3w3q/X+/1lpZ5WEbKdOTnNsxiYtd+ngjl28Fw+zhwGwLA0/mDeIS46AxWnO2MVnUFD627+sasuAxyJpTsp3A+6WgnplGpILpL1JR21lZt5k2ZSrFPE41AteEy+Q9qrn58qW77lNM877sXXq+fcGLp/2giETZO5tTYumHObxKDQ0aezhxb2feNE0MWlvqZS1SzwsJZdslu3x9fYae8HFXYeAKcIVejxwzgwc0YE6jTzuWOAuqOS+GTY3rc+rmDxAKn7VEPAt+amm/7Yu8ev0gfnkHckljT8nSoaf/RkeNgUejaKburGiYt696FNIcXrt/3yJh8Qba+advg0BwJCk66Qamp3WvxtX1gMzSDZya+BU8y2OR+ogyk7w5h+Nox+/6S04pNunwKqpt9Db9yemA2GokjqThGR+ms1JeYMe92hu5y2Zbs5O5be7mkru2Hlpgc5j434M1NPiq0qqgXoaDkwqTU21V0s7dgY/TfLX9XMT1udx56RJqTqf5aqlR3vVqtOWaYpbp4NtW2tmPaXbwAZI0U1zroI/tiRW9oBVOtL5QT6uu2TH0nlgnXRSqsLkGXg+JnBTCjopVeGceXk2FnAtColkUynGMn1SrHXejq3Py4U5wHXZvtluJtXO27H+vFyMB9xElFIxNQ6fUmFj9Xm6Sr67SrA6b94Gfp4HLsb2rSM53VSMpseK1c7bsXbechs4zgO3EiUvs6kK7tgsUmlglaLkZiZVStzOBzoPrJHOS1VgVR5YuTPXz1VgXR5YM/+u9xglkyZRT2WqghlbnVc8CA+4mtxRp5vB7XxW7bw3LwvywI0pr5MN6HNNrUi/fUZO4o6tzxuiuO0GuLzUUdu3GOV3M6raeTu2Nm8aR+eBlVD1BnoVjowt0HBgnY51PrqdT/9yxtJ5YHWkeGKswoxJuMcGuIYoKdowKOQ4Xxov+4Zb/khU8Mf681a3gZ/0gYt1PjGdV1J2/mBS5z/58zrbQOeBE6zpGZgA7smRzgc6D2xKlORlCiUVKrfSslMAVulI56PX+XHv81g6D6yPFM+MVWCJDliLJdfoMhVYowPWYsk1ukwF1uiAu1R/Hh5v2wNb8r+9O0pBGAaiKLqdm/1vUCiFSCdhTIjWhntAwefY5sMxRW1ToJnZ89KjQTnuGzGUWB1DLkJtul0ofocn3SOf5wMu3mu97q30GN2e99he2gKEpj6Dkvwjj4tebb5d8EBAuhuUJJ87f96f4aT/1OlNz7GRfgg+WheCUFsfE16cpEFNx5exIUmHx09zd34AaRdACCDp+TVLSlFv1blzgKR2egx5zx/see0pn+djbR4FIVofz4/UeV67G3+vr3niC+H04Oz/nbwA7lqtm+wByfQAAAAASUVORK5CYII=) no-repeat;\n    width: 21px;\n    height: 21px;\n\tbackground-position: 0 -3922px;\n}\n\nhtml div.mxRubberband {\n\tborder-color: #0000DD;\n\tbackground: #99ccff;\n}\n\nhtml div.mxPopupMenu {\n\t-webkit-box-shadow: 2px 2px 3px #d5d5d5;\n\t-moz-box-shadow: 2px 2px 3px #d5d5d5;\n\tbox-shadow: 2px 2px 3px #d5d5d5;\n\t_filter: progid:DXImageTransform.Microsoft.DropShadow(OffX=2, OffY=2, Color='#d0d0d0', Positive='true');\n\tbackground: white;\n\tposition: absolute;\n\tborder: 3px solid #e7e7e7;\n}\n\nhtml table.mxPopupMenu {\n\tborder-collapse: collapse;\n\tmargin: 0px;\n\twidth: 100%;\n}\n\nhtml td.mxPopupMenuItem {\n\tpadding: 7px 30px 7px 30px;\n\tfont-family: Helvetica Neue, Helvetica, Arial Unicode MS, Arial;\n\tfont-size: 10pt;\n}\n\nhtml td.mxPopupMenuIcon {\n\tbackground-color: white;\n\tpadding: 2px;\n}\n\ntd.mxPopupMenuIcon .geIcon {\n\tborder: 1px solid transparent;\n\topacity: 0.5;\n\tdisplay: inline-block;\n\tpadding: 5px 12px;\n\tfont-size: 16px;\n}\n\ntd.mxPopupMenuIcon .geIcon:hover {\n\tborder-radius: 2px;\n\topacity: 0.9;\n}\n\nhtml tr.mxPopupMenuItem {\n\tcolor: #182b50;\n\n\ttd {\n\t\tcolor: #182b50;\n\n\t\tspan {\n\t\t\tcolor: gray\n\t\t}\n\t}\n}\n\nhtml tr.mxPopupMenuItemHover {\n\tbackground-color: #FFF;\n\tcolor: black;\n}\n\nhtml tr.mxPopupMenuItemHover {\n\ttd {\n\t\t// color:#5382FB;\n\t\tcolor: #5382FB;\n\t\tbackground: #d7e6fe;\n\n\t\tspan {\n\t\t\tcolor: #5382FB;\n\t\t\tbackground: #d7e6fe;\n\t\t}\n\t}\n}\n\ntable.mxPopupMenu hr {\n\tcolor: #d1d5dc;\n\tbackground-color: #d1d5dc;\n\tborder: none;\n\theight: 1px;\n}\n\ntable.mxPopupMenu tr {\n\tfont-size: 4pt;\n}\n\nhtml td.mxWindowTitle {\n\tfont-family: Helvetica Neue, Helvetica, Arial Unicode MS, Arial;\n\ttext-align: left;\n\tfont-size: 12px;\n\tcolor: rgb(112, 112, 112);\n\tpadding: 4px;\n}"
  },
  {
    "path": "static/cherry/drawio_demo/src/js/editor/mxDefaultKeyHandler.js",
    "content": "/**\n * Copyright (c) 2006-2015, JGraph Ltd\n * Copyright (c) 2006-2015, Gaudenz Alder\n */\n/**\n * Class: mxDefaultKeyHandler\n *\n * Binds keycodes to actionnames in an editor. This aggregates an internal\n * <handler> and extends the implementation of <mxKeyHandler.escape> to not\n * only cancel the editing, but also hide the properties dialog and fire an\n * <mxEditor.escape> event via <editor>. An instance of this class is created\n * by <mxEditor> and stored in <mxEditor.keyHandler>.\n * \n * Example:\n * \n * Bind the delete key to the delete action in an existing editor.\n * \n * (code)\n * var keyHandler = new mxDefaultKeyHandler(editor);\n * keyHandler.bindAction(46, 'delete');\n * (end)\n *\n * Codec:\n * \n * This class uses the <mxDefaultKeyHandlerCodec> to read configuration\n * data into an existing instance. See <mxDefaultKeyHandlerCodec> for a\n * description of the configuration format.\n * \n * Keycodes:\n * \n * See <mxKeyHandler>.\n * \n * An <mxEvent.ESCAPE> event is fired via the editor if the escape key is\n * pressed.\n * \n * Constructor: mxDefaultKeyHandler\n *\n * Constructs a new default key handler for the <mxEditor.graph> in the\n * given <mxEditor>. (The editor may be null if a prototypical instance for\n * a <mxDefaultKeyHandlerCodec> is created.)\n * \n * Parameters:\n * \n * editor - Reference to the enclosing <mxEditor>.\n */\nfunction mxDefaultKeyHandler(editor)\n{\n\tif (editor != null)\n\t{\n\t\tthis.editor = editor;\n\t\tthis.handler = new mxKeyHandler(editor.graph);\n\t\t\n\t\t// Extends the escape function of the internal key\n\t\t// handle to hide the properties dialog and fire\n\t\t// the escape event via the editor instance\n\t\tvar old = this.handler.escape;\n\t\t\n\t\tthis.handler.escape = function(evt)\n\t\t{\n\t\t\told.apply(this, arguments);\n\t\t\teditor.hideProperties();\n\t\t\teditor.fireEvent(new mxEventObject(mxEvent.ESCAPE, 'event', evt));\n\t\t};\n\t}\n};\n\t\n/**\n * Variable: editor\n *\n * Reference to the enclosing <mxEditor>.\n */\nmxDefaultKeyHandler.prototype.editor = null;\n\n/**\n * Variable: handler\n *\n * Holds the <mxKeyHandler> for key event handling.\n */\nmxDefaultKeyHandler.prototype.handler = null;\n\n/**\n * Function: bindAction\n *\n * Binds the specified keycode to the given action in <editor>. The\n * optional control flag specifies if the control key must be pressed\n * to trigger the action.\n *\n * Parameters:\n *\n * code - Integer that specifies the keycode.\n * action - Name of the action to execute in <editor>.\n * control - Optional boolean that specifies if control must be pressed.\n * Default is false.\n */\nmxDefaultKeyHandler.prototype.bindAction = function (code, action, control)\n{\n\tvar keyHandler = mxUtils.bind(this, function()\n\t{\n\t\tthis.editor.execute(action);\n\t});\n\n\t// Binds the function to control-down keycode\n\tif (control)\n\t{\n\t\tthis.handler.bindControlKey(code, keyHandler);\n\t}\n\n\t// Binds the function to the normal keycode\n\telse\n\t{\n\t\tthis.handler.bindKey(code, keyHandler);\t\t\t\t\n\t}\n};\n\n/**\n * Function: destroy\n *\n * Destroys the <handler> associated with this object. This does normally\n * not need to be called, the <handler> is destroyed automatically when the\n * window unloads (in IE) by <mxEditor>.\n */\nmxDefaultKeyHandler.prototype.destroy = function ()\n{\n\tthis.handler.destroy();\n\tthis.handler = null;\n};\n"
  },
  {
    "path": "static/cherry/drawio_demo/src/js/editor/mxDefaultPopupMenu.js",
    "content": "/**\n * Copyright (c) 2006-2015, JGraph Ltd\n * Copyright (c) 2006-2015, Gaudenz Alder\n */\n/**\n * Class: mxDefaultPopupMenu\n *\n * Creates popupmenus for mouse events. This object holds an XML node\n * which is a description of the popup menu to be created. In\n * <createMenu>, the configuration is applied to the context and\n * the resulting menu items are added to the menu dynamically. See\n * <createMenu> for a description of the configuration format.\n * \n * This class does not create the DOM nodes required for the popup menu, it\n * only parses an XML description to invoke the respective methods on an\n * <mxPopupMenu> each time the menu is displayed.\n *\n * Codec:\n * \n * This class uses the <mxDefaultPopupMenuCodec> to read configuration\n * data into an existing instance, however, the actual parsing is done\n * by this class during program execution, so the format is described\n * below.\n * \n * Constructor: mxDefaultPopupMenu\n *\n * Constructs a new popupmenu-factory based on given configuration.\n *\n * Paramaters:\n *\n * config - XML node that contains the configuration data.\n */\nfunction mxDefaultPopupMenu(config)\n{\n\tthis.config = config;\n};\n\n/**\n * Variable: imageBasePath\n *\n * Base path for all icon attributes in the config. Default is null.\n */\nmxDefaultPopupMenu.prototype.imageBasePath = null;\n\n/**\n * Variable: config\n *\n * XML node used as the description of new menu items. This node is\n * used in <createMenu> to dynamically create the menu items if their\n * respective conditions evaluate to true for the given arguments.\n */\nmxDefaultPopupMenu.prototype.config = null;\n\n/**\n * Function: createMenu\n *\n * This function is called from <mxEditor> to add items to the\n * given menu based on <config>. The config is a sequence of\n * the following nodes and attributes.\n *\n * Child Nodes: \n *\n * add - Adds a new menu item. See below for attributes.\n * separator - Adds a separator. No attributes.\n * condition - Adds a custom condition. Name attribute.\n * \n * The add-node may have a child node that defines a function to be invoked\n * before the action is executed (or instead of an action to be executed).\n *\n * Attributes:\n *\n * as - Resource key for the label (needs entry in property file).\n * action - Name of the action to execute in enclosing editor.\n * icon - Optional icon (relative/absolute URL).\n * iconCls - Optional CSS class for the icon.\n * if - Optional name of condition that must be true (see below).\n * enabled-if - Optional name of condition that specifies if the menu item\n * should be enabled.\n * name - Name of custom condition. Only for condition nodes.\n *\n * Conditions:\n *\n * nocell - No cell under the mouse.\n * ncells - More than one cell selected.\n * notRoot - Drilling position is other than home.\n * cell - Cell under the mouse.\n * notEmpty - Exactly one cell with children under mouse.\n * expandable - Exactly one expandable cell under mouse.\n * collapsable - Exactly one collapsable cell under mouse.\n * validRoot - Exactly one cell which is a possible root under mouse.\n * swimlane - Exactly one cell which is a swimlane under mouse.\n *\n * Example:\n *\n * To add a new item for a given action to the popupmenu:\n * \n * (code)\n * <mxDefaultPopupMenu as=\"popupHandler\">\n *   <add as=\"delete\" action=\"delete\" icon=\"images/delete.gif\" if=\"cell\"/>\n * </mxDefaultPopupMenu>\n * (end)\n * \n * To add a new item for a custom function:\n * \n * (code)\n * <mxDefaultPopupMenu as=\"popupHandler\">\n *   <add as=\"action1\"><![CDATA[\n *\t\tfunction (editor, cell, evt)\n *\t\t{\n *\t\t\teditor.execute('action1', cell, 'myArg');\n *\t\t}\n *   ]]></add>\n * </mxDefaultPopupMenu>\n * (end)\n * \n * The above example invokes action1 with an additional third argument via\n * the editor instance. The third argument is passed to the function that\n * defines action1. If the add-node has no action-attribute, then only the\n * function defined in the text content is executed, otherwise first the\n * function and then the action defined in the action-attribute is\n * executed. The function in the text content has 3 arguments, namely the\n * <mxEditor> instance, the <mxCell> instance under the mouse, and the\n * native mouse event.\n *\n * Custom Conditions:\n *\n * To add a new condition for popupmenu items:\n *  \n * (code)\n * <condition name=\"condition1\"><![CDATA[\n *   function (editor, cell, evt)\n *   {\n *     return cell != null;\n *   }\n * ]]></condition>\n * (end)\n * \n * The new condition can then be used in any item as follows:\n * \n * (code)\n * <add as=\"action1\" action=\"action1\" icon=\"action1.gif\" if=\"condition1\"/>\n * (end)\n * \n * The order in which the items and conditions appear is not significant as\n * all connditions are evaluated before any items are created.\n * \n * Parameters:\n *\n * editor - Enclosing <mxEditor> instance.\n * menu - <mxPopupMenu> that is used for adding items and separators.\n * cell - Optional <mxCell> which is under the mousepointer.\n * evt - Optional mouse event which triggered the menu. \n */\nmxDefaultPopupMenu.prototype.createMenu = function(editor, menu, cell, evt)\n{\n\tif (this.config != null)\n\t{\n\t\tvar conditions = this.createConditions(editor, cell, evt);\n\t\tvar item = this.config.firstChild;\n\n\t\tthis.addItems(editor, menu, cell, evt, conditions, item, null);\n\t}\n};\n\n/**\n * Function: addItems\n * \n * Recursively adds the given items and all of its children into the given menu.\n * \n * Parameters:\n *\n * editor - Enclosing <mxEditor> instance.\n * menu - <mxPopupMenu> that is used for adding items and separators.\n * cell - Optional <mxCell> which is under the mousepointer.\n * evt - Optional mouse event which triggered the menu.\n * conditions - Array of names boolean conditions.\n * item - XML node that represents the current menu item.\n * parent - DOM node that represents the parent menu item.\n */\nmxDefaultPopupMenu.prototype.addItems = function(editor, menu, cell, evt, conditions, item, parent)\n{\n\tvar addSeparator = false;\n\t\n\twhile (item != null)\n\t{\n\t\tif (item.nodeName == 'add')\n\t\t{\n\t\t\tvar condition = item.getAttribute('if');\n\t\t\t\n\t\t\tif (condition == null || conditions[condition])\n\t\t\t{\n\t\t\t\tvar as = item.getAttribute('as');\n\t\t\t\tas = mxResources.get(as) || as;\n\t\t\t\tvar funct = mxUtils.eval(mxUtils.getTextContent(item));\n\t\t\t\tvar action = item.getAttribute('action');\n\t\t\t\tvar icon = item.getAttribute('icon');\n\t\t\t\tvar iconCls = item.getAttribute('iconCls');\n\t\t\t\tvar enabledCond = item.getAttribute('enabled-if');\n\t\t\t\tvar enabled = enabledCond == null || conditions[enabledCond];\n\t\t\t\t\n\t\t\t\tif (addSeparator)\n\t\t\t\t{\n\t\t\t\t\tmenu.addSeparator(parent);\n\t\t\t\t\taddSeparator = false;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (icon != null && this.imageBasePath)\n\t\t\t\t{\n\t\t\t\t\ticon = this.imageBasePath + icon;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tvar row = this.addAction(menu, editor, as, icon, funct, action, cell, parent, iconCls, enabled);\n\t\t\t\tthis.addItems(editor, menu, cell, evt, conditions, item.firstChild, row);\n\t\t\t}\n\t\t}\n\t\telse if (item.nodeName == 'separator')\n\t\t{\n\t\t\taddSeparator = true;\n\t\t}\n\t\t\n\t\titem = item.nextSibling;\n\t}\n};\n\n/**\n * Function: addAction\n *\n * Helper method to bind an action to a new menu item.\n * \n * Parameters:\n *\n * menu - <mxPopupMenu> that is used for adding items and separators.\n * editor - Enclosing <mxEditor> instance.\n * lab - String that represents the label of the menu item.\n * icon - Optional URL that represents the icon of the menu item.\n * action - Optional name of the action to execute in the given editor.\n * funct - Optional function to execute before the optional action. The\n * function takes an <mxEditor>, the <mxCell> under the mouse and the\n * mouse event that triggered the call.\n * cell - Optional <mxCell> to use as an argument for the action.\n * parent - DOM node that represents the parent menu item.\n * iconCls - Optional CSS class for the menu icon.\n * enabled - Optional boolean that specifies if the menu item is enabled.\n * Default is true.\n */\nmxDefaultPopupMenu.prototype.addAction = function(menu, editor, lab, icon, funct, action, cell, parent, iconCls, enabled)\n{\n\tvar clickHandler = function(evt)\n\t{\n\t\tif (typeof(funct) == 'function')\n\t\t{\n\t\t\tfunct.call(editor, editor, cell, evt);\n\t\t}\n\t\t\n\t\tif (action != null)\n\t\t{\n\t\t\teditor.execute(action, cell, evt);\n\t\t}\n\t};\n\t\n\treturn menu.addItem(lab, icon, clickHandler, parent, iconCls, enabled);\n};\n\n/**\n * Function: createConditions\n * \n * Evaluates the default conditions for the given context.\n */\nmxDefaultPopupMenu.prototype.createConditions = function(editor, cell, evt)\n{\n\t// Creates array with conditions\n\tvar model = editor.graph.getModel();\n\tvar childCount = model.getChildCount(cell);\n\t\n\t// Adds some frequently used conditions\n\tvar conditions = [];\n\tconditions['nocell'] = cell == null;\n\tconditions['ncells'] = editor.graph.getSelectionCount() > 1;\n\tconditions['notRoot'] = model.getRoot() !=\n\t\tmodel.getParent(editor.graph.getDefaultParent());\n\tconditions['cell'] = cell != null;\n\t\n\tvar isCell = cell != null && editor.graph.getSelectionCount() == 1;\n\tconditions['nonEmpty'] = isCell && childCount > 0;\n\tconditions['expandable'] = isCell && editor.graph.isCellFoldable(cell, false);\n\tconditions['collapsable'] = isCell && editor.graph.isCellFoldable(cell, true);\n\tconditions['validRoot'] = isCell && editor.graph.isValidRoot(cell);\n\tconditions['emptyValidRoot'] = conditions['validRoot'] && childCount == 0;\n\tconditions['swimlane'] = isCell && editor.graph.isSwimlane(cell);\n\n\t// Evaluates dynamic conditions from config file\n\tvar condNodes = this.config.getElementsByTagName('condition');\n\t\n\tfor (var i=0; i<condNodes.length; i++)\n\t{\n\t\tvar funct = mxUtils.eval(mxUtils.getTextContent(condNodes[i]));\n\t\tvar name = condNodes[i].getAttribute('name');\n\t\t\n\t\tif (name != null && typeof(funct) == 'function')\n\t\t{\n\t\t\tconditions[name] = funct(editor, cell, evt);\n\t\t}\n\t}\n\t\n\treturn conditions;\n};\n"
  },
  {
    "path": "static/cherry/drawio_demo/src/js/editor/mxDefaultToolbar.js",
    "content": "/**\n * Copyright (c) 2006-2015, JGraph Ltd\n * Copyright (c) 2006-2015, Gaudenz Alder\n */\n/**\n * Class: mxDefaultToolbar\n *\n * Toolbar for the editor. This modifies the state of the graph\n * or inserts new cells upon mouse clicks.\n * \n * Example:\n * \n * Create a toolbar with a button to copy the selection into the clipboard,\n * and a combo box with one action to paste the selection from the clipboard\n * into the graph.\n * \n * (code)\n * var toolbar = new mxDefaultToolbar(container, editor);\n * toolbar.addItem('Copy', null, 'copy');\n * \n * var combo = toolbar.addActionCombo('More actions...');\n * toolbar.addActionOption(combo, 'Paste', 'paste');\n * (end) \n *\n * Codec:\n * \n * This class uses the <mxDefaultToolbarCodec> to read configuration\n * data into an existing instance. See <mxDefaultToolbarCodec> for a\n * description of the configuration format.\n * \n * Constructor: mxDefaultToolbar\n *\n * Constructs a new toolbar for the given container and editor. The\n * container and editor may be null if a prototypical instance for a\n * <mxDefaultKeyHandlerCodec> is created.\n *\n * Parameters:\n *\n * container - DOM node that contains the toolbar.\n * editor - Reference to the enclosing <mxEditor>. \n */\nfunction mxDefaultToolbar(container, editor)\n{\n\tthis.editor = editor;\n\n\tif (container != null && editor != null)\n\t{\n\t\tthis.init(container);\n\t}\n};\n\t\n/**\n * Variable: editor\n *\n * Reference to the enclosing <mxEditor>.\n */\nmxDefaultToolbar.prototype.editor = null;\n\n/**\n * Variable: toolbar\n *\n * Holds the internal <mxToolbar>.\n */\nmxDefaultToolbar.prototype.toolbar = null;\n\n/**\n * Variable: resetHandler\n *\n * Reference to the function used to reset the <toolbar>.\n */\nmxDefaultToolbar.prototype.resetHandler = null;\n\n/**\n * Variable: spacing\n *\n * Defines the spacing between existing and new vertices in\n * gridSize units when a new vertex is dropped on an existing\n * cell. Default is 4 (40 pixels).\n */\nmxDefaultToolbar.prototype.spacing = 4;\n\n/**\n * Variable: connectOnDrop\n * \n * Specifies if elements should be connected if new cells are dropped onto\n * connectable elements. Default is false.\n */\nmxDefaultToolbar.prototype.connectOnDrop = false;\n\n/**\n * Variable: init\n * \n * Constructs the <toolbar> for the given container and installs a listener\n * that updates the <mxEditor.insertFunction> on <editor> if an item is\n * selected in the toolbar. This assumes that <editor> is not null.\n *\n * Parameters:\n *\n * container - DOM node that contains the toolbar.\n */\nmxDefaultToolbar.prototype.init = function(container)\n{\n\tif (container != null)\n\t{\n\t\tthis.toolbar = new mxToolbar(container);\n\t\t\n\t\t// Installs the insert function in the editor if an item is\n\t\t// selected in the toolbar\n\t\tthis.toolbar.addListener(mxEvent.SELECT, mxUtils.bind(this, function(sender, evt)\n\t\t{\n\t\t\tvar funct = evt.getProperty('function');\n\t\t\t\n\t\t\tif (funct != null)\n\t\t\t{\n\t\t\t\tthis.editor.insertFunction = mxUtils.bind(this, function()\n\t\t\t\t{\n\t\t\t\t\tfunct.apply(this, arguments);\n\t\t\t\t\tthis.toolbar.resetMode();\n\t\t\t\t});\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tthis.editor.insertFunction = null;\n\t\t\t}\n\t\t}));\n\t\t\n\t\t// Resets the selected tool after a doubleclick or escape keystroke\n\t\tthis.resetHandler = mxUtils.bind(this, function()\n\t\t{\n\t\t\tif (this.toolbar != null)\n\t\t\t{\n\t\t\t\tthis.toolbar.resetMode(true);\n\t\t\t}\n\t\t});\n\n\t\tthis.editor.graph.addListener(mxEvent.DOUBLE_CLICK, this.resetHandler);\n\t\tthis.editor.addListener(mxEvent.ESCAPE, this.resetHandler);\n\t}\n};\n\n/**\n * Function: addItem\n *\n * Adds a new item that executes the given action in <editor>. The title,\n * icon and pressedIcon are used to display the toolbar item.\n * \n * Parameters:\n *\n * title - String that represents the title (tooltip) for the item.\n * icon - URL of the icon to be used for displaying the item.\n * action - Name of the action to execute when the item is clicked.\n * pressed - Optional URL of the icon for the pressed state.\n */\nmxDefaultToolbar.prototype.addItem = function(title, icon, action, pressed)\n{\n\tvar clickHandler = mxUtils.bind(this, function()\n\t{\n\t\tif (action != null && action.length > 0)\n\t\t{\n\t\t\tthis.editor.execute(action);\n\t\t}\n\t});\n\t\n\treturn this.toolbar.addItem(title, icon, clickHandler, pressed);\n};\n\n/**\n * Function: addSeparator\n *\n * Adds a vertical separator using the optional icon.\n * \n * Parameters:\n * \n * icon - Optional URL of the icon that represents the vertical separator.\n * Default is <mxClient.imageBasePath> + '/separator.gif'.\n */\nmxDefaultToolbar.prototype.addSeparator = function(icon)\n{\n\ticon = icon || mxClient.imageBasePath + '/separator.gif';\n\tthis.toolbar.addSeparator(icon);\n};\n\t\n/**\n * Function: addCombo\n *\n * Helper method to invoke <mxToolbar.addCombo> on <toolbar> and return the\n * resulting DOM node.\n */\nmxDefaultToolbar.prototype.addCombo = function()\n{\n\treturn this.toolbar.addCombo();\n};\n\t\t\n/**\n * Function: addActionCombo\n *\n * Helper method to invoke <mxToolbar.addActionCombo> on <toolbar> using\n * the given title and return the resulting DOM node.\n * \n * Parameters:\n * \n * title - String that represents the title of the combo.\n */\nmxDefaultToolbar.prototype.addActionCombo = function(title)\n{\n\treturn this.toolbar.addActionCombo(title);\n};\n\n/**\n * Function: addActionOption\n *\n * Binds the given action to a option with the specified label in the\n * given combo. Combo is an object returned from an earlier call to\n * <addCombo> or <addActionCombo>.\n * \n * Parameters:\n * \n * combo - DOM node that represents the combo box.\n * title - String that represents the title of the combo.\n * action - Name of the action to execute in <editor>.\n */\nmxDefaultToolbar.prototype.addActionOption = function(combo, title, action)\n{\n\tvar clickHandler = mxUtils.bind(this, function()\n\t{\n\t\tthis.editor.execute(action);\n\t});\n\t\n\tthis.addOption(combo, title, clickHandler);\n};\n\n/**\n * Function: addOption\n *\n * Helper method to invoke <mxToolbar.addOption> on <toolbar> and return\n * the resulting DOM node that represents the option.\n * \n * Parameters:\n * \n * combo - DOM node that represents the combo box.\n * title - String that represents the title of the combo.\n * value - Object that represents the value of the option.\n */\nmxDefaultToolbar.prototype.addOption = function(combo, title, value)\n{\n\treturn this.toolbar.addOption(combo, title, value);\n};\n\t\n/**\n * Function: addMode\n *\n * Creates an item for selecting the given mode in the <editor>'s graph.\n * Supported modenames are select, connect and pan.\n * \n * Parameters:\n * \n * title - String that represents the title of the item.\n * icon - URL of the icon that represents the item.\n * mode - String that represents the mode name to be used in\n * <mxEditor.setMode>.\n * pressed - Optional URL of the icon that represents the pressed state.\n * funct - Optional JavaScript function that takes the <mxEditor> as the\n * first and only argument that is executed after the mode has been\n * selected.\n */\nmxDefaultToolbar.prototype.addMode = function(title, icon, mode, pressed, funct)\n{\n\tvar clickHandler = mxUtils.bind(this, function()\n\t{\n\t\tthis.editor.setMode(mode);\n\t\t\n\t\tif (funct != null)\n\t\t{\n\t\t\tfunct(this.editor);\n\t\t}\n\t});\n\t\n\treturn this.toolbar.addSwitchMode(title, icon, clickHandler, pressed);\n};\n\n/**\n * Function: addPrototype\n *\n * Creates an item for inserting a clone of the specified prototype cell into\n * the <editor>'s graph. The ptype may either be a cell or a function that\n * returns a cell.\n * \n * Parameters:\n * \n * title - String that represents the title of the item.\n * icon - URL of the icon that represents the item.\n * ptype - Function or object that represents the prototype cell. If ptype\n * is a function then it is invoked with no arguments to create new\n * instances.\n * pressed - Optional URL of the icon that represents the pressed state.\n * insert - Optional JavaScript function that handles an insert of the new\n * cell. This function takes the <mxEditor>, new cell to be inserted, mouse\n * event and optional <mxCell> under the mouse pointer as arguments.\n * toggle - Optional boolean that specifies if the item can be toggled.\n * Default is true.\n */\nmxDefaultToolbar.prototype.addPrototype = function(title, icon, ptype, pressed, insert, toggle)\n{\n\t// Creates a wrapper function that is in charge of constructing\n\t// the new cell instance to be inserted into the graph\n\tvar factory = mxUtils.bind(this, function()\n\t{\n\t\tif (typeof(ptype) == 'function')\n\t\t{\n\t\t\treturn ptype();\n\t\t}\n\t\telse if (ptype != null)\n\t\t{\n\t\t\treturn this.editor.graph.cloneCell(ptype);\n\t\t}\n\t\t\n\t\treturn null;\n\t});\n\t\n\t// Defines the function for a click event on the graph\n\t// after this item has been selected in the toolbar\n\tvar clickHandler = mxUtils.bind(this, function(evt, cell)\n\t{\n\t\tif (typeof(insert) == 'function')\n\t\t{\n\t\t\tinsert(this.editor, factory(), evt, cell);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tthis.drop(factory(), evt, cell);\n\t\t}\n\t\t\n\t\tthis.toolbar.resetMode();\n\t\tmxEvent.consume(evt);\n\t});\n\t\n\tvar img = this.toolbar.addMode(title, icon, clickHandler, pressed, null, toggle);\n\t\t\t\t\n\t// Creates a wrapper function that calls the click handler without\n\t// the graph argument\n\tvar dropHandler = function(graph, evt, cell)\n\t{\n\t\tclickHandler(evt, cell);\n\t};\n\t\n\tthis.installDropHandler(img, dropHandler);\n\t\n\treturn img;\n};\n\n/**\n * Function: drop\n * \n * Handles a drop from a toolbar item to the graph. The given vertex\n * represents the new cell to be inserted. This invokes <insert> or\n * <connect> depending on the given target cell.\n * \n * Parameters:\n * \n * vertex - <mxCell> to be inserted.\n * evt - Mouse event that represents the drop.\n * target - Optional <mxCell> that represents the drop target.\n */\nmxDefaultToolbar.prototype.drop = function(vertex, evt, target)\n{\n\tvar graph = this.editor.graph;\n\tvar model = graph.getModel();\n\t\n\tif (target == null ||\n\t\tmodel.isEdge(target) ||\n\t\t!this.connectOnDrop ||\n\t\t!graph.isCellConnectable(target))\n\t{\n\t\twhile (target != null &&\n\t\t\t!graph.isValidDropTarget(target, [vertex], evt))\n\t\t{\n\t\t\ttarget = model.getParent(target);\n\t\t}\n\t\t\n\t\tthis.insert(vertex, evt, target);\n\t}\n\telse\n\t{\n\t\tthis.connect(vertex, evt, target);\n\t}\n};\n\n/**\n * Function: insert\n *\n * Handles a drop by inserting the given vertex into the given parent cell\n * or the default parent if no parent is specified.\n * \n * Parameters:\n * \n * vertex - <mxCell> to be inserted.\n * evt - Mouse event that represents the drop.\n * parent - Optional <mxCell> that represents the parent.\n */\nmxDefaultToolbar.prototype.insert = function(vertex, evt, target)\n{\n\tvar graph = this.editor.graph;\n\t\n\tif (graph.canImportCell(vertex))\n\t{\n\t\tvar x = mxEvent.getClientX(evt);\n\t\tvar y = mxEvent.getClientY(evt);\n\t\tvar pt = mxUtils.convertPoint(graph.container, x, y);\n\t\t\n\t\t// Splits the target edge or inserts into target group\n\t\tif (graph.isSplitEnabled() &&\n\t\t\tgraph.isSplitTarget(target, [vertex], evt))\n\t\t{\n\t\t\treturn graph.splitEdge(target, [vertex], null, pt.x, pt.y);\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn this.editor.addVertex(target, vertex, pt.x, pt.y);\n\t\t}\n\t}\n\t\n\treturn null;\n};\n\n/**\n * Function: connect\n * \n * Handles a drop by connecting the given vertex to the given source cell.\n * \n * vertex - <mxCell> to be inserted.\n * evt - Mouse event that represents the drop.\n * source - Optional <mxCell> that represents the source terminal.\n */\nmxDefaultToolbar.prototype.connect = function(vertex, evt, source)\n{\n\tvar graph = this.editor.graph;\n\tvar model = graph.getModel();\n\t\n\tif (source != null &&\n\t\tgraph.isCellConnectable(vertex) &&\n\t\tgraph.isEdgeValid(null, source, vertex))\n\t{\n\t\tvar edge = null;\n\n\t\tmodel.beginUpdate();\n\t\ttry\n\t\t{\n\t\t\tvar geo = model.getGeometry(source);\n\t\t\tvar g = model.getGeometry(vertex).clone();\n\t\t\t\n\t\t\t// Moves the vertex away from the drop target that will\n\t\t\t// be used as the source for the new connection\n\t\t\tg.x = geo.x + (geo.width - g.width) / 2;\n\t\t\tg.y = geo.y + (geo.height - g.height) / 2;\n\t\t\t\n\t\t\tvar step = this.spacing * graph.gridSize;\n\t\t\tvar dist = model.getDirectedEdgeCount(source, true) * 20;\n\t\t\t\n\t\t\tif (this.editor.horizontalFlow)\n\t\t\t{\n\t\t\t\tg.x += (g.width + geo.width) / 2 + step + dist;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tg.y += (g.height + geo.height) / 2 + step + dist;\n\t\t\t}\n\t\t\t\n\t\t\tvertex.setGeometry(g);\n\t\t\t\n\t\t\t// Fires two add-events with the code below - should be fixed\n\t\t\t// to only fire one add event for both inserts\n\t\t\tvar parent = model.getParent(source);\n\t\t\tgraph.addCell(vertex, parent);\n\t\t\tgraph.constrainChild(vertex);\n\n\t\t\t// Creates the edge using the editor instance and calls\n\t\t\t// the second function that fires an add event\n\t\t\tedge = this.editor.createEdge(source, vertex);\n\t\t\t\n\t\t\tif (model.getGeometry(edge) == null)\n\t\t\t{\n\t\t\t\tvar edgeGeometry = new mxGeometry();\n\t\t\t\tedgeGeometry.relative = true;\n\t\t\t\t\n\t\t\t\tmodel.setGeometry(edge, edgeGeometry);\n\t\t\t}\n\t\t\t\n\t\t\tgraph.addEdge(edge, parent, source, vertex);\n\t\t}\n\t\tfinally\n\t\t{\n\t\t\tmodel.endUpdate();\n\t\t}\n\t\t\n\t\tgraph.setSelectionCells([vertex, edge]);\n\t\tgraph.scrollCellToVisible(vertex);\n\t}\n};\n\n/**\n * Function: installDropHandler\n * \n * Makes the given img draggable using the given function for handling a\n * drop event.\n * \n * Parameters:\n * \n * img - DOM node that represents the image.\n * dropHandler - Function that handles a drop of the image.\n */\nmxDefaultToolbar.prototype.installDropHandler = function (img, dropHandler)\n{\n\tvar sprite = document.createElement('img');\n\tsprite.setAttribute('src', img.getAttribute('src'));\n\n\t// Handles delayed loading of the images\n\tvar loader = mxUtils.bind(this, function(evt)\n\t{\n\t\t// Preview uses the image node with double size. Later this can be\n\t\t// changed to use a separate preview and guides, but for this the\n\t\t// dropHandler must use the additional x- and y-arguments and the\n\t\t// dragsource which makeDraggable returns much be configured to\n\t\t// use guides via mxDragSource.isGuidesEnabled.\n\t\tsprite.style.width = (2 * img.offsetWidth) + 'px';\n\t\tsprite.style.height = (2 * img.offsetHeight) + 'px';\n\n\t\tmxUtils.makeDraggable(img, this.editor.graph, dropHandler,\n\t\t\tsprite);\n\t\tmxEvent.removeListener(sprite, 'load', loader);\n\t});\n\n\tif (mxClient.IS_IE)\n\t{\n\t\tloader();\n\t}\n\telse\n\t{\n\t\tmxEvent.addListener(sprite, 'load', loader);\n\t}\t\n};\n\n/**\n * Function: destroy\n * \n * Destroys the <toolbar> associated with this object and removes all\n * installed listeners. This does normally not need to be called, the\n * <toolbar> is destroyed automatically when the window unloads (in IE) by\n * <mxEditor>.\n */\nmxDefaultToolbar.prototype.destroy = function ()\n{\n\tif (this.resetHandler != null)\n\t{\n\t\tthis.editor.graph.removeListener('dblclick', this.resetHandler);\n\t\tthis.editor.removeListener('escape', this.resetHandler);\n\t\tthis.resetHandler = null;\n\t}\n\t\n\tif (this.toolbar != null)\n\t{\n\t\tthis.toolbar.destroy();\n\t\tthis.toolbar = null;\n\t}\n};\n"
  },
  {
    "path": "static/cherry/drawio_demo/src/js/editor/mxEditor.js",
    "content": "/**\n * Copyright (c) 2006-2015, JGraph Ltd\n * Copyright (c) 2006-2015, Gaudenz Alder\n */\n/**\n * Class: mxEditor\n *\n * Extends <mxEventSource> to implement a application wrapper for a graph that\n * adds <actions>, I/O using <mxCodec>, auto-layout using <mxLayoutManager>,\n * command history using <undoManager>, and standard dialogs and widgets, eg.\n * properties, help, outline, toolbar, and popupmenu. It also adds <templates>\n * to be used as cells in toolbars, auto-validation using the <validation>\n * flag, attribute cycling using <cycleAttributeValues>, higher-level events\n * such as <root>, and backend integration using <urlPost> and <urlImage>. \n * \n * Actions:\n * \n * Actions are functions stored in the <actions> array under their names. The\n * functions take the <mxEditor> as the first, and an optional <mxCell> as the\n * second argument and are invoked using <execute>. Any additional arguments\n * passed to execute are passed on to the action as-is.\n * \n * A list of built-in actions is available in the <addActions> description.\n * \n * Read/write Diagrams:\n * \n * To read a diagram from an XML string, for example from a textfield within the \n * page, the following code is used:\n * \n * (code)\n * var doc = mxUtils.parseXML(xmlString);\n * var node = doc.documentElement;\n * editor.readGraphModel(node);\n * (end)\n * \n * For reading a diagram from a remote location, use the <open> method.\n * \n * To save diagrams in XML on a server, you can set the <urlPost> variable. \n * This variable will be used in <getUrlPost> to construct a URL for the post \n * request that is issued in the <save> method. The post request contains the \n * XML representation of the diagram as returned by <writeGraphModel> in the \n * xml parameter.\n * \n * On the server side, the post request is processed using standard\n * technologies such as Java Servlets, CGI, .NET or ASP.\n * \n * Here are some examples of processing a post request in various languages.\n * \n * - Java: URLDecoder.decode(request.getParameter(\"xml\"), \"UTF-8\").replace(\"\\n\", \"&#xa;\")\n * \n * Note that the linefeeds should only be replaced if the XML is\n * processed in Java, for example when creating an image, but not\n * if the XML is passed back to the client-side.\n * \n * - .NET: HttpUtility.UrlDecode(context.Request.Params[\"xml\"])\n * - PHP: urldecode($_POST[\"xml\"])\n * \n * Creating images:\n * \n * A backend (Java, PHP or C#) is required for creating images. The\n * distribution contains an example for each backend (ImageHandler.java,\n * ImageHandler.cs and graph.php). More information about using a backend\n * to create images can be found in the readme.html files. Note that the\n * preview is implemented using VML/SVG in the browser and does not require\n * a backend. The backend is only required to creates images (bitmaps).\n * \n * Special characters:\n * \n * Note There are five characters that should always appear in XML content as\n * escapes, so that they do not interact with the syntax of the markup. These\n * are part of the language for all documents based on XML and for HTML.\n * \n * - &lt; (<)\n * - &gt; (>)\n * - &amp; (&)\n * - &quot; (\")\n * - &apos; (')\n * \n * Although it is part of the XML language, &apos; is not defined in HTML.\n * For this reason the XHTML specification recommends instead the use of\n * &#39; if text may be passed to a HTML user agent.\n * \n * If you are having problems with special characters on the server-side then\n * you may want to try the <escapePostData> flag.\n * \n * For converting decimal escape sequences inside strings, a user has provided\n * us with the following function:\n * \n * (code)\n * function html2js(text)\n * {\n *   var entitySearch = /&#[0-9]+;/;\n *   var entity;\n *   \n *   while (entity = entitySearch.exec(text))\n *   {\n *     var charCode = entity[0].substring(2, entity[0].length -1);\n *     text = text.substring(0, entity.index)\n *            + String.fromCharCode(charCode)\n *            + text.substring(entity.index + entity[0].length);\n *   }\n *   \n *   return text;\n * }\n * (end)\n * \n * Otherwise try using hex escape sequences and the built-in unescape function\n * for converting such strings.\n * \n * Local Files:\n * \n * For saving and opening local files, no standardized method exists that\n * works across all browsers. The recommended way of dealing with local files\n * is to create a backend that streams the XML data back to the browser (echo)\n * as an attachment so that a Save-dialog is displayed on the client-side and\n * the file can be saved to the local disk.\n * \n * For example, in PHP the code that does this looks as follows.\n * \n * (code)\n * $xml = stripslashes($_POST[\"xml\"]);\n * header(\"Content-Disposition: attachment; filename=\\\"diagram.xml\\\"\");\n * echo($xml);\n * (end)\n * \n * To open a local file, the file should be uploaded via a form in the browser\n * and then opened from the server in the editor.\n * \n * Cell Properties:\n * \n * The properties displayed in the properties dialog are the attributes and \n * values of the cell's user object, which is an XML node. The XML node is \n * defined in the templates section of the config file.\n * \n * The templates are stored in <mxEditor.templates> and contain cells which\n * are cloned at insertion time to create new vertices by use of drag and\n * drop from the toolbar. Each entry in the toolbar for adding a new vertex\n * must refer to an existing template.\n * \n * In the following example, the task node is a business object and only the \n * mxCell node and its mxGeometry child contain graph information:\n * \n * (code)\n * <Task label=\"Task\" description=\"\">\n *   <mxCell vertex=\"true\">\n *     <mxGeometry as=\"geometry\" width=\"72\" height=\"32\"/>\n *   </mxCell>\n * </Task> \n * (end)\n * \n * The idea is that the XML representation is inverse from the in-memory \n * representation: The outer XML node is the user object and the inner node is \n * the cell. This means the user object of the cell is the Task node with no \n * children for the above example:\n * \n * (code)\n * <Task label=\"Task\" description=\"\"/>\n * (end)\n * \n * The Task node can have any tag name, attributes and child nodes. The \n * <mxCodec> will use the XML hierarchy as the user object, while removing the \n * \"known annotations\", such as the mxCell node. At save-time the cell data \n * will be \"merged\" back into the user object. The user object is only modified \n * via the properties dialog during the lifecycle of the cell.\n * \n * In the default implementation of <createProperties>, the user object's\n * attributes are put into a form for editing. Attributes are changed using\n * the <mxCellAttributeChange> action in the model. The dialog can be replaced \n * by overriding the <createProperties> hook or by replacing the showProperties\n * action in <actions>. Alternatively, the entry in the config file's popupmenu\n * section can be modified to invoke a different action.\n * \n * If you want to displey the properties dialog on a doubleclick, you can set\n * <mxEditor.dblClickAction> to showProperties as follows:\n * \n * (code)\n * editor.dblClickAction = 'showProperties';\n * (end)\n * \n * Popupmenu and Toolbar:\n * \n * The toolbar and popupmenu are typically configured using the respective\n * sections in the config file, that is, the popupmenu is defined as follows:\n * \n * (code)\n * <mxEditor>\n *   <mxDefaultPopupMenu as=\"popupHandler\">\n * \t\t<add as=\"cut\" action=\"cut\" icon=\"images/cut.gif\"/>\n *      ...\n * (end)\n * \n * New entries can be added to the toolbar by inserting an add-node into the\n * above configuration. Existing entries may be removed and changed by\n * modifying or removing the respective entries in the configuration.\n * The configuration is read by the <mxDefaultPopupMenuCodec>, the format of the\n * configuration is explained in <mxDefaultPopupMenu.decode>.\n * \n * The toolbar is defined in the mxDefaultToolbar section. Items can be added\n * and removed in this section.\n * \n * (code)\n * <mxEditor>\n *   <mxDefaultToolbar>\n *     <add as=\"save\" action=\"save\" icon=\"images/save.gif\"/>\n *     <add as=\"Swimlane\" template=\"swimlane\" icon=\"images/swimlane.gif\"/>\n *     ...\n * (end)\n * \n * The format of the configuration is described in\n * <mxDefaultToolbarCodec.decode>.\n * \n * Ids:\n * \n * For the IDs, there is an implicit behaviour in <mxCodec>: It moves the Id\n * from the cell to the user object at encoding time and vice versa at decoding\n * time. For example, if the Task node from above has an id attribute, then\n * the <mxCell.id> of the corresponding cell will have this value. If there\n * is no Id collision in the model, then the cell may be retrieved using this\n * Id with the <mxGraphModel.getCell> function. If there is a collision, a new\n * Id will be created for the cell using <mxGraphModel.createId>. At encoding\n * time, this new Id will replace the value previously stored under the id\n * attribute in the Task node.\n * \n * See <mxEditorCodec>, <mxDefaultToolbarCodec> and <mxDefaultPopupMenuCodec>\n * for information about configuring the editor and user interface.\n * \n * Programmatically inserting cells:\n * \n * For inserting a new cell, say, by clicking a button in the document,\n * the following code can be used. This requires an reference to the editor.\n * \n * (code)\n * var userObject = new Object();\n * var parent = editor.graph.getDefaultParent();\n * var model = editor.graph.model;\n * model.beginUpdate();\n * try\n * {\n *   editor.graph.insertVertex(parent, null, userObject, 20, 20, 80, 30);\n * }\n * finally\n * {\n *   model.endUpdate();\n * }\n * (end)\n * \n * If a template cell from the config file should be inserted, then a clone\n * of the template can be created as follows. The clone is then inserted using\n * the add function instead of addVertex.\n * \n * (code)\n * var template = editor.templates['task'];\n * var clone = editor.graph.model.cloneCell(template);\n * (end)\n * \n * Resources:\n *\n * resources/editor - Language resources for mxEditor\n *\n * Callback: onInit\n *\n * Called from within the constructor. In the callback,\n * \"this\" refers to the editor instance.\n *\n * Cookie: mxgraph=seen\n *\n * Set when the editor is started. Never expires. Use\n * <resetFirstTime> to reset this cookie. This cookie\n * only exists if <onInit> is implemented.\n *\n * Event: mxEvent.OPEN\n *\n * Fires after a file was opened in <open>. The <code>filename</code> property\n * contains the filename that was used. The same value is also available in\n * <filename>.\n *\n * Event: mxEvent.SAVE\n *\n * Fires after the current file was saved in <save>. The <code>url</code>\n * property contains the URL that was used for saving.\n *\n * Event: mxEvent.POST\n * \n * Fires if a successful response was received in <postDiagram>. The\n * <code>request</code> property contains the <mxXmlRequest>, the\n * <code>url</code> and <code>data</code> properties contain the URL and the\n * data that were used in the post request. \n *\n * Event: mxEvent.ROOT\n *\n * Fires when the current root has changed, or when the title of the current\n * root has changed. This event has no properties.\n *\n * Event: mxEvent.BEFORE_ADD_VERTEX\n * \n * Fires before a vertex is added in <addVertex>. The <code>vertex</code>\n * property contains the new vertex and the <code>parent</code> property\n * contains its parent.\n * \n * Event: mxEvent.ADD_VERTEX\n * \n * Fires between begin- and endUpdate in <addVertex>. The <code>vertex</code>\n * property contains the vertex that is being inserted.\n * \n * Event: mxEvent.AFTER_ADD_VERTEX\n * \n * Fires after a vertex was inserted and selected in <addVertex>. The\n * <code>vertex</code> property contains the new vertex.\n * \n * Example:\n * \n * For starting an in-place edit after a new vertex has been added to the\n * graph, the following code can be used.\n * \n * (code)\n * editor.addListener(mxEvent.AFTER_ADD_VERTEX, function(sender, evt)\n * {\n *   var vertex = evt.getProperty('vertex');\n * \n *   if (editor.graph.isCellEditable(vertex))\n *   {\n *   \teditor.graph.startEditingAtCell(vertex);\n *   }\n * });\n * (end)\n * \n * Event: mxEvent.ESCAPE\n * \n * Fires when the escape key is pressed. The <code>event</code> property\n * contains the key event.\n * \n * Constructor: mxEditor\n *\n * Constructs a new editor. This function invokes the <onInit> callback\n * upon completion.\n *\n * Example:\n *\n * (code)\n * var config = mxUtils.load('config/diagrameditor.xml').getDocumentElement();\n * var editor = new mxEditor(config);\n * (end)\n * \n * Parameters:\n * \n * config - Optional XML node that contains the configuration.\n */\nfunction mxEditor(config)\n{\n\tthis.actions = [];\n\tthis.addActions();\n\n\t// Executes the following only if a document has been instanciated.\n\t// That is, don't execute when the editorcodec is setup.\n\tif (document.body != null)\n\t{\n\t\t// Defines instance fields\n\t\tthis.cycleAttributeValues = [];\n\t\tthis.popupHandler = new mxDefaultPopupMenu();\n\t\tthis.undoManager = new mxUndoManager();\n\n\t\t// Creates the graph and toolbar without the containers\n\t\tthis.graph = this.createGraph();\n\t\tthis.toolbar = this.createToolbar();\n\n\t\t// Creates the global keyhandler (requires graph instance)\n\t\tthis.keyHandler = new mxDefaultKeyHandler(this);\n\n\t\t// Configures the editor using the URI\n\t\t// which was passed to the ctor\n\t\tthis.configure(config);\n\t\t\n\t\t// Assigns the swimlaneIndicatorColorAttribute on the graph\n\t\tthis.graph.swimlaneIndicatorColorAttribute = this.cycleAttributeName;\n\n\t\t// Checks if the <onInit> hook has been set\n\t\tif (this.onInit != null)\n\t\t{\n\t\t\t// Invokes the <onInit> hook\n\t\t\tthis.onInit();\n\t\t}\n\t\t\n\t\t// Automatic deallocation of memory\n\t\tif (mxClient.IS_IE)\n\t\t{\n\t\t\tmxEvent.addListener(window, 'unload', mxUtils.bind(this, function()\n\t\t\t{\n\t\t\t\tthis.destroy();\n\t\t\t}));\n\t\t}\n\t}\n};\n\n/**\n * Installs the required language resources at class\n * loading time.\n */\nif (mxLoadResources)\n{\n\tmxResources.add(mxClient.basePath + '/resources/editor');\n}\nelse\n{\n\tmxClient.defaultBundles.push(mxClient.basePath + '/resources/editor');\n}\n\n/**\n * Extends mxEventSource.\n */\nmxEditor.prototype = new mxEventSource();\nmxEditor.prototype.constructor = mxEditor;\n\n/**\n * Group: Controls and Handlers\n */\n\t\n/**\n * Variable: askZoomResource\n * \n * Specifies the resource key for the zoom dialog. If the resource for this\n * key does not exist then the value is used as the error message. Default\n * is 'askZoom'.\n */\nmxEditor.prototype.askZoomResource = (mxClient.language != 'none') ? 'askZoom' : '';\n\t\n/**\n * Variable: lastSavedResource\n * \n * Specifies the resource key for the last saved info. If the resource for\n * this key does not exist then the value is used as the error message.\n * Default is 'lastSaved'.\n */\nmxEditor.prototype.lastSavedResource = (mxClient.language != 'none') ? 'lastSaved' : '';\n\t\n/**\n * Variable: currentFileResource\n * \n * Specifies the resource key for the current file info. If the resource for\n * this key does not exist then the value is used as the error message.\n * Default is 'lastSaved'.\n */\nmxEditor.prototype.currentFileResource = (mxClient.language != 'none') ? 'currentFile' : '';\n\t\n/**\n * Variable: propertiesResource\n * \n * Specifies the resource key for the properties window title. If the\n * resource for this key does not exist then the value is used as the\n * error message. Default is 'properties'.\n */\nmxEditor.prototype.propertiesResource = (mxClient.language != 'none') ? 'properties' : '';\n\t\n/**\n * Variable: tasksResource\n * \n * Specifies the resource key for the tasks window title. If the\n * resource for this key does not exist then the value is used as the\n * error message. Default is 'tasks'.\n */\nmxEditor.prototype.tasksResource = (mxClient.language != 'none') ? 'tasks' : '';\n\t\n/**\n * Variable: helpResource\n * \n * Specifies the resource key for the help window title. If the\n * resource for this key does not exist then the value is used as the\n * error message. Default is 'help'.\n */\nmxEditor.prototype.helpResource = (mxClient.language != 'none') ? 'help' : '';\n\t\n/**\n * Variable: outlineResource\n * \n * Specifies the resource key for the outline window title. If the\n * resource for this key does not exist then the value is used as the\n * error message. Default is 'outline'.\n */\nmxEditor.prototype.outlineResource = (mxClient.language != 'none') ? 'outline' : '';\n\t\n/**\n * Variable: outline\n * \n * Reference to the <mxWindow> that contains the outline. The <mxOutline>\n * is stored in outline.outline.\n */\nmxEditor.prototype.outline = null;\n\n/**\n * Variable: graph\n *\n * Holds a <mxGraph> for displaying the diagram. The graph\n * is created in <setGraphContainer>.\n */\nmxEditor.prototype.graph = null;\n\n/**\n * Variable: graphRenderHint\n *\n * Holds the render hint used for creating the\n * graph in <setGraphContainer>. See <mxGraph>.\n * Default is null.\n */\nmxEditor.prototype.graphRenderHint = null;\n\n/**\n * Variable: toolbar\n *\n * Holds a <mxDefaultToolbar> for displaying the toolbar. The\n * toolbar is created in <setToolbarContainer>.\n */\nmxEditor.prototype.toolbar = null;\n\n/**\n * Variable: status\n *\n * DOM container that holds the statusbar. Default is null.\n * Use <setStatusContainer> to set this value.\n */\nmxEditor.prototype.status = null;\n\n/**\n * Variable: popupHandler\n *\n * Holds a <mxDefaultPopupMenu> for displaying\n * popupmenus.\n */\nmxEditor.prototype.popupHandler = null;\n\n/**\n * Variable: undoManager\n *\n * Holds an <mxUndoManager> for the command history.\n */\nmxEditor.prototype.undoManager = null;\n\n/**\n * Variable: keyHandler\n *\n * Holds a <mxDefaultKeyHandler> for handling keyboard events.\n * The handler is created in <setGraphContainer>.\n */\nmxEditor.prototype.keyHandler = null;\n\n/**\n * Group: Actions and Options\n */\n\n/**\n * Variable: actions\n *\n * Maps from actionnames to actions, which are functions taking\n * the editor and the cell as arguments. Use <addAction>\n * to add or replace an action and <execute> to execute an action\n * by name, passing the cell to be operated upon as the second\n * argument.\n */\nmxEditor.prototype.actions = null;\n\n/**\n * Variable: dblClickAction\n *\n * Specifies the name of the action to be executed\n * when a cell is double clicked. Default is edit.\n * \n * To handle a singleclick, use the following code.\n * \n * (code)\n * editor.graph.addListener(mxEvent.CLICK, function(sender, evt)\n * {\n *   var e = evt.getProperty('event');\n *   var cell = evt.getProperty('cell');\n * \n *   if (cell != null && !e.isConsumed())\n *   {\n *     // Do something useful with cell...\n *     e.consume();\n *   }\n * });\n * (end)\n */\nmxEditor.prototype.dblClickAction = 'edit';\n\n/**\n * Variable: swimlaneRequired\n * \n * Specifies if new cells must be inserted\n * into an existing swimlane. Otherwise, cells\n * that are not swimlanes can be inserted as\n * top-level cells. Default is false.\n */\nmxEditor.prototype.swimlaneRequired = false;\n\n/**\n * Variable: disableContextMenu\n *\n * Specifies if the context menu should be disabled in the graph container.\n * Default is true.\n */\nmxEditor.prototype.disableContextMenu = true;\n\n/**\n * Group: Templates\n */\n\n/**\n * Variable: insertFunction\n *\n * Specifies the function to be used for inserting new\n * cells into the graph. This is assigned from the\n * <mxDefaultToolbar> if a vertex-tool is clicked.\n */\nmxEditor.prototype.insertFunction = null;\n\n/**\n * Variable: forcedInserting\n *\n * Specifies if a new cell should be inserted on a single\n * click even using <insertFunction> if there is a cell \n * under the mousepointer, otherwise the cell under the \n * mousepointer is selected. Default is false.\n */\nmxEditor.prototype.forcedInserting = false;\n\n/**\n * Variable: templates\n * \n * Maps from names to protoype cells to be used\n * in the toolbar for inserting new cells into\n * the diagram.\n */\nmxEditor.prototype.templates = null;\n\n/**\n * Variable: defaultEdge\n * \n * Prototype edge cell that is used for creating\n * new edges.\n */\nmxEditor.prototype.defaultEdge = null;\n\n/**\n * Variable: defaultEdgeStyle\n * \n * Specifies the edge style to be returned in <getEdgeStyle>.\n * Default is null.\n */\nmxEditor.prototype.defaultEdgeStyle = null;\n\n/**\n * Variable: defaultGroup\n * \n * Prototype group cell that is used for creating\n * new groups.\n */\nmxEditor.prototype.defaultGroup = null;\n\n/**\n * Variable: groupBorderSize\n *\n * Default size for the border of new groups. If null,\n * then then <mxGraph.gridSize> is used. Default is\n * null.\n */\nmxEditor.prototype.groupBorderSize = null;\n\n/**\n * Group: Backend Integration\n */\n\n/**\n * Variable: filename\n *\n * Contains the URL of the last opened file as a string.\n * Default is null.\n */\nmxEditor.prototype.filename = null;\n\n/**\n * Variable: lineFeed\n *\n * Character to be used for encoding linefeeds in <save>. Default is '&#xa;'.\n */\nmxEditor.prototype.linefeed = '&#xa;';\n\n/**\n * Variable: postParameterName\n *\n * Specifies if the name of the post parameter that contains the diagram\n * data in a post request to the server. Default is xml.\n */\nmxEditor.prototype.postParameterName = 'xml';\n\n/**\n * Variable: escapePostData\n *\n * Specifies if the data in the post request for saving a diagram\n * should be converted using encodeURIComponent. Default is true.\n */\nmxEditor.prototype.escapePostData = true;\n\n/**\n * Variable: urlPost\n *\n * Specifies the URL to be used for posting the diagram\n * to a backend in <save>.\n */\nmxEditor.prototype.urlPost = null;\n\n/**\n * Variable: urlImage\n *\n * Specifies the URL to be used for creating a bitmap of\n * the graph in the image action.\n */\nmxEditor.prototype.urlImage = null;\n\n/**\n * Group: Autolayout\n */\n\n/**\n * Variable: horizontalFlow\n *\n * Specifies the direction of the flow\n * in the diagram. This is used in the\n * layout algorithms. Default is false,\n * ie. vertical flow.\n */\nmxEditor.prototype.horizontalFlow = false;\n\n/**\n * Variable: layoutDiagram\n *\n * Specifies if the top-level elements in the\n * diagram should be layed out using a vertical\n * or horizontal stack depending on the setting\n * of <horizontalFlow>. The spacing between the\n * swimlanes is specified by <swimlaneSpacing>.\n * Default is false.\n * \n * If the top-level elements are swimlanes, then\n * the intra-swimlane layout is activated by\n * the <layoutSwimlanes> switch.\n */\nmxEditor.prototype.layoutDiagram = false;\n\n/**\n * Variable: swimlaneSpacing\n *\n * Specifies the spacing between swimlanes if\n * automatic layout is turned on in\n * <layoutDiagram>. Default is 0.\n */\nmxEditor.prototype.swimlaneSpacing = 0;\n\n/**\n * Variable: maintainSwimlanes\n * \n * Specifies if the swimlanes should be kept at the same\n * width or height depending on the setting of\n * <horizontalFlow>.  Default is false.\n * \n * For horizontal flows, all swimlanes\n * have the same height and for vertical flows, all swimlanes\n * have the same width. Furthermore, the swimlanes are\n * automatically \"stacked\" if <layoutDiagram> is true.\n */\nmxEditor.prototype.maintainSwimlanes = false;\n\n/**\n * Variable: layoutSwimlanes\n *\n * Specifies if the children of swimlanes should\n * be layed out, either vertically or horizontally\n * depending on <horizontalFlow>.\n * Default is false.\n */\nmxEditor.prototype.layoutSwimlanes = false;\n\n/**\n * Group: Attribute Cycling\n */\n \n/**\n * Variable: cycleAttributeValues\n * \n * Specifies the attribute values to be cycled when\n * inserting new swimlanes. Default is an empty\n * array.\n */\nmxEditor.prototype.cycleAttributeValues = null;\n\n/**\n * Variable: cycleAttributeIndex\n * \n * Index of the last consumed attribute index. If a new\n * swimlane is inserted, then the <cycleAttributeValues>\n * at this index will be used as the value for\n * <cycleAttributeName>. Default is 0.\n */\nmxEditor.prototype.cycleAttributeIndex = 0;\n\n/**\n * Variable: cycleAttributeName\n * \n * Name of the attribute to be assigned a <cycleAttributeValues>\n * when inserting new swimlanes. Default is fillColor.\n */\nmxEditor.prototype.cycleAttributeName = 'fillColor';\n\n/**\n * Group: Windows\n */\n\n/**\n * Variable: tasks\n * \n * Holds the <mxWindow> created in <showTasks>.\n */\nmxEditor.prototype.tasks = null;\n\n/**\n * Variable: tasksWindowImage\n *\n * Icon for the tasks window.\n */\nmxEditor.prototype.tasksWindowImage = null;\n\n/**\n * Variable: tasksTop\n * \n * Specifies the top coordinate of the tasks window in pixels.\n * Default is 20.\n */\nmxEditor.prototype.tasksTop = 20;\n\n/**\n * Variable: help\n * \n * Holds the <mxWindow> created in <showHelp>.\n */\nmxEditor.prototype.help = null;\n\n/**\n * Variable: helpWindowImage\n *\n * Icon for the help window.\n */\nmxEditor.prototype.helpWindowImage = null;\n\n/**\n * Variable: urlHelp\n *\n * Specifies the URL to be used for the contents of the\n * Online Help window. This is usually specified in the\n * resources file under urlHelp for language-specific\n * online help support.\n */\nmxEditor.prototype.urlHelp = null;\n\n/**\n * Variable: helpWidth\n * \n * Specifies the width of the help window in pixels.\n * Default is 300.\n */\nmxEditor.prototype.helpWidth = 300;\n\t\n/**\n * Variable: helpHeight\n * \n * Specifies the height of the help window in pixels.\n * Default is 260.\n */\nmxEditor.prototype.helpHeight = 260;\n\n/**\n * Variable: propertiesWidth\n * \n * Specifies the width of the properties window in pixels.\n * Default is 240.\n */\nmxEditor.prototype.propertiesWidth = 240;\n\t\t\n/**\n * Variable: propertiesHeight\n * \n * Specifies the height of the properties window in pixels.\n * If no height is specified then the window will be automatically\n * sized to fit its contents. Default is null.\n */\nmxEditor.prototype.propertiesHeight = null;\n\t\t\n/**\n * Variable: movePropertiesDialog\n *\n * Specifies if the properties dialog should be automatically\n * moved near the cell it is displayed for, otherwise the\n * dialog is not moved. This value is only taken into \n * account if the dialog is already visible. Default is false.\n */\nmxEditor.prototype.movePropertiesDialog = false;\n\n/**\n * Variable: validating\n *\n * Specifies if <mxGraph.validateGraph> should automatically be invoked after\n * each change. Default is false.\n */\nmxEditor.prototype.validating = false;\n\n/**\n * Variable: modified\n *\n * True if the graph has been modified since it was last saved.\n */\nmxEditor.prototype.modified = false;\n\n/**\n * Function: isModified\n * \n * Returns <modified>.\n */\nmxEditor.prototype.isModified = function ()\n{\n\treturn this.modified;\n};\n\n/**\n * Function: setModified\n * \n * Sets <modified> to the specified boolean value.\n */\nmxEditor.prototype.setModified = function (value)\n{\n\tthis.modified = value;\n};\n\n/**\n * Function: addActions\n *\n * Adds the built-in actions to the editor instance.\n *\n * save - Saves the graph using <urlPost>.\n * print - Shows the graph in a new print preview window.\n * show - Shows the graph in a new window.\n * exportImage - Shows the graph as a bitmap image using <getUrlImage>.\n * refresh - Refreshes the graph's display.\n * cut - Copies the current selection into the clipboard\n * and removes it from the graph.\n * copy - Copies the current selection into the clipboard.\n * paste - Pastes the clipboard into the graph.\n * delete - Removes the current selection from the graph.\n * group - Puts the current selection into a new group.\n * ungroup - Removes the selected groups and selects the children.\n * undo - Undoes the last change on the graph model.\n * redo - Redoes the last change on the graph model.\n * zoom - Sets the zoom via a dialog.\n * zoomIn - Zooms into the graph.\n * zoomOut - Zooms out of the graph\n * actualSize - Resets the scale and translation on the graph.\n * fit - Changes the scale so that the graph fits into the window.\n * showProperties - Shows the properties dialog.\n * selectAll - Selects all cells.\n * selectNone - Clears the selection.\n * selectVertices - Selects all vertices.\n * selectEdges = Selects all edges.\n * edit - Starts editing the current selection cell.\n * enterGroup - Drills down into the current selection cell.\n * exitGroup - Moves up in the drilling hierachy\n * home - Moves to the topmost parent in the drilling hierarchy\n * selectPrevious - Selects the previous cell.\n * selectNext - Selects the next cell.\n * selectParent - Selects the parent of the selection cell.\n * selectChild - Selects the first child of the selection cell.\n * collapse - Collapses the currently selected cells.\n * expand - Expands the currently selected cells.\n * bold - Toggle bold text style.\n * italic - Toggle italic text style.\n * underline - Toggle underline text style.\n * alignCellsLeft - Aligns the selection cells at the left.\n * alignCellsCenter - Aligns the selection cells in the center.\n * alignCellsRight - Aligns the selection cells at the right.\n * alignCellsTop - Aligns the selection cells at the top.\n * alignCellsMiddle - Aligns the selection cells in the middle.\n * alignCellsBottom - Aligns the selection cells at the bottom.\n * alignFontLeft - Sets the horizontal text alignment to left.\n * alignFontCenter - Sets the horizontal text alignment to center.\n * alignFontRight - Sets the horizontal text alignment to right.\n * alignFontTop - Sets the vertical text alignment to top.\n * alignFontMiddle - Sets the vertical text alignment to middle.\n * alignFontBottom - Sets the vertical text alignment to bottom.\n * toggleTasks - Shows or hides the tasks window.\n * toggleHelp - Shows or hides the help window.\n * toggleOutline - Shows or hides the outline window.\n * toggleConsole - Shows or hides the console window.\n */\nmxEditor.prototype.addActions = function ()\n{\n\tthis.addAction('save', function(editor)\n\t{\n\t\teditor.save();\n\t});\n\t\n\tthis.addAction('print', function(editor)\n\t{\n\t\tvar preview = new mxPrintPreview(editor.graph, 1);\n\t\tpreview.open();\n\t});\n\t\n\tthis.addAction('show', function(editor)\n\t{\n\t\tmxUtils.show(editor.graph, null, 10, 10);\n\t});\n\n\tthis.addAction('exportImage', function(editor)\n\t{\n\t\tvar url = editor.getUrlImage();\n\t\t\n\t\tif (url == null || mxClient.IS_LOCAL)\n\t\t{\n\t\t\teditor.execute('show');\n\t\t}\n\t\telse\n\t\t{\n\t\t\tvar node = mxUtils.getViewXml(editor.graph, 1);\n\t\t\tvar xml = mxUtils.getXml(node, '\\n');\n\n\t\t\tmxUtils.submit(url, editor.postParameterName + '=' +\n\t\t\t\tencodeURIComponent(xml), document, '_blank');\n\t\t}\n\t});\n\t\n\tthis.addAction('refresh', function(editor)\n\t{\n\t\teditor.graph.refresh();\n\t});\n\t\n\tthis.addAction('cut', function(editor)\n\t{\n\t\tif (editor.graph.isEnabled())\n\t\t{\n\t\t\tmxClipboard.cut(editor.graph);\n\t\t}\n\t});\n\t\n\tthis.addAction('copy', function(editor)\n\t{\n\t\tif (editor.graph.isEnabled())\n\t\t{\n\t\t\tmxClipboard.copy(editor.graph);\n\t\t}\n\t});\n\t\n\tthis.addAction('paste', function(editor)\n\t{\n\t\tif (editor.graph.isEnabled())\n\t\t{\n\t\t\tmxClipboard.paste(editor.graph);\n\t\t}\n\t});\n\t\n\tthis.addAction('delete', function(editor)\n\t{\n\t\tif (editor.graph.isEnabled())\n\t\t{\n\t\t\teditor.graph.removeCells();\n\t\t}\n\t});\n\t\n\tthis.addAction('group', function(editor)\n\t{\n\t\tif (editor.graph.isEnabled())\n\t\t{\n\t\t\teditor.graph.setSelectionCell(editor.groupCells());\n\t\t}\n\t});\n\t\n\tthis.addAction('ungroup', function(editor)\n\t{\n\t\tif (editor.graph.isEnabled())\n\t\t{\n\t\t\teditor.graph.setSelectionCells(editor.graph.ungroupCells());\n\t\t}\n\t});\n\t\n\tthis.addAction('removeFromParent', function(editor)\n\t{\n\t\tif (editor.graph.isEnabled())\n\t\t{\n\t\t\teditor.graph.removeCellsFromParent();\n\t\t}\n\t});\n\t\n\tthis.addAction('undo', function(editor)\n\t{\n\t\tif (editor.graph.isEnabled())\n\t\t{\n\t\t\teditor.undo();\n\t\t}\n\t});\n\t\n\tthis.addAction('redo', function(editor)\n\t{\n\t\tif (editor.graph.isEnabled())\n\t\t{\n\t\t\teditor.redo();\n\t\t}\n\t});\n\t\n\tthis.addAction('zoomIn', function(editor)\n\t{\n\t\teditor.graph.zoomIn();\n\t});\n\t\n\tthis.addAction('zoomOut', function(editor)\n\t{\n\t\teditor.graph.zoomOut();\n\t});\n\t\n\tthis.addAction('actualSize', function(editor)\n\t{\n\t\teditor.graph.zoomActual();\n\t});\n\t\n\tthis.addAction('fit', function(editor)\n\t{\n\t\teditor.graph.fit();\n\t});\n\t\n\tthis.addAction('showProperties', function(editor, cell)\n\t{\n\t\teditor.showProperties(cell);\n\t});\n\t\n\tthis.addAction('selectAll', function(editor)\n\t{\n\t\tif (editor.graph.isEnabled())\n\t\t{\n\t\t\teditor.graph.selectAll();\n\t\t}\n\t});\n\t\n\tthis.addAction('selectNone', function(editor)\n\t{\n\t\tif (editor.graph.isEnabled())\n\t\t{\n\t\t\teditor.graph.clearSelection();\n\t\t}\n\t});\n\t\n\tthis.addAction('selectVertices', function(editor)\n\t{\n\t\tif (editor.graph.isEnabled())\n\t\t{\n\t\t\teditor.graph.selectVertices();\n\t\t}\n\t});\n\t\n\tthis.addAction('selectEdges', function(editor)\n\t{\n\t\tif (editor.graph.isEnabled())\n\t\t{\n\t\t\teditor.graph.selectEdges();\n\t\t}\n\t});\n\t\n\tthis.addAction('edit', function(editor, cell)\n\t{\n\t\tif (editor.graph.isEnabled() &&\n\t\t\teditor.graph.isCellEditable(cell))\n\t\t{\n\t\t\teditor.graph.startEditingAtCell(cell);\n\t\t}\n\t});\n\t\n\tthis.addAction('toBack', function(editor, cell)\n\t{\n\t\tif (editor.graph.isEnabled())\n\t\t{\n\t\t\teditor.graph.orderCells(true);\n\t\t}\n\t});\n\t\n\tthis.addAction('toFront', function(editor, cell)\n\t{\n\t\tif (editor.graph.isEnabled())\n\t\t{\n\t\t\teditor.graph.orderCells(false);\n\t\t}\n\t});\n\t\n\tthis.addAction('enterGroup', function(editor, cell)\n\t{\n\t\teditor.graph.enterGroup(cell);\n\t});\n\t\n\tthis.addAction('exitGroup', function(editor)\n\t{\n\t\teditor.graph.exitGroup();\n\t});\n\t\n\tthis.addAction('home', function(editor)\n\t{\n\t\teditor.graph.home();\n\t});\n\t\n\tthis.addAction('selectPrevious', function(editor)\n\t{\n\t\tif (editor.graph.isEnabled())\n\t\t{\n\t\t\teditor.graph.selectPreviousCell();\n\t\t}\n\t});\n\t\n\tthis.addAction('selectNext', function(editor)\n\t{\n\t\tif (editor.graph.isEnabled())\n\t\t{\n\t\t\teditor.graph.selectNextCell();\n\t\t}\n\t});\n\t\n\tthis.addAction('selectParent', function(editor)\n\t{\n\t\tif (editor.graph.isEnabled())\n\t\t{\n\t\t\teditor.graph.selectParentCell();\n\t\t}\n\t});\n\t\n\tthis.addAction('selectChild', function(editor)\n\t{\n\t\tif (editor.graph.isEnabled())\n\t\t{\n\t\t\teditor.graph.selectChildCell();\n\t\t}\n\t});\n\t\n\tthis.addAction('collapse', function(editor)\n\t{\n\t\tif (editor.graph.isEnabled())\n\t\t{\n\t\t\teditor.graph.foldCells(true);\n\t\t}\n\t});\n\t\n\tthis.addAction('collapseAll', function(editor)\n\t{\n\t\tif (editor.graph.isEnabled())\n\t\t{\n\t\t\tvar cells = editor.graph.getChildVertices();\n\t\t\teditor.graph.foldCells(true, false, cells);\n\t\t}\n\t});\n\t\n\tthis.addAction('expand', function(editor)\n\t{\n\t\tif (editor.graph.isEnabled())\n\t\t{\n\t\t\teditor.graph.foldCells(false);\n\t\t}\n\t});\n\t\n\tthis.addAction('expandAll', function(editor)\n\t{\n\t\tif (editor.graph.isEnabled())\n\t\t{\n\t\t\tvar cells = editor.graph.getChildVertices();\n\t\t\teditor.graph.foldCells(false, false, cells);\n\t\t}\n\t});\n\t\n\tthis.addAction('bold', function(editor)\n\t{\n\t\tif (editor.graph.isEnabled())\n\t\t{\n\t\t\teditor.graph.toggleCellStyleFlags(\n\t\t\t\tmxConstants.STYLE_FONTSTYLE,\n\t\t\t\tmxConstants.FONT_BOLD);\n\t\t}\n\t});\n\t\n\tthis.addAction('italic', function(editor)\n\t{\n\t\tif (editor.graph.isEnabled())\n\t\t{\n\t\t\teditor.graph.toggleCellStyleFlags(\n\t\t\t\tmxConstants.STYLE_FONTSTYLE,\n\t\t\t\tmxConstants.FONT_ITALIC);\n\t\t}\n\t});\n\t\n\tthis.addAction('underline', function(editor)\n\t{\n\t\tif (editor.graph.isEnabled())\n\t\t{\n\t\t\teditor.graph.toggleCellStyleFlags(\n\t\t\t\tmxConstants.STYLE_FONTSTYLE,\n\t\t\t\tmxConstants.FONT_UNDERLINE);\n\t\t}\n\t});\n\n\tthis.addAction('alignCellsLeft', function(editor)\n\t{\n\t\tif (editor.graph.isEnabled())\n\t\t{\n\t\t\teditor.graph.alignCells(mxConstants.ALIGN_LEFT);\n\t\t}\n\t});\n\t\n\tthis.addAction('alignCellsCenter', function(editor)\n\t{\n\t\tif (editor.graph.isEnabled())\n\t\t{\n\t\t\teditor.graph.alignCells(mxConstants.ALIGN_CENTER);\n\t\t}\n\t});\n\t\n\tthis.addAction('alignCellsRight', function(editor)\n\t{\n\t\tif (editor.graph.isEnabled())\n\t\t{\n\t\t\teditor.graph.alignCells(mxConstants.ALIGN_RIGHT);\n\t\t}\n\t});\n\t\n\tthis.addAction('alignCellsTop', function(editor)\n\t{\n\t\tif (editor.graph.isEnabled())\n\t\t{\n\t\t\teditor.graph.alignCells(mxConstants.ALIGN_TOP);\n\t\t}\n\t});\n\t\n\tthis.addAction('alignCellsMiddle', function(editor)\n\t{\n\t\tif (editor.graph.isEnabled())\n\t\t{\n\t\t\teditor.graph.alignCells(mxConstants.ALIGN_MIDDLE);\n\t\t}\n\t});\n\t\n\tthis.addAction('alignCellsBottom', function(editor)\n\t{\n\t\tif (editor.graph.isEnabled())\n\t\t{\n\t\t\teditor.graph.alignCells(mxConstants.ALIGN_BOTTOM);\n\t\t}\n\t});\n\t\n\tthis.addAction('alignFontLeft', function(editor)\n\t{\n\t\t\n\t\teditor.graph.setCellStyles(\n\t\t\tmxConstants.STYLE_ALIGN,\n\t\t\tmxConstants.ALIGN_LEFT);\n\t});\n\t\n\tthis.addAction('alignFontCenter', function(editor)\n\t{\n\t\tif (editor.graph.isEnabled())\n\t\t{\n\t\t\teditor.graph.setCellStyles(\n\t\t\t\tmxConstants.STYLE_ALIGN,\n\t\t\t\tmxConstants.ALIGN_CENTER);\n\t\t}\n\t});\n\t\n\tthis.addAction('alignFontRight', function(editor)\n\t{\n\t\tif (editor.graph.isEnabled())\n\t\t{\n\t\t\teditor.graph.setCellStyles(\n\t\t\t\tmxConstants.STYLE_ALIGN,\n\t\t\t\tmxConstants.ALIGN_RIGHT);\n\t\t}\n\t});\n\t\n\tthis.addAction('alignFontTop', function(editor)\n\t{\n\t\tif (editor.graph.isEnabled())\n\t\t{\n\t\t\teditor.graph.setCellStyles(\n\t\t\t\tmxConstants.STYLE_VERTICAL_ALIGN,\n\t\t\t\tmxConstants.ALIGN_TOP);\n\t\t}\n\t});\n\t\n\tthis.addAction('alignFontMiddle', function(editor)\n\t{\n\t\tif (editor.graph.isEnabled())\n\t\t{\n\t\t\teditor.graph.setCellStyles(\n\t\t\t\tmxConstants.STYLE_VERTICAL_ALIGN,\n\t\t\t\tmxConstants.ALIGN_MIDDLE);\n\t\t}\n\t});\n\t\n\tthis.addAction('alignFontBottom', function(editor)\n\t{\n\t\tif (editor.graph.isEnabled())\n\t\t{\n\t\t\teditor.graph.setCellStyles(\n\t\t\t\tmxConstants.STYLE_VERTICAL_ALIGN,\n\t\t\t\tmxConstants.ALIGN_BOTTOM);\n\t\t}\n\t});\n\t\n\tthis.addAction('zoom', function(editor)\n\t{\n\t\tvar current = editor.graph.getView().scale*100;\n\t\tvar scale = parseFloat(mxUtils.prompt(\n\t\t\tmxResources.get(editor.askZoomResource) ||\n\t\t\teditor.askZoomResource,\n\t\t\tcurrent))/100;\n\n\t\tif (!isNaN(scale))\n\t\t{\n\t\t\teditor.graph.getView().setScale(scale);\n\t\t}\n\t});\n\t\n\tthis.addAction('toggleTasks', function(editor)\n\t{\n\t\tif (editor.tasks != null)\n\t\t{\n\t\t\teditor.tasks.setVisible(!editor.tasks.isVisible());\n\t\t}\n\t\telse\n\t\t{\n\t\t\teditor.showTasks();\n\t\t}\n\t});\n\t\n\tthis.addAction('toggleHelp', function(editor)\n\t{\n\t\tif (editor.help != null)\n\t\t{\n\t\t\teditor.help.setVisible(!editor.help.isVisible());\n\t\t}\n\t\telse\n\t\t{\n\t\t\teditor.showHelp();\n\t\t}\n\t});\n\t\n\tthis.addAction('toggleOutline', function(editor)\n\t{\n\t\tif (editor.outline == null)\n\t\t{\n\t\t\teditor.showOutline();\n\t\t}\n\t\telse\n\t\t{\n\t\t\teditor.outline.setVisible(!editor.outline.isVisible());\n\t\t}\n\t});\n\t\n\tthis.addAction('toggleConsole', function(editor)\n\t{\n\t\tmxLog.setVisible(!mxLog.isVisible());\n\t});\n};\n\n/**\n * Function: configure\n *\n * Configures the editor using the specified node. To load the\n * configuration from a given URL the following code can be used to obtain\n * the XML node.\n * \n * (code)\n * var node = mxUtils.load(url).getDocumentElement();\n * (end)\n * \n * Parameters:\n * \n * node - XML node that contains the configuration.\n */\nmxEditor.prototype.configure = function (node)\n{\n\tif (node != null)\n\t{\n\t\t// Creates a decoder for the XML data\n\t\t// and uses it to configure the editor\n\t\tvar dec = new mxCodec(node.ownerDocument);\n\t\tdec.decode(node, this);\n\t\t\n\t\t// Resets the counters, modified state and\n\t\t// command history\n\t\tthis.resetHistory();\n\t}\n};\n\n/**\n * Function: resetFirstTime\n * \n * Resets the cookie that is used to remember if the editor has already\n * been used.\n */\nmxEditor.prototype.resetFirstTime = function ()\n{\n\tdocument.cookie =\n\t\t'mxgraph=seen; expires=Fri, 27 Jul 2001 02:47:11 UTC; path=/';\n};\n\n/**\n * Function: resetHistory\n * \n * Resets the command history, modified state and counters.\n */\nmxEditor.prototype.resetHistory = function ()\n{\n\tthis.lastSnapshot = new Date().getTime();\n\tthis.undoManager.clear();\n\tthis.ignoredChanges = 0;\n\tthis.setModified(false);\n};\n\n/**\n * Function: addAction\n * \n * Binds the specified actionname to the specified function.\n * \n * Parameters:\n * \n * actionname - String that specifies the name of the action\n * to be added.\n * funct - Function that implements the new action. The first\n * argument of the function is the editor it is used\n * with, the second argument is the cell it operates\n * upon.\n * \n * Example:\n * (code)\n * editor.addAction('test', function(editor, cell)\n * {\n * \t\tmxUtils.alert(\"test \"+cell);\n * });\n * (end)\n */\nmxEditor.prototype.addAction = function (actionname, funct)\n{\n\tthis.actions[actionname] = funct;\n};\n\n/**\n * Function: execute\n * \n * Executes the function with the given name in <actions> passing the\n * editor instance and given cell as the first and second argument. All\n * additional arguments are passed to the action as well. This method\n * contains a try-catch block and displays an error message if an action\n * causes an exception. The exception is re-thrown after the error\n * message was displayed.\n * \n * Example:\n * \n * (code)\n * editor.execute(\"showProperties\", cell);\n * (end)\n */\nmxEditor.prototype.execute = function (actionname, cell, evt)\n{\n\tvar action = this.actions[actionname];\n\t\n\tif (action != null)\n\t{\n\t\ttry\n\t\t{\n\t\t\t// Creates the array of arguments by replacing the actionname\n\t\t\t// with the editor instance in the args of this function\n\t\t\tvar args = arguments;\n\t\t\targs[0] = this;\n\t\t\t\n\t\t\t// Invokes the function on the editor using the args\n\t\t\taction.apply(this, args);\n\t\t}\n\t\tcatch (e)\n\t\t{\n\t\t\tmxUtils.error('Cannot execute ' + actionname +\n\t\t\t\t': ' + e.message, 280, true);\n\t\t\t\n\t\t\tthrow e;\n\t\t}\n\t}\n\telse\n\t{\n\t\tmxUtils.error('Cannot find action '+actionname, 280, true);\n\t}\n};\n\n/**\n * Function: addTemplate\n * \n * Adds the specified template under the given name in <templates>.\n */\nmxEditor.prototype.addTemplate = function (name, template)\n{\n\tthis.templates[name] = template;\n};\n\n/**\n * Function: getTemplate\n * \n * Returns the template for the given name.\n */\nmxEditor.prototype.getTemplate = function (name)\n{\n\treturn this.templates[name];\n};\n\n/**\n * Function: createGraph\n * \n * Creates the <graph> for the editor. The graph is created with no\n * container and is initialized from <setGraphContainer>.\n */\nmxEditor.prototype.createGraph = function ()\n{\n\tvar graph = new mxGraph(null, null, this.graphRenderHint);\n\t\n\t// Enables rubberband, tooltips, panning\n\tgraph.setTooltips(true);\n\tgraph.setPanning(true);\n\n\t// Overrides the dblclick method on the graph to\n\t// invoke the dblClickAction for a cell and reset\n\t// the selection tool in the toolbar\n\tthis.installDblClickHandler(graph);\n\t\n\t// Installs the command history\n\tthis.installUndoHandler(graph);\n\n\t// Installs the handlers for the root event\n\tthis.installDrillHandler(graph);\n\t\n\t// Installs the handler for validation\n\tthis.installChangeHandler(graph);\n\n\t// Installs the handler for calling the\n\t// insert function and consume the\n\t// event if an insert function is defined\n\tthis.installInsertHandler(graph);\n\n\t// Redirects the function for creating the\n\t// popupmenu items\n\tgraph.popupMenuHandler.factoryMethod =\n\t\tmxUtils.bind(this, function(menu, cell, evt)\n\t\t{\n\t\t\treturn this.createPopupMenu(menu, cell, evt);\n\t\t});\n\n\t// Redirects the function for creating\n\t// new connections in the diagram\n\tgraph.connectionHandler.factoryMethod =\n\t\tmxUtils.bind(this, function(source, target)\n\t\t{\n\t\t\treturn this.createEdge(source, target);\n\t\t});\n\t\n\t// Maintains swimlanes and installs autolayout\n\tthis.createSwimlaneManager(graph);\n\tthis.createLayoutManager(graph);\n\t\n\treturn graph;\n};\n\n/**\n * Function: createSwimlaneManager\n * \n * Sets the graph's container using <mxGraph.init>.\n */\nmxEditor.prototype.createSwimlaneManager = function (graph)\n{\n\tvar swimlaneMgr = new mxSwimlaneManager(graph, false);\n\n\tswimlaneMgr.isHorizontal = mxUtils.bind(this, function()\n\t{\n\t\treturn this.horizontalFlow;\n\t});\n\t\n\tswimlaneMgr.isEnabled = mxUtils.bind(this, function()\n\t{\n\t\treturn this.maintainSwimlanes;\n\t});\n\t\n\treturn swimlaneMgr;\n};\n\n/**\n * Function: createLayoutManager\n * \n * Creates a layout manager for the swimlane and diagram layouts, that\n * is, the locally defined inter- and intraswimlane layouts.\n */\nmxEditor.prototype.createLayoutManager = function (graph)\n{\n\tvar layoutMgr = new mxLayoutManager(graph);\n\t\n\tvar self = this; // closure\n\tlayoutMgr.getLayout = function(cell)\n\t{\n\t\tvar layout = null;\n\t\tvar model = self.graph.getModel();\n\t\t\n\t\tif (model.getParent(cell) != null)\n\t\t{\n\t\t\t// Executes the swimlane layout if a child of\n\t\t\t// a swimlane has been changed. The layout is\n\t\t\t// lazy created in createSwimlaneLayout.\n\t\t\tif (self.layoutSwimlanes &&\n\t\t\t\tgraph.isSwimlane(cell))\n\t\t\t{\n\t\t\t\tif (self.swimlaneLayout == null)\n\t\t\t\t{\n\t\t\t\t\tself.swimlaneLayout = self.createSwimlaneLayout();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tlayout = self.swimlaneLayout;\n\t\t\t}\n\t\t\t\n\t\t\t// Executes the diagram layout if the modified\n\t\t\t// cell is a top-level cell. The layout is\n\t\t\t// lazy created in createDiagramLayout.\n\t\t\telse if (self.layoutDiagram &&\n\t\t\t\t(graph.isValidRoot(cell) ||\n\t\t\t\tmodel.getParent(model.getParent(cell)) == null))\n\t\t\t{\n\t\t\t\tif (self.diagramLayout == null)\n\t\t\t\t{\n\t\t\t\t\tself.diagramLayout = self.createDiagramLayout();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tlayout = self.diagramLayout;\n\t\t\t}\n\t\t}\n\t\t\t\n\t\treturn layout;\n\t};\n\t\n\treturn layoutMgr;\n};\n\n/**\n * Function: setGraphContainer\n * \n * Sets the graph's container using <mxGraph.init>.\n */\nmxEditor.prototype.setGraphContainer = function (container)\n{\n\tif (this.graph.container == null)\n\t{\n\t\t// Creates the graph instance inside the given container and render hint\n\t\t//this.graph = new mxGraph(container, null, this.graphRenderHint);\n\t\tthis.graph.init(container);\n\n\t\t// Install rubberband selection as the last\n\t\t// action handler in the chain\n\t\tthis.rubberband = new mxRubberband(this.graph);\n\n\t\t// Disables the context menu\n\t\tif (this.disableContextMenu)\n\t\t{\n\t\t\tmxEvent.disableContextMenu(container);\n\t\t}\n\n\t\t// Workaround for stylesheet directives in IE\n\t\tif (mxClient.IS_QUIRKS)\n\t\t{\n\t\t\tnew mxDivResizer(container);\n\t\t}\n\t}\n};\n\n/**\n * Function: installDblClickHandler\n * \n * Overrides <mxGraph.dblClick> to invoke <dblClickAction>\n * on a cell and reset the selection tool in the toolbar.\n */\nmxEditor.prototype.installDblClickHandler = function (graph)\n{\n\t// Installs a listener for double click events\n\tgraph.addListener(mxEvent.DOUBLE_CLICK,\n\t\tmxUtils.bind(this, function(sender, evt)\n\t\t{\n\t\t\tvar cell = evt.getProperty('cell');\n\t\t\t\n\t\t\tif (cell != null &&\n\t\t\t\tgraph.isEnabled() &&\n\t\t\t\tthis.dblClickAction != null)\n\t\t\t{\n\t\t\t\tthis.execute(this.dblClickAction, cell);\n\t\t\t\tevt.consume();\n\t\t\t}\n\t\t})\n\t);\n};\n\t\t\n/**\n * Function: installUndoHandler\n * \n * Adds the <undoManager> to the graph model and the view.\n */\nmxEditor.prototype.installUndoHandler = function (graph)\n{\t\t\t\t\n\tvar listener = mxUtils.bind(this, function(sender, evt)\n\t{\n\t\tvar edit = evt.getProperty('edit');\n\t\tthis.undoManager.undoableEditHappened(edit);\n\t});\n\t\n\tgraph.getModel().addListener(mxEvent.UNDO, listener);\n\tgraph.getView().addListener(mxEvent.UNDO, listener);\n\n\t// Keeps the selection state in sync\n\tvar undoHandler = function(sender, evt)\n\t{\n\t\tvar changes = evt.getProperty('edit').changes;\n\t\tgraph.setSelectionCells(graph.getSelectionCellsForChanges(changes));\n\t};\n\t\n\tthis.undoManager.addListener(mxEvent.UNDO, undoHandler);\n\tthis.undoManager.addListener(mxEvent.REDO, undoHandler);\n};\n\t\t\n/**\n * Function: installDrillHandler\n * \n * Installs listeners for dispatching the <root> event.\n */\nmxEditor.prototype.installDrillHandler = function (graph)\n{\t\t\t\t\n\tvar listener = mxUtils.bind(this, function(sender)\n\t{\n\t\tthis.fireEvent(new mxEventObject(mxEvent.ROOT));\n\t});\n\t\n\tgraph.getView().addListener(mxEvent.DOWN, listener);\n\tgraph.getView().addListener(mxEvent.UP, listener);\n};\n\n/**\n * Function: installChangeHandler\n * \n * Installs the listeners required to automatically validate\n * the graph. On each change of the root, this implementation\n * fires a <root> event.\n */\nmxEditor.prototype.installChangeHandler = function (graph)\n{\n\tvar listener = mxUtils.bind(this, function(sender, evt)\n\t{\n\t\t// Updates the modified state\n\t\tthis.setModified(true);\n\n\t\t// Automatically validates the graph\n\t\t// after each change\n\t\tif (this.validating == true)\n\t\t{\n\t\t\tgraph.validateGraph();\n\t\t}\n\n\t\t// Checks if the root has been changed\n\t\tvar changes = evt.getProperty('edit').changes;\n\t\t\n\t\tfor (var i = 0; i < changes.length; i++)\n\t\t{\n\t\t\tvar change = changes[i];\n\t\t\t\n\t\t\tif (change instanceof mxRootChange ||\n\t\t\t\t(change instanceof mxValueChange &&\n\t\t\t\tchange.cell == this.graph.model.root) ||\n\t\t\t\t(change instanceof mxCellAttributeChange &&\n\t\t\t\tchange.cell == this.graph.model.root))\n\t\t\t{\n\t\t\t\tthis.fireEvent(new mxEventObject(mxEvent.ROOT));\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t});\n\t\n\tgraph.getModel().addListener(mxEvent.CHANGE, listener);\n};\n\n/**\n * Function: installInsertHandler\n * \n * Installs the handler for invoking <insertFunction> if\n * one is defined.\n */\nmxEditor.prototype.installInsertHandler = function (graph)\n{\n\tvar self = this; // closure\n\tvar insertHandler =\n\t{\n\t\tmouseDown: function(sender, me)\n\t\t{\n\t\t\tif (self.insertFunction != null &&\n\t\t\t\t!me.isPopupTrigger() &&\n\t\t\t\t(self.forcedInserting ||\n\t\t\t\tme.getState() == null))\n\t\t\t{\n\t\t\t\tself.graph.clearSelection();\n\t\t\t\tself.insertFunction(me.getEvent(), me.getCell());\n\n\t\t\t\t// Consumes the rest of the events\n\t\t\t\t// for this gesture (down, move, up)\n\t\t\t\tthis.isActive = true;\n\t\t\t\tme.consume();\n\t\t\t}\n\t\t},\n\t\t\n\t\tmouseMove: function(sender, me)\n\t\t{\n\t\t\tif (this.isActive)\n\t\t\t{\n\t\t\t\tme.consume();\n\t\t\t}\n\t\t},\n\t\t\n\t\tmouseUp: function(sender, me)\n\t\t{\n\t\t\tif (this.isActive)\n\t\t\t{\n\t\t\t\tthis.isActive = false;\n\t\t\t\tme.consume();\n\t\t\t}\n\t\t}\n\t};\n\t\n\tgraph.addMouseListener(insertHandler);\n};\n\n/**\n * Function: createDiagramLayout\n * \n * Creates the layout instance used to layout the\n * swimlanes in the diagram.\n */\nmxEditor.prototype.createDiagramLayout = function ()\n{\n\tvar gs = this.graph.gridSize;\n\tvar layout = new mxStackLayout(this.graph, !this.horizontalFlow,\n\t\t this.swimlaneSpacing, 2*gs, 2*gs);\n\t\n\t// Overrides isIgnored to only take into account swimlanes\n\tlayout.isVertexIgnored = function(cell)\n\t{\n\t\treturn !layout.graph.isSwimlane(cell);\n\t};\n\t\n\treturn layout;\n};\n\n/**\n * Function: createSwimlaneLayout\n * \n * Creates the layout instance used to layout the\n * children of each swimlane.\n */\nmxEditor.prototype.createSwimlaneLayout = function ()\n{\n\treturn new mxCompactTreeLayout(this.graph, this.horizontalFlow);\n};\n\n/**\n * Function: createToolbar\n * \n * Creates the <toolbar> with no container.\n */\nmxEditor.prototype.createToolbar = function ()\n{\n\treturn new mxDefaultToolbar(null, this);\n};\n\n/**\n * Function: setToolbarContainer\n * \n * Initializes the toolbar for the given container.\n */\nmxEditor.prototype.setToolbarContainer = function (container)\n{\n\tthis.toolbar.init(container);\n\t\n\t// Workaround for stylesheet directives in IE\n\tif (mxClient.IS_QUIRKS)\n\t{\n\t\tnew mxDivResizer(container);\n\t}\n};\n\n/**\n * Function: setStatusContainer\n * \n * Creates the <status> using the specified container.\n * \n * This implementation adds listeners in the editor to \n * display the last saved time and the current filename \n * in the status bar.\n * \n * Parameters:\n * \n * container - DOM node that will contain the statusbar.\n */\nmxEditor.prototype.setStatusContainer = function (container)\n{\n\tif (this.status == null)\n\t{\n\t\tthis.status = container;\n\t\t\n\t\t// Prints the last saved time in the status bar\n\t\t// when files are saved\n\t\tthis.addListener(mxEvent.SAVE, mxUtils.bind(this, function()\n\t\t{\n\t\t\tvar tstamp = new Date().toLocaleString();\n\t\t\tthis.setStatus((mxResources.get(this.lastSavedResource) ||\n\t\t\t\tthis.lastSavedResource)+': '+tstamp);\n\t\t}));\n\t\t\n\t\t// Updates the statusbar to display the filename\n\t\t// when new files are opened\n\t\tthis.addListener(mxEvent.OPEN, mxUtils.bind(this, function()\n\t\t{\n\t\t\tthis.setStatus((mxResources.get(this.currentFileResource) ||\n\t\t\t\tthis.currentFileResource)+': '+this.filename);\n\t\t}));\n\t\t\n\t\t// Workaround for stylesheet directives in IE\n\t\tif (mxClient.IS_QUIRKS)\n\t\t{\n\t\t\tnew mxDivResizer(container);\n\t\t}\n\t}\n};\n\n/**\n * Function: setStatus\n * \n * Display the specified message in the status bar.\n * \n * Parameters:\n * \n * message - String the specified the message to\n * be displayed.\n */\nmxEditor.prototype.setStatus = function (message)\n{\n\tif (this.status != null && message != null)\n\t{\n\t\tthis.status.innerHTML = message;\n\t}\n};\n\n/**\n * Function: setTitleContainer\n * \n * Creates a listener to update the inner HTML of the\n * specified DOM node with the value of <getTitle>.\n * \n * Parameters:\n * \n * container - DOM node that will contain the title.\n */\nmxEditor.prototype.setTitleContainer = function (container)\n{\n\tthis.addListener(mxEvent.ROOT, mxUtils.bind(this, function(sender)\n\t{\n\t\tcontainer.innerHTML = this.getTitle();\n\t}));\n\n\t// Workaround for stylesheet directives in IE\n\tif (mxClient.IS_QUIRKS)\n\t{\n\t\tnew mxDivResizer(container);\n\t}\n};\n\n/**\n * Function: treeLayout\n * \n * Executes a vertical or horizontal compact tree layout\n * using the specified cell as an argument. The cell may\n * either be a group or the root of a tree.\n * \n * Parameters:\n * \n * cell - <mxCell> to use in the compact tree layout.\n * horizontal - Optional boolean to specify the tree's\n * orientation. Default is true.\n */\nmxEditor.prototype.treeLayout = function (cell, horizontal)\n{\n\tif (cell != null)\n\t{\n\t\tvar layout = new mxCompactTreeLayout(this.graph, horizontal);\n\t\tlayout.execute(cell);\n\t}\n};\n\n/**\n * Function: getTitle\n * \n * Returns the string value for the current root of the\n * diagram.\n */\nmxEditor.prototype.getTitle = function ()\n{\n\tvar title = '';\n\tvar graph = this.graph;\n\tvar cell = graph.getCurrentRoot();\n\t\n\twhile (cell != null &&\n\t\t   graph.getModel().getParent(\n\t\t\t\tgraph.getModel().getParent(cell)) != null)\n\t{\n\t\t// Append each label of a valid root\n\t\tif (graph.isValidRoot(cell))\n\t\t{\n\t\t\ttitle = ' > ' +\n\t\t\tgraph.convertValueToString(cell) + title;\n\t\t}\n\t\t\n\t\tcell = graph.getModel().getParent(cell);\n\t}\n\t\n\tvar prefix = this.getRootTitle();\n\t\n\treturn prefix + title;\n};\n\n/**\n * Function: getRootTitle\n * \n * Returns the string value of the root cell in\n * <mxGraph.model>.\n */\nmxEditor.prototype.getRootTitle = function ()\n{\n\tvar root = this.graph.getModel().getRoot();\n\treturn this.graph.convertValueToString(root);\n};\n\n/**\n * Function: undo\n * \n * Undo the last change in <graph>.\n */\nmxEditor.prototype.undo = function ()\n{\n\tthis.undoManager.undo();\n};\n\n/**\n * Function: redo\n * \n * Redo the last change in <graph>.\n */\nmxEditor.prototype.redo = function ()\n{\n\tthis.undoManager.redo();\n};\n\n/**\n * Function: groupCells\n * \n * Invokes <createGroup> to create a new group cell and the invokes\n * <mxGraph.groupCells>, using the grid size of the graph as the spacing\n * in the group's content area.\n */\nmxEditor.prototype.groupCells = function ()\n{\n\tvar border = (this.groupBorderSize != null) ?\n\t\tthis.groupBorderSize :\n\t\tthis.graph.gridSize;\n\treturn this.graph.groupCells(this.createGroup(), border);\n};\n\n/**\n * Function: createGroup\n * \n * Creates and returns a clone of <defaultGroup> to be used\n * as a new group cell in <group>.\n */\nmxEditor.prototype.createGroup = function ()\n{\n\tvar model = this.graph.getModel();\n\t\n\treturn model.cloneCell(this.defaultGroup);\n};\n\n/**\n * Function: open\n * \n * Opens the specified file synchronously and parses it using\n * <readGraphModel>. It updates <filename> and fires an <open>-event after\n * the file has been opened. Exceptions should be handled as follows:\n * \n * (code)\n * try\n * {\n *   editor.open(filename);\n * }\n * catch (e)\n * {\n *   mxUtils.error('Cannot open ' + filename +\n *     ': ' + e.message, 280, true);\n * }\n * (end)\n *\n * Parameters:\n * \n * filename - URL of the file to be opened.\n */\nmxEditor.prototype.open = function (filename)\n{\n\tif (filename != null)\n\t{\n\t\tvar xml = mxUtils.load(filename).getXml();\n\t\tthis.readGraphModel(xml.documentElement);\n\t\tthis.filename = filename;\n\t\t\n\t\tthis.fireEvent(new mxEventObject(mxEvent.OPEN, 'filename', filename));\n\t}\n};\n\n/**\n * Function: readGraphModel\n * \n * Reads the specified XML node into the existing graph model and resets\n * the command history and modified state.\n */\nmxEditor.prototype.readGraphModel = function (node)\n{\n\tvar dec = new mxCodec(node.ownerDocument);\n\tdec.decode(node, this.graph.getModel());\n\tthis.resetHistory();\n};\n\n/**\n * Function: save\n * \n * Posts the string returned by <writeGraphModel> to the given URL or the\n * URL returned by <getUrlPost>. The actual posting is carried out by\n * <postDiagram>. If the URL is null then the resulting XML will be\n * displayed using <mxUtils.popup>. Exceptions should be handled as\n * follows:\n * \n * (code)\n * try\n * {\n *   editor.save();\n * }\n * catch (e)\n * {\n *   mxUtils.error('Cannot save : ' + e.message, 280, true);\n * }\n * (end)\n */\nmxEditor.prototype.save = function (url, linefeed)\n{\n\t// Gets the URL to post the data to\n\turl = url || this.getUrlPost();\n\n\t// Posts the data if the URL is not empty\n\tif (url != null && url.length > 0)\n\t{\n\t\tvar data = this.writeGraphModel(linefeed);\n\t\tthis.postDiagram(url, data);\n\t\t\n\t\t// Resets the modified flag\n\t\tthis.setModified(false);\n\t}\n\t\n\t// Dispatches a save event\n\tthis.fireEvent(new mxEventObject(mxEvent.SAVE, 'url', url));\n};\n\n/**\n * Function: postDiagram\n * \n * Hook for subclassers to override the posting of a diagram\n * represented by the given node to the given URL. This fires\n * an asynchronous <post> event if the diagram has been posted.\n * \n * Example:\n * \n * To replace the diagram with the diagram in the response, use the\n * following code.\n * \n * (code)\n * editor.addListener(mxEvent.POST, function(sender, evt)\n * {\n *   // Process response (replace diagram)\n *   var req = evt.getProperty('request');\n *   var root = req.getDocumentElement();\n *   editor.graph.readGraphModel(root)\n * });\n * (end)\n */\nmxEditor.prototype.postDiagram = function (url, data)\n{\n\tif (this.escapePostData)\n\t{\n\t\tdata = encodeURIComponent(data);\n\t}\n\n\tmxUtils.post(url, this.postParameterName+'='+data,\n\t\tmxUtils.bind(this, function(req)\n\t\t{\n\t\t\tthis.fireEvent(new mxEventObject(mxEvent.POST,\n\t\t\t\t'request', req, 'url', url, 'data', data));\n\t\t})\n\t);\n};\n\n/**\n * Function: writeGraphModel\n * \n * Hook to create the string representation of the diagram. The default\n * implementation uses an <mxCodec> to encode the graph model as\n * follows:\n * \n * (code)\n * var enc = new mxCodec();\n * var node = enc.encode(this.graph.getModel());\n * return mxUtils.getXml(node, this.linefeed);\n * (end)\n * \n * Parameters:\n * \n * linefeed - Optional character to be used as the linefeed. Default is\n * <linefeed>.\n */\nmxEditor.prototype.writeGraphModel = function (linefeed)\n{\n\tlinefeed = (linefeed != null) ? linefeed : this.linefeed;\n\tvar enc = new mxCodec();\n\tvar node = enc.encode(this.graph.getModel());\n\n\treturn mxUtils.getXml(node, linefeed);\n};\n\n/**\n * Function: getUrlPost\n * \n * Returns the URL to post the diagram to. This is used\n * in <save>. The default implementation returns <urlPost>,\n * adding <code>?draft=true</code>.\n */\nmxEditor.prototype.getUrlPost = function ()\n{\n\treturn this.urlPost;\n};\n\n/**\n * Function: getUrlImage\n * \n * Returns the URL to create the image with. This is typically\n * the URL of a backend which accepts an XML representation\n * of a graph view to create an image. The function is used\n * in the image action to create an image. This implementation\n * returns <urlImage>.\n */\nmxEditor.prototype.getUrlImage = function ()\n{\n\treturn this.urlImage;\n};\n\n/**\n * Function: swapStyles\n * \n * Swaps the styles for the given names in the graph's\n * stylesheet and refreshes the graph.\n */\nmxEditor.prototype.swapStyles = function (first, second)\n{\n\tvar style = this.graph.getStylesheet().styles[second];\n\tthis.graph.getView().getStylesheet().putCellStyle(\n\t\tsecond, this.graph.getStylesheet().styles[first]);\n\tthis.graph.getStylesheet().putCellStyle(first, style);\n\tthis.graph.refresh();\n};\n\n/**\n * Function: showProperties\n * \n * Creates and shows the properties dialog for the given\n * cell. The content area of the dialog is created using\n * <createProperties>.\n */\nmxEditor.prototype.showProperties = function (cell)\n{\n\tcell = cell || this.graph.getSelectionCell();\n\t\n\t// Uses the root node for the properties dialog\n\t// if not cell was passed in and no cell is\n\t// selected\n\tif (cell == null)\n\t{\n\t\tcell = this.graph.getCurrentRoot();\n\t\t\n\t\tif (cell == null)\n\t\t{\n\t\t\tcell = this.graph.getModel().getRoot();\n\t\t}\n\t}\n\t\n\tif (cell != null)\n\t{\n\t\t// Makes sure there is no in-place editor in the\n\t\t// graph and computes the location of the dialog\n\t\tthis.graph.stopEditing(true);\n\n\t\tvar offset = mxUtils.getOffset(this.graph.container);\n\t\tvar x = offset.x+10;\n\t\tvar y = offset.y;\n\t\t\n\t\t// Avoids moving the dialog if it is alredy open\n\t\tif (this.properties != null && !this.movePropertiesDialog)\n\t\t{\n\t\t\tx = this.properties.getX();\n\t\t\ty = this.properties.getY();\n\t\t}\n\t\t\n\t\t// Places the dialog near the cell for which it\n\t\t// displays the properties\n\t\telse\n\t\t{\n\t\t\tvar bounds = this.graph.getCellBounds(cell);\n\t\t\t\n\t\t\tif (bounds != null)\n\t\t\t{\n\t\t\t\tx += bounds.x+Math.min(200, bounds.width);\n\t\t\t\ty += bounds.y;\t\t\t\t\n\t\t\t}\t\t\t\n\t\t}\n\t\t\n\t\t// Hides the existing properties dialog and creates a new one with the\n\t\t// contents created in the hook method\n\t\tthis.hideProperties();\n\t\tvar node = this.createProperties(cell);\n\t\t\n\t\tif (node != null)\n\t\t{\n\t\t\t// Displays the contents in a window and stores a reference to the\n\t\t\t// window for later hiding of the window\n\t\t\tthis.properties = new mxWindow(mxResources.get(this.propertiesResource) ||\n\t\t\t\tthis.propertiesResource, node, x, y, this.propertiesWidth, this.propertiesHeight, false);\n\t\t\tthis.properties.setVisible(true);\n\t\t}\n\t}\n};\n\n/**\n * Function: isPropertiesVisible\n * \n * Returns true if the properties dialog is currently visible.\n */\nmxEditor.prototype.isPropertiesVisible = function ()\n{\n\treturn this.properties != null;\n};\n\n/**\n * Function: createProperties\n * \n * Creates and returns the DOM node that represents the contents\n * of the properties dialog for the given cell. This implementation\n * works for user objects that are XML nodes and display all the\n * node attributes in a form.\n */\nmxEditor.prototype.createProperties = function (cell)\n{\n\tvar model = this.graph.getModel();\n\tvar value = model.getValue(cell);\n\t\n\tif (mxUtils.isNode(value))\n\t{\n\t\t// Creates a form for the user object inside\n\t\t// the cell\n\t\tvar form = new mxForm('properties');\n\t\t\n\t\t// Adds a readonly field for the cell id\n\t\tvar id = form.addText('ID', cell.getId());\n\t\tid.setAttribute('readonly', 'true');\n\n\t\tvar geo = null;\n\t\tvar yField = null;\n\t\tvar xField = null;\n\t\tvar widthField = null;\n\t\tvar heightField = null;\n\n\t\t// Adds fields for the location and size\n\t\tif (model.isVertex(cell))\n\t\t{\n\t\t\tgeo = model.getGeometry(cell);\n\t\t\t\n\t\t\tif (geo != null)\n\t\t\t{\n\t\t\t\tyField = form.addText('top', geo.y);\n\t\t\t\txField = form.addText('left', geo.x);\n\t\t\t\twidthField = form.addText('width', geo.width);\n\t\t\t\theightField = form.addText('height', geo.height);\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Adds a field for the cell style\t\t\t\n\t\tvar tmp = model.getStyle(cell);\n\t\tvar style = form.addText('Style', tmp || '');\n\t\t\n\t\t// Creates textareas for each attribute of the\n\t\t// user object within the cell\n\t\tvar attrs = value.attributes;\n\t\tvar texts = [];\n\t\t\n\t\tfor (var i = 0; i < attrs.length; i++)\n\t\t{\n\t\t\t// Creates a textarea with more lines for\n\t\t\t// the cell label\n\t\t\tvar val = attrs[i].value;\n\t\t\ttexts[i] = form.addTextarea(attrs[i].nodeName, val,\n\t\t\t\t(attrs[i].nodeName == 'label') ? 4 : 2);\n\t\t}\n\t\t\n\t\t// Adds an OK and Cancel button to the dialog\n\t\t// contents and implements the respective\n\t\t// actions below\n\t\t\n\t\t// Defines the function to be executed when the\n\t\t// OK button is pressed in the dialog\n\t\tvar okFunction = mxUtils.bind(this, function()\n\t\t{\n\t\t\t// Hides the dialog\n\t\t\tthis.hideProperties();\n\t\t\t\n\t\t\t// Supports undo for the changes on the underlying\n\t\t\t// XML structure / XML node attribute changes.\n\t\t\tmodel.beginUpdate();\n\t\t\ttry\n\t\t\t{\n\t\t\t\tif (geo != null)\n\t\t\t\t{\n\t\t\t\t\tgeo = geo.clone();\n\t\t\t\t\t\n\t\t\t\t\tgeo.x = parseFloat(xField.value);\n\t\t\t\t\tgeo.y = parseFloat(yField.value);\n\t\t\t\t\tgeo.width = parseFloat(widthField.value);\n\t\t\t\t\tgeo.height = parseFloat(heightField.value);\n\t\t\t\t\t\n\t\t\t\t\tmodel.setGeometry(cell, geo);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// Applies the style\n\t\t\t\tif (style.value.length > 0)\n\t\t\t\t{\n\t\t\t\t\tmodel.setStyle(cell, style.value);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tmodel.setStyle(cell, null);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// Creates an undoable change for each\n\t\t\t\t// attribute and executes it using the\n\t\t\t\t// model, which will also make the change\n\t\t\t\t// part of the current transaction\n\t\t\t\tfor (var i=0; i<attrs.length; i++)\n\t\t\t\t{\n\t\t\t\t\tvar edit = new mxCellAttributeChange(\n\t\t\t\t\t\tcell, attrs[i].nodeName,\n\t\t\t\t\t\ttexts[i].value);\n\t\t\t\t\tmodel.execute(edit);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// Checks if the graph wants cells to \n\t\t\t\t// be automatically sized and updates\n\t\t\t\t// the size as an undoable step if\n\t\t\t\t// the feature is enabled\n\t\t\t\tif (this.graph.isAutoSizeCell(cell))\n\t\t\t\t{\n\t\t\t\t\tthis.graph.updateCellSize(cell);\n\t\t\t\t}\n\t\t\t}\n\t\t\tfinally\n\t\t\t{\n\t\t\t\tmodel.endUpdate();\n\t\t\t}\n\t\t});\n\t\t\n\t\t// Defines the function to be executed when the\n\t\t// Cancel button is pressed in the dialog\n\t\tvar cancelFunction = mxUtils.bind(this, function()\n\t\t{\n\t\t\t// Hides the dialog\n\t\t\tthis.hideProperties();\n\t\t});\n\t\t\n\t\tform.addButtons(okFunction, cancelFunction);\n\t\t\n\t\treturn form.table;\n\t}\n\n\treturn null;\n};\n\n/**\n * Function: hideProperties\n * \n * Hides the properties dialog.\n */\nmxEditor.prototype.hideProperties = function ()\n{\n\tif (this.properties != null)\n\t{\n\t\tthis.properties.destroy();\n\t\tthis.properties = null;\n\t}\n};\n\n/**\n * Function: showTasks\n * \n * Shows the tasks window. The tasks window is created using <createTasks>. The\n * default width of the window is 200 pixels, the y-coordinate of the location\n * can be specifies in <tasksTop> and the x-coordinate is right aligned with a\n * 20 pixel offset from the right border. To change the location of the tasks\n * window, the following code can be used:\n * \n * (code)\n * var oldShowTasks = mxEditor.prototype.showTasks;\n * mxEditor.prototype.showTasks = function()\n * {\n *   oldShowTasks.apply(this, arguments); // \"supercall\"\n *   \n *   if (this.tasks != null)\n *   {\n *     this.tasks.setLocation(10, 10);\n *   }\n * };\n * (end)\n */\nmxEditor.prototype.showTasks = function ()\n{\n\tif (this.tasks == null)\n\t{\n\t\tvar div = document.createElement('div');\n\t\tdiv.style.padding = '4px';\n\t\tdiv.style.paddingLeft = '20px';\n\t\tvar w = document.body.clientWidth;\n\t\tvar wnd = new mxWindow(\n\t\t\tmxResources.get(this.tasksResource) ||\n\t\t\tthis.tasksResource,\n\t\t\tdiv, w - 220, this.tasksTop, 200);\n\t\twnd.setClosable(true);\n\t\twnd.destroyOnClose = false;\n\t\t\n\t\t// Installs a function to update the contents\n\t\t// of the tasks window on every change of the\n\t\t// model, selection or root.\n\t\tvar funct = mxUtils.bind(this, function(sender)\n\t\t{\n\t\t\tmxEvent.release(div);\n\t\t\tdiv.innerHTML = '';\n\t\t\tthis.createTasks(div);\n\t\t});\n\t\t\n\t\tthis.graph.getModel().addListener(mxEvent.CHANGE, funct);\n\t\tthis.graph.getSelectionModel().addListener(mxEvent.CHANGE, funct);\n\t\tthis.graph.addListener(mxEvent.ROOT, funct);\n\t\t\n\t\t// Assigns the icon to the tasks window\n\t\tif (this.tasksWindowImage != null)\n\t\t{\n\t\t\twnd.setImage(this.tasksWindowImage);\n\t\t}\n\t\t\n\t\tthis.tasks = wnd;\n\t\tthis.createTasks(div);\n\t}\n\t\n\tthis.tasks.setVisible(true);\n};\n\t\t\n/**\n * Function: refreshTasks\n * \n * Updates the contents of the tasks window using <createTasks>.\n */\nmxEditor.prototype.refreshTasks = function (div)\n{\n\tif (this.tasks != null)\n\t{\n\t\tvar div = this.tasks.content;\n\t\tmxEvent.release(div);\n\t\tdiv.innerHTML = '';\n\t\tthis.createTasks(div);\n\t}\n};\n\t\t\n/**\n * Function: createTasks\n * \n * Updates the contents of the given DOM node to\n * display the tasks associated with the current\n * editor state. This is invoked whenever there\n * is a possible change of state in the editor.\n * Default implementation is empty.\n */\nmxEditor.prototype.createTasks = function (div)\n{\n\t// override\n};\n\t\n/**\n * Function: showHelp\n * \n * Shows the help window. If the help window does not exist\n * then it is created using an iframe pointing to the resource\n * for the <code>urlHelp</code> key or <urlHelp> if the resource\n * is undefined.\n */\nmxEditor.prototype.showHelp = function (tasks)\n{\n\tif (this.help == null)\n\t{\n\t\tvar frame = document.createElement('iframe');\n\t\tframe.setAttribute('src', mxResources.get('urlHelp') || this.urlHelp);\n\t\tframe.setAttribute('height', '100%');\n\t\tframe.setAttribute('width', '100%');\n\t\tframe.setAttribute('frameBorder', '0');\n\t\tframe.style.backgroundColor = 'white';\n\t\n\t\tvar w = document.body.clientWidth;\n\t\tvar h = (document.body.clientHeight || document.documentElement.clientHeight);\n\t\t\n\t\tvar wnd = new mxWindow(mxResources.get(this.helpResource) || this.helpResource,\n\t\t\tframe, (w-this.helpWidth)/2, (h-this.helpHeight)/3, this.helpWidth, this.helpHeight);\n\t\twnd.setMaximizable(true);\n\t\twnd.setClosable(true);\n\t\twnd.destroyOnClose = false;\n\t\twnd.setResizable(true);\n\n\t\t// Assigns the icon to the help window\n\t\tif (this.helpWindowImage != null)\n\t\t{\n\t\t\twnd.setImage(this.helpWindowImage);\n\t\t}\n\t\t\n\t\t// Workaround for ignored iframe height 100% in FF\n\t\tif (mxClient.IS_NS)\n\t\t{\n\t\t\tvar handler = function(sender)\n\t\t\t{\n\t\t\t\tvar h = wnd.div.offsetHeight;\n\t\t\t\tframe.setAttribute('height', (h-26)+'px');\n\t\t\t};\n\t\t\t\n\t\t\twnd.addListener(mxEvent.RESIZE_END, handler);\n\t\t\twnd.addListener(mxEvent.MAXIMIZE, handler);\n\t\t\twnd.addListener(mxEvent.NORMALIZE, handler);\n\t\t\twnd.addListener(mxEvent.SHOW, handler);\n\t\t}\n\t\t\n\t\tthis.help = wnd;\n\t}\n\t\n\tthis.help.setVisible(true);\n};\n\n/**\n * Function: showOutline\n * \n * Shows the outline window. If the window does not exist, then it is\n * created using an <mxOutline>.\n */\nmxEditor.prototype.showOutline = function ()\n{\n\tvar create = this.outline == null;\n\t\n\tif (create)\n\t{\n\t\tvar div = document.createElement('div');\n\t\t\n\t\tdiv.style.overflow = 'hidden';\n\t\tdiv.style.position = 'relative';\n\t\tdiv.style.width = '100%';\n\t\tdiv.style.height = '100%';\n\t\tdiv.style.background = 'white';\n\t\tdiv.style.cursor = 'move';\n\t\t\n\t\tif (document.documentMode == 8)\n\t\t{\n\t\t\tdiv.style.filter = 'progid:DXImageTransform.Microsoft.alpha(opacity=100)';\n\t\t}\n\t\t\n\t\tvar wnd = new mxWindow(\n\t\t\tmxResources.get(this.outlineResource) ||\n\t\t\tthis.outlineResource,\n\t\t\tdiv, 600, 480, 200, 200, false);\n\t\t\t\t\n\t\t// Creates the outline in the specified div\n\t\t// and links it to the existing graph\n\t\tvar outline = new mxOutline(this.graph, div);\t\t\t\n\t\twnd.setClosable(true);\n\t\twnd.setResizable(true);\n\t\twnd.destroyOnClose = false;\n\t\t\n\t\twnd.addListener(mxEvent.RESIZE_END, function()\n\t\t{\n\t\t\toutline.update();\n\t\t});\n\t\t\n\t\tthis.outline = wnd;\n\t\tthis.outline.outline = outline;\n\t}\n\t\n\t// Finally shows the outline\n\tthis.outline.setVisible(true);\n\tthis.outline.outline.update(true);\n};\n\t\t\n/**\n * Function: setMode\n *\n * Puts the graph into the specified mode. The following modenames are\n * supported:\n * \n * select - Selects using the left mouse button, new connections\n * are disabled.\n * connect - Selects using the left mouse button or creates new\n * connections if mouse over cell hotspot. See <mxConnectionHandler>.\n * pan - Pans using the left mouse button, new connections are disabled.\n */\nmxEditor.prototype.setMode = function(modename)\n{\n\tif (modename == 'select')\n\t{\n\t\tthis.graph.panningHandler.useLeftButtonForPanning = false;\n\t\tthis.graph.setConnectable(false);\n\t}\n\telse if (modename == 'connect')\n\t{\n\t\tthis.graph.panningHandler.useLeftButtonForPanning = false;\n\t\tthis.graph.setConnectable(true);\n\t}\n\telse if (modename == 'pan')\n\t{\n\t\tthis.graph.panningHandler.useLeftButtonForPanning = true;\n\t\tthis.graph.setConnectable(false);\n\t}\n};\n\n/**\n * Function: createPopupMenu\n * \n * Uses <popupHandler> to create the menu in the graph's\n * panning handler. The redirection is setup in\n * <setToolbarContainer>.\n */\nmxEditor.prototype.createPopupMenu = function (menu, cell, evt)\n{\n\tthis.popupHandler.createMenu(this, menu, cell, evt);\n};\n\n/**\n * Function: createEdge\n * \n * Uses <defaultEdge> as the prototype for creating new edges\n * in the connection handler of the graph. The style of the\n * edge will be overridden with the value returned by\n * <getEdgeStyle>.\n */\nmxEditor.prototype.createEdge = function (source, target)\n{\n\t// Clones the defaultedge prototype\n\tvar e = null;\n\t\n\tif (this.defaultEdge != null)\n\t{\n\t\tvar model = this.graph.getModel();\n\t\te = model.cloneCell(this.defaultEdge);\n\t}\n\telse\n\t{\n\t\te = new mxCell('');\n\t\te.setEdge(true);\n\t\t\n\t\tvar geo = new mxGeometry();\n\t\tgeo.relative = true;\n\t\te.setGeometry(geo);\n\t}\n\t\n\t// Overrides the edge style\n\tvar style = this.getEdgeStyle();\n\t\n\tif (style != null)\n\t{\n\t\te.setStyle(style);\n\t}\n\t\n\treturn e;\n};\n\n/**\n * Function: getEdgeStyle\n * \n * Returns a string identifying the style of new edges.\n * The function is used in <createEdge> when new edges\n * are created in the graph.\n */\nmxEditor.prototype.getEdgeStyle = function ()\n{\n\treturn this.defaultEdgeStyle;\n};\n\n/**\n * Function: consumeCycleAttribute\n * \n * Returns the next attribute in <cycleAttributeValues>\n * or null, if not attribute should be used in the\n * specified cell.\n */\nmxEditor.prototype.consumeCycleAttribute = function (cell)\n{\n\treturn (this.cycleAttributeValues != null &&\n\t\tthis.cycleAttributeValues.length > 0 &&\n\t\tthis.graph.isSwimlane(cell)) ?\n\t\tthis.cycleAttributeValues[this.cycleAttributeIndex++ %\n\t\t\tthis.cycleAttributeValues.length] : null;\n};\n\n/**\n * Function: cycleAttribute\n * \n * Uses the returned value from <consumeCycleAttribute>\n * as the value for the <cycleAttributeName> key in\n * the given cell's style.\n */\nmxEditor.prototype.cycleAttribute = function (cell)\n{\n\tif (this.cycleAttributeName != null)\n\t{\n\t\tvar value = this.consumeCycleAttribute(cell);\n\t\t\n\t\tif (value != null)\n\t\t{\n\t\t\tcell.setStyle(cell.getStyle()+';'+\n\t\t\t\tthis.cycleAttributeName+'='+value);\n\t\t}\n\t}\n};\n\n/**\n * Function: addVertex\n * \n * Adds the given vertex as a child of parent at the specified\n * x and y coordinate and fires an <addVertex> event.\n */\nmxEditor.prototype.addVertex = function (parent, vertex, x, y)\n{\n\tvar model = this.graph.getModel();\n\t\n\twhile (parent != null && !this.graph.isValidDropTarget(parent))\n\t{\n\t\tparent = model.getParent(parent);\n\t}\n\t\n\tparent = (parent != null) ? parent : this.graph.getSwimlaneAt(x, y);\n\tvar scale = this.graph.getView().scale;\n\t\n\tvar geo = model.getGeometry(vertex);\n\tvar pgeo = model.getGeometry(parent);\n\t\n\tif (this.graph.isSwimlane(vertex) &&\n\t\t!this.graph.swimlaneNesting)\n\t{\n\t\tparent = null;\n\t}\n\telse if (parent == null && this.swimlaneRequired)\n\t{\n\t\treturn null;\n\t}\n\telse if (parent != null && pgeo != null)\n\t{\n\t\t// Keeps vertex inside parent\n\t\tvar state = this.graph.getView().getState(parent);\n\t\t\n\t\tif (state != null)\n\t\t{\t\t\t\n\t\t\tx -= state.origin.x * scale;\n\t\t\ty -= state.origin.y * scale;\n\t\t\t\n\t\t\tif (this.graph.isConstrainedMoving)\n\t\t\t{\n\t\t\t\tvar width = geo.width;\n\t\t\t\tvar height = geo.height;\t\t\t\t\n\t\t\t\tvar tmp = state.x+state.width;\n\t\t\t\t\n\t\t\t\tif (x+width > tmp)\n\t\t\t\t{\n\t\t\t\t\tx -= x+width - tmp;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\ttmp = state.y+state.height;\n\t\t\t\t\n\t\t\t\tif (y+height > tmp)\n\t\t\t\t{\n\t\t\t\t\ty -= y+height - tmp;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse if (pgeo != null)\n\t\t{\n\t\t\tx -= pgeo.x*scale;\n\t\t\ty -= pgeo.y*scale;\n\t\t}\n\t}\n\t\n\tgeo = geo.clone();\n\tgeo.x = this.graph.snap(x / scale -\n\t\tthis.graph.getView().translate.x -\n\t\tthis.graph.gridSize/2);\n\tgeo.y = this.graph.snap(y / scale -\n\t\tthis.graph.getView().translate.y -\n\t\tthis.graph.gridSize/2);\n\tvertex.setGeometry(geo);\n\t\n\tif (parent == null)\n\t{\n\t\tparent = this.graph.getDefaultParent();\n\t}\n\n\tthis.cycleAttribute(vertex);\n\tthis.fireEvent(new mxEventObject(mxEvent.BEFORE_ADD_VERTEX,\n\t\t\t'vertex', vertex, 'parent', parent));\n\n\tmodel.beginUpdate();\n\ttry\n\t{\n\t\tvertex = this.graph.addCell(vertex, parent);\n\t\t\n\t\tif (vertex != null)\n\t\t{\n\t\t\tthis.graph.constrainChild(vertex);\n\t\t\t\n\t\t\tthis.fireEvent(new mxEventObject(mxEvent.ADD_VERTEX, 'vertex', vertex));\n\t\t}\n\t}\n\tfinally\n\t{\n\t\tmodel.endUpdate();\n\t}\n\t\n\tif (vertex != null)\n\t{\n\t\tthis.graph.setSelectionCell(vertex);\n\t\tthis.graph.scrollCellToVisible(vertex);\n\t\tthis.fireEvent(new mxEventObject(mxEvent.AFTER_ADD_VERTEX, 'vertex', vertex));\n\t}\n\t\n\treturn vertex;\n};\n\n/**\n * Function: destroy\n * \n * Removes the editor and all its associated resources. This does not\n * normally need to be called, it is called automatically when the window\n * unloads.\n */\nmxEditor.prototype.destroy = function ()\n{\n\tif (!this.destroyed)\n\t{\n\t\tthis.destroyed = true;\n\n\t\tif (this.tasks != null)\n\t\t{\n\t\t\tthis.tasks.destroy();\n\t\t}\n\t\t\n\t\tif (this.outline != null)\n\t\t{\n\t\t\tthis.outline.destroy();\n\t\t}\n\t\t\n\t\tif (this.properties != null)\n\t\t{\n\t\t\tthis.properties.destroy();\n\t\t}\n\t\t\n\t\tif (this.keyHandler != null)\n\t\t{\n\t\t\tthis.keyHandler.destroy();\n\t\t}\n\t\t\n\t\tif (this.rubberband != null)\n\t\t{\n\t\t\tthis.rubberband.destroy();\n\t\t}\n\t\t\n\t\tif (this.toolbar != null)\n\t\t{\n\t\t\tthis.toolbar.destroy();\n\t\t}\n\t\t\n\t\tif (this.graph != null)\n\t\t{\n\t\t\tthis.graph.destroy();\n\t\t}\n\t\n\t\tthis.status = null;\n\t\tthis.templates = null;\n\t}\n};\n"
  },
  {
    "path": "static/cherry/drawio_demo/src/js/handler/mxCellHighlight.js",
    "content": "/**\n * Copyright (c) 2006-2015, JGraph Ltd\n * Copyright (c) 2006-2015, Gaudenz Alder\n */\n/**\n * Class: mxCellHighlight\n * \n * A helper class to highlight cells. Here is an example for a given cell.\n * \n * (code)\n * var highlight = new mxCellHighlight(graph, '#ff0000', 2);\n * highlight.highlight(graph.view.getState(cell)));\n * (end)\n * \n * Constructor: mxCellHighlight\n * \n * Constructs a cell highlight.\n */\nfunction mxCellHighlight(graph, highlightColor, strokeWidth, dashed)\n{\n\tif (graph != null)\n\t{\n\t\tthis.graph = graph;\n\t\tthis.highlightColor = (highlightColor != null) ? highlightColor : mxConstants.DEFAULT_VALID_COLOR;\n\t\tthis.strokeWidth = (strokeWidth != null) ? strokeWidth : mxConstants.HIGHLIGHT_STROKEWIDTH;\n\t\tthis.dashed = (dashed != null) ? dashed : false;\n\t\tthis.opacity = mxConstants.HIGHLIGHT_OPACITY;\n\n\t\t// Updates the marker if the graph changes\n\t\tthis.repaintHandler = mxUtils.bind(this, function()\n\t\t{\n\t\t\t// Updates reference to state\n\t\t\tif (this.state != null)\n\t\t\t{\n\t\t\t\tvar tmp = this.graph.view.getState(this.state.cell);\n\t\t\t\t\n\t\t\t\tif (tmp == null)\n\t\t\t\t{\n\t\t\t\t\tthis.hide();\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tthis.state = tmp;\n\t\t\t\t\tthis.repaint();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\tthis.graph.getView().addListener(mxEvent.SCALE, this.repaintHandler);\n\t\tthis.graph.getView().addListener(mxEvent.TRANSLATE, this.repaintHandler);\n\t\tthis.graph.getView().addListener(mxEvent.SCALE_AND_TRANSLATE, this.repaintHandler);\n\t\tthis.graph.getModel().addListener(mxEvent.CHANGE, this.repaintHandler);\n\t\t\n\t\t// Hides the marker if the current root changes\n\t\tthis.resetHandler = mxUtils.bind(this, function()\n\t\t{\n\t\t\tthis.hide();\n\t\t});\n\n\t\tthis.graph.getView().addListener(mxEvent.DOWN, this.resetHandler);\n\t\tthis.graph.getView().addListener(mxEvent.UP, this.resetHandler);\n\t}\n};\n\n/**\n * Variable: keepOnTop\n * \n * Specifies if the highlights should appear on top of everything\n * else in the overlay pane. Default is false.\n */\nmxCellHighlight.prototype.keepOnTop = false;\n\n/**\n * Variable: graph\n * \n * Reference to the enclosing <mxGraph>.\n */\nmxCellHighlight.prototype.graph = true;\n\n/**\n * Variable: state\n * \n * Reference to the <mxCellState>.\n */\nmxCellHighlight.prototype.state = null;\n\n/**\n * Variable: spacing\n * \n * Specifies the spacing between the highlight for vertices and the vertex.\n * Default is 2.\n */\nmxCellHighlight.prototype.spacing = 2;\n\n/**\n * Variable: resetHandler\n * \n * Holds the handler that automatically invokes reset if the highlight\n * should be hidden.\n */\nmxCellHighlight.prototype.resetHandler = null;\n\n/**\n * Function: setHighlightColor\n * \n * Sets the color of the rectangle used to highlight drop targets.\n * \n * Parameters:\n * \n * color - String that represents the new highlight color.\n */\nmxCellHighlight.prototype.setHighlightColor = function(color)\n{\n\tthis.highlightColor = color;\n\t\n\tif (this.shape != null)\n\t{\n\t\tthis.shape.stroke = color;\n\t}\n};\n\n/**\n * Function: drawHighlight\n * \n * Creates and returns the highlight shape for the given state.\n */\nmxCellHighlight.prototype.drawHighlight = function()\n{\n\tthis.shape = this.createShape();\n\tthis.repaint();\n\n\tif (!this.keepOnTop && this.shape.node.parentNode.firstChild != this.shape.node)\n\t{\n\t\tthis.shape.node.parentNode.insertBefore(this.shape.node, this.shape.node.parentNode.firstChild);\n\t}\n};\n\n/**\n * Function: createShape\n * \n * Creates and returns the highlight shape for the given state.\n */\nmxCellHighlight.prototype.createShape = function()\n{\n\tvar shape = this.graph.cellRenderer.createShape(this.state);\n\t\n\tshape.svgStrokeTolerance = this.graph.tolerance;\n\tshape.points = this.state.absolutePoints;\n\tshape.apply(this.state);\n\tshape.stroke = this.highlightColor;\n\tshape.opacity = this.opacity;\n\tshape.isDashed = this.dashed;\n\tshape.isShadow = false;\n\t\n\tshape.dialect = (this.graph.dialect != mxConstants.DIALECT_SVG) ? mxConstants.DIALECT_VML : mxConstants.DIALECT_SVG;\n\tshape.init(this.graph.getView().getOverlayPane());\n\tmxEvent.redirectMouseEvents(shape.node, this.graph, this.state);\n\t\n\tif (this.graph.dialect != mxConstants.DIALECT_SVG)\n\t{\n\t\tshape.pointerEvents = false;\n\t}\n\telse\n\t{\n\t\tshape.svgPointerEvents = 'stroke';\n\t}\n\t\n\treturn shape;\n};\n\n/**\n * Function: repaint\n * \n * Updates the highlight after a change of the model or view.\n */\nmxCellHighlight.prototype.getStrokeWidth = function(state)\n{\n\treturn this.strokeWidth;\n};\n\n/**\n * Function: repaint\n * \n * Updates the highlight after a change of the model or view.\n */\nmxCellHighlight.prototype.repaint = function()\n{\n\tif (this.state != null && this.shape != null)\n\t{\n\t\tthis.shape.scale = this.state.view.scale;\n\t\t\n\t\tif (this.graph.model.isEdge(this.state.cell))\n\t\t{\n\t\t\tthis.shape.strokewidth = this.getStrokeWidth();\n\t\t\tthis.shape.points = this.state.absolutePoints;\n\t\t\tthis.shape.outline = false;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tthis.shape.bounds = new mxRectangle(this.state.x - this.spacing, this.state.y - this.spacing,\n\t\t\t\t\tthis.state.width + 2 * this.spacing, this.state.height + 2 * this.spacing);\n\t\t\tthis.shape.rotation = Number(this.state.style[mxConstants.STYLE_ROTATION] || '0');\n\t\t\tthis.shape.strokewidth = this.getStrokeWidth() / this.state.view.scale;\n\t\t\tthis.shape.outline = true;\n\t\t}\n\n\t\t// Uses cursor from shape in highlight\n\t\tif (this.state.shape != null)\n\t\t{\n\t\t\tthis.shape.setCursor(this.state.shape.getCursor());\n\t\t}\n\t\t\n\t\t// Workaround for event transparency in VML with transparent color\n\t\t// is to use a non-transparent color with near zero opacity\n\t\tif (mxClient.IS_QUIRKS || document.documentMode == 8)\n\t\t{\n\t\t\tif (this.shape.stroke == 'transparent')\n\t\t\t{\n\t\t\t\t// KNOWN: Quirks mode does not seem to catch events if\n\t\t\t\t// we do not force an update of the DOM via a change such\n\t\t\t\t// as mxLog.debug. Since IE6 is EOL we do not add a fix.\n\t\t\t\tthis.shape.stroke = 'white';\n\t\t\t\tthis.shape.opacity = 1;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tthis.shape.opacity = this.opacity;\n\t\t\t}\n\t\t}\n\t\t\n\t\tthis.shape.redraw();\n\t}\n};\n\n/**\n * Function: hide\n * \n * Resets the state of the cell marker.\n */\nmxCellHighlight.prototype.hide = function()\n{\n\tthis.highlight(null);\n};\n\n/**\n * Function: mark\n * \n * Marks the <markedState> and fires a <mark> event.\n */\nmxCellHighlight.prototype.highlight = function(state)\n{\n\tif (this.state != state)\n\t{\n\t\tif (this.shape != null)\n\t\t{\n\t\t\tthis.shape.destroy();\n\t\t\tthis.shape = null;\n\t\t}\n\n\t\tthis.state = state;\n\t\t\n\t\tif (this.state != null)\n\t\t{\n\t\t\tthis.drawHighlight();\n\t\t}\n\t}\n};\n\n/**\n * Function: isHighlightAt\n * \n * Returns true if this highlight is at the given position.\n */\nmxCellHighlight.prototype.isHighlightAt = function(x, y)\n{\n\tvar hit = false;\n\t\n\t// Quirks mode is currently not supported as it used a different coordinate system\n\tif (this.shape != null && document.elementFromPoint != null && !mxClient.IS_QUIRKS)\n\t{\n\t\tvar elt = document.elementFromPoint(x, y);\n\n\t\twhile (elt != null)\n\t\t{\n\t\t\tif (elt == this.shape.node)\n\t\t\t{\n\t\t\t\thit = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\telt = elt.parentNode;\n\t\t}\n\t}\n\t\n\treturn hit;\n};\n\n/**\n * Function: destroy\n * \n * Destroys the handler and all its resources and DOM nodes.\n */\nmxCellHighlight.prototype.destroy = function()\n{\n\tthis.graph.getView().removeListener(this.resetHandler);\n\tthis.graph.getView().removeListener(this.repaintHandler);\n\tthis.graph.getModel().removeListener(this.repaintHandler);\n\t\n\tif (this.shape != null)\n\t{\n\t\tthis.shape.destroy();\n\t\tthis.shape = null;\n\t}\n};\n"
  },
  {
    "path": "static/cherry/drawio_demo/src/js/handler/mxCellMarker.js",
    "content": "/**\n * Copyright (c) 2006-2015, JGraph Ltd\n * Copyright (c) 2006-2015, Gaudenz Alder\n */\n/**\n * Class: mxCellMarker\n * \n * A helper class to process mouse locations and highlight cells.\n * \n * Helper class to highlight cells. To add a cell marker to an existing graph\n * for highlighting all cells, the following code is used:\n * \n * (code)\n * var marker = new mxCellMarker(graph);\n * graph.addMouseListener({\n *   mouseDown: function() {},\n *   mouseMove: function(sender, me)\n *   {\n *     marker.process(me);\n *   },\n *   mouseUp: function() {}\n * });\n * (end)\n *\n * Event: mxEvent.MARK\n * \n * Fires after a cell has been marked or unmarked. The <code>state</code>\n * property contains the marked <mxCellState> or null if no state is marked.\n * \n * Constructor: mxCellMarker\n * \n * Constructs a new cell marker.\n * \n * Parameters:\n * \n * graph - Reference to the enclosing <mxGraph>.\n * validColor - Optional marker color for valid states. Default is\n * <mxConstants.DEFAULT_VALID_COLOR>.\n * invalidColor - Optional marker color for invalid states. Default is\n * <mxConstants.DEFAULT_INVALID_COLOR>.\n * hotspot - Portion of the width and hight where a state intersects a\n * given coordinate pair. A value of 0 means always highlight. Default is\n * <mxConstants.DEFAULT_HOTSPOT>.\n */\nfunction mxCellMarker(graph, validColor, invalidColor, hotspot)\n{\n\tmxEventSource.call(this);\n\t\n\tif (graph != null)\n\t{\n\t\tthis.graph = graph;\n\t\tthis.validColor = (validColor != null) ? validColor : mxConstants.DEFAULT_VALID_COLOR;\n\t\tthis.invalidColor = (invalidColor != null) ? invalidColor : mxConstants.DEFAULT_INVALID_COLOR;\n\t\tthis.hotspot = (hotspot != null) ? hotspot : mxConstants.DEFAULT_HOTSPOT;\n\t\t\n\t\tthis.highlight = new mxCellHighlight(graph);\n\t}\n};\n\n/**\n * Extends mxEventSource.\n */\nmxUtils.extend(mxCellMarker, mxEventSource);\n\n/**\n * Variable: graph\n * \n * Reference to the enclosing <mxGraph>.\n */\nmxCellMarker.prototype.graph = null;\n\n/**\n * Variable: enabled\n * \n * Specifies if the marker is enabled. Default is true.\n */\nmxCellMarker.prototype.enabled = true;\n\n/**\n * Variable: hotspot\n * \n * Specifies the portion of the width and height that should trigger\n * a highlight. The area around the center of the cell to be marked is used\n * as the hotspot. Possible values are between 0 and 1. Default is\n * mxConstants.DEFAULT_HOTSPOT.\n */\nmxCellMarker.prototype.hotspot = mxConstants.DEFAULT_HOTSPOT; \n\n/**\n * Variable: hotspotEnabled\n * \n * Specifies if the hotspot is enabled. Default is false.\n */\nmxCellMarker.prototype.hotspotEnabled = false;\n\n/**\n * Variable: validColor\n * \n * Holds the valid marker color.\n */\nmxCellMarker.prototype.validColor = null;\n\n/**\n * Variable: invalidColor\n * \n * Holds the invalid marker color.\n */\nmxCellMarker.prototype.invalidColor = null;\n\n/**\n * Variable: currentColor\n * \n * Holds the current marker color.\n */\nmxCellMarker.prototype.currentColor = null;\n\n/**\n * Variable: validState\n * \n * Holds the marked <mxCellState> if it is valid.\n */\nmxCellMarker.prototype.validState = null; \n\n/**\n * Variable: markedState\n * \n * Holds the marked <mxCellState>.\n */\nmxCellMarker.prototype.markedState = null;\n\n/**\n * Function: setEnabled\n * \n * Enables or disables event handling. This implementation\n * updates <enabled>.\n * \n * Parameters:\n * \n * enabled - Boolean that specifies the new enabled state.\n */\nmxCellMarker.prototype.setEnabled = function(enabled)\n{\n\tthis.enabled = enabled;\n};\n\n/**\n * Function: isEnabled\n * \n * Returns true if events are handled. This implementation\n * returns <enabled>.\n */\nmxCellMarker.prototype.isEnabled = function()\n{\n\treturn this.enabled;\n};\n\n/**\n * Function: setHotspot\n * \n * Sets the <hotspot>.\n */\nmxCellMarker.prototype.setHotspot = function(hotspot)\n{\n\tthis.hotspot = hotspot;\n};\n\n/**\n * Function: getHotspot\n * \n * Returns the <hotspot>.\n */\nmxCellMarker.prototype.getHotspot = function()\n{\n\treturn this.hotspot;\n};\n\n/**\n * Function: setHotspotEnabled\n * \n * Specifies whether the hotspot should be used in <intersects>.\n */\nmxCellMarker.prototype.setHotspotEnabled = function(enabled)\n{\n\tthis.hotspotEnabled = enabled;\n};\n\n/**\n * Function: isHotspotEnabled\n * \n * Returns true if hotspot is used in <intersects>.\n */\nmxCellMarker.prototype.isHotspotEnabled = function()\n{\n\treturn this.hotspotEnabled;\n};\n\n/**\n * Function: hasValidState\n * \n * Returns true if <validState> is not null.\n */\nmxCellMarker.prototype.hasValidState = function()\n{\n\treturn this.validState != null;\n};\n\n/**\n * Function: getValidState\n * \n * Returns the <validState>.\n */\nmxCellMarker.prototype.getValidState = function()\n{\n\treturn this.validState;\n};\n\n/**\n * Function: getMarkedState\n * \n * Returns the <markedState>.\n */\nmxCellMarker.prototype.getMarkedState = function()\n{\n\treturn this.markedState;\n};\n\n/**\n * Function: reset\n * \n * Resets the state of the cell marker.\n */\nmxCellMarker.prototype.reset = function()\n{\n\tthis.validState = null;\n\t\n\tif (this.markedState != null)\n\t{\n\t\tthis.markedState = null;\n\t\tthis.unmark();\n\t}\n};\n\n/**\n * Function: process\n * \n * Processes the given event and cell and marks the state returned by\n * <getState> with the color returned by <getMarkerColor>. If the\n * markerColor is not null, then the state is stored in <markedState>. If\n * <isValidState> returns true, then the state is stored in <validState>\n * regardless of the marker color. The state is returned regardless of the\n * marker color and valid state. \n */\nmxCellMarker.prototype.process = function(me)\n{\n\tvar state = null;\n\t\n\tif (this.isEnabled())\n\t{\n\t\tstate = this.getState(me);\n\t\tthis.setCurrentState(state, me);\n\t}\n\t\n\treturn state;\n};\n\n/**\n * Function: setCurrentState\n * \n * Sets and marks the current valid state.\n */\nmxCellMarker.prototype.setCurrentState = function(state, me, color)\n{\n\tvar isValid = (state != null) ? this.isValidState(state) : false;\n\tcolor = (color != null) ? color : this.getMarkerColor(me.getEvent(), state, isValid);\n\t\n\tif (isValid)\n\t{\n\t\tthis.validState = state;\n\t}\n\telse\n\t{\n\t\tthis.validState = null;\n\t}\n\t\n\tif (state != this.markedState || color != this.currentColor)\n\t{\n\t\tthis.currentColor = color;\n\t\t\n\t\tif (state != null && this.currentColor != null)\n\t\t{\n\t\t\tthis.markedState = state;\n\t\t\tthis.mark();\t\t\n\t\t}\n\t\telse if (this.markedState != null)\n\t\t{\n\t\t\tthis.markedState = null;\n\t\t\tthis.unmark();\n\t\t}\n\t}\n};\n\n/**\n * Function: markCell\n * \n * Marks the given cell using the given color, or <validColor> if no color is specified.\n */\nmxCellMarker.prototype.markCell = function(cell, color)\n{\n\tvar state = this.graph.getView().getState(cell);\n\t\n\tif (state != null)\n\t{\n\t\tthis.currentColor = (color != null) ? color : this.validColor;\n\t\tthis.markedState = state;\n\t\tthis.mark();\n\t}\n};\n\n/**\n * Function: mark\n * \n * Marks the <markedState> and fires a <mark> event.\n */\nmxCellMarker.prototype.mark = function()\n{\n\tthis.highlight.setHighlightColor(this.currentColor);\n\tthis.highlight.highlight(this.markedState);\n\tthis.fireEvent(new mxEventObject(mxEvent.MARK, 'state', this.markedState));\n};\n\n/**\n * Function: unmark\n * \n * Hides the marker and fires a <mark> event.\n */\nmxCellMarker.prototype.unmark = function()\n{\n\tthis.mark();\n};\n\n/**\n * Function: isValidState\n * \n * Returns true if the given <mxCellState> is a valid state. If this\n * returns true, then the state is stored in <validState>. The return value\n * of this method is used as the argument for <getMarkerColor>.\n */\nmxCellMarker.prototype.isValidState = function(state)\n{\n\treturn true;\n};\n\n/**\n * Function: getMarkerColor\n * \n * Returns the valid- or invalidColor depending on the value of isValid.\n * The given <mxCellState> is ignored by this implementation.\n */\nmxCellMarker.prototype.getMarkerColor = function(evt, state, isValid)\n{\n\treturn (isValid) ? this.validColor : this.invalidColor;\n};\n\n/**\n * Function: getState\n * \n * Uses <getCell>, <getStateToMark> and <intersects> to return the\n * <mxCellState> for the given <mxMouseEvent>.\n */\nmxCellMarker.prototype.getState = function(me)\n{\n\tvar view = this.graph.getView();\n\tvar cell = this.getCell(me);\n\tvar state = this.getStateToMark(view.getState(cell));\n\n\treturn (state != null && this.intersects(state, me)) ? state : null;\n};\n\n/**\n * Function: getCell\n * \n * Returns the <mxCell> for the given event and cell. This returns the\n * given cell.\n */\nmxCellMarker.prototype.getCell = function(me)\n{\n\treturn me.getCell();\n};\n\n/**\n * Function: getStateToMark\n * \n * Returns the <mxCellState> to be marked for the given <mxCellState> under\n * the mouse. This returns the given state.\n */\nmxCellMarker.prototype.getStateToMark = function(state)\n{\n\treturn state;\n};\n\n/**\n * Function: intersects\n * \n * Returns true if the given coordinate pair intersects the given state.\n * This returns true if the <hotspot> is 0 or the coordinates are inside\n * the hotspot for the given cell state.\n */\nmxCellMarker.prototype.intersects = function(state, me)\n{\n\tif (this.hotspotEnabled)\n\t{\n\t\treturn mxUtils.intersectsHotspot(state, me.getGraphX(), me.getGraphY(),\n\t\t\tthis.hotspot, mxConstants.MIN_HOTSPOT_SIZE,\n\t\t\tmxConstants.MAX_HOTSPOT_SIZE);\n\t}\n\t\n\treturn true;\n};\n\n/**\n * Function: destroy\n * \n * Destroys the handler and all its resources and DOM nodes.\n */\nmxCellMarker.prototype.destroy = function()\n{\n\tthis.graph.getView().removeListener(this.resetHandler);\n\tthis.graph.getModel().removeListener(this.resetHandler);\n\tthis.highlight.destroy();\n};\n"
  },
  {
    "path": "static/cherry/drawio_demo/src/js/handler/mxCellTracker.js",
    "content": "/**\n * Copyright (c) 2006-2015, JGraph Ltd\n * Copyright (c) 2006-2015, Gaudenz Alder\n */\n/**\n * Class: mxCellTracker\n * \n * Event handler that highlights cells. Inherits from <mxCellMarker>.\n * \n * Example:\n * \n * (code)\n * new mxCellTracker(graph, '#00FF00');\n * (end)\n * \n * For detecting dragEnter, dragOver and dragLeave on cells, the following\n * code can be used:\n * \n * (code)\n * graph.addMouseListener(\n * {\n *   cell: null,\n *   mouseDown: function(sender, me) { },\n *   mouseMove: function(sender, me)\n *   {\n *     var tmp = me.getCell();\n *     \n *     if (tmp != this.cell)\n *     {\n *       if (this.cell != null)\n *       {\n *         this.dragLeave(me.getEvent(), this.cell);\n *       }\n *       \n *       this.cell = tmp;\n *       \n *       if (this.cell != null)\n *       {\n *         this.dragEnter(me.getEvent(), this.cell);\n *       }\n *     }\n *     \n *     if (this.cell != null)\n *     {\n *       this.dragOver(me.getEvent(), this.cell);\n *     }\n *   },\n *   mouseUp: function(sender, me) { },\n *   dragEnter: function(evt, cell)\n *   {\n *     mxLog.debug('dragEnter', cell.value);\n *   },\n *   dragOver: function(evt, cell)\n *   {\n *     mxLog.debug('dragOver', cell.value);\n *   },\n *   dragLeave: function(evt, cell)\n *   {\n *     mxLog.debug('dragLeave', cell.value);\n *   }\n * });\n * (end)\n * \n * Constructor: mxCellTracker\n * \n * Constructs an event handler that highlights cells.\n * \n * Parameters:\n * \n * graph - Reference to the enclosing <mxGraph>.\n * color - Color of the highlight. Default is blue.\n * funct - Optional JavaScript function that is used to override\n * <mxCellMarker.getCell>.\n */\nfunction mxCellTracker(graph, color, funct)\n{\n\tmxCellMarker.call(this, graph, color);\n\n\tthis.graph.addMouseListener(this);\n\t\n\tif (funct != null)\n\t{\n\t\tthis.getCell = funct;\n\t}\n\t\n\t// Automatic deallocation of memory\n\tif (mxClient.IS_IE)\n\t{\n\t\tmxEvent.addListener(window, 'unload', mxUtils.bind(this, function()\n\t\t{\n\t\t\tthis.destroy();\n\t\t}));\n\t}\n};\n\n/**\n * Extends mxCellMarker.\n */\nmxUtils.extend(mxCellTracker, mxCellMarker);\n\n/**\n * Function: mouseDown\n * \n * Ignores the event. The event is not consumed.\n */\nmxCellTracker.prototype.mouseDown = function(sender, me) { };\n\n/**\n * Function: mouseMove\n * \n * Handles the event by highlighting the cell under the mousepointer if it\n * is over the hotspot region of the cell.\n */\nmxCellTracker.prototype.mouseMove = function(sender, me)\n{\n\tif (this.isEnabled())\n\t{\n\t\tthis.process(me);\n\t}\n};\n\n/**\n * Function: mouseUp\n * \n * Handles the event by reseting the highlight.\n */\nmxCellTracker.prototype.mouseUp = function(sender, me) { };\n\n/**\n * Function: destroy\n * \n * Destroys the object and all its resources and DOM nodes. This doesn't\n * normally need to be called. It is called automatically when the window\n * unloads.\n */\nmxCellTracker.prototype.destroy = function()\n{\n\tif (!this.destroyed)\n\t{\n\t\tthis.destroyed = true;\n\n\t\tthis.graph.removeMouseListener(this);\n\t\tmxCellMarker.prototype.destroy.apply(this);\n\t}\n};\n"
  },
  {
    "path": "static/cherry/drawio_demo/src/js/handler/mxConnectionHandler.js",
    "content": "/**\n * Copyright (c) 2006-2016, JGraph Ltd\n * Copyright (c) 2006-2016, Gaudenz Alder\n */\n/**\n * Class: mxConnectionHandler\n *\n * Graph event handler that creates new connections. Uses <mxTerminalMarker>\n * for finding and highlighting the source and target vertices and\n * <factoryMethod> to create the edge instance. This handler is built-into\n * <mxGraph.connectionHandler> and enabled using <mxGraph.setConnectable>.\n *\n * Example:\n * \n * (code)\n * new mxConnectionHandler(graph, function(source, target, style)\n * {\n *   edge = new mxCell('', new mxGeometry());\n *   edge.setEdge(true);\n *   edge.setStyle(style);\n *   edge.geometry.relative = true;\n *   return edge;\n * });\n * (end)\n * \n * Here is an alternative solution that just sets a specific user object for\n * new edges by overriding <insertEdge>.\n *\n * (code)\n * mxConnectionHandlerInsertEdge = mxConnectionHandler.prototype.insertEdge;\n * mxConnectionHandler.prototype.insertEdge = function(parent, id, value, source, target, style)\n * {\n *   value = 'Test';\n * \n *   return mxConnectionHandlerInsertEdge.apply(this, arguments);\n * };\n * (end)\n * \n * Using images to trigger connections:\n * \n * This handler uses mxTerminalMarker to find the source and target cell for\n * the new connection and creates a new edge using <connect>. The new edge is\n * created using <createEdge> which in turn uses <factoryMethod> or creates a\n * new default edge.\n * \n * The handler uses a \"highlight-paradigm\" for indicating if a cell is being\n * used as a source or target terminal, as seen in other diagramming products.\n * In order to allow both, moving and connecting cells at the same time,\n * <mxConstants.DEFAULT_HOTSPOT> is used in the handler to determine the hotspot\n * of a cell, that is, the region of the cell which is used to trigger a new\n * connection. The constant is a value between 0 and 1 that specifies the\n * amount of the width and height around the center to be used for the hotspot\n * of a cell and its default value is 0.5. In addition,\n * <mxConstants.MIN_HOTSPOT_SIZE> defines the minimum number of pixels for the\n * width and height of the hotspot.\n * \n * This solution, while standards compliant, may be somewhat confusing because\n * there is no visual indicator for the hotspot and the highlight is seen to\n * switch on and off while the mouse is being moved in and out. Furthermore,\n * this paradigm does not allow to create different connections depending on\n * the highlighted hotspot as there is only one hotspot per cell and it\n * normally does not allow cells to be moved and connected at the same time as\n * there is no clear indication of the connectable area of the cell.\n * \n * To come across these issues, the handle has an additional <createIcons> hook\n * with a default implementation that allows to create one icon to be used to\n * trigger new connections. If this icon is specified, then new connections can\n * only be created if the image is clicked while the cell is being highlighted.\n * The <createIcons> hook may be overridden to create more than one\n * <mxImageShape> for creating new connections, but the default implementation\n * supports one image and is used as follows:\n * \n * In order to display the \"connect image\" whenever the mouse is over the cell,\n * an DEFAULT_HOTSPOT of 1 should be used:\n * \n * (code)\n * mxConstants.DEFAULT_HOTSPOT = 1;\n * (end)\n * \n * In order to avoid confusion with the highlighting, the highlight color\n * should not be used with a connect image:\n * \n * (code)\n * mxConstants.HIGHLIGHT_COLOR = null;\n * (end)\n * \n * To install the image, the connectImage field of the mxConnectionHandler must\n * be assigned a new <mxImage> instance:\n * \n * (code)\n * mxConnectionHandler.prototype.connectImage = new mxImage('images/green-dot.gif', 14, 14);\n * (end)\n * \n * This will use the green-dot.gif with a width and height of 14 pixels as the\n * image to trigger new connections. In createIcons the icon field of the\n * handler will be set in order to remember the icon that has been clicked for\n * creating the new connection. This field will be available under selectedIcon\n * in the connect method, which may be overridden to take the icon that\n * triggered the new connection into account. This is useful if more than one\n * icon may be used to create a connection.\n *\n * Group: Events\n * \n * Event: mxEvent.START\n * \n * Fires when a new connection is being created by the user. The <code>state</code>\n * property contains the state of the source cell.\n * \n * Event: mxEvent.CONNECT\n * \n * Fires between begin- and endUpdate in <connect>. The <code>cell</code>\n * property contains the inserted edge, the <code>event</code> and <code>target</code> \n * properties contain the respective arguments that were passed to <connect> (where\n * target corresponds to the dropTarget argument). Finally, the <code>terminal</code>\n * property corresponds to the target argument in <connect> or the clone of the source\n * terminal if <createTarget> is enabled.\n * \n * Note that the target is the cell under the mouse where the mouse button was released.\n * Depending on the logic in the handler, this doesn't necessarily have to be the target\n * of the inserted edge. To print the source, target or any optional ports IDs that the\n * edge is connected to, the following code can be used. To get more details about the\n * actual connection point, <mxGraph.getConnectionConstraint> can be used. To resolve\n * the port IDs, use <mxGraphModel.getCell>.\n * \n * (code)\n * graph.connectionHandler.addListener(mxEvent.CONNECT, function(sender, evt)\n * {\n *   var edge = evt.getProperty('cell');\n *   var source = graph.getModel().getTerminal(edge, true);\n *   var target = graph.getModel().getTerminal(edge, false);\n *   \n *   var style = graph.getCellStyle(edge);\n *   var sourcePortId = style[mxConstants.STYLE_SOURCE_PORT];\n *   var targetPortId = style[mxConstants.STYLE_TARGET_PORT];\n *   \n *   mxLog.show();\n *   mxLog.debug('connect', edge, source.id, target.id, sourcePortId, targetPortId);\n * });\n * (end)\n *\n * Event: mxEvent.RESET\n * \n * Fires when the <reset> method is invoked.\n *\n * Constructor: mxConnectionHandler\n *\n * Constructs an event handler that connects vertices using the specified\n * factory method to create the new edges. Modify\n * <mxConstants.ACTIVE_REGION> to setup the region on a cell which triggers\n * the creation of a new connection or use connect icons as explained\n * above.\n * \n * Parameters:\n * \n * graph - Reference to the enclosing <mxGraph>.\n * factoryMethod - Optional function to create the edge. The function takes\n * the source and target <mxCell> as the first and second argument and an\n * optional cell style from the preview as the third argument. It returns\n * the <mxCell> that represents the new edge.\n */\nfunction mxConnectionHandler(graph, factoryMethod)\n{\n\tmxEventSource.call(this);\n\t\n\tif (graph != null)\n\t{\n\t\tthis.graph = graph;\n\t\tthis.factoryMethod = factoryMethod;\n\t\tthis.init();\n\t\t\n\t\t// Handles escape keystrokes\n\t\tthis.escapeHandler = mxUtils.bind(this, function(sender, evt)\n\t\t{\n\t\t\tthis.reset();\n\t\t});\n\t\t\n\t\tthis.graph.addListener(mxEvent.ESCAPE, this.escapeHandler);\n\t}\n};\n\n/**\n * Extends mxEventSource.\n */\nmxUtils.extend(mxConnectionHandler, mxEventSource);\n\n/**\n * Variable: graph\n * \n * Reference to the enclosing <mxGraph>.\n */\nmxConnectionHandler.prototype.graph = null;\n\n/**\n * Variable: factoryMethod\n * \n * Function that is used for creating new edges. The function takes the\n * source and target <mxCell> as the first and second argument and returns\n * a new <mxCell> that represents the edge. This is used in <createEdge>.\n */\nmxConnectionHandler.prototype.factoryMethod = true;\n\n/**\n * Variable: moveIconFront\n * \n * Specifies if icons should be displayed inside the graph container instead\n * of the overlay pane. This is used for HTML labels on vertices which hide\n * the connect icon. This has precendence over <moveIconBack> when set\n * to true. Default is false.\n */\nmxConnectionHandler.prototype.moveIconFront = false;\n\n/**\n * Variable: moveIconBack\n * \n * Specifies if icons should be moved to the back of the overlay pane. This can\n * be set to true if the icons of the connection handler conflict with other\n * handles, such as the vertex label move handle. Default is false.\n */\nmxConnectionHandler.prototype.moveIconBack = false;\n\n/**\n * Variable: connectImage\n * \n * <mxImage> that is used to trigger the creation of a new connection. This\n * is used in <createIcons>. Default is null.\n */\nmxConnectionHandler.prototype.connectImage = null;\n\n/**\n * Variable: targetConnectImage\n * \n * Specifies if the connect icon should be centered on the target state\n * while connections are being previewed. Default is false.\n */\nmxConnectionHandler.prototype.targetConnectImage = false;\n\n/**\n * Variable: enabled\n * \n * Specifies if events are handled. Default is true.\n */\nmxConnectionHandler.prototype.enabled = true;\n\n/**\n * Variable: select\n * \n * Specifies if new edges should be selected. Default is true.\n */\nmxConnectionHandler.prototype.select = true;\n\n/**\n * Variable: createTarget\n * \n * Specifies if <createTargetVertex> should be called if no target was under the\n * mouse for the new connection. Setting this to true means the connection\n * will be drawn as valid if no target is under the mouse, and\n * <createTargetVertex> will be called before the connection is created between\n * the source cell and the newly created vertex in <createTargetVertex>, which\n * can be overridden to create a new target. Default is false.\n */\nmxConnectionHandler.prototype.createTarget = false;\n\n/**\n * Variable: marker\n * \n * Holds the <mxTerminalMarker> used for finding source and target cells.\n */\nmxConnectionHandler.prototype.marker = null;\n\n/**\n * Variable: constraintHandler\n * \n * Holds the <mxConstraintHandler> used for drawing and highlighting\n * constraints.\n */\nmxConnectionHandler.prototype.constraintHandler = null;\n\n/**\n * Variable: error\n * \n * Holds the current validation error while connections are being created.\n */\nmxConnectionHandler.prototype.error = null;\n\n/**\n * Variable: waypointsEnabled\n * \n * Specifies if single clicks should add waypoints on the new edge. Default is\n * false.\n */\nmxConnectionHandler.prototype.waypointsEnabled = false;\n\n/**\n * Variable: ignoreMouseDown\n * \n * Specifies if the connection handler should ignore the state of the mouse\n * button when highlighting the source. Default is false, that is, the\n * handler only highlights the source if no button is being pressed.\n */\nmxConnectionHandler.prototype.ignoreMouseDown = false;\n\n/**\n * Variable: first\n * \n * Holds the <mxPoint> where the mouseDown took place while the handler is\n * active.\n */\nmxConnectionHandler.prototype.first = null;\n\n/**\n * Variable: connectIconOffset\n * \n * Holds the offset for connect icons during connection preview.\n * Default is mxPoint(0, <mxConstants.TOOLTIP_VERTICAL_OFFSET>).\n * Note that placing the icon under the mouse pointer with an\n * offset of (0,0) will affect hit detection.\n */\nmxConnectionHandler.prototype.connectIconOffset = new mxPoint(0, mxConstants.TOOLTIP_VERTICAL_OFFSET);\n\n/**\n * Variable: edgeState\n * \n * Optional <mxCellState> that represents the preview edge while the\n * handler is active. This is created in <createEdgeState>.\n */\nmxConnectionHandler.prototype.edgeState = null;\n\n/**\n * Variable: changeHandler\n * \n * Holds the change event listener for later removal.\n */\nmxConnectionHandler.prototype.changeHandler = null;\n\n/**\n * Variable: drillHandler\n * \n * Holds the drill event listener for later removal.\n */\nmxConnectionHandler.prototype.drillHandler = null;\n\n/**\n * Variable: mouseDownCounter\n * \n * Counts the number of mouseDown events since the start. The initial mouse\n * down event counts as 1.\n */\nmxConnectionHandler.prototype.mouseDownCounter = 0;\n\n/**\n * Variable: movePreviewAway\n * \n * Switch to enable moving the preview away from the mousepointer. This is required in browsers\n * where the preview cannot be made transparent to events and if the built-in hit detection on\n * the HTML elements in the page should be used. Default is the value of <mxClient.IS_VML>.\n */\nmxConnectionHandler.prototype.movePreviewAway = mxClient.IS_VML;\n\n/**\n * Variable: outlineConnect\n * \n * Specifies if connections to the outline of a highlighted target should be\n * enabled. This will allow to place the connection point along the outline of\n * the highlighted target. Default is false.\n */\nmxConnectionHandler.prototype.outlineConnect = false;\n\n/**\n * Variable: livePreview\n * \n * Specifies if the actual shape of the edge state should be used for the preview.\n * Default is false. (Ignored if no edge state is created in <createEdgeState>.)\n */\nmxConnectionHandler.prototype.livePreview = false;\n\n/**\n * Variable: cursor\n * \n * Specifies the cursor to be used while the handler is active. Default is null.\n */\nmxConnectionHandler.prototype.cursor = null;\n\n/**\n * Variable: insertBeforeSource\n * \n * Specifies if new edges should be inserted before the source vertex in the\n * cell hierarchy. Default is false for backwards compatibility.\n */\nmxConnectionHandler.prototype.insertBeforeSource = false;\n\n/**\n * Function: isEnabled\n * \n * Returns true if events are handled. This implementation\n * returns <enabled>.\n */\nmxConnectionHandler.prototype.isEnabled = function()\n{\n\treturn this.enabled;\n};\n\t\n/**\n * Function: setEnabled\n * \n * Enables or disables event handling. This implementation\n * updates <enabled>.\n * \n * Parameters:\n * \n * enabled - Boolean that specifies the new enabled state.\n */\nmxConnectionHandler.prototype.setEnabled = function(enabled)\n{\n\tthis.enabled = enabled;\n};\n\n/**\n * Function: isInsertBefore\n * \n * Returns <insertBeforeSource> for non-loops and false for loops.\n *\n * Parameters:\n * \n * edge - <mxCell> that represents the edge to be inserted.\n * source - <mxCell> that represents the source terminal.\n * target - <mxCell> that represents the target terminal.\n * evt - Mousedown event of the connect gesture.\n * dropTarget - <mxCell> that represents the cell under the mouse when it was\n * released.\n */\nmxConnectionHandler.prototype.isInsertBefore = function(edge, source, target, evt, dropTarget)\n{\n\treturn this.insertBeforeSource && source != target;\n};\n\n/**\n * Function: isCreateTarget\n * \n * Returns <createTarget>.\n *\n * Parameters:\n *\n * evt - Current active native pointer event.\n */\nmxConnectionHandler.prototype.isCreateTarget = function(evt)\n{\n\treturn this.createTarget;\n};\n\n/**\n * Function: setCreateTarget\n * \n * Sets <createTarget>.\n */\nmxConnectionHandler.prototype.setCreateTarget = function(value)\n{\n\tthis.createTarget = value;\n};\n\n/**\n * Function: createShape\n * \n * Creates the preview shape for new connections.\n */\nmxConnectionHandler.prototype.createShape = function()\n{\n\t// Creates the edge preview\n\tvar shape = (this.livePreview && this.edgeState != null) ?\n\t\tthis.graph.cellRenderer.createShape(this.edgeState) :\n\t\tnew mxPolyline([], mxConstants.INVALID_COLOR);\n\tshape.dialect = (this.graph.dialect != mxConstants.DIALECT_SVG) ?\n\t\tmxConstants.DIALECT_VML : mxConstants.DIALECT_SVG;\n\tshape.scale = this.graph.view.scale;\n\tshape.pointerEvents = false;\n\tshape.isDashed = true;\n\tshape.init(this.graph.getView().getOverlayPane());\n\tmxEvent.redirectMouseEvents(shape.node, this.graph, null);\n\n\treturn shape;\n};\n\n/**\n * Function: init\n * \n * Initializes the shapes required for this connection handler. This should\n * be invoked if <mxGraph.container> is assigned after the connection\n * handler has been created.\n */\nmxConnectionHandler.prototype.init = function()\n{\n\tthis.graph.addMouseListener(this);\n\tthis.marker = this.createMarker();\n\tthis.constraintHandler = new mxConstraintHandler(this.graph);\n\n\t// Redraws the icons if the graph changes\n\tthis.changeHandler = mxUtils.bind(this, function(sender)\n\t{\n\t\tif (this.iconState != null)\n\t\t{\n\t\t\tthis.iconState = this.graph.getView().getState(this.iconState.cell);\n\t\t}\n\t\t\n\t\tif (this.iconState != null)\n\t\t{\n\t\t\tthis.redrawIcons(this.icons, this.iconState);\n\t\t\tthis.constraintHandler.reset();\n\t\t}\n\t\telse if (this.previous != null && this.graph.view.getState(this.previous.cell) == null)\n\t\t{\n\t\t\tthis.reset();\n\t\t}\n\t});\n\t\n\tthis.graph.getModel().addListener(mxEvent.CHANGE, this.changeHandler);\n\tthis.graph.getView().addListener(mxEvent.SCALE, this.changeHandler);\n\tthis.graph.getView().addListener(mxEvent.TRANSLATE, this.changeHandler);\n\tthis.graph.getView().addListener(mxEvent.SCALE_AND_TRANSLATE, this.changeHandler);\n\t\n\t// Removes the icon if we step into/up or start editing\n\tthis.drillHandler = mxUtils.bind(this, function(sender)\n\t{\n\t\tthis.reset();\n\t});\n\t\n\tthis.graph.addListener(mxEvent.START_EDITING, this.drillHandler);\n\tthis.graph.getView().addListener(mxEvent.DOWN, this.drillHandler);\n\tthis.graph.getView().addListener(mxEvent.UP, this.drillHandler);\n};\n\n/**\n * Function: isConnectableCell\n * \n * Returns true if the given cell is connectable. This is a hook to\n * disable floating connections. This implementation returns true.\n */\nmxConnectionHandler.prototype.isConnectableCell = function(cell)\n{\n\treturn true;\n};\n\n/**\n * Function: createMarker\n * \n * Creates and returns the <mxCellMarker> used in <marker>.\n */\nmxConnectionHandler.prototype.createMarker = function()\n{\n\tvar marker = new mxCellMarker(this.graph);\n\tmarker.hotspotEnabled = true;\n\n\t// Overrides to return cell at location only if valid (so that\n\t// there is no highlight for invalid cells)\n\tmarker.getCell = mxUtils.bind(this, function(me)\n\t{\n\t\tvar cell = mxCellMarker.prototype.getCell.apply(marker, arguments);\n\t\tthis.error = null;\n\t\t\n\t\t// Checks for cell at preview point (with grid)\n\t\tif (cell == null && this.currentPoint != null)\n\t\t{\n\t\t\tcell = this.graph.getCellAt(this.currentPoint.x, this.currentPoint.y);\n\t\t}\n\t\t\n\t\t// Uses connectable parent vertex if one exists\n\t\tif (cell != null && !this.graph.isCellConnectable(cell))\n\t\t{\n\t\t\tvar parent = this.graph.getModel().getParent(cell);\n\t\t\t\n\t\t\tif (this.graph.getModel().isVertex(parent) && this.graph.isCellConnectable(parent))\n\t\t\t{\n\t\t\t\tcell = parent;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif ((this.graph.isSwimlane(cell) && this.currentPoint != null &&\n\t\t\tthis.graph.hitsSwimlaneContent(cell, this.currentPoint.x, this.currentPoint.y)) ||\n\t\t\t!this.isConnectableCell(cell))\n\t\t{\n\t\t\tcell = null;\n\t\t}\n\t\t\n\t\tif (cell != null)\n\t\t{\n\t\t\tif (this.isConnecting())\n\t\t\t{\n\t\t\t\tif (this.previous != null)\n\t\t\t\t{\n\t\t\t\t\tthis.error = this.validateConnection(this.previous.cell, cell);\n\t\t\t\t\t\n\t\t\t\t\tif (this.error != null && this.error.length == 0)\n\t\t\t\t\t{\n\t\t\t\t\t\tcell = null;\n\t\t\t\t\t\t\n\t\t\t\t\t\t// Enables create target inside groups\n\t\t\t\t\t\tif (this.isCreateTarget(me.getEvent()))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tthis.error = null;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if (!this.isValidSource(cell, me))\n\t\t\t{\n\t\t\t\tcell = null;\n\t\t\t}\n\t\t}\n\t\telse if (this.isConnecting() && !this.isCreateTarget(me.getEvent()) &&\n\t\t\t\t!this.graph.allowDanglingEdges)\n\t\t{\n\t\t\tthis.error = '';\n\t\t}\n\n\t\treturn cell;\n\t});\n\n\t// Sets the highlight color according to validateConnection\n\tmarker.isValidState = mxUtils.bind(this, function(state)\n\t{\n\t\tif (this.isConnecting())\n\t\t{\n\t\t\treturn this.error == null;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn mxCellMarker.prototype.isValidState.apply(marker, arguments);\n\t\t}\n\t});\n\n\t// Overrides to use marker color only in highlight mode or for\n\t// target selection\n\tmarker.getMarkerColor = mxUtils.bind(this, function(evt, state, isValid)\n\t{\n\t\treturn (this.connectImage == null || this.isConnecting()) ?\n\t\t\tmxCellMarker.prototype.getMarkerColor.apply(marker, arguments) :\n\t\t\tnull;\n\t});\n\n\t// Overrides to use hotspot only for source selection otherwise\n\t// intersects always returns true when over a cell\n\tmarker.intersects = mxUtils.bind(this, function(state, evt)\n\t{\n\t\tif (this.connectImage != null || this.isConnecting())\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\treturn mxCellMarker.prototype.intersects.apply(marker, arguments);\n\t});\n\n\treturn marker;\n};\n\n/**\n * Function: start\n * \n * Starts a new connection for the given state and coordinates.\n */\nmxConnectionHandler.prototype.start = function(state, x, y, edgeState)\n{\n\tthis.previous = state;\n\tthis.first = new mxPoint(x, y);\n\tthis.edgeState = (edgeState != null) ? edgeState : this.createEdgeState(null);\n\t\n\t// Marks the source state\n\tthis.marker.currentColor = this.marker.validColor;\n\tthis.marker.markedState = state;\n\tthis.marker.mark();\n\n\tthis.fireEvent(new mxEventObject(mxEvent.START, 'state', this.previous));\n};\n\n/**\n * Function: isConnecting\n * \n * Returns true if the source terminal has been clicked and a new\n * connection is currently being previewed.\n */\nmxConnectionHandler.prototype.isConnecting = function()\n{\n\treturn this.first != null && this.shape != null;\n};\n\n/**\n * Function: isValidSource\n * \n * Returns <mxGraph.isValidSource> for the given source terminal.\n * \n * Parameters:\n * \n * cell - <mxCell> that represents the source terminal.\n * me - <mxMouseEvent> that is associated with this call.\n */\nmxConnectionHandler.prototype.isValidSource = function(cell, me)\n{\n\treturn this.graph.isValidSource(cell);\n};\n\n/**\n * Function: isValidTarget\n * \n * Returns true. The call to <mxGraph.isValidTarget> is implicit by calling\n * <mxGraph.getEdgeValidationError> in <validateConnection>. This is an\n * additional hook for disabling certain targets in this specific handler.\n * \n * Parameters:\n * \n * cell - <mxCell> that represents the target terminal.\n */\nmxConnectionHandler.prototype.isValidTarget = function(cell)\n{\n\treturn true;\n};\n\n/**\n * Function: validateConnection\n * \n * Returns the error message or an empty string if the connection for the\n * given source target pair is not valid. Otherwise it returns null. This\n * implementation uses <mxGraph.getEdgeValidationError>.\n * \n * Parameters:\n * \n * source - <mxCell> that represents the source terminal.\n * target - <mxCell> that represents the target terminal.\n */\nmxConnectionHandler.prototype.validateConnection = function(source, target)\n{\n\tif (!this.isValidTarget(target))\n\t{\n\t\treturn '';\n\t}\n\t\n\treturn this.graph.getEdgeValidationError(null, source, target);\n};\n\n/**\n * Function: getConnectImage\n * \n * Hook to return the <mxImage> used for the connection icon of the given\n * <mxCellState>. This implementation returns <connectImage>.\n * \n * Parameters:\n * \n * state - <mxCellState> whose connect image should be returned.\n */\nmxConnectionHandler.prototype.getConnectImage = function(state)\n{\n\treturn this.connectImage;\n};\n\n/**\n * Function: isMoveIconToFrontForState\n * \n * Returns true if the state has a HTML label in the graph's container, otherwise\n * it returns <moveIconFront>.\n * \n * Parameters:\n * \n * state - <mxCellState> whose connect icons should be returned.\n */\nmxConnectionHandler.prototype.isMoveIconToFrontForState = function(state)\n{\n\tif (state.text != null && state.text.node.parentNode == this.graph.container)\n\t{\n\t\treturn true;\n\t}\n\t\n\treturn this.moveIconFront;\n};\n\n/**\n * Function: createIcons\n * \n * Creates the array <mxImageShapes> that represent the connect icons for\n * the given <mxCellState>.\n * \n * Parameters:\n * \n * state - <mxCellState> whose connect icons should be returned.\n */\nmxConnectionHandler.prototype.createIcons = function(state)\n{\n\tvar image = this.getConnectImage(state);\n\t\n\tif (image != null && state != null)\n\t{\n\t\tthis.iconState = state;\n\t\tvar icons = [];\n\n\t\t// Cannot use HTML for the connect icons because the icon receives all\n\t\t// mouse move events in IE, must use VML and SVG instead even if the\n\t\t// connect-icon appears behind the selection border and the selection\n\t\t// border consumes the events before the icon gets a chance\n\t\tvar bounds = new mxRectangle(0, 0, image.width, image.height);\n\t\tvar icon = new mxImageShape(bounds, image.src, null, null, 0);\n\t\ticon.preserveImageAspect = false;\n\t\t\n\t\tif (this.isMoveIconToFrontForState(state))\n\t\t{\n\t\t\ticon.dialect = mxConstants.DIALECT_STRICTHTML;\n\t\t\ticon.init(this.graph.container);\n\t\t}\n\t\telse\n\t\t{\n\t\t\ticon.dialect = (this.graph.dialect == mxConstants.DIALECT_SVG) ?\n\t\t\t\tmxConstants.DIALECT_SVG : mxConstants.DIALECT_VML;\n\t\t\ticon.init(this.graph.getView().getOverlayPane());\n\n\t\t\t// Move the icon back in the overlay pane\n\t\t\tif (this.moveIconBack && icon.node.previousSibling != null)\n\t\t\t{\n\t\t\t\ticon.node.parentNode.insertBefore(icon.node, icon.node.parentNode.firstChild);\n\t\t\t}\n\t\t}\n\n\t\ticon.node.style.cursor = mxConstants.CURSOR_CONNECT;\n\n\t\t// Events transparency\n\t\tvar getState = mxUtils.bind(this, function()\n\t\t{\n\t\t\treturn (this.currentState != null) ? this.currentState : state;\n\t\t});\n\t\t\n\t\t// Updates the local icon before firing the mouse down event.\n\t\tvar mouseDown = mxUtils.bind(this, function(evt)\n\t\t{\n\t\t\tif (!mxEvent.isConsumed(evt))\n\t\t\t{\n\t\t\t\tthis.icon = icon;\n\t\t\t\tthis.graph.fireMouseEvent(mxEvent.MOUSE_DOWN,\n\t\t\t\t\tnew mxMouseEvent(evt, getState()));\n\t\t\t}\n\t\t});\n\n\t\tmxEvent.redirectMouseEvents(icon.node, this.graph, getState, mouseDown);\n\t\t\n\t\ticons.push(icon);\n\t\tthis.redrawIcons(icons, this.iconState);\n\t\t\n\t\treturn icons;\n\t}\n\t\n\treturn null;\n};\n\n/**\n * Function: redrawIcons\n * \n * Redraws the given array of <mxImageShapes>.\n * \n * Parameters:\n * \n * icons - Optional array of <mxImageShapes> to be redrawn.\n */\nmxConnectionHandler.prototype.redrawIcons = function(icons, state)\n{\n\tif (icons != null && icons[0] != null && state != null)\n\t{\n\t\tvar pos = this.getIconPosition(icons[0], state);\n\t\ticons[0].bounds.x = pos.x;\n\t\ticons[0].bounds.y = pos.y;\n\t\ticons[0].redraw();\n\t}\n};\n\n/**\n * Function: redrawIcons\n * \n * Redraws the given array of <mxImageShapes>.\n * \n * Parameters:\n * \n * icons - Optional array of <mxImageShapes> to be redrawn.\n */\nmxConnectionHandler.prototype.getIconPosition = function(icon, state)\n{\n\tvar scale = this.graph.getView().scale;\n\tvar cx = state.getCenterX();\n\tvar cy = state.getCenterY();\n\t\n\tif (this.graph.isSwimlane(state.cell))\n\t{\n\t\tvar size = this.graph.getStartSize(state.cell);\n\t\t\n\t\tcx = (size.width != 0) ? state.x + size.width * scale / 2 : cx;\n\t\tcy = (size.height != 0) ? state.y + size.height * scale / 2 : cy;\n\t\t\n\t\tvar alpha = mxUtils.toRadians(mxUtils.getValue(state.style, mxConstants.STYLE_ROTATION) || 0);\n\t\t\n\t\tif (alpha != 0)\n\t\t{\n\t\t\tvar cos = Math.cos(alpha);\n\t\t\tvar sin = Math.sin(alpha);\n\t\t\tvar ct = new mxPoint(state.getCenterX(), state.getCenterY());\n\t\t\tvar pt = mxUtils.getRotatedPoint(new mxPoint(cx, cy), cos, sin, ct);\n\t\t\tcx = pt.x;\n\t\t\tcy = pt.y;\n\t\t}\n\t}\n\n\treturn new mxPoint(cx - icon.bounds.width / 2,\n\t\t\tcy - icon.bounds.height / 2);\n};\n\n/**\n * Function: destroyIcons\n * \n * Destroys the connect icons and resets the respective state.\n */\nmxConnectionHandler.prototype.destroyIcons = function()\n{\n\tif (this.icons != null)\n\t{\n\t\tfor (var i = 0; i < this.icons.length; i++)\n\t\t{\n\t\t\tthis.icons[i].destroy();\n\t\t}\n\t\t\n\t\tthis.icons = null;\n\t\tthis.icon = null;\n\t\tthis.selectedIcon = null;\n\t\tthis.iconState = null;\n\t}\n};\n\n/**\n * Function: isStartEvent\n * \n * Returns true if the given mouse down event should start this handler. The\n * This implementation returns true if the event does not force marquee\n * selection, and the currentConstraint and currentFocus of the\n * <constraintHandler> are not null, or <previous> and <error> are not null and\n * <icons> is null or <icons> and <icon> are not null.\n */\nmxConnectionHandler.prototype.isStartEvent = function(me)\n{\n\treturn ((this.constraintHandler.currentFocus != null && this.constraintHandler.currentConstraint != null) ||\n\t\t(this.previous != null && this.error == null && (this.icons == null || (this.icons != null &&\n\t\tthis.icon != null))));\n};\n\n/**\n * Function: mouseDown\n * \n * Handles the event by initiating a new connection.\n */\nmxConnectionHandler.prototype.mouseDown = function(sender, me)\n{\n\tthis.mouseDownCounter++;\n\t\n\tif (this.isEnabled() && this.graph.isEnabled() && !me.isConsumed() &&\n\t\t!this.isConnecting() && this.isStartEvent(me))\n\t{\n\t\tif (this.constraintHandler.currentConstraint != null &&\n\t\t\tthis.constraintHandler.currentFocus != null &&\n\t\t\tthis.constraintHandler.currentPoint != null)\n\t\t{\n\t\t\tthis.sourceConstraint = this.constraintHandler.currentConstraint;\n\t\t\tthis.previous = this.constraintHandler.currentFocus;\n\t\t\tthis.first = this.constraintHandler.currentPoint.clone();\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Stores the location of the initial mousedown\n\t\t\tthis.first = new mxPoint(me.getGraphX(), me.getGraphY());\n\t\t}\n\t\n\t\tthis.edgeState = this.createEdgeState(me);\n\t\tthis.mouseDownCounter = 1;\n\t\t\n\t\tif (this.waypointsEnabled && this.shape == null)\n\t\t{\n\t\t\tthis.waypoints = null;\n\t\t\tthis.shape = this.createShape();\n\t\t\t\n\t\t\tif (this.edgeState != null)\n\t\t\t{\n\t\t\t\tthis.shape.apply(this.edgeState);\n\t\t\t}\n\t\t}\n\n\t\t// Stores the starting point in the geometry of the preview\n\t\tif (this.previous == null && this.edgeState != null)\n\t\t{\n\t\t\tvar pt = this.graph.getPointForEvent(me.getEvent());\n\t\t\tthis.edgeState.cell.geometry.setTerminalPoint(pt, true);\n\t\t}\n\t\t\n\t\tthis.fireEvent(new mxEventObject(mxEvent.START, 'state', this.previous));\n\n\t\tme.consume();\n\t}\n\n\tthis.selectedIcon = this.icon;\n\tthis.icon = null;\n};\n\n/**\n * Function: isImmediateConnectSource\n * \n * Returns true if a tap on the given source state should immediately start\n * connecting. This implementation returns true if the state is not movable\n * in the graph. \n */\nmxConnectionHandler.prototype.isImmediateConnectSource = function(state)\n{\n\treturn !this.graph.isCellMovable(state.cell);\n};\n\n/**\n * Function: createEdgeState\n * \n * Hook to return an <mxCellState> which may be used during the preview.\n * This implementation returns null.\n * \n * Use the following code to create a preview for an existing edge style:\n * \n * (code)\n * graph.connectionHandler.createEdgeState = function(me)\n * {\n *   var edge = graph.createEdge(null, null, null, null, null, 'edgeStyle=elbowEdgeStyle');\n *   \n *   return new mxCellState(this.graph.view, edge, this.graph.getCellStyle(edge));\n * };\n * (end)\n */\nmxConnectionHandler.prototype.createEdgeState = function(me)\n{\n\treturn null;\n};\n\n/**\n * Function: isOutlineConnectEvent\n * \n * Returns true if <outlineConnect> is true and the source of the event is the outline shape\n * or shift is pressed.\n */\nmxConnectionHandler.prototype.isOutlineConnectEvent = function(me)\n{\n\tvar offset = mxUtils.getOffset(this.graph.container);\n\tvar evt = me.getEvent();\n\t\n\tvar clientX = mxEvent.getClientX(evt);\n\tvar clientY = mxEvent.getClientY(evt);\n\t\n\tvar doc = document.documentElement;\n\tvar left = (window.pageXOffset || doc.scrollLeft) - (doc.clientLeft || 0);\n\tvar top = (window.pageYOffset || doc.scrollTop)  - (doc.clientTop || 0);\n\t\n\tvar gridX = this.currentPoint.x - this.graph.container.scrollLeft + offset.x - left;\n\tvar gridY = this.currentPoint.y - this.graph.container.scrollTop + offset.y - top;\n\n\treturn this.outlineConnect && !mxEvent.isShiftDown(me.getEvent()) &&\n\t\t(me.isSource(this.marker.highlight.shape) ||\n\t\t(mxEvent.isAltDown(me.getEvent()) && me.getState() != null) ||\n\t\tthis.marker.highlight.isHighlightAt(clientX, clientY) ||\n\t\t((gridX != clientX || gridY != clientY) && me.getState() == null &&\n\t\tthis.marker.highlight.isHighlightAt(gridX, gridY)));\n};\n\n/**\n * Function: updateCurrentState\n * \n * Updates the current state for a given mouse move event by using\n * the <marker>.\n */\nmxConnectionHandler.prototype.updateCurrentState = function(me, point)\n{\n\tthis.constraintHandler.update(me, this.first == null, false, (this.first == null ||\n\t\tme.isSource(this.marker.highlight.shape)) ? null : point);\n\t\n\tif (this.constraintHandler.currentFocus != null && this.constraintHandler.currentConstraint != null)\n\t{\n\t\t// Handles special case where grid is large and connection point is at actual point in which\n\t\t// case the outline is not followed as long as we're < gridSize / 2 away from that point\n\t\tif (this.marker.highlight != null && this.marker.highlight.state != null &&\n\t\t\tthis.marker.highlight.state.cell == this.constraintHandler.currentFocus.cell)\n\t\t{\n\t\t\t// Direct repaint needed if cell already highlighted\n\t\t\tif (this.marker.highlight.shape.stroke != 'transparent')\n\t\t\t{\n\t\t\t\tthis.marker.highlight.shape.stroke = 'transparent';\n\t\t\t\tthis.marker.highlight.repaint();\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tthis.marker.markCell(this.constraintHandler.currentFocus.cell, 'transparent');\n\t\t}\n\n\t\t// Updates validation state\n\t\tif (this.previous != null)\n\t\t{\n\t\t\tthis.error = this.validateConnection(this.previous.cell, this.constraintHandler.currentFocus.cell);\n\t\t\t\n\t\t\tif (this.error == null)\n\t\t\t{\n\t\t\t\tthis.currentState = this.constraintHandler.currentFocus;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tthis.constraintHandler.reset();\n\t\t\t}\n\t\t}\n\t}\n\telse\n\t{\n\t\tif (this.graph.isIgnoreTerminalEvent(me.getEvent()))\n\t\t{\n\t\t\tthis.marker.reset();\n\t\t\tthis.currentState = null;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tthis.marker.process(me);\n\t\t\tthis.currentState = this.marker.getValidState();\n\t\t\t\n\t\t\tif (this.currentState != null && !this.isCellEnabled(this.currentState.cell))\n\t\t\t{\n\t\t\t\tthis.currentState = null;\n\t\t\t}\n\t\t}\n\n\t\tvar outline = this.isOutlineConnectEvent(me);\n\t\t\n\t\tif (this.currentState != null && outline)\n\t\t{\n\t\t\t// Handles special case where mouse is on outline away from actual end point\n\t\t\t// in which case the grid is ignored and mouse point is used instead\n\t\t\tif (me.isSource(this.marker.highlight.shape))\n\t\t\t{\n\t\t\t\tpoint = new mxPoint(me.getGraphX(), me.getGraphY());\n\t\t\t}\n\t\t\t\n\t\t\tvar constraint = this.graph.getOutlineConstraint(point, this.currentState, me);\n\t\t\tthis.constraintHandler.setFocus(me, this.currentState, false);\n\t\t\tthis.constraintHandler.currentConstraint = constraint;\n\t\t\tthis.constraintHandler.currentPoint = point;\n\t\t}\n\n\t\tif (this.outlineConnect)\n\t\t{\n\t\t\tif (this.marker.highlight != null && this.marker.highlight.shape != null)\n\t\t\t{\n\t\t\t\tvar s = this.graph.view.scale;\n\t\t\t\t\n\t\t\t\tif (this.constraintHandler.currentConstraint != null &&\n\t\t\t\t\tthis.constraintHandler.currentFocus != null)\n\t\t\t\t{\n\t\t\t\t\tthis.marker.highlight.shape.stroke = mxConstants.OUTLINE_HIGHLIGHT_COLOR;\n\t\t\t\t\tthis.marker.highlight.shape.strokewidth = mxConstants.OUTLINE_HIGHLIGHT_STROKEWIDTH / s / s;\n\t\t\t\t\tthis.marker.highlight.repaint();\n\t\t\t\t} \n\t\t\t\telse if (this.marker.hasValidState())\n\t\t\t\t{\n\t\t\t\t\t// Handles special case where actual end point of edge and current mouse point\n\t\t\t\t\t// are not equal (due to grid snapping) and there is no hit on shape or highlight\n\t\t\t\t\tif (this.marker.getValidState() != me.getState())\n\t\t\t\t\t{\n\t\t\t\t\t\tthis.marker.highlight.shape.stroke = 'transparent';\n\t\t\t\t\t\tthis.currentState = null;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tthis.marker.highlight.shape.stroke = mxConstants.DEFAULT_VALID_COLOR;\n\t\t\t\t\t}\n\t\n\t\t\t\t\tthis.marker.highlight.shape.strokewidth = mxConstants.HIGHLIGHT_STROKEWIDTH / s / s;\n\t\t\t\t\tthis.marker.highlight.repaint();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n};\n\n/**\n * Function: isCellEnabled\n * \n * Returns true if the given cell does not allow new connections to be created.\n */\nmxConnectionHandler.prototype.isCellEnabled = function(cell)\n{\n\treturn true;\n};\n\n/**\n * Function: convertWaypoint\n * \n * Converts the given point from screen coordinates to model coordinates.\n */\nmxConnectionHandler.prototype.convertWaypoint = function(point)\n{\n\tvar scale = this.graph.getView().getScale();\n\tvar tr = this.graph.getView().getTranslate();\n\t\n\tpoint.x = point.x / scale - tr.x;\n\tpoint.y = point.y / scale - tr.y;\n};\n\n/**\n * Function: snapToPreview\n * \n * Called to snap the given point to the current preview. This snaps to the\n * first point of the preview if alt is not pressed.\n */\nmxConnectionHandler.prototype.snapToPreview = function(me, point)\n{\n\tif (!mxEvent.isAltDown(me.getEvent()) && this.previous != null)\n\t{\n\t\tvar tol = this.graph.gridSize * this.graph.view.scale / 2;\t\n\t\tvar tmp = (this.sourceConstraint != null) ? this.first :\n\t\t\tnew mxPoint(this.previous.getCenterX(), this.previous.getCenterY());\n\n\t\tif (Math.abs(tmp.x - me.getGraphX()) < tol)\n\t\t{\n\t\t\tpoint.x = tmp.x;\n\t\t}\n\t\t\n\t\tif (Math.abs(tmp.y - me.getGraphY()) < tol)\n\t\t{\n\t\t\tpoint.y = tmp.y;\n\t\t}\n\t}\t\n};\n\n/**\n * Function: mouseMove\n * \n * Handles the event by updating the preview edge or by highlighting\n * a possible source or target terminal.\n */\nmxConnectionHandler.prototype.mouseMove = function(sender, me)\n{\n\tif (!me.isConsumed() && (this.ignoreMouseDown || this.first != null || !this.graph.isMouseDown))\n\t{\n\t\t// Handles special case when handler is disabled during highlight\n\t\tif (!this.isEnabled() && this.currentState != null)\n\t\t{\n\t\t\tthis.destroyIcons();\n\t\t\tthis.currentState = null;\n\t\t}\n\n\t\tvar view = this.graph.getView();\n\t\tvar scale = view.scale;\n\t\tvar tr = view.translate;\n\t\tvar point = new mxPoint(me.getGraphX(), me.getGraphY());\n\t\tthis.error = null;\n\n\t\tif (this.graph.isGridEnabledEvent(me.getEvent()))\n\t\t{\n\t\t\tpoint = new mxPoint((this.graph.snap(point.x / scale - tr.x) + tr.x) * scale,\n\t\t\t\t(this.graph.snap(point.y / scale - tr.y) + tr.y) * scale);\n\t\t}\n\t\t\n\t\tthis.snapToPreview(me, point);\n\t\tthis.currentPoint = point;\n\t\t\n\t\tif ((this.first != null || (this.isEnabled() && this.graph.isEnabled())) &&\n\t\t\t(this.shape != null || this.first == null ||\n\t\t\tMath.abs(me.getGraphX() - this.first.x) > this.graph.tolerance ||\n\t\t\tMath.abs(me.getGraphY() - this.first.y) > this.graph.tolerance))\n\t\t{\n\t\t\tthis.updateCurrentState(me, point);\n\t\t}\n\n\t\tif (this.first != null)\n\t\t{\n\t\t\tvar constraint = null;\n\t\t\tvar current = point;\n\t\t\t\n\t\t\t// Uses the current point from the constraint handler if available\n\t\t\tif (this.constraintHandler.currentConstraint != null &&\n\t\t\t\tthis.constraintHandler.currentFocus != null &&\n\t\t\t\tthis.constraintHandler.currentPoint != null)\n\t\t\t{\n\t\t\t\tconstraint = this.constraintHandler.currentConstraint;\n\t\t\t\tcurrent = this.constraintHandler.currentPoint.clone();\n\t\t\t}\n\t\t\telse if (this.previous != null && !this.graph.isIgnoreTerminalEvent(me.getEvent()) &&\n\t\t\t\tmxEvent.isShiftDown(me.getEvent()))\n\t\t\t{\n\t\t\t\tif (Math.abs(this.previous.getCenterX() - point.x) <\n\t\t\t\t\tMath.abs(this.previous.getCenterY() - point.y))\n\t\t\t\t{\n\t\t\t\t\tpoint.x = this.previous.getCenterX();\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tpoint.y = this.previous.getCenterY();\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tvar pt2 = this.first;\n\t\t\t\n\t\t\t// Moves the connect icon with the mouse\n\t\t\tif (this.selectedIcon != null)\n\t\t\t{\n\t\t\t\tvar w = this.selectedIcon.bounds.width;\n\t\t\t\tvar h = this.selectedIcon.bounds.height;\n\t\t\t\t\n\t\t\t\tif (this.currentState != null && this.targetConnectImage)\n\t\t\t\t{\n\t\t\t\t\tvar pos = this.getIconPosition(this.selectedIcon, this.currentState);\n\t\t\t\t\tthis.selectedIcon.bounds.x = pos.x;\n\t\t\t\t\tthis.selectedIcon.bounds.y = pos.y;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tvar bounds = new mxRectangle(me.getGraphX() + this.connectIconOffset.x,\n\t\t\t\t\t\tme.getGraphY() + this.connectIconOffset.y, w, h);\n\t\t\t\t\tthis.selectedIcon.bounds = bounds;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tthis.selectedIcon.redraw();\n\t\t\t}\n\n\t\t\t// Uses edge state to compute the terminal points\n\t\t\tif (this.edgeState != null)\n\t\t\t{\n\t\t\t\tthis.updateEdgeState(current, constraint);\n\t\t\t\tcurrent = this.edgeState.absolutePoints[this.edgeState.absolutePoints.length - 1];\n\t\t\t\tpt2 = this.edgeState.absolutePoints[0];\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif (this.currentState != null)\n\t\t\t\t{\n\t\t\t\t\tif (this.constraintHandler.currentConstraint == null)\n\t\t\t\t\t{\n\t\t\t\t\t\tvar tmp = this.getTargetPerimeterPoint(this.currentState, me);\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (tmp != null)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcurrent = tmp;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// Computes the source perimeter point\n\t\t\t\tif (this.sourceConstraint == null && this.previous != null)\n\t\t\t\t{\n\t\t\t\t\tvar next = (this.waypoints != null && this.waypoints.length > 0) ?\n\t\t\t\t\t\t\tthis.waypoints[0] : current;\n\t\t\t\t\tvar tmp = this.getSourcePerimeterPoint(this.previous, next, me);\n\t\t\t\t\t\n\t\t\t\t\tif (tmp != null)\n\t\t\t\t\t{\n\t\t\t\t\t\tpt2 = tmp;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Makes sure the cell under the mousepointer can be detected\n\t\t\t// by moving the preview shape away from the mouse. This\n\t\t\t// makes sure the preview shape does not prevent the detection\n\t\t\t// of the cell under the mousepointer even for slow gestures.\n\t\t\tif (this.currentState == null && this.movePreviewAway)\n\t\t\t{\n\t\t\t\tvar tmp = pt2; \n\t\t\t\t\n\t\t\t\tif (this.edgeState != null && this.edgeState.absolutePoints.length >= 2)\n\t\t\t\t{\n\t\t\t\t\tvar tmp2 = this.edgeState.absolutePoints[this.edgeState.absolutePoints.length - 2];\n\t\t\t\t\t\n\t\t\t\t\tif (tmp2 != null)\n\t\t\t\t\t{\n\t\t\t\t\t\ttmp = tmp2;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tvar dx = current.x - tmp.x;\n\t\t\t\tvar dy = current.y - tmp.y;\n\t\t\t\t\n\t\t\t\tvar len = Math.sqrt(dx * dx + dy * dy);\n\t\t\t\t\n\t\t\t\tif (len == 0)\n\t\t\t\t{\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// Stores old point to reuse when creating edge\n\t\t\t\tthis.originalPoint = current.clone();\n\t\t\t\tcurrent.x -= dx * 4 / len;\n\t\t\t\tcurrent.y -= dy * 4 / len;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tthis.originalPoint = null;\n\t\t\t}\n\t\t\t\n\t\t\t// Creates the preview shape (lazy)\n\t\t\tif (this.shape == null)\n\t\t\t{\n\t\t\t\tvar dx = Math.abs(me.getGraphX() - this.first.x);\n\t\t\t\tvar dy = Math.abs(me.getGraphY() - this.first.y);\n\n\t\t\t\tif (dx > this.graph.tolerance || dy > this.graph.tolerance)\n\t\t\t\t{\n\t\t\t\t\tthis.shape = this.createShape();\n\n\t\t\t\t\tif (this.edgeState != null)\n\t\t\t\t\t{\n\t\t\t\t\t\tthis.shape.apply(this.edgeState);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// Revalidates current connection\n\t\t\t\t\tthis.updateCurrentState(me, point);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Updates the points in the preview edge\n\t\t\tif (this.shape != null)\n\t\t\t{\n\t\t\t\tif (this.edgeState != null)\n\t\t\t\t{\n\t\t\t\t\tthis.shape.points = this.edgeState.absolutePoints;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tvar pts = [pt2];\n\t\t\t\t\t\n\t\t\t\t\tif (this.waypoints != null)\n\t\t\t\t\t{\n\t\t\t\t\t\tpts = pts.concat(this.waypoints);\n\t\t\t\t\t}\n\n\t\t\t\t\tpts.push(current);\n\t\t\t\t\tthis.shape.points = pts;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tthis.drawPreview();\n\t\t\t}\n\t\t\t\n\t\t\t// Makes sure endpoint of edge is visible during connect\n\t\t\tif (this.cursor != null)\n\t\t\t{\n\t\t\t\tthis.graph.container.style.cursor = this.cursor;\n\t\t\t}\n\t\t\t\n\t\t\tmxEvent.consume(me.getEvent());\n\t\t\tme.consume();\n\t\t}\n\t\telse if (!this.isEnabled() || !this.graph.isEnabled())\n\t\t{\n\t\t\tthis.constraintHandler.reset();\n\t\t}\n\t\telse if (this.previous != this.currentState && this.edgeState == null)\n\t\t{\n\t\t\tthis.destroyIcons();\n\t\t\t\n\t\t\t// Sets the cursor on the current shape\t\t\t\t\n\t\t\tif (this.currentState != null && this.error == null && this.constraintHandler.currentConstraint == null)\n\t\t\t{\n\t\t\t\tthis.icons = this.createIcons(this.currentState);\n\n\t\t\t\tif (this.icons == null)\n\t\t\t\t{\n\t\t\t\t\tthis.currentState.setCursor(mxConstants.CURSOR_CONNECT);\n\t\t\t\t\tme.consume();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tthis.previous = this.currentState;\n\t\t}\n\t\telse if (this.previous == this.currentState && this.currentState != null && this.icons == null &&\n\t\t\t!this.graph.isMouseDown)\n\t\t{\n\t\t\t// Makes sure that no cursors are changed\n\t\t\tme.consume();\n\t\t}\n\n\t\tif (!this.graph.isMouseDown && this.currentState != null && this.icons != null)\n\t\t{\n\t\t\tvar hitsIcon = false;\n\t\t\tvar target = me.getSource();\n\t\t\t\n\t\t\tfor (var i = 0; i < this.icons.length && !hitsIcon; i++)\n\t\t\t{\n\t\t\t\thitsIcon = target == this.icons[i].node || target.parentNode == this.icons[i].node;\n\t\t\t}\n\n\t\t\tif (!hitsIcon)\n\t\t\t{\n\t\t\t\tthis.updateIcons(this.currentState, this.icons, me);\n\t\t\t}\n\t\t}\n\t}\n\telse\n\t{\n\t\tthis.constraintHandler.reset();\n\t}\n};\n\n/**\n * Function: updateEdgeState\n * \n * Updates <edgeState>.\n */\nmxConnectionHandler.prototype.updateEdgeState = function(current, constraint)\n{\n\t// TODO: Use generic method for writing constraint to style\n\tif (this.sourceConstraint != null && this.sourceConstraint.point != null)\n\t{\n\t\tthis.edgeState.style[mxConstants.STYLE_EXIT_X] = this.sourceConstraint.point.x;\n\t\tthis.edgeState.style[mxConstants.STYLE_EXIT_Y] = this.sourceConstraint.point.y;\n\t}\n\n\tif (constraint != null && constraint.point != null)\n\t{\n\t\tthis.edgeState.style[mxConstants.STYLE_ENTRY_X] = constraint.point.x;\n\t\tthis.edgeState.style[mxConstants.STYLE_ENTRY_Y] = constraint.point.y;\n\t}\n\telse\n\t{\n\t\tdelete this.edgeState.style[mxConstants.STYLE_ENTRY_X];\n\t\tdelete this.edgeState.style[mxConstants.STYLE_ENTRY_Y];\n\t}\n\t\n\tthis.edgeState.absolutePoints = [null, (this.currentState != null) ? null : current];\n\tthis.graph.view.updateFixedTerminalPoint(this.edgeState, this.previous, true, this.sourceConstraint);\n\t\n\tif (this.currentState != null)\n\t{\n\t\tif (constraint == null)\n\t\t{\n\t\t\tconstraint = this.graph.getConnectionConstraint(this.edgeState, this.previous, false);\n\t\t}\n\t\t\n\t\tthis.edgeState.setAbsoluteTerminalPoint(null, false);\n\t\tthis.graph.view.updateFixedTerminalPoint(this.edgeState, this.currentState, false, constraint);\n\t}\n\t\n\t// Scales and translates the waypoints to the model\n\tvar realPoints = null;\n\t\n\tif (this.waypoints != null)\n\t{\n\t\trealPoints = [];\n\t\t\n\t\tfor (var i = 0; i < this.waypoints.length; i++)\n\t\t{\n\t\t\tvar pt = this.waypoints[i].clone();\n\t\t\tthis.convertWaypoint(pt);\n\t\t\trealPoints[i] = pt;\n\t\t}\n\t}\n\t\n\tthis.graph.view.updatePoints(this.edgeState, realPoints, this.previous, this.currentState);\n\tthis.graph.view.updateFloatingTerminalPoints(this.edgeState, this.previous, this.currentState);\n};\n\n/**\n * Function: getTargetPerimeterPoint\n * \n * Returns the perimeter point for the given target state.\n * \n * Parameters:\n * \n * state - <mxCellState> that represents the target cell state.\n * me - <mxMouseEvent> that represents the mouse move.\n */\nmxConnectionHandler.prototype.getTargetPerimeterPoint = function(state, me)\n{\n\tvar result = null;\n\tvar view = state.view;\n\tvar targetPerimeter = view.getPerimeterFunction(state);\n\t\n\tif (targetPerimeter != null)\n\t{\n\t\tvar next = (this.waypoints != null && this.waypoints.length > 0) ?\n\t\t\t\tthis.waypoints[this.waypoints.length - 1] :\n\t\t\t\tnew mxPoint(this.previous.getCenterX(), this.previous.getCenterY());\n\t\tvar tmp = targetPerimeter(view.getPerimeterBounds(state),\n\t\t\tthis.edgeState, next, false);\n\t\t\t\n\t\tif (tmp != null)\n\t\t{\n\t\t\tresult = tmp;\n\t\t}\n\t}\n\telse\n\t{\n\t\tresult = new mxPoint(state.getCenterX(), state.getCenterY());\n\t}\n\t\n\treturn result;\n};\n\n/**\n * Function: getSourcePerimeterPoint\n * \n * Hook to update the icon position(s) based on a mouseOver event. This is\n * an empty implementation.\n * \n * Parameters:\n * \n * state - <mxCellState> that represents the target cell state.\n * next - <mxPoint> that represents the next point along the previewed edge.\n * me - <mxMouseEvent> that represents the mouse move.\n */\nmxConnectionHandler.prototype.getSourcePerimeterPoint = function(state, next, me)\n{\n\tvar result = null;\n\tvar view = state.view;\n\tvar sourcePerimeter = view.getPerimeterFunction(state);\n\tvar c = new mxPoint(state.getCenterX(), state.getCenterY());\n\t\n\tif (sourcePerimeter != null)\n\t{\n\t\tvar theta = mxUtils.getValue(state.style, mxConstants.STYLE_ROTATION, 0);\n\t\tvar rad = -theta * (Math.PI / 180);\n\t\t\n\t\tif (theta != 0)\n\t\t{\n\t\t\tnext = mxUtils.getRotatedPoint(new mxPoint(next.x, next.y), Math.cos(rad), Math.sin(rad), c);\n\t\t}\n\t\t\n\t\tvar tmp = sourcePerimeter(view.getPerimeterBounds(state), state, next, false);\n\t\t\t\n\t\tif (tmp != null)\n\t\t{\n\t\t\tif (theta != 0)\n\t\t\t{\n\t\t\t\ttmp = mxUtils.getRotatedPoint(new mxPoint(tmp.x, tmp.y), Math.cos(-rad), Math.sin(-rad), c);\n\t\t\t}\n\t\t\t\n\t\t\tresult = tmp;\n\t\t}\n\t}\n\telse\n\t{\n\t\tresult = c;\n\t}\n\t\n\treturn result;\n};\n\n\n/**\n * Function: updateIcons\n * \n * Hook to update the icon position(s) based on a mouseOver event. This is\n * an empty implementation.\n * \n * Parameters:\n * \n * state - <mxCellState> under the mouse.\n * icons - Array of currently displayed icons.\n * me - <mxMouseEvent> that contains the mouse event.\n */\nmxConnectionHandler.prototype.updateIcons = function(state, icons, me)\n{\n\t// empty\n};\n\n/**\n * Function: isStopEvent\n * \n * Returns true if the given mouse up event should stop this handler. The\n * connection will be created if <error> is null. Note that this is only\n * called if <waypointsEnabled> is true. This implemtation returns true\n * if there is a cell state in the given event.\n */\nmxConnectionHandler.prototype.isStopEvent = function(me)\n{\n\treturn me.getState() != null;\n};\n\n/**\n * Function: addWaypoint\n * \n * Adds the waypoint for the given event to <waypoints>.\n */\nmxConnectionHandler.prototype.addWaypointForEvent = function(me)\n{\n\tvar point = mxUtils.convertPoint(this.graph.container, me.getX(), me.getY());\n\tvar dx = Math.abs(point.x - this.first.x);\n\tvar dy = Math.abs(point.y - this.first.y);\n\tvar addPoint = this.waypoints != null || (this.mouseDownCounter > 1 &&\n\t\t\t(dx > this.graph.tolerance || dy > this.graph.tolerance));\n\n\tif (addPoint)\n\t{\n\t\tif (this.waypoints == null)\n\t\t{\n\t\t\tthis.waypoints = [];\n\t\t}\n\t\t\n\t\tvar scale = this.graph.view.scale;\n\t\tvar point = new mxPoint(this.graph.snap(me.getGraphX() / scale) * scale,\n\t\t\t\tthis.graph.snap(me.getGraphY() / scale) * scale);\n\t\tthis.waypoints.push(point);\n\t}\n};\n\n/**\n * Function: checkConstraints\n * \n * Returns true if the connection for the given constraints is valid. This\n * implementation returns true if the constraints are not pointing to the\n * same fixed connection point.\n */\nmxConnectionHandler.prototype.checkConstraints = function(c1, c2)\n{\n\treturn (c1 == null || c2 == null || c1.point == null || c2.point == null ||\n\t\t!c1.point.equals(c2.point) || c1.perimeter != c2.perimeter);\n};\n\n/**\n * Function: mouseUp\n * \n * Handles the event by inserting the new connection.\n */\nmxConnectionHandler.prototype.mouseUp = function(sender, me)\n{\n\tif (!me.isConsumed() && this.isConnecting())\n\t{\n\t\tif (this.waypointsEnabled && !this.isStopEvent(me))\n\t\t{\n\t\t\tthis.addWaypointForEvent(me);\n\t\t\tme.consume();\n\t\t\t\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tvar c1 = this.sourceConstraint;\n\t\tvar c2 = this.constraintHandler.currentConstraint;\n\n\t\tvar source = (this.previous != null) ? this.previous.cell : null;\n\t\tvar target = null;\n\t\t\n\t\tif (this.constraintHandler.currentConstraint != null &&\n\t\t\tthis.constraintHandler.currentFocus != null)\n\t\t{\n\t\t\ttarget = this.constraintHandler.currentFocus.cell;\n\t\t}\n\t\t\n\t\tif (target == null && this.currentState != null)\n\t\t{\n\t\t\ttarget = this.currentState.cell;\n\t\t}\n\t\t\n\t\t// Inserts the edge if no validation error exists and if constraints differ\n\t\tif (this.error == null && (source == null || target == null ||\n\t\t\tsource != target || this.checkConstraints(c1, c2)))\n\t\t{\n\t\t\tthis.connect(source, target, me.getEvent(), me.getCell());\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Selects the source terminal for self-references\n\t\t\tif (this.previous != null && this.marker.validState != null &&\n\t\t\t\tthis.previous.cell == this.marker.validState.cell)\n\t\t\t{\n\t\t\t\tthis.graph.selectCellForEvent(this.marker.source, me.getEvent());\n\t\t\t}\n\t\t\t\n\t\t\t// Displays the error message if it is not an empty string,\n\t\t\t// for empty error messages, the event is silently dropped\n\t\t\tif (this.error != null && this.error.length > 0)\n\t\t\t{\n\t\t\t\tthis.graph.validationAlert(this.error);\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Redraws the connect icons and resets the handler state\n\t\tthis.destroyIcons();\n\t\tme.consume();\n\t}\n\n\tif (this.first != null)\n\t{\n\t\tthis.reset();\n\t}\n};\n\n/**\n * Function: reset\n * \n * Resets the state of this handler.\n */\nmxConnectionHandler.prototype.reset = function()\n{\n\tif (this.shape != null)\n\t{\n\t\tthis.shape.destroy();\n\t\tthis.shape = null;\n\t}\n\t\n\t// Resets the cursor on the container\n\tif (this.cursor != null && this.graph.container != null)\n\t{\n\t\tthis.graph.container.style.cursor = '';\n\t}\n\t\n\tthis.destroyIcons();\n\tthis.marker.reset();\n\tthis.constraintHandler.reset();\n\tthis.originalPoint = null;\n\tthis.currentPoint = null;\n\tthis.edgeState = null;\n\tthis.previous = null;\n\tthis.error = null;\n\tthis.sourceConstraint = null;\n\tthis.mouseDownCounter = 0;\n\tthis.first = null;\n\n\tthis.fireEvent(new mxEventObject(mxEvent.RESET));\n};\n\n/**\n * Function: drawPreview\n * \n * Redraws the preview edge using the color and width returned by\n * <getEdgeColor> and <getEdgeWidth>.\n */\nmxConnectionHandler.prototype.drawPreview = function()\n{\n\tthis.updatePreview(this.error == null);\n\tthis.shape.redraw();\n};\n\n/**\n * Function: getEdgeColor\n * \n * Returns the color used to draw the preview edge. This returns green if\n * there is no edge validation error and red otherwise.\n * \n * Parameters:\n * \n * valid - Boolean indicating if the color for a valid edge should be\n * returned.\n */\nmxConnectionHandler.prototype.updatePreview = function(valid)\n{\n\tthis.shape.strokewidth = this.getEdgeWidth(valid);\n\tthis.shape.stroke = this.getEdgeColor(valid);\n};\n\n/**\n * Function: getEdgeColor\n * \n * Returns the color used to draw the preview edge. This returns green if\n * there is no edge validation error and red otherwise.\n * \n * Parameters:\n * \n * valid - Boolean indicating if the color for a valid edge should be\n * returned.\n */\nmxConnectionHandler.prototype.getEdgeColor = function(valid)\n{\n\treturn (valid) ? mxConstants.VALID_COLOR : mxConstants.INVALID_COLOR;\n};\n\t\n/**\n * Function: getEdgeWidth\n * \n * Returns the width used to draw the preview edge. This returns 3 if\n * there is no edge validation error and 1 otherwise.\n * \n * Parameters:\n * \n * valid - Boolean indicating if the width for a valid edge should be\n * returned.\n */\nmxConnectionHandler.prototype.getEdgeWidth = function(valid)\n{\n\treturn (valid) ? 3 : 1;\n};\n\n/**\n * Function: connect\n * \n * Connects the given source and target using a new edge. This\n * implementation uses <createEdge> to create the edge.\n * \n * Parameters:\n * \n * source - <mxCell> that represents the source terminal.\n * target - <mxCell> that represents the target terminal.\n * evt - Mousedown event of the connect gesture.\n * dropTarget - <mxCell> that represents the cell under the mouse when it was\n * released.\n */\nmxConnectionHandler.prototype.connect = function(source, target, evt, dropTarget)\n{\n\tif (target != null || this.isCreateTarget(evt) || this.graph.allowDanglingEdges)\n\t{\n\t\t// Uses the common parent of source and target or\n\t\t// the default parent to insert the edge\n\t\tvar model = this.graph.getModel();\n\t\tvar terminalInserted = false;\n\t\tvar edge = null;\n\n\t\tmodel.beginUpdate();\n\t\ttry\n\t\t{\n\t\t\tif (source != null && target == null && !this.graph.isIgnoreTerminalEvent(evt) && this.isCreateTarget(evt))\n\t\t\t{\n\t\t\t\ttarget = this.createTargetVertex(evt, source);\n\t\t\t\t\n\t\t\t\tif (target != null)\n\t\t\t\t{\n\t\t\t\t\tdropTarget = this.graph.getDropTarget([target], evt, dropTarget);\n\t\t\t\t\tterminalInserted = true;\n\t\t\t\t\t\n\t\t\t\t\t// Disables edges as drop targets if the target cell was created\n\t\t\t\t\t// FIXME: Should not shift if vertex was aligned (same in Java)\n\t\t\t\t\tif (dropTarget == null || !this.graph.getModel().isEdge(dropTarget))\n\t\t\t\t\t{\n\t\t\t\t\t\tvar pstate = this.graph.getView().getState(dropTarget);\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (pstate != null)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tvar tmp = model.getGeometry(target);\n\t\t\t\t\t\t\ttmp.x -= pstate.origin.x;\n\t\t\t\t\t\t\ttmp.y -= pstate.origin.y;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tdropTarget = this.graph.getDefaultParent();\n\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\tthis.graph.addCell(target, dropTarget);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tvar parent = this.graph.getDefaultParent();\n\n\t\t\tif (source != null && target != null &&\n\t\t\t\tmodel.getParent(source) == model.getParent(target) &&\n\t\t\t\tmodel.getParent(model.getParent(source)) != model.getRoot())\n\t\t\t{\n\t\t\t\tparent = model.getParent(source);\n\n\t\t\t\tif ((source.geometry != null && source.geometry.relative) &&\n\t\t\t\t\t(target.geometry != null && target.geometry.relative))\n\t\t\t\t{\n\t\t\t\t\tparent = model.getParent(parent);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// Uses the value of the preview edge state for inserting\n\t\t\t// the new edge into the graph\n\t\t\tvar value = null;\n\t\t\tvar style = null;\n\t\t\t\n\t\t\tif (this.edgeState != null)\n\t\t\t{\n\t\t\t\tvalue = this.edgeState.cell.value;\n\t\t\t\tstyle = this.edgeState.cell.style;\n\t\t\t}\n\n\t\t\tedge = this.insertEdge(parent, null, value, source, target, style);\n\t\t\t\n\t\t\tif (edge != null)\n\t\t\t{\n\t\t\t\t// Updates the connection constraints\n\t\t\t\tthis.graph.setConnectionConstraint(edge, source, true, this.sourceConstraint);\n\t\t\t\tthis.graph.setConnectionConstraint(edge, target, false, this.constraintHandler.currentConstraint);\n\t\t\t\t\n\t\t\t\t// Uses geometry of the preview edge state\n\t\t\t\tif (this.edgeState != null)\n\t\t\t\t{\n\t\t\t\t\tmodel.setGeometry(edge, this.edgeState.cell.geometry);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tvar parent = model.getParent(source);\n\t\t\t\t\n\t\t\t\t// Inserts edge before source\n\t\t\t\tif (this.isInsertBefore(edge, source, target, evt, dropTarget))\n\t\t\t\t{\n\t\t\t\t\tvar index = null;\n\t\t\t\t\tvar tmp = source;\n\n\t\t\t\t\twhile (tmp.parent != null && tmp.geometry != null &&\n\t\t\t\t\t\ttmp.geometry.relative && tmp.parent != edge.parent)\n\t\t\t\t\t{\n\t\t\t\t\t\ttmp = this.graph.model.getParent(tmp);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (tmp != null && tmp.parent != null && tmp.parent == edge.parent)\n\t\t\t\t\t{\n\t\t\t\t\t\tmodel.add(parent, edge, tmp.parent.getIndex(tmp));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// Makes sure the edge has a non-null, relative geometry\n\t\t\t\tvar geo = model.getGeometry(edge);\n\n\t\t\t\tif (geo == null)\n\t\t\t\t{\n\t\t\t\t\tgeo = new mxGeometry();\n\t\t\t\t\tgeo.relative = true;\n\t\t\t\t\t\n\t\t\t\t\tmodel.setGeometry(edge, geo);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// Uses scaled waypoints in geometry\n\t\t\t\tif (this.waypoints != null && this.waypoints.length > 0)\n\t\t\t\t{\n\t\t\t\t\tvar s = this.graph.view.scale;\n\t\t\t\t\tvar tr = this.graph.view.translate;\n\t\t\t\t\tgeo.points = [];\n\t\t\t\t\t\n\t\t\t\t\tfor (var i = 0; i < this.waypoints.length; i++)\n\t\t\t\t\t{\n\t\t\t\t\t\tvar pt = this.waypoints[i];\n\t\t\t\t\t\tgeo.points.push(new mxPoint(pt.x / s - tr.x, pt.y / s - tr.y));\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (target == null)\n\t\t\t\t{\n\t\t\t\t\tvar t = this.graph.view.translate;\n\t\t\t\t\tvar s = this.graph.view.scale;\n\t\t\t\t\tvar pt = (this.originalPoint != null) ?\n\t\t\t\t\t\t\tnew mxPoint(this.originalPoint.x / s - t.x, this.originalPoint.y / s - t.y) :\n\t\t\t\t\t\tnew mxPoint(this.currentPoint.x / s - t.x, this.currentPoint.y / s - t.y);\n\t\t\t\t\tpt.x -= this.graph.panDx / this.graph.view.scale;\n\t\t\t\t\tpt.y -= this.graph.panDy / this.graph.view.scale;\n\t\t\t\t\tgeo.setTerminalPoint(pt, false);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tthis.fireEvent(new mxEventObject(mxEvent.CONNECT, 'cell', edge, 'terminal', target,\n\t\t\t\t\t'event', evt, 'target', dropTarget, 'terminalInserted', terminalInserted));\n\t\t\t}\n\t\t}\n\t\tcatch (e)\n\t\t{\n\t\t\tmxLog.show();\n\t\t\tmxLog.debug(e.message);\n\t\t}\n\t\tfinally\n\t\t{\n\t\t\tmodel.endUpdate();\n\t\t}\n\t\t\n\t\tif (this.select)\n\t\t{\n\t\t\tthis.selectCells(edge, (terminalInserted) ? target : null);\n\t\t}\n\t}\n};\n\n/**\n * Function: selectCells\n * \n * Selects the given edge after adding a new connection. The target argument\n * contains the target vertex if one has been inserted.\n */\nmxConnectionHandler.prototype.selectCells = function(edge, target)\n{\n\tthis.graph.setSelectionCell(edge);\n};\n\n/**\n * Function: insertEdge\n * \n * Creates, inserts and returns the new edge for the given parameters. This\n * implementation does only use <createEdge> if <factoryMethod> is defined,\n * otherwise <mxGraph.insertEdge> will be used.\n */\nmxConnectionHandler.prototype.insertEdge = function(parent, id, value, source, target, style)\n{\n\tif (this.factoryMethod == null)\n\t{\n\t\treturn this.graph.insertEdge(parent, id, value, source, target, style);\n\t}\n\telse\n\t{\n\t\tvar edge = this.createEdge(value, source, target, style);\n\t\tedge = this.graph.addEdge(edge, parent, source, target);\n\t\t\n\t\treturn edge;\n\t}\n};\n\n/**\n * Function: createTargetVertex\n * \n * Hook method for creating new vertices on the fly if no target was\n * under the mouse. This is only called if <createTarget> is true and\n * returns null.\n * \n * Parameters:\n * \n * evt - Mousedown event of the connect gesture.\n * source - <mxCell> that represents the source terminal.\n */\nmxConnectionHandler.prototype.createTargetVertex = function(evt, source)\n{\n\t// Uses the first non-relative source\n\tvar geo = this.graph.getCellGeometry(source);\n\t\n\twhile (geo != null && geo.relative)\n\t{\n\t\tsource = this.graph.getModel().getParent(source);\n\t\tgeo = this.graph.getCellGeometry(source);\n\t}\n\t\n\tvar clone = this.graph.cloneCell(source);\n\tvar geo = this.graph.getModel().getGeometry(clone);\n\t\n\tif (geo != null)\n\t{\n\t\tvar t = this.graph.view.translate;\n\t\tvar s = this.graph.view.scale;\n\t\tvar point = new mxPoint(this.currentPoint.x / s - t.x, this.currentPoint.y / s - t.y);\n\t\tgeo.x = Math.round(point.x - geo.width / 2 - this.graph.panDx / s);\n\t\tgeo.y = Math.round(point.y - geo.height / 2 - this.graph.panDy / s);\n\n\t\t// Aligns with source if within certain tolerance\n\t\tvar tol = this.getAlignmentTolerance();\n\t\t\n\t\tif (tol > 0)\n\t\t{\n\t\t\tvar sourceState = this.graph.view.getState(source);\n\t\t\t\n\t\t\tif (sourceState != null)\n\t\t\t{\n\t\t\t\tvar x = sourceState.x / s - t.x;\n\t\t\t\tvar y = sourceState.y / s - t.y;\n\t\t\t\t\n\t\t\t\tif (Math.abs(x - geo.x) <= tol)\n\t\t\t\t{\n\t\t\t\t\tgeo.x = Math.round(x);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (Math.abs(y - geo.y) <= tol)\n\t\t\t\t{\n\t\t\t\t\tgeo.y = Math.round(y);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn clone;\t\t\n};\n\n/**\n * Function: getAlignmentTolerance\n * \n * Returns the tolerance for aligning new targets to sources. This returns the grid size / 2.\n */\nmxConnectionHandler.prototype.getAlignmentTolerance = function(evt)\n{\n\treturn (this.graph.isGridEnabled()) ? this.graph.gridSize / 2 : this.graph.tolerance;\n};\n\n/**\n * Function: createEdge\n * \n * Creates and returns a new edge using <factoryMethod> if one exists. If\n * no factory method is defined, then a new default edge is returned. The\n * source and target arguments are informal, the actual connection is\n * setup later by the caller of this function.\n * \n * Parameters:\n * \n * value - Value to be used for creating the edge.\n * source - <mxCell> that represents the source terminal.\n * target - <mxCell> that represents the target terminal.\n * style - Optional style from the preview edge.\n */\nmxConnectionHandler.prototype.createEdge = function(value, source, target, style)\n{\n\tvar edge = null;\n\t\n\t// Creates a new edge using the factoryMethod\n\tif (this.factoryMethod != null)\n\t{\n\t\tedge = this.factoryMethod(source, target, style);\n\t}\n\t\n\tif (edge == null)\n\t{\n\t\tedge = new mxCell(value || '');\n\t\tedge.setEdge(true);\n\t\tedge.setStyle(style);\n\t\t\n\t\tvar geo = new mxGeometry();\n\t\tgeo.relative = true;\n\t\tedge.setGeometry(geo);\n\t}\n\n\treturn edge;\n};\n\n/**\n * Function: destroy\n * \n * Destroys the handler and all its resources and DOM nodes. This should be\n * called on all instances. It is called automatically for the built-in\n * instance created for each <mxGraph>.\n */\nmxConnectionHandler.prototype.destroy = function()\n{\n\tthis.graph.removeMouseListener(this);\n\t\n\tif (this.shape != null)\n\t{\n\t\tthis.shape.destroy();\n\t\tthis.shape = null;\n\t}\n\t\n\tif (this.marker != null)\n\t{\n\t\tthis.marker.destroy();\n\t\tthis.marker = null;\n\t}\n\n\tif (this.constraintHandler != null)\n\t{\n\t\tthis.constraintHandler.destroy();\n\t\tthis.constraintHandler = null;\n\t}\n\n\tif (this.changeHandler != null)\n\t{\n\t\tthis.graph.getModel().removeListener(this.changeHandler);\n\t\tthis.graph.getView().removeListener(this.changeHandler);\n\t\tthis.changeHandler = null;\n\t}\n\t\n\tif (this.drillHandler != null)\n\t{\n\t\tthis.graph.removeListener(this.drillHandler);\n\t\tthis.graph.getView().removeListener(this.drillHandler);\n\t\tthis.drillHandler = null;\n\t}\n\t\n\tif (this.escapeHandler != null)\n\t{\n\t\tthis.graph.removeListener(this.escapeHandler);\n\t\tthis.escapeHandler = null;\n\t}\n};\n"
  },
  {
    "path": "static/cherry/drawio_demo/src/js/handler/mxConstraintHandler.js",
    "content": "/**\n * Copyright (c) 2006-2015, JGraph Ltd\n * Copyright (c) 2006-2015, Gaudenz Alder\n */\n/**\n * Class: mxConstraintHandler\n *\n * Handles constraints on connection targets. This class is in charge of\n * showing fixed points when the mouse is over a vertex and handles constraints\n * to establish new connections.\n *\n * Constructor: mxConstraintHandler\n *\n * Constructs an new constraint handler.\n * \n * Parameters:\n * \n * graph - Reference to the enclosing <mxGraph>.\n * factoryMethod - Optional function to create the edge. The function takes\n * the source and target <mxCell> as the first and second argument and\n * returns the <mxCell> that represents the new edge.\n */\nfunction mxConstraintHandler(graph)\n{\n\tthis.graph = graph;\n\t\n\t// Adds a graph model listener to update the current focus on changes\n\tthis.resetHandler = mxUtils.bind(this, function(sender, evt)\n\t{\n\t\tif (this.currentFocus != null && this.graph.view.getState(this.currentFocus.cell) == null)\n\t\t{\n\t\t\tthis.reset();\n\t\t}\n\t\telse\n\t\t{\n\t\t\tthis.redraw();\n\t\t}\n\t});\n\t\n\tthis.graph.model.addListener(mxEvent.CHANGE, this.resetHandler);\n\tthis.graph.view.addListener(mxEvent.SCALE_AND_TRANSLATE, this.resetHandler);\n\tthis.graph.view.addListener(mxEvent.TRANSLATE, this.resetHandler);\n\tthis.graph.view.addListener(mxEvent.SCALE, this.resetHandler);\n\tthis.graph.addListener(mxEvent.ROOT, this.resetHandler);\n};\n\n/**\n * Variable: pointImage\n * \n * <mxImage> to be used as the image for fixed connection points.\n */\nmxConstraintHandler.prototype.pointImage = new mxImage(mxClient.imageBasePath + '/point.gif', 5, 5);\n\n/**\n * Variable: graph\n * \n * Reference to the enclosing <mxGraph>.\n */\nmxConstraintHandler.prototype.graph = null;\n\n/**\n * Variable: enabled\n * \n * Specifies if events are handled. Default is true.\n */\nmxConstraintHandler.prototype.enabled = true;\n\n/**\n * Variable: highlightColor\n * \n * Specifies the color for the highlight. Default is <mxConstants.DEFAULT_VALID_COLOR>.\n */\nmxConstraintHandler.prototype.highlightColor = mxConstants.DEFAULT_VALID_COLOR;\n\n/**\n * Function: isEnabled\n * \n * Returns true if events are handled. This implementation\n * returns <enabled>.\n */\nmxConstraintHandler.prototype.isEnabled = function()\n{\n\treturn this.enabled;\n};\n\t\n/**\n * Function: setEnabled\n * \n * Enables or disables event handling. This implementation\n * updates <enabled>.\n * \n * Parameters:\n * \n * enabled - Boolean that specifies the new enabled state.\n */\nmxConstraintHandler.prototype.setEnabled = function(enabled)\n{\n\tthis.enabled = enabled;\n};\n\n/**\n * Function: reset\n * \n * Resets the state of this handler.\n */\nmxConstraintHandler.prototype.reset = function()\n{\n\tif (this.focusIcons != null)\n\t{\n\t\tfor (var i = 0; i < this.focusIcons.length; i++)\n\t\t{\n\t\t\tthis.focusIcons[i].destroy();\n\t\t}\n\t\t\n\t\tthis.focusIcons = null;\n\t}\n\t\n\tif (this.focusHighlight != null)\n\t{\n\t\tthis.focusHighlight.destroy();\n\t\tthis.focusHighlight = null;\n\t}\n\t\n\tthis.currentConstraint = null;\n\tthis.currentFocusArea = null;\n\tthis.currentPoint = null;\n\tthis.currentFocus = null;\n\tthis.focusPoints = null;\n};\n\n/**\n * Function: getTolerance\n * \n * Returns the tolerance to be used for intersecting connection points. This\n * implementation returns <mxGraph.tolerance>.\n * \n * Parameters:\n * \n * me - <mxMouseEvent> whose tolerance should be returned.\n */\nmxConstraintHandler.prototype.getTolerance = function(me)\n{\n\treturn this.graph.getTolerance();\n};\n\n/**\n * Function: getImageForConstraint\n * \n * Returns the tolerance to be used for intersecting connection points.\n */\nmxConstraintHandler.prototype.getImageForConstraint = function(state, constraint, point)\n{\n\treturn this.pointImage;\n};\n\n/**\n * Function: isEventIgnored\n * \n * Returns true if the given <mxMouseEvent> should be ignored in <update>. This\n * implementation always returns false.\n */\nmxConstraintHandler.prototype.isEventIgnored = function(me, source)\n{\n\treturn false;\n};\n\n/**\n * Function: isStateIgnored\n * \n * Returns true if the given state should be ignored. This always returns false.\n */\nmxConstraintHandler.prototype.isStateIgnored = function(state, source)\n{\n\treturn false;\n};\n\n/**\n * Function: destroyIcons\n * \n * Destroys the <focusIcons> if they exist.\n */\nmxConstraintHandler.prototype.destroyIcons = function()\n{\n\tif (this.focusIcons != null)\n\t{\n\t\tfor (var i = 0; i < this.focusIcons.length; i++)\n\t\t{\n\t\t\tthis.focusIcons[i].destroy();\n\t\t}\n\t\t\n\t\tthis.focusIcons = null;\n\t\tthis.focusPoints = null;\n\t}\n};\n\n/**\n * Function: destroyFocusHighlight\n * \n * Destroys the <focusHighlight> if one exists.\n */\nmxConstraintHandler.prototype.destroyFocusHighlight = function()\n{\n\tif (this.focusHighlight != null)\n\t{\n\t\tthis.focusHighlight.destroy();\n\t\tthis.focusHighlight = null;\n\t}\n};\n\n/**\n * Function: isKeepFocusEvent\n * \n * Returns true if the current focused state should not be changed for the given event.\n * This returns true if shift and alt are pressed.\n */\nmxConstraintHandler.prototype.isKeepFocusEvent = function(me)\n{\n\treturn mxEvent.isShiftDown(me.getEvent());\n};\n\n/**\n * Function: getCellForEvent\n * \n * Returns the cell for the given event.\n */\nmxConstraintHandler.prototype.getCellForEvent = function(me, point)\n{\n\tvar cell = me.getCell();\n\t\n\t// Gets cell under actual point if different from event location\n\tif (cell == null && point != null && (me.getGraphX() != point.x || me.getGraphY() != point.y))\n\t{\n\t\tcell = this.graph.getCellAt(point.x, point.y);\n\t}\n\t\n\t// Uses connectable parent vertex if one exists\n\tif (cell != null && !this.graph.isCellConnectable(cell))\n\t{\n\t\tvar parent = this.graph.getModel().getParent(cell);\n\t\t\n\t\tif (this.graph.getModel().isVertex(parent) && this.graph.isCellConnectable(parent))\n\t\t{\n\t\t\tcell = parent;\n\t\t}\n\t}\n\t\n\treturn (this.graph.isCellLocked(cell)) ? null : cell;\n};\n\n/**\n * Function: update\n * \n * Updates the state of this handler based on the given <mxMouseEvent>.\n * Source is a boolean indicating if the cell is a source or target.\n */\nmxConstraintHandler.prototype.update = function(me, source, existingEdge, point)\n{\n\tif (this.isEnabled() && !this.isEventIgnored(me))\n\t{\n\t\t// Lazy installation of mouseleave handler\n\t\tif (this.mouseleaveHandler == null && this.graph.container != null)\n\t\t{\n\t\t\tthis.mouseleaveHandler = mxUtils.bind(this, function()\n\t\t\t{\n\t\t\t\tthis.reset();\n\t\t\t});\n\n\t\t\tmxEvent.addListener(this.graph.container, 'mouseleave', this.resetHandler);\t\n\t\t}\n\t\t\n\t\tvar tol = this.getTolerance(me);\n\t\tvar x = (point != null) ? point.x : me.getGraphX();\n\t\tvar y = (point != null) ? point.y : me.getGraphY();\n\t\tvar grid = new mxRectangle(x - tol, y - tol, 2 * tol, 2 * tol);\n\t\tvar mouse = new mxRectangle(me.getGraphX() - tol, me.getGraphY() - tol, 2 * tol, 2 * tol);\n\t\tvar state = this.graph.view.getState(this.getCellForEvent(me, point));\n\n\t\t// Keeps focus icons visible while over vertex bounds and no other cell under mouse or shift is pressed\n\t\tif (!this.isKeepFocusEvent(me) && (this.currentFocusArea == null || this.currentFocus == null ||\n\t\t\t(state != null) || !this.graph.getModel().isVertex(this.currentFocus.cell) ||\n\t\t\t!mxUtils.intersects(this.currentFocusArea, mouse)) && (state != this.currentFocus))\n\t\t{\n\t\t\tthis.currentFocusArea = null;\n\t\t\tthis.currentFocus = null;\n\t\t\tthis.setFocus(me, state, source);\n\t\t}\n\n\t\tthis.currentConstraint = null;\n\t\tthis.currentPoint = null;\n\t\tvar minDistSq = null;\n\t\t\n\t\tif (this.focusIcons != null && this.constraints != null &&\n\t\t\t(state == null || this.currentFocus == state))\n\t\t{\n\t\t\tvar cx = mouse.getCenterX();\n\t\t\tvar cy = mouse.getCenterY();\n\t\t\t\n\t\t\tfor (var i = 0; i < this.focusIcons.length; i++)\n\t\t\t{\n\t\t\t\tvar dx = cx - this.focusIcons[i].bounds.getCenterX();\n\t\t\t\tvar dy = cy - this.focusIcons[i].bounds.getCenterY();\n\t\t\t\tvar tmp = dx * dx + dy * dy;\n\t\t\t\t\n\t\t\t\tif ((this.intersects(this.focusIcons[i], mouse, source, existingEdge) || (point != null &&\n\t\t\t\t\tthis.intersects(this.focusIcons[i], grid, source, existingEdge))) &&\n\t\t\t\t\t(minDistSq == null || tmp < minDistSq))\n\t\t\t\t{\n\t\t\t\t\tthis.currentConstraint = this.constraints[i];\n\t\t\t\t\tthis.currentPoint = this.focusPoints[i];\n\t\t\t\t\tminDistSq = tmp;\n\t\t\t\t\t\n\t\t\t\t\tvar tmp = this.focusIcons[i].bounds.clone();\n\t\t\t\t\ttmp.grow(mxConstants.HIGHLIGHT_SIZE + 1);\n\t\t\t\t\ttmp.width -= 1;\n\t\t\t\t\ttmp.height -= 1;\n\t\t\t\t\t\n\t\t\t\t\tif (this.focusHighlight == null)\n\t\t\t\t\t{\n\t\t\t\t\t\tvar hl = this.createHighlightShape();\n\t\t\t\t\t\thl.dialect = (this.graph.dialect == mxConstants.DIALECT_SVG) ?\n\t\t\t\t\t\t\t\tmxConstants.DIALECT_SVG : mxConstants.DIALECT_VML;\n\t\t\t\t\t\thl.pointerEvents = false;\n\n\t\t\t\t\t\thl.init(this.graph.getView().getOverlayPane());\n\t\t\t\t\t\tthis.focusHighlight = hl;\n\t\t\t\t\t\t\n\t\t\t\t\t\tvar getState = mxUtils.bind(this, function()\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\treturn (this.currentFocus != null) ? this.currentFocus : state;\n\t\t\t\t\t\t});\n\t\n\t\t\t\t\t\tmxEvent.redirectMouseEvents(hl.node, this.graph, getState);\n\t\t\t\t\t}\n\n\t\t\t\t\tthis.focusHighlight.bounds = tmp;\n\t\t\t\t\tthis.focusHighlight.redraw();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (this.currentConstraint == null)\n\t\t{\n\t\t\tthis.destroyFocusHighlight();\n\t\t}\n\t}\n\telse\n\t{\n\t\tthis.currentConstraint = null;\n\t\tthis.currentFocus = null;\n\t\tthis.currentPoint = null;\n\t}\n};\n\n/**\n * Function: redraw\n * \n * Transfers the focus to the given state as a source or target terminal. If\n * the handler is not enabled then the outline is painted, but the constraints\n * are ignored.\n */\nmxConstraintHandler.prototype.redraw = function()\n{\n\tif (this.currentFocus != null && this.constraints != null && this.focusIcons != null)\n\t{\n\t\tvar state = this.graph.view.getState(this.currentFocus.cell);\n\t\tthis.currentFocus = state;\n\t\tthis.currentFocusArea = new mxRectangle(state.x, state.y, state.width, state.height);\n\t\t\n\t\tfor (var i = 0; i < this.constraints.length; i++)\n\t\t{\n\t\t\tvar cp = this.graph.getConnectionPoint(state, this.constraints[i]);\n\t\t\tvar img = this.getImageForConstraint(state, this.constraints[i], cp);\n\n\t\t\tvar bounds = new mxRectangle(Math.round(cp.x - img.width / 2),\n\t\t\t\tMath.round(cp.y - img.height / 2), img.width, img.height);\n\t\t\tthis.focusIcons[i].bounds = bounds;\n\t\t\tthis.focusIcons[i].redraw();\n\t\t\tthis.currentFocusArea.add(this.focusIcons[i].bounds);\n\t\t\tthis.focusPoints[i] = cp;\n\t\t}\n\t}\t\n};\n\n/**\n * Function: setFocus\n * \n * Transfers the focus to the given state as a source or target terminal. If\n * the handler is not enabled then the outline is painted, but the constraints\n * are ignored.\n */\nmxConstraintHandler.prototype.setFocus = function(me, state, source)\n{\n\tthis.constraints = (state != null && !this.isStateIgnored(state, source) &&\n\t\tthis.graph.isCellConnectable(state.cell)) ? ((this.isEnabled()) ?\n\t\t(this.graph.getAllConnectionConstraints(state, source) || []) : []) : null;\n\n\t// Only uses cells which have constraints\n\tif (this.constraints != null)\n\t{\n\t\tthis.currentFocus = state;\n\t\tthis.currentFocusArea = new mxRectangle(state.x, state.y, state.width, state.height);\n\t\t\n\t\tif (this.focusIcons != null)\n\t\t{\n\t\t\tfor (var i = 0; i < this.focusIcons.length; i++)\n\t\t\t{\n\t\t\t\tthis.focusIcons[i].destroy();\n\t\t\t}\n\t\t\t\n\t\t\tthis.focusIcons = null;\n\t\t\tthis.focusPoints = null;\n\t\t}\n\t\t\n\t\tthis.focusPoints = [];\n\t\tthis.focusIcons = [];\n\t\t\n\t\tfor (var i = 0; i < this.constraints.length; i++)\n\t\t{\n\t\t\tvar cp = this.graph.getConnectionPoint(state, this.constraints[i]);\n\t\t\tvar img = this.getImageForConstraint(state, this.constraints[i], cp);\n\n\t\t\tvar src = img.src;\n\t\t\tvar bounds = new mxRectangle(Math.round(cp.x - img.width / 2),\n\t\t\t\tMath.round(cp.y - img.height / 2), img.width, img.height);\n\t\t\tvar icon = new mxImageShape(bounds, src);\n\t\t\ticon.dialect = (this.graph.dialect != mxConstants.DIALECT_SVG) ?\n\t\t\t\t\tmxConstants.DIALECT_MIXEDHTML : mxConstants.DIALECT_SVG;\n\t\t\ticon.preserveImageAspect = false;\n\t\t\ticon.init(this.graph.getView().getDecoratorPane());\n\t\t\t\n\t\t\t// Fixes lost event tracking for images in quirks / IE8 standards\n\t\t\tif (mxClient.IS_QUIRKS || document.documentMode == 8)\n\t\t\t{\n\t\t\t\tmxEvent.addListener(icon.node, 'dragstart', function(evt)\n\t\t\t\t{\n\t\t\t\t\tmxEvent.consume(evt);\n\t\t\t\t\t\n\t\t\t\t\treturn false;\n\t\t\t\t});\n\t\t\t}\n\t\t\t\n\t\t\t// Move the icon behind all other overlays\n\t\t\tif (icon.node.previousSibling != null)\n\t\t\t{\n\t\t\t\ticon.node.parentNode.insertBefore(icon.node, icon.node.parentNode.firstChild);\n\t\t\t}\n\n\t\t\tvar getState = mxUtils.bind(this, function()\n\t\t\t{\n\t\t\t\treturn (this.currentFocus != null) ? this.currentFocus : state;\n\t\t\t});\n\t\t\t\n\t\t\ticon.redraw();\n\n\t\t\tmxEvent.redirectMouseEvents(icon.node, this.graph, getState);\n\t\t\tthis.currentFocusArea.add(icon.bounds);\n\t\t\tthis.focusIcons.push(icon);\n\t\t\tthis.focusPoints.push(cp);\n\t\t}\n\t\t\n\t\tthis.currentFocusArea.grow(this.getTolerance(me));\n\t}\n\telse\n\t{\n\t\tthis.destroyIcons();\n\t\tthis.destroyFocusHighlight();\n\t}\n};\n\n/**\n * Function: createHighlightShape\n * \n * Create the shape used to paint the highlight.\n * \n * Returns true if the given icon intersects the given point.\n */\nmxConstraintHandler.prototype.createHighlightShape = function()\n{\n\tvar hl = new mxRectangleShape(null, this.highlightColor, this.highlightColor, mxConstants.HIGHLIGHT_STROKEWIDTH);\n\thl.opacity = mxConstants.HIGHLIGHT_OPACITY;\n\t\n\treturn hl;\n};\n\n/**\n * Function: intersects\n * \n * Returns true if the given icon intersects the given rectangle.\n */\nmxConstraintHandler.prototype.intersects = function(icon, mouse, source, existingEdge)\n{\n\treturn mxUtils.intersects(icon.bounds, mouse);\n};\n\n/**\n * Function: destroy\n * \n * Destroy this handler.\n */\nmxConstraintHandler.prototype.destroy = function()\n{\n\tthis.reset();\n\t\n\tif (this.resetHandler != null)\n\t{\n\t\tthis.graph.model.removeListener(this.resetHandler);\n\t\tthis.graph.view.removeListener(this.resetHandler);\n\t\tthis.graph.removeListener(this.resetHandler);\n\t\tthis.resetHandler = null;\n\t}\n\t\n\tif (this.mouseleaveHandler != null && this.graph.container != null)\n\t{\n\t\tmxEvent.removeListener(this.graph.container, 'mouseleave', this.mouseleaveHandler);\n\t\tthis.mouseleaveHandler = null;\n\t}\n};\n"
  },
  {
    "path": "static/cherry/drawio_demo/src/js/handler/mxEdgeHandler.js",
    "content": "/**\n * Copyright (c) 2006-2015, JGraph Ltd\n * Copyright (c) 2006-2015, Gaudenz Alder\n */\n/**\n * Class: mxEdgeHandler\n *\n * Graph event handler that reconnects edges and modifies control points and\n * the edge label location. Uses <mxTerminalMarker> for finding and\n * highlighting new source and target vertices. This handler is automatically\n * created in <mxGraph.createHandler> for each selected edge.\n * \n * To enable adding/removing control points, the following code can be used:\n * \n * (code)\n * mxEdgeHandler.prototype.addEnabled = true;\n * mxEdgeHandler.prototype.removeEnabled = true;\n * (end)\n * \n * Note: This experimental feature is not recommended for production use.\n * \n * Constructor: mxEdgeHandler\n *\n * Constructs an edge handler for the specified <mxCellState>.\n * \n * Parameters:\n * \n * state - <mxCellState> of the cell to be handled.\n */\nfunction mxEdgeHandler(state)\n{\n\tif (state != null)\n\t{\n\t\tthis.state = state;\n\t\tthis.init();\n\t\t\n\t\t// Handles escape keystrokes\n\t\tthis.escapeHandler = mxUtils.bind(this, function(sender, evt)\n\t\t{\n\t\t\tvar dirty = this.index != null;\n\t\t\tthis.reset();\n\t\t\t\n\t\t\tif (dirty)\n\t\t\t{\n\t\t\t\tthis.graph.cellRenderer.redraw(this.state, false, state.view.isRendering());\n\t\t\t}\n\t\t});\n\t\t\n\t\tthis.state.view.graph.addListener(mxEvent.ESCAPE, this.escapeHandler);\n\t}\n};\n\n/**\n * Variable: graph\n * \n * Reference to the enclosing <mxGraph>.\n */\nmxEdgeHandler.prototype.graph = null;\n\n/**\n * Variable: state\n * \n * Reference to the <mxCellState> being modified.\n */\nmxEdgeHandler.prototype.state = null;\n\n/**\n * Variable: marker\n * \n * Holds the <mxTerminalMarker> which is used for highlighting terminals.\n */\nmxEdgeHandler.prototype.marker = null;\n\n/**\n * Variable: constraintHandler\n * \n * Holds the <mxConstraintHandler> used for drawing and highlighting\n * constraints.\n */\nmxEdgeHandler.prototype.constraintHandler = null;\n\n/**\n * Variable: error\n * \n * Holds the current validation error while a connection is being changed.\n */\nmxEdgeHandler.prototype.error = null;\n\n/**\n * Variable: shape\n * \n * Holds the <mxShape> that represents the preview edge.\n */\nmxEdgeHandler.prototype.shape = null;\n\n/**\n * Variable: bends\n * \n * Holds the <mxShapes> that represent the points.\n */\nmxEdgeHandler.prototype.bends = null;\n\n/**\n * Variable: labelShape\n * \n * Holds the <mxShape> that represents the label position.\n */\nmxEdgeHandler.prototype.labelShape = null;\n\n/**\n * Variable: cloneEnabled\n * \n * Specifies if cloning by control-drag is enabled. Default is true.\n */\nmxEdgeHandler.prototype.cloneEnabled = true;\n\n/**\n * Variable: addEnabled\n * \n * Specifies if adding bends by shift-click is enabled. Default is false.\n * Note: This experimental feature is not recommended for production use.\n */\nmxEdgeHandler.prototype.addEnabled = false;\n\n/**\n * Variable: removeEnabled\n * \n * Specifies if removing bends by shift-click is enabled. Default is false.\n * Note: This experimental feature is not recommended for production use.\n */\nmxEdgeHandler.prototype.removeEnabled = false;\n\n/**\n * Variable: dblClickRemoveEnabled\n * \n * Specifies if removing bends by double click is enabled. Default is false.\n */\nmxEdgeHandler.prototype.dblClickRemoveEnabled = false;\n\n/**\n * Variable: mergeRemoveEnabled\n * \n * Specifies if removing bends by dropping them on other bends is enabled.\n * Default is false.\n */\nmxEdgeHandler.prototype.mergeRemoveEnabled = false;\n\n/**\n * Variable: straightRemoveEnabled\n * \n * Specifies if removing bends by creating straight segments should be enabled.\n * If enabled, this can be overridden by holding down the alt key while moving.\n * Default is false.\n */\nmxEdgeHandler.prototype.straightRemoveEnabled = false;\n\n/**\n * Variable: virtualBendsEnabled\n * \n * Specifies if virtual bends should be added in the center of each\n * segments. These bends can then be used to add new waypoints.\n * Default is false.\n */\nmxEdgeHandler.prototype.virtualBendsEnabled = false;\n\n/**\n * Variable: virtualBendOpacity\n * \n * Opacity to be used for virtual bends (see <virtualBendsEnabled>).\n * Default is 20.\n */\nmxEdgeHandler.prototype.virtualBendOpacity = 20;\n\n/**\n * Variable: parentHighlightEnabled\n * \n * Specifies if the parent should be highlighted if a child cell is selected.\n * Default is false.\n */\nmxEdgeHandler.prototype.parentHighlightEnabled = false;\n\n/**\n * Variable: preferHtml\n * \n * Specifies if bends should be added to the graph container. This is updated\n * in <init> based on whether the edge or one of its terminals has an HTML\n * label in the container.\n */\nmxEdgeHandler.prototype.preferHtml = false;\n\n/**\n * Variable: allowHandleBoundsCheck\n * \n * Specifies if the bounds of handles should be used for hit-detection in IE\n * Default is true.\n */\nmxEdgeHandler.prototype.allowHandleBoundsCheck = true;\n\n/**\n * Variable: snapToTerminals\n * \n * Specifies if waypoints should snap to the routing centers of terminals.\n * Default is false.\n */\nmxEdgeHandler.prototype.snapToTerminals = false;\n\n/**\n * Variable: handleImage\n * \n * Optional <mxImage> to be used as handles. Default is null.\n */\nmxEdgeHandler.prototype.handleImage = null;\n\n/**\n * Variable: tolerance\n * \n * Optional tolerance for hit-detection in <getHandleForEvent>. Default is 0.\n */\nmxEdgeHandler.prototype.tolerance = 0;\n\n/**\n * Variable: outlineConnect\n * \n * Specifies if connections to the outline of a highlighted target should be\n * enabled. This will allow to place the connection point along the outline of\n * the highlighted target. Default is false.\n */\nmxEdgeHandler.prototype.outlineConnect = false;\n\n/**\n * Variable: manageLabelHandle\n * \n * Specifies if the label handle should be moved if it intersects with another\n * handle. Uses <checkLabelHandle> for checking and moving. Default is false.\n */\nmxEdgeHandler.prototype.manageLabelHandle = false;\n\n/**\n * Function: init\n * \n * Initializes the shapes required for this edge handler.\n */\nmxEdgeHandler.prototype.init = function()\n{\n\tthis.graph = this.state.view.graph;\n\tthis.marker = this.createMarker();\n\tthis.constraintHandler = new mxConstraintHandler(this.graph);\n\t\n\t// Clones the original points from the cell\n\t// and makes sure at least one point exists\n\tthis.points = [];\n\t\n\t// Uses the absolute points of the state\n\t// for the initial configuration and preview\n\tthis.abspoints = this.getSelectionPoints(this.state);\n\tthis.shape = this.createSelectionShape(this.abspoints);\n\tthis.shape.dialect = (this.graph.dialect != mxConstants.DIALECT_SVG) ?\n\t\tmxConstants.DIALECT_MIXEDHTML : mxConstants.DIALECT_SVG;\n\tthis.shape.init(this.graph.getView().getOverlayPane());\n\tthis.shape.pointerEvents = false;\n\tthis.shape.setCursor(mxConstants.CURSOR_MOVABLE_EDGE);\n\tmxEvent.redirectMouseEvents(this.shape.node, this.graph, this.state);\n\n\t// Updates preferHtml\n\tthis.preferHtml = this.state.text != null &&\n\t\tthis.state.text.node.parentNode == this.graph.container;\n\t\n\tif (!this.preferHtml)\n\t{\n\t\t// Checks source terminal\n\t\tvar sourceState = this.state.getVisibleTerminalState(true);\n\t\t\n\t\tif (sourceState != null)\n\t\t{\n\t\t\tthis.preferHtml = sourceState.text != null &&\n\t\t\t\tsourceState.text.node.parentNode == this.graph.container;\n\t\t}\n\t\t\n\t\tif (!this.preferHtml)\n\t\t{\n\t\t\t// Checks target terminal\n\t\t\tvar targetState = this.state.getVisibleTerminalState(false);\n\t\t\t\n\t\t\tif (targetState != null)\n\t\t\t{\n\t\t\t\tthis.preferHtml = targetState.text != null &&\n\t\t\t\ttargetState.text.node.parentNode == this.graph.container;\n\t\t\t}\n\t\t}\n\t}\n\t\n\t// Adds highlight for parent group\n\tif (this.parentHighlightEnabled)\n\t{\n\t\tvar parent = this.graph.model.getParent(this.state.cell);\n\t\t\n\t\tif (this.graph.model.isVertex(parent))\n\t\t{\n\t\t\tvar pstate = this.graph.view.getState(parent);\n\t\t\t\n\t\t\tif (pstate != null)\n\t\t\t{\n\t\t\t\tthis.parentHighlight = this.createParentHighlightShape(pstate);\n\t\t\t\t// VML dialect required here for event transparency in IE\n\t\t\t\tthis.parentHighlight.dialect = (this.graph.dialect != mxConstants.DIALECT_SVG) ? mxConstants.DIALECT_VML : mxConstants.DIALECT_SVG;\n\t\t\t\tthis.parentHighlight.pointerEvents = false;\n\t\t\t\tthis.parentHighlight.rotation = Number(pstate.style[mxConstants.STYLE_ROTATION] || '0');\n\t\t\t\tthis.parentHighlight.init(this.graph.getView().getOverlayPane());\n\t\t\t}\n\t\t}\n\t}\n\t\n\t// Creates bends for the non-routed absolute points\n\t// or bends that don't correspond to points\n\tif (this.graph.getSelectionCount() < mxGraphHandler.prototype.maxCells ||\n\t\tmxGraphHandler.prototype.maxCells <= 0)\n\t{\n\t\tthis.bends = this.createBends();\n\n\t\tif (this.isVirtualBendsEnabled())\n\t\t{\n\t\t\tthis.virtualBends = this.createVirtualBends();\n\t\t}\n\t}\n\n\t// Adds a rectangular handle for the label position\n\tthis.label = new mxPoint(this.state.absoluteOffset.x, this.state.absoluteOffset.y);\n\tthis.labelShape = this.createLabelHandleShape();\n\tthis.initBend(this.labelShape);\n\tthis.labelShape.setCursor(mxConstants.CURSOR_LABEL_HANDLE);\n\t\n\tthis.customHandles = this.createCustomHandles();\n\t\n\tthis.redraw();\n};\n\n/**\n * Function: createCustomHandles\n * \n * Returns an array of custom handles. This implementation returns null.\n */\nmxEdgeHandler.prototype.createCustomHandles = function()\n{\n\treturn null;\n};\n\n/**\n * Function: isVirtualBendsEnabled\n * \n * Returns true if virtual bends should be added. This returns true if\n * <virtualBendsEnabled> is true and the current style allows and\n * renders custom waypoints.\n */\nmxEdgeHandler.prototype.isVirtualBendsEnabled = function(evt)\n{\n\treturn this.virtualBendsEnabled && (this.state.style[mxConstants.STYLE_EDGE] == null ||\n\t\t\tthis.state.style[mxConstants.STYLE_EDGE] == mxConstants.NONE ||\n\t\t\tthis.state.style[mxConstants.STYLE_NOEDGESTYLE] == 1)  &&\n\t\t\tmxUtils.getValue(this.state.style, mxConstants.STYLE_SHAPE, null) != 'arrow';\n};\n\n/**\n * Function: isAddPointEvent\n * \n * Returns true if the given event is a trigger to add a new point. This\n * implementation returns true if shift is pressed.\n */\nmxEdgeHandler.prototype.isAddPointEvent = function(evt)\n{\n\treturn mxEvent.isShiftDown(evt);\n};\n\n/**\n * Function: isRemovePointEvent\n * \n * Returns true if the given event is a trigger to remove a point. This\n * implementation returns true if shift is pressed.\n */\nmxEdgeHandler.prototype.isRemovePointEvent = function(evt)\n{\n\treturn mxEvent.isShiftDown(evt);\n};\n\n/**\n * Function: getSelectionPoints\n * \n * Returns the list of points that defines the selection stroke.\n */\nmxEdgeHandler.prototype.getSelectionPoints = function(state)\n{\n\treturn state.absolutePoints;\n};\n\n/**\n * Function: createSelectionShape\n * \n * Creates the shape used to draw the selection border.\n */\nmxEdgeHandler.prototype.createParentHighlightShape = function(bounds)\n{\n\tvar shape = new mxRectangleShape(bounds, null, this.getSelectionColor());\n\tshape.strokewidth = this.getSelectionStrokeWidth();\n\tshape.isDashed = this.isSelectionDashed();\n\t\n\treturn shape;\n};\n\n/**\n * Function: createSelectionShape\n * \n * Creates the shape used to draw the selection border.\n */\nmxEdgeHandler.prototype.createSelectionShape = function(points)\n{\n\tvar shape = new this.state.shape.constructor();\n\tshape.outline = true;\n\tshape.apply(this.state);\n\t\n\tshape.isDashed = this.isSelectionDashed();\n\tshape.stroke = this.getSelectionColor();\n\tshape.isShadow = false;\n\t\n\treturn shape;\n};\n\n/**\n * Function: getSelectionColor\n * \n * Returns <mxConstants.EDGE_SELECTION_COLOR>.\n */\nmxEdgeHandler.prototype.getSelectionColor = function()\n{\n\treturn mxConstants.EDGE_SELECTION_COLOR;\n};\n\n/**\n * Function: getSelectionStrokeWidth\n * \n * Returns <mxConstants.EDGE_SELECTION_STROKEWIDTH>.\n */\nmxEdgeHandler.prototype.getSelectionStrokeWidth = function()\n{\n\treturn mxConstants.EDGE_SELECTION_STROKEWIDTH;\n};\n\n/**\n * Function: isSelectionDashed\n * \n * Returns <mxConstants.EDGE_SELECTION_DASHED>.\n */\nmxEdgeHandler.prototype.isSelectionDashed = function()\n{\n\treturn mxConstants.EDGE_SELECTION_DASHED;\n};\n\n/**\n * Function: isConnectableCell\n * \n * Returns true if the given cell is connectable. This is a hook to\n * disable floating connections. This implementation returns true.\n */\nmxEdgeHandler.prototype.isConnectableCell = function(cell)\n{\n\treturn true;\n};\n\n/**\n * Function: getCellAt\n * \n * Creates and returns the <mxCellMarker> used in <marker>.\n */\nmxEdgeHandler.prototype.getCellAt = function(x, y)\n{\n\treturn (!this.outlineConnect) ? this.graph.getCellAt(x, y) : null;\n};\n\n/**\n * Function: createMarker\n * \n * Creates and returns the <mxCellMarker> used in <marker>.\n */\nmxEdgeHandler.prototype.createMarker = function()\n{\n\tvar marker = new mxCellMarker(this.graph);\n\tvar self = this; // closure\n\n\t// Only returns edges if they are connectable and never returns\n\t// the edge that is currently being modified\n\tmarker.getCell = function(me)\n\t{\n\t\tvar cell = mxCellMarker.prototype.getCell.apply(this, arguments);\n\n\t\t// Checks for cell at preview point (with grid)\n\t\tif ((cell == self.state.cell || cell == null) && self.currentPoint != null)\n\t\t{\n\t\t\tcell = self.graph.getCellAt(self.currentPoint.x, self.currentPoint.y);\n\t\t}\n\t\t\n\t\t// Uses connectable parent vertex if one exists\n\t\tif (cell != null && !this.graph.isCellConnectable(cell))\n\t\t{\n\t\t\tvar parent = this.graph.getModel().getParent(cell);\n\t\t\t\n\t\t\tif (this.graph.getModel().isVertex(parent) && this.graph.isCellConnectable(parent))\n\t\t\t{\n\t\t\t\tcell = parent;\n\t\t\t}\n\t\t}\n\t\t\n\t\tvar model = self.graph.getModel();\n\t\t\n\t\tif ((this.graph.isSwimlane(cell) && self.currentPoint != null &&\n\t\t\tthis.graph.hitsSwimlaneContent(cell, self.currentPoint.x, self.currentPoint.y)) ||\n\t\t\t(!self.isConnectableCell(cell)) || (cell == self.state.cell ||\n\t\t\t(cell != null && !self.graph.connectableEdges && model.isEdge(cell))) ||\n\t\t\tmodel.isAncestor(self.state.cell, cell))\n\t\t{\n\t\t\tcell = null;\n\t\t}\n\t\t\n\t\tif (!this.graph.isCellConnectable(cell))\n\t\t{\n\t\t\tcell = null;\n\t\t}\n\t\t\n\t\treturn cell;\n\t};\n\n\t// Sets the highlight color according to validateConnection\n\tmarker.isValidState = function(state)\n\t{\n\t\tvar model = self.graph.getModel();\n\t\tvar other = self.graph.view.getTerminalPort(state,\n\t\t\tself.graph.view.getState(model.getTerminal(self.state.cell,\n\t\t\t!self.isSource)), !self.isSource);\n\t\tvar otherCell = (other != null) ? other.cell : null;\n\t\tvar source = (self.isSource) ? state.cell : otherCell;\n\t\tvar target = (self.isSource) ? otherCell : state.cell;\n\t\t\n\t\t// Updates the error message of the handler\n\t\tself.error = self.validateConnection(source, target);\n\n\t\treturn self.error == null;\n\t};\n\t\n\treturn marker;\n};\n\n/**\n * Function: validateConnection\n * \n * Returns the error message or an empty string if the connection for the\n * given source, target pair is not valid. Otherwise it returns null. This\n * implementation uses <mxGraph.getEdgeValidationError>.\n * \n * Parameters:\n * \n * source - <mxCell> that represents the source terminal.\n * target - <mxCell> that represents the target terminal.\n */\nmxEdgeHandler.prototype.validateConnection = function(source, target)\n{\n\treturn this.graph.getEdgeValidationError(this.state.cell, source, target);\n};\n\n/**\n * Function: createBends\n * \n * Creates and returns the bends used for modifying the edge. This is\n * typically an array of <mxRectangleShapes>.\n */\n mxEdgeHandler.prototype.createBends = function()\n {\n\tvar cell = this.state.cell;\n\tvar bends = [];\n\n\tfor (var i = 0; i < this.abspoints.length; i++)\n\t{\n\t\tif (this.isHandleVisible(i))\n\t\t{\n\t\t\tvar source = i == 0;\n\t\t\tvar target = i == this.abspoints.length - 1;\n\t\t\tvar terminal = source || target;\n\n\t\t\tif (terminal || this.graph.isCellBendable(cell))\n\t\t\t{\n\t\t\t\t(mxUtils.bind(this, function(index)\n\t\t\t\t{\n\t\t\t\t\tvar bend = this.createHandleShape(index);\n\t\t\t\t\tthis.initBend(bend, mxUtils.bind(this, mxUtils.bind(this, function()\n\t\t\t\t\t{\n\t\t\t\t\t\tif (this.dblClickRemoveEnabled)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tthis.removePoint(this.state, index);\n\t\t\t\t\t\t}\n\t\t\t\t\t})));\n\t\n\t\t\t\t\tif (this.isHandleEnabled(i))\n\t\t\t\t\t{\n\t\t\t\t\t\tbend.setCursor((terminal) ? mxConstants.CURSOR_TERMINAL_HANDLE : mxConstants.CURSOR_BEND_HANDLE);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tbends.push(bend);\n\t\t\t\t\n\t\t\t\t\tif (!terminal)\n\t\t\t\t\t{\n\t\t\t\t\t\tthis.points.push(new mxPoint(0,0));\n\t\t\t\t\t\tbend.node.style.visibility = 'hidden';\n\t\t\t\t\t}\n\t\t\t\t}))(i);\n\t\t\t}\n\t\t}\n\t}\n\n\treturn bends;\n};\n\n/**\n * Function: createVirtualBends\n * \n * Creates and returns the bends used for modifying the edge. This is\n * typically an array of <mxRectangleShapes>.\n */\n mxEdgeHandler.prototype.createVirtualBends = function()\n {\n\tvar cell = this.state.cell;\n\tvar last = this.abspoints[0];\n\tvar bends = [];\n\n\tif (this.graph.isCellBendable(cell))\n\t{\n\t\tfor (var i = 1; i < this.abspoints.length; i++)\n\t\t{\n\t\t\t(mxUtils.bind(this, function(bend)\n\t\t\t{\n\t\t\t\tthis.initBend(bend);\n\t\t\t\tbend.setCursor(mxConstants.CURSOR_VIRTUAL_BEND_HANDLE);\n\t\t\t\tbends.push(bend);\n\t\t\t}))(this.createHandleShape());\n\t\t}\n\t}\n\n\treturn bends;\n};\n\n/**\n * Function: isHandleEnabled\n * \n * Creates the shape used to display the given bend.\n */\nmxEdgeHandler.prototype.isHandleEnabled = function(index)\n{\n\treturn true;\n};\n\n/**\n * Function: isHandleVisible\n * \n * Returns true if the handle at the given index is visible.\n */\nmxEdgeHandler.prototype.isHandleVisible = function(index)\n{\n\tvar source = this.state.getVisibleTerminalState(true);\n\tvar target = this.state.getVisibleTerminalState(false);\n\tvar geo = this.graph.getCellGeometry(this.state.cell);\n\tvar edgeStyle = (geo != null) ? this.graph.view.getEdgeStyle(this.state, geo.points, source, target) : null;\n\n\treturn edgeStyle != mxEdgeStyle.EntityRelation || index == 0 || index == this.abspoints.length - 1;\n};\n\n/**\n * Function: createHandleShape\n * \n * Creates the shape used to display the given bend. Note that the index may be\n * null for special cases, such as when called from\n * <mxElbowEdgeHandler.createVirtualBend>. Only images and rectangles should be\n * returned if support for HTML labels with not foreign objects is required.\n * Index if null for virtual handles.\n */\nmxEdgeHandler.prototype.createHandleShape = function(index)\n{\n\tif (this.handleImage != null)\n\t{\n\t\tvar shape = new mxImageShape(new mxRectangle(0, 0, this.handleImage.width, this.handleImage.height), this.handleImage.src);\n\t\t\n\t\t// Allows HTML rendering of the images\n\t\tshape.preserveImageAspect = false;\n\n\t\treturn shape;\n\t}\n\telse\n\t{\n\t\tvar s = mxConstants.HANDLE_SIZE;\n\t\t\n\t\tif (this.preferHtml)\n\t\t{\n\t\t\ts -= 1;\n\t\t}\n\t\t\n\t\treturn new mxRectangleShape(new mxRectangle(0, 0, s, s), mxConstants.HANDLE_FILLCOLOR, mxConstants.HANDLE_STROKECOLOR);\n\t}\n};\n\n/**\n * Function: createLabelHandleShape\n * \n * Creates the shape used to display the the label handle.\n */\nmxEdgeHandler.prototype.createLabelHandleShape = function()\n{\n\tif (this.labelHandleImage != null)\n\t{\n\t\tvar shape = new mxImageShape(new mxRectangle(0, 0, this.labelHandleImage.width, this.labelHandleImage.height), this.labelHandleImage.src);\n\t\t\n\t\t// Allows HTML rendering of the images\n\t\tshape.preserveImageAspect = false;\n\n\t\treturn shape;\n\t}\n\telse\n\t{\n\t\tvar s = mxConstants.LABEL_HANDLE_SIZE;\n\t\treturn new mxRectangleShape(new mxRectangle(0, 0, s, s), mxConstants.LABEL_HANDLE_FILLCOLOR, mxConstants.HANDLE_STROKECOLOR);\n\t}\n};\n\n/**\n * Function: initBend\n * \n * Helper method to initialize the given bend.\n * \n * Parameters:\n * \n * bend - <mxShape> that represents the bend to be initialized.\n */\nmxEdgeHandler.prototype.initBend = function(bend, dblClick)\n{\n\tif (this.preferHtml)\n\t{\n\t\tbend.dialect = mxConstants.DIALECT_STRICTHTML;\n\t\tbend.init(this.graph.container);\n\t}\n\telse\n\t{\n\t\tbend.dialect = (this.graph.dialect != mxConstants.DIALECT_SVG) ?\n\t\t\tmxConstants.DIALECT_MIXEDHTML : mxConstants.DIALECT_SVG;\n\t\tbend.init(this.graph.getView().getOverlayPane());\n\t}\n\n\tmxEvent.redirectMouseEvents(bend.node, this.graph, this.state,\n\t\t\tnull, null, null, dblClick);\n\t\n\t// Fixes lost event tracking for images in quirks / IE8 standards\n\tif (mxClient.IS_QUIRKS || document.documentMode == 8)\n\t{\n\t\tmxEvent.addListener(bend.node, 'dragstart', function(evt)\n\t\t{\n\t\t\tmxEvent.consume(evt);\n\t\t\t\n\t\t\treturn false;\n\t\t});\n\t}\n\t\n\tif (mxClient.IS_TOUCH)\n\t{\n\t\tbend.node.setAttribute('pointer-events', 'none');\n\t}\n};\n\n/**\n * Function: getHandleForEvent\n * \n * Returns the index of the handle for the given event.\n */\nmxEdgeHandler.prototype.getHandleForEvent = function(me)\n{\n\t// Connection highlight may consume events before they reach sizer handle\n\tvar tol = (!mxEvent.isMouseEvent(me.getEvent())) ? this.tolerance : 1;\n\tvar hit = (this.allowHandleBoundsCheck && (mxClient.IS_IE || tol > 0)) ?\n\t\tnew mxRectangle(me.getGraphX() - tol, me.getGraphY() - tol, 2 * tol, 2 * tol) : null;\n\tvar minDistSq = null;\n\tvar result = null;\n\n\tfunction checkShape(shape)\n\t{\n\t\tif (shape != null && shape.node.style.display != 'none' && shape.node.style.visibility != 'hidden' &&\n\t\t\t(me.isSource(shape) || (hit != null && mxUtils.intersects(shape.bounds, hit))))\n\t\t{\n\t\t\tvar dx = me.getGraphX() - shape.bounds.getCenterX();\n\t\t\tvar dy = me.getGraphY() - shape.bounds.getCenterY();\n\t\t\tvar tmp = dx * dx + dy * dy;\n\t\t\t\n\t\t\tif (minDistSq == null || tmp <= minDistSq)\n\t\t\t{\n\t\t\t\tminDistSq = tmp;\n\t\t\t\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn false;\n\t}\n\t\n\tif (this.customHandles != null && this.isCustomHandleEvent(me))\n\t{\n\t\t// Inverse loop order to match display order\n\t\tfor (var i = this.customHandles.length - 1; i >= 0; i--)\n\t\t{\n\t\t\tif (checkShape(this.customHandles[i].shape))\n\t\t\t{\n\t\t\t\t// LATER: Return reference to active shape\n\t\t\t\treturn mxEvent.CUSTOM_HANDLE - i;\n\t\t\t}\n\t\t}\n\t}\n\n\tif (me.isSource(this.state.text) || checkShape(this.labelShape))\n\t{\n\t\tresult = mxEvent.LABEL_HANDLE;\n\t}\n\t\n\tif (this.bends != null)\n\t{\n\t\tfor (var i = 0; i < this.bends.length; i++)\n\t\t{\n\t\t\tif (checkShape(this.bends[i]))\n\t\t\t{\n\t\t\t\tresult = i;\n\t\t\t}\n\t\t}\n\t}\n\t\n\tif (this.virtualBends != null && this.isAddVirtualBendEvent(me))\n\t{\n\t\tfor (var i = 0; i < this.virtualBends.length; i++)\n\t\t{\n\t\t\tif (checkShape(this.virtualBends[i]))\n\t\t\t{\n\t\t\t\tresult = mxEvent.VIRTUAL_HANDLE - i;\n\t\t\t}\n\t\t}\n\t}\n\n\treturn result;\n};\n\n/**\n * Function: isAddVirtualBendEvent\n * \n * Returns true if the given event allows virtual bends to be added. This\n * implementation returns true.\n */\nmxEdgeHandler.prototype.isAddVirtualBendEvent = function(me)\n{\n\treturn true;\n};\n\n/**\n * Function: isCustomHandleEvent\n * \n * Returns true if the given event allows custom handles to be changed. This\n * implementation returns true.\n */\nmxEdgeHandler.prototype.isCustomHandleEvent = function(me)\n{\n\treturn true;\n};\n\n/**\n * Function: mouseDown\n * \n * Handles the event by checking if a special element of the handler\n * was clicked, in which case the index parameter is non-null. The\n * indices may be one of <LABEL_HANDLE> or the number of the respective\n * control point. The source and target points are used for reconnecting\n * the edge.\n */\nmxEdgeHandler.prototype.mouseDown = function(sender, me)\n{\n\tvar handle = this.getHandleForEvent(me);\n\t\n\tif (this.bends != null && this.bends[handle] != null)\n\t{\n\t\tvar b = this.bends[handle].bounds;\n\t\tthis.snapPoint = new mxPoint(b.getCenterX(), b.getCenterY());\n\t}\n\t\n\tif (this.addEnabled && handle == null && this.isAddPointEvent(me.getEvent()))\n\t{\n\t\tthis.addPoint(this.state, me.getEvent());\n\t\tme.consume();\n\t}\n\telse if (handle != null && !me.isConsumed() && this.graph.isEnabled())\n\t{\n\t\tif (this.removeEnabled && this.isRemovePointEvent(me.getEvent()))\n\t\t{\n\t\t\tthis.removePoint(this.state, handle);\n\t\t}\n\t\telse if (handle != mxEvent.LABEL_HANDLE || this.graph.isLabelMovable(me.getCell()))\n\t\t{\n\t\t\tif (handle <= mxEvent.VIRTUAL_HANDLE)\n\t\t\t{\n\t\t\t\tmxUtils.setOpacity(this.virtualBends[mxEvent.VIRTUAL_HANDLE - handle].node, 100);\n\t\t\t}\n\t\t\t\n\t\t\tthis.start(me.getX(), me.getY(), handle);\n\t\t}\n\t\t\n\t\tme.consume();\n\t}\n};\n\n/**\n * Function: start\n * \n * Starts the handling of the mouse gesture.\n */\nmxEdgeHandler.prototype.start = function(x, y, index)\n{\n\tthis.startX = x;\n\tthis.startY = y;\n\n\tthis.isSource = (this.bends == null) ? false : index == 0;\n\tthis.isTarget = (this.bends == null) ? false : index == this.bends.length - 1;\n\tthis.isLabel = index == mxEvent.LABEL_HANDLE;\n\n\tif (this.isSource || this.isTarget)\n\t{\n\t\tvar cell = this.state.cell;\n\t\tvar terminal = this.graph.model.getTerminal(cell, this.isSource);\n\n\t\tif ((terminal == null && this.graph.isTerminalPointMovable(cell, this.isSource)) ||\n\t\t\t(terminal != null && this.graph.isCellDisconnectable(cell, terminal, this.isSource)))\n\t\t{\n\t\t\tthis.index = index;\n\t\t}\n\t}\n\telse\n\t{\n\t\tthis.index = index;\n\t}\n\t\n\t// Hides other custom handles\n\tif (this.index <= mxEvent.CUSTOM_HANDLE && this.index > mxEvent.VIRTUAL_HANDLE)\n\t{\n\t\tif (this.customHandles != null)\n\t\t{\n\t\t\tfor (var i = 0; i < this.customHandles.length; i++)\n\t\t\t{\n\t\t\t\tif (i != mxEvent.CUSTOM_HANDLE - this.index)\n\t\t\t\t{\n\t\t\t\t\tthis.customHandles[i].setVisible(false);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n};\n\n/**\n * Function: clonePreviewState\n * \n * Returns a clone of the current preview state for the given point and terminal.\n */\nmxEdgeHandler.prototype.clonePreviewState = function(point, terminal)\n{\n\treturn this.state.clone();\n};\n\n/**\n * Function: getSnapToTerminalTolerance\n * \n * Returns the tolerance for the guides. Default value is\n * gridSize * scale / 2.\n */\nmxEdgeHandler.prototype.getSnapToTerminalTolerance = function()\n{\n\treturn this.graph.gridSize * this.graph.view.scale / 2;\n};\n\n/**\n * Function: updateHint\n * \n * Hook for subclassers do show details while the handler is active.\n */\nmxEdgeHandler.prototype.updateHint = function(me, point) { };\n\n/**\n * Function: removeHint\n * \n * Hooks for subclassers to hide details when the handler gets inactive.\n */\nmxEdgeHandler.prototype.removeHint = function() { };\n\n/**\n * Function: roundLength\n * \n * Hook for rounding the unscaled width or height. This uses Math.round.\n */\nmxEdgeHandler.prototype.roundLength = function(length)\n{\n\treturn Math.round(length);\n};\n\n/**\n * Function: isSnapToTerminalsEvent\n * \n * Returns true if <snapToTerminals> is true and if alt is not pressed.\n */\nmxEdgeHandler.prototype.isSnapToTerminalsEvent = function(me)\n{\n\treturn this.snapToTerminals && !mxEvent.isAltDown(me.getEvent());\n};\n\n/**\n * Function: getPointForEvent\n * \n * Returns the point for the given event.\n */\nmxEdgeHandler.prototype.getPointForEvent = function(me)\n{\n\tvar view = this.graph.getView();\n\tvar scale = view.scale;\n\tvar point = new mxPoint(this.roundLength(me.getGraphX() / scale) * scale,\n\t\tthis.roundLength(me.getGraphY() / scale) * scale);\n\t\n\tvar tt = this.getSnapToTerminalTolerance();\n\tvar overrideX = false;\n\tvar overrideY = false;\t\t\n\t\n\tif (tt > 0 && this.isSnapToTerminalsEvent(me))\n\t{\n\t\tfunction snapToPoint(pt)\n\t\t{\n\t\t\tif (pt != null)\n\t\t\t{\n\t\t\t\tvar x = pt.x;\n\n\t\t\t\tif (Math.abs(point.x - x) < tt)\n\t\t\t\t{\n\t\t\t\t\tpoint.x = x;\n\t\t\t\t\toverrideX = true;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tvar y = pt.y;\n\n\t\t\t\tif (Math.abs(point.y - y) < tt)\n\t\t\t\t{\n\t\t\t\t\tpoint.y = y;\n\t\t\t\t\toverrideY = true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Temporary function\n\t\tfunction snapToTerminal(terminal)\n\t\t{\n\t\t\tif (terminal != null)\n\t\t\t{\n\t\t\t\tsnapToPoint.call(this, new mxPoint(view.getRoutingCenterX(terminal),\n\t\t\t\t\t\tview.getRoutingCenterY(terminal)));\n\t\t\t}\n\t\t};\n\n\t\tsnapToTerminal.call(this, this.state.getVisibleTerminalState(true));\n\t\tsnapToTerminal.call(this, this.state.getVisibleTerminalState(false));\n\n\t\tif (this.state.absolutePoints != null)\n\t\t{\n\t\t\tfor (var i = 0; i < this.state.absolutePoints.length; i++)\n\t\t\t{\n\t\t\t\tsnapToPoint.call(this, this.state.absolutePoints[i]);\n\t\t\t}\n\t\t}\n\t}\n\n\tif (this.graph.isGridEnabledEvent(me.getEvent()))\n\t{\n\t\tvar tr = view.translate;\n\t\t\n\t\tif (!overrideX)\n\t\t{\n\t\t\tpoint.x = (this.graph.snap(point.x / scale - tr.x) + tr.x) * scale;\n\t\t}\n\t\t\n\t\tif (!overrideY)\n\t\t{\n\t\t\tpoint.y = (this.graph.snap(point.y / scale - tr.y) + tr.y) * scale;\n\t\t}\n\t}\n\t\n\treturn point;\n};\n\n/**\n * Function: getPreviewTerminalState\n * \n * Updates the given preview state taking into account the state of the constraint handler.\n */\nmxEdgeHandler.prototype.getPreviewTerminalState = function(me)\n{\n\tthis.constraintHandler.update(me, this.isSource, true, me.isSource(this.marker.highlight.shape) ? null : this.currentPoint);\n\t\n\tif (this.constraintHandler.currentFocus != null && this.constraintHandler.currentConstraint != null)\n\t{\n\t\t// Handles special case where grid is large and connection point is at actual point in which\n\t\t// case the outline is not followed as long as we're < gridSize / 2 away from that point\n\t\tif (this.marker.highlight != null && this.marker.highlight.state != null &&\n\t\t\tthis.marker.highlight.state.cell == this.constraintHandler.currentFocus.cell)\n\t\t{\n\t\t\t// Direct repaint needed if cell already highlighted\n\t\t\tif (this.marker.highlight.shape.stroke != 'transparent')\n\t\t\t{\n\t\t\t\tthis.marker.highlight.shape.stroke = 'transparent';\n\t\t\t\tthis.marker.highlight.repaint();\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tthis.marker.markCell(this.constraintHandler.currentFocus.cell, 'transparent');\n\t\t}\n\t\t\n\t\tvar model = this.graph.getModel();\n\t\tvar other = this.graph.view.getTerminalPort(this.state,\n\t\t\t\tthis.graph.view.getState(model.getTerminal(this.state.cell,\n\t\t\t!this.isSource)), !this.isSource);\n\t\tvar otherCell = (other != null) ? other.cell : null;\n\t\tvar source = (this.isSource) ? this.constraintHandler.currentFocus.cell : otherCell;\n\t\tvar target = (this.isSource) ? otherCell : this.constraintHandler.currentFocus.cell;\n\t\t\n\t\t// Updates the error message of the handler\n\t\tthis.error = this.validateConnection(source, target);\n\t\tvar result = null;\n\t\t\n\t\tif (this.error == null)\n\t\t{\n\t\t\tresult = this.constraintHandler.currentFocus;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tthis.constraintHandler.reset();\n\t\t}\n\t\t\n\t\treturn result;\n\t}\n\telse if (!this.graph.isIgnoreTerminalEvent(me.getEvent()))\n\t{\n\t\tthis.marker.process(me);\n\t\tvar state = this.marker.getValidState();\n\t\t\n\t\tif (state != null && this.graph.isCellLocked(state.cell))\n\t\t{\n\t\t\tthis.marker.reset();\n\t\t}\n\t\t\n\t\treturn this.marker.getValidState();\n\t}\n\telse\n\t{\n\t\tthis.marker.reset();\n\t\t\n\t\treturn null;\n\t}\n};\n\n/**\n * Function: getPreviewPoints\n * \n * Updates the given preview state taking into account the state of the constraint handler.\n * \n * Parameters:\n * \n * pt - <mxPoint> that contains the current pointer position.\n * me - Optional <mxMouseEvent> that contains the current event.\n */\nmxEdgeHandler.prototype.getPreviewPoints = function(pt, me)\n{\n\tvar geometry = this.graph.getCellGeometry(this.state.cell);\n\tvar points = (geometry.points != null) ? geometry.points.slice() : null;\n\tvar point = new mxPoint(pt.x, pt.y);\n\tvar result = null;\n\t\n\tif (!this.isSource && !this.isTarget)\n\t{\n\t\tthis.convertPoint(point, false);\n\t\t\n\t\tif (points == null)\n\t\t{\n\t\t\tpoints = [point];\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Adds point from virtual bend\n\t\t\tif (this.index <= mxEvent.VIRTUAL_HANDLE)\n\t\t\t{\n\t\t\t\tpoints.splice(mxEvent.VIRTUAL_HANDLE - this.index, 0, point);\n\t\t\t}\n\n\t\t\t// Removes point if dragged on terminal point\n\t\t\tif (!this.isSource && !this.isTarget)\n\t\t\t{\n\t\t\t\tfor (var i = 0; i < this.bends.length; i++)\n\t\t\t\t{\n\t\t\t\t\tif (i != this.index)\n\t\t\t\t\t{\n\t\t\t\t\t\tvar bend = this.bends[i];\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (bend != null && mxUtils.contains(bend.bounds, pt.x, pt.y))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif (this.index <= mxEvent.VIRTUAL_HANDLE)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tpoints.splice(mxEvent.VIRTUAL_HANDLE - this.index, 1);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tpoints.splice(this.index - 1, 1);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tresult = points;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// Removes point if user tries to straighten a segment\n\t\t\t\tif (result == null && this.straightRemoveEnabled && (me == null || !mxEvent.isAltDown(me.getEvent())))\n\t\t\t\t{\n\t\t\t\t\tvar tol = this.graph.tolerance * this.graph.tolerance;\n\t\t\t\t\tvar abs = this.state.absolutePoints.slice();\n\t\t\t\t\tabs[this.index] = pt;\n\t\t\t\t\t\n\t\t\t\t\t// Handes special case where removing waypoint affects tolerance (flickering)\n\t\t\t\t\tvar src = this.state.getVisibleTerminalState(true);\n\t\t\t\t\t\n\t\t\t\t\tif (src != null)\n\t\t\t\t\t{\n\t\t\t\t\t\tvar c = this.graph.getConnectionConstraint(this.state, src, true);\n\t\t\t\t\t\t\n\t\t\t\t\t\t// Checks if point is not fixed\n\t\t\t\t\t\tif (c == null || this.graph.getConnectionPoint(src, c) == null)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tabs[0] = new mxPoint(src.view.getRoutingCenterX(src), src.view.getRoutingCenterY(src));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tvar trg = this.state.getVisibleTerminalState(false);\n\t\t\t\t\t\n\t\t\t\t\tif (trg != null)\n\t\t\t\t\t{\n\t\t\t\t\t\tvar c = this.graph.getConnectionConstraint(this.state, trg, false);\n\t\t\t\t\t\t\n\t\t\t\t\t\t// Checks if point is not fixed\n\t\t\t\t\t\tif (c == null || this.graph.getConnectionPoint(trg, c) == null)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tabs[abs.length - 1] = new mxPoint(trg.view.getRoutingCenterX(trg), trg.view.getRoutingCenterY(trg));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tfunction checkRemove(idx, tmp)\n\t\t\t\t\t{\n\t\t\t\t\t\tif (idx > 0 && idx < abs.length - 1 &&\n\t\t\t\t\t\t\tmxUtils.ptSegDistSq(abs[idx - 1].x, abs[idx - 1].y,\n\t\t\t\t\t\t\t\tabs[idx + 1].x, abs[idx + 1].y, tmp.x, tmp.y) < tol)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tpoints.splice(idx - 1, 1);\n\t\t\t\t\t\t\tresult = points;\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t\t\n\t\t\t\t\t// LATER: Check if other points can be removed if a segment is made straight\n\t\t\t\t\tcheckRemove(this.index, pt);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// Updates existing point\n\t\t\tif (result == null && this.index > mxEvent.VIRTUAL_HANDLE)\n\t\t\t{\n\t\t\t\tpoints[this.index - 1] = point;\n\t\t\t}\n\t\t}\n\t}\n\telse if (this.graph.resetEdgesOnConnect)\n\t{\n\t\tpoints = null;\n\t}\n\t\n\treturn (result != null) ? result : points;\n};\n\n/**\n * Function: isOutlineConnectEvent\n * \n * Returns true if <outlineConnect> is true and the source of the event is the outline shape\n * or shift is pressed.\n */\nmxEdgeHandler.prototype.isOutlineConnectEvent = function(me)\n{\n\tvar offset = mxUtils.getOffset(this.graph.container);\n\tvar evt = me.getEvent();\n\t\n\tvar clientX = mxEvent.getClientX(evt);\n\tvar clientY = mxEvent.getClientY(evt);\n\t\n\tvar doc = document.documentElement;\n\tvar left = (window.pageXOffset || doc.scrollLeft) - (doc.clientLeft || 0);\n\tvar top = (window.pageYOffset || doc.scrollTop)  - (doc.clientTop || 0);\n\t\n\tvar gridX = this.currentPoint.x - this.graph.container.scrollLeft + offset.x - left;\n\tvar gridY = this.currentPoint.y - this.graph.container.scrollTop + offset.y - top;\n\n\treturn this.outlineConnect && !mxEvent.isShiftDown(me.getEvent()) &&\n\t\t(me.isSource(this.marker.highlight.shape) ||\n\t\t(mxEvent.isAltDown(me.getEvent()) && me.getState() != null) ||\n\t\tthis.marker.highlight.isHighlightAt(clientX, clientY) ||\n\t\t((gridX != clientX || gridY != clientY) && me.getState() == null &&\n\t\tthis.marker.highlight.isHighlightAt(gridX, gridY)));\n};\n\n/**\n * Function: updatePreviewState\n * \n * Updates the given preview state taking into account the state of the constraint handler.\n */\nmxEdgeHandler.prototype.updatePreviewState = function(edge, point, terminalState, me, outline)\n{\n\t// Computes the points for the edge style and terminals\n\tvar sourceState = (this.isSource) ? terminalState : this.state.getVisibleTerminalState(true);\n\tvar targetState = (this.isTarget) ? terminalState : this.state.getVisibleTerminalState(false);\n\t\n\tvar sourceConstraint = this.graph.getConnectionConstraint(edge, sourceState, true);\n\tvar targetConstraint = this.graph.getConnectionConstraint(edge, targetState, false);\n\n\tvar constraint = this.constraintHandler.currentConstraint;\n\n\tif (constraint == null && outline)\n\t{\n\t\tif (terminalState != null)\n\t\t{\n\t\t\t// Handles special case where mouse is on outline away from actual end point\n\t\t\t// in which case the grid is ignored and mouse point is used instead\n\t\t\tif (me.isSource(this.marker.highlight.shape))\n\t\t\t{\n\t\t\t\tpoint = new mxPoint(me.getGraphX(), me.getGraphY());\n\t\t\t}\n\t\t\t\n\t\t\tconstraint = this.graph.getOutlineConstraint(point, terminalState, me);\n\t\t\tthis.constraintHandler.setFocus(me, terminalState, this.isSource);\n\t\t\tthis.constraintHandler.currentConstraint = constraint;\n\t\t\tthis.constraintHandler.currentPoint = point;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tconstraint = new mxConnectionConstraint();\n\t\t}\n\t}\n\t\n\tif (this.outlineConnect && this.marker.highlight != null && this.marker.highlight.shape != null)\n\t{\n\t\tvar s = this.graph.view.scale;\n\t\t\n\t\tif (this.constraintHandler.currentConstraint != null &&\n\t\t\tthis.constraintHandler.currentFocus != null)\n\t\t{\n\t\t\tthis.marker.highlight.shape.stroke = (outline) ? mxConstants.OUTLINE_HIGHLIGHT_COLOR : 'transparent';\n\t\t\tthis.marker.highlight.shape.strokewidth = mxConstants.OUTLINE_HIGHLIGHT_STROKEWIDTH / s / s;\n\t\t\tthis.marker.highlight.repaint();\n\t\t}\n\t\telse if (this.marker.hasValidState())\n\t\t{\n\t\t\tthis.marker.highlight.shape.stroke = (this.marker.getValidState() == me.getState()) ?\n\t\t\t\tmxConstants.DEFAULT_VALID_COLOR : 'transparent';\n\t\t\tthis.marker.highlight.shape.strokewidth = mxConstants.HIGHLIGHT_STROKEWIDTH / s / s;\n\t\t\tthis.marker.highlight.repaint();\n\t\t}\n\t}\n\t\n\tif (this.isSource)\n\t{\n\t\tsourceConstraint = constraint;\n\t}\n\telse if (this.isTarget)\n\t{\n\t\ttargetConstraint = constraint;\n\t}\n\t\n\tif (this.isSource || this.isTarget)\n\t{\n\t\tif (constraint != null && constraint.point != null)\n\t\t{\n\t\t\tedge.style[(this.isSource) ? mxConstants.STYLE_EXIT_X : mxConstants.STYLE_ENTRY_X] = constraint.point.x;\n\t\t\tedge.style[(this.isSource) ? mxConstants.STYLE_EXIT_Y : mxConstants.STYLE_ENTRY_Y] = constraint.point.y;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tdelete edge.style[(this.isSource) ? mxConstants.STYLE_EXIT_X : mxConstants.STYLE_ENTRY_X];\n\t\t\tdelete edge.style[(this.isSource) ? mxConstants.STYLE_EXIT_Y : mxConstants.STYLE_ENTRY_Y];\n\t\t}\n\t}\n\t\n\tedge.setVisibleTerminalState(sourceState, true);\n\tedge.setVisibleTerminalState(targetState, false);\n\t\n\tif (!this.isSource || sourceState != null)\n\t{\n\t\tedge.view.updateFixedTerminalPoint(edge, sourceState, true, sourceConstraint);\n\t}\n\t\n\tif (!this.isTarget || targetState != null)\n\t{\n\t\tedge.view.updateFixedTerminalPoint(edge, targetState, false, targetConstraint);\n\t}\n\t\n\tif ((this.isSource || this.isTarget) && terminalState == null)\n\t{\n\t\tedge.setAbsoluteTerminalPoint(point, this.isSource);\n\n\t\tif (this.marker.getMarkedState() == null)\n\t\t{\n\t\t\tthis.error = (this.graph.allowDanglingEdges) ? null : '';\n\t\t}\n\t}\n\t\n\tedge.view.updatePoints(edge, this.points, sourceState, targetState);\n\tedge.view.updateFloatingTerminalPoints(edge, sourceState, targetState);\n};\n\n/**\n * Function: mouseMove\n * \n * Handles the event by updating the preview.\n */\nmxEdgeHandler.prototype.mouseMove = function(sender, me)\n{\n\tif (this.index != null && this.marker != null)\n\t{\n\t\tthis.currentPoint = this.getPointForEvent(me);\n\t\tthis.error = null;\n\t\t\n\t\t// Uses the current point from the constraint handler if available\n\t\tif (!this.graph.isIgnoreTerminalEvent(me.getEvent()) && mxEvent.isShiftDown(me.getEvent()) && this.snapPoint != null)\n\t\t{\n\t\t\tif (Math.abs(this.snapPoint.x - this.currentPoint.x) < Math.abs(this.snapPoint.y - this.currentPoint.y))\n\t\t\t{\n\t\t\t\tthis.currentPoint.x = this.snapPoint.x;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tthis.currentPoint.y = this.snapPoint.y;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (this.index <= mxEvent.CUSTOM_HANDLE && this.index > mxEvent.VIRTUAL_HANDLE)\n\t\t{\n\t\t\tif (this.customHandles != null)\n\t\t\t{\n\t\t\t\tthis.customHandles[mxEvent.CUSTOM_HANDLE - this.index].processEvent(me);\n\t\t\t}\n\t\t}\n\t\telse if (this.isLabel)\n\t\t{\n\t\t\tthis.label.x = this.currentPoint.x;\n\t\t\tthis.label.y = this.currentPoint.y;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tthis.points = this.getPreviewPoints(this.currentPoint, me);\n\t\t\tvar terminalState = (this.isSource || this.isTarget) ? this.getPreviewTerminalState(me) : null;\n\n\t\t\tif (this.constraintHandler.currentConstraint != null &&\n\t\t\t\tthis.constraintHandler.currentFocus != null &&\n\t\t\t\tthis.constraintHandler.currentPoint != null)\n\t\t\t{\n\t\t\t\tthis.currentPoint = this.constraintHandler.currentPoint.clone();\n\t\t\t}\n\t\t\telse if (this.outlineConnect)\n\t\t\t{\n\t\t\t\t// Need to check outline before cloning terminal state\n\t\t\t\tvar outline = (this.isSource || this.isTarget) ? this.isOutlineConnectEvent(me) : false\n\t\t\t\t\t\t\n\t\t\t\tif (outline)\n\t\t\t\t{\n\t\t\t\t\tterminalState = this.marker.highlight.state;\n\t\t\t\t}\n\t\t\t\telse if (terminalState != null && terminalState != me.getState() && this.marker.highlight.shape != null)\n\t\t\t\t{\n\t\t\t\t\tthis.marker.highlight.shape.stroke = 'transparent';\n\t\t\t\t\tthis.marker.highlight.repaint();\n\t\t\t\t\tterminalState = null;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif (terminalState != null && this.graph.isCellLocked(terminalState.cell))\n\t\t\t{\n\t\t\t\tterminalState = null;\n\t\t\t\tthis.marker.reset();\n\t\t\t}\n\t\t\t\n\t\t\tvar clone = this.clonePreviewState(this.currentPoint, (terminalState != null) ? terminalState.cell : null);\n\t\t\tthis.updatePreviewState(clone, this.currentPoint, terminalState, me, outline);\n\n\t\t\t// Sets the color of the preview to valid or invalid, updates the\n\t\t\t// points of the preview and redraws\n\t\t\tvar color = (this.error == null) ? this.marker.validColor : this.marker.invalidColor;\n\t\t\tthis.setPreviewColor(color);\n\t\t\tthis.abspoints = clone.absolutePoints;\n\t\t\tthis.active = true;\n\t\t}\n\n\t\t// This should go before calling isOutlineConnectEvent above. As a workaround\n\t\t// we add an offset of gridSize to the hint to avoid problem with hit detection\n\t\t// in highlight.isHighlightAt (which uses comonentFromPoint)\n\t\tthis.updateHint(me, this.currentPoint);\n\t\tthis.drawPreview();\n\t\tmxEvent.consume(me.getEvent());\n\t\tme.consume();\n\t}\n\t// Workaround for disabling the connect highlight when over handle\n\telse if (mxClient.IS_IE && this.getHandleForEvent(me) != null)\n\t{\n\t\tme.consume(false);\n\t}\n};\n\n/**\n * Function: mouseUp\n * \n * Handles the event to applying the previewed changes on the edge by\n * using <moveLabel>, <connect> or <changePoints>.\n */\nmxEdgeHandler.prototype.mouseUp = function(sender, me)\n{\n\t// Workaround for wrong event source in Webkit\n\tif (this.index != null && this.marker != null)\n\t{\n\t\tvar edge = this.state.cell;\n\t\t\n\t\t// Ignores event if mouse has not been moved\n\t\tif (me.getX() != this.startX || me.getY() != this.startY)\n\t\t{\n\t\t\tvar clone = !this.graph.isIgnoreTerminalEvent(me.getEvent()) && this.graph.isCloneEvent(me.getEvent()) &&\n\t\t\t\tthis.cloneEnabled && this.graph.isCellsCloneable();\n\t\t\t\n\t\t\t// Displays the reason for not carriying out the change\n\t\t\t// if there is an error message with non-zero length\n\t\t\tif (this.error != null)\n\t\t\t{\n\t\t\t\tif (this.error.length > 0)\n\t\t\t\t{\n\t\t\t\t\tthis.graph.validationAlert(this.error);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if (this.index <= mxEvent.CUSTOM_HANDLE && this.index > mxEvent.VIRTUAL_HANDLE)\n\t\t\t{\n\t\t\t\tif (this.customHandles != null)\n\t\t\t\t{\n\t\t\t\t\tvar model = this.graph.getModel();\n\t\t\t\t\t\n\t\t\t\t\tmodel.beginUpdate();\n\t\t\t\t\ttry\n\t\t\t\t\t{\n\t\t\t\t\t\tthis.customHandles[mxEvent.CUSTOM_HANDLE - this.index].execute();\n\t\t\t\t\t}\n\t\t\t\t\tfinally\n\t\t\t\t\t{\n\t\t\t\t\t\tmodel.endUpdate();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if (this.isLabel)\n\t\t\t{\n\t\t\t\tthis.moveLabel(this.state, this.label.x, this.label.y);\n\t\t\t}\n\t\t\telse if (this.isSource || this.isTarget)\n\t\t\t{\n\t\t\t\tvar terminal = null;\n\t\t\t\t\n\t\t\t\tif (this.constraintHandler.currentConstraint != null &&\n\t\t\t\t\tthis.constraintHandler.currentFocus != null)\n\t\t\t\t{\n\t\t\t\t\tterminal = this.constraintHandler.currentFocus.cell;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (terminal == null && this.marker.hasValidState() && this.marker.highlight != null &&\n\t\t\t\t\tthis.marker.highlight.shape != null &&\n\t\t\t\t\tthis.marker.highlight.shape.stroke != 'transparent' &&\n\t\t\t\t\tthis.marker.highlight.shape.stroke != 'white')\n\t\t\t\t{\n\t\t\t\t\tterminal = this.marker.validState.cell;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (terminal != null)\n\t\t\t\t{\n\t\t\t\t\tvar model = this.graph.getModel();\n\t\t\t\t\tvar parent = model.getParent(edge);\n\t\t\t\t\t\n\t\t\t\t\tmodel.beginUpdate();\n\t\t\t\t\ttry\n\t\t\t\t\t{\n\t\t\t\t\t\t// Clones and adds the cell\n\t\t\t\t\t\tif (clone)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tvar geo = model.getGeometry(edge);\n\t\t\t\t\t\t\tvar clone = this.graph.cloneCell(edge);\n\t\t\t\t\t\t\tmodel.add(parent, clone, model.getChildCount(parent));\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif (geo != null)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tgeo = geo.clone();\n\t\t\t\t\t\t\t\tmodel.setGeometry(clone, geo);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tvar other = model.getTerminal(edge, !this.isSource);\n\t\t\t\t\t\t\tthis.graph.connectCell(clone, other, !this.isSource);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tedge = clone;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tedge = this.connect(edge, terminal, this.isSource, clone, me);\n\t\t\t\t\t}\n\t\t\t\t\tfinally\n\t\t\t\t\t{\n\t\t\t\t\t\tmodel.endUpdate();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if (this.graph.isAllowDanglingEdges())\n\t\t\t\t{\n\t\t\t\t\tvar pt = this.abspoints[(this.isSource) ? 0 : this.abspoints.length - 1];\n\t\t\t\t\tpt.x = this.roundLength(pt.x / this.graph.view.scale - this.graph.view.translate.x);\n\t\t\t\t\tpt.y = this.roundLength(pt.y / this.graph.view.scale - this.graph.view.translate.y);\n\n\t\t\t\t\tvar pstate = this.graph.getView().getState(\n\t\t\t\t\t\t\tthis.graph.getModel().getParent(edge));\n\t\t\t\t\t\t\t\n\t\t\t\t\tif (pstate != null)\n\t\t\t\t\t{\n\t\t\t\t\t\tpt.x -= pstate.origin.x;\n\t\t\t\t\t\tpt.y -= pstate.origin.y;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tpt.x -= this.graph.panDx / this.graph.view.scale;\n\t\t\t\t\tpt.y -= this.graph.panDy / this.graph.view.scale;\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t// Destroys and recreates this handler\n\t\t\t\t\tedge = this.changeTerminalPoint(edge, pt, this.isSource, clone);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if (this.active)\n\t\t\t{\n\t\t\t\tedge = this.changePoints(edge, this.points, clone);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tthis.graph.getView().invalidate(this.state.cell);\n\t\t\t\tthis.graph.getView().validate(this.state.cell);\t\t\t\t\t\t\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Resets the preview color the state of the handler if this\n\t\t// handler has not been recreated\n\t\tif (this.marker != null)\n\t\t{\n\t\t\tthis.reset();\n\n\t\t\t// Updates the selection if the edge has been cloned\n\t\t\tif (edge != this.state.cell)\n\t\t\t{\n\t\t\t\tthis.graph.setSelectionCell(edge);\n\t\t\t}\n\t\t}\n\n\t\tme.consume();\n\t}\n};\n\n/**\n * Function: reset\n * \n * Resets the state of this handler.\n */\nmxEdgeHandler.prototype.reset = function()\n{\n\tif (this.active)\n\t{\n\t\tthis.refresh();\n\t}\n\t\n\tthis.error = null;\n\tthis.index = null;\n\tthis.label = null;\n\tthis.points = null;\n\tthis.snapPoint = null;\n\tthis.isLabel = false;\n\tthis.isSource = false;\n\tthis.isTarget = false;\n\tthis.active = false;\n\t\n\tif (this.livePreview && this.sizers != null)\n\t{\n\t\tfor (var i = 0; i < this.sizers.length; i++)\n\t\t{\n\t\t\tif (this.sizers[i] != null)\n\t\t\t{\n\t\t\t\tthis.sizers[i].node.style.display = '';\n\t\t\t}\n\t\t}\n\t}\n\n\tif (this.marker != null)\n\t{\n\t\tthis.marker.reset();\n\t}\n\t\n\tif (this.constraintHandler != null)\n\t{\n\t\tthis.constraintHandler.reset();\n\t}\n\t\n\tif (this.customHandles != null)\n\t{\n\t\tfor (var i = 0; i < this.customHandles.length; i++)\n\t\t{\n\t\t\tthis.customHandles[i].reset();\n\t\t}\n\t}\n\n\tthis.setPreviewColor(mxConstants.EDGE_SELECTION_COLOR);\n\tthis.removeHint();\n\tthis.redraw();\n};\n\n/**\n * Function: setPreviewColor\n * \n * Sets the color of the preview to the given value.\n */\nmxEdgeHandler.prototype.setPreviewColor = function(color)\n{\n\tif (this.shape != null)\n\t{\n\t\tthis.shape.stroke = color;\n\t}\n};\n\n\n/**\n * Function: convertPoint\n * \n * Converts the given point in-place from screen to unscaled, untranslated\n * graph coordinates and applies the grid. Returns the given, modified\n * point instance.\n * \n * Parameters:\n * \n * point - <mxPoint> to be converted.\n * gridEnabled - Boolean that specifies if the grid should be applied.\n */\nmxEdgeHandler.prototype.convertPoint = function(point, gridEnabled)\n{\n\tvar scale = this.graph.getView().getScale();\n\tvar tr = this.graph.getView().getTranslate();\n\t\t\n\tif (gridEnabled)\n\t{\n\t\tpoint.x = this.graph.snap(point.x);\n\t\tpoint.y = this.graph.snap(point.y);\n\t}\n\t\n\tpoint.x = Math.round(point.x / scale - tr.x);\n\tpoint.y = Math.round(point.y / scale - tr.y);\n\n\tvar pstate = this.graph.getView().getState(\n\t\tthis.graph.getModel().getParent(this.state.cell));\n\n\tif (pstate != null)\n\t{\n\t\tpoint.x -= pstate.origin.x;\n\t\tpoint.y -= pstate.origin.y;\n\t}\n\n\treturn point;\n};\n\n/**\n * Function: moveLabel\n * \n * Changes the coordinates for the label of the given edge.\n * \n * Parameters:\n * \n * edge - <mxCell> that represents the edge.\n * x - Integer that specifies the x-coordinate of the new location.\n * y - Integer that specifies the y-coordinate of the new location.\n */\nmxEdgeHandler.prototype.moveLabel = function(edgeState, x, y)\n{\n\tvar model = this.graph.getModel();\n\tvar geometry = model.getGeometry(edgeState.cell);\n\t\n\tif (geometry != null)\n\t{\n\t\tvar scale = this.graph.getView().scale;\n\t\tgeometry = geometry.clone();\n\t\t\n\t\tif (geometry.relative)\n\t\t{\n\t\t\t// Resets the relative location stored inside the geometry\n\t\t\tvar pt = this.graph.getView().getRelativePoint(edgeState, x, y);\n\t\t\tgeometry.x = Math.round(pt.x * 10000) / 10000;\n\t\t\tgeometry.y = Math.round(pt.y);\n\t\t\t\n\t\t\t// Resets the offset inside the geometry to find the offset\n\t\t\t// from the resulting point\n\t\t\tgeometry.offset = new mxPoint(0, 0);\n\t\t\tvar pt = this.graph.view.getPoint(edgeState, geometry);\n\t\t\tgeometry.offset = new mxPoint(Math.round((x - pt.x) / scale), Math.round((y - pt.y) / scale));\n\t\t}\n\t\telse\n\t\t{\n\t\t\tvar points = edgeState.absolutePoints;\n\t\t\tvar p0 = points[0];\n\t\t\tvar pe = points[points.length - 1];\n\t\t\t\n\t\t\tif (p0 != null && pe != null)\n\t\t\t{\n\t\t\t\tvar cx = p0.x + (pe.x - p0.x) / 2;\n\t\t\t\tvar cy = p0.y + (pe.y - p0.y) / 2;\n\t\t\t\t\n\t\t\t\tgeometry.offset = new mxPoint(Math.round((x - cx) / scale), Math.round((y - cy) / scale));\n\t\t\t\tgeometry.x = 0;\n\t\t\t\tgeometry.y = 0;\n\t\t\t}\n\t\t}\n\n\t\tmodel.setGeometry(edgeState.cell, geometry);\n\t}\n};\n\n/**\n * Function: connect\n * \n * Changes the terminal or terminal point of the given edge in the graph\n * model.\n * \n * Parameters:\n * \n * edge - <mxCell> that represents the edge to be reconnected.\n * terminal - <mxCell> that represents the new terminal.\n * isSource - Boolean indicating if the new terminal is the source or\n * target terminal.\n * isClone - Boolean indicating if the new connection should be a clone of\n * the old edge.\n * me - <mxMouseEvent> that contains the mouse up event.\n */\nmxEdgeHandler.prototype.connect = function(edge, terminal, isSource, isClone, me)\n{\n\tvar model = this.graph.getModel();\n\tvar parent = model.getParent(edge);\n\t\n\tmodel.beginUpdate();\n\ttry\n\t{\n\t\tvar constraint = this.constraintHandler.currentConstraint;\n\t\t\n\t\tif (constraint == null)\n\t\t{\n\t\t\tconstraint = new mxConnectionConstraint();\n\t\t}\n\n\t\tthis.graph.connectCell(edge, terminal, isSource, constraint);\n\t}\n\tfinally\n\t{\n\t\tmodel.endUpdate();\n\t}\n\t\n\treturn edge;\n};\n\n/**\n * Function: changeTerminalPoint\n * \n * Changes the terminal point of the given edge.\n */\nmxEdgeHandler.prototype.changeTerminalPoint = function(edge, point, isSource, clone)\n{\n\tvar model = this.graph.getModel();\n\n\tmodel.beginUpdate();\n\ttry\n\t{\n\t\tif (clone)\n\t\t{\n\t\t\tvar parent = model.getParent(edge);\n\t\t\tvar terminal = model.getTerminal(edge, !isSource);\n\t\t\tedge = this.graph.cloneCell(edge);\n\t\t\tmodel.add(parent, edge, model.getChildCount(parent));\n\t\t\tmodel.setTerminal(edge, terminal, !isSource);\n\t\t}\n\n\t\tvar geo = model.getGeometry(edge);\n\t\t\n\t\tif (geo != null)\n\t\t{\n\t\t\tgeo = geo.clone();\n\t\t\tgeo.setTerminalPoint(point, isSource);\n\t\t\tmodel.setGeometry(edge, geo);\n\t\t\tthis.graph.connectCell(edge, null, isSource, new mxConnectionConstraint());\n\t\t}\n\t}\n\tfinally\n\t{\n\t\tmodel.endUpdate();\n\t}\n\t\n\treturn edge;\n};\n\n/**\n * Function: changePoints\n * \n * Changes the control points of the given edge in the graph model.\n */\nmxEdgeHandler.prototype.changePoints = function(edge, points, clone)\n{\n\tvar model = this.graph.getModel();\n\tmodel.beginUpdate();\n\ttry\n\t{\n\t\tif (clone)\n\t\t{\n\t\t\tvar parent = model.getParent(edge);\n\t\t\tvar source = model.getTerminal(edge, true);\n\t\t\tvar target = model.getTerminal(edge, false);\n\t\t\tedge = this.graph.cloneCell(edge);\n\t\t\tmodel.add(parent, edge, model.getChildCount(parent));\n\t\t\tmodel.setTerminal(edge, source, true);\n\t\t\tmodel.setTerminal(edge, target, false);\n\t\t}\n\t\t\n\t\tvar geo = model.getGeometry(edge);\n\t\t\n\t\tif (geo != null)\n\t\t{\n\t\t\tgeo = geo.clone();\n\t\t\tgeo.points = points;\n\t\t\t\n\t\t\tmodel.setGeometry(edge, geo);\n\t\t}\n\t}\n\tfinally\n\t{\n\t\tmodel.endUpdate();\n\t}\n\t\n\treturn edge;\n};\n\n/**\n * Function: addPoint\n * \n * Adds a control point for the given state and event.\n */\nmxEdgeHandler.prototype.addPoint = function(state, evt)\n{\n\tvar pt = mxUtils.convertPoint(this.graph.container, mxEvent.getClientX(evt),\n\t\t\tmxEvent.getClientY(evt));\n\tvar gridEnabled = this.graph.isGridEnabledEvent(evt);\n\tthis.convertPoint(pt, gridEnabled);\n\tthis.addPointAt(state, pt.x, pt.y);\n\tmxEvent.consume(evt);\n};\n\n/**\n * Function: addPointAt\n * \n * Adds a control point at the given point.\n */\nmxEdgeHandler.prototype.addPointAt = function(state, x, y)\n{\n\tvar geo = this.graph.getCellGeometry(state.cell);\n\tvar pt = new mxPoint(x, y);\n\t\n\tif (geo != null)\n\t{\n\t\tgeo = geo.clone();\n\t\tvar t = this.graph.view.translate;\n\t\tvar s = this.graph.view.scale;\n\t\tvar offset = new mxPoint(t.x * s, t.y * s);\n\t\t\n\t\tvar parent = this.graph.model.getParent(this.state.cell);\n\t\t\n\t\tif (this.graph.model.isVertex(parent))\n\t\t{\n\t\t\tvar pState = this.graph.view.getState(parent);\n\t\t\toffset = new mxPoint(pState.x, pState.y);\n\t\t}\n\t\t\n\t\tvar index = mxUtils.findNearestSegment(state, pt.x * s + offset.x, pt.y * s + offset.y);\n\n\t\tif (geo.points == null)\n\t\t{\n\t\t\tgeo.points = [pt];\n\t\t}\n\t\telse\n\t\t{\n\t\t\tgeo.points.splice(index, 0, pt);\n\t\t}\n\t\t\n\t\tthis.graph.getModel().setGeometry(state.cell, geo);\n\t\tthis.refresh();\t\n\t\tthis.redraw();\n\t}\n};\n\n/**\n * Function: removePoint\n * \n * Removes the control point at the given index from the given state.\n */\nmxEdgeHandler.prototype.removePoint = function(state, index)\n{\n\tif (index > 0 && index < this.abspoints.length - 1)\n\t{\n\t\tvar geo = this.graph.getCellGeometry(this.state.cell);\n\t\t\n\t\tif (geo != null && geo.points != null)\n\t\t{\n\t\t\tgeo = geo.clone();\n\t\t\tgeo.points.splice(index - 1, 1);\n\t\t\tthis.graph.getModel().setGeometry(state.cell, geo);\n\t\t\tthis.refresh();\n\t\t\tthis.redraw();\n\t\t}\n\t}\n};\n\n/**\n * Function: getHandleFillColor\n * \n * Returns the fillcolor for the handle at the given index.\n */\nmxEdgeHandler.prototype.getHandleFillColor = function(index)\n{\n\tvar isSource = index == 0;\n\tvar cell = this.state.cell;\n\tvar terminal = this.graph.getModel().getTerminal(cell, isSource);\n\tvar color = mxConstants.HANDLE_FILLCOLOR;\n\t\n\tif ((terminal != null && !this.graph.isCellDisconnectable(cell, terminal, isSource)) ||\n\t\t(terminal == null && !this.graph.isTerminalPointMovable(cell, isSource)))\n\t{\n\t\tcolor = mxConstants.LOCKED_HANDLE_FILLCOLOR;\n\t}\n\telse if (terminal != null && this.graph.isCellDisconnectable(cell, terminal, isSource))\n\t{\n\t\tcolor = mxConstants.CONNECT_HANDLE_FILLCOLOR;\n\t}\n\t\n\treturn color;\n};\n\n/**\n * Function: redraw\n * \n * Redraws the preview, and the bends- and label control points.\n */\nmxEdgeHandler.prototype.redraw = function()\n{\n\tthis.abspoints = this.state.absolutePoints.slice();\n\tthis.redrawHandles();\n\t\n\tvar g = this.graph.getModel().getGeometry(this.state.cell);\n\tvar pts = g.points;\n\n\tif (this.bends != null && this.bends.length > 0)\n\t{\n\t\tif (pts != null)\n\t\t{\n\t\t\tif (this.points == null)\n\t\t\t{\n\t\t\t\tthis.points = [];\n\t\t\t}\n\t\t\t\n\t\t\tfor (var i = 1; i < this.bends.length - 1; i++)\n\t\t\t{\n\t\t\t\tif (this.bends[i] != null && this.abspoints[i] != null)\n\t\t\t\t{\n\t\t\t\t\tthis.points[i - 1] = pts[i - 1];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tthis.drawPreview();\n};\n\n/**\n * Function: redrawHandles\n * \n * Redraws the handles.\n */\nmxEdgeHandler.prototype.redrawHandles = function()\n{\n\tvar cell = this.state.cell;\n\n\t// Updates the handle for the label position\n\tvar b = this.labelShape.bounds;\n\tthis.label = new mxPoint(this.state.absoluteOffset.x, this.state.absoluteOffset.y);\n\tthis.labelShape.bounds = new mxRectangle(Math.round(this.label.x - b.width / 2),\n\t\tMath.round(this.label.y - b.height / 2), b.width, b.height);\n\n\t// Shows or hides the label handle depending on the label\n\tvar lab = this.graph.getLabel(cell);\n\tthis.labelShape.visible = (lab != null && lab.length > 0 && this.graph.isLabelMovable(cell));\n\t\n\tif (this.bends != null && this.bends.length > 0)\n\t{\n\t\tvar n = this.abspoints.length - 1;\n\t\t\n\t\tvar p0 = this.abspoints[0];\n\t\tvar x0 = p0.x;\n\t\tvar y0 = p0.y;\n\t\t\n\t\tb = this.bends[0].bounds;\n\t\tthis.bends[0].bounds = new mxRectangle(Math.floor(x0 - b.width / 2),\n\t\t\t\tMath.floor(y0 - b.height / 2), b.width, b.height);\n\t\tthis.bends[0].fill = this.getHandleFillColor(0);\n\t\tthis.bends[0].redraw();\n\t\t\n\t\tif (this.manageLabelHandle)\n\t\t{\n\t\t\tthis.checkLabelHandle(this.bends[0].bounds);\n\t\t}\n\t\t\t\t\n\t\tvar pe = this.abspoints[n];\n\t\tvar xn = pe.x;\n\t\tvar yn = pe.y;\n\t\t\n\t\tvar bn = this.bends.length - 1;\n\t\tb = this.bends[bn].bounds;\n\t\tthis.bends[bn].bounds = new mxRectangle(Math.floor(xn - b.width / 2),\n\t\t\t\tMath.floor(yn - b.height / 2), b.width, b.height);\n\t\tthis.bends[bn].fill = this.getHandleFillColor(bn);\n\t\tthis.bends[bn].redraw();\n\t\t\t\t\n\t\tif (this.manageLabelHandle)\n\t\t{\n\t\t\tthis.checkLabelHandle(this.bends[bn].bounds);\n\t\t}\n\t\t\n\t\tthis.redrawInnerBends(p0, pe);\n\t}\n\n\tif (this.abspoints != null && this.virtualBends != null && this.virtualBends.length > 0)\n\t{\n\t\tvar last = this.abspoints[0];\n\t\t\n\t\tfor (var i = 0; i < this.virtualBends.length; i++)\n\t\t{\n\t\t\tif (this.virtualBends[i] != null && this.abspoints[i + 1] != null)\n\t\t\t{\n\t\t\t\tvar pt = this.abspoints[i + 1];\n\t\t\t\tvar b = this.virtualBends[i];\n\t\t\t\tvar x = last.x + (pt.x - last.x) / 2;\n\t\t\t\tvar y = last.y + (pt.y - last.y) / 2;\n\t\t\t\tb.bounds = new mxRectangle(Math.floor(x - b.bounds.width / 2),\n\t\t\t\t\t\tMath.floor(y - b.bounds.height / 2), b.bounds.width, b.bounds.height);\n\t\t\t\tb.redraw();\n\t\t\t\tmxUtils.setOpacity(b.node, this.virtualBendOpacity);\n\t\t\t\tlast = pt;\n\t\t\t\t\n\t\t\t\tif (this.manageLabelHandle)\n\t\t\t\t{\n\t\t\t\t\tthis.checkLabelHandle(b.bounds);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t\n\tif (this.labelShape != null)\n\t{\n\t\tthis.labelShape.redraw();\n\t}\n\t\n\tif (this.customHandles != null)\n\t{\n\t\tfor (var i = 0; i < this.customHandles.length; i++)\n\t\t{\n\t\t\tthis.customHandles[i].redraw();\n\t\t}\n\t}\n};\n\n/**\n * Function: hideHandles\n * \n * Shortcut to <hideSizers>.\n */\nmxEdgeHandler.prototype.setHandlesVisible = function(visible)\n{\n\tif (this.bends != null)\n\t{\n\t\tfor (var i = 0; i < this.bends.length; i++)\n\t\t{\n\t\t\tthis.bends[i].node.style.display = (visible) ? '' : 'none';\n\t\t}\n\t}\n\t\n\tif (this.virtualBends != null)\n\t{\n\t\tfor (var i = 0; i < this.virtualBends.length; i++)\n\t\t{\n\t\t\tthis.virtualBends[i].node.style.display = (visible) ? '' : 'none';\n\t\t}\n\t}\n\n\tif (this.labelShape != null)\n\t{\n\t\tthis.labelShape.node.style.display = (visible) ? '' : 'none';\n\t}\n\t\n\tif (this.customHandles != null)\n\t{\n\t\tfor (var i = 0; i < this.customHandles.length; i++)\n\t\t{\n\t\t\tthis.customHandles[i].setVisible(visible);\n\t\t}\n\t}\n};\n\n/**\n * Function: redrawInnerBends\n * \n * Updates and redraws the inner bends.\n * \n * Parameters:\n * \n * p0 - <mxPoint> that represents the location of the first point.\n * pe - <mxPoint> that represents the location of the last point.\n */\nmxEdgeHandler.prototype.redrawInnerBends = function(p0, pe)\n{\n\tfor (var i = 1; i < this.bends.length - 1; i++)\n\t{\n\t\tif (this.bends[i] != null)\n\t\t{\n\t\t\tif (this.abspoints[i] != null)\n\t\t\t{\n\t\t\t\tvar x = this.abspoints[i].x;\n\t\t\t\tvar y = this.abspoints[i].y;\n\t\t\t\t\n\t\t\t\tvar b = this.bends[i].bounds;\n\t\t\t\tthis.bends[i].node.style.visibility = 'visible';\n\t\t\t\tthis.bends[i].bounds = new mxRectangle(Math.round(x - b.width / 2),\n\t\t\t\t\t\tMath.round(y - b.height / 2), b.width, b.height);\n\t\t\t\t\n\t\t\t\tif (this.manageLabelHandle)\n\t\t\t\t{\n\t\t\t\t\tthis.checkLabelHandle(this.bends[i].bounds);\n\t\t\t\t}\n\t\t\t\telse if (this.handleImage == null && this.labelShape.visible && mxUtils.intersects(this.bends[i].bounds, this.labelShape.bounds))\n\t\t\t\t{\n\t\t\t\t\tw = mxConstants.HANDLE_SIZE + 3;\n\t\t\t\t\th = mxConstants.HANDLE_SIZE + 3;\n\t\t\t\t\tthis.bends[i].bounds = new mxRectangle(Math.round(x - w / 2), Math.round(y - h / 2), w, h);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tthis.bends[i].redraw();\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tthis.bends[i].destroy();\n\t\t\t\tthis.bends[i] = null;\n\t\t\t}\n\t\t}\n\t}\n};\n\n/**\n * Function: checkLabelHandle\n * \n * Checks if the label handle intersects the given bounds and moves it if it\n * intersects.\n */\nmxEdgeHandler.prototype.checkLabelHandle = function(b)\n{\n\tif (this.labelShape != null)\n\t{\n\t\tvar b2 = this.labelShape.bounds;\n\t\t\n\t\tif (mxUtils.intersects(b, b2))\n\t\t{\n\t\t\tif (b.getCenterY() < b2.getCenterY())\n\t\t\t{\n\t\t\t\tb2.y = b.y + b.height;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tb2.y = b.y - b2.height;\n\t\t\t}\n\t\t}\n\t}\n};\n\n/**\n * Function: drawPreview\n * \n * Redraws the preview.\n */\nmxEdgeHandler.prototype.drawPreview = function()\n{\n\tif (this.isLabel)\n\t{\n\t\tvar b = this.labelShape.bounds;\n\t\tvar bounds = new mxRectangle(Math.round(this.label.x - b.width / 2),\n\t\t\t\tMath.round(this.label.y - b.height / 2), b.width, b.height);\n\t\tthis.labelShape.bounds = bounds;\n\t\tthis.labelShape.redraw();\n\t}\n\telse if (this.shape != null)\n\t{\n\t\tthis.shape.apply(this.state);\n\t\tthis.shape.points = this.abspoints;\n\t\tthis.shape.scale = this.state.view.scale;\n\t\tthis.shape.isDashed = this.isSelectionDashed();\n\t\tthis.shape.stroke = this.getSelectionColor();\n\t\tthis.shape.strokewidth = this.getSelectionStrokeWidth() / this.shape.scale / this.shape.scale;\n\t\tthis.shape.isShadow = false;\n\t\tthis.shape.redraw();\n\t}\n\t\n\tif (this.parentHighlight != null)\n\t{\n\t\tthis.parentHighlight.redraw();\n\t}\n};\n\n/**\n * Function: refresh\n * \n * Refreshes the bends of this handler.\n */\nmxEdgeHandler.prototype.refresh = function()\n{\n\tthis.abspoints = this.getSelectionPoints(this.state);\n\tthis.points = [];\n\n\tif (this.shape != null)\n\t{\n\t\tthis.shape.points = this.abspoints;\n\t}\n\t\n\tif (this.bends != null)\n\t{\n\t\tthis.destroyBends(this.bends);\n\t\tthis.bends = this.createBends();\n\t}\n\t\n\tif (this.virtualBends != null)\n\t{\n\t\tthis.destroyBends(this.virtualBends);\n\t\tthis.virtualBends = this.createVirtualBends();\n\t}\n\t\n\tif (this.customHandles != null)\n\t{\n\t\tthis.destroyBends(this.customHandles);\n\t\tthis.customHandles = this.createCustomHandles();\n\t}\n\t\n\t// Puts label node on top of bends\n\tif (this.labelShape != null && this.labelShape.node != null && this.labelShape.node.parentNode != null)\n\t{\n\t\tthis.labelShape.node.parentNode.appendChild(this.labelShape.node);\n\t}\n};\n\n/**\n * Function: destroyBends\n * \n * Destroys all elements in <bends>.\n */\nmxEdgeHandler.prototype.destroyBends = function(bends)\n{\n\tif (bends != null)\n\t{\n\t\tfor (var i = 0; i < bends.length; i++)\n\t\t{\n\t\t\tif (bends[i] != null)\n\t\t\t{\n\t\t\t\tbends[i].destroy();\n\t\t\t}\n\t\t}\n\t}\n};\n\n/**\n * Function: destroy\n * \n * Destroys the handler and all its resources and DOM nodes. This does\n * normally not need to be called as handlers are destroyed automatically\n * when the corresponding cell is deselected.\n */\nmxEdgeHandler.prototype.destroy = function()\n{\n\tif (this.escapeHandler != null)\n\t{\n\t\tthis.state.view.graph.removeListener(this.escapeHandler);\n\t\tthis.escapeHandler = null;\n\t}\n\t\n\tif (this.marker != null)\n\t{\n\t\tthis.marker.destroy();\n\t\tthis.marker = null;\n\t}\n\t\n\tif (this.shape != null)\n\t{\n\t\tthis.shape.destroy();\n\t\tthis.shape = null;\n\t}\n\t\n\tif (this.parentHighlight != null)\n\t{\n\t\tthis.parentHighlight.destroy();\n\t\tthis.parentHighlight = null;\n\t}\n\t\n\tif (this.labelShape != null)\n\t{\n\t\tthis.labelShape.destroy();\n\t\tthis.labelShape = null;\n\t}\n\n\tif (this.constraintHandler != null)\n\t{\n\t\tthis.constraintHandler.destroy();\n\t\tthis.constraintHandler = null;\n\t}\n\t\n\tthis.destroyBends(this.virtualBends);\n\tthis.virtualBends = null;\n\t\n\tthis.destroyBends(this.customHandles);\n\tthis.customHandles = null;\n\n\tthis.destroyBends(this.bends);\n\tthis.bends = null;\n\t\n\tthis.removeHint();\n};\n"
  },
  {
    "path": "static/cherry/drawio_demo/src/js/handler/mxEdgeSegmentHandler.js",
    "content": "/**\n * Copyright (c) 2006-2015, JGraph Ltd\n * Copyright (c) 2006-2015, Gaudenz Alder\n */\nfunction mxEdgeSegmentHandler(state)\n{\n\tmxEdgeHandler.call(this, state);\n};\n\n/**\n * Extends mxEdgeHandler.\n */\nmxUtils.extend(mxEdgeSegmentHandler, mxElbowEdgeHandler);\n\n/**\n * Function: getCurrentPoints\n * \n * Returns the current absolute points.\n */\nmxEdgeSegmentHandler.prototype.getCurrentPoints = function()\n{\n\tvar pts = this.state.absolutePoints;\n\t\n\tif (pts != null)\n\t{\n\t\t// Special case for straight edges where we add a virtual middle handle for moving the edge\n\t\tvar tol = Math.max(1, this.graph.view.scale);\n\t\t\n\t\tif (pts.length == 2 || (pts.length == 3 &&\n\t\t\t(Math.abs(pts[0].x - pts[1].x) < tol && Math.abs(pts[1].x - pts[2].x) < tol ||\n\t\t\tMath.abs(pts[0].y - pts[1].y) < tol && Math.abs(pts[1].y - pts[2].y) < tol)))\n\t\t{\n\t\t\tvar cx = pts[0].x + (pts[pts.length - 1].x - pts[0].x) / 2;\n\t\t\tvar cy = pts[0].y + (pts[pts.length - 1].y - pts[0].y) / 2;\n\t\t\t\n\t\t\tpts = [pts[0], new mxPoint(cx, cy), new mxPoint(cx, cy), pts[pts.length - 1]];\t\n\t\t}\n\t}\n\n\treturn pts;\n};\n\n/**\n * Function: getPreviewPoints\n * \n * Updates the given preview state taking into account the state of the constraint handler.\n */\nmxEdgeSegmentHandler.prototype.getPreviewPoints = function(point)\n{\n\tif (this.isSource || this.isTarget)\n\t{\n\t\treturn mxElbowEdgeHandler.prototype.getPreviewPoints.apply(this, arguments);\n\t}\n\telse\n\t{\n\t\tvar pts = this.getCurrentPoints();\n\t\tvar last = this.convertPoint(pts[0].clone(), false);\n\t\tpoint = this.convertPoint(point.clone(), false);\n\t\tvar result = [];\n\n\t\tfor (var i = 1; i < pts.length; i++)\n\t\t{\n\t\t\tvar pt = this.convertPoint(pts[i].clone(), false);\n\t\t\t\n\t\t\tif (i == this.index)\n\t\t\t{\n\t\t\t\tif (Math.round(last.x - pt.x) == 0)\n\t\t \t\t{\n\t\t\t\t\tlast.x = point.x;\n\t\t\t\t\tpt.x = point.x;\n\t\t \t\t}\n\t\t \t\t\n\t\t\t\tif (Math.round(last.y - pt.y) == 0)\n\t\t \t\t{\n\t\t \t\t\tlast.y = point.y;\n\t\t \t\t\tpt.y = point.y;\n\t\t \t\t}\n\t\t\t}\n\n\t\t\tif (i < pts.length - 1)\n\t\t\t{\n\t\t\t\tresult.push(pt);\n\t\t\t}\n\n\t\t\tlast = pt;\n\t\t}\n\t\t\n\t\t// Replaces single point that intersects with source or target\n\t\tif (result.length == 1)\n\t\t{\n\t\t\tvar source = this.state.getVisibleTerminalState(true);\n\t\t\tvar target = this.state.getVisibleTerminalState(false);\n\t\t\tvar scale = this.state.view.getScale();\n\t\t\tvar tr = this.state.view.getTranslate();\n\t\t\t\n\t\t\tvar x = result[0].x * scale + tr.x;\n\t\t\tvar y = result[0].y * scale + tr.y;\n\t\t\t\n\t\t\tif ((source != null && mxUtils.contains(source, x, y)) ||\n\t\t\t\t(target != null && mxUtils.contains(target, x, y)))\n\t\t\t{\n\t\t\t\tresult = [point, point];\n\t\t\t}\n\t\t}\n\n\t\treturn result;\n\t}\n};\n\n/**\n * Function: updatePreviewState\n * \n * Overridden to perform optimization of the edge style result.\n */\nmxEdgeSegmentHandler.prototype.updatePreviewState = function(edge, point, terminalState, me)\n{\n\tmxEdgeHandler.prototype.updatePreviewState.apply(this, arguments);\n\n\t// Checks and corrects preview by running edge style again\n\tif (!this.isSource && !this.isTarget)\n\t{\n\t\tpoint = this.convertPoint(point.clone(), false);\n\t\tvar pts = edge.absolutePoints;\n\t\tvar pt0 = pts[0];\n\t\tvar pt1 = pts[1];\n\n\t\tvar result = [];\n\t\t\n\t\tfor (var i = 2; i < pts.length; i++)\n\t\t{\n\t\t\tvar pt2 = pts[i];\n\t\t\n\t\t\t// Merges adjacent segments only if more than 2 to allow for straight edges\n\t\t\tif ((Math.round(pt0.x - pt1.x) != 0 || Math.round(pt1.x - pt2.x) != 0) &&\n\t\t\t\t(Math.round(pt0.y - pt1.y) != 0 || Math.round(pt1.y - pt2.y) != 0))\n\t\t\t{\n\t\t\t\tresult.push(this.convertPoint(pt1.clone(), false));\n\t\t\t}\n\n\t\t\tpt0 = pt1;\n\t\t\tpt1 = pt2;\n\t\t}\n\t\t\n\t\tvar source = this.state.getVisibleTerminalState(true);\n\t\tvar target = this.state.getVisibleTerminalState(false);\n\t\tvar rpts = this.state.absolutePoints;\n\t\t\n\t\t// A straight line is represented by 3 handles\n\t\tif (result.length == 0 && (Math.round(pts[0].x - pts[pts.length - 1].x) == 0 ||\n\t\t\tMath.round(pts[0].y - pts[pts.length - 1].y) == 0))\n\t\t{\n\t\t\tresult = [point, point];\n\t\t}\n\t\t// Handles special case of transitions from straight vertical to routed\n\t\telse if (pts.length == 5 && result.length == 2 && source != null && target != null &&\n\t\t\t\trpts != null && Math.round(rpts[0].x - rpts[rpts.length - 1].x) == 0)\n\t\t{\n\t\t\tvar view = this.graph.getView();\n\t\t\tvar scale = view.getScale();\n\t\t\tvar tr = view.getTranslate();\n\t\t\t\n\t\t\tvar y0 = view.getRoutingCenterY(source) / scale - tr.y;\n\t\t\t\n\t\t\t// Use fixed connection point y-coordinate if one exists\n\t\t\tvar sc = this.graph.getConnectionConstraint(edge, source, true);\n\t\t\t\n\t\t\tif (sc != null)\n\t\t\t{\n\t\t\t\tvar pt = this.graph.getConnectionPoint(source, sc);\n\t\t\t\t\n\t\t\t\tif (pt != null)\n\t\t\t\t{\n\t\t\t\t\tthis.convertPoint(pt, false);\n\t\t\t\t\ty0 = pt.y;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tvar ye = view.getRoutingCenterY(target) / scale - tr.y;\n\t\t\t\n\t\t\t// Use fixed connection point y-coordinate if one exists\n\t\t\tvar tc = this.graph.getConnectionConstraint(edge, target, false);\n\t\t\t\n\t\t\tif (tc)\n\t\t\t{\n\t\t\t\tvar pt = this.graph.getConnectionPoint(target, tc);\n\t\t\t\t\n\t\t\t\tif (pt != null)\n\t\t\t\t{\n\t\t\t\t\tthis.convertPoint(pt, false);\n\t\t\t\t\tye = pt.y;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tresult = [new mxPoint(point.x, y0), new mxPoint(point.x, ye)];\n\t\t}\n\n\t\tthis.points = result;\n\n\t\t// LATER: Check if points and result are different\n\t\tedge.view.updateFixedTerminalPoints(edge, source, target);\n\t\tedge.view.updatePoints(edge, this.points, source, target);\n\t\tedge.view.updateFloatingTerminalPoints(edge, source, target);\n\t}\n};\n\n/**\n * Overriden to merge edge segments.\n */\nmxEdgeSegmentHandler.prototype.connect = function(edge, terminal, isSource, isClone, me)\n{\n\tvar model = this.graph.getModel();\n\tvar geo = model.getGeometry(edge);\n\tvar result = null;\n\t\n\t// Merges adjacent edge segments\n\tif (geo != null && geo.points != null && geo.points.length > 0)\n\t{\n\t\tvar pts = this.abspoints;\n\t\tvar pt0 = pts[0];\n\t\tvar pt1 = pts[1];\n\t\tresult = [];\n\t\t\n\t\tfor (var i = 2; i < pts.length; i++)\n\t\t{\n\t\t\tvar pt2 = pts[i];\n\t\t\n\t\t\t// Merges adjacent segments only if more than 2 to allow for straight edges\n\t\t\tif ((Math.round(pt0.x - pt1.x) != 0 || Math.round(pt1.x - pt2.x) != 0) &&\n\t\t\t\t(Math.round(pt0.y - pt1.y) != 0 || Math.round(pt1.y - pt2.y) != 0))\n\t\t\t{\n\t\t\t\tresult.push(this.convertPoint(pt1.clone(), false));\n\t\t\t}\n\t\n\t\t\tpt0 = pt1;\n\t\t\tpt1 = pt2;\n\t\t}\n\t}\n\t\n\tmodel.beginUpdate();\n\ttry\n\t{\n\t\tif (result != null)\n\t\t{\n\t\t\tvar geo = model.getGeometry(edge);\n\t\t\t\n\t\t\tif (geo != null)\n\t\t\t{\n\t\t\t\tgeo = geo.clone();\n\t\t\t\tgeo.points = result;\n\t\t\t\t\n\t\t\t\tmodel.setGeometry(edge, geo);\n\t\t\t}\n\t\t}\n\t\t\n\t\tedge = mxEdgeHandler.prototype.connect.apply(this, arguments);\n\t}\n\tfinally\n\t{\n\t\tmodel.endUpdate();\n\t}\n\t\n\treturn edge;\n};\n\n/**\n * Function: getTooltipForNode\n * \n * Returns no tooltips.\n */\nmxEdgeSegmentHandler.prototype.getTooltipForNode = function(node)\n{\n\treturn null;\n};\n\n/**\n * Function: createBends\n * \n * Adds custom bends for the center of each segment.\n */\nmxEdgeSegmentHandler.prototype.start = function(x, y, index)\n{\n\tmxEdgeHandler.prototype.start.apply(this, arguments);\n\t\n\tif (this.bends != null && this.bends[index] != null &&\n\t\t!this.isSource && !this.isTarget)\n\t{\n\t\tmxUtils.setOpacity(this.bends[index].node, 100);\n\t}\n};\n\n/**\n * Function: createBends\n * \n * Adds custom bends for the center of each segment.\n */\nmxEdgeSegmentHandler.prototype.createBends = function()\n{\n\tvar bends = [];\n\t\n\t// Source\n\tvar bend = this.createHandleShape(0);\n\tthis.initBend(bend);\n\tbend.setCursor(mxConstants.CURSOR_TERMINAL_HANDLE);\n\tbends.push(bend);\n\n\tvar pts = this.getCurrentPoints();\n\n\t// Waypoints (segment handles)\n\tif (this.graph.isCellBendable(this.state.cell))\n\t{\n\t\tif (this.points == null)\n\t\t{\n\t\t\tthis.points = [];\n\t\t}\n\n\t\tfor (var i = 0; i < pts.length - 1; i++)\n\t\t{\n\t\t\tbend = this.createVirtualBend();\n\t\t\tbends.push(bend);\n\t\t\tvar horizontal = Math.round(pts[i].x - pts[i + 1].x) == 0;\n\t\t\t\n\t\t\t// Special case where dy is 0 as well\n\t\t\tif (Math.round(pts[i].y - pts[i + 1].y) == 0 && i < pts.length - 2)\n\t\t\t{\n\t\t\t\thorizontal = Math.round(pts[i].x - pts[i + 2].x) == 0;\n\t\t\t}\n\t\t\t\n\t\t\tbend.setCursor((horizontal) ? 'col-resize' : 'row-resize');\n\t\t\tthis.points.push(new mxPoint(0,0));\n\t\t}\n\t}\n\n\t// Target\n\tvar bend = this.createHandleShape(pts.length);\n\tthis.initBend(bend);\n\tbend.setCursor(mxConstants.CURSOR_TERMINAL_HANDLE);\n\tbends.push(bend);\n\n\treturn bends;\n};\n\n/**\n * Function: redraw\n * \n * Overridden to invoke <refresh> before the redraw.\n */\nmxEdgeSegmentHandler.prototype.redraw = function()\n{\n\tthis.refresh();\n\tmxEdgeHandler.prototype.redraw.apply(this, arguments);\n};\n\n/**\n * Function: redrawInnerBends\n * \n * Updates the position of the custom bends.\n */\nmxEdgeSegmentHandler.prototype.redrawInnerBends = function(p0, pe)\n{\n\tif (this.graph.isCellBendable(this.state.cell))\n\t{\n\t\tvar pts = this.getCurrentPoints();\n\t\t\n\t\tif (pts != null && pts.length > 1)\n\t\t{\n\t\t\tvar straight = false;\n\t\t\t\n\t\t\t// Puts handle in the center of straight edges\n\t\t\tif (pts.length == 4 && Math.round(pts[1].x - pts[2].x) == 0 && Math.round(pts[1].y - pts[2].y) == 0)\n\t\t\t{\n\t\t\t\tstraight = true;\n\t\t\t\t\n\t\t\t\tif (Math.round(pts[0].y - pts[pts.length - 1].y) == 0)\n\t\t\t\t{\n\t\t\t\t\tvar cx = pts[0].x + (pts[pts.length - 1].x - pts[0].x) / 2;\n\t\t\t\t\tpts[1] = new mxPoint(cx, pts[1].y);\n\t\t\t\t\tpts[2] = new mxPoint(cx, pts[2].y);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tvar cy = pts[0].y + (pts[pts.length - 1].y - pts[0].y) / 2;\n\t\t\t\t\tpts[1] = new mxPoint(pts[1].x, cy);\n\t\t\t\t\tpts[2] = new mxPoint(pts[2].x, cy);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tfor (var i = 0; i < pts.length - 1; i++)\n\t\t\t{\n\t\t\t\tif (this.bends[i + 1] != null)\n\t\t\t\t{\n\t\t \t\t\tvar p0 = pts[i];\n\t \t\t\t\tvar pe = pts[i + 1];\n\t\t\t \t\tvar pt = new mxPoint(p0.x + (pe.x - p0.x) / 2, p0.y + (pe.y - p0.y) / 2);\n\t\t\t \t\tvar b = this.bends[i + 1].bounds;\n\t\t\t \t\tthis.bends[i + 1].bounds = new mxRectangle(Math.floor(pt.x - b.width / 2),\n\t\t\t \t\t\t\tMath.floor(pt.y - b.height / 2), b.width, b.height);\n\t\t\t\t \tthis.bends[i + 1].redraw();\n\t\t\t\t \t\n\t\t\t\t \tif (this.manageLabelHandle)\n\t\t\t\t\t{\n\t\t\t\t\t\tthis.checkLabelHandle(this.bends[i + 1].bounds);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif (straight)\n\t\t\t{\n\t\t\t\tmxUtils.setOpacity(this.bends[1].node, this.virtualBendOpacity);\n\t\t\t\tmxUtils.setOpacity(this.bends[3].node, this.virtualBendOpacity);\n\t\t\t}\n\t\t}\n\t}\n};\n"
  },
  {
    "path": "static/cherry/drawio_demo/src/js/handler/mxElbowEdgeHandler.js",
    "content": "/**\n * Copyright (c) 2006-2015, JGraph Ltd\n * Copyright (c) 2006-2015, Gaudenz Alder\n */\n/**\n * Class: mxElbowEdgeHandler\n *\n * Graph event handler that reconnects edges and modifies control points and\n * the edge label location. Uses <mxTerminalMarker> for finding and\n * highlighting new source and target vertices. This handler is automatically\n * created in <mxGraph.createHandler>. It extends <mxEdgeHandler>.\n * \n * Constructor: mxEdgeHandler\n *\n * Constructs an edge handler for the specified <mxCellState>.\n * \n * Parameters:\n * \n * state - <mxCellState> of the cell to be modified.\n */\nfunction mxElbowEdgeHandler(state)\n{\n\tmxEdgeHandler.call(this, state);\n};\n\n/**\n * Extends mxEdgeHandler.\n */\nmxUtils.extend(mxElbowEdgeHandler, mxEdgeHandler);\n\n/**\n * Specifies if a double click on the middle handle should call\n * <mxGraph.flipEdge>. Default is true.\n */\nmxElbowEdgeHandler.prototype.flipEnabled = true;\n\n/**\n * Variable: doubleClickOrientationResource\n * \n * Specifies the resource key for the tooltip to be displayed on the single\n * control point for routed edges. If the resource for this key does not\n * exist then the value is used as the error message. Default is\n * 'doubleClickOrientation'.\n */\nmxElbowEdgeHandler.prototype.doubleClickOrientationResource =\n\t(mxClient.language != 'none') ? 'doubleClickOrientation' : '';\n\n/**\n * Function: createBends\n * \n * Overrides <mxEdgeHandler.createBends> to create custom bends.\n */\n mxElbowEdgeHandler.prototype.createBends = function()\n {\n\tvar bends = [];\n\t\n\t// Source\n\tvar bend = this.createHandleShape(0);\n\tthis.initBend(bend);\n\tbend.setCursor(mxConstants.CURSOR_TERMINAL_HANDLE);\n\tbends.push(bend);\n\n\t// Virtual\n\tbends.push(this.createVirtualBend(mxUtils.bind(this, function(evt)\n\t{\n\t\tif (!mxEvent.isConsumed(evt) && this.flipEnabled)\n\t\t{\n\t\t\tthis.graph.flipEdge(this.state.cell, evt);\n\t\t\tmxEvent.consume(evt);\n\t\t}\n\t})));\n\tthis.points.push(new mxPoint(0,0));\n\n\t// Target\n\tbend = this.createHandleShape(2);\n\tthis.initBend(bend);\n\tbend.setCursor(mxConstants.CURSOR_TERMINAL_HANDLE);\n\tbends.push(bend);\n\t\n\treturn bends;\n };\n\n/**\n * Function: createVirtualBend\n * \n * Creates a virtual bend that supports double clicking and calls\n * <mxGraph.flipEdge>.\n */\nmxElbowEdgeHandler.prototype.createVirtualBend = function(dblClickHandler)\n{\n\tvar bend = this.createHandleShape();\n\tthis.initBend(bend, dblClickHandler);\n\n\tbend.setCursor(this.getCursorForBend());\n\n\tif (!this.graph.isCellBendable(this.state.cell))\n\t{\n\t\tbend.node.style.display = 'none';\n\t}\n\n\treturn bend;\n};\n\n/**\n * Function: getCursorForBend\n * \n * Returns the cursor to be used for the bend.\n */\nmxElbowEdgeHandler.prototype.getCursorForBend = function()\n{\n\treturn (this.state.style[mxConstants.STYLE_EDGE] == mxEdgeStyle.TopToBottom ||\n\t\tthis.state.style[mxConstants.STYLE_EDGE] == mxConstants.EDGESTYLE_TOPTOBOTTOM ||\n\t\t((this.state.style[mxConstants.STYLE_EDGE] == mxEdgeStyle.ElbowConnector ||\n\t\tthis.state.style[mxConstants.STYLE_EDGE] == mxConstants.EDGESTYLE_ELBOW)&&\n\t\tthis.state.style[mxConstants.STYLE_ELBOW] == mxConstants.ELBOW_VERTICAL)) ? \n\t\t'row-resize' : 'col-resize';\n};\n\n/**\n * Function: getTooltipForNode\n * \n * Returns the tooltip for the given node.\n */\nmxElbowEdgeHandler.prototype.getTooltipForNode = function(node)\n{\n\tvar tip = null;\n\t\n\tif (this.bends != null && this.bends[1] != null && (node == this.bends[1].node ||\n\t\tnode.parentNode == this.bends[1].node))\n\t{\n\t\ttip = this.doubleClickOrientationResource;\n\t\ttip = mxResources.get(tip) || tip; // translate\n\t}\n\n\treturn tip;\n};\n\n/**\n * Function: convertPoint\n * \n * Converts the given point in-place from screen to unscaled, untranslated\n * graph coordinates and applies the grid.\n * \n * Parameters:\n * \n * point - <mxPoint> to be converted.\n * gridEnabled - Boolean that specifies if the grid should be applied.\n */\nmxElbowEdgeHandler.prototype.convertPoint = function(point, gridEnabled)\n{\n\tvar scale = this.graph.getView().getScale();\n\tvar tr = this.graph.getView().getTranslate();\n\tvar origin = this.state.origin;\n\t\n\tif (gridEnabled)\n\t{\n\t\tpoint.x = this.graph.snap(point.x);\n\t\tpoint.y = this.graph.snap(point.y);\n\t}\n\t\n\tpoint.x = Math.round(point.x / scale - tr.x - origin.x);\n\tpoint.y = Math.round(point.y / scale - tr.y - origin.y);\n\t\n\treturn point;\n};\n\n/**\n * Function: redrawInnerBends\n * \n * Updates and redraws the inner bends.\n * \n * Parameters:\n * \n * p0 - <mxPoint> that represents the location of the first point.\n * pe - <mxPoint> that represents the location of the last point.\n */\nmxElbowEdgeHandler.prototype.redrawInnerBends = function(p0, pe)\n{\n\tvar g = this.graph.getModel().getGeometry(this.state.cell);\n\tvar pts = this.state.absolutePoints;\n\tvar pt = null;\n\n\t// Keeps the virtual bend on the edge shape\n\tif (pts.length > 1)\n\t{\n\t\tp0 = pts[1];\n\t\tpe = pts[pts.length - 2];\n\t}\n\telse if (g.points != null && g.points.length > 0)\n\t{\n\t\tpt = pts[0];\n\t}\n\t\n\tif (pt == null)\n\t{\n\t\tpt = new mxPoint(p0.x + (pe.x - p0.x) / 2, p0.y + (pe.y - p0.y) / 2);\n\t}\n\telse\n\t{\n\t\tpt = new mxPoint(this.graph.getView().scale * (pt.x + this.graph.getView().translate.x + this.state.origin.x),\n\t\t\t\tthis.graph.getView().scale * (pt.y + this.graph.getView().translate.y + this.state.origin.y));\n\t}\n\n\t// Makes handle slightly bigger if the yellow  label handle\n\t// exists and intersects this green handle\n\tvar b = this.bends[1].bounds;\n\tvar w = b.width;\n\tvar h = b.height;\n\tvar bounds = new mxRectangle(Math.round(pt.x - w / 2), Math.round(pt.y - h / 2), w, h);\n\n\tif (this.manageLabelHandle)\n\t{\n\t\tthis.checkLabelHandle(bounds);\n\t}\n\telse if (this.handleImage == null && this.labelShape.visible && mxUtils.intersects(bounds, this.labelShape.bounds))\n\t{\n\t\tw = mxConstants.HANDLE_SIZE + 3;\n\t\th = mxConstants.HANDLE_SIZE + 3;\n\t\tbounds = new mxRectangle(Math.floor(pt.x - w / 2), Math.floor(pt.y - h / 2), w, h);\n\t}\n\n\tthis.bends[1].bounds = bounds;\n\tthis.bends[1].redraw();\n\t\n\tif (this.manageLabelHandle)\n\t{\n\t\tthis.checkLabelHandle(this.bends[1].bounds);\n\t}\n};\n"
  },
  {
    "path": "static/cherry/drawio_demo/src/js/handler/mxGraphHandler.js",
    "content": "/**\n * Copyright (c) 2006-2015, JGraph Ltd\n * Copyright (c) 2006-2015, Gaudenz Alder\n */\n/**\n * Class: mxGraphHandler\n * \n * Graph event handler that handles selection. Individual cells are handled\n * separately using <mxVertexHandler> or one of the edge handlers. These\n * handlers are created using <mxGraph.createHandler> in\n * <mxGraphSelectionModel.cellAdded>.\n * \n * To avoid the container to scroll a moved cell into view, set\n * <scrollAfterMove> to false.\n * \n * Constructor: mxGraphHandler\n * \n * Constructs an event handler that creates handles for the\n * selection cells.\n * \n * Parameters:\n * \n * graph - Reference to the enclosing <mxGraph>.\n */\nfunction mxGraphHandler(graph)\n{\n\tthis.graph = graph;\n\tthis.graph.addMouseListener(this);\n\t\n\t// Repaints the handler after autoscroll\n\tthis.panHandler = mxUtils.bind(this, function()\n\t{\n\t\tthis.updatePreviewShape();\n\t\tthis.updateHint();\n\t});\n\t\n\tthis.graph.addListener(mxEvent.PAN, this.panHandler);\n\t\n\t// Handles escape keystrokes\n\tthis.escapeHandler = mxUtils.bind(this, function(sender, evt)\n\t{\n\t\tthis.reset();\n\t});\n\t\n\tthis.graph.addListener(mxEvent.ESCAPE, this.escapeHandler);\n\t\n\t// Updates the preview box for remote changes\n\tthis.refreshHandler = mxUtils.bind(this, function(sender, evt)\n\t{\n\t\tif (this.first != null)\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\tthis.bounds = this.graph.getView().getBounds(this.cells);\n\t\t\t\tthis.pBounds = this.getPreviewBounds(this.cells);\n\t\t\t\tthis.updatePreviewShape();\n\t\t\t}\n\t\t\tcatch (e)\n\t\t\t{\n\t\t\t\t// Resets the handler if cells have vanished\n\t\t\t\tthis.reset();\n\t\t\t}\n\t\t}\n\t});\n\t\n\tthis.graph.getModel().addListener(mxEvent.CHANGE, this.refreshHandler);\n};\n\n/**\n * Variable: graph\n * \n * Reference to the enclosing <mxGraph>.\n */\nmxGraphHandler.prototype.graph = null;\n\n/**\n * Variable: maxCells\n * \n * Defines the maximum number of cells to paint subhandles\n * for. Default is 50 for Firefox and 20 for IE. Set this\n * to 0 if you want an unlimited number of handles to be\n * displayed. This is only recommended if the number of\n * cells in the graph is limited to a small number, eg.\n * 500.\n */\nmxGraphHandler.prototype.maxCells = (mxClient.IS_IE) ? 20 : 50;\n\n/**\n * Variable: enabled\n * \n * Specifies if events are handled. Default is true.\n */\nmxGraphHandler.prototype.enabled = true;\n\n/**\n * Variable: highlightEnabled\n * \n * Specifies if drop targets under the mouse should be enabled. Default is\n * true.\n */\nmxGraphHandler.prototype.highlightEnabled = true;\n\n/**\n * Variable: cloneEnabled\n * \n * Specifies if cloning by control-drag is enabled. Default is true.\n */\nmxGraphHandler.prototype.cloneEnabled = true;\n\n/**\n * Variable: moveEnabled\n * \n * Specifies if moving is enabled. Default is true.\n */\nmxGraphHandler.prototype.moveEnabled = true;\n\n/**\n * Variable: guidesEnabled\n * \n * Specifies if other cells should be used for snapping the right, center or\n * left side of the current selection. Default is false.\n */\nmxGraphHandler.prototype.guidesEnabled = false;\n\n/**\n * Variable: guide\n * \n * Holds the <mxGuide> instance that is used for alignment.\n */\nmxGraphHandler.prototype.guide = null;\n\n/**\n * Variable: currentDx\n * \n * Stores the x-coordinate of the current mouse move.\n */\nmxGraphHandler.prototype.currentDx = null;\n\n/**\n * Variable: currentDy\n * \n * Stores the y-coordinate of the current mouse move.\n */\nmxGraphHandler.prototype.currentDy = null;\n\n/**\n * Variable: updateCursor\n * \n * Specifies if a move cursor should be shown if the mouse is over a movable\n * cell. Default is true.\n */\nmxGraphHandler.prototype.updateCursor = true;\n\n/**\n * Variable: selectEnabled\n * \n * Specifies if selecting is enabled. Default is true.\n */\nmxGraphHandler.prototype.selectEnabled = true;\n\n/**\n * Variable: removeCellsFromParent\n * \n * Specifies if cells may be moved out of their parents. Default is true.\n */\nmxGraphHandler.prototype.removeCellsFromParent = true;\n\n/**\n * Variable: connectOnDrop\n * \n * Specifies if drop events are interpreted as new connections if no other\n * drop action is defined. Default is false.\n */\nmxGraphHandler.prototype.connectOnDrop = false;\n\n/**\n * Variable: scrollOnMove\n * \n * Specifies if the view should be scrolled so that a moved cell is\n * visible. Default is true.\n */\nmxGraphHandler.prototype.scrollOnMove = true;\n\n/**\n * Variable: minimumSize\n * \n * Specifies the minimum number of pixels for the width and height of a\n * selection border. Default is 6.\n */\nmxGraphHandler.prototype.minimumSize = 6;\n\n/**\n * Variable: previewColor\n * \n * Specifies the color of the preview shape. Default is black.\n */\nmxGraphHandler.prototype.previewColor = 'black';\n\n/**\n * Variable: htmlPreview\n * \n * Specifies if the graph container should be used for preview. If this is used\n * then drop target detection relies entirely on <mxGraph.getCellAt> because\n * the HTML preview does not \"let events through\". Default is false.\n */\nmxGraphHandler.prototype.htmlPreview = false;\n\n/**\n * Variable: shape\n * \n * Reference to the <mxShape> that represents the preview.\n */\nmxGraphHandler.prototype.shape = null;\n\n/**\n * Variable: scaleGrid\n * \n * Specifies if the grid should be scaled. Default is false.\n */\nmxGraphHandler.prototype.scaleGrid = false;\n\n/**\n * Variable: rotationEnabled\n * \n * Specifies if the bounding box should allow for rotation. Default is true.\n */\nmxGraphHandler.prototype.rotationEnabled = true;\n\n/**\n * Function: isEnabled\n * \n * Returns <enabled>.\n */\nmxGraphHandler.prototype.isEnabled = function()\n{\n\treturn this.enabled;\n};\n\n/**\n * Function: setEnabled\n * \n * Sets <enabled>.\n */\nmxGraphHandler.prototype.setEnabled = function(value)\n{\n\tthis.enabled = value;\n};\n\n/**\n * Function: isCloneEnabled\n * \n * Returns <cloneEnabled>.\n */\nmxGraphHandler.prototype.isCloneEnabled = function()\n{\n\treturn this.cloneEnabled;\n};\n\n/**\n * Function: setCloneEnabled\n * \n * Sets <cloneEnabled>.\n * \n * Parameters:\n * \n * value - Boolean that specifies the new clone enabled state.\n */\nmxGraphHandler.prototype.setCloneEnabled = function(value)\n{\n\tthis.cloneEnabled = value;\n};\n\n/**\n * Function: isMoveEnabled\n * \n * Returns <moveEnabled>.\n */\nmxGraphHandler.prototype.isMoveEnabled = function()\n{\n\treturn this.moveEnabled;\n};\n\n/**\n * Function: setMoveEnabled\n * \n * Sets <moveEnabled>.\n */\nmxGraphHandler.prototype.setMoveEnabled = function(value)\n{\n\tthis.moveEnabled = value;\n};\n\n/**\n * Function: isSelectEnabled\n * \n * Returns <selectEnabled>.\n */\nmxGraphHandler.prototype.isSelectEnabled = function()\n{\n\treturn this.selectEnabled;\n};\n\n/**\n * Function: setSelectEnabled\n * \n * Sets <selectEnabled>.\n */\nmxGraphHandler.prototype.setSelectEnabled = function(value)\n{\n\tthis.selectEnabled = value;\n};\n\n/**\n * Function: isRemoveCellsFromParent\n * \n * Returns <removeCellsFromParent>.\n */\nmxGraphHandler.prototype.isRemoveCellsFromParent = function()\n{\n\treturn this.removeCellsFromParent;\n};\n\n/**\n * Function: setRemoveCellsFromParent\n * \n * Sets <removeCellsFromParent>.\n */\nmxGraphHandler.prototype.setRemoveCellsFromParent = function(value)\n{\n\tthis.removeCellsFromParent = value;\n};\n\n/**\n * Function: getInitialCellForEvent\n * \n * Hook to return initial cell for the given event.\n */\nmxGraphHandler.prototype.getInitialCellForEvent = function(me)\n{\n\treturn me.getCell();\n};\n\n/**\n * Function: isDelayedSelection\n * \n * Hook to return true for delayed selections.\n */\nmxGraphHandler.prototype.isDelayedSelection = function(cell, me)\n{\n\treturn this.graph.isCellSelected(cell);\n};\n\n/**\n * Function: consumeMouseEvent\n * \n * Consumes the given mouse event. NOTE: This may be used to enable click\n * events for links in labels on iOS as follows as consuming the initial\n * touchStart disables firing the subsequent click evnent on the link.\n * \n * <code>\n * mxGraphHandler.prototype.consumeMouseEvent = function(evtName, me)\n * {\n *   var source = mxEvent.getSource(me.getEvent());\n *   \n *   if (!mxEvent.isTouchEvent(me.getEvent()) || source.nodeName != 'A')\n *   {\n *     me.consume();\n *   }\n * }\n * </code>\n */\nmxGraphHandler.prototype.consumeMouseEvent = function(evtName, me)\n{\n\tme.consume();\n};\n\n/**\n * Function: mouseDown\n * \n * Handles the event by selecing the given cell and creating a handle for\n * it. By consuming the event all subsequent events of the gesture are\n * redirected to this handler.\n */\nmxGraphHandler.prototype.mouseDown = function(sender, me)\n{\n\tif (!me.isConsumed() && this.isEnabled() && this.graph.isEnabled() &&\n\t\tme.getState() != null && !mxEvent.isMultiTouchEvent(me.getEvent()))\n\t{\n\t\tvar cell = this.getInitialCellForEvent(me);\n\t\tthis.delayedSelection = this.isDelayedSelection(cell, me);\n\t\tthis.cell = null;\n\t\t\n\t\tif (this.isSelectEnabled() && !this.delayedSelection)\n\t\t{\n\t\t\tthis.graph.selectCellForEvent(cell, me.getEvent());\n\t\t}\n\n\t\tif (this.isMoveEnabled())\n\t\t{\n\t\t\tvar model = this.graph.model;\n\t\t\tvar geo = model.getGeometry(cell);\n\n\t\t\tif (this.graph.isCellMovable(cell) && ((!model.isEdge(cell) || this.graph.getSelectionCount() > 1 ||\n\t\t\t\t(geo.points != null && geo.points.length > 0) || model.getTerminal(cell, true) == null ||\n\t\t\t\tmodel.getTerminal(cell, false) == null) || this.graph.allowDanglingEdges || \n\t\t\t\t(this.graph.isCloneEvent(me.getEvent()) && this.graph.isCellsCloneable())))\n\t\t\t{\n\t\t\t\tthis.start(cell, me.getX(), me.getY());\n\t\t\t}\n\t\t\telse if (this.delayedSelection)\n\t\t\t{\n\t\t\t\tthis.cell = cell;\n\t\t\t}\n\n\t\t\tthis.cellWasClicked = true;\n\t\t\tthis.consumeMouseEvent(mxEvent.MOUSE_DOWN, me);\n\t\t}\n\t}\n};\n\n/**\n * Function: getGuideStates\n * \n * Creates an array of cell states which should be used as guides.\n */\nmxGraphHandler.prototype.getGuideStates = function()\n{\n\tvar parent = this.graph.getDefaultParent();\n\tvar model = this.graph.getModel();\n\t\n\tvar filter = mxUtils.bind(this, function(cell)\n\t{\n\t\treturn this.graph.view.getState(cell) != null &&\n\t\t\tmodel.isVertex(cell) &&\n\t\t\tmodel.getGeometry(cell) != null &&\n\t\t\t!model.getGeometry(cell).relative;\n\t});\n\t\n\treturn this.graph.view.getCellStates(model.filterDescendants(filter, parent));\n};\n\n/**\n * Function: getCells\n * \n * Returns the cells to be modified by this handler. This implementation\n * returns all selection cells that are movable, or the given initial cell if\n * the given cell is not selected and movable. This handles the case of moving\n * unselectable or unselected cells.\n * \n * Parameters:\n * \n * initialCell - <mxCell> that triggered this handler.\n */\nmxGraphHandler.prototype.getCells = function(initialCell)\n{\n\tif (!this.delayedSelection && this.graph.isCellMovable(initialCell))\n\t{\n\t\treturn [initialCell];\n\t}\n\telse\n\t{\n\t\treturn this.graph.getMovableCells(this.graph.getSelectionCells());\n\t}\n};\n\n/**\n * Function: getPreviewBounds\n * \n * Returns the <mxRectangle> used as the preview bounds for\n * moving the given cells.\n */\nmxGraphHandler.prototype.getPreviewBounds = function(cells)\n{\n\tvar bounds = this.getBoundingBox(cells);\n\t\n\tif (bounds != null)\n\t{\n\t\t// Corrects width and height\n\t\tbounds.width = Math.max(0, bounds.width - 1);\n\t\tbounds.height = Math.max(0, bounds.height - 1);\n\t\t\n\t\tif (bounds.width < this.minimumSize)\n\t\t{\n\t\t\tvar dx = this.minimumSize - bounds.width;\n\t\t\tbounds.x -= dx / 2;\n\t\t\tbounds.width = this.minimumSize;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tbounds.x = Math.round(bounds.x);\n\t\t\tbounds.width = Math.ceil(bounds.width);\n\t\t}\n\t\t\n\t\tvar tr = this.graph.view.translate;\n\t\tvar s = this.graph.view.scale;\n\t\t\n\t\tif (bounds.height < this.minimumSize)\n\t\t{\n\t\t\tvar dy = this.minimumSize - bounds.height;\n\t\t\tbounds.y -= dy / 2;\n\t\t\tbounds.height = this.minimumSize;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tbounds.y = Math.round(bounds.y);\n\t\t\tbounds.height = Math.ceil(bounds.height);\n\t\t}\n\t}\n\t\n\treturn bounds;\n};\n\n/**\n * Function: getBoundingBox\n * \n * Returns the union of the <mxCellStates> for the given array of <mxCells>.\n * For vertices, this method uses the bounding box of the corresponding shape\n * if one exists. The bounding box of the corresponding text label and all\n * controls and overlays are ignored. See also: <mxGraphView.getBounds> and\n * <mxGraph.getBoundingBox>.\n *\n * Parameters:\n *\n * cells - Array of <mxCells> whose bounding box should be returned.\n */\nmxGraphHandler.prototype.getBoundingBox = function(cells)\n{\n\tvar result = null;\n\t\n\tif (cells != null && cells.length > 0)\n\t{\n\t\tvar model = this.graph.getModel();\n\t\t\n\t\tfor (var i = 0; i < cells.length; i++)\n\t\t{\n\t\t\tif (model.isVertex(cells[i]) || model.isEdge(cells[i]))\n\t\t\t{\n\t\t\t\tvar state = this.graph.view.getState(cells[i]);\n\t\t\t\n\t\t\t\tif (state != null)\n\t\t\t\t{\n\t\t\t\t\tvar bbox = state;\n\t\t\t\t\t\n\t\t\t\t\tif (model.isVertex(cells[i]) && state.shape != null && state.shape.boundingBox != null)\n\t\t\t\t\t{\n\t\t\t\t\t\tbbox = state.shape.boundingBox;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif (result == null)\n\t\t\t\t\t{\n\t\t\t\t\t\tresult = mxRectangle.fromRectangle(bbox);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tresult.add(bbox);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t\n\treturn result;\n};\n\n/**\n * Function: createPreviewShape\n * \n * Creates the shape used to draw the preview for the given bounds.\n */\nmxGraphHandler.prototype.createPreviewShape = function(bounds)\n{\n\tvar shape = new mxRectangleShape(bounds, null, this.previewColor);\n\tshape.isDashed = true;\n\t\n\tif (this.htmlPreview)\n\t{\n\t\tshape.dialect = mxConstants.DIALECT_STRICTHTML;\n\t\tshape.init(this.graph.container);\n\t}\n\telse\n\t{\n\t\t// Makes sure to use either VML or SVG shapes in order to implement\n\t\t// event-transparency on the background area of the rectangle since\n\t\t// HTML shapes do not let mouseevents through even when transparent\n\t\tshape.dialect = (this.graph.dialect != mxConstants.DIALECT_SVG) ?\n\t\t\tmxConstants.DIALECT_VML : mxConstants.DIALECT_SVG;\n\t\tshape.init(this.graph.getView().getOverlayPane());\n\t\tshape.pointerEvents = false;\n\t\t\n\t\t// Workaround for artifacts on iOS\n\t\tif (mxClient.IS_IOS)\n\t\t{\n\t\t\tshape.getSvgScreenOffset = function()\n\t\t\t{\n\t\t\t\treturn 0;\n\t\t\t};\n\t\t}\n\t}\n\t\n\treturn shape;\n};\n\n/**\n * Function: start\n * \n * Starts the handling of the mouse gesture.\n */\nmxGraphHandler.prototype.start = function(cell, x, y)\n{\n\tthis.cell = cell;\n\tthis.first = mxUtils.convertPoint(this.graph.container, x, y);\n\tthis.cells = this.getCells(this.cell);\n\tthis.bounds = this.graph.getView().getBounds(this.cells);\n\tthis.pBounds = this.getPreviewBounds(this.cells);\n\n\tif (this.guidesEnabled)\n\t{\n\t\tthis.guide = new mxGuide(this.graph, this.getGuideStates());\n\t}\n};\n\n/**\n * Function: useGuidesForEvent\n * \n * Returns true if the guides should be used for the given <mxMouseEvent>.\n * This implementation returns <mxGuide.isEnabledForEvent>.\n */\nmxGraphHandler.prototype.useGuidesForEvent = function(me)\n{\n\treturn (this.guide != null) ? this.guide.isEnabledForEvent(me.getEvent()) : true;\n};\n\n\n/**\n * Function: snap\n * \n * Snaps the given vector to the grid and returns the given mxPoint instance.\n */\nmxGraphHandler.prototype.snap = function(vector)\n{\n\tvar scale = (this.scaleGrid) ? this.graph.view.scale : 1;\n\t\n\tvector.x = this.graph.snap(vector.x / scale) * scale;\n\tvector.y = this.graph.snap(vector.y / scale) * scale;\n\t\n\treturn vector;\n};\n\n/**\n * Function: getDelta\n * \n * Returns an <mxPoint> that represents the vector for moving the cells\n * for the given <mxMouseEvent>.\n */\nmxGraphHandler.prototype.getDelta = function(me)\n{\n\tvar point = mxUtils.convertPoint(this.graph.container, me.getX(), me.getY());\n\tvar s = this.graph.view.scale;\n\t\n\treturn new mxPoint(this.roundLength((point.x - this.first.x) / s) * s,\n\t\tthis.roundLength((point.y - this.first.y) / s) * s);\n};\n\n/**\n * Function: updateHint\n * \n * Hook for subclassers do show details while the handler is active.\n */\nmxGraphHandler.prototype.updateHint = function(me) { };\n\n/**\n * Function: removeHint\n * \n * Hooks for subclassers to hide details when the handler gets inactive.\n */\nmxGraphHandler.prototype.removeHint = function() { };\n\n/**\n * Function: roundLength\n * \n * Hook for rounding the unscaled vector. This uses Math.round.\n */\nmxGraphHandler.prototype.roundLength = function(length)\n{\n\treturn Math.round(length * 2) / 2;\n};\n\n/**\n * Function: mouseMove\n * \n * Handles the event by highlighting possible drop targets and updating the\n * preview.\n */\nmxGraphHandler.prototype.mouseMove = function(sender, me)\n{\n\tvar graph = this.graph;\n\n\tif (!me.isConsumed() && graph.isMouseDown && this.cell != null &&\n\t\tthis.first != null && this.bounds != null)\n\t{\n\t\t// Stops moving if a multi touch event is received\n\t\tif (mxEvent.isMultiTouchEvent(me.getEvent()))\n\t\t{\n\t\t\tthis.reset();\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tvar delta = this.getDelta(me);\n\t\tvar dx = delta.x;\n\t\tvar dy = delta.y;\n\t\tvar tol = graph.tolerance;\n\n\t\tif (this.shape != null || Math.abs(dx) > tol || Math.abs(dy) > tol)\n\t\t{\n\t\t\t// Highlight is used for highlighting drop targets\n\t\t\tif (this.highlight == null)\n\t\t\t{\n\t\t\t\tthis.highlight = new mxCellHighlight(this.graph,\n\t\t\t\t\tmxConstants.DROP_TARGET_COLOR, 3);\n\t\t\t}\n\t\t\t\n\t\t\tif (this.shape == null)\n\t\t\t{\n\t\t\t\tthis.shape = this.createPreviewShape(this.bounds);\n\t\t\t}\n\t\t\t\n\t\t\tvar clone = graph.isCloneEvent(me.getEvent()) && graph.isCellsCloneable() && this.isCloneEnabled();\n\t\t\tvar gridEnabled = graph.isGridEnabledEvent(me.getEvent());\n\t\t\tvar hideGuide = true;\n\t\t\t\n\t\t\tif (this.guide != null && this.useGuidesForEvent(me))\n\t\t\t{\n\t\t\t\tdelta = this.guide.move(this.bounds, new mxPoint(dx, dy), gridEnabled, clone);\n\t\t\t\thideGuide = false;\n\t\t\t\tdx = delta.x;\n\t\t\t\tdy = delta.y;\n\t\t\t}\n\t\t\telse if (gridEnabled)\n\t\t\t{\n\t\t\t\tvar trx = graph.getView().translate;\n\t\t\t\tvar scale = graph.getView().scale;\t\t\t\t\n\t\t\t\t\n\t\t\t\tvar tx = this.bounds.x - (graph.snap(this.bounds.x / scale - trx.x) + trx.x) * scale;\n\t\t\t\tvar ty = this.bounds.y - (graph.snap(this.bounds.y / scale - trx.y) + trx.y) * scale;\n\t\t\t\tvar v = this.snap(new mxPoint(dx, dy));\n\t\t\t\n\t\t\t\tdx = v.x - tx;\n\t\t\t\tdy = v.y - ty;\n\t\t\t}\n\t\t\t\n\t\t\tif (this.guide != null && hideGuide)\n\t\t\t{\n\t\t\t\tthis.guide.hide();\n\t\t\t}\n\n\t\t\t// Constrained movement if shift key is pressed\n\t\t\tif (graph.isConstrainedEvent(me.getEvent()))\n\t\t\t{\n\t\t\t\tif (Math.abs(dx) > Math.abs(dy))\n\t\t\t\t{\n\t\t\t\t\tdy = 0;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tdx = 0;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tthis.currentDx = dx;\n\t\t\tthis.currentDy = dy;\n\t\t\tthis.updatePreviewShape();\n\n\t\t\tvar target = null;\n\t\t\tvar cell = me.getCell();\n\n\t\t\tif (graph.isDropEnabled() && this.highlightEnabled)\n\t\t\t{\n\t\t\t\t// Contains a call to getCellAt to find the cell under the mouse\n\t\t\t\ttarget = graph.getDropTarget(this.cells, me.getEvent(), cell, clone);\n\t\t\t}\n\n\t\t\tvar state = graph.getView().getState(target);\n\t\t\tvar highlight = false;\n\t\t\t\n\t\t\tif (state != null && (graph.model.getParent(this.cell) != target || clone))\n\t\t\t{\n\t\t\t    if (this.target != target)\n\t\t\t    {\n\t\t\t\t    this.target = target;\n\t\t\t\t    this.setHighlightColor(mxConstants.DROP_TARGET_COLOR);\n\t\t\t\t}\n\t\t\t    \n\t\t\t    highlight = true;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tthis.target = null;\n\n\t\t\t\tif (this.connectOnDrop && cell != null && this.cells.length == 1 &&\n\t\t\t\t\tgraph.getModel().isVertex(cell) && graph.isCellConnectable(cell))\n\t\t\t\t{\n\t\t\t\t\tstate = graph.getView().getState(cell);\n\t\t\t\t\t\n\t\t\t\t\tif (state != null)\n\t\t\t\t\t{\n\t\t\t\t\t\tvar error = graph.getEdgeValidationError(null, this.cell, cell);\n\t\t\t\t\t\tvar color = (error == null) ?\n\t\t\t\t\t\t\tmxConstants.VALID_COLOR :\n\t\t\t\t\t\t\tmxConstants.INVALID_CONNECT_TARGET_COLOR;\n\t\t\t\t\t\tthis.setHighlightColor(color);\n\t\t\t\t\t\thighlight = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif (state != null && highlight)\n\t\t\t{\n\t\t\t\tthis.highlight.highlight(state);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tthis.highlight.hide();\n\t\t\t}\n\t\t}\n\n\t\tthis.updateHint(me);\n\t\tthis.consumeMouseEvent(mxEvent.MOUSE_MOVE, me);\n\t\t\n\t\t// Cancels the bubbling of events to the container so\n\t\t// that the droptarget is not reset due to an mouseMove\n\t\t// fired on the container with no associated state.\n\t\tmxEvent.consume(me.getEvent());\n\t}\n\telse if ((this.isMoveEnabled() || this.isCloneEnabled()) && this.updateCursor && !me.isConsumed() &&\n\t\t(me.getState() != null || me.sourceState != null) && !graph.isMouseDown)\n\t{\n\t\tvar cursor = graph.getCursorForMouseEvent(me);\n\t\t\n\t\tif (cursor == null && graph.isEnabled() && graph.isCellMovable(me.getCell()))\n\t\t{\n\t\t\tif (graph.getModel().isEdge(me.getCell()))\n\t\t\t{\n\t\t\t\tcursor = mxConstants.CURSOR_MOVABLE_EDGE;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tcursor = mxConstants.CURSOR_MOVABLE_VERTEX;\n\t\t\t}\n\t\t}\n\n\t\t// Sets the cursor on the original source state under the mouse\n\t\t// instead of the event source state which can be the parent\n\t\tif (cursor != null && me.sourceState != null)\n\t\t{\n\t\t\tme.sourceState.setCursor(cursor);\n\t\t}\n\t}\n};\n\n/**\n * Function: updatePreviewShape\n * \n * Updates the bounds of the preview shape.\n */\nmxGraphHandler.prototype.updatePreviewShape = function()\n{\n\tif (this.shape != null)\n\t{\n\t\tthis.shape.bounds = new mxRectangle(Math.round(this.pBounds.x + this.currentDx - this.graph.panDx),\n\t\t\t\tMath.round(this.pBounds.y + this.currentDy - this.graph.panDy), this.pBounds.width, this.pBounds.height);\n\t\tthis.shape.redraw();\n\t}\n};\n\n/**\n * Function: setHighlightColor\n * \n * Sets the color of the rectangle used to highlight drop targets.\n * \n * Parameters:\n * \n * color - String that represents the new highlight color.\n */\nmxGraphHandler.prototype.setHighlightColor = function(color)\n{\n\tif (this.highlight != null)\n\t{\n\t\tthis.highlight.setHighlightColor(color);\n\t}\n};\n\n/**\n * Function: mouseUp\n * \n * Handles the event by applying the changes to the selection cells.\n */\nmxGraphHandler.prototype.mouseUp = function(sender, me)\n{\n\tif (!me.isConsumed())\n\t{\n\t\tvar graph = this.graph;\n\t\t\n\t\tif (this.cell != null && this.first != null && this.shape != null &&\n\t\t\tthis.currentDx != null && this.currentDy != null)\n\t\t{\n\t\t\tvar cell = me.getCell();\n\t\t\t\n\t\t\tif (this.connectOnDrop && this.target == null && cell != null && graph.getModel().isVertex(cell) &&\n\t\t\t\tgraph.isCellConnectable(cell) && graph.isEdgeValid(null, this.cell, cell))\n\t\t\t{\n\t\t\t\tgraph.connectionHandler.connect(this.cell, cell, me.getEvent());\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tvar clone = graph.isCloneEvent(me.getEvent()) && graph.isCellsCloneable() && this.isCloneEnabled();\n\t\t\t\tvar scale = graph.getView().scale;\n\t\t\t\tvar dx = this.roundLength(this.currentDx / scale);\n\t\t\t\tvar dy = this.roundLength(this.currentDy / scale);\n\t\t\t\tvar target = this.target;\n\t\t\t\t\n\t\t\t\tif (graph.isSplitEnabled() && graph.isSplitTarget(target, this.cells, me.getEvent()))\n\t\t\t\t{\n\t\t\t\t\tgraph.splitEdge(target, this.cells, null, dx, dy);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tthis.moveCells(this.cells, dx, dy, clone, this.target, me.getEvent());\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse if (this.isSelectEnabled() && this.delayedSelection && this.cell != null)\n\t\t{\n\t\t\tthis.selectDelayed(me);\n\t\t}\n\t}\n\n\t// Consumes the event if a cell was initially clicked\n\tif (this.cellWasClicked)\n\t{\n\t\tthis.consumeMouseEvent(mxEvent.MOUSE_UP, me);\n\t}\n\n\tthis.reset();\n};\n\n/**\n * Function: selectDelayed\n * \n * Implements the delayed selection for the given mouse event.\n */\nmxGraphHandler.prototype.selectDelayed = function(me)\n{\n\tif (!this.graph.isCellSelected(this.cell) || !this.graph.popupMenuHandler.isPopupTrigger(me))\n\t{\n\t\tthis.graph.selectCellForEvent(this.cell, me.getEvent());\n\t}\n};\n\n/**\n * Function: reset\n * \n * Resets the state of this handler.\n */\nmxGraphHandler.prototype.reset = function()\n{\n\tthis.destroyShapes();\n\tthis.removeHint();\n\t\n\tthis.cellWasClicked = false;\n\tthis.delayedSelection = false;\n\tthis.currentDx = null;\n\tthis.currentDy = null;\n\tthis.guides = null;\n\tthis.first = null;\n\tthis.cell = null;\n\tthis.target = null;\n};\n\n/**\n * Function: shouldRemoveCellsFromParent\n * \n * Returns true if the given cells should be removed from the parent for the specified\n * mousereleased event.\n */\nmxGraphHandler.prototype.shouldRemoveCellsFromParent = function(parent, cells, evt)\n{\n\tif (this.graph.getModel().isVertex(parent))\n\t{\n\t\tvar pState = this.graph.getView().getState(parent);\n\t\t\n\t\tif (pState != null)\n\t\t{\n\t\t\tvar pt = mxUtils.convertPoint(this.graph.container,\n\t\t\t\tmxEvent.getClientX(evt), mxEvent.getClientY(evt));\n\t\t\tvar alpha = mxUtils.toRadians(mxUtils.getValue(pState.style, mxConstants.STYLE_ROTATION) || 0);\n\t\t\t\n\t\t\tif (alpha != 0)\n\t\t\t{\n\t\t\t\tvar cos = Math.cos(-alpha);\n\t\t\t\tvar sin = Math.sin(-alpha);\n\t\t\t\tvar cx = new mxPoint(pState.getCenterX(), pState.getCenterY());\n\t\t\t\tpt = mxUtils.getRotatedPoint(pt, cos, sin, cx);\n\t\t\t}\n\t\t\n\t\t\treturn !mxUtils.contains(pState, pt.x, pt.y);\n\t\t}\n\t}\n\t\n\treturn false;\n};\n\n/**\n * Function: moveCells\n * \n * Moves the given cells by the specified amount.\n */\nmxGraphHandler.prototype.moveCells = function(cells, dx, dy, clone, target, evt)\n{\n\tif (clone)\n\t{\n\t\tcells = this.graph.getCloneableCells(cells);\n\t}\n\t\n\t// Removes cells from parent\n\tif (target == null && this.isRemoveCellsFromParent() &&\n\t\tthis.shouldRemoveCellsFromParent(this.graph.getModel().getParent(this.cell), cells, evt))\n\t{\n\t\ttarget = this.graph.getDefaultParent();\n\t}\n\t\n\t// Cloning into locked cells is not allowed\n\tclone = clone && !this.graph.isCellLocked(target || this.graph.getDefaultParent());\n\t\n\t// Passes all selected cells in order to correctly clone or move into\n\t// the target cell. The method checks for each cell if its movable.\n\tcells = this.graph.moveCells(cells, dx - this.graph.panDx / this.graph.view.scale,\n\t\t\tdy - this.graph.panDy / this.graph.view.scale, clone, target, evt);\n\t\n\tif (this.isSelectEnabled() && this.scrollOnMove)\n\t{\n\t\tthis.graph.scrollCellToVisible(cells[0]);\n\t}\n\t\t\t\n\t// Selects the new cells if cells have been cloned\n\tif (clone)\n\t{\n\t\tthis.graph.setSelectionCells(cells);\n\t}\n};\n\n/**\n * Function: destroyShapes\n * \n * Destroy the preview and highlight shapes.\n */\nmxGraphHandler.prototype.destroyShapes = function()\n{\n\t// Destroys the preview dashed rectangle\n\tif (this.shape != null)\n\t{\n\t\tthis.shape.destroy();\n\t\tthis.shape = null;\n\t}\n\t\n\tif (this.guide != null)\n\t{\n\t\tthis.guide.destroy();\n\t\tthis.guide = null;\n\t}\n\t\n\t// Destroys the drop target highlight\n\tif (this.highlight != null)\n\t{\n\t\tthis.highlight.destroy();\n\t\tthis.highlight = null;\n\t}\n};\n\n/**\n * Function: destroy\n * \n * Destroys the handler and all its resources and DOM nodes.\n */\nmxGraphHandler.prototype.destroy = function()\n{\n\tthis.graph.removeMouseListener(this);\n\tthis.graph.removeListener(this.panHandler);\n\t\n\tif (this.escapeHandler != null)\n\t{\n\t\tthis.graph.removeListener(this.escapeHandler);\n\t\tthis.escapeHandler = null;\n\t}\n\t\n\tif (this.refreshHandler != null)\n\t{\n\t\tthis.graph.getModel().removeListener(this.refreshHandler);\n\t\tthis.refreshHandler = null;\n\t}\n\t\n\tthis.destroyShapes();\n\tthis.removeHint();\n};\n"
  },
  {
    "path": "static/cherry/drawio_demo/src/js/handler/mxHandle.js",
    "content": "/**\n * Copyright (c) 2006-2015, JGraph Ltd\n * Copyright (c) 2006-2015, Gaudenz Alder\n */\n/**\n * Class: mxHandle\n * \n * Implements a single custom handle for vertices.\n * \n * Constructor: mxHandle\n * \n * Constructs a new handle for the given state.\n * \n * Parameters:\n * \n * state - <mxCellState> of the cell to be handled.\n */\nfunction mxHandle(state, cursor, image)\n{\n\tthis.graph = state.view.graph;\n\tthis.state = state;\n\tthis.cursor = (cursor != null) ? cursor : this.cursor;\n\tthis.image = (image != null) ? image : this.image;\n\tthis.init();\n};\n\n/**\n * Variable: cursor\n * \n * Specifies the cursor to be used for this handle. Default is 'default'.\n */\nmxHandle.prototype.cursor = 'default';\n\n/**\n * Variable: image\n * \n * Specifies the <mxImage> to be used to render the handle. Default is null.\n */\nmxHandle.prototype.image = null;\n\n/**\n * Variable: image\n * \n * Specifies the <mxImage> to be used to render the handle. Default is null.\n */\nmxHandle.prototype.ignoreGrid = false;\n\n/**\n * Function: getPosition\n * \n * Hook for subclassers to return the current position of the handle.\n */\nmxHandle.prototype.getPosition = function(bounds) { };\n\n/**\n * Function: setPosition\n * \n * Hooks for subclassers to update the style in the <state>.\n */\nmxHandle.prototype.setPosition = function(bounds, pt, me) { };\n\n/**\n * Function: execute\n * \n * Hook for subclassers to execute the handle.\n */\nmxHandle.prototype.execute = function() { };\n\n/**\n * Function: copyStyle\n * \n * Sets the cell style with the given name to the corresponding value in <state>.\n */\nmxHandle.prototype.copyStyle = function(key)\n{\n\tthis.graph.setCellStyles(key, this.state.style[key], [this.state.cell]);\n};\n\n/**\n * Function: processEvent\n * \n * Processes the given <mxMouseEvent> and invokes <setPosition>.\n */\nmxHandle.prototype.processEvent = function(me)\n{\n\tvar scale = this.graph.view.scale;\n\tvar tr = this.graph.view.translate;\n\tvar pt = new mxPoint(me.getGraphX() / scale - tr.x, me.getGraphY() / scale - tr.y);\n\t\n\t// Center shape on mouse cursor\n\tif (this.shape != null && this.shape.bounds != null)\n\t{\n\t\tpt.x -= this.shape.bounds.width / scale / 4;\n\t\tpt.y -= this.shape.bounds.height / scale / 4;\n\t}\n\n\t// Snaps to grid for the rotated position then applies the rotation for the direction after that\n\tvar alpha1 = -mxUtils.toRadians(this.getRotation());\n\tvar alpha2 = -mxUtils.toRadians(this.getTotalRotation()) - alpha1;\n\tpt = this.flipPoint(this.rotatePoint(this.snapPoint(this.rotatePoint(pt, alpha1),\n\t\t\tthis.ignoreGrid || !this.graph.isGridEnabledEvent(me.getEvent())), alpha2));\n\tthis.setPosition(this.state.getPaintBounds(), pt, me);\n\tthis.positionChanged();\n\tthis.redraw();\n};\n\n/**\n * Function: positionChanged\n * \n * Called after <setPosition> has been called in <processEvent>. This repaints\n * the state using <mxCellRenderer>.\n */\nmxHandle.prototype.positionChanged = function()\n{\n\tif (this.state.text != null)\n\t{\n\t\tthis.state.text.apply(this.state);\n\t}\n\t\n\tif (this.state.shape != null)\n\t{\n\t\tthis.state.shape.apply(this.state);\n\t}\n\t\n\tthis.graph.cellRenderer.redraw(this.state, true);\n};\n\n/**\n * Function: getRotation\n * \n * Returns the rotation defined in the style of the cell.\n */\nmxHandle.prototype.getRotation = function()\n{\n\tif (this.state.shape != null)\n\t{\n\t\treturn this.state.shape.getRotation();\n\t}\n\t\n\treturn 0;\n};\n\n/**\n * Function: getTotalRotation\n * \n * Returns the rotation from the style and the rotation from the direction of\n * the cell.\n */\nmxHandle.prototype.getTotalRotation = function()\n{\n\tif (this.state.shape != null)\n\t{\n\t\treturn this.state.shape.getShapeRotation();\n\t}\n\t\n\treturn 0;\n};\n\n/**\n * Function: init\n * \n * Creates and initializes the shapes required for this handle.\n */\nmxHandle.prototype.init = function()\n{\n\tvar html = this.isHtmlRequired();\n\t\n\tif (this.image != null)\n\t{\n\t\tthis.shape = new mxImageShape(new mxRectangle(0, 0, this.image.width, this.image.height), this.image.src);\n\t\tthis.shape.preserveImageAspect = false;\n\t}\n\telse\n\t{\n\t\tthis.shape = this.createShape(html);\n\t}\n\t\n\tthis.initShape(html);\n};\n\n/**\n * Function: createShape\n * \n * Creates and returns the shape for this handle.\n */\nmxHandle.prototype.createShape = function(html)\n{\n\tvar bounds = new mxRectangle(0, 0, mxConstants.HANDLE_SIZE, mxConstants.HANDLE_SIZE);\n\t\n\treturn new mxRectangleShape(bounds, mxConstants.HANDLE_FILLCOLOR, mxConstants.HANDLE_STROKECOLOR);\n};\n\n/**\n * Function: initShape\n * \n * Initializes <shape> and sets its cursor.\n */\nmxHandle.prototype.initShape = function(html)\n{\n\tif (html && this.shape.isHtmlAllowed())\n\t{\n\t\tthis.shape.dialect = mxConstants.DIALECT_STRICTHTML;\n\t\tthis.shape.init(this.graph.container);\n\t}\n\telse\n\t{\n\t\tthis.shape.dialect = (this.graph.dialect != mxConstants.DIALECT_SVG) ? mxConstants.DIALECT_MIXEDHTML : mxConstants.DIALECT_SVG;\n\t\t\n\t\tif (this.cursor != null)\n\t\t{\n\t\t\tthis.shape.init(this.graph.getView().getOverlayPane());\n\t\t}\n\t}\n\n\tmxEvent.redirectMouseEvents(this.shape.node, this.graph, this.state);\n\tthis.shape.node.style.cursor = this.cursor;\n};\n\n/**\n * Function: redraw\n * \n * Renders the shape for this handle.\n */\nmxHandle.prototype.redraw = function()\n{\n\tif (this.shape != null && this.state.shape != null)\n\t{\n\t\tvar pt = this.getPosition(this.state.getPaintBounds());\n\t\t\n\t\tif (pt != null)\n\t\t{\n\t\t\tvar alpha = mxUtils.toRadians(this.getTotalRotation());\n\t\t\tpt = this.rotatePoint(this.flipPoint(pt), alpha);\n\t\n\t\t\tvar scale = this.graph.view.scale;\n\t\t\tvar tr = this.graph.view.translate;\n\t\t\tthis.shape.bounds.x = Math.floor((pt.x + tr.x) * scale - this.shape.bounds.width / 2);\n\t\t\tthis.shape.bounds.y = Math.floor((pt.y + tr.y) * scale - this.shape.bounds.height / 2);\n\t\t\t\n\t\t\t// Needed to force update of text bounds\n\t\t\tthis.shape.redraw();\n\t\t}\n\t}\n};\n\n/**\n * Function: isHtmlRequired\n * \n * Returns true if this handle should be rendered in HTML. This returns true if\n * the text node is in the graph container.\n */\nmxHandle.prototype.isHtmlRequired = function()\n{\n\treturn this.state.text != null && this.state.text.node.parentNode == this.graph.container;\n};\n\n/**\n * Function: rotatePoint\n * \n * Rotates the point by the given angle.\n */\nmxHandle.prototype.rotatePoint = function(pt, alpha)\n{\n\tvar bounds = this.state.getCellBounds();\n\tvar cx = new mxPoint(bounds.getCenterX(), bounds.getCenterY());\n\tvar cos = Math.cos(alpha);\n\tvar sin = Math.sin(alpha); \n\n\treturn mxUtils.getRotatedPoint(pt, cos, sin, cx);\n};\n\n/**\n * Function: flipPoint\n * \n * Flips the given point vertically and/or horizontally.\n */\nmxHandle.prototype.flipPoint = function(pt)\n{\n\tif (this.state.shape != null)\n\t{\n\t\tvar bounds = this.state.getCellBounds();\n\t\t\n\t\tif (this.state.shape.flipH)\n\t\t{\n\t\t\tpt.x = 2 * bounds.x + bounds.width - pt.x;\n\t\t}\n\t\t\n\t\tif (this.state.shape.flipV)\n\t\t{\n\t\t\tpt.y = 2 * bounds.y + bounds.height - pt.y;\n\t\t}\n\t}\n\t\n\treturn pt;\n};\n\n/**\n * Function: snapPoint\n * \n * Snaps the given point to the grid if ignore is false. This modifies\n * the given point in-place and also returns it.\n */\nmxHandle.prototype.snapPoint = function(pt, ignore)\n{\n\tif (!ignore)\n\t{\n\t\tpt.x = this.graph.snap(pt.x);\n\t\tpt.y = this.graph.snap(pt.y);\n\t}\n\t\n\treturn pt;\n};\n\n/**\n * Function: setVisible\n * \n * Shows or hides this handle.\n */\nmxHandle.prototype.setVisible = function(visible)\n{\n\tif (this.shape != null && this.shape.node != null)\n\t{\n\t\tthis.shape.node.style.display = (visible) ? '' : 'none';\n\t}\n};\n\n/**\n * Function: reset\n * \n * Resets the state of this handle by setting its visibility to true.\n */\nmxHandle.prototype.reset = function()\n{\n\tthis.setVisible(true);\n\tthis.state.style = this.graph.getCellStyle(this.state.cell);\n\tthis.positionChanged();\n};\n\n/**\n * Function: destroy\n * \n * Destroys this handle.\n */\nmxHandle.prototype.destroy = function()\n{\n\tif (this.shape != null)\n\t{\n\t\tthis.shape.destroy();\n\t\tthis.shape = null;\n\t}\n};\n"
  },
  {
    "path": "static/cherry/drawio_demo/src/js/handler/mxKeyHandler.js",
    "content": "/**\n * Copyright (c) 2006-2015, JGraph Ltd\n * Copyright (c) 2006-2015, Gaudenz Alder\n */\n/**\n * Class: mxKeyHandler\n *\n * Event handler that listens to keystroke events. This is not a singleton,\n * however, it is normally only required once if the target is the document\n * element (default).\n * \n * This handler installs a key event listener in the topmost DOM node and\n * processes all events that originate from descandants of <mxGraph.container>\n * or from the topmost DOM node. The latter means that all unhandled keystrokes\n * are handled by this object regardless of the focused state of the <graph>.\n * \n * Example:\n * \n * The following example creates a key handler that listens to the delete key\n * (46) and deletes the selection cells if the graph is enabled.\n * \n * (code)\n * var keyHandler = new mxKeyHandler(graph);\n * keyHandler.bindKey(46, function(evt)\n * {\n *   if (graph.isEnabled())\n *   {\n *     graph.removeCells();\n *   }\n * });\n * (end)\n * \n * Keycodes:\n * \n * See http://tinyurl.com/yp8jgl or http://tinyurl.com/229yqw for a list of\n * keycodes or install a key event listener into the document element and print\n * the key codes of the respective events to the console.\n * \n * To support the Command key and the Control key on the Mac, the following\n * code can be used.\n *\n * (code)\n * keyHandler.getFunction = function(evt)\n * {\n *   if (evt != null)\n *   {\n *     return (mxEvent.isControlDown(evt) || (mxClient.IS_MAC && evt.metaKey)) ? this.controlKeys[evt.keyCode] : this.normalKeys[evt.keyCode];\n *   }\n *   \n *   return null;\n * };\n * (end)\n * \n * Constructor: mxKeyHandler\n *\n * Constructs an event handler that executes functions bound to specific\n * keystrokes.\n * \n * Parameters:\n * \n * graph - Reference to the associated <mxGraph>.\n * target - Optional reference to the event target. If null, the document\n * element is used as the event target, that is, the object where the key\n * event listener is installed.\n */\nfunction mxKeyHandler(graph, target)\n{\n\tif (graph != null)\n\t{\n\t\tthis.graph = graph;\n\t\tthis.target = target || document.documentElement;\n\t\t\n\t\t// Creates the arrays to map from keycodes to functions\n\t\tthis.normalKeys = [];\n\t\tthis.shiftKeys = [];\n\t\tthis.controlKeys = [];\n\t\tthis.controlShiftKeys = [];\n\t\t\n\t\tthis.keydownHandler = mxUtils.bind(this, function(evt)\n\t\t{\n\t\t\tthis.keyDown(evt);\n\t\t});\n\n\t\t// Installs the keystroke listener in the target\n\t\tmxEvent.addListener(this.target, 'keydown', this.keydownHandler);\n\t\t\n\t\t// Automatically deallocates memory in IE\n\t\tif (mxClient.IS_IE)\n\t\t{\n\t\t\tmxEvent.addListener(window, 'unload',\n\t\t\t\tmxUtils.bind(this, function()\n\t\t\t\t{\n\t\t\t\t\tthis.destroy();\n\t\t\t\t})\n\t\t\t);\n\t\t}\n\t}\n};\n\n/**\n * Variable: graph\n * \n * Reference to the <mxGraph> associated with this handler.\n */\nmxKeyHandler.prototype.graph = null;\n\n/**\n * Variable: target\n * \n * Reference to the target DOM, that is, the DOM node where the key event\n * listeners are installed.\n */\nmxKeyHandler.prototype.target = null;\n\n/**\n * Variable: normalKeys\n * \n * Maps from keycodes to functions for non-pressed control keys.\n */\nmxKeyHandler.prototype.normalKeys = null;\n\n/**\n * Variable: shiftKeys\n * \n * Maps from keycodes to functions for pressed shift keys.\n */\nmxKeyHandler.prototype.shiftKeys = null;\n\n/**\n * Variable: controlKeys\n * \n * Maps from keycodes to functions for pressed control keys.\n */\nmxKeyHandler.prototype.controlKeys = null;\n\n/**\n * Variable: controlShiftKeys\n * \n * Maps from keycodes to functions for pressed control and shift keys.\n */\nmxKeyHandler.prototype.controlShiftKeys = null;\n\n/**\n * Variable: enabled\n * \n * Specifies if events are handled. Default is true.\n */\nmxKeyHandler.prototype.enabled = true;\n\n/**\n * Function: isEnabled\n * \n * Returns true if events are handled. This implementation returns\n * <enabled>.\n */\nmxKeyHandler.prototype.isEnabled = function()\n{\n\treturn this.enabled;\n};\n\n/**\n * Function: setEnabled\n * \n * Enables or disables event handling by updating <enabled>.\n * \n * Parameters:\n * \n * enabled - Boolean that specifies the new enabled state.\n */\nmxKeyHandler.prototype.setEnabled = function(enabled)\n{\n\tthis.enabled = enabled;\n};\n\n/**\n * Function: bindKey\n * \n * Binds the specified keycode to the given function. This binding is used\n * if the control key is not pressed.\n * \n * Parameters:\n *\n * code - Integer that specifies the keycode.\n * funct - JavaScript function that takes the key event as an argument.\n */\nmxKeyHandler.prototype.bindKey = function(code, funct)\n{\n\tthis.normalKeys[code] = funct;\n};\n\n/**\n * Function: bindShiftKey\n * \n * Binds the specified keycode to the given function. This binding is used\n * if the shift key is pressed.\n * \n * Parameters:\n *\n * code - Integer that specifies the keycode.\n * funct - JavaScript function that takes the key event as an argument.\n */\nmxKeyHandler.prototype.bindShiftKey = function(code, funct)\n{\n\tthis.shiftKeys[code] = funct;\n};\n\n/**\n * Function: bindControlKey\n * \n * Binds the specified keycode to the given function. This binding is used\n * if the control key is pressed.\n * \n * Parameters:\n *\n * code - Integer that specifies the keycode.\n * funct - JavaScript function that takes the key event as an argument.\n */\nmxKeyHandler.prototype.bindControlKey = function(code, funct)\n{\n\tthis.controlKeys[code] = funct;\n};\n\n/**\n * Function: bindControlShiftKey\n * \n * Binds the specified keycode to the given function. This binding is used\n * if the control and shift key are pressed.\n * \n * Parameters:\n *\n * code - Integer that specifies the keycode.\n * funct - JavaScript function that takes the key event as an argument.\n */\nmxKeyHandler.prototype.bindControlShiftKey = function(code, funct)\n{\n\tthis.controlShiftKeys[code] = funct;\n};\n\n/**\n * Function: isControlDown\n * \n * Returns true if the control key is pressed. This uses <mxEvent.isControlDown>.\n * \n * Parameters:\n * \n * evt - Key event whose control key pressed state should be returned.\n */\nmxKeyHandler.prototype.isControlDown = function(evt)\n{\n\treturn mxEvent.isControlDown(evt);\n};\n\n/**\n * Function: getFunction\n * \n * Returns the function associated with the given key event or null if no\n * function is associated with the given event.\n * \n * Parameters:\n * \n * evt - Key event whose associated function should be returned.\n */\nmxKeyHandler.prototype.getFunction = function(evt)\n{\n\tif (evt != null && !mxEvent.isAltDown(evt))\n\t{\n\t\tif (this.isControlDown(evt))\n\t\t{\n\t\t\tif (mxEvent.isShiftDown(evt))\n\t\t\t{\n\t\t\t\treturn this.controlShiftKeys[evt.keyCode];\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn this.controlKeys[evt.keyCode];\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif (mxEvent.isShiftDown(evt))\n\t\t\t{\n\t\t\t\treturn this.shiftKeys[evt.keyCode];\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn this.normalKeys[evt.keyCode];\n\t\t\t}\n\t\t}\n\t}\n\t\n\treturn null;\n};\n\t\n/**\n * Function: isGraphEvent\n * \n * Returns true if the event should be processed by this handler, that is,\n * if the event source is either the target, one of its direct children, a\n * descendant of the <mxGraph.container>, or the <mxGraph.cellEditor> of the\n * <graph>.\n * \n * Parameters:\n * \n * evt - Key event that represents the keystroke.\n */\nmxKeyHandler.prototype.isGraphEvent = function(evt)\n{\n\tvar source = mxEvent.getSource(evt);\n\t\n\t// Accepts events from the target object or\n\t// in-place editing inside graph\n\tif ((source == this.target || source.parentNode == this.target) ||\n\t\t(this.graph.cellEditor != null && this.graph.cellEditor.isEventSource(evt)))\n\t{\n\t\treturn true;\n\t}\n\t\n\t// Accepts events from inside the container\n\treturn mxUtils.isAncestorNode(this.graph.container, source);\n};\n\n/**\n * Function: keyDown\n * \n * Handles the event by invoking the function bound to the respective keystroke\n * if <isEnabledForEvent> returns true for the given event and if\n * <isEventIgnored> returns false, except for escape for which\n * <isEventIgnored> is not invoked.\n * \n * Parameters:\n * \n * evt - Key event that represents the keystroke.\n */\nmxKeyHandler.prototype.keyDown = function(evt)\n{\n\tif (this.isEnabledForEvent(evt))\n\t{\n\t\t// Cancels the editing if escape is pressed\n\t\tif (evt.keyCode == 27 /* Escape */)\n\t\t{\n\t\t\tthis.escape(evt);\n\t\t}\n\t\t\n\t\t// Invokes the function for the keystroke\n\t\telse if (!this.isEventIgnored(evt))\n\t\t{\n\t\t\tvar boundFunction = this.getFunction(evt);\n\t\t\t\n\t\t\tif (boundFunction != null)\n\t\t\t{\n\t\t\t\tboundFunction(evt);\n\t\t\t\tmxEvent.consume(evt);\n\t\t\t}\n\t\t}\n\t}\n};\n\n/**\n * Function: isEnabledForEvent\n * \n * Returns true if the given event should be handled. <isEventIgnored> is\n * called later if the event is not an escape key stroke, in which case\n * <escape> is called. This implementation returns true if <isEnabled>\n * returns true for both, this handler and <graph>, if the event is not\n * consumed and if <isGraphEvent> returns true.\n * \n * Parameters:\n * \n * evt - Key event that represents the keystroke.\n */\nmxKeyHandler.prototype.isEnabledForEvent = function(evt)\n{\n\treturn (this.graph.isEnabled() && !mxEvent.isConsumed(evt) &&\n\t\tthis.isGraphEvent(evt) && this.isEnabled());\n};\n\n/**\n * Function: isEventIgnored\n * \n * Returns true if the given keystroke should be ignored. This returns\n * graph.isEditing().\n * \n * Parameters:\n * \n * evt - Key event that represents the keystroke.\n */\nmxKeyHandler.prototype.isEventIgnored = function(evt)\n{\n\treturn this.graph.isEditing();\n};\n\n/**\n * Function: escape\n * \n * Hook to process ESCAPE keystrokes. This implementation invokes\n * <mxGraph.stopEditing> to cancel the current editing, connecting\n * and/or other ongoing modifications.\n * \n * Parameters:\n * \n * evt - Key event that represents the keystroke. Possible keycode in this\n * case is 27 (ESCAPE).\n */\nmxKeyHandler.prototype.escape = function(evt)\n{\n\tif (this.graph.isEscapeEnabled())\n\t{\n\t\tthis.graph.escape(evt);\n\t}\n};\n\n/**\n * Function: destroy\n * \n * Destroys the handler and all its references into the DOM. This does\n * normally not need to be called, it is called automatically when the\n * window unloads (in IE).\n */\nmxKeyHandler.prototype.destroy = function()\n{\n\tif (this.target != null && this.keydownHandler != null)\n\t{\n\t\tmxEvent.removeListener(this.target, 'keydown', this.keydownHandler);\n\t\tthis.keydownHandler = null;\n\t}\n\t\n\tthis.target = null;\n};\n"
  },
  {
    "path": "static/cherry/drawio_demo/src/js/handler/mxPanningHandler.js",
    "content": "/**\n * Copyright (c) 2006-2015, JGraph Ltd\n * Copyright (c) 2006-2015, Gaudenz Alder\n */\n/**\n * Class: mxPanningHandler\n * \n * Event handler that pans and creates popupmenus. To use the left\n * mousebutton for panning without interfering with cell moving and\n * resizing, use <isUseLeftButton> and <isIgnoreCell>. For grid size\n * steps while panning, use <useGrid>. This handler is built-into\n * <mxGraph.panningHandler> and enabled using <mxGraph.setPanning>.\n * \n * Constructor: mxPanningHandler\n * \n * Constructs an event handler that creates a <mxPopupMenu>\n * and pans the graph.\n *\n * Event: mxEvent.PAN_START\n *\n * Fires when the panning handler changes its <active> state to true. The\n * <code>event</code> property contains the corresponding <mxMouseEvent>.\n *\n * Event: mxEvent.PAN\n *\n * Fires while handle is processing events. The <code>event</code> property contains\n * the corresponding <mxMouseEvent>.\n *\n * Event: mxEvent.PAN_END\n *\n * Fires when the panning handler changes its <active> state to false. The\n * <code>event</code> property contains the corresponding <mxMouseEvent>.\n */\nfunction mxPanningHandler(graph)\n{\n\tif (graph != null)\n\t{\n\t\tthis.graph = graph;\n\t\tthis.graph.addMouseListener(this);\n\n\t\t// Handles force panning event\n\t\tthis.forcePanningHandler = mxUtils.bind(this, function(sender, evt)\n\t\t{\n\t\t\tvar evtName = evt.getProperty('eventName');\n\t\t\tvar me = evt.getProperty('event');\n\t\t\t\n\t\t\tif (evtName == mxEvent.MOUSE_DOWN && this.isForcePanningEvent(me))\n\t\t\t{\n\t\t\t\tthis.start(me);\n\t\t\t\tthis.active = true;\n\t\t\t\tthis.fireEvent(new mxEventObject(mxEvent.PAN_START, 'event', me));\n\t\t\t\tme.consume();\n\t\t\t}\n\t\t});\n\n\t\tthis.graph.addListener(mxEvent.FIRE_MOUSE_EVENT, this.forcePanningHandler);\n\t\t\n\t\t// Handles pinch gestures\n\t\tthis.gestureHandler = mxUtils.bind(this, function(sender, eo)\n\t\t{\n\t\t\tif (this.isPinchEnabled())\n\t\t\t{\n\t\t\t\tvar evt = eo.getProperty('event');\n\t\t\t\t\n\t\t\t\tif (!mxEvent.isConsumed(evt) && evt.type == 'gesturestart')\n\t\t\t\t{\n\t\t\t\t\tthis.initialScale = this.graph.view.scale;\n\t\t\t\t\n\t\t\t\t\t// Forces start of panning when pinch gesture starts\n\t\t\t\t\tif (!this.active && this.mouseDownEvent != null)\n\t\t\t\t\t{\n\t\t\t\t\t\tthis.start(this.mouseDownEvent);\n\t\t\t\t\t\tthis.mouseDownEvent = null;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if (evt.type == 'gestureend' && this.initialScale != null)\n\t\t\t\t{\n\t\t\t\t\tthis.initialScale = null;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (this.initialScale != null)\n\t\t\t\t{\n\t\t\t\t\tvar value = Math.round(this.initialScale * evt.scale * 100) / 100;\n\t\t\t\t\t\n\t\t\t\t\tif (this.minScale != null)\n\t\t\t\t\t{\n\t\t\t\t\t\tvalue = Math.max(this.minScale, value);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif (this.maxScale != null)\n\t\t\t\t\t{\n\t\t\t\t\t\tvalue = Math.min(this.maxScale, value);\n\t\t\t\t\t}\n\t\n\t\t\t\t\tif (this.graph.view.scale != value)\n\t\t\t\t\t{\n\t\t\t\t\t\tthis.graph.zoomTo(value);\n\t\t\t\t\t\tmxEvent.consume(evt);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\t\n\t\tthis.graph.addListener(mxEvent.GESTURE, this.gestureHandler);\n\t\t\n\t\tthis.mouseUpListener = mxUtils.bind(this, function()\n\t\t{\n\t\t    \tif (this.active)\n\t\t    \t{\n\t\t    \t\tthis.reset();\n\t\t    \t}\n\t\t});\n\t\t\n\t\t// Stops scrolling on every mouseup anywhere in the document\n\t\tmxEvent.addListener(document, 'mouseup', this.mouseUpListener);\n\t}\n};\n\n/**\n * Extends mxEventSource.\n */\nmxPanningHandler.prototype = new mxEventSource();\nmxPanningHandler.prototype.constructor = mxPanningHandler;\n\n/**\n * Variable: graph\n * \n * Reference to the enclosing <mxGraph>.\n */\nmxPanningHandler.prototype.graph = null;\n\n/**\n * Variable: useLeftButtonForPanning\n * \n * Specifies if panning should be active for the left mouse button.\n * Setting this to true may conflict with <mxRubberband>. Default is false.\n */\nmxPanningHandler.prototype.useLeftButtonForPanning = false;\n\n/**\n * Variable: usePopupTrigger\n * \n * Specifies if <mxEvent.isPopupTrigger> should also be used for panning.\n */\nmxPanningHandler.prototype.usePopupTrigger = true;\n\n/**\n * Variable: ignoreCell\n * \n * Specifies if panning should be active even if there is a cell under the\n * mousepointer. Default is false.\n */\nmxPanningHandler.prototype.ignoreCell = false;\n\n/**\n * Variable: previewEnabled\n * \n * Specifies if the panning should be previewed. Default is true.\n */\nmxPanningHandler.prototype.previewEnabled = true;\n\n/**\n * Variable: useGrid\n * \n * Specifies if the panning steps should be aligned to the grid size.\n * Default is false.\n */\nmxPanningHandler.prototype.useGrid = false;\n\n/**\n * Variable: panningEnabled\n * \n * Specifies if panning should be enabled. Default is true.\n */\nmxPanningHandler.prototype.panningEnabled = true;\n\n/**\n * Variable: pinchEnabled\n * \n * Specifies if pinch gestures should be handled as zoom. Default is true.\n */\nmxPanningHandler.prototype.pinchEnabled = true;\n\n/**\n * Variable: maxScale\n * \n * Specifies the maximum scale. Default is 8.\n */\nmxPanningHandler.prototype.maxScale = 8;\n\n/**\n * Variable: minScale\n * \n * Specifies the minimum scale. Default is 0.01.\n */\nmxPanningHandler.prototype.minScale = 0.01;\n\n/**\n * Variable: dx\n * \n * Holds the current horizontal offset.\n */\nmxPanningHandler.prototype.dx = null;\n\n/**\n * Variable: dy\n * \n * Holds the current vertical offset.\n */\nmxPanningHandler.prototype.dy = null;\n\n/**\n * Variable: startX\n * \n * Holds the x-coordinate of the start point.\n */\nmxPanningHandler.prototype.startX = 0;\n\n/**\n * Variable: startY\n * \n * Holds the y-coordinate of the start point.\n */\nmxPanningHandler.prototype.startY = 0;\n\n/**\n * Function: isActive\n * \n * Returns true if the handler is currently active.\n */\nmxPanningHandler.prototype.isActive = function()\n{\n\treturn this.active || this.initialScale != null;\n};\n\n/**\n * Function: isPanningEnabled\n * \n * Returns <panningEnabled>.\n */\nmxPanningHandler.prototype.isPanningEnabled = function()\n{\n\treturn this.panningEnabled;\n};\n\n/**\n * Function: setPanningEnabled\n * \n * Sets <panningEnabled>.\n */\nmxPanningHandler.prototype.setPanningEnabled = function(value)\n{\n\tthis.panningEnabled = value;\n};\n\n/**\n * Function: isPinchEnabled\n * \n * Returns <pinchEnabled>.\n */\nmxPanningHandler.prototype.isPinchEnabled = function()\n{\n\treturn this.pinchEnabled;\n};\n\n/**\n * Function: setPinchEnabled\n * \n * Sets <pinchEnabled>.\n */\nmxPanningHandler.prototype.setPinchEnabled = function(value)\n{\n\tthis.pinchEnabled = value;\n};\n\n/**\n * Function: isPanningTrigger\n * \n * Returns true if the given event is a panning trigger for the optional\n * given cell. This returns true if control-shift is pressed or if\n * <usePopupTrigger> is true and the event is a popup trigger.\n */\nmxPanningHandler.prototype.isPanningTrigger = function(me)\n{\n\tvar evt = me.getEvent();\n\t\n\treturn (this.useLeftButtonForPanning && me.getState() == null &&\n\t\t\tmxEvent.isLeftMouseButton(evt)) || (mxEvent.isControlDown(evt) &&\n\t\t\tmxEvent.isShiftDown(evt)) || (this.usePopupTrigger && mxEvent.isPopupTrigger(evt));\n};\n\n/**\n * Function: isForcePanningEvent\n * \n * Returns true if the given <mxMouseEvent> should start panning. This\n * implementation always returns true if <ignoreCell> is true or for\n * multi touch events.\n */\nmxPanningHandler.prototype.isForcePanningEvent = function(me)\n{\n\treturn this.ignoreCell || mxEvent.isMultiTouchEvent(me.getEvent());\n};\n\n/**\n * Function: mouseDown\n * \n * Handles the event by initiating the panning. By consuming the event all\n * subsequent events of the gesture are redirected to this handler.\n */\nmxPanningHandler.prototype.mouseDown = function(sender, me)\n{\n\tthis.mouseDownEvent = me;\n\t\n\tif (!me.isConsumed() && this.isPanningEnabled() && !this.active && this.isPanningTrigger(me))\n\t{\n\t\tthis.start(me);\n\t\tthis.consumePanningTrigger(me);\n\t}\n};\n\n/**\n * Function: start\n * \n * Starts panning at the given event.\n */\nmxPanningHandler.prototype.start = function(me)\n{\n\tthis.dx0 = -this.graph.container.scrollLeft;\n\tthis.dy0 = -this.graph.container.scrollTop;\n\n\t// Stores the location of the trigger event\n\tthis.startX = me.getX();\n\tthis.startY = me.getY();\n\tthis.dx = null;\n\tthis.dy = null;\n\t\n\tthis.panningTrigger = true;\n};\n\n/**\n * Function: consumePanningTrigger\n * \n * Consumes the given <mxMouseEvent> if it was a panning trigger in\n * <mouseDown>. The default is to invoke <mxMouseEvent.consume>. Note that this\n * will block any further event processing. If you haven't disabled built-in\n * context menus and require immediate selection of the cell on mouseDown in\n * Safari and/or on the Mac, then use the following code:\n * \n * (code)\n * mxPanningHandler.prototype.consumePanningTrigger = function(me)\n * {\n *   if (me.evt.preventDefault)\n *   {\n *     me.evt.preventDefault();\n *   }\n *   \n *   // Stops event processing in IE\n *   me.evt.returnValue = false;\n *   \n *   // Sets local consumed state\n *   if (!mxClient.IS_SF && !mxClient.IS_MAC)\n *   {\n *     me.consumed = true;\n *   }\n * };\n * (end)\n */\nmxPanningHandler.prototype.consumePanningTrigger = function(me)\n{\n\tme.consume();\n};\n\n/**\n * Function: mouseMove\n * \n * Handles the event by updating the panning on the graph.\n */\nmxPanningHandler.prototype.mouseMove = function(sender, me)\n{\n\tthis.dx = me.getX() - this.startX;\n\tthis.dy = me.getY() - this.startY;\n\t\n\tif (this.active)\n\t{\n\t\tif (this.previewEnabled)\n\t\t{\n\t\t\t// Applies the grid to the panning steps\n\t\t\tif (this.useGrid)\n\t\t\t{\n\t\t\t\tthis.dx = this.graph.snap(this.dx);\n\t\t\t\tthis.dy = this.graph.snap(this.dy);\n\t\t\t}\n\t\t\t\n\t\t\tthis.graph.panGraph(this.dx + this.dx0, this.dy + this.dy0);\n\t\t}\n\n\t\tthis.fireEvent(new mxEventObject(mxEvent.PAN, 'event', me));\n\t}\n\telse if (this.panningTrigger)\n\t{\n\t\tvar tmp = this.active;\n\n\t\t// Panning is activated only if the mouse is moved\n\t\t// beyond the graph tolerance\n\t\tthis.active = Math.abs(this.dx) > this.graph.tolerance || Math.abs(this.dy) > this.graph.tolerance;\n\n\t\tif (!tmp && this.active)\n\t\t{\n\t\t\tthis.fireEvent(new mxEventObject(mxEvent.PAN_START, 'event', me));\n\t\t}\n\t}\n\t\n\tif (this.active || this.panningTrigger)\n\t{\n\t\tme.consume();\n\t}\n};\n\n/**\n * Function: mouseUp\n * \n * Handles the event by setting the translation on the view or showing the\n * popupmenu.\n */\nmxPanningHandler.prototype.mouseUp = function(sender, me)\n{\n\tif (this.active)\n\t{\n\t\tif (this.dx != null && this.dy != null)\n\t\t{\n\t\t\t// Ignores if scrollbars have been used for panning\n\t\t\tif (!this.graph.useScrollbarsForPanning || !mxUtils.hasScrollbars(this.graph.container))\n\t\t\t{\n\t\t\t\tvar scale = this.graph.getView().scale;\n\t\t\t\tvar t = this.graph.getView().translate;\n\t\t\t\tthis.graph.panGraph(0, 0);\n\t\t\t\tthis.panGraph(t.x + this.dx / scale, t.y + this.dy / scale);\n\t\t\t}\n\t\t\t\n\t\t\tme.consume();\n\t\t}\n\t\t\n\t\tthis.fireEvent(new mxEventObject(mxEvent.PAN_END, 'event', me));\n\t}\n\t\n\tthis.reset();\n};\n\n/**\n * Function: mouseUp\n * \n * Handles the event by setting the translation on the view or showing the\n * popupmenu.\n */\nmxPanningHandler.prototype.reset = function()\n{\n\tthis.panningTrigger = false;\n\tthis.mouseDownEvent = null;\n\tthis.active = false;\n\tthis.dx = null;\n\tthis.dy = null;\n};\n\n/**\n * Function: panGraph\n * \n * Pans <graph> by the given amount.\n */\nmxPanningHandler.prototype.panGraph = function(dx, dy)\n{\n\tthis.graph.getView().setTranslate(dx, dy);\n};\n\n/**\n * Function: destroy\n * \n * Destroys the handler and all its resources and DOM nodes.\n */\nmxPanningHandler.prototype.destroy = function()\n{\n\tthis.graph.removeMouseListener(this);\n\tthis.graph.removeListener(this.forcePanningHandler);\n\tthis.graph.removeListener(this.gestureHandler);\n\tmxEvent.removeListener(document, 'mouseup', this.mouseUpListener);\n};\n"
  },
  {
    "path": "static/cherry/drawio_demo/src/js/handler/mxPopupMenuHandler.js",
    "content": "/**\n * Copyright (c) 2006-2015, JGraph Ltd\n * Copyright (c) 2006-2015, Gaudenz Alder\n */\n/**\n * Class: mxPopupMenuHandler\n * \n * Event handler that creates popupmenus.\n * \n * Constructor: mxPopupMenuHandler\n * \n * Constructs an event handler that creates a <mxPopupMenu>.\n */\nfunction mxPopupMenuHandler(graph, factoryMethod)\n{\n\tif (graph != null)\n\t{\n\t\tthis.graph = graph;\n\t\tthis.factoryMethod = factoryMethod;\n\t\tthis.graph.addMouseListener(this);\n\t\t\n\t\t// Does not show menu if any touch gestures take place after the trigger\n\t\tthis.gestureHandler = mxUtils.bind(this, function(sender, eo)\n\t\t{\n\t\t\tthis.inTolerance = false;\n\t\t});\n\t\t\n\t\tthis.graph.addListener(mxEvent.GESTURE, this.gestureHandler);\n\t\t\n\t\tthis.init();\n\t}\n};\n\n/**\n * Extends mxPopupMenu.\n */\nmxPopupMenuHandler.prototype = new mxPopupMenu();\nmxPopupMenuHandler.prototype.constructor = mxPopupMenuHandler;\n\n/**\n * Variable: graph\n * \n * Reference to the enclosing <mxGraph>.\n */\nmxPopupMenuHandler.prototype.graph = null;\n\n/**\n * Variable: selectOnPopup\n * \n * Specifies if cells should be selected if a popupmenu is displayed for\n * them. Default is true.\n */\nmxPopupMenuHandler.prototype.selectOnPopup = true;\n\n/**\n * Variable: clearSelectionOnBackground\n * \n * Specifies if cells should be deselected if a popupmenu is displayed for\n * the diagram background. Default is true.\n */\nmxPopupMenuHandler.prototype.clearSelectionOnBackground = true;\n\n/**\n * Variable: triggerX\n * \n * X-coordinate of the mouse down event.\n */\nmxPopupMenuHandler.prototype.triggerX = null;\n\n/**\n * Variable: triggerY\n * \n * Y-coordinate of the mouse down event.\n */\nmxPopupMenuHandler.prototype.triggerY = null;\n\n/**\n * Variable: screenX\n * \n * Screen X-coordinate of the mouse down event.\n */\nmxPopupMenuHandler.prototype.screenX = null;\n\n/**\n * Variable: screenY\n * \n * Screen Y-coordinate of the mouse down event.\n */\nmxPopupMenuHandler.prototype.screenY = null;\n\n/**\n * Function: init\n * \n * Initializes the shapes required for this vertex handler.\n */\nmxPopupMenuHandler.prototype.init = function()\n{\n\t// Supercall\n\tmxPopupMenu.prototype.init.apply(this);\n\n\t// Hides the tooltip if the mouse is over\n\t// the context menu\n\tmxEvent.addGestureListeners(this.div, mxUtils.bind(this, function(evt)\n\t{\n\t\tthis.graph.tooltipHandler.hide();\n\t}));\n};\n\n/**\n * Function: isSelectOnPopup\n * \n * Hook for returning if a cell should be selected for a given <mxMouseEvent>.\n * This implementation returns <selectOnPopup>.\n */\nmxPopupMenuHandler.prototype.isSelectOnPopup = function(me)\n{\n\treturn this.selectOnPopup;\n};\n\n/**\n * Function: mouseDown\n * \n * Handles the event by initiating the panning. By consuming the event all\n * subsequent events of the gesture are redirected to this handler.\n */\nmxPopupMenuHandler.prototype.mouseDown = function(sender, me)\n{\n\tif (this.isEnabled() && !mxEvent.isMultiTouchEvent(me.getEvent()))\n\t{\n\t\t// Hides the popupmenu if is is being displayed\n\t\tthis.hideMenu();\n\t\tthis.triggerX = me.getGraphX();\n\t\tthis.triggerY = me.getGraphY();\n\t\tthis.screenX = mxEvent.getMainEvent(me.getEvent()).screenX;\n\t\tthis.screenY = mxEvent.getMainEvent(me.getEvent()).screenY;\n\t\tthis.popupTrigger = this.isPopupTrigger(me);\n\t\tthis.inTolerance = true;\n\t}\n};\n\n/**\n * Function: mouseMove\n * \n * Handles the event by updating the panning on the graph.\n */\nmxPopupMenuHandler.prototype.mouseMove = function(sender, me)\n{\n\t// Popup trigger may change on mouseUp so ignore it\n\tif (this.inTolerance && this.screenX != null && this.screenY != null)\n\t{\n\t\tif (Math.abs(mxEvent.getMainEvent(me.getEvent()).screenX - this.screenX) > this.graph.tolerance ||\n\t\t\tMath.abs(mxEvent.getMainEvent(me.getEvent()).screenY - this.screenY) > this.graph.tolerance)\n\t\t{\n\t\t\tthis.inTolerance = false;\n\t\t}\n\t}\n};\n\n/**\n * Function: mouseUp\n * \n * Handles the event by setting the translation on the view or showing the\n * popupmenu.\n */\nmxPopupMenuHandler.prototype.mouseUp = function(sender, me)\n{\n\tif (this.popupTrigger && this.inTolerance && this.triggerX != null && this.triggerY != null)\n\t{\n\t\tvar cell = this.getCellForPopupEvent(me);\n\n\t\t// Selects the cell for which the context menu is being displayed\n\t\tif (this.graph.isEnabled() && this.isSelectOnPopup(me) &&\n\t\t\tcell != null && !this.graph.isCellSelected(cell))\n\t\t{\n\t\t\tthis.graph.setSelectionCell(cell);\n\t\t}\n\t\telse if (this.clearSelectionOnBackground && cell == null)\n\t\t{\n\t\t\tthis.graph.clearSelection();\n\t\t}\n\t\t\n\t\t// Hides the tooltip if there is one\n\t\tthis.graph.tooltipHandler.hide();\n\n\t\t// Menu is shifted by 1 pixel so that the mouse up event\n\t\t// is routed via the underlying shape instead of the DIV\n\t\tvar origin = mxUtils.getScrollOrigin();\n\t\tthis.popup(me.getX() + origin.x + 1, me.getY() + origin.y + 1, cell, me.getEvent());\n\t\tme.consume();\n\t}\n\t\n\tthis.popupTrigger = false;\n\tthis.inTolerance = false;\n};\n\n/**\n * Function: getCellForPopupEvent\n * \n * Hook to return the cell for the mouse up popup trigger handling.\n */\nmxPopupMenuHandler.prototype.getCellForPopupEvent = function(me)\n{\n\treturn me.getCell();\n};\n\n/**\n * Function: destroy\n * \n * Destroys the handler and all its resources and DOM nodes.\n */\nmxPopupMenuHandler.prototype.destroy = function()\n{\n\tthis.graph.removeMouseListener(this);\n\tthis.graph.removeListener(this.gestureHandler);\n\t\n\t// Supercall\n\tmxPopupMenu.prototype.destroy.apply(this);\n};\n"
  },
  {
    "path": "static/cherry/drawio_demo/src/js/handler/mxRubberband.js",
    "content": "/**\n * Copyright (c) 2006-2016, JGraph Ltd\n * Copyright (c) 2006-2016, Gaudenz Alder\n */\n/**\n * Class: mxRubberband\n * \n * Event handler that selects rectangular regions. This is not built-into\n * <mxGraph>. To enable rubberband selection in a graph, use the following code.\n * \n * Example:\n * \n * (code)\n * var rubberband = new mxRubberband(graph);\n * (end)\n * \n * Constructor: mxRubberband\n * \n * Constructs an event handler that selects rectangular regions in the graph\n * using rubberband selection.\n */\nfunction mxRubberband(graph)\n{\n\tif (graph != null)\n\t{\n\t\tthis.graph = graph;\n\t\tthis.graph.addMouseListener(this);\n\n\t\t// Handles force rubberband event\n\t\tthis.forceRubberbandHandler = mxUtils.bind(this, function(sender, evt)\n\t\t{\n\t\t\tvar evtName = evt.getProperty('eventName');\n\t\t\tvar me = evt.getProperty('event');\n\t\t\t\n\t\t\tif (evtName == mxEvent.MOUSE_DOWN && this.isForceRubberbandEvent(me))\n\t\t\t{\n\t\t\t\tvar offset = mxUtils.getOffset(this.graph.container);\n\t\t\t\tvar origin = mxUtils.getScrollOrigin(this.graph.container);\n\t\t\t\torigin.x -= offset.x;\n\t\t\t\torigin.y -= offset.y;\n\t\t\t\tthis.start(me.getX() + origin.x, me.getY() + origin.y);\n\t\t\t\tme.consume(false);\n\t\t\t}\n\t\t});\n\t\t\n\t\tthis.graph.addListener(mxEvent.FIRE_MOUSE_EVENT, this.forceRubberbandHandler);\n\t\t\n\t\t// Repaints the marquee after autoscroll\n\t\tthis.panHandler = mxUtils.bind(this, function()\n\t\t{\n\t\t\tthis.repaint();\n\t\t});\n\t\t\n\t\tthis.graph.addListener(mxEvent.PAN, this.panHandler);\n\t\t\n\t\t// Does not show menu if any touch gestures take place after the trigger\n\t\tthis.gestureHandler = mxUtils.bind(this, function(sender, eo)\n\t\t{\n\t\t\tif (this.first != null)\n\t\t\t{\n\t\t\t\tthis.reset();\n\t\t\t}\n\t\t});\n\t\t\n\t\tthis.graph.addListener(mxEvent.GESTURE, this.gestureHandler);\n\t\t\n\t\t// Automatic deallocation of memory\n\t\tif (mxClient.IS_IE)\n\t\t{\n\t\t\tmxEvent.addListener(window, 'unload',\n\t\t\t\tmxUtils.bind(this, function()\n\t\t\t\t{\n\t\t\t\t\tthis.destroy();\n\t\t\t\t})\n\t\t\t);\n\t\t}\n\t}\n};\n\n/**\n * Variable: defaultOpacity\n * \n * Specifies the default opacity to be used for the rubberband div. Default\n * is 20.\n */\nmxRubberband.prototype.defaultOpacity = 20;\n\n/**\n * Variable: enabled\n * \n * Specifies if events are handled. Default is true.\n */\nmxRubberband.prototype.enabled = true;\n\n/**\n * Variable: div\n * \n * Holds the DIV element which is currently visible.\n */\nmxRubberband.prototype.div = null;\n\n/**\n * Variable: sharedDiv\n * \n * Holds the DIV element which is used to display the rubberband.\n */\nmxRubberband.prototype.sharedDiv = null;\n\n/**\n * Variable: currentX\n * \n * Holds the value of the x argument in the last call to <update>.\n */\nmxRubberband.prototype.currentX = 0;\n\n/**\n * Variable: currentY\n * \n * Holds the value of the y argument in the last call to <update>.\n */\nmxRubberband.prototype.currentY = 0;\n\n/**\n * Variable: fadeOut\n * \n * Optional fade out effect. Default is false.\n */\nmxRubberband.prototype.fadeOut = false;\n\n/**\n * Function: isEnabled\n * \n * Returns true if events are handled. This implementation returns\n * <enabled>.\n */\nmxRubberband.prototype.isEnabled = function()\n{\n\treturn this.enabled;\n};\n\t\t\n/**\n * Function: setEnabled\n * \n * Enables or disables event handling. This implementation updates\n * <enabled>.\n */\nmxRubberband.prototype.setEnabled = function(enabled)\n{\n\tthis.enabled = enabled;\n};\n\n/**\n * Function: isForceRubberbandEvent\n * \n * Returns true if the given <mxMouseEvent> should start rubberband selection.\n * This implementation returns true if the alt key is pressed.\n */\nmxRubberband.prototype.isForceRubberbandEvent = function(me)\n{\n\treturn mxEvent.isAltDown(me.getEvent());\n};\n\n/**\n * Function: mouseDown\n * \n * Handles the event by initiating a rubberband selection. By consuming the\n * event all subsequent events of the gesture are redirected to this\n * handler.\n */\nmxRubberband.prototype.mouseDown = function(sender, me)\n{\n\tif (!me.isConsumed() && this.isEnabled() && this.graph.isEnabled() &&\n\t\tme.getState() == null && !mxEvent.isMultiTouchEvent(me.getEvent()))\n\t{\n\t\tvar offset = mxUtils.getOffset(this.graph.container);\n\t\tvar origin = mxUtils.getScrollOrigin(this.graph.container);\n\t\torigin.x -= offset.x;\n\t\torigin.y -= offset.y;\n\t\tthis.start(me.getX() + origin.x, me.getY() + origin.y);\n\n\t\t// Does not prevent the default for this event so that the\n\t\t// event processing chain is still executed even if we start\n\t\t// rubberbanding. This is required eg. in ExtJs to hide the\n\t\t// current context menu. In mouseMove we'll make sure we're\n\t\t// not selecting anything while we're rubberbanding.\n\t\tme.consume(false);\n\t}\n};\n\n/**\n * Function: start\n * \n * Sets the start point for the rubberband selection.\n */\nmxRubberband.prototype.start = function(x, y)\n{\n\tthis.first = new mxPoint(x, y);\n\n\tvar container = this.graph.container;\n\t\n\tfunction createMouseEvent(evt)\n\t{\n\t\tvar me = new mxMouseEvent(evt);\n\t\tvar pt = mxUtils.convertPoint(container, me.getX(), me.getY());\n\t\t\n\t\tme.graphX = pt.x;\n\t\tme.graphY = pt.y;\n\t\t\n\t\treturn me;\n\t};\n\n\tthis.dragHandler = mxUtils.bind(this, function(evt)\n\t{\n\t\tthis.mouseMove(this.graph, createMouseEvent(evt));\n\t});\n\n\tthis.dropHandler = mxUtils.bind(this, function(evt)\n\t{\n\t\tthis.mouseUp(this.graph, createMouseEvent(evt));\n\t});\n\n\t// Workaround for rubberband stopping if the mouse leaves the container in Firefox\n\tif (mxClient.IS_FF)\n\t{\n\t\tmxEvent.addGestureListeners(document, null, this.dragHandler, this.dropHandler);\n\t}\n};\n\n/**\n * Function: mouseMove\n * \n * Handles the event by updating therubberband selection.\n */\nmxRubberband.prototype.mouseMove = function(sender, me)\n{\n\tif (!me.isConsumed() && this.first != null)\n\t{\n\t\tvar origin = mxUtils.getScrollOrigin(this.graph.container);\n\t\tvar offset = mxUtils.getOffset(this.graph.container);\n\t\torigin.x -= offset.x;\n\t\torigin.y -= offset.y;\n\t\tvar x = me.getX() + origin.x;\n\t\tvar y = me.getY() + origin.y;\n\t\tvar dx = this.first.x - x;\n\t\tvar dy = this.first.y - y;\n\t\tvar tol = this.graph.tolerance;\n\t\t\n\t\tif (this.div != null || Math.abs(dx) > tol ||  Math.abs(dy) > tol)\n\t\t{\n\t\t\tif (this.div == null)\n\t\t\t{\n\t\t\t\tthis.div = this.createShape();\n\t\t\t}\n\t\t\t\n\t\t\t// Clears selection while rubberbanding. This is required because\n\t\t\t// the event is not consumed in mouseDown.\n\t\t\tmxUtils.clearSelection();\n\t\t\t\n\t\t\tthis.update(x, y);\n\t\t\tme.consume();\n\t\t}\n\t}\n};\n\n/**\n * Function: createShape\n * \n * Creates the rubberband selection shape.\n */\nmxRubberband.prototype.createShape = function()\n{\n\tif (this.sharedDiv == null)\n\t{\n\t\tthis.sharedDiv = document.createElement('div');\n\t\tthis.sharedDiv.className = 'mxRubberband';\n\t\tmxUtils.setOpacity(this.sharedDiv, this.defaultOpacity);\n\t}\n\n\tthis.graph.container.appendChild(this.sharedDiv);\n\tvar result = this.sharedDiv;\n\t\n\tif (mxClient.IS_SVG && (!mxClient.IS_IE || document.documentMode >= 10) && this.fadeOut)\n\t{\n\t\tthis.sharedDiv = null;\n\t}\n\t\t\n\treturn result;\n};\n\n/**\n * Function: isActive\n * \n * Returns true if this handler is active.\n */\nmxRubberband.prototype.isActive = function(sender, me)\n{\n\treturn this.div != null && this.div.style.display != 'none';\n};\n\n/**\n * Function: mouseUp\n * \n * Handles the event by selecting the region of the rubberband using\n * <mxGraph.selectRegion>.\n */\nmxRubberband.prototype.mouseUp = function(sender, me)\n{\n\tvar active = this.isActive();\n\tthis.reset();\n\t\n\tif (active)\n\t{\n\t\tthis.execute(me.getEvent());\n\t\tme.consume();\n\t}\n};\n\n/**\n * Function: execute\n * \n * Resets the state of this handler and selects the current region\n * for the given event.\n */\nmxRubberband.prototype.execute = function(evt)\n{\n\tvar rect = new mxRectangle(this.x, this.y, this.width, this.height);\n\tthis.graph.selectRegion(rect, evt);\n};\n\n/**\n * Function: reset\n * \n * Resets the state of the rubberband selection.\n */\nmxRubberband.prototype.reset = function()\n{\n\tif (this.div != null)\n\t{\n\t\tif (mxClient.IS_SVG && (!mxClient.IS_IE || document.documentMode >= 10) && this.fadeOut)\n\t\t{\n\t\t\tvar temp = this.div;\n\t\t\tmxUtils.setPrefixedStyle(temp.style, 'transition', 'all 0.2s linear');\n\t\t\ttemp.style.pointerEvents = 'none';\n\t\t\ttemp.style.opacity = 0;\n\t\t    \n\t\t    window.setTimeout(function()\n\t\t    \t{\n\t\t    \t\ttemp.parentNode.removeChild(temp);\n\t\t    \t}, 200);\t\n\t\t}\n\t\telse\n\t\t{\n\t\t\tthis.div.parentNode.removeChild(this.div);\n\t\t}\n\t}\n\n\tmxEvent.removeGestureListeners(document, null, this.dragHandler, this.dropHandler);\n\tthis.dragHandler = null;\n\tthis.dropHandler = null;\n\t\n\tthis.currentX = 0;\n\tthis.currentY = 0;\n\tthis.first = null;\n\tthis.div = null;\n};\n\n/**\n * Function: update\n * \n * Sets <currentX> and <currentY> and calls <repaint>.\n */\nmxRubberband.prototype.update = function(x, y)\n{\n\tthis.currentX = x;\n\tthis.currentY = y;\n\t\n\tthis.repaint();\n};\n\n/**\n * Function: repaint\n * \n * Computes the bounding box and updates the style of the <div>.\n */\nmxRubberband.prototype.repaint = function()\n{\n\tif (this.div != null)\n\t{\n\t\tvar x = this.currentX - this.graph.panDx;\n\t\tvar y = this.currentY - this.graph.panDy;\n\t\t\n\t\tthis.x = Math.min(this.first.x, x);\n\t\tthis.y = Math.min(this.first.y, y);\n\t\tthis.width = Math.max(this.first.x, x) - this.x;\n\t\tthis.height =  Math.max(this.first.y, y) - this.y;\n\n\t\tvar dx = (mxClient.IS_VML) ? this.graph.panDx : 0;\n\t\tvar dy = (mxClient.IS_VML) ? this.graph.panDy : 0;\n\t\t\n\t\tthis.div.style.left = (this.x + dx) + 'px';\n\t\tthis.div.style.top = (this.y + dy) + 'px';\n\t\tthis.div.style.width = Math.max(1, this.width) + 'px';\n\t\tthis.div.style.height = Math.max(1, this.height) + 'px';\n\t}\n};\n\n/**\n * Function: destroy\n * \n * Destroys the handler and all its resources and DOM nodes. This does\n * normally not need to be called, it is called automatically when the\n * window unloads.\n */\nmxRubberband.prototype.destroy = function()\n{\n\tif (!this.destroyed)\n\t{\n\t\tthis.destroyed = true;\n\t\tthis.graph.removeMouseListener(this);\n\t\tthis.graph.removeListener(this.forceRubberbandHandler);\n\t\tthis.graph.removeListener(this.panHandler);\n\t\tthis.reset();\n\t\t\n\t\tif (this.sharedDiv != null)\n\t\t{\n\t\t\tthis.sharedDiv = null;\n\t\t}\n\t}\n};\n"
  },
  {
    "path": "static/cherry/drawio_demo/src/js/handler/mxSelectionCellsHandler.js",
    "content": "/**\n * Copyright (c) 2006-2015, JGraph Ltd\n * Copyright (c) 2006-2015, Gaudenz Alder\n */\n/**\n * Class: mxSelectionCellsHandler\n * \n * An event handler that manages cell handlers and invokes their mouse event\n * processing functions.\n * \n * Group: Events\n * \n * Event: mxEvent.ADD\n * \n * Fires if a cell has been added to the selection. The <code>state</code>\n * property contains the <mxCellState> that has been added.\n * \n * Event: mxEvent.REMOVE\n * \n * Fires if a cell has been remove from the selection. The <code>state</code>\n * property contains the <mxCellState> that has been removed.\n * \n * Parameters:\n * \n * graph - Reference to the enclosing <mxGraph>.\n */\nfunction mxSelectionCellsHandler(graph)\n{\n\tmxEventSource.call(this);\n\t\n\tthis.graph = graph;\n\tthis.handlers = new mxDictionary();\n\tthis.graph.addMouseListener(this);\n\t\n\tthis.refreshHandler = mxUtils.bind(this, function(sender, evt)\n\t{\n\t\tif (this.isEnabled())\n\t\t{\n\t\t\tthis.refresh();\n\t\t}\n\t});\n\t\n\tthis.graph.getSelectionModel().addListener(mxEvent.CHANGE, this.refreshHandler);\n\tthis.graph.getModel().addListener(mxEvent.CHANGE, this.refreshHandler);\n\tthis.graph.getView().addListener(mxEvent.SCALE, this.refreshHandler);\n\tthis.graph.getView().addListener(mxEvent.TRANSLATE, this.refreshHandler);\n\tthis.graph.getView().addListener(mxEvent.SCALE_AND_TRANSLATE, this.refreshHandler);\n\tthis.graph.getView().addListener(mxEvent.DOWN, this.refreshHandler);\n\tthis.graph.getView().addListener(mxEvent.UP, this.refreshHandler);\n};\n\n/**\n * Extends mxEventSource.\n */\nmxUtils.extend(mxSelectionCellsHandler, mxEventSource);\n\n/**\n * Variable: graph\n * \n * Reference to the enclosing <mxGraph>.\n */\nmxSelectionCellsHandler.prototype.graph = null;\n\n/**\n * Variable: enabled\n * \n * Specifies if events are handled. Default is true.\n */\nmxSelectionCellsHandler.prototype.enabled = true;\n\n/**\n * Variable: refreshHandler\n * \n * Keeps a reference to an event listener for later removal.\n */\nmxSelectionCellsHandler.prototype.refreshHandler = null;\n\n/**\n * Variable: maxHandlers\n * \n * Defines the maximum number of handlers to paint individually. Default is 100.\n */\nmxSelectionCellsHandler.prototype.maxHandlers = 100;\n\n/**\n * Variable: handlers\n * \n * <mxDictionary> that maps from cells to handlers.\n */\nmxSelectionCellsHandler.prototype.handlers = null;\n\n/**\n * Function: isEnabled\n * \n * Returns <enabled>.\n */\nmxSelectionCellsHandler.prototype.isEnabled = function()\n{\n\treturn this.enabled;\n};\n\n/**\n * Function: setEnabled\n * \n * Sets <enabled>.\n */\nmxSelectionCellsHandler.prototype.setEnabled = function(value)\n{\n\tthis.enabled = value;\n};\n\n/**\n * Function: getHandler\n * \n * Returns the handler for the given cell.\n */\nmxSelectionCellsHandler.prototype.getHandler = function(cell)\n{\n\treturn this.handlers.get(cell);\n};\n\n/**\n * Function: reset\n * \n * Resets all handlers.\n */\nmxSelectionCellsHandler.prototype.reset = function()\n{\n\tthis.handlers.visit(function(key, handler)\n\t{\n\t\thandler.reset.apply(handler);\n\t});\n};\n\n/**\n * Function: refresh\n * \n * Reloads or updates all handlers.\n */\nmxSelectionCellsHandler.prototype.refresh = function()\n{\n\t// Removes all existing handlers\n\tvar oldHandlers = this.handlers;\n\tthis.handlers = new mxDictionary();\n\t\n\t// Creates handles for all selection cells\n\tvar tmp = this.graph.getSelectionCells();\n\n\tfor (var i = 0; i < tmp.length; i++)\n\t{\n\t\tvar state = this.graph.view.getState(tmp[i]);\n\n\t\tif (state != null)\n\t\t{\n\t\t\tvar handler = oldHandlers.remove(tmp[i]);\n\n\t\t\tif (handler != null)\n\t\t\t{\n\t\t\t\tif (handler.state != state)\n\t\t\t\t{\n\t\t\t\t\thandler.destroy();\n\t\t\t\t\thandler = null;\n\t\t\t\t}\n\t\t\t\telse if (!this.isHandlerActive(handler))\n\t\t\t\t{\n\t\t\t\t\tif (handler.refresh != null)\n\t\t\t\t\t{\n\t\t\t\t\t\thandler.refresh();\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\thandler.redraw();\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif (handler == null)\n\t\t\t{\n\t\t\t\thandler = this.graph.createHandler(state);\n\t\t\t\tthis.fireEvent(new mxEventObject(mxEvent.ADD, 'state', state));\n\t\t\t}\n\t\t\t\n\t\t\tif (handler != null)\n\t\t\t{\n\t\t\t\tthis.handlers.put(tmp[i], handler);\n\t\t\t}\n\t\t}\n\t}\n\t\n\t// Destroys all unused handlers\n\toldHandlers.visit(mxUtils.bind(this, function(key, handler)\n\t{\n\t\tthis.fireEvent(new mxEventObject(mxEvent.REMOVE, 'state', handler.state));\n\t\thandler.destroy();\n\t}));\n};\n\n/**\n * Function: isHandlerActive\n * \n * Returns true if the given handler is active and should not be redrawn.\n */\nmxSelectionCellsHandler.prototype.isHandlerActive = function(handler)\n{\n\treturn handler.index != null;\n};\n\n/**\n * Function: updateHandler\n * \n * Updates the handler for the given shape if one exists.\n */\nmxSelectionCellsHandler.prototype.updateHandler = function(state)\n{\n\tvar handler = this.handlers.remove(state.cell);\n\t\n\tif (handler != null)\n\t{\n\t\thandler.destroy();\n\t\thandler = this.graph.createHandler(state);\n\t\t\n\t\tif (handler != null)\n\t\t{\n\t\t\tthis.handlers.put(state.cell, handler);\n\t\t}\n\t}\n};\n\n/**\n * Function: mouseDown\n * \n * Redirects the given event to the handlers.\n */\nmxSelectionCellsHandler.prototype.mouseDown = function(sender, me)\n{\n\tif (this.graph.isEnabled() && this.isEnabled())\n\t{\n\t\tvar args = [sender, me];\n\n\t\tthis.handlers.visit(function(key, handler)\n\t\t{\n\t\t\thandler.mouseDown.apply(handler, args);\n\t\t});\n\t}\n};\n\n/**\n * Function: mouseMove\n * \n * Redirects the given event to the handlers.\n */\nmxSelectionCellsHandler.prototype.mouseMove = function(sender, me)\n{\n\tif (this.graph.isEnabled() && this.isEnabled())\n\t{\n\t\tvar args = [sender, me];\n\n\t\tthis.handlers.visit(function(key, handler)\n\t\t{\n\t\t\thandler.mouseMove.apply(handler, args);\n\t\t});\n\t}\n};\n\n/**\n * Function: mouseUp\n * \n * Redirects the given event to the handlers.\n */\nmxSelectionCellsHandler.prototype.mouseUp = function(sender, me)\n{\n\tif (this.graph.isEnabled() && this.isEnabled())\n\t{\n\t\tvar args = [sender, me];\n\n\t\tthis.handlers.visit(function(key, handler)\n\t\t{\n\t\t\thandler.mouseUp.apply(handler, args);\n\t\t});\n\t}\n};\n\n/**\n * Function: destroy\n * \n * Destroys the handler and all its resources and DOM nodes.\n */\nmxSelectionCellsHandler.prototype.destroy = function()\n{\n\tthis.graph.removeMouseListener(this);\n\t\n\tif (this.refreshHandler != null)\n\t{\n\t\tthis.graph.getSelectionModel().removeListener(this.refreshHandler);\n\t\tthis.graph.getModel().removeListener(this.refreshHandler);\n\t\tthis.graph.getView().removeListener(this.refreshHandler);\n\t\tthis.refreshHandler = null;\n\t}\n};\n"
  },
  {
    "path": "static/cherry/drawio_demo/src/js/handler/mxTooltipHandler.js",
    "content": "/**\n * Copyright (c) 2006-2015, JGraph Ltd\n * Copyright (c) 2006-2015, Gaudenz Alder\n */\n/**\n * Class: mxTooltipHandler\n * \n * Graph event handler that displays tooltips. <mxGraph.getTooltip> is used to\n * get the tooltip for a cell or handle. This handler is built-into\n * <mxGraph.tooltipHandler> and enabled using <mxGraph.setTooltips>.\n *\n * Example:\n * \n * (code>\n * new mxTooltipHandler(graph);\n * (end)\n * \n * Constructor: mxTooltipHandler\n * \n * Constructs an event handler that displays tooltips with the specified\n * delay (in milliseconds). If no delay is specified then a default delay\n * of 500 ms (0.5 sec) is used.\n * \n * Parameters:\n * \n * graph - Reference to the enclosing <mxGraph>.\n * delay - Optional delay in milliseconds.\n */\nfunction mxTooltipHandler(graph, delay)\n{\n\tif (graph != null)\n\t{\n\t\tthis.graph = graph;\n\t\tthis.delay = delay || 500;\n\t\tthis.graph.addMouseListener(this);\n\t}\n};\n\n/**\n * Variable: zIndex\n * \n * Specifies the zIndex for the tooltip and its shadow. Default is 10005.\n */\nmxTooltipHandler.prototype.zIndex = 10005;\n\n/**\n * Variable: graph\n * \n * Reference to the enclosing <mxGraph>.\n */\nmxTooltipHandler.prototype.graph = null;\n\n/**\n * Variable: delay\n * \n * Delay to show the tooltip in milliseconds. Default is 500.\n */\nmxTooltipHandler.prototype.delay = null;\n\n/**\n * Variable: ignoreTouchEvents\n * \n * Specifies if touch and pen events should be ignored. Default is true.\n */\nmxTooltipHandler.prototype.ignoreTouchEvents = true;\n\n/**\n * Variable: hideOnHover\n * \n * Specifies if the tooltip should be hidden if the mouse is moved over the\n * current cell. Default is false.\n */\nmxTooltipHandler.prototype.hideOnHover = false;\n\n/**\n * Variable: destroyed\n * \n * True if this handler was destroyed using <destroy>.\n */\nmxTooltipHandler.prototype.destroyed = false;\n\n/**\n * Variable: enabled\n * \n * Specifies if events are handled. Default is true.\n */\nmxTooltipHandler.prototype.enabled = true;\n\n/**\n * Function: isEnabled\n * \n * Returns true if events are handled. This implementation\n * returns <enabled>.\n */\nmxTooltipHandler.prototype.isEnabled = function()\n{\n\treturn this.enabled;\n};\n\n/**\n * Function: setEnabled\n * \n * Enables or disables event handling. This implementation\n * updates <enabled>.\n */\nmxTooltipHandler.prototype.setEnabled = function(enabled)\n{\n\tthis.enabled = enabled;\n};\n\n/**\n * Function: isHideOnHover\n * \n * Returns <hideOnHover>.\n */\nmxTooltipHandler.prototype.isHideOnHover = function()\n{\n\treturn this.hideOnHover;\n};\n\n/**\n * Function: setHideOnHover\n * \n * Sets <hideOnHover>.\n */\nmxTooltipHandler.prototype.setHideOnHover = function(value)\n{\n\tthis.hideOnHover = value;\n};\n\n/**\n * Function: init\n * \n * Initializes the DOM nodes required for this tooltip handler.\n */\nmxTooltipHandler.prototype.init = function()\n{\n\tif (document.body != null)\n\t{\n\t\tthis.div = document.createElement('div');\n\t\tthis.div.className = 'mxTooltip';\n\t\tthis.div.style.visibility = 'hidden';\n\n\t\tdocument.body.appendChild(this.div);\n\n\t\tmxEvent.addGestureListeners(this.div, mxUtils.bind(this, function(evt)\n\t\t{\n\t\t\tthis.hideTooltip();\n\t\t}));\n\t}\n};\n\n/**\n * Function: getStateForEvent\n * \n * Returns the <mxCellState> to be used for showing a tooltip for this event.\n */\nmxTooltipHandler.prototype.getStateForEvent = function(me)\n{\n\treturn me.getState();\n};\n\n/**\n * Function: mouseDown\n * \n * Handles the event by initiating a rubberband selection. By consuming the\n * event all subsequent events of the gesture are redirected to this\n * handler.\n */\nmxTooltipHandler.prototype.mouseDown = function(sender, me)\n{\n\tthis.reset(me, false);\n\tthis.hideTooltip();\n};\n\n/**\n * Function: mouseMove\n * \n * Handles the event by updating the rubberband selection.\n */\nmxTooltipHandler.prototype.mouseMove = function(sender, me)\n{\n\tif (me.getX() != this.lastX || me.getY() != this.lastY)\n\t{\n\t\tthis.reset(me, true);\n\t\tvar state = this.getStateForEvent(me);\n\t\t\n\t\tif (this.isHideOnHover() || state != this.state || (me.getSource() != this.node &&\n\t\t\t(!this.stateSource || (state != null && this.stateSource ==\n\t\t\t(me.isSource(state.shape) || !me.isSource(state.text))))))\n\t\t{\n\t\t\tthis.hideTooltip();\n\t\t}\n\t}\n\t\n\tthis.lastX = me.getX();\n\tthis.lastY = me.getY();\n};\n\n/**\n * Function: mouseUp\n * \n * Handles the event by resetting the tooltip timer or hiding the existing\n * tooltip.\n */\nmxTooltipHandler.prototype.mouseUp = function(sender, me)\n{\n\tthis.reset(me, true);\n\tthis.hideTooltip();\n};\n\n\n/**\n * Function: resetTimer\n * \n * Resets the timer.\n */\nmxTooltipHandler.prototype.resetTimer = function()\n{\n\tif (this.thread != null)\n\t{\n\t\twindow.clearTimeout(this.thread);\n\t\tthis.thread = null;\n\t}\n};\n\n/**\n * Function: reset\n * \n * Resets and/or restarts the timer to trigger the display of the tooltip.\n */\nmxTooltipHandler.prototype.reset = function(me, restart, state)\n{\n\tif (!this.ignoreTouchEvents || mxEvent.isMouseEvent(me.getEvent()))\n\t{\n\t\tthis.resetTimer();\n\t\tstate = (state != null) ? state : this.getStateForEvent(me);\n\t\t\n\t\tif (restart && this.isEnabled() && state != null && (this.div == null ||\n\t\t\tthis.div.style.visibility == 'hidden'))\n\t\t{\n\t\t\tvar node = me.getSource();\n\t\t\tvar x = me.getX();\n\t\t\tvar y = me.getY();\n\t\t\tvar stateSource = me.isSource(state.shape) || me.isSource(state.text);\n\t\n\t\t\tthis.thread = window.setTimeout(mxUtils.bind(this, function()\n\t\t\t{\n\t\t\t\tif (!this.graph.isEditing() && !this.graph.popupMenuHandler.isMenuShowing() && !this.graph.isMouseDown)\n\t\t\t\t{\n\t\t\t\t\t// Uses information from inside event cause using the event at\n\t\t\t\t\t// this (delayed) point in time is not possible in IE as it no\n\t\t\t\t\t// longer contains the required information (member not found)\n\t\t\t\t\tvar tip = this.graph.getTooltip(state, node, x, y);\n\t\t\t\t\tthis.show(tip, x, y);\n\t\t\t\t\tthis.state = state;\n\t\t\t\t\tthis.node = node;\n\t\t\t\t\tthis.stateSource = stateSource;\n\t\t\t\t}\n\t\t\t}), this.delay);\n\t\t}\n\t}\n};\n\n/**\n * Function: hide\n * \n * Hides the tooltip and resets the timer.\n */\nmxTooltipHandler.prototype.hide = function()\n{\n\tthis.resetTimer();\n\tthis.hideTooltip();\n};\n\n/**\n * Function: hideTooltip\n * \n * Hides the tooltip.\n */\nmxTooltipHandler.prototype.hideTooltip = function()\n{\n\tif (this.div != null)\n\t{\n\t\tthis.div.style.visibility = 'hidden';\n\t\tthis.div.innerHTML = '';\n\t}\n};\n\n/**\n * Function: show\n * \n * Shows the tooltip for the specified cell and optional index at the\n * specified location (with a vertical offset of 10 pixels).\n */\nmxTooltipHandler.prototype.show = function(tip, x, y)\n{\n\tif (!this.destroyed && tip != null && tip.length > 0)\n\t{\n\t\t// Initializes the DOM nodes if required\n\t\tif (this.div == null)\n\t\t{\n\t\t\tthis.init();\n\t\t}\n\t\t\n\t\tvar origin = mxUtils.getScrollOrigin();\n\n\t\tthis.div.style.zIndex = this.zIndex;\n\t\tthis.div.style.left = (x + origin.x) + 'px';\n\t\tthis.div.style.top = (y + mxConstants.TOOLTIP_VERTICAL_OFFSET +\n\t\t\torigin.y) + 'px';\n\n\t\tif (!mxUtils.isNode(tip))\n\t\t{\t\n\t\t\tthis.div.innerHTML = tip.replace(/\\n/g, '<br>');\n\t\t}\n\t\telse\n\t\t{\n\t\t\tthis.div.innerHTML = '';\n\t\t\tthis.div.appendChild(tip);\n\t\t}\n\t\t\n\t\tthis.div.style.visibility = '';\n\t\tmxUtils.fit(this.div);\n\t}\n};\n\n/**\n * Function: destroy\n * \n * Destroys the handler and all its resources and DOM nodes.\n */\nmxTooltipHandler.prototype.destroy = function()\n{\n\tif (!this.destroyed)\n\t{\n\t\tthis.graph.removeMouseListener(this);\n\t\tmxEvent.release(this.div);\n\t\t\n\t\tif (this.div != null && this.div.parentNode != null)\n\t\t{\n\t\t\tthis.div.parentNode.removeChild(this.div);\n\t\t}\n\t\t\n\t\tthis.destroyed = true;\n\t\tthis.div = null;\n\t}\n};\n"
  },
  {
    "path": "static/cherry/drawio_demo/src/js/handler/mxVertexHandler.js",
    "content": "/**\n * Copyright (c) 2006-2015, JGraph Ltd\n * Copyright (c) 2006-2015, Gaudenz Alder\n */\n/**\n * Class: mxVertexHandler\n * \n * Event handler for resizing cells. This handler is automatically created in\n * <mxGraph.createHandler>.\n * \n * Constructor: mxVertexHandler\n * \n * Constructs an event handler that allows to resize vertices\n * and groups.\n * \n * Parameters:\n * \n * state - <mxCellState> of the cell to be resized.\n */\nfunction mxVertexHandler(state)\n{\n\tif (state != null)\n\t{\n\t\tthis.state = state;\n\t\tthis.init();\n\t\t\n\t\t// Handles escape keystrokes\n\t\tthis.escapeHandler = mxUtils.bind(this, function(sender, evt)\n\t\t{\n\t\t\tif (this.livePreview && this.index != null)\n\t\t\t{\n\t\t\t\t// Redraws the live preview\n\t\t\t\tthis.state.view.graph.cellRenderer.redraw(this.state, true);\n\t\t\t\t\n\t\t\t\t// Redraws connected edges\n\t\t\t\tthis.state.view.invalidate(this.state.cell);\n\t\t\t\tthis.state.invalid = false;\n\t\t\t\tthis.state.view.validate();\n\t\t\t}\n\t\t\t\n\t\t\tthis.reset();\n\t\t});\n\t\t\n\t\tthis.state.view.graph.addListener(mxEvent.ESCAPE, this.escapeHandler);\n\t}\n};\n\n/**\n * Variable: graph\n * \n * Reference to the enclosing <mxGraph>.\n */\nmxVertexHandler.prototype.graph = null;\n\n/**\n * Variable: state\n * \n * Reference to the <mxCellState> being modified.\n */\nmxVertexHandler.prototype.state = null;\n\n/**\n * Variable: singleSizer\n * \n * Specifies if only one sizer handle at the bottom, right corner should be\n * used. Default is false.\n */\nmxVertexHandler.prototype.singleSizer = false;\n\n/**\n * Variable: index\n * \n * Holds the index of the current handle.\n */\nmxVertexHandler.prototype.index = null;\n\n/**\n * Variable: allowHandleBoundsCheck\n * \n * Specifies if the bounds of handles should be used for hit-detection in IE or\n * if <tolerance> > 0. Default is true.\n */\nmxVertexHandler.prototype.allowHandleBoundsCheck = true;\n\n/**\n * Variable: handleImage\n * \n * Optional <mxImage> to be used as handles. Default is null.\n */\nmxVertexHandler.prototype.handleImage = null;\n\n/**\n * Variable: tolerance\n * \n * Optional tolerance for hit-detection in <getHandleForEvent>. Default is 0.\n */\nmxVertexHandler.prototype.tolerance = 0;\n\n/**\n * Variable: rotationEnabled\n * \n * Specifies if a rotation handle should be visible. Default is false.\n */\nmxVertexHandler.prototype.rotationEnabled = false;\n\n/**\n * Variable: parentHighlightEnabled\n * \n * Specifies if the parent should be highlighted if a child cell is selected.\n * Default is false.\n */\nmxVertexHandler.prototype.parentHighlightEnabled = false;\n\n/**\n * Variable: rotationRaster\n * \n * Specifies if rotation steps should be \"rasterized\" depening on the distance\n * to the handle. Default is true.\n */\nmxVertexHandler.prototype.rotationRaster = true;\n\n/**\n * Variable: rotationCursor\n * \n * Specifies the cursor for the rotation handle. Default is 'crosshair'.\n */\nmxVertexHandler.prototype.rotationCursor = 'crosshair';\n\n/**\n * Variable: livePreview\n * \n * Specifies if resize should change the cell in-place. This is an experimental\n * feature for non-touch devices. Default is false.\n */\nmxVertexHandler.prototype.livePreview = false;\n\n/**\n * Variable: manageSizers\n * \n * Specifies if sizers should be hidden and spaced if the vertex is small.\n * Default is false.\n */\nmxVertexHandler.prototype.manageSizers = false;\n\n/**\n * Variable: constrainGroupByChildren\n * \n * Specifies if the size of groups should be constrained by the children.\n * Default is false.\n */\nmxVertexHandler.prototype.constrainGroupByChildren = false;\n\n/**\n * Variable: rotationHandleVSpacing\n * \n * Vertical spacing for rotation icon. Default is -16.\n */\nmxVertexHandler.prototype.rotationHandleVSpacing = -16;\n\n/**\n * Variable: horizontalOffset\n * \n * The horizontal offset for the handles. This is updated in <redrawHandles>\n * if <manageSizers> is true and the sizers are offset horizontally.\n */\nmxVertexHandler.prototype.horizontalOffset = 0;\n\n/**\n * Variable: verticalOffset\n * \n * The horizontal offset for the handles. This is updated in <redrawHandles>\n * if <manageSizers> is true and the sizers are offset vertically.\n */\nmxVertexHandler.prototype.verticalOffset = 0;\n\n/**\n * Function: init\n * \n * Initializes the shapes required for this vertex handler.\n */\nmxVertexHandler.prototype.init = function()\n{\n\tthis.graph = this.state.view.graph;\n\tthis.selectionBounds = this.getSelectionBounds(this.state);\n\tthis.bounds = new mxRectangle(this.selectionBounds.x, this.selectionBounds.y, this.selectionBounds.width, this.selectionBounds.height);\n\tthis.selectionBorder = this.createSelectionShape(this.bounds);\n\t// VML dialect required here for event transparency in IE\n\tthis.selectionBorder.dialect = (this.graph.dialect != mxConstants.DIALECT_SVG) ? mxConstants.DIALECT_VML : mxConstants.DIALECT_SVG;\n\tthis.selectionBorder.pointerEvents = false;\n\tthis.selectionBorder.rotation = Number(this.state.style[mxConstants.STYLE_ROTATION] || '0');\n\tthis.selectionBorder.init(this.graph.getView().getOverlayPane());\n\tmxEvent.redirectMouseEvents(this.selectionBorder.node, this.graph, this.state);\n\t\n\tif (this.graph.isCellMovable(this.state.cell))\n\t{\n\t\tthis.selectionBorder.setCursor(mxConstants.CURSOR_MOVABLE_VERTEX);\n\t}\n\n\t// Adds the sizer handles\n\tif (mxGraphHandler.prototype.maxCells <= 0 || this.graph.getSelectionCount() < mxGraphHandler.prototype.maxCells)\n\t{\n\t\tvar resizable = this.graph.isCellResizable(this.state.cell);\n\t\tthis.sizers = [];\n\n\t\tif (resizable || (this.graph.isLabelMovable(this.state.cell) &&\n\t\t\tthis.state.width >= 2 && this.state.height >= 2))\n\t\t{\n\t\t\tvar i = 0;\n\n\t\t\tif (resizable)\n\t\t\t{\n\t\t\t\tif (!this.singleSizer)\n\t\t\t\t{\n\t\t\t\t\tthis.sizers.push(this.createSizer('nw-resize', i++));\n\t\t\t\t\tthis.sizers.push(this.createSizer('n-resize', i++));\n\t\t\t\t\tthis.sizers.push(this.createSizer('ne-resize', i++));\n\t\t\t\t\tthis.sizers.push(this.createSizer('w-resize', i++));\n\t\t\t\t\tthis.sizers.push(this.createSizer('e-resize', i++));\n\t\t\t\t\tthis.sizers.push(this.createSizer('sw-resize', i++));\n\t\t\t\t\tthis.sizers.push(this.createSizer('s-resize', i++));\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tthis.sizers.push(this.createSizer('se-resize', i++));\n\t\t\t}\n\t\t\t\n\t\t\tvar geo = this.graph.model.getGeometry(this.state.cell);\n\t\t\t\n\t\t\tif (geo != null && !geo.relative && !this.graph.isSwimlane(this.state.cell) &&\n\t\t\t\tthis.graph.isLabelMovable(this.state.cell))\n\t\t\t{\n\t\t\t\t// Marks this as the label handle for getHandleForEvent\n\t\t\t\tthis.labelShape = this.createSizer(mxConstants.CURSOR_LABEL_HANDLE, mxEvent.LABEL_HANDLE, mxConstants.LABEL_HANDLE_SIZE, mxConstants.LABEL_HANDLE_FILLCOLOR);\n\t\t\t\tthis.sizers.push(this.labelShape);\n\t\t\t}\n\t\t}\n\t\telse if (this.graph.isCellMovable(this.state.cell) && !this.graph.isCellResizable(this.state.cell) &&\n\t\t\tthis.state.width < 2 && this.state.height < 2)\n\t\t{\n\t\t\tthis.labelShape = this.createSizer(mxConstants.CURSOR_MOVABLE_VERTEX,\n\t\t\t\tmxEvent.LABEL_HANDLE, null, mxConstants.LABEL_HANDLE_FILLCOLOR);\n\t\t\tthis.sizers.push(this.labelShape);\n\t\t}\n\t}\n\t\n\t// Adds the rotation handler\n\tif (this.isRotationHandleVisible())\n\t{\n\t\tthis.rotationShape = this.createSizer(this.rotationCursor, mxEvent.ROTATION_HANDLE,\n\t\t\tmxConstants.HANDLE_SIZE + 3, mxConstants.HANDLE_FILLCOLOR);\n\t\tthis.sizers.push(this.rotationShape);\n\t}\n\n\tthis.customHandles = this.createCustomHandles();\n\tthis.redraw();\n\t\n\tif (this.constrainGroupByChildren)\n\t{\n\t\tthis.updateMinBounds();\n\t}\n};\n\n/**\n * Function: isRotationHandleVisible\n * \n * Returns true if the rotation handle should be showing.\n */\nmxVertexHandler.prototype.isRotationHandleVisible = function()\n{\n\treturn this.graph.isEnabled() && this.rotationEnabled && this.graph.isCellRotatable(this.state.cell) &&\n\t\t(mxGraphHandler.prototype.maxCells <= 0 || this.graph.getSelectionCount() < mxGraphHandler.prototype.maxCells) &&\n\t\tthis.state.width >= 2 && this.state.height >= 2;\n};\n\n/**\n * Function: isConstrainedEvent\n * \n * Returns true if the aspect ratio if the cell should be maintained.\n */\nmxVertexHandler.prototype.isConstrainedEvent = function(me)\n{\n\treturn mxEvent.isShiftDown(me.getEvent()) || this.state.style[mxConstants.STYLE_ASPECT] == 'fixed';\n};\n\n/**\n * Function: isCenteredEvent\n * \n * Returns true if the center of the vertex should be maintained during the resize.\n */\nmxVertexHandler.prototype.isCenteredEvent = function(state, me)\n{\n\treturn false;\n};\n\n/**\n * Function: createCustomHandles\n * \n * Returns an array of custom handles. This implementation returns null.\n */\nmxVertexHandler.prototype.createCustomHandles = function()\n{\n\treturn null;\n};\n\n/**\n * Function: updateMinBounds\n * \n * Initializes the shapes required for this vertex handler.\n */\nmxVertexHandler.prototype.updateMinBounds = function()\n{\n\tvar children = this.graph.getChildCells(this.state.cell);\n\t\n\tif (children.length > 0)\n\t{\n\t\tthis.minBounds = this.graph.view.getBounds(children);\n\t\t\n\t\tif (this.minBounds != null)\n\t\t{\n\t\t\tvar s = this.state.view.scale;\n\t\t\tvar t = this.state.view.translate;\n\n\t\t\tthis.minBounds.x -= this.state.x;\n\t\t\tthis.minBounds.y -= this.state.y;\n\t\t\tthis.minBounds.x /= s;\n\t\t\tthis.minBounds.y /= s;\n\t\t\tthis.minBounds.width /= s;\n\t\t\tthis.minBounds.height /= s;\n\t\t\tthis.x0 = this.state.x / s - t.x;\n\t\t\tthis.y0 = this.state.y / s - t.y;\n\t\t}\n\t}\n};\n\n/**\n * Function: getSelectionBounds\n * \n * Returns the mxRectangle that defines the bounds of the selection\n * border.\n */\nmxVertexHandler.prototype.getSelectionBounds = function(state)\n{\n\treturn new mxRectangle(Math.round(state.x), Math.round(state.y), Math.round(state.width), Math.round(state.height));\n};\n\n/**\n * Function: createParentHighlightShape\n * \n * Creates the shape used to draw the selection border.\n */\nmxVertexHandler.prototype.createParentHighlightShape = function(bounds)\n{\n\treturn this.createSelectionShape(bounds);\n};\n\n/**\n * Function: createSelectionShape\n * \n * Creates the shape used to draw the selection border.\n */\nmxVertexHandler.prototype.createSelectionShape = function(bounds)\n{\n\tvar shape = new mxRectangleShape(bounds, null, this.getSelectionColor());\n\tshape.strokewidth = this.getSelectionStrokeWidth();\n\tshape.isDashed = this.isSelectionDashed();\n\t\n\treturn shape;\n};\n\n/**\n * Function: getSelectionColor\n * \n * Returns <mxConstants.VERTEX_SELECTION_COLOR>.\n */\nmxVertexHandler.prototype.getSelectionColor = function()\n{\n\treturn mxConstants.VERTEX_SELECTION_COLOR;\n};\n\n/**\n * Function: getSelectionStrokeWidth\n * \n * Returns <mxConstants.VERTEX_SELECTION_STROKEWIDTH>.\n */\nmxVertexHandler.prototype.getSelectionStrokeWidth = function()\n{\n\treturn mxConstants.VERTEX_SELECTION_STROKEWIDTH;\n};\n\n/**\n * Function: isSelectionDashed\n * \n * Returns <mxConstants.VERTEX_SELECTION_DASHED>.\n */\nmxVertexHandler.prototype.isSelectionDashed = function()\n{\n\treturn mxConstants.VERTEX_SELECTION_DASHED;\n};\n\n/**\n * Function: createSizer\n * \n * Creates a sizer handle for the specified cursor and index and returns\n * the new <mxRectangleShape> that represents the handle.\n */\nmxVertexHandler.prototype.createSizer = function(cursor, index, size, fillColor)\n{\n\tsize = size || mxConstants.HANDLE_SIZE;\n\t\n\tvar bounds = new mxRectangle(0, 0, size, size);\n\tvar sizer = this.createSizerShape(bounds, index, fillColor);\n\n\tif (sizer.isHtmlAllowed() && this.state.text != null && this.state.text.node.parentNode == this.graph.container)\n\t{\n\t\tsizer.bounds.height -= 1;\n\t\tsizer.bounds.width -= 1;\n\t\tsizer.dialect = mxConstants.DIALECT_STRICTHTML;\n\t\tsizer.init(this.graph.container);\n\t}\n\telse\n\t{\n\t\tsizer.dialect = (this.graph.dialect != mxConstants.DIALECT_SVG) ?\n\t\t\t\tmxConstants.DIALECT_MIXEDHTML : mxConstants.DIALECT_SVG;\n\t\tsizer.init(this.graph.getView().getOverlayPane());\n\t}\n\n\tmxEvent.redirectMouseEvents(sizer.node, this.graph, this.state);\n\t\n\tif (this.graph.isEnabled())\n\t{\n\t\tsizer.setCursor(cursor);\n\t}\n\t\n\tif (!this.isSizerVisible(index))\n\t{\n\t\tsizer.visible = false;\n\t}\n\t\n\treturn sizer;\n};\n\n/**\n * Function: isSizerVisible\n * \n * Returns true if the sizer for the given index is visible.\n * This returns true for all given indices.\n */\nmxVertexHandler.prototype.isSizerVisible = function(index)\n{\n\treturn true;\n};\n\n/**\n * Function: createSizerShape\n * \n * Creates the shape used for the sizer handle for the specified bounds an\n * index. Only images and rectangles should be returned if support for HTML\n * labels with not foreign objects is required.\n */\nmxVertexHandler.prototype.createSizerShape = function(bounds, index, fillColor)\n{\n\tif (this.handleImage != null)\n\t{\n\t\tbounds = new mxRectangle(bounds.x, bounds.y, this.handleImage.width, this.handleImage.height);\n\t\tvar shape = new mxImageShape(bounds, this.handleImage.src);\n\t\t\n\t\t// Allows HTML rendering of the images\n\t\tshape.preserveImageAspect = false;\n\n\t\treturn shape;\n\t}\n\telse if (index == mxEvent.ROTATION_HANDLE)\n\t{\n\t\treturn new mxEllipse(bounds, fillColor || mxConstants.HANDLE_FILLCOLOR, mxConstants.HANDLE_STROKECOLOR);\n\t}\n\telse\n\t{\n\t\treturn new mxRectangleShape(bounds, fillColor || mxConstants.HANDLE_FILLCOLOR, mxConstants.HANDLE_STROKECOLOR);\n\t}\n};\n\n/**\n * Function: createBounds\n * \n * Helper method to create an <mxRectangle> around the given centerpoint\n * with a width and height of 2*s or 6, if no s is given.\n */\nmxVertexHandler.prototype.moveSizerTo = function(shape, x, y)\n{\n\tif (shape != null)\n\t{\n\t\tshape.bounds.x = Math.floor(x - shape.bounds.width / 2);\n\t\tshape.bounds.y = Math.floor(y - shape.bounds.height / 2);\n\t\t\n\t\t// Fixes visible inactive handles in VML\n\t\tif (shape.node != null && shape.node.style.display != 'none')\n\t\t{\n\t\t\tshape.redraw();\n\t\t}\n\t}\n};\n\n/**\n * Function: getHandleForEvent\n * \n * Returns the index of the handle for the given event. This returns the index\n * of the sizer from where the event originated or <mxEvent.LABEL_INDEX>.\n */\nmxVertexHandler.prototype.getHandleForEvent = function(me)\n{\n\t// Connection highlight may consume events before they reach sizer handle\n\tvar tol = (!mxEvent.isMouseEvent(me.getEvent())) ? this.tolerance : 1;\n\tvar hit = (this.allowHandleBoundsCheck && (mxClient.IS_IE || tol > 0)) ?\n\t\tnew mxRectangle(me.getGraphX() - tol, me.getGraphY() - tol, 2 * tol, 2 * tol) : null;\n\t\n\tfunction checkShape(shape)\n\t{\n\t\treturn shape != null && (me.isSource(shape) || (hit != null && mxUtils.intersects(shape.bounds, hit) &&\n\t\t\tshape.node.style.display != 'none' && shape.node.style.visibility != 'hidden'));\n\t}\n\n\tif (this.customHandles != null && this.isCustomHandleEvent(me))\n\t{\n\t\t// Inverse loop order to match display order\n\t\tfor (var i = this.customHandles.length - 1; i >= 0; i--)\n\t\t{\n\t\t\tif (checkShape(this.customHandles[i].shape))\n\t\t\t{\n\t\t\t\t// LATER: Return reference to active shape\n\t\t\t\treturn mxEvent.CUSTOM_HANDLE - i;\n\t\t\t}\n\t\t}\n\t}\n\n\tif (checkShape(this.rotationShape))\n\t{\n\t\treturn mxEvent.ROTATION_HANDLE;\n\t}\n\telse if (checkShape(this.labelShape))\n\t{\n\t\treturn mxEvent.LABEL_HANDLE;\n\t}\n\t\n\tif (this.sizers != null)\n\t{\n\t\tfor (var i = 0; i < this.sizers.length; i++)\n\t\t{\n\t\t\tif (checkShape(this.sizers[i]))\n\t\t\t{\n\t\t\t\treturn i;\n\t\t\t}\n\t\t}\n\t}\n\n\treturn null;\n};\n\n/**\n * Function: isCustomHandleEvent\n * \n * Returns true if the given event allows custom handles to be changed. This\n * implementation returns true.\n */\nmxVertexHandler.prototype.isCustomHandleEvent = function(me)\n{\n\treturn true;\n};\n\n/**\n * Function: mouseDown\n * \n * Handles the event if a handle has been clicked. By consuming the\n * event all subsequent events of the gesture are redirected to this\n * handler.\n */\nmxVertexHandler.prototype.mouseDown = function(sender, me)\n{\n\tvar tol = (!mxEvent.isMouseEvent(me.getEvent())) ? this.tolerance : 0;\n\t\n\tif (!me.isConsumed() && this.graph.isEnabled() && (tol > 0 || me.getState() == this.state))\n\t{\n\t\tvar handle = this.getHandleForEvent(me);\n\n\t\tif (handle != null)\n\t\t{\n\t\t\tthis.start(me.getGraphX(), me.getGraphY(), handle);\n\t\t\tme.consume();\n\t\t}\n\t}\n};\n\n/**\n * Function: isLivePreviewBorder\n * \n * Called if <livePreview> is enabled to check if a border should be painted.\n * This implementation returns true if the shape is transparent.\n */\nmxVertexHandler.prototype.isLivePreviewBorder = function()\n{\n\treturn this.state.shape != null && this.state.shape.fill == null && this.state.shape.stroke == null;\n};\n\n/**\n * Function: start\n * \n * Starts the handling of the mouse gesture.\n */\nmxVertexHandler.prototype.start = function(x, y, index)\n{\n\tthis.inTolerance = true;\n\tthis.childOffsetX = 0;\n\tthis.childOffsetY = 0;\n\tthis.index = index;\n\tthis.startX = x;\n\tthis.startY = y;\n\t\n\t// Saves reference to parent state\n\tvar model = this.state.view.graph.model;\n\tvar parent = model.getParent(this.state.cell);\n\t\n\tif (this.state.view.currentRoot != parent && (model.isVertex(parent) || model.isEdge(parent)))\n\t{\n\t\tthis.parentState = this.state.view.graph.view.getState(parent);\n\t}\n\t\n\t// Creates a preview that can be on top of any HTML label\n\tthis.selectionBorder.node.style.display = (index == mxEvent.ROTATION_HANDLE) ? 'inline' : 'none';\n\t\n\t// Creates the border that represents the new bounds\n\tif (!this.livePreview || this.isLivePreviewBorder())\n\t{\n\t\tthis.preview = this.createSelectionShape(this.bounds);\n\t\t\n\t\tif (!(mxClient.IS_SVG && Number(this.state.style[mxConstants.STYLE_ROTATION] || '0') != 0) &&\n\t\t\tthis.state.text != null && this.state.text.node.parentNode == this.graph.container)\n\t\t{\n\t\t\tthis.preview.dialect = mxConstants.DIALECT_STRICTHTML;\n\t\t\tthis.preview.init(this.graph.container);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tthis.preview.dialect = (this.graph.dialect != mxConstants.DIALECT_SVG) ?\n\t\t\t\t\tmxConstants.DIALECT_VML : mxConstants.DIALECT_SVG;\n\t\t\tthis.preview.init(this.graph.view.getOverlayPane());\n\t\t}\n\t}\n\t\n\t// Prepares the handles for live preview\n\tif (this.livePreview)\n\t{\n\t\tthis.hideSizers();\n\t\t\n\t\tif (index == mxEvent.ROTATION_HANDLE)\n\t\t{\n\t\t\tthis.rotationShape.node.style.display = '';\n\t\t}\n\t\telse if (index == mxEvent.LABEL_HANDLE)\n\t\t{\n\t\t\tthis.labelShape.node.style.display = '';\n\t\t}\n\t\telse if (this.sizers != null && this.sizers[index] != null)\n\t\t{\n\t\t\tthis.sizers[index].node.style.display = '';\n\t\t}\n\t\telse if (index <= mxEvent.CUSTOM_HANDLE && this.customHandles != null)\n\t\t{\n\t\t\tthis.customHandles[mxEvent.CUSTOM_HANDLE - index].setVisible(true);\n\t\t}\n\t\t\n\t\t// Gets the array of connected edge handlers for redrawing\n\t\tvar edges = this.graph.getEdges(this.state.cell);\n\t\tthis.edgeHandlers = [];\n\t\t\n\t\tfor (var i = 0; i < edges.length; i++)\n\t\t{\n\t\t\tvar handler = this.graph.selectionCellsHandler.getHandler(edges[i]);\n\t\t\t\n\t\t\tif (handler != null)\n\t\t\t{\n\t\t\t\tthis.edgeHandlers.push(handler);\n\t\t\t}\n\t\t}\n\t}\n};\n\n/**\n * Function: hideHandles\n * \n * Shortcut to <hideSizers>.\n */\nmxVertexHandler.prototype.setHandlesVisible = function(visible)\n{\n\tif (this.sizers != null)\n\t{\n\t\tfor (var i = 0; i < this.sizers.length; i++)\n\t\t{\n\t\t\tthis.sizers[i].node.style.display = (visible) ? '' : 'none';\n\t\t}\n\t}\n\n\tif (this.customHandles != null)\n\t{\n\t\tfor (var i = 0; i < this.customHandles.length; i++)\n\t\t{\n\t\t\tthis.customHandles[i].setVisible(visible);\n\t\t}\n\t}\n};\n\n/**\n * Function: hideSizers\n * \n * Hides all sizers except.\n * \n * Starts the handling of the mouse gesture.\n */\nmxVertexHandler.prototype.hideSizers = function()\n{\n\tthis.setHandlesVisible(false);\n};\n\n/**\n * Function: checkTolerance\n * \n * Checks if the coordinates for the given event are within the\n * <mxGraph.tolerance>. If the event is a mouse event then the tolerance is\n * ignored.\n */\nmxVertexHandler.prototype.checkTolerance = function(me)\n{\n\tif (this.inTolerance && this.startX != null && this.startY != null)\n\t{\n\t\tif (mxEvent.isMouseEvent(me.getEvent()) ||\n\t\t\tMath.abs(me.getGraphX() - this.startX) > this.graph.tolerance ||\n\t\t\tMath.abs(me.getGraphY() - this.startY) > this.graph.tolerance)\n\t\t{\n\t\t\tthis.inTolerance = false;\n\t\t}\n\t}\n};\n\n/**\n * Function: updateHint\n * \n * Hook for subclassers do show details while the handler is active.\n */\nmxVertexHandler.prototype.updateHint = function(me) { };\n\n/**\n * Function: removeHint\n * \n * Hooks for subclassers to hide details when the handler gets inactive.\n */\nmxVertexHandler.prototype.removeHint = function() { };\n\n/**\n * Function: roundAngle\n * \n * Hook for rounding the angle. This uses Math.round.\n */\nmxVertexHandler.prototype.roundAngle = function(angle)\n{\n\treturn Math.round(angle * 10) / 10;\n};\n\n/**\n * Function: roundLength\n * \n * Hook for rounding the unscaled width or height. This uses Math.round.\n */\nmxVertexHandler.prototype.roundLength = function(length)\n{\n\treturn Math.round(length);\n};\n\n/**\n * Function: mouseMove\n * \n * Handles the event by updating the preview.\n */\nmxVertexHandler.prototype.mouseMove = function(sender, me)\n{\n\tif (!me.isConsumed() && this.index != null)\n\t{\n\t\t// Checks tolerance for ignoring single clicks\n\t\tthis.checkTolerance(me);\n\n\t\tif (!this.inTolerance)\n\t\t{\n\t\t\tif (this.index <= mxEvent.CUSTOM_HANDLE)\n\t\t\t{\n\t\t\t\tif (this.customHandles != null)\n\t\t\t\t{\n\t\t\t\t\tthis.customHandles[mxEvent.CUSTOM_HANDLE - this.index].processEvent(me);\n\t\t\t\t\tthis.customHandles[mxEvent.CUSTOM_HANDLE - this.index].active = true;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if (this.index == mxEvent.LABEL_HANDLE)\n\t\t\t{\n\t\t\t\tthis.moveLabel(me);\n\t\t\t}\n\t\t\telse if (this.index == mxEvent.ROTATION_HANDLE)\n\t\t\t{\n\t\t\t\tthis.rotateVertex(me);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tthis.resizeVertex(me);\n\t\t\t}\n\n\t\t\tthis.updateHint(me);\n\t\t}\n\t\t\n\t\tme.consume();\n\t}\n\t// Workaround for disabling the connect highlight when over handle\n\telse if (!this.graph.isMouseDown && this.getHandleForEvent(me) != null)\n\t{\n\t\tme.consume(false);\n\t}\n};\n\n/**\n * Function: rotateVertex\n * \n * Rotates the vertex.\n */\nmxVertexHandler.prototype.moveLabel = function(me)\n{\n\tvar point = new mxPoint(me.getGraphX(), me.getGraphY());\n\tvar tr = this.graph.view.translate;\n\tvar scale = this.graph.view.scale;\n\t\n\tif (this.graph.isGridEnabledEvent(me.getEvent()))\n\t{\n\t\tpoint.x = (this.graph.snap(point.x / scale - tr.x) + tr.x) * scale;\n\t\tpoint.y = (this.graph.snap(point.y / scale - tr.y) + tr.y) * scale;\n\t}\n\n\tvar index = (this.rotationShape != null) ? this.sizers.length - 2 : this.sizers.length - 1;\n\tthis.moveSizerTo(this.sizers[index], point.x, point.y);\n};\n\n/**\n * Function: rotateVertex\n * \n * Rotates the vertex.\n */\nmxVertexHandler.prototype.rotateVertex = function(me)\n{\n\tvar point = new mxPoint(me.getGraphX(), me.getGraphY());\n\tvar dx = this.state.x + this.state.width / 2 - point.x;\n\tvar dy = this.state.y + this.state.height / 2 - point.y;\n\tthis.currentAlpha = (dx != 0) ? Math.atan(dy / dx) * 180 / Math.PI + 90 : ((dy < 0) ? 180 : 0);\n\t\n\tif (dx > 0)\n\t{\n\t\tthis.currentAlpha -= 180;\n\t}\n\n\t// Rotation raster\n\tif (this.rotationRaster && this.graph.isGridEnabledEvent(me.getEvent()))\n\t{\n\t\tvar dx = point.x - this.state.getCenterX();\n\t\tvar dy = point.y - this.state.getCenterY();\n\t\tvar dist = Math.abs(Math.sqrt(dx * dx + dy * dy) - 20) * 3;\n\t\tvar raster = Math.max(1, 5 * Math.min(3, Math.max(0, Math.round(80 / Math.abs(dist)))));\n\t\t\n\t\tthis.currentAlpha = Math.round(this.currentAlpha / raster) * raster;\n\t}\n\telse\n\t{\n\t\tthis.currentAlpha = this.roundAngle(this.currentAlpha);\n\t}\n\n\tthis.selectionBorder.rotation = this.currentAlpha;\n\tthis.selectionBorder.redraw();\n\t\t\t\t\t\n\tif (this.livePreview)\n\t{\n\t\tthis.redrawHandles();\n\t}\n};\n\n/**\n * Function: rotateVertex\n * \n * Rotates the vertex.\n */\nmxVertexHandler.prototype.resizeVertex = function(me)\n{\n\tvar ct = new mxPoint(this.state.getCenterX(), this.state.getCenterY());\n\tvar alpha = mxUtils.toRadians(this.state.style[mxConstants.STYLE_ROTATION] || '0');\n\tvar point = new mxPoint(me.getGraphX(), me.getGraphY());\n\tvar tr = this.graph.view.translate;\n\tvar scale = this.graph.view.scale;\n\tvar cos = Math.cos(-alpha);\n\tvar sin = Math.sin(-alpha);\n\t\n\tvar dx = point.x - this.startX;\n\tvar dy = point.y - this.startY;\n\n\t// Rotates vector for mouse gesture\n\tvar tx = cos * dx - sin * dy;\n\tvar ty = sin * dx + cos * dy;\n\t\n\tdx = tx;\n\tdy = ty;\n\n\tvar geo = this.graph.getCellGeometry(this.state.cell);\n\tthis.unscaledBounds = this.union(geo, dx / scale, dy / scale, this.index,\n\t\tthis.graph.isGridEnabledEvent(me.getEvent()), 1,\n\t\tnew mxPoint(0, 0), this.isConstrainedEvent(me),\n\t\tthis.isCenteredEvent(this.state, me));\n\t\n\t// Keeps vertex within maximum graph or parent bounds\n\tif (!geo.relative)\n\t{\n\t\tvar max = this.graph.getMaximumGraphBounds();\n\t\t\n\t\t// Handles child cells\n\t\tif (max != null && this.parentState != null)\n\t\t{\n\t\t\tmax = mxRectangle.fromRectangle(max);\n\t\t\t\n\t\t\tmax.x -= (this.parentState.x - tr.x * scale) / scale;\n\t\t\tmax.y -= (this.parentState.y - tr.y * scale) / scale;\n\t\t}\n\t\t\n\t\tif (this.graph.isConstrainChild(this.state.cell))\n\t\t{\n\t\t\tvar tmp = this.graph.getCellContainmentArea(this.state.cell);\n\t\t\t\n\t\t\tif (tmp != null)\n\t\t\t{\n\t\t\t\tvar overlap = this.graph.getOverlap(this.state.cell);\n\t\t\t\t\n\t\t\t\tif (overlap > 0)\n\t\t\t\t{\n\t\t\t\t\ttmp = mxRectangle.fromRectangle(tmp);\n\t\t\t\t\t\n\t\t\t\t\ttmp.x -= tmp.width * overlap;\n\t\t\t\t\ttmp.y -= tmp.height * overlap;\n\t\t\t\t\ttmp.width += 2 * tmp.width * overlap;\n\t\t\t\t\ttmp.height += 2 * tmp.height * overlap;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (max == null)\n\t\t\t\t{\n\t\t\t\t\tmax = tmp;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tmax = mxRectangle.fromRectangle(max);\n\t\t\t\t\tmax.intersect(tmp);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\n\t\tif (max != null)\n\t\t{\n\t\t\tif (this.unscaledBounds.x < max.x)\n\t\t\t{\n\t\t\t\tthis.unscaledBounds.width -= max.x - this.unscaledBounds.x;\n\t\t\t\tthis.unscaledBounds.x = max.x;\n\t\t\t}\n\t\t\t\n\t\t\tif (this.unscaledBounds.y < max.y)\n\t\t\t{\n\t\t\t\tthis.unscaledBounds.height -= max.y - this.unscaledBounds.y;\n\t\t\t\tthis.unscaledBounds.y = max.y;\n\t\t\t}\n\t\t\t\n\t\t\tif (this.unscaledBounds.x + this.unscaledBounds.width > max.x + max.width)\n\t\t\t{\n\t\t\t\tthis.unscaledBounds.width -= this.unscaledBounds.x +\n\t\t\t\t\tthis.unscaledBounds.width - max.x - max.width;\n\t\t\t}\n\t\t\t\n\t\t\tif (this.unscaledBounds.y + this.unscaledBounds.height > max.y + max.height)\n\t\t\t{\n\t\t\t\tthis.unscaledBounds.height -= this.unscaledBounds.y +\n\t\t\t\t\tthis.unscaledBounds.height - max.y - max.height;\n\t\t\t}\n\t\t}\n\t}\n\t\n\tthis.bounds = new mxRectangle(((this.parentState != null) ? this.parentState.x : tr.x * scale) +\n\t\t(this.unscaledBounds.x) * scale, ((this.parentState != null) ? this.parentState.y : tr.y * scale) +\n\t\t(this.unscaledBounds.y) * scale, this.unscaledBounds.width * scale, this.unscaledBounds.height * scale);\n\n\tif (geo.relative && this.parentState != null)\n\t{\n\t\tthis.bounds.x += this.state.x - this.parentState.x;\n\t\tthis.bounds.y += this.state.y - this.parentState.y;\n\t}\n\n\tcos = Math.cos(alpha);\n\tsin = Math.sin(alpha);\n\t\n\tvar c2 = new mxPoint(this.bounds.getCenterX(), this.bounds.getCenterY());\n\n\tvar dx = c2.x - ct.x;\n\tvar dy = c2.y - ct.y;\n\t\n\tvar dx2 = cos * dx - sin * dy;\n\tvar dy2 = sin * dx + cos * dy;\n\t\n\tvar dx3 = dx2 - dx;\n\tvar dy3 = dy2 - dy;\n\t\n\tvar dx4 = this.bounds.x - this.state.x;\n\tvar dy4 = this.bounds.y - this.state.y;\n\t\n\tvar dx5 = cos * dx4 - sin * dy4;\n\tvar dy5 = sin * dx4 + cos * dy4;\n\t\n\tthis.bounds.x += dx3;\n\tthis.bounds.y += dy3;\n\t\n\t// Rounds unscaled bounds to int\n\tthis.unscaledBounds.x = this.roundLength(this.unscaledBounds.x + dx3 / scale);\n\tthis.unscaledBounds.y = this.roundLength(this.unscaledBounds.y + dy3 / scale);\n\tthis.unscaledBounds.width = this.roundLength(this.unscaledBounds.width);\n\tthis.unscaledBounds.height = this.roundLength(this.unscaledBounds.height);\n\t\n\t// Shifts the children according to parent offset\n\tif (!this.graph.isCellCollapsed(this.state.cell) && (dx3 != 0 || dy3 != 0))\n\t{\n\t\tthis.childOffsetX = this.state.x - this.bounds.x + dx5;\n\t\tthis.childOffsetY = this.state.y - this.bounds.y + dy5;\n\t}\n\telse\n\t{\n\t\tthis.childOffsetX = 0;\n\t\tthis.childOffsetY = 0;\n\t}\n\t\n\tif (this.livePreview)\n\t{\n\t\tthis.updateLivePreview(me);\n\t}\n\t\n\tif (this.preview != null)\n\t{\n\t\tthis.drawPreview();\n\t}\n};\n\n/**\n * Function: updateLivePreview\n * \n * Repaints the live preview.\n */\nmxVertexHandler.prototype.updateLivePreview = function(me)\n{\n\t// TODO: Apply child offset to children in live preview\n\tvar scale = this.graph.view.scale;\n\tvar tr = this.graph.view.translate;\n\t\n\t// Saves current state\n\tvar tempState = this.state.clone();\n\n\t// Temporarily changes size and origin\n\tthis.state.x = this.bounds.x;\n\tthis.state.y = this.bounds.y;\n\tthis.state.origin = new mxPoint(this.state.x / scale - tr.x, this.state.y / scale - tr.y);\n\tthis.state.width = this.bounds.width;\n\tthis.state.height = this.bounds.height;\n\t\n\t// Needed to force update of text bounds\n\tthis.state.unscaledWidth = null;\n\t\n\t// Redraws cell and handles\n\tvar off = this.state.absoluteOffset;\n\toff = new mxPoint(off.x, off.y);\n\n\t// Required to store and reset absolute offset for updating label position\n\tthis.state.absoluteOffset.x = 0;\n\tthis.state.absoluteOffset.y = 0;\n\tvar geo = this.graph.getCellGeometry(this.state.cell);\t\t\t\t\n\n\tif (geo != null)\n\t{\n\t\tvar offset = geo.offset || this.EMPTY_POINT;\n\n\t\tif (offset != null && !geo.relative)\n\t\t{\n\t\t\tthis.state.absoluteOffset.x = this.state.view.scale * offset.x;\n\t\t\tthis.state.absoluteOffset.y = this.state.view.scale * offset.y;\n\t\t}\n\t\t\n\t\tthis.state.view.updateVertexLabelOffset(this.state);\n\t}\n\t\n\t// Draws the live preview\n\tthis.state.view.graph.cellRenderer.redraw(this.state, true);\n\t\n\t// Redraws connected edges TODO: Include child edges\n\tthis.state.view.invalidate(this.state.cell);\n\tthis.state.invalid = false;\n\tthis.state.view.validate();\n\tthis.redrawHandles();\n\t\n\t// Restores current state\n\tthis.state.setState(tempState);\n};\n\n/**\n * Function: mouseUp\n * \n * Handles the event by applying the changes to the geometry.\n */\nmxVertexHandler.prototype.mouseUp = function(sender, me)\n{\n\tif (this.index != null && this.state != null)\n\t{\n\t\tvar point = new mxPoint(me.getGraphX(), me.getGraphY());\n\n\t\tthis.graph.getModel().beginUpdate();\n\t\ttry\n\t\t{\n\t\t\tif (this.index <= mxEvent.CUSTOM_HANDLE)\n\t\t\t{\n\t\t\t\tif (this.customHandles != null)\n\t\t\t\t{\n\t\t\t\t\tthis.customHandles[mxEvent.CUSTOM_HANDLE - this.index].active = false;\n\t\t\t\t\tthis.customHandles[mxEvent.CUSTOM_HANDLE - this.index].execute();\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if (this.index == mxEvent.ROTATION_HANDLE)\n\t\t\t{\n\t\t\t\tif (this.currentAlpha != null)\n\t\t\t\t{\n\t\t\t\t\tvar delta = this.currentAlpha - (this.state.style[mxConstants.STYLE_ROTATION] || 0);\n\t\t\t\t\t\n\t\t\t\t\tif (delta != 0)\n\t\t\t\t\t{\n\t\t\t\t\t\tthis.rotateCell(this.state.cell, delta);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tthis.rotateClick();\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tvar gridEnabled = this.graph.isGridEnabledEvent(me.getEvent());\n\t\t\t\tvar alpha = mxUtils.toRadians(this.state.style[mxConstants.STYLE_ROTATION] || '0');\n\t\t\t\tvar cos = Math.cos(-alpha);\n\t\t\t\tvar sin = Math.sin(-alpha);\n\t\t\t\t\n\t\t\t\tvar dx = point.x - this.startX;\n\t\t\t\tvar dy = point.y - this.startY;\n\t\t\t\t\n\t\t\t\t// Rotates vector for mouse gesture\n\t\t\t\tvar tx = cos * dx - sin * dy;\n\t\t\t\tvar ty = sin * dx + cos * dy;\n\t\t\t\t\n\t\t\t\tdx = tx;\n\t\t\t\tdy = ty;\n\t\t\t\t\n\t\t\t\tvar s = this.graph.view.scale;\n\t\t\t\tvar recurse = this.isRecursiveResize(this.state, me);\n\t\t\t\tthis.resizeCell(this.state.cell, this.roundLength(dx / s), this.roundLength(dy / s),\n\t\t\t\t\tthis.index, gridEnabled, this.isConstrainedEvent(me), recurse);\n\t\t\t}\n\t\t}\n\t\tfinally\n\t\t{\n\t\t\tthis.graph.getModel().endUpdate();\n\t\t}\n\n\t\tme.consume();\n\t\tthis.reset();\n\t}\n};\n\n/**\n * Function: rotateCell\n * \n * Rotates the given cell to the given rotation.\n */\nmxVertexHandler.prototype.isRecursiveResize = function(state, me)\n{\n\treturn this.graph.isRecursiveResize(this.state);\n};\n\n/**\n * Function: rotateClick\n * \n * Hook for subclassers to implement a single click on the rotation handle.\n * This code is executed as part of the model transaction. This implementation\n * is empty.\n */\nmxVertexHandler.prototype.rotateClick = function() { };\n\n/**\n * Function: rotateCell\n * \n * Rotates the given cell and its children by the given angle in degrees.\n * \n * Parameters:\n * \n * cell - <mxCell> to be rotated.\n * angle - Angle in degrees.\n */\nmxVertexHandler.prototype.rotateCell = function(cell, angle, parent)\n{\n\tif (angle != 0)\n\t{\n\t\tvar model = this.graph.getModel();\n\n\t\tif (model.isVertex(cell) || model.isEdge(cell))\n\t\t{\n\t\t\tif (!model.isEdge(cell))\n\t\t\t{\n\t\t\t\tvar state = this.graph.view.getState(cell);\n\t\t\t\tvar style = (state != null) ? state.style : this.graph.getCellStyle(cell);\n\t\t\n\t\t\t\tif (style != null)\n\t\t\t\t{\n\t\t\t\t\tvar total = (style[mxConstants.STYLE_ROTATION] || 0) + angle;\n\t\t\t\t\tthis.graph.setCellStyles(mxConstants.STYLE_ROTATION, total, [cell]);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tvar geo = this.graph.getCellGeometry(cell);\n\t\t\t\n\t\t\tif (geo != null)\n\t\t\t{\n\t\t\t\tvar pgeo = this.graph.getCellGeometry(parent);\n\t\t\t\t\n\t\t\t\tif (pgeo != null && !model.isEdge(parent))\n\t\t\t\t{\n\t\t\t\t\tgeo = geo.clone();\n\t\t\t\t\tgeo.rotate(angle, new mxPoint(pgeo.width / 2, pgeo.height / 2));\n\t\t\t\t\tmodel.setGeometry(cell, geo);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif ((model.isVertex(cell) && !geo.relative) || model.isEdge(cell))\n\t\t\t\t{\n\t\t\t\t\t// Recursive rotation\n\t\t\t\t\tvar childCount = model.getChildCount(cell);\n\t\t\t\t\t\n\t\t\t\t\tfor (var i = 0; i < childCount; i++)\n\t\t\t\t\t{\n\t\t\t\t\t\tthis.rotateCell(model.getChildAt(cell, i), angle, cell);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n};\n\n/**\n * Function: reset\n * \n * Resets the state of this handler.\n */\nmxVertexHandler.prototype.reset = function()\n{\n\tif (this.sizers != null && this.index != null && this.sizers[this.index] != null &&\n\t\tthis.sizers[this.index].node.style.display == 'none')\n\t{\n\t\tthis.sizers[this.index].node.style.display = '';\n\t}\n\n\tthis.currentAlpha = null;\n\tthis.inTolerance = null;\n\tthis.index = null;\n\n\t// TODO: Reset and redraw cell states for live preview\n\tif (this.preview != null)\n\t{\n\t\tthis.preview.destroy();\n\t\tthis.preview = null;\n\t}\n\n\tif (this.livePreview && this.sizers != null)\n\t{\n\t\tfor (var i = 0; i < this.sizers.length; i++)\n\t\t{\n\t\t\tif (this.sizers[i] != null)\n\t\t\t{\n\t\t\t\tthis.sizers[i].node.style.display = '';\n\t\t\t}\n\t\t}\n\t}\n\n\tif (this.customHandles != null)\n\t{\n\t\tfor (var i = 0; i < this.customHandles.length; i++)\n\t\t{\n\t\t\tif (this.customHandles[i].active)\n\t\t\t{\n\t\t\t\tthis.customHandles[i].active = false;\n\t\t\t\tthis.customHandles[i].reset();\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tthis.customHandles[i].setVisible(true);\n\t\t\t}\n\t\t}\n\t}\n\t\n\t// Checks if handler has been destroyed\n\tif (this.selectionBorder != null)\n\t{\n\t\tthis.selectionBorder.node.style.display = 'inline';\n\t\tthis.selectionBounds = this.getSelectionBounds(this.state);\n\t\tthis.bounds = new mxRectangle(this.selectionBounds.x, this.selectionBounds.y,\n\t\t\tthis.selectionBounds.width, this.selectionBounds.height);\n\t\tthis.drawPreview();\n\t}\n\n\tthis.removeHint();\n\tthis.redrawHandles();\n\tthis.edgeHandlers = null;\n\tthis.unscaledBounds = null;\n};\n\n/**\n * Function: resizeCell\n * \n * Uses the given vector to change the bounds of the given cell\n * in the graph using <mxGraph.resizeCell>.\n */\nmxVertexHandler.prototype.resizeCell = function(cell, dx, dy, index, gridEnabled, constrained, recurse)\n{\n\tvar geo = this.graph.model.getGeometry(cell);\n\t\n\tif (geo != null)\n\t{\n\t\tif (index == mxEvent.LABEL_HANDLE)\n\t\t{\n\t\t\tvar scale = this.graph.view.scale;\n\t\t\tdx = Math.round((this.labelShape.bounds.getCenterX() - this.startX) / scale);\n\t\t\tdy = Math.round((this.labelShape.bounds.getCenterY() - this.startY) / scale);\n\t\t\t\n\t\t\tgeo = geo.clone();\n\t\t\t\n\t\t\tif (geo.offset == null)\n\t\t\t{\n\t\t\t\tgeo.offset = new mxPoint(dx, dy);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tgeo.offset.x += dx;\n\t\t\t\tgeo.offset.y += dy;\n\t\t\t}\n\t\t\t\n\t\t\tthis.graph.model.setGeometry(cell, geo);\n\t\t}\n\t\telse if (this.unscaledBounds != null)\n\t\t{\n\t\t\tvar scale = this.graph.view.scale;\n\n\t\t\tif (this.childOffsetX != 0 || this.childOffsetY != 0)\n\t\t\t{\n\t\t\t\tthis.moveChildren(cell, Math.round(this.childOffsetX / scale), Math.round(this.childOffsetY / scale));\n\t\t\t}\n\n\t\t\tthis.graph.resizeCell(cell, this.unscaledBounds, recurse);\n\t\t}\n\t}\n};\n\n/**\n * Function: moveChildren\n * \n * Moves the children of the given cell by the given vector.\n */\nmxVertexHandler.prototype.moveChildren = function(cell, dx, dy)\n{\n\tvar model = this.graph.getModel();\n\tvar childCount = model.getChildCount(cell);\n\t\n\tfor (var i = 0; i < childCount; i++)\n\t{\n\t\tvar child = model.getChildAt(cell, i);\n\t\tvar geo = this.graph.getCellGeometry(child);\n\t\t\n\t\tif (geo != null)\n\t\t{\n\t\t\tgeo = geo.clone();\n\t\t\tgeo.translate(dx, dy);\n\t\t\tmodel.setGeometry(child, geo);\n\t\t}\n\t}\n};\n/**\n * Function: union\n * \n * Returns the union of the given bounds and location for the specified\n * handle index.\n * \n * To override this to limit the size of vertex via a minWidth/-Height style,\n * the following code can be used.\n * \n * (code)\n * var vertexHandlerUnion = mxVertexHandler.prototype.union;\n * mxVertexHandler.prototype.union = function(bounds, dx, dy, index, gridEnabled, scale, tr, constrained)\n * {\n *   var result = vertexHandlerUnion.apply(this, arguments);\n *   \n *   result.width = Math.max(result.width, mxUtils.getNumber(this.state.style, 'minWidth', 0));\n *   result.height = Math.max(result.height, mxUtils.getNumber(this.state.style, 'minHeight', 0));\n *   \n *   return result;\n * };\n * (end)\n * \n * The minWidth/-Height style can then be used as follows:\n * \n * (code)\n * graph.insertVertex(parent, null, 'Hello,', 20, 20, 80, 30, 'minWidth=100;minHeight=100;');\n * (end)\n * \n * To override this to update the height for a wrapped text if the width of a vertex is\n * changed, the following can be used.\n * \n * (code)\n * var mxVertexHandlerUnion = mxVertexHandler.prototype.union;\n * mxVertexHandler.prototype.union = function(bounds, dx, dy, index, gridEnabled, scale, tr, constrained)\n * {\n *   var result = mxVertexHandlerUnion.apply(this, arguments);\n *   var s = this.state;\n *   \n *   if (this.graph.isHtmlLabel(s.cell) && (index == 3 || index == 4) &&\n *       s.text != null && s.style[mxConstants.STYLE_WHITE_SPACE] == 'wrap')\n *   {\n *     var label = this.graph.getLabel(s.cell);\n *     var fontSize = mxUtils.getNumber(s.style, mxConstants.STYLE_FONTSIZE, mxConstants.DEFAULT_FONTSIZE);\n *     var ww = result.width / s.view.scale - s.text.spacingRight - s.text.spacingLeft\n *     \n *     result.height = mxUtils.getSizeForString(label, fontSize, s.style[mxConstants.STYLE_FONTFAMILY], ww).height;\n *   }\n *   \n *   return result;\n * };\n * (end)\n */\nmxVertexHandler.prototype.union = function(bounds, dx, dy, index, gridEnabled, scale, tr, constrained, centered)\n{\n\tif (this.singleSizer)\n\t{\n\t\tvar x = bounds.x + bounds.width + dx;\n\t\tvar y = bounds.y + bounds.height + dy;\n\t\t\n\t\tif (gridEnabled)\n\t\t{\n\t\t\tx = this.graph.snap(x / scale) * scale;\n\t\t\ty = this.graph.snap(y / scale) * scale;\n\t\t}\n\t\t\n\t\tvar rect = new mxRectangle(bounds.x, bounds.y, 0, 0);\n\t\trect.add(new mxRectangle(x, y, 0, 0));\n\t\t\n\t\treturn rect;\n\t}\n\telse\n\t{\n\t\tvar w0 = bounds.width;\n\t\tvar h0 = bounds.height;\n\t\tvar left = bounds.x - tr.x * scale;\n\t\tvar right = left + w0;\n\t\tvar top = bounds.y - tr.y * scale;\n\t\tvar bottom = top + h0;\n\t\t\n\t\tvar cx = left + w0 / 2;\n\t\tvar cy = top + h0 / 2;\n\t\t\n\t\tif (index > 4 /* Bottom Row */)\n\t\t{\n\t\t\tbottom = bottom + dy;\n\t\t\t\n\t\t\tif (gridEnabled)\n\t\t\t{\n\t\t\t\tbottom = this.graph.snap(bottom / scale) * scale;\n\t\t\t}\n\t\t}\n\t\telse if (index < 3 /* Top Row */)\n\t\t{\n\t\t\ttop = top + dy;\n\t\t\t\n\t\t\tif (gridEnabled)\n\t\t\t{\n\t\t\t\ttop = this.graph.snap(top / scale) * scale;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (index == 0 || index == 3 || index == 5 /* Left */)\n\t\t{\n\t\t\tleft += dx;\n\t\t\t\n\t\t\tif (gridEnabled)\n\t\t\t{\n\t\t\t\tleft = this.graph.snap(left / scale) * scale;\n\t\t\t}\n\t\t}\n\t\telse if (index == 2 || index == 4 || index == 7 /* Right */)\n\t\t{\n\t\t\tright += dx;\n\t\t\t\n\t\t\tif (gridEnabled)\n\t\t\t{\n\t\t\t\tright = this.graph.snap(right / scale) * scale;\n\t\t\t}\n\t\t}\n\t\t\n\t\tvar width = right - left;\n\t\tvar height = bottom - top;\n\n\t\tif (constrained)\n\t\t{\n\t\t\tvar geo = this.graph.getCellGeometry(this.state.cell);\n\n\t\t\tif (geo != null)\n\t\t\t{\n\t\t\t\tvar aspect = geo.width / geo.height;\n\t\t\t\t\n\t\t\t\tif (index== 1 || index== 2 || index == 7 || index == 6)\n\t\t\t\t{\n\t\t\t\t\twidth = height * aspect;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\theight = width / aspect;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (index == 0)\n\t\t\t\t{\n\t\t\t\t\tleft = right - width;\n\t\t\t\t\ttop = bottom - height;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (centered)\n\t\t{\n\t\t\twidth += (width - w0);\n\t\t\theight += (height - h0);\n\t\t\t\n\t\t\tvar cdx = cx - (left + width / 2);\n\t\t\tvar cdy = cy - (top + height / 2);\n\n\t\t\tleft += cdx;\n\t\t\ttop += cdy;\n\t\t\tright += cdx;\n\t\t\tbottom += cdy;\n\t\t}\n\n\t\t// Flips over left side\n\t\tif (width < 0)\n\t\t{\n\t\t\tleft += width;\n\t\t\twidth = Math.abs(width);\n\t\t}\n\t\t\n\t\t// Flips over top side\n\t\tif (height < 0)\n\t\t{\n\t\t\ttop += height;\n\t\t\theight = Math.abs(height);\n\t\t}\n\n\t\tvar result = new mxRectangle(left + tr.x * scale, top + tr.y * scale, width, height);\n\t\t\n\t\tif (this.minBounds != null)\n\t\t{\n\t\t\tresult.width = Math.max(result.width, this.minBounds.x * scale + this.minBounds.width * scale +\n\t\t\t\tMath.max(0, this.x0 * scale - result.x));\n\t\t\tresult.height = Math.max(result.height, this.minBounds.y * scale + this.minBounds.height * scale +\n\t\t\t\tMath.max(0, this.y0 * scale - result.y));\n\t\t}\n\t\t\n\t\treturn result;\n\t}\n};\n\n/**\n * Function: redraw\n * \n * Redraws the handles and the preview.\n */\nmxVertexHandler.prototype.redraw = function()\n{\n\tthis.selectionBounds = this.getSelectionBounds(this.state);\n\tthis.bounds = new mxRectangle(this.selectionBounds.x, this.selectionBounds.y, this.selectionBounds.width, this.selectionBounds.height);\n\t\n\tthis.redrawHandles();\n\tthis.drawPreview();\n};\n\n/**\n * Returns the padding to be used for drawing handles for the current <bounds>.\n */\nmxVertexHandler.prototype.getHandlePadding = function()\n{\n\t// KNOWN: Tolerance depends on event type (eg. 0 for mouse events)\n\tvar result = new mxPoint(0, 0);\n\tvar tol = this.tolerance;\n\n\tif (this.sizers != null && this.sizers.length > 0 && this.sizers[0] != null &&\n\t\t(this.bounds.width < 2 * this.sizers[0].bounds.width + 2 * tol ||\n\t\tthis.bounds.height < 2 * this.sizers[0].bounds.height + 2 * tol))\n\t{\n\t\ttol /= 2;\n\t\t\n\t\tresult.x = this.sizers[0].bounds.width + tol;\n\t\tresult.y = this.sizers[0].bounds.height + tol;\n\t}\n\t\n\treturn result;\n};\n\n/**\n * Function: redrawHandles\n * \n * Redraws the handles. To hide certain handles the following code can be used.\n * \n * (code)\n * mxVertexHandler.prototype.redrawHandles = function()\n * {\n *   mxVertexHandlerRedrawHandles.apply(this, arguments);\n *   \n *   if (this.sizers != null && this.sizers.length > 7)\n *   {\n *     this.sizers[1].node.style.display = 'none';\n *     this.sizers[6].node.style.display = 'none';\n *   }\n * };\n * (end)\n */\nmxVertexHandler.prototype.redrawHandles = function()\n{\n\tvar tol = this.tolerance;\n\tthis.horizontalOffset = 0;\n\tthis.verticalOffset = 0;\n\tvar s = this.bounds;\n\n\tif (this.sizers != null && this.sizers.length > 0 && this.sizers[0] != null)\n\t{\n\t\tif (this.index == null && this.manageSizers && this.sizers.length >= 8)\n\t\t{\n\t\t\t// KNOWN: Tolerance depends on event type (eg. 0 for mouse events)\n\t\t\tvar padding = this.getHandlePadding();\n\t\t\tthis.horizontalOffset = padding.x;\n\t\t\tthis.verticalOffset = padding.y;\n\t\t\t\n\t\t\tif (this.horizontalOffset != 0 || this.verticalOffset != 0)\n\t\t\t{\n\t\t\t\ts = new mxRectangle(s.x, s.y, s.width, s.height);\n\n\t\t\t\ts.x -= this.horizontalOffset / 2;\n\t\t\t\ts.width += this.horizontalOffset;\n\t\t\t\ts.y -= this.verticalOffset / 2;\n\t\t\t\ts.height += this.verticalOffset;\n\t\t\t}\n\t\t\t\n\t\t\tif (this.sizers.length >= 8)\n\t\t\t{\n\t\t\t\tif ((s.width < 2 * this.sizers[0].bounds.width + 2 * tol) ||\n\t\t\t\t\t(s.height < 2 * this.sizers[0].bounds.height + 2 * tol))\n\t\t\t\t{\n\t\t\t\t\tthis.sizers[0].node.style.display = 'none';\n\t\t\t\t\tthis.sizers[2].node.style.display = 'none';\n\t\t\t\t\tthis.sizers[5].node.style.display = 'none';\n\t\t\t\t\tthis.sizers[7].node.style.display = 'none';\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tthis.sizers[0].node.style.display = '';\n\t\t\t\t\tthis.sizers[2].node.style.display = '';\n\t\t\t\t\tthis.sizers[5].node.style.display = '';\n\t\t\t\t\tthis.sizers[7].node.style.display = '';\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tvar r = s.x + s.width;\n\t\tvar b = s.y + s.height;\n\t\t\n\t\tif (this.singleSizer)\n\t\t{\n\t\t\tthis.moveSizerTo(this.sizers[0], r, b);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tvar cx = s.x + s.width / 2;\n\t\t\tvar cy = s.y + s.height / 2;\n\t\t\t\n\t\t\tif (this.sizers.length >= 8)\n\t\t\t{\n\t\t\t\tvar crs = ['nw-resize', 'n-resize', 'ne-resize', 'e-resize', 'se-resize', 's-resize', 'sw-resize', 'w-resize'];\n\t\t\t\t\n\t\t\t\tvar alpha = mxUtils.toRadians(this.state.style[mxConstants.STYLE_ROTATION] || '0');\n\t\t\t\tvar cos = Math.cos(alpha);\n\t\t\t\tvar sin = Math.sin(alpha);\n\t\t\t\t\n\t\t\t\tvar da = Math.round(alpha * 4 / Math.PI);\n\t\t\t\t\n\t\t\t\tvar ct = new mxPoint(s.getCenterX(), s.getCenterY());\n\t\t\t\tvar pt = mxUtils.getRotatedPoint(new mxPoint(s.x, s.y), cos, sin, ct);\n\t\t\t\t\n\t\t\t\tthis.moveSizerTo(this.sizers[0], pt.x, pt.y);\n\t\t\t\tthis.sizers[0].setCursor(crs[mxUtils.mod(0 + da, crs.length)]);\n\t\t\t\t\n\t\t\t\tpt.x = cx;\n\t\t\t\tpt.y = s.y;\n\t\t\t\tpt = mxUtils.getRotatedPoint(pt, cos, sin, ct);\n\t\t\t\t\n\t\t\t\tthis.moveSizerTo(this.sizers[1], pt.x, pt.y);\n\t\t\t\tthis.sizers[1].setCursor(crs[mxUtils.mod(1 + da, crs.length)]);\n\t\t\t\t\n\t\t\t\tpt.x = r;\n\t\t\t\tpt.y = s.y;\n\t\t\t\tpt = mxUtils.getRotatedPoint(pt, cos, sin, ct);\n\t\t\t\t\n\t\t\t\tthis.moveSizerTo(this.sizers[2], pt.x, pt.y);\n\t\t\t\tthis.sizers[2].setCursor(crs[mxUtils.mod(2 + da, crs.length)]);\n\t\t\t\t\n\t\t\t\tpt.x = s.x;\n\t\t\t\tpt.y = cy;\n\t\t\t\tpt = mxUtils.getRotatedPoint(pt, cos, sin, ct);\n\t\t\t\t\n\t\t\t\tthis.moveSizerTo(this.sizers[3], pt.x, pt.y);\n\t\t\t\tthis.sizers[3].setCursor(crs[mxUtils.mod(7 + da, crs.length)]);\n\n\t\t\t\tpt.x = r;\n\t\t\t\tpt.y = cy;\n\t\t\t\tpt = mxUtils.getRotatedPoint(pt, cos, sin, ct);\n\t\t\t\t\n\t\t\t\tthis.moveSizerTo(this.sizers[4], pt.x, pt.y);\n\t\t\t\tthis.sizers[4].setCursor(crs[mxUtils.mod(3 + da, crs.length)]);\n\n\t\t\t\tpt.x = s.x;\n\t\t\t\tpt.y = b;\n\t\t\t\tpt = mxUtils.getRotatedPoint(pt, cos, sin, ct);\n\t\t\t\t\n\t\t\t\tthis.moveSizerTo(this.sizers[5], pt.x, pt.y);\n\t\t\t\tthis.sizers[5].setCursor(crs[mxUtils.mod(6 + da, crs.length)]);\n\n\t\t\t\tpt.x = cx;\n\t\t\t\tpt.y = b;\n\t\t\t\tpt = mxUtils.getRotatedPoint(pt, cos, sin, ct);\n\t\t\t\t\n\t\t\t\tthis.moveSizerTo(this.sizers[6], pt.x, pt.y);\n\t\t\t\tthis.sizers[6].setCursor(crs[mxUtils.mod(5 + da, crs.length)]);\n\n\t\t\t\tpt.x = r;\n\t\t\t\tpt.y = b;\n\t\t\t\tpt = mxUtils.getRotatedPoint(pt, cos, sin, ct);\n\t\t\t\t\n\t\t\t\tthis.moveSizerTo(this.sizers[7], pt.x, pt.y);\n\t\t\t\tthis.sizers[7].setCursor(crs[mxUtils.mod(4 + da, crs.length)]);\n\t\t\t\t\n\t\t\t\tthis.moveSizerTo(this.sizers[8], cx + this.state.absoluteOffset.x, cy + this.state.absoluteOffset.y);\n\t\t\t}\n\t\t\telse if (this.state.width >= 2 && this.state.height >= 2)\n\t\t\t{\n\t\t\t\tthis.moveSizerTo(this.sizers[0], cx + this.state.absoluteOffset.x, cy + this.state.absoluteOffset.y);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tthis.moveSizerTo(this.sizers[0], this.state.x, this.state.y);\n\t\t\t}\n\t\t}\n\t}\n\n\tif (this.rotationShape != null)\n\t{\n\t\tvar alpha = mxUtils.toRadians((this.currentAlpha != null) ? this.currentAlpha : this.state.style[mxConstants.STYLE_ROTATION] || '0');\n\t\tvar cos = Math.cos(alpha);\n\t\tvar sin = Math.sin(alpha);\n\t\t\n\t\tvar ct = new mxPoint(this.state.getCenterX(), this.state.getCenterY());\n\t\tvar pt = mxUtils.getRotatedPoint(this.getRotationHandlePosition(), cos, sin, ct);\n\n\t\tif (this.rotationShape.node != null)\n\t\t{\n\t\t\tthis.moveSizerTo(this.rotationShape, pt.x, pt.y);\n\n\t\t\t// Hides rotation handle during text editing\n\t\t\tthis.rotationShape.node.style.visibility = (this.state.view.graph.isEditing()) ? 'hidden' : '';\n\t\t}\n\t}\n\t\n\tif (this.selectionBorder != null)\n\t{\n\t\tthis.selectionBorder.rotation = Number(this.state.style[mxConstants.STYLE_ROTATION] || '0');\n\t}\n\t\n\tif (this.edgeHandlers != null)\n\t{\t\t\n\t\tfor (var i = 0; i < this.edgeHandlers.length; i++)\n\t\t{\n\t\t\tthis.edgeHandlers[i].redraw();\n\t\t}\n\t}\n\n\tif (this.customHandles != null)\n\t{\n\t\tfor (var i = 0; i < this.customHandles.length; i++)\n\t\t{\n\t\t\tvar temp = this.customHandles[i].shape.node.style.display;\n\t\t\tthis.customHandles[i].redraw();\n\t\t\tthis.customHandles[i].shape.node.style.display = temp;\n\n\t\t\t// Hides custom handles during text editing\n\t\t\tthis.customHandles[i].shape.node.style.visibility = (this.graph.isEditing()) ? 'hidden' : '';\n\t\t}\n\t}\n\n\tthis.updateParentHighlight();\n};\n\n/**\n * Function: getRotationHandlePosition\n * \n * Returns an <mxPoint> that defines the rotation handle position.\n */\nmxVertexHandler.prototype.getRotationHandlePosition = function()\n{\n\treturn new mxPoint(this.bounds.x + this.bounds.width / 2, this.bounds.y + this.rotationHandleVSpacing)\n};\n\n/**\n * Function: updateParentHighlight\n * \n * Updates the highlight of the parent if <parentHighlightEnabled> is true.\n */\nmxVertexHandler.prototype.updateParentHighlight = function()\n{\n\t// If not destroyed\n\tif (this.selectionBorder != null)\n\t{\n\t\tif (this.parentHighlight != null)\n\t\t{\n\t\t\tvar parent = this.graph.model.getParent(this.state.cell);\n\t\n\t\t\tif (this.graph.model.isVertex(parent))\n\t\t\t{\n\t\t\t\tvar pstate = this.graph.view.getState(parent);\n\t\t\t\tvar b = this.parentHighlight.bounds;\n\t\t\t\t\n\t\t\t\tif (pstate != null && (b.x != pstate.x || b.y != pstate.y ||\n\t\t\t\t\tb.width != pstate.width || b.height != pstate.height))\n\t\t\t\t{\n\t\t\t\t\tthis.parentHighlight.bounds = pstate;\n\t\t\t\t\tthis.parentHighlight.redraw();\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tthis.parentHighlight.destroy();\n\t\t\t\tthis.parentHighlight = null;\n\t\t\t}\n\t\t}\n\t\telse if (this.parentHighlightEnabled)\n\t\t{\n\t\t\tvar parent = this.graph.model.getParent(this.state.cell);\n\t\t\t\n\t\t\tif (this.graph.model.isVertex(parent))\n\t\t\t{\n\t\t\t\tvar pstate = this.graph.view.getState(parent);\n\t\t\t\t\n\t\t\t\tif (pstate != null)\n\t\t\t\t{\n\t\t\t\t\tthis.parentHighlight = this.createParentHighlightShape(pstate);\n\t\t\t\t\t// VML dialect required here for event transparency in IE\n\t\t\t\t\tthis.parentHighlight.dialect = (this.graph.dialect != mxConstants.DIALECT_SVG) ? mxConstants.DIALECT_VML : mxConstants.DIALECT_SVG;\n\t\t\t\t\tthis.parentHighlight.pointerEvents = false;\n\t\t\t\t\tthis.parentHighlight.rotation = Number(pstate.style[mxConstants.STYLE_ROTATION] || '0');\n\t\t\t\t\tthis.parentHighlight.init(this.graph.getView().getOverlayPane());\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n};\n\n/**\n * Function: drawPreview\n * \n * Redraws the preview.\n */\nmxVertexHandler.prototype.drawPreview = function()\n{\n\tif (this.preview != null)\n\t{\n\t\tthis.preview.bounds = this.bounds;\n\t\t\n\t\tif (this.preview.node.parentNode == this.graph.container)\n\t\t{\n\t\t\tthis.preview.bounds.width = Math.max(0, this.preview.bounds.width - 1);\n\t\t\tthis.preview.bounds.height = Math.max(0, this.preview.bounds.height - 1);\n\t\t}\n\t\n\t\tthis.preview.rotation = Number(this.state.style[mxConstants.STYLE_ROTATION] || '0');\n\t\tthis.preview.redraw();\n\t}\n\t\n\tthis.selectionBorder.bounds = this.bounds;\n\tthis.selectionBorder.redraw();\n\t\n\tif (this.parentHighlight != null)\n\t{\n\t\tthis.parentHighlight.redraw();\n\t}\n};\n\n/**\n * Function: destroy\n * \n * Destroys the handler and all its resources and DOM nodes.\n */\nmxVertexHandler.prototype.destroy = function()\n{\n\tif (this.escapeHandler != null)\n\t{\n\t\tthis.state.view.graph.removeListener(this.escapeHandler);\n\t\tthis.escapeHandler = null;\n\t}\n\t\n\tif (this.preview != null)\n\t{\n\t\tthis.preview.destroy();\n\t\tthis.preview = null;\n\t}\n\t\n\tif (this.parentHighlight != null)\n\t{\n\t\tthis.parentHighlight.destroy();\n\t\tthis.parentHighlight = null;\n\t}\n\t\n\tif (this.selectionBorder != null)\n\t{\n\t\tthis.selectionBorder.destroy();\n\t\tthis.selectionBorder = null;\n\t}\n\t\n\tthis.labelShape = null;\n\tthis.removeHint();\n\n\tif (this.sizers != null)\n\t{\n\t\tfor (var i = 0; i < this.sizers.length; i++)\n\t\t{\n\t\t\tthis.sizers[i].destroy();\n\t\t}\n\t\t\n\t\tthis.sizers = null;\n\t}\n\n\tif (this.customHandles != null)\n\t{\n\t\tfor (var i = 0; i < this.customHandles.length; i++)\n\t\t{\n\t\t\tthis.customHandles[i].destroy();\n\t\t}\n\t\t\n\t\tthis.customHandles = null;\n\t}\n};\n"
  },
  {
    "path": "static/cherry/drawio_demo/src/js/index.txt",
    "content": "Document: API Specification\n\nOverview:\n\n  This JavaScript library is divided into 8 packages. The top-level <mxClient>\n  class includes (or dynamically imports) everything else. The current version\n  is stored in <mxClient.VERSION>.\n\n  The *editor* package provides the classes required to implement a diagram\n  editor. The main class in this package is <mxEditor>.\n  \n  The *view* and *model* packages implement the graph component, represented\n  by <mxGraph>. It refers to a <mxGraphModel> which contains <mxCell>s and\n  caches the state of the cells in a <mxGraphView>. The cells are painted\n  using a <mxCellRenderer> based on the appearance defined in <mxStylesheet>.\n  Undo history is implemented in <mxUndoManager>. To display an icon on the\n  graph, <mxCellOverlay> may be used. Validation rules are defined with\n  <mxMultiplicity>.\n  \n  The *handler*, *layout* and *shape* packages contain event listeners,\n  layout algorithms and shapes, respectively. The graph event listeners\n  include <mxRubberband> for rubberband selection, <mxTooltipHandler>\n  for tooltips and <mxGraphHandler> for  basic cell modifications.\n  <mxCompactTreeLayout> implements a tree layout algorithm, and the \n  shape package provides various shapes, which are subclasses of\n  <mxShape>.\n  \n  The *util* package provides utility classes including <mxClipboard> for\n  copy-paste, <mxDatatransfer> for drag-and-drop, <mxConstants> for keys and\n  values of stylesheets, <mxEvent> and <mxUtils> for cross-browser\n  event-handling and general purpose functions, <mxResources> for\n  internationalization and <mxLog> for console output.\n\n  The *io* package implements a generic <mxObjectCodec> for turning\n  JavaScript objects into XML. The main class is <mxCodec>.\n  <mxCodecRegistry> is the global registry for custom codecs.\n  \nEvents:\n\n  There are three different types of events, namely native DOM events,\n  <mxEventObjects> which are fired in an <mxEventSource>, and <mxMouseEvents>\n  which are fired in <mxGraph>.\n\n  Some helper methods for handling native events are provided in <mxEvent>. It\n  also takes care of resolving cycles between DOM nodes and JavaScript event\n  handlers, which can lead to memory leaks in IE6.\n  \n  Most custom events in mxGraph are implemented using <mxEventSource>. Its\n  listeners are functions that take a sender and <mxEventObject>. Additionally,\n  the <mxGraph> class fires special <mxMouseEvents> which are handled using\n  mouse listeners, which are objects that provide a mousedown, mousemove and\n  mouseup method.\n  \n  Events in <mxEventSource> are fired using <mxEventSource.fireEvent>.\n  Listeners are added and removed using <mxEventSource.addListener> and\n  <mxEventSource.removeListener>. <mxMouseEvents> in <mxGraph> are fired using\n  <mxGraph.fireMouseEvent>. Listeners are added and removed using\n  <mxGraph.addMouseListener> and <mxGraph.removeMouseListener>, respectively.\n  \nKey bindings:\n  \n  The following key bindings are defined for mouse events in the client across\n  all browsers and platforms:\n  \n  - Control-Drag: Duplicates (clones) selected cells\n  - Shift-Rightlick: Shows the context menu\n  - Alt-Click: Forces rubberband (aka. marquee)\n  - Control-Select: Toggles the selection state\n  - Shift-Drag: Constrains the offset to one direction\n  - Shift-Control-Drag: Panning (also Shift-Rightdrag)\n  \nConfiguration:\n\n  The following global variables may be defined before the client is loaded to\n  specify its language or base path, respectively.\n  \n  - mxBasePath: Specifies the path in <mxClient.basePath>.\n  - mxImageBasePath: Specifies the path in <mxClient.imageBasePath>.\n  - mxLanguage: Specifies the language for resources in <mxClient.language>.\n  - mxDefaultLanguage: Specifies the default language in <mxClient.defaultLanguage>.\n  - mxLoadResources: Specifies if any resources should be loaded. Default is true.\n  - mxLoadStylesheets: Specifies if any stylesheets should be loaded. Default is true.\n\nReserved Words:\n\n  The mx prefix is used for all classes and objects in mxGraph. The mx prefix\n  can be seen as the global namespace for all JavaScript code in mxGraph. The\n  following fieldnames should not be used in objects.\n  \n  - *mxObjectId*: If the object is used with mxObjectIdentity\n  - *as*: If the object is a field of another object\n  - *id*: If the object is an idref in a codec\n  - *mxListenerList*: Added to DOM nodes when used with <mxEvent>\n  - *window._mxDynamicCode*: Temporarily used to load code in Safari and Chrome\n  (see <mxClient.include>).\n  - *_mxJavaScriptExpression*: Global variable that is temporarily used to\n  evaluate code in Safari, Opera, Firefox 3 and IE (see <mxUtils.eval>).\n\nFiles:\n\n  The library contains these relative filenames. All filenames are relative\n  to <mxClient.basePath>.\n  \nBuilt-in Images:\n  \n  All images are loaded from the <mxClient.imageBasePath>, \n  which you can change to reflect your environment. The image variables can \n  also be changed individually.\n  \n  - mxGraph.prototype.collapsedImage\n  - mxGraph.prototype.expandedImage\n  - mxGraph.prototype.warningImage\n  - mxWindow.prototype.closeImage\n  - mxWindow.prototype.minimizeImage\n  - mxWindow.prototype.normalizeImage\n  - mxWindow.prototype.maximizeImage\n  - mxWindow.prototype.resizeImage\n  - mxPopupMenu.prototype.submenuImage\n  - mxUtils.errorImage\n  - mxConstraintHandler.prototype.pointImage\n\n  The basename of the warning image (images/warning without extension) used in \n  <mxGraph.setCellWarning> is defined in <mxGraph.warningImage>.\n\nResources:\n  \n  The <mxEditor> and <mxGraph> classes add the following resources to\n  <mxResources> at class loading time:\n\n  - resources/editor*.properties\n  - resources/graph*.properties\n  \n  By default, the library ships with English and German resource files.\n\nImages:\n\n  Recommendations for using images. Use GIF images (256 color palette) in HTML\n  elements (such as the toolbar and context menu), and PNG images (24 bit) for\n  all images which appear inside the graph component.\n  \n  - For PNG images inside HTML elements, Internet Explorer will ignore any \n    transparency information.\n  - For GIF images inside the graph, Firefox on the Mac will display strange \n    colors. Furthermore, only the first image for animated GIFs is displayed \n    on the Mac.\n    \n  For faster image rendering during application runtime, images can be\n  prefetched using the following code:\n  \n  (code)\n  var image = new Image();\n  image.src = url_to_image;\n  (end)\n\nDeployment:\n\n  The client is added to the page using the following script tag inside the\n  head of a document:\n\n  (code)\n  <script type=\"text/javascript\" src=\"js/mxClient.js\"></script>\n  (end)\n\n  The deployment version of the mxClient.js file contains all required code\n  in a single file. For deployment, the complete javascript/src directory is\n  required.\n  \nSource Code:\n\n  If you are a source code customer and you wish to develop using the \n  full source code, the commented source code is shipped in the \n  javascript/devel/source.zip file. It contains one file for each class \n  in mxGraph. To use the source code the source.zip file must be \n  uncompressed and the mxClient.js URL in the HTML  page must be changed \n  to reference the uncompressed mxClient.js from the source.zip file.\n\nCompression:\n \n  When using Apache2 with mod_deflate, you can use the following directive\n  in src/js/.htaccess to speedup the loading of the JavaScript sources:\n  \n  (code)\n  SetOutputFilter DEFLATE\n  (end)\n\nClasses:\n  \n  There are two types of \"classes\" in mxGraph: classes and singletons (where\n  only one instance exists). Singletons are mapped to global objects where the\n  variable name equals the classname. For example mxConstants is an object with\n  all the constants defined as object fields. Normal classes are mapped to a\n  constructor function and a prototype which defines the instance fields and\n  methods. For example, <mxEditor> is a function and mxEditor.prototype is the\n  prototype for the object that the mxEditor function creates. The mx prefix is\n  a convention that is used for all classes in the mxGraph package to avoid\n  conflicts with other objects in the global namespace.\n\nSubclassing:\n\n  For subclassing, the superclass must provide a constructor that is either\n  parameterless or handles an invocation with no arguments. Furthermore, the\n  special constructor field must be redefined after extending the prototype.\n  For example, the superclass of mxEditor is <mxEventSource>. This is\n  represented in JavaScript by first \"inheriting\" all fields and methods from\n  the superclass by assigning the prototype to an instance of the superclass,\n  eg. mxEditor.prototype = new mxEventSource() and redefining the constructor\n  field using mxEditor.prototype.constructor = mxEditor. The latter rule is\n  applied so that the type of an object can be retrieved via the name of its\n  constructor using mxUtils.getFunctionName(obj.constructor).\n\nConstructor:\n\n  For subclassing in mxGraph, the same scheme should be applied. For example,\n  for subclassing the <mxGraph> class, first a constructor must be defined for\n  the new class. The constructor calls the super constructor with any arguments\n  that it may have using the call function on the mxGraph function object,\n  passing along explitely each argument:\n\n  (code)\n  function MyGraph(container)\n  {\n    mxGraph.call(this, container);\n  }\n  (end)\n  \n  The prototype of MyGraph inherits from mxGraph as follows. As usual, the\n  constructor is redefined after extending the superclass:\n\n  (code)\n  MyGraph.prototype = new mxGraph();\n  MyGraph.prototype.constructor = MyGraph;\n  (end)\n  \n  You may want to define the codec associated for the class after the above\n  code. This code will be executed at class loading time and makes sure the\n  same codec is used to encode instances of mxGraph and MyGraph.\n\n  (code)\n  var codec = mxCodecRegistry.getCodec(mxGraph);\n  codec.template = new MyGraph();\n  mxCodecRegistry.register(codec);\n  (end)\n  \nFunctions:\n\n  In the prototype for MyGraph, functions of mxGraph can then be extended as\n  follows.\n  \n  (code)\n  MyGraph.prototype.isCellSelectable = function(cell)\n  {\n    var selectable = mxGraph.prototype.isSelectable.apply(this, arguments);\n\n    var geo = this.model.getGeometry(cell);\n    return selectable && (geo == null || !geo.relative);\n  }\n  (end)\n  \n  The supercall in the first line is optional. It is done using the apply\n  function on the isSelectable function object of the mxGraph prototype, using\n  the special this and arguments variables as parameters. Calls to the\n  superclass function are only possible if the function is not replaced in the\n  superclass as follows, which is another way of subclassing in JavaScript.\n\n  (code)\n  mxGraph.prototype.isCellSelectable = function(cell)\n  {\n    var geo = this.model.getGeometry(cell);\n    return selectable &&\n        (geo == null ||\n        !geo.relative);\n  }\n  (end)\n\n  The above scheme is useful if a function definition needs to be replaced\n  completely.\n  \n  In order to add new functions and fields to the subclass, the following code\n  is used. The example below adds a new function to return the XML\n  representation of the graph model:\n\n  (code)\n  MyGraph.prototype.getXml = function()\n  {\n    var enc = new mxCodec();\n    return enc.encode(this.getModel());\n  }\n  (end)\n  \nVariables:\n\n  Likewise, a new field is declared and defined as follows.\n\n  (code)\n  MyGraph.prototype.myField = 'Hello, World!';\n  (end)\n  \n  Note that the value assigned to myField is created only once, that is, all\n  instances of MyGraph share the same value. If you require instance-specific\n  values, then the field must be defined in the constructor instead.\n\n  (code)\n  function MyGraph(container)\n  {\n    mxGraph.call(this, container);\n    \n    this.myField = new Array();\n  }\n  (end)\n\n  Finally, a new instance of MyGraph is created using the following code, where\n  container is a DOM node that acts as a container for the graph view:\n\n  (code)\n  var graph = new MyGraph(container);\n  (end)\n"
  },
  {
    "path": "static/cherry/drawio_demo/src/js/io/mxCellCodec.js",
    "content": "/**\n * Copyright (c) 2006-2015, JGraph Ltd\n * Copyright (c) 2006-2015, Gaudenz Alder\n */\nmxCodecRegistry.register(function()\n{\n\t/**\n\t * Class: mxCellCodec\n\t *\n\t * Codec for <mxCell>s. This class is created and registered\n\t * dynamically at load time and used implicitely via <mxCodec>\n\t * and the <mxCodecRegistry>.\n\t *\n\t * Transient Fields:\n\t *\n\t * - children\n\t * - edges\n\t * - overlays\n\t * - mxTransient\n\t *\n\t * Reference Fields:\n\t *\n\t * - parent\n\t * - source\n\t * - target\n\t * \n\t * Transient fields can be added using the following code:\n\t * \n\t * mxCodecRegistry.getCodec(mxCell).exclude.push('name_of_field');\n\t * \n\t * To subclass <mxCell>, replace the template and add an alias as\n\t * follows.\n\t * \n\t * (code)\n\t * function CustomCell(value, geometry, style)\n\t * {\n\t *   mxCell.apply(this, arguments);\n\t * }\n\t * \n\t * mxUtils.extend(CustomCell, mxCell);\n\t * \n\t * mxCodecRegistry.getCodec(mxCell).template = new CustomCell();\n\t * mxCodecRegistry.addAlias('CustomCell', 'mxCell');\n\t * (end)\n\t */\n\tvar codec = new mxObjectCodec(new mxCell(),\n\t\t['children', 'edges', 'overlays', 'mxTransient'],\n\t\t['parent', 'source', 'target']);\n\n\t/**\n\t * Function: isCellCodec\n\t *\n\t * Returns true since this is a cell codec.\n\t */\n\tcodec.isCellCodec = function()\n\t{\n\t\treturn true;\n\t};\n\n\t/**\n\t * Overidden to disable conversion of value to number.\n\t */\n\tcodec.isNumericAttribute = function(dec, attr, obj)\n\t{\n\t\treturn attr.nodeName !== 'value' && mxObjectCodec.prototype.isNumericAttribute.apply(this, arguments);\n\t};\n\t\n\t/**\n\t * Function: isExcluded\n\t *\n\t * Excludes user objects that are XML nodes.\n\t */ \n\tcodec.isExcluded = function(obj, attr, value, isWrite)\n\t{\n\t\treturn mxObjectCodec.prototype.isExcluded.apply(this, arguments) ||\n\t\t\t(isWrite && attr == 'value' &&\n\t\t\tvalue.nodeType == mxConstants.NODETYPE_ELEMENT);\n\t};\n\t\n\t/**\n\t * Function: afterEncode\n\t *\n\t * Encodes an <mxCell> and wraps the XML up inside the\n\t * XML of the user object (inversion).\n\t */\n\tcodec.afterEncode = function(enc, obj, node)\n\t{\n\t\tif (obj.value != null && obj.value.nodeType == mxConstants.NODETYPE_ELEMENT)\n\t\t{\n\t\t\t// Wraps the graphical annotation up in the user object (inversion)\n\t\t\t// by putting the result of the default encoding into a clone of the\n\t\t\t// user object (node type 1) and returning this cloned user object.\n\t\t\tvar tmp = node;\n\t\t\tnode = mxUtils.importNode(enc.document, obj.value, true);\n\t\t\tnode.appendChild(tmp);\n\t\t\t\n\t\t\t// Moves the id attribute to the outermost XML node, namely the\n\t\t\t// node which denotes the object boundaries in the file.\n\t\t\tvar id = tmp.getAttribute('id');\n\t\t\tnode.setAttribute('id', id);\n\t\t\ttmp.removeAttribute('id');\n\t\t}\n\n\t\treturn node;\n\t};\n\n\t/**\n\t * Function: beforeDecode\n\t *\n\t * Decodes an <mxCell> and uses the enclosing XML node as\n\t * the user object for the cell (inversion).\n\t */\n\tcodec.beforeDecode = function(dec, node, obj)\n\t{\n\t\tvar inner = node.cloneNode(true);\n\t\tvar classname = this.getName();\n\t\t\n\t\tif (node.nodeName != classname)\n\t\t{\n\t\t\t// Passes the inner graphical annotation node to the\n\t\t\t// object codec for further processing of the cell.\n\t\t\tvar tmp = node.getElementsByTagName(classname)[0];\n\t\t\t\n\t\t\tif (tmp != null && tmp.parentNode == node)\n\t\t\t{\n\t\t\t\tmxUtils.removeWhitespace(tmp, true);\n\t\t\t\tmxUtils.removeWhitespace(tmp, false);\n\t\t\t\ttmp.parentNode.removeChild(tmp);\n\t\t\t\tinner = tmp;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tinner = null;\n\t\t\t}\n\t\t\t\n\t\t\t// Creates the user object out of the XML node\n\t\t\tobj.value = node.cloneNode(true);\n\t\t\tvar id = obj.value.getAttribute('id');\n\t\t\t\n\t\t\tif (id != null)\n\t\t\t{\n\t\t\t\tobj.setId(id);\n\t\t\t\tobj.value.removeAttribute('id');\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Uses ID from XML file as ID for cell in model\n\t\t\tobj.setId(node.getAttribute('id'));\n\t\t}\n\t\t\t\n\t\t// Preprocesses and removes all Id-references in order to use the\n\t\t// correct encoder (this) for the known references to cells (all).\n\t\tif (inner != null)\n\t\t{\n\t\t\tfor (var i = 0; i < this.idrefs.length; i++)\n\t\t\t{\n\t\t\t\tvar attr = this.idrefs[i];\n\t\t\t\tvar ref = inner.getAttribute(attr);\n\t\t\t\t\n\t\t\t\tif (ref != null)\n\t\t\t\t{\n\t\t\t\t\tinner.removeAttribute(attr);\n\t\t\t\t\tvar object = dec.objects[ref] || dec.lookup(ref);\n\t\t\t\t\t\n\t\t\t\t\tif (object == null)\n\t\t\t\t\t{\n\t\t\t\t\t\t// Needs to decode forward reference\n\t\t\t\t\t\tvar element = dec.getElementById(ref);\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (element != null)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tvar decoder = mxCodecRegistry.codecs[element.nodeName] || this;\n\t\t\t\t\t\t\tobject = decoder.decode(dec, element);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tobj[attr] = object;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn inner;\n\t};\n\n\t// Returns the codec into the registry\n\treturn codec;\n\n}());\n"
  },
  {
    "path": "static/cherry/drawio_demo/src/js/io/mxChildChangeCodec.js",
    "content": "/**\n * Copyright (c) 2006-2015, JGraph Ltd\n * Copyright (c) 2006-2015, Gaudenz Alder\n */\nmxCodecRegistry.register(function()\n{\n\t/**\n\t * Class: mxChildChangeCodec\n\t *\n\t * Codec for <mxChildChange>s. This class is created and registered\n\t * dynamically at load time and used implicitely via <mxCodec> and\n\t * the <mxCodecRegistry>.\n\t *\n\t * Transient Fields:\n\t *\n\t * - model\n\t * - previous\n\t * - previousIndex\n\t * - child\n\t *\n\t * Reference Fields:\n\t *\n\t * - parent\n\t */\n\tvar codec = new mxObjectCodec(new mxChildChange(),\n\t\t['model', 'child', 'previousIndex'],\n\t\t['parent', 'previous']);\n\n\t/**\n\t * Function: isReference\n\t *\n\t * Returns true for the child attribute if the child\n\t * cell had a previous parent or if we're reading the\n\t * child as an attribute rather than a child node, in\n\t * which case it's always a reference.\n\t */\n\tcodec.isReference = function(obj, attr, value, isWrite)\n\t{\n\t\tif (attr == 'child' && (obj.previous != null || !isWrite))\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\treturn mxUtils.indexOf(this.idrefs, attr) >= 0;\n\t};\n\n\t/**\n\t * Function: afterEncode\n\t *\n\t * Encodes the child recusively and adds the result\n\t * to the given node.\n\t */\n\tcodec.afterEncode = function(enc, obj, node)\n\t{\n\t\tif (this.isReference(obj, 'child',  obj.child, true))\n\t\t{\n\t\t\t// Encodes as reference (id)\n\t\t\tnode.setAttribute('child', enc.getId(obj.child));\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// At this point, the encoder is no longer able to know which cells\n\t\t\t// are new, so we have to encode the complete cell hierarchy and\n\t\t\t// ignore the ones that are already there at decoding time. Note:\n\t\t\t// This can only be resolved by moving the notify event into the\n\t\t\t// execute of the edit.\n\t\t\tenc.encodeCell(obj.child, node);\n\t\t}\n\t\t\n\t\treturn node;\n\t};\n\n\t/**\n\t * Function: beforeDecode\n\t *\n\t * Decodes the any child nodes as using the respective\n\t * codec from the registry.\n\t */\n\tcodec.beforeDecode = function(dec, node, obj)\n\t{\n\t\tif (node.firstChild != null &&\n\t\t\tnode.firstChild.nodeType == mxConstants.NODETYPE_ELEMENT)\n\t\t{\n\t\t\t// Makes sure the original node isn't modified\n\t\t\tnode = node.cloneNode(true);\n\t\t\t\n\t\t\tvar tmp = node.firstChild;\n\t\t\tobj.child = dec.decodeCell(tmp, false);\n\n\t\t\tvar tmp2 = tmp.nextSibling;\n\t\t\ttmp.parentNode.removeChild(tmp);\n\t\t\ttmp = tmp2;\n\t\t\t\n\t\t\twhile (tmp != null)\n\t\t\t{\n\t\t\t\ttmp2 = tmp.nextSibling;\n\t\t\t\t\n\t\t\t\tif (tmp.nodeType == mxConstants.NODETYPE_ELEMENT)\n\t\t\t\t{\n\t\t\t\t\t// Ignores all existing cells because those do not need to\n\t\t\t\t\t// be re-inserted into the model. Since the encoded version\n\t\t\t\t\t// of these cells contains the new parent, this would leave\n\t\t\t\t\t// to an inconsistent state on the model (ie. a parent\n\t\t\t\t\t// change without a call to parentForCellChanged).\n\t\t\t\t\tvar id = tmp.getAttribute('id');\n\t\t\t\t\t\n\t\t\t\t\tif (dec.lookup(id) == null)\n\t\t\t\t\t{\n\t\t\t\t\t\tdec.decodeCell(tmp);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\ttmp.parentNode.removeChild(tmp);\n\t\t\t\ttmp = tmp2;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tvar childRef = node.getAttribute('child');\n\t\t\tobj.child = dec.getObject(childRef);\n\t\t}\n\t\t\n\t\treturn node;\n\t};\n\t\n\t/**\n\t * Function: afterDecode\n\t *\n\t * Restores object state in the child change.\n\t */\n\tcodec.afterDecode = function(dec, node, obj)\n\t{\n\t\t// Cells are encoded here after a complete transaction so the previous\n\t\t// parent must be restored on the cell for the case where the cell was\n\t\t// added. This is needed for the local model to identify the cell as a\n\t\t// new cell and register the ID.\n        if (obj.child != null)\n        {\n            if (obj.child.parent != null && obj.previous != null &&\n                obj.child.parent != obj.previous)\n            {\n            \t\n                obj.previous = obj.child.parent;\n            }\n\n            obj.child.parent = obj.previous;\n            obj.previous = obj.parent;\n            obj.previousIndex = obj.index;\n        }\n\n\t\treturn obj;\n\t};\n\n\t// Returns the codec into the registry\n\treturn codec;\n\n}());\n"
  },
  {
    "path": "static/cherry/drawio_demo/src/js/io/mxCodec.js",
    "content": "/**\n * Copyright (c) 2006-2015, JGraph Ltd\n * Copyright (c) 2006-2015, Gaudenz Alder\n */\n/**\n * Class: mxCodec\n *\n * XML codec for JavaScript object graphs. See <mxObjectCodec> for a\n * description of the general encoding/decoding scheme. This class uses the\n * codecs registered in <mxCodecRegistry> for encoding/decoding each object.\n * \n * References:\n * \n * In order to resolve references, especially forward references, the mxCodec\n * constructor must be given the document that contains the referenced\n * elements.\n *\n * Examples:\n *\n * The following code is used to encode a graph model.\n *\n * (code)\n * var encoder = new mxCodec();\n * var result = encoder.encode(graph.getModel());\n * var xml = mxUtils.getXml(result);\n * (end)\n * \n * Example:\n * \n * Using the code below, an XML document is decoded into an existing model. The\n * document may be obtained using one of the functions in mxUtils for loading\n * an XML file, eg. <mxUtils.get>, or using <mxUtils.parseXml> for parsing an\n * XML string.\n * \n * (code)\n * var doc = mxUtils.parseXml(xmlString);\n * var codec = new mxCodec(doc);\n * codec.decode(doc.documentElement, graph.getModel());\n * (end)\n * \n * Example:\n * \n * This example demonstrates parsing a list of isolated cells into an existing\n * graph model. Note that the cells do not have a parent reference so they can\n * be added anywhere in the cell hierarchy after parsing.\n * \n * (code)\n * var xml = '<root><mxCell id=\"2\" value=\"Hello,\" vertex=\"1\"><mxGeometry x=\"20\" y=\"20\" width=\"80\" height=\"30\" as=\"geometry\"/></mxCell><mxCell id=\"3\" value=\"World!\" vertex=\"1\"><mxGeometry x=\"200\" y=\"150\" width=\"80\" height=\"30\" as=\"geometry\"/></mxCell><mxCell id=\"4\" value=\"\" edge=\"1\" source=\"2\" target=\"3\"><mxGeometry relative=\"1\" as=\"geometry\"/></mxCell></root>';\n * var doc = mxUtils.parseXml(xml);\n * var codec = new mxCodec(doc);\n * var elt = doc.documentElement.firstChild;\n * var cells = [];\n * \n * while (elt != null)\n * {\n *   cells.push(codec.decode(elt));\n *   elt = elt.nextSibling;\n * }\n * \n * graph.addCells(cells);\n * (end)\n * \n * Example:\n * \n * Using the following code, the selection cells of a graph are encoded and the\n * output is displayed in a dialog box.\n * \n * (code)\n * var enc = new mxCodec();\n * var cells = graph.getSelectionCells();\n * mxUtils.alert(mxUtils.getPrettyXml(enc.encode(cells)));\n * (end)\n * \n * Newlines in the XML can be converted to <br>, in which case a '<br>' argument\n * must be passed to <mxUtils.getXml> as the second argument.\n * \n * Debugging:\n * \n * For debugging I/O you can use the following code to get the sequence of\n * encoded objects:\n * \n * (code)\n * var oldEncode = mxCodec.prototype.encode;\n * mxCodec.prototype.encode = function(obj)\n * {\n *   mxLog.show();\n *   mxLog.debug('mxCodec.encode: obj='+mxUtils.getFunctionName(obj.constructor));\n *   \n *   return oldEncode.apply(this, arguments);\n * };\n * (end)\n * \n * Note that the I/O system adds object codecs for new object automatically. For\n * decoding those objects, the constructor should be written as follows:\n * \n * (code)\n * var MyObj = function(name)\n * {\n *   // ...\n * };\n * (end)\n * \n * Constructor: mxCodec\n *\n * Constructs an XML encoder/decoder for the specified\n * owner document.\n *\n * Parameters:\n *\n * document - Optional XML document that contains the data.\n * If no document is specified then a new document is created\n * using <mxUtils.createXmlDocument>.\n */\nfunction mxCodec(document)\n{\n\tthis.document = document || mxUtils.createXmlDocument();\n\tthis.objects = [];\n};\n\n/**\n * Variable: document\n *\n * The owner document of the codec.\n */\nmxCodec.prototype.document = null;\n\n/**\n * Variable: objects\n *\n * Maps from IDs to objects.\n */\nmxCodec.prototype.objects = null;\n\n/**\n * Variable: elements\n * \n * Lookup table for resolving IDs to elements.\n */\nmxCodec.prototype.elements = null;\n\n/**\n * Variable: encodeDefaults\n *\n * Specifies if default values should be encoded. Default is false.\n */\nmxCodec.prototype.encodeDefaults = false;\n\n\n/**\n * Function: putObject\n * \n * Assoiates the given object with the given ID and returns the given object.\n * \n * Parameters\n * \n * id - ID for the object to be associated with.\n * obj - Object to be associated with the ID.\n */\nmxCodec.prototype.putObject = function(id, obj)\n{\n\tthis.objects[id] = obj;\n\t\n\treturn obj;\n};\n\n/**\n * Function: getObject\n *\n * Returns the decoded object for the element with the specified ID in\n * <document>. If the object is not known then <lookup> is used to find an\n * object. If no object is found, then the element with the respective ID\n * from the document is parsed using <decode>.\n */\nmxCodec.prototype.getObject = function(id)\n{\n\tvar obj = null;\n\n\tif (id != null)\n\t{\n\t\tobj = this.objects[id];\n\t\t\n\t\tif (obj == null)\n\t\t{\n\t\t\tobj = this.lookup(id);\n\t\t\t\n\t\t\tif (obj == null)\n\t\t\t{\n\t\t\t\tvar node = this.getElementById(id);\n\t\t\t\t\n\t\t\t\tif (node != null)\n\t\t\t\t{\n\t\t\t\t\tobj = this.decode(node);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t\n\treturn obj;\n};\n\n/**\n * Function: lookup\n *\n * Hook for subclassers to implement a custom lookup mechanism for cell IDs.\n * This implementation always returns null.\n *\n * Example:\n *\n * (code)\n * var codec = new mxCodec();\n * codec.lookup = function(id)\n * {\n *   return model.getCell(id);\n * };\n * (end)\n *\n * Parameters:\n *\n * id - ID of the object to be returned.\n */\nmxCodec.prototype.lookup = function(id)\n{\n\treturn null;\n};\n\n/**\n * Function: getElementById\n *\n * Returns the element with the given ID from <document>.\n *\n * Parameters:\n *\n * id - String that contains the ID.\n */\nmxCodec.prototype.getElementById = function(id)\n{\n\tif (this.elements == null)\n\t{\n\t\tthis.elements = new Object();\n\t\t\n\t\tif (this.document.documentElement != null)\n\t\t{\n\t\t\tthis.addElement(this.document.documentElement);\n\t\t}\n\t}\n\t\n\treturn this.elements[id];\n};\n\n/**\n * Function: addElement\n *\n * Adds the given element to <elements> if it has an ID.\n */\nmxCodec.prototype.addElement = function(node)\n{\n\tif (node.nodeType == mxConstants.NODETYPE_ELEMENT)\n\t{\n\t\tvar id = node.getAttribute('id');\n\t\t\n\t\tif (id != null && this.elements[id] == null)\n\t\t{\n\t\t\tthis.elements[id] = node;\n\t\t}\n\t}\n\t\n\tnode = node.firstChild;\n\t\n\twhile (node != null)\n\t{\n\t\tthis.addElement(node);\n\t\tnode = node.nextSibling;\n\t}\n};\n\n/**\n * Function: getId\n *\n * Returns the ID of the specified object. This implementation\n * calls <reference> first and if that returns null handles\n * the object as an <mxCell> by returning their IDs using\n * <mxCell.getId>. If no ID exists for the given cell, then\n * an on-the-fly ID is generated using <mxCellPath.create>.\n *\n * Parameters:\n *\n * obj - Object to return the ID for.\n */\nmxCodec.prototype.getId = function(obj)\n{\n\tvar id = null;\n\t\n\tif (obj != null)\n\t{\n\t\tid = this.reference(obj);\n\t\t\n\t\tif (id == null && obj instanceof mxCell)\n\t\t{\n\t\t\tid = obj.getId();\n\t\t\t\n\t\t\tif (id == null)\n\t\t\t{\n\t\t\t\t// Uses an on-the-fly Id\n\t\t\t\tid = mxCellPath.create(obj);\n\t\t\t\t\n\t\t\t\tif (id.length == 0)\n\t\t\t\t{\n\t\t\t\t\tid = 'root';\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t\n\treturn id;\n};\n\n/**\n * Function: reference\n *\n * Hook for subclassers to implement a custom method\n * for retrieving IDs from objects. This implementation\n * always returns null.\n *\n * Example:\n *\n * (code)\n * var codec = new mxCodec();\n * codec.reference = function(obj)\n * {\n *   return obj.getCustomId();\n * };\n * (end)\n *\n * Parameters:\n *\n * obj - Object whose ID should be returned.\n */\nmxCodec.prototype.reference = function(obj)\n{\n\treturn null;\n};\n\n/**\n * Function: encode\n *\n * Encodes the specified object and returns the resulting\n * XML node.\n *\n * Parameters:\n *\n * obj - Object to be encoded. \n */\nmxCodec.prototype.encode = function(obj)\n{\n\tvar node = null;\n\t\n\tif (obj != null && obj.constructor != null)\n\t{\n\t\tvar enc = mxCodecRegistry.getCodec(obj.constructor);\n\t\t\n\t\tif (enc != null)\n\t\t{\n\t\t\tnode = enc.encode(this, obj);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif (mxUtils.isNode(obj))\n\t\t\t{\n\t\t\t\tnode = mxUtils.importNode(this.document, obj, true);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t    \t\tmxLog.warn('mxCodec.encode: No codec for ' + mxUtils.getFunctionName(obj.constructor));\n\t\t\t}\n\t\t}\n\t}\n\t\n\treturn node;\n};\n\n/**\n * Function: decode\n *\n * Decodes the given XML node. The optional \"into\"\n * argument specifies an existing object to be\n * used. If no object is given, then a new instance\n * is created using the constructor from the codec.\n *\n * The function returns the passed in object or\n * the new instance if no object was given.\n *\n * Parameters:\n *\n * node - XML node to be decoded.\n * into - Optional object to be decodec into.\n */\nmxCodec.prototype.decode = function(node, into)\n{\n\tvar obj = null;\n\t\n\tif (node != null && node.nodeType == mxConstants.NODETYPE_ELEMENT)\n\t{\n\t\tvar ctor = null;\n\t\t\n\t\ttry\n\t\t{\n\t\t\tctor = window[node.nodeName];\n\t\t}\n\t\tcatch (err)\n\t\t{\n\t\t\t// ignore\n\t\t}\n\t\t\n\t\tvar dec = mxCodecRegistry.getCodec(ctor);\n\t\t\n\t\tif (dec != null)\n\t\t{\n\t\t\tobj = dec.decode(this, node, into);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tobj = node.cloneNode(true);\n\t\t\tobj.removeAttribute('as');\n\t\t}\n\t}\n\t\n\treturn obj;\n};\n\n/**\n * Function: encodeCell\n *\n * Encoding of cell hierarchies is built-into the core, but\n * is a higher-level function that needs to be explicitely\n * used by the respective object encoders (eg. <mxModelCodec>,\n * <mxChildChangeCodec> and <mxRootChangeCodec>). This\n * implementation writes the given cell and its children as a\n * (flat) sequence into the given node. The children are not\n * encoded if the optional includeChildren is false. The\n * function is in charge of adding the result into the\n * given node and has no return value.\n *\n * Parameters:\n *\n * cell - <mxCell> to be encoded.\n * node - Parent XML node to add the encoded cell into.\n * includeChildren - Optional boolean indicating if the\n * function should include all descendents. Default is true. \n */\nmxCodec.prototype.encodeCell = function(cell, node, includeChildren)\n{\n\tnode.appendChild(this.encode(cell));\n\t\n\tif (includeChildren == null || includeChildren)\n\t{\n\t\tvar childCount = cell.getChildCount();\n\t\t\n\t\tfor (var i = 0; i < childCount; i++)\n\t\t{\n\t\t\tthis.encodeCell(cell.getChildAt(i), node);\n\t\t}\n\t}\n};\n\n/**\n * Function: isCellCodec\n * \n * Returns true if the given codec is a cell codec. This uses\n * <mxCellCodec.isCellCodec> to check if the codec is of the\n * given type.\n */\nmxCodec.prototype.isCellCodec = function(codec)\n{\n\tif (codec != null && typeof(codec.isCellCodec) == 'function')\n\t{\n\t\treturn codec.isCellCodec();\n\t}\n\t\n\treturn false;\n};\n\n/**\n * Function: decodeCell\n *\n * Decodes cells that have been encoded using inversion, ie.\n * where the user object is the enclosing node in the XML,\n * and restores the group and graph structure in the cells.\n * Returns a new <mxCell> instance that represents the\n * given node.\n *\n * Parameters:\n *\n * node - XML node that contains the cell data.\n * restoreStructures - Optional boolean indicating whether\n * the graph structure should be restored by calling insert\n * and insertEdge on the parent and terminals, respectively.\n * Default is true.\n */\nmxCodec.prototype.decodeCell = function(node, restoreStructures)\n{\n\trestoreStructures = (restoreStructures != null) ? restoreStructures : true;\n\tvar cell = null;\n\t\n\tif (node != null && node.nodeType == mxConstants.NODETYPE_ELEMENT)\n\t{\n\t\t// Tries to find a codec for the given node name. If that does\n\t\t// not return a codec then the node is the user object (an XML node\n\t\t// that contains the mxCell, aka inversion).\n\t\tvar decoder = mxCodecRegistry.getCodec(node.nodeName);\n\t\t\n\t\t// Tries to find the codec for the cell inside the user object.\n\t\t// This assumes all node names inside the user object are either\n\t\t// not registered or they correspond to a class for cells.\n\t\tif (!this.isCellCodec(decoder))\n\t\t{\n\t\t\tvar child = node.firstChild;\n\t\t\t\n\t\t\twhile (child != null && !this.isCellCodec(decoder))\n\t\t\t{\n\t\t\t\tdecoder = mxCodecRegistry.getCodec(child.nodeName);\n\t\t\t\tchild = child.nextSibling;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (!this.isCellCodec(decoder))\n\t\t{\n\t\t\tdecoder = mxCodecRegistry.getCodec(mxCell);\n\t\t}\n\n\t\tcell = decoder.decode(this, node);\n\t\t\n\t\tif (restoreStructures)\n\t\t{\n\t\t\tthis.insertIntoGraph(cell);\n\t\t}\n\t}\n\t\n\treturn cell;\n};\n\n/**\n * Function: insertIntoGraph\n *\n * Inserts the given cell into its parent and terminal cells.\n */\nmxCodec.prototype.insertIntoGraph = function(cell)\n{\n\tvar parent = cell.parent;\n\tvar source = cell.getTerminal(true);\n\tvar target = cell.getTerminal(false);\n\n\t// Fixes possible inconsistencies during insert into graph\n\tcell.setTerminal(null, false);\n\tcell.setTerminal(null, true);\n\tcell.parent = null;\n\t\n\tif (parent != null)\n\t{\n\t\tparent.insert(cell);\n\t}\n\n\tif (source != null)\n\t{\n\t\tsource.insertEdge(cell, true);\n\t}\n\n\tif (target != null)\n\t{\n\t\ttarget.insertEdge(cell, false);\n\t}\n};\n\n/**\n * Function: setAttribute\n *\n * Sets the attribute on the specified node to value. This is a\n * helper method that makes sure the attribute and value arguments\n * are not null.\n *\n * Parameters:\n *\n * node - XML node to set the attribute for.\n * attributes - Attributename to be set.\n * value - New value of the attribute.\n */\nmxCodec.prototype.setAttribute = function(node, attribute, value)\n{\n\tif (attribute != null && value != null)\n\t{\n\t\tnode.setAttribute(attribute, value);\n\t}\n};\n"
  },
  {
    "path": "static/cherry/drawio_demo/src/js/io/mxCodecRegistry.js",
    "content": "/**\n * Copyright (c) 2006-2015, JGraph Ltd\n * Copyright (c) 2006-2015, Gaudenz Alder\n */\nvar mxCodecRegistry =\n{\n\t/**\n\t * Class: mxCodecRegistry\n\t *\n\t * Singleton class that acts as a global registry for codecs.\n\t *\n\t * Adding an <mxCodec>:\n\t *\n\t * 1. Define a default codec with a new instance of the \n\t * object to be handled.\n\t *\n\t * (code)\n\t * var codec = new mxObjectCodec(new mxGraphModel());\n\t * (end)\n\t *\n\t * 2. Define the functions required for encoding and decoding\n\t * objects.\n\t *\n\t * (code)\n\t * codec.encode = function(enc, obj) { ... }\n\t * codec.decode = function(dec, node, into) { ... }\n\t * (end)\n\t *\n\t * 3. Register the codec in the <mxCodecRegistry>.\n\t *\n\t * (code)\n\t * mxCodecRegistry.register(codec);\n\t * (end)\n\t *\n\t * <mxObjectCodec.decode> may be used to either create a new \n\t * instance of an object or to configure an existing instance, \n\t * in which case the into argument points to the existing\n\t * object. In this case, we say the codec \"configures\" the\n\t * object.\n\t * \n\t * Variable: codecs\n\t *\n\t * Maps from constructor names to codecs.\n\t */\n\tcodecs: [],\n\t\n\t/**\n\t * Variable: aliases\n\t *\n\t * Maps from classnames to codecnames.\n\t */\n\taliases: [],\n\n\t/**\n\t * Function: register\n\t *\n\t * Registers a new codec and associates the name of the template\n\t * constructor in the codec with the codec object.\n\t *\n\t * Parameters:\n\t *\n\t * codec - <mxObjectCodec> to be registered.\n\t */\n\tregister: function(codec)\n\t{\n\t\tif (codec != null)\n\t\t{\n\t\t\tvar name = codec.getName();\n\t\t\tmxCodecRegistry.codecs[name] = codec;\n\t\t\t\n\t\t\tvar classname = mxUtils.getFunctionName(codec.template.constructor);\n\n\t\t\tif (classname != name)\n\t\t\t{\n\t\t\t\tmxCodecRegistry.addAlias(classname, name);\n\t\t\t}\n\t\t}\n\n\t\treturn codec;\n\t},\n\n\t/**\n\t * Function: addAlias\n\t *\n\t * Adds an alias for mapping a classname to a codecname.\n\t */\n\taddAlias: function(classname, codecname)\n\t{\n\t\tmxCodecRegistry.aliases[classname] = codecname;\n\t},\n\n\t/**\n\t * Function: getCodec\n\t *\n\t * Returns a codec that handles objects that are constructed\n\t * using the given constructor.\n\t *\n\t * Parameters:\n\t *\n\t * ctor - JavaScript constructor function. \n\t */\n\tgetCodec: function(ctor)\n\t{\n\t\tvar codec = null;\n\t\t\n\t\tif (ctor != null)\n\t\t{\n\t\t\tvar name = mxUtils.getFunctionName(ctor);\n\t\t\tvar tmp = mxCodecRegistry.aliases[name];\n\t\t\t\n\t\t\tif (tmp != null)\n\t\t\t{\n\t\t\t\tname = tmp;\n\t\t\t}\n\t\t\t\n\t\t\tcodec = mxCodecRegistry.codecs[name];\n\t\t\t\n\t\t\t// Registers a new default codec for the given constructor\n\t\t\t// if no codec has been previously defined.\n\t\t\tif (codec == null)\n\t\t\t{\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tcodec = new mxObjectCodec(new ctor());\n\t\t\t\t\tmxCodecRegistry.register(codec);\n\t\t\t\t}\n\t\t\t\tcatch (e)\n\t\t\t\t{\n\t\t\t\t\t// ignore\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn codec;\n\t}\n\n};\n"
  },
  {
    "path": "static/cherry/drawio_demo/src/js/io/mxDefaultKeyHandlerCodec.js",
    "content": "/**\n * Copyright (c) 2006-2015, JGraph Ltd\n * Copyright (c) 2006-2015, Gaudenz Alder\n */\nmxCodecRegistry.register(function()\n{\n\t/**\n\t * Class: mxDefaultKeyHandlerCodec\n\t *\n\t * Custom codec for configuring <mxDefaultKeyHandler>s. This class is created\n\t * and registered dynamically at load time and used implicitely via\n\t * <mxCodec> and the <mxCodecRegistry>. This codec only reads configuration\n\t * data for existing key handlers, it does not encode or create key handlers.\n\t */\n\tvar codec = new mxObjectCodec(new mxDefaultKeyHandler());\n\n\t/**\n\t * Function: encode\n\t *\n\t * Returns null.\n\t */\n\tcodec.encode = function(enc, obj)\n\t{\n\t\treturn null;\n\t};\n\t\n\t/**\n\t * Function: decode\n\t *\n\t * Reads a sequence of the following child nodes\n\t * and attributes:\n\t *\n\t * Child Nodes:\n\t *\n\t * add - Binds a keystroke to an actionname.\n\t *\n\t * Attributes:\n\t *\n\t * as - Keycode.\n\t * action - Actionname to execute in editor.\n\t * control - Optional boolean indicating if\n\t * \t\tthe control key must be pressed.\n\t *\n\t * Example:\n\t *\n\t * (code)\n\t * <mxDefaultKeyHandler as=\"keyHandler\">\n\t *   <add as=\"88\" control=\"true\" action=\"cut\"/>\n\t *   <add as=\"67\" control=\"true\" action=\"copy\"/>\n\t *   <add as=\"86\" control=\"true\" action=\"paste\"/>\n\t * </mxDefaultKeyHandler>\n\t * (end)\n\t *\n\t * The keycodes are for the x, c and v keys.\n\t *\n\t * See also: <mxDefaultKeyHandler.bindAction>,\n\t * http://www.js-examples.com/page/tutorials__key_codes.html\n\t */\n\tcodec.decode = function(dec, node, into)\n\t{\n\t\tif (into != null)\n\t\t{\n\t\t\tvar editor = into.editor;\n\t\t\tnode = node.firstChild;\n\t\t\t\n\t\t\twhile (node != null)\n\t\t\t{\n\t\t\t\tif (!this.processInclude(dec, node, into) &&\n\t\t\t\t\tnode.nodeName == 'add')\n\t\t\t\t{\n\t\t\t\t\tvar as = node.getAttribute('as');\n\t\t\t\t\tvar action = node.getAttribute('action');\n\t\t\t\t\tvar control = node.getAttribute('control');\n\t\t\t\t\t\n\t\t\t\t\tinto.bindAction(as, action, control);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tnode = node.nextSibling;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn into;\n\t};\n\n\t// Returns the codec into the registry\n\treturn codec;\n\n}());\n"
  },
  {
    "path": "static/cherry/drawio_demo/src/js/io/mxDefaultPopupMenuCodec.js",
    "content": "/**\n * Copyright (c) 2006-2015, JGraph Ltd\n * Copyright (c) 2006-2015, Gaudenz Alder\n */\nmxCodecRegistry.register(function()\n{\n\t/**\n\t * Class: mxDefaultPopupMenuCodec\n\t *\n\t * Custom codec for configuring <mxDefaultPopupMenu>s. This class is created\n\t * and registered dynamically at load time and used implicitely via\n\t * <mxCodec> and the <mxCodecRegistry>. This codec only reads configuration\n\t * data for existing popup menus, it does not encode or create menus. Note\n\t * that this codec only passes the configuration node to the popup menu,\n\t * which uses the config to dynamically create menus. See\n\t * <mxDefaultPopupMenu.createMenu>.\n\t */\n\tvar codec = new mxObjectCodec(new mxDefaultPopupMenu());\n\n\t/**\n\t * Function: encode\n\t *\n\t * Returns null.\n\t */\n\tcodec.encode = function(enc, obj)\n\t{\n\t\treturn null;\n\t};\n\t\n\t/**\n\t * Function: decode\n\t *\n\t * Uses the given node as the config for <mxDefaultPopupMenu>.\n\t */\n\tcodec.decode = function(dec, node, into)\n\t{\n\t\tvar inc = node.getElementsByTagName('include')[0];\n\t\t\n\t\tif (inc != null)\n\t\t{\n\t\t\tthis.processInclude(dec, inc, into);\n\t\t}\n\t\telse if (into != null)\n\t\t{\n\t\t\tinto.config = node;\n\t\t}\n\t\t\n\t\treturn into;\n\t};\n\t\n\t// Returns the codec into the registry\n\treturn codec;\n\n}());\n"
  },
  {
    "path": "static/cherry/drawio_demo/src/js/io/mxDefaultToolbarCodec.js",
    "content": "/**\n * Copyright (c) 2006-2015, JGraph Ltd\n * Copyright (c) 2006-2015, Gaudenz Alder\n */\n/**\n * Class: mxDefaultToolbarCodec\n *\n * Custom codec for configuring <mxDefaultToolbar>s. This class is created\n * and registered dynamically at load time and used implicitely via\n * <mxCodec> and the <mxCodecRegistry>. This codec only reads configuration\n * data for existing toolbars handlers, it does not encode or create toolbars.\n */\nvar mxDefaultToolbarCodec = mxCodecRegistry.register(function()\n{\n\tvar codec = new mxObjectCodec(new mxDefaultToolbar());\n\n\t/**\n\t * Function: encode\n\t *\n\t * Returns null.\n\t */\n\tcodec.encode = function(enc, obj)\n\t{\n\t\treturn null;\n\t};\n\t\n\t/**\n\t * Function: decode\n\t *\n\t * Reads a sequence of the following child nodes\n\t * and attributes:\n\t *\n\t * Child Nodes:\n\t *\n\t * add - Adds a new item to the toolbar. See below for attributes.\n\t * separator - Adds a vertical separator. No attributes.\n\t * hr - Adds a horizontal separator. No attributes.\n\t * br - Adds a linefeed. No attributes. \n\t *\n\t * Attributes:\n\t *\n\t * as - Resource key for the label.\n\t * action - Name of the action to execute in enclosing editor.\n\t * mode - Modename (see below).\n\t * template - Template name for cell insertion.\n\t * style - Optional style to override the template style.\n\t * icon - Icon (relative/absolute URL).\n\t * pressedIcon - Optional icon for pressed state (relative/absolute URL).\n\t * id - Optional ID to be used for the created DOM element.\n\t * toggle - Optional 0 or 1 to disable toggling of the element. Default is\n\t * 1 (true).\n\t *\n\t * The action, mode and template attributes are mutually exclusive. The\n\t * style can only be used with the template attribute. The add node may\n\t * contain another sequence of add nodes with as and action attributes\n\t * to create a combo box in the toolbar. If the icon is specified then\n\t * a list of the child node is expected to have its template attribute\n\t * set and the action is ignored instead.\n\t * \n\t * Nodes with a specified template may define a function to be used for\n\t * inserting the cloned template into the graph. Here is an example of such\n\t * a node:\n\t * \n\t * (code)\n\t * <add as=\"Swimlane\" template=\"swimlane\" icon=\"images/swimlane.gif\"><![CDATA[\n\t *   function (editor, cell, evt, targetCell)\n\t *   {\n\t *     var pt = mxUtils.convertPoint(\n\t *       editor.graph.container, mxEvent.getClientX(evt),\n\t *         mxEvent.getClientY(evt));\n\t *     return editor.addVertex(targetCell, cell, pt.x, pt.y);\n\t *   }\n\t * ]]></add>\n\t * (end)\n\t * \n\t * In the above function, editor is the enclosing <mxEditor> instance, cell\n\t * is the clone of the template, evt is the mouse event that represents the\n\t * drop and targetCell is the cell under the mousepointer where the drop\n\t * occurred. The targetCell is retrieved using <mxGraph.getCellAt>.\n\t *\n\t * Futhermore, nodes with the mode attribute may define a function to\n\t * be executed upon selection of the respective toolbar icon. In the\n\t * example below, the default edge style is set when this specific\n\t * connect-mode is activated:\n\t *\n\t * (code)\n\t * <add as=\"connect\" mode=\"connect\"><![CDATA[\n\t *   function (editor)\n\t *   {\n\t *     if (editor.defaultEdge != null)\n\t *     {\n\t *       editor.defaultEdge.style = 'straightEdge';\n\t *     }\n\t *   }\n\t * ]]></add>\n\t * (end)\n\t * \n\t * Both functions require <mxDefaultToolbarCodec.allowEval> to be set to true.\n\t *\n\t * Modes:\n\t *\n\t * select - Left mouse button used for rubberband- & cell-selection.\n\t * connect - Allows connecting vertices by inserting new edges.\n\t * pan - Disables selection and switches to panning on the left button.\n\t *\n\t * Example:\n\t *\n\t * To add items to the toolbar:\n\t * \n\t * (code)\n\t * <mxDefaultToolbar as=\"toolbar\">\n\t *   <add as=\"save\" action=\"save\" icon=\"images/save.gif\"/>\n\t *   <br/><hr/>\n\t *   <add as=\"select\" mode=\"select\" icon=\"images/select.gif\"/>\n\t *   <add as=\"connect\" mode=\"connect\" icon=\"images/connect.gif\"/>\n\t * </mxDefaultToolbar>\n\t * (end)\n\t */\n\tcodec.decode = function(dec, node, into)\n\t{\n\t\tif (into != null)\n\t\t{\n\t\t\tvar editor = into.editor;\n\t\t\tnode = node.firstChild;\n\t\t\t\n\t\t\twhile (node != null)\n\t\t\t{\n\t\t\t\tif (node.nodeType == mxConstants.NODETYPE_ELEMENT)\n\t\t\t\t{\n\t\t\t\t\tif (!this.processInclude(dec, node, into))\n\t\t\t\t\t{\n\t\t\t\t\t\tif (node.nodeName == 'separator')\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tinto.addSeparator();\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if (node.nodeName == 'br')\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tinto.toolbar.addBreak();\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if (node.nodeName == 'hr')\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tinto.toolbar.addLine();\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if (node.nodeName == 'add')\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tvar as = node.getAttribute('as');\n\t\t\t\t\t\t\tas = mxResources.get(as) || as;\n\t\t\t\t\t\t\tvar icon = node.getAttribute('icon');\n\t\t\t\t\t\t\tvar pressedIcon = node.getAttribute('pressedIcon');\n\t\t\t\t\t\t\tvar action = node.getAttribute('action');\n\t\t\t\t\t\t\tvar mode = node.getAttribute('mode');\n\t\t\t\t\t\t\tvar template = node.getAttribute('template');\n\t\t\t\t\t\t\tvar toggle = node.getAttribute('toggle') != '0';\n\t\t\t\t\t\t\tvar text = mxUtils.getTextContent(node);\n\t\t\t\t\t\t\tvar elt = null;\n\n\t\t\t\t\t\t\tif (action != null)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\telt = into.addItem(as, icon, action, pressedIcon);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse if (mode != null)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tvar funct = (mxDefaultToolbarCodec.allowEval) ? mxUtils.eval(text) : null;\n\t\t\t\t\t\t\t\telt = into.addMode(as, icon, mode, pressedIcon, funct);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse if (template != null || (text != null && text.length > 0))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tvar cell = editor.templates[template];\n\t\t\t\t\t\t\t\tvar style = node.getAttribute('style');\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tif (cell != null && style != null)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tcell = editor.graph.cloneCell(cell);\n\t\t\t\t\t\t\t\t\tcell.setStyle(style);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tvar insertFunction = null;\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tif (text != null && text.length > 0 && mxDefaultToolbarCodec.allowEval)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tinsertFunction = mxUtils.eval(text);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\telt = into.addPrototype(as, icon, cell, pressedIcon, insertFunction, toggle);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tvar children = mxUtils.getChildNodes(node);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tif (children.length > 0)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tif (icon == null)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tvar combo = into.addActionCombo(as);\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tfor (var i=0; i<children.length; i++)\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\tvar child = children[i];\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\tif (child.nodeName == 'separator')\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\tinto.addOption(combo, '---');\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\telse if (child.nodeName == 'add')\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\tvar lab = child.getAttribute('as');\n\t\t\t\t\t\t\t\t\t\t\t\tvar act = child.getAttribute('action');\n\t\t\t\t\t\t\t\t\t\t\t\tinto.addActionOption(combo, lab, act);\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tvar select = null;\n\t\t\t\t\t\t\t\t\t\tvar create = function()\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\tvar template = editor.templates[select.value];\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\tif (template != null)\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\tvar clone = template.clone();\n\t\t\t\t\t\t\t\t\t\t\t\tvar style = select.options[select.selectedIndex].cellStyle;\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\tif (style != null)\n\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\tclone.setStyle(style);\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\treturn clone;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\tmxLog.warn('Template '+template+' not found');\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\treturn null;\n\t\t\t\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tvar img = into.addPrototype(as, icon, create, null, null, toggle);\n\t\t\t\t\t\t\t\t\t\tselect = into.addCombo();\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t// Selects the toolbar icon if a selection change\n\t\t\t\t\t\t\t\t\t\t// is made in the corresponding combobox.\n\t\t\t\t\t\t\t\t\t\tmxEvent.addListener(select, 'change', function()\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\tinto.toolbar.selectMode(img, function(evt)\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\tvar pt = mxUtils.convertPoint(editor.graph.container,\n\t\t\t\t\t\t\t\t\t\t\t\t\tmxEvent.getClientX(evt), mxEvent.getClientY(evt));\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\treturn editor.addVertex(null, funct(), pt.x, pt.y);\n\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\tinto.toolbar.noReset = false;\n\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t// Adds the entries to the combobox\n\t\t\t\t\t\t\t\t\t\tfor (var i=0; i<children.length; i++)\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\tvar child = children[i];\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\tif (child.nodeName == 'separator')\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\tinto.addOption(select, '---');\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\telse if (child.nodeName == 'add')\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\tvar lab = child.getAttribute('as');\n\t\t\t\t\t\t\t\t\t\t\t\tvar tmp = child.getAttribute('template');\n\t\t\t\t\t\t\t\t\t\t\t\tvar option = into.addOption(select, lab, tmp || template);\n\t\t\t\t\t\t\t\t\t\t\t\toption.cellStyle = child.getAttribute('style');\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Assigns an ID to the created element to access it later.\n\t\t\t\t\t\t\tif (elt != null)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tvar id = node.getAttribute('id');\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tif (id != null && id.length > 0)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\telt.setAttribute('id', id);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tnode = node.nextSibling;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn into;\n\t};\n\t\n\t// Returns the codec into the registry\n\treturn codec;\n\n}());\n\n/**\n * Variable: allowEval\n * \n * Static global switch that specifies if the use of eval is allowed for\n * evaluating text content. Default is true. Set this to false if stylesheets\n * may contain user input\n */\nmxDefaultToolbarCodec.allowEval = true;\n"
  },
  {
    "path": "static/cherry/drawio_demo/src/js/io/mxEditorCodec.js",
    "content": "/**\n * Copyright (c) 2006-2015, JGraph Ltd\n * Copyright (c) 2006-2015, Gaudenz Alder\n */\nmxCodecRegistry.register(function()\n{\n\t/**\n\t * Class: mxEditorCodec\n\t *\n\t * Codec for <mxEditor>s. This class is created and registered\n\t * dynamically at load time and used implicitely via <mxCodec>\n\t * and the <mxCodecRegistry>.\n\t *\n\t * Transient Fields:\n\t *\n\t * - modified\n\t * - lastSnapshot\n\t * - ignoredChanges\n\t * - undoManager\n\t * - graphContainer\n\t * - toolbarContainer\n\t */\n\tvar codec = new mxObjectCodec(new mxEditor(),\n\t\t['modified', 'lastSnapshot', 'ignoredChanges',\n\t\t'undoManager', 'graphContainer', 'toolbarContainer']);\n\n\t/**\n\t * Function: beforeDecode\n\t *\n\t * Decodes the ui-part of the configuration node by reading\n\t * a sequence of the following child nodes and attributes\n\t * and passes the control to the default decoding mechanism:\n\t *\n\t * Child Nodes:\n\t *\n\t * stylesheet - Adds a CSS stylesheet to the document.\n\t * resource - Adds the basename of a resource bundle.\n\t * add - Creates or configures a known UI element.\n\t *\n\t * These elements may appear in any order given that the\n\t * graph UI element is added before the toolbar element\n\t * (see Known Keys).\n\t *\n\t * Attributes:\n\t *\n\t * as - Key for the UI element (see below).\n\t * element - ID for the element in the document.\n\t * style - CSS style to be used for the element or window.\n\t * x - X coordinate for the new window.\n\t * y - Y coordinate for the new window.\n\t * width - Width for the new window.\n\t * height - Optional height for the new window.\n\t * name - Name of the stylesheet (absolute/relative URL).\n\t * basename - Basename of the resource bundle (see <mxResources>).\n\t *\n\t * The x, y, width and height attributes are used to create a new\n\t * <mxWindow> if the element attribute is not specified in an add\n\t * node. The name and basename are only used in the stylesheet and\n\t * resource nodes, respectively.\n\t *\n\t * Known Keys:\n\t *\n\t * graph - Main graph element (see <mxEditor.setGraphContainer>).\n\t * title - Title element (see <mxEditor.setTitleContainer>).\n\t * toolbar - Toolbar element (see <mxEditor.setToolbarContainer>).\n\t * status - Status bar element (see <mxEditor.setStatusContainer>).\n\t *\n\t * Example:\n\t *\n\t * (code)\n\t * <ui>\n\t *   <stylesheet name=\"css/process.css\"/>\n\t *   <resource basename=\"resources/app\"/>\n\t *   <add as=\"graph\" element=\"graph\"\n\t *     style=\"left:70px;right:20px;top:20px;bottom:40px\"/>\n\t *   <add as=\"status\" element=\"status\"/>\n\t *   <add as=\"toolbar\" x=\"10\" y=\"20\" width=\"54\"/>\n\t * </ui>\n\t * (end)\n\t */\n\tcodec.afterDecode = function(dec, node, obj)\n\t{\n\t\t// Assigns the specified templates for edges\n\t\tvar defaultEdge = node.getAttribute('defaultEdge');\n\t\t\n\t\tif (defaultEdge != null)\n\t\t{\n\t\t\tnode.removeAttribute('defaultEdge');\n\t\t\tobj.defaultEdge = obj.templates[defaultEdge];\n\t\t}\n\n\t\t// Assigns the specified templates for groups\n\t\tvar defaultGroup = node.getAttribute('defaultGroup');\n\t\t\n\t\tif (defaultGroup != null)\n\t\t{\n\t\t\tnode.removeAttribute('defaultGroup');\n\t\t\tobj.defaultGroup = obj.templates[defaultGroup];\n\t\t}\n\n\t\treturn obj;\n\t};\n\t\n\t/**\n\t * Function: decodeChild\n\t * \n\t * Overrides decode child to handle special child nodes.\n\t */\t\n\tcodec.decodeChild = function(dec, child, obj)\n\t{\n\t\tif (child.nodeName == 'Array')\n\t\t{\n\t\t\tvar role = child.getAttribute('as');\n\t\t\t\n\t\t\tif (role == 'templates')\n\t\t\t{\n\t\t\t\tthis.decodeTemplates(dec, child, obj);\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\telse if (child.nodeName == 'ui')\n\t\t{\n\t\t\tthis.decodeUi(dec, child, obj);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tmxObjectCodec.prototype.decodeChild.apply(this, arguments);\n\t};\n\t\t\n\t/**\n\t * Function: decodeTemplates\n\t *\n\t * Decodes the cells from the given node as templates.\n\t */\n\tcodec.decodeUi = function(dec, node, editor)\n\t{\n\t\tvar tmp = node.firstChild;\n\t\twhile (tmp != null)\n\t\t{\n\t\t\tif (tmp.nodeName == 'add')\n\t\t\t{\n\t\t\t\tvar as = tmp.getAttribute('as');\n\t\t\t\tvar elt = tmp.getAttribute('element');\n\t\t\t\tvar style = tmp.getAttribute('style');\n\t\t\t\tvar element = null;\n\n\t\t\t\tif (elt != null)\n\t\t\t\t{\n\t\t\t\t\telement = document.getElementById(elt);\n\t\t\t\t\t\n\t\t\t\t\tif (element != null && style != null)\n\t\t\t\t\t{\n\t\t\t\t\t\telement.style.cssText += ';' + style;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tvar x = parseInt(tmp.getAttribute('x'));\n\t\t\t\t\tvar y = parseInt(tmp.getAttribute('y'));\n\t\t\t\t\tvar width = tmp.getAttribute('width');\n\t\t\t\t\tvar height = tmp.getAttribute('height');\n\n\t\t\t\t\t// Creates a new window around the element\n\t\t\t\t\telement = document.createElement('div');\n\t\t\t\t\telement.style.cssText = style;\n\t\t\t\t\t\n\t\t\t\t\tvar wnd = new mxWindow(mxResources.get(as) || as,\n\t\t\t\t\t\telement, x, y, width, height, false, true);\n\t\t\t\t\twnd.setVisible(true);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// TODO: Make more generic\n\t\t\t\tif (as == 'graph')\n\t\t\t\t{\n\t\t\t\t\teditor.setGraphContainer(element);\n\t\t\t\t}\n\t\t\t\telse if (as == 'toolbar')\n\t\t\t\t{\n\t\t\t\t\teditor.setToolbarContainer(element);\n\t\t\t\t}\n\t\t\t\telse if (as == 'title')\n\t\t\t\t{\n\t\t\t\t\teditor.setTitleContainer(element);\n\t\t\t\t}\n\t\t\t\telse if (as == 'status')\n\t\t\t\t{\n\t\t\t\t\teditor.setStatusContainer(element);\n\t\t\t\t}\n\t\t\t\telse if (as == 'map')\n\t\t\t\t{\n\t\t\t\t\teditor.setMapContainer(element);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if (tmp.nodeName == 'resource')\n\t\t\t{\n\t\t\t\tmxResources.add(tmp.getAttribute('basename'));\n\t\t\t}\n\t\t\telse if (tmp.nodeName == 'stylesheet')\n\t\t\t{\n\t\t\t\tmxClient.link('stylesheet', tmp.getAttribute('name'));\n\t\t\t}\n\t\t\t\n\t\t\ttmp = tmp.nextSibling;\n\t\t}\t\n\t};\n\t\n\t/**\n\t * Function: decodeTemplates\n\t *\n\t * Decodes the cells from the given node as templates.\n\t */\n\tcodec.decodeTemplates = function(dec, node, editor)\n\t{\n\t\tif (editor.templates == null)\n\t\t{\n\t\t\teditor.templates = [];\n\t\t}\n\t\t\n\t\tvar children = mxUtils.getChildNodes(node);\n\t\tfor (var j=0; j<children.length; j++)\n\t\t{\n\t\t\tvar name = children[j].getAttribute('as');\n\t\t\tvar child = children[j].firstChild;\n\t\t\t\n\t\t\twhile (child != null && child.nodeType != 1)\n\t\t\t{\n\t\t\t\tchild = child.nextSibling;\n\t\t\t}\n\t\t\t\n\t\t\tif (child != null)\n\t\t\t{\n\t\t\t\t// LATER: Only single cells means you need\n\t\t\t\t// to group multiple cells within another\n\t\t\t\t// cell. This should be changed to support\n\t\t\t\t// arrays of cells, or the wrapper must\n\t\t\t\t// be automatically handled in this class.\n\t\t\t\teditor.templates[name] = dec.decodeCell(child);\n\t\t\t}\n\t\t}\n\t};\n\t\n\t// Returns the codec into the registry\n\treturn codec;\n\n}());\n"
  },
  {
    "path": "static/cherry/drawio_demo/src/js/io/mxGenericChangeCodec.js",
    "content": "/**\n * Copyright (c) 2006-2015, JGraph Ltd\n * Copyright (c) 2006-2015, Gaudenz Alder\n */\n/**\n * Class: mxGenericChangeCodec\n *\n * Codec for <mxValueChange>s, <mxStyleChange>s, <mxGeometryChange>s,\n * <mxCollapseChange>s and <mxVisibleChange>s. This class is created\n * and registered dynamically at load time and used implicitely\n * via <mxCodec> and the <mxCodecRegistry>.\n *\n * Transient Fields:\n *\n * - model\n * - previous\n *\n * Reference Fields:\n *\n * - cell\n * \n * Constructor: mxGenericChangeCodec\n *\n * Factory function that creates a <mxObjectCodec> for\n * the specified change and fieldname.\n *\n * Parameters:\n *\n * obj - An instance of the change object.\n * variable - The fieldname for the change data.\n */\nvar mxGenericChangeCodec = function(obj, variable)\n{\n\tvar codec = new mxObjectCodec(obj,  ['model', 'previous'], ['cell']);\n\n\t/**\n\t * Function: afterDecode\n\t *\n\t * Restores the state by assigning the previous value.\n\t */\n\tcodec.afterDecode = function(dec, node, obj)\n\t{\n\t\t// Allows forward references in sessions. This is a workaround\n\t\t// for the sequence of edits in mxGraph.moveCells and cellsAdded.\n\t\tif (mxUtils.isNode(obj.cell))\n\t\t{\n\t\t\tobj.cell = dec.decodeCell(obj.cell, false);\n\t\t}\n\n\t\tobj.previous = obj[variable];\n\n\t\treturn obj;\n\t};\n\t\n\treturn codec;\n};\n\n// Registers the codecs\nmxCodecRegistry.register(mxGenericChangeCodec(new mxValueChange(), 'value'));\nmxCodecRegistry.register(mxGenericChangeCodec(new mxStyleChange(), 'style'));\nmxCodecRegistry.register(mxGenericChangeCodec(new mxGeometryChange(), 'geometry'));\nmxCodecRegistry.register(mxGenericChangeCodec(new mxCollapseChange(), 'collapsed'));\nmxCodecRegistry.register(mxGenericChangeCodec(new mxVisibleChange(), 'visible'));\nmxCodecRegistry.register(mxGenericChangeCodec(new mxCellAttributeChange(), 'value'));\n"
  },
  {
    "path": "static/cherry/drawio_demo/src/js/io/mxGraphCodec.js",
    "content": "/**\n * Copyright (c) 2006-2015, JGraph Ltd\n * Copyright (c) 2006-2015, Gaudenz Alder\n */\nmxCodecRegistry.register(function()\n{\n\t/**\n\t * Class: mxGraphCodec\n\t *\n\t * Codec for <mxGraph>s. This class is created and registered\n\t * dynamically at load time and used implicitely via <mxCodec>\n\t * and the <mxCodecRegistry>.\n\t *\n\t * Transient Fields:\n\t *\n\t * - graphListeners\n\t * - eventListeners\n\t * - view\n\t * - container\n\t * - cellRenderer\n\t * - editor\n\t * - selection\n\t */\n\treturn new mxObjectCodec(new mxGraph(),\n\t\t['graphListeners', 'eventListeners', 'view', 'container',\n\t\t'cellRenderer', 'editor', 'selection']);\n\n}());\n"
  },
  {
    "path": "static/cherry/drawio_demo/src/js/io/mxGraphViewCodec.js",
    "content": "/**\n * Copyright (c) 2006-2015, JGraph Ltd\n * Copyright (c) 2006-2015, Gaudenz Alder\n */\nmxCodecRegistry.register(function()\n{\n\t/**\n\t * Class: mxGraphViewCodec\n\t *\n\t * Custom encoder for <mxGraphView>s. This class is created\n\t * and registered dynamically at load time and used implicitely via\n\t * <mxCodec> and the <mxCodecRegistry>. This codec only writes views\n\t * into a XML format that can be used to create an image for\n\t * the graph, that is, it contains absolute coordinates with\n\t * computed perimeters, edge styles and cell styles.\n\t */\n\tvar codec = new mxObjectCodec(new mxGraphView());\n\n\t/**\n\t * Function: encode\n\t *\n\t * Encodes the given <mxGraphView> using <encodeCell>\n\t * starting at the model's root. This returns the\n\t * top-level graph node of the recursive encoding.\n\t */\n\tcodec.encode = function(enc, view)\n\t{\n\t\treturn this.encodeCell(enc, view,\n\t\t\tview.graph.getModel().getRoot());\n\t};\n\n\t/**\n\t * Function: encodeCell\n\t *\n\t * Recursively encodes the specifed cell. Uses layer\n\t * as the default nodename. If the cell's parent is\n\t * null, then graph is used for the nodename. If\n\t * <mxGraphModel.isEdge> returns true for the cell,\n\t * then edge is used for the nodename, else if\n\t * <mxGraphModel.isVertex> returns true for the cell,\n\t * then vertex is used for the nodename.\n\t *\n\t * <mxGraph.getLabel> is used to create the label\n\t * attribute for the cell. For graph nodes and vertices\n\t * the bounds are encoded into x, y, width and height.\n\t * For edges the points are encoded into a points\n\t * attribute as a space-separated list of comma-separated\n\t * coordinate pairs (eg. x0,y0 x1,y1 ... xn,yn). All\n\t * values from the cell style are added as attribute\n\t * values to the node. \n\t */\n\tcodec.encodeCell = function(enc, view, cell)\n\t{\n\t\tvar model = view.graph.getModel();\n\t\tvar state = view.getState(cell);\n\t\tvar parent = model.getParent(cell);\n\t\t\n\t\tif (parent == null || state != null)\n\t\t{\n\t\t\tvar childCount = model.getChildCount(cell);\n\t\t\tvar geo = view.graph.getCellGeometry(cell);\n\t\t\tvar name = null;\n\t\t\t\n\t\t\tif (parent == model.getRoot())\n\t\t\t{\n\t\t\t\tname = 'layer';\n\t\t\t}\n\t\t\telse if (parent == null)\n\t\t\t{\n\t\t\t\tname = 'graph';\n\t\t\t}\n\t\t\telse if (model.isEdge(cell))\n\t\t\t{\n\t\t\t\tname = 'edge';\n\t\t\t}\n\t\t\telse if (childCount > 0 && geo != null)\n\t\t\t{\n\t\t\t\tname = 'group';\n\t\t\t}\n\t\t\telse if (model.isVertex(cell))\n\t\t\t{\n\t\t\t\tname = 'vertex';\n\t\t\t}\n\t\t\t\n\t\t\tif (name != null)\n\t\t\t{\n\t\t\t\tvar node = enc.document.createElement(name);\n\t\t\t\tvar lab = view.graph.getLabel(cell);\n\t\t\t\t\n\t\t\t\tif (lab != null)\n\t\t\t\t{\n\t\t\t\t\tnode.setAttribute('label', view.graph.getLabel(cell));\n\t\t\t\t\t\n\t\t\t\t\tif (view.graph.isHtmlLabel(cell))\n\t\t\t\t\t{\n\t\t\t\t\t\tnode.setAttribute('html', true);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\n\t\t\t\tif (parent == null)\n\t\t\t\t{\n\t\t\t\t\tvar bounds = view.getGraphBounds();\n\t\t\t\t\t\n\t\t\t\t\tif (bounds != null)\n\t\t\t\t\t{\n\t\t\t\t\t\tnode.setAttribute('x', Math.round(bounds.x));\n\t\t\t\t\t\tnode.setAttribute('y', Math.round(bounds.y));\n\t\t\t\t\t\tnode.setAttribute('width', Math.round(bounds.width));\n\t\t\t\t\t\tnode.setAttribute('height', Math.round(bounds.height));\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tnode.setAttribute('scale', view.scale);\n\t\t\t\t}\n\t\t\t\telse if (state != null && geo != null)\n\t\t\t\t{\n\t\t\t\t\t// Writes each key, value in the style pair to an attribute\n\t\t\t\t    for (var i in state.style)\n\t\t\t\t    {\n\t\t\t\t    \tvar value = state.style[i];\n\t\t\n\t\t\t\t    \t// Tries to turn objects and functions into strings\n\t\t\t\t\t    if (typeof(value) == 'function' &&\n\t\t\t\t\t\t\ttypeof(value) == 'object')\n\t\t\t\t\t\t{\n\t\t\t\t\t    \tvalue = mxStyleRegistry.getName(value);\n\t\t\t\t        }\n\t\t\t\t    \t\n\t\t\t\t    \tif (value != null &&\n\t\t\t\t    \t\ttypeof(value) != 'function' &&\n\t\t\t\t\t\t\ttypeof(value) != 'object')\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tnode.setAttribute(i, value);\n\t\t\t\t        }\n\t\t\t\t    }\n\t\t\t\t    \n\t\t\t\t\tvar abs = state.absolutePoints;\n\t\t\t\t\t\n\t\t\t\t\t// Writes the list of points into one attribute\n\t\t\t\t\tif (abs != null && abs.length > 0)\n\t\t\t\t\t{\n\t\t\t\t\t\tvar pts = Math.round(abs[0].x) + ',' + Math.round(abs[0].y);\n\t\t\n\t\t\t\t\t\tfor (var i=1; i<abs.length; i++)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tpts += ' ' + Math.round(abs[i].x) + ',' +\n\t\t\t\t\t\t\t\tMath.round(abs[i].y);\n\t\t\t\t\t\t}\n\t\t\n\t\t\t\t\t\tnode.setAttribute('points', pts);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// Writes the bounds into 4 attributes\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tnode.setAttribute('x', Math.round(state.x));\n\t\t\t\t\t\tnode.setAttribute('y', Math.round(state.y));\n\t\t\t\t\t\tnode.setAttribute('width', Math.round(state.width));\n\t\t\t\t\t\tnode.setAttribute('height', Math.round(state.height));\t\t\t\t\n\t\t\t\t\t}\n\t\t\n\t\t\t\t\tvar offset = state.absoluteOffset;\n\t\t\t\t\t\n\t\t\t\t\t// Writes the offset into 2 attributes\n\t\t\t\t\tif (offset != null)\n\t\t\t\t\t{\n\t\t\t\t\t\tif (offset.x != 0)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tnode.setAttribute('dx', Math.round(offset.x));\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (offset.y != 0)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tnode.setAttribute('dy', Math.round(offset.y));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\n\t\t\t\tfor (var i=0; i<childCount; i++)\n\t\t\t\t{\n\t\t\t\t\tvar childNode = this.encodeCell(enc,\n\t\t\t\t\t\t\tview, model.getChildAt(cell, i));\n\t\t\t\t\t\n\t\t\t\t\tif (childNode != null)\n\t\t\t\t\t{\n\t\t\t\t\t\tnode.appendChild(childNode);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn node;\n\t};\n\n\t// Returns the codec into the registry\n\treturn codec;\n\n}());\n"
  },
  {
    "path": "static/cherry/drawio_demo/src/js/io/mxModelCodec.js",
    "content": "/**\n * Copyright (c) 2006-2015, JGraph Ltd\n * Copyright (c) 2006-2015, Gaudenz Alder\n */\nmxCodecRegistry.register(function()\n{\n\t/**\n\t * Class: mxModelCodec\n\t *\n\t * Codec for <mxGraphModel>s. This class is created and registered\n\t * dynamically at load time and used implicitely via <mxCodec>\n\t * and the <mxCodecRegistry>.\n\t */\n\tvar codec = new mxObjectCodec(new mxGraphModel());\n\n\t/**\n\t * Function: encodeObject\n\t *\n\t * Encodes the given <mxGraphModel> by writing a (flat) XML sequence of\n\t * cell nodes as produced by the <mxCellCodec>. The sequence is\n\t * wrapped-up in a node with the name root.\n\t */\n\tcodec.encodeObject = function(enc, obj, node)\n\t{\n\t\tvar rootNode = enc.document.createElement('root');\n\t\tenc.encodeCell(obj.getRoot(), rootNode);\n\t\tnode.appendChild(rootNode);\n\t};\n\n\t/**\n\t * Function: decodeChild\n\t * \n\t * Overrides decode child to handle special child nodes.\n\t */\t\n\tcodec.decodeChild = function(dec, child, obj)\n\t{\n\t\tif (child.nodeName == 'root')\n\t\t{\n\t\t\tthis.decodeRoot(dec, child, obj);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tmxObjectCodec.prototype.decodeChild.apply(this, arguments);\n\t\t}\n\t};\n\n\t/**\n\t * Function: decodeRoot\n\t *\n\t * Reads the cells into the graph model. All cells\n\t * are children of the root element in the node.\n\t */\n\tcodec.decodeRoot = function(dec, root, model)\n\t{\n\t\tvar rootCell = null;\n\t\tvar tmp = root.firstChild;\n\t\t\n\t\twhile (tmp != null)\n\t\t{\n\t\t\tvar cell = dec.decodeCell(tmp);\n\t\t\t\n\t\t\tif (cell != null && cell.getParent() == null)\n\t\t\t{\n\t\t\t\trootCell = cell;\n\t\t\t}\n\t\t\t\n\t\t\ttmp = tmp.nextSibling;\n\t\t}\n\n\t\t// Sets the root on the model if one has been decoded\n\t\tif (rootCell != null)\n\t\t{\n\t\t\tmodel.setRoot(rootCell);\n\t\t}\n\t};\n\n\t// Returns the codec into the registry\n\treturn codec;\n\n}());\n"
  },
  {
    "path": "static/cherry/drawio_demo/src/js/io/mxObjectCodec.js",
    "content": "/**\n * Copyright (c) 2006-2015, JGraph Ltd\n * Copyright (c) 2006-2015, Gaudenz Alder\n */\n/**\n * Class: mxObjectCodec\n *\n * Generic codec for JavaScript objects that implements a mapping between\n * JavaScript objects and XML nodes that maps each field or element to an\n * attribute or child node, and vice versa.\n * \n * Atomic Values:\n * \n * Consider the following example.\n * \n * (code)\n * var obj = new Object();\n * obj.foo = \"Foo\";\n * obj.bar = \"Bar\";\n * (end)\n * \n * This object is encoded into an XML node using the following.\n * \n * (code)\n * var enc = new mxCodec();\n * var node = enc.encode(obj);\n * (end)\n * \n * The output of the encoding may be viewed using <mxLog> as follows.\n * \n * (code)\n * mxLog.show();\n * mxLog.debug(mxUtils.getPrettyXml(node));\n * (end)\n * \n * Finally, the result of the encoding looks as follows.\n * \n * (code)\n * <Object foo=\"Foo\" bar=\"Bar\"/>\n * (end)\n * \n * In the above output, the foo and bar fields have been mapped to attributes\n * with the same names, and the name of the constructor was used for the\n * nodename.\n * \n * Booleans:\n *\n * Since booleans are numbers in JavaScript, all boolean values are encoded\n * into 1 for true and 0 for false. The decoder also accepts the string true\n * and false for boolean values.\n * \n * Objects:\n * \n * The above scheme is applied to all atomic fields, that is, to all non-object\n * fields of an object. For object fields, a child node is created with a\n * special attribute that contains the fieldname. This special attribute is\n * called \"as\" and hence, as is a reserved word that should not be used for a\n * fieldname.\n * \n * Consider the following example where foo is an object and bar is an atomic\n * property of foo.\n * \n * (code)\n * var obj = {foo: {bar: \"Bar\"}};\n * (end)\n * \n * This will be mapped to the following XML structure by mxObjectCodec.\n * \n * (code)\n * <Object>\n *   <Object bar=\"Bar\" as=\"foo\"/>\n * </Object>\n * (end)\n * \n * In the above output, the inner Object node contains the as-attribute that\n * specifies the fieldname in the enclosing object. That is, the field foo was\n * mapped to a child node with an as-attribute that has the value foo.\n * \n * Arrays:\n * \n * Arrays are special objects that are either associative, in which case each\n * key, value pair is treated like a field where the key is the fieldname, or\n * they are a sequence of atomic values and objects, which is mapped to a\n * sequence of child nodes. For object elements, the above scheme is applied\n * without the use of the special as-attribute for creating each child. For\n * atomic elements, a special add-node is created with the value stored in the\n * value-attribute.\n * \n * For example, the following array contains one atomic value and one object\n * with a field called bar. Furthermore it contains two associative entries\n * called bar with an atomic value, and foo with an object value.\n * \n * (code)\n * var obj = [\"Bar\", {bar: \"Bar\"}];\n * obj[\"bar\"] = \"Bar\";\n * obj[\"foo\"] = {bar: \"Bar\"};\n * (end)\n * \n * This array is represented by the following XML nodes.\n * \n * (code)\n * <Array bar=\"Bar\">\n *   <add value=\"Bar\"/>\n *   <Object bar=\"Bar\"/>\n *   <Object bar=\"Bar\" as=\"foo\"/>\n * </Array>\n * (end)\n * \n * The Array node name is the name of the constructor. The additional\n * as-attribute in the last child contains the key of the associative entry,\n * whereas the second last child is part of the array sequence and does not\n * have an as-attribute.\n * \n * References:\n * \n * Objects may be represented as child nodes or attributes with ID values,\n * which are used to lookup the object in a table within <mxCodec>. The\n * <isReference> function is in charge of deciding if a specific field should\n * be encoded as a reference or not. Its default implementation returns true if\n * the fieldname is in <idrefs>, an array of strings that is used to configure\n * the <mxObjectCodec>.\n * \n * Using this approach, the mapping does not guarantee that the referenced\n * object itself exists in the document. The fields that are encoded as\n * references must be carefully chosen to make sure all referenced objects\n * exist in the document, or may be resolved by some other means if necessary.\n * \n * For example, in the case of the graph model all cells are stored in a tree\n * whose root is referenced by the model's root field. A tree is a structure\n * that is well suited for an XML representation, however, the additional edges\n * in the graph model have a reference to a source and target cell, which are\n * also contained in the tree. To handle this case, the source and target cell\n * of an edge are treated as references, whereas the children are treated as\n * objects. Since all cells are contained in the tree and no edge references a\n * source or target outside the tree, this setup makes sure all referenced\n * objects are contained in the document.\n * \n * In the case of a tree structure we must further avoid infinite recursion by\n * ignoring the parent reference of each child. This is done by returning true\n * in <isExcluded>, whose default implementation uses the array of excluded\n * fieldnames passed to the mxObjectCodec constructor.\n * \n * References are only used for cells in mxGraph. For defining other\n * referencable object types, the codec must be able to work out the ID of an\n * object. This is done by implementing <mxCodec.reference>. For decoding a\n * reference, the XML node with the respective id-attribute is fetched from the\n * document, decoded, and stored in a lookup table for later reference. For\n * looking up external objects, <mxCodec.lookup> may be implemented.\n * \n * Expressions:\n * \n * For decoding JavaScript expressions, the add-node may be used with a text\n * content that contains the JavaScript expression. For example, the following\n * creates a field called foo in the enclosing object and assigns it the value\n * of <mxConstants.ALIGN_LEFT>.\n * \n * (code)\n * <Object>\n *   <add as=\"foo\">mxConstants.ALIGN_LEFT</add>\n * </Object>\n * (end)\n * \n * The resulting object has a field called foo with the value \"left\". Its XML\n * representation looks as follows.\n * \n * (code)\n * <Object foo=\"left\"/>\n * (end)\n * \n * This means the expression is evaluated at decoding time and the result of\n * the evaluation is stored in the respective field. Valid expressions are all\n * JavaScript expressions, including function definitions, which are mapped to\n * functions on the resulting object.\n * \n * Expressions are only evaluated if <allowEval> is true.\n * \n * Constructor: mxObjectCodec\n *\n * Constructs a new codec for the specified template object.\n * The variables in the optional exclude array are ignored by\n * the codec. Variables in the optional idrefs array are\n * turned into references in the XML. The optional mapping\n * may be used to map from variable names to XML attributes.\n * The argument is created as follows:\n *\n * (code)\n * var mapping = new Object();\n * mapping['variableName'] = 'attribute-name';\n * (end)\n *\n * Parameters:\n *\n * template - Prototypical instance of the object to be\n * encoded/decoded.\n * exclude - Optional array of fieldnames to be ignored.\n * idrefs - Optional array of fieldnames to be converted to/from\n * references.\n * mapping - Optional mapping from field- to attributenames.\n */\nfunction mxObjectCodec(template, exclude, idrefs, mapping) {\n\tthis.template = template;\n\n\tthis.exclude = (exclude != null) ? exclude : [];\n\tthis.idrefs = (idrefs != null) ? idrefs : [];\n\tthis.mapping = (mapping != null) ? mapping : [];\n\n\tthis.reverse = new Object();\n\n\tfor (var i in this.mapping) {\n\t\tthis.reverse[this.mapping[i]] = i;\n\t}\n};\n\n/**\n * Variable: allowEval\n *\n * Static global switch that specifies if expressions in arrays are allowed.\n * Default is false. NOTE: Enabling this carries a possible security risk.\n */\nmxObjectCodec.allowEval = false;\n\n/**\n * Variable: template\n *\n * Holds the template object associated with this codec.\n */\nmxObjectCodec.prototype.template = null;\n\n/**\n * Variable: exclude\n *\n * Array containing the variable names that should be\n * ignored by the codec.\n */\nmxObjectCodec.prototype.exclude = null;\n\n/**\n * Variable: idrefs\n *\n * Array containing the variable names that should be\n * turned into or converted from references. See\n * <mxCodec.getId> and <mxCodec.getObject>.\n */\nmxObjectCodec.prototype.idrefs = null;\n\n/**\n * Variable: mapping\n *\n * Maps from from fieldnames to XML attribute names.\n */\nmxObjectCodec.prototype.mapping = null;\n\n/**\n * Variable: reverse\n *\n * Maps from from XML attribute names to fieldnames.\n */\nmxObjectCodec.prototype.reverse = null;\n\n/**\n * Function: getName\n * \n * Returns the name used for the nodenames and lookup of the codec when\n * classes are encoded and nodes are decoded. For classes to work with\n * this the codec registry automatically adds an alias for the classname\n * if that is different than what this returns. The default implementation\n * returns the classname of the template class.\n */\nmxObjectCodec.prototype.getName = function () {\n\treturn mxUtils.getFunctionName(this.template.constructor);\n};\n\n/**\n * Function: cloneTemplate\n * \n * Returns a new instance of the template for this codec.\n */\nmxObjectCodec.prototype.cloneTemplate = function () {\n\treturn new this.template.constructor();\n};\n\n/**\n * Function: getFieldName\n * \n * Returns the fieldname for the given attributename.\n * Looks up the value in the <reverse> mapping or returns\n * the input if there is no reverse mapping for the\n * given name.\n */\nmxObjectCodec.prototype.getFieldName = function (attributename) {\n\tif (attributename != null) {\n\t\tvar mapped = this.reverse[attributename];\n\n\t\tif (mapped != null) {\n\t\t\tattributename = mapped;\n\t\t}\n\t}\n\n\treturn attributename;\n};\n\n/**\n * Function: getAttributeName\n * \n * Returns the attributename for the given fieldname.\n * Looks up the value in the <mapping> or returns\n * the input if there is no mapping for the\n * given name.\n */\nmxObjectCodec.prototype.getAttributeName = function (fieldname) {\n\tif (fieldname != null) {\n\t\tvar mapped = this.mapping[fieldname];\n\n\t\tif (mapped != null) {\n\t\t\tfieldname = mapped;\n\t\t}\n\t}\n\n\treturn fieldname;\n};\n\n/**\n * Function: isExcluded\n *\n * Returns true if the given attribute is to be ignored by the codec. This\n * implementation returns true if the given fieldname is in <exclude> or\n * if the fieldname equals <mxObjectIdentity.FIELD_NAME>.\n *\n * Parameters:\n *\n * obj - Object instance that contains the field.\n * attr - Fieldname of the field.\n * value - Value of the field.\n * write - Boolean indicating if the field is being encoded or decoded.\n * Write is true if the field is being encoded, else it is being decoded.\n */\nmxObjectCodec.prototype.isExcluded = function (obj, attr, value, write) {\n\treturn attr == mxObjectIdentity.FIELD_NAME ||\n\t\tmxUtils.indexOf(this.exclude, attr) >= 0;\n};\n\n/**\n * Function: isReference\n *\n * Returns true if the given fieldname is to be treated\n * as a textual reference (ID). This implementation returns\n * true if the given fieldname is in <idrefs>.\n *\n * Parameters:\n *\n * obj - Object instance that contains the field.\n * attr - Fieldname of the field.\n * value - Value of the field. \n * write - Boolean indicating if the field is being encoded or decoded.\n * Write is true if the field is being encoded, else it is being decoded.\n */\nmxObjectCodec.prototype.isReference = function (obj, attr, value, write) {\n\treturn mxUtils.indexOf(this.idrefs, attr) >= 0;\n};\n\n/**\n * Function: encode\n *\n * Encodes the specified object and returns a node\n * representing then given object. Calls <beforeEncode>\n * after creating the node and <afterEncode> with the \n * resulting node after processing.\n *\n * Enc is a reference to the calling encoder. It is used\n * to encode complex objects and create references.\n *\n * This implementation encodes all variables of an\n * object according to the following rules:\n *\n * - If the variable name is in <exclude> then it is ignored.\n * - If the variable name is in <idrefs> then <mxCodec.getId>\n * is used to replace the object with its ID.\n * - The variable name is mapped using <mapping>.\n * - If obj is an array and the variable name is numeric\n * (ie. an index) then it is not encoded.\n * - If the value is an object, then the codec is used to\n * create a child node with the variable name encoded into\n * the \"as\" attribute.\n * - Else, if <encodeDefaults> is true or the value differs\n * from the template value, then ...\n * - ... if obj is not an array, then the value is mapped to\n * an attribute.\n * - ... else if obj is an array, the value is mapped to an\n * add child with a value attribute or a text child node,\n * if the value is a function.\n *\n * If no ID exists for a variable in <idrefs> or if an object\n * cannot be encoded, a warning is issued using <mxLog.warn>.\n *\n * Returns the resulting XML node that represents the given\n * object.\n *\n * Parameters:\n *\n * enc - <mxCodec> that controls the encoding process.\n * obj - Object to be encoded.\n */\nmxObjectCodec.prototype.encode = function (enc, obj) {\n\tvar node = enc.document.createElement(this.getName());\n\n\tobj = this.beforeEncode(enc, obj, node);\n\tthis.encodeObject(enc, obj, node);\n\n\treturn this.afterEncode(enc, obj, node);\n};\n\n/**\n * Function: encodeObject\n *\n * Encodes the value of each member in then given obj into the given node using\n * <encodeValue>.\n * \n * Parameters:\n *\n * enc - <mxCodec> that controls the encoding process.\n * obj - Object to be encoded.\n * node - XML node that contains the encoded object.\n */\nmxObjectCodec.prototype.encodeObject = function (enc, obj, node) {\n\tenc.setAttribute(node, 'id', enc.getId(obj));\n\n\tfor (var i in obj) {\n\t\tvar name = i;\n\t\tvar value = obj[name];\n\n\t\tif (value != null && !this.isExcluded(obj, name, value, true)) {\n\t\t\tif (mxUtils.isInteger(name)) {\n\t\t\t\tname = null;\n\t\t\t}\n\n\t\t\tthis.encodeValue(enc, obj, name, value, node);\n\t\t}\n\t}\n};\n\n/**\n * Function: encodeValue\n * \n * Converts the given value according to the mappings\n * and id-refs in this codec and uses <writeAttribute>\n * to write the attribute into the given node.\n * \n * Parameters:\n *\n * enc - <mxCodec> that controls the encoding process.\n * obj - Object whose property is going to be encoded.\n * name - XML node that contains the encoded object.\n * value - Value of the property to be encoded.\n * node - XML node that contains the encoded object.\n */\nmxObjectCodec.prototype.encodeValue = function (enc, obj, name, value, node) {\n\tif (value != null) {\n\t\tif (this.isReference(obj, name, value, true)) {\n\t\t\tvar tmp = enc.getId(value);\n\n\t\t\tif (tmp == null) {\n\t\t\t\tmxLog.warn('mxObjectCodec.encode: No ID for ' +\n\t\t\t\t\tthis.getName() + '.' + name + '=' + value);\n\t\t\t\treturn; // exit\n\t\t\t}\n\n\t\t\tvalue = tmp;\n\t\t}\n\n\t\tvar defaultValue = this.template[name];\n\n\t\t// Checks if the value is a default value and\n\t\t// the name is correct\n\t\tif (name == null || enc.encodeDefaults || defaultValue != value) {\n\t\t\tname = this.getAttributeName(name);\n\t\t\tthis.writeAttribute(enc, obj, name, value, node);\n\t\t}\n\t}\n};\n\n/**\n * Function: writeAttribute\n * \n * Writes the given value into node using <writePrimitiveAttribute>\n * or <writeComplexAttribute> depending on the type of the value.\n */\nmxObjectCodec.prototype.writeAttribute = function (enc, obj, name, value, node) {\n\tif (typeof (value) != 'object' /* primitive type */) {\n\t\tthis.writePrimitiveAttribute(enc, obj, name, value, node);\n\t}\n\telse /* complex type */ {\n\t\tthis.writeComplexAttribute(enc, obj, name, value, node);\n\t}\n};\n\n/**\n * Function: writePrimitiveAttribute\n * \n * Writes the given value as an attribute of the given node.\n */\nmxObjectCodec.prototype.writePrimitiveAttribute = function (enc, obj, name, value, node) {\n\tvalue = this.convertAttributeToXml(enc, obj, name, value, node);\n\n\tif (name == null) {\n\t\tvar child = enc.document.createElement('add');\n\n\t\tif (typeof (value) == 'function') {\n\t\t\tchild.appendChild(enc.document.createTextNode(value));\n\t\t}\n\t\telse {\n\t\t\tenc.setAttribute(child, 'value', value);\n\t\t}\n\n\t\tnode.appendChild(child);\n\t}\n\telse if (typeof (value) != 'function') {\n\t\tenc.setAttribute(node, name, value);\n\t}\n};\n\n/**\n * Function: writeComplexAttribute\n * \n * Writes the given value as a child node of the given node.\n */\nmxObjectCodec.prototype.writeComplexAttribute = function (enc, obj, name, value, node) {\n\tvar child = enc.encode(value);\n\n\tif (child != null) {\n\t\tif (name != null) {\n\t\t\tchild.setAttribute('as', name);\n\t\t}\n\n\t\tnode.appendChild(child);\n\t}\n\telse {\n\t\tmxLog.warn('mxObjectCodec.encode: No node for ' + this.getName() + '.' + name + ': ' + value);\n\t}\n};\n\n/**\n * Function: convertAttributeToXml\n * \n * Converts true to \"1\" and false to \"0\" is <isBooleanAttribute> returns true.\n * All other values are not converted.\n * \n * Parameters:\n *\n * enc - <mxCodec> that controls the encoding process.\n * obj - Objec to convert the attribute for.\n * name - Name of the attribute to be converted.\n * value - Value to be converted.\n */\nmxObjectCodec.prototype.convertAttributeToXml = function (enc, obj, name, value) {\n\t// Makes sure to encode boolean values as numeric values\n\tif (this.isBooleanAttribute(enc, obj, name, value)) {\n\t\t// Checks if the value is true (do not use the value as is, because\n\t\t// this would check if the value is not null, so 0 would be true)\n\t\tvalue = (value == true) ? '1' : '0';\n\t}\n\n\treturn value;\n};\n\n/**\n * Function: isBooleanAttribute\n * \n * Returns true if the given object attribute is a boolean value.\n * \n * Parameters:\n *\n * enc - <mxCodec> that controls the encoding process.\n * obj - Objec to convert the attribute for.\n * name - Name of the attribute to be converted.\n * value - Value of the attribute to be converted.\n */\nmxObjectCodec.prototype.isBooleanAttribute = function (enc, obj, name, value) {\n\treturn (typeof (value.length) == 'undefined' && (value == true || value == false));\n};\n\n/**\n * Function: convertAttributeFromXml\n * \n * Converts booleans and numeric values to the respective types. Values are\n * numeric if <isNumericAttribute> returns true.\n * \n * Parameters:\n *\n * dec - <mxCodec> that controls the decoding process.\n * attr - XML attribute to be converted.\n * obj - Objec to convert the attribute for.\n */\nmxObjectCodec.prototype.convertAttributeFromXml = function (dec, attr, obj) {\n\tvar value = attr.value;\n\n\tif (this.isNumericAttribute(dec, attr, obj)) {\n\t\tvalue = parseFloat(value);\n\n\t\tif (isNaN(value)) {\n\t\t\tvalue = 0;\n\t\t}\n\t}\n\n\treturn value;\n};\n\n/**\n * Function: isNumericAttribute\n * \n * Returns true if the given XML attribute is or should be a numeric value.\n * \n * Parameters:\n *\n * dec - <mxCodec> that controls the decoding process.\n * attr - XML attribute to be converted.\n * obj - Objec to convert the attribute for.\n */\nmxObjectCodec.prototype.isNumericAttribute = function (dec, attr, obj) {\n\t// Handles known numeric attributes for generic objects\n\tvar result = (obj.constructor == mxGeometry &&\n\t\t(attr.name == 'x' || attr.name == 'y' ||\n\t\t\tattr.name == 'width' || attr.name == 'height')) ||\n\t\t(obj.constructor == mxPoint &&\n\t\t\t(attr.name == 'x' || attr.name == 'y')) ||\n\t\tmxUtils.isNumeric(attr.value);\n\n\treturn result;\n};\n\n/**\n * Function: beforeEncode\n *\n * Hook for subclassers to pre-process the object before\n * encoding. This returns the input object. The return\n * value of this function is used in <encode> to perform\n * the default encoding into the given node.\n *\n * Parameters:\n *\n * enc - <mxCodec> that controls the encoding process.\n * obj - Object to be encoded.\n * node - XML node to encode the object into.\n */\nmxObjectCodec.prototype.beforeEncode = function (enc, obj, node) {\n\treturn obj;\n};\n\n/**\n * Function: afterEncode\n *\n * Hook for subclassers to post-process the node\n * for the given object after encoding and return the\n * post-processed node. This implementation returns \n * the input node. The return value of this method\n * is returned to the encoder from <encode>.\n *\n * Parameters:\n *\n * enc - <mxCodec> that controls the encoding process.\n * obj - Object to be encoded.\n * node - XML node that represents the default encoding.\n */\nmxObjectCodec.prototype.afterEncode = function (enc, obj, node) {\n\treturn node;\n};\n\n/**\n * Function: decode\n *\n * Parses the given node into the object or returns a new object\n * representing the given node.\n *\n * Dec is a reference to the calling decoder. It is used to decode\n * complex objects and resolve references.\n *\n * If a node has an id attribute then the object cache is checked for the\n * object. If the object is not yet in the cache then it is constructed\n * using the constructor of <template> and cached in <mxCodec.objects>.\n *\n * This implementation decodes all attributes and childs of a node\n * according to the following rules:\n *\n * - If the variable name is in <exclude> or if the attribute name is \"id\"\n * or \"as\" then it is ignored.\n * - If the variable name is in <idrefs> then <mxCodec.getObject> is used\n * to replace the reference with an object.\n * - The variable name is mapped using a reverse <mapping>.\n * - If the value has a child node, then the codec is used to create a\n * child object with the variable name taken from the \"as\" attribute.\n * - If the object is an array and the variable name is empty then the\n * value or child object is appended to the array.\n * - If an add child has no value or the object is not an array then\n * the child text content is evaluated using <mxUtils.eval>.\n *\n * For add nodes where the object is not an array and the variable name\n * is defined, the default mechanism is used, allowing to override/add\n * methods as follows:\n *\n * (code)\n * <Object>\n *   <add as=\"hello\"><![CDATA[\n *     function(arg1) {\n *       mxUtils.alert('Hello '+arg1);\n *     }\n *   ]]></add>\n * </Object>\n * (end) \n *\n * If no object exists for an ID in <idrefs> a warning is issued\n * using <mxLog.warn>.\n *\n * Returns the resulting object that represents the given XML node\n * or the object given to the method as the into parameter.\n *\n * Parameters:\n *\n * dec - <mxCodec> that controls the decoding process.\n * node - XML node to be decoded.\n * into - Optional objec to encode the node into.\n */\nmxObjectCodec.prototype.decode = function (dec, node, into) {\n\tvar id = node.getAttribute('id');\n\tvar obj = dec.objects[id];\n\n\tif (obj == null) {\n\t\tobj = into || this.cloneTemplate();\n\n\t\tif (id != null) {\n\t\t\tdec.putObject(id, obj);\n\t\t}\n\t}\n\n\tnode = this.beforeDecode(dec, node, obj);\n\tthis.decodeNode(dec, node, obj);\n\n\treturn this.afterDecode(dec, node, obj);\n};\n\n/**\n * Function: decodeNode\n * \n * Calls <decodeAttributes> and <decodeChildren> for the given node.\n * \n * Parameters:\n *\n * dec - <mxCodec> that controls the decoding process.\n * node - XML node to be decoded.\n * obj - Objec to encode the node into.\n */\nmxObjectCodec.prototype.decodeNode = function (dec, node, obj) {\n\tif (node != null) {\n\t\tthis.decodeAttributes(dec, node, obj);\n\t\tthis.decodeChildren(dec, node, obj);\n\t}\n};\n\n/**\n * Function: decodeAttributes\n * \n * Decodes all attributes of the given node using <decodeAttribute>.\n * \n * Parameters:\n *\n * dec - <mxCodec> that controls the decoding process.\n * node - XML node to be decoded.\n * obj - Objec to encode the node into.\n */\nmxObjectCodec.prototype.decodeAttributes = function (dec, node, obj) {\n\tvar attrs = node.attributes;\n\n\tif (attrs != null) {\n\t\tfor (var i = 0; i < attrs.length; i++) {\n\t\t\tthis.decodeAttribute(dec, attrs[i], obj);\n\t\t}\n\t}\n};\n\n/**\n * Function: isIgnoredAttribute\n * \n * Returns true if the given attribute should be ignored. This implementation\n * returns true if the attribute name is \"as\" or \"id\".\n * \n * Parameters:\n *\n * dec - <mxCodec> that controls the decoding process.\n * attr - XML attribute to be decoded.\n * obj - Objec to encode the attribute into.\n */\nmxObjectCodec.prototype.isIgnoredAttribute = function (dec, attr, obj) {\n\treturn attr.nodeName == 'as' || attr.nodeName == 'id';\n};\n\n/**\n * Function: decodeAttribute\n * \n * Reads the given attribute into the specified object.\n * \n * Parameters:\n *\n * dec - <mxCodec> that controls the decoding process.\n * attr - XML attribute to be decoded.\n * obj - Objec to encode the attribute into.\n */\nmxObjectCodec.prototype.decodeAttribute = function (dec, attr, obj) {\n\tif (!this.isIgnoredAttribute(dec, attr, obj)) {\n\t\tvar name = attr.nodeName;\n\n\t\t// Converts the string true and false to their boolean values.\n\t\t// This may require an additional check on the obj to see if\n\t\t// the existing field is a boolean value or uninitialized, in\n\t\t// which case we may want to convert true and false to a string.\n\t\tvar value = this.convertAttributeFromXml(dec, attr, obj);\n\t\tvar fieldname = this.getFieldName(name);\n\n\t\tif (this.isReference(obj, fieldname, value, false)) {\n\t\t\tvar tmp = dec.getObject(value);\n\n\t\t\tif (tmp == null) {\n\t\t\t\tmxLog.warn('mxObjectCodec.decode: No object for ' +\n\t\t\t\t\tthis.getName() + '.' + name + '=' + value);\n\t\t\t\treturn; // exit\n\t\t\t}\n\n\t\t\tvalue = tmp;\n\t\t}\n\n\t\tif (!this.isExcluded(obj, name, value, false)) {\n\t\t\t//mxLog.debug(mxUtils.getFunctionName(obj.constructor)+'.'+name+'='+value);\n\t\t\tobj[name] = value;\n\t\t}\n\t}\n};\n\n/**\n * Function: decodeChildren\n * \n * Decodes all children of the given node using <decodeChild>.\n * \n * Parameters:\n *\n * dec - <mxCodec> that controls the decoding process.\n * node - XML node to be decoded.\n * obj - Objec to encode the node into.\n */\nmxObjectCodec.prototype.decodeChildren = function (dec, node, obj) {\n\tvar child = node.firstChild;\n\n\twhile (child != null) {\n\t\tvar tmp = child.nextSibling;\n\n\t\tif (child.nodeType == mxConstants.NODETYPE_ELEMENT &&\n\t\t\t!this.processInclude(dec, child, obj)) {\n\t\t\tthis.decodeChild(dec, child, obj);\n\t\t}\n\n\t\tchild = tmp;\n\t}\n};\n\n/**\n * Function: decodeChild\n * \n * Reads the specified child into the given object.\n * \n * Parameters:\n *\n * dec - <mxCodec> that controls the decoding process.\n * child - XML child element to be decoded.\n * obj - Objec to encode the node into.\n */\nmxObjectCodec.prototype.decodeChild = function (dec, child, obj) {\n\tvar fieldname = this.getFieldName(child.getAttribute('as'));\n\n\tif (fieldname == null || !this.isExcluded(obj, fieldname, child, false)) {\n\t\tvar template = this.getFieldTemplate(obj, fieldname, child);\n\t\tvar value = null;\n\n\t\tif (child.nodeName == 'add') {\n\t\t\tvalue = child.getAttribute('value');\n\n\t\t\tif (value == null && mxObjectCodec.allowEval) {\n\t\t\t\tvalue = mxUtils.eval(mxUtils.getTextContent(child));\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tvalue = dec.decode(child, template);\n\t\t}\n\n\t\tthis.addObjectValue(obj, fieldname, value, template);\n\t}\n};\n\n/**\n * Function: getFieldTemplate\n * \n * Returns the template instance for the given field. This returns the\n * value of the field, null if the value is an array or an empty collection\n * if the value is a collection. The value is then used to populate the\n * field for a new instance. For strongly typed languages it may be\n * required to override this to return the correct collection instance\n * based on the encoded child.\n */\nmxObjectCodec.prototype.getFieldTemplate = function (obj, fieldname, child) {\n\tvar template = obj[fieldname];\n\n\t// Non-empty arrays are replaced completely\n\tif (template instanceof Array && template.length > 0) {\n\t\ttemplate = null;\n\t}\n\n\treturn template;\n};\n\n/**\n * Function: addObjectValue\n * \n * Sets the decoded child node as a value of the given object. If the\n * object is a map, then the value is added with the given fieldname as a\n * key. If the fieldname is not empty, then setFieldValue is called or\n * else, if the object is a collection, the value is added to the\n * collection. For strongly typed languages it may be required to\n * override this with the correct code to add an entry to an object.\n */\nmxObjectCodec.prototype.addObjectValue = function (obj, fieldname, value, template) {\n\tif (value != null && value != template) {\n\t\tif (fieldname != null && fieldname.length > 0) {\n\t\t\tobj[fieldname] = value;\n\t\t}\n\t\telse {\n\t\t\tobj.push(value);\n\t\t}\n\t\t//mxLog.debug('Decoded '+mxUtils.getFunctionName(obj.constructor)+'.'+fieldname+': '+value);\n\t}\n};\n\n/**\n * Function: processInclude\n *\n * Returns true if the given node is an include directive and\n * executes the include by decoding the XML document. Returns\n * false if the given node is not an include directive.\n *\n * Parameters:\n *\n * dec - <mxCodec> that controls the encoding/decoding process.\n * node - XML node to be checked.\n * into - Optional object to pass-thru to the codec.\n */\nmxObjectCodec.prototype.processInclude = function (dec, node, into) {\n\tif (node.nodeName == 'include') {\n\t\tvar name = node.getAttribute('name');\n\n\t\tif (name != null) {\n\t\t\ttry {\n\t\t\t\tvar xml = mxUtils.load(name).getDocumentElement();\n\n\t\t\t\tif (xml != null) {\n\t\t\t\t\tdec.decode(xml, into);\n\t\t\t\t}\n\t\t\t}\n\t\t\tcatch (e) {\n\t\t\t\t// ignore\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t}\n\n\treturn false;\n};\n\n/**\n * Function: beforeDecode\n *\n * Hook for subclassers to pre-process the node for\n * the specified object and return the node to be\n * used for further processing by <decode>.\n * The object is created based on the template in the \n * calling method and is never null. This implementation\n * returns the input node. The return value of this\n * function is used in <decode> to perform\n * the default decoding into the given object.\n *\n * Parameters:\n *\n * dec - <mxCodec> that controls the decoding process.\n * node - XML node to be decoded.\n * obj - Object to encode the node into.\n */\nmxObjectCodec.prototype.beforeDecode = function (dec, node, obj) {\n\treturn node;\n};\n\n/**\n * Function: afterDecode\n *\n * Hook for subclassers to post-process the object after\n * decoding. This implementation returns the given object\n * without any changes. The return value of this method\n * is returned to the decoder from <decode>.\n *\n * Parameters:\n *\n * enc - <mxCodec> that controls the encoding process.\n * node - XML node to be decoded.\n * obj - Object that represents the default decoding.\n */\nmxObjectCodec.prototype.afterDecode = function (dec, node, obj) {\n\treturn obj;\n};\n"
  },
  {
    "path": "static/cherry/drawio_demo/src/js/io/mxRootChangeCodec.js",
    "content": "/**\n * Copyright (c) 2006-2015, JGraph Ltd\n * Copyright (c) 2006-2015, Gaudenz Alder\n */\nmxCodecRegistry.register(function()\n{\n\t/**\n\t * Class: mxRootChangeCodec\n\t *\n\t * Codec for <mxRootChange>s. This class is created and registered\n\t * dynamically at load time and used implicitely via <mxCodec> and\n\t * the <mxCodecRegistry>.\n\t *\n\t * Transient Fields:\n\t *\n\t * - model\n\t * - previous\n\t * - root\n\t */\n\tvar codec = new mxObjectCodec(new mxRootChange(),\n\t\t['model', 'previous', 'root']);\n\n\t/**\n\t * Function: onEncode\n\t *\n\t * Encodes the child recursively.\n\t */\n\tcodec.afterEncode = function(enc, obj, node)\n\t{\n\t\tenc.encodeCell(obj.root, node);\n\t\t\n\t\treturn node;\n\t};\n\n\t/**\n\t * Function: beforeDecode\n\t *\n\t * Decodes the optional children as cells\n\t * using the respective decoder.\n\t */\n\tcodec.beforeDecode = function(dec, node, obj)\n\t{\n\t\tif (node.firstChild != null &&\n\t\t\tnode.firstChild.nodeType == mxConstants.NODETYPE_ELEMENT)\n\t\t{\n\t\t\t// Makes sure the original node isn't modified\n\t\t\tnode = node.cloneNode(true);\n\t\t\t\n\t\t\tvar tmp = node.firstChild;\n\t\t\tobj.root = dec.decodeCell(tmp, false);\n\n\t\t\tvar tmp2 = tmp.nextSibling;\n\t\t\ttmp.parentNode.removeChild(tmp);\n\t\t\ttmp = tmp2;\n\t\t\n\t\t\twhile (tmp != null)\n\t\t\t{\n\t\t\t\ttmp2 = tmp.nextSibling;\n\t\t\t\tdec.decodeCell(tmp);\n\t\t\t\ttmp.parentNode.removeChild(tmp);\n\t\t\t\ttmp = tmp2;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn node;\n\t};\n\t\n\t/**\n\t * Function: afterDecode\n\t *\n\t * Restores the state by assigning the previous value.\n\t */\n\tcodec.afterDecode = function(dec, node, obj)\n\t{\n\t\tobj.previous = obj.root;\n\t\t\n\t\treturn obj;\n\t};\n\n\t// Returns the codec into the registry\n\treturn codec;\n\n}());\n"
  },
  {
    "path": "static/cherry/drawio_demo/src/js/io/mxStylesheetCodec.js",
    "content": "/**\n * Copyright (c) 2006-2015, JGraph Ltd\n * Copyright (c) 2006-2015, Gaudenz Alder\n */\n/**\n * Class: mxStylesheetCodec\n *\n * Codec for <mxStylesheet>s. This class is created and registered\n * dynamically at load time and used implicitely via <mxCodec>\n * and the <mxCodecRegistry>.\n */\nvar mxStylesheetCodec = mxCodecRegistry.register(function()\n{\n\tvar codec = new mxObjectCodec(new mxStylesheet());\n\n\t/**\n\t * Function: encode\n\t *\n\t * Encodes a stylesheet. See <decode> for a description of the\n\t * format.\n\t */\n\tcodec.encode = function(enc, obj)\n\t{\n\t\tvar node = enc.document.createElement(this.getName());\n\t\t\n\t\tfor (var i in obj.styles)\n\t\t{\n\t\t\tvar style = obj.styles[i];\n\t\t\tvar styleNode = enc.document.createElement('add');\n\t\t\t\n\t\t\tif (i != null)\n\t\t\t{\n\t\t\t\tstyleNode.setAttribute('as', i);\n\t\t\t\t\n\t\t\t\tfor (var j in style)\n\t\t\t\t{\n\t\t\t\t\tvar value = this.getStringValue(j, style[j]);\n\t\t\t\t\t\n\t\t\t\t\tif (value != null)\n\t\t\t\t\t{\n\t\t\t\t\t\tvar entry = enc.document.createElement('add');\n\t\t\t\t\t\tentry.setAttribute('value', value);\n\t\t\t\t\t\tentry.setAttribute('as', j);\n\t\t\t\t\t\tstyleNode.appendChild(entry);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (styleNode.childNodes.length > 0)\n\t\t\t\t{\n\t\t\t\t\tnode.appendChild(styleNode);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t    return node;\n\t};\n\n\t/**\n\t * Function: getStringValue\n\t *\n\t * Returns the string for encoding the given value.\n\t */\n\tcodec.getStringValue = function(key, value)\n\t{\n\t\tvar type = typeof(value);\n\t\t\n\t\tif (type == 'function')\n\t\t{\n\t\t\tvalue = mxStyleRegistry.getName(style[j]);\n\t\t}\n\t\telse if (type == 'object')\n\t\t{\n\t\t\tvalue = null;\n\t\t}\n\t\t\n\t\treturn value;\n\t};\n\t\n\t/**\n\t * Function: decode\n\t *\n\t * Reads a sequence of the following child nodes\n\t * and attributes:\n\t *\n\t * Child Nodes:\n\t *\n\t * add - Adds a new style.\n\t *\n\t * Attributes:\n\t *\n\t * as - Name of the style.\n\t * extend - Name of the style to inherit from.\n\t *\n\t * Each node contains another sequence of add and remove nodes with the following\n\t * attributes:\n\t *\n\t * as - Name of the style (see <mxConstants>).\n\t * value - Value for the style.\n\t *\n\t * Instead of the value-attribute, one can put Javascript expressions into\n\t * the node as follows if <mxStylesheetCodec.allowEval> is true:\n\t * <add as=\"perimeter\">mxPerimeter.RectanglePerimeter</add>\n\t *\n\t * A remove node will remove the entry with the name given in the as-attribute\n\t * from the style.\n\t * \n\t * Example:\n\t *\n\t * (code)\n\t * <mxStylesheet as=\"stylesheet\">\n\t *   <add as=\"text\">\n\t *     <add as=\"fontSize\" value=\"12\"/>\n\t *   </add>\n\t *   <add as=\"defaultVertex\" extend=\"text\">\n\t *     <add as=\"shape\" value=\"rectangle\"/>\n\t *   </add>\n\t * </mxStylesheet>\n\t * (end)\n\t */\n\tcodec.decode = function(dec, node, into)\n\t{\n\t\tvar obj = into || new this.template.constructor();\n\t\tvar id = node.getAttribute('id');\n\t\t\n\t\tif (id != null)\n\t\t{\n\t\t\tdec.objects[id] = obj;\n\t\t}\n\t\t\n\t\tnode = node.firstChild;\n\t\t\n\t\twhile (node != null)\n\t\t{\n\t\t\tif (!this.processInclude(dec, node, obj) && node.nodeName == 'add')\n\t\t\t{\n\t\t\t\tvar as = node.getAttribute('as');\n\t\t\t\t\n\t\t\t\tif (as != null)\n\t\t\t\t{\n\t\t\t\t\tvar extend = node.getAttribute('extend');\n\t\t\t\t\tvar style = (extend != null) ? mxUtils.clone(obj.styles[extend]) : null;\n\t\t\t\t\t\n\t\t\t\t\tif (style == null)\n\t\t\t\t\t{\n\t\t\t\t\t\tif (extend != null)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tmxLog.warn('mxStylesheetCodec.decode: stylesheet ' +\n\t\t\t\t\t\t\t\textend + ' not found to extend');\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tstyle = new Object();\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tvar entry = node.firstChild;\n\t\t\t\t\t\n\t\t\t\t\twhile (entry != null)\n\t\t\t\t\t{\n\t\t\t\t\t\tif (entry.nodeType == mxConstants.NODETYPE_ELEMENT)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t \tvar key = entry.getAttribute('as');\n\t\t\t\t\t\t \t\n\t\t\t\t\t\t \tif (entry.nodeName == 'add')\n\t\t\t\t\t\t \t{\n\t\t\t\t\t\t\t \tvar text = mxUtils.getTextContent(entry);\n\t\t\t\t\t\t\t \tvar value = null;\n\t\t\t\t\t\t\t \t\n\t\t\t\t\t\t\t \tif (text != null && text.length > 0 && mxStylesheetCodec.allowEval)\n\t\t\t\t\t\t\t \t{\n\t\t\t\t\t\t\t \t\tvalue = mxUtils.eval(text);\n\t\t\t\t\t\t\t \t}\n\t\t\t\t\t\t\t \telse\n\t\t\t\t\t\t\t \t{\n\t\t\t\t\t\t\t \t\tvalue = entry.getAttribute('value');\n\t\t\t\t\t\t\t \t\t\n\t\t\t\t\t\t\t \t\tif (mxUtils.isNumeric(value))\n\t\t\t\t\t\t\t \t\t{\n\t\t\t\t\t\t\t\t\t\tvalue = parseFloat(value);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t \t}\n\n\t\t\t\t\t\t\t \tif (value != null)\n\t\t\t\t\t\t\t \t{\n\t\t\t\t\t\t\t \t\tstyle[key] = value;\n\t\t\t\t\t\t\t \t}\n\t\t\t\t\t\t \t}\n\t\t\t\t\t\t \telse if (entry.nodeName == 'remove')\n\t\t\t\t\t\t \t{\n\t\t\t\t\t\t \t\tdelete style[key];\n\t\t\t\t\t\t \t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tentry = entry.nextSibling;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tobj.putCellStyle(as, style);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tnode = node.nextSibling;\n\t\t}\n\t\t\n\t\treturn obj;\n\t};\n\n\t// Returns the codec into the registry\n\treturn codec;\n\n}());\n\n/**\n * Variable: allowEval\n * \n * Static global switch that specifies if the use of eval is allowed for\n * evaluating text content. Default is true. Set this to false if stylesheets\n * may contain user input.\n */\nmxStylesheetCodec.allowEval = true;\n"
  },
  {
    "path": "static/cherry/drawio_demo/src/js/io/mxTerminalChangeCodec.js",
    "content": "/**\n * Copyright (c) 2006-2015, JGraph Ltd\n * Copyright (c) 2006-2015, Gaudenz Alder\n */\nmxCodecRegistry.register(function()\n{\n\t/**\n\t * Class: mxTerminalChangeCodec\n\t *\n\t * Codec for <mxTerminalChange>s. This class is created and registered\n\t * dynamically at load time and used implicitely via <mxCodec> and\n\t * the <mxCodecRegistry>.\n\t *\n\t * Transient Fields:\n\t *\n\t * - model\n\t * - previous\n\t *\n\t * Reference Fields:\n\t *\n\t * - cell\n\t * - terminal\n\t */\n\tvar codec = new mxObjectCodec(new mxTerminalChange(),\n\t\t['model', 'previous'], ['cell', 'terminal']);\n\n\t/**\n\t * Function: afterDecode\n\t *\n\t * Restores the state by assigning the previous value.\n\t */\n\tcodec.afterDecode = function(dec, node, obj)\n\t{\n\t\tobj.previous = obj.terminal;\n\t\t\n\t\treturn obj;\n\t};\n\n\t// Returns the codec into the registry\n\treturn codec;\n\n}());\n"
  },
  {
    "path": "static/cherry/drawio_demo/src/js/layout/hierarchical/model/mxGraphAbstractHierarchyCell.js",
    "content": "/**\n * Copyright (c) 2006-2015, JGraph Ltd\n * Copyright (c) 2006-2015, Gaudenz Alder\n */\n/**\n * Class: mxGraphAbstractHierarchyCell\n * \n * An abstraction of an internal hierarchy node or edge\n * \n * Constructor: mxGraphAbstractHierarchyCell\n *\n * Constructs a new hierarchical layout algorithm.\n *\n * Arguments:\n * \n * graph - Reference to the enclosing <mxGraph>.\n * deterministic - Optional boolean that specifies if this layout should be\n * deterministic. Default is true.\n */\nfunction mxGraphAbstractHierarchyCell()\n{\n\tthis.x = [];\n\tthis.y = [];\n\tthis.temp = [];\n};\n\n/**\n * Variable: maxRank\n * \n * The maximum rank this cell occupies. Default is -1.\n */\nmxGraphAbstractHierarchyCell.prototype.maxRank = -1;\n\n/**\n * Variable: minRank\n * \n * The minimum rank this cell occupies. Default is -1.\n */\nmxGraphAbstractHierarchyCell.prototype.minRank = -1;\n\n/**\n * Variable: x\n * \n * The x position of this cell for each layer it occupies\n */\nmxGraphAbstractHierarchyCell.prototype.x = null;\n\n/**\n * Variable: y\n * \n * The y position of this cell for each layer it occupies\n */\nmxGraphAbstractHierarchyCell.prototype.y = null;\n\n/**\n * Variable: width\n * \n * The width of this cell\n */\nmxGraphAbstractHierarchyCell.prototype.width = 0;\n\n/**\n * Variable: height\n * \n * The height of this cell\n */\nmxGraphAbstractHierarchyCell.prototype.height = 0;\n\n/**\n * Variable: nextLayerConnectedCells\n * \n * A cached version of the cells this cell connects to on the next layer up\n */\nmxGraphAbstractHierarchyCell.prototype.nextLayerConnectedCells = null;\n\n/**\n * Variable: previousLayerConnectedCells\n * \n * A cached version of the cells this cell connects to on the next layer down\n */\nmxGraphAbstractHierarchyCell.prototype.previousLayerConnectedCells = null;\n\n/**\n * Variable: temp\n * \n * Temporary variable for general use. Generally, try to avoid\n * carrying information between stages. Currently, the longest\n * path layering sets temp to the rank position in fixRanks()\n * and the crossing reduction uses this. This meant temp couldn't\n * be used for hashing the nodes in the model dfs and so hashCode\n * was created\n */\nmxGraphAbstractHierarchyCell.prototype.temp = null;\n\n/**\n * Function: getNextLayerConnectedCells\n * \n * Returns the cells this cell connects to on the next layer up\n */\nmxGraphAbstractHierarchyCell.prototype.getNextLayerConnectedCells = function(layer)\n{\n\treturn null;\n};\n\n/**\n * Function: getPreviousLayerConnectedCells\n * \n * Returns the cells this cell connects to on the next layer down\n */\nmxGraphAbstractHierarchyCell.prototype.getPreviousLayerConnectedCells = function(layer)\n{\n\treturn null;\n};\n\n/**\n * Function: isEdge\n * \n * Returns whether or not this cell is an edge\n */\nmxGraphAbstractHierarchyCell.prototype.isEdge = function()\n{\n\treturn false;\n};\n\n/**\n * Function: isVertex\n * \n * Returns whether or not this cell is a node\n */\nmxGraphAbstractHierarchyCell.prototype.isVertex = function()\n{\n\treturn false;\n};\n\n/**\n * Function: getGeneralPurposeVariable\n * \n * Gets the value of temp for the specified layer\n */\nmxGraphAbstractHierarchyCell.prototype.getGeneralPurposeVariable = function(layer)\n{\n\treturn null;\n};\n\n/**\n * Function: setGeneralPurposeVariable\n * \n * Set the value of temp for the specified layer\n */\nmxGraphAbstractHierarchyCell.prototype.setGeneralPurposeVariable = function(layer, value)\n{\n\treturn null;\n};\n\n/**\n * Function: setX\n * \n * Set the value of x for the specified layer\n */\nmxGraphAbstractHierarchyCell.prototype.setX = function(layer, value)\n{\n\tif (this.isVertex())\n\t{\n\t\tthis.x[0] = value;\n\t}\n\telse if (this.isEdge())\n\t{\n\t\tthis.x[layer - this.minRank - 1] = value;\n\t}\n};\n\n/**\n * Function: getX\n * \n * Gets the value of x on the specified layer\n */\nmxGraphAbstractHierarchyCell.prototype.getX = function(layer)\n{\n\tif (this.isVertex())\n\t{\n\t\treturn this.x[0];\n\t}\n\telse if (this.isEdge())\n\t{\n\t\treturn this.x[layer - this.minRank - 1];\n\t}\n\n\treturn 0.0;\n};\n\n/**\n * Function: setY\n * \n * Set the value of y for the specified layer\n */\nmxGraphAbstractHierarchyCell.prototype.setY = function(layer, value)\n{\n\tif (this.isVertex())\n\t{\n\t\tthis.y[0] = value;\n\t}\n\telse if (this.isEdge())\n\t{\n\t\tthis.y[layer -this. minRank - 1] = value;\n\t}\n};\n"
  },
  {
    "path": "static/cherry/drawio_demo/src/js/layout/hierarchical/model/mxGraphHierarchyEdge.js",
    "content": "/**\n * Copyright (c) 2006-2015, JGraph Ltd\n * Copyright (c) 2006-2015, Gaudenz Alder\n */\n/**\n * Class: mxGraphHierarchyEdge\n * \n * An abstraction of a hierarchical edge for the hierarchy layout\n * \n * Constructor: mxGraphHierarchyEdge\n *\n * Constructs a hierarchy edge\n *\n * Arguments:\n * \n * edges - a list of real graph edges this abstraction represents\n */\nfunction mxGraphHierarchyEdge(edges)\n{\n\tmxGraphAbstractHierarchyCell.apply(this, arguments);\n\tthis.edges = edges;\n\tthis.ids = [];\n\t\n\tfor (var i = 0; i < edges.length; i++)\n\t{\n\t\tthis.ids.push(mxObjectIdentity.get(edges[i]));\n\t}\n};\n\n/**\n * Extends mxGraphAbstractHierarchyCell.\n */\nmxGraphHierarchyEdge.prototype = new mxGraphAbstractHierarchyCell();\nmxGraphHierarchyEdge.prototype.constructor = mxGraphHierarchyEdge;\n\n/**\n * Variable: edges\n * \n * The graph edge(s) this object represents. Parallel edges are all grouped\n * together within one hierarchy edge.\n */\nmxGraphHierarchyEdge.prototype.edges = null;\n\n/**\n * Variable: ids\n * \n * The object identities of the wrapped cells\n */\nmxGraphHierarchyEdge.prototype.ids = null;\n\n/**\n * Variable: source\n * \n * The node this edge is sourced at\n */\nmxGraphHierarchyEdge.prototype.source = null;\n\n/**\n * Variable: target\n * \n * The node this edge targets\n */\nmxGraphHierarchyEdge.prototype.target = null;\n\n/**\n * Variable: isReversed\n * \n * Whether or not the direction of this edge has been reversed\n * internally to create a DAG for the hierarchical layout\n */\nmxGraphHierarchyEdge.prototype.isReversed = false;\n\n/**\n * Function: invert\n * \n * Inverts the direction of this internal edge(s)\n */\nmxGraphHierarchyEdge.prototype.invert = function(layer)\n{\n\tvar temp = this.source;\n\tthis.source = this.target;\n\tthis.target = temp;\n\tthis.isReversed = !this.isReversed;\n};\n\n/**\n * Function: getNextLayerConnectedCells\n * \n * Returns the cells this cell connects to on the next layer up\n */\nmxGraphHierarchyEdge.prototype.getNextLayerConnectedCells = function(layer)\n{\n\tif (this.nextLayerConnectedCells == null)\n\t{\n\t\tthis.nextLayerConnectedCells = [];\n\t\t\n\t\tfor (var i = 0; i < this.temp.length; i++)\n\t\t{\n\t\t\tthis.nextLayerConnectedCells[i] = [];\n\t\t\t\n\t\t\tif (i == this.temp.length - 1)\n\t\t\t{\n\t\t\t\tthis.nextLayerConnectedCells[i].push(this.source);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tthis.nextLayerConnectedCells[i].push(this);\n\t\t\t}\n\t\t}\n\t}\n\t\n\treturn this.nextLayerConnectedCells[layer - this.minRank - 1];\n};\n\n/**\n * Function: getPreviousLayerConnectedCells\n * \n * Returns the cells this cell connects to on the next layer down\n */\nmxGraphHierarchyEdge.prototype.getPreviousLayerConnectedCells = function(layer)\n{\n\tif (this.previousLayerConnectedCells == null)\n\t{\n\t\tthis.previousLayerConnectedCells = [];\n\n\t\tfor (var i = 0; i < this.temp.length; i++)\n\t\t{\n\t\t\tthis.previousLayerConnectedCells[i] = [];\n\t\t\t\n\t\t\tif (i == 0)\n\t\t\t{\n\t\t\t\tthis.previousLayerConnectedCells[i].push(this.target);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tthis.previousLayerConnectedCells[i].push(this);\n\t\t\t}\n\t\t}\n\t}\n\n\treturn this.previousLayerConnectedCells[layer - this.minRank - 1];\n};\n\n/**\n * Function: isEdge\n * \n * Returns true.\n */\nmxGraphHierarchyEdge.prototype.isEdge = function()\n{\n\treturn true;\n};\n\n/**\n * Function: getGeneralPurposeVariable\n * \n * Gets the value of temp for the specified layer\n */\nmxGraphHierarchyEdge.prototype.getGeneralPurposeVariable = function(layer)\n{\n\treturn this.temp[layer - this.minRank - 1];\n};\n\n/**\n * Function: setGeneralPurposeVariable\n * \n * Set the value of temp for the specified layer\n */\nmxGraphHierarchyEdge.prototype.setGeneralPurposeVariable = function(layer, value)\n{\n\tthis.temp[layer - this.minRank - 1] = value;\n};\n\n/**\n * Function: getCoreCell\n * \n * Gets the first core edge associated with this wrapper\n */\nmxGraphHierarchyEdge.prototype.getCoreCell = function()\n{\n\tif (this.edges != null && this.edges.length > 0)\n\t{\n\t\treturn this.edges[0];\n\t}\n\t\n\treturn null;\n};\n"
  },
  {
    "path": "static/cherry/drawio_demo/src/js/layout/hierarchical/model/mxGraphHierarchyModel.js",
    "content": "/**\n * Copyright (c) 2006-2015, JGraph Ltd\n * Copyright (c) 2006-2015, Gaudenz Alder\n */\n/**\n * Class: mxGraphHierarchyModel\n *\n * Internal model of a hierarchical graph. This model stores nodes and edges\n * equivalent to the real graph nodes and edges, but also stores the rank of the\n * cells, the order within the ranks and the new candidate locations of cells.\n * The internal model also reverses edge direction were appropriate , ignores\n * self-loop and groups parallels together under one edge object.\n *\n * Constructor: mxGraphHierarchyModel\n *\n * Creates an internal ordered graph model using the vertices passed in. If\n * there are any, leftward edge need to be inverted in the internal model\n *\n * Arguments:\n *\n * graph - the facade describing the graph to be operated on\n * vertices - the vertices for this hierarchy\n * ordered - whether or not the vertices are already ordered\n * deterministic - whether or not this layout should be deterministic on each\n * tightenToSource - whether or not to tighten vertices towards the sources\n * scanRanksFromSinks - Whether rank assignment is from the sinks or sources.\n * usage\n */\nfunction mxGraphHierarchyModel(layout, vertices, roots, parent, tightenToSource)\n{\n\tvar graph = layout.getGraph();\n\tthis.tightenToSource = tightenToSource;\n\tthis.roots = roots;\n\tthis.parent = parent;\n\n\t// map of cells to internal cell needed for second run through\n\t// to setup the sink of edges correctly\n\tthis.vertexMapper = new mxDictionary();\n\tthis.edgeMapper = new mxDictionary();\n\tthis.maxRank = 0;\n\tvar internalVertices = [];\n\n\tif (vertices == null)\n\t{\n\t\tvertices = this.graph.getChildVertices(parent);\n\t}\n\n\tthis.maxRank = this.SOURCESCANSTARTRANK;\n\t// map of cells to internal cell needed for second run through\n\t// to setup the sink of edges correctly. Guess size by number\n\t// of edges is roughly same as number of vertices.\n\tthis.createInternalCells(layout, vertices, internalVertices);\n\n\t// Go through edges set their sink values. Also check the\n\t// ordering if and invert edges if necessary\n\tfor (var i = 0; i < vertices.length; i++)\n\t{\n\t\tvar edges = internalVertices[i].connectsAsSource;\n\n\t\tfor (var j = 0; j < edges.length; j++)\n\t\t{\n\t\t\tvar internalEdge = edges[j];\n\t\t\tvar realEdges = internalEdge.edges;\n\n\t\t\t// Only need to process the first real edge, since\n\t\t\t// all the edges connect to the same other vertex\n\t\t\tif (realEdges != null && realEdges.length > 0)\n\t\t\t{\n\t\t\t\tvar realEdge = realEdges[0];\n\t\t\t\tvar targetCell = layout.getVisibleTerminal(\n\t\t\t\t\t\trealEdge, false);\n\t\t\t\tvar internalTargetCell = this.vertexMapper.get(targetCell);\n\n\t\t\t\tif (internalVertices[i] == internalTargetCell)\n\t\t\t\t{\n\t\t\t\t\t// If there are parallel edges going between two vertices and not all are in the same direction\n\t\t\t\t\t// you can have navigated across one direction when doing the cycle reversal that isn't the same\n\t\t\t\t\t// direction as the first real edge in the array above. When that happens the if above catches\n\t\t\t\t\t// that and we correct the target cell before continuing.\n\t\t\t\t\t// This branch only detects this single case\n\t\t\t\t\ttargetCell = layout.getVisibleTerminal(\n\t\t\t\t\t\t\trealEdge, true);\n\t\t\t\t\tinternalTargetCell = this.vertexMapper.get(targetCell);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (internalTargetCell != null\n\t\t\t\t\t\t&& internalVertices[i] != internalTargetCell)\n\t\t\t\t{\n\t\t\t\t\tinternalEdge.target = internalTargetCell;\n\n\t\t\t\t\tif (internalTargetCell.connectsAsTarget.length == 0)\n\t\t\t\t\t{\n\t\t\t\t\t\tinternalTargetCell.connectsAsTarget = [];\n\t\t\t\t\t}\n\n\t\t\t\t\tif (mxUtils.indexOf(internalTargetCell.connectsAsTarget, internalEdge) < 0)\n\t\t\t\t\t{\n\t\t\t\t\t\tinternalTargetCell.connectsAsTarget.push(internalEdge);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Use the temp variable in the internal nodes to mark this\n\t\t// internal vertex as having been visited.\n\t\tinternalVertices[i].temp[0] = 1;\n\t}\n};\n\n/**\n * Variable: maxRank\n *\n * Stores the largest rank number allocated\n */\nmxGraphHierarchyModel.prototype.maxRank = null;\n\n/**\n * Variable: vertexMapper\n *\n * Map from graph vertices to internal model nodes.\n */\nmxGraphHierarchyModel.prototype.vertexMapper = null;\n\n/**\n * Variable: edgeMapper\n *\n * Map from graph edges to internal model edges\n */\nmxGraphHierarchyModel.prototype.edgeMapper = null;\n\n/**\n * Variable: ranks\n *\n * Mapping from rank number to actual rank\n */\nmxGraphHierarchyModel.prototype.ranks = null;\n\n/**\n * Variable: roots\n *\n * Store of roots of this hierarchy model, these are real graph cells, not\n * internal cells\n */\nmxGraphHierarchyModel.prototype.roots = null;\n\n/**\n * Variable: parent\n *\n * The parent cell whose children are being laid out\n */\nmxGraphHierarchyModel.prototype.parent = null;\n\n/**\n * Variable: dfsCount\n *\n * Count of the number of times the ancestor dfs has been used.\n */\nmxGraphHierarchyModel.prototype.dfsCount = 0;\n\n/**\n * Variable: SOURCESCANSTARTRANK\n *\n * High value to start source layering scan rank value from.\n */\nmxGraphHierarchyModel.prototype.SOURCESCANSTARTRANK = 100000000;\n\n/**\n * Variable: tightenToSource\n *\n * Whether or not to tighten the assigned ranks of vertices up towards\n * the source cells.\n */\nmxGraphHierarchyModel.prototype.tightenToSource = false;\n\n/**\n * Function: createInternalCells\n *\n * Creates all edges in the internal model\n *\n * Parameters:\n *\n * layout - Reference to the <mxHierarchicalLayout> algorithm.\n * vertices - Array of <mxCells> that represent the vertices whom are to\n * have an internal representation created.\n * internalVertices - The array of <mxGraphHierarchyNodes> to have their\n * information filled in using the real vertices.\n */\nmxGraphHierarchyModel.prototype.createInternalCells = function(layout, vertices, internalVertices)\n{\n\tvar graph = layout.getGraph();\n\n\t// Create internal edges\n\tfor (var i = 0; i < vertices.length; i++)\n\t{\n\t\tinternalVertices[i] = new mxGraphHierarchyNode(vertices[i]);\n\t\tthis.vertexMapper.put(vertices[i], internalVertices[i]);\n\n\t\t// If the layout is deterministic, order the cells\n\t\t//List outgoingCells = graph.getNeighbours(vertices[i], deterministic);\n\t\tvar conns = layout.getEdges(vertices[i]);\n\t\tinternalVertices[i].connectsAsSource = [];\n\n\t\t// Create internal edges, but don't do any rank assignment yet\n\t\t// First use the information from the greedy cycle remover to\n\t\t// invert the leftward edges internally\n\t\tfor (var j = 0; j < conns.length; j++)\n\t\t{\n\t\t\tvar cell = layout.getVisibleTerminal(conns[j], false);\n\n\t\t\t// Looking for outgoing edges only\n\t\t\tif (cell != vertices[i] && layout.graph.model.isVertex(cell) &&\n\t\t\t\t\t!layout.isVertexIgnored(cell))\n\t\t\t{\n\t\t\t\t// We process all edge between this source and its targets\n\t\t\t\t// If there are edges going both ways, we need to collect\n\t\t\t\t// them all into one internal edges to avoid looping problems\n\t\t\t\t// later. We assume this direction (source -> target) is the \n\t\t\t\t// natural direction if at least half the edges are going in\n\t\t\t\t// that direction.\n\n\t\t\t\t// The check below for edges[0] being in the vertex mapper is\n\t\t\t\t// in case we've processed this the other way around\n\t\t\t\t// (target -> source) and the number of edges in each direction\n\t\t\t\t// are the same. All the graph edges will have been assigned to\n\t\t\t\t// an internal edge going the other way, so we don't want to \n\t\t\t\t// process them again\n\t\t\t\tvar undirectedEdges = layout.getEdgesBetween(vertices[i],\n\t\t\t\t\t\tcell, false);\n\t\t\t\tvar directedEdges = layout.getEdgesBetween(vertices[i],\n\t\t\t\t\t\tcell, true);\n\t\t\t\t\n\t\t\t\tif (undirectedEdges != null &&\n\t\t\t\t\t\tundirectedEdges.length > 0 &&\n\t\t\t\t\t\tthis.edgeMapper.get(undirectedEdges[0]) == null &&\n\t\t\t\t\t\tdirectedEdges.length * 2 >= undirectedEdges.length)\n\t\t\t\t{\n\t\t\t\t\tvar internalEdge = new mxGraphHierarchyEdge(undirectedEdges);\n\n\t\t\t\t\tfor (var k = 0; k < undirectedEdges.length; k++)\n\t\t\t\t\t{\n\t\t\t\t\t\tvar edge = undirectedEdges[k];\n\t\t\t\t\t\tthis.edgeMapper.put(edge, internalEdge);\n\n\t\t\t\t\t\t// Resets all point on the edge and disables the edge style\n\t\t\t\t\t\t// without deleting it from the cell style\n\t\t\t\t\t\tgraph.resetEdge(edge);\n\n\t\t\t\t\t    if (layout.disableEdgeStyle)\n\t\t\t\t\t    {\n\t\t\t\t\t    \tlayout.setEdgeStyleEnabled(edge, false);\n\t\t\t\t\t    \tlayout.setOrthogonalEdge(edge,true);\n\t\t\t\t\t    }\n\t\t\t\t\t}\n\n\t\t\t\t\tinternalEdge.source = internalVertices[i];\n\n\t\t\t\t\tif (mxUtils.indexOf(internalVertices[i].connectsAsSource, internalEdge) < 0)\n\t\t\t\t\t{\n\t\t\t\t\t\tinternalVertices[i].connectsAsSource.push(internalEdge);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Ensure temp variable is cleared from any previous use\n\t\tinternalVertices[i].temp[0] = 0;\n\t}\n};\n\n/**\n * Function: initialRank\n *\n * Basic determination of minimum layer ranking by working from from sources\n * or sinks and working through each node in the relevant edge direction.\n * Starting at the sinks is basically a longest path layering algorithm.\n*/\nmxGraphHierarchyModel.prototype.initialRank = function()\n{\n\tvar startNodes = [];\n\n\tif (this.roots != null)\n\t{\n\t\tfor (var i = 0; i < this.roots.length; i++)\n\t\t{\n\t\t\tvar internalNode = this.vertexMapper.get(this.roots[i]);\n\n\t\t\tif (internalNode != null)\n\t\t\t{\n\t\t\t\tstartNodes.push(internalNode);\n\t\t\t}\n\t\t}\n\t}\n\n\tvar internalNodes = this.vertexMapper.getValues();\n\t\n\tfor (var i=0; i < internalNodes.length; i++)\n\t{\n\t\t// Mark the node as not having had a layer assigned\n\t\tinternalNodes[i].temp[0] = -1;\n\t}\n\n\tvar startNodesCopy = startNodes.slice();\n\n\twhile (startNodes.length > 0)\n\t{\n\t\tvar internalNode = startNodes[0];\n\t\tvar layerDeterminingEdges;\n\t\tvar edgesToBeMarked;\n\n\t\tlayerDeterminingEdges = internalNode.connectsAsTarget;\n\t\tedgesToBeMarked = internalNode.connectsAsSource;\n\n\t\t// flag to keep track of whether or not all layer determining\n\t\t// edges have been scanned\n\t\tvar allEdgesScanned = true;\n\n\t\t// Work out the layer of this node from the layer determining\n\t\t// edges. The minimum layer number of any node connected by one of\n\t\t// the layer determining edges variable\n\t\tvar minimumLayer = this.SOURCESCANSTARTRANK;\n\n\t\tfor (var i = 0; i < layerDeterminingEdges.length; i++)\n\t\t{\n\t\t\tvar internalEdge = layerDeterminingEdges[i];\n\n\t\t\tif (internalEdge.temp[0] == 5270620)\n\t\t\t{\n\t\t\t\t// This edge has been scanned, get the layer of the\n\t\t\t\t// node on the other end\n\t\t\t\tvar otherNode = internalEdge.source;\n\t\t\t\tminimumLayer = Math.min(minimumLayer, otherNode.temp[0] - 1);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tallEdgesScanned = false;\n\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\t// If all edge have been scanned, assign the layer, mark all\n\t\t// edges in the other direction and remove from the nodes list\n\t\tif (allEdgesScanned)\n\t\t{\n\t\t\tinternalNode.temp[0] = minimumLayer;\n\t\t\tthis.maxRank = Math.min(this.maxRank, minimumLayer);\n\n\t\t\tif (edgesToBeMarked != null)\n\t\t\t{\n\t\t\t\tfor (var i = 0; i < edgesToBeMarked.length; i++)\n\t\t\t\t{\n\t\t\t\t\tvar internalEdge = edgesToBeMarked[i];\n\n\t\t\t\t\t// Assign unique stamp ( y/m/d/h )\n\t\t\t\t\tinternalEdge.temp[0] = 5270620;\n\n\t\t\t\t\t// Add node on other end of edge to LinkedList of\n\t\t\t\t\t// nodes to be analysed\n\t\t\t\t\tvar otherNode = internalEdge.target;\n\n\t\t\t\t\t// Only add node if it hasn't been assigned a layer\n\t\t\t\t\tif (otherNode.temp[0] == -1)\n\t\t\t\t\t{\n\t\t\t\t\t\tstartNodes.push(otherNode);\n\n\t\t\t\t\t\t// Mark this other node as neither being\n\t\t\t\t\t\t// unassigned nor assigned so it isn't\n\t\t\t\t\t\t// added to this list again, but it's\n\t\t\t\t\t\t// layer isn't used in any calculation.\n\t\t\t\t\t\totherNode.temp[0] = -2;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tstartNodes.shift();\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Not all the edges have been scanned, get to the back of\n\t\t\t// the class and put the dunces cap on\n\t\t\tvar removedCell = startNodes.shift();\n\t\t\tstartNodes.push(internalNode);\n\n\t\t\tif (removedCell == internalNode && startNodes.length == 1)\n\t\t\t{\n\t\t\t\t// This is an error condition, we can't get out of\n\t\t\t\t// this loop. It could happen for more than one node\n\t\t\t\t// but that's a lot harder to detect. Log the error\n\t\t\t\t// TODO make log comment\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Normalize the ranks down from their large starting value to place\n\t// at least 1 sink on layer 0\n\tfor (var i=0; i < internalNodes.length; i++)\n\t{\n\t\t// Mark the node as not having had a layer assigned\n\t\tinternalNodes[i].temp[0] -= this.maxRank;\n\t}\n\t\n\t// Tighten the rank 0 nodes as far as possible\n\tfor ( var i = 0; i < startNodesCopy.length; i++)\n\t{\n\t\tvar internalNode = startNodesCopy[i];\n\t\tvar currentMaxLayer = 0;\n\t\tvar layerDeterminingEdges = internalNode.connectsAsSource;\n\n\t\tfor ( var j = 0; j < layerDeterminingEdges.length; j++)\n\t\t{\n\t\t\tvar internalEdge = layerDeterminingEdges[j];\n\t\t\tvar otherNode = internalEdge.target;\n\t\t\tinternalNode.temp[0] = Math.max(currentMaxLayer,\n\t\t\t\t\totherNode.temp[0] + 1);\n\t\t\tcurrentMaxLayer = internalNode.temp[0];\n\t\t}\n\t}\n\t\n\t// Reset the maxRank to that which would be expected for a from-sink\n\t// scan\n\tthis.maxRank = this.SOURCESCANSTARTRANK - this.maxRank;\n};\n\n/**\n * Function: fixRanks\n *\n * Fixes the layer assignments to the values stored in the nodes. Also needs\n * to create dummy nodes for edges that cross layers.\n */\nmxGraphHierarchyModel.prototype.fixRanks = function()\n{\n\tvar rankList = [];\n\tthis.ranks = [];\n\n\tfor (var i = 0; i < this.maxRank + 1; i++)\n\t{\n\t\trankList[i] = [];\n\t\tthis.ranks[i] = rankList[i];\n\t}\n\n\t// Perform a DFS to obtain an initial ordering for each rank.\n\t// Without doing this you would end up having to process\n\t// crossings for a standard tree.\n\tvar rootsArray = null;\n\n\tif (this.roots != null)\n\t{\n\t\tvar oldRootsArray = this.roots;\n\t\trootsArray = [];\n\n\t\tfor (var i = 0; i < oldRootsArray.length; i++)\n\t\t{\n\t\t\tvar cell = oldRootsArray[i];\n\t\t\tvar internalNode = this.vertexMapper.get(cell);\n\t\t\trootsArray[i] = internalNode;\n\t\t}\n\t}\n\n\tthis.visit(function(parent, node, edge, layer, seen)\n\t{\n\t\tif (seen == 0 && node.maxRank < 0 && node.minRank < 0)\n\t\t{\n\t\t\trankList[node.temp[0]].push(node);\n\t\t\tnode.maxRank = node.temp[0];\n\t\t\tnode.minRank = node.temp[0];\n\n\t\t\t// Set temp[0] to the nodes position in the rank\n\t\t\tnode.temp[0] = rankList[node.maxRank].length - 1;\n\t\t}\n\n\t\tif (parent != null && edge != null)\n\t\t{\n\t\t\tvar parentToCellRankDifference = parent.maxRank - node.maxRank;\n\n\t\t\tif (parentToCellRankDifference > 1)\n\t\t\t{\n\t\t\t\t// There are ranks in between the parent and current cell\n\t\t\t\tedge.maxRank = parent.maxRank;\n\t\t\t\tedge.minRank = node.maxRank;\n\t\t\t\tedge.temp = [];\n\t\t\t\tedge.x = [];\n\t\t\t\tedge.y = [];\n\n\t\t\t\tfor (var i = edge.minRank + 1; i < edge.maxRank; i++)\n\t\t\t\t{\n\t\t\t\t\t// The connecting edge must be added to the\n\t\t\t\t\t// appropriate ranks\n\t\t\t\t\trankList[i].push(edge);\n\t\t\t\t\tedge.setGeneralPurposeVariable(i, rankList[i]\n\t\t\t\t\t\t\t.length - 1);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}, rootsArray, false, null);\n};\n\n/**\n * Function: visit\n *\n * A depth first search through the internal heirarchy model.\n *\n * Parameters:\n *\n * visitor - The visitor function pattern to be called for each node.\n * trackAncestors - Whether or not the search is to keep track all nodes\n * directly above this one in the search path.\n */\nmxGraphHierarchyModel.prototype.visit = function(visitor, dfsRoots, trackAncestors, seenNodes)\n{\n\t// Run dfs through on all roots\n\tif (dfsRoots != null)\n\t{\n\t\tfor (var i = 0; i < dfsRoots.length; i++)\n\t\t{\n\t\t\tvar internalNode = dfsRoots[i];\n\n\t\t\tif (internalNode != null)\n\t\t\t{\n\t\t\t\tif (seenNodes == null)\n\t\t\t\t{\n\t\t\t\t\tseenNodes = new Object();\n\t\t\t\t}\n\n\t\t\t\tif (trackAncestors)\n\t\t\t\t{\n\t\t\t\t\t// Set up hash code for root\n\t\t\t\t\tinternalNode.hashCode = [];\n\t\t\t\t\tinternalNode.hashCode[0] = this.dfsCount;\n\t\t\t\t\tinternalNode.hashCode[1] = i;\n\t\t\t\t\tthis.extendedDfs(null, internalNode, null, visitor, seenNodes,\n\t\t\t\t\t\t\tinternalNode.hashCode, i, 0);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tthis.dfs(null, internalNode, null, visitor, seenNodes, 0);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tthis.dfsCount++;\n\t}\n};\n\n/**\n * Function: dfs\n *\n * Performs a depth first search on the internal hierarchy model\n *\n * Parameters:\n *\n * parent - the parent internal node of the current internal node\n * root - the current internal node\n * connectingEdge - the internal edge connecting the internal node and the parent\n * internal node, if any\n * visitor - the visitor pattern to be called for each node\n * seen - a set of all nodes seen by this dfs a set of all of the\n * ancestor node of the current node\n * layer - the layer on the dfs tree ( not the same as the model ranks )\n */\nmxGraphHierarchyModel.prototype.dfs = function(parent, root, connectingEdge, visitor, seen, layer)\n{\n\tif (root != null)\n\t{\n\t\tvar rootId = root.id;\n\n\t\tif (seen[rootId] == null)\n\t\t{\n\t\t\tseen[rootId] = root;\n\t\t\tvisitor(parent, root, connectingEdge, layer, 0);\n\n\t\t\t// Copy the connects as source list so that visitors\n\t\t\t// can change the original for edge direction inversions\n\t\t\tvar outgoingEdges = root.connectsAsSource.slice();\n\t\t\t\n\t\t\tfor (var i = 0; i< outgoingEdges.length; i++)\n\t\t\t{\n\t\t\t\tvar internalEdge = outgoingEdges[i];\n\t\t\t\tvar targetNode = internalEdge.target;\n\n\t\t\t\t// Root check is O(|roots|)\n\t\t\t\tthis.dfs(root, targetNode, internalEdge, visitor, seen,\n\t\t\t\t\t\tlayer + 1);\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Use the int field to indicate this node has been seen\n\t\t\tvisitor(parent, root, connectingEdge, layer, 1);\n\t\t}\n\t}\n};\n\n/**\n * Function: extendedDfs\n *\n * Performs a depth first search on the internal hierarchy model. This dfs\n * extends the default version by keeping track of cells ancestors, but it\n * should be only used when necessary because of it can be computationally\n * intensive for deep searches.\n *\n * Parameters:\n *\n * parent - the parent internal node of the current internal node\n * root - the current internal node\n * connectingEdge - the internal edge connecting the internal node and the parent\n * internal node, if any\n * visitor - the visitor pattern to be called for each node\n * seen - a set of all nodes seen by this dfs\n * ancestors - the parent hash code\n * childHash - the new hash code for this node\n * layer - the layer on the dfs tree ( not the same as the model ranks )\n */\nmxGraphHierarchyModel.prototype.extendedDfs = function(parent, root, connectingEdge, visitor, seen, ancestors, childHash, layer)\n{\n\t// Explanation of custom hash set. Previously, the ancestors variable\n\t// was passed through the dfs as a HashSet. The ancestors were copied\n\t// into a new HashSet and when the new child was processed it was also\n\t// added to the set. If the current node was in its ancestor list it\n\t// meant there is a cycle in the graph and this information is passed\n\t// to the visitor.visit() in the seen parameter. The HashSet clone was\n\t// very expensive on CPU so a custom hash was developed using primitive\n\t// types. temp[] couldn't be used so hashCode[] was added to each node.\n\t// Each new child adds another int to the array, copying the prefix\n\t// from its parent. Child of the same parent add different ints (the\n\t// limit is therefore 2^32 children per parent...). If a node has a\n\t// child with the hashCode already set then the child code is compared\n\t// to the same portion of the current nodes array. If they match there\n\t// is a loop.\n\t// Note that the basic mechanism would only allow for 1 use of this\n\t// functionality, so the root nodes have two ints. The second int is\n\t// incremented through each node root and the first is incremented\n\t// through each run of the dfs algorithm (therefore the dfs is not\n\t// thread safe). The hash code of each node is set if not already set,\n\t// or if the first int does not match that of the current run.\n\tif (root != null)\n\t{\n\t\tif (parent != null)\n\t\t{\n\t\t\t// Form this nodes hash code if necessary, that is, if the\n\t\t\t// hashCode variable has not been initialized or if the\n\t\t\t// start of the parent hash code does not equal the start of\n\t\t\t// this nodes hash code, indicating the code was set on a\n\t\t\t// previous run of this dfs.\n\t\t\tif (root.hashCode == null ||\n\t\t\t\troot.hashCode[0] != parent.hashCode[0])\n\t\t\t{\n\t\t\t\tvar hashCodeLength = parent.hashCode.length + 1;\n\t\t\t\troot.hashCode = parent.hashCode.slice();\n\t\t\t\troot.hashCode[hashCodeLength - 1] = childHash;\n\t\t\t}\n\t\t}\n\n\t\tvar rootId = root.id;\n\n\t\tif (seen[rootId] == null)\n\t\t{\n\t\t\tseen[rootId] = root;\n\t\t\tvisitor(parent, root, connectingEdge, layer, 0);\n\n\t\t\t// Copy the connects as source list so that visitors\n\t\t\t// can change the original for edge direction inversions\n\t\t\tvar outgoingEdges = root.connectsAsSource.slice();\n\n\t\t\tfor (var i = 0; i < outgoingEdges.length; i++)\n\t\t\t{\n\t\t\t\tvar internalEdge = outgoingEdges[i];\n\t\t\t\tvar targetNode = internalEdge.target;\n\n\t\t\t\t// Root check is O(|roots|)\n\t\t\t\tthis.extendedDfs(root, targetNode, internalEdge, visitor, seen,\n\t\t\t\t\t\troot.hashCode, i, layer + 1);\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Use the int field to indicate this node has been seen\n\t\t\tvisitor(parent, root, connectingEdge, layer, 1);\n\t\t}\n\t}\n};\n"
  },
  {
    "path": "static/cherry/drawio_demo/src/js/layout/hierarchical/model/mxGraphHierarchyNode.js",
    "content": "/**\n * Copyright (c) 2006-2015, JGraph Ltd\n * Copyright (c) 2006-2015, Gaudenz Alder\n */\n/**\n * Class: mxGraphHierarchyNode\n * \n * An abstraction of a hierarchical edge for the hierarchy layout\n * \n * Constructor: mxGraphHierarchyNode\n *\n * Constructs an internal node to represent the specified real graph cell\n *\n * Arguments:\n * \n * cell - the real graph cell this node represents\n */\nfunction mxGraphHierarchyNode(cell)\n{\n\tmxGraphAbstractHierarchyCell.apply(this, arguments);\n\tthis.cell = cell;\n\tthis.id = mxObjectIdentity.get(cell);\n\tthis.connectsAsTarget = [];\n\tthis.connectsAsSource = [];\n};\n\n/**\n * Extends mxGraphAbstractHierarchyCell.\n */\nmxGraphHierarchyNode.prototype = new mxGraphAbstractHierarchyCell();\nmxGraphHierarchyNode.prototype.constructor = mxGraphHierarchyNode;\n\n/**\n * Variable: cell\n * \n * The graph cell this object represents.\n */\nmxGraphHierarchyNode.prototype.cell = null;\n\n/**\n * Variable: id\n * \n * The object identity of the wrapped cell\n */\nmxGraphHierarchyNode.prototype.id = null;\n\n/**\n * Variable: connectsAsTarget\n * \n * Collection of hierarchy edges that have this node as a target\n */\nmxGraphHierarchyNode.prototype.connectsAsTarget = null;\n\n/**\n * Variable: connectsAsSource\n * \n * Collection of hierarchy edges that have this node as a source\n */\nmxGraphHierarchyNode.prototype.connectsAsSource = null;\n\n/**\n * Variable: hashCode\n * \n * Assigns a unique hashcode for each node. Used by the model dfs instead\n * of copying HashSets\n */\nmxGraphHierarchyNode.prototype.hashCode = false;\n\n/**\n * Function: getRankValue\n * \n * Returns the integer value of the layer that this node resides in\n */\nmxGraphHierarchyNode.prototype.getRankValue = function(layer)\n{\n\treturn this.maxRank;\n};\n\n/**\n * Function: getNextLayerConnectedCells\n * \n * Returns the cells this cell connects to on the next layer up\n */\nmxGraphHierarchyNode.prototype.getNextLayerConnectedCells = function(layer)\n{\n\tif (this.nextLayerConnectedCells == null)\n\t{\n\t\tthis.nextLayerConnectedCells = [];\n\t\tthis.nextLayerConnectedCells[0] = [];\n\t\t\n\t\tfor (var i = 0; i < this.connectsAsTarget.length; i++)\n\t\t{\n\t\t\tvar edge = this.connectsAsTarget[i];\n\n\t\t\tif (edge.maxRank == -1 || edge.maxRank == layer + 1)\n\t\t\t{\n\t\t\t\t// Either edge is not in any rank or\n\t\t\t\t// no dummy nodes in edge, add node of other side of edge\n\t\t\t\tthis.nextLayerConnectedCells[0].push(edge.source);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// Edge spans at least two layers, add edge\n\t\t\t\tthis.nextLayerConnectedCells[0].push(edge);\n\t\t\t}\n\t\t}\n\t}\n\n\treturn this.nextLayerConnectedCells[0];\n};\n\n/**\n * Function: getPreviousLayerConnectedCells\n * \n * Returns the cells this cell connects to on the next layer down\n */\nmxGraphHierarchyNode.prototype.getPreviousLayerConnectedCells = function(layer)\n{\n\tif (this.previousLayerConnectedCells == null)\n\t{\n\t\tthis.previousLayerConnectedCells = [];\n\t\tthis.previousLayerConnectedCells[0] = [];\n\t\t\n\t\tfor (var i = 0; i < this.connectsAsSource.length; i++)\n\t\t{\n\t\t\tvar edge = this.connectsAsSource[i];\n\n\t\t\tif (edge.minRank == -1 || edge.minRank == layer - 1)\n\t\t\t{\n\t\t\t\t// No dummy nodes in edge, add node of other side of edge\n\t\t\t\tthis.previousLayerConnectedCells[0].push(edge.target);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// Edge spans at least two layers, add edge\n\t\t\t\tthis.previousLayerConnectedCells[0].push(edge);\n\t\t\t}\n\t\t}\n\t}\n\n\treturn this.previousLayerConnectedCells[0];\n};\n\n/**\n * Function: isVertex\n * \n * Returns true.\n */\nmxGraphHierarchyNode.prototype.isVertex = function()\n{\n\treturn true;\n};\n\n/**\n * Function: getGeneralPurposeVariable\n * \n * Gets the value of temp for the specified layer\n */\nmxGraphHierarchyNode.prototype.getGeneralPurposeVariable = function(layer)\n{\n\treturn this.temp[0];\n};\n\n/**\n * Function: setGeneralPurposeVariable\n * \n * Set the value of temp for the specified layer\n */\nmxGraphHierarchyNode.prototype.setGeneralPurposeVariable = function(layer, value)\n{\n\tthis.temp[0] = value;\n};\n\n/**\n * Function: isAncestor\n */\nmxGraphHierarchyNode.prototype.isAncestor = function(otherNode)\n{\n\t// Firstly, the hash code of this node needs to be shorter than the\n\t// other node\n\tif (otherNode != null && this.hashCode != null && otherNode.hashCode != null\n\t\t\t&& this.hashCode.length < otherNode.hashCode.length)\n\t{\n\t\tif (this.hashCode == otherNode.hashCode)\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\tif (this.hashCode == null || this.hashCode == null)\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t// Secondly, this hash code must match the start of the other\n\t\t// node's hash code. Arrays.equals cannot be used here since\n\t\t// the arrays are different length, and we do not want to\n\t\t// perform another array copy.\n\t\tfor (var i = 0; i < this.hashCode.length; i++)\n\t\t{\n\t\t\tif (this.hashCode[i] != otherNode.hashCode[i])\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t}\n\n\treturn false;\n};\n\n/**\n * Function: getCoreCell\n * \n * Gets the core vertex associated with this wrapper\n */\nmxGraphHierarchyNode.prototype.getCoreCell = function()\n{\n\treturn this.cell;\n};\n"
  },
  {
    "path": "static/cherry/drawio_demo/src/js/layout/hierarchical/model/mxSwimlaneModel.js",
    "content": "/**\n * Copyright (c) 2006-2018, JGraph Ltd\n * Copyright (c) 2006-2018, Gaudenz Alder\n */\n/**\n * Class: mxSwimlaneModel\n *\n * Internal model of a hierarchical graph. This model stores nodes and edges\n * equivalent to the real graph nodes and edges, but also stores the rank of the\n * cells, the order within the ranks and the new candidate locations of cells.\n * The internal model also reverses edge direction were appropriate , ignores\n * self-loop and groups parallels together under one edge object.\n *\n * Constructor: mxSwimlaneModel\n *\n * Creates an internal ordered graph model using the vertices passed in. If\n * there are any, leftward edge need to be inverted in the internal model\n *\n * Arguments:\n *\n * graph - the facade describing the graph to be operated on\n * vertices - the vertices for this hierarchy\n * ordered - whether or not the vertices are already ordered\n * deterministic - whether or not this layout should be deterministic on each\n * tightenToSource - whether or not to tighten vertices towards the sources\n * scanRanksFromSinks - Whether rank assignment is from the sinks or sources.\n * usage\n */\nfunction mxSwimlaneModel(layout, vertices, roots, parent, tightenToSource)\n{\n\tvar graph = layout.getGraph();\n\tthis.tightenToSource = tightenToSource;\n\tthis.roots = roots;\n\tthis.parent = parent;\n\n\t// map of cells to internal cell needed for second run through\n\t// to setup the sink of edges correctly\n\tthis.vertexMapper = new mxDictionary();\n\tthis.edgeMapper = new mxDictionary();\n\tthis.maxRank = 0;\n\tvar internalVertices = [];\n\n\tif (vertices == null)\n\t{\n\t\tvertices = this.graph.getChildVertices(parent);\n\t}\n\n\tthis.maxRank = this.SOURCESCANSTARTRANK;\n\t// map of cells to internal cell needed for second run through\n\t// to setup the sink of edges correctly. Guess size by number\n\t// of edges is roughly same as number of vertices.\n\tthis.createInternalCells(layout, vertices, internalVertices);\n\n\t// Go through edges set their sink values. Also check the\n\t// ordering if and invert edges if necessary\n\tfor (var i = 0; i < vertices.length; i++)\n\t{\n\t\tvar edges = internalVertices[i].connectsAsSource;\n\n\t\tfor (var j = 0; j < edges.length; j++)\n\t\t{\n\t\t\tvar internalEdge = edges[j];\n\t\t\tvar realEdges = internalEdge.edges;\n\n\t\t\t// Only need to process the first real edge, since\n\t\t\t// all the edges connect to the same other vertex\n\t\t\tif (realEdges != null && realEdges.length > 0)\n\t\t\t{\n\t\t\t\tvar realEdge = realEdges[0];\n\t\t\t\tvar targetCell = layout.getVisibleTerminal(\n\t\t\t\t\t\trealEdge, false);\n\t\t\t\tvar internalTargetCell = this.vertexMapper.get(targetCell);\n\n\t\t\t\tif (internalVertices[i] == internalTargetCell)\n\t\t\t\t{\n\t\t\t\t\t// If there are parallel edges going between two vertices and not all are in the same direction\n\t\t\t\t\t// you can have navigated across one direction when doing the cycle reversal that isn't the same\n\t\t\t\t\t// direction as the first real edge in the array above. When that happens the if above catches\n\t\t\t\t\t// that and we correct the target cell before continuing.\n\t\t\t\t\t// This branch only detects this single case\n\t\t\t\t\ttargetCell = layout.getVisibleTerminal(\n\t\t\t\t\t\t\trealEdge, true);\n\t\t\t\t\tinternalTargetCell = this.vertexMapper.get(targetCell);\n\t\t\t\t}\n\n\t\t\t\tif (internalTargetCell != null\n\t\t\t\t\t\t&& internalVertices[i] != internalTargetCell)\n\t\t\t\t{\n\t\t\t\t\tinternalEdge.target = internalTargetCell;\n\n\t\t\t\t\tif (internalTargetCell.connectsAsTarget.length == 0)\n\t\t\t\t\t{\n\t\t\t\t\t\tinternalTargetCell.connectsAsTarget = [];\n\t\t\t\t\t}\n\n\t\t\t\t\tif (mxUtils.indexOf(internalTargetCell.connectsAsTarget, internalEdge) < 0)\n\t\t\t\t\t{\n\t\t\t\t\t\tinternalTargetCell.connectsAsTarget.push(internalEdge);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Use the temp variable in the internal nodes to mark this\n\t\t// internal vertex as having been visited.\n\t\tinternalVertices[i].temp[0] = 1;\n\t}\n};\n\n/**\n * Variable: maxRank\n *\n * Stores the largest rank number allocated\n */\nmxSwimlaneModel.prototype.maxRank = null;\n\n/**\n * Variable: vertexMapper\n *\n * Map from graph vertices to internal model nodes.\n */\nmxSwimlaneModel.prototype.vertexMapper = null;\n\n/**\n * Variable: edgeMapper\n *\n * Map from graph edges to internal model edges\n */\nmxSwimlaneModel.prototype.edgeMapper = null;\n\n/**\n * Variable: ranks\n *\n * Mapping from rank number to actual rank\n */\nmxSwimlaneModel.prototype.ranks = null;\n\n/**\n * Variable: roots\n *\n * Store of roots of this hierarchy model, these are real graph cells, not\n * internal cells\n */\nmxSwimlaneModel.prototype.roots = null;\n\n/**\n * Variable: parent\n *\n * The parent cell whose children are being laid out\n */\nmxSwimlaneModel.prototype.parent = null;\n\n/**\n * Variable: dfsCount\n *\n * Count of the number of times the ancestor dfs has been used.\n */\nmxSwimlaneModel.prototype.dfsCount = 0;\n\n/**\n * Variable: SOURCESCANSTARTRANK\n *\n * High value to start source layering scan rank value from.\n */\nmxSwimlaneModel.prototype.SOURCESCANSTARTRANK = 100000000;\n\n/**\n * Variable: tightenToSource\n *\n * Whether or not to tighten the assigned ranks of vertices up towards\n * the source cells.\n */\nmxSwimlaneModel.prototype.tightenToSource = false;\n\n/**\n * Variable: ranksPerGroup\n *\n * An array of the number of ranks within each swimlane\n */\nmxSwimlaneModel.prototype.ranksPerGroup = null;\n\n/**\n * Function: createInternalCells\n *\n * Creates all edges in the internal model\n *\n * Parameters:\n *\n * layout - Reference to the <mxHierarchicalLayout> algorithm.\n * vertices - Array of <mxCells> that represent the vertices whom are to\n * have an internal representation created.\n * internalVertices - The array of <mxGraphHierarchyNodes> to have their\n * information filled in using the real vertices.\n */\nmxSwimlaneModel.prototype.createInternalCells = function(layout, vertices, internalVertices)\n{\n\tvar graph = layout.getGraph();\n\tvar swimlanes = layout.swimlanes;\n\n\t// Create internal edges\n\tfor (var i = 0; i < vertices.length; i++)\n\t{\n\t\tinternalVertices[i] = new mxGraphHierarchyNode(vertices[i]);\n\t\tthis.vertexMapper.put(vertices[i], internalVertices[i]);\n\t\tinternalVertices[i].swimlaneIndex = -1;\n\n\t\tfor (var ii = 0; ii < swimlanes.length; ii++)\n\t\t{\n\t\t\tif (graph.model.getParent(vertices[i]) == swimlanes[ii])\n\t\t\t{\n\t\t\t\tinternalVertices[i].swimlaneIndex = ii;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\t// If the layout is deterministic, order the cells\n\t\t//List outgoingCells = graph.getNeighbours(vertices[i], deterministic);\n\t\tvar conns = layout.getEdges(vertices[i]);\n\t\tinternalVertices[i].connectsAsSource = [];\n\n\t\t// Create internal edges, but don't do any rank assignment yet\n\t\t// First use the information from the greedy cycle remover to\n\t\t// invert the leftward edges internally\n\t\tfor (var j = 0; j < conns.length; j++)\n\t\t{\n\t\t\tvar cell = layout.getVisibleTerminal(conns[j], false);\n\n\t\t\t// Looking for outgoing edges only\n\t\t\tif (cell != vertices[i] && layout.graph.model.isVertex(cell) &&\n\t\t\t\t\t!layout.isVertexIgnored(cell))\n\t\t\t{\n\t\t\t\t// We process all edge between this source and its targets\n\t\t\t\t// If there are edges going both ways, we need to collect\n\t\t\t\t// them all into one internal edges to avoid looping problems\n\t\t\t\t// later. We assume this direction (source -> target) is the \n\t\t\t\t// natural direction if at least half the edges are going in\n\t\t\t\t// that direction.\n\n\t\t\t\t// The check below for edges[0] being in the vertex mapper is\n\t\t\t\t// in case we've processed this the other way around\n\t\t\t\t// (target -> source) and the number of edges in each direction\n\t\t\t\t// are the same. All the graph edges will have been assigned to\n\t\t\t\t// an internal edge going the other way, so we don't want to \n\t\t\t\t// process them again\n\t\t\t\tvar undirectedEdges = layout.getEdgesBetween(vertices[i],\n\t\t\t\t\t\tcell, false);\n\t\t\t\tvar directedEdges = layout.getEdgesBetween(vertices[i],\n\t\t\t\t\t\tcell, true);\n\t\t\t\t\n\t\t\t\tif (undirectedEdges != null &&\n\t\t\t\t\t\tundirectedEdges.length > 0 &&\n\t\t\t\t\t\tthis.edgeMapper.get(undirectedEdges[0]) == null &&\n\t\t\t\t\t\tdirectedEdges.length * 2 >= undirectedEdges.length)\n\t\t\t\t{\n\t\t\t\t\tvar internalEdge = new mxGraphHierarchyEdge(undirectedEdges);\n\n\t\t\t\t\tfor (var k = 0; k < undirectedEdges.length; k++)\n\t\t\t\t\t{\n\t\t\t\t\t\tvar edge = undirectedEdges[k];\n\t\t\t\t\t\tthis.edgeMapper.put(edge, internalEdge);\n\n\t\t\t\t\t\t// Resets all point on the edge and disables the edge style\n\t\t\t\t\t\t// without deleting it from the cell style\n\t\t\t\t\t\tgraph.resetEdge(edge);\n\n\t\t\t\t\t    if (layout.disableEdgeStyle)\n\t\t\t\t\t    {\n\t\t\t\t\t    \tlayout.setEdgeStyleEnabled(edge, false);\n\t\t\t\t\t    \tlayout.setOrthogonalEdge(edge,true);\n\t\t\t\t\t    }\n\t\t\t\t\t}\n\n\t\t\t\t\tinternalEdge.source = internalVertices[i];\n\n\t\t\t\t\tif (mxUtils.indexOf(internalVertices[i].connectsAsSource, internalEdge) < 0)\n\t\t\t\t\t{\n\t\t\t\t\t\tinternalVertices[i].connectsAsSource.push(internalEdge);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Ensure temp variable is cleared from any previous use\n\t\tinternalVertices[i].temp[0] = 0;\n\t}\n};\n\n/**\n * Function: initialRank\n *\n * Basic determination of minimum layer ranking by working from from sources\n * or sinks and working through each node in the relevant edge direction.\n * Starting at the sinks is basically a longest path layering algorithm.\n*/\nmxSwimlaneModel.prototype.initialRank = function()\n{\n\tthis.ranksPerGroup = [];\n\t\n\tvar startNodes = [];\n\tvar seen = new Object();\n\n\tif (this.roots != null)\n\t{\n\t\tfor (var i = 0; i < this.roots.length; i++)\n\t\t{\n\t\t\tvar internalNode = this.vertexMapper.get(this.roots[i]);\n\t\t\tthis.maxChainDfs(null, internalNode, null, seen, 0);\n\n\t\t\tif (internalNode != null)\n\t\t\t{\n\t\t\t\tstartNodes.push(internalNode);\n\t\t\t}\n\t\t}\n\t}\n\n\t// Calculate the lower and upper rank bounds of each swimlane\n\tvar lowerRank = [];\n\tvar upperRank = [];\n\t\n\tfor (var i = this.ranksPerGroup.length - 1; i >= 0; i--)\n\t{\n\t\tif (i == this.ranksPerGroup.length - 1)\n\t\t{\n\t\t\tlowerRank[i] = 0;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tlowerRank[i] = upperRank[i+1] + 1;\n\t\t}\n\t\t\n\t\tupperRank[i] = lowerRank[i] + this.ranksPerGroup[i];\n\t}\n\t\n\tthis.maxRank = upperRank[0];\n\n\tvar internalNodes = this.vertexMapper.getValues();\n\t\n\tfor (var i=0; i < internalNodes.length; i++)\n\t{\n\t\t// Mark the node as not having had a layer assigned\n\t\tinternalNodes[i].temp[0] = -1;\n\t}\n\n\tvar startNodesCopy = startNodes.slice();\n\t\n\twhile (startNodes.length > 0)\n\t{\n\t\tvar internalNode = startNodes[0];\n\t\tvar layerDeterminingEdges;\n\t\tvar edgesToBeMarked;\n\n\t\tlayerDeterminingEdges = internalNode.connectsAsTarget;\n\t\tedgesToBeMarked = internalNode.connectsAsSource;\n\n\t\t// flag to keep track of whether or not all layer determining\n\t\t// edges have been scanned\n\t\tvar allEdgesScanned = true;\n\n\t\t// Work out the layer of this node from the layer determining\n\t\t// edges. The minimum layer number of any node connected by one of\n\t\t// the layer determining edges variable\n\t\tvar minimumLayer = upperRank[0];\n\n\t\tfor (var i = 0; i < layerDeterminingEdges.length; i++)\n\t\t{\n\t\t\tvar internalEdge = layerDeterminingEdges[i];\n\n\t\t\tif (internalEdge.temp[0] == 5270620)\n\t\t\t{\n\t\t\t\t// This edge has been scanned, get the layer of the\n\t\t\t\t// node on the other end\n\t\t\t\tvar otherNode = internalEdge.source;\n\t\t\t\tminimumLayer = Math.min(minimumLayer, otherNode.temp[0] - 1);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tallEdgesScanned = false;\n\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\t// If all edge have been scanned, assign the layer, mark all\n\t\t// edges in the other direction and remove from the nodes list\n\t\tif (allEdgesScanned)\n\t\t{\n\t\t\tif (minimumLayer > upperRank[internalNode.swimlaneIndex])\n\t\t\t{\n\t\t\t\tminimumLayer = upperRank[internalNode.swimlaneIndex];\n\t\t\t}\n\n\t\t\tinternalNode.temp[0] = minimumLayer;\n\n\t\t\tif (edgesToBeMarked != null)\n\t\t\t{\n\t\t\t\tfor (var i = 0; i < edgesToBeMarked.length; i++)\n\t\t\t\t{\n\t\t\t\t\tvar internalEdge = edgesToBeMarked[i];\n\n\t\t\t\t\t// Assign unique stamp ( y/m/d/h )\n\t\t\t\t\tinternalEdge.temp[0] = 5270620;\n\n\t\t\t\t\t// Add node on other end of edge to LinkedList of\n\t\t\t\t\t// nodes to be analysed\n\t\t\t\t\tvar otherNode = internalEdge.target;\n\n\t\t\t\t\t// Only add node if it hasn't been assigned a layer\n\t\t\t\t\tif (otherNode.temp[0] == -1)\n\t\t\t\t\t{\n\t\t\t\t\t\tstartNodes.push(otherNode);\n\n\t\t\t\t\t\t// Mark this other node as neither being\n\t\t\t\t\t\t// unassigned nor assigned so it isn't\n\t\t\t\t\t\t// added to this list again, but it's\n\t\t\t\t\t\t// layer isn't used in any calculation.\n\t\t\t\t\t\totherNode.temp[0] = -2;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tstartNodes.shift();\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Not all the edges have been scanned, get to the back of\n\t\t\t// the class and put the dunces cap on\n\t\t\tvar removedCell = startNodes.shift();\n\t\t\tstartNodes.push(internalNode);\n\n\t\t\tif (removedCell == internalNode && startNodes.length == 1)\n\t\t\t{\n\t\t\t\t// This is an error condition, we can't get out of\n\t\t\t\t// this loop. It could happen for more than one node\n\t\t\t\t// but that's a lot harder to detect. Log the error\n\t\t\t\t// TODO make log comment\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Normalize the ranks down from their large starting value to place\n\t// at least 1 sink on layer 0\n//\tfor (var key in this.vertexMapper)\n//\t{\n//\t\tvar internalNode = this.vertexMapper[key];\n//\t\t// Mark the node as not having had a layer assigned\n//\t\tinternalNode.temp[0] -= this.maxRank;\n//\t}\n\t\n\t// Tighten the rank 0 nodes as far as possible\n//\tfor ( var i = 0; i < startNodesCopy.length; i++)\n//\t{\n//\t\tvar internalNode = startNodesCopy[i];\n//\t\tvar currentMaxLayer = 0;\n//\t\tvar layerDeterminingEdges = internalNode.connectsAsSource;\n//\n//\t\tfor ( var j = 0; j < layerDeterminingEdges.length; j++)\n//\t\t{\n//\t\t\tvar internalEdge = layerDeterminingEdges[j];\n//\t\t\tvar otherNode = internalEdge.target;\n//\t\t\tinternalNode.temp[0] = Math.max(currentMaxLayer,\n//\t\t\t\t\totherNode.temp[0] + 1);\n//\t\t\tcurrentMaxLayer = internalNode.temp[0];\n//\t\t}\n//\t}\n};\n\n/**\n * Function: maxChainDfs\n *\n * Performs a depth first search on the internal hierarchy model. This dfs\n * extends the default version by keeping track of chains within groups.\n * Any cycles should be removed prior to running, but previously seen cells\n * are ignored.\n *\n * Parameters:\n *\n * parent - the parent internal node of the current internal node\n * root - the current internal node\n * connectingEdge - the internal edge connecting the internal node and the parent\n * internal node, if any\n * seen - a set of all nodes seen by this dfs\n * chainCount - the number of edges in the chain of vertices going through\n * the current swimlane\n */\nmxSwimlaneModel.prototype.maxChainDfs = function(parent, root, connectingEdge, seen, chainCount)\n{\n\tif (root != null)\n\t{\n\t\tvar rootId = mxCellPath.create(root.cell);\n\n\t\tif (seen[rootId] == null)\n\t\t{\n\t\t\tseen[rootId] = root;\n\t\t\tvar slIndex = root.swimlaneIndex;\n\t\t\t\n\t\t\tif (this.ranksPerGroup[slIndex] == null || this.ranksPerGroup[slIndex] < chainCount)\n\t\t\t{\n\t\t\t\tthis.ranksPerGroup[slIndex] = chainCount;\n\t\t\t}\n\n\t\t\t// Copy the connects as source list so that visitors\n\t\t\t// can change the original for edge direction inversions\n\t\t\tvar outgoingEdges = root.connectsAsSource.slice();\n\n\t\t\tfor (var i = 0; i < outgoingEdges.length; i++)\n\t\t\t{\n\t\t\t\tvar internalEdge = outgoingEdges[i];\n\t\t\t\tvar targetNode = internalEdge.target;\n\n\t\t\t\t// Only navigate in source->target direction within the same\n\t\t\t\t// swimlane, or from a lower index swimlane to a higher one\n\t\t\t\tif (root.swimlaneIndex < targetNode.swimlaneIndex)\n\t\t\t\t{\n\t\t\t\t\tthis.maxChainDfs(root, targetNode, internalEdge, mxUtils.clone(seen, null , true), 0);\n\t\t\t\t}\n\t\t\t\telse if (root.swimlaneIndex == targetNode.swimlaneIndex)\n\t\t\t\t{\n\t\t\t\t\tthis.maxChainDfs(root, targetNode, internalEdge, mxUtils.clone(seen, null , true), chainCount + 1);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n};\n\n/**\n * Function: fixRanks\n *\n * Fixes the layer assignments to the values stored in the nodes. Also needs\n * to create dummy nodes for edges that cross layers.\n */\nmxSwimlaneModel.prototype.fixRanks = function()\n{\n\tvar rankList = [];\n\tthis.ranks = [];\n\n\tfor (var i = 0; i < this.maxRank + 1; i++)\n\t{\n\t\trankList[i] = [];\n\t\tthis.ranks[i] = rankList[i];\n\t}\n\n\t// Perform a DFS to obtain an initial ordering for each rank.\n\t// Without doing this you would end up having to process\n\t// crossings for a standard tree.\n\tvar rootsArray = null;\n\n\tif (this.roots != null)\n\t{\n\t\tvar oldRootsArray = this.roots;\n\t\trootsArray = [];\n\n\t\tfor (var i = 0; i < oldRootsArray.length; i++)\n\t\t{\n\t\t\tvar cell = oldRootsArray[i];\n\t\t\tvar internalNode = this.vertexMapper.get(cell);\n\t\t\trootsArray[i] = internalNode;\n\t\t}\n\t}\n\n\tthis.visit(function(parent, node, edge, layer, seen)\n\t{\n\t\tif (seen == 0 && node.maxRank < 0 && node.minRank < 0)\n\t\t{\n\t\t\trankList[node.temp[0]].push(node);\n\t\t\tnode.maxRank = node.temp[0];\n\t\t\tnode.minRank = node.temp[0];\n\n\t\t\t// Set temp[0] to the nodes position in the rank\n\t\t\tnode.temp[0] = rankList[node.maxRank].length - 1;\n\t\t}\n\n\t\tif (parent != null && edge != null)\n\t\t{\n\t\t\tvar parentToCellRankDifference = parent.maxRank - node.maxRank;\n\n\t\t\tif (parentToCellRankDifference > 1)\n\t\t\t{\n\t\t\t\t// There are ranks in between the parent and current cell\n\t\t\t\tedge.maxRank = parent.maxRank;\n\t\t\t\tedge.minRank = node.maxRank;\n\t\t\t\tedge.temp = [];\n\t\t\t\tedge.x = [];\n\t\t\t\tedge.y = [];\n\n\t\t\t\tfor (var i = edge.minRank + 1; i < edge.maxRank; i++)\n\t\t\t\t{\n\t\t\t\t\t// The connecting edge must be added to the\n\t\t\t\t\t// appropriate ranks\n\t\t\t\t\trankList[i].push(edge);\n\t\t\t\t\tedge.setGeneralPurposeVariable(i, rankList[i]\n\t\t\t\t\t\t\t.length - 1);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}, rootsArray, false, null);\n};\n\n/**\n * Function: visit\n *\n * A depth first search through the internal heirarchy model.\n *\n * Parameters:\n *\n * visitor - The visitor function pattern to be called for each node.\n * trackAncestors - Whether or not the search is to keep track all nodes\n * directly above this one in the search path.\n */\nmxSwimlaneModel.prototype.visit = function(visitor, dfsRoots, trackAncestors, seenNodes)\n{\n\t// Run dfs through on all roots\n\tif (dfsRoots != null)\n\t{\n\t\tfor (var i = 0; i < dfsRoots.length; i++)\n\t\t{\n\t\t\tvar internalNode = dfsRoots[i];\n\n\t\t\tif (internalNode != null)\n\t\t\t{\n\t\t\t\tif (seenNodes == null)\n\t\t\t\t{\n\t\t\t\t\tseenNodes = new Object();\n\t\t\t\t}\n\n\t\t\t\tif (trackAncestors)\n\t\t\t\t{\n\t\t\t\t\t// Set up hash code for root\n\t\t\t\t\tinternalNode.hashCode = [];\n\t\t\t\t\tinternalNode.hashCode[0] = this.dfsCount;\n\t\t\t\t\tinternalNode.hashCode[1] = i;\n\t\t\t\t\tthis.extendedDfs(null, internalNode, null, visitor, seenNodes,\n\t\t\t\t\t\t\tinternalNode.hashCode, i, 0);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tthis.dfs(null, internalNode, null, visitor, seenNodes, 0);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tthis.dfsCount++;\n\t}\n};\n\n/**\n * Function: dfs\n *\n * Performs a depth first search on the internal hierarchy model\n *\n * Parameters:\n *\n * parent - the parent internal node of the current internal node\n * root - the current internal node\n * connectingEdge - the internal edge connecting the internal node and the parent\n * internal node, if any\n * visitor - the visitor pattern to be called for each node\n * seen - a set of all nodes seen by this dfs a set of all of the\n * ancestor node of the current node\n * layer - the layer on the dfs tree ( not the same as the model ranks )\n */\nmxSwimlaneModel.prototype.dfs = function(parent, root, connectingEdge, visitor, seen, layer)\n{\n\tif (root != null)\n\t{\n\t\tvar rootId = root.id;\n\n\t\tif (seen[rootId] == null)\n\t\t{\n\t\t\tseen[rootId] = root;\n\t\t\tvisitor(parent, root, connectingEdge, layer, 0);\n\n\t\t\t// Copy the connects as source list so that visitors\n\t\t\t// can change the original for edge direction inversions\n\t\t\tvar outgoingEdges = root.connectsAsSource.slice();\n\t\t\t\n\t\t\tfor (var i = 0; i< outgoingEdges.length; i++)\n\t\t\t{\n\t\t\t\tvar internalEdge = outgoingEdges[i];\n\t\t\t\tvar targetNode = internalEdge.target;\n\n\t\t\t\t// Root check is O(|roots|)\n\t\t\t\tthis.dfs(root, targetNode, internalEdge, visitor, seen,\n\t\t\t\t\t\tlayer + 1);\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Use the int field to indicate this node has been seen\n\t\t\tvisitor(parent, root, connectingEdge, layer, 1);\n\t\t}\n\t}\n};\n\n/**\n * Function: extendedDfs\n *\n * Performs a depth first search on the internal hierarchy model. This dfs\n * extends the default version by keeping track of cells ancestors, but it\n * should be only used when necessary because of it can be computationally\n * intensive for deep searches.\n *\n * Parameters:\n *\n * parent - the parent internal node of the current internal node\n * root - the current internal node\n * connectingEdge - the internal edge connecting the internal node and the parent\n * internal node, if any\n * visitor - the visitor pattern to be called for each node\n * seen - a set of all nodes seen by this dfs\n * ancestors - the parent hash code\n * childHash - the new hash code for this node\n * layer - the layer on the dfs tree ( not the same as the model ranks )\n */\nmxSwimlaneModel.prototype.extendedDfs = function(parent, root, connectingEdge, visitor, seen, ancestors, childHash, layer)\n{\n\t// Explanation of custom hash set. Previously, the ancestors variable\n\t// was passed through the dfs as a HashSet. The ancestors were copied\n\t// into a new HashSet and when the new child was processed it was also\n\t// added to the set. If the current node was in its ancestor list it\n\t// meant there is a cycle in the graph and this information is passed\n\t// to the visitor.visit() in the seen parameter. The HashSet clone was\n\t// very expensive on CPU so a custom hash was developed using primitive\n\t// types. temp[] couldn't be used so hashCode[] was added to each node.\n\t// Each new child adds another int to the array, copying the prefix\n\t// from its parent. Child of the same parent add different ints (the\n\t// limit is therefore 2^32 children per parent...). If a node has a\n\t// child with the hashCode already set then the child code is compared\n\t// to the same portion of the current nodes array. If they match there\n\t// is a loop.\n\t// Note that the basic mechanism would only allow for 1 use of this\n\t// functionality, so the root nodes have two ints. The second int is\n\t// incremented through each node root and the first is incremented\n\t// through each run of the dfs algorithm (therefore the dfs is not\n\t// thread safe). The hash code of each node is set if not already set,\n\t// or if the first int does not match that of the current run.\n\tif (root != null)\n\t{\n\t\tif (parent != null)\n\t\t{\n\t\t\t// Form this nodes hash code if necessary, that is, if the\n\t\t\t// hashCode variable has not been initialized or if the\n\t\t\t// start of the parent hash code does not equal the start of\n\t\t\t// this nodes hash code, indicating the code was set on a\n\t\t\t// previous run of this dfs.\n\t\t\tif (root.hashCode == null ||\n\t\t\t\troot.hashCode[0] != parent.hashCode[0])\n\t\t\t{\n\t\t\t\tvar hashCodeLength = parent.hashCode.length + 1;\n\t\t\t\troot.hashCode = parent.hashCode.slice();\n\t\t\t\troot.hashCode[hashCodeLength - 1] = childHash;\n\t\t\t}\n\t\t}\n\n\t\tvar rootId = root.id;\n\n\t\tif (seen[rootId] == null)\n\t\t{\n\t\t\tseen[rootId] = root;\n\t\t\tvisitor(parent, root, connectingEdge, layer, 0);\n\n\t\t\t// Copy the connects as source list so that visitors\n\t\t\t// can change the original for edge direction inversions\n\t\t\tvar outgoingEdges = root.connectsAsSource.slice();\n\t\t\tvar incomingEdges = root.connectsAsTarget.slice();\n\n\t\t\tfor (var i = 0; i < outgoingEdges.length; i++)\n\t\t\t{\n\t\t\t\tvar internalEdge = outgoingEdges[i];\n\t\t\t\tvar targetNode = internalEdge.target;\n\t\t\t\t\n\t\t\t\t// Only navigate in source->target direction within the same\n\t\t\t\t// swimlane, or from a lower index swimlane to a higher one\n\t\t\t\tif (root.swimlaneIndex <= targetNode.swimlaneIndex)\n\t\t\t\t{\n\t\t\t\t\tthis.extendedDfs(root, targetNode, internalEdge, visitor, seen,\n\t\t\t\t\t\t\troot.hashCode, i, layer + 1);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tfor (var i = 0; i < incomingEdges.length; i++)\n\t\t\t{\n\t\t\t\tvar internalEdge = incomingEdges[i];\n\t\t\t\tvar targetNode = internalEdge.source;\n\n\t\t\t\t// Only navigate in target->source direction from a lower index \n\t\t\t\t// swimlane to a higher one\n\t\t\t\tif (root.swimlaneIndex < targetNode.swimlaneIndex)\n\t\t\t\t{\n\t\t\t\t\tthis.extendedDfs(root, targetNode, internalEdge, visitor, seen,\n\t\t\t\t\t\t\troot.hashCode, i, layer + 1);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Use the int field to indicate this node has been seen\n\t\t\tvisitor(parent, root, connectingEdge, layer, 1);\n\t\t}\n\t}\n};\n"
  },
  {
    "path": "static/cherry/drawio_demo/src/js/layout/hierarchical/mxHierarchicalLayout.js",
    "content": "/**\n * Copyright (c) 2006-2018, JGraph Ltd\n * Copyright (c) 2006-2018, Gaudenz Alder\n */\n/**\n * Class: mxHierarchicalLayout\n * \n * A hierarchical layout algorithm.\n * \n * Constructor: mxHierarchicalLayout\n *\n * Constructs a new hierarchical layout algorithm.\n *\n * Arguments:\n * \n * graph - Reference to the enclosing <mxGraph>.\n * orientation - Optional constant that defines the orientation of this\n * layout.\n * deterministic - Optional boolean that specifies if this layout should be\n * deterministic. Default is true.\n */\nfunction mxHierarchicalLayout(graph, orientation, deterministic)\n{\n\tmxGraphLayout.call(this, graph);\n\tthis.orientation = (orientation != null) ? orientation : mxConstants.DIRECTION_NORTH;\n\tthis.deterministic = (deterministic != null) ? deterministic : true;\n};\n\nvar mxHierarchicalEdgeStyle =\n{\n\tORTHOGONAL: 1,\n\tPOLYLINE: 2,\n\tSTRAIGHT: 3,\n\tCURVE: 4\n};\n\n/**\n * Extends mxGraphLayout.\n */\nmxHierarchicalLayout.prototype = new mxGraphLayout();\nmxHierarchicalLayout.prototype.constructor = mxHierarchicalLayout;\n\n/**\n * Variable: roots\n * \n * Holds the array of <mxCell> that this layout contains.\n */\nmxHierarchicalLayout.prototype.roots = null;\n\n/**\n * Variable: resizeParent\n * \n * Specifies if the parent should be resized after the layout so that it\n * contains all the child cells. Default is false. See also <parentBorder>.\n */\nmxHierarchicalLayout.prototype.resizeParent = false;\n\n/**\n * Variable: maintainParentLocation\n * \n * Specifies if the parent location should be maintained, so that the\n * top, left corner stays the same before and after execution of\n * the layout. Default is false for backwards compatibility.\n */\nmxHierarchicalLayout.prototype.maintainParentLocation = false;\n\n/**\n * Variable: moveParent\n * \n * Specifies if the parent should be moved if <resizeParent> is enabled.\n * Default is false.\n */\nmxHierarchicalLayout.prototype.moveParent = false;\n\n/**\n * Variable: parentBorder\n * \n * The border to be added around the children if the parent is to be\n * resized using <resizeParent>. Default is 0.\n */\nmxHierarchicalLayout.prototype.parentBorder = 0;\n\n/**\n * Variable: intraCellSpacing\n * \n * The spacing buffer added between cells on the same layer. Default is 30.\n */\nmxHierarchicalLayout.prototype.intraCellSpacing = 30;\n\n/**\n * Variable: interRankCellSpacing\n * \n * The spacing buffer added between cell on adjacent layers. Default is 50.\n */\nmxHierarchicalLayout.prototype.interRankCellSpacing = 100;\n\n/**\n * Variable: interHierarchySpacing\n * \n * The spacing buffer between unconnected hierarchies. Default is 60.\n */\nmxHierarchicalLayout.prototype.interHierarchySpacing = 60;\n\n/**\n * Variable: parallelEdgeSpacing\n * \n * The distance between each parallel edge on each ranks for long edges\n */\nmxHierarchicalLayout.prototype.parallelEdgeSpacing = 10;\n\n/**\n * Variable: orientation\n * \n * The position of the root node(s) relative to the laid out graph in.\n * Default is <mxConstants.DIRECTION_NORTH>.\n */\nmxHierarchicalLayout.prototype.orientation = mxConstants.DIRECTION_NORTH;\n\n/**\n * Variable: fineTuning\n * \n * Whether or not to perform local optimisations and iterate multiple times\n * through the algorithm. Default is true.\n */\nmxHierarchicalLayout.prototype.fineTuning = true;\n\n/**\n * \n * Variable: tightenToSource\n * \n * Whether or not to tighten the assigned ranks of vertices up towards\n * the source cells.\n */\nmxHierarchicalLayout.prototype.tightenToSource = true;\n\n/**\n * Variable: disableEdgeStyle\n * \n * Specifies if the STYLE_NOEDGESTYLE flag should be set on edges that are\n * modified by the result. Default is true.\n */\nmxHierarchicalLayout.prototype.disableEdgeStyle = true;\n\n/**\n * Variable: traverseAncestors\n * \n * Whether or not to drill into child cells and layout in reverse\n * group order. This also cause the layout to navigate edges whose \n * terminal vertices have different parents but are in the same \n * ancestry chain\n */\nmxHierarchicalLayout.prototype.traverseAncestors = true;\n\n/**\n * Variable: model\n * \n * The internal <mxGraphHierarchyModel> formed of the layout.\n */\nmxHierarchicalLayout.prototype.model = null;\n\n/**\n * Variable: edgesSet\n * \n * A cache of edges whose source terminal is the key\n */\nmxHierarchicalLayout.prototype.edgesCache = null;\n\n/**\n * Variable: edgesSet\n * \n * A cache of edges whose source terminal is the key\n */\nmxHierarchicalLayout.prototype.edgeSourceTermCache = null;\n\n/**\n * Variable: edgesSet\n * \n * A cache of edges whose source terminal is the key\n */\nmxHierarchicalLayout.prototype.edgesTargetTermCache = null;\n\n/**\n * Variable: edgeStyle\n * \n * The style to apply between cell layers to edge segments\n */\nmxHierarchicalLayout.prototype.edgeStyle = mxHierarchicalEdgeStyle.POLYLINE;\n\n/**\n * Function: getModel\n * \n * Returns the internal <mxGraphHierarchyModel> for this layout algorithm.\n */\nmxHierarchicalLayout.prototype.getModel = function()\n{\n\treturn this.model;\n};\n\n/**\n * Function: execute\n * \n * Executes the layout for the children of the specified parent.\n * \n * Parameters:\n * \n * parent - Parent <mxCell> that contains the children to be laid out.\n * roots - Optional starting roots of the layout.\n */\nmxHierarchicalLayout.prototype.execute = function(parent, roots)\n{\n\tthis.parent = parent;\n\tvar model = this.graph.model;\n\tthis.edgesCache = new mxDictionary();\n\tthis.edgeSourceTermCache = new mxDictionary();\n\tthis.edgesTargetTermCache = new mxDictionary();\n\n\tif (roots != null && !(roots instanceof Array))\n\t{\n\t\troots = [roots];\n\t}\n\t\n\t// If the roots are set and the parent is set, only\n\t// use the roots that are some dependent of the that\n\t// parent.\n\t// If just the root are set, use them as-is\n\t// If just the parent is set use it's immediate\n\t// children as the initial set\n\n\tif (roots == null && parent == null)\n\t{\n\t\t// TODO indicate the problem\n\t\treturn;\n\t}\n\t\n\t//  Maintaining parent location\n\tthis.parentX = null;\n\tthis.parentY = null;\n\t\n\tif (parent != this.root && model.isVertex(parent) != null && this.maintainParentLocation)\n\t{\n\t\tvar geo = this.graph.getCellGeometry(parent);\n\t\t\n\t\tif (geo != null)\n\t\t{\n\t\t\tthis.parentX = geo.x;\n\t\t\tthis.parentY = geo.y;\n\t\t}\n\t}\n\t\n\tif (roots != null)\n\t{\n\t\tvar rootsCopy = [];\n\n\t\tfor (var i = 0; i < roots.length; i++)\n\t\t{\n\t\t\tvar ancestor = parent != null ? model.isAncestor(parent, roots[i]) : true;\n\t\t\t\n\t\t\tif (ancestor && model.isVertex(roots[i]))\n\t\t\t{\n\t\t\t\trootsCopy.push(roots[i]);\n\t\t\t}\n\t\t}\n\n\t\tthis.roots = rootsCopy;\n\t}\n\t\n\tmodel.beginUpdate();\n\ttry\n\t{\n\t\tthis.run(parent);\n\t\t\n\t\tif (this.resizeParent && !this.graph.isCellCollapsed(parent))\n\t\t{\n\t\t\tthis.graph.updateGroupBounds([parent], this.parentBorder, this.moveParent);\n\t\t}\n\t\t\n\t\t// Maintaining parent location\n\t\tif (this.parentX != null && this.parentY != null)\n\t\t{\n\t\t\tvar geo = this.graph.getCellGeometry(parent);\n\t\t\t\n\t\t\tif (geo != null)\n\t\t\t{\n\t\t\t\tgeo = geo.clone();\n\t\t\t\tgeo.x = this.parentX;\n\t\t\t\tgeo.y = this.parentY;\n\t\t\t\tmodel.setGeometry(parent, geo);\n\t\t\t}\n\t\t}\n\t}\n\tfinally\n\t{\n\t\tmodel.endUpdate();\n\t}\n};\n\n/**\n * Function: findRoots\n * \n * Returns all visible children in the given parent which do not have\n * incoming edges. If the result is empty then the children with the\n * maximum difference between incoming and outgoing edges are returned.\n * This takes into account edges that are being promoted to the given\n * root due to invisible children or collapsed cells.\n * \n * Parameters:\n * \n * parent - <mxCell> whose children should be checked.\n * vertices - array of vertices to limit search to\n */\nmxHierarchicalLayout.prototype.findRoots = function(parent, vertices)\n{\n\tvar roots = [];\n\t\n\tif (parent != null && vertices != null)\n\t{\n\t\tvar model = this.graph.model;\n\t\tvar best = null;\n\t\tvar maxDiff = -100000;\n\t\t\n\t\tfor (var i in vertices)\n\t\t{\n\t\t\tvar cell = vertices[i];\n\n\t\t\tif (model.isVertex(cell) && this.graph.isCellVisible(cell))\n\t\t\t{\n\t\t\t\tvar conns = this.getEdges(cell);\n\t\t\t\tvar fanOut = 0;\n\t\t\t\tvar fanIn = 0;\n\n\t\t\t\tfor (var k = 0; k < conns.length; k++)\n\t\t\t\t{\n\t\t\t\t\tvar src = this.getVisibleTerminal(conns[k], true);\n\n\t\t\t\t\tif (src == cell)\n\t\t\t\t\t{\n\t\t\t\t\t\tfanOut++;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tfanIn++;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (fanIn == 0 && fanOut > 0)\n\t\t\t\t{\n\t\t\t\t\troots.push(cell);\n\t\t\t\t}\n\n\t\t\t\tvar diff = fanOut - fanIn;\n\n\t\t\t\tif (diff > maxDiff)\n\t\t\t\t{\n\t\t\t\t\tmaxDiff = diff;\n\t\t\t\t\tbest = cell;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (roots.length == 0 && best != null)\n\t\t{\n\t\t\troots.push(best);\n\t\t}\n\t}\n\t\n\treturn roots;\n};\n\n/**\n * Function: getEdges\n * \n * Returns the connected edges for the given cell.\n * \n * Parameters:\n * \n * cell - <mxCell> whose edges should be returned.\n */\nmxHierarchicalLayout.prototype.getEdges = function(cell)\n{\n\tvar cachedEdges = this.edgesCache.get(cell);\n\t\n\tif (cachedEdges != null)\n\t{\n\t\treturn cachedEdges;\n\t}\n\n\tvar model = this.graph.model;\n\tvar edges = [];\n\tvar isCollapsed = this.graph.isCellCollapsed(cell);\n\tvar childCount = model.getChildCount(cell);\n\n\tfor (var i = 0; i < childCount; i++)\n\t{\n\t\tvar child = model.getChildAt(cell, i);\n\n\t\tif (this.isPort(child))\n\t\t{\n\t\t\tedges = edges.concat(model.getEdges(child, true, true));\n\t\t}\n\t\telse if (isCollapsed || !this.graph.isCellVisible(child))\n\t\t{\n\t\t\tedges = edges.concat(model.getEdges(child, true, true));\n\t\t}\n\t}\n\n\tedges = edges.concat(model.getEdges(cell, true, true));\n\tvar result = [];\n\t\n\tfor (var i = 0; i < edges.length; i++)\n\t{\n\t\tvar source = this.getVisibleTerminal(edges[i], true);\n\t\tvar target = this.getVisibleTerminal(edges[i], false);\n\t\t\n\t\tif ((source == target) ||\n\t\t\t\t((source != target) &&\n\t\t\t\t\t\t((target == cell && (this.parent == null || this.isAncestor(this.parent, source, this.traverseAncestors))) ||\n\t\t\t\t\t\t \t(source == cell && (this.parent == null || this.isAncestor(this.parent, target, this.traverseAncestors))))))\n\t\t{\n\t\t\tresult.push(edges[i]);\n\t\t}\n\t}\n\n\tthis.edgesCache.put(cell, result);\n\n\treturn result;\n};\n\n/**\n * Function: getVisibleTerminal\n * \n * Helper function to return visible terminal for edge allowing for ports\n * \n * Parameters:\n * \n * edge - <mxCell> whose edges should be returned.\n * source - Boolean that specifies whether the source or target terminal is to be returned\n */\nmxHierarchicalLayout.prototype.getVisibleTerminal = function(edge, source)\n{\n\tvar terminalCache = this.edgesTargetTermCache;\n\t\n\tif (source)\n\t{\n\t\tterminalCache = this.edgeSourceTermCache;\n\t}\n\n\tvar term = terminalCache.get(edge);\n\n\tif (term != null)\n\t{\n\t\treturn term;\n\t}\n\n\tvar state = this.graph.view.getState(edge);\n\t\n\tvar terminal = (state != null) ? state.getVisibleTerminal(source) : this.graph.view.getVisibleTerminal(edge, source);\n\t\n\tif (terminal == null)\n\t{\n\t\tterminal = (state != null) ? state.getVisibleTerminal(source) : this.graph.view.getVisibleTerminal(edge, source);\n\t}\n\n\tif (terminal != null)\n\t{\n\t\tif (this.isPort(terminal))\n\t\t{\n\t\t\tterminal = this.graph.model.getParent(terminal);\n\t\t}\n\t\t\n\t\tterminalCache.put(edge, terminal);\n\t}\n\n\treturn terminal;\n};\n\n/**\n * Function: run\n * \n * The API method used to exercise the layout upon the graph description\n * and produce a separate description of the vertex position and edge\n * routing changes made. It runs each stage of the layout that has been\n * created.\n */\nmxHierarchicalLayout.prototype.run = function(parent)\n{\n\t// Separate out unconnected hierarchies\n\tvar hierarchyVertices = [];\n\tvar allVertexSet = [];\n\n\tif (this.roots == null && parent != null)\n\t{\n\t\tvar filledVertexSet = Object();\n\t\tthis.filterDescendants(parent, filledVertexSet);\n\n\t\tthis.roots = [];\n\t\tvar filledVertexSetEmpty = true;\n\n\t\t// Poor man's isSetEmpty\n\t\tfor (var key in filledVertexSet)\n\t\t{\n\t\t\tif (filledVertexSet[key] != null)\n\t\t\t{\n\t\t\t\tfilledVertexSetEmpty = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\twhile (!filledVertexSetEmpty)\n\t\t{\n\t\t\tvar candidateRoots = this.findRoots(parent, filledVertexSet);\n\t\t\t\n\t\t\t// If the candidate root is an unconnected group cell, remove it from\n\t\t\t// the layout. We may need a custom set that holds such groups and forces\n\t\t\t// them to be processed for resizing and/or moving.\n\t\t\t\n\n\t\t\tfor (var i = 0; i < candidateRoots.length; i++)\n\t\t\t{\n\t\t\t\tvar vertexSet = Object();\n\t\t\t\thierarchyVertices.push(vertexSet);\n\n\t\t\t\tthis.traverse(candidateRoots[i], true, null, allVertexSet, vertexSet,\n\t\t\t\t\t\thierarchyVertices, filledVertexSet);\n\t\t\t}\n\n\t\t\tfor (var i = 0; i < candidateRoots.length; i++)\n\t\t\t{\n\t\t\t\tthis.roots.push(candidateRoots[i]);\n\t\t\t}\n\t\t\t\n\t\t\tfilledVertexSetEmpty = true;\n\t\t\t\n\t\t\t// Poor man's isSetEmpty\n\t\t\tfor (var key in filledVertexSet)\n\t\t\t{\n\t\t\t\tif (filledVertexSet[key] != null)\n\t\t\t\t{\n\t\t\t\t\tfilledVertexSetEmpty = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\telse\n\t{\n\t\t// Find vertex set as directed traversal from roots\n\n\t\tfor (var i = 0; i < this.roots.length; i++)\n\t\t{\n\t\t\tvar vertexSet = Object();\n\t\t\thierarchyVertices.push(vertexSet);\n\n\t\t\tthis.traverse(this.roots[i], true, null, allVertexSet, vertexSet,\n\t\t\t\t\thierarchyVertices, null);\n\t\t}\n\t}\n\n\t// Iterate through the result removing parents who have children in this layout\n\t\n\t// Perform a layout for each seperate hierarchy\n\t// Track initial coordinate x-positioning\n\tvar initialX = 0;\n\n\tfor (var i = 0; i < hierarchyVertices.length; i++)\n\t{\n\t\tvar vertexSet = hierarchyVertices[i];\n\t\tvar tmp = [];\n\t\t\n\t\tfor (var key in vertexSet)\n\t\t{\n\t\t\ttmp.push(vertexSet[key]);\n\t\t}\n\t\t\n\t\tthis.model = new mxGraphHierarchyModel(this, tmp, this.roots,\n\t\t\tparent, this.tightenToSource);\n\n\t\tthis.cycleStage(parent);\n\t\tthis.layeringStage();\n\t\t\n\t\tthis.crossingStage(parent);\n\t\tinitialX = this.placementStage(initialX, parent);\n\t}\n};\n\n/**\n * Function: filterDescendants\n * \n * Creates an array of descendant cells\n */\nmxHierarchicalLayout.prototype.filterDescendants = function(cell, result)\n{\n\tvar model = this.graph.model;\n\n\tif (model.isVertex(cell) && cell != this.parent && this.graph.isCellVisible(cell))\n\t{\n\t\tresult[mxObjectIdentity.get(cell)] = cell;\n\t}\n\n\tif (this.traverseAncestors || cell == this.parent\n\t\t\t&& this.graph.isCellVisible(cell))\n\t{\n\t\tvar childCount = model.getChildCount(cell);\n\n\t\tfor (var i = 0; i < childCount; i++)\n\t\t{\n\t\t\tvar child = model.getChildAt(cell, i);\n\t\t\t\n\t\t\t// Ignore ports in the layout vertex list, they are dealt with\n\t\t\t// in the traversal mechanisms\n\t\t\tif (!this.isPort(child))\n\t\t\t{\n\t\t\t\tthis.filterDescendants(child, result);\n\t\t\t}\n\t\t}\n\t}\n};\n\n/**\n * Function: isPort\n * \n * Returns true if the given cell is a \"port\", that is, when connecting to\n * it, its parent is the connecting vertex in terms of graph traversal\n * \n * Parameters:\n * \n * cell - <mxCell> that represents the port.\n */\nmxHierarchicalLayout.prototype.isPort = function(cell)\n{\n\tif (cell != null && cell.geometry != null)\n\t{\n\t\treturn cell.geometry.relative;\n\t}\n\telse\n\t{\n\t\treturn false;\n\t}\n};\n\n/**\n * Function: getEdgesBetween\n * \n * Returns the edges between the given source and target. This takes into\n * account collapsed and invisible cells and ports.\n * \n * Parameters:\n * \n * source -\n * target -\n * directed -\n */\nmxHierarchicalLayout.prototype.getEdgesBetween = function(source, target, directed)\n{\n\tdirected = (directed != null) ? directed : false;\n\tvar edges = this.getEdges(source);\n\tvar result = [];\n\n\t// Checks if the edge is connected to the correct\n\t// cell and returns the first match\n\tfor (var i = 0; i < edges.length; i++)\n\t{\n\t\tvar src = this.getVisibleTerminal(edges[i], true);\n\t\tvar trg = this.getVisibleTerminal(edges[i], false);\n\n\t\tif ((src == source && trg == target) || (!directed && src == target && trg == source))\n\t\t{\n\t\t\tresult.push(edges[i]);\n\t\t}\n\t}\n\n\treturn result;\n};\n\n/**\n * Traverses the (directed) graph invoking the given function for each\n * visited vertex and edge. The function is invoked with the current vertex\n * and the incoming edge as a parameter. This implementation makes sure\n * each vertex is only visited once. The function may return false if the\n * traversal should stop at the given vertex.\n * \n * Parameters:\n * \n * vertex - <mxCell> that represents the vertex where the traversal starts.\n * directed - boolean indicating if edges should only be traversed\n * from source to target. Default is true.\n * edge - Optional <mxCell> that represents the incoming edge. This is\n * null for the first step of the traversal.\n * allVertices - Array of cell paths for the visited cells.\n */\nmxHierarchicalLayout.prototype.traverse = function(vertex, directed, edge, allVertices, currentComp,\n\t\t\t\t\t\t\t\t\t\t\thierarchyVertices, filledVertexSet)\n{\n\tif (vertex != null && allVertices != null)\n\t{\n\t\t// Has this vertex been seen before in any traversal\n\t\t// And if the filled vertex set is populated, only \n\t\t// process vertices in that it contains\n\t\tvar vertexID = mxObjectIdentity.get(vertex);\n\t\t\n\t\tif ((allVertices[vertexID] == null)\n\t\t\t\t&& (filledVertexSet == null ? true : filledVertexSet[vertexID] != null))\n\t\t{\n\t\t\tif (currentComp[vertexID] == null)\n\t\t\t{\n\t\t\t\tcurrentComp[vertexID] = vertex;\n\t\t\t}\n\t\t\tif (allVertices[vertexID] == null)\n\t\t\t{\n\t\t\t\tallVertices[vertexID] = vertex;\n\t\t\t}\n\n\t\t\tif (filledVertexSet !== null)\n\t\t\t{\n\t\t\t\tdelete filledVertexSet[vertexID];\n\t\t\t}\n\n\t\t\tvar edges = this.getEdges(vertex);\n\t\t\tvar edgeIsSource = [];\n\n\t\t\tfor (var i = 0; i < edges.length; i++)\n\t\t\t{\n\t\t\t\tedgeIsSource[i] = (this.getVisibleTerminal(edges[i], true) == vertex);\n\t\t\t}\n\n\t\t\tfor (var i = 0; i < edges.length; i++)\n\t\t\t{\n\t\t\t\tif (!directed || edgeIsSource[i])\n\t\t\t\t{\n\t\t\t\t\tvar next = this.getVisibleTerminal(edges[i], !edgeIsSource[i]);\n\t\t\t\t\t\n\t\t\t\t\t// Check whether there are more edges incoming from the target vertex than outgoing\n\t\t\t\t\t// The hierarchical model treats bi-directional parallel edges as being sourced\n\t\t\t\t\t// from the more \"sourced\" terminal. If the directions are equal in number, the direction\n\t\t\t\t\t// is that of the natural direction from the roots of the layout.\n\t\t\t\t\t// The checks below are slightly more verbose than need be for performance reasons\n\t\t\t\t\tvar netCount = 1;\n\n\t\t\t\t\tfor (var j = 0; j < edges.length; j++)\n\t\t\t\t\t{\n\t\t\t\t\t\tif (j == i)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tvar isSource2 = edgeIsSource[j];\n\t\t\t\t\t\t\tvar otherTerm = this.getVisibleTerminal(edges[j], !isSource2);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif (otherTerm == next)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif (isSource2)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tnetCount++;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tnetCount--;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tif (netCount >= 0)\n\t\t\t\t\t{\n\t\t\t\t\t\tcurrentComp = this.traverse(next, directed, edges[i], allVertices,\n\t\t\t\t\t\t\tcurrentComp, hierarchyVertices,\n\t\t\t\t\t\t\tfilledVertexSet);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif (currentComp[vertexID] == null)\n\t\t\t{\n\t\t\t\t// We've seen this vertex before, but not in the current component\n\t\t\t\t// This component and the one it's in need to be merged\n\n\t\t\t\tfor (var i = 0; i < hierarchyVertices.length; i++)\n\t\t\t\t{\n\t\t\t\t\tvar comp = hierarchyVertices[i];\n\n\t\t\t\t\tif (comp[vertexID] != null)\n\t\t\t\t\t{\n\t\t\t\t\t\tfor (var key in comp)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcurrentComp[key] = comp[key];\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t// Remove the current component from the hierarchy set\n\t\t\t\t\t\thierarchyVertices.splice(i, 1);\n\t\t\t\t\t\treturn currentComp;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t\n\treturn currentComp;\n};\n\n/**\n * Function: cycleStage\n * \n * Executes the cycle stage using mxMinimumCycleRemover.\n */\nmxHierarchicalLayout.prototype.cycleStage = function(parent)\n{\n\tvar cycleStage = new mxMinimumCycleRemover(this);\n\tcycleStage.execute(parent);\n};\n\n/**\n * Function: layeringStage\n * \n * Implements first stage of a Sugiyama layout.\n */\nmxHierarchicalLayout.prototype.layeringStage = function()\n{\n\tthis.model.initialRank();\n\tthis.model.fixRanks();\n};\n\n/**\n * Function: crossingStage\n * \n * Executes the crossing stage using mxMedianHybridCrossingReduction.\n */\nmxHierarchicalLayout.prototype.crossingStage = function(parent)\n{\n\tvar crossingStage = new mxMedianHybridCrossingReduction(this);\n\tcrossingStage.execute(parent);\n};\n\n/**\n * Function: placementStage\n * \n * Executes the placement stage using mxCoordinateAssignment.\n */\nmxHierarchicalLayout.prototype.placementStage = function(initialX, parent)\n{\n\tvar placementStage = new mxCoordinateAssignment(this, this.intraCellSpacing,\n\t\t\tthis.interRankCellSpacing, this.orientation, initialX,\n\t\t\tthis.parallelEdgeSpacing);\n\tplacementStage.fineTuning = this.fineTuning;\n\tplacementStage.execute(parent);\n\t\n\treturn placementStage.limitX + this.interHierarchySpacing;\n};\n"
  },
  {
    "path": "static/cherry/drawio_demo/src/js/layout/hierarchical/mxSwimlaneLayout.js",
    "content": "/**\n * Copyright (c) 2006-2015, JGraph Ltd\n * Copyright (c) 2006-2015, Gaudenz Alder\n */\n/**\n * Class: mxSwimlaneLayout\n * \n * A hierarchical layout algorithm.\n * \n * Constructor: mxSwimlaneLayout\n *\n * Constructs a new hierarchical layout algorithm.\n *\n * Arguments:\n * \n * graph - Reference to the enclosing <mxGraph>.\n * orientation - Optional constant that defines the orientation of this\n * layout.\n * deterministic - Optional boolean that specifies if this layout should be\n * deterministic. Default is true.\n */\nfunction mxSwimlaneLayout(graph, orientation, deterministic)\n{\n\tmxGraphLayout.call(this, graph);\n\tthis.orientation = (orientation != null) ? orientation : mxConstants.DIRECTION_NORTH;\n\tthis.deterministic = (deterministic != null) ? deterministic : true;\n};\n\n/**\n * Extends mxGraphLayout.\n */\nmxSwimlaneLayout.prototype = new mxGraphLayout();\nmxSwimlaneLayout.prototype.constructor = mxSwimlaneLayout;\n\n/**\n * Variable: roots\n * \n * Holds the array of <mxCell> that this layout contains.\n */\nmxSwimlaneLayout.prototype.roots = null;\n\n/**\n * Variable: swimlanes\n * \n * Holds the array of <mxCell> of the ordered swimlanes to lay out\n */\nmxSwimlaneLayout.prototype.swimlanes = null;\n\n/**\n * Variable: dummyVertices\n * \n * Holds an array of <mxCell> of dummy vertices inserted during the layout\n * to pad out empty swimlanes\n */\nmxSwimlaneLayout.prototype.dummyVertices = null;\n\n/**\n * Variable: dummyVertexWidth\n * \n * The cell width of any dummy vertices inserted\n */\nmxSwimlaneLayout.prototype.dummyVertexWidth = 50;\n\n/**\n * Variable: resizeParent\n * \n * Specifies if the parent should be resized after the layout so that it\n * contains all the child cells. Default is false. See also <parentBorder>.\n */\nmxSwimlaneLayout.prototype.resizeParent = false;\n\n/**\n * Variable: maintainParentLocation\n * \n * Specifies if the parent location should be maintained, so that the\n * top, left corner stays the same before and after execution of\n * the layout. Default is false for backwards compatibility.\n */\nmxSwimlaneLayout.prototype.maintainParentLocation = false;\n\n/**\n * Variable: moveParent\n * \n * Specifies if the parent should be moved if <resizeParent> is enabled.\n * Default is false.\n */\nmxSwimlaneLayout.prototype.moveParent = false;\n\n/**\n * Variable: parentBorder\n * \n * The border to be added around the children if the parent is to be\n * resized using <resizeParent>. Default is 0.\n */\nmxSwimlaneLayout.prototype.parentBorder = 30;\n\n/**\n * Variable: intraCellSpacing\n * \n * The spacing buffer added between cells on the same layer. Default is 30.\n */\nmxSwimlaneLayout.prototype.intraCellSpacing = 30;\n\n/**\n * Variable: interRankCellSpacing\n * \n * The spacing buffer added between cell on adjacent layers. Default is 50.\n */\nmxSwimlaneLayout.prototype.interRankCellSpacing = 100;\n\n/**\n * Variable: interHierarchySpacing\n * \n * The spacing buffer between unconnected hierarchies. Default is 60.\n */\nmxSwimlaneLayout.prototype.interHierarchySpacing = 60;\n\n/**\n * Variable: parallelEdgeSpacing\n * \n * The distance between each parallel edge on each ranks for long edges\n */\nmxSwimlaneLayout.prototype.parallelEdgeSpacing = 10;\n\n/**\n * Variable: orientation\n * \n * The position of the root node(s) relative to the laid out graph in.\n * Default is <mxConstants.DIRECTION_NORTH>.\n */\nmxSwimlaneLayout.prototype.orientation = mxConstants.DIRECTION_NORTH;\n\n/**\n * Variable: fineTuning\n * \n * Whether or not to perform local optimisations and iterate multiple times\n * through the algorithm. Default is true.\n */\nmxSwimlaneLayout.prototype.fineTuning = true;\n\n/**\n * \n * Variable: tightenToSource\n * \n * Whether or not to tighten the assigned ranks of vertices up towards\n * the source cells.\n */\nmxSwimlaneLayout.prototype.tightenToSource = true;\n\n/**\n * Variable: disableEdgeStyle\n * \n * Specifies if the STYLE_NOEDGESTYLE flag should be set on edges that are\n * modified by the result. Default is true.\n */\nmxSwimlaneLayout.prototype.disableEdgeStyle = true;\n\n/**\n * Variable: traverseAncestors\n * \n * Whether or not to drill into child cells and layout in reverse\n * group order. This also cause the layout to navigate edges whose \n * terminal vertices  * have different parents but are in the same \n * ancestry chain\n */\nmxSwimlaneLayout.prototype.traverseAncestors = true;\n\n/**\n * Variable: model\n * \n * The internal <mxSwimlaneModel> formed of the layout.\n */\nmxSwimlaneLayout.prototype.model = null;\n\n/**\n * Variable: edgesSet\n * \n * A cache of edges whose source terminal is the key\n */\nmxSwimlaneLayout.prototype.edgesCache = null;\n\n/**\n * Variable: edgesSet\n * \n * A cache of edges whose source terminal is the key\n */\nmxHierarchicalLayout.prototype.edgeSourceTermCache = null;\n\n/**\n * Variable: edgesSet\n * \n * A cache of edges whose source terminal is the key\n */\nmxHierarchicalLayout.prototype.edgesTargetTermCache = null;\n\n/**\n * Variable: edgeStyle\n * \n * The style to apply between cell layers to edge segments\n */\nmxHierarchicalLayout.prototype.edgeStyle = mxHierarchicalEdgeStyle.POLYLINE;\n\n/**\n * Function: getModel\n * \n * Returns the internal <mxSwimlaneModel> for this layout algorithm.\n */\nmxSwimlaneLayout.prototype.getModel = function()\n{\n\treturn this.model;\n};\n\n/**\n * Function: execute\n * \n * Executes the layout for the children of the specified parent.\n * \n * Parameters:\n * \n * parent - Parent <mxCell> that contains the children to be laid out.\n * swimlanes - Ordered array of swimlanes to be laid out\n */\nmxSwimlaneLayout.prototype.execute = function(parent, swimlanes)\n{\n\tthis.parent = parent;\n\tvar model = this.graph.model;\n\tthis.edgesCache = new mxDictionary();\n\tthis.edgeSourceTermCache = new mxDictionary();\n\tthis.edgesTargetTermCache = new mxDictionary();\n\n\t// If the roots are set and the parent is set, only\n\t// use the roots that are some dependent of the that\n\t// parent.\n\t// If just the root are set, use them as-is\n\t// If just the parent is set use it's immediate\n\t// children as the initial set\n\n\tif (swimlanes == null || swimlanes.length < 1)\n\t{\n\t\t// TODO indicate the problem\n\t\treturn;\n\t}\n\n\tif (parent == null)\n\t{\n\t\tparent = model.getParent(swimlanes[0]);\n\t}\n\n\t//  Maintaining parent location\n\tthis.parentX = null;\n\tthis.parentY = null;\n\t\n\tif (parent != this.root && model.isVertex(parent) != null && this.maintainParentLocation)\n\t{\n\t\tvar geo = this.graph.getCellGeometry(parent);\n\t\t\n\t\tif (geo != null)\n\t\t{\n\t\t\tthis.parentX = geo.x;\n\t\t\tthis.parentY = geo.y;\n\t\t}\n\t}\n\n\tthis.swimlanes = swimlanes;\n\tthis.dummyVertices = [];\n\t// Check the swimlanes all have vertices\n\t// in them\n\tfor (var i = 0; i < swimlanes.length; i++)\n\t{\n\t\tvar children = this.graph.getChildCells(swimlanes[i]);\n\t\t\n\t\tif (children == null || children.length == 0)\n\t\t{\n\t\t\tvar vertex = this.graph.insertVertex(swimlanes[i], null, null, 0, 0, this.dummyVertexWidth, 0);\n\t\t\tthis.dummyVertices.push(vertex);\n\t\t}\n\t}\n\t\n\tmodel.beginUpdate();\n\ttry\n\t{\n\t\tthis.run(parent);\n\t\t\n\t\tif (this.resizeParent && !this.graph.isCellCollapsed(parent))\n\t\t{\n\t\t\tthis.graph.updateGroupBounds([parent], this.parentBorder, this.moveParent);\n\t\t}\n\t\t\n\t\t// Maintaining parent location\n\t\tif (this.parentX != null && this.parentY != null)\n\t\t{\n\t\t\tvar geo = this.graph.getCellGeometry(parent);\n\t\t\t\n\t\t\tif (geo != null)\n\t\t\t{\n\t\t\t\tgeo = geo.clone();\n\t\t\t\tgeo.x = this.parentX;\n\t\t\t\tgeo.y = this.parentY;\n\t\t\t\tmodel.setGeometry(parent, geo);\n\t\t\t}\n\t\t}\n\n\t\tthis.graph.removeCells(this.dummyVertices);\n\t}\n\tfinally\n\t{\n\t\tmodel.endUpdate();\n\t}\n};\n\n/**\n * Function: updateGroupBounds\n * \n * Updates the bounds of the given array of groups so that it includes\n * all child vertices.\n * \n */\nmxSwimlaneLayout.prototype.updateGroupBounds = function()\n{\n\t// Get all vertices and edge in the layout\n\tvar cells = [];\n\tvar model = this.model;\n\t\n\tfor (var key in model.edgeMapper)\n\t{\n\t\tvar edge = model.edgeMapper[key];\n\t\t\n\t\tfor (var i = 0; i < edge.edges.length; i++)\n\t\t{\n\t\t\tcells.push(edge.edges[i]);\n\t\t}\n\t}\n\t\n\tvar layoutBounds = this.graph.getBoundingBoxFromGeometry(cells, true);\n\tvar childBounds = [];\n\n\tfor (var i = 0; i < this.swimlanes.length; i++)\n\t{\n\t\tvar lane = this.swimlanes[i];\n\t\tvar geo = this.graph.getCellGeometry(lane);\n\t\t\n\t\tif (geo != null)\n\t\t{\n\t\t\tvar children = this.graph.getChildCells(lane);\n\t\t\t\n\t\t\tvar size = (this.graph.isSwimlane(lane)) ?\n\t\t\t\t\tthis.graph.getStartSize(lane) : new mxRectangle();\n\n\t\t\tvar bounds = this.graph.getBoundingBoxFromGeometry(children);\n\t\t\tchildBounds[i] = bounds;\n\t\t\tvar childrenY = bounds.y + geo.y - size.height - this.parentBorder;\n\t\t\tvar maxChildrenY = bounds.y + geo.y + bounds.height;\n\n\t\t\tif (layoutBounds == null)\n\t\t\t{\n\t\t\t\tlayoutBounds = new mxRectangle(0, childrenY, 0, maxChildrenY - childrenY);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tlayoutBounds.y = Math.min(layoutBounds.y, childrenY);\n\t\t\t\tvar maxY = Math.max(layoutBounds.y + layoutBounds.height, maxChildrenY);\n\t\t\t\tlayoutBounds.height = maxY - layoutBounds.y;\n\t\t\t}\n\t\t}\n\t}\n\n\t\n\tfor (var i = 0; i < this.swimlanes.length; i++)\n\t{\n\t\tvar lane = this.swimlanes[i];\n\t\tvar geo = this.graph.getCellGeometry(lane);\n\t\t\n\t\tif (geo != null)\n\t\t{\n\t\t\tvar children = this.graph.getChildCells(lane);\n\t\t\t\n\t\t\tvar size = (this.graph.isSwimlane(lane)) ?\n\t\t\t\t\tthis.graph.getStartSize(lane) : new mxRectangle();\n\n\t\t\tvar newGeo = geo.clone();\n\t\t\t\n\t\t\tvar leftGroupBorder = (i == 0) ? this.parentBorder : this.interRankCellSpacing/2;\n\t\t\tnewGeo.x += childBounds[i].x - size.width - leftGroupBorder;\n\t\t\tnewGeo.y = newGeo.y + layoutBounds.y - geo.y - this.parentBorder;\n\t\t\t\n\t\t\tnewGeo.width = childBounds[i].width + size.width + this.interRankCellSpacing/2 + leftGroupBorder;\n\t\t\tnewGeo.height = layoutBounds.height + size.height + 2 * this.parentBorder;\n\t\t\t\n\t\t\tthis.graph.model.setGeometry(lane, newGeo);\n\t\t\tthis.graph.moveCells(children, -childBounds[i].x + size.width + leftGroupBorder, \n\t\t\t\t\tgeo.y - layoutBounds.y + this.parentBorder);\n\t\t}\n\t}\n};\n\n/**\n * Function: findRoots\n * \n * Returns all visible children in the given parent which do not have\n * incoming edges. If the result is empty then the children with the\n * maximum difference between incoming and outgoing edges are returned.\n * This takes into account edges that are being promoted to the given\n * root due to invisible children or collapsed cells.\n * \n * Parameters:\n * \n * parent - <mxCell> whose children should be checked.\n * vertices - array of vertices to limit search to\n */\nmxSwimlaneLayout.prototype.findRoots = function(parent, vertices)\n{\n\tvar roots = [];\n\t\n\tif (parent != null && vertices != null)\n\t{\n\t\tvar model = this.graph.model;\n\t\tvar best = null;\n\t\tvar maxDiff = -100000;\n\t\t\n\t\tfor (var i in vertices)\n\t\t{\n\t\t\tvar cell = vertices[i];\n\n\t\t\tif (cell != null && model.isVertex(cell) && this.graph.isCellVisible(cell) && model.isAncestor(parent, cell))\n\t\t\t{\n\t\t\t\tvar conns = this.getEdges(cell);\n\t\t\t\tvar fanOut = 0;\n\t\t\t\tvar fanIn = 0;\n\n\t\t\t\tfor (var k = 0; k < conns.length; k++)\n\t\t\t\t{\n\t\t\t\t\tvar src = this.getVisibleTerminal(conns[k], true);\n\n\t\t\t\t\tif (src == cell)\n\t\t\t\t\t{\n\t\t\t\t\t\t// Only count connection within this swimlane\n\t\t\t\t\t\tvar other = this.getVisibleTerminal(conns[k], false);\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (model.isAncestor(parent, other))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tfanOut++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse if (model.isAncestor(parent, src))\n\t\t\t\t\t{\n\t\t\t\t\t\tfanIn++;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (fanIn == 0 && fanOut > 0)\n\t\t\t\t{\n\t\t\t\t\troots.push(cell);\n\t\t\t\t}\n\n\t\t\t\tvar diff = fanOut - fanIn;\n\n\t\t\t\tif (diff > maxDiff)\n\t\t\t\t{\n\t\t\t\t\tmaxDiff = diff;\n\t\t\t\t\tbest = cell;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (roots.length == 0 && best != null)\n\t\t{\n\t\t\troots.push(best);\n\t\t}\n\t}\n\t\n\treturn roots;\n};\n\n/**\n * Function: getEdges\n * \n * Returns the connected edges for the given cell.\n * \n * Parameters:\n * \n * cell - <mxCell> whose edges should be returned.\n */\nmxSwimlaneLayout.prototype.getEdges = function(cell)\n{\n\tvar cachedEdges = this.edgesCache.get(cell);\n\t\n\tif (cachedEdges != null)\n\t{\n\t\treturn cachedEdges;\n\t}\n\n\tvar model = this.graph.model;\n\tvar edges = [];\n\tvar isCollapsed = this.graph.isCellCollapsed(cell);\n\tvar childCount = model.getChildCount(cell);\n\n\tfor (var i = 0; i < childCount; i++)\n\t{\n\t\tvar child = model.getChildAt(cell, i);\n\n\t\tif (this.isPort(child))\n\t\t{\n\t\t\tedges = edges.concat(model.getEdges(child, true, true));\n\t\t}\n\t\telse if (isCollapsed || !this.graph.isCellVisible(child))\n\t\t{\n\t\t\tedges = edges.concat(model.getEdges(child, true, true));\n\t\t}\n\t}\n\n\tedges = edges.concat(model.getEdges(cell, true, true));\n\tvar result = [];\n\t\n\tfor (var i = 0; i < edges.length; i++)\n\t{\n\t\tvar source = this.getVisibleTerminal(edges[i], true);\n\t\tvar target = this.getVisibleTerminal(edges[i], false);\n\t\t\n\t\tif ((source == target) || ((source != target) && ((target == cell && (this.parent == null || this.graph.isValidAncestor(source, this.parent, this.traverseAncestors))) ||\n\t\t\t(source == cell && (this.parent == null ||\n\t\t\t\t\tthis.graph.isValidAncestor(target, this.parent, this.traverseAncestors))))))\n\t\t{\n\t\t\tresult.push(edges[i]);\n\t\t}\n\t}\n\n\tthis.edgesCache.put(cell, result);\n\n\treturn result;\n};\n\n/**\n * Function: getVisibleTerminal\n * \n * Helper function to return visible terminal for edge allowing for ports\n * \n * Parameters:\n * \n * edge - <mxCell> whose edges should be returned.\n * source - Boolean that specifies whether the source or target terminal is to be returned\n */\nmxSwimlaneLayout.prototype.getVisibleTerminal = function(edge, source)\n{\n\tvar terminalCache = this.edgesTargetTermCache;\n\t\n\tif (source)\n\t{\n\t\tterminalCache = this.edgeSourceTermCache;\n\t}\n\n\tvar term = terminalCache.get(edge);\n\n\tif (term != null)\n\t{\n\t\treturn term;\n\t}\n\n\tvar state = this.graph.view.getState(edge);\n\t\n\tvar terminal = (state != null) ? state.getVisibleTerminal(source) : this.graph.view.getVisibleTerminal(edge, source);\n\t\n\tif (terminal == null)\n\t{\n\t\tterminal = (state != null) ? state.getVisibleTerminal(source) : this.graph.view.getVisibleTerminal(edge, source);\n\t}\n\n\tif (terminal != null)\n\t{\n\t\tif (this.isPort(terminal))\n\t\t{\n\t\t\tterminal = this.graph.model.getParent(terminal);\n\t\t}\n\t\t\n\t\tterminalCache.put(edge, terminal);\n\t}\n\n\treturn terminal;\n};\n\n/**\n * Function: run\n * \n * The API method used to exercise the layout upon the graph description\n * and produce a separate description of the vertex position and edge\n * routing changes made. It runs each stage of the layout that has been\n * created.\n */\nmxSwimlaneLayout.prototype.run = function(parent)\n{\n\t// Separate out unconnected hierarchies\n\tvar hierarchyVertices = [];\n\tvar allVertexSet = [];\n\n\tif (this.swimlanes != null && this.swimlanes.length > 0 && parent != null)\n\t{\n\t\tvar filledVertexSet = Object();\n\t\t\n\t\tfor (var i = 0; i < this.swimlanes.length; i++)\n\t\t{\n\t\t\tthis.filterDescendants(this.swimlanes[i], filledVertexSet);\n\t\t}\n\n\t\tthis.roots = [];\n\t\tvar filledVertexSetEmpty = true;\n\n\t\t// Poor man's isSetEmpty\n\t\tfor (var key in filledVertexSet)\n\t\t{\n\t\t\tif (filledVertexSet[key] != null)\n\t\t\t{\n\t\t\t\tfilledVertexSetEmpty = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\t// Only test for candidates in each swimlane in order\n\t\tvar laneCounter = 0;\n\n\t\twhile (!filledVertexSetEmpty && laneCounter < this.swimlanes.length)\n\t\t{\n\t\t\tvar candidateRoots = this.findRoots(this.swimlanes[laneCounter], filledVertexSet);\n\t\t\t\n\t\t\tif (candidateRoots.length == 0)\n\t\t\t{\n\t\t\t\tlaneCounter++;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\t// If the candidate root is an unconnected group cell, remove it from\n\t\t\t// the layout. We may need a custom set that holds such groups and forces\n\t\t\t// them to be processed for resizing and/or moving.\n\t\t\tfor (var i = 0; i < candidateRoots.length; i++)\n\t\t\t{\n\t\t\t\tvar vertexSet = Object();\n\t\t\t\thierarchyVertices.push(vertexSet);\n\n\t\t\t\tthis.traverse(candidateRoots[i], true, null, allVertexSet, vertexSet,\n\t\t\t\t\t\thierarchyVertices, filledVertexSet, laneCounter);\n\t\t\t}\n\n\t\t\tfor (var i = 0; i < candidateRoots.length; i++)\n\t\t\t{\n\t\t\t\tthis.roots.push(candidateRoots[i]);\n\t\t\t}\n\t\t\t\n\t\t\tfilledVertexSetEmpty = true;\n\t\t\t\n\t\t\t// Poor man's isSetEmpty\n\t\t\tfor (var key in filledVertexSet)\n\t\t\t{\n\t\t\t\tif (filledVertexSet[key] != null)\n\t\t\t\t{\n\t\t\t\t\tfilledVertexSetEmpty = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\telse\n\t{\n\t\t// Find vertex set as directed traversal from roots\n\n\t\tfor (var i = 0; i < this.roots.length; i++)\n\t\t{\n\t\t\tvar vertexSet = Object();\n\t\t\thierarchyVertices.push(vertexSet);\n\n\t\t\tthis.traverse(this.roots[i], true, null, allVertexSet, vertexSet,\n\t\t\t\t\thierarchyVertices, null);\n\t\t}\n\t}\n\n\tvar tmp = [];\n\t\n\tfor (var key in allVertexSet)\n\t{\n\t\ttmp.push(allVertexSet[key]);\n\t}\n\t\n\tthis.model = new mxSwimlaneModel(this, tmp, this.roots,\n\t\tparent, this.tightenToSource);\n\n\tthis.cycleStage(parent);\n\tthis.layeringStage();\n\t\n\tthis.crossingStage(parent);\n\tinitialX = this.placementStage(0, parent);\n};\n\n/**\n * Function: filterDescendants\n * \n * Creates an array of descendant cells\n */\nmxSwimlaneLayout.prototype.filterDescendants = function(cell, result)\n{\n\tvar model = this.graph.model;\n\n\tif (model.isVertex(cell) && cell != this.parent && model.getParent(cell) != this.parent && this.graph.isCellVisible(cell))\n\t{\n\t\tresult[mxObjectIdentity.get(cell)] = cell;\n\t}\n\n\tif (this.traverseAncestors || cell == this.parent\n\t\t\t&& this.graph.isCellVisible(cell))\n\t{\n\t\tvar childCount = model.getChildCount(cell);\n\n\t\tfor (var i = 0; i < childCount; i++)\n\t\t{\n\t\t\tvar child = model.getChildAt(cell, i);\n\t\t\t\n\t\t\t// Ignore ports in the layout vertex list, they are dealt with\n\t\t\t// in the traversal mechanisms\n\t\t\tif (!this.isPort(child))\n\t\t\t{\n\t\t\t\tthis.filterDescendants(child, result);\n\t\t\t}\n\t\t}\n\t}\n};\n\n/**\n * Function: isPort\n * \n * Returns true if the given cell is a \"port\", that is, when connecting to\n * it, its parent is the connecting vertex in terms of graph traversal\n * \n * Parameters:\n * \n * cell - <mxCell> that represents the port.\n */\nmxSwimlaneLayout.prototype.isPort = function(cell)\n{\n\tif (cell.geometry.relative)\n\t{\n\t\treturn true;\n\t}\n\t\n\treturn false;\n};\n\n/**\n * Function: getEdgesBetween\n * \n * Returns the edges between the given source and target. This takes into\n * account collapsed and invisible cells and ports.\n * \n * Parameters:\n * \n * source -\n * target -\n * directed -\n */\nmxSwimlaneLayout.prototype.getEdgesBetween = function(source, target, directed)\n{\n\tdirected = (directed != null) ? directed : false;\n\tvar edges = this.getEdges(source);\n\tvar result = [];\n\n\t// Checks if the edge is connected to the correct\n\t// cell and returns the first match\n\tfor (var i = 0; i < edges.length; i++)\n\t{\n\t\tvar src = this.getVisibleTerminal(edges[i], true);\n\t\tvar trg = this.getVisibleTerminal(edges[i], false);\n\n\t\tif ((src == source && trg == target) || (!directed && src == target && trg == source))\n\t\t{\n\t\t\tresult.push(edges[i]);\n\t\t}\n\t}\n\n\treturn result;\n};\n\n/**\n * Traverses the (directed) graph invoking the given function for each\n * visited vertex and edge. The function is invoked with the current vertex\n * and the incoming edge as a parameter. This implementation makes sure\n * each vertex is only visited once. The function may return false if the\n * traversal should stop at the given vertex.\n * \n * Parameters:\n * \n * vertex - <mxCell> that represents the vertex where the traversal starts.\n * directed - boolean indicating if edges should only be traversed\n * from source to target. Default is true.\n * edge - Optional <mxCell> that represents the incoming edge. This is\n * null for the first step of the traversal.\n * allVertices - Array of cell paths for the visited cells.\n * swimlaneIndex - the laid out order index of the swimlane vertex is contained in\n */\nmxSwimlaneLayout.prototype.traverse = function(vertex, directed, edge, allVertices, currentComp,\n\t\t\t\t\t\t\t\t\t\t\thierarchyVertices, filledVertexSet, swimlaneIndex)\n{\n\tif (vertex != null && allVertices != null)\n\t{\n\t\t// Has this vertex been seen before in any traversal\n\t\t// And if the filled vertex set is populated, only \n\t\t// process vertices in that it contains\n\t\tvar vertexID = mxObjectIdentity.get(vertex);\n\t\t\n\t\tif ((allVertices[vertexID] == null)\n\t\t\t\t&& (filledVertexSet == null ? true : filledVertexSet[vertexID] != null))\n\t\t{\n\t\t\tif (currentComp[vertexID] == null)\n\t\t\t{\n\t\t\t\tcurrentComp[vertexID] = vertex;\n\t\t\t}\n\t\t\tif (allVertices[vertexID] == null)\n\t\t\t{\n\t\t\t\tallVertices[vertexID] = vertex;\n\t\t\t}\n\n\t\t\tif (filledVertexSet !== null)\n\t\t\t{\n\t\t\t\tdelete filledVertexSet[vertexID];\n\t\t\t}\n\n\t\t\tvar edges = this.getEdges(vertex);\n\t\t\tvar model = this.graph.model;\n\n\t\t\tfor (var i = 0; i < edges.length; i++)\n\t\t\t{\n\t\t\t\tvar otherVertex = this.getVisibleTerminal(edges[i], true);\n\t\t\t\tvar isSource = otherVertex == vertex;\n\t\t\t\t\n\t\t\t\tif (isSource)\n\t\t\t\t{\n\t\t\t\t\totherVertex = this.getVisibleTerminal(edges[i], false);\n\t\t\t\t}\n\n\t\t\t\tvar otherIndex = 0;\n\t\t\t\t// Get the swimlane index of the other terminal\n\t\t\t\tfor (otherIndex = 0; otherIndex < this.swimlanes.length; otherIndex++)\n\t\t\t\t{\n\t\t\t\t\tif (model.isAncestor(this.swimlanes[otherIndex], otherVertex))\n\t\t\t\t\t{\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (otherIndex >= this.swimlanes.length)\n\t\t\t\t{\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t// Traverse if the other vertex is within the same swimlane as\n\t\t\t\t// as the current vertex, or if the swimlane index of the other\n\t\t\t\t// vertex is greater than that of this vertex\n\t\t\t\tif ((otherIndex > swimlaneIndex) ||\n\t\t\t\t\t\t((!directed || isSource) && otherIndex == swimlaneIndex))\n\t\t\t\t{\n\t\t\t\t\tcurrentComp = this.traverse(otherVertex, directed, edges[i], allVertices,\n\t\t\t\t\t\t\tcurrentComp, hierarchyVertices,\n\t\t\t\t\t\t\tfilledVertexSet, otherIndex);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif (currentComp[vertexID] == null)\n\t\t\t{\n\t\t\t\t// We've seen this vertex before, but not in the current component\n\t\t\t\t// This component and the one it's in need to be merged\n\t\t\t\tfor (var i = 0; i < hierarchyVertices.length; i++)\n\t\t\t\t{\n\t\t\t\t\tvar comp = hierarchyVertices[i];\n\n\t\t\t\t\tif (comp[vertexID] != null)\n\t\t\t\t\t{\n\t\t\t\t\t\tfor (var key in comp)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcurrentComp[key] = comp[key];\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t// Remove the current component from the hierarchy set\n\t\t\t\t\t\thierarchyVertices.splice(i, 1);\n\t\t\t\t\t\treturn currentComp;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t\n\treturn currentComp;\n};\n\n/**\n * Function: cycleStage\n * \n * Executes the cycle stage using mxMinimumCycleRemover.\n */\nmxSwimlaneLayout.prototype.cycleStage = function(parent)\n{\n\tvar cycleStage = new mxSwimlaneOrdering(this);\n\tcycleStage.execute(parent);\n};\n\n/**\n * Function: layeringStage\n * \n * Implements first stage of a Sugiyama layout.\n */\nmxSwimlaneLayout.prototype.layeringStage = function()\n{\n\tthis.model.initialRank();\n\tthis.model.fixRanks();\n};\n\n/**\n * Function: crossingStage\n * \n * Executes the crossing stage using mxMedianHybridCrossingReduction.\n */\nmxSwimlaneLayout.prototype.crossingStage = function(parent)\n{\n\tvar crossingStage = new mxMedianHybridCrossingReduction(this);\n\tcrossingStage.execute(parent);\n};\n\n/**\n * Function: placementStage\n * \n * Executes the placement stage using mxCoordinateAssignment.\n */\nmxSwimlaneLayout.prototype.placementStage = function(initialX, parent)\n{\n\tvar placementStage = new mxCoordinateAssignment(this, this.intraCellSpacing,\n\t\t\tthis.interRankCellSpacing, this.orientation, initialX,\n\t\t\tthis.parallelEdgeSpacing);\n\tplacementStage.fineTuning = this.fineTuning;\n\tplacementStage.execute(parent);\n\t\n\treturn placementStage.limitX + this.interHierarchySpacing;\n};\n"
  },
  {
    "path": "static/cherry/drawio_demo/src/js/layout/hierarchical/stage/mxCoordinateAssignment.js",
    "content": "/**\n * Copyright (c) 2006-2018, JGraph Ltd\n * Copyright (c) 2006-2018, Gaudenz Alder\n */\n/**\n * Class: mxCoordinateAssignment\n * \n * Sets the horizontal locations of node and edge dummy nodes on each layer.\n * Uses median down and up weighings as well as heuristics to straighten edges as\n * far as possible.\n * \n * Constructor: mxCoordinateAssignment\n *\n * Creates a coordinate assignment.\n * \n * Arguments:\n * \n * intraCellSpacing - the minimum buffer between cells on the same rank\n * interRankCellSpacing - the minimum distance between cells on adjacent ranks\n * orientation - the position of the root node(s) relative to the graph\n * initialX - the leftmost coordinate node placement starts at\n */\nfunction mxCoordinateAssignment(layout, intraCellSpacing, interRankCellSpacing,\n\torientation, initialX, parallelEdgeSpacing)\n{\n\tthis.layout = layout;\n\tthis.intraCellSpacing = intraCellSpacing;\n\tthis.interRankCellSpacing = interRankCellSpacing;\n\tthis.orientation = orientation;\n\tthis.initialX = initialX;\n\tthis.parallelEdgeSpacing = parallelEdgeSpacing;\n};\n\n/**\n * Extends mxHierarchicalLayoutStage.\n */\nmxCoordinateAssignment.prototype = new mxHierarchicalLayoutStage();\nmxCoordinateAssignment.prototype.constructor = mxCoordinateAssignment;\n\n/**\n * Variable: layout\n * \n * Reference to the enclosing <mxHierarchicalLayout>.\n */\nmxCoordinateAssignment.prototype.layout = null;\n\n/**\n * Variable: intraCellSpacing\n * \n * The minimum buffer between cells on the same rank. Default is 30.\n */\nmxCoordinateAssignment.prototype.intraCellSpacing = 30;\n\n/**\n * Variable: interRankCellSpacing\n * \n * The minimum distance between cells on adjacent ranks. Default is 10.\n */\nmxCoordinateAssignment.prototype.interRankCellSpacing = 100;\n\n/**\n * Variable: parallelEdgeSpacing\n * \n * The distance between each parallel edge on each ranks for long edges.\n * Default is 10.\n */\nmxCoordinateAssignment.prototype.parallelEdgeSpacing = 10;\n\n/**\n * Variable: maxIterations\n * \n * The number of heuristic iterations to run. Default is 8.\n */\nmxCoordinateAssignment.prototype.maxIterations = 8;\n\n/**\n * Variable: prefHozEdgeSep\n * \n * The preferred horizontal distance between edges exiting a vertex\n */\nmxCoordinateAssignment.prototype.prefHozEdgeSep = 5;\n\n/**\n * Variable: prefVertEdgeOff\n * \n * The preferred vertical offset between edges exiting a vertex\n */\nmxCoordinateAssignment.prototype.prefVertEdgeOff = 2;\n\n/**\n * Variable: minEdgeJetty\n * \n * The minimum distance for an edge jetty from a vertex\n */\nmxCoordinateAssignment.prototype.minEdgeJetty = 12;\n\n/**\n * Variable: channelBuffer\n * \n * The size of the vertical buffer in the center of inter-rank channels\n * where edge control points should not be placed\n */\nmxCoordinateAssignment.prototype.channelBuffer = 4;\n\n/**\n * Variable: jettyPositions\n * \n * Map of internal edges and (x,y) pair of positions of the start and end jetty\n * for that edge where it connects to the source and target vertices.\n * Note this should technically be a WeakHashMap, but since JS does not\n * have an equivalent, housekeeping must be performed before using.\n * i.e. check all edges are still in the model and clear the values.\n * Note that the y co-ord is the offset of the jetty, not the\n * absolute point\n */\nmxCoordinateAssignment.prototype.jettyPositions = null;\n\n/**\n * Variable: orientation\n * \n * The position of the root ( start ) node(s) relative to the rest of the\n * laid out graph. Default is <mxConstants.DIRECTION_NORTH>.\n */\nmxCoordinateAssignment.prototype.orientation = mxConstants.DIRECTION_NORTH;\n\n/**\n * Variable: initialX\n * \n * The minimum x position node placement starts at\n */\nmxCoordinateAssignment.prototype.initialX = null;\n\n/**\n * Variable: limitX\n * \n * The maximum x value this positioning lays up to\n */\nmxCoordinateAssignment.prototype.limitX = null;\n\n/**\n * Variable: currentXDelta\n * \n * The sum of x-displacements for the current iteration\n */\nmxCoordinateAssignment.prototype.currentXDelta = null;\n\n/**\n * Variable: widestRank\n * \n * The rank that has the widest x position\n */\nmxCoordinateAssignment.prototype.widestRank = null;\n\n/**\n * Variable: rankTopY\n * \n * Internal cache of top-most values of Y for each rank\n */\nmxCoordinateAssignment.prototype.rankTopY = null;\n\n/**\n * Variable: rankBottomY\n * \n * Internal cache of bottom-most value of Y for each rank\n */\nmxCoordinateAssignment.prototype.rankBottomY = null;\n\n/**\n * Variable: widestRankValue\n * \n * The X-coordinate of the edge of the widest rank\n */\nmxCoordinateAssignment.prototype.widestRankValue = null;\n\n/**\n * Variable: rankWidths\n * \n * The width of all the ranks\n */\nmxCoordinateAssignment.prototype.rankWidths = null;\n\n/**\n * Variable: rankY\n * \n * The Y-coordinate of all the ranks\n */\nmxCoordinateAssignment.prototype.rankY = null;\n\n/**\n * Variable: fineTuning\n * \n * Whether or not to perform local optimisations and iterate multiple times\n * through the algorithm. Default is true.\n */\nmxCoordinateAssignment.prototype.fineTuning = true;\n\n/**\n * Variable: nextLayerConnectedCache\n * \n * A store of connections to the layer above for speed\n */\nmxCoordinateAssignment.prototype.nextLayerConnectedCache = null;\n\n/**\n * Variable: previousLayerConnectedCache\n * \n * A store of connections to the layer below for speed\n */\nmxCoordinateAssignment.prototype.previousLayerConnectedCache = null;\n\n/**\n * Variable: groupPadding\n * \n * Padding added to resized parents\n */\nmxCoordinateAssignment.prototype.groupPadding = 10;\n\n/**\n * Utility method to display current positions\n */\nmxCoordinateAssignment.prototype.printStatus = function()\n{\n\tvar model = this.layout.getModel();\n\tmxLog.show();\n\n\tmxLog.writeln('======Coord assignment debug=======');\n\n\tfor (var j = 0; j < model.ranks.length; j++)\n\t{\n\t\tmxLog.write('Rank ', j, ' : ' );\n\t\tvar rank = model.ranks[j];\n\t\t\n\t\tfor (var k = 0; k < rank.length; k++)\n\t\t{\n\t\t\tvar cell = rank[k];\n\t\t\t\n\t\t\tmxLog.write(cell.getGeneralPurposeVariable(j), '  ');\n\t\t}\n\t\tmxLog.writeln();\n\t}\n\t\n\tmxLog.writeln('====================================');\n};\n\n/**\n * Function: execute\n * \n * A basic horizontal coordinate assignment algorithm\n */\nmxCoordinateAssignment.prototype.execute = function(parent)\n{\n\tthis.jettyPositions = Object();\n\tvar model = this.layout.getModel();\n\tthis.currentXDelta = 0.0;\n\n\tthis.initialCoords(this.layout.getGraph(), model);\n\t\n//\tthis.printStatus();\n\t\n\tif (this.fineTuning)\n\t{\n\t\tthis.minNode(model);\n\t}\n\t\n\tvar bestXDelta = 100000000.0;\n\t\n\tif (this.fineTuning)\n\t{\n\t\tfor (var i = 0; i < this.maxIterations; i++)\n\t\t{\n//\t\t\tthis.printStatus();\n\t\t\n\t\t\t// Median Heuristic\n\t\t\tif (i != 0)\n\t\t\t{\n\t\t\t\tthis.medianPos(i, model);\n\t\t\t\tthis.minNode(model);\n\t\t\t}\n\t\t\t\n\t\t\t// if the total offset is less for the current positioning,\n\t\t\t// there are less heavily angled edges and so the current\n\t\t\t// positioning is used\n\t\t\tif (this.currentXDelta < bestXDelta)\n\t\t\t{\n\t\t\t\tfor (var j = 0; j < model.ranks.length; j++)\n\t\t\t\t{\n\t\t\t\t\tvar rank = model.ranks[j];\n\t\t\t\t\t\n\t\t\t\t\tfor (var k = 0; k < rank.length; k++)\n\t\t\t\t\t{\n\t\t\t\t\t\tvar cell = rank[k];\n\t\t\t\t\t\tcell.setX(j, cell.getGeneralPurposeVariable(j));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tbestXDelta = this.currentXDelta;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// Restore the best positions\n\t\t\t\tfor (var j = 0; j < model.ranks.length; j++)\n\t\t\t\t{\n\t\t\t\t\tvar rank = model.ranks[j];\n\t\t\t\t\t\n\t\t\t\t\tfor (var k = 0; k < rank.length; k++)\n\t\t\t\t\t{\n\t\t\t\t\t\tvar cell = rank[k];\n\t\t\t\t\t\tcell.setGeneralPurposeVariable(j, cell.getX(j));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tthis.minPath(this.layout.getGraph(), model);\n\t\t\t\n\t\t\tthis.currentXDelta = 0;\n\t\t}\n\t}\n\t\n\tthis.setCellLocations(this.layout.getGraph(), model);\n};\n\n/**\n * Function: minNode\n * \n * Performs one median positioning sweep in both directions\n */\nmxCoordinateAssignment.prototype.minNode = function(model)\n{\n\t// Queue all nodes\n\tvar nodeList = [];\n\t\n\t// Need to be able to map from cell to cellWrapper\n\tvar map = new mxDictionary();\n\tvar rank = [];\n\t\n\tfor (var i = 0; i <= model.maxRank; i++)\n\t{\n\t\trank[i] = model.ranks[i];\n\t\t\n\t\tfor (var j = 0; j < rank[i].length; j++)\n\t\t{\n\t\t\t// Use the weight to store the rank and visited to store whether\n\t\t\t// or not the cell is in the list\n\t\t\tvar node = rank[i][j];\n\t\t\tvar nodeWrapper = new WeightedCellSorter(node, i);\n\t\t\tnodeWrapper.rankIndex = j;\n\t\t\tnodeWrapper.visited = true;\n\t\t\tnodeList.push(nodeWrapper);\n\t\t\t\n\t\t\tmap.put(node, nodeWrapper);\n\t\t}\n\t}\n\t\n\t// Set a limit of the maximum number of times we will access the queue\n\t// in case a loop appears\n\tvar maxTries = nodeList.length * 10;\n\tvar count = 0;\n\t\n\t// Don't move cell within this value of their median\n\tvar tolerance = 1;\n\t\n\twhile (nodeList.length > 0 && count <= maxTries)\n\t{\n\t\tvar cellWrapper = nodeList.shift();\n\t\tvar cell = cellWrapper.cell;\n\t\t\n\t\tvar rankValue = cellWrapper.weightedValue;\n\t\tvar rankIndex = parseInt(cellWrapper.rankIndex);\n\t\t\n\t\tvar nextLayerConnectedCells = cell.getNextLayerConnectedCells(rankValue);\n\t\tvar previousLayerConnectedCells = cell.getPreviousLayerConnectedCells(rankValue);\n\t\t\n\t\tvar numNextLayerConnected = nextLayerConnectedCells.length;\n\t\tvar numPreviousLayerConnected = previousLayerConnectedCells.length;\n\n\t\tvar medianNextLevel = this.medianXValue(nextLayerConnectedCells,\n\t\t\t\trankValue + 1);\n\t\tvar medianPreviousLevel = this.medianXValue(previousLayerConnectedCells,\n\t\t\t\trankValue - 1);\n\n\t\tvar numConnectedNeighbours = numNextLayerConnected\n\t\t\t\t+ numPreviousLayerConnected;\n\t\tvar currentPosition = cell.getGeneralPurposeVariable(rankValue);\n\t\tvar cellMedian = currentPosition;\n\t\t\n\t\tif (numConnectedNeighbours > 0)\n\t\t{\n\t\t\tcellMedian = (medianNextLevel * numNextLayerConnected + medianPreviousLevel\n\t\t\t\t\t* numPreviousLayerConnected)\n\t\t\t\t\t/ numConnectedNeighbours;\n\t\t}\n\n\t\t// Flag storing whether or not position has changed\n\t\tvar positionChanged = false;\n\t\t\n\t\tif (cellMedian < currentPosition - tolerance)\n\t\t{\n\t\t\tif (rankIndex == 0)\n\t\t\t{\n\t\t\t\tcell.setGeneralPurposeVariable(rankValue, cellMedian);\n\t\t\t\tpositionChanged = true;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tvar leftCell = rank[rankValue][rankIndex - 1];\n\t\t\t\tvar leftLimit = leftCell\n\t\t\t\t\t\t.getGeneralPurposeVariable(rankValue);\n\t\t\t\tleftLimit = leftLimit + leftCell.width / 2\n\t\t\t\t\t\t+ this.intraCellSpacing + cell.width / 2;\n\n\t\t\t\tif (leftLimit < cellMedian)\n\t\t\t\t{\n\t\t\t\t\tcell.setGeneralPurposeVariable(rankValue, cellMedian);\n\t\t\t\t\tpositionChanged = true;\n\t\t\t\t}\n\t\t\t\telse if (leftLimit < cell\n\t\t\t\t\t\t.getGeneralPurposeVariable(rankValue)\n\t\t\t\t\t\t- tolerance)\n\t\t\t\t{\n\t\t\t\t\tcell.setGeneralPurposeVariable(rankValue, leftLimit);\n\t\t\t\t\tpositionChanged = true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse if (cellMedian > currentPosition + tolerance)\n\t\t{\n\t\t\tvar rankSize = rank[rankValue].length;\n\t\t\t\n\t\t\tif (rankIndex == rankSize - 1)\n\t\t\t{\n\t\t\t\tcell.setGeneralPurposeVariable(rankValue, cellMedian);\n\t\t\t\tpositionChanged = true;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tvar rightCell = rank[rankValue][rankIndex + 1];\n\t\t\t\tvar rightLimit = rightCell\n\t\t\t\t\t\t.getGeneralPurposeVariable(rankValue);\n\t\t\t\trightLimit = rightLimit - rightCell.width / 2\n\t\t\t\t\t\t- this.intraCellSpacing - cell.width / 2;\n\t\t\t\t\n\t\t\t\tif (rightLimit > cellMedian)\n\t\t\t\t{\n\t\t\t\t\tcell.setGeneralPurposeVariable(rankValue, cellMedian);\n\t\t\t\t\tpositionChanged = true;\n\t\t\t\t}\n\t\t\t\telse if (rightLimit > cell\n\t\t\t\t\t\t.getGeneralPurposeVariable(rankValue)\n\t\t\t\t\t\t+ tolerance)\n\t\t\t\t{\n\t\t\t\t\tcell.setGeneralPurposeVariable(rankValue, rightLimit);\n\t\t\t\t\tpositionChanged = true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (positionChanged)\n\t\t{\n\t\t\t// Add connected nodes to map and list\n\t\t\tfor (var i = 0; i < nextLayerConnectedCells.length; i++)\n\t\t\t{\n\t\t\t\tvar connectedCell = nextLayerConnectedCells[i];\n\t\t\t\tvar connectedCellWrapper = map.get(connectedCell);\n\t\t\t\t\n\t\t\t\tif (connectedCellWrapper != null)\n\t\t\t\t{\n\t\t\t\t\tif (connectedCellWrapper.visited == false)\n\t\t\t\t\t{\n\t\t\t\t\t\tconnectedCellWrapper.visited = true;\n\t\t\t\t\t\tnodeList.push(connectedCellWrapper);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Add connected nodes to map and list\n\t\t\tfor (var i = 0; i < previousLayerConnectedCells.length; i++)\n\t\t\t{\n\t\t\t\tvar connectedCell = previousLayerConnectedCells[i];\n\t\t\t\tvar connectedCellWrapper = map.get(connectedCell);\n\n\t\t\t\tif (connectedCellWrapper != null)\n\t\t\t\t{\n\t\t\t\t\tif (connectedCellWrapper.visited == false)\n\t\t\t\t\t{\n\t\t\t\t\t\tconnectedCellWrapper.visited = true;\n\t\t\t\t\t\tnodeList.push(connectedCellWrapper);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tcellWrapper.visited = false;\n\t\tcount++;\n\t}\n};\n\n/**\n * Function: medianPos\n * \n * Performs one median positioning sweep in one direction\n * \n * Parameters:\n * \n * i - the iteration of the whole process\n * model - an internal model of the hierarchical layout\n */\nmxCoordinateAssignment.prototype.medianPos = function(i, model)\n{\n\t// Reverse sweep direction each time through this method\n\tvar downwardSweep = (i % 2 == 0);\n\t\n\tif (downwardSweep)\n\t{\n\t\tfor (var j = model.maxRank; j > 0; j--)\n\t\t{\n\t\t\tthis.rankMedianPosition(j - 1, model, j);\n\t\t}\n\t}\n\telse\n\t{\n\t\tfor (var j = 0; j < model.maxRank - 1; j++)\n\t\t{\n\t\t\tthis.rankMedianPosition(j + 1, model, j);\n\t\t}\n\t}\n};\n\n/**\n * Function: rankMedianPosition\n * \n * Performs median minimisation over one rank.\n * \n * Parameters:\n * \n * rankValue - the layer number of this rank\n * model - an internal model of the hierarchical layout\n * nextRankValue - the layer number whose connected cels are to be laid out\n * relative to\n */\nmxCoordinateAssignment.prototype.rankMedianPosition = function(rankValue, model, nextRankValue)\n{\n\tvar rank = model.ranks[rankValue];\n\n\t// Form an array of the order in which the cell are to be processed\n\t// , the order is given by the weighted sum of the in or out edges,\n\t// depending on whether we're traveling up or down the hierarchy.\n\tvar weightedValues = [];\n\tvar cellMap = new Object();\n\n\tfor (var i = 0; i < rank.length; i++)\n\t{\n\t\tvar currentCell = rank[i];\n\t\tweightedValues[i] = new WeightedCellSorter();\n\t\tweightedValues[i].cell = currentCell;\n\t\tweightedValues[i].rankIndex = i;\n\t\tcellMap[currentCell.id] = weightedValues[i];\n\t\tvar nextLayerConnectedCells = null;\n\t\t\n\t\tif (nextRankValue < rankValue)\n\t\t{\n\t\t\tnextLayerConnectedCells = currentCell\n\t\t\t\t\t.getPreviousLayerConnectedCells(rankValue);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tnextLayerConnectedCells = currentCell\n\t\t\t\t\t.getNextLayerConnectedCells(rankValue);\n\t\t}\n\n\t\t// Calculate the weighing based on this node type and those this\n\t\t// node is connected to on the next layer\n\t\tweightedValues[i].weightedValue = this.calculatedWeightedValue(\n\t\t\t\tcurrentCell, nextLayerConnectedCells);\n\t}\n\n\tweightedValues.sort(WeightedCellSorter.prototype.compare);\n\n\t// Set the new position of each node within the rank using\n\t// its temp variable\n\t\n\tfor (var i = 0; i < weightedValues.length; i++)\n\t{\n\t\tvar numConnectionsNextLevel = 0;\n\t\tvar cell = weightedValues[i].cell;\n\t\tvar nextLayerConnectedCells = null;\n\t\tvar medianNextLevel = 0;\n\n\t\tif (nextRankValue < rankValue)\n\t\t{\n\t\t\tnextLayerConnectedCells = cell.getPreviousLayerConnectedCells(\n\t\t\t\t\trankValue).slice();\n\t\t}\n\t\telse\n\t\t{\n\t\t\tnextLayerConnectedCells = cell.getNextLayerConnectedCells(\n\t\t\t\t\trankValue).slice();\n\t\t}\n\n\t\tif (nextLayerConnectedCells != null)\n\t\t{\n\t\t\tnumConnectionsNextLevel = nextLayerConnectedCells.length;\n\t\t\t\n\t\t\tif (numConnectionsNextLevel > 0)\n\t\t\t{\n\t\t\t\tmedianNextLevel = this.medianXValue(nextLayerConnectedCells,\n\t\t\t\t\t\tnextRankValue);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// For case of no connections on the next level set the\n\t\t\t\t// median to be the current position and try to be\n\t\t\t\t// positioned there\n\t\t\t\tmedianNextLevel = cell.getGeneralPurposeVariable(rankValue);\n\t\t\t}\n\t\t}\n\n\t\tvar leftBuffer = 0.0;\n\t\tvar leftLimit = -100000000.0;\n\t\t\n\t\tfor (var j = weightedValues[i].rankIndex - 1; j >= 0;)\n\t\t{\n\t\t\tvar weightedValue = cellMap[rank[j].id];\n\t\t\t\n\t\t\tif (weightedValue != null)\n\t\t\t{\n\t\t\t\tvar leftCell = weightedValue.cell;\n\t\t\t\t\n\t\t\t\tif (weightedValue.visited)\n\t\t\t\t{\n\t\t\t\t\t// The left limit is the right hand limit of that\n\t\t\t\t\t// cell plus any allowance for unallocated cells\n\t\t\t\t\t// in-between\n\t\t\t\t\tleftLimit = leftCell\n\t\t\t\t\t\t\t.getGeneralPurposeVariable(rankValue)\n\t\t\t\t\t\t\t+ leftCell.width\n\t\t\t\t\t\t\t/ 2.0\n\t\t\t\t\t\t\t+ this.intraCellSpacing\n\t\t\t\t\t\t\t+ leftBuffer + cell.width / 2.0;\n\t\t\t\t\tj = -1;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tleftBuffer += leftCell.width + this.intraCellSpacing;\n\t\t\t\t\tj--;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tvar rightBuffer = 0.0;\n\t\tvar rightLimit = 100000000.0;\n\t\t\n\t\tfor (var j = weightedValues[i].rankIndex + 1; j < weightedValues.length;)\n\t\t{\n\t\t\tvar weightedValue = cellMap[rank[j].id];\n\t\t\t\n\t\t\tif (weightedValue != null)\n\t\t\t{\n\t\t\t\tvar rightCell = weightedValue.cell;\n\t\t\t\t\n\t\t\t\tif (weightedValue.visited)\n\t\t\t\t{\n\t\t\t\t\t// The left limit is the right hand limit of that\n\t\t\t\t\t// cell plus any allowance for unallocated cells\n\t\t\t\t\t// in-between\n\t\t\t\t\trightLimit = rightCell\n\t\t\t\t\t\t\t.getGeneralPurposeVariable(rankValue)\n\t\t\t\t\t\t\t- rightCell.width\n\t\t\t\t\t\t\t/ 2.0\n\t\t\t\t\t\t\t- this.intraCellSpacing\n\t\t\t\t\t\t\t- rightBuffer - cell.width / 2.0;\n\t\t\t\t\tj = weightedValues.length;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\trightBuffer += rightCell.width + this.intraCellSpacing;\n\t\t\t\t\tj++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (medianNextLevel >= leftLimit && medianNextLevel <= rightLimit)\n\t\t{\n\t\t\tcell.setGeneralPurposeVariable(rankValue, medianNextLevel);\n\t\t}\n\t\telse if (medianNextLevel < leftLimit)\n\t\t{\n\t\t\t// Couldn't place at median value, place as close to that\n\t\t\t// value as possible\n\t\t\tcell.setGeneralPurposeVariable(rankValue, leftLimit);\n\t\t\tthis.currentXDelta += leftLimit - medianNextLevel;\n\t\t}\n\t\telse if (medianNextLevel > rightLimit)\n\t\t{\n\t\t\t// Couldn't place at median value, place as close to that\n\t\t\t// value as possible\n\t\t\tcell.setGeneralPurposeVariable(rankValue, rightLimit);\n\t\t\tthis.currentXDelta += medianNextLevel - rightLimit;\n\t\t}\n\n\t\tweightedValues[i].visited = true;\n\t}\n};\n\n/**\n * Function: calculatedWeightedValue\n * \n * Calculates the priority the specified cell has based on the type of its\n * cell and the cells it is connected to on the next layer\n * \n * Parameters:\n * \n * currentCell - the cell whose weight is to be calculated\n * collection - the cells the specified cell is connected to\n */\nmxCoordinateAssignment.prototype.calculatedWeightedValue = function(currentCell, collection)\n{\n\tvar totalWeight = 0;\n\t\n\tfor (var i = 0; i < collection.length; i++)\n\t{\n\t\tvar cell = collection[i];\n\n\t\tif (currentCell.isVertex() && cell.isVertex())\n\t\t{\n\t\t\ttotalWeight++;\n\t\t}\n\t\telse if (currentCell.isEdge() && cell.isEdge())\n\t\t{\n\t\t\ttotalWeight += 8;\n\t\t}\n\t\telse\n\t\t{\n\t\t\ttotalWeight += 2;\n\t\t}\n\t}\n\n\treturn totalWeight;\n};\n\n/**\n * Function: medianXValue\n * \n * Calculates the median position of the connected cell on the specified\n * rank\n * \n * Parameters:\n * \n * connectedCells - the cells the candidate connects to on this level\n * rankValue - the layer number of this rank\n */\nmxCoordinateAssignment.prototype.medianXValue = function(connectedCells, rankValue)\n{\n\tif (connectedCells.length == 0)\n\t{\n\t\treturn 0;\n\t}\n\n\tvar medianValues = [];\n\n\tfor (var i = 0; i < connectedCells.length; i++)\n\t{\n\t\tmedianValues[i] = connectedCells[i].getGeneralPurposeVariable(rankValue);\n\t}\n\n\tmedianValues.sort(function(a,b){return a - b;});\n\t\n\tif (connectedCells.length % 2 == 1)\n\t{\n\t\t// For odd numbers of adjacent vertices return the median\n\t\treturn medianValues[Math.floor(connectedCells.length / 2)];\n\t}\n\telse\n\t{\n\t\tvar medianPoint = connectedCells.length / 2;\n\t\tvar leftMedian = medianValues[medianPoint - 1];\n\t\tvar rightMedian = medianValues[medianPoint];\n\n\t\treturn ((leftMedian + rightMedian) / 2);\n\t}\n};\n\n/**\n * Function: initialCoords\n * \n * Sets up the layout in an initial positioning. The ranks are all centered\n * as much as possible along the middle vertex in each rank. The other cells\n * are then placed as close as possible on either side.\n * \n * Parameters:\n * \n * facade - the facade describing the input graph\n * model - an internal model of the hierarchical layout\n */\nmxCoordinateAssignment.prototype.initialCoords = function(facade, model)\n{\n\tthis.calculateWidestRank(facade, model);\n\n\t// Sweep up and down from the widest rank\n\tfor (var i = this.widestRank; i >= 0; i--)\n\t{\n\t\tif (i < model.maxRank)\n\t\t{\n\t\t\tthis.rankCoordinates(i, facade, model);\n\t\t}\n\t}\n\n\tfor (var i = this.widestRank+1; i <= model.maxRank; i++)\n\t{\n\t\tif (i > 0)\n\t\t{\n\t\t\tthis.rankCoordinates(i, facade, model);\n\t\t}\n\t}\n};\n\n/**\n * Function: rankCoordinates\n * \n * Sets up the layout in an initial positioning. All the first cells in each\n * rank are moved to the left and the rest of the rank inserted as close\n * together as their size and buffering permits. This method works on just\n * the specified rank.\n * \n * Parameters:\n * \n * rankValue - the current rank being processed\n * graph - the facade describing the input graph\n * model - an internal model of the hierarchical layout\n */\nmxCoordinateAssignment.prototype.rankCoordinates = function(rankValue, graph, model)\n{\n\tvar rank = model.ranks[rankValue];\n\tvar maxY = 0.0;\n\tvar localX = this.initialX + (this.widestRankValue - this.rankWidths[rankValue])\n\t\t\t/ 2;\n\n\t// Store whether or not any of the cells' bounds were unavailable so\n\t// to only issue the warning once for all cells\n\tvar boundsWarning = false;\n\t\n\tfor (var i = 0; i < rank.length; i++)\n\t{\n\t\tvar node = rank[i];\n\t\t\n\t\tif (node.isVertex())\n\t\t{\n\t\t\tvar bounds = this.layout.getVertexBounds(node.cell);\n\n\t\t\tif (bounds != null)\n\t\t\t{\n\t\t\t\tif (this.orientation == mxConstants.DIRECTION_NORTH ||\n\t\t\t\t\tthis.orientation == mxConstants.DIRECTION_SOUTH)\n\t\t\t\t{\n\t\t\t\t\tnode.width = bounds.width;\n\t\t\t\t\tnode.height = bounds.height;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tnode.width = bounds.height;\n\t\t\t\t\tnode.height = bounds.width;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tboundsWarning = true;\n\t\t\t}\n\n\t\t\tmaxY = Math.max(maxY, node.height);\n\t\t}\n\t\telse if (node.isEdge())\n\t\t{\n\t\t\t// The width is the number of additional parallel edges\n\t\t\t// time the parallel edge spacing\n\t\t\tvar numEdges = 1;\n\n\t\t\tif (node.edges != null)\n\t\t\t{\n\t\t\t\tnumEdges = node.edges.length;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tmxLog.warn('edge.edges is null');\n\t\t\t}\n\n\t\t\tnode.width = (numEdges - 1) * this.parallelEdgeSpacing;\n\t\t}\n\n\t\t// Set the initial x-value as being the best result so far\n\t\tlocalX += node.width / 2.0;\n\t\tnode.setX(rankValue, localX);\n\t\tnode.setGeneralPurposeVariable(rankValue, localX);\n\t\tlocalX += node.width / 2.0;\n\t\tlocalX += this.intraCellSpacing;\n\t}\n\n\tif (boundsWarning == true)\n\t{\n\t\tmxLog.warn('At least one cell has no bounds');\n\t}\n};\n\n/**\n * Function: calculateWidestRank\n * \n * Calculates the width rank in the hierarchy. Also set the y value of each\n * rank whilst performing the calculation\n * \n * Parameters:\n * \n * graph - the facade describing the input graph\n * model - an internal model of the hierarchical layout\n */\nmxCoordinateAssignment.prototype.calculateWidestRank = function(graph, model)\n{\n\t// Starting y co-ordinate\n\tvar y = -this.interRankCellSpacing;\n\t\n\t// Track the widest cell on the last rank since the y\n\t// difference depends on it\n\tvar lastRankMaxCellHeight = 0.0;\n\tthis.rankWidths = [];\n\tthis.rankY = [];\n\n\tfor (var rankValue = model.maxRank; rankValue >= 0; rankValue--)\n\t{\n\t\t// Keep track of the widest cell on this rank\n\t\tvar maxCellHeight = 0.0;\n\t\tvar rank = model.ranks[rankValue];\n\t\tvar localX = this.initialX;\n\n\t\t// Store whether or not any of the cells' bounds were unavailable so\n\t\t// to only issue the warning once for all cells\n\t\tvar boundsWarning = false;\n\t\t\n\t\tfor (var i = 0; i < rank.length; i++)\n\t\t{\n\t\t\tvar node = rank[i];\n\n\t\t\tif (node.isVertex())\n\t\t\t{\n\t\t\t\tvar bounds = this.layout.getVertexBounds(node.cell);\n\n\t\t\t\tif (bounds != null)\n\t\t\t\t{\n\t\t\t\t\tif (this.orientation == mxConstants.DIRECTION_NORTH ||\n\t\t\t\t\t\tthis.orientation == mxConstants.DIRECTION_SOUTH)\n\t\t\t\t\t{\n\t\t\t\t\t\tnode.width = bounds.width;\n\t\t\t\t\t\tnode.height = bounds.height;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tnode.width = bounds.height;\n\t\t\t\t\t\tnode.height = bounds.width;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tboundsWarning = true;\n\t\t\t\t}\n\n\t\t\t\tmaxCellHeight = Math.max(maxCellHeight, node.height);\n\t\t\t}\n\t\t\telse if (node.isEdge())\n\t\t\t{\n\t\t\t\t// The width is the number of additional parallel edges\n\t\t\t\t// time the parallel edge spacing\n\t\t\t\tvar numEdges = 1;\n\n\t\t\t\tif (node.edges != null)\n\t\t\t\t{\n\t\t\t\t\tnumEdges = node.edges.length;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tmxLog.warn('edge.edges is null');\n\t\t\t\t}\n\n\t\t\t\tnode.width = (numEdges - 1) * this.parallelEdgeSpacing;\n\t\t\t}\n\n\t\t\t// Set the initial x-value as being the best result so far\n\t\t\tlocalX += node.width / 2.0;\n\t\t\tnode.setX(rankValue, localX);\n\t\t\tnode.setGeneralPurposeVariable(rankValue, localX);\n\t\t\tlocalX += node.width / 2.0;\n\t\t\tlocalX += this.intraCellSpacing;\n\n\t\t\tif (localX > this.widestRankValue)\n\t\t\t{\n\t\t\t\tthis.widestRankValue = localX;\n\t\t\t\tthis.widestRank = rankValue;\n\t\t\t}\n\n\t\t\tthis.rankWidths[rankValue] = localX;\n\t\t}\n\n\t\tif (boundsWarning == true)\n\t\t{\n\t\t\tmxLog.warn('At least one cell has no bounds');\n\t\t}\n\n\t\tthis.rankY[rankValue] = y;\n\t\tvar distanceToNextRank = maxCellHeight / 2.0\n\t\t\t\t+ lastRankMaxCellHeight / 2.0 + this.interRankCellSpacing;\n\t\tlastRankMaxCellHeight = maxCellHeight;\n\n\t\tif (this.orientation == mxConstants.DIRECTION_NORTH ||\n\t\t\tthis.orientation == mxConstants.DIRECTION_WEST)\n\t\t{\n\t\t\ty += distanceToNextRank;\n\t\t}\n\t\telse\n\t\t{\n\t\t\ty -= distanceToNextRank;\n\t\t}\n\n\t\tfor (var i = 0; i < rank.length; i++)\n\t\t{\n\t\t\tvar cell = rank[i];\n\t\t\tcell.setY(rankValue, y);\n\t\t}\n\t}\n};\n\n/**\n * Function: minPath\n * \n * Straightens out chains of virtual nodes where possibleacade to those stored after this layout\n * processing step has completed.\n * \n * Parameters:\n *\n * graph - the facade describing the input graph\n * model - an internal model of the hierarchical layout\n */\nmxCoordinateAssignment.prototype.minPath = function(graph, model)\n{\n\t// Work down and up each edge with at least 2 control points\n\t// trying to straighten each one out. If the same number of\n\t// straight segments are formed in both directions, the \n\t// preferred direction used is the one where the final\n\t// control points have the least offset from the connectable \n\t// region of the terminating vertices\n\tvar edges = model.edgeMapper.getValues();\n\t\n\tfor (var j = 0; j < edges.length; j++)\n\t{\n\t\tvar cell = edges[j];\n\t\t\n\t\tif (cell.maxRank - cell.minRank - 1 < 1)\n\t\t{\n\t\t\tcontinue;\n\t\t}\n\n\t\t// At least two virtual nodes in the edge\n\t\t// Check first whether the edge is already straight\n\t\tvar referenceX = cell\n\t\t\t\t.getGeneralPurposeVariable(cell.minRank + 1);\n\t\tvar edgeStraight = true;\n\t\tvar refSegCount = 0;\n\t\t\n\t\tfor (var i = cell.minRank + 2; i < cell.maxRank; i++)\n\t\t{\n\t\t\tvar x = cell.getGeneralPurposeVariable(i);\n\n\t\t\tif (referenceX != x)\n\t\t\t{\n\t\t\t\tedgeStraight = false;\n\t\t\t\treferenceX = x;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\trefSegCount++;\n\t\t\t}\n\t\t}\n\n\t\tif (!edgeStraight)\n\t\t{\n\t\t\tvar upSegCount = 0;\n\t\t\tvar downSegCount = 0;\n\t\t\tvar upXPositions = [];\n\t\t\tvar downXPositions = [];\n\n\t\t\tvar currentX = cell.getGeneralPurposeVariable(cell.minRank + 1);\n\n\t\t\tfor (var i = cell.minRank + 1; i < cell.maxRank - 1; i++)\n\t\t\t{\n\t\t\t\t// Attempt to straight out the control point on the\n\t\t\t\t// next segment up with the current control point.\n\t\t\t\tvar nextX = cell.getX(i + 1);\n\n\t\t\t\tif (currentX == nextX)\n\t\t\t\t{\n\t\t\t\t\tupXPositions[i - cell.minRank - 1] = currentX;\n\t\t\t\t\tupSegCount++;\n\t\t\t\t}\n\t\t\t\telse if (this.repositionValid(model, cell, i + 1, currentX))\n\t\t\t\t{\n\t\t\t\t\tupXPositions[i - cell.minRank - 1] = currentX;\n\t\t\t\t\tupSegCount++;\n\t\t\t\t\t// Leave currentX at same value\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tupXPositions[i - cell.minRank - 1] = nextX;\n\t\t\t\t\tcurrentX = nextX;\n\t\t\t\t}\t\t\t\t\n\t\t\t}\n\n\t\t\tcurrentX = cell.getX(i);\n\n\t\t\tfor (var i = cell.maxRank - 1; i > cell.minRank + 1; i--)\n\t\t\t{\n\t\t\t\t// Attempt to straight out the control point on the\n\t\t\t\t// next segment down with the current control point.\n\t\t\t\tvar nextX = cell.getX(i - 1);\n\n\t\t\t\tif (currentX == nextX)\n\t\t\t\t{\n\t\t\t\t\tdownXPositions[i - cell.minRank - 2] = currentX;\n\t\t\t\t\tdownSegCount++;\n\t\t\t\t}\n\t\t\t\telse if (this.repositionValid(model, cell, i - 1, currentX))\n\t\t\t\t{\n\t\t\t\t\tdownXPositions[i - cell.minRank - 2] = currentX;\n\t\t\t\t\tdownSegCount++;\n\t\t\t\t\t// Leave currentX at same value\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tdownXPositions[i - cell.minRank - 2] = cell.getX(i-1);\n\t\t\t\t\tcurrentX = nextX;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (downSegCount > refSegCount || upSegCount > refSegCount)\n\t\t\t{\n\t\t\t\tif (downSegCount >= upSegCount)\n\t\t\t\t{\n\t\t\t\t\t// Apply down calculation values\n\t\t\t\t\tfor (var i = cell.maxRank - 2; i > cell.minRank; i--)\n\t\t\t\t\t{\n\t\t\t\t\t\tcell.setX(i, downXPositions[i - cell.minRank - 1]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if (upSegCount > downSegCount)\n\t\t\t\t{\n\t\t\t\t\t// Apply up calculation values\n\t\t\t\t\tfor (var i = cell.minRank + 2; i < cell.maxRank; i++)\n\t\t\t\t\t{\n\t\t\t\t\t\tcell.setX(i, upXPositions[i - cell.minRank - 2]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t// Neither direction provided a favourable result\n\t\t\t\t\t// But both calculations are better than the\n\t\t\t\t\t// existing solution, so apply the one with minimal\n\t\t\t\t\t// offset to attached vertices at either end.\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n};\n\n/**\n * Function: repositionValid\n * \n * Determines whether or not a node may be moved to the specified x \n * position on the specified rank\n * \n * Parameters:\n *\n * model - the layout model\n * cell - the cell being analysed\n * rank - the layer of the cell\n * position - the x position being sought\n */\nmxCoordinateAssignment.prototype.repositionValid = function(model, cell, rank, position)\n{\n\tvar rankArray = model.ranks[rank];\n\tvar rankIndex = -1;\n\n\tfor (var i = 0; i < rankArray.length; i++)\n\t{\n\t\tif (cell == rankArray[i])\n\t\t{\n\t\t\trankIndex = i;\n\t\t\tbreak;\n\t\t}\n\t}\n\n\tif (rankIndex < 0)\n\t{\n\t\treturn false;\n\t}\n\n\tvar currentX = cell.getGeneralPurposeVariable(rank);\n\n\tif (position < currentX)\n\t{\n\t\t// Trying to move node to the left.\n\t\tif (rankIndex == 0)\n\t\t{\n\t\t\t// Left-most node, can move anywhere\n\t\t\treturn true;\n\t\t}\n\n\t\tvar leftCell = rankArray[rankIndex - 1];\n\t\tvar leftLimit = leftCell.getGeneralPurposeVariable(rank);\n\t\tleftLimit = leftLimit + leftCell.width / 2\n\t\t\t\t+ this.intraCellSpacing + cell.width / 2;\n\n\t\tif (leftLimit <= position)\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t}\n\telse if (position > currentX)\n\t{\n\t\t// Trying to move node to the right.\n\t\tif (rankIndex == rankArray.length - 1)\n\t\t{\n\t\t\t// Right-most node, can move anywhere\n\t\t\treturn true;\n\t\t}\n\n\t\tvar rightCell = rankArray[rankIndex + 1];\n\t\tvar rightLimit = rightCell.getGeneralPurposeVariable(rank);\n\t\trightLimit = rightLimit - rightCell.width / 2\n\t\t\t\t- this.intraCellSpacing - cell.width / 2;\n\n\t\tif (rightLimit >= position)\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t}\n\n\treturn true;\n};\n\n/**\n * Function: setCellLocations\n * \n * Sets the cell locations in the facade to those stored after this layout\n * processing step has completed.\n * \n * Parameters:\n *\n * graph - the input graph\n * model - the layout model\n */\nmxCoordinateAssignment.prototype.setCellLocations = function(graph, model)\n{\n\tthis.rankTopY = [];\n\tthis.rankBottomY = [];\n\n\tfor (var i = 0; i < model.ranks.length; i++)\n\t{\n\t\tthis.rankTopY[i] = Number.MAX_VALUE;\n\t\tthis.rankBottomY[i] = -Number.MAX_VALUE;\n\t}\n\t\n\tvar vertices = model.vertexMapper.getValues();\n\n\t// Process vertices all first, since they define the lower and \n\t// limits of each rank. Between these limits lie the channels\n\t// where the edges can be routed across the graph\n\n\tfor (var i = 0; i < vertices.length; i++)\n\t{\n\t\tthis.setVertexLocation(vertices[i]);\n\t}\n\t\n\t// Post process edge styles. Needs the vertex locations set for initial\n\t// values of the top and bottoms of each rank\n\tif (this.layout.edgeStyle == mxHierarchicalEdgeStyle.ORTHOGONAL\n\t\t\t|| this.layout.edgeStyle == mxHierarchicalEdgeStyle.POLYLINE\n\t\t\t|| this.layout.edgeStyle == mxHierarchicalEdgeStyle.CURVE)\n\t{\n\t\tthis.localEdgeProcessing(model);\n\t}\n\n\tvar edges = model.edgeMapper.getValues();\n\n\tfor (var i = 0; i < edges.length; i++)\n\t{\n\t\tthis.setEdgePosition(edges[i]);\n\t}\n};\n\n/**\n * Function: localEdgeProcessing\n * \n * Separates the x position of edges as they connect to vertices\n * \n * Parameters:\n *\n * model - the layout model\n */\nmxCoordinateAssignment.prototype.localEdgeProcessing = function(model)\n{\n\t// Iterate through each vertex, look at the edges connected in\n\t// both directions.\n\tfor (var rankIndex = 0; rankIndex < model.ranks.length; rankIndex++)\n\t{\n\t\tvar rank = model.ranks[rankIndex];\n\n\t\tfor (var cellIndex = 0; cellIndex < rank.length; cellIndex++)\n\t\t{\n\t\t\tvar cell = rank[cellIndex];\n\n\t\t\tif (cell.isVertex())\n\t\t\t{\n\t\t\t\tvar currentCells = cell.getPreviousLayerConnectedCells(rankIndex);\n\n\t\t\t\tvar currentRank = rankIndex - 1;\n\n\t\t\t\t// Two loops, last connected cells, and next\n\t\t\t\tfor (var k = 0; k < 2; k++)\n\t\t\t\t{\n\t\t\t\t\tif (currentRank > -1\n\t\t\t\t\t\t\t&& currentRank < model.ranks.length\n\t\t\t\t\t\t\t&& currentCells != null\n\t\t\t\t\t\t\t&& currentCells.length > 0)\n\t\t\t\t\t{\n\t\t\t\t\t\tvar sortedCells = [];\n\n\t\t\t\t\t\tfor (var j = 0; j < currentCells.length; j++)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tvar sorter = new WeightedCellSorter(\n\t\t\t\t\t\t\t\t\tcurrentCells[j], currentCells[j].getX(currentRank));\n\t\t\t\t\t\t\tsortedCells.push(sorter);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tsortedCells.sort(WeightedCellSorter.prototype.compare);\n\n\t\t\t\t\t\tvar leftLimit = cell.x[0] - cell.width / 2;\n\t\t\t\t\t\tvar rightLimit = leftLimit + cell.width;\n\n\t\t\t\t\t\t// Connected edge count starts at 1 to allow for buffer\n\t\t\t\t\t\t// with edge of vertex\n\t\t\t\t\t\tvar connectedEdgeCount = 0;\n\t\t\t\t\t\tvar connectedEdgeGroupCount = 0;\n\t\t\t\t\t\tvar connectedEdges = [];\n\t\t\t\t\t\t// Calculate width requirements for all connected edges\n\t\t\t\t\t\tfor (var j = 0; j < sortedCells.length; j++)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tvar innerCell = sortedCells[j].cell;\n\t\t\t\t\t\t\tvar connections;\n\n\t\t\t\t\t\t\tif (innerCell.isVertex())\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t// Get the connecting edge\n\t\t\t\t\t\t\t\tif (k == 0)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tconnections = cell.connectsAsSource;\n\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tconnections = cell.connectsAsTarget;\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tfor (var connIndex = 0; connIndex < connections.length; connIndex++)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tif (connections[connIndex].source == innerCell\n\t\t\t\t\t\t\t\t\t\t\t|| connections[connIndex].target == innerCell)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tconnectedEdgeCount += connections[connIndex].edges\n\t\t\t\t\t\t\t\t\t\t\t\t.length;\n\t\t\t\t\t\t\t\t\t\tconnectedEdgeGroupCount++;\n\n\t\t\t\t\t\t\t\t\t\tconnectedEdges.push(connections[connIndex]);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tconnectedEdgeCount += innerCell.edges.length;\n\t\t\t\t\t\t\t\tconnectedEdgeGroupCount++;\n\t\t\t\t\t\t\t\tconnectedEdges.push(innerCell);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tvar requiredWidth = (connectedEdgeCount + 1)\n\t\t\t\t\t\t\t\t* this.prefHozEdgeSep;\n\n\t\t\t\t\t\t// Add a buffer on the edges of the vertex if the edge count allows\n\t\t\t\t\t\tif (cell.width > requiredWidth\n\t\t\t\t\t\t\t\t+ (2 * this.prefHozEdgeSep))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tleftLimit += this.prefHozEdgeSep;\n\t\t\t\t\t\t\trightLimit -= this.prefHozEdgeSep;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tvar availableWidth = rightLimit - leftLimit;\n\t\t\t\t\t\tvar edgeSpacing = availableWidth / connectedEdgeCount;\n\n\t\t\t\t\t\tvar currentX = leftLimit + edgeSpacing / 2.0;\n\t\t\t\t\t\tvar currentYOffset = this.minEdgeJetty - this.prefVertEdgeOff;\n\t\t\t\t\t\tvar maxYOffset = 0;\n\n\t\t\t\t\t\tfor (var j = 0; j < connectedEdges.length; j++)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tvar numActualEdges = connectedEdges[j].edges\n\t\t\t\t\t\t\t\t\t.length;\n\t\t\t\t\t\t\tvar pos = this.jettyPositions[connectedEdges[j].ids[0]];\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif (pos == null)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tpos = [];\n\t\t\t\t\t\t\t\tthis.jettyPositions[connectedEdges[j].ids[0]] = pos;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif (j < connectedEdgeCount / 2)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tcurrentYOffset += this.prefVertEdgeOff;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse if (j > connectedEdgeCount / 2)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tcurrentYOffset -= this.prefVertEdgeOff;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t// Ignore the case if equals, this means the second of 2\n\t\t\t\t\t\t\t// jettys with the same y (even number of edges)\n\n\t\t\t\t\t\t\tfor (var m = 0; m < numActualEdges; m++)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tpos[m * 4 + k * 2] = currentX;\n\t\t\t\t\t\t\t\tcurrentX += edgeSpacing;\n\t\t\t\t\t\t\t\tpos[m * 4 + k * 2 + 1] = currentYOffset;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tmaxYOffset = Math.max(maxYOffset,\n\t\t\t\t\t\t\t\t\tcurrentYOffset);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tcurrentCells = cell.getNextLayerConnectedCells(rankIndex);\n\n\t\t\t\t\tcurrentRank = rankIndex + 1;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n};\n\n/**\n * Function: setEdgePosition\n * \n * Fixes the control points\n */\nmxCoordinateAssignment.prototype.setEdgePosition = function(cell)\n{\n\t// For parallel edges we need to seperate out the points a\n\t// little\n\tvar offsetX = 0;\n\t// Only set the edge control points once\n\n\tif (cell.temp[0] != 101207)\n\t{\n\t\tvar maxRank = cell.maxRank;\n\t\tvar minRank = cell.minRank;\n\t\t\n\t\tif (maxRank == minRank)\n\t\t{\n\t\t\tmaxRank = cell.source.maxRank;\n\t\t\tminRank = cell.target.minRank;\n\t\t}\n\t\t\n\t\tvar parallelEdgeCount = 0;\n\t\tvar jettys = this.jettyPositions[cell.ids[0]];\n\n\t\tvar source = cell.isReversed ? cell.target.cell : cell.source.cell;\n\t\tvar graph = this.layout.graph;\n\t\tvar layoutReversed = this.orientation == mxConstants.DIRECTION_EAST\n\t\t\t\t|| this.orientation == mxConstants.DIRECTION_SOUTH;\n\n\t\tfor (var i = 0; i < cell.edges.length; i++)\n\t\t{\n\t\t\tvar realEdge = cell.edges[i];\n\t\t\tvar realSource = this.layout.getVisibleTerminal(realEdge, true);\n\n\t\t\t//List oldPoints = graph.getPoints(realEdge);\n\t\t\tvar newPoints = [];\n\n\t\t\t// Single length reversed edges end up with the jettys in the wrong\n\t\t\t// places. Since single length edges only have jettys, not segment\n\t\t\t// control points, we just say the edge isn't reversed in this section\n\t\t\tvar reversed = cell.isReversed;\n\t\t\t\n\t\t\tif (realSource != source)\n\t\t\t{\n\t\t\t\t// The real edges include all core model edges and these can go\n\t\t\t\t// in both directions. If the source of the hierarchical model edge\n\t\t\t\t// isn't the source of the specific real edge in this iteration\n\t\t\t\t// treat if as reversed\n\t\t\t\treversed = !reversed;\n\t\t\t}\n\n\t\t\t// First jetty of edge\n\t\t\tif (jettys != null)\n\t\t\t{\n\t\t\t\tvar arrayOffset = reversed ? 2 : 0;\n\t\t\t\tvar y = reversed ?\n\t\t\t\t\t\t(layoutReversed ? this.rankBottomY[minRank] : this.rankTopY[minRank]) :\n\t\t\t\t\t\t\t(layoutReversed ? this.rankTopY[maxRank] : this.rankBottomY[maxRank]);\n\t\t\t\tvar jetty = jettys[parallelEdgeCount * 4 + 1 + arrayOffset];\n\t\t\t\t\n\t\t\t\tif (reversed != layoutReversed)\n\t\t\t\t{\n\t\t\t\t\tjetty = -jetty;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\ty += jetty;\n\t\t\t\tvar x = jettys[parallelEdgeCount * 4 + arrayOffset];\n\t\t\t\t\n\t\t\t\tvar modelSource = graph.model.getTerminal(realEdge, true);\n\n\t\t\t\tif (this.layout.isPort(modelSource) && graph.model.getParent(modelSource) == realSource)\n\t\t\t\t{\n\t\t\t\t\tvar state = graph.view.getState(modelSource);\n\t\t\t\t\t\n\t\t\t\t\tif (state != null)\n\t\t\t\t\t{\n\t\t\t\t\t\tx = state.x;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tx = realSource.geometry.x + cell.source.width * modelSource.geometry.x;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (this.orientation == mxConstants.DIRECTION_NORTH\n\t\t\t\t\t\t|| this.orientation == mxConstants.DIRECTION_SOUTH)\n\t\t\t\t{\n\t\t\t\t\tnewPoints.push(new mxPoint(x, y));\n\t\t\t\t\t\n\t\t\t\t\tif (this.layout.edgeStyle == mxHierarchicalEdgeStyle.CURVE)\n\t\t\t\t\t{\n\t\t\t\t\t\tnewPoints.push(new mxPoint(x, y + jetty));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tnewPoints.push(new mxPoint(y, x));\n\t\t\t\t\t\n\t\t\t\t\tif (this.layout.edgeStyle == mxHierarchicalEdgeStyle.CURVE)\n\t\t\t\t\t{\n\t\t\t\t\t\tnewPoints.push(new mxPoint(y + jetty, x));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Declare variables to define loop through edge points and \n\t\t\t// change direction if edge is reversed\n\n\t\t\tvar loopStart = cell.x.length - 1;\n\t\t\tvar loopLimit = -1;\n\t\t\tvar loopDelta = -1;\n\t\t\tvar currentRank = cell.maxRank - 1;\n\n\t\t\tif (reversed)\n\t\t\t{\n\t\t\t\tloopStart = 0;\n\t\t\t\tloopLimit = cell.x.length;\n\t\t\t\tloopDelta = 1;\n\t\t\t\tcurrentRank = cell.minRank + 1;\n\t\t\t}\n\t\t\t// Reversed edges need the points inserted in\n\t\t\t// reverse order\n\t\t\tfor (var j = loopStart; (cell.maxRank != cell.minRank) && j != loopLimit; j += loopDelta)\n\t\t\t{\n\t\t\t\t// The horizontal position in a vertical layout\n\t\t\t\tvar positionX = cell.x[j] + offsetX;\n\n\t\t\t\t// Work out the vertical positions in a vertical layout\n\t\t\t\t// in the edge buffer channels above and below this rank\n\t\t\t\tvar topChannelY = (this.rankTopY[currentRank] + this.rankBottomY[currentRank + 1]) / 2.0;\n\t\t\t\tvar bottomChannelY = (this.rankTopY[currentRank - 1] + this.rankBottomY[currentRank]) / 2.0;\n\n\t\t\t\tif (reversed)\n\t\t\t\t{\n\t\t\t\t\tvar tmp = topChannelY;\n\t\t\t\t\ttopChannelY = bottomChannelY;\n\t\t\t\t\tbottomChannelY = tmp;\n\t\t\t\t}\n\n\t\t\t\tif (this.orientation == mxConstants.DIRECTION_NORTH ||\n\t\t\t\t\tthis.orientation == mxConstants.DIRECTION_SOUTH)\n\t\t\t\t{\n\t\t\t\t\tnewPoints.push(new mxPoint(positionX, topChannelY));\n\t\t\t\t\tnewPoints.push(new mxPoint(positionX, bottomChannelY));\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tnewPoints.push(new mxPoint(topChannelY, positionX));\n\t\t\t\t\tnewPoints.push(new mxPoint(bottomChannelY, positionX));\n\t\t\t\t}\n\n\t\t\t\tthis.limitX = Math.max(this.limitX, positionX);\n\t\t\t\tcurrentRank += loopDelta;\n\t\t\t}\n\n\t\t\t// Second jetty of edge\n\t\t\tif (jettys != null)\n\t\t\t{\n\t\t\t\tvar arrayOffset = reversed ? 2 : 0;\n\t\t\t\tvar rankY = reversed ?\n\t\t\t\t\t\t(layoutReversed ? this.rankTopY[maxRank] : this.rankBottomY[maxRank]) :\n\t\t\t\t\t\t\t(layoutReversed ? this.rankBottomY[minRank] : this.rankTopY[minRank]);\n\t\t\t\tvar jetty = jettys[parallelEdgeCount * 4 + 3 - arrayOffset];\n\t\t\t\t\n\t\t\t\tif (reversed != layoutReversed)\n\t\t\t\t{\n\t\t\t\t\tjetty = -jetty;\n\t\t\t\t}\n\t\t\t\tvar y = rankY - jetty;\n\t\t\t\tvar x = jettys[parallelEdgeCount * 4 + 2 - arrayOffset];\n\t\t\t\t\n\t\t\t\tvar modelTarget = graph.model.getTerminal(realEdge, false);\n\t\t\t\tvar realTarget = this.layout.getVisibleTerminal(realEdge, false);\n\n\t\t\t\tif (this.layout.isPort(modelTarget) && graph.model.getParent(modelTarget) == realTarget)\n\t\t\t\t{\n\t\t\t\t\tvar state = graph.view.getState(modelTarget);\n\t\t\t\t\t\n\t\t\t\t\tif (state != null)\n\t\t\t\t\t{\n\t\t\t\t\t\tx = state.x;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tx = realTarget.geometry.x + cell.target.width * modelTarget.geometry.x;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (this.orientation == mxConstants.DIRECTION_NORTH ||\n\t\t\t\t\t\tthis.orientation == mxConstants.DIRECTION_SOUTH)\n\t\t\t\t{\n\t\t\t\t\tif (this.layout.edgeStyle == mxHierarchicalEdgeStyle.CURVE)\n\t\t\t\t\t{\n\t\t\t\t\t\tnewPoints.push(new mxPoint(x, y - jetty));\n\t\t\t\t\t}\n\n\t\t\t\t\tnewPoints.push(new mxPoint(x, y));\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tif (this.layout.edgeStyle == mxHierarchicalEdgeStyle.CURVE)\n\t\t\t\t\t{\n\t\t\t\t\t\tnewPoints.push(new mxPoint(y - jetty, x));\n\t\t\t\t\t}\n\n\t\t\t\t\tnewPoints.push(new mxPoint(y, x));\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (cell.isReversed)\n\t\t\t{\n\t\t\t\tthis.processReversedEdge(cell, realEdge);\n\t\t\t}\n\n\t\t\tthis.layout.setEdgePoints(realEdge, newPoints);\n\n\t\t\t// Increase offset so next edge is drawn next to\n\t\t\t// this one\n\t\t\tif (offsetX == 0.0)\n\t\t\t{\n\t\t\t\toffsetX = this.parallelEdgeSpacing;\n\t\t\t}\n\t\t\telse if (offsetX > 0)\n\t\t\t{\n\t\t\t\toffsetX = -offsetX;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\toffsetX = -offsetX + this.parallelEdgeSpacing;\n\t\t\t}\n\t\t\t\n\t\t\tparallelEdgeCount++;\n\t\t}\n\n\t\tcell.temp[0] = 101207;\n\t}\n};\n\n\n/**\n * Function: setVertexLocation\n * \n * Fixes the position of the specified vertex.\n * \n * Parameters:\n * \n * cell - the vertex to position\n */\nmxCoordinateAssignment.prototype.setVertexLocation = function(cell)\n{\n\tvar realCell = cell.cell;\n\tvar positionX = cell.x[0] - cell.width / 2;\n\tvar positionY = cell.y[0] - cell.height / 2;\n\n\tthis.rankTopY[cell.minRank] = Math.min(this.rankTopY[cell.minRank], positionY);\n\tthis.rankBottomY[cell.minRank] = Math.max(this.rankBottomY[cell.minRank],\n\t\t\tpositionY + cell.height);\n\n\tif (this.orientation == mxConstants.DIRECTION_NORTH ||\n\t\tthis.orientation == mxConstants.DIRECTION_SOUTH)\n\t{\n\t\tthis.layout.setVertexLocation(realCell, positionX, positionY);\n\t}\n\telse\n\t{\n\t\tthis.layout.setVertexLocation(realCell, positionY, positionX);\n\t}\n\n\tthis.limitX = Math.max(this.limitX, positionX + cell.width);\n};\n\n/**\n * Function: processReversedEdge\n * \n * Hook to add additional processing\n * \n * Parameters:\n * \n * edge - the hierarchical model edge\n * realEdge - the real edge in the graph\n */\nmxCoordinateAssignment.prototype.processReversedEdge = function(graph, model)\n{\n\t// hook for subclassers\n};\n"
  },
  {
    "path": "static/cherry/drawio_demo/src/js/layout/hierarchical/stage/mxHierarchicalLayoutStage.js",
    "content": "/**\n * Copyright (c) 2006-2015, JGraph Ltd\n * Copyright (c) 2006-2015, Gaudenz Alder\n */\n/**\n * Class: mxHierarchicalLayoutStage\n * \n * The specific layout interface for hierarchical layouts. It adds a\n * <code>run</code> method with a parameter for the hierarchical layout model\n * that is shared between the layout stages.\n * \n * Constructor: mxHierarchicalLayoutStage\n *\n * Constructs a new hierarchical layout stage.\n */\nfunction mxHierarchicalLayoutStage() { };\n\n/**\n * Function: execute\n * \n * Takes the graph detail and configuration information within the facade\n * and creates the resulting laid out graph within that facade for further\n * use.\n */\nmxHierarchicalLayoutStage.prototype.execute = function(parent) { };\n"
  },
  {
    "path": "static/cherry/drawio_demo/src/js/layout/hierarchical/stage/mxMedianHybridCrossingReduction.js",
    "content": "/**\n * Copyright (c) 2006-2015, JGraph Ltd\n * Copyright (c) 2006-2015, Gaudenz Alder\n */\n/**\n * Class: mxMedianHybridCrossingReduction\n * \n * Sets the horizontal locations of node and edge dummy nodes on each layer.\n * Uses median down and up weighings as well heuristic to straighten edges as\n * far as possible.\n * \n * Constructor: mxMedianHybridCrossingReduction\n *\n * Creates a coordinate assignment.\n * \n * Arguments:\n * \n * intraCellSpacing - the minimum buffer between cells on the same rank\n * interRankCellSpacing - the minimum distance between cells on adjacent ranks\n * orientation - the position of the root node(s) relative to the graph\n * initialX - the leftmost coordinate node placement starts at\n */\nfunction mxMedianHybridCrossingReduction(layout)\n{\n\tthis.layout = layout;\n};\n\n/**\n * Extends mxMedianHybridCrossingReduction.\n */\nmxMedianHybridCrossingReduction.prototype = new mxHierarchicalLayoutStage();\nmxMedianHybridCrossingReduction.prototype.constructor = mxMedianHybridCrossingReduction;\n\n/**\n * Variable: layout\n * \n * Reference to the enclosing <mxHierarchicalLayout>.\n */\nmxMedianHybridCrossingReduction.prototype.layout = null;\n\n/**\n * Variable: maxIterations\n * \n * The maximum number of iterations to perform whilst reducing edge\n * crossings. Default is 24.\n */\nmxMedianHybridCrossingReduction.prototype.maxIterations = 24;\n\n/**\n * Variable: nestedBestRanks\n * \n * Stores each rank as a collection of cells in the best order found for\n * each layer so far\n */\nmxMedianHybridCrossingReduction.prototype.nestedBestRanks = null;\n\n/**\n * Variable: currentBestCrossings\n * \n * The total number of crossings found in the best configuration so far\n */\nmxMedianHybridCrossingReduction.prototype.currentBestCrossings = 0;\n\n/**\n * Variable: iterationsWithoutImprovement\n * \n * The total number of crossings found in the best configuration so far\n */\nmxMedianHybridCrossingReduction.prototype.iterationsWithoutImprovement = 0;\n\n/**\n * Variable: maxNoImprovementIterations\n * \n * The total number of crossings found in the best configuration so far\n */\nmxMedianHybridCrossingReduction.prototype.maxNoImprovementIterations = 2;\n\n/**\n * Function: execute\n * \n * Performs a vertex ordering within ranks as described by Gansner et al\n * 1993\n */\nmxMedianHybridCrossingReduction.prototype.execute = function(parent)\n{\n\tvar model = this.layout.getModel();\n\n\t// Stores initial ordering as being the best one found so far\n\tthis.nestedBestRanks = [];\n\t\n\tfor (var i = 0; i < model.ranks.length; i++)\n\t{\n\t\tthis.nestedBestRanks[i] = model.ranks[i].slice();\n\t}\n\n\tvar iterationsWithoutImprovement = 0;\n\tvar currentBestCrossings = this.calculateCrossings(model);\n\n\tfor (var i = 0; i < this.maxIterations &&\n\t\titerationsWithoutImprovement < this.maxNoImprovementIterations; i++)\n\t{\n\t\tthis.weightedMedian(i, model);\n\t\tthis.transpose(i, model);\n\t\tvar candidateCrossings = this.calculateCrossings(model);\n\n\t\tif (candidateCrossings < currentBestCrossings)\n\t\t{\n\t\t\tcurrentBestCrossings = candidateCrossings;\n\t\t\titerationsWithoutImprovement = 0;\n\n\t\t\t// Store the current rankings as the best ones\n\t\t\tfor (var j = 0; j < this.nestedBestRanks.length; j++)\n\t\t\t{\n\t\t\t\tvar rank = model.ranks[j];\n\n\t\t\t\tfor (var k = 0; k < rank.length; k++)\n\t\t\t\t{\n\t\t\t\t\tvar cell = rank[k];\n\t\t\t\t\tthis.nestedBestRanks[j][cell.getGeneralPurposeVariable(j)] = cell;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Increase count of iterations where we haven't improved the\n\t\t\t// layout\n\t\t\titerationsWithoutImprovement++;\n\n\t\t\t// Restore the best values to the cells\n\t\t\tfor (var j = 0; j < this.nestedBestRanks.length; j++)\n\t\t\t{\n\t\t\t\tvar rank = model.ranks[j];\n\t\t\t\t\n\t\t\t\tfor (var k = 0; k < rank.length; k++)\n\t\t\t\t{\n\t\t\t\t\tvar cell = rank[k];\n\t\t\t\t\tcell.setGeneralPurposeVariable(j, k);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (currentBestCrossings == 0)\n\t\t{\n\t\t\t// Do nothing further\n\t\t\tbreak;\n\t\t}\n\t}\n\n\t// Store the best rankings but in the model\n\tvar ranks = [];\n\tvar rankList = [];\n\n\tfor (var i = 0; i < model.maxRank + 1; i++)\n\t{\n\t\trankList[i] = [];\n\t\tranks[i] = rankList[i];\n\t}\n\n\tfor (var i = 0; i < this.nestedBestRanks.length; i++)\n\t{\n\t\tfor (var j = 0; j < this.nestedBestRanks[i].length; j++)\n\t\t{\n\t\t\trankList[i].push(this.nestedBestRanks[i][j]);\n\t\t}\n\t}\n\n\tmodel.ranks = ranks;\n};\n\n\n/**\n * Function: calculateCrossings\n * \n * Calculates the total number of edge crossing in the current graph.\n * Returns the current number of edge crossings in the hierarchy graph\n * model in the current candidate layout\n * \n * Parameters:\n * \n * model - the internal model describing the hierarchy\n */\nmxMedianHybridCrossingReduction.prototype.calculateCrossings = function(model)\n{\n\tvar numRanks = model.ranks.length;\n\tvar totalCrossings = 0;\n\n\tfor (var i = 1; i < numRanks; i++)\n\t{\n\t\ttotalCrossings += this.calculateRankCrossing(i, model);\n\t}\n\t\n\treturn totalCrossings;\n};\n\n/**\n * Function: calculateRankCrossing\n * \n * Calculates the number of edges crossings between the specified rank and\n * the rank below it. Returns the number of edges crossings with the rank\n * beneath\n * \n * Parameters:\n * \n * i -  the topmost rank of the pair ( higher rank value )\n * model - the internal model describing the hierarchy\n */\nmxMedianHybridCrossingReduction.prototype.calculateRankCrossing = function(i, model)\n{\n\tvar totalCrossings = 0;\n\tvar rank = model.ranks[i];\n\tvar previousRank = model.ranks[i - 1];\n\n\tvar tmpIndices = [];\n\n\t// Iterate over the top rank and fill in the connection information\n\tfor (var j = 0; j < rank.length; j++)\n\t{\n\t\tvar node = rank[j];\n\t\tvar rankPosition = node.getGeneralPurposeVariable(i);\n\t\tvar connectedCells = node.getPreviousLayerConnectedCells(i);\n\t\tvar nodeIndices = [];\n\n\t\tfor (var k = 0; k < connectedCells.length; k++)\n\t\t{\n\t\t\tvar connectedNode = connectedCells[k];\n\t\t\tvar otherCellRankPosition = connectedNode.getGeneralPurposeVariable(i - 1);\n\t\t\tnodeIndices.push(otherCellRankPosition);\n\t\t}\n\t\t\n\t\tnodeIndices.sort(function(x, y) { return x - y; });\n\t\ttmpIndices[rankPosition] = nodeIndices;\n\t}\n\t\n\tvar indices = [];\n\n\tfor (var j = 0; j < tmpIndices.length; j++)\n\t{\n\t\tindices = indices.concat(tmpIndices[j]);\n\t}\n\n\tvar firstIndex = 1;\n\t\n\twhile (firstIndex < previousRank.length)\n\t{\n\t\tfirstIndex <<= 1;\n\t}\n\n\tvar treeSize = 2 * firstIndex - 1;\n\tfirstIndex -= 1;\n\n\tvar tree = [];\n\t\n\tfor (var j = 0; j < treeSize; ++j)\n\t{\n\t\ttree[j] = 0;\n\t}\n\n\tfor (var j = 0; j < indices.length; j++)\n\t{\n\t\tvar index = indices[j];\n\t    var treeIndex = index + firstIndex;\n\t    ++tree[treeIndex];\n\t    \n\t    while (treeIndex > 0)\n\t    {\n\t    \tif (treeIndex % 2)\n\t    \t{\n\t    \t\ttotalCrossings += tree[treeIndex + 1];\n\t    \t}\n\t      \n\t    \ttreeIndex = (treeIndex - 1) >> 1;\n\t    \t++tree[treeIndex];\n\t    }\n\t}\n\n\treturn totalCrossings;\n};\n\n/**\n * Function: transpose\n * \n * Takes each possible adjacent cell pair on each rank and checks if\n * swapping them around reduces the number of crossing\n * \n * Parameters:\n * \n * mainLoopIteration - the iteration number of the main loop\n * model - the internal model describing the hierarchy\n */\nmxMedianHybridCrossingReduction.prototype.transpose = function(mainLoopIteration, model)\n{\n\tvar improved = true;\n\n\t// Track the number of iterations in case of looping\n\tvar count = 0;\n\tvar maxCount = 10;\n\twhile (improved && count++ < maxCount)\n\t{\n\t\t// On certain iterations allow allow swapping of cell pairs with\n\t\t// equal edge crossings switched or not switched. This help to\n\t\t// nudge a stuck layout into a lower crossing total.\n\t\tvar nudge = mainLoopIteration % 2 == 1 && count % 2 == 1;\n\t\timproved = false;\n\t\t\n\t\tfor (var i = 0; i < model.ranks.length; i++)\n\t\t{\n\t\t\tvar rank = model.ranks[i];\n\t\t\tvar orderedCells = [];\n\t\t\t\n\t\t\tfor (var j = 0; j < rank.length; j++)\n\t\t\t{\n\t\t\t\tvar cell = rank[j];\n\t\t\t\tvar tempRank = cell.getGeneralPurposeVariable(i);\n\t\t\t\t\n\t\t\t\t// FIXME: Workaround to avoid negative tempRanks\n\t\t\t\tif (tempRank < 0)\n\t\t\t\t{\n\t\t\t\t\ttempRank = j;\n\t\t\t\t}\n\t\t\t\torderedCells[tempRank] = cell;\n\t\t\t}\n\t\t\t\n\t\t\tvar leftCellAboveConnections = null;\n\t\t\tvar leftCellBelowConnections = null;\n\t\t\tvar rightCellAboveConnections = null;\n\t\t\tvar rightCellBelowConnections = null;\n\t\t\t\n\t\t\tvar leftAbovePositions = null;\n\t\t\tvar leftBelowPositions = null;\n\t\t\tvar rightAbovePositions = null;\n\t\t\tvar rightBelowPositions = null;\n\t\t\t\n\t\t\tvar leftCell = null;\n\t\t\tvar rightCell = null;\n\n\t\t\tfor (var j = 0; j < (rank.length - 1); j++)\n\t\t\t{\n\t\t\t\t// For each intra-rank adjacent pair of cells\n\t\t\t\t// see if swapping them around would reduce the\n\t\t\t\t// number of edges crossing they cause in total\n\t\t\t\t// On every cell pair except the first on each rank, we\n\t\t\t\t// can save processing using the previous values for the\n\t\t\t\t// right cell on the new left cell\n\t\t\t\tif (j == 0)\n\t\t\t\t{\n\t\t\t\t\tleftCell = orderedCells[j];\n\t\t\t\t\tleftCellAboveConnections = leftCell\n\t\t\t\t\t\t\t.getNextLayerConnectedCells(i);\n\t\t\t\t\tleftCellBelowConnections = leftCell\n\t\t\t\t\t\t\t.getPreviousLayerConnectedCells(i);\n\t\t\t\t\tleftAbovePositions = [];\n\t\t\t\t\tleftBelowPositions = [];\n\t\t\t\t\t\n\t\t\t\t\tfor (var k = 0; k < leftCellAboveConnections.length; k++)\n\t\t\t\t\t{\n\t\t\t\t\t\tleftAbovePositions[k] = leftCellAboveConnections[k].getGeneralPurposeVariable(i + 1);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tfor (var k = 0; k < leftCellBelowConnections.length; k++)\n\t\t\t\t\t{\n\t\t\t\t\t\tleftBelowPositions[k] = leftCellBelowConnections[k].getGeneralPurposeVariable(i - 1);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tleftCellAboveConnections = rightCellAboveConnections;\n\t\t\t\t\tleftCellBelowConnections = rightCellBelowConnections;\n\t\t\t\t\tleftAbovePositions = rightAbovePositions;\n\t\t\t\t\tleftBelowPositions = rightBelowPositions;\n\t\t\t\t\tleftCell = rightCell;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\trightCell = orderedCells[j + 1];\n\t\t\t\trightCellAboveConnections = rightCell\n\t\t\t\t\t\t.getNextLayerConnectedCells(i);\n\t\t\t\trightCellBelowConnections = rightCell\n\t\t\t\t\t\t.getPreviousLayerConnectedCells(i);\n\n\t\t\t\trightAbovePositions = [];\n\t\t\t\trightBelowPositions = [];\n\n\t\t\t\tfor (var k = 0; k < rightCellAboveConnections.length; k++)\n\t\t\t\t{\n\t\t\t\t\trightAbovePositions[k] = rightCellAboveConnections[k].getGeneralPurposeVariable(i + 1);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tfor (var k = 0; k < rightCellBelowConnections.length; k++)\n\t\t\t\t{\n\t\t\t\t\trightBelowPositions[k] = rightCellBelowConnections[k].getGeneralPurposeVariable(i - 1);\n\t\t\t\t}\n\n\t\t\t\tvar totalCurrentCrossings = 0;\n\t\t\t\tvar totalSwitchedCrossings = 0;\n\t\t\t\t\n\t\t\t\tfor (var k = 0; k < leftAbovePositions.length; k++)\n\t\t\t\t{\n\t\t\t\t\tfor (var ik = 0; ik < rightAbovePositions.length; ik++)\n\t\t\t\t\t{\n\t\t\t\t\t\tif (leftAbovePositions[k] > rightAbovePositions[ik])\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\ttotalCurrentCrossings++;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (leftAbovePositions[k] < rightAbovePositions[ik])\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\ttotalSwitchedCrossings++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tfor (var k = 0; k < leftBelowPositions.length; k++)\n\t\t\t\t{\n\t\t\t\t\tfor (var ik = 0; ik < rightBelowPositions.length; ik++)\n\t\t\t\t\t{\n\t\t\t\t\t\tif (leftBelowPositions[k] > rightBelowPositions[ik])\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\ttotalCurrentCrossings++;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (leftBelowPositions[k] < rightBelowPositions[ik])\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\ttotalSwitchedCrossings++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif ((totalSwitchedCrossings < totalCurrentCrossings) ||\n\t\t\t\t\t(totalSwitchedCrossings == totalCurrentCrossings &&\n\t\t\t\t\tnudge))\n\t\t\t\t{\n\t\t\t\t\tvar temp = leftCell.getGeneralPurposeVariable(i);\n\t\t\t\t\tleftCell.setGeneralPurposeVariable(i, rightCell\n\t\t\t\t\t\t\t.getGeneralPurposeVariable(i));\n\t\t\t\t\trightCell.setGeneralPurposeVariable(i, temp);\n\n\t\t\t\t\t// With this pair exchanged we have to switch all of\n\t\t\t\t\t// values for the left cell to the right cell so the\n\t\t\t\t\t// next iteration for this rank uses it as the left\n\t\t\t\t\t// cell again\n\t\t\t\t\trightCellAboveConnections = leftCellAboveConnections;\n\t\t\t\t\trightCellBelowConnections = leftCellBelowConnections;\n\t\t\t\t\trightAbovePositions = leftAbovePositions;\n\t\t\t\t\trightBelowPositions = leftBelowPositions;\n\t\t\t\t\trightCell = leftCell;\n\t\t\t\t\t\n\t\t\t\t\tif (!nudge)\n\t\t\t\t\t{\n\t\t\t\t\t\t// Don't count nudges as improvement or we'll end\n\t\t\t\t\t\t// up stuck in two combinations and not finishing\n\t\t\t\t\t\t// as early as we should\n\t\t\t\t\t\timproved = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n};\n\n/**\n * Function: weightedMedian\n * \n * Sweeps up or down the layout attempting to minimise the median placement\n * of connected cells on adjacent ranks\n * \n * Parameters:\n * \n * iteration - the iteration number of the main loop\n * model - the internal model describing the hierarchy\n */\nmxMedianHybridCrossingReduction.prototype.weightedMedian = function(iteration, model)\n{\n\t// Reverse sweep direction each time through this method\n\tvar downwardSweep = (iteration % 2 == 0);\n\tif (downwardSweep)\n\t{\n\t\tfor (var j = model.maxRank - 1; j >= 0; j--)\n\t\t{\n\t\t\tthis.medianRank(j, downwardSweep);\n\t\t}\n\t}\n\telse\n\t{\n\t\tfor (var j = 1; j < model.maxRank; j++)\n\t\t{\n\t\t\tthis.medianRank(j, downwardSweep);\n\t\t}\n\t}\n};\n\n/**\n * Function: medianRank\n * \n * Attempts to minimise the median placement of connected cells on this rank\n * and one of the adjacent ranks\n * \n * Parameters:\n * \n * rankValue - the layer number of this rank\n * downwardSweep - whether or not this is a downward sweep through the graph\n */\nmxMedianHybridCrossingReduction.prototype.medianRank = function(rankValue, downwardSweep)\n{\n\tvar numCellsForRank = this.nestedBestRanks[rankValue].length;\n\tvar medianValues = [];\n\tvar reservedPositions = [];\n\n\tfor (var i = 0; i < numCellsForRank; i++)\n\t{\n\t\tvar cell = this.nestedBestRanks[rankValue][i];\n\t\tvar sorterEntry = new MedianCellSorter();\n\t\tsorterEntry.cell = cell;\n\n\t\t// Flip whether or not equal medians are flipped on up and down\n\t\t// sweeps\n\t\t// TODO re-implement some kind of nudge\n\t\t// medianValues[i].nudge = !downwardSweep;\n\t\tvar nextLevelConnectedCells;\n\t\t\n\t\tif (downwardSweep)\n\t\t{\n\t\t\tnextLevelConnectedCells = cell\n\t\t\t\t\t.getNextLayerConnectedCells(rankValue);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tnextLevelConnectedCells = cell\n\t\t\t\t\t.getPreviousLayerConnectedCells(rankValue);\n\t\t}\n\t\t\n\t\tvar nextRankValue;\n\t\t\n\t\tif (downwardSweep)\n\t\t{\n\t\t\tnextRankValue = rankValue + 1;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tnextRankValue = rankValue - 1;\n\t\t}\n\n\t\tif (nextLevelConnectedCells != null\n\t\t\t\t&& nextLevelConnectedCells.length != 0)\n\t\t{\n\t\t\tsorterEntry.medianValue = this.medianValue(\n\t\t\t\t\tnextLevelConnectedCells, nextRankValue);\n\t\t\tmedianValues.push(sorterEntry);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Nodes with no adjacent vertices are flagged in the reserved array\n\t\t\t// to indicate they should be left in their current position.\n\t\t\treservedPositions[cell.getGeneralPurposeVariable(rankValue)] = true;\n\t\t}\n\t}\n\t\n\tmedianValues.sort(MedianCellSorter.prototype.compare);\n\t\n\t// Set the new position of each node within the rank using\n\t// its temp variable\n\tfor (var i = 0; i < numCellsForRank; i++)\n\t{\n\t\tif (reservedPositions[i] == null)\n\t\t{\n\t\t\tvar cell = medianValues.shift().cell;\n\t\t\tcell.setGeneralPurposeVariable(rankValue, i);\n\t\t}\n\t}\n};\n\n/**\n * Function: medianValue\n * \n * Calculates the median rank order positioning for the specified cell using\n * the connected cells on the specified rank. Returns the median rank\n * ordering value of the connected cells\n * \n * Parameters:\n * \n * connectedCells - the cells on the specified rank connected to the\n * specified cell\n * rankValue - the rank that the connected cell lie upon\n */\nmxMedianHybridCrossingReduction.prototype.medianValue = function(connectedCells, rankValue)\n{\n\tvar medianValues = [];\n\tvar arrayCount = 0;\n\t\n\tfor (var i = 0; i < connectedCells.length; i++)\n\t{\n\t\tvar cell = connectedCells[i];\n\t\tmedianValues[arrayCount++] = cell.getGeneralPurposeVariable(rankValue);\n\t}\n\n\t// Sort() sorts lexicographically by default (i.e. 11 before 9) so force\n\t// numerical order sort\n\tmedianValues.sort(function(a,b){return a - b;});\n\t\n\tif (arrayCount % 2 == 1)\n\t{\n\t\t// For odd numbers of adjacent vertices return the median\n\t\treturn medianValues[Math.floor(arrayCount / 2)];\n\t}\n\telse if (arrayCount == 2)\n\t{\n\t\treturn ((medianValues[0] + medianValues[1]) / 2.0);\n\t}\n\telse\n\t{\n\t\tvar medianPoint = arrayCount / 2;\n\t\tvar leftMedian = medianValues[medianPoint - 1] - medianValues[0];\n\t\tvar rightMedian = medianValues[arrayCount - 1]\n\t\t\t\t- medianValues[medianPoint];\n\n\t\treturn (medianValues[medianPoint - 1] * rightMedian + medianValues[medianPoint]\n\t\t\t\t* leftMedian)\n\t\t\t\t/ (leftMedian + rightMedian);\n\t}\n};\n\n/**\n * Class: MedianCellSorter\n * \n * A utility class used to track cells whilst sorting occurs on the median\n * values. Does not violate (x.compareTo(y)==0) == (x.equals(y))\n *\n * Constructor: MedianCellSorter\n * \n * Constructs a new median cell sorter.\n */\nfunction MedianCellSorter()\n{\n\t// empty\n};\n\n/**\n * Variable: medianValue\n * \n * The weighted value of the cell stored.\n */\nMedianCellSorter.prototype.medianValue = 0;\n\n/**\n * Variable: cell\n * \n * The cell whose median value is being calculated\n */\nMedianCellSorter.prototype.cell = false;\n\n/**\n * Function: compare\n * \n * Compares two MedianCellSorters.\n */\nMedianCellSorter.prototype.compare = function(a, b)\n{\n\tif (a != null && b != null)\n\t{\n\t\tif (b.medianValue > a.medianValue)\n\t\t{\n\t\t\treturn -1;\n\t\t}\n\t\telse if (b.medianValue < a.medianValue)\n\t\t{\n\t\t\treturn 1;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn 0;\n\t\t}\n\t}\n\telse\n\t{\n\t\treturn 0;\n\t}\n};\n"
  },
  {
    "path": "static/cherry/drawio_demo/src/js/layout/hierarchical/stage/mxMinimumCycleRemover.js",
    "content": "/**\n * Copyright (c) 2006-2015, JGraph Ltd\n * Copyright (c) 2006-2015, Gaudenz Alder\n */\n/**\n * Class: mxMinimumCycleRemover\n * \n * An implementation of the first stage of the Sugiyama layout. Straightforward\n * longest path calculation of layer assignment\n * \n * Constructor: mxMinimumCycleRemover\n *\n * Creates a cycle remover for the given internal model.\n */\nfunction mxMinimumCycleRemover(layout)\n{\n\tthis.layout = layout;\n};\n\n/**\n * Extends mxHierarchicalLayoutStage.\n */\nmxMinimumCycleRemover.prototype = new mxHierarchicalLayoutStage();\nmxMinimumCycleRemover.prototype.constructor = mxMinimumCycleRemover;\n\n/**\n * Variable: layout\n * \n * Reference to the enclosing <mxHierarchicalLayout>.\n */\nmxMinimumCycleRemover.prototype.layout = null;\n\n/**\n * Function: execute\n * \n * Takes the graph detail and configuration information within the facade\n * and creates the resulting laid out graph within that facade for further\n * use.\n */\nmxMinimumCycleRemover.prototype.execute = function(parent)\n{\n\tvar model = this.layout.getModel();\n\tvar seenNodes = new Object();\n\tvar unseenNodesArray = model.vertexMapper.getValues();\n\tvar unseenNodes = new Object();\n\t\n\tfor (var i = 0; i < unseenNodesArray.length; i++)\n\t{\n\t\tunseenNodes[unseenNodesArray[i].id] = unseenNodesArray[i];\n\t}\n\t\n\t// Perform a dfs through the internal model. If a cycle is found,\n\t// reverse it.\n\tvar rootsArray = null;\n\t\n\tif (model.roots != null)\n\t{\n\t\tvar modelRoots = model.roots;\n\t\trootsArray = [];\n\t\t\n\t\tfor (var i = 0; i < modelRoots.length; i++)\n\t\t{\n\t\t\trootsArray[i] = model.vertexMapper.get(modelRoots[i]);\n\t\t}\n\t}\n\n\tmodel.visit(function(parent, node, connectingEdge, layer, seen)\n\t{\n\t\t// Check if the cell is in it's own ancestor list, if so\n\t\t// invert the connecting edge and reverse the target/source\n\t\t// relationship to that edge in the parent and the cell\n\t\tif (node.isAncestor(parent))\n\t\t{\n\t\t\tconnectingEdge.invert();\n\t\t\tmxUtils.remove(connectingEdge, parent.connectsAsSource);\n\t\t\tparent.connectsAsTarget.push(connectingEdge);\n\t\t\tmxUtils.remove(connectingEdge, node.connectsAsTarget);\n\t\t\tnode.connectsAsSource.push(connectingEdge);\n\t\t}\n\t\t\n\t\tseenNodes[node.id] = node;\n\t\tdelete unseenNodes[node.id];\n\t}, rootsArray, true, null);\n\n\t// If there are any nodes that should be nodes that the dfs can miss\n\t// these need to be processed with the dfs and the roots assigned\n\t// correctly to form a correct internal model\n\tvar seenNodesCopy = mxUtils.clone(seenNodes, null, true);\n\n\t// Pick a random cell and dfs from it\n\tmodel.visit(function(parent, node, connectingEdge, layer, seen)\n\t{\n\t\t// Check if the cell is in it's own ancestor list, if so\n\t\t// invert the connecting edge and reverse the target/source\n\t\t// relationship to that edge in the parent and the cell\n\t\tif (node.isAncestor(parent))\n\t\t{\n\t\t\tconnectingEdge.invert();\n\t\t\tmxUtils.remove(connectingEdge, parent.connectsAsSource);\n\t\t\tnode.connectsAsSource.push(connectingEdge);\n\t\t\tparent.connectsAsTarget.push(connectingEdge);\n\t\t\tmxUtils.remove(connectingEdge, node.connectsAsTarget);\n\t\t}\n\t\t\n\t\tseenNodes[node.id] = node;\n\t\tdelete unseenNodes[node.id];\n\t}, unseenNodes, true, seenNodesCopy);\n};\n"
  },
  {
    "path": "static/cherry/drawio_demo/src/js/layout/hierarchical/stage/mxSwimlaneOrdering.js",
    "content": "/**\n * Copyright (c) 2006-2015, JGraph Ltd\n * Copyright (c) 2006-2015, Gaudenz Alder\n */\n/**\n * Class: mxSwimlaneOrdering\n * \n * An implementation of the first stage of the Sugiyama layout. Straightforward\n * longest path calculation of layer assignment\n * \n * Constructor: mxSwimlaneOrdering\n *\n * Creates a cycle remover for the given internal model.\n */\nfunction mxSwimlaneOrdering(layout)\n{\n\tthis.layout = layout;\n};\n\n/**\n * Extends mxHierarchicalLayoutStage.\n */\nmxSwimlaneOrdering.prototype = new mxHierarchicalLayoutStage();\nmxSwimlaneOrdering.prototype.constructor = mxSwimlaneOrdering;\n\n/**\n * Variable: layout\n * \n * Reference to the enclosing <mxHierarchicalLayout>.\n */\nmxSwimlaneOrdering.prototype.layout = null;\n\n/**\n * Function: execute\n * \n * Takes the graph detail and configuration information within the facade\n * and creates the resulting laid out graph within that facade for further\n * use.\n */\nmxSwimlaneOrdering.prototype.execute = function(parent)\n{\n\tvar model = this.layout.getModel();\n\tvar seenNodes = new Object();\n\tvar unseenNodes = mxUtils.clone(model.vertexMapper, null, true);\n\t\n\t// Perform a dfs through the internal model. If a cycle is found,\n\t// reverse it.\n\tvar rootsArray = null;\n\t\n\tif (model.roots != null)\n\t{\n\t\tvar modelRoots = model.roots;\n\t\trootsArray = [];\n\t\t\n\t\tfor (var i = 0; i < modelRoots.length; i++)\n\t\t{\n\t\t\tvar nodeId = mxCellPath.create(modelRoots[i]);\n\t\t\trootsArray[i] = model.vertexMapper.get(modelRoots[i]);\n\t\t}\n\t}\n\n\tmodel.visit(function(parent, node, connectingEdge, layer, seen)\n\t{\n\t\t// Check if the cell is in it's own ancestor list, if so\n\t\t// invert the connecting edge and reverse the target/source\n\t\t// relationship to that edge in the parent and the cell\n\t\t// Ancestor hashes only line up within a swimlane\n\t\tvar isAncestor = parent != null && parent.swimlaneIndex == node.swimlaneIndex && node.isAncestor(parent);\n\n\t\t// If the source->target swimlane indices go from higher to\n\t\t// lower, the edge is reverse\n\t\tvar reversedOverSwimlane = parent != null && connectingEdge != null &&\n\t\t\t\t\t\tparent.swimlaneIndex < node.swimlaneIndex && connectingEdge.source == node;\n\n\t\tif (isAncestor)\n\t\t{\n\t\t\tconnectingEdge.invert();\n\t\t\tmxUtils.remove(connectingEdge, parent.connectsAsSource);\n\t\t\tnode.connectsAsSource.push(connectingEdge);\n\t\t\tparent.connectsAsTarget.push(connectingEdge);\n\t\t\tmxUtils.remove(connectingEdge, node.connectsAsTarget);\n\t\t}\n\t\telse if (reversedOverSwimlane)\n\t\t{\n\t\t\tconnectingEdge.invert();\n\t\t\tmxUtils.remove(connectingEdge, parent.connectsAsTarget);\n\t\t\tnode.connectsAsTarget.push(connectingEdge);\n\t\t\tparent.connectsAsSource.push(connectingEdge);\n\t\t\tmxUtils.remove(connectingEdge, node.connectsAsSource);\n\t\t}\n\t\t\n\t\tvar cellId = mxCellPath.create(node.cell);\n\t\tseenNodes[cellId] = node;\n\t\tdelete unseenNodes[cellId];\n\t}, rootsArray, true, null);\n};\n"
  },
  {
    "path": "static/cherry/drawio_demo/src/js/layout/mxCircleLayout.js",
    "content": "/**\n * Copyright (c) 2006-2015, JGraph Ltd\n * Copyright (c) 2006-2015, Gaudenz Alder\n */\n/**\n * Class: mxCircleLayout\n * \n * Extends <mxGraphLayout> to implement a circluar layout for a given radius.\n * The vertices do not need to be connected for this layout to work and all\n * connections between vertices are not taken into account.\n * \n * Example:\n * \n * (code)\n * var layout = new mxCircleLayout(graph);\n * layout.execute(graph.getDefaultParent());\n * (end)\n * \n * Constructor: mxCircleLayout\n *\n * Constructs a new circular layout for the specified radius.\n *\n * Arguments:\n * \n * graph - <mxGraph> that contains the cells.\n * radius - Optional radius as an int. Default is 100.\n */\nfunction mxCircleLayout(graph, radius)\n{\n\tmxGraphLayout.call(this, graph);\n\tthis.radius = (radius != null) ? radius : 100;\n};\n\n/**\n * Extends mxGraphLayout.\n */\nmxCircleLayout.prototype = new mxGraphLayout();\nmxCircleLayout.prototype.constructor = mxCircleLayout;\n\n/**\n * Variable: radius\n * \n * Integer specifying the size of the radius. Default is 100.\n */\nmxCircleLayout.prototype.radius = null;\n\n/**\n * Variable: moveCircle\n * \n * Boolean specifying if the circle should be moved to the top,\n * left corner specified by <x0> and <y0>. Default is false.\n */\nmxCircleLayout.prototype.moveCircle = false;\n\n/**\n * Variable: x0\n * \n * Integer specifying the left coordinate of the circle.\n * Default is 0.\n */\nmxCircleLayout.prototype.x0 = 0;\n\n/**\n * Variable: y0\n * \n * Integer specifying the top coordinate of the circle.\n * Default is 0.\n */\nmxCircleLayout.prototype.y0 = 0;\n\n/**\n * Variable: resetEdges\n * \n * Specifies if all edge points of traversed edges should be removed.\n * Default is true.\n */\nmxCircleLayout.prototype.resetEdges = true;\n\n/**\n * Variable: disableEdgeStyle\n * \n * Specifies if the STYLE_NOEDGESTYLE flag should be set on edges that are\n * modified by the result. Default is true.\n */\nmxCircleLayout.prototype.disableEdgeStyle = true;\n\n/**\n * Function: execute\n * \n * Implements <mxGraphLayout.execute>.\n */\nmxCircleLayout.prototype.execute = function(parent)\n{\n\tvar model = this.graph.getModel();\n\n\t// Moves the vertices to build a circle. Makes sure the\n\t// radius is large enough for the vertices to not\n\t// overlap\n\tmodel.beginUpdate();\n\ttry\n\t{\n\t\t// Gets all vertices inside the parent and finds\n\t\t// the maximum dimension of the largest vertex\n\t\tvar max = 0;\n\t\tvar top = null;\n\t\tvar left = null;\n\t\tvar vertices = [];\n\t\tvar childCount = model.getChildCount(parent);\n\t\t\n\t\tfor (var i = 0; i < childCount; i++)\n\t\t{\n\t\t\tvar cell = model.getChildAt(parent, i);\n\t\t\t\n\t\t\tif (!this.isVertexIgnored(cell))\n\t\t\t{\n\t\t\t\tvertices.push(cell);\n\t\t\t\tvar bounds = this.getVertexBounds(cell);\n\t\t\t\t\n\t\t\t\tif (top == null)\n\t\t\t\t{\n\t\t\t\t\ttop = bounds.y;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\ttop = Math.min(top, bounds.y);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (left == null)\n\t\t\t\t{\n\t\t\t\t\tleft = bounds.x;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tleft = Math.min(left, bounds.x);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tmax = Math.max(max, Math.max(bounds.width, bounds.height));\n\t\t\t}\n\t\t\telse if (!this.isEdgeIgnored(cell))\n\t\t\t{\n\t\t\t\t// Resets the points on the traversed edge\n\t\t\t\tif (this.resetEdges)\n\t\t\t\t{\n\t\t\t\t\tthis.graph.resetEdge(cell);\n\t\t\t\t}\n\n\t\t\t    if (this.disableEdgeStyle)\n\t\t\t    {\n\t\t\t    \t\tthis.setEdgeStyleEnabled(cell, false);\n\t\t\t    }\n\t\t\t}\n\t\t}\n\t\t\n\t\tvar r = this.getRadius(vertices.length, max);\n\n\t\t// Moves the circle to the specified origin\n\t\tif (this.moveCircle)\n\t\t{\n\t\t\tleft = this.x0;\n\t\t\ttop = this.y0;\n\t\t}\n\t\t\n\t\tthis.circle(vertices, r, left, top);\n\t}\n\tfinally\n\t{\n\t\tmodel.endUpdate();\n\t}\n};\n\n/**\n * Function: getRadius\n * \n * Returns the radius to be used for the given vertex count. Max is the maximum\n * width or height of all vertices in the layout.\n */\nmxCircleLayout.prototype.getRadius = function(count, max)\n{\n\treturn Math.max(count * max / Math.PI, this.radius);\n};\n\n/**\n * Function: circle\n * \n * Executes the circular layout for the specified array\n * of vertices and the given radius. This is called from\n * <execute>.\n */\nmxCircleLayout.prototype.circle = function(vertices, r, left, top)\n{\n\tvar vertexCount = vertices.length;\n\tvar phi = 2 * Math.PI / vertexCount;\n\t\n\tfor (var i = 0; i < vertexCount; i++)\n\t{\n\t\tif (this.isVertexMovable(vertices[i]))\n\t\t{\n\t\t\tthis.setVertexLocation(vertices[i],\n\t\t\t\tMath.round(left + r + r * Math.sin(i * phi)),\n\t\t\t\tMath.round(top + r + r * Math.cos(i * phi)));\n\t\t}\n\t}\n};\n"
  },
  {
    "path": "static/cherry/drawio_demo/src/js/layout/mxCompactTreeLayout.js",
    "content": "/**\n * Copyright (c) 2006-2018, JGraph Ltd\n * Copyright (c) 2006-2018, Gaudenz Alder\n */\n/**\n * Class: mxCompactTreeLayout\n * \n * Extends <mxGraphLayout> to implement a compact tree (Moen) algorithm. This\n * layout is suitable for graphs that have no cycles (trees). Vertices that are\n * not connected to the tree will be ignored by this layout.\n * \n * Example:\n * \n * (code)\n * var layout = new mxCompactTreeLayout(graph);\n * layout.execute(graph.getDefaultParent());\n * (end)\n * \n * Constructor: mxCompactTreeLayout\n * \n * Constructs a new compact tree layout for the specified graph\n * and orientation.\n */\nfunction mxCompactTreeLayout(graph, horizontal, invert)\n{\n\tmxGraphLayout.call(this, graph);\n\tthis.horizontal = (horizontal != null) ? horizontal : true;\n\tthis.invert = (invert != null) ? invert : false;\n};\n\n/**\n * Extends mxGraphLayout.\n */\nmxCompactTreeLayout.prototype = new mxGraphLayout();\nmxCompactTreeLayout.prototype.constructor = mxCompactTreeLayout;\n\n/**\n * Variable: horizontal\n *\n * Specifies the orientation of the layout. Default is true.\n */\nmxCompactTreeLayout.prototype.horizontal = null;\t \n\n/**\n * Variable: invert\n *\n * Specifies if edge directions should be inverted. Default is false.\n */\nmxCompactTreeLayout.prototype.invert = null;\t \n\n/**\n * Variable: resizeParent\n * \n * If the parents should be resized to match the width/height of the\n * children. Default is true.\n */\nmxCompactTreeLayout.prototype.resizeParent = true;\n\n/**\n * Variable: maintainParentLocation\n * \n * Specifies if the parent location should be maintained, so that the\n * top, left corner stays the same before and after execution of\n * the layout. Default is false for backwards compatibility.\n */\nmxCompactTreeLayout.prototype.maintainParentLocation = false;\n\n/**\n * Variable: groupPadding\n * \n * Padding added to resized parents. Default is 10.\n */\nmxCompactTreeLayout.prototype.groupPadding = 10;\n\n/**\n * Variable: groupPaddingTop\n * \n * Top padding added to resized parents. Default is 0.\n */\nmxCompactTreeLayout.prototype.groupPaddingTop = 0;\n\n/**\n * Variable: groupPaddingRight\n * \n * Right padding added to resized parents. Default is 0.\n */\nmxCompactTreeLayout.prototype.groupPaddingRight = 0;\n\n/**\n * Variable: groupPaddingBottom\n * \n * Bottom padding added to resized parents. Default is 0.\n */\nmxCompactTreeLayout.prototype.groupPaddingBottom = 0;\n\n/**\n * Variable: groupPaddingLeft\n * \n * Left padding added to resized parents. Default is 0.\n */\nmxCompactTreeLayout.prototype.groupPaddingLeft = 0;\n\n/**\n * Variable: parentsChanged\n *\n * A set of the parents that need updating based on children\n * process as part of the layout.\n */\nmxCompactTreeLayout.prototype.parentsChanged = null;\n\n/**\n * Variable: moveTree\n * \n * Specifies if the tree should be moved to the top, left corner\n * if it is inside a top-level layer. Default is false.\n */\nmxCompactTreeLayout.prototype.moveTree = false;\n\n/**\n * Variable: visited\n * \n * Specifies if the tree should be moved to the top, left corner\n * if it is inside a top-level layer. Default is false.\n */\nmxCompactTreeLayout.prototype.visited = null;\n\n/**\n * Variable: levelDistance\n *\n * Holds the levelDistance. Default is 10.\n */\nmxCompactTreeLayout.prototype.levelDistance = 10;\n\n/**\n * Variable: nodeDistance\n *\n * Holds the nodeDistance. Default is 20.\n */\nmxCompactTreeLayout.prototype.nodeDistance = 20;\n\n/**\n * Variable: resetEdges\n * \n * Specifies if all edge points of traversed edges should be removed.\n * Default is true.\n */\nmxCompactTreeLayout.prototype.resetEdges = true;\n\n/**\n * Variable: prefHozEdgeSep\n * \n * The preferred horizontal distance between edges exiting a vertex.\n */\nmxCompactTreeLayout.prototype.prefHozEdgeSep = 5;\n\n/**\n * Variable: prefVertEdgeOff\n * \n * The preferred vertical offset between edges exiting a vertex.\n */\nmxCompactTreeLayout.prototype.prefVertEdgeOff = 4;\n\n/**\n * Variable: minEdgeJetty\n * \n * The minimum distance for an edge jetty from a vertex.\n */\nmxCompactTreeLayout.prototype.minEdgeJetty = 8;\n\n/**\n * Variable: channelBuffer\n * \n * The size of the vertical buffer in the center of inter-rank channels\n * where edge control points should not be placed.\n */\nmxCompactTreeLayout.prototype.channelBuffer = 4;\n\n/**\n * Variable: edgeRouting\n * \n * Whether or not to apply the internal tree edge routing.\n */\nmxCompactTreeLayout.prototype.edgeRouting = true;\n\n/**\n * Variable: sortEdges\n * \n * Specifies if edges should be sorted according to the order of their\n * opposite terminal cell in the model.\n */\nmxCompactTreeLayout.prototype.sortEdges = false;\n\n/**\n * Variable: alignRanks\n * \n * Whether or not the tops of cells in each rank should be aligned\n * across the rank\n */\nmxCompactTreeLayout.prototype.alignRanks = false;\n\n/**\n * Variable: maxRankHeight\n * \n * An array of the maximum height of cells (relative to the layout direction)\n * per rank\n */\nmxCompactTreeLayout.prototype.maxRankHeight = null;\n\n/**\n * Variable: root\n * \n * The cell to use as the root of the tree\n */\nmxCompactTreeLayout.prototype.root = null;\n\n/**\n * Variable: node\n * \n * The internal node representation of the root cell. Do not set directly\n * , this value is only exposed to assist with post-processing functionality\n */\nmxCompactTreeLayout.prototype.node = null;\n\n/**\n * Function: isVertexIgnored\n * \n * Returns a boolean indicating if the given <mxCell> should be ignored as a\n * vertex. This returns true if the cell has no connections.\n * \n * Parameters:\n * \n * vertex - <mxCell> whose ignored state should be returned.\n */\nmxCompactTreeLayout.prototype.isVertexIgnored = function(vertex)\n{\n\treturn mxGraphLayout.prototype.isVertexIgnored.apply(this, arguments) ||\n\t\tthis.graph.getConnections(vertex).length == 0;\n};\n\n/**\n * Function: isHorizontal\n * \n * Returns <horizontal>.\n */\nmxCompactTreeLayout.prototype.isHorizontal = function()\n{\n\treturn this.horizontal;\n};\n\n/**\n * Function: execute\n * \n * Implements <mxGraphLayout.execute>.\n * \n * If the parent has any connected edges, then it is used as the root of\n * the tree. Else, <mxGraph.findTreeRoots> will be used to find a suitable\n * root node within the set of children of the given parent.\n * \n * Parameters:\n * \n * parent - <mxCell> whose children should be laid out.\n * root - Optional <mxCell> that will be used as the root of the tree.\n * Overrides <root> if specified.\n */\nmxCompactTreeLayout.prototype.execute = function(parent, root)\n{\n\tthis.parent = parent;\n\tvar model = this.graph.getModel();\n\n\tif (root == null)\n\t{\n\t\t// Takes the parent as the root if it has outgoing edges\n\t\tif (this.graph.getEdges(parent, model.getParent(parent),\n\t\t\tthis.invert, !this.invert, false).length > 0)\n\t\t{\n\t\t\tthis.root = parent;\n\t\t}\n\t\t\n\t\t// Tries to find a suitable root in the parent's\n\t\t// children\n\t\telse\n\t\t{\n\t\t\tvar roots = this.graph.findTreeRoots(parent, true, this.invert);\n\t\t\t\n\t\t\tif (roots.length > 0)\n\t\t\t{\n\t\t\t\tfor (var i = 0; i < roots.length; i++)\n\t\t\t\t{\n\t\t\t\t\tif (!this.isVertexIgnored(roots[i]) &&\n\t\t\t\t\t\tthis.graph.getEdges(roots[i], null,\n\t\t\t\t\t\t\tthis.invert, !this.invert, false).length > 0)\n\t\t\t\t\t{\n\t\t\t\t\t\tthis.root = roots[i];\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\telse\n\t{\n\t\tthis.root = root;\n\t}\n\t\n\tif (this.root != null)\n\t{\n\t\tif (this.resizeParent)\n\t\t{\n\t\t\tthis.parentsChanged = new Object();\n\t\t}\n\t\telse\n\t\t{\n\t\t\tthis.parentsChanged = null;\n\t\t}\n\n\t\t//  Maintaining parent location\n\t\tthis.parentX = null;\n\t\tthis.parentY = null;\n\t\t\n\t\tif (parent != this.root && model.isVertex(parent) != null && this.maintainParentLocation)\n\t\t{\n\t\t\tvar geo = this.graph.getCellGeometry(parent);\n\t\t\t\n\t\t\tif (geo != null)\n\t\t\t{\n\t\t\t\tthis.parentX = geo.x;\n\t\t\t\tthis.parentY = geo.y;\n\t\t\t}\n\t\t}\n\t\t\n\t\tmodel.beginUpdate();\n\t\t\n\t\ttry\n\t\t{\n\t\t\tthis.visited = new Object();\n\t\t\tthis.node = this.dfs(this.root, parent);\n\t\t\t\n\t\t\tif (this.alignRanks)\n\t\t\t{\n\t\t\t\tthis.maxRankHeight = [];\n\t\t\t\tthis.findRankHeights(this.node, 0);\n\t\t\t\tthis.setCellHeights(this.node, 0);\n\t\t\t}\n\t\t\t\n\t\t\tif (this.node != null)\n\t\t\t{\n\t\t\t\tthis.layout(this.node);\n\t\t\t\tvar x0 = this.graph.gridSize;\n\t\t\t\tvar y0 = x0;\n\t\t\t\t\n\t\t\t\tif (!this.moveTree)\n\t\t\t\t{\n\t\t\t\t\tvar g = this.getVertexBounds(this.root);\n\t\t\t\t\t\n\t\t\t\t\tif (g != null)\n\t\t\t\t\t{\n\t\t\t\t\t\tx0 = g.x;\n\t\t\t\t\t\ty0 = g.y;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tvar bounds = null;\n\t\t\t\t\n\t\t\t\tif (this.isHorizontal())\n\t\t\t\t{\n\t\t\t\t\tbounds = this.horizontalLayout(this.node, x0, y0);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tbounds = this.verticalLayout(this.node, null, x0, y0);\n\t\t\t\t}\n\n\t\t\t\tif (bounds != null)\n\t\t\t\t{\n\t\t\t\t\tvar dx = 0;\n\t\t\t\t\tvar dy = 0;\n\n\t\t\t\t\tif (bounds.x < 0)\n\t\t\t\t\t{\n\t\t\t\t\t\tdx = Math.abs(x0 - bounds.x);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (bounds.y < 0)\n\t\t\t\t\t{\n\t\t\t\t\t\tdy = Math.abs(y0 - bounds.y);\t\n\t\t\t\t\t}\n\n\t\t\t\t\tif (dx != 0 || dy != 0)\n\t\t\t\t\t{\n\t\t\t\t\t\tthis.moveNode(this.node, dx, dy);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif (this.resizeParent)\n\t\t\t\t\t{\n\t\t\t\t\t\tthis.adjustParents();\n\t\t\t\t\t}\n\n\t\t\t\t\tif (this.edgeRouting)\n\t\t\t\t\t{\n\t\t\t\t\t\t// Iterate through all edges setting their positions\n\t\t\t\t\t\tthis.localEdgeProcessing(this.node);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// Maintaining parent location\n\t\t\t\tif (this.parentX != null && this.parentY != null)\n\t\t\t\t{\n\t\t\t\t\tvar geo = this.graph.getCellGeometry(parent);\n\t\t\t\t\t\n\t\t\t\t\tif (geo != null)\n\t\t\t\t\t{\n\t\t\t\t\t\tgeo = geo.clone();\n\t\t\t\t\t\tgeo.x = this.parentX;\n\t\t\t\t\t\tgeo.y = this.parentY;\n\t\t\t\t\t\tmodel.setGeometry(parent, geo);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tfinally\n\t\t{\n\t\t\tmodel.endUpdate();\n\t\t}\n\t}\n};\n\n/**\n * Function: moveNode\n * \n * Moves the specified node and all of its children by the given amount.\n */\nmxCompactTreeLayout.prototype.moveNode = function(node, dx, dy)\n{\n\tnode.x += dx;\n\tnode.y += dy;\n\tthis.apply(node);\n\t\n\tvar child = node.child;\n\t\n\twhile (child != null)\n\t{\n\t\tthis.moveNode(child, dx, dy);\n\t\tchild = child.next;\n\t}\n};\n\n\n/**\n * Function: sortOutgoingEdges\n * \n * Called if <sortEdges> is true to sort the array of outgoing edges in place.\n */\nmxCompactTreeLayout.prototype.sortOutgoingEdges = function(source, edges)\n{\n\tvar lookup = new mxDictionary();\n\t\n\tedges.sort(function(e1, e2)\n\t{\n\t\tvar end1 = e1.getTerminal(e1.getTerminal(false) == source);\n\t\tvar p1 = lookup.get(end1);\n\t\t\n\t\tif (p1 == null)\n\t\t{\n\t\t\tp1 = mxCellPath.create(end1).split(mxCellPath.PATH_SEPARATOR);\n\t\t\tlookup.put(end1, p1);\n\t\t}\n\n\t\tvar end2 = e2.getTerminal(e2.getTerminal(false) == source);\n\t\tvar p2 = lookup.get(end2);\n\t\t\n\t\tif (p2 == null)\n\t\t{\n\t\t\tp2 = mxCellPath.create(end2).split(mxCellPath.PATH_SEPARATOR);\n\t\t\tlookup.put(end2, p2);\n\t\t}\n\n\t\treturn mxCellPath.compare(p1, p2);\n\t});\n};\n\n/**\n * Function: findRankHeights\n * \n * Stores the maximum height (relative to the layout\n * direction) of cells in each rank\n */\nmxCompactTreeLayout.prototype.findRankHeights = function(node, rank)\n{\n\tif (this.maxRankHeight[rank] == null || this.maxRankHeight[rank] < node.height)\n\t{\n\t\tthis.maxRankHeight[rank] = node.height;\n\t}\n\n\tvar child = node.child;\n\t\n\twhile (child != null)\n\t{\n\t\tthis.findRankHeights(child, rank + 1);\n\t\tchild = child.next;\n\t}\n};\n\n/**\n * Function: setCellHeights\n * \n * Set the cells heights (relative to the layout\n * direction) when the tops of each rank are to be aligned\n */\nmxCompactTreeLayout.prototype.setCellHeights = function(node, rank)\n{\n\tif (this.maxRankHeight[rank] != null && this.maxRankHeight[rank] > node.height)\n\t{\n\t\tnode.height = this.maxRankHeight[rank];\n\t}\n\n\tvar child = node.child;\n\t\n\twhile (child != null)\n\t{\n\t\tthis.setCellHeights(child, rank + 1);\n\t\tchild = child.next;\n\t}\n};\n\n/**\n * Function: dfs\n * \n * Does a depth first search starting at the specified cell.\n * Makes sure the specified parent is never left by the\n * algorithm.\n */\nmxCompactTreeLayout.prototype.dfs = function(cell, parent)\n{\n\tvar id = mxCellPath.create(cell);\n\tvar node = null;\n\t\n\tif (cell != null && this.visited[id] == null && !this.isVertexIgnored(cell))\n\t{\n\t\tthis.visited[id] = cell;\n\t\tnode = this.createNode(cell);\n\n\t\tvar model = this.graph.getModel();\n\t\tvar prev = null;\n\t\tvar out = this.graph.getEdges(cell, parent, this.invert, !this.invert, false, true);\n\t\tvar view = this.graph.getView();\n\t\t\n\t\tif (this.sortEdges)\n\t\t{\n\t\t\tthis.sortOutgoingEdges(cell, out);\n\t\t}\n\n\t\tfor (var i = 0; i < out.length; i++)\n\t\t{\n\t\t\tvar edge = out[i];\n\t\t\t\n\t\t\tif (!this.isEdgeIgnored(edge))\n\t\t\t{\n\t\t\t\t// Resets the points on the traversed edge\n\t\t\t\tif (this.resetEdges)\n\t\t\t\t{\n\t\t\t\t\tthis.setEdgePoints(edge, null);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (this.edgeRouting)\n\t\t\t\t{\n\t\t\t\t\tthis.setEdgeStyleEnabled(edge, false);\n\t\t\t\t\tthis.setEdgePoints(edge, null);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// Checks if terminal in same swimlane\n\t\t\t\tvar state = view.getState(edge);\n\t\t\t\tvar target = (state != null) ? state.getVisibleTerminal(this.invert) : view.getVisibleTerminal(edge, this.invert);\n\t\t\t\tvar tmp = this.dfs(target, parent);\n\t\t\t\t\n\t\t\t\tif (tmp != null && model.getGeometry(target) != null)\n\t\t\t\t{\n\t\t\t\t\tif (prev == null)\n\t\t\t\t\t{\n\t\t\t\t\t\tnode.child = tmp;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tprev.next = tmp;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tprev = tmp;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t\n\treturn node;\n};\n\n/**\n * Function: layout\n * \n * Starts the actual compact tree layout algorithm\n * at the given node.\n */\nmxCompactTreeLayout.prototype.layout = function(node)\n{\n\tif (node != null)\n\t{\n\t\tvar child = node.child;\n\t\t\n\t\twhile (child != null)\n\t\t{\n\t\t\tthis.layout(child);\n\t\t\tchild = child.next;\n\t\t}\n\t\t\n\t\tif (node.child != null)\n\t\t{\n\t\t\tthis.attachParent(node, this.join(node));\n\t\t}\n\t\telse\n\t\t{\n\t\t\tthis.layoutLeaf(node);\n\t\t}\n\t}\n};\n\n/**\n * Function: horizontalLayout\n */\nmxCompactTreeLayout.prototype.horizontalLayout = function(node, x0, y0, bounds)\n{\n\tnode.x += x0 + node.offsetX;\n\tnode.y += y0 + node.offsetY;\n\tbounds = this.apply(node, bounds);\n\tvar child = node.child;\n\t\n\tif (child != null)\n\t{\n\t\tbounds = this.horizontalLayout(child, node.x, node.y, bounds);\n\t\tvar siblingOffset = node.y + child.offsetY;\n\t\tvar s = child.next;\n\t\t\n\t\twhile (s != null)\n\t\t{\n\t\t\tbounds = this.horizontalLayout(s, node.x + child.offsetX, siblingOffset, bounds);\n\t\t\tsiblingOffset += s.offsetY;\n\t\t\ts = s.next;\n\t\t}\n\t}\n\t\n\treturn bounds;\n};\n\t\n/**\n * Function: verticalLayout\n */\nmxCompactTreeLayout.prototype.verticalLayout = function(node, parent, x0, y0, bounds)\n{\n\tnode.x += x0 + node.offsetY;\n\tnode.y += y0 + node.offsetX;\n\tbounds = this.apply(node, bounds);\n\tvar child = node.child;\n\t\n\tif (child != null)\n\t{\n\t\tbounds = this.verticalLayout(child, node, node.x, node.y, bounds);\n\t\tvar siblingOffset = node.x + child.offsetY;\n\t\tvar s = child.next;\n\t\t\n\t\twhile (s != null)\n\t\t{\n\t\t\tbounds = this.verticalLayout(s, node, siblingOffset, node.y + child.offsetX, bounds);\n\t\t\tsiblingOffset += s.offsetY;\n\t\t\ts = s.next;\n\t\t}\n\t}\n\t\n\treturn bounds;\n};\n\n/**\n * Function: attachParent\n */\nmxCompactTreeLayout.prototype.attachParent = function(node, height)\n{\n\tvar x = this.nodeDistance + this.levelDistance;\n\tvar y2 = (height - node.width) / 2 - this.nodeDistance;\n\tvar y1 = y2 + node.width + 2 * this.nodeDistance - height;\n\t\n\tnode.child.offsetX = x + node.height;\n\tnode.child.offsetY = y1;\n\t\n\tnode.contour.upperHead = this.createLine(node.height, 0,\n\t\tthis.createLine(x, y1, node.contour.upperHead));\n\tnode.contour.lowerHead = this.createLine(node.height, 0,\n\t\tthis.createLine(x, y2, node.contour.lowerHead));\n};\n\n/**\n * Function: layoutLeaf\n */\nmxCompactTreeLayout.prototype.layoutLeaf = function(node)\n{\n\tvar dist = 2 * this.nodeDistance;\n\t\n\tnode.contour.upperTail = this.createLine(\n\t\tnode.height + dist, 0);\n\tnode.contour.upperHead = node.contour.upperTail;\n\tnode.contour.lowerTail = this.createLine(\n\t\t0, -node.width - dist);\n\tnode.contour.lowerHead = this.createLine(\n\t\tnode.height + dist, 0, node.contour.lowerTail);\n};\n\n/**\n * Function: join\n */\nmxCompactTreeLayout.prototype.join = function(node)\n{\n\tvar dist = 2 * this.nodeDistance;\n\t\n\tvar child = node.child;\n\tnode.contour = child.contour;\n\tvar h = child.width + dist;\n\tvar sum = h;\n\tchild = child.next;\n\t\n\twhile (child != null)\n\t{\n\t\tvar d = this.merge(node.contour, child.contour);\n\t\tchild.offsetY = d + h;\n\t\tchild.offsetX = 0;\n\t\th = child.width + dist;\n\t\tsum += d + h;\n\t\tchild = child.next;\n\t}\n\t\n\treturn sum;\n};\n\n/**\n * Function: merge\n */\nmxCompactTreeLayout.prototype.merge = function(p1, p2)\n{\n\tvar x = 0;\n\tvar y = 0;\n\tvar total = 0;\n\t\n\tvar upper = p1.lowerHead;\n\tvar lower = p2.upperHead;\n\t\n\twhile (lower != null && upper != null)\n\t{\n\t\tvar d = this.offset(x, y, lower.dx, lower.dy,\n\t\t\tupper.dx, upper.dy);\n\t\ty += d;\n\t\ttotal += d;\n\t\t\n\t\tif (x + lower.dx <= upper.dx)\n\t\t{\n\t\t\tx += lower.dx;\n\t\t\ty += lower.dy;\n\t\t\tlower = lower.next;\n\t\t}\n\t\telse\n\t\t{\t\t\t\t\n\t\t\tx -= upper.dx;\n\t\t\ty -= upper.dy;\n\t\t\tupper = upper.next;\n\t\t}\n\t}\n\t\n\tif (lower != null)\n\t{\n\t\tvar b = this.bridge(p1.upperTail, 0, 0, lower, x, y);\n\t\tp1.upperTail = (b.next != null) ? p2.upperTail : b;\n\t\tp1.lowerTail = p2.lowerTail;\n\t}\n\telse\n\t{\n\t\tvar b = this.bridge(p2.lowerTail, x, y, upper, 0, 0);\n\t\t\n\t\tif (b.next == null)\n\t\t{\n\t\t\tp1.lowerTail = b;\n\t\t}\n\t}\n\t\n\tp1.lowerHead = p2.lowerHead;\n\t\n\treturn total;\n};\n\n/**\n * Function: offset\n */\nmxCompactTreeLayout.prototype.offset = function(p1, p2, a1, a2, b1, b2)\n{\n\tvar d = 0;\n\t\n\tif (b1 <= p1 || p1 + a1 <= 0)\n\t{\n\t\treturn 0;\n\t}\n\n\tvar t = b1 * a2 - a1 * b2;\n\t\n\tif (t > 0)\n\t{\n\t\tif (p1 < 0)\n\t\t{\n\t\t\tvar s = p1 * a2;\n\t\t\td = s / a1 - p2;\n\t\t}\n\t\telse if (p1 > 0)\n\t\t{\n\t\t\tvar s = p1 * b2;\n\t\t\td = s / b1 - p2;\n\t\t}\n\t\telse\n\t\t{\n\t\t\td = -p2;\n\t\t}\n\t}\n\telse if (b1 < p1 + a1)\n\t{\n\t\tvar s = (b1 - p1) * a2;\n\t\td = b2 - (p2 + s / a1);\n\t}\n\telse if (b1 > p1 + a1)\n\t{\n\t\tvar s = (a1 + p1) * b2;\n\t\td = s / b1 - (p2 + a2);\n\t}\n\telse\n\t{\n\t\td = b2 - (p2 + a2);\n\t}\n\n\tif (d > 0)\n\t{\n\t\treturn d;\n\t}\n\telse\n\t{\n\t\treturn 0;\n\t}\n};\n\n/**\n * Function: bridge\n */\nmxCompactTreeLayout.prototype.bridge = function(line1, x1, y1, line2, x2, y2)\n{\n\tvar dx = x2 + line2.dx - x1;\n\tvar dy = 0;\n\tvar s = 0;\n\t\n\tif (line2.dx == 0)\n\t{\n\t\tdy = line2.dy;\n\t}\n\telse\n\t{\n\t\ts = dx * line2.dy;\n\t\tdy = s / line2.dx;\n\t}\n\t\n\tvar r = this.createLine(dx, dy, line2.next);\n\tline1.next = this.createLine(0, y2 + line2.dy - dy - y1, r);\n\t\n\treturn r;\n};\n\n/**\n * Function: createNode\n */\nmxCompactTreeLayout.prototype.createNode = function(cell)\n{\n\tvar node = new Object();\n\tnode.cell = cell;\n\tnode.x = 0;\n\tnode.y = 0;\n\tnode.width = 0;\n\tnode.height = 0;\n\t\n\tvar geo = this.getVertexBounds(cell);\n\t\n\tif (geo != null)\n\t{\n\t\tif (this.isHorizontal())\n\t\t{\n\t\t\tnode.width = geo.height;\n\t\t\tnode.height = geo.width;\t\t\t\n\t\t}\n\t\telse\n\t\t{\n\t\t\tnode.width = geo.width;\n\t\t\tnode.height = geo.height;\n\t\t}\n\t}\n\t\n\tnode.offsetX = 0;\n\tnode.offsetY = 0;\n\tnode.contour = new Object();\n\t\n\treturn node;\n};\n\n/**\n * Function: apply\n */\nmxCompactTreeLayout.prototype.apply = function(node, bounds)\n{\n\tvar model = this.graph.getModel();\n\tvar cell = node.cell;\n\tvar g = model.getGeometry(cell);\n\n\tif (cell != null && g != null)\n\t{\n\t\tif (this.isVertexMovable(cell))\n\t\t{\n\t\t\tg = this.setVertexLocation(cell, node.x, node.y);\n\t\t\t\n\t\t\tif (this.resizeParent)\n\t\t\t{\n\t\t\t\tvar parent = model.getParent(cell);\n\t\t\t\tvar id = mxCellPath.create(parent);\n\t\t\t\t\n\t\t\t\t// Implements set semantic\n\t\t\t\tif (this.parentsChanged[id] == null)\n\t\t\t\t{\n\t\t\t\t\tthis.parentsChanged[id] = parent;\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (bounds == null)\n\t\t{\n\t\t\tbounds = new mxRectangle(g.x, g.y, g.width, g.height);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tbounds = new mxRectangle(Math.min(bounds.x, g.x),\n\t\t\t\tMath.min(bounds.y, g.y),\n\t\t\t\tMath.max(bounds.x + bounds.width, g.x + g.width),\n\t\t\t\tMath.max(bounds.y + bounds.height, g.y + g.height));\n\t\t}\n\t}\n\t\n\treturn bounds;\n};\n\n/**\n * Function: createLine\n */\nmxCompactTreeLayout.prototype.createLine = function(dx, dy, next)\n{\n\tvar line = new Object();\n\tline.dx = dx;\n\tline.dy = dy;\n\tline.next = next;\n\t\n\treturn line;\n};\n\n/**\n * Function: adjustParents\n * \n * Adjust parent cells whose child geometries have changed. The default \n * implementation adjusts the group to just fit around the children with \n * a padding.\n */\nmxCompactTreeLayout.prototype.adjustParents = function()\n{\n\tvar tmp = [];\n\t\n\tfor (var id in this.parentsChanged)\n\t{\n\t\ttmp.push(this.parentsChanged[id]);\n\t}\n\t\n\tthis.arrangeGroups(mxUtils.sortCells(tmp, true), this.groupPadding, this.groupPaddingTop,\n\t\tthis.groupPaddingRight, this.groupPaddingBottom, this.groupPaddingLeft);\n};\n\n/**\n * Function: localEdgeProcessing\n *\n * Moves the specified node and all of its children by the given amount.\n */\nmxCompactTreeLayout.prototype.localEdgeProcessing = function(node)\n{\n\tthis.processNodeOutgoing(node);\n\tvar child = node.child;\n\n\twhile (child != null)\n\t{\n\t\tthis.localEdgeProcessing(child);\n\t\tchild = child.next;\n\t}\n};\n\n/**\n * Function: localEdgeProcessing\n *\n * Separates the x position of edges as they connect to vertices\n */\nmxCompactTreeLayout.prototype.processNodeOutgoing = function(node)\n{\n\tvar child = node.child;\n\tvar parentCell = node.cell;\n\n\tvar childCount = 0;\n\tvar sortedCells = [];\n\n\twhile (child != null)\n\t{\n\t\tchildCount++;\n\n\t\tvar sortingCriterion = child.x;\n\n\t\tif (this.horizontal)\n\t\t{\n\t\t\tsortingCriterion = child.y;\n\t\t}\n\n\t\tsortedCells.push(new WeightedCellSorter(child, sortingCriterion));\n\t\tchild = child.next;\n\t}\n\n\tsortedCells.sort(WeightedCellSorter.prototype.compare);\n\n\tvar availableWidth = node.width;\n\n\tvar requiredWidth = (childCount + 1) * this.prefHozEdgeSep;\n\n\t// Add a buffer on the edges of the vertex if the edge count allows\n\tif (availableWidth > requiredWidth + (2 * this.prefHozEdgeSep))\n\t{\n\t\tavailableWidth -= 2 * this.prefHozEdgeSep;\n\t}\n\n\tvar edgeSpacing = availableWidth / childCount;\n\n\tvar currentXOffset = edgeSpacing / 2.0;\n\n\tif (availableWidth > requiredWidth + (2 * this.prefHozEdgeSep))\n\t{\n\t\tcurrentXOffset += this.prefHozEdgeSep;\n\t}\n\n\tvar currentYOffset = this.minEdgeJetty - this.prefVertEdgeOff;\n\tvar maxYOffset = 0;\n\n\tvar parentBounds = this.getVertexBounds(parentCell);\n\tchild = node.child;\n\n\tfor (var j = 0; j < sortedCells.length; j++)\n\t{\n\t\tvar childCell = sortedCells[j].cell.cell;\n\t\tvar childBounds = this.getVertexBounds(childCell);\n\n\t\tvar edges = this.graph.getEdgesBetween(parentCell,\n\t\t\t\tchildCell, false);\n\t\t\n\t\tvar newPoints = [];\n\t\tvar x = 0;\n\t\tvar y = 0;\n\n\t\tfor (var i = 0; i < edges.length; i++)\n\t\t{\n\t\t\tif (this.horizontal)\n\t\t\t{\n\t\t\t\t// Use opposite co-ords, calculation was done for \n\t\t\t\t// \n\t\t\t\tx = parentBounds.x + parentBounds.width;\n\t\t\t\ty = parentBounds.y + currentXOffset;\n\t\t\t\tnewPoints.push(new mxPoint(x, y));\n\t\t\t\tx = parentBounds.x + parentBounds.width\n\t\t\t\t\t\t+ currentYOffset;\n\t\t\t\tnewPoints.push(new mxPoint(x, y));\n\t\t\t\ty = childBounds.y + childBounds.height / 2.0;\n\t\t\t\tnewPoints.push(new mxPoint(x, y));\n\t\t\t\tthis.setEdgePoints(edges[i], newPoints);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tx = parentBounds.x + currentXOffset;\n\t\t\t\ty = parentBounds.y + parentBounds.height;\n\t\t\t\tnewPoints.push(new mxPoint(x, y));\n\t\t\t\ty = parentBounds.y + parentBounds.height\n\t\t\t\t\t\t+ currentYOffset;\n\t\t\t\tnewPoints.push(new mxPoint(x, y));\n\t\t\t\tx = childBounds.x + childBounds.width / 2.0;\n\t\t\t\tnewPoints.push(new mxPoint(x, y));\n\t\t\t\tthis.setEdgePoints(edges[i], newPoints);\n\t\t\t}\n\t\t}\n\n\t\tif (j < childCount / 2)\n\t\t{\n\t\t\tcurrentYOffset += this.prefVertEdgeOff;\n\t\t}\n\t\telse if (j > childCount / 2)\n\t\t{\n\t\t\tcurrentYOffset -= this.prefVertEdgeOff;\n\t\t}\n\t\t// Ignore the case if equals, this means the second of 2\n\t\t// jettys with the same y (even number of edges)\n\n\t\t//\t\t\t\t\t\t\t\tpos[k * 2] = currentX;\n\t\tcurrentXOffset += edgeSpacing;\n\t\t//\t\t\t\t\t\t\t\tpos[k * 2 + 1] = currentYOffset;\n\n\t\tmaxYOffset = Math.max(maxYOffset, currentYOffset);\n\t}\n};"
  },
  {
    "path": "static/cherry/drawio_demo/src/js/layout/mxCompositeLayout.js",
    "content": "/**\n * Copyright (c) 2006-2015, JGraph Ltd\n * Copyright (c) 2006-2015, Gaudenz Alder\n */\n/**\n * Class: mxCompositeLayout\n * \n * Allows to compose multiple layouts into a single layout. The master layout\n * is the layout that handles move operations if another layout than the first\n * element in <layouts> should be used. The <master> layout is not executed as\n * the code assumes that it is part of <layouts>.\n * \n * Example:\n * (code)\n * var first = new mxFastOrganicLayout(graph);\n * var second = new mxParallelEdgeLayout(graph);\n * var layout = new mxCompositeLayout(graph, [first, second], first);\n * layout.execute(graph.getDefaultParent());\n * (end)\n * \n * Constructor: mxCompositeLayout\n *\n * Constructs a new layout using the given layouts. The graph instance is\n * required for creating the transaction that contains all layouts.\n *\n * Arguments:\n * \n * graph - Reference to the enclosing <mxGraph>.\n * layouts - Array of <mxGraphLayouts>.\n * master - Optional layout that handles moves. If no layout is given then\n * the first layout of the above array is used to handle moves.\n */\nfunction mxCompositeLayout(graph, layouts, master)\n{\n\tmxGraphLayout.call(this, graph);\n\tthis.layouts = layouts;\n\tthis.master = master;\n};\n\n/**\n * Extends mxGraphLayout.\n */\nmxCompositeLayout.prototype = new mxGraphLayout();\nmxCompositeLayout.prototype.constructor = mxCompositeLayout;\n\t\n/**\n * Variable: layouts\n * \n * Holds the array of <mxGraphLayouts> that this layout contains.\n */\nmxCompositeLayout.prototype.layouts = null;\n\n/**\n * Variable: layouts\n * \n * Reference to the <mxGraphLayouts> that handles moves. If this is null\n * then the first layout in <layouts> is used.\n */\nmxCompositeLayout.prototype.master = null;\n\n/**\n * Function: moveCell\n * \n * Implements <mxGraphLayout.moveCell> by calling move on <master> or the first\n * layout in <layouts>.\n */\nmxCompositeLayout.prototype.moveCell = function(cell, x, y)\n{\n\tif (this.master != null)\n\t{\n\t\tthis.master.move.apply(this.master, arguments);\n\t}\n\telse\n\t{\n\t\tthis.layouts[0].move.apply(this.layouts[0], arguments);\n\t}\n};\n\n/**\n * Function: execute\n * \n * Implements <mxGraphLayout.execute> by executing all <layouts> in a\n * single transaction.\n */\nmxCompositeLayout.prototype.execute = function(parent)\n{\n\tvar model = this.graph.getModel();\n\t\n\tmodel.beginUpdate();\n\ttry\n\t{\n\t\tfor (var i = 0; i < this.layouts.length; i++)\n\t\t{\n\t\t\tthis.layouts[i].execute.apply(this.layouts[i], arguments);\n\t\t}\n\t}\n\tfinally\n\t{\n\t\tmodel.endUpdate();\n\t}\n};\n"
  },
  {
    "path": "static/cherry/drawio_demo/src/js/layout/mxEdgeLabelLayout.js",
    "content": "/**\n * Copyright (c) 2006-2015, JGraph Ltd\n * Copyright (c) 2006-2015, Gaudenz Alder\n */\n/**\n * Class: mxEdgeLabelLayout\n * \n * Extends <mxGraphLayout> to implement an edge label layout. This layout\n * makes use of cell states, which means the graph must be validated in\n * a graph view (so that the label bounds are available) before this layout\n * can be executed.\n * \n * Example:\n * \n * (code)\n * var layout = new mxEdgeLabelLayout(graph);\n * layout.execute(graph.getDefaultParent());\n * (end)\n * \n * Constructor: mxEdgeLabelLayout\n *\n * Constructs a new edge label layout.\n *\n * Arguments:\n * \n * graph - <mxGraph> that contains the cells.\n */\nfunction mxEdgeLabelLayout(graph, radius)\n{\n\tmxGraphLayout.call(this, graph);\n};\n\n/**\n * Extends mxGraphLayout.\n */\nmxEdgeLabelLayout.prototype = new mxGraphLayout();\nmxEdgeLabelLayout.prototype.constructor = mxEdgeLabelLayout;\n\n/**\n * Function: execute\n * \n * Implements <mxGraphLayout.execute>.\n */\nmxEdgeLabelLayout.prototype.execute = function(parent)\n{\n\tvar view = this.graph.view;\n\tvar model = this.graph.getModel();\n\t\n\t// Gets all vertices and edges inside the parent\n\tvar edges = [];\n\tvar vertices = [];\n\tvar childCount = model.getChildCount(parent);\n\t\n\tfor (var i = 0; i < childCount; i++)\n\t{\n\t\tvar cell = model.getChildAt(parent, i);\n\t\tvar state = view.getState(cell);\n\t\t\n\t\tif (state != null)\n\t\t{\n\t\t\tif (!this.isVertexIgnored(cell))\n\t\t\t{\n\t\t\t\tvertices.push(state);\n\t\t\t}\n\t\t\telse if (!this.isEdgeIgnored(cell))\n\t\t\t{\n\t\t\t\tedges.push(state);\n\t\t\t}\n\t\t}\n\t}\n\t\n\tthis.placeLabels(vertices, edges);\n};\n\n/**\n * Function: placeLabels\n * \n * Places the labels of the given edges.\n */\nmxEdgeLabelLayout.prototype.placeLabels = function(v, e)\n{\n\tvar model = this.graph.getModel();\n\t\n\t// Moves the vertices to build a circle. Makes sure the\n\t// radius is large enough for the vertices to not\n\t// overlap\n\tmodel.beginUpdate();\n\ttry\n\t{\n\t\tfor (var i = 0; i < e.length; i++)\n\t\t{\n\t\t\tvar edge = e[i];\n\t\t\t\n\t\t\tif (edge != null && edge.text != null &&\n\t\t\t\tedge.text.boundingBox != null)\n\t\t\t{\n\t\t\t\tfor (var j = 0; j < v.length; j++)\n\t\t\t\t{\n\t\t\t\t\tvar vertex = v[j];\n\t\t\t\t\t\n\t\t\t\t\tif (vertex != null)\n\t\t\t\t\t{\n\t\t\t\t\t\tthis.avoid(edge, vertex);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\tfinally\n\t{\n\t\tmodel.endUpdate();\n\t}\n};\n\n/**\n * Function: avoid\n * \n * Places the labels of the given edges.\n */\nmxEdgeLabelLayout.prototype.avoid = function(edge, vertex)\n{\n\tvar model = this.graph.getModel();\n\tvar labRect = edge.text.boundingBox;\n\t\n\tif (mxUtils.intersects(labRect, vertex))\n\t{\n\t\tvar dy1 = -labRect.y - labRect.height + vertex.y;\n\t\tvar dy2 = -labRect.y + vertex.y + vertex.height;\n\t\t\n\t\tvar dy = (Math.abs(dy1) < Math.abs(dy2)) ? dy1 : dy2;\n\t\t\n\t\tvar dx1 = -labRect.x - labRect.width + vertex.x;\n\t\tvar dx2 = -labRect.x + vertex.x + vertex.width;\n\t\n\t\tvar dx = (Math.abs(dx1) < Math.abs(dx2)) ? dx1 : dx2;\n\t\t\n\t\tif (Math.abs(dx) < Math.abs(dy))\n\t\t{\n\t\t\tdy = 0;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tdx = 0;\n\t\t}\n\t\n\t\tvar g = model.getGeometry(edge.cell);\n\t\t\n\t\tif (g != null)\n\t\t{\n\t\t\tg = g.clone();\n\t\t\t\n\t\t\tif (g.offset != null)\n\t\t\t{\n\t\t\t\tg.offset.x += dx;\n\t\t\t\tg.offset.y += dy;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tg.offset = new mxPoint(dx, dy);\n\t\t\t}\n\t\t\t\n\t\t\tmodel.setGeometry(edge.cell, g);\n\t\t}\n\t}\n};\n"
  },
  {
    "path": "static/cherry/drawio_demo/src/js/layout/mxFastOrganicLayout.js",
    "content": "/**\n * Copyright (c) 2006-2015, JGraph Ltd\n * Copyright (c) 2006-2015, Gaudenz Alder\n */\n/**\n * Class: mxFastOrganicLayout\n * \n * Extends <mxGraphLayout> to implement a fast organic layout algorithm.\n * The vertices need to be connected for this layout to work, vertices\n * with no connections are ignored.\n * \n * Example:\n * \n * (code)\n * var layout = new mxFastOrganicLayout(graph);\n * layout.execute(graph.getDefaultParent());\n * (end)\n * \n * Constructor: mxCompactTreeLayout\n * \n * Constructs a new fast organic layout for the specified graph.\n */\nfunction mxFastOrganicLayout(graph)\n{\n\tmxGraphLayout.call(this, graph);\n};\n\n/**\n * Extends mxGraphLayout.\n */\nmxFastOrganicLayout.prototype = new mxGraphLayout();\nmxFastOrganicLayout.prototype.constructor = mxFastOrganicLayout;\n\n/**\n * Variable: useInputOrigin\n * \n * Specifies if the top left corner of the input cells should be the origin\n * of the layout result. Default is true.\n */\nmxFastOrganicLayout.prototype.useInputOrigin = true;\n\n/**\n * Variable: resetEdges\n * \n * Specifies if all edge points of traversed edges should be removed.\n * Default is true.\n */\nmxFastOrganicLayout.prototype.resetEdges = true;\n\n/**\n * Variable: disableEdgeStyle\n * \n * Specifies if the STYLE_NOEDGESTYLE flag should be set on edges that are\n * modified by the result. Default is true.\n */\nmxFastOrganicLayout.prototype.disableEdgeStyle = true;\n\n/**\n * Variable: forceConstant\n * \n * The force constant by which the attractive forces are divided and the\n * replusive forces are multiple by the square of. The value equates to the\n * average radius there is of free space around each node. Default is 50.\n */\nmxFastOrganicLayout.prototype.forceConstant = 50;\n\n/**\n * Variable: forceConstantSquared\n * \n * Cache of <forceConstant>^2 for performance.\n */\nmxFastOrganicLayout.prototype.forceConstantSquared = 0;\n\n/**\n * Variable: minDistanceLimit\n * \n * Minimal distance limit. Default is 2. Prevents of\n * dividing by zero.\n */\nmxFastOrganicLayout.prototype.minDistanceLimit = 2;\n\n/**\n * Variable: minDistanceLimit\n * \n * Minimal distance limit. Default is 2. Prevents of\n * dividing by zero.\n */\nmxFastOrganicLayout.prototype.maxDistanceLimit = 500;\n\n/**\n * Variable: minDistanceLimitSquared\n * \n * Cached version of <minDistanceLimit> squared.\n */\nmxFastOrganicLayout.prototype.minDistanceLimitSquared = 4;\n\n/**\n * Variable: initialTemp\n * \n * Start value of temperature. Default is 200.\n */\nmxFastOrganicLayout.prototype.initialTemp = 200;\n\n/**\n * Variable: temperature\n * \n * Temperature to limit displacement at later stages of layout.\n */\nmxFastOrganicLayout.prototype.temperature = 0;\n\n/**\n * Variable: maxIterations\n * \n * Total number of iterations to run the layout though.\n */\nmxFastOrganicLayout.prototype.maxIterations = 0;\n\n/**\n * Variable: iteration\n * \n * Current iteration count.\n */\nmxFastOrganicLayout.prototype.iteration = 0;\n\n/**\n * Variable: vertexArray\n * \n * An array of all vertices to be laid out.\n */\nmxFastOrganicLayout.prototype.vertexArray;\n\n/**\n * Variable: dispX\n * \n * An array of locally stored X co-ordinate displacements for the vertices.\n */\nmxFastOrganicLayout.prototype.dispX;\n\n/**\n * Variable: dispY\n * \n * An array of locally stored Y co-ordinate displacements for the vertices.\n */\nmxFastOrganicLayout.prototype.dispY;\n\n/**\n * Variable: cellLocation\n * \n * An array of locally stored co-ordinate positions for the vertices.\n */\nmxFastOrganicLayout.prototype.cellLocation;\n\n/**\n * Variable: radius\n * \n * The approximate radius of each cell, nodes only.\n */\nmxFastOrganicLayout.prototype.radius;\n\n/**\n * Variable: radiusSquared\n * \n * The approximate radius squared of each cell, nodes only.\n */\nmxFastOrganicLayout.prototype.radiusSquared;\n\n/**\n * Variable: isMoveable\n * \n * Array of booleans representing the movable states of the vertices.\n */\nmxFastOrganicLayout.prototype.isMoveable;\n\n/**\n * Variable: neighbours\n * \n * Local copy of cell neighbours.\n */\nmxFastOrganicLayout.prototype.neighbours;\n\n/**\n * Variable: indices\n * \n * Hashtable from cells to local indices.\n */\nmxFastOrganicLayout.prototype.indices;\n\n/**\n * Variable: allowedToRun\n * \n * Boolean flag that specifies if the layout is allowed to run. If this is\n * set to false, then the layout exits in the following iteration.\n */\nmxFastOrganicLayout.prototype.allowedToRun = true;\n\n/**\n * Function: isVertexIgnored\n * \n * Returns a boolean indicating if the given <mxCell> should be ignored as a\n * vertex. This returns true if the cell has no connections.\n * \n * Parameters:\n * \n * vertex - <mxCell> whose ignored state should be returned.\n */\nmxFastOrganicLayout.prototype.isVertexIgnored = function(vertex)\n{\n\treturn mxGraphLayout.prototype.isVertexIgnored.apply(this, arguments) ||\n\t\tthis.graph.getConnections(vertex).length == 0;\n};\n\n/**\n * Function: execute\n * \n * Implements <mxGraphLayout.execute>. This operates on all children of the\n * given parent where <isVertexIgnored> returns false.\n */\nmxFastOrganicLayout.prototype.execute = function(parent)\n{\n\tvar model = this.graph.getModel();\n\tthis.vertexArray = [];\n\tvar cells = this.graph.getChildVertices(parent);\n\t\n\tfor (var i = 0; i < cells.length; i++)\n\t{\n\t\tif (!this.isVertexIgnored(cells[i]))\n\t\t{\n\t\t\tthis.vertexArray.push(cells[i]);\n\t\t}\n\t}\n\t\n\tvar initialBounds = (this.useInputOrigin) ?\n\t\t\tthis.graph.getBoundingBoxFromGeometry(this.vertexArray) :\n\t\t\t\tnull;\n\tvar n = this.vertexArray.length;\n\n\tthis.indices = [];\n\tthis.dispX = [];\n\tthis.dispY = [];\n\tthis.cellLocation = [];\n\tthis.isMoveable = [];\n\tthis.neighbours = [];\n\tthis.radius = [];\n\tthis.radiusSquared = [];\n\n\tif (this.forceConstant < 0.001)\n\t{\n\t\tthis.forceConstant = 0.001;\n\t}\n\n\tthis.forceConstantSquared = this.forceConstant * this.forceConstant;\n\n\t// Create a map of vertices first. This is required for the array of\n\t// arrays called neighbours which holds, for each vertex, a list of\n\t// ints which represents the neighbours cells to that vertex as\n\t// the indices into vertexArray\n\tfor (var i = 0; i < this.vertexArray.length; i++)\n\t{\n\t\tvar vertex = this.vertexArray[i];\n\t\tthis.cellLocation[i] = [];\n\t\t\n\t\t// Set up the mapping from array indices to cells\n\t\tvar id = mxObjectIdentity.get(vertex);\n\t\tthis.indices[id] = i;\n\t\tvar bounds = this.getVertexBounds(vertex);\n\n\t\t// Set the X,Y value of the internal version of the cell to\n\t\t// the center point of the vertex for better positioning\n\t\tvar width = bounds.width;\n\t\tvar height = bounds.height;\n\t\t\n\t\t// Randomize (0, 0) locations\n\t\tvar x = bounds.x;\n\t\tvar y = bounds.y;\n\t\t\n\t\tthis.cellLocation[i][0] = x + width / 2.0;\n\t\tthis.cellLocation[i][1] = y + height / 2.0;\n\t\tthis.radius[i] = Math.min(width, height);\n\t\tthis.radiusSquared[i] = this.radius[i] * this.radius[i];\n\t}\n\n\t// Moves cell location back to top-left from center locations used in\n\t// algorithm, resetting the edge points is part of the transaction\n\tmodel.beginUpdate();\n\ttry\n\t{\n\t\tfor (var i = 0; i < n; i++)\n\t\t{\n\t\t\tthis.dispX[i] = 0;\n\t\t\tthis.dispY[i] = 0;\n\t\t\tthis.isMoveable[i] = this.isVertexMovable(this.vertexArray[i]);\n\n\t\t\t// Get lists of neighbours to all vertices, translate the cells\n\t\t\t// obtained in indices into vertexArray and store as an array\n\t\t\t// against the orginial cell index\n\t\t\tvar edges = this.graph.getConnections(this.vertexArray[i], parent);\n\t\t\tvar cells = this.graph.getOpposites(edges, this.vertexArray[i]);\n\t\t\tthis.neighbours[i] = [];\n\n\t\t\tfor (var j = 0; j < cells.length; j++)\n\t\t\t{\n\t\t\t\t// Resets the points on the traversed edge\n\t\t\t\tif (this.resetEdges)\n\t\t\t\t{\n\t\t\t\t\tthis.graph.resetEdge(edges[j]);\n\t\t\t\t}\n\n\t\t\t    if (this.disableEdgeStyle)\n\t\t\t    {\n\t\t\t    \tthis.setEdgeStyleEnabled(edges[j], false);\n\t\t\t    }\n\n\t\t\t\t// Looks the cell up in the indices dictionary\n\t\t\t\tvar id = mxObjectIdentity.get(cells[j]);\n\t\t\t\tvar index = this.indices[id];\n\n\t\t\t\t// Check the connected cell in part of the vertex list to be\n\t\t\t\t// acted on by this layout\n\t\t\t\tif (index != null)\n\t\t\t\t{\n\t\t\t\t\tthis.neighbours[i][j] = index;\n\t\t\t\t}\n\n\t\t\t\t// Else if index of the other cell doesn't correspond to\n\t\t\t\t// any cell listed to be acted upon in this layout. Set\n\t\t\t\t// the index to the value of this vertex (a dummy self-loop)\n\t\t\t\t// so the attraction force of the edge is not calculated\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tthis.neighbours[i][j] = i;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tthis.temperature = this.initialTemp;\n\n\t\t// If max number of iterations has not been set, guess it\n\t\tif (this.maxIterations == 0)\n\t\t{\n\t\t\tthis.maxIterations = 20 * Math.sqrt(n);\n\t\t}\n\t\t\n\t\t// Main iteration loop\n\t\tfor (this.iteration = 0; this.iteration < this.maxIterations; this.iteration++)\n\t\t{\n\t\t\tif (!this.allowedToRun)\n\t\t\t{\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t\n\t\t\t// Calculate repulsive forces on all vertices\n\t\t\tthis.calcRepulsion();\n\n\t\t\t// Calculate attractive forces through edges\n\t\t\tthis.calcAttraction();\n\n\t\t\tthis.calcPositions();\n\t\t\tthis.reduceTemperature();\n\t\t}\n\n\t\tvar minx = null;\n\t\tvar miny = null;\n\t\t\n\t\tfor (var i = 0; i < this.vertexArray.length; i++)\n\t\t{\n\t\t\tvar vertex = this.vertexArray[i];\n\t\t\t\n\t\t\tif (this.isVertexMovable(vertex))\n\t\t\t{\n\t\t\t\tvar bounds = this.getVertexBounds(vertex);\n\t\t\t\t\n\t\t\t\tif (bounds != null)\n\t\t\t\t{\n\t\t\t\t\tthis.cellLocation[i][0] -= bounds.width / 2.0;\n\t\t\t\t\tthis.cellLocation[i][1] -= bounds.height / 2.0;\n\t\t\t\t\t\n\t\t\t\t\tvar x = this.graph.snap(Math.round(this.cellLocation[i][0]));\n\t\t\t\t\tvar y = this.graph.snap(Math.round(this.cellLocation[i][1]));\n\t\t\t\t\t\n\t\t\t\t\tthis.setVertexLocation(vertex, x, y);\n\t\t\t\t\t\n\t\t\t\t\tif (minx == null)\n\t\t\t\t\t{\n\t\t\t\t\t\tminx = x;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tminx = Math.min(minx, x);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif (miny == null)\n\t\t\t\t\t{\n\t\t\t\t\t\tminy = y;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tminy = Math.min(miny, y);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Modifies the cloned geometries in-place. Not needed\n\t\t// to clone the geometries again as we're in the same\n\t\t// undoable change.\n\t\tvar dx = -(minx || 0) + 1;\n\t\tvar dy = -(miny || 0) + 1;\n\t\t\n\t\tif (initialBounds != null)\n\t\t{\n\t\t\tdx += initialBounds.x;\n\t\t\tdy += initialBounds.y;\n\t\t}\n\t\t\n\t\tthis.graph.moveCells(this.vertexArray, dx, dy);\n\t}\n\tfinally\n\t{\n\t\tmodel.endUpdate();\n\t}\n};\n\n/**\n * Function: calcPositions\n * \n * Takes the displacements calculated for each cell and applies them to the\n * local cache of cell positions. Limits the displacement to the current\n * temperature.\n */\nmxFastOrganicLayout.prototype.calcPositions = function()\n{\n\tfor (var index = 0; index < this.vertexArray.length; index++)\n\t{\n\t\tif (this.isMoveable[index])\n\t\t{\n\t\t\t// Get the distance of displacement for this node for this\n\t\t\t// iteration\n\t\t\tvar deltaLength = Math.sqrt(this.dispX[index] * this.dispX[index] +\n\t\t\t\tthis.dispY[index] * this.dispY[index]);\n\n\t\t\tif (deltaLength < 0.001)\n\t\t\t{\n\t\t\t\tdeltaLength = 0.001;\n\t\t\t}\n\n\t\t\t// Scale down by the current temperature if less than the\n\t\t\t// displacement distance\n\t\t\tvar newXDisp = this.dispX[index] / deltaLength\n\t\t\t\t* Math.min(deltaLength, this.temperature);\n\n\t\t\tvar newYDisp = this.dispY[index] / deltaLength\n\t\t\t\t* Math.min(deltaLength, this.temperature);\n\n\t\t\t// reset displacements\n\t\t\tthis.dispX[index] = 0;\n\t\t\tthis.dispY[index] = 0;\n\n\t\t\t// Update the cached cell locations\n\t\t\tthis.cellLocation[index][0] += newXDisp;\n\t\t\tthis.cellLocation[index][1] += newYDisp;\n\t\t}\n\t}\n};\n\n/**\n * Function: calcAttraction\n * \n * Calculates the attractive forces between all laid out nodes linked by\n * edges\n */\nmxFastOrganicLayout.prototype.calcAttraction = function()\n{\n\t// Check the neighbours of each vertex and calculate the attractive\n\t// force of the edge connecting them\n\tfor (var i = 0; i < this.vertexArray.length; i++)\n\t{\n\t\tfor (var k = 0; k < this.neighbours[i].length; k++)\n\t\t{\n\t\t\t// Get the index of the othe cell in the vertex array\n\t\t\tvar j = this.neighbours[i][k];\n\t\t\t\n\t\t\t// Do not proceed self-loops\n\t\t\tif (i != j &&\n\t\t\t\tthis.isMoveable[i] &&\n\t\t\t\tthis.isMoveable[j])\n\t\t\t{\n\t\t\t\tvar xDelta = this.cellLocation[i][0] - this.cellLocation[j][0];\n\t\t\t\tvar yDelta = this.cellLocation[i][1] - this.cellLocation[j][1];\n\n\t\t\t\t// The distance between the nodes\n\t\t\t\tvar deltaLengthSquared = xDelta * xDelta + yDelta\n\t\t\t\t\t\t* yDelta - this.radiusSquared[i] - this.radiusSquared[j];\n\n\t\t\t\tif (deltaLengthSquared < this.minDistanceLimitSquared)\n\t\t\t\t{\n\t\t\t\t\tdeltaLengthSquared = this.minDistanceLimitSquared;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tvar deltaLength = Math.sqrt(deltaLengthSquared);\n\t\t\t\tvar force = (deltaLengthSquared) / this.forceConstant;\n\n\t\t\t\tvar displacementX = (xDelta / deltaLength) * force;\n\t\t\t\tvar displacementY = (yDelta / deltaLength) * force;\n\t\t\t\t\n\t\t\t\tthis.dispX[i] -= displacementX;\n\t\t\t\tthis.dispY[i] -= displacementY;\n\t\t\t\t\n\t\t\t\tthis.dispX[j] += displacementX;\n\t\t\t\tthis.dispY[j] += displacementY;\n\t\t\t}\n\t\t}\n\t}\n};\n\n/**\n * Function: calcRepulsion\n * \n * Calculates the repulsive forces between all laid out nodes\n */\nmxFastOrganicLayout.prototype.calcRepulsion = function()\n{\n\tvar vertexCount = this.vertexArray.length;\n\n\tfor (var i = 0; i < vertexCount; i++)\n\t{\n\t\tfor (var j = i; j < vertexCount; j++)\n\t\t{\n\t\t\t// Exits if the layout is no longer allowed to run\n\t\t\tif (!this.allowedToRun)\n\t\t\t{\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (j != i &&\n\t\t\t\tthis.isMoveable[i] &&\n\t\t\t\tthis.isMoveable[j])\n\t\t\t{\n\t\t\t\tvar xDelta = this.cellLocation[i][0] - this.cellLocation[j][0];\n\t\t\t\tvar yDelta = this.cellLocation[i][1] - this.cellLocation[j][1];\n\n\t\t\t\tif (xDelta == 0)\n\t\t\t\t{\n\t\t\t\t\txDelta = 0.01 + Math.random();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (yDelta == 0)\n\t\t\t\t{\n\t\t\t\t\tyDelta = 0.01 + Math.random();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// Distance between nodes\n\t\t\t\tvar deltaLength = Math.sqrt((xDelta * xDelta)\n\t\t\t\t\t\t+ (yDelta * yDelta));\n\t\t\t\tvar deltaLengthWithRadius = deltaLength - this.radius[i]\n\t\t\t\t\t\t- this.radius[j];\n\n\t\t\t\tif (deltaLengthWithRadius > this.maxDistanceLimit)\n\t\t\t\t{\n\t\t\t\t\t// Ignore vertices too far apart\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tif (deltaLengthWithRadius < this.minDistanceLimit)\n\t\t\t\t{\n\t\t\t\t\tdeltaLengthWithRadius = this.minDistanceLimit;\n\t\t\t\t}\n\n\t\t\t\tvar force = this.forceConstantSquared / deltaLengthWithRadius;\n\n\t\t\t\tvar displacementX = (xDelta / deltaLength) * force;\n\t\t\t\tvar displacementY = (yDelta / deltaLength) * force;\n\t\t\t\t\n\t\t\t\tthis.dispX[i] += displacementX;\n\t\t\t\tthis.dispY[i] += displacementY;\n\n\t\t\t\tthis.dispX[j] -= displacementX;\n\t\t\t\tthis.dispY[j] -= displacementY;\n\t\t\t}\n\t\t}\n\t}\n};\n\n/**\n * Function: reduceTemperature\n * \n * Reduces the temperature of the layout from an initial setting in a linear\n * fashion to zero.\n */\nmxFastOrganicLayout.prototype.reduceTemperature = function()\n{\n\tthis.temperature = this.initialTemp * (1.0 - this.iteration / this.maxIterations);\n};\n"
  },
  {
    "path": "static/cherry/drawio_demo/src/js/layout/mxGraphLayout.js",
    "content": "/**\n * Copyright (c) 2006-2018, JGraph Ltd\n * Copyright (c) 2006-2018, Gaudenz Alder\n */\n/**\n * Class: mxGraphLayout\n * \n * Base class for all layout algorithms in mxGraph. Main public functions are\n * <move> for handling a moved cell within a layouted parent, and <execute> for\n * running the layout on a given parent cell.\n *\n * Known Subclasses:\n *\n * <mxCircleLayout>, <mxCompactTreeLayout>, <mxCompositeLayout>,\n * <mxFastOrganicLayout>, <mxParallelEdgeLayout>, <mxPartitionLayout>,\n * <mxStackLayout>\n * \n * Constructor: mxGraphLayout\n *\n * Constructs a new layout using the given layouts.\n *\n * Arguments:\n * \n * graph - Enclosing \n */\nfunction mxGraphLayout(graph)\n{\n\tthis.graph = graph;\n};\n\n/**\n * Variable: graph\n * \n * Reference to the enclosing <mxGraph>.\n */\nmxGraphLayout.prototype.graph = null;\n\n/**\n * Variable: useBoundingBox\n *\n * Boolean indicating if the bounding box of the label should be used if\n * its available. Default is true.\n */\nmxGraphLayout.prototype.useBoundingBox = true;\n\n/**\n * Variable: parent\n *\n * The parent cell of the layout, if any\n */\nmxGraphLayout.prototype.parent = null;\n\n/**\n * Function: moveCell\n * \n * Notified when a cell is being moved in a parent that has automatic\n * layout to update the cell state (eg. index) so that the outcome of the\n * layout will position the vertex as close to the point (x, y) as\n * possible.\n * \n * Empty implementation.\n * \n * Parameters:\n * \n * cell - <mxCell> which has been moved.\n * x - X-coordinate of the new cell location.\n * y - Y-coordinate of the new cell location.\n */\nmxGraphLayout.prototype.moveCell = function(cell, x, y) { };\n\n/**\n * Function: execute\n * \n * Executes the layout algorithm for the children of the given parent.\n * \n * Parameters:\n * \n * parent - <mxCell> whose children should be layed out.\n */\nmxGraphLayout.prototype.execute = function(parent) { };\n\n/**\n * Function: getGraph\n * \n * Returns the graph that this layout operates on.\n */\nmxGraphLayout.prototype.getGraph = function()\n{\n\treturn this.graph;\n};\n\n/**\n * Function: getConstraint\n * \n * Returns the constraint for the given key and cell. The optional edge and\n * source arguments are used to return inbound and outgoing routing-\n * constraints for the given edge and vertex. This implementation always\n * returns the value for the given key in the style of the given cell.\n * \n * Parameters:\n * \n * key - Key of the constraint to be returned.\n * cell - <mxCell> whose constraint should be returned.\n * edge - Optional <mxCell> that represents the connection whose constraint\n * should be returned. Default is null.\n * source - Optional boolean that specifies if the connection is incoming\n * or outgoing. Default is null.\n */\nmxGraphLayout.prototype.getConstraint = function(key, cell, edge, source)\n{\n\tvar state = this.graph.view.getState(cell);\n\tvar style = (state != null) ? state.style : this.graph.getCellStyle(cell);\n\t\n\treturn (style != null) ? style[key] : null;\n};\n\n/**\n * Function: traverse\n * \n * Traverses the (directed) graph invoking the given function for each\n * visited vertex and edge. The function is invoked with the current vertex\n * and the incoming edge as a parameter. This implementation makes sure\n * each vertex is only visited once. The function may return false if the\n * traversal should stop at the given vertex.\n * \n * Example:\n * \n * (code)\n * mxLog.show();\n * var cell = graph.getSelectionCell();\n * graph.traverse(cell, false, function(vertex, edge)\n * {\n *   mxLog.debug(graph.getLabel(vertex));\n * });\n * (end)\n * \n * Parameters:\n * \n * vertex - <mxCell> that represents the vertex where the traversal starts.\n * directed - Optional boolean indicating if edges should only be traversed\n * from source to target. Default is true.\n * func - Visitor function that takes the current vertex and the incoming\n * edge as arguments. The traversal stops if the function returns false.\n * edge - Optional <mxCell> that represents the incoming edge. This is\n * null for the first step of the traversal.\n * visited - Optional <mxDictionary> of cell paths for the visited cells.\n */\nmxGraphLayout.traverse = function(vertex, directed, func, edge, visited)\n{\n\tif (func != null && vertex != null)\n\t{\n\t\tdirected = (directed != null) ? directed : true;\n\t\tvisited = visited || new mxDictionary();\n\t\t\n\t\tif (!visited.get(vertex))\n\t\t{\n\t\t\tvisited.put(vertex, true);\n\t\t\tvar result = func(vertex, edge);\n\t\t\t\n\t\t\tif (result == null || result)\n\t\t\t{\n\t\t\t\tvar edgeCount = this.graph.model.getEdgeCount(vertex);\n\t\t\t\t\n\t\t\t\tif (edgeCount > 0)\n\t\t\t\t{\n\t\t\t\t\tfor (var i = 0; i < edgeCount; i++)\n\t\t\t\t\t{\n\t\t\t\t\t\tvar e = this.graph.model.getEdgeAt(vertex, i);\n\t\t\t\t\t\tvar isSource = this.graph.model.getTerminal(e, true) == vertex;\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\tif (!directed || isSource)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tvar next = this.graph.view.getVisibleTerminal(e, !isSource);\n\t\t\t\t\t\t\tthis.traverse(next, directed, func, e, visited);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n};\n\n/**\n * Function: isAncestor\n * \n * Returns true if the given parent is an ancestor of the given child.\n *\n * Parameters:\n * \n * parent - <mxCell> that specifies the parent.\n * child - <mxCell> that specifies the child.\n * traverseAncestors - boolean whether to \n */\nmxGraphLayout.prototype.isAncestor = function(parent, child, traverseAncestors)\n{\n\tif (!traverseAncestors)\n\t{\n\t\treturn (this.graph.model.getParent(child) == parent);\n\t}\t\n\t\n\tif (child == parent)\n\t{\n\t\treturn false;\n\t}\n\n\twhile (child != null && child != parent)\n\t{\n\t\tchild = this.graph.model.getParent(child);\n\t}\n\t\n\treturn child == parent;\n};\n\n/**\n * Function: isVertexMovable\n * \n * Returns a boolean indicating if the given <mxCell> is movable or\n * bendable by the algorithm. This implementation returns true if the given\n * cell is movable in the graph.\n * \n * Parameters:\n * \n * cell - <mxCell> whose movable state should be returned.\n */\nmxGraphLayout.prototype.isVertexMovable = function(cell)\n{\n\treturn this.graph.isCellMovable(cell);\n};\n\n/**\n * Function: isVertexIgnored\n * \n * Returns a boolean indicating if the given <mxCell> should be ignored by\n * the algorithm. This implementation returns false for all vertices.\n * \n * Parameters:\n * \n * vertex - <mxCell> whose ignored state should be returned.\n */\nmxGraphLayout.prototype.isVertexIgnored = function(vertex)\n{\n\treturn !this.graph.getModel().isVertex(vertex) ||\n\t\t!this.graph.isCellVisible(vertex);\n};\n\n/**\n * Function: isEdgeIgnored\n * \n * Returns a boolean indicating if the given <mxCell> should be ignored by\n * the algorithm. This implementation returns false for all vertices.\n * \n * Parameters:\n * \n * cell - <mxCell> whose ignored state should be returned.\n */\nmxGraphLayout.prototype.isEdgeIgnored = function(edge)\n{\n\tvar model = this.graph.getModel();\n\t\n\treturn !model.isEdge(edge) ||\n\t\t!this.graph.isCellVisible(edge) ||\n\t\tmodel.getTerminal(edge, true) == null ||\n\t\tmodel.getTerminal(edge, false) == null;\n};\n\n/**\n * Function: setEdgeStyleEnabled\n * \n * Disables or enables the edge style of the given edge.\n */\nmxGraphLayout.prototype.setEdgeStyleEnabled = function(edge, value)\n{\n\tthis.graph.setCellStyles(mxConstants.STYLE_NOEDGESTYLE,\n\t\t\t(value) ? '0' : '1', [edge]);\n};\n\n/**\n * Function: setOrthogonalEdge\n * \n * Disables or enables orthogonal end segments of the given edge.\n */\nmxGraphLayout.prototype.setOrthogonalEdge = function(edge, value)\n{\n\tthis.graph.setCellStyles(mxConstants.STYLE_ORTHOGONAL,\n\t\t\t(value) ? '1' : '0', [edge]);\n};\n\n/**\n * Function: getParentOffset\n * \n * Determines the offset of the given parent to the parent\n * of the layout\n */\nmxGraphLayout.prototype.getParentOffset = function(parent)\n{\n\tvar result = new mxPoint();\n\n\tif (parent != null && parent != this.parent)\n\t{\n\t\tvar model = this.graph.getModel();\n\n\t\tif (model.isAncestor(this.parent, parent))\n\t\t{\n\t\t\tvar parentGeo = model.getGeometry(parent);\n\n\t\t\twhile (parent != this.parent)\n\t\t\t{\n\t\t\t\tresult.x = result.x + parentGeo.x;\n\t\t\t\tresult.y = result.y + parentGeo.y;\n\n\t\t\t\tparent = model.getParent(parent);;\n\t\t\t\tparentGeo = model.getGeometry(parent);\n\t\t\t}\n\t\t}\n\t}\n\n\treturn result;\n};\n\n/**\n * Function: setEdgePoints\n * \n * Replaces the array of mxPoints in the geometry of the given edge\n * with the given array of mxPoints.\n */\nmxGraphLayout.prototype.setEdgePoints = function(edge, points)\n{\n\tif (edge != null)\n\t{\n\t\tvar model = this.graph.model;\n\t\tvar geometry = model.getGeometry(edge);\n\n\t\tif (geometry == null)\n\t\t{\n\t\t\tgeometry = new mxGeometry();\n\t\t\tgeometry.setRelative(true);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tgeometry = geometry.clone();\n\t\t}\n\n\t\tif (this.parent != null && points != null)\n\t\t{\n\t\t\tvar parent = model.getParent(edge);\n\n\t\t\tvar parentOffset = this.getParentOffset(parent);\n\n\t\t\tfor (var i = 0; i < points.length; i++)\n\t\t\t{\n\t\t\t\tpoints[i].x = points[i].x - parentOffset.x;\n\t\t\t\tpoints[i].y = points[i].y - parentOffset.y;\n\t\t\t}\n\t\t}\n\n\t\tgeometry.points = points;\n\t\tmodel.setGeometry(edge, geometry);\n\t}\n};\n\n/**\n * Function: setVertexLocation\n * \n * Sets the new position of the given cell taking into account the size of\n * the bounding box if <useBoundingBox> is true. The change is only carried\n * out if the new location is not equal to the existing location, otherwise\n * the geometry is not replaced with an updated instance. The new or old\n * bounds are returned (including overlapping labels).\n * \n * Parameters:\n * \n * cell - <mxCell> whose geometry is to be set.\n * x - Integer that defines the x-coordinate of the new location.\n * y - Integer that defines the y-coordinate of the new location.\n */\nmxGraphLayout.prototype.setVertexLocation = function(cell, x, y)\n{\n\tvar model = this.graph.getModel();\n\tvar geometry = model.getGeometry(cell);\n\tvar result = null;\n\t\n\tif (geometry != null)\n\t{\n\t\tresult = new mxRectangle(x, y, geometry.width, geometry.height);\n\t\t\n\t\t// Checks for oversize labels and shifts the result\n\t\t// TODO: Use mxUtils.getStringSize for label bounds\n\t\tif (this.useBoundingBox)\n\t\t{\n\t\t\tvar state = this.graph.getView().getState(cell);\n\t\t\t\n\t\t\tif (state != null && state.text != null && state.text.boundingBox != null)\n\t\t\t{\n\t\t\t\tvar scale = this.graph.getView().scale;\n\t\t\t\tvar box = state.text.boundingBox;\n\t\t\t\t\n\t\t\t\tif (state.text.boundingBox.x < state.x)\n\t\t\t\t{\n\t\t\t\t\tx += (state.x - box.x) / scale;\n\t\t\t\t\tresult.width = box.width;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (state.text.boundingBox.y < state.y)\n\t\t\t\t{\n\t\t\t\t\ty += (state.y - box.y) / scale;\n\t\t\t\t\tresult.height = box.height;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (this.parent != null)\n\t\t{\n\t\t\tvar parent = model.getParent(cell);\n\n\t\t\tif (parent != null && parent != this.parent)\n\t\t\t{\n\t\t\t\tvar parentOffset = this.getParentOffset(parent);\n\n\t\t\t\tx = x - parentOffset.x;\n\t\t\t\ty = y - parentOffset.y;\n\t\t\t}\n\t\t}\n\n\t\tif (geometry.x != x || geometry.y != y)\n\t\t{\n\t\t\tgeometry = geometry.clone();\n\t\t\tgeometry.x = x;\n\t\t\tgeometry.y = y;\n\t\t\t\n\t\t\tmodel.setGeometry(cell, geometry);\n\t\t}\n\t}\n\t\n\treturn result;\n};\n\n/**\n * Function: getVertexBounds\n * \n * Returns an <mxRectangle> that defines the bounds of the given cell or\n * the bounding box if <useBoundingBox> is true.\n */\nmxGraphLayout.prototype.getVertexBounds = function(cell)\n{\n\tvar geo = this.graph.getModel().getGeometry(cell);\n\n\t// Checks for oversize label bounding box and corrects\n\t// the return value accordingly\n\t// TODO: Use mxUtils.getStringSize for label bounds\n\tif (this.useBoundingBox)\n\t{\n\t\tvar state = this.graph.getView().getState(cell);\n\n\t\tif (state != null && state.text != null && state.text.boundingBox != null)\n\t\t{\n\t\t\tvar scale = this.graph.getView().scale;\n\t\t\tvar tmp = state.text.boundingBox;\n\n\t\t\tvar dx0 = Math.max(state.x - tmp.x, 0) / scale;\n\t\t\tvar dy0 = Math.max(state.y - tmp.y, 0) / scale;\n\t\t\tvar dx1 = Math.max((tmp.x + tmp.width) - (state.x + state.width), 0) / scale;\n  \t\t\tvar dy1 = Math.max((tmp.y + tmp.height) - (state.y + state.height), 0) / scale;\n\n\t\t\tgeo = new mxRectangle(geo.x - dx0, geo.y - dy0, geo.width + dx0 + dx1, geo.height + dy0 + dy1);\n\t\t}\n\t}\n\n\tif (this.parent != null)\n\t{\n\t\tvar parent = this.graph.getModel().getParent(cell);\n\t\tgeo = geo.clone();\n\n\t\tif (parent != null && parent != this.parent)\n\t\t{\n\t\t\tvar parentOffset = this.getParentOffset(parent);\n\t\t\tgeo.x = geo.x + parentOffset.x;\n\t\t\tgeo.y = geo.y + parentOffset.y;\n\t\t}\n\t}\n\n\treturn new mxRectangle(geo.x, geo.y, geo.width, geo.height);\n};\n\n/**\n * Function: arrangeGroups\n * \n * Shortcut to <mxGraph.updateGroupBounds> with moveGroup set to true.\n */\nmxGraphLayout.prototype.arrangeGroups = function(cells, border, topBorder, rightBorder, bottomBorder, leftBorder)\n{\n\treturn this.graph.updateGroupBounds(cells, border, true, topBorder, rightBorder, bottomBorder, leftBorder);\n};\n\n/**\n * Class: WeightedCellSorter\n * \n * A utility class used to track cells whilst sorting occurs on the weighted\n * sum of their connected edges. Does not violate (x.compareTo(y)==0) ==\n * (x.equals(y))\n *\n * Constructor: WeightedCellSorter\n * \n * Constructs a new weighted cell sorted for the given cell and weight.\n */\nfunction WeightedCellSorter(cell, weightedValue)\n{\n\tthis.cell = cell;\n\tthis.weightedValue = weightedValue;\n};\n\n/**\n * Variable: weightedValue\n * \n * The weighted value of the cell stored.\n */\nWeightedCellSorter.prototype.weightedValue = 0;\n\n/**\n * Variable: nudge\n * \n * Whether or not to flip equal weight values.\n */\nWeightedCellSorter.prototype.nudge = false;\n\n/**\n * Variable: visited\n * \n * Whether or not this cell has been visited in the current assignment.\n */\nWeightedCellSorter.prototype.visited = false;\n\n/**\n * Variable: rankIndex\n * \n * The index this cell is in the model rank.\n */\nWeightedCellSorter.prototype.rankIndex = null;\n\n/**\n * Variable: cell\n * \n * The cell whose median value is being calculated.\n */\nWeightedCellSorter.prototype.cell = null;\n\n/**\n * Function: compare\n * \n * Compares two WeightedCellSorters.\n */\nWeightedCellSorter.prototype.compare = function(a, b)\n{\n\tif (a != null && b != null)\n\t{\n\t\tif (b.weightedValue > a.weightedValue)\n\t\t{\n\t\t\treturn -1;\n\t\t}\n\t\telse if (b.weightedValue < a.weightedValue)\n\t\t{\n\t\t\treturn 1;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif (b.nudge)\n\t\t\t{\n\t\t\t\treturn -1;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn 1;\n\t\t\t}\n\t\t}\n\t}\n\telse\n\t{\n\t\treturn 0;\n\t}\n};\n"
  },
  {
    "path": "static/cherry/drawio_demo/src/js/layout/mxParallelEdgeLayout.js",
    "content": "/**\n * Copyright (c) 2006-2015, JGraph Ltd\n * Copyright (c) 2006-2015, Gaudenz Alder\n */\n/**\n * Class: mxParallelEdgeLayout\n * \n * Extends <mxGraphLayout> for arranging parallel edges. This layout works\n * on edges for all pairs of vertices where there is more than one edge\n * connecting the latter.\n * \n * Example:\n * \n * (code)\n * var layout = new mxParallelEdgeLayout(graph);\n * layout.execute(graph.getDefaultParent());\n * (end)\n * \n * To run the layout for the parallel edges of a changed edge only, the\n * following code can be used.\n * \n * (code)\n * var layout = new mxParallelEdgeLayout(graph);\n * \n * graph.addListener(mxEvent.CELL_CONNECTED, function(sender, evt)\n * {\n *   var model = graph.getModel();\n *   var edge = evt.getProperty('edge');\n *   var src = model.getTerminal(edge, true);\n *   var trg = model.getTerminal(edge, false);\n *   \n *   layout.isEdgeIgnored = function(edge2)\n *   {\n *     var src2 = model.getTerminal(edge2, true);\n *     var trg2 = model.getTerminal(edge2, false);\n *     \n *     return !(model.isEdge(edge2) && ((src == src2 && trg == trg2) || (src == trg2 && trg == src2)));\n *   };\n *   \n *   layout.execute(graph.getDefaultParent());\n * });\n * (end)\n * \n * Constructor: mxCompactTreeLayout\n * \n * Constructs a new fast organic layout for the specified graph.\n */\nfunction mxParallelEdgeLayout(graph)\n{\n\tmxGraphLayout.call(this, graph);\n};\n\n/**\n * Extends mxGraphLayout.\n */\nmxParallelEdgeLayout.prototype = new mxGraphLayout();\nmxParallelEdgeLayout.prototype.constructor = mxParallelEdgeLayout;\n\n/**\n * Variable: spacing\n * \n * Defines the spacing between the parallels. Default is 20.\n */\nmxParallelEdgeLayout.prototype.spacing = 20;\n\n/**\n * Function: execute\n * \n * Implements <mxGraphLayout.execute>.\n */\nmxParallelEdgeLayout.prototype.execute = function(parent)\n{\n\tvar lookup = this.findParallels(parent);\n\t\n\tthis.graph.model.beginUpdate();\t\n\ttry\n\t{\n\t\tfor (var i in lookup)\n\t\t{\n\t\t\tvar parallels = lookup[i];\n\n\t\t\tif (parallels.length > 1)\n\t\t\t{\n\t\t\t\tthis.layout(parallels);\n\t\t\t}\n\t\t}\n\t}\n\tfinally\n\t{\n\t\tthis.graph.model.endUpdate();\n\t}\n};\n\n/**\n * Function: findParallels\n * \n * Finds the parallel edges in the given parent.\n */\nmxParallelEdgeLayout.prototype.findParallels = function(parent)\n{\n\tvar model = this.graph.getModel();\n\tvar lookup = [];\n\tvar childCount = model.getChildCount(parent);\n\t\n\tfor (var i = 0; i < childCount; i++)\n\t{\n\t\tvar child = model.getChildAt(parent, i);\n\t\t\n\t\tif (!this.isEdgeIgnored(child))\n\t\t{\n\t\t\tvar id = this.getEdgeId(child);\n\t\t\t\n\t\t\tif (id != null)\n\t\t\t{\n\t\t\t\tif (lookup[id] == null)\n\t\t\t\t{\n\t\t\t\t\tlookup[id] = [];\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tlookup[id].push(child);\n\t\t\t}\n\t\t}\n\t}\n\t\n\treturn lookup;\n};\n\n/**\n * Function: getEdgeId\n * \n * Returns a unique ID for the given edge. The id is independent of the\n * edge direction and is built using the visible terminal of the given\n * edge.\n */\nmxParallelEdgeLayout.prototype.getEdgeId = function(edge)\n{\n\tvar view = this.graph.getView();\n\t\n\t// Cannot used cached visible terminal because this could be triggered in BEFORE_UNDO\n\tvar src = view.getVisibleTerminal(edge, true);\n\tvar trg = view.getVisibleTerminal(edge, false);\n\n\tif (src != null && trg != null)\n\t{\n\t\tsrc = mxObjectIdentity.get(src);\n\t\ttrg = mxObjectIdentity.get(trg);\n\t\t\n\t\treturn (src > trg) ? trg + '-' + src : src + '-' + trg;\n\t}\n\t\n\treturn null;\n};\n\n/**\n * Function: layout\n * \n * Lays out the parallel edges in the given array.\n */\nmxParallelEdgeLayout.prototype.layout = function(parallels)\n{\n\tvar edge = parallels[0];\n\tvar view = this.graph.getView();\n\tvar model = this.graph.getModel();\n\tvar src = model.getGeometry(view.getVisibleTerminal(edge, true));\n\tvar trg = model.getGeometry(view.getVisibleTerminal(edge, false));\n\t\n\t// Routes multiple loops\n\tif (src == trg)\n\t{\n\t\tvar x0 = src.x + src.width + this.spacing;\n\t\tvar y0 = src.y + src.height / 2;\n\n\t\tfor (var i = 0; i < parallels.length; i++)\n\t\t{\n\t\t\tthis.route(parallels[i], x0, y0);\n\t\t\tx0 += this.spacing;\n\t\t}\n\t}\n\telse if (src != null && trg != null)\n\t{\n\t\t// Routes parallel edges\n\t\tvar scx = src.x + src.width / 2;\n\t\tvar scy = src.y + src.height / 2;\n\t\t\n\t\tvar tcx = trg.x + trg.width / 2;\n\t\tvar tcy = trg.y + trg.height / 2;\n\t\t\n\t\tvar dx = tcx - scx;\n\t\tvar dy = tcy - scy;\n\n\t\tvar len = Math.sqrt(dx * dx + dy * dy);\n\t\t\n\t\tif (len > 0)\n\t\t{\n\t\t\tvar x0 = scx + dx / 2;\n\t\t\tvar y0 = scy + dy / 2;\n\t\t\t\n\t\t\tvar nx = dy * this.spacing / len;\n\t\t\tvar ny = dx * this.spacing / len;\n\t\t\t\n\t\t\tx0 += nx * (parallels.length - 1) / 2;\n\t\t\ty0 -= ny * (parallels.length - 1) / 2;\n\t\n\t\t\tfor (var i = 0; i < parallels.length; i++)\n\t\t\t{\n\t\t\t\tthis.route(parallels[i], x0, y0);\n\t\t\t\tx0 -= nx;\n\t\t\t\ty0 += ny;\n\t\t\t}\n\t\t}\n\t}\n};\n\n/**\n * Function: route\n * \n * Routes the given edge via the given point.\n */\nmxParallelEdgeLayout.prototype.route = function(edge, x, y)\n{\n\tif (this.graph.isCellMovable(edge))\n\t{\n\t\tthis.setEdgePoints(edge, [new mxPoint(x, y)]);\n\t}\n};\n"
  },
  {
    "path": "static/cherry/drawio_demo/src/js/layout/mxPartitionLayout.js",
    "content": "/**\n * Copyright (c) 2006-2015, JGraph Ltd\n * Copyright (c) 2006-2015, Gaudenz Alder\n */\n/**\n * Class: mxPartitionLayout\n * \n * Extends <mxGraphLayout> for partitioning the parent cell vertically or\n * horizontally by filling the complete area with the child cells. A horizontal\n * layout partitions the height of the given parent whereas a a non-horizontal\n * layout partitions the width. If the parent is a layer (that is, a child of\n * the root node), then the current graph size is partitioned. The children do\n * not need to be connected for this layout to work.\n * \n * Example:\n * \n * (code)\n * var layout = new mxPartitionLayout(graph, true, 10, 20);\n * layout.execute(graph.getDefaultParent());\n * (end)\n * \n * Constructor: mxPartitionLayout\n * \n * Constructs a new stack layout layout for the specified graph,\n * spacing, orientation and offset.\n */\nfunction mxPartitionLayout(graph, horizontal, spacing, border)\n{\n\tmxGraphLayout.call(this, graph);\n\tthis.horizontal = (horizontal != null) ? horizontal : true;\n\tthis.spacing = spacing || 0;\n\tthis.border = border || 0;\n};\n\n/**\n * Extends mxGraphLayout.\n */\nmxPartitionLayout.prototype = new mxGraphLayout();\nmxPartitionLayout.prototype.constructor = mxPartitionLayout;\n\n/**\n * Variable: horizontal\n * \n * Boolean indicating the direction in which the space is partitioned.\n * Default is true.\n */\nmxPartitionLayout.prototype.horizontal = null;\n\n/**\n * Variable: spacing\n * \n * Integer that specifies the absolute spacing in pixels between the\n * children. Default is 0.\n */\nmxPartitionLayout.prototype.spacing = null;\n\n/**\n * Variable: border\n * \n * Integer that specifies the absolute inset in pixels for the parent that\n * contains the children. Default is 0.\n */\nmxPartitionLayout.prototype.border = null;\n\n/**\n * Variable: resizeVertices\n * \n * Boolean that specifies if vertices should be resized. Default is true.\n */\nmxPartitionLayout.prototype.resizeVertices = true;\n\n/**\n * Function: isHorizontal\n * \n * Returns <horizontal>.\n */\nmxPartitionLayout.prototype.isHorizontal = function()\n{\n\treturn this.horizontal;\n};\n\n/**\n * Function: moveCell\n * \n * Implements <mxGraphLayout.moveCell>.\n */\nmxPartitionLayout.prototype.moveCell = function(cell, x, y)\n{\n\tvar model = this.graph.getModel();\n\tvar parent = model.getParent(cell);\n\t\n\tif (cell != null &&\n\t\tparent != null)\n\t{\n\t\tvar i = 0;\n\t\tvar last = 0;\n\t\tvar childCount = model.getChildCount(parent);\n\t\t\n\t\t// Finds index of the closest swimlane\n\t\t// TODO: Take into account the orientation\n\t\tfor (i = 0; i < childCount; i++)\n\t\t{\n\t\t\tvar child = model.getChildAt(parent, i);\n\t\t\tvar bounds = this.getVertexBounds(child);\n\t\t\t\n\t\t\tif (bounds != null)\n\t\t\t{\n\t\t\t\tvar tmp = bounds.x + bounds.width / 2;\n\t\t\t\t\n\t\t\t\tif (last < x && tmp > x)\n\t\t\t\t{\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tlast = tmp;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Changes child order in parent\n\t\tvar idx = parent.getIndex(cell);\n\t\tidx = Math.max(0, i - ((i > idx) ? 1 : 0));\n\t\t\n\t\tmodel.add(parent, cell, idx);\n\t}\n};\n\n/**\n * Function: execute\n * \n * Implements <mxGraphLayout.execute>. All children where <isVertexIgnored>\n * returns false and <isVertexMovable> returns true are modified.\n */\nmxPartitionLayout.prototype.execute = function(parent)\n{\n\tvar horizontal = this.isHorizontal();\n\tvar model = this.graph.getModel();\n\tvar pgeo = model.getGeometry(parent);\n\t\n\t// Handles special case where the parent is either a layer with no\n\t// geometry or the current root of the view in which case the size\n\t// of the graph's container will be used.\n\tif (this.graph.container != null &&\n\t\t((pgeo == null &&\n\t\tmodel.isLayer(parent)) ||\n\t\tparent == this.graph.getView().currentRoot))\n\t{\n\t\tvar width = this.graph.container.offsetWidth - 1;\n\t\tvar height = this.graph.container.offsetHeight - 1;\n\t\tpgeo = new mxRectangle(0, 0, width, height);\n\t}\n\n\tif (pgeo != null)\n\t{\n\t\tvar children = [];\n\t\tvar childCount = model.getChildCount(parent);\n\t\t\n\t\tfor (var i = 0; i < childCount; i++)\n\t\t{\n\t\t\tvar child = model.getChildAt(parent, i);\n\t\t\t\n\t\t\tif (!this.isVertexIgnored(child) &&\n\t\t\t\tthis.isVertexMovable(child))\n\t\t\t{\n\t\t\t\tchildren.push(child);\n\t\t\t}\n\t\t}\n\t\t\n\t\tvar n = children.length;\n\n\t\tif (n > 0)\n\t\t{\n\t\t\tvar x0 = this.border;\n\t\t\tvar y0 = this.border;\n\t\t\tvar other = (horizontal) ? pgeo.height : pgeo.width;\n\t\t\tother -= 2 * this.border;\n\n\t\t\tvar size = (this.graph.isSwimlane(parent)) ?\n\t\t\t\tthis.graph.getStartSize(parent) :\n\t\t\t\tnew mxRectangle();\n\n\t\t\tother -= (horizontal) ? size.height : size.width;\n\t\t\tx0 = x0 + size.width;\n\t\t\ty0 = y0 + size.height;\n\n\t\t\tvar tmp = this.border + (n - 1) * this.spacing;\n\t\t\tvar value = (horizontal) ?\n\t\t\t\t((pgeo.width - x0 - tmp) / n) :\n\t\t\t\t((pgeo.height - y0 - tmp) / n);\n\t\t\t\n\t\t\t// Avoids negative values, that is values where the sum of the\n\t\t\t// spacing plus the border is larger then the available space\n\t\t\tif (value > 0)\n\t\t\t{\n\t\t\t\tmodel.beginUpdate();\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tfor (var i = 0; i < n; i++)\n\t\t\t\t\t{\n\t\t\t\t\t\tvar child = children[i];\n\t\t\t\t\t\tvar geo = model.getGeometry(child);\n\t\t\t\t\t\n\t\t\t\t\t\tif (geo != null)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tgeo = geo.clone();\n\t\t\t\t\t\t\tgeo.x = x0;\n\t\t\t\t\t\t\tgeo.y = y0;\n\n\t\t\t\t\t\t\tif (horizontal)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif (this.resizeVertices)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tgeo.width = value;\n\t\t\t\t\t\t\t\t\tgeo.height = other;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tx0 += value + this.spacing;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif (this.resizeVertices)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tgeo.height = value;\n\t\t\t\t\t\t\t\t\tgeo.width = other;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\ty0 += value + this.spacing;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tmodel.setGeometry(child, geo);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tfinally\n\t\t\t\t{\n\t\t\t\t\tmodel.endUpdate();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n};\n"
  },
  {
    "path": "static/cherry/drawio_demo/src/js/layout/mxRadialTreeLayout.js",
    "content": "/**\n * Copyright (c) 2006-2015, JGraph Ltd\n * Copyright (c) 2006-2015, Gaudenz Alder\n */\n/**\n * Class: mxRadialTreeLayout\n * \n * Extends <mxGraphLayout> to implement a radial tree algorithm. This\n * layout is suitable for graphs that have no cycles (trees). Vertices that are\n * not connected to the tree will be ignored by this layout.\n * \n * Example:\n * \n * (code)\n * var layout = new mxRadialTreeLayout(graph);\n * layout.execute(graph.getDefaultParent());\n * (end)\n * \n * Constructor: mxRadialTreeLayout\n * \n * Constructs a new radial tree layout for the specified graph\n */\nfunction mxRadialTreeLayout(graph)\n{\n\tmxCompactTreeLayout.call(this, graph , false);\n};\n\n/**\n * Extends mxGraphLayout.\n */\nmxUtils.extend(mxRadialTreeLayout, mxCompactTreeLayout);\n\n/**\n * Variable: angleOffset\n *\n * The initial offset to compute the angle position.\n */\nmxRadialTreeLayout.prototype.angleOffset = 0.5;\n\n/**\n * Variable: rootx\n *\n * The X co-ordinate of the root cell\n */\nmxRadialTreeLayout.prototype.rootx = 0;\n\n/**\n * Variable: rooty\n *\n * The Y co-ordinate of the root cell\n */\nmxRadialTreeLayout.prototype.rooty = 0;\n\n/**\n * Variable: levelDistance\n *\n * Holds the levelDistance. Default is 120.\n */\nmxRadialTreeLayout.prototype.levelDistance = 120;\n\n/**\n * Variable: nodeDistance\n *\n * Holds the nodeDistance. Default is 10.\n */\nmxRadialTreeLayout.prototype.nodeDistance = 10;\n\n/**\n * Variable: autoRadius\n * \n * Specifies if the radios should be computed automatically\n */\nmxRadialTreeLayout.prototype.autoRadius = false;\n\n/**\n * Variable: sortEdges\n * \n * Specifies if edges should be sorted according to the order of their\n * opposite terminal cell in the model.\n */\nmxRadialTreeLayout.prototype.sortEdges = false;\n\n/**\n * Variable: rowMinX\n * \n * Array of leftmost x coordinate of each row\n */\nmxRadialTreeLayout.prototype.rowMinX = [];\n\n/**\n * Variable: rowMaxX\n * \n * Array of rightmost x coordinate of each row\n */\nmxRadialTreeLayout.prototype.rowMaxX = [];\n\n/**\n * Variable: rowMinCenX\n * \n * Array of x coordinate of leftmost vertex of each row\n */\nmxRadialTreeLayout.prototype.rowMinCenX = [];\n\n/**\n * Variable: rowMaxCenX\n * \n * Array of x coordinate of rightmost vertex of each row\n */\nmxRadialTreeLayout.prototype.rowMaxCenX = [];\n\n/**\n * Variable: rowRadi\n * \n * Array of y deltas of each row behind root vertex, also the radius in the tree\n */\nmxRadialTreeLayout.prototype.rowRadi = [];\n\n/**\n * Variable: row\n * \n * Array of vertices on each row\n */\nmxRadialTreeLayout.prototype.row = [];\n\n/**\n * Function: isVertexIgnored\n * \n * Returns a boolean indicating if the given <mxCell> should be ignored as a\n * vertex. This returns true if the cell has no connections.\n * \n * Parameters:\n * \n * vertex - <mxCell> whose ignored state should be returned.\n */\nmxRadialTreeLayout.prototype.isVertexIgnored = function(vertex)\n{\n\treturn mxGraphLayout.prototype.isVertexIgnored.apply(this, arguments) ||\n\t\tthis.graph.getConnections(vertex).length == 0;\n};\n\n/**\n * Function: execute\n * \n * Implements <mxGraphLayout.execute>.\n * \n * If the parent has any connected edges, then it is used as the root of\n * the tree. Else, <mxGraph.findTreeRoots> will be used to find a suitable\n * root node within the set of children of the given parent.\n * \n * Parameters:\n * \n * parent - <mxCell> whose children should be laid out.\n * root - Optional <mxCell> that will be used as the root of the tree.\n */\nmxRadialTreeLayout.prototype.execute = function(parent, root)\n{\n\tthis.parent = parent;\n\t\n\tthis.useBoundingBox = false;\n\tthis.edgeRouting = false;\n\t//this.horizontal = false;\n\n\tmxCompactTreeLayout.prototype.execute.apply(this, arguments);\n\t\n\tvar bounds = null;\n\tvar rootBounds = this.getVertexBounds(this.root);\n\tthis.centerX = rootBounds.x + rootBounds.width / 2;\n\tthis.centerY = rootBounds.y + rootBounds.height / 2;\n\n\t// Calculate the bounds of the involved vertices directly from the values set in the compact tree\n\tfor (var vertex in this.visited)\n\t{\n\t\tvar vertexBounds = this.getVertexBounds(this.visited[vertex]);\n\t\tbounds = (bounds != null) ? bounds : vertexBounds.clone();\n\t\tbounds.add(vertexBounds);\n\t}\n\t\n\tthis.calcRowDims([this.node], 0);\n\t\n\tvar maxLeftGrad = 0;\n\tvar maxRightGrad = 0;\n\n\t// Find the steepest left and right gradients\n\tfor (var i = 0; i < this.row.length; i++)\n\t{\n\t\tvar leftGrad = (this.centerX - this.rowMinX[i] - this.nodeDistance) / this.rowRadi[i];\n\t\tvar rightGrad = (this.rowMaxX[i] - this.centerX - this.nodeDistance) / this.rowRadi[i];\n\t\t\n\t\tmaxLeftGrad = Math.max (maxLeftGrad, leftGrad);\n\t\tmaxRightGrad = Math.max (maxRightGrad, rightGrad);\n\t}\n\t\n\t// Extend out row so they meet the maximum gradient and convert to polar co-ords\n\tfor (var i = 0; i < this.row.length; i++)\n\t{\n\t\tvar xLeftLimit = this.centerX - this.nodeDistance - maxLeftGrad * this.rowRadi[i];\n\t\tvar xRightLimit = this.centerX + this.nodeDistance + maxRightGrad * this.rowRadi[i];\n\t\tvar fullWidth = xRightLimit - xLeftLimit;\n\t\t\n\t\tfor (var j = 0; j < this.row[i].length; j ++)\n\t\t{\n\t\t\tvar row = this.row[i];\n\t\t\tvar node = row[j];\n\t\t\tvar vertexBounds = this.getVertexBounds(node.cell);\n\t\t\tvar xProportion = (vertexBounds.x + vertexBounds.width / 2 - xLeftLimit) / (fullWidth);\n\t\t\tvar theta =  2 * Math.PI * xProportion;\n\t\t\tnode.theta = theta;\n\t\t}\n\t}\n\n\t// Post-process from outside inwards to try to align parents with children\n\tfor (var i = this.row.length - 2; i >= 0; i--)\n\t{\n\t\tvar row = this.row[i];\n\t\t\n\t\tfor (var j = 0; j < row.length; j++)\n\t\t{\n\t\t\tvar node = row[j];\n\t\t\tvar child = node.child;\n\t\t\tvar counter = 0;\n\t\t\tvar totalTheta = 0;\n\t\t\t\n\t\t\twhile (child != null)\n\t\t\t{\n\t\t\t\ttotalTheta += child.theta;\n\t\t\t\tcounter++;\n\t\t\t\tchild = child.next;\n\t\t\t}\n\t\t\t\n\t\t\tif (counter > 0)\n\t\t\t{\n\t\t\t\tvar averTheta = totalTheta / counter;\n\t\t\t\t\n\t\t\t\tif (averTheta > node.theta && j < row.length - 1)\n\t\t\t\t{\n\t\t\t\t\tvar nextTheta = row[j+1].theta;\n\t\t\t\t\tnode.theta = Math.min (averTheta, nextTheta - Math.PI/10);\n\t\t\t\t}\n\t\t\t\telse if (averTheta < node.theta && j > 0 )\n\t\t\t\t{\n\t\t\t\t\tvar lastTheta = row[j-1].theta;\n\t\t\t\t\tnode.theta = Math.max (averTheta, lastTheta + Math.PI/10);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t\n\t// Set locations\n\tfor (var i = 0; i < this.row.length; i++)\n\t{\n\t\tfor (var j = 0; j < this.row[i].length; j ++)\n\t\t{\n\t\t\tvar row = this.row[i];\n\t\t\tvar node = row[j];\n\t\t\tvar vertexBounds = this.getVertexBounds(node.cell);\n\t\t\tthis.setVertexLocation(node.cell,\n\t\t\t\t\t\t\t\t\tthis.centerX - vertexBounds.width / 2 + this.rowRadi[i] * Math.cos(node.theta),\n\t\t\t\t\t\t\t\t\tthis.centerY - vertexBounds.height / 2 + this.rowRadi[i] * Math.sin(node.theta));\n\t\t}\n\t}\n};\n\n/**\n * Function: calcRowDims\n * \n * Recursive function to calculate the dimensions of each row\n * \n * Parameters:\n * \n * row - Array of internal nodes, the children of which are to be processed.\n * rowNum - Integer indicating which row is being processed.\n */\nmxRadialTreeLayout.prototype.calcRowDims = function(row, rowNum)\n{\n\tif (row == null || row.length == 0)\n\t{\n\t\treturn;\n\t}\n\n\t// Place root's children proportionally around the first level\n\tthis.rowMinX[rowNum] = this.centerX;\n\tthis.rowMaxX[rowNum] = this.centerX;\n\tthis.rowMinCenX[rowNum] = this.centerX;\n\tthis.rowMaxCenX[rowNum] = this.centerX;\n\tthis.row[rowNum] = [];\n\n\tvar rowHasChildren = false;\n\n\tfor (var i = 0; i < row.length; i++)\n\t{\n\t\tvar child = row[i] != null ? row[i].child : null;\n\n\t\twhile (child != null)\n\t\t{\n\t\t\tvar cell = child.cell;\n\t\t\tvar vertexBounds = this.getVertexBounds(cell);\n\t\t\t\n\t\t\tthis.rowMinX[rowNum] = Math.min(vertexBounds.x, this.rowMinX[rowNum]);\n\t\t\tthis.rowMaxX[rowNum] = Math.max(vertexBounds.x + vertexBounds.width, this.rowMaxX[rowNum]);\n\t\t\tthis.rowMinCenX[rowNum] = Math.min(vertexBounds.x + vertexBounds.width / 2, this.rowMinCenX[rowNum]);\n\t\t\tthis.rowMaxCenX[rowNum] = Math.max(vertexBounds.x + vertexBounds.width / 2, this.rowMaxCenX[rowNum]);\n\t\t\tthis.rowRadi[rowNum] = vertexBounds.y - this.getVertexBounds(this.root).y;\n\t\n\t\t\tif (child.child != null)\n\t\t\t{\n\t\t\t\trowHasChildren = true;\n\t\t\t}\n\t\t\t\n\t\t\tthis.row[rowNum].push(child);\n\t\t\tchild = child.next;\n\t\t}\n\t}\n\t\n\tif (rowHasChildren)\n\t{\n\t\tthis.calcRowDims(this.row[rowNum], rowNum + 1);\n\t}\n};\n"
  },
  {
    "path": "static/cherry/drawio_demo/src/js/layout/mxStackLayout.js",
    "content": "/**\n * Copyright (c) 2006-2015, JGraph Ltd\n * Copyright (c) 2006-2015, Gaudenz Alder\n */\n/**\n * Class: mxStackLayout\n * \n * Extends <mxGraphLayout> to create a horizontal or vertical stack of the\n * child vertices. The children do not need to be connected for this layout\n * to work.\n * \n * Example:\n * \n * (code)\n * var layout = new mxStackLayout(graph, true);\n * layout.execute(graph.getDefaultParent());\n * (end)\n * \n * Constructor: mxStackLayout\n * \n * Constructs a new stack layout layout for the specified graph,\n * spacing, orientation and offset.\n */\nfunction mxStackLayout(graph, horizontal, spacing, x0, y0, border)\n{\n\tmxGraphLayout.call(this, graph);\n\tthis.horizontal = (horizontal != null) ? horizontal : true;\n\tthis.spacing = (spacing != null) ? spacing : 0;\n\tthis.x0 = (x0 != null) ? x0 : 0;\n\tthis.y0 = (y0 != null) ? y0 : 0;\n\tthis.border = (border != null) ? border : 0;\n};\n\n/**\n * Extends mxGraphLayout.\n */\nmxStackLayout.prototype = new mxGraphLayout();\nmxStackLayout.prototype.constructor = mxStackLayout;\n\n/**\n * Variable: horizontal\n *\n * Specifies the orientation of the layout. Default is true.\n */\nmxStackLayout.prototype.horizontal = null;\n\n/**\n * Variable: spacing\n *\n * Specifies the spacing between the cells. Default is 0.\n */\nmxStackLayout.prototype.spacing = null;\n\n/**\n * Variable: x0\n *\n * Specifies the horizontal origin of the layout. Default is 0.\n */\nmxStackLayout.prototype.x0 = null;\n\n/**\n * Variable: y0\n *\n * Specifies the vertical origin of the layout. Default is 0.\n */\nmxStackLayout.prototype.y0 = null;\n\n/**\n * Variable: border\n *\n * Border to be added if fill is true. Default is 0.\n */\nmxStackLayout.prototype.border = 0;\n\n/**\n * Variable: marginTop\n * \n * Top margin for the child area. Default is 0.\n */\nmxStackLayout.prototype.marginTop = 0;\n\n/**\n * Variable: marginLeft\n * \n * Top margin for the child area. Default is 0.\n */\nmxStackLayout.prototype.marginLeft = 0;\n\n/**\n * Variable: marginRight\n * \n * Top margin for the child area. Default is 0.\n */\nmxStackLayout.prototype.marginRight = 0;\n\n/**\n * Variable: marginBottom\n * \n * Top margin for the child area. Default is 0.\n */\nmxStackLayout.prototype.marginBottom = 0;\n\n/**\n * Variable: keepFirstLocation\n * \n * Boolean indicating if the location of the first cell should be\n * kept, that is, it will not be moved to x0 or y0.\n */\nmxStackLayout.prototype.keepFirstLocation = false;\n\n/**\n * Variable: fill\n * \n * Boolean indicating if dimension should be changed to fill out the parent\n * cell. Default is false.\n */\nmxStackLayout.prototype.fill = false;\n\t\n/**\n * Variable: resizeParent\n * \n * If the parent should be resized to match the width/height of the\n * stack. Default is false.\n */\nmxStackLayout.prototype.resizeParent = false;\n\n/**\n * Variable: resizeParentMax\n * \n * Use maximum of existing value and new value for resize of parent.\n * Default is false.\n */\nmxStackLayout.prototype.resizeParentMax = false;\n\n/**\n * Variable: resizeLast\n * \n * If the last element should be resized to fill out the parent. Default is\n * false. If <resizeParent> is true then this is ignored.\n */\nmxStackLayout.prototype.resizeLast = false;\n\n/**\n * Variable: wrap\n * \n * Value at which a new column or row should be created. Default is null.\n */\nmxStackLayout.prototype.wrap = null;\n\n/**\n * Variable: borderCollapse\n * \n * If the strokeWidth should be ignored. Default is true.\n */\nmxStackLayout.prototype.borderCollapse = true;\n\n/**\n * Function: isHorizontal\n * \n * Returns <horizontal>.\n */\nmxStackLayout.prototype.isHorizontal = function()\n{\n\treturn this.horizontal;\n};\n\n/**\n * Function: moveCell\n * \n * Implements <mxGraphLayout.moveCell>.\n */\nmxStackLayout.prototype.moveCell = function(cell, x, y)\n{\n\tvar model = this.graph.getModel();\n\tvar parent = model.getParent(cell);\n\tvar horizontal = this.isHorizontal();\n\t\n\tif (cell != null && parent != null)\n\t{\n\t\tvar i = 0;\n\t\tvar last = 0;\n\t\tvar childCount = model.getChildCount(parent);\n\t\tvar value = (horizontal) ? x : y;\n\t\tvar pstate = this.graph.getView().getState(parent);\n\n\t\tif (pstate != null)\n\t\t{\n\t\t\tvalue -= (horizontal) ? pstate.x : pstate.y;\n\t\t}\n\t\t\n\t\tvalue /= this.graph.view.scale;\n\t\t\n\t\tfor (i = 0; i < childCount; i++)\n\t\t{\n\t\t\tvar child = model.getChildAt(parent, i);\n\t\t\t\n\t\t\tif (child != cell)\n\t\t\t{\n\t\t\t\tvar bounds = model.getGeometry(child);\n\t\t\t\t\n\t\t\t\tif (bounds != null)\n\t\t\t\t{\n\t\t\t\t\tvar tmp = (horizontal) ?\n\t\t\t\t\t\tbounds.x + bounds.width / 2 :\n\t\t\t\t\t\tbounds.y + bounds.height / 2;\n\t\t\t\t\t\n\t\t\t\t\tif (last <= value && tmp > value)\n\t\t\t\t\t{\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tlast = tmp;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Changes child order in parent\n\t\tvar idx = parent.getIndex(cell);\n\t\tidx = Math.max(0, i - ((i > idx) ? 1 : 0));\n\n\t\tmodel.add(parent, cell, idx);\n\t}\n};\n\n/**\n * Function: getParentSize\n * \n * Returns the size for the parent container or the size of the graph\n * container if the parent is a layer or the root of the model.\n */\nmxStackLayout.prototype.getParentSize = function(parent)\n{\n\tvar model = this.graph.getModel();\t\t\t\n\tvar pgeo = model.getGeometry(parent);\n\t\n\t// Handles special case where the parent is either a layer with no\n\t// geometry or the current root of the view in which case the size\n\t// of the graph's container will be used.\n\tif (this.graph.container != null && ((pgeo == null &&\n\t\tmodel.isLayer(parent)) || parent == this.graph.getView().currentRoot))\n\t{\n\t\tvar width = this.graph.container.offsetWidth - 1;\n\t\tvar height = this.graph.container.offsetHeight - 1;\n\t\tpgeo = new mxRectangle(0, 0, width, height);\n\t}\n\t\n\treturn pgeo;\n};\n\n/**\n * Function: execute\n * \n * Implements <mxGraphLayout.execute>.\n * \n * Only children where <isVertexIgnored> returns false are taken into\n * account.\n */\nmxStackLayout.prototype.execute = function(parent)\n{\n\tif (parent != null)\n\t{\n\t\tvar pgeo = this.getParentSize(parent);\n\t\tvar horizontal = this.isHorizontal();\n\t\tvar model = this.graph.getModel();\t\n\t\tvar fillValue = null;\n\t\t\n\t\tif (pgeo != null)\n\t\t{\n\t\t\tfillValue = (horizontal) ? pgeo.height - this.marginTop - this.marginBottom :\n\t\t\t\tpgeo.width - this.marginLeft - this.marginRight;\n\t\t}\n\t\t\n\t\tfillValue -= 2 * this.border;\n\t\tvar x0 = this.x0 + this.border + this.marginLeft;\n\t\tvar y0 = this.y0 + this.border + this.marginTop;\n\t\t\n\t\t// Handles swimlane start size\n\t\tif (this.graph.isSwimlane(parent))\n\t\t{\n\t\t\t// Uses computed style to get latest \n\t\t\tvar style = this.graph.getCellStyle(parent);\n\t\t\tvar start = mxUtils.getNumber(style, mxConstants.STYLE_STARTSIZE, mxConstants.DEFAULT_STARTSIZE);\n\t\t\tvar horz = mxUtils.getValue(style, mxConstants.STYLE_HORIZONTAL, true) == 1;\n\n\t\t\tif (pgeo != null)\n\t\t\t{\n\t\t\t\tif (horz)\n\t\t\t\t{\n\t\t\t\t\tstart = Math.min(start, pgeo.height);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tstart = Math.min(start, pgeo.width);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif (horizontal == horz)\n\t\t\t{\n\t\t\t\tfillValue -= start;\n\t\t\t}\n\n\t\t\tif (horz)\n\t\t\t{\n\t\t\t\ty0 += start;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tx0 += start;\n\t\t\t}\n\t\t}\n\n\t\tmodel.beginUpdate();\n\t\ttry\n\t\t{\n\t\t\tvar tmp = 0;\n\t\t\tvar last = null;\n\t\t\tvar lastValue = 0;\n\t\t\tvar lastChild = null;\n\t\t\tvar childCount = model.getChildCount(parent);\n\t\t\t\n\t\t\tfor (var i = 0; i < childCount; i++)\n\t\t\t{\n\t\t\t\tvar child = model.getChildAt(parent, i);\n\t\t\t\t\n\t\t\t\tif (!this.isVertexIgnored(child) && this.isVertexMovable(child))\n\t\t\t\t{\n\t\t\t\t\tvar geo = model.getGeometry(child);\n\t\t\t\t\t\n\t\t\t\t\tif (geo != null)\n\t\t\t\t\t{\n\t\t\t\t\t\tgeo = geo.clone();\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (this.wrap != null && last != null)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif ((horizontal && last.x + last.width +\n\t\t\t\t\t\t\t\tgeo.width + 2 * this.spacing > this.wrap) ||\n\t\t\t\t\t\t\t\t(!horizontal && last.y + last.height +\n\t\t\t\t\t\t\t\tgeo.height + 2 * this.spacing > this.wrap))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tlast = null;\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tif (horizontal)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\ty0 += tmp + this.spacing;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tx0 += tmp + this.spacing;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\ttmp = 0;\n\t\t\t\t\t\t\t}\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\ttmp = Math.max(tmp, (horizontal) ? geo.height : geo.width);\n\t\t\t\t\t\tvar sw = 0;\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (!this.borderCollapse)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tvar childStyle = this.graph.getCellStyle(child);\n\t\t\t\t\t\t\tsw = mxUtils.getNumber(childStyle, mxConstants.STYLE_STROKEWIDTH, 1);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (last != null)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif (horizontal)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tgeo.x = lastValue + this.spacing + Math.floor(sw / 2);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tgeo.y = lastValue + this.spacing + Math.floor(sw / 2);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if (!this.keepFirstLocation)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif (horizontal)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tgeo.x = x0;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tgeo.y = y0;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (horizontal)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tgeo.y = y0;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tgeo.x = x0;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (this.fill && fillValue != null)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif (horizontal)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tgeo.height = fillValue;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tgeo.width = fillValue;\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tthis.setChildGeometry(child, geo);\n\t\t\t\t\t\tlastChild = child;\n\t\t\t\t\t\tlast = geo;\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (horizontal)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tlastValue = last.x + last.width + Math.floor(sw / 2);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tlastValue = last.y + last.height + Math.floor(sw / 2);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (this.resizeParent && pgeo != null && last != null && !this.graph.isCellCollapsed(parent))\n\t\t\t{\n\t\t\t\tthis.updateParentGeometry(parent, pgeo, last);\n\t\t\t}\n\t\t\telse if (this.resizeLast && pgeo != null && last != null && lastChild != null)\n\t\t\t{\n\t\t\t\tif (horizontal)\n\t\t\t\t{\n\t\t\t\t\tlast.width = pgeo.width - last.x - this.spacing - this.marginRight - this.marginLeft;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tlast.height = pgeo.height - last.y - this.spacing - this.marginBottom;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tthis.setChildGeometry(lastChild, last);\n\t\t\t}\n\t\t}\n\t\tfinally\n\t\t{\n\t\t\tmodel.endUpdate();\n\t\t}\n\t}\n};\n\n/**\n * Function: execute\n * \n * Implements <mxGraphLayout.execute>.\n * \n * Only children where <isVertexIgnored> returns false are taken into\n * account.\n */\nmxStackLayout.prototype.setChildGeometry = function(child, geo)\n{\n\tvar geo2 = this.graph.getCellGeometry(child);\n\t\n\tif (geo2 == null || geo.x != geo2.x || geo.y != geo2.y ||\n\t\tgeo.width != geo2.width || geo.height != geo2.height)\n\t{\n\t\tthis.graph.getModel().setGeometry(child, geo);\n\t}\n};\n\n/**\n * Function: execute\n * \n * Implements <mxGraphLayout.execute>.\n * \n * Only children where <isVertexIgnored> returns false are taken into\n * account.\n */\nmxStackLayout.prototype.updateParentGeometry = function(parent, pgeo, last)\n{\n\tvar horizontal = this.isHorizontal();\n\tvar model = this.graph.getModel();\t\n\n\tvar pgeo2 = pgeo.clone();\n\t\n\tif (horizontal)\n\t{\n\t\tvar tmp = last.x + last.width + this.marginRight + this.border;\n\t\t\n\t\tif (this.resizeParentMax)\n\t\t{\n\t\t\tpgeo2.width = Math.max(pgeo2.width, tmp);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tpgeo2.width = tmp;\n\t\t}\n\t}\n\telse\n\t{\n\t\tvar tmp = last.y + last.height + this.marginBottom + this.border;\n\t\t\n\t\tif (this.resizeParentMax)\n\t\t{\n\t\t\tpgeo2.height = Math.max(pgeo2.height, tmp);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tpgeo2.height = tmp;\n\t\t}\n\t}\n\t\n\tif (pgeo.x != pgeo2.x || pgeo.y != pgeo2.y ||\n\t\tpgeo.width != pgeo2.width || pgeo.height != pgeo2.height)\n\t{\n\t\tmodel.setGeometry(parent, pgeo2);\n\t}\n};\n"
  },
  {
    "path": "static/cherry/drawio_demo/src/js/model/mxCell.js",
    "content": "/**\n * Copyright (c) 2006-2015, JGraph Ltd\n * Copyright (c) 2006-2015, Gaudenz Alder\n */\n/**\n * Class: mxCell\n *\n * Cells are the elements of the graph model. They represent the state\n * of the groups, vertices and edges in a graph.\n * \n * Custom attributes:\n * \n * For custom attributes we recommend using an XML node as the value of a cell.\n * The following code can be used to create a cell with an XML node as the\n * value:\n * \n * (code)\n * var doc = mxUtils.createXmlDocument();\n * var node = doc.createElement('MyNode')\n * node.setAttribute('label', 'MyLabel');\n * node.setAttribute('attribute1', 'value1');\n * graph.insertVertex(graph.getDefaultParent(), null, node, 40, 40, 80, 30);\n * (end)\n * \n * For the label to work, <mxGraph.convertValueToString> and\n * <mxGraph.cellLabelChanged> should be overridden as follows:\n * \n * (code)\n * graph.convertValueToString = function(cell)\n * {\n *   if (mxUtils.isNode(cell.value))\n *   {\n *     return cell.getAttribute('label', '')\n *   }\n * };\n * \n * var cellLabelChanged = graph.cellLabelChanged;\n * graph.cellLabelChanged = function(cell, newValue, autoSize)\n * {\n *   if (mxUtils.isNode(cell.value))\n *   {\n *     // Clones the value for correct undo/redo\n *     var elt = cell.value.cloneNode(true);\n *     elt.setAttribute('label', newValue);\n *     newValue = elt;\n *   }\n *   \n *   cellLabelChanged.apply(this, arguments);\n * };\n * (end)\n * \n * Callback: onInit\n *\n * Called from within the constructor.\n * \n * Constructor: mxCell\n *\n * Constructs a new cell to be used in a graph model.\n * This method invokes <onInit> upon completion.\n * \n * Parameters:\n * \n * value - Optional object that represents the cell value.\n * geometry - Optional <mxGeometry> that specifies the geometry.\n * style - Optional formatted string that defines the style.\n */\nfunction mxCell(value, geometry, style)\n{\n\tthis.value = value;\n\tthis.setGeometry(geometry);\n\tthis.setStyle(style);\n\t\n\tif (this.onInit != null)\n\t{\n\t\tthis.onInit();\n\t}\n};\n\n/**\n * Variable: id\n *\n * Holds the Id. Default is null.\n */\nmxCell.prototype.id = null;\n\n/**\n * Variable: value\n *\n * Holds the user object. Default is null.\n */\nmxCell.prototype.value = null;\n\n/**\n * Variable: geometry\n *\n * Holds the <mxGeometry>. Default is null.\n */\nmxCell.prototype.geometry = null;\n\n/**\n * Variable: style\n *\n * Holds the style as a string of the form [(stylename|key=value);]. Default is\n * null.\n */\nmxCell.prototype.style = null;\n\n/**\n * Variable: vertex\n *\n * Specifies whether the cell is a vertex. Default is false.\n */\nmxCell.prototype.vertex = false;\n\n/**\n * Variable: edge\n *\n * Specifies whether the cell is an edge. Default is false.\n */\nmxCell.prototype.edge = false;\n\n/**\n * Variable: connectable\n *\n * Specifies whether the cell is connectable. Default is true.\n */\nmxCell.prototype.connectable = true;\n\n/**\n * Variable: visible\n *\n * Specifies whether the cell is visible. Default is true.\n */\nmxCell.prototype.visible = true;\n\n/**\n * Variable: collapsed\n *\n * Specifies whether the cell is collapsed. Default is false.\n */\nmxCell.prototype.collapsed = false;\n\n/**\n * Variable: parent\n *\n * Reference to the parent cell.\n */\nmxCell.prototype.parent = null;\n\n/**\n * Variable: source\n *\n * Reference to the source terminal.\n */\nmxCell.prototype.source = null;\n\n/**\n * Variable: target\n *\n * Reference to the target terminal.\n */\nmxCell.prototype.target = null;\n\n/**\n * Variable: children\n *\n * Holds the child cells.\n */\nmxCell.prototype.children = null;\n\n/**\n * Variable: edges\n *\n * Holds the edges.\n */\nmxCell.prototype.edges = null;\n\n/**\n * Variable: mxTransient\n *\n * List of members that should not be cloned inside <clone>. This field is\n * passed to <mxUtils.clone> and is not made persistent in <mxCellCodec>.\n * This is not a convention for all classes, it is only used in this class\n * to mark transient fields since transient modifiers are not supported by\n * the language.\n */\nmxCell.prototype.mxTransient = ['id', 'value', 'parent', 'source',\n                                'target', 'children', 'edges'];\n\n/**\n * Function: getId\n *\n * Returns the Id of the cell as a string.\n */\nmxCell.prototype.getId = function()\n{\n\treturn this.id;\n};\n\t\t\n/**\n * Function: setId\n *\n * Sets the Id of the cell to the given string.\n */\nmxCell.prototype.setId = function(id)\n{\n\tthis.id = id;\n};\n\n/**\n * Function: getValue\n *\n * Returns the user object of the cell. The user\n * object is stored in <value>.\n */\nmxCell.prototype.getValue = function()\n{\n\treturn this.value;\n};\n\t\t\n/**\n * Function: setValue\n *\n * Sets the user object of the cell. The user object\n * is stored in <value>.\n */\nmxCell.prototype.setValue = function(value)\n{\n\tthis.value = value;\n};\n\n/**\n * Function: valueChanged\n *\n * Changes the user object after an in-place edit\n * and returns the previous value. This implementation\n * replaces the user object with the given value and\n * returns the old user object.\n */\nmxCell.prototype.valueChanged = function(newValue)\n{\n\tvar previous = this.getValue();\n\tthis.setValue(newValue);\n\t\n\treturn previous;\n};\n\n/**\n * Function: getGeometry\n *\n * Returns the <mxGeometry> that describes the <geometry>.\n */\nmxCell.prototype.getGeometry = function()\n{\n\treturn this.geometry;\n};\n\n/**\n * Function: setGeometry\n *\n * Sets the <mxGeometry> to be used as the <geometry>.\n */\nmxCell.prototype.setGeometry = function(geometry)\n{\n\tthis.geometry = geometry;\n};\n\n/**\n * Function: getStyle\n *\n * Returns a string that describes the <style>.\n */\nmxCell.prototype.getStyle = function()\n{\n\treturn this.style;\n};\n\n/**\n * Function: setStyle\n *\n * Sets the string to be used as the <style>.\n */\nmxCell.prototype.setStyle = function(style)\n{\n\tthis.style = style;\n};\n\n/**\n * Function: isVertex\n *\n * Returns true if the cell is a vertex.\n */\nmxCell.prototype.isVertex = function()\n{\n\treturn this.vertex != 0;\n};\n\n/**\n * Function: setVertex\n *\n * Specifies if the cell is a vertex. This should only be assigned at\n * construction of the cell and not be changed during its lifecycle.\n * \n * Parameters:\n * \n * vertex - Boolean that specifies if the cell is a vertex.\n */\nmxCell.prototype.setVertex = function(vertex)\n{\n\tthis.vertex = vertex;\n};\n\n/**\n * Function: isEdge\n *\n * Returns true if the cell is an edge.\n */\nmxCell.prototype.isEdge = function()\n{\n\treturn this.edge != 0;\n};\n\t\n/**\n * Function: setEdge\n * \n * Specifies if the cell is an edge. This should only be assigned at\n * construction of the cell and not be changed during its lifecycle.\n * \n * Parameters:\n * \n * edge - Boolean that specifies if the cell is an edge.\n */\nmxCell.prototype.setEdge = function(edge)\n{\n\tthis.edge = edge;\n};\n\n/**\n * Function: isConnectable\n *\n * Returns true if the cell is connectable.\n */\nmxCell.prototype.isConnectable = function()\n{\n\treturn this.connectable != 0;\n};\n\n/**\n * Function: setConnectable\n *\n * Sets the connectable state.\n * \n * Parameters:\n * \n * connectable - Boolean that specifies the new connectable state.\n */\nmxCell.prototype.setConnectable = function(connectable)\n{\n\tthis.connectable = connectable;\n};\n\n/**\n * Function: isVisible\n *\n * Returns true if the cell is visibile.\n */\nmxCell.prototype.isVisible = function()\n{\n\treturn this.visible != 0;\n};\n\n/**\n * Function: setVisible\n *\n * Specifies if the cell is visible.\n * \n * Parameters:\n * \n * visible - Boolean that specifies the new visible state.\n */\nmxCell.prototype.setVisible = function(visible)\n{\n\tthis.visible = visible;\n};\n\n/**\n * Function: isCollapsed\n *\n * Returns true if the cell is collapsed.\n */\nmxCell.prototype.isCollapsed = function()\n{\n\treturn this.collapsed != 0;\n};\n\n/**\n * Function: setCollapsed\n *\n * Sets the collapsed state.\n * \n * Parameters:\n * \n * collapsed - Boolean that specifies the new collapsed state.\n */\nmxCell.prototype.setCollapsed = function(collapsed)\n{\n\tthis.collapsed = collapsed;\n};\n\n/**\n * Function: getParent\n *\n * Returns the cell's parent.\n */\nmxCell.prototype.getParent = function()\n{\n\treturn this.parent;\n};\n\n/**\n * Function: setParent\n *\n * Sets the parent cell.\n * \n * Parameters:\n * \n * parent - <mxCell> that represents the new parent.\n */\nmxCell.prototype.setParent = function(parent)\n{\n\tthis.parent = parent;\n};\n\n/**\n * Function: getTerminal\n *\n * Returns the source or target terminal.\n * \n * Parameters:\n * \n * source - Boolean that specifies if the source terminal should be\n * returned.\n */\nmxCell.prototype.getTerminal = function(source)\n{\n\treturn (source) ? this.source : this.target;\n};\n\n/**\n * Function: setTerminal\n *\n * Sets the source or target terminal and returns the new terminal.\n * \n * Parameters:\n * \n * terminal - <mxCell> that represents the new source or target terminal.\n * isSource - Boolean that specifies if the source or target terminal\n * should be set.\n */\nmxCell.prototype.setTerminal = function(terminal, isSource)\n{\n\tif (isSource)\n\t{\n\t\tthis.source = terminal;\n\t}\n\telse\n\t{\n\t\tthis.target = terminal;\n\t}\n\t\n\treturn terminal;\n};\n\n/**\n * Function: getChildCount\n *\n * Returns the number of child cells.\n */\nmxCell.prototype.getChildCount = function()\n{\n\treturn (this.children == null) ? 0 : this.children.length;\n};\n\n/**\n * Function: getIndex\n *\n * Returns the index of the specified child in the child array.\n * \n * Parameters:\n * \n * child - Child whose index should be returned.\n */\nmxCell.prototype.getIndex = function(child)\n{\n\treturn mxUtils.indexOf(this.children, child);\n};\n\n/**\n * Function: getChildAt\n *\n * Returns the child at the specified index.\n * \n * Parameters:\n * \n * index - Integer that specifies the child to be returned.\n */\nmxCell.prototype.getChildAt = function(index)\n{\n\treturn (this.children == null) ? null : this.children[index];\n};\n\n/**\n * Function: insert\n *\n * Inserts the specified child into the child array at the specified index\n * and updates the parent reference of the child. If not childIndex is\n * specified then the child is appended to the child array. Returns the\n * inserted child.\n * \n * Parameters:\n * \n * child - <mxCell> to be inserted or appended to the child array.\n * index - Optional integer that specifies the index at which the child\n * should be inserted into the child array.\n */\nmxCell.prototype.insert = function(child, index)\n{\n\tif (child != null)\n\t{\n\t\tif (index == null)\n\t\t{\n\t\t\tindex = this.getChildCount();\n\t\t\t\n\t\t\tif (child.getParent() == this)\n\t\t\t{\n\t\t\t\tindex--;\n\t\t\t}\n\t\t}\n\n\t\tchild.removeFromParent();\n\t\tchild.setParent(this);\n\t\t\n\t\tif (this.children == null)\n\t\t{\n\t\t\tthis.children = [];\n\t\t\tthis.children.push(child);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tthis.children.splice(index, 0, child);\n\t\t}\n\t}\n\t\n\treturn child;\n};\n\n/**\n * Function: remove\n *\n * Removes the child at the specified index from the child array and\n * returns the child that was removed. Will remove the parent reference of\n * the child.\n * \n * Parameters:\n * \n * index - Integer that specifies the index of the child to be\n * removed.\n */\nmxCell.prototype.remove = function(index)\n{\n\tvar child = null;\n\t\n\tif (this.children != null && index >= 0)\n\t{\n\t\tchild = this.getChildAt(index);\n\t\t\n\t\tif (child != null)\n\t\t{\n\t\t\tthis.children.splice(index, 1);\n\t\t\tchild.setParent(null);\n\t\t}\n\t}\n\t\n\treturn child;\n};\n\n/**\n * Function: removeFromParent\n *\n * Removes the cell from its parent.\n */\nmxCell.prototype.removeFromParent = function()\n{\n\tif (this.parent != null)\n\t{\n\t\tvar index = this.parent.getIndex(this);\n\t\tthis.parent.remove(index);\n\t}\n};\n\n/**\n * Function: getEdgeCount\n *\n * Returns the number of edges in the edge array.\n */\nmxCell.prototype.getEdgeCount = function()\n{\n\treturn (this.edges == null) ? 0 : this.edges.length;\n};\n\n/**\n * Function: getEdgeIndex\n *\n * Returns the index of the specified edge in <edges>.\n * \n * Parameters:\n * \n * edge - <mxCell> whose index in <edges> should be returned.\n */\nmxCell.prototype.getEdgeIndex = function(edge)\n{\n\treturn mxUtils.indexOf(this.edges, edge);\n};\n\n/**\n * Function: getEdgeAt\n *\n * Returns the edge at the specified index in <edges>.\n * \n * Parameters:\n * \n * index - Integer that specifies the index of the edge to be returned.\n */\nmxCell.prototype.getEdgeAt = function(index)\n{\n\treturn (this.edges == null) ? null : this.edges[index];\n};\n\n/**\n * Function: insertEdge\n *\n * Inserts the specified edge into the edge array and returns the edge.\n * Will update the respective terminal reference of the edge.\n * \n * Parameters:\n * \n * edge - <mxCell> to be inserted into the edge array.\n * isOutgoing - Boolean that specifies if the edge is outgoing.\n */\nmxCell.prototype.insertEdge = function(edge, isOutgoing)\n{\n\tif (edge != null)\n\t{\n\t\tedge.removeFromTerminal(isOutgoing);\n\t\tedge.setTerminal(this, isOutgoing);\n\t\t\n\t\tif (this.edges == null ||\n\t\t\tedge.getTerminal(!isOutgoing) != this ||\n\t\t\tmxUtils.indexOf(this.edges, edge) < 0)\n\t\t{\n\t\t\tif (this.edges == null)\n\t\t\t{\n\t\t\t\tthis.edges = [];\n\t\t\t}\n\t\t\t\n\t\t\tthis.edges.push(edge);\n\t\t}\n\t}\n\t\n\treturn edge;\n};\n\n/**\n * Function: removeEdge\n *\n * Removes the specified edge from the edge array and returns the edge.\n * Will remove the respective terminal reference from the edge.\n * \n * Parameters:\n * \n * edge - <mxCell> to be removed from the edge array.\n * isOutgoing - Boolean that specifies if the edge is outgoing.\n */\nmxCell.prototype.removeEdge = function(edge, isOutgoing)\n{\n\tif (edge != null)\n\t{\n\t\tif (edge.getTerminal(!isOutgoing) != this &&\n\t\t\tthis.edges != null)\n\t\t{\n\t\t\tvar index = this.getEdgeIndex(edge);\n\t\t\t\n\t\t\tif (index >= 0)\n\t\t\t{\n\t\t\t\tthis.edges.splice(index, 1);\n\t\t\t}\n\t\t}\n\t\t\n\t\tedge.setTerminal(null, isOutgoing);\n\t}\n\t\n\treturn edge;\n};\n\n/**\n * Function: removeFromTerminal\n *\n * Removes the edge from its source or target terminal.\n * \n * Parameters:\n * \n * isSource - Boolean that specifies if the edge should be removed from its\n * source or target terminal.\n */\nmxCell.prototype.removeFromTerminal = function(isSource)\n{\n\tvar terminal = this.getTerminal(isSource);\n\t\n\tif (terminal != null)\n\t{\n\t\tterminal.removeEdge(this, isSource);\n\t}\n};\n\n/**\n * Function: hasAttribute\n * \n * Returns true if the user object is an XML node that contains the given\n * attribute.\n * \n * Parameters:\n * \n * name - Name of the attribute.\n */\nmxCell.prototype.hasAttribute = function(name)\n{\n\tvar userObject = this.getValue();\n\t\n\treturn (userObject != null &&\n\t\tuserObject.nodeType == mxConstants.NODETYPE_ELEMENT && userObject.hasAttribute) ?\n\t\tuserObject.hasAttribute(name) : userObject.getAttribute(name) != null;\n};\n\n/**\n * Function: getAttribute\n *\n * Returns the specified attribute from the user object if it is an XML\n * node.\n * \n * Parameters:\n * \n * name - Name of the attribute whose value should be returned.\n * defaultValue - Optional default value to use if the attribute has no\n * value.\n */\nmxCell.prototype.getAttribute = function(name, defaultValue)\n{\n\tvar userObject = this.getValue();\n\t\n\tvar val = (userObject != null &&\n\t\tuserObject.nodeType == mxConstants.NODETYPE_ELEMENT) ?\n\t\tuserObject.getAttribute(name) : null;\n\t\t\n\treturn val || defaultValue;\n};\n\n/**\n * Function: setAttribute\n *\n * Sets the specified attribute on the user object if it is an XML node.\n * \n * Parameters:\n * \n * name - Name of the attribute whose value should be set.\n * value - New value of the attribute.\n */\nmxCell.prototype.setAttribute = function(name, value)\n{\n\tvar userObject = this.getValue();\n\t\n\tif (userObject != null &&\n\t\tuserObject.nodeType == mxConstants.NODETYPE_ELEMENT)\n\t{\n\t\tuserObject.setAttribute(name, value);\n\t}\n};\n\n/**\n * Function: clone\n *\n * Returns a clone of the cell. Uses <cloneValue> to clone\n * the user object. All fields in <mxTransient> are ignored\n * during the cloning.\n */\nmxCell.prototype.clone = function()\n{\n\tvar clone = mxUtils.clone(this, this.mxTransient);\n\tclone.setValue(this.cloneValue());\n\t\n\treturn clone;\n};\n\n/**\n * Function: cloneValue\n *\n * Returns a clone of the cell's user object.\n */\nmxCell.prototype.cloneValue = function()\n{\n\tvar value = this.getValue();\n\t\n\tif (value != null)\n\t{\n\t\tif (typeof(value.clone) == 'function')\n\t\t{\n\t\t\tvalue = value.clone();\n\t\t}\n\t\telse if (!isNaN(value.nodeType))\n\t\t{\n\t\t\tvalue = value.cloneNode(true);\n\t\t}\n\t}\n\t\n\treturn value;\n};\n"
  },
  {
    "path": "static/cherry/drawio_demo/src/js/model/mxCellPath.js",
    "content": "/**\n * Copyright (c) 2006-2015, JGraph Ltd\n * Copyright (c) 2006-2015, Gaudenz Alder\n */\nvar mxCellPath =\n{\n\n\t/**\n\t * Class: mxCellPath\n\t * \n\t * Implements a mechanism for temporary cell Ids.\n\t * \n\t * Variable: PATH_SEPARATOR\n\t * \n\t * Defines the separator between the path components. Default is \".\".\n\t */\n\tPATH_SEPARATOR: '.',\n\t\n\t/**\n\t * Function: create\n\t * \n\t * Creates the cell path for the given cell. The cell path is a\n\t * concatenation of the indices of all ancestors on the (finite) path to\n\t * the root, eg. \"0.0.0.1\".\n\t * \n\t * Parameters:\n\t * \n\t * cell - Cell whose path should be returned.\n\t */\n\tcreate: function(cell)\n\t{\n\t\tvar result = '';\n\t\t\n\t\tif (cell != null)\n\t\t{\n\t\t\tvar parent = cell.getParent();\n\t\t\t\n\t\t\twhile (parent != null)\n\t\t\t{\n\t\t\t\tvar index = parent.getIndex(cell);\n\t\t\t\tresult = index + mxCellPath.PATH_SEPARATOR + result;\n\t\t\t\t\n\t\t\t\tcell = parent;\n\t\t\t\tparent = cell.getParent();\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Removes trailing separator\n\t\tvar n = result.length;\n\t\t\n\t\tif (n > 1)\n\t\t{\n\t\t\tresult = result.substring(0, n - 1);\n\t\t}\n\t\t\n\t\treturn result;\n\t},\n\t\n\t/**\n\t * Function: getParentPath\n\t * \n\t * Returns the path for the parent of the cell represented by the given\n\t * path. Returns null if the given path has no parent.\n\t * \n\t * Parameters:\n\t * \n\t * path - Path whose parent path should be returned.\n\t */\n\tgetParentPath: function(path)\n\t{\n\t\tif (path != null)\n\t\t{\n\t\t\tvar index = path.lastIndexOf(mxCellPath.PATH_SEPARATOR);\n\n\t\t\tif (index >= 0)\n\t\t\t{\n\t\t\t\treturn path.substring(0, index);\n\t\t\t}\n\t\t\telse if (path.length > 0)\n\t\t\t{\n\t\t\t\treturn '';\n\t\t\t}\n\t\t}\n\n\t\treturn null;\n\t},\n\n\t/**\n\t * Function: resolve\n\t * \n\t * Returns the cell for the specified cell path using the given root as the\n\t * root of the path.\n\t * \n\t * Parameters:\n\t * \n\t * root - Root cell of the path to be resolved.\n\t * path - String that defines the path.\n\t */\n\tresolve: function(root, path)\n\t{\n\t\tvar parent = root;\n\t\t\n\t\tif (path != null)\n\t\t{\n\t\t\tvar tokens = path.split(mxCellPath.PATH_SEPARATOR);\n\t\t\t\n\t\t\tfor (var i=0; i<tokens.length; i++)\n\t\t\t{\n\t\t\t\tparent = parent.getChildAt(parseInt(tokens[i]));\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn parent;\n\t},\n\t\n\t/**\n\t * Function: compare\n\t * \n\t * Compares the given cell paths and returns -1 if p1 is smaller, 0 if\n\t * p1 is equal and 1 if p1 is greater than p2.\n\t */\n\tcompare: function(p1, p2)\n\t{\n\t\tvar min = Math.min(p1.length, p2.length);\n\t\tvar comp = 0;\n\t\t\n\t\tfor (var i = 0; i < min; i++)\n\t\t{\n\t\t\tif (p1[i] != p2[i])\n\t\t\t{\n\t\t\t\tif (p1[i].length == 0 ||\n\t\t\t\t\tp2[i].length == 0)\n\t\t\t\t{\n\t\t\t\t\tcomp = (p1[i] == p2[i]) ? 0 : ((p1[i] > p2[i]) ? 1 : -1);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tvar t1 = parseInt(p1[i]);\n\t\t\t\t\tvar t2 = parseInt(p2[i]);\n\t\t\t\t\t\n\t\t\t\t\tcomp = (t1 == t2) ? 0 : ((t1 > t2) ? 1 : -1);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Compares path length if both paths are equal to this point\n\t\tif (comp == 0)\n\t\t{\n\t\t\tvar t1 = p1.length;\n\t\t\tvar t2 = p2.length;\n\t\t\t\n\t\t\tif (t1 != t2)\n\t\t\t{\n\t\t\t\tcomp = (t1 > t2) ? 1 : -1;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn comp;\n\t}\n\n};\n"
  },
  {
    "path": "static/cherry/drawio_demo/src/js/model/mxGeometry.js",
    "content": "/**\n * Copyright (c) 2006-2015, JGraph Ltd\n * Copyright (c) 2006-2015, Gaudenz Alder\n */\n/**\n * Class: mxGeometry\n * \n * Extends <mxRectangle> to represent the geometry of a cell.\n * \n * For vertices, the geometry consists of the x- and y-location, and the width\n * and height. For edges, the geometry consists of the optional terminal- and\n * control points. The terminal points are only required if an edge is\n * unconnected, and are stored in the sourcePoint> and <targetPoint>\n * variables, respectively.\n * \n * Example:\n * \n * If an edge is unconnected, that is, it has no source or target terminal,\n * then a geometry with terminal points for a new edge can be defined as\n * follows.\n * \n * (code)\n * geometry.setTerminalPoint(new mxPoint(x1, y1), true);\n * geometry.points = [new mxPoint(x2, y2)];\n * geometry.setTerminalPoint(new mxPoint(x3, y3), false);\n * (end)\n * \n * Control points are used regardless of the connected state of an edge and may\n * be ignored or interpreted differently depending on the edge's <mxEdgeStyle>.\n * \n * To disable automatic reset of control points after a cell has been moved or\n * resized, the the <mxGraph.resizeEdgesOnMove> and\n * <mxGraph.resetEdgesOnResize> may be used.\n *\n * Edge Labels:\n * \n * Using the x- and y-coordinates of a cell's geometry, it is possible to\n * position the label on edges on a specific location on the actual edge shape\n * as it appears on the screen. The x-coordinate of an edge's geometry is used\n * to describe the distance from the center of the edge from -1 to 1 with 0\n * being the center of the edge and the default value. The y-coordinate of an\n * edge's geometry is used to describe the absolute, orthogonal distance in\n * pixels from that point. In addition, the <mxGeometry.offset> is used as an\n * absolute offset vector from the resulting point.\n * \n * This coordinate system is applied if <relative> is true, otherwise the\n * offset defines the absolute vector from the edge's center point to the\n * label and the values for <x> and <y> are ignored.\n * \n * The width and height parameter for edge geometries can be used to set the\n * label width and height (eg. for word wrapping).\n * \n * Ports:\n * \n * The term \"port\" refers to a relatively positioned, connectable child cell,\n * which is used to specify the connection between the parent and another cell\n * in the graph. Ports are typically modeled as vertices with relative\n * geometries.\n * \n * Offsets:\n * \n * The <offset> field is interpreted in 3 different ways, depending on the cell\n * and the geometry. For edges, the offset defines the absolute offset for the\n * edge label. For relative geometries, the offset defines the absolute offset\n * for the origin (top, left corner) of the vertex, otherwise the offset\n * defines the absolute offset for the label inside the vertex or group.\n * \n * Constructor: mxGeometry\n *\n * Constructs a new object to describe the size and location of a vertex or\n * the control points of an edge.\n */\nfunction mxGeometry(x, y, width, height)\n{\n\tmxRectangle.call(this, x, y, width, height);\n};\n\n/**\n * Extends mxRectangle.\n */\nmxGeometry.prototype = new mxRectangle();\nmxGeometry.prototype.constructor = mxGeometry;\n\n/**\n * Variable: TRANSLATE_CONTROL_POINTS\n * \n * Global switch to translate the points in translate. Default is true.\n */\nmxGeometry.prototype.TRANSLATE_CONTROL_POINTS = true;\n\n/**\n * Variable: alternateBounds\n *\n * Stores alternate values for x, y, width and height in a rectangle. See\n * <swap> to exchange the values. Default is null.\n */\nmxGeometry.prototype.alternateBounds = null;\n\n/**\n * Variable: sourcePoint\n *\n * Defines the source <mxPoint> of the edge. This is used if the\n * corresponding edge does not have a source vertex. Otherwise it is\n * ignored. Default is  null.\n */\nmxGeometry.prototype.sourcePoint = null;\n\n/**\n * Variable: targetPoint\n *\n * Defines the target <mxPoint> of the edge. This is used if the\n * corresponding edge does not have a target vertex. Otherwise it is\n * ignored. Default is null.\n */\nmxGeometry.prototype.targetPoint = null;\n\n/**\n * Variable: points\n *\n * Array of <mxPoints> which specifies the control points along the edge.\n * These points are the intermediate points on the edge, for the endpoints\n * use <targetPoint> and <sourcePoint> or set the terminals of the edge to\n * a non-null value. Default is null.\n */\nmxGeometry.prototype.points = null;\n\n/**\n * Variable: offset\n *\n * For edges, this holds the offset (in pixels) from the position defined\n * by <x> and <y> on the edge. For relative geometries (for vertices), this\n * defines the absolute offset from the point defined by the relative\n * coordinates. For absolute geometries (for vertices), this defines the\n * offset for the label. Default is null.\n */\nmxGeometry.prototype.offset = null;\n\n/**\n * Variable: relative\n *\n * Specifies if the coordinates in the geometry are to be interpreted as\n * relative coordinates. For edges, this is used to define the location of\n * the edge label relative to the edge as rendered on the display. For\n * vertices, this specifies the relative location inside the bounds of the\n * parent cell.\n * \n * If this is false, then the coordinates are relative to the origin of the\n * parent cell or, for edges, the edge label position is relative to the\n * center of the edge as rendered on screen.\n * \n * Default is false.\n */\nmxGeometry.prototype.relative = false;\n\n/**\n * Function: swap\n * \n * Swaps the x, y, width and height with the values stored in\n * <alternateBounds> and puts the previous values into <alternateBounds> as\n * a rectangle. This operation is carried-out in-place, that is, using the\n * existing geometry instance. If this operation is called during a graph\n * model transactional change, then the geometry should be cloned before\n * calling this method and setting the geometry of the cell using\n * <mxGraphModel.setGeometry>.\n */\nmxGeometry.prototype.swap = function()\n{\n\tif (this.alternateBounds != null)\n\t{\n\t\tvar old = new mxRectangle(\n\t\t\tthis.x, this.y, this.width, this.height);\n\n\t\tthis.x = this.alternateBounds.x;\n\t\tthis.y = this.alternateBounds.y;\n\t\tthis.width = this.alternateBounds.width;\n\t\tthis.height = this.alternateBounds.height;\n\n\t\tthis.alternateBounds = old;\n\t}\n};\n\n/**\n * Function: getTerminalPoint\n * \n * Returns the <mxPoint> representing the source or target point of this\n * edge. This is only used if the edge has no source or target vertex.\n * \n * Parameters:\n * \n * isSource - Boolean that specifies if the source or target point\n * should be returned.\n */\nmxGeometry.prototype.getTerminalPoint = function(isSource)\n{\n\treturn (isSource) ? this.sourcePoint : this.targetPoint;\n};\n\n/**\n * Function: setTerminalPoint\n * \n * Sets the <sourcePoint> or <targetPoint> to the given <mxPoint> and\n * returns the new point.\n * \n * Parameters:\n * \n * point - Point to be used as the new source or target point.\n * isSource - Boolean that specifies if the source or target point\n * should be set.\n */\nmxGeometry.prototype.setTerminalPoint = function(point, isSource)\n{\n\tif (isSource)\n\t{\n\t\tthis.sourcePoint = point;\n\t}\n\telse\n\t{\n\t\tthis.targetPoint = point;\n\t}\n\t\n\treturn point;\n};\n\n/**\n * Function: rotate\n * \n * Rotates the geometry by the given angle around the given center. That is,\n * <x> and <y> of the geometry, the <sourcePoint>, <targetPoint> and all\n * <points> are translated by the given amount. <x> and <y> are only\n * translated if <relative> is false.\n * \n * Parameters:\n * \n * angle - Number that specifies the rotation angle in degrees.\n * cx - <mxPoint> that specifies the center of the rotation.\n */\nmxGeometry.prototype.rotate = function(angle, cx)\n{\n\tvar rad = mxUtils.toRadians(angle);\n\tvar cos = Math.cos(rad);\n\tvar sin = Math.sin(rad);\n\t\n\t// Rotates the geometry\n\tif (!this.relative)\n\t{\n\t\tvar ct = new mxPoint(this.getCenterX(), this.getCenterY());\n\t\tvar pt = mxUtils.getRotatedPoint(ct, cos, sin, cx);\n\t\t\n\t\tthis.x = Math.round(pt.x - this.width / 2);\n\t\tthis.y = Math.round(pt.y - this.height / 2);\n\t}\n\n\t// Rotates the source point\n\tif (this.sourcePoint != null)\n\t{\n\t\tvar pt = mxUtils.getRotatedPoint(this.sourcePoint, cos, sin, cx);\n\t\tthis.sourcePoint.x = Math.round(pt.x);\n\t\tthis.sourcePoint.y = Math.round(pt.y);\n\t}\n\t\n\t// Translates the target point\n\tif (this.targetPoint != null)\n\t{\n\t\tvar pt = mxUtils.getRotatedPoint(this.targetPoint, cos, sin, cx);\n\t\tthis.targetPoint.x = Math.round(pt.x);\n\t\tthis.targetPoint.y = Math.round(pt.y);\t\n\t}\n\t\n\t// Translate the control points\n\tif (this.points != null)\n\t{\n\t\tfor (var i = 0; i < this.points.length; i++)\n\t\t{\n\t\t\tif (this.points[i] != null)\n\t\t\t{\n\t\t\t\tvar pt = mxUtils.getRotatedPoint(this.points[i], cos, sin, cx);\n\t\t\t\tthis.points[i].x = Math.round(pt.x);\n\t\t\t\tthis.points[i].y = Math.round(pt.y);\n\t\t\t}\n\t\t}\n\t}\n};\n\n/**\n * Function: translate\n * \n * Translates the geometry by the specified amount. That is, <x> and <y> of the\n * geometry, the <sourcePoint>, <targetPoint> and all <points> are translated\n * by the given amount. <x> and <y> are only translated if <relative> is false.\n * If <TRANSLATE_CONTROL_POINTS> is false, then <points> are not modified by\n * this function.\n * \n * Parameters:\n * \n * dx - Number that specifies the x-coordinate of the translation.\n * dy - Number that specifies the y-coordinate of the translation.\n */\nmxGeometry.prototype.translate = function(dx, dy)\n{\n\tdx = parseFloat(dx);\n\tdy = parseFloat(dy);\n\t\n\t// Translates the geometry\n\tif (!this.relative)\n\t{\n\t\tthis.x = parseFloat(this.x) + dx;\n\t\tthis.y = parseFloat(this.y) + dy;\n\t}\n\n\t// Translates the source point\n\tif (this.sourcePoint != null)\n\t{\n\t\tthis.sourcePoint.x = parseFloat(this.sourcePoint.x) + dx;\n\t\tthis.sourcePoint.y = parseFloat(this.sourcePoint.y) + dy;\n\t}\n\t\n\t// Translates the target point\n\tif (this.targetPoint != null)\n\t{\n\t\tthis.targetPoint.x = parseFloat(this.targetPoint.x) + dx;\n\t\tthis.targetPoint.y = parseFloat(this.targetPoint.y) + dy;\t\t\n\t}\n\n\t// Translate the control points\n\tif (this.TRANSLATE_CONTROL_POINTS && this.points != null)\n\t{\n\t\tfor (var i = 0; i < this.points.length; i++)\n\t\t{\n\t\t\tif (this.points[i] != null)\n\t\t\t{\n\t\t\t\tthis.points[i].x = parseFloat(this.points[i].x) + dx;\n\t\t\t\tthis.points[i].y = parseFloat(this.points[i].y) + dy;\n\t\t\t}\n\t\t}\n\t}\n};\n\n/**\n * Function: scale\n * \n * Scales the geometry by the given amount. That is, <x> and <y> of the\n * geometry, the <sourcePoint>, <targetPoint> and all <points> are scaled\n * by the given amount. <x>, <y>, <width> and <height> are only scaled if\n * <relative> is false. If <fixedAspect> is true, then the smaller value\n * is used to scale the width and the height.\n * \n * Parameters:\n * \n * sx - Number that specifies the horizontal scale factor.\n * sy - Number that specifies the vertical scale factor.\n * fixedAspect - Optional boolean to keep the aspect ratio fixed.\n */\nmxGeometry.prototype.scale = function(sx, sy, fixedAspect)\n{\n\tsx = parseFloat(sx);\n\tsy = parseFloat(sy);\n\n\t// Translates the source point\n\tif (this.sourcePoint != null)\n\t{\n\t\tthis.sourcePoint.x = parseFloat(this.sourcePoint.x) * sx;\n\t\tthis.sourcePoint.y = parseFloat(this.sourcePoint.y) * sy;\n\t}\n\t\n\t// Translates the target point\n\tif (this.targetPoint != null)\n\t{\n\t\tthis.targetPoint.x = parseFloat(this.targetPoint.x) * sx;\n\t\tthis.targetPoint.y = parseFloat(this.targetPoint.y) * sy;\t\t\n\t}\n\n\t// Translate the control points\n\tif (this.points != null)\n\t{\n\t\tfor (var i = 0; i < this.points.length; i++)\n\t\t{\n\t\t\tif (this.points[i] != null)\n\t\t\t{\n\t\t\t\tthis.points[i].x = parseFloat(this.points[i].x) * sx;\n\t\t\t\tthis.points[i].y = parseFloat(this.points[i].y) * sy;\n\t\t\t}\n\t\t}\n\t}\n\t\n\t// Translates the geometry\n\tif (!this.relative)\n\t{\n\t\tthis.x = parseFloat(this.x) * sx;\n\t\tthis.y = parseFloat(this.y) * sy;\n\n\t\tif (fixedAspect)\n\t\t{\n\t\t\tsy = sx = Math.min(sx, sy);\n\t\t}\n\t\t\n\t\tthis.width = parseFloat(this.width) * sx;\n\t\tthis.height = parseFloat(this.height) * sy;\n\t}\n};\n\n/**\n * Function: equals\n * \n * Returns true if the given object equals this geometry.\n */\nmxGeometry.prototype.equals = function(obj)\n{\n\treturn mxRectangle.prototype.equals.apply(this, arguments) &&\n\t\tthis.relative == obj.relative &&\n\t\t((this.sourcePoint == null && obj.sourcePoint == null) || (this.sourcePoint != null && this.sourcePoint.equals(obj.sourcePoint))) &&\n\t\t((this.targetPoint == null && obj.targetPoint == null) || (this.targetPoint != null && this.targetPoint.equals(obj.targetPoint))) &&\n\t\t((this.points == null && obj.points == null) || (this.points != null && mxUtils.equalPoints(this.points, obj.points))) &&\n\t\t((this.alternateBounds == null && obj.alternateBounds == null) || (this.alternateBounds != null && this.alternateBounds.equals(obj.alternateBounds))) &&\n\t\t((this.offset == null && obj.offset == null) || (this.offset != null && this.offset.equals(obj.offset)));\n};\n"
  },
  {
    "path": "static/cherry/drawio_demo/src/js/model/mxGraphModel.js",
    "content": "/**\n * Copyright (c) 2006-2018, JGraph Ltd\n * Copyright (c) 2006-2018, Gaudenz Alder\n */\n/**\n * Class: mxGraphModel\n * \n * Extends <mxEventSource> to implement a graph model. The graph model acts as\n * a wrapper around the cells which are in charge of storing the actual graph\n * datastructure. The model acts as a transactional wrapper with event\n * notification for all changes, whereas the cells contain the atomic\n * operations for updating the actual datastructure.\n * \n * Layers:\n * \n * The cell hierarchy in the model must have a top-level root cell which\n * contains the layers (typically one default layer), which in turn contain the\n * top-level cells of the layers. This means each cell is contained in a layer.\n * If no layers are required, then all new cells should be added to the default\n * layer.\n * \n * Layers are useful for hiding and showing groups of cells, or for placing\n * groups of cells on top of other cells in the display. To identify a layer,\n * the <isLayer> function is used. It returns true if the parent of the given\n * cell is the root of the model.\n * \n * Events:\n * \n * See events section for more details. There is a new set of events for\n * tracking transactional changes as they happen. The events are called\n * startEdit for the initial beginUpdate, executed for each executed change\n * and endEdit for the terminal endUpdate. The executed event contains a\n * property called change which represents the change after execution.\n * \n * Encoding the model:\n * \n * To encode a graph model, use the following code:\n * \n * (code)\n * var enc = new mxCodec();\n * var node = enc.encode(graph.getModel());\n * (end)\n * \n * This will create an XML node that contains all the model information.\n * \n * Encoding and decoding changes:\n * \n * For the encoding of changes, a graph model listener is required that encodes\n * each change from the given array of changes.\n * \n * (code)\n * model.addListener(mxEvent.CHANGE, function(sender, evt)\n * {\n *   var changes = evt.getProperty('edit').changes;\n *   var nodes = [];\n *   var codec = new mxCodec();\n * \n *   for (var i = 0; i < changes.length; i++)\n *   {\n *     nodes.push(codec.encode(changes[i]));\n *   }\n *   // do something with the nodes\n * });\n * (end)\n * \n * For the decoding and execution of changes, the codec needs a lookup function\n * that allows it to resolve cell IDs as follows:\n * \n * (code)\n * var codec = new mxCodec();\n * codec.lookup = function(id)\n * {\n *   return model.getCell(id);\n * }\n * (end)\n * \n * For each encoded change (represented by a node), the following code can be\n * used to carry out the decoding and create a change object.\n * \n * (code)\n * var changes = [];\n * var change = codec.decode(node);\n * change.model = model;\n * change.execute();\n * changes.push(change);\n * (end)\n * \n * The changes can then be dispatched using the model as follows.\n * \n * (code)\n * var edit = new mxUndoableEdit(model, false);\n * edit.changes = changes;\n * \n * edit.notify = function()\n * {\n *   edit.source.fireEvent(new mxEventObject(mxEvent.CHANGE,\n *   \t'edit', edit, 'changes', edit.changes));\n *   edit.source.fireEvent(new mxEventObject(mxEvent.NOTIFY,\n *   \t'edit', edit, 'changes', edit.changes));\n * }\n * \n * model.fireEvent(new mxEventObject(mxEvent.UNDO, 'edit', edit));\n * model.fireEvent(new mxEventObject(mxEvent.CHANGE,\n * \t\t'edit', edit, 'changes', changes));\n * (end)\n *\n * Event: mxEvent.CHANGE\n *\n * Fires when an undoable edit is dispatched. The <code>edit</code> property\n * contains the <mxUndoableEdit>. The <code>changes</code> property contains\n * the array of atomic changes inside the undoable edit. The changes property\n * is <strong>deprecated</strong>, please use edit.changes instead.\n *\n * Example:\n * \n * For finding newly inserted cells, the following code can be used:\n * \n * (code)\n * graph.model.addListener(mxEvent.CHANGE, function(sender, evt)\n * {\n *   var changes = evt.getProperty('edit').changes;\n * \n *   for (var i = 0; i < changes.length; i++)\n *   {\n *     var change = changes[i];\n *     \n *     if (change instanceof mxChildChange &&\n *       change.change.previous == null)\n *     {\n *       graph.startEditingAtCell(change.child);\n *       break;\n *     }\n *   }\n * });\n * (end)\n * \n * \n * Event: mxEvent.NOTIFY\n *\n * Same as <mxEvent.CHANGE>, this event can be used for classes that need to\n * implement a sync mechanism between this model and, say, a remote model. In\n * such a setup, only local changes should trigger a notify event and all\n * changes should trigger a change event.\n * \n * Event: mxEvent.EXECUTE\n * \n * Fires between begin- and endUpdate and after an atomic change was executed\n * in the model. The <code>change</code> property contains the atomic change\n * that was executed.\n * \n * Event: mxEvent.EXECUTED\n * \n * Fires between START_EDIT and END_EDIT after an atomic change was executed.\n * The <code>change</code> property contains the change that was executed.\n *\n * Event: mxEvent.BEGIN_UPDATE\n *\n * Fires after the <updateLevel> was incremented in <beginUpdate>. This event\n * contains no properties.\n * \n * Event: mxEvent.START_EDIT\n *\n * Fires after the <updateLevel> was changed from 0 to 1. This event\n * contains no properties.\n * \n * Event: mxEvent.END_UPDATE\n * \n * Fires after the <updateLevel> was decreased in <endUpdate> but before any\n * notification or change dispatching. The <code>edit</code> property contains\n * the <currentEdit>.\n * \n * Event: mxEvent.END_EDIT\n *\n * Fires after the <updateLevel> was changed from 1 to 0. This event\n * contains no properties.\n * \n * Event: mxEvent.BEFORE_UNDO\n * \n * Fires before the change is dispatched after the update level has reached 0\n * in <endUpdate>. The <code>edit</code> property contains the <curreneEdit>.\n * \n * Event: mxEvent.UNDO\n * \n * Fires after the change was dispatched in <endUpdate>. The <code>edit</code>\n * property contains the <currentEdit>.\n * \n * Constructor: mxGraphModel\n * \n * Constructs a new graph model. If no root is specified then a new root\n * <mxCell> with a default layer is created.\n * \n * Parameters:\n * \n * root - <mxCell> that represents the root cell.\n */\nfunction mxGraphModel(root)\n{\n\tthis.currentEdit = this.createUndoableEdit();\n\t\n\tif (root != null)\n\t{\n\t\tthis.setRoot(root);\n\t}\n\telse\n\t{\n\t\tthis.clear();\n\t}\n};\n\n/**\n * Extends mxEventSource.\n */\nmxGraphModel.prototype = new mxEventSource();\nmxGraphModel.prototype.constructor = mxGraphModel;\n\n/**\n * Variable: root\n * \n * Holds the root cell, which in turn contains the cells that represent the\n * layers of the diagram as child cells. That is, the actual elements of the\n * diagram are supposed to live in the third generation of cells and below.\n */\nmxGraphModel.prototype.root = null;\n\n/**\n * Variable: cells\n * \n * Maps from Ids to cells.\n */\nmxGraphModel.prototype.cells = null;\n\n/**\n * Variable: maintainEdgeParent\n * \n * Specifies if edges should automatically be moved into the nearest common\n * ancestor of their terminals. Default is true.\n */\nmxGraphModel.prototype.maintainEdgeParent = true;\n\n/**\n * Variable: ignoreRelativeEdgeParent\n * \n * Specifies if relative edge parents should be ignored for finding the nearest\n * common ancestors of an edge's terminals. Default is true.\n */\nmxGraphModel.prototype.ignoreRelativeEdgeParent = true;\n\n/**\n * Variable: createIds\n * \n * Specifies if the model should automatically create Ids for new cells.\n * Default is true.\n */\nmxGraphModel.prototype.createIds = true;\n\n/**\n * Variable: prefix\n * \n * Defines the prefix of new Ids. Default is an empty string.\n */\nmxGraphModel.prototype.prefix = '';\n\n/**\n * Variable: postfix\n * \n * Defines the postfix of new Ids. Default is an empty string.\n */\nmxGraphModel.prototype.postfix = '';\n\n/**\n * Variable: nextId\n * \n * Specifies the next Id to be created. Initial value is 0.\n */\nmxGraphModel.prototype.nextId = 0;\n\n/**\n * Variable: currentEdit\n * \n * Holds the changes for the current transaction. If the transaction is\n * closed then a new object is created for this variable using\n * <createUndoableEdit>.\n */\nmxGraphModel.prototype.currentEdit = null;\n\n/**\n * Variable: updateLevel\n * \n * Counter for the depth of nested transactions. Each call to <beginUpdate>\n * will increment this number and each call to <endUpdate> will decrement\n * it. When the counter reaches 0, the transaction is closed and the\n * respective events are fired. Initial value is 0.\n */\nmxGraphModel.prototype.updateLevel = 0;\n\n/**\n * Variable: endingUpdate\n * \n * True if the program flow is currently inside endUpdate.\n */\nmxGraphModel.prototype.endingUpdate = false;\n\n/**\n * Function: clear\n *\n * Sets a new root using <createRoot>.\n */\nmxGraphModel.prototype.clear = function()\n{\n\tthis.setRoot(this.createRoot());\n};\n\n/**\n * Function: isCreateIds\n *\n * Returns <createIds>.\n */\nmxGraphModel.prototype.isCreateIds = function()\n{\n\treturn this.createIds;\n};\n\n/**\n * Function: setCreateIds\n *\n * Sets <createIds>.\n */\nmxGraphModel.prototype.setCreateIds = function(value)\n{\n\tthis.createIds = value;\n};\n\n/**\n * Function: createRoot\n *\n * Creates a new root cell with a default layer (child 0).\n */\nmxGraphModel.prototype.createRoot = function()\n{\n\tvar cell = new mxCell();\n\tcell.insert(new mxCell());\n\t\n\treturn cell;\n};\n\n/**\n * Function: getCell\n *\n * Returns the <mxCell> for the specified Id or null if no cell can be\n * found for the given Id.\n *\n * Parameters:\n * \n * id - A string representing the Id of the cell.\n */\nmxGraphModel.prototype.getCell = function(id)\n{\n\treturn (this.cells != null) ? this.cells[id] : null;\n};\n\n/**\n * Function: filterCells\n * \n * Returns the cells from the given array where the given filter function\n * returns true.\n */\nmxGraphModel.prototype.filterCells = function(cells, filter)\n{\n\tvar result = null;\n\t\n\tif (cells != null)\n\t{\n\t\tresult = [];\n\t\t\n\t\tfor (var i = 0; i < cells.length; i++)\n\t\t{\n\t\t\tif (filter(cells[i]))\n\t\t\t{\n\t\t\t\tresult.push(cells[i]);\n\t\t\t}\n\t\t}\n\t}\n\t\n\treturn result;\n};\n\n/**\n * Function: getDescendants\n * \n * Returns all descendants of the given cell and the cell itself in an array.\n * \n * Parameters:\n * \n * parent - <mxCell> whose descendants should be returned.\n */\nmxGraphModel.prototype.getDescendants = function(parent)\n{\n\treturn this.filterDescendants(null, parent);\n};\n\n/**\n * Function: filterDescendants\n * \n * Visits all cells recursively and applies the specified filter function\n * to each cell. If the function returns true then the cell is added\n * to the resulting array. The parent and result paramters are optional.\n * If parent is not specified then the recursion starts at <root>.\n * \n * Example:\n * The following example extracts all vertices from a given model:\n * (code)\n * var filter = function(cell)\n * {\n * \treturn model.isVertex(cell);\n * }\n * var vertices = model.filterDescendants(filter);\n * (end)\n * \n * Parameters:\n * \n * filter - JavaScript function that takes an <mxCell> as an argument\n * and returns a boolean.\n * parent - Optional <mxCell> that is used as the root of the recursion.\n */\nmxGraphModel.prototype.filterDescendants = function(filter, parent)\n{\n\t// Creates a new array for storing the result\n\tvar result = [];\n\n\t// Recursion starts at the root of the model\n\tparent = parent || this.getRoot();\n\t\n\t// Checks if the filter returns true for the cell\n\t// and adds it to the result array\n\tif (filter == null || filter(parent))\n\t{\n\t\tresult.push(parent);\n\t}\n\t\n\t// Visits the children of the cell\n\tvar childCount = this.getChildCount(parent);\n\t\n\tfor (var i = 0; i < childCount; i++)\n\t{\n\t\tvar child = this.getChildAt(parent, i);\n\t\tresult = result.concat(this.filterDescendants(filter, child));\n\t}\n\n\treturn result;\n};\n\n/**\n * Function: getRoot\n * \n * Returns the root of the model or the topmost parent of the given cell.\n *\n * Parameters:\n * \n * cell - Optional <mxCell> that specifies the child.\n */\nmxGraphModel.prototype.getRoot = function(cell)\n{\n\tvar root = cell || this.root;\n\t\n\tif (cell != null)\n\t{\n\t\twhile (cell != null)\n\t\t{\n\t\t\troot = cell;\n\t\t\tcell = this.getParent(cell);\n\t\t}\n\t}\n\t\n\treturn root;\n};\n\n/**\n * Function: setRoot\n * \n * Sets the <root> of the model using <mxRootChange> and adds the change to\n * the current transaction. This resets all datastructures in the model and\n * is the preferred way of clearing an existing model. Returns the new\n * root.\n * \n * Example:\n * \n * (code)\n * var root = new mxCell();\n * root.insert(new mxCell());\n * model.setRoot(root);\n * (end)\n *\n * Parameters:\n * \n * root - <mxCell> that specifies the new root.\n */\nmxGraphModel.prototype.setRoot = function(root)\n{\n\tthis.execute(new mxRootChange(this, root));\n\t\n\treturn root;\n};\n\n/**\n * Function: rootChanged\n * \n * Inner callback to change the root of the model and update the internal\n * datastructures, such as <cells> and <nextId>. Returns the previous root.\n *\n * Parameters:\n * \n * root - <mxCell> that specifies the new root.\n */\nmxGraphModel.prototype.rootChanged = function(root)\n{\n\tvar oldRoot = this.root;\n\tthis.root = root;\n\t\n\t// Resets counters and datastructures\n\tthis.nextId = 0;\n\tthis.cells = null;\n\tthis.cellAdded(root);\n\t\n\treturn oldRoot;\n};\n\n/**\n * Function: isRoot\n * \n * Returns true if the given cell is the root of the model and a non-null\n * value.\n *\n * Parameters:\n * \n * cell - <mxCell> that represents the possible root.\n */\nmxGraphModel.prototype.isRoot = function(cell)\n{\n\treturn cell != null && this.root == cell;\n};\n\n/**\n * Function: isLayer\n * \n * Returns true if <isRoot> returns true for the parent of the given cell.\n *\n * Parameters:\n * \n * cell - <mxCell> that represents the possible layer.\n */\nmxGraphModel.prototype.isLayer = function(cell)\n{\n\treturn this.isRoot(this.getParent(cell));\n};\n\n/**\n * Function: isAncestor\n * \n * Returns true if the given parent is an ancestor of the given child. Note \n * returns true if child == parent.\n *\n * Parameters:\n * \n * parent - <mxCell> that specifies the parent.\n * child - <mxCell> that specifies the child.\n */\nmxGraphModel.prototype.isAncestor = function(parent, child)\n{\n\twhile (child != null && child != parent)\n\t{\n\t\tchild = this.getParent(child);\n\t}\n\t\n\treturn child == parent;\n};\n\n/**\n * Function: contains\n * \n * Returns true if the model contains the given <mxCell>.\n *\n * Parameters:\n * \n * cell - <mxCell> that specifies the cell.\n */\nmxGraphModel.prototype.contains = function(cell)\n{\n\treturn this.isAncestor(this.root, cell);\n};\n\n/**\n * Function: getParent\n * \n * Returns the parent of the given cell.\n *\n * Parameters:\n * \n * cell - <mxCell> whose parent should be returned.\n */\nmxGraphModel.prototype.getParent = function(cell)\n{\n\treturn (cell != null) ? cell.getParent() : null;\n};\n\n/**\n * Function: add\n * \n * Adds the specified child to the parent at the given index using\n * <mxChildChange> and adds the change to the current transaction. If no\n * index is specified then the child is appended to the parent's array of\n * children. Returns the inserted child.\n * \n * Parameters:\n * \n * parent - <mxCell> that specifies the parent to contain the child.\n * child - <mxCell> that specifies the child to be inserted.\n * index - Optional integer that specifies the index of the child.\n */\nmxGraphModel.prototype.add = function(parent, child, index)\n{\n\tif (child != parent && parent != null && child != null)\n\t{\t\n\t\t// Appends the child if no index was specified\n\t\tif (index == null)\n\t\t{\n\t\t\tindex = this.getChildCount(parent);\n\t\t}\n\t\t\n\t\tvar parentChanged = parent != this.getParent(child);\n\t\tthis.execute(new mxChildChange(this, parent, child, index));\n\n\t\t// Maintains the edges parents by moving the edges\n\t\t// into the nearest common ancestor of its terminals\n\t\tif (this.maintainEdgeParent && parentChanged)\n\t\t{\n\t\t\tthis.updateEdgeParents(child);\n\t\t}\n\t}\n\t\n\treturn child;\n};\n\n/**\n * Function: cellAdded\n * \n * Inner callback to update <cells> when a cell has been added. This\n * implementation resolves collisions by creating new Ids. To change the\n * ID of a cell after it was inserted into the model, use the following\n * code:\n * \n * (code\n * delete model.cells[cell.getId()];\n * cell.setId(newId);\n * model.cells[cell.getId()] = cell;\n * (end)\n *\n * If the change of the ID should be part of the command history, then the\n * cell should be removed from the model and a clone with the new ID should\n * be reinserted into the model instead.\n *\n * Parameters:\n * \n * cell - <mxCell> that specifies the cell that has been added.\n */\nmxGraphModel.prototype.cellAdded = function(cell)\n{\n\tif (cell != null)\n\t{\n\t\t// Creates an Id for the cell if not Id exists\n\t\tif (cell.getId() == null && this.createIds)\n\t\t{\n\t\t\tcell.setId(this.createId(cell));\n\t\t}\n\t\t\n\t\tif (cell.getId() != null)\n\t\t{\n\t\t\tvar collision = this.getCell(cell.getId());\n\t\t\t\n\t\t\tif (collision != cell)\n\t\t\t{\t\n\t\t\t\t// Creates new Id for the cell\n\t\t\t\t// as long as there is a collision\n\t\t\t\twhile (collision != null)\n\t\t\t\t{\n\t\t\t\t\tcell.setId(this.createId(cell));\n\t\t\t\t\tcollision = this.getCell(cell.getId());\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// Lazily creates the cells dictionary\n\t\t\t\tif (this.cells == null)\n\t\t\t\t{\n\t\t\t\t\tthis.cells = new Object();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tthis.cells[cell.getId()] = cell;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Makes sure IDs of deleted cells are not reused\n\t\tif (mxUtils.isNumeric(cell.getId()))\n\t\t{\n\t\t\tthis.nextId = Math.max(this.nextId, cell.getId());\n\t\t}\n\t\t\n\t\t// Recursively processes child cells\n\t\tvar childCount = this.getChildCount(cell);\n\t\t\n\t\tfor (var i=0; i<childCount; i++)\n\t\t{\n\t\t\tthis.cellAdded(this.getChildAt(cell, i));\n\t\t}\n\t}\n};\n\n/**\n * Function: createId\n * \n * Hook method to create an Id for the specified cell. This implementation\n * concatenates <prefix>, id and <postfix> to create the Id and increments\n * <nextId>. The cell is ignored by this implementation, but can be used in\n * overridden methods to prefix the Ids with eg. the cell type.\n *\n * Parameters:\n *\n * cell - <mxCell> to create the Id for.\n */\nmxGraphModel.prototype.createId = function(cell)\n{\n\tvar id = this.nextId;\n\tthis.nextId++;\n\t\n\treturn this.prefix + id + this.postfix;\n};\n\n/**\n * Function: updateEdgeParents\n * \n * Updates the parent for all edges that are connected to cell or one of\n * its descendants using <updateEdgeParent>.\n */\nmxGraphModel.prototype.updateEdgeParents = function(cell, root)\n{\n\t// Gets the topmost node of the hierarchy\n\troot = root || this.getRoot(cell);\n\t\n\t// Updates edges on children first\n\tvar childCount = this.getChildCount(cell);\n\t\n\tfor (var i = 0; i < childCount; i++)\n\t{\n\t\tvar child = this.getChildAt(cell, i);\n\t\tthis.updateEdgeParents(child, root);\n\t}\n\t\n\t// Updates the parents of all connected edges\n\tvar edgeCount = this.getEdgeCount(cell);\n\tvar edges = [];\n\n\tfor (var i = 0; i < edgeCount; i++)\n\t{\n\t\tedges.push(this.getEdgeAt(cell, i));\n\t}\n\t\n\tfor (var i = 0; i < edges.length; i++)\n\t{\n\t\tvar edge = edges[i];\n\t\t\n\t\t// Updates edge parent if edge and child have\n\t\t// a common root node (does not need to be the\n\t\t// model root node)\n\t\tif (this.isAncestor(root, edge))\n\t\t{\n\t\t\tthis.updateEdgeParent(edge, root);\n\t\t}\n\t}\n};\n\n/**\n * Function: updateEdgeParent\n *\n * Inner callback to update the parent of the specified <mxCell> to the\n * nearest-common-ancestor of its two terminals.\n *\n * Parameters:\n * \n * edge - <mxCell> that specifies the edge.\n * root - <mxCell> that represents the current root of the model.\n */\nmxGraphModel.prototype.updateEdgeParent = function(edge, root)\n{\n\tvar source = this.getTerminal(edge, true);\n\tvar target = this.getTerminal(edge, false);\n\tvar cell = null;\n\t\n\t// Uses the first non-relative descendants of the source terminal\n\twhile (source != null && !this.isEdge(source) &&\n\t\tsource.geometry != null && source.geometry.relative)\n\t{\n\t\tsource = this.getParent(source);\n\t}\n\t\n\t// Uses the first non-relative descendants of the target terminal\n\twhile (target != null && this.ignoreRelativeEdgeParent &&\n\t\t!this.isEdge(target) && target.geometry != null && \n\t\ttarget.geometry.relative)\n\t{\n\t\ttarget = this.getParent(target);\n\t}\n\t\n\tif (this.isAncestor(root, source) && this.isAncestor(root, target))\n\t{\n\t\tif (source == target)\n\t\t{\n\t\t\tcell = this.getParent(source);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tcell = this.getNearestCommonAncestor(source, target);\n\t\t}\n\n\t\tif (cell != null && (this.getParent(cell) != this.root ||\n\t\t\tthis.isAncestor(cell, edge)) && this.getParent(edge) != cell)\n\t\t{\n\t\t\tvar geo = this.getGeometry(edge);\n\t\t\t\n\t\t\tif (geo != null)\n\t\t\t{\n\t\t\t\tvar origin1 = this.getOrigin(this.getParent(edge));\n\t\t\t\tvar origin2 = this.getOrigin(cell);\n\t\t\t\t\n\t\t\t\tvar dx = origin2.x - origin1.x;\n\t\t\t\tvar dy = origin2.y - origin1.y;\n\t\t\t\t\n\t\t\t\tgeo = geo.clone();\n\t\t\t\tgeo.translate(-dx, -dy);\n\t\t\t\tthis.setGeometry(edge, geo);\n\t\t\t}\n\n\t\t\tthis.add(cell, edge, this.getChildCount(cell));\n\t\t}\n\t}\n};\n\n/**\n * Function: getOrigin\n * \n * Returns the absolute, accumulated origin for the children inside the\n * given parent as an <mxPoint>.\n */\nmxGraphModel.prototype.getOrigin = function(cell)\n{\n\tvar result = null;\n\t\n\tif (cell != null)\n\t{\n\t\tresult = this.getOrigin(this.getParent(cell));\n\t\t\n\t\tif (!this.isEdge(cell))\n\t\t{\n\t\t\tvar geo = this.getGeometry(cell);\n\t\t\t\n\t\t\tif (geo != null)\n\t\t\t{\n\t\t\t\tresult.x += geo.x;\n\t\t\t\tresult.y += geo.y;\n\t\t\t}\n\t\t}\n\t}\n\telse\n\t{\n\t\tresult = new mxPoint();\n\t}\n\t\n\treturn result;\n};\n\n/**\n * Function: getNearestCommonAncestor\n * \n * Returns the nearest common ancestor for the specified cells.\n *\n * Parameters:\n * \n * cell1 - <mxCell> that specifies the first cell in the tree.\n * cell2 - <mxCell> that specifies the second cell in the tree.\n */\nmxGraphModel.prototype.getNearestCommonAncestor = function(cell1, cell2)\n{\n\tif (cell1 != null && cell2 != null)\n\t{\t\t\n\t\t// Creates the cell path for the second cell\n\t\tvar path = mxCellPath.create(cell2);\n\n\t\tif (path != null && path.length > 0)\n\t\t{\n\t\t\t// Bubbles through the ancestors of the first\n\t\t\t// cell to find the nearest common ancestor.\n\t\t\tvar cell = cell1;\n\t\t\tvar current = mxCellPath.create(cell);\n\t\t\t\n\t\t\t// Inverts arguments\n\t\t\tif (path.length < current.length)\n\t\t\t{\n\t\t\t\tcell = cell2;\n\t\t\t\tvar tmp = current;\n\t\t\t\tcurrent = path;\n\t\t\t\tpath = tmp;\n\t\t\t}\n\t\t\t\n\t\t\twhile (cell != null)\n\t\t\t{\n\t\t\t\tvar parent = this.getParent(cell);\n\t\t\t\t\n\t\t\t\t// Checks if the cell path is equal to the beginning of the given cell path\n\t\t\t\tif (path.indexOf(current + mxCellPath.PATH_SEPARATOR) == 0 && parent != null)\n\t\t\t\t{\n\t\t\t\t\treturn cell;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tcurrent = mxCellPath.getParentPath(current);\n\t\t\t\tcell = parent;\n\t\t\t}\n\t\t}\n\t}\n\t\n\treturn null;\n};\n\n/**\n * Function: remove\n * \n * Removes the specified cell from the model using <mxChildChange> and adds\n * the change to the current transaction. This operation will remove the\n * cell and all of its children from the model. Returns the removed cell.\n *\n * Parameters:\n * \n * cell - <mxCell> that should be removed.\n */\nmxGraphModel.prototype.remove = function(cell)\n{\n\tif (cell == this.root)\n\t{\n\t\tthis.setRoot(null);\n\t}\n\telse if (this.getParent(cell) != null)\n\t{\n\t\tthis.execute(new mxChildChange(this, null, cell));\n\t}\n\t\n\treturn cell;\n};\n\n/**\n * Function: cellRemoved\n * \n * Inner callback to update <cells> when a cell has been removed.\n *\n * Parameters:\n * \n * cell - <mxCell> that specifies the cell that has been removed.\n */\nmxGraphModel.prototype.cellRemoved = function(cell)\n{\n\tif (cell != null && this.cells != null)\n\t{\n\t\t// Recursively processes child cells\n\t\tvar childCount = this.getChildCount(cell);\n\t\t\n\t\tfor (var i = childCount - 1; i >= 0; i--)\n\t\t{\n\t\t\tthis.cellRemoved(this.getChildAt(cell, i));\n\t\t}\n\t\t\n\t\t// Removes the dictionary entry for the cell\n\t\tif (this.cells != null && cell.getId() != null)\n\t\t{\n\t\t\tdelete this.cells[cell.getId()];\n\t\t}\n\t}\n};\n\n/**\n * Function: parentForCellChanged\n * \n * Inner callback to update the parent of a cell using <mxCell.insert>\n * on the parent and return the previous parent.\n *\n * Parameters:\n * \n * cell - <mxCell> to update the parent for.\n * parent - <mxCell> that specifies the new parent of the cell.\n * index - Optional integer that defines the index of the child\n * in the parent's child array.\n */\nmxGraphModel.prototype.parentForCellChanged = function(cell, parent, index)\n{\n\tvar previous = this.getParent(cell);\n\t\n\tif (parent != null)\n\t{\n\t\tif (parent != previous || previous.getIndex(cell) != index)\n\t\t{\n\t\t\tparent.insert(cell, index);\n\t\t}\n\t}\n\telse if (previous != null)\n\t{\n\t\tvar oldIndex = previous.getIndex(cell);\n\t\tprevious.remove(oldIndex);\n\t}\n\t\n\t// Checks if the previous parent was already in the\n\t// model and avoids calling cellAdded if it was.\n\tif (!this.contains(previous) && parent != null)\n\t{\n\t\tthis.cellAdded(cell);\n\t}\n\telse if (parent == null)\n\t{\n\t\tthis.cellRemoved(cell);\n\t}\n\t\n\treturn previous;\n};\n\n/**\n * Function: getChildCount\n *\n * Returns the number of children in the given cell.\n *\n * Parameters:\n * \n * cell - <mxCell> whose number of children should be returned.\n */\nmxGraphModel.prototype.getChildCount = function(cell)\n{\n\treturn (cell != null) ? cell.getChildCount() : 0;\n};\n\n/**\n * Function: getChildAt\n *\n * Returns the child of the given <mxCell> at the given index.\n * \n * Parameters:\n * \n * cell - <mxCell> that represents the parent.\n * index - Integer that specifies the index of the child to be returned.\n */\nmxGraphModel.prototype.getChildAt = function(cell, index)\n{\n\treturn (cell != null) ? cell.getChildAt(index) : null;\n};\n\n/**\n * Function: getChildren\n * \n * Returns all children of the given <mxCell> as an array of <mxCells>. The\n * return value should be only be read.\n *\n * Parameters:\n * \n * cell - <mxCell> the represents the parent.\n */\nmxGraphModel.prototype.getChildren = function(cell)\n{\n\treturn (cell != null) ? cell.children : null;\n};\n\t\n/**\n * Function: getChildVertices\n * \n * Returns the child vertices of the given parent.\n *\n * Parameters:\n * \n * cell - <mxCell> whose child vertices should be returned.\n */\nmxGraphModel.prototype.getChildVertices = function(parent)\n{\n\treturn this.getChildCells(parent, true, false);\n};\n\t\t\n/**\n * Function: getChildEdges\n * \n * Returns the child edges of the given parent.\n *\n * Parameters:\n * \n * cell - <mxCell> whose child edges should be returned.\n */\nmxGraphModel.prototype.getChildEdges = function(parent)\n{\n\treturn this.getChildCells(parent, false, true);\n};\n\n/**\n * Function: getChildCells\n * \n * Returns the children of the given cell that are vertices and/or edges\n * depending on the arguments.\n *\n * Parameters:\n * \n * cell - <mxCell> the represents the parent.\n * vertices - Boolean indicating if child vertices should be returned.\n * Default is false.\n * edges - Boolean indicating if child edges should be returned.\n * Default is false.\n */\nmxGraphModel.prototype.getChildCells = function(parent, vertices, edges)\n{\n\tvertices = (vertices != null) ? vertices : false;\n\tedges = (edges != null) ? edges : false;\n\t\n\tvar childCount = this.getChildCount(parent);\n\tvar result = [];\n\n\tfor (var i = 0; i < childCount; i++)\n\t{\n\t\tvar child = this.getChildAt(parent, i);\n\n\t\tif ((!edges && !vertices) || (edges && this.isEdge(child)) ||\n\t\t\t(vertices && this.isVertex(child)))\n\t\t{\n\t\t\tresult.push(child);\n\t\t}\n\t}\n\n\treturn result;\n};\n\t\t\n/**\n * Function: getTerminal\n * \n * Returns the source or target <mxCell> of the given edge depending on the\n * value of the boolean parameter.\n *\n * Parameters:\n * \n * edge - <mxCell> that specifies the edge.\n * isSource - Boolean indicating which end of the edge should be returned.\n */\nmxGraphModel.prototype.getTerminal = function(edge, isSource)\n{\n\treturn (edge != null) ? edge.getTerminal(isSource) : null;\n};\n\n/**\n * Function: setTerminal\n * \n * Sets the source or target terminal of the given <mxCell> using\n * <mxTerminalChange> and adds the change to the current transaction.\n * This implementation updates the parent of the edge using <updateEdgeParent>\n * if required.\n *\n * Parameters:\n * \n * edge - <mxCell> that specifies the edge.\n * terminal - <mxCell> that specifies the new terminal.\n * isSource - Boolean indicating if the terminal is the new source or\n * target terminal of the edge.\n */\nmxGraphModel.prototype.setTerminal = function(edge, terminal, isSource)\n{\n\tvar terminalChanged = terminal != this.getTerminal(edge, isSource);\n\tthis.execute(new mxTerminalChange(this, edge, terminal, isSource));\n\t\n\tif (this.maintainEdgeParent && terminalChanged)\n\t{\n\t\tthis.updateEdgeParent(edge, this.getRoot());\n\t}\n\t\n\treturn terminal;\n};\n\t\n/**\n * Function: setTerminals\n * \n * Sets the source and target <mxCell> of the given <mxCell> in a single\n * transaction using <setTerminal> for each end of the edge.\n *\n * Parameters:\n * \n * edge - <mxCell> that specifies the edge.\n * source - <mxCell> that specifies the new source terminal.\n * target - <mxCell> that specifies the new target terminal.\n */\nmxGraphModel.prototype.setTerminals = function(edge, source, target)\n{\n\tthis.beginUpdate();\n\ttry\n\t{\n\t\tthis.setTerminal(edge, source, true);\n\t\tthis.setTerminal(edge, target, false);\n\t}\n\tfinally\n\t{\n\t\tthis.endUpdate();\n\t}\n};\n\n/**\n * Function: terminalForCellChanged\n * \n * Inner helper function to update the terminal of the edge using\n * <mxCell.insertEdge> and return the previous terminal.\n * \n * Parameters:\n * \n * edge - <mxCell> that specifies the edge to be updated.\n * terminal - <mxCell> that specifies the new terminal.\n * isSource - Boolean indicating if the terminal is the new source or\n * target terminal of the edge.\n */\nmxGraphModel.prototype.terminalForCellChanged = function(edge, terminal, isSource)\n{\n\tvar previous = this.getTerminal(edge, isSource);\n\t\n\tif (terminal != null)\n\t{\n\t\tterminal.insertEdge(edge, isSource);\n\t}\n\telse if (previous != null)\n\t{\n\t\tprevious.removeEdge(edge, isSource);\n\t}\n\t\n\treturn previous;\n};\n\n/**\n * Function: getEdgeCount\n * \n * Returns the number of distinct edges connected to the given cell.\n *\n * Parameters:\n * \n * cell - <mxCell> that represents the vertex.\n */\nmxGraphModel.prototype.getEdgeCount = function(cell)\n{\n\treturn (cell != null) ? cell.getEdgeCount() : 0;\n};\n\n/**\n * Function: getEdgeAt\n * \n * Returns the edge of cell at the given index.\n *\n * Parameters:\n * \n * cell - <mxCell> that specifies the vertex.\n * index - Integer that specifies the index of the edge\n * to return.\n */\nmxGraphModel.prototype.getEdgeAt = function(cell, index)\n{\n\treturn (cell != null) ? cell.getEdgeAt(index) : null;\n};\n\t\n/**\n * Function: getDirectedEdgeCount\n * \n * Returns the number of incoming or outgoing edges, ignoring the given\n * edge.\n * \n * Parameters:\n * \n * cell - <mxCell> whose edge count should be returned.\n * outgoing - Boolean that specifies if the number of outgoing or\n * incoming edges should be returned.\n * ignoredEdge - <mxCell> that represents an edge to be ignored.\n */\nmxGraphModel.prototype.getDirectedEdgeCount = function(cell, outgoing, ignoredEdge)\n{\n\tvar count = 0;\n\tvar edgeCount = this.getEdgeCount(cell);\n\n\tfor (var i = 0; i < edgeCount; i++)\n\t{\n\t\tvar edge = this.getEdgeAt(cell, i);\n\n\t\tif (edge != ignoredEdge && this.getTerminal(edge, outgoing) == cell)\n\t\t{\n\t\t\tcount++;\n\t\t}\n\t}\n\n\treturn count;\n};\n\n/**\n * Function: getConnections\n * \n * Returns all edges of the given cell without loops.\n * \n * Parameters:\n * \n * cell - <mxCell> whose edges should be returned.\n * \n */\nmxGraphModel.prototype.getConnections = function(cell)\n{\n\treturn this.getEdges(cell, true, true, false);\n};\n\n/**\n * Function: getIncomingEdges\n * \n * Returns the incoming edges of the given cell without loops.\n * \n * Parameters:\n * \n * cell - <mxCell> whose incoming edges should be returned.\n * \n */\nmxGraphModel.prototype.getIncomingEdges = function(cell)\n{\n\treturn this.getEdges(cell, true, false, false);\n};\n\n/**\n * Function: getOutgoingEdges\n * \n * Returns the outgoing edges of the given cell without loops.\n * \n * Parameters:\n * \n * cell - <mxCell> whose outgoing edges should be returned.\n * \n */\nmxGraphModel.prototype.getOutgoingEdges = function(cell)\n{\n\treturn this.getEdges(cell, false, true, false);\n};\n\n/**\n * Function: getEdges\n * \n * Returns all distinct edges connected to this cell as a new array of\n * <mxCells>. If at least one of incoming or outgoing is true, then loops\n * are ignored, otherwise if both are false, then all edges connected to\n * the given cell are returned including loops.\n * \n * Parameters:\n * \n * cell - <mxCell> that specifies the cell.\n * incoming - Optional boolean that specifies if incoming edges should be\n * returned. Default is true.\n * outgoing - Optional boolean that specifies if outgoing edges should be\n * returned. Default is true.\n * includeLoops - Optional boolean that specifies if loops should be returned.\n * Default is true. \n */\nmxGraphModel.prototype.getEdges = function(cell, incoming, outgoing, includeLoops)\n{\n\tincoming = (incoming != null) ? incoming : true;\n\toutgoing = (outgoing != null) ? outgoing : true;\n\tincludeLoops = (includeLoops != null) ? includeLoops : true;\n\t\n\tvar edgeCount = this.getEdgeCount(cell);\n\tvar result = [];\n\n\tfor (var i = 0; i < edgeCount; i++)\n\t{\n\t\tvar edge = this.getEdgeAt(cell, i);\n\t\tvar source = this.getTerminal(edge, true);\n\t\tvar target = this.getTerminal(edge, false);\n\n\t\tif ((includeLoops && source == target) || ((source != target) && ((incoming && target == cell) ||\n\t\t\t(outgoing && source == cell))))\n\t\t{\n\t\t\tresult.push(edge);\n\t\t}\n\t}\n\n\treturn result;\n};\n\n/**\n * Function: getEdgesBetween\n * \n * Returns all edges between the given source and target pair. If directed\n * is true, then only edges from the source to the target are returned,\n * otherwise, all edges between the two cells are returned.\n * \n * Parameters:\n * \n * source - <mxCell> that defines the source terminal of the edge to be\n * returned.\n * target - <mxCell> that defines the target terminal of the edge to be\n * returned.\n * directed - Optional boolean that specifies if the direction of the\n * edge should be taken into account. Default is false.\n */\nmxGraphModel.prototype.getEdgesBetween = function(source, target, directed)\n{\n\tdirected = (directed != null) ? directed : false;\n\t\n\tvar tmp1 = this.getEdgeCount(source);\n\tvar tmp2 = this.getEdgeCount(target);\n\t\n\t// Assumes the source has less connected edges\n\tvar terminal = source;\n\tvar edgeCount = tmp1;\n\t\n\t// Uses the smaller array of connected edges\n\t// for searching the edge\n\tif (tmp2 < tmp1)\n\t{\n\t\tedgeCount = tmp2;\n\t\tterminal = target;\n\t}\n\t\n\tvar result = [];\n\t\n\t// Checks if the edge is connected to the correct\n\t// cell and returns the first match\n\tfor (var i = 0; i < edgeCount; i++)\n\t{\n\t\tvar edge = this.getEdgeAt(terminal, i);\n\t\tvar src = this.getTerminal(edge, true);\n\t\tvar trg = this.getTerminal(edge, false);\n\t\tvar directedMatch = (src == source) && (trg == target);\n\t\tvar oppositeMatch = (trg == source) && (src == target);\n\n\t\tif (directedMatch || (!directed && oppositeMatch))\n\t\t{\n\t\t\tresult.push(edge);\n\t\t}\n\t}\n\t\n\treturn result;\n};\n\n/**\n * Function: getOpposites\n * \n * Returns all opposite vertices wrt terminal for the given edges, only\n * returning sources and/or targets as specified. The result is returned\n * as an array of <mxCells>.\n * \n * Parameters:\n * \n * edges - Array of <mxCells> that contain the edges to be examined.\n * terminal - <mxCell> that specifies the known end of the edges.\n * sources - Boolean that specifies if source terminals should be contained\n * in the result. Default is true.\n * targets - Boolean that specifies if target terminals should be contained\n * in the result. Default is true.\n */\nmxGraphModel.prototype.getOpposites = function(edges, terminal, sources, targets)\n{\n\tsources = (sources != null) ? sources : true;\n\ttargets = (targets != null) ? targets : true;\n\t\n\tvar terminals = [];\n\t\n\tif (edges != null)\n\t{\n\t\tfor (var i = 0; i < edges.length; i++)\n\t\t{\n\t\t\tvar source = this.getTerminal(edges[i], true);\n\t\t\tvar target = this.getTerminal(edges[i], false);\n\t\t\t\n\t\t\t// Checks if the terminal is the source of\n\t\t\t// the edge and if the target should be\n\t\t\t// stored in the result\n\t\t\tif (source == terminal && target != null && target != terminal && targets)\n\t\t\t{\n\t\t\t\tterminals.push(target);\n\t\t\t}\n\t\t\t\n\t\t\t// Checks if the terminal is the taget of\n\t\t\t// the edge and if the source should be\n\t\t\t// stored in the result\n\t\t\telse if (target == terminal && source != null && source != terminal && sources)\n\t\t\t{\n\t\t\t\tterminals.push(source);\n\t\t\t}\n\t\t}\n\t}\n\t\n\treturn terminals;\n};\n\n/**\n * Function: getTopmostCells\n * \n * Returns the topmost cells of the hierarchy in an array that contains no\n * descendants for each <mxCell> that it contains. Duplicates should be\n * removed in the cells array to improve performance.\n * \n * Parameters:\n * \n * cells - Array of <mxCells> whose topmost ancestors should be returned.\n */\nmxGraphModel.prototype.getTopmostCells = function(cells)\n{\n\tvar dict = new mxDictionary();\n\tvar tmp = [];\n\t\n\tfor (var i = 0; i < cells.length; i++)\n\t{\n\t\tdict.put(cells[i], true);\n\t}\n\t\n\tfor (var i = 0; i < cells.length; i++)\n\t{\n\t\tvar cell = cells[i];\n\t\tvar topmost = true;\n\t\tvar parent = this.getParent(cell);\n\t\t\n\t\twhile (parent != null)\n\t\t{\n\t\t\tif (dict.get(parent))\n\t\t\t{\n\t\t\t\ttopmost = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\tparent = this.getParent(parent);\n\t\t}\n\t\t\n\t\tif (topmost)\n\t\t{\n\t\t\ttmp.push(cell);\n\t\t}\n\t}\n\t\n\treturn tmp;\n};\n\n/**\n * Function: isVertex\n * \n * Returns true if the given cell is a vertex.\n *\n * Parameters:\n * \n * cell - <mxCell> that represents the possible vertex.\n */\nmxGraphModel.prototype.isVertex = function(cell)\n{\n\treturn (cell != null) ? cell.isVertex() : false;\n};\n\n/**\n * Function: isEdge\n * \n * Returns true if the given cell is an edge.\n *\n * Parameters:\n * \n * cell - <mxCell> that represents the possible edge.\n */\nmxGraphModel.prototype.isEdge = function(cell)\n{\n\treturn (cell != null) ? cell.isEdge() : false;\n};\n\n/**\n * Function: isConnectable\n * \n * Returns true if the given <mxCell> is connectable. If <edgesConnectable>\n * is false, then this function returns false for all edges else it returns\n * the return value of <mxCell.isConnectable>.\n *\n * Parameters:\n * \n * cell - <mxCell> whose connectable state should be returned.\n */\nmxGraphModel.prototype.isConnectable = function(cell)\n{\n\treturn (cell != null) ? cell.isConnectable() : false;\n};\n\n/**\n * Function: getValue\n * \n * Returns the user object of the given <mxCell> using <mxCell.getValue>.\n *\n * Parameters:\n * \n * cell - <mxCell> whose user object should be returned.\n */\nmxGraphModel.prototype.getValue = function(cell)\n{\n\treturn (cell != null) ? cell.getValue() : null;\n};\n\n/**\n * Function: setValue\n * \n * Sets the user object of then given <mxCell> using <mxValueChange>\n * and adds the change to the current transaction.\n *\n * Parameters:\n * \n * cell - <mxCell> whose user object should be changed.\n * value - Object that defines the new user object.\n */\nmxGraphModel.prototype.setValue = function(cell, value)\n{\n\tthis.execute(new mxValueChange(this, cell, value));\n\t\n\treturn value;\n};\n\n/**\n * Function: valueForCellChanged\n * \n * Inner callback to update the user object of the given <mxCell>\n * using <mxCell.valueChanged> and return the previous value,\n * that is, the return value of <mxCell.valueChanged>.\n * \n * To change a specific attribute in an XML node, the following code can be\n * used.\n * \n * (code)\n * graph.getModel().valueForCellChanged = function(cell, value)\n * {\n *   var previous = cell.value.getAttribute('label');\n *   cell.value.setAttribute('label', value);\n *   \n *   return previous;\n * };\n * (end) \n */\nmxGraphModel.prototype.valueForCellChanged = function(cell, value)\n{\n\treturn cell.valueChanged(value);\n};\n\n/**\n * Function: getGeometry\n * \n * Returns the <mxGeometry> of the given <mxCell>.\n *\n * Parameters:\n * \n * cell - <mxCell> whose geometry should be returned.\n */\nmxGraphModel.prototype.getGeometry = function(cell)\n{\n\treturn (cell != null) ? cell.getGeometry() : null;\n};\n\n/**\n * Function: setGeometry\n * \n * Sets the <mxGeometry> of the given <mxCell>. The actual update\n * of the cell is carried out in <geometryForCellChanged>. The\n * <mxGeometryChange> action is used to encapsulate the change.\n * \n * Parameters:\n * \n * cell - <mxCell> whose geometry should be changed.\n * geometry - <mxGeometry> that defines the new geometry.\n */\nmxGraphModel.prototype.setGeometry = function(cell, geometry)\n{\n\tif (geometry != this.getGeometry(cell))\n\t{\n\t\tthis.execute(new mxGeometryChange(this, cell, geometry));\n\t}\n\t\n\treturn geometry;\n};\n\n/**\n * Function: geometryForCellChanged\n * \n * Inner callback to update the <mxGeometry> of the given <mxCell> using\n * <mxCell.setGeometry> and return the previous <mxGeometry>.\n */\nmxGraphModel.prototype.geometryForCellChanged = function(cell, geometry)\n{\n\tvar previous = this.getGeometry(cell);\n\tcell.setGeometry(geometry);\n\t\n\treturn previous;\n};\n\n/**\n * Function: getStyle\n * \n * Returns the style of the given <mxCell>.\n *\n * Parameters:\n * \n * cell - <mxCell> whose style should be returned.\n */\nmxGraphModel.prototype.getStyle = function(cell)\n{\n\treturn (cell != null) ? cell.getStyle() : null;\n};\n\n/**\n * Function: setStyle\n * \n * Sets the style of the given <mxCell> using <mxStyleChange> and\n * adds the change to the current transaction.\n *\n * Parameters:\n * \n * cell - <mxCell> whose style should be changed.\n * style - String of the form [stylename;|key=value;] to specify\n * the new cell style.\n */\nmxGraphModel.prototype.setStyle = function(cell, style)\n{\n\tif (style != this.getStyle(cell))\n\t{\n\t\tthis.execute(new mxStyleChange(this, cell, style));\n\t}\n\t\n\treturn style;\n};\n\n/**\n * Function: styleForCellChanged\n * \n * Inner callback to update the style of the given <mxCell>\n * using <mxCell.setStyle> and return the previous style.\n *\n * Parameters:\n * \n * cell - <mxCell> that specifies the cell to be updated.\n * style - String of the form [stylename;|key=value;] to specify\n * the new cell style.\n */\nmxGraphModel.prototype.styleForCellChanged = function(cell, style)\n{\n\tvar previous = this.getStyle(cell);\n\tcell.setStyle(style);\n\t\n\treturn previous;\n};\n\n/**\n * Function: isCollapsed\n * \n * Returns true if the given <mxCell> is collapsed.\n *\n * Parameters:\n * \n * cell - <mxCell> whose collapsed state should be returned.\n */\nmxGraphModel.prototype.isCollapsed = function(cell)\n{\n\treturn (cell != null) ? cell.isCollapsed() : false;\n};\n\n/**\n * Function: setCollapsed\n * \n * Sets the collapsed state of the given <mxCell> using <mxCollapseChange>\n * and adds the change to the current transaction.\n *\n * Parameters:\n * \n * cell - <mxCell> whose collapsed state should be changed.\n * collapsed - Boolean that specifies the new collpased state.\n */\nmxGraphModel.prototype.setCollapsed = function(cell, collapsed)\n{\n\tif (collapsed != this.isCollapsed(cell))\n\t{\n\t\tthis.execute(new mxCollapseChange(this, cell, collapsed));\n\t}\n\t\n\treturn collapsed;\n};\n\t\n/**\n * Function: collapsedStateForCellChanged\n *\n * Inner callback to update the collapsed state of the\n * given <mxCell> using <mxCell.setCollapsed> and return\n * the previous collapsed state.\n *\n * Parameters:\n * \n * cell - <mxCell> that specifies the cell to be updated.\n * collapsed - Boolean that specifies the new collpased state.\n */\nmxGraphModel.prototype.collapsedStateForCellChanged = function(cell, collapsed)\n{\n\tvar previous = this.isCollapsed(cell);\n\tcell.setCollapsed(collapsed);\n\t\n\treturn previous;\n};\n\n/**\n * Function: isVisible\n * \n * Returns true if the given <mxCell> is visible.\n * \n * Parameters:\n * \n * cell - <mxCell> whose visible state should be returned.\n */\nmxGraphModel.prototype.isVisible = function(cell)\n{\n\treturn (cell != null) ? cell.isVisible() : false;\n};\n\n/**\n * Function: setVisible\n * \n * Sets the visible state of the given <mxCell> using <mxVisibleChange> and\n * adds the change to the current transaction.\n *\n * Parameters:\n * \n * cell - <mxCell> whose visible state should be changed.\n * visible - Boolean that specifies the new visible state.\n */\nmxGraphModel.prototype.setVisible = function(cell, visible)\n{\n\tif (visible != this.isVisible(cell))\n\t{\n\t\tthis.execute(new mxVisibleChange(this, cell, visible));\n\t}\n\t\n\treturn visible;\n};\n\t\n/**\n * Function: visibleStateForCellChanged\n *\n * Inner callback to update the visible state of the\n * given <mxCell> using <mxCell.setCollapsed> and return\n * the previous visible state.\n *\n * Parameters:\n * \n * cell - <mxCell> that specifies the cell to be updated.\n * visible - Boolean that specifies the new visible state.\n */\nmxGraphModel.prototype.visibleStateForCellChanged = function(cell, visible)\n{\n\tvar previous = this.isVisible(cell);\n\tcell.setVisible(visible);\n\t\n\treturn previous;\n};\n\n/**\n * Function: execute\n * \n * Executes the given edit and fires events if required. The edit object\n * requires an execute function which is invoked. The edit is added to the\n * <currentEdit> between <beginUpdate> and <endUpdate> calls, so that\n * events will be fired if this execute is an individual transaction, that\n * is, if no previous <beginUpdate> calls have been made without calling\n * <endUpdate>. This implementation fires an <execute> event before\n * executing the given change.\n * \n * Parameters:\n * \n * change - Object that described the change.\n */\nmxGraphModel.prototype.execute = function(change)\n{\n\tchange.execute();\n\tthis.beginUpdate();\n\tthis.currentEdit.add(change);\n\tthis.fireEvent(new mxEventObject(mxEvent.EXECUTE, 'change', change));\n\t// New global executed event\n\tthis.fireEvent(new mxEventObject(mxEvent.EXECUTED, 'change', change));\n\tthis.endUpdate();\n};\n\n/**\n * Function: beginUpdate\n * \n * Increments the <updateLevel> by one. The event notification\n * is queued until <updateLevel> reaches 0 by use of\n * <endUpdate>.\n *\n * All changes on <mxGraphModel> are transactional,\n * that is, they are executed in a single undoable change\n * on the model (without transaction isolation).\n * Therefore, if you want to combine any\n * number of changes into a single undoable change,\n * you should group any two or more API calls that\n * modify the graph model between <beginUpdate>\n * and <endUpdate> calls as shown here:\n * \n * (code)\n * var model = graph.getModel();\n * var parent = graph.getDefaultParent();\n * var index = model.getChildCount(parent);\n * model.beginUpdate();\n * try\n * {\n *   model.add(parent, v1, index);\n *   model.add(parent, v2, index+1);\n * }\n * finally\n * {\n *   model.endUpdate();\n * }\n * (end)\n * \n * Of course there is a shortcut for appending a\n * sequence of cells into the default parent:\n * \n * (code)\n * graph.addCells([v1, v2]).\n * (end)\n */\nmxGraphModel.prototype.beginUpdate = function()\n{\n\tthis.updateLevel++;\n\tthis.fireEvent(new mxEventObject(mxEvent.BEGIN_UPDATE));\n\t\n\tif (this.updateLevel == 1)\n\t{\n\t\tthis.fireEvent(new mxEventObject(mxEvent.START_EDIT));\n\t}\n};\n\n/**\n * Function: endUpdate\n * \n * Decrements the <updateLevel> by one and fires an <undo>\n * event if the <updateLevel> reaches 0. This function\n * indirectly fires a <change> event by invoking the notify\n * function on the <currentEdit> und then creates a new\n * <currentEdit> using <createUndoableEdit>.\n *\n * The <undo> event is fired only once per edit, whereas\n * the <change> event is fired whenever the notify\n * function is invoked, that is, on undo and redo of\n * the edit.\n */\nmxGraphModel.prototype.endUpdate = function()\n{\n\tthis.updateLevel--;\n\t\n\tif (this.updateLevel == 0)\n\t{\n\t\tthis.fireEvent(new mxEventObject(mxEvent.END_EDIT));\n\t}\n\t\n\tif (!this.endingUpdate)\n\t{\n\t\tthis.endingUpdate = this.updateLevel == 0;\n\t\tthis.fireEvent(new mxEventObject(mxEvent.END_UPDATE, 'edit', this.currentEdit));\n\n\t\ttry\n\t\t{\t\t\n\t\t\tif (this.endingUpdate && !this.currentEdit.isEmpty())\n\t\t\t{\n\t\t\t\tthis.fireEvent(new mxEventObject(mxEvent.BEFORE_UNDO, 'edit', this.currentEdit));\n\t\t\t\tvar tmp = this.currentEdit;\n\t\t\t\tthis.currentEdit = this.createUndoableEdit();\n\t\t\t\ttmp.notify();\n\t\t\t\tthis.fireEvent(new mxEventObject(mxEvent.UNDO, 'edit', tmp));\n\t\t\t}\n\t\t}\n\t\tfinally\n\t\t{\n\t\t\tthis.endingUpdate = false;\n\t\t}\n\t}\n};\n\n/**\n * Function: createUndoableEdit\n * \n * Creates a new <mxUndoableEdit> that implements the\n * notify function to fire a <change> and <notify> event\n * through the <mxUndoableEdit>'s source.\n * \n * Parameters:\n * \n * significant - Optional boolean that specifies if the edit to be created is\n * significant. Default is true.\n */\nmxGraphModel.prototype.createUndoableEdit = function(significant)\n{\n\tvar edit = new mxUndoableEdit(this, (significant != null) ? significant : true);\n\t\n\tedit.notify = function()\n\t{\n\t\t// LATER: Remove changes property (deprecated)\n\t\tedit.source.fireEvent(new mxEventObject(mxEvent.CHANGE,\n\t\t\t'edit', edit, 'changes', edit.changes));\n\t\tedit.source.fireEvent(new mxEventObject(mxEvent.NOTIFY,\n\t\t\t'edit', edit, 'changes', edit.changes));\n\t};\n\t\n\treturn edit;\n};\n\n/**\n * Function: mergeChildren\n * \n * Merges the children of the given cell into the given target cell inside\n * this model. All cells are cloned unless there is a corresponding cell in\n * the model with the same id, in which case the source cell is ignored and\n * all edges are connected to the corresponding cell in this model. Edges\n * are considered to have no identity and are always cloned unless the\n * cloneAllEdges flag is set to false, in which case edges with the same\n * id in the target model are reconnected to reflect the terminals of the\n * source edges.\n */\nmxGraphModel.prototype.mergeChildren = function(from, to, cloneAllEdges)\n{\n\tcloneAllEdges = (cloneAllEdges != null) ? cloneAllEdges : true;\n\t\n\tthis.beginUpdate();\n\ttry\n\t{\n\t\tvar mapping = new Object();\n\t\tthis.mergeChildrenImpl(from, to, cloneAllEdges, mapping);\n\t\t\n\t\t// Post-processes all edges in the mapping and\n\t\t// reconnects the terminals to the corresponding\n\t\t// cells in the target model\n\t\tfor (var key in mapping)\n\t\t{\n\t\t\tvar cell = mapping[key];\n\t\t\tvar terminal = this.getTerminal(cell, true);\n\n\t\t\tif (terminal != null)\n\t\t\t{\n\t\t\t\tterminal = mapping[mxCellPath.create(terminal)];\n\t\t\t\tthis.setTerminal(cell, terminal, true);\n\t\t\t}\n\t\t\t\n\t\t\tterminal = this.getTerminal(cell, false);\n\t\t\t\n\t\t\tif (terminal != null)\n\t\t\t{\n\t\t\t\tterminal = mapping[mxCellPath.create(terminal)];\n\t\t\t\tthis.setTerminal(cell, terminal, false);\n\t\t\t}\n\t\t}\n\t}\n\tfinally\n\t{\n\t\tthis.endUpdate();\n\t}\n};\n\n/**\n * Function: mergeChildren\n * \n * Clones the children of the source cell into the given target cell in\n * this model and adds an entry to the mapping that maps from the source\n * cell to the target cell with the same id or the clone of the source cell\n * that was inserted into this model.\n */\nmxGraphModel.prototype.mergeChildrenImpl = function(from, to, cloneAllEdges, mapping)\n{\n\tthis.beginUpdate();\n\ttry\n\t{\n\t\tvar childCount = from.getChildCount();\n\t\t\n\t\tfor (var i = 0; i < childCount; i++)\n\t\t{\n\t\t\tvar cell = from.getChildAt(i);\n\t\t\t\n\t\t\tif (typeof(cell.getId) == 'function')\n\t\t\t{\n\t\t\t\tvar id = cell.getId();\n\t\t\t\tvar target = (id != null && (!this.isEdge(cell) || !cloneAllEdges)) ?\n\t\t\t\t\t\tthis.getCell(id) : null;\n\t\t\t\t\n\t\t\t\t// Clones and adds the child if no cell exists for the id\n\t\t\t\tif (target == null)\n\t\t\t\t{\n\t\t\t\t\tvar clone = cell.clone();\n\t\t\t\t\tclone.setId(id);\n\t\t\t\t\t\n\t\t\t\t\t// Sets the terminals from the original cell to the clone\n\t\t\t\t\t// because the lookup uses strings not cells in JS\n\t\t\t\t\tclone.setTerminal(cell.getTerminal(true), true);\n\t\t\t\t\tclone.setTerminal(cell.getTerminal(false), false);\n\t\t\t\t\t\n\t\t\t\t\t// Do *NOT* use model.add as this will move the edge away\n\t\t\t\t\t// from the parent in updateEdgeParent if maintainEdgeParent\n\t\t\t\t\t// is enabled in the target model\n\t\t\t\t\ttarget = to.insert(clone);\n\t\t\t\t\tthis.cellAdded(target);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// Stores the mapping for later reconnecting edges\n\t\t\t\tmapping[mxCellPath.create(cell)] = target;\n\t\t\t\t\n\t\t\t\t// Recurses\n\t\t\t\tthis.mergeChildrenImpl(cell, target, cloneAllEdges, mapping);\n\t\t\t}\n\t\t}\n\t}\n\tfinally\n\t{\n\t\tthis.endUpdate();\n\t}\n};\n\n/**\n * Function: getParents\n * \n * Returns an array that represents the set (no duplicates) of all parents\n * for the given array of cells.\n * \n * Parameters:\n * \n * cells - Array of cells whose parents should be returned.\n */\nmxGraphModel.prototype.getParents = function(cells)\n{\n\tvar parents = [];\n\t\n\tif (cells != null)\n\t{\n\t\tvar dict = new mxDictionary();\n\t\t\n\t\tfor (var i = 0; i < cells.length; i++)\n\t\t{\n\t\t\tvar parent = this.getParent(cells[i]);\n\t\t\t\n\t\t\tif (parent != null && !dict.get(parent))\n\t\t\t{\n\t\t\t\tdict.put(parent, true);\n\t\t\t\tparents.push(parent);\n\t\t\t}\n\t\t}\n\t}\n\t\n\treturn parents;\n};\n\n//\n// Cell Cloning\n//\n\n/**\n * Function: cloneCell\n * \n * Returns a deep clone of the given <mxCell> (including\n * the children) which is created using <cloneCells>.\n *\n * Parameters:\n * \n * cell - <mxCell> to be cloned.\n */\nmxGraphModel.prototype.cloneCell = function(cell)\n{\n\tif (cell != null)\n\t{\n\t\treturn this.cloneCells([cell], true)[0];\n\t}\n\t\n\treturn null;\n};\n\n/**\n * Function: cloneCells\n * \n * Returns an array of clones for the given array of <mxCells>.\n * Depending on the value of includeChildren, a deep clone is created for\n * each cell. Connections are restored based if the corresponding\n * cell is contained in the passed in array.\n *\n * Parameters:\n * \n * cells - Array of <mxCell> to be cloned.\n * includeChildren - Boolean indicating if the cells should be cloned\n * with all descendants.\n * mapping - Optional mapping for existing clones.\n */\nmxGraphModel.prototype.cloneCells = function(cells, includeChildren, mapping)\n{\n\tmapping = (mapping != null) ? mapping : new Object();\n\tvar clones = [];\n\t\n\tfor (var i = 0; i < cells.length; i++)\n\t{\n\t\tif (cells[i] != null)\n\t\t{\n\t\t\tclones.push(this.cloneCellImpl(cells[i], mapping, includeChildren));\n\t\t}\n\t\telse\n\t\t{\n\t\t\tclones.push(null);\n\t\t}\n\t}\n\t\n\tfor (var i = 0; i < clones.length; i++)\n\t{\n\t\tif (clones[i] != null)\n\t\t{\n\t\t\tthis.restoreClone(clones[i], cells[i], mapping);\n\t\t}\n\t}\n\t\n\treturn clones;\n};\n\t\t\t\n/**\n * Function: cloneCellImpl\n * \n * Inner helper method for cloning cells recursively.\n */\nmxGraphModel.prototype.cloneCellImpl = function(cell, mapping, includeChildren)\n{\n\tvar ident = mxObjectIdentity.get(cell);\n\tvar clone = mapping[ident];\n\t\n\tif (clone == null)\n\t{\n\t\tclone = this.cellCloned(cell);\n\t\tmapping[ident] = clone;\n\n\t\tif (includeChildren)\n\t\t{\n\t\t\tvar childCount = this.getChildCount(cell);\n\t\t\t\n\t\t\tfor (var i = 0; i < childCount; i++)\n\t\t\t{\n\t\t\t\tvar cloneChild = this.cloneCellImpl(\n\t\t\t\t\tthis.getChildAt(cell, i), mapping, true);\n\t\t\t\tclone.insert(cloneChild);\n\t\t\t}\n\t\t}\n\t}\n\t\n\treturn clone;\n};\n\n/**\n * Function: cellCloned\n * \n * Hook for cloning the cell. This returns cell.clone() or\n * any possible exceptions.\n */\nmxGraphModel.prototype.cellCloned = function(cell)\n{\n\treturn cell.clone();\n};\n\n/**\n * Function: restoreClone\n * \n * Inner helper method for restoring the connections in\n * a network of cloned cells.\n */\nmxGraphModel.prototype.restoreClone = function(clone, cell, mapping)\n{\n\tvar source = this.getTerminal(cell, true);\n\t\n\tif (source != null)\n\t{\n\t\tvar tmp = mapping[mxObjectIdentity.get(source)];\n\t\t\n\t\tif (tmp != null)\n\t\t{\n\t\t\ttmp.insertEdge(clone, true);\n\t\t}\n\t}\n\t\n\tvar target = this.getTerminal(cell, false);\n\t\n\tif (target != null)\n\t{\n\t\tvar tmp = mapping[mxObjectIdentity.get(target)];\n\t\t\n\t\tif (tmp != null)\n\t\t{\t\n\t\t\ttmp.insertEdge(clone, false);\n\t\t}\n\t}\n\t\n\tvar childCount = this.getChildCount(clone);\n\t\n\tfor (var i = 0; i < childCount; i++)\n\t{\n\t\tthis.restoreClone(this.getChildAt(clone, i),\n\t\t\tthis.getChildAt(cell, i), mapping);\n\t}\n};\n\n//\n// Atomic changes\n//\n\n/**\n * Class: mxRootChange\n * \n * Action to change the root in a model.\n *\n * Constructor: mxRootChange\n * \n * Constructs a change of the root in the\n * specified model.\n */\nfunction mxRootChange(model, root)\n{\n\tthis.model = model;\n\tthis.root = root;\n\tthis.previous = root;\n};\n\n/**\n * Function: execute\n * \n * Carries out a change of the root using\n * <mxGraphModel.rootChanged>.\n */\nmxRootChange.prototype.execute = function()\n{\n\tthis.root = this.previous;\n\tthis.previous = this.model.rootChanged(this.previous);\n};\n\n/**\n * Class: mxChildChange\n * \n * Action to add or remove a child in a model.\n *\n * Constructor: mxChildChange\n * \n * Constructs a change of a child in the\n * specified model.\n */\nfunction mxChildChange(model, parent, child, index)\n{\n\tthis.model = model;\n\tthis.parent = parent;\n\tthis.previous = parent;\n\tthis.child = child;\n\tthis.index = index;\n\tthis.previousIndex = index;\n};\n\n/**\n * Function: execute\n * \n * Changes the parent of <child> using\n * <mxGraphModel.parentForCellChanged> and\n * removes or restores the cell's\n * connections.\n */\nmxChildChange.prototype.execute = function()\n{\n\tif (this.child != null)\n\t{\n\t\tvar tmp = this.model.getParent(this.child);\n\t\tvar tmp2 = (tmp != null) ? tmp.getIndex(this.child) : 0;\n\t\t\n\t\tif (this.previous == null)\n\t\t{\n\t\t\tthis.connect(this.child, false);\n\t\t}\n\t\t\n\t\ttmp = this.model.parentForCellChanged(\n\t\t\tthis.child, this.previous, this.previousIndex);\n\t\t\t\n\t\tif (this.previous != null)\n\t\t{\n\t\t\tthis.connect(this.child, true);\n\t\t}\n\t\t\n\t\tthis.parent = this.previous;\n\t\tthis.previous = tmp;\n\t\tthis.index = this.previousIndex;\n\t\tthis.previousIndex = tmp2;\n\t}\n};\n\n/**\n * Function: disconnect\n * \n * Disconnects the given cell recursively from its\n * terminals and stores the previous terminal in the\n * cell's terminals.\n */\nmxChildChange.prototype.connect = function(cell, isConnect)\n{\n\tisConnect = (isConnect != null) ? isConnect : true;\n\t\n\tvar source = cell.getTerminal(true);\n\tvar target = cell.getTerminal(false);\n\t\n\tif (source != null)\n\t{\n\t\tif (isConnect)\n\t\t{\n\t\t\tthis.model.terminalForCellChanged(cell, source, true);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tthis.model.terminalForCellChanged(cell, null, true);\n\t\t}\n\t}\n\t\n\tif (target != null)\n\t{\n\t\tif (isConnect)\n\t\t{\n\t\t\tthis.model.terminalForCellChanged(cell, target, false);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tthis.model.terminalForCellChanged(cell, null, false);\n\t\t}\n\t}\n\t\n\tcell.setTerminal(source, true);\n\tcell.setTerminal(target, false);\n\t\n\tvar childCount = this.model.getChildCount(cell);\n\t\n\tfor (var i=0; i<childCount; i++)\n\t{\n\t\tthis.connect(this.model.getChildAt(cell, i), isConnect);\n\t}\n};\n\n/**\n * Class: mxTerminalChange\n * \n * Action to change a terminal in a model.\n *\n * Constructor: mxTerminalChange\n * \n * Constructs a change of a terminal in the \n * specified model.\n */\nfunction mxTerminalChange(model, cell, terminal, source)\n{\n\tthis.model = model;\n\tthis.cell = cell;\n\tthis.terminal = terminal;\n\tthis.previous = terminal;\n\tthis.source = source;\n};\n\n/**\n * Function: execute\n * \n * Changes the terminal of <cell> to <previous> using\n * <mxGraphModel.terminalForCellChanged>.\n */\nmxTerminalChange.prototype.execute = function()\n{\n\tif (this.cell != null)\n\t{\n\t\tthis.terminal = this.previous;\n\t\tthis.previous = this.model.terminalForCellChanged(\n\t\t\tthis.cell, this.previous, this.source);\n\t}\n};\n\n/**\n * Class: mxValueChange\n * \n * Action to change a user object in a model.\n *\n * Constructor: mxValueChange\n * \n * Constructs a change of a user object in the \n * specified model.\n */\nfunction mxValueChange(model, cell, value)\n{\n\tthis.model = model;\n\tthis.cell = cell;\n\tthis.value = value;\n\tthis.previous = value;\n};\n\n/**\n * Function: execute\n * \n * Changes the value of <cell> to <previous> using\n * <mxGraphModel.valueForCellChanged>.\n */\nmxValueChange.prototype.execute = function()\n{\n\tif (this.cell != null)\n\t{\n\t\tthis.value = this.previous;\n\t\tthis.previous = this.model.valueForCellChanged(\n\t\t\tthis.cell, this.previous);\n\t}\n};\n\n/**\n * Class: mxStyleChange\n * \n * Action to change a cell's style in a model.\n *\n * Constructor: mxStyleChange\n * \n * Constructs a change of a style in the\n * specified model.\n */\nfunction mxStyleChange(model, cell, style)\n{\n\tthis.model = model;\n\tthis.cell = cell;\n\tthis.style = style;\n\tthis.previous = style;\n};\n\n/**\n * Function: execute\n * \n * Changes the style of <cell> to <previous> using\n * <mxGraphModel.styleForCellChanged>.\n */\nmxStyleChange.prototype.execute = function()\n{\n\tif (this.cell != null)\n\t{\n\t\tthis.style = this.previous;\n\t\tthis.previous = this.model.styleForCellChanged(\n\t\t\tthis.cell, this.previous);\n\t}\n};\n\n/**\n * Class: mxGeometryChange\n * \n * Action to change a cell's geometry in a model.\n *\n * Constructor: mxGeometryChange\n * \n * Constructs a change of a geometry in the\n * specified model.\n */\nfunction mxGeometryChange(model, cell, geometry)\n{\n\tthis.model = model;\n\tthis.cell = cell;\n\tthis.geometry = geometry;\n\tthis.previous = geometry;\n};\n\n/**\n * Function: execute\n * \n * Changes the geometry of <cell> ro <previous> using\n * <mxGraphModel.geometryForCellChanged>.\n */\nmxGeometryChange.prototype.execute = function()\n{\n\tif (this.cell != null)\n\t{\n\t\tthis.geometry = this.previous;\n\t\tthis.previous = this.model.geometryForCellChanged(\n\t\t\tthis.cell, this.previous);\n\t}\n};\n\n/**\n * Class: mxCollapseChange\n * \n * Action to change a cell's collapsed state in a model.\n *\n * Constructor: mxCollapseChange\n * \n * Constructs a change of a collapsed state in the\n * specified model.\n */\nfunction mxCollapseChange(model, cell, collapsed)\n{\n\tthis.model = model;\n\tthis.cell = cell;\n\tthis.collapsed = collapsed;\n\tthis.previous = collapsed;\n};\n\n/**\n * Function: execute\n * \n * Changes the collapsed state of <cell> to <previous> using\n * <mxGraphModel.collapsedStateForCellChanged>.\n */\nmxCollapseChange.prototype.execute = function()\n{\n\tif (this.cell != null)\n\t{\n\t\tthis.collapsed = this.previous;\n\t\tthis.previous = this.model.collapsedStateForCellChanged(\n\t\t\tthis.cell, this.previous);\n\t}\n};\n\n/**\n * Class: mxVisibleChange\n * \n * Action to change a cell's visible state in a model.\n *\n * Constructor: mxVisibleChange\n * \n * Constructs a change of a visible state in the\n * specified model.\n */\nfunction mxVisibleChange(model, cell, visible)\n{\n\tthis.model = model;\n\tthis.cell = cell;\n\tthis.visible = visible;\n\tthis.previous = visible;\n};\n\n/**\n * Function: execute\n * \n * Changes the visible state of <cell> to <previous> using\n * <mxGraphModel.visibleStateForCellChanged>.\n */\nmxVisibleChange.prototype.execute = function()\n{\n\tif (this.cell != null)\n\t{\n\t\tthis.visible = this.previous;\n\t\tthis.previous = this.model.visibleStateForCellChanged(\n\t\t\tthis.cell, this.previous);\n\t}\n};\n\n/**\n * Class: mxCellAttributeChange\n * \n * Action to change the attribute of a cell's user object.\n * There is no method on the graph model that uses this\n * action. To use the action, you can use the code shown\n * in the example below.\n * \n * Example:\n * \n * To change the attributeName in the cell's user object\n * to attributeValue, use the following code:\n * \n * (code)\n * model.beginUpdate();\n * try\n * {\n *   var edit = new mxCellAttributeChange(\n *     cell, attributeName, attributeValue);\n *   model.execute(edit);\n * }\n * finally\n * {\n *   model.endUpdate();\n * } \n * (end)\n *\n * Constructor: mxCellAttributeChange\n * \n * Constructs a change of a attribute of the DOM node\n * stored as the value of the given <mxCell>.\n */\nfunction mxCellAttributeChange(cell, attribute, value)\n{\n\tthis.cell = cell;\n\tthis.attribute = attribute;\n\tthis.value = value;\n\tthis.previous = value;\n};\n\n/**\n * Function: execute\n * \n * Changes the attribute of the cell's user object by\n * using <mxCell.setAttribute>.\n */\nmxCellAttributeChange.prototype.execute = function()\n{\n\tif (this.cell != null)\n\t{\n\t\tvar tmp = this.cell.getAttribute(this.attribute);\n\t\t\n\t\tif (this.previous == null)\n\t\t{\n\t\t\tthis.cell.value.removeAttribute(this.attribute);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tthis.cell.setAttribute(this.attribute, this.previous);\n\t\t}\n\t\t\n\t\tthis.previous = tmp;\n\t}\n};\n"
  },
  {
    "path": "static/cherry/drawio_demo/src/js/mxClient.js",
    "content": "/**\n * Copyright (c) 2006-2017, JGraph Ltd\n * Copyright (c) 2006-2017, Gaudenz Alder\n */\nvar mxClient =\n{\n\t/**\n\t * Class: mxClient\n\t *\n\t * Bootstrapping mechanism for the mxGraph thin client. The production version\n\t * of this file contains all code required to run the mxGraph thin client, as\n\t * well as global constants to identify the browser and operating system in\n\t * use. You may have to load chrome://global/content/contentAreaUtils.js in\n\t * your page to disable certain security restrictions in Mozilla.\n\t * \n\t * Variable: VERSION\n\t *\n\t * Contains the current version of the mxGraph library. The strings that\n\t * communicate versions of mxGraph use the following format.\n\t * \n\t * versionMajor.versionMinor.buildNumber.revisionNumber\n\t * \n\t * Current version is 3.9.12.\n\t */\n\tVERSION: '3.9.12',\n\n\t/**\n\t * Variable: IS_IE\n\t *\n\t * True if the current browser is Internet Explorer 10 or below. Use <mxClient.IS_IE11>\n\t * to detect IE 11.\n\t */\n\tIS_IE: navigator.userAgent.indexOf('MSIE') >= 0,\n\n\t/**\n\t * Variable: IS_IE6\n\t *\n\t * True if the current browser is Internet Explorer 6.x.\n\t */\n\tIS_IE6: navigator.userAgent.indexOf('MSIE 6') >= 0,\n\n\t/**\n\t * Variable: IS_IE11\n\t *\n\t * True if the current browser is Internet Explorer 11.x.\n\t */\n\tIS_IE11: !!navigator.userAgent.match(/Trident\\/7\\./),\n\n\t/**\n\t * Variable: IS_EDGE\n\t *\n\t * True if the current browser is Microsoft Edge.\n\t */\n\tIS_EDGE: !!navigator.userAgent.match(/Edge\\//),\n\n\t/**\n\t * Variable: IS_QUIRKS\n\t *\n\t * True if the current browser is Internet Explorer and it is in quirks mode.\n\t */\n\tIS_QUIRKS: navigator.userAgent.indexOf('MSIE') >= 0 && (document.documentMode == null || document.documentMode == 5),\n\n\t/**\n\t * Variable: IS_EM\n\t * \n\t * True if the browser is IE11 in enterprise mode (IE8 standards mode).\n\t */\n\tIS_EM: 'spellcheck' in document.createElement('textarea') && document.documentMode == 8,\n\n\t/**\n\t * Variable: VML_PREFIX\n\t * \n\t * Prefix for VML namespace in node names. Default is 'v'.\n\t */\n\tVML_PREFIX: 'v',\n\n\t/**\n\t * Variable: OFFICE_PREFIX\n\t * \n\t * Prefix for VML office namespace in node names. Default is 'o'.\n\t */\n\tOFFICE_PREFIX: 'o',\n\n\t/**\n\t * Variable: IS_NS\n\t *\n\t * True if the current browser is Netscape (including Firefox).\n\t */\n  \tIS_NS: navigator.userAgent.indexOf('Mozilla/') >= 0 &&\n  \t\tnavigator.userAgent.indexOf('MSIE') < 0 &&\n  \t\tnavigator.userAgent.indexOf('Edge/') < 0,\n\n\t/**\n\t * Variable: IS_OP\n\t *\n\t * True if the current browser is Opera.\n\t */\n  \tIS_OP: navigator.userAgent.indexOf('Opera/') >= 0 ||\n  \t\tnavigator.userAgent.indexOf('OPR/') >= 0,\n\n\t/**\n\t * Variable: IS_OT\n\t *\n\t * True if -o-transform is available as a CSS style, ie for Opera browsers\n\t * based on a Presto engine with version 2.5 or later.\n\t */\n  \tIS_OT: navigator.userAgent.indexOf('Presto/') >= 0 &&\n  \t\tnavigator.userAgent.indexOf('Presto/2.4.') < 0 &&\n  \t\tnavigator.userAgent.indexOf('Presto/2.3.') < 0 &&\n  \t\tnavigator.userAgent.indexOf('Presto/2.2.') < 0 &&\n  \t\tnavigator.userAgent.indexOf('Presto/2.1.') < 0 &&\n  \t\tnavigator.userAgent.indexOf('Presto/2.0.') < 0 &&\n  \t\tnavigator.userAgent.indexOf('Presto/1.') < 0,\n  \t\n\t/**\n\t * Variable: IS_SF\n\t *\n\t * True if the current browser is Safari.\n\t */\n  \tIS_SF: navigator.userAgent.indexOf('AppleWebKit/') >= 0 &&\n  \t\tnavigator.userAgent.indexOf('Chrome/') < 0 &&\n  \t\tnavigator.userAgent.indexOf('Edge/') < 0,\n  \t\n\t/**\n\t * Variable: IS_IOS\n\t * \n\t * Returns true if the user agent is an iPad, iPhone or iPod.\n\t */\n  \tIS_IOS: (navigator.userAgent.match(/(iPad|iPhone|iPod)/g) ? true : false),\n  \t\t\n\t/**\n\t * Variable: IS_GC\n\t *\n\t * True if the current browser is Google Chrome.\n\t */\n  \tIS_GC: navigator.userAgent.indexOf('Chrome/') >= 0 &&\n\t\tnavigator.userAgent.indexOf('Edge/') < 0,\n\t\n\t/**\n\t * Variable: IS_CHROMEAPP\n\t *\n\t * True if the this is running inside a Chrome App.\n\t */\n  \tIS_CHROMEAPP: window.chrome != null && chrome.app != null && chrome.app.runtime != null,\n\t\t\n\t/**\n\t * Variable: IS_FF\n\t *\n\t * True if the current browser is Firefox.\n\t */\n  \tIS_FF: navigator.userAgent.indexOf('Firefox/') >= 0,\n  \t\n\t/**\n\t * Variable: IS_MT\n\t *\n\t * True if -moz-transform is available as a CSS style. This is the case\n\t * for all Firefox-based browsers newer than or equal 3, such as Camino,\n\t * Iceweasel, Seamonkey and Iceape.\n\t */\n  \tIS_MT: (navigator.userAgent.indexOf('Firefox/') >= 0 &&\n\t\tnavigator.userAgent.indexOf('Firefox/1.') < 0 &&\n  \t\tnavigator.userAgent.indexOf('Firefox/2.') < 0) ||\n  \t\t(navigator.userAgent.indexOf('Iceweasel/') >= 0 &&\n  \t\tnavigator.userAgent.indexOf('Iceweasel/1.') < 0 &&\n  \t\tnavigator.userAgent.indexOf('Iceweasel/2.') < 0) ||\n  \t\t(navigator.userAgent.indexOf('SeaMonkey/') >= 0 &&\n  \t\tnavigator.userAgent.indexOf('SeaMonkey/1.') < 0) ||\n  \t\t(navigator.userAgent.indexOf('Iceape/') >= 0 &&\n  \t\tnavigator.userAgent.indexOf('Iceape/1.') < 0),\n\n\t/**\n\t * Variable: IS_SVG\n\t *\n\t * True if the browser supports SVG.\n\t */\n  \tIS_SVG: navigator.userAgent.indexOf('Firefox/') >= 0 || // FF and Camino\n\t  \tnavigator.userAgent.indexOf('Iceweasel/') >= 0 || // Firefox on Debian\n\t  \tnavigator.userAgent.indexOf('Seamonkey/') >= 0 || // Firefox-based\n\t  \tnavigator.userAgent.indexOf('Iceape/') >= 0 || // Seamonkey on Debian\n\t  \tnavigator.userAgent.indexOf('Galeon/') >= 0 || // Gnome Browser (old)\n\t  \tnavigator.userAgent.indexOf('Epiphany/') >= 0 || // Gnome Browser (new)\n\t  \tnavigator.userAgent.indexOf('AppleWebKit/') >= 0 || // Safari/Google Chrome\n\t  \tnavigator.userAgent.indexOf('Gecko/') >= 0 || // Netscape/Gecko\n\t  \tnavigator.userAgent.indexOf('Opera/') >= 0 || // Opera\n\t  \t(document.documentMode != null && document.documentMode >= 9), // IE9+\n\n\t/**\n\t * Variable: NO_FO\n\t *\n\t * True if foreignObject support is not available. This is the case for\n\t * Opera, older SVG-based browsers and all versions of IE.\n\t */\n  \tNO_FO: !document.createElementNS || document.createElementNS('http://www.w3.org/2000/svg',\n  \t\t'foreignObject') != '[object SVGForeignObjectElement]' || navigator.userAgent.indexOf('Opera/') >= 0,\n\n\t/**\n\t * Variable: IS_VML\n\t *\n\t * True if the browser supports VML.\n\t */\n  \tIS_VML: navigator.appName.toUpperCase() == 'MICROSOFT INTERNET EXPLORER',\n\n\t/**\n\t * Variable: IS_WIN\n\t *\n\t * True if the client is a Windows.\n\t */\n  \tIS_WIN: navigator.appVersion.indexOf('Win') > 0,\n\n\t/**\n\t * Variable: IS_MAC\n\t *\n\t * True if the client is a Mac.\n\t */\n  \tIS_MAC: navigator.appVersion.indexOf('Mac') > 0,\n\n\t/**\n\t * Variable: IS_TOUCH\n\t * \n\t * True if this device supports touchstart/-move/-end events (Apple iOS,\n\t * Android, Chromebook and Chrome Browser on touch-enabled devices).\n\t */\n  \tIS_TOUCH: 'ontouchstart' in document.documentElement,\n\n\t/**\n\t * Variable: IS_POINTER\n\t * \n\t * True if this device supports Microsoft pointer events (always false on Macs).\n\t */\n  \tIS_POINTER: window.PointerEvent != null && !(navigator.appVersion.indexOf('Mac') > 0),\n\n\t/**\n\t * Variable: IS_LOCAL\n\t *\n\t * True if the documents location does not start with http:// or https://.\n\t */\n  \tIS_LOCAL: document.location.href.indexOf('http://') < 0 &&\n  \t\t\t  document.location.href.indexOf('https://') < 0,\n\n\t/**\n\t * Variable: defaultBundles\n\t * \n\t * Contains the base names of the default bundles if mxLoadResources is false.\n\t */\n  \tdefaultBundles: [],\n\n\t/**\n\t * Function: isBrowserSupported\n\t *\n\t * Returns true if the current browser is supported, that is, if\n\t * <mxClient.IS_VML> or <mxClient.IS_SVG> is true.\n\t * \n\t * Example:\n\t * \n\t * (code)\n\t * if (!mxClient.isBrowserSupported())\n\t * {\n\t *   mxUtils.error('Browser is not supported!', 200, false);\n\t * }\n\t * (end)\n\t */\n\tisBrowserSupported: function()\n\t{\n\t\treturn mxClient.IS_VML || mxClient.IS_SVG;\n\t},\n\n\t/**\n\t * Function: link\n\t *\n\t * Adds a link node to the head of the document. Use this\n\t * to add a stylesheet to the page as follows:\n\t *\n\t * (code)\n\t * mxClient.link('stylesheet', filename);\n\t * (end)\n\t *\n\t * where filename is the (relative) URL of the stylesheet. The charset\n\t * is hardcoded to ISO-8859-1 and the type is text/css.\n\t * \n\t * Parameters:\n\t * \n\t * rel - String that represents the rel attribute of the link node.\n\t * href - String that represents the href attribute of the link node.\n\t * doc - Optional parent document of the link node.\n\t */\n\tlink: function(rel, href, doc)\n\t{\n\t\tdoc = doc || document;\n\n\t\t// Workaround for Operation Aborted in IE6 if base tag is used in head\n\t\tif (mxClient.IS_IE6)\n\t\t{\n\t\t\tdoc.write('<link rel=\"' + rel + '\" href=\"' + href + '\" charset=\"UTF-8\" type=\"text/css\"/>');\n\t\t}\n\t\telse\n\t\t{\t\n\t\t\tvar link = doc.createElement('link');\n\t\t\t\n\t\t\tlink.setAttribute('rel', rel);\n\t\t\tlink.setAttribute('href', href);\n\t\t\tlink.setAttribute('charset', 'UTF-8');\n\t\t\tlink.setAttribute('type', 'text/css');\n\t\t\t\n\t\t\tvar head = doc.getElementsByTagName('head')[0];\n\t   \t\thead.appendChild(link);\n\t\t}\n\t},\n\t\n\t/**\n\t * Function: loadResources\n\t * \n\t * Helper method to load the default bundles if mxLoadResources is false.\n\t * \n\t * Parameters:\n\t * \n\t * fn - Function to call after all resources have been loaded.\n\t * lan - Optional string to pass to <mxResources.add>.\n\t */\n\tloadResources: function(fn, lan)\n\t{\n\t\tvar pending = mxClient.defaultBundles.length;\n\t\t\n\t\tfunction callback()\n\t\t{\n\t\t\tif (--pending == 0)\n\t\t\t{\n\t\t\t\tfn();\n\t\t\t}\n\t\t}\n\t\t\n\t\tfor (var i = 0; i < mxClient.defaultBundles.length; i++)\n\t\t{\n\t\t\tmxResources.add(mxClient.defaultBundles[i], lan, callback);\n\t\t}\n\t},\n\t\n\t/**\n\t * Function: include\n\t *\n\t * Dynamically adds a script node to the document header.\n\t * \n\t * In production environments, the includes are resolved in the mxClient.js\n\t * file to reduce the number of requests required for client startup. This\n\t * function should only be used in development environments, but not in\n\t * production systems.\n\t */\n\tinclude: function(src)\n\t{\n\t\tdocument.write('<script src=\"'+src+'\"></script>');\n\t}\n};\n\n/**\n * Variable: mxLoadResources\n * \n * Optional global config variable to toggle loading of the two resource files\n * in <mxGraph> and <mxEditor>. Default is true. NOTE: This is a global variable,\n * not a variable of mxClient. If this is false, you can use <mxClient.loadResources>\n * with its callback to load the default bundles asynchronously.\n *\n * (code)\n * <script type=\"text/javascript\">\n * \t\tvar mxLoadResources = false;\n * </script>\n * <script type=\"text/javascript\" src=\"/path/to/core/directory/js/mxClient.js\"></script>\n * (end)\n */\nif (typeof(mxLoadResources) == 'undefined')\n{\n\tmxLoadResources = true;\n}\n\n/**\n * Variable: mxForceIncludes\n * \n * Optional global config variable to force loading the JavaScript files in\n * development mode. Default is undefined. NOTE: This is a global variable,\n * not a variable of mxClient.\n *\n * (code)\n * <script type=\"text/javascript\">\n * \t\tvar mxLoadResources = true;\n * </script>\n * <script type=\"text/javascript\" src=\"/path/to/core/directory/js/mxClient.js\"></script>\n * (end)\n */\nif (typeof(mxForceIncludes) == 'undefined')\n{\n\tmxForceIncludes = false;\n}\n\n/**\n * Variable: mxResourceExtension\n * \n * Optional global config variable to specify the extension of resource files.\n * Default is true. NOTE: This is a global variable, not a variable of mxClient.\n *\n * (code)\n * <script type=\"text/javascript\">\n * \t\tvar mxResourceExtension = '.txt';\n * </script>\n * <script type=\"text/javascript\" src=\"/path/to/core/directory/js/mxClient.js\"></script>\n * (end)\n */\nif (typeof(mxResourceExtension) == 'undefined')\n{\n\tmxResourceExtension = '.txt';\n}\n\n/**\n * Variable: mxLoadStylesheets\n * \n * Optional global config variable to toggle loading of the CSS files when\n * the library is initialized. Default is true. NOTE: This is a global variable,\n * not a variable of mxClient.\n *\n * (code)\n * <script type=\"text/javascript\">\n * \t\tvar mxLoadStylesheets = false;\n * </script>\n * <script type=\"text/javascript\" src=\"/path/to/core/directory/js/mxClient.js\"></script>\n * (end)\n */\nif (typeof(mxLoadStylesheets) == 'undefined')\n{\n\tmxLoadStylesheets = true;\n}\n\n/**\n * Variable: basePath\n *\n * Basepath for all URLs in the core without trailing slash. Default is '.'.\n * Set mxBasePath prior to loading the mxClient library as follows to override\n * this setting:\n *\n * (code)\n * <script type=\"text/javascript\">\n * \t\tmxBasePath = '/path/to/core/directory';\n * </script>\n * <script type=\"text/javascript\" src=\"/path/to/core/directory/js/mxClient.js\"></script>\n * (end)\n * \n * When using a relative path, the path is relative to the URL of the page that\n * contains the assignment. Trailing slashes are automatically removed.\n */\nif (typeof(mxBasePath) != 'undefined' && mxBasePath.length > 0)\n{\n\t// Adds a trailing slash if required\n\tif (mxBasePath.substring(mxBasePath.length - 1) == '/')\n\t{\n\t\tmxBasePath = mxBasePath.substring(0, mxBasePath.length - 1);\n\t}\n\n\tmxClient.basePath = mxBasePath;\n}\nelse\n{\n\tmxClient.basePath = '.';\n}\n\n/**\n * Variable: imageBasePath\n *\n * Basepath for all images URLs in the core without trailing slash. Default is\n * <mxClient.basePath> + '/images'. Set mxImageBasePath prior to loading the\n * mxClient library as follows to override this setting:\n *\n * (code)\n * <script type=\"text/javascript\">\n * \t\tmxImageBasePath = '/path/to/image/directory';\n * </script>\n * <script type=\"text/javascript\" src=\"/path/to/core/directory/js/mxClient.js\"></script>\n * (end)\n * \n * When using a relative path, the path is relative to the URL of the page that\n * contains the assignment. Trailing slashes are automatically removed.\n */\nif (typeof(mxImageBasePath) != 'undefined' && mxImageBasePath.length > 0)\n{\n\t// Adds a trailing slash if required\n\tif (mxImageBasePath.substring(mxImageBasePath.length - 1) == '/')\n\t{\n\t\tmxImageBasePath = mxImageBasePath.substring(0, mxImageBasePath.length - 1);\n\t}\n\n\tmxClient.imageBasePath = mxImageBasePath;\n}\nelse\n{\n\tmxClient.imageBasePath = mxClient.basePath + '/images';\t\n}\n\n/**\n * Variable: language\n *\n * Defines the language of the client, eg. en for english, de for german etc.\n * The special value 'none' will disable all built-in internationalization and\n * resource loading. See <mxResources.getSpecialBundle> for handling identifiers\n * with and without a dash.\n * \n * Set mxLanguage prior to loading the mxClient library as follows to override\n * this setting:\n *\n * (code)\n * <script type=\"text/javascript\">\n * \t\tmxLanguage = 'en';\n * </script>\n * <script type=\"text/javascript\" src=\"js/mxClient.js\"></script>\n * (end)\n * \n * If internationalization is disabled, then the following variables should be\n * overridden to reflect the current language of the system. These variables are\n * cleared when i18n is disabled.\n * <mxEditor.askZoomResource>, <mxEditor.lastSavedResource>,\n * <mxEditor.currentFileResource>, <mxEditor.propertiesResource>,\n * <mxEditor.tasksResource>, <mxEditor.helpResource>, <mxEditor.outlineResource>,\n * <mxElbowEdgeHandler.doubleClickOrientationResource>, <mxUtils.errorResource>,\n * <mxUtils.closeResource>, <mxGraphSelectionModel.doneResource>,\n * <mxGraphSelectionModel.updatingSelectionResource>, <mxGraphView.doneResource>,\n * <mxGraphView.updatingDocumentResource>, <mxCellRenderer.collapseExpandResource>,\n * <mxGraph.containsValidationErrorsResource> and\n * <mxGraph.alreadyConnectedResource>.\n */\nif (typeof(mxLanguage) != 'undefined' && mxLanguage != null)\n{\n\tmxClient.language = mxLanguage;\n}\nelse\n{\n\tmxClient.language = (mxClient.IS_IE) ? navigator.userLanguage : navigator.language;\n}\n\n/**\n * Variable: defaultLanguage\n * \n * Defines the default language which is used in the common resource files. Any\n * resources for this language will only load the common resource file, but not\n * the language-specific resource file. Default is 'en'.\n * \n * Set mxDefaultLanguage prior to loading the mxClient library as follows to override\n * this setting:\n *\n * (code)\n * <script type=\"text/javascript\">\n * \t\tmxDefaultLanguage = 'de';\n * </script>\n * <script type=\"text/javascript\" src=\"js/mxClient.js\"></script>\n * (end)\n */\nif (typeof(mxDefaultLanguage) != 'undefined' && mxDefaultLanguage != null)\n{\n\tmxClient.defaultLanguage = mxDefaultLanguage;\n}\nelse\n{\n\tmxClient.defaultLanguage = 'en';\n}\n\n// Adds all required stylesheets and namespaces\nif (mxLoadStylesheets)\n{\n\tmxClient.link('stylesheet', mxClient.basePath + '/css/common.css');\n}\n\n/**\n * Variable: languages\n *\n * Defines the optional array of all supported language extensions. The default\n * language does not have to be part of this list. See\n * <mxResources.isLanguageSupported>.\n *\n * (code)\n * <script type=\"text/javascript\">\n * \t\tmxLanguages = ['de', 'it', 'fr'];\n * </script>\n * <script type=\"text/javascript\" src=\"js/mxClient.js\"></script>\n * (end)\n * \n * This is used to avoid unnecessary requests to language files, ie. if a 404\n * will be returned.\n */\nif (typeof(mxLanguages) != 'undefined' && mxLanguages != null)\n{\n\tmxClient.languages = mxLanguages;\n}\n\n// Adds required namespaces, stylesheets and memory handling for older IE browsers\nif (mxClient.IS_VML)\n{\n\tif (mxClient.IS_SVG)\n\t{\n\t\tmxClient.IS_VML = false;\n\t}\n\telse\n\t{\n\t\t// Enables support for IE8 standards mode. Note that this requires all attributes for VML\n\t\t// elements to be set using direct notation, ie. node.attr = value. The use of setAttribute\n\t\t// is not possible.\n\t\tif (document.documentMode == 8)\n\t\t{\n\t\t\tdocument.namespaces.add(mxClient.VML_PREFIX, 'urn:schemas-microsoft-com:vml', '#default#VML');\n\t\t\tdocument.namespaces.add(mxClient.OFFICE_PREFIX, 'urn:schemas-microsoft-com:office:office', '#default#VML');\n\t\t}\n\t\telse\n\t\t{\n\t\t\tdocument.namespaces.add(mxClient.VML_PREFIX, 'urn:schemas-microsoft-com:vml');\n\t\t\tdocument.namespaces.add(mxClient.OFFICE_PREFIX, 'urn:schemas-microsoft-com:office:office');\n\t\t}\n\n\t\t// Workaround for limited number of stylesheets in IE (does not work in standards mode)\n\t\tif (mxClient.IS_QUIRKS && document.styleSheets.length >= 30)\n\t\t{\n\t\t\t(function()\n\t\t\t{\n\t\t\t\tvar node = document.createElement('style');\n\t\t\t\tnode.type = 'text/css';\n\t\t\t\tnode.styleSheet.cssText = mxClient.VML_PREFIX + '\\\\:*{behavior:url(#default#VML)}' +\n\t\t        \tmxClient.OFFICE_PREFIX + '\\\\:*{behavior:url(#default#VML)}';\n\t\t        document.getElementsByTagName('head')[0].appendChild(node);\n\t\t\t})();\n\t\t}\n\t\telse\n\t\t{\n\t\t\tdocument.createStyleSheet().cssText = mxClient.VML_PREFIX + '\\\\:*{behavior:url(#default#VML)}' +\n\t\t    \tmxClient.OFFICE_PREFIX + '\\\\:*{behavior:url(#default#VML)}';\n\t\t}\n\t    \n\t    if (mxLoadStylesheets)\n\t    {\n\t    \tmxClient.link('stylesheet', mxClient.basePath + '/css/explorer.css');\n\t    }\n\t}\n}\n\n// PREPROCESSOR-REMOVE-START\n// If script is loaded via CommonJS, do not write <script> tags to the page\n// for dependencies. These are already included in the build.\nif (mxForceIncludes || !(typeof module === 'object' && module.exports != null))\n{\n// PREPROCESSOR-REMOVE-END\n\tmxClient.include(mxClient.basePath+'/js/util/mxLog.js');\n\tmxClient.include(mxClient.basePath+'/js/util/mxObjectIdentity.js');\n\tmxClient.include(mxClient.basePath+'/js/util/mxDictionary.js');\n\tmxClient.include(mxClient.basePath+'/js/util/mxResources.js');\n\tmxClient.include(mxClient.basePath+'/js/util/mxPoint.js');\n\tmxClient.include(mxClient.basePath+'/js/util/mxRectangle.js');\n\tmxClient.include(mxClient.basePath+'/js/util/mxEffects.js');\n\tmxClient.include(mxClient.basePath+'/js/util/mxUtils.js');\n\tmxClient.include(mxClient.basePath+'/js/util/mxConstants.js');\n\tmxClient.include(mxClient.basePath+'/js/util/mxEventObject.js');\n\tmxClient.include(mxClient.basePath+'/js/util/mxMouseEvent.js');\n\tmxClient.include(mxClient.basePath+'/js/util/mxEventSource.js');\n\tmxClient.include(mxClient.basePath+'/js/util/mxEvent.js');\n\tmxClient.include(mxClient.basePath+'/js/util/mxXmlRequest.js');\n\tmxClient.include(mxClient.basePath+'/js/util/mxClipboard.js');\n\tmxClient.include(mxClient.basePath+'/js/util/mxWindow.js');\n\tmxClient.include(mxClient.basePath+'/js/util/mxForm.js');\n\tmxClient.include(mxClient.basePath+'/js/util/mxImage.js');\n\tmxClient.include(mxClient.basePath+'/js/util/mxDivResizer.js');\n\tmxClient.include(mxClient.basePath+'/js/util/mxDragSource.js');\n\tmxClient.include(mxClient.basePath+'/js/util/mxToolbar.js');\n\tmxClient.include(mxClient.basePath+'/js/util/mxUndoableEdit.js');\n\tmxClient.include(mxClient.basePath+'/js/util/mxUndoManager.js');\n\tmxClient.include(mxClient.basePath+'/js/util/mxUrlConverter.js');\n\tmxClient.include(mxClient.basePath+'/js/util/mxPanningManager.js');\n\tmxClient.include(mxClient.basePath+'/js/util/mxPopupMenu.js');\n\tmxClient.include(mxClient.basePath+'/js/util/mxAutoSaveManager.js');\n\tmxClient.include(mxClient.basePath+'/js/util/mxAnimation.js');\n\tmxClient.include(mxClient.basePath+'/js/util/mxMorphing.js');\n\tmxClient.include(mxClient.basePath+'/js/util/mxImageBundle.js');\n\tmxClient.include(mxClient.basePath+'/js/util/mxImageExport.js');\n\tmxClient.include(mxClient.basePath+'/js/util/mxAbstractCanvas2D.js');\n\tmxClient.include(mxClient.basePath+'/js/util/mxXmlCanvas2D.js');\n\tmxClient.include(mxClient.basePath+'/js/util/mxSvgCanvas2D.js');\n\tmxClient.include(mxClient.basePath+'/js/util/mxVmlCanvas2D.js');\n\tmxClient.include(mxClient.basePath+'/js/util/mxGuide.js');\n\tmxClient.include(mxClient.basePath+'/js/shape/mxStencil.js');\n\tmxClient.include(mxClient.basePath+'/js/shape/mxShape.js');\n\tmxClient.include(mxClient.basePath+'/js/shape/mxStencilRegistry.js');\n\tmxClient.include(mxClient.basePath+'/js/shape/mxMarker.js');\n\tmxClient.include(mxClient.basePath+'/js/shape/mxActor.js');\n\tmxClient.include(mxClient.basePath+'/js/shape/mxCloud.js');\n\tmxClient.include(mxClient.basePath+'/js/shape/mxRectangleShape.js');\n\tmxClient.include(mxClient.basePath+'/js/shape/mxEllipse.js');\n\tmxClient.include(mxClient.basePath+'/js/shape/mxDoubleEllipse.js');\n\tmxClient.include(mxClient.basePath+'/js/shape/mxRhombus.js');\n\tmxClient.include(mxClient.basePath+'/js/shape/mxPolyline.js');\n\tmxClient.include(mxClient.basePath+'/js/shape/mxArrow.js');\n\tmxClient.include(mxClient.basePath+'/js/shape/mxArrowConnector.js');\n\tmxClient.include(mxClient.basePath+'/js/shape/mxText.js');\n\tmxClient.include(mxClient.basePath+'/js/shape/mxTriangle.js');\n\tmxClient.include(mxClient.basePath+'/js/shape/mxHexagon.js');\n\tmxClient.include(mxClient.basePath+'/js/shape/mxLine.js');\n\tmxClient.include(mxClient.basePath+'/js/shape/mxImageShape.js');\n\tmxClient.include(mxClient.basePath+'/js/shape/mxLabel.js');\n\tmxClient.include(mxClient.basePath+'/js/shape/mxCylinder.js');\n\tmxClient.include(mxClient.basePath+'/js/shape/mxConnector.js');\n\tmxClient.include(mxClient.basePath+'/js/shape/mxSwimlane.js');\n\tmxClient.include(mxClient.basePath+'/js/layout/mxGraphLayout.js');\n\tmxClient.include(mxClient.basePath+'/js/layout/mxStackLayout.js');\n\tmxClient.include(mxClient.basePath+'/js/layout/mxPartitionLayout.js');\n\tmxClient.include(mxClient.basePath+'/js/layout/mxCompactTreeLayout.js');\n\tmxClient.include(mxClient.basePath+'/js/layout/mxRadialTreeLayout.js');\n\tmxClient.include(mxClient.basePath+'/js/layout/mxFastOrganicLayout.js');\n\tmxClient.include(mxClient.basePath+'/js/layout/mxCircleLayout.js');\n\tmxClient.include(mxClient.basePath+'/js/layout/mxParallelEdgeLayout.js');\n\tmxClient.include(mxClient.basePath+'/js/layout/mxCompositeLayout.js');\n\tmxClient.include(mxClient.basePath+'/js/layout/mxEdgeLabelLayout.js');\n\tmxClient.include(mxClient.basePath+'/js/layout/hierarchical/model/mxGraphAbstractHierarchyCell.js');\n\tmxClient.include(mxClient.basePath+'/js/layout/hierarchical/model/mxGraphHierarchyNode.js');\n\tmxClient.include(mxClient.basePath+'/js/layout/hierarchical/model/mxGraphHierarchyEdge.js');\n\tmxClient.include(mxClient.basePath+'/js/layout/hierarchical/model/mxGraphHierarchyModel.js');\n\tmxClient.include(mxClient.basePath+'/js/layout/hierarchical/model/mxSwimlaneModel.js');\n\tmxClient.include(mxClient.basePath+'/js/layout/hierarchical/stage/mxHierarchicalLayoutStage.js');\n\tmxClient.include(mxClient.basePath+'/js/layout/hierarchical/stage/mxMedianHybridCrossingReduction.js');\n\tmxClient.include(mxClient.basePath+'/js/layout/hierarchical/stage/mxMinimumCycleRemover.js');\n\tmxClient.include(mxClient.basePath+'/js/layout/hierarchical/stage/mxCoordinateAssignment.js');\n\tmxClient.include(mxClient.basePath+'/js/layout/hierarchical/stage/mxSwimlaneOrdering.js');\n\tmxClient.include(mxClient.basePath+'/js/layout/hierarchical/mxHierarchicalLayout.js');\n\tmxClient.include(mxClient.basePath+'/js/layout/hierarchical/mxSwimlaneLayout.js');\n\tmxClient.include(mxClient.basePath+'/js/model/mxGraphModel.js');\n\tmxClient.include(mxClient.basePath+'/js/model/mxCell.js');\n\tmxClient.include(mxClient.basePath+'/js/model/mxGeometry.js');\n\tmxClient.include(mxClient.basePath+'/js/model/mxCellPath.js');\n\tmxClient.include(mxClient.basePath+'/js/view/mxPerimeter.js');\n\tmxClient.include(mxClient.basePath+'/js/view/mxPrintPreview.js');\n\tmxClient.include(mxClient.basePath+'/js/view/mxStylesheet.js');\n\tmxClient.include(mxClient.basePath+'/js/view/mxCellState.js');\n\tmxClient.include(mxClient.basePath+'/js/view/mxGraphSelectionModel.js');\n\tmxClient.include(mxClient.basePath+'/js/view/mxCellEditor.js');\n\tmxClient.include(mxClient.basePath+'/js/view/mxCellRenderer.js');\n\tmxClient.include(mxClient.basePath+'/js/view/mxEdgeStyle.js');\n\tmxClient.include(mxClient.basePath+'/js/view/mxStyleRegistry.js');\n\tmxClient.include(mxClient.basePath+'/js/view/mxGraphView.js');\n\tmxClient.include(mxClient.basePath+'/js/view/mxGraph.js');\n\tmxClient.include(mxClient.basePath+'/js/view/mxCellOverlay.js');\n\tmxClient.include(mxClient.basePath+'/js/view/mxOutline.js');\n\tmxClient.include(mxClient.basePath+'/js/view/mxMultiplicity.js');\n\tmxClient.include(mxClient.basePath+'/js/view/mxLayoutManager.js');\n\tmxClient.include(mxClient.basePath+'/js/view/mxSwimlaneManager.js');\n\tmxClient.include(mxClient.basePath+'/js/view/mxTemporaryCellStates.js');\n\tmxClient.include(mxClient.basePath+'/js/view/mxCellStatePreview.js');\n\tmxClient.include(mxClient.basePath+'/js/view/mxConnectionConstraint.js');\n\tmxClient.include(mxClient.basePath+'/js/handler/mxGraphHandler.js');\n\tmxClient.include(mxClient.basePath+'/js/handler/mxPanningHandler.js');\n\tmxClient.include(mxClient.basePath+'/js/handler/mxPopupMenuHandler.js');\n\tmxClient.include(mxClient.basePath+'/js/handler/mxCellMarker.js');\n\tmxClient.include(mxClient.basePath+'/js/handler/mxSelectionCellsHandler.js');\n\tmxClient.include(mxClient.basePath+'/js/handler/mxConnectionHandler.js');\n\tmxClient.include(mxClient.basePath+'/js/handler/mxConstraintHandler.js');\n\tmxClient.include(mxClient.basePath+'/js/handler/mxRubberband.js');\n\tmxClient.include(mxClient.basePath+'/js/handler/mxHandle.js');\n\tmxClient.include(mxClient.basePath+'/js/handler/mxVertexHandler.js');\n\tmxClient.include(mxClient.basePath+'/js/handler/mxEdgeHandler.js');\n\tmxClient.include(mxClient.basePath+'/js/handler/mxElbowEdgeHandler.js');\n\tmxClient.include(mxClient.basePath+'/js/handler/mxEdgeSegmentHandler.js');\n\tmxClient.include(mxClient.basePath+'/js/handler/mxKeyHandler.js');\n\tmxClient.include(mxClient.basePath+'/js/handler/mxTooltipHandler.js');\n\tmxClient.include(mxClient.basePath+'/js/handler/mxCellTracker.js');\n\tmxClient.include(mxClient.basePath+'/js/handler/mxCellHighlight.js');\n\tmxClient.include(mxClient.basePath+'/js/editor/mxDefaultKeyHandler.js');\n\tmxClient.include(mxClient.basePath+'/js/editor/mxDefaultPopupMenu.js');\n\tmxClient.include(mxClient.basePath+'/js/editor/mxDefaultToolbar.js');\n\tmxClient.include(mxClient.basePath+'/js/editor/mxEditor.js');\n\tmxClient.include(mxClient.basePath+'/js/io/mxCodecRegistry.js');\n\tmxClient.include(mxClient.basePath+'/js/io/mxCodec.js');\n\tmxClient.include(mxClient.basePath+'/js/io/mxObjectCodec.js');\n\tmxClient.include(mxClient.basePath+'/js/io/mxCellCodec.js');\n\tmxClient.include(mxClient.basePath+'/js/io/mxModelCodec.js');\n\tmxClient.include(mxClient.basePath+'/js/io/mxRootChangeCodec.js');\n\tmxClient.include(mxClient.basePath+'/js/io/mxChildChangeCodec.js');\n\tmxClient.include(mxClient.basePath+'/js/io/mxTerminalChangeCodec.js');\n\tmxClient.include(mxClient.basePath+'/js/io/mxGenericChangeCodec.js');\n\tmxClient.include(mxClient.basePath+'/js/io/mxGraphCodec.js');\n\tmxClient.include(mxClient.basePath+'/js/io/mxGraphViewCodec.js');\n\tmxClient.include(mxClient.basePath+'/js/io/mxStylesheetCodec.js');\n\tmxClient.include(mxClient.basePath+'/js/io/mxDefaultKeyHandlerCodec.js');\n\tmxClient.include(mxClient.basePath+'/js/io/mxDefaultToolbarCodec.js');\n\tmxClient.include(mxClient.basePath+'/js/io/mxDefaultPopupMenuCodec.js');\n\tmxClient.include(mxClient.basePath+'/js/io/mxEditorCodec.js');\n// PREPROCESSOR-REMOVE-START\n}\n// PREPROCESSOR-REMOVE-END\n"
  },
  {
    "path": "static/cherry/drawio_demo/src/js/shape/mxActor.js",
    "content": "/**\n * Copyright (c) 2006-2015, JGraph Ltd\n * Copyright (c) 2006-2015, Gaudenz Alder\n */\n/**\n * Class: mxActor\n *\n * Extends <mxShape> to implement an actor shape. If a custom shape with one\n * filled area is needed, then this shape's <redrawPath> should be overridden.\n * \n * Example:\n * \n * (code)\n * function SampleShape() { }\n * \n * SampleShape.prototype = new mxActor();\n * SampleShape.prototype.constructor = vsAseShape;\n * \n * mxCellRenderer.registerShape('sample', SampleShape);\n * SampleShape.prototype.redrawPath = function(path, x, y, w, h)\n * {\n *   path.moveTo(0, 0);\n *   path.lineTo(w, h);\n *   // ...\n *   path.close();\n * }\n * (end)\n * \n * This shape is registered under <mxConstants.SHAPE_ACTOR> in\n * <mxCellRenderer>.\n * \n * Constructor: mxActor\n *\n * Constructs a new actor shape.\n * \n * Parameters:\n * \n * bounds - <mxRectangle> that defines the bounds. This is stored in\n * <mxShape.bounds>.\n * fill - String that defines the fill color. This is stored in <fill>.\n * stroke - String that defines the stroke color. This is stored in <stroke>.\n * strokewidth - Optional integer that defines the stroke width. Default is\n * 1. This is stored in <strokewidth>.\n */\nfunction mxActor(bounds, fill, stroke, strokewidth)\n{\n\tmxShape.call(this);\n\tthis.bounds = bounds;\n\tthis.fill = fill;\n\tthis.stroke = stroke;\n\tthis.strokewidth = (strokewidth != null) ? strokewidth : 1;\n};\n\n/**\n * Extends mxShape.\n */\nmxUtils.extend(mxActor, mxShape);\n\n/**\n * Function: paintVertexShape\n * \n * Redirects to redrawPath for subclasses to work.\n */\nmxActor.prototype.paintVertexShape = function(c, x, y, w, h)\n{\n\tc.translate(x, y);\n\tc.begin();\n\tthis.redrawPath(c, x, y, w, h);\n\tc.fillAndStroke();\n};\n\n/**\n * Function: redrawPath\n *\n * Draws the path for this shape.\n */\nmxActor.prototype.redrawPath = function(c, x, y, w, h)\n{\n\tvar width = w/3;\n\tc.moveTo(0, h);\n\tc.curveTo(0, 3 * h / 5, 0, 2 * h / 5, w / 2, 2 * h / 5);\n\tc.curveTo(w / 2 - width, 2 * h / 5, w / 2 - width, 0, w / 2, 0);\n\tc.curveTo(w / 2 + width, 0, w / 2 + width, 2 * h / 5, w / 2, 2 * h / 5);\n\tc.curveTo(w, 2 * h / 5, w, 3 * h / 5, w, h);\n\tc.close();\n};\n"
  },
  {
    "path": "static/cherry/drawio_demo/src/js/shape/mxArrow.js",
    "content": "/**\n * Copyright (c) 2006-2015, JGraph Ltd\n * Copyright (c) 2006-2015, Gaudenz Alder\n */\n/**\n * Class: mxArrow\n *\n * Extends <mxShape> to implement an arrow shape. (The shape\n * is used to represent edges, not vertices.)\n * This shape is registered under <mxConstants.SHAPE_ARROW>\n * in <mxCellRenderer>.\n * \n * Constructor: mxArrow\n *\n * Constructs a new arrow shape.\n * \n * Parameters:\n * \n * points - Array of <mxPoints> that define the points. This is stored in\n * <mxShape.points>.\n * fill - String that defines the fill color. This is stored in <fill>.\n * stroke - String that defines the stroke color. This is stored in <stroke>.\n * strokewidth - Optional integer that defines the stroke width. Default is\n * 1. This is stored in <strokewidth>.\n * arrowWidth - Optional integer that defines the arrow width. Default is\n * <mxConstants.ARROW_WIDTH>. This is stored in <arrowWidth>.\n * spacing - Optional integer that defines the spacing between the arrow shape\n * and its endpoints. Default is <mxConstants.ARROW_SPACING>. This is stored in\n * <spacing>.\n * endSize - Optional integer that defines the size of the arrowhead. Default\n * is <mxConstants.ARROW_SIZE>. This is stored in <endSize>.\n */\nfunction mxArrow(points, fill, stroke, strokewidth, arrowWidth, spacing, endSize)\n{\n\tmxShape.call(this);\n\tthis.points = points;\n\tthis.fill = fill;\n\tthis.stroke = stroke;\n\tthis.strokewidth = (strokewidth != null) ? strokewidth : 1;\n\tthis.arrowWidth = (arrowWidth != null) ? arrowWidth : mxConstants.ARROW_WIDTH;\n\tthis.spacing = (spacing != null) ? spacing : mxConstants.ARROW_SPACING;\n\tthis.endSize = (endSize != null) ? endSize : mxConstants.ARROW_SIZE;\n};\n\n/**\n * Extends mxShape.\n */\nmxUtils.extend(mxArrow, mxShape);\n\n/**\n * Function: augmentBoundingBox\n *\n * Augments the bounding box with the edge width and markers.\n */\nmxArrow.prototype.augmentBoundingBox = function(bbox)\n{\n\tmxShape.prototype.augmentBoundingBox.apply(this, arguments);\n\t\n\tvar w = Math.max(this.arrowWidth, this.endSize);\n\tbbox.grow((w / 2 + this.strokewidth) * this.scale);\n};\n\n/**\n * Function: paintEdgeShape\n * \n * Paints the line shape.\n */\nmxArrow.prototype.paintEdgeShape = function(c, pts)\n{\n\t// Geometry of arrow\n\tvar spacing =  mxConstants.ARROW_SPACING;\n\tvar width = mxConstants.ARROW_WIDTH;\n\tvar arrow = mxConstants.ARROW_SIZE;\n\n\t// Base vector (between end points)\n\tvar p0 = pts[0];\n\tvar pe = pts[pts.length - 1];\n\tvar dx = pe.x - p0.x;\n\tvar dy = pe.y - p0.y;\n\tvar dist = Math.sqrt(dx * dx + dy * dy);\n\tvar length = dist - 2 * spacing - arrow;\n\t\n\t// Computes the norm and the inverse norm\n\tvar nx = dx / dist;\n\tvar ny = dy / dist;\n\tvar basex = length * nx;\n\tvar basey = length * ny;\n\tvar floorx = width * ny/3;\n\tvar floory = -width * nx/3;\n\t\n\t// Computes points\n\tvar p0x = p0.x - floorx / 2 + spacing * nx;\n\tvar p0y = p0.y - floory / 2 + spacing * ny;\n\tvar p1x = p0x + floorx;\n\tvar p1y = p0y + floory;\n\tvar p2x = p1x + basex;\n\tvar p2y = p1y + basey;\n\tvar p3x = p2x + floorx;\n\tvar p3y = p2y + floory;\n\t// p4 not necessary\n\tvar p5x = p3x - 3 * floorx;\n\tvar p5y = p3y - 3 * floory;\n\t\n\tc.begin();\n\tc.moveTo(p0x, p0y);\n\tc.lineTo(p1x, p1y);\n\tc.lineTo(p2x, p2y);\n\tc.lineTo(p3x, p3y);\n\tc.lineTo(pe.x - spacing * nx, pe.y - spacing * ny);\n\tc.lineTo(p5x, p5y);\n\tc.lineTo(p5x + floorx, p5y + floory);\n\tc.close();\n\n\tc.fillAndStroke();\n};\n"
  },
  {
    "path": "static/cherry/drawio_demo/src/js/shape/mxArrowConnector.js",
    "content": "/**\n * Copyright (c) 2006-2015, JGraph Ltd\n * Copyright (c) 2006-2015, Gaudenz Alder\n */\n/**\n * Class: mxArrowConnector\n *\n * Extends <mxShape> to implement an new rounded arrow shape with support for\n * waypoints and double arrows. (The shape is used to represent edges, not\n * vertices.) This shape is registered under <mxConstants.SHAPE_ARROW_CONNECTOR>\n * in <mxCellRenderer>.\n * \n * Constructor: mxArrowConnector\n *\n * Constructs a new arrow shape.\n * \n * Parameters:\n * \n * points - Array of <mxPoints> that define the points. This is stored in\n * <mxShape.points>.\n * fill - String that defines the fill color. This is stored in <fill>.\n * stroke - String that defines the stroke color. This is stored in <stroke>.\n * strokewidth - Optional integer that defines the stroke width. Default is\n * 1. This is stored in <strokewidth>.\n * arrowWidth - Optional integer that defines the arrow width. Default is\n * <mxConstants.ARROW_WIDTH>. This is stored in <arrowWidth>.\n * spacing - Optional integer that defines the spacing between the arrow shape\n * and its endpoints. Default is <mxConstants.ARROW_SPACING>. This is stored in\n * <spacing>.\n * endSize - Optional integer that defines the size of the arrowhead. Default\n * is <mxConstants.ARROW_SIZE>. This is stored in <endSize>.\n */\nfunction mxArrowConnector(points, fill, stroke, strokewidth, arrowWidth, spacing, endSize)\n{\n\tmxShape.call(this);\n\tthis.points = points;\n\tthis.fill = fill;\n\tthis.stroke = stroke;\n\tthis.strokewidth = (strokewidth != null) ? strokewidth : 1;\n\tthis.arrowWidth = (arrowWidth != null) ? arrowWidth : mxConstants.ARROW_WIDTH;\n\tthis.arrowSpacing = (spacing != null) ? spacing : mxConstants.ARROW_SPACING;\n\tthis.startSize = mxConstants.ARROW_SIZE / 5;\n\tthis.endSize = mxConstants.ARROW_SIZE / 5;\n};\n\n/**\n * Extends mxShape.\n */\nmxUtils.extend(mxArrowConnector, mxShape);\n\n/**\n * Variable: useSvgBoundingBox\n * \n * Allows to use the SVG bounding box in SVG. Default is false for performance\n * reasons.\n */\nmxArrowConnector.prototype.useSvgBoundingBox = true;\n\n/**\n * Variable: resetStyles\n * \n * Overrides mxShape to reset spacing.\n */\nmxArrowConnector.prototype.resetStyles = function()\n{\n\tmxShape.prototype.resetStyles.apply(this, arguments);\n\t\n\tthis.arrowSpacing = mxConstants.ARROW_SPACING;\n};\n\n/**\n * Overrides apply to get smooth transition from default start- and endsize.\n */\nmxArrowConnector.prototype.apply = function(state)\n{\n\tmxShape.prototype.apply.apply(this, arguments);\n\n\tif (this.style != null)\n\t{\n\t\tthis.startSize = mxUtils.getNumber(this.style, mxConstants.STYLE_STARTSIZE, mxConstants.ARROW_SIZE / 5) * 3;\n\t\tthis.endSize = mxUtils.getNumber(this.style, mxConstants.STYLE_ENDSIZE, mxConstants.ARROW_SIZE / 5) * 3;\n\t}\n};\n\n/**\n * Function: augmentBoundingBox\n *\n * Augments the bounding box with the edge width and markers.\n */\nmxArrowConnector.prototype.augmentBoundingBox = function(bbox)\n{\n\tmxShape.prototype.augmentBoundingBox.apply(this, arguments);\n\t\n\tvar w = this.getEdgeWidth();\n\t\n\tif (this.isMarkerStart())\n\t{\n\t\tw = Math.max(w, this.getStartArrowWidth());\n\t}\n\t\n\tif (this.isMarkerEnd())\n\t{\n\t\tw = Math.max(w, this.getEndArrowWidth());\n\t}\n\t\n\tbbox.grow((w / 2 + this.strokewidth) * this.scale);\n};\n\n/**\n * Function: paintEdgeShape\n * \n * Paints the line shape.\n */\nmxArrowConnector.prototype.paintEdgeShape = function(c, pts)\n{\n\t// Geometry of arrow\n\tvar strokeWidth = this.strokewidth;\n\t\n\tif (this.outline)\n\t{\n\t\tstrokeWidth = Math.max(1, mxUtils.getNumber(this.style, mxConstants.STYLE_STROKEWIDTH, this.strokewidth));\n\t}\n\t\n\tvar startWidth = this.getStartArrowWidth() + strokeWidth;\n\tvar endWidth = this.getEndArrowWidth() + strokeWidth;\n\tvar edgeWidth = this.outline ? this.getEdgeWidth() + strokeWidth : this.getEdgeWidth();\n\tvar openEnded = this.isOpenEnded();\n\tvar markerStart = this.isMarkerStart();\n\tvar markerEnd = this.isMarkerEnd();\n\tvar spacing = (openEnded) ? 0 : this.arrowSpacing + strokeWidth / 2;\n\tvar startSize = this.startSize + strokeWidth;\n\tvar endSize = this.endSize + strokeWidth;\n\tvar isRounded = this.isArrowRounded();\n\t\n\t// Base vector (between first points)\n\tvar pe = pts[pts.length - 1];\n\n\t// Finds first non-overlapping point\n\tvar i0 = 1;\n\t\n\twhile (i0 < pts.length - 1 && pts[i0].x == pts[0].x && pts[i0].y == pts[0].y)\n\t{\n\t\ti0++;\n\t}\n\t\n\tvar dx = pts[i0].x - pts[0].x;\n\tvar dy = pts[i0].y - pts[0].y;\n\tvar dist = Math.sqrt(dx * dx + dy * dy);\n\t\n\tif (dist == 0)\n\t{\n\t\treturn;\n\t}\n\t\n\t// Computes the norm and the inverse norm\n\tvar nx = dx / dist;\n\tvar nx2, nx1 = nx;\n\tvar ny = dy / dist;\n\tvar ny2, ny1 = ny;\n\tvar orthx = edgeWidth * ny;\n\tvar orthy = -edgeWidth * nx;\n\t\n\t// Stores the inbound function calls in reverse order in fns\n\tvar fns = [];\n\t\n\tif (isRounded)\n\t{\n\t\tc.setLineJoin('round');\n\t}\n\telse if (pts.length > 2)\n\t{\n\t\t// Only mitre if there are waypoints\n\t\tc.setMiterLimit(1.42);\n\t}\n\n\tc.begin();\n\n\tvar startNx = nx;\n\tvar startNy = ny;\n\n\tif (markerStart && !openEnded)\n\t{\n\t\tthis.paintMarker(c, pts[0].x, pts[0].y, nx, ny, startSize, startWidth, edgeWidth, spacing, true);\n\t}\n\telse\n\t{\n\t\tvar outStartX = pts[0].x + orthx / 2 + spacing * nx;\n\t\tvar outStartY = pts[0].y + orthy / 2 + spacing * ny;\n\t\tvar inEndX = pts[0].x - orthx / 2 + spacing * nx;\n\t\tvar inEndY = pts[0].y - orthy / 2 + spacing * ny;\n\t\t\n\t\tif (openEnded)\n\t\t{\n\t\t\tc.moveTo(outStartX, outStartY);\n\t\t\t\n\t\t\tfns.push(function()\n\t\t\t{\n\t\t\t\tc.lineTo(inEndX, inEndY);\n\t\t\t});\n\t\t}\n\t\telse\n\t\t{\n\t\t\tc.moveTo(inEndX, inEndY);\n\t\t\tc.lineTo(outStartX, outStartY);\n\t\t}\n\t}\n\t\n\tvar dx1 = 0;\n\tvar dy1 = 0;\n\tvar dist1 = 0;\n\n\tfor (var i = 0; i < pts.length - 2; i++)\n\t{\n\t\t// Work out in which direction the line is bending\n\t\tvar pos = mxUtils.relativeCcw(pts[i].x, pts[i].y, pts[i+1].x, pts[i+1].y, pts[i+2].x, pts[i+2].y);\n\n\t\tdx1 = pts[i+2].x - pts[i+1].x;\n\t\tdy1 = pts[i+2].y - pts[i+1].y;\n\n\t\tdist1 = Math.sqrt(dx1 * dx1 + dy1 * dy1);\n\t\t\n\t\tif (dist1 != 0)\n\t\t{\n\t\t\tnx1 = dx1 / dist1;\n\t\t\tny1 = dy1 / dist1;\n\t\t\t\n\t\t\tvar tmp1 = nx * nx1 + ny * ny1;\n\t\t\ttmp = Math.max(Math.sqrt((tmp1 + 1) / 2), 0.04);\n\t\t\t\n\t\t\t// Work out the normal orthogonal to the line through the control point and the edge sides intersection\n\t\t\tnx2 = (nx + nx1);\n\t\t\tny2 = (ny + ny1);\n\t\n\t\t\tvar dist2 = Math.sqrt(nx2 * nx2 + ny2 * ny2);\n\t\t\t\n\t\t\tif (dist2 != 0)\n\t\t\t{\n\t\t\t\tnx2 = nx2 / dist2;\n\t\t\t\tny2 = ny2 / dist2;\n\t\t\t\t\n\t\t\t\t// Higher strokewidths require a larger minimum bend, 0.35 covers all but the most extreme cases\n\t\t\t\tvar strokeWidthFactor = Math.max(tmp, Math.min(this.strokewidth / 200 + 0.04, 0.35));\n\t\t\t\tvar angleFactor = (pos != 0 && isRounded) ? Math.max(0.1, strokeWidthFactor) : Math.max(tmp, 0.06);\n\n\t\t\t\tvar outX = pts[i+1].x + ny2 * edgeWidth / 2 / angleFactor;\n\t\t\t\tvar outY = pts[i+1].y - nx2 * edgeWidth / 2 / angleFactor;\n\t\t\t\tvar inX = pts[i+1].x - ny2 * edgeWidth / 2 / angleFactor;\n\t\t\t\tvar inY = pts[i+1].y + nx2 * edgeWidth / 2 / angleFactor;\n\t\t\t\t\n\t\t\t\tif (pos == 0 || !isRounded)\n\t\t\t\t{\n\t\t\t\t\t// If the two segments are aligned, or if we're not drawing curved sections between segments\n\t\t\t\t\t// just draw straight to the intersection point\n\t\t\t\t\tc.lineTo(outX, outY);\n\t\t\t\t\t\n\t\t\t\t\t(function(x, y)\n\t\t\t\t\t{\n\t\t\t\t\t\tfns.push(function()\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tc.lineTo(x, y);\n\t\t\t\t\t\t});\n\t\t\t\t\t})(inX, inY);\n\t\t\t\t}\n\t\t\t\telse if (pos == -1)\n\t\t\t\t{\n\t\t\t\t\tvar c1x = inX + ny * edgeWidth;\n\t\t\t\t\tvar c1y = inY - nx * edgeWidth;\n\t\t\t\t\tvar c2x = inX + ny1 * edgeWidth;\n\t\t\t\t\tvar c2y = inY - nx1 * edgeWidth;\n\t\t\t\t\tc.lineTo(c1x, c1y);\n\t\t\t\t\tc.quadTo(outX, outY, c2x, c2y);\n\t\t\t\t\t\n\t\t\t\t\t(function(x, y)\n\t\t\t\t\t{\n\t\t\t\t\t\tfns.push(function()\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tc.lineTo(x, y);\n\t\t\t\t\t\t});\n\t\t\t\t\t})(inX, inY);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tc.lineTo(outX, outY);\n\t\t\t\t\t\n\t\t\t\t\t(function(x, y)\n\t\t\t\t\t{\n\t\t\t\t\t\tvar c1x = outX - ny * edgeWidth;\n\t\t\t\t\t\tvar c1y = outY + nx * edgeWidth;\n\t\t\t\t\t\tvar c2x = outX - ny1 * edgeWidth;\n\t\t\t\t\t\tvar c2y = outY + nx1 * edgeWidth;\n\t\t\t\t\t\t\n\t\t\t\t\t\tfns.push(function()\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tc.quadTo(x, y, c1x, c1y);\n\t\t\t\t\t\t});\n\t\t\t\t\t\tfns.push(function()\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tc.lineTo(c2x, c2y);\n\t\t\t\t\t\t});\n\t\t\t\t\t})(inX, inY);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tnx = nx1;\n\t\t\t\tny = ny1;\n\t\t\t}\n\t\t}\n\t}\n\t\n\torthx = edgeWidth * ny1;\n\torthy = - edgeWidth * nx1;\n\n\tif (markerEnd && !openEnded)\n\t{\n\t\tthis.paintMarker(c, pe.x, pe.y, -nx, -ny, endSize, endWidth, edgeWidth, spacing, false);\n\t}\n\telse\n\t{\n\t\tc.lineTo(pe.x - spacing * nx1 + orthx / 2, pe.y - spacing * ny1 + orthy / 2);\n\t\t\n\t\tvar inStartX = pe.x - spacing * nx1 - orthx / 2;\n\t\tvar inStartY = pe.y - spacing * ny1 - orthy / 2;\n\n\t\tif (!openEnded)\n\t\t{\n\t\t\tc.lineTo(inStartX, inStartY);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tc.moveTo(inStartX, inStartY);\n\t\t\t\n\t\t\tfns.splice(0, 0, function()\n\t\t\t{\n\t\t\t\tc.moveTo(inStartX, inStartY);\n\t\t\t});\n\t\t}\n\t}\n\t\n\tfor (var i = fns.length - 1; i >= 0; i--)\n\t{\n\t\tfns[i]();\n\t}\n\n\tif (openEnded)\n\t{\n\t\tc.end();\n\t\tc.stroke();\n\t}\n\telse\n\t{\n\t\tc.close();\n\t\tc.fillAndStroke();\n\t}\n\t\n\t// Workaround for shadow on top of base arrow\n\tc.setShadow(false);\n\t\n\t// Need to redraw the markers without the low miter limit\n\tc.setMiterLimit(4);\n\t\n\tif (isRounded)\n\t{\n\t\tc.setLineJoin('flat');\n\t}\n\n\tif (pts.length > 2)\n\t{\n\t\t// Only to repaint markers if no waypoints\n\t\t// Need to redraw the markers without the low miter limit\n\t\tc.setMiterLimit(4);\n\t\tif (markerStart && !openEnded)\n\t\t{\n\t\t\tc.begin();\n\t\t\tthis.paintMarker(c, pts[0].x, pts[0].y, startNx, startNy, startSize, startWidth, edgeWidth, spacing, true);\n\t\t\tc.stroke();\n\t\t\tc.end();\n\t\t}\n\t\t\n\t\tif (markerEnd && !openEnded)\n\t\t{\n\t\t\tc.begin();\n\t\t\tthis.paintMarker(c, pe.x, pe.y, -nx, -ny, endSize, endWidth, edgeWidth, spacing, true);\n\t\t\tc.stroke();\n\t\t\tc.end();\n\t\t}\n\t}\n};\n\n/**\n * Function: paintEdgeShape\n * \n * Paints the line shape.\n */\nmxArrowConnector.prototype.paintMarker = function(c, ptX, ptY, nx, ny, size, arrowWidth, edgeWidth, spacing, initialMove)\n{\n\tvar widthArrowRatio = edgeWidth / arrowWidth;\n\tvar orthx = edgeWidth * ny / 2;\n\tvar orthy = -edgeWidth * nx / 2;\n\n\tvar spaceX = (spacing + size) * nx;\n\tvar spaceY = (spacing + size) * ny;\n\n\tif (initialMove)\n\t{\n\t\tc.moveTo(ptX - orthx + spaceX, ptY - orthy + spaceY);\n\t}\n\telse\n\t{\n\t\tc.lineTo(ptX - orthx + spaceX, ptY - orthy + spaceY);\n\t}\n\n\tc.lineTo(ptX - orthx / widthArrowRatio + spaceX, ptY - orthy / widthArrowRatio + spaceY);\n\tc.lineTo(ptX + spacing * nx, ptY + spacing * ny);\n\tc.lineTo(ptX + orthx / widthArrowRatio + spaceX, ptY + orthy / widthArrowRatio + spaceY);\n\tc.lineTo(ptX + orthx + spaceX, ptY + orthy + spaceY);\n}\n\n/**\n * Function: isArrowRounded\n * \n * Returns wether the arrow is rounded\n */\nmxArrowConnector.prototype.isArrowRounded = function()\n{\n\treturn this.isRounded;\n};\n\n/**\n * Function: getStartArrowWidth\n * \n * Returns the width of the start arrow\n */\nmxArrowConnector.prototype.getStartArrowWidth = function()\n{\n\treturn mxConstants.ARROW_WIDTH;\n};\n\n/**\n * Function: getEndArrowWidth\n * \n * Returns the width of the end arrow\n */\nmxArrowConnector.prototype.getEndArrowWidth = function()\n{\n\treturn mxConstants.ARROW_WIDTH;\n};\n\n/**\n * Function: getEdgeWidth\n * \n * Returns the width of the body of the edge\n */\nmxArrowConnector.prototype.getEdgeWidth = function()\n{\n\treturn mxConstants.ARROW_WIDTH / 3;\n};\n\n/**\n * Function: isOpenEnded\n * \n * Returns whether the ends of the shape are drawn\n */\nmxArrowConnector.prototype.isOpenEnded = function()\n{\n\treturn false;\n};\n\n/**\n * Function: isMarkerStart\n * \n * Returns whether the start marker is drawn\n */\nmxArrowConnector.prototype.isMarkerStart = function()\n{\n\treturn (mxUtils.getValue(this.style, mxConstants.STYLE_STARTARROW, mxConstants.NONE) != mxConstants.NONE);\n};\n\n/**\n * Function: isMarkerEnd\n * \n * Returns whether the end marker is drawn\n */\nmxArrowConnector.prototype.isMarkerEnd = function()\n{\n\treturn (mxUtils.getValue(this.style, mxConstants.STYLE_ENDARROW, mxConstants.NONE) != mxConstants.NONE);\n};"
  },
  {
    "path": "static/cherry/drawio_demo/src/js/shape/mxCloud.js",
    "content": "/**\n * Copyright (c) 2006-2015, JGraph Ltd\n * Copyright (c) 2006-2015, Gaudenz Alder\n */\n/**\n * Class: mxCloud\n *\n * Extends <mxActor> to implement a cloud shape.\n * \n * This shape is registered under <mxConstants.SHAPE_CLOUD> in\n * <mxCellRenderer>.\n * \n * Constructor: mxCloud\n *\n * Constructs a new cloud shape.\n * \n * Parameters:\n * \n * bounds - <mxRectangle> that defines the bounds. This is stored in\n * <mxShape.bounds>.\n * fill - String that defines the fill color. This is stored in <fill>.\n * stroke - String that defines the stroke color. This is stored in <stroke>.\n * strokewidth - Optional integer that defines the stroke width. Default is\n * 1. This is stored in <strokewidth>.\n */\nfunction mxCloud(bounds, fill, stroke, strokewidth)\n{\n\tmxActor.call(this);\n\tthis.bounds = bounds;\n\tthis.fill = fill;\n\tthis.stroke = stroke;\n\tthis.strokewidth = (strokewidth != null) ? strokewidth : 1;\n};\n\n/**\n * Extends mxActor.\n */\nmxUtils.extend(mxCloud, mxActor);\n\n/**\n * Function: redrawPath\n *\n * Draws the path for this shape.\n */\nmxCloud.prototype.redrawPath = function(c, x, y, w, h)\n{\n\tc.moveTo(0.25 * w, 0.25 * h);\n\tc.curveTo(0.05 * w, 0.25 * h, 0, 0.5 * h, 0.16 * w, 0.55 * h);\n\tc.curveTo(0, 0.66 * h, 0.18 * w, 0.9 * h, 0.31 * w, 0.8 * h);\n\tc.curveTo(0.4 * w, h, 0.7 * w, h, 0.8 * w, 0.8 * h);\n\tc.curveTo(w, 0.8 * h, w, 0.6 * h, 0.875 * w, 0.5 * h);\n\tc.curveTo(w, 0.3 * h, 0.8 * w, 0.1 * h, 0.625 * w, 0.2 * h);\n\tc.curveTo(0.5 * w, 0.05 * h, 0.3 * w, 0.05 * h, 0.25 * w, 0.25 * h);\n\tc.close();\n};\n"
  },
  {
    "path": "static/cherry/drawio_demo/src/js/shape/mxConnector.js",
    "content": "/**\n * Copyright (c) 2006-2015, JGraph Ltd\n * Copyright (c) 2006-2015, Gaudenz Alder\n */\n/**\n * Class: mxConnector\n * \n * Extends <mxShape> to implement a connector shape. The connector\n * shape allows for arrow heads on either side.\n * \n * This shape is registered under <mxConstants.SHAPE_CONNECTOR> in\n * <mxCellRenderer>.\n * \n * Constructor: mxConnector\n * \n * Constructs a new connector shape.\n * \n * Parameters:\n * \n * points - Array of <mxPoints> that define the points. This is stored in\n * <mxShape.points>.\n * stroke - String that defines the stroke color. This is stored in <stroke>.\n * Default is 'black'.\n * strokewidth - Optional integer that defines the stroke width. Default is\n * 1. This is stored in <strokewidth>.\n */\nfunction mxConnector(points, stroke, strokewidth)\n{\n\tmxPolyline.call(this, points, stroke, strokewidth);\n};\n\n/**\n * Extends mxPolyline.\n */\nmxUtils.extend(mxConnector, mxPolyline);\n\n/**\n * Function: updateBoundingBox\n *\n * Updates the <boundingBox> for this shape using <createBoundingBox> and\n * <augmentBoundingBox> and stores the result in <boundingBox>.\n */\nmxConnector.prototype.updateBoundingBox = function()\n{\n\tthis.useSvgBoundingBox = this.style != null && this.style[mxConstants.STYLE_CURVED] == 1;\n\tmxShape.prototype.updateBoundingBox.apply(this, arguments);\n};\n\n/**\n * Function: paintEdgeShape\n * \n * Paints the line shape.\n */\nmxConnector.prototype.paintEdgeShape = function(c, pts)\n{\n\t// The indirection via functions for markers is needed in\n\t// order to apply the offsets before painting the line and\n\t// paint the markers after painting the line.\n\tvar sourceMarker = this.createMarker(c, pts, true);\n\tvar targetMarker = this.createMarker(c, pts, false);\n\n\tmxPolyline.prototype.paintEdgeShape.apply(this, arguments);\n\t\n\t// Disables shadows, dashed styles and fixes fill color for markers\n\tc.setFillColor(this.stroke);\n\tc.setShadow(false);\n\tc.setDashed(false);\n\t\n\tif (sourceMarker != null)\n\t{\n\t\tsourceMarker();\n\t}\n\t\n\tif (targetMarker != null)\n\t{\n\t\ttargetMarker();\n\t}\n};\n\n/**\n * Function: createMarker\n * \n * Prepares the marker by adding offsets in pts and returning a function to\n * paint the marker.\n */\nmxConnector.prototype.createMarker = function(c, pts, source)\n{\n\tvar result = null;\n\tvar n = pts.length;\n\tvar type = mxUtils.getValue(this.style, (source) ? mxConstants.STYLE_STARTARROW : mxConstants.STYLE_ENDARROW);\n\tvar p0 = (source) ? pts[1] : pts[n - 2];\n\tvar pe = (source) ? pts[0] : pts[n - 1];\n\t\n\tif (type != null && p0 != null && pe != null)\n\t{\n\t\tvar count = 1;\n\t\t\n\t\t// Uses next non-overlapping point\n\t\twhile (count < n - 1 && Math.round(p0.x - pe.x) == 0 && Math.round(p0.y - pe.y) == 0)\n\t\t{\n\t\t\tp0 = (source) ? pts[1 + count] : pts[n - 2 - count];\n\t\t\tcount++;\n\t\t}\n\t\n\t\t// Computes the norm and the inverse norm\n\t\tvar dx = pe.x - p0.x;\n\t\tvar dy = pe.y - p0.y;\n\t\n\t\tvar dist = Math.max(1, Math.sqrt(dx * dx + dy * dy));\n\t\t\n\t\tvar unitX = dx / dist;\n\t\tvar unitY = dy / dist;\n\t\n\t\tvar size = mxUtils.getNumber(this.style, (source) ? mxConstants.STYLE_STARTSIZE : mxConstants.STYLE_ENDSIZE, mxConstants.DEFAULT_MARKERSIZE);\n\t\t\n\t\t// Allow for stroke width in the end point used and the \n\t\t// orthogonal vectors describing the direction of the marker\n\t\tvar filled = this.style[(source) ? mxConstants.STYLE_STARTFILL : mxConstants.STYLE_ENDFILL] != 0;\n\t\t\n\t\tresult = mxMarker.createMarker(c, this, type, pe, unitX, unitY, size, source, this.strokewidth, filled);\n\t}\n\t\n\treturn result;\n};\n\n/**\n * Function: augmentBoundingBox\n *\n * Augments the bounding box with the strokewidth and shadow offsets.\n */\nmxConnector.prototype.augmentBoundingBox = function(bbox)\n{\n\tmxShape.prototype.augmentBoundingBox.apply(this, arguments);\n\t\n\t// Adds marker sizes\n\tvar size = 0;\n\t\n\tif (mxUtils.getValue(this.style, mxConstants.STYLE_STARTARROW, mxConstants.NONE) != mxConstants.NONE)\n\t{\n\t\tsize = mxUtils.getNumber(this.style, mxConstants.STYLE_STARTSIZE, mxConstants.DEFAULT_MARKERSIZE) + 1;\n\t}\n\t\n\tif (mxUtils.getValue(this.style, mxConstants.STYLE_ENDARROW, mxConstants.NONE) != mxConstants.NONE)\n\t{\n\t\tsize = Math.max(size, mxUtils.getNumber(this.style, mxConstants.STYLE_ENDSIZE, mxConstants.DEFAULT_MARKERSIZE)) + 1;\n\t}\n\t\n\tbbox.grow(size * this.scale);\n};\n"
  },
  {
    "path": "static/cherry/drawio_demo/src/js/shape/mxCylinder.js",
    "content": "/**\n * Copyright (c) 2006-2015, JGraph Ltd\n * Copyright (c) 2006-2015, Gaudenz Alder\n */\n/**\n * Class: mxCylinder\n *\n * Extends <mxShape> to implement an cylinder shape. If a\n * custom shape with one filled area and an overlay path is\n * needed, then this shape's <redrawPath> should be overridden.\n * This shape is registered under <mxConstants.SHAPE_CYLINDER>\n * in <mxCellRenderer>.\n * \n * Constructor: mxCylinder\n *\n * Constructs a new cylinder shape.\n * \n * Parameters:\n * \n * bounds - <mxRectangle> that defines the bounds. This is stored in\n * <mxShape.bounds>.\n * fill - String that defines the fill color. This is stored in <fill>.\n * stroke - String that defines the stroke color. This is stored in <stroke>.\n * strokewidth - Optional integer that defines the stroke width. Default is\n * 1. This is stored in <strokewidth>.\n */\nfunction mxCylinder(bounds, fill, stroke, strokewidth)\n{\n\tmxShape.call(this);\n\tthis.bounds = bounds;\n\tthis.fill = fill;\n\tthis.stroke = stroke;\n\tthis.strokewidth = (strokewidth != null) ? strokewidth : 1;\n};\n\n/**\n * Extends mxShape.\n */\nmxUtils.extend(mxCylinder, mxShape);\n\n/**\n * Variable: maxHeight\n *\n * Defines the maximum height of the top and bottom part\n * of the cylinder shape.\n */\nmxCylinder.prototype.maxHeight = 40;\n\n/**\n * Variable: svgStrokeTolerance\n *\n * Sets stroke tolerance to 0 for SVG.\n */\nmxCylinder.prototype.svgStrokeTolerance = 0;\n\n/**\n * Function: paintVertexShape\n * \n * Redirects to redrawPath for subclasses to work.\n */\nmxCylinder.prototype.paintVertexShape = function(c, x, y, w, h)\n{\n\tc.translate(x, y);\n\tc.begin();\n\tthis.redrawPath(c, x, y, w, h, false);\n\tc.fillAndStroke();\n\t\n\tif (!this.outline || this.style == null || mxUtils.getValue(\n\t\tthis.style, mxConstants.STYLE_BACKGROUND_OUTLINE, 0) == 0)\n\t{\n\t\tc.setShadow(false);\n\t\tc.begin();\n\t\tthis.redrawPath(c, x, y, w, h, true);\n\t\tc.stroke();\n\t}\n};\n\n/**\n * Function: redrawPath\n *\n * Draws the path for this shape.\n */\nmxCylinder.prototype.getCylinderSize = function(x, y, w, h)\n{\n\treturn Math.min(this.maxHeight, Math.round(h / 5));\n};\n\n/**\n * Function: redrawPath\n *\n * Draws the path for this shape.\n */\nmxCylinder.prototype.redrawPath = function(c, x, y, w, h, isForeground)\n{\n\tvar dy = this.getCylinderSize(x, y, w, h);\n\t\n\tif ((isForeground && this.fill != null) || (!isForeground && this.fill == null))\n\t{\n\t\tc.moveTo(0, dy);\n\t\tc.curveTo(0, 2 * dy, w, 2 * dy, w, dy);\n\t\t\n\t\t// Needs separate shapes for correct hit-detection\n\t\tif (!isForeground)\n\t\t{\n\t\t\tc.stroke();\n\t\t\tc.begin();\n\t\t}\n\t}\n\t\n\tif (!isForeground)\n\t{\n\t\tc.moveTo(0, dy);\n\t\tc.curveTo(0, -dy / 3, w, -dy / 3, w, dy);\n\t\tc.lineTo(w, h - dy);\n\t\tc.curveTo(w, h + dy / 3, 0, h + dy / 3, 0, h - dy);\n\t\tc.close();\n\t}\n};\n"
  },
  {
    "path": "static/cherry/drawio_demo/src/js/shape/mxDoubleEllipse.js",
    "content": "/**\n * Copyright (c) 2006-2015, JGraph Ltd\n * Copyright (c) 2006-2015, Gaudenz Alder\n */\n/**\n * Class: mxDoubleEllipse\n *\n * Extends <mxShape> to implement a double ellipse shape. This shape is\n * registered under <mxConstants.SHAPE_DOUBLE_ELLIPSE> in <mxCellRenderer>.\n * Use the following override to only fill the inner ellipse in this shape:\n * \n * (code)\n * mxDoubleEllipse.prototype.paintVertexShape = function(c, x, y, w, h)\n * {\n *   c.ellipse(x, y, w, h);\n *   c.stroke();\n *   \n *   var inset = mxUtils.getValue(this.style, mxConstants.STYLE_MARGIN, Math.min(3 + this.strokewidth, Math.min(w / 5, h / 5)));\n *   x += inset;\n *   y += inset;\n *   w -= 2 * inset;\n *   h -= 2 * inset;\n *   \n *   if (w > 0 && h > 0)\n *   {\n *     c.ellipse(x, y, w, h);\n *   }\n *   \n *   c.fillAndStroke();\n * };\n * (end)\n * \n * Constructor: mxDoubleEllipse\n *\n * Constructs a new ellipse shape.\n *\n * Parameters:\n *\n * bounds - <mxRectangle> that defines the bounds. This is stored in\n * <mxShape.bounds>.\n * fill - String that defines the fill color. This is stored in <fill>.\n * stroke - String that defines the stroke color. This is stored in <stroke>.\n * strokewidth - Optional integer that defines the stroke width. Default is\n * 1. This is stored in <strokewidth>.\n */\nfunction mxDoubleEllipse(bounds, fill, stroke, strokewidth)\n{\n\tmxShape.call(this);\n\tthis.bounds = bounds;\n\tthis.fill = fill;\n\tthis.stroke = stroke;\n\tthis.strokewidth = (strokewidth != null) ? strokewidth : 1;\n};\n\n/**\n * Extends mxShape.\n */\nmxUtils.extend(mxDoubleEllipse, mxShape);\n\n/**\n * Variable: vmlScale\n * \n * Scale for improving the precision of VML rendering. Default is 10.\n */\nmxDoubleEllipse.prototype.vmlScale = 10;\n\n/**\n * Function: paintBackground\n * \n * Paints the background.\n */\nmxDoubleEllipse.prototype.paintBackground = function(c, x, y, w, h)\n{\n\tc.ellipse(x, y, w, h);\n\tc.fillAndStroke();\n};\n\n/**\n * Function: paintForeground\n * \n * Paints the foreground.\n */\nmxDoubleEllipse.prototype.paintForeground = function(c, x, y, w, h)\n{\n\tif (!this.outline)\n\t{\n\t\tvar margin = mxUtils.getValue(this.style, mxConstants.STYLE_MARGIN, Math.min(3 + this.strokewidth, Math.min(w / 5, h / 5)));\n\t\tx += margin;\n\t\ty += margin;\n\t\tw -= 2 * margin;\n\t\th -= 2 * margin;\n\t\t\n\t\t// FIXME: Rounding issues in IE8 standards mode (not in 1.x)\n\t\tif (w > 0 && h > 0)\n\t\t{\n\t\t\tc.ellipse(x, y, w, h);\n\t\t}\n\t\t\n\t\tc.stroke();\n\t}\n};\n\n/**\n * Function: getLabelBounds\n * \n * Returns the bounds for the label.\n */\nmxDoubleEllipse.prototype.getLabelBounds = function(rect)\n{\n\tvar margin = (mxUtils.getValue(this.style, mxConstants.STYLE_MARGIN, Math.min(3 + this.strokewidth,\n\t\t\tMath.min(rect.width / 5 / this.scale, rect.height / 5 / this.scale)))) * this.scale;\n\n\treturn new mxRectangle(rect.x + margin, rect.y + margin, rect.width - 2 * margin, rect.height - 2 * margin);\n};\n"
  },
  {
    "path": "static/cherry/drawio_demo/src/js/shape/mxEllipse.js",
    "content": "/**\n * Copyright (c) 2006-2015, JGraph Ltd\n * Copyright (c) 2006-2015, Gaudenz Alder\n */\n/**\n * Class: mxEllipse\n *\n * Extends <mxShape> to implement an ellipse shape.\n * This shape is registered under <mxConstants.SHAPE_ELLIPSE>\n * in <mxCellRenderer>.\n * \n * Constructor: mxEllipse\n *\n * Constructs a new ellipse shape.\n * \n * Parameters:\n * \n * bounds - <mxRectangle> that defines the bounds. This is stored in\n * <mxShape.bounds>.\n * fill - String that defines the fill color. This is stored in <fill>.\n * stroke - String that defines the stroke color. This is stored in <stroke>.\n * strokewidth - Optional integer that defines the stroke width. Default is\n * 1. This is stored in <strokewidth>.\n */\nfunction mxEllipse(bounds, fill, stroke, strokewidth)\n{\n\tmxShape.call(this);\n\tthis.bounds = bounds;\n\tthis.fill = fill;\n\tthis.stroke = stroke;\n\tthis.strokewidth = (strokewidth != null) ? strokewidth : 1;\n};\n\n/**\n * Extends mxShape.\n */\nmxUtils.extend(mxEllipse, mxShape);\n\n/**\n * Function: paintVertexShape\n * \n * Paints the ellipse shape.\n */\nmxEllipse.prototype.paintVertexShape = function(c, x, y, w, h)\n{\n\tc.ellipse(x, y, w, h);\n\tc.fillAndStroke();\n};\n"
  },
  {
    "path": "static/cherry/drawio_demo/src/js/shape/mxHexagon.js",
    "content": "/**\n * Copyright (c) 2006-2015, JGraph Ltd\n * Copyright (c) 2006-2015, Gaudenz Alder\n */\n/**\n * Class: mxHexagon\n * \n * Implementation of the hexagon shape.\n * \n * Constructor: mxHexagon\n *\n * Constructs a new hexagon shape.\n */\nfunction mxHexagon()\n{\n\tmxActor.call(this);\n};\n\n/**\n * Extends mxActor.\n */\nmxUtils.extend(mxHexagon, mxActor);\n\n/**\n * Function: redrawPath\n *\n * Draws the path for this shape.\n */\nmxHexagon.prototype.redrawPath = function(c, x, y, w, h)\n{\n\tvar arcSize = mxUtils.getValue(this.style, mxConstants.STYLE_ARCSIZE, mxConstants.LINE_ARCSIZE) / 2;\n\tthis.addPoints(c, [new mxPoint(0.25 * w, 0), new mxPoint(0.75 * w, 0), new mxPoint(w, 0.5 * h), new mxPoint(0.75 * w, h),\n\t                   new mxPoint(0.25 * w, h), new mxPoint(0, 0.5 * h)], this.isRounded, arcSize, true);\n};\n"
  },
  {
    "path": "static/cherry/drawio_demo/src/js/shape/mxImageShape.js",
    "content": "/**\n * Copyright (c) 2006-2015, JGraph Ltd\n * Copyright (c) 2006-2015, Gaudenz Alder\n */\n/**\n * Class: mxImageShape\n *\n * Extends <mxShape> to implement an image shape. This shape is registered\n * under <mxConstants.SHAPE_IMAGE> in <mxCellRenderer>.\n * \n * Constructor: mxImageShape\n * \n * Constructs a new image shape.\n * \n * Parameters:\n * \n * bounds - <mxRectangle> that defines the bounds. This is stored in\n * <mxShape.bounds>.\n * image - String that specifies the URL of the image. This is stored in\n * <image>.\n * fill - String that defines the fill color. This is stored in <fill>.\n * stroke - String that defines the stroke color. This is stored in <stroke>.\n * strokewidth - Optional integer that defines the stroke width. Default is\n * 0. This is stored in <strokewidth>.\n */\nfunction mxImageShape(bounds, image, fill, stroke, strokewidth)\n{\n\tmxShape.call(this);\n\tthis.bounds = bounds;\n\tthis.image = image;\n\tthis.fill = fill;\n\tthis.stroke = stroke;\n\tthis.strokewidth = (strokewidth != null) ? strokewidth : 1;\n\tthis.shadow = false;\n};\n\n/**\n * Extends mxShape.\n */\nmxUtils.extend(mxImageShape, mxRectangleShape);\n\n/**\n * Variable: preserveImageAspect\n *\n * Switch to preserve image aspect. Default is true.\n */\nmxImageShape.prototype.preserveImageAspect = true;\n\n/**\n * Function: getSvgScreenOffset\n * \n * Disables offset in IE9 for crisper image output.\n */\nmxImageShape.prototype.getSvgScreenOffset = function()\n{\n\treturn 0;\n};\n\n/**\n * Function: apply\n * \n * Overrides <mxShape.apply> to replace the fill and stroke colors with the\n * respective values from <mxConstants.STYLE_IMAGE_BACKGROUND> and\n * <mxConstants.STYLE_IMAGE_BORDER>.\n * \n * Applies the style of the given <mxCellState> to the shape. This\n * implementation assigns the following styles to local fields:\n * \n * - <mxConstants.STYLE_IMAGE_BACKGROUND> => fill\n * - <mxConstants.STYLE_IMAGE_BORDER> => stroke\n *\n * Parameters:\n *\n * state - <mxCellState> of the corresponding cell.\n */\nmxImageShape.prototype.apply = function(state)\n{\n\tmxShape.prototype.apply.apply(this, arguments);\n\t\n\tthis.fill = null;\n\tthis.stroke = null;\n\tthis.gradient = null;\n\t\n\tif (this.style != null)\n\t{\n\t\tthis.preserveImageAspect = mxUtils.getNumber(this.style, mxConstants.STYLE_IMAGE_ASPECT, 1) == 1;\n\t\t\n\t\t// Legacy support for imageFlipH/V\n\t\tthis.flipH = this.flipH || mxUtils.getValue(this.style, 'imageFlipH', 0) == 1;\n\t\tthis.flipV = this.flipV || mxUtils.getValue(this.style, 'imageFlipV', 0) == 1;\n\t}\n};\n\n/**\n * Function: isHtmlAllowed\n * \n * Returns true if HTML is allowed for this shape. This implementation always\n * returns false.\n */\nmxImageShape.prototype.isHtmlAllowed = function()\n{\n\treturn !this.preserveImageAspect;\n};\n\n/**\n * Function: createHtml\n *\n * Creates and returns the HTML DOM node(s) to represent\n * this shape. This implementation falls back to <createVml>\n * so that the HTML creation is optional.\n */\nmxImageShape.prototype.createHtml = function()\n{\n\tvar node = document.createElement('div');\n\tnode.style.position = 'absolute';\n\n\treturn node;\n};\n\n/**\n * Function: isRoundable\n * \n * Disables inherited roundable support.\n */\nmxImageShape.prototype.isRoundable = function(c, x, y, w, h)\n{\n\treturn false;\n};\n\n/**\n * Function: paintVertexShape\n * \n * Generic background painting implementation.\n */\nmxImageShape.prototype.paintVertexShape = function(c, x, y, w, h)\n{\n\tif (this.image != null)\n\t{\n\t\tvar fill = mxUtils.getValue(this.style, mxConstants.STYLE_IMAGE_BACKGROUND, null);\n\t\tvar stroke = mxUtils.getValue(this.style, mxConstants.STYLE_IMAGE_BORDER, null);\n\t\t\n\t\tif (fill != null)\n\t\t{\n\t\t\t// Stroke rendering required for shadow\n\t\t\tc.setFillColor(fill);\n\t\t\tc.setStrokeColor(stroke);\n\t\t\tc.rect(x, y, w, h);\n\t\t\tc.fillAndStroke();\n\t\t}\n\n\t\t// FlipH/V are implicit via mxShape.updateTransform\n\t\tc.image(x, y, w, h, this.image, this.preserveImageAspect, false, false);\n\t\t\n\t\tvar stroke = mxUtils.getValue(this.style, mxConstants.STYLE_IMAGE_BORDER, null);\n\t\t\n\t\tif (stroke != null)\n\t\t{\n\t\t\tc.setShadow(false);\n\t\t\tc.setStrokeColor(stroke);\n\t\t\tc.rect(x, y, w, h);\n\t\t\tc.stroke();\n\t\t}\n\t}\n\telse\n\t{\n\t\tmxRectangleShape.prototype.paintBackground.apply(this, arguments);\n\t}\n};\n\n/**\n * Function: redraw\n * \n * Overrides <mxShape.redraw> to preserve the aspect ratio of images.\n */\nmxImageShape.prototype.redrawHtmlShape = function()\n{\n\tthis.node.style.left = Math.round(this.bounds.x) + 'px';\n\tthis.node.style.top = Math.round(this.bounds.y) + 'px';\n\tthis.node.style.width = Math.max(0, Math.round(this.bounds.width)) + 'px';\n\tthis.node.style.height = Math.max(0, Math.round(this.bounds.height)) + 'px';\n\tthis.node.innerHTML = '';\n\n\tif (this.image != null)\n\t{\n\t\tvar fill = mxUtils.getValue(this.style, mxConstants.STYLE_IMAGE_BACKGROUND, '');\n\t\tvar stroke = mxUtils.getValue(this.style, mxConstants.STYLE_IMAGE_BORDER, '');\n\t\tthis.node.style.backgroundColor = fill;\n\t\tthis.node.style.borderColor = stroke;\n\t\t\n\t\t// VML image supports PNG in IE6\n\t\tvar useVml = mxClient.IS_IE6 || ((document.documentMode == null || document.documentMode <= 8) && this.rotation != 0);\n\t\tvar img = document.createElement((useVml) ? mxClient.VML_PREFIX + ':image' : 'img');\n\t\timg.setAttribute('border', '0');\n\t\timg.style.position = 'absolute';\n\t\timg.src = this.image;\n\n\t\tvar filter = (this.opacity < 100) ? 'alpha(opacity=' + this.opacity + ')' : '';\n\t\tthis.node.style.filter = filter;\n\t\t\n\t\tif (this.flipH && this.flipV)\n\t\t{\n\t\t\tfilter += 'progid:DXImageTransform.Microsoft.BasicImage(rotation=2)';\n\t\t}\n\t\telse if (this.flipH)\n\t\t{\n\t\t\tfilter += 'progid:DXImageTransform.Microsoft.BasicImage(mirror=1)';\n\t\t}\n\t\telse if (this.flipV)\n\t\t{\n\t\t\tfilter += 'progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)';\n\t\t}\n\n\t\tif (img.style.filter != filter)\n\t\t{\n\t\t\timg.style.filter = filter;\n\t\t}\n\n\t\tif (img.nodeName == 'image')\n\t\t{\n\t\t\timg.style.rotation = this.rotation;\n\t\t}\n\t\telse if (this.rotation != 0)\n\t\t{\n\t\t\t// LATER: Add flipV/H support\n\t\t\tmxUtils.setPrefixedStyle(img.style, 'transform', 'rotate(' + this.rotation + 'deg)');\n\t\t}\n\t\telse\n\t\t{\n\t\t\tmxUtils.setPrefixedStyle(img.style, 'transform', '');\n\t\t}\n\n\t\t// Known problem: IE clips top line of image for certain angles\n\t\timg.style.width = this.node.style.width;\n\t\timg.style.height = this.node.style.height;\n\t\t\n\t\tthis.node.style.backgroundImage = '';\n\t\tthis.node.appendChild(img);\n\t}\n\telse\n\t{\n\t\tthis.setTransparentBackgroundImage(this.node);\n\t}\n};\n"
  },
  {
    "path": "static/cherry/drawio_demo/src/js/shape/mxLabel.js",
    "content": "/**\n * Copyright (c) 2006-2015, JGraph Ltd\n * Copyright (c) 2006-2015, Gaudenz Alder\n */\n/**\n * Class: mxLabel\n *\n * Extends <mxShape> to implement an image shape with a label.\n * This shape is registered under <mxConstants.SHAPE_LABEL> in\n * <mxCellRenderer>.\n * \n * Constructor: mxLabel\n *\n * Constructs a new label shape.\n * \n * Parameters:\n * \n * bounds - <mxRectangle> that defines the bounds. This is stored in\n * <mxShape.bounds>.\n * fill - String that defines the fill color. This is stored in <fill>.\n * stroke - String that defines the stroke color. This is stored in <stroke>.\n * strokewidth - Optional integer that defines the stroke width. Default is\n * 1. This is stored in <strokewidth>.\n */\nfunction mxLabel(bounds, fill, stroke, strokewidth)\n{\n\tmxRectangleShape.call(this, bounds, fill, stroke, strokewidth);\n};\n\n/**\n * Extends mxShape.\n */\nmxUtils.extend(mxLabel, mxRectangleShape);\n\n/**\n * Variable: imageSize\n *\n * Default width and height for the image. Default is\n * <mxConstants.DEFAULT_IMAGESIZE>.\n */\nmxLabel.prototype.imageSize = mxConstants.DEFAULT_IMAGESIZE;\n\n/**\n * Variable: spacing\n *\n * Default value for image spacing. Default is 2.\n */\nmxLabel.prototype.spacing = 2;\n\n/**\n * Variable: indicatorSize\n *\n * Default width and height for the indicicator. Default is 10.\n */\nmxLabel.prototype.indicatorSize = 10;\n\n/**\n * Variable: indicatorSpacing\n *\n * Default spacing between image and indicator. Default is 2.\n */\nmxLabel.prototype.indicatorSpacing = 2;\n\n/**\n * Function: init\n *\n * Initializes the shape and the <indicator>.\n */\nmxLabel.prototype.init = function(container)\n{\n\tmxShape.prototype.init.apply(this, arguments);\n\n\tif (this.indicatorShape != null)\n\t{\n\t\tthis.indicator = new this.indicatorShape();\n\t\tthis.indicator.dialect = this.dialect;\n\t\tthis.indicator.init(this.node);\n\t}\n};\n\n/**\n * Function: redraw\n *\n * Reconfigures this shape. This will update the colors of the indicator\n * and reconfigure it if required.\n */\nmxLabel.prototype.redraw = function()\n{\n\tif (this.indicator != null)\n\t{\n\t\tthis.indicator.fill = this.indicatorColor;\n\t\tthis.indicator.stroke = this.indicatorStrokeColor;\n\t\tthis.indicator.gradient = this.indicatorGradientColor;\n\t\tthis.indicator.direction = this.indicatorDirection;\n\t}\n\t\n\tmxShape.prototype.redraw.apply(this, arguments);\n};\n\n/**\n * Function: isHtmlAllowed\n *\n * Returns true for non-rounded, non-rotated shapes with no glass gradient and\n * no indicator shape.\n */\nmxLabel.prototype.isHtmlAllowed = function()\n{\n\treturn mxRectangleShape.prototype.isHtmlAllowed.apply(this, arguments) &&\n\t\tthis.indicatorColor == null && this.indicatorShape == null;\n};\n\n/**\n * Function: paintForeground\n * \n * Generic background painting implementation.\n */\nmxLabel.prototype.paintForeground = function(c, x, y, w, h)\n{\n\tthis.paintImage(c, x, y, w, h);\n\tthis.paintIndicator(c, x, y, w, h);\n\t\n\tmxRectangleShape.prototype.paintForeground.apply(this, arguments);\n};\n\n/**\n * Function: paintImage\n * \n * Generic background painting implementation.\n */\nmxLabel.prototype.paintImage = function(c, x, y, w, h)\n{\n\tif (this.image != null)\n\t{\n\t\tvar bounds = this.getImageBounds(x, y, w, h);\n\t\tc.image(bounds.x, bounds.y, bounds.width, bounds.height, this.image, false, false, false);\n\t}\n};\n\n/**\n * Function: getImageBounds\n * \n * Generic background painting implementation.\n */\nmxLabel.prototype.getImageBounds = function(x, y, w, h)\n{\n\tvar align = mxUtils.getValue(this.style, mxConstants.STYLE_IMAGE_ALIGN, mxConstants.ALIGN_LEFT);\n\tvar valign = mxUtils.getValue(this.style, mxConstants.STYLE_IMAGE_VERTICAL_ALIGN, mxConstants.ALIGN_MIDDLE);\n\tvar width = mxUtils.getNumber(this.style, mxConstants.STYLE_IMAGE_WIDTH, mxConstants.DEFAULT_IMAGESIZE);\n\tvar height = mxUtils.getNumber(this.style, mxConstants.STYLE_IMAGE_HEIGHT, mxConstants.DEFAULT_IMAGESIZE);\n\tvar spacing = mxUtils.getNumber(this.style, mxConstants.STYLE_SPACING, this.spacing) + 5;\n\n\tif (align == mxConstants.ALIGN_CENTER)\n\t{\n\t\tx += (w - width) / 2;\n\t}\n\telse if (align == mxConstants.ALIGN_RIGHT)\n\t{\n\t\tx += w - width - spacing;\n\t}\n\telse // default is left\n\t{\n\t\tx += spacing;\n\t}\n\n\tif (valign == mxConstants.ALIGN_TOP)\n\t{\n\t\ty += spacing;\n\t}\n\telse if (valign == mxConstants.ALIGN_BOTTOM)\n\t{\n\t\ty += h - height - spacing;\n\t}\n\telse // default is middle\n\t{\n\t\ty += (h - height) / 2;\n\t}\n\t\n\treturn new mxRectangle(x, y, width, height);\n};\n\n/**\n * Function: paintIndicator\n * \n * Generic background painting implementation.\n */\nmxLabel.prototype.paintIndicator = function(c, x, y, w, h)\n{\n\tif (this.indicator != null)\n\t{\n\t\tthis.indicator.bounds = this.getIndicatorBounds(x, y, w, h);\n\t\tthis.indicator.paint(c);\n\t}\n\telse if (this.indicatorImage != null)\n\t{\n\t\tvar bounds = this.getIndicatorBounds(x, y, w, h);\n\t\tc.image(bounds.x, bounds.y, bounds.width, bounds.height, this.indicatorImage, false, false, false);\n\t}\n};\n\n/**\n * Function: getIndicatorBounds\n * \n * Generic background painting implementation.\n */\nmxLabel.prototype.getIndicatorBounds = function(x, y, w, h)\n{\n\tvar align = mxUtils.getValue(this.style, mxConstants.STYLE_IMAGE_ALIGN, mxConstants.ALIGN_LEFT);\n\tvar valign = mxUtils.getValue(this.style, mxConstants.STYLE_IMAGE_VERTICAL_ALIGN, mxConstants.ALIGN_MIDDLE);\n\tvar width = mxUtils.getNumber(this.style, mxConstants.STYLE_INDICATOR_WIDTH, this.indicatorSize);\n\tvar height = mxUtils.getNumber(this.style, mxConstants.STYLE_INDICATOR_HEIGHT, this.indicatorSize);\n\tvar spacing = this.spacing + 5;\t\t\n\t\n\tif (align == mxConstants.ALIGN_RIGHT)\n\t{\n\t\tx += w - width - spacing;\n\t}\n\telse if (align == mxConstants.ALIGN_CENTER)\n\t{\n\t\tx += (w - width) / 2;\n\t}\n\telse // default is left\n\t{\n\t\tx += spacing;\n\t}\n\t\n\tif (valign == mxConstants.ALIGN_BOTTOM)\n\t{\n\t\ty += h - height - spacing;\n\t}\n\telse if (valign == mxConstants.ALIGN_TOP)\n\t{\n\t\ty += spacing;\n\t}\n\telse // default is middle\n\t{\n\t\ty += (h - height) / 2;\n\t}\n\t\n\treturn new mxRectangle(x, y, width, height);\n};\n/**\n * Function: redrawHtmlShape\n * \n * Generic background painting implementation.\n */\nmxLabel.prototype.redrawHtmlShape = function()\n{\n\tmxRectangleShape.prototype.redrawHtmlShape.apply(this, arguments);\n\t\n\t// Removes all children\n\twhile(this.node.hasChildNodes())\n\t{\n\t\tthis.node.removeChild(this.node.lastChild);\n\t}\n\t\n\tif (this.image != null)\n\t{\n\t\tvar node = document.createElement('img');\n\t\tnode.style.position = 'relative';\n\t\tnode.setAttribute('border', '0');\n\t\t\n\t\tvar bounds = this.getImageBounds(this.bounds.x, this.bounds.y, this.bounds.width, this.bounds.height);\n\t\tbounds.x -= this.bounds.x;\n\t\tbounds.y -= this.bounds.y;\n\n\t\tnode.style.left = Math.round(bounds.x) + 'px';\n\t\tnode.style.top = Math.round(bounds.y) + 'px';\n\t\tnode.style.width = Math.round(bounds.width) + 'px';\n\t\tnode.style.height = Math.round(bounds.height) + 'px';\n\t\t\n\t\tnode.src = this.image;\n\t\t\n\t\tthis.node.appendChild(node);\n\t}\n};\n"
  },
  {
    "path": "static/cherry/drawio_demo/src/js/shape/mxLine.js",
    "content": "/**\n * Copyright (c) 2006-2015, JGraph Ltd\n * Copyright (c) 2006-2015, Gaudenz Alder\n */\n/**\n * Class: mxLine\n *\n * Extends <mxShape> to implement a horizontal line shape.\n * This shape is registered under <mxConstants.SHAPE_LINE> in\n * <mxCellRenderer>.\n * \n * Constructor: mxLine\n *\n * Constructs a new line shape.\n * \n * Parameters:\n * \n * bounds - <mxRectangle> that defines the bounds. This is stored in\n * <mxShape.bounds>.\n * stroke - String that defines the stroke color. Default is 'black'. This is\n * stored in <stroke>.\n * strokewidth - Optional integer that defines the stroke width. Default is\n * 1. This is stored in <strokewidth>.\n */\nfunction mxLine(bounds, stroke, strokewidth)\n{\n\tmxShape.call(this);\n\tthis.bounds = bounds;\n\tthis.stroke = stroke;\n\tthis.strokewidth = (strokewidth != null) ? strokewidth : 1;\n};\n\n/**\n * Extends mxShape.\n */\nmxUtils.extend(mxLine, mxShape);\n\n/**\n * Function: paintVertexShape\n * \n * Redirects to redrawPath for subclasses to work.\n */\nmxLine.prototype.paintVertexShape = function(c, x, y, w, h)\n{\n\tvar mid = y + h / 2;\n\n\tc.begin();\n\tc.moveTo(x, mid);\n\tc.lineTo(x + w, mid);\n\tc.stroke();\n};\n"
  },
  {
    "path": "static/cherry/drawio_demo/src/js/shape/mxMarker.js",
    "content": "/**\n * Copyright (c) 2006-2015, JGraph Ltd\n * Copyright (c) 2006-2015, Gaudenz Alder\n */\nvar mxMarker =\n{\n\t/**\n\t * Class: mxMarker\n\t * \n\t * A static class that implements all markers for VML and SVG using a\n\t * registry. NOTE: The signatures in this class will change.\n\t * \n\t * Variable: markers\n\t * \n\t * Maps from markers names to functions to paint the markers.\n\t */\n\tmarkers: [],\n\t\n\t/**\n\t * Function: addMarker\n\t * \n\t * Adds a factory method that updates a given endpoint and returns a\n\t * function to paint the marker onto the given canvas.\n\t */\n\taddMarker: function(type, funct)\n\t{\n\t\tmxMarker.markers[type] = funct;\n\t},\n\t\n\t/**\n\t * Function: createMarker\n\t * \n\t * Returns a function to paint the given marker.\n\t */\n\tcreateMarker: function(canvas, shape, type, pe, unitX, unitY, size, source, sw, filled)\n\t{\n\t\tvar funct = mxMarker.markers[type];\n\t\t\n\t\treturn (funct != null) ? funct(canvas, shape, type, pe, unitX, unitY, size, source, sw, filled) : null;\n\t}\n\n};\n\n/**\n * Adds the classic and block marker factory method.\n */\n(function()\n{\n\tfunction createArrow(widthFactor)\n\t{\n\t\twidthFactor = (widthFactor != null) ? widthFactor : 2;\n\t\t\n\t\treturn function(canvas, shape, type, pe, unitX, unitY, size, source, sw, filled)\n\t\t{\n\t\t\t// The angle of the forward facing arrow sides against the x axis is\n\t\t\t// 26.565 degrees, 1/sin(26.565) = 2.236 / 2 = 1.118 ( / 2 allows for\n\t\t\t// only half the strokewidth is processed ).\n\t\t\tvar endOffsetX = unitX * sw * 1.118;\n\t\t\tvar endOffsetY = unitY * sw * 1.118;\n\t\t\t\n\t\t\tunitX = unitX * (size + sw);\n\t\t\tunitY = unitY * (size + sw);\n\t\n\t\t\tvar pt = pe.clone();\n\t\t\tpt.x -= endOffsetX;\n\t\t\tpt.y -= endOffsetY;\n\t\t\t\n\t\t\tvar f = (type != mxConstants.ARROW_CLASSIC && type != mxConstants.ARROW_CLASSIC_THIN) ? 1 : 3 / 4;\n\t\t\tpe.x += -unitX * f - endOffsetX;\n\t\t\tpe.y += -unitY * f - endOffsetY;\n\t\t\t\n\t\t\treturn function()\n\t\t\t{\n\t\t\t\tcanvas.begin();\n\t\t\t\tcanvas.moveTo(pt.x, pt.y);\n\t\t\t\tcanvas.lineTo(pt.x - unitX - unitY / widthFactor, pt.y - unitY + unitX / widthFactor);\n\t\t\t\n\t\t\t\tif (type == mxConstants.ARROW_CLASSIC || type == mxConstants.ARROW_CLASSIC_THIN)\n\t\t\t\t{\n\t\t\t\t\tcanvas.lineTo(pt.x - unitX * 3 / 4, pt.y - unitY * 3 / 4);\n\t\t\t\t}\n\t\t\t\n\t\t\t\tcanvas.lineTo(pt.x + unitY / widthFactor - unitX, pt.y - unitY - unitX / widthFactor);\n\t\t\t\tcanvas.close();\n\t\n\t\t\t\tif (filled)\n\t\t\t\t{\n\t\t\t\t\tcanvas.fillAndStroke();\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tcanvas.stroke();\n\t\t\t\t}\n\t\t\t};\n\t\t}\n\t};\n\t\n\tmxMarker.addMarker('classic', createArrow(2));\n\tmxMarker.addMarker('classicThin', createArrow(3));\n\tmxMarker.addMarker('block', createArrow(2));\n\tmxMarker.addMarker('blockThin', createArrow(3));\n\t\n\tfunction createOpenArrow(widthFactor)\n\t{\n\t\twidthFactor = (widthFactor != null) ? widthFactor : 2;\n\t\t\n\t\treturn function(canvas, shape, type, pe, unitX, unitY, size, source, sw, filled)\n\t\t{\n\t\t\t// The angle of the forward facing arrow sides against the x axis is\n\t\t\t// 26.565 degrees, 1/sin(26.565) = 2.236 / 2 = 1.118 ( / 2 allows for\n\t\t\t// only half the strokewidth is processed ).\n\t\t\tvar endOffsetX = unitX * sw * 1.118;\n\t\t\tvar endOffsetY = unitY * sw * 1.118;\n\t\t\t\n\t\t\tunitX = unitX * (size + sw);\n\t\t\tunitY = unitY * (size + sw);\n\t\t\t\n\t\t\tvar pt = pe.clone();\n\t\t\tpt.x -= endOffsetX;\n\t\t\tpt.y -= endOffsetY;\n\t\t\t\n\t\t\tpe.x += -endOffsetX * 2;\n\t\t\tpe.y += -endOffsetY * 2;\n\n\t\t\treturn function()\n\t\t\t{\n\t\t\t\tcanvas.begin();\n\t\t\t\tcanvas.moveTo(pt.x - unitX - unitY / widthFactor, pt.y - unitY + unitX / widthFactor);\n\t\t\t\tcanvas.lineTo(pt.x, pt.y);\n\t\t\t\tcanvas.lineTo(pt.x + unitY / widthFactor - unitX, pt.y - unitY - unitX / widthFactor);\n\t\t\t\tcanvas.stroke();\n\t\t\t};\n\t\t}\n\t};\n\t\n\tmxMarker.addMarker('open', createOpenArrow(2));\n\tmxMarker.addMarker('openThin', createOpenArrow(3));\n\t\n\tmxMarker.addMarker('oval', function(canvas, shape, type, pe, unitX, unitY, size, source, sw, filled)\n\t{\n\t\tvar a = size / 2;\n\t\t\n\t\tvar pt = pe.clone();\n\t\tpe.x -= unitX * a;\n\t\tpe.y -= unitY * a;\n\n\t\treturn function()\n\t\t{\n\t\t\tcanvas.ellipse(pt.x - a, pt.y - a, size, size);\n\t\t\t\t\t\t\n\t\t\tif (filled)\n\t\t\t{\n\t\t\t\tcanvas.fillAndStroke();\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tcanvas.stroke();\n\t\t\t}\n\t\t};\n\t});\n\n\tfunction diamond(canvas, shape, type, pe, unitX, unitY, size, source, sw, filled)\n\t{\n\t\t// The angle of the forward facing arrow sides against the x axis is\n\t\t// 45 degrees, 1/sin(45) = 1.4142 / 2 = 0.7071 ( / 2 allows for\n\t\t// only half the strokewidth is processed ). Or 0.9862 for thin diamond.\n\t\t// Note these values and the tk variable below are dependent, update\n\t\t// both together (saves trig hard coding it).\n\t\tvar swFactor = (type == mxConstants.ARROW_DIAMOND) ?  0.7071 : 0.9862;\n\t\tvar endOffsetX = unitX * sw * swFactor;\n\t\tvar endOffsetY = unitY * sw * swFactor;\n\t\t\n\t\tunitX = unitX * (size + sw);\n\t\tunitY = unitY * (size + sw);\n\t\t\n\t\tvar pt = pe.clone();\n\t\tpt.x -= endOffsetX;\n\t\tpt.y -= endOffsetY;\n\t\t\n\t\tpe.x += -unitX - endOffsetX;\n\t\tpe.y += -unitY - endOffsetY;\n\t\t\n\t\t// thickness factor for diamond\n\t\tvar tk = ((type == mxConstants.ARROW_DIAMOND) ?  2 : 3.4);\n\t\t\n\t\treturn function()\n\t\t{\n\t\t\tcanvas.begin();\n\t\t\tcanvas.moveTo(pt.x, pt.y);\n\t\t\tcanvas.lineTo(pt.x - unitX / 2 - unitY / tk, pt.y + unitX / tk - unitY / 2);\n\t\t\tcanvas.lineTo(pt.x - unitX, pt.y - unitY);\n\t\t\tcanvas.lineTo(pt.x - unitX / 2 + unitY / tk, pt.y - unitY / 2 - unitX / tk);\n\t\t\tcanvas.close();\n\t\t\t\n\t\t\tif (filled)\n\t\t\t{\n\t\t\t\tcanvas.fillAndStroke();\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tcanvas.stroke();\n\t\t\t}\n\t\t};\n\t};\n\n\tmxMarker.addMarker('diamond', diamond);\n\tmxMarker.addMarker('diamondThin', diamond);\n})();\n"
  },
  {
    "path": "static/cherry/drawio_demo/src/js/shape/mxPolyline.js",
    "content": "/**\n * Copyright (c) 2006-2015, JGraph Ltd\n * Copyright (c) 2006-2015, Gaudenz Alder\n */\n/**\n * Class: mxPolyline\n *\n * Extends <mxShape> to implement a polyline (a line with multiple points).\n * This shape is registered under <mxConstants.SHAPE_POLYLINE> in\n * <mxCellRenderer>.\n * \n * Constructor: mxPolyline\n *\n * Constructs a new polyline shape.\n * \n * Parameters:\n * \n * points - Array of <mxPoints> that define the points. This is stored in\n * <mxShape.points>.\n * stroke - String that defines the stroke color. Default is 'black'. This is\n * stored in <stroke>.\n * strokewidth - Optional integer that defines the stroke width. Default is\n * 1. This is stored in <strokewidth>.\n */\nfunction mxPolyline(points, stroke, strokewidth)\n{\n\tmxShape.call(this);\n\tthis.points = points;\n\tthis.stroke = stroke;\n\tthis.strokewidth = (strokewidth != null) ? strokewidth : 1;\n};\n\n/**\n * Extends mxShape.\n */\nmxUtils.extend(mxPolyline, mxShape);\n\n/**\n * Function: getRotation\n * \n * Returns 0.\n */\nmxPolyline.prototype.getRotation = function()\n{\n\treturn 0;\n};\n\n/**\n * Function: getShapeRotation\n * \n * Returns 0.\n */\nmxPolyline.prototype.getShapeRotation = function()\n{\n\treturn 0;\n};\n\n/**\n * Function: isPaintBoundsInverted\n * \n * Returns false.\n */\nmxPolyline.prototype.isPaintBoundsInverted = function()\n{\n\treturn false;\n};\n\n/**\n * Function: paintEdgeShape\n * \n * Paints the line shape.\n */\nmxPolyline.prototype.paintEdgeShape = function(c, pts)\n{\n\tif (this.style == null || this.style[mxConstants.STYLE_CURVED] != 1)\n\t{\n\t\tthis.paintLine(c, pts, this.isRounded);\n\t}\n\telse\n\t{\n\t\tthis.paintCurvedLine(c, pts);\n\t}\n};\n\n/**\n * Function: paintLine\n * \n * Paints the line shape.\n */\nmxPolyline.prototype.paintLine = function(c, pts, rounded)\n{\n\tvar arcSize = mxUtils.getValue(this.style, mxConstants.STYLE_ARCSIZE, mxConstants.LINE_ARCSIZE) / 2;\n\tc.begin();\n\tthis.addPoints(c, pts, rounded, arcSize, false);\n\tc.stroke();\n};\n\n/**\n * Function: paintLine\n * \n * Paints the line shape.\n */\nmxPolyline.prototype.paintCurvedLine = function(c, pts)\n{\n\tc.begin();\n\t\n\tvar pt = pts[0];\n\tvar n = pts.length;\n\t\n\tc.moveTo(pt.x, pt.y);\n\t\n\tfor (var i = 1; i < n - 2; i++)\n\t{\n\t\tvar p0 = pts[i];\n\t\tvar p1 = pts[i + 1];\n\t\tvar ix = (p0.x + p1.x) / 2;\n\t\tvar iy = (p0.y + p1.y) / 2;\n\t\t\n\t\tc.quadTo(p0.x, p0.y, ix, iy);\n\t}\n\t\n\tvar p0 = pts[n - 2];\n\tvar p1 = pts[n - 1];\n\t\n\tc.quadTo(p0.x, p0.y, p1.x, p1.y);\n\tc.stroke();\n};\n"
  },
  {
    "path": "static/cherry/drawio_demo/src/js/shape/mxRectangleShape.js",
    "content": "/**\n * Copyright (c) 2006-2015, JGraph Ltd\n * Copyright (c) 2006-2015, Gaudenz Alder\n */\n/**\n * Class: mxRectangleShape\n *\n * Extends <mxShape> to implement a rectangle shape.\n * This shape is registered under <mxConstants.SHAPE_RECTANGLE>\n * in <mxCellRenderer>.\n * \n * Constructor: mxRectangleShape\n *\n * Constructs a new rectangle shape.\n * \n * Parameters:\n * \n * bounds - <mxRectangle> that defines the bounds. This is stored in\n * <mxShape.bounds>.\n * fill - String that defines the fill color. This is stored in <fill>.\n * stroke - String that defines the stroke color. This is stored in <stroke>.\n * strokewidth - Optional integer that defines the stroke width. Default is\n * 1. This is stored in <strokewidth>.\n */\nfunction mxRectangleShape(bounds, fill, stroke, strokewidth)\n{\n\tmxShape.call(this);\n\tthis.bounds = bounds;\n\tthis.fill = fill;\n\tthis.stroke = stroke;\n\tthis.strokewidth = (strokewidth != null) ? strokewidth : 1;\n};\n\n/**\n * Extends mxShape.\n */\nmxUtils.extend(mxRectangleShape, mxShape);\n\n/**\n * Function: isHtmlAllowed\n *\n * Returns true for non-rounded, non-rotated shapes with no glass gradient.\n */\nmxRectangleShape.prototype.isHtmlAllowed = function()\n{\n\tvar events = true;\n\t\n\tif (this.style != null)\n\t{\n\t\tevents = mxUtils.getValue(this.style, mxConstants.STYLE_POINTER_EVENTS, '1') == '1';\t\t\n\t}\n\t\n\treturn !this.isRounded && !this.glass && this.rotation == 0 && (events ||\n\t\t(this.fill != null && this.fill != mxConstants.NONE));\n};\n\n/**\n * Function: paintBackground\n * \n * Generic background painting implementation.\n */\nmxRectangleShape.prototype.paintBackground = function(c, x, y, w, h)\n{\n\tvar events = true;\n\t\n\tif (this.style != null)\n\t{\n\t\tevents = mxUtils.getValue(this.style, mxConstants.STYLE_POINTER_EVENTS, '1') == '1';\t\t\n\t}\n\t\n\tif (events || (this.fill != null && this.fill != mxConstants.NONE) ||\n\t\t(this.stroke != null && this.stroke != mxConstants.NONE))\n\t{\n\t\tif (!events && (this.fill == null || this.fill == mxConstants.NONE))\n\t\t{\n\t\t\tc.pointerEvents = false;\n\t\t}\n\t\t\n\t\tif (this.isRounded)\n\t\t{\n\t\t\tvar r = 0;\n\t\t\t\n\t\t\tif (mxUtils.getValue(this.style, mxConstants.STYLE_ABSOLUTE_ARCSIZE, 0) == '1')\n\t\t\t{\n\t\t\t\tr = Math.min(w / 2, Math.min(h / 2, mxUtils.getValue(this.style,\n\t\t\t\t\tmxConstants.STYLE_ARCSIZE, mxConstants.LINE_ARCSIZE) / 2));\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tvar f = mxUtils.getValue(this.style, mxConstants.STYLE_ARCSIZE,\n\t\t\t\t\tmxConstants.RECTANGLE_ROUNDING_FACTOR * 100) / 100;\n\t\t\t\tr = Math.min(w * f, h * f);\n\t\t\t}\n\t\t\t\n\t\t\tc.roundrect(x, y, w, h, r, r);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tc.rect(x, y, w, h);\n\t\t}\n\t\t\t\n\t\tc.fillAndStroke();\n\t}\n};\n\n/**\n * Function: isRoundable\n * \n * Adds roundable support.\n */\nmxRectangleShape.prototype.isRoundable = function(c, x, y, w, h)\n{\n\treturn true;\n};\n\n/**\n * Function: paintForeground\n * \n * Generic background painting implementation.\n */\nmxRectangleShape.prototype.paintForeground = function(c, x, y, w, h)\n{\n\tif (this.glass && !this.outline && this.fill != null && this.fill != mxConstants.NONE)\n\t{\n\t\tthis.paintGlassEffect(c, x, y, w, h, this.getArcSize(w + this.strokewidth, h + this.strokewidth));\n\t}\n};\n"
  },
  {
    "path": "static/cherry/drawio_demo/src/js/shape/mxRhombus.js",
    "content": "/**\n * Copyright (c) 2006-2015, JGraph Ltd\n * Copyright (c) 2006-2015, Gaudenz Alder\n */\n/**\n * Class: mxRhombus\n *\n * Extends <mxShape> to implement a rhombus (aka diamond) shape.\n * This shape is registered under <mxConstants.SHAPE_RHOMBUS>\n * in <mxCellRenderer>.\n * \n * Constructor: mxRhombus\n *\n * Constructs a new rhombus shape.\n * \n * Parameters:\n * \n * bounds - <mxRectangle> that defines the bounds. This is stored in\n * <mxShape.bounds>.\n * fill - String that defines the fill color. This is stored in <fill>.\n * stroke - String that defines the stroke color. This is stored in <stroke>.\n * strokewidth - Optional integer that defines the stroke width. Default is\n * 1. This is stored in <strokewidth>.\n */\nfunction mxRhombus(bounds, fill, stroke, strokewidth)\n{\n\tmxShape.call(this);\n\tthis.bounds = bounds;\n\tthis.fill = fill;\n\tthis.stroke = stroke;\n\tthis.strokewidth = (strokewidth != null) ? strokewidth : 1;\n};\n\n/**\n * Extends mxShape.\n */\nmxUtils.extend(mxRhombus, mxShape);\n\n/**\n * Function: isRoundable\n * \n * Adds roundable support.\n */\nmxRhombus.prototype.isRoundable = function()\n{\n\treturn true;\n};\n\n/**\n * Function: paintVertexShape\n * \n * Generic painting implementation.\n */\nmxRhombus.prototype.paintVertexShape = function(c, x, y, w, h)\n{\n\tvar hw = w / 2;\n\tvar hh = h / 2;\n\t\n\tvar arcSize = mxUtils.getValue(this.style, mxConstants.STYLE_ARCSIZE, mxConstants.LINE_ARCSIZE) / 2;\n\tc.begin();\n\tthis.addPoints(c, [new mxPoint(x + hw, y), new mxPoint(x + w, y + hh), new mxPoint(x + hw, y + h),\n\t     new mxPoint(x, y + hh)], this.isRounded, arcSize, true);\n\tc.fillAndStroke();\n};\n"
  },
  {
    "path": "static/cherry/drawio_demo/src/js/shape/mxShape.js",
    "content": "/**\n * Copyright (c) 2006-2015, JGraph Ltd\n * Copyright (c) 2006-2015, Gaudenz Alder\n */\n/**\n * Class: mxShape\n *\n * Base class for all shapes. A shape in mxGraph is a\n * separate implementation for SVG, VML and HTML. Which\n * implementation to use is controlled by the <dialect>\n * property which is assigned from within the <mxCellRenderer>\n * when the shape is created. The dialect must be assigned\n * for a shape, and it does normally depend on the browser and\n * the confiuration of the graph (see <mxGraph> rendering hint).\n *\n * For each supported shape in SVG and VML, a corresponding\n * shape exists in mxGraph, namely for text, image, rectangle,\n * rhombus, ellipse and polyline. The other shapes are a\n * combination of these shapes (eg. label and swimlane)\n * or they consist of one or more (filled) path objects\n * (eg. actor and cylinder). The HTML implementation is\n * optional but may be required for a HTML-only view of\n * the graph.\n *\n * Custom Shapes:\n *\n * To extend from this class, the basic code looks as follows.\n * In the special case where the custom shape consists only of\n * one filled region or one filled region and an additional stroke\n * the <mxActor> and <mxCylinder> should be subclassed,\n * respectively.\n *\n * (code)\n * function CustomShape() { }\n * \n * CustomShape.prototype = new mxShape();\n * CustomShape.prototype.constructor = CustomShape; \n * (end)\n *\n * To register a custom shape in an existing graph instance,\n * one must register the shape under a new name in the graph's\n * cell renderer as follows:\n *\n * (code)\n * mxCellRenderer.registerShape('customShape', CustomShape);\n * (end)\n *\n * The second argument is the name of the constructor.\n *\n * In order to use the shape you can refer to the given name above\n * in a stylesheet. For example, to change the shape for the default\n * vertex style, the following code is used:\n *\n * (code)\n * var style = graph.getStylesheet().getDefaultVertexStyle();\n * style[mxConstants.STYLE_SHAPE] = 'customShape';\n * (end)\n * \n * Constructor: mxShape\n *\n * Constructs a new shape.\n */\nfunction mxShape(stencil)\n{\n\tthis.stencil = stencil;\n\tthis.initStyles();\n};\n\n/**\n * Variable: dialect\n *\n * Holds the dialect in which the shape is to be painted.\n * This can be one of the DIALECT constants in <mxConstants>.\n */\nmxShape.prototype.dialect = null;\n\n/**\n * Variable: scale\n *\n * Holds the scale in which the shape is being painted.\n */\nmxShape.prototype.scale = 1;\n\n/**\n * Variable: antiAlias\n * \n * Rendering hint for configuring the canvas.\n */\nmxShape.prototype.antiAlias = true;\n\n/**\n * Variable: minSvgStrokeWidth\n * \n * Minimum stroke width for SVG output.\n */\nmxShape.prototype.minSvgStrokeWidth = 1;\n\n/**\n * Variable: bounds\n *\n * Holds the <mxRectangle> that specifies the bounds of this shape.\n */\nmxShape.prototype.bounds = null;\n\n/**\n * Variable: points\n *\n * Holds the array of <mxPoints> that specify the points of this shape.\n */\nmxShape.prototype.points = null;\n\n/**\n * Variable: node\n *\n * Holds the outermost DOM node that represents this shape.\n */\nmxShape.prototype.node = null;\n \n/**\n * Variable: state\n * \n * Optional reference to the corresponding <mxCellState>.\n */\nmxShape.prototype.state = null;\n\n/**\n * Variable: style\n *\n * Optional reference to the style of the corresponding <mxCellState>.\n */\nmxShape.prototype.style = null;\n\n/**\n * Variable: boundingBox\n *\n * Contains the bounding box of the shape, that is, the smallest rectangle\n * that includes all pixels of the shape.\n */\nmxShape.prototype.boundingBox = null;\n\n/**\n * Variable: stencil\n *\n * Holds the <mxStencil> that defines the shape.\n */\nmxShape.prototype.stencil = null;\n\n/**\n * Variable: svgStrokeTolerance\n *\n * Event-tolerance for SVG strokes (in px). Default is 8. This is only passed\n * to the canvas in <createSvgCanvas> if <pointerEvents> is true.\n */\nmxShape.prototype.svgStrokeTolerance = 8;\n\n/**\n * Variable: pointerEvents\n * \n * Specifies if pointer events should be handled. Default is true.\n */\nmxShape.prototype.pointerEvents = true;\n\n/**\n * Variable: svgPointerEvents\n * \n * Specifies if pointer events should be handled. Default is true.\n */\nmxShape.prototype.svgPointerEvents = 'all';\n\n/**\n * Variable: shapePointerEvents\n * \n * Specifies if pointer events outside of shape should be handled. Default\n * is false.\n */\nmxShape.prototype.shapePointerEvents = false;\n\n/**\n * Variable: stencilPointerEvents\n * \n * Specifies if pointer events outside of stencils should be handled. Default\n * is false. Set this to true for backwards compatibility with the 1.x branch.\n */\nmxShape.prototype.stencilPointerEvents = false;\n\n/**\n * Variable: vmlScale\n * \n * Scale for improving the precision of VML rendering. Default is 1.\n */\nmxShape.prototype.vmlScale = 1;\n\n/**\n * Variable: outline\n * \n * Specifies if the shape should be drawn as an outline. This disables all\n * fill colors and can be used to disable other drawing states that should\n * not be painted for outlines. Default is false. This should be set before\n * calling <apply>.\n */\nmxShape.prototype.outline = false;\n\n/**\n * Variable: visible\n * \n * Specifies if the shape is visible. Default is true.\n */\nmxShape.prototype.visible = true;\n\n/**\n * Variable: useSvgBoundingBox\n * \n * Allows to use the SVG bounding box in SVG. Default is false for performance\n * reasons.\n */\nmxShape.prototype.useSvgBoundingBox = false;\n\n/**\n * Function: init\n *\n * Initializes the shape by creaing the DOM node using <create>\n * and adding it into the given container.\n *\n * Parameters:\n *\n * container - DOM node that will contain the shape.\n */\nmxShape.prototype.init = function(container)\n{\n\tif (this.node == null)\n\t{\n\t\tthis.node = this.create(container);\n\t\t\n\t\tif (container != null)\n\t\t{\n\t\t\tcontainer.appendChild(this.node);\n\t\t}\n\t}\n};\n\n/**\n * Function: initStyles\n *\n * Sets the styles to their default values.\n */\nmxShape.prototype.initStyles = function(container)\n{\n\tthis.strokewidth = 1;\n\tthis.rotation = 0;\n\tthis.opacity = 100;\n\tthis.fillOpacity = 100;\n\tthis.strokeOpacity = 100;\n\tthis.flipH = false;\n\tthis.flipV = false;\n};\n\n/**\n * Function: isParseVml\n * \n * Specifies if any VML should be added via insertAdjacentHtml to the DOM. This\n * is only needed in IE8 and only if the shape contains VML markup. This method\n * returns true.\n */\nmxShape.prototype.isParseVml = function()\n{\n\treturn true;\n};\n\n/**\n * Function: isHtmlAllowed\n * \n * Returns true if HTML is allowed for this shape. This implementation always\n * returns false.\n */\nmxShape.prototype.isHtmlAllowed = function()\n{\n\treturn false;\n};\n\n/**\n * Function: getSvgScreenOffset\n * \n * Returns 0, or 0.5 if <strokewidth> % 2 == 1.\n */\nmxShape.prototype.getSvgScreenOffset = function()\n{\n\tvar sw = this.stencil && this.stencil.strokewidth != 'inherit' ? Number(this.stencil.strokewidth) : this.strokewidth;\n\t\n\treturn (mxUtils.mod(Math.max(1, Math.round(sw * this.scale)), 2) == 1) ? 0.5 : 0;\n};\n\n/**\n * Function: create\n *\n * Creates and returns the DOM node(s) for the shape in\n * the given container. This implementation invokes\n * <createSvg>, <createHtml> or <createVml> depending\n * on the <dialect> and style settings.\n *\n * Parameters:\n *\n * container - DOM node that will contain the shape.\n */\nmxShape.prototype.create = function(container)\n{\n\tvar node = null;\n\t\n\tif (container != null && container.ownerSVGElement != null)\n\t{\n\t\tnode = this.createSvg(container);\n\t}\n\telse if (document.documentMode == 8 || !mxClient.IS_VML ||\n\t\t(this.dialect != mxConstants.DIALECT_VML && this.isHtmlAllowed()))\n\t{\n\t\tnode = this.createHtml(container);\n\t}\n\telse\n\t{\n\t\tnode = this.createVml(container);\n\t}\n\t\n\treturn node;\n};\n\n/**\n * Function: createSvg\n *\n * Creates and returns the SVG node(s) to represent this shape.\n */\nmxShape.prototype.createSvg = function()\n{\n\treturn document.createElementNS(mxConstants.NS_SVG, 'g');\n};\n\n/**\n * Function: createVml\n *\n * Creates and returns the VML node to represent this shape.\n */\nmxShape.prototype.createVml = function()\n{\n\tvar node = document.createElement(mxClient.VML_PREFIX + ':group');\n\tnode.style.position = 'absolute';\n\t\n\treturn node;\n};\n\n/**\n * Function: createHtml\n *\n * Creates and returns the HTML DOM node(s) to represent\n * this shape. This implementation falls back to <createVml>\n * so that the HTML creation is optional.\n */\nmxShape.prototype.createHtml = function()\n{\n\tvar node = document.createElement('div');\n\tnode.style.position = 'absolute';\n\t\n\treturn node;\n};\n\n/**\n * Function: reconfigure\n *\n * Reconfigures this shape. This will update the colors etc in\n * addition to the bounds or points.\n */\nmxShape.prototype.reconfigure = function()\n{\n\tthis.redraw();\n};\n\n/**\n * Function: redraw\n *\n * Creates and returns the SVG node(s) to represent this shape.\n */\nmxShape.prototype.redraw = function()\n{\n\tthis.updateBoundsFromPoints();\n\t\n\tif (this.visible && this.checkBounds())\n\t{\n\t\tthis.node.style.visibility = 'visible';\n\t\tthis.clear();\n\t\t\n\t\tif (this.node.nodeName == 'DIV' && (this.isHtmlAllowed() || !mxClient.IS_VML))\n\t\t{\n\t\t\tthis.redrawHtmlShape();\n\t\t}\n\t\telse\n\t\t{\t\n\t\t\tthis.redrawShape();\n\t\t}\n\n\t\tthis.updateBoundingBox();\n\t}\n\telse\n\t{\n\t\tthis.node.style.visibility = 'hidden';\n\t\tthis.boundingBox = null;\n\t}\n};\n\n/**\n * Function: clear\n * \n * Removes all child nodes and resets all CSS.\n */\nmxShape.prototype.clear = function()\n{\n\tif (this.node.ownerSVGElement != null)\n\t{\n\t\twhile (this.node.lastChild != null)\n\t\t{\n\t\t\tthis.node.removeChild(this.node.lastChild);\n\t\t}\n\t}\n\telse\n\t{\n\t\tthis.node.style.cssText = 'position:absolute;' + ((this.cursor != null) ?\n\t\t\t('cursor:' + this.cursor + ';') : '');\n\t\tthis.node.innerHTML = '';\n\t}\n};\n\n/**\n * Function: updateBoundsFromPoints\n * \n * Updates the bounds based on the points.\n */\nmxShape.prototype.updateBoundsFromPoints = function()\n{\n\tvar pts = this.points;\n\t\n\tif (pts != null && pts.length > 0 && pts[0] != null)\n\t{\n\t\tthis.bounds = new mxRectangle(Number(pts[0].x), Number(pts[0].y), 1, 1);\n\t\t\n\t\tfor (var i = 1; i < this.points.length; i++)\n\t\t{\n\t\t\tif (pts[i] != null)\n\t\t\t{\n\t\t\t\tthis.bounds.add(new mxRectangle(Number(pts[i].x), Number(pts[i].y), 1, 1));\n\t\t\t}\n\t\t}\n\t}\n};\n\n/**\n * Function: getLabelBounds\n * \n * Returns the <mxRectangle> for the label bounds of this shape, based on the\n * given scaled and translated bounds of the shape. This method should not\n * change the rectangle in-place. This implementation returns the given rect.\n */\nmxShape.prototype.getLabelBounds = function(rect)\n{\n\tvar d = mxUtils.getValue(this.style, mxConstants.STYLE_DIRECTION, mxConstants.DIRECTION_EAST);\n\tvar bounds = rect;\n\t\n\t// Normalizes argument for getLabelMargins hook\n\tif (d != mxConstants.DIRECTION_SOUTH && d != mxConstants.DIRECTION_NORTH &&\n\t\tthis.state != null && this.state.text != null &&\n\t\tthis.state.text.isPaintBoundsInverted())\n\t{\n\t\tbounds = bounds.clone();\n\t\tvar tmp = bounds.width;\n\t\tbounds.width = bounds.height;\n\t\tbounds.height = tmp;\n\t}\n\t\t\n\tvar m = this.getLabelMargins(bounds);\n\t\n\tif (m != null)\n\t{\n\t\tvar flipH = mxUtils.getValue(this.style, mxConstants.STYLE_FLIPH, false) == '1';\n\t\tvar flipV = mxUtils.getValue(this.style, mxConstants.STYLE_FLIPV, false) == '1';\n\t\t\n\t\t// Handles special case for vertical labels\n\t\tif (this.state != null && this.state.text != null &&\n\t\t\tthis.state.text.isPaintBoundsInverted())\n\t\t{\n\t\t\tvar tmp = m.x;\n\t\t\tm.x = m.height;\n\t\t\tm.height = m.width;\n\t\t\tm.width = m.y;\n\t\t\tm.y = tmp;\n\n\t\t\ttmp = flipH;\n\t\t\tflipH = flipV;\n\t\t\tflipV = tmp;\n\t\t}\n\t\t\n\t\treturn mxUtils.getDirectedBounds(rect, m, this.style, flipH, flipV);\n\t}\n\t\n\treturn rect;\n};\n\n/**\n * Function: getLabelMargins\n * \n * Returns the scaled top, left, bottom and right margin to be used for\n * computing the label bounds as an <mxRectangle>, where the bottom and right\n * margin are defined in the width and height of the rectangle, respectively.\n */\nmxShape.prototype.getLabelMargins= function(rect)\n{\n\treturn null;\n};\n\n/**\n * Function: checkBounds\n * \n * Returns true if the bounds are not null and all of its variables are numeric.\n */\nmxShape.prototype.checkBounds = function()\n{\n\treturn (!isNaN(this.scale) && isFinite(this.scale) && this.scale > 0 &&\n\t\t\tthis.bounds != null && !isNaN(this.bounds.x) && !isNaN(this.bounds.y) &&\n\t\t\t!isNaN(this.bounds.width) && !isNaN(this.bounds.height) &&\n\t\t\tthis.bounds.width > 0 && this.bounds.height > 0);\n};\n\n/**\n * Function: createVmlGroup\n *\n * Returns the temporary element used for rendering in IE8 standards mode.\n */\nmxShape.prototype.createVmlGroup = function()\n{\n\tvar node = document.createElement(mxClient.VML_PREFIX + ':group');\n\tnode.style.position = 'absolute';\n\tnode.style.width = this.node.style.width;\n\tnode.style.height = this.node.style.height;\n\t\n\treturn node;\n};\n\n/**\n * Function: redrawShape\n *\n * Updates the SVG or VML shape.\n */\nmxShape.prototype.redrawShape = function()\n{\n\tvar canvas = this.createCanvas();\n\t\n\tif (canvas != null)\n\t{\n\t\t// Specifies if events should be handled\n\t\tcanvas.pointerEvents = this.pointerEvents;\n\t\n\t\tthis.paint(canvas);\n\t\n\t\tif (this.node != canvas.root)\n\t\t{\n\t\t\t// Forces parsing in IE8 standards mode - slow! avoid\n\t\t\tthis.node.insertAdjacentHTML('beforeend', canvas.root.outerHTML);\n\t\t}\n\t\n\t\tif (this.node.nodeName == 'DIV' && document.documentMode == 8)\n\t\t{\n\t\t\t// Makes DIV transparent to events for IE8 in IE8 standards\n\t\t\t// mode (Note: Does not work for IE9 in IE8 standards mode\n\t\t\t// and not for IE11 in enterprise mode)\n\t\t\tthis.node.style.filter = '';\n\t\t\t\n\t\t\t// Adds event transparency in IE8 standards\n\t\t\tmxUtils.addTransparentBackgroundFilter(this.node);\n\t\t}\n\t\t\n\t\tthis.destroyCanvas(canvas);\n\t}\n};\n\n/**\n * Function: createCanvas\n * \n * Creates a new canvas for drawing this shape. May return null.\n */\nmxShape.prototype.createCanvas = function()\n{\n\tvar canvas = null;\n\t\n\t// LATER: Check if reusing existing DOM nodes improves performance\n\tif (this.node.ownerSVGElement != null)\n\t{\n\t\tcanvas = this.createSvgCanvas();\n\t}\n\telse if (mxClient.IS_VML)\n\t{\n\t\tthis.updateVmlContainer();\n\t\tcanvas = this.createVmlCanvas();\n\t}\n\t\n\tif (canvas != null && this.outline)\n\t{\n\t\tcanvas.setStrokeWidth(this.strokewidth);\n\t\tcanvas.setStrokeColor(this.stroke);\n\t\t\n\t\tif (this.isDashed != null)\n\t\t{\n\t\t\tcanvas.setDashed(this.isDashed);\n\t\t}\n\t\t\n\t\tcanvas.setStrokeWidth = function() {};\n\t\tcanvas.setStrokeColor = function() {};\n\t\tcanvas.setFillColor = function() {};\n\t\tcanvas.setGradient = function() {};\n\t\tcanvas.setDashed = function() {};\n\t\tcanvas.text = function() {};\n\t}\n\n\treturn canvas;\n};\n\n/**\n * Function: createSvgCanvas\n * \n * Creates and returns an <mxSvgCanvas2D> for rendering this shape.\n */\nmxShape.prototype.createSvgCanvas = function()\n{\n\tvar canvas = new mxSvgCanvas2D(this.node, false);\n\tcanvas.strokeTolerance = (this.pointerEvents) ? this.svgStrokeTolerance : 0;\n\tcanvas.pointerEventsValue = this.svgPointerEvents;\n\tcanvas.blockImagePointerEvents = mxClient.IS_FF;\n\tvar off = this.getSvgScreenOffset();\n\n\tif (off != 0)\n\t{\n\t\tthis.node.setAttribute('transform', 'translate(' + off + ',' + off + ')');\n\t}\n\telse\n\t{\n\t\tthis.node.removeAttribute('transform');\n\t}\n\n\tcanvas.minStrokeWidth = this.minSvgStrokeWidth;\n\t\n\tif (!this.antiAlias)\n\t{\n\t\t// Rounds all numbers in the SVG output to integers\n\t\tcanvas.format = function(value)\n\t\t{\n\t\t\treturn Math.round(parseFloat(value));\n\t\t};\n\t}\n\t\n\treturn canvas;\n};\n\n/**\n * Function: createVmlCanvas\n * \n * Creates and returns an <mxVmlCanvas2D> for rendering this shape.\n */\nmxShape.prototype.createVmlCanvas = function()\n{\n\t// Workaround for VML rendering bug in IE8 standards mode\n\tvar node = (document.documentMode == 8 && this.isParseVml()) ? this.createVmlGroup() : this.node;\n\tvar canvas = new mxVmlCanvas2D(node, false);\n\t\n\tif (node.tagUrn != '')\n\t{\n\t\tvar w = Math.max(1, Math.round(this.bounds.width));\n\t\tvar h = Math.max(1, Math.round(this.bounds.height));\n\t\tnode.coordsize = (w * this.vmlScale) + ',' + (h * this.vmlScale);\n\t\tcanvas.scale(this.vmlScale);\n\t\tcanvas.vmlScale = this.vmlScale;\n\t}\n\n\t// Painting relative to top, left shape corner\n\tvar s = this.scale;\n\tcanvas.translate(-Math.round(this.bounds.x / s), -Math.round(this.bounds.y / s));\n\t\n\treturn canvas;\n};\n\n/**\n * Function: updateVmlContainer\n * \n * Updates the bounds of the VML container.\n */\nmxShape.prototype.updateVmlContainer = function()\n{\n\tthis.node.style.left = Math.round(this.bounds.x) + 'px';\n\tthis.node.style.top = Math.round(this.bounds.y) + 'px';\n\tvar w = Math.max(1, Math.round(this.bounds.width));\n\tvar h = Math.max(1, Math.round(this.bounds.height));\n\tthis.node.style.width = w + 'px';\n\tthis.node.style.height = h + 'px';\n\tthis.node.style.overflow = 'visible';\n};\n\n/**\n * Function: redrawHtml\n *\n * Allow optimization by replacing VML with HTML.\n */\nmxShape.prototype.redrawHtmlShape = function()\n{\n\t// LATER: Refactor methods\n\tthis.updateHtmlBounds(this.node);\n\tthis.updateHtmlFilters(this.node);\n\tthis.updateHtmlColors(this.node);\n};\n\n/**\n * Function: updateHtmlFilters\n *\n * Allow optimization by replacing VML with HTML.\n */\nmxShape.prototype.updateHtmlFilters = function(node)\n{\n\tvar f = '';\n\t\n\tif (this.opacity < 100)\n\t{\n\t\tf += 'alpha(opacity=' + (this.opacity) + ')';\n\t}\n\t\n\tif (this.isShadow)\n\t{\n\t\t// FIXME: Cannot implement shadow transparency with filter\n\t\tf += 'progid:DXImageTransform.Microsoft.dropShadow (' +\n\t\t\t'OffX=\\'' + Math.round(mxConstants.SHADOW_OFFSET_X * this.scale) + '\\', ' +\n\t\t\t'OffY=\\'' + Math.round(mxConstants.SHADOW_OFFSET_Y * this.scale) + '\\', ' +\n\t\t\t'Color=\\'' + mxConstants.VML_SHADOWCOLOR + '\\')';\n\t}\n\t\n\tif (this.fill != null && this.fill != mxConstants.NONE && this.gradient && this.gradient != mxConstants.NONE)\n\t{\n\t\tvar start = this.fill;\n\t\tvar end = this.gradient;\n\t\tvar type = '0';\n\t\t\n\t\tvar lookup = {east:0,south:1,west:2,north:3};\n\t\tvar dir = (this.direction != null) ? lookup[this.direction] : 0;\n\t\t\n\t\tif (this.gradientDirection != null)\n\t\t{\n\t\t\tdir = mxUtils.mod(dir + lookup[this.gradientDirection] - 1, 4);\n\t\t}\n\n\t\tif (dir == 1)\n\t\t{\n\t\t\ttype = '1';\n\t\t\tvar tmp = start;\n\t\t\tstart = end;\n\t\t\tend = tmp;\n\t\t}\n\t\telse if (dir == 2)\n\t\t{\n\t\t\tvar tmp = start;\n\t\t\tstart = end;\n\t\t\tend = tmp;\n\t\t}\n\t\telse if (dir == 3)\n\t\t{\n\t\t\ttype = '1';\n\t\t}\n\t\t\n\t\tf += 'progid:DXImageTransform.Microsoft.gradient(' +\n\t\t\t'startColorStr=\\'' + start + '\\', endColorStr=\\'' + end +\n\t\t\t'\\', gradientType=\\'' + type + '\\')';\n\t}\n\n\tnode.style.filter = f;\n};\n\n/**\n * Function: mixedModeHtml\n *\n * Allow optimization by replacing VML with HTML.\n */\nmxShape.prototype.updateHtmlColors = function(node)\n{\n\tvar color = this.stroke;\n\t\n\tif (color != null && color != mxConstants.NONE)\n\t{\n\t\tnode.style.borderColor = color;\n\n\t\tif (this.isDashed)\n\t\t{\n\t\t\tnode.style.borderStyle = 'dashed';\n\t\t}\n\t\telse if (this.strokewidth > 0)\n\t\t{\n\t\t\tnode.style.borderStyle = 'solid';\n\t\t}\n\n\t\tnode.style.borderWidth = Math.max(1, Math.ceil(this.strokewidth * this.scale)) + 'px';\n\t}\n\telse\n\t{\n\t\tnode.style.borderWidth = '0px';\n\t}\n\n\tcolor = (this.outline) ? null : this.fill;\n\t\n\tif (color != null && color != mxConstants.NONE)\n\t{\n\t\tnode.style.backgroundColor = color;\n\t\tnode.style.backgroundImage = 'none';\n\t}\n\telse if (this.pointerEvents)\n\t{\n\t\t node.style.backgroundColor = 'transparent';\n\t}\n\telse if (document.documentMode == 8)\n\t{\n\t\tmxUtils.addTransparentBackgroundFilter(node);\n\t}\n\telse\n\t{\n\t\tthis.setTransparentBackgroundImage(node);\n\t}\n};\n\n/**\n * Function: mixedModeHtml\n *\n * Allow optimization by replacing VML with HTML.\n */\nmxShape.prototype.updateHtmlBounds = function(node)\n{\n\tvar sw = (document.documentMode >= 9) ? 0 : Math.ceil(this.strokewidth * this.scale);\n\tnode.style.borderWidth = Math.max(1, sw) + 'px';\n\tnode.style.overflow = 'hidden';\n\t\n\tnode.style.left = Math.round(this.bounds.x - sw / 2) + 'px';\n\tnode.style.top = Math.round(this.bounds.y - sw / 2) + 'px';\n\n\tif (document.compatMode == 'CSS1Compat')\n\t{\n\t\tsw = -sw;\n\t}\n\t\n\tnode.style.width = Math.round(Math.max(0, this.bounds.width + sw)) + 'px';\n\tnode.style.height = Math.round(Math.max(0, this.bounds.height + sw)) + 'px';\n};\n\n/**\n * Function: destroyCanvas\n * \n * Destroys the given canvas which was used for drawing. This implementation\n * increments the reference counts on all shared gradients used in the canvas.\n */\nmxShape.prototype.destroyCanvas = function(canvas)\n{\n\t// Manages reference counts\n\tif (canvas instanceof mxSvgCanvas2D)\n\t{\n\t\t// Increments ref counts\n\t\tfor (var key in canvas.gradients)\n\t\t{\n\t\t\tvar gradient = canvas.gradients[key];\n\t\t\t\n\t\t\tif (gradient != null)\n\t\t\t{\n\t\t\t\tgradient.mxRefCount = (gradient.mxRefCount || 0) + 1;\n\t\t\t}\n\t\t}\n\t\t\n\t\tthis.releaseSvgGradients(this.oldGradients);\n\t\tthis.oldGradients = canvas.gradients;\n\t}\n};\n\n/**\n * Function: paint\n * \n * Generic rendering code.\n */\nmxShape.prototype.paint = function(c)\n{\n\tvar strokeDrawn = false;\n\t\n\tif (c != null && this.outline)\n\t{\n\t\tvar stroke = c.stroke;\n\t\t\n\t\tc.stroke = function()\n\t\t{\n\t\t\tstrokeDrawn = true;\n\t\t\tstroke.apply(this, arguments);\n\t\t};\n\n\t\tvar fillAndStroke = c.fillAndStroke;\n\t\t\n\t\tc.fillAndStroke = function()\n\t\t{\n\t\t\tstrokeDrawn = true;\n\t\t\tfillAndStroke.apply(this, arguments);\n\t\t};\n\t}\n\n\t// Scale is passed-through to canvas\n\tvar s = this.scale;\n\tvar x = this.bounds.x / s;\n\tvar y = this.bounds.y / s;\n\tvar w = this.bounds.width / s;\n\tvar h = this.bounds.height / s;\n\n\tif (this.isPaintBoundsInverted())\n\t{\n\t\tvar t = (w - h) / 2;\n\t\tx += t;\n\t\ty -= t;\n\t\tvar tmp = w;\n\t\tw = h;\n\t\th = tmp;\n\t}\n\t\n\tthis.updateTransform(c, x, y, w, h);\n\tthis.configureCanvas(c, x, y, w, h);\n\n\t// Adds background rectangle to capture events\n\tvar bg = null;\n\t\n\tif ((this.stencil == null && this.points == null && this.shapePointerEvents) ||\n\t\t(this.stencil != null && this.stencilPointerEvents))\n\t{\n\t\tvar bb = this.createBoundingBox();\n\t\t\n\t\tif (this.dialect == mxConstants.DIALECT_SVG)\n\t\t{\n\t\t\tbg = this.createTransparentSvgRectangle(bb.x, bb.y, bb.width, bb.height);\n\t\t\tthis.node.appendChild(bg);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tvar rect = c.createRect('rect', bb.x / s, bb.y / s, bb.width / s, bb.height / s);\n\t\t\trect.appendChild(c.createTransparentFill());\n\t\t\trect.stroked = 'false';\n\t\t\tc.root.appendChild(rect);\n\t\t}\n\t}\n\n\tif (this.stencil != null)\n\t{\n\t\tthis.stencil.drawShape(c, this, x, y, w, h);\n\t}\n\telse\n\t{\n\t\t// Stencils have separate strokewidth\n\t\tc.setStrokeWidth(this.strokewidth);\n\t\t\n\t\tif (this.points != null)\n\t\t{\n\t\t\t// Paints edge shape\n\t\t\tvar pts = [];\n\t\t\t\n\t\t\tfor (var i = 0; i < this.points.length; i++)\n\t\t\t{\n\t\t\t\tif (this.points[i] != null)\n\t\t\t\t{\n\t\t\t\t\tpts.push(new mxPoint(this.points[i].x / s, this.points[i].y / s));\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tthis.paintEdgeShape(c, pts);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Paints vertex shape\n\t\t\tthis.paintVertexShape(c, x, y, w, h);\n\t\t}\n\t}\n\t\n\tif (bg != null && c.state != null && c.state.transform != null)\n\t{\n\t\tbg.setAttribute('transform', c.state.transform);\n\t}\n\t\n\t// Draws highlight rectangle if no stroke was used\n\tif (c != null && this.outline && !strokeDrawn)\n\t{\n\t\tc.rect(x, y, w, h);\n\t\tc.stroke();\n\t}\n};\n\n/**\n * Function: configureCanvas\n * \n * Sets the state of the canvas for drawing the shape.\n */\nmxShape.prototype.configureCanvas = function(c, x, y, w, h)\n{\n\tvar dash = null;\n\t\n\tif (this.style != null)\n\t{\n\t\tdash = this.style['dashPattern'];\t\t\n\t}\n\n\tc.setAlpha(this.opacity / 100);\n\tc.setFillAlpha(this.fillOpacity / 100);\n\tc.setStrokeAlpha(this.strokeOpacity / 100);\n\n\t// Sets alpha, colors and gradients\n\tif (this.isShadow != null)\n\t{\n\t\tc.setShadow(this.isShadow);\n\t}\n\t\n\t// Dash pattern\n\tif (this.isDashed != null)\n\t{\n\t\tc.setDashed(this.isDashed, (this.style != null) ?\n\t\t\tmxUtils.getValue(this.style, mxConstants.STYLE_FIX_DASH, false) == 1 : false);\n\t}\n\n\tif (dash != null)\n\t{\n\t\tc.setDashPattern(dash);\n\t}\n\n\tif (this.fill != null && this.fill != mxConstants.NONE && this.gradient && this.gradient != mxConstants.NONE)\n\t{\n\t\tvar b = this.getGradientBounds(c, x, y, w, h);\n\t\tc.setGradient(this.fill, this.gradient, b.x, b.y, b.width, b.height, this.gradientDirection);\n\t}\n\telse\n\t{\n\t\tc.setFillColor(this.fill);\n\t}\n\n\tc.setStrokeColor(this.stroke);\n};\n\n/**\n * Function: getGradientBounds\n * \n * Returns the bounding box for the gradient box for this shape.\n */\nmxShape.prototype.getGradientBounds = function(c, x, y, w, h)\n{\n\treturn new mxRectangle(x, y, w, h);\n};\n\n/**\n * Function: updateTransform\n * \n * Sets the scale and rotation on the given canvas.\n */\nmxShape.prototype.updateTransform = function(c, x, y, w, h)\n{\n\t// NOTE: Currently, scale is implemented in state and canvas. This will\n\t// move to canvas in a later version, so that the states are unscaled\n\t// and untranslated and do not need an update after zooming or panning.\n\tc.scale(this.scale);\n\tc.rotate(this.getShapeRotation(), this.flipH, this.flipV, x + w / 2, y + h / 2);\n};\n\n/**\n * Function: paintVertexShape\n * \n * Paints the vertex shape.\n */\nmxShape.prototype.paintVertexShape = function(c, x, y, w, h)\n{\n\tthis.paintBackground(c, x, y, w, h);\n\t\n\tif (!this.outline || this.style == null || mxUtils.getValue(\n\t\tthis.style, mxConstants.STYLE_BACKGROUND_OUTLINE, 0) == 0)\n\t{\n\t\tc.setShadow(false);\n\t\tthis.paintForeground(c, x, y, w, h);\n\t}\n};\n\n/**\n * Function: paintBackground\n * \n * Hook for subclassers. This implementation is empty.\n */\nmxShape.prototype.paintBackground = function(c, x, y, w, h) { };\n\n/**\n * Function: paintForeground\n * \n * Hook for subclassers. This implementation is empty.\n */\nmxShape.prototype.paintForeground = function(c, x, y, w, h) { };\n\n/**\n * Function: paintEdgeShape\n * \n * Hook for subclassers. This implementation is empty.\n */\nmxShape.prototype.paintEdgeShape = function(c, pts) { };\n\n/**\n * Function: getArcSize\n * \n * Returns the arc size for the given dimension.\n */\nmxShape.prototype.getArcSize = function(w, h)\n{\n\tvar r = 0;\n\t\n\tif (mxUtils.getValue(this.style, mxConstants.STYLE_ABSOLUTE_ARCSIZE, 0) == '1')\n\t{\n\t\tr = Math.min(w / 2, Math.min(h / 2, mxUtils.getValue(this.style,\n\t\t\tmxConstants.STYLE_ARCSIZE, mxConstants.LINE_ARCSIZE) / 2));\n\t}\n\telse\n\t{\n\t\tvar f = mxUtils.getValue(this.style, mxConstants.STYLE_ARCSIZE,\n\t\t\tmxConstants.RECTANGLE_ROUNDING_FACTOR * 100) / 100;\n\t\tr = Math.min(w * f, h * f);\n\t}\n\t\n\treturn r;\n};\n\n/**\n * Function: paintGlassEffect\n * \n * Paints the glass gradient effect.\n */\nmxShape.prototype.paintGlassEffect = function(c, x, y, w, h, arc)\n{\n\tvar sw = Math.ceil(this.strokewidth / 2);\n\tvar size = 0.4;\n\t\n\tc.setGradient('#ffffff', '#ffffff', x, y, w, h * 0.6, 'south', 0.9, 0.1);\n\tc.begin();\n\tarc += 2 * sw;\n\t\t\n\tif (this.isRounded)\n\t{\n\t\tc.moveTo(x - sw + arc, y - sw);\n\t\tc.quadTo(x - sw, y - sw, x - sw, y - sw + arc);\n\t\tc.lineTo(x - sw, y + h * size);\n\t\tc.quadTo(x + w * 0.5, y + h * 0.7, x + w + sw, y + h * size);\n\t\tc.lineTo(x + w + sw, y - sw + arc);\n\t\tc.quadTo(x + w + sw, y - sw, x + w + sw - arc, y - sw);\n\t}\n\telse\n\t{\n\t\tc.moveTo(x - sw, y - sw);\n\t\tc.lineTo(x - sw, y + h * size);\n\t\tc.quadTo(x + w * 0.5, y + h * 0.7, x + w + sw, y + h * size);\n\t\tc.lineTo(x + w + sw, y - sw);\n\t}\n\t\n\tc.close();\n\tc.fill();\n};\n\n/**\n * Function: addPoints\n * \n * Paints the given points with rounded corners.\n */\nmxShape.prototype.addPoints = function(c, pts, rounded, arcSize, close, exclude, initialMove)\n{\n\tif (pts != null && pts.length > 0)\n\t{\n\t\tinitialMove = (initialMove != null) ? initialMove : true;\n\t\tvar pe = pts[pts.length - 1];\n\t\t\n\t\t// Adds virtual waypoint in the center between start and end point\n\t\tif (close && rounded)\n\t\t{\n\t\t\tpts = pts.slice();\n\t\t\tvar p0 = pts[0];\n\t\t\tvar wp = new mxPoint(pe.x + (p0.x - pe.x) / 2, pe.y + (p0.y - pe.y) / 2);\n\t\t\tpts.splice(0, 0, wp);\n\t\t}\n\t\n\t\tvar pt = pts[0];\n\t\tvar i = 1;\n\t\n\t\t// Draws the line segments\n\t\tif (initialMove)\n\t\t{\n\t\t\tc.moveTo(pt.x, pt.y);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tc.lineTo(pt.x, pt.y);\n\t\t}\n\t\t\n\t\twhile (i < ((close) ? pts.length : pts.length - 1))\n\t\t{\n\t\t\tvar tmp = pts[mxUtils.mod(i, pts.length)];\n\t\t\tvar dx = pt.x - tmp.x;\n\t\t\tvar dy = pt.y - tmp.y;\n\t\n\t\t\tif (rounded && (dx != 0 || dy != 0) && (exclude == null || mxUtils.indexOf(exclude, i - 1) < 0))\n\t\t\t{\n\t\t\t\t// Draws a line from the last point to the current\n\t\t\t\t// point with a spacing of size off the current point\n\t\t\t\t// into direction of the last point\n\t\t\t\tvar dist = Math.sqrt(dx * dx + dy * dy);\n\t\t\t\tvar nx1 = dx * Math.min(arcSize, dist / 2) / dist;\n\t\t\t\tvar ny1 = dy * Math.min(arcSize, dist / 2) / dist;\n\t\n\t\t\t\tvar x1 = tmp.x + nx1;\n\t\t\t\tvar y1 = tmp.y + ny1;\n\t\t\t\tc.lineTo(x1, y1);\n\t\n\t\t\t\t// Draws a curve from the last point to the current\n\t\t\t\t// point with a spacing of size off the current point\n\t\t\t\t// into direction of the next point\n\t\t\t\tvar next = pts[mxUtils.mod(i + 1, pts.length)];\n\t\t\t\t\n\t\t\t\t// Uses next non-overlapping point\n\t\t\t\twhile (i < pts.length - 2 && Math.round(next.x - tmp.x) == 0 && Math.round(next.y - tmp.y) == 0)\n\t\t\t\t{\n\t\t\t\t\tnext = pts[mxUtils.mod(i + 2, pts.length)];\n\t\t\t\t\ti++;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tdx = next.x - tmp.x;\n\t\t\t\tdy = next.y - tmp.y;\n\t\n\t\t\t\tdist = Math.max(1, Math.sqrt(dx * dx + dy * dy));\n\t\t\t\tvar nx2 = dx * Math.min(arcSize, dist / 2) / dist;\n\t\t\t\tvar ny2 = dy * Math.min(arcSize, dist / 2) / dist;\n\t\n\t\t\t\tvar x2 = tmp.x + nx2;\n\t\t\t\tvar y2 = tmp.y + ny2;\n\t\n\t\t\t\tc.quadTo(tmp.x, tmp.y, x2, y2);\n\t\t\t\ttmp = new mxPoint(x2, y2);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tc.lineTo(tmp.x, tmp.y);\n\t\t\t}\n\t\n\t\t\tpt = tmp;\n\t\t\ti++;\n\t\t}\n\t\n\t\tif (close)\n\t\t{\n\t\t\tc.close();\n\t\t}\n\t\telse\n\t\t{\n\t\t\tc.lineTo(pe.x, pe.y);\n\t\t}\n\t}\n};\n\n/**\n * Function: resetStyles\n * \n * Resets all styles.\n */\nmxShape.prototype.resetStyles = function()\n{\n\tthis.initStyles();\n\n\tthis.spacing = 0;\n\t\n\tdelete this.fill;\n\tdelete this.gradient;\n\tdelete this.gradientDirection;\n\tdelete this.stroke;\n\tdelete this.startSize;\n\tdelete this.endSize;\n\tdelete this.startArrow;\n\tdelete this.endArrow;\n\tdelete this.direction;\n\tdelete this.isShadow;\n\tdelete this.isDashed;\n\tdelete this.isRounded;\n\tdelete this.glass;\n};\n\n/**\n * Function: apply\n * \n * Applies the style of the given <mxCellState> to the shape. This\n * implementation assigns the following styles to local fields:\n * \n * - <mxConstants.STYLE_FILLCOLOR> => fill\n * - <mxConstants.STYLE_GRADIENTCOLOR> => gradient\n * - <mxConstants.STYLE_GRADIENT_DIRECTION> => gradientDirection\n * - <mxConstants.STYLE_OPACITY> => opacity\n * - <mxConstants.STYLE_FILL_OPACITY> => fillOpacity\n * - <mxConstants.STYLE_STROKE_OPACITY> => strokeOpacity\n * - <mxConstants.STYLE_STROKECOLOR> => stroke\n * - <mxConstants.STYLE_STROKEWIDTH> => strokewidth\n * - <mxConstants.STYLE_SHADOW> => isShadow\n * - <mxConstants.STYLE_DASHED> => isDashed\n * - <mxConstants.STYLE_SPACING> => spacing\n * - <mxConstants.STYLE_STARTSIZE> => startSize\n * - <mxConstants.STYLE_ENDSIZE> => endSize\n * - <mxConstants.STYLE_ROUNDED> => isRounded\n * - <mxConstants.STYLE_STARTARROW> => startArrow\n * - <mxConstants.STYLE_ENDARROW> => endArrow\n * - <mxConstants.STYLE_ROTATION> => rotation\n * - <mxConstants.STYLE_DIRECTION> => direction\n * - <mxConstants.STYLE_GLASS> => glass\n *\n * This keeps a reference to the <style>. If you need to keep a reference to\n * the cell, you can override this method and store a local reference to\n * state.cell or the <mxCellState> itself. If <outline> should be true, make\n * sure to set it before calling this method.\n *\n * Parameters:\n *\n * state - <mxCellState> of the corresponding cell.\n */\nmxShape.prototype.apply = function(state)\n{\n\tthis.state = state;\n\tthis.style = state.style;\n\n\tif (this.style != null)\n\t{\n\t\tthis.fill = mxUtils.getValue(this.style, mxConstants.STYLE_FILLCOLOR, this.fill);\n\t\tthis.gradient = mxUtils.getValue(this.style, mxConstants.STYLE_GRADIENTCOLOR, this.gradient);\n\t\tthis.gradientDirection = mxUtils.getValue(this.style, mxConstants.STYLE_GRADIENT_DIRECTION, this.gradientDirection);\n\t\tthis.opacity = mxUtils.getValue(this.style, mxConstants.STYLE_OPACITY, this.opacity);\n\t\tthis.fillOpacity = mxUtils.getValue(this.style, mxConstants.STYLE_FILL_OPACITY, this.fillOpacity);\n\t\tthis.strokeOpacity = mxUtils.getValue(this.style, mxConstants.STYLE_STROKE_OPACITY, this.strokeOpacity);\n\t\tthis.stroke = mxUtils.getValue(this.style, mxConstants.STYLE_STROKECOLOR, this.stroke);\n\t\tthis.strokewidth = mxUtils.getNumber(this.style, mxConstants.STYLE_STROKEWIDTH, this.strokewidth);\n\t\tthis.spacing = mxUtils.getValue(this.style, mxConstants.STYLE_SPACING, this.spacing);\n\t\tthis.startSize = mxUtils.getNumber(this.style, mxConstants.STYLE_STARTSIZE, this.startSize);\n\t\tthis.endSize = mxUtils.getNumber(this.style, mxConstants.STYLE_ENDSIZE, this.endSize);\n\t\tthis.startArrow = mxUtils.getValue(this.style, mxConstants.STYLE_STARTARROW, this.startArrow);\n\t\tthis.endArrow = mxUtils.getValue(this.style, mxConstants.STYLE_ENDARROW, this.endArrow);\n\t\tthis.rotation = mxUtils.getValue(this.style, mxConstants.STYLE_ROTATION, this.rotation);\n\t\tthis.direction = mxUtils.getValue(this.style, mxConstants.STYLE_DIRECTION, this.direction);\n\t\tthis.flipH = mxUtils.getValue(this.style, mxConstants.STYLE_FLIPH, 0) == 1;\n\t\tthis.flipV = mxUtils.getValue(this.style, mxConstants.STYLE_FLIPV, 0) == 1;\t\n\t\t\n\t\t// Legacy support for stencilFlipH/V\n\t\tif (this.stencil != null)\n\t\t{\n\t\t\tthis.flipH = mxUtils.getValue(this.style, 'stencilFlipH', 0) == 1 || this.flipH;\n\t\t\tthis.flipV = mxUtils.getValue(this.style, 'stencilFlipV', 0) == 1 || this.flipV;\n\t\t}\n\t\t\n\t\tif (this.direction == mxConstants.DIRECTION_NORTH || this.direction == mxConstants.DIRECTION_SOUTH)\n\t\t{\n\t\t\tvar tmp = this.flipH;\n\t\t\tthis.flipH = this.flipV;\n\t\t\tthis.flipV = tmp;\n\t\t}\n\n\t\tthis.isShadow = mxUtils.getValue(this.style, mxConstants.STYLE_SHADOW, this.isShadow) == 1;\n\t\tthis.isDashed = mxUtils.getValue(this.style, mxConstants.STYLE_DASHED, this.isDashed) == 1;\n\t\tthis.isRounded = mxUtils.getValue(this.style, mxConstants.STYLE_ROUNDED, this.isRounded) == 1;\n\t\tthis.glass = mxUtils.getValue(this.style, mxConstants.STYLE_GLASS, this.glass) == 1;\n\t\t\n\t\tif (this.fill == mxConstants.NONE)\n\t\t{\n\t\t\tthis.fill = null;\n\t\t}\n\n\t\tif (this.gradient == mxConstants.NONE)\n\t\t{\n\t\t\tthis.gradient = null;\n\t\t}\n\n\t\tif (this.stroke == mxConstants.NONE)\n\t\t{\n\t\t\tthis.stroke = null;\n\t\t}\n\t}\n};\n\n/**\n * Function: setCursor\n * \n * Sets the cursor on the given shape.\n *\n * Parameters:\n *\n * cursor - The cursor to be used.\n */\nmxShape.prototype.setCursor = function(cursor)\n{\n\tif (cursor == null)\n\t{\n\t\tcursor = '';\n\t}\n\t\n\tthis.cursor = cursor;\n\n\tif (this.node != null)\n\t{\n\t\tthis.node.style.cursor = cursor;\n\t}\n};\n\n/**\n * Function: getCursor\n * \n * Returns the current cursor.\n */\nmxShape.prototype.getCursor = function()\n{\n\treturn this.cursor;\n};\n\n/**\n * Function: isRoundable\n * \n * Hook for subclassers.\n */\nmxShape.prototype.isRoundable = function()\n{\n\treturn false;\n};\n\n/**\n * Function: updateBoundingBox\n *\n * Updates the <boundingBox> for this shape using <createBoundingBox> and\n * <augmentBoundingBox> and stores the result in <boundingBox>.\n */\nmxShape.prototype.updateBoundingBox = function()\n{\n\t// Tries to get bounding box from SVG subsystem\n\t// LATER: Use getBoundingClientRect for fallback in VML\n\tif (this.useSvgBoundingBox && this.node != null && this.node.ownerSVGElement != null)\n\t{\n\t\ttry\n\t\t{\n\t\t\tvar b = this.node.getBBox();\n\t\n\t\t\tif (b.width > 0 && b.height > 0)\n\t\t\t{\n\t\t\t\tthis.boundingBox = new mxRectangle(b.x, b.y, b.width, b.height);\n\t\t\t\t\n\t\t\t\t// Adds strokeWidth\n\t\t\t\tthis.boundingBox.grow(this.strokewidth * this.scale / 2);\n\t\t\t\t\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tcatch(e)\n\t\t{\n\t\t\t// fallback to code below\n\t\t}\n\t}\n\n\tif (this.bounds != null)\n\t{\n\t\tvar bbox = this.createBoundingBox();\n\t\t\n\t\tif (bbox != null)\n\t\t{\n\t\t\tthis.augmentBoundingBox(bbox);\n\t\t\tvar rot = this.getShapeRotation();\n\t\t\t\n\t\t\tif (rot != 0)\n\t\t\t{\n\t\t\t\tbbox = mxUtils.getBoundingBox(bbox, rot);\n\t\t\t}\n\t\t}\n\n\t\tthis.boundingBox = bbox;\n\t}\n};\n\n/**\n * Function: createBoundingBox\n *\n * Returns a new rectangle that represents the bounding box of the bare shape\n * with no shadows or strokewidths.\n */\nmxShape.prototype.createBoundingBox = function()\n{\n\tvar bb = this.bounds.clone();\n\n\tif ((this.stencil != null && (this.direction == mxConstants.DIRECTION_NORTH ||\n\t\tthis.direction == mxConstants.DIRECTION_SOUTH)) || this.isPaintBoundsInverted())\n\t{\n\t\tbb.rotate90();\n\t}\n\t\n\treturn bb;\n};\n\n/**\n * Function: augmentBoundingBox\n *\n * Augments the bounding box with the strokewidth and shadow offsets.\n */\nmxShape.prototype.augmentBoundingBox = function(bbox)\n{\n\tif (this.isShadow)\n\t{\n\t\tbbox.width += Math.ceil(mxConstants.SHADOW_OFFSET_X * this.scale);\n\t\tbbox.height += Math.ceil(mxConstants.SHADOW_OFFSET_Y * this.scale);\n\t}\n\t\n\t// Adds strokeWidth\n\tbbox.grow(this.strokewidth * this.scale / 2);\n};\n\n/**\n * Function: isPaintBoundsInverted\n * \n * Returns true if the bounds should be inverted.\n */\nmxShape.prototype.isPaintBoundsInverted = function()\n{\n\t// Stencil implements inversion via aspect\n\treturn this.stencil == null && (this.direction == mxConstants.DIRECTION_NORTH ||\n\t\t\tthis.direction == mxConstants.DIRECTION_SOUTH);\n};\n\n/**\n * Function: getRotation\n * \n * Returns the rotation from the style.\n */\nmxShape.prototype.getRotation = function()\n{\n\treturn (this.rotation != null) ? this.rotation : 0;\n};\n\n/**\n * Function: getTextRotation\n * \n * Returns the rotation for the text label.\n */\nmxShape.prototype.getTextRotation = function()\n{\n\tvar rot = this.getRotation();\n\t\n\tif (mxUtils.getValue(this.style, mxConstants.STYLE_HORIZONTAL, 1) != 1)\n\t{\n\t\trot += mxText.prototype.verticalTextRotation;\n\t}\n\t\n\treturn rot;\n};\n\n/**\n * Function: getShapeRotation\n * \n * Returns the actual rotation of the shape.\n */\nmxShape.prototype.getShapeRotation = function()\n{\n\tvar rot = this.getRotation();\n\t\n\tif (this.direction != null)\n\t{\n\t\tif (this.direction == mxConstants.DIRECTION_NORTH)\n\t\t{\n\t\t\trot += 270;\n\t\t}\n\t\telse if (this.direction == mxConstants.DIRECTION_WEST)\n\t\t{\n\t\t\trot += 180;\n\t\t}\n\t\telse if (this.direction == mxConstants.DIRECTION_SOUTH)\n\t\t{\n\t\t\trot += 90;\n\t\t}\n\t}\n\t\n\treturn rot;\n};\n\n/**\n * Function: createTransparentSvgRectangle\n * \n * Adds a transparent rectangle that catches all events.\n */\nmxShape.prototype.createTransparentSvgRectangle = function(x, y, w, h)\n{\n\tvar rect = document.createElementNS(mxConstants.NS_SVG, 'rect');\n\trect.setAttribute('x', x);\n\trect.setAttribute('y', y);\n\trect.setAttribute('width', w);\n\trect.setAttribute('height', h);\n\trect.setAttribute('fill', 'none');\n\trect.setAttribute('stroke', 'none');\n\trect.setAttribute('pointer-events', 'all');\n\t\n\treturn rect;\n};\n\n/**\n * Function: setTransparentBackgroundImage\n * \n * Sets a transparent background CSS style to catch all events.\n * \n * Paints the line shape.\n */\nmxShape.prototype.setTransparentBackgroundImage = function(node)\n{\n\tnode.style.backgroundImage = 'url(\\'' + mxClient.imageBasePath + '/transparent.gif\\')';\n};\n\n/**\n * Function: releaseSvgGradients\n * \n * Paints the line shape.\n */\nmxShape.prototype.releaseSvgGradients = function(grads)\n{\n\tif (grads != null)\n\t{\n\t\tfor (var key in grads)\n\t\t{\n\t\t\tvar gradient = grads[key];\n\t\t\t\n\t\t\tif (gradient != null)\n\t\t\t{\n\t\t\t\tgradient.mxRefCount = (gradient.mxRefCount || 0) - 1;\n\t\t\t\t\n\t\t\t\tif (gradient.mxRefCount == 0 && gradient.parentNode != null)\n\t\t\t\t{\n\t\t\t\t\tgradient.parentNode.removeChild(gradient);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n};\n\n/**\n * Function: destroy\n *\n * Destroys the shape by removing it from the DOM and releasing the DOM\n * node associated with the shape using <mxEvent.release>.\n */\nmxShape.prototype.destroy = function()\n{\n\tif (this.node != null)\n\t{\n\t\tmxEvent.release(this.node);\n\t\t\n\t\tif (this.node.parentNode != null)\n\t\t{\n\t\t\tthis.node.parentNode.removeChild(this.node);\n\t\t}\n\t\t\n\t\tthis.node = null;\n\t}\n\t\n\t// Decrements refCount and removes unused\n\tthis.releaseSvgGradients(this.oldGradients);\n\tthis.oldGradients = null;\n};\n"
  },
  {
    "path": "static/cherry/drawio_demo/src/js/shape/mxStencil.js",
    "content": "/**\n * Copyright (c) 2006-2015, JGraph Ltd\n * Copyright (c) 2006-2015, Gaudenz Alder\n */\n/**\n * Class: mxStencil\n *\n * Implements a generic shape which is based on a XML node as a description.\n * \n * shape:\n * \n * The outer element is *shape*, that has attributes:\n * \n * - \"name\", string, required. The stencil name that uniquely identifies the shape.\n * - \"w\" and \"h\" are optional decimal view bounds. This defines your co-ordinate\n * system for the graphics operations in the shape. The default is 100,100.\n * - \"aspect\", optional string. Either \"variable\", the default, or \"fixed\". Fixed\n * means always render the shape with the aspect ratio defined by the ratio w/h.\n * Variable causes the ratio to match that of the geometry of the current vertex.\n * - \"strokewidth\", optional string. Either an integer or the string \"inherit\".\n * \"inherit\" indicates that the strokeWidth of the cell is only changed on scaling,\n * not on resizing. Default is \"1\".\n * If numeric values are used, the strokeWidth of the cell is changed on both\n * scaling and resizing and the value defines the multiple that is applied to\n * the width.\n * \n * connections:\n * \n * If you want to define specific fixed connection points on the shape use the\n * *connections* element. Each *constraint* element within connections defines\n * a fixed connection point on the shape. Constraints have attributes:\n * \n * - \"perimeter\", required. 1 or 0. 0 sets the connection point where specified\n * by x,y. 1 Causes the position of the connection point to be extrapolated from\n * the center of the shape, through x,y to the point of intersection with the\n * perimeter of the shape.\n * - \"x\" and \"y\" are the position of the fixed point relative to the bounds of\n * the shape. They can be automatically adjusted if perimeter=1. So, (0,0) is top\n * left, (0.5,0.5) the center, (1,0.5) the center of the right hand edge of the\n * bounds, etc. Values may be less than 0 or greater than 1 to be positioned\n * outside of the shape.\n * - \"name\", optional string. A unique identifier for the port on the shape.\n * \n * background and foreground:\n * \n * The path of the graphics drawing is split into two elements, *foreground* and\n * *background*. The split is to define which part any shadow applied to the shape\n * is derived from (the background). This, generally, means the background is the\n * line tracing of the outside of the shape, but not always.\n * \n * Any stroke, fill or fillstroke of a background must be the first element of the\n * foreground element, they must not be used within *background*. If the background\n * is empty, this is not required.\n * \n * Because the background cannot have any fill or stroke, it can contain only one\n * *path*, *rect*, *roundrect* or *ellipse* element (or none). It can also not\n * include *image*, *text* or *include-shape*.\n * \n * Note that the state, styling and drawing in mxGraph stencils is very close in\n * design to that of HTML 5 canvas. Tutorials on this subject, if you're not\n * familiar with the topic, will give a good high-level introduction to the\n * concepts used.\n * \n * State:\n * \n * Rendering within the foreground and background elements has the concept of\n * state. There are two types of operations other than state save/load, styling\n * and drawing. The styling operations change the current state, so you can save\n * the current state with <save/> and pull the last saved state from the state\n * stack using <restore/>.\n * \n * Styling:\n * \n * The elements that change colors within the current state all take a hash\n * prefixed hex color code (\"#FFEA80\").\n * \n * - *strokecolor*, this sets the color that drawing paths will be rendered in\n * when a stroke or fillstroke command is issued.\n * - *fillcolor*, this sets the color that the inside of closed paths will be\n * rendered in when a fill or fillstroke command is issued.\n * - *fontcolor*, this sets the color that fonts are rendered in when text is drawn.\n * \n * *alpha* defines the degree of transparency used between 1.0 for fully opaque\n * and 0.0 for fully transparent.\n * \n * *strokewidth* defines the integer thickness of drawing elements rendered by\n * stroking. Use fixed=\"1\" to apply the value as-is, without scaling.\n * \n * *dashed* is \"1\" for dashing enabled and \"0\" for disabled.\n * \n * When *dashed* is enabled the current dash pattern, defined by *dashpattern*,\n * is used on strokes. dashpattern is a sequence of space separated \"on, off\"\n * lengths that define what distance to paint the stroke for, then what distance\n * to paint nothing for, repeat... The default is \"3 3\". You could define a more\n * complex pattern with \"5 3 2 6\", for example. Generally, it makes sense to have\n * an even number of elements in the dashpattern, but that's not required.\n * \n * *linejoin*, *linecap* and *miterlimit* are best explained by the Mozilla page\n * on Canvas styling (about halfway down). The values are all the same except we\n * use \"flat\" for linecap, instead of Canvas' \"butt\".\n * \n * For font styling there are.\n * \n * - *fontsize*, an integer,\n * - *fontstyle*, an ORed bit pattern of bold (1), italic (2) and underline (4),\n * i.e bold underline is \"5\".\n * - *fontfamily*, is a string defining the typeface to be used.\n * \n * Drawing:\n * \n * Most drawing is contained within a *path* element. Again, the graphic\n * primitives are very similar to that of HTML 5 canvas.\n * \n * - *move* to attributes required decimals (x,y).\n * - *line* to attributes required decimals (x,y).\n * - *quad* to required decimals (x2,y2) via control point required decimals\n * (x1,y1).\n * - *curve* to required decimals (x3,y3), via control points required decimals\n * (x1,y1) and (x2,y2).\n * - *arc*, this doesn't follow the HTML Canvas signatures, instead it's a copy\n * of the SVG arc command. The SVG specification documentation gives the best\n * description of its behaviors. The attributes are named identically, they are\n * decimals and all required.\n * - *close* ends the current subpath and causes an automatic straight line to\n * be drawn from the current point to the initial point of the current subpath.\n * \n * Complex drawing:\n * \n * In addition to the graphics primitive operations there are non-primitive\n * operations. These provide an easy method to draw some basic shapes.\n * \n * - *rect*, attributes \"x\", \"y\", \"w\", \"h\", all required decimals\n * - *roundrect*, attributes \"x\", \"y\", \"w\", \"h\", all required decimals. Also\n * \"arcsize\" an optional decimal attribute defining how large, the corner curves\n * are.\n * - *ellipse*, attributes \"x\", \"y\", \"w\", \"h\", all required decimals.\n * \n * Note that these 3 shapes and all paths must be followed by either a fill,\n * stroke, or fillstroke.\n * \n * Text:\n * \n * *text* elements have the following attributes.\n * \n * - \"str\", the text string to display, required.\n * - \"x\" and \"y\", the decimal location (x,y) of the text element, required.\n * - \"align\", the horizontal alignment of the text element, either \"left\",\n * \"center\" or \"right\". Optional, default is \"left\".\n * - \"valign\", the vertical alignment of the text element, either \"top\", \"middle\"\n * or \"bottom\". Optional, default is \"top\".\n * - \"localized\", 0 or 1, if 1 then the \"str\" actually contains a key to use to\n * fetch the value out of mxResources. Optional, default is\n * <mxStencil.defaultLocalized>.\n * - \"vertical\", 0 or 1, if 1 the label is rendered vertically (rotated by 90\n * degrees). Optional, default is 0.\n * - \"rotation\", angle in degrees (0 to 360). The angle to rotate the text by.\n * Optional, default is 0.\n * - \"align-shape\", 0 or 1, if 0 ignore the rotation of the shape when setting\n * the text rotation. Optional, default is 1.\n * \n * If <allowEval> is true, then the text content of the this element can define\n * a function which is invoked with the shape as the only argument and returns\n * the value for the text element (ignored if the str attribute is not null).\n * \n * Images:\n * \n * *image* elements can either be external URLs, or data URIs, where supported\n * (not in IE 7-). Attributes are:\n * \n * - \"src\", required string. Either a data URI or URL.\n * - \"x\", \"y\", required decimals. The (x,y) position of the image.\n * - \"w\", \"h\", required decimals. The width and height of the image.\n * - \"flipH\" and \"flipV\", optional 0 or 1. Whether to flip the image along the\n * horizontal/vertical axis. Default is 0 for both.\n * \n * If <allowEval> is true, then the text content of the this element can define\n * a function which is invoked with the shape as the only argument and returns\n * the value for the image source (ignored if the src attribute is not null).\n * \n * Sub-shapes:\n * \n * *include-shape* allow stencils to be rendered within the current stencil by\n * referencing the sub-stencil by name. Attributes are:\n * \n * - \"name\", required string. The unique shape name of the stencil.\n * - \"x\", \"y\", \"w\", \"h\", required decimals. The (x,y) position of the sub-shape\n * and its width and height.\n * \n * Constructor: mxStencil\n * \n * Constructs a new generic shape by setting <desc> to the given XML node and\n * invoking <parseDescription> and <parseConstraints>.\n * \n * Parameters:\n * \n * desc - XML node that contains the stencil description.\n */\nfunction mxStencil(desc)\n{\n\tthis.desc = desc;\n\tthis.parseDescription();\n\tthis.parseConstraints();\n};\n\n/**\n * Variable: defaultLocalized\n * \n * Static global variable that specifies the default value for the localized\n * attribute of the text element. Default is false.\n */\nmxStencil.defaultLocalized = false;\n\n/**\n * Function: allowEval\n * \n * Static global switch that specifies if the use of eval is allowed for\n * evaluating text content and images. Default is false. Set this to true\n * if stencils can not contain user input.\n */\nmxStencil.allowEval = false;\n\n/**\n * Variable: desc\n *\n * Holds the XML node with the stencil description.\n */\nmxStencil.prototype.desc = null;\n\n/**\n * Variable: constraints\n * \n * Holds an array of <mxConnectionConstraints> as defined in the shape.\n */\nmxStencil.prototype.constraints = null;\n\n/**\n * Variable: aspect\n *\n * Holds the aspect of the shape. Default is 'auto'.\n */\nmxStencil.prototype.aspect = null;\n\n/**\n * Variable: w0\n *\n * Holds the width of the shape. Default is 100.\n */\nmxStencil.prototype.w0 = null;\n\n/**\n * Variable: h0\n *\n * Holds the height of the shape. Default is 100.\n */\nmxStencil.prototype.h0 = null;\n\n/**\n * Variable: bgNodes\n *\n * Holds the XML node with the stencil description.\n */\nmxStencil.prototype.bgNode = null;\n\n/**\n * Variable: fgNodes\n *\n * Holds the XML node with the stencil description.\n */\nmxStencil.prototype.fgNode = null;\n\n/**\n * Variable: strokewidth\n *\n * Holds the strokewidth direction from the description.\n */\nmxStencil.prototype.strokewidth = null;\n\n/**\n * Function: parseDescription\n *\n * Reads <w0>, <h0>, <aspect>, <bgNodes> and <fgNodes> from <desc>.\n */\nmxStencil.prototype.parseDescription = function()\n{\n\t// LATER: Preprocess nodes for faster painting\n\tthis.fgNode = this.desc.getElementsByTagName('foreground')[0];\n\tthis.bgNode = this.desc.getElementsByTagName('background')[0];\n\tthis.w0 = Number(this.desc.getAttribute('w') || 100);\n\tthis.h0 = Number(this.desc.getAttribute('h') || 100);\n\t\n\t// Possible values for aspect are: variable and fixed where\n\t// variable means fill the available space and fixed means\n\t// use w0 and h0 to compute the aspect.\n\tvar aspect = this.desc.getAttribute('aspect');\n\tthis.aspect = (aspect != null) ? aspect : 'variable';\n\t\n\t// Possible values for strokewidth are all numbers and \"inherit\"\n\t// where the inherit means take the value from the style (ie. the\n\t// user-defined stroke-width). Note that the strokewidth is scaled\n\t// by the minimum scaling that is used to draw the shape (sx, sy).\n\tvar sw = this.desc.getAttribute('strokewidth');\n\tthis.strokewidth = (sw != null) ? sw : '1';\n};\n\n/**\n * Function: parseConstraints\n *\n * Reads the constraints from <desc> into <constraints> using\n * <parseConstraint>.\n */\nmxStencil.prototype.parseConstraints = function()\n{\n\tvar conns = this.desc.getElementsByTagName('connections')[0];\n\t\n\tif (conns != null)\n\t{\n\t\tvar tmp = mxUtils.getChildNodes(conns);\n\t\t\n\t\tif (tmp != null && tmp.length > 0)\n\t\t{\n\t\t\tthis.constraints = [];\n\t\t\t\n\t\t\tfor (var i = 0; i < tmp.length; i++)\n\t\t\t{\n\t\t\t\tthis.constraints.push(this.parseConstraint(tmp[i]));\n\t\t\t}\n\t\t}\n\t}\n};\n\n/**\n * Function: parseConstraint\n *\n * Parses the given XML node and returns its <mxConnectionConstraint>.\n */\nmxStencil.prototype.parseConstraint = function(node)\n{\n\tvar x = Number(node.getAttribute('x'));\n\tvar y = Number(node.getAttribute('y'));\n\tvar perimeter = node.getAttribute('perimeter') == '1';\n\tvar name = node.getAttribute('name');\n\t\n\treturn new mxConnectionConstraint(new mxPoint(x, y), perimeter, name);\n};\n\n/**\n * Function: evaluateTextAttribute\n * \n * Gets the given attribute as a text. The return value from <evaluateAttribute>\n * is used as a key to <mxResources.get> if the localized attribute in the text\n * node is 1 or if <defaultLocalized> is true.\n */\nmxStencil.prototype.evaluateTextAttribute = function(node, attribute, shape)\n{\n\tvar result = this.evaluateAttribute(node, attribute, shape);\n\tvar loc = node.getAttribute('localized');\n\t\n\tif ((mxStencil.defaultLocalized && loc == null) || loc == '1')\n\t{\n\t\tresult = mxResources.get(result);\n\t}\n\n\treturn result;\n};\n\n/**\n * Function: evaluateAttribute\n *\n * Gets the attribute for the given name from the given node. If the attribute\n * does not exist then the text content of the node is evaluated and if it is\n * a function it is invoked with <shape> as the only argument and the return\n * value is used as the attribute value to be returned.\n */\nmxStencil.prototype.evaluateAttribute = function(node, attribute, shape)\n{\n\tvar result = node.getAttribute(attribute);\n\t\n\tif (result == null)\n\t{\n\t\tvar text = mxUtils.getTextContent(node);\n\t\t\n\t\tif (text != null && mxStencil.allowEval)\n\t\t{\n\t\t\tvar funct = mxUtils.eval(text);\n\t\t\t\n\t\t\tif (typeof(funct) == 'function')\n\t\t\t{\n\t\t\t\tresult = funct(shape);\n\t\t\t}\n\t\t}\n\t}\n\t\n\treturn result;\n};\n\n/**\n * Function: drawShape\n *\n * Draws this stencil inside the given bounds.\n */\nmxStencil.prototype.drawShape = function(canvas, shape, x, y, w, h)\n{\n\t// TODO: Internal structure (array of special structs?), relative and absolute\n\t// coordinates (eg. note shape, process vs star, actor etc.), text rendering\n\t// and non-proportional scaling, how to implement pluggable edge shapes\n\t// (start, segment, end blocks), pluggable markers, how to implement\n\t// swimlanes (title area) with this API, add icon, horizontal/vertical\n\t// label, indicator for all shapes, rotation\n\tvar direction = mxUtils.getValue(shape.style, mxConstants.STYLE_DIRECTION, null);\n\tvar aspect = this.computeAspect(shape.style, x, y, w, h, direction);\n\tvar minScale = Math.min(aspect.width, aspect.height);\n\tvar sw = (this.strokewidth == 'inherit') ?\n\t\t\tNumber(mxUtils.getNumber(shape.style, mxConstants.STYLE_STROKEWIDTH, 1)) :\n\t\t\tNumber(this.strokewidth) * minScale;\n\tcanvas.setStrokeWidth(sw);\n\n\tthis.drawChildren(canvas, shape, x, y, w, h, this.bgNode, aspect, false, true);\n\tthis.drawChildren(canvas, shape, x, y, w, h, this.fgNode, aspect, true,\n\t\t!shape.outline || shape.style == null || mxUtils.getValue(\n\t\tshape.style, mxConstants.STYLE_BACKGROUND_OUTLINE, 0) == 0);\n};\n\n/**\n * Function: drawChildren\n *\n * Draws this stencil inside the given bounds.\n */\nmxStencil.prototype.drawChildren = function(canvas, shape, x, y, w, h, node, aspect, disableShadow, paint)\n{\n\tif (node != null && w > 0 && h > 0)\n\t{\n\t\tvar tmp = node.firstChild;\n\t\t\n\t\twhile (tmp != null)\n\t\t{\n\t\t\tif (tmp.nodeType == mxConstants.NODETYPE_ELEMENT)\n\t\t\t{\n\t\t\t\tthis.drawNode(canvas, shape, tmp, aspect, disableShadow, paint);\n\t\t\t}\n\t\t\t\n\t\t\ttmp = tmp.nextSibling;\n\t\t}\n\t}\n};\n\n/**\n * Function: computeAspect\n *\n * Returns a rectangle that contains the offset in x and y and the horizontal\n * and vertical scale in width and height used to draw this shape inside the\n * given <mxRectangle>.\n * \n * Parameters:\n * \n * shape - <mxShape> to be drawn.\n * bounds - <mxRectangle> that should contain the stencil.\n * direction - Optional direction of the shape to be darwn.\n */\nmxStencil.prototype.computeAspect = function(shape, x, y, w, h, direction)\n{\n\tvar x0 = x;\n\tvar y0 = y;\n\tvar sx = w / this.w0;\n\tvar sy = h / this.h0;\n\t\n\tvar inverse = (direction == mxConstants.DIRECTION_NORTH || direction == mxConstants.DIRECTION_SOUTH);\n\n\tif (inverse)\n\t{\n\t\tsy = w / this.h0;\n\t\tsx = h / this.w0;\n\t\t\n\t\tvar delta = (w - h) / 2;\n\n\t\tx0 += delta;\n\t\ty0 -= delta;\n\t}\n\n\tif (this.aspect == 'fixed')\n\t{\n\t\tsy = Math.min(sx, sy);\n\t\tsx = sy;\n\t\t\n\t\t// Centers the shape inside the available space\n\t\tif (inverse)\n\t\t{\n\t\t\tx0 += (h - this.w0 * sx) / 2;\n\t\t\ty0 += (w - this.h0 * sy) / 2;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tx0 += (w - this.w0 * sx) / 2;\n\t\t\ty0 += (h - this.h0 * sy) / 2;\n\t\t}\n\t}\n\n\treturn new mxRectangle(x0, y0, sx, sy);\n};\n\n/**\n * Function: drawNode\n *\n * Draws this stencil inside the given bounds.\n */\nmxStencil.prototype.drawNode = function(canvas, shape, node, aspect, disableShadow, paint)\n{\n\tvar name = node.nodeName;\n\tvar x0 = aspect.x;\n\tvar y0 = aspect.y;\n\tvar sx = aspect.width;\n\tvar sy = aspect.height;\n\tvar minScale = Math.min(sx, sy);\n\t\n\tif (name == 'save')\n\t{\n\t\tcanvas.save();\n\t}\n\telse if (name == 'restore')\n\t{\n\t\tcanvas.restore();\n\t}\n\telse if (paint)\n\t{\n\t\tif (name == 'path')\n\t\t{\n\t\t\tcanvas.begin();\n\t\n\t\t\t// Renders the elements inside the given path\n\t\t\tvar childNode = node.firstChild;\n\t\t\t\n\t\t\twhile (childNode != null)\n\t\t\t{\n\t\t\t\tif (childNode.nodeType == mxConstants.NODETYPE_ELEMENT)\n\t\t\t\t{\n\t\t\t\t\tthis.drawNode(canvas, shape, childNode, aspect, disableShadow, paint);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tchildNode = childNode.nextSibling;\n\t\t\t}\n\t\t}\n\t\telse if (name == 'close')\n\t\t{\n\t\t\tcanvas.close();\n\t\t}\n\t\telse if (name == 'move')\n\t\t{\n\t\t\tcanvas.moveTo(x0 + Number(node.getAttribute('x')) * sx, y0 + Number(node.getAttribute('y')) * sy);\n\t\t}\n\t\telse if (name == 'line')\n\t\t{\n\t\t\tcanvas.lineTo(x0 + Number(node.getAttribute('x')) * sx, y0 + Number(node.getAttribute('y')) * sy);\n\t\t}\n\t\telse if (name == 'quad')\n\t\t{\n\t\t\tcanvas.quadTo(x0 + Number(node.getAttribute('x1')) * sx,\n\t\t\t\t\ty0 + Number(node.getAttribute('y1')) * sy,\n\t\t\t\t\tx0 + Number(node.getAttribute('x2')) * sx,\n\t\t\t\t\ty0 + Number(node.getAttribute('y2')) * sy);\n\t\t}\n\t\telse if (name == 'curve')\n\t\t{\n\t\t\tcanvas.curveTo(x0 + Number(node.getAttribute('x1')) * sx,\n\t\t\t\t\ty0 + Number(node.getAttribute('y1')) * sy,\n\t\t\t\t\tx0 + Number(node.getAttribute('x2')) * sx,\n\t\t\t\t\ty0 + Number(node.getAttribute('y2')) * sy,\n\t\t\t\t\tx0 + Number(node.getAttribute('x3')) * sx,\n\t\t\t\t\ty0 + Number(node.getAttribute('y3')) * sy);\n\t\t}\n\t\telse if (name == 'arc')\n\t\t{\n\t\t\tcanvas.arcTo(Number(node.getAttribute('rx')) * sx,\n\t\t\t\t\tNumber(node.getAttribute('ry')) * sy,\n\t\t\t\t\tNumber(node.getAttribute('x-axis-rotation')),\n\t\t\t\t\tNumber(node.getAttribute('large-arc-flag')),\n\t\t\t\t\tNumber(node.getAttribute('sweep-flag')),\n\t\t\t\t\tx0 + Number(node.getAttribute('x')) * sx,\n\t\t\t\t\ty0 + Number(node.getAttribute('y')) * sy);\n\t\t}\n\t\telse if (name == 'rect')\n\t\t{\n\t\t\tcanvas.rect(x0 + Number(node.getAttribute('x')) * sx,\n\t\t\t\t\ty0 + Number(node.getAttribute('y')) * sy,\n\t\t\t\t\tNumber(node.getAttribute('w')) * sx,\n\t\t\t\t\tNumber(node.getAttribute('h')) * sy);\n\t\t}\n\t\telse if (name == 'roundrect')\n\t\t{\n\t\t\tvar arcsize = Number(node.getAttribute('arcsize'));\n\t\n\t\t\tif (arcsize == 0)\n\t\t\t{\n\t\t\t\tarcsize = mxConstants.RECTANGLE_ROUNDING_FACTOR * 100;\n\t\t\t}\n\t\t\t\n\t\t\tvar w = Number(node.getAttribute('w')) * sx;\n\t\t\tvar h = Number(node.getAttribute('h')) * sy;\n\t\t\tvar factor = Number(arcsize) / 100;\n\t\t\tvar r = Math.min(w * factor, h * factor);\n\t\t\t\n\t\t\tcanvas.roundrect(x0 + Number(node.getAttribute('x')) * sx,\n\t\t\t\t\ty0 + Number(node.getAttribute('y')) * sy,\n\t\t\t\t\tw, h, r, r);\n\t\t}\n\t\telse if (name == 'ellipse')\n\t\t{\n\t\t\tcanvas.ellipse(x0 + Number(node.getAttribute('x')) * sx,\n\t\t\t\ty0 + Number(node.getAttribute('y')) * sy,\n\t\t\t\tNumber(node.getAttribute('w')) * sx,\n\t\t\t\tNumber(node.getAttribute('h')) * sy);\n\t\t}\n\t\telse if (name == 'image')\n\t\t{\n\t\t\tif (!shape.outline)\n\t\t\t{\n\t\t\t\tvar src = this.evaluateAttribute(node, 'src', shape);\n\t\t\t\t\n\t\t\t\tcanvas.image(x0 + Number(node.getAttribute('x')) * sx,\n\t\t\t\t\ty0 + Number(node.getAttribute('y')) * sy,\n\t\t\t\t\tNumber(node.getAttribute('w')) * sx,\n\t\t\t\t\tNumber(node.getAttribute('h')) * sy,\n\t\t\t\t\tsrc, false, node.getAttribute('flipH') == '1',\n\t\t\t\t\tnode.getAttribute('flipV') == '1');\n\t\t\t}\n\t\t}\n\t\telse if (name == 'text')\n\t\t{\n\t\t\tif (!shape.outline)\n\t\t\t{\n\t\t\t\tvar str = this.evaluateTextAttribute(node, 'str', shape);\n\t\t\t\tvar rotation = node.getAttribute('vertical') == '1' ? -90 : 0;\n\t\t\t\t\n\t\t\t\tif (node.getAttribute('align-shape') == '0')\n\t\t\t\t{\n\t\t\t\t\tvar dr = shape.rotation;\n\t\t\n\t\t\t\t\t// Depends on flipping\n\t\t\t\t\tvar flipH = mxUtils.getValue(shape.style, mxConstants.STYLE_FLIPH, 0) == 1;\n\t\t\t\t\tvar flipV = mxUtils.getValue(shape.style, mxConstants.STYLE_FLIPV, 0) == 1;\n\t\t\t\t\t\n\t\t\t\t\tif (flipH && flipV)\n\t\t\t\t\t{\n\t\t\t\t\t\trotation -= dr;\n\t\t\t\t\t}\n\t\t\t\t\telse if (flipH || flipV)\n\t\t\t\t\t{\n\t\t\t\t\t\trotation += dr;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\trotation -= dr;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\n\t\t\t\trotation -= node.getAttribute('rotation');\n\t\t\n\t\t\t\tcanvas.text(x0 + Number(node.getAttribute('x')) * sx,\n\t\t\t\t\t\ty0 + Number(node.getAttribute('y')) * sy,\n\t\t\t\t\t\t0, 0, str, node.getAttribute('align') || 'left',\n\t\t\t\t\t\tnode.getAttribute('valign') || 'top', false, '',\n\t\t\t\t\t\tnull, false, rotation);\n\t\t\t}\n\t\t}\n\t\telse if (name == 'include-shape')\n\t\t{\n\t\t\tvar stencil = mxStencilRegistry.getStencil(node.getAttribute('name'));\n\t\t\t\n\t\t\tif (stencil != null)\n\t\t\t{\n\t\t\t\tvar x = x0 + Number(node.getAttribute('x')) * sx;\n\t\t\t\tvar y = y0 + Number(node.getAttribute('y')) * sy;\n\t\t\t\tvar w = Number(node.getAttribute('w')) * sx;\n\t\t\t\tvar h = Number(node.getAttribute('h')) * sy;\n\t\t\t\t\n\t\t\t\tstencil.drawShape(canvas, shape, x, y, w, h);\n\t\t\t}\n\t\t}\n\t\telse if (name == 'fillstroke')\n\t\t{\n\t\t\tcanvas.fillAndStroke();\n\t\t}\n\t\telse if (name == 'fill')\n\t\t{\n\t\t\tcanvas.fill();\n\t\t}\n\t\telse if (name == 'stroke')\n\t\t{\n\t\t\tcanvas.stroke();\n\t\t}\n\t\telse if (name == 'strokewidth')\n\t\t{\n\t\t\tvar s = (node.getAttribute('fixed') == '1') ? 1 : minScale;\n\t\t\tcanvas.setStrokeWidth(Number(node.getAttribute('width')) * s);\n\t\t}\n\t\telse if (name == 'dashed')\n\t\t{\n\t\t\tcanvas.setDashed(node.getAttribute('dashed') == '1');\n\t\t}\n\t\telse if (name == 'dashpattern')\n\t\t{\n\t\t\tvar value = node.getAttribute('pattern');\n\t\t\t\n\t\t\tif (value != null)\n\t\t\t{\n\t\t\t\tvar tmp = value.split(' ');\n\t\t\t\tvar pat = [];\n\t\t\t\t\n\t\t\t\tfor (var i = 0; i < tmp.length; i++)\n\t\t\t\t{\n\t\t\t\t\tif (tmp[i].length > 0)\n\t\t\t\t\t{\n\t\t\t\t\t\tpat.push(Number(tmp[i]) * minScale);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tvalue = pat.join(' ');\n\t\t\t\tcanvas.setDashPattern(value);\n\t\t\t}\n\t\t}\n\t\telse if (name == 'strokecolor')\n\t\t{\n\t\t\tcanvas.setStrokeColor(node.getAttribute('color'));\n\t\t}\n\t\telse if (name == 'linecap')\n\t\t{\n\t\t\tcanvas.setLineCap(node.getAttribute('cap'));\n\t\t}\n\t\telse if (name == 'linejoin')\n\t\t{\n\t\t\tcanvas.setLineJoin(node.getAttribute('join'));\n\t\t}\n\t\telse if (name == 'miterlimit')\n\t\t{\n\t\t\tcanvas.setMiterLimit(Number(node.getAttribute('limit')));\n\t\t}\n\t\telse if (name == 'fillcolor')\n\t\t{\n\t\t\tcanvas.setFillColor(node.getAttribute('color'));\n\t\t}\n\t\telse if (name == 'alpha')\n\t\t{\n\t\t\tcanvas.setAlpha(node.getAttribute('alpha'));\n\t\t}\n\t\telse if (name == 'fontcolor')\n\t\t{\n\t\t\tcanvas.setFontColor(node.getAttribute('color'));\n\t\t}\n\t\telse if (name == 'fontstyle')\n\t\t{\n\t\t\tcanvas.setFontStyle(node.getAttribute('style'));\n\t\t}\n\t\telse if (name == 'fontfamily')\n\t\t{\n\t\t\tcanvas.setFontFamily(node.getAttribute('family'));\n\t\t}\n\t\telse if (name == 'fontsize')\n\t\t{\n\t\t\tcanvas.setFontSize(Number(node.getAttribute('size')) * minScale);\n\t\t}\n\t\t\n\t\tif (disableShadow && (name == 'fillstroke' || name == 'fill' || name == 'stroke'))\n\t\t{\n\t\t\tdisableShadow = false;\n\t\t\tcanvas.setShadow(false);\n\t\t}\n\t}\n};\n"
  },
  {
    "path": "static/cherry/drawio_demo/src/js/shape/mxStencilRegistry.js",
    "content": "/**\n * Copyright (c) 2006-2015, JGraph Ltd\n * Copyright (c) 2006-2015, Gaudenz Alder\n * \n * Code to add stencils.\n * \n * (code)\n * var req = mxUtils.load('test/stencils.xml');\n * var root = req.getDocumentElement();\n * var shape = root.firstChild;\n * \n * while (shape != null)\n * {\n * \t if (shape.nodeType == mxConstants.NODETYPE_ELEMENT)\n *   {\n *     mxStencilRegistry.addStencil(shape.getAttribute('name'), new mxStencil(shape));\n *   }\n *   \n *   shape = shape.nextSibling;\n * }\n * (end)\n */\nvar mxStencilRegistry =\n{\n\t/**\n\t * Class: mxStencilRegistry\n\t * \n\t * A singleton class that provides a registry for stencils and the methods\n\t * for painting those stencils onto a canvas or into a DOM.\n\t */\n\tstencils: {},\n\t\n\t/**\n\t * Function: addStencil\n\t * \n\t * Adds the given <mxStencil>.\n\t */\n\taddStencil: function(name, stencil)\n\t{\n\t\tmxStencilRegistry.stencils[name] = stencil;\n\t},\n\t\n\t/**\n\t * Function: getStencil\n\t * \n\t * Returns the <mxStencil> for the given name.\n\t */\n\tgetStencil: function(name)\n\t{\n\t\treturn mxStencilRegistry.stencils[name];\n\t}\n\n};\n"
  },
  {
    "path": "static/cherry/drawio_demo/src/js/shape/mxSwimlane.js",
    "content": "/**\n * Copyright (c) 2006-2015, JGraph Ltd\n * Copyright (c) 2006-2015, Gaudenz Alder\n */\n/**\n * Class: mxSwimlane\n *\n * Extends <mxShape> to implement a swimlane shape. This shape is registered\n * under <mxConstants.SHAPE_SWIMLANE> in <mxCellRenderer>. Use the\n * <mxConstants.STYLE_STYLE_STARTSIZE> to define the size of the title\n * region, <mxConstants.STYLE_SWIMLANE_FILLCOLOR> for the content area fill,\n * <mxConstants.STYLE_SEPARATORCOLOR> to draw an additional vertical separator\n * and <mxConstants.STYLE_SWIMLANE_LINE> to hide the line between the title\n * region and the content area. The <mxConstants.STYLE_HORIZONTAL> affects\n * the orientation of this shape, not only its label.\n * \n * Constructor: mxSwimlane\n *\n * Constructs a new swimlane shape.\n * \n * Parameters:\n * \n * bounds - <mxRectangle> that defines the bounds. This is stored in\n * <mxShape.bounds>.\n * fill - String that defines the fill color. This is stored in <fill>.\n * stroke - String that defines the stroke color. This is stored in <stroke>.\n * strokewidth - Optional integer that defines the stroke width. Default is\n * 1. This is stored in <strokewidth>.\n */\nfunction mxSwimlane(bounds, fill, stroke, strokewidth)\n{\n\tmxShape.call(this);\n\tthis.bounds = bounds;\n\tthis.fill = fill;\n\tthis.stroke = stroke;\n\tthis.strokewidth = (strokewidth != null) ? strokewidth : 1;\n};\n\n/**\n * Extends mxShape.\n */\nmxUtils.extend(mxSwimlane, mxShape);\n\n/**\n * Variable: imageSize\n *\n * Default imagewidth and imageheight if an image but no imagewidth\n * and imageheight are defined in the style. Value is 16.\n */\nmxSwimlane.prototype.imageSize = 16;\n\n/**\n * Function: isRoundable\n * \n * Adds roundable support.\n */\nmxSwimlane.prototype.isRoundable = function(c, x, y, w, h)\n{\n\treturn true;\n};\n\n/**\n * Function: getGradientBounds\n * \n * Returns the bounding box for the gradient box for this shape.\n */\nmxSwimlane.prototype.getTitleSize = function()\n{\n\treturn Math.max(0, mxUtils.getValue(this.style, mxConstants.STYLE_STARTSIZE, mxConstants.DEFAULT_STARTSIZE));\n};\n\n/**\n * Function: getGradientBounds\n * \n * Returns the bounding box for the gradient box for this shape.\n */\nmxSwimlane.prototype.getLabelBounds = function(rect)\n{\n\tvar start = this.getTitleSize();\n\tvar bounds = new mxRectangle(rect.x, rect.y, rect.width, rect.height);\n\tvar horizontal = this.isHorizontal();\n\t\n\tvar flipH = mxUtils.getValue(this.style, mxConstants.STYLE_FLIPH, 0) == 1;\n\tvar flipV = mxUtils.getValue(this.style, mxConstants.STYLE_FLIPV, 0) == 1;\t\n\t\n\t// East is default\n\tvar shapeVertical = (this.direction == mxConstants.DIRECTION_NORTH ||\n\t\t\tthis.direction == mxConstants.DIRECTION_SOUTH);\n\tvar realHorizontal = horizontal == !shapeVertical;\n\t\n\tvar realFlipH = !realHorizontal && flipH != (this.direction == mxConstants.DIRECTION_SOUTH ||\n\t\t\tthis.direction == mxConstants.DIRECTION_WEST);\n\tvar realFlipV = realHorizontal && flipV != (this.direction == mxConstants.DIRECTION_SOUTH ||\n\t\t\tthis.direction == mxConstants.DIRECTION_WEST);\n\n\t// Shape is horizontal\n\tif (!shapeVertical)\n\t{\n\t\tvar tmp = Math.min(bounds.height, start * this.scale);\n\n\t\tif (realFlipH || realFlipV)\n\t\t{\n\t\t\tbounds.y += bounds.height - tmp;\n\t\t}\n\n\t\tbounds.height = tmp;\n\t}\n\telse\n\t{\n\t\tvar tmp = Math.min(bounds.width, start * this.scale);\n\t\t\n\t\tif (realFlipH || realFlipV)\n\t\t{\n\t\t\tbounds.x += bounds.width - tmp;\t\n\t\t}\n\n\t\tbounds.width = tmp;\n\t}\n\t\n\treturn bounds;\n};\n\n/**\n * Function: getGradientBounds\n * \n * Returns the bounding box for the gradient box for this shape.\n */\nmxSwimlane.prototype.getGradientBounds = function(c, x, y, w, h)\n{\n\tvar start = this.getTitleSize();\n\t\n\tif (this.isHorizontal())\n\t{\n\t\tstart = Math.min(start, h);\n\t\treturn new mxRectangle(x, y, w, start);\n\t}\n\telse\n\t{\n\t\tstart = Math.min(start, w);\n\t\treturn new mxRectangle(x, y, start, h);\n\t}\n};\n\n/**\n * Function: getArcSize\n * \n * Returns the arcsize for the swimlane.\n */\nmxSwimlane.prototype.getArcSize = function(w, h, start)\n{\n\tvar f = mxUtils.getValue(this.style, mxConstants.STYLE_ARCSIZE, mxConstants.RECTANGLE_ROUNDING_FACTOR * 100) / 100;\n\n\treturn start * f * 3; \n};\n\n/**\n * Function: paintVertexShape\n *\n * Paints the swimlane vertex shape.\n */\nmxSwimlane.prototype.isHorizontal = function()\n{\n\treturn mxUtils.getValue(this.style, mxConstants.STYLE_HORIZONTAL, 1) == 1;\n};\n\n/**\n * Function: paintVertexShape\n *\n * Paints the swimlane vertex shape.\n */\nmxSwimlane.prototype.paintVertexShape = function(c, x, y, w, h)\n{\n\tvar start = this.getTitleSize();\n\tvar fill = mxUtils.getValue(this.style, mxConstants.STYLE_SWIMLANE_FILLCOLOR, mxConstants.NONE);\n\tvar swimlaneLine = mxUtils.getValue(this.style, mxConstants.STYLE_SWIMLANE_LINE, 1) == 1;\n\tvar r = 0;\n\t\n\tif (this.isHorizontal())\n\t{\n\t\tstart = Math.min(start, h);\n\t}\n\telse\n\t{\n\t\tstart = Math.min(start, w);\n\t}\n\t\n\tc.translate(x, y);\n\t\n\tif (!this.isRounded)\n\t{\n\t\tthis.paintSwimlane(c, x, y, w, h, start, fill, swimlaneLine);\n\t}\n\telse\n\t{\n\t\tr = this.getArcSize(w, h, start);\n\t\tr = Math.min(((this.isHorizontal()) ? h : w) - start, Math.min(start, r));\n\t\tthis.paintRoundedSwimlane(c, x, y, w, h, start, r, fill, swimlaneLine);\n\t}\n\t\n\tvar sep = mxUtils.getValue(this.style, mxConstants.STYLE_SEPARATORCOLOR, mxConstants.NONE);\n\tthis.paintSeparator(c, x, y, w, h, start, sep);\n\n\tif (this.image != null)\n\t{\n\t\tvar bounds = this.getImageBounds(x, y, w, h);\n\t\tc.image(bounds.x - x, bounds.y - y, bounds.width, bounds.height,\n\t\t\t\tthis.image, false, false, false);\n\t}\n\t\n\tif (this.glass)\n\t{\n\t\tc.setShadow(false);\n\t\tthis.paintGlassEffect(c, 0, 0, w, start, r);\n\t}\n};\n\n/**\n * Function: paintSwimlane\n *\n * Paints the swimlane vertex shape.\n */\nmxSwimlane.prototype.paintSwimlane = function(c, x, y, w, h, start, fill, swimlaneLine)\n{\n\tc.begin();\n\t\n\tif (this.isHorizontal())\n\t{\n\t\tc.moveTo(0, start);\n\t\tc.lineTo(0, 0);\n\t\tc.lineTo(w, 0);\n\t\tc.lineTo(w, start);\n\t\tc.fillAndStroke();\n\n\t\tif (start < h)\n\t\t{\n\t\t\tif (fill == mxConstants.NONE)\n\t\t\t{\n\t\t\t\tc.pointerEvents = false;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tc.setFillColor(fill);\n\t\t\t}\n\t\t\t\n\t\t\tc.begin();\n\t\t\tc.moveTo(0, start);\n\t\t\tc.lineTo(0, h);\n\t\t\tc.lineTo(w, h);\n\t\t\tc.lineTo(w, start);\n\t\t\t\n\t\t\tif (fill == mxConstants.NONE)\n\t\t\t{\n\t\t\t\tc.stroke();\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tc.fillAndStroke();\n\t\t\t}\n\t\t}\n\t}\n\telse\n\t{\n\t\tc.moveTo(start, 0);\n\t\tc.lineTo(0, 0);\n\t\tc.lineTo(0, h);\n\t\tc.lineTo(start, h);\n\t\tc.fillAndStroke();\n\t\t\n\t\tif (start < w)\n\t\t{\n\t\t\tif (fill == mxConstants.NONE)\n\t\t\t{\n\t\t\t\tc.pointerEvents = false;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tc.setFillColor(fill);\n\t\t\t}\n\t\t\t\n\t\t\tc.begin();\n\t\t\tc.moveTo(start, 0);\n\t\t\tc.lineTo(w, 0);\n\t\t\tc.lineTo(w, h);\n\t\t\tc.lineTo(start, h);\n\t\t\t\n\t\t\tif (fill == mxConstants.NONE)\n\t\t\t{\n\t\t\t\tc.stroke();\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tc.fillAndStroke();\n\t\t\t}\n\t\t}\n\t}\n\t\n\tif (swimlaneLine)\n\t{\n\t\tthis.paintDivider(c, x, y, w, h, start, fill == mxConstants.NONE);\n\t}\n};\n\n/**\n * Function: paintRoundedSwimlane\n *\n * Paints the swimlane vertex shape.\n */\nmxSwimlane.prototype.paintRoundedSwimlane = function(c, x, y, w, h, start, r, fill, swimlaneLine)\n{\n\tc.begin();\n\n\tif (this.isHorizontal())\n\t{\n\t\tc.moveTo(w, start);\n\t\tc.lineTo(w, r);\n\t\tc.quadTo(w, 0, w - Math.min(w / 2, r), 0);\n\t\tc.lineTo(Math.min(w / 2, r), 0);\n\t\tc.quadTo(0, 0, 0, r);\n\t\tc.lineTo(0, start);\n\t\tc.fillAndStroke();\n\t\t\n\t\tif (start < h)\n\t\t{\n\t\t\tif (fill == mxConstants.NONE)\n\t\t\t{\n\t\t\t\tc.pointerEvents = false;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tc.setFillColor(fill);\n\t\t\t}\n\t\t\t\n\t\t\tc.begin();\n\t\t\tc.moveTo(0, start);\n\t\t\tc.lineTo(0, h - r);\n\t\t\tc.quadTo(0, h, Math.min(w / 2, r), h);\n\t\t\tc.lineTo(w - Math.min(w / 2, r), h);\n\t\t\tc.quadTo(w, h, w, h - r);\n\t\t\tc.lineTo(w, start);\n\t\t\t\n\t\t\tif (fill == mxConstants.NONE)\n\t\t\t{\n\t\t\t\tc.stroke();\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tc.fillAndStroke();\n\t\t\t}\n\t\t}\n\t}\n\telse\n\t{\n\t\tc.moveTo(start, 0);\n\t\tc.lineTo(r, 0);\n\t\tc.quadTo(0, 0, 0, Math.min(h / 2, r));\n\t\tc.lineTo(0, h - Math.min(h / 2, r));\n\t\tc.quadTo(0, h, r, h);\n\t\tc.lineTo(start, h);\n\t\tc.fillAndStroke();\n\n\t\tif (start < w)\n\t\t{\n\t\t\tif (fill == mxConstants.NONE)\n\t\t\t{\n\t\t\t\tc.pointerEvents = false;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tc.setFillColor(fill);\n\t\t\t}\n\t\t\t\n\t\t\tc.begin();\n\t\t\tc.moveTo(start, h);\n\t\t\tc.lineTo(w - r, h);\n\t\t\tc.quadTo(w, h, w, h - Math.min(h / 2, r));\n\t\t\tc.lineTo(w, Math.min(h / 2, r));\n\t\t\tc.quadTo(w, 0, w - r, 0);\n\t\t\tc.lineTo(start, 0);\n\t\t\t\n\t\t\tif (fill == mxConstants.NONE)\n\t\t\t{\n\t\t\t\tc.stroke();\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tc.fillAndStroke();\n\t\t\t}\n\t\t}\n\t}\n\n\tif (swimlaneLine)\n\t{\n\t\tthis.paintDivider(c, x, y, w, h, start, fill == mxConstants.NONE);\n\t}\n};\n\n/**\n * Function: paintDivider\n *\n * Paints the divider between swimlane title and content area.\n */\nmxSwimlane.prototype.paintDivider = function(c, x, y, w, h, start, shadow)\n{\n\tif (!shadow)\n\t{\n\t\tc.setShadow(false);\n\t}\n\n\tc.begin();\n\t\n\tif (this.isHorizontal())\n\t{\n\t\tc.moveTo(0, start);\n\t\tc.lineTo(w, start);\n\t}\n\telse\n\t{\n\t\tc.moveTo(start, 0);\n\t\tc.lineTo(start, h);\n\t}\n\n\tc.stroke();\n};\n\n/**\n * Function: paintSeparator\n *\n * Paints the vertical or horizontal separator line between swimlanes.\n */\nmxSwimlane.prototype.paintSeparator = function(c, x, y, w, h, start, color)\n{\n\tif (color != mxConstants.NONE)\n\t{\n\t\tc.setStrokeColor(color);\n\t\tc.setDashed(true);\n\t\tc.begin();\n\t\t\n\t\tif (this.isHorizontal())\n\t\t{\n\t\t\tc.moveTo(w, start);\n\t\t\tc.lineTo(w, h);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tc.moveTo(start, 0);\n\t\t\tc.lineTo(w, 0);\n\t\t}\n\t\t\n\t\tc.stroke();\n\t\tc.setDashed(false);\n\t}\n};\n\n/**\n * Function: getImageBounds\n *\n * Paints the swimlane vertex shape.\n */\nmxSwimlane.prototype.getImageBounds = function(x, y, w, h)\n{\n\tif (this.isHorizontal())\n\t{\n\t\treturn new mxRectangle(x + w - this.imageSize, y, this.imageSize, this.imageSize);\n\t}\n\telse\n\t{\n\t\treturn new mxRectangle(x, y, this.imageSize, this.imageSize);\n\t}\n};\n"
  },
  {
    "path": "static/cherry/drawio_demo/src/js/shape/mxText.js",
    "content": "/**\n * Copyright (c) 2006-2015, JGraph Ltd\n * Copyright (c) 2006-2015, Gaudenz Alder\n */\n/**\n * Class: mxText\n *\n * Extends <mxShape> to implement a text shape. To change vertical text from\n * bottom to top to top to bottom, the following code can be used:\n * \n * (code)\n * mxText.prototype.verticalTextRotation = 90;\n * (end)\n * \n * Constructor: mxText\n *\n * Constructs a new text shape.\n * \n * Parameters:\n * \n * value - String that represents the text to be displayed. This is stored in\n * <value>.\n * bounds - <mxRectangle> that defines the bounds. This is stored in\n * <mxShape.bounds>.\n * align - Specifies the horizontal alignment. Default is ''. This is stored in\n * <align>.\n * valign - Specifies the vertical alignment. Default is ''. This is stored in\n * <valign>.\n * color - String that specifies the text color. Default is 'black'. This is\n * stored in <color>.\n * family - String that specifies the font family. Default is\n * <mxConstants.DEFAULT_FONTFAMILY>. This is stored in <family>.\n * size - Integer that specifies the font size. Default is\n * <mxConstants.DEFAULT_FONTSIZE>. This is stored in <size>.\n * fontStyle - Specifies the font style. Default is 0. This is stored in\n * <fontStyle>.\n * spacing - Integer that specifies the global spacing. Default is 2. This is\n * stored in <spacing>.\n * spacingTop - Integer that specifies the top spacing. Default is 0. The\n * sum of the spacing and this is stored in <spacingTop>.\n * spacingRight - Integer that specifies the right spacing. Default is 0. The\n * sum of the spacing and this is stored in <spacingRight>.\n * spacingBottom - Integer that specifies the bottom spacing. Default is 0.The\n * sum of the spacing and this is stored in <spacingBottom>.\n * spacingLeft - Integer that specifies the left spacing. Default is 0. The\n * sum of the spacing and this is stored in <spacingLeft>.\n * horizontal - Boolean that specifies if the label is horizontal. Default is\n * true. This is stored in <horizontal>.\n * background - String that specifies the background color. Default is null.\n * This is stored in <background>.\n * border - String that specifies the label border color. Default is null.\n * This is stored in <border>.\n * wrap - Specifies if word-wrapping should be enabled. Default is false.\n * This is stored in <wrap>.\n * clipped - Specifies if the label should be clipped. Default is false.\n * This is stored in <clipped>.\n * overflow - Value of the overflow style. Default is 'visible'.\n */\nfunction mxText(value, bounds, align, valign, color,\n\tfamily,\tsize, fontStyle, spacing, spacingTop, spacingRight,\n\tspacingBottom, spacingLeft, horizontal, background, border,\n\twrap, clipped, overflow, labelPadding, textDirection)\n{\n\tmxShape.call(this);\n\tthis.value = value;\n\tthis.bounds = bounds;\n\tthis.color = (color != null) ? color : 'black';\n\tthis.align = (align != null) ? align : mxConstants.ALIGN_CENTER;\n\tthis.valign = (valign != null) ? valign : mxConstants.ALIGN_MIDDLE;\n\tthis.family = (family != null) ? family : mxConstants.DEFAULT_FONTFAMILY;\n\tthis.size = (size != null) ? size : mxConstants.DEFAULT_FONTSIZE;\n\tthis.fontStyle = (fontStyle != null) ? fontStyle : mxConstants.DEFAULT_FONTSTYLE;\n\tthis.spacing = parseInt(spacing || 2);\n\tthis.spacingTop = this.spacing + parseInt(spacingTop || 0);\n\tthis.spacingRight = this.spacing + parseInt(spacingRight || 0);\n\tthis.spacingBottom = this.spacing + parseInt(spacingBottom || 0);\n\tthis.spacingLeft = this.spacing + parseInt(spacingLeft || 0);\n\tthis.horizontal = (horizontal != null) ? horizontal : true;\n\tthis.background = background;\n\tthis.border = border;\n\tthis.wrap = (wrap != null) ? wrap : false;\n\tthis.clipped = (clipped != null) ? clipped : false;\n\tthis.overflow = (overflow != null) ? overflow : 'visible';\n\tthis.labelPadding = (labelPadding != null) ? labelPadding : 0;\n\tthis.textDirection = textDirection;\n\tthis.rotation = 0;\n\tthis.updateMargin();\n};\n\n/**\n * Extends mxShape.\n */\nmxUtils.extend(mxText, mxShape);\n\n/**\n * Variable: baseSpacingTop\n * \n * Specifies the spacing to be added to the top spacing. Default is 0. Use the\n * value 5 here to get the same label positions as in mxGraph 1.x.\n */\nmxText.prototype.baseSpacingTop = 0;\n\n/**\n * Variable: baseSpacingBottom\n * \n * Specifies the spacing to be added to the bottom spacing. Default is 0. Use the\n * value 1 here to get the same label positions as in mxGraph 1.x.\n */\nmxText.prototype.baseSpacingBottom = 0;\n\n/**\n * Variable: baseSpacingLeft\n * \n * Specifies the spacing to be added to the left spacing. Default is 0.\n */\nmxText.prototype.baseSpacingLeft = 0;\n\n/**\n * Variable: baseSpacingRight\n * \n * Specifies the spacing to be added to the right spacing. Default is 0.\n */\nmxText.prototype.baseSpacingRight = 0;\n\n/**\n * Variable: replaceLinefeeds\n * \n * Specifies if linefeeds in HTML labels should be replaced with BR tags.\n * Default is true.\n */\nmxText.prototype.replaceLinefeeds = true;\n\n/**\n * Variable: verticalTextRotation\n * \n * Rotation for vertical text. Default is -90 (bottom to top).\n */\nmxText.prototype.verticalTextRotation = -90;\n\n/**\n * Variable: ignoreClippedStringSize\n * \n * Specifies if the string size should be measured in <updateBoundingBox> if\n * the label is clipped and the label position is center and middle. If this is\n * true, then the bounding box will be set to <bounds>. Default is true.\n * <ignoreStringSize> has precedence over this switch.\n */\nmxText.prototype.ignoreClippedStringSize = true;\n\n/**\n * Variable: ignoreStringSize\n * \n * Specifies if the actual string size should be measured. If disabled the\n * boundingBox will not ignore the actual size of the string, otherwise\n * <bounds> will be used instead. Default is false.\n */\nmxText.prototype.ignoreStringSize = false;\n\n/**\n * Variable: textWidthPadding\n * \n * Specifies the padding to be added to the text width for the bounding box.\n * This is needed to make sure no clipping is applied to borders. Default is 4\n * for IE 8 standards mode and 3 for all others.\n */\nmxText.prototype.textWidthPadding = (document.documentMode == 8 && !mxClient.IS_EM) ? 4 : 3;\n\n/**\n * Variable: lastValue\n * \n * Contains the last rendered text value. Used for caching.\n */\nmxText.prototype.lastValue = null;\n\n/**\n * Variable: cacheEnabled\n * \n * Specifies if caching for HTML labels should be enabled. Default is true.\n */\nmxText.prototype.cacheEnabled = true;\n\n/**\n * Function: isParseVml\n * \n * Text shapes do not contain VML markup and do not need to be parsed. This\n * method returns false to speed up rendering in IE8.\n */\nmxText.prototype.isParseVml = function()\n{\n\treturn false;\n};\n\n/**\n * Function: isHtmlAllowed\n * \n * Returns true if HTML is allowed for this shape. This implementation returns\n * true if the browser is not in IE8 standards mode.\n */\nmxText.prototype.isHtmlAllowed = function()\n{\n\treturn document.documentMode != 8 || mxClient.IS_EM;\n};\n\n/**\n * Function: getSvgScreenOffset\n * \n * Disables offset in IE9 for crisper image output.\n */\nmxText.prototype.getSvgScreenOffset = function()\n{\n\treturn 0;\n};\n\n/**\n * Function: checkBounds\n * \n * Returns true if the bounds are not null and all of its variables are numeric.\n */\nmxText.prototype.checkBounds = function()\n{\n\treturn (!isNaN(this.scale) && isFinite(this.scale) && this.scale > 0 &&\n\t\t\tthis.bounds != null && !isNaN(this.bounds.x) && !isNaN(this.bounds.y) &&\n\t\t\t!isNaN(this.bounds.width) && !isNaN(this.bounds.height));\n};\n\n/**\n * Function: paint\n * \n * Generic rendering code.\n */\nmxText.prototype.paint = function(c, update)\n{\n\t// Scale is passed-through to canvas\n\tvar s = this.scale;\n\tvar x = this.bounds.x / s;\n\tvar y = this.bounds.y / s;\n\tvar w = this.bounds.width / s;\n\tvar h = this.bounds.height / s;\n\t\n\tthis.updateTransform(c, x, y, w, h);\n\tthis.configureCanvas(c, x, y, w, h);\n\n\tvar unscaledWidth = (this.state != null) ? this.state.unscaledWidth : null;\n\n\tif (update)\n\t{\n\t\tif (this.node.firstChild != null && (unscaledWidth == null ||\n\t\t\tthis.lastUnscaledWidth != unscaledWidth))\n\t\t{\n\t\t\tc.invalidateCachedOffsetSize(this.node);\n\t\t}\n\n\t\tc.updateText(x, y, w, h, this.align, this.valign, this.wrap, this.overflow,\n\t\t\t\tthis.clipped, this.getTextRotation(), this.node);\n\t}\n\telse\n\t{\n\t\t// Checks if text contains HTML markup\n\t\tvar realHtml = mxUtils.isNode(this.value) || this.dialect == mxConstants.DIALECT_STRICTHTML;\n\t\t\n\t\t// Always renders labels as HTML in VML\n\t\tvar fmt = (realHtml || c instanceof mxVmlCanvas2D) ? 'html' : '';\n\t\tvar val = this.value;\n\t\t\n\t\tif (!realHtml && fmt == 'html')\n\t\t{\n\t\t\tval =  mxUtils.htmlEntities(val, false);\n\t\t}\n\t\t\n\t\tif (fmt == 'html' && !mxUtils.isNode(this.value))\n\t\t{\n\t\t\tval = mxUtils.replaceTrailingNewlines(val, '<div><br></div>');\t\t\t\n\t\t}\n\t\t\n\t\t// Handles trailing newlines to make sure they are visible in rendering output\n\t\tval = (!mxUtils.isNode(this.value) && this.replaceLinefeeds && fmt == 'html') ?\n\t\t\tval.replace(/\\n/g, '<br/>') : val;\n\t\t\t\n\t\tvar dir = this.textDirection;\n\t\n\t\tif (dir == mxConstants.TEXT_DIRECTION_AUTO && !realHtml)\n\t\t{\n\t\t\tdir = this.getAutoDirection();\n\t\t}\n\t\t\n\t\tif (dir != mxConstants.TEXT_DIRECTION_LTR && dir != mxConstants.TEXT_DIRECTION_RTL)\n\t\t{\n\t\t\tdir = null;\n\t\t}\n\t\n\t\tc.text(x, y, w, h, val, this.align, this.valign, this.wrap, fmt, this.overflow,\n\t\t\tthis.clipped, this.getTextRotation(), dir);\n\t}\n\t\n\t// Needs to invalidate the cached offset widths if the geometry changes\n\tthis.lastUnscaledWidth = unscaledWidth;\n};\n\n/**\n * Function: redraw\n * \n * Renders the text using the given DOM nodes.\n */\nmxText.prototype.redraw = function()\n{\n\tif (this.visible && this.checkBounds() && this.cacheEnabled && this.lastValue == this.value &&\n\t\t(mxUtils.isNode(this.value) || this.dialect == mxConstants.DIALECT_STRICTHTML))\n\t{\n\t\tif (this.node.nodeName == 'DIV' && (this.isHtmlAllowed() || !mxClient.IS_VML))\n\t\t{\n\t\t\tthis.updateSize(this.node, (this.state == null || this.state.view.textDiv == null));\n\n\t\t\tif (mxClient.IS_IE && (document.documentMode == null || document.documentMode <= 8))\n\t\t\t{\n\t\t\t\tthis.updateHtmlFilter();\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tthis.updateHtmlTransform();\n\t\t\t}\n\t\t\t\n\t\t\tthis.updateBoundingBox();\n\t\t}\n\t\telse\n\t\t{\n\t\t\tvar canvas = this.createCanvas();\n\n\t\t\tif (canvas != null && canvas.updateText != null &&\n\t\t\t\tcanvas.invalidateCachedOffsetSize != null)\n\t\t\t{\n\t\t\t\tthis.paint(canvas, true);\n\t\t\t\tthis.destroyCanvas(canvas);\n\t\t\t\tthis.updateBoundingBox();\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// Fallback if canvas does not support updateText (VML)\n\t\t\t\tmxShape.prototype.redraw.apply(this, arguments);\n\t\t\t}\n\t\t}\n\t}\n\telse\n\t{\n\t\tmxShape.prototype.redraw.apply(this, arguments);\n\t\t\n\t\tif (mxUtils.isNode(this.value) || this.dialect == mxConstants.DIALECT_STRICTHTML)\n\t\t{\n\t\t\tthis.lastValue = this.value;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tthis.lastValue = null;\n\t\t}\n\t}\n};\n\n/**\n * Function: resetStyles\n * \n * Resets all styles.\n */\nmxText.prototype.resetStyles = function()\n{\n\tmxShape.prototype.resetStyles.apply(this, arguments);\n\t\n\tthis.color = 'black';\n\tthis.align = mxConstants.ALIGN_CENTER;\n\tthis.valign = mxConstants.ALIGN_MIDDLE;\n\tthis.family = mxConstants.DEFAULT_FONTFAMILY;\n\tthis.size = mxConstants.DEFAULT_FONTSIZE;\n\tthis.fontStyle = mxConstants.DEFAULT_FONTSTYLE;\n\tthis.spacing = 2;\n\tthis.spacingTop = 2;\n\tthis.spacingRight = 2;\n\tthis.spacingBottom = 2;\n\tthis.spacingLeft = 2;\n\tthis.horizontal = true;\n\tdelete this.background;\n\tdelete this.border;\n\tthis.textDirection = mxConstants.DEFAULT_TEXT_DIRECTION;\n\tdelete this.margin;\n};\n\n/**\n * Function: apply\n * \n * Extends mxShape to update the text styles.\n *\n * Parameters:\n *\n * state - <mxCellState> of the corresponding cell.\n */\nmxText.prototype.apply = function(state)\n{\n\tvar old = this.spacing;\n\tmxShape.prototype.apply.apply(this, arguments);\n\t\n\tif (this.style != null)\n\t{\n\t\tthis.fontStyle = mxUtils.getValue(this.style, mxConstants.STYLE_FONTSTYLE, this.fontStyle);\n\t\tthis.family = mxUtils.getValue(this.style, mxConstants.STYLE_FONTFAMILY, this.family);\n\t\tthis.size = mxUtils.getValue(this.style, mxConstants.STYLE_FONTSIZE, this.size);\n\t\tthis.color = mxUtils.getValue(this.style, mxConstants.STYLE_FONTCOLOR, this.color);\n\t\tthis.align = mxUtils.getValue(this.style, mxConstants.STYLE_ALIGN, this.align);\n\t\tthis.valign = mxUtils.getValue(this.style, mxConstants.STYLE_VERTICAL_ALIGN, this.valign);\n\t\tthis.spacing = parseInt(mxUtils.getValue(this.style, mxConstants.STYLE_SPACING, this.spacing));\n\t\tthis.spacingTop = parseInt(mxUtils.getValue(this.style, mxConstants.STYLE_SPACING_TOP, this.spacingTop - old)) + this.spacing;\n\t\tthis.spacingRight = parseInt(mxUtils.getValue(this.style, mxConstants.STYLE_SPACING_RIGHT, this.spacingRight - old)) + this.spacing;\n\t\tthis.spacingBottom = parseInt(mxUtils.getValue(this.style, mxConstants.STYLE_SPACING_BOTTOM, this.spacingBottom - old)) + this.spacing;\n\t\tthis.spacingLeft = parseInt(mxUtils.getValue(this.style, mxConstants.STYLE_SPACING_LEFT, this.spacingLeft - old)) + this.spacing;\n\t\tthis.horizontal = mxUtils.getValue(this.style, mxConstants.STYLE_HORIZONTAL, this.horizontal);\n\t\tthis.background = mxUtils.getValue(this.style, mxConstants.STYLE_LABEL_BACKGROUNDCOLOR, this.background);\n\t\tthis.border = mxUtils.getValue(this.style, mxConstants.STYLE_LABEL_BORDERCOLOR, this.border);\n\t\tthis.textDirection = mxUtils.getValue(this.style, mxConstants.STYLE_TEXT_DIRECTION, mxConstants.DEFAULT_TEXT_DIRECTION);\n\t\tthis.opacity = mxUtils.getValue(this.style, mxConstants.STYLE_TEXT_OPACITY, 100);\n\t\tthis.updateMargin();\n\t}\n\t\n\tthis.flipV = null;\n\tthis.flipH = null;\n};\n\n/**\n * Function: getAutoDirection\n * \n * Used to determine the automatic text direction. Returns\n * <mxConstants.TEXT_DIRECTION_LTR> or <mxConstants.TEXT_DIRECTION_RTL>\n * depending on the contents of <value>. This is not invoked for HTML, wrapped\n * content or if <value> is a DOM node.\n */\nmxText.prototype.getAutoDirection = function()\n{\n\t// Looks for strong (directional) characters\n\tvar tmp = /[A-Za-z\\u05d0-\\u065f\\u066a-\\u06ef\\u06fa-\\u07ff\\ufb1d-\\ufdff\\ufe70-\\ufefc]/.exec(this.value);\n\t\n\t// Returns the direction defined by the character\n\treturn (tmp != null && tmp.length > 0 && tmp[0] > 'z') ?\n\t\tmxConstants.TEXT_DIRECTION_RTL : mxConstants.TEXT_DIRECTION_LTR;\n};\n\n/**\n * Function: updateBoundingBox\n *\n * Updates the <boundingBox> for this shape using the given node and position.\n */\nmxText.prototype.updateBoundingBox = function()\n{\n\tvar node = this.node;\n\tthis.boundingBox = this.bounds.clone();\n\tvar rot = this.getTextRotation();\n\t\n\tvar h = (this.style != null) ? mxUtils.getValue(this.style, mxConstants.STYLE_LABEL_POSITION, mxConstants.ALIGN_CENTER) : null;\n\tvar v = (this.style != null) ? mxUtils.getValue(this.style, mxConstants.STYLE_VERTICAL_LABEL_POSITION, mxConstants.ALIGN_MIDDLE) : null;\n\n\tif (!this.ignoreStringSize && node != null && this.overflow != 'fill' && (!this.clipped ||\n\t\t!this.ignoreClippedStringSize || h != mxConstants.ALIGN_CENTER || v != mxConstants.ALIGN_MIDDLE))\n\t{\n\t\tvar ow = null;\n\t\tvar oh = null;\n\t\t\n\t\tif (node.ownerSVGElement != null)\n\t\t{\n\t\t\tif (node.firstChild != null && node.firstChild.firstChild != null &&\n\t\t\t\tnode.firstChild.firstChild.nodeName == 'foreignObject')\n\t\t\t{\n\t\t\t\tnode = node.firstChild.firstChild;\n\t\t\t\tow = parseInt(node.getAttribute('width')) * this.scale;\n\t\t\t\toh = parseInt(node.getAttribute('height')) * this.scale;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tvar b = node.getBBox();\n\t\t\t\t\t\n\t\t\t\t\t// Workaround for bounding box of empty string\n\t\t\t\t\tif (typeof(this.value) == 'string' && mxUtils.trim(this.value) == 0)\n\t\t\t\t\t{\n\t\t\t\t\t\tthis.boundingBox = null;\n\t\t\t\t\t}\n\t\t\t\t\telse if (b.width == 0 && b.height == 0)\n\t\t\t\t\t{\n\t\t\t\t\t\tthis.boundingBox = null;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tthis.boundingBox = new mxRectangle(b.x, b.y, b.width, b.height);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tcatch (e)\n\t\t\t\t{\n\t\t\t\t\t// Ignores NS_ERROR_FAILURE in FF if container display is none.\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tvar td = (this.state != null) ? this.state.view.textDiv : null;\n\n\t\t\t// Use cached offset size\n\t\t\tif (this.offsetWidth != null && this.offsetHeight != null)\n\t\t\t{\n\t\t\t\tow = this.offsetWidth * this.scale;\n\t\t\t\toh = this.offsetHeight * this.scale;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// Cannot get node size while container hidden so a\n\t\t\t\t// shared temporary DIV is used for text measuring\n\t\t\t\tif (td != null)\n\t\t\t\t{\n\t\t\t\t\tthis.updateFont(td);\n\t\t\t\t\tthis.updateSize(td, false);\n\t\t\t\t\tthis.updateInnerHtml(td);\n\n\t\t\t\t\tnode = td;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tvar sizeDiv = node;\n\n\t\t\t\tif (document.documentMode == 8 && !mxClient.IS_EM)\n\t\t\t\t{\n\t\t\t\t\tvar w = Math.round(this.bounds.width / this.scale);\n\t\n\t\t\t\t\tif (this.wrap && w > 0)\n\t\t\t\t\t{\n\t\t\t\t\t\tnode.style.wordWrap = mxConstants.WORD_WRAP;\n\t\t\t\t\t\tnode.style.whiteSpace = 'normal';\n\n\t\t\t\t\t\tif (node.style.wordWrap != 'break-word')\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t// Innermost DIV is used for measuring text\n\t\t\t\t\t\t\tvar divs = sizeDiv.getElementsByTagName('div');\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif (divs.length > 0)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tsizeDiv = divs[divs.length - 1];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tow = sizeDiv.offsetWidth + 2;\n\t\t\t\t\t\t\tdivs = this.node.getElementsByTagName('div');\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif (this.clipped)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tow = Math.min(w, ow);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Second last DIV width must be updated in DOM tree\n\t\t\t\t\t\t\tif (divs.length > 1)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tdivs[divs.length - 2].style.width = ow + 'px';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tnode.style.whiteSpace = 'nowrap';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if (sizeDiv.firstChild != null && sizeDiv.firstChild.nodeName == 'DIV')\n\t\t\t\t{\n\t\t\t\t\tsizeDiv = sizeDiv.firstChild;\n\t\t\t\t}\n\n\t\t\t\tthis.offsetWidth = sizeDiv.offsetWidth + this.textWidthPadding;\n\t\t\t\tthis.offsetHeight = sizeDiv.offsetHeight;\n\t\t\t\t\n\t\t\t\tow = this.offsetWidth * this.scale;\n\t\t\t\toh = this.offsetHeight * this.scale;\n\t\t\t}\n\t\t}\n\n\t\tif (ow != null && oh != null)\n\t\t{\t\n\t\t\tthis.boundingBox = new mxRectangle(this.bounds.x,\n\t\t\t\tthis.bounds.y, ow, oh);\n\t\t}\n\t}\n\n\tif (this.boundingBox != null)\n\t{\n\t\tif (rot != 0)\n\t\t{\n\t\t\t// Accounts for pre-rotated x and y\n\t\t\tvar bbox = mxUtils.getBoundingBox(new mxRectangle(\n\t\t\t\tthis.margin.x * this.boundingBox.width,\n\t\t\t\tthis.margin.y * this.boundingBox.height,\n\t\t\t\tthis.boundingBox.width, this.boundingBox.height),\n\t\t\t\trot, new mxPoint(0, 0));\n\t\t\t\n\t\t\tthis.unrotatedBoundingBox = mxRectangle.fromRectangle(this.boundingBox);\n\t\t\tthis.unrotatedBoundingBox.x += this.margin.x * this.unrotatedBoundingBox.width;\n\t\t\tthis.unrotatedBoundingBox.y += this.margin.y * this.unrotatedBoundingBox.height;\n\t\t\t\n\t\t\tthis.boundingBox.x += bbox.x;\n\t\t\tthis.boundingBox.y += bbox.y;\n\t\t\tthis.boundingBox.width = bbox.width;\n\t\t\tthis.boundingBox.height = bbox.height;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tthis.boundingBox.x += this.margin.x * this.boundingBox.width;\n\t\t\tthis.boundingBox.y += this.margin.y * this.boundingBox.height;\n\t\t\tthis.unrotatedBoundingBox = null;\n\t\t}\n\t}\n};\n\n/**\n * Function: getShapeRotation\n * \n * Returns 0 to avoid using rotation in the canvas via updateTransform.\n */\nmxText.prototype.getShapeRotation = function()\n{\n\treturn 0;\n};\n\n/**\n * Function: getTextRotation\n * \n * Returns the rotation for the text label of the corresponding shape.\n */\nmxText.prototype.getTextRotation = function()\n{\n\treturn (this.state != null && this.state.shape != null) ? this.state.shape.getTextRotation() : 0;\n};\n\n/**\n * Function: isPaintBoundsInverted\n * \n * Inverts the bounds if <mxShape.isBoundsInverted> returns true or if the\n * horizontal style is false.\n */\nmxText.prototype.isPaintBoundsInverted = function()\n{\n\treturn !this.horizontal && this.state != null && this.state.view.graph.model.isVertex(this.state.cell);\n};\n\n/**\n * Function: configureCanvas\n * \n * Sets the state of the canvas for drawing the shape.\n */\nmxText.prototype.configureCanvas = function(c, x, y, w, h)\n{\n\tmxShape.prototype.configureCanvas.apply(this, arguments);\n\t\n\tc.setFontColor(this.color);\n\tc.setFontBackgroundColor(this.background);\n\tc.setFontBorderColor(this.border);\n\tc.setFontFamily(this.family);\n\tc.setFontSize(this.size);\n\tc.setFontStyle(this.fontStyle);\n};\n\n/**\n * Function: updateVmlContainer\n * \n * Sets the width and height of the container to 1px.\n */\nmxText.prototype.updateVmlContainer = function()\n{\n\tthis.node.style.left = Math.round(this.bounds.x) + 'px';\n\tthis.node.style.top = Math.round(this.bounds.y) + 'px';\n\tthis.node.style.width = '1px';\n\tthis.node.style.height = '1px';\n\tthis.node.style.overflow = 'visible';\n};\n\n/**\n * Function: redrawHtmlShape\n *\n * Updates the HTML node(s) to reflect the latest bounds and scale.\n */\nmxText.prototype.redrawHtmlShape = function()\n{\n\tvar style = this.node.style;\n\n\t// Resets CSS styles\n\tstyle.whiteSpace = 'normal';\n\tstyle.overflow = '';\n\tstyle.width = '';\n\tstyle.height = '';\n\t\n\tthis.updateValue();\n\tthis.updateFont(this.node);\n\tthis.updateSize(this.node, (this.state == null || this.state.view.textDiv == null));\n\t\n\tthis.offsetWidth = null;\n\tthis.offsetHeight = null;\n\n\tif (mxClient.IS_IE && (document.documentMode == null || document.documentMode <= 8))\n\t{\n\t\tthis.updateHtmlFilter();\n\t}\n\telse\n\t{\n\t\tthis.updateHtmlTransform();\n\t}\n};\n\n/**\n * Function: updateHtmlTransform\n *\n * Returns the spacing as an <mxPoint>.\n */\nmxText.prototype.updateHtmlTransform = function()\n{\n\tvar theta = this.getTextRotation();\n\tvar style = this.node.style;\n\tvar dx = this.margin.x;\n\tvar dy = this.margin.y;\n\t\n\tif (theta != 0)\n\t{\n\t\tmxUtils.setPrefixedStyle(style, 'transformOrigin', (-dx * 100) + '%' + ' ' + (-dy * 100) + '%');\n\t\tmxUtils.setPrefixedStyle(style, 'transform', 'translate(' + (dx * 100) + '%' + ',' + (dy * 100) + '%)' +\n\t\t\t'scale(' + this.scale + ') rotate(' + theta + 'deg)');\n\t}\n\telse\n\t{\n\t\tmxUtils.setPrefixedStyle(style, 'transformOrigin', '0% 0%');\n\t\tmxUtils.setPrefixedStyle(style, 'transform', 'scale(' + this.scale + ')' +\n\t\t\t'translate(' + (dx * 100) + '%' + ',' + (dy * 100) + '%)');\n\t}\n\n\tstyle.left = Math.round(this.bounds.x - Math.ceil(dx * ((this.overflow != 'fill' &&\n\t\tthis.overflow != 'width') ? 3 : 1))) + 'px';\n\tstyle.top = Math.round(this.bounds.y - dy * ((this.overflow != 'fill') ? 3 : 1)) + 'px';\n\t\n\tif (this.opacity < 100)\n\t{\n\t\tstyle.opacity = this.opacity / 100;\n\t}\n\telse\n\t{\n\t\tstyle.opacity = '';\n\t}\n};\n\n/**\n * Function: setInnerHtml\n * \n * Sets the inner HTML of the given element to the <value>.\n */\nmxText.prototype.updateInnerHtml = function(elt)\n{\n\tif (mxUtils.isNode(this.value))\n\t{\n\t\telt.innerHTML = this.value.outerHTML;\n\t}\n\telse\n\t{\n\t\tvar val = this.value;\n\t\t\n\t\tif (this.dialect != mxConstants.DIALECT_STRICTHTML)\n\t\t{\n\t\t\t// LATER: Can be cached in updateValue\n\t\t\tval = mxUtils.htmlEntities(val, false);\n\t\t}\n\t\t\n\t\t// Handles trailing newlines to make sure they are visible in rendering output\n\t\tval = mxUtils.replaceTrailingNewlines(val, '<div>&nbsp;</div>');\n\t\tval = (this.replaceLinefeeds) ? val.replace(/\\n/g, '<br/>') : val;\n\t\tval = '<div style=\"display:inline-block;_display:inline;\">' + val + '</div>';\n\t\t\n\t\telt.innerHTML = val;\n\t}\n};\n\n/**\n * Function: updateHtmlFilter\n *\n * Rotated text rendering quality is bad for IE9 quirks/IE8 standards\n */\nmxText.prototype.updateHtmlFilter = function()\n{\n\tvar style = this.node.style;\n\tvar dx = this.margin.x;\n\tvar dy = this.margin.y;\n\tvar s = this.scale;\n\t\n\t// Resets filter before getting offsetWidth\n\tmxUtils.setOpacity(this.node, this.opacity);\n\t\n\t// Adds 1 to match table height in 1.x\n\tvar ow = 0;\n\tvar oh = 0;\n\tvar td = (this.state != null) ? this.state.view.textDiv : null;\n\tvar sizeDiv = this.node;\n\t\n\t// Fallback for hidden text rendering in IE quirks mode\n\tif (td != null)\n\t{\n\t\ttd.style.overflow = '';\n\t\ttd.style.height = '';\n\t\ttd.style.width = '';\n\t\t\n\t\tthis.updateFont(td);\n\t\tthis.updateSize(td, false);\n\t\tthis.updateInnerHtml(td);\n\t\t\n\t\tvar w = Math.round(this.bounds.width / this.scale);\n\n\t\tif (this.wrap && w > 0)\n\t\t{\n\t\t\ttd.style.whiteSpace = 'normal';\n\t\t\ttd.style.wordWrap = mxConstants.WORD_WRAP;\n\t\t\tow = w;\n\t\t\t\n\t\t\tif (this.clipped)\n\t\t\t{\n\t\t\t\tow = Math.min(ow, this.bounds.width);\n\t\t\t}\n\n\t\t\ttd.style.width = ow + 'px';\n\t\t}\n\t\telse\n\t\t{\n\t\t\ttd.style.whiteSpace = 'nowrap';\n\t\t}\n\t\t\n\t\tsizeDiv = td;\n\t\t\n\t\tif (sizeDiv.firstChild != null && sizeDiv.firstChild.nodeName == 'DIV')\n\t\t{\n\t\t\tsizeDiv = sizeDiv.firstChild;\n\t\t\t\n\t\t\tif (this.wrap && td.style.wordWrap == 'break-word')\n\t\t\t{\n\t\t\t\tsizeDiv.style.width = '100%';\n\t\t\t}\n\t\t}\n\n\t\t// Required to update the height of the text box after wrapping width is known \n\t\tif (!this.clipped && this.wrap && w > 0)\n\t\t{\n\t\t\tow = sizeDiv.offsetWidth + this.textWidthPadding;\n\t\t\ttd.style.width = ow + 'px';\n\t\t}\n\t\t\n\t\toh = sizeDiv.offsetHeight + 2;\n\t\t\n\t\tif (mxClient.IS_QUIRKS && this.border != null && this.border != mxConstants.NONE)\n\t\t{\n\t\t\toh += 3;\n\t\t}\n\t}\n\telse if (sizeDiv.firstChild != null && sizeDiv.firstChild.nodeName == 'DIV')\n\t{\n\t\tsizeDiv = sizeDiv.firstChild;\n\t\toh = sizeDiv.offsetHeight;\n\t}\n\n\tow = sizeDiv.offsetWidth + this.textWidthPadding;\n\t\n\tif (this.clipped)\n\t{\n\t\toh = Math.min(oh, this.bounds.height);\n\t}\n\n\tvar w = this.bounds.width / s;\n\tvar h = this.bounds.height / s;\n\n\t// Handles special case for live preview with no wrapper DIV and no textDiv\n\tif (this.overflow == 'fill')\n\t{\n\t\toh = h;\n\t\tow = w;\n\t}\n\telse if (this.overflow == 'width')\n\t{\n\t\toh = sizeDiv.scrollHeight;\n\t\tow = w;\n\t}\n\t\n\t// Stores for later use\n\tthis.offsetWidth = ow;\n\tthis.offsetHeight = oh;\n\t\n\t// Simulates max-height CSS in quirks mode\n\tif (mxClient.IS_QUIRKS && (this.clipped || (this.overflow == 'width' && h > 0)))\n\t{\n\t\th = Math.min(h, oh);\n\t\tstyle.height = Math.round(h) + 'px';\n\t}\n\telse\n\t{\n\t\th = oh;\n\t}\n\n\tif (this.overflow != 'fill' && this.overflow != 'width')\n\t{\n\t\tif (this.clipped)\n\t\t{\n\t\t\tow = Math.min(w, ow);\n\t\t}\n\t\t\n\t\tw = ow;\n\n\t\t// Simulates max-width CSS in quirks mode\n\t\tif ((mxClient.IS_QUIRKS && this.clipped) || this.wrap)\n\t\t{\n\t\t\tstyle.width = Math.round(w) + 'px';\n\t\t}\n\t}\n\n\th *= s;\n\tw *= s;\n\t\n\t// Rotation case is handled via VML canvas\n\tvar rad = this.getTextRotation() * (Math.PI / 180);\n\t\n\t// Precalculate cos and sin for the rotation\n\tvar real_cos = parseFloat(parseFloat(Math.cos(rad)).toFixed(8));\n\tvar real_sin = parseFloat(parseFloat(Math.sin(-rad)).toFixed(8));\n\n\trad %= 2 * Math.PI;\n\t\n\tif (rad < 0)\n\t{\n\t\trad += 2 * Math.PI;\n\t}\n\t\n\trad %= Math.PI;\n\t\n\tif (rad > Math.PI / 2)\n\t{\n\t\trad = Math.PI - rad;\n\t}\n\t\n\tvar cos = Math.cos(rad);\n\tvar sin = Math.sin(-rad);\n\n\tvar tx = w * -(dx + 0.5);\n\tvar ty = h * -(dy + 0.5);\n\n\tvar top_fix = (h - h * cos + w * sin) / 2 + real_sin * tx - real_cos * ty;\n\tvar left_fix = (w - w * cos + h * sin) / 2 - real_cos * tx - real_sin * ty;\n\t\n\tif (rad != 0)\n\t{\n\t\tvar f = 'progid:DXImageTransform.Microsoft.Matrix(M11=' + real_cos + ', M12='+\n\t\t\treal_sin + ', M21=' + (-real_sin) + ', M22=' + real_cos + ', sizingMethod=\\'auto expand\\')';\n\t\t\n\t\tif (style.filter != null && style.filter.length > 0)\n\t\t{\n\t\t\tstyle.filter += ' ' + f;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tstyle.filter = f;\n\t\t}\n\t}\n\t\n\t// Workaround for rendering offsets\n\tvar dy = 0;\n\t\n\tif (this.overflow != 'fill' && mxClient.IS_QUIRKS)\n\t{\n\t\tif (this.valign == mxConstants.ALIGN_TOP)\n\t\t{\n\t\t\tdy -= 1;\n\t\t}\n\t\telse if (this.valign == mxConstants.ALIGN_BOTTOM)\n\t\t{\n\t\t\tdy += 2;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tdy += 1;\n\t\t}\n\t}\n\n\tstyle.zoom = s;\n\tstyle.left = Math.round(this.bounds.x + left_fix - w / 2) + 'px';\n\tstyle.top = Math.round(this.bounds.y + top_fix - h / 2 + dy) + 'px';\n};\n\n/**\n * Function: updateValue\n *\n * Updates the HTML node(s) to reflect the latest bounds and scale.\n */\nmxText.prototype.updateValue = function()\n{\n\tif (mxUtils.isNode(this.value))\n\t{\n\t\tthis.node.innerHTML = '';\n\t\tthis.node.appendChild(this.value);\n\t}\n\telse\n\t{\n\t\tvar val = this.value;\n\t\t\n\t\tif (this.dialect != mxConstants.DIALECT_STRICTHTML)\n\t\t{\n\t\t\tval = mxUtils.htmlEntities(val, false);\n\t\t}\n\t\t\n\t\t// Handles trailing newlines to make sure they are visible in rendering output\n\t\tval = mxUtils.replaceTrailingNewlines(val, '<div><br></div>');\n\t\tval = (this.replaceLinefeeds) ? val.replace(/\\n/g, '<br/>') : val;\n\t\tvar bg = (this.background != null && this.background != mxConstants.NONE) ? this.background : null;\n\t\tvar bd = (this.border != null && this.border != mxConstants.NONE) ? this.border : null;\n\n\t\tif (this.overflow == 'fill' || this.overflow == 'width')\n\t\t{\n\t\t\tif (bg != null)\n\t\t\t{\n\t\t\t\tthis.node.style.backgroundColor = bg;\n\t\t\t}\n\t\t\t\n\t\t\tif (bd != null)\n\t\t\t{\n\t\t\t\tthis.node.style.border = '1px solid ' + bd;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tvar css = '';\n\t\t\t\n\t\t\tif (bg != null)\n\t\t\t{\n\t\t\t\tcss += 'background-color:' + bg + ';';\n\t\t\t}\n\t\t\t\n\t\t\tif (bd != null)\n\t\t\t{\n\t\t\t\tcss += 'border:1px solid ' + bd + ';';\n\t\t\t}\n\t\t\t\n\t\t\t// Wrapper DIV for background, zoom needed for inline in quirks\n\t\t\t// and to measure wrapped font sizes in all browsers\n\t\t\t// FIXME: Background size in quirks mode for wrapped text\n\t\t\tvar lh = (mxConstants.ABSOLUTE_LINE_HEIGHT) ? (this.size * mxConstants.LINE_HEIGHT) + 'px' :\n\t\t\t\tmxConstants.LINE_HEIGHT;\n\t\t\tval = '<div style=\"zoom:1;' + css + 'display:inline-block;_display:inline;text-decoration:inherit;' +\n\t\t\t\t'padding-bottom:1px;padding-right:1px;line-height:' + lh + '\">' + val + '</div>';\n\t\t}\n\n\t\tthis.node.innerHTML = val;\n\t\t\n\t\t// Sets text direction\n\t\tvar divs = this.node.getElementsByTagName('div');\n\t\t\n\t\tif (divs.length > 0)\n\t\t{\n\t\t\tvar dir = this.textDirection;\n\n\t\t\tif (dir == mxConstants.TEXT_DIRECTION_AUTO && this.dialect != mxConstants.DIALECT_STRICTHTML)\n\t\t\t{\n\t\t\t\tdir = this.getAutoDirection();\n\t\t\t}\n\t\t\t\n\t\t\tif (dir == mxConstants.TEXT_DIRECTION_LTR || dir == mxConstants.TEXT_DIRECTION_RTL)\n\t\t\t{\n\t\t\t\tdivs[divs.length - 1].setAttribute('dir', dir);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tdivs[divs.length - 1].removeAttribute('dir');\n\t\t\t}\n\t\t}\n\t}\n};\n\n/**\n * Function: updateFont\n *\n * Updates the HTML node(s) to reflect the latest bounds and scale.\n */\nmxText.prototype.updateFont = function(node)\n{\n\tvar style = node.style;\n\t\n\tstyle.lineHeight = (mxConstants.ABSOLUTE_LINE_HEIGHT) ? (this.size * mxConstants.LINE_HEIGHT) + 'px' : mxConstants.LINE_HEIGHT;\n\tstyle.fontSize = this.size + 'px';\n\tstyle.fontFamily = this.family;\n\tstyle.verticalAlign = 'top';\n\tstyle.color = this.color;\n\t\n\tif ((this.fontStyle & mxConstants.FONT_BOLD) == mxConstants.FONT_BOLD)\n\t{\n\t\tstyle.fontWeight = 'bold';\n\t}\n\telse\n\t{\n\t\tstyle.fontWeight = '';\n\t}\n\n\tif ((this.fontStyle & mxConstants.FONT_ITALIC) == mxConstants.FONT_ITALIC)\n\t{\n\t\tstyle.fontStyle = 'italic';\n\t}\n\telse\n\t{\n\t\tstyle.fontStyle = '';\n\t}\n\t\n\tif ((this.fontStyle & mxConstants.FONT_UNDERLINE) == mxConstants.FONT_UNDERLINE)\n\t{\n\t\tstyle.textDecoration = 'underline';\n\t}\n\telse\n\t{\n\t\tstyle.textDecoration = '';\n\t}\n\t\n\tif (this.align == mxConstants.ALIGN_CENTER)\n\t{\n\t\tstyle.textAlign = 'center';\n\t}\n\telse if (this.align == mxConstants.ALIGN_RIGHT)\n\t{\n\t\tstyle.textAlign = 'right';\n\t}\n\telse\n\t{\n\t\tstyle.textAlign = 'left';\n\t}\n};\n\n/**\n * Function: updateSize\n *\n * Updates the HTML node(s) to reflect the latest bounds and scale.\n */\nmxText.prototype.updateSize = function(node, enableWrap)\n{\n\tvar w = Math.max(0, Math.round(this.bounds.width / this.scale));\n\tvar h = Math.max(0, Math.round(this.bounds.height / this.scale));\n\tvar style = node.style;\n\t\n\t// NOTE: Do not use maxWidth here because wrapping will\n\t// go wrong if the cell is outside of the viewable area\n\tif (this.clipped)\n\t{\n\t\tstyle.overflow = 'hidden';\n\t\t\n\t\tif (!mxClient.IS_QUIRKS)\n\t\t{\n\t\t\tstyle.maxHeight = h + 'px';\n\t\t\tstyle.maxWidth = w + 'px';\n\t\t}\n\t\telse\n\t\t{\n\t\t\tstyle.width = w + 'px';\n\t\t}\n\t}\n\telse if (this.overflow == 'fill')\n\t{\n\t\tstyle.width = (w + 1) + 'px';\n\t\tstyle.height = (h + 1) + 'px';\n\t\tstyle.overflow = 'hidden';\n\t}\n\telse if (this.overflow == 'width')\n\t{\n\t\tstyle.width = (w + 1) + 'px';\n\t\tstyle.maxHeight = (h + 1) + 'px';\n\t\tstyle.overflow = 'hidden';\n\t}\n\t\n\tif (this.wrap && w > 0)\n\t{\n\t\tstyle.wordWrap = mxConstants.WORD_WRAP;\n\t\tstyle.whiteSpace = 'normal';\n\t\tstyle.width = w + 'px';\n\n\t\tif (enableWrap && this.overflow != 'fill' && this.overflow != 'width')\n\t\t{\n\t\t\tvar sizeDiv = node;\n\t\t\t\n\t\t\tif (sizeDiv.firstChild != null && sizeDiv.firstChild.nodeName == 'DIV')\n\t\t\t{\n\t\t\t\tsizeDiv = sizeDiv.firstChild;\n\t\t\t\t\n\t\t\t\tif (node.style.wordWrap == 'break-word')\n\t\t\t\t{\n\t\t\t\t\tsizeDiv.style.width = '100%';\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tvar tmp = sizeDiv.offsetWidth;\n\t\t\t\n\t\t\t// Workaround for text measuring in hidden containers\n\t\t\tif (tmp == 0)\n\t\t\t{\n\t\t\t\tvar prev = node.parentNode;\n\t\t\t\tnode.style.visibility = 'hidden';\n\t\t\t\tdocument.body.appendChild(node);\n\t\t\t\ttmp = sizeDiv.offsetWidth;\n\t\t\t\tnode.style.visibility = '';\n\t\t\t\tprev.appendChild(node);\n\t\t\t}\n\n\t\t\ttmp += 3;\n\t\t\t\n\t\t\tif (this.clipped)\n\t\t\t{\n\t\t\t\ttmp = Math.min(tmp, w);\n\t\t\t}\n\t\t\t\n\t\t\tstyle.width = tmp + 'px';\n\t\t}\n\t}\n\telse\n\t{\n\t\tstyle.whiteSpace = 'nowrap';\n\t}\n};\n\n/**\n * Function: getMargin\n *\n * Returns the spacing as an <mxPoint>.\n */\nmxText.prototype.updateMargin = function()\n{\n\tthis.margin = mxUtils.getAlignmentAsPoint(this.align, this.valign);\n};\n\n/**\n * Function: getSpacing\n *\n * Returns the spacing as an <mxPoint>.\n */\nmxText.prototype.getSpacing = function()\n{\n\tvar dx = 0;\n\tvar dy = 0;\n\n\tif (this.align == mxConstants.ALIGN_CENTER)\n\t{\n\t\tdx = (this.spacingLeft - this.spacingRight) / 2;\n\t}\n\telse if (this.align == mxConstants.ALIGN_RIGHT)\n\t{\n\t\tdx = -this.spacingRight - this.baseSpacingRight;\n\t}\n\telse\n\t{\n\t\tdx = this.spacingLeft + this.baseSpacingLeft;\n\t}\n\n\tif (this.valign == mxConstants.ALIGN_MIDDLE)\n\t{\n\t\tdy = (this.spacingTop - this.spacingBottom) / 2;\n\t}\n\telse if (this.valign == mxConstants.ALIGN_BOTTOM)\n\t{\n\t\tdy = -this.spacingBottom - this.baseSpacingBottom;;\n\t}\n\telse\n\t{\n\t\tdy = this.spacingTop + this.baseSpacingTop;\n\t}\n\t\n\treturn new mxPoint(dx, dy);\n};\n"
  },
  {
    "path": "static/cherry/drawio_demo/src/js/shape/mxTriangle.js",
    "content": "/**\n * Copyright (c) 2006-2015, JGraph Ltd\n * Copyright (c) 2006-2015, Gaudenz Alder\n */\n/**\n * Class: mxTriangle\n * \n * Implementation of the triangle shape.\n * \n * Constructor: mxTriangle\n *\n * Constructs a new triangle shape.\n */\nfunction mxTriangle()\n{\n\tmxActor.call(this);\n};\n\n/**\n * Extends mxActor.\n */\nmxUtils.extend(mxTriangle, mxActor);\n\n/**\n * Function: isRoundable\n * \n * Adds roundable support.\n */\nmxTriangle.prototype.isRoundable = function()\n{\n\treturn true;\n};\n\n/**\n * Function: redrawPath\n *\n * Draws the path for this shape.\n */\nmxTriangle.prototype.redrawPath = function(c, x, y, w, h)\n{\n\tvar arcSize = mxUtils.getValue(this.style, mxConstants.STYLE_ARCSIZE, mxConstants.LINE_ARCSIZE) / 2;\n\tthis.addPoints(c, [new mxPoint(0, 0), new mxPoint(w, 0.5 * h), new mxPoint(0, h)], this.isRounded, arcSize, true);\n};\n"
  },
  {
    "path": "static/cherry/drawio_demo/src/js/util/mxAbstractCanvas2D.js",
    "content": "/**\n * Copyright (c) 2006-2015, JGraph Ltd\n * Copyright (c) 2006-2015, Gaudenz Alder\n */\n/**\n * Class: mxAbstractCanvas2D\n *\n * Base class for all canvases. A description of the public API is available in <mxXmlCanvas2D>.\n * All color values of <mxConstants.NONE> will be converted to null in the state.\n * \n * Constructor: mxAbstractCanvas2D\n *\n * Constructs a new abstract canvas.\n */\nfunction mxAbstractCanvas2D()\n{\n\t/**\n\t * Variable: converter\n\t * \n\t * Holds the <mxUrlConverter> to convert image URLs.\n\t */\n\tthis.converter = this.createUrlConverter();\n\t\n\tthis.reset();\n};\n\n/**\n * Variable: state\n * \n * Holds the current state.\n */\nmxAbstractCanvas2D.prototype.state = null;\n\n/**\n * Variable: states\n * \n * Stack of states.\n */\nmxAbstractCanvas2D.prototype.states = null;\n\n/**\n * Variable: path\n * \n * Holds the current path as an array.\n */\nmxAbstractCanvas2D.prototype.path = null;\n\n/**\n * Variable: rotateHtml\n * \n * Switch for rotation of HTML. Default is false.\n */\nmxAbstractCanvas2D.prototype.rotateHtml = true;\n\n/**\n * Variable: lastX\n * \n * Holds the last x coordinate.\n */\nmxAbstractCanvas2D.prototype.lastX = 0;\n\n/**\n * Variable: lastY\n * \n * Holds the last y coordinate.\n */\nmxAbstractCanvas2D.prototype.lastY = 0;\n\n/**\n * Variable: moveOp\n * \n * Contains the string used for moving in paths. Default is 'M'.\n */\nmxAbstractCanvas2D.prototype.moveOp = 'M';\n\n/**\n * Variable: lineOp\n * \n * Contains the string used for moving in paths. Default is 'L'.\n */\nmxAbstractCanvas2D.prototype.lineOp = 'L';\n\n/**\n * Variable: quadOp\n * \n * Contains the string used for quadratic paths. Default is 'Q'.\n */\nmxAbstractCanvas2D.prototype.quadOp = 'Q';\n\n/**\n * Variable: curveOp\n * \n * Contains the string used for bezier curves. Default is 'C'.\n */\nmxAbstractCanvas2D.prototype.curveOp = 'C';\n\n/**\n * Variable: closeOp\n * \n * Holds the operator for closing curves. Default is 'Z'.\n */\nmxAbstractCanvas2D.prototype.closeOp = 'Z';\n\n/**\n * Variable: pointerEvents\n * \n * Boolean value that specifies if events should be handled. Default is false.\n */\nmxAbstractCanvas2D.prototype.pointerEvents = false;\n\n/**\n * Function: createUrlConverter\n * \n * Create a new <mxUrlConverter> and returns it.\n */\nmxAbstractCanvas2D.prototype.createUrlConverter = function()\n{\n\treturn new mxUrlConverter();\n};\n\n/**\n * Function: reset\n * \n * Resets the state of this canvas.\n */\nmxAbstractCanvas2D.prototype.reset = function()\n{\n\tthis.state = this.createState();\n\tthis.states = [];\n};\n\n/**\n * Function: createState\n * \n * Creates the state of the this canvas.\n */\nmxAbstractCanvas2D.prototype.createState = function()\n{\n\treturn {\n\t\tdx: 0,\n\t\tdy: 0,\n\t\tscale: 1,\n\t\talpha: 1,\n\t\tfillAlpha: 1,\n\t\tstrokeAlpha: 1,\n\t\tfillColor: null,\n\t\tgradientFillAlpha: 1,\n\t\tgradientColor: null,\n\t\tgradientAlpha: 1,\n\t\tgradientDirection: null,\n\t\tstrokeColor: null,\n\t\tstrokeWidth: 1,\n\t\tdashed: false,\n\t\tdashPattern: '3 3',\n\t\tfixDash: false,\n\t\tlineCap: 'flat',\n\t\tlineJoin: 'miter',\n\t\tmiterLimit: 10,\n\t\tfontColor: '#000000',\n\t\tfontBackgroundColor: null,\n\t\tfontBorderColor: null,\n\t\tfontSize: mxConstants.DEFAULT_FONTSIZE,\n\t\tfontFamily: mxConstants.DEFAULT_FONTFAMILY,\n\t\tfontStyle: 0,\n\t\tshadow: false,\n\t\tshadowColor: mxConstants.SHADOWCOLOR,\n\t\tshadowAlpha: mxConstants.SHADOW_OPACITY,\n\t\tshadowDx: mxConstants.SHADOW_OFFSET_X,\n\t\tshadowDy: mxConstants.SHADOW_OFFSET_Y,\n\t\trotation: 0,\n\t\trotationCx: 0,\n\t\trotationCy: 0\n\t};\n};\n\n/**\n * Function: format\n * \n * Rounds all numbers to integers.\n */\nmxAbstractCanvas2D.prototype.format = function(value)\n{\n\treturn Math.round(parseFloat(value));\n};\n\n/**\n * Function: addOp\n * \n * Adds the given operation to the path.\n */\nmxAbstractCanvas2D.prototype.addOp = function()\n{\n\tif (this.path != null)\n\t{\n\t\tthis.path.push(arguments[0]);\n\t\t\n\t\tif (arguments.length > 2)\n\t\t{\n\t\t\tvar s = this.state;\n\n\t\t\tfor (var i = 2; i < arguments.length; i += 2)\n\t\t\t{\n\t\t\t\tthis.lastX = arguments[i - 1];\n\t\t\t\tthis.lastY = arguments[i];\n\t\t\t\t\n\t\t\t\tthis.path.push(this.format((this.lastX + s.dx) * s.scale));\n\t\t\t\tthis.path.push(this.format((this.lastY + s.dy) * s.scale));\n\t\t\t}\n\t\t}\n\t}\n};\n\n/**\n * Function: rotatePoint\n * \n * Rotates the given point and returns the result as an <mxPoint>.\n */\nmxAbstractCanvas2D.prototype.rotatePoint = function(x, y, theta, cx, cy)\n{\n\tvar rad = theta * (Math.PI / 180);\n\t\n\treturn mxUtils.getRotatedPoint(new mxPoint(x, y), Math.cos(rad),\n\t\tMath.sin(rad), new mxPoint(cx, cy));\n};\n\n/**\n * Function: save\n * \n * Saves the current state.\n */\nmxAbstractCanvas2D.prototype.save = function()\n{\n\tthis.states.push(this.state);\n\tthis.state = mxUtils.clone(this.state);\n};\n\n/**\n * Function: restore\n * \n * Restores the current state.\n */\nmxAbstractCanvas2D.prototype.restore = function()\n{\n\tif (this.states.length > 0)\n\t{\n\t\tthis.state = this.states.pop();\n\t}\n};\n\n/**\n * Function: setLink\n * \n * Sets the current link. Hook for subclassers.\n */\nmxAbstractCanvas2D.prototype.setLink = function(link)\n{\n\t// nop\n};\n\n/**\n * Function: scale\n * \n * Scales the current state.\n */\nmxAbstractCanvas2D.prototype.scale = function(value)\n{\n\tthis.state.scale *= value;\n\tthis.state.strokeWidth *= value;\n};\n\n/**\n * Function: translate\n * \n * Translates the current state.\n */\nmxAbstractCanvas2D.prototype.translate = function(dx, dy)\n{\n\tthis.state.dx += dx;\n\tthis.state.dy += dy;\n};\n\n/**\n * Function: rotate\n * \n * Rotates the current state.\n */\nmxAbstractCanvas2D.prototype.rotate = function(theta, flipH, flipV, cx, cy)\n{\n\t// nop\n};\n\n/**\n * Function: setAlpha\n * \n * Sets the current alpha.\n */\nmxAbstractCanvas2D.prototype.setAlpha = function(value)\n{\n\tthis.state.alpha = value;\n};\n\n/**\n * Function: setFillAlpha\n * \n * Sets the current solid fill alpha.\n */\nmxAbstractCanvas2D.prototype.setFillAlpha = function(value)\n{\n\tthis.state.fillAlpha = value;\n};\n\n/**\n * Function: setStrokeAlpha\n * \n * Sets the current stroke alpha.\n */\nmxAbstractCanvas2D.prototype.setStrokeAlpha = function(value)\n{\n\tthis.state.strokeAlpha = value;\n};\n\n/**\n * Function: setFillColor\n * \n * Sets the current fill color.\n */\nmxAbstractCanvas2D.prototype.setFillColor = function(value)\n{\n\tif (value == mxConstants.NONE)\n\t{\n\t\tvalue = null;\n\t}\n\t\n\tthis.state.fillColor = value;\n\tthis.state.gradientColor = null;\n};\n\n/**\n * Function: setGradient\n * \n * Sets the current gradient.\n */\nmxAbstractCanvas2D.prototype.setGradient = function(color1, color2, x, y, w, h, direction, alpha1, alpha2)\n{\n\tvar s = this.state;\n\ts.fillColor = color1;\n\ts.gradientFillAlpha = (alpha1 != null) ? alpha1 : 1;\n\ts.gradientColor = color2;\n\ts.gradientAlpha = (alpha2 != null) ? alpha2 : 1;\n\ts.gradientDirection = direction;\n};\n\n/**\n * Function: setStrokeColor\n * \n * Sets the current stroke color.\n */\nmxAbstractCanvas2D.prototype.setStrokeColor = function(value)\n{\n\tif (value == mxConstants.NONE)\n\t{\n\t\tvalue = null;\n\t}\n\t\n\tthis.state.strokeColor = value;\n};\n\n/**\n * Function: setStrokeWidth\n * \n * Sets the current stroke width.\n */\nmxAbstractCanvas2D.prototype.setStrokeWidth = function(value)\n{\n\tthis.state.strokeWidth = value;\n};\n\n/**\n * Function: setDashed\n * \n * Enables or disables dashed lines.\n */\nmxAbstractCanvas2D.prototype.setDashed = function(value, fixDash)\n{\n\tthis.state.dashed = value;\n\tthis.state.fixDash = fixDash;\n};\n\n/**\n * Function: setDashPattern\n * \n * Sets the current dash pattern.\n */\nmxAbstractCanvas2D.prototype.setDashPattern = function(value)\n{\n\tthis.state.dashPattern = value;\n};\n\n/**\n * Function: setLineCap\n * \n * Sets the current line cap.\n */\nmxAbstractCanvas2D.prototype.setLineCap = function(value)\n{\n\tthis.state.lineCap = value;\n};\n\n/**\n * Function: setLineJoin\n * \n * Sets the current line join.\n */\nmxAbstractCanvas2D.prototype.setLineJoin = function(value)\n{\n\tthis.state.lineJoin = value;\n};\n\n/**\n * Function: setMiterLimit\n * \n * Sets the current miter limit.\n */\nmxAbstractCanvas2D.prototype.setMiterLimit = function(value)\n{\n\tthis.state.miterLimit = value;\n};\n\n/**\n * Function: setFontColor\n * \n * Sets the current font color.\n */\nmxAbstractCanvas2D.prototype.setFontColor = function(value)\n{\n\tif (value == mxConstants.NONE)\n\t{\n\t\tvalue = null;\n\t}\n\t\n\tthis.state.fontColor = value;\n};\n\n/**\n * Function: setFontColor\n * \n * Sets the current font color.\n */\nmxAbstractCanvas2D.prototype.setFontBackgroundColor = function(value)\n{\n\tif (value == mxConstants.NONE)\n\t{\n\t\tvalue = null;\n\t}\n\t\n\tthis.state.fontBackgroundColor = value;\n};\n\n/**\n * Function: setFontColor\n * \n * Sets the current font color.\n */\nmxAbstractCanvas2D.prototype.setFontBorderColor = function(value)\n{\n\tif (value == mxConstants.NONE)\n\t{\n\t\tvalue = null;\n\t}\n\t\n\tthis.state.fontBorderColor = value;\n};\n\n/**\n * Function: setFontSize\n * \n * Sets the current font size.\n */\nmxAbstractCanvas2D.prototype.setFontSize = function(value)\n{\n\tthis.state.fontSize = parseFloat(value);\n};\n\n/**\n * Function: setFontFamily\n * \n * Sets the current font family.\n */\nmxAbstractCanvas2D.prototype.setFontFamily = function(value)\n{\n\tthis.state.fontFamily = value;\n};\n\n/**\n * Function: setFontStyle\n * \n * Sets the current font style.\n */\nmxAbstractCanvas2D.prototype.setFontStyle = function(value)\n{\n\tif (value == null)\n\t{\n\t\tvalue = 0;\n\t}\n\t\n\tthis.state.fontStyle = value;\n};\n\n/**\n * Function: setShadow\n * \n * Enables or disables and configures the current shadow.\n */\nmxAbstractCanvas2D.prototype.setShadow = function(enabled)\n{\n\tthis.state.shadow = enabled;\n};\n\n/**\n * Function: setShadowColor\n * \n * Enables or disables and configures the current shadow.\n */\nmxAbstractCanvas2D.prototype.setShadowColor = function(value)\n{\n\tif (value == mxConstants.NONE)\n\t{\n\t\tvalue = null;\n\t}\n\t\n\tthis.state.shadowColor = value;\n};\n\n/**\n * Function: setShadowAlpha\n * \n * Enables or disables and configures the current shadow.\n */\nmxAbstractCanvas2D.prototype.setShadowAlpha = function(value)\n{\n\tthis.state.shadowAlpha = value;\n};\n\n/**\n * Function: setShadowOffset\n * \n * Enables or disables and configures the current shadow.\n */\nmxAbstractCanvas2D.prototype.setShadowOffset = function(dx, dy)\n{\n\tthis.state.shadowDx = dx;\n\tthis.state.shadowDy = dy;\n};\n\n/**\n * Function: begin\n * \n * Starts a new path.\n */\nmxAbstractCanvas2D.prototype.begin = function()\n{\n\tthis.lastX = 0;\n\tthis.lastY = 0;\n\tthis.path = [];\n};\n\n/**\n * Function: moveTo\n * \n *  Moves the current path the given coordinates.\n */\nmxAbstractCanvas2D.prototype.moveTo = function(x, y)\n{\n\tthis.addOp(this.moveOp, x, y);\n};\n\n/**\n * Function: lineTo\n * \n * Draws a line to the given coordinates. Uses moveTo with the op argument.\n */\nmxAbstractCanvas2D.prototype.lineTo = function(x, y)\n{\n\tthis.addOp(this.lineOp, x, y);\n};\n\n/**\n * Function: quadTo\n * \n * Adds a quadratic curve to the current path.\n */\nmxAbstractCanvas2D.prototype.quadTo = function(x1, y1, x2, y2)\n{\n\tthis.addOp(this.quadOp, x1, y1, x2, y2);\n};\n\n/**\n * Function: curveTo\n * \n * Adds a bezier curve to the current path.\n */\nmxAbstractCanvas2D.prototype.curveTo = function(x1, y1, x2, y2, x3, y3)\n{\n\tthis.addOp(this.curveOp, x1, y1, x2, y2, x3, y3);\n};\n\n/**\n * Function: arcTo\n * \n * Adds the given arc to the current path. This is a synthetic operation that\n * is broken down into curves.\n */\nmxAbstractCanvas2D.prototype.arcTo = function(rx, ry, angle, largeArcFlag, sweepFlag, x, y)\n{\n\tvar curves = mxUtils.arcToCurves(this.lastX, this.lastY, rx, ry, angle, largeArcFlag, sweepFlag, x, y);\n\t\n\tif (curves != null)\n\t{\n\t\tfor (var i = 0; i < curves.length; i += 6) \n\t\t{\n\t\t\tthis.curveTo(curves[i], curves[i + 1], curves[i + 2],\n\t\t\t\tcurves[i + 3], curves[i + 4], curves[i + 5]);\n\t\t}\n\t}\n};\n\n/**\n * Function: close\n * \n * Closes the current path.\n */\nmxAbstractCanvas2D.prototype.close = function(x1, y1, x2, y2, x3, y3)\n{\n\tthis.addOp(this.closeOp);\n};\n\n/**\n * Function: end\n * \n * Empty implementation for backwards compatibility. This will be removed.\n */\nmxAbstractCanvas2D.prototype.end = function() { };\n"
  },
  {
    "path": "static/cherry/drawio_demo/src/js/util/mxAnimation.js",
    "content": "/**\n * Copyright (c) 2006-2015, JGraph Ltd\n * Copyright (c) 2006-2015, Gaudenz Alder\n */\n/**\n *\n * Class: mxAnimation\n * \n * Implements a basic animation in JavaScript.\n * \n * Constructor: mxAnimation\n * \n * Constructs an animation.\n * \n * Parameters:\n * \n * graph - Reference to the enclosing <mxGraph>.\n */\nfunction mxAnimation(delay)\n{\n\tthis.delay = (delay != null) ? delay : 20;\n};\n\n/**\n * Extends mxEventSource.\n */\nmxAnimation.prototype = new mxEventSource();\nmxAnimation.prototype.constructor = mxAnimation;\n\n/**\n * Variable: delay\n * \n * Specifies the delay between the animation steps. Defaul is 30ms.\n */\nmxAnimation.prototype.delay = null;\n\n/**\n * Variable: thread\n * \n * Reference to the thread while the animation is running.\n */\nmxAnimation.prototype.thread = null;\n\n/**\n * Function: isRunning\n * \n * Returns true if the animation is running.\n */\nmxAnimation.prototype.isRunning = function()\n{\n\treturn this.thread != null;\n};\n\n/**\n * Function: startAnimation\n *\n * Starts the animation by repeatedly invoking updateAnimation.\n */\nmxAnimation.prototype.startAnimation = function()\n{\n\tif (this.thread == null)\n\t{\n\t\tthis.thread = window.setInterval(mxUtils.bind(this, this.updateAnimation), this.delay);\n\t}\n};\n\n/**\n * Function: updateAnimation\n *\n * Hook for subclassers to implement the animation. Invoke stopAnimation\n * when finished, startAnimation to resume. This is called whenever the\n * timer fires and fires an mxEvent.EXECUTE event with no properties.\n */\nmxAnimation.prototype.updateAnimation = function()\n{\n\tthis.fireEvent(new mxEventObject(mxEvent.EXECUTE));\n};\n\n/**\n * Function: stopAnimation\n *\n * Stops the animation by deleting the timer and fires an <mxEvent.DONE>.\n */\nmxAnimation.prototype.stopAnimation = function()\n{\n\tif (this.thread != null)\n\t{\n\t\twindow.clearInterval(this.thread);\n\t\tthis.thread = null;\n\t\tthis.fireEvent(new mxEventObject(mxEvent.DONE));\n\t}\n};\n"
  },
  {
    "path": "static/cherry/drawio_demo/src/js/util/mxAutoSaveManager.js",
    "content": "/**\n * Copyright (c) 2006-2015, JGraph Ltd\n * Copyright (c) 2006-2015, Gaudenz Alder\n */\n/**\n * Class: mxAutoSaveManager\n * \n * Manager for automatically saving diagrams. The <save> hook must be\n * implemented.\n * \n * Example:\n * \n * (code)\n * var mgr = new mxAutoSaveManager(editor.graph);\n * mgr.save = function()\n * {\n *   mxLog.show();\n *   mxLog.debug('save');\n * };\n * (end)\n * \n * Constructor: mxAutoSaveManager\n *\n * Constructs a new automatic layout for the given graph.\n *\n * Arguments:\n * \n * graph - Reference to the enclosing graph. \n */\nfunction mxAutoSaveManager(graph)\n{\n\t// Notifies the manager of a change\n\tthis.changeHandler = mxUtils.bind(this, function(sender, evt)\n\t{\n\t\tif (this.isEnabled())\n\t\t{\n\t\t\tthis.graphModelChanged(evt.getProperty('edit').changes);\n\t\t}\n\t});\n\n\tthis.setGraph(graph);\n};\n\n/**\n * Extends mxEventSource.\n */\nmxAutoSaveManager.prototype = new mxEventSource();\nmxAutoSaveManager.prototype.constructor = mxAutoSaveManager;\n\n/**\n * Variable: graph\n * \n * Reference to the enclosing <mxGraph>.\n */\nmxAutoSaveManager.prototype.graph = null;\n\n/**\n * Variable: autoSaveDelay\n * \n * Minimum amount of seconds between two consecutive autosaves. Eg. a\n * value of 1 (s) means the graph is not stored more than once per second.\n * Default is 10.\n */\nmxAutoSaveManager.prototype.autoSaveDelay = 10;\n\n/**\n * Variable: autoSaveThrottle\n * \n * Minimum amount of seconds between two consecutive autosaves triggered by\n * more than <autoSaveThreshhold> changes within a timespan of less than\n * <autoSaveDelay> seconds. Eg. a value of 1 (s) means the graph is not\n * stored more than once per second even if there are more than\n * <autoSaveThreshold> changes within that timespan. Default is 2.\n */\nmxAutoSaveManager.prototype.autoSaveThrottle = 2;\n\n/**\n * Variable: autoSaveThreshold\n * \n * Minimum amount of ignored changes before an autosave. Eg. a value of 2\n * means after 2 change of the graph model the autosave will trigger if the\n * condition below is true. Default is 5.\n */\nmxAutoSaveManager.prototype.autoSaveThreshold = 5;\n\n/**\n * Variable: ignoredChanges\n * \n * Counter for ignored changes in autosave.\n */\nmxAutoSaveManager.prototype.ignoredChanges = 0;\n\n/**\n * Variable: lastSnapshot\n * \n * Used for autosaving. See <autosave>.\n */\nmxAutoSaveManager.prototype.lastSnapshot = 0;\n\n/**\n * Variable: enabled\n * \n * Specifies if event handling is enabled. Default is true.\n */\nmxAutoSaveManager.prototype.enabled = true;\n\n/**\n * Variable: changeHandler\n * \n * Holds the function that handles graph model changes.\n */\nmxAutoSaveManager.prototype.changeHandler = null;\n\n/**\n * Function: isEnabled\n * \n * Returns true if events are handled. This implementation\n * returns <enabled>.\n */\nmxAutoSaveManager.prototype.isEnabled = function()\n{\n\treturn this.enabled;\n};\n\n/**\n * Function: setEnabled\n * \n * Enables or disables event handling. This implementation\n * updates <enabled>.\n * \n * Parameters:\n * \n * enabled - Boolean that specifies the new enabled state.\n */\nmxAutoSaveManager.prototype.setEnabled = function(value)\n{\n\tthis.enabled = value;\n};\n\n/**\n * Function: setGraph\n * \n * Sets the graph that the layouts operate on.\n */\nmxAutoSaveManager.prototype.setGraph = function(graph)\n{\n\tif (this.graph != null)\n\t{\n\t\tthis.graph.getModel().removeListener(this.changeHandler);\n\t}\n\t\n\tthis.graph = graph;\n\t\n\tif (this.graph != null)\n\t{\n\t\tthis.graph.getModel().addListener(mxEvent.CHANGE, this.changeHandler);\n\t}\n};\n\n/**\n * Function: save\n * \n * Empty hook that is called if the graph should be saved.\n */\nmxAutoSaveManager.prototype.save = function()\n{\n\t// empty\n};\n\n/**\n * Function: graphModelChanged\n * \n * Invoked when the graph model has changed.\n */\nmxAutoSaveManager.prototype.graphModelChanged = function(changes)\n{\n\tvar now = new Date().getTime();\n\tvar dt = (now - this.lastSnapshot) / 1000;\n\t\n\tif (dt > this.autoSaveDelay ||\n\t\t(this.ignoredChanges >= this.autoSaveThreshold &&\n\t\t dt > this.autoSaveThrottle))\n\t{\n\t\tthis.save();\n\t\tthis.reset();\n\t}\n\telse\n\t{\n\t\t// Increments the number of ignored changes\n\t\tthis.ignoredChanges++;\n\t}\n};\n\n/**\n * Function: reset\n * \n * Resets all counters.\n */\nmxAutoSaveManager.prototype.reset = function()\n{\n\tthis.lastSnapshot = new Date().getTime();\n\tthis.ignoredChanges = 0;\n};\n\n/**\n * Function: destroy\n * \n * Removes all handlers from the <graph> and deletes the reference to it.\n */\nmxAutoSaveManager.prototype.destroy = function()\n{\n\tthis.setGraph(null);\n};\n"
  },
  {
    "path": "static/cherry/drawio_demo/src/js/util/mxClipboard.js",
    "content": "/**\n * Copyright (c) 2006-2015, JGraph Ltd\n * Copyright (c) 2006-2015, Gaudenz Alder\n */\nvar mxClipboard =\n{\n\t/**\n\t * Class: mxClipboard\n\t * \n\t * Singleton that implements a clipboard for graph cells.\n\t *\n\t * Example:\n\t * \n\t * (code)\n\t * mxClipboard.copy(graph);\n\t * mxClipboard.paste(graph2);\n\t * (end)\n\t *\n\t * This copies the selection cells from the graph to the clipboard and\n\t * pastes them into graph2.\n\t * \n\t * For fine-grained control of the clipboard data the <mxGraph.canExportCell>\n\t * and <mxGraph.canImportCell> functions can be overridden.\n\t * \n\t * To restore previous parents for pasted cells, the implementation for\n\t * <copy> and <paste> can be changed as follows.\n\t * \n\t * (code)\n\t * mxClipboard.copy = function(graph, cells)\n\t * {\n\t *   cells = cells || graph.getSelectionCells();\n\t *   var result = graph.getExportableCells(cells);\n\t *   \n\t *   mxClipboard.parents = new Object();\n\t *   \n\t *   for (var i = 0; i < result.length; i++)\n\t *   {\n\t *     mxClipboard.parents[i] = graph.model.getParent(cells[i]);\n\t *   }\n\t *   \n\t *   mxClipboard.insertCount = 1;\n\t *   mxClipboard.setCells(graph.cloneCells(result));\n\t *   \n\t *   return result;\n\t * };\n\t * \n\t * mxClipboard.paste = function(graph)\n\t * {\n\t *   if (!mxClipboard.isEmpty())\n\t *   {\n\t *     var cells = graph.getImportableCells(mxClipboard.getCells());\n\t *     var delta = mxClipboard.insertCount * mxClipboard.STEPSIZE;\n\t *     var parent = graph.getDefaultParent();\n\t *     \n\t *     graph.model.beginUpdate();\n\t *     try\n\t *     {\n\t *       for (var i = 0; i < cells.length; i++)\n\t *       {\n\t *         var tmp = (mxClipboard.parents != null && graph.model.contains(mxClipboard.parents[i])) ?\n\t *              mxClipboard.parents[i] : parent;\n\t *         cells[i] = graph.importCells([cells[i]], delta, delta, tmp)[0];\n\t *       }\n\t *     }\n\t *     finally\n\t *     {\n\t *       graph.model.endUpdate();\n\t *     }\n\t *     \n\t *     // Increments the counter and selects the inserted cells\n\t *     mxClipboard.insertCount++;\n\t *     graph.setSelectionCells(cells);\n\t *   }\n\t * };\n\t * (end)\n\t * \n\t * Variable: STEPSIZE\n\t * \n\t * Defines the step size to offset the cells after each paste operation.\n\t * Default is 10.\n\t */\n\tSTEPSIZE: 10,\n\n\t/**\n\t * Variable: insertCount\n\t * \n\t * Counts the number of times the clipboard data has been inserted.\n\t */\n\tinsertCount: 1,\n\n\t/**\n\t * Variable: cells\n\t * \n\t * Holds the array of <mxCells> currently in the clipboard.\n\t */\n\tcells: null,\n\n\t/**\n\t * Function: setCells\n\t * \n\t * Sets the cells in the clipboard. Fires a <mxEvent.CHANGE> event.\n\t */\n\tsetCells: function(cells)\n\t{\n\t\tmxClipboard.cells = cells;\n\t},\n\n\t/**\n\t * Function: getCells\n\t * \n\t * Returns  the cells in the clipboard.\n\t */\n\tgetCells: function()\n\t{\n\t\treturn mxClipboard.cells;\n\t},\n\t\n\t/**\n\t * Function: isEmpty\n\t * \n\t * Returns true if the clipboard currently has not data stored.\n\t */\n\tisEmpty: function()\n\t{\n\t\treturn mxClipboard.getCells() == null;\n\t},\n\t\n\t/**\n\t * Function: cut\n\t * \n\t * Cuts the given array of <mxCells> from the specified graph.\n\t * If cells is null then the selection cells of the graph will\n\t * be used. Returns the cells that have been cut from the graph.\n\t *\n\t * Parameters:\n\t * \n\t * graph - <mxGraph> that contains the cells to be cut.\n\t * cells - Optional array of <mxCells> to be cut.\n\t */\n\tcut: function(graph, cells)\n\t{\n\t\tcells = mxClipboard.copy(graph, cells);\n\t\tmxClipboard.insertCount = 0;\n\t\tmxClipboard.removeCells(graph, cells);\n\t\t\n\t\treturn cells;\n\t},\n\n\t/**\n\t * Function: removeCells\n\t * \n\t * Hook to remove the given cells from the given graph after\n\t * a cut operation.\n\t *\n\t * Parameters:\n\t * \n\t * graph - <mxGraph> that contains the cells to be cut.\n\t * cells - Array of <mxCells> to be cut.\n\t */\n\tremoveCells: function(graph, cells)\n\t{\n\t\tgraph.removeCells(cells);\n\t},\n\n\t/**\n\t * Function: copy\n\t * \n\t * Copies the given array of <mxCells> from the specified\n\t * graph to <cells>. Returns the original array of cells that has\n\t * been cloned. Descendants of cells in the array are ignored.\n\t * \n\t * Parameters:\n\t * \n\t * graph - <mxGraph> that contains the cells to be copied.\n\t * cells - Optional array of <mxCells> to be copied.\n\t */\n\tcopy: function(graph, cells)\n\t{\n\t\tcells = cells || graph.getSelectionCells();\n\t\tvar result = graph.getExportableCells(graph.model.getTopmostCells(cells));\n\t\tmxClipboard.insertCount = 1;\n\t\tmxClipboard.setCells(graph.cloneCells(result));\n\n\t\treturn result;\n\t},\n\n\t/**\n\t * Function: paste\n\t * \n\t * Pastes the <cells> into the specified graph restoring\n\t * the relation to <parents>, if possible. If the parents\n\t * are no longer in the graph or invisible then the\n\t * cells are added to the graph's default or into the\n\t * swimlane under the cell's new location if one exists.\n\t * The cells are added to the graph using <mxGraph.importCells>\n\t * and returned.\n\t * \n\t * Parameters:\n\t * \n\t * graph - <mxGraph> to paste the <cells> into.\n\t */\n\tpaste: function(graph)\n\t{\n\t\tvar cells = null;\n\t\t\n\t\tif (!mxClipboard.isEmpty())\n\t\t{\n\t\t\tcells = graph.getImportableCells(mxClipboard.getCells());\n\t\t\tvar delta = mxClipboard.insertCount * mxClipboard.STEPSIZE;\n\t\t\tvar parent = graph.getDefaultParent();\n\t\t\tcells = graph.importCells(cells, delta, delta, parent);\n\t\t\t\n\t\t\t// Increments the counter and selects the inserted cells\n\t\t\tmxClipboard.insertCount++;\n\t\t\tgraph.setSelectionCells(cells);\n\t\t}\n\t\t\n\t\treturn cells;\n\t}\n\n};\n"
  },
  {
    "path": "static/cherry/drawio_demo/src/js/util/mxConstants.js",
    "content": "/**\n * Copyright (c) 2006-2015, JGraph Ltd\n * Copyright (c) 2006-2015, Gaudenz Alder\n */\n var mxConstants =\n {\n\t/**\n\t * Class: mxConstants\n\t * \n\t * Defines various global constants.\n\t * \n\t * Variable: DEFAULT_HOTSPOT\n\t * \n\t * Defines the portion of the cell which is to be used as a connectable\n\t * region. Default is 0.3. Possible values are 0 < x <= 1. \n\t */\n\tDEFAULT_HOTSPOT: 0.3,\n\n\t/**\n\t * Variable: MIN_HOTSPOT_SIZE\n\t * \n\t * Defines the minimum size in pixels of the portion of the cell which is\n\t * to be used as a connectable region. Default is 8.\n\t */\n\tMIN_HOTSPOT_SIZE: 8,\n\n\t/**\n\t * Variable: MAX_HOTSPOT_SIZE\n\t * \n\t * Defines the maximum size in pixels of the portion of the cell which is\n\t * to be used as a connectable region. Use 0 for no maximum. Default is 0.\n\t */\n\tMAX_HOTSPOT_SIZE: 0,\n\n\t/**\n\t * Variable: RENDERING_HINT_EXACT\n\t * \n\t * Defines the exact rendering hint.\n\t */\n\tRENDERING_HINT_EXACT: 'exact',\n\n\t/**\n\t * Variable: RENDERING_HINT_FASTER\n\t * \n\t * Defines the faster rendering hint.\n\t */\n\tRENDERING_HINT_FASTER: 'faster',\n\n\t/**\n\t * Variable: RENDERING_HINT_FASTEST\n\t * \n\t * Defines the fastest rendering hint.\n\t */\n\tRENDERING_HINT_FASTEST: 'fastest',\n\n\t/**\n\t * Variable: DIALECT_SVG\n\t * \n\t * Defines the SVG display dialect name.\n\t */\n\tDIALECT_SVG: 'svg',\n\n\t/**\n\t * Variable: DIALECT_VML\n\t * \n\t * Defines the VML display dialect name.\n\t */\n\tDIALECT_VML: 'vml',\n\n\t/**\n\t * Variable: DIALECT_MIXEDHTML\n\t * \n\t * Defines the mixed HTML display dialect name.\n\t */\n\tDIALECT_MIXEDHTML: 'mixedHtml',\n\n\t/**\n\t * Variable: DIALECT_PREFERHTML\n\t * \n\t * Defines the preferred HTML display dialect name.\n\t */\n\tDIALECT_PREFERHTML: 'preferHtml',\n\n\t/**\n\t * Variable: DIALECT_STRICTHTML\n\t * \n\t * Defines the strict HTML display dialect.\n\t */\n\tDIALECT_STRICTHTML: 'strictHtml',\n\n\t/**\n\t * Variable: NS_SVG\n\t * \n\t * Defines the SVG namespace.\n\t */\n\tNS_SVG: 'http://www.w3.org/2000/svg',\n\n\t/**\n\t * Variable: NS_XHTML\n\t * \n\t * Defines the XHTML namespace.\n\t */\n\tNS_XHTML: 'http://www.w3.org/1999/xhtml',\n\n\t/**\n\t * Variable: NS_XLINK\n\t * \n\t * Defines the XLink namespace.\n\t */\n\tNS_XLINK: 'http://www.w3.org/1999/xlink',\n\n\t/**\n\t * Variable: SHADOWCOLOR\n\t * \n\t * Defines the color to be used to draw shadows in shapes and windows.\n\t * Default is gray.\n\t */\n\tSHADOWCOLOR: 'gray',\n\n\t/**\n\t * Variable: VML_SHADOWCOLOR\n\t * \n\t * Used for shadow color in filters where transparency is not supported\n\t * (Microsoft Internet Explorer). Default is gray.\n\t */\n\tVML_SHADOWCOLOR: 'gray',\n\n\t/**\n\t * Variable: SHADOW_OFFSET_X\n\t * \n\t * Specifies the x-offset of the shadow. Default is 2.\n\t */\n\tSHADOW_OFFSET_X: 2,\n\n\t/**\n\t * Variable: SHADOW_OFFSET_Y\n\t * \n\t * Specifies the y-offset of the shadow. Default is 3.\n\t */\n\tSHADOW_OFFSET_Y: 3,\n\t\n\t/**\n\t * Variable: SHADOW_OPACITY\n\t * \n\t * Defines the opacity for shadows. Default is 1.\n\t */\n\tSHADOW_OPACITY: 1,\n \n\t/**\n\t * Variable: NODETYPE_ELEMENT\n\t * \n\t * DOM node of type ELEMENT.\n\t */\n\tNODETYPE_ELEMENT: 1,\n\n\t/**\n\t * Variable: NODETYPE_ATTRIBUTE\n\t * \n\t * DOM node of type ATTRIBUTE.\n\t */\n\tNODETYPE_ATTRIBUTE: 2,\n\n\t/**\n\t * Variable: NODETYPE_TEXT\n\t * \n\t * DOM node of type TEXT.\n\t */\n\tNODETYPE_TEXT: 3,\n\n\t/**\n\t * Variable: NODETYPE_CDATA\n\t * \n\t * DOM node of type CDATA.\n\t */\n\tNODETYPE_CDATA: 4,\n\t\n\t/**\n\t * Variable: NODETYPE_ENTITY_REFERENCE\n\t * \n\t * DOM node of type ENTITY_REFERENCE.\n\t */\n\tNODETYPE_ENTITY_REFERENCE: 5,\n\n\t/**\n\t * Variable: NODETYPE_ENTITY\n\t * \n\t * DOM node of type ENTITY.\n\t */\n\tNODETYPE_ENTITY: 6,\n\n\t/**\n\t * Variable: NODETYPE_PROCESSING_INSTRUCTION\n\t * \n\t * DOM node of type PROCESSING_INSTRUCTION.\n\t */\n\tNODETYPE_PROCESSING_INSTRUCTION: 7,\n\n\t/**\n\t * Variable: NODETYPE_COMMENT\n\t * \n\t * DOM node of type COMMENT.\n\t */\n\tNODETYPE_COMMENT: 8,\n\t\t\n\t/**\n\t * Variable: NODETYPE_DOCUMENT\n\t * \n\t * DOM node of type DOCUMENT.\n\t */\n\tNODETYPE_DOCUMENT: 9,\n\n\t/**\n\t * Variable: NODETYPE_DOCUMENTTYPE\n\t * \n\t * DOM node of type DOCUMENTTYPE.\n\t */\n\tNODETYPE_DOCUMENTTYPE: 10,\n\n\t/**\n\t * Variable: NODETYPE_DOCUMENT_FRAGMENT\n\t * \n\t * DOM node of type DOCUMENT_FRAGMENT.\n\t */\n\tNODETYPE_DOCUMENT_FRAGMENT: 11,\n\n\t/**\n\t * Variable: NODETYPE_NOTATION\n\t * \n\t * DOM node of type NOTATION.\n\t */\n\tNODETYPE_NOTATION: 12,\n\t\n\t/**\n\t * Variable: TOOLTIP_VERTICAL_OFFSET\n\t * \n\t * Defines the vertical offset for the tooltip.\n\t * Default is 16.\n\t */\n\tTOOLTIP_VERTICAL_OFFSET: 16,\n\n\t/**\n\t * Variable: DEFAULT_VALID_COLOR\n\t * \n\t * Specifies the default valid color. Default is #0000FF.\n\t */\n\tDEFAULT_VALID_COLOR: '#00FF00',\n\n\t/**\n\t * Variable: DEFAULT_INVALID_COLOR\n\t * \n\t * Specifies the default invalid color. Default is #FF0000.\n\t */\n\tDEFAULT_INVALID_COLOR: '#FF0000',\n\n\t/**\n\t * Variable: OUTLINE_HIGHLIGHT_COLOR\n\t * \n\t * Specifies the default highlight color for shape outlines.\n\t * Default is #0000FF. This is used in <mxEdgeHandler>.\n\t */\n\tOUTLINE_HIGHLIGHT_COLOR: '#00FF00',\n\n\t/**\n\t * Variable: OUTLINE_HIGHLIGHT_COLOR\n\t * \n\t * Defines the strokewidth to be used for shape outlines.\n\t * Default is 5. This is used in <mxEdgeHandler>.\n\t */\n\tOUTLINE_HIGHLIGHT_STROKEWIDTH: 5,\n\n\t/**\n\t * Variable: HIGHLIGHT_STROKEWIDTH\n\t * \n\t * Defines the strokewidth to be used for the highlights.\n\t * Default is 3.\n\t */\n\tHIGHLIGHT_STROKEWIDTH: 3,\n\n\t/**\n\t * Variable: CONSTRAINT_HIGHLIGHT_SIZE\n\t * \n\t * Size of the constraint highlight (in px). Default is 2.\n\t */\n\tHIGHLIGHT_SIZE: 2,\n\t\n\t/**\n\t * Variable: HIGHLIGHT_OPACITY\n\t * \n\t * Opacity (in %) used for the highlights (including outline).\n\t * Default is 100.\n\t */\n\tHIGHLIGHT_OPACITY: 100,\n\t\n\t/**\n\t * Variable: CURSOR_MOVABLE_VERTEX\n\t * \n\t * Defines the cursor for a movable vertex. Default is 'move'.\n\t */\n\tCURSOR_MOVABLE_VERTEX: 'move',\n\t\n\t/**\n\t * Variable: CURSOR_MOVABLE_EDGE\n\t * \n\t * Defines the cursor for a movable edge. Default is 'move'.\n\t */\n\tCURSOR_MOVABLE_EDGE: 'move',\n\t\n\t/**\n\t * Variable: CURSOR_LABEL_HANDLE\n\t * \n\t * Defines the cursor for a movable label. Default is 'default'.\n\t */\n\tCURSOR_LABEL_HANDLE: 'default',\n\t\n\t/**\n\t * Variable: CURSOR_TERMINAL_HANDLE\n\t * \n\t * Defines the cursor for a terminal handle. Default is 'pointer'.\n\t */\n\tCURSOR_TERMINAL_HANDLE: 'pointer',\n\t\n\t/**\n\t * Variable: CURSOR_BEND_HANDLE\n\t * \n\t * Defines the cursor for a movable bend. Default is 'crosshair'.\n\t */\n\tCURSOR_BEND_HANDLE: 'crosshair',\n\n\t/**\n\t * Variable: CURSOR_VIRTUAL_BEND_HANDLE\n\t * \n\t * Defines the cursor for a movable bend. Default is 'crosshair'.\n\t */\n\tCURSOR_VIRTUAL_BEND_HANDLE: 'crosshair',\n\t\n\t/**\n\t * Variable: CURSOR_CONNECT\n\t * \n\t * Defines the cursor for a connectable state. Default is 'pointer'.\n\t */\n\tCURSOR_CONNECT: 'pointer',\n\n\t/**\n\t * Variable: HIGHLIGHT_COLOR\n\t * \n\t * Defines the color to be used for the cell highlighting.\n\t * Use 'none' for no color. Default is #00FF00.\n\t */\n\tHIGHLIGHT_COLOR: '#00FF00',\n\n\t/**\n\t * Variable: TARGET_HIGHLIGHT_COLOR\n\t * \n\t * Defines the color to be used for highlighting a target cell for a new\n\t * or changed connection. Note that this may be either a source or\n\t * target terminal in the graph. Use 'none' for no color.\n\t * Default is #0000FF.\n\t */\n\tCONNECT_TARGET_COLOR: '#0000FF',\n\n\t/**\n\t * Variable: INVALID_CONNECT_TARGET_COLOR\n\t * \n\t * Defines the color to be used for highlighting a invalid target cells\n\t * for a new or changed connections. Note that this may be either a source\n\t * or target terminal in the graph. Use 'none' for no color. Default is\n\t * #FF0000.\n\t */\n\tINVALID_CONNECT_TARGET_COLOR: '#FF0000',\n\n\t/**\n\t * Variable: DROP_TARGET_COLOR\n\t * \n\t * Defines the color to be used for the highlighting target parent cells\n\t * (for drag and drop). Use 'none' for no color. Default is #0000FF.\n\t */\n\tDROP_TARGET_COLOR: '#0000FF',\n\n\t/**\n\t * Variable: VALID_COLOR\n\t * \n\t * Defines the color to be used for the coloring valid connection\n\t * previews. Use 'none' for no color. Default is #FF0000.\n\t */\n\tVALID_COLOR: '#00FF00',\n\n\t/**\n\t * Variable: INVALID_COLOR\n\t * \n\t * Defines the color to be used for the coloring invalid connection\n\t * previews. Use 'none' for no color. Default is #FF0000.\n\t */\n\tINVALID_COLOR: '#FF0000',\n\n\t/**\n\t * Variable: EDGE_SELECTION_COLOR\n\t * \n\t * Defines the color to be used for the selection border of edges. Use\n\t * 'none' for no color. Default is #00FF00.\n\t */\n\tEDGE_SELECTION_COLOR: '#00FF00',\n\n\t/**\n\t * Variable: VERTEX_SELECTION_COLOR\n\t * \n\t * Defines the color to be used for the selection border of vertices. Use\n\t * 'none' for no color. Default is #00FF00.\n\t */\n\tVERTEX_SELECTION_COLOR: '#00FF00',\n\n\t/**\n\t * Variable: VERTEX_SELECTION_STROKEWIDTH\n\t * \n\t * Defines the strokewidth to be used for vertex selections.\n\t * Default is 1.\n\t */\n\tVERTEX_SELECTION_STROKEWIDTH: 1,\n\n\t/**\n\t * Variable: EDGE_SELECTION_STROKEWIDTH\n\t * \n\t * Defines the strokewidth to be used for edge selections.\n\t * Default is 1.\n\t */\n\tEDGE_SELECTION_STROKEWIDTH: 1,\n\n\t/**\n\t * Variable: SELECTION_DASHED\n\t * \n\t * Defines the dashed state to be used for the vertex selection\n\t * border. Default is true.\n\t */\n\tVERTEX_SELECTION_DASHED: true,\n\n\t/**\n\t * Variable: SELECTION_DASHED\n\t * \n\t * Defines the dashed state to be used for the edge selection\n\t * border. Default is true.\n\t */\n\tEDGE_SELECTION_DASHED: true,\n\n\t/**\n\t * Variable: GUIDE_COLOR\n\t * \n\t * Defines the color to be used for the guidelines in mxGraphHandler.\n\t * Default is #FF0000.\n\t */\n\tGUIDE_COLOR: '#FF0000',\n\n\t/**\n\t * Variable: GUIDE_STROKEWIDTH\n\t * \n\t * Defines the strokewidth to be used for the guidelines in mxGraphHandler.\n\t * Default is 1.\n\t */\n\tGUIDE_STROKEWIDTH: 1,\n\n\t/**\n\t * Variable: OUTLINE_COLOR\n\t * \n\t * Defines the color to be used for the outline rectangle\n\t * border.  Use 'none' for no color. Default is #0099FF.\n\t */\n\tOUTLINE_COLOR: '#0099FF',\n\n\t/**\n\t * Variable: OUTLINE_STROKEWIDTH\n\t * \n\t * Defines the strokewidth to be used for the outline rectangle\n\t * stroke width. Default is 3.\n\t */\n\tOUTLINE_STROKEWIDTH: (mxClient.IS_IE) ? 2 : 3,\n\n\t/**\n\t * Variable: HANDLE_SIZE\n\t * \n\t * Defines the default size for handles. Default is 6.\n\t */\n\tHANDLE_SIZE: 6,\n\n\t/**\n\t * Variable: LABEL_HANDLE_SIZE\n\t * \n\t * Defines the default size for label handles. Default is 4.\n\t */\n\tLABEL_HANDLE_SIZE: 4,\n\n\t/**\n\t * Variable: HANDLE_FILLCOLOR\n\t * \n\t * Defines the color to be used for the handle fill color. Use 'none' for\n\t * no color. Default is #00FF00 (green).\n\t */\n\tHANDLE_FILLCOLOR: '#00FF00',\n\n\t/**\n\t * Variable: HANDLE_STROKECOLOR\n\t * \n\t * Defines the color to be used for the handle stroke color. Use 'none' for\n\t * no color. Default is black.\n\t */\n\tHANDLE_STROKECOLOR: 'black',\n\n\t/**\n\t * Variable: LABEL_HANDLE_FILLCOLOR\n\t * \n\t * Defines the color to be used for the label handle fill color. Use 'none'\n\t * for no color. Default is yellow.\n\t */\n\tLABEL_HANDLE_FILLCOLOR: 'yellow',\n\n\t/**\n\t * Variable: CONNECT_HANDLE_FILLCOLOR\n\t * \n\t * Defines the color to be used for the connect handle fill color. Use\n\t * 'none' for no color. Default is #0000FF (blue).\n\t */\n\tCONNECT_HANDLE_FILLCOLOR: '#0000FF',\n\n\t/**\n\t * Variable: LOCKED_HANDLE_FILLCOLOR\n\t * \n\t * Defines the color to be used for the locked handle fill color. Use\n\t * 'none' for no color. Default is #FF0000 (red).\n\t */\n\tLOCKED_HANDLE_FILLCOLOR: '#FF0000',\n\n\t/**\n\t * Variable: OUTLINE_HANDLE_FILLCOLOR\n\t * \n\t * Defines the color to be used for the outline sizer fill color. Use\n\t * 'none' for no color. Default is #00FFFF.\n\t */\n\tOUTLINE_HANDLE_FILLCOLOR: '#00FFFF',\n\n\t/**\n\t * Variable: OUTLINE_HANDLE_STROKECOLOR\n\t * \n\t * Defines the color to be used for the outline sizer stroke color. Use\n\t * 'none' for no color. Default is #0033FF.\n\t */\n\tOUTLINE_HANDLE_STROKECOLOR: '#0033FF',\n\n\t/**\n\t * Variable: DEFAULT_FONTFAMILY\n\t * \n\t * Defines the default family for all fonts. Default is Arial,Helvetica.\n\t */\n\tDEFAULT_FONTFAMILY: 'Arial,Helvetica',\n\n\t/**\n\t * Variable: DEFAULT_FONTSIZE\n\t * \n\t * Defines the default size (in px). Default is 11.\n\t */\n\tDEFAULT_FONTSIZE: 11,\n\n\t/**\n\t * Variable: DEFAULT_TEXT_DIRECTION\n\t * \n\t * Defines the default value for the <STYLE_TEXT_DIRECTION> if no value is\n\t * defined for it in the style. Default value is an empty string which means\n\t * the default system setting is used and no direction is set.\n\t */\n\tDEFAULT_TEXT_DIRECTION: '',\n\n\t/**\n\t * Variable: LINE_HEIGHT\n\t * \n\t * Defines the default line height for text labels. Default is 1.2.\n\t */\n\tLINE_HEIGHT: 1.2,\n\n\t/**\n\t * Variable: WORD_WRAP\n\t * \n\t * Defines the CSS value for the word-wrap property. Default is \"normal\".\n\t * Change this to \"break-word\" to allow long words to be able to be broken\n\t * and wrap onto the next line.\n\t */\n\tWORD_WRAP: 'normal',\n\n\t/**\n\t * Variable: ABSOLUTE_LINE_HEIGHT\n\t * \n\t * Specifies if absolute line heights should be used (px) in CSS. Default\n\t * is false. Set this to true for backwards compatibility.\n\t */\n\tABSOLUTE_LINE_HEIGHT: false,\n\n\t/**\n\t * Variable: DEFAULT_FONTSTYLE\n\t * \n\t * Defines the default style for all fonts. Default is 0. This can be set\n\t * to any combination of font styles as follows.\n\t * \n\t * (code)\n\t * mxConstants.DEFAULT_FONTSTYLE = mxConstants.FONT_BOLD | mxConstants.FONT_ITALIC;\n\t * (end)\n\t */\n\tDEFAULT_FONTSTYLE: 0,\n\n\t/**\n\t * Variable: DEFAULT_STARTSIZE\n\t * \n\t * Defines the default start size for swimlanes. Default is 40.\n\t */\n\tDEFAULT_STARTSIZE: 40,\n\n\t/**\n\t * Variable: DEFAULT_MARKERSIZE\n\t * \n\t * Defines the default size for all markers. Default is 6.\n\t */\n\tDEFAULT_MARKERSIZE: 6,\n\n\t/**\n\t * Variable: DEFAULT_IMAGESIZE\n\t * \n\t * Defines the default width and height for images used in the\n\t * label shape. Default is 24.\n\t */\n\tDEFAULT_IMAGESIZE: 24,\n\n\t/**\n\t * Variable: ENTITY_SEGMENT\n\t * \n\t * Defines the length of the horizontal segment of an Entity Relation.\n\t * This can be overridden using <mxConstants.STYLE_SEGMENT> style.\n\t * Default is 30.\n\t */\n\tENTITY_SEGMENT: 30,\n\n\t/**\n\t * Variable: RECTANGLE_ROUNDING_FACTOR\n\t * \n\t * Defines the rounding factor for rounded rectangles in percent between\n\t * 0 and 1. Values should be smaller than 0.5. Default is 0.15.\n\t */\n\tRECTANGLE_ROUNDING_FACTOR: 0.15,\n\n\t/**\n\t * Variable: LINE_ARCSIZE\n\t * \n\t * Defines the size of the arcs for rounded edges. Default is 20.\n\t */\n\tLINE_ARCSIZE: 20,\n\n\t/**\n\t * Variable: ARROW_SPACING\n\t * \n\t * Defines the spacing between the arrow shape and its terminals. Default is 0.\n\t */\n\tARROW_SPACING: 0,\n\n\t/**\n\t * Variable: ARROW_WIDTH\n\t * \n\t * Defines the width of the arrow shape. Default is 30.\n\t */\n\tARROW_WIDTH: 30,\n\n\t/**\n\t * Variable: ARROW_SIZE\n\t * \n\t * Defines the size of the arrowhead in the arrow shape. Default is 30.\n\t */\n\tARROW_SIZE: 30,\n\n\t/**\n\t * Variable: PAGE_FORMAT_A4_PORTRAIT\n\t * \n\t * Defines the rectangle for the A4 portrait page format. The dimensions\n\t * of this page format are 826x1169 pixels.\n\t */\n\tPAGE_FORMAT_A4_PORTRAIT: new mxRectangle(0, 0, 827, 1169),\n\n\t/**\n\t * Variable: PAGE_FORMAT_A4_PORTRAIT\n\t * \n\t * Defines the rectangle for the A4 portrait page format. The dimensions\n\t * of this page format are 826x1169 pixels.\n\t */\n\tPAGE_FORMAT_A4_LANDSCAPE: new mxRectangle(0, 0, 1169, 827),\n\n\t/**\n\t * Variable: PAGE_FORMAT_LETTER_PORTRAIT\n\t * \n\t * Defines the rectangle for the Letter portrait page format. The\n\t * dimensions of this page format are 850x1100 pixels.\n\t */\n\tPAGE_FORMAT_LETTER_PORTRAIT: new mxRectangle(0, 0, 850, 1100),\n\n\t/**\n\t * Variable: PAGE_FORMAT_LETTER_PORTRAIT\n\t * \n\t * Defines the rectangle for the Letter portrait page format. The dimensions\n\t * of this page format are 850x1100 pixels.\n\t */\n\tPAGE_FORMAT_LETTER_LANDSCAPE: new mxRectangle(0, 0, 1100, 850),\n\n\t/**\n\t * Variable: NONE\n\t * \n\t * Defines the value for none. Default is \"none\".\n\t */\n\tNONE: 'none',\n\n\t/**\n\t * Variable: STYLE_PERIMETER\n\t * \n\t * Defines the key for the perimeter style. This is a function that defines\n\t * the perimeter around a particular shape. Possible values are the\n\t * functions defined in <mxPerimeter>. Alternatively, the constants in this\n\t * class that start with \"PERIMETER_\" may be used to access\n\t * perimeter styles in <mxStyleRegistry>. Value is \"perimeter\".\n\t */\n\tSTYLE_PERIMETER: 'perimeter',\n\t\n\t/**\n\t * Variable: STYLE_SOURCE_PORT\n\t * \n\t * Defines the ID of the cell that should be used for computing the\n\t * perimeter point of the source for an edge. This allows for graphically\n\t * connecting to a cell while keeping the actual terminal of the edge.\n\t * Value is \"sourcePort\".\n\t */\n\tSTYLE_SOURCE_PORT: 'sourcePort',\n\t\n\t/**\n\t * Variable: STYLE_TARGET_PORT\n\t * \n\t * Defines the ID of the cell that should be used for computing the\n\t * perimeter point of the target for an edge. This allows for graphically\n\t * connecting to a cell while keeping the actual terminal of the edge.\n\t * Value is \"targetPort\".\n\t */\n\tSTYLE_TARGET_PORT: 'targetPort',\n\n\t/**\n\t * Variable: STYLE_PORT_CONSTRAINT\n\t * \n\t * Defines the direction(s) that edges are allowed to connect to cells in.\n\t * Possible values are \"DIRECTION_NORTH, DIRECTION_SOUTH, \n\t * DIRECTION_EAST\" and \"DIRECTION_WEST\". Value is\n\t * \"portConstraint\".\n\t */\n\tSTYLE_PORT_CONSTRAINT: 'portConstraint',\n\n\t/**\n\t * Variable: STYLE_PORT_CONSTRAINT_ROTATION\n\t * \n\t * Define whether port constraint directions are rotated with vertex\n\t * rotation. 0 (default) causes port constraints to remain absolute, \n\t * relative to the graph, 1 causes the constraints to rotate with\n\t * the vertex. Value is \"portConstraintRotation\".\n\t */\n\tSTYLE_PORT_CONSTRAINT_ROTATION: 'portConstraintRotation',\n\n\t/**\n\t * Variable: STYLE_SOURCE_PORT_CONSTRAINT\n\t * \n\t * Defines the direction(s) that edges are allowed to connect to sources in.\n\t * Possible values are \"DIRECTION_NORTH, DIRECTION_SOUTH, DIRECTION_EAST\"\n\t * and \"DIRECTION_WEST\". Value is \"sourcePortConstraint\".\n\t */\n\tSTYLE_SOURCE_PORT_CONSTRAINT: 'sourcePortConstraint',\n\n\t/**\n\t * Variable: STYLE_TARGET_PORT_CONSTRAINT\n\t * \n\t * Defines the direction(s) that edges are allowed to connect to targets in.\n\t * Possible values are \"DIRECTION_NORTH, DIRECTION_SOUTH, DIRECTION_EAST\"\n\t * and \"DIRECTION_WEST\". Value is \"targetPortConstraint\".\n\t */\n\tSTYLE_TARGET_PORT_CONSTRAINT: 'targetPortConstraint',\n\n\t/**\n\t * Variable: STYLE_OPACITY\n\t * \n\t * Defines the key for the opacity style. The type of the value is \n\t * numeric and the possible range is 0-100. Value is \"opacity\".\n\t */\n\tSTYLE_OPACITY: 'opacity',\n\n\t/**\n\t * Variable: STYLE_FILL_OPACITY\n\t * \n\t * Defines the key for the fill opacity style. The type of the value is \n\t * numeric and the possible range is 0-100. Value is \"fillOpacity\".\n\t */\n\tSTYLE_FILL_OPACITY: 'fillOpacity',\n\n\t/**\n\t * Variable: STYLE_STROKE_OPACITY\n\t * \n\t * Defines the key for the stroke opacity style. The type of the value is \n\t * numeric and the possible range is 0-100. Value is \"strokeOpacity\".\n\t */\n\tSTYLE_STROKE_OPACITY: 'strokeOpacity',\n\n\t/**\n\t * Variable: STYLE_TEXT_OPACITY\n\t * \n\t * Defines the key for the text opacity style. The type of the value is \n\t * numeric and the possible range is 0-100. Value is \"textOpacity\".\n\t */\n\tSTYLE_TEXT_OPACITY: 'textOpacity',\n\n\t/**\n\t * Variable: STYLE_TEXT_DIRECTION\n\t * \n\t * Defines the key for the text direction style. Possible values are\n\t * \"TEXT_DIRECTION_DEFAULT, TEXT_DIRECTION_AUTO, TEXT_DIRECTION_LTR\"\n\t * and \"TEXT_DIRECTION_RTL\". Value is \"textDirection\".\n\t * The default value for the style is defined in <DEFAULT_TEXT_DIRECTION>.\n\t * It is used is no value is defined for this key in a given style. This is\n\t * an experimental style that is currently ignored in the backends.\n\t */\n\tSTYLE_TEXT_DIRECTION: 'textDirection',\n\n\t/**\n\t * Variable: STYLE_OVERFLOW\n\t * \n\t * Defines the key for the overflow style. Possible values are 'visible',\n\t * 'hidden', 'fill' and 'width'. The default value is 'visible'. This value\n\t * specifies how overlapping vertex labels are handled. A value of\n\t * 'visible' will show the complete label. A value of 'hidden' will clip\n\t * the label so that it does not overlap the vertex bounds. A value of\n\t * 'fill' will use the vertex bounds and a value of 'width' will use the\n\t * the vertex width for the label. See <mxGraph.isLabelClipped>. Note that\n\t * the vertical alignment is ignored for overflow fill and for horizontal\n\t * alignment, left should be used to avoid pixel offsets in Internet Explorer\n\t * 11 and earlier or if foreignObjects are disabled. Value is \"overflow\".\n\t */\n\tSTYLE_OVERFLOW: 'overflow',\n\n\t/**\n\t * Variable: STYLE_ORTHOGONAL\n\t * \n\t * Defines if the connection points on either end of the edge should be\n\t * computed so that the edge is vertical or horizontal if possible and\n\t * if the point is not at a fixed location. Default is false. This is\n\t * used in <mxGraph.isOrthogonal>, which also returns true if the edgeStyle\n\t * of the edge is an elbow or entity. Value is \"orthogonal\".\n\t */\n\tSTYLE_ORTHOGONAL: 'orthogonal',\n\n\t/**\n\t * Variable: STYLE_EXIT_X\n\t * \n\t * Defines the key for the horizontal relative coordinate connection point\n\t * of an edge with its source terminal. Value is \"exitX\".\n\t */\n\tSTYLE_EXIT_X: 'exitX',\n\n\t/**\n\t * Variable: STYLE_EXIT_Y\n\t * \n\t * Defines the key for the vertical relative coordinate connection point\n\t * of an edge with its source terminal. Value is \"exitY\".\n\t */\n\tSTYLE_EXIT_Y: 'exitY',\n\n\t/**\n\t * Variable: STYLE_EXIT_PERIMETER\n\t * \n\t * Defines if the perimeter should be used to find the exact entry point\n\t * along the perimeter of the source. Possible values are 0 (false) and\n\t * 1 (true). Default is 1 (true). Value is \"exitPerimeter\".\n\t */\n\tSTYLE_EXIT_PERIMETER: 'exitPerimeter',\n\n\t/**\n\t * Variable: STYLE_ENTRY_X\n\t * \n\t * Defines the key for the horizontal relative coordinate connection point\n\t * of an edge with its target terminal. Value is \"entryX\".\n\t */\n\tSTYLE_ENTRY_X: 'entryX',\n\n\t/**\n\t * Variable: STYLE_ENTRY_Y\n\t * \n\t * Defines the key for the vertical relative coordinate connection point\n\t * of an edge with its target terminal. Value is \"entryY\".\n\t */\n\tSTYLE_ENTRY_Y: 'entryY',\n\n\t/**\n\t * Variable: STYLE_ENTRY_PERIMETER\n\t * \n\t * Defines if the perimeter should be used to find the exact entry point\n\t * along the perimeter of the target. Possible values are 0 (false) and\n\t * 1 (true). Default is 1 (true). Value is \"entryPerimeter\".\n\t */\n\tSTYLE_ENTRY_PERIMETER: 'entryPerimeter',\n\n\t/**\n\t * Variable: STYLE_WHITE_SPACE\n\t * \n\t * Defines the key for the white-space style. Possible values are 'nowrap'\n\t * and 'wrap'. The default value is 'nowrap'. This value specifies how\n\t * white-space inside a HTML vertex label should be handled. A value of\n\t * 'nowrap' means the text will never wrap to the next line until a\n\t * linefeed is encountered. A value of 'wrap' means text will wrap when\n\t * necessary. This style is only used for HTML labels.\n\t * See <mxGraph.isWrapping>. Value is \"whiteSpace\".\n\t */\n\tSTYLE_WHITE_SPACE: 'whiteSpace',\n\n\t/**\n\t * Variable: STYLE_ROTATION\n\t * \n\t * Defines the key for the rotation style. The type of the value is \n\t * numeric and the possible range is 0-360. Value is \"rotation\".\n\t */\n\tSTYLE_ROTATION: 'rotation',\n\n\t/**\n\t * Variable: STYLE_FILLCOLOR\n\t * \n\t * Defines the key for the fill color. Possible values are all HTML color\n\t * names or HEX codes, as well as special keywords such as 'swimlane,\n\t * 'inherit' or 'indicated' to use the color code of a related cell or the\n\t * indicator shape. Value is \"fillColor\".\n\t */\n\tSTYLE_FILLCOLOR: 'fillColor',\n\n\t/**\n\t * Variable: STYLE_POINTER_EVENTS\n\t * \n\t * Specifies if pointer events should be fired on transparent backgrounds.\n\t * This style is currently only supported in <mxRectangleShape>. Default\n\t * is true. Value is \"pointerEvents\". This is typically set to\n\t * false in groups where the transparent part should allow any underlying\n\t * cells to be clickable.\n\t */\n\tSTYLE_POINTER_EVENTS: 'pointerEvents',\n\n\t/**\n\t * Variable: STYLE_SWIMLANE_FILLCOLOR\n\t * \n\t * Defines the key for the fill color of the swimlane background. Possible\n\t * values are all HTML color names or HEX codes. Default is no background.\n\t * Value is \"swimlaneFillColor\".\n\t */\n\tSTYLE_SWIMLANE_FILLCOLOR: 'swimlaneFillColor',\n\n\t/**\n\t * Variable: STYLE_MARGIN\n\t * \n\t * Defines the key for the margin between the ellipses in the double ellipse shape.\n\t * Possible values are all positive numbers. Value is \"margin\".\n\t */\n\tSTYLE_MARGIN: 'margin',\n\n\t/**\n\t * Variable: STYLE_GRADIENTCOLOR\n\t * \n\t * Defines the key for the gradient color. Possible values are all HTML color\n\t * names or HEX codes, as well as special keywords such as 'swimlane,\n\t * 'inherit' or 'indicated' to use the color code of a related cell or the\n\t * indicator shape. This is ignored if no fill color is defined. Value is\n\t * \"gradientColor\".\n\t */\n\tSTYLE_GRADIENTCOLOR: 'gradientColor',\n\n\t/**\n\t * Variable: STYLE_GRADIENT_DIRECTION\n\t * \n\t * Defines the key for the gradient direction. Possible values are\n\t * <DIRECTION_EAST>, <DIRECTION_WEST>, <DIRECTION_NORTH> and\n\t * <DIRECTION_SOUTH>. Default is <DIRECTION_SOUTH>. Generally, and by\n\t * default in mxGraph, gradient painting is done from the value of\n\t * <STYLE_FILLCOLOR> to the value of <STYLE_GRADIENTCOLOR>. Taking the\n\t * example of <DIRECTION_NORTH>, this means <STYLE_FILLCOLOR> color at the \n\t * bottom of paint pattern and <STYLE_GRADIENTCOLOR> at top, with a\n\t * gradient in-between. Value is \"gradientDirection\".\n\t */\n\tSTYLE_GRADIENT_DIRECTION: 'gradientDirection',\n\n\t/**\n\t * Variable: STYLE_STROKECOLOR\n\t * \n\t * Defines the key for the strokeColor style. Possible values are all HTML\n\t * color names or HEX codes, as well as special keywords such as 'swimlane,\n\t * 'inherit', 'indicated' to use the color code of a related cell or the\n\t * indicator shape or 'none' for no color. Value is \"strokeColor\".\n\t */\n\tSTYLE_STROKECOLOR: 'strokeColor',\n\n\t/**\n\t * Variable: STYLE_SEPARATORCOLOR\n\t * \n\t * Defines the key for the separatorColor style. Possible values are all\n\t * HTML color names or HEX codes. This style is only used for\n\t * <SHAPE_SWIMLANE> shapes. Value is \"separatorColor\".\n\t */\n\tSTYLE_SEPARATORCOLOR: 'separatorColor',\n\n\t/**\n\t * Variable: STYLE_STROKEWIDTH\n\t * \n\t * Defines the key for the strokeWidth style. The type of the value is \n\t * numeric and the possible range is any non-negative value larger or equal\n\t * to 1. The value defines the stroke width in pixels. Note: To hide a\n\t * stroke use strokeColor none. Value is \"strokeWidth\".\n\t */\n\tSTYLE_STROKEWIDTH: 'strokeWidth',\n\n\t/**\n\t * Variable: STYLE_ALIGN\n\t * \n\t * Defines the key for the align style. Possible values are <ALIGN_LEFT>,\n\t * <ALIGN_CENTER> and <ALIGN_RIGHT>. This value defines how the lines of\n\t * the label are horizontally aligned. <ALIGN_LEFT> mean label text lines\n\t * are aligned to left of the label bounds, <ALIGN_RIGHT> to the right of\n\t * the label bounds and <ALIGN_CENTER> means the center of the text lines\n\t * are aligned in the center of the label bounds. Note this value doesn't\n\t * affect the positioning of the overall label bounds relative to the\n\t * vertex, to move the label bounds horizontally, use\n\t * <STYLE_LABEL_POSITION>. Value is \"align\".\n\t */\n\tSTYLE_ALIGN: 'align',\n\n\t/**\n\t * Variable: STYLE_VERTICAL_ALIGN\n\t * \n\t * Defines the key for the verticalAlign style. Possible values are\n\t * <ALIGN_TOP>, <ALIGN_MIDDLE> and <ALIGN_BOTTOM>. This value defines how\n\t * the lines of the label are vertically aligned. <ALIGN_TOP> means the\n\t * topmost label text line is aligned against the top of the label bounds,\n\t * <ALIGN_BOTTOM> means the bottom-most label text line is aligned against\n\t * the bottom of the label bounds and <ALIGN_MIDDLE> means there is equal\n\t * spacing between the topmost text label line and the top of the label\n\t * bounds and the bottom-most text label line and the bottom of the label\n\t * bounds. Note this value doesn't affect the positioning of the overall\n\t * label bounds relative to the vertex, to move the label bounds\n\t * vertically, use <STYLE_VERTICAL_LABEL_POSITION>. Value is \"verticalAlign\".\n\t */\n\tSTYLE_VERTICAL_ALIGN: 'verticalAlign',\n\n\t/**\n\t * Variable: STYLE_LABEL_WIDTH\n\t * \n\t * Defines the key for the width of the label if the label position is not\n\t * center. Value is \"labelWidth\".\n\t */\n\tSTYLE_LABEL_WIDTH: 'labelWidth',\n\n\t/**\n\t * Variable: STYLE_LABEL_POSITION\n\t * \n\t * Defines the key for the horizontal label position of vertices. Possible\n\t * values are <ALIGN_LEFT>, <ALIGN_CENTER> and <ALIGN_RIGHT>. Default is\n\t * <ALIGN_CENTER>. The label align defines the position of the label\n\t * relative to the cell. <ALIGN_LEFT> means the entire label bounds is\n\t * placed completely just to the left of the vertex, <ALIGN_RIGHT> means\n\t * adjust to the right and <ALIGN_CENTER> means the label bounds are\n\t * vertically aligned with the bounds of the vertex. Note this value\n\t * doesn't affect the positioning of label within the label bounds, to move\n\t * the label horizontally within the label bounds, use <STYLE_ALIGN>.\n\t * Value is \"labelPosition\".\n\t */\n\tSTYLE_LABEL_POSITION: 'labelPosition',\n\n\t/**\n\t * Variable: STYLE_VERTICAL_LABEL_POSITION\n\t * \n\t * Defines the key for the vertical label position of vertices. Possible\n\t * values are <ALIGN_TOP>, <ALIGN_BOTTOM> and <ALIGN_MIDDLE>. Default is\n\t * <ALIGN_MIDDLE>. The label align defines the position of the label\n\t * relative to the cell. <ALIGN_TOP> means the entire label bounds is\n\t * placed completely just on the top of the vertex, <ALIGN_BOTTOM> means\n\t * adjust on the bottom and <ALIGN_MIDDLE> means the label bounds are\n\t * horizontally aligned with the bounds of the vertex. Note this value\n\t * doesn't affect the positioning of label within the label bounds, to move\n\t * the label vertically within the label bounds, use\n\t * <STYLE_VERTICAL_ALIGN>. Value is \"verticalLabelPosition\".\n\t */\n\tSTYLE_VERTICAL_LABEL_POSITION: 'verticalLabelPosition',\n\t\n\t/**\n\t * Variable: STYLE_IMAGE_ASPECT\n\t * \n\t * Defines the key for the image aspect style. Possible values are 0 (do\n\t * not preserve aspect) or 1 (keep aspect). This is only used in\n\t * <mxImageShape>. Default is 1. Value is \"imageAspect\".\n\t */\n\tSTYLE_IMAGE_ASPECT: 'imageAspect',\n\n\t/**\n\t * Variable: STYLE_IMAGE_ALIGN\n\t * \n\t * Defines the key for the align style. Possible values are <ALIGN_LEFT>,\n\t * <ALIGN_CENTER> and <ALIGN_RIGHT>. The value defines how any image in the\n\t * vertex label is aligned horizontally within the label bounds of a\n\t * <SHAPE_LABEL> shape. Value is \"imageAlign\".\n\t */\n\tSTYLE_IMAGE_ALIGN: 'imageAlign',\n\n\t/**\n\t * Variable: STYLE_IMAGE_VERTICAL_ALIGN\n\t * \n\t * Defines the key for the verticalAlign style. Possible values are\n\t * <ALIGN_TOP>, <ALIGN_MIDDLE> and <ALIGN_BOTTOM>. The value defines how\n\t * any image in the vertex label is aligned vertically within the label\n\t * bounds of a <SHAPE_LABEL> shape. Value is \"imageVerticalAlign\".\n\t */\n\tSTYLE_IMAGE_VERTICAL_ALIGN: 'imageVerticalAlign',\n\n\t/**\n\t * Variable: STYLE_GLASS\n\t * \n\t * Defines the key for the glass style. Possible values are 0 (disabled) and\n\t * 1(enabled). The default value is 0. This is used in <mxLabel>. Value is\n\t * \"glass\".\n\t */\n\tSTYLE_GLASS: 'glass',\n\n\t/**\n\t * Variable: STYLE_IMAGE\n\t * \n\t * Defines the key for the image style. Possible values are any image URL,\n\t * the type of the value is String. This is the path to the image that is\n\t * to be displayed within the label of a vertex. Data URLs should use the\n\t * following format: data:image/png,xyz where xyz is the base64 encoded\n\t * data (without the \"base64\"-prefix). Note that Data URLs are only\n\t * supported in modern browsers. Value is \"image\".\n\t */\n\tSTYLE_IMAGE: 'image',\n\n\t/**\n\t * Variable: STYLE_IMAGE_WIDTH\n\t * \n\t * Defines the key for the imageWidth style. The type of this value is\n\t * int, the value is the image width in pixels and must be greater than 0.\n\t * Value is \"imageWidth\".\n\t */\n\tSTYLE_IMAGE_WIDTH: 'imageWidth',\n\n\t/**\n\t * Variable: STYLE_IMAGE_HEIGHT\n\t * \n\t * Defines the key for the imageHeight style. The type of this value is\n\t * int, the value is the image height in pixels and must be greater than 0.\n\t * Value is \"imageHeight\".\n\t */\n\tSTYLE_IMAGE_HEIGHT: 'imageHeight',\n\n\t/**\n\t * Variable: STYLE_IMAGE_BACKGROUND\n\t * \n\t * Defines the key for the image background color. This style is only used\n\t * in <mxImageShape>. Possible values are all HTML color names or HEX\n\t * codes. Value is \"imageBackground\".\n\t */\n\tSTYLE_IMAGE_BACKGROUND: 'imageBackground',\n\n\t/**\n\t * Variable: STYLE_IMAGE_BORDER\n\t * \n\t * Defines the key for the image border color. This style is only used in\n\t * <mxImageShape>. Possible values are all HTML color names or HEX codes.\n\t * Value is \"imageBorder\".\n\t */\n\tSTYLE_IMAGE_BORDER: 'imageBorder',\n\n\t/**\n\t * Variable: STYLE_FLIPH\n\t * \n\t * Defines the key for the horizontal image flip. This style is only used\n\t * in <mxImageShape>. Possible values are 0 and 1. Default is 0. Value is\n\t * \"flipH\".\n\t */\n\tSTYLE_FLIPH: 'flipH',\n\n\t/**\n\t * Variable: STYLE_FLIPV\n\t * \n\t * Defines the key for the vertical flip. Possible values are 0 and 1.\n\t * Default is 0. Value is \"flipV\".\n\t */\n\tSTYLE_FLIPV: 'flipV',\n\n\t/**\n\t * Variable: STYLE_NOLABEL\n\t * \n\t * Defines the key for the noLabel style. If this is true then no label is\n\t * visible for a given cell. Possible values are true or false (1 or 0).\n\t * Default is false. Value is \"noLabel\".\n\t */\n\tSTYLE_NOLABEL: 'noLabel',\n\n\t/**\n\t * Variable: STYLE_NOEDGESTYLE\n\t * \n\t * Defines the key for the noEdgeStyle style. If this is true then no edge\n\t * style is applied for a given edge. Possible values are true or false\n\t * (1 or 0). Default is false. Value is \"noEdgeStyle\".\n\t */\n\tSTYLE_NOEDGESTYLE: 'noEdgeStyle',\n\n\t/**\n\t * Variable: STYLE_LABEL_BACKGROUNDCOLOR\n\t * \n\t * Defines the key for the label background color. Possible values are all\n\t * HTML color names or HEX codes. Value is \"labelBackgroundColor\".\n\t */\n\tSTYLE_LABEL_BACKGROUNDCOLOR: 'labelBackgroundColor',\n\n\t/**\n\t * Variable: STYLE_LABEL_BORDERCOLOR\n\t * \n\t * Defines the key for the label border color. Possible values are all\n\t * HTML color names or HEX codes. Value is \"labelBorderColor\".\n\t */\n\tSTYLE_LABEL_BORDERCOLOR: 'labelBorderColor',\n\n\t/**\n\t * Variable: STYLE_LABEL_PADDING\n\t * \n\t * Defines the key for the label padding, ie. the space between the label\n\t * border and the label. Value is \"labelPadding\".\n\t */\n\tSTYLE_LABEL_PADDING: 'labelPadding',\n\n\t/**\n\t * Variable: STYLE_INDICATOR_SHAPE\n\t * \n\t * Defines the key for the indicator shape used within an <mxLabel>.\n\t * Possible values are all SHAPE_* constants or the names of any new\n\t * shapes. The indicatorShape has precedence over the indicatorImage.\n\t * Value is \"indicatorShape\".\n\t */\n\tSTYLE_INDICATOR_SHAPE: 'indicatorShape',\n\n\t/**\n\t * Variable: STYLE_INDICATOR_IMAGE\n\t * \n\t * Defines the key for the indicator image used within an <mxLabel>.\n\t * Possible values are all image URLs. The indicatorShape has\n\t * precedence over the indicatorImage. Value is \"indicatorImage\".\n\t */\n\tSTYLE_INDICATOR_IMAGE: 'indicatorImage',\n\n\t/**\n\t * Variable: STYLE_INDICATOR_COLOR\n\t * \n\t * Defines the key for the indicatorColor style. Possible values are all\n\t * HTML color names or HEX codes, as well as the special 'swimlane' keyword\n\t * to refer to the color of the parent swimlane if one exists. Value is\n\t * \"indicatorColor\".\n\t */\n\tSTYLE_INDICATOR_COLOR: 'indicatorColor',\n\n\t/**\n\t * Variable: STYLE_INDICATOR_STROKECOLOR\n\t * \n\t * Defines the key for the indicator stroke color in <mxLabel>.\n\t * Possible values are all color codes. Value is \"indicatorStrokeColor\".\n\t */\n\tSTYLE_INDICATOR_STROKECOLOR: 'indicatorStrokeColor',\n\n\t/**\n\t * Variable: STYLE_INDICATOR_GRADIENTCOLOR\n\t * \n\t * Defines the key for the indicatorGradientColor style. Possible values\n\t * are all HTML color names or HEX codes. This style is only supported in\n\t * <SHAPE_LABEL> shapes. Value is \"indicatorGradientColor\".\n\t */\n\tSTYLE_INDICATOR_GRADIENTCOLOR: 'indicatorGradientColor',\n\n\t/**\n\t * Variable: STYLE_INDICATOR_SPACING\n\t * \n\t * The defines the key for the spacing between the label and the\n\t * indicator in <mxLabel>. Possible values are in pixels. Value is\n\t * \"indicatorSpacing\".\n\t */\n\tSTYLE_INDICATOR_SPACING: 'indicatorSpacing',\n\n\t/**\n\t * Variable: STYLE_INDICATOR_WIDTH\n\t * \n\t * Defines the key for the indicator width. Possible values start at 0 (in\n\t * pixels). Value is \"indicatorWidth\".\n\t */\n\tSTYLE_INDICATOR_WIDTH: 'indicatorWidth',\n\n\t/**\n\t * Variable: STYLE_INDICATOR_HEIGHT\n\t * \n\t * Defines the key for the indicator height. Possible values start at 0 (in\n\t * pixels). Value is \"indicatorHeight\".\n\t */\n\tSTYLE_INDICATOR_HEIGHT: 'indicatorHeight',\n\n\t/**\n\t * Variable: STYLE_INDICATOR_DIRECTION\n\t * \n\t * Defines the key for the indicatorDirection style. The direction style is\n\t * used to specify the direction of certain shapes (eg. <mxTriangle>).\n\t * Possible values are <DIRECTION_EAST> (default), <DIRECTION_WEST>,\n\t * <DIRECTION_NORTH> and <DIRECTION_SOUTH>. Value is \"indicatorDirection\".\n\t */\n\tSTYLE_INDICATOR_DIRECTION: 'indicatorDirection',\n\n\t/**\n\t * Variable: STYLE_SHADOW\n\t * \n\t * Defines the key for the shadow style. The type of the value is Boolean.\n\t * Value is \"shadow\".\n\t */\n\tSTYLE_SHADOW: 'shadow',\n\t\n\t/**\n\t * Variable: STYLE_SEGMENT\n\t * \n\t * Defines the key for the segment style. The type of this value is float\n\t * and the value represents the size of the horizontal segment of the\n\t * entity relation style. Default is ENTITY_SEGMENT. Value is \"segment\".\n\t */\n\tSTYLE_SEGMENT: 'segment',\n\t\n\t/**\n\t * Variable: STYLE_ENDARROW\n\t *\n\t * Defines the key for the end arrow marker. Possible values are all\n\t * constants with an ARROW-prefix. This is only used in <mxConnector>.\n\t * Value is \"endArrow\".\n\t *\n\t * Example:\n\t * (code)\n\t * style[mxConstants.STYLE_ENDARROW] = mxConstants.ARROW_CLASSIC;\n\t * (end)\n\t */\n\tSTYLE_ENDARROW: 'endArrow',\n\n\t/**\n\t * Variable: STYLE_STARTARROW\n\t * \n\t * Defines the key for the start arrow marker. Possible values are all\n\t * constants with an ARROW-prefix. This is only used in <mxConnector>.\n\t * See <STYLE_ENDARROW>. Value is \"startArrow\".\n\t */\n\tSTYLE_STARTARROW: 'startArrow',\n\n\t/**\n\t * Variable: STYLE_ENDSIZE\n\t * \n\t * Defines the key for the endSize style. The type of this value is numeric\n\t * and the value represents the size of the end marker in pixels. Value is\n\t * \"endSize\".\n\t */\n\tSTYLE_ENDSIZE: 'endSize',\n\n\t/**\n\t * Variable: STYLE_STARTSIZE\n\t * \n\t * Defines the key for the startSize style. The type of this value is\n\t * numeric and the value represents the size of the start marker or the\n\t * size of the swimlane title region depending on the shape it is used for.\n\t * Value is \"startSize\".\n\t */\n\tSTYLE_STARTSIZE: 'startSize',\n\n\t/**\n\t * Variable: STYLE_SWIMLANE_LINE\n\t * \n\t * Defines the key for the swimlaneLine style. This style specifies whether\n\t * the line between the title regio of a swimlane should be visible. Use 0\n\t * for hidden or 1 (default) for visible. Value is \"swimlaneLine\".\n\t */\n\tSTYLE_SWIMLANE_LINE: 'swimlaneLine',\n\n\t/**\n\t * Variable: STYLE_ENDFILL\n\t * \n\t * Defines the key for the endFill style. Use 0 for no fill or 1 (default)\n\t * for fill. (This style is only exported via <mxImageExport>.) Value is\n\t * \"endFill\".\n\t */\n\tSTYLE_ENDFILL: 'endFill',\n\n\t/**\n\t * Variable: STYLE_STARTFILL\n\t * \n\t * Defines the key for the startFill style. Use 0 for no fill or 1 (default)\n\t * for fill. (This style is only exported via <mxImageExport>.) Value is\n\t * \"startFill\".\n\t */\n\tSTYLE_STARTFILL: 'startFill',\n\n\t/**\n\t * Variable: STYLE_DASHED\n\t * \n\t * Defines the key for the dashed style. Use 0 (default) for non-dashed or 1\n\t * for dashed. Value is \"dashed\".\n\t */\n\tSTYLE_DASHED: 'dashed',\n\n\t/**\n\t * Defines the key for the dashed pattern style in SVG and image exports.\n\t * The type of this value is a space separated list of numbers that specify\n\t * a custom-defined dash pattern. Dash styles are defined in terms of the\n\t * length of the dash (the drawn part of the stroke) and the length of the\n\t * space between the dashes. The lengths are relative to the line width: a\n\t * length of \"1\" is equal to the line width. VML ignores this style and\n\t * uses dashStyle instead as defined in the VML specification. This style\n\t * is only used in the <mxConnector> shape. Value is \"dashPattern\".\n\t */\n\tSTYLE_DASH_PATTERN: 'dashPattern',\n\n\t/**\n\t * Variable: STYLE_FIX_DASH\n\t * \n\t * Defines the key for the fixDash style. Use 0 (default) for dash patterns\n\t * that depend on the linewidth and 1 for dash patterns that ignore the\n\t * line width. Value is \"fixDash\".\n\t */\n\tSTYLE_FIX_DASH: 'fixDash',\n\n\t/**\n\t * Variable: STYLE_ROUNDED\n\t * \n\t * Defines the key for the rounded style. The type of this value is\n\t * Boolean. For edges this determines whether or not joins between edges\n\t * segments are smoothed to a rounded finish. For vertices that have the\n\t * rectangle shape, this determines whether or not the rectangle is\n\t * rounded. Use 0 (default) for non-rounded or 1 for rounded. Value is\n\t * \"rounded\".\n\t */\n\tSTYLE_ROUNDED: 'rounded',\n\n\t/**\n\t * Variable: STYLE_CURVED\n\t * \n\t * Defines the key for the curved style. The type of this value is\n\t * Boolean. It is only applicable for connector shapes. Use 0 (default)\n\t * for non-curved or 1 for curved. Value is \"curved\".\n\t */\n\tSTYLE_CURVED: 'curved',\n\n\t/**\n\t * Variable: STYLE_ARCSIZE\n\t * \n\t * Defines the rounding factor for a rounded rectangle in percent (without\n\t * the percent sign). Possible values are between 0 and 100. If this value\n\t * is not specified then RECTANGLE_ROUNDING_FACTOR * 100 is used. For\n\t * edges, this defines the absolute size of rounded corners in pixels. If\n\t * this values is not specified then LINE_ARCSIZE is used.\n\t * (This style is only exported via <mxImageExport>.) Value is \"arcSize\".\n\t */\n\tSTYLE_ARCSIZE: 'arcSize',\n\n\t/**\n\t * Variable: STYLE_ABSOLUTE_ARCSIZE\n\t * \n\t * Defines the key for the absolute arc size style. This specifies if\n\t * arcSize for rectangles is abolute or relative. Possible values are 1\n\t * and 0 (default). Value is \"absoluteArcSize\".\n\t */\n\tSTYLE_ABSOLUTE_ARCSIZE: 'absoluteArcSize',\n\n\t/**\n\t * Variable: STYLE_SOURCE_PERIMETER_SPACING\n\t * \n\t * Defines the key for the source perimeter spacing. The type of this value\n\t * is numeric. This is the distance between the source connection point of\n\t * an edge and the perimeter of the source vertex in pixels. This style\n\t * only applies to edges. Value is \"sourcePerimeterSpacing\".\n\t */\n\tSTYLE_SOURCE_PERIMETER_SPACING: 'sourcePerimeterSpacing',\n\n\t/**\n\t * Variable: STYLE_TARGET_PERIMETER_SPACING\n\t * \n\t * Defines the key for the target perimeter spacing. The type of this value\n\t * is numeric. This is the distance between the target connection point of\n\t * an edge and the perimeter of the target vertex in pixels. This style\n\t * only applies to edges. Value is \"targetPerimeterSpacing\".\n\t */\n\tSTYLE_TARGET_PERIMETER_SPACING: 'targetPerimeterSpacing',\n\n\t/**\n\t * Variable: STYLE_PERIMETER_SPACING\n\t * \n\t * Defines the key for the perimeter spacing. This is the distance between\n\t * the connection point and the perimeter in pixels. When used in a vertex\n\t * style, this applies to all incoming edges to floating ports (edges that\n\t * terminate on the perimeter of the vertex). When used in an edge style,\n\t * this spacing applies to the source and target separately, if they\n\t * terminate in floating ports (on the perimeter of the vertex). Value is\n\t * \"perimeterSpacing\".\n\t */\n\tSTYLE_PERIMETER_SPACING: 'perimeterSpacing',\n\n\t/**\n\t * Variable: STYLE_SPACING\n\t * \n\t * Defines the key for the spacing. The value represents the spacing, in\n\t * pixels, added to each side of a label in a vertex (style applies to\n\t * vertices only). Value is \"spacing\".\n\t */\n\tSTYLE_SPACING: 'spacing',\n\n\t/**\n\t * Variable: STYLE_SPACING_TOP\n\t * \n\t * Defines the key for the spacingTop style. The value represents the\n\t * spacing, in pixels, added to the top side of a label in a vertex (style\n\t * applies to vertices only). Value is \"spacingTop\".\n\t */\n\tSTYLE_SPACING_TOP: 'spacingTop',\n\n\t/**\n\t * Variable: STYLE_SPACING_LEFT\n\t * \n\t * Defines the key for the spacingLeft style. The value represents the\n\t * spacing, in pixels, added to the left side of a label in a vertex (style\n\t * applies to vertices only). Value is \"spacingLeft\".\n\t */\n\tSTYLE_SPACING_LEFT: 'spacingLeft',\n\n\t/**\n\t * Variable: STYLE_SPACING_BOTTOM\n\t * \n\t * Defines the key for the spacingBottom style The value represents the\n\t * spacing, in pixels, added to the bottom side of a label in a vertex\n\t * (style applies to vertices only). Value is \"spacingBottom\".\n\t */\n\tSTYLE_SPACING_BOTTOM: 'spacingBottom',\n\n\t/**\n\t * Variable: STYLE_SPACING_RIGHT\n\t * \n\t * Defines the key for the spacingRight style The value represents the\n\t * spacing, in pixels, added to the right side of a label in a vertex (style\n\t * applies to vertices only). Value is \"spacingRight\".\n\t */\n\tSTYLE_SPACING_RIGHT: 'spacingRight',\n\n\t/**\n\t * Variable: STYLE_HORIZONTAL\n\t * \n\t * Defines the key for the horizontal style. Possible values are\n\t * true or false. This value only applies to vertices. If the <STYLE_SHAPE>\n\t * is \"SHAPE_SWIMLANE\" a value of false indicates that the\n\t * swimlane should be drawn vertically, true indicates to draw it\n\t * horizontally. If the shape style does not indicate that this vertex is a\n\t * swimlane, this value affects only whether the label is drawn\n\t * horizontally or vertically. Value is \"horizontal\".\n\t */\n\tSTYLE_HORIZONTAL: 'horizontal',\n\n\t/**\n\t * Variable: STYLE_DIRECTION\n\t * \n\t * Defines the key for the direction style. The direction style is used\n\t * to specify the direction of certain shapes (eg. <mxTriangle>).\n\t * Possible values are <DIRECTION_EAST> (default), <DIRECTION_WEST>,\n\t * <DIRECTION_NORTH> and <DIRECTION_SOUTH>. Value is \"direction\".\n\t */\n\tSTYLE_DIRECTION: 'direction',\n\n\t/**\n\t * Variable: STYLE_ANCHOR_POINT_DIRECTION\n\t * \n\t * Defines the key for the anchorPointDirection style. The defines if the\n\t * direction style should be taken into account when computing the fixed\n\t * point location for connected edges. Default is 1 (yes). Set this to 0\n\t * to ignore the direction style for fixed connection points. Value is\n\t * \"anchorPointDirection\".\n\t */\n\tSTYLE_ANCHOR_POINT_DIRECTION: 'anchorPointDirection',\n\n\t/**\n\t * Variable: STYLE_ELBOW\n\t * \n\t * Defines the key for the elbow style. Possible values are\n\t * <ELBOW_HORIZONTAL> and <ELBOW_VERTICAL>. Default is <ELBOW_HORIZONTAL>.\n\t * This defines how the three segment orthogonal edge style leaves its\n\t * terminal vertices. The vertical style leaves the terminal vertices at\n\t * the top and bottom sides. Value is \"elbow\".\n\t */\n\tSTYLE_ELBOW: 'elbow',\n\n\t/**\n\t * Variable: STYLE_FONTCOLOR\n\t * \n\t * Defines the key for the fontColor style. Possible values are all HTML\n\t * color names or HEX codes. Value is \"fontColor\".\n\t */\n\tSTYLE_FONTCOLOR: 'fontColor',\n\n\t/**\n\t * Variable: STYLE_FONTFAMILY\n\t * \n\t * Defines the key for the fontFamily style. Possible values are names such\n\t * as Arial; Dialog; Verdana; Times New Roman. The value is of type String.\n\t * Value is fontFamily.\n\t */\n\tSTYLE_FONTFAMILY: 'fontFamily',\n\n\t/**\n\t * Variable: STYLE_FONTSIZE\n\t * \n\t * Defines the key for the fontSize style (in px). The type of the value\n\t * is int. Value is \"fontSize\".\n\t */\n\tSTYLE_FONTSIZE: 'fontSize',\n\n\t/**\n\t * Variable: STYLE_FONTSTYLE\n\t * \n\t * Defines the key for the fontStyle style. Values may be any logical AND\n\t * (sum) of <FONT_BOLD>, <FONT_ITALIC> and <FONT_UNDERLINE>.\n\t * The type of the value is int. Value is \"fontStyle\".\n\t */\n\tSTYLE_FONTSTYLE: 'fontStyle',\n\t\n\t/**\n\t * Variable: STYLE_ASPECT\n\t * \n\t * Defines the key for the aspect style. Possible values are empty or fixed.\n\t * If fixed is used then the aspect ratio of the cell will be maintained\n\t * when resizing. Default is empty. Value is \"aspect\".\n\t */\n\tSTYLE_ASPECT: 'aspect',\n\n\t/**\n\t * Variable: STYLE_AUTOSIZE\n\t * \n\t * Defines the key for the autosize style. This specifies if a cell should be\n\t * resized automatically if the value has changed. Possible values are 0 or 1.\n\t * Default is 0. See <mxGraph.isAutoSizeCell>. This is normally combined with\n\t * <STYLE_RESIZABLE> to disable manual sizing. Value is \"autosize\".\n\t */\n\tSTYLE_AUTOSIZE: 'autosize',\n\n\t/**\n\t * Variable: STYLE_FOLDABLE\n\t * \n\t * Defines the key for the foldable style. This specifies if a cell is foldable\n\t * using a folding icon. Possible values are 0 or 1. Default is 1. See\n\t * <mxGraph.isCellFoldable>. Value is \"foldable\".\n\t */\n\tSTYLE_FOLDABLE: 'foldable',\n\n\t/**\n\t * Variable: STYLE_EDITABLE\n\t * \n\t * Defines the key for the editable style. This specifies if the value of\n\t * a cell can be edited using the in-place editor. Possible values are 0 or\n\t * 1. Default is 1. See <mxGraph.isCellEditable>. Value is \"editable\".\n\t */\n\tSTYLE_EDITABLE: 'editable',\n\n\t/**\n\t * Variable: STYLE_BACKGROUND_OUTLINE\n\t * \n\t * Defines the key for the backgroundOutline style. This specifies if a\n\t * only the background of a cell should be painted when it is highlighted.\n\t * Possible values are 0 or 1. Default is 0. Value is \"backgroundOutline\".\n\t */\n\tSTYLE_BACKGROUND_OUTLINE: 'backgroundOutline',\n\n\t/**\n\t * Variable: STYLE_BENDABLE\n\t * \n\t * Defines the key for the bendable style. This specifies if the control\n\t * points of an edge can be moved. Possible values are 0 or 1. Default is\n\t * 1. See <mxGraph.isCellBendable>. Value is \"bendable\".\n\t */\n\tSTYLE_BENDABLE: 'bendable',\n\n\t/**\n\t * Variable: STYLE_MOVABLE\n\t * \n\t * Defines the key for the movable style. This specifies if a cell can\n\t * be moved. Possible values are 0 or 1. Default is 1. See\n\t * <mxGraph.isCellMovable>. Value is \"movable\".\n\t */\n\tSTYLE_MOVABLE: 'movable',\n\n\t/**\n\t * Variable: STYLE_RESIZABLE\n\t * \n\t * Defines the key for the resizable style. This specifies if a cell can\n\t * be resized. Possible values are 0 or 1. Default is 1. See\n\t * <mxGraph.isCellResizable>. Value is \"resizable\".\n\t */\n\tSTYLE_RESIZABLE: 'resizable',\n\n\t/**\n\t * Variable: STYLE_RESIZE_WIDTH\n\t * \n\t * Defines the key for the resizeWidth style. This specifies if a cell's\n\t * width is resized if the parent is resized. If this is 1 then the width\n\t * will be resized even if the cell's geometry is relative. If this is 0\n\t * then the cell's width will not be resized. Default is not defined. Value\n\t * is \"resizeWidth\".\n\t */\n\tSTYLE_RESIZE_WIDTH: 'resizeWidth',\n\n\t/**\n\t * Variable: STYLE_RESIZE_WIDTH\n\t * \n\t * Defines the key for the resizeHeight style. This specifies if a cell's\n\t * height if resize if the parent is resized. If this is 1 then the height\n\t * will be resized even if the cell's geometry is relative. If this is 0\n\t * then the cell's height will not be resized. Default is not defined. Value\n\t * is \"resizeHeight\".\n\t */\n\tSTYLE_RESIZE_HEIGHT: 'resizeHeight',\n\n\t/**\n\t * Variable: STYLE_ROTATABLE\n\t * \n\t * Defines the key for the rotatable style. This specifies if a cell can\n\t * be rotated. Possible values are 0 or 1. Default is 1. See\n\t * <mxGraph.isCellRotatable>. Value is \"rotatable\".\n\t */\n\tSTYLE_ROTATABLE: 'rotatable',\n\n\t/**\n\t * Variable: STYLE_CLONEABLE\n\t * \n\t * Defines the key for the cloneable style. This specifies if a cell can\n\t * be cloned. Possible values are 0 or 1. Default is 1. See\n\t * <mxGraph.isCellCloneable>. Value is \"cloneable\".\n\t */\n\tSTYLE_CLONEABLE: 'cloneable',\n\n\t/**\n\t * Variable: STYLE_DELETABLE\n\t * \n\t * Defines the key for the deletable style. This specifies if a cell can be\n\t * deleted. Possible values are 0 or 1. Default is 1. See\n\t * <mxGraph.isCellDeletable>. Value is \"deletable\".\n\t */\n\tSTYLE_DELETABLE: 'deletable',\n\n\t/**\n\t * Variable: STYLE_SHAPE\n\t * \n\t * Defines the key for the shape. Possible values are all constants with\n\t * a SHAPE-prefix or any newly defined shape names. Value is \"shape\".\n\t */\n\tSTYLE_SHAPE: 'shape',\n\n\t/**\n\t * Variable: STYLE_EDGE\n\t * \n\t * Defines the key for the edge style. Possible values are the functions\n\t * defined in <mxEdgeStyle>. Value is \"edgeStyle\".\n\t */\n\tSTYLE_EDGE: 'edgeStyle',\n\n\t/**\n\t * Variable: STYLE_JETTY_SIZE\n\t * \n\t * Defines the key for the jetty size in <mxEdgeStyle.OrthConnector>.\n\t * Default is 10. Possible values are all numeric values or \"auto\".\n\t * Value is \"jettySize\".\n\t */\n\tSTYLE_JETTY_SIZE: 'jettySize',\n\n\t/**\n\t * Variable: STYLE_SOURCE_JETTY_SIZE\n\t * \n\t * Defines the key for the jetty size in <mxEdgeStyle.OrthConnector>.\n\t * Default is 10. Possible values are numeric values or \"auto\". This has\n\t * precedence over <STYLE_JETTY_SIZE>. Value is \"sourceJettySize\".\n\t */\n\tSTYLE_SOURCE_JETTY_SIZE: 'sourceJettySize',\n\n\t/**\n\t * Variable: targetJettySize\n\t * \n\t * Defines the key for the jetty size in <mxEdgeStyle.OrthConnector>.\n\t * Default is 10. Possible values are numeric values or \"auto\". This has\n\t * precedence over <STYLE_JETTY_SIZE>. Value is \"targetJettySize\".\n\t */\n\tSTYLE_TARGET_JETTY_SIZE: 'targetJettySize',\n\n\t/**\n\t * Variable: STYLE_LOOP\n\t * \n\t * Defines the key for the loop style. Possible values are the functions\n\t * defined in <mxEdgeStyle>. Value is \"loopStyle\".\n\t */\n\tSTYLE_LOOP: 'loopStyle',\n\n\t/**\n\t * Variable: STYLE_ORTHOGONAL_LOOP\n\t * \n\t * Defines the key for the orthogonal loop style. Possible values are 0 and\n\t * 1. Default is 0. Value is \"orthogonalLoop\". Use this style to specify\n\t * if loops should be routed using an orthogonal router. Currently, this\n\t * uses <mxEdgeStyle.OrthConnector> but will be replaced with a dedicated\n\t * orthogonal loop router in later releases.\n\t */\n\tSTYLE_ORTHOGONAL_LOOP: 'orthogonalLoop',\n\n\t/**\n\t * Variable: STYLE_ROUTING_CENTER_X\n\t * \n\t * Defines the key for the horizontal routing center. Possible values are\n\t * between -0.5 and 0.5. This is the relative offset from the center used\n\t * for connecting edges. The type of this value is numeric. Value is\n\t * \"routingCenterX\".\n\t */\n\tSTYLE_ROUTING_CENTER_X: 'routingCenterX',\n\n\t/**\n\t * Variable: STYLE_ROUTING_CENTER_Y\n\t * \n\t * Defines the key for the vertical routing center. Possible values are\n\t * between -0.5 and 0.5. This is the relative offset from the center used\n\t * for connecting edges. The type of this value is numeric. Value is\n\t * \"routingCenterY\".\n\t */\n\tSTYLE_ROUTING_CENTER_Y: 'routingCenterY',\n\n\t/**\n\t * Variable: FONT_BOLD\n\t * \n\t * Constant for bold fonts. Default is 1.\n\t */\n\tFONT_BOLD: 1,\n\n\t/**\n\t * Variable: FONT_ITALIC\n\t * \n\t * Constant for italic fonts. Default is 2.\n\t */\n\tFONT_ITALIC: 2,\n\n\t/**\n\t * Variable: FONT_UNDERLINE\n\t * \n\t * Constant for underlined fonts. Default is 4.\n\t */\n\tFONT_UNDERLINE: 4,\n\n\t/**\n\t * Variable: SHAPE_RECTANGLE\n\t * \n\t * Name under which <mxRectangleShape> is registered in <mxCellRenderer>.\n\t * Default is rectangle.\n\t */\n\tSHAPE_RECTANGLE: 'rectangle',\n\n\t/**\n\t * Variable: SHAPE_ELLIPSE\n\t * \n\t * Name under which <mxEllipse> is registered in <mxCellRenderer>.\n\t * Default is ellipse.\n\t */\n\tSHAPE_ELLIPSE: 'ellipse',\n\n\t/**\n\t * Variable: SHAPE_DOUBLE_ELLIPSE\n\t * \n\t * Name under which <mxDoubleEllipse> is registered in <mxCellRenderer>.\n\t * Default is doubleEllipse.\n\t */\n\tSHAPE_DOUBLE_ELLIPSE: 'doubleEllipse',\n\n\t/**\n\t * Variable: SHAPE_RHOMBUS\n\t * \n\t * Name under which <mxRhombus> is registered in <mxCellRenderer>.\n\t * Default is rhombus.\n\t */\n\tSHAPE_RHOMBUS: 'rhombus',\n\n\t/**\n\t * Variable: SHAPE_LINE\n\t * \n\t * Name under which <mxLine> is registered in <mxCellRenderer>.\n\t * Default is line.\n\t */\n\tSHAPE_LINE: 'line',\n\n\t/**\n\t * Variable: SHAPE_IMAGE\n\t * \n\t * Name under which <mxImageShape> is registered in <mxCellRenderer>.\n\t * Default is image.\n\t */\n\tSHAPE_IMAGE: 'image',\n\t\n\t/**\n\t * Variable: SHAPE_ARROW\n\t * \n\t * Name under which <mxArrow> is registered in <mxCellRenderer>.\n\t * Default is arrow.\n\t */\n\tSHAPE_ARROW: 'arrow',\n\t\n\t/**\n\t * Variable: SHAPE_ARROW_CONNECTOR\n\t * \n\t * Name under which <mxArrowConnector> is registered in <mxCellRenderer>.\n\t * Default is arrowConnector.\n\t */\n\tSHAPE_ARROW_CONNECTOR: 'arrowConnector',\n\t\n\t/**\n\t * Variable: SHAPE_LABEL\n\t * \n\t * Name under which <mxLabel> is registered in <mxCellRenderer>.\n\t * Default is label.\n\t */\n\tSHAPE_LABEL: 'label',\n\t\n\t/**\n\t * Variable: SHAPE_CYLINDER\n\t * \n\t * Name under which <mxCylinder> is registered in <mxCellRenderer>.\n\t * Default is cylinder.\n\t */\n\tSHAPE_CYLINDER: 'cylinder',\n\t\n\t/**\n\t * Variable: SHAPE_SWIMLANE\n\t * \n\t * Name under which <mxSwimlane> is registered in <mxCellRenderer>.\n\t * Default is swimlane.\n\t */\n\tSHAPE_SWIMLANE: 'swimlane',\n\t\t\n\t/**\n\t * Variable: SHAPE_CONNECTOR\n\t * \n\t * Name under which <mxConnector> is registered in <mxCellRenderer>.\n\t * Default is connector.\n\t */\n\tSHAPE_CONNECTOR: 'connector',\n\n\t/**\n\t * Variable: SHAPE_ACTOR\n\t * \n\t * Name under which <mxActor> is registered in <mxCellRenderer>.\n\t * Default is actor.\n\t */\n\tSHAPE_ACTOR: 'actor',\n\t\t\n\t/**\n\t * Variable: SHAPE_CLOUD\n\t * \n\t * Name under which <mxCloud> is registered in <mxCellRenderer>.\n\t * Default is cloud.\n\t */\n\tSHAPE_CLOUD: 'cloud',\n\t\t\n\t/**\n\t * Variable: SHAPE_TRIANGLE\n\t * \n\t * Name under which <mxTriangle> is registered in <mxCellRenderer>.\n\t * Default is triangle.\n\t */\n\tSHAPE_TRIANGLE: 'triangle',\n\t\t\n\t/**\n\t * Variable: SHAPE_HEXAGON\n\t * \n\t * Name under which <mxHexagon> is registered in <mxCellRenderer>.\n\t * Default is hexagon.\n\t */\n\tSHAPE_HEXAGON: 'hexagon',\n\n\t/**\n\t * Variable: ARROW_CLASSIC\n\t * \n\t * Constant for classic arrow markers.\n\t */\n\tARROW_CLASSIC: 'classic',\n\n\t/**\n\t * Variable: ARROW_CLASSIC_THIN\n\t * \n\t * Constant for thin classic arrow markers.\n\t */\n\tARROW_CLASSIC_THIN: 'classicThin',\n\n\t/**\n\t * Variable: ARROW_BLOCK\n\t * \n\t * Constant for block arrow markers.\n\t */\n\tARROW_BLOCK: 'block',\n\n\t/**\n\t * Variable: ARROW_BLOCK_THIN\n\t * \n\t * Constant for thin block arrow markers.\n\t */\n\tARROW_BLOCK_THIN: 'blockThin',\n\n\t/**\n\t * Variable: ARROW_OPEN\n\t * \n\t * Constant for open arrow markers.\n\t */\n\tARROW_OPEN: 'open',\n\n\t/**\n\t * Variable: ARROW_OPEN_THIN\n\t * \n\t * Constant for thin open arrow markers.\n\t */\n\tARROW_OPEN_THIN: 'openThin',\n\n\t/**\n\t * Variable: ARROW_OVAL\n\t * \n\t * Constant for oval arrow markers.\n\t */\n\tARROW_OVAL: 'oval',\n\n\t/**\n\t * Variable: ARROW_DIAMOND\n\t * \n\t * Constant for diamond arrow markers.\n\t */\n\tARROW_DIAMOND: 'diamond',\n\n\t/**\n\t * Variable: ARROW_DIAMOND_THIN\n\t * \n\t * Constant for thin diamond arrow markers.\n\t */\n\tARROW_DIAMOND_THIN: 'diamondThin',\n\n\t/**\n\t * Variable: ALIGN_LEFT\n\t * \n\t * Constant for left horizontal alignment. Default is left.\n\t */\n\tALIGN_LEFT: 'left',\n\n\t/**\n\t * Variable: ALIGN_CENTER\n\t * \n\t * Constant for center horizontal alignment. Default is center.\n\t */\n\tALIGN_CENTER: 'center',\n\n\t/**\n\t * Variable: ALIGN_RIGHT\n\t * \n\t * Constant for right horizontal alignment. Default is right.\n\t */\n\tALIGN_RIGHT: 'right',\n\n\t/**\n\t * Variable: ALIGN_TOP\n\t * \n\t * Constant for top vertical alignment. Default is top.\n\t */\n\tALIGN_TOP: 'top',\n\n\t/**\n\t * Variable: ALIGN_MIDDLE\n\t * \n\t * Constant for middle vertical alignment. Default is middle.\n\t */\n\tALIGN_MIDDLE: 'middle',\n\n\t/**\n\t * Variable: ALIGN_BOTTOM\n\t * \n\t * Constant for bottom vertical alignment. Default is bottom.\n\t */\n\tALIGN_BOTTOM: 'bottom',\n\n\t/**\n\t * Variable: DIRECTION_NORTH\n\t * \n\t * Constant for direction north. Default is north.\n\t */\n\tDIRECTION_NORTH: 'north',\n\n\t/**\n\t * Variable: DIRECTION_SOUTH\n\t * \n\t * Constant for direction south. Default is south.\n\t */\n\tDIRECTION_SOUTH: 'south',\n\n\t/**\n\t * Variable: DIRECTION_EAST\n\t * \n\t * Constant for direction east. Default is east.\n\t */\n\tDIRECTION_EAST: 'east',\n\n\t/**\n\t * Variable: DIRECTION_WEST\n\t * \n\t * Constant for direction west. Default is west.\n\t */\n\tDIRECTION_WEST: 'west',\n\n\t/**\n\t * Variable: TEXT_DIRECTION_DEFAULT\n\t * \n\t * Constant for text direction default. Default is an empty string. Use\n\t * this value to use the default text direction of the operating system. \n\t */\n\tTEXT_DIRECTION_DEFAULT: '',\n\n\t/**\n\t * Variable: TEXT_DIRECTION_AUTO\n\t * \n\t * Constant for text direction automatic. Default is auto. Use this value\n\t * to find the direction for a given text with <mxText.getAutoDirection>. \n\t */\n\tTEXT_DIRECTION_AUTO: 'auto',\n\n\t/**\n\t * Variable: TEXT_DIRECTION_LTR\n\t * \n\t * Constant for text direction left to right. Default is ltr. Use this\n\t * value for left to right text direction.\n\t */\n\tTEXT_DIRECTION_LTR: 'ltr',\n\n\t/**\n\t * Variable: TEXT_DIRECTION_RTL\n\t * \n\t * Constant for text direction right to left. Default is rtl. Use this\n\t * value for right to left text direction.\n\t */\n\tTEXT_DIRECTION_RTL: 'rtl',\n\n\t/**\n\t * Variable: DIRECTION_MASK_NONE\n\t * \n\t * Constant for no direction.\n\t */\n\tDIRECTION_MASK_NONE: 0,\n\n\t/**\n\t * Variable: DIRECTION_MASK_WEST\n\t * \n\t * Bitwise mask for west direction.\n\t */\n\tDIRECTION_MASK_WEST: 1,\n\t\n\t/**\n\t * Variable: DIRECTION_MASK_NORTH\n\t * \n\t * Bitwise mask for north direction.\n\t */\n\tDIRECTION_MASK_NORTH: 2,\n\n\t/**\n\t * Variable: DIRECTION_MASK_SOUTH\n\t * \n\t * Bitwise mask for south direction.\n\t */\n\tDIRECTION_MASK_SOUTH: 4,\n\n\t/**\n\t * Variable: DIRECTION_MASK_EAST\n\t * \n\t * Bitwise mask for east direction.\n\t */\n\tDIRECTION_MASK_EAST: 8,\n\t\n\t/**\n\t * Variable: DIRECTION_MASK_ALL\n\t * \n\t * Bitwise mask for all directions.\n\t */\n\tDIRECTION_MASK_ALL: 15,\n\n\t/**\n\t * Variable: ELBOW_VERTICAL\n\t * \n\t * Constant for elbow vertical. Default is horizontal.\n\t */\n\tELBOW_VERTICAL: 'vertical',\n\n\t/**\n\t * Variable: ELBOW_HORIZONTAL\n\t * \n\t * Constant for elbow horizontal. Default is horizontal.\n\t */\n\tELBOW_HORIZONTAL: 'horizontal',\n\n\t/**\n\t * Variable: EDGESTYLE_ELBOW\n\t * \n\t * Name of the elbow edge style. Can be used as a string value\n\t * for the STYLE_EDGE style.\n\t */\n\tEDGESTYLE_ELBOW: 'elbowEdgeStyle',\n\n\t/**\n\t * Variable: EDGESTYLE_ENTITY_RELATION\n\t * \n\t * Name of the entity relation edge style. Can be used as a string value\n\t * for the STYLE_EDGE style.\n\t */\n\tEDGESTYLE_ENTITY_RELATION: 'entityRelationEdgeStyle',\n\n\t/**\n\t * Variable: EDGESTYLE_LOOP\n\t * \n\t * Name of the loop edge style. Can be used as a string value\n\t * for the STYLE_EDGE style.\n\t */\n\tEDGESTYLE_LOOP: 'loopEdgeStyle',\n\n\t/**\n\t * Variable: EDGESTYLE_SIDETOSIDE\n\t * \n\t * Name of the side to side edge style. Can be used as a string value\n\t * for the STYLE_EDGE style.\n\t */\n\tEDGESTYLE_SIDETOSIDE: 'sideToSideEdgeStyle',\n\n\t/**\n\t * Variable: EDGESTYLE_TOPTOBOTTOM\n\t * \n\t * Name of the top to bottom edge style. Can be used as a string value\n\t * for the STYLE_EDGE style.\n\t */\n\tEDGESTYLE_TOPTOBOTTOM: 'topToBottomEdgeStyle',\n\n\t/**\n\t * Variable: EDGESTYLE_ORTHOGONAL\n\t * \n\t * Name of the generic orthogonal edge style. Can be used as a string value\n\t * for the STYLE_EDGE style.\n\t */\n\tEDGESTYLE_ORTHOGONAL: 'orthogonalEdgeStyle',\n\n\t/**\n\t * Variable: EDGESTYLE_SEGMENT\n\t * \n\t * Name of the generic segment edge style. Can be used as a string value\n\t * for the STYLE_EDGE style.\n\t */\n\tEDGESTYLE_SEGMENT: 'segmentEdgeStyle',\n \n\t/**\n\t * Variable: PERIMETER_ELLIPSE\n\t * \n\t * Name of the ellipse perimeter. Can be used as a string value\n\t * for the STYLE_PERIMETER style.\n\t */\n\tPERIMETER_ELLIPSE: 'ellipsePerimeter',\n\n\t/**\n\t * Variable: PERIMETER_RECTANGLE\n\t *\n\t * Name of the rectangle perimeter. Can be used as a string value\n\t * for the STYLE_PERIMETER style.\n\t */\n\tPERIMETER_RECTANGLE: 'rectanglePerimeter',\n\n\t/**\n\t * Variable: PERIMETER_RHOMBUS\n\t * \n\t * Name of the rhombus perimeter. Can be used as a string value\n\t * for the STYLE_PERIMETER style.\n\t */\n\tPERIMETER_RHOMBUS: 'rhombusPerimeter',\n\n\t/**\n\t * Variable: PERIMETER_HEXAGON\n\t * \n\t * Name of the hexagon perimeter. Can be used as a string value \n\t * for the STYLE_PERIMETER style.\n\t */\n\tPERIMETER_HEXAGON: 'hexagonPerimeter',\n\n\t/**\n\t * Variable: PERIMETER_TRIANGLE\n\t * \n\t * Name of the triangle perimeter. Can be used as a string value\n\t * for the STYLE_PERIMETER style.\n\t */\n\tPERIMETER_TRIANGLE: 'trianglePerimeter'\n\n};\n"
  },
  {
    "path": "static/cherry/drawio_demo/src/js/util/mxDictionary.js",
    "content": "/**\n * Copyright (c) 2006-2015, JGraph Ltd\n * Copyright (c) 2006-2015, Gaudenz Alder\n */\n/**\n * Class: mxDictionary\n *\n * A wrapper class for an associative array with object keys. Note: This\n * implementation uses <mxObjectIdentitiy> to turn object keys into strings.\n * \n * Constructor: mxEventSource\n *\n * Constructs a new dictionary which allows object to be used as keys.\n */\nfunction mxDictionary()\n{\n\tthis.clear();\n};\n\n/**\n * Function: map\n *\n * Stores the (key, value) pairs in this dictionary.\n */\nmxDictionary.prototype.map = null;\n\n/**\n * Function: clear\n *\n * Clears the dictionary.\n */\nmxDictionary.prototype.clear = function()\n{\n\tthis.map = {};\n};\n\n/**\n * Function: get\n *\n * Returns the value for the given key.\n */\nmxDictionary.prototype.get = function(key)\n{\n\tvar id = mxObjectIdentity.get(key);\n\t\n\treturn this.map[id];\n};\n\n/**\n * Function: put\n *\n * Stores the value under the given key and returns the previous\n * value for that key.\n */\nmxDictionary.prototype.put = function(key, value)\n{\n\tvar id = mxObjectIdentity.get(key);\n\tvar previous = this.map[id];\n\tthis.map[id] = value;\n\t\n\treturn previous;\n};\n\n/**\n * Function: remove\n *\n * Removes the value for the given key and returns the value that\n * has been removed.\n */\nmxDictionary.prototype.remove = function(key)\n{\n\tvar id = mxObjectIdentity.get(key);\n\tvar previous = this.map[id];\n\tdelete this.map[id];\n\t\n\treturn previous;\n};\n\n/**\n * Function: getKeys\n *\n * Returns all keys as an array.\n */\nmxDictionary.prototype.getKeys = function()\n{\n\tvar result = [];\n\t\n\tfor (var key in this.map)\n\t{\n\t\tresult.push(key);\n\t}\n\t\n\treturn result;\n};\n\n/**\n * Function: getValues\n *\n * Returns all values as an array.\n */\nmxDictionary.prototype.getValues = function()\n{\n\tvar result = [];\n\t\n\tfor (var key in this.map)\n\t{\n\t\tresult.push(this.map[key]);\n\t}\n\t\n\treturn result;\n};\n\n/**\n * Function: visit\n *\n * Visits all entries in the dictionary using the given function with the\n * following signature: function(key, value) where key is a string and\n * value is an object.\n * \n * Parameters:\n * \n * visitor - A function that takes the key and value as arguments.\n */\nmxDictionary.prototype.visit = function(visitor)\n{\n\tfor (var key in this.map)\n\t{\n\t\tvisitor(key, this.map[key]);\n\t}\n};\n"
  },
  {
    "path": "static/cherry/drawio_demo/src/js/util/mxDivResizer.js",
    "content": "/**\n * Copyright (c) 2006-2015, JGraph Ltd\n * Copyright (c) 2006-2015, Gaudenz Alder\n */\n/**\n * Class: mxDivResizer\n * \n * Maintains the size of a div element in Internet Explorer. This is a\n * workaround for the right and bottom style being ignored in IE.\n * \n * If you need a div to cover the scrollwidth and -height of a document,\n * then you can use this class as follows:\n * \n * (code)\n * var resizer = new mxDivResizer(background);\n * resizer.getDocumentHeight = function()\n * {\n *   return document.body.scrollHeight;\n * }\n * resizer.getDocumentWidth = function()\n * {\n *   return document.body.scrollWidth;\n * }\n * resizer.resize();\n * (end)\n * \n * Constructor: mxDivResizer\n * \n * Constructs an object that maintains the size of a div\n * element when the window is being resized. This is only\n * required for Internet Explorer as it ignores the respective\n * stylesheet information for DIV elements.\n * \n * Parameters:\n * \n * div - Reference to the DOM node whose size should be maintained.\n * container - Optional Container that contains the div. Default is the\n * window.\n */\nfunction mxDivResizer(div, container)\n{\n\tif (div.nodeName.toLowerCase() == 'div')\n\t{\n\t\tif (container == null)\n\t\t{\n\t\t\tcontainer = window;\n\t\t}\n\n\t\tthis.div = div;\n\t\tvar style = mxUtils.getCurrentStyle(div);\n\t\t\n\t\tif (style != null)\n\t\t{\n\t\t\tthis.resizeWidth = style.width == 'auto';\n\t\t\tthis.resizeHeight = style.height == 'auto';\n\t\t}\n\t\t\n\t\tmxEvent.addListener(container, 'resize',\n\t\t\tmxUtils.bind(this, function(evt)\n\t\t\t{\n\t\t\t\tif (!this.handlingResize)\n\t\t\t\t{\n\t\t\t\t\tthis.handlingResize = true;\n\t\t\t\t\tthis.resize();\n\t\t\t\t\tthis.handlingResize = false;\n\t\t\t\t}\n\t\t\t})\n\t\t);\n\t\t\n\t\tthis.resize();\n\t}\n};\n\n/**\n * Function: resizeWidth\n * \n * Boolean specifying if the width should be updated.\n */\nmxDivResizer.prototype.resizeWidth = true;\n\n/**\n * Function: resizeHeight\n * \n * Boolean specifying if the height should be updated.\n */\nmxDivResizer.prototype.resizeHeight = true;\n\n/**\n * Function: handlingResize\n * \n * Boolean specifying if the width should be updated.\n */\nmxDivResizer.prototype.handlingResize = false;\n\n/**\n * Function: resize\n * \n * Updates the style of the DIV after the window has been resized.\n */\nmxDivResizer.prototype.resize = function()\n{\n\tvar w = this.getDocumentWidth();\n\tvar h = this.getDocumentHeight();\n\n\tvar l = parseInt(this.div.style.left);\n\tvar r = parseInt(this.div.style.right);\n\tvar t = parseInt(this.div.style.top);\n\tvar b = parseInt(this.div.style.bottom);\n\t\n\tif (this.resizeWidth &&\n\t\t!isNaN(l) &&\n\t\t!isNaN(r) &&\n\t\tl >= 0 &&\n\t\tr >= 0 &&\n\t\tw - r - l > 0)\n\t{\n\t\tthis.div.style.width = (w - r - l)+'px';\n\t}\n\t\n\tif (this.resizeHeight &&\n\t\t!isNaN(t) &&\n\t\t!isNaN(b) &&\n\t\tt >= 0 &&\n\t\tb >= 0 &&\n\t\th - t - b > 0)\n\t{\n\t\tthis.div.style.height = (h - t - b)+'px';\n\t}\n};\n\n/**\n * Function: getDocumentWidth\n * \n * Hook for subclassers to return the width of the document (without\n * scrollbars).\n */\nmxDivResizer.prototype.getDocumentWidth = function()\n{\n\treturn document.body.clientWidth;\n};\n\n/**\n * Function: getDocumentHeight\n * \n * Hook for subclassers to return the height of the document (without\n * scrollbars).\n */\nmxDivResizer.prototype.getDocumentHeight = function()\n{\n\treturn document.body.clientHeight;\n};\n"
  },
  {
    "path": "static/cherry/drawio_demo/src/js/util/mxDragSource.js",
    "content": "/**\n * Copyright (c) 2006-2015, JGraph Ltd\n * Copyright (c) 2006-2015, Gaudenz Alder\n */\n/**\n * Class: mxDragSource\n * \n * Wrapper to create a drag source from a DOM element so that the element can\n * be dragged over a graph and dropped into the graph as a new cell.\n * \n * Problem is that in the dropHandler the current preview location is not\n * available, so the preview and the dropHandler must match.\n * \n * Constructor: mxDragSource\n * \n * Constructs a new drag source for the given element.\n */\nfunction mxDragSource(element, dropHandler)\n{\n\tthis.element = element;\n\tthis.dropHandler = dropHandler;\n\t\n\t// Handles a drag gesture on the element\n\tmxEvent.addGestureListeners(element, mxUtils.bind(this, function(evt)\n\t{\n\t\tthis.mouseDown(evt);\n\t}));\n\t\n\t// Prevents native drag and drop\n\tmxEvent.addListener(element, 'dragstart', function(evt)\n\t{\n\t\tmxEvent.consume(evt);\n\t});\n\t\n\tthis.eventConsumer = function(sender, evt)\n\t{\n\t\tvar evtName = evt.getProperty('eventName');\n\t\tvar me = evt.getProperty('event');\n\t\t\n\t\tif (evtName != mxEvent.MOUSE_DOWN)\n\t\t{\n\t\t\tme.consume();\n\t\t}\n\t};\n};\n\n/**\n * Variable: element\n *\n * Reference to the DOM node which was made draggable.\n */\nmxDragSource.prototype.element = null;\n\n/**\n * Variable: dropHandler\n *\n * Holds the DOM node that is used to represent the drag preview. If this is\n * null then the source element will be cloned and used for the drag preview.\n */\nmxDragSource.prototype.dropHandler = null;\n\n/**\n * Variable: dragOffset\n *\n * <mxPoint> that specifies the offset of the <dragElement>. Default is null.\n */\nmxDragSource.prototype.dragOffset = null;\n\n/**\n * Variable: dragElement\n *\n * Holds the DOM node that is used to represent the drag preview. If this is\n * null then the source element will be cloned and used for the drag preview.\n */\nmxDragSource.prototype.dragElement = null;\n\n/**\n * Variable: previewElement\n *\n * Optional <mxRectangle> that specifies the unscaled size of the preview.\n */\nmxDragSource.prototype.previewElement = null;\n\n/**\n * Variable: enabled\n *\n * Specifies if this drag source is enabled. Default is true.\n */\nmxDragSource.prototype.enabled = true;\n\n/**\n * Variable: currentGraph\n *\n * Reference to the <mxGraph> that is the current drop target.\n */\nmxDragSource.prototype.currentGraph = null;\n\n/**\n * Variable: currentDropTarget\n *\n * Holds the current drop target under the mouse.\n */\nmxDragSource.prototype.currentDropTarget = null;\n\n/**\n * Variable: currentPoint\n *\n * Holds the current drop location.\n */\nmxDragSource.prototype.currentPoint = null;\n\n/**\n * Variable: currentGuide\n *\n * Holds an <mxGuide> for the <currentGraph> if <dragPreview> is not null.\n */\nmxDragSource.prototype.currentGuide = null;\n\n/**\n * Variable: currentGuide\n *\n * Holds an <mxGuide> for the <currentGraph> if <dragPreview> is not null.\n */\nmxDragSource.prototype.currentHighlight = null;\n\n/**\n * Variable: autoscroll\n *\n * Specifies if the graph should scroll automatically. Default is true.\n */\nmxDragSource.prototype.autoscroll = true;\n\n/**\n * Variable: guidesEnabled\n *\n * Specifies if <mxGuide> should be enabled. Default is true.\n */\nmxDragSource.prototype.guidesEnabled = true;\n\n/**\n * Variable: gridEnabled\n *\n * Specifies if the grid should be allowed. Default is true.\n */\nmxDragSource.prototype.gridEnabled = true;\n\n/**\n * Variable: highlightDropTargets\n *\n * Specifies if drop targets should be highlighted. Default is true.\n */\nmxDragSource.prototype.highlightDropTargets = true;\n\n/**\n * Variable: dragElementZIndex\n * \n * ZIndex for the drag element. Default is 100.\n */\nmxDragSource.prototype.dragElementZIndex = 100;\n\n/**\n * Variable: dragElementOpacity\n * \n * Opacity of the drag element in %. Default is 70.\n */\nmxDragSource.prototype.dragElementOpacity = 70;\n\n/**\n * Variable: checkEventSource\n * \n * Whether the event source should be checked in <graphContainerEvent>. Default\n * is true.\n */\nmxDragSource.prototype.checkEventSource = true;\n\n/**\n * Function: isEnabled\n * \n * Returns <enabled>.\n */\nmxDragSource.prototype.isEnabled = function()\n{\n\treturn this.enabled;\n};\n\n/**\n * Function: setEnabled\n * \n * Sets <enabled>.\n */\nmxDragSource.prototype.setEnabled = function(value)\n{\n\tthis.enabled = value;\n};\n\n/**\n * Function: isGuidesEnabled\n * \n * Returns <guidesEnabled>.\n */\nmxDragSource.prototype.isGuidesEnabled = function()\n{\n\treturn this.guidesEnabled;\n};\n\n/**\n * Function: setGuidesEnabled\n * \n * Sets <guidesEnabled>.\n */\nmxDragSource.prototype.setGuidesEnabled = function(value)\n{\n\tthis.guidesEnabled = value;\n};\n\n/**\n * Function: isGridEnabled\n * \n * Returns <gridEnabled>.\n */\nmxDragSource.prototype.isGridEnabled = function()\n{\n\treturn this.gridEnabled;\n};\n\n/**\n * Function: setGridEnabled\n * \n * Sets <gridEnabled>.\n */\nmxDragSource.prototype.setGridEnabled = function(value)\n{\n\tthis.gridEnabled = value;\n};\n\n/**\n * Function: getGraphForEvent\n * \n * Returns the graph for the given mouse event. This implementation returns\n * null.\n */\nmxDragSource.prototype.getGraphForEvent = function(evt)\n{\n\treturn null;\n};\n\n/**\n * Function: getDropTarget\n * \n * Returns the drop target for the given graph and coordinates. This\n * implementation uses <mxGraph.getCellAt>.\n */\nmxDragSource.prototype.getDropTarget = function(graph, x, y, evt)\n{\n\treturn graph.getCellAt(x, y);\n};\n\n/**\n * Function: createDragElement\n * \n * Creates and returns a clone of the <dragElementPrototype> or the <element>\n * if the former is not defined.\n */\nmxDragSource.prototype.createDragElement = function(evt)\n{\n\treturn this.element.cloneNode(true);\n};\n\n/**\n * Function: createPreviewElement\n * \n * Creates and returns an element which can be used as a preview in the given\n * graph.\n */\nmxDragSource.prototype.createPreviewElement = function(graph)\n{\n\treturn null;\n};\n\n/**\n * Function: isActive\n * \n * Returns true if this drag source is active.\n */\nmxDragSource.prototype.isActive = function()\n{\n\treturn this.mouseMoveHandler != null;\n};\n\n/**\n * Function: reset\n * \n * Stops and removes everything and restores the state of the object.\n */\nmxDragSource.prototype.reset = function()\n{\n\tif (this.currentGraph != null)\n\t{\n\t\tthis.dragExit(this.currentGraph);\n\t\tthis.currentGraph = null;\n\t}\n\t\n\tthis.removeDragElement();\n\tthis.removeListeners();\n\tthis.stopDrag();\n};\n\n/**\n * Function: mouseDown\n * \n * Returns the drop target for the given graph and coordinates. This\n * implementation uses <mxGraph.getCellAt>.\n * \n * To ignore popup menu events for a drag source, this function can be\n * overridden as follows.\n * \n * (code)\n * var mouseDown = dragSource.mouseDown;\n * \n * dragSource.mouseDown = function(evt)\n * {\n *   if (!mxEvent.isPopupTrigger(evt))\n *   {\n *     mouseDown.apply(this, arguments);\n *   }\n * };\n * (end)\n */\nmxDragSource.prototype.mouseDown = function(evt)\n{\n\tif (this.enabled && !mxEvent.isConsumed(evt) && this.mouseMoveHandler == null)\n\t{\n\t\tthis.startDrag(evt);\n\t\tthis.mouseMoveHandler = mxUtils.bind(this, this.mouseMove);\n\t\tthis.mouseUpHandler = mxUtils.bind(this, this.mouseUp);\t\t\n\t\tmxEvent.addGestureListeners(document, null, this.mouseMoveHandler, this.mouseUpHandler);\n\t\t\n\t\tif (mxClient.IS_TOUCH && !mxEvent.isMouseEvent(evt))\n\t\t{\n\t\t\tthis.eventSource = mxEvent.getSource(evt);\n\t\t\tmxEvent.addGestureListeners(this.eventSource, null, this.mouseMoveHandler, this.mouseUpHandler);\n\t\t}\n\t}\n};\n\n/**\n * Function: startDrag\n * \n * Creates the <dragElement> using <createDragElement>.\n */\nmxDragSource.prototype.startDrag = function(evt)\n{\n\tthis.dragElement = this.createDragElement(evt);\n\tthis.dragElement.style.position = 'absolute';\n\tthis.dragElement.style.zIndex = this.dragElementZIndex;\n\tmxUtils.setOpacity(this.dragElement, this.dragElementOpacity);\n\n\tif (this.checkEventSource && mxClient.IS_SVG)\n\t{\n\t\tthis.dragElement.style.pointerEvents = 'none';\n\t}\n};\n\n/**\n * Function: stopDrag\n * \n * Invokes <removeDragElement>.\n */\nmxDragSource.prototype.stopDrag = function()\n{\n\t// LATER: This used to have a mouse event. If that is still needed we need to add another\n\t// final call to the DnD protocol to add a cleanup step in the case of escape press, which\n\t// is not associated with a mouse event and which currently calles this method.\n\tthis.removeDragElement();\n};\n\n/**\n * Function: removeDragElement\n * \n * Removes and destroys the <dragElement>.\n */\nmxDragSource.prototype.removeDragElement = function()\n{\n\tif (this.dragElement != null)\n\t{\n\t\tif (this.dragElement.parentNode != null)\n\t\t{\n\t\t\tthis.dragElement.parentNode.removeChild(this.dragElement);\n\t\t}\n\t\t\n\t\tthis.dragElement = null;\n\t}\n};\n\n/**\n * Function: getElementForEvent\n * \n * Returns the topmost element under the given event.\n */\nmxDragSource.prototype.getElementForEvent = function(evt)\n{\n\treturn ((mxEvent.isTouchEvent(evt) || mxEvent.isPenEvent(evt)) ?\n\t\t\tdocument.elementFromPoint(mxEvent.getClientX(evt), mxEvent.getClientY(evt)) :\n\t\t\t\tmxEvent.getSource(evt));\n};\n\n/**\n * Function: graphContainsEvent\n * \n * Returns true if the given graph contains the given event.\n */\nmxDragSource.prototype.graphContainsEvent = function(graph, evt)\n{\n\tvar x = mxEvent.getClientX(evt);\n\tvar y = mxEvent.getClientY(evt);\n\tvar offset = mxUtils.getOffset(graph.container);\n\tvar origin = mxUtils.getScrollOrigin();\n\tvar elt = this.getElementForEvent(evt);\n\t\n\tif (this.checkEventSource)\n\t{\n\t\twhile (elt != null && elt != graph.container)\n\t\t{\n\t\t\telt = elt.parentNode;\n\t\t}\n\t}\n\n\t// Checks if event is inside the bounds of the graph container\n\treturn elt != null && x >= offset.x - origin.x && y >= offset.y - origin.y &&\n\t\tx <= offset.x - origin.x + graph.container.offsetWidth &&\n\t\ty <= offset.y - origin.y + graph.container.offsetHeight;\n};\n\n/**\n * Function: mouseMove\n * \n * Gets the graph for the given event using <getGraphForEvent>, updates the\n * <currentGraph>, calling <dragEnter> and <dragExit> on the new and old graph,\n * respectively, and invokes <dragOver> if <currentGraph> is not null.\n */\nmxDragSource.prototype.mouseMove = function(evt)\n{\n\tvar graph = this.getGraphForEvent(evt);\n\t\n\t// Checks if event is inside the bounds of the graph container\n\tif (graph != null && !this.graphContainsEvent(graph, evt))\n\t{\n\t\tgraph = null;\n\t}\n\n\tif (graph != this.currentGraph)\n\t{\n\t\tif (this.currentGraph != null)\n\t\t{\n\t\t\tthis.dragExit(this.currentGraph, evt);\n\t\t}\n\t\t\n\t\tthis.currentGraph = graph;\n\t\t\n\t\tif (this.currentGraph != null)\n\t\t{\n\t\t\tthis.dragEnter(this.currentGraph, evt);\n\t\t}\n\t}\n\t\n\tif (this.currentGraph != null)\n\t{\n\t\tthis.dragOver(this.currentGraph, evt);\n\t}\n\n\tif (this.dragElement != null && (this.previewElement == null || this.previewElement.style.visibility != 'visible'))\n\t{\n\t\tvar x = mxEvent.getClientX(evt);\n\t\tvar y = mxEvent.getClientY(evt);\n\t\t\n\t\tif (this.dragElement.parentNode == null)\n\t\t{\n\t\t\tdocument.body.appendChild(this.dragElement);\n\t\t}\n\n\t\tthis.dragElement.style.visibility = 'visible';\n\t\t\n\t\tif (this.dragOffset != null)\n\t\t{\n\t\t\tx += this.dragOffset.x;\n\t\t\ty += this.dragOffset.y;\n\t\t}\n\t\t\n\t\tvar offset = mxUtils.getDocumentScrollOrigin(document);\n\t\t\n\t\tthis.dragElement.style.left = (x + offset.x) + 'px';\n\t\tthis.dragElement.style.top = (y + offset.y) + 'px';\n\t}\n\telse if (this.dragElement != null)\n\t{\n\t\tthis.dragElement.style.visibility = 'hidden';\n\t}\n\t\n\tmxEvent.consume(evt);\n};\n\n/**\n * Function: mouseUp\n * \n * Processes the mouse up event and invokes <drop>, <dragExit> and <stopDrag>\n * as required.\n */\nmxDragSource.prototype.mouseUp = function(evt)\n{\n\tif (this.currentGraph != null)\n\t{\n\t\tif (this.currentPoint != null && (this.previewElement == null ||\n\t\t\tthis.previewElement.style.visibility != 'hidden'))\n\t\t{\n\t\t\tvar scale = this.currentGraph.view.scale;\n\t\t\tvar tr = this.currentGraph.view.translate;\n\t\t\tvar x = this.currentPoint.x / scale - tr.x;\n\t\t\tvar y = this.currentPoint.y / scale - tr.y;\n\t\t\t\n\t\t\tthis.drop(this.currentGraph, evt, this.currentDropTarget, x, y);\n\t\t}\n\t\t\n\t\tthis.dragExit(this.currentGraph);\n\t\tthis.currentGraph = null;\n\t}\n\n\tthis.stopDrag();\n\tthis.removeListeners();\n\t\n\tmxEvent.consume(evt);\n};\n\n/**\n * Function: removeListeners\n * \n * Actives the given graph as a drop target.\n */\nmxDragSource.prototype.removeListeners = function()\n{\n\tif (this.eventSource != null)\n\t{\n\t\tmxEvent.removeGestureListeners(this.eventSource, null, this.mouseMoveHandler, this.mouseUpHandler);\n\t\tthis.eventSource = null;\n\t}\n\t\n\tmxEvent.removeGestureListeners(document, null, this.mouseMoveHandler, this.mouseUpHandler);\n\tthis.mouseMoveHandler = null;\n\tthis.mouseUpHandler = null;\n};\n\n/**\n * Function: dragEnter\n * \n * Actives the given graph as a drop target.\n */\nmxDragSource.prototype.dragEnter = function(graph, evt)\n{\n\tgraph.isMouseDown = true;\n\tgraph.isMouseTrigger = mxEvent.isMouseEvent(evt);\n\tthis.previewElement = this.createPreviewElement(graph);\n\t\n\tif (this.previewElement != null && this.checkEventSource && mxClient.IS_SVG)\n\t{\n\t\tthis.previewElement.style.pointerEvents = 'none';\n\t}\n\t\n\t// Guide is only needed if preview element is used\n\tif (this.isGuidesEnabled() && this.previewElement != null)\n\t{\n\t\tthis.currentGuide = new mxGuide(graph, graph.graphHandler.getGuideStates());\n\t}\n\t\n\tif (this.highlightDropTargets)\n\t{\n\t\tthis.currentHighlight = new mxCellHighlight(graph, mxConstants.DROP_TARGET_COLOR);\n\t}\n\t\n\t// Consumes all events in the current graph before they are fired\n\tgraph.addListener(mxEvent.FIRE_MOUSE_EVENT, this.eventConsumer);\n};\n\n/**\n * Function: dragExit\n * \n * Deactivates the given graph as a drop target.\n */\nmxDragSource.prototype.dragExit = function(graph, evt)\n{\n\tthis.currentDropTarget = null;\n\tthis.currentPoint = null;\n\tgraph.isMouseDown = false;\n\t\n\t// Consumes all events in the current graph before they are fired\n\tgraph.removeListener(this.eventConsumer);\n\t\n\tif (this.previewElement != null)\n\t{\n\t\tif (this.previewElement.parentNode != null)\n\t\t{\n\t\t\tthis.previewElement.parentNode.removeChild(this.previewElement);\n\t\t}\n\t\t\n\t\tthis.previewElement = null;\n\t}\n\t\n\tif (this.currentGuide != null)\n\t{\n\t\tthis.currentGuide.destroy();\n\t\tthis.currentGuide = null;\n\t}\n\t\n\tif (this.currentHighlight != null)\n\t{\n\t\tthis.currentHighlight.destroy();\n\t\tthis.currentHighlight = null;\n\t}\n};\n\n/**\n * Function: dragOver\n * \n * Implements autoscroll, updates the <currentPoint>, highlights any drop\n * targets and updates the preview.\n */\nmxDragSource.prototype.dragOver = function(graph, evt)\n{\n\tvar offset = mxUtils.getOffset(graph.container);\n\tvar origin = mxUtils.getScrollOrigin(graph.container);\n\tvar x = mxEvent.getClientX(evt) - offset.x + origin.x - graph.panDx;\n\tvar y = mxEvent.getClientY(evt) - offset.y + origin.y - graph.panDy;\n\n\tif (graph.autoScroll && (this.autoscroll == null || this.autoscroll))\n\t{\n\t\tgraph.scrollPointToVisible(x, y, graph.autoExtend);\n\t}\n\n\t// Highlights the drop target under the mouse\n\tif (this.currentHighlight != null && graph.isDropEnabled())\n\t{\n\t\tthis.currentDropTarget = this.getDropTarget(graph, x, y, evt);\n\t\tvar state = graph.getView().getState(this.currentDropTarget);\n\t\tthis.currentHighlight.highlight(state);\n\t}\n\n\t// Updates the location of the preview\n\tif (this.previewElement != null)\n\t{\n\t\tif (this.previewElement.parentNode == null)\n\t\t{\n\t\t\tgraph.container.appendChild(this.previewElement);\n\t\t\t\n\t\t\tthis.previewElement.style.zIndex = '3';\n\t\t\tthis.previewElement.style.position = 'absolute';\n\t\t}\n\t\t\n\t\tvar gridEnabled = this.isGridEnabled() && graph.isGridEnabledEvent(evt);\n\t\tvar hideGuide = true;\n\n\t\t// Grid and guides\n\t\tif (this.currentGuide != null && this.currentGuide.isEnabledForEvent(evt))\n\t\t{\n\t\t\t// LATER: HTML preview appears smaller than SVG preview\n\t\t\tvar w = parseInt(this.previewElement.style.width);\n\t\t\tvar h = parseInt(this.previewElement.style.height);\n\t\t\tvar bounds = new mxRectangle(0, 0, w, h);\n\t\t\tvar delta = new mxPoint(x, y);\n\t\t\tdelta = this.currentGuide.move(bounds, delta, gridEnabled, true);\n\t\t\thideGuide = false;\n\t\t\tx = delta.x;\n\t\t\ty = delta.y;\n\t\t}\n\t\telse if (gridEnabled)\n\t\t{\n\t\t\tvar scale = graph.view.scale;\n\t\t\tvar tr = graph.view.translate;\n\t\t\tvar off = graph.gridSize / 2;\n\t\t\tx = (graph.snap(x / scale - tr.x - off) + tr.x) * scale;\n\t\t\ty = (graph.snap(y / scale - tr.y - off) + tr.y) * scale;\n\t\t}\n\t\t\n\t\tif (this.currentGuide != null && hideGuide)\n\t\t{\n\t\t\tthis.currentGuide.hide();\n\t\t}\n\t\t\n\t\tif (this.previewOffset != null)\n\t\t{\n\t\t\tx += this.previewOffset.x;\n\t\t\ty += this.previewOffset.y;\n\t\t}\n\n\t\tthis.previewElement.style.left = Math.round(x) + 'px';\n\t\tthis.previewElement.style.top = Math.round(y) + 'px';\n\t\tthis.previewElement.style.visibility = 'visible';\n\t}\n\t\n\tthis.currentPoint = new mxPoint(x, y);\n};\n\n/**\n * Function: drop\n * \n * Returns the drop target for the given graph and coordinates. This\n * implementation uses <mxGraph.getCellAt>.\n */\nmxDragSource.prototype.drop = function(graph, evt, dropTarget, x, y)\n{\n\tthis.dropHandler.apply(this, arguments);\n\t\n\t// Had to move this to after the insert because it will\n\t// affect the scrollbars of the window in IE to try and\n\t// make the complete container visible.\n\t// LATER: Should be made optional.\n\tif (graph.container.style.visibility != 'hidden')\n\t{\n\t\tgraph.container.focus();\n\t}\n};\n"
  },
  {
    "path": "static/cherry/drawio_demo/src/js/util/mxEffects.js",
    "content": "/**\n * Copyright (c) 2006-2015, JGraph Ltd\n * Copyright (c) 2006-2015, Gaudenz Alder\n */\nvar mxEffects =\n{\n\n\t/**\n\t * Class: mxEffects\n\t * \n\t * Provides animation effects.\n\t */\n\n\t/**\n\t * Function: animateChanges\n\t * \n\t * Asynchronous animated move operation. See also: <mxMorphing>.\n\t * \n\t * Example:\n\t * \n\t * (code)\n\t * graph.model.addListener(mxEvent.CHANGE, function(sender, evt)\n\t * {\n\t *   var changes = evt.getProperty('edit').changes;\n\t * \n\t *   if (changes.length < 10)\n\t *   {\n\t *     mxEffects.animateChanges(graph, changes);\n\t *   }\n\t * });\n\t * (end)\n\t * \n\t * Parameters:\n\t * \n\t * graph - <mxGraph> that received the changes.\n\t * changes - Array of changes to be animated.\n\t * done - Optional function argument that is invoked after the\n\t * last step of the animation.\n\t */\n\tanimateChanges: function(graph, changes, done)\n\t{\n\t\tvar maxStep = 10;\n\t\tvar step = 0;\n\n\t\tvar animate = function() \n\t\t{\n\t\t\tvar isRequired = false;\n\t\t\t\n\t\t\tfor (var i = 0; i < changes.length; i++)\n\t\t\t{\n\t\t\t\tvar change = changes[i];\n\t\t\t\t\n\t\t\t\tif (change instanceof mxGeometryChange ||\n\t\t\t\t\tchange instanceof mxTerminalChange ||\n\t\t\t\t\tchange instanceof mxValueChange ||\n\t\t\t\t\tchange instanceof mxChildChange ||\n\t\t\t\t\tchange instanceof mxStyleChange)\n\t\t\t\t{\n\t\t\t\t\tvar state = graph.getView().getState(change.cell || change.child, false);\n\t\t\t\t\t\n\t\t\t\t\tif (state != null)\n\t\t\t\t\t{\n\t\t\t\t\t\tisRequired = true;\n\t\t\t\t\t\n\t\t\t\t\t\tif (change.constructor != mxGeometryChange || graph.model.isEdge(change.cell))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tmxUtils.setOpacity(state.shape.node, 100 * step / maxStep);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tvar scale = graph.getView().scale;\t\t\t\t\t\n\n\t\t\t\t\t\t\tvar dx = (change.geometry.x - change.previous.x) * scale;\n\t\t\t\t\t\t\tvar dy = (change.geometry.y - change.previous.y) * scale;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tvar sx = (change.geometry.width - change.previous.width) * scale;\n\t\t\t\t\t\t\tvar sy = (change.geometry.height - change.previous.height) * scale;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif (step == 0)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tstate.x -= dx;\n\t\t\t\t\t\t\t\tstate.y -= dy;\n\t\t\t\t\t\t\t\tstate.width -= sx;\n\t\t\t\t\t\t\t\tstate.height -= sy;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tstate.x += dx / maxStep;\n\t\t\t\t\t\t\t\tstate.y += dy / maxStep;\n\t\t\t\t\t\t\t\tstate.width += sx / maxStep;\n\t\t\t\t\t\t\t\tstate.height += sy / maxStep;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tgraph.cellRenderer.redraw(state);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Fades all connected edges and children\n\t\t\t\t\t\t\tmxEffects.cascadeOpacity(graph, change.cell, 100 * step / maxStep);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (step < maxStep && isRequired)\n\t\t\t{\n\t\t\t\tstep++;\n\t\t\t\twindow.setTimeout(animate, delay);\n\t\t\t}\n\t\t\telse if (done != null)\n\t\t\t{\n\t\t\t\tdone();\n\t\t\t}\n\t\t};\n\t\t\n\t\tvar delay = 30;\n\t\tanimate();\n\t},\n    \n\t/**\n\t * Function: cascadeOpacity\n\t * \n\t * Sets the opacity on the given cell and its descendants.\n\t * \n\t * Parameters:\n\t * \n\t * graph - <mxGraph> that contains the cells.\n\t * cell - <mxCell> to set the opacity for.\n\t * opacity - New value for the opacity in %.\n\t */\n    cascadeOpacity: function(graph, cell, opacity)\n\t{\n\t\t// Fades all children\n\t\tvar childCount = graph.model.getChildCount(cell);\n\t\t\n\t\tfor (var i=0; i<childCount; i++)\n\t\t{\n\t\t\tvar child = graph.model.getChildAt(cell, i);\n\t\t\tvar childState = graph.getView().getState(child);\n\t\t\t\n\t\t\tif (childState != null)\n\t\t\t{\n\t\t\t\tmxUtils.setOpacity(childState.shape.node, opacity);\n\t\t\t\tmxEffects.cascadeOpacity(graph, child, opacity);\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Fades all connected edges\n\t\tvar edges = graph.model.getEdges(cell);\n\t\t\n\t\tif (edges != null)\n\t\t{\n\t\t\tfor (var i=0; i<edges.length; i++)\n\t\t\t{\n\t\t\t\tvar edgeState = graph.getView().getState(edges[i]);\n\t\t\t\t\n\t\t\t\tif (edgeState != null)\n\t\t\t\t{\n\t\t\t\t\tmxUtils.setOpacity(edgeState.shape.node, opacity);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t},\n\n\t/**\n\t * Function: fadeOut\n\t * \n\t * Asynchronous fade-out operation.\n\t */\n\tfadeOut: function(node, from, remove, step, delay, isEnabled)\n\t{\n\t\tstep = step || 40;\n\t\tdelay = delay || 30;\n\t\t\n\t\tvar opacity = from || 100;\n\t\t\n\t\tmxUtils.setOpacity(node, opacity);\n\t\t\n\t\tif (isEnabled || isEnabled == null)\n\t\t{\n\t\t\tvar f = function()\n\t\t\t{\n\t\t\t    opacity = Math.max(opacity-step, 0);\n\t\t\t\tmxUtils.setOpacity(node, opacity);\n\t\t\t\t\n\t\t\t\tif (opacity > 0)\n\t\t\t\t{\n\t\t\t\t\twindow.setTimeout(f, delay);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tnode.style.visibility = 'hidden';\n\t\t\t\t\t\n\t\t\t\t\tif (remove && node.parentNode)\n\t\t\t\t\t{\n\t\t\t\t\t\tnode.parentNode.removeChild(node);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t};\n\t\t\twindow.setTimeout(f, delay);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tnode.style.visibility = 'hidden';\n\t\t\t\n\t\t\tif (remove && node.parentNode)\n\t\t\t{\n\t\t\t\tnode.parentNode.removeChild(node);\n\t\t\t}\n\t\t}\n\t}\n\n};\n"
  },
  {
    "path": "static/cherry/drawio_demo/src/js/util/mxEvent.js",
    "content": "/**\n * Copyright (c) 2006-2015, JGraph Ltd\n * Copyright (c) 2006-2015, Gaudenz Alder\n */\nvar mxEvent =\n{\n\n\t/**\n\t * Class: mxEvent\n\t * \n\t * Cross-browser DOM event support. For internal event handling,\n\t * <mxEventSource> and the graph event dispatch loop in <mxGraph> are used.\n\t * \n\t * Memory Leaks:\n\t * \n\t * Use this class for adding and removing listeners to/from DOM nodes. The\n\t * <removeAllListeners> function is provided to remove all listeners that\n\t * have been added using <addListener>. The function should be invoked when\n\t * the last reference is removed in the JavaScript code, typically when the\n\t * referenced DOM node is removed from the DOM.\n\t *\n\t * Function: addListener\n\t * \n\t * Binds the function to the specified event on the given element. Use\n\t * <mxUtils.bind> in order to bind the \"this\" keyword inside the function\n\t * to a given execution scope.\n\t */\n\taddListener: function()\n\t{\n\t\tvar updateListenerList = function(element, eventName, funct)\n\t\t{\n\t\t\tif (element.mxListenerList == null)\n\t\t\t{\n\t\t\t\telement.mxListenerList = [];\n\t\t\t}\n\t\t\t\n\t\t\tvar entry = {name: eventName, f: funct};\n\t\t\telement.mxListenerList.push(entry);\n\t\t};\n\t\t\n\t\tif (window.addEventListener)\n\t\t{\n\t\t\treturn function(element, eventName, funct)\n\t\t\t{\n\t\t\t\telement.addEventListener(eventName, funct, false);\n\t\t\t\tupdateListenerList(element, eventName, funct);\n\t\t\t};\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn function(element, eventName, funct)\n\t\t\t{\n\t\t\t\telement.attachEvent('on' + eventName, funct);\n\t\t\t\tupdateListenerList(element, eventName, funct);\t\t\t\t\n\t\t\t};\n\t\t}\n\t}(),\n\n\t/**\n\t * Function: removeListener\n\t *\n\t * Removes the specified listener from the given element.\n\t */\n\tremoveListener: function()\n\t{\n\t\tvar updateListener = function(element, eventName, funct)\n\t\t{\n\t\t\tif (element.mxListenerList != null)\n\t\t\t{\n\t\t\t\tvar listenerCount = element.mxListenerList.length;\n\t\t\t\t\n\t\t\t\tfor (var i = 0; i < listenerCount; i++)\n\t\t\t\t{\n\t\t\t\t\tvar entry = element.mxListenerList[i];\n\t\t\t\t\t\n\t\t\t\t\tif (entry.f == funct)\n\t\t\t\t\t{\n\t\t\t\t\t\telement.mxListenerList.splice(i, 1);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (element.mxListenerList.length == 0)\n\t\t\t\t{\n\t\t\t\t\telement.mxListenerList = null;\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\t\n\t\tif (window.removeEventListener)\n\t\t{\n\t\t\treturn function(element, eventName, funct)\n\t\t\t{\n\t\t\t\telement.removeEventListener(eventName, funct, false);\n\t\t\t\tupdateListener(element, eventName, funct);\n\t\t\t};\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn function(element, eventName, funct)\n\t\t\t{\n\t\t\t\telement.detachEvent('on' + eventName, funct);\n\t\t\t\tupdateListener(element, eventName, funct);\n\t\t\t};\n\t\t}\n\t}(),\n\n\t/**\n\t * Function: removeAllListeners\n\t * \n\t * Removes all listeners from the given element.\n\t */\n\tremoveAllListeners: function(element)\n\t{\n\t\tvar list = element.mxListenerList;\n\n\t\tif (list != null)\n\t\t{\n\t\t\twhile (list.length > 0)\n\t\t\t{\n\t\t\t\tvar entry = list[0];\n\t\t\t\tmxEvent.removeListener(element, entry.name, entry.f);\n\t\t\t}\n\t\t}\n\t},\n\t\n\t/**\n\t * Function: addGestureListeners\n\t * \n\t * Adds the given listeners for touch, mouse and/or pointer events. If\n\t * <mxClient.IS_POINTER> is true then pointer events will be registered,\n\t * else the respective mouse events will be registered. If <mxClient.IS_POINTER>\n\t * is false and <mxClient.IS_TOUCH> is true then the respective touch events\n\t * will be registered as well as the mouse events.\n\t */\n\taddGestureListeners: function(node, startListener, moveListener, endListener)\n\t{\n\t\tif (startListener != null)\n\t\t{\n\t\t\tmxEvent.addListener(node, (mxClient.IS_POINTER) ? 'pointerdown' : 'mousedown', startListener);\n\t\t}\n\t\t\n\t\tif (moveListener != null)\n\t\t{\n\t\t\tmxEvent.addListener(node, (mxClient.IS_POINTER) ? 'pointermove' : 'mousemove', moveListener);\n\t\t}\n\t\t\n\t\tif (endListener != null)\n\t\t{\n\t\t\tmxEvent.addListener(node, (mxClient.IS_POINTER) ? 'pointerup' : 'mouseup', endListener);\n\t\t}\n\t\t\n\t\tif (!mxClient.IS_POINTER && mxClient.IS_TOUCH)\n\t\t{\n\t\t\tif (startListener != null)\n\t\t\t{\n\t\t\t\tmxEvent.addListener(node, 'touchstart', startListener);\n\t\t\t}\n\t\t\t\n\t\t\tif (moveListener != null)\n\t\t\t{\n\t\t\t\tmxEvent.addListener(node, 'touchmove', moveListener);\n\t\t\t}\n\t\t\t\n\t\t\tif (endListener != null)\n\t\t\t{\n\t\t\t\tmxEvent.addListener(node, 'touchend', endListener);\n\t\t\t}\n\t\t}\n\t},\n\t\n\t/**\n\t * Function: removeGestureListeners\n\t * \n\t * Removes the given listeners from mousedown, mousemove, mouseup and the\n\t * respective touch events if <mxClient.IS_TOUCH> is true.\n\t */\n\tremoveGestureListeners: function(node, startListener, moveListener, endListener)\n\t{\n\t\tif (startListener != null)\n\t\t{\n\t\t\tmxEvent.removeListener(node, (mxClient.IS_POINTER) ? 'pointerdown' : 'mousedown', startListener);\n\t\t}\n\t\t\n\t\tif (moveListener != null)\n\t\t{\n\t\t\tmxEvent.removeListener(node, (mxClient.IS_POINTER) ? 'pointermove' : 'mousemove', moveListener);\n\t\t}\n\t\t\n\t\tif (endListener != null)\n\t\t{\n\t\t\tmxEvent.removeListener(node, (mxClient.IS_POINTER) ? 'pointerup' : 'mouseup', endListener);\n\t\t}\n\t\t\n\t\tif (!mxClient.IS_POINTER && mxClient.IS_TOUCH)\n\t\t{\n\t\t\tif (startListener != null)\n\t\t\t{\n\t\t\t\tmxEvent.removeListener(node, 'touchstart', startListener);\n\t\t\t}\n\t\t\t\n\t\t\tif (moveListener != null)\n\t\t\t{\n\t\t\t\tmxEvent.removeListener(node, 'touchmove', moveListener);\n\t\t\t}\n\t\t\t\n\t\t\tif (endListener != null)\n\t\t\t{\n\t\t\t\tmxEvent.removeListener(node, 'touchend', endListener);\n\t\t\t}\n\t\t}\n\t},\n\t\n\t/**\n\t * Function: redirectMouseEvents\n\t *\n\t * Redirects the mouse events from the given DOM node to the graph dispatch\n\t * loop using the event and given state as event arguments. State can\n\t * either be an instance of <mxCellState> or a function that returns an\n\t * <mxCellState>. The down, move, up and dblClick arguments are optional\n\t * functions that take the trigger event as arguments and replace the\n\t * default behaviour.\n\t */\n\tredirectMouseEvents: function(node, graph, state, down, move, up, dblClick)\n\t{\n\t\tvar getState = function(evt)\n\t\t{\n\t\t\treturn (typeof(state) == 'function') ? state(evt) : state;\n\t\t};\n\t\t\n\t\tmxEvent.addGestureListeners(node, function (evt)\n\t\t{\n\t\t\tif (down != null)\n\t\t\t{\n\t\t\t\tdown(evt);\n\t\t\t}\n\t\t\telse if (!mxEvent.isConsumed(evt))\n\t\t\t{\n\t\t\t\tgraph.fireMouseEvent(mxEvent.MOUSE_DOWN, new mxMouseEvent(evt, getState(evt)));\n\t\t\t}\n\t\t},\n\t\tfunction (evt)\n\t\t{\n\t\t\tif (move != null)\n\t\t\t{\n\t\t\t\tmove(evt);\n\t\t\t}\n\t\t\telse if (!mxEvent.isConsumed(evt))\n\t\t\t{\n\t\t\t\tgraph.fireMouseEvent(mxEvent.MOUSE_MOVE, new mxMouseEvent(evt, getState(evt)));\n\t\t\t}\n\t\t},\n\t\tfunction (evt)\n\t\t{\n\t\t\tif (up != null)\n\t\t\t{\n\t\t\t\tup(evt);\n\t\t\t}\n\t\t\telse if (!mxEvent.isConsumed(evt))\n\t\t\t{\n\t\t\t\tgraph.fireMouseEvent(mxEvent.MOUSE_UP, new mxMouseEvent(evt, getState(evt)));\n\t\t\t}\n\t\t});\n\n\t\tmxEvent.addListener(node, 'dblclick', function (evt)\n\t\t{\n\t\t\tif (dblClick != null)\n\t\t\t{\n\t\t\t\tdblClick(evt);\n\t\t\t}\n\t\t\telse if (!mxEvent.isConsumed(evt))\n\t\t\t{\n\t\t\t\tvar tmp = getState(evt);\n\t\t\t\tgraph.dblClick(evt, (tmp != null) ? tmp.cell : null);\n\t\t\t}\n\t\t});\n\t},\n\n\t/**\n\t * Function: release\n\t * \n\t * Removes the known listeners from the given DOM node and its descendants.\n\t * \n\t * Parameters:\n\t * \n\t * element - DOM node to remove the listeners from.\n\t */\n\trelease: function(element)\n\t{\n\t\ttry\n\t\t{\n\t\t\tif (element != null)\n\t\t\t{\n\t\t\t\tmxEvent.removeAllListeners(element);\n\t\t\t\t\n\t\t\t\tvar children = element.childNodes;\n\t\t\t\t\n\t\t\t\tif (children != null)\n\t\t\t\t{\n\t\t\t        var childCount = children.length;\n\t\t\t        \n\t\t\t        for (var i = 0; i < childCount; i += 1)\n\t\t\t        {\n\t\t\t        \tmxEvent.release(children[i]);\n\t\t\t        }\n\t\t\t    }\n\t\t\t}\n\t\t}\n\t\tcatch (e)\n\t\t{\n\t\t\t// ignores errors as this is typically called in cleanup code\n\t\t}\n\t},\n\n\t/**\n\t * Function: addMouseWheelListener\n\t * \n\t * Installs the given function as a handler for mouse wheel events. The\n\t * function has two arguments: the mouse event and a boolean that specifies\n\t * if the wheel was moved up or down.\n\t * \n\t * This has been tested with IE 6 and 7, Firefox (all versions), Opera and\n\t * Safari. It does currently not work on Safari for Mac.\n\t * \n\t * Example:\n\t * \n\t * (code)\n\t * mxEvent.addMouseWheelListener(function (evt, up)\n\t * {\n\t *   mxLog.show();\n\t *   mxLog.debug('mouseWheel: up='+up);\n\t * });\n\t *(end)\n\t * \n\t * Parameters:\n\t * \n\t * funct - Handler function that takes the event argument and a boolean up\n\t * argument for the mousewheel direction.\n\t */\n\taddMouseWheelListener: function(funct)\n\t{\n\t\tif (funct != null)\n\t\t{\n\t\t\tvar wheelHandler = function(evt)\n\t\t\t{\n\t\t\t\t// IE does not give an event object but the\n\t\t\t\t// global event object is the mousewheel event\n\t\t\t\t// at this point in time.\n\t\t\t\tif (evt == null)\n\t\t\t\t{\n\t\t\t\t\tevt = window.event;\n\t\t\t\t}\n\t\t\t\n\t\t\t\tvar delta = 0;\n\t\t\t\t\n\t\t\t\tif (mxClient.IS_FF)\n\t\t\t\t{\n\t\t\t\t\tdelta = -evt.detail / 2;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tdelta = evt.wheelDelta / 120;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// Handles the event using the given function\n\t\t\t\tif (delta != 0)\n\t\t\t\t{\n\t\t\t\t\tfunct(evt, delta > 0);\n\t\t\t\t}\n\t\t\t};\n\t\n\t\t\t// Webkit has NS event API, but IE event name and details \n\t\t\tif (mxClient.IS_NS && document.documentMode == null)\n\t\t\t{\n\t\t\t\tvar eventName = (mxClient.IS_SF || \tmxClient.IS_GC) ? 'mousewheel' : 'DOMMouseScroll';\n\t\t\t\tmxEvent.addListener(window, eventName, wheelHandler);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tmxEvent.addListener(document, 'mousewheel', wheelHandler);\n\t\t\t}\n\t\t}\n\t},\n\t\n\t/**\n\t * Function: disableContextMenu\n\t *\n\t * Disables the context menu for the given element.\n\t */\n\tdisableContextMenu: function(element)\n\t{\n\t\tmxEvent.addListener(element, 'contextmenu', function(evt)\n\t\t{\n\t\t\tif (evt.preventDefault)\n\t\t\t{\n\t\t\t\tevt.preventDefault();\n\t\t\t}\n\t\t\t\n\t\t\treturn false;\n\t\t});\n\t},\n\t\n\t/**\n\t * Function: getSource\n\t * \n\t * Returns the event's target or srcElement depending on the browser.\n\t */\n\tgetSource: function(evt)\n\t{\n\t\treturn (evt.srcElement != null) ? evt.srcElement : evt.target;\n\t},\n\n\t/**\n\t * Function: isConsumed\n\t * \n\t * Returns true if the event has been consumed using <consume>.\n\t */\n\tisConsumed: function(evt)\n\t{\n\t\treturn evt.isConsumed != null && evt.isConsumed;\n\t},\n\n\t/**\n\t * Function: isTouchEvent\n\t * \n\t * Returns true if the event was generated using a touch device (not a pen or mouse).\n\t */\n\tisTouchEvent: function(evt)\n\t{\n\t\treturn (evt.pointerType != null) ? (evt.pointerType == 'touch' || evt.pointerType ===\n\t\t\tevt.MSPOINTER_TYPE_TOUCH) : ((evt.mozInputSource != null) ?\n\t\t\t\t\tevt.mozInputSource == 5 : evt.type.indexOf('touch') == 0);\n\t},\n\n\t/**\n\t * Function: isPenEvent\n\t * \n\t * Returns true if the event was generated using a pen (not a touch device or mouse).\n\t */\n\tisPenEvent: function(evt)\n\t{\n\t\treturn (evt.pointerType != null) ? (evt.pointerType == 'pen' || evt.pointerType ===\n\t\t\tevt.MSPOINTER_TYPE_PEN) : ((evt.mozInputSource != null) ?\n\t\t\t\t\tevt.mozInputSource == 2 : evt.type.indexOf('pen') == 0);\n\t},\n\n\t/**\n\t * Function: isMultiTouchEvent\n\t * \n\t * Returns true if the event was generated using a touch device (not a pen or mouse).\n\t */\n\tisMultiTouchEvent: function(evt)\n\t{\n\t\treturn (evt.type != null && evt.type.indexOf('touch') == 0 && evt.touches != null && evt.touches.length > 1);\n\t},\n\n\t/**\n\t * Function: isMouseEvent\n\t * \n\t * Returns true if the event was generated using a mouse (not a pen or touch device).\n\t */\n\tisMouseEvent: function(evt)\n\t{\n\t\treturn (evt.pointerType != null) ? (evt.pointerType == 'mouse' || evt.pointerType ===\n\t\t\tevt.MSPOINTER_TYPE_MOUSE) : ((evt.mozInputSource != null) ?\n\t\t\t\tevt.mozInputSource == 1 : evt.type.indexOf('mouse') == 0);\n\t},\n\t\n\t/**\n\t * Function: isLeftMouseButton\n\t * \n\t * Returns true if the left mouse button is pressed for the given event.\n\t * To check if a button is pressed during a mouseMove you should use the\n\t * <mxGraph.isMouseDown> property. Note that this returns true in Firefox\n\t * for control+left-click on the Mac.\n\t */\n\tisLeftMouseButton: function(evt)\n\t{\n\t\t// Special case for mousemove and mousedown we check the buttons\n\t\t// if it exists because which is 0 even if no button is pressed\n\t\tif ('buttons' in evt && (evt.type == 'mousedown' || evt.type == 'mousemove'))\n\t\t{\n\t\t\treturn evt.buttons == 1;\n\t\t}\n\t\telse if ('which' in evt)\n\t\t{\n\t        return evt.which === 1;\n\t    }\n\t\telse\n\t\t{\n\t        return evt.button === 1;\n\t    }\n\t},\n\t\n\t/**\n\t * Function: isMiddleMouseButton\n\t * \n\t * Returns true if the middle mouse button is pressed for the given event.\n\t * To check if a button is pressed during a mouseMove you should use the\n\t * <mxGraph.isMouseDown> property.\n\t */\n\tisMiddleMouseButton: function(evt)\n\t{\n\t\tif ('which' in evt)\n\t\t{\n\t        return evt.which === 2;\n\t    }\n\t\telse\n\t\t{\n\t        return evt.button === 4;\n\t    }\n\t},\n\t\n\t/**\n\t * Function: isRightMouseButton\n\t * \n\t * Returns true if the right mouse button was pressed. Note that this\n\t * button might not be available on some systems. For handling a popup\n\t * trigger <isPopupTrigger> should be used.\n\t */\n\tisRightMouseButton: function(evt)\n\t{\n\t\tif ('which' in evt)\n\t\t{\n\t        return evt.which === 3;\n\t    }\n\t\telse\n\t\t{\n\t        return evt.button === 2;\n\t    }\n\t},\n\n\t/**\n\t * Function: isPopupTrigger\n\t * \n\t * Returns true if the event is a popup trigger. This implementation\n\t * returns true if the right button or the left button and control was\n\t * pressed on a Mac.\n\t */\n\tisPopupTrigger: function(evt)\n\t{\n\t\treturn mxEvent.isRightMouseButton(evt) || (mxClient.IS_MAC && mxEvent.isControlDown(evt) &&\n\t\t\t!mxEvent.isShiftDown(evt) && !mxEvent.isMetaDown(evt) && !mxEvent.isAltDown(evt));\n\t},\n\n\t/**\n\t * Function: isShiftDown\n\t * \n\t * Returns true if the shift key is pressed for the given event.\n\t */\n\tisShiftDown: function(evt)\n\t{\n\t\treturn (evt != null) ? evt.shiftKey : false;\n\t},\n\n\t/**\n\t * Function: isAltDown\n\t * \n\t * Returns true if the alt key is pressed for the given event.\n\t */\n\tisAltDown: function(evt)\n\t{\n\t\treturn (evt != null) ? evt.altKey : false;\n\t},\n\n\t/**\n\t * Function: isControlDown\n\t * \n\t * Returns true if the control key is pressed for the given event.\n\t */\n\tisControlDown: function(evt)\n\t{\n\t\treturn (evt != null) ? evt.ctrlKey : false;\n\t},\n\n\t/**\n\t * Function: isMetaDown\n\t * \n\t * Returns true if the meta key is pressed for the given event.\n\t */\n\tisMetaDown: function(evt)\n\t{\n\t\treturn (evt != null) ? evt.metaKey : false;\n\t},\n\n\t/**\n\t * Function: getMainEvent\n\t * \n\t * Returns the touch or mouse event that contains the mouse coordinates.\n\t */\n\tgetMainEvent: function(e)\n\t{\n\t\tif ((e.type == 'touchstart' || e.type == 'touchmove') && e.touches != null && e.touches[0] != null)\n\t\t{\n\t\t\te = e.touches[0];\n\t\t}\n\t\telse if (e.type == 'touchend' && e.changedTouches != null && e.changedTouches[0] != null)\n\t\t{\n\t\t\te = e.changedTouches[0];\n\t\t}\n\t\t\n\t\treturn e;\n\t},\n\t\n\t/**\n\t * Function: getClientX\n\t * \n\t * Returns true if the meta key is pressed for the given event.\n\t */\n\tgetClientX: function(e)\n\t{\n\t\treturn mxEvent.getMainEvent(e).clientX;\n\t},\n\n\t/**\n\t * Function: getClientY\n\t * \n\t * Returns true if the meta key is pressed for the given event.\n\t */\n\tgetClientY: function(e)\n\t{\n\t\treturn mxEvent.getMainEvent(e).clientY;\n\t},\n\n\t/**\n\t * Function: consume\n\t * \n\t * Consumes the given event.\n\t * \n\t * Parameters:\n\t * \n\t * evt - Native event to be consumed.\n\t * preventDefault - Optional boolean to prevent the default for the event.\n\t * Default is true.\n\t * stopPropagation - Option boolean to stop event propagation. Default is\n\t * true.\n\t */\n\tconsume: function(evt, preventDefault, stopPropagation)\n\t{\n\t\tpreventDefault = (preventDefault != null) ? preventDefault : true;\n\t\tstopPropagation = (stopPropagation != null) ? stopPropagation : true;\n\t\t\n\t\tif (preventDefault)\n\t\t{\n\t\t\tif (evt.preventDefault)\n\t\t\t{\n\t\t\t\tif (stopPropagation)\n\t\t\t\t{\n\t\t\t\t\tevt.stopPropagation();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tevt.preventDefault();\n\t\t\t}\n\t\t\telse if (stopPropagation)\n\t\t\t{\n\t\t\t\tevt.cancelBubble = true;\n\t\t\t}\n\t\t}\n\n\t\t// Opera\n\t\tevt.isConsumed = true;\n\n\t\t// Other browsers\n\t\tif (!evt.preventDefault)\n\t\t{\n\t\t\tevt.returnValue = false;\n\t\t}\n\t},\n\t\n\t//\n\t// Special handles in mouse events\n\t//\n\t\n\t/**\n\t * Variable: LABEL_HANDLE\n\t * \n\t * Index for the label handle in an mxMouseEvent. This should be a negative\n\t * value that does not interfere with any possible handle indices. Default\n\t * is -1.\n\t */\n\tLABEL_HANDLE: -1,\n\t\n\t/**\n\t * Variable: ROTATION_HANDLE\n\t * \n\t * Index for the rotation handle in an mxMouseEvent. This should be a\n\t * negative value that does not interfere with any possible handle indices.\n\t * Default is -2.\n\t */\n\tROTATION_HANDLE: -2,\n\t\n\t/**\n\t * Variable: CUSTOM_HANDLE\n\t * \n\t * Start index for the custom handles in an mxMouseEvent. This should be a\n\t * negative value and is the start index which is decremented for each\n\t * custom handle. Default is -100.\n\t */\n\tCUSTOM_HANDLE: -100,\n\t\n\t/**\n\t * Variable: VIRTUAL_HANDLE\n\t * \n\t * Start index for the virtual handles in an mxMouseEvent. This should be a\n\t * negative value and is the start index which is decremented for each\n\t * virtual handle. Default is -100000. This assumes that there are no more\n\t * than VIRTUAL_HANDLE - CUSTOM_HANDLE custom handles.\n\t * \n\t */\n\tVIRTUAL_HANDLE: -100000,\n\t\n\t//\n\t// Event names\n\t//\n\t\n\t/**\n\t * Variable: MOUSE_DOWN\n\t *\n\t * Specifies the event name for mouseDown.\n\t */\n\tMOUSE_DOWN: 'mouseDown',\n\t\n\t/**\n\t * Variable: MOUSE_MOVE\n\t *\n\t * Specifies the event name for mouseMove. \n\t */\n\tMOUSE_MOVE: 'mouseMove',\n\t\n\t/**\n\t * Variable: MOUSE_UP\n\t *\n\t * Specifies the event name for mouseUp. \n\t */\n\tMOUSE_UP: 'mouseUp',\n\n\t/**\n\t * Variable: ACTIVATE\n\t *\n\t * Specifies the event name for activate.\n\t */\n\tACTIVATE: 'activate',\n\n\t/**\n\t * Variable: RESIZE_START\n\t *\n\t * Specifies the event name for resizeStart.\n\t */\n\tRESIZE_START: 'resizeStart',\n\n\t/**\n\t * Variable: RESIZE\n\t *\n\t * Specifies the event name for resize.\n\t */\n\tRESIZE: 'resize',\n\n\t/**\n\t * Variable: RESIZE_END\n\t *\n\t * Specifies the event name for resizeEnd.\n\t */\n\tRESIZE_END: 'resizeEnd',\n\n\t/**\n\t * Variable: MOVE_START\n\t *\n\t * Specifies the event name for moveStart.\n\t */\n\tMOVE_START: 'moveStart',\n\n\t/**\n\t * Variable: MOVE\n\t *\n\t * Specifies the event name for move.\n\t */\n\tMOVE: 'move',\n\n\t/**\n\t * Variable: MOVE_END\n\t *\n\t * Specifies the event name for moveEnd.\n\t */\n\tMOVE_END: 'moveEnd',\n\n\t/**\n\t * Variable: PAN_START\n\t *\n\t * Specifies the event name for panStart.\n\t */\n\tPAN_START: 'panStart',\n\n\t/**\n\t * Variable: PAN\n\t *\n\t * Specifies the event name for pan.\n\t */\n\tPAN: 'pan',\n\n\t/**\n\t * Variable: PAN_END\n\t *\n\t * Specifies the event name for panEnd.\n\t */\n\tPAN_END: 'panEnd',\n\n\t/**\n\t * Variable: MINIMIZE\n\t *\n\t * Specifies the event name for minimize.\n\t */\n\tMINIMIZE: 'minimize',\n\n\t/**\n\t * Variable: NORMALIZE\n\t *\n\t * Specifies the event name for normalize.\n\t */\n\tNORMALIZE: 'normalize',\n\n\t/**\n\t * Variable: MAXIMIZE\n\t *\n\t * Specifies the event name for maximize.\n\t */\n\tMAXIMIZE: 'maximize',\n\n\t/**\n\t * Variable: HIDE\n\t *\n\t * Specifies the event name for hide.\n\t */\n\tHIDE: 'hide',\n\n\t/**\n\t * Variable: SHOW\n\t *\n\t * Specifies the event name for show.\n\t */\n\tSHOW: 'show',\n\n\t/**\n\t * Variable: CLOSE\n\t *\n\t * Specifies the event name for close.\n\t */\n\tCLOSE: 'close',\n\n\t/**\n\t * Variable: DESTROY\n\t *\n\t * Specifies the event name for destroy.\n\t */\n\tDESTROY: 'destroy',\n\n\t/**\n\t * Variable: REFRESH\n\t *\n\t * Specifies the event name for refresh.\n\t */\n\tREFRESH: 'refresh',\n\n\t/**\n\t * Variable: SIZE\n\t *\n\t * Specifies the event name for size.\n\t */\n\tSIZE: 'size',\n\t\n\t/**\n\t * Variable: SELECT\n\t *\n\t * Specifies the event name for select.\n\t */\n\tSELECT: 'select',\n\n\t/**\n\t * Variable: FIRED\n\t *\n\t * Specifies the event name for fired.\n\t */\n\tFIRED: 'fired',\n\n\t/**\n\t * Variable: FIRE_MOUSE_EVENT\n\t *\n\t * Specifies the event name for fireMouseEvent.\n\t */\n\tFIRE_MOUSE_EVENT: 'fireMouseEvent',\n\n\t/**\n\t * Variable: GESTURE\n\t *\n\t * Specifies the event name for gesture.\n\t */\n\tGESTURE: 'gesture',\n\n\t/**\n\t * Variable: TAP_AND_HOLD\n\t *\n\t * Specifies the event name for tapAndHold.\n\t */\n\tTAP_AND_HOLD: 'tapAndHold',\n\n\t/**\n\t * Variable: GET\n\t *\n\t * Specifies the event name for get.\n\t */\n\tGET: 'get',\n\n\t/**\n\t * Variable: RECEIVE\n\t *\n\t * Specifies the event name for receive.\n\t */\n\tRECEIVE: 'receive',\n\n\t/**\n\t * Variable: CONNECT\n\t *\n\t * Specifies the event name for connect.\n\t */\n\tCONNECT: 'connect',\n\n\t/**\n\t * Variable: DISCONNECT\n\t *\n\t * Specifies the event name for disconnect.\n\t */\n\tDISCONNECT: 'disconnect',\n\n\t/**\n\t * Variable: SUSPEND\n\t *\n\t * Specifies the event name for suspend.\n\t */\n\tSUSPEND: 'suspend',\n\n\t/**\n\t * Variable: RESUME\n\t *\n\t * Specifies the event name for suspend.\n\t */\n\tRESUME: 'resume',\n\n\t/**\n\t * Variable: MARK\n\t *\n\t * Specifies the event name for mark.\n\t */\n\tMARK: 'mark',\n\n\t/**\n\t * Variable: ROOT\n\t *\n\t * Specifies the event name for root.\n\t */\n\tROOT: 'root',\n\n\t/**\n\t * Variable: POST\n\t *\n\t * Specifies the event name for post.\n\t */\n\tPOST: 'post',\n\n\t/**\n\t * Variable: OPEN\n\t *\n\t * Specifies the event name for open.\n\t */\n\tOPEN: 'open',\n\n\t/**\n\t * Variable: SAVE\n\t *\n\t * Specifies the event name for open.\n\t */\n\tSAVE: 'save',\n\n\t/**\n\t * Variable: BEFORE_ADD_VERTEX\n\t *\n\t * Specifies the event name for beforeAddVertex.\n\t */\n\tBEFORE_ADD_VERTEX: 'beforeAddVertex',\n\n\t/**\n\t * Variable: ADD_VERTEX\n\t *\n\t * Specifies the event name for addVertex.\n\t */\n\tADD_VERTEX: 'addVertex',\n\n\t/**\n\t * Variable: AFTER_ADD_VERTEX\n\t *\n\t * Specifies the event name for afterAddVertex.\n\t */\n\tAFTER_ADD_VERTEX: 'afterAddVertex',\n\n\t/**\n\t * Variable: DONE\n\t *\n\t * Specifies the event name for done.\n\t */\n\tDONE: 'done',\n\n\t/**\n\t * Variable: EXECUTE\n\t *\n\t * Specifies the event name for execute.\n\t */\n\tEXECUTE: 'execute',\n\n\t/**\n\t * Variable: EXECUTED\n\t *\n\t * Specifies the event name for executed.\n\t */\n\tEXECUTED: 'executed',\n\n\t/**\n\t * Variable: BEGIN_UPDATE\n\t *\n\t * Specifies the event name for beginUpdate.\n\t */\n\tBEGIN_UPDATE: 'beginUpdate',\n\n\t/**\n\t * Variable: START_EDIT\n\t *\n\t * Specifies the event name for startEdit.\n\t */\n\tSTART_EDIT: 'startEdit',\n\n\t/**\n\t * Variable: END_UPDATE\n\t *\n\t * Specifies the event name for endUpdate.\n\t */\n\tEND_UPDATE: 'endUpdate',\n\n\t/**\n\t * Variable: END_EDIT\n\t *\n\t * Specifies the event name for endEdit.\n\t */\n\tEND_EDIT: 'endEdit',\n\n\t/**\n\t * Variable: BEFORE_UNDO\n\t *\n\t * Specifies the event name for beforeUndo.\n\t */\n\tBEFORE_UNDO: 'beforeUndo',\n\n\t/**\n\t * Variable: UNDO\n\t *\n\t * Specifies the event name for undo.\n\t */\n\tUNDO: 'undo',\n\n\t/**\n\t * Variable: REDO\n\t *\n\t * Specifies the event name for redo.\n\t */\n\tREDO: 'redo',\n\n\t/**\n\t * Variable: CHANGE\n\t *\n\t * Specifies the event name for change.\n\t */\n\tCHANGE: 'change',\n\n\t/**\n\t * Variable: NOTIFY\n\t *\n\t * Specifies the event name for notify.\n\t */\n\tNOTIFY: 'notify',\n\n\t/**\n\t * Variable: LAYOUT_CELLS\n\t *\n\t * Specifies the event name for layoutCells.\n\t */\n\tLAYOUT_CELLS: 'layoutCells',\n\n\t/**\n\t * Variable: CLICK\n\t *\n\t * Specifies the event name for click.\n\t */\n\tCLICK: 'click',\n\n\t/**\n\t * Variable: SCALE\n\t *\n\t * Specifies the event name for scale.\n\t */\n\tSCALE: 'scale',\n\n\t/**\n\t * Variable: TRANSLATE\n\t *\n\t * Specifies the event name for translate.\n\t */\n\tTRANSLATE: 'translate',\n\n\t/**\n\t * Variable: SCALE_AND_TRANSLATE\n\t *\n\t * Specifies the event name for scaleAndTranslate.\n\t */\n\tSCALE_AND_TRANSLATE: 'scaleAndTranslate',\n\n\t/**\n\t * Variable: UP\n\t *\n\t * Specifies the event name for up.\n\t */\n\tUP: 'up',\n\n\t/**\n\t * Variable: DOWN\n\t *\n\t * Specifies the event name for down.\n\t */\n\tDOWN: 'down',\n\n\t/**\n\t * Variable: ADD\n\t *\n\t * Specifies the event name for add.\n\t */\n\tADD: 'add',\n\n\t/**\n\t * Variable: REMOVE\n\t *\n\t * Specifies the event name for remove.\n\t */\n\tREMOVE: 'remove',\n\t\n\t/**\n\t * Variable: CLEAR\n\t *\n\t * Specifies the event name for clear.\n\t */\n\tCLEAR: 'clear',\n\n\t/**\n\t * Variable: ADD_CELLS\n\t *\n\t * Specifies the event name for addCells.\n\t */\n\tADD_CELLS: 'addCells',\n\n\t/**\n\t * Variable: CELLS_ADDED\n\t *\n\t * Specifies the event name for cellsAdded.\n\t */\n\tCELLS_ADDED: 'cellsAdded',\n\n\t/**\n\t * Variable: MOVE_CELLS\n\t *\n\t * Specifies the event name for moveCells.\n\t */\n\tMOVE_CELLS: 'moveCells',\n\n\t/**\n\t * Variable: CELLS_MOVED\n\t *\n\t * Specifies the event name for cellsMoved.\n\t */\n\tCELLS_MOVED: 'cellsMoved',\n\n\t/**\n\t * Variable: RESIZE_CELLS\n\t *\n\t * Specifies the event name for resizeCells.\n\t */\n\tRESIZE_CELLS: 'resizeCells',\n\n\t/**\n\t * Variable: CELLS_RESIZED\n\t *\n\t * Specifies the event name for cellsResized.\n\t */\n\tCELLS_RESIZED: 'cellsResized',\n\n\t/**\n\t * Variable: TOGGLE_CELLS\n\t *\n\t * Specifies the event name for toggleCells.\n\t */\n\tTOGGLE_CELLS: 'toggleCells',\n\n\t/**\n\t * Variable: CELLS_TOGGLED\n\t *\n\t * Specifies the event name for cellsToggled.\n\t */\n\tCELLS_TOGGLED: 'cellsToggled',\n\n\t/**\n\t * Variable: ORDER_CELLS\n\t *\n\t * Specifies the event name for orderCells.\n\t */\n\tORDER_CELLS: 'orderCells',\n\n\t/**\n\t * Variable: CELLS_ORDERED\n\t *\n\t * Specifies the event name for cellsOrdered.\n\t */\n\tCELLS_ORDERED: 'cellsOrdered',\n\n\t/**\n\t * Variable: REMOVE_CELLS\n\t *\n\t * Specifies the event name for removeCells.\n\t */\n\tREMOVE_CELLS: 'removeCells',\n\n\t/**\n\t * Variable: CELLS_REMOVED\n\t *\n\t * Specifies the event name for cellsRemoved.\n\t */\n\tCELLS_REMOVED: 'cellsRemoved',\n\n\t/**\n\t * Variable: GROUP_CELLS\n\t *\n\t * Specifies the event name for groupCells.\n\t */\n\tGROUP_CELLS: 'groupCells',\n\n\t/**\n\t * Variable: UNGROUP_CELLS\n\t *\n\t * Specifies the event name for ungroupCells.\n\t */\n\tUNGROUP_CELLS: 'ungroupCells',\n\n\t/**\n\t * Variable: REMOVE_CELLS_FROM_PARENT\n\t *\n\t * Specifies the event name for removeCellsFromParent.\n\t */\n\tREMOVE_CELLS_FROM_PARENT: 'removeCellsFromParent',\n\n\t/**\n\t * Variable: FOLD_CELLS\n\t *\n\t * Specifies the event name for foldCells.\n\t */\n\tFOLD_CELLS: 'foldCells',\n\n\t/**\n\t * Variable: CELLS_FOLDED\n\t *\n\t * Specifies the event name for cellsFolded.\n\t */\n\tCELLS_FOLDED: 'cellsFolded',\n\n\t/**\n\t * Variable: ALIGN_CELLS\n\t *\n\t * Specifies the event name for alignCells.\n\t */\n\tALIGN_CELLS: 'alignCells',\n\n\t/**\n\t * Variable: LABEL_CHANGED\n\t *\n\t * Specifies the event name for labelChanged.\n\t */\n\tLABEL_CHANGED: 'labelChanged',\n\n\t/**\n\t * Variable: CONNECT_CELL\n\t *\n\t * Specifies the event name for connectCell.\n\t */\n\tCONNECT_CELL: 'connectCell',\n\n\t/**\n\t * Variable: CELL_CONNECTED\n\t *\n\t * Specifies the event name for cellConnected.\n\t */\n\tCELL_CONNECTED: 'cellConnected',\n\n\t/**\n\t * Variable: SPLIT_EDGE\n\t *\n\t * Specifies the event name for splitEdge.\n\t */\n\tSPLIT_EDGE: 'splitEdge',\n\n\t/**\n\t * Variable: FLIP_EDGE\n\t *\n\t * Specifies the event name for flipEdge.\n\t */\n\tFLIP_EDGE: 'flipEdge',\n\n\t/**\n\t * Variable: START_EDITING\n\t *\n\t * Specifies the event name for startEditing.\n\t */\n\tSTART_EDITING: 'startEditing',\n\n\t/**\n\t * Variable: EDITING_STARTED\n\t *\n\t * Specifies the event name for editingStarted.\n\t */\n\tEDITING_STARTED: 'editingStarted',\n\n\t/**\n\t * Variable: EDITING_STOPPED\n\t *\n\t * Specifies the event name for editingStopped.\n\t */\n\tEDITING_STOPPED: 'editingStopped',\n\n\t/**\n\t * Variable: ADD_OVERLAY\n\t *\n\t * Specifies the event name for addOverlay.\n\t */\n\tADD_OVERLAY: 'addOverlay',\n\n\t/**\n\t * Variable: REMOVE_OVERLAY\n\t *\n\t * Specifies the event name for removeOverlay.\n\t */\n\tREMOVE_OVERLAY: 'removeOverlay',\n\n\t/**\n\t * Variable: UPDATE_CELL_SIZE\n\t *\n\t * Specifies the event name for updateCellSize.\n\t */\n\tUPDATE_CELL_SIZE: 'updateCellSize',\n\n\t/**\n\t * Variable: ESCAPE\n\t *\n\t * Specifies the event name for escape.\n\t */\n\tESCAPE: 'escape',\n\n\t/**\n\t * Variable: DOUBLE_CLICK\n\t *\n\t * Specifies the event name for doubleClick.\n\t */\n\tDOUBLE_CLICK: 'doubleClick',\n\n\t/**\n\t * Variable: START\n\t *\n\t * Specifies the event name for start.\n\t */\n\tSTART: 'start',\n\n\t/**\n\t * Variable: RESET\n\t *\n\t * Specifies the event name for reset.\n\t */\n\tRESET: 'reset'\n\n};\n"
  },
  {
    "path": "static/cherry/drawio_demo/src/js/util/mxEventObject.js",
    "content": "/**\n * Copyright (c) 2006-2015, JGraph Ltd\n * Copyright (c) 2006-2015, Gaudenz Alder\n */\n/**\n * Class: mxEventObject\n * \n * The mxEventObject is a wrapper for all properties of a single event.\n * Additionally, it also offers functions to consume the event and check if it\n * was consumed as follows:\n * \n * (code)\n * evt.consume();\n * INV: evt.isConsumed() == true\n * (end)\n * \n * Constructor: mxEventObject\n *\n * Constructs a new event object with the specified name. An optional\n * sequence of key, value pairs can be appended to define properties.\n * \n * Example:\n *\n * (code)\n * new mxEventObject(\"eventName\", key1, val1, .., keyN, valN)\n * (end)\n */\nfunction mxEventObject(name)\n{\n\tthis.name = name;\n\tthis.properties = [];\n\t\n\tfor (var i = 1; i < arguments.length; i += 2)\n\t{\n\t\tif (arguments[i + 1] != null)\n\t\t{\n\t\t\tthis.properties[arguments[i]] = arguments[i + 1];\n\t\t}\n\t}\n};\n\n/**\n * Variable: name\n *\n * Holds the name.\n */\nmxEventObject.prototype.name = null;\n\n/**\n * Variable: properties\n *\n * Holds the properties as an associative array.\n */\nmxEventObject.prototype.properties = null;\n\n/**\n * Variable: consumed\n *\n * Holds the consumed state. Default is false.\n */\nmxEventObject.prototype.consumed = false;\n\n/**\n * Function: getName\n * \n * Returns <name>.\n */\nmxEventObject.prototype.getName = function()\n{\n\treturn this.name;\n};\n\n/**\n * Function: getProperties\n * \n * Returns <properties>.\n */\nmxEventObject.prototype.getProperties = function()\n{\n\treturn this.properties;\n};\n\n/**\n * Function: getProperty\n * \n * Returns the property for the given key.\n */\nmxEventObject.prototype.getProperty = function(key)\n{\n\treturn this.properties[key];\n};\n\n/**\n * Function: isConsumed\n *\n * Returns true if the event has been consumed.\n */\nmxEventObject.prototype.isConsumed = function()\n{\n\treturn this.consumed;\n};\n\n/**\n * Function: consume\n *\n * Consumes the event.\n */\nmxEventObject.prototype.consume = function()\n{\n\tthis.consumed = true;\n};\n"
  },
  {
    "path": "static/cherry/drawio_demo/src/js/util/mxEventSource.js",
    "content": "/**\n * Copyright (c) 2006-2015, JGraph Ltd\n * Copyright (c) 2006-2015, Gaudenz Alder\n */\n/**\n * Class: mxEventSource\n *\n * Base class for objects that dispatch named events. To create a subclass that\n * inherits from mxEventSource, the following code is used.\n *\n * (code)\n * function MyClass() { };\n *\n * MyClass.prototype = new mxEventSource();\n * MyClass.prototype.constructor = MyClass;\n * (end)\n *\n * Known Subclasses:\n *\n * <mxGraphModel>, <mxGraph>, <mxGraphView>, <mxEditor>, <mxCellOverlay>,\n * <mxToolbar>, <mxWindow>\n * \n * Constructor: mxEventSource\n *\n * Constructs a new event source.\n */\nfunction mxEventSource(eventSource)\n{\n\tthis.setEventSource(eventSource);\n};\n\n/**\n * Variable: eventListeners\n *\n * Holds the event names and associated listeners in an array. The array\n * contains the event name followed by the respective listener for each\n * registered listener.\n */\nmxEventSource.prototype.eventListeners = null;\n\n/**\n * Variable: eventsEnabled\n *\n * Specifies if events can be fired. Default is true.\n */\nmxEventSource.prototype.eventsEnabled = true;\n\n/**\n * Variable: eventSource\n *\n * Optional source for events. Default is null.\n */\nmxEventSource.prototype.eventSource = null;\n\n/**\n * Function: isEventsEnabled\n * \n * Returns <eventsEnabled>.\n */\nmxEventSource.prototype.isEventsEnabled = function()\n{\n\treturn this.eventsEnabled;\n};\n\n/**\n * Function: setEventsEnabled\n * \n * Sets <eventsEnabled>.\n */\nmxEventSource.prototype.setEventsEnabled = function(value)\n{\n\tthis.eventsEnabled = value;\n};\n\n/**\n * Function: getEventSource\n * \n * Returns <eventSource>.\n */\nmxEventSource.prototype.getEventSource = function()\n{\n\treturn this.eventSource;\n};\n\n/**\n * Function: setEventSource\n * \n * Sets <eventSource>.\n */\nmxEventSource.prototype.setEventSource = function(value)\n{\n\tthis.eventSource = value;\n};\n\n/**\n * Function: addListener\n *\n * Binds the specified function to the given event name. If no event name\n * is given, then the listener is registered for all events.\n * \n * The parameters of the listener are the sender and an <mxEventObject>.\n */\nmxEventSource.prototype.addListener = function(name, funct)\n{\n\tif (this.eventListeners == null)\n\t{\n\t\tthis.eventListeners = [];\n\t}\n\t\n\tthis.eventListeners.push(name);\n\tthis.eventListeners.push(funct);\n};\n\n/**\n * Function: removeListener\n *\n * Removes all occurrences of the given listener from <eventListeners>.\n */\nmxEventSource.prototype.removeListener = function(funct)\n{\n\tif (this.eventListeners != null)\n\t{\n\t\tvar i = 0;\n\t\t\n\t\twhile (i < this.eventListeners.length)\n\t\t{\n\t\t\tif (this.eventListeners[i+1] == funct)\n\t\t\t{\n\t\t\t\tthis.eventListeners.splice(i, 2);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\ti += 2;\n\t\t\t}\n\t\t}\n\t}\n};\n\n/**\n * Function: fireEvent\n *\n * Dispatches the given event to the listeners which are registered for\n * the event. The sender argument is optional. The current execution scope\n * (\"this\") is used for the listener invocation (see <mxUtils.bind>).\n *\n * Example:\n *\n * (code)\n * fireEvent(new mxEventObject(\"eventName\", key1, val1, .., keyN, valN))\n * (end)\n * \n * Parameters:\n *\n * evt - <mxEventObject> that represents the event.\n * sender - Optional sender to be passed to the listener. Default value is\n * the return value of <getEventSource>.\n */\nmxEventSource.prototype.fireEvent = function(evt, sender)\n{\n\tif (this.eventListeners != null && this.isEventsEnabled())\n\t{\n\t\tif (evt == null)\n\t\t{\n\t\t\tevt = new mxEventObject();\n\t\t}\n\t\t\n\t\tif (sender == null)\n\t\t{\n\t\t\tsender = this.getEventSource();\n\t\t}\n\n\t\tif (sender == null)\n\t\t{\n\t\t\tsender = this;\n\t\t}\n\n\t\tvar args = [sender, evt];\n\t\t\n\t\tfor (var i = 0; i < this.eventListeners.length; i += 2)\n\t\t{\n\t\t\tvar listen = this.eventListeners[i];\n\t\t\t\n\t\t\tif (listen == null || listen == evt.getName())\n\t\t\t{\n\t\t\t\tthis.eventListeners[i+1].apply(this, args);\n\t\t\t}\n\t\t}\n\t}\n};\n"
  },
  {
    "path": "static/cherry/drawio_demo/src/js/util/mxForm.js",
    "content": "/**\n * Copyright (c) 2006-2015, JGraph Ltd\n * Copyright (c) 2006-2015, Gaudenz Alder\n */\n/**\n * Class: mxForm\n * \n * A simple class for creating HTML forms.\n * \n * Constructor: mxForm\n * \n * Creates a HTML table using the specified classname.\n */\nfunction mxForm(className)\n{\n\tthis.table = document.createElement('table');\n\tthis.table.className = className;\n\tthis.body = document.createElement('tbody');\n\t\n\tthis.table.appendChild(this.body);\n};\n\n/**\n * Variable: table\n * \n * Holds the DOM node that represents the table.\n */\nmxForm.prototype.table = null;\n\n/**\n * Variable: body\n * \n * Holds the DOM node that represents the tbody (table body). New rows\n * can be added to this object using DOM API.\n */\nmxForm.prototype.body = false;\n\n/**\n * Function: getTable\n * \n * Returns the table that contains this form.\n */\nmxForm.prototype.getTable = function()\n{\n\treturn this.table;\n};\n\n/**\n * Function: addButtons\n * \n * Helper method to add an OK and Cancel button using the respective\n * functions.\n */\nmxForm.prototype.addButtons = function(okFunct, cancelFunct)\n{\n\tvar tr = document.createElement('tr');\n\tvar td = document.createElement('td');\n\ttr.appendChild(td);\n\ttd = document.createElement('td');\n\n\t// Adds the ok button\n\tvar button = document.createElement('button');\n\tmxUtils.write(button, mxResources.get('ok') || 'OK');\n\ttd.appendChild(button);\n\n\tmxEvent.addListener(button, 'click', function()\n\t{\n\t\tokFunct();\n\t});\n\t\n\t// Adds the cancel button\n\tbutton = document.createElement('button');\n\tmxUtils.write(button, mxResources.get('cancel') || 'Cancel');\n\ttd.appendChild(button);\n\t\n\tmxEvent.addListener(button, 'click', function()\n\t{\n\t\tcancelFunct();\n\t});\n\t\n\ttr.appendChild(td);\n\tthis.body.appendChild(tr);\n};\n\n/**\n * Function: addText\n * \n * Adds an input for the given name, type and value and returns it.\n */\nmxForm.prototype.addText = function(name, value, type)\n{\n\tvar input = document.createElement('input');\n\t\n\tinput.setAttribute('type', type || 'text');\n\tinput.value = value;\n\t\n\treturn this.addField(name, input);\n};\n\n/**\n * Function: addCheckbox\n * \n * Adds a checkbox for the given name and value and returns the textfield.\n */\nmxForm.prototype.addCheckbox = function(name, value)\n{\n\tvar input = document.createElement('input');\n\t\n\tinput.setAttribute('type', 'checkbox');\n\tthis.addField(name, input);\n\n\t// IE can only change the checked value if the input is inside the DOM\n\tif (value)\n\t{\n\t\tinput.checked = true;\n\t}\n\n\treturn input;\n};\n\n/**\n * Function: addTextarea\n * \n * Adds a textarea for the given name and value and returns the textarea.\n */\nmxForm.prototype.addTextarea = function(name, value, rows)\n{\n\tvar input = document.createElement('textarea');\n\t\n\tif (mxClient.IS_NS)\n\t{\n\t\trows--;\n\t}\n\t\n\tinput.setAttribute('rows', rows || 2);\n\tinput.value = value;\n\t\n\treturn this.addField(name, input);\n};\n\n/**\n * Function: addCombo\n * \n * Adds a combo for the given name and returns the combo.\n */\nmxForm.prototype.addCombo = function(name, isMultiSelect, size)\n{\n\tvar select = document.createElement('select');\n\t\n\tif (size != null)\n\t{\n\t\tselect.setAttribute('size', size);\n\t}\n\t\n\tif (isMultiSelect)\n\t{\n\t\tselect.setAttribute('multiple', 'true');\n\t}\n\t\n\treturn this.addField(name, select);\n};\n\n/**\n * Function: addOption\n * \n * Adds an option for the given label to the specified combo.\n */\nmxForm.prototype.addOption = function(combo, label, value, isSelected)\n{\n\tvar option = document.createElement('option');\n\t\n\tmxUtils.writeln(option, label);\n\toption.setAttribute('value', value);\n\t\n\tif (isSelected)\n\t{\n\t\toption.setAttribute('selected', isSelected);\n\t}\n\t\n\tcombo.appendChild(option);\n};\n\n/**\n * Function: addField\n * \n * Adds a new row with the name and the input field in two columns and\n * returns the given input.\n */\nmxForm.prototype.addField = function(name, input)\n{\n\tvar tr = document.createElement('tr');\n\tvar td = document.createElement('td');\n\tmxUtils.write(td, name);\n\ttr.appendChild(td);\n\t\n\ttd = document.createElement('td');\n\ttd.appendChild(input);\n\ttr.appendChild(td);\n\tthis.body.appendChild(tr);\n\t\n\treturn input;\n};\n"
  },
  {
    "path": "static/cherry/drawio_demo/src/js/util/mxGuide.js",
    "content": "/**\n * Copyright (c) 2006-2015, JGraph Ltd\n * Copyright (c) 2006-2015, Gaudenz Alder\n */\n/**\n * Class: mxGuide\n *\n * Implements the alignment of selection cells to other cells in the graph.\n * \n * Constructor: mxGuide\n * \n * Constructs a new guide object.\n */\nfunction mxGuide(graph, states)\n{\n\tthis.graph = graph;\n\tthis.setStates(states);\n};\n\n/**\n * Variable: graph\n *\n * Reference to the enclosing <mxGraph> instance.\n */\nmxGuide.prototype.graph = null;\n\n/**\n * Variable: states\n * \n * Contains the <mxCellStates> that are used for alignment.\n */\nmxGuide.prototype.states = null;\n\n/**\n * Variable: horizontal\n *\n * Specifies if horizontal guides are enabled. Default is true.\n */\nmxGuide.prototype.horizontal = true;\n\n/**\n * Variable: vertical\n *\n * Specifies if vertical guides are enabled. Default is true.\n */\nmxGuide.prototype.vertical = true;\n\n/**\n * Variable: vertical\n *\n * Holds the <mxShape> for the horizontal guide.\n */\nmxGuide.prototype.guideX = null;\n\n/**\n * Variable: vertical\n *\n * Holds the <mxShape> for the vertical guide.\n */\nmxGuide.prototype.guideY = null;\n\n/**\n * Function: setStates\n * \n * Sets the <mxCellStates> that should be used for alignment.\n */\nmxGuide.prototype.setStates = function(states)\n{\n\tthis.states = states;\n};\n\n/**\n * Function: isEnabledForEvent\n * \n * Returns true if the guide should be enabled for the given native event. This\n * implementation always returns true.\n */\nmxGuide.prototype.isEnabledForEvent = function(evt)\n{\n\treturn true;\n};\n\n/**\n * Function: getGuideTolerance\n * \n * Returns the tolerance for the guides. Default value is gridSize / 2.\n */\nmxGuide.prototype.getGuideTolerance = function()\n{\n\treturn this.graph.gridSize / 2;\n};\n\n/**\n * Function: createGuideShape\n * \n * Returns the mxShape to be used for painting the respective guide. This\n * implementation returns a new, dashed and crisp <mxPolyline> using\n * <mxConstants.GUIDE_COLOR> and <mxConstants.GUIDE_STROKEWIDTH> as the format.\n * \n * Parameters:\n * \n * horizontal - Boolean that specifies which guide should be created.\n */\nmxGuide.prototype.createGuideShape = function(horizontal)\n{\n\tvar guide = new mxPolyline([], mxConstants.GUIDE_COLOR, mxConstants.GUIDE_STROKEWIDTH);\n\tguide.isDashed = true;\n\t\n\treturn guide;\n};\n\n/**\n * Function: move\n * \n * Moves the <bounds> by the given <mxPoint> and returnt the snapped point.\n */\nmxGuide.prototype.move = function(bounds, delta, gridEnabled, clone)\n{\n\tif (this.states != null && (this.horizontal || this.vertical) && bounds != null && delta != null)\n\t{\n\t\tvar trx = this.graph.getView().translate;\n\t\tvar scale = this.graph.getView().scale;\n\t\tvar dx = delta.x;\n\t\tvar dy = delta.y;\n\t\t\n\t\tvar overrideX = false;\n\t\tvar stateX = null;\n\t\tvar valueX = null;\n\t\tvar overrideY = false;\n\t\tvar stateY = null;\n\t\tvar valueY = null;\n\t\t\n\t\tvar tt = this.getGuideTolerance();\n\t\tvar ttX = tt;\n\t\tvar ttY = tt;\n\t\t\n\t\tvar b = bounds.clone();\n\t\tb.x += delta.x;\n\t\tb.y += delta.y;\n\t\t\n\t\tvar left = b.x;\n\t\tvar right = b.x + b.width;\n\t\tvar center = b.getCenterX();\n\t\tvar top = b.y;\n\t\tvar bottom = b.y + b.height;\n\t\tvar middle = b.getCenterY();\n\t\n\t\t// Snaps the left, center and right to the given x-coordinate\n\t\tfunction snapX(x, state)\n\t\t{\n\t\t\tx += this.graph.panDx;\n\t\t\tvar override = false;\n\t\t\t\n\t\t\tif (Math.abs(x - center) < ttX)\n\t\t\t{\n\t\t\t\tdx = x - bounds.getCenterX();\n\t\t\t\tttX = Math.abs(x - center);\n\t\t\t\toverride = true;\n\t\t\t}\n\t\t\telse if (Math.abs(x - left) < ttX)\n\t\t\t{\n\t\t\t\tdx = x - bounds.x;\n\t\t\t\tttX = Math.abs(x - left);\n\t\t\t\toverride = true;\n\t\t\t}\n\t\t\telse if (Math.abs(x - right) < ttX)\n\t\t\t{\n\t\t\t\tdx = x - bounds.x - bounds.width;\n\t\t\t\tttX = Math.abs(x - right);\n\t\t\t\toverride = true;\n\t\t\t}\n\t\t\t\n\t\t\tif (override)\n\t\t\t{\n\t\t\t\tstateX = state;\n\t\t\t\tvalueX = Math.round(x - this.graph.panDx);\n\t\t\t\t\n\t\t\t\tif (this.guideX == null)\n\t\t\t\t{\n\t\t\t\t\tthis.guideX = this.createGuideShape(true);\n\t\t\t\t\t\n\t\t\t\t\t// Makes sure to use either VML or SVG shapes in order to implement\n\t\t\t\t\t// event-transparency on the background area of the rectangle since\n\t\t\t\t\t// HTML shapes do not let mouseevents through even when transparent\n\t\t\t\t\tthis.guideX.dialect = (this.graph.dialect != mxConstants.DIALECT_SVG) ?\n\t\t\t\t\t\tmxConstants.DIALECT_VML : mxConstants.DIALECT_SVG;\n\t\t\t\t\tthis.guideX.pointerEvents = false;\n\t\t\t\t\tthis.guideX.init(this.graph.getView().getOverlayPane());\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\toverrideX = overrideX || override;\n\t\t};\n\t\t\n\t\t// Snaps the top, middle or bottom to the given y-coordinate\n\t\tfunction snapY(y)\n\t\t{\n\t\t\ty += this.graph.panDy;\n\t\t\tvar override = false;\n\t\t\t\n\t\t\tif (Math.abs(y - middle) < ttY)\n\t\t\t{\n\t\t\t\tdy = y - bounds.getCenterY();\n\t\t\t\tttY = Math.abs(y -  middle);\n\t\t\t\toverride = true;\n\t\t\t}\n\t\t\telse if (Math.abs(y - top) < ttY)\n\t\t\t{\n\t\t\t\tdy = y - bounds.y;\n\t\t\t\tttY = Math.abs(y - top);\n\t\t\t\toverride = true;\n\t\t\t}\n\t\t\telse if (Math.abs(y - bottom) < ttY)\n\t\t\t{\n\t\t\t\tdy = y - bounds.y - bounds.height;\n\t\t\t\tttY = Math.abs(y - bottom);\n\t\t\t\toverride = true;\n\t\t\t}\n\t\t\t\n\t\t\tif (override)\n\t\t\t{\n\t\t\t\tstateY = state;\n\t\t\t\tvalueY = Math.round(y - this.graph.panDy);\n\t\t\t\t\n\t\t\t\tif (this.guideY == null)\n\t\t\t\t{\n\t\t\t\t\tthis.guideY = this.createGuideShape(false);\n\t\t\t\t\t\n\t\t\t\t\t// Makes sure to use either VML or SVG shapes in order to implement\n\t\t\t\t\t// event-transparency on the background area of the rectangle since\n\t\t\t\t\t// HTML shapes do not let mouseevents through even when transparent\n\t\t\t\t\tthis.guideY.dialect = (this.graph.dialect != mxConstants.DIALECT_SVG) ?\n\t\t\t\t\t\tmxConstants.DIALECT_VML : mxConstants.DIALECT_SVG;\n\t\t\t\t\tthis.guideY.pointerEvents = false;\n\t\t\t\t\tthis.guideY.init(this.graph.getView().getOverlayPane());\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\toverrideY = overrideY || override;\n\t\t};\n\t\t\n\t\tfor (var i = 0; i < this.states.length; i++)\n\t\t{\n\t\t\tvar state =  this.states[i];\n\t\t\t\n\t\t\tif (state != null)\n\t\t\t{\n\t\t\t\t// Align x\n\t\t\t\tif (this.horizontal)\n\t\t\t\t{\n\t\t\t\t\tsnapX.call(this, state.getCenterX(), state);\n\t\t\t\t\tsnapX.call(this, state.x, state);\n\t\t\t\t\tsnapX.call(this, state.x + state.width, state);\n\t\t\t\t}\n\t\n\t\t\t\t// Align y\n\t\t\t\tif (this.vertical)\n\t\t\t\t{\n\t\t\t\t\tsnapY.call(this, state.getCenterY(), state);\n\t\t\t\t\tsnapY.call(this, state.y, state);\n\t\t\t\t\tsnapY.call(this, state.y + state.height, state);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Moves cells that are off-grid back to the grid on move\n\t\tif (gridEnabled)\n\t\t{\n\t\t\tif (!overrideX)\n\t\t\t{\n\t\t\t\tvar tx = bounds.x - (this.graph.snap(bounds.x /\n\t\t\t\t\tscale - trx.x) + trx.x) * scale;\n\t\t\t\tdx = this.graph.snap(dx / scale) * scale - tx;\n\t\t\t}\n\t\t\t\n\t\t\tif (!overrideY)\n\t\t\t{\n\t\t\t\tvar ty = bounds.y - (this.graph.snap(bounds.y /\n\t\t\t\t\tscale - trx.y) + trx.y) * scale;\n\t\t\t\tdy = this.graph.snap(dy / scale) * scale - ty;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Redraws the guides\n\t\tvar c = this.graph.container;\n\t\t\n\t\tif (!overrideX && this.guideX != null)\n\t\t{\n\t\t\tthis.guideX.node.style.visibility = 'hidden';\n\t\t}\n\t\telse if (this.guideX != null)\n\t\t{\n\t\t\tif (stateX != null && bounds != null)\n\t\t\t{\n\t\t\t\tminY = Math.min(bounds.y + dy - this.graph.panDy, stateX.y);\n\t\t\t\tmaxY = Math.max(bounds.y + bounds.height + dy - this.graph.panDy, stateX.y + stateX.height);\n\t\t\t}\n\t\t\t\n\t\t\tif (minY != null && maxY != null)\n\t\t\t{\n\t\t\t\tthis.guideX.points = [new mxPoint(valueX, minY), new mxPoint(valueX, maxY)];\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tthis.guideX.points = [new mxPoint(valueX, -this.graph.panDy), new mxPoint(valueX, c.scrollHeight - 3 - this.graph.panDy)];\n\t\t\t}\n\t\t\t\n\t\t\tthis.guideX.stroke = this.getGuideColor(stateX, true);\n\t\t\tthis.guideX.node.style.visibility = 'visible';\n\t\t\tthis.guideX.redraw();\n\t\t}\n\t\t\n\t\tif (!overrideY && this.guideY != null)\n\t\t{\n\t\t\tthis.guideY.node.style.visibility = 'hidden';\n\t\t}\n\t\telse if (this.guideY != null)\n\t\t{\n\t\t\tif (stateY != null && bounds != null)\n\t\t\t{\n\t\t\t\tminX = Math.min(bounds.x + dx - this.graph.panDx, stateY.x);\n\t\t\t\tmaxX = Math.max(bounds.x + bounds.width + dx - this.graph.panDx, stateY.x + stateY.width);\n\t\t\t}\n\t\t\t\n\t\t\tif (minX != null && maxX != null)\n\t\t\t{\n\t\t\t\tthis.guideY.points = [new mxPoint(minX, valueY), new mxPoint(maxX, valueY)];\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tthis.guideY.points = [new mxPoint(-this.graph.panDx, valueY), new mxPoint(c.scrollWidth - 3 - this.graph.panDx, valueY)];\n\t\t\t}\n\t\t\t\n\t\t\tthis.guideY.stroke = this.getGuideColor(stateY, false);\n\t\t\tthis.guideY.node.style.visibility = 'visible';\n\t\t\tthis.guideY.redraw();\n\t\t}\n\t\t\n\t\tdelta = new mxPoint(dx, dy);\n\t}\n\t\n\treturn delta;\n};\n\n/**\n * Function: hide\n * \n * Hides all current guides.\n */\nmxGuide.prototype.getGuideColor = function(state, horizontal)\n{\n\treturn mxConstants.GUIDE_COLOR;\n};\n\n/**\n * Function: hide\n * \n * Hides all current guides.\n */\nmxGuide.prototype.hide = function()\n{\n\tthis.setVisible(false);\n};\n\n/**\n * Function: setVisible\n * \n * Shows or hides the current guides.\n */\nmxGuide.prototype.setVisible = function(visible)\n{\n\tif (this.guideX != null)\n\t{\n\t\tthis.guideX.node.style.visibility = (visible) ? 'visible' : 'hidden';\n\t}\n\t\n\tif (this.guideY != null)\n\t{\n\t\tthis.guideY.node.style.visibility = (visible) ? 'visible' : 'hidden';\n\t}\n};\n\n/**\n * Function: destroy\n * \n * Destroys all resources that this object uses.\n */\nmxGuide.prototype.destroy = function()\n{\n\tif (this.guideX != null)\n\t{\n\t\tthis.guideX.destroy();\n\t\tthis.guideX = null;\n\t}\n\t\n\tif (this.guideY != null)\n\t{\n\t\tthis.guideY.destroy();\n\t\tthis.guideY = null;\n\t}\n};\n"
  },
  {
    "path": "static/cherry/drawio_demo/src/js/util/mxImage.js",
    "content": "/**\n * Copyright (c) 2006-2015, JGraph Ltd\n * Copyright (c) 2006-2015, Gaudenz Alder\n */\n/**\n * Class: mxImage\n *\n * Encapsulates the URL, width and height of an image.\n * \n * Constructor: mxImage\n * \n * Constructs a new image.\n */\nfunction mxImage(src, width, height)\n{\n\tthis.src = src;\n\tthis.width = width;\n\tthis.height = height;\n};\n\n/**\n * Variable: src\n *\n * String that specifies the URL of the image.\n */\nmxImage.prototype.src = null;\n\n/**\n * Variable: width\n *\n * Integer that specifies the width of the image.\n */\nmxImage.prototype.width = null;\n\n/**\n * Variable: height\n *\n * Integer that specifies the height of the image.\n */\nmxImage.prototype.height = null;\n"
  },
  {
    "path": "static/cherry/drawio_demo/src/js/util/mxImageBundle.js",
    "content": "/**\n * Copyright (c) 2006-2015, JGraph Ltd\n * Copyright (c) 2006-2015, Gaudenz Alder\n */\n/**\n * Class: mxImageBundle\n *\n * Maps from keys to base64 encoded images or file locations. All values must\n * be URLs or use the format data:image/format followed by a comma and the base64\n * encoded image data, eg. \"data:image/gif,XYZ\", where XYZ is the base64 encoded\n * image data.\n * \n * To add a new image bundle to an existing graph, the following code is used:\n * \n * (code)\n * var bundle = new mxImageBundle(alt);\n * bundle.putImage('myImage', 'data:image/gif,R0lGODlhEAAQAMIGAAAAAICAAICAgP' +\n *   '//AOzp2O3r2////////yH+FUNyZWF0ZWQgd2l0aCBUaGUgR0lNUAAh+QQBCgAHACwAAAAA' +\n *   'EAAQAAADTXi63AowynnAMDfjPUDlnAAJhmeBFxAEloliKltWmiYCQvfVr6lBPB1ggxN1hi' +\n *   'laSSASFQpIV5HJBDyHpqK2ejVRm2AAgZCdmCGO9CIBADs=', fallback);\n * bundle.putImage('mySvgImage', 'data:image/svg+xml,' + encodeURIComponent(\n *   '<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"100%\" height=\"100%\">' +\n *   '<linearGradient id=\"gradient\"><stop offset=\"10%\" stop-color=\"#F00\"/>' +\n *   '<stop offset=\"90%\" stop-color=\"#fcc\"/></linearGradient>' +\n *   '<rect fill=\"url(#gradient)\" width=\"100%\" height=\"100%\"/></svg>'), fallback);\n * graph.addImageBundle(bundle);\n * (end);\n * \n * Alt is an optional boolean (default is false) that specifies if the value\n * or the fallback should be returned in <getImage>.\n * \n * The image can then be referenced in any cell style using image=myImage.\n * If you are using mxOutline, you should use the same image bundles in the\n * graph that renders the outline.\n * \n * The keys for images are resolved in <mxGraph.postProcessCellStyle> and\n * turned into a data URI if the returned value has a short data URI format\n * as specified above.\n * \n * A typical value for the fallback is a MTHML link as defined in RFC 2557.\n * Note that this format requires a file to be dynamically created on the\n * server-side, or the page that contains the graph to be modified to contain\n * the resources, this can be done by adding a comment that contains the\n * resource in the HEAD section of the page after the title tag.\n * \n * This type of fallback mechanism should be used in IE6 and IE7. IE8 does\n * support data URIs, but the maximum size is limited to 32 KB, which means\n * all data URIs should be limited to 32 KB.\n */\nfunction mxImageBundle(alt)\n{\n\tthis.images = [];\n\tthis.alt = (alt != null) ? alt : false;\n};\n\n/**\n * Variable: images\n * \n * Maps from keys to images.\n */\nmxImageBundle.prototype.images = null;\n\n/**\n * Variable: alt\n * \n * Specifies if the fallback representation should be returned.\n */\nmxImageBundle.prototype.images = null;\n\n/**\n * Function: putImage\n * \n * Adds the specified entry to the map. The entry is an object with a value and\n * fallback property as specified in the arguments.\n */\nmxImageBundle.prototype.putImage = function(key, value, fallback)\n{\n\tthis.images[key] = {value: value, fallback: fallback};\n};\n\n/**\n * Function: getImage\n * \n * Returns the value for the given key. This returns the value\n * or fallback, depending on <alt>. The fallback is returned if\n * <alt> is true, the value is returned otherwise.\n */\nmxImageBundle.prototype.getImage = function(key)\n{\n\tvar result = null;\n\t\n\tif (key != null)\n\t{\n\t\tvar img = this.images[key];\n\t\t\n\t\tif (img != null)\n\t\t{\n\t\t\tresult = (this.alt) ? img.fallback : img.value;\n\t\t}\n\t}\n\t\n\treturn result;\n};\n"
  },
  {
    "path": "static/cherry/drawio_demo/src/js/util/mxImageExport.js",
    "content": "/**\n * Copyright (c) 2006-2015, JGraph Ltd\n * Copyright (c) 2006-2015, Gaudenz Alder\n */\n/**\n * Class: mxImageExport\n * \n * Creates a new image export instance to be used with an export canvas. Here\n * is an example that uses this class to create an image via a backend using\n * <mxXmlExportCanvas>.\n * \n * (code)\n * var xmlDoc = mxUtils.createXmlDocument();\n * var root = xmlDoc.createElement('output');\n * xmlDoc.appendChild(root);\n * \n * var xmlCanvas = new mxXmlCanvas2D(root);\n * var imgExport = new mxImageExport();\n * imgExport.drawState(graph.getView().getState(graph.model.root), xmlCanvas);\n * \n * var bounds = graph.getGraphBounds();\n * var w = Math.ceil(bounds.x + bounds.width);\n * var h = Math.ceil(bounds.y + bounds.height);\n * \n * var xml = mxUtils.getXml(root);\n * new mxXmlRequest('export', 'format=png&w=' + w +\n * \t\t'&h=' + h + '&bg=#F9F7ED&xml=' + encodeURIComponent(xml))\n * \t\t.simulate(document, '_blank');\n * (end)\n * \n * Constructor: mxImageExport\n * \n * Constructs a new image export.\n */\nfunction mxImageExport() { };\n\n/**\n * Variable: includeOverlays\n * \n * Specifies if overlays should be included in the export. Default is false.\n */\nmxImageExport.prototype.includeOverlays = false;\n\n/**\n * Function: drawState\n * \n * Draws the given state and all its descendants to the given canvas.\n */\nmxImageExport.prototype.drawState = function(state, canvas)\n{\n\tif (state != null)\n\t{\n\t\tthis.visitStatesRecursive(state, canvas, mxUtils.bind(this, function()\n\t\t{\n\t\t\tthis.drawCellState.apply(this, arguments);\n\t\t}));\n\t\t\t\t\n\t\t// Paints the overlays\n\t\tif (this.includeOverlays)\n\t\t{\n\t\t\tthis.visitStatesRecursive(state, canvas, mxUtils.bind(this, function()\n\t\t\t{\n\t\t\t\tthis.drawOverlays.apply(this, arguments);\n\t\t\t}));\n\t\t}\n\t}\n};\n\n/**\n * Function: drawState\n * \n * Draws the given state and all its descendants to the given canvas.\n */\nmxImageExport.prototype.visitStatesRecursive = function(state, canvas, visitor)\n{\n\tif (state != null)\n\t{\n\t\tvisitor(state, canvas);\n\t\t\n\t\tvar graph = state.view.graph;\n\t\tvar childCount = graph.model.getChildCount(state.cell);\n\t\t\n\t\tfor (var i = 0; i < childCount; i++)\n\t\t{\n\t\t\tvar childState = graph.view.getState(graph.model.getChildAt(state.cell, i));\n\t\t\tthis.visitStatesRecursive(childState, canvas, visitor);\n\t\t}\n\t}\n};\n\n/**\n * Function: getLinkForCellState\n * \n * Returns the link for the given cell state and canvas. This returns null.\n */\nmxImageExport.prototype.getLinkForCellState = function(state, canvas)\n{\n\treturn null;\n};\n\n/**\n * Function: drawCellState\n * \n * Draws the given state to the given canvas.\n */\nmxImageExport.prototype.drawCellState = function(state, canvas)\n{\n\t// Experimental feature\n\tvar link = this.getLinkForCellState(state, canvas);\n\t\n\tif (link != null)\n\t{\n\t\tcanvas.setLink(link);\n\t}\n\t\n\t// Paints the shape and text\n\tthis.drawShape(state, canvas);\n\tthis.drawText(state, canvas);\n\n\tif (link != null)\n\t{\n\t\tcanvas.setLink(null);\n\t}\n};\n\n/**\n * Function: drawShape\n * \n * Draws the shape of the given state.\n */\nmxImageExport.prototype.drawShape = function(state, canvas)\n{\n\tif (state.shape instanceof mxShape && state.shape.checkBounds())\n\t{\n\t\tcanvas.save();\n\t\tstate.shape.paint(canvas);\n\t\tcanvas.restore();\n\t}\n};\n\n/**\n * Function: drawText\n * \n * Draws the text of the given state.\n */\nmxImageExport.prototype.drawText = function(state, canvas)\n{\n\tif (state.text != null && state.text.checkBounds())\n\t{\n\t\tcanvas.save();\n\t\tstate.text.paint(canvas);\n\t\tcanvas.restore();\n\t}\n};\n\n/**\n * Function: drawOverlays\n * \n * Draws the overlays for the given state. This is called if <includeOverlays>\n * is true.\n */\nmxImageExport.prototype.drawOverlays = function(state, canvas)\n{\n\tif (state.overlays != null)\n\t{\n\t\tstate.overlays.visit(function(id, shape)\n\t\t{\n\t\t\tif (shape instanceof mxShape)\n\t\t\t{\n\t\t\t\tshape.paint(canvas);\n\t\t\t}\n\t\t});\n\t}\n};\n\n"
  },
  {
    "path": "static/cherry/drawio_demo/src/js/util/mxLog.js",
    "content": "/**\n * Copyright (c) 2006-2015, JGraph Ltd\n * Copyright (c) 2006-2015, Gaudenz Alder\n */\nvar mxLog =\n{\n\t/**\n\t * Class: mxLog\n\t * \n\t * A singleton class that implements a simple console.\n\t * \n\t * Variable: consoleName\n\t * \n\t * Specifies the name of the console window. Default is 'Console'.\n\t */\n\tconsoleName: 'Console',\n\t\n\t/**\n\t * Variable: TRACE\n\t * \n\t * Specified if the output for <enter> and <leave> should be visible in the\n\t * console. Default is false.\n\t */\n\tTRACE: false,\n\n\t/**\n\t * Variable: DEBUG\n\t * \n\t * Specifies if the output for <debug> should be visible in the console.\n\t * Default is true.\n\t */\n\tDEBUG: true,\n\n\t/**\n\t * Variable: WARN\n\t * \n\t * Specifies if the output for <warn> should be visible in the console.\n\t * Default is true.\n\t */\n\tWARN: true,\n\n\t/**\n\t * Variable: buffer\n\t * \n\t * Buffer for pre-initialized content.\n\t */\n\tbuffer: '',\n\t\n\t/**\n\t * Function: init\n\t *\n\t * Initializes the DOM node for the console. This requires document.body to\n\t * point to a non-null value. This is called from within <setVisible> if the\n\t * log has not yet been initialized.\n\t */\n\tinit: function()\n\t{\n\t\tif (mxLog.window == null && document.body != null)\n\t\t{\n\t\t\tvar title = mxLog.consoleName + ' - mxGraph ' + mxClient.VERSION;\n\n\t\t\t// Creates a table that maintains the layout\n\t\t\tvar table = document.createElement('table');\n\t\t\ttable.setAttribute('width', '100%');\n\t\t\ttable.setAttribute('height', '100%');\n\n\t\t\tvar tbody = document.createElement('tbody');\n\t\t\tvar tr = document.createElement('tr');\n\t\t\tvar td = document.createElement('td');\n\t\t\ttd.style.verticalAlign = 'top';\n\t\t\t\t\n\t\t\t// Adds the actual console as a textarea\n\t\t\tmxLog.textarea = document.createElement('textarea');\n\t\t\tmxLog.textarea.setAttribute('wrap', 'off');\n\t\t\tmxLog.textarea.setAttribute('readOnly', 'true');\n\t\t\tmxLog.textarea.style.height = '100%';\n\t\t\tmxLog.textarea.style.resize = 'none';\n\t\t\tmxLog.textarea.value = mxLog.buffer;\n\n\t\t\t// Workaround for wrong width in standards mode\n\t\t\tif (mxClient.IS_NS && document.compatMode != 'BackCompat')\n\t\t\t{\n\t\t\t\tmxLog.textarea.style.width = '99%';\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tmxLog.textarea.style.width = '100%';\n\t\t\t}\n\t\t\t\n\t\t\ttd.appendChild(mxLog.textarea);\n\t\t\ttr.appendChild(td);\n\t\t\ttbody.appendChild(tr);\n\n\t\t\t// Creates the container div\n\t\t\ttr = document.createElement('tr');\n\t\t\tmxLog.td = document.createElement('td');\n\t\t\tmxLog.td.style.verticalAlign = 'top';\n\t\t\tmxLog.td.setAttribute('height', '30px');\n\t\t\t\n\t\t\ttr.appendChild(mxLog.td);\n\t\t\ttbody.appendChild(tr);\n\t\t\ttable.appendChild(tbody);\n\n\t\t\t// Adds various debugging buttons\n\t\t\tmxLog.addButton('Info', function (evt)\n\t\t\t{\n\t\t\t\tmxLog.info();\n\t\t\t});\n\t\t\n\t\t\tmxLog.addButton('DOM', function (evt)\n\t\t\t{\n\t\t\t\tvar content = mxUtils.getInnerHtml(document.body);\n\t\t\t\tmxLog.debug(content);\n\t\t\t});\n\t\n\t\t\tmxLog.addButton('Trace', function (evt)\n\t\t\t{\n\t\t\t\tmxLog.TRACE = !mxLog.TRACE;\n\t\t\t\t\n\t\t\t\tif (mxLog.TRACE)\n\t\t\t\t{\n\t\t\t\t\tmxLog.debug('Tracing enabled');\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tmxLog.debug('Tracing disabled');\n\t\t\t\t}\n\t\t\t});\t\n\n\t\t\tmxLog.addButton('Copy', function (evt)\n\t\t\t{\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tmxUtils.copy(mxLog.textarea.value);\n\t\t\t\t}\n\t\t\t\tcatch (err)\n\t\t\t\t{\n\t\t\t\t\tmxUtils.alert(err);\n\t\t\t\t}\n\t\t\t});\t\t\t\n\n\t\t\tmxLog.addButton('Show', function (evt)\n\t\t\t{\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tmxUtils.popup(mxLog.textarea.value);\n\t\t\t\t}\n\t\t\t\tcatch (err)\n\t\t\t\t{\n\t\t\t\t\tmxUtils.alert(err);\n\t\t\t\t}\n\t\t\t});\t\n\t\t\t\n\t\t\tmxLog.addButton('Clear', function (evt)\n\t\t\t{\n\t\t\t\tmxLog.textarea.value = '';\n\t\t\t});\n\n\t\t\t// Cross-browser code to get window size\n\t\t\tvar h = 0;\n\t\t\tvar w = 0;\n\t\t\t\n\t\t\tif (typeof(window.innerWidth) === 'number')\n\t\t\t{\n\t\t\t\th = window.innerHeight;\n\t\t\t\tw = window.innerWidth;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\th = (document.documentElement.clientHeight || document.body.clientHeight);\n\t\t\t\tw = document.body.clientWidth;\n\t\t\t}\n\n\t\t\tmxLog.window = new mxWindow(title, table, Math.max(0, w - 320), Math.max(0, h - 210), 300, 160);\n\t\t\tmxLog.window.setMaximizable(true);\n\t\t\tmxLog.window.setScrollable(false);\n\t\t\tmxLog.window.setResizable(true);\n\t\t\tmxLog.window.setClosable(true);\n\t\t\tmxLog.window.destroyOnClose = false;\n\t\t\t\n\t\t\t// Workaround for ignored textarea height in various setups\n\t\t\tif (((mxClient.IS_NS || mxClient.IS_IE) && !mxClient.IS_GC &&\n\t\t\t\t!mxClient.IS_SF && document.compatMode != 'BackCompat') ||\n\t\t\t\tdocument.documentMode == 11)\n\t\t\t{\n\t\t\t\tvar elt = mxLog.window.getElement();\n\t\t\t\t\n\t\t\t\tvar resizeHandler = function(sender, evt)\n\t\t\t\t{\n\t\t\t\t\tmxLog.textarea.style.height = Math.max(0, elt.offsetHeight - 70) + 'px';\n\t\t\t\t}; \n\t\t\t\t\n\t\t\t\tmxLog.window.addListener(mxEvent.RESIZE_END, resizeHandler);\n\t\t\t\tmxLog.window.addListener(mxEvent.MAXIMIZE, resizeHandler);\n\t\t\t\tmxLog.window.addListener(mxEvent.NORMALIZE, resizeHandler);\n\n\t\t\t\tmxLog.textarea.style.height = '92px';\n\t\t\t}\n\t\t}\n\t},\n\t\n\t/**\n\t * Function: info\n\t * \n\t * Writes the current navigator information to the console.\n\t */\n\tinfo: function()\n\t{\n\t\tmxLog.writeln(mxUtils.toString(navigator));\n\t},\n\t\t\t\n\t/**\n\t * Function: addButton\n\t * \n\t * Adds a button to the console using the given label and function.\n\t */\n\taddButton: function(lab, funct)\n\t{\n\t\tvar button = document.createElement('button');\n\t\tmxUtils.write(button, lab);\n\t\tmxEvent.addListener(button, 'click', funct);\n\t\tmxLog.td.appendChild(button);\n\t},\n\t\t\t\t\n\t/**\n\t * Function: isVisible\n\t * \n\t * Returns true if the console is visible.\n\t */\n\tisVisible: function()\n\t{\n\t\tif (mxLog.window != null)\n\t\t{\n\t\t\treturn mxLog.window.isVisible();\n\t\t}\n\t\t\n\t\treturn false;\n\t},\n\t\n\n\t/**\n\t * Function: show\n\t * \n\t * Shows the console.\n\t */\n\tshow: function()\n\t{\n\t\tmxLog.setVisible(true);\n\t},\n\n\t/**\n\t * Function: setVisible\n\t * \n\t * Shows or hides the console.\n\t */\n\tsetVisible: function(visible)\n\t{\n\t\tif (mxLog.window == null)\n\t\t{\n\t\t\tmxLog.init();\n\t\t}\n\n\t\tif (mxLog.window != null)\n\t\t{\n\t\t\tmxLog.window.setVisible(visible);\n\t\t}\n\t},\n\n\t/**\n\t * Function: enter\n\t * \n\t * Writes the specified string to the console\n\t * if <TRACE> is true and returns the current \n\t * time in milliseconds.\n\t *\n\t * Example:\n\t * \n\t * (code)\n\t * mxLog.show();\n\t * var t0 = mxLog.enter('Hello');\n\t * // Do something\n\t * mxLog.leave('World!', t0);\n\t * (end)\n\t */\n\tenter: function(string)\n\t{\n\t\tif (mxLog.TRACE)\n\t\t{\n\t\t\tmxLog.writeln('Entering '+string);\n\t\t\t\n\t\t\treturn new Date().getTime();\n\t\t}\n\t},\n\n\t/**\n\t * Function: leave\n\t * \n\t * Writes the specified string to the console\n\t * if <TRACE> is true and computes the difference\n\t * between the current time and t0 in milliseconds.\n\t * See <enter> for an example.\n\t */\n\tleave: function(string, t0)\n\t{\n\t\tif (mxLog.TRACE)\n\t\t{\n\t\t\tvar dt = (t0 != 0) ? ' ('+(new Date().getTime() - t0)+' ms)' : '';\n\t\t\tmxLog.writeln('Leaving '+string+dt);\n\t\t}\n\t},\n\t\n\t/**\n\t * Function: debug\n\t * \n\t * Adds all arguments to the console if <DEBUG> is enabled.\n\t *\n\t * Example:\n\t * \n\t * (code)\n\t * mxLog.show();\n\t * mxLog.debug('Hello, World!');\n\t * (end)\n\t */\n\tdebug: function()\n\t{\n\t\tif (mxLog.DEBUG)\n\t\t{\n\t\t\tmxLog.writeln.apply(this, arguments);\n\t\t}\n\t},\n\t\n\t/**\n\t * Function: warn\n\t * \n\t * Adds all arguments to the console if <WARN> is enabled.\n\t *\n\t * Example:\n\t * \n\t * (code)\n\t * mxLog.show();\n\t * mxLog.warn('Hello, World!');\n\t * (end)\n\t */\n\twarn: function()\n\t{\n\t\tif (mxLog.WARN)\n\t\t{\n\t\t\tmxLog.writeln.apply(this, arguments);\n\t\t}\n\t},\n\n\t/**\n\t * Function: write\n\t * \n\t * Adds the specified strings to the console.\n\t */\n\twrite: function()\n\t{\n\t\tvar string = '';\n\t\t\n\t\tfor (var i = 0; i < arguments.length; i++)\n\t\t{\n\t\t\tstring += arguments[i];\n\t\t\t\n\t\t\tif (i < arguments.length - 1)\n\t\t\t{\n\t\t\t\tstring += ' ';\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (mxLog.textarea != null)\n\t\t{\n\t\t\tmxLog.textarea.value = mxLog.textarea.value + string;\n\n\t\t\t// Workaround for no update in Presto 2.5.22 (Opera 10.5)\n\t\t\tif (navigator.userAgent.indexOf('Presto/2.5') >= 0)\n\t\t\t{\n\t\t\t\tmxLog.textarea.style.visibility = 'hidden';\n\t\t\t\tmxLog.textarea.style.visibility = 'visible';\n\t\t\t}\n\t\t\t\n\t\t\tmxLog.textarea.scrollTop = mxLog.textarea.scrollHeight;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tmxLog.buffer += string;\n\t\t}\n\t},\n\t\n\t/**\n\t * Function: writeln\n\t * \n\t * Adds the specified strings to the console, appending a linefeed at the\n\t * end of each string.\n\t */\n\twriteln: function()\n\t{\n\t\tvar string = '';\n\t\t\n\t\tfor (var i = 0; i < arguments.length; i++)\n\t\t{\n\t\t\tstring += arguments[i];\n\t\t\t\n\t\t\tif (i < arguments.length - 1)\n\t\t\t{\n\t\t\t\tstring += ' ';\n\t\t\t}\n\t\t}\n\n\t\tmxLog.write(string + '\\n');\n\t}\n\t\n};\n"
  },
  {
    "path": "static/cherry/drawio_demo/src/js/util/mxMorphing.js",
    "content": "/**\n * Copyright (c) 2006-2015, JGraph Ltd\n * Copyright (c) 2006-2015, Gaudenz Alder\n */\n/**\n *\n * Class: mxMorphing\n * \n * Implements animation for morphing cells. Here is an example of\n * using this class for animating the result of a layout algorithm:\n * \n * (code)\n * graph.getModel().beginUpdate();\n * try\n * {\n *   var circleLayout = new mxCircleLayout(graph);\n *   circleLayout.execute(graph.getDefaultParent());\n * }\n * finally\n * {\n *   var morph = new mxMorphing(graph);\n *   morph.addListener(mxEvent.DONE, function()\n *   {\n *     graph.getModel().endUpdate();\n *   });\n *   \n *   morph.startAnimation();\n * }\n * (end)\n * \n * Constructor: mxMorphing\n * \n * Constructs an animation.\n * \n * Parameters:\n * \n * graph - Reference to the enclosing <mxGraph>.\n * steps - Optional number of steps in the morphing animation. Default is 6.\n * ease - Optional easing constant for the animation. Default is 1.5.\n * delay - Optional delay between the animation steps. Passed to <mxAnimation>.\n */\nfunction mxMorphing(graph, steps, ease, delay)\n{\n\tmxAnimation.call(this, delay);\n\tthis.graph = graph;\n\tthis.steps = (steps != null) ? steps : 6;\n\tthis.ease = (ease != null) ? ease : 1.5;\n};\n\n/**\n * Extends mxEventSource.\n */\nmxMorphing.prototype = new mxAnimation();\nmxMorphing.prototype.constructor = mxMorphing;\n\n/**\n * Variable: graph\n * \n * Specifies the delay between the animation steps. Defaul is 30ms.\n */\nmxMorphing.prototype.graph = null;\n\n/**\n * Variable: steps\n * \n * Specifies the maximum number of steps for the morphing.\n */\nmxMorphing.prototype.steps = null;\n\n/**\n * Variable: step\n * \n * Contains the current step.\n */\nmxMorphing.prototype.step = 0;\n\n/**\n * Variable: ease\n * \n * Ease-off for movement towards the given vector. Larger values are\n * slower and smoother. Default is 4.\n */\nmxMorphing.prototype.ease = null;\n\n/**\n * Variable: cells\n * \n * Optional array of cells to be animated. If this is not specified\n * then all cells are checked and animated if they have been moved\n * in the current transaction.\n */\nmxMorphing.prototype.cells = null;\n\n/**\n * Function: updateAnimation\n *\n * Animation step.\n */\nmxMorphing.prototype.updateAnimation = function()\n{\n\tmxAnimation.prototype.updateAnimation.apply(this, arguments);\n\tvar move = new mxCellStatePreview(this.graph);\n\n\tif (this.cells != null)\n\t{\n\t\t// Animates the given cells individually without recursion\n\t\tfor (var i = 0; i < this.cells.length; i++)\n\t\t{\n\t\t\tthis.animateCell(this.cells[i], move, false);\n\t\t}\n\t}\n\telse\n\t{\n\t\t// Animates all changed cells by using recursion to find\n\t\t// the changed cells but not for the animation itself\n\t\tthis.animateCell(this.graph.getModel().getRoot(), move, true);\n\t}\n\t\n\tthis.show(move);\n\t\n\tif (move.isEmpty() || this.step++ >= this.steps)\n\t{\n\t\tthis.stopAnimation();\n\t}\n};\n\n/**\n * Function: show\n *\n * Shows the changes in the given <mxCellStatePreview>.\n */\nmxMorphing.prototype.show = function(move)\n{\n\tmove.show();\n};\n\n/**\n * Function: animateCell\n *\n * Animates the given cell state using <mxCellStatePreview.moveState>.\n */\nmxMorphing.prototype.animateCell = function(cell, move, recurse)\n{\n\tvar state = this.graph.getView().getState(cell);\n\tvar delta = null;\n\n\tif (state != null)\n\t{\n\t\t// Moves the animated state from where it will be after the model\n\t\t// change by subtracting the given delta vector from that location\n\t\tdelta = this.getDelta(state);\n\n\t\tif (this.graph.getModel().isVertex(cell) && (delta.x != 0 || delta.y != 0))\n\t\t{\n\t\t\tvar translate = this.graph.view.getTranslate();\n\t\t\tvar scale = this.graph.view.getScale();\n\t\t\t\n\t\t\tdelta.x += translate.x * scale;\n\t\t\tdelta.y += translate.y * scale;\n\t\t\t\n\t\t\tmove.moveState(state, -delta.x / this.ease, -delta.y / this.ease);\n\t\t}\n\t}\n\t\n\tif (recurse && !this.stopRecursion(state, delta))\n\t{\n\t\tvar childCount = this.graph.getModel().getChildCount(cell);\n\n\t\tfor (var i = 0; i < childCount; i++)\n\t\t{\n\t\t\tthis.animateCell(this.graph.getModel().getChildAt(cell, i), move, recurse);\n\t\t}\n\t}\n};\n\n/**\n * Function: stopRecursion\n *\n * Returns true if the animation should not recursively find more\n * deltas for children if the given parent state has been animated.\n */\nmxMorphing.prototype.stopRecursion = function(state, delta)\n{\n\treturn delta != null && (delta.x != 0 || delta.y != 0);\n};\n\n/**\n * Function: getDelta\n *\n * Returns the vector between the current rendered state and the future\n * location of the state after the display will be updated.\n */\nmxMorphing.prototype.getDelta = function(state)\n{\n\tvar origin = this.getOriginForCell(state.cell);\n\tvar translate = this.graph.getView().getTranslate();\n\tvar scale = this.graph.getView().getScale();\n\tvar x = state.x / scale - translate.x;\n\tvar y = state.y / scale - translate.y;\n\n\treturn new mxPoint((origin.x - x) * scale, (origin.y - y) * scale);\n};\n\n/**\n * Function: getOriginForCell\n *\n * Returns the top, left corner of the given cell. TODO: Improve performance\n * by using caching inside this method as the result per cell never changes\n * during the lifecycle of this object.\n */\nmxMorphing.prototype.getOriginForCell = function(cell)\n{\n\tvar result = null;\n\t\n\tif (cell != null)\n\t{\n\t\tvar parent = this.graph.getModel().getParent(cell);\n\t\tvar geo = this.graph.getCellGeometry(cell);\n\t\tresult = this.getOriginForCell(parent);\n\t\t\n\t\t// TODO: Handle offsets\n\t\tif (geo != null)\n\t\t{\n\t\t\tif (geo.relative)\n\t\t\t{\n\t\t\t\tvar pgeo = this.graph.getCellGeometry(parent);\n\t\t\t\t\n\t\t\t\tif (pgeo != null)\n\t\t\t\t{\n\t\t\t\t\tresult.x += geo.x * pgeo.width;\n\t\t\t\t\tresult.y += geo.y * pgeo.height;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tresult.x += geo.x;\n\t\t\t\tresult.y += geo.y;\n\t\t\t}\n\t\t}\n\t}\n\t\n\tif (result == null)\n\t{\n\t\tvar t = this.graph.view.getTranslate();\n\t\tresult = new mxPoint(-t.x, -t.y);\n\t}\n\t\n\treturn result;\n};\n"
  },
  {
    "path": "static/cherry/drawio_demo/src/js/util/mxMouseEvent.js",
    "content": "/**\n * Copyright (c) 2006-2015, JGraph Ltd\n * Copyright (c) 2006-2015, Gaudenz Alder\n */\n/**\n * Class: mxMouseEvent\n * \n * Base class for all mouse events in mxGraph. A listener for this event should\n * implement the following methods:\n * \n * (code)\n * graph.addMouseListener(\n * {\n *   mouseDown: function(sender, evt)\n *   {\n *     mxLog.debug('mouseDown');\n *   },\n *   mouseMove: function(sender, evt)\n *   {\n *     mxLog.debug('mouseMove');\n *   },\n *   mouseUp: function(sender, evt)\n *   {\n *     mxLog.debug('mouseUp');\n *   }\n * });\n * (end)\n * \n * Constructor: mxMouseEvent\n *\n * Constructs a new event object for the given arguments.\n * \n * Parameters:\n * \n * evt - Native mouse event.\n * state - Optional <mxCellState> under the mouse.\n * \n */\nfunction mxMouseEvent(evt, state)\n{\n\tthis.evt = evt;\n\tthis.state = state;\n\tthis.sourceState = state;\n};\n\n/**\n * Variable: consumed\n *\n * Holds the consumed state of this event.\n */\nmxMouseEvent.prototype.consumed = false;\n\n/**\n * Variable: evt\n *\n * Holds the inner event object.\n */\nmxMouseEvent.prototype.evt = null;\n\n/**\n * Variable: graphX\n *\n * Holds the x-coordinate of the event in the graph. This value is set in\n * <mxGraph.fireMouseEvent>.\n */\nmxMouseEvent.prototype.graphX = null;\n\n/**\n * Variable: graphY\n *\n * Holds the y-coordinate of the event in the graph. This value is set in\n * <mxGraph.fireMouseEvent>.\n */\nmxMouseEvent.prototype.graphY = null;\n\n/**\n * Variable: state\n *\n * Holds the optional <mxCellState> associated with this event.\n */\nmxMouseEvent.prototype.state = null;\n\n/**\n * Variable: sourceState\n * \n * Holds the <mxCellState> that was passed to the constructor. This can be\n * different from <state> depending on the result of <mxGraph.getEventState>.\n */\nmxMouseEvent.prototype.sourceState = null;\n\n/**\n * Function: getEvent\n * \n * Returns <evt>.\n */\nmxMouseEvent.prototype.getEvent = function()\n{\n\treturn this.evt;\n};\n\n/**\n * Function: getSource\n * \n * Returns the target DOM element using <mxEvent.getSource> for <evt>.\n */\nmxMouseEvent.prototype.getSource = function()\n{\n\treturn mxEvent.getSource(this.evt);\n};\n\n/**\n * Function: isSource\n * \n * Returns true if the given <mxShape> is the source of <evt>.\n */\nmxMouseEvent.prototype.isSource = function(shape)\n{\n\tif (shape != null)\n\t{\n\t\treturn mxUtils.isAncestorNode(shape.node, this.getSource());\n\t}\n\t\n\treturn false;\n};\n\n/**\n * Function: getX\n * \n * Returns <evt.clientX>.\n */\nmxMouseEvent.prototype.getX = function()\n{\n\treturn mxEvent.getClientX(this.getEvent());\n};\n\n/**\n * Function: getY\n * \n * Returns <evt.clientY>.\n */\nmxMouseEvent.prototype.getY = function()\n{\n\treturn mxEvent.getClientY(this.getEvent());\n};\n\n/**\n * Function: getGraphX\n * \n * Returns <graphX>.\n */\nmxMouseEvent.prototype.getGraphX = function()\n{\n\treturn this.graphX;\n};\n\n/**\n * Function: getGraphY\n * \n * Returns <graphY>.\n */\nmxMouseEvent.prototype.getGraphY = function()\n{\n\treturn this.graphY;\n};\n\n/**\n * Function: getState\n * \n * Returns <state>.\n */\nmxMouseEvent.prototype.getState = function()\n{\n\treturn this.state;\n};\n\n/**\n * Function: getCell\n * \n * Returns the <mxCell> in <state> is not null.\n */\nmxMouseEvent.prototype.getCell = function()\n{\n\tvar state = this.getState();\n\t\n\tif (state != null)\n\t{\n\t\treturn state.cell;\n\t}\n\t\n\treturn null;\n};\n\n/**\n * Function: isPopupTrigger\n *\n * Returns true if the event is a popup trigger.\n */\nmxMouseEvent.prototype.isPopupTrigger = function()\n{\n\treturn mxEvent.isPopupTrigger(this.getEvent());\n};\n\n/**\n * Function: isConsumed\n *\n * Returns <consumed>.\n */\nmxMouseEvent.prototype.isConsumed = function()\n{\n\treturn this.consumed;\n};\n\n/**\n * Function: consume\n *\n * Sets <consumed> to true and invokes preventDefault on the native event\n * if such a method is defined. This is used mainly to avoid the cursor from\n * being changed to a text cursor in Webkit. You can use the preventDefault\n * flag to disable this functionality.\n * \n * Parameters:\n * \n * preventDefault - Specifies if the native event should be canceled. Default\n * is true.\n */\nmxMouseEvent.prototype.consume = function(preventDefault)\n{\n\tpreventDefault = (preventDefault != null) ? preventDefault : true;\n\t\n\tif (preventDefault && this.evt.preventDefault)\n\t{\n\t\tthis.evt.preventDefault();\n\t}\n\n\t// Workaround for images being dragged in IE\n\t// Does not change returnValue in Opera\n\tif (mxClient.IS_IE)\n\t{\n\t\tthis.evt.returnValue = true;\n\t}\n\n\t// Sets local consumed state\n\tthis.consumed = true;\n};\n"
  },
  {
    "path": "static/cherry/drawio_demo/src/js/util/mxObjectIdentity.js",
    "content": "/**\n * Copyright (c) 2006-2015, JGraph Ltd\n * Copyright (c) 2006-2015, Gaudenz Alder\n */\nvar mxObjectIdentity =\n{\n\t/**\n\t * Class: mxObjectIdentity\n\t * \n\t * Identity for JavaScript objects and functions. This is implemented using\n\t * a simple incrementing counter which is stored in each object under\n\t * <FIELD_NAME>.\n\t * \n\t * The identity for an object does not change during its lifecycle.\n\t * \n\t * Variable: FIELD_NAME\n\t * \n\t * Name of the field to be used to store the object ID. Default is\n\t * <code>mxObjectId</code>.\n\t */\n\tFIELD_NAME: 'mxObjectId',\n\n\t/**\n\t * Variable: counter\n\t * \n\t * Current counter.\n\t */\n\tcounter: 0,\n\n\t/**\n\t * Function: get\n\t * \n\t * Returns the ID for the given object or function or null if no object\n\t * is specified.\n\t */\n\tget: function(obj)\n\t{\n\t\tif (obj != null)\n\t\t{\n\t\t\tif (obj[mxObjectIdentity.FIELD_NAME] == null)\n\t\t\t{\n\t\t\t\tif (typeof obj === 'object')\n\t\t\t\t{\n\t\t\t\t\tvar ctor = mxUtils.getFunctionName(obj.constructor);\n\t\t\t\t\tobj[mxObjectIdentity.FIELD_NAME] = ctor + '#' + mxObjectIdentity.counter++;\n\t\t\t\t}\n\t\t\t\telse if (typeof obj === 'function')\n\t\t\t\t{\n\t\t\t\t\tobj[mxObjectIdentity.FIELD_NAME] = 'Function#' + mxObjectIdentity.counter++;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\treturn obj[mxObjectIdentity.FIELD_NAME];\n\t\t}\n\t\t\n\t\treturn null;\n\t},\n\n\t/**\n\t * Function: clear\n\t * \n\t * Deletes the ID from the given object or function.\n\t */\n\tclear: function(obj)\n\t{\n\t\tif (typeof(obj) === 'object' || typeof obj === 'function')\n\t\t{\n\t\t\tdelete obj[mxObjectIdentity.FIELD_NAME];\n\t\t}\n\t}\n\n};\n"
  },
  {
    "path": "static/cherry/drawio_demo/src/js/util/mxPanningManager.js",
    "content": "/**\n * Copyright (c) 2006-2015, JGraph Ltd\n * Copyright (c) 2006-2015, Gaudenz Alder\n */\n/**\n * Class: mxPanningManager\n *\n * Implements a handler for panning.\n */\nfunction mxPanningManager(graph)\n{\n\tthis.thread = null;\n\tthis.active = false;\n\tthis.tdx = 0;\n\tthis.tdy = 0;\n\tthis.t0x = 0;\n\tthis.t0y = 0;\n\tthis.dx = 0;\n\tthis.dy = 0;\n\tthis.scrollbars = false;\n\tthis.scrollLeft = 0;\n\tthis.scrollTop = 0;\n\t\n\tthis.mouseListener =\n\t{\n\t    mouseDown: function(sender, me) { },\n\t    mouseMove: function(sender, me) { },\n\t    mouseUp: mxUtils.bind(this, function(sender, me)\n\t    {\n\t    \tif (this.active)\n\t    \t{\n\t    \t\tthis.stop();\n\t    \t}\n\t    })\n\t};\n\t\n\tgraph.addMouseListener(this.mouseListener);\n\t\n\tthis.mouseUpListener = mxUtils.bind(this, function()\n\t{\n\t    \tif (this.active)\n\t    \t{\n\t    \t\tthis.stop();\n\t    \t}\n\t});\n\t\n\t// Stops scrolling on every mouseup anywhere in the document\n\tmxEvent.addListener(document, 'mouseup', this.mouseUpListener);\n\t\n\tvar createThread = mxUtils.bind(this, function()\n\t{\n\t    \tthis.scrollbars = mxUtils.hasScrollbars(graph.container);\n\t    \tthis.scrollLeft = graph.container.scrollLeft;\n\t    \tthis.scrollTop = graph.container.scrollTop;\n\t\n\t    \treturn window.setInterval(mxUtils.bind(this, function()\n\t\t{\n\t\t\tthis.tdx -= this.dx;\n\t\t\tthis.tdy -= this.dy;\n\n\t\t\tif (this.scrollbars)\n\t\t\t{\n\t\t\t\tvar left = -graph.container.scrollLeft - Math.ceil(this.dx);\n\t\t\t\tvar top = -graph.container.scrollTop - Math.ceil(this.dy);\n\t\t\t\tgraph.panGraph(left, top);\n\t\t\t\tgraph.panDx = this.scrollLeft - graph.container.scrollLeft;\n\t\t\t\tgraph.panDy = this.scrollTop - graph.container.scrollTop;\n\t\t\t\tgraph.fireEvent(new mxEventObject(mxEvent.PAN));\n\t\t\t\t// TODO: Implement graph.autoExtend\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tgraph.panGraph(this.getDx(), this.getDy());\n\t\t\t}\n\t\t}), this.delay);\n\t});\n\t\n\tthis.isActive = function()\n\t{\n\t\treturn active;\n\t};\n\t\n\tthis.getDx = function()\n\t{\n\t\treturn Math.round(this.tdx);\n\t};\n\t\n\tthis.getDy = function()\n\t{\n\t\treturn Math.round(this.tdy);\n\t};\n\t\n\tthis.start = function()\n\t{\n\t\tthis.t0x = graph.view.translate.x;\n\t\tthis.t0y = graph.view.translate.y;\n\t\tthis.active = true;\n\t};\n\t\n\tthis.panTo = function(x, y, w, h)\n\t{\n\t\tif (!this.active)\n\t\t{\n\t\t\tthis.start();\n\t\t}\n\t\t\n    \tthis.scrollLeft = graph.container.scrollLeft;\n    \tthis.scrollTop = graph.container.scrollTop;\n\t\t\n\t\tw = (w != null) ? w : 0;\n\t\th = (h != null) ? h : 0;\n\t\t\n\t\tvar c = graph.container;\n\t\tthis.dx = x + w - c.scrollLeft - c.clientWidth;\n\t\t\n\t\tif (this.dx < 0 && Math.abs(this.dx) < this.border)\n\t\t{\n\t\t\tthis.dx = this.border + this.dx;\n\t\t}\n\t\telse if (this.handleMouseOut)\n\t\t{\n\t\t\tthis.dx = Math.max(this.dx, 0);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tthis.dx = 0;\n\t\t}\n\t\t\n\t\tif (this.dx == 0)\n\t\t{\n\t\t\tthis.dx = x - c.scrollLeft;\n\t\t\t\n\t\t\tif (this.dx > 0 && this.dx < this.border)\n\t\t\t{\n\t\t\t\tthis.dx = this.dx - this.border;\n\t\t\t}\n\t\t\telse if (this.handleMouseOut)\n\t\t\t{\n\t\t\t\tthis.dx = Math.min(0, this.dx);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tthis.dx = 0;\n\t\t\t}\n\t\t}\n\t\t\n\t\tthis.dy = y + h - c.scrollTop - c.clientHeight;\n\n\t\tif (this.dy < 0 && Math.abs(this.dy) < this.border)\n\t\t{\n\t\t\tthis.dy = this.border + this.dy;\n\t\t}\n\t\telse if (this.handleMouseOut)\n\t\t{\n\t\t\tthis.dy = Math.max(this.dy, 0);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tthis.dy = 0;\n\t\t}\n\t\t\n\t\tif (this.dy == 0)\n\t\t{\n\t\t\tthis.dy = y - c.scrollTop;\n\t\t\t\n\t\t\tif (this.dy > 0 && this.dy < this.border)\n\t\t\t{\n\t\t\t\tthis.dy = this.dy - this.border;\n\t\t\t}\n\t\t\telse if (this.handleMouseOut)\n\t\t\t{\n\t\t\t\tthis.dy = Math.min(0, this.dy);\n\t\t\t} \n\t\t\telse\n\t\t\t{\n\t\t\t\tthis.dy = 0;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (this.dx != 0 || this.dy != 0)\n\t\t{\n\t\t\tthis.dx *= this.damper;\n\t\t\tthis.dy *= this.damper;\n\t\t\t\n\t\t\tif (this.thread == null)\n\t\t\t{\n\t\t\t\tthis.thread = createThread();\n\t\t\t}\n\t\t}\n\t\telse if (this.thread != null)\n\t\t{\n\t\t\twindow.clearInterval(this.thread);\n\t\t\tthis.thread = null;\n\t\t}\n\t};\n\t\n\tthis.stop = function()\n\t{\n\t\tif (this.active)\n\t\t{\n\t\t\tthis.active = false;\n\t\t\n\t\t\tif (this.thread != null)\n\t    \t{\n\t\t\t\twindow.clearInterval(this.thread);\n\t\t\t\tthis.thread = null;\n\t    \t}\n\t\t\t\n\t\t\tthis.tdx = 0;\n\t\t\tthis.tdy = 0;\n\t\t\t\n\t\t\tif (!this.scrollbars)\n\t\t\t{\n\t\t\t\tvar px = graph.panDx;\n\t\t\t\tvar py = graph.panDy;\n\t\t    \t\n\t\t    \tif (px != 0 || py != 0)\n\t\t    \t{\n\t\t    \t\tgraph.panGraph(0, 0);\n\t\t\t    \tgraph.view.setTranslate(this.t0x + px / graph.view.scale, this.t0y + py / graph.view.scale);\n\t\t    \t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tgraph.panDx = 0;\n\t\t\t\tgraph.panDy = 0;\n\t\t\t\tgraph.fireEvent(new mxEventObject(mxEvent.PAN));\n\t\t\t}\n\t\t}\n\t};\n\t\n\tthis.destroy = function()\n\t{\n\t\tgraph.removeMouseListener(this.mouseListener);\n\t\tmxEvent.removeListener(document, 'mouseup', this.mouseUpListener);\n\t};\n};\n\n/**\n * Variable: damper\n * \n * Damper value for the panning. Default is 1/6.\n */\nmxPanningManager.prototype.damper = 1/6;\n\n/**\n * Variable: delay\n * \n * Delay in milliseconds for the panning. Default is 10.\n */\nmxPanningManager.prototype.delay = 10;\n\n/**\n * Variable: handleMouseOut\n * \n * Specifies if mouse events outside of the component should be handled. Default is true. \n */\nmxPanningManager.prototype.handleMouseOut = true;\n\n/**\n * Variable: border\n * \n * Border to handle automatic panning inside the component. Default is 0 (disabled).\n */\nmxPanningManager.prototype.border = 0;\n"
  },
  {
    "path": "static/cherry/drawio_demo/src/js/util/mxPoint.js",
    "content": "/**\n * Copyright (c) 2006-2015, JGraph Ltd\n * Copyright (c) 2006-2015, Gaudenz Alder\n */\n/**\n * Class: mxPoint\n *\n * Implements a 2-dimensional vector with double precision coordinates.\n * \n * Constructor: mxPoint\n *\n * Constructs a new point for the optional x and y coordinates. If no\n * coordinates are given, then the default values for <x> and <y> are used.\n */\nfunction mxPoint(x, y)\n{\n\tthis.x = (x != null) ? x : 0;\n\tthis.y = (y != null) ? y : 0;\n};\n\n/**\n * Variable: x\n *\n * Holds the x-coordinate of the point. Default is 0.\n */\nmxPoint.prototype.x = null;\n\n/**\n * Variable: y\n *\n * Holds the y-coordinate of the point. Default is 0.\n */\nmxPoint.prototype.y = null;\n\n/**\n * Function: equals\n * \n * Returns true if the given object equals this point.\n */\nmxPoint.prototype.equals = function(obj)\n{\n\treturn obj != null && obj.x == this.x && obj.y == this.y;\n};\n\n/**\n * Function: clone\n *\n * Returns a clone of this <mxPoint>.\n */\nmxPoint.prototype.clone = function()\n{\n\t// Handles subclasses as well\n\treturn mxUtils.clone(this);\n};\n"
  },
  {
    "path": "static/cherry/drawio_demo/src/js/util/mxPopupMenu.js",
    "content": "/**\n * Copyright (c) 2006-2015, JGraph Ltd\n * Copyright (c) 2006-2015, Gaudenz Alder\n */\n/**\n * Class: mxPopupMenu\n * \n * Basic popup menu. To add a vertical scrollbar to a given submenu, the\n * following code can be used.\n * \n * (code)\n * var mxPopupMenuShowMenu = mxPopupMenu.prototype.showMenu;\n * mxPopupMenu.prototype.showMenu = function()\n * {\n *   mxPopupMenuShowMenu.apply(this, arguments);\n *   \n *   this.div.style.overflowY = 'auto';\n *   this.div.style.overflowX = 'hidden';\n *   this.div.style.maxHeight = '160px';\n * };\n * (end)\n * \n * Constructor: mxPopupMenu\n * \n * Constructs a popupmenu.\n * \n * Event: mxEvent.SHOW\n *\n * Fires after the menu has been shown in <popup>.\n */\nfunction mxPopupMenu(factoryMethod)\n{\n\tthis.factoryMethod = factoryMethod;\n\t\n\tif (factoryMethod != null)\n\t{\n\t\tthis.init();\n\t}\n};\n\n/**\n * Extends mxEventSource.\n */\nmxPopupMenu.prototype = new mxEventSource();\nmxPopupMenu.prototype.constructor = mxPopupMenu;\n\n/**\n * Variable: submenuImage\n * \n * URL of the image to be used for the submenu icon.\n */\nmxPopupMenu.prototype.submenuImage = mxClient.imageBasePath + '/submenu.gif';\n\n/**\n * Variable: zIndex\n * \n * Specifies the zIndex for the popupmenu and its shadow. Default is 1006.\n */\nmxPopupMenu.prototype.zIndex = 10006;\n\n/**\n * Variable: factoryMethod\n * \n * Function that is used to create the popup menu. The function takes the\n * current panning handler, the <mxCell> under the mouse and the mouse\n * event that triggered the call as arguments.\n */\nmxPopupMenu.prototype.factoryMethod = null;\n\n/**\n * Variable: useLeftButtonForPopup\n * \n * Specifies if popupmenus should be activated by clicking the left mouse\n * button. Default is false.\n */\nmxPopupMenu.prototype.useLeftButtonForPopup = false;\n\n/**\n * Variable: enabled\n * \n * Specifies if events are handled. Default is true.\n */\nmxPopupMenu.prototype.enabled = true;\n\n/**\n * Variable: itemCount\n * \n * Contains the number of times <addItem> has been called for a new menu.\n */\nmxPopupMenu.prototype.itemCount = 0;\n\n/**\n * Variable: autoExpand\n * \n * Specifies if submenus should be expanded on mouseover. Default is false.\n */\nmxPopupMenu.prototype.autoExpand = false;\n\n/**\n * Variable: smartSeparators\n * \n * Specifies if separators should only be added if a menu item follows them.\n * Default is false.\n */\nmxPopupMenu.prototype.smartSeparators = false;\n\n/**\n * Variable: labels\n * \n * Specifies if any labels should be visible. Default is true.\n */\nmxPopupMenu.prototype.labels = true;\n\n/**\n * Function: init\n * \n * Initializes the shapes required for this vertex handler.\n */\nmxPopupMenu.prototype.init = function()\n{\n\t// Adds the inner table\n\tthis.table = document.createElement('table');\n\tthis.table.className = 'mxPopupMenu';\n\t\n\tthis.tbody = document.createElement('tbody');\n\tthis.table.appendChild(this.tbody);\n\n\t// Adds the outer div\n\tthis.div = document.createElement('div');\n\tthis.div.className = 'mxPopupMenu';\n\tthis.div.style.display = 'inline';\n\tthis.div.style.zIndex = this.zIndex;\n\tthis.div.appendChild(this.table);\n\n\t// Disables the context menu on the outer div\n\tmxEvent.disableContextMenu(this.div);\n};\n\n/**\n * Function: isEnabled\n * \n * Returns true if events are handled. This implementation\n * returns <enabled>.\n */\nmxPopupMenu.prototype.isEnabled = function()\n{\n\treturn this.enabled;\n};\n\t\n/**\n * Function: setEnabled\n * \n * Enables or disables event handling. This implementation\n * updates <enabled>.\n */\nmxPopupMenu.prototype.setEnabled = function(enabled)\n{\n\tthis.enabled = enabled;\n};\n\n/**\n * Function: isPopupTrigger\n * \n * Returns true if the given event is a popupmenu trigger for the optional\n * given cell.\n * \n * Parameters:\n * \n * me - <mxMouseEvent> that represents the mouse event.\n */\nmxPopupMenu.prototype.isPopupTrigger = function(me)\n{\n\treturn me.isPopupTrigger() || (this.useLeftButtonForPopup && mxEvent.isLeftMouseButton(me.getEvent()));\n};\n\n/**\n * Function: addItem\n * \n * Adds the given item to the given parent item. If no parent item is specified\n * then the item is added to the top-level menu. The return value may be used\n * as the parent argument, ie. as a submenu item. The return value is the table\n * row that represents the item.\n * \n * Paramters:\n * \n * title - String that represents the title of the menu item.\n * image - Optional URL for the image icon.\n * funct - Function associated that takes a mouseup or touchend event.\n * parent - Optional item returned by <addItem>.\n * iconCls - Optional string that represents the CSS class for the image icon.\n * IconsCls is ignored if image is given.\n * enabled - Optional boolean indicating if the item is enabled. Default is true.\n * active - Optional boolean indicating if the menu should implement any event handling.\n * Default is true.\n */\nmxPopupMenu.prototype.addItem = function(title, image, funct, parent, iconCls, enabled, active)\n{\n\tparent = parent || this;\n\tthis.itemCount++;\n\t\n\t// Smart separators only added if element contains items\n\tif (parent.willAddSeparator)\n\t{\n\t\tif (parent.containsItems)\n\t\t{\n\t\t\tthis.addSeparator(parent, true);\n\t\t}\n\n\t\tparent.willAddSeparator = false;\n\t}\n\n\tparent.containsItems = true;\n\tvar tr = document.createElement('tr');\n\ttr.className = 'mxPopupMenuItem';\n\tvar col1 = document.createElement('td');\n\tcol1.className = 'mxPopupMenuIcon';\n\n\t// Adds the given image into the first column\n\tif (image != null)\n\t{\n\t\tvar img = document.createElement('img');\n\t\timg.src = image;\n\t\tcol1.appendChild(img);\n\t}\n\telse if (iconCls != null)\n\t{\n\t\tvar div = document.createElement('div');\n\t\tdiv.className = iconCls;\n\t\tcol1.appendChild(div);\n\t}\n\t\n\ttr.appendChild(col1);\n\t\n\tif (this.labels)\n\t{\n\t\tvar col2 = document.createElement('td');\n\t\tcol2.className = 'mxPopupMenuItem' +\n\t\t\t((enabled != null && !enabled) ? ' mxDisabled' : '');\n\t\t\n\t\tmxUtils.write(col2, title);\n\t\tcol2.align = 'left';\n\t\ttr.appendChild(col2);\n\t\n\t\tvar col3 = document.createElement('td');\n\t\tcol3.className = 'mxPopupMenuItem' +\n\t\t\t((enabled != null && !enabled) ? ' mxDisabled' : '');\n\t\tcol3.style.paddingRight = '6px';\n\t\tcol3.style.textAlign = 'right';\n\t\t\n\t\ttr.appendChild(col3);\n\t\t\n\t\tif (parent.div == null)\n\t\t{\n\t\t\tthis.createSubmenu(parent);\n\t\t}\n\t}\n\t\n\tparent.tbody.appendChild(tr);\n\n\tif (active != false && enabled != false)\n\t{\n\t\tvar currentSelection = null;\n\t\t\n\t\tmxEvent.addGestureListeners(tr,\n\t\t\tmxUtils.bind(this, function(evt)\n\t\t\t{\n\t\t\t\tthis.eventReceiver = tr;\n\t\t\t\t\n\t\t\t\tif (parent.activeRow != tr && parent.activeRow != parent)\n\t\t\t\t{\n\t\t\t\t\tif (parent.activeRow != null && parent.activeRow.div.parentNode != null)\n\t\t\t\t\t{\n\t\t\t\t\t\tthis.hideSubmenu(parent);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif (tr.div != null)\n\t\t\t\t\t{\n\t\t\t\t\t\tthis.showSubmenu(parent, tr);\n\t\t\t\t\t\tparent.activeRow = tr;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// Workaround for lost current selection in page because of focus in IE\n\t\t\t\tif (mxClient.IS_QUIRKS || document.documentMode == 8)\n\t\t\t\t{\n\t\t\t\t\tcurrentSelection = document.selection.createRange();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tmxEvent.consume(evt);\n\t\t\t}),\n\t\t\tmxUtils.bind(this, function(evt)\n\t\t\t{\n\t\t\t\tif (parent.activeRow != tr && parent.activeRow != parent)\n\t\t\t\t{\n\t\t\t\t\tif (parent.activeRow != null && parent.activeRow.div.parentNode != null)\n\t\t\t\t\t{\n\t\t\t\t\t\tthis.hideSubmenu(parent);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif (this.autoExpand && tr.div != null)\n\t\t\t\t\t{\n\t\t\t\t\t\tthis.showSubmenu(parent, tr);\n\t\t\t\t\t\tparent.activeRow = tr;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\n\t\t\t\t// Sets hover style because TR in IE doesn't have hover\n\t\t\t\ttr.className = 'mxPopupMenuItemHover';\n\t\t\t}),\n\t\t\tmxUtils.bind(this, function(evt)\n\t\t\t{\n\t\t\t\t// EventReceiver avoids clicks on a submenu item\n\t\t\t\t// which has just been shown in the mousedown\n\t\t\t\tif (this.eventReceiver == tr)\n\t\t\t\t{\n\t\t\t\t\tif (parent.activeRow != tr)\n\t\t\t\t\t{\n\t\t\t\t\t\tthis.hideMenu();\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// Workaround for lost current selection in page because of focus in IE\n\t\t\t\t\tif (currentSelection != null)\n\t\t\t\t\t{\n\t\t\t\t\t\t// Workaround for \"unspecified error\" in IE8 standards\n\t\t\t\t\t\ttry\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcurrentSelection.select();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcatch (e)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t// ignore\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tcurrentSelection = null;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif (funct != null)\n\t\t\t\t\t{\n\t\t\t\t\t\tfunct(evt);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tthis.eventReceiver = null;\n\t\t\t\tmxEvent.consume(evt);\n\t\t\t})\n\t\t);\n\t\n\t\t// Resets hover style because TR in IE doesn't have hover\n\t\tmxEvent.addListener(tr, 'mouseout',\n\t\t\tmxUtils.bind(this, function(evt)\n\t\t\t{\n\t\t\t\ttr.className = 'mxPopupMenuItem';\n\t\t\t})\n\t\t);\n\t}\n\t\n\treturn tr;\n};\n\n/**\n * Adds a checkmark to the given menuitem.\n */\nmxPopupMenu.prototype.addCheckmark = function(item, img)\n{\n\tvar td = item.firstChild.nextSibling;\n\ttd.style.backgroundImage = 'url(\\'' + img + '\\')';\n\ttd.style.backgroundRepeat = 'no-repeat';\n\ttd.style.backgroundPosition = '2px 50%';\n};\n\n/**\n * Function: createSubmenu\n * \n * Creates the nodes required to add submenu items inside the given parent\n * item. This is called in <addItem> if a parent item is used for the first\n * time. This adds various DOM nodes and a <submenuImage> to the parent.\n * \n * Parameters:\n * \n * parent - An item returned by <addItem>.\n */\nmxPopupMenu.prototype.createSubmenu = function(parent)\n{\n\tparent.table = document.createElement('table');\n\tparent.table.className = 'mxPopupMenu';\n\n\tparent.tbody = document.createElement('tbody');\n\tparent.table.appendChild(parent.tbody);\n\n\tparent.div = document.createElement('div');\n\tparent.div.className = 'mxPopupMenu';\n\n\tparent.div.style.position = 'absolute';\n\tparent.div.style.display = 'inline';\n\tparent.div.style.zIndex = this.zIndex;\n\t\n\tparent.div.appendChild(parent.table);\n\t\n\tvar img = document.createElement('img');\n\timg.setAttribute('src', this.submenuImage);\n\t\n\t// Last column of the submenu item in the parent menu\n\ttd = parent.firstChild.nextSibling.nextSibling;\n\ttd.appendChild(img);\n};\n\n/**\n * Function: showSubmenu\n * \n * Shows the submenu inside the given parent row.\n */\nmxPopupMenu.prototype.showSubmenu = function(parent, row)\n{\n\tif (row.div != null)\n\t{\n\t\trow.div.style.left = (parent.div.offsetLeft +\n\t\t\trow.offsetLeft+row.offsetWidth - 1) + 'px';\n\t\trow.div.style.top = (parent.div.offsetTop+row.offsetTop) + 'px';\n\t\tdocument.body.appendChild(row.div);\n\t\t\n\t\t// Moves the submenu to the left side if there is no space\n\t\tvar left = parseInt(row.div.offsetLeft);\n\t\tvar width = parseInt(row.div.offsetWidth);\n\t\tvar offset = mxUtils.getDocumentScrollOrigin(document);\n\t\t\n\t\tvar b = document.body;\n\t\tvar d = document.documentElement;\n\t\t\n\t\tvar right = offset.x + (b.clientWidth || d.clientWidth);\n\t\t\n\t\tif (left + width > right)\n\t\t{\n\t\t\trow.div.style.left = Math.max(0, (parent.div.offsetLeft - width + ((mxClient.IS_IE) ? 6 : -6))) + 'px';\n\t\t}\n\t\t\n\t\tmxUtils.fit(row.div);\n\t}\n};\n\n/**\n * Function: addSeparator\n * \n * Adds a horizontal separator in the given parent item or the top-level menu\n * if no parent is specified.\n * \n * Parameters:\n * \n * parent - Optional item returned by <addItem>.\n * force - Optional boolean to ignore <smartSeparators>. Default is false.\n */\nmxPopupMenu.prototype.addSeparator = function(parent, force)\n{\n\tparent = parent || this;\n\t\n\tif (this.smartSeparators && !force)\n\t{\n\t\tparent.willAddSeparator = true;\n\t}\n\telse if (parent.tbody != null)\n\t{\n\t\tparent.willAddSeparator = false;\n\t\tvar tr = document.createElement('tr');\n\t\t\n\t\tvar col1 = document.createElement('td');\n\t\tcol1.className = 'mxPopupMenuIcon';\n\t\tcol1.style.padding = '0 0 0 0px';\n\t\t\n\t\ttr.appendChild(col1);\n\t\t\n\t\tvar col2 = document.createElement('td');\n\t\tcol2.style.padding = '0 0 0 0px';\n\t\tcol2.setAttribute('colSpan', '2');\n\t\n\t\tvar hr = document.createElement('hr');\n\t\thr.setAttribute('size', '1');\n\t\tcol2.appendChild(hr);\n\t\t\n\t\ttr.appendChild(col2);\n\t\t\n\t\tparent.tbody.appendChild(tr);\n\t}\n};\n\n/**\n * Function: popup\n * \n * Shows the popup menu for the given event and cell.\n * \n * Example:\n * \n * (code)\n * graph.panningHandler.popup = function(x, y, cell, evt)\n * {\n *   mxUtils.alert('Hello, World!');\n * }\n * (end)\n */\nmxPopupMenu.prototype.popup = function(x, y, cell, evt)\n{\n\tif (this.div != null && this.tbody != null && this.factoryMethod != null)\n\t{\n\t\tthis.div.style.left = x + 'px';\n\t\tthis.div.style.top = y + 'px';\n\t\t\n\t\t// Removes all child nodes from the existing menu\n\t\twhile (this.tbody.firstChild != null)\n\t\t{\n\t\t\tmxEvent.release(this.tbody.firstChild);\n\t\t\tthis.tbody.removeChild(this.tbody.firstChild);\n\t\t}\n\t\t\n\t\tthis.itemCount = 0;\n\t\tthis.factoryMethod(this, cell, evt);\n\t\t\n\t\tif (this.itemCount > 0)\n\t\t{\n\t\t\tthis.showMenu();\n\t\t\tthis.fireEvent(new mxEventObject(mxEvent.SHOW));\n\t\t}\n\t}\n};\n\n/**\n * Function: isMenuShowing\n * \n * Returns true if the menu is showing.\n */\nmxPopupMenu.prototype.isMenuShowing = function()\n{\n\treturn this.div != null && this.div.parentNode == document.body;\n};\n\n/**\n * Function: showMenu\n * \n * Shows the menu.\n */\nmxPopupMenu.prototype.showMenu = function()\n{\n\t// Disables filter-based shadow in IE9 standards mode\n\tif (document.documentMode >= 9)\n\t{\n\t\tthis.div.style.filter = 'none';\n\t}\n\t\n\t// Fits the div inside the viewport\n\tdocument.body.appendChild(this.div);\n\tmxUtils.fit(this.div);\n};\n\n/**\n * Function: hideMenu\n * \n * Removes the menu and all submenus.\n */\nmxPopupMenu.prototype.hideMenu = function()\n{\n\tif (this.div != null)\n\t{\n\t\tif (this.div.parentNode != null)\n\t\t{\n\t\t\tthis.div.parentNode.removeChild(this.div);\n\t\t}\n\t\t\n\t\tthis.hideSubmenu(this);\n\t\tthis.containsItems = false;\n\t\tthis.fireEvent(new mxEventObject(mxEvent.HIDE));\n\t}\n};\n\n/**\n * Function: hideSubmenu\n * \n * Removes all submenus inside the given parent.\n * \n * Parameters:\n * \n * parent - An item returned by <addItem>.\n */\nmxPopupMenu.prototype.hideSubmenu = function(parent)\n{\n\tif (parent.activeRow != null)\n\t{\n\t\tthis.hideSubmenu(parent.activeRow);\n\t\t\n\t\tif (parent.activeRow.div.parentNode != null)\n\t\t{\n\t\t\tparent.activeRow.div.parentNode.removeChild(parent.activeRow.div);\n\t\t}\n\t\t\n\t\tparent.activeRow = null;\n\t}\n};\n\n/**\n * Function: destroy\n * \n * Destroys the handler and all its resources and DOM nodes.\n */\nmxPopupMenu.prototype.destroy = function()\n{\n\tif (this.div != null)\n\t{\n\t\tmxEvent.release(this.div);\n\t\t\n\t\tif (this.div.parentNode != null)\n\t\t{\n\t\t\tthis.div.parentNode.removeChild(this.div);\n\t\t}\n\t\t\n\t\tthis.div = null;\n\t}\n};\n"
  },
  {
    "path": "static/cherry/drawio_demo/src/js/util/mxRectangle.js",
    "content": "/**\n * Copyright (c) 2006-2015, JGraph Ltd\n * Copyright (c) 2006-2015, Gaudenz Alder\n */\n/**\n * Class: mxRectangle\n *\n * Extends <mxPoint> to implement a 2-dimensional rectangle with double\n * precision coordinates.\n * \n * Constructor: mxRectangle\n *\n * Constructs a new rectangle for the optional parameters. If no parameters\n * are given then the respective default values are used.\n */\nfunction mxRectangle(x, y, width, height)\n{\n\tmxPoint.call(this, x, y);\n\n\tthis.width = (width != null) ? width : 0;\n\tthis.height = (height != null) ? height : 0;\n};\n\n/**\n * Extends mxPoint.\n */\nmxRectangle.prototype = new mxPoint();\nmxRectangle.prototype.constructor = mxRectangle;\n\n/**\n * Variable: width\n *\n * Holds the width of the rectangle. Default is 0.\n */\nmxRectangle.prototype.width = null;\n\n/**\n * Variable: height\n *\n * Holds the height of the rectangle. Default is 0.\n */\nmxRectangle.prototype.height = null;\n\n/**\n * Function: setRect\n * \n * Sets this rectangle to the specified values\n */\nmxRectangle.prototype.setRect = function(x, y, w, h)\n{\n    this.x = x;\n    this.y = y;\n    this.width = w;\n    this.height = h;\n};\n\n/**\n * Function: getCenterX\n * \n * Returns the x-coordinate of the center point.\n */\nmxRectangle.prototype.getCenterX = function ()\n{\n\treturn this.x + this.width/2;\n};\n\n/**\n * Function: getCenterY\n * \n * Returns the y-coordinate of the center point.\n */\nmxRectangle.prototype.getCenterY = function ()\n{\n\treturn this.y + this.height/2;\n};\n\n/**\n * Function: add\n *\n * Adds the given rectangle to this rectangle.\n */\nmxRectangle.prototype.add = function(rect)\n{\n\tif (rect != null)\n\t{\n\t\tvar minX = Math.min(this.x, rect.x);\n\t\tvar minY = Math.min(this.y, rect.y);\n\t\tvar maxX = Math.max(this.x + this.width, rect.x + rect.width);\n\t\tvar maxY = Math.max(this.y + this.height, rect.y + rect.height);\n\t\t\n\t\tthis.x = minX;\n\t\tthis.y = minY;\n\t\tthis.width = maxX - minX;\n\t\tthis.height = maxY - minY;\n\t}\n};\n\n/**\n * Function: intersect\n * \n * Changes this rectangle to where it overlaps with the given rectangle.\n */\nmxRectangle.prototype.intersect = function(rect)\n{\n\tif (rect != null)\n\t{\n\t\tvar r1 = this.x + this.width;\n\t\tvar r2 = rect.x + rect.width;\n\t\t\n\t\tvar b1 = this.y + this.height;\n\t\tvar b2 = rect.y + rect.height;\n\t\t\n\t\tthis.x = Math.max(this.x, rect.x);\n\t\tthis.y = Math.max(this.y, rect.y);\n\t\tthis.width = Math.min(r1, r2) - this.x;\n\t\tthis.height = Math.min(b1, b2) - this.y;\n\t}\n};\n\n/**\n * Function: grow\n *\n * Grows the rectangle by the given amount, that is, this method subtracts\n * the given amount from the x- and y-coordinates and adds twice the amount\n * to the width and height.\n */\nmxRectangle.prototype.grow = function(amount)\n{\n\tthis.x -= amount;\n\tthis.y -= amount;\n\tthis.width += 2 * amount;\n\tthis.height += 2 * amount;\n};\n\n/**\n * Function: getPoint\n * \n * Returns the top, left corner as a new <mxPoint>.\n */\nmxRectangle.prototype.getPoint = function()\n{\n\treturn new mxPoint(this.x, this.y);\n};\n\n/**\n * Function: rotate90\n * \n * Rotates this rectangle by 90 degree around its center point.\n */\nmxRectangle.prototype.rotate90 = function()\n{\n\tvar t = (this.width - this.height) / 2;\n\tthis.x += t;\n\tthis.y -= t;\n\tvar tmp = this.width;\n\tthis.width = this.height;\n\tthis.height = tmp;\n};\n\n/**\n * Function: equals\n * \n * Returns true if the given object equals this rectangle.\n */\nmxRectangle.prototype.equals = function(obj)\n{\n\treturn obj != null && obj.x == this.x && obj.y == this.y &&\n\t\tobj.width == this.width && obj.height == this.height;\n};\n\n/**\n * Function: fromRectangle\n * \n * Returns a new <mxRectangle> which is a copy of the given rectangle.\n */\nmxRectangle.fromRectangle = function(rect)\n{\n\treturn new mxRectangle(rect.x, rect.y, rect.width, rect.height);\n};\n"
  },
  {
    "path": "static/cherry/drawio_demo/src/js/util/mxResources.js",
    "content": "/**\n * Copyright (c) 2006-2016, JGraph Ltd\n * Copyright (c) 2006-2016, Gaudenz Alder\n */\nvar mxResources =\n{\n\t/**\n\t * Class: mxResources\n\t * \n\t * Implements internationalization. You can provide any number of \n\t * resource files on the server using the following format for the \n\t * filename: name[-en].properties. The en stands for any lowercase \n\t * 2-character language shortcut (eg. de for german, fr for french).\n\t *\n\t * If the optional language extension is omitted, then the file is used as a \n\t * default resource which is loaded in all cases. If a properties file for a \n\t * specific language exists, then it is used to override the settings in the \n\t * default resource. All entries in the file are of the form key=value. The\n\t * values may then be accessed in code via <get>. Lines without \n\t * equal signs in the properties files are ignored.\n\t *\n\t * Resource files may either be added programmatically using\n\t * <add> or via a resource tag in the UI section of the \n\t * editor configuration file, eg:\n\t * \n\t * (code)\n\t * <mxEditor>\n\t *   <ui>\n\t *     <resource basename=\"examples/resources/mxWorkflow\"/>\n\t * (end)\n\t * \n\t * The above element will load examples/resources/mxWorkflow.properties as well\n\t * as the language specific file for the current language, if it exists.\n\t * \n\t * Values may contain placeholders of the form {1}...{n} where each placeholder\n\t * is replaced with the value of the corresponding array element in the params\n\t * argument passed to <mxResources.get>. The placeholder {1} maps to the first\n\t * element in the array (at index 0).\n\t * \n\t * See <mxClient.language> for more information on specifying the default\n\t * language or disabling all loading of resources.\n\t * \n\t * Lines that start with a # sign will be ignored.\n\t * \n\t * Special characters\n\t * \n\t * To use unicode characters, use the standard notation (eg. \\u8fd1) or %u as a\n\t * prefix (eg. %u20AC will display a Euro sign). For normal hex encoded strings,\n\t * use % as a prefix, eg. %F6 will display a \"o umlaut\" (&ouml;).\n\t * \n\t * See <resourcesEncoded> to disable this. If you disable this, make sure that\n\t * your files are UTF-8 encoded.\n\t * \n\t * Asynchronous loading\n\t * \n\t * By default, the core adds two resource files synchronously at load time.\n\t * To load these files asynchronously, set <mxLoadResources> to false\n\t * before loading mxClient.js and use <mxResources.loadResources> instead.\n\t * \n\t * Variable: resources\n\t * \n\t * Object that maps from keys to values.\n\t */\n\tresources: {},\n\n\t/**\n\t * Variable: extension\n\t * \n\t * Specifies the extension used for language files. Default is <mxResourceExtension>.\n\t */\n\textension: mxResourceExtension,\n\n\t/**\n\t * Variable: resourcesEncoded\n\t * \n\t * Specifies whether or not values in resource files are encoded with \\u or\n\t * percentage. Default is false.\n\t */\n\tresourcesEncoded: false,\n\n\t/**\n\t * Variable: loadDefaultBundle\n\t * \n\t * Specifies if the default file for a given basename should be loaded.\n\t * Default is true.\n\t */\n\tloadDefaultBundle: true,\n\n\t/**\n\t * Variable: loadDefaultBundle\n\t * \n\t * Specifies if the specific language file file for a given basename should\n\t * be loaded. Default is true.\n\t */\n\tloadSpecialBundle: true,\n\n\t/**\n\t * Function: isLanguageSupported\n\t * \n\t * Hook for subclassers to disable support for a given language. This\n\t * implementation returns true if lan is in <mxClient.languages>.\n\t * \n\t * Parameters:\n\t *\n\t * lan - The current language.\n\t */\n\tisLanguageSupported: function(lan)\n\t{\n\t\tif (mxClient.languages != null)\n\t\t{\n\t\t\treturn mxUtils.indexOf(mxClient.languages, lan) >= 0;\n\t\t}\n\t\t\n\t\treturn true;\n\t},\n\n\t/**\n\t * Function: getDefaultBundle\n\t * \n\t * Hook for subclassers to return the URL for the special bundle. This\n\t * implementation returns basename + <extension> or null if\n\t * <loadDefaultBundle> is false.\n\t * \n\t * Parameters:\n\t * \n\t * basename - The basename for which the file should be loaded.\n\t * lan - The current language.\n\t */\n\tgetDefaultBundle: function(basename, lan)\n\t{\n\t\tif (mxResources.loadDefaultBundle || !mxResources.isLanguageSupported(lan))\n\t\t{\n\t\t\treturn basename + mxResources.extension;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn null;\n\t\t}\n\t},\n\n\t/**\n\t * Function: getSpecialBundle\n\t * \n\t * Hook for subclassers to return the URL for the special bundle. This\n\t * implementation returns basename + '_' + lan + <extension> or null if\n\t * <loadSpecialBundle> is false or lan equals <mxClient.defaultLanguage>.\n\t * \n\t * If <mxResources.languages> is not null and <mxClient.language> contains\n\t * a dash, then this method checks if <isLanguageSupported> returns true\n\t * for the full language (including the dash). If that returns false the\n\t * first part of the language (up to the dash) will be tried as an extension.\n\t * \n\t * If <mxResources.language> is null then the first part of the language is\n\t * used to maintain backwards compatibility.\n\t * \n\t * Parameters:\n\t * \n\t * basename - The basename for which the file should be loaded.\n\t * lan - The language for which the file should be loaded.\n\t */\n\tgetSpecialBundle: function(basename, lan)\n\t{\n\t\tif (mxClient.languages == null || !this.isLanguageSupported(lan))\n\t\t{\n\t\t\tvar dash = lan.indexOf('-');\n\t\t\t\n\t\t\tif (dash > 0)\n\t\t\t{\n\t\t\t\tlan = lan.substring(0, dash);\n\t\t\t}\n\t\t}\n\n\t\tif (mxResources.loadSpecialBundle && mxResources.isLanguageSupported(lan) && lan != mxClient.defaultLanguage)\n\t\t{\n\t\t\treturn basename + '_' + lan + mxResources.extension;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn null;\n\t\t}\n\t},\n\n\t/**\n\t * Function: add\n\t * \n\t * Adds the default and current language properties file for the specified\n\t * basename. Existing keys are overridden as new files are added. If no\n\t * callback is used then the request is synchronous.\n\t *\n\t * Example:\n\t * \n\t * At application startup, additional resources may be \n\t * added using the following code:\n\t * \n\t * (code)\n\t * mxResources.add('resources/editor');\n\t * (end)\n\t * \n\t * Parameters:\n\t * \n\t * basename - The basename for which the file should be loaded.\n\t * lan - The language for which the file should be loaded.\n\t * callback - Optional callback for asynchronous loading.\n\t */\n\tadd: function(basename, lan, callback)\n\t{\n\t\tlan = (lan != null) ? lan : ((mxClient.language != null) ?\n\t\t\tmxClient.language.toLowerCase() : mxConstants.NONE);\n\t\t\n\t\tif (lan != mxConstants.NONE)\n\t\t{\n\t\t\tvar defaultBundle = mxResources.getDefaultBundle(basename, lan);\n\t\t\tvar specialBundle = mxResources.getSpecialBundle(basename, lan);\n\t\t\t\n\t\t\tvar loadSpecialBundle = function()\n\t\t\t{\n\t\t\t\tif (specialBundle != null)\n\t\t\t\t{\n\t\t\t\t\tif (callback)\n\t\t\t\t\t{\n\t\t\t\t\t\tmxUtils.get(specialBundle, function(req)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tmxResources.parse(req.getText());\n\t\t\t\t\t\t\tcallback();\n\t\t\t\t\t\t}, function()\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcallback();\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\ttry\n\t\t\t\t\t\t{\n\t\t\t\t\t   \t\tvar req = mxUtils.load(specialBundle);\n\t\t\t\t\t   \t\t\n\t\t\t\t\t   \t\tif (req.isReady())\n\t\t\t\t\t   \t\t{\n\t\t\t\t\t \t   \t\tmxResources.parse(req.getText());\n\t\t\t\t\t   \t\t}\n\t\t\t\t   \t\t}\n\t\t\t\t   \t\tcatch (e)\n\t\t\t\t   \t\t{\n\t\t\t\t   \t\t\t// ignore\n\t\t\t\t\t   \t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if (callback != null)\n\t\t\t\t{\n\t\t\t\t\tcallback();\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif (defaultBundle != null)\n\t\t\t{\n\t\t\t\tif (callback)\n\t\t\t\t{\n\t\t\t\t\tmxUtils.get(defaultBundle, function(req)\n\t\t\t\t\t{\n\t\t\t\t\t\tmxResources.parse(req.getText());\n\t\t\t\t\t\tloadSpecialBundle();\n\t\t\t\t\t}, function()\n\t\t\t\t\t{\n\t\t\t\t\t\tloadSpecialBundle();\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\ttry\n\t\t\t\t\t{\n\t\t\t\t   \t\tvar req = mxUtils.load(defaultBundle);\n\t\t\t\t   \t\t\n\t\t\t\t   \t\tif (req.isReady())\n\t\t\t\t   \t\t{\n\t\t\t\t \t   \t\tmxResources.parse(req.getText());\n\t\t\t\t   \t\t}\n\t\t\t\t   \t\t\n\t\t\t\t   \t\tloadSpecialBundle();\n\t\t\t\t  \t}\n\t\t\t\t  \tcatch (e)\n\t\t\t\t  \t{\n\t\t\t\t  \t\t// ignore\n\t\t\t\t  \t}\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// Overlays the language specific file (_lan-extension)\n\t\t\t\tloadSpecialBundle();\n\t\t\t}\n\t\t}\n\t},\n\n\t/**\n\t * Function: parse\n\t * \n\t * Parses the key, value pairs in the specified\n\t * text and stores them as local resources.\n\t */\n\tparse: function(text)\n\t{\n\t\tif (text != null)\n\t\t{\n\t\t\tvar lines = text.split('\\n');\n\t\t\t\n\t\t\tfor (var i = 0; i < lines.length; i++)\n\t\t\t{\n\t\t\t\tif (lines[i].charAt(0) != '#')\n\t\t\t\t{\n\t\t\t\t\tvar index = lines[i].indexOf('=');\n\t\t\t\t\t\n\t\t\t\t\tif (index > 0)\n\t\t\t\t\t{\n\t\t\t\t\t\tvar key = lines[i].substring(0, index);\n\t\t\t\t\t\tvar idx = lines[i].length;\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (lines[i].charCodeAt(idx - 1) == 13)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tidx--;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tvar value = lines[i].substring(index + 1, idx);\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (this.resourcesEncoded)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tvalue = value.replace(/\\\\(?=u[a-fA-F\\d]{4})/g,\"%\");\n\t\t\t\t\t\t\tmxResources.resources[key] = unescape(value);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tmxResources.resources[key] = value;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t},\n\n\t/**\n\t * Function: get\n\t * \n\t * Returns the value for the specified resource key.\n\t *\n\t * Example:\n\t * To read the value for 'welomeMessage', use the following:\n\t * (code)\n\t * var result = mxResources.get('welcomeMessage') || '';\n\t * (end)\n\t *\n\t * This would require an entry of the following form in\n\t * one of the English language resource files:\n\t * (code)\n\t * welcomeMessage=Welcome to mxGraph!\n\t * (end)\n\t * \n\t * The part behind the || is the string value to be used if the given\n\t * resource is not available.\n\t * \n\t * Parameters:\n\t * \n\t * key - String that represents the key of the resource to be returned.\n\t * params - Array of the values for the placeholders of the form {1}...{n}\n\t * to be replaced with in the resulting string.\n\t * defaultValue - Optional string that specifies the default return value.\n\t */\n\tget: function(key, params, defaultValue)\n\t{\n\t\tvar value = mxResources.resources[key];\n\t\t\n\t\t// Applies the default value if no resource was found\n\t\tif (value == null)\n\t\t{\n\t\t\tvalue = defaultValue;\n\t\t}\n\t\t\n\t\t// Replaces the placeholders with the values in the array\n\t\tif (value != null && params != null)\n\t\t{\n\t\t\tvalue = mxResources.replacePlaceholders(value, params);\n\t\t}\n\t\t\n\t\treturn value;\n\t},\n\n\t/**\n\t * Function: replacePlaceholders\n\t * \n\t * Replaces the given placeholders with the given parameters.\n\t * \n\t * Parameters:\n\t * \n\t * value - String that contains the placeholders.\n\t * params - Array of the values for the placeholders of the form {1}...{n}\n\t * to be replaced with in the resulting string.\n\t */\n\treplacePlaceholders: function(value, params)\n\t{\n\t\tvar result = [];\n\t\tvar index = null;\n\t\t\n\t\tfor (var i = 0; i < value.length; i++)\n\t\t{\n\t\t\tvar c = value.charAt(i);\n\n\t\t\tif (c == '{')\n\t\t\t{\n\t\t\t\tindex = '';\n\t\t\t}\n\t\t\telse if (index != null && \tc == '}')\n\t\t\t{\n\t\t\t\tindex = parseInt(index)-1;\n\t\t\t\t\n\t\t\t\tif (index >= 0 && index < params.length)\n\t\t\t\t{\n\t\t\t\t\tresult.push(params[index]);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tindex = null;\n\t\t\t}\n\t\t\telse if (index != null)\n\t\t\t{\n\t\t\t\tindex += c;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tresult.push(c);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn result.join('');\n\t},\n\n\t/**\n\t * Function: loadResources\n\t * \n\t * Loads all required resources asynchronously. Use this to load the graph and\n\t * editor resources if <mxLoadResources> is false.\n\t * \n\t * Parameters:\n\t * \n\t * callback - Callback function for asynchronous loading.\n\t */\n\tloadResources: function(callback)\n\t{\n\t\tmxResources.add(mxClient.basePath+'/resources/editor', null, function()\n\t\t{\n\t\t\tmxResources.add(mxClient.basePath+'/resources/graph', null, callback);\n\t\t});\n\t}\n\n};\n"
  },
  {
    "path": "static/cherry/drawio_demo/src/js/util/mxSvgCanvas2D.js",
    "content": "/**\n * Copyright (c) 2006-2015, JGraph Ltd\n * Copyright (c) 2006-2015, Gaudenz Alder\n */\n/**\n * Class: mxSvgCanvas2D\n *\n * Extends <mxAbstractCanvas2D> to implement a canvas for SVG. This canvas writes all\n * calls as SVG output to the given SVG root node.\n * \n * (code)\n * var svgDoc = mxUtils.createXmlDocument();\n * var root = (svgDoc.createElementNS != null) ?\n * \t\tsvgDoc.createElementNS(mxConstants.NS_SVG, 'svg') : svgDoc.createElement('svg');\n * \n * if (svgDoc.createElementNS == null)\n * {\n *   root.setAttribute('xmlns', mxConstants.NS_SVG);\n *   root.setAttribute('xmlns:xlink', mxConstants.NS_XLINK);\n * }\n * else\n * {\n *   root.setAttributeNS('http://www.w3.org/2000/xmlns/', 'xmlns:xlink', mxConstants.NS_XLINK);\n * }\n * \n * var bounds = graph.getGraphBounds();\n * root.setAttribute('width', (bounds.x + bounds.width + 4) + 'px');\n * root.setAttribute('height', (bounds.y + bounds.height + 4) + 'px');\n * root.setAttribute('version', '1.1');\n * \n * svgDoc.appendChild(root);\n * \n * var svgCanvas = new mxSvgCanvas2D(root);\n * (end)\n * \n * A description of the public API is available in <mxXmlCanvas2D>.\n * \n * To disable anti-aliasing in the output, use the following code.\n * \n * (code)\n * graph.view.canvas.ownerSVGElement.setAttribute('shape-rendering', 'crispEdges');\n * (end)\n * \n * Or set the respective attribute in the SVG element directly.\n * \n * Constructor: mxSvgCanvas2D\n *\n * Constructs a new SVG canvas.\n * \n * Parameters:\n * \n * root - SVG container for the output.\n * styleEnabled - Optional boolean that specifies if a style section should be\n * added. The style section sets the default font-size, font-family and\n * stroke-miterlimit globally. Default is false.\n */\nfunction mxSvgCanvas2D(root, styleEnabled)\n{\n\tmxAbstractCanvas2D.call(this);\n\n\t/**\n\t * Variable: root\n\t * \n\t * Reference to the container for the SVG content.\n\t */\n\tthis.root = root;\n\n\t/**\n\t * Variable: gradients\n\t * \n\t * Local cache of gradients for quick lookups.\n\t */\n\tthis.gradients = [];\n\n\t/**\n\t * Variable: defs\n\t * \n\t * Reference to the defs section of the SVG document. Only for export.\n\t */\n\tthis.defs = null;\n\t\n\t/**\n\t * Variable: styleEnabled\n\t * \n\t * Stores the value of styleEnabled passed to the constructor.\n\t */\n\tthis.styleEnabled = (styleEnabled != null) ? styleEnabled : false;\n\t\n\tvar svg = null;\n\t\n\t// Adds optional defs section for export\n\tif (root.ownerDocument != document)\n\t{\n\t\tvar node = root;\n\n\t\t// Finds owner SVG element in XML DOM\n\t\twhile (node != null && node.nodeName != 'svg')\n\t\t{\n\t\t\tnode = node.parentNode;\n\t\t}\n\t\t\n\t\tsvg = node;\n\t}\n\n\tif (svg != null)\n\t{\n\t\t// Tries to get existing defs section\n\t\tvar tmp = svg.getElementsByTagName('defs');\n\t\t\n\t\tif (tmp.length > 0)\n\t\t{\n\t\t\tthis.defs = svg.getElementsByTagName('defs')[0];\n\t\t}\n\t\t\n\t\t// Adds defs section if none exists\n\t\tif (this.defs == null)\n\t\t{\n\t\t\tthis.defs = this.createElement('defs');\n\t\t\t\n\t\t\tif (svg.firstChild != null)\n\t\t\t{\n\t\t\t\tsvg.insertBefore(this.defs, svg.firstChild);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tsvg.appendChild(this.defs);\n\t\t\t}\n\t\t}\n\n\t\t// Adds stylesheet\n\t\tif (this.styleEnabled)\n\t\t{\n\t\t\tthis.defs.appendChild(this.createStyle());\n\t\t}\n\t}\n};\n\n/**\n * Extends mxAbstractCanvas2D\n */\nmxUtils.extend(mxSvgCanvas2D, mxAbstractCanvas2D);\n\n/**\n * Capability check for DOM parser.\n */\n(function()\n{\n\tmxSvgCanvas2D.prototype.useDomParser = !mxClient.IS_IE && typeof DOMParser === 'function' && typeof XMLSerializer === 'function';\n\t\n\tif (mxSvgCanvas2D.prototype.useDomParser)\n\t{\n\t\t// Checks using a generic test text if the parsing actually works. This is a workaround\n\t\t// for older browsers where the capability check returns true but the parsing fails.\n\t\ttry\n\t\t{\n\t\t\tvar doc = new DOMParser().parseFromString('test text', 'text/html');\n\t\t\tmxSvgCanvas2D.prototype.useDomParser = doc != null;\n\t\t}\n\t\tcatch (e)\n\t\t{\n\t\t\tmxSvgCanvas2D.prototype.useDomParser = false;\n\t\t}\n\t}\n})();\n\n/**\n * Variable: path\n * \n * Holds the current DOM node.\n */\nmxSvgCanvas2D.prototype.node = null;\n\n/**\n * Variable: matchHtmlAlignment\n * \n * Specifies if plain text output should match the vertical HTML alignment.\n * Defaul is true.\n */\nmxSvgCanvas2D.prototype.matchHtmlAlignment = true;\n\n/**\n * Variable: textEnabled\n * \n * Specifies if text output should be enabled. Default is true.\n */\nmxSvgCanvas2D.prototype.textEnabled = true;\n\n/**\n * Variable: foEnabled\n * \n * Specifies if use of foreignObject for HTML markup is allowed. Default is true.\n */\nmxSvgCanvas2D.prototype.foEnabled = true;\n\n/**\n * Variable: foAltText\n * \n * Specifies the fallback text for unsupported foreignObjects in exported\n * documents. Default is '[Object]'. If this is set to null then no fallback\n * text is added to the exported document.\n */\nmxSvgCanvas2D.prototype.foAltText = '[Object]';\n\n/**\n * Variable: foOffset\n * \n * Offset to be used for foreignObjects.\n */\nmxSvgCanvas2D.prototype.foOffset = 0;\n\n/**\n * Variable: textOffset\n * \n * Offset to be used for text elements.\n */\nmxSvgCanvas2D.prototype.textOffset = 0;\n\n/**\n * Variable: imageOffset\n * \n * Offset to be used for image elements.\n */\nmxSvgCanvas2D.prototype.imageOffset = 0;\n\n/**\n * Variable: strokeTolerance\n * \n * Adds transparent paths for strokes.\n */\nmxSvgCanvas2D.prototype.strokeTolerance = 0;\n\n/**\n * Variable: minStrokeWidth\n * \n * Minimum stroke width for output.\n */\nmxSvgCanvas2D.prototype.minStrokeWidth = 1;\n\n/**\n * Variable: refCount\n * \n * Local counter for references in SVG export.\n */\nmxSvgCanvas2D.prototype.refCount = 0;\n\n/**\n * Variable: blockImagePointerEvents\n * \n * Specifies if a transparent rectangle should be added on top of images to absorb\n * all pointer events. Default is false. This is only needed in Firefox to disable\n * control-clicks on images.\n */\nmxSvgCanvas2D.prototype.blockImagePointerEvents = false;\n\n/**\n * Variable: lineHeightCorrection\n * \n * Correction factor for <mxConstants.LINE_HEIGHT> in HTML output. Default is 1.\n */\nmxSvgCanvas2D.prototype.lineHeightCorrection = 1;\n\n/**\n * Variable: pointerEventsValue\n * \n * Default value for active pointer events. Default is all.\n */\nmxSvgCanvas2D.prototype.pointerEventsValue = 'all';\n\n/**\n * Variable: fontMetricsPadding\n * \n * Padding to be added for text that is not wrapped to account for differences\n * in font metrics on different platforms in pixels. Default is 10.\n */\nmxSvgCanvas2D.prototype.fontMetricsPadding = 10;\n\n/**\n * Variable: cacheOffsetSize\n * \n * Specifies if offsetWidth and offsetHeight should be cached. Default is true.\n * This is used to speed up repaint of text in <updateText>.\n */\nmxSvgCanvas2D.prototype.cacheOffsetSize = true;\n\n/**\n * Function: format\n * \n * Rounds all numbers to 2 decimal points.\n */\nmxSvgCanvas2D.prototype.format = function(value)\n{\n\treturn parseFloat(parseFloat(value).toFixed(2));\n};\n\n/**\n * Function: getBaseUrl\n * \n * Returns the URL of the page without the hash part. This needs to use href to\n * include any search part with no params (ie question mark alone). This is a\n * workaround for the fact that window.location.search is empty if there is\n * no search string behind the question mark.\n */\nmxSvgCanvas2D.prototype.getBaseUrl = function()\n{\n\tvar href = window.location.href;\n\tvar hash = href.lastIndexOf('#');\n\t\n\tif (hash > 0)\n\t{\n\t\thref = href.substring(0, hash);\n\t}\n\t\n\treturn href;\n};\n\n/**\n * Function: reset\n * \n * Returns any offsets for rendering pixels.\n */\nmxSvgCanvas2D.prototype.reset = function()\n{\n\tmxAbstractCanvas2D.prototype.reset.apply(this, arguments);\n\tthis.gradients = [];\n};\n\n/**\n * Function: createStyle\n * \n * Creates the optional style section.\n */\nmxSvgCanvas2D.prototype.createStyle = function(x)\n{\n\tvar style = this.createElement('style');\n\tstyle.setAttribute('type', 'text/css');\n\tmxUtils.write(style, 'svg{font-family:' + mxConstants.DEFAULT_FONTFAMILY +\n\t\t\t';font-size:' + mxConstants.DEFAULT_FONTSIZE +\n\t\t\t';fill:none;stroke-miterlimit:10}');\n\t\n\treturn style;\n};\n\n/**\n * Function: createElement\n * \n * Private helper function to create SVG elements\n */\nmxSvgCanvas2D.prototype.createElement = function(tagName, namespace)\n{\n\tif (this.root.ownerDocument.createElementNS != null)\n\t{\n\t\treturn this.root.ownerDocument.createElementNS(namespace || mxConstants.NS_SVG, tagName);\n\t}\n\telse\n\t{\n\t\tvar elt = this.root.ownerDocument.createElement(tagName);\n\t\t\n\t\tif (namespace != null)\n\t\t{\n\t\t\telt.setAttribute('xmlns', namespace);\n\t\t}\n\t\t\n\t\treturn elt;\n\t}\n};\n\n/**\n * Function: getAlternateContent\n * \n * Returns the alternate content for the given foreignObject.\n */\nmxSvgCanvas2D.prototype.createAlternateContent = function(fo, x, y, w, h, str, align, valign, wrap, format, overflow, clip, rotation)\n{\n\tif (this.foAltText != null)\n\t{\n\t\tvar s = this.state;\n\t\tvar alt = this.createElement('text');\n\t\talt.setAttribute('x', Math.round(w / 2));\n\t\talt.setAttribute('y', Math.round((h + s.fontSize) / 2));\n\t\talt.setAttribute('fill', s.fontColor || 'black');\n\t\talt.setAttribute('text-anchor', 'middle');\n\t\talt.setAttribute('font-size', s.fontSize + 'px');\n\t\talt.setAttribute('font-family', s.fontFamily);\n\t\t\n\t\tif ((s.fontStyle & mxConstants.FONT_BOLD) == mxConstants.FONT_BOLD)\n\t\t{\n\t\t\talt.setAttribute('font-weight', 'bold');\n\t\t}\n\t\t\n\t\tif ((s.fontStyle & mxConstants.FONT_ITALIC) == mxConstants.FONT_ITALIC)\n\t\t{\n\t\t\talt.setAttribute('font-style', 'italic');\n\t\t}\n\t\t\n\t\tif ((s.fontStyle & mxConstants.FONT_UNDERLINE) == mxConstants.FONT_UNDERLINE)\n\t\t{\n\t\t\talt.setAttribute('text-decoration', 'underline');\n\t\t}\n\t\t\n\t\tmxUtils.write(alt, this.foAltText);\n\t\t\n\t\treturn alt;\n\t}\n\telse\n\t{\n\t\treturn null;\n\t}\n};\n\n/**\n * Function: createGradientId\n * \n * Private helper function to create SVG elements\n */\nmxSvgCanvas2D.prototype.createGradientId = function(start, end, alpha1, alpha2, direction)\n{\n\t// Removes illegal characters from gradient ID\n\tif (start.charAt(0) == '#')\n\t{\n\t\tstart = start.substring(1);\n\t}\n\t\n\tif (end.charAt(0) == '#')\n\t{\n\t\tend = end.substring(1);\n\t}\n\t\n\t// Workaround for gradient IDs not working in Safari 5 / Chrome 6\n\t// if they contain uppercase characters\n\tstart = start.toLowerCase() + '-' + alpha1;\n\tend = end.toLowerCase() + '-' + alpha2;\n\n\t// Wrong gradient directions possible?\n\tvar dir = null;\n\t\n\tif (direction == null || direction == mxConstants.DIRECTION_SOUTH)\n\t{\n\t\tdir = 's';\n\t}\n\telse if (direction == mxConstants.DIRECTION_EAST)\n\t{\n\t\tdir = 'e';\n\t}\n\telse\n\t{\n\t\tvar tmp = start;\n\t\tstart = end;\n\t\tend = tmp;\n\t\t\n\t\tif (direction == mxConstants.DIRECTION_NORTH)\n\t\t{\n\t\t\tdir = 's';\n\t\t}\n\t\telse if (direction == mxConstants.DIRECTION_WEST)\n\t\t{\n\t\t\tdir = 'e';\n\t\t}\n\t}\n\t\n\treturn 'mx-gradient-' + start + '-' + end + '-' + dir;\n};\n\n/**\n * Function: getSvgGradient\n * \n * Private helper function to create SVG elements\n */\nmxSvgCanvas2D.prototype.getSvgGradient = function(start, end, alpha1, alpha2, direction)\n{\n\tvar id = this.createGradientId(start, end, alpha1, alpha2, direction);\n\tvar gradient = this.gradients[id];\n\t\n\tif (gradient == null)\n\t{\n\t\tvar svg = this.root.ownerSVGElement;\n\n\t\tvar counter = 0;\n\t\tvar tmpId = id + '-' + counter;\n\n\t\tif (svg != null)\n\t\t{\n\t\t\tgradient = svg.ownerDocument.getElementById(tmpId);\n\t\t\t\n\t\t\twhile (gradient != null && gradient.ownerSVGElement != svg)\n\t\t\t{\n\t\t\t\ttmpId = id + '-' + counter++;\n\t\t\t\tgradient = svg.ownerDocument.getElementById(tmpId);\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Uses shorter IDs for export\n\t\t\ttmpId = 'id' + (++this.refCount);\n\t\t}\n\t\t\n\t\tif (gradient == null)\n\t\t{\n\t\t\tgradient = this.createSvgGradient(start, end, alpha1, alpha2, direction);\n\t\t\tgradient.setAttribute('id', tmpId);\n\t\t\t\n\t\t\tif (this.defs != null)\n\t\t\t{\n\t\t\t\tthis.defs.appendChild(gradient);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tsvg.appendChild(gradient);\n\t\t\t}\n\t\t}\n\n\t\tthis.gradients[id] = gradient;\n\t}\n\n\treturn gradient.getAttribute('id');\n};\n\n/**\n * Function: createSvgGradient\n * \n * Creates the given SVG gradient.\n */\nmxSvgCanvas2D.prototype.createSvgGradient = function(start, end, alpha1, alpha2, direction)\n{\n\tvar gradient = this.createElement('linearGradient');\n\tgradient.setAttribute('x1', '0%');\n\tgradient.setAttribute('y1', '0%');\n\tgradient.setAttribute('x2', '0%');\n\tgradient.setAttribute('y2', '0%');\n\t\n\tif (direction == null || direction == mxConstants.DIRECTION_SOUTH)\n\t{\n\t\tgradient.setAttribute('y2', '100%');\n\t}\n\telse if (direction == mxConstants.DIRECTION_EAST)\n\t{\n\t\tgradient.setAttribute('x2', '100%');\n\t}\n\telse if (direction == mxConstants.DIRECTION_NORTH)\n\t{\n\t\tgradient.setAttribute('y1', '100%');\n\t}\n\telse if (direction == mxConstants.DIRECTION_WEST)\n\t{\n\t\tgradient.setAttribute('x1', '100%');\n\t}\n\t\n\tvar op = (alpha1 < 1) ? ';stop-opacity:' + alpha1 : '';\n\t\n\tvar stop = this.createElement('stop');\n\tstop.setAttribute('offset', '0%');\n\tstop.setAttribute('style', 'stop-color:' + start + op);\n\tgradient.appendChild(stop);\n\t\n\top = (alpha2 < 1) ? ';stop-opacity:' + alpha2 : '';\n\t\n\tstop = this.createElement('stop');\n\tstop.setAttribute('offset', '100%');\n\tstop.setAttribute('style', 'stop-color:' + end + op);\n\tgradient.appendChild(stop);\n\t\n\treturn gradient;\n};\n\n/**\n * Function: addNode\n * \n * Private helper function to create SVG elements\n */\nmxSvgCanvas2D.prototype.addNode = function(filled, stroked)\n{\n\tvar node = this.node;\n\tvar s = this.state;\n\n\tif (node != null)\n\t{\n\t\tif (node.nodeName == 'path')\n\t\t{\n\t\t\t// Checks if the path is not empty\n\t\t\tif (this.path != null && this.path.length > 0)\n\t\t\t{\n\t\t\t\tnode.setAttribute('d', this.path.join(' '));\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\t\tif (filled && s.fillColor != null)\n\t\t{\n\t\t\tthis.updateFill();\n\t\t}\n\t\telse if (!this.styleEnabled)\n\t\t{\n\t\t\t// Workaround for https://bugzilla.mozilla.org/show_bug.cgi?id=814952\n\t\t\tif (node.nodeName == 'ellipse' && mxClient.IS_FF)\n\t\t\t{\n\t\t\t\tnode.setAttribute('fill', 'transparent');\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tnode.setAttribute('fill', 'none');\n\t\t\t}\n\t\t\t\n\t\t\t// Sets the actual filled state for stroke tolerance\n\t\t\tfilled = false;\n\t\t}\n\t\t\n\t\tif (stroked && s.strokeColor != null)\n\t\t{\n\t\t\tthis.updateStroke();\n\t\t}\n\t\telse if (!this.styleEnabled)\n\t\t{\n\t\t\tnode.setAttribute('stroke', 'none');\n\t\t}\n\t\t\n\t\tif (s.transform != null && s.transform.length > 0)\n\t\t{\n\t\t\tnode.setAttribute('transform', s.transform);\n\t\t}\n\t\t\n\t\tif (s.shadow)\n\t\t{\n\t\t\tthis.root.appendChild(this.createShadow(node));\n\t\t}\n\t\n\t\t// Adds stroke tolerance\n\t\tif (this.strokeTolerance > 0 && !filled)\n\t\t{\n\t\t\tthis.root.appendChild(this.createTolerance(node));\n\t\t}\n\n\t\t// Adds pointer events\n\t\tif (this.pointerEvents && (node.nodeName != 'path' ||\n\t\t\tthis.path[this.path.length - 1] == this.closeOp))\n\t\t{\n\t\t\tnode.setAttribute('pointer-events', this.pointerEventsValue);\n\t\t}\n\t\t// Enables clicks for nodes inside a link element\n\t\telse if (!this.pointerEvents && this.originalRoot == null)\n\t\t{\n\t\t\tnode.setAttribute('pointer-events', 'none');\n\t\t}\n\t\t\n\t\t// Removes invisible nodes from output if they don't handle events\n\t\tif ((node.nodeName != 'rect' && node.nodeName != 'path' && node.nodeName != 'ellipse') ||\n\t\t\t(node.getAttribute('fill') != 'none' && node.getAttribute('fill') != 'transparent') ||\n\t\t\tnode.getAttribute('stroke') != 'none' || node.getAttribute('pointer-events') != 'none')\n\t\t{\n\t\t\t// LATER: Update existing DOM for performance\t\t\n\t\t\tthis.root.appendChild(node);\n\t\t}\n\t\t\n\t\tthis.node = null;\n\t}\n};\n\n/**\n * Function: updateFill\n * \n * Transfers the stroke attributes from <state> to <node>.\n */\nmxSvgCanvas2D.prototype.updateFill = function()\n{\n\tvar s = this.state;\n\t\n\tif (s.alpha < 1 || s.fillAlpha < 1)\n\t{\n\t\tthis.node.setAttribute('fill-opacity', s.alpha * s.fillAlpha);\n\t}\n\t\n\tif (s.fillColor != null)\n\t{\n\t\tif (s.gradientColor != null)\n\t\t{\n\t\t\tvar id = this.getSvgGradient(s.fillColor, s.gradientColor, s.gradientFillAlpha, s.gradientAlpha, s.gradientDirection);\n\t\t\t\n\t\t\tif (!mxClient.IS_CHROME_APP && !mxClient.IS_IE && !mxClient.IS_IE11 &&\n\t\t\t\t!mxClient.IS_EDGE && this.root.ownerDocument == document)\n\t\t\t{\n\t\t\t\t// Workaround for potential base tag and brackets must be escaped\n\t\t\t\tvar base = this.getBaseUrl().replace(/([\\(\\)])/g, '\\\\$1');\n\t\t\t\tthis.node.setAttribute('fill', 'url(' + base + '#' + id + ')');\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tthis.node.setAttribute('fill', 'url(#' + id + ')');\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tthis.node.setAttribute('fill', s.fillColor.toLowerCase());\n\t\t}\n\t}\n};\n\n/**\n * Function: getCurrentStrokeWidth\n * \n * Returns the current stroke width (>= 1), ie. max(1, this.format(this.state.strokeWidth * this.state.scale)).\n */\nmxSvgCanvas2D.prototype.getCurrentStrokeWidth = function()\n{\n\treturn Math.max(this.minStrokeWidth, Math.max(0.01, this.format(this.state.strokeWidth * this.state.scale)));\n};\n\n/**\n * Function: updateStroke\n * \n * Transfers the stroke attributes from <state> to <node>.\n */\nmxSvgCanvas2D.prototype.updateStroke = function()\n{\n\tvar s = this.state;\n\n\tthis.node.setAttribute('stroke', s.strokeColor.toLowerCase());\n\t\n\tif (s.alpha < 1 || s.strokeAlpha < 1)\n\t{\n\t\tthis.node.setAttribute('stroke-opacity', s.alpha * s.strokeAlpha);\n\t}\n\t\n\tvar sw = this.getCurrentStrokeWidth();\n\t\n\tif (sw != 1)\n\t{\n\t\tthis.node.setAttribute('stroke-width', sw);\n\t}\n\t\n\tif (this.node.nodeName == 'path')\n\t{\n\t\tthis.updateStrokeAttributes();\n\t}\n\t\n\tif (s.dashed)\n\t{\n\t\tthis.node.setAttribute('stroke-dasharray', this.createDashPattern(\n\t\t\t((s.fixDash) ? 1 : s.strokeWidth) * s.scale));\n\t}\n};\n\n/**\n * Function: updateStrokeAttributes\n * \n * Transfers the stroke attributes from <state> to <node>.\n */\nmxSvgCanvas2D.prototype.updateStrokeAttributes = function()\n{\n\tvar s = this.state;\n\t\n\t// Linejoin miter is default in SVG\n\tif (s.lineJoin != null && s.lineJoin != 'miter')\n\t{\n\t\tthis.node.setAttribute('stroke-linejoin', s.lineJoin);\n\t}\n\t\n\tif (s.lineCap != null)\n\t{\n\t\t// flat is called butt in SVG\n\t\tvar value = s.lineCap;\n\t\t\n\t\tif (value == 'flat')\n\t\t{\n\t\t\tvalue = 'butt';\n\t\t}\n\t\t\n\t\t// Linecap butt is default in SVG\n\t\tif (value != 'butt')\n\t\t{\n\t\t\tthis.node.setAttribute('stroke-linecap', value);\n\t\t}\n\t}\n\t\n\t// Miterlimit 10 is default in our document\n\tif (s.miterLimit != null && (!this.styleEnabled || s.miterLimit != 10))\n\t{\n\t\tthis.node.setAttribute('stroke-miterlimit', s.miterLimit);\n\t}\n};\n\n/**\n * Function: createDashPattern\n * \n * Creates the SVG dash pattern for the given state.\n */\nmxSvgCanvas2D.prototype.createDashPattern = function(scale)\n{\n\tvar pat = [];\n\t\n\tif (typeof(this.state.dashPattern) === 'string')\n\t{\n\t\tvar dash = this.state.dashPattern.split(' ');\n\t\t\n\t\tif (dash.length > 0)\n\t\t{\n\t\t\tfor (var i = 0; i < dash.length; i++)\n\t\t\t{\n\t\t\t\tpat[i] = Number(dash[i]) * scale;\n\t\t\t}\n\t\t}\n\t}\n\t\n\treturn pat.join(' ');\n};\n\n/**\n * Function: createTolerance\n * \n * Creates a hit detection tolerance shape for the given node.\n */\nmxSvgCanvas2D.prototype.createTolerance = function(node)\n{\n\tvar tol = node.cloneNode(true);\n\tvar sw = parseFloat(tol.getAttribute('stroke-width') || 1) + this.strokeTolerance;\n\ttol.setAttribute('pointer-events', 'stroke');\n\ttol.setAttribute('visibility', 'hidden');\n\ttol.removeAttribute('stroke-dasharray');\n\ttol.setAttribute('stroke-width', sw);\n\ttol.setAttribute('fill', 'none');\n\t\n\t// Workaround for Opera ignoring the visiblity attribute above while\n\t// other browsers need a stroke color to perform the hit-detection but\n\t// do not ignore the visibility attribute. Side-effect is that Opera's\n\t// hit detection for horizontal/vertical edges seems to ignore the tol.\n\ttol.setAttribute('stroke', (mxClient.IS_OT) ? 'none' : 'white');\n\t\n\treturn tol;\n};\n\n/**\n * Function: createShadow\n * \n * Creates a shadow for the given node.\n */\nmxSvgCanvas2D.prototype.createShadow = function(node)\n{\n\tvar shadow = node.cloneNode(true);\n\tvar s = this.state;\n\n\t// Firefox uses transparent for no fill in ellipses\n\tif (shadow.getAttribute('fill') != 'none' && (!mxClient.IS_FF || shadow.getAttribute('fill') != 'transparent'))\n\t{\n\t\tshadow.setAttribute('fill', s.shadowColor);\n\t}\n\t\n\tif (shadow.getAttribute('stroke') != 'none')\n\t{\n\t\tshadow.setAttribute('stroke', s.shadowColor);\n\t}\n\n\tshadow.setAttribute('transform', 'translate(' + this.format(s.shadowDx * s.scale) +\n\t\t',' + this.format(s.shadowDy * s.scale) + ')' + (s.transform || ''));\n\tshadow.setAttribute('opacity', s.shadowAlpha);\n\t\n\treturn shadow;\n};\n\n/**\n * Function: setLink\n * \n * Experimental implementation for hyperlinks.\n */\nmxSvgCanvas2D.prototype.setLink = function(link)\n{\n\tif (link == null)\n\t{\n\t\tthis.root = this.originalRoot;\n\t}\n\telse\n\t{\n\t\tthis.originalRoot = this.root;\n\t\t\n\t\tvar node = this.createElement('a');\n\t\t\n\t\t// Workaround for implicit namespace handling in HTML5 export, IE adds NS1 namespace so use code below\n\t\t// in all IE versions except quirks mode. KNOWN: Adds xlink namespace to each image tag in output.\n\t\tif (node.setAttributeNS == null || (this.root.ownerDocument != document && document.documentMode == null))\n\t\t{\n\t\t\tnode.setAttribute('xlink:href', link);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tnode.setAttributeNS(mxConstants.NS_XLINK, 'xlink:href', link);\n\t\t}\n\t\t\n\t\tthis.root.appendChild(node);\n\t\tthis.root = node;\n\t}\n};\n\n/**\n * Function: rotate\n * \n * Sets the rotation of the canvas. Note that rotation cannot be concatenated.\n */\nmxSvgCanvas2D.prototype.rotate = function(theta, flipH, flipV, cx, cy)\n{\n\tif (theta != 0 || flipH || flipV)\n\t{\n\t\tvar s = this.state;\n\t\tcx += s.dx;\n\t\tcy += s.dy;\n\t\n\t\tcx *= s.scale;\n\t\tcy *= s.scale;\n\n\t\ts.transform = s.transform || '';\n\t\t\n\t\t// This implementation uses custom scale/translate and built-in rotation\n\t\t// Rotation state is part of the AffineTransform in state.transform\n\t\tif (flipH && flipV)\n\t\t{\n\t\t\ttheta += 180;\n\t\t}\n\t\telse if (flipH != flipV)\n\t\t{\n\t\t\tvar tx = (flipH) ? cx : 0;\n\t\t\tvar sx = (flipH) ? -1 : 1;\n\t\n\t\t\tvar ty = (flipV) ? cy : 0;\n\t\t\tvar sy = (flipV) ? -1 : 1;\n\n\t\t\ts.transform += 'translate(' + this.format(tx) + ',' + this.format(ty) + ')' +\n\t\t\t\t'scale(' + this.format(sx) + ',' + this.format(sy) + ')' +\n\t\t\t\t'translate(' + this.format(-tx) + ',' + this.format(-ty) + ')';\n\t\t}\n\t\t\n\t\tif (flipH ? !flipV : flipV)\n\t\t{\n\t\t\ttheta *= -1;\n\t\t}\n\t\t\n\t\tif (theta != 0)\n\t\t{\n\t\t\ts.transform += 'rotate(' + this.format(theta) + ',' + this.format(cx) + ',' + this.format(cy) + ')';\n\t\t}\n\t\t\n\t\ts.rotation = s.rotation + theta;\n\t\ts.rotationCx = cx;\n\t\ts.rotationCy = cy;\n\t}\n};\n\n/**\n * Function: begin\n * \n * Extends superclass to create path.\n */\nmxSvgCanvas2D.prototype.begin = function()\n{\n\tmxAbstractCanvas2D.prototype.begin.apply(this, arguments);\n\tthis.node = this.createElement('path');\n};\n\n/**\n * Function: rect\n * \n * Private helper function to create SVG elements\n */\nmxSvgCanvas2D.prototype.rect = function(x, y, w, h)\n{\n\tvar s = this.state;\n\tvar n = this.createElement('rect');\n\tn.setAttribute('x', this.format((x + s.dx) * s.scale));\n\tn.setAttribute('y', this.format((y + s.dy) * s.scale));\n\tn.setAttribute('width', this.format(w * s.scale));\n\tn.setAttribute('height', this.format(h * s.scale));\n\t\n\tthis.node = n;\n};\n\n/**\n * Function: roundrect\n * \n * Private helper function to create SVG elements\n */\nmxSvgCanvas2D.prototype.roundrect = function(x, y, w, h, dx, dy)\n{\n\tthis.rect(x, y, w, h);\n\t\n\tif (dx > 0)\n\t{\n\t\tthis.node.setAttribute('rx', this.format(dx * this.state.scale));\n\t}\n\t\n\tif (dy > 0)\n\t{\n\t\tthis.node.setAttribute('ry', this.format(dy * this.state.scale));\n\t}\n};\n\n/**\n * Function: ellipse\n * \n * Private helper function to create SVG elements\n */\nmxSvgCanvas2D.prototype.ellipse = function(x, y, w, h)\n{\n\tvar s = this.state;\n\tvar n = this.createElement('ellipse');\n\t// No rounding for consistent output with 1.x\n\tn.setAttribute('cx', Math.round((x + w / 2 + s.dx) * s.scale));\n\tn.setAttribute('cy', Math.round((y + h / 2 + s.dy) * s.scale));\n\tn.setAttribute('rx', w / 2 * s.scale);\n\tn.setAttribute('ry', h / 2 * s.scale);\n\tthis.node = n;\n};\n\n/**\n * Function: image\n * \n * Private helper function to create SVG elements\n */\nmxSvgCanvas2D.prototype.image = function(x, y, w, h, src, aspect, flipH, flipV)\n{\n\tsrc = this.converter.convert(src);\n\t\n\t// LATER: Add option for embedding images as base64.\n\taspect = (aspect != null) ? aspect : true;\n\tflipH = (flipH != null) ? flipH : false;\n\tflipV = (flipV != null) ? flipV : false;\n\t\n\tvar s = this.state;\n\tx += s.dx;\n\ty += s.dy;\n\t\n\tvar node = this.createElement('image');\n\tnode.setAttribute('x', this.format(x * s.scale) + this.imageOffset);\n\tnode.setAttribute('y', this.format(y * s.scale) + this.imageOffset);\n\tnode.setAttribute('width', this.format(w * s.scale));\n\tnode.setAttribute('height', this.format(h * s.scale));\n\t\n\t// Workaround for missing namespace support\n\tif (node.setAttributeNS == null)\n\t{\n\t\tnode.setAttribute('xlink:href', src);\n\t}\n\telse\n\t{\n\t\tnode.setAttributeNS(mxConstants.NS_XLINK, 'xlink:href', src);\n\t}\n\t\n\tif (!aspect)\n\t{\n\t\tnode.setAttribute('preserveAspectRatio', 'none');\n\t}\n\n\tif (s.alpha < 1 || s.fillAlpha < 1)\n\t{\n\t\tnode.setAttribute('opacity', s.alpha * s.fillAlpha);\n\t}\n\t\n\tvar tr = this.state.transform || '';\n\t\n\tif (flipH || flipV)\n\t{\n\t\tvar sx = 1;\n\t\tvar sy = 1;\n\t\tvar dx = 0;\n\t\tvar dy = 0;\n\t\t\n\t\tif (flipH)\n\t\t{\n\t\t\tsx = -1;\n\t\t\tdx = -w - 2 * x;\n\t\t}\n\t\t\n\t\tif (flipV)\n\t\t{\n\t\t\tsy = -1;\n\t\t\tdy = -h - 2 * y;\n\t\t}\n\t\t\n\t\t// Adds image tansformation to existing transform\n\t\ttr += 'scale(' + sx + ',' + sy + ')translate(' + (dx * s.scale) + ',' + (dy * s.scale) + ')';\n\t}\n\n\tif (tr.length > 0)\n\t{\n\t\tnode.setAttribute('transform', tr);\n\t}\n\t\n\tif (!this.pointerEvents)\n\t{\n\t\tnode.setAttribute('pointer-events', 'none');\n\t}\n\t\n\tthis.root.appendChild(node);\n\t\n\t// Disables control-clicks on images in Firefox to open in new tab\n\t// by putting a rect in the foreground that absorbs all events and\n\t// disabling all pointer-events on the original image tag.\n\tif (this.blockImagePointerEvents)\n\t{\n\t\tnode.setAttribute('style', 'pointer-events:none');\n\t\t\n\t\tnode = this.createElement('rect');\n\t\tnode.setAttribute('visibility', 'hidden');\n\t\tnode.setAttribute('pointer-events', 'fill');\n\t\tnode.setAttribute('x', this.format(x * s.scale));\n\t\tnode.setAttribute('y', this.format(y * s.scale));\n\t\tnode.setAttribute('width', this.format(w * s.scale));\n\t\tnode.setAttribute('height', this.format(h * s.scale));\n\t\tthis.root.appendChild(node);\n\t}\n};\n\n/**\n * Function: convertHtml\n * \n * Converts the given HTML string to XHTML.\n */\nmxSvgCanvas2D.prototype.convertHtml = function(val)\n{\n\tif (this.useDomParser)\n\t{\n\t\tvar doc = new DOMParser().parseFromString(val, 'text/html');\n\n\t\tif (doc != null)\n\t\t{\n\t\t\tval = new XMLSerializer().serializeToString(doc.body);\n\t\t\t\n\t\t\t// Extracts body content from DOM\n\t\t\tif (val.substring(0, 5) == '<body')\n\t\t\t{\n\t\t\t\tval = val.substring(val.indexOf('>', 5) + 1);\n\t\t\t}\n\t\t\t\n\t\t\tif (val.substring(val.length - 7, val.length) == '</body>')\n\t\t\t{\n\t\t\t\tval = val.substring(0, val.length - 7);\n\t\t\t}\n\t\t}\n\t}\n\telse if (document.implementation != null && document.implementation.createDocument != null)\n\t{\n\t\tvar xd = document.implementation.createDocument('http://www.w3.org/1999/xhtml', 'html', null);\n\t\tvar xb = xd.createElement('body');\n\t\txd.documentElement.appendChild(xb);\n\t\t\n\t\tvar div = document.createElement('div');\n\t\tdiv.innerHTML = val;\n\t\tvar child = div.firstChild;\n\t\t\n\t\twhile (child != null)\n\t\t{\n\t\t\tvar next = child.nextSibling;\n\t\t\txb.appendChild(xd.adoptNode(child));\n\t\t\tchild = next;\n\t\t}\n\t\t\n\t\treturn xb.innerHTML;\n\t}\n\telse\n\t{\n\t\tvar ta = document.createElement('textarea');\n\t\t\n\t\t// Handles special HTML entities < and > and double escaping\n\t\t// and converts unclosed br, hr and img tags to XHTML\n\t\t// LATER: Convert all unclosed tags\n\t\tta.innerHTML = val.replace(/&amp;/g, '&amp;amp;').\n\t\t\treplace(/&#60;/g, '&amp;lt;').replace(/&#62;/g, '&amp;gt;').\n\t\t\treplace(/&lt;/g, '&amp;lt;').replace(/&gt;/g, '&amp;gt;').\n\t\t\treplace(/</g, '&lt;').replace(/>/g, '&gt;');\n\t\tval = ta.value.replace(/&/g, '&amp;').replace(/&amp;lt;/g, '&lt;').\n\t\t\treplace(/&amp;gt;/g, '&gt;').replace(/&amp;amp;/g, '&amp;').\n\t\t\treplace(/<br>/g, '<br />').replace(/<hr>/g, '<hr />').\n\t\t\treplace(/(<img[^>]+)>/gm, \"$1 />\");\n\t}\n\t\n\treturn val;\n};\n\n/**\n * Function: createDiv\n * \n * Private helper function to create SVG elements\n */\nmxSvgCanvas2D.prototype.createDiv = function(str, align, valign, style, overflow)\n{\n\tvar s = this.state;\n\n\t// Inline block for rendering HTML background over SVG in Safari\n\tvar lh = (mxConstants.ABSOLUTE_LINE_HEIGHT) ? (s.fontSize * mxConstants.LINE_HEIGHT) + 'px' :\n\t\t(mxConstants.LINE_HEIGHT * this.lineHeightCorrection);\n\t\n\tstyle = 'display:inline-block;font-size:' + s.fontSize + 'px;font-family:' + s.fontFamily +\n\t\t';color:' + s.fontColor + ';line-height:' + lh + ';' + style;\n\n\tif ((s.fontStyle & mxConstants.FONT_BOLD) == mxConstants.FONT_BOLD)\n\t{\n\t\tstyle += 'font-weight:bold;';\n\t}\n\n\tif ((s.fontStyle & mxConstants.FONT_ITALIC) == mxConstants.FONT_ITALIC)\n\t{\n\t\tstyle += 'font-style:italic;';\n\t}\n\t\n\tif ((s.fontStyle & mxConstants.FONT_UNDERLINE) == mxConstants.FONT_UNDERLINE)\n\t{\n\t\tstyle += 'text-decoration:underline;';\n\t}\n\t\n\tif (align == mxConstants.ALIGN_CENTER)\n\t{\n\t\tstyle += 'text-align:center;';\n\t}\n\telse if (align == mxConstants.ALIGN_RIGHT)\n\t{\n\t\tstyle += 'text-align:right;';\n\t}\n\n\tvar css = '';\n\t\n\tif (s.fontBackgroundColor != null)\n\t{\n\t\tcss += 'background-color:' + s.fontBackgroundColor + ';';\n\t}\n\t\n\tif (s.fontBorderColor != null)\n\t{\n\t\tcss += 'border:1px solid ' + s.fontBorderColor + ';';\n\t}\n\t\n\tvar val = str;\n\t\n\tif (!mxUtils.isNode(val))\n\t{\n\t\tval = this.convertHtml(val);\n\t\t\n\t\tif (overflow != 'fill' && overflow != 'width')\n\t\t{\n\t\t\t// Inner div always needed to measure wrapped text\n\t\t\tval = '<div xmlns=\"http://www.w3.org/1999/xhtml\" style=\"display:inline-block;text-align:inherit;text-decoration:inherit;' + css + '\">' + val + '</div>';\n\t\t}\n\t\telse\n\t\t{\n\t\t\tstyle += css;\n\t\t}\n\t}\n\n\t// Uses DOM API where available. This cannot be used in IE to avoid\n\t// an opening and two (!) closing TBODY tags being added to tables.\n\tif (!mxClient.IS_IE && document.createElementNS)\n\t{\n\t\tvar div = document.createElementNS('http://www.w3.org/1999/xhtml', 'div');\n\t\tdiv.setAttribute('style', style);\n\t\t\n\t\tif (mxUtils.isNode(val))\n\t\t{\n\t\t\t// Creates a copy for export\n\t\t\tif (this.root.ownerDocument != document)\n\t\t\t{\n\t\t\t\tdiv.appendChild(val.cloneNode(true));\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tdiv.appendChild(val);\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tdiv.innerHTML = val;\n\t\t}\n\t\t\n\t\treturn div;\n\t}\n\telse\n\t{\n\t\t// Serializes for export\n\t\tif (mxUtils.isNode(val) && this.root.ownerDocument != document)\n\t\t{\n\t\t\tval = val.outerHTML;\n\t\t}\n\n\t\t// NOTE: FF 3.6 crashes if content CSS contains \"height:100%\"\n\t\treturn mxUtils.parseXml('<div xmlns=\"http://www.w3.org/1999/xhtml\" style=\"' + style + \n\t\t\t'\">' + val + '</div>').documentElement;\n\t}\n};\n\n/**\n * Invalidates the cached offset size for the given node.\n */\nmxSvgCanvas2D.prototype.invalidateCachedOffsetSize = function(node)\n{\n\tdelete node.firstChild.mxCachedOffsetWidth;\n\tdelete node.firstChild.mxCachedFinalOffsetWidth;\n\tdelete node.firstChild.mxCachedFinalOffsetHeight;\n};\n\n/**\n * Updates existing DOM nodes for text rendering. LATER: Merge common parts with text function below.\n */\nmxSvgCanvas2D.prototype.updateText = function(x, y, w, h, align, valign, wrap, overflow, clip, rotation, node)\n{\n\tif (node != null && node.firstChild != null && node.firstChild.firstChild != null &&\n\t\tnode.firstChild.firstChild.firstChild != null)\n\t{\n\t\t// Uses outer group for opacity and transforms to\n\t\t// fix rendering order in Chrome\n\t\tvar group = node.firstChild;\n\t\tvar fo = group.firstChild;\n\t\tvar div = fo.firstChild;\n\n\t\trotation = (rotation != null) ? rotation : 0;\n\t\t\n\t\tvar s = this.state;\n\t\tx += s.dx;\n\t\ty += s.dy;\n\t\t\n\t\tif (clip)\n\t\t{\n\t\t\tdiv.style.maxHeight = Math.round(h) + 'px';\n\t\t\tdiv.style.maxWidth = Math.round(w) + 'px';\n\t\t}\n\t\telse if (overflow == 'fill')\n\t\t{\n\t\t\tdiv.style.width = Math.round(w + 1) + 'px';\n\t\t\tdiv.style.height = Math.round(h + 1) + 'px';\n\t\t}\n\t\telse if (overflow == 'width')\n\t\t{\n\t\t\tdiv.style.width = Math.round(w + 1) + 'px';\n\t\t\t\n\t\t\tif (h > 0)\n\t\t\t{\n\t\t\t\tdiv.style.maxHeight = Math.round(h) + 'px';\n\t\t\t}\n\t\t}\n\n\t\tif (wrap && w > 0)\n\t\t{\n\t\t\tdiv.style.width = Math.round(w + 1) + 'px';\n\t\t}\n\t\t\n\t\t// Code that depends on the size which is computed after\n\t\t// the element was added to the DOM.\n\t\tvar ow = 0;\n\t\tvar oh = 0;\n\t\t\n\t\t// Padding avoids clipping on border and wrapping for differing font metrics on platforms\n\t\tvar padX = 0;\n\t\tvar padY = 2;\n\n\t\tvar sizeDiv = div;\n\t\t\n\t\tif (sizeDiv.firstChild != null && sizeDiv.firstChild.nodeName == 'DIV')\n\t\t{\n\t\t\tsizeDiv = sizeDiv.firstChild;\n\t\t}\n\t\t\n\t\tvar tmp = (group.mxCachedOffsetWidth != null) ? group.mxCachedOffsetWidth : sizeDiv.offsetWidth;\n\t\tow = tmp + padX;\n\n\t\t// Recomputes the height of the element for wrapped width\n\t\tif (wrap && overflow != 'fill')\n\t\t{\n\t\t\tif (clip)\n\t\t\t{\n\t\t\t\tow = Math.min(ow, w);\n\t\t\t}\n\t\t\t\n\t\t\tdiv.style.width = Math.round(ow + 1) + 'px';\n\t\t}\n\n\t\tow = (group.mxCachedFinalOffsetWidth != null) ? group.mxCachedFinalOffsetWidth : sizeDiv.offsetWidth;\n\t\toh = (group.mxCachedFinalOffsetHeight != null) ? group.mxCachedFinalOffsetHeight : sizeDiv.offsetHeight;\n\t\t\n\t\tif (this.cacheOffsetSize)\n\t\t{\n\t\t\tgroup.mxCachedOffsetWidth = tmp;\n\t\t\tgroup.mxCachedFinalOffsetWidth = ow;\n\t\t\tgroup.mxCachedFinalOffsetHeight = oh;\n\t\t}\n\t\t\n\t\tow += padX;\n\t\toh -= 2;\n\t\t\n\t\tif (clip)\n\t\t{\n\t\t\toh = Math.min(oh, h);\n\t\t\tow = Math.min(ow, w);\n\t\t}\n\n\t\tif (overflow == 'width')\n\t\t{\n\t\t\th = oh;\n\t\t}\n\t\telse if (overflow != 'fill')\n\t\t{\n\t\t\tw = ow;\n\t\t\th = oh;\n\t\t}\n\n\t\tvar dx = 0;\n\t\tvar dy = 0;\n\n\t\tif (align == mxConstants.ALIGN_CENTER)\n\t\t{\n\t\t\tdx -= w / 2;\n\t\t}\n\t\telse if (align == mxConstants.ALIGN_RIGHT)\n\t\t{\n\t\t\tdx -= w;\n\t\t}\n\t\t\n\t\tx += dx;\n\t\t\n\t\t// FIXME: LINE_HEIGHT not ideal for all text sizes, fix for export\n\t\tif (valign == mxConstants.ALIGN_MIDDLE)\n\t\t{\n\t\t\tdy -= h / 2;\n\t\t}\n\t\telse if (valign == mxConstants.ALIGN_BOTTOM)\n\t\t{\n\t\t\tdy -= h;\n\t\t}\n\t\t\n\t\t// Workaround for rendering offsets\n\t\t// TODO: Check if export needs these fixes, too\n\t\tif (overflow != 'fill' && mxClient.IS_FF && mxClient.IS_WIN)\n\t\t{\n\t\t\tdy -= 2;\n\t\t}\n\t\t\n\t\ty += dy;\n\n\t\tvar tr = (s.scale != 1) ? 'scale(' + s.scale + ')' : '';\n\n\t\tif (s.rotation != 0 && this.rotateHtml)\n\t\t{\n\t\t\ttr += 'rotate(' + (s.rotation) + ',' + (w / 2) + ',' + (h / 2) + ')';\n\t\t\tvar pt = this.rotatePoint((x + w / 2) * s.scale, (y + h / 2) * s.scale,\n\t\t\t\ts.rotation, s.rotationCx, s.rotationCy);\n\t\t\tx = pt.x - w * s.scale / 2;\n\t\t\ty = pt.y - h * s.scale / 2;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tx *= s.scale;\n\t\t\ty *= s.scale;\n\t\t}\n\n\t\tif (rotation != 0)\n\t\t{\n\t\t\ttr += 'rotate(' + (rotation) + ',' + (-dx) + ',' + (-dy) + ')';\n\t\t}\n\n\t\tgroup.setAttribute('transform', 'translate(' + Math.round(x) + ',' + Math.round(y) + ')' + tr);\n\t\tfo.setAttribute('width', Math.round(Math.max(1, w)));\n\t\tfo.setAttribute('height', Math.round(Math.max(1, h)));\n\t}\n};\n\n/**\n * Function: text\n * \n * Paints the given text. Possible values for format are empty string for plain\n * text and html for HTML markup. Note that HTML markup is only supported if\n * foreignObject is supported and <foEnabled> is true. (This means IE9 and later\n * does currently not support HTML text as part of shapes.)\n */\nmxSvgCanvas2D.prototype.text = function(x, y, w, h, str, align, valign, wrap, format, overflow, clip, rotation, dir)\n{\n\tif (this.textEnabled && str != null)\n\t{\n\t\trotation = (rotation != null) ? rotation : 0;\n\t\t\n\t\tvar s = this.state;\n\t\tx += s.dx;\n\t\ty += s.dy;\n\t\t\n\t\tif (this.foEnabled && format == 'html')\n\t\t{\n\t\t\tvar style = 'vertical-align:top;';\n\t\t\t\n\t\t\tif (clip)\n\t\t\t{\n\t\t\t\tstyle += 'overflow:hidden;max-height:' + Math.round(h) + 'px;max-width:' + Math.round(w) + 'px;';\n\t\t\t}\n\t\t\telse if (overflow == 'fill')\n\t\t\t{\n\t\t\t\tstyle += 'width:' + Math.round(w + 1) + 'px;height:' + Math.round(h + 1) + 'px;overflow:hidden;';\n\t\t\t}\n\t\t\telse if (overflow == 'width')\n\t\t\t{\n\t\t\t\tstyle += 'width:' + Math.round(w + 1) + 'px;';\n\t\t\t\t\n\t\t\t\tif (h > 0)\n\t\t\t\t{\n\t\t\t\t\tstyle += 'max-height:' + Math.round(h) + 'px;overflow:hidden;';\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (wrap && w > 0)\n\t\t\t{\n\t\t\t\tstyle += 'width:' + Math.round(w + 1) + 'px;white-space:normal;word-wrap:' +\n\t\t\t\t\tmxConstants.WORD_WRAP + ';';\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tstyle += 'white-space:nowrap;';\n\t\t\t}\n\t\t\t\n\t\t\t// Uses outer group for opacity and transforms to\n\t\t\t// fix rendering order in Chrome\n\t\t\tvar group = this.createElement('g');\n\t\t\t\n\t\t\tif (s.alpha < 1)\n\t\t\t{\n\t\t\t\tgroup.setAttribute('opacity', s.alpha);\n\t\t\t}\n\n\t\t\tvar fo = this.createElement('foreignObject');\n\t\t\tfo.setAttribute('style', 'overflow:visible;');\n\t\t\tfo.setAttribute('pointer-events', 'all');\n\t\t\t\n\t\t\tvar div = this.createDiv(str, align, valign, style, overflow);\n\t\t\t\n\t\t\t// Ignores invalid XHTML labels\n\t\t\tif (div == null)\n\t\t\t{\n\t\t\t\treturn;\n\t\t\t}\n\t\t\telse if (dir != null)\n\t\t\t{\n\t\t\t\tdiv.setAttribute('dir', dir);\n\t\t\t}\n\n\t\t\tgroup.appendChild(fo);\n\t\t\tthis.root.appendChild(group);\n\t\t\t\n\t\t\t// Code that depends on the size which is computed after\n\t\t\t// the element was added to the DOM.\n\t\t\tvar ow = 0;\n\t\t\tvar oh = 0;\n\t\t\t\n\t\t\t// Padding avoids clipping on border and wrapping for differing font metrics on platforms\n\t\t\tvar padX = 2;\n\t\t\tvar padY = 2;\n\n\t\t\t// NOTE: IE is always export as it does not support foreign objects\n\t\t\tif (mxClient.IS_IE && (document.documentMode == 9 || !mxClient.IS_SVG))\n\t\t\t{\n\t\t\t\t// Handles non-standard namespace for getting size in IE\n\t\t\t\tvar clone = document.createElement('div');\n\t\t\t\t\n\t\t\t\tclone.style.cssText = div.getAttribute('style');\n\t\t\t\tclone.style.display = (mxClient.IS_QUIRKS) ? 'inline' : 'inline-block';\n\t\t\t\tclone.style.position = 'absolute';\n\t\t\t\tclone.style.visibility = 'hidden';\n\n\t\t\t\t// Inner DIV is needed for text measuring\n\t\t\t\tvar div2 = document.createElement('div');\n\t\t\t\tdiv2.style.display = (mxClient.IS_QUIRKS) ? 'inline' : 'inline-block';\n\t\t\t\tdiv2.style.wordWrap = mxConstants.WORD_WRAP;\n\t\t\t\tdiv2.innerHTML = (mxUtils.isNode(str)) ? str.outerHTML : str;\n\t\t\t\tclone.appendChild(div2);\n\n\t\t\t\tdocument.body.appendChild(clone);\n\n\t\t\t\t// Workaround for different box models\n\t\t\t\tif (document.documentMode != 8 && document.documentMode != 9 && s.fontBorderColor != null)\n\t\t\t\t{\n\t\t\t\t\tpadX += 2;\n\t\t\t\t\tpadY += 2;\n\t\t\t\t}\n\n\t\t\t\tif (wrap && w > 0)\n\t\t\t\t{\n\t\t\t\t\tvar tmp = div2.offsetWidth;\n\t\t\t\t\t\n\t\t\t\t\t// Workaround for adding padding twice in IE8/IE9 standards mode if label is wrapped\n\t\t\t\t\tpadDx = 0;\n\t\t\t\t\t\n\t\t\t\t\t// For export, if no wrapping occurs, we add a large padding to make\n\t\t\t\t\t// sure there is no wrapping even if the text metrics are different.\n\t\t\t\t\t// This adds support for text metrics on different operating systems.\n\t\t\t\t\t// Disables wrapping if text is not wrapped for given width\n\t\t\t\t\tif (!clip && wrap && w > 0 && this.root.ownerDocument != document && overflow != 'fill')\n\t\t\t\t\t{\n\t\t\t\t\t\tvar ws = clone.style.whiteSpace;\n\t\t\t\t\t\tdiv2.style.whiteSpace = 'nowrap';\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (tmp < div2.offsetWidth)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tclone.style.whiteSpace = ws;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif (clip)\n\t\t\t\t\t{\n\t\t\t\t\t\ttmp = Math.min(tmp, w);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tclone.style.width = tmp + 'px';\n\t\n\t\t\t\t\t// Padding avoids clipping on border\n\t\t\t\t\tow = div2.offsetWidth + padX + padDx;\n\t\t\t\t\toh = div2.offsetHeight + padY;\n\t\t\t\t\t\n\t\t\t\t\t// Overrides the width of the DIV via XML DOM by using the\n\t\t\t\t\t// clone DOM style, getting the CSS text for that and\n\t\t\t\t\t// then setting that on the DIV via setAttribute\n\t\t\t\t\tclone.style.display = 'inline-block';\n\t\t\t\t\tclone.style.position = '';\n\t\t\t\t\tclone.style.visibility = '';\n\t\t\t\t\tclone.style.width = ow + 'px';\n\t\t\t\t\t\n\t\t\t\t\tdiv.setAttribute('style', clone.style.cssText);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t// Padding avoids clipping on border\n\t\t\t\t\tow = div2.offsetWidth + padX;\n\t\t\t\t\toh = div2.offsetHeight + padY;\n\t\t\t\t}\n\n\t\t\t\tclone.parentNode.removeChild(clone);\n\t\t\t\tfo.appendChild(div);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// Uses document for text measuring during export\n\t\t\t\tif (this.root.ownerDocument != document)\n\t\t\t\t{\n\t\t\t\t\tdiv.style.visibility = 'hidden';\n\t\t\t\t\tdocument.body.appendChild(div);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tfo.appendChild(div);\n\t\t\t\t}\n\n\t\t\t\tvar sizeDiv = div;\n\t\t\t\t\n\t\t\t\tif (sizeDiv.firstChild != null && sizeDiv.firstChild.nodeName == 'DIV')\n\t\t\t\t{\n\t\t\t\t\tsizeDiv = sizeDiv.firstChild;\n\t\t\t\t\t\n\t\t\t\t\tif (wrap && div.style.wordWrap == 'break-word')\n\t\t\t\t\t{\n\t\t\t\t\t\tsizeDiv.style.width = '100%';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tvar tmp = sizeDiv.offsetWidth;\n\t\t\t\t\n\t\t\t\t// Workaround for text measuring in hidden containers\n\t\t\t\tif (tmp == 0 && div.parentNode == fo)\n\t\t\t\t{\n\t\t\t\t\tdiv.style.visibility = 'hidden';\n\t\t\t\t\tdocument.body.appendChild(div);\n\t\t\t\t\t\n\t\t\t\t\ttmp = sizeDiv.offsetWidth;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (this.cacheOffsetSize)\n\t\t\t\t{\n\t\t\t\t\tgroup.mxCachedOffsetWidth = tmp;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// Disables wrapping if text is not wrapped for given width\n\t\t\t\tif (!clip && wrap && w > 0 && this.root.ownerDocument != document &&\n\t\t\t\t\toverflow != 'fill' && overflow != 'width')\n\t\t\t\t{\n\t\t\t\t\tvar ws = div.style.whiteSpace;\n\t\t\t\t\tdiv.style.whiteSpace = 'nowrap';\n\t\t\t\t\t\n\t\t\t\t\tif (tmp < sizeDiv.offsetWidth)\n\t\t\t\t\t{\n\t\t\t\t\t\tdiv.style.whiteSpace = ws;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tow = tmp + padX - 1;\n\n\t\t\t\t// Recomputes the height of the element for wrapped width\n\t\t\t\tif (wrap && overflow != 'fill' && overflow != 'width')\n\t\t\t\t{\n\t\t\t\t\tif (clip)\n\t\t\t\t\t{\n\t\t\t\t\t\tow = Math.min(ow, w);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tdiv.style.width = ow + 'px';\n\t\t\t\t}\n\n\t\t\t\tow = sizeDiv.offsetWidth;\n\t\t\t\toh = sizeDiv.offsetHeight;\n\t\t\t\t\n\t\t\t\tif (this.cacheOffsetSize)\n\t\t\t\t{\n\t\t\t\t\tgroup.mxCachedFinalOffsetWidth = ow;\n\t\t\t\t\tgroup.mxCachedFinalOffsetHeight = oh;\n\t\t\t\t}\n\n\t\t\t\toh -= padY;\n\t\t\t\t\n\t\t\t\tif (div.parentNode != fo)\n\t\t\t\t{\n\t\t\t\t\tfo.appendChild(div);\n\t\t\t\t\tdiv.style.visibility = '';\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (clip)\n\t\t\t{\n\t\t\t\toh = Math.min(oh, h);\n\t\t\t\tow = Math.min(ow, w);\n\t\t\t}\n\n\t\t\tif (overflow == 'width')\n\t\t\t{\n\t\t\t\th = oh;\n\t\t\t}\n\t\t\telse if (overflow != 'fill')\n\t\t\t{\n\t\t\t\tw = ow;\n\t\t\t\th = oh;\n\t\t\t}\n\n\t\t\tif (s.alpha < 1)\n\t\t\t{\n\t\t\t\tgroup.setAttribute('opacity', s.alpha);\n\t\t\t}\n\t\t\t\n\t\t\tvar dx = 0;\n\t\t\tvar dy = 0;\n\n\t\t\tif (align == mxConstants.ALIGN_CENTER)\n\t\t\t{\n\t\t\t\tdx -= w / 2;\n\t\t\t}\n\t\t\telse if (align == mxConstants.ALIGN_RIGHT)\n\t\t\t{\n\t\t\t\tdx -= w;\n\t\t\t}\n\t\t\t\n\t\t\tx += dx;\n\t\t\t\n\t\t\t// FIXME: LINE_HEIGHT not ideal for all text sizes, fix for export\n\t\t\tif (valign == mxConstants.ALIGN_MIDDLE)\n\t\t\t{\n\t\t\t\tdy -= h / 2;\n\t\t\t}\n\t\t\telse if (valign == mxConstants.ALIGN_BOTTOM)\n\t\t\t{\n\t\t\t\tdy -= h;\n\t\t\t}\n\t\t\t\n\t\t\t// Workaround for rendering offsets\n\t\t\t// TODO: Check if export needs these fixes, too\n\t\t\t//if (this.root.ownerDocument == document)\n\t\t\tif (overflow != 'fill' && mxClient.IS_FF && mxClient.IS_WIN)\n\t\t\t{\n\t\t\t\tdy -= 2;\n\t\t\t}\n\t\t\t\n\t\t\ty += dy;\n\n\t\t\tvar tr = (s.scale != 1) ? 'scale(' + s.scale + ')' : '';\n\n\t\t\tif (s.rotation != 0 && this.rotateHtml)\n\t\t\t{\n\t\t\t\ttr += 'rotate(' + (s.rotation) + ',' + (w / 2) + ',' + (h / 2) + ')';\n\t\t\t\tvar pt = this.rotatePoint((x + w / 2) * s.scale, (y + h / 2) * s.scale,\n\t\t\t\t\ts.rotation, s.rotationCx, s.rotationCy);\n\t\t\t\tx = pt.x - w * s.scale / 2;\n\t\t\t\ty = pt.y - h * s.scale / 2;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tx *= s.scale;\n\t\t\t\ty *= s.scale;\n\t\t\t}\n\n\t\t\tif (rotation != 0)\n\t\t\t{\n\t\t\t\ttr += 'rotate(' + (rotation) + ',' + (-dx) + ',' + (-dy) + ')';\n\t\t\t}\n\n\t\t\tgroup.setAttribute('transform', 'translate(' + (Math.round(x) + this.foOffset) + ',' +\n\t\t\t\t(Math.round(y) + this.foOffset) + ')' + tr);\n\t\t\tfo.setAttribute('width', Math.round(Math.max(1, w)));\n\t\t\tfo.setAttribute('height', Math.round(Math.max(1, h)));\n\t\t\t\n\t\t\t// Adds alternate content if foreignObject not supported in viewer\n\t\t\tif (this.root.ownerDocument != document)\n\t\t\t{\n\t\t\t\tvar alt = this.createAlternateContent(fo, x, y, w, h, str, align, valign, wrap, format, overflow, clip, rotation);\n\t\t\t\t\n\t\t\t\tif (alt != null)\n\t\t\t\t{\n\t\t\t\t\tfo.setAttribute('requiredFeatures', 'http://www.w3.org/TR/SVG11/feature#Extensibility');\n\t\t\t\t\tvar sw = this.createElement('switch');\n\t\t\t\t\tsw.appendChild(fo);\n\t\t\t\t\tsw.appendChild(alt);\n\t\t\t\t\tgroup.appendChild(sw);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tthis.plainText(x, y, w, h, str, align, valign, wrap, overflow, clip, rotation, dir);\n\t\t}\n\t}\n};\n\n/**\n * Function: createClip\n * \n * Creates a clip for the given coordinates.\n */\nmxSvgCanvas2D.prototype.createClip = function(x, y, w, h)\n{\n\tx = Math.round(x);\n\ty = Math.round(y);\n\tw = Math.round(w);\n\th = Math.round(h);\n\t\n\tvar id = 'mx-clip-' + x + '-' + y + '-' + w + '-' + h;\n\n\tvar counter = 0;\n\tvar tmp = id + '-' + counter;\n\t\n\t// Resolves ID conflicts\n\twhile (document.getElementById(tmp) != null)\n\t{\n\t\ttmp = id + '-' + (++counter);\n\t}\n\t\n\tclip = this.createElement('clipPath');\n\tclip.setAttribute('id', tmp);\n\t\n\tvar rect = this.createElement('rect');\n\trect.setAttribute('x', x);\n\trect.setAttribute('y', y);\n\trect.setAttribute('width', w);\n\trect.setAttribute('height', h);\n\t\t\n\tclip.appendChild(rect);\n\t\n\treturn clip;\n};\n\n/**\n * Function: text\n * \n * Paints the given text. Possible values for format are empty string for\n * plain text and html for HTML markup.\n */\nmxSvgCanvas2D.prototype.plainText = function(x, y, w, h, str, align, valign, wrap, overflow, clip, rotation, dir)\n{\n\trotation = (rotation != null) ? rotation : 0;\n\tvar s = this.state;\n\tvar size = s.fontSize;\n\tvar node = this.createElement('g');\n\tvar tr = s.transform || '';\n\tthis.updateFont(node);\n\t\n\t// Non-rotated text\n\tif (rotation != 0)\n\t{\n\t\ttr += 'rotate(' + rotation  + ',' + this.format(x * s.scale) + ',' + this.format(y * s.scale) + ')';\n\t}\n\t\n\tif (dir != null)\n\t{\n\t\tnode.setAttribute('direction', dir);\n\t}\n\n\tif (clip && w > 0 && h > 0)\n\t{\n\t\tvar cx = x;\n\t\tvar cy = y;\n\t\t\n\t\tif (align == mxConstants.ALIGN_CENTER)\n\t\t{\n\t\t\tcx -= w / 2;\n\t\t}\n\t\telse if (align == mxConstants.ALIGN_RIGHT)\n\t\t{\n\t\t\tcx -= w;\n\t\t}\n\t\t\n\t\tif (overflow != 'fill')\n\t\t{\n\t\t\tif (valign == mxConstants.ALIGN_MIDDLE)\n\t\t\t{\n\t\t\t\tcy -= h / 2;\n\t\t\t}\n\t\t\telse if (valign == mxConstants.ALIGN_BOTTOM)\n\t\t\t{\n\t\t\t\tcy -= h;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// LATER: Remove spacing from clip rectangle\n\t\tvar c = this.createClip(cx * s.scale - 2, cy * s.scale - 2, w * s.scale + 4, h * s.scale + 4);\n\t\t\n\t\tif (this.defs != null)\n\t\t{\n\t\t\tthis.defs.appendChild(c);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Makes sure clip is removed with referencing node\n\t\t\tthis.root.appendChild(c);\n\t\t}\n\t\t\n\t\tif (!mxClient.IS_CHROME_APP && !mxClient.IS_IE && !mxClient.IS_IE11 &&\n\t\t\t!mxClient.IS_EDGE && this.root.ownerDocument == document)\n\t\t{\n\t\t\t// Workaround for potential base tag\n\t\t\tvar base = this.getBaseUrl().replace(/([\\(\\)])/g, '\\\\$1');\n\t\t\tnode.setAttribute('clip-path', 'url(' + base + '#' + c.getAttribute('id') + ')');\n\t\t}\n\t\telse\n\t\t{\n\t\t\tnode.setAttribute('clip-path', 'url(#' + c.getAttribute('id') + ')');\n\t\t}\n\t}\n\n\t// Default is left\n\tvar anchor = (align == mxConstants.ALIGN_RIGHT) ? 'end' :\n\t\t\t\t\t(align == mxConstants.ALIGN_CENTER) ? 'middle' :\n\t\t\t\t\t'start';\n\n\t// Text-anchor start is default in SVG\n\tif (anchor != 'start')\n\t{\n\t\tnode.setAttribute('text-anchor', anchor);\n\t}\n\t\n\tif (!this.styleEnabled || size != mxConstants.DEFAULT_FONTSIZE)\n\t{\n\t\tnode.setAttribute('font-size', (size * s.scale) + 'px');\n\t}\n\t\n\tif (tr.length > 0)\n\t{\n\t\tnode.setAttribute('transform', tr);\n\t}\n\t\n\tif (s.alpha < 1)\n\t{\n\t\tnode.setAttribute('opacity', s.alpha);\n\t}\n\t\n\tvar lines = str.split('\\n');\n\tvar lh = Math.round(size * mxConstants.LINE_HEIGHT);\n\tvar textHeight = size + (lines.length - 1) * lh;\n\n\tvar cy = y + size - 1;\n\n\tif (valign == mxConstants.ALIGN_MIDDLE)\n\t{\n\t\tif (overflow == 'fill')\n\t\t{\n\t\t\tcy -= h / 2;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tvar dy = ((this.matchHtmlAlignment && clip && h > 0) ? Math.min(textHeight, h) : textHeight) / 2;\n\t\t\tcy -= dy + 1;\n\t\t}\n\t}\n\telse if (valign == mxConstants.ALIGN_BOTTOM)\n\t{\n\t\tif (overflow == 'fill')\n\t\t{\n\t\t\tcy -= h;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tvar dy = (this.matchHtmlAlignment && clip && h > 0) ? Math.min(textHeight, h) : textHeight;\n\t\t\tcy -= dy + 2;\n\t\t}\n\t}\n\n\tfor (var i = 0; i < lines.length; i++)\n\t{\n\t\t// Workaround for bounding box of empty lines and spaces\n\t\tif (lines[i].length > 0 && mxUtils.trim(lines[i]).length > 0)\n\t\t{\n\t\t\tvar text = this.createElement('text');\n\t\t\t// LATER: Match horizontal HTML alignment\n\t\t\ttext.setAttribute('x', this.format(x * s.scale) + this.textOffset);\n\t\t\ttext.setAttribute('y', this.format(cy * s.scale) + this.textOffset);\n\t\t\t\n\t\t\tmxUtils.write(text, lines[i]);\n\t\t\tnode.appendChild(text);\n\t\t}\n\n\t\tcy += lh;\n\t}\n\n\tthis.root.appendChild(node);\n\tthis.addTextBackground(node, str, x, y, w, (overflow == 'fill') ? h : textHeight, align, valign, overflow);\n};\n\n/**\n * Function: updateFont\n * \n * Updates the text properties for the given node. (NOTE: For this to work in\n * IE, the given node must be a text or tspan element.)\n */\nmxSvgCanvas2D.prototype.updateFont = function(node)\n{\n\tvar s = this.state;\n\n\tnode.setAttribute('fill', s.fontColor);\n\t\n\tif (!this.styleEnabled || s.fontFamily != mxConstants.DEFAULT_FONTFAMILY)\n\t{\n\t\tnode.setAttribute('font-family', s.fontFamily);\n\t}\n\n\tif ((s.fontStyle & mxConstants.FONT_BOLD) == mxConstants.FONT_BOLD)\n\t{\n\t\tnode.setAttribute('font-weight', 'bold');\n\t}\n\n\tif ((s.fontStyle & mxConstants.FONT_ITALIC) == mxConstants.FONT_ITALIC)\n\t{\n\t\tnode.setAttribute('font-style', 'italic');\n\t}\n\t\n\tif ((s.fontStyle & mxConstants.FONT_UNDERLINE) == mxConstants.FONT_UNDERLINE)\n\t{\n\t\tnode.setAttribute('text-decoration', 'underline');\n\t}\n};\n\n/**\n * Function: addTextBackground\n * \n * Background color and border\n */\nmxSvgCanvas2D.prototype.addTextBackground = function(node, str, x, y, w, h, align, valign, overflow)\n{\n\tvar s = this.state;\n\n\tif (s.fontBackgroundColor != null || s.fontBorderColor != null)\n\t{\n\t\tvar bbox = null;\n\t\t\n\t\tif (overflow == 'fill' || overflow == 'width')\n\t\t{\n\t\t\tif (align == mxConstants.ALIGN_CENTER)\n\t\t\t{\n\t\t\t\tx -= w / 2;\n\t\t\t}\n\t\t\telse if (align == mxConstants.ALIGN_RIGHT)\n\t\t\t{\n\t\t\t\tx -= w;\n\t\t\t}\n\t\t\t\n\t\t\tif (valign == mxConstants.ALIGN_MIDDLE)\n\t\t\t{\n\t\t\t\ty -= h / 2;\n\t\t\t}\n\t\t\telse if (valign == mxConstants.ALIGN_BOTTOM)\n\t\t\t{\n\t\t\t\ty -= h;\n\t\t\t}\n\t\t\t\n\t\t\tbbox = new mxRectangle((x + 1) * s.scale, y * s.scale, (w - 2) * s.scale, (h + 2) * s.scale);\n\t\t}\n\t\telse if (node.getBBox != null && this.root.ownerDocument == document)\n\t\t{\n\t\t\t// Uses getBBox only if inside document for correct size\n\t\t\ttry\n\t\t\t{\n\t\t\t\tbbox = node.getBBox();\n\t\t\t\tvar ie = mxClient.IS_IE && mxClient.IS_SVG;\n\t\t\t\tbbox = new mxRectangle(bbox.x, bbox.y + ((ie) ? 0 : 1), bbox.width, bbox.height + ((ie) ? 1 : 0));\n\t\t\t}\n\t\t\tcatch (e)\n\t\t\t{\n\t\t\t\t// Ignores NS_ERROR_FAILURE in FF if container display is none.\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Computes size if not in document or no getBBox available\n\t\t\tvar div = document.createElement('div');\n\n\t\t\t// Wrapping and clipping can be ignored here\n\t\t\tdiv.style.lineHeight = (mxConstants.ABSOLUTE_LINE_HEIGHT) ? (s.fontSize * mxConstants.LINE_HEIGHT) + 'px' : mxConstants.LINE_HEIGHT;\n\t\t\tdiv.style.fontSize = s.fontSize + 'px';\n\t\t\tdiv.style.fontFamily = s.fontFamily;\n\t\t\tdiv.style.whiteSpace = 'nowrap';\n\t\t\tdiv.style.position = 'absolute';\n\t\t\tdiv.style.visibility = 'hidden';\n\t\t\tdiv.style.display = (mxClient.IS_QUIRKS) ? 'inline' : 'inline-block';\n\t\t\tdiv.style.zoom = '1';\n\t\t\t\n\t\t\tif ((s.fontStyle & mxConstants.FONT_BOLD) == mxConstants.FONT_BOLD)\n\t\t\t{\n\t\t\t\tdiv.style.fontWeight = 'bold';\n\t\t\t}\n\n\t\t\tif ((s.fontStyle & mxConstants.FONT_ITALIC) == mxConstants.FONT_ITALIC)\n\t\t\t{\n\t\t\t\tdiv.style.fontStyle = 'italic';\n\t\t\t}\n\t\t\t\n\t\t\tstr = mxUtils.htmlEntities(str, false);\n\t\t\tdiv.innerHTML = str.replace(/\\n/g, '<br/>');\n\t\t\t\n\t\t\tdocument.body.appendChild(div);\n\t\t\tvar w = div.offsetWidth;\n\t\t\tvar h = div.offsetHeight;\n\t\t\tdiv.parentNode.removeChild(div);\n\t\t\t\n\t\t\tif (align == mxConstants.ALIGN_CENTER)\n\t\t\t{\n\t\t\t\tx -= w / 2;\n\t\t\t}\n\t\t\telse if (align == mxConstants.ALIGN_RIGHT)\n\t\t\t{\n\t\t\t\tx -= w;\n\t\t\t}\n\t\t\t\n\t\t\tif (valign == mxConstants.ALIGN_MIDDLE)\n\t\t\t{\n\t\t\t\ty -= h / 2;\n\t\t\t}\n\t\t\telse if (valign == mxConstants.ALIGN_BOTTOM)\n\t\t\t{\n\t\t\t\ty -= h;\n\t\t\t}\n\t\t\t\n\t\t\tbbox = new mxRectangle((x + 1) * s.scale, (y + 2) * s.scale, w * s.scale, (h + 1) * s.scale);\n\t\t}\n\t\t\n\t\tif (bbox != null)\n\t\t{\n\t\t\tvar n = this.createElement('rect');\n\t\t\tn.setAttribute('fill', s.fontBackgroundColor || 'none');\n\t\t\tn.setAttribute('stroke', s.fontBorderColor || 'none');\n\t\t\tn.setAttribute('x', Math.floor(bbox.x - 1));\n\t\t\tn.setAttribute('y', Math.floor(bbox.y - 1));\n\t\t\tn.setAttribute('width', Math.ceil(bbox.width + 2));\n\t\t\tn.setAttribute('height', Math.ceil(bbox.height));\n\n\t\t\tvar sw = (s.fontBorderColor != null) ? Math.max(1, this.format(s.scale)) : 0;\n\t\t\tn.setAttribute('stroke-width', sw);\n\t\t\t\n\t\t\t// Workaround for crisp rendering - only required if not exporting\n\t\t\tif (this.root.ownerDocument == document && mxUtils.mod(sw, 2) == 1)\n\t\t\t{\n\t\t\t\tn.setAttribute('transform', 'translate(0.5, 0.5)');\n\t\t\t}\n\t\t\t\n\t\t\tnode.insertBefore(n, node.firstChild);\n\t\t}\n\t}\n};\n\n/**\n * Function: stroke\n * \n * Paints the outline of the current path.\n */\nmxSvgCanvas2D.prototype.stroke = function()\n{\n\tthis.addNode(false, true);\n};\n\n/**\n * Function: fill\n * \n * Fills the current path.\n */\nmxSvgCanvas2D.prototype.fill = function()\n{\n\tthis.addNode(true, false);\n};\n\n/**\n * Function: fillAndStroke\n * \n * Fills and paints the outline of the current path.\n */\nmxSvgCanvas2D.prototype.fillAndStroke = function()\n{\n\tthis.addNode(true, true);\n};\n"
  },
  {
    "path": "static/cherry/drawio_demo/src/js/util/mxToolbar.js",
    "content": "/**\n * Copyright (c) 2006-2015, JGraph Ltd\n * Copyright (c) 2006-2015, Gaudenz Alder\n */\n/**\n * Class: mxToolbar\n * \n * Creates a toolbar inside a given DOM node. The toolbar may contain icons,\n * buttons and combo boxes.\n * \n * Event: mxEvent.SELECT\n * \n * Fires when an item was selected in the toolbar. The <code>function</code>\n * property contains the function that was selected in <selectMode>.\n * \n * Constructor: mxToolbar\n * \n * Constructs a toolbar in the specified container.\n *\n * Parameters:\n *\n * container - DOM node that contains the toolbar.\n */\nfunction mxToolbar(container)\n{\n\tthis.container = container;\n};\n\n/**\n * Extends mxEventSource.\n */\nmxToolbar.prototype = new mxEventSource();\nmxToolbar.prototype.constructor = mxToolbar;\n\n/**\n * Variable: container\n * \n * Reference to the DOM nodes that contains the toolbar.\n */\nmxToolbar.prototype.container = null;\n\n/**\n * Variable: enabled\n * \n * Specifies if events are handled. Default is true.\n */\nmxToolbar.prototype.enabled = true;\n\n/**\n * Variable: noReset\n * \n * Specifies if <resetMode> requires a forced flag of true for resetting\n * the current mode in the toolbar. Default is false. This is set to true\n * if the toolbar item is double clicked to avoid a reset after a single\n * use of the item.\n */\nmxToolbar.prototype.noReset = false;\n\n/**\n * Variable: updateDefaultMode\n * \n * Boolean indicating if the default mode should be the last selected\n * switch mode or the first inserted switch mode. Default is true, that\n * is the last selected switch mode is the default mode. The default mode\n * is the mode to be selected after a reset of the toolbar. If this is\n * false, then the default mode is the first inserted mode item regardless\n * of what was last selected. Otherwise, the selected item after a reset is\n * the previously selected item.\n */\nmxToolbar.prototype.updateDefaultMode = true;\n\n/**\n * Function: addItem\n * \n * Adds the given function as an image with the specified title and icon\n * and returns the new image node.\n * \n * Parameters:\n * \n * title - Optional string that is used as the tooltip.\n * icon - Optional URL of the image to be used. If no URL is given, then a\n * button is created.\n * funct - Function to execute on a mouse click.\n * pressedIcon - Optional URL of the pressed image. Default is a gray\n * background.\n * style - Optional style classname. Default is mxToolbarItem.\n * factoryMethod - Optional factory method for popup menu, eg.\n * function(menu, evt, cell) { menu.addItem('Hello, World!'); }\n */\nmxToolbar.prototype.addItem = function(title, icon, funct, pressedIcon, style, factoryMethod)\n{\n\tvar img = document.createElement((icon != null) ? 'img' : 'button');\n\tvar initialClassName = style || ((factoryMethod != null) ?\n\t\t\t'mxToolbarMode' : 'mxToolbarItem');\n\timg.className = initialClassName;\n\timg.setAttribute('src', icon);\n\t\n\tif (title != null)\n\t{\n\t\tif (icon != null)\n\t\t{\n\t\t\timg.setAttribute('title', title);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tmxUtils.write(img, title);\n\t\t}\n\t}\n\t\n\tthis.container.appendChild(img);\n\n\t// Invokes the function on a click on the toolbar item\n\tif (funct != null)\n\t{\n\t\tmxEvent.addListener(img, 'click', funct);\n\t\t\n\t\tif (mxClient.IS_TOUCH)\n\t\t{\n\t\t\tmxEvent.addListener(img, 'touchend', funct);\n\t\t}\n\t}\n\n\tvar mouseHandler = mxUtils.bind(this, function(evt)\n\t{\n\t\tif (pressedIcon != null)\n\t\t{\n\t\t\timg.setAttribute('src', icon);\n\t\t}\n\t\telse\n\t\t{\n\t\t\timg.style.backgroundColor = '';\n\t\t}\n\t});\n\n\t// Highlights the toolbar item with a gray background\n\t// while it is being clicked with the mouse\n\tmxEvent.addGestureListeners(img, mxUtils.bind(this, function(evt)\n\t{\n\t\tif (pressedIcon != null)\n\t\t{\n\t\t\timg.setAttribute('src', pressedIcon);\n\t\t}\n\t\telse\n\t\t{\n\t\t\timg.style.backgroundColor = 'gray';\n\t\t}\n\t\t\n\t\t// Popup Menu\n\t\tif (factoryMethod != null)\n\t\t{\n\t\t\tif (this.menu == null)\n\t\t\t{\n\t\t\t\tthis.menu = new mxPopupMenu();\n\t\t\t\tthis.menu.init();\n\t\t\t}\n\t\t\t\n\t\t\tvar last = this.currentImg;\n\t\t\t\n\t\t\tif (this.menu.isMenuShowing())\n\t\t\t{\n\t\t\t\tthis.menu.hideMenu();\n\t\t\t}\n\t\t\t\n\t\t\tif (last != img)\n\t\t\t{\n\t\t\t\t// Redirects factory method to local factory method\n\t\t\t\tthis.currentImg = img;\n\t\t\t\tthis.menu.factoryMethod = factoryMethod;\n\t\t\t\t\n\t\t\t\tvar point = new mxPoint(\n\t\t\t\t\timg.offsetLeft,\n\t\t\t\t\timg.offsetTop + img.offsetHeight);\n\t\t\t\tthis.menu.popup(point.x, point.y, null, evt);\n\n\t\t\t\t// Sets and overrides to restore classname\n\t\t\t\tif (this.menu.isMenuShowing())\n\t\t\t\t{\n\t\t\t\t\timg.className = initialClassName + 'Selected';\n\t\t\t\t\t\n\t\t\t\t\tthis.menu.hideMenu = function()\n\t\t\t\t\t{\n\t\t\t\t\t\tmxPopupMenu.prototype.hideMenu.apply(this);\n\t\t\t\t\t\timg.className = initialClassName;\n\t\t\t\t\t\tthis.currentImg = null;\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}), null, mouseHandler);\n\n\tmxEvent.addListener(img, 'mouseout', mouseHandler);\n\t\n\treturn img;\n};\n\n/**\n * Function: addCombo\n * \n * Adds and returns a new SELECT element using the given style. The element\n * is placed inside a DIV with the mxToolbarComboContainer style classname.\n * \n * Parameters:\n * \n * style - Optional style classname. Default is mxToolbarCombo.\n */\nmxToolbar.prototype.addCombo = function(style)\n{\n\tvar div = document.createElement('div');\n\tdiv.style.display = 'inline';\n\tdiv.className = 'mxToolbarComboContainer';\n\t\n\tvar select = document.createElement('select');\n\tselect.className = style || 'mxToolbarCombo';\n\tdiv.appendChild(select);\n\t\n\tthis.container.appendChild(div);\n\t\n\treturn select;\n};\n\n/**\n * Function: addCombo\n * \n * Adds and returns a new SELECT element using the given title as the\n * default element. The selection is reset to this element after each\n * change.\n * \n * Parameters:\n * \n * title - String that specifies the title of the default element.\n * style - Optional style classname. Default is mxToolbarCombo.\n */\nmxToolbar.prototype.addActionCombo = function(title, style)\n{\n\tvar select = document.createElement('select');\n\tselect.className = style || 'mxToolbarCombo';\n\tthis.addOption(select, title, null);\n\t\n\tmxEvent.addListener(select, 'change', function(evt)\n\t{\n\t\tvar value = select.options[select.selectedIndex];\n\t\tselect.selectedIndex = 0;\n\t\t\n\t\tif (value.funct != null)\n\t\t{\n\t\t\tvalue.funct(evt);\n\t\t}\n\t});\n\t\n\tthis.container.appendChild(select);\n\t\n\treturn select;\n};\n\n/**\n * Function: addOption\n * \n * Adds and returns a new OPTION element inside the given SELECT element.\n * If the given value is a function then it is stored in the option's funct\n * field.\n * \n * Parameters:\n * \n * combo - SELECT element that will contain the new entry.\n * title - String that specifies the title of the option.\n * value - Specifies the value associated with this option.\n */\nmxToolbar.prototype.addOption = function(combo, title, value)\n{\n\tvar option = document.createElement('option');\n\tmxUtils.writeln(option, title);\n\t\n\tif (typeof(value) == 'function')\n\t{\n\t\toption.funct = value;\n\t}\n\telse\n\t{\n\t\toption.setAttribute('value', value);\n\t}\n\t\n\tcombo.appendChild(option);\n\t\n\treturn option;\n};\n\n/**\n * Function: addSwitchMode\n * \n * Adds a new selectable item to the toolbar. Only one switch mode item may\n * be selected at a time. The currently selected item is the default item\n * after a reset of the toolbar.\n */\nmxToolbar.prototype.addSwitchMode = function(title, icon, funct, pressedIcon, style)\n{\n\tvar img = document.createElement('img');\n\timg.initialClassName = style || 'mxToolbarMode';\n\timg.className = img.initialClassName;\n\timg.setAttribute('src', icon);\n\timg.altIcon = pressedIcon;\n\t\n\tif (title != null)\n\t{\n\t\timg.setAttribute('title', title);\n\t}\n\t\n\tmxEvent.addListener(img, 'click', mxUtils.bind(this, function(evt)\n\t{\n\t\tvar tmp = this.selectedMode.altIcon;\n\t\t\n\t\tif (tmp != null)\n\t\t{\n\t\t\tthis.selectedMode.altIcon = this.selectedMode.getAttribute('src');\n\t\t\tthis.selectedMode.setAttribute('src', tmp);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tthis.selectedMode.className = this.selectedMode.initialClassName;\n\t\t}\n\t\t\n\t\tif (this.updateDefaultMode)\n\t\t{\n\t\t\tthis.defaultMode = img;\n\t\t}\n\t\t\n\t\tthis.selectedMode = img;\n\t\t\n\t\tvar tmp = img.altIcon;\n\t\t\n\t\tif (tmp != null)\n\t\t{\n\t\t\timg.altIcon = img.getAttribute('src');\n\t\t\timg.setAttribute('src', tmp);\n\t\t}\n\t\telse\n\t\t{\n\t\t\timg.className = img.initialClassName+'Selected';\n\t\t}\n\t\t\n\t\tthis.fireEvent(new mxEventObject(mxEvent.SELECT));\n\t\tfunct();\n\t}));\n\t\n\tthis.container.appendChild(img);\n\t\n\tif (this.defaultMode == null)\n\t{\n\t\tthis.defaultMode = img;\n\t\t\n\t\t// Function should fire only once so\n\t\t// do not pass it with the select event\n\t\tthis.selectMode(img);\n\t\tfunct();\n\t}\n\t\n\treturn img;\n};\n\n/**\n * Function: addMode\n * \n * Adds a new item to the toolbar. The selection is typically reset after\n * the item has been consumed, for example by adding a new vertex to the\n * graph. The reset is not carried out if the item is double clicked.\n * \n * The function argument uses the following signature: funct(evt, cell) where\n * evt is the native mouse event and cell is the cell under the mouse.\n */\nmxToolbar.prototype.addMode = function(title, icon, funct, pressedIcon, style, toggle)\n{\n\ttoggle = (toggle != null) ? toggle : true;\n\tvar img = document.createElement((icon != null) ? 'img' : 'button');\n\t\n\timg.initialClassName = style || 'mxToolbarMode';\n\timg.className = img.initialClassName;\n\timg.setAttribute('src', icon);\n\timg.altIcon = pressedIcon;\n\n\tif (title != null)\n\t{\n\t\timg.setAttribute('title', title);\n\t}\n\t\n\tif (this.enabled && toggle)\n\t{\n\t\tmxEvent.addListener(img, 'click', mxUtils.bind(this, function(evt)\n\t\t{\n\t\t\tthis.selectMode(img, funct);\n\t\t\tthis.noReset = false;\n\t\t}));\n\t\t\n\t\tmxEvent.addListener(img, 'dblclick', mxUtils.bind(this, function(evt)\n\t\t{\n\t\t\tthis.selectMode(img, funct);\n\t\t\tthis.noReset = true;\n\t\t}));\n\t\t\n\t\tif (this.defaultMode == null)\n\t\t{\n\t\t\tthis.defaultMode = img;\n\t\t\tthis.defaultFunction = funct;\n\t\t\tthis.selectMode(img, funct);\n\t\t}\n\t}\n\n\tthis.container.appendChild(img);\t\t\t\t\t\n\n\treturn img;\n};\n\n/**\n * Function: selectMode\n * \n * Resets the state of the previously selected mode and displays the given\n * DOM node as selected. This function fires a select event with the given\n * function as a parameter.\n */\nmxToolbar.prototype.selectMode = function(domNode, funct)\n{\n\tif (this.selectedMode != domNode)\n\t{\n\t\tif (this.selectedMode != null)\n\t\t{\n\t\t\tvar tmp = this.selectedMode.altIcon;\n\t\t\t\n\t\t\tif (tmp != null)\n\t\t\t{\n\t\t\t\tthis.selectedMode.altIcon = this.selectedMode.getAttribute('src');\n\t\t\t\tthis.selectedMode.setAttribute('src', tmp);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tthis.selectedMode.className = this.selectedMode.initialClassName;\n\t\t\t}\n\t\t}\n\t\t\n\t\tthis.selectedMode = domNode;\n\t\tvar tmp = this.selectedMode.altIcon;\n\t\t\n\t\tif (tmp != null)\n\t\t{\n\t\t\tthis.selectedMode.altIcon = this.selectedMode.getAttribute('src');\n\t\t\tthis.selectedMode.setAttribute('src', tmp);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tthis.selectedMode.className = this.selectedMode.initialClassName+'Selected';\n\t\t}\n\t\t\n\t\tthis.fireEvent(new mxEventObject(mxEvent.SELECT, \"function\", funct));\n\t}\n};\n\n/**\n * Function: resetMode\n * \n * Selects the default mode and resets the state of the previously selected\n * mode.\n */\nmxToolbar.prototype.resetMode = function(forced)\n{\n\tif ((forced || !this.noReset) && this.selectedMode != this.defaultMode)\n\t{\n\t\t// The last selected switch mode will be activated\n\t\t// so the function was already executed and is\n\t\t// no longer required here\n\t\tthis.selectMode(this.defaultMode, this.defaultFunction);\n\t}\n};\n\n/**\n * Function: addSeparator\n * \n * Adds the specifies image as a separator.\n * \n * Parameters:\n * \n * icon - URL of the separator icon.\n */\nmxToolbar.prototype.addSeparator = function(icon)\n{\n\treturn this.addItem(null, icon, null);\n};\n\n/**\n * Function: addBreak\n * \n * Adds a break to the container.\n */\nmxToolbar.prototype.addBreak = function()\n{\n\tmxUtils.br(this.container);\n};\n\n/**\n * Function: addLine\n * \n * Adds a horizontal line to the container.\n */\nmxToolbar.prototype.addLine = function()\n{\n\tvar hr = document.createElement('hr');\n\t\n\thr.style.marginRight = '6px';\n\thr.setAttribute('size', '1');\n\t\n\tthis.container.appendChild(hr);\n};\n\n/**\n * Function: destroy\n * \n * Removes the toolbar and all its associated resources.\n */\nmxToolbar.prototype.destroy = function ()\n{\n\tmxEvent.release(this.container);\n\tthis.container = null;\n\tthis.defaultMode = null;\n\tthis.defaultFunction = null;\n\tthis.selectedMode = null;\n\t\n\tif (this.menu != null)\n\t{\n\t\tthis.menu.destroy();\n\t}\n};\n"
  },
  {
    "path": "static/cherry/drawio_demo/src/js/util/mxUndoManager.js",
    "content": "/**\n * Copyright (c) 2006-2015, JGraph Ltd\n * Copyright (c) 2006-2015, Gaudenz Alder\n */\n/**\n * Class: mxUndoManager\n *\n * Implements a command history. When changing the graph model, an\n * <mxUndoableChange> object is created at the start of the transaction (when\n * model.beginUpdate is called). All atomic changes are then added to this\n * object until the last model.endUpdate call, at which point the\n * <mxUndoableEdit> is dispatched in an event, and added to the history inside\n * <mxUndoManager>. This is done by an event listener in\n * <mxEditor.installUndoHandler>.\n * \n * Each atomic change of the model is represented by an object (eg.\n * <mxRootChange>, <mxChildChange>, <mxTerminalChange> etc) which contains the\n * complete undo information. The <mxUndoManager> also listens to the\n * <mxGraphView> and stores it's changes to the current root as insignificant\n * undoable changes, so that drilling (step into, step up) is undone.\n * \n * This means when you execute an atomic change on the model, then change the\n * current root on the view and click undo, the change of the root will be\n * undone together with the change of the model so that the display represents\n * the state at which the model was changed. However, these changes are not\n * transmitted for sharing as they do not represent a state change.\n *\n * Example:\n * \n * When adding an undo manager to a graph, make sure to add it\n * to the model and the view as well to maintain a consistent\n * display across multiple undo/redo steps.\n *\n * (code)\n * var undoManager = new mxUndoManager();\n * var listener = function(sender, evt)\n * {\n *   undoManager.undoableEditHappened(evt.getProperty('edit'));\n * };\n * graph.getModel().addListener(mxEvent.UNDO, listener);\n * graph.getView().addListener(mxEvent.UNDO, listener);\n * (end)\n * \n * The code creates a function that informs the undoManager\n * of an undoable edit and binds it to the undo event of\n * <mxGraphModel> and <mxGraphView> using\n * <mxEventSource.addListener>.\n * \n * Event: mxEvent.CLEAR\n * \n * Fires after <clear> was invoked. This event has no properties.\n * \n * Event: mxEvent.UNDO\n * \n * Fires afer a significant edit was undone in <undo>. The <code>edit</code>\n * property contains the <mxUndoableEdit> that was undone.\n * \n * Event: mxEvent.REDO\n * \n * Fires afer a significant edit was redone in <redo>. The <code>edit</code>\n * property contains the <mxUndoableEdit> that was redone.\n * \n * Event: mxEvent.ADD\n * \n * Fires after an undoable edit was added to the history. The <code>edit</code>\n * property contains the <mxUndoableEdit> that was added.\n * \n * Constructor: mxUndoManager\n *\n * Constructs a new undo manager with the given history size. If no history\n * size is given, then a default size of 100 steps is used.\n */\nfunction mxUndoManager(size)\n{\n\tthis.size = (size != null) ? size : 100;\n\tthis.clear();\n};\n\n/**\n * Extends mxEventSource.\n */\nmxUndoManager.prototype = new mxEventSource();\nmxUndoManager.prototype.constructor = mxUndoManager;\n\n/**\n * Variable: size\n * \n * Maximum command history size. 0 means unlimited history. Default is\n * 100.\n */\nmxUndoManager.prototype.size = null;\n\n/**\n * Variable: history\n * \n * Array that contains the steps of the command history.\n */\nmxUndoManager.prototype.history = null;\n\n/**\n * Variable: indexOfNextAdd\n * \n * Index of the element to be added next.\n */\nmxUndoManager.prototype.indexOfNextAdd = 0;\n\n/**\n * Function: isEmpty\n * \n * Returns true if the history is empty.\n */\nmxUndoManager.prototype.isEmpty = function()\n{\n\treturn this.history.length == 0;\n};\n\n/**\n * Function: clear\n * \n * Clears the command history.\n */\nmxUndoManager.prototype.clear = function()\n{\n\tthis.history = [];\n\tthis.indexOfNextAdd = 0;\n\tthis.fireEvent(new mxEventObject(mxEvent.CLEAR));\n};\n\n/**\n * Function: canUndo\n * \n * Returns true if an undo is possible.\n */\nmxUndoManager.prototype.canUndo = function()\n{\n\treturn this.indexOfNextAdd > 0;\n};\n\n/**\n * Function: undo\n * \n * Undoes the last change.\n */\nmxUndoManager.prototype.undo = function()\n{\n    while (this.indexOfNextAdd > 0)\n    {\n        var edit = this.history[--this.indexOfNextAdd];\n        edit.undo();\n\n\t\tif (edit.isSignificant())\n        {\n        \tthis.fireEvent(new mxEventObject(mxEvent.UNDO, 'edit', edit));\n            break;\n        }\n    }\n};\n\n/**\n * Function: canRedo\n * \n * Returns true if a redo is possible.\n */\nmxUndoManager.prototype.canRedo = function()\n{\n\treturn this.indexOfNextAdd < this.history.length;\n};\n\n/**\n * Function: redo\n * \n * Redoes the last change.\n */\nmxUndoManager.prototype.redo = function()\n{\n    var n = this.history.length;\n    \n    while (this.indexOfNextAdd < n)\n    {\n        var edit =  this.history[this.indexOfNextAdd++];\n        edit.redo();\n        \n        if (edit.isSignificant())\n        {\n        \tthis.fireEvent(new mxEventObject(mxEvent.REDO, 'edit', edit));\n            break;\n        }\n    }\n};\n\n/**\n * Function: undoableEditHappened\n * \n * Method to be called to add new undoable edits to the <history>.\n */\nmxUndoManager.prototype.undoableEditHappened = function(undoableEdit)\n{\n\tthis.trim();\n\t\n\tif (this.size > 0 &&\n\t\tthis.size == this.history.length)\n\t{\n\t\tthis.history.shift();\n\t}\n\t\n\tthis.history.push(undoableEdit);\n\tthis.indexOfNextAdd = this.history.length;\n\tthis.fireEvent(new mxEventObject(mxEvent.ADD, 'edit', undoableEdit));\n};\n\n/**\n * Function: trim\n * \n * Removes all pending steps after <indexOfNextAdd> from the history,\n * invoking die on each edit. This is called from <undoableEditHappened>.\n */\nmxUndoManager.prototype.trim = function()\n{\n\tif (this.history.length > this.indexOfNextAdd)\n\t{\n\t\tvar edits = this.history.splice(this.indexOfNextAdd,\n\t\t\tthis.history.length - this.indexOfNextAdd);\n\t\t\t\n\t\tfor (var i = 0; i < edits.length; i++)\n\t\t{\n\t\t\tedits[i].die();\n\t\t}\n\t}\n};\n"
  },
  {
    "path": "static/cherry/drawio_demo/src/js/util/mxUndoableEdit.js",
    "content": "/**\n * Copyright (c) 2006-2015, JGraph Ltd\n * Copyright (c) 2006-2015, Gaudenz Alder\n */\n/**\n * Class: mxUndoableEdit\n * \n * Implements a composite undoable edit. Here is an example for a custom change\n * which gets executed via the model:\n * \n * (code)\n * function CustomChange(model, name)\n * {\n *   this.model = model;\n *   this.name = name;\n *   this.previous = name;\n * };\n * \n * CustomChange.prototype.execute = function()\n * {\n *   var tmp = this.model.name;\n *   this.model.name = this.previous;\n *   this.previous = tmp;\n * };\n * \n * var name = prompt('Enter name');\n * graph.model.execute(new CustomChange(graph.model, name));\n * (end)\n * \n * Event: mxEvent.EXECUTED\n * \n * Fires between START_EDIT and END_EDIT after an atomic change was executed.\n * The <code>change</code> property contains the change that was executed.\n * \n * Event: mxEvent.START_EDIT\n * \n * Fires before a set of changes will be executed in <undo> or <redo>.\n * This event contains no properties.\n * \n * Event: mxEvent.END_EDIT\n *\n * Fires after a set of changeswas executed in <undo> or <redo>.\n * This event contains no properties.\n * \n * Constructor: mxUndoableEdit\n * \n * Constructs a new undoable edit for the given source.\n */\nfunction mxUndoableEdit(source, significant)\n{\n\tthis.source = source;\n\tthis.changes = [];\n\tthis.significant = (significant != null) ? significant : true;\n};\n\n/**\n * Variable: source\n * \n * Specifies the source of the edit.\n */\nmxUndoableEdit.prototype.source = null;\n\n/**\n * Variable: changes\n * \n * Array that contains the changes that make up this edit. The changes are\n * expected to either have an undo and redo function, or an execute\n * function. Default is an empty array.\n */\nmxUndoableEdit.prototype.changes = null;\n\n/**\n * Variable: significant\n * \n * Specifies if the undoable change is significant.\n * Default is true.\n */\nmxUndoableEdit.prototype.significant = null;\n\n/**\n * Variable: undone\n * \n * Specifies if this edit has been undone. Default is false.\n */\nmxUndoableEdit.prototype.undone = false;\n\n/**\n * Variable: redone\n * \n * Specifies if this edit has been redone. Default is false.\n */\nmxUndoableEdit.prototype.redone = false;\n\n/**\n * Function: isEmpty\n * \n * Returns true if the this edit contains no changes.\n */\nmxUndoableEdit.prototype.isEmpty = function()\n{\n\treturn this.changes.length == 0;\n};\n\n/**\n * Function: isSignificant\n * \n * Returns <significant>.\n */\nmxUndoableEdit.prototype.isSignificant = function()\n{\n\treturn this.significant;\n};\n\n/**\n * Function: add\n * \n * Adds the specified change to this edit. The change is an object that is\n * expected to either have an undo and redo, or an execute function.\n */\nmxUndoableEdit.prototype.add = function(change)\n{\n\tthis.changes.push(change);\n};\n\n/**\n * Function: notify\n * \n * Hook to notify any listeners of the changes after an <undo> or <redo>\n * has been carried out. This implementation is empty.\n */\nmxUndoableEdit.prototype.notify = function() { };\n\n/**\n * Function: die\n * \n * Hook to free resources after the edit has been removed from the command\n * history. This implementation is empty.\n */\nmxUndoableEdit.prototype.die = function() { };\n\n/**\n * Function: undo\n * \n * Undoes all changes in this edit.\n */\nmxUndoableEdit.prototype.undo = function()\n{\n\tif (!this.undone)\n\t{\n\t\tthis.source.fireEvent(new mxEventObject(mxEvent.START_EDIT));\n\t\tvar count = this.changes.length;\n\t\t\n\t\tfor (var i = count - 1; i >= 0; i--)\n\t\t{\n\t\t\tvar change = this.changes[i];\n\t\t\t\n\t\t\tif (change.execute != null)\n\t\t\t{\n\t\t\t\tchange.execute();\n\t\t\t}\n\t\t\telse if (change.undo != null)\n\t\t\t{\n\t\t\t\tchange.undo();\n\t\t\t}\n\t\t\t\n\t\t\t// New global executed event\n\t\t\tthis.source.fireEvent(new mxEventObject(mxEvent.EXECUTED, 'change', change));\n\t\t}\n\t\t\n\t\tthis.undone = true;\n\t\tthis.redone = false;\n\t\tthis.source.fireEvent(new mxEventObject(mxEvent.END_EDIT));\n\t}\n\t\n\tthis.notify();\n};\n\n/**\n * Function: redo\n * \n * Redoes all changes in this edit.\n */\nmxUndoableEdit.prototype.redo = function()\n{\n\tif (!this.redone)\n\t{\n\t\tthis.source.fireEvent(new mxEventObject(mxEvent.START_EDIT));\n\t\tvar count = this.changes.length;\n\t\t\n\t\tfor (var i = 0; i < count; i++)\n\t\t{\n\t\t\tvar change = this.changes[i];\n\t\t\t\n\t\t\tif (change.execute != null)\n\t\t\t{\n\t\t\t\tchange.execute();\n\t\t\t}\n\t\t\telse if (change.redo != null)\n\t\t\t{\n\t\t\t\tchange.redo();\n\t\t\t}\n\t\t\t\n\t\t\t// New global executed event\n\t\t\tthis.source.fireEvent(new mxEventObject(mxEvent.EXECUTED, 'change', change));\n\t\t}\n\t\t\n\t\tthis.undone = false;\n\t\tthis.redone = true;\n\t\tthis.source.fireEvent(new mxEventObject(mxEvent.END_EDIT));\n\t}\n\t\n\tthis.notify();\n};\n"
  },
  {
    "path": "static/cherry/drawio_demo/src/js/util/mxUrlConverter.js",
    "content": "/**\n * Copyright (c) 2006-2015, JGraph Ltd\n * Copyright (c) 2006-2015, Gaudenz Alder\n */\n/**\n *\n * Class: mxUrlConverter\n * \n * Converts relative and absolute URLs to absolute URLs with protocol and domain.\n */\nvar mxUrlConverter = function()\n{\n\t// Empty constructor\n};\n\n/**\n * Variable: enabled\n * \n * Specifies if the converter is enabled. Default is true.\n */\nmxUrlConverter.prototype.enabled = true;\n\n/**\n * Variable: baseUrl\n * \n * Specifies the base URL to be used as a prefix for relative URLs.\n */\nmxUrlConverter.prototype.baseUrl = null;\n\n/**\n * Variable: baseDomain\n * \n * Specifies the base domain to be used as a prefix for absolute URLs.\n */\nmxUrlConverter.prototype.baseDomain = null;\n\n/**\n * Function: updateBaseUrl\n * \n * Private helper function to update the base URL.\n */\nmxUrlConverter.prototype.updateBaseUrl = function()\n{\n\tthis.baseDomain = location.protocol + '//' + location.host;\n\tthis.baseUrl = this.baseDomain + location.pathname;\n\tvar tmp = this.baseUrl.lastIndexOf('/');\n\t\n\t// Strips filename etc\n\tif (tmp > 0)\n\t{\n\t\tthis.baseUrl = this.baseUrl.substring(0, tmp + 1);\n\t}\n};\n\n/**\n * Function: isEnabled\n * \n * Returns <enabled>.\n */\nmxUrlConverter.prototype.isEnabled = function()\n{\n\treturn this.enabled;\n};\n\n/**\n * Function: setEnabled\n * \n * Sets <enabled>.\n */\nmxUrlConverter.prototype.setEnabled = function(value)\n{\n\tthis.enabled = value;\n};\n\n/**\n * Function: getBaseUrl\n * \n * Returns <baseUrl>.\n */\nmxUrlConverter.prototype.getBaseUrl = function()\n{\n\treturn this.baseUrl;\n};\n\n/**\n * Function: setBaseUrl\n * \n * Sets <baseUrl>.\n */\nmxUrlConverter.prototype.setBaseUrl = function(value)\n{\n\tthis.baseUrl = value;\n};\n\n/**\n * Function: getBaseDomain\n * \n * Returns <baseDomain>.\n */\nmxUrlConverter.prototype.getBaseDomain = function()\n{\n\treturn this.baseDomain;\n},\n\n/**\n * Function: setBaseDomain\n * \n * Sets <baseDomain>.\n */\nmxUrlConverter.prototype.setBaseDomain = function(value)\n{\n\tthis.baseDomain = value;\n},\n\n/**\n * Function: isRelativeUrl\n * \n * Returns true if the given URL is relative.\n */\nmxUrlConverter.prototype.isRelativeUrl = function(url)\n{\n\treturn url.substring(0, 2) != '//' && url.substring(0, 7) != 'http://' &&\n\t\turl.substring(0, 8) != 'https://' && url.substring(0, 10) != 'data:image' &&\n\t\turl.substring(0, 7) != 'file://';\n};\n\n/**\n * Function: convert\n * \n * Converts the given URL to an absolute URL with protol and domain.\n * Relative URLs are first converted to absolute URLs.\n */\nmxUrlConverter.prototype.convert = function(url)\n{\n\tif (this.isEnabled() && this.isRelativeUrl(url))\n\t{\n\t\tif (this.getBaseUrl() == null)\n\t\t{\n\t\t\tthis.updateBaseUrl();\n\t\t}\n\t\t\n\t\tif (url.charAt(0) == '/')\n\t\t{\n\t\t\turl = this.getBaseDomain() + url;\n\t\t}\n\t\telse\n\t\t{\n\t\t\turl = this.getBaseUrl() + url;\n\t\t}\n\t}\n\t\n\treturn url;\n};\n"
  },
  {
    "path": "static/cherry/drawio_demo/src/js/util/mxUtils.js",
    "content": "/**\n * Copyright (c) 2006-2015, JGraph Ltd\n * Copyright (c) 2006-2015, Gaudenz Alder\n */\nvar mxUtils =\n{\n\t/**\n\t * Class: mxUtils\n\t * \n\t * A singleton class that provides cross-browser helper methods.\n\t * This is a global functionality. To access the functions in this\n\t * class, use the global classname appended by the functionname.\n\t * You may have to load chrome://global/content/contentAreaUtils.js\n\t * to disable certain security restrictions in Mozilla for the <open>,\n\t * <save>, <saveAs> and <copy> function.\n\t * \n\t * For example, the following code displays an error message:\n\t * \n\t * (code)\n\t * mxUtils.error('Browser is not supported!', 200, false);\n\t * (end)\n\t * \n\t * Variable: errorResource\n\t * \n\t * Specifies the resource key for the title of the error window. If the\n\t * resource for this key does not exist then the value is used as\n\t * the title. Default is 'error'.\n\t */\n\terrorResource: (mxClient.language != 'none') ? 'error' : '',\n\t\n\t/**\n\t * Variable: closeResource\n\t * \n\t * Specifies the resource key for the label of the close button. If the\n\t * resource for this key does not exist then the value is used as\n\t * the label. Default is 'close'.\n\t */\n\tcloseResource: (mxClient.language != 'none') ? 'close' : '',\n\n\t/**\n\t * Variable: errorImage\n\t * \n\t * Defines the image used for error dialogs.\n\t */\n\terrorImage: mxClient.imageBasePath + '/error.gif',\n\t\n\t/**\n\t * Function: removeCursors\n\t * \n\t * Removes the cursors from the style of the given DOM node and its\n\t * descendants.\n\t * \n\t * Parameters:\n\t * \n\t * element - DOM node to remove the cursor style from.\n\t */\n\tremoveCursors: function(element)\n\t{\n\t\tif (element.style != null)\n\t\t{\n\t\t\telement.style.cursor = '';\n\t\t}\n\t\t\n\t\tvar children = element.childNodes;\n\t\t\n\t\tif (children != null)\n\t\t{\n\t        var childCount = children.length;\n\t        \n\t        for (var i = 0; i < childCount; i += 1)\n\t        {\n\t            mxUtils.removeCursors(children[i]);\n\t        }\n\t    }\n\t},\n\n\t/**\n\t * Function: getCurrentStyle\n\t * \n\t * Returns the current style of the specified element.\n\t * \n\t * Parameters:\n\t * \n\t * element - DOM node whose current style should be returned.\n\t */\n\tgetCurrentStyle: function()\n\t{\n\t\tif (mxClient.IS_IE && (document.documentMode == null || document.documentMode < 9))\n\t\t{\n\t\t\treturn function(element)\n\t\t\t{\n\t\t\t\treturn (element != null) ? element.currentStyle : null;\n\t\t\t};\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn function(element)\n\t\t\t{\n\t\t\t\treturn (element != null) ?\n\t\t\t\t\twindow.getComputedStyle(element, '') :\n\t\t\t\t\tnull;\n\t\t\t};\n\t\t}\n\t}(),\n\t\n\t/**\n\t * Function: parseCssNumber\n\t * \n\t * Parses the given CSS numeric value adding handling for the values thin,\n\t * medium and thick (2, 4 and 6).\n\t */\n\tparseCssNumber: function(value)\n\t{\n\t\tif (value == 'thin')\n\t\t{\n\t\t\tvalue = '2';\n\t\t}\n\t\telse if (value == 'medium')\n\t\t{\n\t\t\tvalue = '4';\n\t\t}\n\t\telse if (value == 'thick')\n\t\t{\n\t\t\tvalue = '6';\n\t\t}\n\t\t\n\t\tvalue = parseFloat(value);\n\t\t\n\t\tif (isNaN(value))\n\t\t{\n\t\t\tvalue = 0;\n\t\t}\n\t\t\n\t\treturn value;\n\t},\n\n\t/**\n\t * Function: setPrefixedStyle\n\t * \n\t * Adds the given style with the standard name and an optional vendor prefix for the current\n\t * browser.\n\t * \n\t * (code)\n\t * mxUtils.setPrefixedStyle(node.style, 'transformOrigin', '0% 0%');\n\t * (end)\n\t */\n\tsetPrefixedStyle: function()\n\t{\n\t\tvar prefix = null;\n\t\t\n\t\tif (mxClient.IS_OT)\n\t\t{\n\t\t\tprefix = 'O';\n\t\t}\n\t\telse if (mxClient.IS_SF || mxClient.IS_GC)\n\t\t{\n\t\t\tprefix = 'Webkit';\n\t\t}\n\t\telse if (mxClient.IS_MT)\n\t\t{\n\t\t\tprefix = 'Moz';\n\t\t}\n\t\telse if (mxClient.IS_IE && document.documentMode >= 9 && document.documentMode < 10)\n\t\t{\n\t\t\tprefix = 'ms';\n\t\t}\n\n\t\treturn function(style, name, value)\n\t\t{\n\t\t\tstyle[name] = value;\n\t\t\t\n\t\t\tif (prefix != null && name.length > 0)\n\t\t\t{\n\t\t\t\tname = prefix + name.substring(0, 1).toUpperCase() + name.substring(1);\n\t\t\t\tstyle[name] = value;\n\t\t\t}\n\t\t};\n\t}(),\n\t\n\t/**\n\t * Function: hasScrollbars\n\t * \n\t * Returns true if the overflow CSS property of the given node is either\n\t * scroll or auto.\n\t * \n\t * Parameters:\n\t * \n\t * node - DOM node whose style should be checked for scrollbars.\n\t */\n\thasScrollbars: function(node)\n\t{\n\t\tvar style = mxUtils.getCurrentStyle(node);\n\n\t\treturn style != null && (style.overflow == 'scroll' || style.overflow == 'auto');\n\t},\n\t\n\t/**\n\t * Function: bind\n\t * \n\t * Returns a wrapper function that locks the execution scope of the given\n\t * function to the specified scope. Inside funct, the \"this\" keyword\n\t * becomes a reference to that scope.\n\t */\n\tbind: function(scope, funct)\n\t{\n\t\treturn function()\n\t\t{\n\t\t\treturn funct.apply(scope, arguments);\n\t\t};\n\t},\n\t\n\t/**\n\t * Function: eval\n\t * \n\t * Evaluates the given expression using eval and returns the JavaScript\n\t * object that represents the expression result. Supports evaluation of\n\t * expressions that define functions and returns the function object for\n\t * these expressions.\n\t * \n\t * Parameters:\n\t * \n\t * expr - A string that represents a JavaScript expression.\n\t */\n\teval: function(expr)\n\t{\n\t\tvar result = null;\n\n\t\tif (expr.indexOf('function') >= 0)\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\teval('var _mxJavaScriptExpression='+expr);\n\t\t\t\tresult = _mxJavaScriptExpression;\n\t\t\t\t// TODO: Use delete here?\n\t\t\t\t_mxJavaScriptExpression = null;\n\t\t\t}\n\t\t\tcatch (e)\n\t\t\t{\n\t\t\t\tmxLog.warn(e.message + ' while evaluating ' + expr);\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\tresult = eval(expr);\n\t\t\t}\n\t\t\tcatch (e)\n\t\t\t{\n\t\t\t\tmxLog.warn(e.message + ' while evaluating ' + expr);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn result;\n\t},\n\t\n\t/**\n\t * Function: findNode\n\t * \n\t * Returns the first node where attr equals value.\n\t * This implementation does not use XPath.\n\t */\n\tfindNode: function(node, attr, value)\n\t{\n\t\tif (node.nodeType == mxConstants.NODETYPE_ELEMENT)\n\t\t{\n\t\t\tvar tmp = node.getAttribute(attr);\n\t\n\t\t\tif (tmp != null && tmp == value)\n\t\t\t{\n\t\t\t\treturn node;\n\t\t\t}\n\t\t}\n\t\t\n\t\tnode = node.firstChild;\n\t\t\n\t\twhile (node != null)\n\t\t{\n\t\t\tvar result = mxUtils.findNode(node, attr, value);\n\t\t\t\n\t\t\tif (result != null)\n\t\t\t{\n\t\t\t\treturn result;\n\t\t\t}\n\t\t\t\n\t\t\tnode = node.nextSibling;\n\t\t}\n\t\t\n\t\treturn null;\n\t},\n\n\t/**\n\t * Function: getFunctionName\n\t * \n\t * Returns the name for the given function.\n\t * \n\t * Parameters:\n\t * \n\t * f - JavaScript object that represents a function.\n\t */\n\tgetFunctionName: function(f)\n\t{\n\t\tvar str = null;\n\n\t\tif (f != null)\n\t\t{\n\t\t\tif (f.name != null)\n\t\t\t{\n\t\t\t\tstr = f.name;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tstr = mxUtils.trim(f.toString());\n\t\t\t\t\n\t\t\t\tif (/^function\\s/.test(str))\n\t\t\t\t{\n\t\t\t\t\tstr = mxUtils.ltrim(str.substring(9));\n\t\t\t\t\tvar idx2 = str.indexOf('(');\n\t\t\t\t\t\n\t\t\t\t\tif (idx2 > 0)\n\t\t\t\t\t{\n\t\t\t\t\t\tstr = str.substring(0, idx2);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn str;\n\t},\n\n\t/**\n\t * Function: indexOf\n\t * \n\t * Returns the index of obj in array or -1 if the array does not contain\n\t * the given object.\n\t * \n\t * Parameters:\n\t * \n\t * array - Array to check for the given obj.\n\t * obj - Object to find in the given array.\n\t */\n\tindexOf: function(array, obj)\n\t{\n\t\tif (array != null && obj != null)\n\t\t{\n\t\t\tfor (var i = 0; i < array.length; i++)\n\t\t\t{\n\t\t\t\tif (array[i] == obj)\n\t\t\t\t{\n\t\t\t\t\treturn i;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn -1;\n\t},\n\n\t/**\n\t * Function: forEach\n\t * \n\t * Calls the given function for each element of the given array and returns\n\t * the array.\n\t * \n\t * Parameters:\n\t * \n\t * array - Array that contains the elements.\n\t * fn - Function to be called for each object.\n\t */\n\tforEach: function(array, fn)\n\t{\n\t\tif (array != null && fn != null)\n\t\t{\n\t\t\tfor (var i = 0; i < array.length; i++)\n\t\t\t{\n\t\t\t\tfn(array[i]);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn array;\n\t},\n\n\t/**\n\t * Function: remove\n\t * \n\t * Removes all occurrences of the given object in the given array or\n\t * object. If there are multiple occurrences of the object, be they\n\t * associative or as an array entry, all occurrences are removed from\n\t * the array or deleted from the object. By removing the object from\n\t * the array, all elements following the removed element are shifted\n\t * by one step towards the beginning of the array.\n\t * \n\t * The length of arrays is not modified inside this function.\n\t * \n\t * Parameters:\n\t * \n\t * obj - Object to find in the given array.\n\t * array - Array to check for the given obj.\n\t */\n\tremove: function(obj, array)\n\t{\n\t\tvar result = null;\n\t\t\n\t\tif (typeof(array) == 'object')\n\t\t{\n\t\t\tvar index = mxUtils.indexOf(array, obj);\n\t\t\t\n\t\t\twhile (index >= 0)\n\t\t\t{\n\t\t\t\tarray.splice(index, 1);\n\t\t\t\tresult = obj;\n\t\t\t\tindex = mxUtils.indexOf(array, obj);\n\t\t\t}\n\t\t}\n\n\t\tfor (var key in array)\n\t\t{\n\t\t\tif (array[key] == obj)\n\t\t\t{\n\t\t\t\tdelete array[key];\n\t\t\t\tresult = obj;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn result;\n\t},\n\t\n\t/**\n\t * Function: isNode\n\t * \n\t * Returns true if the given value is an XML node with the node name\n\t * and if the optional attribute has the specified value.\n\t * \n\t * This implementation assumes that the given value is a DOM node if the\n\t * nodeType property is numeric, that is, if isNaN returns false for\n\t * value.nodeType.\n\t * \n\t * Parameters:\n\t * \n\t * value - Object that should be examined as a node.\n\t * nodeName - String that specifies the node name.\n\t * attributeName - Optional attribute name to check.\n\t * attributeValue - Optional attribute value to check.\n\t */\n\t isNode: function(value, nodeName, attributeName, attributeValue)\n\t {\n\t \tif (value != null && !isNaN(value.nodeType) && (nodeName == null ||\n\t \t\tvalue.nodeName.toLowerCase() == nodeName.toLowerCase()))\n \t\t{\n \t\t\treturn attributeName == null ||\n \t\t\t\tvalue.getAttribute(attributeName) == attributeValue;\n \t\t}\n\t \t\n\t \treturn false;\n\t },\n\t\n\t/**\n\t * Function: isAncestorNode\n\t * \n\t * Returns true if the given ancestor is an ancestor of the\n\t * given DOM node in the DOM. This also returns true if the\n\t * child is the ancestor.\n\t * \n\t * Parameters:\n\t * \n\t * ancestor - DOM node that represents the ancestor.\n\t * child - DOM node that represents the child.\n\t */\n\t isAncestorNode: function(ancestor, child)\n\t {\n\t \tvar parent = child;\n\t \t\n\t \twhile (parent != null)\n\t \t{\n\t \t\tif (parent == ancestor)\n\t \t\t{\n\t \t\t\treturn true;\n\t \t\t}\n\n\t \t\tparent = parent.parentNode;\n\t \t}\n\t \t\n\t \treturn false;\n\t },\n\n\t/**\n\t * Function: getChildNodes\n\t * \n\t * Returns an array of child nodes that are of the given node type.\n\t * \n\t * Parameters:\n\t * \n\t * node - Parent DOM node to return the children from.\n\t * nodeType - Optional node type to return. Default is\n\t * <mxConstants.NODETYPE_ELEMENT>.\n\t */\n\tgetChildNodes: function(node, nodeType)\n\t{\n\t\tnodeType = nodeType || mxConstants.NODETYPE_ELEMENT;\n\t\t\n\t\tvar children = [];\n\t\tvar tmp = node.firstChild;\n\t\t\n\t\twhile (tmp != null)\n\t\t{\n\t\t\tif (tmp.nodeType == nodeType)\n\t\t\t{\n\t\t\t\tchildren.push(tmp);\n\t\t\t}\n\t\t\t\n\t\t\ttmp = tmp.nextSibling;\n\t\t}\n\t\t\n\t\treturn children;\n\t},\n\n\t/**\n\t * Function: importNode\n\t * \n\t * Cross browser implementation for document.importNode. Uses document.importNode\n\t * in all browsers but IE, where the node is cloned by creating a new node and\n\t * copying all attributes and children into it using importNode, recursively.\n\t * \n\t * Parameters:\n\t * \n\t * doc - Document to import the node into.\n\t * node - Node to be imported.\n\t * allChildren - If all children should be imported.\n\t */\n\timportNode: function(doc, node, allChildren)\n\t{\n\t\tif (mxClient.IS_IE && (document.documentMode == null || document.documentMode < 10))\n\t\t{\n\t\t\tswitch (node.nodeType)\n\t\t\t{\n\t\t\t\tcase 1: /* element */\n\t\t\t\t{\n\t\t\t\t\tvar newNode = doc.createElement(node.nodeName);\n\t\t\t\t\t\n\t\t\t\t\tif (node.attributes && node.attributes.length > 0)\n\t\t\t\t\t{\n\t\t\t\t\t\tfor (var i = 0; i < node.attributes.length; i++)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tnewNode.setAttribute(node.attributes[i].nodeName,\n\t\t\t\t\t\t\t\tnode.getAttribute(node.attributes[i].nodeName));\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (allChildren && node.childNodes && node.childNodes.length > 0)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tfor (var i = 0; i < node.childNodes.length; i++)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tnewNode.appendChild(mxUtils.importNode(doc, node.childNodes[i], allChildren));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\treturn newNode;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase 3: /* text */\n\t\t\t    case 4: /* cdata-section */\n\t\t\t    case 8: /* comment */\n\t\t\t    {\n\t\t\t      return doc.createTextNode(node.value);\n\t\t\t      break;\n\t\t\t    }\n\t\t\t};\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn doc.importNode(node, allChildren);\n\t\t}\n\t},\n\n\t/**\n\t * Function: createXmlDocument\n\t * \n\t * Returns a new, empty XML document.\n\t */\n\tcreateXmlDocument: function()\n\t{\n\t\tvar doc = null;\n\t\t\n\t\tif (document.implementation && document.implementation.createDocument)\n\t\t{\n\t\t\tdoc = document.implementation.createDocument('', '', null);\n\t\t}\n\t\telse if (window.ActiveXObject)\n\t\t{\n\t\t\tdoc = new ActiveXObject('Microsoft.XMLDOM');\n\t \t}\n\t \t\n\t \treturn doc;\n\t},\n\n\t/**\n\t * Function: parseXml\n\t * \n\t * Parses the specified XML string into a new XML document and returns the\n\t * new document.\n\t * \n\t * Example:\n\t * \n\t * (code)\n\t * var doc = mxUtils.parseXml(\n\t *   '<mxGraphModel><root><MyDiagram id=\"0\"><mxCell/></MyDiagram>'+\n\t *   '<MyLayer id=\"1\"><mxCell parent=\"0\" /></MyLayer><MyObject id=\"2\">'+\n\t *   '<mxCell style=\"strokeColor=blue;fillColor=red\" parent=\"1\" vertex=\"1\">'+\n\t *   '<mxGeometry x=\"10\" y=\"10\" width=\"80\" height=\"30\" as=\"geometry\"/>'+\n\t *   '</mxCell></MyObject></root></mxGraphModel>');\n\t * (end)\n\t * \n\t * Parameters:\n\t * \n\t * xml - String that contains the XML data.\n\t */\n\tparseXml: function()\n\t{\n\t\tif (window.DOMParser)\n\t\t{\n\t\t\treturn function(xml)\n\t\t\t{\n\t\t\t\tvar parser = new DOMParser();\n\t\t\t\t\n\t\t\t\treturn parser.parseFromString(xml, 'text/xml');\n\t\t\t};\n\t\t}\n\t\telse // IE<=9\n\t\t{\n\t\t\treturn function(xml)\n\t\t\t{\n\t\t\t\tvar result = mxUtils.createXmlDocument();\n\t\t\t\tresult.async = false;\n\t\t\t\t// Workaround for parsing errors with SVG DTD\n\t\t\t\tresult.validateOnParse = false;\n\t\t\t\tresult.resolveExternals = false;\n\t\t\t\tresult.loadXML(xml);\n\t\t\t\t\n\t\t\t\treturn result;\n\t\t\t};\n\t\t}\n\t}(),\n\n\t/**\n\t * Function: clearSelection\n\t * \n\t * Clears the current selection in the page.\n\t */\n\tclearSelection: function()\n\t{\n\t\tif (document.selection)\n\t\t{\n\t\t\treturn function()\n\t\t\t{\n\t\t\t\tdocument.selection.empty();\n\t\t\t};\n\t\t}\n\t\telse if (window.getSelection)\n\t\t{\n\t\t\treturn function()\n\t\t\t{\n\t\t\t\tif (window.getSelection().empty)\n\t\t\t\t{\n\t\t\t\t\twindow.getSelection().empty();\n\t\t\t\t}\n\t\t\t\telse if (window.getSelection().removeAllRanges)\n\t\t\t\t{\n\t\t\t\t\twindow.getSelection().removeAllRanges();\n\t\t\t\t}\n\t\t\t};\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn function() { };\n\t\t}\n\t}(),\n\n\t/**\n\t * Function: getPrettyXML\n\t * \n\t * Returns a pretty printed string that represents the XML tree for the\n\t * given node. This method should only be used to print XML for reading,\n\t * use <getXml> instead to obtain a string for processing.\n\t * \n\t * Parameters:\n\t * \n\t * node - DOM node to return the XML for.\n\t * tab - Optional string that specifies the indentation for one level.\n\t * Default is two spaces.\n\t * indent - Optional string that represents the current indentation.\n\t * Default is an empty string.\n\t */\n\tgetPrettyXml: function(node, tab, indent)\n\t{\n\t\tvar result = [];\n\t\t\n\t\tif (node != null)\n\t\t{\n\t\t\ttab = tab || '  ';\n\t\t\tindent = indent || '';\n\t\t\t\n\t\t\tif (node.nodeType == mxConstants.NODETYPE_TEXT)\n\t\t\t{\n\t\t\t\tvar value =  mxUtils.trim(mxUtils.getTextContent(node));\n\t\t\t\t\n\t\t\t\tif (value.length > 0)\n\t\t\t\t{\n\t\t\t\t\tresult.push(indent + mxUtils.htmlEntities(value) + '\\n');\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tresult.push(indent + '<' + node.nodeName);\n\t\t\t\t\n\t\t\t\t// Creates the string with the node attributes\n\t\t\t\t// and converts all HTML entities in the values\n\t\t\t\tvar attrs = node.attributes;\n\t\t\t\t\n\t\t\t\tif (attrs != null)\n\t\t\t\t{\n\t\t\t\t\tfor (var i = 0; i < attrs.length; i++)\n\t\t\t\t\t{\n\t\t\t\t\t\tvar val = mxUtils.htmlEntities(attrs[i].value);\n\t\t\t\t\t\tresult.push(' ' + attrs[i].nodeName + '=\"' + val + '\"');\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Recursively creates the XML string for each\n\t\t\t\t// child nodes and appends it here with an\n\t\t\t\t// indentation\n\t\t\t\tvar tmp = node.firstChild;\n\t\t\t\t\n\t\t\t\tif (tmp != null)\n\t\t\t\t{\n\t\t\t\t\tresult.push('>\\n');\n\t\t\t\t\t\n\t\t\t\t\twhile (tmp != null)\n\t\t\t\t\t{\n\t\t\t\t\t\tresult.push(mxUtils.getPrettyXml(tmp, tab, indent + tab));\n\t\t\t\t\t\ttmp = tmp.nextSibling;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tresult.push(indent + '</'+node.nodeName + '>\\n');\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tresult.push('/>\\n');\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn result.join('');\n\t},\n\t\n\t/**\n\t * Function: removeWhitespace\n\t * \n\t * Removes the sibling text nodes for the given node that only consists\n\t * of tabs, newlines and spaces.\n\t * \n\t * Parameters:\n\t * \n\t * node - DOM node whose siblings should be removed.\n\t * before - Optional boolean that specifies the direction of the traversal.\n\t */\n\tremoveWhitespace: function(node, before)\n\t{\n\t\tvar tmp = (before) ? node.previousSibling : node.nextSibling;\n\t\t\n\t\twhile (tmp != null && tmp.nodeType == mxConstants.NODETYPE_TEXT)\n\t\t{\n\t\t\tvar next = (before) ? tmp.previousSibling : tmp.nextSibling;\n\t\t\tvar text = mxUtils.getTextContent(tmp);\n\t\t\t\n\t\t\tif (mxUtils.trim(text).length == 0)\n\t\t\t{\n\t\t\t\ttmp.parentNode.removeChild(tmp);\n\t\t\t}\n\t\t\t\n\t\t\ttmp = next;\n\t\t}\n\t},\n\t\n\t/**\n\t * Function: htmlEntities\n\t * \n\t * Replaces characters (less than, greater than, newlines and quotes) with\n\t * their HTML entities in the given string and returns the result.\n\t * \n\t * Parameters:\n\t * \n\t * s - String that contains the characters to be converted.\n\t * newline - If newlines should be replaced. Default is true.\n\t */\n\thtmlEntities: function(s, newline)\n\t{\n\t\ts = String(s || '');\n\t\t\n\t\ts = s.replace(/&/g,'&amp;'); // 38 26\n\t\ts = s.replace(/\"/g,'&quot;'); // 34 22\n\t\ts = s.replace(/\\'/g,'&#39;'); // 39 27\n\t\ts = s.replace(/</g,'&lt;'); // 60 3C\n\t\ts = s.replace(/>/g,'&gt;'); // 62 3E\n\n\t\tif (newline == null || newline)\n\t\t{\n\t\t\ts = s.replace(/\\n/g, '&#xa;');\n\t\t}\n\t\t\n\t\treturn s;\n\t},\n\t\n\t/**\n\t * Function: isVml\n\t * \n\t * Returns true if the given node is in the VML namespace.\n\t * \n\t * Parameters:\n\t * \n\t * node - DOM node whose tag urn should be checked.\n\t */\n\tisVml: function(node)\n\t{\n\t\treturn node != null && node.tagUrn == 'urn:schemas-microsoft-com:vml';\n\t},\n\n\t/**\n\t * Function: getXml\n\t * \n\t * Returns the XML content of the specified node. For Internet Explorer,\n\t * all \\r\\n\\t[\\t]* are removed from the XML string and the remaining \\r\\n\n\t * are replaced by \\n. All \\n are then replaced with linefeed, or &#xa; if\n\t * no linefeed is defined.\n\t * \n\t * Parameters:\n\t * \n\t * node - DOM node to return the XML for.\n\t * linefeed - Optional string that linefeeds are converted into. Default is\n\t * &#xa;\n\t */\n\tgetXml: function(node, linefeed)\n\t{\n\t\tvar xml = '';\n\n\t\tif (window.XMLSerializer != null)\n\t\t{\n\t\t\tvar xmlSerializer = new XMLSerializer();\n\t\t\txml = xmlSerializer.serializeToString(node);     \n\t\t}\n\t\telse if (node.xml != null)\n\t\t{\n\t\t\txml = node.xml.replace(/\\r\\n\\t[\\t]*/g, '').\n\t\t\t\treplace(/>\\r\\n/g, '>').\n\t\t\t\treplace(/\\r\\n/g, '\\n');\n\t\t}\n\n\t\t// Replaces linefeeds with HTML Entities.\n\t\tlinefeed = linefeed || '&#xa;';\n\t\txml = xml.replace(/\\n/g, linefeed);\n\t\t  \n\t\treturn xml;\n\t},\n\t\n\t/**\n\t * Function: extractTextWithWhitespace\n\t * \n\t * Returns the text content of the specified node.\n\t * \n\t * Parameters:\n\t * \n\t * elems - DOM nodes to return the text for.\n\t */\n\textractTextWithWhitespace: function(elems)\n\t{\n\t    // Known block elements for handling linefeeds (list is not complete)\n\t\tvar blocks = ['BLOCKQUOTE', 'DIV', 'H1', 'H2', 'H3', 'H4', 'H5', 'H6', 'OL', 'P', 'PRE', 'TABLE', 'UL'];\n\t\tvar ret = [];\n\t\t\n\t\tfunction doExtract(elts)\n\t\t{\n\t\t\t// Single break should be ignored\n\t\t\tif (elts.length == 1 && (elts[0].nodeName == 'BR' ||\n\t\t\t\telts[0].innerHTML == '\\n'))\n\t\t\t{\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t\n\t\t    for (var i = 0; i < elts.length; i++)\n\t\t    {\n\t\t        var elem = elts[i];\n\n\t\t\t\t// DIV with a br or linefeed forces a linefeed\n\t\t\t\tif (elem.nodeName == 'BR' || elem.innerHTML == '\\n' ||\n\t\t\t\t\t((elts.length == 1 || i == 0) && (elem.nodeName == 'DIV' &&\n\t\t\t\t\telem.innerHTML.toLowerCase() == '<br>')))\n\t\t    \t{\n\t    \t\t\tret.push('\\n');\n\t\t    \t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t        if (elem.nodeType === 3 || elem.nodeType === 4)\n\t\t\t        {\n\t\t\t        \tif (elem.nodeValue.length > 0)\n\t\t\t        \t{\n\t\t\t        \t\tret.push(elem.nodeValue);\n\t\t\t        \t}\n\t\t\t        }\n\t\t\t        else if (elem.nodeType !== 8 && elem.childNodes.length > 0)\n\t\t\t\t\t{\n\t\t\t\t\t\tdoExtract(elem.childNodes);\n\t\t\t\t\t}\n\t\t\t        \n\t        \t\tif (i < elts.length - 1 && mxUtils.indexOf(blocks, elts[i + 1].nodeName) >= 0)\n\t        \t\t{\n\t        \t\t\tret.push('\\n');\t\t\n\t        \t\t}\n\t\t\t\t}\n\t\t    }\n\t\t};\n\t\t\n\t\tdoExtract(elems);\n\t    \n\t    return ret.join('');\n\t},\n\n\t/**\n\t * Function: replaceTrailingNewlines\n\t * \n\t * Replaces each trailing newline with the given pattern.\n\t */\n\treplaceTrailingNewlines: function(str, pattern)\n\t{\n\t\t// LATER: Check is this can be done with a regular expression\n\t\tvar postfix = '';\n\t\t\n\t\twhile (str.length > 0 && str.charAt(str.length - 1) == '\\n')\n\t\t{\n\t\t\tstr = str.substring(0, str.length - 1);\n\t\t\tpostfix += pattern;\n\t\t}\n\t\t\n\t\treturn str + postfix;\n\t},\n\n\t/**\n\t * Function: getTextContent\n\t * \n\t * Returns the text content of the specified node.\n\t * \n\t * Parameters:\n\t * \n\t * node - DOM node to return the text content for.\n\t */\n\tgetTextContent: function(node)\n\t{\n\t\t// Only IE10-\n\t\tif (mxClient.IS_IE && node.innerText !== undefined)\n\t\t{\n\t\t\treturn node.innerText;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn (node != null) ? node[(node.textContent === undefined) ? 'text' : 'textContent'] : '';\n\t\t}\n\t},\n\t\n\t/**\n\t * Function: setTextContent\n\t * \n\t * Sets the text content of the specified node.\n\t * \n\t * Parameters:\n\t * \n\t * node - DOM node to set the text content for.\n\t * text - String that represents the text content.\n\t */\n\tsetTextContent: function(node, text)\n\t{\n\t\tif (node.innerText !== undefined)\n\t\t{\n\t\t\tnode.innerText = text;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tnode[(node.textContent === undefined) ? 'text' : 'textContent'] = text;\n\t\t}\n\t},\n\t\n\t/**\n\t * Function: getInnerHtml\n\t * \n\t * Returns the inner HTML for the given node as a string or an empty string\n\t * if no node was specified. The inner HTML is the text representing all\n\t * children of the node, but not the node itself.\n\t * \n\t * Parameters:\n\t * \n\t * node - DOM node to return the inner HTML for.\n\t */\n\tgetInnerHtml: function()\n\t{\n\t\tif (mxClient.IS_IE)\n\t\t{\n\t\t\treturn function(node)\n\t\t\t{\n\t\t\t\tif (node != null)\n\t\t\t\t{\n\t\t\t\t\treturn node.innerHTML;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\treturn '';\n\t\t\t};\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn function(node)\n\t\t\t{\n\t\t\t\tif (node != null)\n\t\t\t\t{\n\t\t\t\t\tvar serializer = new XMLSerializer();\n\t\t\t\t\treturn serializer.serializeToString(node);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\treturn '';\n\t\t\t};\n\t\t}\n\t}(),\n\n\t/**\n\t * Function: getOuterHtml\n\t * \n\t * Returns the outer HTML for the given node as a string or an empty\n\t * string if no node was specified. The outer HTML is the text representing\n\t * all children of the node including the node itself.\n\t * \n\t * Parameters:\n\t * \n\t * node - DOM node to return the outer HTML for.\n\t */\n\tgetOuterHtml: function()\n\t{\n\t\tif (mxClient.IS_IE)\n\t\t{\n\t\t\treturn function(node)\n\t\t\t{\n\t\t\t\tif (node != null)\n\t\t\t\t{\n\t\t\t\t\tif (node.outerHTML != null)\n\t\t\t\t\t{\n\t\t\t\t\t\treturn node.outerHTML;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tvar tmp = [];\n\t\t\t\t\t\ttmp.push('<'+node.nodeName);\n\t\t\t\t\t\t\n\t\t\t\t\t\tvar attrs = node.attributes;\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (attrs != null)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tfor (var i = 0; i < attrs.length; i++)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tvar value = attrs[i].value;\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tif (value != null && value.length > 0)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\ttmp.push(' ');\n\t\t\t\t\t\t\t\t\ttmp.push(attrs[i].nodeName);\n\t\t\t\t\t\t\t\t\ttmp.push('=\"');\n\t\t\t\t\t\t\t\t\ttmp.push(value);\n\t\t\t\t\t\t\t\t\ttmp.push('\"');\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (node.innerHTML.length == 0)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\ttmp.push('/>');\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\ttmp.push('>');\n\t\t\t\t\t\t\ttmp.push(node.innerHTML);\n\t\t\t\t\t\t\ttmp.push('</'+node.nodeName+'>');\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\treturn tmp.join('');\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\treturn '';\n\t\t\t};\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn function(node)\n\t\t\t{\n\t\t\t\tif (node != null)\n\t\t\t\t{\n\t\t\t\t\tvar serializer = new XMLSerializer();\n\t\t\t\t\treturn serializer.serializeToString(node);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\treturn '';\n\t\t\t};\n\t\t}\n\t}(),\n\t\n\t/**\n\t * Function: write\n\t * \n\t * Creates a text node for the given string and appends it to the given\n\t * parent. Returns the text node.\n\t * \n\t * Parameters:\n\t * \n\t * parent - DOM node to append the text node to.\n\t * text - String representing the text to be added.\n\t */\n\twrite: function(parent, text)\n\t{\n\t\tvar doc = parent.ownerDocument;\n\t\tvar node = doc.createTextNode(text);\n\t\t\n\t\tif (parent != null)\n\t\t{\n\t\t\tparent.appendChild(node);\n\t\t}\n\t\t\n\t\treturn node;\n\t},\n\t\n\t/**\n\t * Function: writeln\n\t * \n\t * Creates a text node for the given string and appends it to the given\n\t * parent with an additional linefeed. Returns the text node.\n\t * \n\t * Parameters:\n\t * \n\t * parent - DOM node to append the text node to.\n\t * text - String representing the text to be added.\n\t */\n\twriteln: function(parent, text)\n\t{\n\t\tvar doc = parent.ownerDocument;\n\t\tvar node = doc.createTextNode(text);\n\t\t\n\t\tif (parent != null)\n\t\t{\n\t\t\tparent.appendChild(node);\n\t\t\tparent.appendChild(document.createElement('br'));\n\t\t}\n\t\t\n\t\treturn node;\n\t},\n\t\n\t/**\n\t * Function: br\n\t * \n\t * Appends a linebreak to the given parent and returns the linebreak.\n\t * \n\t * Parameters:\n\t * \n\t * parent - DOM node to append the linebreak to.\n\t */\n\tbr: function(parent, count)\n\t{\n\t\tcount = count || 1;\n\t\tvar br = null;\n\t\t\n\t\tfor (var i = 0; i < count; i++)\n\t\t{\n\t\t\tif (parent != null)\n\t\t\t{\n\t\t\t\tbr = parent.ownerDocument.createElement('br');\n\t\t\t\tparent.appendChild(br);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn br;\n\t},\n\t\t\n\t/**\n\t * Function: button\n\t * \n\t * Returns a new button with the given level and function as an onclick\n\t * event handler.\n\t * \n\t * (code)\n\t * document.body.appendChild(mxUtils.button('Test', function(evt)\n\t * {\n\t *   alert('Hello, World!');\n\t * }));\n\t * (end)\n\t * \n\t * Parameters:\n\t * \n\t * label - String that represents the label of the button.\n\t * funct - Function to be called if the button is pressed.\n\t * doc - Optional document to be used for creating the button. Default is the\n\t * current document.\n\t */\n\tbutton: function(label, funct, doc)\n\t{\n\t\tdoc = (doc != null) ? doc : document;\n\t\t\n\t\tvar button = doc.createElement('button');\n\t\tmxUtils.write(button, label);\n\n\t\tmxEvent.addListener(button, 'click', function(evt)\n\t\t{\n\t\t\tfunct(evt);\n\t\t});\n\t\t\n\t\treturn button;\n\t},\n\t\n\t/**\n\t * Function: para\n\t * \n\t * Appends a new paragraph with the given text to the specified parent and\n\t * returns the paragraph.\n\t * \n\t * Parameters:\n\t * \n\t * parent - DOM node to append the text node to.\n\t * text - String representing the text for the new paragraph.\n\t */\n\tpara: function(parent, text)\n\t{\n\t\tvar p = document.createElement('p');\n\t\tmxUtils.write(p, text);\n\n\t\tif (parent != null)\n\t\t{\n\t\t\tparent.appendChild(p);\n\t\t}\n\t\t\n\t\treturn p;\n\t},\n\n\t/**\n\t * Function: addTransparentBackgroundFilter\n\t * \n\t * Adds a transparent background to the filter of the given node. This\n\t * background can be used in IE8 standards mode (native IE8 only) to pass\n\t * events through the node.\n\t */\n\taddTransparentBackgroundFilter: function(node)\n\t{\n\t\tnode.style.filter += 'progid:DXImageTransform.Microsoft.AlphaImageLoader(src=\\'' +\n\t\t\tmxClient.imageBasePath + '/transparent.gif\\', sizingMethod=\\'scale\\')';\n\t},\n\n\t/**\n\t * Function: linkAction\n\t * \n\t * Adds a hyperlink to the specified parent that invokes action on the\n\t * specified editor.\n\t * \n\t * Parameters:\n\t * \n\t * parent - DOM node to contain the new link.\n\t * text - String that is used as the link label.\n\t * editor - <mxEditor> that will execute the action.\n\t * action - String that defines the name of the action to be executed.\n\t * pad - Optional left-padding for the link. Default is 0.\n\t */\n\tlinkAction: function(parent, text, editor, action, pad)\n\t{\n\t\treturn mxUtils.link(parent, text, function()\n\t\t{\n\t\t\teditor.execute(action);\n\t\t}, pad);\n\t},\n\n\t/**\n\t * Function: linkInvoke\n\t * \n\t * Adds a hyperlink to the specified parent that invokes the specified\n\t * function on the editor passing along the specified argument. The\n\t * function name is the name of a function of the editor instance,\n\t * not an action name.\n\t * \n\t * Parameters:\n\t * \n\t * parent - DOM node to contain the new link.\n\t * text - String that is used as the link label.\n\t * editor - <mxEditor> instance to execute the function on.\n\t * functName - String that represents the name of the function.\n\t * arg - Object that represents the argument to the function.\n\t * pad - Optional left-padding for the link. Default is 0.\n\t */\n\tlinkInvoke: function(parent, text, editor, functName, arg, pad)\n\t{\n\t\treturn mxUtils.link(parent, text, function()\n\t\t{\n\t\t\teditor[functName](arg);\n\t\t}, pad);\n\t},\n\t\n\t/**\n\t * Function: link\n\t * \n\t * Adds a hyperlink to the specified parent and invokes the given function\n\t * when the link is clicked.\n\t * \n\t * Parameters:\n\t * \n\t * parent - DOM node to contain the new link.\n\t * text - String that is used as the link label.\n\t * funct - Function to execute when the link is clicked.\n\t * pad - Optional left-padding for the link. Default is 0.\n\t */\n\tlink: function(parent, text, funct, pad)\n\t{\n\t\tvar a = document.createElement('span');\n\t\t\n\t\ta.style.color = 'blue';\n\t\ta.style.textDecoration = 'underline';\n\t\ta.style.cursor = 'pointer';\n\t\t\n\t\tif (pad != null)\n\t\t{\n\t\t\ta.style.paddingLeft = pad+'px';\n\t\t}\n\t\t\n\t\tmxEvent.addListener(a, 'click', funct);\n\t\tmxUtils.write(a, text);\n\t\t\n\t\tif (parent != null)\n\t\t{\n\t\t\tparent.appendChild(a);\n\t\t}\n\t\t\n\t\treturn a;\n\t},\n\n\t/**\n\t * Function: fit\n\t * \n\t * Makes sure the given node is inside the visible area of the window. This\n\t * is done by setting the left and top in the style. \n\t */\n\tfit: function(node)\n\t{\n\t\tvar left = parseInt(node.offsetLeft);\n\t\tvar width = parseInt(node.offsetWidth);\n\t\t\t\n\t\tvar offset = mxUtils.getDocumentScrollOrigin(node.ownerDocument);\n\t\tvar sl = offset.x;\n\t\tvar st = offset.y;\n\n\t\tvar b = document.body;\n\t\tvar d = document.documentElement;\n\t\tvar right = (sl) + (b.clientWidth || d.clientWidth);\n\t\t\n\t\tif (left + width > right)\n\t\t{\n\t\t\tnode.style.left = Math.max(sl, right - width) + 'px';\n\t\t}\n\t\t\n\t\tvar top = parseInt(node.offsetTop);\n\t\tvar height = parseInt(node.offsetHeight);\n\t\t\n\t\tvar bottom = st + Math.max(b.clientHeight || 0, d.clientHeight);\n\t\t\n\t\tif (top + height > bottom)\n\t\t{\n\t\t\tnode.style.top = Math.max(st, bottom - height) + 'px';\n\t\t}\n\t},\n\n\t/**\n\t * Function: load\n\t * \n\t * Loads the specified URL *synchronously* and returns the <mxXmlRequest>.\n\t * Throws an exception if the file cannot be loaded. See <mxUtils.get> for\n\t * an asynchronous implementation.\n\t *\n\t * Example:\n\t * \n\t * (code)\n\t * try\n\t * {\n\t *   var req = mxUtils.load(filename);\n\t *   var root = req.getDocumentElement();\n\t *   // Process XML DOM...\n\t * }\n\t * catch (ex)\n\t * {\n\t *   mxUtils.alert('Cannot load '+filename+': '+ex);\n\t * }\n\t * (end)\n\t * \n\t * Parameters:\n\t * \n\t * url - URL to get the data from.\n\t */\n\tload: function(url)\n\t{\n\t\tvar req = new mxXmlRequest(url, null, 'GET', false);\n\t\treq.send();\n\t\t\n\t\treturn req;\n\t},\n\n\t/**\n\t * Function: get\n\t * \n\t * Loads the specified URL *asynchronously* and invokes the given functions\n\t * depending on the request status. Returns the <mxXmlRequest> in use. Both\n\t * functions take the <mxXmlRequest> as the only parameter. See\n\t * <mxUtils.load> for a synchronous implementation.\n\t *\n\t * Example:\n\t * \n\t * (code)\n\t * mxUtils.get(url, function(req)\n\t * {\n\t *    var node = req.getDocumentElement();\n\t *    // Process XML DOM...\n\t * });\n\t * (end)\n\t * \n\t * So for example, to load a diagram into an existing graph model, the\n\t * following code is used.\n\t * \n\t * (code)\n\t * mxUtils.get(url, function(req)\n\t * {\n\t *   var node = req.getDocumentElement();\n\t *   var dec = new mxCodec(node.ownerDocument);\n\t *   dec.decode(node, graph.getModel());\n\t * });\n\t * (end)\n\t * \n\t * Parameters:\n\t * \n\t * url - URL to get the data from.\n\t * onload - Optional function to execute for a successful response.\n\t * onerror - Optional function to execute on error.\n\t * binary - Optional boolean parameter that specifies if the request is\n\t * binary.\n\t * timeout - Optional timeout in ms before calling ontimeout.\n\t * ontimeout - Optional function to execute on timeout.\n\t */\n\tget: function(url, onload, onerror, binary, timeout, ontimeout)\n\t{\n\t\tvar req = new mxXmlRequest(url, null, 'GET');\n\t\t\n\t\tif (binary != null)\n\t\t{\n\t\t\treq.setBinary(binary);\n\t\t}\n\t\t\n\t\treq.send(onload, onerror, timeout, ontimeout);\n\t\t\n\t\treturn req;\n\t},\n\n\t/**\n\t * Function: getAll\n\t * \n\t * Loads the URLs in the given array *asynchronously* and invokes the given function\n\t * if all requests returned with a valid 2xx status. The error handler is invoked\n\t * once on the first error or invalid response.\n\t *\n\t * Parameters:\n\t * \n\t * urls - Array of URLs to be loaded.\n\t * onload - Callback with array of <mxXmlRequests>.\n\t * onerror - Optional function to execute on error.\n\t */\n\tgetAll: function(urls, onload, onerror)\n\t{\n\t\tvar remain = urls.length;\n\t\tvar result = [];\n\t\tvar errors = 0;\n\t\tvar err = function()\n\t\t{\n\t\t\tif (errors == 0 && onerror != null)\n\t\t\t{\n\t\t\t\tonerror();\n\t\t\t}\n\n\t\t\terrors++;\n\t\t};\n\t\t\n\t\tfor (var i = 0; i < urls.length; i++)\n\t\t{\n\t\t\t(function(url, index)\n\t\t\t{\n\t\t\t\tmxUtils.get(url, function(req)\n\t\t\t\t{\n\t\t\t\t\tvar status = req.getStatus();\n\t\t\t\t\t\n\t\t\t\t\tif (status < 200 || status > 299)\n\t\t\t\t\t{\n\t\t\t\t\t\terr();\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tresult[index] = req;\n\t\t\t\t\t\tremain--;\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (remain == 0)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tonload(result);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}, err);\n\t\t\t})(urls[i], i);\n\t\t}\n\t\t\n\t\tif (remain == 0)\n\t\t{\n\t\t\tonload(result);\t\t\t\n\t\t}\n\t},\n\t\n\t/**\n\t * Function: post\n\t * \n\t * Posts the specified params to the given URL *asynchronously* and invokes\n\t * the given functions depending on the request status. Returns the\n\t * <mxXmlRequest> in use. Both functions take the <mxXmlRequest> as the\n\t * only parameter. Make sure to use encodeURIComponent for the parameter\n\t * values.\n\t *\n\t * Example:\n\t * \n\t * (code)\n\t * mxUtils.post(url, 'key=value', function(req)\n\t * {\n\t * \tmxUtils.alert('Ready: '+req.isReady()+' Status: '+req.getStatus());\n\t *  // Process req.getDocumentElement() using DOM API if OK...\n\t * });\n\t * (end)\n\t * \n\t * Parameters:\n\t * \n\t * url - URL to get the data from.\n\t * params - Parameters for the post request.\n\t * onload - Optional function to execute for a successful response.\n\t * onerror - Optional function to execute on error.\n\t */\n\tpost: function(url, params, onload, onerror)\n\t{\n\t\treturn new mxXmlRequest(url, params).send(onload, onerror);\n\t},\n\t\n\t/**\n\t * Function: submit\n\t * \n\t * Submits the given parameters to the specified URL using\n\t * <mxXmlRequest.simulate> and returns the <mxXmlRequest>.\n\t * Make sure to use encodeURIComponent for the parameter\n\t * values.\n\t * \n\t * Parameters:\n\t * \n\t * url - URL to get the data from.\n\t * params - Parameters for the form.\n\t * doc - Document to create the form in.\n\t * target - Target to send the form result to.\n\t */\n\tsubmit: function(url, params, doc, target)\n\t{\n\t\treturn new mxXmlRequest(url, params).simulate(doc, target);\n\t},\n\t\n\t/**\n\t * Function: loadInto\n\t * \n\t * Loads the specified URL *asynchronously* into the specified document,\n\t * invoking onload after the document has been loaded. This implementation\n\t * does not use <mxXmlRequest>, but the document.load method.\n\t * \n\t * Parameters:\n\t * \n\t * url - URL to get the data from.\n\t * doc - The document to load the URL into.\n\t * onload - Function to execute when the URL has been loaded.\n\t */\n\tloadInto: function(url, doc, onload)\n\t{\n\t\tif (mxClient.IS_IE)\n\t\t{\n\t\t\tdoc.onreadystatechange = function ()\n\t\t\t{\n\t\t\t\tif (doc.readyState == 4)\n\t\t\t\t{\n\t\t\t\t\tonload();\n\t\t\t\t}\n\t\t\t};\n\t\t}\n\t\telse\n\t\t{\n\t\t\tdoc.addEventListener('load', onload, false);\n\t\t}\n\t\t\n\t\tdoc.load(url);\n\t},\n\t\n\t/**\n\t * Function: getValue\n\t * \n\t * Returns the value for the given key in the given associative array or\n\t * the given default value if the value is null.\n\t * \n\t * Parameters:\n\t * \n\t * array - Associative array that contains the value for the key.\n\t * key - Key whose value should be returned.\n\t * defaultValue - Value to be returned if the value for the given\n\t * key is null.\n\t */\n\tgetValue: function(array, key, defaultValue)\n\t{\n\t\tvar value = (array != null) ? array[key] : null;\n\n\t\tif (value == null)\n\t\t{\n\t\t\tvalue = defaultValue;\t\t\t\n\t\t}\n\t\t\n\t\treturn value;\n\t},\n\t\n\t/**\n\t * Function: getNumber\n\t * \n\t * Returns the numeric value for the given key in the given associative\n\t * array or the given default value (or 0) if the value is null. The value\n\t * is converted to a numeric value using the Number function.\n\t * \n\t * Parameters:\n\t * \n\t * array - Associative array that contains the value for the key.\n\t * key - Key whose value should be returned.\n\t * defaultValue - Value to be returned if the value for the given\n\t * key is null. Default is 0.\n\t */\n\tgetNumber: function(array, key, defaultValue)\n\t{\n\t\tvar value = (array != null) ? array[key] : null;\n\n\t\tif (value == null)\n\t\t{\n\t\t\tvalue = defaultValue || 0;\t\t\t\n\t\t}\n\t\t\n\t\treturn Number(value);\n\t},\n\t\n\t/**\n\t * Function: getColor\n\t * \n\t * Returns the color value for the given key in the given associative\n\t * array or the given default value if the value is null. If the value\n\t * is <mxConstants.NONE> then null is returned.\n\t * \n\t * Parameters:\n\t * \n\t * array - Associative array that contains the value for the key.\n\t * key - Key whose value should be returned.\n\t * defaultValue - Value to be returned if the value for the given\n\t * key is null. Default is null.\n\t */\n\tgetColor: function(array, key, defaultValue)\n\t{\n\t\tvar value = (array != null) ? array[key] : null;\n\n\t\tif (value == null)\n\t\t{\n\t\t\tvalue = defaultValue;\n\t\t}\n\t\telse if (value == mxConstants.NONE)\n\t\t{\n\t\t\tvalue = null;\n\t\t}\n\t\t\n\t\treturn value;\n\t},\n\n\t/**\n\t * Function: clone\n\t * \n\t * Recursively clones the specified object ignoring all fieldnames in the\n\t * given array of transient fields. <mxObjectIdentity.FIELD_NAME> is always\n\t * ignored by this function.\n\t * \n\t * Parameters:\n\t * \n\t * obj - Object to be cloned.\n\t * transients - Optional array of strings representing the fieldname to be\n\t * ignored.\n\t * shallow - Optional boolean argument to specify if a shallow clone should\n\t * be created, that is, one where all object references are not cloned or,\n\t * in other words, one where only atomic (strings, numbers) values are\n\t * cloned. Default is false.\n\t */\n\tclone: function(obj, transients, shallow)\n\t{\n\t\tshallow = (shallow != null) ? shallow : false;\n\t\tvar clone = null;\n\t\t\n\t\tif (obj != null && typeof(obj.constructor) == 'function')\n\t\t{\n\t\t\tclone = new obj.constructor();\n\t\t\t\n\t\t    for (var i in obj)\n\t\t    {\n\t\t    \tif (i != mxObjectIdentity.FIELD_NAME && (transients == null ||\n\t\t    \t\tmxUtils.indexOf(transients, i) < 0))\n\t\t    \t{\n\t\t\t    \tif (!shallow && typeof(obj[i]) == 'object')\n\t\t\t    \t{\n\t\t\t            clone[i] = mxUtils.clone(obj[i]);\n\t\t\t        }\n\t\t\t        else\n\t\t\t        {\n\t\t\t            clone[i] = obj[i];\n\t\t\t        }\n\t\t\t\t}\n\t\t    }\n\t\t}\n\t\t\n\t    return clone;\n\t},\n\n\t/**\n\t * Function: equalPoints\n\t * \n\t * Compares all mxPoints in the given lists.\n\t * \n\t * Parameters:\n\t * \n\t * a - Array of <mxPoints> to be compared.\n\t * b - Array of <mxPoints> to be compared.\n\t */\n\tequalPoints: function(a, b)\n\t{\n\t\tif ((a == null && b != null) || (a != null && b == null) ||\n\t\t\t(a != null && b != null && a.length != b.length))\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\telse if (a != null && b != null)\n\t\t{\n\t\t\tfor (var i = 0; i < a.length; i++)\n\t\t\t{\n\t\t\t\tif (a[i] == b[i] || (a[i] != null && !a[i].equals(b[i])))\n\t\t\t\t{\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn true;\n\t},\n\n\t/**\n\t * Function: equalEntries\n\t * \n\t * Returns true if all properties of the given objects are equal. Values\n\t * with NaN are equal to NaN and unequal to any other value.\n\t * \n\t * Parameters:\n\t * \n\t * a - First object to be compared.\n\t * b - Second object to be compared.\n\t */\n\tequalEntries: function(a, b)\n\t{\n\t\tif ((a == null && b != null) || (a != null && b == null) ||\n\t\t\t(a != null && b != null && a.length != b.length))\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\telse if (a != null && b != null)\n\t\t{\n\t\t\t// Counts keys in b to check if all values have been compared\n\t\t\tvar count = 0;\n\t\t\t\n\t\t\tfor (var key in b)\n\t\t\t{\n\t\t\t\tcount++;\n\t\t\t}\n\t\t\t\n\t\t\tfor (var key in a)\n\t\t\t{\n\t\t\t\tcount--\n\t\t\t\t\n\t\t\t\tif ((!mxUtils.isNaN(a[key]) || !mxUtils.isNaN(b[key])) && a[key] != b[key])\n\t\t\t\t{\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn count == 0;\n\t},\n\t\n\t/**\n\t * Function: removeDuplicates\n\t * \n\t * Removes all duplicates from the given array.\n\t */\n\tremoveDuplicates: function(arr)\n\t{\n\t\tvar dict = new mxDictionary();\n\t\tvar result = [];\n\t\t\n\t\tfor (var i = 0; i < arr.length; i++)\n\t\t{\n\t\t\tif (!dict.get(arr[i]))\n\t\t\t{\n\t\t\t\tresult.push(arr[i]);\n\t\t\t\tdict.put(arr[i], true);\n\t\t\t}\n\t\t}\n\n\t\treturn result;\n\t},\n\t\n\t/**\n\t * Function: isNaN\n\t *\n\t * Returns true if the given value is of type number and isNaN returns true.\n\t */\n\tisNaN: function(value)\n\t{\n\t\treturn typeof(value) == 'number' && isNaN(value);\n\t},\n\t\n\t/**\n\t * Function: extend\n\t *\n\t * Assigns a copy of the superclass prototype to the subclass prototype.\n\t * Note that this does not call the constructor of the superclass at this\n\t * point, the superclass constructor should be called explicitely in the\n\t * subclass constructor. Below is an example.\n\t * \n\t * (code)\n\t * MyGraph = function(container, model, renderHint, stylesheet)\n\t * {\n\t *   mxGraph.call(this, container, model, renderHint, stylesheet);\n\t * }\n\t * \n\t * mxUtils.extend(MyGraph, mxGraph);\n\t * (end)\n\t * \n\t * Parameters:\n\t * \n\t * ctor - Constructor of the subclass.\n\t * superCtor - Constructor of the superclass.\n\t */\n\textend: function(ctor, superCtor)\n\t{\n\t\tvar f = function() {};\n\t\tf.prototype = superCtor.prototype;\n\t\t\n\t\tctor.prototype = new f();\n\t\tctor.prototype.constructor = ctor;\n\t},\n\n\t/**\n\t * Function: toString\n\t * \n\t * Returns a textual representation of the specified object.\n\t * \n\t * Parameters:\n\t * \n\t * obj - Object to return the string representation for.\n\t */\n\ttoString: function(obj)\n\t{\n\t    var output = '';\n\t    \n\t    for (var i in obj)\n\t    {\n\t    \ttry\n\t    \t{\n\t\t\t    if (obj[i] == null)\n\t\t\t    {\n\t\t            output += i + ' = [null]\\n';\n\t\t\t    }\n\t\t\t    else if (typeof(obj[i]) == 'function')\n\t\t\t    {\n\t\t            output += i + ' => [Function]\\n';\n\t\t        }\n\t\t        else if (typeof(obj[i]) == 'object')\n\t\t        {\n\t\t        \tvar ctor = mxUtils.getFunctionName(obj[i].constructor); \n\t\t            output += i + ' => [' + ctor + ']\\n';\n\t\t        }\n\t\t        else\n\t\t        {\n\t\t            output += i + ' = ' + obj[i] + '\\n';\n\t\t        }\n\t    \t}\n\t    \tcatch (e)\n\t    \t{\n\t    \t\toutput += i + '=' + e.message;\n\t    \t}\n\t    }\n\t    \n\t    return output;\n\t},\n\n\t/**\n\t * Function: toRadians\n\t * \n\t * Converts the given degree to radians.\n\t */\n\ttoRadians: function(deg)\n\t{\n\t\treturn Math.PI * deg / 180;\n\t},\n\n\t/**\n\t * Function: toDegree\n\t * \n\t * Converts the given radians to degree.\n\t */\n\ttoDegree: function(rad)\n\t{\n\t\treturn rad * 180 / Math.PI;\n\t},\n\t\n\t/**\n\t * Function: arcToCurves\n\t * \n\t * Converts the given arc to a series of curves.\n\t */\n\tarcToCurves: function(x0, y0, r1, r2, angle, largeArcFlag, sweepFlag, x, y)\n\t{\n\t\tx -= x0;\n\t\ty -= y0;\n\t\t\n        if (r1 === 0 || r2 === 0) \n        {\n        \treturn result;\n        }\n        \n        var fS = sweepFlag;\n        var psai = angle;\n        r1 = Math.abs(r1);\n        r2 = Math.abs(r2);\n        var ctx = -x / 2;\n        var cty = -y / 2;\n        var cpsi = Math.cos(psai * Math.PI / 180);\n        var spsi = Math.sin(psai * Math.PI / 180);\n        var rxd = cpsi * ctx + spsi * cty;\n        var ryd = -1 * spsi * ctx + cpsi * cty;\n        var rxdd = rxd * rxd;\n        var rydd = ryd * ryd;\n        var r1x = r1 * r1;\n        var r2y = r2 * r2;\n        var lamda = rxdd / r1x + rydd / r2y;\n        var sds;\n        \n        if (lamda > 1) \n        {\n        \tr1 = Math.sqrt(lamda) * r1;\n        \tr2 = Math.sqrt(lamda) * r2;\n        \tsds = 0;\n        }  \n        else\n        {\n        \tvar seif = 1;\n            \n        \tif (largeArcFlag === fS) \n        \t{\n        \t\tseif = -1;\n        \t}\n            \n        \tsds = seif * Math.sqrt((r1x * r2y - r1x * rydd - r2y * rxdd) / (r1x * rydd + r2y * rxdd));\n        }\n        \n        var txd = sds * r1 * ryd / r2;\n        var tyd = -1 * sds * r2 * rxd / r1;\n        var tx = cpsi * txd - spsi * tyd + x / 2;\n        var ty = spsi * txd + cpsi * tyd + y / 2;\n        var rad = Math.atan2((ryd - tyd) / r2, (rxd - txd) / r1) - Math.atan2(0, 1);\n        var s1 = (rad >= 0) ? rad : 2 * Math.PI + rad;\n        rad = Math.atan2((-ryd - tyd) / r2, (-rxd - txd) / r1) - Math.atan2((ryd - tyd) / r2, (rxd - txd) / r1);\n        var dr = (rad >= 0) ? rad : 2 * Math.PI + rad;\n        \n        if (fS == 0 && dr > 0) \n        {\n        \tdr -= 2 * Math.PI;\n        }\n        else if (fS != 0 && dr < 0) \n        {\n        \tdr += 2 * Math.PI;\n        }\n        \n        var sse = dr * 2 / Math.PI;\n        var seg = Math.ceil(sse < 0 ? -1 * sse : sse);\n        var segr = dr / seg;\n        var t = 8/3 * Math.sin(segr / 4) * Math.sin(segr / 4) / Math.sin(segr / 2);\n        var cpsir1 = cpsi * r1;\n        var cpsir2 = cpsi * r2;\n        var spsir1 = spsi * r1;\n        var spsir2 = spsi * r2;\n        var mc = Math.cos(s1);\n        var ms = Math.sin(s1);\n        var x2 = -t * (cpsir1 * ms + spsir2 * mc);\n        var y2 = -t * (spsir1 * ms - cpsir2 * mc);\n        var x3 = 0;\n        var y3 = 0;\n\n\t\tvar result = [];\n        \n        for (var n = 0; n < seg; ++n) \n        {\n            s1 += segr;\n            mc = Math.cos(s1);\n            ms = Math.sin(s1);\n            \n            x3 = cpsir1 * mc - spsir2 * ms + tx;\n            y3 = spsir1 * mc + cpsir2 * ms + ty;\n            var dx = -t * (cpsir1 * ms + spsir2 * mc);\n            var dy = -t * (spsir1 * ms - cpsir2 * mc);\n            \n            // CurveTo updates x0, y0 so need to restore it\n            var index = n * 6;\n            result[index] = Number(x2 + x0);\n            result[index + 1] = Number(y2 + y0);\n            result[index + 2] = Number(x3 - dx + x0);\n            result[index + 3] = Number(y3 - dy + y0);\n            result[index + 4] = Number(x3 + x0);\n            result[index + 5] = Number(y3 + y0);\n            \n\t\t\tx2 = x3 + dx;\n            y2 = y3 + dy;\n        }\n        \n        return result;\n\t},\n\n\t/**\n\t * Function: getBoundingBox\n\t * \n\t * Returns the bounding box for the rotated rectangle.\n\t * \n\t * Parameters:\n\t * \n\t * rect - <mxRectangle> to be rotated.\n\t * angle - Number that represents the angle (in degrees).\n\t * cx - Optional <mxPoint> that represents the rotation center. If no\n\t * rotation center is given then the center of rect is used.\n\t */\n\tgetBoundingBox: function(rect, rotation, cx)\n\t{\n        var result = null;\n\n        if (rect != null && rotation != null && rotation != 0)\n        {\n            var rad = mxUtils.toRadians(rotation);\n            var cos = Math.cos(rad);\n            var sin = Math.sin(rad);\n\n            cx = (cx != null) ? cx : new mxPoint(rect.x + rect.width / 2, rect.y  + rect.height / 2);\n\n            var p1 = new mxPoint(rect.x, rect.y);\n            var p2 = new mxPoint(rect.x + rect.width, rect.y);\n            var p3 = new mxPoint(p2.x, rect.y + rect.height);\n            var p4 = new mxPoint(rect.x, p3.y);\n\n            p1 = mxUtils.getRotatedPoint(p1, cos, sin, cx);\n            p2 = mxUtils.getRotatedPoint(p2, cos, sin, cx);\n            p3 = mxUtils.getRotatedPoint(p3, cos, sin, cx);\n            p4 = mxUtils.getRotatedPoint(p4, cos, sin, cx);\n\n            result = new mxRectangle(p1.x, p1.y, 0, 0);\n            result.add(new mxRectangle(p2.x, p2.y, 0, 0));\n            result.add(new mxRectangle(p3.x, p3.y, 0, 0));\n            result.add(new mxRectangle(p4.x, p4.y, 0, 0));\n        }\n\n        return result;\n\t},\n\n\t/**\n\t * Function: getRotatedPoint\n\t * \n\t * Rotates the given point by the given cos and sin.\n\t */\n\tgetRotatedPoint: function(pt, cos, sin, c)\n\t{\n\t\tc = (c != null) ? c : new mxPoint();\n\t\tvar x = pt.x - c.x;\n\t\tvar y = pt.y - c.y;\n\n\t\tvar x1 = x * cos - y * sin;\n\t\tvar y1 = y * cos + x * sin;\n\n\t\treturn new mxPoint(x1 + c.x, y1 + c.y);\n\t},\n\t\n\t/**\n\t * Returns an integer mask of the port constraints of the given map\n\t * @param dict the style map to determine the port constraints for\n\t * @param defaultValue Default value to return if the key is undefined.\n\t * @return the mask of port constraint directions\n\t * \n\t * Parameters:\n\t * \n\t * terminal - <mxCelState> that represents the terminal.\n\t * edge - <mxCellState> that represents the edge.\n\t * source - Boolean that specifies if the terminal is the source terminal.\n\t * defaultValue - Default value to be returned.\n\t */\n\tgetPortConstraints: function(terminal, edge, source, defaultValue)\n\t{\n\t\tvar value = mxUtils.getValue(terminal.style, mxConstants.STYLE_PORT_CONSTRAINT,\n\t\t\tmxUtils.getValue(edge.style, (source) ? mxConstants.STYLE_SOURCE_PORT_CONSTRAINT :\n\t\t\t\tmxConstants.STYLE_TARGET_PORT_CONSTRAINT, null));\n\t\t\n\t\tif (value == null)\n\t\t{\n\t\t\treturn defaultValue;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tvar directions = value.toString();\n\t\t\tvar returnValue = mxConstants.DIRECTION_MASK_NONE;\n\t\t\tvar constraintRotationEnabled = mxUtils.getValue(terminal.style, mxConstants.STYLE_PORT_CONSTRAINT_ROTATION, 0);\n\t\t\tvar rotation = 0;\n\t\t\t\n\t\t\tif (constraintRotationEnabled == 1)\n\t\t\t{\n\t\t\t\trotation = mxUtils.getValue(terminal.style, mxConstants.STYLE_ROTATION, 0);\n\t\t\t}\n\t\t\t\n\t\t\tvar quad = 0;\n\n\t\t\tif (rotation > 45)\n\t\t\t{\n\t\t\t\tquad = 1;\n\t\t\t\t\n\t\t\t\tif (rotation >= 135)\n\t\t\t\t{\n\t\t\t\t\tquad = 2;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if (rotation < -45)\n\t\t\t{\n\t\t\t\tquad = 3;\n\t\t\t\t\n\t\t\t\tif (rotation <= -135)\n\t\t\t\t{\n\t\t\t\t\tquad = 2;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (directions.indexOf(mxConstants.DIRECTION_NORTH) >= 0)\n\t\t\t{\n\t\t\t\tswitch (quad)\n\t\t\t\t{\n\t\t\t\t\tcase 0:\n\t\t\t\t\t\treturnValue |= mxConstants.DIRECTION_MASK_NORTH;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 1:\n\t\t\t\t\t\treturnValue |= mxConstants.DIRECTION_MASK_EAST;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 2:\n\t\t\t\t\t\treturnValue |= mxConstants.DIRECTION_MASK_SOUTH;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 3:\n\t\t\t\t\t\treturnValue |= mxConstants.DIRECTION_MASK_WEST;\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (directions.indexOf(mxConstants.DIRECTION_WEST) >= 0)\n\t\t\t{\n\t\t\t\tswitch (quad)\n\t\t\t\t{\n\t\t\t\t\tcase 0:\n\t\t\t\t\t\treturnValue |= mxConstants.DIRECTION_MASK_WEST;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 1:\n\t\t\t\t\t\treturnValue |= mxConstants.DIRECTION_MASK_NORTH;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 2:\n\t\t\t\t\t\treturnValue |= mxConstants.DIRECTION_MASK_EAST;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 3:\n\t\t\t\t\t\treturnValue |= mxConstants.DIRECTION_MASK_SOUTH;\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (directions.indexOf(mxConstants.DIRECTION_SOUTH) >= 0)\n\t\t\t{\n\t\t\t\tswitch (quad)\n\t\t\t\t{\n\t\t\t\t\tcase 0:\n\t\t\t\t\t\treturnValue |= mxConstants.DIRECTION_MASK_SOUTH;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 1:\n\t\t\t\t\t\treturnValue |= mxConstants.DIRECTION_MASK_WEST;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 2:\n\t\t\t\t\t\treturnValue |= mxConstants.DIRECTION_MASK_NORTH;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 3:\n\t\t\t\t\t\treturnValue |= mxConstants.DIRECTION_MASK_EAST;\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (directions.indexOf(mxConstants.DIRECTION_EAST) >= 0)\n\t\t\t{\n\t\t\t\tswitch (quad)\n\t\t\t\t{\n\t\t\t\t\tcase 0:\n\t\t\t\t\t\treturnValue |= mxConstants.DIRECTION_MASK_EAST;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 1:\n\t\t\t\t\t\treturnValue |= mxConstants.DIRECTION_MASK_SOUTH;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 2:\n\t\t\t\t\t\treturnValue |= mxConstants.DIRECTION_MASK_WEST;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 3:\n\t\t\t\t\t\treturnValue |= mxConstants.DIRECTION_MASK_NORTH;\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn returnValue;\n\t\t}\n\t},\n\t\n\t/**\n\t * Function: reversePortConstraints\n\t * \n\t * Reverse the port constraint bitmask. For example, north | east\n\t * becomes south | west\n\t */\n\treversePortConstraints: function(constraint)\n\t{\n\t\tvar result = 0;\n\t\t\n\t\tresult = (constraint & mxConstants.DIRECTION_MASK_WEST) << 3;\n\t\tresult |= (constraint & mxConstants.DIRECTION_MASK_NORTH) << 1;\n\t\tresult |= (constraint & mxConstants.DIRECTION_MASK_SOUTH) >> 1;\n\t\tresult |= (constraint & mxConstants.DIRECTION_MASK_EAST) >> 3;\n\t\t\n\t\treturn result;\n\t},\n\t\n\t/**\n\t * Function: findNearestSegment\n\t * \n\t * Finds the index of the nearest segment on the given cell state for\n\t * the specified coordinate pair.\n\t */\n\tfindNearestSegment: function(state, x, y)\n\t{\n\t\tvar index = -1;\n\t\t\n\t\tif (state.absolutePoints.length > 0)\n\t\t{\n\t\t\tvar last = state.absolutePoints[0];\n\t\t\tvar min = null;\n\t\t\t\n\t\t\tfor (var i = 1; i < state.absolutePoints.length; i++)\n\t\t\t{\n\t\t\t\tvar current = state.absolutePoints[i];\n\t\t\t\tvar dist = mxUtils.ptSegDistSq(last.x, last.y,\n\t\t\t\t\tcurrent.x, current.y, x, y);\n\t\t\t\t\n\t\t\t\tif (min == null || dist < min)\n\t\t\t\t{\n\t\t\t\t\tmin = dist;\n\t\t\t\t\tindex = i - 1;\n\t\t\t\t}\n\n\t\t\t\tlast = current;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn index;\n\t},\n\n\t/**\n\t * Function: getDirectedBounds\n\t * \n\t * Adds the given margins to the given rectangle and rotates and flips the\n\t * rectangle according to the respective styles in style.\n\t */\n\tgetDirectedBounds: function (rect, m, style, flipH, flipV)\n\t{\n\t\tvar d = mxUtils.getValue(style, mxConstants.STYLE_DIRECTION, mxConstants.DIRECTION_EAST);\n\t\tflipH = (flipH != null) ? flipH : mxUtils.getValue(style, mxConstants.STYLE_FLIPH, false);\n\t\tflipV = (flipV != null) ? flipV : mxUtils.getValue(style, mxConstants.STYLE_FLIPV, false);\n\n\t\tm.x = Math.round(Math.max(0, Math.min(rect.width, m.x)));\n\t\tm.y = Math.round(Math.max(0, Math.min(rect.height, m.y)));\n\t\tm.width = Math.round(Math.max(0, Math.min(rect.width, m.width)));\n\t\tm.height = Math.round(Math.max(0, Math.min(rect.height, m.height)));\n\t\t\n\t\tif ((flipV && (d == mxConstants.DIRECTION_SOUTH || d == mxConstants.DIRECTION_NORTH)) ||\n\t\t\t(flipH && (d == mxConstants.DIRECTION_EAST || d == mxConstants.DIRECTION_WEST)))\n\t\t{\n\t\t\tvar tmp = m.x;\n\t\t\tm.x = m.width;\n\t\t\tm.width = tmp;\n\t\t}\n\t\t\t\n\t\tif ((flipH && (d == mxConstants.DIRECTION_SOUTH || d == mxConstants.DIRECTION_NORTH)) ||\n\t\t\t(flipV && (d == mxConstants.DIRECTION_EAST || d == mxConstants.DIRECTION_WEST)))\n\t\t{\n\t\t\tvar tmp = m.y;\n\t\t\tm.y = m.height;\n\t\t\tm.height = tmp;\n\t\t}\n\t\t\n\t\tvar m2 = mxRectangle.fromRectangle(m);\n\t\t\n\t\tif (d == mxConstants.DIRECTION_SOUTH)\n\t\t{\n\t\t\tm2.y = m.x;\n\t\t\tm2.x = m.height;\n\t\t\tm2.width = m.y;\n\t\t\tm2.height = m.width;\n\t\t}\n\t\telse if (d == mxConstants.DIRECTION_WEST)\n\t\t{\n\t\t\tm2.y = m.height;\n\t\t\tm2.x = m.width;\n\t\t\tm2.width = m.x;\n\t\t\tm2.height = m.y;\n\t\t}\n\t\telse if (d == mxConstants.DIRECTION_NORTH)\n\t\t{\n\t\t\tm2.y = m.width;\n\t\t\tm2.x = m.y;\n\t\t\tm2.width = m.height;\n\t\t\tm2.height = m.x;\n\t\t}\n\t\t\n\t\treturn new mxRectangle(rect.x + m2.x, rect.y + m2.y, rect.width - m2.width - m2.x, rect.height - m2.height - m2.y);\n\t},\n\n\t/**\n\t * Function: getPerimeterPoint\n\t * \n\t * Returns the intersection between the polygon defined by the array of\n\t * points and the line between center and point.\n\t */\n\tgetPerimeterPoint: function (pts, center, point)\n\t{\n\t\tvar min = null;\n\t\t\n\t\tfor (var i = 0; i < pts.length - 1; i++)\n\t\t{\n\t\t\tvar pt = mxUtils.intersection(pts[i].x, pts[i].y, pts[i + 1].x, pts[i + 1].y,\n\t\t\t\tcenter.x, center.y, point.x, point.y);\n\t\t\t\n\t\t\tif (pt != null)\n\t\t\t{\n\t\t\t\tvar dx = point.x - pt.x;\n\t\t\t\tvar dy = point.y - pt.y;\n\t\t\t\tvar ip = {p: pt, distSq: dy * dy + dx * dx};\n\t\t\t\t\n\t\t\t\tif (ip != null && (min == null || min.distSq > ip.distSq))\n\t\t\t\t{\n\t\t\t\t\tmin = ip;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn (min != null) ? min.p : null;\n\t},\n\n\t/**\n\t * Function: rectangleIntersectsSegment\n\t * \n\t * Returns true if the given rectangle intersects the given segment.\n\t * \n\t * Parameters:\n\t * \n\t * bounds - <mxRectangle> that represents the rectangle.\n\t * p1 - <mxPoint> that represents the first point of the segment.\n\t * p2 - <mxPoint> that represents the second point of the segment.\n\t */\n\trectangleIntersectsSegment: function(bounds, p1, p2)\n\t{\n\t\tvar top = bounds.y;\n\t\tvar left = bounds.x;\n\t\tvar bottom = top + bounds.height;\n\t\tvar right = left + bounds.width;\n\t\t\t\n\t\t// Find min and max X for the segment\n\t\tvar minX = p1.x;\n\t\tvar maxX = p2.x;\n\t\t\n\t\tif (p1.x > p2.x)\n\t\t{\n\t\t  minX = p2.x;\n\t\t  maxX = p1.x;\n\t\t}\n\t\t\n\t\t// Find the intersection of the segment's and rectangle's x-projections\n\t\tif (maxX > right)\n\t\t{\n\t\t  maxX = right;\n\t\t}\n\t\t\n\t\tif (minX < left)\n\t\t{\n\t\t  minX = left;\n\t\t}\n\t\t\n\t\tif (minX > maxX) // If their projections do not intersect return false\n\t\t{\n\t\t  return false;\n\t\t}\n\t\t\n\t\t// Find corresponding min and max Y for min and max X we found before\n\t\tvar minY = p1.y;\n\t\tvar maxY = p2.y;\n\t\tvar dx = p2.x - p1.x;\n\t\t\n\t\tif (Math.abs(dx) > 0.0000001)\n\t\t{\n\t\t  var a = (p2.y - p1.y) / dx;\n\t\t  var b = p1.y - a * p1.x;\n\t\t  minY = a * minX + b;\n\t\t  maxY = a * maxX + b;\n\t\t}\n\t\t\n\t\tif (minY > maxY)\n\t\t{\n\t\t  var tmp = maxY;\n\t\t  maxY = minY;\n\t\t  minY = tmp;\n\t\t}\n\t\t\n\t\t// Find the intersection of the segment's and rectangle's y-projections\n\t\tif (maxY > bottom)\n\t\t{\n\t\t  maxY = bottom;\n\t\t}\n\t\t\n\t\tif (minY < top)\n\t\t{\n\t\t  minY = top;\n\t\t}\n\t\t\n\t\tif (minY > maxY) // If Y-projections do not intersect return false\n\t\t{\n\t\t  return false;\n\t\t}\n\t\t\n\t\treturn true;\n\t},\n\t\n\t/**\n\t * Function: contains\n\t * \n\t * Returns true if the specified point (x, y) is contained in the given rectangle.\n\t * \n\t * Parameters:\n\t * \n\t * bounds - <mxRectangle> that represents the area.\n\t * x - X-coordinate of the point.\n\t * y - Y-coordinate of the point.\n\t */\n\tcontains: function(bounds, x, y)\n\t{\n\t\treturn (bounds.x <= x && bounds.x + bounds.width >= x &&\n\t\t\t\tbounds.y <= y && bounds.y + bounds.height >= y);\n\t},\n\n\t/**\n\t * Function: intersects\n\t * \n\t * Returns true if the two rectangles intersect.\n\t * \n\t * Parameters:\n\t * \n\t * a - <mxRectangle> to be checked for intersection.\n\t * b - <mxRectangle> to be checked for intersection.\n\t */\n\tintersects: function(a, b)\n\t{\n\t\tvar tw = a.width;\n\t\tvar th = a.height;\n\t\tvar rw = b.width;\n\t\tvar rh = b.height;\n\t\t\n\t\tif (rw <= 0 || rh <= 0 || tw <= 0 || th <= 0)\n\t\t{\n\t\t    return false;\n\t\t}\n\t\t\n\t\tvar tx = a.x;\n\t\tvar ty = a.y;\n\t\tvar rx = b.x;\n\t\tvar ry = b.y;\n\t\t\n\t\trw += rx;\n\t\trh += ry;\n\t\ttw += tx;\n\t\tth += ty;\n\n\t\treturn ((rw < rx || rw > tx) &&\n\t\t\t(rh < ry || rh > ty) &&\n\t\t\t(tw < tx || tw > rx) &&\n\t\t\t(th < ty || th > ry));\n\t},\n\n\t/**\n\t * Function: intersects\n\t * \n\t * Returns true if the two rectangles intersect.\n\t * \n\t * Parameters:\n\t * \n\t * a - <mxRectangle> to be checked for intersection.\n\t * b - <mxRectangle> to be checked for intersection.\n\t */\n\tintersectsHotspot: function(state, x, y, hotspot, min, max)\n\t{\n\t\thotspot = (hotspot != null) ? hotspot : 1;\n\t\tmin = (min != null) ? min : 0;\n\t\tmax = (max != null) ? max : 0;\n\t\t\n\t\tif (hotspot > 0)\n\t\t{\n\t\t\tvar cx = state.getCenterX();\n\t\t\tvar cy = state.getCenterY();\n\t\t\tvar w = state.width;\n\t\t\tvar h = state.height;\n\t\t\t\n\t\t\tvar start = mxUtils.getValue(state.style, mxConstants.STYLE_STARTSIZE) * state.view.scale;\n\n\t\t\tif (start > 0)\n\t\t\t{\n\t\t\t\tif (mxUtils.getValue(state.style, mxConstants.STYLE_HORIZONTAL, true))\n\t\t\t\t{\n\t\t\t\t\tcy = state.y + start / 2;\n\t\t\t\t\th = start;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tcx = state.x + start / 2;\n\t\t\t\t\tw = start;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tw = Math.max(min, w * hotspot);\n\t\t\th = Math.max(min, h * hotspot);\n\t\t\t\n\t\t\tif (max > 0)\n\t\t\t{\n\t\t\t\tw = Math.min(w, max);\n\t\t\t\th = Math.min(h, max);\n\t\t\t}\n\t\t\t\n\t\t\tvar rect = new mxRectangle(cx - w / 2, cy - h / 2, w, h);\n\t\t\tvar alpha = mxUtils.toRadians(mxUtils.getValue(state.style, mxConstants.STYLE_ROTATION) || 0);\n\t\t\t\n\t\t\tif (alpha != 0)\n\t\t\t{\n\t\t\t\tvar cos = Math.cos(-alpha);\n\t\t\t\tvar sin = Math.sin(-alpha);\n\t\t\t\tvar cx = new mxPoint(state.getCenterX(), state.getCenterY());\n\t\t\t\tvar pt = mxUtils.getRotatedPoint(new mxPoint(x, y), cos, sin, cx);\n\t\t\t\tx = pt.x;\n\t\t\t\ty = pt.y;\n\t\t\t}\n\t\t\t\n\t\t\treturn mxUtils.contains(rect, x, y);\t\t\t\n\t\t}\n\t\t\n\t\treturn true;\n\t},\n\n\t/**\n\t * Function: getOffset\n\t * \n\t * Returns the offset for the specified container as an <mxPoint>. The\n\t * offset is the distance from the top left corner of the container to the\n\t * top left corner of the document.\n\t * \n\t * Parameters:\n\t * \n\t * container - DOM node to return the offset for.\n\t * scollOffset - Optional boolean to add the scroll offset of the document.\n\t * Default is false.\n\t */\n\tgetOffset: function(container, scrollOffset)\n\t{\n\t\tvar offsetLeft = 0;\n\t\tvar offsetTop = 0;\n\t\t\n\t\t// Ignores document scroll origin for fixed elements\n\t\tvar fixed = false;\n\t\tvar node = container;\n\t\tvar b = document.body;\n\t\tvar d = document.documentElement;\n\n\t\twhile (node != null && node != b && node != d && !fixed)\n\t\t{\n\t\t\tvar style = mxUtils.getCurrentStyle(node);\n\t\t\t\n\t\t\tif (style != null)\n\t\t\t{\n\t\t\t\tfixed = fixed || style.position == 'fixed';\n\t\t\t}\n\t\t\t\n\t\t\tnode = node.parentNode;\n\t\t}\n\t\t\n\t\tif (!scrollOffset && !fixed)\n\t\t{\n\t\t\tvar offset = mxUtils.getDocumentScrollOrigin(container.ownerDocument);\n\t\t\toffsetLeft += offset.x;\n\t\t\toffsetTop += offset.y;\n\t\t}\n\t\t\n\t\tvar r = container.getBoundingClientRect();\n\t\t\n\t\tif (r != null)\n\t\t{\n\t\t\toffsetLeft += r.left;\n\t\t\toffsetTop += r.top;\n\t\t}\n\t\t\n\t\treturn new mxPoint(offsetLeft, offsetTop);\n\t},\n\n\t/**\n\t * Function: getDocumentScrollOrigin\n\t * \n\t * Returns the scroll origin of the given document or the current document\n\t * if no document is given.\n\t */\n\tgetDocumentScrollOrigin: function(doc)\n\t{\n\t\tif (mxClient.IS_QUIRKS)\n\t\t{\n\t\t\treturn new mxPoint(doc.body.scrollLeft, doc.body.scrollTop);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tvar wnd = doc.defaultView || doc.parentWindow;\n\t\t\t\n\t\t\tvar x = (wnd != null && window.pageXOffset !== undefined) ? window.pageXOffset : (document.documentElement || document.body.parentNode || document.body).scrollLeft;\n\t\t\tvar y = (wnd != null && window.pageYOffset !== undefined) ? window.pageYOffset : (document.documentElement || document.body.parentNode || document.body).scrollTop;\n\t\t\t\n\t\t\treturn new mxPoint(x, y);\n\t\t}\n\t},\n\t\n\t/**\n\t * Function: getScrollOrigin\n\t * \n\t * Returns the top, left corner of the viewrect as an <mxPoint>.\n\t * \n\t * Parameters:\n\t * \n\t * node - DOM node whose scroll origin should be returned.\n\t * includeAncestors - Whether the scroll origin of the ancestors should be\n\t * included. Default is false.\n\t * includeDocument - Whether the scroll origin of the document should be\n\t * included. Default is true.\n\t */\n\tgetScrollOrigin: function(node, includeAncestors, includeDocument)\n\t{\n\t\tincludeAncestors = (includeAncestors != null) ? includeAncestors : false;\n\t\tincludeDocument = (includeDocument != null) ? includeDocument : true;\n\t\t\n\t\tvar doc = (node != null) ? node.ownerDocument : document;\n\t\tvar b = doc.body;\n\t\tvar d = doc.documentElement;\n\t\tvar result = new mxPoint();\n\t\tvar fixed = false;\n\n\t\twhile (node != null && node != b && node != d)\n\t\t{\n\t\t\tif (!isNaN(node.scrollLeft) && !isNaN(node.scrollTop))\n\t\t\t{\n\t\t\t\tresult.x += node.scrollLeft;\n\t\t\t\tresult.y += node.scrollTop;\n\t\t\t}\n\t\t\t\n\t\t\tvar style = mxUtils.getCurrentStyle(node);\n\t\t\t\n\t\t\tif (style != null)\n\t\t\t{\n\t\t\t\tfixed = fixed || style.position == 'fixed';\n\t\t\t}\n\n\t\t\tnode = (includeAncestors) ? node.parentNode : null;\n\t\t}\n\n\t\tif (!fixed && includeDocument)\n\t\t{\n\t\t\tvar origin = mxUtils.getDocumentScrollOrigin(doc);\n\n\t\t\tresult.x += origin.x;\n\t\t\tresult.y += origin.y;\n\t\t}\n\t\t\n\t\treturn result;\n\t},\n\n\t/**\n\t * Function: convertPoint\n\t * \n\t * Converts the specified point (x, y) using the offset of the specified\n\t * container and returns a new <mxPoint> with the result.\n\t * \n\t * (code)\n\t * var pt = mxUtils.convertPoint(graph.container,\n\t *   mxEvent.getClientX(evt), mxEvent.getClientY(evt));\n\t * (end)\n\t * \n\t * Parameters:\n\t * \n\t * container - DOM node to use for the offset.\n\t * x - X-coordinate of the point to be converted.\n\t * y - Y-coordinate of the point to be converted.\n\t */\n\tconvertPoint: function(container, x, y)\n\t{\n\t\tvar origin = mxUtils.getScrollOrigin(container, false);\n\t\tvar offset = mxUtils.getOffset(container);\n\n\t\toffset.x -= origin.x;\n\t\toffset.y -= origin.y;\n\t\t\n\t\treturn new mxPoint(x - offset.x, y - offset.y);\n\t},\n\t\n\t/**\n\t * Function: ltrim\n\t * \n\t * Strips all whitespaces from the beginning of the string. Without the\n\t * second parameter, this will trim these characters:\n\t * \n\t * - \" \" (ASCII 32 (0x20)), an ordinary space\n\t * - \"\\t\" (ASCII 9 (0x09)), a tab\n\t * - \"\\n\" (ASCII 10 (0x0A)), a new line (line feed)\n\t * - \"\\r\" (ASCII 13 (0x0D)), a carriage return\n\t * - \"\\0\" (ASCII 0 (0x00)), the NUL-byte\n\t * - \"\\x0B\" (ASCII 11 (0x0B)), a vertical tab\n\t */\n\tltrim: function(str, chars)\n\t{\n\t\tchars = chars || \"\\\\s\";\n\t\t\n\t\treturn (str != null) ? str.replace(new RegExp(\"^[\" + chars + \"]+\", \"g\"), \"\") : null;\n\t},\n\t\n\t/**\n\t * Function: rtrim\n\t * \n\t * Strips all whitespaces from the end of the string. Without the second\n\t * parameter, this will trim these characters:\n\t * \n\t * - \" \" (ASCII 32 (0x20)), an ordinary space\n\t * - \"\\t\" (ASCII 9 (0x09)), a tab\n\t * - \"\\n\" (ASCII 10 (0x0A)), a new line (line feed)\n\t * - \"\\r\" (ASCII 13 (0x0D)), a carriage return\n\t * - \"\\0\" (ASCII 0 (0x00)), the NUL-byte\n\t * - \"\\x0B\" (ASCII 11 (0x0B)), a vertical tab\n\t */\n\trtrim: function(str, chars)\n\t{\n\t\tchars = chars || \"\\\\s\";\n\t\t\n\t\treturn (str != null) ? str.replace(new RegExp(\"[\" + chars + \"]+$\", \"g\"), \"\") : null;\n\t},\n\t\n\t/**\n\t * Function: trim\n\t * \n\t * Strips all whitespaces from both end of the string.\n\t * Without the second parameter, Javascript function will trim these\n\t * characters:\n\t * \n\t * - \" \" (ASCII 32 (0x20)), an ordinary space\n\t * - \"\\t\" (ASCII 9 (0x09)), a tab\n\t * - \"\\n\" (ASCII 10 (0x0A)), a new line (line feed)\n\t * - \"\\r\" (ASCII 13 (0x0D)), a carriage return\n\t * - \"\\0\" (ASCII 0 (0x00)), the NUL-byte\n\t * - \"\\x0B\" (ASCII 11 (0x0B)), a vertical tab\n\t */\n\ttrim: function(str, chars)\n\t{\n\t\treturn mxUtils.ltrim(mxUtils.rtrim(str, chars), chars);\n\t},\n\t\n\t/**\n\t * Function: isNumeric\n\t * \n\t * Returns true if the specified value is numeric, that is, if it is not\n\t * null, not an empty string, not a HEX number and isNaN returns false.\n\t * \n\t * Parameters:\n\t * \n\t * n - String representing the possibly numeric value.\n\t */\n\tisNumeric: function(n)\n\t{\n\t\treturn !isNaN(parseFloat(n)) && isFinite(n) && (typeof(n) != 'string' || n.toLowerCase().indexOf('0x') < 0);\n\t},\n\n\t/**\n\t * Function: isInteger\n\t * \n\t * Returns true if the given value is an valid integer number.\n\t * \n\t * Parameters:\n\t * \n\t * n - String representing the possibly numeric value.\n\t */\n\tisInteger: function(n)\n\t{\n\t\treturn String(parseInt(n)) === String(n);\n\t},\n\n\t/**\n\t * Function: mod\n\t * \n\t * Returns the remainder of division of n by m. You should use this instead\n\t * of the built-in operation as the built-in operation does not properly\n\t * handle negative numbers.\n\t */\n\tmod: function(n, m)\n\t{\n\t\treturn ((n % m) + m) % m;\n\t},\n\n\t/**\n\t * Function: intersection\n\t * \n\t * Returns the intersection of two lines as an <mxPoint>.\n\t * \n\t * Parameters:\n\t * \n\t * x0 - X-coordinate of the first line's startpoint.\n\t * y0 - X-coordinate of the first line's startpoint.\n\t * x1 - X-coordinate of the first line's endpoint.\n\t * y1 - Y-coordinate of the first line's endpoint.\n\t * x2 - X-coordinate of the second line's startpoint.\n\t * y2 - Y-coordinate of the second line's startpoint.\n\t * x3 - X-coordinate of the second line's endpoint.\n\t * y3 - Y-coordinate of the second line's endpoint.\n\t */\n\tintersection: function (x0, y0, x1, y1, x2, y2, x3, y3)\n\t{\n\t\tvar denom = ((y3 - y2) * (x1 - x0)) - ((x3 - x2) * (y1 - y0));\n\t\tvar nume_a = ((x3 - x2) * (y0 - y2)) - ((y3 - y2) * (x0 - x2));\n\t\tvar nume_b = ((x1 - x0) * (y0 - y2)) - ((y1 - y0) * (x0 - x2));\n\n\t\tvar ua = nume_a / denom;\n\t\tvar ub = nume_b / denom;\n\t\t\n\t\tif(ua >= 0.0 && ua <= 1.0 && ub >= 0.0 && ub <= 1.0)\n\t\t{\n\t\t\t// Get the intersection point\n\t\t\tvar x = x0 + ua * (x1 - x0);\n\t\t\tvar y = y0 + ua * (y1 - y0);\n\t\t\t\n\t\t\treturn new mxPoint(x, y);\n\t\t}\n\t\t\n\t\t// No intersection\n\t\treturn null;\n\t},\n\t\n\t/**\n\t * Function: ptSegDistSq\n\t * \n\t * Returns the square distance between a segment and a point. To get the\n\t * distance between a point and a line (with infinite length) use\n\t * <mxUtils.ptLineDist>.\n\t * \n\t * Parameters:\n\t * \n\t * x1 - X-coordinate of the startpoint of the segment.\n\t * y1 - Y-coordinate of the startpoint of the segment.\n\t * x2 - X-coordinate of the endpoint of the segment.\n\t * y2 - Y-coordinate of the endpoint of the segment.\n\t * px - X-coordinate of the point.\n\t * py - Y-coordinate of the point.\n\t */\n\tptSegDistSq: function(x1, y1, x2, y2, px, py)\n    {\n\t\tx2 -= x1;\n\t\ty2 -= y1;\n\n\t\tpx -= x1;\n\t\tpy -= y1;\n\n\t\tvar dotprod = px * x2 + py * y2;\n\t\tvar projlenSq;\n\n\t\tif (dotprod <= 0.0)\n\t\t{\n\t\t    projlenSq = 0.0;\n\t\t}\n\t\telse\n\t\t{\n\t\t    px = x2 - px;\n\t\t    py = y2 - py;\n\t\t    dotprod = px * x2 + py * y2;\n\n\t\t    if (dotprod <= 0.0)\n\t\t    {\n\t\t\t\tprojlenSq = 0.0;\n\t\t    }\n\t\t    else\n\t\t    {\n\t\t\t\tprojlenSq = dotprod * dotprod / (x2 * x2 + y2 * y2);\n\t\t    }\n\t\t}\n\n\t\tvar lenSq = px * px + py * py - projlenSq;\n\t\t\n\t\tif (lenSq < 0)\n\t\t{\n\t\t    lenSq = 0;\n\t\t}\n\t\t\n\t\treturn lenSq;\n    },\n\t\n\t/**\n\t * Function: ptLineDist\n\t * \n\t * Returns the distance between a line defined by two points and a point.\n\t * To get the distance between a point and a segment (with a specific\n\t * length) use <mxUtils.ptSeqDistSq>.\n\t * \n\t * Parameters:\n\t * \n\t * x1 - X-coordinate of point 1 of the line.\n\t * y1 - Y-coordinate of point 1 of the line.\n\t * x2 - X-coordinate of point 1 of the line.\n\t * y2 - Y-coordinate of point 1 of the line.\n\t * px - X-coordinate of the point.\n\t * py - Y-coordinate of the point.\n\t */\n    ptLineDist: function(x1, y1, x2, y2, px, py)\n    {\n\t\treturn Math.abs((y2 - y1) * px - (x2 - x1) * py + x2 * y1 - y2 * x1) /\n\t\t\tMath.sqrt((y2 - y1) * (y2 - y1) + (x2 - x1) * (x2 - x1));\n    },\n    \t\n\t/**\n\t * Function: relativeCcw\n\t * \n\t * Returns 1 if the given point on the right side of the segment, 0 if its\n\t * on the segment, and -1 if the point is on the left side of the segment.\n\t * \n\t * Parameters:\n\t * \n\t * x1 - X-coordinate of the startpoint of the segment.\n\t * y1 - Y-coordinate of the startpoint of the segment.\n\t * x2 - X-coordinate of the endpoint of the segment.\n\t * y2 - Y-coordinate of the endpoint of the segment.\n\t * px - X-coordinate of the point.\n\t * py - Y-coordinate of the point.\n\t */\n\trelativeCcw: function(x1, y1, x2, y2, px, py)\n    {\n\t\tx2 -= x1;\n\t\ty2 -= y1;\n\t\tpx -= x1;\n\t\tpy -= y1;\n\t\tvar ccw = px * y2 - py * x2;\n\t\t\n\t\tif (ccw == 0.0)\n\t\t{\n\t\t    ccw = px * x2 + py * y2;\n\t\t    \n\t\t    if (ccw > 0.0)\n\t\t    {\n\t\t\t\tpx -= x2;\n\t\t\t\tpy -= y2;\n\t\t\t\tccw = px * x2 + py * y2;\n\t\t\t\t\n\t\t\t\tif (ccw < 0.0)\n\t\t\t\t{\n\t\t\t\t    ccw = 0.0;\n\t\t\t\t}\n\t\t    }\n\t\t}\n\t\t\n\t\treturn (ccw < 0.0) ? -1 : ((ccw > 0.0) ? 1 : 0);\n    },\n    \n\t/**\n\t * Function: animateChanges\n\t * \n\t * See <mxEffects.animateChanges>. This is for backwards compatibility and\n\t * will be removed later.\n\t */\n\tanimateChanges: function(graph, changes)\n\t{\n\t\t// LATER: Deprecated, remove this function\n    \tmxEffects.animateChanges.apply(this, arguments);\n\t},\n    \n\t/**\n\t * Function: cascadeOpacity\n\t * \n\t * See <mxEffects.cascadeOpacity>. This is for backwards compatibility and\n\t * will be removed later.\n\t */\n    cascadeOpacity: function(graph, cell, opacity)\n\t{\n\t\tmxEffects.cascadeOpacity.apply(this, arguments);\n\t},\n\n\t/**\n\t * Function: fadeOut\n\t * \n\t * See <mxEffects.fadeOut>. This is for backwards compatibility and\n\t * will be removed later.\n\t */\n\tfadeOut: function(node, from, remove, step, delay, isEnabled)\n\t{\n\t\tmxEffects.fadeOut.apply(this, arguments);\n\t},\n\t\n\t/**\n\t * Function: setOpacity\n\t * \n\t * Sets the opacity of the specified DOM node to the given value in %.\n\t * \n\t * Parameters:\n\t * \n\t * node - DOM node to set the opacity for.\n\t * value - Opacity in %. Possible values are between 0 and 100.\n\t */\n\tsetOpacity: function(node, value)\n\t{\n\t\tif (mxUtils.isVml(node))\n\t\t{\n\t    \tif (value >= 100)\n\t    \t{\n\t    \t\tnode.style.filter = '';\n\t    \t}\n\t    \telse\n\t    \t{\n\t    \t\t// TODO: Why is the division by 5 needed in VML?\n\t\t\t    node.style.filter = 'alpha(opacity=' + (value/5) + ')';\n\t    \t}\n\t\t}\n\t\telse if (mxClient.IS_IE && (typeof(document.documentMode) === 'undefined' || document.documentMode < 9))\n\t    {\n\t    \tif (value >= 100)\n\t    \t{\n\t    \t\tnode.style.filter = '';\n\t    \t}\n\t    \telse\n\t    \t{\n\t\t\t    node.style.filter = 'alpha(opacity=' + value + ')';\n\t    \t}\n\t\t}\n\t\telse\n\t\t{\n\t\t    node.style.opacity = (value / 100);\n\t\t}\n\t},\n\n\t/**\n\t * Function: createImage\n\t * \n\t * Creates and returns an image (IMG node) or VML image (v:image) in IE6 in\n\t * quirks mode.\n\t * \n\t * Parameters:\n\t * \n\t * src - URL that points to the image to be displayed.\n\t */\n\tcreateImage: function(src)\n\t{\n        var imageNode = null;\n        \n\t\tif (mxClient.IS_IE6 && document.compatMode != 'CSS1Compat')\n\t\t{\n        \timageNode = document.createElement(mxClient.VML_PREFIX + ':image');\n        \timageNode.setAttribute('src', src);\n        \timageNode.style.borderStyle = 'none';\n        }\n\t\telse\n\t\t{\n\t\t\timageNode = document.createElement('img');\n\t\t\timageNode.setAttribute('src', src);\n\t\t\timageNode.setAttribute('border', '0');\n\t\t}\n\t\t\n\t\treturn imageNode;\n\t},\n\n\t/**\n\t * Function: sortCells\n\t * \n\t * Sorts the given cells according to the order in the cell hierarchy.\n\t * Ascending is optional and defaults to true.\n\t */\n\tsortCells: function(cells, ascending)\n\t{\n\t\tascending = (ascending != null) ? ascending : true;\n\t\tvar lookup = new mxDictionary();\n\t\tcells.sort(function(o1, o2)\n\t\t{\n\t\t\tvar p1 = lookup.get(o1);\n\t\t\t\n\t\t\tif (p1 == null)\n\t\t\t{\n\t\t\t\tp1 = mxCellPath.create(o1).split(mxCellPath.PATH_SEPARATOR);\n\t\t\t\tlookup.put(o1, p1);\n\t\t\t}\n\t\t\t\n\t\t\tvar p2 = lookup.get(o2);\n\t\t\t\n\t\t\tif (p2 == null)\n\t\t\t{\n\t\t\t\tp2 = mxCellPath.create(o2).split(mxCellPath.PATH_SEPARATOR);\n\t\t\t\tlookup.put(o2, p2);\n\t\t\t}\n\t\t\t\n\t\t\tvar comp = mxCellPath.compare(p1, p2);\n\t\t\t\n\t\t\treturn (comp == 0) ? 0 : (((comp > 0) == ascending) ? 1 : -1);\n\t\t});\n\t\t\n\t\treturn cells;\n\t},\n\n\t/**\n\t * Function: getStylename\n\t * \n\t * Returns the stylename in a style of the form [(stylename|key=value);] or\n\t * an empty string if the given style does not contain a stylename.\n\t * \n\t * Parameters:\n\t * \n\t * style - String of the form [(stylename|key=value);].\n\t */\n\tgetStylename: function(style)\n\t{\n\t\tif (style != null)\n\t\t{\n\t\t\tvar pairs = style.split(';');\n\t\t\tvar stylename = pairs[0];\n\t\t\t\n\t\t\tif (stylename.indexOf('=') < 0)\n\t\t\t{\n\t\t\t\treturn stylename;\n\t\t\t}\n\t\t}\n\t\t\t\t\n\t\treturn '';\n\t},\n\n\t/**\n\t * Function: getStylenames\n\t * \n\t * Returns the stylenames in a style of the form [(stylename|key=value);]\n\t * or an empty array if the given style does not contain any stylenames.\n\t * \n\t * Parameters:\n\t * \n\t * style - String of the form [(stylename|key=value);].\n\t */\n\tgetStylenames: function(style)\n\t{\n\t\tvar result = [];\n\t\t\n\t\tif (style != null)\n\t\t{\n\t\t\tvar pairs = style.split(';');\n\t\t\t\n\t\t\tfor (var i = 0; i < pairs.length; i++)\n\t\t\t{\n\t\t\t\tif (pairs[i].indexOf('=') < 0)\n\t\t\t\t{\n\t\t\t\t\tresult.push(pairs[i]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\t\t\n\t\treturn result;\n\t},\n\n\t/**\n\t * Function: indexOfStylename\n\t * \n\t * Returns the index of the given stylename in the given style. This\n\t * returns -1 if the given stylename does not occur (as a stylename) in the\n\t * given style, otherwise it returns the index of the first character.\n\t */\n\tindexOfStylename: function(style, stylename)\n\t{\n\t\tif (style != null && stylename != null)\n\t\t{\n\t\t\tvar tokens = style.split(';');\n\t\t\tvar pos = 0;\n\t\t\t\n\t\t\tfor (var i = 0; i < tokens.length; i++)\n\t\t\t{\n\t\t\t\tif (tokens[i] == stylename)\n\t\t\t\t{\n\t\t\t\t\treturn pos;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tpos += tokens[i].length + 1;\n\t\t\t}\n\t\t}\n\n\t\treturn -1;\n\t},\n\t\n\t/**\n\t * Function: addStylename\n\t * \n\t * Adds the specified stylename to the given style if it does not already\n\t * contain the stylename.\n\t */\n\taddStylename: function(style, stylename)\n\t{\n\t\tif (mxUtils.indexOfStylename(style, stylename) < 0)\n\t\t{\n\t\t\tif (style == null)\n\t\t\t{\n\t\t\t\tstyle = '';\n\t\t\t}\n\t\t\telse if (style.length > 0 && style.charAt(style.length - 1) != ';')\n\t\t\t{\n\t\t\t\tstyle += ';';\n\t\t\t}\n\t\t\t\n\t\t\tstyle += stylename;\n\t\t}\n\t\t\n\t\treturn style;\n\t},\n\t\n\t/**\n\t * Function: removeStylename\n\t * \n\t * Removes all occurrences of the specified stylename in the given style\n\t * and returns the updated style. Trailing semicolons are not preserved.\n\t */\n\tremoveStylename: function(style, stylename)\n\t{\n\t\tvar result = [];\n\t\t\n\t\tif (style != null)\n\t\t{\n\t\t\tvar tokens = style.split(';');\n\t\t\t\n\t\t\tfor (var i = 0; i < tokens.length; i++)\n\t\t\t{\n\t\t\t\tif (tokens[i] != stylename)\n\t\t\t\t{\n\t\t\t\t\tresult.push(tokens[i]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn result.join(';');\n\t},\n\t\n\t/**\n\t * Function: removeAllStylenames\n\t * \n\t * Removes all stylenames from the given style and returns the updated\n\t * style.\n\t */\n\tremoveAllStylenames: function(style)\n\t{\n\t\tvar result = [];\n\t\t\n\t\tif (style != null)\n\t\t{\n\t\t\tvar tokens = style.split(';');\n\t\t\t\n\t\t\tfor (var i = 0; i < tokens.length; i++)\n\t\t\t{\n\t\t\t\t// Keeps the key, value assignments\n\t\t\t\tif (tokens[i].indexOf('=') >= 0)\n\t\t\t\t{\n\t\t\t\t\tresult.push(tokens[i]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn result.join(';');\n\t},\n\n\t/**\n\t * Function: setCellStyles\n\t * \n\t * Assigns the value for the given key in the styles of the given cells, or\n\t * removes the key from the styles if the value is null.\n\t * \n\t * Parameters:\n\t * \n\t * model - <mxGraphModel> to execute the transaction in.\n\t * cells - Array of <mxCells> to be updated.\n\t * key - Key of the style to be changed.\n\t * value - New value for the given key.\n\t */\n\tsetCellStyles: function(model, cells, key, value)\n\t{\n\t\tif (cells != null && cells.length > 0)\n\t\t{\n\t\t\tmodel.beginUpdate();\n\t\t\ttry\n\t\t\t{\n\t\t\t\tfor (var i = 0; i < cells.length; i++)\n\t\t\t\t{\n\t\t\t\t\tif (cells[i] != null)\n\t\t\t\t\t{\n\t\t\t\t\t\tvar style = mxUtils.setStyle(model.getStyle(cells[i]), key, value);\n\t\t\t\t\t\tmodel.setStyle(cells[i], style);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tfinally\n\t\t\t{\n\t\t\t\tmodel.endUpdate();\n\t\t\t}\n\t\t}\n\t},\n\t\n\t/**\n\t * Function: setStyle\n\t * \n\t * Adds or removes the given key, value pair to the style and returns the\n\t * new style. If value is null or zero length then the key is removed from\n\t * the style. This is for cell styles, not for CSS styles.\n\t * \n\t * Parameters:\n\t * \n\t * style - String of the form [(stylename|key=value);].\n\t * key - Key of the style to be changed.\n\t * value - New value for the given key.\n\t */\n\tsetStyle: function(style, key, value)\n\t{\n\t\tvar isValue = value != null && (typeof(value.length) == 'undefined' || value.length > 0);\n\t\t\n\t\tif (style == null || style.length == 0)\n\t\t{\n\t\t\tif (isValue)\n\t\t\t{\n\t\t\t\tstyle = key + '=' + value + ';';\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif (style.substring(0, key.length + 1) == key + '=')\n\t\t\t{\n\t\t\t\tvar next = style.indexOf(';');\n\t\t\t\t\n\t\t\t\tif (isValue)\n\t\t\t\t{\n\t\t\t\t\tstyle = key + '=' + value + ((next < 0) ? ';' : style.substring(next));\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tstyle = (next < 0 || next == style.length - 1) ? '' : style.substring(next + 1);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tvar index = style.indexOf(';' + key + '=');\n\t\t\t\t\n\t\t\t\tif (index < 0)\n\t\t\t\t{\n\t\t\t\t\tif (isValue)\n\t\t\t\t\t{\n\t\t\t\t\t\tvar sep = (style.charAt(style.length - 1) == ';') ? '' : ';';\n\t\t\t\t\t\tstyle = style + sep + key + '=' + value + ';';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tvar next = style.indexOf(';', index + 1);\n\t\t\t\t\t\n\t\t\t\t\tif (isValue)\n\t\t\t\t\t{\n\t\t\t\t\t\tstyle = style.substring(0, index + 1) + key + '=' + value + ((next < 0) ? ';' : style.substring(next));\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tstyle = style.substring(0, index) + ((next < 0) ? ';' : style.substring(next));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn style;\n\t},\n\n\t/**\n\t * Function: setCellStyleFlags\n\t * \n\t * Sets or toggles the flag bit for the given key in the cell's styles.\n\t * If value is null then the flag is toggled.\n\t * \n\t * Example:\n\t * \n\t * (code)\n\t * var cells = graph.getSelectionCells();\n\t * mxUtils.setCellStyleFlags(graph.model,\n\t * \t\t\tcells,\n\t * \t\t\tmxConstants.STYLE_FONTSTYLE,\n\t * \t\t\tmxConstants.FONT_BOLD);\n\t * (end)\n\t * \n\t * Toggles the bold font style.\n\t * \n\t * Parameters:\n\t * \n\t * model - <mxGraphModel> that contains the cells.\n\t * cells - Array of <mxCells> to change the style for.\n\t * key - Key of the style to be changed.\n\t * flag - Integer for the bit to be changed.\n\t * value - Optional boolean value for the flag.\n\t */\n\tsetCellStyleFlags: function(model, cells, key, flag, value)\n\t{\n\t\tif (cells != null && cells.length > 0)\n\t\t{\n\t\t\tmodel.beginUpdate();\n\t\t\ttry\n\t\t\t{\n\t\t\t\tfor (var i = 0; i < cells.length; i++)\n\t\t\t\t{\n\t\t\t\t\tif (cells[i] != null)\n\t\t\t\t\t{\n\t\t\t\t\t\tvar style = mxUtils.setStyleFlag(\n\t\t\t\t\t\t\tmodel.getStyle(cells[i]),\n\t\t\t\t\t\t\tkey, flag, value);\n\t\t\t\t\t\tmodel.setStyle(cells[i], style);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tfinally\n\t\t\t{\n\t\t\t\tmodel.endUpdate();\n\t\t\t}\n\t\t}\n\t},\n\t\n\t/**\n\t * Function: setStyleFlag\n\t * \n\t * Sets or removes the given key from the specified style and returns the\n\t * new style. If value is null then the flag is toggled.\n\t * \n\t * Parameters:\n\t * \n\t * style - String of the form [(stylename|key=value);].\n\t * key - Key of the style to be changed.\n\t * flag - Integer for the bit to be changed.\n\t * value - Optional boolean value for the given flag.\n\t */\n\tsetStyleFlag: function(style, key, flag, value)\n\t{\n\t\tif (style == null || style.length == 0)\n\t\t{\n\t\t\tif (value || value == null)\n\t\t\t{\n\t\t\t\tstyle = key+'='+flag;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tstyle = key+'=0';\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tvar index = style.indexOf(key+'=');\n\t\t\t\n\t\t\tif (index < 0)\n\t\t\t{\n\t\t\t\tvar sep = (style.charAt(style.length-1) == ';') ? '' : ';';\n\n\t\t\t\tif (value || value == null)\n\t\t\t\t{\n\t\t\t\t\tstyle = style + sep + key + '=' + flag;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tstyle = style + sep + key + '=0';\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tvar cont = style.indexOf(';', index);\n\t\t\t\tvar tmp = '';\n\t\t\t\t\n\t\t\t\tif (cont < 0)\n\t\t\t\t{\n\t\t\t\t\ttmp  = style.substring(index+key.length+1);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\ttmp = style.substring(index+key.length+1, cont);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (value == null)\n\t\t\t\t{\n\t\t\t\t\ttmp = parseInt(tmp) ^ flag;\n\t\t\t\t}\n\t\t\t\telse if (value)\n\t\t\t\t{\n\t\t\t\t\ttmp = parseInt(tmp) | flag;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\ttmp = parseInt(tmp) & ~flag;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tstyle = style.substring(0, index) + key + '=' + tmp +\n\t\t\t\t\t((cont >= 0) ? style.substring(cont) : '');\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn style;\n\t},\n\t\n\t/**\n\t * Function: getAlignmentAsPoint\n\t * \n\t * Returns an <mxPoint> that represents the horizontal and vertical alignment\n\t * for numeric computations. X is -0.5 for center, -1 for right and 0 for\n\t * left alignment. Y is -0.5 for middle, -1 for bottom and 0 for top\n\t * alignment. Default values for missing arguments is top, left.\n\t */\n\tgetAlignmentAsPoint: function(align, valign)\n\t{\n\t\tvar dx = 0;\n\t\tvar dy = 0;\n\t\t\n\t\t// Horizontal alignment\n\t\tif (align == mxConstants.ALIGN_CENTER)\n\t\t{\n\t\t\tdx = -0.5;\n\t\t}\n\t\telse if (align == mxConstants.ALIGN_RIGHT)\n\t\t{\n\t\t\tdx = -1;\n\t\t}\n\n\t\t// Vertical alignment\n\t\tif (valign == mxConstants.ALIGN_MIDDLE)\n\t\t{\n\t\t\tdy = -0.5;\n\t\t}\n\t\telse if (valign == mxConstants.ALIGN_BOTTOM)\n\t\t{\n\t\t\tdy = -1;\n\t\t}\n\t\t\n\t\treturn new mxPoint(dx, dy);\n\t},\n\t\n\t/**\n\t * Function: getSizeForString\n\t * \n\t * Returns an <mxRectangle> with the size (width and height in pixels) of\n\t * the given string. The string may contain HTML markup. Newlines should be\n\t * converted to <br> before calling this method. The caller is responsible\n\t * for sanitizing the HTML markup.\n\t * \n\t * Example:\n\t * \n\t * (code)\n\t * var label = graph.getLabel(cell).replace(/\\n/g, \"<br>\");\n\t * var size = graph.getSizeForString(label);\n\t * (end)\n\t * \n\t * Parameters:\n\t * \n\t * text - String whose size should be returned.\n\t * fontSize - Integer that specifies the font size in pixels. Default is\n\t * <mxConstants.DEFAULT_FONTSIZE>.\n\t * fontFamily - String that specifies the name of the font family. Default\n\t * is <mxConstants.DEFAULT_FONTFAMILY>.\n\t * textWidth - Optional width for text wrapping.\n\t */\n\tgetSizeForString: function(text, fontSize, fontFamily, textWidth)\n\t{\n\t\tfontSize = (fontSize != null) ? fontSize : mxConstants.DEFAULT_FONTSIZE;\n\t\tfontFamily = (fontFamily != null) ? fontFamily : mxConstants.DEFAULT_FONTFAMILY;\n\t\tvar div = document.createElement('div');\n\t\t\n\t\t// Sets the font size and family\n\t\tdiv.style.fontFamily = fontFamily;\n\t\tdiv.style.fontSize = Math.round(fontSize) + 'px';\n\t\tdiv.style.lineHeight = Math.round(fontSize * mxConstants.LINE_HEIGHT) + 'px';\n\t\t\n\t\t// Disables block layout and outside wrapping and hides the div\n\t\tdiv.style.position = 'absolute';\n\t\tdiv.style.visibility = 'hidden';\n\t\tdiv.style.display = (mxClient.IS_QUIRKS) ? 'inline' : 'inline-block';\n\t\tdiv.style.zoom = '1';\n\t\t\n\t\tif (textWidth != null)\n\t\t{\n\t\t\tdiv.style.width = textWidth + 'px';\n\t\t\tdiv.style.whiteSpace = 'normal';\n\t\t}\n\t\telse\n\t\t{\n\t\t\tdiv.style.whiteSpace = 'nowrap';\n\t\t}\n\t\t\n\t\t// Adds the text and inserts into DOM for updating of size\n\t\tdiv.innerHTML = text;\n\t\tdocument.body.appendChild(div);\n\t\t\n\t\t// Gets the size and removes from DOM\n\t\tvar size = new mxRectangle(0, 0, div.offsetWidth, div.offsetHeight);\n\t\tdocument.body.removeChild(div);\n\t\t\n\t\treturn size;\n\t},\n\t\n\t/**\n\t * Function: getViewXml\n\t */\n\tgetViewXml: function(graph, scale, cells, x0, y0)\n\t{\n\t\tx0 = (x0 != null) ? x0 : 0;\n\t\ty0 = (y0 != null) ? y0 : 0;\n\t\tscale = (scale != null) ? scale : 1;\n\n\t\tif (cells == null)\n\t\t{\n\t\t\tvar model = graph.getModel();\n\t\t\tcells = [model.getRoot()];\n\t\t}\n\t\t\n\t\tvar view = graph.getView();\n\t\tvar result = null;\n\n\t\t// Disables events on the view\n\t\tvar eventsEnabled = view.isEventsEnabled();\n\t\tview.setEventsEnabled(false);\n\n\t\t// Workaround for label bounds not taken into account for image export.\n\t\t// Creates a temporary draw pane which is used for rendering the text.\n\t\t// Text rendering is required for finding the bounds of the labels.\n\t\tvar drawPane = view.drawPane;\n\t\tvar overlayPane = view.overlayPane;\n\n\t\tif (graph.dialect == mxConstants.DIALECT_SVG)\n\t\t{\n\t\t\tview.drawPane = document.createElementNS(mxConstants.NS_SVG, 'g');\n\t\t\tview.canvas.appendChild(view.drawPane);\n\n\t\t\t// Redirects cell overlays into temporary container\n\t\t\tview.overlayPane = document.createElementNS(mxConstants.NS_SVG, 'g');\n\t\t\tview.canvas.appendChild(view.overlayPane);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tview.drawPane = view.drawPane.cloneNode(false);\n\t\t\tview.canvas.appendChild(view.drawPane);\n\t\t\t\n\t\t\t// Redirects cell overlays into temporary container\n\t\t\tview.overlayPane = view.overlayPane.cloneNode(false);\n\t\t\tview.canvas.appendChild(view.overlayPane);\n\t\t}\n\n\t\t// Resets the translation\n\t\tvar translate = view.getTranslate();\n\t\tview.translate = new mxPoint(x0, y0);\n\n\t\t// Creates the temporary cell states in the view\n\t\tvar temp = new mxTemporaryCellStates(graph.getView(), scale, cells);\n\n\t\ttry\n\t\t{\n\t\t\tvar enc = new mxCodec();\n\t\t\tresult = enc.encode(graph.getView());\n\t\t}\n\t\tfinally\n\t\t{\n\t\t\ttemp.destroy();\n\t\t\tview.translate = translate;\n\t\t\tview.canvas.removeChild(view.drawPane);\n\t\t\tview.canvas.removeChild(view.overlayPane);\n\t\t\tview.drawPane = drawPane;\n\t\t\tview.overlayPane = overlayPane;\n\t\t\tview.setEventsEnabled(eventsEnabled);\n\t\t}\n\n\t\treturn result;\n\t},\n\t\n\t/**\n\t * Function: getScaleForPageCount\n\t * \n\t * Returns the scale to be used for printing the graph with the given\n\t * bounds across the specifies number of pages with the given format. The\n\t * scale is always computed such that it given the given amount or fewer\n\t * pages in the print output. See <mxPrintPreview> for an example.\n\t * \n\t * Parameters:\n\t * \n\t * pageCount - Specifies the number of pages in the print output.\n\t * graph - <mxGraph> that should be printed.\n\t * pageFormat - Optional <mxRectangle> that specifies the page format.\n\t * Default is <mxConstants.PAGE_FORMAT_A4_PORTRAIT>.\n\t * border - The border along each side of every page.\n\t */\n\tgetScaleForPageCount: function(pageCount, graph, pageFormat, border)\n\t{\n\t\tif (pageCount < 1)\n\t\t{\n\t\t\t// We can't work with less than 1 page, return no scale\n\t\t\t// change\n\t\t\treturn 1;\n\t\t}\n\t\t\n\t\tpageFormat = (pageFormat != null) ? pageFormat : mxConstants.PAGE_FORMAT_A4_PORTRAIT;\n\t\tborder = (border != null) ? border : 0;\n\t\t\n\t\tvar availablePageWidth = pageFormat.width - (border * 2);\n\t\tvar availablePageHeight = pageFormat.height - (border * 2);\n\n\t\t// Work out the number of pages required if the\n\t\t// graph is not scaled.\n\t\tvar graphBounds = graph.getGraphBounds().clone();\n\t\tvar sc = graph.getView().getScale();\n\t\tgraphBounds.width /= sc;\n\t\tgraphBounds.height /= sc;\n\t\tvar graphWidth = graphBounds.width;\n\t\tvar graphHeight = graphBounds.height;\n\n\t\tvar scale = 1;\n\t\t\n\t\t// The ratio of the width/height for each printer page\n\t\tvar pageFormatAspectRatio = availablePageWidth / availablePageHeight;\n\t\t// The ratio of the width/height for the graph to be printer\n\t\tvar graphAspectRatio = graphWidth / graphHeight;\n\t\t\n\t\t// The ratio of horizontal pages / vertical pages for this \n\t\t// graph to maintain its aspect ratio on this page format\n\t\tvar pagesAspectRatio = graphAspectRatio / pageFormatAspectRatio;\n\t\t\n\t\t// Factor the square root of the page count up and down \n\t\t// by the pages aspect ratio to obtain a horizontal and \n\t\t// vertical page count that adds up to the page count\n\t\t// and has the correct aspect ratio\n\t\tvar pageRoot = Math.sqrt(pageCount);\n\t\tvar pagesAspectRatioSqrt = Math.sqrt(pagesAspectRatio);\n\t\tvar numRowPages = pageRoot * pagesAspectRatioSqrt;\n\t\tvar numColumnPages = pageRoot / pagesAspectRatioSqrt;\n\n\t\t// These value are rarely more than 2 rounding downs away from\n\t\t// a total that meets the page count. In cases of one being less \n\t\t// than 1 page, the other value can be too high and take more iterations \n\t\t// In this case, just change that value to be the page count, since \n\t\t// we know the other value is 1\n\t\tif (numRowPages < 1 && numColumnPages > pageCount)\n\t\t{\n\t\t\tvar scaleChange = numColumnPages / pageCount;\n\t\t\tnumColumnPages = pageCount;\n\t\t\tnumRowPages /= scaleChange;\n\t\t}\n\t\t\n\t\tif (numColumnPages < 1 && numRowPages > pageCount)\n\t\t{\n\t\t\tvar scaleChange = numRowPages / pageCount;\n\t\t\tnumRowPages = pageCount;\n\t\t\tnumColumnPages /= scaleChange;\n\t\t}\t\t\n\n\t\tvar currentTotalPages = Math.ceil(numRowPages) * Math.ceil(numColumnPages);\n\n\t\tvar numLoops = 0;\n\t\t\n\t\t// Iterate through while the rounded up number of pages comes to\n\t\t// a total greater than the required number\n\t\twhile (currentTotalPages > pageCount)\n\t\t{\n\t\t\t// Round down the page count (rows or columns) that is\n\t\t\t// closest to its next integer down in percentage terms.\n\t\t\t// i.e. Reduce the page total by reducing the total\n\t\t\t// page area by the least possible amount\n\n\t\t\tvar roundRowDownProportion = Math.floor(numRowPages) / numRowPages;\n\t\t\tvar roundColumnDownProportion = Math.floor(numColumnPages) / numColumnPages;\n\t\t\t\n\t\t\t// If the round down proportion is, work out the proportion to\n\t\t\t// round down to 1 page less\n\t\t\tif (roundRowDownProportion == 1)\n\t\t\t{\n\t\t\t\troundRowDownProportion = Math.floor(numRowPages-1) / numRowPages;\n\t\t\t}\n\t\t\tif (roundColumnDownProportion == 1)\n\t\t\t{\n\t\t\t\troundColumnDownProportion = Math.floor(numColumnPages-1) / numColumnPages;\n\t\t\t}\n\t\t\t\n\t\t\t// Check which rounding down is smaller, but in the case of very small roundings\n\t\t\t// try the other dimension instead\n\t\t\tvar scaleChange = 1;\n\t\t\t\n\t\t\t// Use the higher of the two values\n\t\t\tif (roundRowDownProportion > roundColumnDownProportion)\n\t\t\t{\n\t\t\t\tscaleChange = roundRowDownProportion;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tscaleChange = roundColumnDownProportion;\n\t\t\t}\n\n\t\t\tnumRowPages = numRowPages * scaleChange;\n\t\t\tnumColumnPages = numColumnPages * scaleChange;\n\t\t\tcurrentTotalPages = Math.ceil(numRowPages) * Math.ceil(numColumnPages);\n\t\t\t\n\t\t\tnumLoops++;\n\t\t\t\n\t\t\tif (numLoops > 10)\n\t\t\t{\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\t// Work out the scale from the number of row pages required\n\t\t// The column pages will give the same value\n\t\tvar posterWidth = availablePageWidth * numRowPages;\n\t\tscale = posterWidth / graphWidth;\n\t\t\n\t\t// Allow for rounding errors\n\t\treturn scale * 0.99999;\n\t},\n\t\n\t/**\n\t * Function: show\n\t * \n\t * Copies the styles and the markup from the graph's container into the\n\t * given document and removes all cursor styles. The document is returned.\n\t * \n\t * This function should be called from within the document with the graph.\n\t * If you experience problems with missing stylesheets in IE then try adding\n\t * the domain to the trusted sites.\n\t * \n\t * Parameters:\n\t * \n\t * graph - <mxGraph> to be copied.\n\t * doc - Document where the new graph is created.\n\t * x0 - X-coordinate of the graph view origin. Default is 0.\n\t * y0 - Y-coordinate of the graph view origin. Default is 0.\n\t * w - Optional width of the graph view.\n\t * h - Optional height of the graph view.\n\t */\n\tshow: function(graph, doc, x0, y0, w, h)\n\t{\n\t\tx0 = (x0 != null) ? x0 : 0;\n\t\ty0 = (y0 != null) ? y0 : 0;\n\t\t\n\t\tif (doc == null)\n\t\t{\n\t\t\tvar wnd = window.open();\n\t\t\tdoc = wnd.document;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tdoc.open();\n\t\t}\n\n\t\t// Workaround for missing print output in IE9 standards\n\t\tif (document.documentMode == 9)\n\t\t{\n\t\t\tdoc.writeln('<!--[if IE]><meta http-equiv=\"X-UA-Compatible\" content=\"IE=9\"><![endif]-->');\n\t\t}\n\t\t\n\t\tvar bounds = graph.getGraphBounds();\n\t\tvar dx = Math.ceil(x0 - bounds.x);\n\t\tvar dy = Math.ceil(y0 - bounds.y);\n\t\t\n\t\tif (w == null)\n\t\t{\n\t\t\tw = Math.ceil(bounds.width + x0) + Math.ceil(Math.ceil(bounds.x) - bounds.x);\n\t\t}\n\t\t\n\t\tif (h == null)\n\t\t{\n\t\t\th = Math.ceil(bounds.height + y0) + Math.ceil(Math.ceil(bounds.y) - bounds.y);\n\t\t}\n\t\t\n\t\t// Needs a special way of creating the page so that no click is required\n\t\t// to refresh the contents after the external CSS styles have been loaded.\n\t\t// To avoid a click or programmatic refresh, the styleSheets[].cssText\n\t\t// property is copied over from the original document.\n\t\tif (mxClient.IS_IE || document.documentMode == 11)\n\t\t{\n\t\t\tvar html = '<html><head>';\n\n\t\t\tvar base = document.getElementsByTagName('base');\n\t\t\t\n\t\t\tfor (var i = 0; i < base.length; i++)\n\t\t\t{\n\t\t\t\thtml += base[i].outerHTML;\n\t\t\t}\n\n\t\t\thtml += '<style>';\n\n\t\t\t// Copies the stylesheets without having to load them again\n\t\t\tfor (var i = 0; i < document.styleSheets.length; i++)\n\t\t\t{\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\thtml += document.styleSheets[i].cssText;\n\t\t\t\t}\n\t\t\t\tcatch (e)\n\t\t\t\t{\n\t\t\t\t\t// ignore security exception\n\t\t\t\t}\n\t\t\t}\n\n\t\t\thtml += '</style></head><body style=\"margin:0px;\">';\n\t\t\t\n\t\t\t// Copies the contents of the graph container\n\t\t\thtml += '<div style=\"position:absolute;overflow:hidden;width:' + w + 'px;height:' + h + 'px;\"><div style=\"position:relative;left:' + dx + 'px;top:' + dy + 'px;\">';\n\t\t\thtml += graph.container.innerHTML;\n\t\t\thtml += '</div></div></body><html>';\n\n\t\t\tdoc.writeln(html);\n\t\t\tdoc.close();\n\t\t}\n\t\telse\n\t\t{\n\t\t\tdoc.writeln('<html><head>');\n\t\t\t\n\t\t\tvar base = document.getElementsByTagName('base');\n\t\t\t\n\t\t\tfor (var i = 0; i < base.length; i++)\n\t\t\t{\n\t\t\t\tdoc.writeln(mxUtils.getOuterHtml(base[i]));\n\t\t\t}\n\t\t\t\n\t\t\tvar links = document.getElementsByTagName('link');\n\t\t\t\n\t\t\tfor (var i = 0; i < links.length; i++)\n\t\t\t{\n\t\t\t\tdoc.writeln(mxUtils.getOuterHtml(links[i]));\n\t\t\t}\n\t\n\t\t\tvar styles = document.getElementsByTagName('style');\n\t\t\t\n\t\t\tfor (var i = 0; i < styles.length; i++)\n\t\t\t{\n\t\t\t\tdoc.writeln(mxUtils.getOuterHtml(styles[i]));\n\t\t\t}\n\n\t\t\tdoc.writeln('</head><body style=\"margin:0px;\"></body></html>');\n\t\t\tdoc.close();\n\n\t\t\tvar outer = doc.createElement('div');\n\t\t\touter.position = 'absolute';\n\t\t\touter.overflow = 'hidden';\n\t\t\touter.style.width = w + 'px';\n\t\t\touter.style.height = h + 'px';\n\n\t\t\t// Required for HTML labels if foreignObjects are disabled\n\t\t\tvar div = doc.createElement('div');\n\t\t\tdiv.style.position = 'absolute';\n\t\t\tdiv.style.left = dx + 'px';\n\t\t\tdiv.style.top = dy + 'px';\n\n\t\t\tvar node = graph.container.firstChild;\n\t\t\tvar svg = null;\n\t\t\t\n\t\t\twhile (node != null)\n\t\t\t{\n\t\t\t\tvar clone = node.cloneNode(true);\n\t\t\t\t\n\t\t\t\tif (node == graph.view.drawPane.ownerSVGElement)\n\t\t\t\t{\n\t\t\t\t\touter.appendChild(clone);\n\t\t\t\t\tsvg = clone;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tdiv.appendChild(clone);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tnode = node.nextSibling;\n\t\t\t}\n\n\t\t\tdoc.body.appendChild(outer);\n\t\t\t\n\t\t\tif (div.firstChild != null)\n\t\t\t{\n\t\t\t\tdoc.body.appendChild(div);\n\t\t\t}\n\t\t\t\t\t\t\n\t\t\tif (svg != null)\n\t\t\t{\n\t\t\t\tsvg.style.minWidth = '';\n\t\t\t\tsvg.style.minHeight = '';\n\t\t\t\tsvg.firstChild.setAttribute('transform', 'translate(' + dx + ',' + dy + ')');\n\t\t\t}\n\t\t}\n\t\t\n\t\tmxUtils.removeCursors(doc.body);\n\t\n\t\treturn doc;\n\t},\n\t\n\t/**\n\t * Function: printScreen\n\t * \n\t * Prints the specified graph using a new window and the built-in print\n\t * dialog.\n\t * \n\t * This function should be called from within the document with the graph.\n\t * \n\t * Parameters:\n\t * \n\t * graph - <mxGraph> to be printed.\n\t */\n\tprintScreen: function(graph)\n\t{\n\t\tvar wnd = window.open();\n\t\tvar bounds = graph.getGraphBounds();\n\t\tmxUtils.show(graph, wnd.document);\n\t\t\n\t\tvar print = function()\n\t\t{\n\t\t\twnd.focus();\n\t\t\twnd.print();\n\t\t\twnd.close();\n\t\t};\n\t\t\n\t\t// Workaround for Google Chrome which needs a bit of a\n\t\t// delay in order to render the SVG contents\n\t\tif (mxClient.IS_GC)\n\t\t{\n\t\t\twnd.setTimeout(print, 500);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tprint();\n\t\t}\n\t},\n\t\n\t/**\n\t * Function: popup\n\t * \n\t * Shows the specified text content in a new <mxWindow> or a new browser\n\t * window if isInternalWindow is false.\n\t * \n\t * Parameters:\n\t * \n\t * content - String that specifies the text to be displayed.\n\t * isInternalWindow - Optional boolean indicating if an mxWindow should be\n\t * used instead of a new browser window. Default is false.\n\t */\n\tpopup: function(content, isInternalWindow)\n\t{\n\t   \tif (isInternalWindow)\n\t   \t{\n\t\t\tvar div = document.createElement('div');\n\t\t\t\n\t\t\tdiv.style.overflow = 'scroll';\n\t\t\tdiv.style.width = '636px';\n\t\t\tdiv.style.height = '460px';\n\t\t\t\n\t\t\tvar pre = document.createElement('pre');\n\t\t    pre.innerHTML = mxUtils.htmlEntities(content, false).\n\t\t    \treplace(/\\n/g,'<br>').replace(/ /g, '&nbsp;');\n\t\t\t\n\t\t\tdiv.appendChild(pre);\n\t\t\t\n\t\t\tvar w = document.body.clientWidth;\n\t\t\tvar h = Math.max(document.body.clientHeight || 0, document.documentElement.clientHeight)\n\t\t\tvar wnd = new mxWindow('Popup Window', div,\n\t\t\t\tw/2-320, h/2-240, 640, 480, false, true);\n\n\t\t\twnd.setClosable(true);\n\t\t\twnd.setVisible(true);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Wraps up the XML content in a textarea\n\t\t\tif (mxClient.IS_NS)\n\t\t\t{\n\t\t\t    var wnd = window.open();\n\t\t\t\twnd.document.writeln('<pre>'+mxUtils.htmlEntities(content)+'</pre');\n\t\t\t   \twnd.document.close();\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t    var wnd = window.open();\n\t\t\t    var pre = wnd.document.createElement('pre');\n\t\t\t    pre.innerHTML = mxUtils.htmlEntities(content, false).\n\t\t\t    \treplace(/\\n/g,'<br>').replace(/ /g, '&nbsp;');\n\t\t\t   \twnd.document.body.appendChild(pre);\n\t\t\t}\n\t   \t}\n\t},\n\t\n\t/**\n\t * Function: alert\n\t * \n\t * Displayss the given alert in a new dialog. This implementation uses the\n\t * built-in alert function. This is used to display validation errors when\n\t * connections cannot be changed or created.\n\t * \n\t * Parameters:\n\t * \n\t * message - String specifying the message to be displayed.\n\t */\n\talert: function(message)\n\t{\n\t\talert(message);\n\t},\n\t\n\t/**\n\t * Function: prompt\n\t * \n\t * Displays the given message in a prompt dialog. This implementation uses\n\t * the built-in prompt function.\n\t * \n\t * Parameters:\n\t * \n\t * message - String specifying the message to be displayed.\n\t * defaultValue - Optional string specifying the default value.\n\t */\n\tprompt: function(message, defaultValue)\n\t{\n\t\treturn prompt(message, (defaultValue != null) ? defaultValue : '');\n\t},\n\t\n\t/**\n\t * Function: confirm\n\t * \n\t * Displays the given message in a confirm dialog. This implementation uses\n\t * the built-in confirm function.\n\t * \n\t * Parameters:\n\t * \n\t * message - String specifying the message to be displayed.\n\t */\n\tconfirm: function(message)\n\t{\n\t\treturn confirm(message);\n\t},\n\n\t/**\n\t * Function: error\n\t * \n\t * Displays the given error message in a new <mxWindow> of the given width.\n\t * If close is true then an additional close button is added to the window.\n\t * The optional icon specifies the icon to be used for the window. Default\n\t * is <mxUtils.errorImage>.\n\t * \n\t * Parameters:\n\t * \n\t * message - String specifying the message to be displayed.\n\t * width - Integer specifying the width of the window.\n\t * close - Optional boolean indicating whether to add a close button.\n\t * icon - Optional icon for the window decoration.\n\t */\n\terror: function(message, width, close, icon)\n\t{\n\t\tvar div = document.createElement('div');\n\t\tdiv.style.padding = '20px';\n\n\t\tvar img = document.createElement('img');\n\t\timg.setAttribute('src', icon || mxUtils.errorImage);\n\t\timg.setAttribute('valign', 'bottom');\n\t\timg.style.verticalAlign = 'middle';\n\t\tdiv.appendChild(img);\n\n\t\tdiv.appendChild(document.createTextNode('\\u00a0')); // &nbsp;\n\t\tdiv.appendChild(document.createTextNode('\\u00a0')); // &nbsp;\n\t\tdiv.appendChild(document.createTextNode('\\u00a0')); // &nbsp;\n\t\tmxUtils.write(div, message);\n\n\t\tvar w = document.body.clientWidth;\n\t\tvar h = (document.body.clientHeight || document.documentElement.clientHeight);\n\t\tvar warn = new mxWindow(mxResources.get(mxUtils.errorResource) ||\n\t\t\tmxUtils.errorResource, div, (w-width)/2, h/4, width, null,\n\t\t\tfalse, true);\n\n\t\tif (close)\n\t\t{\n\t\t\tmxUtils.br(div);\n\t\t\t\n\t\t\tvar tmp = document.createElement('p');\n\t\t\tvar button = document.createElement('button');\n\n\t\t\tif (mxClient.IS_IE)\n\t\t\t{\n\t\t\t\tbutton.style.cssText = 'float:right';\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tbutton.setAttribute('style', 'float:right');\n\t\t\t}\n\n\t\t\tmxEvent.addListener(button, 'click', function(evt)\n\t\t\t{\n\t\t\t\twarn.destroy();\n\t\t\t});\n\n\t\t\tmxUtils.write(button, mxResources.get(mxUtils.closeResource) ||\n\t\t\t\tmxUtils.closeResource);\n\t\t\t\n\t\t\ttmp.appendChild(button);\n\t\t\tdiv.appendChild(tmp);\n\t\t\t\n\t\t\tmxUtils.br(div);\n\t\t\t\n\t\t\twarn.setClosable(true);\n\t\t}\n\t\t\n\t\twarn.setVisible(true);\n\t\t\n\t\treturn warn;\n\t},\n\n\t/**\n\t * Function: makeDraggable\n\t * \n\t * Configures the given DOM element to act as a drag source for the\n\t * specified graph. Returns a a new <mxDragSource>. If\n\t * <mxDragSource.guideEnabled> is enabled then the x and y arguments must\n\t * be used in funct to match the preview location.\n\t * \n\t * Example:\n\t * \n\t * (code)\n\t * var funct = function(graph, evt, cell, x, y)\n\t * {\n\t *   if (graph.canImportCell(cell))\n\t *   {\n\t *     var parent = graph.getDefaultParent();\n\t *     var vertex = null;\n\t *     \n\t *     graph.getModel().beginUpdate();\n\t *     try\n\t *     {\n\t * \t     vertex = graph.insertVertex(parent, null, 'Hello', x, y, 80, 30);\n\t *     }\n\t *     finally\n\t *     {\n\t *       graph.getModel().endUpdate();\n\t *     }\n\t *\n\t *     graph.setSelectionCell(vertex);\n\t *   }\n\t * }\n\t * \n\t * var img = document.createElement('img');\n\t * img.setAttribute('src', 'editors/images/rectangle.gif');\n\t * img.style.position = 'absolute';\n\t * img.style.left = '0px';\n\t * img.style.top = '0px';\n\t * img.style.width = '16px';\n\t * img.style.height = '16px';\n\t * \n\t * var dragImage = img.cloneNode(true);\n\t * dragImage.style.width = '32px';\n\t * dragImage.style.height = '32px';\n\t * mxUtils.makeDraggable(img, graph, funct, dragImage);\n\t * document.body.appendChild(img);\n\t * (end)\n\t * \n\t * Parameters:\n\t * \n\t * element - DOM element to make draggable.\n\t * graphF - <mxGraph> that acts as the drop target or a function that takes a\n\t * mouse event and returns the current <mxGraph>.\n\t * funct - Function to execute on a successful drop.\n\t * dragElement - Optional DOM node to be used for the drag preview.\n\t * dx - Optional horizontal offset between the cursor and the drag\n\t * preview.\n\t * dy - Optional vertical offset between the cursor and the drag\n\t * preview.\n\t * autoscroll - Optional boolean that specifies if autoscroll should be\n\t * used. Default is mxGraph.autoscroll.\n\t * scalePreview - Optional boolean that specifies if the preview element\n\t * should be scaled according to the graph scale. If this is true, then\n\t * the offsets will also be scaled. Default is false.\n\t * highlightDropTargets - Optional boolean that specifies if dropTargets\n\t * should be highlighted. Default is true.\n\t * getDropTarget - Optional function to return the drop target for a given\n\t * location (x, y). Default is mxGraph.getCellAt.\n\t */\n\tmakeDraggable: function(element, graphF, funct, dragElement, dx, dy, autoscroll,\n\t\t\tscalePreview, highlightDropTargets, getDropTarget)\n\t{\n\t\tvar dragSource = new mxDragSource(element, funct);\n\t\tdragSource.dragOffset = new mxPoint((dx != null) ? dx : 0,\n\t\t\t(dy != null) ? dy : mxConstants.TOOLTIP_VERTICAL_OFFSET);\n\t\tdragSource.autoscroll = autoscroll;\n\t\t\n\t\t// Cannot enable this by default. This needs to be enabled in the caller\n\t\t// if the funct argument uses the new x- and y-arguments.\n\t\tdragSource.setGuidesEnabled(false);\n\t\t\n\t\tif (highlightDropTargets != null)\n\t\t{\n\t\t\tdragSource.highlightDropTargets = highlightDropTargets;\n\t\t}\n\t\t\n\t\t// Overrides function to find drop target cell\n\t\tif (getDropTarget != null)\n\t\t{\n\t\t\tdragSource.getDropTarget = getDropTarget;\n\t\t}\n\t\t\n\t\t// Overrides function to get current graph\n\t\tdragSource.getGraphForEvent = function(evt)\n\t\t{\n\t\t\treturn (typeof(graphF) == 'function') ? graphF(evt) : graphF;\n\t\t};\n\t\t\n\t\t// Translates switches into dragSource customizations\n\t\tif (dragElement != null)\n\t\t{\n\t\t\tdragSource.createDragElement = function()\n\t\t\t{\n\t\t\t\treturn dragElement.cloneNode(true);\n\t\t\t};\n\t\t\t\n\t\t\tif (scalePreview)\n\t\t\t{\n\t\t\t\tdragSource.createPreviewElement = function(graph)\n\t\t\t\t{\n\t\t\t\t\tvar elt = dragElement.cloneNode(true);\n\n\t\t\t\t\tvar w = parseInt(elt.style.width);\n\t\t\t\t\tvar h = parseInt(elt.style.height);\n\t\t\t\t\telt.style.width = Math.round(w * graph.view.scale) + 'px';\n\t\t\t\t\telt.style.height = Math.round(h * graph.view.scale) + 'px';\n\t\t\t\t\t\n\t\t\t\t\treturn elt;\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn dragSource;\n\t}\n\n};\n"
  },
  {
    "path": "static/cherry/drawio_demo/src/js/util/mxVmlCanvas2D.js",
    "content": "/**\n * Copyright (c) 2006-2015, JGraph Ltd\n * Copyright (c) 2006-2015, Gaudenz Alder\n */\n/**\n *\n * Class: mxVmlCanvas2D\n * \n * Implements a canvas to be used for rendering VML. Here is an example of implementing a\n * fallback for SVG images which are not supported in VML-based browsers.\n * \n * (code)\n * var mxVmlCanvas2DImage = mxVmlCanvas2D.prototype.image;\n * mxVmlCanvas2D.prototype.image = function(x, y, w, h, src, aspect, flipH, flipV)\n * {\n *   if (src.substring(src.length - 4, src.length) == '.svg')\n *   {\n *     src = 'http://www.jgraph.com/images/mxgraph.gif';\n *   }\n *   \n *   mxVmlCanvas2DImage.apply(this, arguments);\n * };\n * (end)\n * \n * To disable anti-aliasing in the output, use the following code.\n * \n * (code)\n * document.createStyleSheet().cssText = mxClient.VML_PREFIX + '\\\\:*{antialias:false;)}';\n * (end)\n * \n * A description of the public API is available in <mxXmlCanvas2D>. Note that\n * there is a known issue in VML where gradients are painted using the outer\n * bounding box of rotated shapes, not the actual bounds of the shape. See\n * also <text> for plain text label restrictions in shapes for VML.\n */\nvar mxVmlCanvas2D = function(root)\n{\n\tmxAbstractCanvas2D.call(this);\n\n\t/**\n\t * Variable: root\n\t * \n\t * Reference to the container for the SVG content.\n\t */\n\tthis.root = root;\n};\n\n/**\n * Extends mxAbstractCanvas2D\n */\nmxUtils.extend(mxVmlCanvas2D, mxAbstractCanvas2D);\n\n/**\n * Variable: path\n * \n * Holds the current DOM node.\n */\nmxVmlCanvas2D.prototype.node = null;\n\n/**\n * Variable: textEnabled\n * \n * Specifies if text output should be enabledetB. Default is true.\n */\nmxVmlCanvas2D.prototype.textEnabled = true;\n\n/**\n * Variable: moveOp\n * \n * Contains the string used for moving in paths. Default is 'm'.\n */\nmxVmlCanvas2D.prototype.moveOp = 'm';\n\n/**\n * Variable: lineOp\n * \n * Contains the string used for moving in paths. Default is 'l'.\n */\nmxVmlCanvas2D.prototype.lineOp = 'l';\n\n/**\n * Variable: curveOp\n * \n * Contains the string used for bezier curves. Default is 'c'.\n */\nmxVmlCanvas2D.prototype.curveOp = 'c';\n\n/**\n * Variable: closeOp\n * \n * Holds the operator for closing curves. Default is 'x e'.\n */\nmxVmlCanvas2D.prototype.closeOp = 'x';\n\n/**\n * Variable: rotatedHtmlBackground\n * \n * Background color for rotated HTML. Default is ''. This can be set to eg.\n * white to improve rendering of rotated text in VML for IE9.\n */\nmxVmlCanvas2D.prototype.rotatedHtmlBackground = '';\n\n/**\n * Variable: vmlScale\n * \n * Specifies the scale used to draw VML shapes.\n */\nmxVmlCanvas2D.prototype.vmlScale = 1;\n\n/**\n * Function: createElement\n * \n * Creates the given element using the document.\n */\nmxVmlCanvas2D.prototype.createElement = function(name)\n{\n\treturn document.createElement(name);\n};\n\n/**\n * Function: createVmlElement\n * \n * Creates a new element using <createElement> and prefixes the given name with\n * <mxClient.VML_PREFIX>.\n */\nmxVmlCanvas2D.prototype.createVmlElement = function(name)\n{\n\treturn this.createElement(mxClient.VML_PREFIX + ':' + name);\n};\n\n/**\n * Function: addNode\n * \n * Adds the current node to the <root>.\n */\nmxVmlCanvas2D.prototype.addNode = function(filled, stroked)\n{\n\tvar node = this.node;\n\tvar s = this.state;\n\t\n\tif (node != null)\n\t{\n\t\tif (node.nodeName == 'shape')\n\t\t{\n\t\t\t// Checks if the path is not empty\n\t\t\tif (this.path != null && this.path.length > 0)\n\t\t\t{\n\t\t\t\tnode.path = this.path.join(' ') + ' e';\n\t\t\t\tnode.style.width = this.root.style.width;\n\t\t\t\tnode.style.height = this.root.style.height;\n\t\t\t\tnode.coordsize = parseInt(node.style.width) + ' ' + parseInt(node.style.height);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\t\tnode.strokeweight = this.format(Math.max(1, s.strokeWidth * s.scale / this.vmlScale)) + 'px';\n\t\t\n\t\tif (s.shadow)\n\t\t{\n\t\t\tthis.root.appendChild(this.createShadow(node,\n\t\t\t\tfilled && s.fillColor != null,\n\t\t\t\tstroked && s.strokeColor != null));\n\t\t}\n\t\t\n\t\tif (stroked && s.strokeColor != null)\n\t\t{\n\t\t\tnode.stroked = 'true';\n\t\t\tnode.strokecolor = s.strokeColor;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tnode.stroked = 'false';\n\t\t}\n\n\t\tnode.appendChild(this.createStroke());\n\n\t\tif (filled && s.fillColor != null)\n\t\t{\n\t\t\tnode.appendChild(this.createFill());\n\t\t}\n\t\telse if (this.pointerEvents && (node.nodeName != 'shape' ||\n\t\t\tthis.path[this.path.length - 1] == this.closeOp))\n\t\t{\n\t\t\tnode.appendChild(this.createTransparentFill());\n\t\t}\n\t\telse\n\t\t{\n\t\t\tnode.filled = 'false';\n\t\t}\n\n\t\t// LATER: Update existing DOM for performance\n\t\tthis.root.appendChild(node);\n\t}\n};\n\n/**\n * Function: createTransparentFill\n * \n * Creates a transparent fill.\n */\nmxVmlCanvas2D.prototype.createTransparentFill = function()\n{\n\tvar fill = this.createVmlElement('fill');\n\tfill.src = mxClient.imageBasePath + '/transparent.gif';\n\tfill.type = 'tile';\n\t\n\treturn fill;\n};\n\n/**\n * Function: createFill\n * \n * Creates a fill for the current state.\n */\nmxVmlCanvas2D.prototype.createFill = function()\n{\n\tvar s = this.state;\n\t\n\t// Gradients in foregrounds not supported because special gradients\n\t// with bounds must be created for each element in graphics-canvases\n\tvar fill = this.createVmlElement('fill');\n\tfill.color = s.fillColor;\n\n\tif (s.gradientColor != null)\n\t{\n\t\tfill.type = 'gradient';\n\t\tfill.method = 'none';\n\t\tfill.color2 = s.gradientColor;\n\t\tvar angle = 180 - s.rotation;\n\t\t\n\t\tif (s.gradientDirection == mxConstants.DIRECTION_WEST)\n\t\t{\n\t\t\tangle -= 90 + ((this.root.style.flip == 'x') ? 180 : 0);\n\t\t}\n\t\telse if (s.gradientDirection == mxConstants.DIRECTION_EAST)\n\t\t{\n\t\t\tangle += 90 + ((this.root.style.flip == 'x') ? 180 : 0);\n\t\t}\n\t\telse if (s.gradientDirection == mxConstants.DIRECTION_NORTH)\n\t\t{\n\t\t\tangle -= 180 + ((this.root.style.flip == 'y') ? -180 : 0);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t angle += ((this.root.style.flip == 'y') ? -180 : 0);\n\t\t}\n\t\t\n\t\tif (this.root.style.flip == 'x' || this.root.style.flip == 'y')\n\t\t{\n\t\t\tangle *= -1;\n\t\t}\n\n\t\t// LATER: Fix outer bounding box for rotated shapes used in VML.\n\t\tfill.angle = mxUtils.mod(angle, 360);\n\t\tfill.opacity = (s.alpha * s.gradientFillAlpha * 100) + '%';\n\t\tfill.setAttribute(mxClient.OFFICE_PREFIX + ':opacity2', (s.alpha * s.gradientAlpha * 100) + '%');\n\t}\n\telse if (s.alpha < 1 || s.fillAlpha < 1)\n\t{\n\t\tfill.opacity = (s.alpha * s.fillAlpha * 100) + '%';\t\t\t\n\t}\n\t\n\treturn fill;\n};\n/**\n * Function: createStroke\n * \n * Creates a fill for the current state.\n */\nmxVmlCanvas2D.prototype.createStroke = function()\n{\n\tvar s = this.state;\n\tvar stroke = this.createVmlElement('stroke');\n\tstroke.endcap = s.lineCap || 'flat';\n\tstroke.joinstyle = s.lineJoin || 'miter';\n\tstroke.miterlimit = s.miterLimit || '10';\n\t\n\tif (s.alpha < 1 || s.strokeAlpha < 1)\n\t{\n\t\tstroke.opacity = (s.alpha * s.strokeAlpha * 100) + '%';\n\t}\n\t\n\tif (s.dashed)\n\t{\n\t\tstroke.dashstyle = this.getVmlDashStyle();\n\t}\n\t\n\treturn stroke;\n};\n\n/**\n * Function: getVmlDashPattern\n * \n * Returns a VML dash pattern for the current dashPattern.\n * See http://msdn.microsoft.com/en-us/library/bb264085(v=vs.85).aspx\n */\nmxVmlCanvas2D.prototype.getVmlDashStyle = function()\n{\n\tvar result = 'dash';\n\t\n\tif (typeof(this.state.dashPattern) === 'string')\n\t{\n\t\tvar tok = this.state.dashPattern.split(' ');\n\t\t\n\t\tif (tok.length > 0 && tok[0] == 1)\n\t\t{\n\t\t\tresult = '0 2';\n\t\t}\n\t}\n\t\n\treturn result;\n};\n\n/**\n * Function: createShadow\n * \n * Creates a shadow for the given node.\n */\nmxVmlCanvas2D.prototype.createShadow = function(node, filled, stroked)\n{\n\tvar s = this.state;\n\tvar rad = -s.rotation * (Math.PI / 180);\n\tvar cos = Math.cos(rad);\n\tvar sin = Math.sin(rad);\n\n\tvar dx = s.shadowDx * s.scale;\n\tvar dy = s.shadowDy * s.scale;\n\n\tif (this.root.style.flip == 'x')\n\t{\n\t\tdx *= -1;\n\t}\n\telse if (this.root.style.flip == 'y')\n\t{\n\t\tdy *= -1;\n\t}\n\t\n\tvar shadow = node.cloneNode(true);\n\tshadow.style.marginLeft = Math.round(dx * cos - dy * sin) + 'px';\n\tshadow.style.marginTop = Math.round(dx * sin + dy * cos) + 'px';\n\n\t// Workaround for wrong cloning in IE8 standards mode\n\tif (document.documentMode == 8)\n\t{\n\t\tshadow.strokeweight = node.strokeweight;\n\t\t\n\t\tif (node.nodeName == 'shape')\n\t\t{\n\t\t\tshadow.path = this.path.join(' ') + ' e';\n\t\t\tshadow.style.width = this.root.style.width;\n\t\t\tshadow.style.height = this.root.style.height;\n\t\t\tshadow.coordsize = parseInt(node.style.width) + ' ' + parseInt(node.style.height);\n\t\t}\n\t}\n\t\n\tif (stroked)\n\t{\n\t\tshadow.strokecolor = s.shadowColor;\n\t\tshadow.appendChild(this.createShadowStroke());\n\t}\n\telse\n\t{\n\t\tshadow.stroked = 'false';\n\t}\n\t\n\tif (filled)\n\t{\n\t\tshadow.appendChild(this.createShadowFill());\n\t}\n\telse\n\t{\n\t\tshadow.filled = 'false';\n\t}\n\t\n\treturn shadow;\n};\n\n/**\n * Function: createShadowFill\n * \n * Creates the fill for the shadow.\n */\nmxVmlCanvas2D.prototype.createShadowFill = function()\n{\n\tvar fill = this.createVmlElement('fill');\n\tfill.color = this.state.shadowColor;\n\tfill.opacity = (this.state.alpha * this.state.shadowAlpha * 100) + '%';\n\t\n\treturn fill;\n};\n\n/**\n * Function: createShadowStroke\n * \n * Creates the stroke for the shadow.\n */\nmxVmlCanvas2D.prototype.createShadowStroke = function()\n{\n\tvar stroke = this.createStroke();\n\tstroke.opacity = (this.state.alpha * this.state.shadowAlpha * 100) + '%';\n\t\n\treturn stroke;\n};\n\n/**\n * Function: rotate\n * \n * Sets the rotation of the canvas. Note that rotation cannot be concatenated.\n */\nmxVmlCanvas2D.prototype.rotate = function(theta, flipH, flipV, cx, cy)\n{\n\tif (flipH && flipV)\n\t{\n\t\ttheta += 180;\n\t}\n\telse if (flipH)\n\t{\n\t\tthis.root.style.flip = 'x';\n\t}\n\telse if (flipV)\n\t{\n\t\tthis.root.style.flip = 'y';\n\t}\n\n\tif (flipH ? !flipV : flipV)\n\t{\n\t\ttheta *= -1;\n\t}\n\n\tthis.root.style.rotation = theta;\n\tthis.state.rotation = this.state.rotation + theta;\n\tthis.state.rotationCx = cx;\n\tthis.state.rotationCy = cy;\n};\n\n/**\n * Function: begin\n * \n * Extends superclass to create path.\n */\nmxVmlCanvas2D.prototype.begin = function()\n{\n\tmxAbstractCanvas2D.prototype.begin.apply(this, arguments);\n\tthis.node = this.createVmlElement('shape');\n\tthis.node.style.position = 'absolute';\n};\n\n/**\n * Function: quadTo\n * \n * Replaces quadratic curve with bezier curve in VML.\n */\nmxVmlCanvas2D.prototype.quadTo = function(x1, y1, x2, y2)\n{\n\tvar s = this.state;\n\n\tvar cpx0 = (this.lastX + s.dx) * s.scale;\n\tvar cpy0 = (this.lastY + s.dy) * s.scale;\n\tvar qpx1 = (x1 + s.dx) * s.scale;\n\tvar qpy1 = (y1 + s.dy) * s.scale;\n\tvar cpx3 = (x2 + s.dx) * s.scale;\n\tvar cpy3 = (y2 + s.dy) * s.scale;\n\t\n\tvar cpx1 = cpx0 + 2/3 * (qpx1 - cpx0);\n\tvar cpy1 = cpy0 + 2/3 * (qpy1 - cpy0);\n\t\n\tvar cpx2 = cpx3 + 2/3 * (qpx1 - cpx3);\n\tvar cpy2 = cpy3 + 2/3 * (qpy1 - cpy3);\n\t\n\tthis.path.push('c ' + this.format(cpx1) + ' ' + this.format(cpy1) +\n\t\t\t' ' + this.format(cpx2) + ' ' + this.format(cpy2) +\n\t\t\t' ' + this.format(cpx3) + ' ' + this.format(cpy3));\n\tthis.lastX = (cpx3 / s.scale) - s.dx;\n\tthis.lastY = (cpy3 / s.scale) - s.dy;\n\t\n};\n\n/**\n * Function: createRect\n * \n * Sets the glass gradient.\n */\nmxVmlCanvas2D.prototype.createRect = function(nodeName, x, y, w, h)\n{\n\tvar s = this.state;\n\tvar n = this.createVmlElement(nodeName);\n\tn.style.position = 'absolute';\n\tn.style.left = this.format((x + s.dx) * s.scale) + 'px';\n\tn.style.top = this.format((y + s.dy) * s.scale) + 'px';\n\tn.style.width = this.format(w * s.scale) + 'px';\n\tn.style.height = this.format(h * s.scale) + 'px';\n\t\n\treturn n;\n};\n\n/**\n * Function: rect\n * \n * Sets the current path to a rectangle.\n */\nmxVmlCanvas2D.prototype.rect = function(x, y, w, h)\n{\n\tthis.node = this.createRect('rect', x, y, w, h);\n};\n\n/**\n * Function: roundrect\n * \n * Sets the current path to a rounded rectangle.\n */\nmxVmlCanvas2D.prototype.roundrect = function(x, y, w, h, dx, dy)\n{\n\tthis.node = this.createRect('roundrect', x, y, w, h);\n\t// SetAttribute needed here for IE8\n\tthis.node.setAttribute('arcsize', Math.max(dx * 100 / w, dy * 100 / h) + '%');\n};\n\n/**\n * Function: ellipse\n * \n * Sets the current path to an ellipse.\n */\nmxVmlCanvas2D.prototype.ellipse = function(x, y, w, h)\n{\n\tthis.node = this.createRect('oval', x, y, w, h);\n};\n\n/**\n * Function: image\n * \n * Paints an image.\n */\nmxVmlCanvas2D.prototype.image = function(x, y, w, h, src, aspect, flipH, flipV)\n{\n\tvar node = null;\n\t\n\tif (!aspect)\n\t{\n\t\tnode = this.createRect('image', x, y, w, h);\n\t\tnode.src = src;\n\t}\n\telse\n\t{\n\t\t// Uses fill with aspect to avoid asynchronous update of size\n\t\tnode = this.createRect('rect', x, y, w, h);\n\t\tnode.stroked = 'false';\n\t\t\n\t\t// Handles image aspect via fill\n\t\tvar fill = this.createVmlElement('fill');\n\t\tfill.aspect = (aspect) ? 'atmost' : 'ignore';\n\t\tfill.rotate = 'true';\n\t\tfill.type = 'frame';\n\t\tfill.src = src;\n\n\t\tnode.appendChild(fill);\n\t}\n\t\n\tif (flipH && flipV)\n\t{\n\t\tnode.style.rotation = '180';\n\t}\n\telse if (flipH)\n\t{\n\t\tnode.style.flip = 'x';\n\t}\n\telse if (flipV)\n\t{\n\t\tnode.style.flip = 'y';\n\t}\n\t\n\tif (this.state.alpha < 1 || this.state.fillAlpha < 1)\n\t{\n\t\t// KNOWN: Borders around transparent images in IE<9. Using fill.opacity\n\t\t// fixes this problem by adding a white background in all IE versions.\n\t\tnode.style.filter += 'alpha(opacity=' + (this.state.alpha * this.state.fillAlpha * 100) + ')';\n\t}\n\n\tthis.root.appendChild(node);\n};\n\n/**\n * Function: createText\n * \n * Creates the innermost element that contains the HTML text.\n */\nmxVmlCanvas2D.prototype.createDiv = function(str, align, valign, overflow)\n{\n\tvar div = this.createElement('div');\n\tvar state = this.state;\n\n\tvar css = '';\n\t\n\tif (state.fontBackgroundColor != null)\n\t{\n\t\tcss += 'background-color:' + state.fontBackgroundColor + ';';\n\t}\n\t\n\tif (state.fontBorderColor != null)\n\t{\n\t\tcss += 'border:1px solid ' + state.fontBorderColor + ';';\n\t}\n\t\n\tif (mxUtils.isNode(str))\n\t{\n\t\tdiv.appendChild(str);\n\t}\n\telse\n\t{\n\t\tif (overflow != 'fill' && overflow != 'width')\n\t\t{\n\t\t\tvar div2 = this.createElement('div');\n\t\t\tdiv2.style.cssText = css;\n\t\t\tdiv2.style.display = (mxClient.IS_QUIRKS) ? 'inline' : 'inline-block';\n\t\t\tdiv2.style.zoom = '1';\n\t\t\tdiv2.style.textDecoration = 'inherit';\n\t\t\tdiv2.innerHTML = str;\n\t\t\tdiv.appendChild(div2);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tdiv.style.cssText = css;\n\t\t\tdiv.innerHTML = str;\n\t\t}\n\t}\n\t\n\tvar style = div.style;\n\n\tstyle.fontSize = (state.fontSize / this.vmlScale) + 'px';\n\tstyle.fontFamily = state.fontFamily;\n\tstyle.color = state.fontColor;\n\tstyle.verticalAlign = 'top';\n\tstyle.textAlign = align || 'left';\n\tstyle.lineHeight = (mxConstants.ABSOLUTE_LINE_HEIGHT) ? (state.fontSize * mxConstants.LINE_HEIGHT / this.vmlScale) + 'px' : mxConstants.LINE_HEIGHT;\n\n\tif ((state.fontStyle & mxConstants.FONT_BOLD) == mxConstants.FONT_BOLD)\n\t{\n\t\tstyle.fontWeight = 'bold';\n\t}\n\n\tif ((state.fontStyle & mxConstants.FONT_ITALIC) == mxConstants.FONT_ITALIC)\n\t{\n\t\tstyle.fontStyle = 'italic';\n\t}\n\t\n\tif ((state.fontStyle & mxConstants.FONT_UNDERLINE) == mxConstants.FONT_UNDERLINE)\n\t{\n\t\tstyle.textDecoration = 'underline';\n\t}\n\t\n\treturn div;\n};\n\n/**\n * Function: text\n * \n * Paints the given text. Possible values for format are empty string for plain\n * text and html for HTML markup. Clipping, text background and border are not\n * supported for plain text in VML.\n */\nmxVmlCanvas2D.prototype.text = function(x, y, w, h, str, align, valign, wrap, format, overflow, clip, rotation, dir)\n{\n\tif (this.textEnabled && str != null)\n\t{\n\t\tvar s = this.state;\n\t\t\n\t\tif (format == 'html')\n\t\t{\n\t\t\tif (s.rotation != null)\n\t\t\t{\n\t\t\t\tvar pt = this.rotatePoint(x, y, s.rotation, s.rotationCx, s.rotationCy);\n\t\t\t\t\n\t\t\t\tx = pt.x;\n\t\t\t\ty = pt.y;\n\t\t\t}\n\n\t\t\tif (document.documentMode == 8 && !mxClient.IS_EM)\n\t\t\t{\n\t\t\t\tx += s.dx;\n\t\t\t\ty += s.dy;\n\t\t\t\t\n\t\t\t\t// Workaround for rendering offsets\n\t\t\t\tif (overflow != 'fill' && valign == mxConstants.ALIGN_TOP)\n\t\t\t\t{\n\t\t\t\t\ty -= 1;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tx *= s.scale;\n\t\t\t\ty *= s.scale;\n\t\t\t}\n\n\t\t\t// Adds event transparency in IE8 standards without the transparent background\n\t\t\t// filter which cannot be used due to bugs in the zoomed bounding box (too slow)\n\t\t\t// FIXME: No event transparency if inside v:rect (ie part of shape)\n\t\t\t// KNOWN: Offset wrong for rotated text with word that are longer than the wrapping\n\t\t\t// width in IE8 because real width of text cannot be determined here.\n\t\t\t// This should be fixed in mxText.updateBoundingBox by calling before this and\n\t\t\t// passing the real width to this method if not clipped and wrapped.\n\t\t\tvar abs = (document.documentMode == 8 && !mxClient.IS_EM) ? this.createVmlElement('group') : this.createElement('div');\n\t\t\tabs.style.position = 'absolute';\n\t\t\tabs.style.display = 'inline';\n\t\t\tabs.style.left = this.format(x) + 'px';\n\t\t\tabs.style.top = this.format(y) + 'px';\n\t\t\tabs.style.zoom = s.scale;\n\n\t\t\tvar box = this.createElement('div');\n\t\t\tbox.style.position = 'relative';\n\t\t\tbox.style.display = 'inline';\n\t\t\t\n\t\t\tvar margin = mxUtils.getAlignmentAsPoint(align, valign);\n\t\t\tvar dx = margin.x;\n\t\t\tvar dy = margin.y;\n\n\t\t\tvar div = this.createDiv(str, align, valign, overflow);\n\t\t\tvar inner = this.createElement('div');\n\t\t\t\n\t\t\tif (dir != null)\n\t\t\t{\n\t\t\t\tdiv.setAttribute('dir', dir);\n\t\t\t}\n\n\t\t\tif (wrap && w > 0)\n\t\t\t{\n\t\t\t\tif (!clip)\n\t\t\t\t{\n\t\t\t\t\tdiv.style.width = Math.round(w) + 'px';\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tdiv.style.wordWrap = mxConstants.WORD_WRAP;\n\t\t\t\tdiv.style.whiteSpace = 'normal';\n\t\t\t\t\n\t\t\t\t// LATER: Check if other cases need to be handled\n\t\t\t\tif (div.style.wordWrap == 'break-word')\n\t\t\t\t{\n\t\t\t\t\tvar tmp = div;\n\t\t\t\t\t\n\t\t\t\t\tif (tmp.firstChild != null && tmp.firstChild.nodeName == 'DIV')\n\t\t\t\t\t{\n\t\t\t\t\t\ttmp.firstChild.style.width = '100%';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tdiv.style.whiteSpace = 'nowrap';\n\t\t\t}\n\t\t\t\n\t\t\tvar rot = s.rotation + (rotation || 0);\n\t\t\t\n\t\t\tif (this.rotateHtml && rot != 0)\n\t\t\t{\n\t\t\t\tinner.style.display = 'inline';\n\t\t\t\tinner.style.zoom = '1';\n\t\t\t\tinner.appendChild(div);\n\n\t\t\t\t// Box not needed for rendering in IE8 standards\n\t\t\t\tif (document.documentMode == 8 && !mxClient.IS_EM && this.root.nodeName != 'DIV')\n\t\t\t\t{\n\t\t\t\t\tbox.appendChild(inner);\n\t\t\t\t\tabs.appendChild(box);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tabs.appendChild(inner);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if (document.documentMode == 8 && !mxClient.IS_EM)\n\t\t\t{\n\t\t\t\tbox.appendChild(div);\n\t\t\t\tabs.appendChild(box);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tdiv.style.display = 'inline';\n\t\t\t\tabs.appendChild(div);\n\t\t\t}\n\t\t\t\n\t\t\t// Inserts the node into the DOM\n\t\t\tif (this.root.nodeName != 'DIV')\n\t\t\t{\n\t\t\t\t// Rectangle to fix position in group\n\t\t\t\tvar rect = this.createVmlElement('rect');\n\t\t\t\trect.stroked = 'false';\n\t\t\t\trect.filled = 'false';\n\n\t\t\t\trect.appendChild(abs);\n\t\t\t\tthis.root.appendChild(rect);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tthis.root.appendChild(abs);\n\t\t\t}\n\t\t\t\n\t\t\tif (clip)\n\t\t\t{\n\t\t\t\tdiv.style.overflow = 'hidden';\n\t\t\t\tdiv.style.width = Math.round(w) + 'px';\n\t\t\t\t\n\t\t\t\tif (!mxClient.IS_QUIRKS)\n\t\t\t\t{\n\t\t\t\t\tdiv.style.maxHeight = Math.round(h) + 'px';\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if (overflow == 'fill')\n\t\t\t{\n\t\t\t\t// KNOWN: Affects horizontal alignment in quirks\n\t\t\t\t// but fill should only be used with align=left\n\t\t\t\tdiv.style.overflow = 'hidden';\n\t\t\t\tdiv.style.width = (Math.max(0, w) + 1) + 'px';\n\t\t\t\tdiv.style.height = (Math.max(0, h) + 1) + 'px';\n\t\t\t}\n\t\t\telse if (overflow == 'width')\n\t\t\t{\n\t\t\t\t// KNOWN: Affects horizontal alignment in quirks\n\t\t\t\t// but fill should only be used with align=left\n\t\t\t\tdiv.style.overflow = 'hidden';\n\t\t\t\tdiv.style.width = (Math.max(0, w) + 1) + 'px';\n\t\t\t\tdiv.style.maxHeight = (Math.max(0, h) + 1) + 'px';\n\t\t\t}\n\t\t\t\n\t\t\tif (this.rotateHtml && rot != 0)\n\t\t\t{\n\t\t\t\tvar rad = rot * (Math.PI / 180);\n\t\t\t\t\n\t\t\t\t// Precalculate cos and sin for the rotation\n\t\t\t\tvar real_cos = parseFloat(parseFloat(Math.cos(rad)).toFixed(8));\n\t\t\t\tvar real_sin = parseFloat(parseFloat(Math.sin(-rad)).toFixed(8));\n\n\t\t\t\trad %= 2 * Math.PI;\n\t\t\t\tif (rad < 0) rad += 2 * Math.PI;\n\t\t\t\trad %= Math.PI;\n\t\t\t\tif (rad > Math.PI / 2) rad = Math.PI - rad;\n\t\t\t\t\n\t\t\t\tvar cos = Math.cos(rad);\n\t\t\t\tvar sin = Math.sin(rad);\n\n\t\t\t\t// Adds div to document to measure size\n\t\t\t\tif (document.documentMode == 8 && !mxClient.IS_EM)\n\t\t\t\t{\n\t\t\t\t\tdiv.style.display = 'inline-block';\n\t\t\t\t\tinner.style.display = 'inline-block';\n\t\t\t\t\tbox.style.display = 'inline-block';\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tdiv.style.visibility = 'hidden';\n\t\t\t\tdiv.style.position = 'absolute';\n\t\t\t\tdocument.body.appendChild(div);\n\t\t\t\t\n\t\t\t\tvar sizeDiv = div;\n\t\t\t\t\n\t\t\t\tif (sizeDiv.firstChild != null && sizeDiv.firstChild.nodeName == 'DIV')\n\t\t\t\t{\n\t\t\t\t\tsizeDiv = sizeDiv.firstChild;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tvar tmp = sizeDiv.offsetWidth + 3;\n\t\t\t\tvar oh = sizeDiv.offsetHeight;\n\t\t\t\t\n\t\t\t\tif (clip)\n\t\t\t\t{\n\t\t\t\t\tw = Math.min(w, tmp);\n\t\t\t\t\toh = Math.min(oh, h);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tw = tmp;\n\t\t\t\t}\n\n\t\t\t\t// Handles words that are longer than the given wrapping width\n\t\t\t\tif (wrap)\n\t\t\t\t{\n\t\t\t\t\tdiv.style.width = w + 'px';\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// Simulates max-height in quirks\n\t\t\t\tif (mxClient.IS_QUIRKS && (clip || overflow == 'width') && oh > h)\n\t\t\t\t{\n\t\t\t\t\toh = h;\n\t\t\t\t\t\n\t\t\t\t\t// Quirks does not support maxHeight\n\t\t\t\t\tdiv.style.height = oh + 'px';\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\th = oh;\n\n\t\t\t\tvar top_fix = (h - h * cos + w * -sin) / 2 - real_sin * w * (dx + 0.5) + real_cos * h * (dy + 0.5);\n\t\t\t\tvar left_fix = (w - w * cos + h * -sin) / 2 + real_cos * w * (dx + 0.5) + real_sin * h * (dy + 0.5);\n\n\t\t\t\tif (abs.nodeName == 'group' && this.root.nodeName == 'DIV')\n\t\t\t\t{\n\t\t\t\t\t// Workaround for bug where group gets moved away if left and top are non-zero in IE8 standards\n\t\t\t\t\tvar pos = this.createElement('div');\n\t\t\t\t\tpos.style.display = 'inline-block';\n\t\t\t\t\tpos.style.position = 'absolute';\n\t\t\t\t\tpos.style.left = this.format(x + (left_fix - w / 2) * s.scale) + 'px';\n\t\t\t\t\tpos.style.top = this.format(y + (top_fix - h / 2) * s.scale) + 'px';\n\t\t\t\t\t\n\t\t\t\t\tabs.parentNode.appendChild(pos);\n\t\t\t\t\tpos.appendChild(abs);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tvar sc = (document.documentMode == 8 && !mxClient.IS_EM) ? 1 : s.scale;\n\t\t\t\t\t\n\t\t\t\t\tabs.style.left = this.format(x + (left_fix - w / 2) * sc) + 'px';\n\t\t\t\t\tabs.style.top = this.format(y + (top_fix - h / 2) * sc) + 'px';\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// KNOWN: Rotated text rendering quality is bad for IE9 quirks\n\t\t\t\tinner.style.filter = \"progid:DXImageTransform.Microsoft.Matrix(M11=\"+real_cos+\", M12=\"+\n\t\t\t\t\treal_sin+\", M21=\"+(-real_sin)+\", M22=\"+real_cos+\", sizingMethod='auto expand')\";\n\t\t\t\tinner.style.backgroundColor = this.rotatedHtmlBackground;\n\t\t\t\t\n\t\t\t\tif (this.state.alpha < 1)\n\t\t\t\t{\n\t\t\t\t\tinner.style.filter += 'alpha(opacity=' + (this.state.alpha * 100) + ')';\n\t\t\t\t}\n\n\t\t\t\t// Restore parent node for DIV\n\t\t\t\tinner.appendChild(div);\n\t\t\t\tdiv.style.position = '';\n\t\t\t\tdiv.style.visibility = '';\n\t\t\t}\n\t\t\telse if (document.documentMode != 8 || mxClient.IS_EM)\n\t\t\t{\n\t\t\t\tdiv.style.verticalAlign = 'top';\n\t\t\t\t\n\t\t\t\tif (this.state.alpha < 1)\n\t\t\t\t{\n\t\t\t\t\tabs.style.filter = 'alpha(opacity=' + (this.state.alpha * 100) + ')';\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// Adds div to document to measure size\n\t\t\t\tvar divParent = div.parentNode;\n\t\t\t\tdiv.style.visibility = 'hidden';\n\t\t\t\tdocument.body.appendChild(div);\n\t\t\t\t\n\t\t\t\tw = div.offsetWidth;\n\t\t\t\tvar oh = div.offsetHeight;\n\t\t\t\t\n\t\t\t\t// Simulates max-height in quirks\n\t\t\t\tif (mxClient.IS_QUIRKS && clip && oh > h)\n\t\t\t\t{\n\t\t\t\t\toh = h;\n\t\t\t\t\t\n\t\t\t\t\t// Quirks does not support maxHeight\n\t\t\t\t\tdiv.style.height = oh + 'px';\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\th = oh;\n\t\t\t\t\n\t\t\t\tdiv.style.visibility = '';\n\t\t\t\tdivParent.appendChild(div);\n\t\t\t\t\n\t\t\t\tabs.style.left = this.format(x + w * dx * this.state.scale) + 'px';\n\t\t\t\tabs.style.top = this.format(y + h * dy * this.state.scale) + 'px';\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif (this.state.alpha < 1)\n\t\t\t\t{\n\t\t\t\t\tdiv.style.filter = 'alpha(opacity=' + (this.state.alpha * 100) + ')';\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// Faster rendering in IE8 without offsetWidth/Height\n\t\t\t\tbox.style.left = (dx * 100) + '%';\n\t\t\t\tbox.style.top = (dy * 100) + '%';\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tthis.plainText(x, y, w, h, mxUtils.htmlEntities(str, false), align, valign, wrap, format, overflow, clip, rotation, dir);\n\t\t}\n\t}\n};\n\n/**\n * Function: plainText\n * \n * Paints the outline of the current path.\n */\nmxVmlCanvas2D.prototype.plainText = function(x, y, w, h, str, align, valign, wrap, format, overflow, clip, rotation, dir)\n{\n\t// TextDirection is ignored since this code is not used (format is always HTML in the text function)\n\tvar s = this.state;\n\tx = (x + s.dx) * s.scale;\n\ty = (y + s.dy) * s.scale;\n\t\n\tvar node = this.createVmlElement('shape');\n\tnode.style.width = '1px';\n\tnode.style.height = '1px';\n\tnode.stroked = 'false';\n\n\tvar fill = this.createVmlElement('fill');\n\tfill.color = s.fontColor;\n\tfill.opacity = (s.alpha * 100) + '%';\n\tnode.appendChild(fill);\n\t\n\tvar path = this.createVmlElement('path');\n\tpath.textpathok = 'true';\n\tpath.v = 'm ' + this.format(0) + ' ' + this.format(0) + ' l ' + this.format(1) + ' ' + this.format(0);\n\t\n\tnode.appendChild(path);\n\t\n\t// KNOWN: Font family and text decoration ignored\n\tvar tp = this.createVmlElement('textpath');\n\ttp.style.cssText = 'v-text-align:' + align;\n\ttp.style.align = align;\n\ttp.style.fontFamily = s.fontFamily;\n\ttp.string = str;\n\ttp.on = 'true';\n\t\n\t// Scale via fontsize instead of node.style.zoom for correct offsets in IE8\n\tvar size = s.fontSize * s.scale / this.vmlScale;\n\ttp.style.fontSize = size + 'px';\n\t\n\t// Bold\n\tif ((s.fontStyle & mxConstants.FONT_BOLD) == mxConstants.FONT_BOLD)\n\t{\n\t\ttp.style.fontWeight = 'bold';\n\t}\n\t\n\t// Italic\n\tif ((s.fontStyle & mxConstants.FONT_ITALIC) == mxConstants.FONT_ITALIC)\n\t{\n\t\ttp.style.fontStyle = 'italic';\n\t}\n\n\t// Underline\n\tif ((s.fontStyle & mxConstants.FONT_UNDERLINE) == mxConstants.FONT_UNDERLINE)\n\t{\n\t\ttp.style.textDecoration = 'underline';\n\t}\n\n\tvar lines = str.split('\\n');\n\tvar textHeight = size + (lines.length - 1) * size * mxConstants.LINE_HEIGHT;\n\tvar dx = 0;\n\tvar dy = 0;\n\n\tif (valign == mxConstants.ALIGN_BOTTOM)\n\t{\n\t\tdy = - textHeight / 2;\n\t}\n\telse if (valign != mxConstants.ALIGN_MIDDLE) // top\n\t{\n\t\tdy = textHeight / 2;\n\t}\n\n\tif (rotation != null)\n\t{\n\t\tnode.style.rotation = rotation;\n\t\tvar rad = rotation * (Math.PI / 180);\n\t\tdx = Math.sin(rad) * dy;\n\t\tdy = Math.cos(rad) * dy;\n\t}\n\n\t// FIXME: Clipping is relative to bounding box\n\t/*if (clip)\n\t{\n\t\tnode.style.clip = 'rect(0px ' + this.format(w) + 'px ' + this.format(h) + 'px 0px)';\n\t}*/\n\t\n\tnode.appendChild(tp);\n\tnode.style.left = this.format(x - dx) + 'px';\n\tnode.style.top = this.format(y + dy) + 'px';\n\t\n\tthis.root.appendChild(node);\n};\n\n/**\n * Function: stroke\n * \n * Paints the outline of the current path.\n */\nmxVmlCanvas2D.prototype.stroke = function()\n{\n\tthis.addNode(false, true);\n};\n\n/**\n * Function: fill\n * \n * Fills the current path.\n */\nmxVmlCanvas2D.prototype.fill = function()\n{\n\tthis.addNode(true, false);\n};\n\n/**\n * Function: fillAndStroke\n * \n * Fills and paints the outline of the current path.\n */\nmxVmlCanvas2D.prototype.fillAndStroke = function()\n{\n\tthis.addNode(true, true);\n};\n"
  },
  {
    "path": "static/cherry/drawio_demo/src/js/util/mxWindow.js",
    "content": "/**\n * Copyright (c) 2006-2015, JGraph Ltd\n * Copyright (c) 2006-2015, Gaudenz Alder\n */\n/**\n * Class: mxWindow\n * \n * Basic window inside a document.\n * \n * Examples:\n * \n * Creating a simple window.\n *\n * (code)\n * var tb = document.createElement('div');\n * var wnd = new mxWindow('Title', tb, 100, 100, 200, 200, true, true);\n * wnd.setVisible(true); \n * (end)\n *\n * Creating a window that contains an iframe. \n * \n * (code)\n * var frame = document.createElement('iframe');\n * frame.setAttribute('width', '192px');\n * frame.setAttribute('height', '172px');\n * frame.setAttribute('src', 'http://www.example.com/');\n * frame.style.backgroundColor = 'white';\n * \n * var w = document.body.clientWidth;\n * var h = (document.body.clientHeight || document.documentElement.clientHeight);\n * var wnd = new mxWindow('Title', frame, (w-200)/2, (h-200)/3, 200, 200);\n * wnd.setVisible(true);\n * (end)\n * \n * To limit the movement of a window, eg. to keep it from being moved beyond\n * the top, left corner the following method can be overridden (recommended):\n * \n * (code)\n * wnd.setLocation = function(x, y)\n * {\n *   x = Math.max(0, x);\n *   y = Math.max(0, y);\n *   mxWindow.prototype.setLocation.apply(this, arguments);\n * };\n * (end)\n * \n * Or the following event handler can be used:\n * \n * (code)\n * wnd.addListener(mxEvent.MOVE, function(e)\n * {\n *   wnd.setLocation(Math.max(0, wnd.getX()), Math.max(0, wnd.getY()));\n * });\n * (end)\n * \n * To keep a window inside the current window:\n * \n * (code)\n * mxEvent.addListener(window, 'resize', mxUtils.bind(this, function()\n * {\n *   var iw = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth;\n *   var ih = window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight;\n *   \n *   var x = this.window.getX();\n *   var y = this.window.getY();\n *   \n *   if (x + this.window.table.clientWidth > iw)\n *   {\n *     x = Math.max(0, iw - this.window.table.clientWidth);\n *   }\n *   \n *   if (y + this.window.table.clientHeight > ih)\n *   {\n *     y = Math.max(0, ih - this.window.table.clientHeight);\n *   }\n *   \n *   if (this.window.getX() != x || this.window.getY() != y)\n *   {\n *     this.window.setLocation(x, y);\n *   }\n * }));\n * (end)\n *\n * Event: mxEvent.MOVE_START\n *\n * Fires before the window is moved. The <code>event</code> property contains\n * the corresponding mouse event.\n *\n * Event: mxEvent.MOVE\n *\n * Fires while the window is being moved. The <code>event</code> property\n * contains the corresponding mouse event.\n *\n * Event: mxEvent.MOVE_END\n *\n * Fires after the window is moved. The <code>event</code> property contains\n * the corresponding mouse event.\n *\n * Event: mxEvent.RESIZE_START\n *\n * Fires before the window is resized. The <code>event</code> property contains\n * the corresponding mouse event.\n *\n * Event: mxEvent.RESIZE\n *\n * Fires while the window is being resized. The <code>event</code> property\n * contains the corresponding mouse event.\n *\n * Event: mxEvent.RESIZE_END\n *\n * Fires after the window is resized. The <code>event</code> property contains\n * the corresponding mouse event.\n *\n * Event: mxEvent.MAXIMIZE\n * \n * Fires after the window is maximized. The <code>event</code> property\n * contains the corresponding mouse event.\n * \n * Event: mxEvent.MINIMIZE\n * \n * Fires after the window is minimized. The <code>event</code> property\n * contains the corresponding mouse event.\n * \n * Event: mxEvent.NORMALIZE\n * \n * Fires after the window is normalized, that is, it returned from\n * maximized or minimized state. The <code>event</code> property contains the\n * corresponding mouse event.\n *  \n * Event: mxEvent.ACTIVATE\n * \n * Fires after a window is activated. The <code>previousWindow</code> property\n * contains the previous window. The event sender is the active window.\n * \n * Event: mxEvent.SHOW\n * \n * Fires after the window is shown. This event has no properties.\n * \n * Event: mxEvent.HIDE\n * \n * Fires after the window is hidden. This event has no properties.\n * \n * Event: mxEvent.CLOSE\n * \n * Fires before the window is closed. The <code>event</code> property contains\n * the corresponding mouse event.\n * \n * Event: mxEvent.DESTROY\n * \n * Fires before the window is destroyed. This event has no properties.\n * \n * Constructor: mxWindow\n * \n * Constructs a new window with the given dimension and title to display\n * the specified content. The window elements use the given style as a\n * prefix for the classnames of the respective window elements, namely,\n * the window title and window pane. The respective postfixes are appended\n * to the given stylename as follows:\n * \n *   style - Base style for the window.\n *   style+Title - Style for the window title.\n *   style+Pane - Style for the window pane.\n * \n * The default value for style is mxWindow, resulting in the following\n * classnames for the window elements: mxWindow, mxWindowTitle and\n * mxWindowPane.\n * \n * If replaceNode is given then the window replaces the given DOM node in\n * the document.\n * \n * Parameters:\n * \n * title - String that represents the title of the new window.\n * content - DOM node that is used as the window content.\n * x - X-coordinate of the window location.\n * y - Y-coordinate of the window location.\n * width - Width of the window.\n * height - Optional height of the window. Default is to match the height\n * of the content at the specified width.\n * minimizable - Optional boolean indicating if the window is minimizable.\n * Default is true.\n * movable - Optional boolean indicating if the window is movable. Default\n * is true.\n * replaceNode - Optional DOM node that the window should replace.\n * style - Optional base classname for the window elements. Default is\n * mxWindow.\n */\nfunction mxWindow(title, content, x, y, width, height, minimizable, movable, replaceNode, style)\n{\n\tif (content != null)\n\t{\n\t\tminimizable = (minimizable != null) ? minimizable : true;\n\t\tthis.content = content;\n\t\tthis.init(x, y, width, height, style);\n\t\t\n\t\tthis.installMaximizeHandler();\n\t\tthis.installMinimizeHandler();\n\t\tthis.installCloseHandler();\n\t\tthis.setMinimizable(minimizable);\n\t\tthis.setTitle(title);\n\t\t\n\t\tif (movable == null || movable)\n\t\t{\n\t\t\tthis.installMoveHandler();\n\t\t}\n\n\t\tif (replaceNode != null && replaceNode.parentNode != null)\n\t\t{\n\t\t\treplaceNode.parentNode.replaceChild(this.div, replaceNode);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tdocument.body.appendChild(this.div);\n\t\t}\n\t}\n};\n\n/**\n * Extends mxEventSource.\n */\nmxWindow.prototype = new mxEventSource();\nmxWindow.prototype.constructor = mxWindow;\n\n/**\n * Variable: closeImage\n * \n * URL of the image to be used for the close icon in the titlebar.\n */\nmxWindow.prototype.closeImage = mxClient.imageBasePath + '/close.gif';\n\n/**\n * Variable: minimizeImage\n * \n * URL of the image to be used for the minimize icon in the titlebar.\n */\nmxWindow.prototype.minimizeImage = mxClient.imageBasePath + '/minimize.gif';\n\t\n/**\n * Variable: normalizeImage\n * \n * URL of the image to be used for the normalize icon in the titlebar.\n */\nmxWindow.prototype.normalizeImage = mxClient.imageBasePath + '/normalize.gif';\n\t\n/**\n * Variable: maximizeImage\n * \n * URL of the image to be used for the maximize icon in the titlebar.\n */\nmxWindow.prototype.maximizeImage = mxClient.imageBasePath + '/maximize.gif';\n\n/**\n * Variable: normalizeImage\n * \n * URL of the image to be used for the resize icon.\n */\nmxWindow.prototype.resizeImage = mxClient.imageBasePath + '/resize.gif';\n\n/**\n * Variable: visible\n * \n * Boolean flag that represents the visible state of the window.\n */\nmxWindow.prototype.visible = false;\n\n/**\n * Variable: minimumSize\n * \n * <mxRectangle> that specifies the minimum width and height of the window.\n * Default is (50, 40).\n */\nmxWindow.prototype.minimumSize = new mxRectangle(0, 0, 50, 40);\n\n/**\n * Variable: destroyOnClose\n * \n * Specifies if the window should be destroyed when it is closed. If this\n * is false then the window is hidden using <setVisible>. Default is true.\n */\nmxWindow.prototype.destroyOnClose = true;\n\n/**\n * Variable: contentHeightCorrection\n * \n * Defines the correction factor for computing the height of the contentWrapper.\n * Default is 6 for IE 7/8 standards mode and 2 for all other browsers and modes.\n */\nmxWindow.prototype.contentHeightCorrection = (document.documentMode == 8 || document.documentMode == 7) ? 6 : 2;\n\n/**\n * Variable: title\n * \n * Reference to the DOM node (TD) that contains the title.\n */\nmxWindow.prototype.title = null;\n\n/**\n * Variable: content\n * \n * Reference to the DOM node that represents the window content.\n */\nmxWindow.prototype.content = null;\n\n/**\n * Function: init\n * \n * Initializes the DOM tree that represents the window.\n */\nmxWindow.prototype.init = function(x, y, width, height, style)\n{\n\tstyle = (style != null) ? style : 'mxWindow';\n\t\n\tthis.div = document.createElement('div');\n\tthis.div.className = style;\n\n\tthis.div.style.left = x + 'px';\n\tthis.div.style.top = y + 'px';\n\tthis.table = document.createElement('table');\n\tthis.table.className = style;\n\n\t// Disables built-in pan and zoom in IE10 and later\n\tif (mxClient.IS_POINTER)\n\t{\n\t\tthis.div.style.touchAction = 'none';\n\t}\n\t\n\t// Workaround for table size problems in FF\n\tif (width != null)\n\t{\n\t\tif (!mxClient.IS_QUIRKS)\n\t\t{\n\t\t\tthis.div.style.width = width + 'px'; \n\t\t}\n\t\t\n\t\tthis.table.style.width = width + 'px';\n\t} \n\t\n\tif (height != null)\n\t{\n\t\tif (!mxClient.IS_QUIRKS)\n\t\t{\n\t\t\tthis.div.style.height = height + 'px';\n\t\t}\n\t\t\n\t\tthis.table.style.height = height + 'px';\n\t}\t\t\n\t\n\t// Creates title row\n\tvar tbody = document.createElement('tbody');\n\tvar tr = document.createElement('tr');\n\t\n\tthis.title = document.createElement('td');\n\tthis.title.className = style + 'Title';\n\t\n\tthis.buttons = document.createElement('div');\n\tthis.buttons.style.position = 'absolute';\n\tthis.buttons.style.display = 'inline-block';\n\tthis.buttons.style.right = '4px';\n\tthis.buttons.style.top = '5px';\n\tthis.title.appendChild(this.buttons);\n\t\n\ttr.appendChild(this.title);\n\ttbody.appendChild(tr);\n\t\n\t// Creates content row and table cell\n\ttr = document.createElement('tr');\n\tthis.td = document.createElement('td');\n\tthis.td.className = style + 'Pane';\n\t\n\tif (document.documentMode == 7)\n\t{\n\t\tthis.td.style.height = '100%';\n\t}\n\n\tthis.contentWrapper = document.createElement('div');\n\tthis.contentWrapper.className = style + 'Pane';\n\tthis.contentWrapper.style.width = '100%';\n\tthis.contentWrapper.appendChild(this.content);\n\n\t// Workaround for div around div restricts height\n\t// of inner div if outerdiv has hidden overflow\n\tif (mxClient.IS_QUIRKS || this.content.nodeName.toUpperCase() != 'DIV')\n\t{\n\t\tthis.contentWrapper.style.height = '100%';\n\t}\n\n\t// Puts all content into the DOM\n\tthis.td.appendChild(this.contentWrapper);\n\ttr.appendChild(this.td);\n\ttbody.appendChild(tr);\n\tthis.table.appendChild(tbody);\n\tthis.div.appendChild(this.table);\n\t\n\t// Puts the window on top of other windows when clicked\n\tvar activator = mxUtils.bind(this, function(evt)\n\t{\n\t\tthis.activate();\n\t});\n\t\n\tmxEvent.addGestureListeners(this.title, activator);\n\tmxEvent.addGestureListeners(this.table, activator);\n\n\tthis.hide();\n};\n\n/**\n * Function: setTitle\n * \n * Sets the window title to the given string. HTML markup inside the title\n * will be escaped.\n */\nmxWindow.prototype.setTitle = function(title)\n{\n\t// Removes all text content nodes (normally just one)\n\tvar child = this.title.firstChild;\n\t\n\twhile (child != null)\n\t{\n\t\tvar next = child.nextSibling;\n\t\t\n\t\tif (child.nodeType == mxConstants.NODETYPE_TEXT)\n\t\t{\n\t\t\tchild.parentNode.removeChild(child);\n\t\t}\n\t\t\n\t\tchild = next;\n\t}\n\t\n\tmxUtils.write(this.title, title || '');\n\tthis.title.appendChild(this.buttons);\n};\n\n/**\n * Function: setScrollable\n * \n * Sets if the window contents should be scrollable.\n */\nmxWindow.prototype.setScrollable = function(scrollable)\n{\n\t// Workaround for hang in Presto 2.5.22 (Opera 10.5)\n\tif (navigator.userAgent.indexOf('Presto/2.5') < 0)\n\t{\n\t\tif (scrollable)\n\t\t{\n\t\t\tthis.contentWrapper.style.overflow = 'auto';\n\t\t}\n\t\telse\n\t\t{\n\t\t\tthis.contentWrapper.style.overflow = 'hidden';\n\t\t}\n\t}\n};\n\n/**\n * Function: activate\n * \n * Puts the window on top of all other windows.\n */\nmxWindow.prototype.activate = function()\n{\n\tif (mxWindow.activeWindow != this)\n\t{\n\t\tvar style = mxUtils.getCurrentStyle(this.getElement());\n\t\tvar index = (style != null) ? style.zIndex : 3;\n\n\t\tif (mxWindow.activeWindow)\n\t\t{\n\t\t\tvar elt = mxWindow.activeWindow.getElement();\n\t\t\t\n\t\t\tif (elt != null && elt.style != null)\n\t\t\t{\n\t\t\t\telt.style.zIndex = index;\n\t\t\t}\n\t\t}\n\t\t\n\t\tvar previousWindow = mxWindow.activeWindow;\n\t\tthis.getElement().style.zIndex = parseInt(index) + 1;\n\t\tmxWindow.activeWindow = this;\n\t\t\n\t\tthis.fireEvent(new mxEventObject(mxEvent.ACTIVATE, 'previousWindow', previousWindow));\n\t}\n};\n\n/**\n * Function: getElement\n * \n * Returuns the outermost DOM node that makes up the window.\n */\nmxWindow.prototype.getElement = function()\n{\n\treturn this.div;\n};\n\n/**\n * Function: fit\n * \n * Makes sure the window is inside the client area of the window.\n */\nmxWindow.prototype.fit = function()\n{\n\tmxUtils.fit(this.div);\n};\n\n/**\n * Function: isResizable\n * \n * Returns true if the window is resizable.\n */\nmxWindow.prototype.isResizable = function()\n{\n\tif (this.resize != null)\n\t{\n\t\treturn this.resize.style.display != 'none';\n\t}\n\t\n\treturn false;\n};\n\n/**\n * Function: setResizable\n * \n * Sets if the window should be resizable. To avoid interference with some\n * built-in features of IE10 and later, the use of the following code is\n * recommended if there are resizable <mxWindow>s in the page:\n * \n * (code)\n * if (mxClient.IS_POINTER)\n * {\n *   document.body.style.msTouchAction = 'none';\n * }\n * (end)\n */\nmxWindow.prototype.setResizable = function(resizable)\n{\n\tif (resizable)\n\t{\n\t\tif (this.resize == null)\n\t\t{\n\t\t\tthis.resize = document.createElement('img');\n\t\t\tthis.resize.style.position = 'absolute';\n\t\t\tthis.resize.style.bottom = '2px';\n\t\t\tthis.resize.style.right = '2px';\n\n\t\t\tthis.resize.setAttribute('src', this.resizeImage);\n\t\t\tthis.resize.style.cursor = 'nw-resize';\n\t\t\t\n\t\t\tvar startX = null;\n\t\t\tvar startY = null;\n\t\t\tvar width = null;\n\t\t\tvar height = null;\n\t\t\t\n\t\t\tvar start = mxUtils.bind(this, function(evt)\n\t\t\t{\n\t\t\t\t// LATER: pointerdown starting on border of resize does start\n\t\t\t\t// the drag operation but does not fire consecutive events via\n\t\t\t\t// one of the listeners below (does pan instead).\n\t\t\t\t// Workaround: document.body.style.msTouchAction = 'none'\n\t\t\t\tthis.activate();\n\t\t\t\tstartX = mxEvent.getClientX(evt);\n\t\t\t\tstartY = mxEvent.getClientY(evt);\n\t\t\t\twidth = this.div.offsetWidth;\n\t\t\t\theight = this.div.offsetHeight;\n\t\t\t\t\n\t\t\t\tmxEvent.addGestureListeners(document, null, dragHandler, dropHandler);\n\t\t\t\tthis.fireEvent(new mxEventObject(mxEvent.RESIZE_START, 'event', evt));\n\t\t\t\tmxEvent.consume(evt);\n\t\t\t});\n\n\t\t\t// Adds a temporary pair of listeners to intercept\n\t\t\t// the gesture event in the document\n\t\t\tvar dragHandler = mxUtils.bind(this, function(evt)\n\t\t\t{\n\t\t\t\tif (startX != null && startY != null)\n\t\t\t\t{\n\t\t\t\t\tvar dx = mxEvent.getClientX(evt) - startX;\n\t\t\t\t\tvar dy = mxEvent.getClientY(evt) - startY;\n\t\n\t\t\t\t\tthis.setSize(width + dx, height + dy);\n\t\n\t\t\t\t\tthis.fireEvent(new mxEventObject(mxEvent.RESIZE, 'event', evt));\n\t\t\t\t\tmxEvent.consume(evt);\n\t\t\t\t}\n\t\t\t});\n\t\t\t\n\t\t\tvar dropHandler = mxUtils.bind(this, function(evt)\n\t\t\t{\n\t\t\t\tif (startX != null && startY != null)\n\t\t\t\t{\n\t\t\t\t\tstartX = null;\n\t\t\t\t\tstartY = null;\n\t\t\t\t\tmxEvent.removeGestureListeners(document, null, dragHandler, dropHandler);\n\t\t\t\t\tthis.fireEvent(new mxEventObject(mxEvent.RESIZE_END, 'event', evt));\n\t\t\t\t\tmxEvent.consume(evt);\n\t\t\t\t}\n\t\t\t});\n\t\t\t\n\t\t\tmxEvent.addGestureListeners(this.resize, start, dragHandler, dropHandler);\n\t\t\tthis.div.appendChild(this.resize);\n\t\t}\n\t\telse \n\t\t{\n\t\t\tthis.resize.style.display = 'inline';\n\t\t}\n\t}\n\telse if (this.resize != null)\n\t{\n\t\tthis.resize.style.display = 'none';\n\t}\n};\n\t\n/**\n * Function: setSize\n * \n * Sets the size of the window.\n */\nmxWindow.prototype.setSize = function(width, height)\n{\n\twidth = Math.max(this.minimumSize.width, width);\n\theight = Math.max(this.minimumSize.height, height);\n\n\t// Workaround for table size problems in FF\n\tif (!mxClient.IS_QUIRKS)\n\t{\n\t\tthis.div.style.width =  width + 'px';\n\t\tthis.div.style.height = height + 'px';\n\t}\n\t\n\tthis.table.style.width =  width + 'px';\n\tthis.table.style.height = height + 'px';\n\n\tif (!mxClient.IS_QUIRKS)\n\t{\n\t\tthis.contentWrapper.style.height = (this.div.offsetHeight -\n\t\t\tthis.title.offsetHeight - this.contentHeightCorrection) + 'px';\n\t}\n};\n\t\n/**\n * Function: setMinimizable\n * \n * Sets if the window is minimizable.\n */\nmxWindow.prototype.setMinimizable = function(minimizable)\n{\n\tthis.minimize.style.display = (minimizable) ? '' : 'none';\n};\n\n/**\n * Function: getMinimumSize\n * \n * Returns an <mxRectangle> that specifies the size for the minimized window.\n * A width or height of 0 means keep the existing width or height. This\n * implementation returns the height of the window title and keeps the width.\n */\nmxWindow.prototype.getMinimumSize = function()\n{\n\treturn new mxRectangle(0, 0, 0, this.title.offsetHeight);\n};\n\n/**\n * Function: installMinimizeHandler\n * \n * Installs the event listeners required for minimizing the window.\n */\nmxWindow.prototype.installMinimizeHandler = function()\n{\n\tthis.minimize = document.createElement('img');\n\t\n\tthis.minimize.setAttribute('src', this.minimizeImage);\n\tthis.minimize.setAttribute('title', 'Minimize');\n\tthis.minimize.style.cursor = 'pointer';\n\tthis.minimize.style.marginLeft = '2px';\n\tthis.minimize.style.display = 'none';\n\t\n\tthis.buttons.appendChild(this.minimize);\n\t\n\tvar minimized = false;\n\tvar maxDisplay = null;\n\tvar height = null;\n\n\tvar funct = mxUtils.bind(this, function(evt)\n\t{\n\t\tthis.activate();\n\t\t\n\t\tif (!minimized)\n\t\t{\n\t\t\tminimized = true;\n\t\t\t\n\t\t\tthis.minimize.setAttribute('src', this.normalizeImage);\n\t\t\tthis.minimize.setAttribute('title', 'Normalize');\n\t\t\tthis.contentWrapper.style.display = 'none';\n\t\t\tmaxDisplay = this.maximize.style.display;\n\t\t\t\n\t\t\tthis.maximize.style.display = 'none';\n\t\t\theight = this.table.style.height;\n\t\t\t\n\t\t\tvar minSize = this.getMinimumSize();\n\t\t\t\n\t\t\tif (minSize.height > 0)\n\t\t\t{\n\t\t\t\tif (!mxClient.IS_QUIRKS)\n\t\t\t\t{\n\t\t\t\t\tthis.div.style.height = minSize.height + 'px';\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tthis.table.style.height = minSize.height + 'px';\n\t\t\t}\n\t\t\t\n\t\t\tif (minSize.width > 0)\n\t\t\t{\n\t\t\t\tif (!mxClient.IS_QUIRKS)\n\t\t\t\t{\n\t\t\t\t\tthis.div.style.width = minSize.width + 'px';\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tthis.table.style.width = minSize.width + 'px';\n\t\t\t}\n\t\t\t\n\t\t\tif (this.resize != null)\n\t\t\t{\n\t\t\t\tthis.resize.style.visibility = 'hidden';\n\t\t\t}\n\t\t\t\n\t\t\tthis.fireEvent(new mxEventObject(mxEvent.MINIMIZE, 'event', evt));\n\t\t}\n\t\telse\n\t\t{\n\t\t\tminimized = false;\n\t\t\t\n\t\t\tthis.minimize.setAttribute('src', this.minimizeImage);\n\t\t\tthis.minimize.setAttribute('title', 'Minimize');\n\t\t\tthis.contentWrapper.style.display = ''; // default\n\t\t\tthis.maximize.style.display = maxDisplay;\n\t\t\t\n\t\t\tif (!mxClient.IS_QUIRKS)\n\t\t\t{\n\t\t\t\tthis.div.style.height = height;\n\t\t\t}\n\t\t\t\n\t\t\tthis.table.style.height = height;\n\n\t\t\tif (this.resize != null)\n\t\t\t{\n\t\t\t\tthis.resize.style.visibility = '';\n\t\t\t}\n\t\t\t\n\t\t\tthis.fireEvent(new mxEventObject(mxEvent.NORMALIZE, 'event', evt));\n\t\t}\n\t\t\n\t\tmxEvent.consume(evt);\n\t});\n\t\n\tmxEvent.addGestureListeners(this.minimize, funct);\n};\n\t\n/**\n * Function: setMaximizable\n * \n * Sets if the window is maximizable.\n */\nmxWindow.prototype.setMaximizable = function(maximizable)\n{\n\tthis.maximize.style.display = (maximizable) ? '' : 'none';\n};\n\n/**\n * Function: installMaximizeHandler\n * \n * Installs the event listeners required for maximizing the window.\n */\nmxWindow.prototype.installMaximizeHandler = function()\n{\n\tthis.maximize = document.createElement('img');\n\t\n\tthis.maximize.setAttribute('src', this.maximizeImage);\n\tthis.maximize.setAttribute('title', 'Maximize');\n\tthis.maximize.style.cursor = 'default';\n\tthis.maximize.style.marginLeft = '2px';\n\tthis.maximize.style.cursor = 'pointer';\n\tthis.maximize.style.display = 'none';\n\t\n\tthis.buttons.appendChild(this.maximize);\n\t\n\tvar maximized = false;\n\tvar x = null;\n\tvar y = null;\n\tvar height = null;\n\tvar width = null;\n\tvar minDisplay = null;\n\n\tvar funct = mxUtils.bind(this, function(evt)\n\t{\n\t\tthis.activate();\n\t\t\n\t\tif (this.maximize.style.display != 'none')\n\t\t{\n\t\t\tif (!maximized)\n\t\t\t{\n\t\t\t\tmaximized = true;\n\t\t\t\t\n\t\t\t\tthis.maximize.setAttribute('src', this.normalizeImage);\n\t\t\t\tthis.maximize.setAttribute('title', 'Normalize');\n\t\t\t\tthis.contentWrapper.style.display = '';\n\t\t\t\tminDisplay = this.minimize.style.display;\n\t\t\t\tthis.minimize.style.display = 'none';\n\t\t\t\t\n\t\t\t\t// Saves window state\n\t\t\t\tx = parseInt(this.div.style.left);\n\t\t\t\ty = parseInt(this.div.style.top);\n\t\t\t\theight = this.table.style.height;\n\t\t\t\twidth = this.table.style.width;\n\n\t\t\t\tthis.div.style.left = '0px';\n\t\t\t\tthis.div.style.top = '0px';\n\t\t\t\tvar docHeight = Math.max(document.body.clientHeight || 0, document.documentElement.clientHeight || 0);\n\n\t\t\t\tif (!mxClient.IS_QUIRKS)\n\t\t\t\t{\n\t\t\t\t\tthis.div.style.width = (document.body.clientWidth - 2) + 'px';\n\t\t\t\t\tthis.div.style.height = (docHeight - 2) + 'px';\n\t\t\t\t}\n\n\t\t\t\tthis.table.style.width = (document.body.clientWidth - 2) + 'px';\n\t\t\t\tthis.table.style.height = (docHeight - 2) + 'px';\n\t\t\t\t\n\t\t\t\tif (this.resize != null)\n\t\t\t\t{\n\t\t\t\t\tthis.resize.style.visibility = 'hidden';\n\t\t\t\t}\n\n\t\t\t\tif (!mxClient.IS_QUIRKS)\n\t\t\t\t{\n\t\t\t\t\tvar style = mxUtils.getCurrentStyle(this.contentWrapper);\n\t\t\n\t\t\t\t\tif (style.overflow == 'auto' || this.resize != null)\n\t\t\t\t\t{\n\t\t\t\t\t\tthis.contentWrapper.style.height = (this.div.offsetHeight -\n\t\t\t\t\t\t\tthis.title.offsetHeight - this.contentHeightCorrection) + 'px';\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tthis.fireEvent(new mxEventObject(mxEvent.MAXIMIZE, 'event', evt));\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tmaximized = false;\n\t\t\t\t\n\t\t\t\tthis.maximize.setAttribute('src', this.maximizeImage);\n\t\t\t\tthis.maximize.setAttribute('title', 'Maximize');\n\t\t\t\tthis.contentWrapper.style.display = '';\n\t\t\t\tthis.minimize.style.display = minDisplay;\n\n\t\t\t\t// Restores window state\n\t\t\t\tthis.div.style.left = x+'px';\n\t\t\t\tthis.div.style.top = y+'px';\n\t\t\t\t\n\t\t\t\tif (!mxClient.IS_QUIRKS)\n\t\t\t\t{\n\t\t\t\t\tthis.div.style.height = height;\n\t\t\t\t\tthis.div.style.width = width;\n\n\t\t\t\t\tvar style = mxUtils.getCurrentStyle(this.contentWrapper);\n\t\t\n\t\t\t\t\tif (style.overflow == 'auto' || this.resize != null)\n\t\t\t\t\t{\n\t\t\t\t\t\tthis.contentWrapper.style.height = (this.div.offsetHeight -\n\t\t\t\t\t\t\tthis.title.offsetHeight - this.contentHeightCorrection) + 'px';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tthis.table.style.height = height;\n\t\t\t\tthis.table.style.width = width;\n\n\t\t\t\tif (this.resize != null)\n\t\t\t\t{\n\t\t\t\t\tthis.resize.style.visibility = '';\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tthis.fireEvent(new mxEventObject(mxEvent.NORMALIZE, 'event', evt));\n\t\t\t}\n\t\t\t\n\t\t\tmxEvent.consume(evt);\n\t\t}\n\t});\n\t\n\tmxEvent.addGestureListeners(this.maximize, funct);\n\tmxEvent.addListener(this.title, 'dblclick', funct);\n};\n\t\n/**\n * Function: installMoveHandler\n * \n * Installs the event listeners required for moving the window.\n */\nmxWindow.prototype.installMoveHandler = function()\n{\n\tthis.title.style.cursor = 'move';\n\t\n\tmxEvent.addGestureListeners(this.title,\n\t\tmxUtils.bind(this, function(evt)\n\t\t{\n\t\t\tvar startX = mxEvent.getClientX(evt);\n\t\t\tvar startY = mxEvent.getClientY(evt);\n\t\t\tvar x = this.getX();\n\t\t\tvar y = this.getY();\n\t\t\t\t\t\t\n\t\t\t// Adds a temporary pair of listeners to intercept\n\t\t\t// the gesture event in the document\n\t\t\tvar dragHandler = mxUtils.bind(this, function(evt)\n\t\t\t{\n\t\t\t\tvar dx = mxEvent.getClientX(evt) - startX;\n\t\t\t\tvar dy = mxEvent.getClientY(evt) - startY;\n\t\t\t\tthis.setLocation(x + dx, y + dy);\n\t\t\t\tthis.fireEvent(new mxEventObject(mxEvent.MOVE, 'event', evt));\n\t\t\t\tmxEvent.consume(evt);\n\t\t\t});\n\t\t\t\n\t\t\tvar dropHandler = mxUtils.bind(this, function(evt)\n\t\t\t{\n\t\t\t\tmxEvent.removeGestureListeners(document, null, dragHandler, dropHandler);\n\t\t\t\tthis.fireEvent(new mxEventObject(mxEvent.MOVE_END, 'event', evt));\n\t\t\t\tmxEvent.consume(evt);\n\t\t\t});\n\t\t\t\n\t\t\tmxEvent.addGestureListeners(document, null, dragHandler, dropHandler);\n\t\t\tthis.fireEvent(new mxEventObject(mxEvent.MOVE_START, 'event', evt));\n\t\t\tmxEvent.consume(evt);\n\t\t}));\n\t\n\t// Disables built-in pan and zoom in IE10 and later\n\tif (mxClient.IS_POINTER)\n\t{\n\t\tthis.title.style.touchAction = 'none';\n\t}\n};\n\n/**\n * Function: setLocation\n * \n * Sets the upper, left corner of the window.\n */\n mxWindow.prototype.setLocation = function(x, y)\n {\n\tthis.div.style.left = x + 'px';\n\tthis.div.style.top = y + 'px';\n };\n\n/**\n * Function: getX\n *\n * Returns the current position on the x-axis.\n */\nmxWindow.prototype.getX = function()\n{\n\treturn parseInt(this.div.style.left);\n};\n\n/**\n * Function: getY\n *\n * Returns the current position on the y-axis.\n */\nmxWindow.prototype.getY = function()\n{\n\treturn parseInt(this.div.style.top);\n};\n\n/**\n * Function: installCloseHandler\n *\n * Adds the <closeImage> as a new image node in <closeImg> and installs the\n * <close> event.\n */\nmxWindow.prototype.installCloseHandler = function()\n{\n\tthis.closeImg = document.createElement('img');\n\t\n\tthis.closeImg.setAttribute('src', this.closeImage);\n\tthis.closeImg.setAttribute('title', 'Close');\n\tthis.closeImg.style.marginLeft = '2px';\n\tthis.closeImg.style.cursor = 'pointer';\n\tthis.closeImg.style.display = 'none';\n\t\n\tthis.buttons.appendChild(this.closeImg);\n\n\tmxEvent.addGestureListeners(this.closeImg,\n\t\tmxUtils.bind(this, function(evt)\n\t\t{\n\t\t\tthis.fireEvent(new mxEventObject(mxEvent.CLOSE, 'event', evt));\n\t\t\t\n\t\t\tif (this.destroyOnClose)\n\t\t\t{\n\t\t\t\tthis.destroy();\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tthis.setVisible(false);\n\t\t\t}\n\t\t\t\n\t\t\tmxEvent.consume(evt);\n\t\t}));\n};\n\n/**\n * Function: setImage\n * \n * Sets the image associated with the window.\n * \n * Parameters:\n * \n * image - URL of the image to be used.\n */\nmxWindow.prototype.setImage = function(image)\n{\n\tthis.image = document.createElement('img');\n\tthis.image.setAttribute('src', image);\n\tthis.image.setAttribute('align', 'left');\n\tthis.image.style.marginRight = '4px';\n\tthis.image.style.marginLeft = '0px';\n\tthis.image.style.marginTop = '-2px';\n\t\n\tthis.title.insertBefore(this.image, this.title.firstChild);\n};\n\n/**\n * Function: setClosable\n * \n * Sets the image associated with the window.\n * \n * Parameters:\n * \n * closable - Boolean specifying if the window should be closable.\n */\nmxWindow.prototype.setClosable = function(closable)\n{\n\tthis.closeImg.style.display = (closable) ? '' : 'none';\n};\n\n/**\n * Function: isVisible\n * \n * Returns true if the window is visible.\n */\nmxWindow.prototype.isVisible = function()\n{\n\tif (this.div != null)\n\t{\n\t\treturn this.div.style.display != 'none';\n\t}\n\t\n\treturn false;\n};\n\n/**\n * Function: setVisible\n *\n * Shows or hides the window depending on the given flag.\n * \n * Parameters:\n * \n * visible - Boolean indicating if the window should be made visible.\n */\nmxWindow.prototype.setVisible = function(visible)\n{\n\tif (this.div != null && this.isVisible() != visible)\n\t{\n\t\tif (visible)\n\t\t{\n\t\t\tthis.show();\n\t\t}\n\t\telse\n\t\t{\n\t\t\tthis.hide();\n\t\t}\n\t}\n};\n\n/**\n * Function: show\n *\n * Shows the window.\n */\nmxWindow.prototype.show = function()\n{\n\tthis.div.style.display = '';\n\tthis.activate();\n\t\n\tvar style = mxUtils.getCurrentStyle(this.contentWrapper);\n\t\n\tif (!mxClient.IS_QUIRKS && (style.overflow == 'auto' || this.resize != null) &&\n\t\tthis.contentWrapper.style.display != 'none')\n\t{\n\t\tthis.contentWrapper.style.height = (this.div.offsetHeight -\n\t\t\t\tthis.title.offsetHeight - this.contentHeightCorrection) + 'px';\n\t}\n\t\n\tthis.fireEvent(new mxEventObject(mxEvent.SHOW));\n};\n\n/**\n * Function: hide\n *\n * Hides the window.\n */\nmxWindow.prototype.hide = function()\n{\n\tthis.div.style.display = 'none';\n\tthis.fireEvent(new mxEventObject(mxEvent.HIDE));\n};\n\n/**\n * Function: destroy\n *\n * Destroys the window and removes all associated resources. Fires a\n * <destroy> event prior to destroying the window.\n */\nmxWindow.prototype.destroy = function()\n{\n\tthis.fireEvent(new mxEventObject(mxEvent.DESTROY));\n\t\n\tif (this.div != null)\n\t{\n\t\tmxEvent.release(this.div);\n\t\tthis.div.parentNode.removeChild(this.div);\n\t\tthis.div = null;\n\t}\n\t\n\tthis.title = null;\n\tthis.content = null;\n\tthis.contentWrapper = null;\n};\n"
  },
  {
    "path": "static/cherry/drawio_demo/src/js/util/mxXmlCanvas2D.js",
    "content": "/**\n * Copyright (c) 2006-2015, JGraph Ltd\n * Copyright (c) 2006-2015, Gaudenz Alder\n */\n/**\n * Class: mxXmlCanvas2D\n *\n * Base class for all canvases. The following methods make up the public\n * interface of the canvas 2D for all painting in mxGraph:\n * \n * - <save>, <restore>\n * - <scale>, <translate>, <rotate>\n * - <setAlpha>, <setFillAlpha>, <setStrokeAlpha>, <setFillColor>, <setGradient>,\n *   <setStrokeColor>, <setStrokeWidth>, <setDashed>, <setDashPattern>, <setLineCap>, \n *   <setLineJoin>, <setMiterLimit>\n * - <setFontColor>, <setFontBackgroundColor>, <setFontBorderColor>, <setFontSize>,\n *   <setFontFamily>, <setFontStyle>\n * - <setShadow>, <setShadowColor>, <setShadowAlpha>, <setShadowOffset>\n * - <rect>, <roundrect>, <ellipse>, <image>, <text>\n * - <begin>, <moveTo>, <lineTo>, <quadTo>, <curveTo>\n * - <stroke>, <fill>, <fillAndStroke>\n * \n * <mxAbstractCanvas2D.arcTo> is an additional method for drawing paths. This is\n * a synthetic method, meaning that it is turned into a sequence of curves by\n * default. Subclassers may add native support for arcs.\n * \n * Constructor: mxXmlCanvas2D\n *\n * Constructs a new abstract canvas.\n */\nfunction mxXmlCanvas2D(root)\n{\n\tmxAbstractCanvas2D.call(this);\n\n\t/**\n\t * Variable: root\n\t * \n\t * Reference to the container for the SVG content.\n\t */\n\tthis.root = root;\n\n\t// Writes default settings;\n\tthis.writeDefaults();\n};\n\n/**\n * Extends mxAbstractCanvas2D\n */\nmxUtils.extend(mxXmlCanvas2D, mxAbstractCanvas2D);\n\n/**\n * Variable: textEnabled\n * \n * Specifies if text output should be enabled. Default is true.\n */\nmxXmlCanvas2D.prototype.textEnabled = true;\n\n/**\n * Variable: compressed\n * \n * Specifies if the output should be compressed by removing redundant calls.\n * Default is true.\n */\nmxXmlCanvas2D.prototype.compressed = true;\n\n/**\n * Function: writeDefaults\n * \n * Writes the rendering defaults to <root>:\n */\nmxXmlCanvas2D.prototype.writeDefaults = function()\n{\n\tvar elem;\n\t\n\t// Writes font defaults\n\telem = this.createElement('fontfamily');\n\telem.setAttribute('family', mxConstants.DEFAULT_FONTFAMILY);\n\tthis.root.appendChild(elem);\n\t\n\telem = this.createElement('fontsize');\n\telem.setAttribute('size', mxConstants.DEFAULT_FONTSIZE);\n\tthis.root.appendChild(elem);\n\t\n\t// Writes shadow defaults\n\telem = this.createElement('shadowcolor');\n\telem.setAttribute('color', mxConstants.SHADOWCOLOR);\n\tthis.root.appendChild(elem);\n\t\n\telem = this.createElement('shadowalpha');\n\telem.setAttribute('alpha', mxConstants.SHADOW_OPACITY);\n\tthis.root.appendChild(elem);\n\t\n\telem = this.createElement('shadowoffset');\n\telem.setAttribute('dx', mxConstants.SHADOW_OFFSET_X);\n\telem.setAttribute('dy', mxConstants.SHADOW_OFFSET_Y);\n\tthis.root.appendChild(elem);\n};\n\n/**\n * Function: format\n * \n * Returns a formatted number with 2 decimal places.\n */\nmxXmlCanvas2D.prototype.format = function(value)\n{\n\treturn parseFloat(parseFloat(value).toFixed(2));\n};\n\n/**\n * Function: createElement\n * \n * Creates the given element using the owner document of <root>.\n */\nmxXmlCanvas2D.prototype.createElement = function(name)\n{\n\treturn this.root.ownerDocument.createElement(name);\n};\n\n/**\n * Function: save\n * \n * Saves the drawing state.\n */\nmxXmlCanvas2D.prototype.save = function()\n{\n\tif (this.compressed)\n\t{\n\t\tmxAbstractCanvas2D.prototype.save.apply(this, arguments);\n\t}\n\t\n\tthis.root.appendChild(this.createElement('save'));\n};\n\n/**\n * Function: restore\n * \n * Restores the drawing state.\n */\nmxXmlCanvas2D.prototype.restore = function()\n{\n\tif (this.compressed)\n\t{\n\t\tmxAbstractCanvas2D.prototype.restore.apply(this, arguments);\n\t}\n\t\n\tthis.root.appendChild(this.createElement('restore'));\n};\n\n/**\n * Function: scale\n * \n * Scales the output.\n * \n * Parameters:\n * \n * scale - Number that represents the scale where 1 is equal to 100%.\n */\nmxXmlCanvas2D.prototype.scale = function(value)\n{\n        var elem = this.createElement('scale');\n        elem.setAttribute('scale', value);\n        this.root.appendChild(elem);\n};\n\n/**\n * Function: translate\n * \n * Translates the output.\n * \n * Parameters:\n * \n * dx - Number that specifies the horizontal translation.\n * dy - Number that specifies the vertical translation.\n */\nmxXmlCanvas2D.prototype.translate = function(dx, dy)\n{\n\tvar elem = this.createElement('translate');\n\telem.setAttribute('dx', this.format(dx));\n\telem.setAttribute('dy', this.format(dy));\n\tthis.root.appendChild(elem);\n};\n\n/**\n * Function: rotate\n * \n * Rotates and/or flips the output around a given center. (Note: Due to\n * limitations in VML, the rotation cannot be concatenated.)\n * \n * Parameters:\n * \n * theta - Number that represents the angle of the rotation (in degrees).\n * flipH - Boolean indicating if the output should be flipped horizontally.\n * flipV - Boolean indicating if the output should be flipped vertically.\n * cx - Number that represents the x-coordinate of the rotation center.\n * cy - Number that represents the y-coordinate of the rotation center.\n */\nmxXmlCanvas2D.prototype.rotate = function(theta, flipH, flipV, cx, cy)\n{\n\tvar elem = this.createElement('rotate');\n\t\n\tif (theta != 0 || flipH || flipV)\n\t{\n\t\telem.setAttribute('theta', this.format(theta));\n\t\telem.setAttribute('flipH', (flipH) ? '1' : '0');\n\t\telem.setAttribute('flipV', (flipV) ? '1' : '0');\n\t\telem.setAttribute('cx', this.format(cx));\n\t\telem.setAttribute('cy', this.format(cy));\n\t\tthis.root.appendChild(elem);\n\t}\n};\n\n/**\n * Function: setAlpha\n * \n * Sets the current alpha.\n * \n * Parameters:\n * \n * value - Number that represents the new alpha. Possible values are between\n * 1 (opaque) and 0 (transparent).\n */\nmxXmlCanvas2D.prototype.setAlpha = function(value)\n{\n\tif (this.compressed)\n\t{\n\t\tif (this.state.alpha == value)\n\t\t{\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tmxAbstractCanvas2D.prototype.setAlpha.apply(this, arguments);\n\t}\n\t\n\tvar elem = this.createElement('alpha');\n\telem.setAttribute('alpha', this.format(value));\n\tthis.root.appendChild(elem);\n};\n\n/**\n * Function: setFillAlpha\n * \n * Sets the current fill alpha.\n * \n * Parameters:\n * \n * value - Number that represents the new fill alpha. Possible values are between\n * 1 (opaque) and 0 (transparent).\n */\nmxXmlCanvas2D.prototype.setFillAlpha = function(value)\n{\n\tif (this.compressed)\n\t{\n\t\tif (this.state.fillAlpha == value)\n\t\t{\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tmxAbstractCanvas2D.prototype.setFillAlpha.apply(this, arguments);\n\t}\n\t\n\tvar elem = this.createElement('fillalpha');\n\telem.setAttribute('alpha', this.format(value));\n\tthis.root.appendChild(elem);\n};\n\n/**\n * Function: setStrokeAlpha\n * \n * Sets the current stroke alpha.\n * \n * Parameters:\n * \n * value - Number that represents the new stroke alpha. Possible values are between\n * 1 (opaque) and 0 (transparent).\n */\nmxXmlCanvas2D.prototype.setStrokeAlpha = function(value)\n{\n\tif (this.compressed)\n\t{\n\t\tif (this.state.strokeAlpha == value)\n\t\t{\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tmxAbstractCanvas2D.prototype.setStrokeAlpha.apply(this, arguments);\n\t}\n\t\n\tvar elem = this.createElement('strokealpha');\n\telem.setAttribute('alpha', this.format(value));\n\tthis.root.appendChild(elem);\n};\n\n/**\n * Function: setFillColor\n * \n * Sets the current fill color.\n * \n * Parameters:\n * \n * value - Hexadecimal representation of the color or 'none'.\n */\nmxXmlCanvas2D.prototype.setFillColor = function(value)\n{\n\tif (value == mxConstants.NONE)\n\t{\n\t\tvalue = null;\n\t}\n\t\n\tif (this.compressed)\n\t{\n\t\tif (this.state.fillColor == value)\n\t\t{\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tmxAbstractCanvas2D.prototype.setFillColor.apply(this, arguments);\n\t}\n\t\n\tvar elem = this.createElement('fillcolor');\n\telem.setAttribute('color', (value != null) ? value : mxConstants.NONE);\n\tthis.root.appendChild(elem);\n};\n\n/**\n * Function: setGradient\n * \n * Sets the gradient. Note that the coordinates may be ignored by some implementations.\n * \n * Parameters:\n * \n * color1 - Hexadecimal representation of the start color.\n * color2 - Hexadecimal representation of the end color.\n * x - X-coordinate of the gradient region.\n * y - y-coordinate of the gradient region.\n * w - Width of the gradient region.\n * h - Height of the gradient region.\n * direction - One of <mxConstants.DIRECTION_NORTH>, <mxConstants.DIRECTION_EAST>,\n * <mxConstants.DIRECTION_SOUTH> or <mxConstants.DIRECTION_WEST>.\n * alpha1 - Optional alpha of the start color. Default is 1. Possible values\n * are between 1 (opaque) and 0 (transparent).\n * alpha2 - Optional alpha of the end color. Default is 1. Possible values\n * are between 1 (opaque) and 0 (transparent).\n */\nmxXmlCanvas2D.prototype.setGradient = function(color1, color2, x, y, w, h, direction, alpha1, alpha2)\n{\n\tif (color1 != null && color2 != null)\n\t{\n\t\tmxAbstractCanvas2D.prototype.setGradient.apply(this, arguments);\n\t\t\n\t\tvar elem = this.createElement('gradient');\n\t\telem.setAttribute('c1', color1);\n\t\telem.setAttribute('c2', color2);\n\t\telem.setAttribute('x', this.format(x));\n\t\telem.setAttribute('y', this.format(y));\n\t\telem.setAttribute('w', this.format(w));\n\t\telem.setAttribute('h', this.format(h));\n\t\t\n\t\t// Default direction is south\n\t\tif (direction != null)\n\t\t{\n\t\t\telem.setAttribute('direction', direction);\n\t\t}\n\t\t\n\t\tif (alpha1 != null)\n\t\t{\n\t\t\telem.setAttribute('alpha1', alpha1);\n\t\t}\n\t\t\n\t\tif (alpha2 != null)\n\t\t{\n\t\t\telem.setAttribute('alpha2', alpha2);\n\t\t}\n\t\t\n\t\tthis.root.appendChild(elem);\n\t}\n};\n\n/**\n * Function: setStrokeColor\n * \n * Sets the current stroke color.\n * \n * Parameters:\n * \n * value - Hexadecimal representation of the color or 'none'.\n */\nmxXmlCanvas2D.prototype.setStrokeColor = function(value)\n{\n\tif (value == mxConstants.NONE)\n\t{\n\t\tvalue = null;\n\t}\n\t\n\tif (this.compressed)\n\t{\n\t\tif (this.state.strokeColor == value)\n\t\t{\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tmxAbstractCanvas2D.prototype.setStrokeColor.apply(this, arguments);\n\t}\n\t\n\tvar elem = this.createElement('strokecolor');\n\telem.setAttribute('color', (value != null) ? value : mxConstants.NONE);\n\tthis.root.appendChild(elem);\n};\n\n/**\n * Function: setStrokeWidth\n * \n * Sets the current stroke width.\n * \n * Parameters:\n * \n * value - Numeric representation of the stroke width.\n */\nmxXmlCanvas2D.prototype.setStrokeWidth = function(value)\n{\n\tif (this.compressed)\n\t{\n\t\tif (this.state.strokeWidth == value)\n\t\t{\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tmxAbstractCanvas2D.prototype.setStrokeWidth.apply(this, arguments);\n\t}\n\t\n\tvar elem = this.createElement('strokewidth');\n\telem.setAttribute('width', this.format(value));\n\tthis.root.appendChild(elem);\n};\n\n/**\n * Function: setDashed\n * \n * Enables or disables dashed lines.\n * \n * Parameters:\n * \n * value - Boolean that specifies if dashed lines should be enabled.\n * value - Boolean that specifies if the stroke width should be ignored\n * for the dash pattern. Default is false.\n */\nmxXmlCanvas2D.prototype.setDashed = function(value, fixDash)\n{\n\tif (this.compressed)\n\t{\n\t\tif (this.state.dashed == value)\n\t\t{\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tmxAbstractCanvas2D.prototype.setDashed.apply(this, arguments);\n\t}\n\t\n\tvar elem = this.createElement('dashed');\n\telem.setAttribute('dashed', (value) ? '1' : '0');\n\t\n\tif (fixDash != null)\n\t{\n\t\telem.setAttribute('fixDash', (fixDash) ? '1' : '0');\n\t}\n\t\n\tthis.root.appendChild(elem);\n};\n\n/**\n * Function: setDashPattern\n * \n * Sets the current dash pattern. Default is '3 3'.\n * \n * Parameters:\n * \n * value - String that represents the dash pattern, which is a sequence of\n * numbers defining the length of the dashes and the length of the spaces\n * between the dashes. The lengths are relative to the line width - a length\n * of 1 is equals to the line width.\n */\nmxXmlCanvas2D.prototype.setDashPattern = function(value)\n{\n\tif (this.compressed)\n\t{\n\t\tif (this.state.dashPattern == value)\n\t\t{\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tmxAbstractCanvas2D.prototype.setDashPattern.apply(this, arguments);\n\t}\n\t\n\tvar elem = this.createElement('dashpattern');\n\telem.setAttribute('pattern', value);\n\tthis.root.appendChild(elem);\n};\n\n/**\n * Function: setLineCap\n * \n * Sets the line cap. Default is 'flat' which corresponds to 'butt' in SVG.\n * \n * Parameters:\n * \n * value - String that represents the line cap. Possible values are flat, round\n * and square.\n */\nmxXmlCanvas2D.prototype.setLineCap = function(value)\n{\n\tif (this.compressed)\n\t{\n\t\tif (this.state.lineCap == value)\n\t\t{\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tmxAbstractCanvas2D.prototype.setLineCap.apply(this, arguments);\n\t}\n\t\n\tvar elem = this.createElement('linecap');\n\telem.setAttribute('cap', value);\n\tthis.root.appendChild(elem);\n};\n\n/**\n * Function: setLineJoin\n * \n * Sets the line join. Default is 'miter'.\n * \n * Parameters:\n * \n * value - String that represents the line join. Possible values are miter,\n * round and bevel.\n */\nmxXmlCanvas2D.prototype.setLineJoin = function(value)\n{\n\tif (this.compressed)\n\t{\n\t\tif (this.state.lineJoin == value)\n\t\t{\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tmxAbstractCanvas2D.prototype.setLineJoin.apply(this, arguments);\n\t}\n\t\n\tvar elem = this.createElement('linejoin');\n\telem.setAttribute('join', value);\n\tthis.root.appendChild(elem);\n};\n\n/**\n * Function: setMiterLimit\n * \n * Sets the miter limit. Default is 10.\n * \n * Parameters:\n * \n * value - Number that represents the miter limit.\n */\nmxXmlCanvas2D.prototype.setMiterLimit = function(value)\n{\n\tif (this.compressed)\n\t{\n\t\tif (this.state.miterLimit == value)\n\t\t{\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tmxAbstractCanvas2D.prototype.setMiterLimit.apply(this, arguments);\n\t}\n\t\n\tvar elem = this.createElement('miterlimit');\n\telem.setAttribute('limit', value);\n\tthis.root.appendChild(elem);\n};\n\n/**\n * Function: setFontColor\n * \n * Sets the current font color. Default is '#000000'.\n * \n * Parameters:\n * \n * value - Hexadecimal representation of the color or 'none'.\n */\nmxXmlCanvas2D.prototype.setFontColor = function(value)\n{\n\tif (this.textEnabled)\n\t{\n\t\tif (value == mxConstants.NONE)\n\t\t{\n\t\t\tvalue = null;\n\t\t}\n\t\t\n\t\tif (this.compressed)\n\t\t{\n\t\t\tif (this.state.fontColor == value)\n\t\t\t{\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t\n\t\t\tmxAbstractCanvas2D.prototype.setFontColor.apply(this, arguments);\n\t\t}\n\t\t\n\t\tvar elem = this.createElement('fontcolor');\n\t\telem.setAttribute('color', (value != null) ? value : mxConstants.NONE);\n\t\tthis.root.appendChild(elem);\n\t}\n};\n\n/**\n * Function: setFontBackgroundColor\n * \n * Sets the current font background color.\n * \n * Parameters:\n * \n * value - Hexadecimal representation of the color or 'none'.\n */\nmxXmlCanvas2D.prototype.setFontBackgroundColor = function(value)\n{\n\tif (this.textEnabled)\n\t{\n\t\tif (value == mxConstants.NONE)\n\t\t{\n\t\t\tvalue = null;\n\t\t}\n\t\t\n\t\tif (this.compressed)\n\t\t{\n\t\t\tif (this.state.fontBackgroundColor == value)\n\t\t\t{\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t\n\t\t\tmxAbstractCanvas2D.prototype.setFontBackgroundColor.apply(this, arguments);\n\t\t}\n\n\t\tvar elem = this.createElement('fontbackgroundcolor');\n\t\telem.setAttribute('color', (value != null) ? value : mxConstants.NONE);\n\t\tthis.root.appendChild(elem);\n\t}\n};\n\n/**\n * Function: setFontBorderColor\n * \n * Sets the current font border color.\n * \n * Parameters:\n * \n * value - Hexadecimal representation of the color or 'none'.\n */\nmxXmlCanvas2D.prototype.setFontBorderColor = function(value)\n{\n\tif (this.textEnabled)\n\t{\n\t\tif (value == mxConstants.NONE)\n\t\t{\n\t\t\tvalue = null;\n\t\t}\n\t\t\n\t\tif (this.compressed)\n\t\t{\n\t\t\tif (this.state.fontBorderColor == value)\n\t\t\t{\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t\n\t\t\tmxAbstractCanvas2D.prototype.setFontBorderColor.apply(this, arguments);\n\t\t}\n\t\t\n\t\tvar elem = this.createElement('fontbordercolor');\n\t\telem.setAttribute('color', (value != null) ? value : mxConstants.NONE);\n\t\tthis.root.appendChild(elem);\n\t}\n};\n\n/**\n * Function: setFontSize\n * \n * Sets the current font size. Default is <mxConstants.DEFAULT_FONTSIZE>.\n * \n * Parameters:\n * \n * value - Numeric representation of the font size.\n */\nmxXmlCanvas2D.prototype.setFontSize = function(value)\n{\n\tif (this.textEnabled)\n\t{\n\t\tif (this.compressed)\n\t\t{\n\t\t\tif (this.state.fontSize == value)\n\t\t\t{\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t\n\t\t\tmxAbstractCanvas2D.prototype.setFontSize.apply(this, arguments);\n\t\t}\n\t\t\n\t\tvar elem = this.createElement('fontsize');\n\t\telem.setAttribute('size', value);\n\t\tthis.root.appendChild(elem);\n\t}\n};\n\n/**\n * Function: setFontFamily\n * \n * Sets the current font family. Default is <mxConstants.DEFAULT_FONTFAMILY>.\n * \n * Parameters:\n * \n * value - String representation of the font family. This handles the same\n * values as the CSS font-family property.\n */\nmxXmlCanvas2D.prototype.setFontFamily = function(value)\n{\n\tif (this.textEnabled)\n\t{\n\t\tif (this.compressed)\n\t\t{\n\t\t\tif (this.state.fontFamily == value)\n\t\t\t{\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t\n\t\t\tmxAbstractCanvas2D.prototype.setFontFamily.apply(this, arguments);\n\t\t}\n\t\t\n\t\tvar elem = this.createElement('fontfamily');\n\t\telem.setAttribute('family', value);\n\t\tthis.root.appendChild(elem);\n\t}\n};\n\n/**\n * Function: setFontStyle\n * \n * Sets the current font style.\n * \n * Parameters:\n * \n * value - Numeric representation of the font family. This is the sum of the\n * font styles from <mxConstants>.\n */\nmxXmlCanvas2D.prototype.setFontStyle = function(value)\n{\n\tif (this.textEnabled)\n\t{\n\t\tif (value == null)\n\t\t{\n\t\t\tvalue = 0;\n\t\t}\n\t\t\n\t\tif (this.compressed)\n\t\t{\n\t\t\tif (this.state.fontStyle == value)\n\t\t\t{\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t\n\t\t\tmxAbstractCanvas2D.prototype.setFontStyle.apply(this, arguments);\n\t\t}\n\t\t\n\t\tvar elem = this.createElement('fontstyle');\n\t\telem.setAttribute('style', value);\n\t\tthis.root.appendChild(elem);\n\t}\n};\n\n/**\n * Function: setShadow\n * \n * Enables or disables shadows.\n * \n * Parameters:\n * \n * value - Boolean that specifies if shadows should be enabled.\n */\nmxXmlCanvas2D.prototype.setShadow = function(value)\n{\n\tif (this.compressed)\n\t{\n\t\tif (this.state.shadow == value)\n\t\t{\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tmxAbstractCanvas2D.prototype.setShadow.apply(this, arguments);\n\t}\n\t\n\tvar elem = this.createElement('shadow');\n\telem.setAttribute('enabled', (value) ? '1' : '0');\n\tthis.root.appendChild(elem);\n};\n\n/**\n * Function: setShadowColor\n * \n * Sets the current shadow color. Default is <mxConstants.SHADOWCOLOR>.\n * \n * Parameters:\n * \n * value - Hexadecimal representation of the color or 'none'.\n */\nmxXmlCanvas2D.prototype.setShadowColor = function(value)\n{\n\tif (this.compressed)\n\t{\n\t\tif (value == mxConstants.NONE)\n\t\t{\n\t\t\tvalue = null;\n\t\t}\n\t\t\n\t\tif (this.state.shadowColor == value)\n\t\t{\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tmxAbstractCanvas2D.prototype.setShadowColor.apply(this, arguments);\n\t}\n\t\n\tvar elem = this.createElement('shadowcolor');\n\telem.setAttribute('color', (value != null) ? value : mxConstants.NONE);\n\tthis.root.appendChild(elem);\n};\n\n/**\n * Function: setShadowAlpha\n * \n * Sets the current shadows alpha. Default is <mxConstants.SHADOW_OPACITY>.\n * \n * Parameters:\n * \n * value - Number that represents the new alpha. Possible values are between\n * 1 (opaque) and 0 (transparent).\n */\nmxXmlCanvas2D.prototype.setShadowAlpha = function(value)\n{\n\tif (this.compressed)\n\t{\n\t\tif (this.state.shadowAlpha == value)\n\t\t{\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tmxAbstractCanvas2D.prototype.setShadowAlpha.apply(this, arguments);\n\t}\n\t\n\tvar elem = this.createElement('shadowalpha');\n\telem.setAttribute('alpha', value);\n\tthis.root.appendChild(elem);\n\t\n};\n\n/**\n * Function: setShadowOffset\n * \n * Sets the current shadow offset.\n * \n * Parameters:\n * \n * dx - Number that represents the horizontal offset of the shadow.\n * dy - Number that represents the vertical offset of the shadow.\n */\nmxXmlCanvas2D.prototype.setShadowOffset = function(dx, dy)\n{\n\tif (this.compressed)\n\t{\n\t\tif (this.state.shadowDx == dx && this.state.shadowDy == dy)\n\t\t{\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tmxAbstractCanvas2D.prototype.setShadowOffset.apply(this, arguments);\n\t}\n\t\n\tvar elem = this.createElement('shadowoffset');\n\telem.setAttribute('dx', dx);\n\telem.setAttribute('dy', dy);\n\tthis.root.appendChild(elem);\n\t\n};\n\n/**\n * Function: rect\n * \n * Puts a rectangle into the drawing buffer.\n * \n * Parameters:\n * \n * x - Number that represents the x-coordinate of the rectangle.\n * y - Number that represents the y-coordinate of the rectangle.\n * w - Number that represents the width of the rectangle.\n * h - Number that represents the height of the rectangle.\n */\nmxXmlCanvas2D.prototype.rect = function(x, y, w, h)\n{\n\tvar elem = this.createElement('rect');\n\telem.setAttribute('x', this.format(x));\n\telem.setAttribute('y', this.format(y));\n\telem.setAttribute('w', this.format(w));\n\telem.setAttribute('h', this.format(h));\n\tthis.root.appendChild(elem);\n};\n\n/**\n * Function: roundrect\n * \n * Puts a rounded rectangle into the drawing buffer.\n * \n * Parameters:\n * \n * x - Number that represents the x-coordinate of the rectangle.\n * y - Number that represents the y-coordinate of the rectangle.\n * w - Number that represents the width of the rectangle.\n * h - Number that represents the height of the rectangle.\n * dx - Number that represents the horizontal rounding.\n * dy - Number that represents the vertical rounding.\n */\nmxXmlCanvas2D.prototype.roundrect = function(x, y, w, h, dx, dy)\n{\n\tvar elem = this.createElement('roundrect');\n\telem.setAttribute('x', this.format(x));\n\telem.setAttribute('y', this.format(y));\n\telem.setAttribute('w', this.format(w));\n\telem.setAttribute('h', this.format(h));\n\telem.setAttribute('dx', this.format(dx));\n\telem.setAttribute('dy', this.format(dy));\n\tthis.root.appendChild(elem);\n};\n\n/**\n * Function: ellipse\n * \n * Puts an ellipse into the drawing buffer.\n * \n * Parameters:\n * \n * x - Number that represents the x-coordinate of the ellipse.\n * y - Number that represents the y-coordinate of the ellipse.\n * w - Number that represents the width of the ellipse.\n * h - Number that represents the height of the ellipse.\n */\nmxXmlCanvas2D.prototype.ellipse = function(x, y, w, h)\n{\n\tvar elem = this.createElement('ellipse');\n\telem.setAttribute('x', this.format(x));\n\telem.setAttribute('y', this.format(y));\n\telem.setAttribute('w', this.format(w));\n\telem.setAttribute('h', this.format(h));\n\tthis.root.appendChild(elem);\n};\n\n/**\n * Function: image\n * \n * Paints an image.\n * \n * Parameters:\n * \n * x - Number that represents the x-coordinate of the image.\n * y - Number that represents the y-coordinate of the image.\n * w - Number that represents the width of the image.\n * h - Number that represents the height of the image.\n * src - String that specifies the URL of the image.\n * aspect - Boolean indicating if the aspect of the image should be preserved.\n * flipH - Boolean indicating if the image should be flipped horizontally.\n * flipV - Boolean indicating if the image should be flipped vertically.\n */\nmxXmlCanvas2D.prototype.image = function(x, y, w, h, src, aspect, flipH, flipV)\n{\n\tsrc = this.converter.convert(src);\n\t\n\t// LATER: Add option for embedding images as base64.\n\tvar elem = this.createElement('image');\n\telem.setAttribute('x', this.format(x));\n\telem.setAttribute('y', this.format(y));\n\telem.setAttribute('w', this.format(w));\n\telem.setAttribute('h', this.format(h));\n\telem.setAttribute('src', src);\n\telem.setAttribute('aspect', (aspect) ? '1' : '0');\n\telem.setAttribute('flipH', (flipH) ? '1' : '0');\n\telem.setAttribute('flipV', (flipV) ? '1' : '0');\n\tthis.root.appendChild(elem);\n};\n\n/**\n * Function: begin\n * \n * Starts a new path and puts it into the drawing buffer.\n */\nmxXmlCanvas2D.prototype.begin = function()\n{\n\tthis.root.appendChild(this.createElement('begin'));\n\tthis.lastX = 0;\n\tthis.lastY = 0;\n};\n\n/**\n * Function: moveTo\n * \n * Moves the current path the given point.\n * \n * Parameters:\n * \n * x - Number that represents the x-coordinate of the point.\n * y - Number that represents the y-coordinate of the point.\n */\nmxXmlCanvas2D.prototype.moveTo = function(x, y)\n{\n\tvar elem = this.createElement('move');\n\telem.setAttribute('x', this.format(x));\n\telem.setAttribute('y', this.format(y));\n\tthis.root.appendChild(elem);\n\tthis.lastX = x;\n\tthis.lastY = y;\n};\n\n/**\n * Function: lineTo\n * \n * Draws a line to the given coordinates.\n * \n * Parameters:\n * \n * x - Number that represents the x-coordinate of the endpoint.\n * y - Number that represents the y-coordinate of the endpoint.\n */\nmxXmlCanvas2D.prototype.lineTo = function(x, y)\n{\n\tvar elem = this.createElement('line');\n\telem.setAttribute('x', this.format(x));\n\telem.setAttribute('y', this.format(y));\n\tthis.root.appendChild(elem);\n\tthis.lastX = x;\n\tthis.lastY = y;\n};\n\n/**\n * Function: quadTo\n * \n * Adds a quadratic curve to the current path.\n * \n * Parameters:\n * \n * x1 - Number that represents the x-coordinate of the control point.\n * y1 - Number that represents the y-coordinate of the control point.\n * x2 - Number that represents the x-coordinate of the endpoint.\n * y2 - Number that represents the y-coordinate of the endpoint.\n */\nmxXmlCanvas2D.prototype.quadTo = function(x1, y1, x2, y2)\n{\n\tvar elem = this.createElement('quad');\n\telem.setAttribute('x1', this.format(x1));\n\telem.setAttribute('y1', this.format(y1));\n\telem.setAttribute('x2', this.format(x2));\n\telem.setAttribute('y2', this.format(y2));\n\tthis.root.appendChild(elem);\n\tthis.lastX = x2;\n\tthis.lastY = y2;\n};\n\n/**\n * Function: curveTo\n * \n * Adds a bezier curve to the current path.\n * \n * Parameters:\n * \n * x1 - Number that represents the x-coordinate of the first control point.\n * y1 - Number that represents the y-coordinate of the first control point.\n * x2 - Number that represents the x-coordinate of the second control point.\n * y2 - Number that represents the y-coordinate of the second control point.\n * x3 - Number that represents the x-coordinate of the endpoint.\n * y3 - Number that represents the y-coordinate of the endpoint.\n */\nmxXmlCanvas2D.prototype.curveTo = function(x1, y1, x2, y2, x3, y3)\n{\n\tvar elem = this.createElement('curve');\n\telem.setAttribute('x1', this.format(x1));\n\telem.setAttribute('y1', this.format(y1));\n\telem.setAttribute('x2', this.format(x2));\n\telem.setAttribute('y2', this.format(y2));\n\telem.setAttribute('x3', this.format(x3));\n\telem.setAttribute('y3', this.format(y3));\n\tthis.root.appendChild(elem);\n\tthis.lastX = x3;\n\tthis.lastY = y3;\n};\n\n/**\n * Function: close\n * \n * Closes the current path.\n */\nmxXmlCanvas2D.prototype.close = function()\n{\n\tthis.root.appendChild(this.createElement('close'));\n};\n\n/**\n * Function: text\n * \n * Paints the given text. Possible values for format are empty string for\n * plain text and html for HTML markup. Background and border color as well\n * as clipping is not available in plain text labels for VML. HTML labels\n * are not available as part of shapes with no foreignObject support in SVG\n * (eg. IE9, IE10).\n * \n * Parameters:\n * \n * x - Number that represents the x-coordinate of the text.\n * y - Number that represents the y-coordinate of the text.\n * w - Number that represents the available width for the text or 0 for automatic width.\n * h - Number that represents the available height for the text or 0 for automatic height.\n * str - String that specifies the text to be painted.\n * align - String that represents the horizontal alignment.\n * valign - String that represents the vertical alignment.\n * wrap - Boolean that specifies if word-wrapping is enabled. Requires w > 0.\n * format - Empty string for plain text or 'html' for HTML markup.\n * overflow - Specifies the overflow behaviour of the label. Requires w > 0 and/or h > 0.\n * clip - Boolean that specifies if the label should be clipped. Requires w > 0 and/or h > 0.\n * rotation - Number that specifies the angle of the rotation around the anchor point of the text.\n * dir - Optional string that specifies the text direction. Possible values are rtl and lrt.\n */\nmxXmlCanvas2D.prototype.text = function(x, y, w, h, str, align, valign, wrap, format, overflow, clip, rotation, dir)\n{\n\tif (this.textEnabled && str != null)\n\t{\n\t\tif (mxUtils.isNode(str))\n\t\t{\n\t\t\tstr = mxUtils.getOuterHtml(str);\n\t\t}\n\t\t\n\t\tvar elem = this.createElement('text');\n\t\telem.setAttribute('x', this.format(x));\n\t\telem.setAttribute('y', this.format(y));\n\t\telem.setAttribute('w', this.format(w));\n\t\telem.setAttribute('h', this.format(h));\n\t\telem.setAttribute('str', str);\n\t\t\n\t\tif (align != null)\n\t\t{\n\t\t\telem.setAttribute('align', align);\n\t\t}\n\t\t\n\t\tif (valign != null)\n\t\t{\n\t\t\telem.setAttribute('valign', valign);\n\t\t}\n\t\t\n\t\telem.setAttribute('wrap', (wrap) ? '1' : '0');\n\t\t\n\t\tif (format == null)\n\t\t{\n\t\t\tformat = '';\n\t\t}\n\t\t\n\t\telem.setAttribute('format', format);\n\t\t\n\t\tif (overflow != null)\n\t\t{\n\t\t\telem.setAttribute('overflow', overflow);\n\t\t}\n\t\t\n\t\tif (clip != null)\n\t\t{\n\t\t\telem.setAttribute('clip', (clip) ? '1' : '0');\n\t\t}\n\t\t\n\t\tif (rotation != null)\n\t\t{\n\t\t\telem.setAttribute('rotation', rotation);\n\t\t}\n\t\t\n\t\tif (dir != null)\n\t\t{\n\t\t\telem.setAttribute('dir', dir);\n\t\t}\n\t\t\n\t\tthis.root.appendChild(elem);\n\t}\n};\n\n/**\n * Function: stroke\n * \n * Paints the outline of the current drawing buffer.\n */\nmxXmlCanvas2D.prototype.stroke = function()\n{\n\tthis.root.appendChild(this.createElement('stroke'));\n};\n\n/**\n * Function: fill\n * \n * Fills the current drawing buffer.\n */\nmxXmlCanvas2D.prototype.fill = function()\n{\n\tthis.root.appendChild(this.createElement('fill'));\n};\n\n/**\n * Function: fillAndStroke\n * \n * Fills the current drawing buffer and its outline.\n */\nmxXmlCanvas2D.prototype.fillAndStroke = function()\n{\n\tthis.root.appendChild(this.createElement('fillstroke'));\n};\n"
  },
  {
    "path": "static/cherry/drawio_demo/src/js/util/mxXmlRequest.js",
    "content": "/**\n * Copyright (c) 2006-2015, JGraph Ltd\n * Copyright (c) 2006-2015, Gaudenz Alder\n */\n/**\n * Class: mxXmlRequest\n * \n * XML HTTP request wrapper. See also: <mxUtils.get>, <mxUtils.post> and\n * <mxUtils.load>. This class provides a cross-browser abstraction for Ajax\n * requests.\n * \n * Encoding:\n * \n * For encoding parameter values, the built-in encodeURIComponent JavaScript\n * method must be used. For automatic encoding of post data in <mxEditor> the\n * <mxEditor.escapePostData> switch can be set to true (default). The encoding\n * will be carried out using the conte type of the page. That is, the page\n * containting the editor should contain a meta tag in the header, eg.\n * <meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\">\n * \n * Example:\n * \n * (code)\n * var onload = function(req)\n * {\n *   mxUtils.alert(req.getDocumentElement());\n * }\n * \n * var onerror = function(req)\n * {\n *   mxUtils.alert('Error');\n * }\n * new mxXmlRequest(url, 'key=value').send(onload, onerror);\n * (end)\n * \n * Sends an asynchronous POST request to the specified URL.\n * \n * Example:\n * \n * (code)\n * var req = new mxXmlRequest(url, 'key=value', 'POST', false);\n * req.send();\n * mxUtils.alert(req.getDocumentElement());\n * (end)\n * \n * Sends a synchronous POST request to the specified URL.\n * \n * Example:\n * \n * (code)\n * var encoder = new mxCodec();\n * var result = encoder.encode(graph.getModel());\n * var xml = encodeURIComponent(mxUtils.getXml(result));\n * new mxXmlRequest(url, 'xml='+xml).send();\n * (end)\n * \n * Sends an encoded graph model to the specified URL using xml as the\n * parameter name. The parameter can then be retrieved in C# as follows:\n * \n * (code)\n * string xml = HttpUtility.UrlDecode(context.Request.Params[\"xml\"]);\n * (end)\n * \n * Or in Java as follows:\n * \n * (code)\n * String xml = URLDecoder.decode(request.getParameter(\"xml\"), \"UTF-8\").replace(\"\\n\", \"&#xa;\");\n * (end)\n *\n * Note that the linefeeds should only be replaced if the XML is\n * processed in Java, for example when creating an image.\n * \n * Constructor: mxXmlRequest\n * \n * Constructs an XML HTTP request.\n * \n * Parameters:\n * \n * url - Target URL of the request.\n * params - Form encoded parameters to send with a POST request.\n * method - String that specifies the request method. Possible values are\n * POST and GET. Default is POST.\n * async - Boolean specifying if an asynchronous request should be used.\n * Default is true.\n * username - String specifying the username to be used for the request.\n * password - String specifying the password to be used for the request.\n */\nfunction mxXmlRequest(url, params, method, async, username, password)\n{\n\tthis.url = url;\n\tthis.params = params;\n\tthis.method = method || 'POST';\n\tthis.async = (async != null) ? async : true;\n\tthis.username = username;\n\tthis.password = password;\n};\n\n/**\n * Variable: url\n * \n * Holds the target URL of the request.\n */\nmxXmlRequest.prototype.url = null;\n\n/**\n * Variable: params\n * \n * Holds the form encoded data for the POST request.\n */\nmxXmlRequest.prototype.params = null;\n\n/**\n * Variable: method\n * \n * Specifies the request method. Possible values are POST and GET. Default\n * is POST.\n */\nmxXmlRequest.prototype.method = null;\n\n/**\n * Variable: async\n * \n * Boolean indicating if the request is asynchronous.\n */\nmxXmlRequest.prototype.async = null;\n\n/**\n * Variable: binary\n * \n * Boolean indicating if the request is binary. This option is ignored in IE.\n * In all other browsers the requested mime type is set to\n * text/plain; charset=x-user-defined. Default is false.\n */\nmxXmlRequest.prototype.binary = false;\n\n/**\n * Variable: withCredentials\n * \n * Specifies if withCredentials should be used in HTML5-compliant browsers. Default is\n * false.\n */\nmxXmlRequest.prototype.withCredentials = false;\n\n/**\n * Variable: username\n * \n * Specifies the username to be used for authentication.\n */\nmxXmlRequest.prototype.username = null;\n\n/**\n * Variable: password\n * \n * Specifies the password to be used for authentication.\n */\nmxXmlRequest.prototype.password = null;\n\n/**\n * Variable: request\n * \n * Holds the inner, browser-specific request object.\n */\nmxXmlRequest.prototype.request = null;\n\n/**\n * Variable: decodeSimulateValues\n * \n * Specifies if request values should be decoded as URIs before setting the\n * textarea value in <simulate>. Defaults to false for backwards compatibility,\n * to avoid another decode on the server this should be set to true.\n */\nmxXmlRequest.prototype.decodeSimulateValues = false;\n\n/**\n * Function: isBinary\n * \n * Returns <binary>.\n */\nmxXmlRequest.prototype.isBinary = function()\n{\n\treturn this.binary;\n};\n\n/**\n * Function: setBinary\n * \n * Sets <binary>.\n */\nmxXmlRequest.prototype.setBinary = function(value)\n{\n\tthis.binary = value;\n};\n\n/**\n * Function: getText\n * \n * Returns the response as a string.\n */\nmxXmlRequest.prototype.getText = function()\n{\n\treturn this.request.responseText;\n};\n\n/**\n * Function: isReady\n * \n * Returns true if the response is ready.\n */\nmxXmlRequest.prototype.isReady = function()\n{\n\treturn this.request.readyState == 4;\n};\n\n/**\n * Function: getDocumentElement\n * \n * Returns the document element of the response XML document.\n */\nmxXmlRequest.prototype.getDocumentElement = function()\n{\n\tvar doc = this.getXml();\n\t\n\tif (doc != null)\n\t{\n\t\treturn doc.documentElement;\n\t}\n\t\n\treturn null;\n};\n\n/**\n * Function: getXml\n * \n * Returns the response as an XML document. Use <getDocumentElement> to get\n * the document element of the XML document.\n */\nmxXmlRequest.prototype.getXml = function()\n{\n\tvar xml = this.request.responseXML;\n\t\n\t// Handles missing response headers in IE, the first condition handles\n\t// the case where responseXML is there, but using its nodes leads to\n\t// type errors in the mxCellCodec when putting the nodes into a new\n\t// document. This happens in IE9 standards mode and with XML user\n\t// objects only, as they are used directly as values in cells.\n\tif (document.documentMode >= 9 || xml == null || xml.documentElement == null)\n\t{\n\t\txml = mxUtils.parseXml(this.request.responseText);\n\t}\n\t\n\treturn xml;\n};\n\n/**\n * Function: getText\n * \n * Returns the response as a string.\n */\nmxXmlRequest.prototype.getText = function()\n{\n\treturn this.request.responseText;\n};\n\n/**\n * Function: getStatus\n * \n * Returns the status as a number, eg. 404 for \"Not found\" or 200 for \"OK\".\n * Note: The NS_ERROR_NOT_AVAILABLE for invalid responses cannot be cought.\n */\nmxXmlRequest.prototype.getStatus = function()\n{\n\treturn this.request.status;\n};\n\n/**\n * Function: create\n * \n * Creates and returns the inner <request> object.\n */\nmxXmlRequest.prototype.create = function()\n{\n\tif (window.XMLHttpRequest)\n\t{\n\t\treturn function()\n\t\t{\n\t\t\tvar req = new XMLHttpRequest();\n\t\t\t\n\t\t\t// TODO: Check for overrideMimeType required here?\n\t\t\tif (this.isBinary() && req.overrideMimeType)\n\t\t\t{\n\t\t\t\treq.overrideMimeType('text/plain; charset=x-user-defined');\n\t\t\t}\n\n\t\t\treturn req;\n\t\t};\n\t}\n\telse if (typeof(ActiveXObject) != 'undefined')\n\t{\n\t\treturn function()\n\t\t{\n\t\t\t// TODO: Implement binary option\n\t\t\treturn new ActiveXObject('Microsoft.XMLHTTP');\n\t\t};\n\t}\n}();\n\n/**\n * Function: send\n * \n * Send the <request> to the target URL using the specified functions to\n * process the response asychronously.\n * \n * Note: Due to technical limitations, onerror is currently ignored.\n * \n * Parameters:\n * \n * onload - Function to be invoked if a successful response was received.\n * onerror - Function to be called on any error.\n * timeout - Optional timeout in ms before calling ontimeout.\n * ontimeout - Optional function to execute on timeout.\n */\nmxXmlRequest.prototype.send = function(onload, onerror, timeout, ontimeout)\n{\n\tthis.request = this.create();\n\t\n\tif (this.request != null)\n\t{\n\t\tif (onload != null)\n\t\t{\n\t\t\tthis.request.onreadystatechange = mxUtils.bind(this, function()\n\t\t\t{\n\t\t\t\tif (this.isReady())\n\t\t\t\t{\n\t\t\t\t\tonload(this);\n\t\t\t\t\tthis.request.onreadystatechaange = null;\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\n\t\tthis.request.open(this.method, this.url, this.async,\n\t\t\tthis.username, this.password);\n\t\tthis.setRequestHeaders(this.request, this.params);\n\t\t\n\t\tif (window.XMLHttpRequest && this.withCredentials)\n\t\t{\n\t\t\tthis.request.withCredentials = 'true';\n\t\t}\n\t\t\n\t\tif (!mxClient.IS_QUIRKS && (document.documentMode == null || document.documentMode > 9) &&\n\t\t\twindow.XMLHttpRequest && timeout != null && ontimeout != null)\n\t\t{\n\t\t\tthis.request.timeout = timeout;\n\t\t\tthis.request.ontimeout = ontimeout;\n\t\t}\n\t\t\t\t\n\t\tthis.request.send(this.params);\n\t}\n};\n\n/**\n * Function: setRequestHeaders\n * \n * Sets the headers for the given request and parameters. This sets the\n * content-type to application/x-www-form-urlencoded if any params exist.\n * \n * Example:\n * \n * (code)\n * request.setRequestHeaders = function(request, params)\n * {\n *   if (params != null)\n *   {\n *     request.setRequestHeader('Content-Type',\n *             'multipart/form-data');\n *     request.setRequestHeader('Content-Length',\n *             params.length);\n *   }\n * };\n * (end)\n * \n * Use the code above before calling <send> if you require a\n * multipart/form-data request.   \n */\nmxXmlRequest.prototype.setRequestHeaders = function(request, params)\n{\n\tif (params != null)\n\t{\n\t\trequest.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');\n\t}\n};\n\n/**\n * Function: simulate\n * \n * Creates and posts a request to the given target URL using a dynamically\n * created form inside the given document.\n * \n * Parameters:\n * \n * docs - Document that contains the form element.\n * target - Target to send the form result to.\n */\nmxXmlRequest.prototype.simulate = function(doc, target)\n{\n\tdoc = doc || document;\n\tvar old = null;\n\n\tif (doc == document)\n\t{\n\t\told = window.onbeforeunload;\t\t\n\t\twindow.onbeforeunload = null;\n\t}\n\t\t\t\n\tvar form = doc.createElement('form');\n\tform.setAttribute('method', this.method);\n\tform.setAttribute('action', this.url);\n\n\tif (target != null)\n\t{\n\t\tform.setAttribute('target', target);\n\t}\n\n\tform.style.display = 'none';\n\tform.style.visibility = 'hidden';\n\t\n\tvar pars = (this.params.indexOf('&') > 0) ?\n\t\tthis.params.split('&') :\n\t\tthis.params.split();\n\n\t// Adds the parameters as textareas to the form\n\tfor (var i=0; i<pars.length; i++)\n\t{\n\t\tvar pos = pars[i].indexOf('=');\n\t\t\n\t\tif (pos > 0)\n\t\t{\n\t\t\tvar name = pars[i].substring(0, pos);\n\t\t\tvar value = pars[i].substring(pos+1);\n\t\t\t\n\t\t\tif (this.decodeSimulateValues)\n\t\t\t{\n\t\t\t\tvalue = decodeURIComponent(value);\n\t\t\t}\n\t\t\t\n\t\t\tvar textarea = doc.createElement('textarea');\n\t\t\ttextarea.setAttribute('wrap', 'off');\n\t\t\ttextarea.setAttribute('name', name);\n\t\t\tmxUtils.write(textarea, value);\n\t\t\tform.appendChild(textarea);\n\t\t}\n\t}\n\t\n\tdoc.body.appendChild(form);\n\tform.submit();\n\t\n\tif (form.parentNode != null)\n\t{\n\t\tform.parentNode.removeChild(form);\n\t}\n\n\tif (old != null)\n\t{\t\t\n\t\twindow.onbeforeunload = old;\n\t}\n};\n"
  },
  {
    "path": "static/cherry/drawio_demo/src/js/view/mxCellEditor.js",
    "content": "/**\n * Copyright (c) 2006-2015, JGraph Ltd\n * Copyright (c) 2006-2015, Gaudenz Alder\n */\n/**\n * Class: mxCellEditor\n *\n * In-place editor for the graph. To control this editor, use\n * <mxGraph.invokesStopCellEditing>, <mxGraph.enterStopsCellEditing> and\n * <mxGraph.escapeEnabled>. If <mxGraph.enterStopsCellEditing> is true then\n * ctrl-enter or shift-enter can be used to create a linefeed. The F2 and\n * escape keys can always be used to stop editing.\n * \n * To customize the location of the textbox in the graph, override\n * <getEditorBounds> as follows:\n * \n * (code)\n * graph.cellEditor.getEditorBounds = function(state)\n * {\n *   var result = mxCellEditor.prototype.getEditorBounds.apply(this, arguments);\n *   \n *   if (this.graph.getModel().isEdge(state.cell))\n *   {\n *     result.x = state.getCenterX() - result.width / 2;\n *     result.y = state.getCenterY() - result.height / 2;\n *   }\n *   \n *   return result;\n * };\n * (end)\n * \n * Note that this hook is only called if <autoSize> is false. If <autoSize> is true,\n * then <mxShape.getLabelBounds> is used to compute the current bounds of the textbox.\n * \n * The textarea uses the mxCellEditor CSS class. You can modify this class in\n * your custom CSS. Note: You should modify the CSS after loading the client\n * in the page.\n *\n * Example:\n * \n * To only allow numeric input in the in-place editor, use the following code.\n *\n * (code)\n * var text = graph.cellEditor.textarea;\n * \n * mxEvent.addListener(text, 'keydown', function (evt)\n * {\n *   if (!(evt.keyCode >= 48 && evt.keyCode <= 57) &&\n *       !(evt.keyCode >= 96 && evt.keyCode <= 105))\n *   {\n *     mxEvent.consume(evt);\n *   }\n * }); \n * (end)\n * \n * Placeholder:\n * \n * To implement a placeholder for cells without a label, use the\n * <emptyLabelText> variable.\n * \n * Resize in Chrome:\n * \n * Resize of the textarea is disabled by default. If you want to enable\n * this feature extend <init> and set this.textarea.style.resize = ''.\n * \n * To start editing on a key press event, the container of the graph\n * should have focus or a focusable parent should be used to add the\n * key press handler as follows.\n * \n * (code)\n * mxEvent.addListener(graph.container, 'keypress', mxUtils.bind(this, function(evt)\n * {\n *   if (!graph.isEditing() && !graph.isSelectionEmpty() && evt.which !== 0 &&\n *       !mxEvent.isAltDown(evt) && !mxEvent.isControlDown(evt) && !mxEvent.isMetaDown(evt))\n *   {\n *     graph.startEditing();\n *     \n *     if (mxClient.IS_FF)\n *     {\n *       graph.cellEditor.textarea.value = String.fromCharCode(evt.which);\n *     }\n *   }\n * }));\n * (end)\n * \n * To allow focus for a DIV, and hence to receive key press events, some browsers\n * require it to have a valid tabindex attribute. In this case the following\n * code may be used to keep the container focused.\n * \n * (code)\n * var graphFireMouseEvent = graph.fireMouseEvent;\n * graph.fireMouseEvent = function(evtName, me, sender)\n * {\n *   if (evtName == mxEvent.MOUSE_DOWN)\n *   {\n *     this.container.focus();\n *   }\n *   \n *   graphFireMouseEvent.apply(this, arguments);\n * };\n * (end)\n *\n * Constructor: mxCellEditor\n *\n * Constructs a new in-place editor for the specified graph.\n * \n * Parameters:\n * \n * graph - Reference to the enclosing <mxGraph>.\n */\nfunction mxCellEditor(graph)\n{\n\tthis.graph = graph;\n\t\n\t// Stops editing after zoom changes\n\tthis.zoomHandler = mxUtils.bind(this, function()\n\t{\n\t\tif (this.graph.isEditing())\n\t\t{\n\t\t\tthis.resize();\n\t\t}\n\t});\n\t\n\tthis.graph.view.addListener(mxEvent.SCALE, this.zoomHandler);\n\tthis.graph.view.addListener(mxEvent.SCALE_AND_TRANSLATE, this.zoomHandler);\n\t\n\t// Adds handling of deleted cells while editing\n\tthis.changeHandler = mxUtils.bind(this, function(sender)\n\t{\n\t\tif (this.editingCell != null && this.graph.getView().getState(this.editingCell) == null)\n\t\t{\n\t\t\tthis.stopEditing(true);\n\t\t}\n\t});\n\n\tthis.graph.getModel().addListener(mxEvent.CHANGE, this.changeHandler);\n};\n\n/**\n * Variable: graph\n * \n * Reference to the enclosing <mxGraph>.\n */\nmxCellEditor.prototype.graph = null;\n\n/**\n * Variable: textarea\n *\n * Holds the DIV that is used for text editing. Note that this may be null before the first\n * edit. Instantiated in <init>.\n */\nmxCellEditor.prototype.textarea = null;\n\n/**\n * Variable: editingCell\n * \n * Reference to the <mxCell> that is currently being edited.\n */\nmxCellEditor.prototype.editingCell = null;\n\n/**\n * Variable: trigger\n * \n * Reference to the event that was used to start editing.\n */\nmxCellEditor.prototype.trigger = null;\n\n/**\n * Variable: modified\n * \n * Specifies if the label has been modified.\n */\nmxCellEditor.prototype.modified = false;\n\n/**\n * Variable: autoSize\n * \n * Specifies if the textarea should be resized while the text is being edited.\n * Default is true.\n */\nmxCellEditor.prototype.autoSize = true;\n\n/**\n * Variable: selectText\n * \n * Specifies if the text should be selected when editing starts. Default is\n * true.\n */\nmxCellEditor.prototype.selectText = true;\n\n/**\n * Variable: emptyLabelText\n * \n * Text to be displayed for empty labels. Default is '' or '<br>' in Firefox as\n * a workaround for the missing cursor bug for empty content editable. This can\n * be set to eg. \"[Type Here]\" to easier visualize editing of empty labels. The\n * value is only displayed before the first keystroke and is never used as the\n * actual editing value.\n */\nmxCellEditor.prototype.emptyLabelText = (mxClient.IS_FF) ? '<br>' : '';\n\n/**\n * Variable: escapeCancelsEditing\n * \n * If true, pressing the escape key will stop editing and not accept the new\n * value. Change this to false to accept the new value on escape, and cancel\n * editing on Shift+Escape instead. Default is true.\n */\nmxCellEditor.prototype.escapeCancelsEditing = true;\n\n/**\n * Variable: textNode\n * \n * Reference to the label DOM node that has been hidden.\n */\nmxCellEditor.prototype.textNode = '';\n\n/**\n * Variable: zIndex\n * \n * Specifies the zIndex for the textarea. Default is 5.\n */\nmxCellEditor.prototype.zIndex = 5;\n\n/**\n * Variable: minResize\n * \n * Defines the minimum width and height to be used in <resize>. Default is 0x20px.\n */\nmxCellEditor.prototype.minResize = new mxRectangle(0, 20);\n\n/**\n * Variable: wordWrapPadding\n * \n * Correction factor for word wrapping width. Default is 2 in quirks, 0 in IE\n * 11 and 1 in all other browsers and modes.\n */\nmxCellEditor.prototype.wordWrapPadding = (mxClient.IS_QUIRKS) ? 2 : (!mxClient.IS_IE11) ? 1 : 0;\n\n/**\n * Variable: blurEnabled\n *\n * If <focusLost> should be called if <textarea> loses the focus. Default is false.\n */\nmxCellEditor.prototype.blurEnabled = false;\n\n/**\n * Variable: initialValue\n * \n * Holds the initial editing value to check if the current value was modified.\n */\nmxCellEditor.prototype.initialValue = null;\n\n/**\n * Function: init\n *\n * Creates the <textarea> and installs the event listeners. The key handler\n * updates the <modified> state.\n */\nmxCellEditor.prototype.init = function ()\n{\n\tthis.textarea = document.createElement('div');\n\tthis.textarea.className = 'mxCellEditor mxPlainTextEditor';\n\tthis.textarea.contentEditable = true;\n\t\n\t// Workaround for selection outside of DIV if height is 0\n\tif (mxClient.IS_GC)\n\t{\n\t\tthis.textarea.style.minHeight = '1em';\n\t}\n\n\tthis.textarea.style.position = ((this.isLegacyEditor())) ? 'absolute' : 'relative';\n\tthis.installListeners(this.textarea);\n};\n\n/**\n * Function: applyValue\n * \n * Called in <stopEditing> if cancel is false to invoke <mxGraph.labelChanged>.\n */\nmxCellEditor.prototype.applyValue = function(state, value)\n{\n\tthis.graph.labelChanged(state.cell, value, this.trigger);\n};\n\n/**\n * Function: getInitialValue\n * \n * Gets the initial editing value for the given cell.\n */\nmxCellEditor.prototype.getInitialValue = function(state, trigger)\n{\n\tvar result = mxUtils.htmlEntities(this.graph.getEditingValue(state.cell, trigger), false);\n\t\n    // Workaround for trailing line breaks being ignored in the editor\n\tif (!mxClient.IS_QUIRKS && document.documentMode != 8 && document.documentMode != 9 &&\n\t\tdocument.documentMode != 10)\n\t{\n\t\tresult = mxUtils.replaceTrailingNewlines(result, '<div><br></div>');\n\t}\n    \n    return result.replace(/\\n/g, '<br>');\n};\n\n/**\n * Function: getCurrentValue\n * \n * Returns the current editing value.\n */\nmxCellEditor.prototype.getCurrentValue = function(state)\n{\n\treturn mxUtils.extractTextWithWhitespace(this.textarea.childNodes);\n};\n\n/**\n * Function: isCancelEditingKeyEvent\n * \n * Returns true if <escapeCancelsEditing> is true and shift, control and meta\n * are not pressed.\n */\nmxCellEditor.prototype.isCancelEditingKeyEvent = function(evt)\n{\n\treturn this.escapeCancelsEditing || mxEvent.isShiftDown(evt) || mxEvent.isControlDown(evt) || mxEvent.isMetaDown(evt);\n};\n\n/**\n * Function: installListeners\n * \n * Installs listeners for focus, change and standard key event handling.\n */\nmxCellEditor.prototype.installListeners = function(elt)\n{\n\t// Applies value if focus is lost\n\tmxEvent.addListener(elt, 'blur', mxUtils.bind(this, function(evt)\n\t{\n\t\tif (this.blurEnabled)\n\t\t{\n\t\t\tthis.focusLost(evt);\n\t\t}\n\t}));\n\n\t// Updates modified state and handles placeholder text\n\tmxEvent.addListener(elt, 'keydown', mxUtils.bind(this, function(evt)\n\t{\n\t\tif (!mxEvent.isConsumed(evt))\n\t\t{\n\t\t\tif (this.isStopEditingEvent(evt))\n\t\t\t{\n\t\t\t\tthis.graph.stopEditing(false);\n\t\t\t\tmxEvent.consume(evt);\n\t\t\t}\n\t\t\telse if (evt.keyCode == 27 /* Escape */)\n\t\t\t{\n\t\t\t\tthis.graph.stopEditing(this.isCancelEditingKeyEvent(evt));\n\t\t\t\tmxEvent.consume(evt);\n\t\t\t}\n\t\t}\n\t}));\n\n\t// Keypress only fires if printable key was pressed and handles removing the empty placeholder\n\tvar keypressHandler = mxUtils.bind(this, function(evt)\n\t{\n\t\tif (this.editingCell != null)\n\t\t{\n\t\t\t// Clears the initial empty label on the first keystroke\n\t\t\t// and workaround for FF which fires keypress for delete and backspace\n\t\t\tif (this.clearOnChange && elt.innerHTML == this.getEmptyLabelText() &&\n\t\t\t\t(!mxClient.IS_FF || (evt.keyCode != 8 /* Backspace */ && evt.keyCode != 46 /* Delete */)))\n\t\t\t{\n\t\t\t\tthis.clearOnChange = false;\n\t\t\t\telt.innerHTML = '';\n\t\t\t}\n\t\t}\n\t});\n\n\tmxEvent.addListener(elt, 'keypress', keypressHandler);\n\tmxEvent.addListener(elt, 'paste', keypressHandler);\n\t\n\t// Handler for updating the empty label text value after a change\n\tvar keyupHandler = mxUtils.bind(this, function(evt)\n\t{\n\t\tif (this.editingCell != null)\n\t\t{\n\t\t\t// Uses an optional text value for sempty labels which is cleared\n\t\t\t// when the first keystroke appears. This makes it easier to see\n\t\t\t// that a label is being edited even if the label is empty.\n\t\t\t// In Safari and FF, an empty text is represented by <BR> which isn't enough to force a valid size\n\t\t\tif (this.textarea.innerHTML.length == 0 || this.textarea.innerHTML == '<br>')\n\t\t\t{\n\t\t\t\tthis.textarea.innerHTML = this.getEmptyLabelText();\n\t\t\t\tthis.clearOnChange = this.textarea.innerHTML.length > 0;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tthis.clearOnChange = false;\n\t\t\t}\n\t\t}\n\t});\n\n\tmxEvent.addListener(elt, (!mxClient.IS_IE11 && !mxClient.IS_IE) ? 'input' : 'keyup', keyupHandler);\n\tmxEvent.addListener(elt, 'cut', keyupHandler);\n\tmxEvent.addListener(elt, 'paste', keyupHandler);\n\n\t// Adds automatic resizing of the textbox while typing using input, keyup and/or DOM change events\n\tvar evtName = (!mxClient.IS_IE11 && !mxClient.IS_IE) ? 'input' : 'keydown';\n\t\n\tvar resizeHandler = mxUtils.bind(this, function(evt)\n\t{\n\t\tif (this.editingCell != null && this.autoSize && !mxEvent.isConsumed(evt))\n\t\t{\n\t\t\t// Asynchronous is needed for keydown and shows better results for input events overall\n\t\t\t// (ie non-blocking and cases where the offsetWidth/-Height was wrong at this time)\n\t\t\tif (this.resizeThread != null)\n\t\t\t{\n\t\t\t\twindow.clearTimeout(this.resizeThread);\n\t\t\t}\n\t\t\t\n\t\t\tthis.resizeThread = window.setTimeout(mxUtils.bind(this, function()\n\t\t\t{\n\t\t\t\tthis.resizeThread = null;\n\t\t\t\tthis.resize();\n\t\t\t}), 0);\n\t\t}\n\t});\n\t\n\tmxEvent.addListener(elt, evtName, resizeHandler);\n\n\tif (document.documentMode >= 9)\n\t{\n\t\tmxEvent.addListener(elt, 'DOMNodeRemoved', resizeHandler);\n\t\tmxEvent.addListener(elt, 'DOMNodeInserted', resizeHandler);\n\t}\n\telse\n\t{\n\t\tmxEvent.addListener(elt, 'cut', resizeHandler);\n\t\tmxEvent.addListener(elt, 'paste', resizeHandler);\n\t}\n};\n\n/**\n * Function: isStopEditingEvent\n * \n * Returns true if the given keydown event should stop cell editing. This\n * returns true if F2 is pressed of if <mxGraph.enterStopsCellEditing> is true\n * and enter is pressed without control or shift.\n */\nmxCellEditor.prototype.isStopEditingEvent = function(evt)\n{\n\treturn evt.keyCode == 113 /* F2 */ || (this.graph.isEnterStopsCellEditing() &&\n\t\tevt.keyCode == 13 /* Enter */ && !mxEvent.isControlDown(evt) &&\n\t\t!mxEvent.isShiftDown(evt));\n};\n\n/**\n * Function: isEventSource\n * \n * Returns true if this editor is the source for the given native event.\n */\nmxCellEditor.prototype.isEventSource = function(evt)\n{\n\treturn mxEvent.getSource(evt) == this.textarea;\n};\n\n/**\n * Function: resize\n * \n * Returns <modified>.\n */\nmxCellEditor.prototype.resize = function()\n{\n\tvar state = this.graph.getView().getState(this.editingCell);\n\t\n\tif (state == null)\n\t{\n\t\tthis.stopEditing(true);\n\t}\n\telse if (this.textarea != null)\n\t{\n\t\tvar isEdge = this.graph.getModel().isEdge(state.cell);\n \t\tvar scale = this.graph.getView().scale;\n \t\tvar m = null;\n\t\t\n\t\tif (!this.autoSize || (state.style[mxConstants.STYLE_OVERFLOW] == 'fill'))\n\t\t{\n\t\t\t// Specifies the bounds of the editor box\n\t\t\tthis.bounds = this.getEditorBounds(state);\n\t\t\tthis.textarea.style.width = Math.round(this.bounds.width / scale) + 'px';\n\t\t\tthis.textarea.style.height = Math.round(this.bounds.height / scale) + 'px';\n\t\t\t\n\t\t\t// FIXME: Offset when scaled\n\t\t\tif (document.documentMode == 8 || mxClient.IS_QUIRKS)\n\t\t\t{\n\t\t\t\tthis.textarea.style.left = Math.round(this.bounds.x) + 'px';\n\t\t\t\tthis.textarea.style.top = Math.round(this.bounds.y) + 'px';\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tthis.textarea.style.left = Math.max(0, Math.round(this.bounds.x + 1)) + 'px';\n\t\t\t\tthis.textarea.style.top = Math.max(0, Math.round(this.bounds.y + 1)) + 'px';\n\t\t\t}\n\t\t\t\n\t\t\t// Installs native word wrapping and avoids word wrap for empty label placeholder\n\t\t\tif (this.graph.isWrapping(state.cell) && (this.bounds.width >= 2 || this.bounds.height >= 2) &&\n\t\t\t\tthis.textarea.innerHTML != this.getEmptyLabelText())\n\t\t\t{\n\t\t\t\tthis.textarea.style.wordWrap = mxConstants.WORD_WRAP;\n\t\t\t\tthis.textarea.style.whiteSpace = 'normal';\n\t\t\t\t\n\t\t\t\tif (state.style[mxConstants.STYLE_OVERFLOW] != 'fill')\n\t\t\t\t{\n\t\t\t\t\tthis.textarea.style.width = Math.round(this.bounds.width / scale) + this.wordWrapPadding + 'px';\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tthis.textarea.style.whiteSpace = 'nowrap';\n\t\t\t\t\n\t\t\t\tif (state.style[mxConstants.STYLE_OVERFLOW] != 'fill')\n\t\t\t\t{\n\t\t\t\t\tthis.textarea.style.width = '';\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse\n\t \t{\n\t \t\tvar lw = mxUtils.getValue(state.style, mxConstants.STYLE_LABEL_WIDTH, null);\n\t\t\tm = (state.text != null) ? state.text.margin : null;\n\t\t\t\n\t\t\tif (m == null)\n\t\t\t{\n\t\t\t\tm = mxUtils.getAlignmentAsPoint(mxUtils.getValue(state.style, mxConstants.STYLE_ALIGN, mxConstants.ALIGN_CENTER),\n\t\t\t\t\t\tmxUtils.getValue(state.style, mxConstants.STYLE_VERTICAL_ALIGN, mxConstants.ALIGN_MIDDLE));\n\t\t\t}\n\t\t\t\n\t \t\tif (isEdge)\n\t\t\t{\n\t\t\t\tthis.bounds = new mxRectangle(state.absoluteOffset.x, state.absoluteOffset.y, 0, 0);\n\t\t\t\t\n\t\t\t\tif (lw != null)\n\t\t\t \t{\n\t\t\t\t\tvar tmp = (parseFloat(lw) + 2) * scale;\n\t\t\t\t\tthis.bounds.width = tmp;\n\t\t\t\t\tthis.bounds.x += m.x * tmp;\n\t\t\t \t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tvar bds = mxRectangle.fromRectangle(state);\n\t\t\t\tvar hpos = mxUtils.getValue(state.style, mxConstants.STYLE_LABEL_POSITION, mxConstants.ALIGN_CENTER);\n\t\t\t\tvar vpos = mxUtils.getValue(state.style, mxConstants.STYLE_VERTICAL_LABEL_POSITION, mxConstants.ALIGN_MIDDLE);\n\n\t\t\t\tbds = (state.shape != null && hpos == mxConstants.ALIGN_CENTER && vpos == mxConstants.ALIGN_MIDDLE) ? state.shape.getLabelBounds(bds) : bds;\n\t\t\t \t\n\t\t\t \tif (lw != null)\n\t\t\t \t{\n\t\t\t \t\tbds.width = parseFloat(lw) * scale;\n\t\t\t \t}\n\t\t\t \t\n\t\t\t \tif (!state.view.graph.cellRenderer.legacySpacing || state.style[mxConstants.STYLE_OVERFLOW] != 'width')\n\t\t\t \t{\n\t\t\t\t\tvar spacing = parseInt(state.style[mxConstants.STYLE_SPACING] || 2) * scale;\n\t\t\t\t\tvar spacingTop = (parseInt(state.style[mxConstants.STYLE_SPACING_TOP] || 0) + mxText.prototype.baseSpacingTop) * scale + spacing;\n\t\t\t\t\tvar spacingRight = (parseInt(state.style[mxConstants.STYLE_SPACING_RIGHT] || 0) + mxText.prototype.baseSpacingRight) * scale + spacing;\n\t\t\t\t\tvar spacingBottom = (parseInt(state.style[mxConstants.STYLE_SPACING_BOTTOM] || 0) + mxText.prototype.baseSpacingBottom) * scale + spacing;\n\t\t\t\t\tvar spacingLeft = (parseInt(state.style[mxConstants.STYLE_SPACING_LEFT] || 0) + mxText.prototype.baseSpacingLeft) * scale + spacing;\n\t\t\t\t\t\n\t\t\t\t\tvar hpos = mxUtils.getValue(state.style, mxConstants.STYLE_LABEL_POSITION, mxConstants.ALIGN_CENTER);\n\t\t\t\t\tvar vpos = mxUtils.getValue(state.style, mxConstants.STYLE_VERTICAL_LABEL_POSITION, mxConstants.ALIGN_MIDDLE);\n\n\t\t\t\t\tbds = new mxRectangle(bds.x + spacingLeft, bds.y + spacingTop,\n\t\t\t\t\t\tbds.width - ((hpos == mxConstants.ALIGN_CENTER && lw == null) ? (spacingLeft + spacingRight) : 0),\n\t\t\t\t\t\tbds.height - ((vpos == mxConstants.ALIGN_MIDDLE) ? (spacingTop + spacingBottom) : 0));\n\t\t\t \t}\n\n\t\t\t\tthis.bounds = new mxRectangle(bds.x + state.absoluteOffset.x, bds.y + state.absoluteOffset.y, bds.width, bds.height);\n\t\t\t}\n\n\t\t\t// Needed for word wrap inside text blocks with oversize lines to match the final result where\n\t \t\t// the width of the longest line is used as the reference for text alignment in the cell\n\t \t\t// TODO: Fix word wrapping preview for edge labels in helloworld.html\n\t\t\tif (this.graph.isWrapping(state.cell) && (this.bounds.width >= 2 || this.bounds.height >= 2) &&\n\t\t\t\tthis.textarea.innerHTML != this.getEmptyLabelText())\n\t\t\t{\n\t\t\t\tthis.textarea.style.wordWrap = mxConstants.WORD_WRAP;\n\t\t\t\tthis.textarea.style.whiteSpace = 'normal';\n\t\t\t\t\n\t\t \t\t// Forces automatic reflow if text is removed from an oversize label and normal word wrap\n\t\t\t\tvar tmp = Math.round(this.bounds.width / ((document.documentMode == 8) ? scale : scale)) + this.wordWrapPadding;\n\n\t\t\t\tif (this.textarea.style.position != 'relative')\n\t\t\t\t{\n\t\t\t\t\tthis.textarea.style.width = tmp + 'px';\n\t\t\t\t\t\n\t\t\t\t\tif (this.textarea.scrollWidth > tmp)\n\t\t\t\t\t{\n\t\t\t\t\t\tthis.textarea.style.width = this.textarea.scrollWidth + 'px';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tthis.textarea.style.maxWidth = tmp + 'px';\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// KNOWN: Trailing cursor in IE9 quirks mode is not visible\n\t\t\t\tthis.textarea.style.whiteSpace = 'nowrap';\n\t\t\t\tthis.textarea.style.width = '';\n\t\t\t}\n\t\t\t\n\t\t\t// LATER: Keep in visible area, add fine tuning for pixel precision\n\t\t\t// Workaround for wrong measuring in IE8 standards\n\t\t\tif (document.documentMode == 8)\n\t\t\t{\n\t\t\t\tthis.textarea.style.zoom = '1';\n\t\t\t\tthis.textarea.style.height = 'auto';\n\t\t\t}\n\t\t\t\n\t\t\tvar ow = this.textarea.scrollWidth;\n\t\t\tvar oh = this.textarea.scrollHeight;\n\t\t\t\n\t\t\t// TODO: Update CSS width and height if smaller than minResize or remove minResize\n\t\t\t//if (this.minResize != null)\n\t\t\t//{\n\t\t\t//\tow = Math.max(ow, this.minResize.width);\n\t\t\t//\toh = Math.max(oh, this.minResize.height);\n\t\t\t//}\n\t\t\t\n\t\t\t// LATER: Keep in visible area, add fine tuning for pixel precision\n\t\t\tif (document.documentMode == 8)\n\t\t\t{\n\t\t\t\t// LATER: Scaled wrapping and position is wrong in IE8\n\t\t\t\tthis.textarea.style.left = Math.max(0, Math.ceil((this.bounds.x - m.x * (this.bounds.width - (ow + 1) * scale) + ow * (scale - 1) * 0 + (m.x + 0.5) * 2) / scale)) + 'px';\n\t\t\t\tthis.textarea.style.top = Math.max(0, Math.ceil((this.bounds.y - m.y * (this.bounds.height - (oh + 0.5) * scale) + oh * (scale - 1) * 0 + Math.abs(m.y + 0.5) * 1) / scale)) + 'px';\n\t\t\t\t// Workaround for wrong event handling width and height\n\t\t\t\tthis.textarea.style.width = Math.round(ow * scale) + 'px';\n\t\t\t\tthis.textarea.style.height = Math.round(oh * scale) + 'px';\n\t\t\t}\n\t\t\telse if (mxClient.IS_QUIRKS)\n\t\t\t{\t\t\t\n\t\t\t\tthis.textarea.style.left = Math.max(0, Math.ceil(this.bounds.x - m.x * (this.bounds.width - (ow + 1) * scale) + ow * (scale - 1) * 0 + (m.x + 0.5) * 2)) + 'px';\n\t\t\t\tthis.textarea.style.top = Math.max(0, Math.ceil(this.bounds.y - m.y * (this.bounds.height - (oh + 0.5) * scale) + oh * (scale - 1) * 0 + Math.abs(m.y + 0.5) * 1)) + 'px';\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tthis.textarea.style.left = Math.max(0, Math.round(this.bounds.x - m.x * (this.bounds.width - 2)) + 1) + 'px';\n\t\t\t\tthis.textarea.style.top = Math.max(0, Math.round(this.bounds.y - m.y * (this.bounds.height - 4) + ((m.y == -1) ? 3 : 0)) + 1) + 'px';\n\t\t\t}\n\t \t}\n\n\t\tif (mxClient.IS_VML)\n\t\t{\n\t\t\tthis.textarea.style.zoom = scale;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tmxUtils.setPrefixedStyle(this.textarea.style, 'transformOrigin', '0px 0px');\n\t\t\tmxUtils.setPrefixedStyle(this.textarea.style, 'transform',\n\t\t\t\t'scale(' + scale + ',' + scale + ')' + ((m == null) ? '' :\n\t\t\t\t' translate(' + (m.x * 100) + '%,' + (m.y * 100) + '%)'));\n\t\t}\n\t}\n};\n\n/**\n * Function: focusLost\n *\n * Called if the textarea has lost focus.\n */\nmxCellEditor.prototype.focusLost = function()\n{\n\tthis.stopEditing(!this.graph.isInvokesStopCellEditing());\n};\n\n/**\n * Function: getBackgroundColor\n * \n * Returns the background color for the in-place editor. This implementation\n * always returns null.\n */\nmxCellEditor.prototype.getBackgroundColor = function(state)\n{\n\treturn null;\n};\n\n/**\n * Function: isLegacyEditor\n * \n * Returns true if max-width is not supported or if the SVG root element in\n * in the graph does not have CSS position absolute. In these cases the text\n * editor must use CSS position absolute to avoid an offset but it will have\n * a less accurate line wrapping width during the text editing preview. This\n * implementation returns true for IE8- and quirks mode or if the CSS position\n * of the SVG element is not absolute.\n */\nmxCellEditor.prototype.isLegacyEditor = function()\n{\n\tif (mxClient.IS_VML)\n\t{\n\t\treturn true;\n\t}\n\telse\n\t{\n\t\tvar absoluteRoot = false;\n\t\t\n\t\tif (mxClient.IS_SVG)\n\t\t{\n\t\t\tvar root = this.graph.view.getDrawPane().ownerSVGElement;\n\t\t\t\n\t\t\tif (root != null)\n\t\t\t{\n\t\t\t\tabsoluteRoot = mxUtils.getCurrentStyle(root).position == 'absolute';\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn !absoluteRoot;\n\t}\n};\n\n/**\n * Function: startEditing\n *\n * Starts the editor for the given cell.\n * \n * Parameters:\n * \n * cell - <mxCell> to start editing.\n * trigger - Optional mouse event that triggered the editor.\n */\nmxCellEditor.prototype.startEditing = function(cell, trigger)\n{\n\tthis.stopEditing(true);\n\t\n\t// Creates new textarea instance\n\tif (this.textarea == null)\n\t{\n\t\tthis.init();\n\t}\n\t\n\tif (this.graph.tooltipHandler != null)\n\t{\n\t\tthis.graph.tooltipHandler.hideTooltip();\n\t}\n\t\n\tvar state = this.graph.getView().getState(cell);\n\t\n\tif (state != null)\n\t{\n\t\t// Configures the style of the in-place editor\n\t\tvar scale = this.graph.getView().scale;\n\t\tvar size = mxUtils.getValue(state.style, mxConstants.STYLE_FONTSIZE, mxConstants.DEFAULT_FONTSIZE);\n\t\tvar family = mxUtils.getValue(state.style, mxConstants.STYLE_FONTFAMILY, mxConstants.DEFAULT_FONTFAMILY);\n\t\tvar color = mxUtils.getValue(state.style, mxConstants.STYLE_FONTCOLOR, 'black');\n\t\tvar align = mxUtils.getValue(state.style, mxConstants.STYLE_ALIGN, mxConstants.ALIGN_LEFT);\n\t\tvar bold = (mxUtils.getValue(state.style, mxConstants.STYLE_FONTSTYLE, 0) &\n\t\t\t\tmxConstants.FONT_BOLD) == mxConstants.FONT_BOLD;\n\t\tvar italic = (mxUtils.getValue(state.style, mxConstants.STYLE_FONTSTYLE, 0) &\n\t\t\t\tmxConstants.FONT_ITALIC) == mxConstants.FONT_ITALIC;\n\t\tvar uline = (mxUtils.getValue(state.style, mxConstants.STYLE_FONTSTYLE, 0) &\n\t\t\t\tmxConstants.FONT_UNDERLINE) == mxConstants.FONT_UNDERLINE;\n\t\t\n\t\tthis.textarea.style.lineHeight = (mxConstants.ABSOLUTE_LINE_HEIGHT) ? Math.round(size * mxConstants.LINE_HEIGHT) + 'px' : mxConstants.LINE_HEIGHT;\n\t\tthis.textarea.style.backgroundColor = this.getBackgroundColor(state);\n\t\tthis.textarea.style.textDecoration = (uline) ? 'underline' : '';\n\t\tthis.textarea.style.fontWeight = (bold) ? 'bold' : 'normal';\n\t\tthis.textarea.style.fontStyle = (italic) ? 'italic' : '';\n\t\tthis.textarea.style.fontSize = Math.round(size) + 'px';\n\t\tthis.textarea.style.zIndex = this.zIndex;\n\t\tthis.textarea.style.fontFamily = family;\n\t\tthis.textarea.style.textAlign = align;\n\t\tthis.textarea.style.outline = 'none';\n\t\tthis.textarea.style.color = color;\n\t\t\n\t\tvar dir = this.textDirection = mxUtils.getValue(state.style, mxConstants.STYLE_TEXT_DIRECTION, mxConstants.DEFAULT_TEXT_DIRECTION);\n\t\t\n\t\tif (dir == mxConstants.TEXT_DIRECTION_AUTO)\n\t\t{\n\t\t\tif (state != null && state.text != null && state.text.dialect != mxConstants.DIALECT_STRICTHTML &&\n\t\t\t\t!mxUtils.isNode(state.text.value))\n\t\t\t{\n\t\t\t\tdir = state.text.getAutoDirection();\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (dir == mxConstants.TEXT_DIRECTION_LTR || dir == mxConstants.TEXT_DIRECTION_RTL)\n\t\t{\n\t\t\tthis.textarea.setAttribute('dir', dir);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tthis.textarea.removeAttribute('dir');\n\t\t}\n\n\t\t// Sets the initial editing value\n\t\tthis.textarea.innerHTML = this.getInitialValue(state, trigger) || '';\n\t\tthis.initialValue = this.textarea.innerHTML;\n\n\t\t// Uses an optional text value for empty labels which is cleared\n\t\t// when the first keystroke appears. This makes it easier to see\n\t\t// that a label is being edited even if the label is empty.\n\t\tif (this.textarea.innerHTML.length == 0 || this.textarea.innerHTML == '<br>')\n\t\t{\n\t\t\tthis.textarea.innerHTML = this.getEmptyLabelText();\n\t\t\tthis.clearOnChange = true;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tthis.clearOnChange = this.textarea.innerHTML == this.getEmptyLabelText();\n\t\t}\n\n\t\tthis.graph.container.appendChild(this.textarea);\n\t\t\n\t\t// Update this after firing all potential events that could update the cleanOnChange flag\n\t\tthis.editingCell = cell;\n\t\tthis.trigger = trigger;\n\t\tthis.textNode = null;\n\n\t\tif (state.text != null && this.isHideLabel(state))\n\t\t{\n\t\t\tthis.textNode = state.text.node;\n\t\t\tthis.textNode.style.visibility = 'hidden';\n\t\t}\n\n\t\t// Workaround for initial offsetHeight not ready for heading in markup\n\t\tif (this.autoSize && (this.graph.model.isEdge(state.cell) || state.style[mxConstants.STYLE_OVERFLOW] != 'fill'))\n\t\t{\n\t\t\twindow.setTimeout(mxUtils.bind(this, function()\n\t\t\t{\n\t\t\t\tthis.resize();\n\t\t\t}), 0);\n\t\t}\n\t\t\n\t\tthis.resize();\n\t\t\n\t\t// Workaround for NS_ERROR_FAILURE in FF\n\t\ttry\n\t\t{\n\t\t\t// Prefers blinking cursor over no selected text if empty\n\t\t\tthis.textarea.focus();\n\t\t\t\n\t\t\tif (this.isSelectText() && this.textarea.innerHTML.length > 0 &&\n\t\t\t\t(this.textarea.innerHTML != this.getEmptyLabelText() || !this.clearOnChange))\n\t\t\t{\n\t\t\t\tdocument.execCommand('selectAll', false, null);\n\t\t\t}\n\t\t}\n\t\tcatch (e)\n\t\t{\n\t\t\t// ignore\n\t\t}\n\t}\n};\n\n/**\n * Function: isSelectText\n * \n * Returns <selectText>.\n */\nmxCellEditor.prototype.isSelectText = function()\n{\n\treturn this.selectText;\n};\n\n/**\n * Function: isSelectText\n * \n * Returns <selectText>.\n */\nmxCellEditor.prototype.clearSelection = function()\n{\n\tvar selection = null;\n\t\n\tif (window.getSelection)\n\t{\n\t\tselection = window.getSelection();\n\t}\n\telse if (document.selection)\n\t{\n\t\tselection = document.selection;\n\t}\n\t\n\tif (selection != null)\n\t{\n\t\tif (selection.empty)\n\t\t{\n\t\t\tselection.empty();\n\t\t}\n\t\telse if (selection.removeAllRanges)\n\t\t{\n\t\t\tselection.removeAllRanges();\n\t\t}\n\t}\n};\n\n/**\n * Function: stopEditing\n *\n * Stops the editor and applies the value if cancel is false.\n */\nmxCellEditor.prototype.stopEditing = function(cancel)\n{\n\tcancel = cancel || false;\n\t\n\tif (this.editingCell != null)\n\t{\n\t\tif (this.textNode != null)\n\t\t{\n\t\t\tthis.textNode.style.visibility = 'visible';\n\t\t\tthis.textNode = null;\n\t\t}\n\n\t\tvar state = (!cancel) ? this.graph.view.getState(this.editingCell) : null;\n\n\t\tvar initial = this.initialValue;\n\t\tthis.initialValue = null;\n\t\tthis.editingCell = null;\n\t\tthis.trigger = null;\n\t\tthis.bounds = null;\n\t\tthis.textarea.blur();\n\t\tthis.clearSelection();\n\t\t\n\t\tif (this.textarea.parentNode != null)\n\t\t{\n\t\t\tthis.textarea.parentNode.removeChild(this.textarea);\n\t\t}\n\t\t\n\t\tif (this.clearOnChange && this.textarea.innerHTML == this.getEmptyLabelText())\n\t\t{\n\t\t\tthis.textarea.innerHTML = '';\n\t\t\tthis.clearOnChange = false;\n\t\t}\n\t\t\n\t\tif (state != null && this.textarea.innerHTML != initial)\n\t\t{\n\t\t\tthis.prepareTextarea();\n\t\t\tvar value = this.getCurrentValue(state);\n\t\t\t\n\t\t\tif (value != null)\n\t\t\t{\n\t\t\t\tthis.applyValue(state, value);\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Forces new instance on next edit for undo history reset\n\t\tmxEvent.release(this.textarea);\n\t\tthis.textarea = null;\n\t}\n};\n\n/**\n * Function: prepareTextarea\n * \n * Prepares the textarea for getting its value in <stopEditing>.\n * This implementation removes the extra trailing linefeed in Firefox.\n */\nmxCellEditor.prototype.prepareTextarea = function()\n{\n\tif (mxClient.IS_FF && this.textarea.lastChild != null &&\n\t\tthis.textarea.lastChild.nodeName == 'BR')\n\t{\n\t\tthis.textarea.removeChild(this.textarea.lastChild);\n\t}\n};\n\n/**\n * Function: isHideLabel\n * \n * Returns true if the label should be hidden while the cell is being\n * edited.\n */\nmxCellEditor.prototype.isHideLabel = function(state)\n{\n\treturn true;\n};\n\n/**\n * Function: getMinimumSize\n * \n * Returns the minimum width and height for editing the given state.\n */\nmxCellEditor.prototype.getMinimumSize = function(state)\n{\n\tvar scale = this.graph.getView().scale;\n\t\n\treturn new mxRectangle(0, 0, (state.text == null) ? 30 : state.text.size * scale + 20,\n\t\t\t(this.textarea.style.textAlign == 'left') ? 120 : 40);\n};\n\n/**\n * Function: getEditorBounds\n * \n * Returns the <mxRectangle> that defines the bounds of the editor.\n */\nmxCellEditor.prototype.getEditorBounds = function(state)\n{\n\tvar isEdge = this.graph.getModel().isEdge(state.cell);\n\tvar scale = this.graph.getView().scale;\n\tvar minSize = this.getMinimumSize(state);\n\tvar minWidth = minSize.width;\n \tvar minHeight = minSize.height;\n \tvar result = null;\n \t\n \tif (!isEdge && state.view.graph.cellRenderer.legacySpacing && state.style[mxConstants.STYLE_OVERFLOW] == 'fill')\n \t{\n \t\tresult = state.shape.getLabelBounds(mxRectangle.fromRectangle(state));\n \t}\n \telse\n \t{\n\t\tvar spacing = parseInt(state.style[mxConstants.STYLE_SPACING] || 0) * scale;\n\t\tvar spacingTop = (parseInt(state.style[mxConstants.STYLE_SPACING_TOP] || 0) + mxText.prototype.baseSpacingTop) * scale + spacing;\n\t\tvar spacingRight = (parseInt(state.style[mxConstants.STYLE_SPACING_RIGHT] || 0) + mxText.prototype.baseSpacingRight) * scale + spacing;\n\t\tvar spacingBottom = (parseInt(state.style[mxConstants.STYLE_SPACING_BOTTOM] || 0) + mxText.prototype.baseSpacingBottom) * scale + spacing;\n\t\tvar spacingLeft = (parseInt(state.style[mxConstants.STYLE_SPACING_LEFT] || 0) + mxText.prototype.baseSpacingLeft) * scale + spacing;\n\t\n\t \tresult = new mxRectangle(state.x, state.y,\n\t \t\t Math.max(minWidth, state.width - spacingLeft - spacingRight),\n\t \t\t Math.max(minHeight, state.height - spacingTop - spacingBottom));\n\t\tvar hpos = mxUtils.getValue(state.style, mxConstants.STYLE_LABEL_POSITION, mxConstants.ALIGN_CENTER);\n\t\tvar vpos = mxUtils.getValue(state.style, mxConstants.STYLE_VERTICAL_LABEL_POSITION, mxConstants.ALIGN_MIDDLE);\n\t\t\n\t\tresult = (state.shape != null && hpos == mxConstants.ALIGN_CENTER && vpos == mxConstants.ALIGN_MIDDLE) ? state.shape.getLabelBounds(result) : result;\n\t\n\t\tif (isEdge)\n\t\t{\n\t\t\tresult.x = state.absoluteOffset.x;\n\t\t\tresult.y = state.absoluteOffset.y;\n\t\n\t\t\tif (state.text != null && state.text.boundingBox != null)\n\t\t\t{\n\t\t\t\t// Workaround for label containing just spaces in which case\n\t\t\t\t// the bounding box location contains negative numbers \n\t\t\t\tif (state.text.boundingBox.x > 0)\n\t\t\t\t{\n\t\t\t\t\tresult.x = state.text.boundingBox.x;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (state.text.boundingBox.y > 0)\n\t\t\t\t{\n\t\t\t\t\tresult.y = state.text.boundingBox.y;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse if (state.text != null && state.text.boundingBox != null)\n\t\t{\n\t\t\tresult.x = Math.min(result.x, state.text.boundingBox.x);\n\t\t\tresult.y = Math.min(result.y, state.text.boundingBox.y);\n\t\t}\n\t\n\t\tresult.x += spacingLeft;\n\t\tresult.y += spacingTop;\n\t\n\t\tif (state.text != null && state.text.boundingBox != null)\n\t\t{\n\t\t\tif (!isEdge)\n\t\t\t{\n\t\t\t\tresult.width = Math.max(result.width, state.text.boundingBox.width);\n\t\t\t\tresult.height = Math.max(result.height, state.text.boundingBox.height);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tresult.width = Math.max(minWidth, state.text.boundingBox.width);\n\t\t\t\tresult.height = Math.max(minHeight, state.text.boundingBox.height);\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Applies the horizontal and vertical label positions\n\t\tif (this.graph.getModel().isVertex(state.cell))\n\t\t{\n\t\t\tvar horizontal = mxUtils.getValue(state.style, mxConstants.STYLE_LABEL_POSITION, mxConstants.ALIGN_CENTER);\n\t\n\t\t\tif (horizontal == mxConstants.ALIGN_LEFT)\n\t\t\t{\n\t\t\t\tresult.x -= state.width;\n\t\t\t}\n\t\t\telse if (horizontal == mxConstants.ALIGN_RIGHT)\n\t\t\t{\n\t\t\t\tresult.x += state.width;\n\t\t\t}\n\t\n\t\t\tvar vertical = mxUtils.getValue(state.style, mxConstants.STYLE_VERTICAL_LABEL_POSITION, mxConstants.ALIGN_MIDDLE);\n\t\n\t\t\tif (vertical == mxConstants.ALIGN_TOP)\n\t\t\t{\n\t\t\t\tresult.y -= state.height;\n\t\t\t}\n\t\t\telse if (vertical == mxConstants.ALIGN_BOTTOM)\n\t\t\t{\n\t\t\t\tresult.y += state.height;\n\t\t\t}\n\t\t}\n \t}\n \t\n \treturn new mxRectangle(Math.round(result.x), Math.round(result.y), Math.round(result.width), Math.round(result.height));\n};\n\n/**\n * Function: getEmptyLabelText\n *\n * Returns the initial label value to be used of the label of the given\n * cell is empty. This label is displayed and cleared on the first keystroke.\n * This implementation returns <emptyLabelText>.\n * \n * Parameters:\n * \n * cell - <mxCell> for which a text for an empty editing box should be\n * returned.\n */\nmxCellEditor.prototype.getEmptyLabelText = function (cell)\n{\n\treturn this.emptyLabelText;\n};\n\n/**\n * Function: getEditingCell\n *\n * Returns the cell that is currently being edited or null if no cell is\n * being edited.\n */\nmxCellEditor.prototype.getEditingCell = function ()\n{\n\treturn this.editingCell;\n};\n\n/**\n * Function: destroy\n *\n * Destroys the editor and removes all associated resources.\n */\nmxCellEditor.prototype.destroy = function ()\n{\n\tif (this.textarea != null)\n\t{\n\t\tmxEvent.release(this.textarea);\n\t\t\n\t\tif (this.textarea.parentNode != null)\n\t\t{\n\t\t\tthis.textarea.parentNode.removeChild(this.textarea);\n\t\t}\n\t\t\n\t\tthis.textarea = null;\n\n\t}\n\t\t\t\n\tif (this.changeHandler != null)\n\t{\n\t\tthis.graph.getModel().removeListener(this.changeHandler);\n\t\tthis.changeHandler = null;\n\t}\n\n\tif (this.zoomHandler)\n\t{\n\t\tthis.graph.view.removeListener(this.zoomHandler);\n\t\tthis.zoomHandler = null;\n\t}\n};\n"
  },
  {
    "path": "static/cherry/drawio_demo/src/js/view/mxCellOverlay.js",
    "content": "/**\n * Copyright (c) 2006-2015, JGraph Ltd\n * Copyright (c) 2006-2015, Gaudenz Alder\n */\n/**\n * Class: mxCellOverlay\n *\n * Extends <mxEventSource> to implement a graph overlay, represented by an icon\n * and a tooltip. Overlays can handle and fire <click> events and are added to\n * the graph using <mxGraph.addCellOverlay>, and removed using\n * <mxGraph.removeCellOverlay>, or <mxGraph.removeCellOverlays> to remove all overlays.\n * The <mxGraph.getCellOverlays> function returns the array of overlays for a given\n * cell in a graph. If multiple overlays exist for the same cell, then\n * <getBounds> should be overridden in at least one of the overlays.\n * \n * Overlays appear on top of all cells in a special layer. If this is not\n * desirable, then the image must be rendered as part of the shape or label of\n * the cell instead.\n *\n * Example:\n * \n * The following adds a new overlays for a given vertex and selects the cell\n * if the overlay is clicked.\n *\n * (code)\n * var overlay = new mxCellOverlay(img, html);\n * graph.addCellOverlay(vertex, overlay);\n * overlay.addListener(mxEvent.CLICK, function(sender, evt)\n * {\n *   var cell = evt.getProperty('cell');\n *   graph.setSelectionCell(cell);\n * });\n * (end)\n * \n * For cell overlays to be printed use <mxPrintPreview.printOverlays>.\n *\n * Event: mxEvent.CLICK\n *\n * Fires when the user clicks on the overlay. The <code>event</code> property\n * contains the corresponding mouse event and the <code>cell</code> property\n * contains the cell. For touch devices this is fired if the element receives\n * a touchend event.\n * \n * Constructor: mxCellOverlay\n *\n * Constructs a new overlay using the given image and tooltip.\n * \n * Parameters:\n * \n * image - <mxImage> that represents the icon to be displayed.\n * tooltip - Optional string that specifies the tooltip.\n * align - Optional horizontal alignment for the overlay. Possible\n * values are <ALIGN_LEFT>, <ALIGN_CENTER> and <ALIGN_RIGHT>\n * (default).\n * verticalAlign - Vertical alignment for the overlay. Possible\n * values are <ALIGN_TOP>, <ALIGN_MIDDLE> and <ALIGN_BOTTOM>\n * (default).\n */\nfunction mxCellOverlay(image, tooltip, align, verticalAlign, offset, cursor)\n{\n\tthis.image = image;\n\tthis.tooltip = tooltip;\n\tthis.align = (align != null) ? align : this.align;\n\tthis.verticalAlign = (verticalAlign != null) ? verticalAlign : this.verticalAlign;\n\tthis.offset = (offset != null) ? offset : new mxPoint();\n\tthis.cursor = (cursor != null) ? cursor : 'help';\n};\n\n/**\n * Extends mxEventSource.\n */\nmxCellOverlay.prototype = new mxEventSource();\nmxCellOverlay.prototype.constructor = mxCellOverlay;\n\n/**\n * Variable: image\n *\n * Holds the <mxImage> to be used as the icon.\n */\nmxCellOverlay.prototype.image = null;\n\n/**\n * Variable: tooltip\n * \n * Holds the optional string to be used as the tooltip.\n */\nmxCellOverlay.prototype.tooltip = null;\n\n/**\n * Variable: align\n * \n * Holds the horizontal alignment for the overlay. Default is\n * <mxConstants.ALIGN_RIGHT>. For edges, the overlay always appears in the\n * center of the edge.\n */\nmxCellOverlay.prototype.align = mxConstants.ALIGN_RIGHT;\n\n/**\n * Variable: verticalAlign\n * \n * Holds the vertical alignment for the overlay. Default is\n * <mxConstants.ALIGN_BOTTOM>. For edges, the overlay always appears in the\n * center of the edge.\n */\nmxCellOverlay.prototype.verticalAlign = mxConstants.ALIGN_BOTTOM;\n\n/**\n * Variable: offset\n * \n * Holds the offset as an <mxPoint>. The offset will be scaled according to the\n * current scale.\n */\nmxCellOverlay.prototype.offset = null;\n\n/**\n * Variable: cursor\n * \n * Holds the cursor for the overlay. Default is 'help'.\n */\nmxCellOverlay.prototype.cursor = null;\n\n/**\n * Variable: defaultOverlap\n * \n * Defines the overlapping for the overlay, that is, the proportional distance\n * from the origin to the point defined by the alignment. Default is 0.5.\n */\nmxCellOverlay.prototype.defaultOverlap = 0.5;\n\n/**\n * Function: getBounds\n * \n * Returns the bounds of the overlay for the given <mxCellState> as an\n * <mxRectangle>. This should be overridden when using multiple overlays\n * per cell so that the overlays do not overlap.\n * \n * The following example will place the overlay along an edge (where\n * x=[-1..1] from the start to the end of the edge and y is the\n * orthogonal offset in px).\n * \n * (code)\n * overlay.getBounds = function(state)\n * {\n *   var bounds = mxCellOverlay.prototype.getBounds.apply(this, arguments);\n *   \n *   if (state.view.graph.getModel().isEdge(state.cell))\n *   {\n *     var pt = state.view.getPoint(state, {x: 0, y: 0, relative: true});\n *     \n *     bounds.x = pt.x - bounds.width / 2;\n *     bounds.y = pt.y - bounds.height / 2;\n *   }\n *   \n *   return bounds;\n * };\n * (end)\n * \n * Parameters:\n * \n * state - <mxCellState> that represents the current state of the\n * associated cell.\n */\nmxCellOverlay.prototype.getBounds = function(state)\n{\n\tvar isEdge = state.view.graph.getModel().isEdge(state.cell);\n\tvar s = state.view.scale;\n\tvar pt = null;\n\n\tvar w = this.image.width;\n\tvar h = this.image.height;\n\t\n\tif (isEdge)\n\t{\n\t\tvar pts = state.absolutePoints;\n\t\t\n\t\tif (pts.length % 2 == 1)\n\t\t{\n\t\t\tpt = pts[Math.floor(pts.length / 2)];\n\t\t}\n\t\telse\n\t\t{\n\t\t\tvar idx = pts.length / 2;\n\t\t\tvar p0 = pts[idx-1];\n\t\t\tvar p1 = pts[idx];\n\t\t\tpt = new mxPoint(p0.x + (p1.x - p0.x) / 2,\n\t\t\t\tp0.y + (p1.y - p0.y) / 2);\n\t\t}\n\t}\n\telse\n\t{\n\t\tpt = new mxPoint();\n\t\t\n\t\tif (this.align == mxConstants.ALIGN_LEFT)\n\t\t{\n\t\t\tpt.x = state.x;\n\t\t}\n\t\telse if (this.align == mxConstants.ALIGN_CENTER)\n\t\t{\n\t\t\tpt.x = state.x + state.width / 2;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tpt.x = state.x + state.width;\n\t\t}\n\t\t\n\t\tif (this.verticalAlign == mxConstants.ALIGN_TOP)\n\t\t{\n\t\t\tpt.y = state.y;\n\t\t}\n\t\telse if (this.verticalAlign == mxConstants.ALIGN_MIDDLE)\n\t\t{\n\t\t\tpt.y = state.y + state.height / 2;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tpt.y = state.y + state.height;\n\t\t}\n\t}\n\n\treturn new mxRectangle(Math.round(pt.x - (w * this.defaultOverlap - this.offset.x) * s),\n\t\tMath.round(pt.y - (h * this.defaultOverlap - this.offset.y) * s), w * s, h * s);\n};\n\n/**\n * Function: toString\n * \n * Returns the textual representation of the overlay to be used as the\n * tooltip. This implementation returns <tooltip>.\n */\nmxCellOverlay.prototype.toString = function()\n{\n\treturn this.tooltip;\n};\n"
  },
  {
    "path": "static/cherry/drawio_demo/src/js/view/mxCellRenderer.js",
    "content": "/**\n * Copyright (c) 2006-2017, JGraph Ltd\n * Copyright (c) 2006-2017, Gaudenz Alder\n */\n/**\n * Class: mxCellRenderer\n * \n * Renders cells into a document object model. The <defaultShapes> is a global\n * map of shapename, constructor pairs that is used in all instances. You can\n * get a list of all available shape names using the following code.\n * \n * In general the cell renderer is in charge of creating, redrawing and\n * destroying the shape and label associated with a cell state, as well as\n * some other graphical objects, namely controls and overlays. The shape\n * hieararchy in the display (ie. the hierarchy in which the DOM nodes\n * appear in the document) does not reflect the cell hierarchy. The shapes\n * are a (flat) sequence of shapes and labels inside the draw pane of the\n * graph view, with some exceptions, namely the HTML labels being placed\n * directly inside the graph container for certain browsers.\n * \n * (code)\n * mxLog.show();\n * for (var i in mxCellRenderer.defaultShapes)\n * {\n *   mxLog.debug(i);\n * }\n * (end)\n *\n * Constructor: mxCellRenderer\n * \n * Constructs a new cell renderer with the following built-in shapes:\n * arrow, rectangle, ellipse, rhombus, image, line, label, cylinder,\n * swimlane, connector, actor and cloud.\n */\nfunction mxCellRenderer() { };\n\n/**\n * Variable: defaultShapes\n * \n * Static array that contains the globally registered shapes which are\n * known to all instances of this class. For adding new shapes you should\n * use the static <mxCellRenderer.registerShape> function.\n */\nmxCellRenderer.defaultShapes = new Object();\n\n/**\n * Variable: defaultEdgeShape\n * \n * Defines the default shape for edges. Default is <mxConnector>.\n */\nmxCellRenderer.prototype.defaultEdgeShape = mxConnector;\n\n/**\n * Variable: defaultVertexShape\n * \n * Defines the default shape for vertices. Default is <mxRectangleShape>.\n */\nmxCellRenderer.prototype.defaultVertexShape = mxRectangleShape;\n\n/**\n * Variable: defaultTextShape\n * \n * Defines the default shape for labels. Default is <mxText>.\n */\nmxCellRenderer.prototype.defaultTextShape = mxText;\n\n/**\n * Variable: legacyControlPosition\n * \n * Specifies if the folding icon should ignore the horizontal\n * orientation of a swimlane. Default is true.\n */\nmxCellRenderer.prototype.legacyControlPosition = true;\n\n/**\n * Variable: legacySpacing\n * \n * Specifies if spacing and label position should be ignored if overflow is\n * fill or width. Default is true for backwards compatiblity.\n */\nmxCellRenderer.prototype.legacySpacing = true;\n\n/**\n * Variable: antiAlias\n * \n * Anti-aliasing option for new shapes. Default is true.\n */\nmxCellRenderer.prototype.antiAlias = true;\n\n/**\n * Variable: minSvgStrokeWidth\n * \n * Minimum stroke width for SVG output.\n */\nmxCellRenderer.prototype.minSvgStrokeWidth = 1;\n\n/**\n * Variable: forceControlClickHandler\n * \n * Specifies if the enabled state of the graph should be ignored in the control\n * click handler (to allow folding in disabled graphs). Default is false.\n */\nmxCellRenderer.prototype.forceControlClickHandler = false;\n\n/**\n * Function: registerShape\n * \n * Registers the given constructor under the specified key in this instance\n * of the renderer.\n * \n * Example:\n * \n * (code)\n * mxCellRenderer.registerShape(mxConstants.SHAPE_RECTANGLE, mxRectangleShape);\n * (end)\n * \n * Parameters:\n * \n * key - String representing the shape name.\n * shape - Constructor of the <mxShape> subclass.\n */\nmxCellRenderer.registerShape = function(key, shape)\n{\n\tmxCellRenderer.defaultShapes[key] = shape;\n};\n\n// Adds default shapes into the default shapes array\nmxCellRenderer.registerShape(mxConstants.SHAPE_RECTANGLE, mxRectangleShape);\nmxCellRenderer.registerShape(mxConstants.SHAPE_ELLIPSE, mxEllipse);\nmxCellRenderer.registerShape(mxConstants.SHAPE_RHOMBUS, mxRhombus);\nmxCellRenderer.registerShape(mxConstants.SHAPE_CYLINDER, mxCylinder);\nmxCellRenderer.registerShape(mxConstants.SHAPE_CONNECTOR, mxConnector);\nmxCellRenderer.registerShape(mxConstants.SHAPE_ACTOR, mxActor);\nmxCellRenderer.registerShape(mxConstants.SHAPE_TRIANGLE, mxTriangle);\nmxCellRenderer.registerShape(mxConstants.SHAPE_HEXAGON, mxHexagon);\nmxCellRenderer.registerShape(mxConstants.SHAPE_CLOUD, mxCloud);\nmxCellRenderer.registerShape(mxConstants.SHAPE_LINE, mxLine);\nmxCellRenderer.registerShape(mxConstants.SHAPE_ARROW, mxArrow);\nmxCellRenderer.registerShape(mxConstants.SHAPE_ARROW_CONNECTOR, mxArrowConnector);\nmxCellRenderer.registerShape(mxConstants.SHAPE_DOUBLE_ELLIPSE, mxDoubleEllipse);\nmxCellRenderer.registerShape(mxConstants.SHAPE_SWIMLANE, mxSwimlane);\nmxCellRenderer.registerShape(mxConstants.SHAPE_IMAGE, mxImageShape);\nmxCellRenderer.registerShape(mxConstants.SHAPE_LABEL, mxLabel);\n\n/**\n * Function: initializeShape\n * \n * Initializes the shape in the given state by calling its init method with\n * the correct container after configuring it using <configureShape>.\n * \n * Parameters:\n * \n * state - <mxCellState> for which the shape should be initialized.\n */\nmxCellRenderer.prototype.initializeShape = function(state)\n{\n\tstate.shape.dialect = state.view.graph.dialect;\n\tthis.configureShape(state);\n\tstate.shape.init(state.view.getDrawPane());\n};\n\n/**\n * Function: createShape\n * \n * Creates and returns the shape for the given cell state.\n * \n * Parameters:\n * \n * state - <mxCellState> for which the shape should be created.\n */\nmxCellRenderer.prototype.createShape = function(state)\n{\n\tvar shape = null;\n\t\n\tif (state.style != null)\n\t{\n\t\t// Checks if there is a stencil for the name and creates\n\t\t// a shape instance for the stencil if one exists\n\t\tvar stencil = mxStencilRegistry.getStencil(state.style[mxConstants.STYLE_SHAPE]);\n\t\t\n\t\tif (stencil != null)\n\t\t{\n\t\t\tshape = new mxShape(stencil);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tvar ctor = this.getShapeConstructor(state);\n\t\t\tshape = new ctor();\n\t\t}\n\t}\n\t\n\treturn shape;\n};\n\n/**\n * Function: createIndicatorShape\n * \n * Creates the indicator shape for the given cell state.\n * \n * Parameters:\n * \n * state - <mxCellState> for which the indicator shape should be created.\n */\nmxCellRenderer.prototype.createIndicatorShape = function(state)\n{\n\tstate.shape.indicatorShape = this.getShape(state.view.graph.getIndicatorShape(state));\n};\n\n/**\n * Function: getShape\n * \n * Returns the shape for the given name from <defaultShapes>.\n */\nmxCellRenderer.prototype.getShape = function(name)\n{\n\treturn (name != null) ? mxCellRenderer.defaultShapes[name] : null;\n};\n\n/**\n * Function: getShapeConstructor\n * \n * Returns the constructor to be used for creating the shape.\n */\nmxCellRenderer.prototype.getShapeConstructor = function(state)\n{\n\tvar ctor = this.getShape(state.style[mxConstants.STYLE_SHAPE]);\n\t\n\tif (ctor == null)\n\t{\n\t\tctor = (state.view.graph.getModel().isEdge(state.cell)) ?\n\t\t\tthis.defaultEdgeShape : this.defaultVertexShape;\n\t}\n\t\n\treturn ctor;\n};\n\n/**\n * Function: configureShape\n * \n * Configures the shape for the given cell state.\n * \n * Parameters:\n * \n * state - <mxCellState> for which the shape should be configured.\n */\nmxCellRenderer.prototype.configureShape = function(state)\n{\n\tstate.shape.apply(state);\n\tstate.shape.image = state.view.graph.getImage(state);\n\tstate.shape.indicatorColor = state.view.graph.getIndicatorColor(state);\n\tstate.shape.indicatorStrokeColor = state.style[mxConstants.STYLE_INDICATOR_STROKECOLOR];\n\tstate.shape.indicatorGradientColor = state.view.graph.getIndicatorGradientColor(state);\n\tstate.shape.indicatorDirection = state.style[mxConstants.STYLE_INDICATOR_DIRECTION];\n\tstate.shape.indicatorImage = state.view.graph.getIndicatorImage(state);\n\n\tthis.postConfigureShape(state);\n};\n\n/**\n * Function: postConfigureShape\n * \n * Replaces any reserved words used for attributes, eg. inherit,\n * indicated or swimlane for colors in the shape for the given state.\n * This implementation resolves these keywords on the fill, stroke\n * and gradient color keys.\n */\nmxCellRenderer.prototype.postConfigureShape = function(state)\n{\n\tif (state.shape != null)\n\t{\n\t\tthis.resolveColor(state, 'indicatorColor', mxConstants.STYLE_FILLCOLOR);\n\t\tthis.resolveColor(state, 'indicatorGradientColor', mxConstants.STYLE_GRADIENTCOLOR);\n\t\tthis.resolveColor(state, 'fill', mxConstants.STYLE_FILLCOLOR);\n\t\tthis.resolveColor(state, 'stroke', mxConstants.STYLE_STROKECOLOR);\n\t\tthis.resolveColor(state, 'gradient', mxConstants.STYLE_GRADIENTCOLOR);\n\t}\n};\n\n/**\n * Function: checkPlaceholderStyles\n * \n * Resolves special keywords 'inherit', 'indicated' and 'swimlane' and sets\n * the respective color on the shape.\n */\nmxCellRenderer.prototype.checkPlaceholderStyles = function(state)\n{\n\t// LATER: Check if the color has actually changed\n\tif (state.style != null)\n\t{\n\t\tvar values = ['inherit', 'swimlane', 'indicated'];\n\t\tvar styles = [mxConstants.STYLE_FILLCOLOR, mxConstants.STYLE_STROKECOLOR, mxConstants.STYLE_GRADIENTCOLOR];\n\t\t\n\t\tfor (var i = 0; i < styles.length; i++)\n\t\t{\n\t\t\tif (mxUtils.indexOf(values, state.style[styles[i]]) >= 0)\n\t\t\t{\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t}\n\t\n\treturn false;\n};\n\n/**\n * Function: resolveColor\n * \n * Resolves special keywords 'inherit', 'indicated' and 'swimlane' and sets\n * the respective color on the shape.\n */\nmxCellRenderer.prototype.resolveColor = function(state, field, key)\n{\n\tvar value = state.shape[field];\n\tvar graph = state.view.graph;\n\tvar referenced = null;\n\t\n\tif (value == 'inherit')\n\t{\n\t\treferenced = graph.model.getParent(state.cell);\n\t}\n\telse if (value == 'swimlane')\n\t{\n\t\tstate.shape[field] = (key == mxConstants.STYLE_STROKECOLOR) ? '#000000' : '#ffffff';\n\t\t\n\t\tif (graph.model.getTerminal(state.cell, false) != null)\n\t\t{\n\t\t\treferenced = graph.model.getTerminal(state.cell, false);\n\t\t}\n\t\telse\n\t\t{\n\t\t\treferenced = state.cell;\n\t\t}\n\t\t\n\t\treferenced = graph.getSwimlane(referenced);\n\t\tkey = graph.swimlaneIndicatorColorAttribute;\n\t}\n\telse if (value == 'indicated')\n\t{\n\t\tstate.shape[field] = state.shape.indicatorColor;\n\t}\n\t\n\tif (referenced != null)\n\t{\n\t\tvar rstate = graph.getView().getState(referenced);\n\t\tstate.shape[field] = null;\n\n\t\tif (rstate != null)\n\t\t{\n\t\t\tif (rstate.shape != null && field != 'indicatorColor')\n\t\t\t{\n\t\t\t\tstate.shape[field] = rstate.shape[field];\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tstate.shape[field] = rstate.style[key];\n\t\t\t}\n\t\t}\n\t}\n};\n\n/**\n * Function: getLabelValue\n * \n * Returns the value to be used for the label.\n * \n * Parameters:\n * \n * state - <mxCellState> for which the label should be created.\n */\nmxCellRenderer.prototype.getLabelValue = function(state)\n{\n\treturn state.view.graph.getLabel(state.cell);\n};\n\n/**\n * Function: createLabel\n * \n * Creates the label for the given cell state.\n * \n * Parameters:\n * \n * state - <mxCellState> for which the label should be created.\n */\nmxCellRenderer.prototype.createLabel = function(state, value)\n{\n\tvar graph = state.view.graph;\n\tvar isEdge = graph.getModel().isEdge(state.cell);\n\t\n\tif (state.style[mxConstants.STYLE_FONTSIZE] > 0 || state.style[mxConstants.STYLE_FONTSIZE] == null)\n\t{\n\t\t// Avoids using DOM node for empty labels\n\t\tvar isForceHtml = (graph.isHtmlLabel(state.cell) || (value != null && mxUtils.isNode(value)));\n\n\t\tstate.text = new this.defaultTextShape(value, new mxRectangle(),\n\t\t\t\t(state.style[mxConstants.STYLE_ALIGN] || mxConstants.ALIGN_CENTER),\n\t\t\t\tgraph.getVerticalAlign(state),\n\t\t\t\tstate.style[mxConstants.STYLE_FONTCOLOR],\n\t\t\t\tstate.style[mxConstants.STYLE_FONTFAMILY],\n\t\t\t\tstate.style[mxConstants.STYLE_FONTSIZE],\n\t\t\t\tstate.style[mxConstants.STYLE_FONTSTYLE],\n\t\t\t\tstate.style[mxConstants.STYLE_SPACING],\n\t\t\t\tstate.style[mxConstants.STYLE_SPACING_TOP],\n\t\t\t\tstate.style[mxConstants.STYLE_SPACING_RIGHT],\n\t\t\t\tstate.style[mxConstants.STYLE_SPACING_BOTTOM],\n\t\t\t\tstate.style[mxConstants.STYLE_SPACING_LEFT],\n\t\t\t\tstate.style[mxConstants.STYLE_HORIZONTAL],\n\t\t\t\tstate.style[mxConstants.STYLE_LABEL_BACKGROUNDCOLOR],\n\t\t\t\tstate.style[mxConstants.STYLE_LABEL_BORDERCOLOR],\n\t\t\t\tgraph.isWrapping(state.cell) && graph.isHtmlLabel(state.cell),\n\t\t\t\tgraph.isLabelClipped(state.cell),\n\t\t\t\tstate.style[mxConstants.STYLE_OVERFLOW],\n\t\t\t\tstate.style[mxConstants.STYLE_LABEL_PADDING],\n\t\t\t\tmxUtils.getValue(state.style, mxConstants.STYLE_TEXT_DIRECTION, mxConstants.DEFAULT_TEXT_DIRECTION));\n\t\tstate.text.opacity = mxUtils.getValue(state.style, mxConstants.STYLE_TEXT_OPACITY, 100);\n\t\tstate.text.dialect = (isForceHtml) ? mxConstants.DIALECT_STRICTHTML : state.view.graph.dialect;\n\t\tstate.text.style = state.style;\n\t\tstate.text.state = state;\n\t\tthis.initializeLabel(state, state.text);\n\t\t\n\t\t// Workaround for touch devices routing all events for a mouse gesture\n\t\t// (down, move, up) via the initial DOM node. IE additionally redirects\n\t\t// the event via the initial DOM node but the event source is the node\n\t\t// under the mouse, so we need to check if this is the case and force\n\t\t// getCellAt for the subsequent mouseMoves and the final mouseUp.\n\t\tvar forceGetCell = false;\n\t\t\n\t\tvar getState = function(evt)\n\t\t{\n\t\t\tvar result = state;\n\n\t\t\tif (mxClient.IS_TOUCH || forceGetCell)\n\t\t\t{\n\t\t\t\tvar x = mxEvent.getClientX(evt);\n\t\t\t\tvar y = mxEvent.getClientY(evt);\n\t\t\t\t\n\t\t\t\t// Dispatches the drop event to the graph which\n\t\t\t\t// consumes and executes the source function\n\t\t\t\tvar pt = mxUtils.convertPoint(graph.container, x, y);\n\t\t\t\tresult = graph.view.getState(graph.getCellAt(pt.x, pt.y));\n\t\t\t}\n\t\t\t\n\t\t\treturn result;\n\t\t};\n\t\t\n\t\t// TODO: Add handling for special touch device gestures\n\t\tmxEvent.addGestureListeners(state.text.node,\n\t\t\tmxUtils.bind(this, function(evt)\n\t\t\t{\n\t\t\t\tif (this.isLabelEvent(state, evt))\n\t\t\t\t{\n\t\t\t\t\tgraph.fireMouseEvent(mxEvent.MOUSE_DOWN, new mxMouseEvent(evt, state));\n\t\t\t\t\tforceGetCell = graph.dialect != mxConstants.DIALECT_SVG &&\n\t\t\t\t\t\tmxEvent.getSource(evt).nodeName == 'IMG';\n\t\t\t\t}\n\t\t\t}),\n\t\t\tmxUtils.bind(this, function(evt)\n\t\t\t{\n\t\t\t\tif (this.isLabelEvent(state, evt))\n\t\t\t\t{\n\t\t\t\t\tgraph.fireMouseEvent(mxEvent.MOUSE_MOVE, new mxMouseEvent(evt, getState(evt)));\n\t\t\t\t}\n\t\t\t}),\n\t\t\tmxUtils.bind(this, function(evt)\n\t\t\t{\n\t\t\t\tif (this.isLabelEvent(state, evt))\n\t\t\t\t{\n\t\t\t\t\tgraph.fireMouseEvent(mxEvent.MOUSE_UP, new mxMouseEvent(evt, getState(evt)));\n\t\t\t\t\tforceGetCell = false;\n\t\t\t\t}\n\t\t\t})\n\t\t);\n\n\t\t// Uses double click timeout in mxGraph for quirks mode\n\t\tif (graph.nativeDblClickEnabled)\n\t\t{\n\t\t\tmxEvent.addListener(state.text.node, 'dblclick',\n\t\t\t\tmxUtils.bind(this, function(evt)\n\t\t\t\t{\n\t\t\t\t\tif (this.isLabelEvent(state, evt))\n\t\t\t\t\t{\n\t\t\t\t\t\tgraph.dblClick(evt, state.cell);\n\t\t\t\t\t\tmxEvent.consume(evt);\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t);\n\t\t}\n\t}\n};\n\n/**\n * Function: initializeLabel\n * \n * Initiailzes the label with a suitable container.\n * \n * Parameters:\n * \n * state - <mxCellState> whose label should be initialized.\n */\nmxCellRenderer.prototype.initializeLabel = function(state, shape)\n{\n\tif (mxClient.IS_SVG && mxClient.NO_FO && shape.dialect != mxConstants.DIALECT_SVG)\n\t{\n\t\tshape.init(state.view.graph.container);\n\t}\n\telse\n\t{\n\t\tshape.init(state.view.getDrawPane());\n\t}\n};\n\n/**\n * Function: createCellOverlays\n * \n * Creates the actual shape for showing the overlay for the given cell state.\n * \n * Parameters:\n * \n * state - <mxCellState> for which the overlay should be created.\n */\nmxCellRenderer.prototype.createCellOverlays = function(state)\n{\n\tvar graph = state.view.graph;\n\tvar overlays = graph.getCellOverlays(state.cell);\n\tvar dict = null;\n\t\n\tif (overlays != null)\n\t{\n\t\tdict = new mxDictionary();\n\t\t\n\t\tfor (var i = 0; i < overlays.length; i++)\n\t\t{\n\t\t\tvar shape = (state.overlays != null) ? state.overlays.remove(overlays[i]) : null;\n\t\t\t\n\t\t\tif (shape == null)\n\t\t\t{\n\t\t\t\tvar tmp = new mxImageShape(new mxRectangle(), overlays[i].image.src);\n\t\t\t\ttmp.dialect = state.view.graph.dialect;\n\t\t\t\ttmp.preserveImageAspect = false;\n\t\t\t\ttmp.overlay = overlays[i];\n\t\t\t\tthis.initializeOverlay(state, tmp);\n\t\t\t\tthis.installCellOverlayListeners(state, overlays[i], tmp);\n\t\n\t\t\t\tif (overlays[i].cursor != null)\n\t\t\t\t{\n\t\t\t\t\ttmp.node.style.cursor = overlays[i].cursor;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tdict.put(overlays[i], tmp);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tdict.put(overlays[i], shape);\n\t\t\t}\n\t\t}\n\t}\n\t\n\t// Removes unused\n\tif (state.overlays != null)\n\t{\n\t\tstate.overlays.visit(function(id, shape)\n\t\t{\n\t\t\tshape.destroy();\n\t\t});\n\t}\n\t\n\tstate.overlays = dict;\n};\n\n/**\n * Function: initializeOverlay\n * \n * Initializes the given overlay.\n * \n * Parameters:\n * \n * state - <mxCellState> for which the overlay should be created.\n * overlay - <mxImageShape> that represents the overlay.\n */\nmxCellRenderer.prototype.initializeOverlay = function(state, overlay)\n{\n\toverlay.init(state.view.getOverlayPane());\n};\n\n/**\n * Function: installOverlayListeners\n * \n * Installs the listeners for the given <mxCellState>, <mxCellOverlay> and\n * <mxShape> that represents the overlay.\n */\nmxCellRenderer.prototype.installCellOverlayListeners = function(state, overlay, shape)\n{\n\tvar graph  = state.view.graph;\n\t\n\tmxEvent.addListener(shape.node, 'click', function (evt)\n\t{\n\t\tif (graph.isEditing())\n\t\t{\n\t\t\tgraph.stopEditing(!graph.isInvokesStopCellEditing());\n\t\t}\n\t\t\n\t\toverlay.fireEvent(new mxEventObject(mxEvent.CLICK,\n\t\t\t\t'event', evt, 'cell', state.cell));\n\t});\n\t\n\tmxEvent.addGestureListeners(shape.node,\n\t\tfunction (evt)\n\t\t{\n\t\t\tmxEvent.consume(evt);\n\t\t},\n\t\tfunction (evt)\n\t\t{\n\t\t\tgraph.fireMouseEvent(mxEvent.MOUSE_MOVE,\n\t\t\t\tnew mxMouseEvent(evt, state));\n\t\t});\n\t\n\tif (mxClient.IS_TOUCH)\n\t{\n\t\tmxEvent.addListener(shape.node, 'touchend', function (evt)\n\t\t{\n\t\t\toverlay.fireEvent(new mxEventObject(mxEvent.CLICK,\n\t\t\t\t\t'event', evt, 'cell', state.cell));\n\t\t});\n\t}\n};\n\n/**\n * Function: createControl\n * \n * Creates the control for the given cell state.\n * \n * Parameters:\n * \n * state - <mxCellState> for which the control should be created.\n */\nmxCellRenderer.prototype.createControl = function(state)\n{\n\tvar graph = state.view.graph;\n\tvar image = graph.getFoldingImage(state);\n\t\n\tif (graph.foldingEnabled && image != null)\n\t{\n\t\tif (state.control == null)\n\t\t{\n\t\t\tvar b = new mxRectangle(0, 0, image.width, image.height);\n\t\t\tstate.control = new mxImageShape(b, image.src);\n\t\t\tstate.control.preserveImageAspect = false;\n\t\t\tstate.control.dialect = graph.dialect;\n\n\t\t\tthis.initControl(state, state.control, true, this.createControlClickHandler(state));\n\t\t}\n\t}\n\telse if (state.control != null)\n\t{\n\t\tstate.control.destroy();\n\t\tstate.control = null;\n\t}\n};\n\n/**\n * Function: createControlClickHandler\n * \n * Hook for creating the click handler for the folding icon.\n * \n * Parameters:\n * \n * state - <mxCellState> whose control click handler should be returned.\n */\nmxCellRenderer.prototype.createControlClickHandler = function(state)\n{\n\tvar graph = state.view.graph;\n\t\n\treturn mxUtils.bind(this, function (evt)\n\t{\n\t\tif (this.forceControlClickHandler || graph.isEnabled())\n\t\t{\n\t\t\tvar collapse = !graph.isCellCollapsed(state.cell);\n\t\t\tgraph.foldCells(collapse, false, [state.cell], null, evt);\n\t\t\tmxEvent.consume(evt);\n\t\t}\n\t});\n};\n\n/**\n * Function: initControl\n * \n * Initializes the given control and returns the corresponding DOM node.\n * \n * Parameters:\n * \n * state - <mxCellState> for which the control should be initialized.\n * control - <mxShape> to be initialized.\n * handleEvents - Boolean indicating if mousedown and mousemove should fire events via the graph.\n * clickHandler - Optional function to implement clicks on the control.\n */\nmxCellRenderer.prototype.initControl = function(state, control, handleEvents, clickHandler)\n{\n\tvar graph = state.view.graph;\n\t\n\t// In the special case where the label is in HTML and the display is SVG the image\n\t// should go into the graph container directly in order to be clickable. Otherwise\n\t// it is obscured by the HTML label that overlaps the cell.\n\tvar isForceHtml = graph.isHtmlLabel(state.cell) && mxClient.NO_FO &&\n\t\tgraph.dialect == mxConstants.DIALECT_SVG;\n\n\tif (isForceHtml)\n\t{\n\t\tcontrol.dialect = mxConstants.DIALECT_PREFERHTML;\n\t\tcontrol.init(graph.container);\n\t\tcontrol.node.style.zIndex = 1;\n\t}\n\telse\n\t{\n\t\tcontrol.init(state.view.getOverlayPane());\n\t}\n\n\tvar node = control.innerNode || control.node;\n\t\n\t// Workaround for missing click event on iOS is to check tolerance below\n\tif (clickHandler != null && !mxClient.IS_IOS)\n\t{\n\t\tif (graph.isEnabled())\n\t\t{\n\t\t\tnode.style.cursor = 'pointer';\n\t\t}\n\t\t\n\t\tmxEvent.addListener(node, 'click', clickHandler);\n\t}\n\t\n\tif (handleEvents)\n\t{\n\t\tvar first = null;\n\n\t\tmxEvent.addGestureListeners(node,\n\t\t\tfunction (evt)\n\t\t\t{\n\t\t\t\tfirst = new mxPoint(mxEvent.getClientX(evt), mxEvent.getClientY(evt));\n\t\t\t\tgraph.fireMouseEvent(mxEvent.MOUSE_DOWN, new mxMouseEvent(evt, state));\n\t\t\t\tmxEvent.consume(evt);\n\t\t\t},\n\t\t\tfunction (evt)\n\t\t\t{\n\t\t\t\tgraph.fireMouseEvent(mxEvent.MOUSE_MOVE, new mxMouseEvent(evt, state));\n\t\t\t},\n\t\t\tfunction (evt)\n\t\t\t{\n\t\t\t\tgraph.fireMouseEvent(mxEvent.MOUSE_UP, new mxMouseEvent(evt, state));\n\t\t\t\tmxEvent.consume(evt);\n\t\t\t});\n\t\t\n\t\t// Uses capture phase for event interception to stop bubble phase\n\t\tif (clickHandler != null && mxClient.IS_IOS)\n\t\t{\n\t\t\tnode.addEventListener('touchend', function(evt)\n\t\t\t{\n\t\t\t\tif (first != null)\n\t\t\t\t{\n\t\t\t\t\tvar tol = graph.tolerance;\n\t\t\t\t\t\n\t\t\t\t\tif (Math.abs(first.x - mxEvent.getClientX(evt)) < tol &&\n\t\t\t\t\t\tMath.abs(first.y - mxEvent.getClientY(evt)) < tol)\n\t\t\t\t\t{\n\t\t\t\t\t\tclickHandler.call(clickHandler, evt);\n\t\t\t\t\t\tmxEvent.consume(evt);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}, true);\n\t\t}\n\t}\n\t\n\treturn node;\n};\n\n/**\n * Function: isShapeEvent\n * \n * Returns true if the event is for the shape of the given state. This\n * implementation always returns true.\n * \n * Parameters:\n * \n * state - <mxCellState> whose shape fired the event.\n * evt - Mouse event which was fired.\n */\nmxCellRenderer.prototype.isShapeEvent = function(state, evt)\n{\n\treturn true;\n};\n\n/**\n * Function: isLabelEvent\n * \n * Returns true if the event is for the label of the given state. This\n * implementation always returns true.\n * \n * Parameters:\n * \n * state - <mxCellState> whose label fired the event.\n * evt - Mouse event which was fired.\n */\nmxCellRenderer.prototype.isLabelEvent = function(state, evt)\n{\n\treturn true;\n};\n\n/**\n * Function: installListeners\n * \n * Installs the event listeners for the given cell state.\n * \n * Parameters:\n * \n * state - <mxCellState> for which the event listeners should be isntalled.\n */\nmxCellRenderer.prototype.installListeners = function(state)\n{\n\tvar graph = state.view.graph;\n\n\t// Workaround for touch devices routing all events for a mouse\n\t// gesture (down, move, up) via the initial DOM node. Same for\n\t// HTML images in all IE versions (VML images are working).\n\tvar getState = function(evt)\n\t{\n\t\tvar result = state;\n\t\t\n\t\tif ((graph.dialect != mxConstants.DIALECT_SVG && mxEvent.getSource(evt).nodeName == 'IMG') || mxClient.IS_TOUCH)\n\t\t{\n\t\t\tvar x = mxEvent.getClientX(evt);\n\t\t\tvar y = mxEvent.getClientY(evt);\n\t\t\t\n\t\t\t// Dispatches the drop event to the graph which\n\t\t\t// consumes and executes the source function\n\t\t\tvar pt = mxUtils.convertPoint(graph.container, x, y);\n\t\t\tresult = graph.view.getState(graph.getCellAt(pt.x, pt.y));\n\t\t}\n\t\t\n\t\treturn result;\n\t};\n\n\tmxEvent.addGestureListeners(state.shape.node,\n\t\tmxUtils.bind(this, function(evt)\n\t\t{\n\t\t\tif (this.isShapeEvent(state, evt))\n\t\t\t{\n\t\t\t\tgraph.fireMouseEvent(mxEvent.MOUSE_DOWN, new mxMouseEvent(evt, state));\n\t\t\t}\n\t\t}),\n\t\tmxUtils.bind(this, function(evt)\n\t\t{\n\t\t\tif (this.isShapeEvent(state, evt))\n\t\t\t{\n\t\t\t\tgraph.fireMouseEvent(mxEvent.MOUSE_MOVE, new mxMouseEvent(evt, getState(evt)));\n\t\t\t}\n\t\t}),\n\t\tmxUtils.bind(this, function(evt)\n\t\t{\n\t\t\tif (this.isShapeEvent(state, evt))\n\t\t\t{\n\t\t\t\tgraph.fireMouseEvent(mxEvent.MOUSE_UP, new mxMouseEvent(evt, getState(evt)));\n\t\t\t}\n\t\t})\n\t);\n\t\n\t// Uses double click timeout in mxGraph for quirks mode\n\tif (graph.nativeDblClickEnabled)\n\t{\n\t\tmxEvent.addListener(state.shape.node, 'dblclick',\n\t\t\tmxUtils.bind(this, function(evt)\n\t\t\t{\n\t\t\t\tif (this.isShapeEvent(state, evt))\n\t\t\t\t{\n\t\t\t\t\tgraph.dblClick(evt, state.cell);\n\t\t\t\t\tmxEvent.consume(evt);\n\t\t\t\t}\n\t\t\t})\n\t\t);\n\t}\n};\n\n/**\n * Function: redrawLabel\n * \n * Redraws the label for the given cell state.\n * \n * Parameters:\n * \n * state - <mxCellState> whose label should be redrawn.\n */\nmxCellRenderer.prototype.redrawLabel = function(state, forced)\n{\n\tvar graph = state.view.graph;\n\tvar value = this.getLabelValue(state);\n\tvar wrapping = graph.isWrapping(state.cell);\n\tvar clipping = graph.isLabelClipped(state.cell);\n\tvar isForceHtml = (state.view.graph.isHtmlLabel(state.cell) || (value != null && mxUtils.isNode(value)));\n\tvar dialect = (isForceHtml) ? mxConstants.DIALECT_STRICTHTML : state.view.graph.dialect;\n\tvar overflow = state.style[mxConstants.STYLE_OVERFLOW] || 'visible';\n\n\tif (state.text != null && (state.text.wrap != wrapping || state.text.clipped != clipping ||\n\t\tstate.text.overflow != overflow || state.text.dialect != dialect))\n\t{\n\t\tstate.text.destroy();\n\t\tstate.text = null;\n\t}\n\t\n\tif (state.text == null && value != null && (mxUtils.isNode(value) || value.length > 0))\n\t{\n\t\tthis.createLabel(state, value);\n\t}\n\telse if (state.text != null && (value == null || value.length == 0))\n\t{\n\t\tstate.text.destroy();\n\t\tstate.text = null;\n\t}\n\n\tif (state.text != null)\n\t{\n\t\t// Forced is true if the style has changed, so to get the updated\n\t\t// result in getLabelBounds we apply the new style to the shape\n\t\tif (forced)\n\t\t{\n\t\t\t// Checks if a full repaint is needed\n\t\t\tif (state.text.lastValue != null && this.isTextShapeInvalid(state, state.text))\n\t\t\t{\n\t\t\t\t// Forces a full repaint\n\t\t\t\tstate.text.lastValue = null;\n\t\t\t}\n\t\t\t\n\t\t\tstate.text.resetStyles();\n\t\t\tstate.text.apply(state);\n\t\t\t\n\t\t\t// Special case where value is obtained via hook in graph\n\t\t\tstate.text.valign = graph.getVerticalAlign(state);\n\t\t}\n\t\t\n\t\tvar bounds = this.getLabelBounds(state);\n\t\tvar nextScale = this.getTextScale(state);\n\t\t\n\t\tif (forced || state.text.value != value || state.text.isWrapping != wrapping ||\n\t\t\tstate.text.overflow != overflow || state.text.isClipping != clipping ||\n\t\t\tstate.text.scale != nextScale || state.text.dialect != dialect ||\n\t\t\t!state.text.bounds.equals(bounds))\n\t\t{\n\t\t\t// Forces an update of the text bounding box\n\t\t\tif (state.text.bounds.width != 0 && state.unscaledWidth != null &&\n\t\t\t\tMath.round((state.text.bounds.width /\n\t\t\t\tstate.text.scale * nextScale) - bounds.width) != 0)\n\t\t\t{\n\t\t\t\tstate.unscaledWidth = null;\n\t\t\t}\n\t\t\t\n\t\t\tstate.text.dialect = dialect;\n\t\t\tstate.text.value = value;\n\t\t\tstate.text.bounds = bounds;\n\t\t\tstate.text.scale = nextScale;\n\t\t\tstate.text.wrap = wrapping;\n\t\t\tstate.text.clipped = clipping;\n\t\t\tstate.text.overflow = overflow;\n\t\t\t\n\t\t\t// Preserves visible state\n\t\t\tvar vis = state.text.node.style.visibility;\n\t\t\tthis.redrawLabelShape(state.text);\n\t\t\tstate.text.node.style.visibility = vis;\n\t\t}\n\t}\n};\n\n/**\n * Function: isTextShapeInvalid\n * \n * Returns true if the style for the text shape has changed.\n * \n * Parameters:\n * \n * state - <mxCellState> whose label should be checked.\n * shape - <mxText> shape to be checked.\n */\nmxCellRenderer.prototype.isTextShapeInvalid = function(state, shape)\n{\n\tfunction check(property, stylename, defaultValue)\n\t{\n\t\t// Workaround for spacing added to directional spacing\n\t\tif (stylename == 'spacingTop' || stylename == 'spacingRight' ||\n\t\t\tstylename == 'spacingBottom' || stylename == 'spacingLeft')\n\t\t{\n\t\t\tresult = parseFloat(shape[property]) - parseFloat(shape.spacing) !=\n\t\t\t\t(state.style[stylename] || defaultValue);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tresult = shape[property] != (state.style[stylename] || defaultValue);\n\t\t}\n\t\t\n\t\treturn result;\n\t};\n\n\treturn check('fontStyle', mxConstants.STYLE_FONTSTYLE, mxConstants.DEFAULT_FONTSTYLE) ||\n\t\tcheck('family', mxConstants.STYLE_FONTFAMILY, mxConstants.DEFAULT_FONTFAMILY) ||\n\t\tcheck('size', mxConstants.STYLE_FONTSIZE, mxConstants.DEFAULT_FONTSIZE) ||\n\t\tcheck('color', mxConstants.STYLE_FONTCOLOR, 'black') ||\n\t\tcheck('align', mxConstants.STYLE_ALIGN, '') ||\n\t\tcheck('valign', mxConstants.STYLE_VERTICAL_ALIGN, '') ||\n\t\tcheck('spacing', mxConstants.STYLE_SPACING, 2) ||\n\t\tcheck('spacingTop', mxConstants.STYLE_SPACING_TOP, 0) ||\n\t\tcheck('spacingRight', mxConstants.STYLE_SPACING_RIGHT, 0) ||\n\t\tcheck('spacingBottom', mxConstants.STYLE_SPACING_BOTTOM, 0) ||\n\t\tcheck('spacingLeft', mxConstants.STYLE_SPACING_LEFT, 0) ||\n\t\tcheck('horizontal', mxConstants.STYLE_HORIZONTAL, true) ||\n\t\tcheck('background', mxConstants.STYLE_LABEL_BACKGROUNDCOLOR) ||\n\t\tcheck('border', mxConstants.STYLE_LABEL_BORDERCOLOR) ||\n\t\tcheck('opacity', mxConstants.STYLE_TEXT_OPACITY, 100) ||\n\t\tcheck('textDirection', mxConstants.STYLE_TEXT_DIRECTION, mxConstants.DEFAULT_TEXT_DIRECTION);\n};\n\n/**\n * Function: redrawLabelShape\n * \n * Called to invoked redraw on the given text shape.\n * \n * Parameters:\n * \n * shape - <mxText> shape to be redrawn.\n */\nmxCellRenderer.prototype.redrawLabelShape = function(shape)\n{\n\tshape.redraw();\n};\n\n/**\n * Function: getTextScale\n * \n * Returns the scaling used for the label of the given state\n * \n * Parameters:\n * \n * state - <mxCellState> whose label scale should be returned.\n */\nmxCellRenderer.prototype.getTextScale = function(state)\n{\n\treturn state.view.scale;\n};\n\n/**\n * Function: getLabelBounds\n * \n * Returns the bounds to be used to draw the label of the given state.\n * \n * Parameters:\n * \n * state - <mxCellState> whose label bounds should be returned.\n */\nmxCellRenderer.prototype.getLabelBounds = function(state)\n{\n\tvar graph = state.view.graph;\n\tvar scale = state.view.scale;\n\tvar isEdge = graph.getModel().isEdge(state.cell);\n\tvar bounds = new mxRectangle(state.absoluteOffset.x, state.absoluteOffset.y);\n\n\tif (isEdge)\n\t{\n\t\tvar spacing = state.text.getSpacing();\n\t\tbounds.x += spacing.x * scale;\n\t\tbounds.y += spacing.y * scale;\n\t\t\n\t\tvar geo = graph.getCellGeometry(state.cell);\n\t\t\n\t\tif (geo != null)\n\t\t{\n\t\t\tbounds.width = Math.max(0, geo.width * scale);\n\t\t\tbounds.height = Math.max(0, geo.height * scale);\n\t\t}\n\t}\n\telse\n\t{\n\t\t// Inverts label position\n\t\tif (state.text.isPaintBoundsInverted())\n\t\t{\n\t\t\tvar tmp = bounds.x;\n\t\t\tbounds.x = bounds.y;\n\t\t\tbounds.y = tmp;\n\t\t}\n\t\t\n\t\tbounds.x += state.x;\n\t\tbounds.y += state.y;\n\t\t\n\t\t// Minimum of 1 fixes alignment bug in HTML labels\n\t\tbounds.width = Math.max(1, state.width);\n\t\tbounds.height = Math.max(1, state.height);\n\n\t\tvar sc = mxUtils.getValue(state.style, mxConstants.STYLE_STROKECOLOR, mxConstants.NONE);\n\t\t\n\t\tif (sc != mxConstants.NONE && sc != '')\n\t\t{\n\t\t\tvar s = parseFloat(mxUtils.getValue(state.style, mxConstants.STYLE_STROKEWIDTH, 1)) * scale;\n\t\t\tvar dx = 1 + Math.floor((s - 1) / 2);\n\t\t\tvar dh = Math.floor(s + 1);\n\t\t\t\n\t\t\tbounds.x += dx;\n\t\t\tbounds.y += dx;\n\t\t\tbounds.width -= dh;\n\t\t\tbounds.height -= dh;\n\t\t}\n\t}\n\n\tif (state.text.isPaintBoundsInverted())\n\t{\n\t\t// Rotates around center of state\n\t\tvar t = (state.width - state.height) / 2;\n\t\tbounds.x += t;\n\t\tbounds.y -= t;\n\t\tvar tmp = bounds.width;\n\t\tbounds.width = bounds.height;\n\t\tbounds.height = tmp;\n\t}\n\t\n\t// Shape can modify its label bounds\n\tif (state.shape != null)\n\t{\n\t\tvar hpos = mxUtils.getValue(state.style, mxConstants.STYLE_LABEL_POSITION, mxConstants.ALIGN_CENTER);\n\t\tvar vpos = mxUtils.getValue(state.style, mxConstants.STYLE_VERTICAL_LABEL_POSITION, mxConstants.ALIGN_MIDDLE);\n\t\t\n\t\tif (hpos == mxConstants.ALIGN_CENTER && vpos == mxConstants.ALIGN_MIDDLE)\n\t\t{\n\t\t\tbounds = state.shape.getLabelBounds(bounds);\n\t\t}\n\t}\n\t\n\t// Label width style overrides actual label width\n\tvar lw = mxUtils.getValue(state.style, mxConstants.STYLE_LABEL_WIDTH, null);\n\t\n\tif (lw != null)\n\t{\n\t\tbounds.width = parseFloat(lw) * scale;\n\t}\n\t\n\tif (!isEdge)\n\t{\n\t\tthis.rotateLabelBounds(state, bounds);\n\t}\n\t\n\treturn bounds;\n};\n\n/**\n * Function: rotateLabelBounds\n * \n * Adds the shape rotation to the given label bounds and\n * applies the alignment and offsets.\n * \n * Parameters:\n * \n * state - <mxCellState> whose label bounds should be rotated.\n * bounds - <mxRectangle> the rectangle to be rotated.\n */\nmxCellRenderer.prototype.rotateLabelBounds = function(state, bounds)\n{\n\tbounds.y -= state.text.margin.y * bounds.height;\n\tbounds.x -= state.text.margin.x * bounds.width;\n\t\n\tif (!this.legacySpacing || (state.style[mxConstants.STYLE_OVERFLOW] != 'fill' && state.style[mxConstants.STYLE_OVERFLOW] != 'width'))\n\t{\n\t\tvar s = state.view.scale;\n\t\tvar spacing = state.text.getSpacing();\n\t\tbounds.x += spacing.x * s;\n\t\tbounds.y += spacing.y * s;\n\t\t\n\t\tvar hpos = mxUtils.getValue(state.style, mxConstants.STYLE_LABEL_POSITION, mxConstants.ALIGN_CENTER);\n\t\tvar vpos = mxUtils.getValue(state.style, mxConstants.STYLE_VERTICAL_LABEL_POSITION, mxConstants.ALIGN_MIDDLE);\n\t\tvar lw = mxUtils.getValue(state.style, mxConstants.STYLE_LABEL_WIDTH, null);\n\t\t\n\t\tbounds.width = Math.max(0, bounds.width - ((hpos == mxConstants.ALIGN_CENTER && lw == null) ? (state.text.spacingLeft * s + state.text.spacingRight * s) : 0));\n\t\tbounds.height = Math.max(0, bounds.height - ((vpos == mxConstants.ALIGN_MIDDLE) ? (state.text.spacingTop * s + state.text.spacingBottom * s) : 0));\n\t}\n\n\tvar theta = state.text.getTextRotation();\n\n\t// Only needed if rotated around another center\n\tif (theta != 0 && state != null && state.view.graph.model.isVertex(state.cell))\n\t{\n\t\tvar cx = state.getCenterX();\n\t\tvar cy = state.getCenterY();\n\t\t\n\t\tif (bounds.x != cx || bounds.y != cy)\n\t\t{\n\t\t\tvar rad = theta * (Math.PI / 180);\n\t\t\tpt = mxUtils.getRotatedPoint(new mxPoint(bounds.x, bounds.y),\n\t\t\t\t\tMath.cos(rad), Math.sin(rad), new mxPoint(cx, cy));\n\t\t\t\n\t\t\tbounds.x = pt.x;\n\t\t\tbounds.y = pt.y;\n\t\t}\n\t}\n};\n\n/**\n * Function: redrawCellOverlays\n * \n * Redraws the overlays for the given cell state.\n * \n * Parameters:\n * \n * state - <mxCellState> whose overlays should be redrawn.\n */\nmxCellRenderer.prototype.redrawCellOverlays = function(state, forced)\n{\n\tthis.createCellOverlays(state);\n\n\tif (state.overlays != null)\n\t{\n\t\tvar rot = mxUtils.mod(mxUtils.getValue(state.style, mxConstants.STYLE_ROTATION, 0), 90);\n        var rad = mxUtils.toRadians(rot);\n        var cos = Math.cos(rad);\n        var sin = Math.sin(rad);\n\t\t\n\t\tstate.overlays.visit(function(id, shape)\n\t\t{\n\t\t\tvar bounds = shape.overlay.getBounds(state);\n\t\t\n\t\t\tif (!state.view.graph.getModel().isEdge(state.cell))\n\t\t\t{\n\t\t\t\tif (state.shape != null && rot != 0)\n\t\t\t\t{\n\t\t\t\t\tvar cx = bounds.getCenterX();\n\t\t\t\t\tvar cy = bounds.getCenterY();\n\n\t\t\t\t\tvar point = mxUtils.getRotatedPoint(new mxPoint(cx, cy), cos, sin,\n\t\t\t        \t\tnew mxPoint(state.getCenterX(), state.getCenterY()));\n\n\t\t\t        cx = point.x;\n\t\t\t        cy = point.y;\n\t\t\t        bounds.x = Math.round(cx - bounds.width / 2);\n\t\t\t        bounds.y = Math.round(cy - bounds.height / 2);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif (forced || shape.bounds == null || shape.scale != state.view.scale ||\n\t\t\t\t!shape.bounds.equals(bounds))\n\t\t\t{\n\t\t\t\tshape.bounds = bounds;\n\t\t\t\tshape.scale = state.view.scale;\n\t\t\t\tshape.redraw();\n\t\t\t}\n\t\t});\n\t}\n};\n\n/**\n * Function: redrawControl\n * \n * Redraws the control for the given cell state.\n * \n * Parameters:\n * \n * state - <mxCellState> whose control should be redrawn.\n */\nmxCellRenderer.prototype.redrawControl = function(state, forced)\n{\n\tvar image = state.view.graph.getFoldingImage(state);\n\t\n\tif (state.control != null && image != null)\n\t{\n\t\tvar bounds = this.getControlBounds(state, image.width, image.height);\n\t\tvar r = (this.legacyControlPosition) ?\n\t\t\t\tmxUtils.getValue(state.style, mxConstants.STYLE_ROTATION, 0) :\n\t\t\t\tstate.shape.getTextRotation();\n\t\tvar s = state.view.scale;\n\t\t\n\t\tif (forced || state.control.scale != s || !state.control.bounds.equals(bounds) ||\n\t\t\tstate.control.rotation != r)\n\t\t{\n\t\t\tstate.control.rotation = r;\n\t\t\tstate.control.bounds = bounds;\n\t\t\tstate.control.scale = s;\n\t\t\t\n\t\t\tstate.control.redraw();\n\t\t}\n\t}\n};\n\n/**\n * Function: getControlBounds\n * \n * Returns the bounds to be used to draw the control (folding icon) of the\n * given state.\n */\nmxCellRenderer.prototype.getControlBounds = function(state, w, h)\n{\n\tif (state.control != null)\n\t{\n\t\tvar s = state.view.scale;\n\t\tvar cx = state.getCenterX();\n\t\tvar cy = state.getCenterY();\n\t\n\t\tif (!state.view.graph.getModel().isEdge(state.cell))\n\t\t{\n\t\t\tcx = state.x + w * s;\n\t\t\tcy = state.y + h * s;\n\t\t\t\n\t\t\tif (state.shape != null)\n\t\t\t{\n\t\t\t\t// TODO: Factor out common code\n\t\t\t\tvar rot = state.shape.getShapeRotation();\n\t\t\t\t\n\t\t\t\tif (this.legacyControlPosition)\n\t\t\t\t{\n\t\t\t\t\trot = mxUtils.getValue(state.style, mxConstants.STYLE_ROTATION, 0);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tif (state.shape.isPaintBoundsInverted())\n\t\t\t\t\t{\n\t\t\t\t\t\tvar t = (state.width - state.height) / 2;\n\t\t\t\t\t\tcx += t;\n\t\t\t\t\t\tcy -= t;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (rot != 0)\n\t\t\t\t{\n\t\t\t        var rad = mxUtils.toRadians(rot);\n\t\t\t        var cos = Math.cos(rad);\n\t\t\t        var sin = Math.sin(rad);\n\t\t\t        \n\t\t\t        var point = mxUtils.getRotatedPoint(new mxPoint(cx, cy), cos, sin,\n\t\t\t        \t\tnew mxPoint(state.getCenterX(), state.getCenterY()));\n\t\t\t        cx = point.x;\n\t\t\t        cy = point.y;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn (state.view.graph.getModel().isEdge(state.cell)) ? \n\t\t\tnew mxRectangle(Math.round(cx - w / 2 * s), Math.round(cy - h / 2 * s), Math.round(w * s), Math.round(h * s))\n\t\t\t: new mxRectangle(Math.round(cx - w / 2 * s), Math.round(cy - h / 2 * s), Math.round(w * s), Math.round(h * s));\n\t}\n\t\n\treturn null;\n};\n\n/**\n * Function: insertStateAfter\n * \n * Inserts the given array of <mxShapes> after the given nodes in the DOM.\n * \n * Parameters:\n * \n * shapes - Array of <mxShapes> to be inserted.\n * node - Node in <drawPane> after which the shapes should be inserted.\n * htmlNode - Node in the graph container after which the shapes should be inserted that\n * will not go into the <drawPane> (eg. HTML labels without foreignObjects).\n */\nmxCellRenderer.prototype.insertStateAfter = function(state, node, htmlNode)\n{\n\tvar shapes = this.getShapesForState(state);\n\t\n\tfor (var i = 0; i < shapes.length; i++)\n\t{\n\t\tif (shapes[i] != null && shapes[i].node != null)\n\t\t{\n\t\t\tvar html = shapes[i].node.parentNode != state.view.getDrawPane() &&\n\t\t\t\tshapes[i].node.parentNode != state.view.getOverlayPane();\n\t\t\tvar temp = (html) ? htmlNode : node;\n\t\t\t\n\t\t\tif (temp != null && temp.nextSibling != shapes[i].node)\n\t\t\t{\n\t\t\t\tif (temp.nextSibling == null)\n\t\t\t\t{\n\t\t\t\t\ttemp.parentNode.appendChild(shapes[i].node);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\ttemp.parentNode.insertBefore(shapes[i].node, temp.nextSibling);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if (temp == null)\n\t\t\t{\n\t\t\t\t// Special case: First HTML node should be first sibling after canvas\n\t\t\t\tif (shapes[i].node.parentNode == state.view.graph.container)\n\t\t\t\t{\n\t\t\t\t\tvar canvas = state.view.canvas;\n\t\t\t\t\t\n\t\t\t\t\twhile (canvas != null && canvas.parentNode != state.view.graph.container)\n\t\t\t\t\t{\n\t\t\t\t\t\tcanvas = canvas.parentNode;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif (canvas != null && canvas.nextSibling != null)\n\t\t\t\t\t{\n\t\t\t\t\t\tif (canvas.nextSibling != shapes[i].node)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tshapes[i].node.parentNode.insertBefore(shapes[i].node, canvas.nextSibling);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tshapes[i].node.parentNode.appendChild(shapes[i].node);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if (shapes[i].node.parentNode.firstChild != null && shapes[i].node.parentNode.firstChild != shapes[i].node)\n\t\t\t\t{\n\t\t\t\t\t// Inserts the node as the first child of the parent to implement the order\n\t\t\t\t\tshapes[i].node.parentNode.insertBefore(shapes[i].node, shapes[i].node.parentNode.firstChild);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif (html)\n\t\t\t{\n\t\t\t\thtmlNode = shapes[i].node;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tnode = shapes[i].node;\n\t\t\t}\n\t\t}\n\t}\n\n\treturn [node, htmlNode];\n};\n\n/**\n * Function: getShapesForState\n * \n * Returns the <mxShapes> for the given cell state in the order in which they should\n * appear in the DOM.\n * \n * Parameters:\n * \n * state - <mxCellState> whose shapes should be returned.\n */\nmxCellRenderer.prototype.getShapesForState = function(state)\n{\n\treturn [state.shape, state.text, state.control];\n};\n\n/**\n * Function: redraw\n * \n * Updates the bounds or points and scale of the shapes for the given cell\n * state. This is called in mxGraphView.validatePoints as the last step of\n * updating all cells.\n * \n * Parameters:\n * \n * state - <mxCellState> for which the shapes should be updated.\n * force - Optional boolean that specifies if the cell should be reconfiured\n * and redrawn without any additional checks.\n * rendering - Optional boolean that specifies if the cell should actually\n * be drawn into the DOM. If this is false then redraw and/or reconfigure\n * will not be called on the shape.\n */\nmxCellRenderer.prototype.redraw = function(state, force, rendering)\n{\n\tvar shapeChanged = this.redrawShape(state, force, rendering);\n\t\n\tif (state.shape != null && (rendering == null || rendering))\n\t{\n\t\tthis.redrawLabel(state, shapeChanged);\n\t\tthis.redrawCellOverlays(state, shapeChanged);\n\t\tthis.redrawControl(state, shapeChanged);\n\t}\n};\n\n/**\n * Function: redrawShape\n * \n * Redraws the shape for the given cell state.\n * \n * Parameters:\n * \n * state - <mxCellState> whose label should be redrawn.\n */\nmxCellRenderer.prototype.redrawShape = function(state, force, rendering)\n{\n\tvar model = state.view.graph.model;\n\tvar shapeChanged = false;\n\n\t// Forces creation of new shape if shape style has changed\n\tif (state.shape != null && state.shape.style != null && state.style != null &&\n\t\tstate.shape.style[mxConstants.STYLE_SHAPE] != state.style[mxConstants.STYLE_SHAPE])\n\t{\n\t\tstate.shape.destroy();\n\t\tstate.shape = null;\n\t}\n\t\n\tif (state.shape == null && state.view.graph.container != null &&\n\t\tstate.cell != state.view.currentRoot &&\n\t\t(model.isVertex(state.cell) || model.isEdge(state.cell)))\n\t{\n\t\tstate.shape = this.createShape(state);\n\t\t\n\t\tif (state.shape != null)\n\t\t{\n\t\t\tstate.shape.minSvgStrokeWidth = this.minSvgStrokeWidth;\n\t\t\tstate.shape.antiAlias = this.antiAlias;\n\t\n\t\t\tthis.createIndicatorShape(state);\n\t\t\tthis.initializeShape(state);\n\t\t\tthis.createCellOverlays(state);\n\t\t\tthis.installListeners(state);\n\t\t\t\n\t\t\t// Forces a refresh of the handler if one exists\n\t\t\tstate.view.graph.selectionCellsHandler.updateHandler(state);\n\t\t}\n\t}\n\telse if (!force && state.shape != null && (!mxUtils.equalEntries(state.shape.style,\n\t\tstate.style) || this.checkPlaceholderStyles(state)))\n\t{\n\t\tstate.shape.resetStyles();\n\t\tthis.configureShape(state);\n\t\t// LATER: Ignore update for realtime to fix reset of current gesture\n\t\tstate.view.graph.selectionCellsHandler.updateHandler(state);\n\t\tforce = true;\n\t}\n\n\tif (state.shape != null)\n\t{\n\t\t// Handles changes of the collapse icon\n\t\tthis.createControl(state);\n\t\t\n\t\t// Redraws the cell if required, ignores changes to bounds if points are\n\t\t// defined as the bounds are updated for the given points inside the shape\n\t\tif (force || this.isShapeInvalid(state, state.shape))\n\t\t{\n\t\t\tif (state.absolutePoints != null)\n\t\t\t{\n\t\t\t\tstate.shape.points = state.absolutePoints.slice();\n\t\t\t\tstate.shape.bounds = null;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tstate.shape.points = null;\n\t\t\t\tstate.shape.bounds = new mxRectangle(state.x, state.y, state.width, state.height);\n\t\t\t}\n\n\t\t\tstate.shape.scale = state.view.scale;\n\t\t\t\n\t\t\tif (rendering == null || rendering)\n\t\t\t{\n\t\t\t\tthis.doRedrawShape(state);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tstate.shape.updateBoundingBox();\n\t\t\t}\n\t\t\t\n\t\t\tshapeChanged = true;\n\t\t}\n\t}\n\n\treturn shapeChanged;\n};\n\n/**\n * Function: doRedrawShape\n * \n * Invokes redraw on the shape of the given state.\n */\nmxCellRenderer.prototype.doRedrawShape = function(state)\n{\n\tstate.shape.redraw();\n};\n\n/**\n * Function: isShapeInvalid\n * \n * Returns true if the given shape must be repainted.\n */\nmxCellRenderer.prototype.isShapeInvalid = function(state, shape)\n{\n\treturn shape.bounds == null || shape.scale != state.view.scale ||\n\t\t(state.absolutePoints == null && !shape.bounds.equals(state)) ||\n\t\t(state.absolutePoints != null && !mxUtils.equalPoints(shape.points, state.absolutePoints))\n};\n\n/**\n * Function: destroy\n * \n * Destroys the shapes associated with the given cell state.\n * \n * Parameters:\n * \n * state - <mxCellState> for which the shapes should be destroyed.\n */\nmxCellRenderer.prototype.destroy = function(state)\n{\n\tif (state.shape != null)\n\t{\n\t\tif (state.text != null)\n\t\t{\t\t\n\t\t\tstate.text.destroy();\n\t\t\tstate.text = null;\n\t\t}\n\t\t\n\t\tif (state.overlays != null)\n\t\t{\n\t\t\tstate.overlays.visit(function(id, shape)\n\t\t\t{\n\t\t\t\tshape.destroy();\n\t\t\t});\n\t\t\t\n\t\t\tstate.overlays = null;\n\t\t}\n\n\t\tif (state.control != null)\n\t\t{\n\t\t\tstate.control.destroy();\n\t\t\tstate.control = null;\n\t\t}\n\t\t\n\t\tstate.shape.destroy();\n\t\tstate.shape = null;\n\t}\n};\n"
  },
  {
    "path": "static/cherry/drawio_demo/src/js/view/mxCellState.js",
    "content": "/**\n * Copyright (c) 2006-2015, JGraph Ltd\n * Copyright (c) 2006-2015, Gaudenz Alder\n */\n/**\n * Class: mxCellState\n * \n * Represents the current state of a cell in a given <mxGraphView>.\n * \n * For edges, the edge label position is stored in <absoluteOffset>.\n * \n * The size for oversize labels can be retrieved using the boundingBox property\n * of the <text> field as shown below.\n * \n * (code)\n * var bbox = (state.text != null) ? state.text.boundingBox : null;\n * (end)\n * \n * Constructor: mxCellState\n * \n * Constructs a new object that represents the current state of the given\n * cell in the specified view.\n * \n * Parameters:\n * \n * view - <mxGraphView> that contains the state.\n * cell - <mxCell> that this state represents.\n * style - Array of key, value pairs that constitute the style.\n */\nfunction mxCellState(view, cell, style)\n{\n\tthis.view = view;\n\tthis.cell = cell;\n\tthis.style = style;\n\t\n\tthis.origin = new mxPoint();\n\tthis.absoluteOffset = new mxPoint();\n};\n\n/**\n * Extends mxRectangle.\n */\nmxCellState.prototype = new mxRectangle();\nmxCellState.prototype.constructor = mxCellState;\n\n/**\n * Variable: view\n * \n * Reference to the enclosing <mxGraphView>.\n */\nmxCellState.prototype.view = null;\n\n/**\n * Variable: cell\n *\n * Reference to the <mxCell> that is represented by this state.\n */\nmxCellState.prototype.cell = null;\n\n/**\n * Variable: style\n * \n * Contains an array of key, value pairs that represent the style of the\n * cell.\n */\nmxCellState.prototype.style = null;\n\n/**\n * Variable: invalid\n * \n * Specifies if the state is invalid. Default is true.\n */\nmxCellState.prototype.invalid = true;\n\n/**\n * Variable: origin\n *\n * <mxPoint> that holds the origin for all child cells. Default is a new\n * empty <mxPoint>.\n */\nmxCellState.prototype.origin = null;\n\n/**\n * Variable: absolutePoints\n * \n * Holds an array of <mxPoints> that represent the absolute points of an\n * edge.\n */\nmxCellState.prototype.absolutePoints = null;\n\n/**\n * Variable: absoluteOffset\n *\n * <mxPoint> that holds the absolute offset. For edges, this is the\n * absolute coordinates of the label position. For vertices, this is the\n * offset of the label relative to the top, left corner of the vertex. \n */\nmxCellState.prototype.absoluteOffset = null;\n\n/**\n * Variable: visibleSourceState\n * \n * Caches the visible source terminal state.\n */\nmxCellState.prototype.visibleSourceState = null;\n\n/**\n * Variable: visibleTargetState\n * \n * Caches the visible target terminal state.\n */\nmxCellState.prototype.visibleTargetState = null;\n\n/**\n * Variable: terminalDistance\n * \n * Caches the distance between the end points for an edge.\n */\nmxCellState.prototype.terminalDistance = 0;\n\n/**\n * Variable: length\n *\n * Caches the length of an edge.\n */\nmxCellState.prototype.length = 0;\n\n/**\n * Variable: segments\n * \n * Array of numbers that represent the cached length of each segment of the\n * edge.\n */\nmxCellState.prototype.segments = null;\n\n/**\n * Variable: shape\n * \n * Holds the <mxShape> that represents the cell graphically.\n */\nmxCellState.prototype.shape = null;\n\n/**\n * Variable: text\n * \n * Holds the <mxText> that represents the label of the cell. Thi smay be\n * null if the cell has no label.\n */\nmxCellState.prototype.text = null;\n\n/**\n * Variable: unscaledWidth\n * \n * Holds the unscaled width of the state.\n */\nmxCellState.prototype.unscaledWidth = null;\n\n/**\n * Function: getPerimeterBounds\n * \n * Returns the <mxRectangle> that should be used as the perimeter of the\n * cell.\n * \n * Parameters:\n * \n * border - Optional border to be added around the perimeter bounds.\n * bounds - Optional <mxRectangle> to be used as the initial bounds.\n */\nmxCellState.prototype.getPerimeterBounds = function(border, bounds)\n{\n\tborder = border || 0;\n\tbounds = (bounds != null) ? bounds : new mxRectangle(this.x, this.y, this.width, this.height);\n\t\n\tif (this.shape != null && this.shape.stencil != null && this.shape.stencil.aspect == 'fixed')\n\t{\n\t\tvar aspect = this.shape.stencil.computeAspect(this.style, bounds.x, bounds.y, bounds.width, bounds.height);\n\t\t\n\t\tbounds.x = aspect.x;\n\t\tbounds.y = aspect.y;\n\t\tbounds.width = this.shape.stencil.w0 * aspect.width;\n\t\tbounds.height = this.shape.stencil.h0 * aspect.height;\n\t}\n\t\n\tif (border != 0)\n\t{\n\t\tbounds.grow(border);\n\t}\n\t\n\treturn bounds;\n};\n\n/**\n * Function: setAbsoluteTerminalPoint\n * \n * Sets the first or last point in <absolutePoints> depending on isSource.\n * \n * Parameters:\n * \n * point - <mxPoint> that represents the terminal point.\n * isSource - Boolean that specifies if the first or last point should\n * be assigned.\n */\nmxCellState.prototype.setAbsoluteTerminalPoint = function(point, isSource)\n{\n\tif (isSource)\n\t{\n\t\tif (this.absolutePoints == null)\n\t\t{\n\t\t\tthis.absolutePoints = [];\n\t\t}\n\t\t\n\t\tif (this.absolutePoints.length == 0)\n\t\t{\n\t\t\tthis.absolutePoints.push(point);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tthis.absolutePoints[0] = point;\n\t\t}\n\t}\n\telse\n\t{\n\t\tif (this.absolutePoints == null)\n\t\t{\n\t\t\tthis.absolutePoints = [];\n\t\t\tthis.absolutePoints.push(null);\n\t\t\tthis.absolutePoints.push(point);\n\t\t}\n\t\telse if (this.absolutePoints.length == 1)\n\t\t{\n\t\t\tthis.absolutePoints.push(point);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tthis.absolutePoints[this.absolutePoints.length - 1] = point;\n\t\t}\n\t}\n};\n\n/**\n * Function: setCursor\n * \n * Sets the given cursor on the shape and text shape.\n */\nmxCellState.prototype.setCursor = function(cursor)\n{\n\tif (this.shape != null)\n\t{\n\t\tthis.shape.setCursor(cursor);\n\t}\n\t\n\tif (this.text != null)\n\t{\n\t\tthis.text.setCursor(cursor);\n\t}\n};\n\n/**\n * Function: getVisibleTerminal\n * \n * Returns the visible source or target terminal cell.\n * \n * Parameters:\n * \n * source - Boolean that specifies if the source or target cell should be\n * returned.\n */\nmxCellState.prototype.getVisibleTerminal = function(source)\n{\n\tvar tmp = this.getVisibleTerminalState(source);\n\t\n\treturn (tmp != null) ? tmp.cell : null;\n};\n\n/**\n * Function: getVisibleTerminalState\n * \n * Returns the visible source or target terminal state.\n * \n * Parameters:\n * \n * source - Boolean that specifies if the source or target state should be\n * returned.\n */\nmxCellState.prototype.getVisibleTerminalState = function(source)\n{\n\treturn (source) ? this.visibleSourceState : this.visibleTargetState;\n};\n\n/**\n * Function: setVisibleTerminalState\n * \n * Sets the visible source or target terminal state.\n * \n * Parameters:\n * \n * terminalState - <mxCellState> that represents the terminal.\n * source - Boolean that specifies if the source or target state should be set.\n */\nmxCellState.prototype.setVisibleTerminalState = function(terminalState, source)\n{\n\tif (source)\n\t{\n\t\tthis.visibleSourceState = terminalState;\n\t}\n\telse\n\t{\n\t\tthis.visibleTargetState = terminalState;\n\t}\n};\n\n/**\n * Function: getCellBounds\n * \n * Returns the unscaled, untranslated bounds.\n */\nmxCellState.prototype.getCellBounds = function()\n{\n\treturn this.cellBounds;\n};\n\n/**\n * Function: getPaintBounds\n * \n * Returns the unscaled, untranslated paint bounds. This is the same as\n * <getCellBounds> but with a 90 degree rotation if the shape's\n * isPaintBoundsInverted returns true.\n */\nmxCellState.prototype.getPaintBounds = function()\n{\n\treturn this.paintBounds;\n};\n\n/**\n * Function: updateCachedBounds\n * \n * Updates the cellBounds and paintBounds.\n */\nmxCellState.prototype.updateCachedBounds = function()\n{\n\tvar tr = this.view.translate;\n\tvar s = this.view.scale;\n\tthis.cellBounds = new mxRectangle(this.x / s - tr.x, this.y / s - tr.y, this.width / s, this.height / s);\n\tthis.paintBounds = mxRectangle.fromRectangle(this.cellBounds);\n\t\n\tif (this.shape != null && this.shape.isPaintBoundsInverted())\n\t{\n\t\tthis.paintBounds.rotate90();\n\t}\n};\n\n/**\n * Destructor: setState\n * \n * Copies all fields from the given state to this state.\n */\nmxCellState.prototype.setState = function(state)\n{\n\tthis.view = state.view;\n\tthis.cell = state.cell;\n\tthis.style = state.style;\n\tthis.absolutePoints = state.absolutePoints;\n\tthis.origin = state.origin;\n\tthis.absoluteOffset = state.absoluteOffset;\n\tthis.boundingBox = state.boundingBox;\n\tthis.terminalDistance = state.terminalDistance;\n\tthis.segments = state.segments;\n\tthis.length = state.length;\n\tthis.x = state.x;\n\tthis.y = state.y;\n\tthis.width = state.width;\n\tthis.height = state.height;\n\tthis.unscaledWidth = state.unscaledWidth;\n};\n\n/**\n * Function: clone\n *\n * Returns a clone of this <mxPoint>.\n */\nmxCellState.prototype.clone = function()\n{\n \tvar clone = new mxCellState(this.view, this.cell, this.style);\n\n\t// Clones the absolute points\n\tif (this.absolutePoints != null)\n\t{\n\t\tclone.absolutePoints = [];\n\t\t\n\t\tfor (var i = 0; i < this.absolutePoints.length; i++)\n\t\t{\n\t\t\tclone.absolutePoints[i] = this.absolutePoints[i].clone();\n\t\t}\n\t}\n\n\tif (this.origin != null)\n\t{\n\t\tclone.origin = this.origin.clone();\n\t}\n\n\tif (this.absoluteOffset != null)\n\t{\n\t\tclone.absoluteOffset = this.absoluteOffset.clone();\n\t}\n\n\tif (this.boundingBox != null)\n\t{\n\t\tclone.boundingBox = this.boundingBox.clone();\n\t}\n\n\tclone.terminalDistance = this.terminalDistance;\n\tclone.segments = this.segments;\n\tclone.length = this.length;\n\tclone.x = this.x;\n\tclone.y = this.y;\n\tclone.width = this.width;\n\tclone.height = this.height;\n\tclone.unscaledWidth = this.unscaledWidth;\n\t\n\treturn clone;\n};\n\n/**\n * Destructor: destroy\n * \n * Destroys the state and all associated resources.\n */\nmxCellState.prototype.destroy = function()\n{\n\tthis.view.graph.cellRenderer.destroy(this);\n};\n"
  },
  {
    "path": "static/cherry/drawio_demo/src/js/view/mxCellStatePreview.js",
    "content": "/**\n * Copyright (c) 2006-2015, JGraph Ltd\n * Copyright (c) 2006-2015, Gaudenz Alder\n */\n/**\n *\n * Class: mxCellStatePreview\n * \n * Implements a live preview for moving cells.\n * \n * Constructor: mxCellStatePreview\n * \n * Constructs a move preview for the given graph.\n * \n * Parameters:\n * \n * graph - Reference to the enclosing <mxGraph>.\n */\nfunction mxCellStatePreview(graph)\n{\n\tthis.deltas = new mxDictionary();\n\tthis.graph = graph;\n};\n\n/**\n * Variable: graph\n * \n * Reference to the enclosing <mxGraph>.\n */\nmxCellStatePreview.prototype.graph = null;\n\n/**\n * Variable: deltas\n * \n * Reference to the enclosing <mxGraph>.\n */\nmxCellStatePreview.prototype.deltas = null;\n\n/**\n * Variable: count\n * \n * Contains the number of entries in the map.\n */\nmxCellStatePreview.prototype.count = 0;\n\n/**\n * Function: isEmpty\n * \n * Returns true if this contains no entries.\n */\nmxCellStatePreview.prototype.isEmpty = function()\n{\n\treturn this.count == 0;\n};\n\n/**\n * Function: moveState\n */\nmxCellStatePreview.prototype.moveState = function(state, dx, dy, add, includeEdges)\n{\n\tadd = (add != null) ? add : true;\n\tincludeEdges = (includeEdges != null) ? includeEdges : true;\n\t\n\tvar delta = this.deltas.get(state.cell);\n\n\tif (delta == null)\n\t{\n\t\t// Note: Deltas stores the point and the state since the key is a string.\n\t\tdelta = {point: new mxPoint(dx, dy), state: state};\n\t\tthis.deltas.put(state.cell, delta);\n\t\tthis.count++;\n\t}\n\telse if (add)\n\t{\n\t\tdelta.point.x += dx;\n\t\tdelta.point.y += dy;\n\t}\n\telse\n\t{\n\t\tdelta.point.x = dx;\n\t\tdelta.point.y = dy;\n\t}\n\t\n\tif (includeEdges)\n\t{\n\t\tthis.addEdges(state);\n\t}\n\t\n\treturn delta.point;\n};\n\n/**\n * Function: show\n */\nmxCellStatePreview.prototype.show = function(visitor)\n{\n\tthis.deltas.visit(mxUtils.bind(this, function(key, delta)\n\t{\n\t\tthis.translateState(delta.state, delta.point.x, delta.point.y);\n\t}));\n\t\n\tthis.deltas.visit(mxUtils.bind(this, function(key, delta)\n\t{\n\t\tthis.revalidateState(delta.state, delta.point.x, delta.point.y, visitor);\n\t}));\n};\n\n/**\n * Function: translateState\n */\nmxCellStatePreview.prototype.translateState = function(state, dx, dy)\n{\n\tif (state != null)\n\t{\n\t\tvar model = this.graph.getModel();\n\t\t\n\t\tif (model.isVertex(state.cell))\n\t\t{\n\t\t\tstate.view.updateCellState(state);\n\t\t\tvar geo = model.getGeometry(state.cell);\n\t\t\t\n\t\t\t// Moves selection cells and non-relative vertices in\n\t\t\t// the first phase so that edge terminal points will\n\t\t\t// be updated in the second phase\n\t\t\tif ((dx != 0 || dy != 0) && geo != null && (!geo.relative || this.deltas.get(state.cell) != null))\n\t\t\t{\n\t\t\t\tstate.x += dx;\n\t\t\t\tstate.y += dy;\n\t\t\t}\n\t\t}\n\t    \n\t    var childCount = model.getChildCount(state.cell);\n\t    \n\t    for (var i = 0; i < childCount; i++)\n\t    {\n\t    \tthis.translateState(state.view.getState(model.getChildAt(state.cell, i)), dx, dy);\n\t    }\n\t}\n};\n\n/**\n * Function: revalidateState\n */\nmxCellStatePreview.prototype.revalidateState = function(state, dx, dy, visitor)\n{\n\tif (state != null)\n\t{\n\t\tvar model = this.graph.getModel();\n\t\t\n\t\t// Updates the edge terminal points and restores the\n\t\t// (relative) positions of any (relative) children\n\t\tif (model.isEdge(state.cell))\n\t\t{\n\t\t\tstate.view.updateCellState(state);\n\t\t}\n\n\t\tvar geo = this.graph.getCellGeometry(state.cell);\n\t\tvar pState = state.view.getState(model.getParent(state.cell));\n\t\t\n\t\t// Moves selection vertices which are relative\n\t\tif ((dx != 0 || dy != 0) && geo != null && geo.relative &&\n\t\t\tmodel.isVertex(state.cell) && (pState == null ||\n\t\t\tmodel.isVertex(pState.cell) || this.deltas.get(state.cell) != null))\n\t\t{\n\t\t\tstate.x += dx;\n\t\t\tstate.y += dy;\n\t\t}\n\t\t\n\t\tthis.graph.cellRenderer.redraw(state);\n\t\n\t\t// Invokes the visitor on the given state\n\t\tif (visitor != null)\n\t\t{\n\t\t\tvisitor(state);\n\t\t}\n\t\t\t\t\t\t\n\t    var childCount = model.getChildCount(state.cell);\n\t    \n\t    for (var i = 0; i < childCount; i++)\n\t    {\n\t    \tthis.revalidateState(this.graph.view.getState(model.getChildAt(state.cell, i)), dx, dy, visitor);\n\t    }\n\t}\n};\n\n/**\n * Function: addEdges\n */\nmxCellStatePreview.prototype.addEdges = function(state)\n{\n\tvar model = this.graph.getModel();\n\tvar edgeCount = model.getEdgeCount(state.cell);\n\n\tfor (var i = 0; i < edgeCount; i++)\n\t{\n\t\tvar s = state.view.getState(model.getEdgeAt(state.cell, i));\n\n\t\tif (s != null)\n\t\t{\n\t\t\tthis.moveState(s, 0, 0);\n\t\t}\n\t}\n};\n"
  },
  {
    "path": "static/cherry/drawio_demo/src/js/view/mxConnectionConstraint.js",
    "content": "/**\n * Copyright (c) 2006-2015, JGraph Ltd\n * Copyright (c) 2006-2015, Gaudenz Alder\n */\n/**\n * Class: mxConnectionConstraint\n * \n * Defines an object that contains the constraints about how to connect one\n * side of an edge to its terminal.\n * \n * Constructor: mxConnectionConstraint\n * \n * Constructs a new connection constraint for the given point and boolean\n * arguments.\n * \n * Parameters:\n * \n * point - Optional <mxPoint> that specifies the fixed location of the point\n * in relative coordinates. Default is null.\n * perimeter - Optional boolean that specifies if the fixed point should be\n * projected onto the perimeter of the terminal. Default is true.\n */\nfunction mxConnectionConstraint(point, perimeter, name)\n{\n\tthis.point = point;\n\tthis.perimeter = (perimeter != null) ? perimeter : true;\n\tthis.name = name;\n};\n\n/**\n * Variable: point\n * \n * <mxPoint> that specifies the fixed location of the connection point.\n */\nmxConnectionConstraint.prototype.point = null;\n\n/**\n * Variable: perimeter\n * \n * Boolean that specifies if the point should be projected onto the perimeter\n * of the terminal.\n */\nmxConnectionConstraint.prototype.perimeter = null;\n\n/**\n * Variable: name\n * \n * Optional string that specifies the name of the constraint.\n */\nmxConnectionConstraint.prototype.name = null;\n"
  },
  {
    "path": "static/cherry/drawio_demo/src/js/view/mxEdgeStyle.js",
    "content": "/**\n * Copyright (c) 2006-2015, JGraph Ltd\n * Copyright (c) 2006-2015, Gaudenz Alder\n */\nvar mxEdgeStyle =\n{\n\t/**\n\t * Class: mxEdgeStyle\n\t * \n\t * Provides various edge styles to be used as the values for\n\t * <mxConstants.STYLE_EDGE> in a cell style.\n\t *\n\t * Example:\n\t * \n\t * (code)\n\t * var style = stylesheet.getDefaultEdgeStyle();\n\t * style[mxConstants.STYLE_EDGE] = mxEdgeStyle.ElbowConnector;\n\t * (end)\n\t * \n\t * Sets the default edge style to <ElbowConnector>.\n\t * \n\t * Custom edge style:\n\t * \n\t * To write a custom edge style, a function must be added to the mxEdgeStyle\n\t * object as follows:\n\t * \n\t * (code)\n\t * mxEdgeStyle.MyStyle = function(state, source, target, points, result)\n\t * {\n\t *   if (source != null && target != null)\n\t *   {\n\t *     var pt = new mxPoint(target.getCenterX(), source.getCenterY());\n\t * \n\t *     if (mxUtils.contains(source, pt.x, pt.y))\n\t *     {\n\t *       pt.y = source.y + source.height;\n\t *     }\n\t * \n\t *     result.push(pt);\n\t *   }\n\t * };\n\t * (end)\n\t * \n\t * In the above example, a right angle is created using a point on the\n\t * horizontal center of the target vertex and the vertical center of the source\n\t * vertex. The code checks if that point intersects the source vertex and makes\n\t * the edge straight if it does. The point is then added into the result array,\n\t * which acts as the return value of the function.\n\t *\n\t * The new edge style should then be registered in the <mxStyleRegistry> as follows:\n\t * (code)\n\t * mxStyleRegistry.putValue('myEdgeStyle', mxEdgeStyle.MyStyle);\n\t * (end)\n\t * \n\t * The custom edge style above can now be used in a specific edge as follows:\n\t * \n\t * (code)\n\t * model.setStyle(edge, 'edgeStyle=myEdgeStyle');\n\t * (end)\n\t * \n\t * Note that the key of the <mxStyleRegistry> entry for the function should\n\t * be used in string values, unless <mxGraphView.allowEval> is true, in\n\t * which case you can also use mxEdgeStyle.MyStyle for the value in the\n\t * cell style above.\n\t * \n\t * Or it can be used for all edges in the graph as follows:\n\t * \n\t * (code)\n\t * var style = graph.getStylesheet().getDefaultEdgeStyle();\n\t * style[mxConstants.STYLE_EDGE] = mxEdgeStyle.MyStyle;\n\t * (end)\n\t * \n\t * Note that the object can be used directly when programmatically setting\n\t * the value, but the key in the <mxStyleRegistry> should be used when\n\t * setting the value via a key, value pair in a cell style.\n\t * \n\t * Function: EntityRelation\n\t * \n\t * Implements an entity relation style for edges (as used in database\n\t * schema diagrams). At the time the function is called, the result\n\t * array contains a placeholder (null) for the first absolute point,\n\t * that is, the point where the edge and source terminal are connected.\n\t * The implementation of the style then adds all intermediate waypoints\n\t * except for the last point, that is, the connection point between the\n\t * edge and the target terminal. The first ant the last point in the\n\t * result array are then replaced with mxPoints that take into account\n\t * the terminal's perimeter and next point on the edge.\n\t *\n\t * Parameters:\n\t * \n\t * state - <mxCellState> that represents the edge to be updated.\n\t * source - <mxCellState> that represents the source terminal.\n\t * target - <mxCellState> that represents the target terminal.\n\t * points - List of relative control points.\n\t * result - Array of <mxPoints> that represent the actual points of the\n\t * edge.\n\t */\n\t EntityRelation: function (state, source, target, points, result)\n\t {\n\t\tvar view = state.view;\n\t \tvar graph = view.graph;\n\t \tvar segment = mxUtils.getValue(state.style,\n\t \t\t\tmxConstants.STYLE_SEGMENT,\n\t \t\t\tmxConstants.ENTITY_SEGMENT) * view.scale;\n\t \t\n\t\tvar pts = state.absolutePoints;\n\t\tvar p0 = pts[0];\n\t\tvar pe = pts[pts.length-1];\n\n\t \tvar isSourceLeft = false;\n\n\t\tif (p0 != null)\n\t\t{\n\t\t\tsource = new mxCellState();\n\t\t\tsource.x = p0.x;\n\t\t\tsource.y = p0.y;\n\t\t}\n\t\telse if (source != null)\n\t\t{\n\t\t\tvar constraint = mxUtils.getPortConstraints(source, state, true, mxConstants.DIRECTION_MASK_NONE);\n\t\t\t\n\t\t\tif (constraint != mxConstants.DIRECTION_MASK_NONE && constraint != mxConstants.DIRECTION_MASK_WEST +\n\t\t\t\tmxConstants.DIRECTION_MASK_EAST)\n\t\t\t{\n\t\t\t\tisSourceLeft = constraint == mxConstants.DIRECTION_MASK_WEST;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t \tvar sourceGeometry = graph.getCellGeometry(source.cell);\n\t\t\n\t\t\t \tif (sourceGeometry.relative)\n\t\t\t \t{\n\t\t\t \t\tisSourceLeft = sourceGeometry.x <= 0.5;\n\t\t\t \t}\n\t\t\t \telse if (target != null)\n\t\t\t \t{\n\t\t\t \t\tisSourceLeft = target.x + target.width < source.x;\n\t\t\t \t}\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn;\n\t\t}\n\t \t\n\t \tvar isTargetLeft = true;\n\n\t\tif (pe != null)\n\t\t{\n\t\t\ttarget = new mxCellState();\n\t\t\ttarget.x = pe.x;\n\t\t\ttarget.y = pe.y;\n\t\t}\n\t\telse if (target != null)\n\t \t{\n\t\t\tvar constraint = mxUtils.getPortConstraints(target, state, false, mxConstants.DIRECTION_MASK_NONE);\n\n\t\t\tif (constraint != mxConstants.DIRECTION_MASK_NONE && constraint != mxConstants.DIRECTION_MASK_WEST +\n\t\t\t\tmxConstants.DIRECTION_MASK_EAST)\n\t\t\t{\n\t\t\t\tisTargetLeft = constraint == mxConstants.DIRECTION_MASK_WEST;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t \tvar targetGeometry = graph.getCellGeometry(target.cell);\n\t\n\t\t\t \tif (targetGeometry.relative)\n\t\t\t \t{\n\t\t\t \t\tisTargetLeft = targetGeometry.x <= 0.5;\n\t\t\t \t}\n\t\t\t \telse if (source != null)\n\t\t\t \t{\n\t\t\t \t\tisTargetLeft = source.x + source.width < target.x;\n\t\t\t \t}\n\t\t\t}\n\t \t}\n\t\t\n\t\tif (source != null && target != null)\n\t\t{\n\t\t\tvar x0 = (isSourceLeft) ? source.x : source.x + source.width;\n\t\t\tvar y0 = view.getRoutingCenterY(source);\n\t\t\t\n\t\t\tvar xe = (isTargetLeft) ? target.x : target.x + target.width;\n\t\t\tvar ye = view.getRoutingCenterY(target);\n\t\n\t\t\tvar seg = segment;\n\t\n\t\t\tvar dx = (isSourceLeft) ? -seg : seg;\n\t\t\tvar dep = new mxPoint(x0 + dx, y0);\n\t\t\t\t\t\n\t\t\tdx = (isTargetLeft) ? -seg : seg;\n\t\t\tvar arr = new mxPoint(xe + dx, ye);\n\t\n\t\t\t// Adds intermediate points if both go out on same side\n\t\t\tif (isSourceLeft == isTargetLeft)\n\t\t\t{\n\t\t\t\tvar x = (isSourceLeft) ?\n\t\t\t\t\tMath.min(x0, xe)-segment :\n\t\t\t\t\tMath.max(x0, xe)+segment;\n\t\n\t\t\t\tresult.push(new mxPoint(x, y0));\n\t\t\t\tresult.push(new mxPoint(x, ye));\n\t\t\t}\n\t\t\telse if ((dep.x < arr.x) == isSourceLeft)\n\t\t\t{\n\t\t\t\tvar midY = y0 + (ye - y0) / 2;\n\t\n\t\t\t\tresult.push(dep);\n\t\t\t\tresult.push(new mxPoint(dep.x, midY));\n\t\t\t\tresult.push(new mxPoint(arr.x, midY));\n\t\t\t\tresult.push(arr);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tresult.push(dep);\n\t\t\t\tresult.push(arr);\n\t\t\t}\n\t\t}\n\t },\n\n\t /**\n\t * Function: Loop\n\t * \n\t * Implements a self-reference, aka. loop.\n\t */\n\tLoop: function (state, source, target, points, result)\n\t{\n\t\tvar pts = state.absolutePoints;\n\t\t\n\t\tvar p0 = pts[0];\n\t\tvar pe = pts[pts.length-1];\n\n\t\tif (p0 != null && pe != null)\n\t\t{\n\t\t\tif (points != null && points.length > 0)\n\t\t\t{\n\t\t\t\tfor (var i = 0; i < points.length; i++)\n\t\t\t\t{\n\t\t\t\t\tvar pt = points[i];\n\t\t\t\t\tpt = state.view.transformControlPoint(state, pt);\n\t\t\t\t\tresult.push(new mxPoint(pt.x, pt.y));\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif (source != null)\n\t\t{\n\t\t\tvar view = state.view;\n\t\t\tvar graph = view.graph;\n\t\t\tvar pt = (points != null && points.length > 0) ? points[0] : null;\n\n\t\t\tif (pt != null)\n\t\t\t{\n\t\t\t\tpt = view.transformControlPoint(state, pt);\n\t\t\t\t\t\n\t\t\t\tif (mxUtils.contains(source, pt.x, pt.y))\n\t\t\t\t{\n\t\t\t\t\tpt = null;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tvar x = 0;\n\t\t\tvar dx = 0;\n\t\t\tvar y = 0;\n\t\t\tvar dy = 0;\n\t\t\t\n\t\t \tvar seg = mxUtils.getValue(state.style, mxConstants.STYLE_SEGMENT,\n\t\t \t\tgraph.gridSize) * view.scale;\n\t\t\tvar dir = mxUtils.getValue(state.style, mxConstants.STYLE_DIRECTION,\n\t\t\t\tmxConstants.DIRECTION_WEST);\n\t\t\t\n\t\t\tif (dir == mxConstants.DIRECTION_NORTH ||\n\t\t\t\tdir == mxConstants.DIRECTION_SOUTH)\n\t\t\t{\n\t\t\t\tx = view.getRoutingCenterX(source);\n\t\t\t\tdx = seg;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\ty = view.getRoutingCenterY(source);\n\t\t\t\tdy = seg;\n\t\t\t}\n\t\t\t\n\t\t\tif (pt == null ||\n\t\t\t\tpt.x < source.x ||\n\t\t\t\tpt.x > source.x + source.width)\n\t\t\t{\n\t\t\t\tif (pt != null)\n\t\t\t\t{\n\t\t\t\t\tx = pt.x;\n\t\t\t\t\tdy = Math.max(Math.abs(y - pt.y), dy);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tif (dir == mxConstants.DIRECTION_NORTH)\n\t\t\t\t\t{\n\t\t\t\t\t\ty = source.y - 2 * dx;\n\t\t\t\t\t}\n\t\t\t\t\telse if (dir == mxConstants.DIRECTION_SOUTH)\n\t\t\t\t\t{\n\t\t\t\t\t\ty = source.y + source.height + 2 * dx;\n\t\t\t\t\t}\n\t\t\t\t\telse if (dir == mxConstants.DIRECTION_EAST)\n\t\t\t\t\t{\n\t\t\t\t\t\tx = source.x - 2 * dy;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tx = source.x + source.width + 2 * dy;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if (pt != null)\n\t\t\t{\n\t\t\t\tx = view.getRoutingCenterX(source);\n\t\t\t\tdx = Math.max(Math.abs(x - pt.x), dy);\n\t\t\t\ty = pt.y;\n\t\t\t\tdy = 0;\n\t\t\t}\n\t\t\t\n\t\t\tresult.push(new mxPoint(x - dx, y - dy));\n\t\t\tresult.push(new mxPoint(x + dx, y + dy));\n\t\t}\n\t},\n\t\n\t/**\n\t * Function: ElbowConnector\n\t * \n\t * Uses either <SideToSide> or <TopToBottom> depending on the horizontal\n\t * flag in the cell style. <SideToSide> is used if horizontal is true or\n\t * unspecified. See <EntityRelation> for a description of the\n\t * parameters.\n\t */\n\tElbowConnector: function (state, source, target, points, result)\n\t{\n\t\tvar pt = (points != null && points.length > 0) ? points[0] : null;\n\n\t\tvar vertical = false;\n\t\tvar horizontal = false;\n\t\t\n\t\tif (source != null && target != null)\n\t\t{\n\t\t\tif (pt != null)\n\t\t\t{\n\t\t\t\tvar left = Math.min(source.x, target.x);\n\t\t\t\tvar right = Math.max(source.x + source.width,\n\t\t\t\t\ttarget.x + target.width);\n\t\n\t\t\t\tvar top = Math.min(source.y, target.y);\n\t\t\t\tvar bottom = Math.max(source.y + source.height,\n\t\t\t\t\ttarget.y + target.height);\n\n\t\t\t\tpt = state.view.transformControlPoint(state, pt);\n\t\t\t\t\t\n\t\t\t\tvertical = pt.y < top || pt.y > bottom;\n\t\t\t\thorizontal = pt.x < left || pt.x > right;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tvar left = Math.max(source.x, target.x);\n\t\t\t\tvar right = Math.min(source.x + source.width,\n\t\t\t\t\ttarget.x + target.width);\n\t\t\t\t\t\n\t\t\t\tvertical = left == right;\n\t\t\t\t\n\t\t\t\tif (!vertical)\n\t\t\t\t{\n\t\t\t\t\tvar top = Math.max(source.y, target.y);\n\t\t\t\t\tvar bottom = Math.min(source.y + source.height,\n\t\t\t\t\t\ttarget.y + target.height);\n\t\t\t\t\t\t\n\t\t\t\t\thorizontal = top == bottom;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (!horizontal && (vertical ||\n\t\t\tstate.style[mxConstants.STYLE_ELBOW] == mxConstants.ELBOW_VERTICAL))\n\t\t{\n\t\t\tmxEdgeStyle.TopToBottom(state, source, target, points, result);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tmxEdgeStyle.SideToSide(state, source, target, points, result);\n\t\t}\n\t},\n\n\t/**\n\t * Function: SideToSide\n\t * \n\t * Implements a vertical elbow edge. See <EntityRelation> for a description\n\t * of the parameters.\n\t */\n\tSideToSide: function (state, source, target, points, result)\n\t{\n\t\tvar view = state.view;\n\t\tvar pt = (points != null && points.length > 0) ? points[0] : null;\n\t\tvar pts = state.absolutePoints;\n\t\tvar p0 = pts[0];\n\t\tvar pe = pts[pts.length-1];\n\t\t\n\t\tif (pt != null)\n\t\t{\n\t\t\tpt = view.transformControlPoint(state, pt);\n\t\t}\n\t\t\n\t\tif (p0 != null)\n\t\t{\n\t\t\tsource = new mxCellState();\n\t\t\tsource.x = p0.x;\n\t\t\tsource.y = p0.y;\n\t\t}\n\t\t\n\t\tif (pe != null)\n\t\t{\n\t\t\ttarget = new mxCellState();\n\t\t\ttarget.x = pe.x;\n\t\t\ttarget.y = pe.y;\n\t\t}\n\t\t\n\t\tif (source != null && target != null)\n\t\t{\n\t\t\tvar l = Math.max(source.x, target.x);\n\t\t\tvar r = Math.min(source.x + source.width,\n\t\t\t\t\t\t\t target.x + target.width);\n\t\n\t\t\tvar x = (pt != null) ? pt.x : Math.round(r + (l - r) / 2);\n\t\n\t\t\tvar y1 = view.getRoutingCenterY(source);\n\t\t\tvar y2 = view.getRoutingCenterY(target);\n\t\n\t\t\tif (pt != null)\n\t\t\t{\n\t\t\t\tif (pt.y >= source.y && pt.y <= source.y + source.height)\n\t\t\t\t{\n\t\t\t\t\ty1 = pt.y;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (pt.y >= target.y && pt.y <= target.y + target.height)\n\t\t\t\t{\n\t\t\t\t\ty2 = pt.y;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif (!mxUtils.contains(target, x, y1) &&\n\t\t\t\t!mxUtils.contains(source, x, y1))\n\t\t\t{\n\t\t\t\tresult.push(new mxPoint(x,  y1));\n\t\t\t}\n\t\n\t\t\tif (!mxUtils.contains(target, x, y2) &&\n\t\t\t\t!mxUtils.contains(source, x, y2))\n\t\t\t{\n\t\t\t\tresult.push(new mxPoint(x, y2));\n\t\t\t}\n\t\n\t\t\tif (result.length == 1)\n\t\t\t{\n\t\t\t\tif (pt != null)\n\t\t\t\t{\n\t\t\t\t\tif (!mxUtils.contains(target, x, pt.y) &&\n\t\t\t\t\t\t!mxUtils.contains(source, x, pt.y))\n\t\t\t\t\t{\n\t\t\t\t\t\tresult.push(new mxPoint(x, pt.y));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\t\n\t\t\t\t\tvar t = Math.max(source.y, target.y);\n\t\t\t\t\tvar b = Math.min(source.y + source.height,\n\t\t\t\t\t\t\t target.y + target.height);\n\t\t\t\t\t\t \n\t\t\t\t\tresult.push(new mxPoint(x, t + (b - t) / 2));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t},\n\n\t/**\n\t * Function: TopToBottom\n\t * \n\t * Implements a horizontal elbow edge. See <EntityRelation> for a\n\t * description of the parameters.\n\t */\n\tTopToBottom: function(state, source, target, points, result)\n\t{\n\t\tvar view = state.view;\n\t\tvar pt = (points != null && points.length > 0) ? points[0] : null;\n\t\tvar pts = state.absolutePoints;\n\t\tvar p0 = pts[0];\n\t\tvar pe = pts[pts.length-1];\n\t\t\n\t\tif (pt != null)\n\t\t{\n\t\t\tpt = view.transformControlPoint(state, pt);\n\t\t}\n\t\t\n\t\tif (p0 != null)\n\t\t{\n\t\t\tsource = new mxCellState();\n\t\t\tsource.x = p0.x;\n\t\t\tsource.y = p0.y;\n\t\t}\n\t\t\n\t\tif (pe != null)\n\t\t{\n\t\t\ttarget = new mxCellState();\n\t\t\ttarget.x = pe.x;\n\t\t\ttarget.y = pe.y;\n\t\t}\n\n\t\tif (source != null && target != null)\n\t\t{\n\t\t\tvar t = Math.max(source.y, target.y);\n\t\t\tvar b = Math.min(source.y + source.height,\n\t\t\t\t\t\t\t target.y + target.height);\n\t\n\t\t\tvar x = view.getRoutingCenterX(source);\n\t\t\t\n\t\t\tif (pt != null &&\n\t\t\t\tpt.x >= source.x &&\n\t\t\t\tpt.x <= source.x + source.width)\n\t\t\t{\n\t\t\t\tx = pt.x;\n\t\t\t}\n\t\t\t\n\t\t\tvar y = (pt != null) ? pt.y : Math.round(b + (t - b) / 2);\n\t\t\t\n\t\t\tif (!mxUtils.contains(target, x, y) &&\n\t\t\t\t!mxUtils.contains(source, x, y))\n\t\t\t{\n\t\t\t\tresult.push(new mxPoint(x, y));\t\t\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tif (pt != null &&\n\t\t\t\tpt.x >= target.x &&\n\t\t\t\tpt.x <= target.x + target.width)\n\t\t\t{\n\t\t\t\tx = pt.x;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tx = view.getRoutingCenterX(target);\n\t\t\t}\n\t\t\t\n\t\t\tif (!mxUtils.contains(target, x, y) &&\n\t\t\t\t!mxUtils.contains(source, x, y))\n\t\t\t{\n\t\t\t\tresult.push(new mxPoint(x, y));\t\t\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tif (result.length == 1)\n\t\t\t{\n\t\t\t\tif (pt != null && result.length == 1)\n\t\t\t\t{\n\t\t\t\t\tif (!mxUtils.contains(target, pt.x, y) &&\n\t\t\t\t\t\t!mxUtils.contains(source, pt.x, y))\n\t\t\t\t\t{\n\t\t\t\t\t\tresult.push(new mxPoint(pt.x, y));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tvar l = Math.max(source.x, target.x);\n\t\t\t\t\tvar r = Math.min(source.x + source.width,\n\t\t\t\t\t\t\t target.x + target.width);\n\t\t\t\t\t\t \n\t\t\t\t\tresult.push(new mxPoint(l + (r - l) / 2, y));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t},\n\n\t/**\n\t * Function: SegmentConnector\n\t * \n\t * Implements an orthogonal edge style. Use <mxEdgeSegmentHandler>\n\t * as an interactive handler for this style.\n\t */\n\tSegmentConnector: function(state, source, target, hints, result)\n\t{\n\t\t// Creates array of all way- and terminalpoints\n\t\tvar pts = state.absolutePoints;\n\t\tvar tol = Math.max(1, state.view.scale);\n\t\t\n\t\t// Whether the first segment outgoing from the source end is horizontal\n\t\tvar lastPushed = (result.length > 0) ? result[0] : null;\n\t\tvar horizontal = true;\n\t\tvar hint = null;\n\t\t\n\t\t// Adds waypoints only if outside of tolerance\n\t\tfunction pushPoint(pt)\n\t\t{\n\t\t\tif (lastPushed == null || Math.abs(lastPushed.x - pt.x) >= tol || Math.abs(lastPushed.y - pt.y) >= tol)\n\t\t\t{\n\t\t\t\tresult.push(pt);\n\t\t\t\tlastPushed = pt;\n\t\t\t}\n\t\t\t\n\t\t\treturn lastPushed;\n\t\t};\n\n\t\t// Adds the first point\n\t\tvar pt = pts[0];\n\t\t\n\t\tif (pt == null && source != null)\n\t\t{\n\t\t\tpt = new mxPoint(state.view.getRoutingCenterX(source), state.view.getRoutingCenterY(source));\n\t\t}\n\t\telse if (pt != null)\n\t\t{\n\t\t\tpt = pt.clone();\n\t\t}\n\t\t\n\t\tpt.x = Math.round(pt.x);\n\t\tpt.y = Math.round(pt.y);\n\t\t\n\t\tvar lastInx = pts.length - 1;\n\n\t\t// Adds the waypoints\n\t\tif (hints != null && hints.length > 0)\n\t\t{\n\t\t\t// Converts all hints and removes nulls\n\t\t\tvar newHints = [];\n\t\t\t\n\t\t\tfor (var i = 0; i < hints.length; i++)\n\t\t\t{\n\t\t\t\tvar tmp = state.view.transformControlPoint(state, hints[i]);\n\t\t\t\t\n\t\t\t\tif (tmp != null)\n\t\t\t\t{\n\t\t\t\t\ttmp.x = Math.round(tmp.x);\n\t\t\t\t\ttmp.y = Math.round(tmp.y);\n\t\t\t\t\tnewHints.push(tmp);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif (newHints.length == 0)\n\t\t\t{\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t\n\t\t\thints = newHints;\n\t\t\t\n\t\t\t// Aligns source and target hint to fixed points\n\t\t\tif (pt != null && hints[0] != null)\n\t\t\t{\n\t\t\t\tif (Math.abs(hints[0].x - pt.x) < tol)\n\t\t\t\t{\n\t\t\t\t\thints[0].x = pt.x;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (Math.abs(hints[0].y - pt.y) < tol)\n\t\t\t\t{\n\t\t\t\t\thints[0].y = pt.y;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tvar pe = pts[lastInx];\n\t\t\t\n\t\t\tif (pe != null && hints[hints.length - 1] != null)\n\t\t\t{\n\t\t\t\tif (Math.abs(hints[hints.length - 1].x - pe.x) < tol)\n\t\t\t\t{\n\t\t\t\t\thints[hints.length - 1].x = pe.x;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (Math.abs(hints[hints.length - 1].y - pe.y) < tol)\n\t\t\t\t{\n\t\t\t\t\thints[hints.length - 1].y = pe.y;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\thint = hints[0];\n\n\t\t\tvar currentTerm = source;\n\t\t\tvar currentPt = pts[0];\n\t\t\tvar hozChan = false;\n\t\t\tvar vertChan = false;\n\t\t\tvar currentHint = hint;\n\t\t\t\n\t\t\tif (currentPt != null)\n\t\t\t{\n\t\t\t\tcurrentPt.x = Math.round(currentPt.x);\n\t\t\t\tcurrentPt.y = Math.round(currentPt.y);\n\t\t\t\tcurrentTerm = null;\n\t\t\t}\n\t\t\t\n\t\t\t// Check for alignment with fixed points and with channels\n\t\t\t// at source and target segments only\n\t\t\tfor (var i = 0; i < 2; i++)\n\t\t\t{\n\t\t\t\tvar fixedVertAlign = currentPt != null && currentPt.x == currentHint.x;\n\t\t\t\tvar fixedHozAlign = currentPt != null && currentPt.y == currentHint.y;\n\t\t\t\t\n\t\t\t\tvar inHozChan = currentTerm != null && (currentHint.y >= currentTerm.y &&\n\t\t\t\t\t\tcurrentHint.y <= currentTerm.y + currentTerm.height);\n\t\t\t\tvar inVertChan = currentTerm != null && (currentHint.x >= currentTerm.x &&\n\t\t\t\t\t\tcurrentHint.x <= currentTerm.x + currentTerm.width);\n\n\t\t\t\thozChan = fixedHozAlign || (currentPt == null && inHozChan);\n\t\t\t\tvertChan = fixedVertAlign || (currentPt == null && inVertChan);\n\t\t\t\t\n\t\t\t\t// If the current hint falls in both the hor and vert channels in the case\n\t\t\t\t// of a floating port, or if the hint is exactly co-incident with a \n\t\t\t\t// fixed point, ignore the source and try to work out the orientation\n\t\t\t\t// from the target end\n\t\t\t\tif (i==0 && ((hozChan && vertChan) || (fixedVertAlign && fixedHozAlign)))\n\t\t\t\t{\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tif (currentPt != null && (!fixedHozAlign && !fixedVertAlign) && (inHozChan || inVertChan)) \n\t\t\t\t\t{\n\t\t\t\t\t\thorizontal = inHozChan ? false : true;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\n\t\t\t\t\tif (vertChan || hozChan)\n\t\t\t\t\t{\n\t\t\t\t\t\thorizontal = hozChan;\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (i == 1)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t// Work back from target end\n\t\t\t\t\t\t\thorizontal = hints.length % 2 == 0 ? hozChan : vertChan;\n\t\t\t\t\t\t}\n\t\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tcurrentTerm = target;\n\t\t\t\tcurrentPt = pts[lastInx];\n\t\t\t\t\n\t\t\t\tif (currentPt != null)\n\t\t\t\t{\n\t\t\t\t\tcurrentPt.x = Math.round(currentPt.x);\n\t\t\t\t\tcurrentPt.y = Math.round(currentPt.y);\n\t\t\t\t\tcurrentTerm = null;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tcurrentHint = hints[hints.length - 1];\n\t\t\t\t\n\t\t\t\tif (fixedVertAlign && fixedHozAlign)\n\t\t\t\t{\n\t\t\t\t\thints = hints.slice(1);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (horizontal && ((pts[0] != null && pts[0].y != hint.y) ||\n\t\t\t\t(pts[0] == null && source != null &&\n\t\t\t\t(hint.y < source.y || hint.y > source.y + source.height))))\n\t\t\t{\n\t\t\t\tpushPoint(new mxPoint(pt.x, hint.y));\n\t\t\t}\n\t\t\telse if (!horizontal && ((pts[0] != null && pts[0].x != hint.x) ||\n\t\t\t\t\t(pts[0] == null && source != null &&\n\t\t\t\t\t(hint.x < source.x || hint.x > source.x + source.width))))\n\t\t\t{\n\t\t\t\tpushPoint(new mxPoint(hint.x, pt.y));\n\t\t\t}\n\t\t\t\n\t\t\tif (horizontal)\n\t\t\t{\n\t\t\t\tpt.y = hint.y;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tpt.x = hint.x;\n\t\t\t}\n\t\t\n\t\t\tfor (var i = 0; i < hints.length; i++)\n\t\t\t{\n\t\t\t\thorizontal = !horizontal;\n\t\t\t\thint = hints[i];\n\t\t\t\t\n//\t\t\t\tmxLog.show();\n//\t\t\t\tmxLog.debug('hint', i, hint.x, hint.y);\n\t\t\t\t\n\t\t\t\tif (horizontal)\n\t\t\t\t{\n\t\t\t\t\tpt.y = hint.y;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tpt.x = hint.x;\n\t\t\t\t}\n\t\t\n\t\t\t\tpushPoint(pt.clone());\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\thint = pt;\n\t\t\t// FIXME: First click in connect preview toggles orientation\n\t\t\thorizontal = true;\n\t\t}\n\n\t\t// Adds the last point\n\t\tpt = pts[lastInx];\n\n\t\tif (pt == null && target != null)\n\t\t{\n\t\t\tpt = new mxPoint(state.view.getRoutingCenterX(target), state.view.getRoutingCenterY(target));\n\t\t}\n\t\t\n\t\tif (pt != null)\n\t\t{\n\t\t\tpt.x = Math.round(pt.x);\n\t\t\tpt.y = Math.round(pt.y);\n\t\t\t\n\t\t\tif (hint != null)\n\t\t\t{\n\t\t\t\tif (horizontal && ((pts[lastInx] != null && pts[lastInx].y != hint.y) ||\n\t\t\t\t\t(pts[lastInx] == null && target != null &&\n\t\t\t\t\t(hint.y < target.y || hint.y > target.y + target.height))))\n\t\t\t\t{\n\t\t\t\t\tpushPoint(new mxPoint(pt.x, hint.y));\n\t\t\t\t}\n\t\t\t\telse if (!horizontal && ((pts[lastInx] != null && pts[lastInx].x != hint.x) ||\n\t\t\t\t\t\t(pts[lastInx] == null && target != null &&\n\t\t\t\t\t\t(hint.x < target.x || hint.x > target.x + target.width))))\n\t\t\t\t{\n\t\t\t\t\tpushPoint(new mxPoint(hint.x, pt.y));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Removes bends inside the source terminal for floating ports\n\t\tif (pts[0] == null && source != null)\n\t\t{\n\t\t\twhile (result.length > 1 && result[1] != null &&\n\t\t\t\tmxUtils.contains(source, result[1].x, result[1].y))\n\t\t\t{\n\t\t\t\tresult.splice(1, 1);\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Removes bends inside the target terminal\n\t\tif (pts[lastInx] == null && target != null)\n\t\t{\n\t\t\twhile (result.length > 1 && result[result.length - 1] != null &&\n\t\t\t\tmxUtils.contains(target, result[result.length - 1].x, result[result.length - 1].y))\n\t\t\t{\n\t\t\t\tresult.splice(result.length - 1, 1);\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Removes last point if inside tolerance with end point\n\t\tif (pe != null && result[result.length - 1] != null &&\n\t\t\tMath.abs(pe.x - result[result.length - 1].x) < tol &&\n\t\t\tMath.abs(pe.y - result[result.length - 1].y) < tol)\n\t\t{\n\t\t\tresult.splice(result.length - 1, 1);\n\t\t\t\n\t\t\t// Lines up second last point in result with end point\n\t\t\tif (result[result.length - 1] != null)\n\t\t\t{\n\t\t\t\tif (Math.abs(result[result.length - 1].x - pe.x) < tol)\n\t\t\t\t{\n\t\t\t\t\tresult[result.length - 1].x = pe.x;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (Math.abs(result[result.length - 1].y - pe.y) < tol)\n\t\t\t\t{\n\t\t\t\t\tresult[result.length - 1].y = pe.y;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t},\n\t\n\torthBuffer: 10,\n\t\n\torthPointsFallback: true,\n\n\tdirVectors: [ [ -1, 0 ],\n\t\t\t[ 0, -1 ], [ 1, 0 ], [ 0, 1 ], [ -1, 0 ], [ 0, -1 ], [ 1, 0 ] ],\n\n\twayPoints1: [ [ 0, 0], [ 0, 0],  [ 0, 0], [ 0, 0], [ 0, 0],  [ 0, 0],\n\t              [ 0, 0],  [ 0, 0], [ 0, 0],  [ 0, 0], [ 0, 0],  [ 0, 0] ],\n\n\troutePatterns: [\n\t\t[ [ 513, 2308, 2081, 2562 ], [ 513, 1090, 514, 2184, 2114, 2561 ],\n\t\t\t[ 513, 1090, 514, 2564, 2184, 2562 ],\n\t\t\t[ 513, 2308, 2561, 1090, 514, 2568, 2308 ] ],\n\t[ [ 514, 1057, 513, 2308, 2081, 2562 ], [ 514, 2184, 2114, 2561 ],\n\t\t\t[ 514, 2184, 2562, 1057, 513, 2564, 2184 ],\n\t\t\t[ 514, 1057, 513, 2568, 2308, 2561 ] ],\n\t[ [ 1090, 514, 1057, 513, 2308, 2081, 2562 ], [ 2114, 2561 ],\n\t\t\t[ 1090, 2562, 1057, 513, 2564, 2184 ],\n\t\t\t[ 1090, 514, 1057, 513, 2308, 2561, 2568 ] ],\n\t[ [ 2081, 2562 ], [ 1057, 513, 1090, 514, 2184, 2114, 2561 ],\n\t\t\t[ 1057, 513, 1090, 514, 2184, 2562, 2564 ],\n\t\t\t[ 1057, 2561, 1090, 514, 2568, 2308 ] ] ],\n\t\n\tinlineRoutePatterns: [\n\t\t\t[ null, [ 2114, 2568 ], null, null ],\n\t\t\t[ null, [ 514, 2081, 2114, 2568 ] , null, null ],\n\t\t\t[ null, [ 2114, 2561 ], null, null ],\n\t\t\t[ [ 2081, 2562 ], [ 1057, 2114, 2568 ],\n\t\t\t\t\t[ 2184, 2562 ],\n\t\t\t\t\tnull ] ],\n\tvertexSeperations: [],\n\n\tlimits: [\n\t       [ 0, 0, 0, 0, 0, 0, 0, 0, 0 ],\n\t       [ 0, 0, 0, 0, 0, 0, 0, 0, 0 ] ],\n\n\tLEFT_MASK: 32,\n\n\tTOP_MASK: 64,\n\n\tRIGHT_MASK: 128,\n\n\tBOTTOM_MASK: 256,\n\n\tLEFT: 1,\n\n\tTOP: 2,\n\n\tRIGHT: 4,\n\n\tBOTTOM: 8,\n\n\t// TODO remove magic numbers\n\tSIDE_MASK: 480,\n\t//mxEdgeStyle.LEFT_MASK | mxEdgeStyle.TOP_MASK | mxEdgeStyle.RIGHT_MASK\n\t//| mxEdgeStyle.BOTTOM_MASK,\n\n\tCENTER_MASK: 512,\n\n\tSOURCE_MASK: 1024,\n\n\tTARGET_MASK: 2048,\n\n\tVERTEX_MASK: 3072,\n\t// mxEdgeStyle.SOURCE_MASK | mxEdgeStyle.TARGET_MASK,\n\t\n\tgetJettySize: function(state, source, target, points, isSource)\n\t{\n\t\tvar value = mxUtils.getValue(state.style, (isSource) ? mxConstants.STYLE_SOURCE_JETTY_SIZE :\n\t\t\tmxConstants.STYLE_TARGET_JETTY_SIZE, mxUtils.getValue(state.style,\n\t\t\t\t\tmxConstants.STYLE_JETTY_SIZE, mxEdgeStyle.orthBuffer));\n\t\t\n\t\tif (value == 'auto')\n\t\t{\n\t\t\t// Computes the automatic jetty size\n\t\t\tvar type = mxUtils.getValue(state.style, (isSource) ? mxConstants.STYLE_STARTARROW : mxConstants.STYLE_ENDARROW, mxConstants.NONE);\n\t\t\t\n\t\t\tif (type != mxConstants.NONE)\n\t\t\t{\n\t\t\t\tvar size = mxUtils.getNumber(state.style, (isSource) ? mxConstants.STYLE_STARTSIZE : mxConstants.STYLE_ENDSIZE, mxConstants.DEFAULT_MARKERSIZE);\n\t\t\t\tvalue = Math.max(2, Math.ceil((size + mxEdgeStyle.orthBuffer) / mxEdgeStyle.orthBuffer)) * mxEdgeStyle.orthBuffer;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tvalue = 2 * mxEdgeStyle.orthBuffer;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn value;\n\t},\n\n\t/**\n\t * Function: OrthConnector\n\t * \n\t * Implements a local orthogonal router between the given\n\t * cells.\n\t * \n\t * Parameters:\n\t * \n\t * state - <mxCellState> that represents the edge to be updated.\n\t * source - <mxCellState> that represents the source terminal.\n\t * target - <mxCellState> that represents the target terminal.\n\t * points - List of relative control points.\n\t * result - Array of <mxPoints> that represent the actual points of the\n\t * edge.\n\t * \n\t */\n\tOrthConnector: function(state, source, target, points, result)\n\t{\n\t\tvar graph = state.view.graph;\n\t\tvar sourceEdge = source == null ? false : graph.getModel().isEdge(source.cell);\n\t\tvar targetEdge = target == null ? false : graph.getModel().isEdge(target.cell);\n\n\t\tvar pts = state.absolutePoints;\n\t\tvar p0 = pts[0];\n\t\tvar pe = pts[pts.length-1];\n\n\t\tvar sourceX = source != null ? source.x : p0.x;\n\t\tvar sourceY = source != null ? source.y : p0.y;\n\t\tvar sourceWidth = source != null ? source.width : 0;\n\t\tvar sourceHeight = source != null ? source.height : 0;\n\t\t\n\t\tvar targetX = target != null ? target.x : pe.x;\n\t\tvar targetY = target != null ? target.y : pe.y;\n\t\tvar targetWidth = target != null ? target.width : 0;\n\t\tvar targetHeight = target != null ? target.height : 0;\n\n\t\tvar scaledSourceBuffer = state.view.scale * mxEdgeStyle.getJettySize(state, source, target, points, true);\n\t\tvar scaledTargetBuffer = state.view.scale * mxEdgeStyle.getJettySize(state, source, target, points, false);\n\t\t\n\t\t// Workaround for loop routing within buffer zone\n\t\tif (source != null && target == source)\n\t\t{\n\t\t\tscaledTargetBuffer = Math.max(scaledSourceBuffer, scaledTargetBuffer);\n\t\t\tscaledSourceBuffer = scaledTargetBuffer;\n\t\t}\n\t\t\n\t\tvar totalBuffer = scaledTargetBuffer + scaledSourceBuffer;\n\t\tvar tooShort = false;\n\t\t\n\t\t// Checks minimum distance for fixed points and falls back to segment connector\n\t\tif (p0 != null && pe != null)\n\t\t{\n\t\t\tvar dx = pe.x - p0.x;\n\t\t\tvar dy = pe.y - p0.y;\n\t\t\t\n\t\t\ttooShort = dx * dx + dy * dy < totalBuffer * totalBuffer;\n\t\t}\n\n\t\tif (tooShort || (mxEdgeStyle.orthPointsFallback && (points != null &&\n\t\t\tpoints.length > 0)) || sourceEdge || targetEdge)\n\t\t{\n\t\t\tmxEdgeStyle.SegmentConnector(state, source, target, points, result);\n\t\t\t\n\t\t\treturn;\n\t\t}\n\n\t\t// Determine the side(s) of the source and target vertices\n\t\t// that the edge may connect to\n\t\t// portConstraint [source, target]\n\t\tvar portConstraint = [mxConstants.DIRECTION_MASK_ALL, mxConstants.DIRECTION_MASK_ALL];\n\t\tvar rotation = 0;\n\t\t\n\t\tif (source != null)\n\t\t{\n\t\t\tportConstraint[0] = mxUtils.getPortConstraints(source, state, true, \n\t\t\t\t\tmxConstants.DIRECTION_MASK_ALL);\n\t\t\trotation = mxUtils.getValue(source.style, mxConstants.STYLE_ROTATION, 0);\n\t\t\t\n\t\t\tif (rotation != 0)\n\t\t\t{\n\t\t\t\tvar newRect = mxUtils.getBoundingBox(new mxRectangle(sourceX, sourceY, sourceWidth, sourceHeight), rotation);\n\t\t\t\tsourceX = newRect.x; \n\t\t\t\tsourceY = newRect.y;\n\t\t\t\tsourceWidth = newRect.width;\n\t\t\t\tsourceHeight = newRect.height;\n\t\t\t}\n\t\t}\n\n\t\tif (target != null)\n\t\t{\n\t\t\tportConstraint[1] = mxUtils.getPortConstraints(target, state, false,\n\t\t\t\tmxConstants.DIRECTION_MASK_ALL);\n\t\t\trotation = mxUtils.getValue(target.style, mxConstants.STYLE_ROTATION, 0);\n\n\t\t\tif (rotation != 0)\n\t\t\t{\n\t\t\t\tvar newRect = mxUtils.getBoundingBox(new mxRectangle(targetX, targetY, targetWidth, targetHeight), rotation);\n\t\t\t\ttargetX = newRect.x;\n\t\t\t\ttargetY = newRect.y;\n\t\t\t\ttargetWidth = newRect.width;\n\t\t\t\ttargetHeight = newRect.height;\n\t\t\t}\n\t\t}\n\n\t\t// Avoids floating point number errors\n\t\tsourceX = Math.round(sourceX * 10) / 10;\n\t\tsourceY = Math.round(sourceY * 10) / 10;\n\t\tsourceWidth = Math.round(sourceWidth * 10) / 10;\n\t\tsourceHeight = Math.round(sourceHeight * 10) / 10;\n\t\t\n\t\ttargetX = Math.round(targetX * 10) / 10;\n\t\ttargetY = Math.round(targetY * 10) / 10;\n\t\ttargetWidth = Math.round(targetWidth * 10) / 10;\n\t\ttargetHeight = Math.round(targetHeight * 10) / 10;\n\t\t\n\t\tvar dir = [0, 0];\n\n\t\t// Work out which faces of the vertices present against each other\n\t\t// in a way that would allow a 3-segment connection if port constraints\n\t\t// permitted.\n\t\t// geo -> [source, target] [x, y, width, height]\n\t\tvar geo = [ [sourceX, sourceY, sourceWidth, sourceHeight] ,\n\t\t            [targetX, targetY, targetWidth, targetHeight] ];\n\t\tvar buffer = [scaledSourceBuffer, scaledTargetBuffer];\n\n\t\tfor (var i = 0; i < 2; i++)\n\t\t{\n\t\t\tmxEdgeStyle.limits[i][1] = geo[i][0] - buffer[i];\n\t\t\tmxEdgeStyle.limits[i][2] = geo[i][1] - buffer[i];\n\t\t\tmxEdgeStyle.limits[i][4] = geo[i][0] + geo[i][2] + buffer[i];\n\t\t\tmxEdgeStyle.limits[i][8] = geo[i][1] + geo[i][3] + buffer[i];\n\t\t}\n\t\t\n\t\t// Work out which quad the target is in\n\t\tvar sourceCenX = geo[0][0] + geo[0][2] / 2.0;\n\t\tvar sourceCenY = geo[0][1] + geo[0][3] / 2.0;\n\t\tvar targetCenX = geo[1][0] + geo[1][2] / 2.0;\n\t\tvar targetCenY = geo[1][1] + geo[1][3] / 2.0;\n\t\t\n\t\tvar dx = sourceCenX - targetCenX;\n\t\tvar dy = sourceCenY - targetCenY;\n\n\t\tvar quad = 0;\n\n\t\tif (dx < 0)\n\t\t{\n\t\t\tif (dy < 0)\n\t\t\t{\n\t\t\t\tquad = 2;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tquad = 1;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif (dy <= 0)\n\t\t\t{\n\t\t\t\tquad = 3;\n\t\t\t\t\n\t\t\t\t// Special case on x = 0 and negative y\n\t\t\t\tif (dx == 0)\n\t\t\t\t{\n\t\t\t\t\tquad = 2;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Check for connection constraints\n\t\tvar currentTerm = null;\n\t\t\n\t\tif (source != null)\n\t\t{\n\t\t\tcurrentTerm = p0;\n\t\t}\n\n\t\tvar constraint = [ [0.5, 0.5] , [0.5, 0.5] ];\n\n\t\tfor (var i = 0; i < 2; i++)\n\t\t{\n\t\t\tif (currentTerm != null)\n\t\t\t{\n\t\t\t\tconstraint[i][0] = (currentTerm.x - geo[i][0]) / geo[i][2];\n\t\t\t\t\n\t\t\t\tif (Math.abs(currentTerm.x - geo[i][0]) <= 1)\n\t\t\t\t{\n\t\t\t\t\tdir[i] = mxConstants.DIRECTION_MASK_WEST;\n\t\t\t\t}\n\t\t\t\telse if (Math.abs(currentTerm.x - geo[i][0] - geo[i][2]) <= 1)\n\t\t\t\t{\n\t\t\t\t\tdir[i] = mxConstants.DIRECTION_MASK_EAST;\n\t\t\t\t}\n\n\t\t\t\tconstraint[i][1] = (currentTerm.y - geo[i][1]) / geo[i][3];\n\n\t\t\t\tif (Math.abs(currentTerm.y - geo[i][1]) <= 1)\n\t\t\t\t{\n\t\t\t\t\tdir[i] = mxConstants.DIRECTION_MASK_NORTH;\n\t\t\t\t}\n\t\t\t\telse if (Math.abs(currentTerm.y - geo[i][1] - geo[i][3]) <= 1)\n\t\t\t\t{\n\t\t\t\t\tdir[i] = mxConstants.DIRECTION_MASK_SOUTH;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tcurrentTerm = null;\n\t\t\t\n\t\t\tif (target != null)\n\t\t\t{\n\t\t\t\tcurrentTerm = pe;\n\t\t\t}\n\t\t}\n\n\t\tvar sourceTopDist = geo[0][1] - (geo[1][1] + geo[1][3]);\n\t\tvar sourceLeftDist = geo[0][0] - (geo[1][0] + geo[1][2]);\n\t\tvar sourceBottomDist = geo[1][1] - (geo[0][1] + geo[0][3]);\n\t\tvar sourceRightDist = geo[1][0] - (geo[0][0] + geo[0][2]);\n\n\t\tmxEdgeStyle.vertexSeperations[1] = Math.max(sourceLeftDist - totalBuffer, 0);\n\t\tmxEdgeStyle.vertexSeperations[2] = Math.max(sourceTopDist - totalBuffer, 0);\n\t\tmxEdgeStyle.vertexSeperations[4] = Math.max(sourceBottomDist - totalBuffer, 0);\n\t\tmxEdgeStyle.vertexSeperations[3] = Math.max(sourceRightDist - totalBuffer, 0);\n\t\t\t\t\n\t\t//==============================================================\n\t\t// Start of source and target direction determination\n\n\t\t// Work through the preferred orientations by relative positioning\n\t\t// of the vertices and list them in preferred and available order\n\t\t\n\t\tvar dirPref = [];\n\t\tvar horPref = [];\n\t\tvar vertPref = [];\n\n\t\thorPref[0] = (sourceLeftDist >= sourceRightDist) ? mxConstants.DIRECTION_MASK_WEST\n\t\t\t\t: mxConstants.DIRECTION_MASK_EAST;\n\t\tvertPref[0] = (sourceTopDist >= sourceBottomDist) ? mxConstants.DIRECTION_MASK_NORTH\n\t\t\t\t: mxConstants.DIRECTION_MASK_SOUTH;\n\n\t\thorPref[1] = mxUtils.reversePortConstraints(horPref[0]);\n\t\tvertPref[1] = mxUtils.reversePortConstraints(vertPref[0]);\n\t\t\n\t\tvar preferredHorizDist = sourceLeftDist >= sourceRightDist ? sourceLeftDist\n\t\t\t\t: sourceRightDist;\n\t\tvar preferredVertDist = sourceTopDist >= sourceBottomDist ? sourceTopDist\n\t\t\t\t: sourceBottomDist;\n\n\t\tvar prefOrdering = [ [0, 0] , [0, 0] ];\n\t\tvar preferredOrderSet = false;\n\n\t\t// If the preferred port isn't available, switch it\n\t\tfor (var i = 0; i < 2; i++)\n\t\t{\n\t\t\tif (dir[i] != 0x0)\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif ((horPref[i] & portConstraint[i]) == 0)\n\t\t\t{\n\t\t\t\thorPref[i] = mxUtils.reversePortConstraints(horPref[i]);\n\t\t\t}\n\n\t\t\tif ((vertPref[i] & portConstraint[i]) == 0)\n\t\t\t{\n\t\t\t\tvertPref[i] = mxUtils\n\t\t\t\t\t\t.reversePortConstraints(vertPref[i]);\n\t\t\t}\n\n\t\t\tprefOrdering[i][0] = vertPref[i];\n\t\t\tprefOrdering[i][1] = horPref[i];\n\t\t}\n\n\t\tif (preferredVertDist > 0\n\t\t\t\t&& preferredHorizDist > 0)\n\t\t{\n\t\t\t// Possibility of two segment edge connection\n\t\t\tif (((horPref[0] & portConstraint[0]) > 0)\n\t\t\t\t\t&& ((vertPref[1] & portConstraint[1]) > 0))\n\t\t\t{\n\t\t\t\tprefOrdering[0][0] = horPref[0];\n\t\t\t\tprefOrdering[0][1] = vertPref[0];\n\t\t\t\tprefOrdering[1][0] = vertPref[1];\n\t\t\t\tprefOrdering[1][1] = horPref[1];\n\t\t\t\tpreferredOrderSet = true;\n\t\t\t}\n\t\t\telse if (((vertPref[0] & portConstraint[0]) > 0)\n\t\t\t\t\t&& ((horPref[1] & portConstraint[1]) > 0))\n\t\t\t{\n\t\t\t\tprefOrdering[0][0] = vertPref[0];\n\t\t\t\tprefOrdering[0][1] = horPref[0];\n\t\t\t\tprefOrdering[1][0] = horPref[1];\n\t\t\t\tprefOrdering[1][1] = vertPref[1];\n\t\t\t\tpreferredOrderSet = true;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (preferredVertDist > 0 && !preferredOrderSet)\n\t\t{\n\t\t\tprefOrdering[0][0] = vertPref[0];\n\t\t\tprefOrdering[0][1] = horPref[0];\n\t\t\tprefOrdering[1][0] = vertPref[1];\n\t\t\tprefOrdering[1][1] = horPref[1];\n\t\t\tpreferredOrderSet = true;\n\n\t\t}\n\t\t\n\t\tif (preferredHorizDist > 0 && !preferredOrderSet)\n\t\t{\n\t\t\tprefOrdering[0][0] = horPref[0];\n\t\t\tprefOrdering[0][1] = vertPref[0];\n\t\t\tprefOrdering[1][0] = horPref[1];\n\t\t\tprefOrdering[1][1] = vertPref[1];\n\t\t\tpreferredOrderSet = true;\n\t\t}\n\n\t\t// The source and target prefs are now an ordered list of\n\t\t// the preferred port selections\n\t\t// It the list can contain gaps, compact it\n\n\t\tfor (var i = 0; i < 2; i++)\n\t\t{\n\t\t\tif (dir[i] != 0x0)\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif ((prefOrdering[i][0] & portConstraint[i]) == 0)\n\t\t\t{\n\t\t\t\tprefOrdering[i][0] = prefOrdering[i][1];\n\t\t\t}\n\n\t\t\tdirPref[i] = prefOrdering[i][0] & portConstraint[i];\n\t\t\tdirPref[i] |= (prefOrdering[i][1] & portConstraint[i]) << 8;\n\t\t\tdirPref[i] |= (prefOrdering[1 - i][i] & portConstraint[i]) << 16;\n\t\t\tdirPref[i] |= (prefOrdering[1 - i][1 - i] & portConstraint[i]) << 24;\n\n\t\t\tif ((dirPref[i] & 0xF) == 0)\n\t\t\t{\n\t\t\t\tdirPref[i] = dirPref[i] << 8;\n\t\t\t}\n\t\t\t\n\t\t\tif ((dirPref[i] & 0xF00) == 0)\n\t\t\t{\n\t\t\t\tdirPref[i] = (dirPref[i] & 0xF) | dirPref[i] >> 8;\n\t\t\t}\n\t\t\t\n\t\t\tif ((dirPref[i] & 0xF0000) == 0)\n\t\t\t{\n\t\t\t\tdirPref[i] = (dirPref[i] & 0xFFFF)\n\t\t\t\t\t\t| ((dirPref[i] & 0xF000000) >> 8);\n\t\t\t}\n\n\t\t\tdir[i] = dirPref[i] & 0xF;\n\n\t\t\tif (portConstraint[i] == mxConstants.DIRECTION_MASK_WEST\n\t\t\t\t\t|| portConstraint[i] == mxConstants.DIRECTION_MASK_NORTH\n\t\t\t\t\t|| portConstraint[i] == mxConstants.DIRECTION_MASK_EAST\n\t\t\t\t\t|| portConstraint[i] == mxConstants.DIRECTION_MASK_SOUTH)\n\t\t\t{\n\t\t\t\tdir[i] = portConstraint[i];\n\t\t\t}\n\t\t}\n\n\t\t//==============================================================\n\t\t// End of source and target direction determination\n\n\t\tvar sourceIndex = dir[0] == mxConstants.DIRECTION_MASK_EAST ? 3\n\t\t\t\t: dir[0];\n\t\tvar targetIndex = dir[1] == mxConstants.DIRECTION_MASK_EAST ? 3\n\t\t\t\t: dir[1];\n\n\t\tsourceIndex -= quad;\n\t\ttargetIndex -= quad;\n\n\t\tif (sourceIndex < 1)\n\t\t{\n\t\t\tsourceIndex += 4;\n\t\t}\n\t\t\n\t\tif (targetIndex < 1)\n\t\t{\n\t\t\ttargetIndex += 4;\n\t\t}\n\n\t\tvar routePattern = mxEdgeStyle.routePatterns[sourceIndex - 1][targetIndex - 1];\n\n\t\tmxEdgeStyle.wayPoints1[0][0] = geo[0][0];\n\t\tmxEdgeStyle.wayPoints1[0][1] = geo[0][1];\n\n\t\tswitch (dir[0])\n\t\t{\n\t\t\tcase mxConstants.DIRECTION_MASK_WEST:\n\t\t\t\tmxEdgeStyle.wayPoints1[0][0] -= scaledSourceBuffer;\n\t\t\t\tmxEdgeStyle.wayPoints1[0][1] += constraint[0][1] * geo[0][3];\n\t\t\t\tbreak;\n\t\t\tcase mxConstants.DIRECTION_MASK_SOUTH:\n\t\t\t\tmxEdgeStyle.wayPoints1[0][0] += constraint[0][0] * geo[0][2];\n\t\t\t\tmxEdgeStyle.wayPoints1[0][1] += geo[0][3] + scaledSourceBuffer;\n\t\t\t\tbreak;\n\t\t\tcase mxConstants.DIRECTION_MASK_EAST:\n\t\t\t\tmxEdgeStyle.wayPoints1[0][0] += geo[0][2] + scaledSourceBuffer;\n\t\t\t\tmxEdgeStyle.wayPoints1[0][1] += constraint[0][1] * geo[0][3];\n\t\t\t\tbreak;\n\t\t\tcase mxConstants.DIRECTION_MASK_NORTH:\n\t\t\t\tmxEdgeStyle.wayPoints1[0][0] += constraint[0][0] * geo[0][2];\n\t\t\t\tmxEdgeStyle.wayPoints1[0][1] -= scaledSourceBuffer;\n\t\t\t\tbreak;\n\t\t}\n\n\t\tvar currentIndex = 0;\n\n\t\t// Orientation, 0 horizontal, 1 vertical\n\t\tvar lastOrientation = (dir[0] & (mxConstants.DIRECTION_MASK_EAST | mxConstants.DIRECTION_MASK_WEST)) > 0 ? 0\n\t\t\t\t: 1;\n\t\tvar initialOrientation = lastOrientation;\n\t\tvar currentOrientation = 0;\n\n\t\tfor (var i = 0; i < routePattern.length; i++)\n\t\t{\n\t\t\tvar nextDirection = routePattern[i] & 0xF;\n\n\t\t\t// Rotate the index of this direction by the quad\n\t\t\t// to get the real direction\n\t\t\tvar directionIndex = nextDirection == mxConstants.DIRECTION_MASK_EAST ? 3\n\t\t\t\t\t: nextDirection;\n\n\t\t\tdirectionIndex += quad;\n\n\t\t\tif (directionIndex > 4)\n\t\t\t{\n\t\t\t\tdirectionIndex -= 4;\n\t\t\t}\n\n\t\t\tvar direction = mxEdgeStyle.dirVectors[directionIndex - 1];\n\n\t\t\tcurrentOrientation = (directionIndex % 2 > 0) ? 0 : 1;\n\t\t\t// Only update the current index if the point moved\n\t\t\t// in the direction of the current segment move,\n\t\t\t// otherwise the same point is moved until there is \n\t\t\t// a segment direction change\n\t\t\tif (currentOrientation != lastOrientation)\n\t\t\t{\n\t\t\t\tcurrentIndex++;\n\t\t\t\t// Copy the previous way point into the new one\n\t\t\t\t// We can't base the new position on index - 1\n\t\t\t\t// because sometime elbows turn out not to exist,\n\t\t\t\t// then we'd have to rewind.\n\t\t\t\tmxEdgeStyle.wayPoints1[currentIndex][0] = mxEdgeStyle.wayPoints1[currentIndex - 1][0];\n\t\t\t\tmxEdgeStyle.wayPoints1[currentIndex][1] = mxEdgeStyle.wayPoints1[currentIndex - 1][1];\n\t\t\t}\n\n\t\t\tvar tar = (routePattern[i] & mxEdgeStyle.TARGET_MASK) > 0;\n\t\t\tvar sou = (routePattern[i] & mxEdgeStyle.SOURCE_MASK) > 0;\n\t\t\tvar side = (routePattern[i] & mxEdgeStyle.SIDE_MASK) >> 5;\n\t\t\tside = side << quad;\n\n\t\t\tif (side > 0xF)\n\t\t\t{\n\t\t\t\tside = side >> 4;\n\t\t\t}\n\n\t\t\tvar center = (routePattern[i] & mxEdgeStyle.CENTER_MASK) > 0;\n\n\t\t\tif ((sou || tar) && side < 9)\n\t\t\t{\n\t\t\t\tvar limit = 0;\n\t\t\t\tvar souTar = sou ? 0 : 1;\n\n\t\t\t\tif (center && currentOrientation == 0)\n\t\t\t\t{\n\t\t\t\t\tlimit = geo[souTar][0] + constraint[souTar][0] * geo[souTar][2];\n\t\t\t\t}\n\t\t\t\telse if (center)\n\t\t\t\t{\n\t\t\t\t\tlimit = geo[souTar][1] + constraint[souTar][1] * geo[souTar][3];\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tlimit = mxEdgeStyle.limits[souTar][side];\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (currentOrientation == 0)\n\t\t\t\t{\n\t\t\t\t\tvar lastX = mxEdgeStyle.wayPoints1[currentIndex][0];\n\t\t\t\t\tvar deltaX = (limit - lastX) * direction[0];\n\n\t\t\t\t\tif (deltaX > 0)\n\t\t\t\t\t{\n\t\t\t\t\t\tmxEdgeStyle.wayPoints1[currentIndex][0] += direction[0]\n\t\t\t\t\t\t\t\t* deltaX;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tvar lastY = mxEdgeStyle.wayPoints1[currentIndex][1];\n\t\t\t\t\tvar deltaY = (limit - lastY) * direction[1];\n\n\t\t\t\t\tif (deltaY > 0)\n\t\t\t\t\t{\n\t\t\t\t\t\tmxEdgeStyle.wayPoints1[currentIndex][1] += direction[1]\n\t\t\t\t\t\t\t\t* deltaY;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\telse if (center)\n\t\t\t{\n\t\t\t\t// Which center we're travelling to depend on the current direction\n\t\t\t\tmxEdgeStyle.wayPoints1[currentIndex][0] += direction[0]\n\t\t\t\t\t\t* Math.abs(mxEdgeStyle.vertexSeperations[directionIndex] / 2);\n\t\t\t\tmxEdgeStyle.wayPoints1[currentIndex][1] += direction[1]\n\t\t\t\t\t\t* Math.abs(mxEdgeStyle.vertexSeperations[directionIndex] / 2);\n\t\t\t}\n\n\t\t\tif (currentIndex > 0\n\t\t\t\t\t&& mxEdgeStyle.wayPoints1[currentIndex][currentOrientation] == mxEdgeStyle.wayPoints1[currentIndex - 1][currentOrientation])\n\t\t\t{\n\t\t\t\tcurrentIndex--;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tlastOrientation = currentOrientation;\n\t\t\t}\n\t\t}\n\n\t\tfor (var i = 0; i <= currentIndex; i++)\n\t\t{\n\t\t\tif (i == currentIndex)\n\t\t\t{\n\t\t\t\t// Last point can cause last segment to be in\n\t\t\t\t// same direction as jetty/approach. If so,\n\t\t\t\t// check the number of points is consistent\n\t\t\t\t// with the relative orientation of source and target\n\t\t\t\t// jx. Same orientation requires an even\n\t\t\t\t// number of turns (points), different requires\n\t\t\t\t// odd.\n\t\t\t\tvar targetOrientation = (dir[1] & (mxConstants.DIRECTION_MASK_EAST | mxConstants.DIRECTION_MASK_WEST)) > 0 ? 0\n\t\t\t\t\t\t: 1;\n\t\t\t\tvar sameOrient = targetOrientation == initialOrientation ? 0 : 1;\n\n\t\t\t\t// (currentIndex + 1) % 2 is 0 for even number of points,\n\t\t\t\t// 1 for odd\n\t\t\t\tif (sameOrient != (currentIndex + 1) % 2)\n\t\t\t\t{\n\t\t\t\t\t// The last point isn't required\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tresult.push(new mxPoint(Math.round(mxEdgeStyle.wayPoints1[i][0]), Math.round(mxEdgeStyle.wayPoints1[i][1])));\n\t\t}\n\t\t\n\t\t// Removes duplicates\n\t\tvar index = 1;\n\t\t\n\t\twhile (index < result.length)\n\t\t{\n\t\t\tif (result[index - 1] == null || result[index] == null ||\n\t\t\t\tresult[index - 1].x != result[index].x ||\n\t\t\t\tresult[index - 1].y != result[index].y)\n\t\t\t{\n\t\t\t\tindex++;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tresult.splice(index, 1);\n\t\t\t}\n\t\t}\n\t},\n\t\n\tgetRoutePattern: function(dir, quad, dx, dy)\n\t{\n\t\tvar sourceIndex = dir[0] == mxConstants.DIRECTION_MASK_EAST ? 3\n\t\t\t\t: dir[0];\n\t\tvar targetIndex = dir[1] == mxConstants.DIRECTION_MASK_EAST ? 3\n\t\t\t\t: dir[1];\n\n\t\tsourceIndex -= quad;\n\t\ttargetIndex -= quad;\n\n\t\tif (sourceIndex < 1)\n\t\t{\n\t\t\tsourceIndex += 4;\n\t\t}\n\t\tif (targetIndex < 1)\n\t\t{\n\t\t\ttargetIndex += 4;\n\t\t}\n\n\t\tvar result = routePatterns[sourceIndex - 1][targetIndex - 1];\n\n\t\tif (dx == 0 || dy == 0)\n\t\t{\n\t\t\tif (inlineRoutePatterns[sourceIndex - 1][targetIndex - 1] != null)\n\t\t\t{\n\t\t\t\tresult = inlineRoutePatterns[sourceIndex - 1][targetIndex - 1];\n\t\t\t}\n\t\t}\n\n\t\treturn result;\n\t}\n};\n"
  },
  {
    "path": "static/cherry/drawio_demo/src/js/view/mxGraph.js",
    "content": "/**\n * Copyright (c) 2006-2015, JGraph Ltd\n * Copyright (c) 2006-2015, Gaudenz Alder\n */\n/**\n * Class: mxGraph\n *\n * Extends <mxEventSource> to implement a graph component for\n * the browser. This is the main class of the package. To activate\n * panning and connections use <setPanning> and <setConnectable>.\n * For rubberband selection you must create a new instance of\n * <mxRubberband>. The following listeners are added to\n * <mouseListeners> by default:\n * \n * - <tooltipHandler>: <mxTooltipHandler> that displays tooltips\n * - <panningHandler>: <mxPanningHandler> for panning and popup menus\n * - <connectionHandler>: <mxConnectionHandler> for creating connections\n * - <graphHandler>: <mxGraphHandler> for moving and cloning cells\n * \n * These listeners will be called in the above order if they are enabled.\n *\n * Background Images:\n * \n * To display a background image, set the image, image width and\n * image height using <setBackgroundImage>. If one of the\n * above values has changed then the <view>'s <mxGraphView.validate>\n * should be invoked.\n * \n * Cell Images:\n * \n * To use images in cells, a shape must be specified in the default\n * vertex style (or any named style). Possible shapes are\n * <mxConstants.SHAPE_IMAGE> and <mxConstants.SHAPE_LABEL>.\n * The code to change the shape used in the default vertex style,\n * the following code is used:\n * \n * (code)\n * var style = graph.getStylesheet().getDefaultVertexStyle();\n * style[mxConstants.STYLE_SHAPE] = mxConstants.SHAPE_IMAGE;\n * (end)\n * \n * For the default vertex style, the image to be displayed can be\n * specified in a cell's style using the <mxConstants.STYLE_IMAGE>\n * key and the image URL as a value, for example:\n * \n * (code)\n * image=http://www.example.com/image.gif\n * (end)\n * \n * For a named style, the the stylename must be the first element\n * of the cell style:\n * \n * (code)\n * stylename;image=http://www.example.com/image.gif\n * (end)\n * \n * A cell style can have any number of key=value pairs added, divided\n * by a semicolon as follows:\n * \n * (code)\n * [stylename;|key=value;]\n * (end)\n *\n * Labels:\n * \n * The cell labels are defined by <getLabel> which uses <convertValueToString>\n * if <labelsVisible> is true. If a label must be rendered as HTML markup, then\n * <isHtmlLabel> should return true for the respective cell. If all labels\n * contain HTML markup, <htmlLabels> can be set to true. NOTE: Enabling HTML\n * labels carries a possible security risk (see the section on security in\n * the manual).\n * \n * If wrapping is needed for a label, then <isHtmlLabel> and <isWrapping> must\n * return true for the cell whose label should be wrapped. See <isWrapping> for\n * an example.\n * \n * If clipping is needed to keep the rendering of a HTML label inside the\n * bounds of its vertex, then <isClipping> should return true for the\n * respective cell.\n * \n * By default, edge labels are movable and vertex labels are fixed. This can be\n * changed by setting <edgeLabelsMovable> and <vertexLabelsMovable>, or by\n * overriding <isLabelMovable>.\n *\n * In-place Editing:\n * \n * In-place editing is started with a doubleclick or by typing F2.\n * Programmatically, <edit> is used to check if the cell is editable\n * (<isCellEditable>) and call <startEditingAtCell>, which invokes\n * <mxCellEditor.startEditing>. The editor uses the value returned\n * by <getEditingValue> as the editing value.\n * \n * After in-place editing, <labelChanged> is called, which invokes\n * <mxGraphModel.setValue>, which in turn calls\n * <mxGraphModel.valueForCellChanged> via <mxValueChange>.\n * \n * The event that triggers in-place editing is passed through to the\n * <cellEditor>, which may take special actions depending on the type of the\n * event or mouse location, and is also passed to <getEditingValue>. The event\n * is then passed back to the event processing functions which can perform\n * specific actions based on the trigger event.\n * \n * Tooltips:\n * \n * Tooltips are implemented by <getTooltip>, which calls <getTooltipForCell>\n * if a cell is under the mousepointer. The default implementation checks if\n * the cell has a getTooltip function and calls it if it exists. Hence, in order\n * to provide custom tooltips, the cell must provide a getTooltip function, or \n * one of the two above functions must be overridden.\n * \n * Typically, for custom cell tooltips, the latter function is overridden as\n * follows:\n * \n * (code)\n * graph.getTooltipForCell = function(cell)\n * {\n *   var label = this.convertValueToString(cell);\n *   return 'Tooltip for '+label;\n * }\n * (end)\n * \n * When using a config file, the function is overridden in the mxGraph section\n * using the following entry:\n * \n * (code)\n * <add as=\"getTooltipForCell\"><![CDATA[\n *   function(cell)\n *   {\n *     var label = this.convertValueToString(cell);\n *     return 'Tooltip for '+label;\n *   }\n * ]]></add>\n * (end)\n * \n * \"this\" refers to the graph in the implementation, so for example to check if \n * a cell is an edge, you use this.getModel().isEdge(cell)\n *\n * For replacing the default implementation of <getTooltipForCell> (rather than \n * replacing the function on a specific instance), the following code should be \n * used after loading the JavaScript files, but before creating a new mxGraph \n * instance using <mxGraph>:\n * \n * (code)\n * mxGraph.prototype.getTooltipForCell = function(cell)\n * {\n *   var label = this.convertValueToString(cell);\n *   return 'Tooltip for '+label;\n * }\n * (end)\n * \n * Shapes & Styles:\n * \n * The implementation of new shapes is demonstrated in the examples. We'll assume\n * that we have implemented a custom shape with the name BoxShape which we want\n * to use for drawing vertices. To use this shape, it must first be registered in\n * the cell renderer as follows:\n * \n * (code)\n * mxCellRenderer.registerShape('box', BoxShape);\n * (end)\n * \n * The code registers the BoxShape constructor under the name box in the cell\n * renderer of the graph. The shape can now be referenced using the shape-key in\n * a style definition. (The cell renderer contains a set of additional shapes,\n * namely one for each constant with a SHAPE-prefix in <mxConstants>.)\n *\n * Styles are a collection of key, value pairs and a stylesheet is a collection\n * of named styles. The names are referenced by the cellstyle, which is stored\n * in <mxCell.style> with the following format: [stylename;|key=value;]. The\n * string is resolved to a collection of key, value pairs, where the keys are\n * overridden with the values in the string.\n *\n * When introducing a new shape, the name under which the shape is registered\n * must be used in the stylesheet. There are three ways of doing this:\n * \n *   - By changing the default style, so that all vertices will use the new\n * \t\tshape\n *   - By defining a new style, so that only vertices with the respective\n * \t\tcellstyle will use the new shape\n *   - By using shape=box in the cellstyle's optional list of key, value pairs\n * \t\tto be overridden\n *\n * In the first case, the code to fetch and modify the default style for\n * vertices is as follows:\n * \n * (code)\n * var style = graph.getStylesheet().getDefaultVertexStyle();\n * style[mxConstants.STYLE_SHAPE] = 'box';\n * (end)\n * \n * The code takes the default vertex style, which is used for all vertices that\n * do not have a specific cellstyle, and modifies the value for the shape-key\n * in-place to use the new BoxShape for drawing vertices. This is done by\n * assigning the box value in the second line, which refers to the name of the\n * BoxShape in the cell renderer.\n * \n * In the second case, a collection of key, value pairs is created and then\n * added to the stylesheet under a new name. In order to distinguish the\n * shapename and the stylename we'll use boxstyle for the stylename:\n * \n * (code)\n * var style = new Object();\n * style[mxConstants.STYLE_SHAPE] = 'box';\n * style[mxConstants.STYLE_STROKECOLOR] = '#000000';\n * style[mxConstants.STYLE_FONTCOLOR] = '#000000';\n * graph.getStylesheet().putCellStyle('boxstyle', style);\n * (end)\n * \n * The code adds a new style with the name boxstyle to the stylesheet. To use\n * this style with a cell, it must be referenced from the cellstyle as follows:\n * \n * (code)\n * var vertex = graph.insertVertex(parent, null, 'Hello, World!', 20, 20, 80, 20,\n * \t\t\t\t'boxstyle');\n * (end)\n * \n * To summarize, each new shape must be registered in the <mxCellRenderer> with\n * a unique name. That name is then used as the value of the shape-key in a\n * default or custom style. If there are multiple custom shapes, then there\n * should be a separate style for each shape.\n * \n * Inheriting Styles:\n * \n * For fill-, stroke-, gradient- and indicatorColors special keywords can be\n * used. The inherit keyword for one of these colors will inherit the color\n * for the same key from the parent cell. The swimlane keyword does the same,\n * but inherits from the nearest swimlane in the ancestor hierarchy. Finally,\n * the indicated keyword will use the color of the indicator as the color for\n * the given key.\n * \n * Scrollbars:\n * \n * The <containers> overflow CSS property defines if scrollbars are used to\n * display the graph. For values of 'auto' or 'scroll', the scrollbars will\n * be shown. Note that the <resizeContainer> flag is normally not used\n * together with scrollbars, as it will resize the container to match the\n * size of the graph after each change.\n * \n * Multiplicities and Validation:\n * \n * To control the possible connections in mxGraph, <getEdgeValidationError> is\n * used. The default implementation of the function uses <multiplicities>,\n * which is an array of <mxMultiplicity>. Using this class allows to establish\n * simple multiplicities, which are enforced by the graph.\n * \n * The <mxMultiplicity> uses <mxCell.is> to determine for which terminals it\n * applies. The default implementation of <mxCell.is> works with DOM nodes (XML\n * nodes) and checks if the given type parameter matches the nodeName of the\n * node (case insensitive). Optionally, an attributename and value can be\n * specified which are also checked.\n * \n * <getEdgeValidationError> is called whenever the connectivity of an edge\n * changes. It returns an empty string or an error message if the edge is\n * invalid or null if the edge is valid. If the returned string is not empty\n * then it is displayed as an error message.\n * \n * <mxMultiplicity> allows to specify the multiplicity between a terminal and\n * its possible neighbors. For example, if any rectangle may only be connected\n * to, say, a maximum of two circles you can add the following rule to\n * <multiplicities>:\n * \n * (code)\n * graph.multiplicities.push(new mxMultiplicity(\n *   true, 'rectangle', null, null, 0, 2, ['circle'],\n *   'Only 2 targets allowed',\n *   'Only shape targets allowed'));\n * (end)\n * \n * This will display the first error message whenever a rectangle is connected\n * to more than two circles and the second error message if a rectangle is\n * connected to anything but a circle.\n * \n * For certain multiplicities, such as a minimum of 1 connection, which cannot\n * be enforced at cell creation time (unless the cell is created together with\n * the connection), mxGraph offers <validate> which checks all multiplicities\n * for all cells and displays the respective error messages in an overlay icon\n * on the cells.\n * \n * If a cell is collapsed and contains validation errors, a respective warning\n * icon is attached to the collapsed cell.\n * \n * Auto-Layout:\n * \n * For automatic layout, the <getLayout> hook is provided in <mxLayoutManager>.\n * It can be overridden to return a layout algorithm for the children of a\n * given cell.\n * \n * Unconnected edges:\n * \n * The default values for all switches are designed to meet the requirements of\n * general diagram drawing applications. A very typical set of settings to\n * avoid edges that are not connected is the following:\n * \n * (code)\n * graph.setAllowDanglingEdges(false);\n * graph.setDisconnectOnMove(false);\n * (end)\n * \n * Setting the <cloneInvalidEdges> switch to true is optional. This switch\n * controls if edges are inserted after a copy, paste or clone-drag if they are\n * invalid. For example, edges are invalid if copied or control-dragged without \n * having selected the corresponding terminals and allowDanglingEdges is\n * false, in which case the edges will not be cloned if the switch is false.\n * \n * Output:\n * \n * To produce an XML representation for a diagram, the following code can be\n * used.\n * \n * (code)\n * var enc = new mxCodec(mxUtils.createXmlDocument());\n * var node = enc.encode(graph.getModel());\n * (end)\n * \n * This will produce an XML node than can be handled using the DOM API or\n * turned into a string representation using the following code:\n * \n * (code)\n * var xml = mxUtils.getXml(node);\n * (end)\n * \n * To obtain a formatted string, mxUtils.getPrettyXml can be used instead.\n * \n * This string can now be stored in a local persistent storage (for example\n * using Google Gears) or it can be passed to a backend using mxUtils.post as\n * follows. The url variable is the URL of the Java servlet, PHP page or HTTP\n * handler, depending on the server.\n * \n * (code)\n * var xmlString = encodeURIComponent(mxUtils.getXml(node));\n * mxUtils.post(url, 'xml='+xmlString, function(req)\n * {\n *   // Process server response using req of type mxXmlRequest\n * });\n * (end)\n * \n * Input:\n * \n * To load an XML representation of a diagram into an existing graph object\n * mxUtils.load can be used as follows. The url variable is the URL of the Java\n * servlet, PHP page or HTTP handler that produces the XML string.\n * \n * (code)\n * var xmlDoc = mxUtils.load(url).getXml();\n * var node = xmlDoc.documentElement;\n * var dec = new mxCodec(node.ownerDocument);\n * dec.decode(node, graph.getModel());\n * (end)\n * \n * For creating a page that loads the client and a diagram using a single\n * request please refer to the deployment examples in the backends.\n * \n * Functional dependencies:\n * \n * (see images/callgraph.png)\n * \n * Resources:\n *\n * resources/graph - Language resources for mxGraph\n *\n * Group: Events\n * \n * Event: mxEvent.ROOT\n * \n * Fires if the root in the model has changed. This event has no properties.\n * \n * Event: mxEvent.ALIGN_CELLS\n * \n * Fires between begin- and endUpdate in <alignCells>. The <code>cells</code>\n * and <code>align</code> properties contain the respective arguments that were\n * passed to <alignCells>.\n *\n * Event: mxEvent.FLIP_EDGE\n *\n * Fires between begin- and endUpdate in <flipEdge>. The <code>edge</code>\n * property contains the edge passed to <flipEdge>.\n * \n * Event: mxEvent.ORDER_CELLS\n * \n * Fires between begin- and endUpdate in <orderCells>. The <code>cells</code>\n * and <code>back</code> properties contain the respective arguments that were\n * passed to <orderCells>.\n *\n * Event: mxEvent.CELLS_ORDERED\n *\n * Fires between begin- and endUpdate in <cellsOrdered>. The <code>cells</code>\n * and <code>back</code> arguments contain the respective arguments that were\n * passed to <cellsOrdered>.\n * \n * Event: mxEvent.GROUP_CELLS\n * \n * Fires between begin- and endUpdate in <groupCells>. The <code>group</code>,\n * <code>cells</code> and <code>border</code> arguments contain the respective\n * arguments that were passed to <groupCells>.\n * \n * Event: mxEvent.UNGROUP_CELLS\n * \n * Fires between begin- and endUpdate in <ungroupCells>. The <code>cells</code>\n * property contains the array of cells that was passed to <ungroupCells>.\n * \n * Event: mxEvent.REMOVE_CELLS_FROM_PARENT\n * \n * Fires between begin- and endUpdate in <removeCellsFromParent>. The\n * <code>cells</code> property contains the array of cells that was passed to\n * <removeCellsFromParent>.\n * \n * Event: mxEvent.ADD_CELLS\n * \n * Fires between begin- and endUpdate in <addCells>. The <code>cells</code>,\n * <code>parent</code>, <code>index</code>, <code>source</code> and\n * <code>target</code> properties contain the respective arguments that were\n * passed to <addCells>.\n * \n * Event: mxEvent.CELLS_ADDED\n * \n * Fires between begin- and endUpdate in <cellsAdded>. The <code>cells</code>,\n * <code>parent</code>, <code>index</code>, <code>source</code>,\n * <code>target</code> and <code>absolute</code> properties contain the\n * respective arguments that were passed to <cellsAdded>.\n * \n * Event: mxEvent.REMOVE_CELLS\n * \n * Fires between begin- and endUpdate in <removeCells>. The <code>cells</code>\n * and <code>includeEdges</code> arguments contain the respective arguments\n * that were passed to <removeCells>.\n * \n * Event: mxEvent.CELLS_REMOVED\n * \n * Fires between begin- and endUpdate in <cellsRemoved>. The <code>cells</code>\n * argument contains the array of cells that was removed.\n * \n * Event: mxEvent.SPLIT_EDGE\n * \n * Fires between begin- and endUpdate in <splitEdge>. The <code>edge</code>\n * property contains the edge to be splitted, the <code>cells</code>,\n * <code>newEdge</code>, <code>dx</code> and <code>dy</code> properties contain\n * the respective arguments that were passed to <splitEdge>.\n * \n * Event: mxEvent.TOGGLE_CELLS\n * \n * Fires between begin- and endUpdate in <toggleCells>. The <code>show</code>,\n * <code>cells</code> and <code>includeEdges</code> properties contain the\n * respective arguments that were passed to <toggleCells>.\n * \n * Event: mxEvent.FOLD_CELLS\n * \n * Fires between begin- and endUpdate in <foldCells>. The\n * <code>collapse</code>, <code>cells</code> and <code>recurse</code>\n * properties contain the respective arguments that were passed to <foldCells>.\n * \n * Event: mxEvent.CELLS_FOLDED\n * \n * Fires between begin- and endUpdate in cellsFolded. The\n * <code>collapse</code>, <code>cells</code> and <code>recurse</code>\n * properties contain the respective arguments that were passed to\n * <cellsFolded>.\n * \n * Event: mxEvent.UPDATE_CELL_SIZE\n * \n * Fires between begin- and endUpdate in <updateCellSize>. The\n * <code>cell</code> and <code>ignoreChildren</code> properties contain the\n * respective arguments that were passed to <updateCellSize>.\n * \n * Event: mxEvent.RESIZE_CELLS\n * \n * Fires between begin- and endUpdate in <resizeCells>. The <code>cells</code>\n * and <code>bounds</code> properties contain the respective arguments that\n * were passed to <resizeCells>.\n * \n * Event: mxEvent.CELLS_RESIZED\n * \n * Fires between begin- and endUpdate in <cellsResized>. The <code>cells</code>\n * and <code>bounds</code> properties contain the respective arguments that\n * were passed to <cellsResized>.\n * \n * Event: mxEvent.MOVE_CELLS\n * \n * Fires between begin- and endUpdate in <moveCells>. The <code>cells</code>,\n * <code>dx</code>, <code>dy</code>, <code>clone</code>, <code>target</code>\n * and <code>event</code> properties contain the respective arguments that\n * were passed to <moveCells>.\n * \n * Event: mxEvent.CELLS_MOVED\n * \n * Fires between begin- and endUpdate in <cellsMoved>. The <code>cells</code>,\n * <code>dx</code>, <code>dy</code> and <code>disconnect</code> properties\n * contain the respective arguments that were passed to <cellsMoved>.\n * \n * Event: mxEvent.CONNECT_CELL\n * \n * Fires between begin- and endUpdate in <connectCell>. The <code>edge</code>,\n * <code>terminal</code> and <code>source</code> properties contain the\n * respective arguments that were passed to <connectCell>.\n * \n * Event: mxEvent.CELL_CONNECTED\n * \n * Fires between begin- and endUpdate in <cellConnected>. The\n * <code>edge</code>, <code>terminal</code> and <code>source</code> properties\n * contain the respective arguments that were passed to <cellConnected>.\n * \n * Event: mxEvent.REFRESH\n * \n * Fires after <refresh> was executed. This event has no properties.\n *\n * Event: mxEvent.CLICK\n * \n * Fires in <click> after a click event. The <code>event</code> property\n * contains the original mouse event and <code>cell</code> property contains\n * the cell under the mouse or null if the background was clicked.\n * \n * Event: mxEvent.DOUBLE_CLICK\n *\n * Fires in <dblClick> after a double click. The <code>event</code> property\n * contains the original mouse event and the <code>cell</code> property\n * contains the cell under the mouse or null if the background was clicked.\n * \n * Event: mxEvent.GESTURE\n *\n * Fires in <fireGestureEvent> after a touch gesture. The <code>event</code>\n * property contains the original gesture end event and the <code>cell</code>\n * property contains the optional cell associated with the gesture.\n *\n * Event: mxEvent.TAP_AND_HOLD\n *\n * Fires in <tapAndHold> if a tap and hold event was detected. The <code>event</code>\n * property contains the initial touch event and the <code>cell</code> property\n * contains the cell under the mouse or null if the background was clicked.\n *\n * Event: mxEvent.FIRE_MOUSE_EVENT\n *\n * Fires in <fireMouseEvent> before the mouse listeners are invoked. The\n * <code>eventName</code> property contains the event name and the\n * <code>event</code> property contains the <mxMouseEvent>.\n *\n * Event: mxEvent.SIZE\n *\n * Fires after <sizeDidChange> was executed. The <code>bounds</code> property\n * contains the new graph bounds.\n *\n * Event: mxEvent.START_EDITING\n *\n * Fires before the in-place editor starts in <startEditingAtCell>. The\n * <code>cell</code> property contains the cell that is being edited and the\n * <code>event</code> property contains the optional event argument that was\n * passed to <startEditingAtCell>.\n * \n * Event: mxEvent.EDITING_STARTED\n *\n * Fires after the in-place editor starts in <startEditingAtCell>. The\n * <code>cell</code> property contains the cell that is being edited and the\n * <code>event</code> property contains the optional event argument that was\n * passed to <startEditingAtCell>.\n * \n * Event: mxEvent.EDITING_STOPPED\n *\n * Fires after the in-place editor stops in <stopEditing>.\n *\n * Event: mxEvent.LABEL_CHANGED\n *\n * Fires between begin- and endUpdate in <cellLabelChanged>. The\n * <code>cell</code> property contains the cell, the <code>value</code>\n * property contains the new value for the cell, the <code>old</code> property\n * contains the old value and the optional <code>event</code> property contains\n * the mouse event that started the edit.\n * \n * Event: mxEvent.ADD_OVERLAY\n *\n * Fires after an overlay is added in <addCellOverlay>. The <code>cell</code>\n * property contains the cell and the <code>overlay</code> property contains\n * the <mxCellOverlay> that was added.\n *\n * Event: mxEvent.REMOVE_OVERLAY\n *\n * Fires after an overlay is removed in <removeCellOverlay> and\n * <removeCellOverlays>. The <code>cell</code> property contains the cell and\n * the <code>overlay</code> property contains the <mxCellOverlay> that was\n * removed.\n * \n * Constructor: mxGraph\n * \n * Constructs a new mxGraph in the specified container. Model is an optional\n * mxGraphModel. If no model is provided, a new mxGraphModel instance is \n * used as the model. The container must have a valid owner document prior \n * to calling this function in Internet Explorer. RenderHint is a string to\n * affect the display performance and rendering in IE, but not in SVG-based \n * browsers. The parameter is mapped to <dialect>, which may \n * be one of <mxConstants.DIALECT_SVG> for SVG-based browsers, \n * <mxConstants.DIALECT_STRICTHTML> for fastest display mode,\n * <mxConstants.DIALECT_PREFERHTML> for faster display mode,\n * <mxConstants.DIALECT_MIXEDHTML> for fast and <mxConstants.DIALECT_VML> \n * for exact display mode (slowest). The dialects are defined in mxConstants.\n * The default values are DIALECT_SVG for SVG-based browsers and\n * DIALECT_MIXED for IE.\n *\n * The possible values for the renderingHint parameter are explained below:\n * \n * fast - The parameter is based on the fact that the display performance is \n * highly improved in IE if the VML is not contained within a VML group \n * element. The lack of a group element only slightly affects the display while \n * panning, but improves the performance by almost a factor of 2, while keeping \n * the display sufficiently accurate. This also allows to render certain shapes as HTML \n * if the display accuracy is not affected, which is implemented by \n * <mxShape.isMixedModeHtml>. This is the default setting and is mapped to\n * DIALECT_MIXEDHTML.\n * faster - Same as fast, but more expensive shapes are avoided. This is \n * controlled by <mxShape.preferModeHtml>. The default implementation will \n * avoid gradients and rounded rectangles, but more significant shapes, such \n * as rhombus, ellipse, actor and cylinder will be rendered accurately. This \n * setting is mapped to DIALECT_PREFERHTML.\n * fastest - Almost anything will be rendered in Html. This allows for \n * rectangles, labels and images. This setting is mapped to\n * DIALECT_STRICTHTML.\n * exact - If accurate panning is required and if the diagram is small (up\n * to 100 cells), then this value should be used. In this mode, a group is \n * created that contains the VML. This allows for accurate panning and is \n * mapped to DIALECT_VML.\n *\n * Example:\n * \n * To create a graph inside a DOM node with an id of graph:\n * (code)\n * var container = document.getElementById('graph');\n * var graph = new mxGraph(container);\n * (end)\n * \n * Parameters:\n * \n * container - Optional DOM node that acts as a container for the graph.\n * If this is null then the container can be initialized later using\n * <init>.\n * model - Optional <mxGraphModel> that constitutes the graph data.\n * renderHint - Optional string that specifies the display accuracy and\n * performance. Default is mxConstants.DIALECT_MIXEDHTML (for IE).\n * stylesheet - Optional <mxStylesheet> to be used in the graph.\n */\nfunction mxGraph(container, model, renderHint, stylesheet)\n{\n\t// Initializes the variable in case the prototype has been\n\t// modified to hold some listeners (which is possible because\n\t// the createHandlers call is executed regardless of the\n\t// arguments passed into the ctor).\n\tthis.mouseListeners = null;\n\t\n\t// Converts the renderHint into a dialect\n\tthis.renderHint = renderHint;\n\n\tif (mxClient.IS_SVG)\n\t{\n\t\tthis.dialect = mxConstants.DIALECT_SVG;\n\t}\n\telse if (renderHint == mxConstants.RENDERING_HINT_EXACT && mxClient.IS_VML)\n\t{\n\t\tthis.dialect = mxConstants.DIALECT_VML;\n\t}\n\telse if (renderHint == mxConstants.RENDERING_HINT_FASTEST)\n\t{\n\t\tthis.dialect = mxConstants.DIALECT_STRICTHTML;\n\t}\n\telse if (renderHint == mxConstants.RENDERING_HINT_FASTER)\n\t{\n\t\tthis.dialect = mxConstants.DIALECT_PREFERHTML;\n\t}\n\telse // default for VML\n\t{\n\t\tthis.dialect = mxConstants.DIALECT_MIXEDHTML;\n\t}\n\t\n\t// Initializes the main members that do not require a container\n\tthis.model = (model != null) ? model : new mxGraphModel();\n\tthis.multiplicities = [];\n\tthis.imageBundles = [];\n\tthis.cellRenderer = this.createCellRenderer();\n\tthis.setSelectionModel(this.createSelectionModel());\n\tthis.setStylesheet((stylesheet != null) ? stylesheet : this.createStylesheet());\n\tthis.view = this.createGraphView();\n\t\n\t// Adds a graph model listener to update the view\n\tthis.graphModelChangeListener = mxUtils.bind(this, function(sender, evt)\n\t{\n\t\tthis.graphModelChanged(evt.getProperty('edit').changes);\n\t});\n\t\n\tthis.model.addListener(mxEvent.CHANGE, this.graphModelChangeListener);\n\n\t// Installs basic event handlers with disabled default settings.\n\tthis.createHandlers();\n\t\n\t// Initializes the display if a container was specified\n\tif (container != null)\n\t{\n\t\tthis.init(container);\n\t}\n\t\n\tthis.view.revalidate();\n};\n\n/**\n * Installs the required language resources at class\n * loading time.\n */\nif (mxLoadResources)\n{\n\tmxResources.add(mxClient.basePath + '/resources/graph');\n}\nelse\n{\n\tmxClient.defaultBundles.push(mxClient.basePath + '/resources/graph');\n}\n\n/**\n * Extends mxEventSource.\n */\nmxGraph.prototype = new mxEventSource();\nmxGraph.prototype.constructor = mxGraph;\n\n/**\n * Variable: EMPTY_ARRAY\n *\n * Immutable empty array instance.\n */\nmxGraph.prototype.EMPTY_ARRAY = [];\n\n/**\n * Group: Variables\n */\n\n/**\n * Variable: mouseListeners\n * \n * Holds the mouse event listeners. See <fireMouseEvent>.\n */\nmxGraph.prototype.mouseListeners = null;\n\n/**\n * Variable: isMouseDown\n * \n * Holds the state of the mouse button.\n */\nmxGraph.prototype.isMouseDown = false;\n\n/**\n * Variable: model\n * \n * Holds the <mxGraphModel> that contains the cells to be displayed.\n */\nmxGraph.prototype.model = null;\n\n/**\n * Variable: view\n * \n * Holds the <mxGraphView> that caches the <mxCellStates> for the cells.\n */\nmxGraph.prototype.view = null;\n\n/**\n * Variable: stylesheet\n * \n * Holds the <mxStylesheet> that defines the appearance of the cells.\n * \n * \n * Example:\n * \n * Use the following code to read a stylesheet into an existing graph.\n * \n * (code)\n * var req = mxUtils.load('stylesheet.xml');\n * var root = req.getDocumentElement();\n * var dec = new mxCodec(root.ownerDocument);\n * dec.decode(root, graph.stylesheet);\n * (end)\n */\nmxGraph.prototype.stylesheet = null;\n\t\n/**\n * Variable: selectionModel\n * \n * Holds the <mxGraphSelectionModel> that models the current selection.\n */\nmxGraph.prototype.selectionModel = null;\n\n/**\n * Variable: cellEditor\n * \n * Holds the <mxCellEditor> that is used as the in-place editing.\n */\nmxGraph.prototype.cellEditor = null;\n\n/**\n * Variable: cellRenderer\n * \n * Holds the <mxCellRenderer> for rendering the cells in the graph.\n */\nmxGraph.prototype.cellRenderer = null;\n\n/**\n * Variable: multiplicities\n * \n * An array of <mxMultiplicities> describing the allowed\n * connections in a graph.\n */\nmxGraph.prototype.multiplicities = null;\n\n/**\n * Variable: renderHint\n * \n * RenderHint as it was passed to the constructor.\n */\nmxGraph.prototype.renderHint = null;\n\n/**\n * Variable: dialect\n * \n * Dialect to be used for drawing the graph. Possible values are all\n * constants in <mxConstants> with a DIALECT-prefix.\n */\nmxGraph.prototype.dialect = null;\n\n/**\n * Variable: gridSize\n * \n * Specifies the grid size. Default is 10.\n */\nmxGraph.prototype.gridSize = 10;\n\t\n/**\n * Variable: gridEnabled\n * \n * Specifies if the grid is enabled. This is used in <snap>. Default is\n * true.\n */\nmxGraph.prototype.gridEnabled = true;\n\n/**\n * Variable: portsEnabled\n * \n * Specifies if ports are enabled. This is used in <cellConnected> to update\n * the respective style. Default is true.\n */\nmxGraph.prototype.portsEnabled = true;\n\n/**\n * Variable: nativeDoubleClickEnabled\n * \n * Specifies if native double click events should be detected. Default is true.\n */\nmxGraph.prototype.nativeDblClickEnabled = true;\n\n/**\n * Variable: doubleTapEnabled\n * \n * Specifies if double taps on touch-based devices should be handled as a\n * double click. Default is true.\n */\nmxGraph.prototype.doubleTapEnabled = true;\n\n/**\n * Variable: doubleTapTimeout\n * \n * Specifies the timeout for double taps and non-native double clicks. Default\n * is 500 ms.\n */\nmxGraph.prototype.doubleTapTimeout = 500;\n\n/**\n * Variable: doubleTapTolerance\n * \n * Specifies the tolerance for double taps and double clicks in quirks mode.\n * Default is 25 pixels.\n */\nmxGraph.prototype.doubleTapTolerance = 25;\n\n/**\n * Variable: lastTouchX\n * \n * Holds the x-coordinate of the last touch event for double tap detection.\n */\nmxGraph.prototype.lastTouchY = 0;\n\n/**\n * Variable: lastTouchX\n * \n * Holds the y-coordinate of the last touch event for double tap detection.\n */\nmxGraph.prototype.lastTouchY = 0;\n\n/**\n * Variable: lastTouchTime\n * \n * Holds the time of the last touch event for double click detection.\n */\nmxGraph.prototype.lastTouchTime = 0;\n\n/**\n * Variable: tapAndHoldEnabled\n * \n * Specifies if tap and hold should be used for starting connections on touch-based\n * devices. Default is true.\n */\nmxGraph.prototype.tapAndHoldEnabled = true;\n\n/**\n * Variable: tapAndHoldDelay\n * \n * Specifies the time for a tap and hold. Default is 500 ms.\n */\nmxGraph.prototype.tapAndHoldDelay = 500;\n\n/**\n * Variable: tapAndHoldInProgress\n * \n * True if the timer for tap and hold events is running.\n */\nmxGraph.prototype.tapAndHoldInProgress = false;\n\n/**\n * Variable: tapAndHoldValid\n * \n * True as long as the timer is running and the touch events\n * stay within the given <tapAndHoldTolerance>.\n */\nmxGraph.prototype.tapAndHoldValid = false;\n\n/**\n * Variable: initialTouchX\n * \n * Holds the x-coordinate of the intial touch event for tap and hold.\n */\nmxGraph.prototype.initialTouchX = 0;\n\n/**\n * Variable: initialTouchY\n * \n * Holds the y-coordinate of the intial touch event for tap and hold.\n */\nmxGraph.prototype.initialTouchY = 0;\n\n/**\n * Variable: tolerance\n * \n * Tolerance for a move to be handled as a single click.\n * Default is 4 pixels.\n */\nmxGraph.prototype.tolerance = 4;\n\n/**\n * Variable: defaultOverlap\n * \n * Value returned by <getOverlap> if <isAllowOverlapParent> returns\n * true for the given cell. <getOverlap> is used in <constrainChild> if\n * <isConstrainChild> returns true. The value specifies the\n * portion of the child which is allowed to overlap the parent.\n */\nmxGraph.prototype.defaultOverlap = 0.5;\n\n/**\n * Variable: defaultParent\n * \n * Specifies the default parent to be used to insert new cells.\n * This is used in <getDefaultParent>. Default is null.\n */\nmxGraph.prototype.defaultParent = null;\n\n/**\n * Variable: alternateEdgeStyle\n * \n * Specifies the alternate edge style to be used if the main control point\n * on an edge is being doubleclicked. Default is null.\n */\nmxGraph.prototype.alternateEdgeStyle = null;\n\n/**\n * Variable: backgroundImage\n *\n * Specifies the <mxImage> to be returned by <getBackgroundImage>. Default\n * is null.\n * \n * Example:\n *\n * (code)\n * var img = new mxImage('http://www.example.com/maps/examplemap.jpg', 1024, 768);\n * graph.setBackgroundImage(img);\n * graph.view.validate();\n * (end)\n */\nmxGraph.prototype.backgroundImage = null;\n\n/**\n * Variable: pageVisible\n *\n * Specifies if the background page should be visible. Default is false.\n * Not yet implemented.\n */\nmxGraph.prototype.pageVisible = false;\n\n/**\n * Variable: pageBreaksVisible\n * \n * Specifies if a dashed line should be drawn between multiple pages. Default\n * is false. If you change this value while a graph is being displayed then you\n * should call <sizeDidChange> to force an update of the display.\n */\nmxGraph.prototype.pageBreaksVisible = false;\n\n/**\n * Variable: pageBreakColor\n * \n * Specifies the color for page breaks. Default is 'gray'.\n */\nmxGraph.prototype.pageBreakColor = 'gray';\n\n/**\n * Variable: pageBreakDashed\n * \n * Specifies the page breaks should be dashed. Default is true.\n */\nmxGraph.prototype.pageBreakDashed = true;\n\n/**\n * Variable: minPageBreakDist\n * \n * Specifies the minimum distance for page breaks to be visible. Default is\n * 20 (in pixels).\n */\nmxGraph.prototype.minPageBreakDist = 20;\n\n/**\n * Variable: preferPageSize\n * \n * Specifies if the graph size should be rounded to the next page number in\n * <sizeDidChange>. This is only used if the graph container has scrollbars.\n * Default is false.\n */\nmxGraph.prototype.preferPageSize = false;\n\n/**\n * Variable: pageFormat\n *\n * Specifies the page format for the background page. Default is\n * <mxConstants.PAGE_FORMAT_A4_PORTRAIT>. This is used as the default in\n * <mxPrintPreview> and for painting the background page if <pageVisible> is\n * true and the pagebreaks if <pageBreaksVisible> is true.\n */\nmxGraph.prototype.pageFormat = mxConstants.PAGE_FORMAT_A4_PORTRAIT;\n\n/**\n * Variable: pageScale\n *\n * Specifies the scale of the background page. Default is 1.5.\n * Not yet implemented.\n */\nmxGraph.prototype.pageScale = 1.5;\n\n/**\n * Variable: enabled\n * \n * Specifies the return value for <isEnabled>. Default is true.\n */\nmxGraph.prototype.enabled = true;\n\n/**\n * Variable: escapeEnabled\n * \n * Specifies if <mxKeyHandler> should invoke <escape> when the escape key\n * is pressed. Default is true.\n */\nmxGraph.prototype.escapeEnabled = true;\n\n/**\n * Variable: invokesStopCellEditing\n * \n * If true, when editing is to be stopped by way of selection changing,\n * data in diagram changing or other means stopCellEditing is invoked, and\n * changes are saved. This is implemented in a focus handler in\n * <mxCellEditor>. Default is true.\n */\nmxGraph.prototype.invokesStopCellEditing = true;\n\n/**\n * Variable: enterStopsCellEditing\n * \n * If true, pressing the enter key without pressing control or shift will stop\n * editing and accept the new value. This is used in <mxCellEditor> to stop\n * cell editing. Note: You can always use F2 and escape to stop editing.\n * Default is false.\n */\nmxGraph.prototype.enterStopsCellEditing = false;\n\n/**\n * Variable: useScrollbarsForPanning\n * \n * Specifies if scrollbars should be used for panning in <panGraph> if\n * any scrollbars are available. If scrollbars are enabled in CSS, but no\n * scrollbars appear because the graph is smaller than the container size,\n * then no panning occurs if this is true. Default is true.\n */\nmxGraph.prototype.useScrollbarsForPanning = true;\n\n/**\n * Variable: exportEnabled\n * \n * Specifies the return value for <canExportCell>. Default is true.\n */\nmxGraph.prototype.exportEnabled = true;\n\n/**\n * Variable: importEnabled\n * \n * Specifies the return value for <canImportCell>. Default is true.\n */\nmxGraph.prototype.importEnabled = true;\n\n/**\n * Variable: cellsLocked\n * \n * Specifies the return value for <isCellLocked>. Default is false.\n */\nmxGraph.prototype.cellsLocked = false;\n\n/**\n * Variable: cellsCloneable\n * \n * Specifies the return value for <isCellCloneable>. Default is true.\n */\nmxGraph.prototype.cellsCloneable = true;\n\n/**\n * Variable: foldingEnabled\n * \n * Specifies if folding (collapse and expand via an image icon in the graph\n * should be enabled). Default is true.\n */\nmxGraph.prototype.foldingEnabled = true;\n\n/**\n * Variable: cellsEditable\n * \n * Specifies the return value for <isCellEditable>. Default is true.\n */\nmxGraph.prototype.cellsEditable = true;\n\t\t\n/**\n * Variable: cellsDeletable\n * \n * Specifies the return value for <isCellDeletable>. Default is true.\n */\nmxGraph.prototype.cellsDeletable = true;\n\n/**\n * Variable: cellsMovable\n * \n * Specifies the return value for <isCellMovable>. Default is true.\n */\nmxGraph.prototype.cellsMovable = true;\n\t\n/**\n * Variable: edgeLabelsMovable\n * \n * Specifies the return value for edges in <isLabelMovable>. Default is true.\n */\nmxGraph.prototype.edgeLabelsMovable = true;\n\t\n/**\n * Variable: vertexLabelsMovable\n * \n * Specifies the return value for vertices in <isLabelMovable>. Default is false.\n */\nmxGraph.prototype.vertexLabelsMovable = false;\n\n/**\n * Variable: dropEnabled\n * \n * Specifies the return value for <isDropEnabled>. Default is false.\n */\nmxGraph.prototype.dropEnabled = false;\n\n/**\n * Variable: splitEnabled\n * \n * Specifies if dropping onto edges should be enabled. This is ignored if\n * <dropEnabled> is false. If enabled, it will call <splitEdge> to carry\n * out the drop operation. Default is true.\n */\nmxGraph.prototype.splitEnabled = true;\n\n/**\n * Variable: cellsResizable\n * \n * Specifies the return value for <isCellResizable>. Default is true.\n */\nmxGraph.prototype.cellsResizable = true;\n\n/**\n * Variable: cellsBendable\n * \n * Specifies the return value for <isCellsBendable>. Default is true.\n */\nmxGraph.prototype.cellsBendable = true;\n\n/**\n * Variable: cellsSelectable\n * \n * Specifies the return value for <isCellSelectable>. Default is true.\n */\nmxGraph.prototype.cellsSelectable = true;\n\n/**\n * Variable: cellsDisconnectable\n * \n * Specifies the return value for <isCellDisconntable>. Default is true.\n */\nmxGraph.prototype.cellsDisconnectable = true;\n\n/**\n * Variable: autoSizeCells\n * \n * Specifies if the graph should automatically update the cell size after an\n * edit. This is used in <isAutoSizeCell>. Default is false.\n */\nmxGraph.prototype.autoSizeCells = false;\n\n/**\n * Variable: autoSizeCellsOnAdd\n * \n * Specifies if autoSize style should be applied when cells are added. Default is false.\n */\nmxGraph.prototype.autoSizeCellsOnAdd = false;\n\n/**\n * Variable: autoScroll\n * \n * Specifies if the graph should automatically scroll if the mouse goes near\n * the container edge while dragging. This is only taken into account if the\n * container has scrollbars. Default is true.\n * \n * If you need this to work without scrollbars then set <ignoreScrollbars> to\n * true. Please consult the <ignoreScrollbars> for details. In general, with\n * no scrollbars, the use of <allowAutoPanning> is recommended.\n */\nmxGraph.prototype.autoScroll = true;\n\n/**\n * Variable: ignoreScrollbars\n * \n * Specifies if the graph should automatically scroll regardless of the\n * scrollbars. This will scroll the container using positive values for\n * scroll positions (ie usually only rightwards and downwards). To avoid\n * possible conflicts with panning, set <translateToScrollPosition> to true.\n */\nmxGraph.prototype.ignoreScrollbars = false;\n\n/**\n * Variable: translateToScrollPosition\n * \n * Specifies if the graph should automatically convert the current scroll\n * position to a translate in the graph view when a mouseUp event is received.\n * This can be used to avoid conflicts when using <autoScroll> and\n * <ignoreScrollbars> with no scrollbars in the container.\n */\nmxGraph.prototype.translateToScrollPosition = false;\n\n/**\n * Variable: timerAutoScroll\n * \n * Specifies if autoscrolling should be carried out via mxPanningManager even\n * if the container has scrollbars. This disables <scrollPointToVisible> and\n * uses <mxPanningManager> instead. If this is true then <autoExtend> is\n * disabled. It should only be used with a scroll buffer or when scollbars\n * are visible and scrollable in all directions. Default is false.\n */\nmxGraph.prototype.timerAutoScroll = false;\n\n/**\n * Variable: allowAutoPanning\n * \n * Specifies if panning via <panGraph> should be allowed to implement autoscroll\n * if no scrollbars are available in <scrollPointToVisible>. To enable panning\n * inside the container, near the edge, set <mxPanningManager.border> to a\n * positive value. Default is false.\n */\nmxGraph.prototype.allowAutoPanning = false;\n\n/**\n * Variable: autoExtend\n * \n * Specifies if the size of the graph should be automatically extended if the\n * mouse goes near the container edge while dragging. This is only taken into\n * account if the container has scrollbars. Default is true. See <autoScroll>.\n */\nmxGraph.prototype.autoExtend = true;\n\n/**\n * Variable: maximumGraphBounds\n * \n * <mxRectangle> that specifies the area in which all cells in the diagram\n * should be placed. Uses in <getMaximumGraphBounds>. Use a width or height of\n * 0 if you only want to give a upper, left corner.\n */\nmxGraph.prototype.maximumGraphBounds = null;\n\n/**\n * Variable: minimumGraphSize\n * \n * <mxRectangle> that specifies the minimum size of the graph. This is ignored\n * if the graph container has no scrollbars. Default is null.\n */\nmxGraph.prototype.minimumGraphSize = null;\n\n/**\n * Variable: minimumContainerSize\n * \n * <mxRectangle> that specifies the minimum size of the <container> if\n * <resizeContainer> is true.\n */\nmxGraph.prototype.minimumContainerSize = null;\n\t\t\n/**\n * Variable: maximumContainerSize\n * \n * <mxRectangle> that specifies the maximum size of the container if\n * <resizeContainer> is true.\n */\nmxGraph.prototype.maximumContainerSize = null;\n\n/**\n * Variable: resizeContainer\n * \n * Specifies if the container should be resized to the graph size when\n * the graph size has changed. Default is false.\n */\nmxGraph.prototype.resizeContainer = false;\n\n/**\n * Variable: border\n * \n * Border to be added to the bottom and right side when the container is\n * being resized after the graph has been changed. Default is 0.\n */\nmxGraph.prototype.border = 0;\n\t\t\n/**\n * Variable: keepEdgesInForeground\n * \n * Specifies if edges should appear in the foreground regardless of their order\n * in the model. If <keepEdgesInForeground> and <keepEdgesInBackground> are\n * both true then the normal order is applied. Default is false.\n */\nmxGraph.prototype.keepEdgesInForeground = false;\n\n/**\n * Variable: keepEdgesInBackground\n * \n * Specifies if edges should appear in the background regardless of their order\n * in the model. If <keepEdgesInForeground> and <keepEdgesInBackground> are\n * both true then the normal order is applied. Default is false.\n */\nmxGraph.prototype.keepEdgesInBackground = false;\n\n/**\n * Variable: allowNegativeCoordinates\n * \n * Specifies if negative coordinates for vertices are allowed. Default is true.\n */\nmxGraph.prototype.allowNegativeCoordinates = true;\n\n/**\n * Variable: constrainChildren\n * \n * Specifies if a child should be constrained inside the parent bounds after a\n * move or resize of the child. Default is true.\n */\nmxGraph.prototype.constrainChildren = true;\n\n/**\n * Variable: constrainRelativeChildren\n * \n * Specifies if child cells with relative geometries should be constrained\n * inside the parent bounds, if <constrainChildren> is true, and/or the\n * <maximumGraphBounds>. Default is false.\n */\nmxGraph.prototype.constrainRelativeChildren = false;\n\n/**\n * Variable: extendParents\n * \n * Specifies if a parent should contain the child bounds after a resize of\n * the child. Default is true. This has precedence over <constrainChildren>.\n */\nmxGraph.prototype.extendParents = true;\n\n/**\n * Variable: extendParentsOnAdd\n * \n * Specifies if parents should be extended according to the <extendParents>\n * switch if cells are added. Default is true.\n */\nmxGraph.prototype.extendParentsOnAdd = true;\n\n/**\n * Variable: extendParentsOnAdd\n * \n * Specifies if parents should be extended according to the <extendParents>\n * switch if cells are added. Default is false for backwards compatiblity.\n */\nmxGraph.prototype.extendParentsOnMove = false;\n\n/**\n * Variable: recursiveResize\n * \n * Specifies the return value for <isRecursiveResize>. Default is\n * false for backwards compatiblity.\n */\nmxGraph.prototype.recursiveResize = false;\n\n/**\n * Variable: collapseToPreferredSize\n * \n * Specifies if the cell size should be changed to the preferred size when\n * a cell is first collapsed. Default is true.\n */\nmxGraph.prototype.collapseToPreferredSize = true;\n\n/**\n * Variable: zoomFactor\n * \n * Specifies the factor used for <zoomIn> and <zoomOut>. Default is 1.2\n * (120%).\n */\nmxGraph.prototype.zoomFactor = 1.2;\n\n/**\n * Variable: keepSelectionVisibleOnZoom\n * \n * Specifies if the viewport should automatically contain the selection cells\n * after a zoom operation. Default is false.\n */\nmxGraph.prototype.keepSelectionVisibleOnZoom = false;\n\n/**\n * Variable: centerZoom\n * \n * Specifies if the zoom operations should go into the center of the actual\n * diagram rather than going from top, left. Default is true.\n */\nmxGraph.prototype.centerZoom = true;\n\n/**\n * Variable: resetViewOnRootChange\n * \n * Specifies if the scale and translate should be reset if the root changes in\n * the model. Default is true.\n */\nmxGraph.prototype.resetViewOnRootChange = true;\n\n/**\n * Variable: resetEdgesOnResize\n * \n * Specifies if edge control points should be reset after the resize of a\n * connected cell. Default is false.\n */\nmxGraph.prototype.resetEdgesOnResize = false;\n\n/**\n * Variable: resetEdgesOnMove\n * \n * Specifies if edge control points should be reset after the move of a\n * connected cell. Default is false.\n */\nmxGraph.prototype.resetEdgesOnMove = false;\n\n/**\n * Variable: resetEdgesOnConnect\n * \n * Specifies if edge control points should be reset after the the edge has been\n * reconnected. Default is true.\n */\nmxGraph.prototype.resetEdgesOnConnect = true;\n\n/**\n * Variable: allowLoops\n * \n * Specifies if loops (aka self-references) are allowed. Default is false.\n */\nmxGraph.prototype.allowLoops = false;\n\t\n/**\n * Variable: defaultLoopStyle\n * \n * <mxEdgeStyle> to be used for loops. This is a fallback for loops if the\n * <mxConstants.STYLE_LOOP> is undefined. Default is <mxEdgeStyle.Loop>.\n */\nmxGraph.prototype.defaultLoopStyle = mxEdgeStyle.Loop;\n\n/**\n * Variable: multigraph\n * \n * Specifies if multiple edges in the same direction between the same pair of\n * vertices are allowed. Default is true.\n */\nmxGraph.prototype.multigraph = true;\n\n/**\n * Variable: connectableEdges\n * \n * Specifies if edges are connectable. Default is false. This overrides the\n * connectable field in edges.\n */\nmxGraph.prototype.connectableEdges = false;\n\n/**\n * Variable: allowDanglingEdges\n * \n * Specifies if edges with disconnected terminals are allowed in the graph.\n * Default is true.\n */\nmxGraph.prototype.allowDanglingEdges = true;\n\n/**\n * Variable: cloneInvalidEdges\n * \n * Specifies if edges that are cloned should be validated and only inserted\n * if they are valid. Default is true.\n */\nmxGraph.prototype.cloneInvalidEdges = false;\n\n/**\n * Variable: disconnectOnMove\n * \n * Specifies if edges should be disconnected from their terminals when they\n * are moved. Default is true.\n */\nmxGraph.prototype.disconnectOnMove = true;\n\n/**\n * Variable: labelsVisible\n * \n * Specifies if labels should be visible. This is used in <getLabel>. Default\n * is true.\n */\nmxGraph.prototype.labelsVisible = true;\n\t\n/**\n * Variable: htmlLabels\n * \n * Specifies the return value for <isHtmlLabel>. Default is false.\n */\nmxGraph.prototype.htmlLabels = false;\n\n/**\n * Variable: swimlaneSelectionEnabled\n * \n * Specifies if swimlanes should be selectable via the content if the\n * mouse is released. Default is true.\n */\nmxGraph.prototype.swimlaneSelectionEnabled = true;\n\n/**\n * Variable: swimlaneNesting\n * \n * Specifies if nesting of swimlanes is allowed. Default is true.\n */\nmxGraph.prototype.swimlaneNesting = true;\n\t\n/**\n * Variable: swimlaneIndicatorColorAttribute\n * \n * The attribute used to find the color for the indicator if the indicator\n * color is set to 'swimlane'. Default is <mxConstants.STYLE_FILLCOLOR>.\n */\nmxGraph.prototype.swimlaneIndicatorColorAttribute = mxConstants.STYLE_FILLCOLOR;\n\n/**\n * Variable: imageBundles\n * \n * Holds the list of image bundles.\n */\nmxGraph.prototype.imageBundles = null;\n\n/**\n * Variable: minFitScale\n * \n * Specifies the minimum scale to be applied in <fit>. Default is 0.1. Set this\n * to null to allow any value.\n */\nmxGraph.prototype.minFitScale = 0.1;\n\n/**\n * Variable: maxFitScale\n * \n * Specifies the maximum scale to be applied in <fit>. Default is 8. Set this\n * to null to allow any value.\n */\nmxGraph.prototype.maxFitScale = 8;\n\n/**\n * Variable: panDx\n * \n * Current horizontal panning value. Default is 0.\n */\nmxGraph.prototype.panDx = 0;\n\n/**\n * Variable: panDy\n * \n * Current vertical panning value. Default is 0.\n */\nmxGraph.prototype.panDy = 0;\n\n/**\n * Variable: collapsedImage\n * \n * Specifies the <mxImage> to indicate a collapsed state.\n * Default value is mxClient.imageBasePath + '/collapsed.gif'\n */\nmxGraph.prototype.collapsedImage = new mxImage(mxClient.imageBasePath + '/collapsed.gif', 9, 9);\n\n/**\n * Variable: expandedImage\n * \n * Specifies the <mxImage> to indicate a expanded state.\n * Default value is mxClient.imageBasePath + '/expanded.gif'\n */\nmxGraph.prototype.expandedImage = new mxImage(mxClient.imageBasePath + '/expanded.gif', 9, 9);\n\n/**\n * Variable: warningImage\n * \n * Specifies the <mxImage> for the image to be used to display a warning\n * overlay. See <setCellWarning>. Default value is mxClient.imageBasePath +\n * '/warning'.  The extension for the image depends on the platform. It is\n * '.png' on the Mac and '.gif' on all other platforms.\n */\nmxGraph.prototype.warningImage = new mxImage(mxClient.imageBasePath + '/warning'+\n\t((mxClient.IS_MAC) ? '.png' : '.gif'), 16, 16);\n\n/**\n * Variable: alreadyConnectedResource\n * \n * Specifies the resource key for the error message to be displayed in\n * non-multigraphs when two vertices are already connected. If the resource\n * for this key does not exist then the value is used as the error message.\n * Default is 'alreadyConnected'.\n */\nmxGraph.prototype.alreadyConnectedResource = (mxClient.language != 'none') ? 'alreadyConnected' : '';\n\n/**\n * Variable: containsValidationErrorsResource\n * \n * Specifies the resource key for the warning message to be displayed when\n * a collapsed cell contains validation errors. If the resource for this\n * key does not exist then the value is used as the warning message.\n * Default is 'containsValidationErrors'.\n */\nmxGraph.prototype.containsValidationErrorsResource = (mxClient.language != 'none') ? 'containsValidationErrors' : '';\n\n/**\n * Variable: collapseExpandResource\n * \n * Specifies the resource key for the tooltip on the collapse/expand icon.\n * If the resource for this key does not exist then the value is used as\n * the tooltip. Default is 'collapse-expand'.\n */\nmxGraph.prototype.collapseExpandResource = (mxClient.language != 'none') ? 'collapse-expand' : '';\n\n/**\n * Function: init\n * \n * Initializes the <container> and creates the respective datastructures.\n * \n * Parameters:\n * \n * container - DOM node that will contain the graph display.\n */\nmxGraph.prototype.init = function(container)\n{\n\tthis.container = container;\n\t\n\t// Initializes the in-place editor\n\tthis.cellEditor = this.createCellEditor();\t\n\n\t// Initializes the container using the view\n\tthis.view.init();\n\t\n\t// Updates the size of the container for the current graph\n\tthis.sizeDidChange();\n\t\n\t// Hides tooltips and resets tooltip timer if mouse leaves container\n\tmxEvent.addListener(container, 'mouseleave', mxUtils.bind(this, function()\n\t{\n\t\tif (this.tooltipHandler != null)\n\t\t{\n\t\t\tthis.tooltipHandler.hide();\n\t\t}\n\t}));\n\n\t// Automatic deallocation of memory\n\tif (mxClient.IS_IE)\n\t{\n\t\tmxEvent.addListener(window, 'unload', mxUtils.bind(this, function()\n\t\t{\n\t\t\tthis.destroy();\n\t\t}));\n\t\t\n\t\t// Disable shift-click for text\n\t\tmxEvent.addListener(container, 'selectstart',\n\t\t\tmxUtils.bind(this, function(evt)\n\t\t\t{\n\t\t\t\treturn this.isEditing() || (!this.isMouseDown && !mxEvent.isShiftDown(evt));\n\t\t\t})\n\t\t);\n\t}\n\t\n\t// Workaround for missing last shape and connect preview in IE8 standards\n\t// mode if no initial graph displayed or no label for shape defined\n\tif (document.documentMode == 8)\n\t{\n\t\tcontainer.insertAdjacentHTML('beforeend', '<' + mxClient.VML_PREFIX + ':group' +\n\t\t\t' style=\"DISPLAY: none;\"></' + mxClient.VML_PREFIX + ':group>');\n\t}\n};\n\n/**\n * Function: createHandlers\n * \n * Creates the tooltip-, panning-, connection- and graph-handler (in this\n * order). This is called in the constructor before <init> is called.\n */\nmxGraph.prototype.createHandlers = function()\n{\n\tthis.tooltipHandler = this.createTooltipHandler();\n\tthis.tooltipHandler.setEnabled(false);\n\tthis.selectionCellsHandler = this.createSelectionCellsHandler();\n\tthis.connectionHandler = this.createConnectionHandler();\n\tthis.connectionHandler.setEnabled(false);\n\tthis.graphHandler = this.createGraphHandler();\n\tthis.panningHandler = this.createPanningHandler();\n\tthis.panningHandler.panningEnabled = false;\n\tthis.popupMenuHandler = this.createPopupMenuHandler();\n};\n\n/**\n * Function: createTooltipHandler\n * \n * Creates and returns a new <mxTooltipHandler> to be used in this graph.\n */\nmxGraph.prototype.createTooltipHandler = function()\n{\n\treturn new mxTooltipHandler(this);\n};\n\n/**\n * Function: createSelectionCellsHandler\n * \n * Creates and returns a new <mxTooltipHandler> to be used in this graph.\n */\nmxGraph.prototype.createSelectionCellsHandler = function()\n{\n\treturn new mxSelectionCellsHandler(this);\n};\n\n/**\n * Function: createConnectionHandler\n * \n * Creates and returns a new <mxConnectionHandler> to be used in this graph.\n */\nmxGraph.prototype.createConnectionHandler = function()\n{\n\treturn new mxConnectionHandler(this);\n};\n\n/**\n * Function: createGraphHandler\n * \n * Creates and returns a new <mxGraphHandler> to be used in this graph.\n */\nmxGraph.prototype.createGraphHandler = function()\n{\n\treturn new mxGraphHandler(this);\n};\n\n/**\n * Function: createPanningHandler\n * \n * Creates and returns a new <mxPanningHandler> to be used in this graph.\n */\nmxGraph.prototype.createPanningHandler = function()\n{\n\treturn new mxPanningHandler(this);\n};\n\n/**\n * Function: createPopupMenuHandler\n * \n * Creates and returns a new <mxPopupMenuHandler> to be used in this graph.\n */\nmxGraph.prototype.createPopupMenuHandler = function()\n{\n\treturn new mxPopupMenuHandler(this);\n};\n\n/**\n * Function: createSelectionModel\n * \n * Creates a new <mxGraphSelectionModel> to be used in this graph.\n */\nmxGraph.prototype.createSelectionModel = function()\n{\n\treturn new mxGraphSelectionModel(this);\n};\n\n/**\n * Function: createStylesheet\n * \n * Creates a new <mxGraphSelectionModel> to be used in this graph.\n */\nmxGraph.prototype.createStylesheet = function()\n{\n\treturn new mxStylesheet();\n};\n\n/**\n * Function: createGraphView\n * \n * Creates a new <mxGraphView> to be used in this graph.\n */\nmxGraph.prototype.createGraphView = function()\n{\n\treturn new mxGraphView(this);\n};\n \n/**\n * Function: createCellRenderer\n * \n * Creates a new <mxCellRenderer> to be used in this graph.\n */\nmxGraph.prototype.createCellRenderer = function()\n{\n\treturn new mxCellRenderer();\n};\n\n/**\n * Function: createCellEditor\n * \n * Creates a new <mxCellEditor> to be used in this graph.\n */\nmxGraph.prototype.createCellEditor = function()\n{\n\treturn new mxCellEditor(this);\n};\n\n/**\n * Function: getModel\n * \n * Returns the <mxGraphModel> that contains the cells.\n */\nmxGraph.prototype.getModel = function()\n{\n\treturn this.model;\n};\n\n/**\n * Function: getView\n * \n * Returns the <mxGraphView> that contains the <mxCellStates>.\n */\nmxGraph.prototype.getView = function()\n{\n\treturn this.view;\n};\n\n/**\n * Function: getStylesheet\n * \n * Returns the <mxStylesheet> that defines the style.\n */\nmxGraph.prototype.getStylesheet = function()\n{\n\treturn this.stylesheet;\n};\n\n/**\n * Function: setStylesheet\n * \n * Sets the <mxStylesheet> that defines the style.\n */\nmxGraph.prototype.setStylesheet = function(stylesheet)\n{\n\tthis.stylesheet = stylesheet;\n};\n\n/**\n * Function: getSelectionModel\n * \n * Returns the <mxGraphSelectionModel> that contains the selection.\n */\nmxGraph.prototype.getSelectionModel = function()\n{\n\treturn this.selectionModel;\n};\n\n/**\n * Function: setSelectionModel\n * \n * Sets the <mxSelectionModel> that contains the selection.\n */\nmxGraph.prototype.setSelectionModel = function(selectionModel)\n{\n\tthis.selectionModel = selectionModel;\n};\n\n/**\n * Function: getSelectionCellsForChanges\n * \n * Returns the cells to be selected for the given array of changes.\n */\nmxGraph.prototype.getSelectionCellsForChanges = function(changes)\n{\n\tvar dict = new mxDictionary();\n\tvar cells = [];\n\t\n\tvar addCell = mxUtils.bind(this, function(cell)\n\t{\n\t\tif (!dict.get(cell) && this.model.contains(cell))\n\t\t{\n\t\t\tif (this.model.isEdge(cell) || this.model.isVertex(cell))\n\t\t\t{\n\t\t\t\tdict.put(cell, true);\n\t\t\t\tcells.push(cell);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tvar childCount = this.model.getChildCount(cell);\n\t\t\t\t\n\t\t\t\tfor (var i = 0; i < childCount; i++)\n\t\t\t\t{\n\t\t\t\t\taddCell(this.model.getChildAt(cell, i));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t});\n\n\tfor (var i = 0; i < changes.length; i++)\n\t{\n\t\tvar change = changes[i];\n\t\t\n\t\tif (change.constructor != mxRootChange)\n\t\t{\n\t\t\tvar cell = null;\n\n\t\t\tif (change instanceof mxChildChange)\n\t\t\t{\n\t\t\t\tcell = change.child;\n\t\t\t}\n\t\t\telse if (change.cell != null && change.cell instanceof mxCell)\n\t\t\t{\n\t\t\t\tcell = change.cell;\n\t\t\t}\n\t\t\t\n\t\t\tif (cell != null)\n\t\t\t{\n\t\t\t\taddCell(cell);\n\t\t\t}\n\t\t}\n\t}\n\t\n\treturn cells;\n};\n\n/**\n * Function: graphModelChanged\n * \n * Called when the graph model changes. Invokes <processChange> on each\n * item of the given array to update the view accordingly.\n * \n * Parameters:\n * \n * changes - Array that contains the individual changes.\n */\nmxGraph.prototype.graphModelChanged = function(changes)\n{\n\tfor (var i = 0; i < changes.length; i++)\n\t{\n\t\tthis.processChange(changes[i]);\n\t}\n\t\n\tthis.removeSelectionCells(this.getRemovedCellsForChanges(changes));\n\tthis.view.validate();\n\tthis.sizeDidChange();\n};\n\n/**\n * Function: getRemovedCellsForChanges\n * \n * Returns the cells that have been removed from the model.\n */\nmxGraph.prototype.getRemovedCellsForChanges = function(changes)\n{\n\tvar result = [];\n\t\n\tfor (var i = 0; i < changes.length; i++)\n\t{\n\t\tvar change = changes[i];\n\t\t\n\t\t// Resets the view settings, removes all cells and clears\n\t\t// the selection if the root changes.\n\t\tif (change instanceof mxRootChange)\n\t\t{\n\t\t\tbreak;\n\t\t}\n\t\telse if (change instanceof mxChildChange)\n\t\t{\n\t\t\tif (this.model.contains(change.previous) && !this.model.contains(change.parent))\n\t\t\t{\n\t\t\t\tresult = result.concat(this.model.getDescendants(change.child));\n\t\t\t}\n\t\t}\n\t\telse if (change instanceof mxVisibleChange)\n\t\t{\n\t\t\tresult = result.concat(this.model.getDescendants(change.cell));\n\t\t}\n\t}\n\t\n\treturn result;\n};\n\n/**\n * Function: processChange\n * \n * Processes the given change and invalidates the respective cached data\n * in <view>. This fires a <root> event if the root has changed in the\n * model.\n * \n * Parameters:\n * \n * change - Object that represents the change on the model.\n */\nmxGraph.prototype.processChange = function(change)\n{\n\t// Resets the view settings, removes all cells and clears\n\t// the selection if the root changes.\n\tif (change instanceof mxRootChange)\n\t{\n\t\tthis.clearSelection();\n\t\tthis.setDefaultParent(null);\n\t\tthis.removeStateForCell(change.previous);\n\t\t\n\t\tif (this.resetViewOnRootChange)\n\t\t{\n\t\t\tthis.view.scale = 1;\n\t\t\tthis.view.translate.x = 0;\n\t\t\tthis.view.translate.y = 0;\n\t\t}\n\n\t\tthis.fireEvent(new mxEventObject(mxEvent.ROOT));\n\t}\n\t\n\t// Adds or removes a child to the view by online invaliding\n\t// the minimal required portions of the cache, namely, the\n\t// old and new parent and the child.\n\telse if (change instanceof mxChildChange)\n\t{\n\t\tvar newParent = this.model.getParent(change.child);\n\t\tthis.view.invalidate(change.child, true, true);\n\t\t\n\t\tif (!this.model.contains(newParent) || this.isCellCollapsed(newParent))\n\t\t{\n\t\t\tthis.view.invalidate(change.child, true, true);\n\t\t\tthis.removeStateForCell(change.child);\n\t\t\t\n\t\t\t// Handles special case of current root of view being removed\n\t\t\tif (this.view.currentRoot == change.child)\n\t\t\t{\n\t\t\t\tthis.home();\n\t\t\t}\n\t\t}\n \n\t\tif (newParent != change.previous)\n\t\t{\n\t\t\t// Refreshes the collapse/expand icons on the parents\n\t\t\tif (newParent != null)\n\t\t\t{\n\t\t\t\tthis.view.invalidate(newParent, false, false);\n\t\t\t}\n\t\t\t\n\t\t\tif (change.previous != null)\n\t\t\t{\n\t\t\t\tthis.view.invalidate(change.previous, false, false);\n\t\t\t}\n\t\t}\n\t}\n\n\t// Handles two special cases where the shape does not need to be\n\t// recreated from scratch, it only needs to be invalidated.\n\telse if (change instanceof mxTerminalChange || change instanceof mxGeometryChange)\n\t{\n\t\t// Checks if the geometry has changed to avoid unnessecary revalidation\n\t\tif (change instanceof mxTerminalChange || ((change.previous == null && change.geometry != null) ||\n\t\t\t(change.previous != null && !change.previous.equals(change.geometry))))\n\t\t{\n\t\t\tthis.view.invalidate(change.cell);\n\t\t}\n\t}\n\n\t// Handles two special cases where only the shape, but no\n\t// descendants need to be recreated\n\telse if (change instanceof mxValueChange)\n\t{\n\t\tthis.view.invalidate(change.cell, false, false);\n\t}\n\t\n\t// Requires a new mxShape in JavaScript\n\telse if (change instanceof mxStyleChange)\n\t{\n\t\tthis.view.invalidate(change.cell, true, true);\n\t\tvar state = this.view.getState(change.cell);\n\t\t\n\t\tif (state != null)\n\t\t{\n\t\t\tstate.style = null;\n\t\t}\n\t}\n\t\n\t// Removes the state from the cache by default\n\telse if (change.cell != null && change.cell instanceof mxCell)\n\t{\n\t\tthis.removeStateForCell(change.cell);\n\t}\n};\n\n/**\n * Function: removeStateForCell\n * \n * Removes all cached information for the given cell and its descendants.\n * This is called when a cell was removed from the model.\n * \n * Paramters:\n * \n * cell - <mxCell> that was removed from the model.\n */\nmxGraph.prototype.removeStateForCell = function(cell)\n{\n\tvar childCount = this.model.getChildCount(cell);\n\t\n\tfor (var i = 0; i < childCount; i++)\n\t{\n\t\tthis.removeStateForCell(this.model.getChildAt(cell, i));\n\t}\n\n\tthis.view.invalidate(cell, false, true);\n\tthis.view.removeState(cell);\n};\n\n/**\n * Group: Overlays\n */\n\n/**\n * Function: addCellOverlay\n * \n * Adds an <mxCellOverlay> for the specified cell. This method fires an\n * <addoverlay> event and returns the new <mxCellOverlay>.\n * \n * Parameters:\n * \n * cell - <mxCell> to add the overlay for.\n * overlay - <mxCellOverlay> to be added for the cell.\n */\nmxGraph.prototype.addCellOverlay = function(cell, overlay)\n{\n\tif (cell.overlays == null)\n\t{\n\t\tcell.overlays = [];\n\t}\n\t\n\tcell.overlays.push(overlay);\n\n\tvar state = this.view.getState(cell);\n\n\t// Immediately updates the cell display if the state exists\n\tif (state != null)\n\t{\n\t\tthis.cellRenderer.redraw(state);\n\t}\n\t\n\tthis.fireEvent(new mxEventObject(mxEvent.ADD_OVERLAY,\n\t\t\t'cell', cell, 'overlay', overlay));\n\t\n\treturn overlay;\n};\n\n/**\n * Function: getCellOverlays\n * \n * Returns the array of <mxCellOverlays> for the given cell or null, if\n * no overlays are defined.\n * \n * Parameters:\n * \n * cell - <mxCell> whose overlays should be returned.\n */\nmxGraph.prototype.getCellOverlays = function(cell)\n{\n\treturn cell.overlays;\n};\n\n/**\n * Function: removeCellOverlay\n * \n * Removes and returns the given <mxCellOverlay> from the given cell. This\n * method fires a <removeoverlay> event. If no overlay is given, then all\n * overlays are removed using <removeOverlays>.\n * \n * Parameters:\n * \n * cell - <mxCell> whose overlay should be removed.\n * overlay - Optional <mxCellOverlay> to be removed.\n */\nmxGraph.prototype.removeCellOverlay = function(cell, overlay)\n{\n\tif (overlay == null)\n\t{\n\t\tthis.removeCellOverlays(cell);\n\t}\n\telse\n\t{\n\t\tvar index = mxUtils.indexOf(cell.overlays, overlay);\n\t\t\n\t\tif (index >= 0)\n\t\t{\n\t\t\tcell.overlays.splice(index, 1);\n\t\t\t\n\t\t\tif (cell.overlays.length == 0)\n\t\t\t{\n\t\t\t\tcell.overlays = null;\n\t\t\t}\n\t\t\t\n\t\t\t// Immediately updates the cell display if the state exists\n\t\t\tvar state = this.view.getState(cell);\n\t\t\t\n\t\t\tif (state != null)\n\t\t\t{\n\t\t\t\tthis.cellRenderer.redraw(state);\n\t\t\t}\n\t\t\t\n\t\t\tthis.fireEvent(new mxEventObject(mxEvent.REMOVE_OVERLAY,\n\t\t\t\t\t'cell', cell, 'overlay', overlay));\t\n\t\t}\n\t\telse\n\t\t{\n\t\t\toverlay = null;\n\t\t}\n\t}\n\t\n\treturn overlay;\n};\n\n/**\n * Function: removeCellOverlays\n * \n * Removes all <mxCellOverlays> from the given cell. This method\n * fires a <removeoverlay> event for each <mxCellOverlay> and returns\n * the array of <mxCellOverlays> that was removed from the cell.\n * \n * Parameters:\n * \n * cell - <mxCell> whose overlays should be removed\n */\nmxGraph.prototype.removeCellOverlays = function(cell)\n{\n\tvar overlays = cell.overlays;\n\t\n\tif (overlays != null)\n\t{\n\t\tcell.overlays = null;\n\t\t\n\t\t// Immediately updates the cell display if the state exists\n\t\tvar state = this.view.getState(cell);\n\t\t\n\t\tif (state != null)\n\t\t{\n\t\t\tthis.cellRenderer.redraw(state);\n\t\t}\n\t\t\n\t\tfor (var i = 0; i < overlays.length; i++)\n\t\t{\n\t\t\tthis.fireEvent(new mxEventObject(mxEvent.REMOVE_OVERLAY,\n\t\t\t\t\t'cell', cell, 'overlay', overlays[i]));\n\t\t}\n\t}\n\t\n\treturn overlays;\n};\n\n/**\n * Function: clearCellOverlays\n * \n * Removes all <mxCellOverlays> in the graph for the given cell and all its\n * descendants. If no cell is specified then all overlays are removed from\n * the graph. This implementation uses <removeCellOverlays> to remove the\n * overlays from the individual cells.\n * \n * Parameters:\n * \n * cell - Optional <mxCell> that represents the root of the subtree to\n * remove the overlays from. Default is the root in the model.\n */\nmxGraph.prototype.clearCellOverlays = function(cell)\n{\n\tcell = (cell != null) ? cell : this.model.getRoot();\n\tthis.removeCellOverlays(cell);\n\t\n\t// Recursively removes all overlays from the children\n\tvar childCount = this.model.getChildCount(cell);\n\t\n\tfor (var i = 0; i < childCount; i++)\n\t{\n\t\tvar child = this.model.getChildAt(cell, i);\n\t\tthis.clearCellOverlays(child); // recurse\n\t}\n};\n\n/**\n * Function: setCellWarning\n * \n * Creates an overlay for the given cell using the warning and image or\n * <warningImage> and returns the new <mxCellOverlay>. The warning is\n * displayed as a tooltip in a red font and may contain HTML markup. If\n * the warning is null or a zero length string, then all overlays are\n * removed from the cell.\n * \n * Example:\n * \n * (code)\n * graph.setCellWarning(cell, '<b>Warning:</b>: Hello, World!');\n * (end)\n * \n * Parameters:\n * \n * cell - <mxCell> whose warning should be set.\n * warning - String that represents the warning to be displayed.\n * img - Optional <mxImage> to be used for the overlay. Default is\n * <warningImage>.\n * isSelect - Optional boolean indicating if a click on the overlay\n * should select the corresponding cell. Default is false.\n */\nmxGraph.prototype.setCellWarning = function(cell, warning, img, isSelect)\n{\n\tif (warning != null && warning.length > 0)\n\t{\n\t\timg = (img != null) ? img : this.warningImage;\n\t\t\n\t\t// Creates the overlay with the image and warning\n\t\tvar overlay = new mxCellOverlay(img,\n\t\t\t'<font color=red>'+warning+'</font>');\n\t\t\n\t\t// Adds a handler for single mouseclicks to select the cell\n\t\tif (isSelect)\n\t\t{\n\t\t\toverlay.addListener(mxEvent.CLICK,\n\t\t\t\tmxUtils.bind(this, function(sender, evt)\n\t\t\t\t{\n\t\t\t\t\tif (this.isEnabled())\n\t\t\t\t\t{\n\t\t\t\t\t\tthis.setSelectionCell(cell);\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t);\n\t\t}\n\t\t\n\t\t// Sets and returns the overlay in the graph\n\t\treturn this.addCellOverlay(cell, overlay);\n\t}\n\telse\n\t{\n\t\tthis.removeCellOverlays(cell);\n\t}\n\t\n\treturn null;\n};\n\n/**\n * Group: In-place editing\n */\n\n/**\n * Function: startEditing\n * \n * Calls <startEditingAtCell> using the given cell or the first selection\n * cell.\n * \n * Parameters:\n * \n * evt - Optional mouse event that triggered the editing.\n */\nmxGraph.prototype.startEditing = function(evt)\n{\n\tthis.startEditingAtCell(null, evt);\n};\n\n/**\n * Function: startEditingAtCell\n * \n * Fires a <startEditing> event and invokes <mxCellEditor.startEditing>\n * on <editor>. After editing was started, a <editingStarted> event is\n * fired.\n * \n * Parameters:\n * \n * cell - <mxCell> to start the in-place editor for.\n * evt - Optional mouse event that triggered the editing.\n */\nmxGraph.prototype.startEditingAtCell = function(cell, evt)\n{\n\tif (evt == null || !mxEvent.isMultiTouchEvent(evt))\n\t{\n\t\tif (cell == null)\n\t\t{\n\t\t\tcell = this.getSelectionCell();\n\t\t\t\n\t\t\tif (cell != null && !this.isCellEditable(cell))\n\t\t\t{\n\t\t\t\tcell = null;\n\t\t\t}\n\t\t}\n\t\n\t\tif (cell != null)\n\t\t{\n\t\t\tthis.fireEvent(new mxEventObject(mxEvent.START_EDITING,\n\t\t\t\t\t'cell', cell, 'event', evt));\n\t\t\tthis.cellEditor.startEditing(cell, evt);\n\t\t\tthis.fireEvent(new mxEventObject(mxEvent.EDITING_STARTED,\n\t\t\t\t\t'cell', cell, 'event', evt));\n\t\t}\n\t}\n};\n\n/**\n * Function: getEditingValue\n * \n * Returns the initial value for in-place editing. This implementation\n * returns <convertValueToString> for the given cell. If this function is\n * overridden, then <mxGraphModel.valueForCellChanged> should take care\n * of correctly storing the actual new value inside the user object.\n * \n * Parameters:\n * \n * cell - <mxCell> for which the initial editing value should be returned.\n * evt - Optional mouse event that triggered the editor.\n */\nmxGraph.prototype.getEditingValue = function(cell, evt)\n{\n\treturn this.convertValueToString(cell);\n};\n\n/**\n * Function: stopEditing\n * \n * Stops the current editing  and fires a <editingStopped> event.\n * \n * Parameters:\n * \n * cancel - Boolean that specifies if the current editing value\n * should be stored.\n */\nmxGraph.prototype.stopEditing = function(cancel)\n{\n\tthis.cellEditor.stopEditing(cancel);\n\tthis.fireEvent(new mxEventObject(mxEvent.EDITING_STOPPED, 'cancel', cancel));\n};\n\n/**\n * Function: labelChanged\n * \n * Sets the label of the specified cell to the given value using\n * <cellLabelChanged> and fires <mxEvent.LABEL_CHANGED> while the\n * transaction is in progress. Returns the cell whose label was changed.\n * \n * Parameters:\n * \n * cell - <mxCell> whose label should be changed.\n * value - New label to be assigned.\n * evt - Optional event that triggered the change.\n */\nmxGraph.prototype.labelChanged = function(cell, value, evt)\n{\n\tthis.model.beginUpdate();\n\ttry\n\t{\n\t\tvar old = cell.value;\n\t\tthis.cellLabelChanged(cell, value, this.isAutoSizeCell(cell));\n\t\tthis.fireEvent(new mxEventObject(mxEvent.LABEL_CHANGED,\n\t\t\t'cell', cell, 'value', value, 'old', old, 'event', evt));\n\t}\n\tfinally\n\t{\n\t\tthis.model.endUpdate();\n\t}\n\t\n\treturn cell;\n};\n\n/**\n * Function: cellLabelChanged\n * \n * Sets the new label for a cell. If autoSize is true then\n * <cellSizeUpdated> will be called.\n * \n * In the following example, the function is extended to map changes to\n * attributes in an XML node, as shown in <convertValueToString>.\n * Alternatively, the handling of this can be implemented as shown in\n * <mxGraphModel.valueForCellChanged> without the need to clone the\n * user object.\n * \n * (code)\n * var graphCellLabelChanged = graph.cellLabelChanged;\n * graph.cellLabelChanged = function(cell, newValue, autoSize)\n * {\n * \t// Cloned for correct undo/redo\n * \tvar elt = cell.value.cloneNode(true);\n *  elt.setAttribute('label', newValue);\n *  \n *  newValue = elt;\n *  graphCellLabelChanged.apply(this, arguments);\n * };\n * (end) \n * \n * Parameters:\n * \n * cell - <mxCell> whose label should be changed.\n * value - New label to be assigned.\n * autoSize - Boolean that specifies if <cellSizeUpdated> should be called.\n */\nmxGraph.prototype.cellLabelChanged = function(cell, value, autoSize)\n{\n\tthis.model.beginUpdate();\n\ttry\n\t{\n\t\tthis.model.setValue(cell, value);\n\t\t\n\t\tif (autoSize)\n\t\t{\n\t\t\tthis.cellSizeUpdated(cell, false);\n\t\t}\n\t}\n\tfinally\n\t{\n\t\tthis.model.endUpdate();\n\t}\n};\n\n/**\n * Group: Event processing\n */\n\n/**\n * Function: escape\n * \n * Processes an escape keystroke.\n * \n * Parameters:\n * \n * evt - Mouseevent that represents the keystroke.\n */\nmxGraph.prototype.escape = function(evt)\n{\n\tthis.fireEvent(new mxEventObject(mxEvent.ESCAPE, 'event', evt));\n};\n\n/**\n * Function: click\n * \n * Processes a singleclick on an optional cell and fires a <click> event.\n * The click event is fired initially. If the graph is enabled and the\n * event has not been consumed, then the cell is selected using\n * <selectCellForEvent> or the selection is cleared using\n * <clearSelection>. The events consumed state is set to true if the\n * corresponding <mxMouseEvent> has been consumed.\n *\n * To handle a click event, use the following code.\n * \n * (code)\n * graph.addListener(mxEvent.CLICK, function(sender, evt)\n * {\n *   var e = evt.getProperty('event'); // mouse event\n *   var cell = evt.getProperty('cell'); // cell may be null\n *   \n *   if (cell != null)\n *   {\n *     // Do something useful with cell and consume the event\n *     evt.consume();\n *   }\n * });\n * (end)\n * \n * Parameters:\n * \n * me - <mxMouseEvent> that represents the single click.\n */\nmxGraph.prototype.click = function(me)\n{\n\tvar evt = me.getEvent();\n\tvar cell = me.getCell();\n\tvar mxe = new mxEventObject(mxEvent.CLICK, 'event', evt, 'cell', cell);\n\t\n\tif (me.isConsumed())\n\t{\n\t\tmxe.consume();\n\t}\n\t\n\tthis.fireEvent(mxe);\n\t\n\t// Handles the event if it has not been consumed\n\tif (this.isEnabled() && !mxEvent.isConsumed(evt) && !mxe.isConsumed())\n\t{\n\t\tif (cell != null)\n\t\t{\n\t\t\tif (this.isTransparentClickEvent(evt))\n\t\t\t{\n\t\t\t\tvar active = false;\n\t\t\t\t\n\t\t\t\tvar tmp = this.getCellAt(me.graphX, me.graphY, null, null, null, mxUtils.bind(this, function(state)\n\t\t\t\t{\n\t\t\t\t\tvar selected = this.isCellSelected(state.cell);\n\t\t\t\t\tactive = active || selected;\n\t\t\t\t\t\n\t\t\t\t\treturn !active || selected;\n\t\t\t\t}));\n\t\t\t\t\n\t\t\t\tif (tmp != null)\n\t\t\t\t{\n\t\t\t\t\tcell = tmp;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tthis.selectCellForEvent(cell, evt);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tvar swimlane = null;\n\t\t\t\n\t\t\tif (this.isSwimlaneSelectionEnabled())\n\t\t\t{\n\t\t\t\t// Gets the swimlane at the location (includes\n\t\t\t\t// content area of swimlanes)\n\t\t\t\tswimlane = this.getSwimlaneAt(me.getGraphX(), me.getGraphY());\n\t\t\t}\n\n\t\t\t// Selects the swimlane and consumes the event\n\t\t\tif (swimlane != null)\n\t\t\t{\n\t\t\t\tthis.selectCellForEvent(swimlane, evt);\n\t\t\t}\n\t\t\t\n\t\t\t// Ignores the event if the control key is pressed\n\t\t\telse if (!this.isToggleEvent(evt))\n\t\t\t{\n\t\t\t\tthis.clearSelection();\n\t\t\t}\n\t\t}\n\t}\n};\n\n/**\n * Function: dblClick\n * \n * Processes a doubleclick on an optional cell and fires a <dblclick>\n * event. The event is fired initially. If the graph is enabled and the\n * event has not been consumed, then <edit> is called with the given\n * cell. The event is ignored if no cell was specified.\n *\n * Example for overriding this method.\n *\n * (code)\n * graph.dblClick = function(evt, cell)\n * {\n *   var mxe = new mxEventObject(mxEvent.DOUBLE_CLICK, 'event', evt, 'cell', cell);\n *   this.fireEvent(mxe);\n *   \n *   if (this.isEnabled() && !mxEvent.isConsumed(evt) && !mxe.isConsumed())\n *   {\n * \t   mxUtils.alert('Hello, World!');\n *     mxe.consume();\n *   }\n * }\n * (end)\n * \n * Example listener for this event.\n * \n * (code)\n * graph.addListener(mxEvent.DOUBLE_CLICK, function(sender, evt)\n * {\n *   var cell = evt.getProperty('cell');\n *   // do something with the cell and consume the\n *   // event to prevent in-place editing from start\n * });\n * (end) \n * \n * Parameters:\n * \n * evt - Mouseevent that represents the doubleclick.\n * cell - Optional <mxCell> under the mousepointer.\n */\nmxGraph.prototype.dblClick = function(evt, cell)\n{\n\tvar mxe = new mxEventObject(mxEvent.DOUBLE_CLICK, 'event', evt, 'cell', cell);\n\tthis.fireEvent(mxe);\n\t\n\t// Handles the event if it has not been consumed\n\tif (this.isEnabled() && !mxEvent.isConsumed(evt) && !mxe.isConsumed() &&\n\t\tcell != null && this.isCellEditable(cell) && !this.isEditing(cell))\n\t{\n\t\tthis.startEditingAtCell(cell, evt);\n\t\tmxEvent.consume(evt);\n\t}\n};\n\n/**\n * Function: tapAndHold\n * \n * Handles the <mxMouseEvent> by highlighting the <mxCellState>.\n * \n * Parameters:\n * \n * me - <mxMouseEvent> that represents the touch event.\n * state - Optional <mxCellState> that is associated with the event.\n */\nmxGraph.prototype.tapAndHold = function(me)\n{\n\tvar evt = me.getEvent();\n\tvar mxe = new mxEventObject(mxEvent.TAP_AND_HOLD, 'event', evt, 'cell', me.getCell());\n\n\t// LATER: Check if event should be consumed if me is consumed\n\tthis.fireEvent(mxe);\n\n\tif (mxe.isConsumed())\n\t{\n\t\t// Resets the state of the panning handler\n\t\tthis.panningHandler.panningTrigger = false;\n\t}\n\t\n\t// Handles the event if it has not been consumed\n\tif (this.isEnabled() && !mxEvent.isConsumed(evt) && !mxe.isConsumed() && this.connectionHandler.isEnabled())\n\t{\n\t\tvar state = this.view.getState(this.connectionHandler.marker.getCell(me));\n\n\t\tif (state != null)\n\t\t{\n\t\t\tthis.connectionHandler.marker.currentColor = this.connectionHandler.marker.validColor;\n\t\t\tthis.connectionHandler.marker.markedState = state;\n\t\t\tthis.connectionHandler.marker.mark();\n\t\t\t\n\t\t\tthis.connectionHandler.first = new mxPoint(me.getGraphX(), me.getGraphY());\n\t\t\tthis.connectionHandler.edgeState = this.connectionHandler.createEdgeState(me);\n\t\t\tthis.connectionHandler.previous = state;\n\t\t\tthis.connectionHandler.fireEvent(new mxEventObject(mxEvent.START, 'state', this.connectionHandler.previous));\n\t\t}\n\t}\n};\n\n/**\n * Function: scrollPointToVisible\n * \n * Scrolls the graph to the given point, extending the graph container if\n * specified.\n */\nmxGraph.prototype.scrollPointToVisible = function(x, y, extend, border)\n{\n\tif (!this.timerAutoScroll && (this.ignoreScrollbars || mxUtils.hasScrollbars(this.container)))\n\t{\n\t\tvar c = this.container;\n\t\tborder = (border != null) ? border : 20;\n\t\t\n\t\tif (x >= c.scrollLeft && y >= c.scrollTop && x <= c.scrollLeft + c.clientWidth &&\n\t\t\ty <= c.scrollTop + c.clientHeight)\n\t\t{\n\t\t\tvar dx = c.scrollLeft + c.clientWidth - x;\n\t\t\t\n\t\t\tif (dx < border)\n\t\t\t{\n\t\t\t\tvar old = c.scrollLeft;\n\t\t\t\tc.scrollLeft += border - dx;\n\n\t\t\t\t// Automatically extends the canvas size to the bottom, right\n\t\t\t\t// if the event is outside of the canvas and the edge of the\n\t\t\t\t// canvas has been reached. Notes: Needs fix for IE.\n\t\t\t\tif (extend && old == c.scrollLeft)\n\t\t\t\t{\n\t\t\t\t\tif (this.dialect == mxConstants.DIALECT_SVG)\n\t\t\t\t\t{\n\t\t\t\t\t\tvar root = this.view.getDrawPane().ownerSVGElement;\n\t\t\t\t\t\tvar width = this.container.scrollWidth + border - dx;\n\t\t\t\t\t\t\n\t\t\t\t\t\t// Updates the clipping region. This is an expensive\n\t\t\t\t\t\t// operation that should not be executed too often.\n\t\t\t\t\t\troot.style.width = width + 'px';\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tvar width = Math.max(c.clientWidth, c.scrollWidth) + border - dx;\n\t\t\t\t\t\tvar canvas = this.view.getCanvas();\n\t\t\t\t\t\tcanvas.style.width = width + 'px';\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tc.scrollLeft += border - dx;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tdx = x - c.scrollLeft;\n\t\t\t\t\n\t\t\t\tif (dx < border)\n\t\t\t\t{\n\t\t\t\t\tc.scrollLeft -= border - dx;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tvar dy = c.scrollTop + c.clientHeight - y;\n\t\t\t\n\t\t\tif (dy < border)\n\t\t\t{\n\t\t\t\tvar old = c.scrollTop;\n\t\t\t\tc.scrollTop += border - dy;\n\n\t\t\t\tif (old == c.scrollTop && extend)\n\t\t\t\t{\n\t\t\t\t\tif (this.dialect == mxConstants.DIALECT_SVG)\n\t\t\t\t\t{\n\t\t\t\t\t\tvar root = this.view.getDrawPane().ownerSVGElement;\n\t\t\t\t\t\tvar height = this.container.scrollHeight + border - dy;\n\t\t\t\t\t\t\n\t\t\t\t\t\t// Updates the clipping region. This is an expensive\n\t\t\t\t\t\t// operation that should not be executed too often.\n\t\t\t\t\t\troot.style.height = height + 'px';\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tvar height = Math.max(c.clientHeight, c.scrollHeight) + border - dy;\n\t\t\t\t\t\tvar canvas = this.view.getCanvas();\n\t\t\t\t\t\tcanvas.style.height = height + 'px';\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tc.scrollTop += border - dy;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tdy = y - c.scrollTop;\n\t\t\t\t\n\t\t\t\tif (dy < border)\n\t\t\t\t{\n\t\t\t\t\tc.scrollTop -= border - dy;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\telse if (this.allowAutoPanning && !this.panningHandler.isActive())\n\t{\n\t\tif (this.panningManager == null)\n\t\t{\n\t\t\tthis.panningManager = this.createPanningManager();\n\t\t}\n\n\t\tthis.panningManager.panTo(x + this.panDx, y + this.panDy);\n\t}\n};\n\n\n/**\n * Function: createPanningManager\n * \n * Creates and returns an <mxPanningManager>.\n */\nmxGraph.prototype.createPanningManager = function()\n{\n\treturn new mxPanningManager(this);\n};\n\n/**\n * Function: getBorderSizes\n * \n * Returns the size of the border and padding on all four sides of the\n * container. The left, top, right and bottom borders are stored in the x, y,\n * width and height of the returned <mxRectangle>, respectively.\n */\nmxGraph.prototype.getBorderSizes = function()\n{\n\tvar css = mxUtils.getCurrentStyle(this.container);\n\t\n\treturn new mxRectangle(mxUtils.parseCssNumber(css.paddingLeft) +\n\t\t\t((css.borderLeftStyle != 'none') ? mxUtils.parseCssNumber(css.borderLeftWidth) : 0),\n\t\tmxUtils.parseCssNumber(css.paddingTop) +\n\t\t\t((css.borderTopStyle != 'none') ? mxUtils.parseCssNumber(css.borderTopWidth) : 0),\n\t\tmxUtils.parseCssNumber(css.paddingRight) +\n\t\t\t((css.borderRightStyle != 'none') ? mxUtils.parseCssNumber(css.borderRightWidth) : 0),\n\t\tmxUtils.parseCssNumber(css.paddingBottom) +\n\t\t\t((css.borderBottomStyle != 'none') ? mxUtils.parseCssNumber(css.borderBottomWidth) : 0));\n};\n\n/**\n * Function: getPreferredPageSize\n * \n * Returns the preferred size of the background page if <preferPageSize> is true.\n */\nmxGraph.prototype.getPreferredPageSize = function(bounds, width, height)\n{\n\tvar scale = this.view.scale;\n\tvar tr = this.view.translate;\n\tvar fmt = this.pageFormat;\n\tvar ps = this.pageScale;\n\tvar page = new mxRectangle(0, 0, Math.ceil(fmt.width * ps), Math.ceil(fmt.height * ps));\n\t\n\tvar hCount = (this.pageBreaksVisible) ? Math.ceil(width / page.width) : 1;\n\tvar vCount = (this.pageBreaksVisible) ? Math.ceil(height / page.height) : 1;\n\t\n\treturn new mxRectangle(0, 0, hCount * page.width + 2 + tr.x, vCount * page.height + 2 + tr.y);\n};\n\n/**\n * Function: fit\n *\n * Scales the graph such that the complete diagram fits into <container> and\n * returns the current scale in the view. To fit an initial graph prior to\n * rendering, set <mxGraphView.rendering> to false prior to changing the model\n * and execute the following after changing the model.\n * \n * (code)\n * graph.fit();\n * graph.view.rendering = true;\n * graph.refresh();\n * (end)\n * \n * To fit and center the graph, the following code can be used.\n * \n * (code)\n * var margin = 2;\n * var max = 3;\n * \n * var bounds = graph.getGraphBounds();\n * var cw = graph.container.clientWidth - margin;\n * var ch = graph.container.clientHeight - margin;\n * var w = bounds.width / graph.view.scale;\n * var h = bounds.height / graph.view.scale;\n * var s = Math.min(max, Math.min(cw / w, ch / h));\n * \n * graph.view.scaleAndTranslate(s,\n *   (margin + cw - w * s) / (2 * s) - bounds.x / graph.view.scale,\n *   (margin + ch - h * s) / (2 * s) - bounds.y / graph.view.scale);\n * (end)\n * \n * Parameters:\n * \n * border - Optional number that specifies the border. Default is <border>.\n * keepOrigin - Optional boolean that specifies if the translate should be\n * changed. Default is false.\n * margin - Optional margin in pixels. Default is 0.\n * enabled - Optional boolean that specifies if the scale should be set or\n * just returned. Default is true.\n * ignoreWidth - Optional boolean that specifies if the width should be\n * ignored. Default is false.\n * ignoreHeight - Optional boolean that specifies if the height should be\n * ignored. Default is false.\n * maxHeight - Optional maximum height.\n */\nmxGraph.prototype.fit = function(border, keepOrigin, margin, enabled, ignoreWidth, ignoreHeight, maxHeight)\n{\n\tif (this.container != null)\n\t{\n\t\tborder = (border != null) ? border : this.getBorder();\n\t\tkeepOrigin = (keepOrigin != null) ? keepOrigin : false;\n\t\tmargin = (margin != null) ? margin : 0;\n\t\tenabled = (enabled != null) ? enabled : true;\n\t\tignoreWidth = (ignoreWidth != null) ? ignoreWidth : false;\n\t\tignoreHeight = (ignoreHeight != null) ? ignoreHeight : false;\n\t\t\n\t\t// Adds spacing and border from css\n\t\tvar cssBorder = this.getBorderSizes();\n\t\tvar w1 = this.container.offsetWidth - cssBorder.x - cssBorder.width - 1;\n\t\tvar h1 = (maxHeight != null) ? maxHeight : this.container.offsetHeight - cssBorder.y - cssBorder.height - 1;\n\t\tvar bounds = this.view.getGraphBounds();\n\t\t\n\t\tif (bounds.width > 0 && bounds.height > 0)\n\t\t{\n\t\t\tif (keepOrigin && bounds.x != null && bounds.y != null)\n\t\t\t{\n\t\t\t\tbounds = bounds.clone();\n\t\t\t\tbounds.width += bounds.x;\n\t\t\t\tbounds.height += bounds.y;\n\t\t\t\tbounds.x = 0;\n\t\t\t\tbounds.y = 0;\n\t\t\t}\n\t\t\t\n\t\t\t// LATER: Use unscaled bounding boxes to fix rounding errors\n\t\t\tvar s = this.view.scale;\n\t\t\tvar w2 = bounds.width / s;\n\t\t\tvar h2 = bounds.height / s;\n\t\t\t\n\t\t\t// Fits to the size of the background image if required\n\t\t\tif (this.backgroundImage != null)\n\t\t\t{\n\t\t\t\tw2 = Math.max(w2, this.backgroundImage.width - bounds.x / s);\n\t\t\t\th2 = Math.max(h2, this.backgroundImage.height - bounds.y / s);\n\t\t\t}\n\t\t\t\n\t\t\tvar b = ((keepOrigin) ? border : 2 * border) + margin + 1;\n\n\t\t\tw1 -= b;\n\t\t\th1 -= b;\n\t\t\t\n\t\t\tvar s2 = (((ignoreWidth) ? h1 / h2 : (ignoreHeight) ? w1 / w2 :\n\t\t\t\tMath.min(w1 / w2, h1 / h2)));\n\t\t\t\n\t\t\tif (this.minFitScale != null)\n\t\t\t{\n\t\t\t\ts2 = Math.max(s2, this.minFitScale);\n\t\t\t}\n\t\t\t\n\t\t\tif (this.maxFitScale != null)\n\t\t\t{\n\t\t\t\ts2 = Math.min(s2, this.maxFitScale);\n\t\t\t}\n\t\n\t\t\tif (enabled)\n\t\t\t{\n\t\t\t\tif (!keepOrigin)\n\t\t\t\t{\n\t\t\t\t\tif (!mxUtils.hasScrollbars(this.container))\n\t\t\t\t\t{\n\t\t\t\t\t\tvar x0 = (bounds.x != null) ? Math.floor(this.view.translate.x - bounds.x / s + border / s2 + margin / 2) : border;\n\t\t\t\t\t\tvar y0 = (bounds.y != null) ? Math.floor(this.view.translate.y - bounds.y / s + border / s2 + margin / 2) : border;\n\n\t\t\t\t\t\tthis.view.scaleAndTranslate(s2, x0, y0);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tthis.view.setScale(s2);\n\t\t\t\t\t\tvar b2 = this.getGraphBounds();\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (b2.x != null)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tthis.container.scrollLeft = b2.x;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (b2.y != null)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tthis.container.scrollTop = b2.y;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if (this.view.scale != s2)\n\t\t\t\t{\n\t\t\t\t\tthis.view.setScale(s2);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn s2;\n\t\t\t}\n\t\t}\n\t}\n\n\treturn this.view.scale;\n};\n\n/**\n * Function: sizeDidChange\n * \n * Called when the size of the graph has changed. This implementation fires\n * a <size> event after updating the clipping region of the SVG element in\n * SVG-bases browsers.\n */\nmxGraph.prototype.sizeDidChange = function()\n{\n\tvar bounds = this.getGraphBounds();\n\t\n\tif (this.container != null)\n\t{\n\t\tvar border = this.getBorder();\n\t\t\n\t\tvar width = Math.max(0, bounds.x + bounds.width + 2 * border * this.view.scale);\n\t\tvar height = Math.max(0, bounds.y + bounds.height + 2 * border * this.view.scale);\n\t\t\n\t\tif (this.minimumContainerSize != null)\n\t\t{\n\t\t\twidth = Math.max(width, this.minimumContainerSize.width);\n\t\t\theight = Math.max(height, this.minimumContainerSize.height);\n\t\t}\n\n\t\tif (this.resizeContainer)\n\t\t{\n\t\t\tthis.doResizeContainer(width, height);\n\t\t}\n\n\t\tif (this.preferPageSize || (!mxClient.IS_IE && this.pageVisible))\n\t\t{\n\t\t\tvar size = this.getPreferredPageSize(bounds, Math.max(1, width), Math.max(1, height));\n\t\t\t\n\t\t\tif (size != null)\n\t\t\t{\n\t\t\t\twidth = size.width * this.view.scale;\n\t\t\t\theight = size.height * this.view.scale;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (this.minimumGraphSize != null)\n\t\t{\n\t\t\twidth = Math.max(width, this.minimumGraphSize.width * this.view.scale);\n\t\t\theight = Math.max(height, this.minimumGraphSize.height * this.view.scale);\n\t\t}\n\n\t\twidth = Math.ceil(width);\n\t\theight = Math.ceil(height);\n\n\t\tif (this.dialect == mxConstants.DIALECT_SVG)\n\t\t{\n\t\t\tvar root = this.view.getDrawPane().ownerSVGElement;\n\t\t\t\n\t\t\troot.style.minWidth = Math.max(1, width) + 'px';\n\t\t\troot.style.minHeight = Math.max(1, height) + 'px';\n\t\t\troot.style.width = '100%';\n\t\t\troot.style.height = '100%';\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif (mxClient.IS_QUIRKS)\n\t\t\t{\n\t\t\t\t// Quirks mode does not support minWidth/-Height\n\t\t\t\tthis.view.updateHtmlCanvasSize(Math.max(1, width), Math.max(1, height));\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tthis.view.canvas.style.minWidth = Math.max(1, width) + 'px';\n\t\t\t\tthis.view.canvas.style.minHeight = Math.max(1, height) + 'px';\n\t\t\t}\n\t\t}\n\t\t\n\t\tthis.updatePageBreaks(this.pageBreaksVisible, width, height);\n\t}\n\n\tthis.fireEvent(new mxEventObject(mxEvent.SIZE, 'bounds', bounds));\n};\n\n/**\n * Function: doResizeContainer\n * \n * Resizes the container for the given graph width and height.\n */\nmxGraph.prototype.doResizeContainer = function(width, height)\n{\n\tif (this.maximumContainerSize != null)\n\t{\n\t\twidth = Math.min(this.maximumContainerSize.width, width);\n\t\theight = Math.min(this.maximumContainerSize.height, height);\n\t}\n\n\tthis.container.style.width = Math.ceil(width) + 'px';\n\tthis.container.style.height = Math.ceil(height) + 'px';\n};\n\n/**\n * Function: updatePageBreaks\n * \n * Invokes from <sizeDidChange> to redraw the page breaks.\n * \n * Parameters:\n * \n * visible - Boolean that specifies if page breaks should be shown.\n * width - Specifies the width of the container in pixels.\n * height - Specifies the height of the container in pixels.\n */\nmxGraph.prototype.updatePageBreaks = function(visible, width, height)\n{\n\tvar scale = this.view.scale;\n\tvar tr = this.view.translate;\n\tvar fmt = this.pageFormat;\n\tvar ps = scale * this.pageScale;\n\tvar bounds = new mxRectangle(0, 0, fmt.width * ps, fmt.height * ps);\n\n\tvar gb = mxRectangle.fromRectangle(this.getGraphBounds());\n\tgb.width = Math.max(1, gb.width);\n\tgb.height = Math.max(1, gb.height);\n\t\n\tbounds.x = Math.floor((gb.x - tr.x * scale) / bounds.width) * bounds.width + tr.x * scale;\n\tbounds.y = Math.floor((gb.y - tr.y * scale) / bounds.height) * bounds.height + tr.y * scale;\n\t\n\tgb.width = Math.ceil((gb.width + (gb.x - bounds.x)) / bounds.width) * bounds.width;\n\tgb.height = Math.ceil((gb.height + (gb.y - bounds.y)) / bounds.height) * bounds.height;\n\t\n\t// Does not show page breaks if the scale is too small\n\tvisible = visible && Math.min(bounds.width, bounds.height) > this.minPageBreakDist;\n\n\tvar horizontalCount = (visible) ? Math.ceil(gb.height / bounds.height) + 1 : 0;\n\tvar verticalCount = (visible) ? Math.ceil(gb.width / bounds.width) + 1 : 0;\n\tvar right = (verticalCount - 1) * bounds.width;\n\tvar bottom = (horizontalCount - 1) * bounds.height;\n\t\n\tif (this.horizontalPageBreaks == null && horizontalCount > 0)\n\t{\n\t\tthis.horizontalPageBreaks = [];\n\t}\n\n\tif (this.verticalPageBreaks == null && verticalCount > 0)\n\t{\n\t\tthis.verticalPageBreaks = [];\n\t}\n\t\n\tvar drawPageBreaks = mxUtils.bind(this, function(breaks)\n\t{\n\t\tif (breaks != null)\n\t\t{\n\t\t\tvar count = (breaks == this.horizontalPageBreaks) ? horizontalCount : verticalCount; \n\t\t\t\n\t\t\tfor (var i = 0; i <= count; i++)\n\t\t\t{\n\t\t\t\tvar pts = (breaks == this.horizontalPageBreaks) ?\n\t\t\t\t\t[new mxPoint(Math.round(bounds.x), Math.round(bounds.y + i * bounds.height)),\n\t\t\t         new mxPoint(Math.round(bounds.x + right), Math.round(bounds.y + i * bounds.height))] :\n\t\t\t        [new mxPoint(Math.round(bounds.x + i * bounds.width), Math.round(bounds.y)),\n\t\t\t         new mxPoint(Math.round(bounds.x + i * bounds.width), Math.round(bounds.y + bottom))];\n\n\t\t\t\tif (breaks[i] != null)\n\t\t\t\t{\n\t\t\t\t\tbreaks[i].points = pts;\n\t\t\t\t\tbreaks[i].redraw();\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tvar pageBreak = new mxPolyline(pts, this.pageBreakColor);\n\t\t\t\t\tpageBreak.dialect = this.dialect;\n\t\t\t\t\tpageBreak.pointerEvents = false;\n\t\t\t\t\tpageBreak.isDashed = this.pageBreakDashed;\n\t\t\t\t\tpageBreak.init(this.view.backgroundPane);\n\t\t\t\t\tpageBreak.redraw();\n\t\t\t\t\t\n\t\t\t\t\tbreaks[i] = pageBreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tfor (var i = count; i < breaks.length; i++)\n\t\t\t{\n\t\t\t\tbreaks[i].destroy();\n\t\t\t}\n\t\t\t\n\t\t\tbreaks.splice(count, breaks.length - count);\n\t\t}\n\t});\n\t\n\tdrawPageBreaks(this.horizontalPageBreaks);\n\tdrawPageBreaks(this.verticalPageBreaks);\n};\n\n/**\n * Group: Cell styles\n */\n\n/**\n * Function: getCellStyle\n * \n * Returns an array of key, value pairs representing the cell style for the\n * given cell. If no string is defined in the model that specifies the\n * style, then the default style for the cell is returned or <EMPTY_ARRAY>,\n * if not style can be found. Note: You should try and get the cell state\n * for the given cell and use the cached style in the state before using\n * this method.\n * \n * Parameters:\n * \n * cell - <mxCell> whose style should be returned as an array.\n */\nmxGraph.prototype.getCellStyle = function(cell)\n{\n\tvar stylename = this.model.getStyle(cell);\n\tvar style = null;\n\t\n\t// Gets the default style for the cell\n\tif (this.model.isEdge(cell))\n\t{\n\t\tstyle = this.stylesheet.getDefaultEdgeStyle();\n\t}\n\telse\n\t{\n\t\tstyle = this.stylesheet.getDefaultVertexStyle();\n\t}\n\t\n\t// Resolves the stylename using the above as the default\n\tif (stylename != null)\n\t{\n\t\tstyle = this.postProcessCellStyle(this.stylesheet.getCellStyle(stylename, style));\n\t}\n\t\n\t// Returns a non-null value if no style can be found\n\tif (style == null)\n\t{\n\t\tstyle = mxGraph.prototype.EMPTY_ARRAY;\n\t}\n\t\n\treturn style;\n};\n\n/**\n * Function: postProcessCellStyle\n * \n * Tries to resolve the value for the image style in the image bundles and\n * turns short data URIs as defined in mxImageBundle to data URIs as\n * defined in RFC 2397 of the IETF.\n */\nmxGraph.prototype.postProcessCellStyle = function(style)\n{\n\tif (style != null)\n\t{\n\t\tvar key = style[mxConstants.STYLE_IMAGE];\n\t\tvar image = this.getImageFromBundles(key);\n\n\t\tif (image != null)\n\t\t{\n\t\t\tstyle[mxConstants.STYLE_IMAGE] = image;\n\t\t}\n\t\telse\n\t\t{\n\t\t\timage = key;\n\t\t}\n\t\t\n\t\t// Converts short data uris to normal data uris\n\t\tif (image != null && image.substring(0, 11) == 'data:image/')\n\t\t{\n\t\t\tif (image.substring(0, 20) == 'data:image/svg+xml,<')\n\t\t\t{\n\t\t\t\t// Required for FF and IE11\n\t\t\t\timage = image.substring(0, 19) + encodeURIComponent(image.substring(19));\n\t\t\t}\n\t\t\telse if (image.substring(0, 22) != 'data:image/svg+xml,%3C')\n\t\t\t{\n\t\t\t\tvar comma = image.indexOf(',');\n\t\t\t\t\n\t\t\t\t// Adds base64 encoding prefix if needed\n\t\t\t\tif (comma > 0 && image.substring(comma - 7, comma + 1) != ';base64,')\n\t\t\t\t{\n\t\t\t\t\timage = image.substring(0, comma) + ';base64,'\n\t\t\t\t\t\t+ image.substring(comma + 1);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tstyle[mxConstants.STYLE_IMAGE] = image;\n\t\t}\n\t}\n\n\treturn style;\n};\n\n/**\n * Function: setCellStyle\n * \n * Sets the style of the specified cells. If no cells are given, then the\n * selection cells are changed.\n * \n * Parameters:\n * \n * style - String representing the new style of the cells.\n * cells - Optional array of <mxCells> to set the style for. Default is the\n * selection cells.\n */\nmxGraph.prototype.setCellStyle = function(style, cells)\n{\n\tcells = cells || this.getSelectionCells();\n\t\n\tif (cells != null)\n\t{\n\t\tthis.model.beginUpdate();\n\t\ttry\n\t\t{\n\t\t\tfor (var i = 0; i < cells.length; i++)\n\t\t\t{\n\t\t\t\tthis.model.setStyle(cells[i], style);\n\t\t\t}\n\t\t}\n\t\tfinally\n\t\t{\n\t\t\tthis.model.endUpdate();\n\t\t}\n\t}\n};\n\n/**\n * Function: toggleCellStyle\n * \n * Toggles the boolean value for the given key in the style of the given cell\n * and returns the new value as 0 or 1. If no cell is specified then the\n * selection cell is used.\n * \n * Parameter:\n * \n * key - String representing the key for the boolean value to be toggled.\n * defaultValue - Optional boolean default value if no value is defined.\n * Default is false.\n * cell - Optional <mxCell> whose style should be modified. Default is\n * the selection cell.\n */\nmxGraph.prototype.toggleCellStyle = function(key, defaultValue, cell)\n{\n\tcell = cell || this.getSelectionCell();\n\t\n\treturn this.toggleCellStyles(key, defaultValue, [cell]);\n};\n\n/**\n * Function: toggleCellStyles\n * \n * Toggles the boolean value for the given key in the style of the given cells\n * and returns the new value as 0 or 1. If no cells are specified, then the\n * selection cells are used. For example, this can be used to toggle\n * <mxConstants.STYLE_ROUNDED> or any other style with a boolean value.\n * \n * Parameter:\n * \n * key - String representing the key for the boolean value to be toggled.\n * defaultValue - Optional boolean default value if no value is defined.\n * Default is false.\n * cells - Optional array of <mxCells> whose styles should be modified.\n * Default is the selection cells.\n */\nmxGraph.prototype.toggleCellStyles = function(key, defaultValue, cells)\n{\n\tdefaultValue = (defaultValue != null) ? defaultValue : false;\n\tcells = cells || this.getSelectionCells();\n\tvar value = null;\n\t\n\tif (cells != null && cells.length > 0)\n\t{\n\t\tvar state = this.view.getState(cells[0]);\n\t\tvar style = (state != null) ? state.style : this.getCellStyle(cells[0]);\n\t\t\n\t\tif (style != null)\n\t\t{\n\t\t\tvalue = (mxUtils.getValue(style, key, defaultValue)) ? 0 : 1;\n\t\t\tthis.setCellStyles(key, value, cells);\n\t\t}\n\t}\n\t\n\treturn value;\n};\n\n/**\n * Function: setCellStyles\n * \n * Sets the key to value in the styles of the given cells. This will modify\n * the existing cell styles in-place and override any existing assignment\n * for the given key. If no cells are specified, then the selection cells\n * are changed. If no value is specified, then the respective key is\n * removed from the styles.\n * \n * Parameters:\n * \n * key - String representing the key to be assigned.\n * value - String representing the new value for the key.\n * cells - Optional array of <mxCells> to change the style for. Default is\n * the selection cells.\n */\nmxGraph.prototype.setCellStyles = function(key, value, cells)\n{\n\tcells = cells || this.getSelectionCells();\n\tmxUtils.setCellStyles(this.model, cells, key, value);\n};\n\n/**\n * Function: toggleCellStyleFlags\n * \n * Toggles the given bit for the given key in the styles of the specified\n * cells.\n * \n * Parameters:\n * \n * key - String representing the key to toggle the flag in.\n * flag - Integer that represents the bit to be toggled.\n * cells - Optional array of <mxCells> to change the style for. Default is\n * the selection cells.\n */\nmxGraph.prototype.toggleCellStyleFlags = function(key, flag, cells)\n{\n\tthis.setCellStyleFlags(key, flag, null, cells);\n};\n\n/**\n * Function: setCellStyleFlags\n * \n * Sets or toggles the given bit for the given key in the styles of the\n * specified cells.\n * \n * Parameters:\n * \n * key - String representing the key to toggle the flag in.\n * flag - Integer that represents the bit to be toggled.\n * value - Boolean value to be used or null if the value should be toggled.\n * cells - Optional array of <mxCells> to change the style for. Default is\n * the selection cells.\n */\nmxGraph.prototype.setCellStyleFlags = function(key, flag, value, cells)\n{\n\tcells = cells || this.getSelectionCells();\n\t\n\tif (cells != null && cells.length > 0)\n\t{\n\t\tif (value == null)\n\t\t{\n\t\t\tvar state = this.view.getState(cells[0]);\n\t\t\tvar style = (state != null) ? state.style : this.getCellStyle(cells[0]);\n\t\t\t\n\t\t\tif (style != null)\n\t\t\t{\n\t\t\t\tvar current = parseInt(style[key] || 0);\n\t\t\t\tvalue = !((current & flag) == flag);\n\t\t\t}\n\t\t}\n\n\t\tmxUtils.setCellStyleFlags(this.model, cells, key, flag, value);\n\t}\n};\n\n/**\n * Group: Cell alignment and orientation\n */\n\n/**\n * Function: alignCells\n * \n * Aligns the given cells vertically or horizontally according to the given\n * alignment using the optional parameter as the coordinate.\n * \n * Parameters:\n * \n * align - Specifies the alignment. Possible values are all constants in\n * mxConstants with an ALIGN prefix.\n * cells - Array of <mxCells> to be aligned.\n * param - Optional coordinate for the alignment.\n */\nmxGraph.prototype.alignCells = function(align, cells, param)\n{\n\tif (cells == null)\n\t{\n\t\tcells = this.getSelectionCells();\n\t}\n\t\n\tif (cells != null && cells.length > 1)\n\t{\n\t\t// Finds the required coordinate for the alignment\n\t\tif (param == null)\n\t\t{\n\t\t\tfor (var i = 0; i < cells.length; i++)\n\t\t\t{\n\t\t\t\tvar state = this.view.getState(cells[i]);\n\t\t\t\t\n\t\t\t\tif (state != null && !this.model.isEdge(cells[i]))\n\t\t\t\t{\n\t\t\t\t\tif (param == null)\n\t\t\t\t\t{\n\t\t\t\t\t\tif (align == mxConstants.ALIGN_CENTER)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tparam = state.x + state.width / 2;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if (align == mxConstants.ALIGN_RIGHT)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tparam = state.x + state.width;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if (align == mxConstants.ALIGN_TOP)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tparam = state.y;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if (align == mxConstants.ALIGN_MIDDLE)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tparam = state.y + state.height / 2;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if (align == mxConstants.ALIGN_BOTTOM)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tparam = state.y + state.height;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tparam = state.x;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tif (align == mxConstants.ALIGN_RIGHT)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tparam = Math.max(param, state.x + state.width);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if (align == mxConstants.ALIGN_TOP)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tparam = Math.min(param, state.y);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if (align == mxConstants.ALIGN_BOTTOM)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tparam = Math.max(param, state.y + state.height);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tparam = Math.min(param, state.x);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Aligns the cells to the coordinate\n\t\tif (param != null)\n\t\t{\n\t\t\tvar s = this.view.scale;\n\n\t\t\tthis.model.beginUpdate();\n\t\t\ttry\n\t\t\t{\n\t\t\t\tfor (var i = 0; i < cells.length; i++)\n\t\t\t\t{\n\t\t\t\t\tvar state = this.view.getState(cells[i]);\n\t\t\t\t\t\n\t\t\t\t\tif (state != null)\n\t\t\t\t\t{\n\t\t\t\t\t\tvar geo = this.getCellGeometry(cells[i]);\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (geo != null && !this.model.isEdge(cells[i]))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tgeo = geo.clone();\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif (align == mxConstants.ALIGN_CENTER)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tgeo.x += (param - state.x - state.width / 2) / s;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse if (align == mxConstants.ALIGN_RIGHT)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tgeo.x += (param - state.x - state.width) / s;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse if (align == mxConstants.ALIGN_TOP)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tgeo.y += (param - state.y) / s;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse if (align == mxConstants.ALIGN_MIDDLE)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tgeo.y += (param - state.y - state.height / 2) / s;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse if (align == mxConstants.ALIGN_BOTTOM)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tgeo.y += (param - state.y - state.height) / s;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tgeo.x += (param - state.x) / s;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tthis.resizeCell(cells[i], geo);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tthis.fireEvent(new mxEventObject(mxEvent.ALIGN_CELLS,\n\t\t\t\t\t\t'align', align, 'cells', cells));\n\t\t\t}\n\t\t\tfinally\n\t\t\t{\n\t\t\t\tthis.model.endUpdate();\n\t\t\t}\n\t\t}\n\t}\n\t\n\treturn cells;\n};\n\n/**\n * Function: flipEdge\n * \n * Toggles the style of the given edge between null (or empty) and\n * <alternateEdgeStyle>. This method fires <mxEvent.FLIP_EDGE> while the\n * transaction is in progress. Returns the edge that was flipped.\n * \n * Here is an example that overrides this implementation to invert the\n * value of <mxConstants.STYLE_ELBOW> without removing any existing styles.\n * \n * (code)\n * graph.flipEdge = function(edge)\n * {\n *   if (edge != null)\n *   {\n *     var state = this.view.getState(edge);\n *     var style = (state != null) ? state.style : this.getCellStyle(edge);\n *     \n *     if (style != null)\n *     {\n *       var elbow = mxUtils.getValue(style, mxConstants.STYLE_ELBOW,\n *           mxConstants.ELBOW_HORIZONTAL);\n *       var value = (elbow == mxConstants.ELBOW_HORIZONTAL) ?\n *           mxConstants.ELBOW_VERTICAL : mxConstants.ELBOW_HORIZONTAL;\n *       this.setCellStyles(mxConstants.STYLE_ELBOW, value, [edge]);\n *     }\n *   }\n * };\n * (end)\n * \n * Parameters:\n * \n * edge - <mxCell> whose style should be changed.\n */\nmxGraph.prototype.flipEdge = function(edge)\n{\n\tif (edge != null &&\n\t\tthis.alternateEdgeStyle != null)\n\t{\n\t\tthis.model.beginUpdate();\n\t\ttry\n\t\t{\n\t\t\tvar style = this.model.getStyle(edge);\n\n\t\t\tif (style == null || style.length == 0)\n\t\t\t{\n\t\t\t\tthis.model.setStyle(edge, this.alternateEdgeStyle);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tthis.model.setStyle(edge, null);\n\t\t\t}\n\n\t\t\t// Removes all existing control points\n\t\t\tthis.resetEdge(edge);\n\t\t\tthis.fireEvent(new mxEventObject(mxEvent.FLIP_EDGE, 'edge', edge));\n\t\t}\n\t\tfinally\n\t\t{\n\t\t\tthis.model.endUpdate();\n\t\t}\n\t}\n\n\treturn edge;\n};\n\n/**\n * Function: addImageBundle\n *\n * Adds the specified <mxImageBundle>.\n */\nmxGraph.prototype.addImageBundle = function(bundle)\n{\n\tthis.imageBundles.push(bundle);\n};\n\n/**\n * Function: removeImageBundle\n * \n * Removes the specified <mxImageBundle>.\n */\nmxGraph.prototype.removeImageBundle = function(bundle)\n{\n\tvar tmp = [];\n\t\n\tfor (var i = 0; i < this.imageBundles.length; i++)\n\t{\n\t\tif (this.imageBundles[i] != bundle)\n\t\t{\n\t\t\ttmp.push(this.imageBundles[i]);\n\t\t}\n\t}\n\t\n\tthis.imageBundles = tmp;\n};\n\n/**\n * Function: getImageFromBundles\n *\n * Searches all <imageBundles> for the specified key and returns the value\n * for the first match or null if the key is not found.\n */\nmxGraph.prototype.getImageFromBundles = function(key)\n{\n\tif (key != null)\n\t{\n\t\tfor (var i = 0; i < this.imageBundles.length; i++)\n\t\t{\n\t\t\tvar image = this.imageBundles[i].getImage(key);\n\t\t\t\n\t\t\tif (image != null)\n\t\t\t{\n\t\t\t\treturn image;\n\t\t\t}\n\t\t}\n\t}\n\t\n\treturn null;\n};\n\n/**\n * Group: Order\n */\n\n/**\n * Function: orderCells\n * \n * Moves the given cells to the front or back. The change is carried out\n * using <cellsOrdered>. This method fires <mxEvent.ORDER_CELLS> while the\n * transaction is in progress.\n * \n * Parameters:\n * \n * back - Boolean that specifies if the cells should be moved to back.\n * cells - Array of <mxCells> to move to the background. If null is\n * specified then the selection cells are used.\n */\nmxGraph.prototype.orderCells = function(back, cells)\n{\n\tif (cells == null)\n\t{\n\t\tcells = mxUtils.sortCells(this.getSelectionCells(), true);\n\t}\n\n\tthis.model.beginUpdate();\n\ttry\n\t{\n\t\tthis.cellsOrdered(cells, back);\n\t\tthis.fireEvent(new mxEventObject(mxEvent.ORDER_CELLS,\n\t\t\t\t'back', back, 'cells', cells));\n\t}\n\tfinally\n\t{\n\t\tthis.model.endUpdate();\n\t}\n\n\treturn cells;\n};\n\n/**\n * Function: cellsOrdered\n * \n * Moves the given cells to the front or back. This method fires\n * <mxEvent.CELLS_ORDERED> while the transaction is in progress.\n * \n * Parameters:\n * \n * cells - Array of <mxCells> whose order should be changed.\n * back - Boolean that specifies if the cells should be moved to back.\n */\nmxGraph.prototype.cellsOrdered = function(cells, back)\n{\n\tif (cells != null)\n\t{\n\t\tthis.model.beginUpdate();\n\t\ttry\n\t\t{\n\t\t\tfor (var i = 0; i < cells.length; i++)\n\t\t\t{\n\t\t\t\tvar parent = this.model.getParent(cells[i]);\n\n\t\t\t\tif (back)\n\t\t\t\t{\n\t\t\t\t\tthis.model.add(parent, cells[i], i);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tthis.model.add(parent, cells[i],\n\t\t\t\t\t\t\tthis.model.getChildCount(parent) - 1);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tthis.fireEvent(new mxEventObject(mxEvent.CELLS_ORDERED,\n\t\t\t\t\t'back', back, 'cells', cells));\n\t\t}\n\t\tfinally\n\t\t{\n\t\t\tthis.model.endUpdate();\n\t\t}\n\t}\n};\n\n/**\n * Group: Grouping\n */\n\n/**\n * Function: groupCells\n * \n * Adds the cells into the given group. The change is carried out using\n * <cellsAdded>, <cellsMoved> and <cellsResized>. This method fires\n * <mxEvent.GROUP_CELLS> while the transaction is in progress. Returns the\n * new group. A group is only created if there is at least one entry in the\n * given array of cells.\n * \n * Parameters:\n * \n * group - <mxCell> that represents the target group. If null is specified\n * then a new group is created using <createGroupCell>.\n * border - Optional integer that specifies the border between the child\n * area and the group bounds. Default is 0.\n * cells - Optional array of <mxCells> to be grouped. If null is specified\n * then the selection cells are used.\n */\nmxGraph.prototype.groupCells = function(group, border, cells)\n{\n\tif (cells == null)\n\t{\n\t\tcells = mxUtils.sortCells(this.getSelectionCells(), true);\n\t}\n\n\tcells = this.getCellsForGroup(cells);\n\n\tif (group == null)\n\t{\n\t\tgroup = this.createGroupCell(cells);\n\t}\n\n\tvar bounds = this.getBoundsForGroup(group, cells, border);\n\n\tif (cells.length > 0 && bounds != null)\n\t{\n\t\t// Uses parent of group or previous parent of first child\n\t\tvar parent = this.model.getParent(group);\n\t\t\n\t\tif (parent == null)\n\t\t{\n\t\t\tparent = this.model.getParent(cells[0]);\n\t\t}\n\n\t\tthis.model.beginUpdate();\n\t\ttry\n\t\t{\n\t\t\t// Checks if the group has a geometry and\n\t\t\t// creates one if one does not exist\n\t\t\tif (this.getCellGeometry(group) == null)\n\t\t\t{\n\t\t\t\tthis.model.setGeometry(group, new mxGeometry());\n\t\t\t}\n\n\t\t\t// Adds the group into the parent\n\t\t\tvar index = this.model.getChildCount(parent);\n\t\t\tthis.cellsAdded([group], parent, index, null, null, false, false, false);\n\n\t\t\t// Adds the children into the group and moves\n\t\t\tindex = this.model.getChildCount(group);\n\t\t\tthis.cellsAdded(cells, group, index, null, null, false, false, false);\n\t\t\tthis.cellsMoved(cells, -bounds.x, -bounds.y, false, false, false);\n\n\t\t\t// Resizes the group\n\t\t\tthis.cellsResized([group], [bounds], false);\n\n\t\t\tthis.fireEvent(new mxEventObject(mxEvent.GROUP_CELLS,\n\t\t\t\t\t'group', group, 'border', border, 'cells', cells));\n\t\t}\n\t\tfinally\n\t\t{\n\t\t\tthis.model.endUpdate();\n\t\t}\n\t}\n\n\treturn group;\n};\n\n/**\n * Function: getCellsForGroup\n * \n * Returns the cells with the same parent as the first cell\n * in the given array.\n */\nmxGraph.prototype.getCellsForGroup = function(cells)\n{\n\tvar result = [];\n\n\tif (cells != null && cells.length > 0)\n\t{\n\t\tvar parent = this.model.getParent(cells[0]);\n\t\tresult.push(cells[0]);\n\n\t\t// Filters selection cells with the same parent\n\t\tfor (var i = 1; i < cells.length; i++)\n\t\t{\n\t\t\tif (this.model.getParent(cells[i]) == parent)\n\t\t\t{\n\t\t\t\tresult.push(cells[i]);\n\t\t\t}\n\t\t}\n\t}\n\n\treturn result;\n};\n\n/**\n * Function: getBoundsForGroup\n * \n * Returns the bounds to be used for the given group and children.\n */\nmxGraph.prototype.getBoundsForGroup = function(group, children, border)\n{\n\tvar result = this.getBoundingBoxFromGeometry(children, true);\n\t\n\tif (result != null)\n\t{\n\t\tif (this.isSwimlane(group))\n\t\t{\n\t\t\tvar size = this.getStartSize(group);\n\t\t\t\n\t\t\tresult.x -= size.width;\n\t\t\tresult.y -= size.height;\n\t\t\tresult.width += size.width;\n\t\t\tresult.height += size.height;\n\t\t}\n\t\t\n\t\t// Adds the border\n\t\tif (border != null)\n\t\t{\n\t\t\tresult.x -= border;\n\t\t\tresult.y -= border;\n\t\t\tresult.width += 2 * border;\n\t\t\tresult.height += 2 * border;\n\t\t}\n\t}\t\t\t\n\t\n\treturn result;\n};\n\n/**\n * Function: createGroupCell\n * \n * Hook for creating the group cell to hold the given array of <mxCells> if\n * no group cell was given to the <group> function.\n * \n * The following code can be used to set the style of new group cells.\n * \n * (code)\n * var graphCreateGroupCell = graph.createGroupCell;\n * graph.createGroupCell = function(cells)\n * {\n *   var group = graphCreateGroupCell.apply(this, arguments);\n *   group.setStyle('group');\n *   \n *   return group;\n * };\n */\nmxGraph.prototype.createGroupCell = function(cells)\n{\n\tvar group = new mxCell('');\n\tgroup.setVertex(true);\n\tgroup.setConnectable(false);\n\t\n\treturn group;\n};\n\n/**\n * Function: ungroupCells\n * \n * Ungroups the given cells by moving the children the children to their\n * parents parent and removing the empty groups. Returns the children that\n * have been removed from the groups.\n * \n * Parameters:\n * \n * cells - Array of cells to be ungrouped. If null is specified then the\n * selection cells are used.\n */\nmxGraph.prototype.ungroupCells = function(cells)\n{\n\tvar result = [];\n\t\n\tif (cells == null)\n\t{\n\t\tcells = this.getSelectionCells();\n\n\t\t// Finds the cells with children\n\t\tvar tmp = [];\n\t\t\n\t\tfor (var i = 0; i < cells.length; i++)\n\t\t{\n\t\t\tif (this.model.getChildCount(cells[i]) > 0)\n\t\t\t{\n\t\t\t\ttmp.push(cells[i]);\n\t\t\t}\n\t\t}\n\n\t\tcells = tmp;\n\t}\n\t\n\tif (cells != null && cells.length > 0)\n\t{\n\t\tthis.model.beginUpdate();\n\t\ttry\n\t\t{\n\t\t\tfor (var i = 0; i < cells.length; i++)\n\t\t\t{\n\t\t\t\tvar children = this.model.getChildren(cells[i]);\n\t\t\t\t\n\t\t\t\tif (children != null && children.length > 0)\n\t\t\t\t{\n\t\t\t\t\tchildren = children.slice();\n\t\t\t\t\tvar parent = this.model.getParent(cells[i]);\n\t\t\t\t\tvar index = this.model.getChildCount(parent);\n\n\t\t\t\t\tthis.cellsAdded(children, parent, index, null, null, true);\n\t\t\t\t\tresult = result.concat(children);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tthis.removeCellsAfterUngroup(cells);\n\t\t\tthis.fireEvent(new mxEventObject(mxEvent.UNGROUP_CELLS, 'cells', cells));\n\t\t}\n\t\tfinally\n\t\t{\n\t\t\tthis.model.endUpdate();\n\t\t}\n\t}\n\t\n\treturn result;\n};\n\n/**\n * Function: removeCellsAfterUngroup\n * \n * Hook to remove the groups after <ungroupCells>.\n * \n * Parameters:\n * \n * cells - Array of <mxCells> that were ungrouped.\n */\nmxGraph.prototype.removeCellsAfterUngroup = function(cells)\n{\n\tthis.cellsRemoved(this.addAllEdges(cells));\n};\n\n/**\n * Function: removeCellsFromParent\n * \n * Removes the specified cells from their parents and adds them to the\n * default parent. Returns the cells that were removed from their parents.\n * \n * Parameters:\n * \n * cells - Array of <mxCells> to be removed from their parents.\n */\nmxGraph.prototype.removeCellsFromParent = function(cells)\n{\n\tif (cells == null)\n\t{\n\t\tcells = this.getSelectionCells();\n\t}\n\t\n\tthis.model.beginUpdate();\n\ttry\n\t{\n\t\tvar parent = this.getDefaultParent();\n\t\tvar index = this.model.getChildCount(parent);\n\n\t\tthis.cellsAdded(cells, parent, index, null, null, true);\n\t\tthis.fireEvent(new mxEventObject(mxEvent.REMOVE_CELLS_FROM_PARENT, 'cells', cells));\n\t}\n\tfinally\n\t{\n\t\tthis.model.endUpdate();\n\t}\n\n\treturn cells;\n};\n\n/**\n * Function: updateGroupBounds\n * \n * Updates the bounds of the given groups to include all children and returns\n * the passed-in cells. Call this with the groups in parent to child order,\n * top-most group first, the cells are processed in reverse order and cells\n * with no children are ignored.\n * \n * Parameters:\n * \n * cells - The groups whose bounds should be updated. If this is null, then\n * the selection cells are used.\n * border - Optional border to be added in the group. Default is 0.\n * moveGroup - Optional boolean that allows the group to be moved. Default\n * is false.\n * topBorder - Optional top border to be added in the group. Default is 0.\n * rightBorder - Optional top border to be added in the group. Default is 0.\n * bottomBorder - Optional top border to be added in the group. Default is 0.\n * leftBorder - Optional top border to be added in the group. Default is 0.\n */\nmxGraph.prototype.updateGroupBounds = function(cells, border, moveGroup, topBorder, rightBorder, bottomBorder, leftBorder)\n{\n\tif (cells == null)\n\t{\n\t\tcells = this.getSelectionCells();\n\t}\n\t\n\tborder = (border != null) ? border : 0;\n\tmoveGroup = (moveGroup != null) ? moveGroup : false;\n\ttopBorder = (topBorder != null) ? topBorder : 0;\n\trightBorder = (rightBorder != null) ? rightBorder : 0;\n\tbottomBorder = (bottomBorder != null) ? bottomBorder : 0;\n\tleftBorder = (leftBorder != null) ? leftBorder : 0;\n\n\tthis.model.beginUpdate();\n\ttry\n\t{\n\t\tfor (var i = cells.length - 1; i >= 0; i--)\n\t\t{\n\t\t\tvar geo = this.getCellGeometry(cells[i]);\n\t\t\t\n\t\t\tif (geo != null)\n\t\t\t{\n\t\t\t\tvar children = this.getChildCells(cells[i]);\n\t\t\t\t\n\t\t\t\tif (children != null && children.length > 0)\n\t\t\t\t{\n\t\t\t\t\tvar bounds = this.getBoundingBoxFromGeometry(children, true);\n\t\t\t\t\t\n\t\t\t\t\tif (bounds != null && bounds.width > 0 && bounds.height > 0)\n\t\t\t\t\t{\n\t\t\t\t\t\tvar left = 0;\n\t\t\t\t\t\tvar top = 0;\n\t\t\t\t\t\t\n\t\t\t\t\t\t// Adds the size of the title area for swimlanes\n\t\t\t\t\t\tif (this.isSwimlane(cells[i]))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tvar size = this.getStartSize(cells[i]);\n\t\t\t\t\t\t\tleft = size.width;\n\t\t\t\t\t\t\ttop = size.height;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tgeo = geo.clone();\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (moveGroup)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tgeo.x = Math.round(geo.x + bounds.x - border - left - leftBorder);\n\t\t\t\t\t\t\tgeo.y = Math.round(geo.y + bounds.y - border - top - topBorder);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tgeo.width = Math.round(bounds.width + 2 * border + left + leftBorder + rightBorder);\n\t\t\t\t\t\tgeo.height = Math.round(bounds.height + 2 * border + top + topBorder + bottomBorder);\n\t\t\t\t\t\t\n\t\t\t\t\t\tthis.model.setGeometry(cells[i], geo);\n\t\t\t\t\t\tthis.moveCells(children, border + left - bounds.x + leftBorder,\n\t\t\t\t\t\t\t\tborder + top - bounds.y + topBorder);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\tfinally\n\t{\n\t\tthis.model.endUpdate();\n\t}\n\n\treturn cells;\n};\n\n/**\n * Function: getBoundingBox\n * \n * Returns the bounding box for the given array of <mxCells>. The bounding box for\n * each cell and its descendants is computed using <mxGraphView.getBoundingBox>.\n *\n * Parameters:\n *\n * cells - Array of <mxCells> whose bounding box should be returned.\n */\nmxGraph.prototype.getBoundingBox = function(cells)\n{\n\tvar result = null;\n\t\n\tif (cells != null && cells.length > 0)\n\t{\n\t\tfor (var i = 0; i < cells.length; i++)\n\t\t{\n\t\t\tif (this.model.isVertex(cells[i]) || this.model.isEdge(cells[i]))\n\t\t\t{\n\t\t\t\tvar bbox = this.view.getBoundingBox(this.view.getState(cells[i]), true);\n\t\t\t\n\t\t\t\tif (bbox != null)\n\t\t\t\t{\n\t\t\t\t\tif (result == null)\n\t\t\t\t\t{\n\t\t\t\t\t\tresult = mxRectangle.fromRectangle(bbox);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tresult.add(bbox);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t\n\treturn result;\n};\n\n/**\n * Group: Cell cloning, insertion and removal\n */\n\n/**\n * Function: cloneCell\n * \n * Returns the clone for the given cell. Uses <cloneCells>.\n * \n * Parameters:\n * \n * cell - <mxCell> to be cloned.\n * allowInvalidEdges - Optional boolean that specifies if invalid edges\n * should be cloned. Default is true.\n * mapping - Optional mapping for existing clones.\n * keepPosition - Optional boolean indicating if the position of the cells should\n * be updated to reflect the lost parent cell. Default is false.\n */\nmxGraph.prototype.cloneCell = function(cell, allowInvalidEdges, mapping, keepPosition)\n{\n\treturn this.cloneCells([cell], allowInvalidEdges, mapping, keepPosition)[0];\n};\n\n/**\n * Function: cloneCells\n * \n * Returns the clones for the given cells. The clones are created recursively\n * using <mxGraphModel.cloneCells>. If the terminal of an edge is not in the\n * given array, then the respective end is assigned a terminal point and the\n * terminal is removed.\n * \n * Parameters:\n * \n * cells - Array of <mxCells> to be cloned.\n * allowInvalidEdges - Optional boolean that specifies if invalid edges\n * should be cloned. Default is true.\n * mapping - Optional mapping for existing clones.\n * keepPosition - Optional boolean indicating if the position of the cells should\n * be updated to reflect the lost parent cell. Default is false.\n */\nmxGraph.prototype.cloneCells = function(cells, allowInvalidEdges, mapping, keepPosition)\n{\n\tallowInvalidEdges = (allowInvalidEdges != null) ? allowInvalidEdges : true;\n\tvar clones = null;\n\t\n\tif (cells != null)\n\t{\n\t\t// Creates a dictionary for fast lookups\n\t\tvar dict = new mxDictionary();\n\t\tvar tmp = [];\n\t\t\n\t\tfor (var i = 0; i < cells.length; i++)\n\t\t{\n\t\t\tdict.put(cells[i], true);\n\t\t\ttmp.push(cells[i]);\n\t\t}\n\t\t\n\t\tif (tmp.length > 0)\n\t\t{\n\t\t\tvar scale = this.view.scale;\n\t\t\tvar trans = this.view.translate;\n\t\t\tclones = this.model.cloneCells(cells, true, mapping);\n\t\t\n\t\t\tfor (var i = 0; i < cells.length; i++)\n\t\t\t{\n\t\t\t\tif (!allowInvalidEdges && this.model.isEdge(clones[i]) &&\n\t\t\t\t\tthis.getEdgeValidationError(clones[i],\n\t\t\t\t\t\tthis.model.getTerminal(clones[i], true),\n\t\t\t\t\t\tthis.model.getTerminal(clones[i], false)) != null)\n\t\t\t\t{\n\t\t\t\t\tclones[i] = null;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tvar g = this.model.getGeometry(clones[i]);\n\t\t\t\t\t\n\t\t\t\t\tif (g != null)\n\t\t\t\t\t{\n\t\t\t\t\t\tvar state = this.view.getState(cells[i]);\n\t\t\t\t\t\tvar pstate = this.view.getState(this.model.getParent(cells[i]));\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (state != null && pstate != null)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tvar dx = (keepPosition) ? 0 : pstate.origin.x;\n\t\t\t\t\t\t\tvar dy = (keepPosition) ? 0 : pstate.origin.y;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif (this.model.isEdge(clones[i]))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tvar pts = state.absolutePoints;\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t// Checks if the source is cloned or sets the terminal point\n\t\t\t\t\t\t\t\tvar src = this.model.getTerminal(cells[i], true);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\twhile (src != null && !dict.get(src))\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tsrc = this.model.getParent(src);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tif (src == null)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tg.setTerminalPoint(\n\t\t\t\t\t\t\t\t\t\tnew mxPoint(pts[0].x / scale - trans.x,\n\t\t\t\t\t\t\t\t\t\t\tpts[0].y / scale - trans.y), true);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t// Checks if the target is cloned or sets the terminal point\n\t\t\t\t\t\t\t\tvar trg = this.model.getTerminal(cells[i], false);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\twhile (trg != null && !dict.get(trg))\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\ttrg = this.model.getParent(trg);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tif (trg == null)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tvar n = pts.length - 1;\n\t\t\t\t\t\t\t\t\tg.setTerminalPoint(\n\t\t\t\t\t\t\t\t\t\tnew mxPoint(pts[n].x / scale - trans.x,\n\t\t\t\t\t\t\t\t\t\t\tpts[n].y / scale - trans.y), false);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t// Translates the control points\n\t\t\t\t\t\t\t\tvar points = g.points;\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tif (points != null)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tfor (var j = 0; j < points.length; j++)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tpoints[j].x += dx;\n\t\t\t\t\t\t\t\t\t\tpoints[j].y += dy;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tg.translate(dx, dy);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tclones = [];\n\t\t}\n\t}\n\t\n\treturn clones;\n};\n\n/**\n * Function: insertVertex\n * \n * Adds a new vertex into the given parent <mxCell> using value as the user\n * object and the given coordinates as the <mxGeometry> of the new vertex.\n * The id and style are used for the respective properties of the new\n * <mxCell>, which is returned.\n *\n * When adding new vertices from a mouse event, one should take into\n * account the offset of the graph container and the scale and translation\n * of the view in order to find the correct unscaled, untranslated\n * coordinates using <mxGraph.getPointForEvent> as follows:\n * \n * (code)\n * var pt = graph.getPointForEvent(evt);\n * var parent = graph.getDefaultParent();\n * graph.insertVertex(parent, null,\n * \t\t\t'Hello, World!', x, y, 220, 30);\n * (end)\n * \n * For adding image cells, the style parameter can be assigned as\n * \n * (code)\n * stylename;image=imageUrl\n * (end)\n * \n * See <mxGraph> for more information on using images.\n *\n * Parameters:\n * \n * parent - <mxCell> that specifies the parent of the new vertex.\n * id - Optional string that defines the Id of the new vertex.\n * value - Object to be used as the user object.\n * x - Integer that defines the x coordinate of the vertex.\n * y - Integer that defines the y coordinate of the vertex.\n * width - Integer that defines the width of the vertex.\n * height - Integer that defines the height of the vertex.\n * style - Optional string that defines the cell style.\n * relative - Optional boolean that specifies if the geometry is relative.\n * Default is false.\n */\nmxGraph.prototype.insertVertex = function(parent, id, value,\n\tx, y, width, height, style, relative)\n{\n\tvar vertex = this.createVertex(parent, id, value, x, y, width, height, style, relative);\n\n\treturn this.addCell(vertex, parent);\n};\n\n/**\n * Function: createVertex\n * \n * Hook method that creates the new vertex for <insertVertex>.\n */\nmxGraph.prototype.createVertex = function(parent, id, value,\n\t\tx, y, width, height, style, relative)\n{\n\t// Creates the geometry for the vertex\n\tvar geometry = new mxGeometry(x, y, width, height);\n\tgeometry.relative = (relative != null) ? relative : false;\n\t\n\t// Creates the vertex\n\tvar vertex = new mxCell(value, geometry, style);\n\tvertex.setId(id);\n\tvertex.setVertex(true);\n\tvertex.setConnectable(true);\n\t\n\treturn vertex;\n};\n\t\n/**\n * Function: insertEdge\n * \n * Adds a new edge into the given parent <mxCell> using value as the user\n * object and the given source and target as the terminals of the new edge.\n * The id and style are used for the respective properties of the new\n * <mxCell>, which is returned.\n *\n * Parameters:\n * \n * parent - <mxCell> that specifies the parent of the new edge.\n * id - Optional string that defines the Id of the new edge.\n * value - JavaScript object to be used as the user object.\n * source - <mxCell> that defines the source of the edge.\n * target - <mxCell> that defines the target of the edge.\n * style - Optional string that defines the cell style.\n */\nmxGraph.prototype.insertEdge = function(parent, id, value, source, target, style)\n{\n\tvar edge = this.createEdge(parent, id, value, source, target, style);\n\t\n\treturn this.addEdge(edge, parent, source, target);\n};\n\n/**\n * Function: createEdge\n * \n * Hook method that creates the new edge for <insertEdge>. This\n * implementation does not set the source and target of the edge, these\n * are set when the edge is added to the model.\n * \n */\nmxGraph.prototype.createEdge = function(parent, id, value, source, target, style)\n{\n\t// Creates the edge\n\tvar edge = new mxCell(value, new mxGeometry(), style);\n\tedge.setId(id);\n\tedge.setEdge(true);\n\tedge.geometry.relative = true;\n\t\n\treturn edge;\n};\n\n/**\n * Function: addEdge\n * \n * Adds the edge to the parent and connects it to the given source and\n * target terminals. This is a shortcut method. Returns the edge that was\n * added.\n * \n * Parameters:\n * \n * edge - <mxCell> to be inserted into the given parent.\n * parent - <mxCell> that represents the new parent. If no parent is\n * given then the default parent is used.\n * source - Optional <mxCell> that represents the source terminal.\n * target - Optional <mxCell> that represents the target terminal.\n * index - Optional index to insert the cells at. Default is to append.\n */\nmxGraph.prototype.addEdge = function(edge, parent, source, target, index)\n{\n\treturn this.addCell(edge, parent, index, source, target);\n};\n\n/**\n * Function: addCell\n * \n * Adds the cell to the parent and connects it to the given source and\n * target terminals. This is a shortcut method. Returns the cell that was\n * added.\n * \n * Parameters:\n * \n * cell - <mxCell> to be inserted into the given parent.\n * parent - <mxCell> that represents the new parent. If no parent is\n * given then the default parent is used.\n * index - Optional index to insert the cells at. Default is to append.\n * source - Optional <mxCell> that represents the source terminal.\n * target - Optional <mxCell> that represents the target terminal.\n */\nmxGraph.prototype.addCell = function(cell, parent, index, source, target)\n{\n\treturn this.addCells([cell], parent, index, source, target)[0];\n};\n\n/**\n * Function: addCells\n * \n * Adds the cells to the parent at the given index, connecting each cell to\n * the optional source and target terminal. The change is carried out using\n * <cellsAdded>. This method fires <mxEvent.ADD_CELLS> while the\n * transaction is in progress. Returns the cells that were added.\n * \n * Parameters:\n * \n * cells - Array of <mxCells> to be inserted.\n * parent - <mxCell> that represents the new parent. If no parent is\n * given then the default parent is used.\n * index - Optional index to insert the cells at. Default is to append.\n * source - Optional source <mxCell> for all inserted cells.\n * target - Optional target <mxCell> for all inserted cells.\n */\nmxGraph.prototype.addCells = function(cells, parent, index, source, target)\n{\n\tif (parent == null)\n\t{\n\t\tparent = this.getDefaultParent();\n\t}\n\t\n\tif (index == null)\n\t{\n\t\tindex = this.model.getChildCount(parent);\n\t}\n\t\n\tthis.model.beginUpdate();\n\ttry\n\t{\n\t\tthis.cellsAdded(cells, parent, index, source, target, false, true);\n\t\tthis.fireEvent(new mxEventObject(mxEvent.ADD_CELLS, 'cells', cells,\n\t\t\t\t'parent', parent, 'index', index, 'source', source, 'target', target));\n\t}\n\tfinally\n\t{\n\t\tthis.model.endUpdate();\n\t}\n\n\treturn cells;\n};\n\n/**\n * Function: cellsAdded\n * \n * Adds the specified cells to the given parent. This method fires\n * <mxEvent.CELLS_ADDED> while the transaction is in progress.\n */\nmxGraph.prototype.cellsAdded = function(cells, parent, index, source, target, absolute, constrain, extend)\n{\n\tif (cells != null && parent != null && index != null)\n\t{\n\t\tthis.model.beginUpdate();\n\t\ttry\n\t\t{\n\t\t\tvar parentState = (absolute) ? this.view.getState(parent) : null;\n\t\t\tvar o1 = (parentState != null) ? parentState.origin : null;\n\t\t\tvar zero = new mxPoint(0, 0);\n\n\t\t\tfor (var i = 0; i < cells.length; i++)\n\t\t\t{\n\t\t\t\tif (cells[i] == null)\n\t\t\t\t{\n\t\t\t\t\tindex--;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tvar previous = this.model.getParent(cells[i]);\n\t\n\t\t\t\t\t// Keeps the cell at its absolute location\n\t\t\t\t\tif (o1 != null && cells[i] != parent && parent != previous)\n\t\t\t\t\t{\n\t\t\t\t\t\tvar oldState = this.view.getState(previous);\n\t\t\t\t\t\tvar o2 = (oldState != null) ? oldState.origin : zero;\n\t\t\t\t\t\tvar geo = this.model.getGeometry(cells[i]);\n\t\n\t\t\t\t\t\tif (geo != null)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tvar dx = o2.x - o1.x;\n\t\t\t\t\t\t\tvar dy = o2.y - o1.y;\n\t\n\t\t\t\t\t\t\t// FIXME: Cells should always be inserted first before any other edit\n\t\t\t\t\t\t\t// to avoid forward references in sessions.\n\t\t\t\t\t\t\tgeo = geo.clone();\n\t\t\t\t\t\t\tgeo.translate(dx, dy);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif (!geo.relative && this.model.isVertex(cells[i]) &&\n\t\t\t\t\t\t\t\t!this.isAllowNegativeCoordinates())\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tgeo.x = Math.max(0, geo.x);\n\t\t\t\t\t\t\t\tgeo.y = Math.max(0, geo.y);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tthis.model.setGeometry(cells[i], geo);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\n\t\t\t\t\t// Decrements all following indices\n\t\t\t\t\t// if cell is already in parent\n\t\t\t\t\tif (parent == previous && index + i > this.model.getChildCount(parent))\n\t\t\t\t\t{\n\t\t\t\t\t\tindex--;\n\t\t\t\t\t}\n\n\t\t\t\t\tthis.model.add(parent, cells[i], index + i);\n\t\t\t\t\t\n\t\t\t\t\tif (this.autoSizeCellsOnAdd)\n\t\t\t\t\t{\n\t\t\t\t\t\tthis.autoSizeCell(cells[i], true);\n\t\t\t\t\t}\n\n\t\t\t\t\t// Extends the parent or constrains the child\n\t\t\t\t\tif ((extend == null || extend) &&\n\t\t\t\t\t\tthis.isExtendParentsOnAdd(cells[i]) && this.isExtendParent(cells[i]))\n\t\t\t\t\t{\n\t\t\t\t\t\tthis.extendParent(cells[i]);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// Additionally constrains the child after extending the parent\n\t\t\t\t\tif (constrain == null || constrain)\n\t\t\t\t\t{\n\t\t\t\t\t\tthis.constrainChild(cells[i]);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// Sets the source terminal\n\t\t\t\t\tif (source != null)\n\t\t\t\t\t{\n\t\t\t\t\t\tthis.cellConnected(cells[i], source, true);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// Sets the target terminal\n\t\t\t\t\tif (target != null)\n\t\t\t\t\t{\n\t\t\t\t\t\tthis.cellConnected(cells[i], target, false);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tthis.fireEvent(new mxEventObject(mxEvent.CELLS_ADDED, 'cells', cells,\n\t\t\t\t'parent', parent, 'index', index, 'source', source, 'target', target,\n\t\t\t\t'absolute', absolute));\n\t\t}\n\t\tfinally\n\t\t{\n\t\t\tthis.model.endUpdate();\n\t\t}\n\t}\n};\n\n/**\n * Function: autoSizeCell\n * \n * Resizes the specified cell to just fit around the its label and/or children\n * \n * Parameters:\n * \n * cell - <mxCells> to be resized.\n * recurse - Optional boolean which specifies if all descendants should be\n * autosized. Default is true.\n */\nmxGraph.prototype.autoSizeCell = function(cell, recurse)\n{\n\trecurse = (recurse != null) ? recurse : true;\n\t\n\tif (recurse)\n\t{\n\t\tvar childCount = this.model.getChildCount(cell);\n\t\t\n\t\tfor (var i = 0; i < childCount; i++)\n\t\t{\n\t\t\tthis.autoSizeCell(this.model.getChildAt(cell, i));\n\t\t}\n\t}\n\n\tif (this.getModel().isVertex(cell) && this.isAutoSizeCell(cell))\n\t{\n\t\tthis.updateCellSize(cell);\n\t}\n};\n\n/**\n * Function: removeCells\n * \n * Removes the given cells from the graph including all connected edges if\n * includeEdges is true. The change is carried out using <cellsRemoved>.\n * This method fires <mxEvent.REMOVE_CELLS> while the transaction is in\n * progress. The removed cells are returned as an array.\n * \n * Parameters:\n * \n * cells - Array of <mxCells> to remove. If null is specified then the\n * selection cells which are deletable are used.\n * includeEdges - Optional boolean which specifies if all connected edges\n * should be removed as well. Default is true.\n */\nmxGraph.prototype.removeCells = function(cells, includeEdges)\n{\n\tincludeEdges = (includeEdges != null) ? includeEdges : true;\n\t\n\tif (cells == null)\n\t{\n\t\tcells = this.getDeletableCells(this.getSelectionCells());\n\t}\n\n\t// Adds all edges to the cells\n\tif (includeEdges)\n\t{\n\t\t// FIXME: Remove duplicate cells in result or do not add if\n\t\t// in cells or descendant of cells\n\t\tcells = this.getDeletableCells(this.addAllEdges(cells));\n\t}\n\n\tthis.model.beginUpdate();\n\ttry\n\t{\n\t\tthis.cellsRemoved(cells);\n\t\tthis.fireEvent(new mxEventObject(mxEvent.REMOVE_CELLS, \n\t\t\t\t'cells', cells, 'includeEdges', includeEdges));\n\t}\n\tfinally\n\t{\n\t\tthis.model.endUpdate();\n\t}\n\t\n\treturn cells;\n};\n\n/**\n * Function: cellsRemoved\n * \n * Removes the given cells from the model. This method fires\n * <mxEvent.CELLS_REMOVED> while the transaction is in progress.\n * \n * Parameters:\n * \n * cells - Array of <mxCells> to remove.\n */\nmxGraph.prototype.cellsRemoved = function(cells)\n{\n\tif (cells != null && cells.length > 0)\n\t{\n\t\tvar scale = this.view.scale;\n\t\tvar tr = this.view.translate;\n\t\t\n\t\tthis.model.beginUpdate();\n\t\ttry\n\t\t{\n\t\t\t// Creates hashtable for faster lookup\n\t\t\tvar dict = new mxDictionary();\n\t\t\t\n\t\t\tfor (var i = 0; i < cells.length; i++)\n\t\t\t{\n\t\t\t\tdict.put(cells[i], true);\n\t\t\t}\n\t\t\t\n\t\t\tfor (var i = 0; i < cells.length; i++)\n\t\t\t{\n\t\t\t\t// Disconnects edges which are not in cells\n\t\t\t\tvar edges = this.getAllEdges([cells[i]]);\n\t\t\t\t\n\t\t\t\tvar disconnectTerminal = mxUtils.bind(this, function(edge, source)\n\t\t\t\t{\n\t\t\t\t\tvar geo = this.model.getGeometry(edge);\n\n\t\t\t\t\tif (geo != null)\n\t\t\t\t\t{\n\t\t\t\t\t\tvar state = this.view.getState(edge);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\tif (state != null)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t// Checks which side of the edge is being disconnected\n\t\t\t\t\t\t\tvar tmp = state.getVisibleTerminal(source);\n\t\t\t\t\t\t\tvar connected = false;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\twhile (tmp != null)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif (cells[i] == tmp)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tconnected = true;\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\ttmp = this.model.getParent(tmp);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif (connected)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tvar dx = tr.x;\n\t\t\t\t\t\t\t\tvar dy = tr.y;\n\t\t\t\t\t\t\t\tvar parentState = this.view.getState(this.model.getParent(edge));\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tif (parentState != null && this.model.isVertex(parentState.cell))\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tdx = parentState.x / scale;\n\t\t\t\t\t\t\t\t\tdy = parentState.y / scale;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tgeo = geo.clone();\n\t\t\t\t\t\t\t\tvar pts = state.absolutePoints;\n\t\t\t\t\t\t\t\tvar n = (source) ? 0 : pts.length - 1;\n\t\t\t\t\t\t\t\tgeo.setTerminalPoint(new mxPoint(pts[n].x / scale - dx, pts[n].y / scale - dy), source);\n\t\t\t\t\t\t\t\tthis.model.setTerminal(edges[j], null, source);\n\t\t\t\t\t\t\t\tthis.model.setGeometry(edges[j], geo);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\t\n\t\t\t\tfor (var j = 0; j < edges.length; j++)\n\t\t\t\t{\n\t\t\t\t\tif (!dict.get(edges[j]))\n\t\t\t\t\t{\n\t\t\t\t\t\tdisconnectTerminal(edges[j], true);\n\t\t\t\t\t\tdisconnectTerminal(edges[j], false);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tthis.model.remove(cells[i]);\n\t\t\t}\n\t\t\t\n\t\t\tthis.fireEvent(new mxEventObject(mxEvent.CELLS_REMOVED, 'cells', cells));\n\t\t}\n\t\tfinally\n\t\t{\n\t\t\tthis.model.endUpdate();\n\t\t}\n\t}\n};\n\n/**\n * Function: splitEdge\n * \n * Splits the given edge by adding the newEdge between the previous source\n * and the given cell and reconnecting the source of the given edge to the\n * given cell. This method fires <mxEvent.SPLIT_EDGE> while the transaction\n * is in progress. Returns the new edge that was inserted.\n * \n * Parameters:\n * \n * edge - <mxCell> that represents the edge to be splitted.\n * cells - <mxCells> that represents the cells to insert into the edge.\n * newEdge - <mxCell> that represents the edge to be inserted.\n * dx - Optional integer that specifies the vector to move the cells.\n * dy - Optional integer that specifies the vector to move the cells.\n */\nmxGraph.prototype.splitEdge = function(edge, cells, newEdge, dx, dy)\n{\n\tdx = dx || 0;\n\tdy = dy || 0;\n\n\tvar parent = this.model.getParent(edge);\n\tvar source = this.model.getTerminal(edge, true);\n\n\tthis.model.beginUpdate();\n\ttry\n\t{\n\t\tif (newEdge == null)\n\t\t{\n\t\t\tnewEdge = this.cloneCell(edge);\n\t\t\t\n\t\t\t// Removes waypoints before/after new cell\n\t\t\tvar state = this.view.getState(edge);\n\t\t\tvar geo = this.getCellGeometry(newEdge);\n\t\t\t\n\t\t\tif (geo != null && geo.points != null && state != null)\n\t\t\t{\n\t\t\t\tvar t = this.view.translate;\n\t\t\t\tvar s = this.view.scale;\n\t\t\t\tvar idx = mxUtils.findNearestSegment(state, (dx + t.x) * s, (dy + t.y) * s);\n\t\t\t\tgeo.points = geo.points.slice(0, idx);\n\t\t\t\t\t\t\t\t\n\t\t\t\tgeo = this.getCellGeometry(edge);\n\t\t\t\t\n\t\t\t\tif (geo != null && geo.points != null)\n\t\t\t\t{\n\t\t\t\t\tgeo = geo.clone();\n\t\t\t\t\tgeo.points = geo.points.slice(idx);\n\t\t\t\t\tthis.model.setGeometry(edge, geo);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tthis.cellsMoved(cells, dx, dy, false, false);\n\t\tthis.cellsAdded(cells, parent, this.model.getChildCount(parent), null, null,\n\t\t\t\ttrue);\n\t\tthis.cellsAdded([newEdge], parent, this.model.getChildCount(parent),\n\t\t\t\tsource, cells[0], false);\n\t\tthis.cellConnected(edge, cells[0], true);\n\t\tthis.fireEvent(new mxEventObject(mxEvent.SPLIT_EDGE, 'edge', edge,\n\t\t\t\t'cells', cells, 'newEdge', newEdge, 'dx', dx, 'dy', dy));\n\t}\n\tfinally\n\t{\n\t\tthis.model.endUpdate();\n\t}\n\n\treturn newEdge;\n};\n\n/**\n * Group: Cell visibility\n */\n\n/**\n * Function: toggleCells\n * \n * Sets the visible state of the specified cells and all connected edges\n * if includeEdges is true. The change is carried out using <cellsToggled>.\n * This method fires <mxEvent.TOGGLE_CELLS> while the transaction is in\n * progress. Returns the cells whose visible state was changed.\n * \n * Parameters:\n * \n * show - Boolean that specifies the visible state to be assigned.\n * cells - Array of <mxCells> whose visible state should be changed. If\n * null is specified then the selection cells are used.\n * includeEdges - Optional boolean indicating if the visible state of all\n * connected edges should be changed as well. Default is true.\n */\nmxGraph.prototype.toggleCells = function(show, cells, includeEdges)\n{\n\tif (cells == null)\n\t{\n\t\tcells = this.getSelectionCells();\n\t}\n\n\t// Adds all connected edges recursively\n\tif (includeEdges)\n\t{\n\t\tcells = this.addAllEdges(cells);\n\t}\n\n\tthis.model.beginUpdate();\n\ttry\n\t{\n\t\tthis.cellsToggled(cells, show);\n\t\tthis.fireEvent(new mxEventObject(mxEvent.TOGGLE_CELLS,\n\t\t\t'show', show, 'cells', cells, 'includeEdges', includeEdges));\n\t}\n\tfinally\n\t{\n\t\tthis.model.endUpdate();\n\t}\n\n\treturn cells;\n};\n\n/**\n * Function: cellsToggled\n * \n * Sets the visible state of the specified cells.\n * \n * Parameters:\n * \n * cells - Array of <mxCells> whose visible state should be changed.\n * show - Boolean that specifies the visible state to be assigned.\n */\nmxGraph.prototype.cellsToggled = function(cells, show)\n{\n\tif (cells != null && cells.length > 0)\n\t{\n\t\tthis.model.beginUpdate();\n\t\ttry\n\t\t{\n\t\t\tfor (var i = 0; i < cells.length; i++)\n\t\t\t{\n\t\t\t\tthis.model.setVisible(cells[i], show);\n\t\t\t}\n\t\t}\n\t\tfinally\n\t\t{\n\t\t\tthis.model.endUpdate();\n\t\t}\n\t}\n};\n\n/**\n * Group: Folding\n */\n\n/**\n * Function: foldCells\n * \n * Sets the collapsed state of the specified cells and all descendants\n * if recurse is true. The change is carried out using <cellsFolded>.\n * This method fires <mxEvent.FOLD_CELLS> while the transaction is in\n * progress. Returns the cells whose collapsed state was changed.\n * \n * Parameters:\n * \n * collapsed - Boolean indicating the collapsed state to be assigned.\n * recurse - Optional boolean indicating if the collapsed state of all\n * descendants should be set. Default is false.\n * cells - Array of <mxCells> whose collapsed state should be set. If\n * null is specified then the foldable selection cells are used.\n * checkFoldable - Optional boolean indicating of isCellFoldable should be\n * checked. Default is false.\n * evt - Optional native event that triggered the invocation.\n */\nmxGraph.prototype.foldCells = function(collapse, recurse, cells, checkFoldable, evt)\n{\n\trecurse = (recurse != null) ? recurse : false;\n\t\n\tif (cells == null)\n\t{\n\t\tcells = this.getFoldableCells(this.getSelectionCells(), collapse);\n\t}\n\n\tthis.stopEditing(false);\n\n\tthis.model.beginUpdate();\n\ttry\n\t{\n\t\tthis.cellsFolded(cells, collapse, recurse, checkFoldable);\n\t\tthis.fireEvent(new mxEventObject(mxEvent.FOLD_CELLS,\n\t\t\t'collapse', collapse, 'recurse', recurse, 'cells', cells));\n\t}\n\tfinally\n\t{\n\t\tthis.model.endUpdate();\n\t}\n\n\treturn cells;\n};\n\n/**\n * Function: cellsFolded\n * \n * Sets the collapsed state of the specified cells. This method fires\n * <mxEvent.CELLS_FOLDED> while the transaction is in progress. Returns the\n * cells whose collapsed state was changed.\n * \n * Parameters:\n * \n * cells - Array of <mxCells> whose collapsed state should be set.\n * collapsed - Boolean indicating the collapsed state to be assigned.\n * recurse - Boolean indicating if the collapsed state of all descendants\n * should be set.\n * checkFoldable - Optional boolean indicating of isCellFoldable should be\n * checked. Default is false.\n */\nmxGraph.prototype.cellsFolded = function(cells, collapse, recurse, checkFoldable)\n{\n\tif (cells != null && cells.length > 0)\n\t{\n\t\tthis.model.beginUpdate();\n\t\ttry\n\t\t{\n\t\t\tfor (var i = 0; i < cells.length; i++)\n\t\t\t{\n\t\t\t\tif ((!checkFoldable || this.isCellFoldable(cells[i], collapse)) &&\n\t\t\t\t\tcollapse != this.isCellCollapsed(cells[i]))\n\t\t\t\t{\n\t\t\t\t\tthis.model.setCollapsed(cells[i], collapse);\n\t\t\t\t\tthis.swapBounds(cells[i], collapse);\n\n\t\t\t\t\tif (this.isExtendParent(cells[i]))\n\t\t\t\t\t{\n\t\t\t\t\t\tthis.extendParent(cells[i]);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (recurse)\n\t\t\t\t\t{\n\t\t\t\t\t\tvar children = this.model.getChildren(cells[i]);\n\t\t\t\t\t\tthis.cellsFolded(children, collapse, recurse);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tthis.constrainChild(cells[i]);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tthis.fireEvent(new mxEventObject(mxEvent.CELLS_FOLDED,\n\t\t\t\t'cells', cells, 'collapse', collapse, 'recurse', recurse));\n\t\t}\n\t\tfinally\n\t\t{\n\t\t\tthis.model.endUpdate();\n\t\t}\n\t}\n};\n\n/**\n * Function: swapBounds\n * \n * Swaps the alternate and the actual bounds in the geometry of the given\n * cell invoking <updateAlternateBounds> before carrying out the swap.\n * \n * Parameters:\n * \n * cell - <mxCell> for which the bounds should be swapped.\n * willCollapse - Boolean indicating if the cell is going to be collapsed.\n */\nmxGraph.prototype.swapBounds = function(cell, willCollapse)\n{\n\tif (cell != null)\n\t{\n\t\tvar geo = this.model.getGeometry(cell);\n\t\t\n\t\tif (geo != null)\n\t\t{\n\t\t\tgeo = geo.clone();\n\t\t\t\n\t\t\tthis.updateAlternateBounds(cell, geo, willCollapse);\n\t\t\tgeo.swap();\n\t\t\t\n\t\t\tthis.model.setGeometry(cell, geo);\n\t\t}\n\t}\n};\n\n/**\n * Function: updateAlternateBounds\n * \n * Updates or sets the alternate bounds in the given geometry for the given\n * cell depending on whether the cell is going to be collapsed. If no\n * alternate bounds are defined in the geometry and\n * <collapseToPreferredSize> is true, then the preferred size is used for\n * the alternate bounds. The top, left corner is always kept at the same\n * location.\n * \n * Parameters:\n * \n * cell - <mxCell> for which the geometry is being udpated.\n * g - <mxGeometry> for which the alternate bounds should be updated.\n * willCollapse - Boolean indicating if the cell is going to be collapsed.\n */\nmxGraph.prototype.updateAlternateBounds = function(cell, geo, willCollapse)\n{\n\tif (cell != null && geo != null)\n\t{\n\t\tvar state = this.view.getState(cell);\n\t\tvar style = (state != null) ? state.style : this.getCellStyle(cell);\n\n\t\tif (geo.alternateBounds == null)\n\t\t{\n\t\t\tvar bounds = geo;\n\t\t\t\n\t\t\tif (this.collapseToPreferredSize)\n\t\t\t{\n\t\t\t\tvar tmp = this.getPreferredSizeForCell(cell);\n\t\t\t\t\n\t\t\t\tif (tmp != null)\n\t\t\t\t{\n\t\t\t\t\tbounds = tmp;\n\n\t\t\t\t\tvar startSize = mxUtils.getValue(style, mxConstants.STYLE_STARTSIZE);\n\n\t\t\t\t\tif (startSize > 0)\n\t\t\t\t\t{\n\t\t\t\t\t\tbounds.height = Math.max(bounds.height, startSize);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tgeo.alternateBounds = new mxRectangle(0, 0, bounds.width, bounds.height);\n\t\t}\n\t\t\n\t\tif (geo.alternateBounds != null)\n\t\t{\n\t\t\tgeo.alternateBounds.x = geo.x;\n\t\t\tgeo.alternateBounds.y = geo.y;\n\t\t\t\n\t\t\tvar alpha = mxUtils.toRadians(style[mxConstants.STYLE_ROTATION] || 0);\n\t\t\t\n\t\t\tif (alpha != 0)\n\t\t\t{\n\t\t\t\tvar dx = geo.alternateBounds.getCenterX() - geo.getCenterX();\n\t\t\t\tvar dy = geo.alternateBounds.getCenterY() - geo.getCenterY();\n\t\n\t\t\t\tvar cos = Math.cos(alpha);\n\t\t\t\tvar sin = Math.sin(alpha);\n\t\n\t\t\t\tvar dx2 = cos * dx - sin * dy;\n\t\t\t\tvar dy2 = sin * dx + cos * dy;\n\t\t\t\t\n\t\t\t\tgeo.alternateBounds.x += dx2 - dx;\n\t\t\t\tgeo.alternateBounds.y += dy2 - dy;\n\t\t\t}\n\t\t}\n\t}\n};\n\n/**\n * Function: addAllEdges\n * \n * Returns an array with the given cells and all edges that are connected\n * to a cell or one of its descendants.\n */\nmxGraph.prototype.addAllEdges = function(cells)\n{\n\tvar allCells = cells.slice();\n\t\n\treturn mxUtils.removeDuplicates(allCells.concat(this.getAllEdges(cells)));\n};\n\n/**\n * Function: getAllEdges\n * \n * Returns all edges connected to the given cells or its descendants.\n */\nmxGraph.prototype.getAllEdges = function(cells)\n{\n\tvar edges = [];\n\t\n\tif (cells != null)\n\t{\n\t\tfor (var i = 0; i < cells.length; i++)\n\t\t{\n\t\t\tvar edgeCount = this.model.getEdgeCount(cells[i]);\n\t\t\t\n\t\t\tfor (var j = 0; j < edgeCount; j++)\n\t\t\t{\n\t\t\t\tedges.push(this.model.getEdgeAt(cells[i], j));\n\t\t\t}\n\n\t\t\t// Recurses\n\t\t\tvar children = this.model.getChildren(cells[i]);\n\t\t\tedges = edges.concat(this.getAllEdges(children));\n\t\t}\n\t}\n\t\n\treturn edges;\n};\n\n/**\n * Group: Cell sizing\n */\n\n/**\n * Function: updateCellSize\n * \n * Updates the size of the given cell in the model using <cellSizeUpdated>.\n * This method fires <mxEvent.UPDATE_CELL_SIZE> while the transaction is in\n * progress. Returns the cell whose size was updated.\n * \n * Parameters:\n * \n * cell - <mxCell> whose size should be updated.\n */\nmxGraph.prototype.updateCellSize = function(cell, ignoreChildren)\n{\n\tignoreChildren = (ignoreChildren != null) ? ignoreChildren : false;\n\t\n\tthis.model.beginUpdate();\t\t\t\t\n\ttry\n\t{\n\t\tthis.cellSizeUpdated(cell, ignoreChildren);\n\t\tthis.fireEvent(new mxEventObject(mxEvent.UPDATE_CELL_SIZE,\n\t\t\t\t'cell', cell, 'ignoreChildren', ignoreChildren));\n\t}\n\tfinally\n\t{\n\t\tthis.model.endUpdate();\n\t}\n\t\n\treturn cell;\n};\n\n/**\n * Function: cellSizeUpdated\n * \n * Updates the size of the given cell in the model using\n * <getPreferredSizeForCell> to get the new size.\n * \n * Parameters:\n * \n * cell - <mxCell> for which the size should be changed.\n */\nmxGraph.prototype.cellSizeUpdated = function(cell, ignoreChildren)\n{\n\tif (cell != null)\n\t{\n\t\tthis.model.beginUpdate();\t\t\t\t\n\t\ttry\n\t\t{\n\t\t\tvar size = this.getPreferredSizeForCell(cell);\n\t\t\tvar geo = this.model.getGeometry(cell);\n\t\t\t\n\t\t\tif (size != null && geo != null)\n\t\t\t{\n\t\t\t\tvar collapsed = this.isCellCollapsed(cell);\n\t\t\t\tgeo = geo.clone();\n\n\t\t\t\tif (this.isSwimlane(cell))\n\t\t\t\t{\n\t\t\t\t\tvar state = this.view.getState(cell);\n\t\t\t\t\tvar style = (state != null) ? state.style : this.getCellStyle(cell);\n\t\t\t\t\tvar cellStyle = this.model.getStyle(cell);\n\n\t\t\t\t\tif (cellStyle == null)\n\t\t\t\t\t{\n\t\t\t\t\t\tcellStyle = '';\n\t\t\t\t\t}\n\n\t\t\t\t\tif (mxUtils.getValue(style, mxConstants.STYLE_HORIZONTAL, true))\n\t\t\t\t\t{\n\t\t\t\t\t\tcellStyle = mxUtils.setStyle(cellStyle,\n\t\t\t\t\t\t\t\tmxConstants.STYLE_STARTSIZE, size.height + 8);\n\n\t\t\t\t\t\tif (collapsed)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tgeo.height = size.height + 8;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tgeo.width = size.width;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tcellStyle = mxUtils.setStyle(cellStyle,\n\t\t\t\t\t\t\t\tmxConstants.STYLE_STARTSIZE, size.width + 8);\n\n\t\t\t\t\t\tif (collapsed)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tgeo.width = size.width + 8;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tgeo.height = size.height;\n\t\t\t\t\t}\n\n\t\t\t\t\tthis.model.setStyle(cell, cellStyle);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tgeo.width = size.width;\n\t\t\t\t\tgeo.height = size.height;\n\t\t\t\t}\n\n\t\t\t\tif (!ignoreChildren && !collapsed)\n\t\t\t\t{\n\t\t\t\t\tvar bounds = this.view.getBounds(this.model.getChildren(cell));\n\n\t\t\t\t\tif (bounds != null)\n\t\t\t\t\t{\n\t\t\t\t\t\tvar tr = this.view.translate;\n\t\t\t\t\t\tvar scale = this.view.scale;\n\n\t\t\t\t\t\tvar width = (bounds.x + bounds.width) / scale - geo.x - tr.x;\n\t\t\t\t\t\tvar height = (bounds.y + bounds.height) / scale - geo.y - tr.y;\n\n\t\t\t\t\t\tgeo.width = Math.max(geo.width, width);\n\t\t\t\t\t\tgeo.height = Math.max(geo.height, height);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tthis.cellsResized([cell], [geo], false);\n\t\t\t}\n\t\t}\n\t\tfinally\n\t\t{\n\t\t\tthis.model.endUpdate();\n\t\t}\n\t}\n};\n\n/**\n * Function: getPreferredSizeForCell\n * \n * Returns the preferred width and height of the given <mxCell> as an\n * <mxRectangle>. To implement a minimum width, add a new style eg.\n * minWidth in the vertex and override this method as follows.\n * \n * (code)\n * var graphGetPreferredSizeForCell = graph.getPreferredSizeForCell;\n * graph.getPreferredSizeForCell = function(cell)\n * {\n *   var result = graphGetPreferredSizeForCell.apply(this, arguments);\n *   var style = this.getCellStyle(cell);\n *   \n *   if (style['minWidth'] > 0)\n *   {\n *     result.width = Math.max(style['minWidth'], result.width);\n *   }\n * \n *   return result;\n * };\n * (end)\n * \n * Parameters:\n * \n * cell - <mxCell> for which the preferred size should be returned.\n */\nmxGraph.prototype.getPreferredSizeForCell = function(cell)\n{\n\tvar result = null;\n\t\n\tif (cell != null)\n\t{\n\t\tvar state = this.view.getState(cell) || this.view.createState(cell);\n\t\tvar style = state.style;\n\n\t\tif (!this.model.isEdge(cell))\n\t\t{\n\t\t\tvar fontSize = style[mxConstants.STYLE_FONTSIZE] || mxConstants.DEFAULT_FONTSIZE;\n\t\t\tvar dx = 0;\n\t\t\tvar dy = 0;\n\t\t\t\n\t\t\t// Adds dimension of image if shape is a label\n\t\t\tif (this.getImage(state) != null || style[mxConstants.STYLE_IMAGE] != null)\n\t\t\t{\n\t\t\t\tif (style[mxConstants.STYLE_SHAPE] == mxConstants.SHAPE_LABEL)\n\t\t\t\t{\n\t\t\t\t\tif (style[mxConstants.STYLE_VERTICAL_ALIGN] == mxConstants.ALIGN_MIDDLE)\n\t\t\t\t\t{\n\t\t\t\t\t\tdx += parseFloat(style[mxConstants.STYLE_IMAGE_WIDTH]) || mxLabel.prototype.imageSize;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif (style[mxConstants.STYLE_ALIGN] != mxConstants.ALIGN_CENTER)\n\t\t\t\t\t{\n\t\t\t\t\t\tdy += parseFloat(style[mxConstants.STYLE_IMAGE_HEIGHT]) || mxLabel.prototype.imageSize;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Adds spacings\n\t\t\tdx += 2 * (style[mxConstants.STYLE_SPACING] || 0);\n\t\t\tdx += style[mxConstants.STYLE_SPACING_LEFT] || 0;\n\t\t\tdx += style[mxConstants.STYLE_SPACING_RIGHT] || 0;\n\n\t\t\tdy += 2 * (style[mxConstants.STYLE_SPACING] || 0);\n\t\t\tdy += style[mxConstants.STYLE_SPACING_TOP] || 0;\n\t\t\tdy += style[mxConstants.STYLE_SPACING_BOTTOM] || 0;\n\t\t\t\n\t\t\t// Add spacing for collapse/expand icon\n\t\t\t// LATER: Check alignment and use constants\n\t\t\t// for image spacing\n\t\t\tvar image = this.getFoldingImage(state);\n\t\t\t\n\t\t\tif (image != null)\n\t\t\t{\n\t\t\t\tdx += image.width + 8;\n\t\t\t}\n\n\t\t\t// Adds space for label\n\t\t\tvar value = this.cellRenderer.getLabelValue(state);\n\n\t\t\tif (value != null && value.length > 0)\n\t\t\t{\n\t\t\t\tif (!this.isHtmlLabel(state.cell))\n\t\t\t\t{\n\t\t\t\t\tvalue = mxUtils.htmlEntities(value);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tvalue = value.replace(/\\n/g, '<br>');\n\t\t\t\t\n\t\t\t\tvar size = mxUtils.getSizeForString(value, fontSize, style[mxConstants.STYLE_FONTFAMILY]);\n\t\t\t\tvar width = size.width + dx;\n\t\t\t\tvar height = size.height + dy;\n\t\t\t\t\n\t\t\t\tif (!mxUtils.getValue(style, mxConstants.STYLE_HORIZONTAL, true))\n\t\t\t\t{\n\t\t\t\t\tvar tmp = height;\n\t\t\t\t\t\n\t\t\t\t\theight = width;\n\t\t\t\t\twidth = tmp;\n\t\t\t\t}\n\t\t\t\n\t\t\t\tif (this.gridEnabled)\n\t\t\t\t{\n\t\t\t\t\twidth = this.snap(width + this.gridSize / 2);\n\t\t\t\t\theight = this.snap(height + this.gridSize / 2);\n\t\t\t\t}\n\n\t\t\t\tresult = new mxRectangle(0, 0, width, height);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tvar gs2 = 4 * this.gridSize;\n\t\t\t\tresult = new mxRectangle(0, 0, gs2, gs2);\n\t\t\t}\n\t\t}\n\t}\n\t\n\treturn result;\n};\n\n/**\n * Function: resizeCell\n * \n * Sets the bounds of the given cell using <resizeCells>. Returns the\n * cell which was passed to the function.\n * \n * Parameters:\n * \n * cell - <mxCell> whose bounds should be changed.\n * bounds - <mxRectangle> that represents the new bounds.\n */\nmxGraph.prototype.resizeCell = function(cell, bounds, recurse)\n{\n\treturn this.resizeCells([cell], [bounds], recurse)[0];\n};\n\n/**\n * Function: resizeCells\n * \n * Sets the bounds of the given cells and fires a <mxEvent.RESIZE_CELLS>\n * event while the transaction is in progress. Returns the cells which\n * have been passed to the function.\n * \n * Parameters:\n * \n * cells - Array of <mxCells> whose bounds should be changed.\n * bounds - Array of <mxRectangles> that represent the new bounds.\n */\nmxGraph.prototype.resizeCells = function(cells, bounds, recurse)\n{\n\trecurse = (recurse != null) ? recurse : this.isRecursiveResize();\n\t\n\tthis.model.beginUpdate();\n\ttry\n\t{\n\t\tthis.cellsResized(cells, bounds, recurse);\n\t\tthis.fireEvent(new mxEventObject(mxEvent.RESIZE_CELLS,\n\t\t\t\t'cells', cells, 'bounds', bounds));\n\t}\n\tfinally\n\t{\n\t\tthis.model.endUpdate();\n\t}\n\n\treturn cells;\n};\n\n/**\n * Function: cellsResized\n * \n * Sets the bounds of the given cells and fires a <mxEvent.CELLS_RESIZED>\n * event. If <extendParents> is true, then the parent is extended if a\n * child size is changed so that it overlaps with the parent.\n * \n * The following example shows how to control group resizes to make sure\n * that all child cells stay within the group.\n * \n * (code)\n * graph.addListener(mxEvent.CELLS_RESIZED, function(sender, evt)\n * {\n *   var cells = evt.getProperty('cells');\n *   \n *   if (cells != null)\n *   {\n *     for (var i = 0; i < cells.length; i++)\n *     {\n *       if (graph.getModel().getChildCount(cells[i]) > 0)\n *       {\n *         var geo = graph.getCellGeometry(cells[i]);\n *         \n *         if (geo != null)\n *         {\n *           var children = graph.getChildCells(cells[i], true, true);\n *           var bounds = graph.getBoundingBoxFromGeometry(children, true);\n *           \n *           geo = geo.clone();\n *           geo.width = Math.max(geo.width, bounds.width);\n *           geo.height = Math.max(geo.height, bounds.height);\n *           \n *           graph.getModel().setGeometry(cells[i], geo);\n *         }\n *       }\n *     }\n *   }\n * });\n * (end)\n * \n * Parameters:\n * \n * cells - Array of <mxCells> whose bounds should be changed.\n * bounds - Array of <mxRectangles> that represent the new bounds.\n * recurse - Optional boolean that specifies if the children should be resized.\n */\nmxGraph.prototype.cellsResized = function(cells, bounds, recurse)\n{\n\trecurse = (recurse != null) ? recurse : false;\n\t\n\tif (cells != null && bounds != null && cells.length == bounds.length)\n\t{\n\t\tthis.model.beginUpdate();\n\t\ttry\n\t\t{\n\t\t\tfor (var i = 0; i < cells.length; i++)\n\t\t\t{\n\t\t\t\tthis.cellResized(cells[i], bounds[i], false, recurse);\n\n\t\t\t\tif (this.isExtendParent(cells[i]))\n\t\t\t\t{\n\t\t\t\t\tthis.extendParent(cells[i]);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tthis.constrainChild(cells[i]);\n\t\t\t}\n\n\t\t\tif (this.resetEdgesOnResize)\n\t\t\t{\n\t\t\t\tthis.resetEdges(cells);\n\t\t\t}\n\t\t\t\n\t\t\tthis.fireEvent(new mxEventObject(mxEvent.CELLS_RESIZED,\n\t\t\t\t\t'cells', cells, 'bounds', bounds));\n\t\t}\n\t\tfinally\n\t\t{\n\t\t\tthis.model.endUpdate();\n\t\t}\n\t}\n};\n\n/**\n * Function: cellResized\n * \n * Resizes the parents recursively so that they contain the complete area\n * of the resized child cell.\n * \n * Parameters:\n * \n * cell - <mxCell> whose bounds should be changed.\n * bounds - <mxRectangles> that represent the new bounds.\n * ignoreRelative - Boolean that indicates if relative cells should be ignored.\n * recurse - Optional boolean that specifies if the children should be resized.\n */\nmxGraph.prototype.cellResized = function(cell, bounds, ignoreRelative, recurse)\n{\n\tvar geo = this.model.getGeometry(cell);\n\n\tif (geo != null && (geo.x != bounds.x || geo.y != bounds.y ||\n\t\tgeo.width != bounds.width || geo.height != bounds.height))\n\t{\n\t\tgeo = geo.clone();\n\n\t\tif (!ignoreRelative && geo.relative)\n\t\t{\n\t\t\tvar offset = geo.offset;\n\n\t\t\tif (offset != null)\n\t\t\t{\n\t\t\t\toffset.x += bounds.x - geo.x;\n\t\t\t\toffset.y += bounds.y - geo.y;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tgeo.x = bounds.x;\n\t\t\tgeo.y = bounds.y;\n\t\t}\n\n\t\tgeo.width = bounds.width;\n\t\tgeo.height = bounds.height;\n\n\t\tif (!geo.relative && this.model.isVertex(cell) && !this.isAllowNegativeCoordinates())\n\t\t{\n\t\t\tgeo.x = Math.max(0, geo.x);\n\t\t\tgeo.y = Math.max(0, geo.y);\n\t\t}\n\n\t\tthis.model.beginUpdate();\n\t\ttry\n\t\t{\n\t\t\tif (recurse)\n\t\t\t{\n\t\t\t\tthis.resizeChildCells(cell, geo);\n\t\t\t}\n\t\t\t\t\t\t\n\t\t\tthis.model.setGeometry(cell, geo);\n\t\t\tthis.constrainChildCells(cell);\n\t\t}\n\t\tfinally\n\t\t{\n\t\t\tthis.model.endUpdate();\n\t\t}\n\t}\n};\n\n/**\n * Function: resizeChildCells\n * \n * Resizes the child cells of the given cell for the given new geometry with\n * respect to the current geometry of the cell.\n * \n * Parameters:\n * \n * cell - <mxCell> that has been resized.\n * newGeo - <mxGeometry> that represents the new bounds.\n */\nmxGraph.prototype.resizeChildCells = function(cell, newGeo)\n{\n\tvar geo = this.model.getGeometry(cell);\n\tvar dx = newGeo.width / geo.width;\n\tvar dy = newGeo.height / geo.height;\n\tvar childCount = this.model.getChildCount(cell);\n\t\n\tfor (var i = 0; i < childCount; i++)\n\t{\n\t\tthis.scaleCell(this.model.getChildAt(cell, i), dx, dy, true);\n\t}\n};\n\n/**\n * Function: constrainChildCells\n * \n * Constrains the children of the given cell using <constrainChild>.\n * \n * Parameters:\n * \n * cell - <mxCell> that has been resized.\n */\nmxGraph.prototype.constrainChildCells = function(cell)\n{\n\tvar childCount = this.model.getChildCount(cell);\n\t\n\tfor (var i = 0; i < childCount; i++)\n\t{\n\t\tthis.constrainChild(this.model.getChildAt(cell, i));\n\t}\n};\n\n/**\n * Function: scaleCell\n * \n * Scales the points, position and size of the given cell according to the\n * given vertical and horizontal scaling factors.\n * \n * Parameters:\n * \n * cell - <mxCell> whose geometry should be scaled.\n * dx - Horizontal scaling factor.\n * dy - Vertical scaling factor.\n * recurse - Boolean indicating if the child cells should be scaled.\n */\nmxGraph.prototype.scaleCell = function(cell, dx, dy, recurse)\n{\n\tvar geo = this.model.getGeometry(cell);\n\t\n\tif (geo != null)\n\t{\n\t\tvar state = this.view.getState(cell);\n\t\tvar style = (state != null) ? state.style : this.getCellStyle(cell);\n\t\t\n\t\tgeo = geo.clone();\n\t\t\n\t\t// Stores values for restoring based on style\n\t\tvar x = geo.x;\n\t\tvar y = geo.y\n\t\tvar w = geo.width;\n\t\tvar h = geo.height;\n\t\t\n\t\tgeo.scale(dx, dy, style[mxConstants.STYLE_ASPECT] == 'fixed');\n\t\t\n\t\tif (style[mxConstants.STYLE_RESIZE_WIDTH] == '1')\n\t\t{\n\t\t\tgeo.width = w * dx;\n\t\t}\n\t\telse if (style[mxConstants.STYLE_RESIZE_WIDTH] == '0')\n\t\t{\n\t\t\tgeo.width = w;\n\t\t}\n\t\t\n\t\tif (style[mxConstants.STYLE_RESIZE_HEIGHT] == '1')\n\t\t{\n\t\t\tgeo.height = h * dy;\n\t\t}\n\t\telse if (style[mxConstants.STYLE_RESIZE_HEIGHT] == '0')\n\t\t{\n\t\t\tgeo.height = h;\n\t\t}\n\t\t\n\t\tif (!this.isCellMovable(cell))\n\t\t{\n\t\t\tgeo.x = x;\n\t\t\tgeo.y = y;\n\t\t}\n\t\t\n\t\tif (!this.isCellResizable(cell))\n\t\t{\n\t\t\tgeo.width = w;\n\t\t\tgeo.height = h;\n\t\t}\n\n\t\tif (this.model.isVertex(cell))\n\t\t{\n\t\t\tthis.cellResized(cell, geo, true, recurse);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tthis.model.setGeometry(cell, geo);\n\t\t}\n\t}\n};\n\n/**\n * Function: extendParent\n * \n * Resizes the parents recursively so that they contain the complete area\n * of the resized child cell.\n * \n * Parameters:\n * \n * cell - <mxCell> that has been resized.\n */\nmxGraph.prototype.extendParent = function(cell)\n{\n\tif (cell != null)\n\t{\n\t\tvar parent = this.model.getParent(cell);\n\t\tvar p = this.getCellGeometry(parent);\n\t\t\n\t\tif (parent != null && p != null && !this.isCellCollapsed(parent))\n\t\t{\n\t\t\tvar geo = this.getCellGeometry(cell);\n\t\t\t\n\t\t\tif (geo != null && !geo.relative &&\n\t\t\t\t(p.width < geo.x + geo.width ||\n\t\t\t\tp.height < geo.y + geo.height))\n\t\t\t{\n\t\t\t\tp = p.clone();\n\t\t\t\t\n\t\t\t\tp.width = Math.max(p.width, geo.x + geo.width);\n\t\t\t\tp.height = Math.max(p.height, geo.y + geo.height);\n\t\t\t\t\n\t\t\t\tthis.cellsResized([parent], [p], false);\n\t\t\t}\n\t\t}\n\t}\n};\n\n/**\n * Group: Cell moving\n */\n\n/**\n * Function: importCells\n * \n * Clones and inserts the given cells into the graph using the move\n * method and returns the inserted cells. This shortcut is used if\n * cells are inserted via datatransfer.\n * \n * Parameters:\n * \n * cells - Array of <mxCells> to be imported.\n * dx - Integer that specifies the x-coordinate of the vector. Default is 0.\n * dy - Integer that specifies the y-coordinate of the vector. Default is 0.\n * target - <mxCell> that represents the new parent of the cells.\n * evt - Mouseevent that triggered the invocation.\n * mapping - Optional mapping for existing clones.\n */\nmxGraph.prototype.importCells = function(cells, dx, dy, target, evt, mapping)\n{\t\n\treturn this.moveCells(cells, dx, dy, true, target, evt, mapping);\n};\n\n/**\n * Function: moveCells\n * \n * Moves or clones the specified cells and moves the cells or clones by the\n * given amount, adding them to the optional target cell. The evt is the\n * mouse event as the mouse was released. The change is carried out using\n * <cellsMoved>. This method fires <mxEvent.MOVE_CELLS> while the\n * transaction is in progress. Returns the cells that were moved.\n * \n * Use the following code to move all cells in the graph.\n * \n * (code)\n * graph.moveCells(graph.getChildCells(null, true, true), 10, 10);\n * (end)\n * \n * Parameters:\n * \n * cells - Array of <mxCells> to be moved, cloned or added to the target.\n * dx - Integer that specifies the x-coordinate of the vector. Default is 0.\n * dy - Integer that specifies the y-coordinate of the vector. Default is 0.\n * clone - Boolean indicating if the cells should be cloned. Default is false.\n * target - <mxCell> that represents the new parent of the cells.\n * evt - Mouseevent that triggered the invocation.\n * mapping - Optional mapping for existing clones.\n */\nmxGraph.prototype.moveCells = function(cells, dx, dy, clone, target, evt, mapping)\n{\n\tdx = (dx != null) ? dx : 0;\n\tdy = (dy != null) ? dy : 0;\n\tclone = (clone != null) ? clone : false;\n\t\n\tif (cells != null && (dx != 0 || dy != 0 || clone || target != null))\n\t{\n\t\t// Removes descendants with ancestors in cells to avoid multiple moving\n\t\tcells = this.model.getTopmostCells(cells);\n\t\t\n\t\tthis.model.beginUpdate();\n\t\ttry\n\t\t{\n\t\t\t// Faster cell lookups to remove relative edge labels with selected\n\t\t\t// terminals to avoid explicit and implicit move at same time\n\t\t\tvar dict = new mxDictionary();\n\t\t\t\n\t\t\tfor (var i = 0; i < cells.length; i++)\n\t\t\t{\n\t\t\t\tdict.put(cells[i], true);\n\t\t\t}\n\t\t\t\n\t\t\tvar isSelected = mxUtils.bind(this, function(cell)\n\t\t\t{\n\t\t\t\twhile (cell != null)\n\t\t\t\t{\n\t\t\t\t\tif (dict.get(cell))\n\t\t\t\t\t{\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tcell = this.model.getParent(cell);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\treturn false;\n\t\t\t});\n\t\t\t\n\t\t\t// Removes relative edge labels with selected terminals\n\t\t\tvar checked = [];\n\t\t\t\n\t\t\tfor (var i = 0; i < cells.length; i++)\n\t\t\t{\n\t\t\t\tvar geo = this.getCellGeometry(cells[i]);\n\t\t\t\tvar parent = this.model.getParent(cells[i]);\n\t\t\n\t\t\t\tif ((geo == null || !geo.relative) || !this.model.isEdge(parent) ||\n\t\t\t\t\t(!isSelected(this.model.getTerminal(parent, true)) &&\n\t\t\t\t\t!isSelected(this.model.getTerminal(parent, false))))\n\t\t\t\t{\n\t\t\t\t\tchecked.push(cells[i]);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tcells = checked;\n\t\t\t\n\t\t\tif (clone)\n\t\t\t{\n\t\t\t\tcells = this.cloneCells(cells, this.isCloneInvalidEdges(), mapping);\n\n\t\t\t\tif (target == null)\n\t\t\t\t{\n\t\t\t\t\ttarget = this.getDefaultParent();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// FIXME: Cells should always be inserted first before any other edit\n\t\t\t// to avoid forward references in sessions.\n\t\t\t// Need to disable allowNegativeCoordinates if target not null to\n\t\t\t// allow for temporary negative numbers until cellsAdded is called.\n\t\t\tvar previous = this.isAllowNegativeCoordinates();\n\t\t\t\n\t\t\tif (target != null)\n\t\t\t{\n\t\t\t\tthis.setAllowNegativeCoordinates(true);\n\t\t\t}\n\t\t\t\n\t\t\tthis.cellsMoved(cells, dx, dy, !clone && this.isDisconnectOnMove()\n\t\t\t\t\t&& this.isAllowDanglingEdges(), target == null,\n\t\t\t\t\tthis.isExtendParentsOnMove() && target == null);\n\t\t\t\n\t\t\tthis.setAllowNegativeCoordinates(previous);\n\n\t\t\tif (target != null)\n\t\t\t{\n\t\t\t\tvar index = this.model.getChildCount(target);\n\t\t\t\tthis.cellsAdded(cells, target, index, null, null, true);\n\t\t\t}\n\n\t\t\t// Dispatches a move event\n\t\t\tthis.fireEvent(new mxEventObject(mxEvent.MOVE_CELLS, 'cells', cells,\n\t\t\t\t'dx', dx, 'dy', dy, 'clone', clone, 'target', target, 'event', evt));\n\t\t}\n\t\tfinally\n\t\t{\n\t\t\tthis.model.endUpdate();\n\t\t}\n\t}\n\n\treturn cells;\n};\n\n/**\n * Function: cellsMoved\n * \n * Moves the specified cells by the given vector, disconnecting the cells\n * using disconnectGraph is disconnect is true. This method fires\n * <mxEvent.CELLS_MOVED> while the transaction is in progress.\n */\nmxGraph.prototype.cellsMoved = function(cells, dx, dy, disconnect, constrain, extend)\n{\n\tif (cells != null && (dx != 0 || dy != 0))\n\t{\n\t\textend = (extend != null) ? extend : false;\n\n\t\tthis.model.beginUpdate();\n\t\ttry\n\t\t{\n\t\t\tif (disconnect)\n\t\t\t{\n\t\t\t\tthis.disconnectGraph(cells);\n\t\t\t}\n\n\t\t\tfor (var i = 0; i < cells.length; i++)\n\t\t\t{\n\t\t\t\tthis.translateCell(cells[i], dx, dy);\n\t\t\t\t\n\t\t\t\tif (extend && this.isExtendParent(cells[i]))\n\t\t\t\t{\n\t\t\t\t\tthis.extendParent(cells[i]);\n\t\t\t\t}\n\t\t\t\telse if (constrain)\n\t\t\t\t{\n\t\t\t\t\tthis.constrainChild(cells[i]);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (this.resetEdgesOnMove)\n\t\t\t{\n\t\t\t\tthis.resetEdges(cells);\n\t\t\t}\n\t\t\t\n\t\t\tthis.fireEvent(new mxEventObject(mxEvent.CELLS_MOVED,\n\t\t\t\t'cells', cells, 'dx', dx, 'dy', dy, 'disconnect', disconnect));\n\t\t}\n\t\tfinally\n\t\t{\n\t\t\tthis.model.endUpdate();\n\t\t}\n\t}\n};\n\n/**\n * Function: translateCell\n * \n * Translates the geometry of the given cell and stores the new,\n * translated geometry in the model as an atomic change.\n */\nmxGraph.prototype.translateCell = function(cell, dx, dy)\n{\n\tvar geo = this.model.getGeometry(cell);\n\n\tif (geo != null)\n\t{\n\t\tdx = parseFloat(dx);\n\t\tdy = parseFloat(dy);\n\t\tgeo = geo.clone();\n\t\tgeo.translate(dx, dy);\n\n\t\tif (!geo.relative && this.model.isVertex(cell) && !this.isAllowNegativeCoordinates())\n\t\t{\n\t\t\tgeo.x = Math.max(0, parseFloat(geo.x));\n\t\t\tgeo.y = Math.max(0, parseFloat(geo.y));\n\t\t}\n\t\t\n\t\tif (geo.relative && !this.model.isEdge(cell))\n\t\t{\n\t\t\tvar parent = this.model.getParent(cell);\n\t\t\tvar angle = 0;\n\t\t\t\n\t\t\tif (this.model.isVertex(parent))\n\t\t\t{\n\t\t\t\tvar state = this.view.getState(parent);\n\t\t\t\tvar style = (state != null) ? state.style : this.getCellStyle(parent);\n\t\t\t\t\n\t\t\t\tangle = mxUtils.getValue(style, mxConstants.STYLE_ROTATION, 0);\n\t\t\t}\n\t\t\t\n\t\t\tif (angle != 0)\n\t\t\t{\n\t\t\t\tvar rad = mxUtils.toRadians(-angle);\n\t\t\t\tvar cos = Math.cos(rad);\n\t\t\t\tvar sin = Math.sin(rad);\n\t\t\t\tvar pt = mxUtils.getRotatedPoint(new mxPoint(dx, dy), cos, sin, new mxPoint(0, 0));\n\t\t\t\tdx = pt.x;\n\t\t\t\tdy = pt.y;\n\t\t\t}\n\t\t\t\n\t\t\tif (geo.offset == null)\n\t\t\t{\n\t\t\t\tgeo.offset = new mxPoint(dx, dy);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tgeo.offset.x = parseFloat(geo.offset.x) + dx;\n\t\t\t\tgeo.offset.y = parseFloat(geo.offset.y) + dy;\n\t\t\t}\n\t\t}\n\n\t\tthis.model.setGeometry(cell, geo);\n\t}\n};\n\n/**\n * Function: getCellContainmentArea\n * \n * Returns the <mxRectangle> inside which a cell is to be kept.\n * \n * Parameters:\n * \n * cell - <mxCell> for which the area should be returned.\n */\nmxGraph.prototype.getCellContainmentArea = function(cell)\n{\n\tif (cell != null && !this.model.isEdge(cell))\n\t{\n\t\tvar parent = this.model.getParent(cell);\n\t\t\n\t\tif (parent != null && parent != this.getDefaultParent())\n\t\t{\n\t\t\tvar g = this.model.getGeometry(parent);\n\t\t\t\n\t\t\tif (g != null)\n\t\t\t{\n\t\t\t\tvar x = 0;\n\t\t\t\tvar y = 0;\n\t\t\t\tvar w = g.width;\n\t\t\t\tvar h = g.height;\n\t\t\t\t\n\t\t\t\tif (this.isSwimlane(parent))\n\t\t\t\t{\n\t\t\t\t\tvar size = this.getStartSize(parent);\n\t\t\t\t\t\n\t\t\t\t\tvar state = this.view.getState(parent);\n\t\t\t\t\tvar style = (state != null) ? state.style : this.getCellStyle(parent);\n\t\t\t\t\tvar dir = mxUtils.getValue(style, mxConstants.STYLE_DIRECTION, mxConstants.DIRECTION_EAST);\n\t\t\t\t\tvar flipH = mxUtils.getValue(style, mxConstants.STYLE_FLIPH, 0) == 1;\n\t\t\t\t\tvar flipV = mxUtils.getValue(style, mxConstants.STYLE_FLIPV, 0) == 1;\n\t\t\t\t\t\n\t\t\t\t\tif (dir == mxConstants.DIRECTION_SOUTH || dir == mxConstants.DIRECTION_NORTH)\n\t\t\t\t\t{\n\t\t\t\t\t\tvar tmp = size.width;\n\t\t\t\t\t\tsize.width = size.height;\n\t\t\t\t\t\tsize.height = tmp;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif ((dir == mxConstants.DIRECTION_EAST && !flipV) || (dir == mxConstants.DIRECTION_NORTH && !flipH) ||\n\t\t\t\t\t\t(dir == mxConstants.DIRECTION_WEST && flipV) || (dir == mxConstants.DIRECTION_SOUTH && flipH))\n\t\t\t\t\t{\n\t\t\t\t\t\tx = size.width;\n\t\t\t\t\t\ty = size.height;\n\t\t\t\t\t}\n\n\t\t\t\t\tw -= size.width;\n\t\t\t\t\th -= size.height;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\treturn new mxRectangle(x, y, w, h);\n\t\t\t}\n\t\t}\n\t}\n\t\n\treturn null;\n};\n\n/**\n * Function: getMaximumGraphBounds\n * \n * Returns the bounds inside which the diagram should be kept as an\n * <mxRectangle>.\n */\nmxGraph.prototype.getMaximumGraphBounds = function()\n{\n\treturn this.maximumGraphBounds;\n};\n\n/**\n * Function: constrainChild\n * \n * Keeps the given cell inside the bounds returned by\n * <getCellContainmentArea> for its parent, according to the rules defined by\n * <getOverlap> and <isConstrainChild>. This modifies the cell's geometry\n * in-place and does not clone it.\n * \n * Parameters:\n * \n * cells - <mxCell> which should be constrained.\n * sizeFirst - Specifies if the size should be changed first. Default is true.\n */\nmxGraph.prototype.constrainChild = function(cell, sizeFirst)\n{\n\tsizeFirst = (sizeFirst != null) ? sizeFirst : true;\n\t\n\tif (cell != null)\n\t{\n\t\tvar geo = this.getCellGeometry(cell);\n\t\t\n\t\tif (geo != null && (this.isConstrainRelativeChildren() || !geo.relative))\n\t\t{\n\t\t\tvar parent = this.model.getParent(cell);\n\t\t\tvar pgeo = this.getCellGeometry(parent);\n\t\t\tvar max = this.getMaximumGraphBounds();\n\t\t\t\n\t\t\t// Finds parent offset\n\t\t\tif (max != null)\n\t\t\t{\n\t\t\t\tvar off = this.getBoundingBoxFromGeometry([parent], false);\n\t\t\t\t\n\t\t\t\tif (off != null)\n\t\t\t\t{\n\t\t\t\t\tmax = mxRectangle.fromRectangle(max);\n\t\t\t\t\t\n\t\t\t\t\tmax.x -= off.x;\n\t\t\t\t\tmax.y -= off.y;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif (this.isConstrainChild(cell))\n\t\t\t{\n\t\t\t\tvar tmp = this.getCellContainmentArea(cell);\n\t\t\t\t\n\t\t\t\tif (tmp != null)\n\t\t\t\t{\n\t\t\t\t\tvar overlap = this.getOverlap(cell);\n\t\n\t\t\t\t\tif (overlap > 0)\n\t\t\t\t\t{\n\t\t\t\t\t\ttmp = mxRectangle.fromRectangle(tmp);\n\t\t\t\t\t\t\n\t\t\t\t\t\ttmp.x -= tmp.width * overlap;\n\t\t\t\t\t\ttmp.y -= tmp.height * overlap;\n\t\t\t\t\t\ttmp.width += 2 * tmp.width * overlap;\n\t\t\t\t\t\ttmp.height += 2 * tmp.height * overlap;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// Find the intersection between max and tmp\n\t\t\t\t\tif (max == null)\n\t\t\t\t\t{\n\t\t\t\t\t\tmax = tmp;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tmax = mxRectangle.fromRectangle(max);\n\t\t\t\t\t\tmax.intersect(tmp);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif (max != null)\n\t\t\t{\n\t\t\t\tvar cells = [cell];\n\t\t\t\t\n\t\t\t\tif (!this.isCellCollapsed(cell))\n\t\t\t\t{\n\t\t\t\t\tvar desc = this.model.getDescendants(cell);\n\t\t\t\t\t\n\t\t\t\t\tfor (var i = 0; i < desc.length; i++)\n\t\t\t\t\t{\n\t\t\t\t\t\tif (this.isCellVisible(desc[i]))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcells.push(desc[i]);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tvar bbox = this.getBoundingBoxFromGeometry(cells, false);\n\t\t\t\t\n\t\t\t\tif (bbox != null)\n\t\t\t\t{\n\t\t\t\t\tgeo = geo.clone();\n\t\t\t\t\t\n\t\t\t\t\t// Cumulative horizontal movement\n\t\t\t\t\tvar dx = 0;\n\t\t\t\t\t\n\t\t\t\t\tif (geo.width > max.width)\n\t\t\t\t\t{\n\t\t\t\t\t\tdx = geo.width - max.width;\n\t\t\t\t\t\tgeo.width -= dx;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif (bbox.x + bbox.width > max.x + max.width)\n\t\t\t\t\t{\n\t\t\t\t\t\tdx -= bbox.x + bbox.width - max.x - max.width - dx;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// Cumulative vertical movement\n\t\t\t\t\tvar dy = 0;\n\t\t\t\t\t\n\t\t\t\t\tif (geo.height > max.height)\n\t\t\t\t\t{\n\t\t\t\t\t\tdy = geo.height - max.height;\n\t\t\t\t\t\tgeo.height -= dy;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif (bbox.y + bbox.height > max.y + max.height)\n\t\t\t\t\t{\n\t\t\t\t\t\tdy -= bbox.y + bbox.height - max.y - max.height - dy;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif (bbox.x < max.x)\n\t\t\t\t\t{\n\t\t\t\t\t\tdx -= bbox.x - max.x;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif (bbox.y < max.y)\n\t\t\t\t\t{\n\t\t\t\t\t\tdy -= bbox.y - max.y;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif (dx != 0 || dy != 0)\n\t\t\t\t\t{\n\t\t\t\t\t\tif (geo.relative)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t// Relative geometries are moved via absolute offset\n\t\t\t\t\t\t\tif (geo.offset == null)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tgeo.offset = new mxPoint();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tgeo.offset.x += dx;\n\t\t\t\t\t\t\tgeo.offset.y += dy;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tgeo.x += dx;\n\t\t\t\t\t\t\tgeo.y += dy;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tthis.model.setGeometry(cell, geo);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n};\n\n/**\n * Function: resetEdges\n * \n * Resets the control points of the edges that are connected to the given\n * cells if not both ends of the edge are in the given cells array.\n * \n * Parameters:\n * \n * cells - Array of <mxCells> for which the connected edges should be\n * reset.\n */\nmxGraph.prototype.resetEdges = function(cells)\n{\n\tif (cells != null)\n\t{\n\t\t// Prepares faster cells lookup\n\t\tvar dict = new mxDictionary();\n\t\t\n\t\tfor (var i = 0; i < cells.length; i++)\n\t\t{\n\t\t\tdict.put(cells[i], true);\n\t\t}\n\t\t\n\t\tthis.model.beginUpdate();\n\t\ttry\n\t\t{\n\t\t\tfor (var i = 0; i < cells.length; i++)\n\t\t\t{\n\t\t\t\tvar edges = this.model.getEdges(cells[i]);\n\t\t\t\t\n\t\t\t\tif (edges != null)\n\t\t\t\t{\n\t\t\t\t\tfor (var j = 0; j < edges.length; j++)\n\t\t\t\t\t{\n\t\t\t\t\t\tvar state = this.view.getState(edges[j]);\n\t\t\t\t\t\t\n\t\t\t\t\t\tvar source = (state != null) ? state.getVisibleTerminal(true) : this.view.getVisibleTerminal(edges[j], true);\n\t\t\t\t\t\tvar target = (state != null) ? state.getVisibleTerminal(false) : this.view.getVisibleTerminal(edges[j], false);\n\t\t\t\t\t\t\n\t\t\t\t\t\t// Checks if one of the terminals is not in the given array\n\t\t\t\t\t\tif (!dict.get(source) || !dict.get(target))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tthis.resetEdge(edges[j]);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tthis.resetEdges(this.model.getChildren(cells[i]));\n\t\t\t}\n\t\t}\n\t\tfinally\n\t\t{\n\t\t\tthis.model.endUpdate();\n\t\t}\n\t}\n};\n\n/**\n * Function: resetEdge\n * \n * Resets the control points of the given edge.\n * \n * Parameters:\n * \n * edge - <mxCell> whose points should be reset.\n */\nmxGraph.prototype.resetEdge = function(edge)\n{\n\tvar geo = this.model.getGeometry(edge);\n\t\n\t// Resets the control points\n\tif (geo != null && geo.points != null && geo.points.length > 0)\n\t{\n\t\tgeo = geo.clone();\n\t\tgeo.points = [];\n\t\tthis.model.setGeometry(edge, geo);\n\t}\n\t\n\treturn edge;\n};\n\n/**\n * Group: Cell connecting and connection constraints\n */\n\n/**\n * Function: getOutlineConstraint\n * \n * Returns the constraint used to connect to the outline of the given state.\n */\nmxGraph.prototype.getOutlineConstraint = function(point, terminalState, me)\n{\n\tif (terminalState.shape != null)\n\t{\n\t\tvar bounds = this.view.getPerimeterBounds(terminalState);\n\t\tvar direction = terminalState.style[mxConstants.STYLE_DIRECTION];\n\t\t\n\t\tif (direction == mxConstants.DIRECTION_NORTH || direction == mxConstants.DIRECTION_SOUTH)\n\t\t{\n\t\t\tbounds.x += bounds.width / 2 - bounds.height / 2;\n\t\t\tbounds.y += bounds.height / 2 - bounds.width / 2;\n\t\t\tvar tmp = bounds.width;\n\t\t\tbounds.width = bounds.height;\n\t\t\tbounds.height = tmp;\n\t\t}\n\t\n\t\tvar alpha = mxUtils.toRadians(terminalState.shape.getShapeRotation());\n\t\t\n\t\tif (alpha != 0)\n\t\t{\n\t\t\tvar cos = Math.cos(-alpha);\n\t\t\tvar sin = Math.sin(-alpha);\n\t\n\t\t\tvar ct = new mxPoint(bounds.getCenterX(), bounds.getCenterY());\n\t\t\tpoint = mxUtils.getRotatedPoint(point, cos, sin, ct);\n\t\t}\n\n\t\tvar sx = 1;\n\t\tvar sy = 1;\n\t\tvar dx = 0;\n\t\tvar dy = 0;\n\t\t\n\t\t// LATER: Add flipping support for image shapes\n\t\tif (this.getModel().isVertex(terminalState.cell))\n\t\t{\n\t\t\tvar flipH = terminalState.style[mxConstants.STYLE_FLIPH];\n\t\t\tvar flipV = terminalState.style[mxConstants.STYLE_FLIPV];\n\t\t\t\n\t\t\t// Legacy support for stencilFlipH/V\n\t\t\tif (terminalState.shape != null && terminalState.shape.stencil != null)\n\t\t\t{\n\t\t\t\tflipH = mxUtils.getValue(terminalState.style, 'stencilFlipH', 0) == 1 || flipH;\n\t\t\t\tflipV = mxUtils.getValue(terminalState.style, 'stencilFlipV', 0) == 1 || flipV;\n\t\t\t}\n\t\t\t\n\t\t\tif (direction == mxConstants.DIRECTION_NORTH || direction == mxConstants.DIRECTION_SOUTH)\n\t\t\t{\n\t\t\t\tvar tmp = flipH;\n\t\t\t\tflipH = flipV;\n\t\t\t\tflipV = tmp;\n\t\t\t}\n\t\t\t\n\t\t\tif (flipH)\n\t\t\t{\n\t\t\t\tsx = -1;\n\t\t\t\tdx = -bounds.width;\n\t\t\t}\n\t\t\t\n\t\t\tif (flipV)\n\t\t\t{\n\t\t\t\tsy = -1;\n\t\t\t\tdy = -bounds.height ;\n\t\t\t}\n\t\t}\n\t\t\n\t\tpoint = new mxPoint((point.x - bounds.x) * sx - dx + bounds.x, (point.y - bounds.y) * sy - dy + bounds.y);\n\t\t\n\t\tvar x = (bounds.width == 0) ? 0 : Math.round((point.x - bounds.x) * 1000 / bounds.width) / 1000;\n\t\tvar y = (bounds.height == 0) ? 0 : Math.round((point.y - bounds.y) * 1000 / bounds.height) / 1000;\n\t\t\n\t\treturn new mxConnectionConstraint(new mxPoint(x, y), false);\n\t}\n\t\n\treturn null;\n};\n\n/**\n * Function: getAllConnectionConstraints\n * \n * Returns an array of all <mxConnectionConstraints> for the given terminal. If\n * the shape of the given terminal is a <mxStencilShape> then the constraints\n * of the corresponding <mxStencil> are returned.\n * \n * Parameters:\n * \n * terminal - <mxCellState> that represents the terminal.\n * source - Boolean that specifies if the terminal is the source or target.\n */\nmxGraph.prototype.getAllConnectionConstraints = function(terminal, source)\n{\n\tif (terminal != null && terminal.shape != null && terminal.shape.stencil != null)\n\t{\n\t\treturn terminal.shape.stencil.constraints;\n\t}\n\n\treturn null;\n};\n\n/**\n * Function: getConnectionConstraint\n * \n * Returns an <mxConnectionConstraint> that describes the given connection\n * point. This result can then be passed to <getConnectionPoint>.\n * \n * Parameters:\n * \n * edge - <mxCellState> that represents the edge.\n * terminal - <mxCellState> that represents the terminal.\n * source - Boolean indicating if the terminal is the source or target.\n */\nmxGraph.prototype.getConnectionConstraint = function(edge, terminal, source)\n{\n\tvar point = null;\n\tvar x = edge.style[(source) ? mxConstants.STYLE_EXIT_X : mxConstants.STYLE_ENTRY_X];\n\n\tif (x != null)\n\t{\n\t\tvar y = edge.style[(source) ? mxConstants.STYLE_EXIT_Y : mxConstants.STYLE_ENTRY_Y];\n\t\t\n\t\tif (y != null)\n\t\t{\n\t\t\tpoint = new mxPoint(parseFloat(x), parseFloat(y));\n\t\t}\n\t}\n\t\n\tvar perimeter = false;\n\t\n\tif (point != null)\n\t{\n\t\tperimeter = mxUtils.getValue(edge.style, (source) ? mxConstants.STYLE_EXIT_PERIMETER :\n\t\t\tmxConstants.STYLE_ENTRY_PERIMETER, true);\n\t}\n\t\n\treturn new mxConnectionConstraint(point, perimeter);\n};\n\n/**\n * Function: setConnectionConstraint\n * \n * Sets the <mxConnectionConstraint> that describes the given connection point.\n * If no constraint is given then nothing is changed. To remove an existing\n * constraint from the given edge, use an empty constraint instead.\n * \n * Parameters:\n * \n * edge - <mxCell> that represents the edge.\n * terminal - <mxCell> that represents the terminal.\n * source - Boolean indicating if the terminal is the source or target.\n * constraint - Optional <mxConnectionConstraint> to be used for this\n * connection.\n */\nmxGraph.prototype.setConnectionConstraint = function(edge, terminal, source, constraint)\n{\n\tif (constraint != null)\n\t{\n\t\tthis.model.beginUpdate();\n\t\t\n\t\ttry\n\t\t{\n\t\t\tif (constraint == null || constraint.point == null)\n\t\t\t{\n\t\t\t\tthis.setCellStyles((source) ? mxConstants.STYLE_EXIT_X :\n\t\t\t\t\tmxConstants.STYLE_ENTRY_X, null, [edge]);\n\t\t\t\tthis.setCellStyles((source) ? mxConstants.STYLE_EXIT_Y :\n\t\t\t\t\tmxConstants.STYLE_ENTRY_Y, null, [edge]);\n\t\t\t\tthis.setCellStyles((source) ? mxConstants.STYLE_EXIT_PERIMETER :\n\t\t\t\t\tmxConstants.STYLE_ENTRY_PERIMETER, null, [edge]);\n\t\t\t}\n\t\t\telse if (constraint.point != null)\n\t\t\t{\n\t\t\t\tthis.setCellStyles((source) ? mxConstants.STYLE_EXIT_X :\n\t\t\t\t\tmxConstants.STYLE_ENTRY_X, constraint.point.x, [edge]);\n\t\t\t\tthis.setCellStyles((source) ? mxConstants.STYLE_EXIT_Y :\n\t\t\t\t\tmxConstants.STYLE_ENTRY_Y, constraint.point.y, [edge]);\n\t\t\t\t\n\t\t\t\t// Only writes 0 since 1 is default\n\t\t\t\tif (!constraint.perimeter)\n\t\t\t\t{\n\t\t\t\t\tthis.setCellStyles((source) ? mxConstants.STYLE_EXIT_PERIMETER :\n\t\t\t\t\t\tmxConstants.STYLE_ENTRY_PERIMETER, '0', [edge]);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tthis.setCellStyles((source) ? mxConstants.STYLE_EXIT_PERIMETER :\n\t\t\t\t\t\tmxConstants.STYLE_ENTRY_PERIMETER, null, [edge]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tfinally\n\t\t{\n\t\t\tthis.model.endUpdate();\n\t\t}\n\t}\n};\n\n/**\n * Function: getConnectionPoint\n *\n * Returns the nearest point in the list of absolute points or the center\n * of the opposite terminal.\n * \n * Parameters:\n * \n * vertex - <mxCellState> that represents the vertex.\n * constraint - <mxConnectionConstraint> that represents the connection point\n * constraint as returned by <getConnectionConstraint>.\n */\nmxGraph.prototype.getConnectionPoint = function(vertex, constraint)\n{\n\tvar point = null;\n\t\n\tif (vertex != null && constraint.point != null)\n\t{\n\t\tvar bounds = this.view.getPerimeterBounds(vertex);\n        var cx = new mxPoint(bounds.getCenterX(), bounds.getCenterY());\n\t\tvar direction = vertex.style[mxConstants.STYLE_DIRECTION];\n\t\tvar r1 = 0;\n\t\t\n\t\t// Bounds need to be rotated by 90 degrees for further computation\n\t\tif (direction != null && mxUtils.getValue(vertex.style,\n\t\t\tmxConstants.STYLE_ANCHOR_POINT_DIRECTION, 1) == 1)\n\t\t{\n\t\t\tif (direction == mxConstants.DIRECTION_NORTH)\n\t\t\t{\n\t\t\t\tr1 += 270;\n\t\t\t}\n\t\t\telse if (direction == mxConstants.DIRECTION_WEST)\n\t\t\t{\n\t\t\t\tr1 += 180;\n\t\t\t}\n\t\t\telse if (direction == mxConstants.DIRECTION_SOUTH)\n\t\t\t{\n\t\t\t\tr1 += 90;\n\t\t\t}\n\n\t\t\t// Bounds need to be rotated by 90 degrees for further computation\n\t\t\tif (direction == mxConstants.DIRECTION_NORTH ||\n\t\t\t\tdirection == mxConstants.DIRECTION_SOUTH)\n\t\t\t{\n\t\t\t\tbounds.rotate90();\n\t\t\t}\n\t\t}\n\n\t\tpoint = new mxPoint(bounds.x + constraint.point.x * bounds.width,\n\t\t\t\tbounds.y + constraint.point.y * bounds.height);\n\t\t\n\t\t// Rotation for direction before projection on perimeter\n\t\tvar r2 = vertex.style[mxConstants.STYLE_ROTATION] || 0;\n\t\t\n\t\tif (constraint.perimeter)\n\t\t{\n\t\t\tif (r1 != 0)\n\t\t\t{\n\t\t\t\t// Only 90 degrees steps possible here so no trig needed\n\t\t\t\tvar cos = 0;\n\t\t\t\tvar sin = 0;\n\t\t\t\t\n\t\t\t\tif (r1 == 90)\n\t\t\t\t{\n\t\t\t\t\tsin = 1;\n\t\t\t\t}\n\t\t\t\telse if (r1 == 180)\n\t\t\t\t{\n\t\t\t\t\tcos = -1;\n\t\t\t\t}\n\t\t\t\telse if (r1 == 270)\n\t\t\t\t{\n\t\t\t\t\tsin = -1;\n\t\t\t\t}\n\t\t\t\t\n\t\t        point = mxUtils.getRotatedPoint(point, cos, sin, cx);\n\t\t\t}\n\t\n\t\t\tpoint = this.view.getPerimeterPoint(vertex, point, false);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tr2 += r1;\n\t\t\t\n\t\t\tif (this.getModel().isVertex(vertex.cell))\n\t\t\t{\n\t\t\t\tvar flipH = vertex.style[mxConstants.STYLE_FLIPH] == 1;\n\t\t\t\tvar flipV = vertex.style[mxConstants.STYLE_FLIPV] == 1;\n\t\t\t\t\n\t\t\t\t// Legacy support for stencilFlipH/V\n\t\t\t\tif (vertex.shape != null && vertex.shape.stencil != null)\n\t\t\t\t{\n\t\t\t\t\tflipH = (mxUtils.getValue(vertex.style, 'stencilFlipH', 0) == 1) || flipH;\n\t\t\t\t\tflipV = (mxUtils.getValue(vertex.style, 'stencilFlipV', 0) == 1) || flipV;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (flipH)\n\t\t\t\t{\n\t\t\t\t\tpoint.x = 2 * bounds.getCenterX() - point.x;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (flipV)\n\t\t\t\t{\n\t\t\t\t\tpoint.y = 2 * bounds.getCenterY() - point.y;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Generic rotation after projection on perimeter\n\t\tif (r2 != 0 && point != null)\n\t\t{\n\t        var rad = mxUtils.toRadians(r2);\n\t        var cos = Math.cos(rad);\n\t        var sin = Math.sin(rad);\n\t        \n\t        point = mxUtils.getRotatedPoint(point, cos, sin, cx);\n\t\t}\n\t}\n\t\n\tif (point != null)\n\t{\n\t\tpoint.x = Math.round(point.x);\n\t\tpoint.y = Math.round(point.y);\n\t}\n\n\treturn point;\n};\n\n/**\n * Function: connectCell\n * \n * Connects the specified end of the given edge to the given terminal\n * using <cellConnected> and fires <mxEvent.CONNECT_CELL> while the\n * transaction is in progress. Returns the updated edge.\n * \n * Parameters:\n * \n * edge - <mxCell> whose terminal should be updated.\n * terminal - <mxCell> that represents the new terminal to be used.\n * source - Boolean indicating if the new terminal is the source or target.\n * constraint - Optional <mxConnectionConstraint> to be used for this\n * connection.\n */\nmxGraph.prototype.connectCell = function(edge, terminal, source, constraint)\n{\n\tthis.model.beginUpdate();\n\ttry\n\t{\n\t\tvar previous = this.model.getTerminal(edge, source);\n\t\tthis.cellConnected(edge, terminal, source, constraint);\n\t\tthis.fireEvent(new mxEventObject(mxEvent.CONNECT_CELL,\n\t\t\t'edge', edge, 'terminal', terminal, 'source', source,\n\t\t\t'previous', previous));\n\t}\n\tfinally\n\t{\n\t\tthis.model.endUpdate();\n\t}\n\n\treturn edge;\n};\n\n/**\n * Function: cellConnected\n * \n * Sets the new terminal for the given edge and resets the edge points if\n * <resetEdgesOnConnect> is true. This method fires\n * <mxEvent.CELL_CONNECTED> while the transaction is in progress.\n * \n * Parameters:\n * \n * edge - <mxCell> whose terminal should be updated.\n * terminal - <mxCell> that represents the new terminal to be used.\n * source - Boolean indicating if the new terminal is the source or target.\n * constraint - <mxConnectionConstraint> to be used for this connection.\n */\nmxGraph.prototype.cellConnected = function(edge, terminal, source, constraint)\n{\n\tif (edge != null)\n\t{\n\t\tthis.model.beginUpdate();\n\t\ttry\n\t\t{\n\t\t\tvar previous = this.model.getTerminal(edge, source);\n\n\t\t\t// Updates the constraint\n\t\t\tthis.setConnectionConstraint(edge, terminal, source, constraint);\n\t\t\t\n\t\t\t// Checks if the new terminal is a port, uses the ID of the port in the\n\t\t\t// style and the parent of the port as the actual terminal of the edge.\n\t\t\tif (this.isPortsEnabled())\n\t\t\t{\n\t\t\t\tvar id = null;\n\t\n\t\t\t\tif (this.isPort(terminal))\n\t\t\t\t{\n\t\t\t\t\tid = terminal.getId();\n\t\t\t\t\tterminal = this.getTerminalForPort(terminal, source);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// Sets or resets all previous information for connecting to a child port\n\t\t\t\tvar key = (source) ? mxConstants.STYLE_SOURCE_PORT :\n\t\t\t\t\tmxConstants.STYLE_TARGET_PORT;\n\t\t\t\tthis.setCellStyles(key, id, [edge]);\n\t\t\t}\n\t\t\t\n\t\t\tthis.model.setTerminal(edge, terminal, source);\n\t\t\t\n\t\t\tif (this.resetEdgesOnConnect)\n\t\t\t{\n\t\t\t\tthis.resetEdge(edge);\n\t\t\t}\n\n\t\t\tthis.fireEvent(new mxEventObject(mxEvent.CELL_CONNECTED,\n\t\t\t\t'edge', edge, 'terminal', terminal, 'source', source,\n\t\t\t\t'previous', previous));\n\t\t}\n\t\tfinally\n\t\t{\n\t\t\tthis.model.endUpdate();\n\t\t}\n\t}\n};\n\n/**\n * Function: disconnectGraph\n * \n * Disconnects the given edges from the terminals which are not in the\n * given array.\n * \n * Parameters:\n * \n * cells - Array of <mxCells> to be disconnected.\n */\nmxGraph.prototype.disconnectGraph = function(cells)\n{\n\tif (cells != null)\n\t{\n\t\tthis.model.beginUpdate();\n\t\ttry\n\t\t{\t\t\t\t\t\t\t\n\t\t\tvar scale = this.view.scale;\n\t\t\tvar tr = this.view.translate;\n\t\t\t\n\t\t\t// Fast lookup for finding cells in array\n\t\t\tvar dict = new mxDictionary();\n\t\t\t\n\t\t\tfor (var i = 0; i < cells.length; i++)\n\t\t\t{\n\t\t\t\tdict.put(cells[i], true);\n\t\t\t}\n\t\t\t\n\t\t\tfor (var i = 0; i < cells.length; i++)\n\t\t\t{\n\t\t\t\tif (this.model.isEdge(cells[i]))\n\t\t\t\t{\n\t\t\t\t\tvar geo = this.model.getGeometry(cells[i]);\n\t\t\t\t\t\n\t\t\t\t\tif (geo != null)\n\t\t\t\t\t{\n\t\t\t\t\t\tvar state = this.view.getState(cells[i]);\n\t\t\t\t\t\tvar pstate = this.view.getState(\n\t\t\t\t\t\t\tthis.model.getParent(cells[i]));\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (state != null &&\n\t\t\t\t\t\t\tpstate != null)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tgeo = geo.clone();\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tvar dx = -pstate.origin.x;\n\t\t\t\t\t\t\tvar dy = -pstate.origin.y;\n\t\t\t\t\t\t\tvar pts = state.absolutePoints;\n\n\t\t\t\t\t\t\tvar src = this.model.getTerminal(cells[i], true);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif (src != null && this.isCellDisconnectable(cells[i], src, true))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\twhile (src != null && !dict.get(src))\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tsrc = this.model.getParent(src);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tif (src == null)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tgeo.setTerminalPoint(\n\t\t\t\t\t\t\t\t\t\tnew mxPoint(pts[0].x / scale - tr.x + dx,\n\t\t\t\t\t\t\t\t\t\t\tpts[0].y / scale - tr.y + dy), true);\n\t\t\t\t\t\t\t\t\tthis.model.setTerminal(cells[i], null, true);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tvar trg = this.model.getTerminal(cells[i], false);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif (trg != null && this.isCellDisconnectable(cells[i], trg, false))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\twhile (trg != null && !dict.get(trg))\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\ttrg = this.model.getParent(trg);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tif (trg == null)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tvar n = pts.length - 1;\n\t\t\t\t\t\t\t\t\tgeo.setTerminalPoint(\n\t\t\t\t\t\t\t\t\t\tnew mxPoint(pts[n].x / scale - tr.x + dx,\n\t\t\t\t\t\t\t\t\t\t\tpts[n].y / scale - tr.y + dy), false);\n\t\t\t\t\t\t\t\t\tthis.model.setTerminal(cells[i], null, false);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tthis.model.setGeometry(cells[i], geo);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tfinally\n\t\t{\n\t\t\tthis.model.endUpdate();\n\t\t}\n\t}\n};\n\n/**\n * Group: Drilldown\n */\n\n/**\n * Function: getCurrentRoot\n * \n * Returns the current root of the displayed cell hierarchy. This is a\n * shortcut to <mxGraphView.currentRoot> in <view>.\n */\nmxGraph.prototype.getCurrentRoot = function()\n{\n\treturn this.view.currentRoot;\n};\n \n/**\n * Function: getTranslateForRoot\n * \n * Returns the translation to be used if the given cell is the root cell as\n * an <mxPoint>. This implementation returns null.\n * \n * Example:\n * \n * To keep the children at their absolute position while stepping into groups,\n * this function can be overridden as follows.\n * \n * (code)\n * var offset = new mxPoint(0, 0);\n * \n * while (cell != null)\n * {\n *   var geo = this.model.getGeometry(cell);\n * \n *   if (geo != null)\n *   {\n *     offset.x -= geo.x;\n *     offset.y -= geo.y;\n *   }\n * \n *   cell = this.model.getParent(cell);\n * }\n * \n * return offset;\n * (end)\n * \n * Parameters:\n * \n * cell - <mxCell> that represents the root.\n */\nmxGraph.prototype.getTranslateForRoot = function(cell)\n{\n\treturn null;\n};\n\n/**\n * Function: isPort\n * \n * Returns true if the given cell is a \"port\", that is, when connecting to\n * it, the cell returned by getTerminalForPort should be used as the\n * terminal and the port should be referenced by the ID in either the\n * mxConstants.STYLE_SOURCE_PORT or the or the\n * mxConstants.STYLE_TARGET_PORT. Note that a port should not be movable.\n * This implementation always returns false.\n * \n * A typical implementation is the following:\n * \n * (code)\n * graph.isPort = function(cell)\n * {\n *   var geo = this.getCellGeometry(cell);\n *   \n *   return (geo != null) ? geo.relative : false;\n * };\n * (end)\n * \n * Parameters:\n * \n * cell - <mxCell> that represents the port.\n */\nmxGraph.prototype.isPort = function(cell)\n{\n\treturn false;\n};\n\n/**\n * Function: getTerminalForPort\n * \n * Returns the terminal to be used for a given port. This implementation\n * always returns the parent cell.\n * \n * Parameters:\n * \n * cell - <mxCell> that represents the port.\n * source - If the cell is the source or target port.\n */\nmxGraph.prototype.getTerminalForPort = function(cell, source)\n{\n\treturn this.model.getParent(cell);\n};\n\n/**\n * Function: getChildOffsetForCell\n * \n * Returns the offset to be used for the cells inside the given cell. The\n * root and layer cells may be identified using <mxGraphModel.isRoot> and\n * <mxGraphModel.isLayer>. For all other current roots, the\n * <mxGraphView.currentRoot> field points to the respective cell, so that\n * the following holds: cell == this.view.currentRoot. This implementation\n * returns null.\n * \n * Parameters:\n * \n * cell - <mxCell> whose offset should be returned.\n */\nmxGraph.prototype.getChildOffsetForCell = function(cell)\n{\n\treturn null;\n};\n\n/**\n * Function: enterGroup\n * \n * Uses the given cell as the root of the displayed cell hierarchy. If no\n * cell is specified then the selection cell is used. The cell is only used\n * if <isValidRoot> returns true.\n * \n * Parameters:\n * \n * cell - Optional <mxCell> to be used as the new root. Default is the\n * selection cell.\n */\nmxGraph.prototype.enterGroup = function(cell)\n{\n\tcell = cell || this.getSelectionCell();\n\t\n\tif (cell != null && this.isValidRoot(cell))\n\t{\n\t\tthis.view.setCurrentRoot(cell);\n\t\tthis.clearSelection();\n\t}\n};\n\n/**\n * Function: exitGroup\n * \n * Changes the current root to the next valid root in the displayed cell\n * hierarchy.\n */\nmxGraph.prototype.exitGroup = function()\n{\n\tvar root = this.model.getRoot();\n\tvar current = this.getCurrentRoot();\n\t\n\tif (current != null)\n\t{\n\t\tvar next = this.model.getParent(current);\n\t\t\n\t\t// Finds the next valid root in the hierarchy\n\t\twhile (next != root && !this.isValidRoot(next) &&\n\t\t\t\tthis.model.getParent(next) != root)\n\t\t{\n\t\t\tnext = this.model.getParent(next);\n\t\t}\n\t\t\n\t\t// Clears the current root if the new root is\n\t\t// the model's root or one of the layers.\n\t\tif (next == root || this.model.getParent(next) == root)\n\t\t{\n\t\t\tthis.view.setCurrentRoot(null);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tthis.view.setCurrentRoot(next);\n\t\t}\n\t\t\n\t\tvar state = this.view.getState(current);\n\t\t\n\t\t// Selects the previous root in the graph\n\t\tif (state != null)\n\t\t{\n\t\t\tthis.setSelectionCell(current);\n\t\t}\n\t}\n};\n\n/**\n * Function: home\n * \n * Uses the root of the model as the root of the displayed cell hierarchy\n * and selects the previous root.\n */\nmxGraph.prototype.home = function()\n{\n\tvar current = this.getCurrentRoot();\n\t\n\tif (current != null)\n\t{\n\t\tthis.view.setCurrentRoot(null);\n\t\tvar state = this.view.getState(current);\n\t\t\n\t\tif (state != null)\n\t\t{\n\t\t\tthis.setSelectionCell(current);\n\t\t}\n\t}\n};\n\n/**\n * Function: isValidRoot\n * \n * Returns true if the given cell is a valid root for the cell display\n * hierarchy. This implementation returns true for all non-null values.\n * \n * Parameters:\n * \n * cell - <mxCell> which should be checked as a possible root.\n */\nmxGraph.prototype.isValidRoot = function(cell)\n{\n\treturn (cell != null);\n};\n\n/**\n * Group: Graph display\n */\n \n/**\n * Function: getGraphBounds\n * \n * Returns the bounds of the visible graph. Shortcut to\n * <mxGraphView.getGraphBounds>. See also: <getBoundingBoxFromGeometry>.\n */\n mxGraph.prototype.getGraphBounds = function()\n {\n \treturn this.view.getGraphBounds();\n };\n\n/**\n * Function: getCellBounds\n * \n * Returns the scaled, translated bounds for the given cell. See\n * <mxGraphView.getBounds> for arrays.\n * \n * Parameters:\n * \n * cell - <mxCell> whose bounds should be returned.\n * includeEdge - Optional boolean that specifies if the bounds of\n * the connected edges should be included. Default is false.\n * includeDescendants - Optional boolean that specifies if the bounds\n * of all descendants should be included. Default is false.\n */\nmxGraph.prototype.getCellBounds = function(cell, includeEdges, includeDescendants)\n{\n\tvar cells = [cell];\n\t\n\t// Includes all connected edges\n\tif (includeEdges)\n\t{\n\t\tcells = cells.concat(this.model.getEdges(cell));\n\t}\n\t\n\tvar result = this.view.getBounds(cells);\n\t\n\t// Recursively includes the bounds of the children\n\tif (includeDescendants)\n\t{\n\t\tvar childCount = this.model.getChildCount(cell);\n\t\t\n\t\tfor (var i = 0; i < childCount; i++)\n\t\t{\n\t\t\tvar tmp = this.getCellBounds(this.model.getChildAt(cell, i),\n\t\t\t\tincludeEdges, true);\n\n\t\t\tif (result != null)\n\t\t\t{\n\t\t\t\tresult.add(tmp);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tresult = tmp;\n\t\t\t}\n\t\t}\n\t}\n\t\n\treturn result;\n};\n\n/**\n * Function: getBoundingBoxFromGeometry\n * \n * Returns the bounding box for the geometries of the vertices in the\n * given array of cells. This can be used to find the graph bounds during\n * a layout operation (ie. before the last endUpdate) as follows:\n * \n * (code)\n * var cells = graph.getChildCells(graph.getDefaultParent(), true, true);\n * var bounds = graph.getBoundingBoxFromGeometry(cells, true);\n * (end)\n * \n * This can then be used to move cells to the origin:\n * \n * (code)\n * if (bounds.x < 0 || bounds.y < 0)\n * {\n *   graph.moveCells(cells, -Math.min(bounds.x, 0), -Math.min(bounds.y, 0))\n * }\n * (end)\n * \n * Or to translate the graph view:\n * \n * (code)\n * if (bounds.x < 0 || bounds.y < 0)\n * {\n *   graph.view.setTranslate(-Math.min(bounds.x, 0), -Math.min(bounds.y, 0));\n * }\n * (end)\n * \n * Parameters:\n * \n * cells - Array of <mxCells> whose bounds should be returned.\n * includeEdges - Specifies if edge bounds should be included by computing\n * the bounding box for all points in geometry. Default is false.\n */\nmxGraph.prototype.getBoundingBoxFromGeometry = function(cells, includeEdges)\n{\n\tincludeEdges = (includeEdges != null) ? includeEdges : false;\n\tvar result = null;\n\t\n\tif (cells != null)\n\t{\n\t\tfor (var i = 0; i < cells.length; i++)\n\t\t{\n\t\t\tif (includeEdges || this.model.isVertex(cells[i]))\n\t\t\t{\n\t\t\t\t// Computes the bounding box for the points in the geometry\n\t\t\t\tvar geo = this.getCellGeometry(cells[i]);\n\t\t\t\t\n\t\t\t\tif (geo != null)\n\t\t\t\t{\n\t\t\t\t\tvar bbox = null;\n\t\t\t\t\t\n\t\t\t\t\tif (this.model.isEdge(cells[i]))\n\t\t\t\t\t{\n\t\t\t\t\t\tvar addPoint = function(pt)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif (pt != null)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif (tmp == null)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\ttmp = new mxRectangle(pt.x, pt.y, 0, 0);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\ttmp.add(new mxRectangle(pt.x, pt.y, 0, 0));\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t};\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (this.model.getTerminal(cells[i], true) == null)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\taddPoint(geo.getTerminalPoint(true));\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (this.model.getTerminal(cells[i], false) == null)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\taddPoint(geo.getTerminalPoint(false));\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\tvar pts = geo.points;\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (pts != null && pts.length > 0)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tvar tmp = new mxRectangle(pts[0].x, pts[0].y, 0, 0);\n\n\t\t\t\t\t\t\tfor (var j = 1; j < pts.length; j++)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\taddPoint(pts[j]);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tbbox = tmp;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tvar parent = this.model.getParent(cells[i]);\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (geo.relative)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif (this.model.isVertex(parent) && parent != this.view.currentRoot)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tvar tmp = this.getBoundingBoxFromGeometry([parent], false);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tif (tmp != null)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tbbox = new mxRectangle(geo.x * tmp.width, geo.y * tmp.height, geo.width, geo.height);\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tif (mxUtils.indexOf(cells, parent) >= 0)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tbbox.x += tmp.x;\n\t\t\t\t\t\t\t\t\t\tbbox.y += tmp.y;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tbbox = mxRectangle.fromRectangle(geo);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif (this.model.isVertex(parent) && mxUtils.indexOf(cells, parent) >= 0)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tvar tmp = this.getBoundingBoxFromGeometry([parent], false);\n\n\t\t\t\t\t\t\t\tif (tmp != null)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tbbox.x += tmp.x;\n\t\t\t\t\t\t\t\t\tbbox.y += tmp.y;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (bbox != null && geo.offset != null)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tbbox.x += geo.offset.x;\n\t\t\t\t\t\t\tbbox.y += geo.offset.y;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif (bbox != null)\n\t\t\t\t\t{\n\t\t\t\t\t\tif (result == null)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tresult = mxRectangle.fromRectangle(bbox);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tresult.add(bbox);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t\n\treturn result;\n};\n\n/**\n * Function: refresh\n * \n * Clears all cell states or the states for the hierarchy starting at the\n * given cell and validates the graph. This fires a refresh event as the\n * last step.\n * \n * Parameters:\n * \n * cell - Optional <mxCell> for which the cell states should be cleared.\n */\nmxGraph.prototype.refresh = function(cell)\n{\n\tthis.view.clear(cell, cell == null);\n\tthis.view.validate();\n\tthis.sizeDidChange();\n\tthis.fireEvent(new mxEventObject(mxEvent.REFRESH));\n};\n\n/**\n * Function: snap\n * \n * Snaps the given numeric value to the grid if <gridEnabled> is true.\n * \n * Parameters:\n * \n * value - Numeric value to be snapped to the grid.\n */\nmxGraph.prototype.snap = function(value)\n{\n\tif (this.gridEnabled)\n\t{\n\t\tvalue = Math.round(value / this.gridSize ) * this.gridSize;\n\t}\n\t\n\treturn value;\n};\n\n/**\n * Function: panGraph\n * \n * Shifts the graph display by the given amount. This is used to preview\n * panning operations, use <mxGraphView.setTranslate> to set a persistent\n * translation of the view. Fires <mxEvent.PAN>.\n * \n * Parameters:\n * \n * dx - Amount to shift the graph along the x-axis.\n * dy - Amount to shift the graph along the y-axis.\n */\nmxGraph.prototype.panGraph = function(dx, dy)\n{\n\tif (this.useScrollbarsForPanning && mxUtils.hasScrollbars(this.container))\n\t{\n\t\tthis.container.scrollLeft = -dx;\n\t\tthis.container.scrollTop = -dy;\n\t}\n\telse\n\t{\n\t\tvar canvas = this.view.getCanvas();\n\t\t\n\t\tif (this.dialect == mxConstants.DIALECT_SVG)\n\t\t{\n\t\t\t// Puts everything inside the container in a DIV so that it\n\t\t\t// can be moved without changing the state of the container\n\t\t\tif (dx == 0 && dy == 0)\n\t\t\t{\n\t\t\t\t// Workaround for ignored removeAttribute on SVG element in IE9 standards\n\t\t\t\tif (mxClient.IS_IE)\n\t\t\t\t{\n\t\t\t\t\tcanvas.setAttribute('transform', 'translate(' + dx + ',' + dy + ')');\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tcanvas.removeAttribute('transform');\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (this.shiftPreview1 != null)\n\t\t\t\t{\n\t\t\t\t\tvar child = this.shiftPreview1.firstChild;\n\t\t\t\t\t\n\t\t\t\t\twhile (child != null)\n\t\t\t\t\t{\n\t\t\t\t\t\tvar next = child.nextSibling;\n\t\t\t\t\t\tthis.container.appendChild(child);\n\t\t\t\t\t\tchild = next;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (this.shiftPreview1.parentNode != null)\n\t\t\t\t\t{\n\t\t\t\t\t\tthis.shiftPreview1.parentNode.removeChild(this.shiftPreview1);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tthis.shiftPreview1 = null;\n\t\t\t\t\t\n\t\t\t\t\tthis.container.appendChild(canvas.parentNode);\n\t\t\t\t\t\n\t\t\t\t\tchild = this.shiftPreview2.firstChild;\n\t\t\t\t\t\n\t\t\t\t\twhile (child != null)\n\t\t\t\t\t{\n\t\t\t\t\t\tvar next = child.nextSibling;\n\t\t\t\t\t\tthis.container.appendChild(child);\n\t\t\t\t\t\tchild = next;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (this.shiftPreview2.parentNode != null)\n\t\t\t\t\t{\n\t\t\t\t\t\tthis.shiftPreview2.parentNode.removeChild(this.shiftPreview2);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tthis.shiftPreview2 = null;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tcanvas.setAttribute('transform', 'translate(' + dx + ',' + dy + ')');\n\t\t\t\t\n\t\t\t\tif (this.shiftPreview1 == null)\n\t\t\t\t{\n\t\t\t\t\t// Needs two divs for stuff before and after the SVG element\n\t\t\t\t\tthis.shiftPreview1 = document.createElement('div');\n\t\t\t\t\tthis.shiftPreview1.style.position = 'absolute';\n\t\t\t\t\tthis.shiftPreview1.style.overflow = 'visible';\n\t\t\t\t\t\n\t\t\t\t\tthis.shiftPreview2 = document.createElement('div');\n\t\t\t\t\tthis.shiftPreview2.style.position = 'absolute';\n\t\t\t\t\tthis.shiftPreview2.style.overflow = 'visible';\n\n\t\t\t\t\tvar current = this.shiftPreview1;\n\t\t\t\t\tvar child = this.container.firstChild;\n\t\t\t\t\t\n\t\t\t\t\twhile (child != null)\n\t\t\t\t\t{\n\t\t\t\t\t\tvar next = child.nextSibling;\n\t\t\t\t\t\t\n\t\t\t\t\t\t// SVG element is moved via transform attribute\n\t\t\t\t\t\tif (child != canvas.parentNode)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcurrent.appendChild(child);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcurrent = this.shiftPreview2;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tchild = next;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// Inserts elements only if not empty\n\t\t\t\t\tif (this.shiftPreview1.firstChild != null)\n\t\t\t\t\t{\n\t\t\t\t\t\tthis.container.insertBefore(this.shiftPreview1, canvas.parentNode);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif (this.shiftPreview2.firstChild != null)\n\t\t\t\t\t{\n\t\t\t\t\t\tthis.container.appendChild(this.shiftPreview2);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tthis.shiftPreview1.style.left = dx + 'px';\n\t\t\t\tthis.shiftPreview1.style.top = dy + 'px';\n\t\t\t\tthis.shiftPreview2.style.left = dx + 'px';\n\t\t\t\tthis.shiftPreview2.style.top = dy + 'px';\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tcanvas.style.left = dx + 'px';\n\t\t\tcanvas.style.top = dy + 'px';\n\t\t}\n\t\t\n\t\tthis.panDx = dx;\n\t\tthis.panDy = dy;\n\n\t\tthis.fireEvent(new mxEventObject(mxEvent.PAN));\n\t}\n};\n\n/**\n * Function: zoomIn\n * \n * Zooms into the graph by <zoomFactor>.\n */\nmxGraph.prototype.zoomIn = function()\n{\n\tthis.zoom(this.zoomFactor);\n};\n\n/**\n * Function: zoomOut\n * \n * Zooms out of the graph by <zoomFactor>.\n */\nmxGraph.prototype.zoomOut = function()\n{\n\tthis.zoom(1 / this.zoomFactor);\n};\n\n/**\n * Function: zoomActual\n * \n * Resets the zoom and panning in the view.\n */\nmxGraph.prototype.zoomActual = function()\n{\n\tif (this.view.scale == 1)\n\t{\n\t\tthis.view.setTranslate(0, 0);\n\t}\n\telse\n\t{\n\t\tthis.view.translate.x = 0;\n\t\tthis.view.translate.y = 0;\n\n\t\tthis.view.setScale(1);\n\t}\n};\n\n/**\n * Function: zoomTo\n * \n * Zooms the graph to the given scale with an optional boolean center\n * argument, which is passd to <zoom>.\n */\nmxGraph.prototype.zoomTo = function(scale, center)\n{\n\tthis.zoom(scale / this.view.scale, center);\n};\n\n/**\n * Function: center\n * \n * Centers the graph in the container.\n * \n * Parameters:\n * \n * horizontal - Optional boolean that specifies if the graph should be centered\n * horizontally. Default is true.\n * vertical - Optional boolean that specifies if the graph should be centered\n * vertically. Default is true.\n * cx - Optional float that specifies the horizontal center. Default is 0.5.\n * cy - Optional float that specifies the vertical center. Default is 0.5.\n */\nmxGraph.prototype.center = function(horizontal, vertical, cx, cy)\n{\n\thorizontal = (horizontal != null) ? horizontal : true;\n\tvertical = (vertical != null) ? vertical : true;\n\tcx = (cx != null) ? cx : 0.5;\n\tcy = (cy != null) ? cy : 0.5;\n\t\n\tvar hasScrollbars = mxUtils.hasScrollbars(this.container);\n\tvar cw = this.container.clientWidth;\n\tvar ch = this.container.clientHeight;\n\tvar bounds = this.getGraphBounds();\n\n\tvar t = this.view.translate;\n\tvar s = this.view.scale;\n\n\tvar dx = (horizontal) ? cw - bounds.width : 0;\n\tvar dy = (vertical) ? ch - bounds.height : 0;\n\t\n\tif (!hasScrollbars)\n\t{\n\t\tthis.view.setTranslate((horizontal) ? Math.floor(t.x - bounds.x * s + dx * cx / s) : t.x,\n\t\t\t(vertical) ? Math.floor(t.y - bounds.y * s + dy * cy / s) : t.y);\n\t}\n\telse\n\t{\n\t\tbounds.x -= t.x;\n\t\tbounds.y -= t.y;\n\t\n\t\tvar sw = this.container.scrollWidth;\n\t\tvar sh = this.container.scrollHeight;\n\t\t\n\t\tif (sw > cw)\n\t\t{\n\t\t\tdx = 0;\n\t\t}\n\t\t\n\t\tif (sh > ch)\n\t\t{\n\t\t\tdy = 0;\n\t\t}\n\n\t\tthis.view.setTranslate(Math.floor(dx / 2 - bounds.x), Math.floor(dy / 2 - bounds.y));\n\t\tthis.container.scrollLeft = (sw - cw) / 2;\n\t\tthis.container.scrollTop = (sh - ch) / 2;\n\t}\n};\n\n/**\n * Function: zoom\n * \n * Zooms the graph using the given factor. Center is an optional boolean\n * argument that keeps the graph scrolled to the center. If the center argument\n * is omitted, then <centerZoom> will be used as its value.\n */\nmxGraph.prototype.zoom = function(factor, center)\n{\n\tcenter = (center != null) ? center : this.centerZoom;\n\tvar scale = Math.round(this.view.scale * factor * 100) / 100;\n\tvar state = this.view.getState(this.getSelectionCell());\n\tfactor = scale / this.view.scale;\n\t\n\tif (this.keepSelectionVisibleOnZoom && state != null)\n\t{\n\t\tvar rect = new mxRectangle(state.x * factor, state.y * factor,\n\t\t\tstate.width * factor, state.height * factor);\n\t\t\n\t\t// Refreshes the display only once if a scroll is carried out\n\t\tthis.view.scale = scale;\n\t\t\n\t\tif (!this.scrollRectToVisible(rect))\n\t\t{\n\t\t\tthis.view.revalidate();\n\t\t\t\n\t\t\t// Forces an event to be fired but does not revalidate again\n\t\t\tthis.view.setScale(scale);\n\t\t}\n\t}\n\telse\n\t{\n\t\tvar hasScrollbars = mxUtils.hasScrollbars(this.container);\n\t\t\n\t\tif (center && !hasScrollbars)\n\t\t{\n\t\t\tvar dx = this.container.offsetWidth;\n\t\t\tvar dy = this.container.offsetHeight;\n\t\t\t\n\t\t\tif (factor > 1)\n\t\t\t{\n\t\t\t\tvar f = (factor - 1) / (scale * 2);\n\t\t\t\tdx *= -f;\n\t\t\t\tdy *= -f;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tvar f = (1 / factor - 1) / (this.view.scale * 2);\n\t\t\t\tdx *= f;\n\t\t\t\tdy *= f;\n\t\t\t}\n\n\t\t\tthis.view.scaleAndTranslate(scale,\n\t\t\t\tthis.view.translate.x + dx,\n\t\t\t\tthis.view.translate.y + dy);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Allows for changes of translate and scrollbars during setscale\n\t\t\tvar tx = this.view.translate.x;\n\t\t\tvar ty = this.view.translate.y;\n\t\t\tvar sl = this.container.scrollLeft;\n\t\t\tvar st = this.container.scrollTop;\n\t\t\t\n\t\t\tthis.view.setScale(scale);\n\t\t\t\n\t\t\tif (hasScrollbars)\n\t\t\t{\n\t\t\t\tvar dx = 0;\n\t\t\t\tvar dy = 0;\n\t\t\t\t\n\t\t\t\tif (center)\n\t\t\t\t{\n\t\t\t\t\tdx = this.container.offsetWidth * (factor - 1) / 2;\n\t\t\t\t\tdy = this.container.offsetHeight * (factor - 1) / 2;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tthis.container.scrollLeft = (this.view.translate.x - tx) * this.view.scale + Math.round(sl * factor + dx);\n\t\t\t\tthis.container.scrollTop = (this.view.translate.y - ty) * this.view.scale + Math.round(st * factor + dy);\n\t\t\t}\n\t\t}\n\t}\n};\n\n/**\n * Function: zoomToRect\n * \n * Zooms the graph to the specified rectangle. If the rectangle does not have same aspect\n * ratio as the display container, it is increased in the smaller relative dimension only\n * until the aspect match. The original rectangle is centralised within this expanded one.\n * \n * Note that the input rectangular must be un-scaled and un-translated.\n * \n * Parameters:\n * \n * rect - The un-scaled and un-translated rectangluar region that should be just visible \n * after the operation\n */\nmxGraph.prototype.zoomToRect = function(rect)\n{\n\tvar scaleX = this.container.clientWidth / rect.width;\n\tvar scaleY = this.container.clientHeight / rect.height;\n\tvar aspectFactor = scaleX / scaleY;\n\n\t// Remove any overlap of the rect outside the client area\n\trect.x = Math.max(0, rect.x);\n\trect.y = Math.max(0, rect.y);\n\tvar rectRight = Math.min(this.container.scrollWidth, rect.x + rect.width);\n\tvar rectBottom = Math.min(this.container.scrollHeight, rect.y + rect.height);\n\trect.width = rectRight - rect.x;\n\trect.height = rectBottom - rect.y;\n\n\t// The selection area has to be increased to the same aspect\n\t// ratio as the container, centred around the centre point of the \n\t// original rect passed in.\n\tif (aspectFactor < 1.0)\n\t{\n\t\t// Height needs increasing\n\t\tvar newHeight = rect.height / aspectFactor;\n\t\tvar deltaHeightBuffer = (newHeight - rect.height) / 2.0;\n\t\trect.height = newHeight;\n\t\t\n\t\t// Assign up to half the buffer to the upper part of the rect, not crossing 0\n\t\t// put the rest on the bottom\n\t\tvar upperBuffer = Math.min(rect.y , deltaHeightBuffer);\n\t\trect.y = rect.y - upperBuffer;\n\t\t\n\t\t// Check if the bottom has extended too far\n\t\trectBottom = Math.min(this.container.scrollHeight, rect.y + rect.height);\n\t\trect.height = rectBottom - rect.y;\n\t}\n\telse\n\t{\n\t\t// Width needs increasing\n\t\tvar newWidth = rect.width * aspectFactor;\n\t\tvar deltaWidthBuffer = (newWidth - rect.width) / 2.0;\n\t\trect.width = newWidth;\n\t\t\n\t\t// Assign up to half the buffer to the upper part of the rect, not crossing 0\n\t\t// put the rest on the bottom\n\t\tvar leftBuffer = Math.min(rect.x , deltaWidthBuffer);\n\t\trect.x = rect.x - leftBuffer;\n\t\t\n\t\t// Check if the right hand side has extended too far\n\t\trectRight = Math.min(this.container.scrollWidth, rect.x + rect.width);\n\t\trect.width = rectRight - rect.x;\n\t}\n\n\tvar scale = this.container.clientWidth / rect.width;\n\tvar newScale = this.view.scale * scale;\n\n\tif (!mxUtils.hasScrollbars(this.container))\n\t{\n\t\tthis.view.scaleAndTranslate(newScale, (this.view.translate.x - rect.x / this.view.scale), (this.view.translate.y - rect.y / this.view.scale));\n\t}\n\telse\n\t{\n\t\tthis.view.setScale(newScale);\n\t\tthis.container.scrollLeft = Math.round(rect.x * scale);\n\t\tthis.container.scrollTop = Math.round(rect.y * scale);\n\t}\n};\n\n/**\n * Function: scrollCellToVisible\n * \n * Pans the graph so that it shows the given cell. Optionally the cell may\n * be centered in the container.\n * \n * To center a given graph if the <container> has no scrollbars, use the following code.\n * \n * [code]\n * var bounds = graph.getGraphBounds();\n * graph.view.setTranslate(-bounds.x - (bounds.width - container.clientWidth) / 2,\n * \t\t\t\t\t\t   -bounds.y - (bounds.height - container.clientHeight) / 2);\n * [/code]\n * \n * Parameters:\n * \n * cell - <mxCell> to be made visible.\n * center - Optional boolean flag. Default is false.\n */\nmxGraph.prototype.scrollCellToVisible = function(cell, center)\n{\n\tvar x = -this.view.translate.x;\n\tvar y = -this.view.translate.y;\n\n\tvar state = this.view.getState(cell);\n\n\tif (state != null)\n\t{\n\t\tvar bounds = new mxRectangle(x + state.x, y + state.y, state.width,\n\t\t\tstate.height);\n\n\t\tif (center && this.container != null)\n\t\t{\n\t\t\tvar w = this.container.clientWidth;\n\t\t\tvar h = this.container.clientHeight;\n\n\t\t\tbounds.x = bounds.getCenterX() - w / 2;\n\t\t\tbounds.width = w;\n\t\t\tbounds.y = bounds.getCenterY() - h / 2;\n\t\t\tbounds.height = h;\n\t\t}\n\t\t\n\t\tvar tr = new mxPoint(this.view.translate.x, this.view.translate.y);\n\n\t\tif (this.scrollRectToVisible(bounds))\n\t\t{\n\t\t\t// Triggers an update via the view's event source\n\t\t\tvar tr2 = new mxPoint(this.view.translate.x, this.view.translate.y);\n\t\t\tthis.view.translate.x = tr.x;\n\t\t\tthis.view.translate.y = tr.y;\n\t\t\tthis.view.setTranslate(tr2.x, tr2.y);\n\t\t}\n\t}\n};\n\n/**\n * Function: scrollRectToVisible\n * \n * Pans the graph so that it shows the given rectangle.\n * \n * Parameters:\n * \n * rect - <mxRectangle> to be made visible.\n */\nmxGraph.prototype.scrollRectToVisible = function(rect)\n{\n\tvar isChanged = false;\n\t\n\tif (rect != null)\n\t{\n\t\tvar w = this.container.offsetWidth;\n\t\tvar h = this.container.offsetHeight;\n\n        var widthLimit = Math.min(w, rect.width);\n        var heightLimit = Math.min(h, rect.height);\n\n\t\tif (mxUtils.hasScrollbars(this.container))\n\t\t{\n\t\t\tvar c = this.container;\n\t\t\trect.x += this.view.translate.x;\n\t\t\trect.y += this.view.translate.y;\n\t\t\tvar dx = c.scrollLeft - rect.x;\n\t\t\tvar ddx = Math.max(dx - c.scrollLeft, 0);\n\n\t\t\tif (dx > 0)\n\t\t\t{\n\t\t\t\tc.scrollLeft -= dx + 2;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tdx = rect.x + widthLimit - c.scrollLeft - c.clientWidth;\n\n\t\t\t\tif (dx > 0)\n\t\t\t\t{\n\t\t\t\t\tc.scrollLeft += dx + 2;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tvar dy = c.scrollTop - rect.y;\n\t\t\tvar ddy = Math.max(0, dy - c.scrollTop);\n\n\t\t\tif (dy > 0)\n\t\t\t{\n\t\t\t\tc.scrollTop -= dy + 2;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tdy = rect.y + heightLimit - c.scrollTop - c.clientHeight;\n\n\t\t\t\tif (dy > 0)\n\t\t\t\t{\n\t\t\t\t\tc.scrollTop += dy + 2;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (!this.useScrollbarsForPanning && (ddx != 0 || ddy != 0))\n\t\t\t{\n\t\t\t\tthis.view.setTranslate(ddx, ddy);\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tvar x = -this.view.translate.x;\n\t\t\tvar y = -this.view.translate.y;\n\n\t\t\tvar s = this.view.scale;\n\n\t\t\tif (rect.x + widthLimit > x + w)\n\t\t\t{\n\t\t\t\tthis.view.translate.x -= (rect.x + widthLimit - w - x) / s;\n\t\t\t\tisChanged = true;\n\t\t\t}\n\n\t\t\tif (rect.y + heightLimit > y + h)\n\t\t\t{\n\t\t\t\tthis.view.translate.y -= (rect.y + heightLimit - h - y) / s;\n\t\t\t\tisChanged = true;\n\t\t\t}\n\n\t\t\tif (rect.x < x)\n\t\t\t{\n\t\t\t\tthis.view.translate.x += (x - rect.x) / s;\n\t\t\t\tisChanged = true;\n\t\t\t}\n\n\t\t\tif (rect.y  < y)\n\t\t\t{\n\t\t\t\tthis.view.translate.y += (y - rect.y) / s;\n\t\t\t\tisChanged = true;\n\t\t\t}\n\n\t\t\tif (isChanged)\n\t\t\t{\n\t\t\t\tthis.view.refresh();\n\t\t\t\t\n\t\t\t\t// Repaints selection marker (ticket 18)\n\t\t\t\tif (this.selectionCellsHandler != null)\n\t\t\t\t{\n\t\t\t\t\tthis.selectionCellsHandler.refresh();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn isChanged;\n};\n\n/**\n * Function: getCellGeometry\n * \n * Returns the <mxGeometry> for the given cell. This implementation uses\n * <mxGraphModel.getGeometry>. Subclasses can override this to implement\n * specific geometries for cells in only one graph, that is, it can return\n * geometries that depend on the current state of the view.\n * \n * Parameters:\n * \n * cell - <mxCell> whose geometry should be returned.\n */\nmxGraph.prototype.getCellGeometry = function(cell)\n{\n\treturn this.model.getGeometry(cell);\n};\n\n/**\n * Function: isCellVisible\n * \n * Returns true if the given cell is visible in this graph. This\n * implementation uses <mxGraphModel.isVisible>. Subclassers can override\n * this to implement specific visibility for cells in only one graph, that\n * is, without affecting the visible state of the cell.\n * \n * When using dynamic filter expressions for cell visibility, then the\n * graph should be revalidated after the filter expression has changed.\n * \n * Parameters:\n * \n * cell - <mxCell> whose visible state should be returned.\n */\nmxGraph.prototype.isCellVisible = function(cell)\n{\n\treturn this.model.isVisible(cell);\n};\n\n/**\n * Function: isCellCollapsed\n * \n * Returns true if the given cell is collapsed in this graph. This\n * implementation uses <mxGraphModel.isCollapsed>. Subclassers can override\n * this to implement specific collapsed states for cells in only one graph,\n * that is, without affecting the collapsed state of the cell.\n * \n * When using dynamic filter expressions for the collapsed state, then the\n * graph should be revalidated after the filter expression has changed.\n * \n * Parameters:\n * \n * cell - <mxCell> whose collapsed state should be returned.\n */\nmxGraph.prototype.isCellCollapsed = function(cell)\n{\n\treturn this.model.isCollapsed(cell);\n};\n\n/**\n * Function: isCellConnectable\n * \n * Returns true if the given cell is connectable in this graph. This\n * implementation uses <mxGraphModel.isConnectable>. Subclassers can override\n * this to implement specific connectable states for cells in only one graph,\n * that is, without affecting the connectable state of the cell in the model.\n * \n * Parameters:\n * \n * cell - <mxCell> whose connectable state should be returned.\n */\nmxGraph.prototype.isCellConnectable = function(cell)\n{\n\treturn this.model.isConnectable(cell);\n};\n\n/**\n * Function: isOrthogonal\n * \n * Returns true if perimeter points should be computed such that the\n * resulting edge has only horizontal or vertical segments.\n * \n * Parameters:\n * \n * edge - <mxCellState> that represents the edge.\n */\nmxGraph.prototype.isOrthogonal = function(edge)\n{\n\tvar orthogonal = edge.style[mxConstants.STYLE_ORTHOGONAL];\n\t\n\tif (orthogonal != null)\n\t{\n\t\treturn orthogonal;\n\t}\n\t\n\tvar tmp = this.view.getEdgeStyle(edge);\n\t\n\treturn tmp == mxEdgeStyle.SegmentConnector ||\n\t\ttmp == mxEdgeStyle.ElbowConnector ||\n\t\ttmp == mxEdgeStyle.SideToSide ||\n\t\ttmp == mxEdgeStyle.TopToBottom ||\n\t\ttmp == mxEdgeStyle.EntityRelation ||\n\t\ttmp == mxEdgeStyle.OrthConnector;\n};\n\n/**\n * Function: isLoop\n * \n * Returns true if the given cell state is a loop.\n * \n * Parameters:\n * \n * state - <mxCellState> that represents a potential loop.\n */\nmxGraph.prototype.isLoop = function(state)\n{\n\tvar src = state.getVisibleTerminalState(true);\n\tvar trg = state.getVisibleTerminalState(false);\n\t\n\treturn (src != null && src == trg);\n};\n\n/**\n * Function: isCloneEvent\n * \n * Returns true if the given event is a clone event. This implementation\n * returns true if control is pressed.\n */\nmxGraph.prototype.isCloneEvent = function(evt)\n{\n\treturn mxEvent.isControlDown(evt);\n};\n\n/**\n * Function: isTransparentClickEvent\n * \n * Hook for implementing click-through behaviour on selected cells. If this\n * returns true the cell behind the selected cell will be selected. This\n * implementation returns false;\n */\nmxGraph.prototype.isTransparentClickEvent = function(evt)\n{\n\treturn false;\n};\n\n/**\n * Function: isToggleEvent\n * \n * Returns true if the given event is a toggle event. This implementation\n * returns true if the meta key (Cmd) is pressed on Macs or if control is\n * pressed on any other platform.\n */\nmxGraph.prototype.isToggleEvent = function(evt)\n{\n\treturn (mxClient.IS_MAC) ? mxEvent.isMetaDown(evt) : mxEvent.isControlDown(evt);\n};\n\n/**\n * Function: isGridEnabledEvent\n * \n * Returns true if the given mouse event should be aligned to the grid.\n */\nmxGraph.prototype.isGridEnabledEvent = function(evt)\n{\n\treturn evt != null && !mxEvent.isAltDown(evt);\n};\n\n/**\n * Function: isConstrainedEvent\n * \n * Returns true if the given mouse event should be aligned to the grid.\n */\nmxGraph.prototype.isConstrainedEvent = function(evt)\n{\n\treturn mxEvent.isShiftDown(evt);\n};\n\n/**\n * Function: isIgnoreTerminalEvent\n * \n * Returns true if the given mouse event should not allow any connections to be\n * made. This implementation returns false.\n */\nmxGraph.prototype.isIgnoreTerminalEvent = function(evt)\n{\n\treturn false;\n};\n\n/**\n * Group: Validation\n */\n\n/**\n * Function: validationAlert\n * \n * Displays the given validation error in a dialog. This implementation uses\n * mxUtils.alert.\n */\nmxGraph.prototype.validationAlert = function(message)\n{\n\tmxUtils.alert(message);\n};\n\n/**\n * Function: isEdgeValid\n * \n * Checks if the return value of <getEdgeValidationError> for the given\n * arguments is null.\n *  \n * Parameters:\n * \n * edge - <mxCell> that represents the edge to validate.\n * source - <mxCell> that represents the source terminal.\n * target - <mxCell> that represents the target terminal.\n */\nmxGraph.prototype.isEdgeValid = function(edge, source, target)\n{\n\treturn this.getEdgeValidationError(edge, source, target) == null;\n};\n\n/**\n * Function: getEdgeValidationError\n * \n * Returns the validation error message to be displayed when inserting or\n * changing an edges' connectivity. A return value of null means the edge\n * is valid, a return value of '' means it's not valid, but do not display\n * an error message. Any other (non-empty) string returned from this method\n * is displayed as an error message when trying to connect an edge to a\n * source and target. This implementation uses the <multiplicities>, and\n * checks <multigraph>, <allowDanglingEdges> and <allowLoops> to generate\n * validation errors.\n * \n * For extending this method with specific checks for source/target cells,\n * the method can be extended as follows. Returning an empty string means\n * the edge is invalid with no error message, a non-null string specifies\n * the error message, and null means the edge is valid.\n * \n * (code)\n * graph.getEdgeValidationError = function(edge, source, target)\n * {\n *   if (source != null && target != null &&\n *     this.model.getValue(source) != null &&\n *     this.model.getValue(target) != null)\n *   {\n *     if (target is not valid for source)\n *     {\n *       return 'Invalid Target';\n *     }\n *   }\n *   \n *   // \"Supercall\"\n *   return mxGraph.prototype.getEdgeValidationError.apply(this, arguments);\n * }\n * (end)\n *  \n * Parameters:\n * \n * edge - <mxCell> that represents the edge to validate.\n * source - <mxCell> that represents the source terminal.\n * target - <mxCell> that represents the target terminal.\n */\nmxGraph.prototype.getEdgeValidationError = function(edge, source, target)\n{\n\tif (edge != null && !this.isAllowDanglingEdges() && (source == null || target == null))\n\t{\n\t\treturn '';\n\t}\n\t\n\tif (edge != null && this.model.getTerminal(edge, true) == null &&\n\t\tthis.model.getTerminal(edge, false) == null)\t\n\t{\n\t\treturn null;\n\t}\n\t\n\t// Checks if we're dealing with a loop\n\tif (!this.allowLoops && source == target && source != null)\n\t{\n\t\treturn '';\n\t}\n\t\n\t// Checks if the connection is generally allowed\n\tif (!this.isValidConnection(source, target))\n\t{\n\t\treturn '';\n\t}\n\n\tif (source != null && target != null)\n\t{\n\t\tvar error = '';\n\n\t\t// Checks if the cells are already connected\n\t\t// and adds an error message if required\t\t\t\n\t\tif (!this.multigraph)\n\t\t{\n\t\t\tvar tmp = this.model.getEdgesBetween(source, target, true);\n\t\t\t\n\t\t\t// Checks if the source and target are not connected by another edge\n\t\t\tif (tmp.length > 1 || (tmp.length == 1 && tmp[0] != edge))\n\t\t\t{\n\t\t\t\terror += (mxResources.get(this.alreadyConnectedResource) ||\n\t\t\t\t\tthis.alreadyConnectedResource)+'\\n';\n\t\t\t}\n\t\t}\n\n\t\t// Gets the number of outgoing edges from the source\n\t\t// and the number of incoming edges from the target\n\t\t// without counting the edge being currently changed.\n\t\tvar sourceOut = this.model.getDirectedEdgeCount(source, true, edge);\n\t\tvar targetIn = this.model.getDirectedEdgeCount(target, false, edge);\n\n\t\t// Checks the change against each multiplicity rule\n\t\tif (this.multiplicities != null)\n\t\t{\n\t\t\tfor (var i = 0; i < this.multiplicities.length; i++)\n\t\t\t{\n\t\t\t\tvar err = this.multiplicities[i].check(this, edge, source,\n\t\t\t\t\ttarget, sourceOut, targetIn);\n\t\t\t\t\n\t\t\t\tif (err != null)\n\t\t\t\t{\n\t\t\t\t\terror += err;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Validates the source and target terminals independently\n\t\tvar err = this.validateEdge(edge, source, target);\n\t\t\n\t\tif (err != null)\n\t\t{\n\t\t\terror += err;\n\t\t}\n\t\t\n\t\treturn (error.length > 0) ? error : null;\n\t}\n\t\n\treturn (this.allowDanglingEdges) ? null : '';\n};\n\n/**\n * Function: validateEdge\n * \n * Hook method for subclassers to return an error message for the given\n * edge and terminals. This implementation returns null.\n * \n * Parameters:\n * \n * edge - <mxCell> that represents the edge to validate.\n * source - <mxCell> that represents the source terminal.\n * target - <mxCell> that represents the target terminal.\n */\nmxGraph.prototype.validateEdge = function(edge, source, target)\n{\n\treturn null;\n};\n\n/**\n * Function: validateGraph\n * \n * Validates the graph by validating each descendant of the given cell or\n * the root of the model. Context is an object that contains the validation\n * state for the complete validation run. The validation errors are\n * attached to their cells using <setCellWarning>. Returns null in the case of\n * successful validation or an array of strings (warnings) in the case of\n * failed validations.\n * \n * Paramters:\n * \n * cell - Optional <mxCell> to start the validation recursion. Default is\n * the graph root.\n * context - Object that represents the global validation state.\n */\nmxGraph.prototype.validateGraph = function(cell, context)\n{\n\tcell = (cell != null) ? cell : this.model.getRoot();\n\tcontext = (context != null) ? context : new Object();\n\t\n\tvar isValid = true;\n\tvar childCount = this.model.getChildCount(cell);\n\t\n\tfor (var i = 0; i < childCount; i++)\n\t{\n\t\tvar tmp = this.model.getChildAt(cell, i);\n\t\tvar ctx = context;\n\t\t\n\t\tif (this.isValidRoot(tmp))\n\t\t{\n\t\t\tctx = new Object();\n\t\t}\n\t\t\n\t\tvar warn = this.validateGraph(tmp, ctx);\n\t\t\n\t\tif (warn != null)\n\t\t{\n\t\t\tthis.setCellWarning(tmp, warn.replace(/\\n/g, '<br>'));\n\t\t}\n\t\telse\n\t\t{\n\t\t\tthis.setCellWarning(tmp, null);\n\t\t}\n\t\t\n\t\tisValid = isValid && warn == null;\n\t}\n\t\n\tvar warning = '';\n\t\n\t// Adds error for invalid children if collapsed (children invisible)\n\tif (this.isCellCollapsed(cell) && !isValid)\n\t{\n\t\twarning += (mxResources.get(this.containsValidationErrorsResource) ||\n\t\t\tthis.containsValidationErrorsResource) + '\\n';\n\t}\n\t\n\t// Checks edges and cells using the defined multiplicities\n\tif (this.model.isEdge(cell))\n\t{\n\t\twarning += this.getEdgeValidationError(cell,\n\t\tthis.model.getTerminal(cell, true),\n\t\tthis.model.getTerminal(cell, false)) || '';\n\t}\n\telse\n\t{\n\t\twarning += this.getCellValidationError(cell) || '';\n\t}\n\t\n\t// Checks custom validation rules\n\tvar err = this.validateCell(cell, context);\n\t\n\tif (err != null)\n\t{\n\t\twarning += err;\n\t}\n\t\n\t// Updates the display with the warning icons\n\t// before any potential alerts are displayed.\n\t// LATER: Move this into addCellOverlay. Redraw\n\t// should check if overlay was added or removed.\n\tif (this.model.getParent(cell) == null)\n\t{\n\t\tthis.view.validate();\n\t}\n\n\treturn (warning.length > 0 || !isValid) ? warning : null;\n};\n\n/**\n * Function: getCellValidationError\n * \n * Checks all <multiplicities> that cannot be enforced while the graph is\n * being modified, namely, all multiplicities that require a minimum of\n * 1 edge.\n * \n * Parameters:\n * \n * cell - <mxCell> for which the multiplicities should be checked.\n */\nmxGraph.prototype.getCellValidationError = function(cell)\n{\n\tvar outCount = this.model.getDirectedEdgeCount(cell, true);\n\tvar inCount = this.model.getDirectedEdgeCount(cell, false);\n\tvar value = this.model.getValue(cell);\n\tvar error = '';\n\n\tif (this.multiplicities != null)\n\t{\n\t\tfor (var i = 0; i < this.multiplicities.length; i++)\n\t\t{\n\t\t\tvar rule = this.multiplicities[i];\n\t\t\t\n\t\t\tif (rule.source && mxUtils.isNode(value, rule.type,\n\t\t\t\trule.attr, rule.value) && (outCount > rule.max ||\n\t\t\t\toutCount < rule.min))\n\t\t\t{\n\t\t\t\terror += rule.countError + '\\n';\n\t\t\t}\n\t\t\telse if (!rule.source && mxUtils.isNode(value, rule.type,\n\t\t\t\t\trule.attr, rule.value) && (inCount > rule.max ||\n\t\t\t\t\tinCount < rule.min))\n\t\t\t{\n\t\t\t\terror += rule.countError + '\\n';\n\t\t\t}\n\t\t}\n\t}\n\n\treturn (error.length > 0) ? error : null;\n};\n\n/**\n * Function: validateCell\n * \n * Hook method for subclassers to return an error message for the given\n * cell and validation context. This implementation returns null. Any HTML\n * breaks will be converted to linefeeds in the calling method.\n * \n * Parameters:\n * \n * cell - <mxCell> that represents the cell to validate.\n * context - Object that represents the global validation state.\n */\nmxGraph.prototype.validateCell = function(cell, context)\n{\n\treturn null;\n};\n\n/**\n * Group: Graph appearance\n */\n\n/**\n * Function: getBackgroundImage\n * \n * Returns the <backgroundImage> as an <mxImage>.\n */\nmxGraph.prototype.getBackgroundImage = function()\n{\n\treturn this.backgroundImage;\n};\n\n/**\n * Function: setBackgroundImage\n * \n * Sets the new <backgroundImage>.\n * \n * Parameters:\n * \n * image - New <mxImage> to be used for the background.\n */\nmxGraph.prototype.setBackgroundImage = function(image)\n{\n\tthis.backgroundImage = image;\n};\n\n/**\n * Function: getFoldingImage\n * \n * Returns the <mxImage> used to display the collapsed state of\n * the specified cell state. This returns null for all edges.\n */\nmxGraph.prototype.getFoldingImage = function(state)\n{\n\tif (state != null && this.foldingEnabled && !this.getModel().isEdge(state.cell))\n\t{\n\t\tvar tmp = this.isCellCollapsed(state.cell);\n\t\t\n\t\tif (this.isCellFoldable(state.cell, !tmp))\n\t\t{\n\t\t\treturn (tmp) ? this.collapsedImage : this.expandedImage;\n\t\t}\n\t}\n\t\n\treturn null;\n};\n\n/**\n * Function: convertValueToString\n * \n * Returns the textual representation for the given cell. This\n * implementation returns the nodename or string-representation of the user\n * object.\n *\n * Example:\n * \n * The following returns the label attribute from the cells user\n * object if it is an XML node.\n * \n * (code)\n * graph.convertValueToString = function(cell)\n * {\n * \treturn cell.getAttribute('label');\n * }\n * (end)\n * \n * See also: <cellLabelChanged>.\n * \n * Parameters:\n * \n * cell - <mxCell> whose textual representation should be returned.\n */\nmxGraph.prototype.convertValueToString = function(cell)\n{\n\tvar value = this.model.getValue(cell);\n\t\n\tif (value != null)\n\t{\n\t\tif (mxUtils.isNode(value))\n\t\t{\n\t\t\treturn value.nodeName;\n\t\t}\n\t\telse if (typeof(value.toString) == 'function')\n\t\t{\n\t\t\treturn value.toString();\n\t\t}\n\t}\n\t\n\treturn '';\n};\n\n/**\n * Function: getLabel\n * \n * Returns a string or DOM node that represents the label for the given\n * cell. This implementation uses <convertValueToString> if <labelsVisible>\n * is true. Otherwise it returns an empty string.\n * \n * To truncate a label to match the size of the cell, the following code\n * can be used.\n * \n * (code)\n * graph.getLabel = function(cell)\n * {\n *   var label = mxGraph.prototype.getLabel.apply(this, arguments);\n * \n *   if (label != null && this.model.isVertex(cell))\n *   {\n *     var geo = this.getCellGeometry(cell);\n * \n *     if (geo != null)\n *     {\n *       var max = parseInt(geo.width / 8);\n * \n *       if (label.length > max)\n *       {\n *         label = label.substring(0, max)+'...';\n *       }\n *     }\n *   } \n *   return mxUtils.htmlEntities(label);\n * }\n * (end)\n * \n * A resize listener is needed in the graph to force a repaint of the label\n * after a resize.\n * \n * (code)\n * graph.addListener(mxEvent.RESIZE_CELLS, function(sender, evt)\n * {\n *   var cells = evt.getProperty('cells');\n * \n *   for (var i = 0; i < cells.length; i++)\n *   {\n *     this.view.removeState(cells[i]);\n *   }\n * });\n * (end)\n * \n * Parameters:\n * \n * cell - <mxCell> whose label should be returned.\n */\nmxGraph.prototype.getLabel = function(cell)\n{\n\tvar result = '';\n\t\n\tif (this.labelsVisible && cell != null)\n\t{\n\t\tvar state = this.view.getState(cell);\n\t\tvar style = (state != null) ? state.style : this.getCellStyle(cell);\n\t\t\n\t\tif (!mxUtils.getValue(style, mxConstants.STYLE_NOLABEL, false))\n\t\t{\n\t\t\tresult = this.convertValueToString(cell);\n\t\t}\n\t}\n\t\n\treturn result;\n};\n\n/**\n * Function: isHtmlLabel\n * \n * Returns true if the label must be rendered as HTML markup. The default\n * implementation returns <htmlLabels>.\n * \n * Parameters:\n * \n * cell - <mxCell> whose label should be displayed as HTML markup.\n */\nmxGraph.prototype.isHtmlLabel = function(cell)\n{\n\treturn this.isHtmlLabels();\n};\n \n/**\n * Function: isHtmlLabels\n * \n * Returns <htmlLabels>.\n */\nmxGraph.prototype.isHtmlLabels = function()\n{\n\treturn this.htmlLabels;\n};\n \n/**\n * Function: setHtmlLabels\n * \n * Sets <htmlLabels>.\n */\nmxGraph.prototype.setHtmlLabels = function(value)\n{\n\tthis.htmlLabels = value;\n};\n\n/**\n * Function: isWrapping\n * \n * This enables wrapping for HTML labels.\n * \n * Returns true if no white-space CSS style directive should be used for\n * displaying the given cells label. This implementation returns true if\n * <mxConstants.STYLE_WHITE_SPACE> in the style of the given cell is 'wrap'.\n * \n * This is used as a workaround for IE ignoring the white-space directive\n * of child elements if the directive appears in a parent element. It\n * should be overridden to return true if a white-space directive is used\n * in the HTML markup that represents the given cells label. In order for\n * HTML markup to work in labels, <isHtmlLabel> must also return true\n * for the given cell.\n * \n * Example:\n * \n * (code)\n * graph.getLabel = function(cell)\n * {\n *   var tmp = mxGraph.prototype.getLabel.apply(this, arguments); // \"supercall\"\n *   \n *   if (this.model.isEdge(cell))\n *   {\n *     tmp = '<div style=\"width: 150px; white-space:normal;\">'+tmp+'</div>';\n *   }\n *   \n *   return tmp;\n * }\n * \n * graph.isWrapping = function(state)\n * {\n * \t return this.model.isEdge(state.cell);\n * }\n * (end)\n * \n * Makes sure no edge label is wider than 150 pixels, otherwise the content\n * is wrapped. Note: No width must be specified for wrapped vertex labels as\n * the vertex defines the width in its geometry.\n * \n * Parameters:\n * \n * state - <mxCell> whose label should be wrapped.\n */\nmxGraph.prototype.isWrapping = function(cell)\n{\n\tvar state = this.view.getState(cell);\n\tvar style = (state != null) ? state.style : this.getCellStyle(cell);\n\n\treturn (style != null) ? style[mxConstants.STYLE_WHITE_SPACE] == 'wrap' : false;\n};\n\n/**\n * Function: isLabelClipped\n * \n * Returns true if the overflow portion of labels should be hidden. If this\n * returns true then vertex labels will be clipped to the size of the vertices.\n * This implementation returns true if <mxConstants.STYLE_OVERFLOW> in the\n * style of the given cell is 'hidden'.\n * \n * Parameters:\n * \n * state - <mxCell> whose label should be clipped.\n */\nmxGraph.prototype.isLabelClipped = function(cell)\n{\n\tvar state = this.view.getState(cell);\n\tvar style = (state != null) ? state.style : this.getCellStyle(cell);\n\n\treturn (style != null) ? style[mxConstants.STYLE_OVERFLOW] == 'hidden' : false;\n};\n\n/**\n * Function: getTooltip\n * \n * Returns the string or DOM node that represents the tooltip for the given\n * state, node and coordinate pair. This implementation checks if the given\n * node is a folding icon or overlay and returns the respective tooltip. If\n * this does not result in a tooltip, the handler for the cell is retrieved\n * from <selectionCellsHandler> and the optional getTooltipForNode method is\n * called. If no special tooltip exists here then <getTooltipForCell> is used\n * with the cell in the given state as the argument to return a tooltip for the\n * given state.\n * \n * Parameters:\n * \n * state - <mxCellState> whose tooltip should be returned.\n * node - DOM node that is currently under the mouse.\n * x - X-coordinate of the mouse.\n * y - Y-coordinate of the mouse.\n */\nmxGraph.prototype.getTooltip = function(state, node, x, y)\n{\n\tvar tip = null;\n\t\n\tif (state != null)\n\t{\n\t\t// Checks if the mouse is over the folding icon\n\t\tif (state.control != null && (node == state.control.node ||\n\t\t\tnode.parentNode == state.control.node))\n\t\t{\n\t\t\ttip = this.collapseExpandResource;\n\t\t\ttip = mxUtils.htmlEntities(mxResources.get(tip) || tip).replace(/\\\\n/g, '<br>');\n\t\t}\n\n\t\tif (tip == null && state.overlays != null)\n\t\t{\n\t\t\tstate.overlays.visit(function(id, shape)\n\t\t\t{\n\t\t\t\t// LATER: Exit loop if tip is not null\n\t\t\t\tif (tip == null && (node == shape.node || node.parentNode == shape.node))\n\t\t\t\t{\n\t\t\t\t\ttip = shape.overlay.toString();\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t\t\n\t\tif (tip == null)\n\t\t{\n\t\t\tvar handler = this.selectionCellsHandler.getHandler(state.cell);\n\t\t\t\n\t\t\tif (handler != null && typeof(handler.getTooltipForNode) == 'function')\n\t\t\t{\n\t\t\t\ttip = handler.getTooltipForNode(node);\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (tip == null)\n\t\t{\n\t\t\ttip = this.getTooltipForCell(state.cell);\n\t\t}\n\t}\n\t\n\treturn tip;\n};\n\n/**\n * Function: getTooltipForCell\n * \n * Returns the string or DOM node to be used as the tooltip for the given\n * cell. This implementation uses the cells getTooltip function if it\n * exists, or else it returns <convertValueToString> for the cell.\n * \n * Example:\n * \n * (code)\n * graph.getTooltipForCell = function(cell)\n * {\n *   return 'Hello, World!';\n * }\n * (end)\n * \n * Replaces all tooltips with the string Hello, World!\n * \n * Parameters:\n * \n * cell - <mxCell> whose tooltip should be returned.\n */\nmxGraph.prototype.getTooltipForCell = function(cell)\n{\n\tvar tip = null;\n\t\n\tif (cell != null && cell.getTooltip != null)\n\t{\n\t\ttip = cell.getTooltip();\n\t}\n\telse\n\t{\n\t\ttip = this.convertValueToString(cell);\n\t}\n\t\n\treturn tip;\n};\n\n/**\n * Function: getLinkForCell\n * \n * Returns the string to be used as the link for the given cell. This\n * implementation returns null.\n * \n * Parameters:\n * \n * cell - <mxCell> whose tooltip should be returned.\n */\nmxGraph.prototype.getLinkForCell = function(cell)\n{\n\treturn null;\n};\n\n/**\n * Function: getCursorForMouseEvent\n * \n * Returns the cursor value to be used for the CSS of the shape for the\n * given event. This implementation calls <getCursorForCell>.\n * \n * Parameters:\n * \n * me - <mxMouseEvent> whose cursor should be returned.\n */\nmxGraph.prototype.getCursorForMouseEvent = function(me)\n{\n\treturn this.getCursorForCell(me.getCell());\n};\n\n/**\n * Function: getCursorForCell\n * \n * Returns the cursor value to be used for the CSS of the shape for the\n * given cell. This implementation returns null.\n * \n * Parameters:\n * \n * cell - <mxCell> whose cursor should be returned.\n */\nmxGraph.prototype.getCursorForCell = function(cell)\n{\n\treturn null;\n};\n\n/**\n * Function: getStartSize\n * \n * Returns the start size of the given swimlane, that is, the width or\n * height of the part that contains the title, depending on the\n * horizontal style. The return value is an <mxRectangle> with either\n * width or height set as appropriate.\n * \n * Parameters:\n * \n * swimlane - <mxCell> whose start size should be returned.\n */\nmxGraph.prototype.getStartSize = function(swimlane)\n{\n\tvar result = new mxRectangle();\n\tvar state = this.view.getState(swimlane);\n\tvar style = (state != null) ? state.style : this.getCellStyle(swimlane);\n\t\n\tif (style != null)\n\t{\n\t\tvar size = parseInt(mxUtils.getValue(style,\n\t\t\tmxConstants.STYLE_STARTSIZE, mxConstants.DEFAULT_STARTSIZE));\n\t\t\n\t\tif (mxUtils.getValue(style, mxConstants.STYLE_HORIZONTAL, true))\n\t\t{\n\t\t\tresult.height = size;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tresult.width = size;\n\t\t}\n\t}\n\t\n\treturn result;\n};\n\n/**\n * Function: getImage\n * \n * Returns the image URL for the given cell state. This implementation\n * returns the value stored under <mxConstants.STYLE_IMAGE> in the cell\n * style.\n * \n * Parameters:\n * \n * state - <mxCellState> whose image URL should be returned.\n */\nmxGraph.prototype.getImage = function(state)\n{\n\treturn (state != null && state.style != null) ? state.style[mxConstants.STYLE_IMAGE] : null;\n};\n\n/**\n * Function: getVerticalAlign\n * \n * Returns the vertical alignment for the given cell state. This\n * implementation returns the value stored under\n * <mxConstants.STYLE_VERTICAL_ALIGN> in the cell style.\n * \n * Parameters:\n * \n * state - <mxCellState> whose vertical alignment should be\n * returned.\n */\nmxGraph.prototype.getVerticalAlign = function(state)\n{\n\treturn (state != null && state.style != null) ?\n\t\t(state.style[mxConstants.STYLE_VERTICAL_ALIGN] ||\n\t\tmxConstants.ALIGN_MIDDLE) : null;\n};\n\n/**\n * Function: getIndicatorColor\n * \n * Returns the indicator color for the given cell state. This\n * implementation returns the value stored under\n * <mxConstants.STYLE_INDICATOR_COLOR> in the cell style.\n * \n * Parameters:\n * \n * state - <mxCellState> whose indicator color should be\n * returned.\n */\nmxGraph.prototype.getIndicatorColor = function(state)\n{\n\treturn (state != null && state.style != null) ? state.style[mxConstants.STYLE_INDICATOR_COLOR] : null;\n};\n\n/**\n * Function: getIndicatorGradientColor\n * \n * Returns the indicator gradient color for the given cell state. This\n * implementation returns the value stored under\n * <mxConstants.STYLE_INDICATOR_GRADIENTCOLOR> in the cell style.\n * \n * Parameters:\n * \n * state - <mxCellState> whose indicator gradient color should be\n * returned.\n */\nmxGraph.prototype.getIndicatorGradientColor = function(state)\n{\n\treturn (state != null && state.style != null) ? state.style[mxConstants.STYLE_INDICATOR_GRADIENTCOLOR] : null;\n};\n\n/**\n * Function: getIndicatorShape\n * \n * Returns the indicator shape for the given cell state. This\n * implementation returns the value stored under\n * <mxConstants.STYLE_INDICATOR_SHAPE> in the cell style.\n * \n * Parameters:\n * \n * state - <mxCellState> whose indicator shape should be returned.\n */\nmxGraph.prototype.getIndicatorShape = function(state)\n{\n\treturn (state != null && state.style != null) ? state.style[mxConstants.STYLE_INDICATOR_SHAPE] : null;\n};\n\n/**\n * Function: getIndicatorImage\n * \n * Returns the indicator image for the given cell state. This\n * implementation returns the value stored under\n * <mxConstants.STYLE_INDICATOR_IMAGE> in the cell style.\n * \n * Parameters:\n * \n * state - <mxCellState> whose indicator image should be returned.\n */\nmxGraph.prototype.getIndicatorImage = function(state)\n{\n\treturn (state != null && state.style != null) ? state.style[mxConstants.STYLE_INDICATOR_IMAGE] : null;\n};\n\n/**\n * Function: getBorder\n * \n * Returns the value of <border>.\n */\nmxGraph.prototype.getBorder = function()\n{\n\treturn this.border;\n};\n\n/**\n * Function: setBorder\n * \n * Sets the value of <border>.\n * \n * Parameters:\n * \n * value - Positive integer that represents the border to be used.\n */\nmxGraph.prototype.setBorder = function(value)\n{\n\tthis.border = value;\n};\n\n/**\n * Function: isSwimlane\n * \n * Returns true if the given cell is a swimlane in the graph. A swimlane is\n * a container cell with some specific behaviour. This implementation\n * checks if the shape associated with the given cell is a <mxSwimlane>.\n * \n * Parameters:\n * \n * cell - <mxCell> to be checked.\n */\nmxGraph.prototype.isSwimlane = function (cell)\n{\n\tif (cell != null)\n\t{\n\t\tif (this.model.getParent(cell) != this.model.getRoot())\n\t\t{\n\t\t\tvar state = this.view.getState(cell);\n\t\t\tvar style = (state != null) ? state.style : this.getCellStyle(cell);\n\n\t\t\tif (style != null && !this.model.isEdge(cell))\n\t\t\t{\n\t\t\t\treturn style[mxConstants.STYLE_SHAPE] == mxConstants.SHAPE_SWIMLANE;\n\t\t\t}\n\t\t}\n\t}\n\t\n\treturn false;\n};\n\n/**\n * Group: Graph behaviour\n */\n\n/**\n * Function: isResizeContainer\n * \n * Returns <resizeContainer>.\n */\nmxGraph.prototype.isResizeContainer = function()\n{\n\treturn this.resizeContainer;\n};\n\n/**\n * Function: setResizeContainer\n * \n * Sets <resizeContainer>.\n * \n * Parameters:\n * \n * value - Boolean indicating if the container should be resized.\n */\nmxGraph.prototype.setResizeContainer = function(value)\n{\n\tthis.resizeContainer = value;\n};\n\n/**\n * Function: isEnabled\n * \n * Returns true if the graph is <enabled>.\n */\nmxGraph.prototype.isEnabled = function()\n{\n\treturn this.enabled;\n};\n\n/**\n * Function: setEnabled\n * \n * Specifies if the graph should allow any interactions. This\n * implementation updates <enabled>.\n * \n * Parameters:\n * \n * value - Boolean indicating if the graph should be enabled.\n */\nmxGraph.prototype.setEnabled = function(value)\n{\n\tthis.enabled = value;\n};\n\n/**\n * Function: isEscapeEnabled\n * \n * Returns <escapeEnabled>.\n */\nmxGraph.prototype.isEscapeEnabled = function()\n{\n\treturn this.escapeEnabled;\n};\n\n/**\n * Function: setEscapeEnabled\n * \n * Sets <escapeEnabled>.\n * \n * Parameters:\n * \n * enabled - Boolean indicating if escape should be enabled.\n */\nmxGraph.prototype.setEscapeEnabled = function(value)\n{\n\tthis.escapeEnabled = value;\n};\n\n/**\n * Function: isInvokesStopCellEditing\n * \n * Returns <invokesStopCellEditing>.\n */\nmxGraph.prototype.isInvokesStopCellEditing = function()\n{\n\treturn this.invokesStopCellEditing;\n};\n\n/**\n * Function: setInvokesStopCellEditing\n * \n * Sets <invokesStopCellEditing>.\n */\nmxGraph.prototype.setInvokesStopCellEditing = function(value)\n{\n\tthis.invokesStopCellEditing = value;\n};\n\n/**\n * Function: isEnterStopsCellEditing\n * \n * Returns <enterStopsCellEditing>.\n */\nmxGraph.prototype.isEnterStopsCellEditing = function()\n{\n\treturn this.enterStopsCellEditing;\n};\n\n/**\n * Function: setEnterStopsCellEditing\n * \n * Sets <enterStopsCellEditing>.\n */\nmxGraph.prototype.setEnterStopsCellEditing = function(value)\n{\n\tthis.enterStopsCellEditing = value;\n};\n\n/**\n * Function: isCellLocked\n * \n * Returns true if the given cell may not be moved, sized, bended,\n * disconnected, edited or selected. This implementation returns true for\n * all vertices with a relative geometry if <locked> is false.\n * \n * Parameters:\n * \n * cell - <mxCell> whose locked state should be returned.\n */\nmxGraph.prototype.isCellLocked = function(cell)\n{\n\tvar geometry = this.model.getGeometry(cell);\n\t\n\treturn this.isCellsLocked() || (geometry != null && this.model.isVertex(cell) && geometry.relative);\n};\n\n/**\n * Function: isCellsLocked\n * \n * Returns true if the given cell may not be moved, sized, bended,\n * disconnected, edited or selected. This implementation returns true for\n * all vertices with a relative geometry if <locked> is false.\n * \n * Parameters:\n * \n * cell - <mxCell> whose locked state should be returned.\n */\nmxGraph.prototype.isCellsLocked = function()\n{\n\treturn this.cellsLocked;\n};\n\n/**\n * Function: setCellsLocked\n * \n * Sets if any cell may be moved, sized, bended, disconnected, edited or\n * selected.\n * \n * Parameters:\n * \n * value - Boolean that defines the new value for <cellsLocked>.\n */\nmxGraph.prototype.setCellsLocked = function(value)\n{\n\tthis.cellsLocked = value;\n};\n\n/**\n * Function: getCloneableCells\n * \n * Returns the cells which may be exported in the given array of cells.\n */\nmxGraph.prototype.getCloneableCells = function(cells)\n{\n\treturn this.model.filterCells(cells, mxUtils.bind(this, function(cell)\n\t{\n\t\treturn this.isCellCloneable(cell);\n\t}));\n};\n\n/**\n * Function: isCellCloneable\n * \n * Returns true if the given cell is cloneable. This implementation returns\n * <isCellsCloneable> for all cells unless a cell style specifies\n * <mxConstants.STYLE_CLONEABLE> to be 0. \n * \n * Parameters:\n * \n * cell - Optional <mxCell> whose cloneable state should be returned.\n */\nmxGraph.prototype.isCellCloneable = function(cell)\n{\n\tvar state = this.view.getState(cell);\n\tvar style = (state != null) ? state.style : this.getCellStyle(cell);\n\n\treturn this.isCellsCloneable() && style[mxConstants.STYLE_CLONEABLE] != 0;\n};\n\n/**\n * Function: isCellsCloneable\n * \n * Returns <cellsCloneable>, that is, if the graph allows cloning of cells\n * by using control-drag.\n */\nmxGraph.prototype.isCellsCloneable = function()\n{\n\treturn this.cellsCloneable;\n};\n\n/**\n * Function: setCellsCloneable\n * \n * Specifies if the graph should allow cloning of cells by holding down the\n * control key while cells are being moved. This implementation updates\n * <cellsCloneable>.\n * \n * Parameters:\n * \n * value - Boolean indicating if the graph should be cloneable.\n */\nmxGraph.prototype.setCellsCloneable = function(value)\n{\n\tthis.cellsCloneable = value;\n};\n\n/**\n * Function: getExportableCells\n * \n * Returns the cells which may be exported in the given array of cells.\n */\nmxGraph.prototype.getExportableCells = function(cells)\n{\n\treturn this.model.filterCells(cells, mxUtils.bind(this, function(cell)\n\t{\n\t\treturn this.canExportCell(cell);\n\t}));\n};\n\n/**\n * Function: canExportCell\n * \n * Returns true if the given cell may be exported to the clipboard. This\n * implementation returns <exportEnabled> for all cells.\n * \n * Parameters:\n * \n * cell - <mxCell> that represents the cell to be exported.\n */\nmxGraph.prototype.canExportCell = function(cell)\n{\n\treturn this.exportEnabled;\n};\n\n/**\n * Function: getImportableCells\n * \n * Returns the cells which may be imported in the given array of cells.\n */\nmxGraph.prototype.getImportableCells = function(cells)\n{\n\treturn this.model.filterCells(cells, mxUtils.bind(this, function(cell)\n\t{\n\t\treturn this.canImportCell(cell);\n\t}));\n};\n\n/**\n * Function: canImportCell\n * \n * Returns true if the given cell may be imported from the clipboard.\n * This implementation returns <importEnabled> for all cells.\n * \n * Parameters:\n * \n * cell - <mxCell> that represents the cell to be imported.\n */\nmxGraph.prototype.canImportCell = function(cell)\n{\n\treturn this.importEnabled;\n};\n\n/**\n * Function: isCellSelectable\n *\n * Returns true if the given cell is selectable. This implementation\n * returns <cellsSelectable>.\n * \n * To add a new style for making cells (un)selectable, use the following code.\n * \n * (code)\n * mxGraph.prototype.isCellSelectable = function(cell)\n * {\n *   var state = this.view.getState(cell);\n *   var style = (state != null) ? state.style : this.getCellStyle(cell);\n *   \n *   return this.isCellsSelectable() && !this.isCellLocked(cell) && style['selectable'] != 0;\n * };\n * (end)\n * \n * You can then use the new style as shown in this example.\n * \n * (code)\n * graph.insertVertex(parent, null, 'Hello,', 20, 20, 80, 30, 'selectable=0');\n * (end)\n * \n * Parameters:\n * \n * cell - <mxCell> whose selectable state should be returned.\n */\nmxGraph.prototype.isCellSelectable = function(cell)\n{\n\treturn this.isCellsSelectable();\n};\n\n/**\n * Function: isCellsSelectable\n *\n * Returns <cellsSelectable>.\n */\nmxGraph.prototype.isCellsSelectable = function()\n{\n\treturn this.cellsSelectable;\n};\n\n/**\n * Function: setCellsSelectable\n *\n * Sets <cellsSelectable>.\n */\nmxGraph.prototype.setCellsSelectable = function(value)\n{\n\tthis.cellsSelectable = value;\n};\n\n/**\n * Function: getDeletableCells\n * \n * Returns the cells which may be exported in the given array of cells.\n */\nmxGraph.prototype.getDeletableCells = function(cells)\n{\n\treturn this.model.filterCells(cells, mxUtils.bind(this, function(cell)\n\t{\n\t\treturn this.isCellDeletable(cell);\n\t}));\n};\n\n/**\n * Function: isCellDeletable\n *\n * Returns true if the given cell is moveable. This returns\n * <cellsDeletable> for all given cells if a cells style does not specify\n * <mxConstants.STYLE_DELETABLE> to be 0.\n * \n * Parameters:\n * \n * cell - <mxCell> whose deletable state should be returned.\n */\nmxGraph.prototype.isCellDeletable = function(cell)\n{\n\tvar state = this.view.getState(cell);\n\tvar style = (state != null) ? state.style : this.getCellStyle(cell);\n\t\n\treturn this.isCellsDeletable() && style[mxConstants.STYLE_DELETABLE] != 0;\n};\n\n/**\n * Function: isCellsDeletable\n *\n * Returns <cellsDeletable>.\n */\nmxGraph.prototype.isCellsDeletable = function()\n{\n\treturn this.cellsDeletable;\n};\n\n/**\n * Function: setCellsDeletable\n * \n * Sets <cellsDeletable>.\n * \n * Parameters:\n * \n * value - Boolean indicating if the graph should allow deletion of cells.\n */\nmxGraph.prototype.setCellsDeletable = function(value)\n{\n\tthis.cellsDeletable = value;\n};\n\n/**\n * Function: isLabelMovable\n *\n * Returns true if the given edges's label is moveable. This returns\n * <movable> for all given cells if <isLocked> does not return true\n * for the given cell.\n * \n * Parameters:\n * \n * cell - <mxCell> whose label should be moved.\n */\nmxGraph.prototype.isLabelMovable = function(cell)\n{\n\treturn !this.isCellLocked(cell) &&\n\t\t((this.model.isEdge(cell) && this.edgeLabelsMovable) ||\n\t\t(this.model.isVertex(cell) && this.vertexLabelsMovable));\n};\n\n/**\n * Function: isCellRotatable\n *\n * Returns true if the given cell is rotatable. This returns true for the given\n * cell if its style does not specify <mxConstants.STYLE_ROTATABLE> to be 0.\n * \n * Parameters:\n * \n * cell - <mxCell> whose rotatable state should be returned.\n */\nmxGraph.prototype.isCellRotatable = function(cell)\n{\n\tvar state = this.view.getState(cell);\n\tvar style = (state != null) ? state.style : this.getCellStyle(cell);\n\t\n\treturn style[mxConstants.STYLE_ROTATABLE] != 0;\n};\n\n/**\n * Function: getMovableCells\n * \n * Returns the cells which are movable in the given array of cells.\n */\nmxGraph.prototype.getMovableCells = function(cells)\n{\n\treturn this.model.filterCells(cells, mxUtils.bind(this, function(cell)\n\t{\n\t\treturn this.isCellMovable(cell);\n\t}));\n};\n\n/**\n * Function: isCellMovable\n *\n * Returns true if the given cell is moveable. This returns <cellsMovable>\n * for all given cells if <isCellLocked> does not return true for the given\n * cell and its style does not specify <mxConstants.STYLE_MOVABLE> to be 0.\n * \n * Parameters:\n * \n * cell - <mxCell> whose movable state should be returned.\n */\nmxGraph.prototype.isCellMovable = function(cell)\n{\n\tvar state = this.view.getState(cell);\n\tvar style = (state != null) ? state.style : this.getCellStyle(cell);\n\t\n\treturn this.isCellsMovable() && !this.isCellLocked(cell) && style[mxConstants.STYLE_MOVABLE] != 0;\n};\n\n/**\n * Function: isCellsMovable\n *\n * Returns <cellsMovable>.\n */\nmxGraph.prototype.isCellsMovable = function()\n{\n\treturn this.cellsMovable;\n};\n\n/**\n * Function: setCellsMovable\n * \n * Specifies if the graph should allow moving of cells. This implementation\n * updates <cellsMsovable>.\n * \n * Parameters:\n * \n * value - Boolean indicating if the graph should allow moving of cells.\n */\nmxGraph.prototype.setCellsMovable = function(value)\n{\n\tthis.cellsMovable = value;\n};\n\n/**\n * Function: isGridEnabled\n *\n * Returns <gridEnabled> as a boolean.\n */\nmxGraph.prototype.isGridEnabled = function()\n{\n\treturn this.gridEnabled;\n};\n\n/**\n * Function: setGridEnabled\n * \n * Specifies if the grid should be enabled.\n * \n * Parameters:\n * \n * value - Boolean indicating if the grid should be enabled.\n */\nmxGraph.prototype.setGridEnabled = function(value)\n{\n\tthis.gridEnabled = value;\n};\n\n/**\n * Function: isPortsEnabled\n *\n * Returns <portsEnabled> as a boolean.\n */\nmxGraph.prototype.isPortsEnabled = function()\n{\n\treturn this.portsEnabled;\n};\n\n/**\n * Function: setPortsEnabled\n * \n * Specifies if the ports should be enabled.\n * \n * Parameters:\n * \n * value - Boolean indicating if the ports should be enabled.\n */\nmxGraph.prototype.setPortsEnabled = function(value)\n{\n\tthis.portsEnabled = value;\n};\n\n/**\n * Function: getGridSize\n *\n * Returns <gridSize>.\n */\nmxGraph.prototype.getGridSize = function()\n{\n\treturn this.gridSize;\n};\n\n/**\n * Function: setGridSize\n * \n * Sets <gridSize>.\n */\nmxGraph.prototype.setGridSize = function(value)\n{\n\tthis.gridSize = value;\n};\n\n/**\n * Function: getTolerance\n *\n * Returns <tolerance>.\n */\nmxGraph.prototype.getTolerance = function()\n{\n\treturn this.tolerance;\n};\n\n/**\n * Function: setTolerance\n * \n * Sets <tolerance>.\n */\nmxGraph.prototype.setTolerance = function(value)\n{\n\tthis.tolerance = value;\n};\n\n/**\n * Function: isVertexLabelsMovable\n *\n * Returns <vertexLabelsMovable>.\n */\nmxGraph.prototype.isVertexLabelsMovable = function()\n{\n\treturn this.vertexLabelsMovable;\n};\n\n/**\n * Function: setVertexLabelsMovable\n * \n * Sets <vertexLabelsMovable>.\n */\nmxGraph.prototype.setVertexLabelsMovable = function(value)\n{\n\tthis.vertexLabelsMovable = value;\n};\n\n/**\n * Function: isEdgeLabelsMovable\n *\n * Returns <edgeLabelsMovable>.\n */\nmxGraph.prototype.isEdgeLabelsMovable = function()\n{\n\treturn this.edgeLabelsMovable;\n};\n\n/**\n * Function: isEdgeLabelsMovable\n * \n * Sets <edgeLabelsMovable>.\n */\nmxGraph.prototype.setEdgeLabelsMovable = function(value)\n{\n\tthis.edgeLabelsMovable = value;\n};\n\n/**\n * Function: isSwimlaneNesting\n *\n * Returns <swimlaneNesting> as a boolean.\n */\nmxGraph.prototype.isSwimlaneNesting = function()\n{\n\treturn this.swimlaneNesting;\n};\n\n/**\n * Function: setSwimlaneNesting\n * \n * Specifies if swimlanes can be nested by drag and drop. This is only\n * taken into account if dropEnabled is true.\n * \n * Parameters:\n * \n * value - Boolean indicating if swimlanes can be nested.\n */\nmxGraph.prototype.setSwimlaneNesting = function(value)\n{\n\tthis.swimlaneNesting = value;\n};\n\n/**\n * Function: isSwimlaneSelectionEnabled\n *\n * Returns <swimlaneSelectionEnabled> as a boolean.\n */\nmxGraph.prototype.isSwimlaneSelectionEnabled = function()\n{\n\treturn this.swimlaneSelectionEnabled;\n};\n\n/**\n * Function: setSwimlaneSelectionEnabled\n * \n * Specifies if swimlanes should be selected if the mouse is released\n * over their content area.\n * \n * Parameters:\n * \n * value - Boolean indicating if swimlanes content areas\n * should be selected when the mouse is released over them.\n */\nmxGraph.prototype.setSwimlaneSelectionEnabled = function(value)\n{\n\tthis.swimlaneSelectionEnabled = value;\n};\n\n/**\n * Function: isMultigraph\n *\n * Returns <multigraph> as a boolean.\n */\nmxGraph.prototype.isMultigraph = function()\n{\n\treturn this.multigraph;\n};\n\n/**\n * Function: setMultigraph\n * \n * Specifies if the graph should allow multiple connections between the\n * same pair of vertices.\n * \n * Parameters:\n * \n * value - Boolean indicating if the graph allows multiple connections\n * between the same pair of vertices.\n */\nmxGraph.prototype.setMultigraph = function(value)\n{\n\tthis.multigraph = value;\n};\n\n/**\n * Function: isAllowLoops\n *\n * Returns <allowLoops> as a boolean.\n */\nmxGraph.prototype.isAllowLoops = function()\n{\n\treturn this.allowLoops;\n};\n\n/**\n * Function: setAllowDanglingEdges\n * \n * Specifies if dangling edges are allowed, that is, if edges are allowed\n * that do not have a source and/or target terminal defined.\n * \n * Parameters:\n * \n * value - Boolean indicating if dangling edges are allowed.\n */\nmxGraph.prototype.setAllowDanglingEdges = function(value)\n{\n\tthis.allowDanglingEdges = value;\n};\n\n/**\n * Function: isAllowDanglingEdges\n *\n * Returns <allowDanglingEdges> as a boolean.\n */\nmxGraph.prototype.isAllowDanglingEdges = function()\n{\n\treturn this.allowDanglingEdges;\n};\n\n/**\n * Function: setConnectableEdges\n * \n * Specifies if edges should be connectable.\n * \n * Parameters:\n * \n * value - Boolean indicating if edges should be connectable.\n */\nmxGraph.prototype.setConnectableEdges = function(value)\n{\n\tthis.connectableEdges = value;\n};\n\n/**\n * Function: isConnectableEdges\n *\n * Returns <connectableEdges> as a boolean.\n */\nmxGraph.prototype.isConnectableEdges = function()\n{\n\treturn this.connectableEdges;\n};\n\n/**\n * Function: setCloneInvalidEdges\n * \n * Specifies if edges should be inserted when cloned but not valid wrt.\n * <getEdgeValidationError>. If false such edges will be silently ignored.\n * \n * Parameters:\n * \n * value - Boolean indicating if cloned invalid edges should be\n * inserted into the graph or ignored.\n */\nmxGraph.prototype.setCloneInvalidEdges = function(value)\n{\n\tthis.cloneInvalidEdges = value;\n};\n\n/**\n * Function: isCloneInvalidEdges\n *\n * Returns <cloneInvalidEdges> as a boolean.\n */\nmxGraph.prototype.isCloneInvalidEdges = function()\n{\n\treturn this.cloneInvalidEdges;\n};\n\n/**\n * Function: setAllowLoops\n * \n * Specifies if loops are allowed.\n * \n * Parameters:\n * \n * value - Boolean indicating if loops are allowed.\n */\nmxGraph.prototype.setAllowLoops = function(value)\n{\n\tthis.allowLoops = value;\n};\n\n/**\n * Function: isDisconnectOnMove\n *\n * Returns <disconnectOnMove> as a boolean.\n */\nmxGraph.prototype.isDisconnectOnMove = function()\n{\n\treturn this.disconnectOnMove;\n};\n\n/**\n * Function: setDisconnectOnMove\n * \n * Specifies if edges should be disconnected when moved. (Note: Cloned\n * edges are always disconnected.)\n * \n * Parameters:\n * \n * value - Boolean indicating if edges should be disconnected\n * when moved.\n */\nmxGraph.prototype.setDisconnectOnMove = function(value)\n{\n\tthis.disconnectOnMove = value;\n};\n\n/**\n * Function: isDropEnabled\n *\n * Returns <dropEnabled> as a boolean.\n */\nmxGraph.prototype.isDropEnabled = function()\n{\n\treturn this.dropEnabled;\n};\n\n/**\n * Function: setDropEnabled\n * \n * Specifies if the graph should allow dropping of cells onto or into other\n * cells.\n * \n * Parameters:\n * \n * dropEnabled - Boolean indicating if the graph should allow dropping\n * of cells into other cells.\n */\nmxGraph.prototype.setDropEnabled = function(value)\n{\n\tthis.dropEnabled = value;\n};\n\n/**\n * Function: isSplitEnabled\n *\n * Returns <splitEnabled> as a boolean.\n */\nmxGraph.prototype.isSplitEnabled = function()\n{\n\treturn this.splitEnabled;\n};\n\n/**\n * Function: setSplitEnabled\n * \n * Specifies if the graph should allow dropping of cells onto or into other\n * cells.\n * \n * Parameters:\n * \n * dropEnabled - Boolean indicating if the graph should allow dropping\n * of cells into other cells.\n */\nmxGraph.prototype.setSplitEnabled = function(value)\n{\n\tthis.splitEnabled = value;\n};\n\n/**\n * Function: isCellResizable\n *\n * Returns true if the given cell is resizable. This returns\n * <cellsResizable> for all given cells if <isCellLocked> does not return\n * true for the given cell and its style does not specify\n * <mxConstants.STYLE_RESIZABLE> to be 0.\n * \n * Parameters:\n * \n * cell - <mxCell> whose resizable state should be returned.\n */\nmxGraph.prototype.isCellResizable = function(cell)\n{\n\tvar state = this.view.getState(cell);\n\tvar style = (state != null) ? state.style : this.getCellStyle(cell);\n\n\treturn this.isCellsResizable() && !this.isCellLocked(cell) &&\n\t\tmxUtils.getValue(style, mxConstants.STYLE_RESIZABLE, '1') != '0';\n};\n\n/**\n * Function: isCellsResizable\n *\n * Returns <cellsResizable>.\n */\nmxGraph.prototype.isCellsResizable = function()\n{\n\treturn this.cellsResizable;\n};\n\n/**\n * Function: setCellsResizable\n * \n * Specifies if the graph should allow resizing of cells. This\n * implementation updates <cellsResizable>.\n * \n * Parameters:\n * \n * value - Boolean indicating if the graph should allow resizing of\n * cells.\n */\nmxGraph.prototype.setCellsResizable = function(value)\n{\n\tthis.cellsResizable = value;\n};\n\n/**\n * Function: isTerminalPointMovable\n *\n * Returns true if the given terminal point is movable. This is independent\n * from <isCellConnectable> and <isCellDisconnectable> and controls if terminal\n * points can be moved in the graph if the edge is not connected. Note that it\n * is required for this to return true to connect unconnected edges. This\n * implementation returns true.\n * \n * Parameters:\n * \n * cell - <mxCell> whose terminal point should be moved.\n * source - Boolean indicating if the source or target terminal should be moved.\n */\nmxGraph.prototype.isTerminalPointMovable = function(cell, source)\n{\n\treturn true;\n};\n\n/**\n * Function: isCellBendable\n *\n * Returns true if the given cell is bendable. This returns <cellsBendable>\n * for all given cells if <isLocked> does not return true for the given\n * cell and its style does not specify <mxConstants.STYLE_BENDABLE> to be 0.\n * \n * Parameters:\n * \n * cell - <mxCell> whose bendable state should be returned.\n */\nmxGraph.prototype.isCellBendable = function(cell)\n{\n\tvar state = this.view.getState(cell);\n\tvar style = (state != null) ? state.style : this.getCellStyle(cell);\n\t\n\treturn this.isCellsBendable() && !this.isCellLocked(cell) && style[mxConstants.STYLE_BENDABLE] != 0;\n};\n\n/**\n * Function: isCellsBendable\n *\n * Returns <cellsBenadable>.\n */\nmxGraph.prototype.isCellsBendable = function()\n{\n\treturn this.cellsBendable;\n};\n\n/**\n * Function: setCellsBendable\n * \n * Specifies if the graph should allow bending of edges. This\n * implementation updates <bendable>.\n * \n * Parameters:\n * \n * value - Boolean indicating if the graph should allow bending of\n * edges.\n */\nmxGraph.prototype.setCellsBendable = function(value)\n{\n\tthis.cellsBendable = value;\n};\n\n/**\n * Function: isCellEditable\n *\n * Returns true if the given cell is editable. This returns <cellsEditable> for\n * all given cells if <isCellLocked> does not return true for the given cell\n * and its style does not specify <mxConstants.STYLE_EDITABLE> to be 0.\n * \n * Parameters:\n * \n * cell - <mxCell> whose editable state should be returned.\n */\nmxGraph.prototype.isCellEditable = function(cell)\n{\n\tvar state = this.view.getState(cell);\n\tvar style = (state != null) ? state.style : this.getCellStyle(cell);\n\t\n\treturn this.isCellsEditable() && !this.isCellLocked(cell) && style[mxConstants.STYLE_EDITABLE] != 0;\n};\n\n/**\n * Function: isCellsEditable\n *\n * Returns <cellsEditable>.\n */\nmxGraph.prototype.isCellsEditable = function()\n{\n\treturn this.cellsEditable;\n};\n\n/**\n * Function: setCellsEditable\n * \n * Specifies if the graph should allow in-place editing for cell labels.\n * This implementation updates <cellsEditable>.\n * \n * Parameters:\n * \n * value - Boolean indicating if the graph should allow in-place\n * editing.\n */\nmxGraph.prototype.setCellsEditable = function(value)\n{\n\tthis.cellsEditable = value;\n};\n\n/**\n * Function: isCellDisconnectable\n *\n * Returns true if the given cell is disconnectable from the source or\n * target terminal. This returns <isCellsDisconnectable> for all given\n * cells if <isCellLocked> does not return true for the given cell.\n * \n * Parameters:\n * \n * cell - <mxCell> whose disconnectable state should be returned.\n * terminal - <mxCell> that represents the source or target terminal.\n * source - Boolean indicating if the source or target terminal is to be\n * disconnected.\n */\nmxGraph.prototype.isCellDisconnectable = function(cell, terminal, source)\n{\n\treturn this.isCellsDisconnectable() && !this.isCellLocked(cell);\n};\n\n/**\n * Function: isCellsDisconnectable\n *\n * Returns <cellsDisconnectable>.\n */\nmxGraph.prototype.isCellsDisconnectable = function()\n{\n\treturn this.cellsDisconnectable;\n};\n\n/**\n * Function: setCellsDisconnectable\n *\n * Sets <cellsDisconnectable>.\n */\nmxGraph.prototype.setCellsDisconnectable = function(value)\n{\n\tthis.cellsDisconnectable = value;\n};\n\n/**\n * Function: isValidSource\n * \n * Returns true if the given cell is a valid source for new connections.\n * This implementation returns true for all non-null values and is\n * called by is called by <isValidConnection>.\n * \n * Parameters:\n * \n * cell - <mxCell> that represents a possible source or null.\n */\nmxGraph.prototype.isValidSource = function(cell)\n{\n\treturn (cell == null && this.allowDanglingEdges) ||\n\t\t(cell != null && (!this.model.isEdge(cell) ||\n\t\tthis.connectableEdges) && this.isCellConnectable(cell));\n};\n\t\n/**\n * Function: isValidTarget\n * \n * Returns <isValidSource> for the given cell. This is called by\n * <isValidConnection>.\n * \n * Parameters:\n * \n * cell - <mxCell> that represents a possible target or null.\n */\nmxGraph.prototype.isValidTarget = function(cell)\n{\n\treturn this.isValidSource(cell);\n};\n\n/**\n * Function: isValidConnection\n * \n * Returns true if the given target cell is a valid target for source.\n * This is a boolean implementation for not allowing connections between\n * certain pairs of vertices and is called by <getEdgeValidationError>.\n * This implementation returns true if <isValidSource> returns true for\n * the source and <isValidTarget> returns true for the target.\n * \n * Parameters:\n * \n * source - <mxCell> that represents the source cell.\n * target - <mxCell> that represents the target cell.\n */\nmxGraph.prototype.isValidConnection = function(source, target)\n{\n\treturn this.isValidSource(source) && this.isValidTarget(target);\n};\n\n/**\n * Function: setConnectable\n * \n * Specifies if the graph should allow new connections. This implementation\n * updates <mxConnectionHandler.enabled> in <connectionHandler>.\n * \n * Parameters:\n * \n * connectable - Boolean indicating if new connections should be allowed.\n */\nmxGraph.prototype.setConnectable = function(connectable)\n{\n\tthis.connectionHandler.setEnabled(connectable);\n};\n\t\n/**\n * Function: isConnectable\n * \n * Returns true if the <connectionHandler> is enabled.\n */\nmxGraph.prototype.isConnectable = function(connectable)\n{\n\treturn this.connectionHandler.isEnabled();\n};\n\n/**\n * Function: setTooltips\n * \n * Specifies if tooltips should be enabled. This implementation updates\n * <mxTooltipHandler.enabled> in <tooltipHandler>.\n * \n * Parameters:\n * \n * enabled - Boolean indicating if tooltips should be enabled.\n */\nmxGraph.prototype.setTooltips = function (enabled)\n{\n\tthis.tooltipHandler.setEnabled(enabled);\n};\n\n/**\n * Function: setPanning\n * \n * Specifies if panning should be enabled. This implementation updates\n * <mxPanningHandler.panningEnabled> in <panningHandler>.\n * \n * Parameters:\n * \n * enabled - Boolean indicating if panning should be enabled.\n */\nmxGraph.prototype.setPanning = function(enabled)\n{\n\tthis.panningHandler.panningEnabled = enabled;\n};\n\n/**\n * Function: isEditing\n * \n * Returns true if the given cell is currently being edited.\n * If no cell is specified then this returns true if any\n * cell is currently being edited.\n *\n * Parameters:\n * \n * cell - <mxCell> that should be checked.\n */\nmxGraph.prototype.isEditing = function(cell)\n{\n\tif (this.cellEditor != null)\n\t{\n\t\tvar editingCell = this.cellEditor.getEditingCell();\n\t\t\n\t\treturn (cell == null) ? editingCell != null : cell == editingCell;\n\t}\n\t\n\treturn false;\n};\n\n/**\n * Function: isAutoSizeCell\n * \n * Returns true if the size of the given cell should automatically be\n * updated after a change of the label. This implementation returns\n * <autoSizeCells> or checks if the cell style does specify\n * <mxConstants.STYLE_AUTOSIZE> to be 1.\n * \n * Parameters:\n * \n * cell - <mxCell> that should be resized.\n */\nmxGraph.prototype.isAutoSizeCell = function(cell)\n{\n\tvar state = this.view.getState(cell);\n\tvar style = (state != null) ? state.style : this.getCellStyle(cell);\n\t\n\treturn this.isAutoSizeCells() || style[mxConstants.STYLE_AUTOSIZE] == 1;\n};\n\n/**\n * Function: isAutoSizeCells\n * \n * Returns <autoSizeCells>.\n */\nmxGraph.prototype.isAutoSizeCells = function()\n{\n\treturn this.autoSizeCells;\n};\n\n/**\n * Function: setAutoSizeCells\n * \n * Specifies if cell sizes should be automatically updated after a label\n * change. This implementation sets <autoSizeCells> to the given parameter.\n * To update the size of cells when the cells are added, set\n * <autoSizeCellsOnAdd> to true.\n * \n * Parameters:\n * \n * value - Boolean indicating if cells should be resized\n * automatically.\n */\nmxGraph.prototype.setAutoSizeCells = function(value)\n{\n\tthis.autoSizeCells = value;\n};\n\n/**\n * Function: isExtendParent\n * \n * Returns true if the parent of the given cell should be extended if the\n * child has been resized so that it overlaps the parent. This\n * implementation returns <isExtendParents> if the cell is not an edge.\n * \n * Parameters:\n * \n * cell - <mxCell> that has been resized.\n */\nmxGraph.prototype.isExtendParent = function(cell)\n{\n\treturn !this.getModel().isEdge(cell) && this.isExtendParents();\n};\n\n/**\n * Function: isExtendParents\n * \n * Returns <extendParents>.\n */\nmxGraph.prototype.isExtendParents = function()\n{\n\treturn this.extendParents;\n};\n\n/**\n * Function: setExtendParents\n * \n * Sets <extendParents>.\n * \n * Parameters:\n * \n * value - New boolean value for <extendParents>.\n */\nmxGraph.prototype.setExtendParents = function(value)\n{\n\tthis.extendParents = value;\n};\n\n/**\n * Function: isExtendParentsOnAdd\n * \n * Returns <extendParentsOnAdd>.\n */\nmxGraph.prototype.isExtendParentsOnAdd = function(cell)\n{\n\treturn this.extendParentsOnAdd;\n};\n\n/**\n * Function: setExtendParentsOnAdd\n * \n * Sets <extendParentsOnAdd>.\n * \n * Parameters:\n * \n * value - New boolean value for <extendParentsOnAdd>.\n */\nmxGraph.prototype.setExtendParentsOnAdd = function(value)\n{\n\tthis.extendParentsOnAdd = value;\n};\n\n/**\n * Function: isExtendParentsOnMove\n * \n * Returns <extendParentsOnMove>.\n */\nmxGraph.prototype.isExtendParentsOnMove = function()\n{\n\treturn this.extendParentsOnMove;\n};\n\n/**\n * Function: setExtendParentsOnMove\n * \n * Sets <extendParentsOnMove>.\n * \n * Parameters:\n * \n * value - New boolean value for <extendParentsOnAdd>.\n */\nmxGraph.prototype.setExtendParentsOnMove = function(value)\n{\n\tthis.extendParentsOnMove = value;\n};\n\n/**\n * Function: isRecursiveResize\n * \n * Returns <recursiveResize>.\n * \n * Parameters:\n * \n * state - <mxCellState> that is being resized.\n */\nmxGraph.prototype.isRecursiveResize = function(state)\n{\n\treturn this.recursiveResize;\n};\n\n/**\n * Function: setRecursiveResize\n * \n * Sets <recursiveResize>.\n * \n * Parameters:\n * \n * value - New boolean value for <recursiveResize>.\n */\nmxGraph.prototype.setRecursiveResize = function(value)\n{\n\tthis.recursiveResize = value;\n};\n\n/**\n * Function: isConstrainChild\n * \n * Returns true if the given cell should be kept inside the bounds of its\n * parent according to the rules defined by <getOverlap> and\n * <isAllowOverlapParent>. This implementation returns false for all children\n * of edges and <isConstrainChildren> otherwise.\n * \n * Parameters:\n * \n * cell - <mxCell> that should be constrained.\n */\nmxGraph.prototype.isConstrainChild = function(cell)\n{\n\treturn this.isConstrainChildren() && !this.getModel().isEdge(this.getModel().getParent(cell));\n};\n\n/**\n * Function: isConstrainChildren\n * \n * Returns <constrainChildren>.\n */\nmxGraph.prototype.isConstrainChildren = function()\n{\n\treturn this.constrainChildren;\n};\n\n/**\n * Function: setConstrainChildren\n * \n * Sets <constrainChildren>.\n */\nmxGraph.prototype.setConstrainChildren = function(value)\n{\n\tthis.constrainChildren = value;\n};\n\n/**\n * Function: isConstrainRelativeChildren\n * \n * Returns <constrainRelativeChildren>.\n */\nmxGraph.prototype.isConstrainRelativeChildren = function()\n{\n\treturn this.constrainRelativeChildren;\n};\n\n/**\n * Function: setConstrainRelativeChildren\n * \n * Sets <constrainRelativeChildren>.\n */\nmxGraph.prototype.setConstrainRelativeChildren = function(value)\n{\n\tthis.constrainRelativeChildren = value;\n};\n\n/**\n * Function: isConstrainChildren\n * \n * Returns <allowNegativeCoordinates>.\n */\nmxGraph.prototype.isAllowNegativeCoordinates = function()\n{\n\treturn this.allowNegativeCoordinates;\n};\n\n/**\n * Function: setConstrainChildren\n * \n * Sets <allowNegativeCoordinates>.\n */\nmxGraph.prototype.setAllowNegativeCoordinates = function(value)\n{\n\tthis.allowNegativeCoordinates = value;\n};\n\n/**\n * Function: getOverlap\n * \n * Returns a decimal number representing the amount of the width and height\n * of the given cell that is allowed to overlap its parent. A value of 0\n * means all children must stay inside the parent, 1 means the child is\n * allowed to be placed outside of the parent such that it touches one of\n * the parents sides. If <isAllowOverlapParent> returns false for the given\n * cell, then this method returns 0.\n * \n * Parameters:\n * \n * cell - <mxCell> for which the overlap ratio should be returned.\n */\nmxGraph.prototype.getOverlap = function(cell)\n{\n\treturn (this.isAllowOverlapParent(cell)) ? this.defaultOverlap : 0;\n};\n\t\n/**\n * Function: isAllowOverlapParent\n * \n * Returns true if the given cell is allowed to be placed outside of the\n * parents area.\n * \n * Parameters:\n * \n * cell - <mxCell> that represents the child to be checked.\n */\nmxGraph.prototype.isAllowOverlapParent = function(cell)\n{\n\treturn false;\n};\n\n/**\n * Function: getFoldableCells\n * \n * Returns the cells which are movable in the given array of cells.\n */\nmxGraph.prototype.getFoldableCells = function(cells, collapse)\n{\n\treturn this.model.filterCells(cells, mxUtils.bind(this, function(cell)\n\t{\n\t\treturn this.isCellFoldable(cell, collapse);\n\t}));\n};\n\n/**\n * Function: isCellFoldable\n * \n * Returns true if the given cell is foldable. This implementation\n * returns true if the cell has at least one child and its style\n * does not specify <mxConstants.STYLE_FOLDABLE> to be 0.\n * \n * Parameters:\n * \n * cell - <mxCell> whose foldable state should be returned.\n */\nmxGraph.prototype.isCellFoldable = function(cell, collapse)\n{\n\tvar state = this.view.getState(cell);\n\tvar style = (state != null) ? state.style : this.getCellStyle(cell);\n\t\n\treturn this.model.getChildCount(cell) > 0 && style[mxConstants.STYLE_FOLDABLE] != 0;\n};\n\n/**\n * Function: isValidDropTarget\n *\n * Returns true if the given cell is a valid drop target for the specified\n * cells. If <splitEnabled> is true then this returns <isSplitTarget> for\n * the given arguments else it returns true if the cell is not collapsed\n * and its child count is greater than 0.\n * \n * Parameters:\n * \n * cell - <mxCell> that represents the possible drop target.\n * cells - <mxCells> that should be dropped into the target.\n * evt - Mouseevent that triggered the invocation.\n */\nmxGraph.prototype.isValidDropTarget = function(cell, cells, evt)\n{\n\treturn cell != null && ((this.isSplitEnabled() &&\n\t\tthis.isSplitTarget(cell, cells, evt)) || (!this.model.isEdge(cell) &&\n\t\t(this.isSwimlane(cell) || (this.model.getChildCount(cell) > 0 &&\n\t\t!this.isCellCollapsed(cell)))));\n};\n\n/**\n * Function: isSplitTarget\n *\n * Returns true if the given edge may be splitted into two edges with the\n * given cell as a new terminal between the two.\n * \n * Parameters:\n * \n * target - <mxCell> that represents the edge to be splitted.\n * cells - <mxCells> that should split the edge.\n * evt - Mouseevent that triggered the invocation.\n */\nmxGraph.prototype.isSplitTarget = function(target, cells, evt)\n{\n\tif (this.model.isEdge(target) && cells != null && cells.length == 1 &&\n\t\tthis.isCellConnectable(cells[0]) && this.getEdgeValidationError(target,\n\t\t\tthis.model.getTerminal(target, true), cells[0]) == null)\n\t{\n\t\tvar src = this.model.getTerminal(target, true);\n\t\tvar trg = this.model.getTerminal(target, false);\n\n\t\treturn (!this.model.isAncestor(cells[0], src) &&\n\t\t\t\t!this.model.isAncestor(cells[0], trg));\n\t}\n\n\treturn false;\n};\n\n/**\n * Function: getDropTarget\n * \n * Returns the given cell if it is a drop target for the given cells or the\n * nearest ancestor that may be used as a drop target for the given cells.\n * If the given array contains a swimlane and <swimlaneNesting> is false\n * then this always returns null. If no cell is given, then the bottommost\n * swimlane at the location of the given event is returned.\n * \n * This function should only be used if <isDropEnabled> returns true.\n * \n * Parameters:\n * \n * cells - Array of <mxCells> which are to be dropped onto the target.\n * evt - Mouseevent for the drag and drop.\n * cell - <mxCell> that is under the mousepointer.\n * clone - Optional boolean to indicate of cells will be cloned.\n */\nmxGraph.prototype.getDropTarget = function(cells, evt, cell, clone)\n{\n\tif (!this.isSwimlaneNesting())\n\t{\n\t\tfor (var i = 0; i < cells.length; i++)\n\t\t{\n\t\t\tif (this.isSwimlane(cells[i]))\n\t\t\t{\n\t\t\t\treturn null;\n\t\t\t}\n\t\t}\n\t}\n\n\tvar pt = mxUtils.convertPoint(this.container,\n\t\tmxEvent.getClientX(evt), mxEvent.getClientY(evt));\n\tpt.x -= this.panDx;\n\tpt.y -= this.panDy;\n\tvar swimlane = this.getSwimlaneAt(pt.x, pt.y);\n\t\n\tif (cell == null)\n\t{\n\t\tcell = swimlane;\n\t}\n\telse if (swimlane != null)\n\t{\n\t\t// Checks if the cell is an ancestor of the swimlane\n\t\t// under the mouse and uses the swimlane in that case\n\t\tvar tmp = this.model.getParent(swimlane);\n\t\t\n\t\twhile (tmp != null && this.isSwimlane(tmp) && tmp != cell)\n\t\t{\n\t\t\ttmp = this.model.getParent(tmp);\n\t\t}\n\t\t\n\t\tif (tmp == cell)\n\t\t{\n\t\t\tcell = swimlane;\n\t\t}\n\t}\n\t\n\twhile (cell != null && !this.isValidDropTarget(cell, cells, evt) &&\n\t\t!this.model.isLayer(cell))\n\t{\n\t\tcell = this.model.getParent(cell);\n\t}\n\t\n\t// Checks if parent is dropped into child if not cloning\n\tif (clone == null || !clone)\n\t{\n\t\tvar parent = cell;\n\t\t\n\t\twhile (parent != null && mxUtils.indexOf(cells, parent) < 0)\n\t\t{\n\t\t\tparent = this.model.getParent(parent);\n\t\t}\n\t}\n\n\treturn (!this.model.isLayer(cell) && parent == null) ? cell : null;\n};\n\n/**\n * Group: Cell retrieval\n */\n\n/**\n * Function: getDefaultParent\n * \n * Returns <defaultParent> or <mxGraphView.currentRoot> or the first child\n * child of <mxGraphModel.root> if both are null. The value returned by\n * this function should be used as the parent for new cells (aka default\n * layer).\n */\nmxGraph.prototype.getDefaultParent = function()\n{\n\tvar parent = this.getCurrentRoot();\n\t\n\tif (parent == null)\n\t{\n\t\tparent = this.defaultParent;\n\t\t\n\t\tif (parent == null)\n\t\t{\n\t\t\tvar root = this.model.getRoot();\n\t\t\tparent = this.model.getChildAt(root, 0);\n\t\t}\n\t}\n\t\n\treturn parent;\n};\n\n/**\n * Function: setDefaultParent\n * \n * Sets the <defaultParent> to the given cell. Set this to null to return\n * the first child of the root in getDefaultParent.\n */\nmxGraph.prototype.setDefaultParent = function(cell)\n{\n\tthis.defaultParent = cell;\n};\n\n/**\n * Function: getSwimlane\n * \n * Returns the nearest ancestor of the given cell which is a swimlane, or\n * the given cell, if it is itself a swimlane.\n * \n * Parameters:\n * \n * cell - <mxCell> for which the ancestor swimlane should be returned.\n */\nmxGraph.prototype.getSwimlane = function(cell)\n{\n\twhile (cell != null && !this.isSwimlane(cell))\n\t{\n\t\tcell = this.model.getParent(cell);\n\t}\n\t\n\treturn cell;\n};\n\n/**\n * Function: getSwimlaneAt\n * \n * Returns the bottom-most swimlane that intersects the given point (x, y)\n * in the cell hierarchy that starts at the given parent.\n * \n * Parameters:\n * \n * x - X-coordinate of the location to be checked.\n * y - Y-coordinate of the location to be checked.\n * parent - <mxCell> that should be used as the root of the recursion.\n * Default is <defaultParent>.\n */\nmxGraph.prototype.getSwimlaneAt = function (x, y, parent)\n{\n\tparent = parent || this.getDefaultParent();\n\t\n\tif (parent != null)\n\t{\n\t\tvar childCount = this.model.getChildCount(parent);\n\t\t\n\t\tfor (var i = 0; i < childCount; i++)\n\t\t{\n\t\t\tvar child = this.model.getChildAt(parent, i);\n\t\t\tvar result = this.getSwimlaneAt(x, y, child);\n\t\t\t\n\t\t\tif (result != null)\n\t\t\t{\n\t\t\t\treturn result;\n\t\t\t}\n\t\t\telse if (this.isSwimlane(child))\n\t\t\t{\n\t\t\t\tvar state = this.view.getState(child);\n\t\t\t\t\n\t\t\t\tif (this.intersects(state, x, y))\n\t\t\t\t{\n\t\t\t\t\treturn child;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t\n\treturn null;\n};\n\n/**\n * Function: getCellAt\n * \n * Returns the bottom-most cell that intersects the given point (x, y) in\n * the cell hierarchy starting at the given parent. This will also return\n * swimlanes if the given location intersects the content area of the\n * swimlane. If this is not desired, then the <hitsSwimlaneContent> may be\n * used if the returned cell is a swimlane to determine if the location\n * is inside the content area or on the actual title of the swimlane.\n * \n * Parameters:\n * \n * x - X-coordinate of the location to be checked.\n * y - Y-coordinate of the location to be checked.\n * parent - <mxCell> that should be used as the root of the recursion.\n * Default is current root of the view or the root of the model.\n * vertices - Optional boolean indicating if vertices should be returned.\n * Default is true.\n * edges - Optional boolean indicating if edges should be returned. Default\n * is true.\n * ignoreFn - Optional function that returns true if cell should be ignored.\n * The function is passed the cell state and the x and y parameter.\n */\nmxGraph.prototype.getCellAt = function(x, y, parent, vertices, edges, ignoreFn)\n{\n\tvertices = (vertices != null) ? vertices : true;\n\tedges = (edges != null) ? edges : true;\n\n\tif (parent == null)\n\t{\n\t\tparent = this.getCurrentRoot();\n\t\t\n\t\tif (parent == null)\n\t\t{\n\t\t\tparent = this.getModel().getRoot();\n\t\t}\n\t}\n\n\tif (parent != null)\n\t{\n\t\tvar childCount = this.model.getChildCount(parent);\n\t\t\n\t\tfor (var i = childCount - 1; i >= 0; i--)\n\t\t{\n\t\t\tvar cell = this.model.getChildAt(parent, i);\n\t\t\tvar result = this.getCellAt(x, y, cell, vertices, edges, ignoreFn);\n\t\t\t\n\t\t\tif (result != null)\n\t\t\t{\n\t\t\t\treturn result;\n\t\t\t}\n\t\t\telse if (this.isCellVisible(cell) && (edges && this.model.isEdge(cell) ||\n\t\t\t\tvertices && this.model.isVertex(cell)))\n\t\t\t{\n\t\t\t\tvar state = this.view.getState(cell);\n\n\t\t\t\tif (state != null && (ignoreFn == null || !ignoreFn(state, x, y)) &&\n\t\t\t\t\tthis.intersects(state, x, y))\n\t\t\t\t{\n\t\t\t\t\treturn cell;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t\n\treturn null;\n};\n\n/**\n * Function: intersects\n * \n * Returns the bottom-most cell that intersects the given point (x, y) in\n * the cell hierarchy that starts at the given parent.\n * \n * Parameters:\n * \n * state - <mxCellState> that represents the cell state.\n * x - X-coordinate of the location to be checked.\n * y - Y-coordinate of the location to be checked.\n */\nmxGraph.prototype.intersects = function(state, x, y)\n{\n\tif (state != null)\n\t{\n\t\tvar pts = state.absolutePoints;\n\n\t\tif (pts != null)\n\t\t{\n\t\t\tvar t2 = this.tolerance * this.tolerance;\n\t\t\tvar pt = pts[0];\n\t\t\t\n\t\t\tfor (var i = 1; i < pts.length; i++)\n\t\t\t{\n\t\t\t\tvar next = pts[i];\n\t\t\t\tvar dist = mxUtils.ptSegDistSq(pt.x, pt.y, next.x, next.y, x, y);\n\t\t\t\t\n\t\t\t\tif (dist <= t2)\n\t\t\t\t{\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tpt = next;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tvar alpha = mxUtils.toRadians(mxUtils.getValue(state.style, mxConstants.STYLE_ROTATION) || 0);\n\t\t\t\n\t\t\tif (alpha != 0)\n\t\t\t{\n\t\t\t\tvar cos = Math.cos(-alpha);\n\t\t\t\tvar sin = Math.sin(-alpha);\n\t\t\t\tvar cx = new mxPoint(state.getCenterX(), state.getCenterY());\n\t\t\t\tvar pt = mxUtils.getRotatedPoint(new mxPoint(x, y), cos, sin, cx);\n\t\t\t\tx = pt.x;\n\t\t\t\ty = pt.y;\n\t\t\t}\n\t\t\t\n\t\t\tif (mxUtils.contains(state, x, y))\n\t\t\t{\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t}\n\t\n\treturn false;\n};\n\n/**\n * Function: hitsSwimlaneContent\n * \n * Returns true if the given coordinate pair is inside the content\n * are of the given swimlane.\n * \n * Parameters:\n * \n * swimlane - <mxCell> that specifies the swimlane.\n * x - X-coordinate of the mouse event.\n * y - Y-coordinate of the mouse event.\n */\nmxGraph.prototype.hitsSwimlaneContent = function(swimlane, x, y)\n{\n\tvar state = this.getView().getState(swimlane);\n\tvar size = this.getStartSize(swimlane);\n\t\n\tif (state != null)\n\t{\n\t\tvar scale = this.getView().getScale();\n\t\tx -= state.x;\n\t\ty -= state.y;\n\t\t\n\t\tif (size.width > 0 && x > 0 && x > size.width * scale)\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\telse if (size.height > 0 && y > 0 && y > size.height * scale)\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t}\n\t\n\treturn false;\n};\n\n/**\n * Function: getChildVertices\n * \n * Returns the visible child vertices of the given parent.\n * \n * Parameters:\n * \n * parent - <mxCell> whose children should be returned.\n */\nmxGraph.prototype.getChildVertices = function(parent)\n{\n\treturn this.getChildCells(parent, true, false);\n};\n\t\n/**\n * Function: getChildEdges\n * \n * Returns the visible child edges of the given parent.\n * \n * Parameters:\n * \n * parent - <mxCell> whose child vertices should be returned.\n */\nmxGraph.prototype.getChildEdges = function(parent)\n{\n\treturn this.getChildCells(parent, false, true);\n};\n\n/**\n * Function: getChildCells\n * \n * Returns the visible child vertices or edges in the given parent. If\n * vertices and edges is false, then all children are returned.\n * \n * Parameters:\n * \n * parent - <mxCell> whose children should be returned.\n * vertices - Optional boolean that specifies if child vertices should\n * be returned. Default is false.\n * edges - Optional boolean that specifies if child edges should\n * be returned. Default is false.\n */\nmxGraph.prototype.getChildCells = function(parent, vertices, edges)\n{\n\tparent = (parent != null) ? parent : this.getDefaultParent();\n\tvertices = (vertices != null) ? vertices : false;\n\tedges = (edges != null) ? edges : false;\n\n\tvar cells = this.model.getChildCells(parent, vertices, edges);\n\tvar result = [];\n\n\t// Filters out the non-visible child cells\n\tfor (var i = 0; i < cells.length; i++)\n\t{\n\t\tif (this.isCellVisible(cells[i]))\n\t\t{\n\t\t\tresult.push(cells[i]);\n\t\t}\n\t}\n\n\treturn result;\n};\n\t\n/**\n * Function: getConnections\n * \n * Returns all visible edges connected to the given cell without loops.\n * \n * Parameters:\n * \n * cell - <mxCell> whose connections should be returned.\n * parent - Optional parent of the opposite end for a connection to be\n * returned.\n */\nmxGraph.prototype.getConnections = function(cell, parent)\n{\n\treturn this.getEdges(cell, parent, true, true, false);\n};\n\t\n/**\n * Function: getIncomingEdges\n * \n * Returns the visible incoming edges for the given cell. If the optional\n * parent argument is specified, then only child edges of the given parent\n * are returned.\n * \n * Parameters:\n * \n * cell - <mxCell> whose incoming edges should be returned.\n * parent - Optional parent of the opposite end for an edge to be\n * returned.\n */\nmxGraph.prototype.getIncomingEdges = function(cell, parent)\n{\n\treturn this.getEdges(cell, parent, true, false, false);\n};\n\t\n/**\n * Function: getOutgoingEdges\n * \n * Returns the visible outgoing edges for the given cell. If the optional\n * parent argument is specified, then only child edges of the given parent\n * are returned.\n * \n * Parameters:\n * \n * cell - <mxCell> whose outgoing edges should be returned.\n * parent - Optional parent of the opposite end for an edge to be\n * returned.\n */\nmxGraph.prototype.getOutgoingEdges = function(cell, parent)\n{\n\treturn this.getEdges(cell, parent, false, true, false);\n};\n\t\n/**\n * Function: getEdges\n * \n * Returns the incoming and/or outgoing edges for the given cell.\n * If the optional parent argument is specified, then only edges are returned\n * where the opposite is in the given parent cell. If at least one of incoming\n * or outgoing is true, then loops are ignored, if both are false, then all\n * edges connected to the given cell are returned including loops.\n * \n * Parameters:\n * \n * cell - <mxCell> whose edges should be returned.\n * parent - Optional parent of the opposite end for an edge to be\n * returned.\n * incoming - Optional boolean that specifies if incoming edges should\n * be included in the result. Default is true.\n * outgoing - Optional boolean that specifies if outgoing edges should\n * be included in the result. Default is true.\n * includeLoops - Optional boolean that specifies if loops should be\n * included in the result. Default is true.\n * recurse - Optional boolean the specifies if the parent specified only \n * need be an ancestral parent, true, or the direct parent, false.\n * Default is false\n */\nmxGraph.prototype.getEdges = function(cell, parent, incoming, outgoing, includeLoops, recurse)\n{\n\tincoming = (incoming != null) ? incoming : true;\n\toutgoing = (outgoing != null) ? outgoing : true;\n\tincludeLoops = (includeLoops != null) ? includeLoops : true;\n\trecurse = (recurse != null) ? recurse : false;\n\t\n\tvar edges = [];\n\tvar isCollapsed = this.isCellCollapsed(cell);\n\tvar childCount = this.model.getChildCount(cell);\n\n\tfor (var i = 0; i < childCount; i++)\n\t{\n\t\tvar child = this.model.getChildAt(cell, i);\n\n\t\tif (isCollapsed || !this.isCellVisible(child))\n\t\t{\n\t\t\tedges = edges.concat(this.model.getEdges(child, incoming, outgoing));\n\t\t}\n\t}\n\n\tedges = edges.concat(this.model.getEdges(cell, incoming, outgoing));\n\tvar result = [];\n\t\n\tfor (var i = 0; i < edges.length; i++)\n\t{\n\t\tvar state = this.view.getState(edges[i]);\n\t\t\n\t\tvar source = (state != null) ? state.getVisibleTerminal(true) : this.view.getVisibleTerminal(edges[i], true);\n\t\tvar target = (state != null) ? state.getVisibleTerminal(false) : this.view.getVisibleTerminal(edges[i], false);\n\n\t\tif ((includeLoops && source == target) || ((source != target) && ((incoming &&\n\t\t\ttarget == cell && (parent == null || this.isValidAncestor(source, parent, recurse))) ||\n\t\t\t(outgoing && source == cell && (parent == null ||\n\t\t\t\t\tthis.isValidAncestor(target, parent, recurse))))))\n\t\t{\n\t\t\tresult.push(edges[i]);\n\t\t}\n\t}\n\n\treturn result;\n};\n\n/**\n * Function: isValidAncestor\n * \n * Returns whether or not the specified parent is a valid\n * ancestor of the specified cell, either direct or indirectly\n * based on whether ancestor recursion is enabled.\n * \n * Parameters:\n * \n * cell - <mxCell> the possible child cell\n * parent - <mxCell> the possible parent cell\n * recurse - boolean whether or not to recurse the child ancestors\n */\nmxGraph.prototype.isValidAncestor = function(cell, parent, recurse)\n{\n\treturn (recurse ? this.model.isAncestor(parent, cell) : this.model\n\t\t\t.getParent(cell) == parent);\n};\n\n/**\n * Function: getOpposites\n * \n * Returns all distinct visible opposite cells for the specified terminal\n * on the given edges.\n * \n * Parameters:\n * \n * edges - Array of <mxCells> that contains the edges whose opposite\n * terminals should be returned.\n * terminal - Terminal that specifies the end whose opposite should be\n * returned.\n * source - Optional boolean that specifies if source terminals should be\n * included in the result. Default is true.\n * targets - Optional boolean that specifies if targer terminals should be\n * included in the result. Default is true.\n */\nmxGraph.prototype.getOpposites = function(edges, terminal, sources, targets)\n{\n\tsources = (sources != null) ? sources : true;\n\ttargets = (targets != null) ? targets : true;\n\t\n\tvar terminals = [];\n\t\n\t// Fast lookup to avoid duplicates in terminals array\n\tvar dict = new mxDictionary();\n\t\n\tif (edges != null)\n\t{\n\t\tfor (var i = 0; i < edges.length; i++)\n\t\t{\n\t\t\tvar state = this.view.getState(edges[i]);\n\t\t\t\n\t\t\tvar source = (state != null) ? state.getVisibleTerminal(true) : this.view.getVisibleTerminal(edges[i], true);\n\t\t\tvar target = (state != null) ? state.getVisibleTerminal(false) : this.view.getVisibleTerminal(edges[i], false);\n\t\t\t\n\t\t\t// Checks if the terminal is the source of the edge and if the\n\t\t\t// target should be stored in the result\n\t\t\tif (source == terminal && target != null && target != terminal && targets)\n\t\t\t{\n\t\t\t\tif (!dict.get(target))\n\t\t\t\t{\n\t\t\t\t\tdict.put(target, true);\n\t\t\t\t\tterminals.push(target);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// Checks if the terminal is the taget of the edge and if the\n\t\t\t// source should be stored in the result\n\t\t\telse if (target == terminal && source != null && source != terminal && sources)\n\t\t\t{\n\t\t\t\tif (!dict.get(source))\n\t\t\t\t{\n\t\t\t\t\tdict.put(source, true);\n\t\t\t\t\tterminals.push(source);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t\n\treturn terminals;\n};\n\n/**\n * Function: getEdgesBetween\n * \n * Returns the edges between the given source and target. This takes into\n * account collapsed and invisible cells and returns the connected edges\n * as displayed on the screen.\n * \n * Parameters:\n * \n * source -\n * target -\n * directed -\n */\nmxGraph.prototype.getEdgesBetween = function(source, target, directed)\n{\n\tdirected = (directed != null) ? directed : false;\n\tvar edges = this.getEdges(source);\n\tvar result = [];\n\n\t// Checks if the edge is connected to the correct\n\t// cell and returns the first match\n\tfor (var i = 0; i < edges.length; i++)\n\t{\n\t\tvar state = this.view.getState(edges[i]);\n\t\t\n\t\tvar src = (state != null) ? state.getVisibleTerminal(true) : this.view.getVisibleTerminal(edges[i], true);\n\t\tvar trg = (state != null) ? state.getVisibleTerminal(false) : this.view.getVisibleTerminal(edges[i], false);\n\n\t\tif ((src == source && trg == target) || (!directed && src == target && trg == source))\n\t\t{\n\t\t\tresult.push(edges[i]);\n\t\t}\n\t}\n\n\treturn result;\n};\n\n/**\n * Function: getPointForEvent\n * \n * Returns an <mxPoint> representing the given event in the unscaled,\n * non-translated coordinate space of <container> and applies the grid.\n * \n * Parameters:\n * \n * evt - Mousevent that contains the mouse pointer location.\n * addOffset - Optional boolean that specifies if the position should be\n * offset by half of the <gridSize>. Default is true.\n */\n mxGraph.prototype.getPointForEvent = function(evt, addOffset)\n {\n\tvar p = mxUtils.convertPoint(this.container,\n\t\tmxEvent.getClientX(evt), mxEvent.getClientY(evt));\n\t\n\tvar s = this.view.scale;\n\tvar tr = this.view.translate;\n\tvar off = (addOffset != false) ? this.gridSize / 2 : 0;\n\t\n\tp.x = this.snap(p.x / s - tr.x - off);\n\tp.y = this.snap(p.y / s - tr.y - off);\n\t\n\treturn p;\n };\n\n/**\n * Function: getCells\n * \n * Returns the child vertices and edges of the given parent that are contained\n * in the given rectangle. The result is added to the optional result array,\n * which is returned. If no result array is specified then a new array is\n * created and returned.\n * \n * Parameters:\n * \n * x - X-coordinate of the rectangle.\n * y - Y-coordinate of the rectangle.\n * width - Width of the rectangle.\n * height - Height of the rectangle.\n * parent - <mxCell> that should be used as the root of the recursion.\n * Default is current root of the view or the root of the model.\n * result - Optional array to store the result in.\n */\nmxGraph.prototype.getCells = function(x, y, width, height, parent, result)\n{\n\tresult = (result != null) ? result : [];\n\t\n\tif (width > 0 || height > 0)\n\t{\n\t\tvar model = this.getModel();\n\t\tvar right = x + width;\n\t\tvar bottom = y + height;\n\n\t\tif (parent == null)\n\t\t{\n\t\t\tparent = this.getCurrentRoot();\n\t\t\t\n\t\t\tif (parent == null)\n\t\t\t{\n\t\t\t\tparent = model.getRoot();\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (parent != null)\n\t\t{\n\t\t\tvar childCount = model.getChildCount(parent);\n\t\t\t\n\t\t\tfor (var i = 0; i < childCount; i++)\n\t\t\t{\n\t\t\t\tvar cell = model.getChildAt(parent, i);\n\t\t\t\tvar state = this.view.getState(cell);\n\t\t\t\t\n\t\t\t\tif (state != null && this.isCellVisible(cell))\n\t\t\t\t{\n\t\t\t\t\tvar deg = mxUtils.getValue(state.style, mxConstants.STYLE_ROTATION) || 0;\n\t\t\t\t\tvar box = state;\n\t\t\t\t\t\n\t\t\t\t\tif (deg != 0)\n\t\t\t\t\t{\n\t\t\t\t\t\tbox = mxUtils.getBoundingBox(box, deg);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif ((model.isEdge(cell) || model.isVertex(cell)) &&\n\t\t\t\t\t\tbox.x >= x && box.y + box.height <= bottom &&\n\t\t\t\t\t\tbox.y >= y && box.x + box.width <= right)\n\t\t\t\t\t{\n\t\t\t\t\t\tresult.push(cell);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tthis.getCells(x, y, width, height, cell, result);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t\n\treturn result;\n};\n\n/**\n * Function: getCellsBeyond\n * \n * Returns the children of the given parent that are contained in the\n * halfpane from the given point (x0, y0) rightwards or downwards\n * depending on rightHalfpane and bottomHalfpane.\n * \n * Parameters:\n * \n * x0 - X-coordinate of the origin.\n * y0 - Y-coordinate of the origin.\n * parent - Optional <mxCell> whose children should be checked. Default is\n * <defaultParent>.\n * rightHalfpane - Boolean indicating if the cells in the right halfpane\n * from the origin should be returned.\n * bottomHalfpane - Boolean indicating if the cells in the bottom halfpane\n * from the origin should be returned.\n */\nmxGraph.prototype.getCellsBeyond = function(x0, y0, parent, rightHalfpane, bottomHalfpane)\n{\n\tvar result = [];\n\t\n\tif (rightHalfpane || bottomHalfpane)\n\t{\n\t\tif (parent == null)\n\t\t{\n\t\t\tparent = this.getDefaultParent();\n\t\t}\n\t\t\n\t\tif (parent != null)\n\t\t{\n\t\t\tvar childCount = this.model.getChildCount(parent);\n\t\t\t\n\t\t\tfor (var i = 0; i < childCount; i++)\n\t\t\t{\n\t\t\t\tvar child = this.model.getChildAt(parent, i);\n\t\t\t\tvar state = this.view.getState(child);\n\t\t\t\t\n\t\t\t\tif (this.isCellVisible(child) && state != null)\n\t\t\t\t{\n\t\t\t\t\tif ((!rightHalfpane || state.x >= x0) &&\n\t\t\t\t\t\t(!bottomHalfpane || state.y >= y0))\n\t\t\t\t\t{\n\t\t\t\t\t\tresult.push(child);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t\n\treturn result;\n};\n\n/**\n * Function: findTreeRoots\n * \n * Returns all children in the given parent which do not have incoming\n * edges. If the result is empty then the with the greatest difference\n * between incoming and outgoing edges is returned.\n * \n * Parameters:\n * \n * parent - <mxCell> whose children should be checked.\n * isolate - Optional boolean that specifies if edges should be ignored if\n * the opposite end is not a child of the given parent cell. Default is\n * false.\n * invert - Optional boolean that specifies if outgoing or incoming edges\n * should be counted for a tree root. If false then outgoing edges will be\n * counted. Default is false.\n */\nmxGraph.prototype.findTreeRoots = function(parent, isolate, invert)\n{\n\tisolate = (isolate != null) ? isolate : false;\n\tinvert = (invert != null) ? invert : false;\n\tvar roots = [];\n\t\n\tif (parent != null)\n\t{\n\t\tvar model = this.getModel();\n\t\tvar childCount = model.getChildCount(parent);\n\t\tvar best = null;\n\t\tvar maxDiff = 0;\n\t\t\n\t\tfor (var i=0; i<childCount; i++)\n\t\t{\n\t\t\tvar cell = model.getChildAt(parent, i);\n\t\t\t\n\t\t\tif (this.model.isVertex(cell) && this.isCellVisible(cell))\n\t\t\t{\n\t\t\t\tvar conns = this.getConnections(cell, (isolate) ? parent : null);\n\t\t\t\tvar fanOut = 0;\n\t\t\t\tvar fanIn = 0;\n\t\t\t\t\n\t\t\t\tfor (var j = 0; j < conns.length; j++)\n\t\t\t\t{\n\t\t\t\t\tvar src = this.view.getVisibleTerminal(conns[j], true);\n\n                    if (src == cell)\n                    {\n                        fanOut++;\n                    }\n                    else\n                    {\n                        fanIn++;\n                    }\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif ((invert && fanOut == 0 && fanIn > 0) ||\n\t\t\t\t\t(!invert && fanIn == 0 && fanOut > 0))\n\t\t\t\t{\n\t\t\t\t\troots.push(cell);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tvar diff = (invert) ? fanIn - fanOut : fanOut - fanIn;\n\t\t\t\t\n\t\t\t\tif (diff > maxDiff)\n\t\t\t\t{\n\t\t\t\t\tmaxDiff = diff;\n\t\t\t\t\tbest = cell;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (roots.length == 0 && best != null)\n\t\t{\n\t\t\troots.push(best);\n\t\t}\n\t}\n\t\n\treturn roots;\n};\n\n/**\n * Function: traverse\n * \n * Traverses the (directed) graph invoking the given function for each\n * visited vertex and edge. The function is invoked with the current vertex\n * and the incoming edge as a parameter. This implementation makes sure\n * each vertex is only visited once. The function may return false if the\n * traversal should stop at the given vertex.\n * \n * Example:\n * \n * (code)\n * mxLog.show();\n * var cell = graph.getSelectionCell();\n * graph.traverse(cell, false, function(vertex, edge)\n * {\n *   mxLog.debug(graph.getLabel(vertex));\n * });\n * (end)\n * \n * Parameters:\n * \n * vertex - <mxCell> that represents the vertex where the traversal starts.\n * directed - Optional boolean indicating if edges should only be traversed\n * from source to target. Default is true.\n * func - Visitor function that takes the current vertex and the incoming\n * edge as arguments. The traversal stops if the function returns false.\n * edge - Optional <mxCell> that represents the incoming edge. This is\n * null for the first step of the traversal.\n * visited - Optional <mxDictionary> from cells to true for the visited cells.\n * inverse - Optional boolean to traverse in inverse direction. Default is false.\n * This is ignored if directed is false.\n */\nmxGraph.prototype.traverse = function(vertex, directed, func, edge, visited, inverse)\n{\n\tif (func != null && vertex != null)\n\t{\n\t\tdirected = (directed != null) ? directed : true;\n\t\tinverse = (inverse != null) ? inverse : false;\n\t\tvisited = visited || new mxDictionary();\n\t\t\n\t\tif (!visited.get(vertex))\n\t\t{\n\t\t\tvisited.put(vertex, true);\n\t\t\tvar result = func(vertex, edge);\n\t\t\t\n\t\t\tif (result == null || result)\n\t\t\t{\n\t\t\t\tvar edgeCount = this.model.getEdgeCount(vertex);\n\t\t\t\t\n\t\t\t\tif (edgeCount > 0)\n\t\t\t\t{\n\t\t\t\t\tfor (var i = 0; i < edgeCount; i++)\n\t\t\t\t\t{\n\t\t\t\t\t\tvar e = this.model.getEdgeAt(vertex, i);\n\t\t\t\t\t\tvar isSource = this.model.getTerminal(e, true) == vertex;\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (!directed || (!inverse == isSource))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tvar next = this.model.getTerminal(e, !isSource);\n\t\t\t\t\t\t\tthis.traverse(next, directed, func, e, visited, inverse);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n};\n\n/**\n * Group: Selection\n */\n\n/**\n * Function: isCellSelected\n * \n * Returns true if the given cell is selected.\n * \n * Parameters:\n * \n * cell - <mxCell> for which the selection state should be returned.\n */\nmxGraph.prototype.isCellSelected = function(cell)\n{\n\treturn this.getSelectionModel().isSelected(cell);\n};\n\n/**\n * Function: isSelectionEmpty\n * \n * Returns true if the selection is empty.\n */\nmxGraph.prototype.isSelectionEmpty = function()\n{\n\treturn this.getSelectionModel().isEmpty();\n};\n\n/**\n * Function: clearSelection\n * \n * Clears the selection using <mxGraphSelectionModel.clear>.\n */\nmxGraph.prototype.clearSelection = function()\n{\n\treturn this.getSelectionModel().clear();\n};\n\n/**\n * Function: getSelectionCount\n * \n * Returns the number of selected cells.\n */\nmxGraph.prototype.getSelectionCount = function()\n{\n\treturn this.getSelectionModel().cells.length;\n};\n\t\n/**\n * Function: getSelectionCell\n * \n * Returns the first cell from the array of selected <mxCells>.\n */\nmxGraph.prototype.getSelectionCell = function()\n{\n\treturn this.getSelectionModel().cells[0];\n};\n\n/**\n * Function: getSelectionCells\n * \n * Returns the array of selected <mxCells>.\n */\nmxGraph.prototype.getSelectionCells = function()\n{\n\treturn this.getSelectionModel().cells.slice();\n};\n\n/**\n * Function: setSelectionCell\n * \n * Sets the selection cell.\n * \n * Parameters:\n * \n * cell - <mxCell> to be selected.\n */\nmxGraph.prototype.setSelectionCell = function(cell)\n{\n\tthis.getSelectionModel().setCell(cell);\n};\n\n/**\n * Function: setSelectionCells\n * \n * Sets the selection cell.\n * \n * Parameters:\n * \n * cells - Array of <mxCells> to be selected.\n */\nmxGraph.prototype.setSelectionCells = function(cells)\n{\n\tthis.getSelectionModel().setCells(cells);\n};\n\n/**\n * Function: addSelectionCell\n * \n * Adds the given cell to the selection.\n * \n * Parameters:\n * \n * cell - <mxCell> to be add to the selection.\n */\nmxGraph.prototype.addSelectionCell = function(cell)\n{\n\tthis.getSelectionModel().addCell(cell);\n};\n\n/**\n * Function: addSelectionCells\n * \n * Adds the given cells to the selection.\n * \n * Parameters:\n * \n * cells - Array of <mxCells> to be added to the selection.\n */\nmxGraph.prototype.addSelectionCells = function(cells)\n{\n\tthis.getSelectionModel().addCells(cells);\n};\n\n/**\n * Function: removeSelectionCell\n * \n * Removes the given cell from the selection.\n * \n * Parameters:\n * \n * cell - <mxCell> to be removed from the selection.\n */\nmxGraph.prototype.removeSelectionCell = function(cell)\n{\n\tthis.getSelectionModel().removeCell(cell);\n};\n\n/**\n * Function: removeSelectionCells\n * \n * Removes the given cells from the selection.\n * \n * Parameters:\n * \n * cells - Array of <mxCells> to be removed from the selection.\n */\nmxGraph.prototype.removeSelectionCells = function(cells)\n{\n\tthis.getSelectionModel().removeCells(cells);\n};\n\n/**\n * Function: selectRegion\n * \n * Selects and returns the cells inside the given rectangle for the\n * specified event.\n * \n * Parameters:\n * \n * rect - <mxRectangle> that represents the region to be selected.\n * evt - Mouseevent that triggered the selection.\n */\nmxGraph.prototype.selectRegion = function(rect, evt)\n{\n\tvar cells = this.getCells(rect.x, rect.y, rect.width, rect.height);\n\tthis.selectCellsForEvent(cells, evt);\n\t\n\treturn cells;\n};\n\n/**\n * Function: selectNextCell\n * \n * Selects the next cell.\n */\nmxGraph.prototype.selectNextCell = function()\n{\n\tthis.selectCell(true);\n};\n\n/**\n * Function: selectPreviousCell\n * \n * Selects the previous cell.\n */\nmxGraph.prototype.selectPreviousCell = function()\n{\n\tthis.selectCell();\n};\n\n/**\n * Function: selectParentCell\n * \n * Selects the parent cell.\n */\nmxGraph.prototype.selectParentCell = function()\n{\n\tthis.selectCell(false, true);\n};\n\n/**\n * Function: selectChildCell\n * \n * Selects the first child cell.\n */\nmxGraph.prototype.selectChildCell = function()\n{\n\tthis.selectCell(false, false, true);\n};\n\n/**\n * Function: selectCell\n * \n * Selects the next, parent, first child or previous cell, if all arguments\n * are false.\n * \n * Parameters:\n * \n * isNext - Boolean indicating if the next cell should be selected.\n * isParent - Boolean indicating if the parent cell should be selected.\n * isChild - Boolean indicating if the first child cell should be selected.\n */\nmxGraph.prototype.selectCell = function(isNext, isParent, isChild)\n{\n\tvar sel = this.selectionModel;\n\tvar cell = (sel.cells.length > 0) ? sel.cells[0] : null;\n\t\n\tif (sel.cells.length > 1)\n\t{\n\t\tsel.clear();\n\t}\n\t\n\tvar parent = (cell != null) ?\n\t\tthis.model.getParent(cell) :\n\t\tthis.getDefaultParent();\n\t\n\tvar childCount = this.model.getChildCount(parent);\n\t\n\tif (cell == null && childCount > 0)\n\t{\n\t\tvar child = this.model.getChildAt(parent, 0);\n\t\tthis.setSelectionCell(child);\n\t}\n\telse if ((cell == null || isParent) &&\n\t\tthis.view.getState(parent) != null &&\n\t\tthis.model.getGeometry(parent) != null)\n\t{\n\t\tif (this.getCurrentRoot() != parent)\n\t\t{\n\t\t\tthis.setSelectionCell(parent);\n\t\t}\n\t}\n\telse if (cell != null && isChild)\n\t{\n\t\tvar tmp = this.model.getChildCount(cell);\n\t\t\n\t\tif (tmp > 0)\n\t\t{\n\t\t\tvar child = this.model.getChildAt(cell, 0);\n\t\t\tthis.setSelectionCell(child);\n\t\t}\n\t}\n\telse if (childCount > 0)\n\t{\n\t\tvar i = parent.getIndex(cell);\n\t\t\n\t\tif (isNext)\n\t\t{\n\t\t\ti++;\n\t\t\tvar child = this.model.getChildAt(parent, i % childCount);\n\t\t\tthis.setSelectionCell(child);\n\t\t}\n\t\telse\n\t\t{\n\t\t\ti--;\n\t\t\tvar index =  (i < 0) ? childCount - 1 : i;\n\t\t\tvar child = this.model.getChildAt(parent, index);\n\t\t\tthis.setSelectionCell(child);\n\t\t}\n\t}\n};\n\n/**\n * Function: selectAll\n * \n * Selects all children of the given parent cell or the children of the\n * default parent if no parent is specified. To select leaf vertices and/or\n * edges use <selectCells>.\n * \n * Parameters:\n * \n * parent - Optional <mxCell> whose children should be selected.\n * Default is <defaultParent>.\n * descendants - Optional boolean specifying whether all descendants should be\n * selected. Default is false.\n */\nmxGraph.prototype.selectAll = function(parent, descendants)\n{\n\tparent = parent || this.getDefaultParent();\n\t\n\tvar cells = (descendants) ? this.model.filterDescendants(function(cell)\n\t{\n\t\treturn cell != parent;\n\t}, parent) : this.model.getChildren(parent);\n\t\n\tif (cells != null)\n\t{\n\t\tthis.setSelectionCells(cells);\n\t}\n};\n\n/**\n * Function: selectVertices\n * \n * Select all vertices inside the given parent or the default parent.\n */\nmxGraph.prototype.selectVertices = function(parent)\n{\n\tthis.selectCells(true, false, parent);\n};\n\n/**\n * Function: selectVertices\n * \n * Select all vertices inside the given parent or the default parent.\n */\nmxGraph.prototype.selectEdges = function(parent)\n{\n\tthis.selectCells(false, true, parent);\n};\n\n/**\n * Function: selectCells\n * \n * Selects all vertices and/or edges depending on the given boolean\n * arguments recursively, starting at the given parent or the default\n * parent if no parent is specified. Use <selectAll> to select all cells.\n * For vertices, only cells with no children are selected.\n * \n * Parameters:\n * \n * vertices - Boolean indicating if vertices should be selected.\n * edges - Boolean indicating if edges should be selected.\n * parent - Optional <mxCell> that acts as the root of the recursion.\n * Default is <defaultParent>.\n */\nmxGraph.prototype.selectCells = function(vertices, edges, parent)\n{\n\tparent = parent || this.getDefaultParent();\n\t\n\tvar filter = mxUtils.bind(this, function(cell)\n\t{\n\t\treturn this.view.getState(cell) != null &&\n\t\t\t((this.model.getChildCount(cell) == 0 && this.model.isVertex(cell) && vertices\n\t\t\t&& !this.model.isEdge(this.model.getParent(cell))) ||\n\t\t\t(this.model.isEdge(cell) && edges));\n\t});\n\t\n\tvar cells = this.model.filterDescendants(filter, parent);\n\tthis.setSelectionCells(cells);\n};\n\n/**\n * Function: selectCellForEvent\n * \n * Selects the given cell by either adding it to the selection or\n * replacing the selection depending on whether the given mouse event is a\n * toggle event.\n * \n * Parameters:\n * \n * cell - <mxCell> to be selected.\n * evt - Optional mouseevent that triggered the selection.\n */\nmxGraph.prototype.selectCellForEvent = function(cell, evt)\n{\n\tvar isSelected = this.isCellSelected(cell);\n\t\n\tif (this.isToggleEvent(evt))\n\t{\n\t\tif (isSelected)\n\t\t{\n\t\t\tthis.removeSelectionCell(cell);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tthis.addSelectionCell(cell);\n\t\t}\n\t}\n\telse if (!isSelected || this.getSelectionCount() != 1)\n\t{\n\t\tthis.setSelectionCell(cell);\n\t}\n};\n\n/**\n * Function: selectCellsForEvent\n * \n * Selects the given cells by either adding them to the selection or\n * replacing the selection depending on whether the given mouse event is a\n * toggle event.\n * \n * Parameters:\n * \n * cells - Array of <mxCells> to be selected.\n * evt - Optional mouseevent that triggered the selection.\n */\nmxGraph.prototype.selectCellsForEvent = function(cells, evt)\n{\n\tif (this.isToggleEvent(evt))\n\t{\n\t\tthis.addSelectionCells(cells);\n\t}\n\telse\n\t{\n\t\tthis.setSelectionCells(cells);\n\t}\n};\n\n/**\n * Group: Selection state\n */\n\n/**\n * Function: createHandler\n * \n * Creates a new handler for the given cell state. This implementation\n * returns a new <mxEdgeHandler> of the corresponding cell is an edge,\n * otherwise it returns an <mxVertexHandler>.\n * \n * Parameters:\n * \n * state - <mxCellState> whose handler should be created.\n */\nmxGraph.prototype.createHandler = function(state)\n{\n\tvar result = null;\n\t\n\tif (state != null)\n\t{\n\t\tif (this.model.isEdge(state.cell))\n\t\t{\n\t\t\tvar source = state.getVisibleTerminalState(true);\n\t\t\tvar target = state.getVisibleTerminalState(false);\n\t\t\tvar geo = this.getCellGeometry(state.cell);\n\t\t\t\n\t\t\tvar edgeStyle = this.view.getEdgeStyle(state, (geo != null) ? geo.points : null, source, target);\n\t\t\tresult = this.createEdgeHandler(state, edgeStyle);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tresult = this.createVertexHandler(state);\n\t\t}\n\t}\n\t\n\treturn result;\n};\n\n/**\n * Function: createVertexHandler\n * \n * Hooks to create a new <mxVertexHandler> for the given <mxCellState>.\n * \n * Parameters:\n * \n * state - <mxCellState> to create the handler for.\n */\nmxGraph.prototype.createVertexHandler = function(state)\n{\n\treturn new mxVertexHandler(state);\n};\n\n/**\n * Function: createEdgeHandler\n * \n * Hooks to create a new <mxEdgeHandler> for the given <mxCellState>.\n * \n * Parameters:\n * \n * state - <mxCellState> to create the handler for.\n */\nmxGraph.prototype.createEdgeHandler = function(state, edgeStyle)\n{\n\tvar result = null;\n\t\n\tif (edgeStyle == mxEdgeStyle.Loop ||\n\t\tedgeStyle == mxEdgeStyle.ElbowConnector ||\n\t\tedgeStyle == mxEdgeStyle.SideToSide ||\n\t\tedgeStyle == mxEdgeStyle.TopToBottom)\n\t{\n\t\tresult = this.createElbowEdgeHandler(state);\n\t}\n\telse if (edgeStyle == mxEdgeStyle.SegmentConnector || \n\t\t\tedgeStyle == mxEdgeStyle.OrthConnector)\n\t{\n\t\tresult = this.createEdgeSegmentHandler(state);\n\t}\n\telse\n\t{\n\t\tresult = new mxEdgeHandler(state);\n\t}\n\t\n\treturn result;\n};\n\n/**\n * Function: createEdgeSegmentHandler\n * \n * Hooks to create a new <mxEdgeSegmentHandler> for the given <mxCellState>.\n * \n * Parameters:\n * \n * state - <mxCellState> to create the handler for.\n */\nmxGraph.prototype.createEdgeSegmentHandler = function(state)\n{\n\treturn new mxEdgeSegmentHandler(state);\n};\n\n/**\n * Function: createElbowEdgeHandler\n * \n * Hooks to create a new <mxElbowEdgeHandler> for the given <mxCellState>.\n * \n * Parameters:\n * \n * state - <mxCellState> to create the handler for.\n */\nmxGraph.prototype.createElbowEdgeHandler = function(state)\n{\n\treturn new mxElbowEdgeHandler(state);\n};\n\n/**\n * Group: Graph events\n */\n\n/**\n * Function: addMouseListener\n * \n * Adds a listener to the graph event dispatch loop. The listener\n * must implement the mouseDown, mouseMove and mouseUp methods\n * as shown in the <mxMouseEvent> class.\n * \n * Parameters:\n * \n * listener - Listener to be added to the graph event listeners.\n */\nmxGraph.prototype.addMouseListener = function(listener)\n{\n\tif (this.mouseListeners == null)\n\t{\n\t\tthis.mouseListeners = [];\n\t}\n\t\n\tthis.mouseListeners.push(listener);\n};\n\n/**\n * Function: removeMouseListener\n * \n * Removes the specified graph listener.\n * \n * Parameters:\n * \n * listener - Listener to be removed from the graph event listeners.\n */\nmxGraph.prototype.removeMouseListener = function(listener)\n{\n\tif (this.mouseListeners != null)\n\t{\n\t\tfor (var i = 0; i < this.mouseListeners.length; i++)\n\t\t{\n\t\t\tif (this.mouseListeners[i] == listener)\n\t\t\t{\n\t\t\t\tthis.mouseListeners.splice(i, 1);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n};\n\n/**\n * Function: updateMouseEvent\n * \n * Sets the graphX and graphY properties if the given <mxMouseEvent> if\n * required and returned the event.\n * \n * Parameters:\n * \n * me - <mxMouseEvent> to be updated.\n * evtName - Name of the mouse event.\n */\nmxGraph.prototype.updateMouseEvent = function(me, evtName)\n{\n\tif (me.graphX == null || me.graphY == null)\n\t{\n\t\tvar pt = mxUtils.convertPoint(this.container, me.getX(), me.getY());\n\t\t\n\t\tme.graphX = pt.x - this.panDx;\n\t\tme.graphY = pt.y - this.panDy;\n\t\t\n\t\t// Searches for rectangles using method if native hit detection is disabled on shape\n\t\tif (me.getCell() == null && this.isMouseDown && evtName == mxEvent.MOUSE_MOVE)\n\t\t{\n\t\t\tme.state = this.view.getState(this.getCellAt(pt.x, pt.y, null, null, null, function(state)\n\t\t\t{\n\t\t\t\treturn state.shape == null || state.shape.paintBackground != mxRectangleShape.prototype.paintBackground ||\n\t\t\t\t\tmxUtils.getValue(state.style, mxConstants.STYLE_POINTER_EVENTS, '1') == '1' ||\n\t\t\t\t\t(state.shape.fill != null && state.shape.fill != mxConstants.NONE);\n\t\t\t}));\n\t\t}\n\t}\n\t\n\treturn me;\n};\n\n/**\n * Function: getStateForEvent\n * \n * Returns the state for the given touch event.\n */\nmxGraph.prototype.getStateForTouchEvent = function(evt)\n{\n\tvar x = mxEvent.getClientX(evt);\n\tvar y = mxEvent.getClientY(evt);\n\t\n\t// Dispatches the drop event to the graph which\n\t// consumes and executes the source function\n\tvar pt = mxUtils.convertPoint(this.container, x, y);\n\n\treturn this.view.getState(this.getCellAt(pt.x, pt.y));\n};\n\n/**\n * Function: isEventIgnored\n * \n * Returns true if the event should be ignored in <fireMouseEvent>.\n */\nmxGraph.prototype.isEventIgnored = function(evtName, me, sender)\n{\n\tvar mouseEvent = mxEvent.isMouseEvent(me.getEvent());\n\tvar result = false;\n\n\t// Drops events that are fired more than once\n\tif (me.getEvent() == this.lastEvent)\n\t{\n\t\tresult = true;\n\t}\n\telse\n\t{\n\t\tthis.lastEvent = me.getEvent();\n\t}\n\n\t// Installs event listeners to capture the complete gesture from the event source\n\t// for non-MS touch events as a workaround for all events for the same geture being\n\t// fired from the event source even if that was removed from the DOM.\n\tif (this.eventSource != null && evtName != mxEvent.MOUSE_MOVE)\n\t{\n\t\tmxEvent.removeGestureListeners(this.eventSource, null, this.mouseMoveRedirect, this.mouseUpRedirect);\n\t\tthis.mouseMoveRedirect = null;\n\t\tthis.mouseUpRedirect = null;\n\t\tthis.eventSource = null;\n\t}\n\telse if (!mxClient.IS_GC && this.eventSource != null && me.getSource() != this.eventSource)\n\t{\n\t\tresult = true;\n\t}\n\telse if (mxClient.IS_TOUCH && evtName == mxEvent.MOUSE_DOWN && !mouseEvent && !mxEvent.isPenEvent(me.getEvent()))\n\t{\n\t\tthis.eventSource = me.getSource();\n\n\t\tthis.mouseMoveRedirect = mxUtils.bind(this, function(evt)\n\t\t{\n\t\t\tthis.fireMouseEvent(mxEvent.MOUSE_MOVE, new mxMouseEvent(evt, this.getStateForTouchEvent(evt)));\n\t\t});\n\t\tthis.mouseUpRedirect = mxUtils.bind(this, function(evt)\n\t\t{\n\t\t\tthis.fireMouseEvent(mxEvent.MOUSE_UP, new mxMouseEvent(evt, this.getStateForTouchEvent(evt)));\n\t\t});\n\t\t\n\t\tmxEvent.addGestureListeners(this.eventSource, null, this.mouseMoveRedirect, this.mouseUpRedirect);\n\t}\n\n\t// Factored out the workarounds for FF to make it easier to override/remove\n\t// Note this method has side-effects!\n\tif (this.isSyntheticEventIgnored(evtName, me, sender))\n\t{\n\t\tresult = true;\n\t}\n\n\t// Never fires mouseUp/-Down for double clicks\n\tif (!mxEvent.isPopupTrigger(this.lastEvent) && evtName != mxEvent.MOUSE_MOVE && this.lastEvent.detail == 2)\n\t{\n\t\treturn true;\n\t}\n\t\n\t// Filters out of sequence events or mixed event types during a gesture\n\tif (evtName == mxEvent.MOUSE_UP && this.isMouseDown)\n\t{\n\t\tthis.isMouseDown = false;\n\t}\n\telse if (evtName == mxEvent.MOUSE_DOWN && !this.isMouseDown)\n\t{\n\t\tthis.isMouseDown = true;\n\t\tthis.isMouseTrigger = mouseEvent;\n\t}\n\t// Drops mouse events that are fired during touch gestures as a workaround for Webkit\n\t// and mouse events that are not in sync with the current internal button state\n\telse if (!result && (((!mxClient.IS_FF || evtName != mxEvent.MOUSE_MOVE) &&\n\t\tthis.isMouseDown && this.isMouseTrigger != mouseEvent) ||\n\t\t(evtName == mxEvent.MOUSE_DOWN && this.isMouseDown) ||\n\t\t(evtName == mxEvent.MOUSE_UP && !this.isMouseDown)))\n\t{\n\t\tresult = true;\n\t}\n\t\n\tif (!result && evtName == mxEvent.MOUSE_DOWN)\n\t{\n\t\tthis.lastMouseX = me.getX();\n\t\tthis.lastMouseY = me.getY();\n\t}\n\n\treturn result;\n};\n\n/**\n * Function: isSyntheticEventIgnored\n * \n * Hook for ignoring synthetic mouse events after touchend in Firefox.\n */\nmxGraph.prototype.isSyntheticEventIgnored = function(evtName, me, sender)\n{\n\tvar result = false;\n\tvar mouseEvent = mxEvent.isMouseEvent(me.getEvent());\n\t\n\t// LATER: This does not cover all possible cases that can go wrong in FF\n\tif (this.ignoreMouseEvents && mouseEvent && evtName != mxEvent.MOUSE_MOVE)\n\t{\n\t\tthis.ignoreMouseEvents = evtName != mxEvent.MOUSE_UP;\n\t\tresult = true;\n\t}\n\telse if (mxClient.IS_FF && !mouseEvent && evtName == mxEvent.MOUSE_UP)\n\t{\n\t\tthis.ignoreMouseEvents = true;\n\t}\n\t\n\treturn result;\n};\n\n/**\n * Function: isEventSourceIgnored\n * \n * Returns true if the event should be ignored in <fireMouseEvent>. This\n * implementation returns true for select, option and input (if not of type\n * checkbox, radio, button, submit or file) event sources if the event is not\n * a mouse event or a left mouse button press event.\n * \n * Parameters:\n * \n * evtName - The name of the event.\n * me - <mxMouseEvent> that should be ignored.\n */\nmxGraph.prototype.isEventSourceIgnored = function(evtName, me)\n{\n\tvar source = me.getSource();\n\tvar name = (source.nodeName != null) ? source.nodeName.toLowerCase() : '';\n\tvar candidate = !mxEvent.isMouseEvent(me.getEvent()) || mxEvent.isLeftMouseButton(me.getEvent());\n\t\n\treturn evtName == mxEvent.MOUSE_DOWN && candidate && (name == 'select' || name == 'option' ||\n\t\t(name == 'input' && source.type != 'checkbox' && source.type != 'radio' &&\n\t\tsource.type != 'button' && source.type != 'submit' && source.type != 'file'));\n};\n\n/**\n * Function: getEventState\n * \n * Returns the <mxCellState> to be used when firing the mouse event for the\n * given state. This implementation returns the given state.\n * \n * Parameters:\n * \n * <mxCellState> - State whose event source should be returned.\n */\nmxGraph.prototype.getEventState = function(state)\n{\n\treturn state;\n};\n\n/**\n * Function: fireMouseEvent\n * \n * Dispatches the given event in the graph event dispatch loop. Possible\n * event names are <mxEvent.MOUSE_DOWN>, <mxEvent.MOUSE_MOVE> and\n * <mxEvent.MOUSE_UP>. All listeners are invoked for all events regardless\n * of the consumed state of the event.\n * \n * Parameters:\n * \n * evtName - String that specifies the type of event to be dispatched.\n * me - <mxMouseEvent> to be fired.\n * sender - Optional sender argument. Default is this.\n */\nmxGraph.prototype.fireMouseEvent = function(evtName, me, sender)\n{\n\tif (this.isEventSourceIgnored(evtName, me))\n\t{\n\t\tif (this.tooltipHandler != null)\n\t\t{\n\t\t\tthis.tooltipHandler.hide();\n\t\t}\n\t\t\n\t\treturn;\n\t}\n\t\n\tif (sender == null)\n\t{\n\t\tsender = this;\n\t}\n\n\t// Updates the graph coordinates in the event\n\tme = this.updateMouseEvent(me, evtName);\n\n\t// Detects and processes double taps for touch-based devices which do not have native double click events\n\t// or where detection of double click is not always possible (quirks, IE10+). Note that this can only handle\n\t// double clicks on cells because the sequence of events in IE prevents detection on the background, it fires\n\t// two mouse ups, one of which without a cell but no mousedown for the second click which means we cannot\n\t// detect which mouseup(s) are part of the first click, ie we do not know when the first click ends.\n\tif ((!this.nativeDblClickEnabled && !mxEvent.isPopupTrigger(me.getEvent())) || (this.doubleTapEnabled &&\n\t\tmxClient.IS_TOUCH && (mxEvent.isTouchEvent(me.getEvent()) || mxEvent.isPenEvent(me.getEvent()))))\n\t{\n\t\tvar currentTime = new Date().getTime();\n\t\t\n\t\t// NOTE: Second mouseDown for double click missing in quirks mode\n\t\tif ((!mxClient.IS_QUIRKS && evtName == mxEvent.MOUSE_DOWN) || (mxClient.IS_QUIRKS && evtName == mxEvent.MOUSE_UP && !this.fireDoubleClick))\n\t\t{\n\t\t\tif (this.lastTouchEvent != null && this.lastTouchEvent != me.getEvent() &&\n\t\t\t\tcurrentTime - this.lastTouchTime < this.doubleTapTimeout &&\n\t\t\t\tMath.abs(this.lastTouchX - me.getX()) < this.doubleTapTolerance &&\n\t\t\t\tMath.abs(this.lastTouchY - me.getY()) < this.doubleTapTolerance &&\n\t\t\t\tthis.doubleClickCounter < 2)\n\t\t\t{\n\t\t\t\tthis.doubleClickCounter++;\n\t\t\t\tvar doubleClickFired = false;\n\t\t\t\t\n\t\t\t\tif (evtName == mxEvent.MOUSE_UP)\n\t\t\t\t{\n\t\t\t\t\tif (me.getCell() == this.lastTouchCell && this.lastTouchCell != null)\n\t\t\t\t\t{\n\t\t\t\t\t\tthis.lastTouchTime = 0;\n\t\t\t\t\t\tvar cell = this.lastTouchCell;\n\t\t\t\t\t\tthis.lastTouchCell = null;\n\n\t\t\t\t\t\t// Fires native dblclick event via event source\n\t\t\t\t\t\t// NOTE: This fires two double click events on edges in quirks mode. While\n\t\t\t\t\t\t// trying to fix this, we realized that nativeDoubleClick can be disabled for\n\t\t\t\t\t\t// quirks and IE10+ (or we didn't find the case mentioned above where it\n\t\t\t\t\t\t// would not work), ie. all double clicks seem to be working without this.\n\t\t\t\t\t\tif (mxClient.IS_QUIRKS)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tme.getSource().fireEvent('ondblclick');\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tthis.dblClick(me.getEvent(), cell);\n\t\t\t\t\t\tdoubleClickFired = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tthis.fireDoubleClick = true;\n\t\t\t\t\tthis.lastTouchTime = 0;\n\t\t\t\t}\n\n\t\t\t\t// Do not ignore mouse up in quirks in this case\n\t\t\t\tif (!mxClient.IS_QUIRKS || doubleClickFired)\n\t\t\t\t{\n\t\t\t\t\tmxEvent.consume(me.getEvent());\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if (this.lastTouchEvent == null || this.lastTouchEvent != me.getEvent())\n\t\t\t{\n\t\t\t\tthis.lastTouchCell = me.getCell();\n\t\t\t\tthis.lastTouchX = me.getX();\n\t\t\t\tthis.lastTouchY = me.getY();\n\t\t\t\tthis.lastTouchTime = currentTime;\n\t\t\t\tthis.lastTouchEvent = me.getEvent();\n\t\t\t\tthis.doubleClickCounter = 0;\n\t\t\t}\n\t\t}\n\t\telse if ((this.isMouseDown || evtName == mxEvent.MOUSE_UP) && this.fireDoubleClick)\n\t\t{\n\t\t\tthis.fireDoubleClick = false;\n\t\t\tvar cell = this.lastTouchCell;\n\t\t\tthis.lastTouchCell = null;\n\t\t\tthis.isMouseDown = false;\n\t\t\t\n\t\t\t// Workaround for Chrome/Safari not firing native double click events for double touch on background\n\t\t\tvar valid = (cell != null) || ((mxEvent.isTouchEvent(me.getEvent()) || mxEvent.isPenEvent(me.getEvent())) &&\n\t\t\t\t(mxClient.IS_GC || mxClient.IS_SF));\n\t\t\t\n\t\t\tif (valid && Math.abs(this.lastTouchX - me.getX()) < this.doubleTapTolerance &&\n\t\t\t\tMath.abs(this.lastTouchY - me.getY()) < this.doubleTapTolerance)\n\t\t\t{\n\t\t\t\tthis.dblClick(me.getEvent(), cell);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tmxEvent.consume(me.getEvent());\n\t\t\t}\n\t\t\t\n\t\t\treturn;\n\t\t}\n\t}\n\n\tif (!this.isEventIgnored(evtName, me, sender))\n\t{\n\t\t// Updates the event state via getEventState\n\t\tme.state = this.getEventState(me.getState());\n\t\tthis.fireEvent(new mxEventObject(mxEvent.FIRE_MOUSE_EVENT, 'eventName', evtName, 'event', me));\n\t\t\n\t\tif ((mxClient.IS_OP || mxClient.IS_SF || mxClient.IS_GC || mxClient.IS_IE11 ||\n\t\t\t(mxClient.IS_IE && mxClient.IS_SVG) || me.getEvent().target != this.container))\n\t\t{\n\t\t\tif (evtName == mxEvent.MOUSE_MOVE && this.isMouseDown && this.autoScroll && !mxEvent.isMultiTouchEvent(me.getEvent))\n\t\t\t{\n\t\t\t\tthis.scrollPointToVisible(me.getGraphX(), me.getGraphY(), this.autoExtend);\n\t\t\t}\n\t\t\telse if (evtName == mxEvent.MOUSE_UP && this.ignoreScrollbars && this.translateToScrollPosition &&\n\t\t\t\t\t(this.container.scrollLeft != 0 || this.container.scrollTop != 0))\n\t\t\t{\n\t\t\t\tvar s = this.view.scale;\n\t\t\t\tvar tr = this.view.translate;\n\t\t\t\tthis.view.setTranslate(tr.x - this.container.scrollLeft / s, tr.y - this.container.scrollTop / s);\n\t\t\t\tthis.container.scrollLeft = 0;\n\t\t\t\tthis.container.scrollTop = 0;\n\t\t\t}\n\t\t\t\n\t\t\tif (this.mouseListeners != null)\n\t\t\t{\n\t\t\t\tvar args = [sender, me];\n\t\n\t\t\t\t// Does not change returnValue in Opera\n\t\t\t\tif (!me.getEvent().preventDefault)\n\t\t\t\t{\n\t\t\t\t\tme.getEvent().returnValue = true;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tfor (var i = 0; i < this.mouseListeners.length; i++)\n\t\t\t\t{\n\t\t\t\t\tvar l = this.mouseListeners[i];\n\t\t\t\t\t\n\t\t\t\t\tif (evtName == mxEvent.MOUSE_DOWN)\n\t\t\t\t\t{\n\t\t\t\t\t\tl.mouseDown.apply(l, args);\n\t\t\t\t\t}\n\t\t\t\t\telse if (evtName == mxEvent.MOUSE_MOVE)\n\t\t\t\t\t{\n\t\t\t\t\t\tl.mouseMove.apply(l, args);\n\t\t\t\t\t}\n\t\t\t\t\telse if (evtName == mxEvent.MOUSE_UP)\n\t\t\t\t\t{\n\t\t\t\t\t\tl.mouseUp.apply(l, args);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// Invokes the click handler\n\t\t\tif (evtName == mxEvent.MOUSE_UP)\n\t\t\t{\n\t\t\t\tthis.click(me);\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Detects tapAndHold events using a timer\n\t\tif ((mxEvent.isTouchEvent(me.getEvent()) || mxEvent.isPenEvent(me.getEvent())) &&\n\t\t\tevtName == mxEvent.MOUSE_DOWN && this.tapAndHoldEnabled && !this.tapAndHoldInProgress)\n\t\t{\n\t\t\tthis.tapAndHoldInProgress = true;\n\t\t\tthis.initialTouchX = me.getGraphX();\n\t\t\tthis.initialTouchY = me.getGraphY();\n\t\t\t\n\t\t\tvar handler = function()\n\t\t\t{\n\t\t\t\tif (this.tapAndHoldValid)\n\t\t\t\t{\n\t\t\t\t\tthis.tapAndHold(me);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tthis.tapAndHoldInProgress = false;\n\t\t\t\tthis.tapAndHoldValid = false;\n\t\t\t};\n\t\t\t\n\t\t\tif (this.tapAndHoldThread)\n\t\t\t{\n\t\t\t\twindow.clearTimeout(this.tapAndHoldThread);\n\t\t\t}\n\t\n\t\t\tthis.tapAndHoldThread = window.setTimeout(mxUtils.bind(this, handler), this.tapAndHoldDelay);\n\t\t\tthis.tapAndHoldValid = true;\n\t\t}\n\t\telse if (evtName == mxEvent.MOUSE_UP)\n\t\t{\n\t\t\tthis.tapAndHoldInProgress = false;\n\t\t\tthis.tapAndHoldValid = false;\n\t\t}\n\t\telse if (this.tapAndHoldValid)\n\t\t{\n\t\t\tthis.tapAndHoldValid =\n\t\t\t\tMath.abs(this.initialTouchX - me.getGraphX()) < this.tolerance &&\n\t\t\t\tMath.abs(this.initialTouchY - me.getGraphY()) < this.tolerance;\n\t\t}\n\n\t\t// Stops editing for all events other than from cellEditor\n\t\tif (evtName == mxEvent.MOUSE_DOWN && this.isEditing() && !this.cellEditor.isEventSource(me.getEvent()))\n\t\t{\n\t\t\tthis.stopEditing(!this.isInvokesStopCellEditing());\n\t\t}\n\n\t\tthis.consumeMouseEvent(evtName, me, sender);\n\t}\n};\n\n/**\n * Function: consumeMouseEvent\n * \n * Consumes the given <mxMouseEvent> if it's a touchStart event.\n */\nmxGraph.prototype.consumeMouseEvent = function(evtName, me, sender)\n{\n\t// Workaround for duplicate click in Windows 8 with Chrome/FF/Opera with touch\n\tif (evtName == mxEvent.MOUSE_DOWN && mxEvent.isTouchEvent(me.getEvent()))\n\t{\n\t\tme.consume(false);\n\t}\n};\n\n/**\n * Function: fireGestureEvent\n * \n * Dispatches a <mxEvent.GESTURE> event. The following example will resize the\n * cell under the mouse based on the scale property of the native touch event.\n * \n * (code)\n * graph.addListener(mxEvent.GESTURE, function(sender, eo)\n * {\n *   var evt = eo.getProperty('event');\n *   var state = graph.view.getState(eo.getProperty('cell'));\n *   \n *   if (graph.isEnabled() && graph.isCellResizable(state.cell) && Math.abs(1 - evt.scale) > 0.2)\n *   {\n *     var scale = graph.view.scale;\n *     var tr = graph.view.translate;\n *     \n *     var w = state.width * evt.scale;\n *     var h = state.height * evt.scale;\n *     var x = state.x - (w - state.width) / 2;\n *     var y = state.y - (h - state.height) / 2;\n *     \n *     var bounds = new mxRectangle(graph.snap(x / scale) - tr.x,\n *     \t\tgraph.snap(y / scale) - tr.y, graph.snap(w / scale), graph.snap(h / scale));\n *     graph.resizeCell(state.cell, bounds);\n *     eo.consume();\n *   }\n * });\n * (end)\n * \n * Parameters:\n * \n * evt - Gestureend event that represents the gesture.\n * cell - Optional <mxCell> associated with the gesture.\n */\nmxGraph.prototype.fireGestureEvent = function(evt, cell)\n{\n\t// Resets double tap event handling when gestures take place\n\tthis.lastTouchTime = 0;\n\tthis.fireEvent(new mxEventObject(mxEvent.GESTURE, 'event', evt, 'cell', cell));\n};\n\n/**\n * Function: destroy\n * \n * Destroys the graph and all its resources.\n */\nmxGraph.prototype.destroy = function()\n{\n\tif (!this.destroyed)\n\t{\n\t\tthis.destroyed = true;\n\t\t\n\t\tif (this.tooltipHandler != null)\n\t\t{\n\t\t\tthis.tooltipHandler.destroy();\n\t\t}\n\t\t\n\t\tif (this.selectionCellsHandler != null)\n\t\t{\n\t\t\tthis.selectionCellsHandler.destroy();\n\t\t}\n\n\t\tif (this.panningHandler != null)\n\t\t{\n\t\t\tthis.panningHandler.destroy();\n\t\t}\n\n\t\tif (this.popupMenuHandler != null)\n\t\t{\n\t\t\tthis.popupMenuHandler.destroy();\n\t\t}\n\t\t\n\t\tif (this.connectionHandler != null)\n\t\t{\n\t\t\tthis.connectionHandler.destroy();\n\t\t}\n\t\t\n\t\tif (this.graphHandler != null)\n\t\t{\n\t\t\tthis.graphHandler.destroy();\n\t\t}\n\t\t\n\t\tif (this.cellEditor != null)\n\t\t{\n\t\t\tthis.cellEditor.destroy();\n\t\t}\n\t\t\n\t\tif (this.view != null)\n\t\t{\n\t\t\tthis.view.destroy();\n\t\t}\n\n\t\tif (this.model != null && this.graphModelChangeListener != null)\n\t\t{\n\t\t\tthis.model.removeListener(this.graphModelChangeListener);\n\t\t\tthis.graphModelChangeListener = null;\n\t\t}\n\n\t\tthis.container = null;\n\t}\n};\n"
  },
  {
    "path": "static/cherry/drawio_demo/src/js/view/mxGraphSelectionModel.js",
    "content": "/**\n * Copyright (c) 2006-2015, JGraph Ltd\n * Copyright (c) 2006-2015, Gaudenz Alder\n */\n/**\n * Class: mxGraphSelectionModel\n *\n * Implements the selection model for a graph. Here is a listener that handles\n * all removed selection cells.\n * \n * (code)\n * graph.getSelectionModel().addListener(mxEvent.CHANGE, function(sender, evt)\n * {\n *   var cells = evt.getProperty('added');\n *   \n *   for (var i = 0; i < cells.length; i++)\n *   {\n *     // Handle cells[i]...\n *   }\n * });\n * (end)\n * \n * Event: mxEvent.UNDO\n * \n * Fires after the selection was changed in <changeSelection>. The\n * <code>edit</code> property contains the <mxUndoableEdit> which contains the\n * <mxSelectionChange>.\n * \n * Event: mxEvent.CHANGE\n * \n * Fires after the selection changes by executing an <mxSelectionChange>. The\n * <code>added</code> and <code>removed</code> properties contain arrays of\n * cells that have been added to or removed from the selection, respectively.\n * The names are inverted due to historic reasons. This cannot be changed.\n * \n * Constructor: mxGraphSelectionModel\n *\n * Constructs a new graph selection model for the given <mxGraph>.\n * \n * Parameters:\n * \n * graph - Reference to the enclosing <mxGraph>.\n */\nfunction mxGraphSelectionModel(graph)\n{\n\tthis.graph = graph;\n\tthis.cells = [];\n};\n\n/**\n * Extends mxEventSource.\n */\nmxGraphSelectionModel.prototype = new mxEventSource();\nmxGraphSelectionModel.prototype.constructor = mxGraphSelectionModel;\n\n/**\n * Variable: doneResource\n * \n * Specifies the resource key for the status message after a long operation.\n * If the resource for this key does not exist then the value is used as\n * the status message. Default is 'done'.\n */\nmxGraphSelectionModel.prototype.doneResource = (mxClient.language != 'none') ? 'done' : '';\n\n/**\n * Variable: updatingSelectionResource\n *\n * Specifies the resource key for the status message while the selection is\n * being updated. If the resource for this key does not exist then the\n * value is used as the status message. Default is 'updatingSelection'.\n */\nmxGraphSelectionModel.prototype.updatingSelectionResource = (mxClient.language != 'none') ? 'updatingSelection' : '';\n\n/**\n * Variable: graph\n * \n * Reference to the enclosing <mxGraph>.\n */\nmxGraphSelectionModel.prototype.graph = null;\n\n/**\n * Variable: singleSelection\n *\n * Specifies if only one selected item at a time is allowed.\n * Default is false.\n */\nmxGraphSelectionModel.prototype.singleSelection = false;\n\n/**\n * Function: isSingleSelection\n *\n * Returns <singleSelection> as a boolean.\n */\nmxGraphSelectionModel.prototype.isSingleSelection = function()\n{\n\treturn this.singleSelection;\n};\n\n/**\n * Function: setSingleSelection\n *\n * Sets the <singleSelection> flag.\n * \n * Parameters:\n * \n * singleSelection - Boolean that specifies the new value for\n * <singleSelection>.\n */\nmxGraphSelectionModel.prototype.setSingleSelection = function(singleSelection)\n{\n\tthis.singleSelection = singleSelection;\n};\n\n/**\n * Function: isSelected\n *\n * Returns true if the given <mxCell> is selected.\n */\nmxGraphSelectionModel.prototype.isSelected = function(cell)\n{\n\tif (cell != null)\n\t{\n\t\treturn mxUtils.indexOf(this.cells, cell) >= 0;\n\t}\n\t\n\treturn false;\n};\n\n/**\n * Function: isEmpty\n *\n * Returns true if no cells are currently selected.\n */\nmxGraphSelectionModel.prototype.isEmpty = function()\n{\n\treturn this.cells.length == 0;\n};\n\n/**\n * Function: clear\n *\n * Clears the selection and fires a <change> event if the selection was not\n * empty.\n */\nmxGraphSelectionModel.prototype.clear = function()\n{\n\tthis.changeSelection(null, this.cells);\n};\n\n/**\n * Function: setCell\n *\n * Selects the specified <mxCell> using <setCells>.\n * \n * Parameters:\n * \n * cell - <mxCell> to be selected.\n */\nmxGraphSelectionModel.prototype.setCell = function(cell)\n{\n\tif (cell != null)\n\t{\n\t\tthis.setCells([cell]);\n\t}\n};\n\n/**\n * Function: setCells\n *\n * Selects the given array of <mxCells> and fires a <change> event.\n * \n * Parameters:\n * \n * cells - Array of <mxCells> to be selected.\n */\nmxGraphSelectionModel.prototype.setCells = function(cells)\n{\n\tif (cells != null)\n\t{\n\t\tif (this.singleSelection)\n\t\t{\n\t\t\tcells = [this.getFirstSelectableCell(cells)];\n\t\t}\n\t\n\t\tvar tmp = [];\n\t\t\n\t\tfor (var i = 0; i < cells.length; i++)\n\t\t{\n\t\t\tif (this.graph.isCellSelectable(cells[i]))\n\t\t\t{\n\t\t\t\ttmp.push(cells[i]);\n\t\t\t}\t\n\t\t}\n\n\t\tthis.changeSelection(tmp, this.cells);\n\t}\n};\n\n/**\n * Function: getFirstSelectableCell\n *\n * Returns the first selectable cell in the given array of cells.\n */\nmxGraphSelectionModel.prototype.getFirstSelectableCell = function(cells)\n{\n\tif (cells != null)\n\t{\n\t\tfor (var i = 0; i < cells.length; i++)\n\t\t{\n\t\t\tif (this.graph.isCellSelectable(cells[i]))\n\t\t\t{\n\t\t\t\treturn cells[i];\n\t\t\t}\n\t\t}\n\t}\n\t\n\treturn null;\n};\n\n/**\n * Function: addCell\n * \n * Adds the given <mxCell> to the selection and fires a <select> event.\n * \n * Parameters:\n * \n * cell - <mxCell> to add to the selection.\n */\nmxGraphSelectionModel.prototype.addCell = function(cell)\n{\n\tif (cell != null)\n\t{\n\t\tthis.addCells([cell]);\n\t}\n};\n\n/**\n * Function: addCells\n * \n * Adds the given array of <mxCells> to the selection and fires a <select>\n * event.\n * \n * Parameters:\n * \n * cells - Array of <mxCells> to add to the selection.\n */\nmxGraphSelectionModel.prototype.addCells = function(cells)\n{\n\tif (cells != null)\n\t{\n\t\tvar remove = null;\n\t\t\n\t\tif (this.singleSelection)\n\t\t{\n\t\t\tremove = this.cells;\n\t\t\tcells = [this.getFirstSelectableCell(cells)];\n\t\t}\n\n\t\tvar tmp = [];\n\t\t\n\t\tfor (var i = 0; i < cells.length; i++)\n\t\t{\n\t\t\tif (!this.isSelected(cells[i]) &&\n\t\t\t\tthis.graph.isCellSelectable(cells[i]))\n\t\t\t{\n\t\t\t\ttmp.push(cells[i]);\n\t\t\t}\t\n\t\t}\n\n\t\tthis.changeSelection(tmp, remove);\n\t}\n};\n\n/**\n * Function: removeCell\n *\n * Removes the specified <mxCell> from the selection and fires a <select>\n * event for the remaining cells.\n * \n * Parameters:\n * \n * cell - <mxCell> to remove from the selection.\n */\nmxGraphSelectionModel.prototype.removeCell = function(cell)\n{\n\tif (cell != null)\n\t{\n\t\tthis.removeCells([cell]);\n\t}\n};\n\n/**\n * Function: removeCells\n */\nmxGraphSelectionModel.prototype.removeCells = function(cells)\n{\n\tif (cells != null)\n\t{\n\t\tvar tmp = [];\n\t\t\n\t\tfor (var i = 0; i < cells.length; i++)\n\t\t{\n\t\t\tif (this.isSelected(cells[i]))\n\t\t\t{\n\t\t\t\ttmp.push(cells[i]);\n\t\t\t}\n\t\t}\n\t\t\n\t\tthis.changeSelection(null, tmp);\t\n\t}\n};\n\n/**\n * Function: changeSelection\n *\n * Inner callback to add the specified <mxCell> to the selection. No event\n * is fired in this implementation.\n * \n * Paramters:\n * \n * cell - <mxCell> to add to the selection.\n */\nmxGraphSelectionModel.prototype.changeSelection = function(added, removed)\n{\n\tif ((added != null &&\n\t\tadded.length > 0 &&\n\t\tadded[0] != null) ||\n\t\t(removed != null &&\n\t\tremoved.length > 0 &&\n\t\tremoved[0] != null))\n\t{\n\t\tvar change = new mxSelectionChange(this, added, removed);\n\t\tchange.execute();\n\t\tvar edit = new mxUndoableEdit(this, false);\n\t\tedit.add(change);\n\t\tthis.fireEvent(new mxEventObject(mxEvent.UNDO, 'edit', edit));\n\t}\n};\n\n/**\n * Function: cellAdded\n *\n * Inner callback to add the specified <mxCell> to the selection. No event\n * is fired in this implementation.\n * \n * Paramters:\n * \n * cell - <mxCell> to add to the selection.\n */\nmxGraphSelectionModel.prototype.cellAdded = function(cell)\n{\n\tif (cell != null &&\n\t\t!this.isSelected(cell))\n\t{\n\t\tthis.cells.push(cell);\n\t}\n};\n\n/**\n * Function: cellRemoved\n *\n * Inner callback to remove the specified <mxCell> from the selection. No\n * event is fired in this implementation.\n * \n * Parameters:\n * \n * cell - <mxCell> to remove from the selection.\n */\nmxGraphSelectionModel.prototype.cellRemoved = function(cell)\n{\n\tif (cell != null)\n\t{\n\t\tvar index = mxUtils.indexOf(this.cells, cell);\n\t\t\n\t\tif (index >= 0)\n\t\t{\n\t\t\tthis.cells.splice(index, 1);\n\t\t}\n\t}\n};\n\n/**\n * Class: mxSelectionChange\n *\n * Action to change the current root in a view.\n *\n * Constructor: mxCurrentRootChange\n *\n * Constructs a change of the current root in the given view.\n */\nfunction mxSelectionChange(selectionModel, added, removed)\n{\n\tthis.selectionModel = selectionModel;\n\tthis.added = (added != null) ? added.slice() : null;\n\tthis.removed = (removed != null) ? removed.slice() : null;\n};\n\n/**\n * Function: execute\n *\n * Changes the current root of the view.\n */\nmxSelectionChange.prototype.execute = function()\n{\n\tvar t0 = mxLog.enter('mxSelectionChange.execute');\n\twindow.status = mxResources.get(\n\t\tthis.selectionModel.updatingSelectionResource) ||\n\t\tthis.selectionModel.updatingSelectionResource;\n\n\tif (this.removed != null)\n\t{\n\t\tfor (var i = 0; i < this.removed.length; i++)\n\t\t{\n\t\t\tthis.selectionModel.cellRemoved(this.removed[i]);\n\t\t}\n\t}\n\n\tif (this.added != null)\n\t{\n\t\tfor (var i = 0; i < this.added.length; i++)\n\t\t{\n\t\t\tthis.selectionModel.cellAdded(this.added[i]);\n\t\t}\n\t}\n\t\n\tvar tmp = this.added;\n\tthis.added = this.removed;\n\tthis.removed = tmp;\n\n\twindow.status = mxResources.get(this.selectionModel.doneResource) ||\n\t\tthis.selectionModel.doneResource;\n\tmxLog.leave('mxSelectionChange.execute', t0);\n\t\n\tthis.selectionModel.fireEvent(new mxEventObject(mxEvent.CHANGE,\n\t\t\t'added', this.added, 'removed', this.removed));\n};\n"
  },
  {
    "path": "static/cherry/drawio_demo/src/js/view/mxGraphView.js",
    "content": "/**\n * Copyright (c) 2006-2015, JGraph Ltd\n * Copyright (c) 2006-2015, Gaudenz Alder\n */\n/**\n * Class: mxGraphView\n *\n * Extends <mxEventSource> to implement a view for a graph. This class is in\n * charge of computing the absolute coordinates for the relative child\n * geometries, the points for perimeters and edge styles and keeping them\n * cached in <mxCellStates> for faster retrieval. The states are updated\n * whenever the model or the view state (translate, scale) changes. The scale\n * and translate are honoured in the bounds.\n * \n * Event: mxEvent.UNDO\n * \n * Fires after the root was changed in <setCurrentRoot>. The <code>edit</code>\n * property contains the <mxUndoableEdit> which contains the\n * <mxCurrentRootChange>.\n * \n * Event: mxEvent.SCALE_AND_TRANSLATE\n * \n * Fires after the scale and translate have been changed in <scaleAndTranslate>.\n * The <code>scale</code>, <code>previousScale</code>, <code>translate</code>\n * and <code>previousTranslate</code> properties contain the new and previous\n * scale and translate, respectively.\n * \n * Event: mxEvent.SCALE\n * \n * Fires after the scale was changed in <setScale>. The <code>scale</code> and\n * <code>previousScale</code> properties contain the new and previous scale.\n * \n * Event: mxEvent.TRANSLATE\n * \n * Fires after the translate was changed in <setTranslate>. The\n * <code>translate</code> and <code>previousTranslate</code> properties contain\n * the new and previous value for translate.\n * \n * Event: mxEvent.DOWN and mxEvent.UP\n * \n * Fire if the current root is changed by executing an <mxCurrentRootChange>.\n * The event name depends on the location of the root in the cell hierarchy\n * with respect to the current root. The <code>root</code> and\n * <code>previous</code> properties contain the new and previous root,\n * respectively.\n * \n * Constructor: mxGraphView\n *\n * Constructs a new view for the given <mxGraph>.\n * \n * Parameters:\n * \n * graph - Reference to the enclosing <mxGraph>.\n */\nfunction mxGraphView(graph)\n{\n\tthis.graph = graph;\n\tthis.translate = new mxPoint();\n\tthis.graphBounds = new mxRectangle();\n\tthis.states = new mxDictionary();\n};\n\n/**\n * Extends mxEventSource.\n */\nmxGraphView.prototype = new mxEventSource();\nmxGraphView.prototype.constructor = mxGraphView;\n\n/**\n *\n */\nmxGraphView.prototype.EMPTY_POINT = new mxPoint();\n\n/**\n * Variable: doneResource\n * \n * Specifies the resource key for the status message after a long operation.\n * If the resource for this key does not exist then the value is used as\n * the status message. Default is 'done'.\n */\nmxGraphView.prototype.doneResource = (mxClient.language != 'none') ? 'done' : '';\n\n/**\n * Function: updatingDocumentResource\n *\n * Specifies the resource key for the status message while the document is\n * being updated. If the resource for this key does not exist then the\n * value is used as the status message. Default is 'updatingDocument'.\n */\nmxGraphView.prototype.updatingDocumentResource = (mxClient.language != 'none') ? 'updatingDocument' : '';\n\n/**\n * Variable: allowEval\n * \n * Specifies if string values in cell styles should be evaluated using\n * <mxUtils.eval>. This will only be used if the string values can't be mapped\n * to objects using <mxStyleRegistry>. Default is false. NOTE: Enabling this\n * switch carries a possible security risk.\n */\nmxGraphView.prototype.allowEval = false;\n\n/**\n * Variable: captureDocumentGesture\n * \n * Specifies if a gesture should be captured when it goes outside of the\n * graph container. Default is true.\n */\nmxGraphView.prototype.captureDocumentGesture = true;\n\n/**\n * Variable: optimizeVmlReflows\n * \n * Specifies if the <canvas> should be hidden while rendering in IE8 standards\n * mode and quirks mode. This will significantly improve rendering performance.\n * Default is true.\n */\nmxGraphView.prototype.optimizeVmlReflows = true;\n\n/**\n * Variable: rendering\n * \n * Specifies if shapes should be created, updated and destroyed using the\n * methods of <mxCellRenderer> in <graph>. Default is true.\n */\nmxGraphView.prototype.rendering = true;\n\n/**\n * Variable: graph\n *\n * Reference to the enclosing <mxGraph>.\n */\nmxGraphView.prototype.graph = null;\n\n/**\n * Variable: currentRoot\n *\n * <mxCell> that acts as the root of the displayed cell hierarchy.\n */\nmxGraphView.prototype.currentRoot = null;\n\n/**\n * Variable: graphBounds\n *\n * <mxRectangle> that caches the scales, translated bounds of the current view.\n */\nmxGraphView.prototype.graphBounds = null;\n\n/**\n * Variable: scale\n * \n * Specifies the scale. Default is 1 (100%).\n */\nmxGraphView.prototype.scale = 1;\n\t\n/**\n * Variable: translate\n *\n * <mxPoint> that specifies the current translation. Default is a new\n * empty <mxPoint>.\n */\nmxGraphView.prototype.translate = null;\n\n/**\n * Variable: states\n * \n * <mxDictionary> that maps from cell IDs to <mxCellStates>.\n */\nmxGraphView.prototype.states = null;\n\n/**\n * Variable: updateStyle\n * \n * Specifies if the style should be updated in each validation step. If this\n * is false then the style is only updated if the state is created or if the\n * style of the cell was changed. Default is false.\n */\nmxGraphView.prototype.updateStyle = false;\n\n/**\n * Variable: lastNode\n * \n * During validation, this contains the last DOM node that was processed.\n */\nmxGraphView.prototype.lastNode = null;\n\n/**\n * Variable: lastHtmlNode\n * \n * During validation, this contains the last HTML DOM node that was processed.\n */\nmxGraphView.prototype.lastHtmlNode = null;\n\n/**\n * Variable: lastForegroundNode\n * \n * During validation, this contains the last edge's DOM node that was processed.\n */\nmxGraphView.prototype.lastForegroundNode = null;\n\n/**\n * Variable: lastForegroundHtmlNode\n * \n * During validation, this contains the last edge HTML DOM node that was processed.\n */\nmxGraphView.prototype.lastForegroundHtmlNode = null;\n\n/**\n * Function: getGraphBounds\n *\n * Returns <graphBounds>.\n */\nmxGraphView.prototype.getGraphBounds = function()\n{\n\treturn this.graphBounds;\n};\n\n/**\n * Function: setGraphBounds\n *\n * Sets <graphBounds>.\n */\nmxGraphView.prototype.setGraphBounds = function(value)\n{\n\tthis.graphBounds = value;\n};\n\n/**\n * Function: getBounds\n * \n * Returns the union of all <mxCellStates> for the given array of <mxCells>.\n *\n * Parameters:\n *\n * cells - Array of <mxCells> whose bounds should be returned.\n */\nmxGraphView.prototype.getBounds = function(cells)\n{\n\tvar result = null;\n\t\n\tif (cells != null && cells.length > 0)\n\t{\n\t\tvar model = this.graph.getModel();\n\t\t\n\t\tfor (var i = 0; i < cells.length; i++)\n\t\t{\n\t\t\tif (model.isVertex(cells[i]) || model.isEdge(cells[i]))\n\t\t\t{\n\t\t\t\tvar state = this.getState(cells[i]);\n\t\t\t\n\t\t\t\tif (state != null)\n\t\t\t\t{\n\t\t\t\t\tif (result == null)\n\t\t\t\t\t{\n\t\t\t\t\t\tresult = mxRectangle.fromRectangle(state);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tresult.add(state);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t\n\treturn result;\n};\n\n/**\n * Function: setCurrentRoot\n *\n * Sets and returns the current root and fires an <undo> event before\n * calling <mxGraph.sizeDidChange>.\n *\n * Parameters:\n *\n * root - <mxCell> that specifies the root of the displayed cell hierarchy.\n */\nmxGraphView.prototype.setCurrentRoot = function(root)\n{\n\tif (this.currentRoot != root)\n\t{\n\t\tvar change = new mxCurrentRootChange(this, root);\n\t\tchange.execute();\n\t\tvar edit = new mxUndoableEdit(this, false);\n\t\tedit.add(change);\n\t\tthis.fireEvent(new mxEventObject(mxEvent.UNDO, 'edit', edit));\n\t\tthis.graph.sizeDidChange();\n\t}\n\t\n\treturn root;\n};\n\n/**\n * Function: scaleAndTranslate\n *\n * Sets the scale and translation and fires a <scale> and <translate> event\n * before calling <revalidate> followed by <mxGraph.sizeDidChange>.\n *\n * Parameters:\n *\n * scale - Decimal value that specifies the new scale (1 is 100%).\n * dx - X-coordinate of the translation.\n * dy - Y-coordinate of the translation.\n */\nmxGraphView.prototype.scaleAndTranslate = function(scale, dx, dy)\n{\n\tvar previousScale = this.scale;\n\tvar previousTranslate = new mxPoint(this.translate.x, this.translate.y);\n\t\n\tif (this.scale != scale || this.translate.x != dx || this.translate.y != dy)\n\t{\n\t\tthis.scale = scale;\n\t\t\n\t\tthis.translate.x = dx;\n\t\tthis.translate.y = dy;\n\n\t\tif (this.isEventsEnabled())\n\t\t{\n\t\t\tthis.viewStateChanged();\n\t\t}\n\t}\n\t\n\tthis.fireEvent(new mxEventObject(mxEvent.SCALE_AND_TRANSLATE,\n\t\t'scale', scale, 'previousScale', previousScale,\n\t\t'translate', this.translate, 'previousTranslate', previousTranslate));\n};\n\n/**\n * Function: getScale\n * \n * Returns the <scale>.\n */\nmxGraphView.prototype.getScale = function()\n{\n\treturn this.scale;\n};\n\n/**\n * Function: setScale\n *\n * Sets the scale and fires a <scale> event before calling <revalidate> followed\n * by <mxGraph.sizeDidChange>.\n *\n * Parameters:\n *\n * value - Decimal value that specifies the new scale (1 is 100%).\n */\nmxGraphView.prototype.setScale = function(value)\n{\n\tvar previousScale = this.scale;\n\t\n\tif (this.scale != value)\n\t{\n\t\tthis.scale = value;\n\n\t\tif (this.isEventsEnabled())\n\t\t{\n\t\t\tthis.viewStateChanged();\n\t\t}\n\t}\n\t\n\tthis.fireEvent(new mxEventObject(mxEvent.SCALE,\n\t\t'scale', value, 'previousScale', previousScale));\n};\n\n/**\n * Function: getTranslate\n * \n * Returns the <translate>.\n */\nmxGraphView.prototype.getTranslate = function()\n{\n\treturn this.translate;\n};\n\n/**\n * Function: setTranslate\n *\n * Sets the translation and fires a <translate> event before calling\n * <revalidate> followed by <mxGraph.sizeDidChange>. The translation is the\n * negative of the origin.\n *\n * Parameters:\n *\n * dx - X-coordinate of the translation.\n * dy - Y-coordinate of the translation.\n */\nmxGraphView.prototype.setTranslate = function(dx, dy)\n{\n\tvar previousTranslate = new mxPoint(this.translate.x, this.translate.y);\n\t\n\tif (this.translate.x != dx || this.translate.y != dy)\n\t{\n\t\tthis.translate.x = dx;\n\t\tthis.translate.y = dy;\n\n\t\tif (this.isEventsEnabled())\n\t\t{\n\t\t\tthis.viewStateChanged();\n\t\t}\n\t}\n\t\n\tthis.fireEvent(new mxEventObject(mxEvent.TRANSLATE,\n\t\t'translate', this.translate, 'previousTranslate', previousTranslate));\n};\n\n/**\n * Function: viewStateChanged\n * \n * Invoked after <scale> and/or <translate> has changed.\n */\nmxGraphView.prototype.viewStateChanged = function()\n{\n\tthis.revalidate();\n\tthis.graph.sizeDidChange();\n};\n\n/**\n * Function: refresh\n *\n * Clears the view if <currentRoot> is not null and revalidates.\n */\nmxGraphView.prototype.refresh = function()\n{\n\tif (this.currentRoot != null)\n\t{\n\t\tthis.clear();\n\t}\n\t\n\tthis.revalidate();\n};\n\n/**\n * Function: revalidate\n *\n * Revalidates the complete view with all cell states.\n */\nmxGraphView.prototype.revalidate = function()\n{\n\tthis.invalidate();\n\tthis.validate();\n};\n\n/**\n * Function: clear\n *\n * Removes the state of the given cell and all descendants if the given\n * cell is not the current root.\n * \n * Parameters:\n * \n * cell - Optional <mxCell> for which the state should be removed. Default\n * is the root of the model.\n * force - Boolean indicating if the current root should be ignored for\n * recursion.\n */\nmxGraphView.prototype.clear = function(cell, force, recurse)\n{\n\tvar model = this.graph.getModel();\n\tcell = cell || model.getRoot();\n\tforce = (force != null) ? force : false;\n\trecurse = (recurse != null) ? recurse : true;\n\t\n\tthis.removeState(cell);\n\t\n\tif (recurse && (force || cell != this.currentRoot))\n\t{\n\t\tvar childCount = model.getChildCount(cell);\n\t\t\n\t\tfor (var i = 0; i < childCount; i++)\n\t\t{\n\t\t\tthis.clear(model.getChildAt(cell, i), force);\n\t\t}\n\t}\n\telse\n\t{\n\t\tthis.invalidate(cell);\n\t}\n};\n\n/**\n * Function: invalidate\n * \n * Invalidates the state of the given cell, all its descendants and\n * connected edges.\n * \n * Parameters:\n * \n * cell - Optional <mxCell> to be invalidated. Default is the root of the\n * model.\n */\nmxGraphView.prototype.invalidate = function(cell, recurse, includeEdges)\n{\n\tvar model = this.graph.getModel();\n\tcell = cell || model.getRoot();\n\trecurse = (recurse != null) ? recurse : true;\n\tincludeEdges = (includeEdges != null) ? includeEdges : true;\n\t\n\tvar state = this.getState(cell);\n\t\n\tif (state != null)\n\t{\n\t\tstate.invalid = true;\n\t}\n\t\n\t// Avoids infinite loops for invalid graphs\n\tif (!cell.invalidating)\n\t{\n\t\tcell.invalidating = true;\n\t\t\n\t\t// Recursively invalidates all descendants\n\t\tif (recurse)\n\t\t{\n\t\t\tvar childCount = model.getChildCount(cell);\n\t\t\t\n\t\t\tfor (var i = 0; i < childCount; i++)\n\t\t\t{\n\t\t\t\tvar child = model.getChildAt(cell, i);\n\t\t\t\tthis.invalidate(child, recurse, includeEdges);\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Propagates invalidation to all connected edges\n\t\tif (includeEdges)\n\t\t{\n\t\t\tvar edgeCount = model.getEdgeCount(cell);\n\t\t\t\n\t\t\tfor (var i = 0; i < edgeCount; i++)\n\t\t\t{\n\t\t\t\tthis.invalidate(model.getEdgeAt(cell, i), recurse, includeEdges);\n\t\t\t}\n\t\t}\n\t\t\n\t\tdelete cell.invalidating;\n\t}\n};\n\n/**\n * Function: validate\n * \n * Calls <validateCell> and <validateCellState> and updates the <graphBounds>\n * using <getBoundingBox>. Finally the background is validated using\n * <validateBackground>.\n * \n * Parameters:\n * \n * cell - Optional <mxCell> to be used as the root of the validation.\n * Default is <currentRoot> or the root of the model.\n */\nmxGraphView.prototype.validate = function(cell)\n{\n\tvar t0 = mxLog.enter('mxGraphView.validate');\n\twindow.status = mxResources.get(this.updatingDocumentResource) ||\n\t\tthis.updatingDocumentResource;\n\t\n\tthis.resetValidationState();\n\t\n\t// Improves IE rendering speed by minimizing reflows\n\tvar prevDisplay = null;\n\t\n\tif (this.optimizeVmlReflows && this.canvas != null && this.textDiv == null &&\n\t\t((document.documentMode == 8 && !mxClient.IS_EM) || mxClient.IS_QUIRKS))\n\t{\n\t\t// Placeholder keeps scrollbar positions when canvas is hidden\n\t\tthis.placeholder = document.createElement('div');\n\t\tthis.placeholder.style.position = 'absolute';\n\t\tthis.placeholder.style.width = this.canvas.clientWidth + 'px';\n\t\tthis.placeholder.style.height = this.canvas.clientHeight + 'px';\n\t\tthis.canvas.parentNode.appendChild(this.placeholder);\n\n\t\tprevDisplay = this.drawPane.style.display;\n\t\tthis.canvas.style.display = 'none';\n\t\t\n\t\t// Creates temporary DIV used for text measuring in mxText.updateBoundingBox\n\t\tthis.textDiv = document.createElement('div');\n\t\tthis.textDiv.style.position = 'absolute';\n\t\tthis.textDiv.style.whiteSpace = 'nowrap';\n\t\tthis.textDiv.style.visibility = 'hidden';\n\t\tthis.textDiv.style.display = (mxClient.IS_QUIRKS) ? 'inline' : 'inline-block';\n\t\tthis.textDiv.style.zoom = '1';\n\t\t\n\t\tdocument.body.appendChild(this.textDiv);\n\t}\n\t\n\tvar graphBounds = this.getBoundingBox(this.validateCellState(\n\t\tthis.validateCell(cell || ((this.currentRoot != null) ?\n\t\t\tthis.currentRoot : this.graph.getModel().getRoot()))));\n\tthis.setGraphBounds((graphBounds != null) ? graphBounds : this.getEmptyBounds());\n\tthis.validateBackground();\n\t\n\tif (prevDisplay != null)\n\t{\n\t\tthis.canvas.style.display = prevDisplay;\n\t\tthis.textDiv.parentNode.removeChild(this.textDiv);\n\t\t\n\t\tif (this.placeholder != null)\n\t\t{\n\t\t\tthis.placeholder.parentNode.removeChild(this.placeholder);\n\t\t}\n\t\t\t\t\n\t\t// Textdiv cannot be reused\n\t\tthis.textDiv = null;\n\t}\n\t\n\tthis.resetValidationState();\n\t\n\twindow.status = mxResources.get(this.doneResource) ||\n\t\tthis.doneResource;\n\tmxLog.leave('mxGraphView.validate', t0);\n};\n\n/**\n * Function: getEmptyBounds\n * \n * Returns the bounds for an empty graph. This returns a rectangle at\n * <translate> with the size of 0 x 0.\n */\nmxGraphView.prototype.getEmptyBounds = function()\n{\n\treturn new mxRectangle(this.translate.x * this.scale, this.translate.y * this.scale);\n};\n\n/**\n * Function: getBoundingBox\n * \n * Returns the bounding box of the shape and the label for the given\n * <mxCellState> and its children if recurse is true.\n * \n * Parameters:\n * \n * state - <mxCellState> whose bounding box should be returned.\n * recurse - Optional boolean indicating if the children should be included.\n * Default is true.\n */\nmxGraphView.prototype.getBoundingBox = function(state, recurse)\n{\n\trecurse = (recurse != null) ? recurse : true;\n\tvar bbox = null;\n\t\n\tif (state != null)\n\t{\n\t\tif (state.shape != null && state.shape.boundingBox != null)\n\t\t{\n\t\t\tbbox = state.shape.boundingBox.clone();\n\t\t}\n\t\t\n\t\t// Adds label bounding box to graph bounds\n\t\tif (state.text != null && state.text.boundingBox != null)\n\t\t{\n\t\t\tif (bbox != null)\n\t\t\t{\n\t\t\t\tbbox.add(state.text.boundingBox);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tbbox = state.text.boundingBox.clone();\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (recurse)\n\t\t{\n\t\t\tvar model = this.graph.getModel();\n\t\t\tvar childCount = model.getChildCount(state.cell);\n\t\t\t\n\t\t\tfor (var i = 0; i < childCount; i++)\n\t\t\t{\n\t\t\t\tvar bounds = this.getBoundingBox(this.getState(model.getChildAt(state.cell, i)));\n\t\t\t\t\n\t\t\t\tif (bounds != null)\n\t\t\t\t{\n\t\t\t\t\tif (bbox == null)\n\t\t\t\t\t{\n\t\t\t\t\t\tbbox = bounds;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tbbox.add(bounds);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t\n\treturn bbox;\n};\n\n/**\n * Function: createBackgroundPageShape\n *\n * Creates and returns the shape used as the background page.\n * \n * Parameters:\n * \n * bounds - <mxRectangle> that represents the bounds of the shape.\n */\nmxGraphView.prototype.createBackgroundPageShape = function(bounds)\n{\n\treturn new mxRectangleShape(bounds, 'white', 'black');\n};\n\n/**\n * Function: validateBackground\n *\n * Calls <validateBackgroundImage> and <validateBackgroundPage>.\n */\nmxGraphView.prototype.validateBackground = function()\n{\n\tthis.validateBackgroundImage();\n\tthis.validateBackgroundPage();\n};\n\n/**\n * Function: validateBackgroundImage\n * \n * Validates the background image.\n */\nmxGraphView.prototype.validateBackgroundImage = function()\n{\n\tvar bg = this.graph.getBackgroundImage();\n\t\n\tif (bg != null)\n\t{\n\t\tif (this.backgroundImage == null || this.backgroundImage.image != bg.src)\n\t\t{\n\t\t\tif (this.backgroundImage != null)\n\t\t\t{\n\t\t\t\tthis.backgroundImage.destroy();\n\t\t\t}\n\t\t\t\n\t\t\tvar bounds = new mxRectangle(0, 0, 1, 1);\n\t\t\t\n\t\t\tthis.backgroundImage = new mxImageShape(bounds, bg.src);\n\t\t\tthis.backgroundImage.dialect = this.graph.dialect;\n\t\t\tthis.backgroundImage.init(this.backgroundPane);\n\t\t\tthis.backgroundImage.redraw();\n\n\t\t\t// Workaround for ignored event on background in IE8 standards mode\n\t\t\tif (document.documentMode == 8 && !mxClient.IS_EM)\n\t\t\t{\n\t\t\t\tmxEvent.addGestureListeners(this.backgroundImage.node,\n\t\t\t\t\tmxUtils.bind(this, function(evt)\n\t\t\t\t\t{\n\t\t\t\t\t\tthis.graph.fireMouseEvent(mxEvent.MOUSE_DOWN, new mxMouseEvent(evt));\n\t\t\t\t\t}),\n\t\t\t\t\tmxUtils.bind(this, function(evt)\n\t\t\t\t\t{\n\t\t\t\t\t\tthis.graph.fireMouseEvent(mxEvent.MOUSE_MOVE, new mxMouseEvent(evt));\n\t\t\t\t\t}),\n\t\t\t\t\tmxUtils.bind(this, function(evt)\n\t\t\t\t\t{\n\t\t\t\t\t\tthis.graph.fireMouseEvent(mxEvent.MOUSE_UP, new mxMouseEvent(evt));\n\t\t\t\t\t})\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t\t\n\t\tthis.redrawBackgroundImage(this.backgroundImage, bg);\n\t}\n\telse if (this.backgroundImage != null)\n\t{\n\t\tthis.backgroundImage.destroy();\n\t\tthis.backgroundImage = null;\n\t}\n};\n\n/**\n * Function: validateBackgroundPage\n * \n * Validates the background page.\n */\nmxGraphView.prototype.validateBackgroundPage = function()\n{\n\tif (this.graph.pageVisible)\n\t{\n\t\tvar bounds = this.getBackgroundPageBounds();\n\t\t\n\t\tif (this.backgroundPageShape == null)\n\t\t{\n\t\t\tthis.backgroundPageShape = this.createBackgroundPageShape(bounds);\n\t\t\tthis.backgroundPageShape.scale = this.scale;\n\t\t\tthis.backgroundPageShape.isShadow = true;\n\t\t\tthis.backgroundPageShape.dialect = this.graph.dialect;\n\t\t\tthis.backgroundPageShape.init(this.backgroundPane);\n\t\t\tthis.backgroundPageShape.redraw();\n\t\t\t\n\t\t\t// Adds listener for double click handling on background\n\t\t\tif (this.graph.nativeDblClickEnabled)\n\t\t\t{\n\t\t\t\tmxEvent.addListener(this.backgroundPageShape.node, 'dblclick', mxUtils.bind(this, function(evt)\n\t\t\t\t{\n\t\t\t\t\tthis.graph.dblClick(evt);\n\t\t\t\t}));\n\t\t\t}\n\n\t\t\t// Adds basic listeners for graph event dispatching outside of the\n\t\t\t// container and finishing the handling of a single gesture\n\t\t\tmxEvent.addGestureListeners(this.backgroundPageShape.node,\n\t\t\t\tmxUtils.bind(this, function(evt)\n\t\t\t\t{\n\t\t\t\t\tthis.graph.fireMouseEvent(mxEvent.MOUSE_DOWN, new mxMouseEvent(evt));\n\t\t\t\t}),\n\t\t\t\tmxUtils.bind(this, function(evt)\n\t\t\t\t{\n\t\t\t\t\t// Hides the tooltip if mouse is outside container\n\t\t\t\t\tif (this.graph.tooltipHandler != null && this.graph.tooltipHandler.isHideOnHover())\n\t\t\t\t\t{\n\t\t\t\t\t\tthis.graph.tooltipHandler.hide();\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif (this.graph.isMouseDown && !mxEvent.isConsumed(evt))\n\t\t\t\t\t{\n\t\t\t\t\t\tthis.graph.fireMouseEvent(mxEvent.MOUSE_MOVE, new mxMouseEvent(evt));\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\tmxUtils.bind(this, function(evt)\n\t\t\t\t{\n\t\t\t\t\tthis.graph.fireMouseEvent(mxEvent.MOUSE_UP, new mxMouseEvent(evt));\n\t\t\t\t})\n\t\t\t);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tthis.backgroundPageShape.scale = this.scale;\n\t\t\tthis.backgroundPageShape.bounds = bounds;\n\t\t\tthis.backgroundPageShape.redraw();\n\t\t}\n\t}\n\telse if (this.backgroundPageShape != null)\n\t{\n\t\tthis.backgroundPageShape.destroy();\n\t\tthis.backgroundPageShape = null;\n\t}\n};\n\n/**\n * Function: getBackgroundPageBounds\n * \n * Returns the bounds for the background page.\n */\nmxGraphView.prototype.getBackgroundPageBounds = function()\n{\n\tvar fmt = this.graph.pageFormat;\n\tvar ps = this.scale * this.graph.pageScale;\n\tvar bounds = new mxRectangle(this.scale * this.translate.x, this.scale * this.translate.y,\n\t\t\tfmt.width * ps, fmt.height * ps);\n\t\n\treturn bounds;\n};\n\n/**\n * Function: redrawBackgroundImage\n *\n * Updates the bounds and redraws the background image.\n * \n * Example:\n * \n * If the background image should not be scaled, this can be replaced with\n * the following.\n * \n * (code)\n * mxGraphView.prototype.redrawBackground = function(backgroundImage, bg)\n * {\n *   backgroundImage.bounds.x = this.translate.x;\n *   backgroundImage.bounds.y = this.translate.y;\n *   backgroundImage.bounds.width = bg.width;\n *   backgroundImage.bounds.height = bg.height;\n *\n *   backgroundImage.redraw();\n * };\n * (end)\n * \n * Parameters:\n * \n * backgroundImage - <mxImageShape> that represents the background image.\n * bg - <mxImage> that specifies the image and its dimensions.\n */\nmxGraphView.prototype.redrawBackgroundImage = function(backgroundImage, bg)\n{\n\tbackgroundImage.scale = this.scale;\n\tbackgroundImage.bounds.x = this.scale * this.translate.x;\n\tbackgroundImage.bounds.y = this.scale * this.translate.y;\n\tbackgroundImage.bounds.width = this.scale * bg.width;\n\tbackgroundImage.bounds.height = this.scale * bg.height;\n\n\tbackgroundImage.redraw();\n};\n\n/**\n * Function: validateCell\n * \n * Recursively creates the cell state for the given cell if visible is true and\n * the given cell is visible. If the cell is not visible but the state exists\n * then it is removed using <removeState>.\n * \n * Parameters:\n * \n * cell - <mxCell> whose <mxCellState> should be created.\n * visible - Optional boolean indicating if the cell should be visible. Default\n * is true.\n */\nmxGraphView.prototype.validateCell = function(cell, visible)\n{\n\tvisible = (visible != null) ? visible : true;\n\t\n\tif (cell != null)\n\t{\n\t\tvisible = visible && this.graph.isCellVisible(cell);\n\t\tvar state = this.getState(cell, visible);\n\t\t\n\t\tif (state != null && !visible)\n\t\t{\n\t\t\tthis.removeState(cell);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tvar model = this.graph.getModel();\n\t\t\tvar childCount = model.getChildCount(cell);\n\t\t\t\n\t\t\tfor (var i = 0; i < childCount; i++)\n\t\t\t{\n\t\t\t\tthis.validateCell(model.getChildAt(cell, i), visible &&\n\t\t\t\t\t(!this.isCellCollapsed(cell) || cell == this.currentRoot));\n\t\t\t}\n\t\t}\n\t}\n\t\n\treturn cell;\n};\n\n/**\n * Function: validateCellState\n * \n * Validates and repaints the <mxCellState> for the given <mxCell>.\n * \n * Parameters:\n * \n * cell - <mxCell> whose <mxCellState> should be validated.\n * recurse - Optional boolean indicating if the children of the cell should be\n * validated. Default is true.\n */\nmxGraphView.prototype.validateCellState = function(cell, recurse)\n{\n\trecurse = (recurse != null) ? recurse : true;\n\tvar state = null;\n\t\n\tif (cell != null)\n\t{\n\t\tstate = this.getState(cell);\n\t\t\n\t\tif (state != null)\n\t\t{\n\t\t\tvar model = this.graph.getModel();\n\t\t\t\n\t\t\tif (state.invalid)\n\t\t\t{\n\t\t\t\tstate.invalid = false;\n\t\t\t\t\n\t\t\t\tif (state.style == null)\n\t\t\t\t{\n\t\t\t\t\tstate.style = this.graph.getCellStyle(state.cell);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (cell != this.currentRoot)\n\t\t\t\t{\n\t\t\t\t\tthis.validateCellState(model.getParent(cell), false);\n\t\t\t\t}\n\n\t\t\t\tstate.setVisibleTerminalState(this.validateCellState(this.getVisibleTerminal(cell, true), false), true);\n\t\t\t\tstate.setVisibleTerminalState(this.validateCellState(this.getVisibleTerminal(cell, false), false), false);\n\t\t\t\t\n\t\t\t\tthis.updateCellState(state);\n\t\t\t\t\n\t\t\t\t// Repaint happens immediately after the cell is validated\n\t\t\t\tif (cell != this.currentRoot && !state.invalid)\n\t\t\t\t{\n\t\t\t\t\tthis.graph.cellRenderer.redraw(state, false, this.isRendering());\n\n\t\t\t\t\t// Handles changes to invertex paintbounds after update of rendering shape\n\t\t\t\t\tstate.updateCachedBounds();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (recurse && !state.invalid)\n\t\t\t{\n\t\t\t\t// Updates order in DOM if recursively traversing\n\t\t\t\tif (state.shape != null)\n\t\t\t\t{\n\t\t\t\t\tthis.stateValidated(state);\n\t\t\t\t}\n\t\t\t\n\t\t\t\tvar childCount = model.getChildCount(cell);\n\t\t\t\t\n\t\t\t\tfor (var i = 0; i < childCount; i++)\n\t\t\t\t{\n\t\t\t\t\tthis.validateCellState(model.getChildAt(cell, i));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t\n\treturn state;\n};\n\n/**\n * Function: updateCellState\n * \n * Updates the given <mxCellState>.\n * \n * Parameters:\n * \n * state - <mxCellState> to be updated.\n */\nmxGraphView.prototype.updateCellState = function(state)\n{\n\tstate.absoluteOffset.x = 0;\n\tstate.absoluteOffset.y = 0;\n\tstate.origin.x = 0;\n\tstate.origin.y = 0;\n\tstate.length = 0;\n\t\n\tif (state.cell != this.currentRoot)\n\t{\n\t\tvar model = this.graph.getModel();\n\t\tvar pState = this.getState(model.getParent(state.cell)); \n\t\t\n\t\tif (pState != null && pState.cell != this.currentRoot)\n\t\t{\n\t\t\tstate.origin.x += pState.origin.x;\n\t\t\tstate.origin.y += pState.origin.y;\n\t\t}\n\t\t\n\t\tvar offset = this.graph.getChildOffsetForCell(state.cell);\n\t\t\n\t\tif (offset != null)\n\t\t{\n\t\t\tstate.origin.x += offset.x;\n\t\t\tstate.origin.y += offset.y;\n\t\t}\n\t\t\n\t\tvar geo = this.graph.getCellGeometry(state.cell);\t\t\t\t\n\t\n\t\tif (geo != null)\n\t\t{\n\t\t\tif (!model.isEdge(state.cell))\n\t\t\t{\n\t\t\t\toffset = geo.offset || this.EMPTY_POINT;\n\t\n\t\t\t\tif (geo.relative && pState != null)\n\t\t\t\t{\n\t\t\t\t\tif (model.isEdge(pState.cell))\n\t\t\t\t\t{\n\t\t\t\t\t\tvar origin = this.getPoint(pState, geo);\n\n\t\t\t\t\t\tif (origin != null)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tstate.origin.x += (origin.x / this.scale) - pState.origin.x - this.translate.x;\n\t\t\t\t\t\t\tstate.origin.y += (origin.y / this.scale) - pState.origin.y - this.translate.y;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tstate.origin.x += geo.x * pState.width / this.scale + offset.x;\n\t\t\t\t\t\tstate.origin.y += geo.y * pState.height / this.scale + offset.y;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tstate.absoluteOffset.x = this.scale * offset.x;\n\t\t\t\t\tstate.absoluteOffset.y = this.scale * offset.y;\n\t\t\t\t\tstate.origin.x += geo.x;\n\t\t\t\t\tstate.origin.y += geo.y;\n\t\t\t\t}\n\t\t\t}\n\t\n\t\t\tstate.x = this.scale * (this.translate.x + state.origin.x);\n\t\t\tstate.y = this.scale * (this.translate.y + state.origin.y);\n\t\t\tstate.width = this.scale * geo.width;\n\t\t\tstate.unscaledWidth = geo.width;\n\t\t\tstate.height = this.scale * geo.height;\n\t\t\t\n\t\t\tif (model.isVertex(state.cell))\n\t\t\t{\n\t\t\t\tthis.updateVertexState(state, geo);\n\t\t\t}\n\t\t\t\n\t\t\tif (model.isEdge(state.cell))\n\t\t\t{\n\t\t\t\tthis.updateEdgeState(state, geo);\n\t\t\t}\n\t\t}\n\t}\n\n\tstate.updateCachedBounds();\n};\n\n/**\n * Function: isCellCollapsed\n * \n * Returns true if the children of the given cell should not be visible in the\n * view. This implementation uses <mxGraph.isCellVisible> but it can be\n * overidden to use a separate condition.\n */\nmxGraphView.prototype.isCellCollapsed = function(cell)\n{\n\treturn this.graph.isCellCollapsed(cell);\n};\n\n/**\n * Function: updateVertexState\n * \n * Validates the given cell state.\n */\nmxGraphView.prototype.updateVertexState = function(state, geo)\n{\n\tvar model = this.graph.getModel();\n\tvar pState = this.getState(model.getParent(state.cell));\n\t\n\tif (geo.relative && pState != null && !model.isEdge(pState.cell))\n\t{\n\t\tvar alpha = mxUtils.toRadians(pState.style[mxConstants.STYLE_ROTATION] || '0');\n\t\t\n\t\tif (alpha != 0)\n\t\t{\n\t\t\tvar cos = Math.cos(alpha);\n\t\t\tvar sin = Math.sin(alpha);\n\n\t\t\tvar ct = new mxPoint(state.getCenterX(), state.getCenterY());\n\t\t\tvar cx = new mxPoint(pState.getCenterX(), pState.getCenterY());\n\t\t\tvar pt = mxUtils.getRotatedPoint(ct, cos, sin, cx);\n\t\t\tstate.x = pt.x - state.width / 2;\n\t\t\tstate.y = pt.y - state.height / 2;\n\t\t}\n\t}\n\t\n\tthis.updateVertexLabelOffset(state);\n};\n\n/**\n * Function: updateEdgeState\n * \n * Validates the given cell state.\n */\nmxGraphView.prototype.updateEdgeState = function(state, geo)\n{\n\tvar source = state.getVisibleTerminalState(true);\n\tvar target = state.getVisibleTerminalState(false);\n\t\n\t// This will remove edges with no terminals and no terminal points\n\t// as such edges are invalid and produce NPEs in the edge styles.\n\t// Also removes connected edges that have no visible terminals.\n\tif ((this.graph.model.getTerminal(state.cell, true) != null && source == null) ||\n\t\t(source == null && geo.getTerminalPoint(true) == null) ||\n\t\t(this.graph.model.getTerminal(state.cell, false) != null && target == null) ||\n\t\t(target == null && geo.getTerminalPoint(false) == null))\n\t{\n\t\tthis.clear(state.cell, true);\n\t}\n\telse\n\t{\n\t\tthis.updateFixedTerminalPoints(state, source, target);\n\t\tthis.updatePoints(state, geo.points, source, target);\n\t\tthis.updateFloatingTerminalPoints(state, source, target);\n\t\t\n\t\tvar pts = state.absolutePoints;\n\t\t\n\t\tif (state.cell != this.currentRoot && (pts == null || pts.length < 2 ||\n\t\t\tpts[0] == null || pts[pts.length - 1] == null))\n\t\t{\n\t\t\t// This will remove edges with invalid points from the list of states in the view.\n\t\t\t// Happens if the one of the terminals and the corresponding terminal point is null.\n\t\t\tthis.clear(state.cell, true);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tthis.updateEdgeBounds(state);\n\t\t\tthis.updateEdgeLabelOffset(state);\n\t\t}\n\t}\n};\n\n/**\n * Function: updateVertexLabelOffset\n * \n * Updates the absoluteOffset of the given vertex cell state. This takes\n * into account the label position styles.\n * \n * Parameters:\n * \n * state - <mxCellState> whose absolute offset should be updated.\n */\nmxGraphView.prototype.updateVertexLabelOffset = function(state)\n{\n\tvar h = mxUtils.getValue(state.style, mxConstants.STYLE_LABEL_POSITION, mxConstants.ALIGN_CENTER);\n\n\tif (h == mxConstants.ALIGN_LEFT)\n\t{\n\t\tvar lw = mxUtils.getValue(state.style, mxConstants.STYLE_LABEL_WIDTH, null);\n\t\t\n\t\tif (lw != null)\n\t\t{\n\t\t\tlw *= this.scale;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tlw = state.width;\n\t\t}\n\t\t\n\t\tstate.absoluteOffset.x -= lw;\n\t}\n\telse if (h == mxConstants.ALIGN_RIGHT)\n\t{\n\t\tstate.absoluteOffset.x += state.width;\n\t}\n\telse if (h == mxConstants.ALIGN_CENTER)\n\t{\n\t\tvar lw = mxUtils.getValue(state.style, mxConstants.STYLE_LABEL_WIDTH, null);\n\t\t\n\t\tif (lw != null)\n\t\t{\n\t\t\t// Aligns text block with given width inside the vertex width\n\t\t\tvar align = mxUtils.getValue(state.style, mxConstants.STYLE_ALIGN, mxConstants.ALIGN_CENTER);\n\t\t\tvar dx = 0;\n\t\t\t\n\t\t\tif (align == mxConstants.ALIGN_CENTER)\n\t\t\t{\n\t\t\t\tdx = 0.5;\n\t\t\t}\n\t\t\telse if (align == mxConstants.ALIGN_RIGHT)\n\t\t\t{\n\t\t\t\tdx = 1;\n\t\t\t}\n\t\t\t\n\t\t\tif (dx != 0)\n\t\t\t{\n\t\t\t\tstate.absoluteOffset.x -= (lw * this.scale - state.width) * dx;\n\t\t\t}\n\t\t}\n\t}\n\t\n\tvar v = mxUtils.getValue(state.style, mxConstants.STYLE_VERTICAL_LABEL_POSITION, mxConstants.ALIGN_MIDDLE);\n\t\n\tif (v == mxConstants.ALIGN_TOP)\n\t{\n\t\tstate.absoluteOffset.y -= state.height;\n\t}\n\telse if (v == mxConstants.ALIGN_BOTTOM)\n\t{\n\t\tstate.absoluteOffset.y += state.height;\n\t}\n};\n\n/**\n * Function: resetValidationState\n *\n * Resets the current validation state.\n */\nmxGraphView.prototype.resetValidationState = function()\n{\n\tthis.lastNode = null;\n\tthis.lastHtmlNode = null;\n\tthis.lastForegroundNode = null;\n\tthis.lastForegroundHtmlNode = null;\n};\n\n/**\n * Function: stateValidated\n * \n * Invoked when a state has been processed in <validatePoints>. This is used\n * to update the order of the DOM nodes of the shape.\n * \n * Parameters:\n * \n * state - <mxCellState> that represents the cell state.\n */\nmxGraphView.prototype.stateValidated = function(state)\n{\n\tvar fg = (this.graph.getModel().isEdge(state.cell) && this.graph.keepEdgesInForeground) ||\n\t\t(this.graph.getModel().isVertex(state.cell) && this.graph.keepEdgesInBackground);\n\tvar htmlNode = (fg) ? this.lastForegroundHtmlNode || this.lastHtmlNode : this.lastHtmlNode;\n\tvar node = (fg) ? this.lastForegroundNode || this.lastNode : this.lastNode;\n\tvar result = this.graph.cellRenderer.insertStateAfter(state, node, htmlNode);\n\n\tif (fg)\n\t{\n\t\tthis.lastForegroundHtmlNode = result[1];\n\t\tthis.lastForegroundNode = result[0];\n\t}\n\telse\n\t{\n\t\tthis.lastHtmlNode = result[1];\n\t\tthis.lastNode = result[0];\n\t}\n};\n\n/**\n * Function: updateFixedTerminalPoints\n *\n * Sets the initial absolute terminal points in the given state before the edge\n * style is computed.\n * \n * Parameters:\n * \n * edge - <mxCellState> whose initial terminal points should be updated.\n * source - <mxCellState> which represents the source terminal.\n * target - <mxCellState> which represents the target terminal.\n */\nmxGraphView.prototype.updateFixedTerminalPoints = function(edge, source, target)\n{\n\tthis.updateFixedTerminalPoint(edge, source, true,\n\t\tthis.graph.getConnectionConstraint(edge, source, true));\n\tthis.updateFixedTerminalPoint(edge, target, false,\n\t\tthis.graph.getConnectionConstraint(edge, target, false));\n};\n\n/**\n * Function: updateFixedTerminalPoint\n *\n * Sets the fixed source or target terminal point on the given edge.\n * \n * Parameters:\n * \n * edge - <mxCellState> whose terminal point should be updated.\n * terminal - <mxCellState> which represents the actual terminal.\n * source - Boolean that specifies if the terminal is the source.\n * constraint - <mxConnectionConstraint> that specifies the connection.\n */\nmxGraphView.prototype.updateFixedTerminalPoint = function(edge, terminal, source, constraint)\n{\n\tedge.setAbsoluteTerminalPoint(this.getFixedTerminalPoint(edge, terminal, source, constraint), source);\n};\n\n/**\n * Function: getFixedTerminalPoint\n *\n * Returns the fixed source or target terminal point for the given edge.\n * \n * Parameters:\n * \n * edge - <mxCellState> whose terminal point should be returned.\n * terminal - <mxCellState> which represents the actual terminal.\n * source - Boolean that specifies if the terminal is the source.\n * constraint - <mxConnectionConstraint> that specifies the connection.\n */\nmxGraphView.prototype.getFixedTerminalPoint = function(edge, terminal, source, constraint)\n{\n\tvar pt = null;\n\t\n\tif (constraint != null)\n\t{\n\t\tpt = this.graph.getConnectionPoint(terminal, constraint);\n\t}\n\t\n\tif (pt == null && terminal == null)\n\t{\n\t\tvar s = this.scale;\n\t\tvar tr = this.translate;\n\t\tvar orig = edge.origin;\n\t\tvar geo = this.graph.getCellGeometry(edge.cell);\n\t\tpt = geo.getTerminalPoint(source);\n\t\t\n\t\tif (pt != null)\n\t\t{\n\t\t\tpt = new mxPoint(s * (tr.x + pt.x + orig.x),\n\t\t\t\t\t\t\t s * (tr.y + pt.y + orig.y));\n\t\t}\n\t}\n\t\n\treturn pt;\n};\n\n/**\n * Function: updateBoundsFromStencil\n * \n * Updates the bounds of the given cell state to reflect the bounds of the stencil\n * if it has a fixed aspect and returns the previous bounds as an <mxRectangle> if\n * the bounds have been modified or null otherwise.\n * \n * Parameters:\n * \n * edge - <mxCellState> whose bounds should be updated.\n */\nmxGraphView.prototype.updateBoundsFromStencil = function(state)\n{\n\tvar previous = null;\n\t\n\tif (state != null && state.shape != null && state.shape.stencil != null && state.shape.stencil.aspect == 'fixed')\n\t{\n\t\tprevious = mxRectangle.fromRectangle(state);\n\t\tvar asp = state.shape.stencil.computeAspect(state.style, state.x, state.y, state.width, state.height);\n\t\tstate.setRect(asp.x, asp.y, state.shape.stencil.w0 * asp.width, state.shape.stencil.h0 * asp.height);\n\t}\n\t\n\treturn previous;\n};\n\n/**\n * Function: updatePoints\n *\n * Updates the absolute points in the given state using the specified array\n * of <mxPoints> as the relative points.\n * \n * Parameters:\n * \n * edge - <mxCellState> whose absolute points should be updated.\n * points - Array of <mxPoints> that constitute the relative points.\n * source - <mxCellState> that represents the source terminal.\n * target - <mxCellState> that represents the target terminal.\n */\nmxGraphView.prototype.updatePoints = function(edge, points, source, target)\n{\n\tif (edge != null)\n\t{\n\t\tvar pts = [];\n\t\tpts.push(edge.absolutePoints[0]);\n\t\tvar edgeStyle = this.getEdgeStyle(edge, points, source, target);\n\t\t\n\t\tif (edgeStyle != null)\n\t\t{\n\t\t\tvar src = this.getTerminalPort(edge, source, true);\n\t\t\tvar trg = this.getTerminalPort(edge, target, false);\n\t\t\t\n\t\t\t// Uses the stencil bounds for routing and restores after routing\n\t\t\tvar srcBounds = this.updateBoundsFromStencil(src);\n\t\t\tvar trgBounds = this.updateBoundsFromStencil(trg);\n\n\t\t\tedgeStyle(edge, src, trg, points, pts);\n\t\t\t\n\t\t\t// Restores previous bounds\n\t\t\tif (srcBounds != null)\n\t\t\t{\n\t\t\t\tsrc.setRect(srcBounds.x, srcBounds.y, srcBounds.width, srcBounds.height);\n\t\t\t}\n\t\t\t\n\t\t\tif (trgBounds != null)\n\t\t\t{\n\t\t\t\ttrg.setRect(trgBounds.x, trgBounds.y, trgBounds.width, trgBounds.height);\n\t\t\t}\n\t\t}\n\t\telse if (points != null)\n\t\t{\n\t\t\tfor (var i = 0; i < points.length; i++)\n\t\t\t{\n\t\t\t\tif (points[i] != null)\n\t\t\t\t{\n\t\t\t\t\tvar pt = mxUtils.clone(points[i]);\n\t\t\t\t\tpts.push(this.transformControlPoint(edge, pt));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tvar tmp = edge.absolutePoints;\n\t\tpts.push(tmp[tmp.length-1]);\n\n\t\tedge.absolutePoints = pts;\n\t}\n};\n\n/**\n * Function: transformControlPoint\n *\n * Transforms the given control point to an absolute point.\n */\nmxGraphView.prototype.transformControlPoint = function(state, pt)\n{\n\tif (state != null && pt != null)\n\t{\n\t\tvar orig = state.origin;\n\t\t\n\t    return new mxPoint(this.scale * (pt.x + this.translate.x + orig.x),\n\t    \tthis.scale * (pt.y + this.translate.y + orig.y));\n\t}\n\t\n\treturn null;\n};\n\n/**\n * Function: isLoopStyleEnabled\n * \n * Returns true if the given edge should be routed with <mxGraph.defaultLoopStyle>\n * or the <mxConstants.STYLE_LOOP> defined for the given edge. This implementation\n * returns true if the given edge is a loop and does not \n */\nmxGraphView.prototype.isLoopStyleEnabled = function(edge, points, source, target)\n{\n\tvar sc = this.graph.getConnectionConstraint(edge, source, true);\n\tvar tc = this.graph.getConnectionConstraint(edge, target, false);\n\t\n\tif ((points == null || points.length < 2) &&\n\t\t(!mxUtils.getValue(edge.style, mxConstants.STYLE_ORTHOGONAL_LOOP, false) ||\n\t\t((sc == null || sc.point == null) && (tc == null || tc.point == null))))\n\t{\n\t\treturn source != null && source == target;\n\t}\n\t\n\treturn false;\n};\n\n/**\n * Function: getEdgeStyle\n * \n * Returns the edge style function to be used to render the given edge state.\n */\nmxGraphView.prototype.getEdgeStyle = function(edge, points, source, target)\n{\n\tvar edgeStyle = this.isLoopStyleEnabled(edge, points, source, target) ?\n\t\tmxUtils.getValue(edge.style, mxConstants.STYLE_LOOP, this.graph.defaultLoopStyle) :\n\t\t(!mxUtils.getValue(edge.style, mxConstants.STYLE_NOEDGESTYLE, false) ?\n\t\tedge.style[mxConstants.STYLE_EDGE] : null);\n\n\t// Converts string values to objects\n\tif (typeof(edgeStyle) == \"string\")\n\t{\n\t\tvar tmp = mxStyleRegistry.getValue(edgeStyle);\n\t\t\n\t\tif (tmp == null && this.isAllowEval())\n\t\t{\n \t\t\ttmp = mxUtils.eval(edgeStyle);\n\t\t}\n\t\t\n\t\tedgeStyle = tmp;\n\t}\n\t\n\tif (typeof(edgeStyle) == \"function\")\n\t{\n\t\treturn edgeStyle;\n\t}\n\t\n\treturn null;\n};\n\n/**\n * Function: updateFloatingTerminalPoints\n *\n * Updates the terminal points in the given state after the edge style was\n * computed for the edge.\n * \n * Parameters:\n * \n * state - <mxCellState> whose terminal points should be updated.\n * source - <mxCellState> that represents the source terminal.\n * target - <mxCellState> that represents the target terminal.\n */\nmxGraphView.prototype.updateFloatingTerminalPoints = function(state, source, target)\n{\n\tvar pts = state.absolutePoints;\n\tvar p0 = pts[0];\n\tvar pe = pts[pts.length - 1];\n\n\tif (pe == null && target != null)\n\t{\n\t\tthis.updateFloatingTerminalPoint(state, target, source, false);\n\t}\n\t\n\tif (p0 == null && source != null)\n\t{\n\t\tthis.updateFloatingTerminalPoint(state, source, target, true);\n\t}\n};\n\n/**\n * Function: updateFloatingTerminalPoint\n *\n * Updates the absolute terminal point in the given state for the given\n * start and end state, where start is the source if source is true.\n * \n * Parameters:\n * \n * edge - <mxCellState> whose terminal point should be updated.\n * start - <mxCellState> for the terminal on \"this\" side of the edge.\n * end - <mxCellState> for the terminal on the other side of the edge.\n * source - Boolean indicating if start is the source terminal state.\n */\nmxGraphView.prototype.updateFloatingTerminalPoint = function(edge, start, end, source)\n{\n\tedge.setAbsoluteTerminalPoint(this.getFloatingTerminalPoint(edge, start, end, source), source);\n};\n\n/**\n * Function: getFloatingTerminalPoint\n * \n * Returns the floating terminal point for the given edge, start and end\n * state, where start is the source if source is true.\n * \n * Parameters:\n * \n * edge - <mxCellState> whose terminal point should be returned.\n * start - <mxCellState> for the terminal on \"this\" side of the edge.\n * end - <mxCellState> for the terminal on the other side of the edge.\n * source - Boolean indicating if start is the source terminal state.\n */\nmxGraphView.prototype.getFloatingTerminalPoint = function(edge, start, end, source)\n{\n\tstart = this.getTerminalPort(edge, start, source);\n\tvar next = this.getNextPoint(edge, end, source);\n\t\n\tvar orth = this.graph.isOrthogonal(edge);\n\tvar alpha = mxUtils.toRadians(Number(start.style[mxConstants.STYLE_ROTATION] || '0'));\n\tvar center = new mxPoint(start.getCenterX(), start.getCenterY());\n\t\n\tif (alpha != 0)\n\t{\n\t\tvar cos = Math.cos(-alpha);\n\t\tvar sin = Math.sin(-alpha);\n\t\tnext = mxUtils.getRotatedPoint(next, cos, sin, center);\n\t}\n\t\n\tvar border = parseFloat(edge.style[mxConstants.STYLE_PERIMETER_SPACING] || 0);\n\tborder += parseFloat(edge.style[(source) ?\n\t\tmxConstants.STYLE_SOURCE_PERIMETER_SPACING :\n\t\tmxConstants.STYLE_TARGET_PERIMETER_SPACING] || 0);\n\tvar pt = this.getPerimeterPoint(start, next, alpha == 0 && orth, border);\n\n\tif (alpha != 0)\n\t{\n\t\tvar cos = Math.cos(alpha);\n\t\tvar sin = Math.sin(alpha);\n\t\tpt = mxUtils.getRotatedPoint(pt, cos, sin, center);\n\t}\n\t\n\treturn pt;\n};\n\n/**\n * Function: getTerminalPort\n * \n * Returns an <mxCellState> that represents the source or target terminal or\n * port for the given edge.\n * \n * Parameters:\n * \n * state - <mxCellState> that represents the state of the edge.\n * terminal - <mxCellState> that represents the terminal.\n * source - Boolean indicating if the given terminal is the source terminal.\n */\nmxGraphView.prototype.getTerminalPort = function(state, terminal, source)\n{\n\tvar key = (source) ? mxConstants.STYLE_SOURCE_PORT :\n\t\tmxConstants.STYLE_TARGET_PORT;\n\tvar id = mxUtils.getValue(state.style, key);\n\t\n\tif (id != null)\n\t{\n\t\tvar tmp = this.getState(this.graph.getModel().getCell(id));\n\t\t\n\t\t// Only uses ports where a cell state exists\n\t\tif (tmp != null)\n\t\t{\n\t\t\tterminal = tmp;\n\t\t}\n\t}\n\t\n\treturn terminal;\n};\n\n/**\n * Function: getPerimeterPoint\n *\n * Returns an <mxPoint> that defines the location of the intersection point between\n * the perimeter and the line between the center of the shape and the given point.\n * \n * Parameters:\n * \n * terminal - <mxCellState> for the source or target terminal.\n * next - <mxPoint> that lies outside of the given terminal.\n * orthogonal - Boolean that specifies if the orthogonal projection onto\n * the perimeter should be returned. If this is false then the intersection\n * of the perimeter and the line between the next and the center point is\n * returned.\n * border - Optional border between the perimeter and the shape.\n */\nmxGraphView.prototype.getPerimeterPoint = function(terminal, next, orthogonal, border)\n{\n\tvar point = null;\n\t\n\tif (terminal != null)\n\t{\n\t\tvar perimeter = this.getPerimeterFunction(terminal);\n\t\t\n\t\tif (perimeter != null && next != null)\n\t\t{\n\t\t\tvar bounds = this.getPerimeterBounds(terminal, border);\n\n\t\t\tif (bounds.width > 0 || bounds.height > 0)\n\t\t\t{\n\t\t\t\tpoint = new mxPoint(next.x, next.y);\n\t\t\t\tvar flipH = false;\n\t\t\t\tvar flipV = false;\t\n\t\t\t\t\n\t\t\t\tif (this.graph.model.isVertex(terminal.cell))\n\t\t\t\t{\n\t\t\t\t\tflipH = mxUtils.getValue(terminal.style, mxConstants.STYLE_FLIPH, 0) == 1;\n\t\t\t\t\tflipV = mxUtils.getValue(terminal.style, mxConstants.STYLE_FLIPV, 0) == 1;\t\n\t\n\t\t\t\t\t// Legacy support for stencilFlipH/V\n\t\t\t\t\tif (terminal.shape != null && terminal.shape.stencil != null)\n\t\t\t\t\t{\n\t\t\t\t\t\tflipH = (mxUtils.getValue(terminal.style, 'stencilFlipH', 0) == 1) || flipH;\n\t\t\t\t\t\tflipV = (mxUtils.getValue(terminal.style, 'stencilFlipV', 0) == 1) || flipV;\n\t\t\t\t\t}\n\t\n\t\t\t\t\tif (flipH)\n\t\t\t\t\t{\n\t\t\t\t\t\tpoint.x = 2 * bounds.getCenterX() - point.x;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif (flipV)\n\t\t\t\t\t{\n\t\t\t\t\t\tpoint.y = 2 * bounds.getCenterY() - point.y;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tpoint = perimeter(bounds, terminal, point, orthogonal);\n\n\t\t\t\tif (point != null)\n\t\t\t\t{\n\t\t\t\t\tif (flipH)\n\t\t\t\t\t{\n\t\t\t\t\t\tpoint.x = 2 * bounds.getCenterX() - point.x;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif (flipV)\n\t\t\t\t\t{\n\t\t\t\t\t\tpoint.y = 2 * bounds.getCenterY() - point.y;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (point == null)\n\t\t{\n\t\t\tpoint = this.getPoint(terminal);\n\t\t}\n\t}\n\t\n\treturn point;\n};\n\n/**\n * Function: getRoutingCenterX\n * \n * Returns the x-coordinate of the center point for automatic routing.\n */\nmxGraphView.prototype.getRoutingCenterX = function (state)\n{\n\tvar f = (state.style != null) ? parseFloat(state.style\n\t\t[mxConstants.STYLE_ROUTING_CENTER_X]) || 0 : 0;\n\n\treturn state.getCenterX() + f * state.width;\n};\n\n/**\n * Function: getRoutingCenterY\n * \n * Returns the y-coordinate of the center point for automatic routing.\n */\nmxGraphView.prototype.getRoutingCenterY = function (state)\n{\n\tvar f = (state.style != null) ? parseFloat(state.style\n\t\t[mxConstants.STYLE_ROUTING_CENTER_Y]) || 0 : 0;\n\n\treturn state.getCenterY() + f * state.height;\n};\n\n/**\n * Function: getPerimeterBounds\n *\n * Returns the perimeter bounds for the given terminal, edge pair as an\n * <mxRectangle>.\n * \n * If you have a model where each terminal has a relative child that should\n * act as the graphical endpoint for a connection from/to the terminal, then\n * this method can be replaced as follows:\n * \n * (code)\n * var oldGetPerimeterBounds = mxGraphView.prototype.getPerimeterBounds;\n * mxGraphView.prototype.getPerimeterBounds = function(terminal, edge, isSource)\n * {\n *   var model = this.graph.getModel();\n *   var childCount = model.getChildCount(terminal.cell);\n * \n *   if (childCount > 0)\n *   {\n *     var child = model.getChildAt(terminal.cell, 0);\n *     var geo = model.getGeometry(child);\n *\n *     if (geo != null &&\n *         geo.relative)\n *     {\n *       var state = this.getState(child);\n *       \n *       if (state != null)\n *       {\n *         terminal = state;\n *       }\n *     }\n *   }\n *   \n *   return oldGetPerimeterBounds.apply(this, arguments);\n * };\n * (end)\n * \n * Parameters:\n * \n * terminal - <mxCellState> that represents the terminal.\n * border - Number that adds a border between the shape and the perimeter.\n */\nmxGraphView.prototype.getPerimeterBounds = function(terminal, border)\n{\n\tborder = (border != null) ? border : 0;\n\n\tif (terminal != null)\n\t{\n\t\tborder += parseFloat(terminal.style[mxConstants.STYLE_PERIMETER_SPACING] || 0);\n\t}\n\n\treturn terminal.getPerimeterBounds(border * this.scale);\n};\n\n/**\n * Function: getPerimeterFunction\n *\n * Returns the perimeter function for the given state.\n */\nmxGraphView.prototype.getPerimeterFunction = function(state)\n{\n\tvar perimeter = state.style[mxConstants.STYLE_PERIMETER];\n\n\t// Converts string values to objects\n\tif (typeof(perimeter) == \"string\")\n\t{\n\t\tvar tmp = mxStyleRegistry.getValue(perimeter);\n\t\t\n\t\tif (tmp == null && this.isAllowEval())\n\t\t{\n \t\t\ttmp = mxUtils.eval(perimeter);\n\t\t}\n\n\t\tperimeter = tmp;\n\t}\n\t\n\tif (typeof(perimeter) == \"function\")\n\t{\n\t\treturn perimeter;\n\t}\n\t\n\treturn null;\n};\n\n/**\n * Function: getNextPoint\n *\n * Returns the nearest point in the list of absolute points or the center\n * of the opposite terminal.\n * \n * Parameters:\n * \n * edge - <mxCellState> that represents the edge.\n * opposite - <mxCellState> that represents the opposite terminal.\n * source - Boolean indicating if the next point for the source or target\n * should be returned.\n */\nmxGraphView.prototype.getNextPoint = function(edge, opposite, source)\n{\n\tvar pts = edge.absolutePoints;\n\tvar point = null;\n\t\n\tif (pts != null && pts.length >= 2)\n\t{\n\t\tvar count = pts.length;\n\t\tpoint = pts[(source) ? Math.min(1, count - 1) : Math.max(0, count - 2)];\n\t}\n\t\n\tif (point == null && opposite != null)\n\t{\n\t\tpoint = new mxPoint(opposite.getCenterX(), opposite.getCenterY());\n\t}\n\t\n\treturn point;\n};\n\n/**\n * Function: getVisibleTerminal\n *\n * Returns the nearest ancestor terminal that is visible. The edge appears\n * to be connected to this terminal on the display. The result of this method\n * is cached in <mxCellState.getVisibleTerminalState>.\n * \n * Parameters:\n * \n * edge - <mxCell> whose visible terminal should be returned.\n * source - Boolean that specifies if the source or target terminal\n * should be returned.\n */\nmxGraphView.prototype.getVisibleTerminal = function(edge, source)\n{\n\tvar model = this.graph.getModel();\n\tvar result = model.getTerminal(edge, source);\n\tvar best = result;\n\t\n\twhile (result != null && result != this.currentRoot)\n\t{\n\t\tif (!this.graph.isCellVisible(best) || this.isCellCollapsed(result))\n\t\t{\n\t\t\tbest = result;\n\t\t}\n\t\t\n\t\tresult = model.getParent(result);\n\t}\n\n\t// Checks if the result is not a layer\n\tif (model.getParent(best) == model.getRoot())\n\t{\n\t\tbest = null;\n\t}\n\t\n\treturn best;\n};\n\n/**\n * Function: updateEdgeBounds\n *\n * Updates the given state using the bounding box of t\n * he absolute points.\n * Also updates <mxCellState.terminalDistance>, <mxCellState.length> and\n * <mxCellState.segments>.\n * \n * Parameters:\n * \n * state - <mxCellState> whose bounds should be updated.\n */\nmxGraphView.prototype.updateEdgeBounds = function(state)\n{\n\tvar points = state.absolutePoints;\n\tvar p0 = points[0];\n\tvar pe = points[points.length - 1];\n\t\n\tif (p0.x != pe.x || p0.y != pe.y)\n\t{\n\t\tvar dx = pe.x - p0.x;\n\t\tvar dy = pe.y - p0.y;\n\t\tstate.terminalDistance = Math.sqrt(dx * dx + dy * dy);\n\t}\n\telse\n\t{\n\t\tstate.terminalDistance = 0;\n\t}\n\t\n\tvar length = 0;\n\tvar segments = [];\n\tvar pt = p0;\n\t\n\tif (pt != null)\n\t{\n\t\tvar minX = pt.x;\n\t\tvar minY = pt.y;\n\t\tvar maxX = minX;\n\t\tvar maxY = minY;\n\t\t\n\t\tfor (var i = 1; i < points.length; i++)\n\t\t{\n\t\t\tvar tmp = points[i];\n\t\t\t\n\t\t\tif (tmp != null)\n\t\t\t{\n\t\t\t\tvar dx = pt.x - tmp.x;\n\t\t\t\tvar dy = pt.y - tmp.y;\n\t\t\t\t\n\t\t\t\tvar segment = Math.sqrt(dx * dx + dy * dy);\n\t\t\t\tsegments.push(segment);\n\t\t\t\tlength += segment;\n\t\t\t\t\n\t\t\t\tpt = tmp;\n\t\t\t\t\n\t\t\t\tminX = Math.min(pt.x, minX);\n\t\t\t\tminY = Math.min(pt.y, minY);\n\t\t\t\tmaxX = Math.max(pt.x, maxX);\n\t\t\t\tmaxY = Math.max(pt.y, maxY);\n\t\t\t}\n\t\t}\n\t\t\n\t\tstate.length = length;\n\t\tstate.segments = segments;\n\t\t\n\t\tvar markerSize = 1; // TODO: include marker size\n\t\t\n\t\tstate.x = minX;\n\t\tstate.y = minY;\n\t\tstate.width = Math.max(markerSize, maxX - minX);\n\t\tstate.height = Math.max(markerSize, maxY - minY);\n\t}\n};\n\n/**\n * Function: getPoint\n *\n * Returns the absolute point on the edge for the given relative\n * <mxGeometry> as an <mxPoint>. The edge is represented by the given\n * <mxCellState>.\n * \n * Parameters:\n * \n * state - <mxCellState> that represents the state of the parent edge.\n * geometry - <mxGeometry> that represents the relative location.\n */\nmxGraphView.prototype.getPoint = function(state, geometry)\n{\n\tvar x = state.getCenterX();\n\tvar y = state.getCenterY();\n\t\n\tif (state.segments != null && (geometry == null || geometry.relative))\n\t{\n\t\tvar gx = (geometry != null) ? geometry.x / 2 : 0;\n\t\tvar pointCount = state.absolutePoints.length;\n\t\tvar dist = Math.round((gx + 0.5) * state.length);\n\t\tvar segment = state.segments[0];\n\t\tvar length = 0;\t\t\t\t\n\t\tvar index = 1;\n\n\t\twhile (dist >= Math.round(length + segment) && index < pointCount - 1)\n\t\t{\n\t\t\tlength += segment;\n\t\t\tsegment = state.segments[index++];\n\t\t}\n\n\t\tvar factor = (segment == 0) ? 0 : (dist - length) / segment;\n\t\tvar p0 = state.absolutePoints[index-1];\n\t\tvar pe = state.absolutePoints[index];\n\n\t\tif (p0 != null && pe != null)\n\t\t{\n\t\t\tvar gy = 0;\n\t\t\tvar offsetX = 0;\n\t\t\tvar offsetY = 0;\n\n\t\t\tif (geometry != null)\n\t\t\t{\n\t\t\t\tgy = geometry.y;\n\t\t\t\tvar offset = geometry.offset;\n\t\t\t\t\n\t\t\t\tif (offset != null)\n\t\t\t\t{\n\t\t\t\t\toffsetX = offset.x;\n\t\t\t\t\toffsetY = offset.y;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tvar dx = pe.x - p0.x;\n\t\t\tvar dy = pe.y - p0.y;\n\t\t\tvar nx = (segment == 0) ? 0 : dy / segment;\n\t\t\tvar ny = (segment == 0) ? 0 : dx / segment;\n\t\t\t\n\t\t\tx = p0.x + dx * factor + (nx * gy + offsetX) * this.scale;\n\t\t\ty = p0.y + dy * factor - (ny * gy - offsetY) * this.scale;\n\t\t}\n\t}\n\telse if (geometry != null)\n\t{\n\t\tvar offset = geometry.offset;\n\t\t\n\t\tif (offset != null)\n\t\t{\n\t\t\tx += offset.x;\n\t\t\ty += offset.y;\n\t\t}\n\t}\n\t\n\treturn new mxPoint(x, y);\t\t\n};\n\n/**\n * Function: getRelativePoint\n *\n * Gets the relative point that describes the given, absolute label\n * position for the given edge state.\n * \n * Parameters:\n * \n * state - <mxCellState> that represents the state of the parent edge.\n * x - Specifies the x-coordinate of the absolute label location.\n * y - Specifies the y-coordinate of the absolute label location.\n */\nmxGraphView.prototype.getRelativePoint = function(edgeState, x, y)\n{\n\tvar model = this.graph.getModel();\n\tvar geometry = model.getGeometry(edgeState.cell);\n\t\n\tif (geometry != null)\n\t{\n\t\tvar pointCount = edgeState.absolutePoints.length;\n\t\t\n\t\tif (geometry.relative && pointCount > 1)\n\t\t{\n\t\t\tvar totalLength = edgeState.length;\n\t\t\tvar segments = edgeState.segments;\n\n\t\t\t// Works which line segment the point of the label is closest to\n\t\t\tvar p0 = edgeState.absolutePoints[0];\n\t\t\tvar pe = edgeState.absolutePoints[1];\n\t\t\tvar minDist = mxUtils.ptSegDistSq(p0.x, p0.y, pe.x, pe.y, x, y);\n\n\t\t\tvar index = 0;\n\t\t\tvar tmp = 0;\n\t\t\tvar length = 0;\n\t\t\t\n\t\t\tfor (var i = 2; i < pointCount; i++)\n\t\t\t{\n\t\t\t\ttmp += segments[i - 2];\n\t\t\t\tpe = edgeState.absolutePoints[i];\n\t\t\t\tvar dist = mxUtils.ptSegDistSq(p0.x, p0.y, pe.x, pe.y, x, y);\n\n\t\t\t\tif (dist <= minDist)\n\t\t\t\t{\n\t\t\t\t\tminDist = dist;\n\t\t\t\t\tindex = i - 1;\n\t\t\t\t\tlength = tmp;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tp0 = pe;\n\t\t\t}\n\t\t\t\n\t\t\tvar seg = segments[index];\n\t\t\tp0 = edgeState.absolutePoints[index];\n\t\t\tpe = edgeState.absolutePoints[index + 1];\n\t\t\t\n\t\t\tvar x2 = p0.x;\n\t\t\tvar y2 = p0.y;\n\t\t\t\n\t\t\tvar x1 = pe.x;\n\t\t\tvar y1 = pe.y;\n\t\t\t\n\t\t\tvar px = x;\n\t\t\tvar py = y;\n\t\t\t\n\t\t\tvar xSegment = x2 - x1;\n\t\t\tvar ySegment = y2 - y1;\n\t\t\t\n\t\t\tpx -= x1;\n\t\t\tpy -= y1;\n\t\t\tvar projlenSq = 0;\n\t\t\t\n\t\t\tpx = xSegment - px;\n\t\t\tpy = ySegment - py;\n\t\t\tvar dotprod = px * xSegment + py * ySegment;\n\n\t\t\tif (dotprod <= 0.0)\n\t\t\t{\n\t\t\t\tprojlenSq = 0;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tprojlenSq = dotprod * dotprod\n\t\t\t\t\t\t/ (xSegment * xSegment + ySegment * ySegment);\n\t\t\t}\n\n\t\t\tvar projlen = Math.sqrt(projlenSq);\n\n\t\t\tif (projlen > seg)\n\t\t\t{\n\t\t\t\tprojlen = seg;\n\t\t\t}\n\n\t\t\tvar yDistance = Math.sqrt(mxUtils.ptSegDistSq(p0.x, p0.y, pe\n\t\t\t\t\t.x, pe.y, x, y));\n\t\t\tvar direction = mxUtils.relativeCcw(p0.x, p0.y, pe.x, pe.y, x, y);\n\n\t\t\tif (direction == -1)\n\t\t\t{\n\t\t\t\tyDistance = -yDistance;\n\t\t\t}\n\n\t\t\t// Constructs the relative point for the label\n\t\t\treturn new mxPoint(((totalLength / 2 - length - projlen) / totalLength) * -2,\n\t\t\t\t\t\tyDistance / this.scale);\n\t\t}\n\t}\n\t\n\treturn new mxPoint();\n};\n\n/**\n * Function: updateEdgeLabelOffset\n *\n * Updates <mxCellState.absoluteOffset> for the given state. The absolute\n * offset is normally used for the position of the edge label. Is is\n * calculated from the geometry as an absolute offset from the center\n * between the two endpoints if the geometry is absolute, or as the\n * relative distance between the center along the line and the absolute\n * orthogonal distance if the geometry is relative.\n * \n * Parameters:\n * \n * state - <mxCellState> whose absolute offset should be updated.\n */\nmxGraphView.prototype.updateEdgeLabelOffset = function(state)\n{\n\tvar points = state.absolutePoints;\n\t\n\tstate.absoluteOffset.x = state.getCenterX();\n\tstate.absoluteOffset.y = state.getCenterY();\n\n\tif (points != null && points.length > 0 && state.segments != null)\n\t{\n\t\tvar geometry = this.graph.getCellGeometry(state.cell);\n\t\t\n\t\tif (geometry.relative)\n\t\t{\n\t\t\tvar offset = this.getPoint(state, geometry);\n\t\t\t\n\t\t\tif (offset != null)\n\t\t\t{\n\t\t\t\tstate.absoluteOffset = offset;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tvar p0 = points[0];\n\t\t\tvar pe = points[points.length - 1];\n\t\t\t\n\t\t\tif (p0 != null && pe != null)\n\t\t\t{\n\t\t\t\tvar dx = pe.x - p0.x;\n\t\t\t\tvar dy = pe.y - p0.y;\n\t\t\t\tvar x0 = 0;\n\t\t\t\tvar y0 = 0;\n\n\t\t\t\tvar off = geometry.offset;\n\t\t\t\t\n\t\t\t\tif (off != null)\n\t\t\t\t{\n\t\t\t\t\tx0 = off.x;\n\t\t\t\t\ty0 = off.y;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tvar x = p0.x + dx / 2 + x0 * this.scale;\n\t\t\t\tvar y = p0.y + dy / 2 + y0 * this.scale;\n\t\t\t\t\n\t\t\t\tstate.absoluteOffset.x = x;\n\t\t\t\tstate.absoluteOffset.y = y;\n\t\t\t}\n\t\t}\n\t}\n};\n\n/**\n * Function: getState\n *\n * Returns the <mxCellState> for the given cell. If create is true, then\n * the state is created if it does not yet exist.\n * \n * Parameters:\n * \n * cell - <mxCell> for which the <mxCellState> should be returned.\n * create - Optional boolean indicating if a new state should be created\n * if it does not yet exist. Default is false.\n */\nmxGraphView.prototype.getState = function(cell, create)\n{\n\tcreate = create || false;\n\tvar state = null;\n\t\n\tif (cell != null)\n\t{\n\t\tstate = this.states.get(cell);\n\t\t\n\t\tif (create && (state == null || this.updateStyle) && this.graph.isCellVisible(cell))\n\t\t{\n\t\t\tif (state == null)\n\t\t\t{\n\t\t\t\tstate = this.createState(cell);\n\t\t\t\tthis.states.put(cell, state);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tstate.style = this.graph.getCellStyle(cell);\n\t\t\t}\n\t\t}\n\t}\n\n\treturn state;\n};\n\n/**\n * Function: isRendering\n *\n * Returns <rendering>.\n */\nmxGraphView.prototype.isRendering = function()\n{\n\treturn this.rendering;\n};\n\n/**\n * Function: setRendering\n *\n * Sets <rendering>.\n */\nmxGraphView.prototype.setRendering = function(value)\n{\n\tthis.rendering = value;\n};\n\n/**\n * Function: isAllowEval\n *\n * Returns <allowEval>.\n */\nmxGraphView.prototype.isAllowEval = function()\n{\n\treturn this.allowEval;\n};\n\n/**\n * Function: setAllowEval\n *\n * Sets <allowEval>.\n */\nmxGraphView.prototype.setAllowEval = function(value)\n{\n\tthis.allowEval = value;\n};\n\n/**\n * Function: getStates\n *\n * Returns <states>.\n */\nmxGraphView.prototype.getStates = function()\n{\n\treturn this.states;\n};\n\n/**\n * Function: setStates\n *\n * Sets <states>.\n */\nmxGraphView.prototype.setStates = function(value)\n{\n\tthis.states = value;\n};\n\n/**\n * Function: getCellStates\n *\n * Returns the <mxCellStates> for the given array of <mxCells>. The array\n * contains all states that are not null, that is, the returned array may\n * have less elements than the given array. If no argument is given, then\n * this returns <states>.\n */\nmxGraphView.prototype.getCellStates = function(cells)\n{\n\tif (cells == null)\n\t{\n\t\treturn this.states;\n\t}\n\telse\n\t{\n\t\tvar result = [];\n\t\t\n\t\tfor (var i = 0; i < cells.length; i++)\n\t\t{\n\t\t\tvar state = this.getState(cells[i]);\n\t\t\t\n\t\t\tif (state != null)\n\t\t\t{\n\t\t\t\tresult.push(state);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn result;\n\t}\n};\n\n/**\n * Function: removeState\n *\n * Removes and returns the <mxCellState> for the given cell.\n * \n * Parameters:\n * \n * cell - <mxCell> for which the <mxCellState> should be removed.\n */\nmxGraphView.prototype.removeState = function(cell)\n{\n\tvar state = null;\n\t\n\tif (cell != null)\n\t{\n\t\tstate = this.states.remove(cell);\n\t\t\n\t\tif (state != null)\n\t\t{\n\t\t\tthis.graph.cellRenderer.destroy(state);\n\t\t\tstate.invalid = true;\n\t\t\tstate.destroy();\n\t\t}\n\t}\n\t\n\treturn state;\n};\n\n/**\n * Function: createState\n *\n * Creates and returns an <mxCellState> for the given cell and initializes\n * it using <mxCellRenderer.initialize>.\n * \n * Parameters:\n * \n * cell - <mxCell> for which a new <mxCellState> should be created.\n */\nmxGraphView.prototype.createState = function(cell)\n{\n\treturn new mxCellState(this, cell, this.graph.getCellStyle(cell));\n};\n\n/**\n * Function: getCanvas\n *\n * Returns the DOM node that contains the background-, draw- and\n * overlay- and decoratorpanes.\n */\nmxGraphView.prototype.getCanvas = function()\n{\n\treturn this.canvas;\n};\n\n/**\n * Function: getBackgroundPane\n *\n * Returns the DOM node that represents the background layer.\n */\nmxGraphView.prototype.getBackgroundPane = function()\n{\n\treturn this.backgroundPane;\n};\n\n/**\n * Function: getDrawPane\n *\n * Returns the DOM node that represents the main drawing layer.\n */\nmxGraphView.prototype.getDrawPane = function()\n{\n\treturn this.drawPane;\n};\n\n/**\n * Function: getOverlayPane\n *\n * Returns the DOM node that represents the layer above the drawing layer.\n */\nmxGraphView.prototype.getOverlayPane = function()\n{\n\treturn this.overlayPane;\n};\n\n/**\n * Function: getDecoratorPane\n *\n * Returns the DOM node that represents the topmost drawing layer.\n */\nmxGraphView.prototype.getDecoratorPane = function()\n{\n\treturn this.decoratorPane;\n};\n\n/**\n * Function: isContainerEvent\n * \n * Returns true if the event origin is one of the drawing panes or\n * containers of the view.\n */\nmxGraphView.prototype.isContainerEvent = function(evt)\n{\n\tvar source = mxEvent.getSource(evt);\n\n\treturn (source == this.graph.container ||\n\t\tsource.parentNode == this.backgroundPane ||\n\t\t(source.parentNode != null &&\n\t\tsource.parentNode.parentNode == this.backgroundPane) ||\n\t\tsource == this.canvas.parentNode ||\n\t\tsource == this.canvas ||\n\t\tsource == this.backgroundPane ||\n\t\tsource == this.drawPane ||\n\t\tsource == this.overlayPane ||\n\t\tsource == this.decoratorPane);\n};\n\n/**\n * Function: isScrollEvent\n * \n * Returns true if the event origin is one of the scrollbars of the\n * container in IE. Such events are ignored.\n */\n mxGraphView.prototype.isScrollEvent = function(evt)\n{\n\tvar offset = mxUtils.getOffset(this.graph.container);\n\tvar pt = new mxPoint(evt.clientX - offset.x, evt.clientY - offset.y);\n\n\tvar outWidth = this.graph.container.offsetWidth;\n\tvar inWidth = this.graph.container.clientWidth;\n\n\tif (outWidth > inWidth && pt.x > inWidth + 2 && pt.x <= outWidth)\n\t{\n\t\treturn true;\n\t}\n\n\tvar outHeight = this.graph.container.offsetHeight;\n\tvar inHeight = this.graph.container.clientHeight;\n\t\n\tif (outHeight > inHeight && pt.y > inHeight + 2 && pt.y <= outHeight)\n\t{\n\t\treturn true;\n\t}\n\t\n\treturn false;\n};\n\n/**\n * Function: init\n *\n * Initializes the graph event dispatch loop for the specified container\n * and invokes <create> to create the required DOM nodes for the display.\n */\nmxGraphView.prototype.init = function()\n{\n\tthis.installListeners();\n\t\n\t// Creates the DOM nodes for the respective display dialect\n\tvar graph = this.graph;\n\t\n\tif (graph.dialect == mxConstants.DIALECT_SVG)\n\t{\n\t\tthis.createSvg();\n\t}\n\telse if (graph.dialect == mxConstants.DIALECT_VML)\n\t{\n\t\tthis.createVml();\n\t}\n\telse\n\t{\n\t\tthis.createHtml();\n\t}\n};\n\n/**\n * Function: installListeners\n *\n * Installs the required listeners in the container.\n */\nmxGraphView.prototype.installListeners = function()\n{\n\tvar graph = this.graph;\n\tvar container = graph.container;\n\t\n\tif (container != null)\n\t{\n\t\t// Support for touch device gestures (eg. pinch to zoom)\n\t\t// Double-tap handling is implemented in mxGraph.fireMouseEvent\n\t\tif (mxClient.IS_TOUCH)\n\t\t{\n\t\t\tmxEvent.addListener(container, 'gesturestart', mxUtils.bind(this, function(evt)\n\t\t\t{\n\t\t\t\tgraph.fireGestureEvent(evt);\n\t\t\t\tmxEvent.consume(evt);\n\t\t\t}));\n\t\t\t\n\t\t\tmxEvent.addListener(container, 'gesturechange', mxUtils.bind(this, function(evt)\n\t\t\t{\n\t\t\t\tgraph.fireGestureEvent(evt);\n\t\t\t\tmxEvent.consume(evt);\n\t\t\t}));\n\n\t\t\tmxEvent.addListener(container, 'gestureend', mxUtils.bind(this, function(evt)\n\t\t\t{\n\t\t\t\tgraph.fireGestureEvent(evt);\n\t\t\t\tmxEvent.consume(evt);\n\t\t\t}));\n\t\t}\n\t\t\n\t\t// Adds basic listeners for graph event dispatching\n\t\tmxEvent.addGestureListeners(container, mxUtils.bind(this, function(evt)\n\t\t{\n\t\t\t// Condition to avoid scrollbar events starting a rubberband selection\n\t\t\tif (this.isContainerEvent(evt) && ((!mxClient.IS_IE && !mxClient.IS_IE11 && !mxClient.IS_GC &&\n\t\t\t\t!mxClient.IS_OP && !mxClient.IS_SF) || !this.isScrollEvent(evt)))\n\t\t\t{\n\t\t\t\tgraph.fireMouseEvent(mxEvent.MOUSE_DOWN, new mxMouseEvent(evt));\n\t\t\t}\n\t\t}),\n\t\tmxUtils.bind(this, function(evt)\n\t\t{\n\t\t\tif (this.isContainerEvent(evt))\n\t\t\t{\n\t\t\t\tgraph.fireMouseEvent(mxEvent.MOUSE_MOVE, new mxMouseEvent(evt));\n\t\t\t}\n\t\t}),\n\t\tmxUtils.bind(this, function(evt)\n\t\t{\n\t\t\tif (this.isContainerEvent(evt))\n\t\t\t{\n\t\t\t\tgraph.fireMouseEvent(mxEvent.MOUSE_UP, new mxMouseEvent(evt));\n\t\t\t}\n\t\t}));\n\t\t\n\t\t// Adds listener for double click handling on background, this does always\n\t\t// use native event handler, we assume that the DOM of the background\n\t\t// does not change during the double click\n\t\tmxEvent.addListener(container, 'dblclick', mxUtils.bind(this, function(evt)\n\t\t{\n\t\t\tif (this.isContainerEvent(evt))\n\t\t\t{\n\t\t\t\tgraph.dblClick(evt);\n\t\t\t}\n\t\t}));\n\n\t\t// Workaround for touch events which started on some DOM node\n\t\t// on top of the container, in which case the cells under the\n\t\t// mouse for the move and up events are not detected.\n\t\tvar getState = function(evt)\n\t\t{\n\t\t\tvar state = null;\n\t\t\t\n\t\t\t// Workaround for touch events which started on some DOM node\n\t\t\t// on top of the container, in which case the cells under the\n\t\t\t// mouse for the move and up events are not detected.\n\t\t\tif (mxClient.IS_TOUCH)\n\t\t\t{\n\t\t\t\tvar x = mxEvent.getClientX(evt);\n\t\t\t\tvar y = mxEvent.getClientY(evt);\n\t\t\t\t\n\t\t\t\t// Dispatches the drop event to the graph which\n\t\t\t\t// consumes and executes the source function\n\t\t\t\tvar pt = mxUtils.convertPoint(container, x, y);\n\t\t\t\tstate = graph.view.getState(graph.getCellAt(pt.x, pt.y));\n\t\t\t}\n\t\t\t\n\t\t\treturn state;\n\t\t};\n\t\t\n\t\t// Adds basic listeners for graph event dispatching outside of the\n\t\t// container and finishing the handling of a single gesture\n\t\t// Implemented via graph event dispatch loop to avoid duplicate events\n\t\t// in Firefox and Chrome\n\t\tgraph.addMouseListener(\n\t\t{\n\t\t\tmouseDown: function(sender, me)\n\t\t\t{\n\t\t\t\tgraph.popupMenuHandler.hideMenu();\n\t\t\t},\n\t\t\tmouseMove: function() { },\n\t\t\tmouseUp: function() { }\n\t\t});\n\t\t\n\t\tthis.moveHandler = mxUtils.bind(this, function(evt)\n\t\t{\n\t\t\t// Hides the tooltip if mouse is outside container\n\t\t\tif (graph.tooltipHandler != null && graph.tooltipHandler.isHideOnHover())\n\t\t\t{\n\t\t\t\tgraph.tooltipHandler.hide();\n\t\t\t}\n\n\t\t\tif (this.captureDocumentGesture && graph.isMouseDown && graph.container != null &&\n\t\t\t\t!this.isContainerEvent(evt) && graph.container.style.display != 'none' &&\n\t\t\t\tgraph.container.style.visibility != 'hidden' && !mxEvent.isConsumed(evt))\n\t\t\t{\n\t\t\t\tgraph.fireMouseEvent(mxEvent.MOUSE_MOVE, new mxMouseEvent(evt, getState(evt)));\n\t\t\t}\n\t\t});\n\t\t\n\t\tthis.endHandler = mxUtils.bind(this, function(evt)\n\t\t{\n\t\t\tif (this.captureDocumentGesture && graph.isMouseDown && graph.container != null &&\n\t\t\t\t!this.isContainerEvent(evt) && graph.container.style.display != 'none' &&\n\t\t\t\tgraph.container.style.visibility != 'hidden')\n\t\t\t{\n\t\t\t\tgraph.fireMouseEvent(mxEvent.MOUSE_UP, new mxMouseEvent(evt));\n\t\t\t}\n\t\t});\n\t\t\n\t\tmxEvent.addGestureListeners(document, null, this.moveHandler, this.endHandler);\n\t}\n};\n\n/**\n * Function: create\n *\n * Creates the DOM nodes for the HTML display.\n */\nmxGraphView.prototype.createHtml = function()\n{\n\tvar container = this.graph.container;\n\t\n\tif (container != null)\n\t{\n\t\tthis.canvas = this.createHtmlPane('100%', '100%');\n\t\tthis.canvas.style.overflow = 'hidden';\n\t\n\t\t// Uses minimal size for inner DIVs on Canvas. This is required\n\t\t// for correct event processing in IE. If we have an overlapping\n\t\t// DIV then the events on the cells are only fired for labels.\n\t\tthis.backgroundPane = this.createHtmlPane('1px', '1px');\n\t\tthis.drawPane = this.createHtmlPane('1px', '1px');\n\t\tthis.overlayPane = this.createHtmlPane('1px', '1px');\n\t\tthis.decoratorPane = this.createHtmlPane('1px', '1px');\n\t\t\n\t\tthis.canvas.appendChild(this.backgroundPane);\n\t\tthis.canvas.appendChild(this.drawPane);\n\t\tthis.canvas.appendChild(this.overlayPane);\n\t\tthis.canvas.appendChild(this.decoratorPane);\n\n\t\tcontainer.appendChild(this.canvas);\n\t\tthis.updateContainerStyle(container);\n\t\t\n\t\t// Implements minWidth/minHeight in quirks mode\n\t\tif (mxClient.IS_QUIRKS)\n\t\t{\n\t\t\tvar onResize = mxUtils.bind(this, function(evt)\n\t\t\t{\n\t\t\t\tvar bounds = this.getGraphBounds();\n\t\t\t\tvar width = bounds.x + bounds.width + this.graph.border;\n\t\t\t\tvar height = bounds.y + bounds.height + this.graph.border;\n\t\t\t\t\n\t\t\t\tthis.updateHtmlCanvasSize(width, height);\n\t\t\t});\n\t\t\t\n\t\t\tmxEvent.addListener(window, 'resize', onResize);\n\t\t}\n\t}\n};\n\n/**\n * Function: updateHtmlCanvasSize\n * \n * Updates the size of the HTML canvas.\n */\nmxGraphView.prototype.updateHtmlCanvasSize = function(width, height)\n{\n\tif (this.graph.container != null)\n\t{\n\t\tvar ow = this.graph.container.offsetWidth;\n\t\tvar oh = this.graph.container.offsetHeight;\n\n\t\tif (ow < width)\n\t\t{\n\t\t\tthis.canvas.style.width = width + 'px';\n\t\t}\n\t\telse\n\t\t{\n\t\t\tthis.canvas.style.width = '100%';\n\t\t}\n\n\t\tif (oh < height)\n\t\t{\n\t\t\tthis.canvas.style.height = height + 'px';\n\t\t}\n\t\telse\n\t\t{\n\t\t\tthis.canvas.style.height = '100%';\n\t\t}\n\t}\n};\n\n/**\n * Function: createHtmlPane\n * \n * Creates and returns a drawing pane in HTML (DIV).\n */\nmxGraphView.prototype.createHtmlPane = function(width, height)\n{\n\tvar pane = document.createElement('DIV');\n\t\n\tif (width != null && height != null)\n\t{\n\t\tpane.style.position = 'absolute';\n\t\tpane.style.left = '0px';\n\t\tpane.style.top = '0px';\n\n\t\tpane.style.width = width;\n\t\tpane.style.height = height;\n\t}\n\telse\n\t{\n\t\tpane.style.position = 'relative';\n\t}\n\t\n\treturn pane;\n};\n\n/**\n * Function: create\n *\n * Creates the DOM nodes for the VML display.\n */\nmxGraphView.prototype.createVml = function()\n{\n\tvar container = this.graph.container;\n\n\tif (container != null)\n\t{\n\t\tvar width = container.offsetWidth;\n\t\tvar height = container.offsetHeight;\n\t\tthis.canvas = this.createVmlPane(width, height);\n\t\tthis.canvas.style.overflow = 'hidden';\n\t\t\n\t\tthis.backgroundPane = this.createVmlPane(width, height);\n\t\tthis.drawPane = this.createVmlPane(width, height);\n\t\tthis.overlayPane = this.createVmlPane(width, height);\n\t\tthis.decoratorPane = this.createVmlPane(width, height);\n\t\t\n\t\tthis.canvas.appendChild(this.backgroundPane);\n\t\tthis.canvas.appendChild(this.drawPane);\n\t\tthis.canvas.appendChild(this.overlayPane);\n\t\tthis.canvas.appendChild(this.decoratorPane);\n\t\t\n\t\tcontainer.appendChild(this.canvas);\n\t}\n};\n\n/**\n * Function: createVmlPane\n * \n * Creates a drawing pane in VML (group).\n */\nmxGraphView.prototype.createVmlPane = function(width, height)\n{\n\tvar pane = document.createElement(mxClient.VML_PREFIX + ':group');\n\t\n\t// At this point the width and height are potentially\n\t// uninitialized. That's OK.\n\tpane.style.position = 'absolute';\n\tpane.style.left = '0px';\n\tpane.style.top = '0px';\n\n\tpane.style.width = width + 'px';\n\tpane.style.height = height + 'px';\n\n\tpane.setAttribute('coordsize', width + ',' + height);\n\tpane.setAttribute('coordorigin', '0,0');\n\t\n\treturn pane;\n};\n\n/**\n * Function: create\n *\n * Creates and returns the DOM nodes for the SVG display.\n */\nmxGraphView.prototype.createSvg = function()\n{\n\tvar container = this.graph.container;\n\tthis.canvas = document.createElementNS(mxConstants.NS_SVG, 'g');\n\t\n\t// For background image\n\tthis.backgroundPane = document.createElementNS(mxConstants.NS_SVG, 'g');\n\tthis.canvas.appendChild(this.backgroundPane);\n\n\t// Adds two layers (background is early feature)\n\tthis.drawPane = document.createElementNS(mxConstants.NS_SVG, 'g');\n\tthis.canvas.appendChild(this.drawPane);\n\n\tthis.overlayPane = document.createElementNS(mxConstants.NS_SVG, 'g');\n\tthis.canvas.appendChild(this.overlayPane);\n\t\n\tthis.decoratorPane = document.createElementNS(mxConstants.NS_SVG, 'g');\n\tthis.canvas.appendChild(this.decoratorPane);\n\t\n\tvar root = document.createElementNS(mxConstants.NS_SVG, 'svg');\n\troot.style.left = '0px';\n\troot.style.top = '0px';\n\troot.style.width = '100%';\n\troot.style.height = '100%';\n\t\n\t// NOTE: In standards mode, the SVG must have block layout\n\t// in order for the container DIV to not show scrollbars.\n\troot.style.display = 'block';\n\troot.appendChild(this.canvas);\n\t\n\t// Workaround for scrollbars in IE11 and below\n\tif (mxClient.IS_IE || mxClient.IS_IE11)\n\t{\n\t\troot.style.overflow = 'hidden';\n\t}\n\n\tif (container != null)\n\t{\n\t\tcontainer.appendChild(root);\n\t\tthis.updateContainerStyle(container);\n\t}\n};\n\n/**\n * Function: updateContainerStyle\n * \n * Updates the style of the container after installing the SVG DOM elements.\n */\nmxGraphView.prototype.updateContainerStyle = function(container)\n{\n\t// Workaround for offset of container\n\tvar style = mxUtils.getCurrentStyle(container);\n\t\n\tif (style != null && style.position == 'static')\n\t{\n\t\tcontainer.style.position = 'relative';\n\t}\n\t\n\t// Disables built-in pan and zoom in IE10 and later\n\tif (mxClient.IS_POINTER)\n\t{\n\t\tcontainer.style.touchAction = 'none';\n\t}\n};\n\n/**\n * Function: destroy\n * \n * Destroys the view and all its resources.\n */\nmxGraphView.prototype.destroy = function()\n{\n\tvar root = (this.canvas != null) ? this.canvas.ownerSVGElement : null;\n\t\n\tif (root == null)\n\t{\n\t\troot = this.canvas;\n\t}\n\t\n\tif (root != null && root.parentNode != null)\n\t{\n\t\tthis.clear(this.currentRoot, true);\n\t\tmxEvent.removeGestureListeners(document, null, this.moveHandler, this.endHandler);\n\t\tmxEvent.release(this.graph.container);\n\t\troot.parentNode.removeChild(root);\n\t\t\n\t\tthis.moveHandler = null;\n\t\tthis.endHandler = null;\n\t\tthis.canvas = null;\n\t\tthis.backgroundPane = null;\n\t\tthis.drawPane = null;\n\t\tthis.overlayPane = null;\n\t\tthis.decoratorPane = null;\n\t}\n};\n\n/**\n * Class: mxCurrentRootChange\n *\n * Action to change the current root in a view.\n *\n * Constructor: mxCurrentRootChange\n *\n * Constructs a change of the current root in the given view.\n */\nfunction mxCurrentRootChange(view, root)\n{\n\tthis.view = view;\n\tthis.root = root;\n\tthis.previous = root;\n\tthis.isUp = root == null;\n\t\n\tif (!this.isUp)\n\t{\n\t\tvar tmp = this.view.currentRoot;\n\t\tvar model = this.view.graph.getModel();\n\t\t\n\t\twhile (tmp != null)\n\t\t{\n\t\t\tif (tmp == root)\n\t\t\t{\n\t\t\t\tthis.isUp = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\ttmp = model.getParent(tmp);\n\t\t}\n\t}\n};\n\n/**\n * Function: execute\n *\n * Changes the current root of the view.\n */\nmxCurrentRootChange.prototype.execute = function()\n{\n\tvar tmp = this.view.currentRoot;\n\tthis.view.currentRoot = this.previous;\n\tthis.previous = tmp;\n\n\tvar translate = this.view.graph.getTranslateForRoot(this.view.currentRoot);\n\t\n\tif (translate != null)\n\t{\n\t\tthis.view.translate = new mxPoint(-translate.x, -translate.y);\n\t}\n\n\tif (this.isUp)\n\t{\n\t\tthis.view.clear(this.view.currentRoot, true);\n\t\tthis.view.validate();\n\t}\n\telse\n\t{\n\t\tthis.view.refresh();\n\t}\n\t\n\tvar name = (this.isUp) ? mxEvent.UP : mxEvent.DOWN;\n\tthis.view.fireEvent(new mxEventObject(name,\n\t\t'root', this.view.currentRoot, 'previous', this.previous));\n\tthis.isUp = !this.isUp;\n};\n"
  },
  {
    "path": "static/cherry/drawio_demo/src/js/view/mxLayoutManager.js",
    "content": "/**\n * Copyright (c) 2006-2015, JGraph Ltd\n * Copyright (c) 2006-2015, Gaudenz Alder\n */\n/**\n * Class: mxLayoutManager\n * \n * Implements a layout manager that runs a given layout after any changes to the graph:\n * \n * Example:\n * \n * (code)\n * var layoutMgr = new mxLayoutManager(graph);\n * layoutMgr.getLayout = function(cell)\n * {\n *   return layout;\n * };\n * (end)\n * \n * Event: mxEvent.LAYOUT_CELLS\n * \n * Fires between begin- and endUpdate after all cells have been layouted in\n * <layoutCells>. The <code>cells</code> property contains all cells that have\n * been passed to <layoutCells>.\n * \n * Constructor: mxLayoutManager\n *\n * Constructs a new automatic layout for the given graph.\n *\n * Arguments:\n * \n * graph - Reference to the enclosing graph. \n */\nfunction mxLayoutManager(graph)\n{\n\t// Executes the layout before the changes are dispatched\n\tthis.undoHandler = mxUtils.bind(this, function(sender, evt)\n\t{\n\t\tif (this.isEnabled())\n\t\t{\n\t\t\tthis.beforeUndo(evt.getProperty('edit'));\n\t\t}\n\t});\n\t\n\t// Notifies the layout of a move operation inside a parent\n\tthis.moveHandler = mxUtils.bind(this, function(sender, evt)\n\t{\n\t\tif (this.isEnabled())\n\t\t{\n\t\t\tthis.cellsMoved(evt.getProperty('cells'), evt.getProperty('event'));\n\t\t}\n\t});\n\t\n\tthis.setGraph(graph);\n};\n\n/**\n * Extends mxEventSource.\n */\nmxLayoutManager.prototype = new mxEventSource();\nmxLayoutManager.prototype.constructor = mxLayoutManager;\n\n/**\n * Variable: graph\n * \n * Reference to the enclosing <mxGraph>.\n */\nmxLayoutManager.prototype.graph = null;\n\n/**\n * Variable: bubbling\n * \n * Specifies if the layout should bubble along\n * the cell hierarchy. Default is true.\n */\nmxLayoutManager.prototype.bubbling = true;\n\n/**\n * Variable: enabled\n * \n * Specifies if event handling is enabled. Default is true.\n */\nmxLayoutManager.prototype.enabled = true;\n\n/**\n * Variable: updateHandler\n * \n * Holds the function that handles the endUpdate event.\n */\nmxLayoutManager.prototype.updateHandler = null;\n\n/**\n * Variable: moveHandler\n * \n * Holds the function that handles the move event.\n */\nmxLayoutManager.prototype.moveHandler = null;\n\n/**\n * Function: isEnabled\n * \n * Returns true if events are handled. This implementation\n * returns <enabled>.\n */\nmxLayoutManager.prototype.isEnabled = function()\n{\n\treturn this.enabled;\n};\n\n/**\n * Function: setEnabled\n * \n * Enables or disables event handling. This implementation\n * updates <enabled>.\n * \n * Parameters:\n * \n * enabled - Boolean that specifies the new enabled state.\n */\nmxLayoutManager.prototype.setEnabled = function(enabled)\n{\n\tthis.enabled = enabled;\n};\n\n/**\n * Function: isBubbling\n * \n * Returns true if a layout should bubble, that is, if the parent layout\n * should be executed whenever a cell layout (layout of the children of\n * a cell) has been executed. This implementation returns <bubbling>.\n */\nmxLayoutManager.prototype.isBubbling = function()\n{\n\treturn this.bubbling;\n};\n\n/**\n * Function: setBubbling\n * \n * Sets <bubbling>.\n */\nmxLayoutManager.prototype.setBubbling = function(value)\n{\n\tthis.bubbling = value;\n};\n\n/**\n * Function: getGraph\n * \n * Returns the graph that this layout operates on.\n */\nmxLayoutManager.prototype.getGraph = function()\n{\n\treturn this.graph;\n};\n\n/**\n * Function: setGraph\n * \n * Sets the graph that the layouts operate on.\n */\nmxLayoutManager.prototype.setGraph = function(graph)\n{\n\tif (this.graph != null)\n\t{\n\t\tvar model = this.graph.getModel();\t\t\n\t\tmodel.removeListener(this.undoHandler);\n\t\tthis.graph.removeListener(this.moveHandler);\n\t}\n\t\n\tthis.graph = graph;\n\t\n\tif (this.graph != null)\n\t{\n\t\tvar model = this.graph.getModel();\t\n\t\tmodel.addListener(mxEvent.BEFORE_UNDO, this.undoHandler);\n\t\tthis.graph.addListener(mxEvent.MOVE_CELLS, this.moveHandler);\n\t}\n};\n\n/**\n * Function: getLayout\n * \n * Returns the layout to be executed for the given graph and parent.\n */\nmxLayoutManager.prototype.getLayout = function(parent)\n{\n\treturn null;\n};\n\n/**\n * Function: beforeUndo\n * \n * Called from the undoHandler.\n *\n * Parameters:\n * \n * cell - Array of <mxCells> that have been moved.\n * evt - Mouse event that represents the mousedown.\n */\nmxLayoutManager.prototype.beforeUndo = function(undoableEdit)\n{\n\tvar cells = this.getCellsForChanges(undoableEdit.changes);\n\tvar model = this.getGraph().getModel();\n\n\t// Adds all descendants\n\tvar tmp = [];\n\t\n\tfor (var i = 0; i < cells.length; i++)\n\t{\n\t\ttmp = tmp.concat(model.getDescendants(cells[i]));\n\t}\n\t\n\tcells = tmp;\n\t\n\t// Adds all parent ancestors\n\tif (this.isBubbling())\n\t{\n\t\ttmp = model.getParents(cells);\n\t\t\n\t\twhile (tmp.length > 0)\n\t\t{\n\t\t\tcells = cells.concat(tmp);\n\t\t\ttmp = model.getParents(tmp);\n\t\t}\n\t}\n\t\n\tthis.executeLayoutForCells(cells);\n};\n\n/**\n * Function: executeLayout\n * \n * Executes the given layout on the given parent.\n */\nmxLayoutManager.prototype.executeLayoutForCells = function(cells)\n{\n\t// Adds reverse to this array to avoid duplicate execution of leafes\n\t// Works like capture/bubble for events, first executes all layout\n\t// from top to bottom and in reverse order and removes duplicates.\n\tvar sorted = mxUtils.sortCells(cells, true);\n\tsorted = sorted.concat(sorted.slice().reverse());\n\tthis.layoutCells(sorted);\n};\n\n/**\n * Function: cellsMoved\n * \n * Called from the moveHandler.\n *\n * Parameters:\n * \n * cell - Array of <mxCells> that have been moved.\n * evt - Mouse event that represents the mousedown.\n */\nmxLayoutManager.prototype.cellsMoved = function(cells, evt)\n{\n\tif (cells != null && evt != null)\n\t{\n\t\tvar point = mxUtils.convertPoint(this.getGraph().container,\n\t\t\tmxEvent.getClientX(evt), mxEvent.getClientY(evt));\n\t\tvar model = this.getGraph().getModel();\n\t\t\n\t\t// Checks if a layout exists to take care of the moving if the\n\t\t// parent itself is not being moved\n\t\tfor (var i = 0; i < cells.length; i++)\n\t\t{\n\t\t\tvar parent = model.getParent(cells[i]);\n\t\t\t\n\t\t\tif (mxUtils.indexOf(cells, parent) < 0)\n\t\t\t{\n\t\t\t\tvar layout = this.getLayout(parent);\n\t\n\t\t\t\tif (layout != null)\n\t\t\t\t{\n\t\t\t\t\tlayout.moveCell(cells[i], point.x, point.y);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n};\n\n/**\n * Function: getCellsForEdit\n * \n * Returns the cells to be layouted for the given sequence of changes.\n */\nmxLayoutManager.prototype.getCellsForChanges = function(changes)\n{\n\tvar dict = new mxDictionary();\n\tvar result = [];\n\t\n\tfor (var i = 0; i < changes.length; i++)\n\t{\n\t\tvar change = changes[i];\n\t\t\n\t\tif (change instanceof mxRootChange)\n\t\t{\n\t\t\treturn [];\n\t\t}\n\t\telse\n\t\t{\n\t\t\tvar cells = this.getCellsForChange(change);\n\t\t\t\n\t\t\tfor (var j = 0; j < cells.length; j++)\n\t\t\t{\n\t\t\t\tif (cells[j] != null && !dict.get(cells[j]))\n\t\t\t\t{\n\t\t\t\t\tdict.put(cells[j], true);\n\t\t\t\t\tresult.push(cells[j]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t\n\treturn result;\n};\n\n/**\n * Function: getCellsForChange\n * \n * Executes all layouts which have been scheduled during the\n * changes.\n */\nmxLayoutManager.prototype.getCellsForChange = function(change)\n{\n\tvar model = this.getGraph().getModel();\n\t\n\tif (change instanceof mxChildChange)\n\t{\n\t\treturn [change.child, change.previous, model.getParent(change.child)];\n\t}\n\telse if (change instanceof mxTerminalChange || change instanceof mxGeometryChange)\n\t{\n\t\treturn [change.cell, model.getParent(change.cell)];\n\t}\n\telse if (change instanceof mxVisibleChange || change instanceof mxStyleChange)\n\t{\n\t\treturn [change.cell];\n\t}\n\t\n\treturn [];\n};\n\n/**\n * Function: layoutCells\n * \n * Executes all layouts which have been scheduled during the\n * changes.\n */\nmxLayoutManager.prototype.layoutCells = function(cells)\n{\n\tif (cells.length > 0)\n\t{\n\t\t// Invokes the layouts while removing duplicates\n\t\tvar model = this.getGraph().getModel();\n\t\t\n\t\tmodel.beginUpdate();\n\t\ttry \n\t\t{\n\t\t\tvar last = null;\n\t\t\t\n\t\t\tfor (var i = 0; i < cells.length; i++)\n\t\t\t{\n\t\t\t\tif (cells[i] != model.getRoot() && cells[i] != last)\n\t\t\t\t{\n\t\t\t\t\tif (this.executeLayout(this.getLayout(cells[i]), cells[i]))\n\t\t\t\t\t{\n\t\t\t\t\t\tlast = cells[i];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tthis.fireEvent(new mxEventObject(mxEvent.LAYOUT_CELLS, 'cells', cells));\n\t\t}\n\t\tfinally\n\t\t{\n\t\t\tmodel.endUpdate();\n\t\t}\n\t}\n};\n\n/**\n * Function: executeLayout\n * \n * Executes the given layout on the given parent.\n */\nmxLayoutManager.prototype.executeLayout = function(layout, parent)\n{\n\tvar result = false;\n\t\n\tif (layout != null && parent != null)\n\t{\n\t\tlayout.execute(parent);\n\t\tresult = true;\n\t}\n\t\n\treturn result;\n};\n\n/**\n * Function: destroy\n * \n * Removes all handlers from the <graph> and deletes the reference to it.\n */\nmxLayoutManager.prototype.destroy = function()\n{\n\tthis.setGraph(null);\n};\n"
  },
  {
    "path": "static/cherry/drawio_demo/src/js/view/mxMultiplicity.js",
    "content": "/**\n * Copyright (c) 2006-2015, JGraph Ltd\n * Copyright (c) 2006-2015, Gaudenz Alder\n */\n/**\n * Class: mxMultiplicity\n * \n * Defines invalid connections along with the error messages that they produce.\n * To add or remove rules on a graph, you must add/remove instances of this\n * class to <mxGraph.multiplicities>.\n * \n * Example:\n * \n * (code)\n * graph.multiplicities.push(new mxMultiplicity(\n *   true, 'rectangle', null, null, 0, 2, ['circle'],\n *   'Only 2 targets allowed',\n *   'Only circle targets allowed'));\n * (end)\n * \n * Defines a rule where each rectangle must be connected to no more than 2\n * circles and no other types of targets are allowed.\n * \n * Constructor: mxMultiplicity\n * \n * Instantiate class mxMultiplicity in order to describe allowed\n * connections in a graph. Not all constraints can be enforced while\n * editing, some must be checked at validation time. The <countError> and\n * <typeError> are treated as resource keys in <mxResources>.\n * \n * Parameters:\n * \n * source - Boolean indicating if this rule applies to the source or target\n * terminal.\n * type - Type of the source or target terminal that this rule applies to.\n * See <type> for more information.\n * attr - Optional attribute name to match the source or target terminal.\n * value - Optional attribute value to match the source or target terminal.\n * min - Minimum number of edges for this rule. Default is 1.\n * max - Maximum number of edges for this rule. n means infinite. Default\n * is n.\n * validNeighbors - Array of types of the opposite terminal for which this\n * rule applies.\n * countError - Error to be displayed for invalid number of edges.\n * typeError - Error to be displayed for invalid opposite terminals.\n * validNeighborsAllowed - Optional boolean indicating if the array of\n * opposite types should be valid or invalid.\n */\nfunction mxMultiplicity(source, type, attr, value, min, max,\n\tvalidNeighbors, countError, typeError, validNeighborsAllowed)\n{\n\tthis.source = source;\n\tthis.type = type;\n\tthis.attr = attr;\n\tthis.value = value;\n\tthis.min = (min != null) ? min : 0;\n\tthis.max = (max != null) ? max : 'n';\n\tthis.validNeighbors = validNeighbors;\n\tthis.countError = mxResources.get(countError) || countError;\n\tthis.typeError = mxResources.get(typeError) || typeError;\n\tthis.validNeighborsAllowed = (validNeighborsAllowed != null) ?\n\t\tvalidNeighborsAllowed : true;\n};\n\n/**\n * Variable: type\n * \n * Defines the type of the source or target terminal. The type is a string\n * passed to <mxUtils.isNode> together with the source or target vertex\n * value as the first argument.\n */\nmxMultiplicity.prototype.type = null;\n\n/**\n * Variable: attr\n * \n * Optional string that specifies the attributename to be passed to\n * <mxUtils.isNode> to check if the rule applies to a cell.\n */\nmxMultiplicity.prototype.attr = null;\n\n/**\n * Variable: value\n * \n * Optional string that specifies the value of the attribute to be passed\n * to <mxUtils.isNode> to check if the rule applies to a cell.\n */\nmxMultiplicity.prototype.value = null;\n\n/**\n * Variable: source\n * \n * Boolean that specifies if the rule is applied to the source or target\n * terminal of an edge.\n */\nmxMultiplicity.prototype.source = null;\n\n/**\n * Variable: min\n * \n * Defines the minimum number of connections for which this rule applies.\n * Default is 0.\n */\nmxMultiplicity.prototype.min = null;\n\n/**\n * Variable: max\n * \n * Defines the maximum number of connections for which this rule applies.\n * A value of 'n' means unlimited times. Default is 'n'. \n */\nmxMultiplicity.prototype.max = null;\n\n/**\n * Variable: validNeighbors\n * \n * Holds an array of strings that specify the type of neighbor for which\n * this rule applies. The strings are used in <mxCell.is> on the opposite\n * terminal to check if the rule applies to the connection.\n */\nmxMultiplicity.prototype.validNeighbors = null;\n\n/**\n * Variable: validNeighborsAllowed\n * \n * Boolean indicating if the list of validNeighbors are those that are allowed\n * for this rule or those that are not allowed for this rule.\n */\nmxMultiplicity.prototype.validNeighborsAllowed = true;\n\n/**\n * Variable: countError\n * \n * Holds the localized error message to be displayed if the number of\n * connections for which the rule applies is smaller than <min> or greater\n * than <max>.\n */\nmxMultiplicity.prototype.countError = null;\n\n/**\n * Variable: typeError\n * \n * Holds the localized error message to be displayed if the type of the\n * neighbor for a connection does not match the rule.\n */\nmxMultiplicity.prototype.typeError = null;\n\n/**\n * Function: check\n * \n * Checks the multiplicity for the given arguments and returns the error\n * for the given connection or null if the multiplicity does not apply.\n *  \n * Parameters:\n * \n * graph - Reference to the enclosing <mxGraph> instance.\n * edge - <mxCell> that represents the edge to validate.\n * source - <mxCell> that represents the source terminal.\n * target - <mxCell> that represents the target terminal.\n * sourceOut - Number of outgoing edges from the source terminal.\n * targetIn - Number of incoming edges for the target terminal.\n */\nmxMultiplicity.prototype.check = function(graph, edge, source, target, sourceOut, targetIn)\n{\n\tvar error = '';\n\n\tif ((this.source && this.checkTerminal(graph, source, edge)) ||\n\t\t(!this.source && this.checkTerminal(graph, target, edge)))\n\t{\n\t\tif (this.countError != null && \n\t\t\t((this.source && (this.max == 0 || (sourceOut >= this.max))) ||\n\t\t\t(!this.source && (this.max == 0 || (targetIn >= this.max)))))\n\t\t{\n\t\t\terror += this.countError + '\\n';\n\t\t}\n\n\t\tif (this.validNeighbors != null && this.typeError != null && this.validNeighbors.length > 0)\n\t\t{\n\t\t\tvar isValid = this.checkNeighbors(graph, edge, source, target);\n\n\t\t\tif (!isValid)\n\t\t\t{\n\t\t\t\terror += this.typeError + '\\n';\n\t\t\t}\n\t\t}\n\t}\n\t\n\treturn (error.length > 0) ? error : null;\n};\n\n/**\n * Function: checkNeighbors\n * \n * Checks if there are any valid neighbours in <validNeighbors>. This is only\n * called if <validNeighbors> is a non-empty array.\n */\nmxMultiplicity.prototype.checkNeighbors = function(graph, edge, source, target)\n{\n\tvar sourceValue = graph.model.getValue(source);\n\tvar targetValue = graph.model.getValue(target);\n\tvar isValid = !this.validNeighborsAllowed;\n\tvar valid = this.validNeighbors;\n\t\n\tfor (var j = 0; j < valid.length; j++)\n\t{\n\t\tif (this.source &&\n\t\t\tthis.checkType(graph, targetValue, valid[j]))\n\t\t{\n\t\t\tisValid = this.validNeighborsAllowed;\n\t\t\tbreak;\n\t\t}\n\t\telse if (!this.source && \n\t\t\tthis.checkType(graph, sourceValue, valid[j]))\n\t\t{\n\t\t\tisValid = this.validNeighborsAllowed;\n\t\t\tbreak;\n\t\t}\n\t}\n\t\n\treturn isValid;\n};\n\n/**\n * Function: checkTerminal\n * \n * Checks the given terminal cell and returns true if this rule applies. The\n * given cell is the source or target of the given edge, depending on\n * <source>. This implementation uses <checkType> on the terminal's value.\n */\nmxMultiplicity.prototype.checkTerminal = function(graph, terminal, edge)\n{\n\tvar value = graph.model.getValue(terminal);\n\t\n\treturn this.checkType(graph, value, this.type, this.attr, this.value);\n};\n\n/**\n * Function: checkType\n * \n * Checks the type of the given value.\n */\nmxMultiplicity.prototype.checkType = function(graph, value, type, attr, attrValue)\n{\n\tif (value != null)\n\t{\n\t\tif (!isNaN(value.nodeType)) // Checks if value is a DOM node\n\t\t{\n\t\t\treturn mxUtils.isNode(value, type, attr, attrValue);\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn value == type;\n\t\t}\n\t}\n\t\n\treturn false;\n};\n"
  },
  {
    "path": "static/cherry/drawio_demo/src/js/view/mxOutline.js",
    "content": "/**\n * Copyright (c) 2006-2015, JGraph Ltd\n * Copyright (c) 2006-2015, Gaudenz Alder\n */\n/**\n * Class: mxOutline\n *\n * Implements an outline (aka overview) for a graph. Set <updateOnPan> to true\n * to enable updates while the source graph is panning.\n * \n * Example:\n * \n * (code)\n * var outline = new mxOutline(graph, div);\n * (end)\n * \n * If an outline is used in an <mxWindow> in IE8 standards mode, the following\n * code makes sure that the shadow filter is not inherited and that any\n * transparent elements in the graph do not show the page background, but the\n * background of the graph container.\n * \n * (code)\n * if (document.documentMode == 8)\n * {\n *   container.style.filter = 'progid:DXImageTransform.Microsoft.alpha(opacity=100)';\n * }\n * (end)\n * \n * To move the graph to the top, left corner the following code can be used.\n * \n * (code)\n * var scale = graph.view.scale;\n * var bounds = graph.getGraphBounds();\n * graph.view.setTranslate(-bounds.x / scale, -bounds.y / scale);\n * (end)\n * \n * To toggle the suspended mode, the following can be used.\n * \n * (code)\n * outline.suspended = !outln.suspended;\n * if (!outline.suspended)\n * {\n *   outline.update(true);\n * }\n * (end)\n * \n * Constructor: mxOutline\n *\n * Constructs a new outline for the specified graph inside the given\n * container.\n * \n * Parameters:\n * \n * source - <mxGraph> to create the outline for.\n * container - DOM node that will contain the outline.\n */\nfunction mxOutline(source, container)\n{\n\tthis.source = source;\n\n\tif (container != null)\n\t{\n\t\tthis.init(container);\n\t}\n};\n\n/**\n * Function: source\n * \n * Reference to the source <mxGraph>.\n */\nmxOutline.prototype.source = null;\n\n/**\n * Function: outline\n * \n * Reference to the <mxGraph> that renders the outline.\n */\nmxOutline.prototype.outline = null;\n\n/**\n * Function: graphRenderHint\n * \n * Renderhint to be used for the outline graph. Default is faster.\n */\nmxOutline.prototype.graphRenderHint = mxConstants.RENDERING_HINT_FASTER;\n\n/**\n * Variable: enabled\n * \n * Specifies if events are handled. Default is true.\n */\nmxOutline.prototype.enabled = true;\n\n/**\n * Variable: showViewport\n * \n * Specifies a viewport rectangle should be shown. Default is true.\n */\nmxOutline.prototype.showViewport = true;\n\n/**\n * Variable: border\n * \n * Border to be added at the bottom and right. Default is 10.\n */\nmxOutline.prototype.border = 10;\n\n/**\n * Variable: enabled\n * \n * Specifies the size of the sizer handler. Default is 8.\n */\nmxOutline.prototype.sizerSize = 8;\n\n/**\n * Variable: labelsVisible\n * \n * Specifies if labels should be visible in the outline. Default is false.\n */\nmxOutline.prototype.labelsVisible = false;\n\n/**\n * Variable: updateOnPan\n * \n * Specifies if <update> should be called for <mxEvent.PAN> in the source\n * graph. Default is false.\n */\nmxOutline.prototype.updateOnPan = false;\n\n/**\n * Variable: sizerImage\n * \n * Optional <mxImage> to be used for the sizer. Default is null.\n */\nmxOutline.prototype.sizerImage = null;\n\n/**\n * Variable: minScale\n * \n * Minimum scale to be used. Default is 0.001.\n */\nmxOutline.prototype.minScale = 0.0001;\n\n/**\n * Variable: suspended\n * \n * Optional boolean flag to suspend updates. Default is false. This flag will\n * also suspend repaints of the outline. To toggle this switch, use the\n * following code.\n * \n * (code)\n * nav.suspended = !nav.suspended;\n * \n * if (!nav.suspended)\n * {\n *   nav.update(true);\n * }\n * (end)\n */\nmxOutline.prototype.suspended = false;\n\n/**\n * Variable: forceVmlHandles\n * \n * Specifies if VML should be used to render the handles in this control. This\n * is true for IE8 standards mode and false for all other browsers and modes.\n * This is a workaround for rendering issues of HTML elements over elements\n * with filters in IE 8 standards mode.\n */\nmxOutline.prototype.forceVmlHandles = document.documentMode == 8;\n\n/**\n * Function: createGraph\n * \n * Creates the <mxGraph> used in the outline.\n */\nmxOutline.prototype.createGraph = function(container)\n{\n\tvar graph = new mxGraph(container, this.source.getModel(), this.graphRenderHint, this.source.getStylesheet());\n\tgraph.foldingEnabled = false;\n\tgraph.autoScroll = false;\n\t\n\treturn graph;\n};\n\n/**\n * Function: init\n * \n * Initializes the outline inside the given container.\n */\nmxOutline.prototype.init = function(container)\n{\n\tthis.outline = this.createGraph(container);\n\t\n\t// Do not repaint when suspended\n\tvar outlineGraphModelChanged = this.outline.graphModelChanged;\n\tthis.outline.graphModelChanged = mxUtils.bind(this, function(changes)\n\t{\n\t\tif (!this.suspended && this.outline != null)\n\t\t{\n\t\t\toutlineGraphModelChanged.apply(this.outline, arguments);\n\t\t}\n\t});\n\n\t// Enables faster painting in SVG\n\tif (mxClient.IS_SVG)\n\t{\n\t\tvar node = this.outline.getView().getCanvas().parentNode;\n\t\tnode.setAttribute('shape-rendering', 'optimizeSpeed');\n\t\tnode.setAttribute('image-rendering', 'optimizeSpeed');\n\t}\n\t\n\t// Hides cursors and labels\n\tthis.outline.labelsVisible = this.labelsVisible;\n\tthis.outline.setEnabled(false);\n\t\n\tthis.updateHandler = mxUtils.bind(this, function(sender, evt)\n\t{\n\t\tif (!this.suspended && !this.active)\n\t\t{\n\t\t\tthis.update();\n\t\t}\n\t});\n\t\n\t// Updates the scale of the outline after a change of the main graph\n\tthis.source.getModel().addListener(mxEvent.CHANGE, this.updateHandler);\n\tthis.outline.addMouseListener(this);\n\t\n\t// Adds listeners to keep the outline in sync with the source graph\n\tvar view = this.source.getView();\n\tview.addListener(mxEvent.SCALE, this.updateHandler);\n\tview.addListener(mxEvent.TRANSLATE, this.updateHandler);\n\tview.addListener(mxEvent.SCALE_AND_TRANSLATE, this.updateHandler);\n\tview.addListener(mxEvent.DOWN, this.updateHandler);\n\tview.addListener(mxEvent.UP, this.updateHandler);\n\n\t// Updates blue rectangle on scroll\n\tmxEvent.addListener(this.source.container, 'scroll', this.updateHandler);\n\t\n\tthis.panHandler = mxUtils.bind(this, function(sender)\n\t{\n\t\tif (this.updateOnPan)\n\t\t{\n\t\t\tthis.updateHandler.apply(this, arguments);\n\t\t}\n\t});\n\tthis.source.addListener(mxEvent.PAN, this.panHandler);\n\t\n\t// Refreshes the graph in the outline after a refresh of the main graph\n\tthis.refreshHandler = mxUtils.bind(this, function(sender)\n\t{\n\t\tthis.outline.setStylesheet(this.source.getStylesheet());\n\t\tthis.outline.refresh();\n\t});\n\tthis.source.addListener(mxEvent.REFRESH, this.refreshHandler);\n\n\t// Creates the blue rectangle for the viewport\n\tthis.bounds = new mxRectangle(0, 0, 0, 0);\n\tthis.selectionBorder = new mxRectangleShape(this.bounds, null,\n\t\tmxConstants.OUTLINE_COLOR, mxConstants.OUTLINE_STROKEWIDTH);\n\tthis.selectionBorder.dialect = this.outline.dialect;\n\n\tif (this.forceVmlHandles)\n\t{\n\t\tthis.selectionBorder.isHtmlAllowed = function()\n\t\t{\n\t\t\treturn false;\n\t\t};\n\t}\n\t\n\tthis.selectionBorder.init(this.outline.getView().getOverlayPane());\n\n\t// Handles event by catching the initial pointer start and then listening to the\n\t// complete gesture on the event target. This is needed because all the events\n\t// are routed via the initial element even if that element is removed from the\n\t// DOM, which happens when we repaint the selection border and zoom handles.\n\tvar handler = mxUtils.bind(this, function(evt)\n\t{\n\t\tvar t = mxEvent.getSource(evt);\n\t\t\n\t\tvar redirect = mxUtils.bind(this, function(evt)\n\t\t{\n\t\t\tthis.outline.fireMouseEvent(mxEvent.MOUSE_MOVE, new mxMouseEvent(evt));\n\t\t});\n\t\t\n\t\tvar redirect2 = mxUtils.bind(this, function(evt)\n\t\t{\n\t\t\tmxEvent.removeGestureListeners(t, null, redirect, redirect2);\n\t\t\tthis.outline.fireMouseEvent(mxEvent.MOUSE_UP, new mxMouseEvent(evt));\n\t\t});\n\t\t\n\t\tmxEvent.addGestureListeners(t, null, redirect, redirect2);\n\t\tthis.outline.fireMouseEvent(mxEvent.MOUSE_DOWN, new mxMouseEvent(evt));\n\t});\n\t\n\tmxEvent.addGestureListeners(this.selectionBorder.node, handler);\n\n\t// Creates a small blue rectangle for sizing (sizer handle)\n\tthis.sizer = this.createSizer();\n\t\n\tif (this.forceVmlHandles)\n\t{\n\t\tthis.sizer.isHtmlAllowed = function()\n\t\t{\n\t\t\treturn false;\n\t\t};\n\t}\n\t\n\tthis.sizer.init(this.outline.getView().getOverlayPane());\n\t\n\tif (this.enabled)\n\t{\n\t\tthis.sizer.node.style.cursor = 'nwse-resize';\n\t}\n\t\n\tmxEvent.addGestureListeners(this.sizer.node, handler);\n\n\tthis.selectionBorder.node.style.display = (this.showViewport) ? '' : 'none';\n\tthis.sizer.node.style.display = this.selectionBorder.node.style.display;\n\tthis.selectionBorder.node.style.cursor = 'move';\n\n\tthis.update(false);\n};\n\n/**\n * Function: isEnabled\n * \n * Returns true if events are handled. This implementation\n * returns <enabled>.\n */\nmxOutline.prototype.isEnabled = function()\n{\n\treturn this.enabled;\n};\n\n/**\n * Function: setEnabled\n * \n * Enables or disables event handling. This implementation\n * updates <enabled>.\n * \n * Parameters:\n * \n * value - Boolean that specifies the new enabled state.\n */\nmxOutline.prototype.setEnabled = function(value)\n{\n\tthis.enabled = value;\n};\n\n/**\n * Function: setZoomEnabled\n * \n * Enables or disables the zoom handling by showing or hiding the respective\n * handle.\n * \n * Parameters:\n * \n * value - Boolean that specifies the new enabled state.\n */\nmxOutline.prototype.setZoomEnabled = function(value)\n{\n\tthis.sizer.node.style.visibility = (value) ? 'visible' : 'hidden';\n};\n\n/**\n * Function: refresh\n * \n * Invokes <update> and revalidate the outline. This method is deprecated.\n */\nmxOutline.prototype.refresh = function()\n{\n\tthis.update(true);\n};\n\n/**\n * Function: createSizer\n * \n * Creates the shape used as the sizer.\n */\nmxOutline.prototype.createSizer = function()\n{\n\tif (this.sizerImage != null)\n\t{\n\t\tvar sizer = new mxImageShape(new mxRectangle(0, 0, this.sizerImage.width, this.sizerImage.height), this.sizerImage.src);\n\t\tsizer.dialect = this.outline.dialect;\n\t\t\n\t\treturn sizer;\n\t}\n\telse\n\t{\n\t\tvar sizer = new mxRectangleShape(new mxRectangle(0, 0, this.sizerSize, this.sizerSize),\n\t\t\tmxConstants.OUTLINE_HANDLE_FILLCOLOR, mxConstants.OUTLINE_HANDLE_STROKECOLOR);\n\t\tsizer.dialect = this.outline.dialect;\n\t\n\t\treturn sizer;\n\t}\n};\n\n/**\n * Function: getSourceContainerSize\n * \n * Returns the size of the source container.\n */\nmxOutline.prototype.getSourceContainerSize = function()\n{\n\treturn new mxRectangle(0, 0, this.source.container.scrollWidth, this.source.container.scrollHeight);\n};\n\n/**\n * Function: getOutlineOffset\n * \n * Returns the offset for drawing the outline graph.\n */\nmxOutline.prototype.getOutlineOffset = function(scale)\n{\n\treturn null;\n};\n\n/**\n * Function: getOutlineOffset\n * \n * Returns the offset for drawing the outline graph.\n */\nmxOutline.prototype.getSourceGraphBounds = function()\n{\n\treturn this.source.getGraphBounds();\n};\n\n/**\n * Function: update\n * \n * Updates the outline.\n */\nmxOutline.prototype.update = function(revalidate)\n{\n\tif (this.source != null && this.source.container != null &&\n\t\tthis.outline != null && this.outline.container != null)\n\t{\n\t\tvar sourceScale = this.source.view.scale;\n\t\tvar scaledGraphBounds = this.getSourceGraphBounds();\n\t\tvar unscaledGraphBounds = new mxRectangle(scaledGraphBounds.x / sourceScale + this.source.panDx,\n\t\t\t\tscaledGraphBounds.y / sourceScale + this.source.panDy, scaledGraphBounds.width / sourceScale,\n\t\t\t\tscaledGraphBounds.height / sourceScale);\n\n\t\tvar unscaledFinderBounds = new mxRectangle(0, 0,\n\t\t\tthis.source.container.clientWidth / sourceScale,\n\t\t\tthis.source.container.clientHeight / sourceScale);\n\t\t\n\t\tvar union = unscaledGraphBounds.clone();\n\t\tunion.add(unscaledFinderBounds);\n\t\n\t\t// Zooms to the scrollable area if that is bigger than the graph\n\t\tvar size = this.getSourceContainerSize();\n\t\tvar completeWidth = Math.max(size.width / sourceScale, union.width);\n\t\tvar completeHeight = Math.max(size.height / sourceScale, union.height);\n\t\n\t\tvar availableWidth = Math.max(0, this.outline.container.clientWidth - this.border);\n\t\tvar availableHeight = Math.max(0, this.outline.container.clientHeight - this.border);\n\t\t\n\t\tvar outlineScale = Math.min(availableWidth / completeWidth, availableHeight / completeHeight);\n\t\tvar scale = (isNaN(outlineScale)) ? this.minScale : Math.max(this.minScale, outlineScale);\n\n\t\tif (scale > 0)\n\t\t{\n\t\t\tif (this.outline.getView().scale != scale)\n\t\t\t{\n\t\t\t\tthis.outline.getView().scale = scale;\n\t\t\t\trevalidate = true;\n\t\t\t}\n\t\t\n\t\t\tvar navView = this.outline.getView();\n\t\t\t\n\t\t\tif (navView.currentRoot != this.source.getView().currentRoot)\n\t\t\t{\n\t\t\t\tnavView.setCurrentRoot(this.source.getView().currentRoot);\n\t\t\t}\n\n\t\t\tvar t = this.source.view.translate;\n\t\t\tvar tx = t.x + this.source.panDx;\n\t\t\tvar ty = t.y + this.source.panDy;\n\t\t\t\n\t\t\tvar off = this.getOutlineOffset(scale);\n\t\t\t\n\t\t\tif (off != null)\n\t\t\t{\n\t\t\t\ttx += off.x;\n\t\t\t\tty += off.y;\n\t\t\t}\n\t\t\t\n\t\t\tif (unscaledGraphBounds.x < 0)\n\t\t\t{\n\t\t\t\ttx = tx - unscaledGraphBounds.x;\n\t\t\t}\n\t\t\tif (unscaledGraphBounds.y < 0)\n\t\t\t{\n\t\t\t\tty = ty - unscaledGraphBounds.y;\n\t\t\t}\n\t\t\t\n\t\t\tif (navView.translate.x != tx || navView.translate.y != ty)\n\t\t\t{\n\t\t\t\tnavView.translate.x = tx;\n\t\t\t\tnavView.translate.y = ty;\n\t\t\t\trevalidate = true;\n\t\t\t}\n\t\t\n\t\t\t// Prepares local variables for computations\n\t\t\tvar t2 = navView.translate;\n\t\t\tscale = this.source.getView().scale;\n\t\t\tvar scale2 = scale / navView.scale;\n\t\t\tvar scale3 = 1.0 / navView.scale;\n\t\t\tvar container = this.source.container;\n\t\t\t\n\t\t\t// Updates the bounds of the viewrect in the navigation\n\t\t\tthis.bounds = new mxRectangle(\n\t\t\t\t(t2.x - t.x - this.source.panDx) / scale3,\n\t\t\t\t(t2.y - t.y - this.source.panDy) / scale3,\n\t\t\t\t(container.clientWidth / scale2),\n\t\t\t\t(container.clientHeight / scale2));\n\t\t\t\n\t\t\t// Adds the scrollbar offset to the finder\n\t\t\tthis.bounds.x += this.source.container.scrollLeft * navView.scale / scale;\n\t\t\tthis.bounds.y += this.source.container.scrollTop * navView.scale / scale;\n\t\t\t\n\t\t\tvar b = this.selectionBorder.bounds;\n\t\t\t\n\t\t\tif (b.x != this.bounds.x || b.y != this.bounds.y || b.width != this.bounds.width || b.height != this.bounds.height)\n\t\t\t{\n\t\t\t\tthis.selectionBorder.bounds = this.bounds;\n\t\t\t\tthis.selectionBorder.redraw();\n\t\t\t}\n\t\t\n\t\t\t// Updates the bounds of the zoom handle at the bottom right\n\t\t\tvar b = this.sizer.bounds;\n\t\t\tvar b2 = new mxRectangle(this.bounds.x + this.bounds.width - b.width / 2,\n\t\t\t\t\tthis.bounds.y + this.bounds.height - b.height / 2, b.width, b.height);\n\n\t\t\tif (b.x != b2.x || b.y != b2.y || b.width != b2.width || b.height != b2.height)\n\t\t\t{\n\t\t\t\tthis.sizer.bounds = b2;\n\t\t\t\t\n\t\t\t\t// Avoids update of visibility in redraw for VML\n\t\t\t\tif (this.sizer.node.style.visibility != 'hidden')\n\t\t\t\t{\n\t\t\t\t\tthis.sizer.redraw();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (revalidate)\n\t\t\t{\n\t\t\t\tthis.outline.view.revalidate();\n\t\t\t}\n\t\t}\n\t}\n};\n\n/**\n * Function: mouseDown\n * \n * Handles the event by starting a translation or zoom.\n */\nmxOutline.prototype.mouseDown = function(sender, me)\n{\n\tif (this.enabled && this.showViewport)\n\t{\n\t\tvar tol = (!mxEvent.isMouseEvent(me.getEvent())) ? this.source.tolerance : 0;\n\t\tvar hit = (this.source.allowHandleBoundsCheck && (mxClient.IS_IE || tol > 0)) ?\n\t\t\t\tnew mxRectangle(me.getGraphX() - tol, me.getGraphY() - tol, 2 * tol, 2 * tol) : null;\n\t\tthis.zoom = me.isSource(this.sizer) || (hit != null && mxUtils.intersects(shape.bounds, hit));\n\t\tthis.startX = me.getX();\n\t\tthis.startY = me.getY();\n\t\tthis.active = true;\n\n\t\tif (this.source.useScrollbarsForPanning && mxUtils.hasScrollbars(this.source.container))\n\t\t{\n\t\t\tthis.dx0 = this.source.container.scrollLeft;\n\t\t\tthis.dy0 = this.source.container.scrollTop;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tthis.dx0 = 0;\n\t\t\tthis.dy0 = 0;\n\t\t}\n\t}\n\n\tme.consume();\n};\n\n/**\n * Function: mouseMove\n * \n * Handles the event by previewing the viewrect in <graph> and updating the\n * rectangle that represents the viewrect in the outline.\n */\nmxOutline.prototype.mouseMove = function(sender, me)\n{\n\tif (this.active)\n\t{\n\t\tthis.selectionBorder.node.style.display = (this.showViewport) ? '' : 'none';\n\t\tthis.sizer.node.style.display = this.selectionBorder.node.style.display; \n\n\t\tvar delta = this.getTranslateForEvent(me);\n\t\tvar dx = delta.x;\n\t\tvar dy = delta.y;\n\t\tvar bounds = null;\n\t\t\n\t\tif (!this.zoom)\n\t\t{\n\t\t\t// Previews the panning on the source graph\n\t\t\tvar scale = this.outline.getView().scale;\n\t\t\tbounds = new mxRectangle(this.bounds.x + dx,\n\t\t\t\tthis.bounds.y + dy, this.bounds.width, this.bounds.height);\n\t\t\tthis.selectionBorder.bounds = bounds;\n\t\t\tthis.selectionBorder.redraw();\n\t\t\tdx /= scale;\n\t\t\tdx *= this.source.getView().scale;\n\t\t\tdy /= scale;\n\t\t\tdy *= this.source.getView().scale;\n\t\t\tthis.source.panGraph(-dx - this.dx0, -dy - this.dy0);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Does *not* preview zooming on the source graph\n\t\t\tvar container = this.source.container;\n\t\t\tvar viewRatio = container.clientWidth / container.clientHeight;\n\t\t\tdy = dx / viewRatio;\n\t\t\tbounds = new mxRectangle(this.bounds.x,\n\t\t\t\tthis.bounds.y,\n\t\t\t\tMath.max(1, this.bounds.width + dx),\n\t\t\t\tMath.max(1, this.bounds.height + dy));\n\t\t\tthis.selectionBorder.bounds = bounds;\n\t\t\tthis.selectionBorder.redraw();\n\t\t}\n\t\t\n\t\t// Updates the zoom handle\n\t\tvar b = this.sizer.bounds;\n\t\tthis.sizer.bounds = new mxRectangle(\n\t\t\tbounds.x + bounds.width - b.width / 2,\n\t\t\tbounds.y + bounds.height - b.height / 2,\n\t\t\tb.width, b.height);\n\t\t\n\t\t// Avoids update of visibility in redraw for VML\n\t\tif (this.sizer.node.style.visibility != 'hidden')\n\t\t{\n\t\t\tthis.sizer.redraw();\n\t\t}\n\t\t\n\t\tme.consume();\n\t}\n};\n\n/**\n * Function: getTranslateForEvent\n * \n * Gets the translate for the given mouse event. Here is an example to limit\n * the outline to stay within positive coordinates:\n * \n * (code)\n * outline.getTranslateForEvent = function(me)\n * {\n *   var pt = new mxPoint(me.getX() - this.startX, me.getY() - this.startY);\n *   \n *   if (!this.zoom)\n *   {\n *     var tr = this.source.view.translate;\n *     pt.x = Math.max(tr.x * this.outline.view.scale, pt.x);\n *     pt.y = Math.max(tr.y * this.outline.view.scale, pt.y);\n *   }\n *   \n *   return pt;\n * };\n * (end)\n */\nmxOutline.prototype.getTranslateForEvent = function(me)\n{\n\treturn new mxPoint(me.getX() - this.startX, me.getY() - this.startY);\n};\n\n/**\n * Function: mouseUp\n * \n * Handles the event by applying the translation or zoom to <graph>.\n */\nmxOutline.prototype.mouseUp = function(sender, me)\n{\n\tif (this.active)\n\t{\n\t\tvar delta = this.getTranslateForEvent(me);\n\t\tvar dx = delta.x;\n\t\tvar dy = delta.y;\n\t\t\n\t\tif (Math.abs(dx) > 0 || Math.abs(dy) > 0)\n\t\t{\n\t\t\tif (!this.zoom)\n\t\t\t{\n\t\t\t\t// Applies the new translation if the source\n\t\t\t\t// has no scrollbars\n\t\t\t\tif (!this.source.useScrollbarsForPanning ||\n\t\t\t\t\t!mxUtils.hasScrollbars(this.source.container))\n\t\t\t\t{\n\t\t\t\t\tthis.source.panGraph(0, 0);\n\t\t\t\t\tdx /= this.outline.getView().scale;\n\t\t\t\t\tdy /= this.outline.getView().scale;\n\t\t\t\t\tvar t = this.source.getView().translate;\n\t\t\t\t\tthis.source.getView().setTranslate(t.x - dx, t.y - dy);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// Applies the new zoom\n\t\t\t\tvar w = this.selectionBorder.bounds.width;\n\t\t\t\tvar scale = this.source.getView().scale;\n\t\t\t\tthis.source.zoomTo(Math.max(this.minScale, scale - (dx * scale) / w), false);\n\t\t\t}\n\n\t\t\tthis.update();\n\t\t\tme.consume();\n\t\t}\n\t\t\t\n\t\t// Resets the state of the handler\n\t\tthis.index = null;\n\t\tthis.active = false;\n\t}\n};\n\n/**\n * Function: destroy\n * \n * Destroy this outline and removes all listeners from <source>.\n */\nmxOutline.prototype.destroy = function()\n{\n\tif (this.source != null)\n\t{\n\t\tthis.source.removeListener(this.panHandler);\n\t\tthis.source.removeListener(this.refreshHandler);\n\t\tthis.source.getModel().removeListener(this.updateHandler);\n\t\tthis.source.getView().removeListener(this.updateHandler);\n\t\tmxEvent.addListener(this.source.container, 'scroll', this.updateHandler);\n\t\tthis.source = null;\n\t}\n\t\n\tif (this.outline != null)\n\t{\n\t\tthis.outline.removeMouseListener(this);\n\t\tthis.outline.destroy();\n\t\tthis.outline = null;\n\t}\n\n\tif (this.selectionBorder != null)\n\t{\n\t\tthis.selectionBorder.destroy();\n\t\tthis.selectionBorder = null;\n\t}\n\t\n\tif (this.sizer != null)\n\t{\n\t\tthis.sizer.destroy();\n\t\tthis.sizer = null;\n\t}\n};\n"
  },
  {
    "path": "static/cherry/drawio_demo/src/js/view/mxPerimeter.js",
    "content": "/**\n * Copyright (c) 2006-2015, JGraph Ltd\n * Copyright (c) 2006-2015, Gaudenz Alder\n */\nvar mxPerimeter =\n{\n\t/**\n\t * Class: mxPerimeter\n\t * \n\t * Provides various perimeter functions to be used in a style\n\t * as the value of <mxConstants.STYLE_PERIMETER>. Perimeters for\n\t * rectangle, circle, rhombus and triangle are available.\n\t *\n\t * Example:\n\t * \n\t * (code)\n\t * <add as=\"perimeter\">mxPerimeter.RectanglePerimeter</add>\n\t * (end)\n\t * \n\t * Or programmatically:\n\t * \n\t * (code)\n\t * style[mxConstants.STYLE_PERIMETER] = mxPerimeter.RectanglePerimeter;\n\t * (end)\n\t * \n\t * When adding new perimeter functions, it is recommended to use the \n\t * mxPerimeter-namespace as follows:\n\t * \n\t * (code)\n\t * mxPerimeter.CustomPerimeter = function (bounds, vertex, next, orthogonal)\n\t * {\n\t *   var x = 0; // Calculate x-coordinate\n\t *   var y = 0; // Calculate y-coordainte\n\t *   \n\t *   return new mxPoint(x, y);\n\t * }\n\t * (end)\n\t * \n\t * The new perimeter should then be registered in the <mxStyleRegistry> as follows:\n\t * (code)\n\t * mxStyleRegistry.putValue('customPerimeter', mxPerimeter.CustomPerimeter);\n\t * (end)\n\t * \n\t * The custom perimeter above can now be used in a specific vertex as follows:\n\t * \n\t * (code)\n\t * model.setStyle(vertex, 'perimeter=customPerimeter');\n\t * (end)\n\t * \n\t * Note that the key of the <mxStyleRegistry> entry for the function should\n\t * be used in string values, unless <mxGraphView.allowEval> is true, in\n\t * which case you can also use mxPerimeter.CustomPerimeter for the value in\n\t * the cell style above.\n\t * \n\t * Or it can be used for all vertices in the graph as follows:\n\t * \n\t * (code)\n\t * var style = graph.getStylesheet().getDefaultVertexStyle();\n\t * style[mxConstants.STYLE_PERIMETER] = mxPerimeter.CustomPerimeter;\n\t * (end)\n\t * \n\t * Note that the object can be used directly when programmatically setting\n\t * the value, but the key in the <mxStyleRegistry> should be used when\n\t * setting the value via a key, value pair in a cell style.\n\t * \n\t * The parameters are explained in <RectanglePerimeter>.\n\t * \n\t * Function: RectanglePerimeter\n\t * \n\t * Describes a rectangular perimeter for the given bounds.\n\t *\n\t * Parameters:\n\t * \n\t * bounds - <mxRectangle> that represents the absolute bounds of the\n\t * vertex.\n\t * vertex - <mxCellState> that represents the vertex.\n\t * next - <mxPoint> that represents the nearest neighbour point on the\n\t * given edge.\n\t * orthogonal - Boolean that specifies if the orthogonal projection onto\n\t * the perimeter should be returned. If this is false then the intersection\n\t * of the perimeter and the line between the next and the center point is\n\t * returned.\n\t */\n\tRectanglePerimeter: function (bounds, vertex, next, orthogonal)\n\t{\n\t\tvar cx = bounds.getCenterX();\n\t\tvar cy = bounds.getCenterY();\n\t\tvar dx = next.x - cx;\n\t\tvar dy = next.y - cy;\n\t\tvar alpha = Math.atan2(dy, dx);\n\t\tvar p = new mxPoint(0, 0);\n\t\tvar pi = Math.PI;\n\t\tvar pi2 = Math.PI/2;\n\t\tvar beta = pi2 - alpha;\n\t\tvar t = Math.atan2(bounds.height, bounds.width);\n\t\t\n\t\tif (alpha < -pi + t || alpha > pi - t)\n\t\t{\n\t\t\t// Left edge\n\t\t\tp.x = bounds.x;\n\t\t\tp.y = cy - bounds.width * Math.tan(alpha) / 2;\n\t\t}\n\t\telse if (alpha < -t)\n\t\t{\n\t\t\t// Top Edge\n\t\t\tp.y = bounds.y;\n\t\t\tp.x = cx - bounds.height * Math.tan(beta) / 2;\n\t\t}\n\t\telse if (alpha < t)\n\t\t{\n\t\t\t// Right Edge\n\t\t\tp.x = bounds.x + bounds.width;\n\t\t\tp.y = cy + bounds.width * Math.tan(alpha) / 2;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Bottom Edge\n\t\t\tp.y = bounds.y + bounds.height;\n\t\t\tp.x = cx + bounds.height * Math.tan(beta) / 2;\n\t\t}\n\t\t\n\t\tif (orthogonal)\n\t\t{\n\t\t\tif (next.x >= bounds.x &&\n\t\t\t\tnext.x <= bounds.x + bounds.width)\n\t\t\t{\n\t\t\t\tp.x = next.x;\n\t\t\t}\n\t\t\telse if (next.y >= bounds.y &&\n\t\t\t\t\t   next.y <= bounds.y + bounds.height)\n\t\t\t{\n\t\t\t\tp.y = next.y;\n\t\t\t}\n\t\t\tif (next.x < bounds.x)\n\t\t\t{\n\t\t\t\tp.x = bounds.x;\n\t\t\t}\n\t\t\telse if (next.x > bounds.x + bounds.width)\n\t\t\t{\n\t\t\t\tp.x = bounds.x + bounds.width;\n\t\t\t}\n\t\t\tif (next.y < bounds.y)\n\t\t\t{\n\t\t\t\tp.y = bounds.y;\n\t\t\t}\n\t\t\telse if (next.y > bounds.y + bounds.height)\n\t\t\t{\n\t\t\t\tp.y = bounds.y + bounds.height;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn p;\n\t},\n\n\t/**\n\t * Function: EllipsePerimeter\n\t * \n\t * Describes an elliptic perimeter. See <RectanglePerimeter>\n\t * for a description of the parameters.\n\t */\n\tEllipsePerimeter: function (bounds, vertex, next, orthogonal)\n\t{\n\t\tvar x = bounds.x;\n\t\tvar y = bounds.y;\n\t\tvar a = bounds.width / 2;\n\t\tvar b = bounds.height / 2;\n\t\tvar cx = x + a;\n\t\tvar cy = y + b;\n\t\tvar px = next.x;\n\t\tvar py = next.y;\n\t\t\n\t\t// Calculates straight line equation through\n\t\t// point and ellipse center y = d * x + h\n\t\tvar dx = parseInt(px - cx);\n\t\tvar dy = parseInt(py - cy);\n\t\t\n\t\tif (dx == 0 && dy != 0)\n\t\t{\n\t\t\treturn new mxPoint(cx, cy + b * dy / Math.abs(dy));\n\t\t}\n\t\telse if (dx == 0 && dy == 0)\n\t\t{\n\t\t\treturn new mxPoint(px, py);\n\t\t}\n\n\t\tif (orthogonal)\n\t\t{\n\t\t\tif (py >= y && py <= y + bounds.height)\n\t\t\t{\n\t\t\t\tvar ty = py - cy;\n\t\t\t\tvar tx = Math.sqrt(a*a*(1-(ty*ty)/(b*b))) || 0;\n\t\t\t\t\n\t\t\t\tif (px <= x)\n\t\t\t\t{\n\t\t\t\t\ttx = -tx;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\treturn new mxPoint(cx+tx, py);\n\t\t\t}\n\t\t\t\n\t\t\tif (px >= x && px <= x + bounds.width)\n\t\t\t{\n\t\t\t\tvar tx = px - cx;\n\t\t\t\tvar ty = Math.sqrt(b*b*(1-(tx*tx)/(a*a))) || 0;\n\t\t\t\t\n\t\t\t\tif (py <= y)\n\t\t\t\t{\n\t\t\t\t\tty = -ty;\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\treturn new mxPoint(px, cy+ty);\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Calculates intersection\n\t\tvar d = dy / dx;\n\t\tvar h = cy - d * cx;\n\t\tvar e = a * a * d * d + b * b;\n\t\tvar f = -2 * cx * e;\n\t\tvar g = a * a * d * d * cx * cx +\n\t\t\t\tb * b * cx * cx -\n\t\t\t\ta * a * b * b;\n\t\tvar det = Math.sqrt(f * f - 4 * e * g);\n\t\t\n\t\t// Two solutions (perimeter points)\n\t\tvar xout1 = (-f + det) / (2 * e);\n\t\tvar xout2 = (-f - det) / (2 * e);\n\t\tvar yout1 = d * xout1 + h;\n\t\tvar yout2 = d * xout2 + h;\n\t\tvar dist1 = Math.sqrt(Math.pow((xout1 - px), 2)\n\t\t\t\t\t+ Math.pow((yout1 - py), 2));\n\t\tvar dist2 = Math.sqrt(Math.pow((xout2 - px), 2)\n\t\t\t\t\t+ Math.pow((yout2 - py), 2));\n\t\t\t\t\t\n\t\t// Correct solution\n\t\tvar xout = 0;\n\t\tvar yout = 0;\n\t\t\n\t\tif (dist1 < dist2)\n\t\t{\n\t\t\txout = xout1;\n\t\t\tyout = yout1;\n\t\t}\n\t\telse\n\t\t{\n\t\t\txout = xout2;\n\t\t\tyout = yout2;\n\t\t}\n\t\t\n\t\treturn new mxPoint(xout, yout);\n\t},\n\n\t/**\n\t * Function: RhombusPerimeter\n\t * \n\t * Describes a rhombus (aka diamond) perimeter. See <RectanglePerimeter>\n\t * for a description of the parameters.\n\t */\n\tRhombusPerimeter: function (bounds, vertex, next, orthogonal)\n\t{\n\t\tvar x = bounds.x;\n\t\tvar y = bounds.y;\n\t\tvar w = bounds.width;\n\t\tvar h = bounds.height;\n\t\t\n\t\tvar cx = x + w / 2;\n\t\tvar cy = y + h / 2;\n\n\t\tvar px = next.x;\n\t\tvar py = next.y;\n\n\t\t// Special case for intersecting the diamond's corners\n\t\tif (cx == px)\n\t\t{\n\t\t\tif (cy > py)\n\t\t\t{\n\t\t\t\treturn new mxPoint(cx, y); // top\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn new mxPoint(cx, y + h); // bottom\n\t\t\t}\n\t\t}\n\t\telse if (cy == py)\n\t\t{\n\t\t\tif (cx > px)\n\t\t\t{\n\t\t\t\treturn new mxPoint(x, cy); // left\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn new mxPoint(x + w, cy); // right\n\t\t\t}\n\t\t}\n\t\t\n\t\tvar tx = cx;\n\t\tvar ty = cy;\n\t\t\n\t\tif (orthogonal)\n\t\t{\n\t\t\tif (px >= x && px <= x + w)\n\t\t\t{\n\t\t\t\ttx = px;\n\t\t\t}\n\t\t\telse if (py >= y && py <= y + h)\n\t\t\t{\n\t\t\t\tty = py;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// In which quadrant will the intersection be?\n\t\t// set the slope and offset of the border line accordingly\n\t\tif (px < cx)\n\t\t{\n\t\t\tif (py < cy)\n\t\t\t{\n\t\t\t\treturn mxUtils.intersection(px, py, tx, ty, cx, y, x, cy);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn mxUtils.intersection(px, py, tx, ty, cx, y + h, x, cy);\n\t\t\t}\n\t\t}\n\t\telse if (py < cy)\n\t\t{\n\t\t\treturn mxUtils.intersection(px, py, tx, ty, cx, y, x + w, cy);\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn mxUtils.intersection(px, py, tx, ty, cx, y + h, x + w, cy);\n\t\t}\n\t},\n\t\n\t/**\n\t * Function: TrianglePerimeter\n\t * \n\t * Describes a triangle perimeter. See <RectanglePerimeter>\n\t * for a description of the parameters.\n\t */\n\tTrianglePerimeter: function (bounds, vertex, next, orthogonal)\n\t{\n\t\tvar direction = (vertex != null) ?\n\t\t\tvertex.style[mxConstants.STYLE_DIRECTION] : null;\n\t\tvar vertical = direction == mxConstants.DIRECTION_NORTH ||\n\t\t\tdirection == mxConstants.DIRECTION_SOUTH;\n\n\t\tvar x = bounds.x;\n\t\tvar y = bounds.y;\n\t\tvar w = bounds.width;\n\t\tvar h = bounds.height;\n\t\t\n\t\tvar cx = x + w / 2;\n\t\tvar cy = y + h / 2;\n\t\t\n\t\tvar start = new mxPoint(x, y);\n\t\tvar corner = new mxPoint(x + w, cy);\n\t\tvar end = new mxPoint(x, y + h);\n\t\t\n\t\tif (direction == mxConstants.DIRECTION_NORTH)\n\t\t{\n\t\t\tstart = end;\n\t\t\tcorner = new mxPoint(cx, y);\n\t\t\tend = new mxPoint(x + w, y + h);\n\t\t}\n\t\telse if (direction == mxConstants.DIRECTION_SOUTH)\n\t\t{\n\t\t\tcorner = new mxPoint(cx, y + h);\n\t\t\tend = new mxPoint(x + w, y);\n\t\t}\n\t\telse if (direction == mxConstants.DIRECTION_WEST)\n\t\t{\n\t\t\tstart = new mxPoint(x + w, y);\n\t\t\tcorner = new mxPoint(x, cy);\n\t\t\tend = new mxPoint(x + w, y + h);\n\t\t}\n\n\t\tvar dx = next.x - cx;\n\t\tvar dy = next.y - cy;\n\n\t\tvar alpha = (vertical) ? Math.atan2(dx, dy) : Math.atan2(dy, dx);\n\t\tvar t = (vertical) ? Math.atan2(w, h) : Math.atan2(h, w);\n\t\t\n\t\tvar base = false;\n\t\t\n\t\tif (direction == mxConstants.DIRECTION_NORTH ||\n\t\t\tdirection == mxConstants.DIRECTION_WEST)\n\t\t{\n\t\t\tbase = alpha > -t && alpha < t;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tbase = alpha < -Math.PI + t || alpha > Math.PI - t;\t\n\t\t}\n\n\t\tvar result = null;\t\t\t\n\n\t\tif (base)\n\t\t{\n\t\t\tif (orthogonal && ((vertical && next.x >= start.x && next.x <= end.x) ||\n\t\t\t\t(!vertical && next.y >= start.y && next.y <= end.y)))\n\t\t\t{\n\t\t\t\tif (vertical)\n\t\t\t\t{\n\t\t\t\t\tresult = new mxPoint(next.x, start.y);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tresult = new mxPoint(start.x, next.y);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif (direction == mxConstants.DIRECTION_NORTH)\n\t\t\t\t{\n\t\t\t\t\tresult = new mxPoint(x + w / 2 + h * Math.tan(alpha) / 2,\n\t\t\t\t\t\ty + h);\n\t\t\t\t}\n\t\t\t\telse if (direction == mxConstants.DIRECTION_SOUTH)\n\t\t\t\t{\n\t\t\t\t\tresult = new mxPoint(x + w / 2 - h * Math.tan(alpha) / 2,\n\t\t\t\t\t\ty);\n\t\t\t\t}\n\t\t\t\telse if (direction == mxConstants.DIRECTION_WEST)\n\t\t\t\t{\n\t\t\t\t\tresult = new mxPoint(x + w, y + h / 2 +\n\t\t\t\t\t\tw * Math.tan(alpha) / 2);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tresult = new mxPoint(x, y + h / 2 -\n\t\t\t\t\t\tw * Math.tan(alpha) / 2);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif (orthogonal)\n\t\t\t{\n\t\t\t\tvar pt = new mxPoint(cx, cy);\n\t\t\n\t\t\t\tif (next.y >= y && next.y <= y + h)\n\t\t\t\t{\n\t\t\t\t\tpt.x = (vertical) ? cx : (\n\t\t\t\t\t\t(direction == mxConstants.DIRECTION_WEST) ?\n\t\t\t\t\t\t\tx + w : x);\n\t\t\t\t\tpt.y = next.y;\n\t\t\t\t}\n\t\t\t\telse if (next.x >= x && next.x <= x + w)\n\t\t\t\t{\n\t\t\t\t\tpt.x = next.x;\n\t\t\t\t\tpt.y = (!vertical) ? cy : (\n\t\t\t\t\t\t(direction == mxConstants.DIRECTION_NORTH) ?\n\t\t\t\t\t\t\ty + h : y);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// Compute angle\n\t\t\t\tdx = next.x - pt.x;\n\t\t\t\tdy = next.y - pt.y;\n\t\t\t\t\n\t\t\t\tcx = pt.x;\n\t\t\t\tcy = pt.y;\n\t\t\t}\n\n\t\t\tif ((vertical && next.x <= x + w / 2) ||\n\t\t\t\t(!vertical && next.y <= y + h / 2))\n\t\t\t{\n\t\t\t\tresult = mxUtils.intersection(next.x, next.y, cx, cy,\n\t\t\t\t\tstart.x, start.y, corner.x, corner.y);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tresult = mxUtils.intersection(next.x, next.y, cx, cy,\n\t\t\t\t\tcorner.x, corner.y, end.x, end.y);\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (result == null)\n\t\t{\n\t\t\tresult = new mxPoint(cx, cy);\n\t\t}\n\t\t\n\t\treturn result;\n\t},\n\t\n\t/**\n\t * Function: HexagonPerimeter\n\t * \n\t * Describes a hexagon perimeter. See <RectanglePerimeter>\n\t * for a description of the parameters.\n\t */\n\tHexagonPerimeter: function (bounds, vertex, next, orthogonal)\n\t{\n\t\tvar x = bounds.x;\n\t\tvar y = bounds.y;\n\t\tvar w = bounds.width;\n\t\tvar h = bounds.height;\n\n\t\tvar cx = bounds.getCenterX();\n\t\tvar cy = bounds.getCenterY();\n\t\tvar px = next.x;\n\t\tvar py = next.y;\n\t\tvar dx = px - cx;\n\t\tvar dy = py - cy;\n\t\tvar alpha = -Math.atan2(dy, dx);\n\t\tvar pi = Math.PI;\n\t\tvar pi2 = Math.PI / 2;\n\n\t\tvar result = new mxPoint(cx, cy);\n\n\t\tvar direction = (vertex != null) ? mxUtils.getValue(\n\t\t\t\tvertex.style, mxConstants.STYLE_DIRECTION,\n\t\t\t\tmxConstants.DIRECTION_EAST) : mxConstants.DIRECTION_EAST;\n\t\tvar vertical = direction == mxConstants.DIRECTION_NORTH\n\t\t\t\t|| direction == mxConstants.DIRECTION_SOUTH;\n\t\tvar a = new mxPoint();\n\t\tvar b = new mxPoint();\n\n\t\t//Only consider corrects quadrants for the orthogonal case.\n\t\tif ((px < x) && (py < y) || (px < x) && (py > y + h)\n\t\t\t\t|| (px > x + w) && (py < y) || (px > x + w) && (py > y + h))\n\t\t{\n\t\t\torthogonal = false;\n\t\t}\n\n\t\tif (orthogonal)\n\t\t{\n\t\t\tif (vertical)\n\t\t\t{\n\t\t\t\t//Special cases where intersects with hexagon corners\n\t\t\t\tif (px == cx)\n\t\t\t\t{\n\t\t\t\t\tif (py <= y)\n\t\t\t\t\t{\n\t\t\t\t\t\treturn new mxPoint(cx, y);\n\t\t\t\t\t}\n\t\t\t\t\telse if (py >= y + h)\n\t\t\t\t\t{\n\t\t\t\t\t\treturn new mxPoint(cx, y + h);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if (px < x)\n\t\t\t\t{\n\t\t\t\t\tif (py == y + h / 4)\n\t\t\t\t\t{\n\t\t\t\t\t\treturn new mxPoint(x, y + h / 4);\n\t\t\t\t\t}\n\t\t\t\t\telse if (py == y + 3 * h / 4)\n\t\t\t\t\t{\n\t\t\t\t\t\treturn new mxPoint(x, y + 3 * h / 4);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if (px > x + w)\n\t\t\t\t{\n\t\t\t\t\tif (py == y + h / 4)\n\t\t\t\t\t{\n\t\t\t\t\t\treturn new mxPoint(x + w, y + h / 4);\n\t\t\t\t\t}\n\t\t\t\t\telse if (py == y + 3 * h / 4)\n\t\t\t\t\t{\n\t\t\t\t\t\treturn new mxPoint(x + w, y + 3 * h / 4);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if (px == x)\n\t\t\t\t{\n\t\t\t\t\tif (py < cy)\n\t\t\t\t\t{\n\t\t\t\t\t\treturn new mxPoint(x, y + h / 4);\n\t\t\t\t\t}\n\t\t\t\t\telse if (py > cy)\n\t\t\t\t\t{\n\t\t\t\t\t\treturn new mxPoint(x, y + 3 * h / 4);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if (px == x + w)\n\t\t\t\t{\n\t\t\t\t\tif (py < cy)\n\t\t\t\t\t{\n\t\t\t\t\t\treturn new mxPoint(x + w, y + h / 4);\n\t\t\t\t\t}\n\t\t\t\t\telse if (py > cy)\n\t\t\t\t\t{\n\t\t\t\t\t\treturn new mxPoint(x + w, y + 3 * h / 4);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (py == y)\n\t\t\t\t{\n\t\t\t\t\treturn new mxPoint(cx, y);\n\t\t\t\t}\n\t\t\t\telse if (py == y + h)\n\t\t\t\t{\n\t\t\t\t\treturn new mxPoint(cx, y + h);\n\t\t\t\t}\n\n\t\t\t\tif (px < cx)\n\t\t\t\t{\n\t\t\t\t\tif ((py > y + h / 4) && (py < y + 3 * h / 4))\n\t\t\t\t\t{\n\t\t\t\t\t\ta = new mxPoint(x, y);\n\t\t\t\t\t\tb = new mxPoint(x, y + h);\n\t\t\t\t\t}\n\t\t\t\t\telse if (py < y + h / 4)\n\t\t\t\t\t{\n\t\t\t\t\t\ta = new mxPoint(x - Math.floor(0.5 * w), y\n\t\t\t\t\t\t\t\t+ Math.floor(0.5 * h));\n\t\t\t\t\t\tb = new mxPoint(x + w, y - Math.floor(0.25 * h));\n\t\t\t\t\t}\n\t\t\t\t\telse if (py > y + 3 * h / 4)\n\t\t\t\t\t{\n\t\t\t\t\t\ta = new mxPoint(x - Math.floor(0.5 * w), y\n\t\t\t\t\t\t\t\t+ Math.floor(0.5 * h));\n\t\t\t\t\t\tb = new mxPoint(x + w, y + Math.floor(1.25 * h));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if (px > cx)\n\t\t\t\t{\n\t\t\t\t\tif ((py > y + h / 4) && (py < y + 3 * h / 4))\n\t\t\t\t\t{\n\t\t\t\t\t\ta = new mxPoint(x + w, y);\n\t\t\t\t\t\tb = new mxPoint(x + w, y + h);\n\t\t\t\t\t}\n\t\t\t\t\telse if (py < y + h / 4)\n\t\t\t\t\t{\n\t\t\t\t\t\ta = new mxPoint(x, y - Math.floor(0.25 * h));\n\t\t\t\t\t\tb = new mxPoint(x + Math.floor(1.5 * w), y\n\t\t\t\t\t\t\t\t+ Math.floor(0.5 * h));\n\t\t\t\t\t}\n\t\t\t\t\telse if (py > y + 3 * h / 4)\n\t\t\t\t\t{\n\t\t\t\t\t\ta = new mxPoint(x + Math.floor(1.5 * w), y\n\t\t\t\t\t\t\t\t+ Math.floor(0.5 * h));\n\t\t\t\t\t\tb = new mxPoint(x, y + Math.floor(1.25 * h));\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t//Special cases where intersects with hexagon corners\n\t\t\t\tif (py == cy)\n\t\t\t\t{\n\t\t\t\t\tif (px <= x)\n\t\t\t\t\t{\n\t\t\t\t\t\treturn new mxPoint(x, y + h / 2);\n\t\t\t\t\t}\n\t\t\t\t\telse if (px >= x + w)\n\t\t\t\t\t{\n\t\t\t\t\t\treturn new mxPoint(x + w, y + h / 2);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if (py < y)\n\t\t\t\t{\n\t\t\t\t\tif (px == x + w / 4)\n\t\t\t\t\t{\n\t\t\t\t\t\treturn new mxPoint(x + w / 4, y);\n\t\t\t\t\t}\n\t\t\t\t\telse if (px == x + 3 * w / 4)\n\t\t\t\t\t{\n\t\t\t\t\t\treturn new mxPoint(x + 3 * w / 4, y);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if (py > y + h)\n\t\t\t\t{\n\t\t\t\t\tif (px == x + w / 4)\n\t\t\t\t\t{\n\t\t\t\t\t\treturn new mxPoint(x + w / 4, y + h);\n\t\t\t\t\t}\n\t\t\t\t\telse if (px == x + 3 * w / 4)\n\t\t\t\t\t{\n\t\t\t\t\t\treturn new mxPoint(x + 3 * w / 4, y + h);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if (py == y)\n\t\t\t\t{\n\t\t\t\t\tif (px < cx)\n\t\t\t\t\t{\n\t\t\t\t\t\treturn new mxPoint(x + w / 4, y);\n\t\t\t\t\t}\n\t\t\t\t\telse if (px > cx)\n\t\t\t\t\t{\n\t\t\t\t\t\treturn new mxPoint(x + 3 * w / 4, y);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if (py == y + h)\n\t\t\t\t{\n\t\t\t\t\tif (px < cx)\n\t\t\t\t\t{\n\t\t\t\t\t\treturn new mxPoint(x + w / 4, y + h);\n\t\t\t\t\t}\n\t\t\t\t\telse if (py > cy)\n\t\t\t\t\t{\n\t\t\t\t\t\treturn new mxPoint(x + 3 * w / 4, y + h);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (px == x)\n\t\t\t\t{\n\t\t\t\t\treturn new mxPoint(x, cy);\n\t\t\t\t}\n\t\t\t\telse if (px == x + w)\n\t\t\t\t{\n\t\t\t\t\treturn new mxPoint(x + w, cy);\n\t\t\t\t}\n\n\t\t\t\tif (py < cy)\n\t\t\t\t{\n\t\t\t\t\tif ((px > x + w / 4) && (px < x + 3 * w / 4))\n\t\t\t\t\t{\n\t\t\t\t\t\ta = new mxPoint(x, y);\n\t\t\t\t\t\tb = new mxPoint(x + w, y);\n\t\t\t\t\t}\n\t\t\t\t\telse if (px < x + w / 4)\n\t\t\t\t\t{\n\t\t\t\t\t\ta = new mxPoint(x - Math.floor(0.25 * w), y + h);\n\t\t\t\t\t\tb = new mxPoint(x + Math.floor(0.5 * w), y\n\t\t\t\t\t\t\t\t- Math.floor(0.5 * h));\n\t\t\t\t\t}\n\t\t\t\t\telse if (px > x + 3 * w / 4)\n\t\t\t\t\t{\n\t\t\t\t\t\ta = new mxPoint(x + Math.floor(0.5 * w), y\n\t\t\t\t\t\t\t\t- Math.floor(0.5 * h));\n\t\t\t\t\t\tb = new mxPoint(x + Math.floor(1.25 * w), y + h);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if (py > cy)\n\t\t\t\t{\n\t\t\t\t\tif ((px > x + w / 4) && (px < x + 3 * w / 4))\n\t\t\t\t\t{\n\t\t\t\t\t\ta = new mxPoint(x, y + h);\n\t\t\t\t\t\tb = new mxPoint(x + w, y + h);\n\t\t\t\t\t}\n\t\t\t\t\telse if (px < x + w / 4)\n\t\t\t\t\t{\n\t\t\t\t\t\ta = new mxPoint(x - Math.floor(0.25 * w), y);\n\t\t\t\t\t\tb = new mxPoint(x + Math.floor(0.5 * w), y\n\t\t\t\t\t\t\t\t+ Math.floor(1.5 * h));\n\t\t\t\t\t}\n\t\t\t\t\telse if (px > x + 3 * w / 4)\n\t\t\t\t\t{\n\t\t\t\t\t\ta = new mxPoint(x + Math.floor(0.5 * w), y\n\t\t\t\t\t\t\t\t+ Math.floor(1.5 * h));\n\t\t\t\t\t\tb = new mxPoint(x + Math.floor(1.25 * w), y);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tvar tx = cx;\n\t\t\tvar ty = cy;\n\n\t\t\tif (px >= x && px <= x + w)\n\t\t\t{\n\t\t\t\ttx = px;\n\t\t\t\t\n\t\t\t\tif (py < cy)\n\t\t\t\t{\n\t\t\t\t\tty = y + h;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tty = y;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if (py >= y && py <= y + h)\n\t\t\t{\n\t\t\t\tty = py;\n\t\t\t\t\n\t\t\t\tif (px < cx)\n\t\t\t\t{\n\t\t\t\t\ttx = x + w;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\ttx = x;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tresult = mxUtils.intersection(tx, ty, next.x, next.y, a.x, a.y, b.x, b.y);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif (vertical)\n\t\t\t{\n\t\t\t\tvar beta = Math.atan2(h / 4, w / 2);\n\n\t\t\t\t//Special cases where intersects with hexagon corners\n\t\t\t\tif (alpha == beta)\n\t\t\t\t{\n\t\t\t\t\treturn new mxPoint(x + w, y + Math.floor(0.25 * h));\n\t\t\t\t}\n\t\t\t\telse if (alpha == pi2)\n\t\t\t\t{\n\t\t\t\t\treturn new mxPoint(x + Math.floor(0.5 * w), y);\n\t\t\t\t}\n\t\t\t\telse if (alpha == (pi - beta))\n\t\t\t\t{\n\t\t\t\t\treturn new mxPoint(x, y + Math.floor(0.25 * h));\n\t\t\t\t}\n\t\t\t\telse if (alpha == -beta)\n\t\t\t\t{\n\t\t\t\t\treturn new mxPoint(x + w, y + Math.floor(0.75 * h));\n\t\t\t\t}\n\t\t\t\telse if (alpha == (-pi2))\n\t\t\t\t{\n\t\t\t\t\treturn new mxPoint(x + Math.floor(0.5 * w), y + h);\n\t\t\t\t}\n\t\t\t\telse if (alpha == (-pi + beta))\n\t\t\t\t{\n\t\t\t\t\treturn new mxPoint(x, y + Math.floor(0.75 * h));\n\t\t\t\t}\n\n\t\t\t\tif ((alpha < beta) && (alpha > -beta))\n\t\t\t\t{\n\t\t\t\t\ta = new mxPoint(x + w, y);\n\t\t\t\t\tb = new mxPoint(x + w, y + h);\n\t\t\t\t}\n\t\t\t\telse if ((alpha > beta) && (alpha < pi2))\n\t\t\t\t{\n\t\t\t\t\ta = new mxPoint(x, y - Math.floor(0.25 * h));\n\t\t\t\t\tb = new mxPoint(x + Math.floor(1.5 * w), y\n\t\t\t\t\t\t\t+ Math.floor(0.5 * h));\n\t\t\t\t}\n\t\t\t\telse if ((alpha > pi2) && (alpha < (pi - beta)))\n\t\t\t\t{\n\t\t\t\t\ta = new mxPoint(x - Math.floor(0.5 * w), y\n\t\t\t\t\t\t\t+ Math.floor(0.5 * h));\n\t\t\t\t\tb = new mxPoint(x + w, y - Math.floor(0.25 * h));\n\t\t\t\t}\n\t\t\t\telse if (((alpha > (pi - beta)) && (alpha <= pi))\n\t\t\t\t\t\t|| ((alpha < (-pi + beta)) && (alpha >= -pi)))\n\t\t\t\t{\n\t\t\t\t\ta = new mxPoint(x, y);\n\t\t\t\t\tb = new mxPoint(x, y + h);\n\t\t\t\t}\n\t\t\t\telse if ((alpha < -beta) && (alpha > -pi2))\n\t\t\t\t{\n\t\t\t\t\ta = new mxPoint(x + Math.floor(1.5 * w), y\n\t\t\t\t\t\t\t+ Math.floor(0.5 * h));\n\t\t\t\t\tb = new mxPoint(x, y + Math.floor(1.25 * h));\n\t\t\t\t}\n\t\t\t\telse if ((alpha < -pi2) && (alpha > (-pi + beta)))\n\t\t\t\t{\n\t\t\t\t\ta = new mxPoint(x - Math.floor(0.5 * w), y\n\t\t\t\t\t\t\t+ Math.floor(0.5 * h));\n\t\t\t\t\tb = new mxPoint(x + w, y + Math.floor(1.25 * h));\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tvar beta = Math.atan2(h / 2, w / 4);\n\n\t\t\t\t//Special cases where intersects with hexagon corners\n\t\t\t\tif (alpha == beta)\n\t\t\t\t{\n\t\t\t\t\treturn new mxPoint(x + Math.floor(0.75 * w), y);\n\t\t\t\t}\n\t\t\t\telse if (alpha == (pi - beta))\n\t\t\t\t{\n\t\t\t\t\treturn new mxPoint(x + Math.floor(0.25 * w), y);\n\t\t\t\t}\n\t\t\t\telse if ((alpha == pi) || (alpha == -pi))\n\t\t\t\t{\n\t\t\t\t\treturn new mxPoint(x, y + Math.floor(0.5 * h));\n\t\t\t\t}\n\t\t\t\telse if (alpha == 0)\n\t\t\t\t{\n\t\t\t\t\treturn new mxPoint(x + w, y + Math.floor(0.5 * h));\n\t\t\t\t}\n\t\t\t\telse if (alpha == -beta)\n\t\t\t\t{\n\t\t\t\t\treturn new mxPoint(x + Math.floor(0.75 * w), y + h);\n\t\t\t\t}\n\t\t\t\telse if (alpha == (-pi + beta))\n\t\t\t\t{\n\t\t\t\t\treturn new mxPoint(x + Math.floor(0.25 * w), y + h);\n\t\t\t\t}\n\n\t\t\t\tif ((alpha > 0) && (alpha < beta))\n\t\t\t\t{\n\t\t\t\t\ta = new mxPoint(x + Math.floor(0.5 * w), y\n\t\t\t\t\t\t\t- Math.floor(0.5 * h));\n\t\t\t\t\tb = new mxPoint(x + Math.floor(1.25 * w), y + h);\n\t\t\t\t}\n\t\t\t\telse if ((alpha > beta) && (alpha < (pi - beta)))\n\t\t\t\t{\n\t\t\t\t\ta = new mxPoint(x, y);\n\t\t\t\t\tb = new mxPoint(x + w, y);\n\t\t\t\t}\n\t\t\t\telse if ((alpha > (pi - beta)) && (alpha < pi))\n\t\t\t\t{\n\t\t\t\t\ta = new mxPoint(x - Math.floor(0.25 * w), y + h);\n\t\t\t\t\tb = new mxPoint(x + Math.floor(0.5 * w), y\n\t\t\t\t\t\t\t- Math.floor(0.5 * h));\n\t\t\t\t}\n\t\t\t\telse if ((alpha < 0) && (alpha > -beta))\n\t\t\t\t{\n\t\t\t\t\ta = new mxPoint(x + Math.floor(0.5 * w), y\n\t\t\t\t\t\t\t+ Math.floor(1.5 * h));\n\t\t\t\t\tb = new mxPoint(x + Math.floor(1.25 * w), y);\n\t\t\t\t}\n\t\t\t\telse if ((alpha < -beta) && (alpha > (-pi + beta)))\n\t\t\t\t{\n\t\t\t\t\ta = new mxPoint(x, y + h);\n\t\t\t\t\tb = new mxPoint(x + w, y + h);\n\t\t\t\t}\n\t\t\t\telse if ((alpha < (-pi + beta)) && (alpha > -pi))\n\t\t\t\t{\n\t\t\t\t\ta = new mxPoint(x - Math.floor(0.25 * w), y);\n\t\t\t\t\tb = new mxPoint(x + Math.floor(0.5 * w), y\n\t\t\t\t\t\t\t+ Math.floor(1.5 * h));\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tresult = mxUtils.intersection(cx, cy, next.x, next.y, a.x, a.y, b.x, b.y);\n\t\t}\n\t\t\n\t\tif (result == null)\n\t\t{\n\t\t\treturn new mxPoint(cx, cy);\n\t\t}\n\t\t\n\t\treturn result;\n\t}\n};\n"
  },
  {
    "path": "static/cherry/drawio_demo/src/js/view/mxPrintPreview.js",
    "content": "/**\n * Copyright (c) 2006-2017, JGraph Ltd\n * Copyright (c) 2006-2017, Gaudenz Alder\n */\n/**\n * Class: mxPrintPreview\n * \n * Implements printing of a diagram across multiple pages. The following opens\n * a print preview for an existing graph:\n * \n * (code)\n * var preview = new mxPrintPreview(graph);\n * preview.open();\n * (end)\n * \n * Use <mxUtils.getScaleForPageCount> as follows in order to print the graph\n * across a given number of pages:\n * \n * (code)\n * var pageCount = mxUtils.prompt('Enter page count', '1');\n * \n * if (pageCount != null)\n * {\n *   var scale = mxUtils.getScaleForPageCount(pageCount, graph);\n *   var preview = new mxPrintPreview(graph, scale);\n *   preview.open();\n * }\n * (end)\n * \n * Additional pages:\n * \n * To add additional pages before and after the output, <getCoverPages> and\n * <getAppendices> can be used, respectively.\n * \n * (code)\n * var preview = new mxPrintPreview(graph, 1);\n * \n * preview.getCoverPages = function(w, h)\n * {\n *   return [this.renderPage(w, h, 0, 0, mxUtils.bind(this, function(div)\n *   {\n *     div.innerHTML = '<div style=\"position:relative;margin:4px;\">Cover Page</p>'\n *   }))];\n * };\n * \n * preview.getAppendices = function(w, h)\n * {\n *   return [this.renderPage(w, h, 0, 0, mxUtils.bind(this, function(div)\n *   {\n *     div.innerHTML = '<div style=\"position:relative;margin:4px;\">Appendix</p>'\n *   }))];\n * };\n * \n * preview.open();\n * (end)\n * \n * CSS:\n * \n * The CSS from the original page is not carried over to the print preview.\n * To add CSS to the page, use the css argument in the <open> function or\n * override <writeHead> to add the respective link tags as follows:\n * \n * (code)\n * var writeHead = preview.writeHead;\n * preview.writeHead = function(doc, css)\n * {\n *   writeHead.apply(this, arguments);\n *   doc.writeln('<link rel=\"stylesheet\" type=\"text/css\" href=\"style.css\">');\n * };\n * (end)\n * \n * Padding:\n * \n * To add a padding to the page in the preview (but not the print output), use\n * the following code:\n * \n * (code)\n * preview.writeHead = function(doc)\n * {\n *   writeHead.apply(this, arguments);\n *   \n *   doc.writeln('<style type=\"text/css\">');\n *   doc.writeln('@media screen {');\n *   doc.writeln('  body > div { padding-top:30px;padding-left:40px;box-sizing:content-box; }');\n *   doc.writeln('}');\n *   doc.writeln('</style>');\n * };\n * (end)\n * \n * Headers:\n * \n * Apart from setting the title argument in the mxPrintPreview constructor you\n * can override <renderPage> as follows to add a header to any page:\n * \n * (code)\n * var oldRenderPage = mxPrintPreview.prototype.renderPage;\n * mxPrintPreview.prototype.renderPage = function(w, h, x, y, content, pageNumber)\n * {\n *   var div = oldRenderPage.apply(this, arguments);\n *   \n *   var header = document.createElement('div');\n *   header.style.position = 'absolute';\n *   header.style.top = '0px';\n *   header.style.width = '100%';\n *   header.style.textAlign = 'right';\n *   mxUtils.write(header, 'Your header here');\n *   div.firstChild.appendChild(header);\n *   \n *   return div;\n * };\n * (end)\n * \n * The pageNumber argument contains the number of the current page, starting at\n * 1. To display a header on the first page only, check pageNumber and add a\n * vertical offset in the constructor call for the height of the header.\n * \n * Page Format:\n * \n * For landscape printing, use <mxConstants.PAGE_FORMAT_A4_LANDSCAPE> as\n * the pageFormat in <mxUtils.getScaleForPageCount> and <mxPrintPreview>.\n * Keep in mind that one can not set the defaults for the print dialog\n * of the operating system from JavaScript so the user must manually choose\n * a page format that matches this setting.\n * \n * You can try passing the following CSS directive to <open> to set the\n * page format in the print dialog to landscape. However, this CSS\n * directive seems to be ignored in most major browsers, including IE.\n * \n * (code)\n * @page {\n *   size: landscape;\n * }\n * (end)\n * \n * Note that the print preview behaves differently in IE when used from the\n * filesystem or via HTTP so printing should always be tested via HTTP.\n * \n * If you are using a DOCTYPE in the source page you can override <getDoctype>\n * and provide the same DOCTYPE for the print preview if required. Here is\n * an example for IE8 standards mode.\n * \n * (code)\n * var preview = new mxPrintPreview(graph);\n * preview.getDoctype = function()\n * {\n *   return '<!--[if IE]><meta http-equiv=\"X-UA-Compatible\" content=\"IE=5,IE=8\" ><![endif]-->';\n * };\n * preview.open();\n * (end)\n * \n * Constructor: mxPrintPreview\n *\n * Constructs a new print preview for the given parameters.\n * \n * Parameters:\n * \n * graph - <mxGraph> to be previewed.\n * scale - Optional scale of the output. Default is 1 / <mxGraph.pageScale>.\n * border - Border in pixels along each side of every page. Note that the\n * actual print function in the browser will add another border for\n * printing.\n * pageFormat - <mxRectangle> that specifies the page format (in pixels).\n * This should match the page format of the printer. Default uses the\n * <mxGraph.pageFormat> of the given graph.\n * x0 - Optional left offset of the output. Default is 0.\n * y0 - Optional top offset of the output. Default is 0.\n * borderColor - Optional color of the page border. Default is no border.\n * Note that a border is sometimes useful to highlight the printed page\n * border in the print preview of the browser.\n * title - Optional string that is used for the window title. Default\n * is 'Printer-friendly version'.\n * pageSelector - Optional boolean that specifies if the page selector\n * should appear in the window with the print preview. Default is true.\n */\nfunction mxPrintPreview(graph, scale, pageFormat, border, x0, y0, borderColor, title, pageSelector)\n{\n\tthis.graph = graph;\n\tthis.scale = (scale != null) ? scale : 1 / graph.pageScale;\n\tthis.border = (border != null) ? border : 0;\n\tthis.pageFormat = mxRectangle.fromRectangle((pageFormat != null) ? pageFormat : graph.pageFormat);\n\tthis.title = (title != null) ? title : 'Printer-friendly version';\n\tthis.x0 = (x0 != null) ? x0 : 0;\n\tthis.y0 = (y0 != null) ? y0 : 0;\n\tthis.borderColor = borderColor;\n\tthis.pageSelector = (pageSelector != null) ? pageSelector : true;\n};\n\n/**\n * Variable: graph\n * \n * Reference to the <mxGraph> that should be previewed.\n */\nmxPrintPreview.prototype.graph = null;\n\n/**\n * Variable: pageFormat\n *\n * Holds the <mxRectangle> that defines the page format.\n */\nmxPrintPreview.prototype.pageFormat = null;\n\n/**\n * Variable: scale\n * \n * Holds the scale of the print preview.\n */\nmxPrintPreview.prototype.scale = null;\n\n/**\n * Variable: border\n * \n * The border inset around each side of every page in the preview. This is set\n * to 0 if autoOrigin is false.\n */\nmxPrintPreview.prototype.border = 0;\n\n/**\n * Variable: marginTop\n * \n * The margin at the top of the page (number). Default is 0.\n */\nmxPrintPreview.prototype.marginTop = 0;\n\n/**\n * Variable: marginBottom\n * \n * The margin at the bottom of the page (number). Default is 0.\n */\nmxPrintPreview.prototype.marginBottom = 0;\n\n/**\n * Variable: x0\n * \n * Holds the horizontal offset of the output.\n */\nmxPrintPreview.prototype.x0 = 0;\n\n/**\n * Variable: y0\n *\n * Holds the vertical offset of the output.\n */\nmxPrintPreview.prototype.y0 = 0;\n\n/**\n * Variable: autoOrigin\n * \n * Specifies if the origin should be automatically computed based on the top,\n * left corner of the actual diagram contents. The required offset will be added\n * to <x0> and <y0> in <open>. Default is true.\n */\nmxPrintPreview.prototype.autoOrigin = true;\n\n/**\n * Variable: printOverlays\n * \n * Specifies if overlays should be printed. Default is false.\n */\nmxPrintPreview.prototype.printOverlays = false;\n\n/**\n * Variable: printControls\n * \n * Specifies if controls (such as folding icons) should be printed. Default is\n * false.\n */\nmxPrintPreview.prototype.printControls = false;\n\n/**\n * Variable: printBackgroundImage\n * \n * Specifies if the background image should be printed. Default is false.\n */\nmxPrintPreview.prototype.printBackgroundImage = false;\n\n/**\n * Variable: backgroundColor\n * \n * Holds the color value for the page background color. Default is #ffffff.\n */\nmxPrintPreview.prototype.backgroundColor = '#ffffff';\n\n/**\n * Variable: borderColor\n * \n * Holds the color value for the page border.\n */\nmxPrintPreview.prototype.borderColor = null;\n\n/**\n * Variable: title\n * \n * Holds the title of the preview window.\n */\nmxPrintPreview.prototype.title = null;\n\n/**\n * Variable: pageSelector\n * \n * Boolean that specifies if the page selector should be\n * displayed. Default is true.\n */\nmxPrintPreview.prototype.pageSelector = null;\n\n/**\n * Variable: wnd\n * \n * Reference to the preview window.\n */\nmxPrintPreview.prototype.wnd = null;\n\n/**\n * Variable: targetWindow\n * \n * Assign any window here to redirect the rendering in <open>.\n */\nmxPrintPreview.prototype.targetWindow = null;\n\n/**\n * Variable: pageCount\n * \n * Holds the actual number of pages in the preview.\n */\nmxPrintPreview.prototype.pageCount = 0;\n\n/**\n * Variable: clipping\n * \n * Specifies is clipping should be used to avoid creating too many cell states\n * in large diagrams. The bounding box of the cells in the original diagram is\n * used if this is enabled. Default is true.\n */\nmxPrintPreview.prototype.clipping = true;\n\n/**\n * Function: getWindow\n * \n * Returns <wnd>.\n */\nmxPrintPreview.prototype.getWindow = function()\n{\n\treturn this.wnd;\n};\n\n/**\n * Function: getDocType\n * \n * Returns the string that should go before the HTML tag in the print preview\n * page. This implementation returns an X-UA meta tag for IE5 in quirks mode,\n * IE8 in IE8 standards mode and edge in IE9 standards mode.\n */\nmxPrintPreview.prototype.getDoctype = function()\n{\n\tvar dt = '';\n\t\n\tif (document.documentMode == 5)\n\t{\n\t\tdt = '<meta http-equiv=\"X-UA-Compatible\" content=\"IE=5\">';\n\t}\n\telse if (document.documentMode == 8)\n\t{\n\t\tdt = '<meta http-equiv=\"X-UA-Compatible\" content=\"IE=8\">';\n\t}\n\telse if (document.documentMode > 8)\n\t{\n\t\t// Comment needed to make standards doctype apply in IE\n\t\tdt = '<!--[if IE]><meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\"><![endif]-->';\n\t}\n\t\n\treturn dt;\n};\n\n/**\n * Function: appendGraph\n * \n * Adds the given graph to the existing print preview.\n * \n * Parameters:\n * \n * css - Optional CSS string to be used in the head section.\n * targetWindow - Optional window that should be used for rendering. If\n * this is specified then no HEAD tag, CSS and BODY tag will be written.\n */\nmxPrintPreview.prototype.appendGraph = function(graph, scale, x0, y0, forcePageBreaks, keepOpen)\n{\n\tthis.graph = graph;\n\tthis.scale = (scale != null) ? scale : 1 / graph.pageScale;\n\tthis.x0 = x0;\n\tthis.y0 = y0;\n\tthis.open(null, null, forcePageBreaks, keepOpen);\n};\n\n/**\n * Function: open\n * \n * Shows the print preview window. The window is created here if it does\n * not exist.\n * \n * Parameters:\n * \n * css - Optional CSS string to be used in the head section.\n * targetWindow - Optional window that should be used for rendering. If\n * this is specified then no HEAD tag, CSS and BODY tag will be written.\n */\nmxPrintPreview.prototype.open = function(css, targetWindow, forcePageBreaks, keepOpen)\n{\n\t// Closing the window while the page is being rendered may cause an\n\t// exception in IE. This and any other exceptions are simply ignored.\n\tvar previousInitializeOverlay = this.graph.cellRenderer.initializeOverlay;\n\tvar div = null;\n\t\n\ttry\n\t{\n\t\t// Temporarily overrides the method to redirect rendering of overlays\n\t\t// to the draw pane so that they are visible in the printout\n\t\tif (this.printOverlays)\n\t\t{\n\t\t\tthis.graph.cellRenderer.initializeOverlay = function(state, overlay)\n\t\t\t{\n\t\t\t\toverlay.init(state.view.getDrawPane());\n\t\t\t};\n\t\t}\n\t\t\n\t\tif (this.printControls)\n\t\t{\n\t\t\tthis.graph.cellRenderer.initControl = function(state, control, handleEvents, clickHandler)\n\t\t\t{\n\t\t\t\tcontrol.dialect = state.view.graph.dialect;\n\t\t\t\tcontrol.init(state.view.getDrawPane());\n\t\t\t};\n\t\t}\n\t\t\n\t\tthis.wnd = (targetWindow != null) ? targetWindow : this.wnd;\n\t\tvar isNewWindow = false;\n\t\t\n\t\tif (this.wnd == null)\n\t\t{\n\t\t\tisNewWindow = true;\n\t\t\tthis.wnd = window.open();\n\t\t}\n\t\t\n\t\tvar doc = this.wnd.document;\n\t\t\n\t\tif (isNewWindow)\n\t\t{\n\t\t\tvar dt = this.getDoctype();\n\t\t\t\n\t\t\tif (dt != null && dt.length > 0)\n\t\t\t{\n\t\t\t\tdoc.writeln(dt);\n\t\t\t}\n\t\t\t\n\t\t\tif (mxClient.IS_VML)\n\t\t\t{\n\t\t\t\tdoc.writeln('<html xmlns:v=\"urn:schemas-microsoft-com:vml\" xmlns:o=\"urn:schemas-microsoft-com:office:office\">');\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif (document.compatMode === 'CSS1Compat')\n\t\t\t\t{\n\t\t\t\t\tdoc.writeln('<!DOCTYPE html>');\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tdoc.writeln('<html>');\n\t\t\t}\n\t\t\t\n\t\t\tdoc.writeln('<head>');\n\t\t\tthis.writeHead(doc, css);\n\t\t\tdoc.writeln('</head>');\n\t\t\tdoc.writeln('<body class=\"mxPage\">');\n\t\t}\n\n\t\t// Computes the horizontal and vertical page count\n\t\tvar bounds = this.graph.getGraphBounds().clone();\n\t\tvar currentScale = this.graph.getView().getScale();\n\t\tvar sc = currentScale / this.scale;\n\t\tvar tr = this.graph.getView().getTranslate();\n\t\t\n\t\t// Uses the absolute origin with no offset for all printing\n\t\tif (!this.autoOrigin)\n\t\t{\n\t\t\tthis.x0 -= tr.x * this.scale;\n\t\t\tthis.y0 -= tr.y * this.scale;\n\t\t\tbounds.width += bounds.x;\n\t\t\tbounds.height += bounds.y;\n\t\t\tbounds.x = 0;\n\t\t\tbounds.y = 0;\n\t\t\tthis.border = 0;\n\t\t}\n\t\t\n\t\t// Store the available page area\n\t\tvar availableWidth = this.pageFormat.width - (this.border * 2);\n\t\tvar availableHeight = this.pageFormat.height - (this.border * 2);\n\t\n\t\t// Adds margins to page format\n\t\tthis.pageFormat.height += this.marginTop + this.marginBottom;\n\n\t\t// Compute the unscaled, untranslated bounds to find\n\t\t// the number of vertical and horizontal pages\n\t\tbounds.width /= sc;\n\t\tbounds.height /= sc;\n\n\t\tvar hpages = Math.max(1, Math.ceil((bounds.width + this.x0) / availableWidth));\n\t\tvar vpages = Math.max(1, Math.ceil((bounds.height + this.y0) / availableHeight));\n\t\tthis.pageCount = hpages * vpages;\n\t\t\n\t\tvar writePageSelector = mxUtils.bind(this, function()\n\t\t{\n\t\t\tif (this.pageSelector && (vpages > 1 || hpages > 1))\n\t\t\t{\n\t\t\t\tvar table = this.createPageSelector(vpages, hpages);\n\t\t\t\tdoc.body.appendChild(table);\n\t\t\t\t\n\t\t\t\t// Implements position: fixed in IE quirks mode\n\t\t\t\tif (mxClient.IS_IE && doc.documentMode == null || doc.documentMode == 5 || doc.documentMode == 8 || doc.documentMode == 7)\n\t\t\t\t{\n\t\t\t\t\ttable.style.position = 'absolute';\n\t\t\t\t\t\n\t\t\t\t\tvar update = function()\n\t\t\t\t\t{\n\t\t\t\t\t\ttable.style.top = ((doc.body.scrollTop || doc.documentElement.scrollTop) + 10) + 'px';\n\t\t\t\t\t};\n\t\t\t\t\t\n\t\t\t\t\tmxEvent.addListener(this.wnd, 'scroll', function(evt)\n\t\t\t\t\t{\n\t\t\t\t\t\tupdate();\n\t\t\t\t\t});\n\t\t\t\t\t\n\t\t\t\t\tmxEvent.addListener(this.wnd, 'resize', function(evt)\n\t\t\t\t\t{\n\t\t\t\t\t\tupdate();\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\t\n\t\tvar addPage = mxUtils.bind(this, function(div, addBreak)\n\t\t{\n\t\t\t// Border of the DIV (aka page) inside the document\n\t\t\tif (this.borderColor != null)\n\t\t\t{\n\t\t\t\tdiv.style.borderColor = this.borderColor;\n\t\t\t\tdiv.style.borderStyle = 'solid';\n\t\t\t\tdiv.style.borderWidth = '1px';\n\t\t\t}\n\t\t\t\n\t\t\t// Needs to be assigned directly because IE doesn't support\n\t\t\t// child selectors, eg. body > div { background: white; }\n\t\t\tdiv.style.background = this.backgroundColor;\n\t\t\t\n\t\t\tif (forcePageBreaks || addBreak)\n\t\t\t{\n\t\t\t\tdiv.style.pageBreakAfter = 'always';\n\t\t\t}\n\n\t\t\t// NOTE: We are dealing with cross-window DOM here, which\n\t\t\t// is a problem in IE, so we copy the HTML markup instead.\n\t\t\t// The underlying problem is that the graph display markup\n\t\t\t// creation (in mxShape, mxGraphView) is hardwired to using\n\t\t\t// document.createElement and hence we must use this document\n\t\t\t// to create the complete page and then copy it over to the\n\t\t\t// new window.document. This can be fixed later by using the\n\t\t\t// ownerDocument of the container in mxShape and mxGraphView.\n\t\t\tif (isNewWindow && (mxClient.IS_IE || document.documentMode >= 11 || mxClient.IS_EDGE))\n\t\t\t{\n\t\t\t\t// For some obscure reason, removing the DIV from the\n\t\t\t\t// parent before fetching its outerHTML has missing\n\t\t\t\t// fillcolor properties and fill children, so the div\n\t\t\t\t// must be removed afterwards to keep the fillcolors.\n\t\t\t\tdoc.writeln(div.outerHTML);\n\t\t\t\tdiv.parentNode.removeChild(div);\n\t\t\t}\n\t\t\telse if (mxClient.IS_IE || document.documentMode >= 11 || mxClient.IS_EDGE)\n\t\t\t{\n\t\t\t\tvar clone = doc.createElement('div');\n\t\t\t\tclone.innerHTML = div.outerHTML;\n\t\t\t\tclone = clone.getElementsByTagName('div')[0];\n\t\t\t\tdoc.body.appendChild(clone);\n\t\t\t\tdiv.parentNode.removeChild(div);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tdiv.parentNode.removeChild(div);\n\t\t\t\tdoc.body.appendChild(div);\n\t\t\t}\n\n\t\t\tif (forcePageBreaks || addBreak)\n\t\t\t{\n\t\t\t\tthis.addPageBreak(doc);\n\t\t\t}\n\t\t});\n\t\t\n\t\tvar cov = this.getCoverPages(this.pageFormat.width, this.pageFormat.height);\n\t\t\n\t\tif (cov != null)\n\t\t{\n\t\t\tfor (var i = 0; i < cov.length; i++)\n\t\t\t{\n\t\t\t\taddPage(cov[i], true);\n\t\t\t}\n\t\t}\n\t\t\n\t\tvar apx = this.getAppendices(this.pageFormat.width, this.pageFormat.height);\n\t\t\n\t\t// Appends each page to the page output for printing, making\n\t\t// sure there will be a page break after each page (ie. div)\n\t\tfor (var i = 0; i < vpages; i++)\n\t\t{\n\t\t\tvar dy = i * availableHeight / this.scale - this.y0 / this.scale +\n\t\t\t\t\t(bounds.y - tr.y * currentScale) / currentScale;\n\t\t\t\n\t\t\tfor (var j = 0; j < hpages; j++)\n\t\t\t{\n\t\t\t\tif (this.wnd == null)\n\t\t\t\t{\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tvar dx = j * availableWidth / this.scale - this.x0 / this.scale +\n\t\t\t\t\t\t(bounds.x - tr.x * currentScale) / currentScale;\n\t\t\t\tvar pageNum = i * hpages + j + 1;\n\t\t\t\tvar clip = new mxRectangle(dx, dy, availableWidth, availableHeight);\n\t\t\t\tdiv = this.renderPage(this.pageFormat.width, this.pageFormat.height, 0, 0, mxUtils.bind(this, function(div)\n\t\t\t\t{\n\t\t\t\t\tthis.addGraphFragment(-dx, -dy, this.scale, pageNum, div, clip);\n\t\t\t\t\t\n\t\t\t\t\tif (this.printBackgroundImage)\n\t\t\t\t\t{\n\t\t\t\t\t\tthis.insertBackgroundImage(div, -dx, -dy);\n\t\t\t\t\t}\n\t\t\t\t}), pageNum);\n\n\t\t\t\t// Gives the page a unique ID for later accessing the page\n\t\t\t\tdiv.setAttribute('id', 'mxPage-'+pageNum);\n\n\t\t\t\taddPage(div, apx != null || i < vpages - 1 || j < hpages - 1);\n\t\t\t}\n\t\t}\n\n\t\tif (apx != null)\n\t\t{\n\t\t\tfor (var i = 0; i < apx.length; i++)\n\t\t\t{\n\t\t\t\taddPage(apx[i], i < apx.length - 1);\n\t\t\t}\n\t\t}\n\n\t\tif (isNewWindow && !keepOpen)\n\t\t{\n\t\t\tthis.closeDocument();\n\t\t\twritePageSelector();\n\t\t}\n\t\t\n\t\tthis.wnd.focus();\n\t}\n\tcatch (e)\n\t{\n\t\t// Removes the DIV from the document in case of an error\n\t\tif (div != null && div.parentNode != null)\n\t\t{\n\t\t\tdiv.parentNode.removeChild(div);\n\t\t}\n\t}\n\tfinally\n\t{\n\t\tthis.graph.cellRenderer.initializeOverlay = previousInitializeOverlay;\n\t}\n\n\treturn this.wnd;\n};\n\n/**\n * Function: addPageBreak\n * \n * Adds a page break to the given document.\n */\nmxPrintPreview.prototype.addPageBreak = function(doc)\n{\n\tvar hr = doc.createElement('hr');\n\thr.className = 'mxPageBreak';\n\tdoc.body.appendChild(hr);\n};\n\n/**\n * Function: closeDocument\n * \n * Writes the closing tags for body and page after calling <writePostfix>.\n */\nmxPrintPreview.prototype.closeDocument = function()\n{\n\ttry\n\t{\n\t\tif (this.wnd != null && this.wnd.document != null)\n\t\t{\n\t\t\tvar doc = this.wnd.document;\n\t\t\t\n\t\t\tthis.writePostfix(doc);\n\t\t\tdoc.writeln('</body>');\n\t\t\tdoc.writeln('</html>');\n\t\t\tdoc.close();\n\t\t\t\n\t\t\t// Removes all event handlers in the print output\n\t\t\tmxEvent.release(doc.body);\n\t\t}\n\t}\n\tcatch (e)\n\t{\n\t\t// ignore any errors resulting from wnd no longer being available\n\t}\n};\n\n/**\n * Function: writeHead\n * \n * Writes the HEAD section into the given document, without the opening\n * and closing HEAD tags.\n */\nmxPrintPreview.prototype.writeHead = function(doc, css)\n{\n\tif (this.title != null)\n\t{\n\t\tdoc.writeln('<title>' + this.title + '</title>');\n\t}\n\t\n\t// Adds required namespaces\n\tif (mxClient.IS_VML)\n\t{\n\t\tdoc.writeln('<style type=\"text/css\">v\\\\:*{behavior:url(#default#VML)}o\\\\:*{behavior:url(#default#VML)}</style>');\n\t}\n\n\t// Adds all required stylesheets\n\tmxClient.link('stylesheet', mxClient.basePath + '/css/common.css', doc);\n\n\t// Removes horizontal rules and page selector from print output\n\tdoc.writeln('<style type=\"text/css\">');\n\tdoc.writeln('@media print {');\n\tdoc.writeln('  * { -webkit-print-color-adjust: exact; }');\n\tdoc.writeln('  table.mxPageSelector { display: none; }');\n\tdoc.writeln('  hr.mxPageBreak { display: none; }');\n\tdoc.writeln('}');\n\tdoc.writeln('@media screen {');\n\t\n\t// NOTE: position: fixed is not supported in IE, so the page selector\n\t// position (absolute) needs to be updated in IE (see below)\n\tdoc.writeln('  table.mxPageSelector { position: fixed; right: 10px; top: 10px;' +\n\t\t\t'font-family: Arial; font-size:10pt; border: solid 1px darkgray;' +\n\t\t\t'background: white; border-collapse:collapse; }');\n\tdoc.writeln('  table.mxPageSelector td { border: solid 1px gray; padding:4px; }');\n\tdoc.writeln('  body.mxPage { background: gray; }');\n\tdoc.writeln('}');\n\t\n\tif (css != null)\n\t{\n\t\tdoc.writeln(css);\n\t}\n\t\n\tdoc.writeln('</style>');\n};\n\n/**\n * Function: writePostfix\n * \n * Called before closing the body of the page. This implementation is empty.\n */\nmxPrintPreview.prototype.writePostfix = function(doc)\n{\n\t// empty\n};\n\n/**\n * Function: createPageSelector\n * \n * Creates the page selector table.\n */\nmxPrintPreview.prototype.createPageSelector = function(vpages, hpages)\n{\n\tvar doc = this.wnd.document;\n\tvar table = doc.createElement('table');\n\ttable.className = 'mxPageSelector';\n\ttable.setAttribute('border', '0');\n\n\tvar tbody = doc.createElement('tbody');\n\t\n\tfor (var i = 0; i < vpages; i++)\n\t{\n\t\tvar row = doc.createElement('tr');\n\t\t\n\t\tfor (var j = 0; j < hpages; j++)\n\t\t{\n\t\t\tvar pageNum = i * hpages + j + 1;\n\t\t\tvar cell = doc.createElement('td');\n\t\t\tvar a = doc.createElement('a');\n\t\t\ta.setAttribute('href', '#mxPage-' + pageNum);\n\n\t\t\t// Workaround for FF where the anchor is appended to the URL of the original document\n\t\t\tif (mxClient.IS_NS && !mxClient.IS_SF && !mxClient.IS_GC)\n\t\t\t{\n\t\t\t\tvar js = 'var page = document.getElementById(\\'mxPage-' + pageNum + '\\');page.scrollIntoView(true);event.preventDefault();';\n\t\t\t\ta.setAttribute('onclick', js);\n\t\t\t}\n\t\t\t\n\t\t\tmxUtils.write(a, pageNum, doc);\n\t\t\tcell.appendChild(a);\n\t\t\trow.appendChild(cell);\n\t\t}\n\t\t\n\t\ttbody.appendChild(row);\n\t}\n\t\n\ttable.appendChild(tbody);\n\t\n\treturn table;\n};\n\n/**\n * Function: renderPage\n * \n * Creates a DIV that prints a single page of the given\n * graph using the given scale and returns the DIV that\n * represents the page.\n * \n * Parameters:\n * \n * w - Width of the page in pixels.\n * h - Height of the page in pixels.\n * dx - Optional horizontal page offset in pixels (used internally).\n * dy - Optional vertical page offset in pixels (used internally).\n * content - Callback that adds the HTML content to the inner div of a page.\n * Takes the inner div as the argument.\n * pageNumber - Integer representing the page number.\n */\nmxPrintPreview.prototype.renderPage = function(w, h, dx, dy, content, pageNumber)\n{\n\tvar doc = this.wnd.document;\n\tvar div = document.createElement('div');\n\tvar arg = null;\n\n\ttry\n\t{\n\t\t// Workaround for ignored clipping in IE 9 standards\n\t\t// when printing with page breaks and HTML labels.\n\t\tif (dx != 0 || dy != 0)\n\t\t{\n\t\t\tdiv.style.position = 'relative';\n\t\t\tdiv.style.width = w + 'px';\n\t\t\tdiv.style.height = h + 'px';\n\t\t\tdiv.style.pageBreakInside = 'avoid';\n\t\t\t\n\t\t\tvar innerDiv = document.createElement('div');\n\t\t\tinnerDiv.style.position = 'relative';\n\t\t\tinnerDiv.style.top = this.border + 'px';\n\t\t\tinnerDiv.style.left = this.border + 'px';\n\t\t\tinnerDiv.style.width = (w - 2 * this.border) + 'px';\n\t\t\tinnerDiv.style.height = (h - 2 * this.border) + 'px';\n\t\t\tinnerDiv.style.overflow = 'hidden';\n\t\t\t\n\t\t\tvar viewport = document.createElement('div');\n\t\t\tviewport.style.position = 'relative';\n\t\t\tviewport.style.marginLeft = dx + 'px';\n\t\t\tviewport.style.marginTop = dy + 'px';\n\n\t\t\t// FIXME: IE8 standards output problems\n\t\t\tif (doc.documentMode == 8)\n\t\t\t{\n\t\t\t\tinnerDiv.style.position = 'absolute';\n\t\t\t\tviewport.style.position = 'absolute';\n\t\t\t}\n\t\t\n\t\t\tif (doc.documentMode == 10)\n\t\t\t{\n\t\t\t\tviewport.style.width = '100%';\n\t\t\t\tviewport.style.height = '100%';\n\t\t\t}\n\t\t\t\n\t\t\tinnerDiv.appendChild(viewport);\n\t\t\tdiv.appendChild(innerDiv);\n\t\t\tdocument.body.appendChild(div);\n\t\t\targ = viewport;\n\t\t}\n\t\t// FIXME: IE10/11 too many pages\n\t\telse\n\t\t{\n\t\t\tdiv.style.width = w + 'px';\n\t\t\tdiv.style.height = h + 'px';\n\t\t\tdiv.style.overflow = 'hidden';\n\t\t\tdiv.style.pageBreakInside = 'avoid';\n\t\t\t\n\t\t\t// IE8 uses above branch currently\n\t\t\tif (doc.documentMode == 8)\n\t\t\t{\n\t\t\t\tdiv.style.position = 'relative';\n\t\t\t}\n\t\t\t\n\t\t\tvar innerDiv = document.createElement('div');\n\t\t\tinnerDiv.style.width = (w - 2 * this.border) + 'px';\n\t\t\tinnerDiv.style.height = (h - 2 * this.border) + 'px';\n\t\t\tinnerDiv.style.overflow = 'hidden';\n\n\t\t\tif (mxClient.IS_IE && (doc.documentMode == null || doc.documentMode == 5 || doc.documentMode == 8 || doc.documentMode == 7))\n\t\t\t{\n\t\t\t\tinnerDiv.style.marginTop = this.border + 'px';\n\t\t\t\tinnerDiv.style.marginLeft = this.border + 'px';\t\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tinnerDiv.style.top = this.border + 'px';\n\t\t\t\tinnerDiv.style.left = this.border + 'px';\n\t\t\t}\n\t\n\t\t\tif (this.graph.dialect == mxConstants.DIALECT_VML)\n\t\t\t{\n\t\t\t\tinnerDiv.style.position = 'absolute';\n\t\t\t}\n\n\t\t\tdiv.appendChild(innerDiv);\n\t\t\tdocument.body.appendChild(div);\n\t\t\targ = innerDiv;\n\t\t}\n\t}\n\tcatch (e)\n\t{\n\t\tdiv.parentNode.removeChild(div);\n\t\tdiv = null;\n\t\t\n\t\tthrow e;\n\t}\n\n\tcontent(arg);\n\t \n\treturn div;\n};\n\n/**\n * Function: getRoot\n * \n * Returns the root cell for painting the graph.\n */\nmxPrintPreview.prototype.getRoot = function()\n{\n\tvar root = this.graph.view.currentRoot;\n\t\n\tif (root == null)\n\t{\n\t\troot = this.graph.getModel().getRoot();\n\t}\n\t\n\treturn root;\n};\n\n/**\n * Function: addGraphFragment\n * \n * Adds a graph fragment to the given div.\n * \n * Parameters:\n * \n * dx - Horizontal translation for the diagram.\n * dy - Vertical translation for the diagram.\n * scale - Scale for the diagram.\n * pageNumber - Number of the page to be rendered.\n * div - Div that contains the output.\n * clip - Contains the clipping rectangle as an <mxRectangle>.\n */\nmxPrintPreview.prototype.addGraphFragment = function(dx, dy, scale, pageNumber, div, clip)\n{\n\tvar view = this.graph.getView();\n\tvar previousContainer = this.graph.container;\n\tthis.graph.container = div;\n\t\n\tvar canvas = view.getCanvas();\n\tvar backgroundPane = view.getBackgroundPane();\n\tvar drawPane = view.getDrawPane();\n\tvar overlayPane = view.getOverlayPane();\n\n\tif (this.graph.dialect == mxConstants.DIALECT_SVG)\n\t{\n\t\tview.createSvg();\n\t\t\n\t\t// Uses CSS transform for scaling\n\t\tif (!mxClient.NO_FO)\n\t\t{\n\t\t\tvar g = view.getDrawPane().parentNode;\n\t\t\tvar prev = g.getAttribute('transform');\n\t\t\tg.setAttribute('transformOrigin', '0 0');\n\t\t\tg.setAttribute('transform', 'scale(' + scale + ',' + scale + ')' +\n\t\t\t\t'translate(' + dx + ',' + dy + ')');\n\t\t\t\n\t\t\tscale = 1;\n\t\t\tdx = 0;\n\t\t\tdy = 0;\n\t\t}\n\t}\n\telse if (this.graph.dialect == mxConstants.DIALECT_VML)\n\t{\n\t\tview.createVml();\n\t}\n\telse\n\t{\n\t\tview.createHtml();\n\t}\n\t\n\t// Disables events on the view\n\tvar eventsEnabled = view.isEventsEnabled();\n\tview.setEventsEnabled(false);\n\t\n\t// Disables the graph to avoid cursors\n\tvar graphEnabled = this.graph.isEnabled();\n\tthis.graph.setEnabled(false);\n\n\t// Resets the translation\n\tvar translate = view.getTranslate();\n\tview.translate = new mxPoint(dx, dy);\n\t\n\t// Redraws only states that intersect the clip\n\tvar redraw = this.graph.cellRenderer.redraw;\n\tvar states = view.states;\n\tvar s = view.scale;\n\n\t// Gets the transformed clip for intersection check below\n\tif (this.clipping)\n\t{\n\t\tvar tempClip = new mxRectangle((clip.x + translate.x) * s, (clip.y + translate.y) * s,\n\t\t\t\tclip.width * s / scale, clip.height * s / scale);\n\t\t\n\t\t// Checks clipping rectangle for speedup\n\t\t// Must create terminal states for edge clipping even if terminal outside of clip\n\t\tthis.graph.cellRenderer.redraw = function(state, force, rendering)\n\t\t{\n\t\t\tif (state != null)\n\t\t\t{\n\t\t\t\t// Gets original state from graph to find bounding box\n\t\t\t\tvar orig = states.get(state.cell);\n\t\t\t\t\n\t\t\t\tif (orig != null)\n\t\t\t\t{\n\t\t\t\t\tvar bbox = view.getBoundingBox(orig, false);\n\t\t\t\t\t\n\t\t\t\t\t// Stops rendering if outside clip for speedup\n\t\t\t\t\tif (bbox != null && !mxUtils.intersects(tempClip, bbox))\n\t\t\t\t\t{\n\t\t\t\t\t\t//return;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tredraw.apply(this, arguments);\n\t\t};\n\t}\n\t\n\tvar temp = null;\n\t\n\ttry\n\t{\n\t\t// Creates the temporary cell states in the view and\n\t\t// draws them onto the temporary DOM nodes in the view\n\t\tvar cells = [this.getRoot()];\n\t\ttemp = new mxTemporaryCellStates(view, scale, cells, null, mxUtils.bind(this, function(state)\n\t\t{\n\t\t\treturn this.getLinkForCellState(state);\n\t\t}));\n\t}\n\tfinally\n\t{\n\t\t// Removes overlay pane with selection handles\n\t\t// controls and icons from the print output\n\t\tif (mxClient.IS_IE)\n\t\t{\n\t\t\tview.overlayPane.innerHTML = '';\n\t\t\tview.canvas.style.overflow = 'hidden';\n\t\t\tview.canvas.style.position = 'relative';\n\t\t\tview.canvas.style.top = this.marginTop + 'px';\n\t\t\tview.canvas.style.width = clip.width + 'px';\n\t\t\tview.canvas.style.height = clip.height + 'px';\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Removes everything but the SVG node\n\t\t\tvar tmp = div.firstChild;\n\n\t\t\twhile (tmp != null)\n\t\t\t{\n\t\t\t\tvar next = tmp.nextSibling;\n\t\t\t\tvar name = tmp.nodeName.toLowerCase();\n\n\t\t\t\t// Note: Width and height are required in FF 11\n\t\t\t\tif (name == 'svg')\n\t\t\t\t{\n\t\t\t\t\ttmp.style.overflow = 'hidden';\n\t\t\t\t\ttmp.style.position = 'relative';\n\t\t\t\t\ttmp.style.top = this.marginTop + 'px';\n\t\t\t\t\ttmp.setAttribute('width', clip.width);\n\t\t\t\t\ttmp.setAttribute('height', clip.height);\n\t\t\t\t\ttmp.style.width = '';\n\t\t\t\t\ttmp.style.height = '';\n\t\t\t\t}\n\t\t\t\t// Tries to fetch all text labels and only text labels\n\t\t\t\telse if (tmp.style.cursor != 'default' && name != 'div')\n\t\t\t\t{\n\t\t\t\t\ttmp.parentNode.removeChild(tmp);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\ttmp = next;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Puts background image behind SVG output\n\t\tif (this.printBackgroundImage)\n\t\t{\n\t\t\tvar svgs = div.getElementsByTagName('svg');\n\t\t\t\n\t\t\tif (svgs.length > 0)\n\t\t\t{\n\t\t\t\tsvgs[0].style.position = 'absolute';\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Completely removes the overlay pane to remove more handles\n\t\tview.overlayPane.parentNode.removeChild(view.overlayPane);\n\n\t\t// Restores the state of the view\n\t\tthis.graph.setEnabled(graphEnabled);\n\t\tthis.graph.container = previousContainer;\n\t\tthis.graph.cellRenderer.redraw = redraw;\n\t\tview.canvas = canvas;\n\t\tview.backgroundPane = backgroundPane;\n\t\tview.drawPane = drawPane;\n\t\tview.overlayPane = overlayPane;\n\t\tview.translate = translate;\n\t\ttemp.destroy();\n\t\tview.setEventsEnabled(eventsEnabled);\n\t}\n};\n\n/**\n * Function: getLinkForCellState\n * \n * Returns the link for the given cell state. This returns null.\n */\nmxPrintPreview.prototype.getLinkForCellState = function(state)\n{\n\treturn this.graph.getLinkForCell(state.cell);\n};\n\n/**\n * Function: insertBackgroundImage\n * \n * Inserts the background image into the given div.\n */\nmxPrintPreview.prototype.insertBackgroundImage = function(div, dx, dy)\n{\n\tvar bg = this.graph.backgroundImage;\n\t\n\tif (bg != null)\n\t{\n\t\tvar img = document.createElement('img');\n\t\timg.style.position = 'absolute';\n\t\timg.style.marginLeft = Math.round(dx * this.scale) + 'px';\n\t\timg.style.marginTop = Math.round(dy * this.scale) + 'px';\n\t\timg.setAttribute('width', Math.round(this.scale * bg.width));\n\t\timg.setAttribute('height', Math.round(this.scale * bg.height));\n\t\timg.src = bg.src;\n\t\t\n\t\tdiv.insertBefore(img, div.firstChild);\n\t}\n};\n\n/**\n * Function: getCoverPages\n * \n * Returns the pages to be added before the print output. This returns null.\n */\nmxPrintPreview.prototype.getCoverPages = function()\n{\n\treturn null;\n};\n\n/**\n * Function: getAppendices\n * \n * Returns the pages to be added after the print output. This returns null.\n */\nmxPrintPreview.prototype.getAppendices = function()\n{\n\treturn null;\n};\n\n/**\n * Function: print\n * \n * Opens the print preview and shows the print dialog.\n * \n * Parameters:\n * \n * css - Optional CSS string to be used in the head section.\n */\nmxPrintPreview.prototype.print = function(css)\n{\n\tvar wnd = this.open(css);\n\t\n\tif (wnd != null)\n\t{\n\t\twnd.print();\n\t}\n};\n\n/**\n * Function: close\n * \n * Closes the print preview window.\n */\nmxPrintPreview.prototype.close = function()\n{\n\tif (this.wnd != null)\n\t{\n\t\tthis.wnd.close();\n\t\tthis.wnd = null;\n\t}\n};\n"
  },
  {
    "path": "static/cherry/drawio_demo/src/js/view/mxStyleRegistry.js",
    "content": "/**\n * Copyright (c) 2006-2015, JGraph Ltd\n * Copyright (c) 2006-2015, Gaudenz Alder\n */\nvar mxStyleRegistry =\n{\n\t/**\n\t * Class: mxStyleRegistry\n\t *\n\t * Singleton class that acts as a global converter from string to object values\n\t * in a style. This is currently only used to perimeters and edge styles.\n\t * \n\t * Variable: values\n\t *\n\t * Maps from strings to objects.\n\t */\n\tvalues: [],\n\n\t/**\n\t * Function: putValue\n\t *\n\t * Puts the given object into the registry under the given name.\n\t */\n\tputValue: function(name, obj)\n\t{\n\t\tmxStyleRegistry.values[name] = obj;\n\t},\n\n\t/**\n\t * Function: getValue\n\t *\n\t * Returns the value associated with the given name.\n\t */\n\tgetValue: function(name)\n\t{\n\t\treturn mxStyleRegistry.values[name];\n\t},\n\t\n\t/**\n\t * Function: getName\n\t * \n\t * Returns the name for the given value.\n\t */\n\tgetName: function(value)\n\t{\n\t\tfor (var key in mxStyleRegistry.values)\n\t\t{\n\t\t\tif (mxStyleRegistry.values[key] == value)\n\t\t\t{\n\t\t\t\treturn key;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn null;\n\t}\n\n};\n\nmxStyleRegistry.putValue(mxConstants.EDGESTYLE_ELBOW, mxEdgeStyle.ElbowConnector);\nmxStyleRegistry.putValue(mxConstants.EDGESTYLE_ENTITY_RELATION, mxEdgeStyle.EntityRelation);\nmxStyleRegistry.putValue(mxConstants.EDGESTYLE_LOOP, mxEdgeStyle.Loop);\nmxStyleRegistry.putValue(mxConstants.EDGESTYLE_SIDETOSIDE, mxEdgeStyle.SideToSide);\nmxStyleRegistry.putValue(mxConstants.EDGESTYLE_TOPTOBOTTOM, mxEdgeStyle.TopToBottom);\nmxStyleRegistry.putValue(mxConstants.EDGESTYLE_ORTHOGONAL, mxEdgeStyle.OrthConnector);\nmxStyleRegistry.putValue(mxConstants.EDGESTYLE_SEGMENT, mxEdgeStyle.SegmentConnector);\n\nmxStyleRegistry.putValue(mxConstants.PERIMETER_ELLIPSE, mxPerimeter.EllipsePerimeter);\nmxStyleRegistry.putValue(mxConstants.PERIMETER_RECTANGLE, mxPerimeter.RectanglePerimeter);\nmxStyleRegistry.putValue(mxConstants.PERIMETER_RHOMBUS, mxPerimeter.RhombusPerimeter);\nmxStyleRegistry.putValue(mxConstants.PERIMETER_TRIANGLE, mxPerimeter.TrianglePerimeter);\nmxStyleRegistry.putValue(mxConstants.PERIMETER_HEXAGON, mxPerimeter.HexagonPerimeter);\n"
  },
  {
    "path": "static/cherry/drawio_demo/src/js/view/mxStylesheet.js",
    "content": "/**\n * Copyright (c) 2006-2015, JGraph Ltd\n * Copyright (c) 2006-2015, Gaudenz Alder\n */\n/**\n * Class: mxStylesheet\n * \n * Defines the appearance of the cells in a graph. See <putCellStyle> for an\n * example of creating a new cell style. It is recommended to use objects, not\n * arrays for holding cell styles. Existing styles can be cloned using\n * <mxUtils.clone> and turned into a string for debugging using\n * <mxUtils.toString>.\n *\n * Default Styles:\n * \n * The stylesheet contains two built-in styles, which are used if no style is\n * defined for a cell:\n *\n *   defaultVertex - Default style for vertices\n *   defaultEdge - Default style for edges\n * \n * Example:\n * \n * (code)\n * var vertexStyle = stylesheet.getDefaultVertexStyle();\n * vertexStyle[mxConstants.ROUNDED] = true;\n * var edgeStyle = stylesheet.getDefaultEdgeStyle();\n * edgeStyle[mxConstants.STYLE_EDGE] = mxEdgeStyle.EntityRelation;\n * (end)\n * \n * Modifies the built-in default styles.\n * \n * To avoid the default style for a cell, add a leading semicolon\n * to the style definition, eg.\n * \n * (code)\n * ;shadow=1\n * (end)\n * \n * Removing keys:\n * \n * For removing a key in a cell style of the form [stylename;|key=value;] the\n * special value none can be used, eg. highlight;fillColor=none\n * \n * See also the helper methods in mxUtils to modify strings of this format,\n * namely <mxUtils.setStyle>, <mxUtils.indexOfStylename>,\n * <mxUtils.addStylename>, <mxUtils.removeStylename>,\n * <mxUtils.removeAllStylenames> and <mxUtils.setStyleFlag>.\n * \n * Constructor: mxStylesheet\n * \n * Constructs a new stylesheet and assigns default styles.\n */\nfunction mxStylesheet()\n{\n\tthis.styles = new Object();\n\t\n\tthis.putDefaultVertexStyle(this.createDefaultVertexStyle());\n\tthis.putDefaultEdgeStyle(this.createDefaultEdgeStyle());\n};\n\n/**\n * Function: styles\n * \n * Maps from names to cell styles. Each cell style is a map of key,\n * value pairs.\n */\nmxStylesheet.prototype.styles;\n\n/**\n * Function: createDefaultVertexStyle\n * \n * Creates and returns the default vertex style.\n */\nmxStylesheet.prototype.createDefaultVertexStyle = function()\n{\n\tvar style = new Object();\n\t\n\tstyle[mxConstants.STYLE_SHAPE] = mxConstants.SHAPE_RECTANGLE;\n\tstyle[mxConstants.STYLE_PERIMETER] = mxPerimeter.RectanglePerimeter;\n\tstyle[mxConstants.STYLE_VERTICAL_ALIGN] = mxConstants.ALIGN_MIDDLE;\n\tstyle[mxConstants.STYLE_ALIGN] = mxConstants.ALIGN_CENTER;\n\tstyle[mxConstants.STYLE_FILLCOLOR] = '#C3D9FF';\n\tstyle[mxConstants.STYLE_STROKECOLOR] = '#6482B9';\n\tstyle[mxConstants.STYLE_FONTCOLOR] = '#774400';\n\t\n\treturn style;\n};\n\n/**\n * Function: createDefaultEdgeStyle\n * \n * Creates and returns the default edge style.\n */\nmxStylesheet.prototype.createDefaultEdgeStyle = function()\n{\n\tvar style = new Object();\n\t\n\tstyle[mxConstants.STYLE_SHAPE] = mxConstants.SHAPE_CONNECTOR;\n\tstyle[mxConstants.STYLE_ENDARROW] = mxConstants.ARROW_CLASSIC;\n\tstyle[mxConstants.STYLE_VERTICAL_ALIGN] = mxConstants.ALIGN_MIDDLE;\n\tstyle[mxConstants.STYLE_ALIGN] = mxConstants.ALIGN_CENTER;\n\tstyle[mxConstants.STYLE_STROKECOLOR] = '#6482B9';\n\tstyle[mxConstants.STYLE_FONTCOLOR] = '#446299';\n\t\n\treturn style;\n};\n\n/**\n * Function: putDefaultVertexStyle\n * \n * Sets the default style for vertices using defaultVertex as the\n * stylename.\n * \n * Parameters:\n * style - Key, value pairs that define the style.\n */\nmxStylesheet.prototype.putDefaultVertexStyle = function(style)\n{\n\tthis.putCellStyle('defaultVertex', style);\n};\n\n/**\n * Function: putDefaultEdgeStyle\n * \n * Sets the default style for edges using defaultEdge as the stylename.\n */\nmxStylesheet.prototype.putDefaultEdgeStyle = function(style)\n{\n\tthis.putCellStyle('defaultEdge', style);\n};\n\n/**\n * Function: getDefaultVertexStyle\n * \n * Returns the default style for vertices.\n */\nmxStylesheet.prototype.getDefaultVertexStyle = function()\n{\n\treturn this.styles['defaultVertex'];\n};\n\n/**\n * Function: getDefaultEdgeStyle\n * \n * Sets the default style for edges.\n */\nmxStylesheet.prototype.getDefaultEdgeStyle = function()\n{\n\treturn this.styles['defaultEdge'];\n};\n\n/**\n * Function: putCellStyle\n * \n * Stores the given map of key, value pairs under the given name in\n * <styles>.\n *\n * Example:\n * \n * The following example adds a new style called 'rounded' into an\n * existing stylesheet:\n * \n * (code)\n * var style = new Object();\n * style[mxConstants.STYLE_SHAPE] = mxConstants.SHAPE_RECTANGLE;\n * style[mxConstants.STYLE_PERIMETER] = mxPerimeter.RectanglePerimeter;\n * style[mxConstants.STYLE_ROUNDED] = true;\n * graph.getStylesheet().putCellStyle('rounded', style);\n * (end)\n * \n * In the above example, the new style is an object. The possible keys of\n * the object are all the constants in <mxConstants> that start with STYLE\n * and the values are either JavaScript objects, such as\n * <mxPerimeter.RightAngleRectanglePerimeter> (which is in fact a function)\n * or expressions, such as true. Note that not all keys will be\n * interpreted by all shapes (eg. the line shape ignores the fill color).\n * The final call to this method associates the style with a name in the\n * stylesheet. The style is used in a cell with the following code:\n * \n * (code)\n * model.setStyle(cell, 'rounded');\n * (end)\n * \n * Parameters:\n * \n * name - Name for the style to be stored.\n * style - Key, value pairs that define the style.\n */\nmxStylesheet.prototype.putCellStyle = function(name, style)\n{\n\tthis.styles[name] = style;\n};\n\n/**\n * Function: getCellStyle\n * \n * Returns the cell style for the specified stylename or the given\n * defaultStyle if no style can be found for the given stylename.\n * \n * Parameters:\n * \n * name - String of the form [(stylename|key=value);] that represents the\n * style.\n * defaultStyle - Default style to be returned if no style can be found.\n */\nmxStylesheet.prototype.getCellStyle = function(name, defaultStyle)\n{\n\tvar style = defaultStyle;\n\t\n\tif (name != null && name.length > 0)\n\t{\n\t\tvar pairs = name.split(';');\n\n\t\tif (style != null &&\n\t\t\tname.charAt(0) != ';')\n\t\t{\n\t\t\tstyle = mxUtils.clone(style);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tstyle = new Object();\n\t\t}\n\n\t\t// Parses each key, value pair into the existing style\n\t \tfor (var i = 0; i < pairs.length; i++)\n\t \t{\n\t \t\tvar tmp = pairs[i];\n\t \t\tvar pos = tmp.indexOf('=');\n\t \t\t\n\t \t\tif (pos >= 0)\n\t \t\t{\n\t\t \t\tvar key = tmp.substring(0, pos);\n\t\t \t\tvar value = tmp.substring(pos + 1);\n\n\t\t \t\tif (value == mxConstants.NONE)\n\t\t \t\t{\n\t\t \t\t\tdelete style[key];\n\t\t \t\t}\n\t\t \t\telse if (mxUtils.isNumeric(value))\n\t\t \t\t{\n\t\t \t\t\tstyle[key] = parseFloat(value);\n\t\t \t\t}\n\t\t \t\telse\n\t\t \t\t{\n\t\t\t \t\tstyle[key] = value;\n\t\t \t\t}\n\t\t\t}\n\t \t\telse\n\t \t\t{\n\t \t\t\t// Merges the entries from a named style\n\t\t\t\tvar tmpStyle = this.styles[tmp];\n\t\t\t\t\n\t\t\t\tif (tmpStyle != null)\n\t\t\t\t{\n\t\t\t\t\tfor (var key in tmpStyle)\n\t\t\t\t\t{\n\t\t\t\t\t\tstyle[key] = tmpStyle[key];\n\t\t\t\t\t}\n\t\t\t\t}\n\t \t\t}\n\t\t}\n\t}\n\t\n\treturn style;\n};\n"
  },
  {
    "path": "static/cherry/drawio_demo/src/js/view/mxSwimlaneManager.js",
    "content": "/**\n * Copyright (c) 2006-2015, JGraph Ltd\n * Copyright (c) 2006-2015, Gaudenz Alder\n */\n/**\n * Class: mxSwimlaneManager\n * \n * Manager for swimlanes and nested swimlanes that sets the size of newly added\n * swimlanes to that of their siblings, and propagates changes to the size of a\n * swimlane to its siblings, if <siblings> is true, and its ancestors, if\n * <bubbling> is true.\n * \n * Constructor: mxSwimlaneManager\n *\n * Constructs a new swimlane manager for the given graph.\n *\n * Arguments:\n * \n * graph - Reference to the enclosing graph. \n */\nfunction mxSwimlaneManager(graph, horizontal, addEnabled, resizeEnabled)\n{\n\tthis.horizontal = (horizontal != null) ? horizontal : true;\n\tthis.addEnabled = (addEnabled != null) ? addEnabled : true;\n\tthis.resizeEnabled = (resizeEnabled != null) ? resizeEnabled : true;\n\n\tthis.addHandler = mxUtils.bind(this, function(sender, evt)\n\t{\n\t\tif (this.isEnabled() && this.isAddEnabled())\n\t\t{\n\t\t\tthis.cellsAdded(evt.getProperty('cells'));\n\t\t}\n\t});\n\t\n\tthis.resizeHandler = mxUtils.bind(this, function(sender, evt)\n\t{\n\t\tif (this.isEnabled() && this.isResizeEnabled())\n\t\t{\n\t\t\tthis.cellsResized(evt.getProperty('cells'));\n\t\t}\n\t});\n\t\n\tthis.setGraph(graph);\n};\n\n/**\n * Extends mxEventSource.\n */\nmxSwimlaneManager.prototype = new mxEventSource();\nmxSwimlaneManager.prototype.constructor = mxSwimlaneManager;\n\n/**\n * Variable: graph\n * \n * Reference to the enclosing <mxGraph>.\n */\nmxSwimlaneManager.prototype.graph = null;\n\n/**\n * Variable: enabled\n * \n * Specifies if event handling is enabled. Default is true.\n */\nmxSwimlaneManager.prototype.enabled = true;\n\n/**\n * Variable: horizontal\n * \n * Specifies the orientation of the swimlanes. Default is true.\n */\nmxSwimlaneManager.prototype.horizontal = true;\n\n/**\n * Variable: addEnabled\n * \n * Specifies if newly added cells should be resized to match the size of their\n * existing siblings. Default is true.\n */\nmxSwimlaneManager.prototype.addEnabled = true;\n\n/**\n * Variable: resizeEnabled\n * \n * Specifies if resizing of swimlanes should be handled. Default is true.\n */\nmxSwimlaneManager.prototype.resizeEnabled = true;\n\n/**\n * Variable: moveHandler\n * \n * Holds the function that handles the move event.\n */\nmxSwimlaneManager.prototype.addHandler = null;\n\n/**\n * Variable: moveHandler\n * \n * Holds the function that handles the move event.\n */\nmxSwimlaneManager.prototype.resizeHandler = null;\n\n/**\n * Function: isEnabled\n * \n * Returns true if events are handled. This implementation\n * returns <enabled>.\n */\nmxSwimlaneManager.prototype.isEnabled = function()\n{\n\treturn this.enabled;\n};\n\n/**\n * Function: setEnabled\n * \n * Enables or disables event handling. This implementation\n * updates <enabled>.\n * \n * Parameters:\n * \n * enabled - Boolean that specifies the new enabled state.\n */\nmxSwimlaneManager.prototype.setEnabled = function(value)\n{\n\tthis.enabled = value;\n};\n\n/**\n * Function: isHorizontal\n * \n * Returns <horizontal>.\n */\nmxSwimlaneManager.prototype.isHorizontal = function()\n{\n\treturn this.horizontal;\n};\n\n/**\n * Function: setHorizontal\n * \n * Sets <horizontal>.\n */\nmxSwimlaneManager.prototype.setHorizontal = function(value)\n{\n\tthis.horizontal = value;\n};\n\n/**\n * Function: isAddEnabled\n * \n * Returns <addEnabled>.\n */\nmxSwimlaneManager.prototype.isAddEnabled = function()\n{\n\treturn this.addEnabled;\n};\n\n/**\n * Function: setAddEnabled\n * \n * Sets <addEnabled>.\n */\nmxSwimlaneManager.prototype.setAddEnabled = function(value)\n{\n\tthis.addEnabled = value;\n};\n\n/**\n * Function: isResizeEnabled\n * \n * Returns <resizeEnabled>.\n */\nmxSwimlaneManager.prototype.isResizeEnabled = function()\n{\n\treturn this.resizeEnabled;\n};\n\n/**\n * Function: setResizeEnabled\n * \n * Sets <resizeEnabled>.\n */\nmxSwimlaneManager.prototype.setResizeEnabled = function(value)\n{\n\tthis.resizeEnabled = value;\n};\n\n/**\n * Function: getGraph\n * \n * Returns the graph that this manager operates on.\n */\nmxSwimlaneManager.prototype.getGraph = function()\n{\n\treturn this.graph;\n};\n\n/**\n * Function: setGraph\n * \n * Sets the graph that the manager operates on.\n */\nmxSwimlaneManager.prototype.setGraph = function(graph)\n{\n\tif (this.graph != null)\n\t{\n\t\tthis.graph.removeListener(this.addHandler);\n\t\tthis.graph.removeListener(this.resizeHandler);\n\t}\n\t\n\tthis.graph = graph;\n\t\n\tif (this.graph != null)\n\t{\n\t\tthis.graph.addListener(mxEvent.ADD_CELLS, this.addHandler);\n\t\tthis.graph.addListener(mxEvent.CELLS_RESIZED, this.resizeHandler);\n\t}\n};\n\n/**\n * Function: isSwimlaneIgnored\n * \n * Returns true if the given swimlane should be ignored.\n */\nmxSwimlaneManager.prototype.isSwimlaneIgnored = function(swimlane)\n{\n\treturn !this.getGraph().isSwimlane(swimlane);\n};\n\n/**\n * Function: isCellHorizontal\n * \n * Returns true if the given cell is horizontal. If the given cell is not a\n * swimlane, then the global orientation is returned.\n */\nmxSwimlaneManager.prototype.isCellHorizontal = function(cell)\n{\n\tif (this.graph.isSwimlane(cell))\n\t{\n\t\tvar style = this.graph.getCellStyle(cell);\n\t\t\n\t\treturn mxUtils.getValue(style, mxConstants.STYLE_HORIZONTAL, 1) == 1;\n\t}\n\t\n\treturn !this.isHorizontal();\n};\n\n/**\n * Function: cellsAdded\n * \n * Called if any cells have been added.\n * \n * Parameters:\n * \n * cell - Array of <mxCells> that have been added.\n */\nmxSwimlaneManager.prototype.cellsAdded = function(cells)\n{\n\tif (cells != null)\n\t{\n\t\tvar model = this.getGraph().getModel();\n\n\t\tmodel.beginUpdate();\n\t\ttry\n\t\t{\n\t\t\tfor (var i = 0; i < cells.length; i++)\n\t\t\t{\n\t\t\t\tif (!this.isSwimlaneIgnored(cells[i]))\n\t\t\t\t{\n\t\t\t\t\tthis.swimlaneAdded(cells[i]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tfinally\n\t\t{\n\t\t\tmodel.endUpdate();\n\t\t}\n\t}\n};\n\n/**\n * Function: swimlaneAdded\n * \n * Updates the size of the given swimlane to match that of any existing\n * siblings swimlanes.\n * \n * Parameters:\n * \n * swimlane - <mxCell> that represents the new swimlane.\n */\nmxSwimlaneManager.prototype.swimlaneAdded = function(swimlane)\n{\n\tvar model = this.getGraph().getModel();\n\tvar parent = model.getParent(swimlane);\n\tvar childCount = model.getChildCount(parent);\n\tvar geo = null;\n\t\n\t// Finds the first valid sibling swimlane as reference\n\tfor (var i = 0; i < childCount; i++)\n\t{\n\t\tvar child = model.getChildAt(parent, i);\n\t\t\n\t\tif (child != swimlane && !this.isSwimlaneIgnored(child))\n\t\t{\n\t\t\tgeo = model.getGeometry(child);\n\t\t\t\n\t\t\tif (geo != null)\n\t\t\t{\t\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\t\n\t// Applies the size of the refernece to the newly added swimlane\n\tif (geo != null)\n\t{\n\t\tvar parentHorizontal = (parent != null) ? this.isCellHorizontal(parent) : this.horizontal;\n\t\tthis.resizeSwimlane(swimlane, geo.width, geo.height, parentHorizontal);\n\t}\n};\n\n/**\n * Function: cellsResized\n * \n * Called if any cells have been resizes. Calls <swimlaneResized> for all\n * swimlanes where <isSwimlaneIgnored> returns false.\n * \n * Parameters:\n * \n * cells - Array of <mxCells> whose size was changed.\n */\nmxSwimlaneManager.prototype.cellsResized = function(cells)\n{\n\tif (cells != null)\n\t{\n\t\tvar model = this.getGraph().getModel();\n\t\t\n\t\tmodel.beginUpdate();\n\t\ttry\n\t\t{\n\t\t\t// Finds the top-level swimlanes and adds offsets\n\t\t\tfor (var i = 0; i < cells.length; i++)\n\t\t\t{\n\t\t\t\tif (!this.isSwimlaneIgnored(cells[i]))\n\t\t\t\t{\n\t\t\t\t\tvar geo = model.getGeometry(cells[i]);\n\n\t\t\t\t\tif (geo != null)\n\t\t\t\t\t{\n\t\t\t\t\t\tvar size = new mxRectangle(0, 0, geo.width, geo.height);\n\t\t\t\t\t\tvar top = cells[i];\n\t\t\t\t\t\tvar current = top;\n\t\t\t\t\t\t\n\t\t\t\t\t\twhile (current != null)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\ttop = current;\n\t\t\t\t\t\t\tcurrent = model.getParent(current);\n\t\t\t\t\t\t\tvar tmp = (this.graph.isSwimlane(current)) ?\n\t\t\t\t\t\t\t\t\tthis.graph.getStartSize(current) :\n\t\t\t\t\t\t\t\t\tnew mxRectangle();\n\t\t\t\t\t\t\tsize.width += tmp.width;\n\t\t\t\t\t\t\tsize.height += tmp.height;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tvar parentHorizontal = (current != null) ? this.isCellHorizontal(current) : this.horizontal;\n\t\t\t\t\t\tthis.resizeSwimlane(top, size.width, size.height, parentHorizontal);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tfinally\n\t\t{\n\t\t\tmodel.endUpdate();\n\t\t}\n\t}\n};\n\n/**\n * Function: resizeSwimlane\n * \n * Called from <cellsResized> for all swimlanes that are not ignored to update\n * the size of the siblings and the size of the parent swimlanes, recursively,\n * if <bubbling> is true.\n * \n * Parameters:\n * \n * swimlane - <mxCell> whose size has changed.\n */\nmxSwimlaneManager.prototype.resizeSwimlane = function(swimlane, w, h, parentHorizontal)\n{\n\tvar model = this.getGraph().getModel();\n\t\n\tmodel.beginUpdate();\n\ttry\n\t{\n\t\tvar horizontal = this.isCellHorizontal(swimlane);\n\t\t\n\t\tif (!this.isSwimlaneIgnored(swimlane))\n\t\t{\n\t\t\tvar geo = model.getGeometry(swimlane);\n\t\t\t\n\t\t\tif (geo != null)\n\t\t\t{\n\t\t\t\tif ((parentHorizontal && geo.height != h) || (!parentHorizontal && geo.width != w))\n\t\t\t\t{\n\t\t\t\t\tgeo = geo.clone();\n\t\t\t\t\t\n\t\t\t\t\tif (parentHorizontal)\n\t\t\t\t\t{\n\t\t\t\t\t\tgeo.height = h;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tgeo.width = w;\n\t\t\t\t\t}\n\n\t\t\t\t\tmodel.setGeometry(swimlane, geo);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tvar tmp = (this.graph.isSwimlane(swimlane)) ?\n\t\t\t\tthis.graph.getStartSize(swimlane) :\n\t\t\t\tnew mxRectangle();\n\t\tw -= tmp.width;\n\t\th -= tmp.height;\n\t\t\n\t\tvar childCount = model.getChildCount(swimlane);\n\t\t\n\t\tfor (var i = 0; i < childCount; i++)\n\t\t{\n\t\t\tvar child = model.getChildAt(swimlane, i);\n\t\t\tthis.resizeSwimlane(child, w, h, horizontal);\n\t\t}\n\t}\n\tfinally\n\t{\n\t\tmodel.endUpdate();\n\t}\n};\n\n/**\n * Function: destroy\n * \n * Removes all handlers from the <graph> and deletes the reference to it.\n */\nmxSwimlaneManager.prototype.destroy = function()\n{\n\tthis.setGraph(null);\n};\n"
  },
  {
    "path": "static/cherry/drawio_demo/src/js/view/mxTemporaryCellStates.js",
    "content": "/**\n * Copyright (c) 2006-2017, JGraph Ltd\n * Copyright (c) 2006-2017, Gaudenz Alder\n */\n/**\n * Class: mxTemporaryCellStates\n * \n * Creates a temporary set of cell states.\n */\nfunction mxTemporaryCellStates(view, scale, cells, isCellVisibleFn, getLinkForCellState)\n{\n\tscale = (scale != null) ? scale : 1;\n\tthis.view = view;\n\t\n\t// Stores the previous state\n\tthis.oldValidateCellState = view.validateCellState;\n\tthis.oldBounds = view.getGraphBounds();\n\tthis.oldStates = view.getStates();\n\tthis.oldScale = view.getScale();\n\tthis.oldDoRedrawShape = view.graph.cellRenderer.doRedrawShape;\n\n\tvar self = this;\n\n\t// Overrides doRedrawShape and paint shape to add links on shapes\n\tif (getLinkForCellState != null)\n\t{\n\t\tview.graph.cellRenderer.doRedrawShape = function(state)\n\t\t{\n\t\t\tvar oldPaint = state.shape.paint;\n\t\t\t\n\t\t\tstate.shape.paint = function(c)\n\t\t\t{\n\t\t\t\tvar link = getLinkForCellState(state);\n\t\t\t\t\n\t\t\t\tif (link != null)\n\t\t\t\t{\n\t\t\t\t\tc.setLink(link);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\toldPaint.apply(this, arguments);\n\t\t\t\t\n\t\t\t\tif (link != null)\n\t\t\t\t{\n\t\t\t\t\tc.setLink(null);\n\t\t\t\t}\n\t\t\t};\n\t\t\t\n\t\t\tself.oldDoRedrawShape.apply(view.graph.cellRenderer, arguments);\n\t\t\tstate.shape.paint = oldPaint;\n\t\t};\n\t}\n\n\t// Overrides validateCellState to ignore invisible cells\n\tview.validateCellState = function(cell, resurse)\n\t{\n\t\tif (cell == null || isCellVisibleFn == null || isCellVisibleFn(cell))\n\t\t{\n\t\t\treturn self.oldValidateCellState.apply(view, arguments);\n\t\t}\n\t\t\n\t\treturn null;\n\t};\n\t\n\t// Creates space for new states\n\tview.setStates(new mxDictionary());\n\tview.setScale(scale);\n\t\n\tif (cells != null)\n\t{\n\t\tview.resetValidationState();\n\t\tvar bbox = null;\n\n\t\t// Validates the vertices and edges without adding them to\n\t\t// the model so that the original cells are not modified\n\t\tfor (var i = 0; i < cells.length; i++)\n\t\t{\n\t\t\tvar bounds = view.getBoundingBox(view.validateCellState(view.validateCell(cells[i])));\n\t\t\t\n\t\t\tif (bbox == null)\n\t\t\t{\n\t\t\t\tbbox = bounds;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tbbox.add(bounds);\n\t\t\t}\n\t\t}\n\n\t\tview.setGraphBounds(bbox || new mxRectangle());\n\t}\n};\n\n/**\n * Variable: view\n *\n * Holds the width of the rectangle. Default is 0.\n */\nmxTemporaryCellStates.prototype.view = null;\n\n/**\n * Variable: oldStates\n *\n * Holds the height of the rectangle. Default is 0.\n */\nmxTemporaryCellStates.prototype.oldStates = null;\n\n/**\n * Variable: oldBounds\n *\n * Holds the height of the rectangle. Default is 0.\n */\nmxTemporaryCellStates.prototype.oldBounds = null;\n\n/**\n * Variable: oldScale\n *\n * Holds the height of the rectangle. Default is 0.\n */\nmxTemporaryCellStates.prototype.oldScale = null;\n\n/**\n * Function: destroy\n * \n * Returns the top, left corner as a new <mxPoint>.\n */\nmxTemporaryCellStates.prototype.destroy = function()\n{\n\tthis.view.setScale(this.oldScale);\n\tthis.view.setStates(this.oldStates);\n\tthis.view.setGraphBounds(this.oldBounds);\n\tthis.view.validateCellState = this.oldValidateCellState;\n\tthis.view.graph.cellRenderer.doRedrawShape = this.oldDoRedrawShape;\n};\n"
  },
  {
    "path": "static/cherry/drawio_demo/src/resources/editor.txt",
    "content": "askZoom=Enter zoom (%)\nproperties=Properties\noutline=Outline\ntasks=Tasks\nhelp=Help\n"
  },
  {
    "path": "static/cherry/drawio_demo/src/resources/editor_de.txt",
    "content": "askZoom=Zoom eingeben (%)\nproperties=Eigenschaften\noutline=Uebersicht\ntasks=Aufgaben\nhelp=Hilfe\n"
  },
  {
    "path": "static/cherry/drawio_demo/src/resources/editor_zh.txt",
    "content": "askZoom=进入缩放(%25)\nproperties=属性\noutline=轮廓\ntasks=任务\nhelp=帮助"
  },
  {
    "path": "static/cherry/drawio_demo/src/resources/graph.txt",
    "content": "alreadyConnected=Nodes already connected\ncontainsValidationErrors=Contains validation errors\nupdatingDocument=Updating Document. Please wait...\nupdatingSelection=Updating Selection. Please wait...\ncollapse-expand=Collapse/Expand\ndoubleClickOrientation=Doubleclick to change orientation\nclose=Close\nerror=Error\ndone=Done\ncancel=Cancel\nok=OK\n"
  },
  {
    "path": "static/cherry/drawio_demo/src/resources/graph_de.txt",
    "content": "alreadyConnected=Knoten schon verbunden\ncontainsValidationErrors=Enthält Validierungsfehler\nupdatingDocument=Aktualisiere Dokument. Bitte warten...\nupdatingSelection=Aktualisiere Markierung. Bitte warten...\ncollapse-expand=Einklappen/Ausklappen\ndoubleClickOrientation=Doppelklicken um Orientierung zu ändern\nclose=Schliessen\nerror=Fehler\ndone=Fertig\ncancel=Abbrechen\nok=OK\n"
  },
  {
    "path": "static/cherry/drawio_demo/src/resources/graph_zh.txt",
    "content": "alreadyConnected=节点已经连接\ncontainsValidationErrors=包含效验错误\nupdatingDocument=更新文档。请等候......\nupdatingSelection=更新所选项。请等候......\ncollapse-expand=折叠/展开\ndoubleClickOrientation=双击以改变方向\nclose=关闭\nerror=错误\ndone=完成\ncancel=取消\nok=确定"
  },
  {
    "path": "static/cherry/drawio_demo.html",
    "content": "<!DOCTYPE html>\n<html lang=\"en\">\n\n<head>\n  <meta charset=\"UTF-8\">\n  <title>draw.io demo</title>\n  <link rel=\"stylesheet\" href=\"/static/cherry/drawio_demo/grapheditor.css\">\n</head>\n\n<!-- geEditor 是draw.io需要的class -->\n\n<body class=\"geEditor\">\n  <!-- 加载draw.io需要的静态资源 begin -->\n\n  <script type=\"text/javascript\" src=\"/static/cherry/drawio_demo/Init.js\"></script>\n  <script type=\"text/javascript\" src=\"./drawio_demo/lib/pako.min.js\"></script>\n  <script type=\"text/javascript\" src=\"/static/cherry/drawio_demo/lib/base64.js\"></script>\n  <script type=\"text/javascript\" src=\"/static/cherry/drawio_demo/jscolor/jscolor.js\"></script>\n  <script type=\"text/javascript\" src=\"/static/cherry/drawio_demo/lib/purify.min.js\"></script>\n  <script type=\"text/javascript\" src=\"/static/cherry/mxgraph/mxClient.js\"></script>\n  <script type=\"text/javascript\" src=\"/static/cherry/drawio_demo/Editor.js\"></script>\n  <script type=\"text/javascript\" src=\"/static/cherry/drawio_demo/EditorUi.js\"></script>\n  <script type=\"text/javascript\" src=\"/static/cherry/drawio_demo/Sidebar.js\"></script>\n  <script type=\"text/javascript\" src=\"/static/cherry/drawio_demo/Graph.js\"></script>\n  <script type=\"text/javascript\" src=\"/static/cherry/drawio_demo/Format.js\"></script>\n  <script type=\"text/javascript\" src=\"/static/cherry/drawio_demo/Shapes.js\"></script>\n  <script type=\"text/javascript\" src=\"/static/cherry/drawio_demo/Actions.js\"></script>\n  <script type=\"text/javascript\" src=\"/static/cherry/drawio_demo/Menus.js\"></script>\n  <script type=\"text/javascript\" src=\"/static/cherry/drawio_demo/Toolbar.js\"></script>\n  <script type=\"text/javascript\" src=\"/static/cherry/drawio_demo/Dialogs.js\"></script>\n\n  <!-- 加载draw.io需要的静态资源 end -->\n\n  <script src=\"/static/cherry/drawio-demo.js\"></script>\n</body>\n\n</html>"
  },
  {
    "path": "static/cherry/mxgraph/css/common.css",
    "content": "div.mxRubberband {\n\tposition: absolute;\n\toverflow: hidden;\n\tborder-style: solid;\n\tborder-width: 1px;\n\tborder-color: #0000FF;\n\tbackground: #0077FF;\n}\n.mxCellEditor {\n\tbackground: url(data:image/gif;base64,R0lGODlhMAAwAIAAAP///wAAACH5BAEAAAAALAAAAAAwADAAAAIxhI+py+0Po5y02ouz3rz7D4biSJbmiabqyrbuC8fyTNf2jef6zvf+DwwKh8Si8egpAAA7);\n\t_background: url('../images/transparent.gif');\n\tborder-color: transparent;\n\tborder-style: solid;\n\tdisplay: inline-block;\n\tposition: absolute;\n\toverflow: visible;\n\tword-wrap: normal;\n\tborder-width: 0;\n\tmin-width: 1px;\n\tresize: none;\n\tpadding: 0px;\n\tmargin: 0px;\n}\n.mxPlainTextEditor * {\n\tpadding: 0px;\n\tmargin: 0px;\n}\ndiv.mxWindow {\n\t-webkit-box-shadow: 3px 3px 12px #C0C0C0;\n\t-moz-box-shadow: 3px 3px 12px #C0C0C0;\n\tbox-shadow: 3px 3px 12px #C0C0C0;\n\tbackground: url(data:image/gif;base64,R0lGODlhGgAUAIAAAOzs7PDw8CH5BAAAAAAALAAAAAAaABQAAAIijI+py70Ao5y02lud3lzhD4ZUR5aPiKajyZbqq7YyB9dhAQA7);\n\t_background: url('../images/window.gif');\n\tborder:1px solid #c3c3c3;\n\tposition: absolute;\n\toverflow: hidden;\n\tz-index: 1;\n}\ntable.mxWindow {\n\tborder-collapse: collapse;\n\ttable-layout: fixed;\n  \tfont-family: Arial;\n\tfont-size: 8pt;\n}\ntd.mxWindowTitle {\n\tbackground: url(data:image/gif;base64,R0lGODlhFwAXAMQAANfX18rKyuHh4c7OzsDAwMHBwc/Pz+Li4uTk5NHR0dvb2+jo6O/v79/f3/n5+dnZ2dbW1uPj44yMjNPT0+Dg4N3d3ebm5szMzAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAAAAAAALAAAAAAXABcAAAWQICESxWiW5Ck6bOu+MMvMdG3f86LvfO/rlqBwSCwaj8ikUohoOp/QaDNCrVqvWKpgezhsv+AwmEIum89ocmPNbrvf64p8Tq/b5Yq8fs/v5x+AgYKDhIAAh4iJiouHEI6PkJGSjhOVlpeYmZUJnJ2en6CcBqMDpaanqKgXq6ytrq+rAbKztLW2shK5uru8vbkhADs=)  repeat-x;\n\t_background: url('../images/window-title.gif') repeat-x;\n\ttext-overflow: ellipsis;\n\twhite-space: nowrap;\n \ttext-align: center;\n \tfont-weight: bold;\n \toverflow: hidden;\n\theight: 13px;\n\tpadding: 2px;\n \tpadding-top: 4px;\n \tpadding-bottom: 6px;\n \tcolor: black;\n}\ntd.mxWindowPane {\n\tvertical-align: top;\n\tpadding: 0px;\n}\ndiv.mxWindowPane {\n\toverflow: hidden;\n\tposition: relative;\n}\nimg.mxToolbarItem {\n\tmargin-right: 6px;\n\tmargin-bottom: 6px;\n\tborder-width: 1px;\n}\nselect.mxToolbarCombo {\n\tvertical-align: top;\n\tborder-style: inset;\n\tborder-width: 2px;\n}\ndiv.mxToolbarComboContainer {\n\tpadding: 2px;\n}\nimg.mxToolbarMode {\n\tmargin: 2px;\n\tmargin-right: 4px;\n\tmargin-bottom: 4px;\n\tborder-width: 0px;\n}\nimg.mxToolbarModeSelected {\n\tmargin: 0px;\n\tmargin-right: 2px;\n\tmargin-bottom: 2px;\n\tborder-width: 2px;\n\tborder-style: inset;\n}\ndiv.mxTooltip {\n\t-webkit-box-shadow: 3px 3px 12px #C0C0C0;\n\t-moz-box-shadow: 3px 3px 12px #C0C0C0;\n\tbox-shadow: 3px 3px 12px #C0C0C0;\n\tbackground: #FFFFCC;\n\tborder-style: solid;\n\tborder-width: 1px;\n\tborder-color: black;\n\tfont-family: Arial;\n\tfont-size: 8pt;\n\tposition: absolute;\n\tcursor: default;\n\tpadding: 4px;\n\tcolor: black;\n}\ndiv.mxPopupMenu {\n\t-webkit-box-shadow: 3px 3px 12px #C0C0C0;\n\t-moz-box-shadow: 3px 3px 12px #C0C0C0;\n\tbox-shadow: 3px 3px 12px #C0C0C0;\n\tbackground: url(data:image/gif;base64,R0lGODlhGgAUAIAAAOzs7PDw8CH5BAAAAAAALAAAAAAaABQAAAIijI+py70Ao5y02lud3lzhD4ZUR5aPiKajyZbqq7YyB9dhAQA7);\n\t_background: url('../images/window.gif');\n\tposition: absolute;\n\tborder-style: solid;\n\tborder-width: 1px;\n\tborder-color: black;\n}\ntable.mxPopupMenu {\n\tborder-collapse: collapse;\n\tmargin-top: 1px;\n\tmargin-bottom: 1px;\n}\ntr.mxPopupMenuItem {\n\tcolor: black;\n\tcursor: pointer;\n}\ntr.mxPopupMenuItemHover {\n\tbackground-color: #000066;\n\tcolor: #FFFFFF;\n\tcursor: pointer;\n}\ntd.mxPopupMenuItem {\n\tpadding: 2px 30px 2px 10px;\n\twhite-space: nowrap;\n\tfont-family: Arial;\n\tfont-size: 8pt;\n}\ntd.mxPopupMenuIcon {\n\tbackground-color: #D0D0D0;\n\tpadding: 2px 4px 2px 4px;\n}\n.mxDisabled {\n\topacity: 0.2 !important;\n\tcursor:default !important;\n}\n"
  },
  {
    "path": "static/cherry/mxgraph/css/explorer.css",
    "content": "div.mxTooltip {\n\tfilter:progid:DXImageTransform.Microsoft.DropShadow(OffX=4, OffY=4, \n        Color='#A2A2A2', Positive='true');\n}\ndiv.mxPopupMenu {\n\tfilter:progid:DXImageTransform.Microsoft.DropShadow(OffX=4, OffY=4, \n        Color='#C0C0C0', Positive='true');\n}\ndiv.mxWindow {\n\t_filter:progid:DXImageTransform.Microsoft.DropShadow(OffX=4, OffY=4, \n        Color='#C0C0C0', Positive='true');\n}\ntd.mxWindowTitle {\n\t_height: 23px;\n}\n.mxDisabled {\n\tfilter:alpha(opacity=20) !important;\n}\n"
  },
  {
    "path": "static/cherry/mxgraph/mxClient.js",
    "content": "var mxClient={VERSION:\"21.4.1\",IS_IE:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf(\"MSIE\"),IS_IE11:null!=navigator.userAgent&&!!navigator.userAgent.match(/Trident\\/7\\./),IS_EDGE:null!=navigator.userAgent&&!!navigator.userAgent.match(/Edge\\//),IS_EM:\"spellcheck\"in document.createElement(\"textarea\")&&8==document.documentMode,VML_PREFIX:\"v\",OFFICE_PREFIX:\"o\",IS_NS:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf(\"Mozilla/\")&&0>navigator.userAgent.indexOf(\"MSIE\")&&0>navigator.userAgent.indexOf(\"Edge/\"),\nIS_OP:null!=navigator.userAgent&&(0<=navigator.userAgent.indexOf(\"Opera/\")||0<=navigator.userAgent.indexOf(\"OPR/\")),IS_OT:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf(\"Presto/\")&&0>navigator.userAgent.indexOf(\"Presto/2.4.\")&&0>navigator.userAgent.indexOf(\"Presto/2.3.\")&&0>navigator.userAgent.indexOf(\"Presto/2.2.\")&&0>navigator.userAgent.indexOf(\"Presto/2.1.\")&&0>navigator.userAgent.indexOf(\"Presto/2.0.\")&&0>navigator.userAgent.indexOf(\"Presto/1.\"),IS_SF:/Apple Computer, Inc/.test(navigator.vendor),\nIS_ANDROID:0<=navigator.appVersion.indexOf(\"Android\"),IS_IOS:/iP(hone|od|ad)/.test(navigator.platform)||navigator.userAgent.match(/Mac/)&&navigator.maxTouchPoints&&2<navigator.maxTouchPoints,IS_WEBVIEW:/((iPhone|iPod|iPad).*AppleWebKit(?!.*Version)|; wv)/i.test(navigator.userAgent),IS_GC:/Google Inc/.test(navigator.vendor),IS_CHROMEAPP:null!=window.chrome&&null!=chrome.app&&null!=chrome.app.runtime,IS_FF:-1<navigator.userAgent.toLowerCase().indexOf(\"firefox\"),IS_MT:0<=navigator.userAgent.indexOf(\"Firefox/\")&&\n0>navigator.userAgent.indexOf(\"Firefox/1.\")&&0>navigator.userAgent.indexOf(\"Firefox/2.\")||0<=navigator.userAgent.indexOf(\"Iceweasel/\")&&0>navigator.userAgent.indexOf(\"Iceweasel/1.\")&&0>navigator.userAgent.indexOf(\"Iceweasel/2.\")||0<=navigator.userAgent.indexOf(\"SeaMonkey/\")&&0>navigator.userAgent.indexOf(\"SeaMonkey/1.\")||0<=navigator.userAgent.indexOf(\"Iceape/\")&&0>navigator.userAgent.indexOf(\"Iceape/1.\"),IS_SVG:\"MICROSOFT INTERNET EXPLORER\"!=navigator.appName.toUpperCase(),NO_FO:!document.createElementNS||\n\"[object SVGForeignObjectElement]\"!==document.createElementNS(\"http://www.w3.org/2000/svg\",\"foreignObject\").toString()||0<=navigator.userAgent.indexOf(\"Opera/\"),IS_WIN:0<navigator.appVersion.indexOf(\"Win\"),IS_MAC:0<navigator.appVersion.indexOf(\"Mac\"),IS_CHROMEOS:/\\bCrOS\\b/.test(navigator.appVersion),IS_LINUX:/\\bLinux\\b/.test(navigator.appVersion),IS_TOUCH:\"ontouchstart\"in document.documentElement,IS_POINTER:null!=window.PointerEvent&&!(0<navigator.appVersion.indexOf(\"Mac\")),IS_LOCAL:0>document.location.href.indexOf(\"http://\")&&\n0>document.location.href.indexOf(\"https://\"),defaultBundles:[],isBrowserSupported:function(){return mxClient.IS_SVG},link:function(a,b,c,d){c=c||document;var e=c.createElement(\"link\");e.setAttribute(\"rel\",a);e.setAttribute(\"href\",b);e.setAttribute(\"charset\",\"UTF-8\");e.setAttribute(\"type\",\"text/css\");d&&e.setAttribute(\"id\",d);c.getElementsByTagName(\"head\")[0].appendChild(e)},loadResources:function(a,b){function c(){0==--d&&a()}for(var d=mxClient.defaultBundles.length,e=0;e<mxClient.defaultBundles.length;e++)mxResources.add(mxClient.defaultBundles[e],\nb,c)},include:function(a){document.write('<script src=\"'+a+'\">\\x3c/script>')}};\"undefined\"==typeof mxLoadResources&&(mxLoadResources=!0);\"undefined\"==typeof mxForceIncludes&&(mxForceIncludes=!1);\"undefined\"==typeof mxResourceExtension&&(mxResourceExtension=\".txt\");\"undefined\"==typeof mxLoadStylesheets&&(mxLoadStylesheets=!0);\n\"undefined\"!=typeof mxBasePath&&0<mxBasePath.length?(\"/\"==mxBasePath.substring(mxBasePath.length-1)&&(mxBasePath=mxBasePath.substring(0,mxBasePath.length-1)),mxClient.basePath=mxBasePath):mxClient.basePath=\".\";\"undefined\"!=typeof mxImageBasePath&&0<mxImageBasePath.length?(\"/\"==mxImageBasePath.substring(mxImageBasePath.length-1)&&(mxImageBasePath=mxImageBasePath.substring(0,mxImageBasePath.length-1)),mxClient.imageBasePath=mxImageBasePath):mxClient.imageBasePath=\"images\";\nmxClient.language=\"undefined\"!=typeof mxLanguage&&null!=mxLanguage?mxLanguage:mxClient.IS_IE?navigator.userLanguage:navigator.language;mxClient.defaultLanguage=\"undefined\"!=typeof mxDefaultLanguage&&null!=mxDefaultLanguage?mxDefaultLanguage:\"en\";mxLoadStylesheets&&mxClient.link(\"stylesheet\",\"mxgraph/css/common.css\");\"undefined\"!=typeof mxLanguages&&null!=mxLanguages&&(mxClient.languages=mxLanguages);\nvar mxLog={consoleName:\"Console\",TRACE:!1,DEBUG:!0,WARN:!0,buffer:\"\",init:function(){if(null==mxLog.window&&null!=document.body){var a=mxLog.consoleName+\" - mxGraph \"+mxClient.VERSION,b=document.createElement(\"table\");b.setAttribute(\"width\",\"100%\");b.setAttribute(\"height\",\"100%\");var c=document.createElement(\"tbody\"),d=document.createElement(\"tr\"),e=document.createElement(\"td\");e.style.verticalAlign=\"top\";mxLog.textarea=document.createElement(\"textarea\");mxLog.textarea.setAttribute(\"wrap\",\"off\");\nmxLog.textarea.setAttribute(\"readOnly\",\"true\");mxLog.textarea.style.height=\"100%\";mxLog.textarea.style.resize=\"none\";mxLog.textarea.value=mxLog.buffer;mxLog.textarea.style.width=mxClient.IS_NS&&\"BackCompat\"!=document.compatMode?\"99%\":\"100%\";e.appendChild(mxLog.textarea);d.appendChild(e);c.appendChild(d);d=document.createElement(\"tr\");mxLog.td=document.createElement(\"td\");mxLog.td.style.verticalAlign=\"top\";mxLog.td.setAttribute(\"height\",\"30px\");d.appendChild(mxLog.td);c.appendChild(d);b.appendChild(c);\nmxLog.addButton(\"Info\",function(g){mxLog.info()});mxLog.addButton(\"DOM\",function(g){g=mxUtils.getInnerHtml(document.body);mxLog.debug(g)});mxLog.addButton(\"Trace\",function(g){mxLog.TRACE=!mxLog.TRACE;mxLog.TRACE?mxLog.debug(\"Tracing enabled\"):mxLog.debug(\"Tracing disabled\")});mxLog.addButton(\"Copy\",function(g){try{mxUtils.copy(mxLog.textarea.value)}catch(k){mxUtils.alert(k)}});mxLog.addButton(\"Show\",function(g){try{mxUtils.popup(mxLog.textarea.value)}catch(k){mxUtils.alert(k)}});mxLog.addButton(\"Clear\",\nfunction(g){mxLog.textarea.value=\"\"});d=c=0;\"number\"===typeof window.innerWidth?(c=window.innerHeight,d=window.innerWidth):(c=document.documentElement.clientHeight||document.body.clientHeight,d=document.body.clientWidth);mxLog.window=new mxWindow(a,b,Math.max(0,d-320),Math.max(0,c-210),300,160);mxLog.window.setMaximizable(!0);mxLog.window.setScrollable(!1);mxLog.window.setResizable(!0);mxLog.window.setClosable(!0);mxLog.window.destroyOnClose=!1;if((mxClient.IS_NS||mxClient.IS_IE)&&!mxClient.IS_GC&&\n!mxClient.IS_SF&&\"BackCompat\"!=document.compatMode||11==document.documentMode){var f=mxLog.window.getElement();a=function(g,k){mxLog.textarea.style.height=Math.max(0,f.offsetHeight-70)+\"px\"};mxLog.window.addListener(mxEvent.RESIZE_END,a);mxLog.window.addListener(mxEvent.MAXIMIZE,a);mxLog.window.addListener(mxEvent.NORMALIZE,a);mxLog.textarea.style.height=\"92px\"}}},info:function(){mxLog.writeln(mxUtils.toString(navigator))},addButton:function(a,b){var c=document.createElement(\"button\");mxUtils.write(c,\na);mxEvent.addListener(c,\"click\",b);mxLog.td.appendChild(c)},isVisible:function(){return null!=mxLog.window?mxLog.window.isVisible():!1},show:function(){mxLog.setVisible(!0)},setVisible:function(a){null==mxLog.window&&mxLog.init();null!=mxLog.window&&mxLog.window.setVisible(a)},enter:function(a){if(mxLog.TRACE)return mxLog.writeln(\"Entering \"+a),(new Date).getTime()},leave:function(a,b){mxLog.TRACE&&(b=0!=b?\" (\"+((new Date).getTime()-b)+\" ms)\":\"\",mxLog.writeln(\"Leaving \"+a+b))},debug:function(){mxLog.DEBUG&&\nmxLog.writeln.apply(this,arguments)},warn:function(){mxLog.WARN&&mxLog.writeln.apply(this,arguments)},write:function(){for(var a=\"\",b=0;b<arguments.length;b++)a+=arguments[b],b<arguments.length-1&&(a+=\" \");null!=mxLog.textarea?(mxLog.textarea.value+=a,null!=navigator.userAgent&&0<=navigator.userAgent.indexOf(\"Presto/2.5\")&&(mxLog.textarea.style.visibility=\"hidden\",mxLog.textarea.style.visibility=\"visible\"),mxLog.textarea.scrollTop=mxLog.textarea.scrollHeight):mxLog.buffer+=a},writeln:function(){for(var a=\n\"\",b=0;b<arguments.length;b++)a+=arguments[b],b<arguments.length-1&&(a+=\" \");mxLog.write(a+\"\\n\")}},mxObjectIdentity={FIELD_NAME:\"mxObjectId\",counter:0,get:function(a){if(null!=a){if(null==a[mxObjectIdentity.FIELD_NAME])if(\"object\"===typeof a){var b=mxUtils.getFunctionName(a.constructor);a[mxObjectIdentity.FIELD_NAME]=b+\"#\"+mxObjectIdentity.counter++}else\"function\"===typeof a&&(a[mxObjectIdentity.FIELD_NAME]=\"Function#\"+mxObjectIdentity.counter++);return a[mxObjectIdentity.FIELD_NAME]}return null},\nclear:function(a){\"object\"!==typeof a&&\"function\"!==typeof a||delete a[mxObjectIdentity.FIELD_NAME]}};function mxDictionary(){this.clear()}mxDictionary.prototype.map=null;mxDictionary.prototype.clear=function(){this.map={}};mxDictionary.prototype.get=function(a){a=mxObjectIdentity.get(a);return this.map[a]};mxDictionary.prototype.put=function(a,b){a=mxObjectIdentity.get(a);var c=this.map[a];this.map[a]=b;return c};\nmxDictionary.prototype.remove=function(a){a=mxObjectIdentity.get(a);var b=this.map[a];delete this.map[a];return b};mxDictionary.prototype.getCount=function(){var a=0,b;for(b in this.map)a++;return a};mxDictionary.prototype.getKeys=function(){var a=[],b;for(b in this.map)a.push(b);return a};mxDictionary.prototype.getValues=function(){var a=[],b;for(b in this.map)a.push(this.map[b]);return a};mxDictionary.prototype.visit=function(a){for(var b in this.map)a(b,this.map[b])};\nvar mxResources={resources:{},extension:mxResourceExtension,resourcesEncoded:!1,loadDefaultBundle:!0,loadSpecialBundle:!0,isLanguageSupported:function(a){return null!=mxClient.languages?0<=mxUtils.indexOf(mxClient.languages,a):!0},getDefaultBundle:function(a,b){return mxResources.loadDefaultBundle||!mxResources.isLanguageSupported(b)?a+mxResources.extension:null},getSpecialBundle:function(a,b){if(null==mxClient.languages||!this.isLanguageSupported(b)){var c=b.indexOf(\"-\");0<c&&(b=b.substring(0,c))}return mxResources.loadSpecialBundle&&\nmxResources.isLanguageSupported(b)&&b!=mxClient.defaultLanguage?a+\"_\"+b+mxResources.extension:null},add:function(a,b,c){b=null!=b?b:null!=mxClient.language?mxClient.language.toLowerCase():mxConstants.NONE;if(b!=mxConstants.NONE){var d=mxResources.getDefaultBundle(a,b),e=mxResources.getSpecialBundle(a,b),f=function(){if(null!=e)if(c)mxUtils.get(e,function(l){mxResources.parse(l.getText());c()},function(){c()});else try{var k=mxUtils.load(e);k.isReady()&&mxResources.parse(k.getText())}catch(l){}else null!=\nc&&c()};if(null!=d)if(c)mxUtils.get(d,function(k){mxResources.parse(k.getText());f()},function(){f()});else try{var g=mxUtils.load(d);g.isReady()&&mxResources.parse(g.getText());f()}catch(k){}else f()}},parse:function(a){if(null!=a){a=a.split(\"\\n\");for(var b=0;b<a.length;b++)if(\"#\"!=a[b].charAt(0)){var c=a[b].indexOf(\"=\");if(0<c){var d=a[b].substring(0,c),e=a[b].length;13==a[b].charCodeAt(e-1)&&e--;c=a[b].substring(c+1,e);this.resourcesEncoded?(c=c.replace(/\\\\(?=u[a-fA-F\\d]{4})/g,\"%\"),mxResources.resources[d]=\nunescape(c)):mxResources.resources[d]=c}}}},get:function(a,b,c){a=mxResources.resources[a];null==a&&(a=c);null!=a&&null!=b&&(a=mxResources.replacePlaceholders(a,b));return a},replacePlaceholders:function(a,b){for(var c=[],d=null,e=0;e<a.length;e++){var f=a.charAt(e);\"{\"==f?d=\"\":null!=d&&\"}\"==f?(d=parseInt(d)-1,0<=d&&d<b.length&&c.push(b[d]),d=null):null!=d?d+=f:c.push(f)}return c.join(\"\")},loadResources:function(a){mxResources.add(mxClient.basePath+\"/resources/editor\",null,function(){mxResources.add(mxClient.basePath+\n\"/resources/graph\",null,a)})}};function mxPoint(a,b){this.x=null!=a?a:0;this.y=null!=b?b:0}mxPoint.prototype.x=null;mxPoint.prototype.y=null;mxPoint.prototype.equals=function(a){return null!=a&&a.x==this.x&&a.y==this.y};mxPoint.prototype.clone=function(){return mxUtils.clone(this)};function mxRectangle(a,b,c,d){mxPoint.call(this,a,b);this.width=null!=c?c:0;this.height=null!=d?d:0}mxRectangle.prototype=new mxPoint;mxRectangle.prototype.constructor=mxRectangle;mxRectangle.prototype.width=null;\nmxRectangle.prototype.height=null;mxRectangle.prototype.setRect=function(a,b,c,d){this.x=a;this.y=b;this.width=c;this.height=d};mxRectangle.prototype.getCenterX=function(){return this.x+this.width/2};mxRectangle.prototype.getCenterY=function(){return this.y+this.height/2};\nmxRectangle.prototype.add=function(a){if(null!=a){var b=Math.min(this.x,a.x),c=Math.min(this.y,a.y),d=Math.max(this.x+this.width,a.x+a.width);a=Math.max(this.y+this.height,a.y+a.height);this.x=b;this.y=c;this.width=d-b;this.height=a-c}};mxRectangle.prototype.intersect=function(a){if(null!=a){var b=this.x+this.width,c=a.x+a.width,d=this.y+this.height,e=a.y+a.height;this.x=Math.max(this.x,a.x);this.y=Math.max(this.y,a.y);this.width=Math.min(b,c)-this.x;this.height=Math.min(d,e)-this.y}};\nmxRectangle.prototype.grow=function(a){this.x-=a;this.y-=a;this.width+=2*a;this.height+=2*a;return this};mxRectangle.prototype.getPoint=function(){return new mxPoint(this.x,this.y)};mxRectangle.prototype.rotate90=function(){var a=(this.width-this.height)/2;this.x+=a;this.y-=a;a=this.width;this.width=this.height;this.height=a};mxRectangle.prototype.equals=function(a){return null!=a&&a.x==this.x&&a.y==this.y&&a.width==this.width&&a.height==this.height};\nmxRectangle.fromPoint=function(a){return new mxRectangle(a.x,a.y,0,0)};mxRectangle.fromRectangle=function(a){return new mxRectangle(a.x,a.y,a.width,a.height)};\nvar mxEffects={animateChanges:function(a,b,c){var d=0,e=function(){for(var g=!1,k=0;k<b.length;k++){var l=b[k];if(l instanceof mxGeometryChange||l instanceof mxTerminalChange||l instanceof mxValueChange||l instanceof mxChildChange||l instanceof mxStyleChange){var m=a.getView().getState(l.cell||l.child,!1);if(null!=m)if(g=!0,l.constructor!=mxGeometryChange||a.model.isEdge(l.cell))mxUtils.setOpacity(m.shape.node,100*d/10);else{var n=a.getView().scale,p=(l.geometry.x-l.previous.x)*n,q=(l.geometry.y-\nl.previous.y)*n,r=(l.geometry.width-l.previous.width)*n;n*=l.geometry.height-l.previous.height;0==d?(m.x-=p,m.y-=q,m.width-=r,m.height-=n):(m.x+=p/10,m.y+=q/10,m.width+=r/10,m.height+=n/10);a.cellRenderer.redraw(m);mxEffects.cascadeOpacity(a,l.cell,100*d/10)}}}10>d&&g?(d++,window.setTimeout(e,f)):null!=c&&c()},f=30;e()},cascadeOpacity:function(a,b,c){for(var d=a.model.getChildCount(b),e=0;e<d;e++){var f=a.model.getChildAt(b,e),g=a.getView().getState(f);null!=g&&(mxUtils.setOpacity(g.shape.node,c),\nmxEffects.cascadeOpacity(a,f,c))}b=a.model.getEdges(b);if(null!=b)for(e=0;e<b.length;e++)d=a.getView().getState(b[e]),null!=d&&mxUtils.setOpacity(d.shape.node,c)},fadeOut:function(a,b,c,d,e,f){d=d||40;e=e||30;var g=b||100;mxUtils.setOpacity(a,g);if(f||null==f){var k=function(){g=Math.max(g-d,0);mxUtils.setOpacity(a,g);0<g?window.setTimeout(k,e):(a.style.visibility=\"hidden\",c&&a.parentNode&&a.parentNode.removeChild(a))};window.setTimeout(k,e)}else a.style.visibility=\"hidden\",c&&a.parentNode&&a.parentNode.removeChild(a)}},\nmxUtils={errorResource:\"none\"!=mxClient.language?\"error\":\"\",closeResource:\"none\"!=mxClient.language?\"close\":\"\",errorImage:mxClient.imageBasePath+\"/error.gif\",removeCursors:function(a){null!=a.style&&(a.style.cursor=\"\");a=a.childNodes;if(null!=a)for(var b=a.length,c=0;c<b;c+=1)mxUtils.removeCursors(a[c])},getCurrentStyle:function(){return mxClient.IS_IE&&(null==document.documentMode||9>document.documentMode)?function(a){return null!=a?a.currentStyle:null}:function(a){return null!=a?window.getComputedStyle(a,\n\"\"):null}}(),parseCssNumber:function(a){\"thin\"==a?a=\"2\":\"medium\"==a?a=\"4\":\"thick\"==a&&(a=\"6\");a=parseFloat(a);isNaN(a)&&(a=0);return a},setPrefixedStyle:function(){var a=null;mxClient.IS_OT?a=\"O\":mxClient.IS_SF||mxClient.IS_GC?a=\"Webkit\":mxClient.IS_MT?a=\"Moz\":mxClient.IS_IE&&9<=document.documentMode&&10>document.documentMode&&(a=\"ms\");return function(b,c,d){b[c]=d;null!=a&&0<c.length&&(c=a+c.substring(0,1).toUpperCase()+c.substring(1),b[c]=d)}}(),hasScrollbars:function(a){a=mxUtils.getCurrentStyle(a);\nreturn null!=a&&(\"scroll\"==a.overflow||\"auto\"==a.overflow)},bind:function(a,b){return function(){return b.apply(a,arguments)}},eval:function(a){var b=null;if(0<=a.indexOf(\"function\"))try{eval(\"var _mxJavaScriptExpression=\"+a),b=_mxJavaScriptExpression,_mxJavaScriptExpression=null}catch(c){mxLog.warn(c.message+\" while evaluating \"+a)}else try{b=eval(a)}catch(c){mxLog.warn(c.message+\" while evaluating \"+a)}return b},findNode:function(a,b,c){if(a.nodeType==mxConstants.NODETYPE_ELEMENT){var d=a.getAttribute(b);\nif(null!=d&&d==c)return a}for(a=a.firstChild;null!=a;){d=mxUtils.findNode(a,b,c);if(null!=d)return d;a=a.nextSibling}return null},getFunctionName:function(a){var b=null;null!=a&&(null!=a.name?b=a.name:(b=mxUtils.trim(a.toString()),/^function\\s/.test(b)&&(b=mxUtils.ltrim(b.substring(9)),a=b.indexOf(\"(\"),0<a&&(b=b.substring(0,a)))));return b},indexOf:function(a,b){if(null!=a&&null!=b)for(var c=0;c<a.length;c++)if(a[c]==b)return c;return-1},forEach:function(a,b){if(null!=a&&null!=b)for(var c=0;c<a.length;c++)b(a[c]);\nreturn a},remove:function(a,b){var c=null;if(\"object\"==typeof b)for(var d=mxUtils.indexOf(b,a);0<=d;)b.splice(d,1),c=a,d=mxUtils.indexOf(b,a);for(var e in b)b[e]==a&&(delete b[e],c=a);return c},isNode:function(a,b,c,d){return null==a||a.constructor!==Element||null!=b&&a.nodeName.toLowerCase()!=b.toLowerCase()?!1:null==c||a.getAttribute(c)==d},isAncestorNode:function(a,b){for(;null!=b;){if(b==a)return!0;b=b.parentNode}return!1},visitNodes:function(a,b){if(a.nodeType==mxConstants.NODETYPE_ELEMENT)for(b(a),\na=a.firstChild;null!=a;)mxUtils.visitNodes(a,b),a=a.nextSibling},getChildNodes:function(a,b){b=b||mxConstants.NODETYPE_ELEMENT;var c=[];for(a=a.firstChild;null!=a;)a.nodeType==b&&c.push(a),a=a.nextSibling;return c},importNode:function(a,b,c){return mxClient.IS_IE&&(null==document.documentMode||10>document.documentMode)?mxUtils.importNodeImplementation(a,b,c):a.importNode(b,c)},importNodeImplementation:function(a,b,c){switch(b.nodeType){case 1:var d=a.createElement(b.nodeName);if(b.attributes&&0<b.attributes.length)for(var e=\n0;e<b.attributes.length;e++)d.setAttribute(b.attributes[e].nodeName,b.getAttribute(b.attributes[e].nodeName));if(c&&b.childNodes&&0<b.childNodes.length)for(e=0;e<b.childNodes.length;e++)d.appendChild(mxUtils.importNodeImplementation(a,b.childNodes[e],c));return d;case 3:case 4:case 8:return a.createTextNode(null!=b.nodeValue?b.nodeValue:b.value)}},createXmlDocument:function(){var a=null;document.implementation&&document.implementation.createDocument&&(a=document.implementation.createDocument(\"\",\"\",\nnull));return a},parseXml:function(a){return(new DOMParser).parseFromString(a,\"text/xml\")},clearSelection:function(){return document.selection?function(){document.selection.empty()}:window.getSelection?function(){window.getSelection().empty?window.getSelection().empty():window.getSelection().removeAllRanges&&window.getSelection().removeAllRanges()}:function(){}}(),removeWhitespace:function(a,b){for(a=b?a.previousSibling:a.nextSibling;null!=a&&a.nodeType==mxConstants.NODETYPE_TEXT;){var c=b?a.previousSibling:\na.nextSibling,d=mxUtils.getTextContent(a);0==mxUtils.trim(d).length&&a.parentNode.removeChild(a);a=c}},htmlEntities:function(a,b,c,d){a=String(a||\"\");a=a.replace(/&/g,\"&amp;\");a=a.replace(/</g,\"&lt;\");a=a.replace(/>/g,\"&gt;\");if(null==c||c)a=a.replace(/\"/g,\"&quot;\"),a=a.replace(/'/g,\"&#39;\");if(null==b||b)a=a.replace(/\\n/g,\"&#xa;\");if(null==d||d)a=a.replace(/\\t/g,\"&#x9;\");return a},decodeHtml:function(a){var b=document.createElement(\"textarea\");b.innerHTML=a;return b.value},getXml:function(a,b){var c=\n\"\";mxClient.IS_IE||mxClient.IS_IE11?c=mxUtils.getPrettyXml(a,\"\",\"\",\"\"):null!=window.XMLSerializer?c=(new XMLSerializer).serializeToString(a):null!=a.xml&&(c=a.xml.replace(/\\r\\n\\t[\\t]*/g,\"\").replace(/>\\r\\n/g,\">\").replace(/\\r\\n/g,\"\\n\"));return c=c.replace(/\\n/g,b||\"&#xa;\")},getPrettyXml:function(a,b,c,d,e){var f=[];if(null!=a)if(b=null!=b?b:\"  \",c=null!=c?c:\"\",d=null!=d?d:\"\\n\",null!=a.namespaceURI&&a.namespaceURI!=e&&(e=a.namespaceURI,null==a.getAttribute(\"xmlns\")&&a.setAttribute(\"xmlns\",a.namespaceURI)),\na.nodeType==mxConstants.NODETYPE_DOCUMENT)f.push(mxUtils.getPrettyXml(a.documentElement,b,c,d,e));else if(a.nodeType==mxConstants.NODETYPE_DOCUMENT_FRAGMENT){var g=a.firstChild;if(null!=g)for(;null!=g;)f.push(mxUtils.getPrettyXml(g,b,c,d,e)),g=g.nextSibling}else if(a.nodeType==mxConstants.NODETYPE_COMMENT)a=mxUtils.getTextContent(a),0<a.length&&f.push(c+\"\\x3c!--\"+a+\"--\\x3e\"+d);else if(a.nodeType==mxConstants.NODETYPE_TEXT)a=mxUtils.trim(mxUtils.getTextContent(a)),0<a.length&&f.push(c+mxUtils.htmlEntities(a,\n!1,!1)+d);else if(a.nodeType==mxConstants.NODETYPE_CDATA)a=mxUtils.getTextContent(a),0<a.length&&f.push(c+\"<![CDATA[\"+a+\"]]\"+d);else{f.push(c+\"<\"+a.nodeName);g=a.attributes;if(null!=g)for(var k=0;k<g.length;k++){var l=mxUtils.htmlEntities(g[k].value);f.push(\" \"+g[k].nodeName+'=\"'+l+'\"')}g=a.firstChild;if(null!=g){for(f.push(\">\"+d);null!=g;)f.push(mxUtils.getPrettyXml(g,b,c+b,d,e)),g=g.nextSibling;f.push(c+\"</\"+a.nodeName+\">\"+d)}else f.push(\" />\"+d)}return f.join(\"\")},extractTextWithWhitespace:function(a){function b(e){if(1!=\ne.length||\"BR\"!=e[0].nodeName&&\"\\n\"!=e[0].innerHTML)for(var f=0;f<e.length;f++){var g=e[f];\"BR\"==g.nodeName||\"\\n\"==g.innerHTML||(1==e.length||0==f)&&\"DIV\"==g.nodeName&&\"<br>\"==g.innerHTML.toLowerCase()?d.push(\"\\n\"):(3===g.nodeType||4===g.nodeType?0<g.nodeValue.length&&d.push(g.nodeValue):8!==g.nodeType&&0<g.childNodes.length&&b(g.childNodes),f<e.length-1&&0<=mxUtils.indexOf(c,e[f+1].nodeName)&&d.push(\"\\n\"))}}var c=\"BLOCKQUOTE DIV H1 H2 H3 H4 H5 H6 OL P PRE TABLE UL\".split(\" \"),d=[];b(a);return d.join(\"\")},\nreplaceTrailingNewlines:function(a,b){for(var c=\"\";0<a.length&&\"\\n\"==a.charAt(a.length-1);)a=a.substring(0,a.length-1),c+=b;return a+c},getTextContent:function(a){return mxClient.IS_IE&&void 0!==a.innerText?a.innerText:null!=a?a[void 0===a.textContent?\"text\":\"textContent\"]:\"\"},setTextContent:function(a,b){void 0!==a.innerText?a.innerText=b:a[void 0===a.textContent?\"text\":\"textContent\"]=b},getInnerHtml:function(){return mxClient.IS_IE?function(a){return null!=a?a.innerHTML:\"\"}:function(a){return null!=\na?(new XMLSerializer).serializeToString(a):\"\"}}(),getOuterHtml:function(){return mxClient.IS_IE?function(a){if(null!=a){if(null!=a.outerHTML)return a.outerHTML;var b=[];b.push(\"<\"+a.nodeName);var c=a.attributes;if(null!=c)for(var d=0;d<c.length;d++){var e=c[d].value;null!=e&&0<e.length&&(b.push(\" \"),b.push(c[d].nodeName),b.push('=\"'),b.push(e),b.push('\"'))}0==a.innerHTML.length?b.push(\"/>\"):(b.push(\">\"),b.push(a.innerHTML),b.push(\"</\"+a.nodeName+\">\"));return b.join(\"\")}return\"\"}:function(a){return null!=\na?(new XMLSerializer).serializeToString(a):\"\"}}(),write:function(a,b){b=a.ownerDocument.createTextNode(b);null!=a&&a.appendChild(b);return b},writeln:function(a,b){b=a.ownerDocument.createTextNode(b);null!=a&&(a.appendChild(b),a.appendChild(document.createElement(\"br\")));return b},br:function(a,b){b=b||1;for(var c=null,d=0;d<b;d++)null!=a&&(c=a.ownerDocument.createElement(\"br\"),a.appendChild(c));return c},button:function(a,b,c,d){c=null!=c?c:document;c=c.createElement(\"button\");mxUtils.write(c,a);\nmxEvent.addListener(c,\"click\",function(e){b(e)});null!=d&&(c.className=d);return c},para:function(a,b){var c=document.createElement(\"p\");mxUtils.write(c,b);null!=a&&a.appendChild(c);return c},addTransparentBackgroundFilter:function(a){a.style.filter+=\"progid:DXImageTransform.Microsoft.AlphaImageLoader(src='\"+mxClient.imageBasePath+\"/transparent.gif', sizingMethod='scale')\"},linkAction:function(a,b,c,d,e){return mxUtils.link(a,b,function(){c.execute(d)},e)},linkInvoke:function(a,b,c,d,e,f){return mxUtils.link(a,\nb,function(){c[d](e)},f)},link:function(a,b,c,d){var e=document.createElement(\"span\");e.style.color=\"blue\";e.style.textDecoration=\"underline\";e.style.cursor=\"pointer\";null!=d&&(e.style.paddingLeft=d+\"px\");mxEvent.addListener(e,\"click\",c);mxUtils.write(e,b);null!=a&&a.appendChild(e);return e},getDocumentSize:function(){var a=document.body,b=document.documentElement;try{return new mxRectangle(0,0,a.clientWidth||b.clientWidth,Math.max(a.clientHeight||0,b.clientHeight))}catch(c){return new mxRectangle}},\nfit:function(a){var b=mxUtils.getDocumentSize(),c=parseInt(a.offsetLeft),d=parseInt(a.offsetWidth),e=mxUtils.getDocumentScrollOrigin(a.ownerDocument),f=e.x;e=e.y;var g=f+b.width;c+d>g&&(a.style.left=Math.max(f,g-d)+\"px\");c=parseInt(a.offsetTop);d=parseInt(a.offsetHeight);b=e+b.height;c+d>b&&(a.style.top=Math.max(e,b-d)+\"px\")},load:function(a){a=new mxXmlRequest(a,null,\"GET\",!1);a.send();return a},get:function(a,b,c,d,e,f,g){a=new mxXmlRequest(a,null,\"GET\");var k=a.setRequestHeaders;g&&(a.setRequestHeaders=\nfunction(l,m){k.apply(this,arguments);for(var n in g)l.setRequestHeader(n,g[n])});null!=d&&a.setBinary(d);a.send(b,c,e,f);return a},getAll:function(a,b,c){for(var d=a.length,e=[],f=0,g=function(){0==f&&null!=c&&c();f++},k=0;k<a.length;k++)(function(l,m){mxUtils.get(l,function(n){var p=n.getStatus();200>p||299<p?g():(e[m]=n,d--,0==d&&b(e))},g)})(a[k],k);0==d&&b(e)},post:function(a,b,c,d){return(new mxXmlRequest(a,b)).send(c,d)},submit:function(a,b,c,d){return(new mxXmlRequest(a,b)).simulate(c,d)},\nloadInto:function(a,b,c){mxClient.IS_IE?b.onreadystatechange=function(){4==b.readyState&&c()}:b.addEventListener(\"load\",c,!1);b.load(a)},getValue:function(a,b,c){a=null!=a?a[b]:null;null==a&&(a=c);return a},getNumber:function(a,b,c){a=null!=a?a[b]:null;null==a&&(a=c||0);return Number(a)},getColor:function(a,b,c){a=null!=a?a[b]:null;null==a?a=c:a==mxConstants.NONE&&(a=null);return a},isEmptyObject:function(a){for(var b in a)return!1;return!0},clone:function(a,b,c){c=null!=c?c:!1;var d=null;if(null!=\na&&\"function\"==typeof a.constructor)if(a.constructor===Element)d=a.cloneNode(null!=c?!c:!1);else{d=new a.constructor;for(var e in a)e!=mxObjectIdentity.FIELD_NAME&&(null==b||0>mxUtils.indexOf(b,e))&&(d[e]=c||\"object\"!=typeof a[e]?a[e]:mxUtils.clone(a[e]))}return d},equalPoints:function(a,b){if(null==a&&null!=b||null!=a&&null==b||null!=a&&null!=b&&a.length!=b.length)return!1;if(null!=a&&null!=b)for(var c=0;c<a.length;c++)if(null!=a[c]&&null==b[c]||null==a[c]&&null!=b[c]||null!=a[c]&&null!=b[c]&&(a[c].x!=\nb[c].x||a[c].y!=b[c].y))return!1;return!0},equalEntries:function(a,b){var c=0;if(null==a&&null!=b||null!=a&&null==b||null!=a&&null!=b&&a.length!=b.length)return!1;if(null!=a&&null!=b){for(var d in b)c++;for(d in a)if(c--,!(mxUtils.isNaN(a[d])&&mxUtils.isNaN(b[d])||a[d]==b[d]))return!1}return 0==c},removeDuplicates:function(a){for(var b=new mxDictionary,c=[],d=0;d<a.length;d++)b.get(a[d])||(c.push(a[d]),b.put(a[d],!0));return c},isNaN:function(a){return\"number\"==typeof a&&isNaN(a)},extend:function(a,\nb){var c=function(){};c.prototype=b.prototype;a.prototype=new c;a.prototype.constructor=a},toString:function(a){var b=\"\",c;for(c in a)try{if(null==a[c])b+=c+\" = [null]\\n\";else if(\"function\"==typeof a[c])b+=c+\" => [Function]\\n\";else if(\"object\"==typeof a[c]){var d=mxUtils.getFunctionName(a[c].constructor);b+=c+\" => [\"+d+\"]\\n\"}else b+=c+\" = \"+a[c]+\"\\n\"}catch(e){b+=c+\"=\"+e.message}return b},toRadians:function(a){return Math.PI*a/180},toDegree:function(a){return 180*a/Math.PI},arcToCurves:function(a,\nb,c,d,e,f,g,k,l){k-=a;l-=b;if(0===c||0===d)return B;c=Math.abs(c);d=Math.abs(d);var m=-k/2,n=-l/2,p=Math.cos(e*Math.PI/180);B=Math.sin(e*Math.PI/180);e=p*m+B*n;m=-1*B*m+p*n;n=e*e;var q=m*m,r=c*c,t=d*d,u=n/r+q/t;1<u?(c*=Math.sqrt(u),d*=Math.sqrt(u),f=0):(u=1,f===g&&(u=-1),f=u*Math.sqrt((r*t-r*q-t*n)/(r*q+t*n)));n=f*c*m/d;q=-1*f*d*e/c;k=p*n-B*q+k/2;l=B*n+p*q+l/2;r=Math.atan2((m-q)/d,(e-n)/c)-Math.atan2(0,1);f=0<=r?r:2*Math.PI+r;r=Math.atan2((-m-q)/d,(-e-n)/c)-Math.atan2((m-q)/d,(e-n)/c);e=0<=r?r:2*\nMath.PI+r;0==g&&0<e?e-=2*Math.PI:0!=g&&0>e&&(e+=2*Math.PI);g=2*e/Math.PI;g=Math.ceil(0>g?-1*g:g);e/=g;m=8/3*Math.sin(e/4)*Math.sin(e/4)/Math.sin(e/2);n=p*c;p*=d;c*=B;d*=B;var x=Math.cos(f),y=Math.sin(f);q=-m*(n*y+d*x);r=-m*(c*y-p*x);for(var B=[],A=0;A<g;++A){f+=e;x=Math.cos(f);y=Math.sin(f);t=n*x-d*y+k;u=c*x+p*y+l;var C=-m*(n*y+d*x);x=-m*(c*y-p*x);y=6*A;B[y]=Number(q+a);B[y+1]=Number(r+b);B[y+2]=Number(t-C+a);B[y+3]=Number(u-x+b);B[y+4]=Number(t+a);B[y+5]=Number(u+b);q=t+C;r=u+x}return B},getBoundingBox:function(a,\nb,c){var d=null;if(null!=a&&null!=b&&0!=b){b=mxUtils.toRadians(b);d=Math.cos(b);var e=Math.sin(b);c=null!=c?c:new mxPoint(a.x+a.width/2,a.y+a.height/2);var f=new mxPoint(a.x,a.y);b=new mxPoint(a.x+a.width,a.y);var g=new mxPoint(b.x,a.y+a.height);a=new mxPoint(a.x,g.y);f=mxUtils.getRotatedPoint(f,d,e,c);b=mxUtils.getRotatedPoint(b,d,e,c);g=mxUtils.getRotatedPoint(g,d,e,c);a=mxUtils.getRotatedPoint(a,d,e,c);d=new mxRectangle(f.x,f.y,0,0);d.add(new mxRectangle(b.x,b.y,0,0));d.add(new mxRectangle(g.x,\ng.y,0,0));d.add(new mxRectangle(a.x,a.y,0,0))}return d},getRotatedPoint:function(a,b,c,d){d=null!=d?d:new mxPoint;var e=a.x-d.x;a=a.y-d.y;return new mxPoint(e*b-a*c+d.x,a*b+e*c+d.y)},getPortConstraints:function(a,b,c,d){b=mxUtils.getValue(a.style,mxConstants.STYLE_PORT_CONSTRAINT,mxUtils.getValue(b.style,c?mxConstants.STYLE_SOURCE_PORT_CONSTRAINT:mxConstants.STYLE_TARGET_PORT_CONSTRAINT,null));if(null==b)return d;d=b.toString();b=mxConstants.DIRECTION_MASK_NONE;c=0;1==mxUtils.getValue(a.style,mxConstants.STYLE_PORT_CONSTRAINT_ROTATION,\n0)&&(c=mxUtils.getValue(a.style,mxConstants.STYLE_ROTATION,0));a=0;45<c?(a=1,135<=c&&(a=2)):-45>c&&(a=3,-135>=c&&(a=2));if(0<=d.indexOf(mxConstants.DIRECTION_NORTH))switch(a){case 0:b|=mxConstants.DIRECTION_MASK_NORTH;break;case 1:b|=mxConstants.DIRECTION_MASK_EAST;break;case 2:b|=mxConstants.DIRECTION_MASK_SOUTH;break;case 3:b|=mxConstants.DIRECTION_MASK_WEST}if(0<=d.indexOf(mxConstants.DIRECTION_WEST))switch(a){case 0:b|=mxConstants.DIRECTION_MASK_WEST;break;case 1:b|=mxConstants.DIRECTION_MASK_NORTH;\nbreak;case 2:b|=mxConstants.DIRECTION_MASK_EAST;break;case 3:b|=mxConstants.DIRECTION_MASK_SOUTH}if(0<=d.indexOf(mxConstants.DIRECTION_SOUTH))switch(a){case 0:b|=mxConstants.DIRECTION_MASK_SOUTH;break;case 1:b|=mxConstants.DIRECTION_MASK_WEST;break;case 2:b|=mxConstants.DIRECTION_MASK_NORTH;break;case 3:b|=mxConstants.DIRECTION_MASK_EAST}if(0<=d.indexOf(mxConstants.DIRECTION_EAST))switch(a){case 0:b|=mxConstants.DIRECTION_MASK_EAST;break;case 1:b|=mxConstants.DIRECTION_MASK_SOUTH;break;case 2:b|=\nmxConstants.DIRECTION_MASK_WEST;break;case 3:b|=mxConstants.DIRECTION_MASK_NORTH}return b},reversePortConstraints:function(a){var b=(a&mxConstants.DIRECTION_MASK_WEST)<<3;b|=(a&mxConstants.DIRECTION_MASK_NORTH)<<1;b|=(a&mxConstants.DIRECTION_MASK_SOUTH)>>1;return b|=(a&mxConstants.DIRECTION_MASK_EAST)>>3},findNearestSegment:function(a,b,c){var d=-1;if(0<a.absolutePoints.length)for(var e=a.absolutePoints[0],f=null,g=1;g<a.absolutePoints.length;g++){var k=a.absolutePoints[g];e=mxUtils.ptSegDistSq(e.x,\ne.y,k.x,k.y,b,c);if(null==f||e<f)f=e,d=g-1;e=k}return d},getDirectedBounds:function(a,b,c,d,e){var f=mxUtils.getValue(c,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST);d=null!=d?d:mxUtils.getValue(c,mxConstants.STYLE_FLIPH,!1);e=null!=e?e:mxUtils.getValue(c,mxConstants.STYLE_FLIPV,!1);b.x=Math.round(Math.max(0,Math.min(a.width,b.x)));b.y=Math.round(Math.max(0,Math.min(a.height,b.y)));b.width=Math.round(Math.max(0,Math.min(a.width,b.width)));b.height=Math.round(Math.max(0,Math.min(a.height,\nb.height)));if(e&&(f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH)||d&&(f==mxConstants.DIRECTION_EAST||f==mxConstants.DIRECTION_WEST))c=b.x,b.x=b.width,b.width=c;if(d&&(f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH)||e&&(f==mxConstants.DIRECTION_EAST||f==mxConstants.DIRECTION_WEST))c=b.y,b.y=b.height,b.height=c;d=mxRectangle.fromRectangle(b);f==mxConstants.DIRECTION_SOUTH?(d.y=b.x,d.x=b.height,d.width=b.y,d.height=b.width):f==mxConstants.DIRECTION_WEST?(d.y=b.height,\nd.x=b.width,d.width=b.x,d.height=b.y):f==mxConstants.DIRECTION_NORTH&&(d.y=b.width,d.x=b.y,d.width=b.height,d.height=b.x);return new mxRectangle(a.x+d.x,a.y+d.y,a.width-d.width-d.x,a.height-d.height-d.y)},getPerimeterPoint:function(a,b,c){for(var d=null,e=0;e<a.length-1;e++){var f=mxUtils.intersection(a[e].x,a[e].y,a[e+1].x,a[e+1].y,b.x,b.y,c.x,c.y);if(null!=f){var g=c.x-f.x,k=c.y-f.y;f={p:f,distSq:k*k+g*g};null!=f&&(null==d||d.distSq>f.distSq)&&(d=f)}}return null!=d?d.p:null},intersectsPoints:function(a,\nb){for(var c=0;c<b.length-1;c++)if(mxUtils.rectangleIntersectsSegment(a,b[c],b[c+1]))return!0;return!1},rectangleIntersectsSegment:function(a,b,c){var d=a.y,e=a.x,f=d+a.height,g=e+a.width;a=b.x;var k=c.x;b.x>c.x&&(a=c.x,k=b.x);k>g&&(k=g);a<e&&(a=e);if(a>k)return!1;e=b.y;g=c.y;var l=c.x-b.x;1E-7<Math.abs(l)&&(c=(c.y-b.y)/l,b=b.y-c*b.x,e=c*a+b,g=c*k+b);e>g&&(b=g,g=e,e=b);g>f&&(g=f);e<d&&(e=d);return e>g?!1:!0},contains:function(a,b,c){return a.x<=b&&a.x+a.width>=b&&a.y<=c&&a.y+a.height>=c},intersects:function(a,\nb){var c=a.width,d=a.height,e=b.width,f=b.height;if(0>=e||0>=f||0>=c||0>=d)return!1;var g=a.x;a=a.y;var k=b.x;b=b.y;e+=k;f+=b;c+=g;d+=a;return(e<k||e>g)&&(f<b||f>a)&&(c<g||c>k)&&(d<a||d>b)},intersectsHotspot:function(a,b,c,d,e,f){d=null!=d?d:1;e=null!=e?e:0;f=null!=f?f:0;if(0<d){var g=a.getCenterX(),k=a.getCenterY(),l=a.width,m=a.height,n=mxUtils.getValue(a.style,mxConstants.STYLE_STARTSIZE)*a.view.scale;0<n&&(mxUtils.getValue(a.style,mxConstants.STYLE_HORIZONTAL,!0)?(k=a.y+n/2,m=n):(g=a.x+n/2,l=\nn));l=Math.max(e,l*d);m=Math.max(e,m*d);0<f&&(l=Math.min(l,f),m=Math.min(m,f));d=new mxRectangle(g-l/2,k-m/2,l,m);g=mxUtils.toRadians(mxUtils.getValue(a.style,mxConstants.STYLE_ROTATION)||0);0!=g&&(e=Math.cos(-g),f=Math.sin(-g),g=new mxPoint(a.getCenterX(),a.getCenterY()),a=mxUtils.getRotatedPoint(new mxPoint(b,c),e,f,g),b=a.x,c=a.y);return mxUtils.contains(d,b,c)}return!0},getOffset:function(a,b){for(var c=0,d=0,e=!1,f=a,g=document.body,k=document.documentElement;null!=f&&f!=g&&f!=k&&!e;){var l=\nmxUtils.getCurrentStyle(f);null!=l&&(e=e||\"fixed\"==l.position);f=f.parentNode}b||e||(b=mxUtils.getDocumentScrollOrigin(a.ownerDocument),c+=b.x,d+=b.y);a=a.getBoundingClientRect();null!=a&&(c+=a.left,d+=a.top);return new mxPoint(c,d)},getDocumentScrollOrigin:function(a){a=a.defaultView||a.parentWindow;return new mxPoint(null!=a&&void 0!==window.pageXOffset?window.pageXOffset:(document.documentElement||document.body.parentNode||document.body).scrollLeft,null!=a&&void 0!==window.pageYOffset?window.pageYOffset:\n(document.documentElement||document.body.parentNode||document.body).scrollTop)},getScrollOrigin:function(a,b,c){b=null!=b?b:!1;c=null!=c?c:!0;for(var d=null!=a?a.ownerDocument:document,e=d.body,f=d.documentElement,g=new mxPoint,k=!1;null!=a&&a!=e&&a!=f;){isNaN(a.scrollLeft)||isNaN(a.scrollTop)||(g.x+=a.scrollLeft,g.y+=a.scrollTop);var l=mxUtils.getCurrentStyle(a);null!=l&&(k=k||\"fixed\"==l.position);a=b?a.parentNode:null}!k&&c&&(a=mxUtils.getDocumentScrollOrigin(d),g.x+=a.x,g.y+=a.y);return g},convertPoint:function(a,\nb,c){var d=mxUtils.getScrollOrigin(a,!1);a=mxUtils.getOffset(a);a.x-=d.x;a.y-=d.y;return new mxPoint(b-a.x,c-a.y)},ltrim:function(a,b){return null!=a?a.replace(new RegExp(\"^[\"+(b||\"\\\\s\")+\"]+\",\"g\"),\"\"):null},rtrim:function(a,b){return null!=a?a.replace(new RegExp(\"[\"+(b||\"\\\\s\")+\"]+$\",\"g\"),\"\"):null},trim:function(a,b){return mxUtils.ltrim(mxUtils.rtrim(a,b),b)},isNumeric:function(a){return!isNaN(parseFloat(a))&&isFinite(a)&&(\"string\"!=typeof a||0>a.toLowerCase().indexOf(\"0x\"))},isInteger:function(a){return String(parseInt(a))===\nString(a)},mod:function(a,b){return(a%b+b)%b},intersection:function(a,b,c,d,e,f,g,k){var l=(k-f)*(c-a)-(g-e)*(d-b);g=((g-e)*(b-f)-(k-f)*(a-e))/l;e=((c-a)*(b-f)-(d-b)*(a-e))/l;return 0<=g&&1>=g&&0<=e&&1>=e?new mxPoint(a+g*(c-a),b+g*(d-b)):null},ptSegDistSq:function(a,b,c,d,e,f){c-=a;d-=b;e-=a;f-=b;0>=e*c+f*d?c=0:(e=c-e,f=d-f,a=e*c+f*d,c=0>=a?0:a*a/(c*c+d*d));e=e*e+f*f-c;0>e&&(e=0);return e},ptLineDist:function(a,b,c,d,e,f){return Math.abs((d-b)*e-(c-a)*f+c*b-d*a)/Math.sqrt((d-b)*(d-b)+(c-a)*(c-a))},\nrelativeCcw:function(a,b,c,d,e,f){c-=a;d-=b;e-=a;f-=b;a=e*d-f*c;0==a&&(a=e*c+f*d,0<a&&(a=(e-c)*c+(f-d)*d,0>a&&(a=0)));return 0>a?-1:0<a?1:0},animateChanges:function(a,b){mxEffects.animateChanges.apply(this,arguments)},cascadeOpacity:function(a,b,c){mxEffects.cascadeOpacity.apply(this,arguments)},fadeOut:function(a,b,c,d,e,f){mxEffects.fadeOut.apply(this,arguments)},setOpacity:function(a,b){mxClient.IS_IE&&(\"undefined\"===typeof document.documentMode||9>document.documentMode)?a.style.filter=100<=b?\n\"\":\"alpha(opacity=\"+b+\")\":a.style.opacity=b/100},createImage:function(a){var b=document.createElement(\"img\");b.setAttribute(\"src\",a);b.setAttribute(\"border\",\"0\");return b},sortCells:function(a,b){b=null!=b?b:!0;var c=new mxDictionary;a.sort(function(d,e){var f=c.get(d);null==f&&(f=mxCellPath.create(d).split(mxCellPath.PATH_SEPARATOR),c.put(d,f));d=c.get(e);null==d&&(d=mxCellPath.create(e).split(mxCellPath.PATH_SEPARATOR),c.put(e,d));e=mxCellPath.compare(f,d);return 0==e?0:0<e==b?1:-1});return a},\ngetStylename:function(a){return null!=a&&(a=a.split(\";\")[0],0>a.indexOf(\"=\"))?a:\"\"},getStylenames:function(a){var b=[];if(null!=a){a=a.split(\";\");for(var c=0;c<a.length;c++)0>a[c].indexOf(\"=\")&&b.push(a[c])}return b},indexOfStylename:function(a,b){if(null!=a&&null!=b){a=a.split(\";\");for(var c=0,d=0;d<a.length;d++){if(a[d]==b)return c;c+=a[d].length+1}}return-1},addStylename:function(a,b){0>mxUtils.indexOfStylename(a,b)&&(null==a?a=\"\":0<a.length&&\";\"!=a.charAt(a.length-1)&&(a+=\";\"),a+=b);return a},\nremoveStylename:function(a,b){var c=[];if(null!=a){a=a.split(\";\");for(var d=0;d<a.length;d++)a[d]!=b&&c.push(a[d])}return c.join(\";\")},removeAllStylenames:function(a){var b=[];if(null!=a){a=a.split(\";\");for(var c=0;c<a.length;c++)0<=a[c].indexOf(\"=\")&&b.push(a[c])}return b.join(\";\")},setCellStyles:function(a,b,c,d){if(null!=b&&0<b.length){a.beginUpdate();try{for(var e=0;e<b.length;e++)if(null!=b[e]){var f=mxUtils.setStyle(a.getStyle(b[e]),c,d);a.setStyle(b[e],f)}}finally{a.endUpdate()}}},hex2rgb:function(a){if(null!=\na&&7==a.length&&\"#\"==a.charAt(0)){var b=parseInt(a.substring(1,3),16),c=parseInt(a.substring(3,5),16);a=parseInt(a.substring(5,7),16);a=\"rgb(\"+b+\", \"+c+\", \"+a+\")\"}return a},hex2rgba:function(a){if(null!=a&&7<=a.length&&\"#\"==a.charAt(0)){var b=parseInt(a.substring(1,3),16),c=parseInt(a.substring(3,5),16),d=parseInt(a.substring(5,7),16),e=1;7<a.length&&(e=parseInt(a.substring(7,9),16)/255);a=\"rgba(\"+b+\", \"+c+\", \"+d+\", \"+e+\")\"}return a},rgba2hex:function(a){return(rgb=a&&a.match?a.match(/^rgba?[\\s+]?\\([\\s+]?(\\d+)[\\s+]?,[\\s+]?(\\d+)[\\s+]?,[\\s+]?(\\d+)[\\s+]?/i):\na)&&4===rgb.length?\"#\"+(\"0\"+parseInt(rgb[1],10).toString(16)).slice(-2)+(\"0\"+parseInt(rgb[2],10).toString(16)).slice(-2)+(\"0\"+parseInt(rgb[3],10).toString(16)).slice(-2):a},setStyle:function(a,b,c){var d=null!=c&&(\"undefined\"==typeof c.length||0<c.length);if(null==a||0==a.length)d&&(a=b+\"=\"+c+\";\");else if(a.substring(0,b.length+1)==b+\"=\"){var e=a.indexOf(\";\");a=d?b+\"=\"+c+(0>e?\";\":a.substring(e)):0>e||e==a.length-1?\"\":a.substring(e+1)}else{var f=a.indexOf(\";\"+b+\"=\");0>f?d&&(d=\";\"==a.charAt(a.length-\n1)?\"\":\";\",a=a+d+b+\"=\"+c+\";\"):(e=a.indexOf(\";\",f+1),a=d?a.substring(0,f+1)+b+\"=\"+c+(0>e?\";\":a.substring(e)):a.substring(0,f)+(0>e?\";\":a.substring(e)))}return a},setCellStyleFlags:function(a,b,c,d,e){if(null!=b&&0<b.length){a.beginUpdate();try{for(var f=0;f<b.length;f++)if(null!=b[f]){var g=mxUtils.setStyleFlag(a.getStyle(b[f]),c,d,e);a.setStyle(b[f],g)}}finally{a.endUpdate()}}},setStyleFlag:function(a,b,c,d){if(null==a||0==a.length)a=d||null==d?b+\"=\"+c:b+\"=0\";else{var e=a.indexOf(b+\"=\");if(0>e)e=\";\"==\na.charAt(a.length-1)?\"\":\";\",a=d||null==d?a+e+b+\"=\"+c:a+e+b+\"=0\";else{var f=a.indexOf(\";\",e);var g=0>f?a.substring(e+b.length+1):a.substring(e+b.length+1,f);g=null==d?parseInt(g)^c:d?parseInt(g)|c:parseInt(g)&~c;a=a.substring(0,e)+b+\"=\"+g+(0<=f?a.substring(f):\"\")}}return a},getAlignmentAsPoint:function(a,b){var c=-.5,d=-.5;a==mxConstants.ALIGN_LEFT?c=0:a==mxConstants.ALIGN_RIGHT&&(c=-1);b==mxConstants.ALIGN_TOP?d=0:b==mxConstants.ALIGN_BOTTOM&&(d=-1);return new mxPoint(c,d)},getSizeForString:function(a,\nb,c,d,e){b=null!=b?b:mxConstants.DEFAULT_FONTSIZE;c=null!=c?c:mxConstants.DEFAULT_FONTFAMILY;var f=document.createElement(\"div\");f.style.fontFamily=c;f.style.fontSize=Math.round(b)+\"px\";f.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?b*mxConstants.LINE_HEIGHT+\"px\":mxConstants.LINE_HEIGHT*mxSvgCanvas2D.prototype.lineHeightCorrection;null!=e&&((e&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&(f.style.fontWeight=\"bold\"),(e&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&(f.style.fontStyle=\"italic\"),\nb=[],(e&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&b.push(\"underline\"),(e&mxConstants.FONT_STRIKETHROUGH)==mxConstants.FONT_STRIKETHROUGH&&b.push(\"line-through\"),0<b.length&&(f.style.textDecoration=b.join(\" \")));f.style.position=\"absolute\";f.style.visibility=\"hidden\";f.style.display=\"inline-block\";f.style.zoom=\"1\";null!=d?(f.style.width=d+\"px\",f.style.whiteSpace=\"normal\"):f.style.whiteSpace=\"nowrap\";f.innerHTML=a;document.body.appendChild(f);a=new mxRectangle(0,0,f.offsetWidth,f.offsetHeight);\ndocument.body.removeChild(f);return a},getViewXml:function(a,b,c,d,e){d=null!=d?d:0;e=null!=e?e:0;b=null!=b?b:1;null==c&&(c=[a.getModel().getRoot()]);var f=a.getView(),g=null,k=f.isEventsEnabled();f.setEventsEnabled(!1);var l=f.drawPane,m=f.overlayPane;a.dialect==mxConstants.DIALECT_SVG?(f.drawPane=document.createElementNS(mxConstants.NS_SVG,\"g\"),f.canvas.appendChild(f.drawPane),f.overlayPane=document.createElementNS(mxConstants.NS_SVG,\"g\")):(f.drawPane=f.drawPane.cloneNode(!1),f.canvas.appendChild(f.drawPane),\nf.overlayPane=f.overlayPane.cloneNode(!1));f.canvas.appendChild(f.overlayPane);var n=f.getTranslate();f.translate=new mxPoint(d,e);b=new mxTemporaryCellStates(a.getView(),b,c);try{g=(new mxCodec).encode(a.getView())}finally{b.destroy(),f.translate=n,f.canvas.removeChild(f.drawPane),f.canvas.removeChild(f.overlayPane),f.drawPane=l,f.overlayPane=m,f.setEventsEnabled(k)}return g},getScaleForPageCount:function(a,b,c,d){if(1>a)return 1;c=null!=c?c:mxConstants.PAGE_FORMAT_A4_PORTRAIT;d=null!=d?d:0;var e=\nc.width-2*d;c=c.height-2*d;d=mxRectangle.fromRectangle(b.getGraphBounds());b=b.getView().getScale();d.width/=b;d.height/=b;b=d.width;var f=Math.sqrt(a);d=Math.sqrt(b/d.height/(e/c));c=f*d;d=f/d;if(1>c&&d>a){var g=d/a;d=a;c/=g}1>d&&c>a&&(g=c/a,c=a,d/=g);g=Math.ceil(c)*Math.ceil(d);for(f=0;g>a;){g=Math.floor(c)/c;var k=Math.floor(d)/d;1==g&&(g=Math.floor(c-1)/c);1==k&&(k=Math.floor(d-1)/d);g=g>k?g:k;c*=g;d*=g;g=Math.ceil(c)*Math.ceil(d);f++;if(10<f)break}return e*c/b*.99999},show:function(a,b,c,d,e,\nf){c=null!=c?c:0;d=null!=d?d:0;null==b?b=window.open().document:b.open();9==document.documentMode&&b.writeln('\\x3c!--[if IE]><meta http-equiv=\"X-UA-Compatible\" content=\"IE=9\"><![endif]--\\x3e');var g=a.getGraphBounds(),k=Math.ceil(c-g.x),l=Math.ceil(d-g.y);null==e&&(e=Math.ceil(g.width+c)+Math.ceil(Math.ceil(g.x)-g.x));null==f&&(f=Math.ceil(g.height+d)+Math.ceil(Math.ceil(g.y)-g.y));if(mxClient.IS_IE||11==document.documentMode){d=\"<html><head>\";g=document.getElementsByTagName(\"base\");for(c=0;c<g.length;c++)d+=\ng[c].outerHTML;d+=\"<style>\";for(c=0;c<document.styleSheets.length;c++)try{d+=document.styleSheets[c].cssText}catch(m){}d=d+'</style></head><body style=\"margin:0px;\"><div style=\"position:absolute;overflow:hidden;width:'+(e+\"px;height:\"+f+'px;\"><div style=\"position:relative;left:'+k+\"px;top:\"+l+'px;\">')+a.container.innerHTML;b.writeln(d+\"</div></div></body><html>\");b.close()}else{b.writeln(\"<html><head>\");g=document.getElementsByTagName(\"base\");for(c=0;c<g.length;c++)b.writeln(mxUtils.getOuterHtml(g[c]));\nd=document.getElementsByTagName(\"link\");for(c=0;c<d.length;c++)b.writeln(mxUtils.getOuterHtml(d[c]));d=document.getElementsByTagName(\"style\");for(c=0;c<d.length;c++)b.writeln(mxUtils.getOuterHtml(d[c]));b.writeln('</head><body style=\"margin:0px;\"></body></html>');b.close();c=b.createElement(\"div\");c.position=\"absolute\";c.overflow=\"hidden\";c.style.width=e+\"px\";c.style.height=f+\"px\";e=b.createElement(\"div\");e.style.position=\"absolute\";e.style.left=k+\"px\";e.style.top=l+\"px\";f=a.container.firstChild;\nfor(d=null;null!=f;)g=f.cloneNode(!0),f==a.view.drawPane.ownerSVGElement?(c.appendChild(g),d=g):e.appendChild(g),f=f.nextSibling;b.body.appendChild(c);null!=e.firstChild&&b.body.appendChild(e);null!=d&&(d.style.minWidth=\"\",d.style.minHeight=\"\",d.firstChild.setAttribute(\"transform\",\"translate(\"+k+\",\"+l+\")\"))}mxUtils.removeCursors(b.body);return b},printScreen:function(a){var b=window.open();mxUtils.show(a,b.document);a=function(){b.focus();b.print();b.close()};mxClient.IS_GC?b.setTimeout(a,500):a()},\npopup:function(a,b){if(b){var c=document.createElement(\"div\");c.style.overflow=\"scroll\";c.style.width=\"636px\";c.style.height=\"460px\";b=document.createElement(\"pre\");b.innerHTML=mxUtils.htmlEntities(a,!1).replace(/\\n/g,\"<br>\").replace(/ /g,\"&nbsp;\");c.appendChild(b);c=new mxWindow(\"Popup Window\",c,document.body.clientWidth/2-320,Math.max(document.body.clientHeight||0,document.documentElement.clientHeight)/2-240,640,480,!1,!0);c.setClosable(!0);c.setVisible(!0)}else mxClient.IS_NS?(c=window.open(),\nc.document.writeln(\"<pre>\"+mxUtils.htmlEntities(a)+\"</pre\"),c.document.close()):(c=window.open(),b=c.document.createElement(\"pre\"),b.innerHTML=mxUtils.htmlEntities(a,!1).replace(/\\n/g,\"<br>\").replace(/ /g,\"&nbsp;\"),c.document.body.appendChild(b))},alert:function(a){alert(a)},prompt:function(a,b){return prompt(a,null!=b?b:\"\")},confirm:function(a){return confirm(a)},error:function(a,b,c,d){var e=document.createElement(\"div\");e.style.padding=\"20px\";var f=document.createElement(\"img\");f.setAttribute(\"src\",\nd||mxUtils.errorImage);f.setAttribute(\"valign\",\"bottom\");f.style.verticalAlign=\"middle\";e.appendChild(f);e.appendChild(document.createTextNode(\" \"));e.appendChild(document.createTextNode(\" \"));e.appendChild(document.createTextNode(\" \"));mxUtils.write(e,a);a=document.body.clientWidth;d=document.body.clientHeight||document.documentElement.clientHeight;var g=new mxWindow(mxResources.get(mxUtils.errorResource)||mxUtils.errorResource,e,(a-b)/2,d/4,b,null,!1,!0);c&&(mxUtils.br(e),b=document.createElement(\"p\"),\nc=document.createElement(\"button\"),mxClient.IS_IE?c.style.cssText=\"float:right\":c.setAttribute(\"style\",\"float:right\"),mxEvent.addListener(c,\"click\",function(k){g.destroy()}),mxUtils.write(c,mxResources.get(mxUtils.closeResource)||mxUtils.closeResource),b.appendChild(c),e.appendChild(b),mxUtils.br(e),g.setClosable(!0));g.setVisible(!0);return g},makeDraggable:function(a,b,c,d,e,f,g,k,l,m){a=new mxDragSource(a,c);a.dragOffset=new mxPoint(null!=e?e:0,null!=f?f:mxConstants.TOOLTIP_VERTICAL_OFFSET);a.autoscroll=\ng;a.setGuidesEnabled(!1);null!=l&&(a.highlightDropTargets=l);null!=m&&(a.getDropTarget=m);a.getGraphForEvent=function(n){return\"function\"==typeof b?b(n):b};null!=d&&(a.createDragElement=function(){return d.cloneNode(!0)},k&&(a.createPreviewElement=function(n){var p=d.cloneNode(!0),q=parseInt(p.style.width),r=parseInt(p.style.height);p.style.width=Math.round(q*n.view.scale)+\"px\";p.style.height=Math.round(r*n.view.scale)+\"px\";return p}));return a},format:function(a){return parseFloat(parseFloat(a).toFixed(2))}},\nmxConstants={DEFAULT_HOTSPOT:.3,MIN_HOTSPOT_SIZE:8,MAX_HOTSPOT_SIZE:0,RENDERING_HINT_EXACT:\"exact\",RENDERING_HINT_FASTER:\"faster\",RENDERING_HINT_FASTEST:\"fastest\",DIALECT_SVG:\"svg\",DIALECT_MIXEDHTML:\"mixedHtml\",DIALECT_PREFERHTML:\"preferHtml\",DIALECT_STRICTHTML:\"strictHtml\",NS_SVG:\"http://www.w3.org/2000/svg\",NS_XHTML:\"http://www.w3.org/1999/xhtml\",NS_XLINK:\"http://www.w3.org/1999/xlink\",SHADOWCOLOR:\"gray\",VML_SHADOWCOLOR:\"gray\",SHADOW_OFFSET_X:2,SHADOW_OFFSET_Y:3,SHADOW_OPACITY:1,NODETYPE_ELEMENT:1,\nNODETYPE_ATTRIBUTE:2,NODETYPE_TEXT:3,NODETYPE_CDATA:4,NODETYPE_ENTITY_REFERENCE:5,NODETYPE_ENTITY:6,NODETYPE_PROCESSING_INSTRUCTION:7,NODETYPE_COMMENT:8,NODETYPE_DOCUMENT:9,NODETYPE_DOCUMENTTYPE:10,NODETYPE_DOCUMENT_FRAGMENT:11,NODETYPE_NOTATION:12,TOOLTIP_VERTICAL_OFFSET:16,DEFAULT_VALID_COLOR:\"#00FF00\",DEFAULT_INVALID_COLOR:\"#FF0000\",OUTLINE_HIGHLIGHT_COLOR:\"#00FF00\",OUTLINE_HIGHLIGHT_STROKEWIDTH:5,HIGHLIGHT_STROKEWIDTH:3,HIGHLIGHT_SIZE:2,HIGHLIGHT_OPACITY:100,CURSOR_MOVABLE_VERTEX:\"move\",CURSOR_MOVABLE_EDGE:\"move\",\nCURSOR_LABEL_HANDLE:\"default\",CURSOR_TERMINAL_HANDLE:\"pointer\",CURSOR_BEND_HANDLE:\"crosshair\",CURSOR_VIRTUAL_BEND_HANDLE:\"crosshair\",CURSOR_CONNECT:\"pointer\",HIGHLIGHT_COLOR:\"#00FF00\",CONNECT_TARGET_COLOR:\"#0000FF\",INVALID_CONNECT_TARGET_COLOR:\"#FF0000\",DROP_TARGET_COLOR:\"#0000FF\",VALID_COLOR:\"#00FF00\",INVALID_COLOR:\"#FF0000\",EDGE_SELECTION_COLOR:\"#00FF00\",VERTEX_SELECTION_COLOR:\"#00FF00\",VERTEX_SELECTION_STROKEWIDTH:1,EDGE_SELECTION_STROKEWIDTH:1,VERTEX_SELECTION_DASHED:!0,EDGE_SELECTION_DASHED:!0,\nGUIDE_COLOR:\"#FF0000\",GUIDE_STROKEWIDTH:1,OUTLINE_COLOR:\"#0099FF\",OUTLINE_STROKEWIDTH:mxClient.IS_IE?2:3,HANDLE_SIZE:6,LABEL_HANDLE_SIZE:4,HANDLE_FILLCOLOR:\"#00FF00\",HANDLE_STROKECOLOR:\"black\",LABEL_HANDLE_FILLCOLOR:\"yellow\",CONNECT_HANDLE_FILLCOLOR:\"#0000FF\",LOCKED_HANDLE_FILLCOLOR:\"#FF0000\",OUTLINE_HANDLE_FILLCOLOR:\"#00FFFF\",OUTLINE_HANDLE_STROKECOLOR:\"#0033FF\",DEFAULT_FONTFAMILY:\"Arial,Helvetica\",DEFAULT_FONTSIZE:11,DEFAULT_TEXT_DIRECTION:\"\",LINE_HEIGHT:1.2,WORD_WRAP:\"normal\",ABSOLUTE_LINE_HEIGHT:!1,\nDEFAULT_FONTSTYLE:0,DEFAULT_STARTSIZE:40,DEFAULT_MARKERSIZE:6,DEFAULT_IMAGESIZE:24,ENTITY_SEGMENT:30,RECTANGLE_ROUNDING_FACTOR:.15,LINE_ARCSIZE:20,ARROW_SPACING:0,ARROW_WIDTH:30,ARROW_SIZE:30,PAGE_FORMAT_A4_PORTRAIT:new mxRectangle(0,0,827,1169),PAGE_FORMAT_A4_LANDSCAPE:new mxRectangle(0,0,1169,827),PAGE_FORMAT_LETTER_PORTRAIT:new mxRectangle(0,0,850,1100),PAGE_FORMAT_LETTER_LANDSCAPE:new mxRectangle(0,0,1100,850),NONE:\"none\",STYLE_PERIMETER:\"perimeter\",STYLE_SOURCE_PORT:\"sourcePort\",STYLE_TARGET_PORT:\"targetPort\",\nSTYLE_PORT_CONSTRAINT:\"portConstraint\",STYLE_PORT_CONSTRAINT_ROTATION:\"portConstraintRotation\",STYLE_SOURCE_PORT_CONSTRAINT:\"sourcePortConstraint\",STYLE_TARGET_PORT_CONSTRAINT:\"targetPortConstraint\",STYLE_OPACITY:\"opacity\",STYLE_FILL_OPACITY:\"fillOpacity\",STYLE_FILL_STYLE:\"fillStyle\",STYLE_STROKE_OPACITY:\"strokeOpacity\",STYLE_TEXT_OPACITY:\"textOpacity\",STYLE_TEXT_DIRECTION:\"textDirection\",STYLE_OVERFLOW:\"overflow\",STYLE_BLOCK_SPACING:\"blockSpacing\",STYLE_ORTHOGONAL:\"orthogonal\",STYLE_EXIT_X:\"exitX\",\nSTYLE_EXIT_Y:\"exitY\",STYLE_EXIT_DX:\"exitDx\",STYLE_EXIT_DY:\"exitDy\",STYLE_EXIT_PERIMETER:\"exitPerimeter\",STYLE_ENTRY_X:\"entryX\",STYLE_ENTRY_Y:\"entryY\",STYLE_ENTRY_DX:\"entryDx\",STYLE_ENTRY_DY:\"entryDy\",STYLE_ENTRY_PERIMETER:\"entryPerimeter\",STYLE_WHITE_SPACE:\"whiteSpace\",STYLE_ROTATION:\"rotation\",STYLE_FILLCOLOR:\"fillColor\",STYLE_POINTER_EVENTS:\"pointerEvents\",STYLE_SWIMLANE_FILLCOLOR:\"swimlaneFillColor\",STYLE_MARGIN:\"margin\",STYLE_GRADIENTCOLOR:\"gradientColor\",STYLE_GRADIENT_DIRECTION:\"gradientDirection\",\nSTYLE_STROKECOLOR:\"strokeColor\",STYLE_SEPARATORCOLOR:\"separatorColor\",STYLE_STROKEWIDTH:\"strokeWidth\",STYLE_ALIGN:\"align\",STYLE_VERTICAL_ALIGN:\"verticalAlign\",STYLE_LABEL_WIDTH:\"labelWidth\",STYLE_LABEL_POSITION:\"labelPosition\",STYLE_VERTICAL_LABEL_POSITION:\"verticalLabelPosition\",STYLE_IMAGE_ASPECT:\"imageAspect\",STYLE_IMAGE_ALIGN:\"imageAlign\",STYLE_IMAGE_VERTICAL_ALIGN:\"imageVerticalAlign\",STYLE_GLASS:\"glass\",STYLE_IMAGE:\"image\",STYLE_IMAGE_WIDTH:\"imageWidth\",STYLE_IMAGE_HEIGHT:\"imageHeight\",STYLE_IMAGE_BACKGROUND:\"imageBackground\",\nSTYLE_IMAGE_BORDER:\"imageBorder\",STYLE_FLIPH:\"flipH\",STYLE_FLIPV:\"flipV\",STYLE_NOLABEL:\"noLabel\",STYLE_NOEDGESTYLE:\"noEdgeStyle\",STYLE_LABEL_BACKGROUNDCOLOR:\"labelBackgroundColor\",STYLE_LABEL_BORDERCOLOR:\"labelBorderColor\",STYLE_LABEL_PADDING:\"labelPadding\",STYLE_INDICATOR_SHAPE:\"indicatorShape\",STYLE_INDICATOR_IMAGE:\"indicatorImage\",STYLE_INDICATOR_COLOR:\"indicatorColor\",STYLE_INDICATOR_STROKECOLOR:\"indicatorStrokeColor\",STYLE_INDICATOR_GRADIENTCOLOR:\"indicatorGradientColor\",STYLE_INDICATOR_SPACING:\"indicatorSpacing\",\nSTYLE_INDICATOR_WIDTH:\"indicatorWidth\",STYLE_INDICATOR_HEIGHT:\"indicatorHeight\",STYLE_INDICATOR_DIRECTION:\"indicatorDirection\",STYLE_SHADOW:\"shadow\",STYLE_SEGMENT:\"segment\",STYLE_ENDARROW:\"endArrow\",STYLE_STARTARROW:\"startArrow\",STYLE_ENDSIZE:\"endSize\",STYLE_STARTSIZE:\"startSize\",STYLE_SWIMLANE_LINE:\"swimlaneLine\",STYLE_SWIMLANE_HEAD:\"swimlaneHead\",STYLE_SWIMLANE_BODY:\"swimlaneBody\",STYLE_ENDFILL:\"endFill\",STYLE_STARTFILL:\"startFill\",STYLE_DASHED:\"dashed\",STYLE_DASH_PATTERN:\"dashPattern\",STYLE_FIX_DASH:\"fixDash\",\nSTYLE_ROUNDED:\"rounded\",STYLE_CURVED:\"curved\",STYLE_ARCSIZE:\"arcSize\",STYLE_ABSOLUTE_ARCSIZE:\"absoluteArcSize\",STYLE_SOURCE_PERIMETER_SPACING:\"sourcePerimeterSpacing\",STYLE_TARGET_PERIMETER_SPACING:\"targetPerimeterSpacing\",STYLE_PERIMETER_SPACING:\"perimeterSpacing\",STYLE_SPACING:\"spacing\",STYLE_SPACING_TOP:\"spacingTop\",STYLE_SPACING_LEFT:\"spacingLeft\",STYLE_SPACING_BOTTOM:\"spacingBottom\",STYLE_SPACING_RIGHT:\"spacingRight\",STYLE_HORIZONTAL:\"horizontal\",STYLE_DIRECTION:\"direction\",STYLE_ANCHOR_POINT_DIRECTION:\"anchorPointDirection\",\nSTYLE_ELBOW:\"elbow\",STYLE_FONTCOLOR:\"fontColor\",STYLE_FONTFAMILY:\"fontFamily\",STYLE_FONTSIZE:\"fontSize\",STYLE_FONTSTYLE:\"fontStyle\",STYLE_ASPECT:\"aspect\",STYLE_AUTOSIZE:\"autosize\",STYLE_FIXED_WIDTH:\"fixedWidth\",STYLE_FOLDABLE:\"foldable\",STYLE_EDITABLE:\"editable\",STYLE_BACKGROUND_OUTLINE:\"backgroundOutline\",STYLE_BENDABLE:\"bendable\",STYLE_MOVABLE:\"movable\",STYLE_RESIZABLE:\"resizable\",STYLE_RESIZE_WIDTH:\"resizeWidth\",STYLE_RESIZE_HEIGHT:\"resizeHeight\",STYLE_ROTATABLE:\"rotatable\",STYLE_CLONEABLE:\"cloneable\",\nSTYLE_DELETABLE:\"deletable\",STYLE_SHAPE:\"shape\",STYLE_EDGE:\"edgeStyle\",STYLE_JETTY_SIZE:\"jettySize\",STYLE_SOURCE_JETTY_SIZE:\"sourceJettySize\",STYLE_TARGET_JETTY_SIZE:\"targetJettySize\",STYLE_LOOP:\"loopStyle\",STYLE_ORTHOGONAL_LOOP:\"orthogonalLoop\",STYLE_ROUTING_CENTER_X:\"routingCenterX\",STYLE_ROUTING_CENTER_Y:\"routingCenterY\",STYLE_CLIP_PATH:\"clipPath\",FONT_BOLD:1,FONT_ITALIC:2,FONT_UNDERLINE:4,FONT_STRIKETHROUGH:8,SHAPE_RECTANGLE:\"rectangle\",SHAPE_ELLIPSE:\"ellipse\",SHAPE_DOUBLE_ELLIPSE:\"doubleEllipse\",\nSHAPE_RHOMBUS:\"rhombus\",SHAPE_LINE:\"line\",SHAPE_IMAGE:\"image\",SHAPE_ARROW:\"arrow\",SHAPE_ARROW_CONNECTOR:\"arrowConnector\",SHAPE_LABEL:\"label\",SHAPE_CYLINDER:\"cylinder\",SHAPE_SWIMLANE:\"swimlane\",SHAPE_CONNECTOR:\"connector\",SHAPE_ACTOR:\"actor\",SHAPE_CLOUD:\"cloud\",SHAPE_TRIANGLE:\"triangle\",SHAPE_HEXAGON:\"hexagon\",ARROW_CLASSIC:\"classic\",ARROW_CLASSIC_THIN:\"classicThin\",ARROW_BLOCK:\"block\",ARROW_BLOCK_THIN:\"blockThin\",ARROW_OPEN:\"open\",ARROW_OPEN_THIN:\"openThin\",ARROW_OVAL:\"oval\",ARROW_DIAMOND:\"diamond\",\nARROW_DIAMOND_THIN:\"diamondThin\",ALIGN_LEFT:\"left\",ALIGN_CENTER:\"center\",ALIGN_RIGHT:\"right\",ALIGN_TOP:\"top\",ALIGN_MIDDLE:\"middle\",ALIGN_BOTTOM:\"bottom\",DIRECTION_NORTH:\"north\",DIRECTION_SOUTH:\"south\",DIRECTION_EAST:\"east\",DIRECTION_WEST:\"west\",DIRECTION_RADIAL:\"radial\",TEXT_DIRECTION_DEFAULT:\"\",TEXT_DIRECTION_AUTO:\"auto\",TEXT_DIRECTION_LTR:\"ltr\",TEXT_DIRECTION_RTL:\"rtl\",DIRECTION_MASK_NONE:0,DIRECTION_MASK_WEST:1,DIRECTION_MASK_NORTH:2,DIRECTION_MASK_SOUTH:4,DIRECTION_MASK_EAST:8,DIRECTION_MASK_ALL:15,\nELBOW_VERTICAL:\"vertical\",ELBOW_HORIZONTAL:\"horizontal\",EDGESTYLE_ELBOW:\"elbowEdgeStyle\",EDGESTYLE_ENTITY_RELATION:\"entityRelationEdgeStyle\",EDGESTYLE_LOOP:\"loopEdgeStyle\",EDGESTYLE_SIDETOSIDE:\"sideToSideEdgeStyle\",EDGESTYLE_TOPTOBOTTOM:\"topToBottomEdgeStyle\",EDGESTYLE_ORTHOGONAL:\"orthogonalEdgeStyle\",EDGESTYLE_SEGMENT:\"segmentEdgeStyle\",PERIMETER_ELLIPSE:\"ellipsePerimeter\",PERIMETER_RECTANGLE:\"rectanglePerimeter\",PERIMETER_RHOMBUS:\"rhombusPerimeter\",PERIMETER_HEXAGON:\"hexagonPerimeter\",PERIMETER_TRIANGLE:\"trianglePerimeter\"};\nfunction mxEventObject(a){this.name=a;this.properties=[];for(var b=1;b<arguments.length;b+=2)null!=arguments[b+1]&&(this.properties[arguments[b]]=arguments[b+1])}mxEventObject.prototype.name=null;mxEventObject.prototype.properties=null;mxEventObject.prototype.consumed=!1;mxEventObject.prototype.getName=function(){return this.name};mxEventObject.prototype.getProperties=function(){return this.properties};mxEventObject.prototype.getProperty=function(a){return this.properties[a]};\nmxEventObject.prototype.isConsumed=function(){return this.consumed};mxEventObject.prototype.consume=function(){this.consumed=!0};function mxMouseEvent(a,b){this.evt=a;this.sourceState=this.state=b}mxMouseEvent.prototype.consumed=!1;mxMouseEvent.prototype.evt=null;mxMouseEvent.prototype.graphX=null;mxMouseEvent.prototype.graphY=null;mxMouseEvent.prototype.state=null;mxMouseEvent.prototype.sourceState=null;mxMouseEvent.prototype.getEvent=function(){return this.evt};\nmxMouseEvent.prototype.getSource=function(){return mxEvent.getSource(this.evt)};mxMouseEvent.prototype.isSource=function(a){return null!=a?mxUtils.isAncestorNode(a.node,this.getSource()):!1};mxMouseEvent.prototype.getX=function(){return mxEvent.getClientX(this.getEvent())};mxMouseEvent.prototype.getY=function(){return mxEvent.getClientY(this.getEvent())};mxMouseEvent.prototype.getGraphX=function(){return this.graphX};mxMouseEvent.prototype.getGraphY=function(){return this.graphY};\nmxMouseEvent.prototype.getState=function(){return this.state};mxMouseEvent.prototype.getCell=function(){var a=this.getState();return null!=a?a.cell:null};mxMouseEvent.prototype.isPopupTrigger=function(){return mxEvent.isPopupTrigger(this.getEvent())};mxMouseEvent.prototype.isConsumed=function(){return this.consumed};\nmxMouseEvent.prototype.consume=function(a){(a=null!=a?a:null!=this.evt.touches||mxEvent.isMouseEvent(this.evt))&&this.evt.preventDefault&&this.evt.preventDefault();mxClient.IS_IE&&(this.evt.returnValue=!0);this.consumed=!0};function mxEventSource(a){this.setEventSource(a)}mxEventSource.prototype.eventListeners=null;mxEventSource.prototype.eventsEnabled=!0;mxEventSource.prototype.eventSource=null;mxEventSource.prototype.isEventsEnabled=function(){return this.eventsEnabled};\nmxEventSource.prototype.setEventsEnabled=function(a){this.eventsEnabled=a};mxEventSource.prototype.getEventSource=function(){return this.eventSource};mxEventSource.prototype.setEventSource=function(a){this.eventSource=a};mxEventSource.prototype.addListener=function(a,b){null==this.eventListeners&&(this.eventListeners=[]);this.eventListeners.push(a);this.eventListeners.push(b)};\nmxEventSource.prototype.removeListener=function(a){if(null!=this.eventListeners)for(var b=0;b<this.eventListeners.length;)this.eventListeners[b+1]==a?this.eventListeners.splice(b,2):b+=2};\nmxEventSource.prototype.fireEvent=function(a,b){if(null!=this.eventListeners&&this.isEventsEnabled()){null==a&&(a=new mxEventObject);null==b&&(b=this.getEventSource());null==b&&(b=this);for(var c=0;c<this.eventListeners.length;c+=2){var d=this.eventListeners[c];null!=d&&d!=a.getName()||this.eventListeners[c+1].apply(this,[b,a])}}};\nvar mxEvent={addListener:function(){if(window.addEventListener){var a=!1;try{document.addEventListener(\"test\",function(){},Object.defineProperty&&Object.defineProperty({},\"passive\",{get:function(){a=!0}}))}catch(b){}return function(b,c,d){b.addEventListener(c,d,a?{passive:!1}:!1);null==b.mxListenerList&&(b.mxListenerList=[]);b.mxListenerList.push({name:c,f:d})}}return function(b,c,d){b.attachEvent(\"on\"+c,d);null==b.mxListenerList&&(b.mxListenerList=[]);b.mxListenerList.push({name:c,f:d})}}(),removeListener:function(){var a=\nfunction(b,c,d){if(null!=b.mxListenerList){c=b.mxListenerList.length;for(var e=0;e<c;e++)if(b.mxListenerList[e].f==d){b.mxListenerList.splice(e,1);break}0==b.mxListenerList.length&&(b.mxListenerList=null)}};return window.removeEventListener?function(b,c,d){b.removeEventListener(c,d,!1);a(b,c,d)}:function(b,c,d){b.detachEvent(\"on\"+c,d);a(b,c,d)}}(),removeAllListeners:function(a){var b=a.mxListenerList;if(null!=b)for(;0<b.length;){var c=b[0];mxEvent.removeListener(a,c.name,c.f)}},addGestureListeners:function(a,\nb,c,d){null!=b&&mxEvent.addListener(a,mxClient.IS_POINTER?\"pointerdown\":\"mousedown\",b);null!=c&&mxEvent.addListener(a,mxClient.IS_POINTER?\"pointermove\":\"mousemove\",c);null!=d&&mxEvent.addListener(a,mxClient.IS_POINTER?\"pointerup\":\"mouseup\",d);!mxClient.IS_POINTER&&mxClient.IS_TOUCH&&(null!=b&&mxEvent.addListener(a,\"touchstart\",b),null!=c&&mxEvent.addListener(a,\"touchmove\",c),null!=d&&mxEvent.addListener(a,\"touchend\",d))},removeGestureListeners:function(a,b,c,d){null!=b&&mxEvent.removeListener(a,mxClient.IS_POINTER?\n\"pointerdown\":\"mousedown\",b);null!=c&&mxEvent.removeListener(a,mxClient.IS_POINTER?\"pointermove\":\"mousemove\",c);null!=d&&mxEvent.removeListener(a,mxClient.IS_POINTER?\"pointerup\":\"mouseup\",d);!mxClient.IS_POINTER&&mxClient.IS_TOUCH&&(null!=b&&mxEvent.removeListener(a,\"touchstart\",b),null!=c&&mxEvent.removeListener(a,\"touchmove\",c),null!=d&&mxEvent.removeListener(a,\"touchend\",d))},redirectMouseEvents:function(a,b,c,d,e,f,g){var k=function(l){return\"function\"==typeof c?c(l):c};mxEvent.addGestureListeners(a,\nfunction(l){null!=d?d(l):mxEvent.isConsumed(l)||b.fireMouseEvent(mxEvent.MOUSE_DOWN,new mxMouseEvent(l,k(l)))},function(l){null!=e?e(l):mxEvent.isConsumed(l)||b.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(l,k(l)))},function(l){null!=f?f(l):mxEvent.isConsumed(l)||b.fireMouseEvent(mxEvent.MOUSE_UP,new mxMouseEvent(l,k(l)))});mxEvent.addListener(a,\"dblclick\",function(l){if(null!=g)g(l);else if(!mxEvent.isConsumed(l)){var m=k(l);b.dblClick(l,null!=m?m.cell:null)}})},release:function(a){try{if(null!=\na){mxEvent.removeAllListeners(a);var b=a.childNodes;if(null!=b){var c=b.length;for(a=0;a<c;a+=1)mxEvent.release(b[a])}}}catch(d){}},addMouseWheelListener:function(a,b){if(null!=a){b=null!=b?b:window;if(mxClient.IS_SF&&!mxClient.IS_TOUCH){var c=1;mxEvent.addListener(b,\"gesturestart\",function(g){mxEvent.consume(g);c=1});mxEvent.addListener(b,\"gesturechange\",function(g){mxEvent.consume(g);var k=c-g.scale;.2<Math.abs(k)&&(a(g,0>k,!0),c=g.scale)});mxEvent.addListener(b,\"gestureend\",function(g){mxEvent.consume(g)})}else{var d=\n[],e=0,f=0;mxEvent.addGestureListeners(b,mxUtils.bind(this,function(g){mxEvent.isMouseEvent(g)||null==g.pointerId||d.push(g)}),mxUtils.bind(this,function(g){if(!mxEvent.isMouseEvent(g)&&2==d.length){for(var k=0;k<d.length;k++)if(g.pointerId==d[k].pointerId){d[k]=g;break}g=Math.abs(d[0].clientX-d[1].clientX);k=Math.abs(d[0].clientY-d[1].clientY);var l=Math.abs(g-e),m=Math.abs(k-f);if(l>mxEvent.PINCH_THRESHOLD||m>mxEvent.PINCH_THRESHOLD)a(d[0],l>m?g>e:k>f,!0,d[0].clientX+(d[1].clientX-d[0].clientX)/\n2,d[0].clientY+(d[1].clientY-d[0].clientY)/2),e=g,f=k}}),mxUtils.bind(this,function(g){d=[];f=e=0}))}mxEvent.addListener(b,\"wheel\",function(g){null==g&&(g=window.event);g.ctrlKey&&g.preventDefault();(.5<Math.abs(g.deltaX)||.5<Math.abs(g.deltaY))&&a(g,0==g.deltaY?0<-g.deltaX:0<-g.deltaY)})}},disableContextMenu:function(a){mxEvent.addListener(a,\"contextmenu\",function(b){b.preventDefault&&b.preventDefault();return!1})},getSource:function(a){return null!=a.srcElement?a.srcElement:a.target},isConsumed:function(a){return null!=\na.isConsumed&&a.isConsumed},isTouchEvent:function(a){return null!=a.pointerType?\"touch\"==a.pointerType||a.pointerType===a.MSPOINTER_TYPE_TOUCH:null!=a.mozInputSource?5==a.mozInputSource:0==a.type.indexOf(\"touch\")},isPenEvent:function(a){return null!=a.pointerType?\"pen\"==a.pointerType||a.pointerType===a.MSPOINTER_TYPE_PEN:null!=a.mozInputSource?2==a.mozInputSource:0==a.type.indexOf(\"pen\")},isMultiTouchEvent:function(a){return null!=a.type&&0==a.type.indexOf(\"touch\")&&null!=a.touches&&1<a.touches.length},\nisMouseEvent:function(a){return!mxClient.IS_ANDROID&&mxClient.IS_LINUX&&mxClient.IS_GC?!0:null!=a.pointerType?\"mouse\"==a.pointerType||a.pointerType===a.MSPOINTER_TYPE_MOUSE:null!=a.mozInputSource?1==a.mozInputSource:0==a.type.indexOf(\"mouse\")},isLeftMouseButton:function(a){return\"buttons\"in a&&(\"mousedown\"==a.type||\"mousemove\"==a.type)?1==a.buttons:\"which\"in a?1===a.which:1===a.button},isMiddleMouseButton:function(a){return\"which\"in a?2===a.which:4===a.button},isRightMouseButton:function(a){return\"which\"in\na?3===a.which:2===a.button},isPopupTrigger:function(a){return mxEvent.isRightMouseButton(a)||mxClient.IS_MAC&&mxEvent.isControlDown(a)&&!mxEvent.isShiftDown(a)&&!mxEvent.isMetaDown(a)&&!mxEvent.isAltDown(a)},isShiftDown:function(a){return null!=a?a.shiftKey:!1},isAltDown:function(a){return null!=a?a.altKey:!1},isControlDown:function(a){return null!=a?a.ctrlKey:!1},isMetaDown:function(a){return null!=a?a.metaKey:!1},getMainEvent:function(a){\"touchstart\"!=a.type&&\"touchmove\"!=a.type||null==a.touches||\nnull==a.touches[0]?\"touchend\"==a.type&&null!=a.changedTouches&&null!=a.changedTouches[0]&&(a=a.changedTouches[0]):a=a.touches[0];return a},getClientX:function(a){return mxEvent.getMainEvent(a).clientX},getClientY:function(a){return mxEvent.getMainEvent(a).clientY},consume:function(a,b,c){c=null!=c?c:!0;if(null!=b?b:1)a.preventDefault?(c&&a.stopPropagation(),a.preventDefault()):c&&(a.cancelBubble=!0);a.isConsumed=!0;a.preventDefault||(a.returnValue=!1)},LABEL_HANDLE:-1,ROTATION_HANDLE:-2,CUSTOM_HANDLE:-100,\nVIRTUAL_HANDLE:-1E5,MOUSE_DOWN:\"mouseDown\",MOUSE_MOVE:\"mouseMove\",MOUSE_UP:\"mouseUp\",ACTIVATE:\"activate\",RESIZE_START:\"resizeStart\",RESIZE:\"resize\",RESIZE_END:\"resizeEnd\",MOVE_START:\"moveStart\",MOVE:\"move\",MOVE_END:\"moveEnd\",PAN_START:\"panStart\",PAN:\"pan\",PAN_END:\"panEnd\",MINIMIZE:\"minimize\",NORMALIZE:\"normalize\",MAXIMIZE:\"maximize\",HIDE:\"hide\",SHOW:\"show\",CLOSE:\"close\",DESTROY:\"destroy\",REFRESH:\"refresh\",SIZE:\"size\",SELECT:\"select\",FIRED:\"fired\",FIRE_MOUSE_EVENT:\"fireMouseEvent\",CONSUME_MOUSE_EVENT:\"consumeMouseEvent\",\nGESTURE:\"gesture\",TAP_AND_HOLD:\"tapAndHold\",GET:\"get\",RECEIVE:\"receive\",CONNECT:\"connect\",DISCONNECT:\"disconnect\",SUSPEND:\"suspend\",RESUME:\"resume\",MARK:\"mark\",ROOT:\"root\",POST:\"post\",OPEN:\"open\",SAVE:\"save\",BEFORE_ADD_VERTEX:\"beforeAddVertex\",ADD_VERTEX:\"addVertex\",AFTER_ADD_VERTEX:\"afterAddVertex\",DONE:\"done\",EXECUTE:\"execute\",EXECUTED:\"executed\",BEGIN_UPDATE:\"beginUpdate\",START_EDIT:\"startEdit\",END_UPDATE:\"endUpdate\",END_EDIT:\"endEdit\",BEFORE_UNDO:\"beforeUndo\",UNDO:\"undo\",REDO:\"redo\",CHANGE:\"change\",\nNOTIFY:\"notify\",LAYOUT_CELLS:\"layoutCells\",CLICK:\"click\",SCALE:\"scale\",TRANSLATE:\"translate\",SCALE_AND_TRANSLATE:\"scaleAndTranslate\",UP:\"up\",DOWN:\"down\",ADD:\"add\",REMOVE:\"remove\",CLEAR:\"clear\",ADD_CELLS:\"addCells\",CELLS_ADDED:\"cellsAdded\",MOVE_CELLS:\"moveCells\",CELLS_MOVED:\"cellsMoved\",RESIZE_CELLS:\"resizeCells\",CELLS_RESIZED:\"cellsResized\",TOGGLE_CELLS:\"toggleCells\",CELLS_TOGGLED:\"cellsToggled\",ORDER_CELLS:\"orderCells\",CELLS_ORDERED:\"cellsOrdered\",REMOVE_CELLS:\"removeCells\",CELLS_REMOVED:\"cellsRemoved\",\nGROUP_CELLS:\"groupCells\",UNGROUP_CELLS:\"ungroupCells\",REMOVE_CELLS_FROM_PARENT:\"removeCellsFromParent\",FOLD_CELLS:\"foldCells\",CELLS_FOLDED:\"cellsFolded\",ALIGN_CELLS:\"alignCells\",LABEL_CHANGED:\"labelChanged\",CONNECT_CELL:\"connectCell\",CELL_CONNECTED:\"cellConnected\",SPLIT_EDGE:\"splitEdge\",FLIP_EDGE:\"flipEdge\",START_EDITING:\"startEditing\",EDITING_STARTED:\"editingStarted\",EDITING_STOPPED:\"editingStopped\",ADD_OVERLAY:\"addOverlay\",REMOVE_OVERLAY:\"removeOverlay\",UPDATE_CELL_SIZE:\"updateCellSize\",ESCAPE:\"escape\",\nDOUBLE_CLICK:\"doubleClick\",START:\"start\",RESET:\"reset\",PINCH_THRESHOLD:10};function mxXmlRequest(a,b,c,d,e,f){this.url=a;this.params=b;this.method=c||\"POST\";this.async=null!=d?d:!0;this.username=e;this.password=f}mxXmlRequest.prototype.url=null;mxXmlRequest.prototype.params=null;mxXmlRequest.prototype.method=null;mxXmlRequest.prototype.async=null;mxXmlRequest.prototype.binary=!1;mxXmlRequest.prototype.withCredentials=!1;mxXmlRequest.prototype.username=null;mxXmlRequest.prototype.password=null;\nmxXmlRequest.prototype.request=null;mxXmlRequest.prototype.decodeSimulateValues=!1;mxXmlRequest.prototype.isBinary=function(){return this.binary};mxXmlRequest.prototype.setBinary=function(a){this.binary=a};mxXmlRequest.prototype.getText=function(){return this.request.responseText};mxXmlRequest.prototype.isReady=function(){return 4==this.request.readyState};mxXmlRequest.prototype.getDocumentElement=function(){var a=this.getXml();return null!=a?a.documentElement:null};\nmxXmlRequest.prototype.getXml=function(){var a=this.request.responseXML;if(9<=document.documentMode||null==a||null==a.documentElement)a=mxUtils.parseXml(this.request.responseText);return a};mxXmlRequest.prototype.getStatus=function(){return null!=this.request?this.request.status:null};\nmxXmlRequest.prototype.create=function(){if(window.XMLHttpRequest)return function(){var a=new XMLHttpRequest;this.isBinary()&&a.overrideMimeType&&a.overrideMimeType(\"text/plain; charset=x-user-defined\");return a};if(\"undefined\"!=typeof ActiveXObject)return function(){return new ActiveXObject(\"Microsoft.XMLHTTP\")}}();\nmxXmlRequest.prototype.send=function(a,b,c,d){this.request=this.create();null!=this.request&&(null!=a&&(this.request.onreadystatechange=mxUtils.bind(this,function(){this.isReady()&&(a(this),this.request.onreadystatechange=null)})),this.request.open(this.method,this.url,this.async,this.username,this.password),this.setRequestHeaders(this.request,this.params),window.XMLHttpRequest&&this.withCredentials&&(this.request.withCredentials=\"true\"),null!=b&&(this.request.onerror=mxUtils.bind(this,function(e){b(this,\ne)})),(null==document.documentMode||9<document.documentMode)&&window.XMLHttpRequest&&null!=c&&null!=d&&(this.request.timeout=c,this.request.ontimeout=d),this.request.send(this.params))};mxXmlRequest.prototype.setRequestHeaders=function(a,b){null!=b&&a.setRequestHeader(\"Content-Type\",\"application/x-www-form-urlencoded\")};\nmxXmlRequest.prototype.simulate=function(a,b){a=a||document;var c=null;a==document&&(c=window.onbeforeunload,window.onbeforeunload=null);var d=a.createElement(\"form\");d.setAttribute(\"method\",this.method);d.setAttribute(\"action\",this.url);null!=b&&d.setAttribute(\"target\",b);d.style.display=\"none\";d.style.visibility=\"hidden\";b=0<this.params.indexOf(\"&\")?this.params.split(\"&\"):this.params.split();for(var e=0;e<b.length;e++){var f=b[e].indexOf(\"=\");if(0<f){var g=b[e].substring(0,f);f=b[e].substring(f+\n1);this.decodeSimulateValues&&(f=decodeURIComponent(f));var k=a.createElement(\"textarea\");k.setAttribute(\"wrap\",\"off\");k.setAttribute(\"name\",g);mxUtils.write(k,f);d.appendChild(k)}}a.body.appendChild(d);d.submit();null!=d.parentNode&&d.parentNode.removeChild(d);null!=c&&(window.onbeforeunload=c)};\nvar mxClipboard={STEPSIZE:10,insertCount:1,cells:null,setCells:function(a){mxClipboard.cells=a},getCells:function(){return mxClipboard.cells},isEmpty:function(){return null==mxClipboard.getCells()},cut:function(a,b){b=mxClipboard.copy(a,b);mxClipboard.insertCount=0;mxClipboard.removeCells(a,b,!1);return b},removeCells:function(a,b,c){a.removeCells(b,c)},copy:function(a,b){b=b||a.getSelectionCells();b=a.getExportableCells(a.model.getTopmostCells(b));mxClipboard.insertCount=1;mxClipboard.setCells(a.cloneCells(b));\nreturn b},paste:function(a){var b=null;if(!mxClipboard.isEmpty()){b=a.getImportableCells(mxClipboard.getCells());var c=mxClipboard.insertCount*mxClipboard.STEPSIZE,d=a.getDefaultParent();b=a.importCells(b,c,c,d);mxClipboard.insertCount++;a.setSelectionCells(b)}return b}};\nfunction mxWindow(a,b,c,d,e,f,g,k,l,m){null!=b&&(g=null!=g?g:!0,this.content=b,this.init(c,d,e,f,m),this.installMaximizeHandler(),this.installMinimizeHandler(),this.installCloseHandler(),this.setMinimizable(g),this.setTitle(a),(null==k||k)&&this.installMoveHandler(),null!=l&&null!=l.parentNode?l.parentNode.replaceChild(this.div,l):document.body.appendChild(this.div))}mxWindow.prototype=new mxEventSource;mxWindow.prototype.constructor=mxWindow;mxWindow.prototype.closeImage=mxClient.imageBasePath+\"/close.gif\";\nmxWindow.prototype.minimizeImage=mxClient.imageBasePath+\"/minimize.gif\";mxWindow.prototype.normalizeImage=mxClient.imageBasePath+\"/normalize.gif\";mxWindow.prototype.maximizeImage=mxClient.imageBasePath+\"/maximize.gif\";mxWindow.prototype.resizeImage=mxClient.imageBasePath+\"/resize.gif\";mxWindow.prototype.visible=!1;mxWindow.prototype.minimumSize=new mxRectangle(0,0,50,40);mxWindow.prototype.destroyOnClose=!0;\nmxWindow.prototype.contentHeightCorrection=8==document.documentMode||7==document.documentMode?6:2;mxWindow.prototype.title=null;mxWindow.prototype.content=null;\nmxWindow.prototype.init=function(a,b,c,d,e){e=null!=e?e:\"mxWindow\";this.div=document.createElement(\"div\");this.div.className=e;this.div.style.left=a+\"px\";this.div.style.top=b+\"px\";this.table=document.createElement(\"table\");this.table.className=e;mxClient.IS_POINTER&&(this.div.style.touchAction=\"none\");null!=c&&(this.div.style.width=c+\"px\",this.table.style.width=c+\"px\");null!=d&&(this.div.style.height=d+\"px\",this.table.style.height=d+\"px\");a=document.createElement(\"tbody\");b=document.createElement(\"tr\");\nthis.title=document.createElement(\"td\");this.title.className=e+\"Title\";this.buttons=document.createElement(\"div\");this.buttons.style.position=\"absolute\";this.buttons.style.display=\"inline-block\";this.buttons.style.right=\"4px\";this.buttons.style.top=\"5px\";this.title.appendChild(this.buttons);b.appendChild(this.title);a.appendChild(b);b=document.createElement(\"tr\");this.td=document.createElement(\"td\");this.td.className=e+\"Pane\";7==document.documentMode&&(this.td.style.height=\"100%\");this.contentWrapper=\ndocument.createElement(\"div\");this.contentWrapper.className=e+\"Pane\";this.contentWrapper.style.width=\"100%\";this.contentWrapper.appendChild(this.content);\"DIV\"!=this.content.nodeName.toUpperCase()&&(this.contentWrapper.style.height=\"100%\");this.td.appendChild(this.contentWrapper);b.appendChild(this.td);a.appendChild(b);this.table.appendChild(a);this.div.appendChild(this.table);e=mxUtils.bind(this,function(f){this.activate()});mxEvent.addGestureListeners(this.title,e);mxEvent.addGestureListeners(this.table,\ne);this.hide()};mxWindow.prototype.setTitle=function(a){for(var b=this.title.firstChild;null!=b;){var c=b.nextSibling;b.nodeType==mxConstants.NODETYPE_TEXT&&b.parentNode.removeChild(b);b=c}mxUtils.write(this.title,a||\"\");this.title.appendChild(this.buttons)};mxWindow.prototype.setScrollable=function(a){if(null==navigator.userAgent||0>navigator.userAgent.indexOf(\"Presto/2.5\"))this.contentWrapper.style.overflow=a?\"auto\":\"hidden\"};\nmxWindow.prototype.activate=function(){if(mxWindow.activeWindow!=this){var a=mxUtils.getCurrentStyle(this.getElement());a=null!=a?a.zIndex:3;if(mxWindow.activeWindow){var b=mxWindow.activeWindow.getElement();null!=b&&null!=b.style&&(b.style.zIndex=a)}b=mxWindow.activeWindow;this.getElement().style.zIndex=parseInt(a)+1;mxWindow.activeWindow=this;this.fireEvent(new mxEventObject(mxEvent.ACTIVATE,\"previousWindow\",b))}};mxWindow.prototype.getElement=function(){return this.div};\nmxWindow.prototype.fit=function(){mxUtils.fit(this.div)};mxWindow.prototype.isResizable=function(){return null!=this.resize?\"none\"!=this.resize.style.display:!1};\nmxWindow.prototype.setResizable=function(a){if(a)if(null==this.resize){this.resize=document.createElement(\"img\");this.resize.style.position=\"absolute\";this.resize.style.bottom=\"0px\";this.resize.style.right=\"0px\";this.resize.style.zIndex=\"2\";this.resize.setAttribute(\"src\",this.resizeImage);this.resize.style.cursor=\"nwse-resize\";var b=null,c=null,d=null,e=null;a=mxUtils.bind(this,function(k){this.activate();b=mxEvent.getClientX(k);c=mxEvent.getClientY(k);d=this.div.offsetWidth;e=this.div.offsetHeight;\nmxEvent.addGestureListeners(document,null,f,g);this.fireEvent(new mxEventObject(mxEvent.RESIZE_START,\"event\",k));mxEvent.consume(k)});var f=mxUtils.bind(this,function(k){if(null!=b&&null!=c){var l=mxEvent.getClientX(k)-b,m=mxEvent.getClientY(k)-c;this.setSize(d+l,e+m);this.fireEvent(new mxEventObject(mxEvent.RESIZE,\"event\",k));mxEvent.consume(k)}}),g=mxUtils.bind(this,function(k){null!=b&&null!=c&&(c=b=null,mxEvent.removeGestureListeners(document,null,f,g),this.fireEvent(new mxEventObject(mxEvent.RESIZE_END,\n\"event\",k)),mxEvent.consume(k))});mxEvent.addGestureListeners(this.resize,a,f,g);this.div.appendChild(this.resize)}else this.resize.style.display=\"inline\";else null!=this.resize&&(this.resize.style.display=\"none\")};\nmxWindow.prototype.setSize=function(a,b){a=Math.max(this.minimumSize.width,a);b=Math.max(this.minimumSize.height,b);this.div.style.width=a+\"px\";this.div.style.height=b+\"px\";this.table.style.width=a+\"px\";this.table.style.height=b+\"px\";this.contentWrapper.style.height=this.div.offsetHeight-this.title.offsetHeight-this.contentHeightCorrection+\"px\"};mxWindow.prototype.setMinimizable=function(a){this.minimizeImg.style.display=a?\"\":\"none\"};\nmxWindow.prototype.getMinimumSize=function(){return new mxRectangle(0,0,0,this.title.offsetHeight)};\nmxWindow.prototype.toggleMinimized=function(a){this.activate();if(this.minimized)this.minimized=!1,this.minimizeImg.setAttribute(\"src\",this.minimizeImage),this.minimizeImg.setAttribute(\"title\",\"Minimize\"),this.contentWrapper.style.display=\"\",this.maximize.style.display=this.maxDisplay,this.div.style.height=this.height,this.table.style.height=this.height,null!=this.resize&&(this.resize.style.visibility=\"\"),this.fireEvent(new mxEventObject(mxEvent.NORMALIZE,\"event\",a));else{this.minimized=!0;this.minimizeImg.setAttribute(\"src\",\nthis.normalizeImage);this.minimizeImg.setAttribute(\"title\",\"Normalize\");this.contentWrapper.style.display=\"none\";this.maxDisplay=this.maximize.style.display;this.maximize.style.display=\"none\";this.height=this.table.style.height;var b=this.getMinimumSize();0<b.height&&(this.div.style.height=b.height+\"px\",this.table.style.height=b.height+\"px\");0<b.width&&(this.div.style.width=b.width+\"px\",this.table.style.width=b.width+\"px\");null!=this.resize&&(this.resize.style.visibility=\"hidden\");this.fireEvent(new mxEventObject(mxEvent.MINIMIZE,\n\"event\",a))}};\nmxWindow.prototype.installMinimizeHandler=function(){this.minimizeImg=document.createElement(\"img\");this.minimizeImg.setAttribute(\"src\",this.minimizeImage);this.minimizeImg.setAttribute(\"title\",\"Minimize\");this.minimizeImg.style.cursor=\"pointer\";this.minimizeImg.style.marginLeft=\"2px\";this.minimizeImg.style.display=\"none\";this.buttons.appendChild(this.minimizeImg);this.minimized=!1;this.height=this.maxDisplay=null;var a=mxUtils.bind(this,function(b){this.toggleMinimized(b);mxEvent.consume(b)});mxEvent.addGestureListeners(this.minimizeImg,\na)};mxWindow.prototype.setMaximizable=function(a){this.maximize.style.display=a?\"\":\"none\"};\nmxWindow.prototype.installMaximizeHandler=function(){this.maximize=document.createElement(\"img\");this.maximize.setAttribute(\"src\",this.maximizeImage);this.maximize.setAttribute(\"title\",\"Maximize\");this.maximize.style.cursor=\"default\";this.maximize.style.marginLeft=\"2px\";this.maximize.style.cursor=\"pointer\";this.maximize.style.display=\"none\";this.buttons.appendChild(this.maximize);var a=!1,b=null,c=null,d=null,e=null,f=null,g=mxUtils.bind(this,function(k){this.activate();if(\"none\"!=this.maximize.style.display){if(a){a=\n!1;this.maximize.setAttribute(\"src\",this.maximizeImage);this.maximize.setAttribute(\"title\",\"Maximize\");this.contentWrapper.style.display=\"\";this.minimizeImg.style.display=f;this.div.style.left=b+\"px\";this.div.style.top=c+\"px\";this.div.style.height=d;this.div.style.width=e;l=mxUtils.getCurrentStyle(this.contentWrapper);if(\"auto\"==l.overflow||null!=this.resize)this.contentWrapper.style.height=this.div.offsetHeight-this.title.offsetHeight-this.contentHeightCorrection+\"px\";this.table.style.height=d;this.table.style.width=\ne;null!=this.resize&&(this.resize.style.visibility=\"\");this.fireEvent(new mxEventObject(mxEvent.NORMALIZE,\"event\",k))}else{a=!0;this.maximize.setAttribute(\"src\",this.normalizeImage);this.maximize.setAttribute(\"title\",\"Normalize\");this.contentWrapper.style.display=\"\";f=this.minimizeImg.style.display;this.minimizeImg.style.display=\"none\";b=parseInt(this.div.style.left);c=parseInt(this.div.style.top);d=this.table.style.height;e=this.table.style.width;this.div.style.left=\"0px\";this.div.style.top=\"0px\";\nl=Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0);this.div.style.width=document.body.clientWidth-2+\"px\";this.div.style.height=l-2+\"px\";this.table.style.width=document.body.clientWidth-2+\"px\";this.table.style.height=l-2+\"px\";null!=this.resize&&(this.resize.style.visibility=\"hidden\");var l=mxUtils.getCurrentStyle(this.contentWrapper);if(\"auto\"==l.overflow||null!=this.resize)this.contentWrapper.style.height=this.div.offsetHeight-this.title.offsetHeight-this.contentHeightCorrection+\n\"px\";this.fireEvent(new mxEventObject(mxEvent.MAXIMIZE,\"event\",k))}mxEvent.consume(k)}});mxEvent.addGestureListeners(this.maximize,g);mxEvent.addListener(this.title,\"dblclick\",g)};\nmxWindow.prototype.installMoveHandler=function(){this.title.style.cursor=\"move\";mxEvent.addGestureListeners(this.title,mxUtils.bind(this,function(a){var b=mxEvent.getClientX(a),c=mxEvent.getClientY(a),d=this.getX(),e=this.getY(),f=mxUtils.bind(this,function(k){var l=mxEvent.getClientX(k)-b,m=mxEvent.getClientY(k)-c;this.setLocation(d+l,e+m);this.fireEvent(new mxEventObject(mxEvent.MOVE,\"event\",k));mxEvent.consume(k)}),g=mxUtils.bind(this,function(k){mxEvent.removeGestureListeners(document,null,f,\ng);this.fireEvent(new mxEventObject(mxEvent.MOVE_END,\"event\",k));mxEvent.consume(k)});mxEvent.addGestureListeners(document,null,f,g);this.fireEvent(new mxEventObject(mxEvent.MOVE_START,\"event\",a));mxEvent.consume(a)}));mxClient.IS_POINTER&&(this.title.style.touchAction=\"none\")};mxWindow.prototype.setLocation=function(a,b){this.div.style.left=a+\"px\";this.div.style.top=b+\"px\"};mxWindow.prototype.getX=function(){return parseInt(this.div.style.left)};mxWindow.prototype.getY=function(){return parseInt(this.div.style.top)};\nmxWindow.prototype.installCloseHandler=function(){this.closeImg=document.createElement(\"img\");this.closeImg.setAttribute(\"src\",this.closeImage);this.closeImg.setAttribute(\"title\",\"Close\");this.closeImg.style.marginLeft=\"2px\";this.closeImg.style.cursor=\"pointer\";this.closeImg.style.display=\"none\";this.buttons.appendChild(this.closeImg);mxEvent.addGestureListeners(this.closeImg,mxUtils.bind(this,function(a){this.fireEvent(new mxEventObject(mxEvent.CLOSE,\"event\",a));this.destroyOnClose?this.destroy():\nthis.setVisible(!1);mxEvent.consume(a)}))};mxWindow.prototype.setImage=function(a){this.image=document.createElement(\"img\");this.image.setAttribute(\"src\",a);this.image.setAttribute(\"align\",\"left\");this.image.style.marginRight=\"4px\";this.image.style.marginLeft=\"0px\";this.image.style.marginTop=\"-2px\";this.title.insertBefore(this.image,this.title.firstChild)};mxWindow.prototype.setClosable=function(a){this.closeImg.style.display=a?\"\":\"none\"};\nmxWindow.prototype.isVisible=function(){return null!=this.div?\"none\"!=this.div.style.display:!1};mxWindow.prototype.setVisible=function(a){null!=this.div&&(this.isVisible()!=a?a?this.show():this.hide():this.fireEvent(new mxEventObject(a?mxEvent.SHOW:mxEvent.HIDE)))};\nmxWindow.prototype.show=function(){this.div.style.display=\"\";this.activate();\"auto\"!=mxUtils.getCurrentStyle(this.contentWrapper).overflow&&null==this.resize||\"none\"==this.contentWrapper.style.display||(this.contentWrapper.style.height=this.div.offsetHeight-this.title.offsetHeight-this.contentHeightCorrection+\"px\");this.fireEvent(new mxEventObject(mxEvent.SHOW))};mxWindow.prototype.hide=function(){this.div.style.display=\"none\";this.fireEvent(new mxEventObject(mxEvent.HIDE))};\nmxWindow.prototype.destroy=function(){this.fireEvent(new mxEventObject(mxEvent.DESTROY));null!=this.div&&(mxEvent.release(this.div),this.div.parentNode.removeChild(this.div),this.div=null);this.contentWrapper=this.content=this.title=null};function mxForm(a){this.table=document.createElement(\"table\");this.table.className=a;this.body=document.createElement(\"tbody\");this.table.appendChild(this.body)}mxForm.prototype.table=null;mxForm.prototype.body=!1;mxForm.prototype.getTable=function(){return this.table};\nmxForm.prototype.addButtons=function(a,b){var c=document.createElement(\"tr\"),d=document.createElement(\"td\");c.appendChild(d);d=document.createElement(\"td\");var e=document.createElement(\"button\");mxUtils.write(e,mxResources.get(\"ok\")||\"OK\");d.appendChild(e);mxEvent.addListener(e,\"click\",function(){a()});e=document.createElement(\"button\");mxUtils.write(e,mxResources.get(\"cancel\")||\"Cancel\");d.appendChild(e);mxEvent.addListener(e,\"click\",function(){b()});c.appendChild(d);this.body.appendChild(c)};\nmxForm.prototype.addText=function(a,b,c){var d=document.createElement(\"input\");d.setAttribute(\"type\",c||\"text\");d.value=b;return this.addField(a,d)};mxForm.prototype.addCheckbox=function(a,b){var c=document.createElement(\"input\");c.setAttribute(\"type\",\"checkbox\");this.addField(a,c);b&&(c.checked=!0);return c};mxForm.prototype.addTextarea=function(a,b,c){var d=document.createElement(\"textarea\");mxClient.IS_NS&&c--;d.setAttribute(\"rows\",c||2);d.value=b;return this.addField(a,d)};\nmxForm.prototype.addCombo=function(a,b,c){var d=document.createElement(\"select\");null!=c&&d.setAttribute(\"size\",c);b&&d.setAttribute(\"multiple\",\"true\");return this.addField(a,d)};mxForm.prototype.addOption=function(a,b,c,d){var e=document.createElement(\"option\");mxUtils.writeln(e,b);e.setAttribute(\"value\",c);d&&e.setAttribute(\"selected\",d);a.appendChild(e)};\nmxForm.prototype.addField=function(a,b){var c=document.createElement(\"tr\"),d=document.createElement(\"td\");mxUtils.write(d,a);c.appendChild(d);d=document.createElement(\"td\");d.appendChild(b);c.appendChild(d);this.body.appendChild(c);return b};function mxImage(a,b,c,d,e){this.src=a;this.width=null!=b?b:this.width;this.height=null!=c?c:this.height;this.x=null!=d?d:this.x;this.y=null!=e?e:this.y}mxImage.prototype.src=null;mxImage.prototype.width=0;mxImage.prototype.height=0;mxImage.prototype.x=0;\nmxImage.prototype.y=0;function mxDivResizer(a,b){\"div\"==a.nodeName.toLowerCase()&&(null==b&&(b=window),this.div=a,a=mxUtils.getCurrentStyle(a),null!=a&&(this.resizeWidth=\"auto\"==a.width,this.resizeHeight=\"auto\"==a.height),mxEvent.addListener(b,\"resize\",mxUtils.bind(this,function(c){this.handlingResize||(this.handlingResize=!0,this.resize(),this.handlingResize=!1)})),this.resize())}mxDivResizer.prototype.resizeWidth=!0;mxDivResizer.prototype.resizeHeight=!0;mxDivResizer.prototype.handlingResize=!1;\nmxDivResizer.prototype.resize=function(){var a=this.getDocumentWidth(),b=this.getDocumentHeight(),c=parseInt(this.div.style.left),d=parseInt(this.div.style.right),e=parseInt(this.div.style.top),f=parseInt(this.div.style.bottom);this.resizeWidth&&!isNaN(c)&&!isNaN(d)&&0<=c&&0<=d&&0<a-d-c&&(this.div.style.width=a-d-c+\"px\");this.resizeHeight&&!isNaN(e)&&!isNaN(f)&&0<=e&&0<=f&&0<b-e-f&&(this.div.style.height=b-e-f+\"px\")};mxDivResizer.prototype.getDocumentWidth=function(){return document.body.clientWidth};\nmxDivResizer.prototype.getDocumentHeight=function(){return document.body.clientHeight};function mxDragSource(a,b){this.element=a;this.dropHandler=b;mxEvent.addGestureListeners(a,mxUtils.bind(this,function(c){this.mouseDown(c)}));mxEvent.addListener(a,\"dragstart\",function(c){mxEvent.consume(c)});this.eventConsumer=function(c,d){c=d.getProperty(\"eventName\");d=d.getProperty(\"event\");c!=mxEvent.MOUSE_DOWN&&d.consume()}}mxDragSource.prototype.element=null;mxDragSource.prototype.dropHandler=null;\nmxDragSource.prototype.dragOffset=null;mxDragSource.prototype.dragElement=null;mxDragSource.prototype.previewElement=null;mxDragSource.prototype.previewOffset=null;mxDragSource.prototype.enabled=!0;mxDragSource.prototype.currentGraph=null;mxDragSource.prototype.currentDropTarget=null;mxDragSource.prototype.currentPoint=null;mxDragSource.prototype.currentGuide=null;mxDragSource.prototype.currentHighlight=null;mxDragSource.prototype.autoscroll=!0;mxDragSource.prototype.guidesEnabled=!0;\nmxDragSource.prototype.gridEnabled=!0;mxDragSource.prototype.highlightDropTargets=!0;mxDragSource.prototype.dragElementZIndex=100;mxDragSource.prototype.dragElementOpacity=70;mxDragSource.prototype.checkEventSource=!0;mxDragSource.prototype.isEnabled=function(){return this.enabled};mxDragSource.prototype.setEnabled=function(a){this.enabled=a};mxDragSource.prototype.isGuidesEnabled=function(){return this.guidesEnabled};mxDragSource.prototype.setGuidesEnabled=function(a){this.guidesEnabled=a};\nmxDragSource.prototype.isGridEnabled=function(){return this.gridEnabled};mxDragSource.prototype.setGridEnabled=function(a){this.gridEnabled=a};mxDragSource.prototype.getGraphForEvent=function(a){return null};mxDragSource.prototype.getDropTarget=function(a,b,c,d){return a.getCellAt(b,c)};mxDragSource.prototype.createDragElement=function(a){return this.element.cloneNode(!0)};mxDragSource.prototype.createPreviewElement=function(a){return null};\nmxDragSource.prototype.isActive=function(){return null!=this.mouseMoveHandler};mxDragSource.prototype.reset=function(){null!=this.currentGraph&&(this.dragExit(this.currentGraph),this.currentGraph=null);this.removeDragElement();this.removeListeners();this.stopDrag()};\nmxDragSource.prototype.mouseDown=function(a){this.enabled&&!mxEvent.isConsumed(a)&&null==this.mouseMoveHandler&&(this.startDrag(a),this.mouseMoveHandler=mxUtils.bind(this,this.mouseMove),this.mouseUpHandler=mxUtils.bind(this,this.mouseUp),mxEvent.addGestureListeners(document,null,this.mouseMoveHandler,this.mouseUpHandler),mxClient.IS_TOUCH&&!mxEvent.isMouseEvent(a)&&(this.eventSource=mxEvent.getSource(a),mxEvent.addGestureListeners(this.eventSource,null,this.mouseMoveHandler,this.mouseUpHandler)))};\nmxDragSource.prototype.startDrag=function(a){this.dragElement=this.createDragElement(a);this.dragElement.style.position=\"absolute\";this.dragElement.style.zIndex=this.dragElementZIndex;mxUtils.setOpacity(this.dragElement,this.dragElementOpacity);this.checkEventSource&&mxClient.IS_SVG&&(this.dragElement.style.pointerEvents=\"none\")};mxDragSource.prototype.stopDrag=function(){this.removeDragElement()};\nmxDragSource.prototype.removeDragElement=function(){null!=this.dragElement&&(null!=this.dragElement.parentNode&&this.dragElement.parentNode.removeChild(this.dragElement),this.dragElement=null)};mxDragSource.prototype.getElementForEvent=function(a){return mxEvent.isTouchEvent(a)||mxEvent.isPenEvent(a)?document.elementFromPoint(mxEvent.getClientX(a),mxEvent.getClientY(a)):mxEvent.getSource(a)};\nmxDragSource.prototype.graphContainsEvent=function(a,b){var c=mxEvent.getClientX(b),d=mxEvent.getClientY(b),e=mxUtils.getOffset(a.container),f=mxUtils.getScrollOrigin();b=this.getElementForEvent(b);if(this.checkEventSource)for(;null!=b&&b!=a.container;)b=b.parentNode;return null!=b&&c>=e.x-f.x&&d>=e.y-f.y&&c<=e.x-f.x+a.container.offsetWidth&&d<=e.y-f.y+a.container.offsetHeight};\nmxDragSource.prototype.mouseMove=function(a){var b=this.getGraphForEvent(a);null==b||this.graphContainsEvent(b,a)||(b=null);b!=this.currentGraph&&(null!=this.currentGraph&&this.dragExit(this.currentGraph,a),this.currentGraph=b,null!=this.currentGraph&&this.dragEnter(this.currentGraph,a));null!=this.currentGraph&&this.dragOver(this.currentGraph,a);if(null==this.dragElement||null!=this.previewElement&&\"visible\"==this.previewElement.style.visibility)null!=this.dragElement&&mxUtils.setOpacity(this.dragElement,\n0);else{b=mxEvent.getClientX(a);var c=mxEvent.getClientY(a);null==this.dragElement.parentNode&&document.body.appendChild(this.dragElement);mxUtils.setOpacity(this.dragElement,this.dragElementOpacity);null!=this.dragOffset&&(b+=this.dragOffset.x,c+=this.dragOffset.y);var d=mxUtils.getDocumentScrollOrigin(document);this.dragElement.style.left=b+d.x+\"px\";this.dragElement.style.top=c+d.y+\"px\"}mxEvent.consume(a)};\nmxDragSource.prototype.mouseUp=function(a){if(null!=this.currentGraph){if(null!=this.currentPoint&&(null==this.previewElement||\"hidden\"!=this.previewElement.style.visibility)){var b=this.currentGraph.view.scale,c=this.currentGraph.view.translate;this.drop(this.currentGraph,a,this.currentDropTarget,this.currentPoint.x/b-c.x,this.currentPoint.y/b-c.y)}this.dragExit(this.currentGraph);this.currentGraph=null}this.stopDrag();this.removeListeners();mxEvent.consume(a)};\nmxDragSource.prototype.removeListeners=function(){null!=this.eventSource&&(mxEvent.removeGestureListeners(this.eventSource,null,this.mouseMoveHandler,this.mouseUpHandler),this.eventSource=null);mxEvent.removeGestureListeners(document,null,this.mouseMoveHandler,this.mouseUpHandler);this.mouseUpHandler=this.mouseMoveHandler=null};\nmxDragSource.prototype.dragEnter=function(a,b){a.isMouseDown=!0;a.isMouseTrigger=mxEvent.isMouseEvent(b);this.previewElement=this.createPreviewElement(a);null!=this.previewElement&&this.checkEventSource&&mxClient.IS_SVG&&(this.previewElement.style.pointerEvents=\"none\");this.isGuidesEnabled()&&null!=this.previewElement&&(this.currentGuide=new mxGuide(a,a.graphHandler.getGuideStates()));this.highlightDropTargets&&(this.currentHighlight=new mxCellHighlight(a,mxConstants.DROP_TARGET_COLOR));a.addListener(mxEvent.FIRE_MOUSE_EVENT,\nthis.eventConsumer)};mxDragSource.prototype.dragExit=function(a,b){this.currentPoint=this.currentDropTarget=null;a.isMouseDown=!1;a.removeListener(this.eventConsumer);null!=this.previewElement&&(null!=this.previewElement.parentNode&&this.previewElement.parentNode.removeChild(this.previewElement),this.previewElement=null);null!=this.currentGuide&&(this.currentGuide.destroy(),this.currentGuide=null);null!=this.currentHighlight&&(this.currentHighlight.destroy(),this.currentHighlight=null)};\nmxDragSource.prototype.dragOver=function(a,b){var c=mxUtils.getOffset(a.container),d=mxUtils.getScrollOrigin(a.container),e=mxEvent.getClientX(b)-c.x+d.x-a.panDx;c=mxEvent.getClientY(b)-c.y+d.y-a.panDy;a.autoScroll&&(null==this.autoscroll||this.autoscroll)&&a.scrollPointToVisible(e,c,a.autoExtend);null!=this.currentHighlight&&a.isDropEnabled()&&(this.currentDropTarget=this.getDropTarget(a,e,c,b),d=a.getView().getState(this.currentDropTarget),this.currentHighlight.highlight(d));if(null!=this.previewElement){null==\nthis.previewElement.parentNode&&(a.container.appendChild(this.previewElement),this.previewElement.style.zIndex=\"3\",this.previewElement.style.position=\"absolute\");d=this.isGridEnabled()&&a.isGridEnabledEvent(b);var f=!0;if(null!=this.currentGuide&&this.currentGuide.isEnabledForEvent(b))a=parseInt(this.previewElement.style.width),f=parseInt(this.previewElement.style.height),a=new mxRectangle(0,0,a,f),c=new mxPoint(e,c),c=this.currentGuide.move(a,c,d,!0),f=!1,e=c.x,c=c.y;else if(d){d=a.view.scale;b=\na.view.translate;var g=a.gridSize/2;e=(a.snap(e/d-b.x-g)+b.x)*d;c=(a.snap(c/d-b.y-g)+b.y)*d}null!=this.currentGuide&&f&&this.currentGuide.hide();null!=this.previewOffset&&(e+=this.previewOffset.x,c+=this.previewOffset.y);this.previewElement.style.left=Math.round(e)+\"px\";this.previewElement.style.top=Math.round(c)+\"px\";this.previewElement.style.visibility=\"visible\"}this.currentPoint=new mxPoint(e,c)};\nmxDragSource.prototype.drop=function(a,b,c,d,e){this.dropHandler.apply(this,arguments);\"hidden\"!=a.container.style.visibility&&a.container.focus()};function mxToolbar(a){this.container=a}mxToolbar.prototype=new mxEventSource;mxToolbar.prototype.constructor=mxToolbar;mxToolbar.prototype.container=null;mxToolbar.prototype.enabled=!0;mxToolbar.prototype.noReset=!1;mxToolbar.prototype.updateDefaultMode=!0;\nmxToolbar.prototype.addItem=function(a,b,c,d,e,f){var g=document.createElement(null!=b?\"img\":\"button\"),k=e||(null!=f?\"mxToolbarMode\":\"mxToolbarItem\");g.className=k;g.setAttribute(\"src\",b);null!=a&&(null!=b?g.setAttribute(\"title\",a):mxUtils.write(g,a));this.container.appendChild(g);null!=c&&(mxEvent.addListener(g,\"click\",c),mxClient.IS_TOUCH&&mxEvent.addListener(g,\"touchend\",c));a=mxUtils.bind(this,function(l){null!=d?g.setAttribute(\"src\",b):g.style.backgroundColor=\"\"});mxEvent.addGestureListeners(g,\nmxUtils.bind(this,function(l){null!=d?g.setAttribute(\"src\",d):g.style.backgroundColor=\"gray\";if(null!=f){null==this.menu&&(this.menu=new mxPopupMenu,this.menu.init());var m=this.currentImg;this.menu.isMenuShowing()&&this.menu.hideMenu();m!=g&&(this.currentImg=g,this.menu.factoryMethod=f,m=new mxPoint(g.offsetLeft,g.offsetTop+g.offsetHeight),this.menu.popup(m.x,m.y,null,l),this.menu.isMenuShowing()&&(g.className=k+\"Selected\",this.menu.hideMenu=function(){mxPopupMenu.prototype.hideMenu.apply(this);\ng.className=k;this.currentImg=null}))}}),null,a);mxEvent.addListener(g,\"mouseout\",a);return g};mxToolbar.prototype.addCombo=function(a){var b=document.createElement(\"div\");b.style.display=\"inline\";b.className=\"mxToolbarComboContainer\";var c=document.createElement(\"select\");c.className=a||\"mxToolbarCombo\";b.appendChild(c);this.container.appendChild(b);return c};\nmxToolbar.prototype.addActionCombo=function(a,b){var c=document.createElement(\"select\");c.className=b||\"mxToolbarCombo\";this.addOption(c,a,null);mxEvent.addListener(c,\"change\",function(d){var e=c.options[c.selectedIndex];c.selectedIndex=0;null!=e.funct&&e.funct(d)});this.container.appendChild(c);return c};mxToolbar.prototype.addOption=function(a,b,c){var d=document.createElement(\"option\");mxUtils.writeln(d,b);\"function\"==typeof c?d.funct=c:d.setAttribute(\"value\",c);a.appendChild(d);return d};\nmxToolbar.prototype.addSwitchMode=function(a,b,c,d,e){var f=document.createElement(\"img\");f.initialClassName=e||\"mxToolbarMode\";f.className=f.initialClassName;f.setAttribute(\"src\",b);f.altIcon=d;null!=a&&f.setAttribute(\"title\",a);mxEvent.addListener(f,\"click\",mxUtils.bind(this,function(g){g=this.selectedMode.altIcon;null!=g?(this.selectedMode.altIcon=this.selectedMode.getAttribute(\"src\"),this.selectedMode.setAttribute(\"src\",g)):this.selectedMode.className=this.selectedMode.initialClassName;this.updateDefaultMode&&\n(this.defaultMode=f);this.selectedMode=f;g=f.altIcon;null!=g?(f.altIcon=f.getAttribute(\"src\"),f.setAttribute(\"src\",g)):f.className=f.initialClassName+\"Selected\";this.fireEvent(new mxEventObject(mxEvent.SELECT));c()}));this.container.appendChild(f);null==this.defaultMode&&(this.defaultMode=f,this.selectMode(f),c());return f};\nmxToolbar.prototype.addMode=function(a,b,c,d,e,f){f=null!=f?f:!0;var g=document.createElement(null!=b?\"img\":\"button\");g.initialClassName=e||\"mxToolbarMode\";g.className=g.initialClassName;g.setAttribute(\"src\",b);g.altIcon=d;null!=a&&g.setAttribute(\"title\",a);this.enabled&&f&&(mxEvent.addListener(g,\"click\",mxUtils.bind(this,function(k){this.selectMode(g,c);this.noReset=!1})),mxEvent.addListener(g,\"dblclick\",mxUtils.bind(this,function(k){this.selectMode(g,c);this.noReset=!0})),null==this.defaultMode&&\n(this.defaultMode=g,this.defaultFunction=c,this.selectMode(g,c)));this.container.appendChild(g);return g};\nmxToolbar.prototype.selectMode=function(a,b){if(this.selectedMode!=a){if(null!=this.selectedMode){var c=this.selectedMode.altIcon;null!=c?(this.selectedMode.altIcon=this.selectedMode.getAttribute(\"src\"),this.selectedMode.setAttribute(\"src\",c)):this.selectedMode.className=this.selectedMode.initialClassName}this.selectedMode=a;c=this.selectedMode.altIcon;null!=c?(this.selectedMode.altIcon=this.selectedMode.getAttribute(\"src\"),this.selectedMode.setAttribute(\"src\",c)):this.selectedMode.className=this.selectedMode.initialClassName+\n\"Selected\";this.fireEvent(new mxEventObject(mxEvent.SELECT,\"function\",b))}};mxToolbar.prototype.resetMode=function(a){!a&&this.noReset||this.selectedMode==this.defaultMode||this.selectMode(this.defaultMode,this.defaultFunction)};mxToolbar.prototype.addSeparator=function(a){return this.addItem(null,a,null)};mxToolbar.prototype.addBreak=function(){mxUtils.br(this.container)};\nmxToolbar.prototype.addLine=function(){var a=document.createElement(\"hr\");a.style.marginRight=\"6px\";a.setAttribute(\"size\",\"1\");this.container.appendChild(a)};mxToolbar.prototype.destroy=function(){mxEvent.release(this.container);this.selectedMode=this.defaultFunction=this.defaultMode=this.container=null;null!=this.menu&&this.menu.destroy()};function mxUndoableEdit(a,b){this.source=a;this.changes=[];this.significant=null!=b?b:!0}mxUndoableEdit.prototype.source=null;\nmxUndoableEdit.prototype.changes=null;mxUndoableEdit.prototype.significant=null;mxUndoableEdit.prototype.undone=!1;mxUndoableEdit.prototype.redone=!1;mxUndoableEdit.prototype.isEmpty=function(){return 0==this.changes.length};mxUndoableEdit.prototype.isSignificant=function(){return this.significant};mxUndoableEdit.prototype.add=function(a){this.changes.push(a)};mxUndoableEdit.prototype.notify=function(){};mxUndoableEdit.prototype.die=function(){};\nmxUndoableEdit.prototype.undo=function(){if(!this.undone){this.source.fireEvent(new mxEventObject(mxEvent.START_EDIT));for(var a=this.changes.length-1;0<=a;a--){var b=this.changes[a];null!=b.execute?b.execute():null!=b.undo&&b.undo();this.source.fireEvent(new mxEventObject(mxEvent.EXECUTED,\"change\",b))}this.undone=!0;this.redone=!1;this.source.fireEvent(new mxEventObject(mxEvent.END_EDIT))}this.notify()};\nmxUndoableEdit.prototype.redo=function(){if(!this.redone){this.source.fireEvent(new mxEventObject(mxEvent.START_EDIT));for(var a=this.changes.length,b=0;b<a;b++){var c=this.changes[b];null!=c.execute?c.execute():null!=c.redo&&c.redo();this.source.fireEvent(new mxEventObject(mxEvent.EXECUTED,\"change\",c))}this.undone=!1;this.redone=!0;this.source.fireEvent(new mxEventObject(mxEvent.END_EDIT))}this.notify()};function mxUndoManager(a){this.size=null!=a?a:100;this.clear()}mxUndoManager.prototype=new mxEventSource;\nmxUndoManager.prototype.constructor=mxUndoManager;mxUndoManager.prototype.size=null;mxUndoManager.prototype.history=null;mxUndoManager.prototype.indexOfNextAdd=0;mxUndoManager.prototype.isEmpty=function(){return 0==this.history.length};mxUndoManager.prototype.clear=function(){this.history=[];this.indexOfNextAdd=0;this.fireEvent(new mxEventObject(mxEvent.CLEAR))};mxUndoManager.prototype.canUndo=function(){return 0<this.indexOfNextAdd};\nmxUndoManager.prototype.undo=function(){for(;0<this.indexOfNextAdd;){var a=this.history[--this.indexOfNextAdd];a.undo();if(a.isSignificant()){this.fireEvent(new mxEventObject(mxEvent.UNDO,\"edit\",a));break}}};mxUndoManager.prototype.canRedo=function(){return this.indexOfNextAdd<this.history.length};\nmxUndoManager.prototype.redo=function(){for(var a=this.history.length;this.indexOfNextAdd<a;){var b=this.history[this.indexOfNextAdd++];b.redo();if(b.isSignificant()){this.fireEvent(new mxEventObject(mxEvent.REDO,\"edit\",b));break}}};mxUndoManager.prototype.undoableEditHappened=function(a){this.trim();0<this.size&&this.size==this.history.length&&this.history.shift();this.history.push(a);this.indexOfNextAdd=this.history.length;this.fireEvent(new mxEventObject(mxEvent.ADD,\"edit\",a))};\nmxUndoManager.prototype.trim=function(){if(this.history.length>this.indexOfNextAdd)for(var a=this.history.splice(this.indexOfNextAdd,this.history.length-this.indexOfNextAdd),b=0;b<a.length;b++)a[b].die()};var mxUrlConverter=function(){};mxUrlConverter.prototype.enabled=!0;mxUrlConverter.prototype.baseUrl=null;mxUrlConverter.prototype.baseDomain=null;\nmxUrlConverter.prototype.updateBaseUrl=function(){this.baseDomain=location.protocol+\"//\"+location.host;this.baseUrl=this.baseDomain+location.pathname;var a=this.baseUrl.lastIndexOf(\"/\");0<a&&(this.baseUrl=this.baseUrl.substring(0,a+1))};mxUrlConverter.prototype.isEnabled=function(){return this.enabled};mxUrlConverter.prototype.setEnabled=function(a){this.enabled=a};mxUrlConverter.prototype.getBaseUrl=function(){return this.baseUrl};mxUrlConverter.prototype.setBaseUrl=function(a){this.baseUrl=a};\nmxUrlConverter.prototype.getBaseDomain=function(){return this.baseDomain};mxUrlConverter.prototype.setBaseDomain=function(a){this.baseDomain=a};mxUrlConverter.prototype.isRelativeUrl=function(a){return\"string\"===typeof a&&\"data:image\"!=a.substring(0,10)&&\"http://\"!=a.substring(0,7)&&\"file://\"!=a.substring(0,7)&&\"https://\"!=a.substring(0,8)&&\"//\"!=a.substring(0,2)};\nmxUrlConverter.prototype.convert=function(a){this.isEnabled()&&this.isRelativeUrl(a)&&(null==this.getBaseUrl()&&this.updateBaseUrl(),a=\"/\"==a.charAt(0)?this.getBaseDomain()+a:this.getBaseUrl()+a);return a};\nfunction mxPanningManager(a){this.thread=null;this.active=!1;this.dy=this.dx=this.t0y=this.t0x=this.tdy=this.tdx=0;this.scrollbars=!1;this.scrollTop=this.scrollLeft=0;this.mouseListener={mouseDown:function(c,d){},mouseMove:function(c,d){},mouseUp:mxUtils.bind(this,function(c,d){this.active&&this.stop()})};a.addMouseListener(this.mouseListener);this.mouseUpListener=mxUtils.bind(this,function(){this.active&&this.stop()});mxEvent.addListener(document,\"mouseup\",this.mouseUpListener);var b=mxUtils.bind(this,\nfunction(){this.scrollbars=mxUtils.hasScrollbars(a.container);this.scrollLeft=a.container.scrollLeft;this.scrollTop=a.container.scrollTop;return window.setInterval(mxUtils.bind(this,function(){this.tdx-=this.dx;this.tdy-=this.dy;this.scrollbars?(a.panGraph(-a.container.scrollLeft-Math.ceil(this.dx),-a.container.scrollTop-Math.ceil(this.dy)),a.panDx=this.scrollLeft-a.container.scrollLeft,a.panDy=this.scrollTop-a.container.scrollTop,a.fireEvent(new mxEventObject(mxEvent.PAN))):a.panGraph(this.getDx(),\nthis.getDy())}),this.delay)});this.isActive=function(){return active};this.getDx=function(){return Math.round(this.tdx)};this.getDy=function(){return Math.round(this.tdy)};this.start=function(){this.t0x=a.view.translate.x;this.t0y=a.view.translate.y;this.active=!0};this.panTo=function(c,d,e,f){this.active||this.start();this.scrollLeft=a.container.scrollLeft;this.scrollTop=a.container.scrollTop;var g=a.container;this.dx=c+(null!=e?e:0)-g.scrollLeft-g.clientWidth;this.dx=0>this.dx&&Math.abs(this.dx)<\nthis.border?this.border+this.dx:this.handleMouseOut?Math.max(this.dx,0):0;0==this.dx&&(this.dx=c-g.scrollLeft,this.dx=0<this.dx&&this.dx<this.border?this.dx-this.border:this.handleMouseOut?Math.min(0,this.dx):0);this.dy=d+(null!=f?f:0)-g.scrollTop-g.clientHeight;this.dy=0>this.dy&&Math.abs(this.dy)<this.border?this.border+this.dy:this.handleMouseOut?Math.max(this.dy,0):0;0==this.dy&&(this.dy=d-g.scrollTop,this.dy=0<this.dy&&this.dy<this.border?this.dy-this.border:this.handleMouseOut?Math.min(0,this.dy):\n0);0!=this.dx||0!=this.dy?(this.dx*=this.damper,this.dy*=this.damper,null==this.thread&&(this.thread=b())):null!=this.thread&&(window.clearInterval(this.thread),this.thread=null)};this.stop=function(){if(this.active)if(this.active=!1,null!=this.thread&&(window.clearInterval(this.thread),this.thread=null),this.tdy=this.tdx=0,this.scrollbars)a.panDx=0,a.panDy=0,a.fireEvent(new mxEventObject(mxEvent.PAN));else{var c=a.panDx,d=a.panDy;if(0!=c||0!=d)a.panGraph(0,0),a.view.setTranslate(this.t0x+c/a.view.scale,\nthis.t0y+d/a.view.scale)}};this.destroy=function(){a.removeMouseListener(this.mouseListener);mxEvent.removeListener(document,\"mouseup\",this.mouseUpListener)}}mxPanningManager.prototype.damper=1/6;mxPanningManager.prototype.delay=10;mxPanningManager.prototype.handleMouseOut=!0;mxPanningManager.prototype.border=0;function mxPopupMenu(a){this.factoryMethod=a;null!=a&&this.init()}mxPopupMenu.prototype=new mxEventSource;mxPopupMenu.prototype.constructor=mxPopupMenu;\nmxPopupMenu.prototype.submenuImage=mxClient.imageBasePath+\"/submenu.gif\";mxPopupMenu.prototype.zIndex=10006;mxPopupMenu.prototype.factoryMethod=null;mxPopupMenu.prototype.useLeftButtonForPopup=!1;mxPopupMenu.prototype.enabled=!0;mxPopupMenu.prototype.itemCount=0;mxPopupMenu.prototype.autoExpand=!1;mxPopupMenu.prototype.smartSeparators=!1;mxPopupMenu.prototype.labels=!0;\nmxPopupMenu.prototype.init=function(){this.table=document.createElement(\"table\");this.table.className=\"mxPopupMenu\";this.tbody=document.createElement(\"tbody\");this.table.appendChild(this.tbody);this.div=document.createElement(\"div\");this.div.className=\"mxPopupMenu\";this.div.style.display=\"inline\";this.div.style.zIndex=this.zIndex;this.div.appendChild(this.table);mxEvent.disableContextMenu(this.div)};mxPopupMenu.prototype.isEnabled=function(){return this.enabled};\nmxPopupMenu.prototype.setEnabled=function(a){this.enabled=a};mxPopupMenu.prototype.isPopupTrigger=function(a){return a.isPopupTrigger()||this.useLeftButtonForPopup&&mxEvent.isLeftMouseButton(a.getEvent())};\nmxPopupMenu.prototype.addItem=function(a,b,c,d,e,f,g,k){d=d||this;this.itemCount++;d.willAddSeparator&&(d.containsItems&&this.addSeparator(d,!0),d.willAddSeparator=!1);d.containsItems=!0;var l=document.createElement(\"tr\");l.className=\"mxPopupMenuItem\";var m=document.createElement(\"td\");m.className=\"mxPopupMenuIcon\";null!=b?(e=document.createElement(\"img\"),e.src=b,m.appendChild(e)):null!=e&&(b=document.createElement(\"div\"),b.className=e,m.appendChild(b));l.appendChild(m);this.labels&&(m=document.createElement(\"td\"),\nm.className=\"mxPopupMenuItem\"+(null==f||f?\"\":\" mxDisabled\"),mxUtils.write(m,a),m.align=\"left\",l.appendChild(m),a=document.createElement(\"td\"),a.className=\"mxPopupMenuItem\"+(null==f||f?\"\":\" mxDisabled\"),a.style.paddingRight=\"6px\",a.style.textAlign=\"right\",l.appendChild(a),null==d.div&&this.createSubmenu(d));d.tbody.appendChild(l);if(0!=g&&0!=f){var n=null;mxEvent.addGestureListeners(l,mxUtils.bind(this,function(p){this.eventReceiver=l;d.activeRow!=l&&d.activeRow!=d&&(null!=d.activeRow&&null!=d.activeRow.div.parentNode&&\nthis.hideSubmenu(d),null!=l.div&&(this.showSubmenu(d,l),d.activeRow=l));null!=document.selection&&8==document.documentMode&&(n=document.selection.createRange());mxEvent.consume(p)}),mxUtils.bind(this,function(p){d.activeRow!=l&&d.activeRow!=d&&(null!=d.activeRow&&null!=d.activeRow.div.parentNode&&this.hideSubmenu(d),this.autoExpand&&null!=l.div&&(this.showSubmenu(d,l),d.activeRow=l));k||(l.className=\"mxPopupMenuItemHover\")}),mxUtils.bind(this,function(p){if(this.eventReceiver==l){d.activeRow!=l&&\nthis.hideMenu();if(null!=n){try{n.select()}catch(q){}n=null}null!=c&&c(p)}this.eventReceiver=null;mxEvent.consume(p)}));k||mxEvent.addListener(l,\"mouseout\",mxUtils.bind(this,function(p){l.className=\"mxPopupMenuItem\"}))}return l};mxPopupMenu.prototype.addCheckmark=function(a,b){a=a.firstChild.nextSibling;a.style.backgroundImage=\"url('\"+b+\"')\";a.style.backgroundRepeat=\"no-repeat\";a.style.backgroundPosition=\"2px 50%\"};\nmxPopupMenu.prototype.createSubmenu=function(a){a.table=document.createElement(\"table\");a.table.className=\"mxPopupMenu\";a.tbody=document.createElement(\"tbody\");a.table.appendChild(a.tbody);a.div=document.createElement(\"div\");a.div.className=\"mxPopupMenu\";a.div.style.position=\"absolute\";a.div.style.display=\"inline\";a.div.style.zIndex=this.zIndex;a.div.appendChild(a.table);var b=document.createElement(\"img\");b.setAttribute(\"src\",this.submenuImage);td=a.firstChild.nextSibling.nextSibling;td.appendChild(b)};\nmxPopupMenu.prototype.showSubmenu=function(a,b){if(null!=b.div){b.div.style.left=a.div.offsetLeft+b.offsetLeft+b.offsetWidth-1+\"px\";b.div.style.top=a.div.offsetTop+b.offsetTop+\"px\";document.body.appendChild(b.div);var c=parseInt(b.div.offsetLeft),d=parseInt(b.div.offsetWidth),e=mxUtils.getDocumentScrollOrigin(document),f=document.documentElement;c+d>e.x+(document.body.clientWidth||f.clientWidth)&&(b.div.style.left=Math.max(0,a.div.offsetLeft-d+8)+\"px\");b.div.style.overflowY=\"auto\";b.div.style.overflowX=\n\"hidden\";b.div.style.maxHeight=Math.max(document.body.clientHeight,document.documentElement.clientHeight)-10+\"px\";mxUtils.fit(b.div)}};\nmxPopupMenu.prototype.addSeparator=function(a,b){a=a||this;if(this.smartSeparators&&!b)a.willAddSeparator=!0;else if(null!=a.tbody){a.willAddSeparator=!1;b=document.createElement(\"tr\");var c=document.createElement(\"td\");c.className=\"mxPopupMenuIcon\";c.style.padding=\"0 0 0 0px\";b.appendChild(c);c=document.createElement(\"td\");c.style.padding=\"0 0 0 0px\";c.setAttribute(\"colSpan\",\"2\");var d=document.createElement(\"hr\");d.setAttribute(\"size\",\"1\");c.appendChild(d);b.appendChild(c);a.tbody.appendChild(b)}};\nmxPopupMenu.prototype.popup=function(a,b,c,d){if(null!=this.div&&null!=this.tbody&&null!=this.factoryMethod){this.div.style.left=a+\"px\";for(this.div.style.top=b+\"px\";null!=this.tbody.firstChild;)mxEvent.release(this.tbody.firstChild),this.tbody.removeChild(this.tbody.firstChild);this.itemCount=0;this.factoryMethod(this,c,d);0<this.itemCount&&(this.showMenu(),this.fireEvent(new mxEventObject(mxEvent.SHOW)))}};\nmxPopupMenu.prototype.isMenuShowing=function(){return null!=this.div&&this.div.parentNode==document.body};mxPopupMenu.prototype.showMenu=function(){9<=document.documentMode&&(this.div.style.filter=\"none\");document.body.appendChild(this.div)};mxPopupMenu.prototype.hideMenu=function(){null!=this.div&&(null!=this.div.parentNode&&this.div.parentNode.removeChild(this.div),this.hideSubmenu(this),this.containsItems=!1,this.fireEvent(new mxEventObject(mxEvent.HIDE)))};\nmxPopupMenu.prototype.hideSubmenu=function(a){null!=a.activeRow&&(this.hideSubmenu(a.activeRow),null!=a.activeRow.div.parentNode&&a.activeRow.div.parentNode.removeChild(a.activeRow.div),a.activeRow=null)};mxPopupMenu.prototype.destroy=function(){null!=this.div&&(mxEvent.release(this.div),null!=this.div.parentNode&&this.div.parentNode.removeChild(this.div),this.div=null)};\nfunction mxAutoSaveManager(a){this.changeHandler=mxUtils.bind(this,function(b,c){this.isEnabled()&&this.graphModelChanged(c.getProperty(\"edit\").changes)});this.setGraph(a)}mxAutoSaveManager.prototype=new mxEventSource;mxAutoSaveManager.prototype.constructor=mxAutoSaveManager;mxAutoSaveManager.prototype.graph=null;mxAutoSaveManager.prototype.autoSaveDelay=10;mxAutoSaveManager.prototype.autoSaveThrottle=2;mxAutoSaveManager.prototype.autoSaveThreshold=5;mxAutoSaveManager.prototype.ignoredChanges=0;\nmxAutoSaveManager.prototype.lastSnapshot=0;mxAutoSaveManager.prototype.enabled=!0;mxAutoSaveManager.prototype.changeHandler=null;mxAutoSaveManager.prototype.isEnabled=function(){return this.enabled};mxAutoSaveManager.prototype.setEnabled=function(a){this.enabled=a};mxAutoSaveManager.prototype.setGraph=function(a){null!=this.graph&&this.graph.getModel().removeListener(this.changeHandler);this.graph=a;null!=this.graph&&this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler)};\nmxAutoSaveManager.prototype.save=function(){};mxAutoSaveManager.prototype.graphModelChanged=function(a){a=((new Date).getTime()-this.lastSnapshot)/1E3;a>this.autoSaveDelay||this.ignoredChanges>=this.autoSaveThreshold&&a>this.autoSaveThrottle?(this.save(),this.reset()):this.ignoredChanges++};mxAutoSaveManager.prototype.reset=function(){this.lastSnapshot=(new Date).getTime();this.ignoredChanges=0};mxAutoSaveManager.prototype.destroy=function(){this.setGraph(null)};\nfunction mxAnimation(a){this.delay=null!=a?a:20}mxAnimation.prototype=new mxEventSource;mxAnimation.prototype.constructor=mxAnimation;mxAnimation.prototype.delay=null;mxAnimation.prototype.thread=null;mxAnimation.prototype.isRunning=function(){return null!=this.thread};mxAnimation.prototype.startAnimation=function(){null==this.thread&&(this.thread=window.setInterval(mxUtils.bind(this,this.updateAnimation),this.delay))};mxAnimation.prototype.updateAnimation=function(){this.fireEvent(new mxEventObject(mxEvent.EXECUTE))};\nmxAnimation.prototype.stopAnimation=function(){null!=this.thread&&(window.clearInterval(this.thread),this.thread=null,this.fireEvent(new mxEventObject(mxEvent.DONE)))};function mxMorphing(a,b,c,d){mxAnimation.call(this,d);this.graph=a;this.steps=null!=b?b:6;this.ease=null!=c?c:1.5}mxMorphing.prototype=new mxAnimation;mxMorphing.prototype.constructor=mxMorphing;mxMorphing.prototype.graph=null;mxMorphing.prototype.steps=null;mxMorphing.prototype.step=0;mxMorphing.prototype.ease=null;\nmxMorphing.prototype.cells=null;mxMorphing.prototype.updateAnimation=function(){mxAnimation.prototype.updateAnimation.apply(this,arguments);var a=new mxCellStatePreview(this.graph);if(null!=this.cells)for(var b=0;b<this.cells.length;b++)this.animateCell(this.cells[b],a,!1);else this.animateCell(this.graph.getModel().getRoot(),a,!0);this.show(a);(a.isEmpty()||this.step++>=this.steps)&&this.stopAnimation()};mxMorphing.prototype.show=function(a){a.show()};\nmxMorphing.prototype.animateCell=function(a,b,c){var d=this.graph.getView().getState(a),e=null;if(null!=d&&(e=this.getDelta(d),this.graph.getModel().isVertex(a)&&(0!=e.x||0!=e.y))){var f=this.graph.view.getTranslate(),g=this.graph.view.getScale();e.x+=f.x*g;e.y+=f.y*g;b.moveState(d,-e.x/this.ease,-e.y/this.ease)}if(c&&!this.stopRecursion(d,e))for(d=this.graph.getModel().getChildCount(a),e=0;e<d;e++)this.animateCell(this.graph.getModel().getChildAt(a,e),b,c)};\nmxMorphing.prototype.stopRecursion=function(a,b){return null!=b&&(0!=b.x||0!=b.y)};mxMorphing.prototype.getDelta=function(a){var b=this.getOriginForCell(a.cell),c=this.graph.getView().getTranslate(),d=this.graph.getView().getScale();return new mxPoint((b.x-(a.x/d-c.x))*d,(b.y-(a.y/d-c.y))*d)};\nmxMorphing.prototype.getOriginForCell=function(a){var b=null;if(null!=a){var c=this.graph.getModel().getParent(a);a=this.graph.getCellGeometry(a);b=this.getOriginForCell(c);null!=a&&(a.relative?(c=this.graph.getCellGeometry(c),null!=c&&(b.x+=a.x*c.width,b.y+=a.y*c.height)):(b.x+=a.x,b.y+=a.y))}null==b&&(b=this.graph.view.getTranslate(),b=new mxPoint(-b.x,-b.y));return b};function mxImageBundle(a){this.images=[];this.alt=null!=a?a:!1}mxImageBundle.prototype.images=null;\nmxImageBundle.prototype.alt=null;mxImageBundle.prototype.putImage=function(a,b,c){this.images[a]={value:b,fallback:c}};mxImageBundle.prototype.getImage=function(a){var b=null;null!=a&&(a=this.images[a],null!=a&&(b=this.alt?a.fallback:a.value));return b};function mxImageExport(){}mxImageExport.prototype.includeOverlays=!1;\nmxImageExport.prototype.drawState=function(a,b){null!=a&&(this.visitStatesRecursive(a,b,mxUtils.bind(this,function(){this.drawCellState.apply(this,arguments)})),this.includeOverlays&&this.visitStatesRecursive(a,b,mxUtils.bind(this,function(){this.drawOverlays.apply(this,arguments)})))};\nmxImageExport.prototype.visitStatesRecursive=function(a,b,c){if(null!=a){c(a,b);for(var d=a.view.graph,e=d.model.getChildCount(a.cell),f=0;f<e;f++){var g=d.view.getState(d.model.getChildAt(a.cell,f));this.visitStatesRecursive(g,b,c)}}};mxImageExport.prototype.getTitleForCellState=function(a,b){return null};mxImageExport.prototype.getLinkForCellState=function(a,b){return null};mxImageExport.prototype.getLinkTargetForCellState=function(a,b){return null};\nmxImageExport.prototype.drawCellState=function(a,b){var c=this.getLinkForCellState(a,b);null!=c&&b.setLink(c,this.getLinkTargetForCellState(a,b));var d=this.getTitleForCellState(a,b);null!=d&&b.setTitle(d);this.drawShape(a,b);this.drawText(a,b);null!=d&&b.setTitle(null);null!=c&&b.setLink(null)};mxImageExport.prototype.drawShape=function(a,b){a.shape instanceof mxShape&&this.doDrawShape(a.shape,b)};mxImageExport.prototype.drawText=function(a,b){this.doDrawShape(a.text,b)};\nmxImageExport.prototype.doDrawShape=function(a,b){null!=a&&a.checkBounds()&&(b.save(),a.beforePaint(b),a.paint(b),a.afterPaint(b),b.restore())};mxImageExport.prototype.drawOverlays=function(a,b){null!=a.overlays&&a.overlays.visit(function(c,d){d instanceof mxShape&&d.paint(b)})};function mxAbstractCanvas2D(){this.converter=this.createUrlConverter();this.reset()}mxAbstractCanvas2D.prototype.state=null;mxAbstractCanvas2D.prototype.states=null;mxAbstractCanvas2D.prototype.path=null;\nmxAbstractCanvas2D.prototype.rotateHtml=!0;mxAbstractCanvas2D.prototype.lastX=0;mxAbstractCanvas2D.prototype.lastY=0;mxAbstractCanvas2D.prototype.moveOp=\"M\";mxAbstractCanvas2D.prototype.lineOp=\"L\";mxAbstractCanvas2D.prototype.quadOp=\"Q\";mxAbstractCanvas2D.prototype.curveOp=\"C\";mxAbstractCanvas2D.prototype.closeOp=\"Z\";mxAbstractCanvas2D.prototype.pointerEvents=!1;mxAbstractCanvas2D.prototype.createUrlConverter=function(){return new mxUrlConverter};\nmxAbstractCanvas2D.prototype.reset=function(){this.state=this.createState();this.states=[]};\nmxAbstractCanvas2D.prototype.createState=function(){return{dx:0,dy:0,scale:1,alpha:1,fillAlpha:1,strokeAlpha:1,fillColor:null,gradientFillAlpha:1,gradientColor:null,gradientAlpha:1,gradientDirection:null,strokeColor:null,strokeWidth:1,dashed:!1,dashPattern:\"3 3\",fixDash:!1,lineCap:\"flat\",lineJoin:\"miter\",miterLimit:10,fontColor:\"#000000\",fontBackgroundColor:null,fontBorderColor:null,fontSize:mxConstants.DEFAULT_FONTSIZE,fontFamily:mxConstants.DEFAULT_FONTFAMILY,fontStyle:0,shadow:!1,shadowColor:mxConstants.SHADOWCOLOR,\nshadowAlpha:mxConstants.SHADOW_OPACITY,shadowDx:mxConstants.SHADOW_OFFSET_X,shadowDy:mxConstants.SHADOW_OFFSET_Y,rotation:0,rotationCx:0,rotationCy:0}};mxAbstractCanvas2D.prototype.format=function(a){return Math.round(parseFloat(a))};\nmxAbstractCanvas2D.prototype.addOp=function(){if(null!=this.path&&(this.path.push(arguments[0]),2<arguments.length))for(var a=this.state,b=2;b<arguments.length;b+=2)this.lastX=arguments[b-1],this.lastY=arguments[b],this.path.push(this.format((this.lastX+a.dx)*a.scale)),this.path.push(this.format((this.lastY+a.dy)*a.scale))};mxAbstractCanvas2D.prototype.rotatePoint=function(a,b,c,d,e){c*=Math.PI/180;return mxUtils.getRotatedPoint(new mxPoint(a,b),Math.cos(c),Math.sin(c),new mxPoint(d,e))};\nmxAbstractCanvas2D.prototype.save=function(){this.states.push(this.state);this.state=mxUtils.clone(this.state)};mxAbstractCanvas2D.prototype.restore=function(){0<this.states.length&&(this.state=this.states.pop())};mxAbstractCanvas2D.prototype.setTitle=function(a){};mxAbstractCanvas2D.prototype.setLink=function(a,b){};mxAbstractCanvas2D.prototype.scale=function(a){this.state.scale*=a;this.state.strokeWidth*=a};mxAbstractCanvas2D.prototype.translate=function(a,b){this.state.dx+=a;this.state.dy+=b};\nmxAbstractCanvas2D.prototype.rotate=function(a,b,c,d,e){};mxAbstractCanvas2D.prototype.setAlpha=function(a){this.state.alpha=a};mxAbstractCanvas2D.prototype.setFillAlpha=function(a){this.state.fillAlpha=a};mxAbstractCanvas2D.prototype.setStrokeAlpha=function(a){this.state.strokeAlpha=a};mxAbstractCanvas2D.prototype.setFillColor=function(a){a==mxConstants.NONE&&(a=null);this.state.fillColor=a;this.state.gradientColor=null};\nmxAbstractCanvas2D.prototype.setFillStyle=function(a){a==mxConstants.NONE&&(a=null);this.state.fillStyle=a};mxAbstractCanvas2D.prototype.setGradient=function(a,b,c,d,e,f,g,k,l){c=this.state;c.fillColor=a;c.gradientFillAlpha=null!=k?k:1;c.gradientColor=b;c.gradientAlpha=null!=l?l:1;c.gradientDirection=g};mxAbstractCanvas2D.prototype.setStrokeColor=function(a){a==mxConstants.NONE&&(a=null);this.state.strokeColor=a};mxAbstractCanvas2D.prototype.setStrokeWidth=function(a){this.state.strokeWidth=a};\nmxAbstractCanvas2D.prototype.setDashed=function(a,b){this.state.dashed=a;this.state.fixDash=b};mxAbstractCanvas2D.prototype.setDashPattern=function(a){this.state.dashPattern=a};mxAbstractCanvas2D.prototype.setLineCap=function(a){this.state.lineCap=a};mxAbstractCanvas2D.prototype.setLineJoin=function(a){this.state.lineJoin=a};mxAbstractCanvas2D.prototype.setMiterLimit=function(a){this.state.miterLimit=a};\nmxAbstractCanvas2D.prototype.setFontColor=function(a){a==mxConstants.NONE&&(a=null);this.state.fontColor=a};mxAbstractCanvas2D.prototype.setFontBackgroundColor=function(a){a==mxConstants.NONE&&(a=null);this.state.fontBackgroundColor=a};mxAbstractCanvas2D.prototype.setFontBorderColor=function(a){a==mxConstants.NONE&&(a=null);this.state.fontBorderColor=a};mxAbstractCanvas2D.prototype.setFontSize=function(a){this.state.fontSize=parseFloat(a)};\nmxAbstractCanvas2D.prototype.setFontFamily=function(a){this.state.fontFamily=a};mxAbstractCanvas2D.prototype.setFontStyle=function(a){null==a&&(a=0);this.state.fontStyle=a};mxAbstractCanvas2D.prototype.setShadow=function(a){this.state.shadow=a};mxAbstractCanvas2D.prototype.setShadowColor=function(a){a==mxConstants.NONE&&(a=null);this.state.shadowColor=a};mxAbstractCanvas2D.prototype.setShadowAlpha=function(a){this.state.shadowAlpha=a};\nmxAbstractCanvas2D.prototype.setShadowOffset=function(a,b){this.state.shadowDx=a;this.state.shadowDy=b};mxAbstractCanvas2D.prototype.begin=function(){this.lastY=this.lastX=0;this.path=[]};mxAbstractCanvas2D.prototype.moveTo=function(a,b){this.addOp(this.moveOp,a,b)};mxAbstractCanvas2D.prototype.lineTo=function(a,b){this.addOp(this.lineOp,a,b)};mxAbstractCanvas2D.prototype.quadTo=function(a,b,c,d){this.addOp(this.quadOp,a,b,c,d)};\nmxAbstractCanvas2D.prototype.curveTo=function(a,b,c,d,e,f){this.addOp(this.curveOp,a,b,c,d,e,f)};mxAbstractCanvas2D.prototype.arcTo=function(a,b,c,d,e,f,g){a=mxUtils.arcToCurves(this.lastX,this.lastY,a,b,c,d,e,f,g);if(null!=a)for(b=0;b<a.length;b+=6)this.curveTo(a[b],a[b+1],a[b+2],a[b+3],a[b+4],a[b+5])};mxAbstractCanvas2D.prototype.close=function(a,b,c,d,e,f){this.addOp(this.closeOp)};mxAbstractCanvas2D.prototype.end=function(){};\nfunction mxXmlCanvas2D(a){mxAbstractCanvas2D.call(this);this.root=a;this.writeDefaults()}mxUtils.extend(mxXmlCanvas2D,mxAbstractCanvas2D);mxXmlCanvas2D.prototype.textEnabled=!0;mxXmlCanvas2D.prototype.compressed=!0;\nmxXmlCanvas2D.prototype.writeDefaults=function(){var a=this.createElement(\"fontfamily\");a.setAttribute(\"family\",mxConstants.DEFAULT_FONTFAMILY);this.root.appendChild(a);a=this.createElement(\"fontsize\");a.setAttribute(\"size\",mxConstants.DEFAULT_FONTSIZE);this.root.appendChild(a);a=this.createElement(\"shadowcolor\");a.setAttribute(\"color\",mxConstants.SHADOWCOLOR);this.root.appendChild(a);a=this.createElement(\"shadowalpha\");a.setAttribute(\"alpha\",mxConstants.SHADOW_OPACITY);this.root.appendChild(a);a=\nthis.createElement(\"shadowoffset\");a.setAttribute(\"dx\",mxConstants.SHADOW_OFFSET_X);a.setAttribute(\"dy\",mxConstants.SHADOW_OFFSET_Y);this.root.appendChild(a)};mxXmlCanvas2D.prototype.format=function(a){return parseFloat(parseFloat(a).toFixed(2))};mxXmlCanvas2D.prototype.createElement=function(a){return this.root.ownerDocument.createElement(a)};mxXmlCanvas2D.prototype.save=function(){this.compressed&&mxAbstractCanvas2D.prototype.save.apply(this,arguments);this.root.appendChild(this.createElement(\"save\"))};\nmxXmlCanvas2D.prototype.restore=function(){this.compressed&&mxAbstractCanvas2D.prototype.restore.apply(this,arguments);this.root.appendChild(this.createElement(\"restore\"))};mxXmlCanvas2D.prototype.scale=function(a){var b=this.createElement(\"scale\");b.setAttribute(\"scale\",a);this.root.appendChild(b)};mxXmlCanvas2D.prototype.translate=function(a,b){var c=this.createElement(\"translate\");c.setAttribute(\"dx\",this.format(a));c.setAttribute(\"dy\",this.format(b));this.root.appendChild(c)};\nmxXmlCanvas2D.prototype.rotate=function(a,b,c,d,e){var f=this.createElement(\"rotate\");if(0!=a||b||c)f.setAttribute(\"theta\",this.format(a)),f.setAttribute(\"flipH\",b?\"1\":\"0\"),f.setAttribute(\"flipV\",c?\"1\":\"0\"),f.setAttribute(\"cx\",this.format(d)),f.setAttribute(\"cy\",this.format(e)),this.root.appendChild(f)};\nmxXmlCanvas2D.prototype.setAlpha=function(a){if(this.compressed){if(this.state.alpha==a)return;mxAbstractCanvas2D.prototype.setAlpha.apply(this,arguments)}var b=this.createElement(\"alpha\");b.setAttribute(\"alpha\",this.format(a));this.root.appendChild(b)};mxXmlCanvas2D.prototype.setFillAlpha=function(a){if(this.compressed){if(this.state.fillAlpha==a)return;mxAbstractCanvas2D.prototype.setFillAlpha.apply(this,arguments)}var b=this.createElement(\"fillalpha\");b.setAttribute(\"alpha\",this.format(a));this.root.appendChild(b)};\nmxXmlCanvas2D.prototype.setStrokeAlpha=function(a){if(this.compressed){if(this.state.strokeAlpha==a)return;mxAbstractCanvas2D.prototype.setStrokeAlpha.apply(this,arguments)}var b=this.createElement(\"strokealpha\");b.setAttribute(\"alpha\",this.format(a));this.root.appendChild(b)};\nmxXmlCanvas2D.prototype.setFillColor=function(a){a==mxConstants.NONE&&(a=null);if(this.compressed){if(this.state.fillColor==a)return;mxAbstractCanvas2D.prototype.setFillColor.apply(this,arguments)}var b=this.createElement(\"fillcolor\");b.setAttribute(\"color\",null!=a?a:mxConstants.NONE);this.root.appendChild(b)};\nmxXmlCanvas2D.prototype.setGradient=function(a,b,c,d,e,f,g,k,l){if(null!=a&&null!=b){mxAbstractCanvas2D.prototype.setGradient.apply(this,arguments);var m=this.createElement(\"gradient\");m.setAttribute(\"c1\",a);m.setAttribute(\"c2\",b);m.setAttribute(\"x\",this.format(c));m.setAttribute(\"y\",this.format(d));m.setAttribute(\"w\",this.format(e));m.setAttribute(\"h\",this.format(f));null!=g&&m.setAttribute(\"direction\",g);null!=k&&m.setAttribute(\"alpha1\",k);null!=l&&m.setAttribute(\"alpha2\",l);this.root.appendChild(m)}};\nmxXmlCanvas2D.prototype.setStrokeColor=function(a){a==mxConstants.NONE&&(a=null);if(this.compressed){if(this.state.strokeColor==a)return;mxAbstractCanvas2D.prototype.setStrokeColor.apply(this,arguments)}var b=this.createElement(\"strokecolor\");b.setAttribute(\"color\",null!=a?a:mxConstants.NONE);this.root.appendChild(b)};\nmxXmlCanvas2D.prototype.setStrokeWidth=function(a){if(this.compressed){if(this.state.strokeWidth==a)return;mxAbstractCanvas2D.prototype.setStrokeWidth.apply(this,arguments)}var b=this.createElement(\"strokewidth\");b.setAttribute(\"width\",this.format(a));this.root.appendChild(b)};\nmxXmlCanvas2D.prototype.setDashed=function(a,b){if(this.compressed){if(this.state.dashed==a)return;mxAbstractCanvas2D.prototype.setDashed.apply(this,arguments)}var c=this.createElement(\"dashed\");c.setAttribute(\"dashed\",a?\"1\":\"0\");null!=b&&c.setAttribute(\"fixDash\",b?\"1\":\"0\");this.root.appendChild(c)};\nmxXmlCanvas2D.prototype.setDashPattern=function(a){if(this.compressed){if(this.state.dashPattern==a)return;mxAbstractCanvas2D.prototype.setDashPattern.apply(this,arguments)}var b=this.createElement(\"dashpattern\");b.setAttribute(\"pattern\",a);this.root.appendChild(b)};mxXmlCanvas2D.prototype.setLineCap=function(a){if(this.compressed){if(this.state.lineCap==a)return;mxAbstractCanvas2D.prototype.setLineCap.apply(this,arguments)}var b=this.createElement(\"linecap\");b.setAttribute(\"cap\",a);this.root.appendChild(b)};\nmxXmlCanvas2D.prototype.setLineJoin=function(a){if(this.compressed){if(this.state.lineJoin==a)return;mxAbstractCanvas2D.prototype.setLineJoin.apply(this,arguments)}var b=this.createElement(\"linejoin\");b.setAttribute(\"join\",a);this.root.appendChild(b)};mxXmlCanvas2D.prototype.setMiterLimit=function(a){if(this.compressed){if(this.state.miterLimit==a)return;mxAbstractCanvas2D.prototype.setMiterLimit.apply(this,arguments)}var b=this.createElement(\"miterlimit\");b.setAttribute(\"limit\",a);this.root.appendChild(b)};\nmxXmlCanvas2D.prototype.setFontColor=function(a){if(this.textEnabled){a==mxConstants.NONE&&(a=null);if(this.compressed){if(this.state.fontColor==a)return;mxAbstractCanvas2D.prototype.setFontColor.apply(this,arguments)}var b=this.createElement(\"fontcolor\");b.setAttribute(\"color\",null!=a?a:mxConstants.NONE);this.root.appendChild(b)}};\nmxXmlCanvas2D.prototype.setFontBackgroundColor=function(a){if(this.textEnabled){a==mxConstants.NONE&&(a=null);if(this.compressed){if(this.state.fontBackgroundColor==a)return;mxAbstractCanvas2D.prototype.setFontBackgroundColor.apply(this,arguments)}var b=this.createElement(\"fontbackgroundcolor\");b.setAttribute(\"color\",null!=a?a:mxConstants.NONE);this.root.appendChild(b)}};\nmxXmlCanvas2D.prototype.setFontBorderColor=function(a){if(this.textEnabled){a==mxConstants.NONE&&(a=null);if(this.compressed){if(this.state.fontBorderColor==a)return;mxAbstractCanvas2D.prototype.setFontBorderColor.apply(this,arguments)}var b=this.createElement(\"fontbordercolor\");b.setAttribute(\"color\",null!=a?a:mxConstants.NONE);this.root.appendChild(b)}};\nmxXmlCanvas2D.prototype.setFontSize=function(a){if(this.textEnabled){if(this.compressed){if(this.state.fontSize==a)return;mxAbstractCanvas2D.prototype.setFontSize.apply(this,arguments)}var b=this.createElement(\"fontsize\");b.setAttribute(\"size\",a);this.root.appendChild(b)}};\nmxXmlCanvas2D.prototype.setFontFamily=function(a){if(this.textEnabled){if(this.compressed){if(this.state.fontFamily==a)return;mxAbstractCanvas2D.prototype.setFontFamily.apply(this,arguments)}var b=this.createElement(\"fontfamily\");b.setAttribute(\"family\",a);this.root.appendChild(b)}};\nmxXmlCanvas2D.prototype.setFontStyle=function(a){if(this.textEnabled){null==a&&(a=0);if(this.compressed){if(this.state.fontStyle==a)return;mxAbstractCanvas2D.prototype.setFontStyle.apply(this,arguments)}var b=this.createElement(\"fontstyle\");b.setAttribute(\"style\",a);this.root.appendChild(b)}};\nmxXmlCanvas2D.prototype.setShadow=function(a){if(this.compressed){if(this.state.shadow==a)return;mxAbstractCanvas2D.prototype.setShadow.apply(this,arguments)}var b=this.createElement(\"shadow\");b.setAttribute(\"enabled\",a?\"1\":\"0\");this.root.appendChild(b)};\nmxXmlCanvas2D.prototype.setShadowColor=function(a){if(this.compressed){a==mxConstants.NONE&&(a=null);if(this.state.shadowColor==a)return;mxAbstractCanvas2D.prototype.setShadowColor.apply(this,arguments)}var b=this.createElement(\"shadowcolor\");b.setAttribute(\"color\",null!=a?a:mxConstants.NONE);this.root.appendChild(b)};\nmxXmlCanvas2D.prototype.setShadowAlpha=function(a){if(this.compressed){if(this.state.shadowAlpha==a)return;mxAbstractCanvas2D.prototype.setShadowAlpha.apply(this,arguments)}var b=this.createElement(\"shadowalpha\");b.setAttribute(\"alpha\",a);this.root.appendChild(b)};\nmxXmlCanvas2D.prototype.setShadowOffset=function(a,b){if(this.compressed){if(this.state.shadowDx==a&&this.state.shadowDy==b)return;mxAbstractCanvas2D.prototype.setShadowOffset.apply(this,arguments)}var c=this.createElement(\"shadowoffset\");c.setAttribute(\"dx\",a);c.setAttribute(\"dy\",b);this.root.appendChild(c)};\nmxXmlCanvas2D.prototype.rect=function(a,b,c,d){var e=this.createElement(\"rect\");e.setAttribute(\"x\",this.format(a));e.setAttribute(\"y\",this.format(b));e.setAttribute(\"w\",this.format(c));e.setAttribute(\"h\",this.format(d));this.root.appendChild(e)};\nmxXmlCanvas2D.prototype.roundrect=function(a,b,c,d,e,f){var g=this.createElement(\"roundrect\");g.setAttribute(\"x\",this.format(a));g.setAttribute(\"y\",this.format(b));g.setAttribute(\"w\",this.format(c));g.setAttribute(\"h\",this.format(d));g.setAttribute(\"dx\",this.format(e));g.setAttribute(\"dy\",this.format(f));this.root.appendChild(g)};\nmxXmlCanvas2D.prototype.ellipse=function(a,b,c,d){var e=this.createElement(\"ellipse\");e.setAttribute(\"x\",this.format(a));e.setAttribute(\"y\",this.format(b));e.setAttribute(\"w\",this.format(c));e.setAttribute(\"h\",this.format(d));this.root.appendChild(e)};\nmxXmlCanvas2D.prototype.image=function(a,b,c,d,e,f,g,k){e=this.converter.convert(e);var l=this.createElement(\"image\");l.setAttribute(\"x\",this.format(a));l.setAttribute(\"y\",this.format(b));l.setAttribute(\"w\",this.format(c));l.setAttribute(\"h\",this.format(d));l.setAttribute(\"src\",e);l.setAttribute(\"aspect\",f?\"1\":\"0\");l.setAttribute(\"flipH\",g?\"1\":\"0\");l.setAttribute(\"flipV\",k?\"1\":\"0\");this.root.appendChild(l)};\nmxXmlCanvas2D.prototype.begin=function(){this.root.appendChild(this.createElement(\"begin\"));this.lastY=this.lastX=0};mxXmlCanvas2D.prototype.moveTo=function(a,b){var c=this.createElement(\"move\");c.setAttribute(\"x\",this.format(a));c.setAttribute(\"y\",this.format(b));this.root.appendChild(c);this.lastX=a;this.lastY=b};\nmxXmlCanvas2D.prototype.lineTo=function(a,b){var c=this.createElement(\"line\");c.setAttribute(\"x\",this.format(a));c.setAttribute(\"y\",this.format(b));this.root.appendChild(c);this.lastX=a;this.lastY=b};mxXmlCanvas2D.prototype.quadTo=function(a,b,c,d){var e=this.createElement(\"quad\");e.setAttribute(\"x1\",this.format(a));e.setAttribute(\"y1\",this.format(b));e.setAttribute(\"x2\",this.format(c));e.setAttribute(\"y2\",this.format(d));this.root.appendChild(e);this.lastX=c;this.lastY=d};\nmxXmlCanvas2D.prototype.curveTo=function(a,b,c,d,e,f){var g=this.createElement(\"curve\");g.setAttribute(\"x1\",this.format(a));g.setAttribute(\"y1\",this.format(b));g.setAttribute(\"x2\",this.format(c));g.setAttribute(\"y2\",this.format(d));g.setAttribute(\"x3\",this.format(e));g.setAttribute(\"y3\",this.format(f));this.root.appendChild(g);this.lastX=e;this.lastY=f};mxXmlCanvas2D.prototype.close=function(){this.root.appendChild(this.createElement(\"close\"))};\nmxXmlCanvas2D.prototype.text=function(a,b,c,d,e,f,g,k,l,m,n,p,q){if(this.textEnabled&&null!=e){mxUtils.isNode(e)&&(e=mxUtils.getOuterHtml(e));var r=this.createElement(\"text\");r.setAttribute(\"x\",this.format(a));r.setAttribute(\"y\",this.format(b));r.setAttribute(\"w\",this.format(c));r.setAttribute(\"h\",this.format(d));r.setAttribute(\"str\",e);null!=f&&r.setAttribute(\"align\",f);null!=g&&r.setAttribute(\"valign\",g);r.setAttribute(\"wrap\",k?\"1\":\"0\");null==l&&(l=\"\");r.setAttribute(\"format\",l);null!=m&&r.setAttribute(\"overflow\",\nm);null!=n&&r.setAttribute(\"clip\",n?\"1\":\"0\");null!=p&&r.setAttribute(\"rotation\",p);null!=q&&r.setAttribute(\"dir\",q);this.root.appendChild(r)}};mxXmlCanvas2D.prototype.stroke=function(){this.root.appendChild(this.createElement(\"stroke\"))};mxXmlCanvas2D.prototype.fill=function(){this.root.appendChild(this.createElement(\"fill\"))};mxXmlCanvas2D.prototype.fillAndStroke=function(){this.root.appendChild(this.createElement(\"fillstroke\"))};\nfunction mxSvgCanvas2D(a,b){mxAbstractCanvas2D.call(this);this.root=a;this.gradients=[];this.fillPatterns=[];this.defs=null;this.styleEnabled=null!=b?b:!1;b=null;if(a.ownerDocument!=document){for(;null!=a&&\"svg\"!=a.nodeName;)a=a.parentNode;b=a}null!=b&&(0<b.getElementsByTagName(\"defs\").length&&(this.defs=b.getElementsByTagName(\"defs\")[0]),null==this.defs&&(this.defs=this.createElement(\"defs\"),null!=b.firstChild?b.insertBefore(this.defs,b.firstChild):b.appendChild(this.defs)),this.styleEnabled&&this.defs.appendChild(this.createStyle()))}\nmxUtils.extend(mxSvgCanvas2D,mxAbstractCanvas2D);\n(function(){mxSvgCanvas2D.prototype.useDomParser=!mxClient.IS_IE&&\"function\"===typeof DOMParser&&\"function\"===typeof XMLSerializer;if(mxSvgCanvas2D.prototype.useDomParser)try{var a=(new DOMParser).parseFromString(\"test text\",\"text/html\");mxSvgCanvas2D.prototype.useDomParser=null!=a}catch(b){mxSvgCanvas2D.prototype.useDomParser=!1}mxSvgCanvas2D.prototype.useAbsoluteIds=!mxClient.IS_CHROMEAPP&&!mxClient.IS_IE&&!mxClient.IS_IE11&&!mxClient.IS_EDGE&&0<document.getElementsByTagName(\"base\").length})();\nmxSvgCanvas2D.prototype.node=null;mxSvgCanvas2D.prototype.matchHtmlAlignment=!0;mxSvgCanvas2D.prototype.textEnabled=!0;mxSvgCanvas2D.prototype.foEnabled=!0;mxSvgCanvas2D.prototype.foAltText=\"[Object]\";mxSvgCanvas2D.prototype.foOffset=0;mxSvgCanvas2D.prototype.textOffset=0;mxSvgCanvas2D.prototype.imageOffset=0;mxSvgCanvas2D.prototype.strokeTolerance=0;mxSvgCanvas2D.prototype.minStrokeWidth=1;mxSvgCanvas2D.prototype.refCount=0;mxSvgCanvas2D.prototype.lineHeightCorrection=1;\nmxSvgCanvas2D.prototype.pointerEventsValue=\"all\";mxSvgCanvas2D.prototype.fontMetricsPadding=10;mxSvgCanvas2D.prototype.foreignObjectPadding=2;mxSvgCanvas2D.prototype.cacheOffsetSize=!0;mxSvgCanvas2D.prototype.setCssText=function(a,b){null!=a&&(mxClient.IS_IE||mxClient.IS_IE11?a.setAttribute(\"style\",b):null!=a.style&&(a.style.cssText=b))};mxSvgCanvas2D.prototype.format=function(a){return parseFloat(parseFloat(a).toFixed(2))};\nmxSvgCanvas2D.prototype.getBaseUrl=function(){var a=window.location.href,b=a.lastIndexOf(\"#\");0<b&&(a=a.substring(0,b));return a};mxSvgCanvas2D.prototype.reset=function(){mxAbstractCanvas2D.prototype.reset.apply(this,arguments);this.gradients=[];this.fillPatterns=[]};\nmxSvgCanvas2D.prototype.createStyle=function(a){a=this.createElement(\"style\");a.setAttribute(\"type\",\"text/css\");mxUtils.write(a,\"svg{font-family:\"+mxConstants.DEFAULT_FONTFAMILY+\";font-size:\"+mxConstants.DEFAULT_FONTSIZE+\";fill:none;stroke-miterlimit:10}\");return a};\nmxSvgCanvas2D.prototype.createElement=function(a,b){if(null!=this.root.ownerDocument.createElementNS)return this.root.ownerDocument.createElementNS(b||mxConstants.NS_SVG,a);a=this.root.ownerDocument.createElement(a);null!=b&&a.setAttribute(\"xmlns\",b);return a};mxSvgCanvas2D.prototype.getAlternateText=function(a,b,c,d,e,f,g,k,l,m,n,p,q){return null!=f?this.foAltText:null};\nmxSvgCanvas2D.prototype.createAlternateContent=function(a,b,c,d,e,f,g,k,l,m,n,p,q){a=this.getAlternateText(a,b,c,d,e,f,g,k,l,m,n,p,q);d=this.state;return null!=a&&0<d.fontSize?(k=k==mxConstants.ALIGN_TOP?1:k==mxConstants.ALIGN_BOTTOM?0:.3,e=g==mxConstants.ALIGN_RIGHT?\"end\":g==mxConstants.ALIGN_LEFT?\"start\":\"middle\",g=this.createElement(\"text\"),g.setAttribute(\"x\",Math.round(b+d.dx)),g.setAttribute(\"y\",Math.round(c+d.dy+k*d.fontSize)),g.setAttribute(\"fill\",d.fontColor||\"black\"),g.setAttribute(\"font-family\",\nd.fontFamily),g.setAttribute(\"font-size\",Math.round(d.fontSize)+\"px\"),\"start\"!=e&&g.setAttribute(\"text-anchor\",e),(d.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&g.setAttribute(\"font-weight\",\"bold\"),(d.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&g.setAttribute(\"font-style\",\"italic\"),b=[],(d.fontStyle&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&b.push(\"underline\"),(d.fontStyle&mxConstants.FONT_STRIKETHROUGH)==mxConstants.FONT_STRIKETHROUGH&&b.push(\"line-through\"),\n0<b.length&&g.setAttribute(\"text-decoration\",b.join(\" \")),mxUtils.write(g,a),g):null};\nmxSvgCanvas2D.prototype.createGradientId=function(a,b,c,d,e){a=mxUtils.rgba2hex(a);\"#\"==a.charAt(0)&&(a=a.substring(1));b=mxUtils.rgba2hex(b);\"#\"==b.charAt(0)&&(b=b.substring(1));a=a.toLowerCase()+\"-\"+c;b=b.toLowerCase()+\"-\"+d;c=null;null==e||e==mxConstants.DIRECTION_SOUTH?c=\"s\":e==mxConstants.DIRECTION_EAST?c=\"e\":e==mxConstants.DIRECTION_RADIAL?c=\"r\":(d=a,a=b,b=d,e==mxConstants.DIRECTION_NORTH?c=\"s\":e==mxConstants.DIRECTION_WEST&&(c=\"e\"));return\"mx-gradient-\"+a+\"-\"+b+\"-\"+c};\nmxSvgCanvas2D.prototype.getSvgGradient=function(a,b,c,d,e){var f=this.createGradientId(a,b,c,d,e),g=this.gradients[f];if(null==g){var k=this.root.ownerSVGElement,l=0,m=f+\"-\"+l;if(null!=k)for(g=k.ownerDocument.getElementById(m);null!=g&&g.ownerSVGElement!=k;)m=f+\"-\"+l++,g=k.ownerDocument.getElementById(m);else m=\"id\"+ ++this.refCount;null==g&&(g=this.createSvgGradient(a,b,c,d,e),g.setAttribute(\"id\",m),null!=this.defs?this.defs.appendChild(g):k.appendChild(g));this.gradients[f]=g}return g.getAttribute(\"id\")};\nmxSvgCanvas2D.prototype.createSvgGradient=function(a,b,c,d,e){var f=this.createElement(e==mxConstants.DIRECTION_RADIAL?\"radialGradient\":\"linearGradient\");f.setAttribute(\"x1\",\"0%\");f.setAttribute(\"y1\",\"0%\");f.setAttribute(\"x2\",\"0%\");f.setAttribute(\"y2\",\"0%\");null==e||e==mxConstants.DIRECTION_SOUTH?f.setAttribute(\"y2\",\"100%\"):e==mxConstants.DIRECTION_EAST?f.setAttribute(\"x2\",\"100%\"):e==mxConstants.DIRECTION_NORTH?f.setAttribute(\"y1\",\"100%\"):e==mxConstants.DIRECTION_WEST&&f.setAttribute(\"x1\",\"100%\");\ne=this.createElement(\"stop\");e.setAttribute(\"offset\",\"0%\");e.style.stopColor=a;e.style.stopOpacity=c;f.appendChild(e);e=this.createElement(\"stop\");e.setAttribute(\"offset\",\"100%\");e.style.stopColor=b;e.style.stopOpacity=d;f.appendChild(e);return f};mxSvgCanvas2D.prototype.createFillPatternId=function(a,b,c){c=mxUtils.rgba2hex(c);\"#\"==c.charAt(0)&&(c=c.substring(1));return(\"mx-pattern-\"+a+\"-\"+b+\"-\"+c).toLowerCase()};\nmxSvgCanvas2D.prototype.getFillPattern=function(a,b,c,d){var e=this.createFillPatternId(a,b,c),f=this.fillPatterns[e];if(null==f){var g=this.root.ownerSVGElement,k=0,l=e+\"-\"+k;if(null!=g)for(f=g.ownerDocument.getElementById(l);null!=f&&f.ownerSVGElement!=g;)l=e+\"-\"+k++,f=g.ownerDocument.getElementById(l);else l=\"id\"+ ++this.refCount;if(null==f){switch(a){case \"hatch\":f=this.createHatchPattern(b,c,d);break;case \"dots\":f=this.createDotsPattern(b,c,d);break;case \"cross-hatch\":f=this.createCrossHatchPattern(b,\nc,d);break;case \"dashed\":f=this.createDashedPattern(b,c,d);break;case \"zigzag\":case \"zigzag-line\":f=this.createZigZagLinePattern(b,c,d);break;default:return null}f.setAttribute(\"id\",l);null!=this.defs?this.defs.appendChild(f):g.appendChild(f)}this.fillPatterns[e]=f}return f.getAttribute(\"id\")};\nmxSvgCanvas2D.prototype.createHatchPattern=function(a,b,c){a=1.5*a*c;c=this.format((10+a)*c);var d=this.createElement(\"pattern\");d.setAttribute(\"patternUnits\",\"userSpaceOnUse\");d.setAttribute(\"width\",c);d.setAttribute(\"height\",c);d.setAttribute(\"x\",\"0\");d.setAttribute(\"y\",\"0\");d.setAttribute(\"patternTransform\",\"rotate(45)\");var e=this.createElement(\"line\");e.setAttribute(\"x1\",\"0\");e.setAttribute(\"y1\",\"0\");e.setAttribute(\"x2\",\"0\");e.setAttribute(\"y2\",c);e.setAttribute(\"stroke\",b);e.setAttribute(\"stroke-width\",\na);d.appendChild(e);return d};\nmxSvgCanvas2D.prototype.createDashedPattern=function(a,b,c){a=1.5*a*c;c=this.format((10+a)*c);var d=this.createElement(\"pattern\");d.setAttribute(\"patternUnits\",\"userSpaceOnUse\");d.setAttribute(\"width\",c);d.setAttribute(\"height\",c);d.setAttribute(\"x\",\"0\");d.setAttribute(\"y\",\"0\");d.setAttribute(\"patternTransform\",\"rotate(45)\");var e=this.createElement(\"line\");e.setAttribute(\"x1\",\"0\");e.setAttribute(\"y1\",c/4);e.setAttribute(\"x2\",\"0\");e.setAttribute(\"y2\",3*c/4);e.setAttribute(\"stroke\",b);e.setAttribute(\"stroke-width\",\na);d.appendChild(e);return d};\nmxSvgCanvas2D.prototype.createZigZagLinePattern=function(a,b,c){a=1.5*a*c;c=this.format((10+a)*c);var d=this.createElement(\"pattern\");d.setAttribute(\"patternUnits\",\"userSpaceOnUse\");d.setAttribute(\"width\",c);d.setAttribute(\"height\",c);d.setAttribute(\"x\",\"0\");d.setAttribute(\"y\",\"0\");d.setAttribute(\"patternTransform\",\"rotate(45)\");var e=this.createElement(\"path\"),f=c/4,g=3*c/4;e.setAttribute(\"d\",\"M \"+f+\" 0 L \"+g+\" 0 L \"+f+\" \"+c+\" L \"+g+\" \"+c);e.setAttribute(\"stroke\",b);e.setAttribute(\"stroke-width\",\na);e.setAttribute(\"fill\",\"none\");d.appendChild(e);return d};\nmxSvgCanvas2D.prototype.createCrossHatchPattern=function(a,b,c){a=.5*a*c;c=this.format(1.5*(10+a)*c);var d=this.createElement(\"pattern\");d.setAttribute(\"patternUnits\",\"userSpaceOnUse\");d.setAttribute(\"width\",c);d.setAttribute(\"height\",c);d.setAttribute(\"x\",\"0\");d.setAttribute(\"y\",\"0\");d.setAttribute(\"patternTransform\",\"rotate(45)\");var e=this.createElement(\"rect\");e.setAttribute(\"x\",0);e.setAttribute(\"y\",0);e.setAttribute(\"width\",c);e.setAttribute(\"height\",c);e.setAttribute(\"stroke\",b);e.setAttribute(\"stroke-width\",\na);e.setAttribute(\"fill\",\"none\");d.appendChild(e);return d};\nmxSvgCanvas2D.prototype.createDotsPattern=function(a,b,c){a=this.format((10+a)*c);c=this.createElement(\"pattern\");c.setAttribute(\"patternUnits\",\"userSpaceOnUse\");c.setAttribute(\"width\",a);c.setAttribute(\"height\",a);c.setAttribute(\"x\",\"0\");c.setAttribute(\"y\",\"0\");var d=this.createElement(\"circle\");d.setAttribute(\"cx\",a/2);d.setAttribute(\"cy\",a/2);d.setAttribute(\"r\",a/4);d.setAttribute(\"stroke\",\"none\");d.setAttribute(\"fill\",b);c.appendChild(d);return c};\nmxSvgCanvas2D.prototype.addTitle=function(a){if(null!=a&&null!=this.title){var b=this.createElement(\"title\");mxUtils.write(b,this.title);a.appendChild(b)}return a};\nmxSvgCanvas2D.prototype.addNode=function(a,b){var c=this.addTitle(this.node),d=this.state;if(null!=c){if(\"path\"==c.nodeName)if(null!=this.path&&0<this.path.length)c.setAttribute(\"d\",this.path.join(\" \"));else return;a&&null!=d.fillColor?this.updateFill():this.styleEnabled||(\"ellipse\"==c.nodeName&&mxClient.IS_FF?c.setAttribute(\"fill\",\"transparent\"):c.setAttribute(\"fill\",\"none\"),a=!1);b&&null!=d.strokeColor?this.updateStroke():this.styleEnabled||c.setAttribute(\"stroke\",\"none\");null!=d.transform&&0<d.transform.length&&\nc.setAttribute(\"transform\",d.transform);this.pointerEvents?c.setAttribute(\"pointer-events\",this.pointerEventsValue):this.pointerEvents||null!=this.originalRoot||c.setAttribute(\"pointer-events\",\"none\");d.shadow&&this.root.appendChild(this.createShadow(c));0<this.strokeTolerance&&(!a||null==d.fillColor)&&this.addTolerance(c);(\"rect\"!=c.nodeName&&\"path\"!=c.nodeName&&\"ellipse\"!=c.nodeName||\"none\"!=c.getAttribute(\"fill\")&&\"transparent\"!=c.getAttribute(\"fill\")||\"none\"!=c.getAttribute(\"stroke\")||\"none\"!=\nc.getAttribute(\"pointer-events\"))&&this.root.appendChild(c);this.node=null}};mxSvgCanvas2D.prototype.addTolerance=function(a){this.root.appendChild(this.createTolerance(a))};\nmxSvgCanvas2D.prototype.updateFill=function(){var a=this.state;(1>a.alpha||1>a.fillAlpha)&&this.node.setAttribute(\"fill-opacity\",a.alpha*a.fillAlpha);var b=!1;if(null!=a.fillColor)if(null!=a.gradientColor&&a.gradientColor!=mxConstants.NONE){b=!0;var c=this.getSvgGradient(String(a.fillColor),String(a.gradientColor),a.gradientFillAlpha,a.gradientAlpha,a.gradientDirection);if(this.root.ownerDocument==document&&this.useAbsoluteIds){var d=this.getBaseUrl().replace(/([\\(\\)])/g,\"\\\\$1\");d=\"url(\"+d+\"#\"+c+\n\")\"}else d=\"url(#\"+c+\")\"}else d=String(a.fillColor).toLowerCase();a=null==a.fillStyle||\"auto\"==a.fillStyle||\"solid\"==a.fillStyle?null:this.getFillPattern(a.fillStyle,this.getCurrentStrokeWidth(),d,a.scale);b||null==a?this.node.setAttribute(\"fill\",d):this.root.ownerDocument==document&&this.useAbsoluteIds?(d=this.getBaseUrl().replace(/([\\(\\)])/g,\"\\\\$1\"),this.node.setAttribute(\"fill\",\"url(\"+d+\"#\"+a+\")\")):this.node.setAttribute(\"fill\",\"url(#\"+a+\")\")};\nmxSvgCanvas2D.prototype.getCurrentStrokeWidth=function(){return Math.max(this.minStrokeWidth,Math.max(.01,this.format(this.state.strokeWidth*this.state.scale)))};\nmxSvgCanvas2D.prototype.updateStroke=function(){var a=this.state;this.node.setAttribute(\"stroke\",String(a.strokeColor).toLowerCase());(1>a.alpha||1>a.strokeAlpha)&&this.node.setAttribute(\"stroke-opacity\",a.alpha*a.strokeAlpha);var b=this.getCurrentStrokeWidth();1!=b&&this.node.setAttribute(\"stroke-width\",b);\"path\"==this.node.nodeName&&this.updateStrokeAttributes();a.dashed&&this.node.setAttribute(\"stroke-dasharray\",this.createDashPattern((a.fixDash?1:a.strokeWidth)*a.scale))};\nmxSvgCanvas2D.prototype.updateStrokeAttributes=function(){var a=this.state;null!=a.lineJoin&&\"miter\"!=a.lineJoin&&this.node.setAttribute(\"stroke-linejoin\",a.lineJoin);if(null!=a.lineCap){var b=a.lineCap;\"flat\"==b&&(b=\"butt\");\"butt\"!=b&&this.node.setAttribute(\"stroke-linecap\",b)}null==a.miterLimit||this.styleEnabled&&10==a.miterLimit||this.node.setAttribute(\"stroke-miterlimit\",a.miterLimit)};\nmxSvgCanvas2D.prototype.createDashPattern=function(a){var b=[];if(\"string\"===typeof this.state.dashPattern){var c=this.state.dashPattern.split(\" \");if(0<c.length)for(var d=0;d<c.length;d++)b[d]=Number(c[d])*a}return b.join(\" \")};\nmxSvgCanvas2D.prototype.createTolerance=function(a){a=a.cloneNode(!0);var b=parseFloat(a.getAttribute(\"stroke-width\")||1)+this.strokeTolerance;a.setAttribute(\"pointer-events\",\"stroke\");a.setAttribute(\"visibility\",\"hidden\");a.removeAttribute(\"stroke-dasharray\");a.setAttribute(\"stroke-width\",b);a.setAttribute(\"fill\",\"none\");a.setAttribute(\"stroke\",mxClient.IS_OT?\"none\":\"white\");return a};\nmxSvgCanvas2D.prototype.createShadow=function(a){a=a.cloneNode(!0);var b=this.state;\"none\"==a.getAttribute(\"fill\")||mxClient.IS_FF&&\"transparent\"==a.getAttribute(\"fill\")||a.setAttribute(\"fill\",b.shadowColor);\"none\"!=a.getAttribute(\"stroke\")&&a.setAttribute(\"stroke\",b.shadowColor);a.setAttribute(\"transform\",\"translate(\"+this.format(b.shadowDx*b.scale)+\",\"+this.format(b.shadowDy*b.scale)+\")\"+(b.transform||\"\"));a.setAttribute(\"opacity\",b.shadowAlpha);return a};\nmxSvgCanvas2D.prototype.setTitle=function(a){this.title=a};mxSvgCanvas2D.prototype.setLink=function(a,b){if(null==a)this.root=this.originalRoot;else{this.originalRoot=this.root;var c=this.createElement(\"a\");null==c.setAttributeNS||this.root.ownerDocument!=document&&null==document.documentMode?c.setAttribute(\"xlink:href\",a):c.setAttributeNS(mxConstants.NS_XLINK,\"xlink:href\",a);null!=b&&c.setAttribute(\"target\",b);this.root.appendChild(c);this.root=c}};\nmxSvgCanvas2D.prototype.rotate=function(a,b,c,d,e){if(0!=a||b||c){var f=this.state;d+=f.dx;e+=f.dy;d*=f.scale;e*=f.scale;f.transform=f.transform||\"\";if(b&&c)a+=180;else if(b!=c){var g=b?d:0,k=b?-1:1,l=c?e:0,m=c?-1:1;f.transform+=\"translate(\"+this.format(g)+\",\"+this.format(l)+\")scale(\"+this.format(k)+\",\"+this.format(m)+\")translate(\"+this.format(-g)+\",\"+this.format(-l)+\")\"}if(b?!c:c)a*=-1;0!=a&&(f.transform+=\"rotate(\"+this.format(a)+\",\"+this.format(d)+\",\"+this.format(e)+\")\");f.rotation+=a;f.rotationCx=\nd;f.rotationCy=e}};mxSvgCanvas2D.prototype.begin=function(){mxAbstractCanvas2D.prototype.begin.apply(this,arguments);this.node=this.createElement(\"path\")};mxSvgCanvas2D.prototype.rect=function(a,b,c,d){var e=this.state,f=this.createElement(\"rect\");f.setAttribute(\"x\",this.format((a+e.dx)*e.scale));f.setAttribute(\"y\",this.format((b+e.dy)*e.scale));f.setAttribute(\"width\",this.format(c*e.scale));f.setAttribute(\"height\",this.format(d*e.scale));this.node=f};\nmxSvgCanvas2D.prototype.roundrect=function(a,b,c,d,e,f){this.rect(a,b,c,d);0<e&&this.node.setAttribute(\"rx\",this.format(e*this.state.scale));0<f&&this.node.setAttribute(\"ry\",this.format(f*this.state.scale))};mxSvgCanvas2D.prototype.ellipse=function(a,b,c,d){var e=this.state,f=this.createElement(\"ellipse\");f.setAttribute(\"cx\",this.format((a+c/2+e.dx)*e.scale));f.setAttribute(\"cy\",this.format((b+d/2+e.dy)*e.scale));f.setAttribute(\"rx\",c/2*e.scale);f.setAttribute(\"ry\",d/2*e.scale);this.node=f};\nmxSvgCanvas2D.prototype.image=function(a,b,c,d,e,f,g,k,l){e=this.converter.convert(e);f=null!=f?f:!0;g=null!=g?g:!1;k=null!=k?k:!1;var m=this.state;a+=m.dx;b+=m.dy;var n=this.createElement(\"image\");n.setAttribute(\"x\",this.format(a*m.scale)+this.imageOffset);n.setAttribute(\"y\",this.format(b*m.scale)+this.imageOffset);n.setAttribute(\"width\",this.format(c*m.scale));n.setAttribute(\"height\",this.format(d*m.scale));null==n.setAttributeNS?n.setAttribute(\"xlink:href\",e):n.setAttributeNS(mxConstants.NS_XLINK,\n\"xlink:href\",e);f||n.setAttribute(\"preserveAspectRatio\",\"none\");(1>m.alpha||1>m.fillAlpha)&&n.setAttribute(\"opacity\",m.alpha*m.fillAlpha);e=this.state.transform||\"\";if(g||k){var p=f=1,q=0,r=0;g&&(f=-1,q=-c-2*a);k&&(p=-1,r=-d-2*b);e+=\"scale(\"+f+\",\"+p+\")translate(\"+q*m.scale+\",\"+r*m.scale+\")\"}0<e.length&&n.setAttribute(\"transform\",e);this.pointerEvents||n.setAttribute(\"pointer-events\",\"none\");null!=l&&this.processClipPath(n,l,new mxRectangle(a,b,c,d));this.root.appendChild(n)};\nmxSvgCanvas2D.prototype.processClipPath=function(a,b,c){try{var d=this.createElement(\"clipPath\");d.setAttribute(\"id\",this.createClipPathId(b));d.setAttribute(\"clipPathUnits\",\"objectBoundingBox\");var e=this.appendClipPath(d,b,c);if(null!=e){var f=this.state;a.setAttribute(\"x\",c.x*f.scale-c.width*f.scale*e.x/e.width+this.imageOffset);a.setAttribute(\"y\",c.y*f.scale-c.height*f.scale*e.y/e.height+this.imageOffset);a.setAttribute(\"width\",c.width*f.scale/e.width);a.setAttribute(\"height\",c.height*f.scale/\ne.height)}this.setClip(a,d)}catch(g){}};\nmxSvgCanvas2D.prototype.convertHtml=function(a){if(this.useDomParser){var b=(new DOMParser).parseFromString(a,\"text/html\");null!=b&&(a=(new XMLSerializer).serializeToString(b.body),\"<body\"==a.substring(0,5)&&(a=a.substring(a.indexOf(\">\",5)+1)),\"</body>\"==a.substring(a.length-7,a.length)&&(a=a.substring(0,a.length-7)))}else{if(null!=document.implementation&&null!=document.implementation.createDocument){b=document.implementation.createDocument(\"http://www.w3.org/1999/xhtml\",\"html\",null);var c=b.createElement(\"body\");\nb.documentElement.appendChild(c);var d=document.createElement(\"div\");d.innerHTML=a;for(a=d.firstChild;null!=a;)d=a.nextSibling,c.appendChild(b.adoptNode(a)),a=d;return c.innerHTML}b=document.createElement(\"textarea\");b.innerHTML=a.replace(/&amp;/g,\"&amp;amp;\").replace(/&#60;/g,\"&amp;lt;\").replace(/&#62;/g,\"&amp;gt;\").replace(/&lt;/g,\"&amp;lt;\").replace(/&gt;/g,\"&amp;gt;\").replace(/</g,\"&lt;\").replace(/>/g,\"&gt;\");a=b.value.replace(/&/g,\"&amp;\").replace(/&amp;lt;/g,\"&lt;\").replace(/&amp;gt;/g,\"&gt;\").replace(/&amp;amp;/g,\n\"&amp;\").replace(/<br>/g,\"<br />\").replace(/<hr>/g,\"<hr />\").replace(/(<img[^>]+)>/gm,\"$1 />\")}return a};\nmxSvgCanvas2D.prototype.createDiv=function(a){mxUtils.isNode(a)||(a=\"<div><div>\"+this.convertHtml(a)+\"</div></div>\");if(mxClient.IS_IE||mxClient.IS_IE11||!document.createElementNS)return mxUtils.isNode(a)&&(a=\"<div><div>\"+mxUtils.getXml(a)+\"</div></div>\"),mxUtils.parseXml('<div xmlns=\"http://www.w3.org/1999/xhtml\">'+a+\"</div>\").documentElement;var b=document.createElementNS(\"http://www.w3.org/1999/xhtml\",\"div\");if(mxUtils.isNode(a)){var c=document.createElement(\"div\"),d=c.cloneNode(!1);this.root.ownerDocument!=\ndocument?c.appendChild(a.cloneNode(!0)):c.appendChild(a);d.appendChild(c);b.appendChild(d)}else b.innerHTML=a;return b};mxSvgCanvas2D.prototype.updateText=function(a,b,c,d,e,f,g,k,l,m,n){null!=n&&null!=n.firstChild&&null!=n.firstChild.firstChild&&this.updateTextNodes(a,b,c,d,e,f,g,k,l,m,n.firstChild)};\nmxSvgCanvas2D.prototype.addForeignObject=function(a,b,c,d,e,f,g,k,l,m,n,p,q,r,t){q=this.addTitle(this.createElement(\"g\"));var u=this.createElement(\"foreignObject\");this.setCssText(u,\"overflow: visible; text-align: left;\");u.setAttribute(\"pointer-events\",\"none\");r.ownerDocument!=document&&(r=mxUtils.importNodeImplementation(u.ownerDocument,r,!0));u.appendChild(r);q.appendChild(u);this.updateTextNodes(a,b,c,d,f,g,k,m,n,p,q);this.root.ownerDocument!=document&&(a=this.createAlternateContent(u,a,b,c,d,\ne,f,g,k,l,m,n,p),null!=a&&(u.setAttribute(\"requiredFeatures\",\"http://www.w3.org/TR/SVG11/feature#Extensibility\"),b=this.createElement(\"switch\"),b.appendChild(u),b.appendChild(a),q.appendChild(b)));t.appendChild(q)};\nmxSvgCanvas2D.prototype.updateTextNodes=function(a,b,c,d,e,f,g,k,l,m,n){var p=this.state.scale;mxSvgCanvas2D.createCss(c+this.foreignObjectPadding,d,e,f,g,k,l,null!=this.state.fontBackgroundColor?this.state.fontBackgroundColor:null,null!=this.state.fontBorderColor?this.state.fontBorderColor:null,\"display: flex; align-items: unsafe \"+(f==mxConstants.ALIGN_TOP?\"flex-start\":f==mxConstants.ALIGN_BOTTOM?\"flex-end\":\"center\")+\"; justify-content: unsafe \"+(e==mxConstants.ALIGN_LEFT?\"flex-start\":e==mxConstants.ALIGN_RIGHT?\n\"flex-end\":\"center\")+\"; \",this.getTextCss(),p,mxUtils.bind(this,function(q,r,t,u,x){a+=this.state.dx;b+=this.state.dy;var y=n.firstChild;\"title\"==y.nodeName&&(y=y.nextSibling);var B=y.firstChild,A=B.firstChild,C=(this.rotateHtml?this.state.rotation:0)+(null!=m?m:0),z=(0!=this.foOffset?\"translate(\"+this.foOffset+\" \"+this.foOffset+\")\":\"\")+(1!=p?\"scale(\"+p+\")\":\"\");this.setCssText(A.firstChild,x);this.setCssText(A,u);A.setAttribute(\"data-drawio-colors\",\"color: \"+this.state.fontColor+\"; \"+(null==this.state.fontBackgroundColor?\n\"\":\"background-color: \"+this.state.fontBackgroundColor+\"; \")+(null==this.state.fontBorderColor?\"\":\"border-color: \"+this.state.fontBorderColor+\"; \"));y.setAttribute(\"width\",Math.ceil(1/Math.min(1,p)*100)+\"%\");y.setAttribute(\"height\",Math.ceil(1/Math.min(1,p)*100)+\"%\");r=Math.round(b+r);0>r?(y.setAttribute(\"y\",r),t+=\"padding-top: 0; \"):(y.removeAttribute(\"y\"),t+=\"padding-top: \"+r+\"px; \");this.setCssText(B,t+\"margin-left: \"+Math.round(a+q)+\"px;\");z+=0!=C?\"rotate(\"+C+\" \"+a+\" \"+b+\")\":\"\";\"\"!=z?n.setAttribute(\"transform\",\nz):n.removeAttribute(\"transform\");1!=this.state.alpha?n.setAttribute(\"opacity\",this.state.alpha):n.removeAttribute(\"opacity\")}))};\nmxSvgCanvas2D.createCss=function(a,b,c,d,e,f,g,k,l,m,n,p,q){p=\"box-sizing: border-box; font-size: 0; text-align: \"+(c==mxConstants.ALIGN_LEFT?\"left\":c==mxConstants.ALIGN_RIGHT?\"right\":\"center\")+\"; \";var r=mxUtils.getAlignmentAsPoint(c,d);c=\"overflow: hidden; \";var t=\"width: 1px; \",u=\"height: 1px; \",x=r.x*a;r=r.y*b;g?(t=\"width: \"+Math.round(a)+\"px; \",p+=\"max-height: \"+Math.round(b)+\"px; \",r=0):\"fill\"==f?(t=\"width: \"+Math.round(a)+\"px; \",u=\"height: \"+Math.round(b)+\"px; \",n+=\"width: 100%; height: 100%; \",\np+=\"width: \"+Math.round(a-2)+\"px; \"+u):\"width\"==f?(t=\"width: \"+Math.round(a-2)+\"px; \",n+=\"width: 100%; \",p+=t,r=0,0<b&&(p+=\"max-height: \"+Math.round(b)+\"px; \")):\"block\"==f?(t=\"width: \"+Math.round(a-2)+\"px; \",n+=\"width: 100%; \",c=\"\",r=0,p+=t,\"middle\"==d&&(p+=\"max-height: \"+Math.round(b)+\"px; \")):(c=\"\",r=0);b=\"\";null!=k&&(b+=\"background-color: \"+k+\"; \");null!=l&&(b+=\"border: 1px solid \"+l+\"; \");\"\"==c||g?n+=b:p+=b;e&&0<a?(n+=\"white-space: normal; word-wrap: \"+mxConstants.WORD_WRAP+\"; \",t=\"width: \"+Math.round(a)+\n\"px; \",\"\"!=c&&\"fill\"!=f&&(r=0)):(n+=\"white-space: nowrap; \",\"\"==c&&\"block\"!=f&&(x=0));q(x,r,m+t+u,p+c,n,c)};\nmxSvgCanvas2D.prototype.getTextCss=function(){var a=this.state,b=\"display: inline-block; font-size: \"+a.fontSize+\"px; font-family: \"+a.fontFamily+\"; color: \"+a.fontColor+\"; line-height: \"+(mxConstants.ABSOLUTE_LINE_HEIGHT?a.fontSize*mxConstants.LINE_HEIGHT+\"px\":mxConstants.LINE_HEIGHT*this.lineHeightCorrection)+\"; pointer-events: \"+(this.pointerEvents?this.pointerEventsValue:\"none\")+\"; \";(a.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&(b+=\"font-weight: bold; \");(a.fontStyle&mxConstants.FONT_ITALIC)==\nmxConstants.FONT_ITALIC&&(b+=\"font-style: italic; \");var c=[];(a.fontStyle&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&c.push(\"underline\");(a.fontStyle&mxConstants.FONT_STRIKETHROUGH)==mxConstants.FONT_STRIKETHROUGH&&c.push(\"line-through\");0<c.length&&(b+=\"text-decoration: \"+c.join(\" \")+\"; \");return b};\nmxSvgCanvas2D.prototype.text=function(a,b,c,d,e,f,g,k,l,m,n,p,q){if(this.textEnabled&&null!=e)if(p=null!=p?p:0,this.foEnabled&&\"html\"==l){var r=this.createDiv(e);null!=r&&(null!=q&&r.setAttribute(\"dir\",q),this.addForeignObject(a,b,c,d,e,f,g,k,l,m,n,p,q,r,this.root))}else this.plainText(a+this.state.dx,b+this.state.dy,c,d,e,f,g,k,m,n,p,q)};\nmxSvgCanvas2D.prototype.createClip=function(a,b,c,d){a=Math.round(a);b=Math.round(b);c=Math.round(c);d=Math.round(d);for(var e=\"mx-clip-\"+a+\"-\"+b+\"-\"+c+\"-\"+d,f=0,g=e+\"-\"+f;null!=document.getElementById(g);)g=e+\"-\"+ ++f;e=this.createElement(\"clipPath\");e.setAttribute(\"id\",g);g=this.createElement(\"rect\");g.setAttribute(\"x\",a);g.setAttribute(\"y\",b);g.setAttribute(\"width\",c);g.setAttribute(\"height\",d);e.appendChild(g);return e};\nmxSvgCanvas2D.prototype.createClipPathId=function(a){a=\"mx-clippath-\"+a.replace(/[^a-zA-Z0-9]+/g,\"-\");for(var b=\"-\"==a.charAt(a.length-1)?\"\":\"-\",c=0,d=a+b+c;null!=document.getElementById(d);)d=a+b+ ++c;return d};\nmxSvgCanvas2D.prototype.appendClipPath=function(a,b,c){var d=b.match(/\\(([^)]+)\\)/),e=null;\"polygon\"==b.substring(0,7)?e=this.appendPolygonClip(d[1],a,c):\"circle\"==b.substring(0,6)?e=this.appendCircleClip(d[1],a,c):\"ellipse\"==b.substring(0,7)?e=this.appendEllipseClip(d[1],a,c):\"inset\"==b.substring(0,5)&&(e=this.appendInsetClip(d[1],a,c));return e};\nmxSvgCanvas2D.prototype.appendPolygonClip=function(a,b,c){c=this.createElement(\"polygon\");a=a.split(/[ ,]+/);for(var d=null,e=null,f=null,g=null,k=[],l=0;l<a.length;l++){var m=this.parseClipValue(a,l);if(0==l%2){if(null==d||d>m)d=m;if(null==f||f<m)f=m}else{if(null==e||e>m)e=m;if(null==g||g<m)g=m}k.push(m)}c.setAttribute(\"points\",k.join(\",\"));b.appendChild(c);return new mxRectangle(d,e,f-d,g-e)};\nmxSvgCanvas2D.prototype.appendCircleClip=function(a,b,c){c=this.createElement(\"circle\");var d=a.split(/[ ,]+/);a=this.parseClipValue(d,0);var e=this.parseClipValue(d,2);d=this.parseClipValue(d,3);c.setAttribute(\"r\",a);c.setAttribute(\"cx\",e);c.setAttribute(\"cy\",d);b.appendChild(c);return new mxRectangle(e-a,d-a,2*a,2*a)};\nmxSvgCanvas2D.prototype.appendEllipseClip=function(a,b,c){c=this.createElement(\"ellipse\");var d=a.split(/[ ,]+/);a=this.parseClipValue(d,0);var e=this.parseClipValue(d,1),f=this.parseClipValue(d,3);d=this.parseClipValue(d,4);c.setAttribute(\"rx\",a);c.setAttribute(\"ry\",e);c.setAttribute(\"cx\",f);c.setAttribute(\"cy\",d);b.appendChild(c);return new mxRectangle(f-a,d-e,2*a,2*e)};\nmxSvgCanvas2D.prototype.appendInsetClip=function(a,b,c){c=this.createElement(\"rect\");var d=a.split(/[ ,]+/);a=this.parseClipValue(d,0);var e=this.parseClipValue(d,1),f=this.parseClipValue(d,2),g=this.parseClipValue(d,3);e=1-e-g;f=1-a-f;c.setAttribute(\"x\",g);c.setAttribute(\"y\",a);c.setAttribute(\"width\",e);c.setAttribute(\"height\",f);4<d.length&&\"round\"==d[4]&&(d=this.parseClipValue(d,5),c.setAttribute(\"rx\",d),c.setAttribute(\"ry\",d));b.appendChild(c);return new mxRectangle(g,a,e,f)};\nmxSvgCanvas2D.prototype.parseClipValue=function(a,b){b=a[Math.min(b,a.length-1)];a=1;\"center\"==b?a=.5:\"top\"==b||\"left\"==b?a=0:(b=parseFloat(b),isNaN(b)||(a=Math.max(0,Math.min(1,b/100))));return a};\nmxSvgCanvas2D.prototype.setClip=function(a,b){null!=this.defs?this.defs.appendChild(b):this.root.appendChild(b);if(mxClient.IS_CHROMEAPP||mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE||this.root.ownerDocument!=document)a.setAttribute(\"clip-path\",\"url(#\"+b.getAttribute(\"id\")+\")\");else{var c=this.getBaseUrl().replace(/([\\(\\)])/g,\"\\\\$1\");a.setAttribute(\"clip-path\",\"url(\"+c+\"#\"+b.getAttribute(\"id\")+\")\")}};\nmxSvgCanvas2D.prototype.plainText=function(a,b,c,d,e,f,g,k,l,m,n,p){n=null!=n?n:0;k=this.state;var q=k.fontSize,r=k.transform||\"\",t=this.addTitle(this.createElement(\"g\"));this.updateFont(t);this.pointerEvents||null!=this.originalRoot||t.setAttribute(\"pointer-events\",\"none\");0!=n&&(r+=\"rotate(\"+n+\",\"+this.format(a*k.scale)+\",\"+this.format(b*k.scale)+\")\");null!=p&&t.setAttribute(\"direction\",p);m&&0<c&&0<d&&(p=a,n=b,f==mxConstants.ALIGN_CENTER?p-=c/2:f==mxConstants.ALIGN_RIGHT&&(p-=c),\"fill\"!=l&&(g==\nmxConstants.ALIGN_MIDDLE?n-=d/2:g==mxConstants.ALIGN_BOTTOM&&(n-=d)),this.setClip(t,this.createClip(p*k.scale-2,n*k.scale-2,c*k.scale+4,d*k.scale+4)));n=f==mxConstants.ALIGN_RIGHT?\"end\":f==mxConstants.ALIGN_CENTER?\"middle\":\"start\";\"start\"!=n&&t.setAttribute(\"text-anchor\",n);this.styleEnabled&&q==mxConstants.DEFAULT_FONTSIZE||t.setAttribute(\"font-size\",q*k.scale+\"px\");0<r.length&&t.setAttribute(\"transform\",r);1>k.alpha&&t.setAttribute(\"opacity\",k.alpha);r=e.split(\"\\n\");p=Math.round(q*mxConstants.LINE_HEIGHT);\nvar u=q+(r.length-1)*p;n=b+q-1;g==mxConstants.ALIGN_MIDDLE?\"fill\"==l?n-=d/2:(m=(this.matchHtmlAlignment&&m&&0<d?Math.min(u,d):u)/2,n-=m):g==mxConstants.ALIGN_BOTTOM&&(\"fill\"==l?n-=d:(m=this.matchHtmlAlignment&&m&&0<d?Math.min(u,d):u,n-=m+1));for(m=0;m<r.length;m++)0<r[m].length&&0<mxUtils.trim(r[m]).length&&(q=this.createElement(\"text\"),q.setAttribute(\"x\",this.format(a*k.scale)+this.textOffset),q.setAttribute(\"y\",this.format(n*k.scale)+this.textOffset),mxUtils.write(q,r[m]),t.appendChild(q)),n+=p;\nthis.root.appendChild(t);this.addTextBackground(t,e,a,b,c,\"fill\"==l?d:u,f,g,l)};\nmxSvgCanvas2D.prototype.updateFont=function(a){var b=this.state;a.setAttribute(\"fill\",b.fontColor);this.styleEnabled&&b.fontFamily==mxConstants.DEFAULT_FONTFAMILY||a.setAttribute(\"font-family\",b.fontFamily);(b.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&a.setAttribute(\"font-weight\",\"bold\");(b.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&a.setAttribute(\"font-style\",\"italic\");var c=[];(b.fontStyle&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&c.push(\"underline\");\n(b.fontStyle&mxConstants.FONT_STRIKETHROUGH)==mxConstants.FONT_STRIKETHROUGH&&c.push(\"line-through\");0<c.length&&a.setAttribute(\"text-decoration\",c.join(\" \"))};\nmxSvgCanvas2D.prototype.addTextBackground=function(a,b,c,d,e,f,g,k,l){var m=this.state;if(null!=m.fontBackgroundColor||null!=m.fontBorderColor){var n=null;if(\"fill\"==l||\"width\"==l)g==mxConstants.ALIGN_CENTER?c-=e/2:g==mxConstants.ALIGN_RIGHT&&(c-=e),k==mxConstants.ALIGN_MIDDLE?d-=f/2:k==mxConstants.ALIGN_BOTTOM&&(d-=f),n=new mxRectangle((c+1)*m.scale,d*m.scale,(e-2)*m.scale,(f+2)*m.scale);else if(null!=a.getBBox&&this.root.ownerDocument==document)try{n=a.getBBox();var p=mxClient.IS_IE&&mxClient.IS_SVG;\nn=new mxRectangle(n.x,n.y+(p?0:1),n.width,n.height+(p?1:0))}catch(q){}if(null==n||0==n.width||0==n.height)n=document.createElement(\"div\"),n.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?m.fontSize*mxConstants.LINE_HEIGHT+\"px\":mxConstants.LINE_HEIGHT,n.style.fontSize=m.fontSize+\"px\",n.style.fontFamily=m.fontFamily,n.style.whiteSpace=\"nowrap\",n.style.position=\"absolute\",n.style.visibility=\"hidden\",n.style.display=\"inline-block\",n.style.zoom=\"1\",(m.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&\n(n.style.fontWeight=\"bold\"),(m.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&(n.style.fontStyle=\"italic\"),b=mxUtils.htmlEntities(b,!1),n.innerHTML=b.replace(/\\n/g,\"<br/>\"),document.body.appendChild(n),e=n.offsetWidth,f=n.offsetHeight,n.parentNode.removeChild(n),g==mxConstants.ALIGN_CENTER?c-=e/2:g==mxConstants.ALIGN_RIGHT&&(c-=e),k==mxConstants.ALIGN_MIDDLE?d-=f/2:k==mxConstants.ALIGN_BOTTOM&&(d-=f),n=new mxRectangle((c+1)*m.scale,(d+2)*m.scale,e*m.scale,(f+1)*m.scale);null!=n&&(b=\nthis.createElement(\"rect\"),b.setAttribute(\"fill\",m.fontBackgroundColor||\"none\"),b.setAttribute(\"stroke\",m.fontBorderColor||\"none\"),b.setAttribute(\"x\",Math.floor(n.x-1)),b.setAttribute(\"y\",Math.floor(n.y-1)),b.setAttribute(\"width\",Math.ceil(n.width+2)),b.setAttribute(\"height\",Math.ceil(n.height)),m=null!=m.fontBorderColor?Math.max(1,this.format(m.scale)):0,b.setAttribute(\"stroke-width\",m),this.root.ownerDocument==document&&1==mxUtils.mod(m,2)&&b.setAttribute(\"transform\",\"translate(0.5, 0.5)\"),a.insertBefore(b,\na.firstChild))}};mxSvgCanvas2D.prototype.stroke=function(){this.addNode(!1,!0)};mxSvgCanvas2D.prototype.fill=function(){this.addNode(!0,!1)};mxSvgCanvas2D.prototype.fillAndStroke=function(){this.addNode(!0,!0)};function mxGuide(a,b){this.graph=a;this.setStates(b)}mxGuide.prototype.graph=null;mxGuide.prototype.states=null;mxGuide.prototype.horizontal=!0;mxGuide.prototype.vertical=!0;mxGuide.prototype.guideX=null;mxGuide.prototype.guideY=null;mxGuide.prototype.rounded=!1;\nmxGuide.prototype.tolerance=2;mxGuide.prototype.setStates=function(a){this.states=a};mxGuide.prototype.isEnabledForEvent=function(a){return!0};mxGuide.prototype.getGuideTolerance=function(a){return a&&this.graph.gridEnabled?this.graph.gridSize/2:this.tolerance};mxGuide.prototype.createGuideShape=function(a){a=new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH);a.isDashed=!0;return a};mxGuide.prototype.isStateIgnored=function(a){return!1};\nmxGuide.prototype.move=function(a,b,c,d){if(null!=this.states&&(this.horizontal||this.vertical)&&null!=a&&null!=b){d=function(z,v,D){var F=!1;D&&Math.abs(z-C)<t?(b.y=z-a.getCenterY(),t=Math.abs(z-C),F=!0):D||(Math.abs(z-B)<t?(b.y=z-a.y,t=Math.abs(z-B),F=!0):Math.abs(z-A)<t&&(b.y=z-a.y-a.height,t=Math.abs(z-A),F=!0));F&&(p=v,q=z,null==this.guideY&&(this.guideY=this.createGuideShape(!1),this.guideY.dialect=mxConstants.DIALECT_SVG,this.guideY.pointerEvents=!1,this.guideY.init(this.graph.getView().getOverlayPane())));\nn=n||F};var e=function(z,v,D){var F=!1;D&&Math.abs(z-y)<r?(b.x=z-a.getCenterX(),r=Math.abs(z-y),F=!0):D||(Math.abs(z-u)<r?(b.x=z-a.x,r=Math.abs(z-u),F=!0):Math.abs(z-x)<r&&(b.x=z-a.x-a.width,r=Math.abs(z-x),F=!0));F&&(l=v,m=z,null==this.guideX&&(this.guideX=this.createGuideShape(!0),this.guideX.dialect=mxConstants.DIALECT_SVG,this.guideX.pointerEvents=!1,this.guideX.init(this.graph.getView().getOverlayPane())));k=k||F},f=this.graph.getView().scale;f*=this.getGuideTolerance(c);var g=a.clone();g.x+=\nb.x;g.y+=b.y;var k=!1,l=null,m=null,n=!1,p=null,q=null,r=f,t=f,u=g.x,x=g.x+g.width,y=g.getCenterX(),B=g.y,A=g.y+g.height,C=g.getCenterY();for(f=0;f<this.states.length;f++)g=this.states[f],null==g||this.isStateIgnored(g)||(this.horizontal&&(e.call(this,g.getCenterX(),g,!0),e.call(this,g.x,g,!1),e.call(this,g.x+g.width,g,!1),null==g.cell&&e.call(this,g.getCenterX(),g,!1)),this.vertical&&(d.call(this,g.getCenterY(),g,!0),d.call(this,g.y,g,!1),d.call(this,g.y+g.height,g,!1),null==g.cell&&d.call(this,\ng.getCenterY(),g,!1)));this.graph.snapDelta(b,a,!c,k,n);b=this.getDelta(a,l,b.x,p,b.y);c=this.graph.container;k||null==this.guideX?null!=this.guideX&&(e=d=null,null!=l&&null!=a&&(d=Math.min(a.y+b.y-this.graph.panDy,l.y),e=Math.max(a.y+a.height+b.y-this.graph.panDy,l.y+l.height)),this.guideX.points=null!=d&&null!=e?[new mxPoint(m,d),new mxPoint(m,e)]:[new mxPoint(m,-this.graph.panDy),new mxPoint(m,c.scrollHeight-3-this.graph.panDy)],this.guideX.stroke=this.getGuideColor(l,!0),this.guideX.node.style.visibility=\n\"visible\",this.guideX.redraw()):this.guideX.node.style.visibility=\"hidden\";n||null==this.guideY?null!=this.guideY&&(e=d=null,null!=p&&null!=a&&(d=Math.min(a.x+b.x-this.graph.panDx,p.x),e=Math.max(a.x+a.width+b.x-this.graph.panDx,p.x+p.width)),this.guideY.points=null!=d&&null!=e?[new mxPoint(d,q),new mxPoint(e,q)]:[new mxPoint(-this.graph.panDx,q),new mxPoint(c.scrollWidth-3-this.graph.panDx,q)],this.guideY.stroke=this.getGuideColor(p,!1),this.guideY.node.style.visibility=\"visible\",this.guideY.redraw()):\nthis.guideY.node.style.visibility=\"hidden\"}return b};mxGuide.prototype.getDelta=function(a,b,c,d,e){var f=this.graph.view.scale;if(this.rounded||null!=b&&null==b.cell)c=Math.round((a.x+c)/f)*f-a.x;if(this.rounded||null!=d&&null==d.cell)e=Math.round((a.y+e)/f)*f-a.y;return new mxPoint(c,e)};mxGuide.prototype.getGuideColor=function(a,b){return mxConstants.GUIDE_COLOR};mxGuide.prototype.hide=function(){this.setVisible(!1)};\nmxGuide.prototype.setVisible=function(a){null!=this.guideX&&(this.guideX.node.style.visibility=a?\"visible\":\"hidden\");null!=this.guideY&&(this.guideY.node.style.visibility=a?\"visible\":\"hidden\")};mxGuide.prototype.destroy=function(){null!=this.guideX&&(this.guideX.destroy(),this.guideX=null);null!=this.guideY&&(this.guideY.destroy(),this.guideY=null)};function mxShape(a){this.stencil=a;this.initStyles()}mxShape.prototype.dialect=null;mxShape.prototype.scale=1;mxShape.prototype.antiAlias=!0;\nmxShape.prototype.minSvgStrokeWidth=1;mxShape.prototype.bounds=null;mxShape.prototype.points=null;mxShape.prototype.node=null;mxShape.prototype.state=null;mxShape.prototype.style=null;mxShape.prototype.boundingBox=null;mxShape.prototype.stencil=null;mxShape.prototype.svgStrokeTolerance=8;mxShape.prototype.pointerEvents=!0;mxShape.prototype.svgPointerEvents=\"all\";mxShape.prototype.shapePointerEvents=!1;mxShape.prototype.stencilPointerEvents=!1;mxShape.prototype.outline=!1;\nmxShape.prototype.visible=!0;mxShape.prototype.useSvgBoundingBox=!1;mxShape.prototype.init=function(a){null==this.node&&(this.node=this.create(a),null!=a&&a.appendChild(this.node))};mxShape.prototype.initStyles=function(a){this.strokewidth=1;this.rotation=0;this.strokeOpacity=this.fillOpacity=this.opacity=100;this.flipV=this.flipH=!1};mxShape.prototype.isHtmlAllowed=function(){return!1};\nmxShape.prototype.getSvgScreenOffset=function(){return 1==mxUtils.mod(Math.max(1,Math.round((this.stencil&&\"inherit\"!=this.stencil.strokewidth?Number(this.stencil.strokewidth):this.strokewidth)*this.scale)),2)?.5:0};mxShape.prototype.create=function(a){return null!=a&&null!=a.ownerSVGElement?this.createSvg(a):this.createHtml(a)};mxShape.prototype.createSvg=function(){return document.createElementNS(mxConstants.NS_SVG,\"g\")};\nmxShape.prototype.createHtml=function(){var a=document.createElement(\"div\");a.style.position=\"absolute\";return a};mxShape.prototype.reconfigure=function(){this.redraw()};mxShape.prototype.redraw=function(){this.updateBoundsFromPoints();this.visible&&this.checkBounds()?(this.node.style.visibility=\"visible\",this.clear(),\"DIV\"==this.node.nodeName?this.redrawHtmlShape():this.redrawShape()):(this.node.style.visibility=\"hidden\",this.boundingBox=null)};\nmxShape.prototype.clear=function(){if(null!=this.node.ownerSVGElement)for(;null!=this.node.lastChild;)this.node.removeChild(this.node.lastChild);else this.node.style.cssText=\"position:absolute;\"+(null!=this.cursor?\"cursor:\"+this.cursor+\";\":\"\"),this.node.innerText=\"\"};\nmxShape.prototype.updateBoundsFromPoints=function(){var a=this.points;if(null!=a&&0<a.length&&null!=a[0]){this.bounds=new mxRectangle(Number(a[0].x),Number(a[0].y),1,1);for(var b=1;b<this.points.length;b++)null!=a[b]&&this.bounds.add(new mxRectangle(Number(a[b].x),Number(a[b].y),1,1))}};\nmxShape.prototype.getLabelBounds=function(a){var b=mxUtils.getValue(this.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST),c=a;b!=mxConstants.DIRECTION_SOUTH&&b!=mxConstants.DIRECTION_NORTH&&null!=this.state&&null!=this.state.text&&this.state.text.isPaintBoundsInverted()&&(c=c.clone(),b=c.width,c.width=c.height,c.height=b);c=this.getLabelMargins(c);if(null!=c){var d=\"1\"==mxUtils.getValue(this.style,mxConstants.STYLE_FLIPH,!1),e=\"1\"==mxUtils.getValue(this.style,mxConstants.STYLE_FLIPV,\n!1);null!=this.state&&null!=this.state.text&&this.state.text.isPaintBoundsInverted()&&(b=c.x,c.x=c.height,c.height=c.width,c.width=c.y,c.y=b,b=d,d=e,e=b);return mxUtils.getDirectedBounds(a,c,this.style,d,e)}return a};mxShape.prototype.getLabelMargins=function(a){return null};\nmxShape.prototype.checkBounds=function(){return!isNaN(this.scale)&&isFinite(this.scale)&&0<this.scale&&null!=this.bounds&&!isNaN(this.bounds.x)&&!isNaN(this.bounds.y)&&!isNaN(this.bounds.width)&&!isNaN(this.bounds.height)&&0<this.bounds.width&&0<this.bounds.height};\nmxShape.prototype.redrawShape=function(){var a=this.createCanvas();null!=a&&(a.pointerEvents=this.pointerEvents,this.beforePaint(a),this.paint(a),this.afterPaint(a),this.node!=a.root&&this.node.insertAdjacentHTML(\"beforeend\",a.root.outerHTML),\"DIV\"==this.node.nodeName&&8==document.documentMode&&(this.node.style.filter=\"\",mxUtils.addTransparentBackgroundFilter(this.node)),this.destroyCanvas(a))};\nmxShape.prototype.createCanvas=function(){var a=null;null!=this.node.ownerSVGElement&&(a=this.createSvgCanvas());null!=a&&this.outline&&(a.setStrokeWidth(this.strokewidth),a.setStrokeColor(this.stroke),null!=this.isDashed&&a.setDashed(this.isDashed),a.setStrokeWidth=function(){},a.setStrokeColor=function(){},a.setFillColor=function(){},a.setGradient=function(){},a.setDashed=function(){},a.text=function(){});return a};\nmxShape.prototype.createSvgCanvas=function(){var a=new mxSvgCanvas2D(this.node,!1);a.strokeTolerance=this.svgStrokeTolerance;a.pointerEventsValue=this.svgPointerEvents;var b=this.getSvgScreenOffset();0!=b?this.node.setAttribute(\"transform\",\"translate(\"+b+\",\"+b+\")\"):this.node.removeAttribute(\"transform\");a.minStrokeWidth=this.minSvgStrokeWidth;this.antiAlias||(a.format=function(c){return Math.round(parseFloat(c))});return a};\nmxShape.prototype.redrawHtmlShape=function(){this.updateHtmlBounds(this.node);this.updateHtmlFilters(this.node);this.updateHtmlColors(this.node)};\nmxShape.prototype.updateHtmlFilters=function(a){var b=\"\";100>this.opacity&&(b+=\"alpha(opacity=\"+this.opacity+\")\");this.isShadow&&(b+=\"progid:DXImageTransform.Microsoft.dropShadow (OffX='\"+Math.round(mxConstants.SHADOW_OFFSET_X*this.scale)+\"', OffY='\"+Math.round(mxConstants.SHADOW_OFFSET_Y*this.scale)+\"', Color='\"+mxConstants.VML_SHADOWCOLOR+\"')\");if(null!=this.fill&&this.fill!=mxConstants.NONE&&this.gradient&&this.gradient!=mxConstants.NONE){var c=this.fill,d=this.gradient,e=\"0\",f={east:0,south:1,\nwest:2,north:3},g=null!=this.direction?f[this.direction]:0;null!=this.gradientDirection&&(g=mxUtils.mod(g+f[this.gradientDirection]-1,4));1==g?(e=\"1\",f=c,c=d,d=f):2==g?(f=c,c=d,d=f):3==g&&(e=\"1\");b+=\"progid:DXImageTransform.Microsoft.gradient(startColorStr='\"+c+\"', endColorStr='\"+d+\"', gradientType='\"+e+\"')\"}a.style.filter=b};\nmxShape.prototype.updateHtmlColors=function(a){var b=this.stroke;null!=b&&b!=mxConstants.NONE?(a.style.borderColor=b,this.isDashed?a.style.borderStyle=\"dashed\":0<this.strokewidth&&(a.style.borderStyle=\"solid\"),a.style.borderWidth=Math.max(1,Math.ceil(this.strokewidth*this.scale))+\"px\"):a.style.borderWidth=\"0px\";b=this.outline?null:this.fill;null!=b&&b!=mxConstants.NONE?(a.style.backgroundColor=b,a.style.backgroundImage=\"none\"):this.pointerEvents?a.style.backgroundColor=\"transparent\":8==document.documentMode?\nmxUtils.addTransparentBackgroundFilter(a):this.setTransparentBackgroundImage(a)};\nmxShape.prototype.updateHtmlBounds=function(a){var b=9<=document.documentMode?0:Math.ceil(this.strokewidth*this.scale);a.style.borderWidth=Math.max(1,b)+\"px\";a.style.overflow=\"hidden\";a.style.left=Math.round(this.bounds.x-b/2)+\"px\";a.style.top=Math.round(this.bounds.y-b/2)+\"px\";\"CSS1Compat\"==document.compatMode&&(b=-b);a.style.width=Math.round(Math.max(0,this.bounds.width+b))+\"px\";a.style.height=Math.round(Math.max(0,this.bounds.height+b))+\"px\"};\nmxShape.prototype.destroyCanvas=function(a){if(a instanceof mxSvgCanvas2D){for(var b in a.gradients){var c=a.gradients[b];null!=c&&(c.mxRefCount=(c.mxRefCount||0)+1)}for(b in a.fillPatterns)c=a.fillPatterns[b],null!=c&&(c.mxRefCount=(c.mxRefCount||0)+1);this.releaseSvgGradients(this.oldGradients);this.releaseSvgFillPatterns(this.oldFillPatterns);this.oldGradients=a.gradients;this.oldFillPatterns=a.fillPatterns}};mxShape.prototype.beforePaint=function(a){};mxShape.prototype.afterPaint=function(a){};\nmxShape.prototype.paint=function(a){var b=!1;if(null!=a&&this.outline){var c=a.stroke;a.stroke=function(){b=!0;c.apply(this,arguments)};var d=a.fillAndStroke;a.fillAndStroke=function(){b=!0;d.apply(this,arguments)}}var e=this.scale,f=this.bounds.x/e,g=this.bounds.y/e,k=this.bounds.width/e,l=this.bounds.height/e;if(this.isPaintBoundsInverted()){var m=(k-l)/2;f+=m;g-=m;m=k;k=l;l=m}this.updateTransform(a,f,g,k,l);this.configureCanvas(a,f,g,k,l);m=null;if(null==this.stencil&&null==this.points&&this.shapePointerEvents||\nnull!=this.stencil&&this.stencilPointerEvents){var n=this.createBoundingBox();this.dialect==mxConstants.DIALECT_SVG?(m=this.createTransparentSvgRectangle(n.x,n.y,n.width,n.height),this.node.appendChild(m)):(e=a.createRect(\"rect\",n.x/e,n.y/e,n.width/e,n.height/e),e.appendChild(a.createTransparentFill()),e.stroked=\"false\",a.root.appendChild(e))}null!=this.stencil?this.stencil.drawShape(a,this,f,g,k,l):(a.setStrokeWidth(this.strokewidth),e=this.getWaypoints(),null!=e?1<e.length&&this.paintEdgeShape(a,\ne):this.paintVertexShape(a,f,g,k,l));null!=m&&null!=a.state&&null!=a.state.transform&&m.setAttribute(\"transform\",a.state.transform);null!=a&&this.outline&&!b&&(a.rect(f,g,k,l),a.stroke())};mxShape.prototype.getWaypoints=function(){var a=this.points,b=null;if(null!=a&&(b=[],0<a.length)){var c=this.scale,d=Math.max(c,1),e=a[0];b.push(new mxPoint(e.x/c,e.y/c));for(var f=1;f<a.length;f++){var g=a[f];(Math.abs(e.x-g.x)>=d||Math.abs(e.y-g.y)>=d)&&b.push(new mxPoint(g.x/c,g.y/c));e=g}}return b};\nmxShape.prototype.configureCanvas=function(a,b,c,d,e){var f=null;null!=this.style&&(f=this.style.dashPattern);a.setAlpha(this.opacity/100);a.setFillAlpha(this.fillOpacity/100);a.setStrokeAlpha(this.strokeOpacity/100);null!=this.isShadow&&a.setShadow(this.isShadow);null!=this.isDashed&&a.setDashed(this.isDashed,null!=this.style?1==mxUtils.getValue(this.style,mxConstants.STYLE_FIX_DASH,!1):!1);null!=f&&a.setDashPattern(f);null!=this.fill&&this.fill!=mxConstants.NONE&&this.gradient&&this.gradient!=mxConstants.NONE?\n(b=this.getGradientBounds(a,b,c,d,e),a.setGradient(this.fill,this.gradient,b.x,b.y,b.width,b.height,this.gradientDirection)):(a.setFillColor(this.fill),a.setFillStyle(this.fillStyle));a.setStrokeColor(this.stroke);this.configurePointerEvents(a)};mxShape.prototype.configurePointerEvents=function(a){null==this.style||null!=this.fill&&this.fill!=mxConstants.NONE&&0!=this.opacity&&0!=this.fillOpacity||\"0\"!=mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,\"1\")||(a.pointerEvents=!1)};\nmxShape.prototype.getGradientBounds=function(a,b,c,d,e){return new mxRectangle(b,c,d,e)};mxShape.prototype.updateTransform=function(a,b,c,d,e){a.scale(this.scale);a.rotate(this.getShapeRotation(),this.flipH,this.flipV,b+d/2,c+e/2)};mxShape.prototype.paintVertexShape=function(a,b,c,d,e){this.paintBackground(a,b,c,d,e);this.outline&&null!=this.style&&0!=mxUtils.getValue(this.style,mxConstants.STYLE_BACKGROUND_OUTLINE,0)||(a.setShadow(!1),this.paintForeground(a,b,c,d,e))};\nmxShape.prototype.paintBackground=function(a,b,c,d,e){};mxShape.prototype.paintForeground=function(a,b,c,d,e){};mxShape.prototype.paintEdgeShape=function(a,b){};\nmxShape.prototype.getArcSize=function(a,b){if(\"1\"==mxUtils.getValue(this.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0))a=Math.min(a/2,Math.min(b/2,mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2));else{var c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100;a=Math.min(a*c,b*c)}return a};\nmxShape.prototype.paintGlassEffect=function(a,b,c,d,e,f){var g=Math.ceil(this.strokewidth/2);a.setGradient(\"#ffffff\",\"#ffffff\",b,c,d,.6*e,\"south\",.9,.1);a.begin();f+=2*g;this.isRounded?(a.moveTo(b-g+f,c-g),a.quadTo(b-g,c-g,b-g,c-g+f),a.lineTo(b-g,c+.4*e),a.quadTo(b+.5*d,c+.7*e,b+d+g,c+.4*e),a.lineTo(b+d+g,c-g+f),a.quadTo(b+d+g,c-g,b+d+g-f,c-g)):(a.moveTo(b-g,c-g),a.lineTo(b-g,c+.4*e),a.quadTo(b+.5*d,c+.7*e,b+d+g,c+.4*e),a.lineTo(b+d+g,c-g));a.close();a.fill()};\nmxShape.prototype.addPoints=function(a,b,c,d,e,f,g){if(null!=b&&0<b.length){g=null!=g?g:!0;var k=b[b.length-1];if(e&&c){b=b.slice();var l=b[0];l=new mxPoint(k.x+(l.x-k.x)/2,k.y+(l.y-k.y)/2);b.splice(0,0,l)}var m=b[0];l=1;for(g?a.moveTo(m.x,m.y):a.lineTo(m.x,m.y);l<(e?b.length:b.length-1);){g=b[mxUtils.mod(l,b.length)];var n=m.x-g.x;m=m.y-g.y;if(c&&(0!=n||0!=m)&&(null==f||0>mxUtils.indexOf(f,l-1))){var p=Math.sqrt(n*n+m*m);a.lineTo(g.x+n*Math.min(d,p/2)/p,g.y+m*Math.min(d,p/2)/p);for(m=b[mxUtils.mod(l+\n1,b.length)];l<b.length-2&&0==Math.round(m.x-g.x)&&0==Math.round(m.y-g.y);)m=b[mxUtils.mod(l+2,b.length)],l++;n=m.x-g.x;m=m.y-g.y;p=Math.max(1,Math.sqrt(n*n+m*m));n=g.x+n*Math.min(d,p/2)/p;m=g.y+m*Math.min(d,p/2)/p;a.quadTo(g.x,g.y,n,m);g=new mxPoint(n,m)}else a.lineTo(g.x,g.y);m=g;l++}e?a.close():a.lineTo(k.x,k.y)}};\nmxShape.prototype.resetStyles=function(){this.initStyles();this.spacing=0;delete this.fill;delete this.gradient;delete this.gradientDirection;delete this.stroke;delete this.startSize;delete this.endSize;delete this.startArrow;delete this.endArrow;delete this.direction;delete this.isShadow;delete this.isDashed;delete this.isRounded;delete this.glass};\nmxShape.prototype.apply=function(a){this.state=a;this.style=a.style;if(null!=this.style){this.fill=mxUtils.getValue(this.style,mxConstants.STYLE_FILLCOLOR,this.fill);this.gradient=mxUtils.getValue(this.style,mxConstants.STYLE_GRADIENTCOLOR,this.gradient);this.gradientDirection=mxUtils.getValue(this.style,mxConstants.STYLE_GRADIENT_DIRECTION,this.gradientDirection);this.opacity=mxUtils.getValue(this.style,mxConstants.STYLE_OPACITY,this.opacity);this.fillOpacity=mxUtils.getValue(this.style,mxConstants.STYLE_FILL_OPACITY,\nthis.fillOpacity);this.fillStyle=mxUtils.getValue(this.style,mxConstants.STYLE_FILL_STYLE,this.fillStyle);this.strokeOpacity=mxUtils.getValue(this.style,mxConstants.STYLE_STROKE_OPACITY,this.strokeOpacity);this.stroke=mxUtils.getValue(this.style,mxConstants.STYLE_STROKECOLOR,this.stroke);this.strokewidth=mxUtils.getNumber(this.style,mxConstants.STYLE_STROKEWIDTH,this.strokewidth);this.spacing=mxUtils.getValue(this.style,mxConstants.STYLE_SPACING,this.spacing);this.startSize=mxUtils.getNumber(this.style,\nmxConstants.STYLE_STARTSIZE,this.startSize);this.endSize=mxUtils.getNumber(this.style,mxConstants.STYLE_ENDSIZE,this.endSize);this.startArrow=mxUtils.getValue(this.style,mxConstants.STYLE_STARTARROW,this.startArrow);this.endArrow=mxUtils.getValue(this.style,mxConstants.STYLE_ENDARROW,this.endArrow);this.rotation=mxUtils.getValue(this.style,mxConstants.STYLE_ROTATION,this.rotation);this.direction=mxUtils.getValue(this.style,mxConstants.STYLE_DIRECTION,this.direction);this.flipH=1==mxUtils.getValue(this.style,\nmxConstants.STYLE_FLIPH,0);this.flipV=1==mxUtils.getValue(this.style,mxConstants.STYLE_FLIPV,0);null!=this.stencil&&(this.flipH=1==mxUtils.getValue(this.style,\"stencilFlipH\",0)||this.flipH,this.flipV=1==mxUtils.getValue(this.style,\"stencilFlipV\",0)||this.flipV);if(this.direction==mxConstants.DIRECTION_NORTH||this.direction==mxConstants.DIRECTION_SOUTH)a=this.flipH,this.flipH=this.flipV,this.flipV=a;this.isShadow=1==mxUtils.getValue(this.style,mxConstants.STYLE_SHADOW,this.isShadow);this.isDashed=\n1==mxUtils.getValue(this.style,mxConstants.STYLE_DASHED,this.isDashed);this.isRounded=1==mxUtils.getValue(this.style,mxConstants.STYLE_ROUNDED,this.isRounded);this.glass=1==mxUtils.getValue(this.style,mxConstants.STYLE_GLASS,this.glass);this.fill==mxConstants.NONE&&(this.fill=null);this.gradient==mxConstants.NONE&&(this.gradient=null);this.stroke==mxConstants.NONE&&(this.stroke=null)}};mxShape.prototype.setCursor=function(a){null==a&&(a=\"\");this.cursor=a;null!=this.node&&(this.node.style.cursor=a)};\nmxShape.prototype.getCursor=function(){return this.cursor};mxShape.prototype.isRoundable=function(){return!1};\nmxShape.prototype.updateBoundingBox=function(){if(this.useSvgBoundingBox&&null!=this.node&&null!=this.node.ownerSVGElement)try{var a=this.node.getBBox();if(0<a.width&&0<a.height){this.boundingBox=new mxRectangle(a.x,a.y,a.width,a.height);this.boundingBox.grow(this.strokewidth*this.scale/2);return}}catch(c){}if(null!=this.bounds){a=this.createBoundingBox();if(null!=a){this.augmentBoundingBox(a);var b=this.getShapeRotation();0!=b&&(a=mxUtils.getBoundingBox(a,b))}this.boundingBox=a}};\nmxShape.prototype.createBoundingBox=function(){var a=this.bounds.clone();(null!=this.stencil&&(this.direction==mxConstants.DIRECTION_NORTH||this.direction==mxConstants.DIRECTION_SOUTH)||this.isPaintBoundsInverted())&&a.rotate90();return a};mxShape.prototype.augmentBoundingBox=function(a){this.isShadow&&(a.width+=Math.ceil(mxConstants.SHADOW_OFFSET_X*this.scale),a.height+=Math.ceil(mxConstants.SHADOW_OFFSET_Y*this.scale));a.grow(this.strokewidth*this.scale/2)};\nmxShape.prototype.isPaintBoundsInverted=function(){return null==this.stencil&&(this.direction==mxConstants.DIRECTION_NORTH||this.direction==mxConstants.DIRECTION_SOUTH)};mxShape.prototype.getRotation=function(){return null!=this.rotation?this.rotation:0};mxShape.prototype.getTextRotation=function(){var a=this.getRotation();1!=mxUtils.getValue(this.style,mxConstants.STYLE_HORIZONTAL,1)&&(a+=mxText.prototype.verticalTextRotation);return a};\nmxShape.prototype.getShapeRotation=function(){var a=this.getRotation();null!=this.direction&&(this.direction==mxConstants.DIRECTION_NORTH?a+=270:this.direction==mxConstants.DIRECTION_WEST?a+=180:this.direction==mxConstants.DIRECTION_SOUTH&&(a+=90));return a};\nmxShape.prototype.createTransparentSvgRectangle=function(a,b,c,d){var e=document.createElementNS(mxConstants.NS_SVG,\"rect\");e.setAttribute(\"x\",a);e.setAttribute(\"y\",b);e.setAttribute(\"width\",c);e.setAttribute(\"height\",d);e.setAttribute(\"fill\",\"none\");e.setAttribute(\"stroke\",\"none\");e.setAttribute(\"pointer-events\",\"all\");return e};mxShape.prototype.setTransparentBackgroundImage=function(a){a.style.backgroundImage=\"url('\"+mxClient.imageBasePath+\"/transparent.gif')\"};\nmxShape.prototype.intersectsRectangle=function(a,b){return null!=a&&(b||null!=this.node&&\"none\"!=this.node.style.display&&\"hidden\"!=this.node.style.visibility)&&mxUtils.intersects(this.bounds,a)};mxShape.prototype.releaseSvgGradients=function(a){if(null!=a)for(var b in a){var c=a[b];null!=c&&(c.mxRefCount=(c.mxRefCount||0)-1,0==c.mxRefCount&&null!=c.parentNode&&c.parentNode.removeChild(c))}};\nmxShape.prototype.releaseSvgFillPatterns=function(a){if(null!=a)for(var b in a){var c=a[b];null!=c&&(c.mxRefCount=(c.mxRefCount||0)-1,0==c.mxRefCount&&null!=c.parentNode&&c.parentNode.removeChild(c))}};\nmxShape.prototype.destroy=function(){null!=this.node&&(mxEvent.release(this.node),null!=this.node.parentNode&&this.node.parentNode.removeChild(this.node),this.node=null);this.releaseSvgGradients(this.oldGradients);this.releaseSvgFillPatterns(this.oldFillPatterns);this.oldFillPatterns=this.oldGradients=null};function mxStencil(a){this.desc=a;this.parseDescription();this.parseConstraints()}mxUtils.extend(mxStencil,mxShape);mxStencil.defaultLocalized=!1;mxStencil.allowEval=!1;\nmxStencil.prototype.desc=null;mxStencil.prototype.constraints=null;mxStencil.prototype.aspect=null;mxStencil.prototype.w0=null;mxStencil.prototype.h0=null;mxStencil.prototype.bgNode=null;mxStencil.prototype.fgNode=null;mxStencil.prototype.strokewidth=null;\nmxStencil.prototype.parseDescription=function(){this.fgNode=this.desc.getElementsByTagName(\"foreground\")[0];this.bgNode=this.desc.getElementsByTagName(\"background\")[0];this.w0=Number(this.desc.getAttribute(\"w\")||100);this.h0=Number(this.desc.getAttribute(\"h\")||100);var a=this.desc.getAttribute(\"aspect\");this.aspect=null!=a?a:\"variable\";a=this.desc.getAttribute(\"strokewidth\");this.strokewidth=null!=a?a:\"1\"};\nmxStencil.prototype.parseConstraints=function(){var a=this.desc.getElementsByTagName(\"connections\")[0];if(null!=a&&(a=mxUtils.getChildNodes(a),null!=a&&0<a.length)){this.constraints=[];for(var b=0;b<a.length;b++)this.constraints.push(this.parseConstraint(a[b]))}};mxStencil.prototype.parseConstraint=function(a){var b=Number(a.getAttribute(\"x\")),c=Number(a.getAttribute(\"y\")),d=\"1\"==a.getAttribute(\"perimeter\");a=a.getAttribute(\"name\");return new mxConnectionConstraint(new mxPoint(b,c),d,a)};\nmxStencil.prototype.evaluateTextAttribute=function(a,b,c){b=this.evaluateAttribute(a,b,c);a=a.getAttribute(\"localized\");if(mxStencil.defaultLocalized&&null==a||\"1\"==a)b=mxResources.get(b);return b};mxStencil.prototype.evaluateAttribute=function(a,b,c){b=a.getAttribute(b);null==b&&(a=mxUtils.getTextContent(a),null!=a&&mxStencil.allowEval&&(a=mxUtils.eval(a),\"function\"==typeof a&&(b=a(c))));return b};\nmxStencil.prototype.drawShape=function(a,b,c,d,e,f){var g=a.states.slice(),k=mxUtils.getValue(b.style,mxConstants.STYLE_DIRECTION,null);k=this.computeAspect(b.style,c,d,e,f,k);var l=Math.min(k.width,k.height);l=\"inherit\"==this.strokewidth?Number(mxUtils.getNumber(b.style,mxConstants.STYLE_STROKEWIDTH,1)):Number(this.strokewidth)*l;a.setStrokeWidth(l);null!=b.style&&\"1\"==mxUtils.getValue(b.style,mxConstants.STYLE_POINTER_EVENTS,\"0\")&&(a.setStrokeColor(mxConstants.NONE),a.rect(c,d,e,f),a.stroke(),a.setStrokeColor(b.stroke));\nthis.drawChildren(a,b,c,d,e,f,this.bgNode,k,!1,!0);this.drawChildren(a,b,c,d,e,f,this.fgNode,k,!0,!b.outline||null==b.style||0==mxUtils.getValue(b.style,mxConstants.STYLE_BACKGROUND_OUTLINE,0));a.states.length!=g.length&&(a.states=g)};mxStencil.prototype.drawChildren=function(a,b,c,d,e,f,g,k,l,m){if(null!=g&&0<e&&0<f)for(c=g.firstChild;null!=c;)c.nodeType==mxConstants.NODETYPE_ELEMENT&&this.drawNode(a,b,c,k,l,m),c=c.nextSibling};\nmxStencil.prototype.computeAspect=function(a,b,c,d,e,f){a=b;b=d/this.w0;var g=e/this.h0;if(f=f==mxConstants.DIRECTION_NORTH||f==mxConstants.DIRECTION_SOUTH){g=d/this.h0;b=e/this.w0;var k=(d-e)/2;a+=k;c-=k}\"fixed\"==this.aspect&&(b=g=Math.min(b,g),f?(a+=(e-this.w0*b)/2,c+=(d-this.h0*g)/2):(a+=(d-this.w0*b)/2,c+=(e-this.h0*g)/2));return new mxRectangle(a,c,b,g)};mxStencil.prototype.parseColor=function(a,b,c,d){\"stroke\"==d?d=b.stroke:\"fill\"==d&&(d=b.fill);return d};\nmxStencil.prototype.drawNode=function(a,b,c,d,e,f){var g=c.nodeName,k=d.x,l=d.y,m=d.width,n=d.height,p=Math.min(m,n);if(\"save\"==g)a.save();else if(\"restore\"==g)a.restore();else if(f){if(\"path\"==g){a.begin();p=!0;if(\"1\"==c.getAttribute(\"rounded\")){p=!1;for(var q=Number(c.getAttribute(\"arcSize\")),r=0,t=[],u=c.firstChild;null!=u;){if(u.nodeType==mxConstants.NODETYPE_ELEMENT){var x=u.nodeName;if(\"move\"==x||\"line\"==x)\"move\"!=x&&0!=t.length||t.push([]),t[t.length-1].push(new mxPoint(k+Number(u.getAttribute(\"x\"))*\nm,l+Number(u.getAttribute(\"y\"))*n)),r++;else{p=!0;break}}u=u.nextSibling}if(!p&&0<r)for(m=0;m<t.length;m++)n=!1,l=t[m][0],k=t[m][t[m].length-1],l.x==k.x&&l.y==k.y&&(t[m].pop(),n=!0),this.addPoints(a,t[m],!0,q,n);else p=!0}if(p)for(u=c.firstChild;null!=u;)u.nodeType==mxConstants.NODETYPE_ELEMENT&&this.drawNode(a,b,u,d,e,f),u=u.nextSibling}else if(\"close\"==g)a.close();else if(\"move\"==g)a.moveTo(k+Number(c.getAttribute(\"x\"))*m,l+Number(c.getAttribute(\"y\"))*n);else if(\"line\"==g)a.lineTo(k+Number(c.getAttribute(\"x\"))*\nm,l+Number(c.getAttribute(\"y\"))*n);else if(\"quad\"==g)a.quadTo(k+Number(c.getAttribute(\"x1\"))*m,l+Number(c.getAttribute(\"y1\"))*n,k+Number(c.getAttribute(\"x2\"))*m,l+Number(c.getAttribute(\"y2\"))*n);else if(\"curve\"==g)a.curveTo(k+Number(c.getAttribute(\"x1\"))*m,l+Number(c.getAttribute(\"y1\"))*n,k+Number(c.getAttribute(\"x2\"))*m,l+Number(c.getAttribute(\"y2\"))*n,k+Number(c.getAttribute(\"x3\"))*m,l+Number(c.getAttribute(\"y3\"))*n);else if(\"arc\"==g)a.arcTo(Number(c.getAttribute(\"rx\"))*m,Number(c.getAttribute(\"ry\"))*\nn,Number(c.getAttribute(\"x-axis-rotation\")),Number(c.getAttribute(\"large-arc-flag\")),Number(c.getAttribute(\"sweep-flag\")),k+Number(c.getAttribute(\"x\"))*m,l+Number(c.getAttribute(\"y\"))*n);else if(\"rect\"==g)a.rect(k+Number(c.getAttribute(\"x\"))*m,l+Number(c.getAttribute(\"y\"))*n,Number(c.getAttribute(\"w\"))*m,Number(c.getAttribute(\"h\"))*n);else if(\"roundrect\"==g)b=Number(c.getAttribute(\"arcsize\")),0==b&&(b=100*mxConstants.RECTANGLE_ROUNDING_FACTOR),d=Number(c.getAttribute(\"w\"))*m,f=Number(c.getAttribute(\"h\"))*\nn,b=Number(b)/100,b=Math.min(d*b,f*b),a.roundrect(k+Number(c.getAttribute(\"x\"))*m,l+Number(c.getAttribute(\"y\"))*n,d,f,b,b);else if(\"ellipse\"==g)a.ellipse(k+Number(c.getAttribute(\"x\"))*m,l+Number(c.getAttribute(\"y\"))*n,Number(c.getAttribute(\"w\"))*m,Number(c.getAttribute(\"h\"))*n);else if(\"image\"==g)b.outline||(b=this.evaluateAttribute(c,\"src\",b),a.image(k+Number(c.getAttribute(\"x\"))*m,l+Number(c.getAttribute(\"y\"))*n,Number(c.getAttribute(\"w\"))*m,Number(c.getAttribute(\"h\"))*n,b,!1,\"1\"==c.getAttribute(\"flipH\"),\n\"1\"==c.getAttribute(\"flipV\")));else if(\"text\"==g)b.outline||(d=this.evaluateTextAttribute(c,\"str\",b),f=\"1\"==c.getAttribute(\"vertical\")?-90:0,\"0\"==c.getAttribute(\"align-shape\")&&(p=b.rotation,q=1==mxUtils.getValue(b.style,mxConstants.STYLE_FLIPH,0),b=1==mxUtils.getValue(b.style,mxConstants.STYLE_FLIPV,0),f=q&&b?f-p:q||b?f+p:f-p),f-=c.getAttribute(\"rotation\"),a.text(k+Number(c.getAttribute(\"x\"))*m,l+Number(c.getAttribute(\"y\"))*n,0,0,d,c.getAttribute(\"align\")||\"left\",c.getAttribute(\"valign\")||\"top\",\n!1,\"\",null,!1,f));else if(\"include-shape\"==g)p=mxStencilRegistry.getStencil(c.getAttribute(\"name\")),null!=p&&(k+=Number(c.getAttribute(\"x\"))*m,l+=Number(c.getAttribute(\"y\"))*n,d=Number(c.getAttribute(\"w\"))*m,f=Number(c.getAttribute(\"h\"))*n,p.drawShape(a,b,k,l,d,f));else if(\"fillstroke\"==g)a.fillAndStroke();else if(\"fill\"==g)a.fill();else if(\"stroke\"==g)a.stroke();else if(\"strokewidth\"==g)m=\"1\"==c.getAttribute(\"fixed\")?1:p,a.setStrokeWidth(Number(c.getAttribute(\"width\"))*m);else if(\"dashed\"==g)a.setDashed(\"1\"==\nc.getAttribute(\"dashed\"));else if(\"dashpattern\"==g){if(c=c.getAttribute(\"pattern\"),null!=c){c=c.split(\" \");n=[];for(m=0;m<c.length;m++)0<c[m].length&&n.push(Number(c[m])*p);c=n.join(\" \");a.setDashPattern(c)}}else\"strokecolor\"==g?a.setStrokeColor(this.parseColor(a,b,c,c.getAttribute(\"color\"))):\"linecap\"==g?a.setLineCap(c.getAttribute(\"cap\")):\"linejoin\"==g?a.setLineJoin(c.getAttribute(\"join\")):\"miterlimit\"==g?a.setMiterLimit(Number(c.getAttribute(\"limit\"))):\"fillcolor\"==g?a.setFillColor(this.parseColor(a,\nb,c,c.getAttribute(\"color\"))):\"alpha\"==g?a.setAlpha(c.getAttribute(\"alpha\")):\"fillalpha\"==g?a.setAlpha(c.getAttribute(\"alpha\")):\"strokealpha\"==g?a.setAlpha(c.getAttribute(\"alpha\")):\"fontcolor\"==g?a.setFontColor(this.parseColor(a,b,c,c.getAttribute(\"color\"))):\"fontstyle\"==g?a.setFontStyle(c.getAttribute(\"style\")):\"fontfamily\"==g?a.setFontFamily(c.getAttribute(\"family\")):\"fontsize\"==g&&a.setFontSize(Number(c.getAttribute(\"size\"))*p);!e||\"fillstroke\"!=g&&\"fill\"!=g&&\"stroke\"!=g||a.setShadow(!1)}};\nvar mxStencilRegistry={stencils:{},addStencil:function(a,b){mxStencilRegistry.stencils[a]=b},getStencil:function(a){return mxStencilRegistry.stencils[a]}},mxMarker={markers:[],addMarker:function(a,b){mxMarker.markers[a]=b},createMarker:function(a,b,c,d,e,f,g,k,l,m){var n=mxMarker.markers[c];return null!=n?n(a,b,c,d,e,f,g,k,l,m):null}};\n(function(){function a(d){d=null!=d?d:2;return function(e,f,g,k,l,m,n,p,q,r){f=l*q*1.118;p=m*q*1.118;l*=n+q;m*=n+q;var t=k.clone();t.x-=f;t.y-=p;n=g!=mxConstants.ARROW_CLASSIC&&g!=mxConstants.ARROW_CLASSIC_THIN?1:.75;k.x+=-l*n-f;k.y+=-m*n-p;return function(){e.begin();e.moveTo(t.x,t.y);e.lineTo(t.x-l-m/d,t.y-m+l/d);g!=mxConstants.ARROW_CLASSIC&&g!=mxConstants.ARROW_CLASSIC_THIN||e.lineTo(t.x-3*l/4,t.y-3*m/4);e.lineTo(t.x+m/d-l,t.y-m-l/d);e.close();r?e.fillAndStroke():e.stroke()}}}function b(d){d=\nnull!=d?d:2;return function(e,f,g,k,l,m,n,p,q,r){f=l*q*1.118;g=m*q*1.118;l*=n+q;m*=n+q;var t=k.clone();t.x-=f;t.y-=g;k.x+=2*-f;k.y+=2*-g;return function(){e.begin();e.moveTo(t.x-l-m/d,t.y-m+l/d);e.lineTo(t.x,t.y);e.lineTo(t.x+m/d-l,t.y-m-l/d);e.stroke()}}}function c(d,e,f,g,k,l,m,n,p,q){n=f==mxConstants.ARROW_DIAMOND?.7071:.9862;e=k*p*n;n*=l*p;k*=m+p;l*=m+p;var r=g.clone();r.x-=e;r.y-=n;g.x+=-k-e;g.y+=-l-n;var t=f==mxConstants.ARROW_DIAMOND?2:3.4;return function(){d.begin();d.moveTo(r.x,r.y);d.lineTo(r.x-\nk/2-l/t,r.y+k/t-l/2);d.lineTo(r.x-k,r.y-l);d.lineTo(r.x-k/2+l/t,r.y-l/2-k/t);d.close();q?d.fillAndStroke():d.stroke()}}mxMarker.addMarker(\"classic\",a(2));mxMarker.addMarker(\"classicThin\",a(3));mxMarker.addMarker(\"block\",a(2));mxMarker.addMarker(\"blockThin\",a(3));mxMarker.addMarker(\"open\",b(2));mxMarker.addMarker(\"openThin\",b(3));mxMarker.addMarker(\"oval\",function(d,e,f,g,k,l,m,n,p,q){var r=m/2,t=g.clone();g.x-=k*r;g.y-=l*r;return function(){d.ellipse(t.x-r,t.y-r,m,m);q?d.fillAndStroke():d.stroke()}});\nmxMarker.addMarker(\"baseDash\",function(d,e,f,g,k,l,m,n,p,q){var r=k*(m+p+1),t=l*(m+p+1);return function(){d.begin();d.moveTo(g.x-t/2,g.y+r/2);d.lineTo(g.x+t/2,g.y-r/2);d.stroke()}});mxMarker.addMarker(\"doubleBlock\",function(d,e,f,g,k,l,m,n,p,q){e=k*p*1.118;n=l*p*1.118;k*=m+p;l*=m+p;var r=g.clone();r.x-=e;r.y-=n;f=f!=mxConstants.ARROW_CLASSIC&&f!=mxConstants.ARROW_CLASSIC_THIN?1:.75;g.x+=-k*f*2-e;g.y+=-l*f*2-n;return function(){d.begin();d.moveTo(r.x,r.y);d.lineTo(r.x-k-l/2,r.y-l+k/2);d.lineTo(r.x+\nl/2-k,r.y-l-k/2);d.close();d.moveTo(r.x-k,r.y-l);d.lineTo(r.x-2*k-.5*l,r.y+.5*k-2*l);d.lineTo(r.x-2*k+.5*l,r.y-.5*k-2*l);d.close();q?d.fillAndStroke():d.stroke()}});mxMarker.addMarker(\"diamond\",c);mxMarker.addMarker(\"diamondThin\",c)})();function mxActor(a,b,c,d){mxShape.call(this);this.bounds=a;this.fill=b;this.stroke=c;this.strokewidth=null!=d?d:1}mxUtils.extend(mxActor,mxShape);mxActor.prototype.paintVertexShape=function(a,b,c,d,e){a.translate(b,c);a.begin();this.redrawPath(a,b,c,d,e);a.fillAndStroke()};\nmxActor.prototype.redrawPath=function(a,b,c,d,e){b=d/3;a.moveTo(0,e);a.curveTo(0,3*e/5,0,2*e/5,d/2,2*e/5);a.curveTo(d/2-b,2*e/5,d/2-b,0,d/2,0);a.curveTo(d/2+b,0,d/2+b,2*e/5,d/2,2*e/5);a.curveTo(d,2*e/5,d,3*e/5,d,e);a.close()};function mxCloud(a,b,c,d){mxActor.call(this);this.bounds=a;this.fill=b;this.stroke=c;this.strokewidth=null!=d?d:1}mxUtils.extend(mxCloud,mxActor);\nmxCloud.prototype.redrawPath=function(a,b,c,d,e){a.moveTo(.25*d,.25*e);a.curveTo(.05*d,.25*e,0,.5*e,.16*d,.55*e);a.curveTo(0,.66*e,.18*d,.9*e,.31*d,.8*e);a.curveTo(.4*d,e,.7*d,e,.8*d,.8*e);a.curveTo(d,.8*e,d,.6*e,.875*d,.5*e);a.curveTo(d,.3*e,.8*d,.1*e,.625*d,.2*e);a.curveTo(.5*d,.05*e,.3*d,.05*e,.25*d,.25*e);a.close()};function mxRectangleShape(a,b,c,d){mxShape.call(this);this.bounds=a;this.fill=b;this.stroke=c;this.strokewidth=null!=d?d:1}mxUtils.extend(mxRectangleShape,mxShape);\nmxRectangleShape.prototype.isHtmlAllowed=function(){var a=!0;null!=this.style&&(a=\"1\"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,\"1\"));return!this.isRounded&&!this.glass&&0==this.rotation&&(a||null!=this.fill&&this.fill!=mxConstants.NONE)};\nmxRectangleShape.prototype.paintBackground=function(a,b,c,d,e){if(this.isRounded){if(\"1\"==mxUtils.getValue(this.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0))var f=Math.min(d/2,Math.min(e/2,mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2));else f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,f=Math.min(d*f,e*f);a.roundrect(b,c,d,e,f,f)}else a.rect(b,c,d,e);a.fillAndStroke()};\nmxRectangleShape.prototype.isRoundable=function(){return!0};mxRectangleShape.prototype.paintForeground=function(a,b,c,d,e){this.glass&&!this.outline&&null!=this.fill&&this.fill!=mxConstants.NONE&&this.paintGlassEffect(a,b,c,d,e,this.getArcSize(d+this.strokewidth,e+this.strokewidth))};function mxEllipse(a,b,c,d){mxShape.call(this);this.bounds=a;this.fill=b;this.stroke=c;this.strokewidth=null!=d?d:1}mxUtils.extend(mxEllipse,mxShape);\nmxEllipse.prototype.paintVertexShape=function(a,b,c,d,e){a.ellipse(b,c,d,e);a.fillAndStroke()};function mxDoubleEllipse(a,b,c,d){mxShape.call(this);this.bounds=a;this.fill=b;this.stroke=c;this.strokewidth=null!=d?d:1}mxUtils.extend(mxDoubleEllipse,mxShape);mxDoubleEllipse.prototype.paintBackground=function(a,b,c,d,e){a.ellipse(b,c,d,e);a.fillAndStroke()};\nmxDoubleEllipse.prototype.paintForeground=function(a,b,c,d,e){if(!this.outline){var f=mxUtils.getValue(this.style,mxConstants.STYLE_MARGIN,Math.min(3+this.strokewidth,Math.min(d/5,e/5)));b+=f;c+=f;d-=2*f;e-=2*f;0<d&&0<e&&a.ellipse(b,c,d,e);a.stroke()}};\nmxDoubleEllipse.prototype.getLabelBounds=function(a){var b=mxUtils.getValue(this.style,mxConstants.STYLE_MARGIN,Math.min(3+this.strokewidth,Math.min(a.width/5/this.scale,a.height/5/this.scale)))*this.scale;return new mxRectangle(a.x+b,a.y+b,a.width-2*b,a.height-2*b)};function mxRhombus(a,b,c,d){mxShape.call(this);this.bounds=a;this.fill=b;this.stroke=c;this.strokewidth=null!=d?d:1}mxUtils.extend(mxRhombus,mxShape);mxRhombus.prototype.isRoundable=function(){return!0};\nmxRhombus.prototype.paintVertexShape=function(a,b,c,d,e){var f=d/2,g=e/2,k=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;a.begin();this.addPoints(a,[new mxPoint(b+f,c),new mxPoint(b+d,c+g),new mxPoint(b+f,c+e),new mxPoint(b,c+g)],this.isRounded,k,!0);a.fillAndStroke()};function mxPolyline(a,b,c){mxShape.call(this);this.points=a;this.stroke=b;this.strokewidth=null!=c?c:1}mxUtils.extend(mxPolyline,mxShape);mxPolyline.prototype.getRotation=function(){return 0};\nmxPolyline.prototype.getShapeRotation=function(){return 0};mxPolyline.prototype.isPaintBoundsInverted=function(){return!1};mxPolyline.prototype.paintEdgeShape=function(a,b){var c=a.pointerEventsValue;a.pointerEventsValue=\"stroke\";null==this.style||1!=this.style[mxConstants.STYLE_CURVED]?this.paintLine(a,b,this.isRounded):this.paintCurvedLine(a,b);a.pointerEventsValue=c};\nmxPolyline.prototype.paintLine=function(a,b,c){var d=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;a.begin();this.addPoints(a,b,c,d,!1);a.stroke()};mxPolyline.prototype.paintCurvedLine=function(a,b){a.begin();var c=b[0],d=b.length;a.moveTo(c.x,c.y);for(c=1;c<d-2;c++){var e=b[c],f=b[c+1];a.quadTo(e.x,e.y,(e.x+f.x)/2,(e.y+f.y)/2)}e=b[d-2];f=b[d-1];a.quadTo(e.x,e.y,f.x,f.y);a.stroke()};\nfunction mxArrow(a,b,c,d,e,f,g){mxShape.call(this);this.points=a;this.fill=b;this.stroke=c;this.strokewidth=null!=d?d:1;this.arrowWidth=null!=e?e:mxConstants.ARROW_WIDTH;this.spacing=null!=f?f:mxConstants.ARROW_SPACING;this.endSize=null!=g?g:mxConstants.ARROW_SIZE}mxUtils.extend(mxArrow,mxShape);mxArrow.prototype.augmentBoundingBox=function(a){mxShape.prototype.augmentBoundingBox.apply(this,arguments);a.grow((Math.max(this.arrowWidth,this.endSize)/2+this.strokewidth)*this.scale)};\nmxArrow.prototype.paintEdgeShape=function(a,b){var c=mxConstants.ARROW_SPACING,d=mxConstants.ARROW_WIDTH,e=b[0];b=b[b.length-1];var f=b.x-e.x,g=b.y-e.y,k=Math.sqrt(f*f+g*g),l=k-2*c-mxConstants.ARROW_SIZE;f/=k;g/=k;k=d*g/3;d=-d*f/3;var m=e.x-k/2+c*f;e=e.y-d/2+c*g;var n=m+k,p=e+d,q=n+l*f;l=p+l*g;var r=q+k,t=l+d,u=r-3*k,x=t-3*d;a.begin();a.moveTo(m,e);a.lineTo(n,p);a.lineTo(q,l);a.lineTo(r,t);a.lineTo(b.x-c*f,b.y-c*g);a.lineTo(u,x);a.lineTo(u+k,x+d);a.close();a.fillAndStroke()};\nfunction mxArrowConnector(a,b,c,d,e,f,g){mxShape.call(this);this.points=a;this.fill=b;this.stroke=c;this.strokewidth=null!=d?d:1;this.arrowWidth=null!=e?e:mxConstants.ARROW_WIDTH;this.arrowSpacing=null!=f?f:mxConstants.ARROW_SPACING;this.startSize=mxConstants.ARROW_SIZE/5;this.endSize=mxConstants.ARROW_SIZE/5}mxUtils.extend(mxArrowConnector,mxShape);mxArrowConnector.prototype.useSvgBoundingBox=!0;mxArrowConnector.prototype.isRoundable=function(){return!0};\nmxArrowConnector.prototype.resetStyles=function(){mxShape.prototype.resetStyles.apply(this,arguments);this.arrowSpacing=mxConstants.ARROW_SPACING};mxArrowConnector.prototype.apply=function(a){mxShape.prototype.apply.apply(this,arguments);null!=this.style&&(this.startSize=3*mxUtils.getNumber(this.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5),this.endSize=3*mxUtils.getNumber(this.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5))};\nmxArrowConnector.prototype.augmentBoundingBox=function(a){mxShape.prototype.augmentBoundingBox.apply(this,arguments);var b=this.getEdgeWidth();this.isMarkerStart()&&(b=Math.max(b,this.getStartArrowWidth()));this.isMarkerEnd()&&(b=Math.max(b,this.getEndArrowWidth()));a.grow((b/2+this.strokewidth)*this.scale)};\nmxArrowConnector.prototype.paintEdgeShape=function(a,b){var c=this.strokewidth;this.outline&&(c=Math.max(1,mxUtils.getNumber(this.style,mxConstants.STYLE_STROKEWIDTH,this.strokewidth)));var d=this.getStartArrowWidth()+c,e=this.getEndArrowWidth()+c,f=this.outline?this.getEdgeWidth()+c:this.getEdgeWidth(),g=this.isOpenEnded(),k=this.isMarkerStart(),l=this.isMarkerEnd(),m=g?0:this.arrowSpacing+c/2,n=this.startSize+c;c=this.endSize+c;var p=this.isArrowRounded(),q=b[b.length-1],r=b[1].x-b[0].x,t=b[1].y-\nb[0].y,u=Math.sqrt(r*r+t*t);if(0!=u){var x=r/u,y=x,B=t/u,A=B;u=f*B;var C=-f*x,z=[];p?a.setLineJoin(\"round\"):2<b.length&&a.setMiterLimit(1.42);a.begin();r=x;t=B;if(k&&!g)this.paintMarker(a,b[0].x,b[0].y,x,B,n,d,f,m,!0);else{var v=b[0].x+u/2+m*x;var D=b[0].y+C/2+m*B;var F=b[0].x-u/2+m*x,K=b[0].y-C/2+m*B;g?(a.moveTo(v,D),z.push(function(){a.lineTo(F,K)})):(a.moveTo(F,K),a.lineTo(v,D))}var G=D=v=0;for(u=0;u<b.length-2;u++)if(C=mxUtils.relativeCcw(b[u].x,b[u].y,b[u+1].x,b[u+1].y,b[u+2].x,b[u+2].y),v=b[u+\n2].x-b[u+1].x,D=b[u+2].y-b[u+1].y,G=Math.sqrt(v*v+D*D),0!=G){y=v/G;A=D/G;G=Math.max(Math.sqrt((x*y+B*A+1)/2),.04);v=x+y;D=B+A;var J=Math.sqrt(v*v+D*D);if(0!=J){v/=J;D/=J;J=Math.max(G,Math.min(this.strokewidth/200+.04,.35));G=0!=C&&p?Math.max(.1,J):Math.max(G,.06);var E=b[u+1].x+D*f/2/G,H=b[u+1].y-v*f/2/G;D=b[u+1].x-D*f/2/G;v=b[u+1].y+v*f/2/G;0!=C&&p?-1==C?(C=D+A*f,G=v-y*f,a.lineTo(D+B*f,v-x*f),a.quadTo(E,H,C,G),function(L,M){z.push(function(){a.lineTo(L,M)})}(D,v)):(a.lineTo(E,H),function(L,M){var O=\nE-B*f,P=H+x*f,Q=E-A*f,R=H+y*f;z.push(function(){a.quadTo(L,M,O,P)});z.push(function(){a.lineTo(Q,R)})}(D,v)):(a.lineTo(E,H),function(L,M){z.push(function(){a.lineTo(L,M)})}(D,v));x=y;B=A}}u=f*A;C=-f*y;if(l&&!g)this.paintMarker(a,q.x,q.y,-x,-B,c,e,f,m,!1);else{a.lineTo(q.x-m*y+u/2,q.y-m*A+C/2);var I=q.x-m*y-u/2,N=q.y-m*A-C/2;g?(a.moveTo(I,N),z.splice(0,0,function(){a.moveTo(I,N)})):a.lineTo(I,N)}for(u=z.length-1;0<=u;u--)z[u]();g?(a.end(),a.stroke()):(a.close(),a.fillAndStroke());a.setShadow(!1);a.setMiterLimit(4);\np&&a.setLineJoin(\"flat\");2<b.length&&(a.setMiterLimit(4),k&&!g&&(a.begin(),this.paintMarker(a,b[0].x,b[0].y,r,t,n,d,f,m,!0),a.stroke(),a.end()),l&&!g&&(a.begin(),this.paintMarker(a,q.x,q.y,-x,-B,c,e,f,m,!0),a.stroke(),a.end()))}};mxArrowConnector.prototype.paintMarker=function(a,b,c,d,e,f,g,k,l,m){g=k/g;var n=k*e/2;k=-k*d/2;var p=(l+f)*d;f=(l+f)*e;m?a.moveTo(b-n+p,c-k+f):a.lineTo(b-n+p,c-k+f);a.lineTo(b-n/g+p,c-k/g+f);a.lineTo(b+l*d,c+l*e);a.lineTo(b+n/g+p,c+k/g+f);a.lineTo(b+n+p,c+k+f)};\nmxArrowConnector.prototype.isArrowRounded=function(){return this.isRounded};mxArrowConnector.prototype.getStartArrowWidth=function(){return mxConstants.ARROW_WIDTH};mxArrowConnector.prototype.getEndArrowWidth=function(){return mxConstants.ARROW_WIDTH};mxArrowConnector.prototype.getEdgeWidth=function(){return mxConstants.ARROW_WIDTH/3};mxArrowConnector.prototype.isOpenEnded=function(){return!1};\nmxArrowConnector.prototype.isMarkerStart=function(){return mxUtils.getValue(this.style,mxConstants.STYLE_STARTARROW,mxConstants.NONE)!=mxConstants.NONE};mxArrowConnector.prototype.isMarkerEnd=function(){return mxUtils.getValue(this.style,mxConstants.STYLE_ENDARROW,mxConstants.NONE)!=mxConstants.NONE};\nfunction mxText(a,b,c,d,e,f,g,k,l,m,n,p,q,r,t,u,x,y,B,A,C){mxShape.call(this);this.value=a;this.bounds=b;this.color=null!=e?e:\"black\";this.align=null!=c?c:mxConstants.ALIGN_CENTER;this.valign=null!=d?d:mxConstants.ALIGN_MIDDLE;this.family=null!=f?f:mxConstants.DEFAULT_FONTFAMILY;this.size=null!=g?g:mxConstants.DEFAULT_FONTSIZE;this.fontStyle=null!=k?k:mxConstants.DEFAULT_FONTSTYLE;this.spacing=parseInt(l||2);this.spacingTop=this.spacing+parseInt(m||0);this.spacingRight=this.spacing+parseInt(n||0);\nthis.spacingBottom=this.spacing+parseInt(p||0);this.spacingLeft=this.spacing+parseInt(q||0);this.horizontal=null!=r?r:!0;this.background=t;this.border=u;this.wrap=null!=x?x:!1;this.clipped=null!=y?y:!1;this.overflow=null!=B?B:\"visible\";this.labelPadding=null!=A?A:0;this.textDirection=C;this.rotation=0;this.updateMargin()}mxUtils.extend(mxText,mxShape);mxText.prototype.baseSpacingTop=0;mxText.prototype.baseSpacingBottom=0;mxText.prototype.baseSpacingLeft=0;mxText.prototype.baseSpacingRight=0;\nmxText.prototype.replaceLinefeeds=!0;mxText.prototype.verticalTextRotation=-90;mxText.prototype.ignoreClippedStringSize=!0;mxText.prototype.ignoreStringSize=!1;mxText.prototype.textWidthPadding=8!=document.documentMode||mxClient.IS_EM?3:4;mxText.prototype.lastValue=null;mxText.prototype.cacheEnabled=!0;mxText.prototype.isHtmlAllowed=function(){return 8!=document.documentMode||mxClient.IS_EM};mxText.prototype.getSvgScreenOffset=function(){return 0};\nmxText.prototype.checkBounds=function(){return!isNaN(this.scale)&&isFinite(this.scale)&&0<this.scale&&null!=this.bounds&&!isNaN(this.bounds.x)&&!isNaN(this.bounds.y)&&!isNaN(this.bounds.width)&&!isNaN(this.bounds.height)};mxText.prototype.configurePointerEvents=function(a){};\nmxText.prototype.paint=function(a,b){var c=this.scale,d=this.bounds.x/c,e=this.bounds.y/c,f=this.bounds.width/c;c=this.bounds.height/c;this.updateTransform(a,d,e,f,c);this.configureCanvas(a,d,e,f,c);if(b)a.updateText(d,e,f,c,this.align,this.valign,this.wrap,this.overflow,this.clipped,this.getTextRotation(),this.node);else{var g=(b=mxUtils.isNode(this.value)||this.dialect==mxConstants.DIALECT_STRICTHTML)?\"html\":\"\",k=this.value;b||\"html\"!=g||(k=mxUtils.htmlEntities(k,!1));\"html\"!=g||mxUtils.isNode(this.value)||\n(k=mxUtils.replaceTrailingNewlines(k,\"<div><br></div>\"));k=!mxUtils.isNode(this.value)&&this.replaceLinefeeds&&\"html\"==g?k.replace(/\\n/g,\"<br/>\"):k;var l=this.textDirection;l!=mxConstants.TEXT_DIRECTION_AUTO||b||(l=this.getAutoDirection());l!=mxConstants.TEXT_DIRECTION_LTR&&l!=mxConstants.TEXT_DIRECTION_RTL&&(l=null);a.text(d,e,f,c,k,this.align,this.valign,this.wrap,g,this.overflow,this.clipped,this.getTextRotation(),l)}};\nmxText.prototype.redraw=function(){if(this.visible&&this.checkBounds()&&this.cacheEnabled&&this.lastValue==this.value&&(mxUtils.isNode(this.value)||this.dialect==mxConstants.DIALECT_STRICTHTML))if(\"DIV\"==this.node.nodeName)mxClient.IS_SVG?this.redrawHtmlShapeWithCss3():(this.updateSize(this.node,null==this.state||null==this.state.view.textDiv),mxClient.IS_IE&&(null==document.documentMode||8>=document.documentMode)?this.updateHtmlFilter():this.updateHtmlTransform());else{var a=this.createCanvas();\nnull!=a&&null!=a.updateText?(a.pointerEvents=this.pointerEvents,this.paint(a,!0),this.destroyCanvas(a)):mxShape.prototype.redraw.apply(this,arguments)}else mxShape.prototype.redraw.apply(this,arguments),mxUtils.isNode(this.value)||this.dialect==mxConstants.DIALECT_STRICTHTML?this.lastValue=this.value:this.lastValue=null};\nmxText.prototype.resetStyles=function(){mxShape.prototype.resetStyles.apply(this,arguments);this.color=\"black\";this.align=mxConstants.ALIGN_CENTER;this.valign=mxConstants.ALIGN_MIDDLE;this.family=mxConstants.DEFAULT_FONTFAMILY;this.size=mxConstants.DEFAULT_FONTSIZE;this.fontStyle=mxConstants.DEFAULT_FONTSTYLE;this.spacingLeft=this.spacingBottom=this.spacingRight=this.spacingTop=this.spacing=2;this.horizontal=!0;delete this.background;delete this.border;this.textDirection=mxConstants.DEFAULT_TEXT_DIRECTION;\ndelete this.margin};\nmxText.prototype.apply=function(a){var b=this.spacing;mxShape.prototype.apply.apply(this,arguments);null!=this.style&&(this.fontStyle=mxUtils.getValue(this.style,mxConstants.STYLE_FONTSTYLE,this.fontStyle),this.family=mxUtils.getValue(this.style,mxConstants.STYLE_FONTFAMILY,this.family),this.size=mxUtils.getValue(this.style,mxConstants.STYLE_FONTSIZE,this.size),this.color=mxUtils.getValue(this.style,mxConstants.STYLE_FONTCOLOR,this.color),this.align=mxUtils.getValue(this.style,mxConstants.STYLE_ALIGN,\nthis.align),this.valign=mxUtils.getValue(this.style,mxConstants.STYLE_VERTICAL_ALIGN,this.valign),this.spacing=parseInt(mxUtils.getValue(this.style,mxConstants.STYLE_SPACING,this.spacing)),this.spacingTop=parseInt(mxUtils.getValue(this.style,mxConstants.STYLE_SPACING_TOP,this.spacingTop-b))+this.spacing,this.spacingRight=parseInt(mxUtils.getValue(this.style,mxConstants.STYLE_SPACING_RIGHT,this.spacingRight-b))+this.spacing,this.spacingBottom=parseInt(mxUtils.getValue(this.style,mxConstants.STYLE_SPACING_BOTTOM,\nthis.spacingBottom-b))+this.spacing,this.spacingLeft=parseInt(mxUtils.getValue(this.style,mxConstants.STYLE_SPACING_LEFT,this.spacingLeft-b))+this.spacing,this.horizontal=mxUtils.getValue(this.style,mxConstants.STYLE_HORIZONTAL,this.horizontal),this.background=mxUtils.getValue(this.style,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,this.background),this.border=mxUtils.getValue(this.style,mxConstants.STYLE_LABEL_BORDERCOLOR,this.border),this.textDirection=mxUtils.getValue(this.style,mxConstants.STYLE_TEXT_DIRECTION,\nmxConstants.DEFAULT_TEXT_DIRECTION),this.opacity=mxUtils.getValue(this.style,mxConstants.STYLE_TEXT_OPACITY,100),this.updateMargin());this.flipH=this.flipV=null};mxText.prototype.getAutoDirection=function(){var a=/[A-Za-z\\u05d0-\\u065f\\u066a-\\u06ef\\u06fa-\\u07ff\\ufb1d-\\ufdff\\ufe70-\\ufefc]/.exec(this.value);return null!=a&&0<a.length&&\"z\"<a[0]?mxConstants.TEXT_DIRECTION_RTL:mxConstants.TEXT_DIRECTION_LTR};\nmxText.prototype.getContentNode=function(){var a=this.node;null!=a&&(a=null==a.ownerSVGElement?this.node.firstChild.firstChild:a.firstChild.firstChild.firstChild.firstChild.firstChild);return a};\nmxText.prototype.updateBoundingBox=function(){var a=this.node;this.boundingBox=this.bounds.clone();var b=this.getTextRotation(),c=null!=this.style?mxUtils.getValue(this.style,mxConstants.STYLE_LABEL_POSITION,mxConstants.ALIGN_CENTER):null,d=null!=this.style?mxUtils.getValue(this.style,mxConstants.STYLE_VERTICAL_LABEL_POSITION,mxConstants.ALIGN_MIDDLE):null;if(!(this.ignoreStringSize||null==a||\"fill\"==this.overflow||this.clipped&&this.ignoreClippedStringSize&&c==mxConstants.ALIGN_CENTER&&d==mxConstants.ALIGN_MIDDLE)){d=\nc=null;if(null!=a.ownerSVGElement)if(null!=a.firstChild&&null!=a.firstChild.firstChild&&\"foreignObject\"==a.firstChild.firstChild.nodeName)a=a.firstChild.firstChild.firstChild.firstChild,d=a.offsetHeight*this.scale,c=\"width\"==this.overflow?this.boundingBox.width:a.offsetWidth*this.scale;else try{var e=a.getBBox();\"string\"==typeof this.value&&0==mxUtils.trim(this.value)?this.boundingBox=null:this.boundingBox=0==e.width&&0==e.height?null:new mxRectangle(e.x,e.y,e.width,e.height);return}catch(f){}else{c=\nnull!=this.state?this.state.view.textDiv:null;if(null==this.offsetWidth||null==this.offsetHeight)null!=c&&(this.updateFont(c),this.updateSize(c,!1),this.updateInnerHtml(c),a=c),e=a,8!=document.documentMode||mxClient.IS_EM?null!=e.firstChild&&\"DIV\"==e.firstChild.nodeName&&(e=e.firstChild):(d=Math.round(this.bounds.width/this.scale),this.wrap&&0<d?(a.style.wordWrap=mxConstants.WORD_WRAP,a.style.whiteSpace=\"normal\",\"break-word\"!=a.style.wordWrap&&(a=e.getElementsByTagName(\"div\"),0<a.length&&(e=a[a.length-\n1]),c=e.offsetWidth+2,a=this.node.getElementsByTagName(\"div\"),this.clipped&&(c=Math.min(d,c)),1<a.length&&(a[a.length-2].style.width=c+\"px\"))):a.style.whiteSpace=\"nowrap\"),this.offsetWidth=e.offsetWidth+this.textWidthPadding,this.offsetHeight=e.offsetHeight;c=this.offsetWidth*this.scale;d=this.offsetHeight*this.scale}null!=c&&null!=d&&(this.boundingBox=new mxRectangle(this.bounds.x,this.bounds.y,c,d))}null!=this.boundingBox&&(0!=b?(b=mxUtils.getBoundingBox(new mxRectangle(this.margin.x*this.boundingBox.width,\nthis.margin.y*this.boundingBox.height,this.boundingBox.width,this.boundingBox.height),b,new mxPoint(0,0)),this.unrotatedBoundingBox=mxRectangle.fromRectangle(this.boundingBox),this.unrotatedBoundingBox.x+=this.margin.x*this.unrotatedBoundingBox.width,this.unrotatedBoundingBox.y+=this.margin.y*this.unrotatedBoundingBox.height,this.boundingBox.x+=b.x,this.boundingBox.y+=b.y,this.boundingBox.width=b.width,this.boundingBox.height=b.height):(this.boundingBox.x+=this.margin.x*this.boundingBox.width,this.boundingBox.y+=\nthis.margin.y*this.boundingBox.height,this.unrotatedBoundingBox=null))};mxText.prototype.getShapeRotation=function(){return 0};mxText.prototype.getTextRotation=function(){return null!=this.state&&null!=this.state.shape?this.state.shape.getTextRotation():0};mxText.prototype.isPaintBoundsInverted=function(){return!this.horizontal&&null!=this.state&&this.state.view.graph.model.isVertex(this.state.cell)};\nmxText.prototype.configureCanvas=function(a,b,c,d,e){mxShape.prototype.configureCanvas.apply(this,arguments);a.setFontColor(this.color);a.setFontBackgroundColor(this.background);a.setFontBorderColor(this.border);a.setFontFamily(this.family);a.setFontSize(this.size);a.setFontStyle(this.fontStyle)};\nmxText.prototype.getHtmlValue=function(){var a=this.value;this.dialect!=mxConstants.DIALECT_STRICTHTML&&(a=mxUtils.htmlEntities(a,!1));a=mxUtils.replaceTrailingNewlines(a,\"<div><br></div>\");return a=this.replaceLinefeeds?a.replace(/\\n/g,\"<br/>\"):a};\nmxText.prototype.getTextCss=function(){var a=\"display: inline-block; font-size: \"+this.size+\"px; font-family: \"+this.family+\"; color: \"+this.color+\"; line-height: \"+(mxConstants.ABSOLUTE_LINE_HEIGHT?this.size*mxConstants.LINE_HEIGHT+\"px\":mxConstants.LINE_HEIGHT)+\"; pointer-events: \"+(this.pointerEvents?\"all\":\"none\")+\"; \";(this.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&(a+=\"font-weight: bold; \");(this.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&(a+=\"font-style: italic; \");\nvar b=[];(this.fontStyle&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&b.push(\"underline\");(this.fontStyle&mxConstants.FONT_STRIKETHROUGH)==mxConstants.FONT_STRIKETHROUGH&&b.push(\"line-through\");0<b.length&&(a+=\"text-decoration: \"+b.join(\" \")+\"; \");return a};\nmxText.prototype.redrawHtmlShape=function(){if(mxClient.IS_SVG)this.redrawHtmlShapeWithCss3();else{var a=this.node.style;a.whiteSpace=\"normal\";a.overflow=\"\";a.width=\"\";a.height=\"\";this.updateValue();this.updateFont(this.node);this.updateSize(this.node,null==this.state||null==this.state.view.textDiv);this.offsetHeight=this.offsetWidth=null;mxClient.IS_IE&&(null==document.documentMode||8>=document.documentMode)?this.updateHtmlFilter():this.updateHtmlTransform()}};\nmxText.prototype.redrawHtmlShapeWithCss3=function(){var a=Math.max(0,Math.round(this.bounds.width/this.scale)),b=Math.max(0,Math.round(this.bounds.height/this.scale)),c=\"position: absolute; left: \"+Math.round(this.bounds.x)+\"px; top: \"+Math.round(this.bounds.y)+\"px; pointer-events: none; \",d=this.getTextCss();mxSvgCanvas2D.createCss(a+2,b,this.align,this.valign,this.wrap,this.overflow,this.clipped,null!=this.background?mxUtils.htmlEntities(this.background):null,null!=this.border?mxUtils.htmlEntities(this.border):\nnull,c,d,this.scale,mxUtils.bind(this,function(e,f,g,k,l,m){e=this.getTextRotation();e=(1!=this.scale?\"scale(\"+this.scale+\") \":\"\")+(0!=e?\"rotate(\"+e+\"deg) \":\"\")+(0!=this.margin.x||0!=this.margin.y?\"translate(\"+100*this.margin.x+\"%,\"+100*this.margin.y+\"%)\":\"\");\"\"!=e&&(e=\"transform-origin: 0 0; transform: \"+e+\"; \");\"block\"==this.overflow&&this.valign==mxConstants.ALIGN_MIDDLE&&(e+=\"max-height: \"+(b+1)+\"px;\");\"\"==m?(g+=k,k=\"display:inline-block; min-width: 100%; \"+e):(k+=e,mxClient.IS_SF&&(k+=\"-webkit-clip-path: content-box;\"));\n\"block\"==this.overflow&&(k+=\"width: 100%; \");100>this.opacity&&(l+=\"opacity: \"+this.opacity/100+\"; \");this.node.setAttribute(\"style\",g);g=mxUtils.isNode(this.value)?this.value.outerHTML:this.getHtmlValue();null==this.node.firstChild&&(this.node.innerHTML=\"<div><div>\"+g+\"</div></div>\",mxClient.IS_IE11&&this.fixFlexboxForIe11(this.node));this.node.firstChild.firstChild.setAttribute(\"style\",l);this.node.firstChild.setAttribute(\"style\",k)}))};\nmxText.prototype.fixFlexboxForIe11=function(a){for(var b=a.querySelectorAll('div[style*=\"display: flex; justify-content: flex-end;\"]'),c=0;c<b.length;c++)b[c].style.justifyContent=\"flex-start\",b[c].style.flexDirection=\"row-reverse\";if(!this.wrap)for(b=a.querySelectorAll('div[style*=\"display: flex; justify-content: center;\"]'),a=-window.innerWidth,c=0;c<b.length;c++)b[c].style.marginLeft=a+\"px\",b[c].style.marginRight=a+\"px\"};\nmxText.prototype.updateHtmlTransform=function(){var a=this.getTextRotation(),b=this.node.style,c=this.margin.x,d=this.margin.y;0!=a?(mxUtils.setPrefixedStyle(b,\"transformOrigin\",100*-c+\"% \"+100*-d+\"%\"),mxUtils.setPrefixedStyle(b,\"transform\",\"translate(\"+100*c+\"%,\"+100*d+\"%) scale(\"+this.scale+\") rotate(\"+a+\"deg)\")):(mxUtils.setPrefixedStyle(b,\"transformOrigin\",\"0% 0%\"),mxUtils.setPrefixedStyle(b,\"transform\",\"scale(\"+this.scale+\") translate(\"+100*c+\"%,\"+100*d+\"%)\"));b.left=Math.round(this.bounds.x-\nMath.ceil(c*(\"fill\"!=this.overflow&&\"width\"!=this.overflow?3:1)))+\"px\";b.top=Math.round(this.bounds.y-d*(\"fill\"!=this.overflow?3:1))+\"px\";b.opacity=100>this.opacity?this.opacity/100:\"\"};\nmxText.prototype.updateInnerHtml=function(a){if(mxUtils.isNode(this.value))a.innerHTML=this.value.outerHTML;else{var b=this.value;this.dialect!=mxConstants.DIALECT_STRICTHTML&&(b=mxUtils.htmlEntities(b,!1));b=mxUtils.replaceTrailingNewlines(b,\"<div>&nbsp;</div>\");b=this.replaceLinefeeds?b.replace(/\\n/g,\"<br/>\"):b;a.innerHTML='<div style=\"display:inline-block;_display:inline;\">'+b+\"</div>\"}};\nmxText.prototype.updateHtmlFilter=function(){var a=this.node.style,b=this.margin.x,c=this.margin.y,d=this.scale;mxUtils.setOpacity(this.node,this.opacity);var e=0,f=null!=this.state?this.state.view.textDiv:null,g=this.node;if(null!=f){f.style.overflow=\"\";f.style.height=\"\";f.style.width=\"\";this.updateFont(f);this.updateSize(f,!1);this.updateInnerHtml(f);var k=Math.round(this.bounds.width/this.scale);if(this.wrap&&0<k){f.style.whiteSpace=\"normal\";f.style.wordWrap=mxConstants.WORD_WRAP;var l=k;this.clipped&&\n(l=Math.min(l,this.bounds.width));f.style.width=l+\"px\"}else f.style.whiteSpace=\"nowrap\";g=f;null!=g.firstChild&&\"DIV\"==g.firstChild.nodeName&&(g=g.firstChild,this.wrap&&\"break-word\"==f.style.wordWrap&&(g.style.width=\"100%\"));!this.clipped&&this.wrap&&0<k&&(l=g.offsetWidth+this.textWidthPadding,f.style.width=l+\"px\");e=g.offsetHeight+2}else null!=g.firstChild&&\"DIV\"==g.firstChild.nodeName&&(g=g.firstChild,e=g.offsetHeight);l=g.offsetWidth+this.textWidthPadding;this.clipped&&(e=Math.min(e,this.bounds.height));\nk=this.bounds.width/d;f=this.bounds.height/d;\"fill\"==this.overflow?(e=f,l=k):\"width\"==this.overflow&&(e=g.scrollHeight,l=k);this.offsetWidth=l;this.offsetHeight=e;\"fill\"!=this.overflow&&\"width\"!=this.overflow&&(this.clipped&&(l=Math.min(k,l)),k=l,this.wrap&&(a.width=Math.round(k)+\"px\"));f=e*d;k*=d;var m=this.getTextRotation()*(Math.PI/180);l=parseFloat(parseFloat(Math.cos(m)).toFixed(8));e=parseFloat(parseFloat(Math.sin(-m)).toFixed(8));m%=2*Math.PI;0>m&&(m+=2*Math.PI);m%=Math.PI;m>Math.PI/2&&(m=\nMath.PI-m);g=Math.cos(m);var n=Math.sin(-m);b=k*-(b+.5);c=f*-(c+.5);0!=m&&(m=\"progid:DXImageTransform.Microsoft.Matrix(M11=\"+l+\", M12=\"+e+\", M21=\"+-e+\", M22=\"+l+\", sizingMethod='auto expand')\",a.filter=null!=a.filter&&0<a.filter.length?a.filter+(\" \"+m):m);a.zoom=d;a.left=Math.round(this.bounds.x+((k-k*g+f*n)/2-l*b-e*c)-k/2)+\"px\";a.top=Math.round(this.bounds.y+((f-f*g+k*n)/2+e*b-l*c)-f/2)+\"px\"};\nmxText.prototype.updateValue=function(){if(mxUtils.isNode(this.value))this.node.innerText=\"\",this.node.appendChild(this.value);else{var a=this.value;this.dialect!=mxConstants.DIALECT_STRICTHTML&&(a=mxUtils.htmlEntities(a,!1));a=mxUtils.replaceTrailingNewlines(a,\"<div><br></div>\");a=this.replaceLinefeeds?a.replace(/\\n/g,\"<br/>\"):a;var b=null!=this.background&&this.background!=mxConstants.NONE?this.background:null,c=null!=this.border&&this.border!=mxConstants.NONE?this.border:null;if(\"fill\"==this.overflow||\n\"width\"==this.overflow)null!=b&&(this.node.style.backgroundColor=b),null!=c&&(this.node.style.border=\"1px solid \"+c);else{var d=\"\";null!=b&&(d+=\"background-color:\"+mxUtils.htmlEntities(b)+\";\");null!=c&&(d+=\"border:1px solid \"+mxUtils.htmlEntities(c)+\";\");a='<div style=\"zoom:1;'+d+\"display:inline-block;_display:inline;text-decoration:inherit;padding-bottom:1px;padding-right:1px;line-height:\"+(mxConstants.ABSOLUTE_LINE_HEIGHT?this.size*mxConstants.LINE_HEIGHT+\"px\":mxConstants.LINE_HEIGHT)+'\">'+a+\"</div>\"}this.node.innerHTML=\na;a=this.node.getElementsByTagName(\"div\");0<a.length&&(b=this.textDirection,b==mxConstants.TEXT_DIRECTION_AUTO&&this.dialect!=mxConstants.DIALECT_STRICTHTML&&(b=this.getAutoDirection()),b==mxConstants.TEXT_DIRECTION_LTR||b==mxConstants.TEXT_DIRECTION_RTL?a[a.length-1].setAttribute(\"dir\",b):a[a.length-1].removeAttribute(\"dir\"))}};\nmxText.prototype.updateFont=function(a){a=a.style;a.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?this.size*mxConstants.LINE_HEIGHT+\"px\":mxConstants.LINE_HEIGHT;a.fontSize=this.size+\"px\";a.fontFamily=this.family;a.verticalAlign=\"top\";a.color=this.color;a.fontWeight=(this.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD?\"bold\":\"\";a.fontStyle=(this.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC?\"italic\":\"\";var b=[];(this.fontStyle&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&\nb.push(\"underline\");(this.fontStyle&mxConstants.FONT_STRIKETHROUGH)==mxConstants.FONT_STRIKETHROUGH&&b.push(\"line-through\");a.textDecoration=b.join(\" \");a.textAlign=this.align==mxConstants.ALIGN_CENTER?\"center\":this.align==mxConstants.ALIGN_RIGHT?\"right\":\"left\"};\nmxText.prototype.updateSize=function(a,b){var c=Math.max(0,Math.round(this.bounds.width/this.scale)),d=Math.max(0,Math.round(this.bounds.height/this.scale)),e=a.style;this.clipped?(e.overflow=\"hidden\",e.maxHeight=d+\"px\",e.maxWidth=c+\"px\"):\"fill\"==this.overflow?(e.width=c+1+\"px\",e.height=d+1+\"px\",e.overflow=\"hidden\"):\"width\"==this.overflow?(e.width=c+1+\"px\",e.maxHeight=d+1+\"px\",e.overflow=\"hidden\"):\"block\"==this.overflow&&(e.width=c+1+\"px\");if(this.wrap&&0<c){if(e.wordWrap=mxConstants.WORD_WRAP,e.whiteSpace=\n\"normal\",e.width=c+\"px\",b&&\"fill\"!=this.overflow&&\"width\"!=this.overflow){b=a;null!=b.firstChild&&\"DIV\"==b.firstChild.nodeName&&(b=b.firstChild,\"break-word\"==a.style.wordWrap&&(b.style.width=\"100%\"));d=b.offsetWidth;if(0==d){var f=a.parentNode;a.style.visibility=\"hidden\";document.body.appendChild(a);d=b.offsetWidth;a.style.visibility=\"\";f.appendChild(a)}d+=3;this.clipped&&(d=Math.min(d,c));e.width=d+\"px\"}}else e.whiteSpace=\"nowrap\"};\nmxText.prototype.updateMargin=function(){this.margin=mxUtils.getAlignmentAsPoint(this.align,this.valign)};\nmxText.prototype.getSpacing=function(a){return new mxPoint(this.align==mxConstants.ALIGN_CENTER?(this.spacingLeft-this.spacingRight)/2:this.align==mxConstants.ALIGN_RIGHT?-this.spacingRight-(a?0:this.baseSpacingRight):this.spacingLeft+(a?0:this.baseSpacingLeft),this.valign==mxConstants.ALIGN_MIDDLE?(this.spacingTop-this.spacingBottom)/2:this.valign==mxConstants.ALIGN_BOTTOM?-this.spacingBottom-(a?0:this.baseSpacingBottom):this.spacingTop+(a?0:this.baseSpacingTop))};\nfunction mxTriangle(){mxActor.call(this)}mxUtils.extend(mxTriangle,mxActor);mxTriangle.prototype.isRoundable=function(){return!0};mxTriangle.prototype.redrawPath=function(a,b,c,d,e){b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(d,.5*e),new mxPoint(0,e)],this.isRounded,b,!0)};function mxHexagon(){mxActor.call(this)}mxUtils.extend(mxHexagon,mxActor);\nmxHexagon.prototype.redrawPath=function(a,b,c,d,e){b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(.25*d,0),new mxPoint(.75*d,0),new mxPoint(d,.5*e),new mxPoint(.75*d,e),new mxPoint(.25*d,e),new mxPoint(0,.5*e)],this.isRounded,b,!0)};function mxLine(a,b,c,d){mxShape.call(this);this.bounds=a;this.stroke=b;this.strokewidth=null!=c?c:1;this.vertical=null!=d?d:this.vertical}mxUtils.extend(mxLine,mxShape);mxLine.prototype.vertical=!1;\nmxLine.prototype.paintVertexShape=function(a,b,c,d,e){a.begin();if(this.vertical){var f=b+d/2;a.moveTo(f,c);a.lineTo(f,c+e)}else f=c+e/2,a.moveTo(b,f),a.lineTo(b+d,f);a.stroke()};function mxImageShape(a,b,c,d,e){mxShape.call(this);this.bounds=a;this.image=b;this.fill=c;this.stroke=d;this.strokewidth=null!=e?e:1;this.shadow=!1}mxUtils.extend(mxImageShape,mxRectangleShape);mxImageShape.prototype.preserveImageAspect=!0;mxImageShape.prototype.getSvgScreenOffset=function(){return 0};\nmxImageShape.prototype.apply=function(a){mxShape.prototype.apply.apply(this,arguments);this.gradient=this.stroke=this.fill=null;null!=this.style&&(this.preserveImageAspect=1==mxUtils.getNumber(this.style,mxConstants.STYLE_IMAGE_ASPECT,1),this.imageBackground=mxUtils.getValue(this.style,mxConstants.STYLE_IMAGE_BACKGROUND,null),this.imageBorder=mxUtils.getValue(this.style,mxConstants.STYLE_IMAGE_BORDER,null),this.flipH=this.flipH||1==mxUtils.getValue(this.style,\"imageFlipH\",0),this.flipV=this.flipV||\n1==mxUtils.getValue(this.style,\"imageFlipV\",0),this.clipPath=mxUtils.getValue(this.style,mxConstants.STYLE_CLIP_PATH,null))};mxImageShape.prototype.isHtmlAllowed=function(){return!this.preserveImageAspect};mxImageShape.prototype.createHtml=function(){var a=document.createElement(\"div\");a.style.position=\"absolute\";return a};mxImageShape.prototype.isRoundable=function(){return!1};mxImageShape.prototype.getImageDataUri=function(){return this.image};mxImageShape.prototype.configurePointerEvents=function(a){};\nmxImageShape.prototype.paintVertexShape=function(a,b,c,d,e){null!=this.image?(null!=this.imageBackground&&(a.setFillColor(this.imageBackground),a.setStrokeColor(this.imageBorder),a.rect(b,c,d,e),a.fillAndStroke()),a.image(b,c,d,e,this.getImageDataUri(),this.preserveImageAspect,!1,!1,this.clipPath),null!=this.imageBorder&&(a.setShadow(!1),a.setStrokeColor(this.imageBorder),a.rect(b,c,d,e),a.stroke())):mxRectangleShape.prototype.paintBackground.apply(this,arguments)};\nmxImageShape.prototype.redrawHtmlShape=function(){this.node.style.left=Math.round(this.bounds.x)+\"px\";this.node.style.top=Math.round(this.bounds.y)+\"px\";this.node.style.width=Math.max(0,Math.round(this.bounds.width))+\"px\";this.node.style.height=Math.max(0,Math.round(this.bounds.height))+\"px\";this.node.innerText=\"\";if(null!=this.image){var a=mxUtils.getValue(this.style,mxConstants.STYLE_IMAGE_BACKGROUND,\"\"),b=mxUtils.getValue(this.style,mxConstants.STYLE_IMAGE_BORDER,\"\");this.node.style.backgroundColor=\na;this.node.style.borderColor=b;a=document.createElement(\"img\");a.setAttribute(\"border\",\"0\");a.style.position=\"absolute\";a.src=this.image;b=100>this.opacity?\"alpha(opacity=\"+this.opacity+\")\":\"\";this.node.style.filter=b;this.flipH&&this.flipV?b+=\"progid:DXImageTransform.Microsoft.BasicImage(rotation=2)\":this.flipH?b+=\"progid:DXImageTransform.Microsoft.BasicImage(mirror=1)\":this.flipV&&(b+=\"progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)\");a.style.filter!=b&&(a.style.filter=b);\"image\"==\na.nodeName?a.style.rotation=this.rotation:0!=this.rotation?mxUtils.setPrefixedStyle(a.style,\"transform\",\"rotate(\"+this.rotation+\"deg)\"):mxUtils.setPrefixedStyle(a.style,\"transform\",\"\");a.style.width=this.node.style.width;a.style.height=this.node.style.height;this.node.style.backgroundImage=\"\";this.node.appendChild(a)}else this.setTransparentBackgroundImage(this.node)};function mxLabel(a,b,c,d){mxRectangleShape.call(this,a,b,c,d)}mxUtils.extend(mxLabel,mxRectangleShape);\nmxLabel.prototype.imageSize=mxConstants.DEFAULT_IMAGESIZE;mxLabel.prototype.spacing=2;mxLabel.prototype.indicatorSize=10;mxLabel.prototype.indicatorSpacing=2;mxLabel.prototype.init=function(a){mxShape.prototype.init.apply(this,arguments);null!=this.indicatorShape&&(this.indicator=new this.indicatorShape,this.indicator.dialect=this.dialect,this.indicator.init(this.node))};\nmxLabel.prototype.redraw=function(){null!=this.indicator&&(this.indicator.fill=this.indicatorColor,this.indicator.stroke=this.indicatorStrokeColor,this.indicator.gradient=this.indicatorGradientColor,this.indicator.direction=this.indicatorDirection,this.indicator.redraw());mxShape.prototype.redraw.apply(this,arguments)};mxLabel.prototype.isHtmlAllowed=function(){return mxRectangleShape.prototype.isHtmlAllowed.apply(this,arguments)&&null==this.indicatorColor&&null==this.indicatorShape};\nmxLabel.prototype.paintForeground=function(a,b,c,d,e){this.paintImage(a,b,c,d,e);this.paintIndicator(a,b,c,d,e);mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxLabel.prototype.paintImage=function(a,b,c,d,e){null!=this.image&&(b=this.getImageBounds(b,c,d,e),c=mxUtils.getValue(this.style,mxConstants.STYLE_CLIP_PATH,null),a.image(b.x,b.y,b.width,b.height,this.image,!1,!1,!1,c))};\nmxLabel.prototype.getImageBounds=function(a,b,c,d){var e=mxUtils.getValue(this.style,mxConstants.STYLE_IMAGE_ALIGN,mxConstants.ALIGN_LEFT),f=mxUtils.getValue(this.style,mxConstants.STYLE_IMAGE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE),g=mxUtils.getNumber(this.style,mxConstants.STYLE_IMAGE_WIDTH,mxConstants.DEFAULT_IMAGESIZE),k=mxUtils.getNumber(this.style,mxConstants.STYLE_IMAGE_HEIGHT,mxConstants.DEFAULT_IMAGESIZE),l=mxUtils.getNumber(this.style,mxConstants.STYLE_SPACING,this.spacing)+5;a=e==mxConstants.ALIGN_CENTER?\na+(c-g)/2:e==mxConstants.ALIGN_RIGHT?a+(c-g-l):a+l;b=f==mxConstants.ALIGN_TOP?b+l:f==mxConstants.ALIGN_BOTTOM?b+(d-k-l):b+(d-k)/2;return new mxRectangle(a,b,g,k)};mxLabel.prototype.paintIndicator=function(a,b,c,d,e){null!=this.indicator?(this.indicator.bounds=this.getIndicatorBounds(b,c,d,e),this.indicator.paint(a)):null!=this.indicatorImage&&(b=this.getIndicatorBounds(b,c,d,e),a.image(b.x,b.y,b.width,b.height,this.indicatorImage,!1,!1,!1))};\nmxLabel.prototype.getIndicatorBounds=function(a,b,c,d){var e=mxUtils.getValue(this.style,mxConstants.STYLE_IMAGE_ALIGN,mxConstants.ALIGN_LEFT),f=mxUtils.getValue(this.style,mxConstants.STYLE_IMAGE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE),g=mxUtils.getNumber(this.style,mxConstants.STYLE_INDICATOR_WIDTH,this.indicatorSize),k=mxUtils.getNumber(this.style,mxConstants.STYLE_INDICATOR_HEIGHT,this.indicatorSize),l=this.spacing+5;a=e==mxConstants.ALIGN_RIGHT?a+(c-g-l):e==mxConstants.ALIGN_CENTER?a+(c-g)/\n2:a+l;b=f==mxConstants.ALIGN_BOTTOM?b+(d-k-l):f==mxConstants.ALIGN_TOP?b+l:b+(d-k)/2;return new mxRectangle(a,b,g,k)};\nmxLabel.prototype.redrawHtmlShape=function(){for(mxRectangleShape.prototype.redrawHtmlShape.apply(this,arguments);this.node.hasChildNodes();)this.node.removeChild(this.node.lastChild);if(null!=this.image){var a=document.createElement(\"img\");a.style.position=\"relative\";a.setAttribute(\"border\",\"0\");var b=this.getImageBounds(this.bounds.x,this.bounds.y,this.bounds.width,this.bounds.height);b.x-=this.bounds.x;b.y-=this.bounds.y;a.style.left=Math.round(b.x)+\"px\";a.style.top=Math.round(b.y)+\"px\";a.style.width=\nMath.round(b.width)+\"px\";a.style.height=Math.round(b.height)+\"px\";a.src=this.image;this.node.appendChild(a)}};function mxCylinder(a,b,c,d){mxShape.call(this);this.bounds=a;this.fill=b;this.stroke=c;this.strokewidth=null!=d?d:1}mxUtils.extend(mxCylinder,mxShape);mxCylinder.prototype.maxHeight=40;\nmxCylinder.prototype.paintVertexShape=function(a,b,c,d,e){a.translate(b,c);a.begin();this.redrawPath(a,b,c,d,e,!1);a.fillAndStroke();this.outline&&null!=this.style&&0!=mxUtils.getValue(this.style,mxConstants.STYLE_BACKGROUND_OUTLINE,0)||(a.setShadow(!1),a.begin(),this.redrawPath(a,b,c,d,e,!0),a.stroke())};mxCylinder.prototype.getCylinderSize=function(a,b,c,d){return Math.min(this.maxHeight,Math.round(d/5))};\nmxCylinder.prototype.redrawPath=function(a,b,c,d,e,f){b=this.getCylinderSize(b,c,d,e);if(f&&null!=this.fill||!f&&null==this.fill)a.moveTo(0,b),a.curveTo(0,2*b,d,2*b,d,b),f||(a.stroke(),a.begin());f||(a.moveTo(0,b),a.curveTo(0,-b/3,d,-b/3,d,b),a.lineTo(d,e-b),a.curveTo(d,e+b/3,0,e+b/3,0,e-b),a.close())};function mxConnector(a,b,c){mxPolyline.call(this,a,b,c)}mxUtils.extend(mxConnector,mxPolyline);\nmxConnector.prototype.updateBoundingBox=function(){this.useSvgBoundingBox=null!=this.style&&1==this.style[mxConstants.STYLE_CURVED];mxShape.prototype.updateBoundingBox.apply(this,arguments)};mxConnector.prototype.paintEdgeShape=function(a,b){var c=this.createMarker(a,b,!0),d=this.createMarker(a,b,!1);mxPolyline.prototype.paintEdgeShape.apply(this,arguments);a.setFillColor(this.stroke);a.setShadow(!1);a.setDashed(!1);null!=c&&c();null!=d&&d()};\nmxConnector.prototype.createMarker=function(a,b,c){var d=null,e=b.length,f=mxUtils.getValue(this.style,c?mxConstants.STYLE_STARTARROW:mxConstants.STYLE_ENDARROW),g=c?b[1]:b[e-2];b=c?b[0]:b[e-1];if(null!=f&&null!=g&&null!=b){d=b.x-g.x;e=b.y-g.y;var k=Math.sqrt(d*d+e*e);g=d/k;d=e/k;e=mxUtils.getNumber(this.style,c?mxConstants.STYLE_STARTSIZE:mxConstants.STYLE_ENDSIZE,mxConstants.DEFAULT_MARKERSIZE);d=mxMarker.createMarker(a,this,f,b,g,d,e,c,this.strokewidth,0!=this.style[c?mxConstants.STYLE_STARTFILL:\nmxConstants.STYLE_ENDFILL])}return d};\nmxConnector.prototype.augmentBoundingBox=function(a){mxShape.prototype.augmentBoundingBox.apply(this,arguments);var b=0;mxUtils.getValue(this.style,mxConstants.STYLE_STARTARROW,mxConstants.NONE)!=mxConstants.NONE&&(b=mxUtils.getNumber(this.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_MARKERSIZE)+1);mxUtils.getValue(this.style,mxConstants.STYLE_ENDARROW,mxConstants.NONE)!=mxConstants.NONE&&(b=Math.max(b,mxUtils.getNumber(this.style,mxConstants.STYLE_ENDSIZE,mxConstants.DEFAULT_MARKERSIZE))+\n1);a.grow(b*this.scale)};function mxSwimlane(a,b,c,d){mxShape.call(this);this.bounds=a;this.fill=b;this.stroke=c;this.strokewidth=null!=d?d:1}mxUtils.extend(mxSwimlane,mxShape);mxSwimlane.prototype.imageSize=16;mxSwimlane.prototype.apply=function(a){mxShape.prototype.apply.apply(this,arguments);null!=this.style&&(this.laneFill=mxUtils.getValue(this.style,mxConstants.STYLE_SWIMLANE_FILLCOLOR,mxConstants.NONE))};mxSwimlane.prototype.isRoundable=function(){return!0};\nmxSwimlane.prototype.getTitleSize=function(){return Math.max(0,mxUtils.getValue(this.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE))};\nmxSwimlane.prototype.getLabelBounds=function(a){var b=1==mxUtils.getValue(this.style,mxConstants.STYLE_FLIPH,0),c=1==mxUtils.getValue(this.style,mxConstants.STYLE_FLIPV,0);a=new mxRectangle(a.x,a.y,a.width,a.height);var d=this.isHorizontal(),e=this.getTitleSize(),f=this.direction==mxConstants.DIRECTION_NORTH||this.direction==mxConstants.DIRECTION_SOUTH;d=d==!f;b=!d&&b!=(this.direction==mxConstants.DIRECTION_SOUTH||this.direction==mxConstants.DIRECTION_WEST);c=d&&c!=(this.direction==mxConstants.DIRECTION_SOUTH||\nthis.direction==mxConstants.DIRECTION_WEST);if(f){e=Math.min(a.width,e*this.scale);if(b||c)a.x+=a.width-e;a.width=e}else{e=Math.min(a.height,e*this.scale);if(b||c)a.y+=a.height-e;a.height=e}return a};mxSwimlane.prototype.getGradientBounds=function(a,b,c,d,e){a=this.getTitleSize();return this.isHorizontal()?new mxRectangle(b,c,d,Math.min(a,e)):new mxRectangle(b,c,Math.min(a,d),e)};\nmxSwimlane.prototype.getSwimlaneArcSize=function(a,b,c){if(\"1\"==mxUtils.getValue(this.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0))return Math.min(a/2,Math.min(b/2,mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2));a=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100;return c*a*3};mxSwimlane.prototype.isHorizontal=function(){return 1==mxUtils.getValue(this.style,mxConstants.STYLE_HORIZONTAL,1)};\nmxSwimlane.prototype.paintVertexShape=function(a,b,c,d,e){if(!this.outline){var f=this.getTitleSize(),g=0;f=this.isHorizontal()?Math.min(f,e):Math.min(f,d);a.translate(b,c);this.isRounded?(g=this.getSwimlaneArcSize(d,e,f),g=Math.min((this.isHorizontal()?e:d)-f,Math.min(f,g)),this.paintRoundedSwimlane(a,b,c,d,e,f,g)):this.paintSwimlane(a,b,c,d,e,f);var k=mxUtils.getValue(this.style,mxConstants.STYLE_SEPARATORCOLOR,mxConstants.NONE);this.paintSeparator(a,b,c,d,e,f,k);null!=this.image&&(e=this.getImageBounds(b,\nc,d,e),k=mxUtils.getValue(this.style,mxConstants.STYLE_CLIP_PATH,null),a.image(e.x-b,e.y-c,e.width,e.height,this.image,!1,!1,!1,k));this.glass&&(a.setShadow(!1),this.paintGlassEffect(a,0,0,d,f,g))}};\nmxSwimlane.prototype.configurePointerEvents=function(a){var b=!0,c=!0,d=!0;null!=this.style&&(b=\"1\"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,\"1\"),c=1==mxUtils.getValue(this.style,mxConstants.STYLE_SWIMLANE_HEAD,1),d=1==mxUtils.getValue(this.style,mxConstants.STYLE_SWIMLANE_BODY,1));(b||c||d)&&mxShape.prototype.configurePointerEvents.apply(this,arguments)};\nmxSwimlane.prototype.paintSwimlane=function(a,b,c,d,e,f){var g=this.laneFill,k=!0,l=!0,m=!0,n=!0;null!=this.style&&(k=\"1\"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,\"1\"),l=1==mxUtils.getValue(this.style,mxConstants.STYLE_SWIMLANE_LINE,1),m=1==mxUtils.getValue(this.style,mxConstants.STYLE_SWIMLANE_HEAD,1),n=1==mxUtils.getValue(this.style,mxConstants.STYLE_SWIMLANE_BODY,1));this.isHorizontal()?(a.begin(),a.moveTo(0,f),a.lineTo(0,0),a.lineTo(d,0),a.lineTo(d,f),m?a.fillAndStroke():\na.fill(),f<e&&(g!=mxConstants.NONE&&k||(a.pointerEvents=!1),g!=mxConstants.NONE&&a.setFillColor(g),a.begin(),a.moveTo(0,f),a.lineTo(0,e),a.lineTo(d,e),a.lineTo(d,f),n?g==mxConstants.NONE?a.stroke():n&&a.fillAndStroke():g!=mxConstants.NONE&&a.fill())):(a.begin(),a.moveTo(f,0),a.lineTo(0,0),a.lineTo(0,e),a.lineTo(f,e),m?a.fillAndStroke():a.fill(),f<d&&(g!=mxConstants.NONE&&k||(a.pointerEvents=!1),g!=mxConstants.NONE&&a.setFillColor(g),a.begin(),a.moveTo(f,0),a.lineTo(d,0),a.lineTo(d,e),a.lineTo(f,e),\nn?g==mxConstants.NONE?a.stroke():n&&a.fillAndStroke():g!=mxConstants.NONE&&a.fill()));l&&this.paintDivider(a,b,c,d,e,f,g==mxConstants.NONE)};\nmxSwimlane.prototype.paintRoundedSwimlane=function(a,b,c,d,e,f,g){var k=this.laneFill,l=!0,m=!0,n=!0,p=!0;null!=this.style&&(l=\"1\"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,\"1\"),m=1==mxUtils.getValue(this.style,mxConstants.STYLE_SWIMLANE_LINE,1),n=1==mxUtils.getValue(this.style,mxConstants.STYLE_SWIMLANE_HEAD,1),p=1==mxUtils.getValue(this.style,mxConstants.STYLE_SWIMLANE_BODY,1));this.isHorizontal()?(a.begin(),a.moveTo(d,f),a.lineTo(d,g),a.quadTo(d,0,d-Math.min(d/2,g),0),a.lineTo(Math.min(d/\n2,g),0),a.quadTo(0,0,0,g),a.lineTo(0,f),n?a.fillAndStroke():a.fill(),f<e&&(k!=mxConstants.NONE&&l||(a.pointerEvents=!1),k!=mxConstants.NONE&&a.setFillColor(k),a.begin(),a.moveTo(0,f),a.lineTo(0,e-g),a.quadTo(0,e,Math.min(d/2,g),e),a.lineTo(d-Math.min(d/2,g),e),a.quadTo(d,e,d,e-g),a.lineTo(d,f),p?k==mxConstants.NONE?a.stroke():p&&a.fillAndStroke():k!=mxConstants.NONE&&a.fill())):(a.begin(),a.moveTo(f,0),a.lineTo(g,0),a.quadTo(0,0,0,Math.min(e/2,g)),a.lineTo(0,e-Math.min(e/2,g)),a.quadTo(0,e,g,e),a.lineTo(f,\ne),n?a.fillAndStroke():a.fill(),f<d&&(k!=mxConstants.NONE&&l||(a.pointerEvents=!1),k!=mxConstants.NONE&&a.setFillColor(k),a.begin(),a.moveTo(f,e),a.lineTo(d-g,e),a.quadTo(d,e,d,e-Math.min(e/2,g)),a.lineTo(d,Math.min(e/2,g)),a.quadTo(d,0,d-g,0),a.lineTo(f,0),p?k==mxConstants.NONE?a.stroke():p&&a.fillAndStroke():k!=mxConstants.NONE&&a.fill()));m&&this.paintDivider(a,b,c,d,e,f,k==mxConstants.NONE)};\nmxSwimlane.prototype.paintDivider=function(a,b,c,d,e,f,g){0!=f&&(g||a.setShadow(!1),a.begin(),this.isHorizontal()?(a.moveTo(0,f),a.lineTo(d,f)):(a.moveTo(f,0),a.lineTo(f,e)),a.stroke())};mxSwimlane.prototype.paintSeparator=function(a,b,c,d,e,f,g){g!=mxConstants.NONE&&(a.setStrokeColor(g),a.setDashed(!0),a.begin(),this.isHorizontal()?(a.moveTo(d,f),a.lineTo(d,e)):(a.moveTo(f,0),a.lineTo(d,0)),a.stroke(),a.setDashed(!1))};\nmxSwimlane.prototype.getImageBounds=function(a,b,c,d){return this.isHorizontal()?new mxRectangle(a+c-this.imageSize,b,this.imageSize,this.imageSize):new mxRectangle(a,b,this.imageSize,this.imageSize)};function mxGraphLayout(a){this.graph=a}mxGraphLayout.prototype.graph=null;mxGraphLayout.prototype.useBoundingBox=!0;mxGraphLayout.prototype.parent=null;mxGraphLayout.prototype.moveCell=function(a,b,c){};mxGraphLayout.prototype.resizeCell=function(a,b){};mxGraphLayout.prototype.execute=function(a){};\nmxGraphLayout.prototype.getGraph=function(){return this.graph};mxGraphLayout.prototype.getConstraint=function(a,b,c,d){return this.graph.getCurrentCellStyle(b)[a]};\nmxGraphLayout.traverse=function(a,b,c,d,e){if(null!=c&&null!=a&&(b=null!=b?b:!0,e=e||new mxDictionary,!e.get(a)&&(e.put(a,!0),d=c(a,d),null==d||d))&&(d=this.graph.model.getEdgeCount(a),0<d))for(var f=0;f<d;f++){var g=this.graph.model.getEdgeAt(a,f),k=this.graph.model.getTerminal(g,!0)==a;if(!b||k)k=this.graph.view.getVisibleTerminal(g,!k),this.traverse(k,b,c,g,e)}};\nmxGraphLayout.prototype.isAncestor=function(a,b,c){if(!c)return this.graph.model.getParent(b)==a;if(b==a)return!1;for(;null!=b&&b!=a;)b=this.graph.model.getParent(b);return b==a};mxGraphLayout.prototype.isVertexMovable=function(a){return this.graph.isCellMovable(a)};mxGraphLayout.prototype.isVertexIgnored=function(a){return!this.graph.getModel().isVertex(a)||!this.graph.getModel().isVisible(a)};\nmxGraphLayout.prototype.isEdgeIgnored=function(a){var b=this.graph.getModel();return!b.isEdge(a)||!this.graph.getModel().isVisible(a)||null==b.getTerminal(a,!0)||null==b.getTerminal(a,!1)};mxGraphLayout.prototype.setEdgeStyleEnabled=function(a,b){this.graph.setCellStyles(mxConstants.STYLE_NOEDGESTYLE,b?\"0\":\"1\",[a])};mxGraphLayout.prototype.setOrthogonalEdge=function(a,b){this.graph.setCellStyles(mxConstants.STYLE_ORTHOGONAL,b?\"1\":\"0\",[a])};\nmxGraphLayout.prototype.getParentOffset=function(a){var b=new mxPoint;if(null!=a&&a!=this.parent){var c=this.graph.getModel();if(c.isAncestor(this.parent,a))for(var d=c.getGeometry(a);a!=this.parent;)b.x+=d.x,b.y+=d.y,a=c.getParent(a),d=c.getGeometry(a)}return b};\nmxGraphLayout.prototype.setEdgePoints=function(a,b){if(null!=a){var c=this.graph.model,d=c.getGeometry(a);null==d?(d=new mxGeometry,d.setRelative(!0)):d=d.clone();if(null!=this.parent&&null!=b){var e=c.getParent(a);e=this.getParentOffset(e);for(var f=0;f<b.length;f++)b[f].x-=e.x,b[f].y-=e.y}d.points=b;c.setGeometry(a,d)}};\nmxGraphLayout.prototype.setVertexLocation=function(a,b,c){var d=this.graph.getModel(),e=d.getGeometry(a),f=null;if(null!=e){f=new mxRectangle(b,c,e.width,e.height);if(this.useBoundingBox){var g=this.graph.getView().getState(a);if(null!=g&&null!=g.text&&null!=g.text.boundingBox){var k=this.graph.getView().scale,l=g.text.boundingBox;g.text.boundingBox.x<g.x&&(b+=(g.x-l.x)/k,f.width=l.width);g.text.boundingBox.y<g.y&&(c+=(g.y-l.y)/k,f.height=l.height)}}null!=this.parent&&(g=d.getParent(a),null!=g&&g!=\nthis.parent&&(g=this.getParentOffset(g),b-=g.x,c-=g.y));if(e.x!=b||e.y!=c)e=e.clone(),e.x=b,e.y=c,d.setGeometry(a,e)}return f};\nmxGraphLayout.prototype.getVertexBounds=function(a){var b=this.graph.getModel().getGeometry(a);if(this.useBoundingBox){var c=this.graph.getView().getState(a);if(null!=c&&null!=c.text&&null!=c.text.boundingBox){var d=this.graph.getView().scale,e=c.text.boundingBox,f=Math.max(c.x-e.x,0)/d,g=Math.max(c.y-e.y,0)/d;b=new mxRectangle(b.x-f,b.y-g,b.width+f+Math.max(e.x+e.width-(c.x+c.width),0)/d,b.height+g+Math.max(e.y+e.height-(c.y+c.height),0)/d)}}null!=this.parent&&(a=this.graph.getModel().getParent(a),\nb=b.clone(),null!=a&&a!=this.parent&&(a=this.getParentOffset(a),b.x+=a.x,b.y+=a.y));return new mxRectangle(b.x,b.y,b.width,b.height)};mxGraphLayout.prototype.arrangeGroups=function(a,b,c,d,e,f){return this.graph.updateGroupBounds(a,b,!0,c,d,e,f)};function WeightedCellSorter(a,b){this.cell=a;this.weightedValue=b}WeightedCellSorter.prototype.weightedValue=0;WeightedCellSorter.prototype.nudge=!1;WeightedCellSorter.prototype.visited=!1;WeightedCellSorter.prototype.rankIndex=null;\nWeightedCellSorter.prototype.cell=null;WeightedCellSorter.prototype.compare=function(a,b){return null!=a&&null!=b?b.weightedValue>a.weightedValue?-1:b.weightedValue<a.weightedValue?1:b.nudge?-1:1:0};function mxStackLayout(a,b,c,d,e,f){mxGraphLayout.call(this,a);this.horizontal=null!=b?b:!0;this.spacing=null!=c?c:0;this.x0=null!=d?d:0;this.y0=null!=e?e:0;this.border=null!=f?f:0}mxStackLayout.prototype=new mxGraphLayout;mxStackLayout.prototype.constructor=mxStackLayout;\nmxStackLayout.prototype.horizontal=null;mxStackLayout.prototype.spacing=null;mxStackLayout.prototype.x0=null;mxStackLayout.prototype.y0=null;mxStackLayout.prototype.border=0;mxStackLayout.prototype.marginTop=0;mxStackLayout.prototype.marginLeft=0;mxStackLayout.prototype.marginRight=0;mxStackLayout.prototype.marginBottom=0;mxStackLayout.prototype.keepFirstLocation=!1;mxStackLayout.prototype.fill=!1;mxStackLayout.prototype.resizeParent=!1;mxStackLayout.prototype.resizeParentMax=!1;\nmxStackLayout.prototype.resizeLast=!1;mxStackLayout.prototype.wrap=null;mxStackLayout.prototype.borderCollapse=!0;mxStackLayout.prototype.allowGaps=!1;mxStackLayout.prototype.gridSize=0;mxStackLayout.prototype.isHorizontal=function(){return this.horizontal};\nmxStackLayout.prototype.moveCell=function(a,b,c){var d=this.graph.getModel(),e=d.getParent(a),f=this.isHorizontal();if(null!=a&&null!=e){var g=0,k=d.getChildCount(e);c=f?b:c;b=this.graph.getView().getState(e);null!=b&&(c-=f?b.x:b.y);c/=this.graph.view.scale;for(b=0;b<k;b++){var l=d.getChildAt(e,b);if(l!=a&&(l=d.getGeometry(l),null!=l)){l=f?l.x+l.width/2:l.y+l.height/2;if(g<=c&&l>c)break;g=l}}f=e.getIndex(a);f=Math.max(0,b-(b>f?1:0));d.add(e,a,f)}};\nmxStackLayout.prototype.getParentSize=function(a){var b=this.graph.getModel(),c=b.getGeometry(a);null!=this.graph.container&&(null==c&&b.isLayer(a)||a==this.graph.getView().currentRoot)&&(c=new mxRectangle(0,0,this.graph.container.offsetWidth-1,this.graph.container.offsetHeight-1));return c};\nmxStackLayout.prototype.getLayoutCells=function(a){for(var b=this.graph.getModel(),c=b.getChildCount(a),d=[],e=0;e<c;e++){var f=b.getChildAt(a,e);!this.isVertexIgnored(f)&&this.isVertexMovable(f)&&d.push(f)}this.allowGaps&&d.sort(mxUtils.bind(this,function(g,k){g=this.graph.getCellGeometry(g);k=this.graph.getCellGeometry(k);return this.horizontal?g.x==k.x?0:g.x>k.x>0?1:-1:g.y==k.y?0:g.y>k.y>0?1:-1}));return d};\nmxStackLayout.prototype.snap=function(a){if(null!=this.gridSize&&0<this.gridSize&&(a=Math.max(a,this.gridSize),1<a/this.gridSize)){var b=a%this.gridSize;a+=b>this.gridSize/2?this.gridSize-b:-b}return a};\nmxStackLayout.prototype.execute=function(a){if(null!=a){var b=this.getParentSize(a),c=this.isHorizontal(),d=this.graph.getModel(),e=null;null!=b&&(e=c?b.height-this.marginTop-this.marginBottom:b.width-this.marginLeft-this.marginRight);e-=2*this.border;var f=this.x0+this.border+this.marginLeft,g=this.y0+this.border+this.marginTop;if(this.graph.isSwimlane(a)){var k=this.graph.getCellStyle(a),l=mxUtils.getNumber(k,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE);k=1==mxUtils.getValue(k,mxConstants.STYLE_HORIZONTAL,\n!0);null!=b&&(l=k?Math.min(l,b.height):Math.min(l,b.width));c==k&&(e-=l);k?g+=l:f+=l}d.beginUpdate();try{l=0;k=null;for(var m=0,n=null,p=this.getLayoutCells(a),q=0;q<p.length;q++){var r=p[q],t=d.getGeometry(r);if(null!=t){t=t.clone();null!=this.wrap&&null!=k&&(c&&k.x+k.width+t.width+2*this.spacing>this.wrap||!c&&k.y+k.height+t.height+2*this.spacing>this.wrap)&&(k=null,c?g+=l+this.spacing:f+=l+this.spacing,l=0);l=Math.max(l,c?t.height:t.width);var u=0;if(!this.borderCollapse){var x=this.graph.getCellStyle(r);\nu=mxUtils.getNumber(x,mxConstants.STYLE_STROKEWIDTH,1)}if(null!=k){var y=m+this.spacing+Math.floor(u/2);c?t.x=this.snap((this.allowGaps?Math.max(y,t.x):y)-this.marginLeft)+this.marginLeft:t.y=this.snap((this.allowGaps?Math.max(y,t.y):y)-this.marginTop)+this.marginTop}else this.keepFirstLocation||(c?t.x=this.allowGaps&&t.x>f?Math.max(this.snap(t.x-this.marginLeft)+this.marginLeft,f):f:t.y=this.allowGaps&&t.y>g?Math.max(this.snap(t.y-this.marginTop)+this.marginTop,g):g);c?t.y=g:t.x=f;this.fill&&null!=\ne&&(c?t.height=e:t.width=e);c?t.width=this.snap(t.width):t.height=this.snap(t.height);this.setChildGeometry(r,t);n=r;k=t;m=c?k.x+k.width+Math.floor(u/2):k.y+k.height+Math.floor(u/2)}}this.resizeParent&&null!=b&&null!=k&&!this.graph.isCellCollapsed(a)?this.updateParentGeometry(a,b,k):this.resizeLast&&null!=b&&null!=k&&null!=n&&(c?k.width=b.width-k.x-this.spacing-this.marginRight-this.marginLeft:k.height=b.height-k.y-this.spacing-this.marginBottom,this.setChildGeometry(n,k))}finally{d.endUpdate()}}};\nmxStackLayout.prototype.setChildGeometry=function(a,b){var c=this.graph.getCellGeometry(a);null!=c&&b.x==c.x&&b.y==c.y&&b.width==c.width&&b.height==c.height||this.graph.getModel().setGeometry(a,b)};\nmxStackLayout.prototype.updateParentGeometry=function(a,b,c){var d=this.isHorizontal(),e=this.graph.getModel(),f=b.clone();d?(c=c.x+c.width+this.marginRight+this.border,f.width=this.resizeParentMax?Math.max(f.width,c):c):(c=c.y+c.height+this.marginBottom+this.border,f.height=this.resizeParentMax?Math.max(f.height,c):c);b.x==f.x&&b.y==f.y&&b.width==f.width&&b.height==f.height||e.setGeometry(a,f)};\nfunction mxPartitionLayout(a,b,c,d){mxGraphLayout.call(this,a);this.horizontal=null!=b?b:!0;this.spacing=c||0;this.border=d||0}mxPartitionLayout.prototype=new mxGraphLayout;mxPartitionLayout.prototype.constructor=mxPartitionLayout;mxPartitionLayout.prototype.horizontal=null;mxPartitionLayout.prototype.spacing=null;mxPartitionLayout.prototype.border=null;mxPartitionLayout.prototype.resizeVertices=!0;mxPartitionLayout.prototype.isHorizontal=function(){return this.horizontal};\nmxPartitionLayout.prototype.moveCell=function(a,b,c){c=this.graph.getModel();var d=c.getParent(a);if(null!=a&&null!=d){var e,f=0,g=c.getChildCount(d);for(e=0;e<g;e++){var k=c.getChildAt(d,e);k=this.getVertexBounds(k);if(null!=k){k=k.x+k.width/2;if(f<b&&k>b)break;f=k}}b=d.getIndex(a);b=Math.max(0,e-(e>b?1:0));c.add(d,a,b)}};\nmxPartitionLayout.prototype.execute=function(a){var b=this.isHorizontal(),c=this.graph.getModel(),d=c.getGeometry(a);null!=this.graph.container&&(null==d&&c.isLayer(a)||a==this.graph.getView().currentRoot)&&(d=new mxRectangle(0,0,this.graph.container.offsetWidth-1,this.graph.container.offsetHeight-1));if(null!=d){for(var e=[],f=c.getChildCount(a),g=0;g<f;g++){var k=c.getChildAt(a,g);!this.isVertexIgnored(k)&&this.isVertexMovable(k)&&e.push(k)}f=e.length;if(0<f){var l=this.border,m=this.border,n=b?\nd.height:d.width;n-=2*this.border;a=this.graph.isSwimlane(a)?this.graph.getStartSize(a):new mxRectangle;n-=b?a.height:a.width;l+=a.width;m+=a.height;a=this.border+(f-1)*this.spacing;d=b?(d.width-l-a)/f:(d.height-m-a)/f;if(0<d){c.beginUpdate();try{for(g=0;g<f;g++){k=e[g];var p=c.getGeometry(k);null!=p&&(p=p.clone(),p.x=l,p.y=m,b?(this.resizeVertices&&(p.width=d,p.height=n),l+=d+this.spacing):(this.resizeVertices&&(p.height=d,p.width=n),m+=d+this.spacing),c.setGeometry(k,p))}}finally{c.endUpdate()}}}}};\nfunction mxCompactTreeLayout(a,b,c){mxGraphLayout.call(this,a);this.horizontal=null!=b?b:!0;this.invert=null!=c?c:!1}mxCompactTreeLayout.prototype=new mxGraphLayout;mxCompactTreeLayout.prototype.constructor=mxCompactTreeLayout;mxCompactTreeLayout.prototype.horizontal=null;mxCompactTreeLayout.prototype.invert=null;mxCompactTreeLayout.prototype.resizeParent=!0;mxCompactTreeLayout.prototype.maintainParentLocation=!1;mxCompactTreeLayout.prototype.groupPadding=10;\nmxCompactTreeLayout.prototype.groupPaddingTop=0;mxCompactTreeLayout.prototype.groupPaddingRight=0;mxCompactTreeLayout.prototype.groupPaddingBottom=0;mxCompactTreeLayout.prototype.groupPaddingLeft=0;mxCompactTreeLayout.prototype.parentsChanged=null;mxCompactTreeLayout.prototype.moveTree=!1;mxCompactTreeLayout.prototype.visited=null;mxCompactTreeLayout.prototype.levelDistance=10;mxCompactTreeLayout.prototype.nodeDistance=20;mxCompactTreeLayout.prototype.resetEdges=!0;\nmxCompactTreeLayout.prototype.prefHozEdgeSep=5;mxCompactTreeLayout.prototype.prefVertEdgeOff=4;mxCompactTreeLayout.prototype.minEdgeJetty=8;mxCompactTreeLayout.prototype.channelBuffer=4;mxCompactTreeLayout.prototype.edgeRouting=!0;mxCompactTreeLayout.prototype.sortEdges=!1;mxCompactTreeLayout.prototype.alignRanks=!1;mxCompactTreeLayout.prototype.maxRankHeight=null;mxCompactTreeLayout.prototype.root=null;mxCompactTreeLayout.prototype.node=null;\nmxCompactTreeLayout.prototype.isVertexIgnored=function(a){return mxGraphLayout.prototype.isVertexIgnored.apply(this,arguments)||0==this.graph.getConnections(a).length};mxCompactTreeLayout.prototype.isHorizontal=function(){return this.horizontal};\nmxCompactTreeLayout.prototype.execute=function(a,b){this.parent=a;var c=this.graph.getModel();if(null==b)if(0<this.graph.getEdges(a,c.getParent(a),this.invert,!this.invert,!1).length)this.root=a;else{if(b=this.graph.findTreeRoots(a,!0,this.invert),0<b.length)for(var d=0;d<b.length;d++)if(!this.isVertexIgnored(b[d])&&0<this.graph.getEdges(b[d],null,this.invert,!this.invert,!1).length){this.root=b[d];break}}else this.root=b;if(null!=this.root){this.parentsChanged=this.resizeParent?{}:null;this.parentY=\nthis.parentX=null;if(a!=this.root&&null!=c.isVertex(a)&&this.maintainParentLocation){var e=this.graph.getCellGeometry(a);null!=e&&(this.parentX=e.x,this.parentY=e.y)}c.beginUpdate();try{if(this.visited={},this.node=this.dfs(this.root,a),this.alignRanks&&(this.maxRankHeight=[],this.findRankHeights(this.node,0),this.setCellHeights(this.node,0)),null!=this.node){this.layout(this.node);var f=this.graph.gridSize;b=f;if(!this.moveTree){var g=this.getVertexBounds(this.root);null!=g&&(f=g.x,b=g.y)}g=null;\ng=this.isHorizontal()?this.horizontalLayout(this.node,f,b):this.verticalLayout(this.node,null,f,b);if(null!=g){var k=d=0;0>g.x&&(d=Math.abs(f-g.x));0>g.y&&(k=Math.abs(b-g.y));0==d&&0==k||this.moveNode(this.node,d,k);this.resizeParent&&this.adjustParents();this.edgeRouting&&this.localEdgeProcessing(this.node)}null!=this.parentX&&null!=this.parentY&&(e=this.graph.getCellGeometry(a),null!=e&&(e=e.clone(),e.x=this.parentX,e.y=this.parentY,c.setGeometry(a,e)))}}finally{c.endUpdate()}}};\nmxCompactTreeLayout.prototype.moveNode=function(a,b,c){a.x+=b;a.y+=c;this.apply(a);for(a=a.child;null!=a;)this.moveNode(a,b,c),a=a.next};\nmxCompactTreeLayout.prototype.sortOutgoingEdges=function(a,b){var c=new mxDictionary;b.sort(function(d,e){var f=d.getTerminal(d.getTerminal(!1)==a);d=c.get(f);null==d&&(d=mxCellPath.create(f).split(mxCellPath.PATH_SEPARATOR),c.put(f,d));e=e.getTerminal(e.getTerminal(!1)==a);f=c.get(e);null==f&&(f=mxCellPath.create(e).split(mxCellPath.PATH_SEPARATOR),c.put(e,f));return mxCellPath.compare(d,f)})};\nmxCompactTreeLayout.prototype.findRankHeights=function(a,b){if(null==this.maxRankHeight[b]||this.maxRankHeight[b]<a.height)this.maxRankHeight[b]=a.height;for(a=a.child;null!=a;)this.findRankHeights(a,b+1),a=a.next};mxCompactTreeLayout.prototype.setCellHeights=function(a,b){null!=this.maxRankHeight[b]&&this.maxRankHeight[b]>a.height&&(a.height=this.maxRankHeight[b]);for(a=a.child;null!=a;)this.setCellHeights(a,b+1),a=a.next};\nmxCompactTreeLayout.prototype.dfs=function(a,b){var c=mxCellPath.create(a),d=null;if(null!=a&&null==this.visited[c]&&!this.isVertexIgnored(a)){this.visited[c]=a;d=this.createNode(a);c=this.graph.getModel();var e=null,f=this.graph.getEdges(a,b,this.invert,!this.invert,!1,!0),g=this.graph.getView();this.sortEdges&&this.sortOutgoingEdges(a,f);for(a=0;a<f.length;a++){var k=f[a];if(!this.isEdgeIgnored(k)){this.resetEdges&&this.setEdgePoints(k,null);this.edgeRouting&&(this.setEdgeStyleEnabled(k,!1),this.setEdgePoints(k,\nnull));var l=g.getState(k);k=null!=l?l.getVisibleTerminal(this.invert):g.getVisibleTerminal(k,this.invert);l=this.dfs(k,b);null!=l&&null!=c.getGeometry(k)&&(null==e?d.child=l:e.next=l,e=l)}}}return d};mxCompactTreeLayout.prototype.layout=function(a){if(null!=a){for(var b=a.child;null!=b;)this.layout(b),b=b.next;null!=a.child?this.attachParent(a,this.join(a)):this.layoutLeaf(a)}};\nmxCompactTreeLayout.prototype.horizontalLayout=function(a,b,c,d){a.x+=b+a.offsetX;a.y+=c+a.offsetY;d=this.apply(a,d);b=a.child;if(null!=b){d=this.horizontalLayout(b,a.x,a.y,d);c=a.y+b.offsetY;for(var e=b.next;null!=e;)d=this.horizontalLayout(e,a.x+b.offsetX,c,d),c+=e.offsetY,e=e.next}return d};\nmxCompactTreeLayout.prototype.verticalLayout=function(a,b,c,d,e){a.x+=c+a.offsetY;a.y+=d+a.offsetX;e=this.apply(a,e);b=a.child;if(null!=b)for(e=this.verticalLayout(b,a,a.x,a.y,e),c=a.x+b.offsetY,d=b.next;null!=d;)e=this.verticalLayout(d,a,c,a.y+b.offsetX,e),c+=d.offsetY,d=d.next;return e};\nmxCompactTreeLayout.prototype.attachParent=function(a,b){var c=this.nodeDistance+this.levelDistance,d=(b-a.width)/2-this.nodeDistance;b=d+a.width+2*this.nodeDistance-b;a.child.offsetX=c+a.height;a.child.offsetY=b;a.contour.upperHead=this.createLine(a.height,0,this.createLine(c,b,a.contour.upperHead));a.contour.lowerHead=this.createLine(a.height,0,this.createLine(c,d,a.contour.lowerHead))};\nmxCompactTreeLayout.prototype.layoutLeaf=function(a){var b=2*this.nodeDistance;a.contour.upperTail=this.createLine(a.height+b,0);a.contour.upperHead=a.contour.upperTail;a.contour.lowerTail=this.createLine(0,-a.width-b);a.contour.lowerHead=this.createLine(a.height+b,0,a.contour.lowerTail)};\nmxCompactTreeLayout.prototype.join=function(a){var b=2*this.nodeDistance,c=a.child;a.contour=c.contour;var d=c.width+b,e=d;for(c=c.next;null!=c;){var f=this.merge(a.contour,c.contour);c.offsetY=f+d;c.offsetX=0;d=c.width+b;e+=f+d;c=c.next}return e};\nmxCompactTreeLayout.prototype.merge=function(a,b){for(var c=0,d=0,e=0,f=a.lowerHead,g=b.upperHead;null!=g&&null!=f;){var k=this.offset(c,d,g.dx,g.dy,f.dx,f.dy);d+=k;e+=k;c+g.dx<=f.dx?(c+=g.dx,d+=g.dy,g=g.next):(c-=f.dx,d-=f.dy,f=f.next)}null!=g?(c=this.bridge(a.upperTail,0,0,g,c,d),a.upperTail=null!=c.next?b.upperTail:c,a.lowerTail=b.lowerTail):(c=this.bridge(b.lowerTail,c,d,f,0,0),null==c.next&&(a.lowerTail=c));a.lowerHead=b.lowerHead;return e};\nmxCompactTreeLayout.prototype.offset=function(a,b,c,d,e,f){if(e<=a||0>=a+c)return 0;a=0<e*d-c*f?0>a?a*d/c-b:0<a?a*f/e-b:-b:e<a+c?f-(b+(e-a)*d/c):e>a+c?(c+a)*f/e-(b+d):f-(b+d);return 0<a?a:0};mxCompactTreeLayout.prototype.bridge=function(a,b,c,d,e,f){b=e+d.dx-b;0==d.dx?e=d.dy:(e=b*d.dy,e/=d.dx);b=this.createLine(b,e,d.next);a.next=this.createLine(0,f+d.dy-e-c,b);return b};\nmxCompactTreeLayout.prototype.createNode=function(a){var b={};b.cell=a;b.x=0;b.y=0;b.width=0;b.height=0;a=this.getVertexBounds(a);null!=a&&(this.isHorizontal()?(b.width=a.height,b.height=a.width):(b.width=a.width,b.height=a.height));b.offsetX=0;b.offsetY=0;b.contour={};return b};\nmxCompactTreeLayout.prototype.apply=function(a,b){var c=this.graph.getModel(),d=a.cell,e=c.getGeometry(d);null!=d&&null!=e&&(this.isVertexMovable(d)&&(e=this.setVertexLocation(d,a.x,a.y),this.resizeParent&&(a=c.getParent(d),c=mxCellPath.create(a),null==this.parentsChanged[c]&&(this.parentsChanged[c]=a))),b=null==b?new mxRectangle(e.x,e.y,e.width,e.height):new mxRectangle(Math.min(b.x,e.x),Math.min(b.y,e.y),Math.max(b.x+b.width,e.x+e.width),Math.max(b.y+b.height,e.y+e.height)));return b};\nmxCompactTreeLayout.prototype.createLine=function(a,b,c){var d={};d.dx=a;d.dy=b;d.next=c;return d};mxCompactTreeLayout.prototype.adjustParents=function(){var a=[],b;for(b in this.parentsChanged)a.push(this.parentsChanged[b]);this.arrangeGroups(mxUtils.sortCells(a,!0),this.groupPadding,this.groupPaddingTop,this.groupPaddingRight,this.groupPaddingBottom,this.groupPaddingLeft)};\nmxCompactTreeLayout.prototype.localEdgeProcessing=function(a){this.processNodeOutgoing(a);for(a=a.child;null!=a;)this.localEdgeProcessing(a),a=a.next};\nmxCompactTreeLayout.prototype.processNodeOutgoing=function(a){for(var b=a.child,c=a.cell,d=0,e=[];null!=b;){d++;var f=b.x;this.horizontal&&(f=b.y);e.push(new WeightedCellSorter(b,f));b=b.next}e.sort(WeightedCellSorter.prototype.compare);f=a.width;var g=(d+1)*this.prefHozEdgeSep;f>g+2*this.prefHozEdgeSep&&(f-=2*this.prefHozEdgeSep);a=f/d;b=a/2;f>g+2*this.prefHozEdgeSep&&(b+=this.prefHozEdgeSep);f=this.minEdgeJetty-this.prefVertEdgeOff;g=this.getVertexBounds(c);for(var k=0;k<e.length;k++){var l=e[k].cell.cell,\nm=this.getVertexBounds(l);l=this.graph.getEdgesBetween(c,l,!1);for(var n=[],p,q,r=0;r<l.length;r++)this.horizontal?(p=g.x+g.width,q=g.y+b,n.push(new mxPoint(p,q)),p=g.x+g.width+f,n.push(new mxPoint(p,q)),q=m.y+m.height/2):(p=g.x+b,q=g.y+g.height,n.push(new mxPoint(p,q)),q=g.y+g.height+f,n.push(new mxPoint(p,q)),p=m.x+m.width/2),n.push(new mxPoint(p,q)),this.setEdgePoints(l[r],n);k<d/2?f+=this.prefVertEdgeOff:k>d/2&&(f-=this.prefVertEdgeOff);b+=a}};\nfunction mxRadialTreeLayout(a){mxCompactTreeLayout.call(this,a,!1)}mxUtils.extend(mxRadialTreeLayout,mxCompactTreeLayout);mxRadialTreeLayout.prototype.angleOffset=.5;mxRadialTreeLayout.prototype.rootx=0;mxRadialTreeLayout.prototype.rooty=0;mxRadialTreeLayout.prototype.levelDistance=120;mxRadialTreeLayout.prototype.nodeDistance=10;mxRadialTreeLayout.prototype.autoRadius=!1;mxRadialTreeLayout.prototype.sortEdges=!1;mxRadialTreeLayout.prototype.rowMinX=[];mxRadialTreeLayout.prototype.rowMaxX=[];\nmxRadialTreeLayout.prototype.rowMinCenX=[];mxRadialTreeLayout.prototype.rowMaxCenX=[];mxRadialTreeLayout.prototype.rowRadi=[];mxRadialTreeLayout.prototype.row=[];mxRadialTreeLayout.prototype.isVertexIgnored=function(a){return mxGraphLayout.prototype.isVertexIgnored.apply(this,arguments)||0==this.graph.getConnections(a).length};\nmxRadialTreeLayout.prototype.execute=function(a,b){this.parent=a;this.edgeRouting=this.useBoundingBox=!1;mxCompactTreeLayout.prototype.execute.apply(this,arguments);var c=null,d=this.getVertexBounds(this.root);this.centerX=d.x+d.width/2;this.centerY=d.y+d.height/2;for(var e in this.visited){var f=this.getVertexBounds(this.visited[e]);c=null!=c?c:f.clone();c.add(f)}this.calcRowDims([this.node],0);var g=0,k=0;for(c=0;c<this.row.length;c++)e=(this.rowMaxX[c]-this.centerX-this.nodeDistance)/this.rowRadi[c],\ng=Math.max(g,(this.centerX-this.rowMinX[c]-this.nodeDistance)/this.rowRadi[c]),k=Math.max(k,e);for(c=0;c<this.row.length;c++){var l=this.centerX-this.nodeDistance-g*this.rowRadi[c],m=this.centerX+this.nodeDistance+k*this.rowRadi[c]-l;for(e=0;e<this.row[c].length;e++)f=this.row[c],d=f[e],f=this.getVertexBounds(d.cell),d.theta=(f.x+f.width/2-l)/m*Math.PI*2}for(c=this.row.length-2;0<=c;c--)for(f=this.row[c],e=0;e<f.length;e++){d=f[e];g=d.child;for(l=k=0;null!=g;)l+=g.theta,k++,g=g.next;0<k&&(g=l/k,g>\nd.theta&&e<f.length-1?d.theta=Math.min(g,f[e+1].theta-Math.PI/10):g<d.theta&&0<e&&(d.theta=Math.max(g,f[e-1].theta+Math.PI/10)))}for(c=0;c<this.row.length;c++)for(e=0;e<this.row[c].length;e++)f=this.row[c],d=f[e],f=this.getVertexBounds(d.cell),this.setVertexLocation(d.cell,this.centerX-f.width/2+this.rowRadi[c]*Math.cos(d.theta),this.centerY-f.height/2+this.rowRadi[c]*Math.sin(d.theta))};\nmxRadialTreeLayout.prototype.calcRowDims=function(a,b){if(null!=a&&0!=a.length){this.rowMinX[b]=this.centerX;this.rowMaxX[b]=this.centerX;this.rowMinCenX[b]=this.centerX;this.rowMaxCenX[b]=this.centerX;this.row[b]=[];for(var c=!1,d=0;d<a.length;d++)for(var e=null!=a[d]?a[d].child:null;null!=e;){var f=this.getVertexBounds(e.cell);this.rowMinX[b]=Math.min(f.x,this.rowMinX[b]);this.rowMaxX[b]=Math.max(f.x+f.width,this.rowMaxX[b]);this.rowMinCenX[b]=Math.min(f.x+f.width/2,this.rowMinCenX[b]);this.rowMaxCenX[b]=\nMath.max(f.x+f.width/2,this.rowMaxCenX[b]);this.rowRadi[b]=f.y-this.getVertexBounds(this.root).y;null!=e.child&&(c=!0);this.row[b].push(e);e=e.next}c&&this.calcRowDims(this.row[b],b+1)}};function mxFastOrganicLayout(a){mxGraphLayout.call(this,a)}mxFastOrganicLayout.prototype=new mxGraphLayout;mxFastOrganicLayout.prototype.constructor=mxFastOrganicLayout;mxFastOrganicLayout.prototype.useInputOrigin=!0;mxFastOrganicLayout.prototype.resetEdges=!0;mxFastOrganicLayout.prototype.disableEdgeStyle=!0;\nmxFastOrganicLayout.prototype.forceConstant=50;mxFastOrganicLayout.prototype.forceConstantSquared=0;mxFastOrganicLayout.prototype.minDistanceLimit=2;mxFastOrganicLayout.prototype.maxDistanceLimit=500;mxFastOrganicLayout.prototype.minDistanceLimitSquared=4;mxFastOrganicLayout.prototype.initialTemp=200;mxFastOrganicLayout.prototype.temperature=0;mxFastOrganicLayout.prototype.maxIterations=0;mxFastOrganicLayout.prototype.iteration=0;mxFastOrganicLayout.prototype.allowedToRun=!0;\nmxFastOrganicLayout.prototype.isVertexIgnored=function(a){return mxGraphLayout.prototype.isVertexIgnored.apply(this,arguments)||0==this.graph.getConnections(a).length};\nmxFastOrganicLayout.prototype.execute=function(a){var b=this.graph.getModel();this.vertexArray=[];for(var c=this.graph.getChildVertices(a),d=0;d<c.length;d++)this.isVertexIgnored(c[d])||this.vertexArray.push(c[d]);var e=this.useInputOrigin?this.graph.getBoundingBoxFromGeometry(this.vertexArray):null,f=this.vertexArray.length;this.indices=[];this.dispX=[];this.dispY=[];this.cellLocation=[];this.isMoveable=[];this.neighbours=[];this.radius=[];this.radiusSquared=[];.001>this.forceConstant&&(this.forceConstant=\n.001);this.forceConstantSquared=this.forceConstant*this.forceConstant;for(d=0;d<this.vertexArray.length;d++){var g=this.vertexArray[d];this.cellLocation[d]=[];var k=mxObjectIdentity.get(g);this.indices[k]=d;var l=this.getVertexBounds(g),m=l.width,n=l.height,p=l.x,q=l.y;this.cellLocation[d][0]=p+m/2;this.cellLocation[d][1]=q+n/2;this.radius[d]=Math.min(m,n);this.radiusSquared[d]=this.radius[d]*this.radius[d]}b.beginUpdate();try{for(d=0;d<f;d++){this.dispX[d]=0;this.dispY[d]=0;this.isMoveable[d]=this.isVertexMovable(this.vertexArray[d]);\nvar r=this.graph.getConnections(this.vertexArray[d],a);c=this.graph.getOpposites(r,this.vertexArray[d]);this.neighbours[d]=[];for(m=0;m<c.length;m++){this.resetEdges&&this.graph.resetEdge(r[m]);this.disableEdgeStyle&&this.setEdgeStyleEnabled(r[m],!1);k=mxObjectIdentity.get(c[m]);var t=this.indices[k];this.neighbours[d][m]=null!=t?t:d}}this.temperature=this.initialTemp;0==this.maxIterations&&(this.maxIterations=20*Math.sqrt(f));for(this.iteration=0;this.iteration<this.maxIterations;this.iteration++){if(!this.allowedToRun)return;\nthis.calcRepulsion();this.calcAttraction();this.calcPositions();this.reduceTemperature()}a=c=null;for(d=0;d<this.vertexArray.length;d++)g=this.vertexArray[d],this.isVertexMovable(g)&&(l=this.getVertexBounds(g),null!=l&&(this.cellLocation[d][0]-=l.width/2,this.cellLocation[d][1]-=l.height/2,p=this.graph.snap(Math.round(this.cellLocation[d][0])),q=this.graph.snap(Math.round(this.cellLocation[d][1])),this.setVertexLocation(g,p,q),c=null==c?p:Math.min(c,p),a=null==a?q:Math.min(a,q)));d=-(c||0)+1;g=-(a||\n0)+1;null!=e&&(d+=e.x,g+=e.y);this.graph.moveCells(this.vertexArray,d,g)}finally{b.endUpdate()}};mxFastOrganicLayout.prototype.calcPositions=function(){for(var a=0;a<this.vertexArray.length;a++)if(this.isMoveable[a]){var b=Math.sqrt(this.dispX[a]*this.dispX[a]+this.dispY[a]*this.dispY[a]);.001>b&&(b=.001);var c=this.dispX[a]/b*Math.min(b,this.temperature);b=this.dispY[a]/b*Math.min(b,this.temperature);this.dispX[a]=0;this.dispY[a]=0;this.cellLocation[a][0]+=c;this.cellLocation[a][1]+=b}};\nmxFastOrganicLayout.prototype.calcAttraction=function(){for(var a=0;a<this.vertexArray.length;a++)for(var b=0;b<this.neighbours[a].length;b++){var c=this.neighbours[a][b];if(a!=c&&this.isMoveable[a]&&this.isMoveable[c]){var d=this.cellLocation[a][0]-this.cellLocation[c][0],e=this.cellLocation[a][1]-this.cellLocation[c][1],f=d*d+e*e-this.radiusSquared[a]-this.radiusSquared[c];f<this.minDistanceLimitSquared&&(f=this.minDistanceLimitSquared);var g=Math.sqrt(f);f/=this.forceConstant;d=d/g*f;e=e/g*f;this.dispX[a]-=\nd;this.dispY[a]-=e;this.dispX[c]+=d;this.dispY[c]+=e}}};\nmxFastOrganicLayout.prototype.calcRepulsion=function(){for(var a=this.vertexArray.length,b=0;b<a;b++)for(var c=b;c<a;c++){if(!this.allowedToRun)return;if(c!=b&&this.isMoveable[b]&&this.isMoveable[c]){var d=this.cellLocation[b][0]-this.cellLocation[c][0],e=this.cellLocation[b][1]-this.cellLocation[c][1];0==d&&(d=.01+Math.random());0==e&&(e=.01+Math.random());var f=Math.sqrt(d*d+e*e),g=f-this.radius[b]-this.radius[c];g>this.maxDistanceLimit||(g<this.minDistanceLimit&&(g=this.minDistanceLimit),g=this.forceConstantSquared/\ng,d=d/f*g,e=e/f*g,this.dispX[b]+=d,this.dispY[b]+=e,this.dispX[c]-=d,this.dispY[c]-=e)}}};mxFastOrganicLayout.prototype.reduceTemperature=function(){this.temperature=this.initialTemp*(1-this.iteration/this.maxIterations)};function mxCircleLayout(a,b){mxGraphLayout.call(this,a);this.radius=null!=b?b:100}mxCircleLayout.prototype=new mxGraphLayout;mxCircleLayout.prototype.constructor=mxCircleLayout;mxCircleLayout.prototype.radius=null;mxCircleLayout.prototype.moveCircle=!1;\nmxCircleLayout.prototype.x0=0;mxCircleLayout.prototype.y0=0;mxCircleLayout.prototype.resetEdges=!0;mxCircleLayout.prototype.disableEdgeStyle=!0;\nmxCircleLayout.prototype.execute=function(a){var b=this.graph.getModel();b.beginUpdate();try{for(var c=0,d=null,e=null,f=[],g=b.getChildCount(a),k=0;k<g;k++){var l=b.getChildAt(a,k);if(this.isVertexIgnored(l))this.isEdgeIgnored(l)||(this.resetEdges&&this.graph.resetEdge(l),this.disableEdgeStyle&&this.setEdgeStyleEnabled(l,!1));else{f.push(l);var m=this.getVertexBounds(l);d=null==d?m.y:Math.min(d,m.y);e=null==e?m.x:Math.min(e,m.x);c=Math.max(c,Math.max(m.width,m.height))}}var n=this.getRadius(f.length,\nc);this.moveCircle&&(e=this.x0,d=this.y0);this.circle(f,n,e,d)}finally{b.endUpdate()}};mxCircleLayout.prototype.getRadius=function(a,b){return Math.max(a*b/Math.PI,this.radius)};mxCircleLayout.prototype.circle=function(a,b,c,d){for(var e=a.length,f=2*Math.PI/e,g=0;g<e;g++)this.isVertexMovable(a[g])&&this.setVertexLocation(a[g],Math.round(c+b+b*Math.cos(g*f-Math.PI/2)),Math.round(d+b+b*Math.sin(g*f-Math.PI/2)))};function mxParallelEdgeLayout(a){mxGraphLayout.call(this,a)}\nmxParallelEdgeLayout.prototype=new mxGraphLayout;mxParallelEdgeLayout.prototype.constructor=mxParallelEdgeLayout;mxParallelEdgeLayout.prototype.spacing=20;mxParallelEdgeLayout.prototype.checkOverlap=!1;mxParallelEdgeLayout.prototype.execute=function(a,b){a=this.findParallels(a,b);this.graph.model.beginUpdate();try{for(var c in a){var d=a[c];1<d.length&&this.layout(d)}}finally{this.graph.model.endUpdate()}};\nmxParallelEdgeLayout.prototype.findParallels=function(a,b){var c=[],d=mxUtils.bind(this,function(g){if(!this.isEdgeIgnored(g)){var k=this.getEdgeId(g);null!=k&&(null==c[k]&&(c[k]=[]),c[k].push(g))}});if(null!=b)for(var e=0;e<b.length;e++)d(b[e]);else{b=this.graph.getModel();var f=b.getChildCount(a);for(e=0;e<f;e++)d(b.getChildAt(a,e))}return c};\nmxParallelEdgeLayout.prototype.getEdgeId=function(a){var b=this.graph.getView(),c=b.getVisibleTerminal(a,!0);b=b.getVisibleTerminal(a,!1);var d=\"\";if(null!=c&&null!=b){c=mxObjectIdentity.get(c);b=mxObjectIdentity.get(b);if(this.checkOverlap&&(a=this.graph.view.getState(a),null!=a&&null!=a.absolutePoints)){d=[];for(var e=0;e<a.absolutePoints.length;e++){var f=a.absolutePoints[e];null!=f&&d.push(f.x,f.y)}d=d.join(\",\")}return(c>b?b+\"-\"+c:c+\"-\"+b)+d}return null};\nmxParallelEdgeLayout.prototype.layout=function(a){var b=a[0],c=this.graph.view.getState(b);if(null!=c&&null!=c.absolutePoints){var d=c.absolutePoints[0];c=c.absolutePoints[c.absolutePoints.length-1];if(null!=d&&null!=c){var e=this.graph.getView(),f=this.graph.getModel(),g=f.getGeometry(e.getVisibleTerminal(b,!0));b=f.getGeometry(e.getVisibleTerminal(b,!1));if(g==b)for(c=g.x+g.width+this.spacing,d=g.y+g.height/2,g=0;g<a.length;g++)this.route(a[g],c,d),c+=this.spacing;else if(null!=g&&null!=b&&(g=this.graph.view.scale,\nb=this.graph.view.translate,d.x=d.x/g-b.x,d.y=d.y/g-b.y,c.x=c.x/g-b.x,c.y=c.y/g-b.y,g=c.x-d.x,e=c.y-d.y,b=Math.sqrt(g*g+e*e),0<b))for(c=d.x+g/2,d=d.y+e/2,e=e*this.spacing/b,b=g*this.spacing/b,c+=e*(a.length-1)/2,d-=b*(a.length-1)/2,g=0;g<a.length;g++)this.route(a[g],c,d),c-=e,d+=b}}};mxParallelEdgeLayout.prototype.route=function(a,b,c){this.graph.isCellMovable(a)&&this.setEdgePoints(a,[new mxPoint(Math.round(b),Math.round(c))])};\nfunction mxCompositeLayout(a,b,c){mxGraphLayout.call(this,a);this.layouts=b;this.master=c}mxCompositeLayout.prototype=new mxGraphLayout;mxCompositeLayout.prototype.constructor=mxCompositeLayout;mxCompositeLayout.prototype.layouts=null;mxCompositeLayout.prototype.master=null;mxCompositeLayout.prototype.moveCell=function(a,b,c){null!=this.master?this.master.moveCell.apply(this.master,arguments):this.layouts[0].moveCell.apply(this.layouts[0],arguments)};\nmxCompositeLayout.prototype.execute=function(a){var b=this.graph.getModel();b.beginUpdate();try{for(var c=0;c<this.layouts.length;c++)this.layouts[c].execute.apply(this.layouts[c],arguments)}finally{b.endUpdate()}};function mxEdgeLabelLayout(a,b){mxGraphLayout.call(this,a)}mxEdgeLabelLayout.prototype=new mxGraphLayout;mxEdgeLabelLayout.prototype.constructor=mxEdgeLabelLayout;\nmxEdgeLabelLayout.prototype.execute=function(a){for(var b=this.graph.view,c=this.graph.getModel(),d=[],e=[],f=c.getChildCount(a),g=0;g<f;g++){var k=c.getChildAt(a,g),l=b.getState(k);null!=l&&(this.isVertexIgnored(k)?this.isEdgeIgnored(k)||d.push(l):e.push(l))}this.placeLabels(e,d)};\nmxEdgeLabelLayout.prototype.placeLabels=function(a,b){var c=this.graph.getModel();c.beginUpdate();try{for(var d=0;d<b.length;d++){var e=b[d];if(null!=e&&null!=e.text&&null!=e.text.boundingBox)for(var f=0;f<a.length;f++){var g=a[f];null!=g&&this.avoid(e,g)}}}finally{c.endUpdate()}};\nmxEdgeLabelLayout.prototype.avoid=function(a,b){var c=this.graph.getModel(),d=a.text.boundingBox;if(mxUtils.intersects(d,b)){var e=-d.y-d.height+b.y,f=-d.y+b.y+b.height;e=Math.abs(e)<Math.abs(f)?e:f;f=-d.x-d.width+b.x;b=-d.x+b.x+b.width;b=Math.abs(f)<Math.abs(b)?f:b;Math.abs(b)<Math.abs(e)?e=0:b=0;d=c.getGeometry(a.cell);null!=d&&(d=d.clone(),null!=d.offset?(d.offset.x+=b,d.offset.y+=e):d.offset=new mxPoint(b,e),c.setGeometry(a.cell,d))}};\nfunction mxGraphAbstractHierarchyCell(){this.x=[];this.y=[];this.temp=[]}mxGraphAbstractHierarchyCell.prototype.maxRank=-1;mxGraphAbstractHierarchyCell.prototype.minRank=-1;mxGraphAbstractHierarchyCell.prototype.x=null;mxGraphAbstractHierarchyCell.prototype.y=null;mxGraphAbstractHierarchyCell.prototype.width=0;mxGraphAbstractHierarchyCell.prototype.height=0;mxGraphAbstractHierarchyCell.prototype.nextLayerConnectedCells=null;mxGraphAbstractHierarchyCell.prototype.previousLayerConnectedCells=null;\nmxGraphAbstractHierarchyCell.prototype.temp=null;mxGraphAbstractHierarchyCell.prototype.getNextLayerConnectedCells=function(a){return null};mxGraphAbstractHierarchyCell.prototype.getPreviousLayerConnectedCells=function(a){return null};mxGraphAbstractHierarchyCell.prototype.isEdge=function(){return!1};mxGraphAbstractHierarchyCell.prototype.isVertex=function(){return!1};mxGraphAbstractHierarchyCell.prototype.getGeneralPurposeVariable=function(a){return null};\nmxGraphAbstractHierarchyCell.prototype.setGeneralPurposeVariable=function(a,b){return null};mxGraphAbstractHierarchyCell.prototype.setX=function(a,b){this.isVertex()?this.x[0]=b:this.isEdge()&&(this.x[a-this.minRank-1]=b)};mxGraphAbstractHierarchyCell.prototype.getX=function(a){return this.isVertex()?this.x[0]:this.isEdge()?this.x[a-this.minRank-1]:0};mxGraphAbstractHierarchyCell.prototype.setY=function(a,b){this.isVertex()?this.y[0]=b:this.isEdge()&&(this.y[a-this.minRank-1]=b)};\nfunction mxGraphHierarchyNode(a){mxGraphAbstractHierarchyCell.apply(this,arguments);this.cell=a;this.id=mxObjectIdentity.get(a);this.connectsAsTarget=[];this.connectsAsSource=[]}mxGraphHierarchyNode.prototype=new mxGraphAbstractHierarchyCell;mxGraphHierarchyNode.prototype.constructor=mxGraphHierarchyNode;mxGraphHierarchyNode.prototype.cell=null;mxGraphHierarchyNode.prototype.id=null;mxGraphHierarchyNode.prototype.connectsAsTarget=null;mxGraphHierarchyNode.prototype.connectsAsSource=null;\nmxGraphHierarchyNode.prototype.hashCode=!1;mxGraphHierarchyNode.prototype.getRankValue=function(a){return this.maxRank};mxGraphHierarchyNode.prototype.getNextLayerConnectedCells=function(a){if(null==this.nextLayerConnectedCells){this.nextLayerConnectedCells=[];this.nextLayerConnectedCells[0]=[];for(var b=0;b<this.connectsAsTarget.length;b++){var c=this.connectsAsTarget[b];-1==c.maxRank||c.maxRank==a+1?this.nextLayerConnectedCells[0].push(c.source):this.nextLayerConnectedCells[0].push(c)}}return this.nextLayerConnectedCells[0]};\nmxGraphHierarchyNode.prototype.getPreviousLayerConnectedCells=function(a){if(null==this.previousLayerConnectedCells){this.previousLayerConnectedCells=[];this.previousLayerConnectedCells[0]=[];for(var b=0;b<this.connectsAsSource.length;b++){var c=this.connectsAsSource[b];-1==c.minRank||c.minRank==a-1?this.previousLayerConnectedCells[0].push(c.target):this.previousLayerConnectedCells[0].push(c)}}return this.previousLayerConnectedCells[0]};mxGraphHierarchyNode.prototype.isVertex=function(){return!0};\nmxGraphHierarchyNode.prototype.getGeneralPurposeVariable=function(a){return this.temp[0]};mxGraphHierarchyNode.prototype.setGeneralPurposeVariable=function(a,b){this.temp[0]=b};mxGraphHierarchyNode.prototype.isAncestor=function(a){if(null!=a&&null!=this.hashCode&&null!=a.hashCode&&this.hashCode.length<a.hashCode.length){if(this.hashCode==a.hashCode)return!0;if(null==this.hashCode||null==this.hashCode)return!1;for(var b=0;b<this.hashCode.length;b++)if(this.hashCode[b]!=a.hashCode[b])return!1;return!0}return!1};\nmxGraphHierarchyNode.prototype.getCoreCell=function(){return this.cell};function mxGraphHierarchyEdge(a){mxGraphAbstractHierarchyCell.apply(this,arguments);this.edges=a;this.ids=[];for(var b=0;b<a.length;b++)this.ids.push(mxObjectIdentity.get(a[b]))}mxGraphHierarchyEdge.prototype=new mxGraphAbstractHierarchyCell;mxGraphHierarchyEdge.prototype.constructor=mxGraphHierarchyEdge;mxGraphHierarchyEdge.prototype.edges=null;mxGraphHierarchyEdge.prototype.ids=null;mxGraphHierarchyEdge.prototype.source=null;\nmxGraphHierarchyEdge.prototype.target=null;mxGraphHierarchyEdge.prototype.isReversed=!1;mxGraphHierarchyEdge.prototype.invert=function(a){a=this.source;this.source=this.target;this.target=a;this.isReversed=!this.isReversed};\nmxGraphHierarchyEdge.prototype.getNextLayerConnectedCells=function(a){if(null==this.nextLayerConnectedCells){this.nextLayerConnectedCells=[];for(var b=0;b<this.temp.length;b++)this.nextLayerConnectedCells[b]=[],b==this.temp.length-1?this.nextLayerConnectedCells[b].push(this.source):this.nextLayerConnectedCells[b].push(this)}return this.nextLayerConnectedCells[a-this.minRank-1]};\nmxGraphHierarchyEdge.prototype.getPreviousLayerConnectedCells=function(a){if(null==this.previousLayerConnectedCells){this.previousLayerConnectedCells=[];for(var b=0;b<this.temp.length;b++)this.previousLayerConnectedCells[b]=[],0==b?this.previousLayerConnectedCells[b].push(this.target):this.previousLayerConnectedCells[b].push(this)}return this.previousLayerConnectedCells[a-this.minRank-1]};mxGraphHierarchyEdge.prototype.isEdge=function(){return!0};\nmxGraphHierarchyEdge.prototype.getGeneralPurposeVariable=function(a){return this.temp[a-this.minRank-1]};mxGraphHierarchyEdge.prototype.setGeneralPurposeVariable=function(a,b){this.temp[a-this.minRank-1]=b};mxGraphHierarchyEdge.prototype.getCoreCell=function(){return null!=this.edges&&0<this.edges.length?this.edges[0]:null};\nfunction mxGraphHierarchyModel(a,b,c,d,e){a.getGraph();this.tightenToSource=e;this.roots=c;this.parent=d;this.vertexMapper=new mxDictionary;this.edgeMapper=new mxDictionary;this.maxRank=0;c=[];null==b&&(b=this.graph.getChildVertices(d));this.maxRank=this.SOURCESCANSTARTRANK;this.createInternalCells(a,b,c);for(d=0;d<b.length;d++){e=c[d].connectsAsSource;for(var f=0;f<e.length;f++){var g=e[f],k=g.edges;if(null!=k&&0<k.length){k=k[0];var l=a.getVisibleTerminal(k,!1);l=this.vertexMapper.get(l);c[d]==\nl&&(l=a.getVisibleTerminal(k,!0),l=this.vertexMapper.get(l));null!=l&&c[d]!=l&&(g.target=l,0==l.connectsAsTarget.length&&(l.connectsAsTarget=[]),0>mxUtils.indexOf(l.connectsAsTarget,g)&&l.connectsAsTarget.push(g))}}c[d].temp[0]=1}}mxGraphHierarchyModel.prototype.maxRank=null;mxGraphHierarchyModel.prototype.vertexMapper=null;mxGraphHierarchyModel.prototype.edgeMapper=null;mxGraphHierarchyModel.prototype.ranks=null;mxGraphHierarchyModel.prototype.roots=null;mxGraphHierarchyModel.prototype.parent=null;\nmxGraphHierarchyModel.prototype.dfsCount=0;mxGraphHierarchyModel.prototype.SOURCESCANSTARTRANK=1E8;mxGraphHierarchyModel.prototype.tightenToSource=!1;\nmxGraphHierarchyModel.prototype.createInternalCells=function(a,b,c){for(var d=a.getGraph(),e=0;e<b.length;e++){c[e]=new mxGraphHierarchyNode(b[e]);this.vertexMapper.put(b[e],c[e]);var f=a.getEdges(b[e]);c[e].connectsAsSource=[];for(var g=0;g<f.length;g++){var k=a.getVisibleTerminal(f[g],!1);if(k!=b[e]&&a.graph.model.isVertex(k)&&!a.isVertexIgnored(k)){var l=a.getEdgesBetween(b[e],k,!1);k=a.getEdgesBetween(b[e],k,!0);if(null!=l&&0<l.length&&null==this.edgeMapper.get(l[0])&&2*k.length>=l.length){k=\nnew mxGraphHierarchyEdge(l);for(var m=0;m<l.length;m++){var n=l[m];this.edgeMapper.put(n,k);d.resetEdge(n);a.disableEdgeStyle&&(a.setEdgeStyleEnabled(n,!1),a.setOrthogonalEdge(n,!0))}k.source=c[e];0>mxUtils.indexOf(c[e].connectsAsSource,k)&&c[e].connectsAsSource.push(k)}}}c[e].temp[0]=0}};\nmxGraphHierarchyModel.prototype.initialRank=function(){var a=[];if(null!=this.roots)for(var b=0;b<this.roots.length;b++){var c=this.vertexMapper.get(this.roots[b]);null!=c&&a.push(c)}var d=this.vertexMapper.getValues();for(b=0;b<d.length;b++)d[b].temp[0]=-1;for(var e=a.slice();0<a.length;){c=a[0];var f=c.connectsAsTarget;var g=c.connectsAsSource;var k=!0,l=this.SOURCESCANSTARTRANK;for(b=0;b<f.length;b++){var m=f[b];if(5270620==m.temp[0])m=m.source,l=Math.min(l,m.temp[0]-1);else{k=!1;break}}if(k){c.temp[0]=\nl;this.maxRank=Math.min(this.maxRank,l);if(null!=g)for(b=0;b<g.length;b++)m=g[b],m.temp[0]=5270620,m=m.target,-1==m.temp[0]&&(a.push(m),m.temp[0]=-2);a.shift()}else if(b=a.shift(),a.push(c),b==c&&1==a.length)break}for(b=0;b<d.length;b++)d[b].temp[0]-=this.maxRank;for(b=0;b<e.length;b++)for(c=e[b],a=0,f=c.connectsAsSource,d=0;d<f.length;d++)m=f[d],m=m.target,c.temp[0]=Math.max(a,m.temp[0]+1),a=c.temp[0];this.maxRank=this.SOURCESCANSTARTRANK-this.maxRank};\nmxGraphHierarchyModel.prototype.fixRanks=function(){var a=[];this.ranks=[];for(var b=0;b<this.maxRank+1;b++)a[b]=[],this.ranks[b]=a[b];var c=null;if(null!=this.roots){var d=this.roots;c=[];for(b=0;b<d.length;b++){var e=this.vertexMapper.get(d[b]);c[b]=e}}this.visit(function(f,g,k,l,m){0==m&&0>g.maxRank&&0>g.minRank&&(a[g.temp[0]].push(g),g.maxRank=g.temp[0],g.minRank=g.temp[0],g.temp[0]=a[g.maxRank].length-1);if(null!=f&&null!=k&&1<f.maxRank-g.maxRank)for(k.maxRank=f.maxRank,k.minRank=g.maxRank,k.temp=\n[],k.x=[],k.y=[],f=k.minRank+1;f<k.maxRank;f++)a[f].push(k),k.setGeneralPurposeVariable(f,a[f].length-1)},c,!1,null)};mxGraphHierarchyModel.prototype.visit=function(a,b,c,d){if(null!=b){for(var e=0;e<b.length;e++){var f=b[e];null!=f&&(null==d&&(d={}),c?(f.hashCode=[],f.hashCode[0]=this.dfsCount,f.hashCode[1]=e,this.extendedDfs(null,f,null,a,d,f.hashCode,e,0)):this.dfs(null,f,null,a,d,0))}this.dfsCount++}};\nmxGraphHierarchyModel.prototype.dfs=function(a,b,c,d,e,f){if(null!=b){var g=b.id;if(null==e[g])for(e[g]=b,d(a,b,c,f,0),a=b.connectsAsSource.slice(),c=0;c<a.length;c++)g=a[c],this.dfs(b,g.target,g,d,e,f+1);else d(a,b,c,f,1)}};\nmxGraphHierarchyModel.prototype.extendedDfs=function(a,b,c,d,e,f,g,k){if(null!=b)if(null==a||null!=b.hashCode&&b.hashCode[0]==a.hashCode[0]||(f=a.hashCode.length+1,b.hashCode=a.hashCode.slice(),b.hashCode[f-1]=g),g=b.id,null==e[g])for(e[g]=b,d(a,b,c,k,0),a=b.connectsAsSource.slice(),c=0;c<a.length;c++)g=a[c],this.extendedDfs(b,g.target,g,d,e,b.hashCode,c,k+1);else d(a,b,c,k,1)};\nfunction mxSwimlaneModel(a,b,c,d,e){a.getGraph();this.tightenToSource=e;this.roots=c;this.parent=d;this.vertexMapper=new mxDictionary;this.edgeMapper=new mxDictionary;this.maxRank=0;c=[];null==b&&(b=this.graph.getChildVertices(d));this.maxRank=this.SOURCESCANSTARTRANK;this.createInternalCells(a,b,c);for(d=0;d<b.length;d++){e=c[d].connectsAsSource;for(var f=0;f<e.length;f++){var g=e[f],k=g.edges;if(null!=k&&0<k.length){k=k[0];var l=a.getVisibleTerminal(k,!1);l=this.vertexMapper.get(l);c[d]==l&&(l=\na.getVisibleTerminal(k,!0),l=this.vertexMapper.get(l));null!=l&&c[d]!=l&&(g.target=l,0==l.connectsAsTarget.length&&(l.connectsAsTarget=[]),0>mxUtils.indexOf(l.connectsAsTarget,g)&&l.connectsAsTarget.push(g))}}c[d].temp[0]=1}}mxSwimlaneModel.prototype.maxRank=null;mxSwimlaneModel.prototype.vertexMapper=null;mxSwimlaneModel.prototype.edgeMapper=null;mxSwimlaneModel.prototype.ranks=null;mxSwimlaneModel.prototype.roots=null;mxSwimlaneModel.prototype.parent=null;mxSwimlaneModel.prototype.dfsCount=0;\nmxSwimlaneModel.prototype.SOURCESCANSTARTRANK=1E8;mxSwimlaneModel.prototype.tightenToSource=!1;mxSwimlaneModel.prototype.ranksPerGroup=null;\nmxSwimlaneModel.prototype.createInternalCells=function(a,b,c){for(var d=a.getGraph(),e=a.swimlanes,f=0;f<b.length;f++){c[f]=new mxGraphHierarchyNode(b[f]);this.vertexMapper.put(b[f],c[f]);c[f].swimlaneIndex=-1;for(var g=0;g<e.length;g++)if(d.model.getParent(b[f])==e[g]){c[f].swimlaneIndex=g;break}g=a.getEdges(b[f]);c[f].connectsAsSource=[];for(var k=0;k<g.length;k++){var l=a.getVisibleTerminal(g[k],!1);if(l!=b[f]&&a.graph.model.isVertex(l)&&!a.isVertexIgnored(l)){var m=a.getEdgesBetween(b[f],l,!1);\nl=a.getEdgesBetween(b[f],l,!0);if(null!=m&&0<m.length&&null==this.edgeMapper.get(m[0])&&2*l.length>=m.length){l=new mxGraphHierarchyEdge(m);for(var n=0;n<m.length;n++){var p=m[n];this.edgeMapper.put(p,l);d.resetEdge(p);a.disableEdgeStyle&&(a.setEdgeStyleEnabled(p,!1),a.setOrthogonalEdge(p,!0))}l.source=c[f];0>mxUtils.indexOf(c[f].connectsAsSource,l)&&c[f].connectsAsSource.push(l)}}}c[f].temp[0]=0}};\nmxSwimlaneModel.prototype.initialRank=function(){this.ranksPerGroup=[];var a=[],b={};if(null!=this.roots)for(var c=0;c<this.roots.length;c++){var d=this.vertexMapper.get(this.roots[c]);this.maxChainDfs(null,d,null,b,0);null!=d&&a.push(d)}d=[];b=[];for(c=this.ranksPerGroup.length-1;0<=c;c--)d[c]=c==this.ranksPerGroup.length-1?0:b[c+1]+1,b[c]=d[c]+this.ranksPerGroup[c];this.maxRank=b[0];d=this.vertexMapper.getValues();for(c=0;c<d.length;c++)d[c].temp[0]=-1;for(a.slice();0<a.length;){d=a[0];var e=d.connectsAsTarget;\nvar f=d.connectsAsSource;var g=!0,k=b[0];for(c=0;c<e.length;c++){var l=e[c];if(5270620==l.temp[0])l=l.source,k=Math.min(k,l.temp[0]-1);else{g=!1;break}}if(g){k>b[d.swimlaneIndex]&&(k=b[d.swimlaneIndex]);d.temp[0]=k;if(null!=f)for(c=0;c<f.length;c++)l=f[c],l.temp[0]=5270620,l=l.target,-1==l.temp[0]&&(a.push(l),l.temp[0]=-2);a.shift()}else if(c=a.shift(),a.push(d),c==d&&1==a.length)break}};\nmxSwimlaneModel.prototype.maxChainDfs=function(a,b,c,d,e){if(null!=b&&(a=mxCellPath.create(b.cell),null==d[a])){d[a]=b;a=b.swimlaneIndex;if(null==this.ranksPerGroup[a]||this.ranksPerGroup[a]<e)this.ranksPerGroup[a]=e;a=b.connectsAsSource.slice();for(c=0;c<a.length;c++){var f=a[c],g=f.target;b.swimlaneIndex<g.swimlaneIndex?this.maxChainDfs(b,g,f,mxUtils.clone(d,null,!0),0):b.swimlaneIndex==g.swimlaneIndex&&this.maxChainDfs(b,g,f,mxUtils.clone(d,null,!0),e+1)}}};\nmxSwimlaneModel.prototype.fixRanks=function(){var a=[];this.ranks=[];for(var b=0;b<this.maxRank+1;b++)a[b]=[],this.ranks[b]=a[b];var c=null;if(null!=this.roots){var d=this.roots;c=[];for(b=0;b<d.length;b++){var e=this.vertexMapper.get(d[b]);c[b]=e}}this.visit(function(f,g,k,l,m){0==m&&0>g.maxRank&&0>g.minRank&&(a[g.temp[0]].push(g),g.maxRank=g.temp[0],g.minRank=g.temp[0],g.temp[0]=a[g.maxRank].length-1);if(null!=f&&null!=k&&1<f.maxRank-g.maxRank)for(k.maxRank=f.maxRank,k.minRank=g.maxRank,k.temp=\n[],k.x=[],k.y=[],f=k.minRank+1;f<k.maxRank;f++)a[f].push(k),k.setGeneralPurposeVariable(f,a[f].length-1)},c,!1,null)};mxSwimlaneModel.prototype.visit=function(a,b,c,d){if(null!=b){for(var e=0;e<b.length;e++){var f=b[e];null!=f&&(null==d&&(d={}),c?(f.hashCode=[],f.hashCode[0]=this.dfsCount,f.hashCode[1]=e,this.extendedDfs(null,f,null,a,d,f.hashCode,e,0)):this.dfs(null,f,null,a,d,0))}this.dfsCount++}};\nmxSwimlaneModel.prototype.dfs=function(a,b,c,d,e,f){if(null!=b){var g=b.id;if(null==e[g])for(e[g]=b,d(a,b,c,f,0),a=b.connectsAsSource.slice(),c=0;c<a.length;c++)g=a[c],this.dfs(b,g.target,g,d,e,f+1);else d(a,b,c,f,1)}};\nmxSwimlaneModel.prototype.extendedDfs=function(a,b,c,d,e,f,g,k){if(null!=b)if(null==a||null!=b.hashCode&&b.hashCode[0]==a.hashCode[0]||(f=a.hashCode.length+1,b.hashCode=a.hashCode.slice(),b.hashCode[f-1]=g),g=b.id,null==e[g]){e[g]=b;d(a,b,c,k,0);a=b.connectsAsSource.slice();c=b.connectsAsTarget.slice();for(g=0;g<a.length;g++){f=a[g];var l=f.target;b.swimlaneIndex<=l.swimlaneIndex&&this.extendedDfs(b,l,f,d,e,b.hashCode,g,k+1)}for(g=0;g<c.length;g++)f=c[g],l=f.source,b.swimlaneIndex<l.swimlaneIndex&&\nthis.extendedDfs(b,l,f,d,e,b.hashCode,g,k+1)}else d(a,b,c,k,1)};function mxHierarchicalLayoutStage(){}mxHierarchicalLayoutStage.prototype.execute=function(a){};function mxMedianHybridCrossingReduction(a){this.layout=a}mxMedianHybridCrossingReduction.prototype=new mxHierarchicalLayoutStage;mxMedianHybridCrossingReduction.prototype.constructor=mxMedianHybridCrossingReduction;mxMedianHybridCrossingReduction.prototype.layout=null;mxMedianHybridCrossingReduction.prototype.maxIterations=24;\nmxMedianHybridCrossingReduction.prototype.nestedBestRanks=null;mxMedianHybridCrossingReduction.prototype.currentBestCrossings=0;mxMedianHybridCrossingReduction.prototype.iterationsWithoutImprovement=0;mxMedianHybridCrossingReduction.prototype.maxNoImprovementIterations=2;\nmxMedianHybridCrossingReduction.prototype.execute=function(a){a=this.layout.getModel();this.nestedBestRanks=[];for(var b=0;b<a.ranks.length;b++)this.nestedBestRanks[b]=a.ranks[b].slice();var c=0,d=this.calculateCrossings(a);for(b=0;b<this.maxIterations&&c<this.maxNoImprovementIterations;b++){this.weightedMedian(b,a);this.transpose(b,a);var e=this.calculateCrossings(a);if(e<d)for(d=e,e=c=0;e<this.nestedBestRanks.length;e++)for(var f=a.ranks[e],g=0;g<f.length;g++){var k=f[g];this.nestedBestRanks[e][k.getGeneralPurposeVariable(e)]=\nk}else for(c++,e=0;e<this.nestedBestRanks.length;e++)for(f=a.ranks[e],g=0;g<f.length;g++)k=f[g],k.setGeneralPurposeVariable(e,g);if(0==d)break}c=[];d=[];for(b=0;b<a.maxRank+1;b++)d[b]=[],c[b]=d[b];for(b=0;b<this.nestedBestRanks.length;b++)for(e=0;e<this.nestedBestRanks[b].length;e++)d[b].push(this.nestedBestRanks[b][e]);a.ranks=c};mxMedianHybridCrossingReduction.prototype.calculateCrossings=function(a){for(var b=a.ranks.length,c=0,d=1;d<b;d++)c+=this.calculateRankCrossing(d,a);return c};\nmxMedianHybridCrossingReduction.prototype.calculateRankCrossing=function(a,b){var c=0,d=b.ranks[a],e=b.ranks[a-1],f=[];for(b=0;b<d.length;b++){var g=d[b],k=g.getGeneralPurposeVariable(a);g=g.getPreviousLayerConnectedCells(a);for(var l=[],m=0;m<g.length;m++){var n=g[m].getGeneralPurposeVariable(a-1);l.push(n)}l.sort(function(p,q){return p-q});f[k]=l}a=[];for(b=0;b<f.length;b++)a=a.concat(f[b]);for(d=1;d<e.length;)d<<=1;f=2*d-1;--d;e=[];for(b=0;b<f;++b)e[b]=0;for(b=0;b<a.length;b++)for(f=a[b]+d,++e[f];0<\nf;)f%2&&(c+=e[f+1]),f=f-1>>1,++e[f];return c};\nmxMedianHybridCrossingReduction.prototype.transpose=function(a,b){for(var c=!0,d=0;c&&10>d++;){var e=1==a%2&&1==d%2;c=!1;for(var f=0;f<b.ranks.length;f++){for(var g=b.ranks[f],k=[],l=0;l<g.length;l++){var m=g[l],n=m.getGeneralPurposeVariable(f);0>n&&(n=l);k[n]=m}var p=null,q=null,r=null,t=null,u=null;for(l=0;l<g.length-1;l++){if(0==l){var x=k[l];m=x.getNextLayerConnectedCells(f);n=x.getPreviousLayerConnectedCells(f);var y=[];var B=[];for(var A=0;A<m.length;A++)y[A]=m[A].getGeneralPurposeVariable(f+\n1);for(A=0;A<n.length;A++)B[A]=n[A].getGeneralPurposeVariable(f-1)}else m=p,n=q,y=r,B=t,x=u;u=k[l+1];p=u.getNextLayerConnectedCells(f);q=u.getPreviousLayerConnectedCells(f);r=[];t=[];for(A=0;A<p.length;A++)r[A]=p[A].getGeneralPurposeVariable(f+1);for(A=0;A<q.length;A++)t[A]=q[A].getGeneralPurposeVariable(f-1);var C=0,z=0;for(A=0;A<y.length;A++)for(var v=0;v<r.length;v++)y[A]>r[v]&&C++,y[A]<r[v]&&z++;for(A=0;A<B.length;A++)for(v=0;v<t.length;v++)B[A]>t[v]&&C++,B[A]<t[v]&&z++;if(z<C||z==C&&e)p=x.getGeneralPurposeVariable(f),\nx.setGeneralPurposeVariable(f,u.getGeneralPurposeVariable(f)),u.setGeneralPurposeVariable(f,p),p=m,q=n,r=y,t=B,u=x,e||(c=!0)}}}};mxMedianHybridCrossingReduction.prototype.weightedMedian=function(a,b){if(a=0==a%2)for(var c=b.maxRank-1;0<=c;c--)this.medianRank(c,a);else for(c=1;c<b.maxRank;c++)this.medianRank(c,a)};\nmxMedianHybridCrossingReduction.prototype.medianRank=function(a,b){for(var c=this.nestedBestRanks[a].length,d=[],e=[],f=0;f<c;f++){var g=this.nestedBestRanks[a][f],k=new MedianCellSorter;k.cell=g;var l=b?g.getNextLayerConnectedCells(a):g.getPreviousLayerConnectedCells(a);var m=b?a+1:a-1;null!=l&&0!=l.length?(k.medianValue=this.medianValue(l,m),d.push(k)):e[g.getGeneralPurposeVariable(a)]=!0}d.sort(MedianCellSorter.prototype.compare);for(f=0;f<c;f++)null==e[f]&&(g=d.shift().cell,g.setGeneralPurposeVariable(a,\nf))};mxMedianHybridCrossingReduction.prototype.medianValue=function(a,b){for(var c=[],d=0,e=0;e<a.length;e++){var f=a[e];c[d++]=f.getGeneralPurposeVariable(b)}c.sort(function(g,k){return g-k});if(1==d%2)return c[Math.floor(d/2)];if(2==d)return(c[0]+c[1])/2;a=d/2;b=c[a-1]-c[0];d=c[d-1]-c[a];return(c[a-1]*d+c[a]*b)/(b+d)};function MedianCellSorter(){}MedianCellSorter.prototype.medianValue=0;MedianCellSorter.prototype.cell=!1;\nMedianCellSorter.prototype.compare=function(a,b){return null!=a&&null!=b?b.medianValue>a.medianValue?-1:b.medianValue<a.medianValue?1:0:0};function mxMinimumCycleRemover(a){this.layout=a}mxMinimumCycleRemover.prototype=new mxHierarchicalLayoutStage;mxMinimumCycleRemover.prototype.constructor=mxMinimumCycleRemover;mxMinimumCycleRemover.prototype.layout=null;\nmxMinimumCycleRemover.prototype.execute=function(a){a=this.layout.getModel();for(var b={},c=a.vertexMapper.getValues(),d={},e=0;e<c.length;e++)d[c[e].id]=c[e];c=null;if(null!=a.roots){var f=a.roots;c=[];for(e=0;e<f.length;e++)c[e]=a.vertexMapper.get(f[e])}a.visit(function(g,k,l,m,n){k.isAncestor(g)&&(l.invert(),mxUtils.remove(l,g.connectsAsSource),g.connectsAsTarget.push(l),mxUtils.remove(l,k.connectsAsTarget),k.connectsAsSource.push(l));b[k.id]=k;delete d[k.id]},c,!0,null);e=mxUtils.clone(b,null,\n!0);a.visit(function(g,k,l,m,n){k.isAncestor(g)&&(l.invert(),mxUtils.remove(l,g.connectsAsSource),k.connectsAsSource.push(l),g.connectsAsTarget.push(l),mxUtils.remove(l,k.connectsAsTarget));b[k.id]=k;delete d[k.id]},d,!0,e)};function mxCoordinateAssignment(a,b,c,d,e,f){this.layout=a;this.intraCellSpacing=b;this.interRankCellSpacing=c;this.orientation=d;this.initialX=e;this.parallelEdgeSpacing=f}mxCoordinateAssignment.prototype=new mxHierarchicalLayoutStage;\nmxCoordinateAssignment.prototype.constructor=mxCoordinateAssignment;mxCoordinateAssignment.prototype.layout=null;mxCoordinateAssignment.prototype.intraCellSpacing=30;mxCoordinateAssignment.prototype.interRankCellSpacing=100;mxCoordinateAssignment.prototype.parallelEdgeSpacing=10;mxCoordinateAssignment.prototype.maxIterations=8;mxCoordinateAssignment.prototype.prefHozEdgeSep=5;mxCoordinateAssignment.prototype.prefVertEdgeOff=2;mxCoordinateAssignment.prototype.minEdgeJetty=12;\nmxCoordinateAssignment.prototype.channelBuffer=4;mxCoordinateAssignment.prototype.jettyPositions=null;mxCoordinateAssignment.prototype.orientation=mxConstants.DIRECTION_NORTH;mxCoordinateAssignment.prototype.initialX=null;mxCoordinateAssignment.prototype.limitX=null;mxCoordinateAssignment.prototype.currentXDelta=null;mxCoordinateAssignment.prototype.widestRank=null;mxCoordinateAssignment.prototype.rankTopY=null;mxCoordinateAssignment.prototype.rankBottomY=null;\nmxCoordinateAssignment.prototype.widestRankValue=null;mxCoordinateAssignment.prototype.rankWidths=null;mxCoordinateAssignment.prototype.rankY=null;mxCoordinateAssignment.prototype.fineTuning=!0;mxCoordinateAssignment.prototype.nextLayerConnectedCache=null;mxCoordinateAssignment.prototype.previousLayerConnectedCache=null;mxCoordinateAssignment.prototype.groupPadding=10;\nmxCoordinateAssignment.prototype.printStatus=function(){var a=this.layout.getModel();mxLog.show();mxLog.writeln(\"======Coord assignment debug=======\");for(var b=0;b<a.ranks.length;b++){mxLog.write(\"Rank \",b,\" : \");for(var c=a.ranks[b],d=0;d<c.length;d++)mxLog.write(c[d].getGeneralPurposeVariable(b),\"  \");mxLog.writeln()}mxLog.writeln(\"====================================\")};\nmxCoordinateAssignment.prototype.execute=function(a){this.jettyPositions={};a=this.layout.getModel();this.currentXDelta=0;this.initialCoords(this.layout.getGraph(),a);this.fineTuning&&this.minNode(a);var b=1E8;if(this.fineTuning)for(var c=0;c<this.maxIterations;c++){0!=c&&(this.medianPos(c,a),this.minNode(a));if(this.currentXDelta<b){for(var d=0;d<a.ranks.length;d++)for(var e=a.ranks[d],f=0;f<e.length;f++){var g=e[f];g.setX(d,g.getGeneralPurposeVariable(d))}b=this.currentXDelta}else for(d=0;d<a.ranks.length;d++)for(e=\na.ranks[d],f=0;f<e.length;f++)g=e[f],g.setGeneralPurposeVariable(d,g.getX(d));this.minPath(this.layout.getGraph(),a);this.currentXDelta=0}this.setCellLocations(this.layout.getGraph(),a)};\nmxCoordinateAssignment.prototype.minNode=function(a){for(var b=[],c=new mxDictionary,d=[],e=0;e<=a.maxRank;e++){d[e]=a.ranks[e];for(var f=0;f<d[e].length;f++){var g=d[e][f],k=new WeightedCellSorter(g,e);k.rankIndex=f;k.visited=!0;b.push(k);c.put(g,k)}}a=10*b.length;for(f=0;0<b.length&&f<=a;){g=b.shift();e=g.cell;var l=g.weightedValue,m=parseInt(g.rankIndex);k=e.getNextLayerConnectedCells(l);var n=e.getPreviousLayerConnectedCells(l),p=k.length,q=n.length,r=this.medianXValue(k,l+1),t=this.medianXValue(n,\nl-1),u=p+q,x=e.getGeneralPurposeVariable(l),y=x;0<u&&(y=(r*p+t*q)/u);p=!1;y<x-1?0==m?(e.setGeneralPurposeVariable(l,y),p=!0):(m=d[l][m-1],x=m.getGeneralPurposeVariable(l),x=x+m.width/2+this.intraCellSpacing+e.width/2,x<y?(e.setGeneralPurposeVariable(l,y),p=!0):x<e.getGeneralPurposeVariable(l)-1&&(e.setGeneralPurposeVariable(l,x),p=!0)):y>x+1&&(m==d[l].length-1?(e.setGeneralPurposeVariable(l,y),p=!0):(m=d[l][m+1],x=m.getGeneralPurposeVariable(l),x=x-m.width/2-this.intraCellSpacing-e.width/2,x>y?(e.setGeneralPurposeVariable(l,\ny),p=!0):x>e.getGeneralPurposeVariable(l)+1&&(e.setGeneralPurposeVariable(l,x),p=!0)));if(p){for(e=0;e<k.length;e++)l=k[e],l=c.get(l),null!=l&&0==l.visited&&(l.visited=!0,b.push(l));for(e=0;e<n.length;e++)l=n[e],l=c.get(l),null!=l&&0==l.visited&&(l.visited=!0,b.push(l))}g.visited=!1;f++}};mxCoordinateAssignment.prototype.medianPos=function(a,b){if(0==a%2)for(a=b.maxRank;0<a;a--)this.rankMedianPosition(a-1,b,a);else for(a=0;a<b.maxRank-1;a++)this.rankMedianPosition(a+1,b,a)};\nmxCoordinateAssignment.prototype.rankMedianPosition=function(a,b,c){b=b.ranks[a];for(var d=[],e={},f=0;f<b.length;f++){var g=b[f];d[f]=new WeightedCellSorter;d[f].cell=g;d[f].rankIndex=f;e[g.id]=d[f];var k=c<a?g.getPreviousLayerConnectedCells(a):g.getNextLayerConnectedCells(a);d[f].weightedValue=this.calculatedWeightedValue(g,k)}d.sort(WeightedCellSorter.prototype.compare);for(f=0;f<d.length;f++){g=d[f].cell;var l=0;k=c<a?g.getPreviousLayerConnectedCells(a).slice():g.getNextLayerConnectedCells(a).slice();\nnull!=k&&(l=k.length,l=0<l?this.medianXValue(k,c):g.getGeneralPurposeVariable(a));var m=0;k=-1E8;for(var n=d[f].rankIndex-1;0<=n;){var p=e[b[n].id];if(null!=p){var q=p.cell;p.visited?(k=q.getGeneralPurposeVariable(a)+q.width/2+this.intraCellSpacing+m+g.width/2,n=-1):(m+=q.width+this.intraCellSpacing,n--)}}m=0;q=1E8;for(n=d[f].rankIndex+1;n<d.length;)if(p=e[b[n].id],null!=p){var r=p.cell;p.visited?(q=r.getGeneralPurposeVariable(a)-r.width/2-this.intraCellSpacing-m-g.width/2,n=d.length):(m+=r.width+\nthis.intraCellSpacing,n++)}l>=k&&l<=q?g.setGeneralPurposeVariable(a,l):l<k?(g.setGeneralPurposeVariable(a,k),this.currentXDelta+=k-l):l>q&&(g.setGeneralPurposeVariable(a,q),this.currentXDelta+=l-q);d[f].visited=!0}};mxCoordinateAssignment.prototype.calculatedWeightedValue=function(a,b){for(var c=0,d=0;d<b.length;d++){var e=b[d];a.isVertex()&&e.isVertex()?c++:c=a.isEdge()&&e.isEdge()?c+8:c+2}return c};\nmxCoordinateAssignment.prototype.medianXValue=function(a,b){if(0==a.length)return 0;for(var c=[],d=0;d<a.length;d++)c[d]=a[d].getGeneralPurposeVariable(b);c.sort(function(e,f){return e-f});if(1==a.length%2)return c[Math.floor(a.length/2)];a=a.length/2;return(c[a-1]+c[a])/2};\nmxCoordinateAssignment.prototype.initialCoords=function(a,b){this.calculateWidestRank(a,b);for(var c=this.widestRank;0<=c;c--)c<b.maxRank&&this.rankCoordinates(c,a,b);for(c=this.widestRank+1;c<=b.maxRank;c++)0<c&&this.rankCoordinates(c,a,b)};\nmxCoordinateAssignment.prototype.rankCoordinates=function(a,b,c){b=c.ranks[a];c=this.initialX+(this.widestRankValue-this.rankWidths[a])/2;for(var d=!1,e=0;e<b.length;e++){var f=b[e];if(f.isVertex()){var g=this.layout.getVertexBounds(f.cell);null!=g?this.orientation==mxConstants.DIRECTION_NORTH||this.orientation==mxConstants.DIRECTION_SOUTH?(f.width=g.width,f.height=g.height):(f.width=g.height,f.height=g.width):d=!0}else f.isEdge()&&(g=1,null!=f.edges?g=f.edges.length:mxLog.warn(\"edge.edges is null\"),\nf.width=(g-1)*this.parallelEdgeSpacing);c+=f.width/2;f.setX(a,c);f.setGeneralPurposeVariable(a,c);c+=f.width/2;c+=this.intraCellSpacing}1==d&&mxLog.warn(\"At least one cell has no bounds\")};\nmxCoordinateAssignment.prototype.calculateWidestRank=function(a,b){a=-this.interRankCellSpacing;var c=0;this.rankWidths=[];this.rankY=[];for(var d=b.maxRank;0<=d;d--){for(var e=0,f=b.ranks[d],g=this.initialX,k=!1,l=0;l<f.length;l++){var m=f[l];if(m.isVertex()){var n=this.layout.getVertexBounds(m.cell);null!=n?this.orientation==mxConstants.DIRECTION_NORTH||this.orientation==mxConstants.DIRECTION_SOUTH?(m.width=n.width,m.height=n.height):(m.width=n.height,m.height=n.width):k=!0;e=Math.max(e,m.height)}else m.isEdge()&&\n(n=1,null!=m.edges?n=m.edges.length:mxLog.warn(\"edge.edges is null\"),m.width=(n-1)*this.parallelEdgeSpacing);g+=m.width/2;m.setX(d,g);m.setGeneralPurposeVariable(d,g);g+=m.width/2;g+=this.intraCellSpacing;g>this.widestRankValue&&(this.widestRankValue=g,this.widestRank=d);this.rankWidths[d]=g}1==k&&mxLog.warn(\"At least one cell has no bounds\");this.rankY[d]=a;g=e/2+c/2+this.interRankCellSpacing;c=e;a=this.orientation==mxConstants.DIRECTION_NORTH||this.orientation==mxConstants.DIRECTION_WEST?a+g:a-\ng;for(l=0;l<f.length;l++)f[l].setY(d,a)}};\nmxCoordinateAssignment.prototype.minPath=function(a,b){a=b.edgeMapper.getValues();for(var c=0;c<a.length;c++){var d=a[c];if(!(1>d.maxRank-d.minRank-1)){for(var e=d.getGeneralPurposeVariable(d.minRank+1),f=!0,g=0,k=d.minRank+2;k<d.maxRank;k++){var l=d.getGeneralPurposeVariable(k);e!=l?(f=!1,e=l):g++}if(!f){f=e=0;l=[];var m=[],n=d.getGeneralPurposeVariable(d.minRank+1);for(k=d.minRank+1;k<d.maxRank-1;k++){var p=d.getX(k+1);n==p?(l[k-d.minRank-1]=n,e++):this.repositionValid(b,d,k+1,n)?(l[k-d.minRank-\n1]=n,e++):n=l[k-d.minRank-1]=p}n=d.getX(k);for(k=d.maxRank-1;k>d.minRank+1;k--)p=d.getX(k-1),n==p?(m[k-d.minRank-2]=n,f++):this.repositionValid(b,d,k-1,n)?(m[k-d.minRank-2]=n,f++):(m[k-d.minRank-2]=d.getX(k-1),n=p);if(f>g||e>g)if(f>=e)for(k=d.maxRank-2;k>d.minRank;k--)d.setX(k,m[k-d.minRank-1]);else if(e>f)for(k=d.minRank+2;k<d.maxRank;k++)d.setX(k,l[k-d.minRank-2])}}}};\nmxCoordinateAssignment.prototype.repositionValid=function(a,b,c,d){a=a.ranks[c];for(var e=-1,f=0;f<a.length;f++)if(b==a[f]){e=f;break}if(0>e)return!1;f=b.getGeneralPurposeVariable(c);if(d<f){if(0==e)return!0;a=a[e-1];c=a.getGeneralPurposeVariable(c);c=c+a.width/2+this.intraCellSpacing+b.width/2;if(!(c<=d))return!1}else if(d>f){if(e==a.length-1)return!0;a=a[e+1];c=a.getGeneralPurposeVariable(c);c=c-a.width/2-this.intraCellSpacing-b.width/2;if(!(c>=d))return!1}return!0};\nmxCoordinateAssignment.prototype.setCellLocations=function(a,b){this.rankTopY=[];this.rankBottomY=[];for(a=0;a<b.ranks.length;a++)this.rankTopY[a]=Number.MAX_VALUE,this.rankBottomY[a]=-Number.MAX_VALUE;var c=b.vertexMapper.getValues();for(a=0;a<c.length;a++)this.setVertexLocation(c[a]);this.layout.edgeStyle!=mxHierarchicalEdgeStyle.ORTHOGONAL&&this.layout.edgeStyle!=mxHierarchicalEdgeStyle.POLYLINE&&this.layout.edgeStyle!=mxHierarchicalEdgeStyle.CURVE||this.localEdgeProcessing(b);b=b.edgeMapper.getValues();\nfor(a=0;a<b.length;a++)this.setEdgePosition(b[a])};\nmxCoordinateAssignment.prototype.localEdgeProcessing=function(a){for(var b=0;b<a.ranks.length;b++)for(var c=a.ranks[b],d=0;d<c.length;d++){var e=c[d];if(e.isVertex())for(var f=e.getPreviousLayerConnectedCells(b),g=b-1,k=0;2>k;k++){if(-1<g&&g<a.ranks.length&&null!=f&&0<f.length){for(var l=[],m=0;m<f.length;m++){var n=new WeightedCellSorter(f[m],f[m].getX(g));l.push(n)}l.sort(WeightedCellSorter.prototype.compare);n=e.x[0]-e.width/2;var p=n+e.width,q=f=0;g=[];for(m=0;m<l.length;m++){var r=l[m].cell;\nif(r.isVertex()){var t=0==k?e.connectsAsSource:e.connectsAsTarget;for(var u=0;u<t.length;u++)if(t[u].source==r||t[u].target==r)f+=t[u].edges.length,q++,g.push(t[u])}else f+=r.edges.length,q++,g.push(r)}e.width>(f+1)*this.prefHozEdgeSep+2*this.prefHozEdgeSep&&(n+=this.prefHozEdgeSep,p-=this.prefHozEdgeSep);l=(p-n)/f;n+=l/2;p=this.minEdgeJetty-this.prefVertEdgeOff;for(m=0;m<g.length;m++)for(q=g[m].edges.length,r=this.jettyPositions[g[m].ids[0]],null==r&&(r=[],this.jettyPositions[g[m].ids[0]]=r),m<f/\n2?p+=this.prefVertEdgeOff:m>f/2&&(p-=this.prefVertEdgeOff),t=0;t<q;t++)r[4*t+2*k]=n,n+=l,r[4*t+2*k+1]=p}f=e.getNextLayerConnectedCells(b);g=b+1}}};\nmxCoordinateAssignment.prototype.setEdgePosition=function(a){var b=0;if(101207!=a.temp[0]){var c=a.maxRank,d=a.minRank;c==d&&(c=a.source.maxRank,d=a.target.minRank);for(var e=0,f=this.jettyPositions[a.ids[0]],g=a.isReversed?a.target.cell:a.source.cell,k=this.layout.graph,l=this.orientation==mxConstants.DIRECTION_EAST||this.orientation==mxConstants.DIRECTION_SOUTH,m=0;m<a.edges.length;m++){var n=a.edges[m],p=this.layout.getVisibleTerminal(n,!0),q=[],r=a.isReversed;p!=g&&(r=!r);if(null!=f){var t=r?\n2:0,u=r?l?this.rankBottomY[d]:this.rankTopY[d]:l?this.rankTopY[c]:this.rankBottomY[c],x=f[4*e+1+t];r!=l&&(x=-x);u+=x;t=f[4*e+t];var y=k.model.getTerminal(n,!0);this.layout.isPort(y)&&k.model.getParent(y)==p&&(t=k.view.getState(y),t=null!=t?t.x:p.geometry.x+a.source.width*y.geometry.x);this.orientation==mxConstants.DIRECTION_NORTH||this.orientation==mxConstants.DIRECTION_SOUTH?(q.push(new mxPoint(t,u)),this.layout.edgeStyle==mxHierarchicalEdgeStyle.CURVE&&q.push(new mxPoint(t,u+x))):(q.push(new mxPoint(u,\nt)),this.layout.edgeStyle==mxHierarchicalEdgeStyle.CURVE&&q.push(new mxPoint(u+x,t)))}t=a.x.length-1;u=x=-1;p=a.maxRank-1;r&&(t=0,x=a.x.length,u=1,p=a.minRank+1);for(;a.maxRank!=a.minRank&&t!=x;t+=u){y=a.x[t]+b;var B=(this.rankTopY[p]+this.rankBottomY[p+1])/2,A=(this.rankTopY[p-1]+this.rankBottomY[p])/2;if(r){var C=B;B=A;A=C}this.orientation==mxConstants.DIRECTION_NORTH||this.orientation==mxConstants.DIRECTION_SOUTH?(q.push(new mxPoint(y,B)),q.push(new mxPoint(y,A))):(q.push(new mxPoint(B,y)),q.push(new mxPoint(A,\ny)));this.limitX=Math.max(this.limitX,y);p+=u}null!=f&&(t=r?2:0,u=r?l?this.rankTopY[c]:this.rankBottomY[c]:l?this.rankBottomY[d]:this.rankTopY[d],x=f[4*e+3-t],r!=l&&(x=-x),u-=x,t=f[4*e+2-t],r=k.model.getTerminal(n,!1),p=this.layout.getVisibleTerminal(n,!1),this.layout.isPort(r)&&k.model.getParent(r)==p&&(t=k.view.getState(r),t=null!=t?t.x:p.geometry.x+a.target.width*r.geometry.x),this.orientation==mxConstants.DIRECTION_NORTH||this.orientation==mxConstants.DIRECTION_SOUTH?(this.layout.edgeStyle==mxHierarchicalEdgeStyle.CURVE&&\nq.push(new mxPoint(t,u-x)),q.push(new mxPoint(t,u))):(this.layout.edgeStyle==mxHierarchicalEdgeStyle.CURVE&&q.push(new mxPoint(u-x,t)),q.push(new mxPoint(u,t))));a.isReversed&&this.processReversedEdge(a,n);this.layout.setEdgePoints(n,q);this.layout.resetEdgeLabels&&null!=n.geometry&&(geometry=n.geometry.clone(),geometry.relative=!0,geometry.x=0,geometry.y=0,k.model.setGeometry(n,geometry));b=0==b?this.parallelEdgeSpacing:0<b?-b:-b+this.parallelEdgeSpacing;e++}a.temp[0]=101207}};\nmxCoordinateAssignment.prototype.setVertexLocation=function(a){var b=a.cell,c=a.x[0]-a.width/2,d=a.y[0]-a.height/2;this.rankTopY[a.minRank]=Math.min(this.rankTopY[a.minRank],d);this.rankBottomY[a.minRank]=Math.max(this.rankBottomY[a.minRank],d+a.height);this.orientation==mxConstants.DIRECTION_NORTH||this.orientation==mxConstants.DIRECTION_SOUTH?this.layout.setVertexLocation(b,c,d):this.layout.setVertexLocation(b,d,c);this.limitX=Math.max(this.limitX,c+a.width)};\nmxCoordinateAssignment.prototype.processReversedEdge=function(a,b){};function mxSwimlaneOrdering(a){this.layout=a}mxSwimlaneOrdering.prototype=new mxHierarchicalLayoutStage;mxSwimlaneOrdering.prototype.constructor=mxSwimlaneOrdering;mxSwimlaneOrdering.prototype.layout=null;\nmxSwimlaneOrdering.prototype.execute=function(a){a=this.layout.getModel();var b=mxUtils.clone(a.vertexMapper,null,!0),c=null;if(null!=a.roots){var d=a.roots;c=[];for(var e=0;e<d.length;e++)c[e]=a.vertexMapper.get(d[e])}a.visit(function(f,g,k,l,m){l=null!=f&&f.swimlaneIndex==g.swimlaneIndex&&g.isAncestor(f);m=null!=f&&null!=k&&f.swimlaneIndex<g.swimlaneIndex&&k.source==g;l?(k.invert(),mxUtils.remove(k,f.connectsAsSource),g.connectsAsSource.push(k),f.connectsAsTarget.push(k),mxUtils.remove(k,g.connectsAsTarget)):\nm&&(k.invert(),mxUtils.remove(k,f.connectsAsTarget),g.connectsAsTarget.push(k),f.connectsAsSource.push(k),mxUtils.remove(k,g.connectsAsSource));f=mxCellPath.create(g.cell);delete b[f]},c,!0,null)};function mxHierarchicalLayout(a,b,c){mxGraphLayout.call(this,a);this.orientation=null!=b?b:mxConstants.DIRECTION_NORTH;this.deterministic=null!=c?c:!0}var mxHierarchicalEdgeStyle={ORTHOGONAL:1,POLYLINE:2,STRAIGHT:3,CURVE:4};mxHierarchicalLayout.prototype=new mxGraphLayout;\nmxHierarchicalLayout.prototype.constructor=mxHierarchicalLayout;mxHierarchicalLayout.prototype.roots=null;mxHierarchicalLayout.prototype.resizeParent=!1;mxHierarchicalLayout.prototype.maintainParentLocation=!1;mxHierarchicalLayout.prototype.moveParent=!1;mxHierarchicalLayout.prototype.parentBorder=0;mxHierarchicalLayout.prototype.intraCellSpacing=30;mxHierarchicalLayout.prototype.interRankCellSpacing=100;mxHierarchicalLayout.prototype.interHierarchySpacing=60;\nmxHierarchicalLayout.prototype.parallelEdgeSpacing=10;mxHierarchicalLayout.prototype.orientation=mxConstants.DIRECTION_NORTH;mxHierarchicalLayout.prototype.fineTuning=!0;mxHierarchicalLayout.prototype.tightenToSource=!0;mxHierarchicalLayout.prototype.disableEdgeStyle=!0;mxHierarchicalLayout.prototype.resetEdgeLabels=!0;mxHierarchicalLayout.prototype.traverseAncestors=!0;mxHierarchicalLayout.prototype.model=null;mxHierarchicalLayout.prototype.edgesCache=null;\nmxHierarchicalLayout.prototype.edgeSourceTermCache=null;mxHierarchicalLayout.prototype.edgesTargetTermCache=null;mxHierarchicalLayout.prototype.edgeStyle=mxHierarchicalEdgeStyle.POLYLINE;mxHierarchicalLayout.prototype.getModel=function(){return this.model};\nmxHierarchicalLayout.prototype.execute=function(a,b){this.parent=a;var c=this.graph.model;this.edgesCache=new mxDictionary;this.edgeSourceTermCache=new mxDictionary;this.edgesTargetTermCache=new mxDictionary;null==b||b instanceof Array||(b=[b]);if(null!=b||null!=a){this.parentY=this.parentX=null;if(a!=this.root&&null!=c.isVertex(a)&&this.maintainParentLocation){var d=this.graph.getCellGeometry(a);null!=d&&(this.parentX=d.x,this.parentY=d.y)}if(null!=b){for(var e=[],f=0;f<b.length;f++)(null!=a?c.isAncestor(a,\nb[f]):1)&&c.isVertex(b[f])&&e.push(b[f]);this.roots=e}c.beginUpdate();try{this.run(a),this.resizeParent&&!this.graph.isCellCollapsed(a)&&this.graph.updateGroupBounds([a],this.parentBorder,this.moveParent),null!=this.parentX&&null!=this.parentY&&(d=this.graph.getCellGeometry(a),null!=d&&(d=d.clone(),d.x=this.parentX,d.y=this.parentY,c.setGeometry(a,d)))}finally{c.endUpdate()}}};\nmxHierarchicalLayout.prototype.findRoots=function(a,b){var c=[];if(null!=a&&null!=b){a=this.graph.model;var d=null,e=-1E5,f;for(f in b){var g=b[f];if(a.isVertex(g)&&this.graph.isCellVisible(g)){for(var k=this.getEdges(g),l=0,m=0,n=0;n<k.length;n++)this.getVisibleTerminal(k[n],!0)==g?l++:m++;0==m&&0<l&&c.push(g);k=l-m;k>e&&(e=k,d=g)}}0==c.length&&null!=d&&c.push(d)}return c};\nmxHierarchicalLayout.prototype.getEdges=function(a){var b=this.edgesCache.get(a);if(null!=b)return b;var c=this.graph.model;b=[];for(var d=this.graph.isCellCollapsed(a),e=c.getChildCount(a),f=0;f<e;f++){var g=c.getChildAt(a,f);if(this.isPort(g))b=b.concat(c.getEdges(g,!0,!0));else if(d||!this.graph.isCellVisible(g))b=b.concat(c.getEdges(g,!0,!0))}b=b.concat(c.getEdges(a,!0,!0));c=[];for(f=0;f<b.length;f++)d=this.getVisibleTerminal(b[f],!0),e=this.getVisibleTerminal(b[f],!1),(d==e||d!=e&&(e==a&&(null==\nthis.parent||this.isAncestor(this.parent,d,this.traverseAncestors))||d==a&&(null==this.parent||this.isAncestor(this.parent,e,this.traverseAncestors))))&&c.push(b[f]);this.edgesCache.put(a,c);return c};\nmxHierarchicalLayout.prototype.getVisibleTerminal=function(a,b){var c=this.edgesTargetTermCache;b&&(c=this.edgeSourceTermCache);var d=c.get(a);if(null!=d)return d;d=this.graph.view.getState(a);var e=null!=d?d.getVisibleTerminal(b):this.graph.view.getVisibleTerminal(a,b);null==e&&(e=null!=d?d.getVisibleTerminal(b):this.graph.view.getVisibleTerminal(a,b));null!=e&&(this.isPort(e)&&(e=this.graph.model.getParent(e)),c.put(a,e));return e};\nmxHierarchicalLayout.prototype.run=function(a){var b=[],c=[];if(null==this.roots&&null!=a){var d={};this.filterDescendants(a,d);this.roots=[];var e=!0,f;for(f in d)if(null!=d[f]){e=!1;break}for(;!e;){var g=this.findRoots(a,d);for(e=0;e<g.length;e++){var k={};b.push(k);this.traverse(g[e],!0,null,c,k,b,d)}for(e=0;e<g.length;e++)this.roots.push(g[e]);e=!0;for(f in d)if(null!=d[f]){e=!1;break}}}else for(e=0;e<this.roots.length;e++)k={},b.push(k),this.traverse(this.roots[e],!0,null,c,k,b,null);for(e=c=\n0;e<b.length;e++){k=b[e];d=[];for(f in k)d.push(k[f]);this.model=new mxGraphHierarchyModel(this,d,this.roots,a,this.tightenToSource);this.cycleStage(a);this.layeringStage();this.crossingStage(a);c=this.placementStage(c,a)}};\nmxHierarchicalLayout.prototype.filterDescendants=function(a,b){var c=this.graph.model;c.isVertex(a)&&a!=this.parent&&this.graph.isCellVisible(a)&&(b[mxObjectIdentity.get(a)]=a);if(this.traverseAncestors||a==this.parent&&this.graph.isCellVisible(a))for(var d=c.getChildCount(a),e=0;e<d;e++){var f=c.getChildAt(a,e);this.isPort(f)||this.filterDescendants(f,b)}};mxHierarchicalLayout.prototype.isPort=function(a){return null!=a&&null!=a.geometry?a.geometry.relative:!1};\nmxHierarchicalLayout.prototype.getEdgesBetween=function(a,b,c){c=null!=c?c:!1;for(var d=this.getEdges(a),e=[],f=0;f<d.length;f++){var g=this.getVisibleTerminal(d[f],!0),k=this.getVisibleTerminal(d[f],!1);(g==a&&k==b||!c&&g==b&&k==a)&&e.push(d[f])}return e};\nmxHierarchicalLayout.prototype.traverse=function(a,b,c,d,e,f,g){if(null!=a&&null!=d){var k=mxObjectIdentity.get(a);if(null==d[k]&&(null==g||null!=g[k])){null==e[k]&&(e[k]=a);null==d[k]&&(d[k]=a);null!==g&&delete g[k];var l=this.getEdges(a);k=[];for(c=0;c<l.length;c++)k[c]=this.getVisibleTerminal(l[c],!0)==a;for(c=0;c<l.length;c++)if(!b||k[c]){a=this.getVisibleTerminal(l[c],!k[c]);for(var m=1,n=0;n<l.length;n++)if(n!=c){var p=k[n];this.getVisibleTerminal(l[n],!p)==a&&(p?m++:m--)}0<=m&&(e=this.traverse(a,\nb,l[c],d,e,f,g))}}else if(null==e[k])for(c=0;c<f.length;c++)if(b=f[c],null!=b[k]){for(l in b)e[l]=b[l];f.splice(c,1);break}}return e};mxHierarchicalLayout.prototype.cycleStage=function(a){(new mxMinimumCycleRemover(this)).execute(a)};mxHierarchicalLayout.prototype.layeringStage=function(){this.model.initialRank();this.model.fixRanks()};mxHierarchicalLayout.prototype.crossingStage=function(a){(new mxMedianHybridCrossingReduction(this)).execute(a)};\nmxHierarchicalLayout.prototype.placementStage=function(a,b){a=new mxCoordinateAssignment(this,this.intraCellSpacing,this.interRankCellSpacing,this.orientation,a,this.parallelEdgeSpacing);a.fineTuning=this.fineTuning;a.execute(b);return a.limitX+this.interHierarchySpacing};function mxSwimlaneLayout(a,b,c){mxGraphLayout.call(this,a);this.orientation=null!=b?b:mxConstants.DIRECTION_NORTH;this.deterministic=null!=c?c:!0}mxSwimlaneLayout.prototype=new mxGraphLayout;\nmxSwimlaneLayout.prototype.constructor=mxSwimlaneLayout;mxSwimlaneLayout.prototype.roots=null;mxSwimlaneLayout.prototype.swimlanes=null;mxSwimlaneLayout.prototype.dummyVertexWidth=50;mxSwimlaneLayout.prototype.resizeParent=!1;mxSwimlaneLayout.prototype.maintainParentLocation=!1;mxSwimlaneLayout.prototype.moveParent=!1;mxSwimlaneLayout.prototype.parentBorder=30;mxSwimlaneLayout.prototype.intraCellSpacing=30;mxSwimlaneLayout.prototype.interRankCellSpacing=100;\nmxSwimlaneLayout.prototype.interHierarchySpacing=60;mxSwimlaneLayout.prototype.parallelEdgeSpacing=10;mxSwimlaneLayout.prototype.orientation=mxConstants.DIRECTION_NORTH;mxSwimlaneLayout.prototype.fineTuning=!0;mxSwimlaneLayout.prototype.tightenToSource=!0;mxSwimlaneLayout.prototype.disableEdgeStyle=!0;mxSwimlaneLayout.prototype.traverseAncestors=!0;mxSwimlaneLayout.prototype.model=null;mxSwimlaneLayout.prototype.edgesCache=null;mxHierarchicalLayout.prototype.edgeSourceTermCache=null;\nmxHierarchicalLayout.prototype.edgesTargetTermCache=null;mxHierarchicalLayout.prototype.edgeStyle=mxHierarchicalEdgeStyle.POLYLINE;mxSwimlaneLayout.prototype.getModel=function(){return this.model};\nmxSwimlaneLayout.prototype.execute=function(a,b){this.parent=a;var c=this.graph.model;this.edgesCache=new mxDictionary;this.edgeSourceTermCache=new mxDictionary;this.edgesTargetTermCache=new mxDictionary;if(!(null==b||1>b.length)){null==a&&(a=c.getParent(b[0]));this.parentY=this.parentX=null;if(a!=this.root&&null!=c.isVertex(a)&&this.maintainParentLocation){var d=this.graph.getCellGeometry(a);null!=d&&(this.parentX=d.x,this.parentY=d.y)}this.swimlanes=b;for(var e=[],f=0;f<b.length;f++){var g=this.graph.getChildCells(b[f]);\nif(null==g||0==g.length)g=this.graph.insertVertex(b[f],null,null,0,0,this.dummyVertexWidth,0),e.push(g)}c.beginUpdate();try{this.run(a),this.resizeParent&&!this.graph.isCellCollapsed(a)&&this.graph.updateGroupBounds([a],this.parentBorder,this.moveParent),null!=this.parentX&&null!=this.parentY&&(d=this.graph.getCellGeometry(a),null!=d&&(d=d.clone(),d.x=this.parentX,d.y=this.parentY,c.setGeometry(a,d))),this.graph.removeCells(e)}finally{c.endUpdate()}}};\nmxSwimlaneLayout.prototype.updateGroupBounds=function(){var a=[],b=this.model;for(f in b.edgeMapper)for(var c=b.edgeMapper[f],d=0;d<c.edges.length;d++)a.push(c.edges[d]);a=this.graph.getBoundingBoxFromGeometry(a,!0);b=[];for(d=0;d<this.swimlanes.length;d++){var e=this.swimlanes[d];var f=this.graph.getCellGeometry(e);if(null!=f){var g=this.graph.getChildCells(e);c=this.graph.isSwimlane(e)?this.graph.getStartSize(e):new mxRectangle;e=this.graph.getBoundingBoxFromGeometry(g);b[d]=e;c=e.y+f.y-c.height-\nthis.parentBorder;f=e.y+f.y+e.height;null==a?a=new mxRectangle(0,c,0,f-c):(a.y=Math.min(a.y,c),a.height=Math.max(a.y+a.height,f)-a.y)}}for(d=0;d<this.swimlanes.length;d++)if(e=this.swimlanes[d],f=this.graph.getCellGeometry(e),null!=f){g=this.graph.getChildCells(e);c=this.graph.isSwimlane(e)?this.graph.getStartSize(e):new mxRectangle;var k=f.clone(),l=c.width+(0==d?this.parentBorder:this.interRankCellSpacing/2),m=b[d].x-l,n=a.y-this.parentBorder;k.x+=m;k.y=n;k.width=b[d].width+l+this.interRankCellSpacing/\n2;k.height=a.height+c.height+2*this.parentBorder;this.graph.model.setGeometry(e,k);this.graph.moveCells(g,-m,f.y-n)}};\nmxSwimlaneLayout.prototype.findRoots=function(a,b){var c=[];if(null!=a&&null!=b){var d=this.graph.model,e=null,f=-1E5,g;for(g in b){var k=b[g];if(null!=k&&d.isVertex(k)&&this.graph.isCellVisible(k)&&d.isAncestor(a,k)){for(var l=this.getEdges(k),m=0,n=0,p=0;p<l.length;p++){var q=this.getVisibleTerminal(l[p],!0);q==k?(q=this.getVisibleTerminal(l[p],!1),d.isAncestor(a,q)&&m++):d.isAncestor(a,q)&&n++}0==n&&0<m&&c.push(k);l=m-n;l>f&&(f=l,e=k)}}0==c.length&&null!=e&&c.push(e)}return c};\nmxSwimlaneLayout.prototype.getEdges=function(a){var b=this.edgesCache.get(a);if(null!=b)return b;var c=this.graph.model;b=[];for(var d=this.graph.isCellCollapsed(a),e=c.getChildCount(a),f=0;f<e;f++){var g=c.getChildAt(a,f);if(this.isPort(g))b=b.concat(c.getEdges(g,!0,!0));else if(d||!this.graph.isCellVisible(g))b=b.concat(c.getEdges(g,!0,!0))}b=b.concat(c.getEdges(a,!0,!0));c=[];for(f=0;f<b.length;f++)d=this.getVisibleTerminal(b[f],!0),e=this.getVisibleTerminal(b[f],!1),(d==e||d!=e&&(e==a&&(null==\nthis.parent||this.graph.isValidAncestor(d,this.parent,this.traverseAncestors))||d==a&&(null==this.parent||this.graph.isValidAncestor(e,this.parent,this.traverseAncestors))))&&c.push(b[f]);this.edgesCache.put(a,c);return c};\nmxSwimlaneLayout.prototype.getVisibleTerminal=function(a,b){var c=this.edgesTargetTermCache;b&&(c=this.edgeSourceTermCache);var d=c.get(a);if(null!=d)return d;d=this.graph.view.getState(a);var e=null!=d?d.getVisibleTerminal(b):this.graph.view.getVisibleTerminal(a,b);null==e&&(e=null!=d?d.getVisibleTerminal(b):this.graph.view.getVisibleTerminal(a,b));null!=e&&(this.isPort(e)&&(e=this.graph.model.getParent(e)),c.put(a,e));return e};\nmxSwimlaneLayout.prototype.run=function(a){var b=[],c={};if(null!=this.swimlanes&&0<this.swimlanes.length&&null!=a){for(var d={},e=0;e<this.swimlanes.length;e++)this.filterDescendants(this.swimlanes[e],d);this.roots=[];e=!0;for(var f in d)if(null!=d[f]){e=!1;break}for(var g=0;!e&&g<this.swimlanes.length;){var k=this.findRoots(this.swimlanes[g],d);if(0==k.length)g++;else{for(e=0;e<k.length;e++){var l={};b.push(l);this.traverse(k[e],!0,null,c,l,b,d,g)}for(e=0;e<k.length;e++)this.roots.push(k[e]);e=\n!0;for(f in d)if(null!=d[f]){e=!1;break}}}}else for(e=0;e<this.roots.length;e++)l={},b.push(l),this.traverse(this.roots[e],!0,null,c,l,b,null);b=[];for(f in c)b.push(c[f]);this.model=new mxSwimlaneModel(this,b,this.roots,a,this.tightenToSource);this.cycleStage(a);this.layeringStage();this.crossingStage(a);this.placementStage(0,a)};\nmxSwimlaneLayout.prototype.filterDescendants=function(a,b){var c=this.graph.model;c.isVertex(a)&&a!=this.parent&&c.getParent(a)!=this.parent&&this.graph.isCellVisible(a)&&(b[mxObjectIdentity.get(a)]=a);if(this.traverseAncestors||a==this.parent&&this.graph.isCellVisible(a))for(var d=c.getChildCount(a),e=0;e<d;e++){var f=c.getChildAt(a,e);this.isPort(f)||this.filterDescendants(f,b)}};mxSwimlaneLayout.prototype.isPort=function(a){return a.geometry.relative?!0:!1};\nmxSwimlaneLayout.prototype.getEdgesBetween=function(a,b,c){c=null!=c?c:!1;for(var d=this.getEdges(a),e=[],f=0;f<d.length;f++){var g=this.getVisibleTerminal(d[f],!0),k=this.getVisibleTerminal(d[f],!1);(g==a&&k==b||!c&&g==b&&k==a)&&e.push(d[f])}return e};\nmxSwimlaneLayout.prototype.traverse=function(a,b,c,d,e,f,g,k){if(null!=a&&null!=d){var l=mxObjectIdentity.get(a);if(null==d[l]&&(null==g||null!=g[l])){null==e[l]&&(e[l]=a);null==d[l]&&(d[l]=a);null!==g&&delete g[l];var m=this.getEdges(a);l=this.graph.model;for(c=0;c<m.length;c++){var n=this.getVisibleTerminal(m[c],!0),p=n==a;p&&(n=this.getVisibleTerminal(m[c],!1));for(var q=0;q<this.swimlanes.length&&!l.isAncestor(this.swimlanes[q],n);)q++;q>=this.swimlanes.length||!(q>k||(!b||p)&&q==k)||(e=this.traverse(n,\nb,m[c],d,e,f,g,q))}}else if(null==e[l])for(c=0;c<f.length;c++)if(a=f[c],null!=a[l]){for(m in a)e[m]=a[m];f.splice(c,1);break}}return e};mxSwimlaneLayout.prototype.cycleStage=function(a){(new mxSwimlaneOrdering(this)).execute(a)};mxSwimlaneLayout.prototype.layeringStage=function(){this.model.initialRank();this.model.fixRanks()};mxSwimlaneLayout.prototype.crossingStage=function(a){(new mxMedianHybridCrossingReduction(this)).execute(a)};\nmxSwimlaneLayout.prototype.placementStage=function(a,b){a=new mxCoordinateAssignment(this,this.intraCellSpacing,this.interRankCellSpacing,this.orientation,a,this.parallelEdgeSpacing);a.fineTuning=this.fineTuning;a.execute(b);return a.limitX+this.interHierarchySpacing};function mxGraphModel(a){this.currentEdit=this.createUndoableEdit();null!=a?this.setRoot(a):this.clear()}mxGraphModel.prototype=new mxEventSource;mxGraphModel.prototype.constructor=mxGraphModel;mxGraphModel.prototype.root=null;\nmxGraphModel.prototype.cells=null;mxGraphModel.prototype.maintainEdgeParent=!0;mxGraphModel.prototype.ignoreRelativeEdgeParent=!0;mxGraphModel.prototype.createIds=!0;mxGraphModel.prototype.prefix=\"\";mxGraphModel.prototype.postfix=\"\";mxGraphModel.prototype.nextId=0;mxGraphModel.prototype.currentEdit=null;mxGraphModel.prototype.updateLevel=0;mxGraphModel.prototype.endingUpdate=!1;mxGraphModel.prototype.clear=function(){this.setRoot(this.createRoot())};mxGraphModel.prototype.isCreateIds=function(){return this.createIds};\nmxGraphModel.prototype.setCreateIds=function(a){this.createIds=a};mxGraphModel.prototype.createRoot=function(){var a=new mxCell;a.insert(new mxCell);return a};mxGraphModel.prototype.getCells=function(){var a=[];if(null!=this.cells)for(var b in this.cells)a.push(this.cells[b]);return a};mxGraphModel.prototype.getCellCount=function(){var a=0;if(null!=this.cells)for(var b in this.cells)a++;return a};mxGraphModel.prototype.getCell=function(a){return null!=this.cells?this.cells[a]:null};\nmxGraphModel.prototype.filterCells=function(a,b){var c=null;if(null!=a){c=[];for(var d=0;d<a.length;d++)b(a[d])&&c.push(a[d])}return c};mxGraphModel.prototype.getDescendants=function(a){return this.filterDescendants(null,a)};mxGraphModel.prototype.filterDescendants=function(a,b){var c=[];b=b||this.getRoot();(null==a||a(b))&&c.push(b);for(var d=this.getChildCount(b),e=0;e<d;e++){var f=this.getChildAt(b,e);c=c.concat(this.filterDescendants(a,f))}return c};\nmxGraphModel.prototype.getRoot=function(a){var b=a||this.root;if(null!=a)for(;null!=a;)b=a,a=this.getParent(a);return b};mxGraphModel.prototype.setRoot=function(a){this.execute(new mxRootChange(this,a));return a};mxGraphModel.prototype.rootChanged=function(a){var b=this.root;this.root=a;this.nextId=0;this.cells=null;this.cellAdded(a);return b};mxGraphModel.prototype.isRoot=function(a){return null!=a&&this.root==a};mxGraphModel.prototype.isLayer=function(a){return this.isRoot(this.getParent(a))};\nmxGraphModel.prototype.isAncestor=function(a,b){for(;null!=b&&b!=a;)b=this.getParent(b);return b==a};mxGraphModel.prototype.contains=function(a){return this.isAncestor(this.root,a)};mxGraphModel.prototype.getParent=function(a){return null!=a?a.getParent():null};mxGraphModel.prototype.add=function(a,b,c){if(b!=a&&null!=a&&null!=b){null==c&&(c=this.getChildCount(a));var d=a!=this.getParent(b);this.execute(new mxChildChange(this,a,b,c));this.maintainEdgeParent&&d&&this.updateEdgeParents(b)}return b};\nmxGraphModel.prototype.cellAdded=function(a){if(null!=a){null==a.getId()&&this.createIds&&a.setId(this.createId(a));if(null!=a.getId()){var b=this.getCell(a.getId());if(b!=a){for(;null!=b;)a.setId(this.createId(a)),b=this.getCell(a.getId());null==this.cells&&(this.cells={});this.cells[a.getId()]=a}}mxUtils.isNumeric(a.getId())&&(this.nextId=Math.max(this.nextId,a.getId()));b=this.getChildCount(a);for(var c=0;c<b;c++)this.cellAdded(this.getChildAt(a,c))}};\nmxGraphModel.prototype.createId=function(a){a=this.nextId;this.nextId++;return this.prefix+a+this.postfix};mxGraphModel.prototype.updateEdgeParents=function(a,b){b=b||this.getRoot(a);for(var c=this.getChildCount(a),d=0;d<c;d++){var e=this.getChildAt(a,d);this.updateEdgeParents(e,b)}e=this.getEdgeCount(a);c=[];for(d=0;d<e;d++)c.push(this.getEdgeAt(a,d));for(d=0;d<c.length;d++)a=c[d],this.isAncestor(b,a)&&this.updateEdgeParent(a,b)};\nmxGraphModel.prototype.updateEdgeParent=function(a,b){for(var c=this.getTerminal(a,!0),d=this.getTerminal(a,!1);null!=c&&!this.isEdge(c)&&null!=c.geometry&&c.geometry.relative;)c=this.getParent(c);for(;null!=d&&this.ignoreRelativeEdgeParent&&!this.isEdge(d)&&null!=d.geometry&&d.geometry.relative;)d=this.getParent(d);if(this.isAncestor(b,c)&&this.isAncestor(b,d)&&(b=c==d?this.getParent(c):this.getNearestCommonAncestor(c,d),null!=b&&(this.getParent(b)!=this.root||this.isAncestor(b,a))&&this.getParent(a)!=\nb)){c=this.getGeometry(a);if(null!=c){var e=this.getOrigin(this.getParent(a)),f=this.getOrigin(b);d=f.x-e.x;e=f.y-e.y;c=c.clone();c.translate(-d,-e);this.setGeometry(a,c)}this.add(b,a,this.getChildCount(b))}};mxGraphModel.prototype.getOrigin=function(a){if(null!=a){var b=this.getOrigin(this.getParent(a));this.isEdge(a)||(a=this.getGeometry(a),null!=a&&(b.x+=a.x,b.y+=a.y))}else b=new mxPoint;return b};\nmxGraphModel.prototype.getNearestCommonAncestor=function(a,b){if(null!=a&&null!=b){var c=mxCellPath.create(b);if(null!=c&&0<c.length){var d=mxCellPath.create(a);c.length<d.length&&(a=b,b=d,d=c,c=b);for(;null!=a;){b=this.getParent(a);if(0==c.indexOf(d+mxCellPath.PATH_SEPARATOR)&&null!=b)return a;d=mxCellPath.getParentPath(d);a=b}}}return null};mxGraphModel.prototype.remove=function(a){a==this.root?this.setRoot(null):null!=this.getParent(a)&&this.execute(new mxChildChange(this,null,a));return a};\nmxGraphModel.prototype.cellRemoved=function(a){if(null!=a&&null!=this.cells){for(var b=this.getChildCount(a)-1;0<=b;b--)this.cellRemoved(this.getChildAt(a,b));null!=this.cells&&null!=a.getId()&&delete this.cells[a.getId()]}};mxGraphModel.prototype.parentForCellChanged=function(a,b,c){var d=this.getParent(a);null!=b?b==d&&d.getIndex(a)==c||b.insert(a,c):null!=d&&(c=d.getIndex(a),d.remove(c));b=this.contains(b);c=this.contains(d);b&&!c?this.cellAdded(a):c&&!b&&this.cellRemoved(a);return d};\nmxGraphModel.prototype.getChildCount=function(a){return null!=a?a.getChildCount():0};mxGraphModel.prototype.getChildAt=function(a,b){return null!=a?a.getChildAt(b):null};mxGraphModel.prototype.getChildren=function(a){return null!=a?a.children:null};mxGraphModel.prototype.getChildVertices=function(a){return this.getChildCells(a,!0,!1)};mxGraphModel.prototype.getChildEdges=function(a){return this.getChildCells(a,!1,!0)};\nmxGraphModel.prototype.getChildCells=function(a,b,c){b=null!=b?b:!1;c=null!=c?c:!1;for(var d=this.getChildCount(a),e=[],f=0;f<d;f++){var g=this.getChildAt(a,f);(!c&&!b||c&&this.isEdge(g)||b&&this.isVertex(g))&&e.push(g)}return e};mxGraphModel.prototype.getTerminal=function(a,b){return null!=a?a.getTerminal(b):null};\nmxGraphModel.prototype.setTerminal=function(a,b,c){var d=b!=this.getTerminal(a,c);this.execute(new mxTerminalChange(this,a,b,c));this.maintainEdgeParent&&d&&this.updateEdgeParent(a,this.getRoot());return b};mxGraphModel.prototype.setTerminals=function(a,b,c){this.beginUpdate();try{this.setTerminal(a,b,!0),this.setTerminal(a,c,!1)}finally{this.endUpdate()}};\nmxGraphModel.prototype.terminalForCellChanged=function(a,b,c){var d=this.getTerminal(a,c);null!=b?b.insertEdge(a,c):null!=d&&d.removeEdge(a,c);return d};mxGraphModel.prototype.getEdgeCount=function(a){return null!=a?a.getEdgeCount():0};mxGraphModel.prototype.getEdgeAt=function(a,b){return null!=a?a.getEdgeAt(b):null};mxGraphModel.prototype.getDirectedEdgeCount=function(a,b,c){for(var d=0,e=this.getEdgeCount(a),f=0;f<e;f++){var g=this.getEdgeAt(a,f);g!=c&&this.getTerminal(g,b)==a&&d++}return d};\nmxGraphModel.prototype.getConnections=function(a){return this.getEdges(a,!0,!0,!1)};mxGraphModel.prototype.getIncomingEdges=function(a){return this.getEdges(a,!0,!1,!1)};mxGraphModel.prototype.getOutgoingEdges=function(a){return this.getEdges(a,!1,!0,!1)};\nmxGraphModel.prototype.getEdges=function(a,b,c,d){b=null!=b?b:!0;c=null!=c?c:!0;d=null!=d?d:!0;for(var e=this.getEdgeCount(a),f=[],g=0;g<e;g++){var k=this.getEdgeAt(a,g),l=this.getTerminal(k,!0),m=this.getTerminal(k,!1);(d&&l==m||l!=m&&(b&&m==a||c&&l==a))&&f.push(k)}return f};\nmxGraphModel.prototype.getEdgesBetween=function(a,b,c){c=null!=c?c:!1;var d=this.getEdgeCount(a),e=this.getEdgeCount(b),f=a,g=d;e<d&&(g=e,f=b);d=[];for(e=0;e<g;e++){var k=this.getEdgeAt(f,e),l=this.getTerminal(k,!0),m=this.getTerminal(k,!1),n=m==a&&l==b;(l==a&&m==b||!c&&n)&&d.push(k)}return d};\nmxGraphModel.prototype.getOpposites=function(a,b,c,d){c=null!=c?c:!0;d=null!=d?d:!0;var e=[];if(null!=a)for(var f=0;f<a.length;f++){var g=this.getTerminal(a[f],!0),k=this.getTerminal(a[f],!1);g==b&&null!=k&&k!=b&&d?e.push(k):k==b&&null!=g&&g!=b&&c&&e.push(g)}return e};\nmxGraphModel.prototype.getTopmostCells=function(a){for(var b=new mxDictionary,c=[],d=0;d<a.length;d++)b.put(a[d],!0);for(d=0;d<a.length;d++){for(var e=a[d],f=!0,g=this.getParent(e);null!=g;){if(b.get(g)){f=!1;break}g=this.getParent(g)}f&&c.push(e)}return c};mxGraphModel.prototype.isVertex=function(a){return null!=a?a.isVertex():!1};mxGraphModel.prototype.isEdge=function(a){return null!=a?a.isEdge():!1};mxGraphModel.prototype.isConnectable=function(a){return null!=a?a.isConnectable():!1};\nmxGraphModel.prototype.getValue=function(a){return null!=a?a.getValue():null};mxGraphModel.prototype.setValue=function(a,b){this.execute(new mxValueChange(this,a,b));return b};mxGraphModel.prototype.valueForCellChanged=function(a,b){return a.valueChanged(b)};mxGraphModel.prototype.getGeometry=function(a){return null!=a?a.getGeometry():null};mxGraphModel.prototype.setGeometry=function(a,b){b!=this.getGeometry(a)&&this.execute(new mxGeometryChange(this,a,b));return b};\nmxGraphModel.prototype.geometryForCellChanged=function(a,b){var c=this.getGeometry(a);a.setGeometry(b);return c};mxGraphModel.prototype.getStyle=function(a){return null!=a?a.getStyle():null};mxGraphModel.prototype.setStyle=function(a,b){b!=this.getStyle(a)&&this.execute(new mxStyleChange(this,a,b));return b};mxGraphModel.prototype.styleForCellChanged=function(a,b){var c=this.getStyle(a);a.setStyle(b);return c};mxGraphModel.prototype.isCollapsed=function(a){return null!=a?a.isCollapsed():!1};\nmxGraphModel.prototype.setCollapsed=function(a,b){b!=this.isCollapsed(a)&&this.execute(new mxCollapseChange(this,a,b));return b};mxGraphModel.prototype.collapsedStateForCellChanged=function(a,b){var c=this.isCollapsed(a);a.setCollapsed(b);return c};mxGraphModel.prototype.isVisible=function(a){return null!=a?a.isVisible():!1};mxGraphModel.prototype.setVisible=function(a,b){b!=this.isVisible(a)&&this.execute(new mxVisibleChange(this,a,b));return b};\nmxGraphModel.prototype.visibleStateForCellChanged=function(a,b){var c=this.isVisible(a);a.setVisible(b);return c};mxGraphModel.prototype.execute=function(a){a.execute();this.beginUpdate();this.currentEdit.add(a);this.fireEvent(new mxEventObject(mxEvent.EXECUTE,\"change\",a));this.fireEvent(new mxEventObject(mxEvent.EXECUTED,\"change\",a));this.endUpdate()};mxGraphModel.prototype.beginUpdate=function(){this.updateLevel++;this.fireEvent(new mxEventObject(mxEvent.BEGIN_UPDATE));1==this.updateLevel&&this.fireEvent(new mxEventObject(mxEvent.START_EDIT))};\nmxGraphModel.prototype.endUpdate=function(){this.updateLevel--;0==this.updateLevel&&this.fireEvent(new mxEventObject(mxEvent.END_EDIT));if(!this.endingUpdate){this.endingUpdate=0==this.updateLevel;this.fireEvent(new mxEventObject(mxEvent.END_UPDATE,\"edit\",this.currentEdit));try{if(this.endingUpdate&&!this.currentEdit.isEmpty()){this.fireEvent(new mxEventObject(mxEvent.BEFORE_UNDO,\"edit\",this.currentEdit));var a=this.currentEdit;this.currentEdit=this.createUndoableEdit();a.notify();this.fireEvent(new mxEventObject(mxEvent.UNDO,\n\"edit\",a))}}finally{this.endingUpdate=!1}}};mxGraphModel.prototype.createUndoableEdit=function(a){var b=new mxUndoableEdit(this,null!=a?a:!0);b.notify=function(){b.source.fireEvent(new mxEventObject(mxEvent.CHANGE,\"edit\",b,\"changes\",b.changes));b.source.fireEvent(new mxEventObject(mxEvent.NOTIFY,\"edit\",b,\"changes\",b.changes))};return b};\nmxGraphModel.prototype.mergeChildren=function(a,b,c){c=null!=c?c:!0;this.beginUpdate();try{var d={};this.mergeChildrenImpl(a,b,c,d);for(var e in d){var f=d[e],g=this.getTerminal(f,!0);null!=g&&(g=d[mxCellPath.create(g)],this.setTerminal(f,g,!0));g=this.getTerminal(f,!1);null!=g&&(g=d[mxCellPath.create(g)],this.setTerminal(f,g,!1))}}finally{this.endUpdate()}};\nmxGraphModel.prototype.mergeChildrenImpl=function(a,b,c,d){this.beginUpdate();try{for(var e=a.getChildCount(),f=0;f<e;f++){var g=a.getChildAt(f);if(\"function\"==typeof g.getId){var k=g.getId(),l=null==k||this.isEdge(g)&&c?null:this.getCell(k);if(null==l){var m=g.clone();m.setId(k);m.setTerminal(g.getTerminal(!0),!0);m.setTerminal(g.getTerminal(!1),!1);l=b.insert(m);this.cellAdded(l)}d[mxCellPath.create(g)]=l;this.mergeChildrenImpl(g,l,c,d)}}}finally{this.endUpdate()}};\nmxGraphModel.prototype.getParents=function(a){var b=[];if(null!=a)for(var c=new mxDictionary,d=0;d<a.length;d++){var e=this.getParent(a[d]);null==e||c.get(e)||(c.put(e,!0),b.push(e))}return b};mxGraphModel.prototype.cloneCell=function(a,b,c){return null!=a?this.cloneCells([a],b,null,c)[0]:null};\nmxGraphModel.prototype.cloneCells=function(a,b,c,d){b=null!=b?b:!0;c=null!=c?c:{};d=null!=d?d:!1;for(var e=[],f=0;f<a.length;f++)null!=a[f]?e.push(this.cloneCellImpl(a[f],c,b,d)):e.push(null);for(f=0;f<e.length;f++)null!=e[f]&&this.restoreClone(e[f],a[f],c);return e};\nmxGraphModel.prototype.cloneCellImpl=function(a,b,c,d){var e=mxObjectIdentity.get(a),f=b[e];if(null==f&&(f=this.cellCloned(a),b[e]=f,d&&(f.id=a.id),c))for(c=this.getChildCount(a),e=0;e<c;e++){var g=this.cloneCellImpl(this.getChildAt(a,e),b,!0,d);f.insert(g)}return f};mxGraphModel.prototype.cellCloned=function(a){return a.clone()};\nmxGraphModel.prototype.restoreClone=function(a,b,c){var d=this.getTerminal(b,!0);null!=d&&(d=c[mxObjectIdentity.get(d)],null!=d&&d.insertEdge(a,!0));d=this.getTerminal(b,!1);null!=d&&(d=c[mxObjectIdentity.get(d)],null!=d&&d.insertEdge(a,!1));d=this.getChildCount(a);for(var e=0;e<d;e++)this.restoreClone(this.getChildAt(a,e),this.getChildAt(b,e),c)};function mxRootChange(a,b){this.model=a;this.previous=this.root=b}mxRootChange.prototype.execute=function(){this.root=this.previous;this.previous=this.model.rootChanged(this.previous)};\nfunction mxChildChange(a,b,c,d){this.model=a;this.previous=this.parent=b;this.child=c;this.previousIndex=this.index=d}\nmxChildChange.prototype.execute=function(){if(null!=this.child){var a=this.model.getParent(this.child),b=null!=a?a.getIndex(this.child):0;null==this.previous&&this.connect(this.child,!1);a=this.model.parentForCellChanged(this.child,this.previous,this.previousIndex);null!=this.previous&&this.connect(this.child,!0);this.parent=this.previous;this.previous=a;this.index=this.previousIndex;this.previousIndex=b}};\nmxChildChange.prototype.connect=function(a,b){b=null!=b?b:!0;var c=a.getTerminal(!0),d=a.getTerminal(!1);null!=c&&(b?this.model.terminalForCellChanged(a,c,!0):this.model.terminalForCellChanged(a,null,!0));null!=d&&(b?this.model.terminalForCellChanged(a,d,!1):this.model.terminalForCellChanged(a,null,!1));a.setTerminal(c,!0);a.setTerminal(d,!1);c=this.model.getChildCount(a);for(d=0;d<c;d++)this.connect(this.model.getChildAt(a,d),b)};\nfunction mxTerminalChange(a,b,c,d){this.model=a;this.cell=b;this.previous=this.terminal=c;this.source=d}mxTerminalChange.prototype.execute=function(){null!=this.cell&&(this.terminal=this.previous,this.previous=this.model.terminalForCellChanged(this.cell,this.previous,this.source))};function mxValueChange(a,b,c){this.model=a;this.cell=b;this.previous=this.value=c}\nmxValueChange.prototype.execute=function(){null!=this.cell&&(this.value=this.previous,this.previous=this.model.valueForCellChanged(this.cell,this.previous))};function mxStyleChange(a,b,c){this.model=a;this.cell=b;this.previous=this.style=c}mxStyleChange.prototype.execute=function(){null!=this.cell&&(this.style=this.previous,this.previous=this.model.styleForCellChanged(this.cell,this.previous))};function mxGeometryChange(a,b,c){this.model=a;this.cell=b;this.previous=this.geometry=c}\nmxGeometryChange.prototype.execute=function(){null!=this.cell&&(this.geometry=this.previous,this.previous=this.model.geometryForCellChanged(this.cell,this.previous))};function mxCollapseChange(a,b,c){this.model=a;this.cell=b;this.previous=this.collapsed=c}mxCollapseChange.prototype.execute=function(){null!=this.cell&&(this.collapsed=this.previous,this.previous=this.model.collapsedStateForCellChanged(this.cell,this.previous))};\nfunction mxVisibleChange(a,b,c){this.model=a;this.cell=b;this.previous=this.visible=c}mxVisibleChange.prototype.execute=function(){null!=this.cell&&(this.visible=this.previous,this.previous=this.model.visibleStateForCellChanged(this.cell,this.previous))};function mxCellAttributeChange(a,b,c){this.cell=a;this.attribute=b;this.previous=this.value=c}\nmxCellAttributeChange.prototype.execute=function(){if(null!=this.cell){var a=this.cell.getAttribute(this.attribute);null==this.previous?this.cell.value.removeAttribute(this.attribute):this.cell.setAttribute(this.attribute,this.previous);this.previous=a}};function mxCell(a,b,c){this.value=a;this.setGeometry(b);this.setStyle(c);if(null!=this.onInit)this.onInit()}mxCell.prototype.id=null;mxCell.prototype.value=null;mxCell.prototype.geometry=null;mxCell.prototype.style=null;mxCell.prototype.vertex=!1;\nmxCell.prototype.edge=!1;mxCell.prototype.connectable=!0;mxCell.prototype.visible=!0;mxCell.prototype.collapsed=!1;mxCell.prototype.parent=null;mxCell.prototype.source=null;mxCell.prototype.target=null;mxCell.prototype.children=null;mxCell.prototype.edges=null;mxCell.prototype.mxTransient=\"id value parent source target children edges\".split(\" \");mxCell.prototype.getId=function(){return this.id};mxCell.prototype.setId=function(a){this.id=a};mxCell.prototype.getValue=function(){return this.value};\nmxCell.prototype.setValue=function(a){this.value=a};mxCell.prototype.valueChanged=function(a){var b=this.getValue();this.setValue(a);return b};mxCell.prototype.getGeometry=function(){return this.geometry};mxCell.prototype.setGeometry=function(a){this.geometry=a};mxCell.prototype.getStyle=function(){return this.style};mxCell.prototype.setStyle=function(a){this.style=a};mxCell.prototype.isVertex=function(){return 0!=this.vertex};mxCell.prototype.setVertex=function(a){this.vertex=a};\nmxCell.prototype.isEdge=function(){return 0!=this.edge};mxCell.prototype.setEdge=function(a){this.edge=a};mxCell.prototype.isConnectable=function(){return 0!=this.connectable};mxCell.prototype.setConnectable=function(a){this.connectable=a};mxCell.prototype.isVisible=function(){return 0!=this.visible};mxCell.prototype.setVisible=function(a){this.visible=a};mxCell.prototype.isCollapsed=function(){return 0!=this.collapsed};mxCell.prototype.setCollapsed=function(a){this.collapsed=a};\nmxCell.prototype.getParent=function(){return this.parent};mxCell.prototype.setParent=function(a){this.parent=a};mxCell.prototype.getTerminal=function(a){return a?this.source:this.target};mxCell.prototype.setTerminal=function(a,b){b?this.source=a:this.target=a;return a};mxCell.prototype.getChildCount=function(){return null==this.children?0:this.children.length};mxCell.prototype.getIndex=function(a){return mxUtils.indexOf(this.children,a)};\nmxCell.prototype.getChildAt=function(a){return null==this.children?null:this.children[a]};mxCell.prototype.insert=function(a,b){null!=a&&(null==b&&(b=this.getChildCount(),a.getParent()==this&&b--),a.removeFromParent(),a.setParent(this),null==this.children?(this.children=[],this.children.push(a)):this.children.splice(b,0,a));return a};mxCell.prototype.remove=function(a){var b=null;null!=this.children&&0<=a&&(b=this.getChildAt(a),null!=b&&(this.children.splice(a,1),b.setParent(null)));return b};\nmxCell.prototype.removeFromParent=function(){if(null!=this.parent){var a=this.parent.getIndex(this);this.parent.remove(a)}};mxCell.prototype.getEdgeCount=function(){return null==this.edges?0:this.edges.length};mxCell.prototype.getEdgeIndex=function(a){return mxUtils.indexOf(this.edges,a)};mxCell.prototype.getEdgeAt=function(a){return null==this.edges?null:this.edges[a]};\nmxCell.prototype.insertEdge=function(a,b){null!=a&&(a.removeFromTerminal(b),a.setTerminal(this,b),null==this.edges||a.getTerminal(!b)!=this||0>mxUtils.indexOf(this.edges,a))&&(null==this.edges&&(this.edges=[]),this.edges.push(a));return a};mxCell.prototype.removeEdge=function(a,b){if(null!=a){if(a.getTerminal(!b)!=this&&null!=this.edges){var c=this.getEdgeIndex(a);0<=c&&this.edges.splice(c,1)}a.setTerminal(null,b)}return a};\nmxCell.prototype.removeFromTerminal=function(a){var b=this.getTerminal(a);null!=b&&b.removeEdge(this,a)};mxCell.prototype.hasAttribute=function(a){var b=this.getValue();return null!=b&&b.nodeType==mxConstants.NODETYPE_ELEMENT&&b.hasAttribute?b.hasAttribute(a):null!=b.getAttribute(a)};mxCell.prototype.getAttribute=function(a,b){var c=this.getValue();a=null!=c&&c.nodeType==mxConstants.NODETYPE_ELEMENT?c.getAttribute(a):null;return null!=a?a:b};\nmxCell.prototype.setAttribute=function(a,b){var c=this.getValue();null!=c&&c.nodeType==mxConstants.NODETYPE_ELEMENT&&c.setAttribute(a,b)};mxCell.prototype.clone=function(){var a=mxUtils.clone(this,this.mxTransient);a.setValue(this.cloneValue());return a};mxCell.prototype.cloneValue=function(a){a=null!=a?a:this.getValue();null!=a&&(\"function\"==typeof a.clone?a=a.clone():isNaN(a.nodeType)||(a=a.cloneNode(!0)));return a};function mxGeometry(a,b,c,d){mxRectangle.call(this,a,b,c,d)}\nmxGeometry.prototype=new mxRectangle;mxGeometry.prototype.constructor=mxGeometry;mxGeometry.prototype.TRANSLATE_CONTROL_POINTS=!0;mxGeometry.prototype.alternateBounds=null;mxGeometry.prototype.sourcePoint=null;mxGeometry.prototype.targetPoint=null;mxGeometry.prototype.points=null;mxGeometry.prototype.offset=null;mxGeometry.prototype.relative=!1;\nmxGeometry.prototype.swap=function(){if(null!=this.alternateBounds){var a=new mxRectangle(this.x,this.y,this.width,this.height);this.x=this.alternateBounds.x;this.y=this.alternateBounds.y;this.width=this.alternateBounds.width;this.height=this.alternateBounds.height;this.alternateBounds=a}};mxGeometry.prototype.getTerminalPoint=function(a){return a?this.sourcePoint:this.targetPoint};mxGeometry.prototype.setTerminalPoint=function(a,b){b?this.sourcePoint=a:this.targetPoint=a;return a};\nmxGeometry.prototype.rotate=function(a,b){var c=mxUtils.toRadians(a);a=Math.cos(c);c=Math.sin(c);if(!this.relative){var d=new mxPoint(this.getCenterX(),this.getCenterY());d=mxUtils.getRotatedPoint(d,a,c,b);this.x=Math.round(d.x-this.width/2);this.y=Math.round(d.y-this.height/2)}null!=this.sourcePoint&&(d=mxUtils.getRotatedPoint(this.sourcePoint,a,c,b),this.sourcePoint.x=Math.round(d.x),this.sourcePoint.y=Math.round(d.y));null!=this.targetPoint&&(d=mxUtils.getRotatedPoint(this.targetPoint,a,c,b),this.targetPoint.x=\nMath.round(d.x),this.targetPoint.y=Math.round(d.y));if(null!=this.points)for(var e=0;e<this.points.length;e++)null!=this.points[e]&&(d=mxUtils.getRotatedPoint(this.points[e],a,c,b),this.points[e].x=Math.round(d.x),this.points[e].y=Math.round(d.y))};\nmxGeometry.prototype.translate=function(a,b,c){a=parseFloat(a);b=parseFloat(b);this.relative||c||(this.x=parseFloat(this.x)+a,this.y=parseFloat(this.y)+b);null!=this.sourcePoint&&(this.sourcePoint.x=parseFloat(this.sourcePoint.x)+a,this.sourcePoint.y=parseFloat(this.sourcePoint.y)+b);null!=this.targetPoint&&(this.targetPoint.x=parseFloat(this.targetPoint.x)+a,this.targetPoint.y=parseFloat(this.targetPoint.y)+b);if(this.TRANSLATE_CONTROL_POINTS&&null!=this.points)for(c=0;c<this.points.length;c++)null!=\nthis.points[c]&&(this.points[c].x=parseFloat(this.points[c].x)+a,this.points[c].y=parseFloat(this.points[c].y)+b)};\nmxGeometry.prototype.scale=function(a,b,c){a=parseFloat(a);b=parseFloat(b);null!=this.sourcePoint&&(this.sourcePoint.x=parseFloat(this.sourcePoint.x)*a,this.sourcePoint.y=parseFloat(this.sourcePoint.y)*b);null!=this.targetPoint&&(this.targetPoint.x=parseFloat(this.targetPoint.x)*a,this.targetPoint.y=parseFloat(this.targetPoint.y)*b);if(null!=this.points)for(var d=0;d<this.points.length;d++)null!=this.points[d]&&(this.points[d].x=parseFloat(this.points[d].x)*a,this.points[d].y=parseFloat(this.points[d].y)*\nb);this.relative||(this.x=parseFloat(this.x)*a,this.y=parseFloat(this.y)*b,c&&(b=a=Math.min(a,b)),this.width=parseFloat(this.width)*a,this.height=parseFloat(this.height)*b)};\nmxGeometry.prototype.equals=function(a){return mxRectangle.prototype.equals.apply(this,arguments)&&this.relative==a.relative&&(null==this.sourcePoint&&null==a.sourcePoint||null!=this.sourcePoint&&this.sourcePoint.equals(a.sourcePoint))&&(null==this.targetPoint&&null==a.targetPoint||null!=this.targetPoint&&this.targetPoint.equals(a.targetPoint))&&(null==this.points&&null==a.points||null!=this.points&&mxUtils.equalPoints(this.points,a.points))&&(null==this.alternateBounds&&null==a.alternateBounds||\nnull!=this.alternateBounds&&this.alternateBounds.equals(a.alternateBounds))&&(null==this.offset&&null==a.offset||null!=this.offset&&this.offset.equals(a.offset))};\nvar mxCellPath={PATH_SEPARATOR:\".\",create:function(a){var b=\"\";if(null!=a)for(var c=a.getParent();null!=c;)b=c.getIndex(a)+mxCellPath.PATH_SEPARATOR+b,a=c,c=a.getParent();a=b.length;1<a&&(b=b.substring(0,a-1));return b},getParentPath:function(a){if(null!=a){var b=a.lastIndexOf(mxCellPath.PATH_SEPARATOR);if(0<=b)return a.substring(0,b);if(0<a.length)return\"\"}return null},resolve:function(a,b){if(null!=b){b=b.split(mxCellPath.PATH_SEPARATOR);for(var c=0;c<b.length;c++)a=a.getChildAt(parseInt(b[c]))}return a},\ncompare:function(a,b){for(var c=Math.min(a.length,b.length),d=0,e=0;e<c;e++)if(a[e]!=b[e]){0==a[e].length||0==b[e].length?d=a[e]==b[e]?0:a[e]>b[e]?1:-1:(c=parseInt(a[e]),e=parseInt(b[e]),d=c==e?0:c>e?1:-1);break}0==d&&(c=a.length,e=b.length,c!=e&&(d=c>e?1:-1));return d}},mxPerimeter={RectanglePerimeter:function(a,b,c,d){b=a.getCenterX();var e=a.getCenterY(),f=Math.atan2(c.y-e,c.x-b),g=new mxPoint(0,0),k=Math.PI,l=Math.PI/2-f,m=Math.atan2(a.height,a.width);f<-k+m||f>k-m?(g.x=a.x,g.y=e-a.width*Math.tan(f)/\n2):f<-m?(g.y=a.y,g.x=b-a.height*Math.tan(l)/2):f<m?(g.x=a.x+a.width,g.y=e+a.width*Math.tan(f)/2):(g.y=a.y+a.height,g.x=b+a.height*Math.tan(l)/2);d&&(c.x>=a.x&&c.x<=a.x+a.width?g.x=c.x:c.y>=a.y&&c.y<=a.y+a.height&&(g.y=c.y),c.x<a.x?g.x=a.x:c.x>a.x+a.width&&(g.x=a.x+a.width),c.y<a.y?g.y=a.y:c.y>a.y+a.height&&(g.y=a.y+a.height));return g},EllipsePerimeter:function(a,b,c,d){var e=a.x,f=a.y,g=a.width/2,k=a.height/2,l=e+g,m=f+k;b=c.x;c=c.y;var n=parseInt(b-l),p=parseInt(c-m);if(0==n&&0!=p)return new mxPoint(l,\nm+k*p/Math.abs(p));if(0==n&&0==p)return new mxPoint(b,c);if(d){if(c>=f&&c<=f+a.height)return a=c-m,a=Math.sqrt(g*g*(1-a*a/(k*k)))||0,b<=e&&(a=-a),new mxPoint(l+a,c);if(b>=e&&b<=e+a.width)return a=b-l,a=Math.sqrt(k*k*(1-a*a/(g*g)))||0,c<=f&&(a=-a),new mxPoint(b,m+a)}e=p/n;m-=e*l;f=g*g*e*e+k*k;a=-2*l*f;k=Math.sqrt(a*a-4*f*(g*g*e*e*l*l+k*k*l*l-g*g*k*k));g=(-a+k)/(2*f);l=(-a-k)/(2*f);k=e*g+m;m=e*l+m;Math.sqrt(Math.pow(g-b,2)+Math.pow(k-c,2))<Math.sqrt(Math.pow(l-b,2)+Math.pow(m-c,2))?(b=g,c=k):(b=l,c=\nm);return new mxPoint(b,c)},RhombusPerimeter:function(a,b,c,d){b=a.x;var e=a.y,f=a.width;a=a.height;var g=b+f/2,k=e+a/2,l=c.x;c=c.y;if(g==l)return k>c?new mxPoint(g,e):new mxPoint(g,e+a);if(k==c)return g>l?new mxPoint(b,k):new mxPoint(b+f,k);var m=g,n=k;d&&(l>=b&&l<=b+f?m=l:c>=e&&c<=e+a&&(n=c));return l<g?c<k?mxUtils.intersection(l,c,m,n,g,e,b,k):mxUtils.intersection(l,c,m,n,g,e+a,b,k):c<k?mxUtils.intersection(l,c,m,n,g,e,b+f,k):mxUtils.intersection(l,c,m,n,g,e+a,b+f,k)},TrianglePerimeter:function(a,\nb,c,d){b=null!=b?b.style[mxConstants.STYLE_DIRECTION]:null;var e=b==mxConstants.DIRECTION_NORTH||b==mxConstants.DIRECTION_SOUTH,f=a.x,g=a.y,k=a.width,l=a.height;a=f+k/2;var m=g+l/2,n=new mxPoint(f,g),p=new mxPoint(f+k,m),q=new mxPoint(f,g+l);b==mxConstants.DIRECTION_NORTH?(n=q,p=new mxPoint(a,g),q=new mxPoint(f+k,g+l)):b==mxConstants.DIRECTION_SOUTH?(p=new mxPoint(a,g+l),q=new mxPoint(f+k,g)):b==mxConstants.DIRECTION_WEST&&(n=new mxPoint(f+k,g),p=new mxPoint(f,m),q=new mxPoint(f+k,g+l));var r=c.x-\na,t=c.y-m;r=e?Math.atan2(r,t):Math.atan2(t,r);t=e?Math.atan2(k,l):Math.atan2(l,k);(b==mxConstants.DIRECTION_NORTH||b==mxConstants.DIRECTION_WEST?r>-t&&r<t:r<-Math.PI+t||r>Math.PI-t)?c=d&&(e&&c.x>=n.x&&c.x<=q.x||!e&&c.y>=n.y&&c.y<=q.y)?e?new mxPoint(c.x,n.y):new mxPoint(n.x,c.y):b==mxConstants.DIRECTION_NORTH?new mxPoint(f+k/2+l*Math.tan(r)/2,g+l):b==mxConstants.DIRECTION_SOUTH?new mxPoint(f+k/2-l*Math.tan(r)/2,g):b==mxConstants.DIRECTION_WEST?new mxPoint(f+k,g+l/2+k*Math.tan(r)/2):new mxPoint(f,g+\nl/2-k*Math.tan(r)/2):(d&&(d=new mxPoint(a,m),c.y>=g&&c.y<=g+l?(d.x=e?a:b==mxConstants.DIRECTION_WEST?f+k:f,d.y=c.y):c.x>=f&&c.x<=f+k&&(d.x=c.x,d.y=e?b==mxConstants.DIRECTION_NORTH?g+l:g:m),a=d.x,m=d.y),c=e&&c.x<=f+k/2||!e&&c.y<=g+l/2?mxUtils.intersection(c.x,c.y,a,m,n.x,n.y,p.x,p.y):mxUtils.intersection(c.x,c.y,a,m,p.x,p.y,q.x,q.y));null==c&&(c=new mxPoint(a,m));return c},HexagonPerimeter:function(a,b,c,d){var e=a.x,f=a.y,g=a.width,k=a.height,l=a.getCenterX();a=a.getCenterY();var m=c.x,n=c.y,p=-Math.atan2(n-\na,m-l),q=Math.PI,r=Math.PI/2;new mxPoint(l,a);b=null!=b?mxUtils.getValue(b.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;var t=b==mxConstants.DIRECTION_NORTH||b==mxConstants.DIRECTION_SOUTH;b=new mxPoint;var u=new mxPoint;if(m<e&&n<f||m<e&&n>f+k||m>e+g&&n<f||m>e+g&&n>f+k)d=!1;if(d){if(t){if(m==l){if(n<=f)return new mxPoint(l,f);if(n>=f+k)return new mxPoint(l,f+k)}else if(m<e){if(n==f+k/4)return new mxPoint(e,f+k/4);if(n==f+3*k/4)return new mxPoint(e,f+3*\nk/4)}else if(m>e+g){if(n==f+k/4)return new mxPoint(e+g,f+k/4);if(n==f+3*k/4)return new mxPoint(e+g,f+3*k/4)}else if(m==e){if(n<a)return new mxPoint(e,f+k/4);if(n>a)return new mxPoint(e,f+3*k/4)}else if(m==e+g){if(n<a)return new mxPoint(e+g,f+k/4);if(n>a)return new mxPoint(e+g,f+3*k/4)}if(n==f)return new mxPoint(l,f);if(n==f+k)return new mxPoint(l,f+k);m<l?n>f+k/4&&n<f+3*k/4?(b=new mxPoint(e,f),u=new mxPoint(e,f+k)):n<f+k/4?(b=new mxPoint(e-Math.floor(.5*g),f+Math.floor(.5*k)),u=new mxPoint(e+g,f-\nMath.floor(.25*k))):n>f+3*k/4&&(b=new mxPoint(e-Math.floor(.5*g),f+Math.floor(.5*k)),u=new mxPoint(e+g,f+Math.floor(1.25*k))):m>l&&(n>f+k/4&&n<f+3*k/4?(b=new mxPoint(e+g,f),u=new mxPoint(e+g,f+k)):n<f+k/4?(b=new mxPoint(e,f-Math.floor(.25*k)),u=new mxPoint(e+Math.floor(1.5*g),f+Math.floor(.5*k))):n>f+3*k/4&&(b=new mxPoint(e+Math.floor(1.5*g),f+Math.floor(.5*k)),u=new mxPoint(e,f+Math.floor(1.25*k))))}else{if(n==a){if(m<=e)return new mxPoint(e,f+k/2);if(m>=e+g)return new mxPoint(e+g,f+k/2)}else if(n<\nf){if(m==e+g/4)return new mxPoint(e+g/4,f);if(m==e+3*g/4)return new mxPoint(e+3*g/4,f)}else if(n>f+k){if(m==e+g/4)return new mxPoint(e+g/4,f+k);if(m==e+3*g/4)return new mxPoint(e+3*g/4,f+k)}else if(n==f){if(m<l)return new mxPoint(e+g/4,f);if(m>l)return new mxPoint(e+3*g/4,f)}else if(n==f+k){if(m<l)return new mxPoint(e+g/4,f+k);if(n>a)return new mxPoint(e+3*g/4,f+k)}if(m==e)return new mxPoint(e,a);if(m==e+g)return new mxPoint(e+g,a);n<a?m>e+g/4&&m<e+3*g/4?(b=new mxPoint(e,f),u=new mxPoint(e+g,f)):\nm<e+g/4?(b=new mxPoint(e-Math.floor(.25*g),f+k),u=new mxPoint(e+Math.floor(.5*g),f-Math.floor(.5*k))):m>e+3*g/4&&(b=new mxPoint(e+Math.floor(.5*g),f-Math.floor(.5*k)),u=new mxPoint(e+Math.floor(1.25*g),f+k)):n>a&&(m>e+g/4&&m<e+3*g/4?(b=new mxPoint(e,f+k),u=new mxPoint(e+g,f+k)):m<e+g/4?(b=new mxPoint(e-Math.floor(.25*g),f),u=new mxPoint(e+Math.floor(.5*g),f+Math.floor(1.5*k))):m>e+3*g/4&&(b=new mxPoint(e+Math.floor(.5*g),f+Math.floor(1.5*k)),u=new mxPoint(e+Math.floor(1.25*g),f)))}d=l;p=a;m>=e&&m<=\ne+g?(d=m,p=n<a?f+k:f):n>=f&&n<=f+k&&(p=n,d=m<l?e+g:e);c=mxUtils.intersection(d,p,c.x,c.y,b.x,b.y,u.x,u.y)}else{if(t){m=Math.atan2(k/4,g/2);if(p==m)return new mxPoint(e+g,f+Math.floor(.25*k));if(p==r)return new mxPoint(e+Math.floor(.5*g),f);if(p==q-m)return new mxPoint(e,f+Math.floor(.25*k));if(p==-m)return new mxPoint(e+g,f+Math.floor(.75*k));if(p==-r)return new mxPoint(e+Math.floor(.5*g),f+k);if(p==-q+m)return new mxPoint(e,f+Math.floor(.75*k));p<m&&p>-m?(b=new mxPoint(e+g,f),u=new mxPoint(e+g,f+\nk)):p>m&&p<r?(b=new mxPoint(e,f-Math.floor(.25*k)),u=new mxPoint(e+Math.floor(1.5*g),f+Math.floor(.5*k))):p>r&&p<q-m?(b=new mxPoint(e-Math.floor(.5*g),f+Math.floor(.5*k)),u=new mxPoint(e+g,f-Math.floor(.25*k))):p>q-m&&p<=q||p<-q+m&&p>=-q?(b=new mxPoint(e,f),u=new mxPoint(e,f+k)):p<-m&&p>-r?(b=new mxPoint(e+Math.floor(1.5*g),f+Math.floor(.5*k)),u=new mxPoint(e,f+Math.floor(1.25*k))):p<-r&&p>-q+m&&(b=new mxPoint(e-Math.floor(.5*g),f+Math.floor(.5*k)),u=new mxPoint(e+g,f+Math.floor(1.25*k)))}else{m=\nMath.atan2(k/2,g/4);if(p==m)return new mxPoint(e+Math.floor(.75*g),f);if(p==q-m)return new mxPoint(e+Math.floor(.25*g),f);if(p==q||p==-q)return new mxPoint(e,f+Math.floor(.5*k));if(0==p)return new mxPoint(e+g,f+Math.floor(.5*k));if(p==-m)return new mxPoint(e+Math.floor(.75*g),f+k);if(p==-q+m)return new mxPoint(e+Math.floor(.25*g),f+k);0<p&&p<m?(b=new mxPoint(e+Math.floor(.5*g),f-Math.floor(.5*k)),u=new mxPoint(e+Math.floor(1.25*g),f+k)):p>m&&p<q-m?(b=new mxPoint(e,f),u=new mxPoint(e+g,f)):p>q-m&&\np<q?(b=new mxPoint(e-Math.floor(.25*g),f+k),u=new mxPoint(e+Math.floor(.5*g),f-Math.floor(.5*k))):0>p&&p>-m?(b=new mxPoint(e+Math.floor(.5*g),f+Math.floor(1.5*k)),u=new mxPoint(e+Math.floor(1.25*g),f)):p<-m&&p>-q+m?(b=new mxPoint(e,f+k),u=new mxPoint(e+g,f+k)):p<-q+m&&p>-q&&(b=new mxPoint(e-Math.floor(.25*g),f),u=new mxPoint(e+Math.floor(.5*g),f+Math.floor(1.5*k)))}c=mxUtils.intersection(l,a,c.x,c.y,b.x,b.y,u.x,u.y)}return null==c?new mxPoint(l,a):c}};\nfunction mxPrintPreview(a,b,c,d,e,f,g,k,l){this.graph=a;this.scale=null!=b?b:1/a.pageScale;this.border=null!=d?d:0;this.pageFormat=mxRectangle.fromRectangle(null!=c?c:a.pageFormat);this.title=null!=k?k:\"Printer-friendly version\";this.x0=null!=e?e:0;this.y0=null!=f?f:0;this.borderColor=g;this.pageSelector=null!=l?l:!0}mxPrintPreview.prototype.graph=null;mxPrintPreview.prototype.pageFormat=null;mxPrintPreview.prototype.addPageCss=!1;mxPrintPreview.prototype.pixelsPerInch=90;\nmxPrintPreview.prototype.pageMargin=.2;mxPrintPreview.prototype.scale=null;mxPrintPreview.prototype.border=0;mxPrintPreview.prototype.marginTop=0;mxPrintPreview.prototype.marginBottom=0;mxPrintPreview.prototype.x0=0;mxPrintPreview.prototype.y0=0;mxPrintPreview.prototype.autoOrigin=!0;mxPrintPreview.prototype.printOverlays=!1;mxPrintPreview.prototype.printControls=!1;mxPrintPreview.prototype.printBackgroundImage=!1;mxPrintPreview.prototype.backgroundColor=\"#ffffff\";\nmxPrintPreview.prototype.borderColor=null;mxPrintPreview.prototype.title=null;mxPrintPreview.prototype.pageSelector=null;mxPrintPreview.prototype.wnd=null;mxPrintPreview.prototype.targetWindow=null;mxPrintPreview.prototype.pageCount=0;mxPrintPreview.prototype.clipping=!0;mxPrintPreview.prototype.getWindow=function(){return this.wnd};\nmxPrintPreview.prototype.getDoctype=function(){var a=\"\";8==document.documentMode?a='<meta http-equiv=\"X-UA-Compatible\" content=\"IE=8\">':8<document.documentMode&&(a='\\x3c!--[if IE]><meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\"><![endif]--\\x3e');return a};mxPrintPreview.prototype.appendGraph=function(a,b,c,d,e,f,g){this.graph=a;this.scale=null!=b?b:1/a.pageScale;this.x0=c;this.y0=d;this.open(null,null,e,f,g)};\nmxPrintPreview.prototype.open=function(a,b,c,d,e){var f=this.graph.cellRenderer.initializeOverlay,g=null;try{this.printOverlays&&(this.graph.cellRenderer.initializeOverlay=function(E,H){H.init(E.view.getDrawPane())});this.printControls&&(this.graph.cellRenderer.initControl=function(E,H,I,N){H.dialect=E.view.graph.dialect;H.init(E.view.getDrawPane())});this.wnd=null!=b?b:this.wnd;var k=!1;null==this.wnd&&(k=!0,this.wnd=window.open());var l=this.wnd.document;if(k){var m=this.getDoctype();null!=m&&0<\nm.length&&l.writeln(m);\"CSS1Compat\"===document.compatMode&&l.writeln(\"<!DOCTYPE html>\");l.writeln(\"<html>\");l.writeln(\"<head>\");this.writeHead(l,a);l.writeln(\"</head>\");l.writeln('<body class=\"mxPage\">')}var n=mxRectangle.fromRectangle(this.graph.getGraphBounds()),p=this.graph.getView().getScale(),q=p/this.scale,r=this.graph.getView().getTranslate();this.autoOrigin||(this.x0-=r.x*this.scale,this.y0-=r.y*this.scale,n.width+=n.x,n.height+=n.y,n.x=0,this.border=n.y=0);var t=this.pageFormat.width-2*this.border,\nu=this.pageFormat.height-2*this.border;this.pageFormat.height+=this.marginTop+this.marginBottom;n.width/=q;n.height/=q;var x=Math.max(1,Math.ceil((n.width+this.x0)/t)),y=Math.max(1,Math.ceil((n.height+this.y0)/u));this.pageCount=x*y;var B=mxUtils.bind(this,function(){if(this.pageSelector&&(1<y||1<x)){var E=this.createPageSelector(y,x);l.body.appendChild(E);if(mxClient.IS_IE&&null==l.documentMode||5==l.documentMode||8==l.documentMode||7==l.documentMode){E.style.position=\"absolute\";var H=function(){E.style.top=\n(l.body.scrollTop||l.documentElement.scrollTop)+10+\"px\"};mxEvent.addListener(this.wnd,\"scroll\",function(I){H()});mxEvent.addListener(this.wnd,\"resize\",function(I){H()})}}}),A=mxUtils.bind(this,function(E,H){null!=this.borderColor&&(E.style.borderColor=this.borderColor,E.style.borderStyle=\"solid\",E.style.borderWidth=\"1px\");E.style.background=this.backgroundColor;if(c||H)E.style.pageBreakAfter=\"always\";if(k&&(mxClient.IS_IE||11<=document.documentMode||mxClient.IS_EDGE))l.writeln(E.outerHTML),E.parentNode.removeChild(E);\nelse if(mxClient.IS_IE||11<=document.documentMode||mxClient.IS_EDGE){var I=l.createElement(\"div\");I.innerHTML=E.outerHTML;I=I.getElementsByTagName(\"div\")[0];l.body.appendChild(I);E.parentNode.removeChild(E)}else E.parentNode.removeChild(E),l.body.appendChild(E);(c||H)&&this.addPageBreak(l)}),C=this.getCoverPages(this.pageFormat.width,this.pageFormat.height);if(null!=C)for(var z=0;z<C.length;z++)A(C[z],!0);var v=this.getAppendices(this.pageFormat.width,this.pageFormat.height);for(z=0;z<y;z++){var D=\nz*u/this.scale-this.y0/this.scale+(n.y-r.y*p)/p;for(a=0;a<x;a++){if(null==this.wnd)return null;var F=a*t/this.scale-this.x0/this.scale+(n.x-r.x*p)/p,K=z*x+a+1,G=new mxRectangle(F,D,t,u);g=this.renderPage(this.pageFormat.width,this.pageFormat.height,0,0,mxUtils.bind(this,function(E){this.addGraphFragment(-F,-D,this.scale,K,E,G);this.printBackgroundImage&&this.insertBackgroundImage(E,-F,-D)}),K);if(null!=e&&0==z){var J=l.createElement(\"a\");J.setAttribute(\"id\",e);g.insertBefore(J,g.firstChild)}k&&!d&&\ng.setAttribute(\"id\",\"mxPage-\"+K);A(g,null!=v||z<y-1||a<x-1)}}if(null!=v)for(z=0;z<v.length;z++)A(v[z],z<v.length-1);k&&!d&&(this.closeDocument(),B());this.wnd.focus()}catch(E){null!=g&&null!=g.parentNode&&g.parentNode.removeChild(g)}finally{this.graph.cellRenderer.initializeOverlay=f}return this.wnd};mxPrintPreview.prototype.addPageBreak=function(a){var b=a.createElement(\"hr\");b.className=\"mxPageBreak\";a.body.appendChild(b)};\nmxPrintPreview.prototype.closeDocument=function(){try{if(null!=this.wnd&&null!=this.wnd.document){var a=this.wnd.document;this.writePostfix(a);a.writeln(\"</body>\");a.writeln(\"</html>\");a.close();mxEvent.release(a.body)}}catch(b){}};\nmxPrintPreview.prototype.writeHead=function(a,b){null!=this.title&&a.writeln(\"<title>\"+this.title+\"</title>\");mxClient.link(\"stylesheet\",mxClient.basePath+\"/css/common.css\",a);a.writeln('<style type=\"text/css\">');a.writeln(\"@media print {\");a.writeln(\"  * { -webkit-print-color-adjust: exact; }\");a.writeln(\"  table.mxPageSelector { display: none; }\");a.writeln(\"  hr.mxPageBreak { display: none; }\");a.writeln(\"}\");a.writeln(\"@media screen {\");a.writeln(\"  table.mxPageSelector { position: fixed; right: 10px; top: 10px;font-family: Arial; font-size:10pt; border: solid 1px darkgray;background: white; border-collapse:collapse; }\");\na.writeln(\"  table.mxPageSelector td { border: solid 1px gray; padding:4px; }\");a.writeln(\"  body.mxPage { background: gray; }\");a.writeln(\"}\");var c=this.pageFormat;this.addPageCss&&null!=c&&(c=(c.width/this.pixelsPerInch+this.pageMargin).toFixed(2)+\"in \"+(c.height/this.pixelsPerInch+this.pageMargin).toFixed(2)+\"in;\",a.writeln(\"@page {\"),a.writeln(\"  margin: \"+this.pageMargin+\"in;\"),a.writeln(\"  size: \"+c),a.writeln(\"}\"));null!=b&&a.writeln(b);a.writeln(\"</style>\")};\nmxPrintPreview.prototype.writePostfix=function(a){};\nmxPrintPreview.prototype.createPageSelector=function(a,b){var c=this.wnd.document,d=c.createElement(\"table\");d.className=\"mxPageSelector\";d.setAttribute(\"border\",\"0\");for(var e=c.createElement(\"tbody\"),f=0;f<a;f++){for(var g=c.createElement(\"tr\"),k=0;k<b;k++){var l=f*b+k+1,m=c.createElement(\"td\"),n=c.createElement(\"a\");n.setAttribute(\"href\",\"#mxPage-\"+l);!mxClient.IS_NS||mxClient.IS_SF||mxClient.IS_GC||n.setAttribute(\"onclick\",\"var page = document.getElementById('mxPage-\"+l+\"');page.scrollIntoView(true);event.preventDefault();\");\nmxUtils.write(n,l,c);m.appendChild(n);g.appendChild(m)}e.appendChild(g)}d.appendChild(e);return d};\nmxPrintPreview.prototype.renderPage=function(a,b,c,d,e,f){f=this.wnd.document;var g=document.createElement(\"div\"),k=null;try{if(0!=c||0!=d){g.style.position=\"relative\";g.style.width=a+\"px\";g.style.height=b+\"px\";g.style.pageBreakInside=\"avoid\";var l=document.createElement(\"div\");l.style.position=\"relative\";l.style.top=this.border+\"px\";l.style.left=this.border+\"px\";l.style.width=a-2*this.border+\"px\";l.style.height=b-2*this.border+\"px\";l.style.overflow=\"hidden\";var m=document.createElement(\"div\");m.style.position=\n\"relative\";m.style.marginLeft=c+\"px\";m.style.marginTop=d+\"px\";8==f.documentMode&&(l.style.position=\"absolute\",m.style.position=\"absolute\");10==f.documentMode&&(m.style.width=\"100%\",m.style.height=\"100%\");l.appendChild(m);g.appendChild(l);document.body.appendChild(g);k=m}else g.style.width=a+\"px\",g.style.height=b+\"px\",g.style.overflow=\"hidden\",g.style.pageBreakInside=\"avoid\",8==f.documentMode&&(g.style.position=\"relative\"),l=document.createElement(\"div\"),l.style.width=a-2*this.border+\"px\",l.style.height=\nb-2*this.border+\"px\",l.style.overflow=\"hidden\",!mxClient.IS_IE||null!=f.documentMode&&5!=f.documentMode&&8!=f.documentMode&&7!=f.documentMode?(l.style.top=this.border+\"px\",l.style.left=this.border+\"px\"):(l.style.marginTop=this.border+\"px\",l.style.marginLeft=this.border+\"px\"),g.appendChild(l),document.body.appendChild(g),k=l}catch(n){throw g.parentNode.removeChild(g),n;}e(k);return g};\nmxPrintPreview.prototype.getRoot=function(){var a=this.graph.view.currentRoot;null==a&&(a=this.graph.getModel().getRoot());return a};mxPrintPreview.prototype.useCssTransforms=function(){return!mxClient.NO_FO&&!mxClient.IS_SF};mxPrintPreview.prototype.isCellVisible=function(a){return!0};\nmxPrintPreview.prototype.addGraphFragment=function(a,b,c,d,e,f){var g=this.graph.getView();d=this.graph.container;this.graph.container=e;var k=g.getCanvas(),l=g.getBackgroundPane(),m=g.getDrawPane(),n=g.getOverlayPane(),p=c;if(this.graph.dialect==mxConstants.DIALECT_SVG){if(g.createSvg(),this.useCssTransforms()){var q=g.getDrawPane().parentNode;q.getAttribute(\"transform\");q.setAttribute(\"transformOrigin\",\"0 0\");q.setAttribute(\"transform\",\"scale(\"+c+\",\"+c+\")translate(\"+a+\",\"+b+\")\");c=1;b=a=0}}else g.createHtml();\nq=g.isEventsEnabled();g.setEventsEnabled(!1);var r=this.graph.isEnabled();this.graph.setEnabled(!1);var t=g.getTranslate();g.translate=new mxPoint(a,b);var u=this.graph.cellRenderer.redraw,x=g.states;a=g.scale;if(this.clipping){var y=new mxRectangle((f.x+t.x)*a,(f.y+t.y)*a,f.width*a/p,f.height*a/p),B=this;this.graph.cellRenderer.redraw=function(C,z,v){if(null!=C){var D=x.get(C.cell);if(null!=D&&(D=g.getBoundingBox(D,!1),null!=D&&0<D.width&&0<D.height&&!mxUtils.intersects(y,D))||!B.isCellVisible(C.cell))return}u.apply(this,\narguments)}}a=null;try{var A=[this.getRoot()];a=new mxTemporaryCellStates(g,c,A,null,mxUtils.bind(this,function(C){return this.getLinkForCellState(C)}))}finally{if(mxClient.IS_IE)g.overlayPane.innerText=\"\",g.canvas.style.overflow=\"hidden\",g.canvas.style.position=\"relative\",g.canvas.style.top=this.marginTop+\"px\",g.canvas.style.width=f.width+\"px\",g.canvas.style.height=f.height+\"px\";else for(c=e.firstChild;null!=c;)A=c.nextSibling,b=c.nodeName.toLowerCase(),\"svg\"==b?(c.style.overflow=\"hidden\",c.style.position=\n\"relative\",c.style.top=this.marginTop+\"px\",c.setAttribute(\"width\",f.width),c.setAttribute(\"height\",f.height),c.style.width=\"\",c.style.height=\"\"):\"default\"!=c.style.cursor&&\"div\"!=b&&c.parentNode.removeChild(c),c=A;this.printBackgroundImage&&(e=e.getElementsByTagName(\"svg\"),0<e.length&&(e[0].style.position=\"absolute\"));g.overlayPane.parentNode.removeChild(g.overlayPane);this.graph.setEnabled(r);this.graph.container=d;this.graph.cellRenderer.redraw=u;g.canvas=k;g.backgroundPane=l;g.drawPane=m;g.overlayPane=\nn;g.translate=t;a.destroy();g.setEventsEnabled(q)}};mxPrintPreview.prototype.getLinkForCellState=function(a){return this.graph.getLinkForCell(a.cell)};\nmxPrintPreview.prototype.insertBackgroundImage=function(a,b,c){var d=this.graph.backgroundImage;if(null!=d){var e=document.createElement(\"img\");e.style.position=\"absolute\";e.style.marginLeft=Math.round((b+d.x)*this.scale)+\"px\";e.style.marginTop=Math.round((c+d.y)*this.scale)+\"px\";e.setAttribute(\"width\",Math.round(d.width*this.scale));e.setAttribute(\"height\",Math.round(d.height*this.scale));e.src=d.src;a.insertBefore(e,a.firstChild)}};mxPrintPreview.prototype.getCoverPages=function(){return null};\nmxPrintPreview.prototype.getAppendices=function(){return null};mxPrintPreview.prototype.print=function(a){a=this.open(a);null!=a&&a.print()};mxPrintPreview.prototype.close=function(){null!=this.wnd&&(this.wnd.close(),this.wnd=null)};function mxStylesheet(){this.styles={};this.putDefaultVertexStyle(this.createDefaultVertexStyle());this.putDefaultEdgeStyle(this.createDefaultEdgeStyle())}\nmxStylesheet.prototype.createDefaultVertexStyle=function(){var a={};a[mxConstants.STYLE_SHAPE]=mxConstants.SHAPE_RECTANGLE;a[mxConstants.STYLE_PERIMETER]=mxPerimeter.RectanglePerimeter;a[mxConstants.STYLE_VERTICAL_ALIGN]=mxConstants.ALIGN_MIDDLE;a[mxConstants.STYLE_ALIGN]=mxConstants.ALIGN_CENTER;a[mxConstants.STYLE_FILLCOLOR]=\"#C3D9FF\";a[mxConstants.STYLE_STROKECOLOR]=\"#6482B9\";a[mxConstants.STYLE_FONTCOLOR]=\"#774400\";return a};\nmxStylesheet.prototype.createDefaultEdgeStyle=function(){var a={};a[mxConstants.STYLE_SHAPE]=mxConstants.SHAPE_CONNECTOR;a[mxConstants.STYLE_ENDARROW]=mxConstants.ARROW_CLASSIC;a[mxConstants.STYLE_VERTICAL_ALIGN]=mxConstants.ALIGN_MIDDLE;a[mxConstants.STYLE_ALIGN]=mxConstants.ALIGN_CENTER;a[mxConstants.STYLE_STROKECOLOR]=\"#6482B9\";a[mxConstants.STYLE_FONTCOLOR]=\"#446299\";return a};mxStylesheet.prototype.putDefaultVertexStyle=function(a){this.putCellStyle(\"defaultVertex\",a)};\nmxStylesheet.prototype.putDefaultEdgeStyle=function(a){this.putCellStyle(\"defaultEdge\",a)};mxStylesheet.prototype.getDefaultVertexStyle=function(){return this.styles.defaultVertex};mxStylesheet.prototype.getDefaultEdgeStyle=function(){return this.styles.defaultEdge};mxStylesheet.prototype.putCellStyle=function(a,b){this.styles[a]=b};\nmxStylesheet.prototype.getCellStyle=function(a,b,c){c=null!=c?c:!0;if(null!=a&&0<a.length){var d=a.split(\";\");b=null!=b&&\";\"!=a.charAt(0)?mxUtils.clone(b):{};for(a=0;a<d.length;a++){var e=d[a],f=e.indexOf(\"=\");if(0<=f){var g=e.substring(0,f);e=e.substring(f+1);e==mxConstants.NONE&&c?delete b[g]:mxUtils.isNumeric(e)?b[g]=parseFloat(e):b[g]=e}else if(e=this.styles[e],null!=e)for(g in e)b[g]=e[g]}}return b};\nfunction mxCellState(a,b,c){this.view=a;this.cell=b;this.style=null!=c?c:{};this.origin=new mxPoint;this.absoluteOffset=new mxPoint}mxCellState.prototype=new mxRectangle;mxCellState.prototype.constructor=mxCellState;mxCellState.prototype.view=null;mxCellState.prototype.cell=null;mxCellState.prototype.style=null;mxCellState.prototype.invalidStyle=!1;mxCellState.prototype.invalid=!0;mxCellState.prototype.origin=null;mxCellState.prototype.absolutePoints=null;mxCellState.prototype.absoluteOffset=null;\nmxCellState.prototype.visibleSourceState=null;mxCellState.prototype.visibleTargetState=null;mxCellState.prototype.terminalDistance=0;mxCellState.prototype.length=0;mxCellState.prototype.segments=null;mxCellState.prototype.shape=null;mxCellState.prototype.text=null;mxCellState.prototype.unscaledWidth=null;mxCellState.prototype.unscaledHeight=null;\nmxCellState.prototype.getPerimeterBounds=function(a,b){a=a||0;b=null!=b?b:new mxRectangle(this.x,this.y,this.width,this.height);if(null!=this.shape&&null!=this.shape.stencil&&\"fixed\"==this.shape.stencil.aspect){var c=this.shape.stencil.computeAspect(this.style,b.x,b.y,b.width,b.height);b.x=c.x;b.y=c.y;b.width=this.shape.stencil.w0*c.width;b.height=this.shape.stencil.h0*c.height}0!=a&&b.grow(a);return b};\nmxCellState.prototype.setAbsoluteTerminalPoint=function(a,b){b?(null==this.absolutePoints&&(this.absolutePoints=[]),0==this.absolutePoints.length?this.absolutePoints.push(a):this.absolutePoints[0]=a):null==this.absolutePoints?(this.absolutePoints=[],this.absolutePoints.push(null),this.absolutePoints.push(a)):1==this.absolutePoints.length?this.absolutePoints.push(a):this.absolutePoints[this.absolutePoints.length-1]=a};\nmxCellState.prototype.setCursor=function(a){null!=this.shape&&this.shape.setCursor(a);null!=this.text&&this.text.setCursor(a)};mxCellState.prototype.isFloatingTerminalPoint=function(a){var b=this.getVisibleTerminalState(a);if(null==b)return!1;a=this.view.graph.getConnectionConstraint(this,b,a);return null==a||null==a.point};mxCellState.prototype.getVisibleTerminal=function(a){a=this.getVisibleTerminalState(a);return null!=a?a.cell:null};\nmxCellState.prototype.getVisibleTerminalState=function(a){return a?this.visibleSourceState:this.visibleTargetState};mxCellState.prototype.setVisibleTerminalState=function(a,b){b?this.visibleSourceState=a:this.visibleTargetState=a};mxCellState.prototype.getCellBounds=function(){return this.cellBounds};mxCellState.prototype.getPaintBounds=function(){return this.paintBounds};\nmxCellState.prototype.updateCachedBounds=function(){var a=this.view.translate,b=this.view.scale;this.cellBounds=new mxRectangle(this.x/b-a.x,this.y/b-a.y,this.width/b,this.height/b);this.paintBounds=mxRectangle.fromRectangle(this.cellBounds);null!=this.shape&&this.shape.isPaintBoundsInverted()&&this.paintBounds.rotate90()};\nmxCellState.prototype.setState=function(a){this.view=a.view;this.cell=a.cell;this.style=a.style;this.absolutePoints=a.absolutePoints;this.origin=a.origin;this.absoluteOffset=a.absoluteOffset;this.boundingBox=a.boundingBox;this.terminalDistance=a.terminalDistance;this.segments=a.segments;this.length=a.length;this.x=a.x;this.y=a.y;this.width=a.width;this.height=a.height;this.unscaledWidth=a.unscaledWidth;this.unscaledHeight=a.unscaledHeight};\nmxCellState.prototype.clone=function(){var a=new mxCellState(this.view,this.cell,this.style);if(null!=this.absolutePoints){a.absolutePoints=[];for(var b=0;b<this.absolutePoints.length;b++)a.absolutePoints[b]=this.absolutePoints[b].clone()}null!=this.origin&&(a.origin=this.origin.clone());null!=this.absoluteOffset&&(a.absoluteOffset=this.absoluteOffset.clone());null!=this.boundingBox&&(a.boundingBox=this.boundingBox.clone());a.terminalDistance=this.terminalDistance;a.segments=this.segments;a.length=\nthis.length;a.x=this.x;a.y=this.y;a.width=this.width;a.height=this.height;a.unscaledWidth=this.unscaledWidth;a.unscaledHeight=this.unscaledHeight;return a};mxCellState.prototype.destroy=function(){this.view.graph.cellRenderer.destroy(this)};function mxGraphSelectionModel(a){this.graph=a;this.cells=[]}mxGraphSelectionModel.prototype=new mxEventSource;mxGraphSelectionModel.prototype.constructor=mxGraphSelectionModel;mxGraphSelectionModel.prototype.doneResource=\"none\"!=mxClient.language?\"done\":\"\";\nmxGraphSelectionModel.prototype.updatingSelectionResource=\"none\"!=mxClient.language?\"updatingSelection\":\"\";mxGraphSelectionModel.prototype.graph=null;mxGraphSelectionModel.prototype.singleSelection=!1;mxGraphSelectionModel.prototype.isSingleSelection=function(){return this.singleSelection};mxGraphSelectionModel.prototype.setSingleSelection=function(a){this.singleSelection=a};mxGraphSelectionModel.prototype.isSelected=function(a){return null!=a?0<=mxUtils.indexOf(this.cells,a):!1};\nmxGraphSelectionModel.prototype.isEmpty=function(){return 0==this.cells.length};mxGraphSelectionModel.prototype.clear=function(){this.changeSelection(null,this.cells)};mxGraphSelectionModel.prototype.setCell=function(a){null!=a&&this.setCells([a])};mxGraphSelectionModel.prototype.setCells=function(a){if(null!=a){this.singleSelection&&(a=[this.getFirstSelectableCell(a)]);for(var b=[],c=0;c<a.length;c++)this.graph.isCellSelectable(a[c])&&b.push(a[c]);this.changeSelection(b,this.cells)}};\nmxGraphSelectionModel.prototype.getFirstSelectableCell=function(a){if(null!=a)for(var b=0;b<a.length;b++)if(this.graph.isCellSelectable(a[b]))return a[b];return null};mxGraphSelectionModel.prototype.addCell=function(a){null!=a&&this.addCells([a])};\nmxGraphSelectionModel.prototype.addCells=function(a){if(null!=a){var b=null;this.singleSelection&&(b=this.cells,a=[this.getFirstSelectableCell(a)]);for(var c=[],d=0;d<a.length;d++)!this.isSelected(a[d])&&this.graph.isCellSelectable(a[d])&&c.push(a[d]);this.changeSelection(c,b)}};mxGraphSelectionModel.prototype.removeCell=function(a){null!=a&&this.removeCells([a])};\nmxGraphSelectionModel.prototype.removeCells=function(a){if(null!=a){for(var b=[],c=0;c<a.length;c++)this.isSelected(a[c])&&b.push(a[c]);this.changeSelection(null,b)}};mxGraphSelectionModel.prototype.changeSelection=function(a,b){if(null!=a&&0<a.length&&null!=a[0]||null!=b&&0<b.length&&null!=b[0])a=new mxSelectionChange(this,a,b),a.execute(),b=new mxUndoableEdit(this,!1),b.add(a),this.fireEvent(new mxEventObject(mxEvent.UNDO,\"edit\",b))};\nmxGraphSelectionModel.prototype.cellAdded=function(a){null==a||this.isSelected(a)||this.cells.push(a)};mxGraphSelectionModel.prototype.cellRemoved=function(a){null!=a&&(a=mxUtils.indexOf(this.cells,a),0<=a&&this.cells.splice(a,1))};function mxSelectionChange(a,b,c){this.selectionModel=a;this.added=null!=b?b.slice():null;this.removed=null!=c?c.slice():null}\nmxSelectionChange.prototype.execute=function(){var a=mxLog.enter(\"mxSelectionChange.execute\");window.status=mxResources.get(this.selectionModel.updatingSelectionResource)||this.selectionModel.updatingSelectionResource;if(null!=this.removed)for(var b=0;b<this.removed.length;b++)this.selectionModel.cellRemoved(this.removed[b]);if(null!=this.added)for(b=0;b<this.added.length;b++)this.selectionModel.cellAdded(this.added[b]);b=this.added;this.added=this.removed;this.removed=b;window.status=mxResources.get(this.selectionModel.doneResource)||\nthis.selectionModel.doneResource;mxLog.leave(\"mxSelectionChange.execute\",a);this.selectionModel.fireEvent(new mxEventObject(mxEvent.CHANGE,\"added\",this.added,\"removed\",this.removed))};\nfunction mxCellEditor(a){this.graph=a;this.zoomHandler=mxUtils.bind(this,function(){this.graph.isEditing()&&this.resize()});null!=this.graph.container&&mxEvent.addListener(this.graph.container,\"scroll\",this.zoomHandler);this.graph.view.addListener(mxEvent.SCALE_AND_TRANSLATE,this.zoomHandler);this.graph.view.addListener(mxEvent.SCALE,this.zoomHandler);this.changeHandler=mxUtils.bind(this,function(b){null!=this.editingCell&&(b=this.graph.getView().getState(this.editingCell),null==b?this.stopEditing(!0):\nthis.updateTextAreaStyle(b))});this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler)}mxCellEditor.prototype.graph=null;mxCellEditor.prototype.textarea=null;mxCellEditor.prototype.editingCell=null;mxCellEditor.prototype.trigger=null;mxCellEditor.prototype.modified=!1;mxCellEditor.prototype.autoSize=!0;mxCellEditor.prototype.selectText=!0;mxCellEditor.prototype.emptyLabelText=mxClient.IS_FF?\"<br>\":\"\";mxCellEditor.prototype.escapeCancelsEditing=!0;mxCellEditor.prototype.textNode=\"\";\nmxCellEditor.prototype.zIndex=1;mxCellEditor.prototype.minResize=new mxRectangle(0,20);mxCellEditor.prototype.wordWrapPadding=0;mxCellEditor.prototype.blurEnabled=!1;mxCellEditor.prototype.initialValue=null;mxCellEditor.prototype.align=null;\nmxCellEditor.prototype.init=function(){this.textarea=document.createElement(\"div\");this.textarea.className=\"mxCellEditor mxPlainTextEditor\";this.textarea.contentEditable=!0;mxClient.IS_GC&&(this.textarea.style.minHeight=\"1em\");this.textarea.style.position=this.isLegacyEditor()?\"absolute\":\"relative\";this.installListeners(this.textarea)};mxCellEditor.prototype.applyValue=function(a,b){this.graph.labelChanged(a.cell,b,this.trigger)};\nmxCellEditor.prototype.setAlign=function(a){null!=this.textarea&&(this.textarea.style.textAlign=a);this.align=a;this.resize()};mxCellEditor.prototype.getInitialValue=function(a,b){a=mxUtils.htmlEntities(this.graph.getEditingValue(a.cell,b),!1);8!=document.documentMode&&9!=document.documentMode&&10!=document.documentMode&&(a=mxUtils.replaceTrailingNewlines(a,\"<div><br></div>\"));return a.replace(/\\n/g,\"<br>\")};mxCellEditor.prototype.getCurrentValue=function(a){return mxUtils.extractTextWithWhitespace(this.textarea.childNodes)};\nmxCellEditor.prototype.isCancelEditingKeyEvent=function(a){return this.escapeCancelsEditing||mxEvent.isShiftDown(a)||mxEvent.isControlDown(a)||mxEvent.isMetaDown(a)};\nmxCellEditor.prototype.installListeners=function(a){mxEvent.addListener(a,\"dragstart\",mxUtils.bind(this,function(f){this.graph.stopEditing(!1);mxEvent.consume(f)}));mxEvent.addListener(a,\"blur\",mxUtils.bind(this,function(f){this.blurEnabled&&this.focusLost(f)}));var b=this.graph.container.scrollTop,c=this.graph.container.scrollLeft;mxEvent.addListener(a,\"keydown\",mxUtils.bind(this,function(f){b=this.graph.container.scrollTop;c=this.graph.container.scrollLeft;mxEvent.isConsumed(f)||(this.isStopEditingEvent(f)?\n(this.graph.stopEditing(!1),mxEvent.consume(f)):27==f.keyCode&&(this.graph.stopEditing(this.isCancelEditingKeyEvent(f)),mxEvent.consume(f)))}));var d=mxUtils.bind(this,function(f){null!=this.editingCell&&this.clearOnChange&&a.innerHTML==this.getEmptyLabelText()&&(!mxClient.IS_FF||8!=f.keyCode&&46!=f.keyCode)&&(this.clearOnChange=!1,a.innerText=\"\")});mxEvent.addListener(a,\"keypress\",d);mxEvent.addListener(a,\"paste\",d);d=mxUtils.bind(this,function(f){null!=this.editingCell&&(this.graph.container.scrollTop=\nb,this.graph.container.scrollLeft=c,a.scrollIntoView({block:\"nearest\",inline:\"nearest\"}),0==this.textarea.innerHTML.length||\"<br>\"==this.textarea.innerHTML?(this.textarea.innerHTML=this.getEmptyLabelText(),this.clearOnChange=0<this.textarea.innerHTML.length):this.clearOnChange=!1)});mxEvent.addListener(a,mxClient.IS_IE11||mxClient.IS_IE?\"keyup\":\"input\",d);mxEvent.addListener(a,\"cut\",d);mxEvent.addListener(a,\"paste\",d);mxEvent.addListener(a,\"paste\",mxUtils.bind(this,function(f){f=this.textarea.getElementsByTagName(\"span\");\nfor(var g=[],k=0;k<f.length;k++)g.push(f[k]);window.setTimeout(mxUtils.bind(this,function(){if(null!=this.textarea)for(var l=this.textarea.getElementsByTagName(\"span\"),m=0;m<l.length;m++)if(m>=g.length||l[m]!=g[m]){for(var n=l[m].firstChild;null!=n;){var p=n.nextSibling;l[m].parentNode.insertBefore(n,l[m]);n=p}l[m].parentNode.removeChild(l[m]);break}}),0)}));d=mxClient.IS_IE11||mxClient.IS_IE?\"keydown\":\"input\";var e=mxUtils.bind(this,function(f){null!=this.editingCell&&this.autoSize&&!mxEvent.isConsumed(f)&&\n(null!=this.resizeThread&&window.clearTimeout(this.resizeThread),this.resizeThread=window.setTimeout(mxUtils.bind(this,function(){this.resizeThread=null;this.resize()}),0))});mxEvent.addListener(a,d,e);mxEvent.addListener(window,\"resize\",e);9<=document.documentMode?(mxEvent.addListener(a,\"DOMNodeRemoved\",e),mxEvent.addListener(a,\"DOMNodeInserted\",e)):(mxEvent.addListener(a,\"cut\",e),mxEvent.addListener(a,\"paste\",e))};\nmxCellEditor.prototype.isStopEditingEvent=function(a){return 113==a.keyCode||this.graph.isEnterStopsCellEditing()&&13==a.keyCode&&!mxEvent.isControlDown(a)&&!mxEvent.isShiftDown(a)};mxCellEditor.prototype.isEventSource=function(a){return mxEvent.getSource(a)==this.textarea};\nmxCellEditor.prototype.resize=function(){var a=this.graph.getView().getState(this.editingCell);if(null==a)this.stopEditing(!0);else if(null!=this.textarea){var b=this.graph.getModel().isEdge(a.cell),c=this.graph.getView().scale,d=null;if(this.autoSize&&\"fill\"!=a.style[mxConstants.STYLE_OVERFLOW]){var e=mxUtils.getValue(a.style,mxConstants.STYLE_LABEL_WIDTH,null);d=null!=a.text&&null==this.align?a.text.margin:null;null==d&&(d=mxUtils.getAlignmentAsPoint(this.align||mxUtils.getValue(a.style,mxConstants.STYLE_ALIGN,\nmxConstants.ALIGN_CENTER),mxUtils.getValue(a.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE)));if(b){if(this.bounds=new mxRectangle(a.absoluteOffset.x,a.absoluteOffset.y,0,0),null!=e){var f=(parseFloat(e)+2)*c;this.bounds.width=f;this.bounds.x+=d.x*f}}else{b=mxRectangle.fromRectangle(a);var g=mxUtils.getValue(a.style,mxConstants.STYLE_LABEL_POSITION,mxConstants.ALIGN_CENTER),k=mxUtils.getValue(a.style,mxConstants.STYLE_VERTICAL_LABEL_POSITION,mxConstants.ALIGN_MIDDLE);b=null!=a.shape&&\ng==mxConstants.ALIGN_CENTER&&k==mxConstants.ALIGN_MIDDLE?a.shape.getLabelBounds(b):b;null!=e&&(b.width=parseFloat(e)*c);if(!a.view.graph.cellRenderer.legacySpacing||\"width\"!=a.style[mxConstants.STYLE_OVERFLOW]&&\"block\"!=a.style[mxConstants.STYLE_OVERFLOW]){g=parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_SPACING,2))*c;var l=(parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_SPACING_TOP,0))+mxText.prototype.baseSpacingTop)*c+g,m=(parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_SPACING_RIGHT,\n0))+mxText.prototype.baseSpacingRight)*c+g,n=(parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_SPACING_BOTTOM,0))+mxText.prototype.baseSpacingBottom)*c+g,p=(parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_SPACING_LEFT,0))+mxText.prototype.baseSpacingLeft)*c+g;g=mxUtils.getValue(a.style,mxConstants.STYLE_LABEL_POSITION,mxConstants.ALIGN_CENTER);k=mxUtils.getValue(a.style,mxConstants.STYLE_VERTICAL_LABEL_POSITION,mxConstants.ALIGN_MIDDLE);b=new mxRectangle(b.x+p,b.y+l,b.width-(g==mxConstants.ALIGN_CENTER&&\nnull==e?p+m:0),b.height-(k==mxConstants.ALIGN_MIDDLE?l+n:0));this.graph.isHtmlLabel(a.cell)&&(b.x-=mxSvgCanvas2D.prototype.foreignObjectPadding/2,b.y-=mxSvgCanvas2D.prototype.foreignObjectPadding/2,b.width+=mxSvgCanvas2D.prototype.foreignObjectPadding)}this.bounds=new mxRectangle(b.x+a.absoluteOffset.x,b.y+a.absoluteOffset.y,b.width,b.height)}if(this.graph.isWrapping(a.cell)&&(2<=this.bounds.width||2<=this.bounds.height))if(this.textarea.style.wordWrap=mxConstants.WORD_WRAP,this.textarea.style.whiteSpace=\n\"normal\",this.textarea.innerHTML!=this.getEmptyLabelText())if(f=Math.round(this.bounds.width/c)+this.wordWrapPadding,\"relative\"!=this.textarea.style.position)this.textarea.style.width=f+\"px\",this.textarea.scrollWidth>f&&(this.textarea.style.width=this.textarea.scrollWidth+\"px\");else if(\"block\"==a.style[mxConstants.STYLE_OVERFLOW]||\"width\"==a.style[mxConstants.STYLE_OVERFLOW]){if(-.5==d.y||\"width\"==a.style[mxConstants.STYLE_OVERFLOW])this.textarea.style.maxHeight=this.bounds.height+\"px\";this.textarea.style.width=\nf+\"px\"}else this.textarea.style.maxWidth=f+\"px\";else this.textarea.style.maxWidth=f+\"px\";else this.textarea.style.whiteSpace=\"nowrap\",this.textarea.style.width=\"\";8==document.documentMode&&(this.textarea.style.zoom=\"1\",this.textarea.style.height=\"auto\");8==document.documentMode?(a=this.textarea.scrollWidth,e=this.textarea.scrollHeight,this.textarea.style.left=Math.max(0,Math.ceil((this.bounds.x-d.x*(this.bounds.width-(a+1)*c)+a*(c-1)*0+2*(d.x+.5))/c))+\"px\",this.textarea.style.top=Math.max(0,Math.ceil((this.bounds.y-\nd.y*(this.bounds.height-(e+.5)*c)+e*(c-1)*0+1*Math.abs(d.y+.5))/c))+\"px\",this.textarea.style.width=Math.round(a*c)+\"px\",this.textarea.style.height=Math.round(e*c)+\"px\"):(this.textarea.style.left=Math.max(0,Math.round(this.bounds.x-d.x*(this.bounds.width-2))+1)+\"px\",this.textarea.style.top=Math.max(0,Math.round(this.bounds.y-d.y*(this.bounds.height-4)+(-1==d.y?3:0))+1)+\"px\")}else this.bounds=this.getEditorBounds(a),this.textarea.style.width=Math.round(this.bounds.width/c)+\"px\",this.textarea.style.height=\nMath.round(this.bounds.height/c)+\"px\",8==document.documentMode?(this.textarea.style.left=Math.round(this.bounds.x)+\"px\",this.textarea.style.top=Math.round(this.bounds.y)+\"px\"):(this.textarea.style.left=Math.max(0,Math.round(this.bounds.x+1))+\"px\",this.textarea.style.top=Math.max(0,Math.round(this.bounds.y+1))+\"px\"),this.graph.isWrapping(a.cell)&&(2<=this.bounds.width||2<=this.bounds.height)&&this.textarea.innerHTML!=this.getEmptyLabelText()?(this.textarea.style.wordWrap=mxConstants.WORD_WRAP,this.textarea.style.whiteSpace=\n\"normal\",\"fill\"!=a.style[mxConstants.STYLE_OVERFLOW]&&(this.textarea.style.width=Math.round(this.bounds.width/c)+this.wordWrapPadding+\"px\")):(this.textarea.style.whiteSpace=\"nowrap\",\"fill\"!=a.style[mxConstants.STYLE_OVERFLOW]&&(this.textarea.style.width=\"\"));mxUtils.setPrefixedStyle(this.textarea.style,\"transformOrigin\",\"0px 0px\");mxUtils.setPrefixedStyle(this.textarea.style,\"transform\",\"scale(\"+c+\",\"+c+\")\"+(null==d?\"\":\" translate(\"+100*d.x+\"%,\"+100*d.y+\"%)\"))}};mxCellEditor.prototype.focusLost=function(){this.stopEditing(!this.graph.isInvokesStopCellEditing())};\nmxCellEditor.prototype.getBackgroundColor=function(a){return null};mxCellEditor.prototype.getBorderColor=function(a){return null};mxCellEditor.prototype.isLegacyEditor=function(){var a=!1;if(mxClient.IS_SVG){var b=this.graph.view.getDrawPane().ownerSVGElement;null!=b&&(b=mxUtils.getCurrentStyle(b),null!=b&&(a=\"absolute\"==b.position))}return!a};\nmxCellEditor.prototype.updateTextAreaStyle=function(a){this.graph.getView();var b=mxUtils.getValue(a.style,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE),c=mxUtils.getValue(a.style,mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY),d=mxUtils.getValue(a.style,mxConstants.STYLE_FONTCOLOR,\"black\"),e=mxUtils.getValue(a.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT),f=(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD,g=(mxUtils.getValue(a.style,\nmxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC,k=[];(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&k.push(\"underline\");(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_STRIKETHROUGH)==mxConstants.FONT_STRIKETHROUGH&&k.push(\"line-through\");this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(b*mxConstants.LINE_HEIGHT)+\"px\":mxConstants.LINE_HEIGHT;this.textarea.style.backgroundColor=\nthis.getBackgroundColor(a);this.textarea.style.textDecoration=k.join(\" \");this.textarea.style.fontWeight=f?\"bold\":\"normal\";this.textarea.style.fontStyle=g?\"italic\":\"\";this.textarea.style.fontSize=Math.round(b)+\"px\";this.textarea.style.zIndex=this.zIndex;this.textarea.style.fontFamily=c;this.textarea.style.textAlign=e;this.textarea.style.outline=\"none\";this.textarea.style.color=d;b=this.getBorderColor(a);this.textarea.style.border=null!=b?\"1px solid \"+b:\"none\";b=this.textDirection=mxUtils.getValue(a.style,\nmxConstants.STYLE_TEXT_DIRECTION,mxConstants.DEFAULT_TEXT_DIRECTION);b==mxConstants.TEXT_DIRECTION_AUTO&&(null==a||null==a.text||a.text.dialect==mxConstants.DIALECT_STRICTHTML||mxUtils.isNode(a.text.value)||(b=a.text.getAutoDirection()));b==mxConstants.TEXT_DIRECTION_LTR||b==mxConstants.TEXT_DIRECTION_RTL?this.textarea.setAttribute(\"dir\",b):this.textarea.removeAttribute(\"dir\")};\nmxCellEditor.prototype.startEditing=function(a,b){this.stopEditing(!0);this.align=null;null==this.textarea&&this.init();null!=this.graph.tooltipHandler&&this.graph.tooltipHandler.hideTooltip();var c=this.graph.getView().getState(a);if(null!=c){this.updateTextAreaStyle(c);this.textarea.innerHTML=this.getInitialValue(c,b)||\"\";this.initialValue=this.textarea.innerHTML;0==this.textarea.innerHTML.length||\"<br>\"==this.textarea.innerHTML?(this.textarea.innerHTML=this.getEmptyLabelText(),this.clearOnChange=\n!0):this.clearOnChange=this.textarea.innerHTML==this.getEmptyLabelText();this.graph.container.appendChild(this.textarea);this.editingCell=a;this.trigger=b;this.textNode=null;null!=c.text&&this.isHideLabel(c)&&(this.textNode=c.text.node,this.textNode.style.visibility=\"hidden\");this.autoSize&&(this.graph.model.isEdge(c.cell)||\"fill\"!=c.style[mxConstants.STYLE_OVERFLOW])&&window.setTimeout(mxUtils.bind(this,function(){this.resize()}),0);this.resize();try{var d=this.graph.container.scrollTop,e=this.graph.container.scrollLeft;\nthis.textarea.focus();this.graph.container.scrollTop=d;this.graph.container.scrollLeft=e;this.textarea.scrollIntoView({block:\"nearest\",inline:\"nearest\"});this.isSelectText()&&0<this.textarea.innerHTML.length&&(this.textarea.innerHTML!=this.getEmptyLabelText()||!this.clearOnChange)&&document.execCommand(\"selectAll\",!1,null)}catch(f){}}};mxCellEditor.prototype.isSelectText=function(){return this.selectText};\nmxCellEditor.prototype.clearSelection=function(){var a=null;window.getSelection?a=window.getSelection():document.selection&&(a=document.selection);null!=a&&(a.empty?a.empty():a.removeAllRanges&&a.removeAllRanges())};\nmxCellEditor.prototype.stopEditing=function(a){if(null!=this.editingCell){null!=this.textNode&&(this.textNode.style.visibility=\"visible\",this.textNode=null);a=a?null:this.graph.view.getState(this.editingCell);var b=this.initialValue;this.bounds=this.trigger=this.editingCell=this.initialValue=null;this.textarea.blur();this.clearSelection();null!=this.textarea.parentNode&&this.textarea.parentNode.removeChild(this.textarea);this.clearOnChange&&this.textarea.innerHTML==this.getEmptyLabelText()&&(this.textarea.innerText=\n\"\",this.clearOnChange=!1);if(null!=a&&(this.textarea.innerHTML!=b||null!=this.align)){this.prepareTextarea();b=this.getCurrentValue(a);this.graph.getModel().beginUpdate();try{null!=b&&this.applyValue(a,b),null!=this.align&&this.graph.setCellStyles(mxConstants.STYLE_ALIGN,this.align,[a.cell])}finally{this.graph.getModel().endUpdate()}}mxEvent.release(this.textarea);this.align=this.textarea=null}};\nmxCellEditor.prototype.prepareTextarea=function(){null!=this.textarea.lastChild&&\"BR\"==this.textarea.lastChild.nodeName&&this.textarea.removeChild(this.textarea.lastChild)};mxCellEditor.prototype.isHideLabel=function(a){return!0};mxCellEditor.prototype.getMinimumSize=function(a){var b=this.graph.getView().scale;return new mxRectangle(0,0,null==a.text?30:a.text.size*b+20,\"left\"==this.textarea.style.textAlign?120:40)};\nmxCellEditor.prototype.getEditorBounds=function(a){var b=this.graph.getModel().isEdge(a.cell),c=this.graph.getView().scale,d=this.getMinimumSize(a),e=d.width;d=d.height;if(!b&&a.view.graph.cellRenderer.legacySpacing&&\"fill\"==a.style[mxConstants.STYLE_OVERFLOW])c=a.shape.getLabelBounds(mxRectangle.fromRectangle(a));else{var f=parseFloat(mxUtils.getValue(style,mxConstants.STYLE_SPACING,2))*c,g=(parseFloat(mxUtils.getValue(style,mxConstants.STYLE_SPACING_TOP,0))+mxText.prototype.baseSpacingTop)*c+f,\nk=(parseFloat(mxUtils.getValue(style,mxConstants.STYLE_SPACING_RIGHT,0))+mxText.prototype.baseSpacingRight)*c+f,l=(parseFloat(mxUtils.getValue(style,mxConstants.STYLE_SPACING_BOTTOM,0))+mxText.prototype.baseSpacingBottom)*c+f;f=(parseFloat(mxUtils.getValue(style,mxConstants.STYLE_SPACING_LEFT,0))+mxText.prototype.baseSpacingLeft)*c+f;c=new mxRectangle(a.x,a.y,Math.max(e,a.width-f-k),Math.max(d,a.height-g-l));k=mxUtils.getValue(a.style,mxConstants.STYLE_LABEL_POSITION,mxConstants.ALIGN_CENTER);l=mxUtils.getValue(a.style,\nmxConstants.STYLE_VERTICAL_LABEL_POSITION,mxConstants.ALIGN_MIDDLE);this.graph.isHtmlLabel(a.cell)&&(c.width+=mxSvgCanvas2D.prototype.foreignObjectPadding);c=null!=a.shape&&k==mxConstants.ALIGN_CENTER&&l==mxConstants.ALIGN_MIDDLE?a.shape.getLabelBounds(c):c;b?(c.x=a.absoluteOffset.x,c.y=a.absoluteOffset.y,null!=a.text&&null!=a.text.boundingBox&&(0<a.text.boundingBox.x&&(c.x=a.text.boundingBox.x),0<a.text.boundingBox.y&&(c.y=a.text.boundingBox.y))):null!=a.text&&null!=a.text.boundingBox&&(c.x=Math.min(c.x,\na.text.boundingBox.x),c.y=Math.min(c.y,a.text.boundingBox.y));c.x+=f;c.y+=g;null!=a.text&&null!=a.text.boundingBox&&(b?(c.width=Math.max(e,a.text.boundingBox.width),c.height=Math.max(d,a.text.boundingBox.height)):(c.width=Math.max(c.width,a.text.boundingBox.width),c.height=Math.max(c.height,a.text.boundingBox.height)));this.graph.getModel().isVertex(a.cell)&&(b=mxUtils.getValue(a.style,mxConstants.STYLE_LABEL_POSITION,mxConstants.ALIGN_CENTER),b==mxConstants.ALIGN_LEFT?c.x-=a.width:b==mxConstants.ALIGN_RIGHT&&\n(c.x+=a.width),b=mxUtils.getValue(a.style,mxConstants.STYLE_VERTICAL_LABEL_POSITION,mxConstants.ALIGN_MIDDLE),b==mxConstants.ALIGN_TOP?c.y-=a.height:b==mxConstants.ALIGN_BOTTOM&&(c.y+=a.height))}return new mxRectangle(Math.round(c.x),Math.round(c.y),Math.round(c.width),Math.round(c.height))};mxCellEditor.prototype.getEmptyLabelText=function(a){return this.emptyLabelText};mxCellEditor.prototype.getEditingCell=function(){return this.editingCell};\nmxCellEditor.prototype.destroy=function(){null!=this.textarea&&(mxEvent.release(this.textarea),null!=this.textarea.parentNode&&this.textarea.parentNode.removeChild(this.textarea),this.textarea=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.changeHandler=null);this.zoomHandler&&(null!=this.graph.container&&mxEvent.removeListener(this.graph.container,\"scroll\",this.zoomHandler),this.graph.view.removeListener(this.zoomHandler),this.zoomHandler=null)};\nfunction mxCellRenderer(){}mxCellRenderer.defaultShapes={};mxCellRenderer.prototype.defaultEdgeShape=mxConnector;mxCellRenderer.prototype.defaultVertexShape=mxRectangleShape;mxCellRenderer.prototype.defaultTextShape=mxText;mxCellRenderer.prototype.legacyControlPosition=!0;mxCellRenderer.prototype.legacySpacing=!0;mxCellRenderer.prototype.antiAlias=!0;mxCellRenderer.prototype.minSvgStrokeWidth=1;mxCellRenderer.prototype.forceControlClickHandler=!1;\nmxCellRenderer.registerShape=function(a,b){mxCellRenderer.defaultShapes[a]=b};mxCellRenderer.registerShape(mxConstants.SHAPE_RECTANGLE,mxRectangleShape);mxCellRenderer.registerShape(mxConstants.SHAPE_ELLIPSE,mxEllipse);mxCellRenderer.registerShape(mxConstants.SHAPE_RHOMBUS,mxRhombus);mxCellRenderer.registerShape(mxConstants.SHAPE_CYLINDER,mxCylinder);mxCellRenderer.registerShape(mxConstants.SHAPE_CONNECTOR,mxConnector);mxCellRenderer.registerShape(mxConstants.SHAPE_ACTOR,mxActor);\nmxCellRenderer.registerShape(mxConstants.SHAPE_TRIANGLE,mxTriangle);mxCellRenderer.registerShape(mxConstants.SHAPE_HEXAGON,mxHexagon);mxCellRenderer.registerShape(mxConstants.SHAPE_CLOUD,mxCloud);mxCellRenderer.registerShape(mxConstants.SHAPE_LINE,mxLine);mxCellRenderer.registerShape(mxConstants.SHAPE_ARROW,mxArrow);mxCellRenderer.registerShape(mxConstants.SHAPE_ARROW_CONNECTOR,mxArrowConnector);mxCellRenderer.registerShape(mxConstants.SHAPE_DOUBLE_ELLIPSE,mxDoubleEllipse);\nmxCellRenderer.registerShape(mxConstants.SHAPE_SWIMLANE,mxSwimlane);mxCellRenderer.registerShape(mxConstants.SHAPE_IMAGE,mxImageShape);mxCellRenderer.registerShape(mxConstants.SHAPE_LABEL,mxLabel);mxCellRenderer.prototype.initializeShape=function(a){a.shape.dialect=a.view.graph.dialect;this.configureShape(a);a.shape.init(a.view.getDrawPane())};\nmxCellRenderer.prototype.createShape=function(a){var b=null;null!=a.style&&(b=a.style[mxConstants.STYLE_SHAPE],b=null==mxCellRenderer.defaultShapes[b]?mxStencilRegistry.getStencil(b):null,b=null!=b?new mxShape(b):new (this.getShapeConstructor(a)));return b};mxCellRenderer.prototype.createIndicatorShape=function(a){a.shape.indicatorShape=this.getShape(a.view.graph.getIndicatorShape(a))};mxCellRenderer.prototype.getShape=function(a){return null!=a?mxCellRenderer.defaultShapes[a]:null};\nmxCellRenderer.prototype.getShapeConstructor=function(a){var b=this.getShape(a.style[mxConstants.STYLE_SHAPE]);null==b&&(b=a.view.graph.getModel().isEdge(a.cell)?this.defaultEdgeShape:this.defaultVertexShape);return b};\nmxCellRenderer.prototype.configureShape=function(a){a.shape.apply(a);a.shape.image=a.view.graph.getImage(a);a.shape.indicatorColor=a.view.graph.getIndicatorColor(a);a.shape.indicatorStrokeColor=a.style[mxConstants.STYLE_INDICATOR_STROKECOLOR];a.shape.indicatorGradientColor=a.view.graph.getIndicatorGradientColor(a);a.shape.indicatorDirection=a.style[mxConstants.STYLE_INDICATOR_DIRECTION];a.shape.indicatorImage=a.view.graph.getIndicatorImage(a);this.postConfigureShape(a)};\nmxCellRenderer.prototype.postConfigureShape=function(a){null!=a.shape&&(this.resolveColor(a,\"indicatorGradientColor\",mxConstants.STYLE_GRADIENTCOLOR),this.resolveColor(a,\"indicatorColor\",mxConstants.STYLE_FILLCOLOR),this.resolveColor(a,\"gradient\",mxConstants.STYLE_GRADIENTCOLOR),this.resolveColor(a,\"stroke\",mxConstants.STYLE_STROKECOLOR),this.resolveColor(a,\"fill\",mxConstants.STYLE_FILLCOLOR))};\nmxCellRenderer.prototype.checkPlaceholderStyles=function(a){if(null!=a.style)for(var b=[\"inherit\",\"swimlane\",\"indicated\"],c=[mxConstants.STYLE_FILLCOLOR,mxConstants.STYLE_STROKECOLOR,mxConstants.STYLE_GRADIENTCOLOR,mxConstants.STYLE_FONTCOLOR],d=0;d<c.length;d++)if(0<=mxUtils.indexOf(b,a.style[c[d]]))return!0;return!1};\nmxCellRenderer.prototype.resolveColor=function(a,b,c){var d=c==mxConstants.STYLE_FONTCOLOR?a.text:a.shape;if(null!=d){var e=a.view.graph,f=d[b],g=null;\"inherit\"==f?g=e.model.getParent(a.cell):\"swimlane\"==f?(d[b]=c==mxConstants.STYLE_STROKECOLOR||c==mxConstants.STYLE_FONTCOLOR?\"#000000\":\"#ffffff\",g=null!=e.model.getTerminal(a.cell,!1)?e.model.getTerminal(a.cell,!1):a.cell,g=e.getSwimlane(g),c=e.swimlaneIndicatorColorAttribute):\"indicated\"==f&&null!=a.shape?d[b]=a.shape.indicatorColor:c!=mxConstants.STYLE_FILLCOLOR&&\nf==mxConstants.STYLE_FILLCOLOR&&null!=a.shape?d[b]=a.style[mxConstants.STYLE_FILLCOLOR]:c!=mxConstants.STYLE_STROKECOLOR&&f==mxConstants.STYLE_STROKECOLOR&&null!=a.shape&&(d[b]=a.style[mxConstants.STYLE_STROKECOLOR]);null!=g&&(a=e.getView().getState(g),d[b]=null,null!=a&&(e=c==mxConstants.STYLE_FONTCOLOR?a.text:a.shape,d[b]=null!=e&&\"indicatorColor\"!=b?e[b]:a.style[c]))}};mxCellRenderer.prototype.getLabelValue=function(a){return a.view.graph.getLabel(a.cell)};\nmxCellRenderer.prototype.createLabel=function(a,b){var c=a.view.graph;c.getModel().isEdge(a.cell);if(0<a.style[mxConstants.STYLE_FONTSIZE]||null==a.style[mxConstants.STYLE_FONTSIZE]){var d=c.isHtmlLabel(a.cell)||null!=b&&mxUtils.isNode(b);a.text=new this.defaultTextShape(b,new mxRectangle,a.style[mxConstants.STYLE_ALIGN]||mxConstants.ALIGN_CENTER,c.getVerticalAlign(a),a.style[mxConstants.STYLE_FONTCOLOR],a.style[mxConstants.STYLE_FONTFAMILY],a.style[mxConstants.STYLE_FONTSIZE],a.style[mxConstants.STYLE_FONTSTYLE],\na.style[mxConstants.STYLE_SPACING],a.style[mxConstants.STYLE_SPACING_TOP],a.style[mxConstants.STYLE_SPACING_RIGHT],a.style[mxConstants.STYLE_SPACING_BOTTOM],a.style[mxConstants.STYLE_SPACING_LEFT],a.style[mxConstants.STYLE_HORIZONTAL],a.style[mxConstants.STYLE_LABEL_BACKGROUNDCOLOR],a.style[mxConstants.STYLE_LABEL_BORDERCOLOR],c.isWrapping(a.cell)&&c.isHtmlLabel(a.cell),c.isLabelClipped(a.cell),a.style[mxConstants.STYLE_OVERFLOW],a.style[mxConstants.STYLE_LABEL_PADDING],mxUtils.getValue(a.style,mxConstants.STYLE_TEXT_DIRECTION,\nmxConstants.DEFAULT_TEXT_DIRECTION));a.text.opacity=mxUtils.getValue(a.style,mxConstants.STYLE_TEXT_OPACITY,100);a.text.dialect=d?mxConstants.DIALECT_STRICTHTML:a.view.graph.dialect;a.text.style=a.style;a.text.state=a;this.initializeLabel(a,a.text);this.configureShape(a);var e=!1,f=function(g){var k=a;if(mxClient.IS_TOUCH||e)k=mxEvent.getClientX(g),g=mxEvent.getClientY(g),g=mxUtils.convertPoint(c.container,k,g),k=c.view.getState(c.getCellAt(g.x,g.y));return k};mxEvent.addGestureListeners(a.text.node,\nmxUtils.bind(this,function(g){this.isLabelEvent(a,g)&&(c.fireMouseEvent(mxEvent.MOUSE_DOWN,new mxMouseEvent(g,a)),e=c.dialect!=mxConstants.DIALECT_SVG&&\"IMG\"==mxEvent.getSource(g).nodeName)}),mxUtils.bind(this,function(g){this.isLabelEvent(a,g)&&c.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(g,f(g)))}),mxUtils.bind(this,function(g){this.isLabelEvent(a,g)&&(c.fireMouseEvent(mxEvent.MOUSE_UP,new mxMouseEvent(g,f(g))),e=!1)}));c.nativeDblClickEnabled&&mxEvent.addListener(a.text.node,\"dblclick\",\nmxUtils.bind(this,function(g){this.isLabelEvent(a,g)&&(c.dblClick(g,a.cell),mxEvent.consume(g))}))}};mxCellRenderer.prototype.initializeLabel=function(a,b){mxClient.IS_SVG&&mxClient.NO_FO&&b.dialect!=mxConstants.DIALECT_SVG?b.init(a.view.graph.container):b.init(a.view.getDrawPane())};\nmxCellRenderer.prototype.createCellOverlays=function(a){var b=a.view.graph.getCellOverlays(a.cell),c=null;if(null!=b){c=new mxDictionary;for(var d=0;d<b.length;d++){var e=null!=a.overlays?a.overlays.remove(b[d]):null;null==e?(e=new mxImageShape(new mxRectangle,b[d].image.src),e.dialect=a.view.graph.dialect,e.preserveImageAspect=!1,e.overlay=b[d],this.initializeOverlay(a,e),this.installCellOverlayListeners(a,b[d],e),null!=b[d].cursor&&(e.node.style.cursor=b[d].cursor),c.put(b[d],e)):c.put(b[d],e)}}null!=\na.overlays&&a.overlays.visit(function(f,g){g.destroy()});a.overlays=c};mxCellRenderer.prototype.initializeOverlay=function(a,b){b.init(a.view.getOverlayPane())};\nmxCellRenderer.prototype.installCellOverlayListeners=function(a,b,c){var d=a.view.graph;mxEvent.addListener(c.node,\"click\",function(e){d.isEditing()&&d.stopEditing(!d.isInvokesStopCellEditing());b.fireEvent(new mxEventObject(mxEvent.CLICK,\"event\",e,\"cell\",a.cell))});mxEvent.addGestureListeners(c.node,function(e){mxEvent.consume(e)},function(e){d.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(e,a))});mxClient.IS_TOUCH&&mxEvent.addListener(c.node,\"touchend\",function(e){b.fireEvent(new mxEventObject(mxEvent.CLICK,\n\"event\",e,\"cell\",a.cell))})};mxCellRenderer.prototype.createControl=function(a){var b=a.view.graph,c=b.getFoldingImage(a);if(b.foldingEnabled&&null!=c){if(null==a.control){var d=new mxRectangle(0,0,c.width,c.height);a.control=new mxImageShape(d,c.src);a.control.preserveImageAspect=!1;a.control.dialect=b.dialect;this.initControl(a,a.control,!0,this.createControlClickHandler(a))}}else null!=a.control&&(a.control.destroy(),a.control=null)};\nmxCellRenderer.prototype.createControlClickHandler=function(a){var b=a.view.graph;return mxUtils.bind(this,function(c){if(this.forceControlClickHandler||b.isEnabled()){var d=!b.isCellCollapsed(a.cell);b.foldCells(d,!1,[a.cell],null,c);mxEvent.consume(c)}})};\nmxCellRenderer.prototype.initControl=function(a,b,c,d){var e=a.view.graph;e.isHtmlLabel(a.cell)&&mxClient.NO_FO&&e.dialect==mxConstants.DIALECT_SVG?(b.dialect=mxConstants.DIALECT_PREFERHTML,b.init(e.container),b.node.style.zIndex=1):b.init(a.view.getOverlayPane());b=b.innerNode||b.node;null==d||mxClient.IS_IOS||(e.isEnabled()&&(b.style.cursor=\"pointer\"),mxEvent.addListener(b,\"click\",d));if(c){var f=null;mxEvent.addGestureListeners(b,function(g){f=new mxPoint(mxEvent.getClientX(g),mxEvent.getClientY(g));\ne.fireMouseEvent(mxEvent.MOUSE_DOWN,new mxMouseEvent(g,a));mxEvent.consume(g)},function(g){e.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(g,a))},function(g){e.fireMouseEvent(mxEvent.MOUSE_UP,new mxMouseEvent(g,a));mxEvent.consume(g)});null!=d&&mxClient.IS_IOS&&b.addEventListener(\"touchend\",function(g){if(null!=f){var k=e.tolerance;Math.abs(f.x-mxEvent.getClientX(g))<k&&Math.abs(f.y-mxEvent.getClientY(g))<k&&(d.call(d,g),mxEvent.consume(g))}},!0)}return b};\nmxCellRenderer.prototype.isShapeEvent=function(a,b){return!0};mxCellRenderer.prototype.isLabelEvent=function(a,b){return!0};\nmxCellRenderer.prototype.installListeners=function(a){var b=a.view.graph,c=function(d){var e=a;if(b.dialect!=mxConstants.DIALECT_SVG&&\"IMG\"==mxEvent.getSource(d).nodeName||mxClient.IS_TOUCH)e=mxEvent.getClientX(d),d=mxEvent.getClientY(d),d=mxUtils.convertPoint(b.container,e,d),e=b.view.getState(b.getCellAt(d.x,d.y));return e};mxEvent.addGestureListeners(a.shape.node,mxUtils.bind(this,function(d){this.isShapeEvent(a,d)&&b.fireMouseEvent(mxEvent.MOUSE_DOWN,new mxMouseEvent(d,a))}),mxUtils.bind(this,\nfunction(d){this.isShapeEvent(a,d)&&b.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(d,c(d)))}),mxUtils.bind(this,function(d){this.isShapeEvent(a,d)&&b.fireMouseEvent(mxEvent.MOUSE_UP,new mxMouseEvent(d,c(d)))}));b.nativeDblClickEnabled&&mxEvent.addListener(a.shape.node,\"dblclick\",mxUtils.bind(this,function(d){this.isShapeEvent(a,d)&&(b.dblClick(d,a.cell),mxEvent.consume(d))}))};\nmxCellRenderer.prototype.redrawLabel=function(a,b){var c=a.view.graph,d=this.getLabelValue(a),e=c.isWrapping(a.cell),f=c.isLabelClipped(a.cell),g=a.view.graph.isHtmlLabel(a.cell)||null!=d&&mxUtils.isNode(d)?mxConstants.DIALECT_STRICTHTML:a.view.graph.dialect,k=a.style[mxConstants.STYLE_OVERFLOW]||\"visible\";null==a.text||a.text.wrap==e&&a.text.clipped==f&&a.text.overflow==k&&a.text.dialect==g||(a.text.destroy(),a.text=null);null==a.text&&null!=d&&(mxUtils.isNode(d)||0<d.length)?this.createLabel(a,\nd):null==a.text||null!=d&&0!=d.length||(a.text.destroy(),a.text=null);if(null!=a.text){b&&(null!=a.text.lastValue&&this.isTextShapeInvalid(a,a.text)&&(a.text.lastValue=null),a.text.resetStyles(),a.text.apply(a),this.configureShape(a),a.text.valign=c.getVerticalAlign(a));c=this.getLabelBounds(a);var l=this.getTextScale(a);this.resolveColor(a,\"color\",mxConstants.STYLE_FONTCOLOR);if(b||a.text.value!=d||a.text.isWrapping!=e||a.text.overflow!=k||a.text.isClipping!=f||a.text.scale!=l||a.text.dialect!=g||\nnull==a.text.bounds||!a.text.bounds.equals(c))a.text.dialect=g,a.text.value=d,a.text.bounds=c,a.text.scale=l,a.text.wrap=e,a.text.clipped=f,a.text.overflow=k,b=a.text.node.style.visibility,this.redrawLabelShape(a.text),a.text.node.style.visibility=b}};\nmxCellRenderer.prototype.isTextShapeInvalid=function(a,b){function c(d,e,f){return\"spacingTop\"==e||\"spacingRight\"==e||\"spacingBottom\"==e||\"spacingLeft\"==e?parseFloat(b[d])-parseFloat(b.spacing)!=(a.style[e]||f):b[d]!=(null!=a.style[e]?a.style[e]:f)}return c(\"fontStyle\",mxConstants.STYLE_FONTSTYLE,mxConstants.DEFAULT_FONTSTYLE)||c(\"family\",mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY)||c(\"size\",mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE)||c(\"color\",mxConstants.STYLE_FONTCOLOR,\n\"black\")||c(\"align\",mxConstants.STYLE_ALIGN,\"\")||c(\"valign\",mxConstants.STYLE_VERTICAL_ALIGN,\"\")||c(\"spacing\",mxConstants.STYLE_SPACING,2)||c(\"spacingTop\",mxConstants.STYLE_SPACING_TOP,0)||c(\"spacingRight\",mxConstants.STYLE_SPACING_RIGHT,0)||c(\"spacingBottom\",mxConstants.STYLE_SPACING_BOTTOM,0)||c(\"spacingLeft\",mxConstants.STYLE_SPACING_LEFT,0)||c(\"horizontal\",mxConstants.STYLE_HORIZONTAL,!0)||c(\"background\",mxConstants.STYLE_LABEL_BACKGROUNDCOLOR)||c(\"border\",mxConstants.STYLE_LABEL_BORDERCOLOR)||\nc(\"opacity\",mxConstants.STYLE_TEXT_OPACITY,100)||c(\"textDirection\",mxConstants.STYLE_TEXT_DIRECTION,mxConstants.DEFAULT_TEXT_DIRECTION)};mxCellRenderer.prototype.redrawLabelShape=function(a){a.redraw()};mxCellRenderer.prototype.getTextScale=function(a){return a.view.scale};\nmxCellRenderer.prototype.getLabelBounds=function(a){var b=a.view.graph,c=a.view.scale,d=b.getModel().isEdge(a.cell),e=new mxRectangle(a.absoluteOffset.x,a.absoluteOffset.y);if(d){var f=a.text.getSpacing();e.x+=f.x*c;e.y+=f.y*c;b=b.getCellGeometry(a.cell);null!=b&&(e.width=Math.max(0,b.width*c),e.height=Math.max(0,b.height*c))}else a.text.isPaintBoundsInverted()&&(b=e.x,e.x=e.y,e.y=b),e.x+=a.x,e.y+=a.y,e.width=Math.max(1,a.width),e.height=Math.max(1,a.height);a.text.isPaintBoundsInverted()&&(b=(a.width-\na.height)/2,e.x+=b,e.y-=b,b=e.width,e.width=e.height,e.height=b);null!=a.shape&&(b=mxUtils.getValue(a.style,mxConstants.STYLE_LABEL_POSITION,mxConstants.ALIGN_CENTER),f=mxUtils.getValue(a.style,mxConstants.STYLE_VERTICAL_LABEL_POSITION,mxConstants.ALIGN_MIDDLE),b==mxConstants.ALIGN_CENTER&&f==mxConstants.ALIGN_MIDDLE&&(e=a.shape.getLabelBounds(e)));b=mxUtils.getValue(a.style,mxConstants.STYLE_LABEL_WIDTH,null);null!=b&&(e.width=parseFloat(b)*c);d||this.rotateLabelBounds(a,e);return e};\nmxCellRenderer.prototype.rotateLabelBounds=function(a,b){b.y-=a.text.margin.y*b.height;b.x-=a.text.margin.x*b.width;if(!this.legacySpacing||\"fill\"!=a.style[mxConstants.STYLE_OVERFLOW]&&\"width\"!=a.style[mxConstants.STYLE_OVERFLOW]&&(\"block\"!=a.style[mxConstants.STYLE_OVERFLOW]||\"1\"==a.style[mxConstants.STYLE_BLOCK_SPACING])){var c=a.view.scale,d=a.text.getSpacing(\"1\"==a.style[mxConstants.STYLE_BLOCK_SPACING]);b.x+=d.x*c;b.y+=d.y*c;d=mxUtils.getValue(a.style,mxConstants.STYLE_LABEL_POSITION,mxConstants.ALIGN_CENTER);\nvar e=mxUtils.getValue(a.style,mxConstants.STYLE_VERTICAL_LABEL_POSITION,mxConstants.ALIGN_MIDDLE),f=mxUtils.getValue(a.style,mxConstants.STYLE_LABEL_WIDTH,null);b.width=Math.max(0,b.width-(d==mxConstants.ALIGN_CENTER&&null==f?a.text.spacingLeft*c+a.text.spacingRight*c:0));b.height=Math.max(0,b.height-(e==mxConstants.ALIGN_MIDDLE?a.text.spacingTop*c+a.text.spacingBottom*c:0))}d=a.text.getTextRotation();0!=d&&null!=a&&a.view.graph.model.isVertex(a.cell)&&(c=a.getCenterX(),a=a.getCenterY(),b.x!=c||\nb.y!=a)&&(d*=Math.PI/180,a=mxUtils.getRotatedPoint(new mxPoint(b.x,b.y),Math.cos(d),Math.sin(d),new mxPoint(c,a)),b.x=a.x,b.y=a.y)};\nmxCellRenderer.prototype.redrawCellOverlays=function(a,b){this.createCellOverlays(a);if(null!=a.overlays){var c=mxUtils.mod(mxUtils.getValue(a.style,mxConstants.STYLE_ROTATION,0),90),d=mxUtils.toRadians(c),e=Math.cos(d),f=Math.sin(d);a.overlays.visit(function(g,k){g=k.overlay.getBounds(a);if(!a.view.graph.getModel().isEdge(a.cell)&&null!=a.shape&&0!=c){var l=g.getCenterX(),m=g.getCenterY();m=mxUtils.getRotatedPoint(new mxPoint(l,m),e,f,new mxPoint(a.getCenterX(),a.getCenterY()));l=m.x;m=m.y;g.x=Math.round(l-\ng.width/2);g.y=Math.round(m-g.height/2)}if(b||null==k.bounds||k.scale!=a.view.scale||!k.bounds.equals(g))k.bounds=g,k.scale=a.view.scale,k.redraw()})}};\nmxCellRenderer.prototype.redrawControl=function(a,b){var c=a.view.graph.getFoldingImage(a);if(null!=a.control&&null!=c){c=this.getControlBounds(a,c.width,c.height);var d=this.legacyControlPosition?mxUtils.getValue(a.style,mxConstants.STYLE_ROTATION,0):a.shape.getTextRotation(),e=a.view.scale;if(b||a.control.scale!=e||!a.control.bounds.equals(c)||a.control.rotation!=d)a.control.rotation=d,a.control.bounds=c,a.control.scale=e,a.control.redraw()}};\nmxCellRenderer.prototype.getControlBounds=function(a,b,c){if(null!=a.control){var d=a.view.scale,e=a.getCenterX(),f=a.getCenterY();if(!a.view.graph.getModel().isEdge(a.cell)&&(e=a.x+b*d,f=a.y+c*d,null!=a.shape)){var g=a.shape.getShapeRotation();if(this.legacyControlPosition)g=mxUtils.getValue(a.style,mxConstants.STYLE_ROTATION,0);else if(a.shape.isPaintBoundsInverted()){var k=(a.width-a.height)/2;e+=k;f-=k}0!=g&&(k=mxUtils.toRadians(g),g=Math.cos(k),k=Math.sin(k),f=mxUtils.getRotatedPoint(new mxPoint(e,\nf),g,k,new mxPoint(a.getCenterX(),a.getCenterY())),e=f.x,f=f.y)}return a.view.graph.getModel().isEdge(a.cell),new mxRectangle(Math.round(e-b/2*d),Math.round(f-c/2*d),Math.round(b*d),Math.round(c*d))}return null};\nmxCellRenderer.prototype.insertStateAfter=function(a,b,c){for(var d=this.getShapesForState(a),e=0;e<d.length;e++)if(null!=d[e]&&null!=d[e].node){var f=d[e].node.parentNode!=a.view.getDrawPane()&&d[e].node.parentNode!=a.view.getOverlayPane(),g=f?c:b;if(null!=g&&g.nextSibling!=d[e].node)null==g.nextSibling?g.parentNode.appendChild(d[e].node):g.parentNode.insertBefore(d[e].node,g.nextSibling);else if(null==g)if(d[e].node.parentNode==a.view.graph.container){for(g=a.view.canvas;null!=g&&g.parentNode!=\na.view.graph.container;)g=g.parentNode;null!=g&&null!=g.nextSibling?g.nextSibling!=d[e].node&&d[e].node.parentNode.insertBefore(d[e].node,g.nextSibling):d[e].node.parentNode.appendChild(d[e].node)}else null!=d[e].node.parentNode&&null!=d[e].node.parentNode.firstChild&&d[e].node.parentNode.firstChild!=d[e].node&&d[e].node.parentNode.insertBefore(d[e].node,d[e].node.parentNode.firstChild);f?c=d[e].node:b=d[e].node}return[b,c]};\nmxCellRenderer.prototype.getShapesForState=function(a){return[a.shape,a.text,a.control]};mxCellRenderer.prototype.redraw=function(a,b,c){b=this.redrawShape(a,b,c);null==a.shape||null!=c&&!c||(this.redrawLabel(a,b),this.redrawCellOverlays(a,b),this.redrawControl(a,b))};\nmxCellRenderer.prototype.redrawShape=function(a,b,c){var d=a.view.graph.model,e=!1;null!=a.shape&&null!=a.shape.style&&null!=a.style&&a.shape.style[mxConstants.STYLE_SHAPE]!=a.style[mxConstants.STYLE_SHAPE]&&(a.shape.destroy(),a.shape=null);null==a.shape&&null!=a.view.graph.container&&a.cell!=a.view.currentRoot&&(d.isVertex(a.cell)||d.isEdge(a.cell))?(a.shape=this.createShape(a),null!=a.shape&&(a.shape.minSvgStrokeWidth=this.minSvgStrokeWidth,a.shape.antiAlias=this.antiAlias,this.createIndicatorShape(a),\nthis.initializeShape(a),this.createCellOverlays(a),this.installListeners(a),a.view.graph.selectionCellsHandler.updateHandler(a))):b||null==a.shape||mxUtils.equalEntries(a.shape.style,a.style)&&!this.checkPlaceholderStyles(a)||(a.shape.resetStyles(),this.configureShape(a),a.view.graph.selectionCellsHandler.updateHandler(a),b=!0);null!=a.shape&&a.shape.indicatorShape!=this.getShape(a.view.graph.getIndicatorShape(a))&&(null!=a.shape.indicator&&(a.shape.indicator.destroy(),a.shape.indicator=null),this.createIndicatorShape(a),\nnull!=a.shape.indicatorShape&&(a.shape.indicator=new a.shape.indicatorShape,a.shape.indicator.dialect=a.shape.dialect,a.shape.indicator.init(a.node),b=!0));null!=a.shape&&(this.createControl(a),b||this.isShapeInvalid(a,a.shape))&&(null!=a.absolutePoints?(a.shape.points=a.absolutePoints.slice(),a.shape.bounds=null):(a.shape.points=null,a.shape.bounds=new mxRectangle(a.x,a.y,a.width,a.height)),a.shape.scale=a.view.scale,(null==c||c)&&this.doRedrawShape(a),e=!0);return e};\nmxCellRenderer.prototype.doRedrawShape=function(a){a.shape.redraw()};mxCellRenderer.prototype.isShapeInvalid=function(a,b){return null==b.bounds||b.scale!=a.view.scale||null==a.absolutePoints&&!b.bounds.equals(a)||null!=a.absolutePoints&&!mxUtils.equalPoints(b.points,a.absolutePoints)};\nmxCellRenderer.prototype.destroy=function(a){null!=a.shape&&(null!=a.text&&(a.text.destroy(),a.text=null),null!=a.overlays&&(a.overlays.visit(function(b,c){c.destroy()}),a.overlays=null),null!=a.control&&(a.control.destroy(),a.control=null),a.shape.destroy(),a.shape=null)};\nvar mxEdgeStyle={EntityRelation:function(a,b,c,d,e){var f=a.view,g=f.graph;d=mxUtils.getValue(a.style,mxConstants.STYLE_SEGMENT,mxConstants.ENTITY_SEGMENT)*f.scale;var k=a.absolutePoints,l=k[0],m=k[k.length-1];k=!1;if(null!=b){var n=g.getCellGeometry(b.cell);n.relative?k=.5>=n.x:null!=c&&(k=(null!=m?m.x:c.x+c.width)<(null!=l?l.x:b.x))}if(null!=l)b=new mxCellState,b.x=l.x,b.y=l.y;else if(null!=b){var p=mxUtils.getPortConstraints(b,a,!0,mxConstants.DIRECTION_MASK_NONE);p!=mxConstants.DIRECTION_MASK_NONE&&\np!=mxConstants.DIRECTION_MASK_WEST+mxConstants.DIRECTION_MASK_EAST&&(k=p==mxConstants.DIRECTION_MASK_WEST)}else return;n=!0;null!=c&&(g=g.getCellGeometry(c.cell),g.relative?n=.5>=g.x:null!=b&&(n=(null!=l?l.x:b.x+b.width)<(null!=m?m.x:c.x)));null!=m?(c=new mxCellState,c.x=m.x,c.y=m.y):null!=c&&(p=mxUtils.getPortConstraints(c,a,!1,mxConstants.DIRECTION_MASK_NONE),p!=mxConstants.DIRECTION_MASK_NONE&&p!=mxConstants.DIRECTION_MASK_WEST+mxConstants.DIRECTION_MASK_EAST&&(n=p==mxConstants.DIRECTION_MASK_WEST));\nnull!=b&&null!=c&&(a=k?b.x:b.x+b.width,b=f.getRoutingCenterY(b),l=n?c.x:c.x+c.width,c=f.getRoutingCenterY(c),f=new mxPoint(a+(k?-d:d),b),g=new mxPoint(l+(n?-d:d),c),k==n?(d=k?Math.min(a,l)-d:Math.max(a,l)+d,e.push(new mxPoint(d,b)),e.push(new mxPoint(d,c))):(f.x<g.x==k?(d=b+(c-b)/2,e.push(f),e.push(new mxPoint(f.x,d)),e.push(new mxPoint(g.x,d))):e.push(f),e.push(g)))},Loop:function(a,b,c,d,e){c=a.absolutePoints;var f=c[c.length-1];if(null!=c[0]&&null!=f){if(null!=d&&0<d.length)for(b=0;b<d.length;b++)c=\nd[b],c=a.view.transformControlPoint(a,c),e.push(new mxPoint(c.x,c.y))}else if(null!=b){f=a.view;var g=f.graph;c=null!=d&&0<d.length?d[0]:null;null!=c&&(c=f.transformControlPoint(a,c),mxUtils.contains(b,c.x,c.y)&&(c=null));var k=d=0,l=0,m=0;g=mxUtils.getValue(a.style,mxConstants.STYLE_SEGMENT,g.gridSize)*f.scale;a=mxUtils.getValue(a.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_WEST);a==mxConstants.DIRECTION_NORTH||a==mxConstants.DIRECTION_SOUTH?(d=f.getRoutingCenterX(b),k=g):(l=f.getRoutingCenterY(b),\nm=g);null==c||c.x<b.x||c.x>b.x+b.width?null!=c?(d=c.x,m=Math.max(Math.abs(l-c.y),m)):a==mxConstants.DIRECTION_NORTH?l=b.y-2*k:a==mxConstants.DIRECTION_SOUTH?l=b.y+b.height+2*k:d=a==mxConstants.DIRECTION_EAST?b.x-2*m:b.x+b.width+2*m:null!=c&&(d=f.getRoutingCenterX(b),k=Math.max(Math.abs(d-c.x),m),l=c.y,m=0);e.push(new mxPoint(d-k,l-m));e.push(new mxPoint(d+k,l+m))}},ElbowConnector:function(a,b,c,d,e){var f=null!=d&&0<d.length?d[0]:null,g=!1,k=!1;if(null!=b&&null!=c)if(null!=f){var l=Math.min(b.x,c.x),\nm=Math.max(b.x+b.width,c.x+c.width);k=Math.min(b.y,c.y);var n=Math.max(b.y+b.height,c.y+c.height);f=a.view.transformControlPoint(a,f);g=f.y<k||f.y>n;k=f.x<l||f.x>m}else l=Math.max(b.x,c.x),m=Math.min(b.x+b.width,c.x+c.width),g=l==m,g||(k=Math.max(b.y,c.y),n=Math.min(b.y+b.height,c.y+c.height),k=k==n);k||!g&&a.style[mxConstants.STYLE_ELBOW]!=mxConstants.ELBOW_VERTICAL?mxEdgeStyle.SideToSide(a,b,c,d,e):mxEdgeStyle.TopToBottom(a,b,c,d,e)},SideToSide:function(a,b,c,d,e){var f=a.view;d=null!=d&&0<d.length?\nd[0]:null;var g=a.absolutePoints,k=g[0];g=g[g.length-1];null!=d&&(d=f.transformControlPoint(a,d));null!=k&&(b=new mxCellState,b.x=k.x,b.y=k.y);null!=g&&(c=new mxCellState,c.x=g.x,c.y=g.y);null!=b&&null!=c&&(a=Math.max(b.x,c.x),k=Math.min(b.x+b.width,c.x+c.width),a=null!=d?d.x:Math.round(k+(a-k)/2),k=f.getRoutingCenterY(b),f=f.getRoutingCenterY(c),null!=d&&(d.y>=b.y&&d.y<=b.y+b.height&&(k=d.y),d.y>=c.y&&d.y<=c.y+c.height&&(f=d.y)),mxUtils.contains(c,a,k)||mxUtils.contains(b,a,k)||e.push(new mxPoint(a,\nk)),mxUtils.contains(c,a,f)||mxUtils.contains(b,a,f)||e.push(new mxPoint(a,f)),1==e.length&&(null!=d?mxUtils.contains(c,a,d.y)||mxUtils.contains(b,a,d.y)||e.push(new mxPoint(a,d.y)):(f=Math.max(b.y,c.y),e.push(new mxPoint(a,f+(Math.min(b.y+b.height,c.y+c.height)-f)/2)))))},TopToBottom:function(a,b,c,d,e){var f=a.view;d=null!=d&&0<d.length?d[0]:null;var g=a.absolutePoints,k=g[0];g=g[g.length-1];null!=d&&(d=f.transformControlPoint(a,d));null!=k&&(b=new mxCellState,b.x=k.x,b.y=k.y);null!=g&&(c=new mxCellState,\nc.x=g.x,c.y=g.y);null!=b&&null!=c&&(k=Math.max(b.y,c.y),g=Math.min(b.y+b.height,c.y+c.height),a=f.getRoutingCenterX(b),null!=d&&d.x>=b.x&&d.x<=b.x+b.width&&(a=d.x),k=null!=d?d.y:Math.round(g+(k-g)/2),mxUtils.contains(c,a,k)||mxUtils.contains(b,a,k)||e.push(new mxPoint(a,k)),a=null!=d&&d.x>=c.x&&d.x<=c.x+c.width?d.x:f.getRoutingCenterX(c),mxUtils.contains(c,a,k)||mxUtils.contains(b,a,k)||e.push(new mxPoint(a,k)),1==e.length&&(null!=d&&1==e.length?mxUtils.contains(c,d.x,k)||mxUtils.contains(b,d.x,k)||\ne.push(new mxPoint(d.x,k)):(f=Math.max(b.x,c.x),e.push(new mxPoint(f+(Math.min(b.x+b.width,c.x+c.width)-f)/2,k)))))},SegmentConnector:function(a,b,c,d,e){var f=mxEdgeStyle.scalePointArray(a.absolutePoints,a.view.scale);b=mxEdgeStyle.scaleCellState(b,a.view.scale);var g=mxEdgeStyle.scaleCellState(c,a.view.scale);c=[];var k=0<e.length?e[0]:null,l=!0,m=f[0];null==m&&null!=b?m=new mxPoint(a.view.getRoutingCenterX(b),a.view.getRoutingCenterY(b)):null!=m&&(m=m.clone());var n=f.length-1;if(null!=d&&0<d.length){for(var p=\n[],q=0;q<d.length;q++){var r=a.view.transformControlPoint(a,d[q],!0);null!=r&&p.push(r)}if(0==p.length)return;null!=m&&null!=p[0]&&(1>Math.abs(p[0].x-m.x)&&(p[0].x=m.x),1>Math.abs(p[0].y-m.y)&&(p[0].y=m.y));r=f[n];null!=r&&null!=p[p.length-1]&&(1>Math.abs(p[p.length-1].x-r.x)&&(p[p.length-1].x=r.x),1>Math.abs(p[p.length-1].y-r.y)&&(p[p.length-1].y=r.y));d=p[0];var t=b,u=f[0];var x=d;null!=u&&(t=null);for(q=0;2>q;q++){var y=null!=u&&u.x==x.x,B=null!=u&&u.y==x.y,A=null!=t&&x.y>=t.y&&x.y<=t.y+t.height,\nC=null!=t&&x.x>=t.x&&x.x<=t.x+t.width;t=B||null==u&&A;x=y||null==u&&C;if(0!=q||!(t&&x||y&&B)){if(null!=u&&!B&&!y&&(A||C)){l=A?!1:!0;break}if(x||t){l=t;1==q&&(l=0==p.length%2?t:x);break}}t=g;u=f[n];null!=u&&(t=null);x=p[p.length-1];y&&B&&(p=p.slice(1))}l&&(null!=f[0]&&f[0].y!=d.y||null==f[0]&&null!=b&&(d.y<b.y||d.y>b.y+b.height))?c.push(new mxPoint(m.x,d.y)):!l&&(null!=f[0]&&f[0].x!=d.x||null==f[0]&&null!=b&&(d.x<b.x||d.x>b.x+b.width))&&c.push(new mxPoint(d.x,m.y));l?m.y=d.y:m.x=d.x;for(q=0;q<p.length;q++)l=\n!l,d=p[q],l?m.y=d.y:m.x=d.x,c.push(m.clone())}else d=m,l=!0;m=f[n];null==m&&null!=g&&(m=new mxPoint(a.view.getRoutingCenterX(g),a.view.getRoutingCenterY(g)));null!=m&&null!=d&&(l&&(null!=f[n]&&f[n].y!=d.y||null==f[n]&&null!=g&&(d.y<g.y||d.y>g.y+g.height))?c.push(new mxPoint(m.x,d.y)):!l&&(null!=f[n]&&f[n].x!=d.x||null==f[n]&&null!=g&&(d.x<g.x||d.x>g.x+g.width))&&c.push(new mxPoint(d.x,m.y)));if(null==f[0]&&null!=b)for(;0<c.length&&null!=c[0]&&mxUtils.contains(b,c[0].x,c[0].y);)c.splice(0,1);if(null==\nf[n]&&null!=g)for(;0<c.length&&null!=c[c.length-1]&&mxUtils.contains(g,c[c.length-1].x,c[c.length-1].y);)c.splice(c.length-1,1);for(q=0;q<c.length;q++)if(f=c[q],f.x=Math.round(f.x*a.view.scale*10)/10,f.y=Math.round(f.y*a.view.scale*10)/10,null==k||1<=Math.abs(k.x-f.x)||Math.abs(k.y-f.y)>=Math.max(1,a.view.scale))e.push(f),k=f;null!=r&&null!=e[e.length-1]&&1>=Math.abs(r.x-e[e.length-1].x)&&1>=Math.abs(r.y-e[e.length-1].y)&&(e.splice(e.length-1,1),null!=e[e.length-1]&&(1>Math.abs(e[e.length-1].x-r.x)&&\n(e[e.length-1].x=r.x),1>Math.abs(e[e.length-1].y-r.y)&&(e[e.length-1].y=r.y)))},orthBuffer:10,orthPointsFallback:!0,dirVectors:[[-1,0],[0,-1],[1,0],[0,1],[-1,0],[0,-1],[1,0]],wayPoints1:[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],routePatterns:[[[513,2308,2081,2562],[513,1090,514,2184,2114,2561],[513,1090,514,2564,2184,2562],[513,2308,2561,1090,514,2568,2308]],[[514,1057,513,2308,2081,2562],[514,2184,2114,2561],[514,2184,2562,1057,513,2564,2184],[514,1057,513,2568,2308,\n2561]],[[1090,514,1057,513,2308,2081,2562],[2114,2561],[1090,2562,1057,513,2564,2184],[1090,514,1057,513,2308,2561,2568]],[[2081,2562],[1057,513,1090,514,2184,2114,2561],[1057,513,1090,514,2184,2562,2564],[1057,2561,1090,514,2568,2308]]],inlineRoutePatterns:[[null,[2114,2568],null,null],[null,[514,2081,2114,2568],null,null],[null,[2114,2561],null,null],[[2081,2562],[1057,2114,2568],[2184,2562],null]],vertexSeperations:[],limits:[[0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0]],LEFT_MASK:32,TOP_MASK:64,RIGHT_MASK:128,\nBOTTOM_MASK:256,LEFT:1,TOP:2,RIGHT:4,BOTTOM:8,SIDE_MASK:480,CENTER_MASK:512,SOURCE_MASK:1024,TARGET_MASK:2048,VERTEX_MASK:3072,getJettySize:function(a,b){var c=mxUtils.getValue(a.style,b?mxConstants.STYLE_SOURCE_JETTY_SIZE:mxConstants.STYLE_TARGET_JETTY_SIZE,mxUtils.getValue(a.style,mxConstants.STYLE_JETTY_SIZE,mxEdgeStyle.orthBuffer));\"auto\"==c&&(mxUtils.getValue(a.style,b?mxConstants.STYLE_STARTARROW:mxConstants.STYLE_ENDARROW,mxConstants.NONE)!=mxConstants.NONE?(a=mxUtils.getNumber(a.style,b?mxConstants.STYLE_STARTSIZE:\nmxConstants.STYLE_ENDSIZE,mxConstants.DEFAULT_MARKERSIZE),c=Math.max(2,Math.ceil((a+mxEdgeStyle.orthBuffer)/mxEdgeStyle.orthBuffer))*mxEdgeStyle.orthBuffer):c=2*mxEdgeStyle.orthBuffer);return c},scalePointArray:function(a,b){var c=[];if(null!=a)for(var d=0;d<a.length;d++)if(null!=a[d]){var e=new mxPoint(Math.round(a[d].x/b*10)/10,Math.round(a[d].y/b*10)/10);c[d]=e}else c[d]=null;else c=null;return c},scaleCellState:function(a,b){if(null!=a){var c=a.clone();c.setRect(Math.round(a.x/b*10)/10,Math.round(a.y/\nb*10)/10,Math.round(a.width/b*10)/10,Math.round(a.height/b*10)/10)}else c=null;return c},OrthConnector:function(a,b,c,d,e){var f=a.view.graph,g=null==l?!1:f.getModel().isEdge(l.cell),k=null==m?!1:f.getModel().isEdge(m.cell);f=mxEdgeStyle.scalePointArray(a.absolutePoints,a.view.scale);var l=mxEdgeStyle.scaleCellState(b,a.view.scale),m=mxEdgeStyle.scaleCellState(c,a.view.scale),n=f[0],p=f[f.length-1],q=null!=l?l.x:n.x,r=null!=l?l.y:n.y,t=null!=l?l.width:1,u=null!=l?l.height:1,x=null!=m?m.x:p.x,y=null!=\nm?m.y:p.y,B=null!=m?m.width:1,A=null!=m?m.height:1;f=mxEdgeStyle.getJettySize(a,!0);var C=mxEdgeStyle.getJettySize(a,!1);null!=l&&m==l&&(f=C=Math.max(f,C));var z=C+f,v=!1;if(null!=n&&null!=p){v=p.x-n.x;var D=p.y-n.y;v=v*v+D*D<z*z}if(v||mxEdgeStyle.orthPointsFallback&&null!=d&&0<d.length||g||k)mxEdgeStyle.SegmentConnector(a,b,c,d,e);else if(c=[mxConstants.DIRECTION_MASK_ALL,mxConstants.DIRECTION_MASK_ALL],null!=l&&(c[0]=mxUtils.getPortConstraints(l,a,!0,mxConstants.DIRECTION_MASK_ALL),b=mxUtils.getValue(l.style,\nmxConstants.STYLE_ROTATION,0),0!=b&&(b=mxUtils.getBoundingBox(new mxRectangle(q,r,t,u),b),q=b.x,r=b.y,t=b.width,u=b.height)),null!=m&&(c[1]=mxUtils.getPortConstraints(m,a,!1,mxConstants.DIRECTION_MASK_ALL),b=mxUtils.getValue(m.style,mxConstants.STYLE_ROTATION,0),0!=b&&(b=mxUtils.getBoundingBox(new mxRectangle(x,y,B,A),b),x=b.x,y=b.y,B=b.width,A=b.height)),0!=t&&0!=u&&0!=B&&0!=A){b=[0,0];q=[[q,r,t,u],[x,y,B,A]];C=[f,C];for(v=0;2>v;v++)mxEdgeStyle.limits[v][1]=q[v][0]-C[v],mxEdgeStyle.limits[v][2]=\nq[v][1]-C[v],mxEdgeStyle.limits[v][4]=q[v][0]+q[v][2]+C[v],mxEdgeStyle.limits[v][8]=q[v][1]+q[v][3]+C[v];C=q[0][1]+q[0][3]/2;r=q[1][1]+q[1][3]/2;v=q[0][0]+q[0][2]/2-(q[1][0]+q[1][2]/2);D=C-r;C=0;0>v?C=0>D?2:1:0>=D&&(C=3,0==v&&(C=2));r=null;null!=l&&(r=n);l=[[.5,.5],[.5,.5]];for(v=0;2>v;v++)null!=r&&(l[v][0]=(r.x-q[v][0])/q[v][2],1>=Math.abs(r.x-q[v][0])?b[v]=mxConstants.DIRECTION_MASK_WEST:1>=Math.abs(r.x-q[v][0]-q[v][2])&&(b[v]=mxConstants.DIRECTION_MASK_EAST),l[v][1]=(r.y-q[v][1])/q[v][3],1>=Math.abs(r.y-\nq[v][1])?b[v]=mxConstants.DIRECTION_MASK_NORTH:1>=Math.abs(r.y-q[v][1]-q[v][3])&&(b[v]=mxConstants.DIRECTION_MASK_SOUTH)),r=null,null!=m&&(r=p);v=q[0][1]-(q[1][1]+q[1][3]);p=q[0][0]-(q[1][0]+q[1][2]);r=q[1][1]-(q[0][1]+q[0][3]);t=q[1][0]-(q[0][0]+q[0][2]);mxEdgeStyle.vertexSeperations[1]=Math.max(p-z,0);mxEdgeStyle.vertexSeperations[2]=Math.max(v-z,0);mxEdgeStyle.vertexSeperations[4]=Math.max(r-z,0);mxEdgeStyle.vertexSeperations[3]=Math.max(t-z,0);z=[];m=[];n=[];m[0]=p>=t?mxConstants.DIRECTION_MASK_WEST:\nmxConstants.DIRECTION_MASK_EAST;n[0]=v>=r?mxConstants.DIRECTION_MASK_NORTH:mxConstants.DIRECTION_MASK_SOUTH;m[1]=mxUtils.reversePortConstraints(m[0]);n[1]=mxUtils.reversePortConstraints(n[0]);p=p>=t?p:t;r=v>=r?v:r;t=[[0,0],[0,0]];u=!1;for(v=0;2>v;v++)0==b[v]&&(0==(m[v]&c[v])&&(m[v]=mxUtils.reversePortConstraints(m[v])),0==(n[v]&c[v])&&(n[v]=mxUtils.reversePortConstraints(n[v])),t[v][0]=n[v],t[v][1]=m[v]);0<r&&0<p&&(0<(m[0]&c[0])&&0<(n[1]&c[1])?(t[0][0]=m[0],t[0][1]=n[0],t[1][0]=n[1],t[1][1]=m[1],\nu=!0):0<(n[0]&c[0])&&0<(m[1]&c[1])&&(t[0][0]=n[0],t[0][1]=m[0],t[1][0]=m[1],t[1][1]=n[1],u=!0));0<r&&!u&&(t[0][0]=n[0],t[0][1]=m[0],t[1][0]=n[1],t[1][1]=m[1],u=!0);0<p&&!u&&(t[0][0]=m[0],t[0][1]=n[0],t[1][0]=m[1],t[1][1]=n[1]);for(v=0;2>v;v++)0==b[v]&&(0==(t[v][0]&c[v])&&(t[v][0]=t[v][1]),z[v]=t[v][0]&c[v],z[v]|=(t[v][1]&c[v])<<8,z[v]|=(t[1-v][v]&c[v])<<16,z[v]|=(t[1-v][1-v]&c[v])<<24,0==(z[v]&15)&&(z[v]<<=8),0==(z[v]&3840)&&(z[v]=z[v]&15|z[v]>>8),0==(z[v]&983040)&&(z[v]=z[v]&65535|(z[v]&251658240)>>\n8),b[v]=z[v]&15,c[v]==mxConstants.DIRECTION_MASK_WEST||c[v]==mxConstants.DIRECTION_MASK_NORTH||c[v]==mxConstants.DIRECTION_MASK_EAST||c[v]==mxConstants.DIRECTION_MASK_SOUTH)&&(b[v]=c[v]);c=b[0]==mxConstants.DIRECTION_MASK_EAST?3:b[0];z=b[1]==mxConstants.DIRECTION_MASK_EAST?3:b[1];c-=C;z-=C;1>c&&(c+=4);1>z&&(z+=4);c=mxEdgeStyle.routePatterns[c-1][z-1];mxEdgeStyle.wayPoints1[0][0]=q[0][0];mxEdgeStyle.wayPoints1[0][1]=q[0][1];switch(b[0]){case mxConstants.DIRECTION_MASK_WEST:mxEdgeStyle.wayPoints1[0][0]-=\nf;mxEdgeStyle.wayPoints1[0][1]+=l[0][1]*q[0][3];break;case mxConstants.DIRECTION_MASK_SOUTH:mxEdgeStyle.wayPoints1[0][0]+=l[0][0]*q[0][2];mxEdgeStyle.wayPoints1[0][1]+=q[0][3]+f;break;case mxConstants.DIRECTION_MASK_EAST:mxEdgeStyle.wayPoints1[0][0]+=q[0][2]+f;mxEdgeStyle.wayPoints1[0][1]+=l[0][1]*q[0][3];break;case mxConstants.DIRECTION_MASK_NORTH:mxEdgeStyle.wayPoints1[0][0]+=l[0][0]*q[0][2],mxEdgeStyle.wayPoints1[0][1]-=f}f=0;m=z=0<(b[0]&(mxConstants.DIRECTION_MASK_EAST|mxConstants.DIRECTION_MASK_WEST))?\n0:1;for(v=0;v<c.length;v++)n=c[v]&15,u=n==mxConstants.DIRECTION_MASK_EAST?3:n,u+=C,4<u&&(u-=4),p=mxEdgeStyle.dirVectors[u-1],n=0<u%2?0:1,n!=z&&(f++,mxEdgeStyle.wayPoints1[f][0]=mxEdgeStyle.wayPoints1[f-1][0],mxEdgeStyle.wayPoints1[f][1]=mxEdgeStyle.wayPoints1[f-1][1]),x=0<(c[v]&mxEdgeStyle.TARGET_MASK),y=0<(c[v]&mxEdgeStyle.SOURCE_MASK),r=(c[v]&mxEdgeStyle.SIDE_MASK)>>5,r<<=C,15<r&&(r>>=4),t=0<(c[v]&mxEdgeStyle.CENTER_MASK),(y||x)&&9>r?(u=y?0:1,r=t&&0==n?q[u][0]+l[u][0]*q[u][2]:t?q[u][1]+l[u][1]*\nq[u][3]:mxEdgeStyle.limits[u][r],0==n?(r=(r-mxEdgeStyle.wayPoints1[f][0])*p[0],0<r&&(mxEdgeStyle.wayPoints1[f][0]+=p[0]*r)):(r=(r-mxEdgeStyle.wayPoints1[f][1])*p[1],0<r&&(mxEdgeStyle.wayPoints1[f][1]+=p[1]*r))):t&&(mxEdgeStyle.wayPoints1[f][0]+=p[0]*Math.abs(mxEdgeStyle.vertexSeperations[u]/2),mxEdgeStyle.wayPoints1[f][1]+=p[1]*Math.abs(mxEdgeStyle.vertexSeperations[u]/2)),0<f&&mxEdgeStyle.wayPoints1[f][n]==mxEdgeStyle.wayPoints1[f-1][n]?f--:z=n;for(v=0;v<=f&&(v!=f||((0<(b[1]&(mxConstants.DIRECTION_MASK_EAST|\nmxConstants.DIRECTION_MASK_WEST))?0:1)==m?0:1)==(f+1)%2);v++)e.push(new mxPoint(Math.round(mxEdgeStyle.wayPoints1[v][0]*a.view.scale*10)/10,Math.round(mxEdgeStyle.wayPoints1[v][1]*a.view.scale*10)/10));for(a=1;a<e.length;)null==e[a-1]||null==e[a]||e[a-1].x!=e[a].x||e[a-1].y!=e[a].y?a++:e.splice(a,1)}},getRoutePattern:function(a,b,c,d){var e=a[0]==mxConstants.DIRECTION_MASK_EAST?3:a[0];a=a[1]==mxConstants.DIRECTION_MASK_EAST?3:a[1];e-=b;a-=b;1>e&&(e+=4);1>a&&(a+=4);b=routePatterns[e-1][a-1];0!=c&&\n0!=d||null==inlineRoutePatterns[e-1][a-1]||(b=inlineRoutePatterns[e-1][a-1]);return b}},mxStyleRegistry={values:[],putValue:function(a,b){mxStyleRegistry.values[a]=b},getValue:function(a){return mxStyleRegistry.values[a]},getName:function(a){for(var b in mxStyleRegistry.values)if(mxStyleRegistry.values[b]==a)return b;return null}};mxStyleRegistry.putValue(mxConstants.EDGESTYLE_ELBOW,mxEdgeStyle.ElbowConnector);mxStyleRegistry.putValue(mxConstants.EDGESTYLE_ENTITY_RELATION,mxEdgeStyle.EntityRelation);\nmxStyleRegistry.putValue(mxConstants.EDGESTYLE_LOOP,mxEdgeStyle.Loop);mxStyleRegistry.putValue(mxConstants.EDGESTYLE_SIDETOSIDE,mxEdgeStyle.SideToSide);mxStyleRegistry.putValue(mxConstants.EDGESTYLE_TOPTOBOTTOM,mxEdgeStyle.TopToBottom);mxStyleRegistry.putValue(mxConstants.EDGESTYLE_ORTHOGONAL,mxEdgeStyle.OrthConnector);mxStyleRegistry.putValue(mxConstants.EDGESTYLE_SEGMENT,mxEdgeStyle.SegmentConnector);mxStyleRegistry.putValue(mxConstants.PERIMETER_ELLIPSE,mxPerimeter.EllipsePerimeter);\nmxStyleRegistry.putValue(mxConstants.PERIMETER_RECTANGLE,mxPerimeter.RectanglePerimeter);mxStyleRegistry.putValue(mxConstants.PERIMETER_RHOMBUS,mxPerimeter.RhombusPerimeter);mxStyleRegistry.putValue(mxConstants.PERIMETER_TRIANGLE,mxPerimeter.TrianglePerimeter);mxStyleRegistry.putValue(mxConstants.PERIMETER_HEXAGON,mxPerimeter.HexagonPerimeter);function mxGraphView(a){this.graph=a;this.translate=new mxPoint;this.graphBounds=new mxRectangle;this.states=new mxDictionary}mxGraphView.prototype=new mxEventSource;\nmxGraphView.prototype.constructor=mxGraphView;mxGraphView.prototype.EMPTY_POINT=new mxPoint;mxGraphView.prototype.doneResource=\"none\"!=mxClient.language?\"done\":\"\";mxGraphView.prototype.updatingDocumentResource=\"none\"!=mxClient.language?\"updatingDocument\":\"\";mxGraphView.prototype.allowEval=!1;mxGraphView.prototype.captureDocumentGesture=!0;mxGraphView.prototype.rendering=!0;mxGraphView.prototype.graph=null;mxGraphView.prototype.currentRoot=null;mxGraphView.prototype.graphBounds=null;\nmxGraphView.prototype.scale=1;mxGraphView.prototype.translate=null;mxGraphView.prototype.states=null;mxGraphView.prototype.updateStyle=!1;mxGraphView.prototype.lastNode=null;mxGraphView.prototype.lastHtmlNode=null;mxGraphView.prototype.lastForegroundNode=null;mxGraphView.prototype.lastForegroundHtmlNode=null;mxGraphView.prototype.getGraphBounds=function(){return this.graphBounds};mxGraphView.prototype.setGraphBounds=function(a){this.graphBounds=a};\nmxGraphView.prototype.getBounds=function(a){var b=null;if(null!=a&&0<a.length)for(var c=this.graph.getModel(),d=0;d<a.length;d++)if(c.isVertex(a[d])||c.isEdge(a[d])){var e=this.getState(a[d]);null!=e&&(null==b?b=mxRectangle.fromRectangle(e):b.add(e))}return b};mxGraphView.prototype.setCurrentRoot=function(a){if(this.currentRoot!=a){var b=new mxCurrentRootChange(this,a);b.execute();var c=new mxUndoableEdit(this,!0);c.add(b);this.fireEvent(new mxEventObject(mxEvent.UNDO,\"edit\",c));this.graph.sizeDidChange()}return a};\nmxGraphView.prototype.scaleAndTranslate=function(a,b,c){var d=this.scale,e=new mxPoint(this.translate.x,this.translate.y);if(this.scale!=a||this.translate.x!=b||this.translate.y!=c)this.scale=a,this.translate.x=b,this.translate.y=c,this.isEventsEnabled()&&this.viewStateChanged();this.fireEvent(new mxEventObject(mxEvent.SCALE_AND_TRANSLATE,\"scale\",a,\"previousScale\",d,\"translate\",this.translate,\"previousTranslate\",e))};mxGraphView.prototype.getScale=function(){return this.scale};\nmxGraphView.prototype.setScale=function(a){var b=this.scale;this.scale!=a&&(this.scale=a,this.isEventsEnabled()&&this.viewStateChanged());this.fireEvent(new mxEventObject(mxEvent.SCALE,\"scale\",a,\"previousScale\",b))};mxGraphView.prototype.getTranslate=function(){return this.translate};\nmxGraphView.prototype.setTranslate=function(a,b){var c=new mxPoint(this.translate.x,this.translate.y);if(this.translate.x!=a||this.translate.y!=b)this.translate.x=a,this.translate.y=b,this.isEventsEnabled()&&this.viewStateChanged();this.fireEvent(new mxEventObject(mxEvent.TRANSLATE,\"translate\",this.translate,\"previousTranslate\",c))};mxGraphView.prototype.viewStateChanged=function(){this.revalidate();this.graph.sizeDidChange()};\nmxGraphView.prototype.refresh=function(){null!=this.currentRoot&&this.clear();this.revalidate()};mxGraphView.prototype.revalidate=function(){this.invalidate();this.validate()};mxGraphView.prototype.clear=function(a,b,c){var d=this.graph.getModel();a=a||d.getRoot();b=null!=b?b:!1;c=null!=c?c:!0;this.removeState(a);if(c&&(b||a!=this.currentRoot)){c=d.getChildCount(a);for(var e=0;e<c;e++)this.clear(d.getChildAt(a,e),b)}else this.invalidate(a)};\nmxGraphView.prototype.invalidate=function(a,b,c){var d=this.graph.getModel();a=a||d.getRoot();if(null!=a){b=null!=b?b:!0;c=null!=c?c:!0;var e=this.getState(a);null!=e&&(e.invalid=!0);if(!a.invalidating){a.invalidating=!0;if(b){var f=d.getChildCount(a);for(e=0;e<f;e++){var g=d.getChildAt(a,e);this.invalidate(g,b,c)}}if(c)for(f=d.getEdgeCount(a),e=0;e<f;e++)this.invalidate(d.getEdgeAt(a,e),b,c);delete a.invalidating}}};\nmxGraphView.prototype.validate=function(a){var b=mxLog.enter(\"mxGraphView.validate\");window.status=mxResources.get(this.updatingDocumentResource)||this.updatingDocumentResource;this.resetValidationState();var c=null;null==this.canvas||null!=this.textDiv||8!=document.documentMode||mxClient.IS_EM||(this.placeholder=document.createElement(\"div\"),this.placeholder.style.position=\"absolute\",this.placeholder.style.width=this.canvas.clientWidth+\"px\",this.placeholder.style.height=this.canvas.clientHeight+\n\"px\",this.canvas.parentNode.appendChild(this.placeholder),c=this.drawPane.style.display,this.canvas.style.display=\"none\",this.textDiv=document.createElement(\"div\"),this.textDiv.style.position=\"absolute\",this.textDiv.style.whiteSpace=\"nowrap\",this.textDiv.style.visibility=\"hidden\",this.textDiv.style.display=\"inline-block\",this.textDiv.style.zoom=\"1\",document.body.appendChild(this.textDiv));a=null!=a?a:null!=this.currentRoot?this.currentRoot:this.graph.getModel().getRoot();a=this.validateCellState(this.validateCell(a));\na=this.getBoundingBox(a,!0,!0);this.setGraphBounds(null!=a?a:this.getEmptyBounds());this.validateBackground();null!=c&&(this.canvas.style.display=c,this.textDiv.parentNode.removeChild(this.textDiv),null!=this.placeholder&&this.placeholder.parentNode.removeChild(this.placeholder),this.textDiv=null);this.resetValidationState();window.status=mxResources.get(this.doneResource)||this.doneResource;mxLog.leave(\"mxGraphView.validate\",b)};\nmxGraphView.prototype.getEmptyBounds=function(){return new mxRectangle(this.translate.x*this.scale,this.translate.y*this.scale)};mxGraphView.prototype.updateBoundingBox=function(a){null!=a.shape&&a.shape.updateBoundingBox();null!=a.text&&a.text.updateBoundingBox()};\nmxGraphView.prototype.getBoundingBox=function(a,b,c){b=null!=b?b:!0;c=null!=c?c:!1;var d=null;if(null!=a){var e=function(l){null==l||null==l.boundingBox||isNaN(l.boundingBox.x)||isNaN(l.boundingBox.y)||isNaN(l.boundingBox.width)||isNaN(l.boundingBox.height)||(null==d?d=l.boundingBox.clone():d.add(l.boundingBox))};c&&this.updateBoundingBox(a);e(a.shape);e(a.text);if(b){e=this.graph.getModel();for(var f=e.getChildCount(a.cell),g=0;g<f;g++){var k=this.getBoundingBox(this.getState(e.getChildAt(a.cell,\ng)),b,c);null!=k&&(null==d?d=k:d.add(k))}}}return d};mxGraphView.prototype.createBackgroundPageShape=function(a){return new mxRectangleShape(a,\"white\",\"black\")};mxGraphView.prototype.validateBackground=function(){this.validateBackgroundImage();this.validateBackgroundPage()};\nmxGraphView.prototype.validateBackgroundImage=function(){var a=this.graph.getBackgroundImage();if(null!=a){if(null==this.backgroundImage||this.backgroundImage.image!=a.src){null!=this.backgroundImage&&this.backgroundImage.destroy();var b=new mxRectangle(0,0,1,1);this.backgroundImage=new mxImageShape(b,a.src);this.backgroundImage.dialect=this.graph.dialect;this.backgroundImage.init(this.backgroundPane);this.backgroundImage.redraw();8!=document.documentMode||mxClient.IS_EM||mxEvent.addGestureListeners(this.backgroundImage.node,\nmxUtils.bind(this,function(c){this.graph.fireMouseEvent(mxEvent.MOUSE_DOWN,new mxMouseEvent(c))}),mxUtils.bind(this,function(c){this.graph.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(c))}),mxUtils.bind(this,function(c){this.graph.fireMouseEvent(mxEvent.MOUSE_UP,new mxMouseEvent(c))}))}this.redrawBackgroundImage(this.backgroundImage,a)}else null!=this.backgroundImage&&(this.backgroundImage.destroy(),this.backgroundImage=null)};\nmxGraphView.prototype.validateBackgroundPage=function(){if(this.graph.pageVisible){var a=this.getBackgroundPageBounds();null==this.backgroundPageShape?(this.backgroundPageShape=this.createBackgroundPageShape(a),this.backgroundPageShape.scale=this.scale,this.backgroundPageShape.isShadow=!0,this.backgroundPageShape.dialect=this.graph.dialect,this.backgroundPageShape.init(this.backgroundPane),this.backgroundPageShape.redraw(),this.graph.nativeDblClickEnabled&&mxEvent.addListener(this.backgroundPageShape.node,\n\"dblclick\",mxUtils.bind(this,function(b){this.graph.dblClick(b)})),mxEvent.addGestureListeners(this.backgroundPageShape.node,mxUtils.bind(this,function(b){this.graph.fireMouseEvent(mxEvent.MOUSE_DOWN,new mxMouseEvent(b))}),mxUtils.bind(this,function(b){null!=this.graph.tooltipHandler&&this.graph.tooltipHandler.isHideOnHover()&&this.graph.tooltipHandler.hide();this.graph.isMouseDown&&!mxEvent.isConsumed(b)&&this.graph.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(b))}),mxUtils.bind(this,function(b){this.graph.fireMouseEvent(mxEvent.MOUSE_UP,\nnew mxMouseEvent(b))}))):(this.backgroundPageShape.scale=this.scale,this.backgroundPageShape.bounds=a,this.backgroundPageShape.redraw())}else null!=this.backgroundPageShape&&(this.backgroundPageShape.destroy(),this.backgroundPageShape=null)};mxGraphView.prototype.getBackgroundPageBounds=function(){var a=this.graph.pageFormat,b=this.scale*this.graph.pageScale;return new mxRectangle(this.scale*this.translate.x,this.scale*this.translate.y,a.width*b,a.height*b)};\nmxGraphView.prototype.redrawBackgroundImage=function(a,b){a.scale=this.scale;a.bounds.x=this.scale*(this.translate.x+b.x);a.bounds.y=this.scale*(this.translate.y+b.y);a.bounds.width=this.scale*b.width;a.bounds.height=this.scale*b.height;a.redraw()};\nmxGraphView.prototype.validateCell=function(a,b){if(null!=a)if(b=(null!=b?b:!0)&&this.graph.isCellVisible(a),null==this.getState(a,b)||b)for(var c=this.graph.getModel(),d=c.getChildCount(a),e=0;e<d;e++)this.validateCell(c.getChildAt(a,e),b&&(!this.isCellCollapsed(a)||a==this.currentRoot));else this.removeState(a);return a};\nmxGraphView.prototype.validateCellState=function(a,b){b=null!=b?b:!0;var c=null;if(null!=a&&(c=this.getState(a),null!=c)){var d=this.graph.getModel();if(c.invalid){c.invalid=!1;if(null==c.style||c.invalidStyle)c.style=this.graph.getCellStyle(c.cell),c.invalidStyle=!1;a!=this.currentRoot&&this.validateCellState(d.getParent(a),!1);c.setVisibleTerminalState(this.validateCellState(this.getVisibleTerminal(a,!0),!1),!0);c.setVisibleTerminalState(this.validateCellState(this.getVisibleTerminal(a,!1),!1),\n!1);this.updateCellState(c);a==this.currentRoot||c.invalid||(this.graph.cellRenderer.redraw(c,!1,this.isRendering()),c.updateCachedBounds())}if(b&&!c.invalid){null!=c.shape&&this.stateValidated(c);b=d.getChildCount(a);for(var e=0;e<b;e++)this.validateCellState(d.getChildAt(a,e))}}return c};\nmxGraphView.prototype.updateCellState=function(a){a.absoluteOffset.x=0;a.absoluteOffset.y=0;a.origin.x=0;a.origin.y=0;a.length=0;if(a.cell!=this.currentRoot){var b=this.graph.getModel(),c=this.getState(b.getParent(a.cell));null!=c&&c.cell!=this.currentRoot&&(a.origin.x+=c.origin.x,a.origin.y+=c.origin.y);var d=this.graph.getChildOffsetForCell(a.cell);null!=d&&(a.origin.x+=d.x,a.origin.y+=d.y);var e=this.graph.getCellGeometry(a.cell);null!=e&&(b.isEdge(a.cell)||(d=null!=e.offset?e.offset:this.EMPTY_POINT,\ne.relative&&null!=c?b.isEdge(c.cell)?(d=this.getPoint(c,e),null!=d&&(a.origin.x+=d.x/this.scale-c.origin.x-this.translate.x,a.origin.y+=d.y/this.scale-c.origin.y-this.translate.y)):(a.origin.x+=e.x*c.unscaledWidth+d.x,a.origin.y+=e.y*c.unscaledHeight+d.y):(a.absoluteOffset.x=this.scale*d.x,a.absoluteOffset.y=this.scale*d.y,a.origin.x+=e.x,a.origin.y+=e.y)),a.x=this.scale*(this.translate.x+a.origin.x),a.y=this.scale*(this.translate.y+a.origin.y),a.width=this.scale*e.width,a.unscaledWidth=e.width,a.height=\nthis.scale*e.height,a.unscaledHeight=e.height,b.isVertex(a.cell)&&this.updateVertexState(a,e),b.isEdge(a.cell)&&this.updateEdgeState(a,e))}a.updateCachedBounds()};mxGraphView.prototype.isCellCollapsed=function(a){return this.graph.isCellCollapsed(a)};\nmxGraphView.prototype.updateVertexState=function(a,b){var c=this.graph.getModel(),d=this.getState(c.getParent(a.cell));if(b.relative&&null!=d&&!c.isEdge(d.cell)&&(c=mxUtils.toRadians(d.style[mxConstants.STYLE_ROTATION]||\"0\"),0!=c)){b=Math.cos(c);c=Math.sin(c);var e=new mxPoint(a.getCenterX(),a.getCenterY());d=new mxPoint(d.getCenterX(),d.getCenterY());d=mxUtils.getRotatedPoint(e,b,c,d);a.x=d.x-a.width/2;a.y=d.y-a.height/2}this.updateVertexLabelOffset(a)};\nmxGraphView.prototype.updateEdgeState=function(a,b){var c=a.getVisibleTerminalState(!0),d=a.getVisibleTerminalState(!1);null!=this.graph.model.getTerminal(a.cell,!0)&&null==c||null==c&&null==b.getTerminalPoint(!0)||null!=this.graph.model.getTerminal(a.cell,!1)&&null==d||null==d&&null==b.getTerminalPoint(!1)?this.clear(a.cell,!0):(this.updateFixedTerminalPoints(a,c,d),this.updatePoints(a,b.points,c,d),this.updateFloatingTerminalPoints(a,c,d),b=a.absolutePoints,a.cell!=this.currentRoot&&(null==b||2>\nb.length||null==b[0]||null==b[b.length-1])?this.clear(a.cell,!0):(this.updateEdgeBounds(a),this.updateEdgeLabelOffset(a)))};\nmxGraphView.prototype.updateVertexLabelOffset=function(a){var b=mxUtils.getValue(a.style,mxConstants.STYLE_LABEL_POSITION,mxConstants.ALIGN_CENTER);if(b==mxConstants.ALIGN_LEFT)b=mxUtils.getValue(a.style,mxConstants.STYLE_LABEL_WIDTH,null),b=null!=b?b*this.scale:a.width,a.absoluteOffset.x-=b;else if(b==mxConstants.ALIGN_RIGHT)a.absoluteOffset.x+=a.width;else if(b==mxConstants.ALIGN_CENTER&&(b=mxUtils.getValue(a.style,mxConstants.STYLE_LABEL_WIDTH,null),null!=b)){var c=mxUtils.getValue(a.style,mxConstants.STYLE_ALIGN,\nmxConstants.ALIGN_CENTER),d=0;c==mxConstants.ALIGN_CENTER?d=.5:c==mxConstants.ALIGN_RIGHT&&(d=1);0!=d&&(a.absoluteOffset.x-=(b*this.scale-a.width)*d)}b=mxUtils.getValue(a.style,mxConstants.STYLE_VERTICAL_LABEL_POSITION,mxConstants.ALIGN_MIDDLE);b==mxConstants.ALIGN_TOP?a.absoluteOffset.y-=a.height:b==mxConstants.ALIGN_BOTTOM&&(a.absoluteOffset.y+=a.height)};mxGraphView.prototype.resetValidationState=function(){this.lastForegroundHtmlNode=this.lastForegroundNode=this.lastHtmlNode=this.lastNode=null};\nmxGraphView.prototype.stateValidated=function(a){var b=this.graph.getModel().isEdge(a.cell)&&this.graph.keepEdgesInForeground||this.graph.getModel().isVertex(a.cell)&&this.graph.keepEdgesInBackground;a=this.graph.cellRenderer.insertStateAfter(a,b?this.lastForegroundNode||this.lastNode:this.lastNode,b?this.lastForegroundHtmlNode||this.lastHtmlNode:this.lastHtmlNode);b?(this.lastForegroundHtmlNode=a[1],this.lastForegroundNode=a[0]):(this.lastHtmlNode=a[1],this.lastNode=a[0])};\nmxGraphView.prototype.updateFixedTerminalPoints=function(a,b,c){this.updateFixedTerminalPoint(a,b,!0,this.graph.getConnectionConstraint(a,b,!0));this.updateFixedTerminalPoint(a,c,!1,this.graph.getConnectionConstraint(a,c,!1))};mxGraphView.prototype.updateFixedTerminalPoint=function(a,b,c,d){a.setAbsoluteTerminalPoint(this.getFixedTerminalPoint(a,b,c,d),c)};\nmxGraphView.prototype.getFixedTerminalPoint=function(a,b,c,d){var e=null;null!=d&&(e=this.graph.getConnectionPoint(b,d,!1));if(null==e&&null==b){b=this.scale;d=this.translate;var f=a.origin;e=this.graph.getCellGeometry(a.cell).getTerminalPoint(c);null!=e&&(e=new mxPoint(b*(d.x+e.x+f.x),b*(d.y+e.y+f.y)))}return e};\nmxGraphView.prototype.updateBoundsFromStencil=function(a){var b=null;if(null!=a&&null!=a.shape&&null!=a.shape.stencil&&\"fixed\"==a.shape.stencil.aspect){b=mxRectangle.fromRectangle(a);var c=a.shape.stencil.computeAspect(a.style,a.x,a.y,a.width,a.height);a.setRect(c.x,c.y,a.shape.stencil.w0*c.width,a.shape.stencil.h0*c.height)}return b};\nmxGraphView.prototype.updatePoints=function(a,b,c,d){if(null!=a){var e=[];e.push(a.absolutePoints[0]);var f=this.getEdgeStyle(a,b,c,d);if(null!=f){c=this.getTerminalPort(a,c,!0);d=this.getTerminalPort(a,d,!1);var g=this.updateBoundsFromStencil(c),k=this.updateBoundsFromStencil(d);f(a,c,d,b,e);null!=g&&c.setRect(g.x,g.y,g.width,g.height);null!=k&&d.setRect(k.x,k.y,k.width,k.height)}else if(null!=b)for(f=0;f<b.length;f++)null!=b[f]&&(c=mxUtils.clone(b[f]),e.push(this.transformControlPoint(a,c)));b=\na.absolutePoints;e.push(b[b.length-1]);a.absolutePoints=e}};mxGraphView.prototype.transformControlPoint=function(a,b,c){return null!=a&&null!=b?(a=a.origin,c=c?1:this.scale,new mxPoint(c*(b.x+this.translate.x+a.x),c*(b.y+this.translate.y+a.y))):null};\nmxGraphView.prototype.isLoopStyleEnabled=function(a,b,c,d){var e=this.graph.getConnectionConstraint(a,c,!0),f=this.graph.getConnectionConstraint(a,d,!1);return!(null==b||2>b.length)||mxUtils.getValue(a.style,mxConstants.STYLE_ORTHOGONAL_LOOP,!1)&&(null!=e&&null!=e.point||null!=f&&null!=f.point)?!1:null!=c&&c==d};\nmxGraphView.prototype.getEdgeStyle=function(a,b,c,d){a=this.isLoopStyleEnabled(a,b,c,d)?mxUtils.getValue(a.style,mxConstants.STYLE_LOOP,this.graph.defaultLoopStyle):mxUtils.getValue(a.style,mxConstants.STYLE_NOEDGESTYLE,!1)?null:a.style[mxConstants.STYLE_EDGE];\"string\"==typeof a&&(b=mxStyleRegistry.getValue(a),null==b&&this.isAllowEval()&&(b=mxUtils.eval(a)),a=b);return\"function\"==typeof a?a:null};\nmxGraphView.prototype.updateFloatingTerminalPoints=function(a,b,c){var d=a.absolutePoints,e=d[0];null==d[d.length-1]&&null!=c&&this.updateFloatingTerminalPoint(a,c,b,!1);null==e&&null!=b&&this.updateFloatingTerminalPoint(a,b,c,!0)};mxGraphView.prototype.updateFloatingTerminalPoint=function(a,b,c,d){a.setAbsoluteTerminalPoint(this.getFloatingTerminalPoint(a,b,c,d),d)};\nmxGraphView.prototype.getFloatingTerminalPoint=function(a,b,c,d){b=this.getTerminalPort(a,b,d);var e=this.getNextPoint(a,c,d),f=this.graph.isOrthogonal(a);c=mxUtils.toRadians(Number(b.style[mxConstants.STYLE_ROTATION]||\"0\"));var g=new mxPoint(b.getCenterX(),b.getCenterY());if(0!=c){var k=Math.cos(-c),l=Math.sin(-c);e=mxUtils.getRotatedPoint(e,k,l,g)}k=parseFloat(a.style[mxConstants.STYLE_PERIMETER_SPACING]||0);k+=parseFloat(a.style[d?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||\n0);a=this.getPerimeterPoint(b,e,0==c&&f,k);0!=c&&(k=Math.cos(c),l=Math.sin(c),a=mxUtils.getRotatedPoint(a,k,l,g));return a};mxGraphView.prototype.getTerminalPort=function(a,b,c){a=mxUtils.getValue(a.style,c?mxConstants.STYLE_SOURCE_PORT:mxConstants.STYLE_TARGET_PORT);null!=a&&(a=this.getState(this.graph.getModel().getCell(a)),null!=a&&(b=a));return b};\nmxGraphView.prototype.getPerimeterPoint=function(a,b,c,d){var e=null;if(null!=a){var f=this.getPerimeterFunction(a);if(null!=f&&null!=b&&(d=this.getPerimeterBounds(a,d),0<d.width||0<d.height)){e=new mxPoint(b.x,b.y);var g=b=!1;this.graph.model.isVertex(a.cell)&&(b=1==mxUtils.getValue(a.style,mxConstants.STYLE_FLIPH,0),g=1==mxUtils.getValue(a.style,mxConstants.STYLE_FLIPV,0),null!=a.shape&&null!=a.shape.stencil&&(b=1==mxUtils.getValue(a.style,\"stencilFlipH\",0)||b,g=1==mxUtils.getValue(a.style,\"stencilFlipV\",\n0)||g),b&&(e.x=2*d.getCenterX()-e.x),g&&(e.y=2*d.getCenterY()-e.y));e=f(d,a,e,c);null!=e&&(b&&(e.x=2*d.getCenterX()-e.x),g&&(e.y=2*d.getCenterY()-e.y))}null==e&&(e=this.getPoint(a))}return e};mxGraphView.prototype.getRoutingCenterX=function(a){var b=null!=a.style?parseFloat(a.style[mxConstants.STYLE_ROUTING_CENTER_X])||0:0;return a.getCenterX()+b*a.width};\nmxGraphView.prototype.getRoutingCenterY=function(a){var b=null!=a.style?parseFloat(a.style[mxConstants.STYLE_ROUTING_CENTER_Y])||0:0;return a.getCenterY()+b*a.height};mxGraphView.prototype.getPerimeterBounds=function(a,b){b=null!=b?b:0;null!=a&&(b+=parseFloat(a.style[mxConstants.STYLE_PERIMETER_SPACING]||0));return a.getPerimeterBounds(b*this.scale)};\nmxGraphView.prototype.getPerimeterFunction=function(a){a=a.style[mxConstants.STYLE_PERIMETER];if(\"string\"==typeof a){var b=mxStyleRegistry.getValue(a);null==b&&this.isAllowEval()&&(b=mxUtils.eval(a));a=b}return\"function\"==typeof a?a:null};mxGraphView.prototype.getNextPoint=function(a,b,c){a=a.absolutePoints;var d=null;null!=a&&2<=a.length&&(d=a.length,d=a[c?Math.min(1,d-1):Math.max(0,d-2)]);null==d&&null!=b&&(d=new mxPoint(b.getCenterX(),b.getCenterY()));return d};\nmxGraphView.prototype.getVisibleTerminal=function(a,b){var c=this.graph.getModel();for(b=a=c.getTerminal(a,b);null!=a&&a!=this.currentRoot;){if(!this.graph.isCellVisible(b)||this.isCellCollapsed(a))b=a;a=c.getParent(a)}null==b||c.contains(b)&&c.getParent(b)!=c.getRoot()&&b!=this.currentRoot||(b=null);return b};\nmxGraphView.prototype.updateEdgeBounds=function(a){var b=a.absolutePoints,c=b[0],d=b[b.length-1];if(c.x!=d.x||c.y!=d.y){var e=d.x-c.x,f=d.y-c.y;a.terminalDistance=Math.sqrt(e*e+f*f)}else a.terminalDistance=0;d=0;var g=[];f=c;if(null!=f){c=f.x;for(var k=f.y,l=c,m=k,n=1;n<b.length;n++){var p=b[n];null!=p&&(e=f.x-p.x,f=f.y-p.y,e=Math.sqrt(e*e+f*f),g.push(e),d+=e,f=p,c=Math.min(f.x,c),k=Math.min(f.y,k),l=Math.max(f.x,l),m=Math.max(f.y,m))}a.length=d;a.segments=g;a.x=c;a.y=k;a.width=Math.max(1,l-c);a.height=\nMath.max(1,m-k)}};\nmxGraphView.prototype.getPoint=function(a,b){var c=a.getCenterX(),d=a.getCenterY();if(null==a.segments||null!=b&&!b.relative)null!=b&&(b=b.offset,null!=b&&(c+=b.x,d+=b.y));else{for(var e=a.absolutePoints.length,f=Math.round(((null!=b?b.x/2:0)+.5)*a.length),g=a.segments[0],k=0,l=1;f>=Math.round(k+g)&&l<e-1;)k+=g,g=a.segments[l++];e=0==g?0:(f-k)/g;f=a.absolutePoints[l-1];a=a.absolutePoints[l];null!=f&&null!=a&&(l=c=d=0,null!=b&&(d=b.y,b=b.offset,null!=b&&(c=b.x,l=b.y)),b=a.x-f.x,a=a.y-f.y,c=f.x+b*e+\n((0==g?0:a/g)*d+c)*this.scale,d=f.y+a*e-((0==g?0:b/g)*d-l)*this.scale)}return new mxPoint(c,d)};\nmxGraphView.prototype.getRelativePoint=function(a,b,c){var d=this.graph.getModel().getGeometry(a.cell);if(null!=d){var e=a.absolutePoints.length;if(d.relative&&1<e){d=a.length;for(var f=a.segments,g=a.absolutePoints[0],k=a.absolutePoints[1],l=mxUtils.ptSegDistSq(g.x,g.y,k.x,k.y,b,c),m=0,n=0,p=0,q=2;q<e;q++)g=k,k=a.absolutePoints[q],g=mxUtils.ptSegDistSq(g.x,g.y,k.x,k.y,b,c),p+=f[q-2],g<=l&&(l=g,n=q-1,m=p);e=f[n];g=a.absolutePoints[n];k=a.absolutePoints[n+1];l=k.x;f=k.y;a=g.x-l;n=g.y-f;l=a-(b-l);f=\nn-(c-f);f=l*a+f*n;a=Math.sqrt(0>=f?0:f*f/(a*a+n*n));a>e&&(a=e);e=Math.sqrt(mxUtils.ptSegDistSq(g.x,g.y,k.x,k.y,b,c));-1==mxUtils.relativeCcw(g.x,g.y,k.x,k.y,b,c)&&(e=-e);return new mxPoint((d/2-m-a)/d*-2,e/this.scale)}}return new mxPoint};\nmxGraphView.prototype.updateEdgeLabelOffset=function(a){var b=a.absolutePoints;a.absoluteOffset.x=a.getCenterX();a.absoluteOffset.y=a.getCenterY();if(null!=b&&0<b.length&&null!=a.segments){var c=this.graph.getCellGeometry(a.cell);if(c.relative){var d=this.getPoint(a,c);null!=d&&(a.absoluteOffset=d)}else{d=b[0];var e=b[b.length-1];if(null!=d&&null!=e){b=e.x-d.x;var f=e.y-d.y,g=e=0;c=c.offset;null!=c&&(e=c.x,g=c.y);c=d.y+f/2+g*this.scale;a.absoluteOffset.x=d.x+b/2+e*this.scale;a.absoluteOffset.y=c}}}};\nmxGraphView.prototype.getState=function(a,b){b=b||!1;var c=null;null!=a&&(c=this.states.get(a),b&&(null==c||this.updateStyle)&&this.graph.isCellVisible(a)&&(null==c?(c=this.createState(a),this.states.put(a,c)):c.style=this.graph.getCellStyle(a)));return c};mxGraphView.prototype.isRendering=function(){return this.rendering};mxGraphView.prototype.setRendering=function(a){this.rendering=a};mxGraphView.prototype.isAllowEval=function(){return this.allowEval};\nmxGraphView.prototype.setAllowEval=function(a){this.allowEval=a};mxGraphView.prototype.getStates=function(){return this.states};mxGraphView.prototype.setStates=function(a){this.states=a};mxGraphView.prototype.getCellStates=function(a){if(null==a)return this.states;for(var b=[],c=0;c<a.length;c++){var d=this.getState(a[c]);null!=d&&b.push(d)}return b};\nmxGraphView.prototype.removeState=function(a){var b=null;null!=a&&(b=this.states.remove(a),null!=b&&(this.graph.cellRenderer.destroy(b),b.invalid=!0,b.destroy()));return b};mxGraphView.prototype.createState=function(a){return new mxCellState(this,a,this.graph.getCellStyle(a))};mxGraphView.prototype.getCanvas=function(){return this.canvas};mxGraphView.prototype.getBackgroundPane=function(){return this.backgroundPane};mxGraphView.prototype.getDrawPane=function(){return this.drawPane};\nmxGraphView.prototype.getOverlayPane=function(){return this.overlayPane};mxGraphView.prototype.getDecoratorPane=function(){return this.decoratorPane};mxGraphView.prototype.isContainerEvent=function(a){a=mxEvent.getSource(a);return a==this.graph.container||a.parentNode==this.backgroundPane||null!=a.parentNode&&a.parentNode.parentNode==this.backgroundPane||a==this.canvas.parentNode||a==this.canvas||a==this.backgroundPane||a==this.drawPane||a==this.overlayPane||a==this.decoratorPane};\nmxGraphView.prototype.isScrollEvent=function(a){var b=mxUtils.getOffset(this.graph.container);a=new mxPoint(a.clientX-b.x,a.clientY-b.y);b=this.graph.container.offsetWidth;var c=this.graph.container.clientWidth;if(b>c&&a.x>c+2&&a.x<=b)return!0;b=this.graph.container.offsetHeight;c=this.graph.container.clientHeight;return b>c&&a.y>c+2&&a.y<=b?!0:!1};mxGraphView.prototype.init=function(){this.installListeners();this.graph.dialect==mxConstants.DIALECT_SVG?this.createSvg():this.createHtml()};\nmxGraphView.prototype.installListeners=function(){var a=this.graph,b=a.container;null!=b&&(mxClient.IS_TOUCH&&(mxEvent.addListener(b,\"gesturestart\",mxUtils.bind(this,function(c){a.fireGestureEvent(c);mxEvent.consume(c)})),mxEvent.addListener(b,\"gesturechange\",mxUtils.bind(this,function(c){a.fireGestureEvent(c);mxEvent.consume(c)})),mxEvent.addListener(b,\"gestureend\",mxUtils.bind(this,function(c){a.fireGestureEvent(c);mxEvent.consume(c)}))),mxEvent.addGestureListeners(b,mxUtils.bind(this,function(c){!this.isContainerEvent(c)||\n(mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_GC||mxClient.IS_OP||mxClient.IS_SF)&&this.isScrollEvent(c)||a.fireMouseEvent(mxEvent.MOUSE_DOWN,new mxMouseEvent(c))}),mxUtils.bind(this,function(c){this.isContainerEvent(c)&&a.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(c))}),mxUtils.bind(this,function(c){this.isContainerEvent(c)&&a.fireMouseEvent(mxEvent.MOUSE_UP,new mxMouseEvent(c))})),mxEvent.addListener(b,\"dblclick\",mxUtils.bind(this,function(c){this.isContainerEvent(c)&&a.dblClick(c)})),\na.addMouseListener({mouseDown:function(c,d){a.popupMenuHandler.hideMenu()},mouseMove:function(){},mouseUp:function(){}}),this.moveHandler=mxUtils.bind(this,function(c){null!=a.tooltipHandler&&a.tooltipHandler.isHideOnHover()&&a.tooltipHandler.hide();if(this.captureDocumentGesture&&a.isMouseDown&&null!=a.container&&!this.isContainerEvent(c)&&\"none\"!=a.container.style.display&&\"hidden\"!=a.container.style.visibility&&!mxEvent.isConsumed(c)){var d=a.fireMouseEvent,e=mxEvent.MOUSE_MOVE,f=null;if(mxClient.IS_TOUCH){f=\nmxEvent.getClientX(c);var g=mxEvent.getClientY(c);f=mxUtils.convertPoint(b,f,g);f=a.view.getState(a.getCellAt(f.x,f.y))}d.call(a,e,new mxMouseEvent(c,f))}}),this.endHandler=mxUtils.bind(this,function(c){this.captureDocumentGesture&&a.isMouseDown&&null!=a.container&&!this.isContainerEvent(c)&&\"none\"!=a.container.style.display&&\"hidden\"!=a.container.style.visibility&&a.fireMouseEvent(mxEvent.MOUSE_UP,new mxMouseEvent(c))}),mxEvent.addGestureListeners(document,null,this.moveHandler,this.endHandler))};\nmxGraphView.prototype.createHtml=function(){var a=this.graph.container;null!=a&&(this.canvas=this.createHtmlPane(\"100%\",\"100%\"),this.canvas.style.overflow=\"hidden\",this.backgroundPane=this.createHtmlPane(\"1px\",\"1px\"),this.drawPane=this.createHtmlPane(\"1px\",\"1px\"),this.overlayPane=this.createHtmlPane(\"1px\",\"1px\"),this.decoratorPane=this.createHtmlPane(\"1px\",\"1px\"),this.canvas.appendChild(this.backgroundPane),this.canvas.appendChild(this.drawPane),this.canvas.appendChild(this.overlayPane),this.canvas.appendChild(this.decoratorPane),\na.appendChild(this.canvas),this.updateContainerStyle(a))};mxGraphView.prototype.updateHtmlCanvasSize=function(a,b){if(null!=this.graph.container){var c=this.graph.container.offsetHeight;this.canvas.style.width=this.graph.container.offsetWidth<a?a+\"px\":\"100%\";this.canvas.style.height=c<b?b+\"px\":\"100%\"}};\nmxGraphView.prototype.createHtmlPane=function(a,b){var c=document.createElement(\"DIV\");null!=a&&null!=b?(c.style.position=\"absolute\",c.style.left=\"0px\",c.style.top=\"0px\",c.style.width=a,c.style.height=b):c.style.position=\"relative\";return c};\nmxGraphView.prototype.createSvg=function(){var a=this.graph.container;this.canvas=document.createElementNS(mxConstants.NS_SVG,\"g\");this.backgroundPane=document.createElementNS(mxConstants.NS_SVG,\"g\");this.canvas.appendChild(this.backgroundPane);this.drawPane=document.createElementNS(mxConstants.NS_SVG,\"g\");this.canvas.appendChild(this.drawPane);this.overlayPane=document.createElementNS(mxConstants.NS_SVG,\"g\");this.canvas.appendChild(this.overlayPane);this.decoratorPane=document.createElementNS(mxConstants.NS_SVG,\n\"g\");this.canvas.appendChild(this.decoratorPane);var b=document.createElementNS(mxConstants.NS_SVG,\"svg\");b.style.left=\"0px\";b.style.top=\"0px\";b.style.width=\"100%\";b.style.height=\"100%\";b.style.display=\"block\";b.appendChild(this.canvas);if(mxClient.IS_IE||mxClient.IS_IE11)b.style.overflow=\"hidden\";null!=a&&(a.appendChild(b),this.updateContainerStyle(a))};\nmxGraphView.prototype.updateContainerStyle=function(a){var b=mxUtils.getCurrentStyle(a);null!=b&&\"static\"==b.position&&(a.style.position=\"relative\");mxClient.IS_POINTER&&(a.style.touchAction=\"none\")};\nmxGraphView.prototype.destroy=function(){var a=null!=this.canvas?this.canvas.ownerSVGElement:null;null==a&&(a=this.canvas);null!=a&&null!=a.parentNode&&(this.clear(this.currentRoot,!0),mxEvent.removeGestureListeners(document,null,this.moveHandler,this.endHandler),mxEvent.release(this.graph.container),a.parentNode.removeChild(a),this.decoratorPane=this.overlayPane=this.drawPane=this.backgroundPane=this.canvas=this.endHandler=this.moveHandler=null)};\nfunction mxCurrentRootChange(a,b){this.view=a;this.previous=this.root=b;this.isUp=null==b;if(!this.isUp){a=this.view.currentRoot;for(var c=this.view.graph.getModel();null!=a;){if(a==b){this.isUp=!0;break}a=c.getParent(a)}}}\nmxCurrentRootChange.prototype.execute=function(){var a=this.view.currentRoot;this.view.currentRoot=this.previous;this.previous=a;a=this.view.graph.getTranslateForRoot(this.view.currentRoot);null!=a&&(this.view.translate=new mxPoint(-a.x,-a.y));this.isUp?(this.view.clear(this.view.currentRoot,!0),this.view.validate()):this.view.refresh();this.view.fireEvent(new mxEventObject(this.isUp?mxEvent.UP:mxEvent.DOWN,\"root\",this.view.currentRoot,\"previous\",this.previous));this.isUp=!this.isUp};\nfunction mxGraph(a,b,c,d,e){this.mouseListeners=null;this.renderHint=c;this.dialect=mxClient.IS_SVG?mxConstants.DIALECT_SVG:c==mxConstants.RENDERING_HINT_FASTEST?mxConstants.DIALECT_STRICTHTML:c==mxConstants.RENDERING_HINT_FASTER?mxConstants.DIALECT_PREFERHTML:mxConstants.DIALECT_MIXEDHTML;this.model=null!=b?b:new mxGraphModel;this.multiplicities=[];this.imageBundles=[];this.cellRenderer=this.createCellRenderer();this.setSelectionModel(this.createSelectionModel());this.setStylesheet(null!=d?d:this.createStylesheet());\nthis.view=this.createGraphView();this.view.rendering=null!=e?e:this.view.rendering;this.graphModelChangeListener=mxUtils.bind(this,function(f,g){this.graphModelChanged(g.getProperty(\"edit\").changes)});this.model.addListener(mxEvent.CHANGE,this.graphModelChangeListener);this.createHandlers();null!=a&&this.init(a);this.view.rendering&&this.view.revalidate()}mxLoadResources?mxResources.add(mxClient.basePath+\"/resources/graph\"):mxClient.defaultBundles.push(mxClient.basePath+\"/resources/graph\");\nmxGraph.prototype=new mxEventSource;mxGraph.prototype.constructor=mxGraph;mxGraph.prototype.mouseListeners=null;mxGraph.prototype.isMouseDown=!1;mxGraph.prototype.model=null;mxGraph.prototype.view=null;mxGraph.prototype.stylesheet=null;mxGraph.prototype.selectionModel=null;mxGraph.prototype.cellEditor=null;mxGraph.prototype.cellRenderer=null;mxGraph.prototype.multiplicities=null;mxGraph.prototype.renderHint=null;mxGraph.prototype.dialect=null;mxGraph.prototype.gridSize=10;\nmxGraph.prototype.gridEnabled=!0;mxGraph.prototype.portsEnabled=!0;mxGraph.prototype.nativeDblClickEnabled=!0;mxGraph.prototype.doubleTapEnabled=!0;mxGraph.prototype.doubleTapTimeout=500;mxGraph.prototype.doubleTapTolerance=25;mxGraph.prototype.lastTouchY=0;mxGraph.prototype.lastTouchY=0;mxGraph.prototype.lastTouchTime=0;mxGraph.prototype.tapAndHoldEnabled=!0;mxGraph.prototype.tapAndHoldDelay=350;mxGraph.prototype.tapAndHoldInProgress=!1;mxGraph.prototype.tapAndHoldValid=!1;\nmxGraph.prototype.initialTouchX=0;mxGraph.prototype.initialTouchY=0;mxGraph.prototype.tolerance=4;mxGraph.prototype.defaultOverlap=.5;mxGraph.prototype.defaultParent=null;mxGraph.prototype.alternateEdgeStyle=null;mxGraph.prototype.backgroundImage=null;mxGraph.prototype.pageVisible=!1;mxGraph.prototype.pageBreaksVisible=!1;mxGraph.prototype.pageBreakColor=\"gray\";mxGraph.prototype.pageBreakDashed=!0;mxGraph.prototype.minPageBreakDist=20;mxGraph.prototype.preferPageSize=!1;\nmxGraph.prototype.pageFormat=mxConstants.PAGE_FORMAT_A4_PORTRAIT;mxGraph.prototype.pageScale=1.5;mxGraph.prototype.enabled=!0;mxGraph.prototype.escapeEnabled=!0;mxGraph.prototype.invokesStopCellEditing=!0;mxGraph.prototype.enterStopsCellEditing=!1;mxGraph.prototype.useScrollbarsForPanning=!0;mxGraph.prototype.exportEnabled=!0;mxGraph.prototype.importEnabled=!0;mxGraph.prototype.cellsLocked=!1;mxGraph.prototype.cellsCloneable=!0;mxGraph.prototype.foldingEnabled=!0;mxGraph.prototype.cellsEditable=!0;\nmxGraph.prototype.cellsDeletable=!0;mxGraph.prototype.cellsMovable=!0;mxGraph.prototype.edgeLabelsMovable=!0;mxGraph.prototype.vertexLabelsMovable=!1;mxGraph.prototype.dropEnabled=!1;mxGraph.prototype.splitEnabled=!0;mxGraph.prototype.cellsResizable=!0;mxGraph.prototype.cellsBendable=!0;mxGraph.prototype.cellsSelectable=!0;mxGraph.prototype.cellsDisconnectable=!0;mxGraph.prototype.autoSizeCells=!1;mxGraph.prototype.autoSizeCellsOnAdd=!1;mxGraph.prototype.autoScroll=!0;\nmxGraph.prototype.ignoreScrollbars=!1;mxGraph.prototype.translateToScrollPosition=!1;mxGraph.prototype.timerAutoScroll=!1;mxGraph.prototype.allowAutoPanning=!1;mxGraph.prototype.autoExtend=!0;mxGraph.prototype.maximumGraphBounds=null;mxGraph.prototype.minimumGraphSize=null;mxGraph.prototype.minimumContainerSize=null;mxGraph.prototype.maximumContainerSize=null;mxGraph.prototype.resizeContainer=!1;mxGraph.prototype.border=0;mxGraph.prototype.keepEdgesInForeground=!1;\nmxGraph.prototype.keepEdgesInBackground=!1;mxGraph.prototype.allowNegativeCoordinates=!0;mxGraph.prototype.constrainChildren=!0;mxGraph.prototype.constrainRelativeChildren=!1;mxGraph.prototype.extendParents=!0;mxGraph.prototype.extendParentsOnAdd=!0;mxGraph.prototype.extendParentsOnMove=!1;mxGraph.prototype.recursiveResize=!1;mxGraph.prototype.collapseToPreferredSize=!0;mxGraph.prototype.zoomFactor=1.2;mxGraph.prototype.keepSelectionVisibleOnZoom=!1;mxGraph.prototype.centerZoom=!0;\nmxGraph.prototype.resetViewOnRootChange=!0;mxGraph.prototype.resetEdgesOnResize=!1;mxGraph.prototype.resetEdgesOnMove=!1;mxGraph.prototype.resetEdgesOnConnect=!0;mxGraph.prototype.allowLoops=!1;mxGraph.prototype.defaultLoopStyle=mxEdgeStyle.Loop;mxGraph.prototype.multigraph=!0;mxGraph.prototype.connectableEdges=!1;mxGraph.prototype.allowDanglingEdges=!0;mxGraph.prototype.cloneInvalidEdges=!1;mxGraph.prototype.disconnectOnMove=!0;mxGraph.prototype.labelsVisible=!0;mxGraph.prototype.htmlLabels=!1;\nmxGraph.prototype.swimlaneSelectionEnabled=!0;mxGraph.prototype.swimlaneNesting=!0;mxGraph.prototype.swimlaneIndicatorColorAttribute=mxConstants.STYLE_FILLCOLOR;mxGraph.prototype.imageBundles=null;mxGraph.prototype.minFitScale=.1;mxGraph.prototype.maxFitScale=8;mxGraph.prototype.panDx=0;mxGraph.prototype.panDy=0;mxGraph.prototype.collapsedImage=new mxImage(mxClient.imageBasePath+\"/collapsed.gif\",9,9);mxGraph.prototype.expandedImage=new mxImage(mxClient.imageBasePath+\"/expanded.gif\",9,9);\nmxGraph.prototype.warningImage=new mxImage(mxClient.imageBasePath+\"/warning\"+(mxClient.IS_MAC?\".png\":\".gif\"),16,16);mxGraph.prototype.alreadyConnectedResource=\"none\"!=mxClient.language?\"alreadyConnected\":\"\";mxGraph.prototype.containsValidationErrorsResource=\"none\"!=mxClient.language?\"containsValidationErrors\":\"\";mxGraph.prototype.collapseExpandResource=\"none\"!=mxClient.language?\"collapse-expand\":\"\";\nmxGraph.prototype.init=function(a){this.container=a;this.cellEditor=this.createCellEditor();this.view.init();this.sizeDidChange();mxEvent.addListener(a,\"mouseleave\",mxUtils.bind(this,function(b){null!=this.tooltipHandler&&null!=this.tooltipHandler.div&&this.tooltipHandler.div!=b.relatedTarget&&this.tooltipHandler.hide()}));mxClient.IS_IE&&(mxEvent.addListener(window,\"unload\",mxUtils.bind(this,function(){this.destroy()})),mxEvent.addListener(a,\"selectstart\",mxUtils.bind(this,function(b){return this.isEditing()||\n!this.isMouseDown&&!mxEvent.isShiftDown(b)})))};mxGraph.prototype.createHandlers=function(){this.tooltipHandler=this.createTooltipHandler();this.tooltipHandler.setEnabled(!1);this.selectionCellsHandler=this.createSelectionCellsHandler();this.connectionHandler=this.createConnectionHandler();this.connectionHandler.setEnabled(!1);this.graphHandler=this.createGraphHandler();this.panningHandler=this.createPanningHandler();this.panningHandler.panningEnabled=!1;this.popupMenuHandler=this.createPopupMenuHandler()};\nmxGraph.prototype.createTooltipHandler=function(){return new mxTooltipHandler(this)};mxGraph.prototype.createSelectionCellsHandler=function(){return new mxSelectionCellsHandler(this)};mxGraph.prototype.createConnectionHandler=function(){return new mxConnectionHandler(this)};mxGraph.prototype.createGraphHandler=function(){return new mxGraphHandler(this)};mxGraph.prototype.createPanningHandler=function(){return new mxPanningHandler(this)};mxGraph.prototype.createPopupMenuHandler=function(){return new mxPopupMenuHandler(this)};\nmxGraph.prototype.createSelectionModel=function(){return new mxGraphSelectionModel(this)};mxGraph.prototype.createStylesheet=function(){return new mxStylesheet};mxGraph.prototype.createGraphView=function(){return new mxGraphView(this)};mxGraph.prototype.createCellRenderer=function(){return new mxCellRenderer};mxGraph.prototype.createCellEditor=function(){return new mxCellEditor(this)};mxGraph.prototype.getModel=function(){return this.model};mxGraph.prototype.getView=function(){return this.view};\nmxGraph.prototype.getStylesheet=function(){return this.stylesheet};mxGraph.prototype.setStylesheet=function(a){this.stylesheet=a};mxGraph.prototype.getSelectionModel=function(){return this.selectionModel};mxGraph.prototype.setSelectionModel=function(a){this.selectionModel=a};\nmxGraph.prototype.getSelectionCellsForChanges=function(a,b){for(var c=new mxDictionary,d=[],e=mxUtils.bind(this,function(l){if(!c.get(l)&&this.model.contains(l))if(this.model.isEdge(l)||this.model.isVertex(l))c.put(l,!0),d.push(l);else for(var m=this.model.getChildCount(l),n=0;n<m;n++)e(this.model.getChildAt(l,n))}),f=0;f<a.length;f++){var g=a[f];if(g.constructor!=mxRootChange&&(null==b||!b(g))){var k=null;g instanceof mxChildChange?k=g.child:null!=g.cell&&g.cell instanceof mxCell&&(k=g.cell);null!=\nk&&e(k)}}return d};mxGraph.prototype.graphModelChanged=function(a){for(var b=0;b<a.length;b++)this.processChange(a[b]);this.updateSelection();this.view.validate();this.sizeDidChange()};\nmxGraph.prototype.updateSelection=function(){for(var a=this.getSelectionCells(),b=[],c=0;c<a.length;c++)if(this.model.contains(a[c])&&this.isCellVisible(a[c]))for(var d=this.model.getParent(a[c]);null!=d&&d!=this.view.currentRoot;){if(this.isCellCollapsed(d)||!this.isCellVisible(d)){b.push(a[c]);break}d=this.model.getParent(d)}else b.push(a[c]);this.removeSelectionCells(b)};\nmxGraph.prototype.processChange=function(a){if(a instanceof mxRootChange)this.clearSelection(),this.setDefaultParent(null),this.removeStateForCell(a.previous),this.resetViewOnRootChange&&(this.view.scale=1,this.view.translate.x=0,this.view.translate.y=0),this.fireEvent(new mxEventObject(mxEvent.ROOT));else if(a instanceof mxChildChange){var b=this.model.getParent(a.child);this.view.invalidate(a.child,!0,!0);if(!this.model.contains(b)||this.isCellCollapsed(b))this.view.invalidate(a.child,!0,!0),this.removeStateForCell(a.child),\nthis.view.currentRoot==a.child&&this.home();b!=a.previous&&(null!=b&&this.view.invalidate(b,!1,!1),null!=a.previous&&this.view.invalidate(a.previous,!1,!1))}else a instanceof mxTerminalChange||a instanceof mxGeometryChange?(a instanceof mxTerminalChange||null==a.previous&&null!=a.geometry||null!=a.previous&&!a.previous.equals(a.geometry))&&this.view.invalidate(a.cell):a instanceof mxValueChange?this.view.invalidate(a.cell,!1,!1):a instanceof mxStyleChange?(this.view.invalidate(a.cell,!0,!0),a=this.view.getState(a.cell),\nnull!=a&&(a.invalidStyle=!0)):null!=a.cell&&a.cell instanceof mxCell&&this.removeStateForCell(a.cell)};mxGraph.prototype.removeStateForCell=function(a){for(var b=this.model.getChildCount(a),c=0;c<b;c++)this.removeStateForCell(this.model.getChildAt(a,c));this.view.invalidate(a,!1,!0);this.view.removeState(a)};\nmxGraph.prototype.addCellOverlay=function(a,b){null==a.overlays&&(a.overlays=[]);a.overlays.push(b);var c=this.view.getState(a);null!=c&&this.cellRenderer.redraw(c);this.fireEvent(new mxEventObject(mxEvent.ADD_OVERLAY,\"cell\",a,\"overlay\",b));return b};mxGraph.prototype.getCellOverlays=function(a){return a.overlays};\nmxGraph.prototype.removeCellOverlay=function(a,b){if(null==b)this.removeCellOverlays(a);else{var c=mxUtils.indexOf(a.overlays,b);0<=c?(a.overlays.splice(c,1),0==a.overlays.length&&(a.overlays=null),c=this.view.getState(a),null!=c&&this.cellRenderer.redraw(c),this.fireEvent(new mxEventObject(mxEvent.REMOVE_OVERLAY,\"cell\",a,\"overlay\",b))):b=null}return b};\nmxGraph.prototype.removeCellOverlays=function(a){var b=a.overlays;if(null!=b){a.overlays=null;var c=this.view.getState(a);null!=c&&this.cellRenderer.redraw(c);for(c=0;c<b.length;c++)this.fireEvent(new mxEventObject(mxEvent.REMOVE_OVERLAY,\"cell\",a,\"overlay\",b[c]))}return b};mxGraph.prototype.clearCellOverlays=function(a){a=null!=a?a:this.model.getRoot();this.removeCellOverlays(a);for(var b=this.model.getChildCount(a),c=0;c<b;c++){var d=this.model.getChildAt(a,c);this.clearCellOverlays(d)}};\nmxGraph.prototype.setCellWarning=function(a,b,c,d){if(null!=b&&0<b.length)return c=null!=c?c:this.warningImage,b=new mxCellOverlay(c,\"<font color=red>\"+b+\"</font>\"),d&&b.addListener(mxEvent.CLICK,mxUtils.bind(this,function(e,f){this.isEnabled()&&this.setSelectionCell(a)})),this.addCellOverlay(a,b);this.removeCellOverlays(a);return null};mxGraph.prototype.startEditing=function(a){this.startEditingAtCell(null,a)};\nmxGraph.prototype.startEditingAtCell=function(a,b){null!=b&&mxEvent.isMultiTouchEvent(b)||(null==a&&(a=this.getSelectionCell(),null==a||this.isCellEditable(a)||(a=null)),null!=a&&(this.fireEvent(new mxEventObject(mxEvent.START_EDITING,\"cell\",a,\"event\",b)),this.cellEditor.startEditing(a,b),this.fireEvent(new mxEventObject(mxEvent.EDITING_STARTED,\"cell\",a,\"event\",b))))};mxGraph.prototype.getEditingValue=function(a,b){return this.convertValueToString(a)};\nmxGraph.prototype.stopEditing=function(a){this.cellEditor.stopEditing(a);this.fireEvent(new mxEventObject(mxEvent.EDITING_STOPPED,\"cancel\",a))};mxGraph.prototype.labelChanged=function(a,b,c){this.model.beginUpdate();try{var d=a.value;this.cellLabelChanged(a,b,this.isAutoSizeCell(a));this.fireEvent(new mxEventObject(mxEvent.LABEL_CHANGED,\"cell\",a,\"value\",b,\"old\",d,\"event\",c))}finally{this.model.endUpdate()}return a};\nmxGraph.prototype.cellLabelChanged=function(a,b,c){this.model.beginUpdate();try{this.model.setValue(a,b),c&&this.cellSizeUpdated(a,!1)}finally{this.model.endUpdate()}};mxGraph.prototype.escape=function(a){this.fireEvent(new mxEventObject(mxEvent.ESCAPE,\"event\",a))};\nmxGraph.prototype.click=function(a){var b=a.getEvent(),c=a.getCell(),d=new mxEventObject(mxEvent.CLICK,\"event\",b,\"cell\",c);a.isConsumed()&&d.consume();this.fireEvent(d);if(this.isEnabled()&&!mxEvent.isConsumed(b)&&!d.isConsumed()){if(null!=c){if(this.isTransparentClickEvent(b)){var e=!1;a=this.getCellAt(a.graphX,a.graphY,null,null,null,mxUtils.bind(this,function(g){var k=this.isCellSelected(g.cell);e=e||k;return!e||k||g.cell!=c&&this.model.isAncestor(g.cell,c)}));null!=a&&(c=a)}}else if(this.isSwimlaneSelectionEnabled()&&\n(c=this.getSwimlaneAt(a.getGraphX(),a.getGraphY()),!(null==c||this.isToggleEvent(b)&&mxEvent.isAltDown(b)))){d=c;for(a=[];null!=d;){d=this.model.getParent(d);var f=this.view.getState(d);this.isSwimlane(d)&&null!=f&&a.push(d)}if(0<a.length)for(a=a.reverse(),a.splice(0,0,c),a.push(c),d=0;d<a.length-1;d++)this.isCellSelected(a[d])&&(c=a[this.isToggleEvent(b)?d:d+1])}null!=c?this.selectCellForEvent(c,b):this.isToggleEvent(b)||this.clearSelection()}};\nmxGraph.prototype.isSiblingSelected=function(a){for(var b=this.model,c=b.getParent(a),d=b.getChildCount(c),e=0;e<d;e++){var f=b.getChildAt(c,e);if(a!=f&&this.isCellSelected(f))return!0}return!1};mxGraph.prototype.dblClick=function(a,b){var c=new mxEventObject(mxEvent.DOUBLE_CLICK,\"event\",a,\"cell\",b);this.fireEvent(c);!this.isEnabled()||mxEvent.isConsumed(a)||c.isConsumed()||null==b||!this.isCellEditable(b)||this.isEditing(b)||(this.startEditingAtCell(b,a),mxEvent.consume(a))};\nmxGraph.prototype.tapAndHold=function(a){var b=a.getEvent(),c=new mxEventObject(mxEvent.TAP_AND_HOLD,\"event\",b,\"cell\",a.getCell());this.fireEvent(c);c.isConsumed()&&(this.panningHandler.panningTrigger=!1);this.isEnabled()&&!mxEvent.isConsumed(b)&&!c.isConsumed()&&this.connectionHandler.isEnabled()&&(b=this.view.getState(this.connectionHandler.marker.getCell(a)),null!=b&&(this.connectionHandler.marker.currentColor=this.connectionHandler.marker.validColor,this.connectionHandler.marker.markedState=b,\nthis.connectionHandler.marker.mark(),this.connectionHandler.first=new mxPoint(a.getGraphX(),a.getGraphY()),this.connectionHandler.edgeState=this.connectionHandler.createEdgeState(a),this.connectionHandler.previous=b,this.connectionHandler.fireEvent(new mxEventObject(mxEvent.START,\"state\",this.connectionHandler.previous))))};\nmxGraph.prototype.scrollPointToVisible=function(a,b,c,d){if(this.timerAutoScroll||!this.ignoreScrollbars&&!mxUtils.hasScrollbars(this.container))this.allowAutoPanning&&!this.panningHandler.isActive()&&(null==this.panningManager&&(this.panningManager=this.createPanningManager()),this.panningManager.panTo(a+this.panDx,b+this.panDy));else{var e=this.container;d=null!=d?d:20;if(a>=e.scrollLeft&&b>=e.scrollTop&&a<=e.scrollLeft+e.clientWidth&&b<=e.scrollTop+e.clientHeight){var f=e.scrollLeft+e.clientWidth-\na;if(f<d){if(a=e.scrollLeft,e.scrollLeft+=d-f,c&&a==e.scrollLeft){if(this.dialect==mxConstants.DIALECT_SVG){a=this.view.getDrawPane().ownerSVGElement;var g=this.container.scrollWidth+d-f;a.style.width=g+\"px\"}else g=Math.max(e.clientWidth,e.scrollWidth)+d-f,a=this.view.getCanvas(),a.style.width=g+\"px\";e.scrollLeft+=d-f}}else f=a-e.scrollLeft,f<d&&(e.scrollLeft-=d-f);f=e.scrollTop+e.clientHeight-b;f<d?(a=e.scrollTop,e.scrollTop+=d-f,a==e.scrollTop&&c&&(this.dialect==mxConstants.DIALECT_SVG?(a=this.view.getDrawPane().ownerSVGElement,\nb=this.container.scrollHeight+d-f,a.style.height=b+\"px\"):(b=Math.max(e.clientHeight,e.scrollHeight)+d-f,a=this.view.getCanvas(),a.style.height=b+\"px\"),e.scrollTop+=d-f)):(f=b-e.scrollTop,f<d&&(e.scrollTop-=d-f))}}};mxGraph.prototype.createPanningManager=function(){return new mxPanningManager(this)};\nmxGraph.prototype.getBorderSizes=function(){var a=mxUtils.getCurrentStyle(this.container);return new mxRectangle(mxUtils.parseCssNumber(a.paddingLeft)+(\"none\"!=a.borderLeftStyle?mxUtils.parseCssNumber(a.borderLeftWidth):0),mxUtils.parseCssNumber(a.paddingTop)+(\"none\"!=a.borderTopStyle?mxUtils.parseCssNumber(a.borderTopWidth):0),mxUtils.parseCssNumber(a.paddingRight)+(\"none\"!=a.borderRightStyle?mxUtils.parseCssNumber(a.borderRightWidth):0),mxUtils.parseCssNumber(a.paddingBottom)+(\"none\"!=a.borderBottomStyle?\nmxUtils.parseCssNumber(a.borderBottomWidth):0))};mxGraph.prototype.getPreferredPageSize=function(a,b,c){a=this.view.translate;var d=this.pageFormat,e=this.pageScale;d=new mxRectangle(0,0,Math.ceil(d.width*e),Math.ceil(d.height*e));return new mxRectangle(0,0,(this.pageBreaksVisible?Math.ceil(b/d.width):1)*d.width+2+a.x,(this.pageBreaksVisible?Math.ceil(c/d.height):1)*d.height+2+a.y)};\nmxGraph.prototype.fit=function(a,b,c,d,e,f,g){if(null!=this.container){a=null!=a?a:this.getBorder();b=null!=b?b:!1;c=null!=c?c:0;d=null!=d?d:!0;e=null!=e?e:!1;f=null!=f?f:!1;var k=this.getBorderSizes(),l=this.container.offsetWidth-k.x-k.width-1,m=null!=g?g:this.container.offsetHeight-k.y-k.height-1;g=this.view.getGraphBounds();if(0<g.width&&0<g.height){b&&null!=g.x&&null!=g.y&&(g=g.clone(),g.width+=g.x,g.height+=g.y,g.x=0,g.y=0);k=this.view.scale;var n=g.width/k,p=g.height/k;null!=this.backgroundImage&&\nnull!=this.backgroundImage.width&&null!=this.backgroundImage.height&&(n=Math.max(n,this.backgroundImage.width-g.x/k),p=Math.max(p,this.backgroundImage.height-g.y/k));var q=(b?a:2*a)+c+1;l-=q;m-=q;e=e?m/p:f?l/n:Math.min(l/n,m/p);null!=this.minFitScale&&(e=Math.max(e,this.minFitScale));null!=this.maxFitScale&&(e=Math.min(e,this.maxFitScale));if(d)b?this.view.scale!=e&&this.view.setScale(e):mxUtils.hasScrollbars(this.container)?(this.view.setScale(e),a=this.getGraphBounds(),null!=a.x&&(this.container.scrollLeft=\na.x),null!=a.y&&(this.container.scrollTop=a.y)):this.view.scaleAndTranslate(e,null!=g.x?Math.floor(this.view.translate.x-g.x/k+a/e+c/2):a,null!=g.y?Math.floor(this.view.translate.y-g.y/k+a/e+c/2):a);else return e}}return this.view.scale};\nmxGraph.prototype.sizeDidChange=function(){var a=this.getGraphBounds();if(null!=this.container){var b=this.getBorder(),c=Math.max(0,a.x)+a.width+2*b;b=Math.max(0,a.y)+a.height+2*b;null!=this.minimumContainerSize&&(c=Math.max(c,this.minimumContainerSize.width),b=Math.max(b,this.minimumContainerSize.height));this.resizeContainer&&this.doResizeContainer(c,b);if(this.preferPageSize||!mxClient.IS_IE&&this.pageVisible){var d=this.getPreferredPageSize(a,Math.max(1,c),Math.max(1,b));null!=d&&(c=d.width*this.view.scale,\nb=d.height*this.view.scale)}null!=this.minimumGraphSize&&(c=Math.max(c,this.minimumGraphSize.width*this.view.scale),b=Math.max(b,this.minimumGraphSize.height*this.view.scale));c=Math.ceil(c);b=Math.ceil(b);this.dialect==mxConstants.DIALECT_SVG?(d=this.view.getDrawPane().ownerSVGElement,null!=d&&(d.style.minWidth=Math.max(1,c)+\"px\",d.style.minHeight=Math.max(1,b)+\"px\",d.style.width=\"100%\",d.style.height=\"100%\")):(this.view.canvas.style.minWidth=Math.max(1,c)+\"px\",this.view.canvas.style.minHeight=Math.max(1,\nb)+\"px\");this.updatePageBreaks(this.pageBreaksVisible,c,b)}this.fireEvent(new mxEventObject(mxEvent.SIZE,\"bounds\",a))};mxGraph.prototype.doResizeContainer=function(a,b){null!=this.maximumContainerSize&&(a=Math.min(this.maximumContainerSize.width,a),b=Math.min(this.maximumContainerSize.height,b));this.container.style.width=Math.ceil(a)+\"px\";this.container.style.height=Math.ceil(b)+\"px\"};\nmxGraph.prototype.updatePageBreaks=function(a,b,c){b=this.view.scale;c=this.view.translate;var d=this.pageFormat,e=b*this.pageScale,f=new mxRectangle(0,0,d.width*e,d.height*e);d=mxRectangle.fromRectangle(this.getGraphBounds());d.width=Math.max(1,d.width);d.height=Math.max(1,d.height);f.x=Math.floor((d.x-c.x*b)/f.width)*f.width+c.x*b;f.y=Math.floor((d.y-c.y*b)/f.height)*f.height+c.y*b;d.width=Math.ceil((d.width+(d.x-f.x))/f.width)*f.width;d.height=Math.ceil((d.height+(d.y-f.y))/f.height)*f.height;\nvar g=(a=a&&Math.min(f.width,f.height)>this.minPageBreakDist)?Math.ceil(d.height/f.height)+1:0,k=a?Math.ceil(d.width/f.width)+1:0,l=(k-1)*f.width,m=(g-1)*f.height;null==this.horizontalPageBreaks&&0<g&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<k&&(this.verticalPageBreaks=[]);a=mxUtils.bind(this,function(n){if(null!=n){for(var p=n==this.horizontalPageBreaks?g:k,q=0;q<=p;q++){var r=n==this.horizontalPageBreaks?[new mxPoint(Math.round(f.x),Math.round(f.y+q*f.height)),new mxPoint(Math.round(f.x+\nl),Math.round(f.y+q*f.height))]:[new mxPoint(Math.round(f.x+q*f.width),Math.round(f.y)),new mxPoint(Math.round(f.x+q*f.width),Math.round(f.y+m))];null!=n[q]?(n[q].points=r,n[q].redraw()):(r=new mxPolyline(r,this.pageBreakColor),r.dialect=this.dialect,r.pointerEvents=!1,r.isDashed=this.pageBreakDashed,r.init(this.view.backgroundPane),r.redraw(),n[q]=r)}for(q=p;q<n.length;q++)n[q].destroy();n.splice(p,n.length-p)}});a(this.horizontalPageBreaks);a(this.verticalPageBreaks)};\nmxGraph.prototype.getCurrentCellStyle=function(a,b){b=b?null:this.view.getState(a);return null!=b?b.style:this.getCellStyle(a)};mxGraph.prototype.getCellStyle=function(a,b){b=null!=b?b:!0;var c=this.model.getStyle(a);var d=this.model.isEdge(a)?this.stylesheet.getDefaultEdgeStyle():this.stylesheet.getDefaultVertexStyle();null!=c&&0<c.length?d=this.stylesheet.getCellStyle(c,d,b):null!=d&&(d=mxUtils.clone(d));null==d?d={}:b&&(d=this.postProcessCellStyle(a,d));return d};\nmxGraph.prototype.postProcessCellStyle=function(a,b){if(null!=b){var c=b[mxConstants.STYLE_IMAGE];a=this.getImageFromBundles(c);null!=a?b[mxConstants.STYLE_IMAGE]=a:a=c;null!=a&&\"function\"===typeof a.substring&&\"data:image/\"==a.substring(0,11)&&(\"data:image/svg+xml,<\"==a.substring(0,20)?a=a.substring(0,19)+encodeURIComponent(a.substring(19)):\"data:image/svg+xml,%3C\"!=a.substring(0,22)&&(c=a.indexOf(\",\"),0<c&&\";base64,\"!=a.substring(c-7,c+1)&&(a=a.substring(0,c)+\";base64,\"+a.substring(c+1))),b[mxConstants.STYLE_IMAGE]=\na)}return b};mxGraph.prototype.setCellStyle=function(a,b){b=b||this.getSelectionCells();if(null!=b){this.model.beginUpdate();try{for(var c=0;c<b.length;c++)this.model.setStyle(b[c],a)}finally{this.model.endUpdate()}}};mxGraph.prototype.toggleCellStyle=function(a,b,c){c=c||this.getSelectionCell();return this.toggleCellStyles(a,b,[c])};\nmxGraph.prototype.toggleCellStyles=function(a,b,c){b=null!=b?b:!1;c=c||this.getEditableCells(this.getSelectionCells());var d=null;null!=c&&0<c.length&&(d=this.getCurrentCellStyle(c[0]),d=mxUtils.getValue(d,a,b)?0:1,this.setCellStyles(a,d,c));return d};mxGraph.prototype.setCellStyles=function(a,b,c){c=c||this.getEditableCells(this.getSelectionCells());mxUtils.setCellStyles(this.model,c,a,b)};mxGraph.prototype.toggleCellStyleFlags=function(a,b,c){this.setCellStyleFlags(a,b,null,c)};\nmxGraph.prototype.setCellStyleFlags=function(a,b,c,d){d=d||this.getEditableCells(this.getSelectionCells());null!=d&&0<d.length&&(null==c&&(c=this.getCurrentCellStyle(d[0]),c=(parseInt(c[a]||0)&b)!=b),mxUtils.setCellStyleFlags(this.model,d,a,b,c))};mxGraph.prototype.getOriginForCell=function(a){a=this.model.getParent(a);for(var b=new mxPoint;null!=a;){var c=this.getCellGeometry(a);null==c||c.relative||(b.x+=c.x,b.y+=c.y);a=this.model.getParent(a)}return b};\nmxGraph.prototype.alignCells=function(a,b,c){null==b&&(b=this.getMovableCells(this.getSelectionCells()));if(null!=b&&1<b.length){if(null==c)for(var d=0;d<b.length;d++){var e=this.getOriginForCell(b[d]),f=this.getCellGeometry(b[d]);if(!this.model.isEdge(b[d])&&null!=f&&!f.relative)if(null==c)if(a==mxConstants.ALIGN_CENTER){c=e.x+f.x+f.width/2;break}else if(a==mxConstants.ALIGN_RIGHT)c=e.x+f.x+f.width;else if(a==mxConstants.ALIGN_TOP)c=e.y+f.y;else if(a==mxConstants.ALIGN_MIDDLE){c=e.y+f.y+f.height/\n2;break}else c=a==mxConstants.ALIGN_BOTTOM?e.y+f.y+f.height:e.x+f.x;else c=a==mxConstants.ALIGN_RIGHT?Math.max(c,e.x+f.x+f.width):a==mxConstants.ALIGN_TOP?Math.min(c,e.y+f.y):a==mxConstants.ALIGN_BOTTOM?Math.max(c,e.y+f.y+f.height):Math.min(c,e.x+f.x)}if(null!=c){b=mxUtils.sortCells(b);this.model.beginUpdate();try{for(d=0;d<b.length;d++)e=this.getOriginForCell(b[d]),f=this.getCellGeometry(b[d]),this.model.isEdge(b[d])||null==f||f.relative||(f=f.clone(),a==mxConstants.ALIGN_CENTER?f.x=c-e.x-f.width/\n2:a==mxConstants.ALIGN_RIGHT?f.x=c-e.x-f.width:a==mxConstants.ALIGN_TOP?f.y=c-e.y:a==mxConstants.ALIGN_MIDDLE?f.y=c-e.y-f.height/2:a==mxConstants.ALIGN_BOTTOM?f.y=c-e.y-f.height:f.x=c-e.x,this.resizeCell(b[d],f));this.fireEvent(new mxEventObject(mxEvent.ALIGN_CELLS,\"align\",a,\"cells\",b))}finally{this.model.endUpdate()}}}return b};\nmxGraph.prototype.flipEdge=function(a){if(null!=a&&null!=this.alternateEdgeStyle){this.model.beginUpdate();try{var b=this.model.getStyle(a);null==b||0==b.length?this.model.setStyle(a,this.alternateEdgeStyle):this.model.setStyle(a,null);this.resetEdge(a);this.fireEvent(new mxEventObject(mxEvent.FLIP_EDGE,\"edge\",a))}finally{this.model.endUpdate()}}return a};mxGraph.prototype.addImageBundle=function(a){this.imageBundles.push(a)};\nmxGraph.prototype.removeImageBundle=function(a){for(var b=[],c=0;c<this.imageBundles.length;c++)this.imageBundles[c]!=a&&b.push(this.imageBundles[c]);this.imageBundles=b};mxGraph.prototype.getImageFromBundles=function(a){if(null!=a)for(var b=0;b<this.imageBundles.length;b++){var c=this.imageBundles[b].getImage(a);if(null!=c)return c}return null};\nmxGraph.prototype.orderCells=function(a,b,c){null==b&&(b=mxUtils.sortCells(this.getEditableCells(this.getSelectionCells()),!0));this.model.beginUpdate();try{this.cellsOrdered(b,a,c),this.fireEvent(new mxEventObject(mxEvent.ORDER_CELLS,\"back\",a,\"cells\",b,\"increment\",c))}finally{this.model.endUpdate()}return b};\nmxGraph.prototype.cellsOrdered=function(a,b,c){if(null!=a){this.model.beginUpdate();try{for(var d=0;d<a.length;d++){var e=this.model.getParent(a[d]);b?c?this.model.add(e,a[d],Math.max(0,e.getIndex(a[d])-1)):this.model.add(e,a[d],d):c?this.model.add(e,a[d],Math.min(this.model.getChildCount(e)-1,e.getIndex(a[d])+1)):this.model.add(e,a[d],this.model.getChildCount(e)-1)}this.fireEvent(new mxEventObject(mxEvent.CELLS_ORDERED,\"back\",b,\"cells\",a,\"increment\",c))}finally{this.model.endUpdate()}}};\nmxGraph.prototype.groupCells=function(a,b,c){null==c&&(c=mxUtils.sortCells(this.getSelectionCells(),!0));c=this.getCellsForGroup(c);null==a&&(a=this.createGroupCell(c));var d=this.getBoundsForGroup(a,c,b);if(1<c.length&&null!=d){var e=this.model.getParent(a);null==e&&(e=this.model.getParent(c[0]));this.model.beginUpdate();try{null==this.getCellGeometry(a)&&this.model.setGeometry(a,new mxGeometry);var f=this.model.getChildCount(e);this.cellsAdded([a],e,f,null,null,!1,!1,!1);f=this.model.getChildCount(a);\nthis.cellsAdded(c,a,f,null,null,!1,!1,!1);this.cellsMoved(c,-d.x,-d.y,!1,!1,!1);this.cellsResized([a],[d],!1);this.fireEvent(new mxEventObject(mxEvent.GROUP_CELLS,\"group\",a,\"border\",b,\"cells\",c))}finally{this.model.endUpdate()}}return a};mxGraph.prototype.getCellsForGroup=function(a){var b=[];if(null!=a&&0<a.length){var c=this.model.getParent(a[0]);b.push(a[0]);for(var d=1;d<a.length;d++)this.model.getParent(a[d])==c&&b.push(a[d])}return b};\nmxGraph.prototype.getBoundsForGroup=function(a,b,c){b=this.getBoundingBoxFromGeometry(b,!0);null!=b&&(this.isSwimlane(a)&&(a=this.getStartSize(a),b.x-=a.width,b.y-=a.height,b.width+=a.width,b.height+=a.height),null!=c&&(b.x-=c,b.y-=c,b.width+=2*c,b.height+=2*c));return b};mxGraph.prototype.createGroupCell=function(a){a=new mxCell(\"\");a.setVertex(!0);a.setConnectable(!1);return a};\nmxGraph.prototype.ungroupCells=function(a){var b=[];null==a&&(a=this.getCellsForUngroup());if(null!=a&&0<a.length){this.model.beginUpdate();try{for(var c=0;c<a.length;c++){var d=this.model.getChildren(a[c]);if(null!=d&&0<d.length){d=d.slice();var e=this.model.getParent(a[c]),f=this.model.getChildCount(e);this.cellsAdded(d,e,f,null,null,!0);b=b.concat(d);for(var g=0;g<d.length;g++)if(this.model.isVertex(d[g])){var k=this.view.getState(d[g]),l=this.getCellGeometry(d[g]);null!=k&&null!=l&&l.relative&&\n(l=l.clone(),l.x=k.origin.x,l.y=k.origin.y,l.relative=!1,this.model.setGeometry(d[g],l))}}}this.removeCellsAfterUngroup(a);this.fireEvent(new mxEventObject(mxEvent.UNGROUP_CELLS,\"cells\",a))}finally{this.model.endUpdate()}}return b};mxGraph.prototype.getCellsForUngroup=function(){for(var a=this.getEditableCells(this.getSelectionCells()),b=[],c=0;c<a.length;c++)this.model.isVertex(a[c])&&0<this.model.getChildCount(a[c])&&b.push(a[c]);return b};mxGraph.prototype.removeCellsAfterUngroup=function(a){this.cellsRemoved(this.addAllEdges(a))};\nmxGraph.prototype.removeCellsFromParent=function(a){null==a&&(a=this.getSelectionCells());this.model.beginUpdate();try{var b=this.getDefaultParent(),c=this.model.getChildCount(b);this.cellsAdded(a,b,c,null,null,!0);this.fireEvent(new mxEventObject(mxEvent.REMOVE_CELLS_FROM_PARENT,\"cells\",a))}finally{this.model.endUpdate()}return a};\nmxGraph.prototype.updateGroupBounds=function(a,b,c,d,e,f,g){null==a&&(a=this.getSelectionCells());b=null!=b?b:0;c=null!=c?c:!1;d=null!=d?d:0;e=null!=e?e:0;f=null!=f?f:0;g=null!=g?g:0;this.model.beginUpdate();try{for(var k=a.length-1;0<=k;k--){var l=this.getCellGeometry(a[k]);if(null!=l){var m=this.getChildCells(a[k]);if(null!=m&&0<m.length){var n=this.getBoundingBoxFromGeometry(m,!0);if(null!=n&&0<n.width&&0<n.height){var p=this.isSwimlane(a[k])?this.getActualStartSize(a[k],!0):new mxRectangle;l=\nl.clone();c&&(l.x=Math.round(l.x+n.x-b-p.x-g),l.y=Math.round(l.y+n.y-b-p.y-d));l.width=Math.round(n.width+2*b+p.x+g+e+p.width);l.height=Math.round(n.height+2*b+p.y+d+f+p.height);this.model.setGeometry(a[k],l);this.moveCells(m,b+p.x-n.x+g,b+p.y-n.y+d)}}}}}finally{this.model.endUpdate()}return a};\nmxGraph.prototype.getBoundingBox=function(a){var b=null;if(null!=a&&0<a.length)for(var c=0;c<a.length;c++)if(this.model.isVertex(a[c])||this.model.isEdge(a[c])){var d=this.view.getBoundingBox(this.view.getState(a[c]),!0);null!=d&&(null==b?b=mxRectangle.fromRectangle(d):b.add(d))}return b};mxGraph.prototype.cloneCell=function(a,b,c,d){return this.cloneCells([a],b,c,d)[0]};\nmxGraph.prototype.cloneCells=function(a,b,c,d){b=null!=b?b:!0;var e=null;if(null!=a){var f=new mxDictionary;e=[];for(var g=0;g<a.length;g++)f.put(a[g],!0),e.push(a[g]);if(0<e.length){var k=this.view.scale,l=this.view.translate;e=this.model.cloneCells(a,!0,c);for(g=0;g<a.length;g++)if(!b&&this.model.isEdge(e[g])&&null!=this.getEdgeValidationError(e[g],this.model.getTerminal(e[g],!0),this.model.getTerminal(e[g],!1)))e[g]=null;else{var m=this.model.getGeometry(e[g]);if(null!=m){var n=this.view.getState(a[g]),\np=this.view.getState(this.model.getParent(a[g]));if(null!=n&&null!=p)if(c=p.origin.x,p=p.origin.y,this.model.isEdge(e[g])){if(n=n.absolutePoints,null!=n){var q=this.model.getTerminal(a[g],!0);if(null!=q){for(;null!=q&&!f.get(q);)q=this.model.getParent(q);null==q&&null!=n[0]&&m.setTerminalPoint(new mxPoint(Math.round(n[0].x/k-l.x-c),Math.round(n[0].y/k-l.y-p)),!0)}d||(q=m.getTerminalPoint(!0),null!=q&&(q.x+=c,q.y+=p));q=this.model.getTerminal(a[g],!1);if(null!=q){for(;null!=q&&!f.get(q);)q=this.model.getParent(q);\nvar r=n.length-1;null==q&&null!=n[r]&&m.setTerminalPoint(new mxPoint(Math.round(n[r].x/k-l.x-c),Math.round(n[r].y/k-l.y-p)),!1)}d||(q=m.getTerminalPoint(!1),null!=q&&(q.x+=c,q.y+=p));m=m.points;if(!d&&null!=m)for(n=0;n<m.length;n++)null!=m[n]&&(m[n].x+=c,m[n].y+=p)}}else d||m.translate(c,p)}}}else e=[]}return e};mxGraph.prototype.insertVertex=function(a,b,c,d,e,f,g,k,l){b=this.createVertex(a,b,c,d,e,f,g,k,l);return this.addCell(b,a)};\nmxGraph.prototype.createVertex=function(a,b,c,d,e,f,g,k,l){a=new mxGeometry(d,e,f,g);a.relative=null!=l?l:!1;c=new mxCell(c,a,k);c.setId(b);c.setVertex(!0);c.setConnectable(!0);return c};mxGraph.prototype.insertEdge=function(a,b,c,d,e,f){b=this.createEdge(a,b,c,d,e,f);return this.addEdge(b,a,d,e)};mxGraph.prototype.createEdge=function(a,b,c,d,e,f){a=new mxCell(c,new mxGeometry,f);a.setId(b);a.setEdge(!0);a.geometry.relative=!0;return a};\nmxGraph.prototype.addEdge=function(a,b,c,d,e){return this.addCell(a,b,e,c,d)};mxGraph.prototype.addCell=function(a,b,c,d,e){return this.addCells([a],b,c,d,e)[0]};mxGraph.prototype.addCells=function(a,b,c,d,e,f){null==b&&(b=this.getDefaultParent());null==c&&(c=this.model.getChildCount(b));this.model.beginUpdate();try{this.cellsAdded(a,b,c,d,e,null!=f?f:!1,!0),this.fireEvent(new mxEventObject(mxEvent.ADD_CELLS,\"cells\",a,\"parent\",b,\"index\",c,\"source\",d,\"target\",e))}finally{this.model.endUpdate()}return a};\nmxGraph.prototype.cellsAdded=function(a,b,c,d,e,f,g,k){if(null!=a&&null!=b&&null!=c){this.model.beginUpdate();try{var l=f?this.view.getState(b):null,m=null!=l?l.origin:null,n=new mxPoint(0,0);for(l=0;l<a.length;l++)if(null==a[l])c--;else{var p=this.model.getParent(a[l]);if(null!=m&&a[l]!=b&&b!=p){var q=this.view.getState(p),r=null!=q?q.origin:n,t=this.model.getGeometry(a[l]);if(null!=t){var u=r.x-m.x,x=r.y-m.y;t=t.clone();t.translate(u,x);t.relative||!this.model.isVertex(a[l])||this.isAllowNegativeCoordinates()||\n(t.x=Math.max(0,t.x),t.y=Math.max(0,t.y));this.model.setGeometry(a[l],t)}}b==p&&c+l>this.model.getChildCount(b)&&c--;this.model.add(b,a[l],c+l);this.autoSizeCellsOnAdd&&this.autoSizeCell(a[l],!0);(null==k||k)&&this.isExtendParentsOnAdd(a[l])&&this.isExtendParent(a[l])&&this.extendParent(a[l]);(null==g||g)&&this.constrainChild(a[l]);null!=d&&this.cellConnected(a[l],d,!0);null!=e&&this.cellConnected(a[l],e,!1)}this.fireEvent(new mxEventObject(mxEvent.CELLS_ADDED,\"cells\",a,\"parent\",b,\"index\",c,\"source\",\nd,\"target\",e,\"absolute\",f))}finally{this.model.endUpdate()}}};mxGraph.prototype.autoSizeCell=function(a,b){if(null!=b?b:1){b=this.model.getChildCount(a);for(var c=0;c<b;c++)this.autoSizeCell(this.model.getChildAt(a,c))}this.getModel().isVertex(a)&&this.isAutoSizeCell(a)&&this.updateCellSize(a)};\nmxGraph.prototype.removeCells=function(a,b){b=null!=b?b:!0;null==a&&(a=this.getDeletableCells(this.getSelectionCells()));if(b)a=this.getDeletableCells(this.addAllEdges(a));else{a=a.slice();for(var c=this.getDeletableCells(this.getAllEdges(a)),d=new mxDictionary,e=0;e<a.length;e++)d.put(a[e],!0);for(e=0;e<c.length;e++)null!=this.view.getState(c[e])||d.get(c[e])||(d.put(c[e],!0),a.push(c[e]))}this.model.beginUpdate();try{this.cellsRemoved(a),this.fireEvent(new mxEventObject(mxEvent.REMOVE_CELLS,\"cells\",\na,\"includeEdges\",b))}finally{this.model.endUpdate()}return a};\nmxGraph.prototype.cellsRemoved=function(a){if(null!=a&&0<a.length){var b=this.view.scale,c=this.view.translate;this.model.beginUpdate();try{for(var d=new mxDictionary,e=0;e<a.length;e++)d.put(a[e],!0);for(e=0;e<a.length;e++){for(var f=this.getAllEdges([a[e]]),g=mxUtils.bind(this,function(l,m){var n=this.model.getGeometry(l);if(null!=n){for(var p=this.model.getTerminal(l,m),q=!1,r=p;null!=r;){if(a[e]==r){q=!0;break}r=this.model.getParent(r)}q&&(n=n.clone(),q=this.view.getState(l),null!=q&&null!=q.absolutePoints?\n(p=q.absolutePoints,r=m?0:p.length-1,n.setTerminalPoint(new mxPoint(p[r].x/b-c.x-q.origin.x,p[r].y/b-c.y-q.origin.y),m)):(p=this.view.getState(p),null!=p&&n.setTerminalPoint(new mxPoint(p.getCenterX()/b-c.x,p.getCenterY()/b-c.y),m)),this.model.setGeometry(l,n),this.model.setTerminal(l,null,m))}}),k=0;k<f.length;k++)d.get(f[k])||(d.put(f[k],!0),g(f[k],!0),g(f[k],!1));this.model.remove(a[e])}this.fireEvent(new mxEventObject(mxEvent.CELLS_REMOVED,\"cells\",a))}finally{this.model.endUpdate()}}};\nmxGraph.prototype.splitEdge=function(a,b,c,d,e,f,g,k){d=d||0;e=e||0;k=null!=k?k:this.model.getParent(a);f=this.model.getTerminal(a,!0);this.model.beginUpdate();try{if(null==c){c=this.cloneCell(a);var l=this.view.getState(a),m=this.getCellGeometry(c);if(null!=m&&null!=m.points&&null!=l){var n=this.view.translate,p=this.view.scale,q=mxUtils.findNearestSegment(l,(d+n.x)*p,(e+n.y)*p);m.points=m.points.slice(0,q);m=this.getCellGeometry(a);null!=m&&null!=m.points&&(m=m.clone(),m.points=m.points.slice(q),\nthis.model.setGeometry(a,m))}}this.cellsMoved(b,d,e,!1,!1);this.cellsAdded([c],k,this.model.getChildCount(k),f,b[0],!1);this.cellsAdded(b,k,this.model.getChildCount(k),null,null,!0);this.cellConnected(a,b[0],!0);this.fireEvent(new mxEventObject(mxEvent.SPLIT_EDGE,\"edge\",a,\"cells\",b,\"newEdge\",c,\"dx\",d,\"dy\",e))}finally{this.model.endUpdate()}return c};\nmxGraph.prototype.toggleCells=function(a,b,c){null==b&&(b=this.getSelectionCells());c&&(b=this.addAllEdges(b));this.model.beginUpdate();try{this.cellsToggled(b,a),this.fireEvent(new mxEventObject(mxEvent.TOGGLE_CELLS,\"show\",a,\"cells\",b,\"includeEdges\",c))}finally{this.model.endUpdate()}return b};mxGraph.prototype.cellsToggled=function(a,b){if(null!=a&&0<a.length){this.model.beginUpdate();try{for(var c=0;c<a.length;c++)this.model.setVisible(a[c],b)}finally{this.model.endUpdate()}}};\nmxGraph.prototype.foldCells=function(a,b,c,d,e){b=null!=b?b:!1;null==c&&(c=this.getFoldableCells(this.getSelectionCells(),a));this.stopEditing(!1);this.model.beginUpdate();try{this.cellsFolded(c,a,b,d),this.fireEvent(new mxEventObject(mxEvent.FOLD_CELLS,\"collapse\",a,\"recurse\",b,\"cells\",c))}finally{this.model.endUpdate()}return c};\nmxGraph.prototype.cellsFolded=function(a,b,c,d){if(null!=a&&0<a.length){this.model.beginUpdate();try{for(var e=0;e<a.length;e++)if((!d||this.isCellFoldable(a[e],b))&&b!=this.isCellCollapsed(a[e])){this.model.setCollapsed(a[e],b);this.swapBounds(a[e],b);this.isExtendParent(a[e])&&this.extendParent(a[e]);if(c){var f=this.model.getChildren(a[e]);this.cellsFolded(f,b,c)}this.constrainChild(a[e])}this.fireEvent(new mxEventObject(mxEvent.CELLS_FOLDED,\"cells\",a,\"collapse\",b,\"recurse\",c))}finally{this.model.endUpdate()}}};\nmxGraph.prototype.swapBounds=function(a,b){if(null!=a){var c=this.model.getGeometry(a);null!=c&&(c=c.clone(),this.updateAlternateBounds(a,c,b),c.swap(),this.model.setGeometry(a,c))}};\nmxGraph.prototype.updateAlternateBounds=function(a,b,c){if(null!=a&&null!=b){c=this.getCurrentCellStyle(a);if(null==b.alternateBounds){var d=b;this.collapseToPreferredSize&&(a=this.getPreferredSizeForCell(a),null!=a&&(d=a,a=mxUtils.getValue(c,mxConstants.STYLE_STARTSIZE),0<a&&(d.height=Math.max(d.height,a))));b.alternateBounds=new mxRectangle(0,0,d.width,d.height)}if(null!=b.alternateBounds){b.alternateBounds.x=b.x;b.alternateBounds.y=b.y;var e=mxUtils.toRadians(c[mxConstants.STYLE_ROTATION]||0);\n0!=e&&(c=b.alternateBounds.getCenterX()-b.getCenterX(),d=b.alternateBounds.getCenterY()-b.getCenterY(),a=Math.cos(e),e=Math.sin(e),b.alternateBounds.x+=a*c-e*d-c,b.alternateBounds.y+=e*c+a*d-d)}}};mxGraph.prototype.addAllEdges=function(a){var b=a.slice();return mxUtils.removeDuplicates(b.concat(this.getAllEdges(a)))};\nmxGraph.prototype.getAllEdges=function(a){var b=[];if(null!=a)for(var c=0;c<a.length;c++){for(var d=this.model.getEdgeCount(a[c]),e=0;e<d;e++)b.push(this.model.getEdgeAt(a[c],e));d=this.model.getChildren(a[c]);b=b.concat(this.getAllEdges(d))}return b};mxGraph.prototype.updateCellSize=function(a,b){b=null!=b?b:!1;this.model.beginUpdate();try{this.cellSizeUpdated(a,b),this.fireEvent(new mxEventObject(mxEvent.UPDATE_CELL_SIZE,\"cell\",a,\"ignoreChildren\",b))}finally{this.model.endUpdate()}return a};\nmxGraph.prototype.cellSizeUpdated=function(a,b){if(null!=a){this.model.beginUpdate();try{var c=this.getCellStyle(a),d=this.model.getGeometry(a);if(null!=d){var e=null,f=mxUtils.getValue(c,mxConstants.STYLE_FIXED_WIDTH,!1);f&&(e=d.width-2*parseFloat(mxUtils.getValue(c,mxConstants.STYLE_SPACING,2))-parseFloat(mxUtils.getValue(c,mxConstants.STYLE_SPACING_LEFT,0))-parseFloat(mxUtils.getValue(c,mxConstants.STYLE_SPACING_RIGHT,0)));var g=this.getPreferredSizeForCell(a,e);if(null!=g){var k=this.isCellCollapsed(a);\nd=d.clone();if(this.isSwimlane(a)){var l=this.model.getStyle(a);null==l&&(l=\"\");mxUtils.getValue(c,mxConstants.STYLE_HORIZONTAL,!0)?(l=mxUtils.setStyle(l,mxConstants.STYLE_STARTSIZE,g.height+8),k&&(d.height=g.height+8),f||(d.width=g.width)):(l=mxUtils.setStyle(l,mxConstants.STYLE_STARTSIZE,g.width+8),k&&!f&&(d.width=g.width+8),d.height=g.height);this.model.setStyle(a,l)}else{var m=this.view.createState(a),n=m.style[mxConstants.STYLE_ALIGN]||mxConstants.ALIGN_CENTER,p=this.getVerticalAlign(m);\"fixed\"==\nm.style[mxConstants.STYLE_ASPECT]&&(g.height=Math.round(d.height*g.width*100/d.width)/100);p==mxConstants.ALIGN_BOTTOM?d.y+=d.height-g.height:p==mxConstants.ALIGN_MIDDLE&&(d.y+=Math.round((d.height-g.height)/2));d.height=g.height;f||(n==mxConstants.ALIGN_RIGHT?d.x+=d.width-g.width:n==mxConstants.ALIGN_CENTER&&(d.x+=Math.round((d.width-g.width)/2)),d.width=g.width)}if(!b&&!k){var q=this.view.getBounds(this.model.getChildren(a));if(null!=q){var r=this.view.translate,t=this.view.scale,u=(q.x+q.width)/\nt-d.x-r.x;d.height=Math.max(d.height,(q.y+q.height)/t-d.y-r.y);f||(d.width=Math.max(d.width,u))}}this.cellsResized([a],[d],!1)}}}finally{this.model.endUpdate()}}};\nmxGraph.prototype.getPreferredSizeForCell=function(a,b){var c=null;if(null!=a){var d=this.view.createState(a),e=d.style;if(!this.model.isEdge(a)){var f=e[mxConstants.STYLE_FONTSIZE]||mxConstants.DEFAULT_FONTSIZE;a=c=0;null==this.getImage(d)&&null==e[mxConstants.STYLE_IMAGE]||e[mxConstants.STYLE_SHAPE]!=mxConstants.SHAPE_LABEL||(e[mxConstants.STYLE_VERTICAL_ALIGN]==mxConstants.ALIGN_MIDDLE&&(c+=parseFloat(mxUtils.getValue(e,mxConstants.STYLE_IMAGE_WIDTH,mxLabel.prototype.imageSize))),e[mxConstants.STYLE_ALIGN]!=\nmxConstants.ALIGN_CENTER&&(a+=parseFloat(mxUtils.getValue(e,mxConstants.STYLE_IMAGE_HEIGHT,mxLabel.prototype.imageSize))));c+=2*parseFloat(mxUtils.getValue(e,mxConstants.STYLE_SPACING,2));c+=parseFloat(mxUtils.getValue(e,mxConstants.STYLE_SPACING_LEFT,2));c+=parseFloat(mxUtils.getValue(e,mxConstants.STYLE_SPACING_RIGHT,2));a+=2*parseFloat(mxUtils.getValue(e,mxConstants.STYLE_SPACING,2));a+=parseFloat(mxUtils.getValue(e,mxConstants.STYLE_SPACING_TOP,2));a+=parseFloat(mxUtils.getValue(e,mxConstants.STYLE_SPACING_BOTTOM,\n2));var g=this.getFoldingImage(d);null!=g&&(c+=g.width+8);g=this.cellRenderer.getLabelValue(d);null!=g&&0<g.length?(this.isHtmlLabel(d.cell)?null!=b&&(b+=mxSvgCanvas2D.prototype.foreignObjectPadding):g=mxUtils.htmlEntities(g,!1),g=g.replace(/\\n/g,\"<br>\"),d=mxUtils.getSizeForString(g,f,e[mxConstants.STYLE_FONTFAMILY],b,e[mxConstants.STYLE_FONTSTYLE]),b=d.width+c,d=d.height+a,mxUtils.getValue(e,mxConstants.STYLE_HORIZONTAL,!0)||(e=d,d=b,b=e),this.gridEnabled&&(b=this.snap(b+this.gridSize/2),d=this.snap(d+\nthis.gridSize/2)),c=new mxRectangle(0,0,b,d)):(e=4*this.gridSize,c=new mxRectangle(0,0,e,e))}}return c};mxGraph.prototype.resizeCell=function(a,b,c){return this.resizeCells([a],[b],c)[0]};mxGraph.prototype.resizeCells=function(a,b,c){c=null!=c?c:this.isRecursiveResize();this.model.beginUpdate();try{var d=this.cellsResized(a,b,c);this.fireEvent(new mxEventObject(mxEvent.RESIZE_CELLS,\"cells\",a,\"bounds\",b,\"previous\",d))}finally{this.model.endUpdate()}return a};\nmxGraph.prototype.cellsResized=function(a,b,c){c=null!=c?c:!1;var d=[];if(null!=a&&null!=b&&a.length==b.length){this.model.beginUpdate();try{for(var e=0;e<a.length;e++)d.push(this.cellResized(a[e],b[e],!1,c)),this.isExtendParent(a[e])&&this.extendParent(a[e]),this.constrainChild(a[e]);this.resetEdgesOnResize&&this.resetEdges(a);this.fireEvent(new mxEventObject(mxEvent.CELLS_RESIZED,\"cells\",a,\"bounds\",b,\"previous\",d))}finally{this.model.endUpdate()}}return d};\nmxGraph.prototype.cellResized=function(a,b,c,d){var e=this.model.getGeometry(a);if(null!=e&&(e.x!=b.x||e.y!=b.y||e.width!=b.width||e.height!=b.height)){var f=e.clone();!c&&f.relative?(c=f.offset,null!=c&&(c.x+=b.x-f.x,c.y+=b.y-f.y)):(f.x=b.x,f.y=b.y);f.width=b.width;f.height=b.height;f.relative||!this.model.isVertex(a)||this.isAllowNegativeCoordinates()||(f.x=Math.max(0,f.x),f.y=Math.max(0,f.y));this.model.beginUpdate();try{d&&this.resizeChildCells(a,f),this.model.setGeometry(a,f),this.constrainChildCells(a)}finally{this.model.endUpdate()}}return e};\nmxGraph.prototype.resizeChildCells=function(a,b){var c=this.model.getGeometry(a),d=0!=c.width?b.width/c.width:1;b=0!=c.height?b.height/c.height:1;c=this.model.getChildCount(a);for(var e=0;e<c;e++)this.scaleCell(this.model.getChildAt(a,e),d,b,!0)};mxGraph.prototype.constrainChildCells=function(a){for(var b=this.model.getChildCount(a),c=0;c<b;c++)this.constrainChild(this.model.getChildAt(a,c))};\nmxGraph.prototype.scaleCell=function(a,b,c,d){var e=this.model.getGeometry(a);if(null!=e){var f=this.getCurrentCellStyle(a);e=e.clone();var g=e.x,k=e.y,l=e.width,m=e.height;e.scale(b,c,\"fixed\"==f[mxConstants.STYLE_ASPECT]);\"1\"==f[mxConstants.STYLE_RESIZE_WIDTH]?e.width=l*b:\"0\"==f[mxConstants.STYLE_RESIZE_WIDTH]&&(e.width=l);\"1\"==f[mxConstants.STYLE_RESIZE_HEIGHT]?e.height=m*c:\"0\"==f[mxConstants.STYLE_RESIZE_HEIGHT]&&(e.height=m);this.isCellMovable(a)||(e.x=g,e.y=k);this.isCellResizable(a)||(e.width=\nl,e.height=m);this.model.isVertex(a)?this.cellResized(a,e,!0,d):this.model.setGeometry(a,e)}};mxGraph.prototype.extendParent=function(a){if(null!=a){var b=this.model.getParent(a),c=this.getCellGeometry(b);null==b||null==c||this.isCellCollapsed(b)||(a=this.getCellGeometry(a),null!=a&&!a.relative&&(c.width<a.x+a.width||c.height<a.y+a.height)&&(c=c.clone(),c.width=Math.max(c.width,a.x+a.width),c.height=Math.max(c.height,a.y+a.height),this.cellsResized([b],[c],!1)))}};\nmxGraph.prototype.importCells=function(a,b,c,d,e,f){return this.moveCells(a,b,c,!0,d,e,f)};\nmxGraph.prototype.moveCells=function(a,b,c,d,e,f,g){b=null!=b?b:0;c=null!=c?c:0;d=null!=d?d:!1;if(null!=a&&(0!=b||0!=c||d||null!=e)){var k=a=this.model.getTopmostCells(a);this.model.beginUpdate();try{for(var l=new mxDictionary,m=0;m<a.length;m++)l.put(a[m],!0);var n=mxUtils.bind(this,function(x){for(;null!=x;){if(l.get(x))return!0;x=this.model.getParent(x)}return!1}),p=[];for(m=0;m<a.length;m++){var q=this.getCellGeometry(a[m]),r=this.model.getParent(a[m]);null!=q&&q.relative&&this.model.isEdge(r)&&\n(n(this.model.getTerminal(r,!0))||n(this.model.getTerminal(r,!1)))||p.push(a[m])}a=p;d&&(a=this.cloneCells(a,this.isCloneInvalidEdges(),g),null==e&&(e=this.getDefaultParent()));var t=this.isAllowNegativeCoordinates();null!=e&&this.setAllowNegativeCoordinates(!0);this.cellsMoved(a,b,c,!d&&this.isDisconnectOnMove()&&this.isAllowDanglingEdges(),null==e,this.isExtendParentsOnMove()&&null==e);this.setAllowNegativeCoordinates(t);if(null!=e){var u=this.model.getChildCount(e);this.cellsAdded(a,e,u,null,null,\n!0);if(d)for(m=0;m<a.length;m++)q=this.getCellGeometry(a[m]),r=this.model.getParent(k[m]),null!=q&&q.relative&&this.model.isEdge(r)&&this.model.contains(r)&&this.model.add(r,a[m])}this.fireEvent(new mxEventObject(mxEvent.MOVE_CELLS,\"cells\",a,\"dx\",b,\"dy\",c,\"clone\",d,\"target\",e,\"event\",f))}finally{this.model.endUpdate()}}return a};\nmxGraph.prototype.cellsMoved=function(a,b,c,d,e,f){if(null!=a&&(0!=b||0!=c)){f=null!=f?f:!1;this.model.beginUpdate();try{d&&this.disconnectGraph(a);for(var g=0;g<a.length;g++)this.translateCell(a[g],b,c),f&&this.isExtendParent(a[g])?this.extendParent(a[g]):e&&this.constrainChild(a[g]);this.resetEdgesOnMove&&this.resetEdges(a);this.fireEvent(new mxEventObject(mxEvent.CELLS_MOVED,\"cells\",a,\"dx\",b,\"dy\",c,\"disconnect\",d))}finally{this.model.endUpdate()}}};\nmxGraph.prototype.translateCell=function(a,b,c){var d=this.model.getGeometry(a);if(null!=d){b=parseFloat(b);c=parseFloat(c);d=d.clone();d.translate(b,c,this.model.isEdge(a));d.relative||!this.model.isVertex(a)||this.isAllowNegativeCoordinates()||(d.x=Math.max(0,parseFloat(d.x)),d.y=Math.max(0,parseFloat(d.y)));if(d.relative&&!this.model.isEdge(a)){var e=this.model.getParent(a),f=0;this.model.isVertex(e)&&(e=this.getCurrentCellStyle(e),f=mxUtils.getValue(e,mxConstants.STYLE_ROTATION,0));0!=f&&(f=mxUtils.toRadians(-f),\ne=Math.cos(f),f=Math.sin(f),c=mxUtils.getRotatedPoint(new mxPoint(b,c),e,f,new mxPoint(0,0)),b=c.x,c=c.y);null==d.offset?d.offset=new mxPoint(Math.round(b),Math.round(c)):(d.offset.x=Math.round(parseFloat(d.offset.x+b)),d.offset.y=Math.round(parseFloat(d.offset.y+c)))}this.model.setGeometry(a,d)}};\nmxGraph.prototype.getCellContainmentArea=function(a){if(null!=a&&!this.model.isEdge(a)){var b=this.model.getParent(a);if(null!=b&&b!=this.getDefaultParent()){var c=this.model.getGeometry(b);if(null!=c){var d=a=0,e=c.width;c=c.height;if(this.isSwimlane(b)){var f=this.getStartSize(b),g=this.getCurrentCellStyle(b);b=mxUtils.getValue(g,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST);var k=1==mxUtils.getValue(g,mxConstants.STYLE_FLIPH,0);g=1==mxUtils.getValue(g,mxConstants.STYLE_FLIPV,0);if(b==\nmxConstants.DIRECTION_SOUTH||b==mxConstants.DIRECTION_NORTH){var l=f.width;f.width=f.height;f.height=l}if(b==mxConstants.DIRECTION_EAST&&!g||b==mxConstants.DIRECTION_NORTH&&!k||b==mxConstants.DIRECTION_WEST&&g||b==mxConstants.DIRECTION_SOUTH&&k)a=f.width,d=f.height;e-=f.width;c-=f.height}return new mxRectangle(a,d,e,c)}}}return null};mxGraph.prototype.getMaximumGraphBounds=function(){return this.maximumGraphBounds};\nmxGraph.prototype.constrainChild=function(a,b){if(null!=a&&(b=this.getCellGeometry(a),null!=b&&(this.isConstrainRelativeChildren()||!b.relative))){var c=this.model.getParent(a);this.getCellGeometry(c);var d=this.getMaximumGraphBounds();null!=d&&(c=this.getBoundingBoxFromGeometry([c],!1),null!=c&&(d=mxRectangle.fromRectangle(d),d.x-=c.x,d.y-=c.y));if(this.isConstrainChild(a)&&(c=this.getCellContainmentArea(a),null!=c)){var e=this.getOverlap(a);0<e&&(c=mxRectangle.fromRectangle(c),c.x-=c.width*e,c.y-=\nc.height*e,c.width+=2*c.width*e,c.height+=2*c.height*e);null==d?d=c:(d=mxRectangle.fromRectangle(d),d.intersect(c))}if(null!=d){c=[a];if(!this.isCellCollapsed(a)){e=this.model.getDescendants(a);for(var f=0;f<e.length;f++)this.isCellVisible(e[f])&&c.push(e[f])}c=this.getBoundingBoxFromGeometry(c,!1);if(null!=c){b=b.clone();e=0;b.width>d.width&&(e=b.width-d.width,b.width-=e);c.x+c.width>d.x+d.width&&(e-=c.x+c.width-d.x-d.width-e);f=0;b.height>d.height&&(f=b.height-d.height,b.height-=f);c.y+c.height>\nd.y+d.height&&(f-=c.y+c.height-d.y-d.height-f);c.x<d.x&&(e-=c.x-d.x);c.y<d.y&&(f-=c.y-d.y);if(0!=e||0!=f)b.relative?(null==b.offset&&(b.offset=new mxPoint),b.offset.x+=e,b.offset.y+=f):(b.x+=e,b.y+=f);this.model.setGeometry(a,b)}}}};\nmxGraph.prototype.resetEdges=function(a){if(null!=a){for(var b=new mxDictionary,c=0;c<a.length;c++)b.put(a[c],!0);this.model.beginUpdate();try{for(c=0;c<a.length;c++){var d=this.model.getEdges(a[c]);if(null!=d)for(var e=0;e<d.length;e++){var f=this.view.getState(d[e]),g=null!=f?f.getVisibleTerminal(!0):this.view.getVisibleTerminal(d[e],!0),k=null!=f?f.getVisibleTerminal(!1):this.view.getVisibleTerminal(d[e],!1);b.get(g)&&b.get(k)||this.resetEdge(d[e])}this.resetEdges(this.model.getChildren(a[c]))}}finally{this.model.endUpdate()}}};\nmxGraph.prototype.resetEdge=function(a){var b=this.model.getGeometry(a);null!=b&&null!=b.points&&0<b.points.length&&(b=b.clone(),b.points=[],this.model.setGeometry(a,b));return a};\nmxGraph.prototype.getOutlineConstraint=function(a,b,c){if(null!=b.shape){c=this.view.getPerimeterBounds(b);var d=b.style[mxConstants.STYLE_DIRECTION];if(d==mxConstants.DIRECTION_NORTH||d==mxConstants.DIRECTION_SOUTH){c.x+=c.width/2-c.height/2;c.y+=c.height/2-c.width/2;var e=c.width;c.width=c.height;c.height=e}var f=mxUtils.toRadians(b.shape.getShapeRotation());if(0!=f){e=Math.cos(-f);f=Math.sin(-f);var g=new mxPoint(c.getCenterX(),c.getCenterY());a=mxUtils.getRotatedPoint(a,e,f,g)}g=f=1;var k=0,l=\n0;if(this.getModel().isVertex(b.cell)){var m=b.style[mxConstants.STYLE_FLIPH],n=b.style[mxConstants.STYLE_FLIPV];null!=b.shape&&null!=b.shape.stencil&&(m=1==mxUtils.getValue(b.style,\"stencilFlipH\",0)||m,n=1==mxUtils.getValue(b.style,\"stencilFlipV\",0)||n);if(d==mxConstants.DIRECTION_NORTH||d==mxConstants.DIRECTION_SOUTH)e=m,m=n,n=e;m&&(f=-1,k=-c.width);n&&(g=-1,l=-c.height)}a=new mxPoint((a.x-c.x)*f-k+c.x,(a.y-c.y)*g-l+c.y);return new mxConnectionConstraint(new mxPoint(0==c.width?0:Math.round(1E3*\n(a.x-c.x)/c.width)/1E3,0==c.height?0:Math.round(1E3*(a.y-c.y)/c.height)/1E3),!1)}return null};mxGraph.prototype.getAllConnectionConstraints=function(a,b){return null!=a&&null!=a.shape&&null!=a.shape.stencil?a.shape.stencil.constraints:null};\nmxGraph.prototype.getConnectionConstraint=function(a,b,c){b=null;var d=a.style[c?mxConstants.STYLE_EXIT_X:mxConstants.STYLE_ENTRY_X];if(null!=d){var e=a.style[c?mxConstants.STYLE_EXIT_Y:mxConstants.STYLE_ENTRY_Y];null!=e&&(b=new mxPoint(parseFloat(d),parseFloat(e)))}d=!1;var f=e=0;null!=b&&(d=mxUtils.getValue(a.style,c?mxConstants.STYLE_EXIT_PERIMETER:mxConstants.STYLE_ENTRY_PERIMETER,!0),e=parseFloat(a.style[c?mxConstants.STYLE_EXIT_DX:mxConstants.STYLE_ENTRY_DX]),f=parseFloat(a.style[c?mxConstants.STYLE_EXIT_DY:\nmxConstants.STYLE_ENTRY_DY]),e=isFinite(e)?e:0,f=isFinite(f)?f:0);return new mxConnectionConstraint(b,d,null,e,f)};\nmxGraph.prototype.setConnectionConstraint=function(a,b,c,d){if(null!=d){this.model.beginUpdate();try{null==d||null==d.point?(this.setCellStyles(c?mxConstants.STYLE_EXIT_X:mxConstants.STYLE_ENTRY_X,null,[a]),this.setCellStyles(c?mxConstants.STYLE_EXIT_Y:mxConstants.STYLE_ENTRY_Y,null,[a]),this.setCellStyles(c?mxConstants.STYLE_EXIT_DX:mxConstants.STYLE_ENTRY_DX,null,[a]),this.setCellStyles(c?mxConstants.STYLE_EXIT_DY:mxConstants.STYLE_ENTRY_DY,null,[a]),this.setCellStyles(c?mxConstants.STYLE_EXIT_PERIMETER:\nmxConstants.STYLE_ENTRY_PERIMETER,null,[a])):null!=d.point&&(this.setCellStyles(c?mxConstants.STYLE_EXIT_X:mxConstants.STYLE_ENTRY_X,d.point.x,[a]),this.setCellStyles(c?mxConstants.STYLE_EXIT_Y:mxConstants.STYLE_ENTRY_Y,d.point.y,[a]),this.setCellStyles(c?mxConstants.STYLE_EXIT_DX:mxConstants.STYLE_ENTRY_DX,d.dx,[a]),this.setCellStyles(c?mxConstants.STYLE_EXIT_DY:mxConstants.STYLE_ENTRY_DY,d.dy,[a]),d.perimeter?this.setCellStyles(c?mxConstants.STYLE_EXIT_PERIMETER:mxConstants.STYLE_ENTRY_PERIMETER,\nnull,[a]):this.setCellStyles(c?mxConstants.STYLE_EXIT_PERIMETER:mxConstants.STYLE_ENTRY_PERIMETER,\"0\",[a]))}finally{this.model.endUpdate()}}};\nmxGraph.prototype.getConnectionPoint=function(a,b,c){c=null!=c?c:!0;var d=null;if(null!=a&&null!=b.point){var e=this.view.getPerimeterBounds(a),f=new mxPoint(e.getCenterX(),e.getCenterY()),g=a.style[mxConstants.STYLE_DIRECTION],k=0;null!=g&&1==mxUtils.getValue(a.style,mxConstants.STYLE_ANCHOR_POINT_DIRECTION,1)&&(g==mxConstants.DIRECTION_NORTH?k+=270:g==mxConstants.DIRECTION_WEST?k+=180:g==mxConstants.DIRECTION_SOUTH&&(k+=90),g!=mxConstants.DIRECTION_NORTH&&g!=mxConstants.DIRECTION_SOUTH||e.rotate90());\nd=this.view.scale;d=new mxPoint(e.x+b.point.x*e.width+b.dx*d,e.y+b.point.y*e.height+b.dy*d);var l=a.style[mxConstants.STYLE_ROTATION]||0;if(b.perimeter)0!=k&&(g=e=0,90==k?g=1:180==k?e=-1:270==k&&(g=-1),d=mxUtils.getRotatedPoint(d,e,g,f)),d=this.view.getPerimeterPoint(a,d,!1);else if(l+=k,this.getModel().isVertex(a.cell)){k=1==a.style[mxConstants.STYLE_FLIPH];b=1==a.style[mxConstants.STYLE_FLIPV];null!=a.shape&&null!=a.shape.stencil&&(k=1==mxUtils.getValue(a.style,\"stencilFlipH\",0)||k,b=1==mxUtils.getValue(a.style,\n\"stencilFlipV\",0)||b);if(g==mxConstants.DIRECTION_NORTH||g==mxConstants.DIRECTION_SOUTH)a=k,k=b,b=a;k&&(d.x=2*e.getCenterX()-d.x);b&&(d.y=2*e.getCenterY()-d.y)}0!=l&&null!=d&&(a=mxUtils.toRadians(l),e=Math.cos(a),g=Math.sin(a),d=mxUtils.getRotatedPoint(d,e,g,f))}c&&null!=d&&(d.x=Math.round(d.x),d.y=Math.round(d.y));return d};\nmxGraph.prototype.connectCell=function(a,b,c,d){this.model.beginUpdate();try{var e=this.model.getTerminal(a,c);this.cellConnected(a,b,c,d);this.fireEvent(new mxEventObject(mxEvent.CONNECT_CELL,\"edge\",a,\"terminal\",b,\"source\",c,\"previous\",e))}finally{this.model.endUpdate()}return a};\nmxGraph.prototype.cellConnected=function(a,b,c,d){if(null!=a){this.model.beginUpdate();try{var e=this.model.getTerminal(a,c);this.setConnectionConstraint(a,b,c,d);this.isPortsEnabled()&&(d=null,this.isPort(b)&&(d=b.getId(),b=this.getTerminalForPort(b,c)),this.setCellStyles(c?mxConstants.STYLE_SOURCE_PORT:mxConstants.STYLE_TARGET_PORT,d,[a]));this.model.setTerminal(a,b,c);this.resetEdgesOnConnect&&this.resetEdge(a);this.fireEvent(new mxEventObject(mxEvent.CELL_CONNECTED,\"edge\",a,\"terminal\",b,\"source\",\nc,\"previous\",e))}finally{this.model.endUpdate()}}};\nmxGraph.prototype.disconnectGraph=function(a){if(null!=a){this.model.beginUpdate();try{for(var b=this.view.scale,c=this.view.translate,d=new mxDictionary,e=0;e<a.length;e++)d.put(a[e],!0);for(e=0;e<a.length;e++)if(this.model.isEdge(a[e])){var f=this.model.getGeometry(a[e]);if(null!=f){var g=this.view.getState(a[e]),k=this.view.getState(this.model.getParent(a[e]));if(null!=g&&null!=k){f=f.clone();var l=-k.origin.x,m=-k.origin.y,n=g.absolutePoints,p=this.model.getTerminal(a[e],!0);if(null!=p&&this.isCellDisconnectable(a[e],\np,!0)){for(;null!=p&&!d.get(p);)p=this.model.getParent(p);null==p&&(f.setTerminalPoint(new mxPoint(n[0].x/b-c.x+l,n[0].y/b-c.y+m),!0),this.model.setTerminal(a[e],null,!0))}var q=this.model.getTerminal(a[e],!1);if(null!=q&&this.isCellDisconnectable(a[e],q,!1)){for(;null!=q&&!d.get(q);)q=this.model.getParent(q);if(null==q){var r=n.length-1;f.setTerminalPoint(new mxPoint(n[r].x/b-c.x+l,n[r].y/b-c.y+m),!1);this.model.setTerminal(a[e],null,!1)}}this.model.setGeometry(a[e],f)}}}}finally{this.model.endUpdate()}}};\nmxGraph.prototype.getCurrentRoot=function(){return this.view.currentRoot};mxGraph.prototype.getTranslateForRoot=function(a){return null};mxGraph.prototype.isPort=function(a){return!1};mxGraph.prototype.getTerminalForPort=function(a,b){return this.model.getParent(a)};mxGraph.prototype.getChildOffsetForCell=function(a){return null};mxGraph.prototype.enterGroup=function(a){a=a||this.getSelectionCell();null!=a&&this.isValidRoot(a)&&(this.view.setCurrentRoot(a),this.clearSelection())};\nmxGraph.prototype.exitGroup=function(){var a=this.model.getRoot(),b=this.getCurrentRoot();if(null!=b){for(var c=this.model.getParent(b);c!=a&&!this.isValidRoot(c)&&this.model.getParent(c)!=a;)c=this.model.getParent(c);c==a||this.model.getParent(c)==a?this.view.setCurrentRoot(null):this.view.setCurrentRoot(c);null!=this.view.getState(b)&&this.setSelectionCell(b)}};mxGraph.prototype.home=function(){var a=this.getCurrentRoot();null!=a&&(this.view.setCurrentRoot(null),null!=this.view.getState(a)&&this.setSelectionCell(a))};\nmxGraph.prototype.isValidRoot=function(a){return null!=a};mxGraph.prototype.getGraphBounds=function(){return this.view.getGraphBounds()};mxGraph.prototype.getCellBounds=function(a,b,c){var d=[a];b&&(d=d.concat(this.model.getEdges(a)));d=this.view.getBounds(d);if(c){c=this.model.getChildCount(a);for(var e=0;e<c;e++){var f=this.getCellBounds(this.model.getChildAt(a,e),b,!0);null!=d?d.add(f):d=f}}return d};\nmxGraph.prototype.getBoundingBoxFromGeometry=function(a,b){b=null!=b?b:!1;var c=null;if(null!=a)for(var d=0;d<a.length;d++)if(b||this.model.isVertex(a[d])){var e=this.getCellGeometry(a[d]);if(null!=e){var f=null;if(this.model.isEdge(a[d])){f=function(l){null!=l&&(null==g?g=new mxRectangle(l.x,l.y,0,0):g.add(new mxRectangle(l.x,l.y,0,0)))};null==this.model.getTerminal(a[d],!0)&&f(e.getTerminalPoint(!0));null==this.model.getTerminal(a[d],!1)&&f(e.getTerminalPoint(!1));e=e.points;if(null!=e&&0<e.length)for(var g=\nnew mxRectangle(e[0].x,e[0].y,0,0),k=1;k<e.length;k++)f(e[k]);f=g}else k=this.model.getParent(a[d]),e.relative?this.model.isVertex(k)&&k!=this.view.currentRoot&&(g=this.getBoundingBoxFromGeometry([k],!1),null!=g&&(f=new mxRectangle(e.x*g.width,e.y*g.height,e.width,e.height),0<=mxUtils.indexOf(a,k)&&(f.x+=g.x,f.y+=g.y))):(f=mxRectangle.fromRectangle(e),this.model.isVertex(k)&&0<=mxUtils.indexOf(a,k)&&(g=this.getBoundingBoxFromGeometry([k],!1),null!=g&&(f.x+=g.x,f.y+=g.y))),null!=f&&null!=e.offset&&\n(f.x+=e.offset.x,f.y+=e.offset.y),e=this.getCurrentCellStyle(a[d]),null!=f&&(e=mxUtils.getValue(e,mxConstants.STYLE_ROTATION,0),0!=e&&(f=mxUtils.getBoundingBox(f,e)));null!=f&&(null==c?c=mxRectangle.fromRectangle(f):c.add(f))}}return c};mxGraph.prototype.refresh=function(a){this.view.clear(a,null==a);this.view.validate();this.sizeDidChange();this.fireEvent(new mxEventObject(mxEvent.REFRESH))};mxGraph.prototype.snap=function(a){this.gridEnabled&&(a=Math.round(a/this.gridSize)*this.gridSize);return a};\nmxGraph.prototype.snapDelta=function(a,b,c,d,e){var f=this.view.translate,g=this.view.scale;!c&&this.gridEnabled?(c=this.gridSize*g*.5,d||(d=b.x-(this.snap(b.x/g-f.x)+f.x)*g,a.x=Math.abs(a.x-d)<c?0:this.snap(a.x/g)*g-d),e||(b=b.y-(this.snap(b.y/g-f.y)+f.y)*g,a.y=Math.abs(a.y-b)<c?0:this.snap(a.y/g)*g-b)):(c=.5*g,d||(d=b.x-(Math.round(b.x/g-f.x)+f.x)*g,a.x=Math.abs(a.x-d)<c?0:Math.round(a.x/g)*g-d),e||(b=b.y-(Math.round(b.y/g-f.y)+f.y)*g,a.y=Math.abs(a.y-b)<c?0:Math.round(a.y/g)*g-b));return a};\nmxGraph.prototype.panGraph=function(a,b){if(this.useScrollbarsForPanning&&mxUtils.hasScrollbars(this.container))this.container.scrollLeft=-a,this.container.scrollTop=-b;else{var c=this.view.getCanvas();if(this.dialect==mxConstants.DIALECT_SVG)if(0==a&&0==b){if(mxClient.IS_IE?c.setAttribute(\"transform\",\"translate(\"+a+\",\"+b+\")\"):c.removeAttribute(\"transform\"),null!=this.shiftPreview1){for(var d=this.shiftPreview1.firstChild;null!=d;){var e=d.nextSibling;this.container.appendChild(d);d=e}null!=this.shiftPreview1.parentNode&&\nthis.shiftPreview1.parentNode.removeChild(this.shiftPreview1);this.shiftPreview1=null;this.container.appendChild(c.parentNode);for(d=this.shiftPreview2.firstChild;null!=d;)e=d.nextSibling,this.container.appendChild(d),d=e;null!=this.shiftPreview2.parentNode&&this.shiftPreview2.parentNode.removeChild(this.shiftPreview2);this.shiftPreview2=null}}else{c.setAttribute(\"transform\",\"translate(\"+a+\",\"+b+\")\");if(null==this.shiftPreview1){this.shiftPreview1=document.createElement(\"div\");this.shiftPreview1.style.position=\n\"absolute\";this.shiftPreview1.style.overflow=\"visible\";this.shiftPreview2=document.createElement(\"div\");this.shiftPreview2.style.position=\"absolute\";this.shiftPreview2.style.overflow=\"visible\";var f=this.shiftPreview1;for(d=this.container.firstChild;null!=d;)e=d.nextSibling,d!=c.parentNode?f.appendChild(d):f=this.shiftPreview2,d=e;null!=this.shiftPreview1.firstChild&&this.container.insertBefore(this.shiftPreview1,c.parentNode);null!=this.shiftPreview2.firstChild&&this.container.appendChild(this.shiftPreview2)}this.shiftPreview1.style.left=\na+\"px\";this.shiftPreview1.style.top=b+\"px\";this.shiftPreview2.style.left=a+\"px\";this.shiftPreview2.style.top=b+\"px\"}else c.style.left=a+\"px\",c.style.top=b+\"px\";this.panDx=a;this.panDy=b;this.fireEvent(new mxEventObject(mxEvent.PAN))}};mxGraph.prototype.zoomIn=function(){this.zoom(this.zoomFactor)};mxGraph.prototype.zoomOut=function(){this.zoom(1/this.zoomFactor)};\nmxGraph.prototype.zoomActual=function(){1==this.view.scale?this.view.setTranslate(0,0):(this.view.translate.x=0,this.view.translate.y=0,this.view.setScale(1))};mxGraph.prototype.zoomTo=function(a,b){this.zoom(a/this.view.scale,b)};\nmxGraph.prototype.center=function(a,b,c,d){a=null!=a?a:!0;b=null!=b?b:!0;c=null!=c?c:.5;d=null!=d?d:.5;var e=mxUtils.hasScrollbars(this.container),f=2*this.getBorder(),g=this.container.clientWidth-f;f=this.container.clientHeight-f;var k=this.getGraphBounds(),l=this.view.translate,m=this.view.scale,n=a?g-k.width:0,p=b?f-k.height:0;e?(k.x-=l.x,k.y-=l.y,a=this.container.scrollWidth,b=this.container.scrollHeight,a>g&&(n=0),b>f&&(p=0),this.view.setTranslate(Math.floor(n/2-k.x),Math.floor(p/2-k.y)),this.container.scrollLeft=\n(a-g)/2,this.container.scrollTop=(b-f)/2):this.view.setTranslate(a?Math.floor(l.x-k.x/m+n*c/m):l.x,b?Math.floor(l.y-k.y/m+p*d/m):l.y)};\nmxGraph.prototype.zoom=function(a,b,c){b=null!=b?b:this.centerZoom;var d=Math.round(this.view.scale*a*100)/100;null!=c&&(d=Math.round(d*c)/c);c=this.view.getState(this.getSelectionCell());a=d/this.view.scale;if(this.keepSelectionVisibleOnZoom&&null!=c)a=new mxRectangle(c.x*a,c.y*a,c.width*a,c.height*a),this.view.scale=d,this.scrollRectToVisible(a)||(this.view.revalidate(),this.view.setScale(d));else if(c=mxUtils.hasScrollbars(this.container),b&&!c){c=this.container.offsetWidth;var e=this.container.offsetHeight;\n1<a?(a=(a-1)/(2*d),c*=-a,e*=-a):(a=(1/a-1)/(2*this.view.scale),c*=a,e*=a);this.view.scaleAndTranslate(d,this.view.translate.x+c,this.view.translate.y+e)}else{var f=this.view.translate.x,g=this.view.translate.y,k=this.container.scrollLeft,l=this.container.scrollTop;this.view.setScale(d);c&&(e=c=0,b&&(c=this.container.offsetWidth*(a-1)/2,e=this.container.offsetHeight*(a-1)/2),this.container.scrollLeft=(this.view.translate.x-f)*this.view.scale+Math.round(k*a+c),this.container.scrollTop=(this.view.translate.y-\ng)*this.view.scale+Math.round(l*a+e))}};\nmxGraph.prototype.zoomToRect=function(a){var b=this.container.clientWidth/a.width/(this.container.clientHeight/a.height);a.x=Math.max(0,a.x);a.y=Math.max(0,a.y);var c=Math.min(this.container.scrollWidth,a.x+a.width),d=Math.min(this.container.scrollHeight,a.y+a.height);a.width=c-a.x;a.height=d-a.y;1>b?(b=a.height/b,c=(b-a.height)/2,a.height=b,a.y-=Math.min(a.y,c),d=Math.min(this.container.scrollHeight,a.y+a.height),a.height=d-a.y):(b*=a.width,c=(b-a.width)/2,a.width=b,a.x-=Math.min(a.x,c),c=Math.min(this.container.scrollWidth,\na.x+a.width),a.width=c-a.x);b=this.container.clientWidth/a.width;c=this.view.scale*b;mxUtils.hasScrollbars(this.container)?(this.view.setScale(c),this.container.scrollLeft=Math.round(a.x*b),this.container.scrollTop=Math.round(a.y*b)):this.view.scaleAndTranslate(c,this.view.translate.x-a.x/this.view.scale,this.view.translate.y-a.y/this.view.scale)};\nmxGraph.prototype.scrollCellToVisible=function(a,b){var c=-this.view.translate.x,d=-this.view.translate.y;a=this.view.getState(a);null!=a&&(c=new mxRectangle(c+a.x,d+a.y,a.width,a.height),b&&null!=this.container&&(b=this.container.clientWidth,d=this.container.clientHeight,c.x=c.getCenterX()-b/2,c.width=b,c.y=c.getCenterY()-d/2,c.height=d),b=new mxPoint(this.view.translate.x,this.view.translate.y),this.scrollRectToVisible(c)&&(c=new mxPoint(this.view.translate.x,this.view.translate.y),this.view.translate.x=\nb.x,this.view.translate.y=b.y,this.view.setTranslate(c.x,c.y)))};\nmxGraph.prototype.scrollRectToVisible=function(a){var b=!1;if(null!=a){var c=this.container.offsetWidth,d=this.container.offsetHeight,e=Math.min(c,a.width),f=Math.min(d,a.height);if(mxUtils.hasScrollbars(this.container)){c=this.container;a.x+=this.view.translate.x;a.y+=this.view.translate.y;var g=c.scrollLeft-a.x;d=Math.max(g-c.scrollLeft,0);0<g?c.scrollLeft-=g+2:(g=a.x+e-c.scrollLeft-c.clientWidth,0<g&&(c.scrollLeft+=g+2));e=c.scrollTop-a.y;g=Math.max(0,e-c.scrollTop);0<e?c.scrollTop-=e+2:(e=a.y+\nf-c.scrollTop-c.clientHeight,0<e&&(c.scrollTop+=e+2));this.useScrollbarsForPanning||0==d&&0==g||this.view.setTranslate(d,g)}else{g=-this.view.translate.x;var k=-this.view.translate.y,l=this.view.scale;a.x+e>g+c&&(this.view.translate.x-=(a.x+e-c-g)/l,b=!0);a.y+f>k+d&&(this.view.translate.y-=(a.y+f-d-k)/l,b=!0);a.x<g&&(this.view.translate.x+=(g-a.x)/l,b=!0);a.y<k&&(this.view.translate.y+=(k-a.y)/l,b=!0);b&&(this.view.refresh(),null!=this.selectionCellsHandler&&this.selectionCellsHandler.refresh())}}return b};\nmxGraph.prototype.getCellGeometry=function(a){return this.model.getGeometry(a)};mxGraph.prototype.isCellVisible=function(a){return this.model.isVisible(a)};mxGraph.prototype.isCellCollapsed=function(a){return this.model.isCollapsed(a)};mxGraph.prototype.isCellConnectable=function(a){return this.model.isConnectable(a)};\nmxGraph.prototype.isOrthogonal=function(a){var b=a.style[mxConstants.STYLE_ORTHOGONAL];if(null!=b)return b;a=this.view.getEdgeStyle(a);return a==mxEdgeStyle.SegmentConnector||a==mxEdgeStyle.ElbowConnector||a==mxEdgeStyle.SideToSide||a==mxEdgeStyle.TopToBottom||a==mxEdgeStyle.EntityRelation||a==mxEdgeStyle.OrthConnector};mxGraph.prototype.isLoop=function(a){var b=a.getVisibleTerminalState(!0);a=a.getVisibleTerminalState(!1);return null!=b&&b==a};mxGraph.prototype.isCloneEvent=function(a){return mxEvent.isControlDown(a)};\nmxGraph.prototype.isTransparentClickEvent=function(a){return!1};mxGraph.prototype.isToggleEvent=function(a){return mxClient.IS_MAC?mxEvent.isMetaDown(a):mxEvent.isControlDown(a)};mxGraph.prototype.isGridEnabledEvent=function(a){return null!=a&&!mxEvent.isAltDown(a)};mxGraph.prototype.isConstrainedEvent=function(a){return mxEvent.isShiftDown(a)};mxGraph.prototype.isIgnoreTerminalEvent=function(a){return!1};mxGraph.prototype.validationAlert=function(a){mxUtils.alert(a)};\nmxGraph.prototype.isEdgeValid=function(a,b,c){return null==this.getEdgeValidationError(a,b,c)};\nmxGraph.prototype.getEdgeValidationError=function(a,b,c){if(null!=a&&!this.isAllowDanglingEdges()&&(null==b||null==c))return\"\";if(null!=a&&null==this.model.getTerminal(a,!0)&&null==this.model.getTerminal(a,!1))return null;if(!this.allowLoops&&b==c&&null!=b||!this.isValidConnection(b,c))return\"\";if(null!=b&&null!=c){var d=\"\";if(!this.multigraph){var e=this.model.getEdgesBetween(b,c,!0);if(1<e.length||1==e.length&&e[0]!=a)d+=(mxResources.get(this.alreadyConnectedResource)||this.alreadyConnectedResource)+\n\"\\n\"}e=this.model.getDirectedEdgeCount(b,!0,a);var f=this.model.getDirectedEdgeCount(c,!1,a);if(null!=this.multiplicities)for(var g=0;g<this.multiplicities.length;g++){var k=this.multiplicities[g].check(this,a,b,c,e,f);null!=k&&(d+=k)}k=this.validateEdge(a,b,c);null!=k&&(d+=k);return 0<d.length?d:null}return this.allowDanglingEdges?null:\"\"};mxGraph.prototype.validateEdge=function(a,b,c){return null};\nmxGraph.prototype.validateGraph=function(a,b){a=null!=a?a:this.model.getRoot();b=null!=b?b:{};for(var c=!0,d=this.model.getChildCount(a),e=0;e<d;e++){var f=this.model.getChildAt(a,e),g=b;this.isValidRoot(f)&&(g={});g=this.validateGraph(f,g);null!=g?this.setCellWarning(f,g.replace(/\\n/g,\"<br>\")):this.setCellWarning(f,null);c=c&&null==g}d=\"\";this.isCellCollapsed(a)&&!c&&(d+=(mxResources.get(this.containsValidationErrorsResource)||this.containsValidationErrorsResource)+\"\\n\");d=this.model.isEdge(a)?d+\n(this.getEdgeValidationError(a,this.model.getTerminal(a,!0),this.model.getTerminal(a,!1))||\"\"):d+(this.getCellValidationError(a)||\"\");b=this.validateCell(a,b);null!=b&&(d+=b);null==this.model.getParent(a)&&this.view.validate();return 0<d.length||!c?d:null};\nmxGraph.prototype.getCellValidationError=function(a){var b=this.model.getDirectedEdgeCount(a,!0),c=this.model.getDirectedEdgeCount(a,!1);a=this.model.getValue(a);var d=\"\";if(null!=this.multiplicities)for(var e=0;e<this.multiplicities.length;e++){var f=this.multiplicities[e];f.source&&mxUtils.isNode(a,f.type,f.attr,f.value)&&(b>f.max||b<f.min)?d+=f.countError+\"\\n\":!f.source&&mxUtils.isNode(a,f.type,f.attr,f.value)&&(c>f.max||c<f.min)&&(d+=f.countError+\"\\n\")}return 0<d.length?d:null};\nmxGraph.prototype.validateCell=function(a,b){return null};mxGraph.prototype.getBackgroundImage=function(){return this.backgroundImage};mxGraph.prototype.setBackgroundImage=function(a){this.backgroundImage=a};mxGraph.prototype.getFoldingImage=function(a){if(null!=a&&this.foldingEnabled&&!this.getModel().isEdge(a.cell)){var b=this.isCellCollapsed(a.cell);if(this.isCellFoldable(a.cell,!b))return b?this.collapsedImage:this.expandedImage}return null};\nmxGraph.prototype.convertValueToString=function(a){a=this.model.getValue(a);if(null!=a){if(mxUtils.isNode(a))return a.nodeName;if(\"function\"==typeof a.toString)return a.toString()}return\"\"};mxGraph.prototype.getLabel=function(a){var b=\"\";if(this.labelsVisible&&null!=a){var c=this.getCurrentCellStyle(a);mxUtils.getValue(c,mxConstants.STYLE_NOLABEL,!1)||(b=this.convertValueToString(a))}return b};mxGraph.prototype.isHtmlLabel=function(a){return this.isHtmlLabels()};mxGraph.prototype.isHtmlLabels=function(){return this.htmlLabels};\nmxGraph.prototype.setHtmlLabels=function(a){this.htmlLabels=a};mxGraph.prototype.isWrapping=function(a){return\"wrap\"==this.getCurrentCellStyle(a)[mxConstants.STYLE_WHITE_SPACE]};mxGraph.prototype.isLabelClipped=function(a){return\"hidden\"==this.getCurrentCellStyle(a)[mxConstants.STYLE_OVERFLOW]};\nmxGraph.prototype.getTooltip=function(a,b,c,d){var e=null;null!=a&&(null==a.control||b!=a.control.node&&b.parentNode!=a.control.node||(e=this.collapseExpandResource,e=mxUtils.htmlEntities(mxResources.get(e)||e).replace(/\\\\n/g,\"<br>\")),null==e&&null!=a.overlays&&a.overlays.visit(function(f,g){null!=e||b!=g.node&&b.parentNode!=g.node||(e=g.overlay.toString())}),null==e&&(c=this.selectionCellsHandler.getHandler(a.cell),null!=c&&\"function\"==typeof c.getTooltipForNode&&(e=c.getTooltipForNode(b))),null==\ne&&(e=this.getTooltipForCell(a.cell)));return e};mxGraph.prototype.getTooltipForCell=function(a){return null!=a&&null!=a.getTooltip?a.getTooltip():this.convertValueToString(a)};mxGraph.prototype.getLinkForCell=function(a){return null};mxGraph.prototype.getLinkTargetForCell=function(a){return null};mxGraph.prototype.getCursorForMouseEvent=function(a){return this.getCursorForCell(a.getCell())};mxGraph.prototype.getCursorForCell=function(a){return null};\nmxGraph.prototype.getStartSize=function(a,b){var c=new mxRectangle;a=this.getCurrentCellStyle(a,b);b=parseInt(mxUtils.getValue(a,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));mxUtils.getValue(a,mxConstants.STYLE_HORIZONTAL,!0)?c.height=b:c.width=b;return c};\nmxGraph.prototype.getSwimlaneDirection=function(a){var b=mxUtils.getValue(a,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST),c=1==mxUtils.getValue(a,mxConstants.STYLE_FLIPH,0),d=1==mxUtils.getValue(a,mxConstants.STYLE_FLIPV,0);a=mxUtils.getValue(a,mxConstants.STYLE_HORIZONTAL,!0)?0:3;b==mxConstants.DIRECTION_NORTH?a--:b==mxConstants.DIRECTION_WEST?a+=2:b==mxConstants.DIRECTION_SOUTH&&(a+=1);b=mxUtils.mod(a,2);c&&1==b&&(a+=2);d&&0==b&&(a+=2);return[mxConstants.DIRECTION_NORTH,mxConstants.DIRECTION_EAST,\nmxConstants.DIRECTION_SOUTH,mxConstants.DIRECTION_WEST][mxUtils.mod(a,4)]};mxGraph.prototype.getActualStartSize=function(a,b){var c=new mxRectangle;this.isSwimlane(a,b)&&(b=this.getCurrentCellStyle(a,b),a=parseInt(mxUtils.getValue(b,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE)),b=this.getSwimlaneDirection(b),b==mxConstants.DIRECTION_NORTH?c.y=a:b==mxConstants.DIRECTION_WEST?c.x=a:b==mxConstants.DIRECTION_SOUTH?c.height=a:c.width=a);return c};\nmxGraph.prototype.getImage=function(a){return null!=a&&null!=a.style?a.style[mxConstants.STYLE_IMAGE]:null};mxGraph.prototype.isTransparentState=function(a){var b=!1;if(null!=a){b=mxUtils.getValue(a.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE);var c=mxUtils.getValue(a.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);b=b==mxConstants.NONE&&c==mxConstants.NONE&&null==this.getImage(a)}return b};\nmxGraph.prototype.getVerticalAlign=function(a){return null!=a&&null!=a.style?a.style[mxConstants.STYLE_VERTICAL_ALIGN]||mxConstants.ALIGN_MIDDLE:null};mxGraph.prototype.getIndicatorColor=function(a){return null!=a&&null!=a.style?a.style[mxConstants.STYLE_INDICATOR_COLOR]:null};mxGraph.prototype.getIndicatorGradientColor=function(a){return null!=a&&null!=a.style?a.style[mxConstants.STYLE_INDICATOR_GRADIENTCOLOR]:null};\nmxGraph.prototype.getIndicatorShape=function(a){return null!=a&&null!=a.style?a.style[mxConstants.STYLE_INDICATOR_SHAPE]:null};mxGraph.prototype.getIndicatorImage=function(a){return null!=a&&null!=a.style?a.style[mxConstants.STYLE_INDICATOR_IMAGE]:null};mxGraph.prototype.getBorder=function(){return this.border};mxGraph.prototype.setBorder=function(a){this.border=a};\nmxGraph.prototype.isSwimlane=function(a,b){return null==a||this.model.getParent(a)==this.model.getRoot()||this.model.isEdge(a)?!1:this.getCurrentCellStyle(a,b)[mxConstants.STYLE_SHAPE]==mxConstants.SHAPE_SWIMLANE};mxGraph.prototype.isResizeContainer=function(){return this.resizeContainer};mxGraph.prototype.setResizeContainer=function(a){this.resizeContainer=a};mxGraph.prototype.isEnabled=function(){return this.enabled};\nmxGraph.prototype.setEnabled=function(a){this.enabled=a;this.fireEvent(new mxEventObject(\"enabledChanged\",\"enabled\",a))};mxGraph.prototype.isEscapeEnabled=function(){return this.escapeEnabled};mxGraph.prototype.setEscapeEnabled=function(a){this.escapeEnabled=a};mxGraph.prototype.isInvokesStopCellEditing=function(){return this.invokesStopCellEditing};mxGraph.prototype.setInvokesStopCellEditing=function(a){this.invokesStopCellEditing=a};mxGraph.prototype.isEnterStopsCellEditing=function(){return this.enterStopsCellEditing};\nmxGraph.prototype.setEnterStopsCellEditing=function(a){this.enterStopsCellEditing=a};mxGraph.prototype.isCellLocked=function(a){var b=this.model.getGeometry(a);return this.isCellsLocked()||null!=b&&this.model.isVertex(a)&&b.relative};mxGraph.prototype.isCellsLocked=function(){return this.cellsLocked};mxGraph.prototype.setCellsLocked=function(a){this.cellsLocked=a};mxGraph.prototype.getCloneableCells=function(a){return this.model.filterCells(a,mxUtils.bind(this,function(b){return this.isCellCloneable(b)}))};\nmxGraph.prototype.isCellCloneable=function(a){a=this.getCurrentCellStyle(a);return this.isCellsCloneable()&&0!=a[mxConstants.STYLE_CLONEABLE]};mxGraph.prototype.isCellsCloneable=function(){return this.cellsCloneable};mxGraph.prototype.setCellsCloneable=function(a){this.cellsCloneable=a};mxGraph.prototype.getExportableCells=function(a){return this.model.filterCells(a,mxUtils.bind(this,function(b){return this.canExportCell(b)}))};mxGraph.prototype.canExportCell=function(a){return this.exportEnabled};\nmxGraph.prototype.getImportableCells=function(a){return this.model.filterCells(a,mxUtils.bind(this,function(b){return this.canImportCell(b)}))};mxGraph.prototype.canImportCell=function(a){return this.importEnabled};mxGraph.prototype.isCellSelectable=function(a){return this.isCellsSelectable()};mxGraph.prototype.isCellsSelectable=function(){return this.cellsSelectable};mxGraph.prototype.setCellsSelectable=function(a){this.cellsSelectable=a};\nmxGraph.prototype.getDeletableCells=function(a){return this.model.filterCells(a,mxUtils.bind(this,function(b){return this.isCellDeletable(b)}))};mxGraph.prototype.isCellDeletable=function(a){a=this.getCurrentCellStyle(a);return this.isCellsDeletable()&&0!=a[mxConstants.STYLE_DELETABLE]};mxGraph.prototype.isCellsDeletable=function(){return this.cellsDeletable};mxGraph.prototype.setCellsDeletable=function(a){this.cellsDeletable=a};\nmxGraph.prototype.isLabelMovable=function(a){return!this.isCellLocked(a)&&(this.model.isEdge(a)&&this.edgeLabelsMovable||this.model.isVertex(a)&&this.vertexLabelsMovable)};mxGraph.prototype.getRotatableCells=function(a){return this.model.filterCells(a,mxUtils.bind(this,function(b){return this.isCellRotatable(b)}))};mxGraph.prototype.isCellRotatable=function(a){return 0!=this.getCurrentCellStyle(a)[mxConstants.STYLE_ROTATABLE]};\nmxGraph.prototype.getMovableCells=function(a){return this.model.filterCells(a,mxUtils.bind(this,function(b){return this.isCellMovable(b)}))};mxGraph.prototype.isCellMovable=function(a){var b=this.getCurrentCellStyle(a);return this.isCellsMovable()&&!this.isCellLocked(a)&&0!=b[mxConstants.STYLE_MOVABLE]};mxGraph.prototype.isCellsMovable=function(){return this.cellsMovable};mxGraph.prototype.setCellsMovable=function(a){this.cellsMovable=a};mxGraph.prototype.isGridEnabled=function(){return this.gridEnabled};\nmxGraph.prototype.setGridEnabled=function(a){this.gridEnabled=a};mxGraph.prototype.isPortsEnabled=function(){return this.portsEnabled};mxGraph.prototype.setPortsEnabled=function(a){this.portsEnabled=a};mxGraph.prototype.getGridSize=function(){return this.gridSize};mxGraph.prototype.setGridSize=function(a){this.gridSize=a};mxGraph.prototype.getTolerance=function(){return this.tolerance};mxGraph.prototype.setTolerance=function(a){this.tolerance=a};mxGraph.prototype.isVertexLabelsMovable=function(){return this.vertexLabelsMovable};\nmxGraph.prototype.setVertexLabelsMovable=function(a){this.vertexLabelsMovable=a};mxGraph.prototype.isEdgeLabelsMovable=function(){return this.edgeLabelsMovable};mxGraph.prototype.setEdgeLabelsMovable=function(a){this.edgeLabelsMovable=a};mxGraph.prototype.isSwimlaneNesting=function(){return this.swimlaneNesting};mxGraph.prototype.setSwimlaneNesting=function(a){this.swimlaneNesting=a};mxGraph.prototype.isSwimlaneSelectionEnabled=function(){return this.swimlaneSelectionEnabled};\nmxGraph.prototype.setSwimlaneSelectionEnabled=function(a){this.swimlaneSelectionEnabled=a};mxGraph.prototype.isMultigraph=function(){return this.multigraph};mxGraph.prototype.setMultigraph=function(a){this.multigraph=a};mxGraph.prototype.isAllowLoops=function(){return this.allowLoops};mxGraph.prototype.setAllowDanglingEdges=function(a){this.allowDanglingEdges=a};mxGraph.prototype.isAllowDanglingEdges=function(){return this.allowDanglingEdges};\nmxGraph.prototype.setConnectableEdges=function(a){this.connectableEdges=a};mxGraph.prototype.isConnectableEdges=function(){return this.connectableEdges};mxGraph.prototype.setCloneInvalidEdges=function(a){this.cloneInvalidEdges=a};mxGraph.prototype.isCloneInvalidEdges=function(){return this.cloneInvalidEdges};mxGraph.prototype.setAllowLoops=function(a){this.allowLoops=a};mxGraph.prototype.isDisconnectOnMove=function(){return this.disconnectOnMove};\nmxGraph.prototype.setDisconnectOnMove=function(a){this.disconnectOnMove=a};mxGraph.prototype.isDropEnabled=function(){return this.dropEnabled};mxGraph.prototype.setDropEnabled=function(a){this.dropEnabled=a};mxGraph.prototype.isSplitEnabled=function(){return this.splitEnabled};mxGraph.prototype.setSplitEnabled=function(a){this.splitEnabled=a};mxGraph.prototype.getResizableCells=function(a){return this.model.filterCells(a,mxUtils.bind(this,function(b){return this.isCellResizable(b)}))};\nmxGraph.prototype.isCellResizable=function(a){var b=this.getCurrentCellStyle(a);return this.isCellsResizable()&&!this.isCellLocked(a)&&\"0\"!=mxUtils.getValue(b,mxConstants.STYLE_RESIZABLE,\"1\")};mxGraph.prototype.isCellsResizable=function(){return this.cellsResizable};mxGraph.prototype.setCellsResizable=function(a){this.cellsResizable=a};mxGraph.prototype.isTerminalPointMovable=function(a,b){return!0};\nmxGraph.prototype.isCellBendable=function(a){var b=this.getCurrentCellStyle(a);return this.isCellsBendable()&&!this.isCellLocked(a)&&0!=b[mxConstants.STYLE_BENDABLE]};mxGraph.prototype.isCellsBendable=function(){return this.cellsBendable};mxGraph.prototype.setCellsBendable=function(a){this.cellsBendable=a};mxGraph.prototype.getEditableCells=function(a){return this.model.filterCells(a,mxUtils.bind(this,function(b){return this.isCellEditable(b)}))};\nmxGraph.prototype.isCellEditable=function(a){var b=this.getCurrentCellStyle(a);return this.isCellsEditable()&&!this.isCellLocked(a)&&0!=b[mxConstants.STYLE_EDITABLE]};mxGraph.prototype.isCellsEditable=function(){return this.cellsEditable};mxGraph.prototype.setCellsEditable=function(a){this.cellsEditable=a};mxGraph.prototype.isCellDisconnectable=function(a,b,c){return this.isCellsDisconnectable()&&!this.isCellLocked(a)};mxGraph.prototype.isCellsDisconnectable=function(){return this.cellsDisconnectable};\nmxGraph.prototype.setCellsDisconnectable=function(a){this.cellsDisconnectable=a};mxGraph.prototype.isValidSource=function(a){return null==a&&this.allowDanglingEdges||null!=a&&(!this.model.isEdge(a)||this.connectableEdges)&&this.isCellConnectable(a)};mxGraph.prototype.isValidTarget=function(a){return this.isValidSource(a)};mxGraph.prototype.isValidConnection=function(a,b){return this.isValidSource(a)&&this.isValidTarget(b)};mxGraph.prototype.setConnectable=function(a){this.connectionHandler.setEnabled(a)};\nmxGraph.prototype.isConnectable=function(){return this.connectionHandler.isEnabled()};mxGraph.prototype.setTooltips=function(a){this.tooltipHandler.setEnabled(a)};mxGraph.prototype.setPanning=function(a){this.panningHandler.panningEnabled=a};mxGraph.prototype.isEditing=function(a){if(null!=this.cellEditor){var b=this.cellEditor.getEditingCell();return null==a?null!=b:a==b}return!1};mxGraph.prototype.isAutoSizeCell=function(a){a=this.getCurrentCellStyle(a);return this.isAutoSizeCells()||1==a[mxConstants.STYLE_AUTOSIZE]};\nmxGraph.prototype.isAutoSizeCells=function(){return this.autoSizeCells};mxGraph.prototype.setAutoSizeCells=function(a){this.autoSizeCells=a};mxGraph.prototype.isExtendParent=function(a){return!this.getModel().isEdge(a)&&this.isExtendParents()};mxGraph.prototype.isExtendParents=function(){return this.extendParents};mxGraph.prototype.setExtendParents=function(a){this.extendParents=a};mxGraph.prototype.isExtendParentsOnAdd=function(a){return this.extendParentsOnAdd};\nmxGraph.prototype.setExtendParentsOnAdd=function(a){this.extendParentsOnAdd=a};mxGraph.prototype.isExtendParentsOnMove=function(){return this.extendParentsOnMove};mxGraph.prototype.setExtendParentsOnMove=function(a){this.extendParentsOnMove=a};mxGraph.prototype.isRecursiveResize=function(a){return this.recursiveResize};mxGraph.prototype.setRecursiveResize=function(a){this.recursiveResize=a};mxGraph.prototype.isConstrainChild=function(a){return this.isConstrainChildren()&&!this.getModel().isEdge(this.getModel().getParent(a))};\nmxGraph.prototype.isConstrainChildren=function(){return this.constrainChildren};mxGraph.prototype.setConstrainChildren=function(a){this.constrainChildren=a};mxGraph.prototype.isConstrainRelativeChildren=function(){return this.constrainRelativeChildren};mxGraph.prototype.setConstrainRelativeChildren=function(a){this.constrainRelativeChildren=a};mxGraph.prototype.isAllowNegativeCoordinates=function(){return this.allowNegativeCoordinates};\nmxGraph.prototype.setAllowNegativeCoordinates=function(a){this.allowNegativeCoordinates=a};mxGraph.prototype.getOverlap=function(a){return this.isAllowOverlapParent(a)?this.defaultOverlap:0};mxGraph.prototype.isAllowOverlapParent=function(a){return!1};mxGraph.prototype.getFoldableCells=function(a,b){return this.model.filterCells(a,mxUtils.bind(this,function(c){return this.isCellFoldable(c,b)}))};\nmxGraph.prototype.isCellFoldable=function(a,b){b=this.getCurrentCellStyle(a);return 0<this.model.getChildCount(a)&&0!=b[mxConstants.STYLE_FOLDABLE]};mxGraph.prototype.isValidDropTarget=function(a,b,c){return null!=a&&!this.isCellLocked(a)&&(this.isSplitEnabled()&&this.isSplitTarget(a,b,c)||!this.model.isEdge(a)&&(this.isSwimlane(a)||0<this.model.getChildCount(a)&&!this.isCellCollapsed(a)))};\nmxGraph.prototype.isSplitTarget=function(a,b,c){return this.model.isEdge(a)&&null!=b&&1==b.length&&this.isCellConnectable(b[0])&&null==this.getEdgeValidationError(a,this.model.getTerminal(a,!0),b[0])?(c=this.model.getTerminal(a,!0),a=this.model.getTerminal(a,!1),!this.model.isAncestor(b[0],c)&&!this.model.isAncestor(b[0],a)):!1};\nmxGraph.prototype.getDropTarget=function(a,b,c,d){if(!this.isSwimlaneNesting())for(var e=0;e<a.length;e++)if(this.isSwimlane(a[e]))return null;e=mxUtils.convertPoint(this.container,mxEvent.getClientX(b),mxEvent.getClientY(b));e.x-=this.panDx;e.y-=this.panDy;e=this.getSwimlaneAt(e.x,e.y);if(null==c)c=e;else if(null!=e){for(var f=this.model.getParent(e);null!=f&&this.isSwimlane(f)&&f!=c;)f=this.model.getParent(f);f==c&&(c=e)}for(;null!=c&&!this.isValidDropTarget(c,a,b)&&!this.model.isLayer(c);)c=this.model.getParent(c);\nif(null==d||!d)for(var g=c;null!=g&&0>mxUtils.indexOf(a,g);)g=this.model.getParent(g);return this.model.isLayer(c)||null!=g?null:c};mxGraph.prototype.getDefaultParent=function(){var a=this.getCurrentRoot();null==a&&(a=this.defaultParent,null==a&&(a=this.model.getRoot(),a=this.model.getChildAt(a,0)));return a};mxGraph.prototype.setDefaultParent=function(a){this.defaultParent=a};mxGraph.prototype.getSwimlane=function(a){for(;null!=a&&!this.isSwimlane(a);)a=this.model.getParent(a);return a};\nmxGraph.prototype.getSwimlaneAt=function(a,b,c){null==c&&(c=this.getCurrentRoot(),null==c&&(c=this.model.getRoot()));if(null!=c)for(var d=this.model.getChildCount(c),e=0;e<d;e++){var f=this.model.getChildAt(c,e);if(null!=f){var g=this.getSwimlaneAt(a,b,f);if(null!=g)return g;if(this.isCellVisible(f)&&this.isSwimlane(f)&&(g=this.view.getState(f),this.intersects(g,a,b)))return f}}return null};\nmxGraph.prototype.getCellAt=function(a,b,c,d,e,f){d=null!=d?d:!0;e=null!=e?e:!0;null==c&&(c=this.getCurrentRoot(),null==c&&(c=this.getModel().getRoot()));if(null!=c)for(var g=this.model.getChildCount(c)-1;0<=g;g--){var k=this.model.getChildAt(c,g),l=this.getCellAt(a,b,k,d,e,f);if(null!=l)return l;if(this.isCellVisible(k)&&(e&&this.model.isEdge(k)||d&&this.model.isVertex(k))&&(l=this.view.getState(k),null!=l&&(null==f||!f(l,a,b))&&this.intersects(l,a,b)))return k}return null};\nmxGraph.prototype.intersects=function(a,b,c){if(null!=a){var d=a.absolutePoints;if(null!=d){a=this.tolerance*this.tolerance;for(var e=d[0],f=1;f<d.length;f++){var g=d[f];if(mxUtils.ptSegDistSq(e.x,e.y,g.x,g.y,b,c)<=a)return!0;e=g}}else if(e=mxUtils.toRadians(mxUtils.getValue(a.style,mxConstants.STYLE_ROTATION)||0),0!=e&&(d=Math.cos(-e),e=Math.sin(-e),f=new mxPoint(a.getCenterX(),a.getCenterY()),e=mxUtils.getRotatedPoint(new mxPoint(b,c),d,e,f),b=e.x,c=e.y),mxUtils.contains(a,b,c))return!0}return!1};\nmxGraph.prototype.hitsSwimlaneContent=function(a,b,c){var d=this.getView().getState(a);a=this.getStartSize(a);if(null!=d){var e=this.getView().getScale();b-=d.x;c-=d.y;if(0<a.width&&0<b&&b>a.width*e||0<a.height&&0<c&&c>a.height*e)return!0}return!1};mxGraph.prototype.getChildVertices=function(a){return this.getChildCells(a,!0,!1)};mxGraph.prototype.getChildEdges=function(a){return this.getChildCells(a,!1,!0)};\nmxGraph.prototype.getChildCells=function(a,b,c){a=null!=a?a:this.getDefaultParent();a=this.model.getChildCells(a,null!=b?b:!1,null!=c?c:!1);b=[];for(c=0;c<a.length;c++)this.isCellVisible(a[c])&&b.push(a[c]);return b};mxGraph.prototype.getConnections=function(a,b){return this.getEdges(a,b,!0,!0,!1)};mxGraph.prototype.getIncomingEdges=function(a,b){return this.getEdges(a,b,!0,!1,!1)};mxGraph.prototype.getOutgoingEdges=function(a,b){return this.getEdges(a,b,!1,!0,!1)};\nmxGraph.prototype.getEdges=function(a,b,c,d,e,f){c=null!=c?c:!0;d=null!=d?d:!0;e=null!=e?e:!0;f=null!=f?f:!1;for(var g=[],k=this.isCellCollapsed(a),l=this.model.getChildCount(a),m=0;m<l;m++){var n=this.model.getChildAt(a,m);if(k||!this.isCellVisible(n))g=g.concat(this.model.getEdges(n,c,d))}g=g.concat(this.model.getEdges(a,c,d));k=[];for(m=0;m<g.length;m++)n=this.view.getState(g[m]),l=null!=n?n.getVisibleTerminal(!0):this.view.getVisibleTerminal(g[m],!0),n=null!=n?n.getVisibleTerminal(!1):this.view.getVisibleTerminal(g[m],\n!1),(e&&l==n||l!=n&&(c&&n==a&&(null==b||this.isValidAncestor(l,b,f))||d&&l==a&&(null==b||this.isValidAncestor(n,b,f))))&&k.push(g[m]);return k};mxGraph.prototype.isValidAncestor=function(a,b,c){return c?this.model.isAncestor(b,a):this.model.getParent(a)==b};\nmxGraph.prototype.getOpposites=function(a,b,c,d){c=null!=c?c:!0;d=null!=d?d:!0;var e=[],f=new mxDictionary;if(null!=a)for(var g=0;g<a.length;g++){var k=this.view.getState(a[g]),l=null!=k?k.getVisibleTerminal(!0):this.view.getVisibleTerminal(a[g],!0);k=null!=k?k.getVisibleTerminal(!1):this.view.getVisibleTerminal(a[g],!1);l==b&&null!=k&&k!=b&&d?f.get(k)||(f.put(k,!0),e.push(k)):k==b&&null!=l&&l!=b&&c&&!f.get(l)&&(f.put(l,!0),e.push(l))}return e};\nmxGraph.prototype.getEdgesBetween=function(a,b,c){c=null!=c?c:!1;for(var d=this.getEdges(a),e=[],f=0;f<d.length;f++){var g=this.view.getState(d[f]),k=null!=g?g.getVisibleTerminal(!0):this.view.getVisibleTerminal(d[f],!0);g=null!=g?g.getVisibleTerminal(!1):this.view.getVisibleTerminal(d[f],!1);(k==a&&g==b||!c&&k==b&&g==a)&&e.push(d[f])}return e};\nmxGraph.prototype.getPointForEvent=function(a,b){a=mxUtils.convertPoint(this.container,mxEvent.getClientX(a),mxEvent.getClientY(a));var c=this.view.scale,d=this.view.translate;b=0!=b?this.gridSize/2:0;a.x=this.snap(a.x/c-d.x-b);a.y=this.snap(a.y/c-d.y-b);return a};\nmxGraph.prototype.getCells=function(a,b,c,d,e,f,g,k,l){f=null!=f?f:[];if(0<c||0<d||null!=g){var m=this.getModel(),n=a+c,p=b+d;null==e&&(e=this.getCurrentRoot(),null==e&&(e=m.getRoot()));if(null!=e)for(var q=m.getChildCount(e),r=0;r<q;r++){var t=m.getChildAt(e,r),u=this.view.getState(t);if(null!=u&&this.isCellVisible(t)&&(null==k||!k(u))){var x=mxUtils.getValue(u.style,mxConstants.STYLE_ROTATION)||0;0!=x&&(u=mxUtils.getBoundingBox(u,x));(x=null!=g&&m.isVertex(t)&&mxUtils.intersects(g,u)||null!=g&&\nm.isEdge(t)&&mxUtils.intersects(g,u)||null==g&&(m.isEdge(t)||m.isVertex(t))&&u.x>=a&&u.y+u.height<=p&&u.y>=b&&u.x+u.width<=n)&&f.push(t);x&&!l||this.getCells(a,b,c,d,t,f,g,k,l)}}}return f};mxGraph.prototype.getCellsBeyond=function(a,b,c,d,e){var f=[];if(d||e)if(null==c&&(c=this.getDefaultParent()),null!=c)for(var g=this.model.getChildCount(c),k=0;k<g;k++){var l=this.model.getChildAt(c,k),m=this.view.getState(l);this.isCellVisible(l)&&null!=m&&(!d||m.x>=a)&&(!e||m.y>=b)&&f.push(l)}return f};\nmxGraph.prototype.findTreeRoots=function(a,b,c){b=null!=b?b:!1;c=null!=c?c:!1;var d=[];if(null!=a){for(var e=this.getModel(),f=e.getChildCount(a),g=null,k=0,l=0;l<f;l++){var m=e.getChildAt(a,l);if(this.model.isVertex(m)&&this.isCellVisible(m)){for(var n=this.getConnections(m,b?a:null),p=0,q=0,r=0;r<n.length;r++)this.view.getVisibleTerminal(n[r],!0)==m?p++:q++;(c&&0==p&&0<q||!c&&0==q&&0<p)&&d.push(m);n=c?q-p:p-q;n>k&&(k=n,g=m)}}0==d.length&&null!=g&&d.push(g)}return d};\nmxGraph.prototype.traverse=function(a,b,c,d,e,f){if(null!=c&&null!=a&&(b=null!=b?b:!0,f=null!=f?f:!1,e=e||new mxDictionary,null==d||!e.get(d))&&(e.put(d,!0),d=c(a,d),null==d||d)&&(d=this.model.getEdgeCount(a),0<d))for(var g=0;g<d;g++){var k=this.model.getEdgeAt(a,g),l=this.model.getTerminal(k,!0)==a;b&&!f!=l||(l=this.model.getTerminal(k,!l),this.traverse(l,b,c,k,e,f))}};mxGraph.prototype.isCellSelected=function(a){return this.getSelectionModel().isSelected(a)};mxGraph.prototype.isSelectionEmpty=function(){return this.getSelectionModel().isEmpty()};\nmxGraph.prototype.clearSelection=function(){return this.getSelectionModel().clear()};mxGraph.prototype.getSelectionCount=function(){return this.getSelectionModel().cells.length};mxGraph.prototype.getSelectionCell=function(){return this.getSelectionModel().cells[0]};mxGraph.prototype.getSelectionCells=function(){return this.getSelectionModel().cells.slice()};mxGraph.prototype.setSelectionCell=function(a){this.getSelectionModel().setCell(a)};mxGraph.prototype.setSelectionCells=function(a){this.getSelectionModel().setCells(a)};\nmxGraph.prototype.addSelectionCell=function(a){this.getSelectionModel().addCell(a)};mxGraph.prototype.addSelectionCells=function(a){this.getSelectionModel().addCells(a)};mxGraph.prototype.removeSelectionCell=function(a){this.getSelectionModel().removeCell(a)};mxGraph.prototype.removeSelectionCells=function(a){this.getSelectionModel().removeCells(a)};mxGraph.prototype.selectRegion=function(a,b){a=this.getCells(a.x,a.y,a.width,a.height);this.selectCellsForEvent(a,b);return a};\nmxGraph.prototype.selectNextCell=function(){this.selectCell(!0)};mxGraph.prototype.selectPreviousCell=function(){this.selectCell()};mxGraph.prototype.selectParentCell=function(){this.selectCell(!1,!0)};mxGraph.prototype.selectChildCell=function(){this.selectCell(!1,!1,!0)};\nmxGraph.prototype.selectCell=function(a,b,c){var d=this.selectionModel,e=0<d.cells.length?d.cells[0]:null;1<d.cells.length&&d.clear();d=null!=e?this.model.getParent(e):this.getDefaultParent();var f=this.model.getChildCount(d);null==e&&0<f?(a=this.model.getChildAt(d,0),this.setSelectionCell(a)):null!=e&&!b||null==this.view.getState(d)||null==this.model.getGeometry(d)?null!=e&&c?0<this.model.getChildCount(e)&&(a=this.model.getChildAt(e,0),this.setSelectionCell(a)):0<f&&(b=d.getIndex(e),a?(b++,a=this.model.getChildAt(d,\nb%f)):(b--,a=this.model.getChildAt(d,0>b?f-1:b)),this.setSelectionCell(a)):this.getCurrentRoot()!=d&&this.setSelectionCell(d)};mxGraph.prototype.selectAll=function(a,b){a=a||this.getDefaultParent();b=b?this.model.filterDescendants(mxUtils.bind(this,function(c){return c!=a&&null!=this.view.getState(c)}),a):this.model.getChildren(a);null!=b&&this.setSelectionCells(b)};mxGraph.prototype.selectVertices=function(a,b){this.selectCells(!0,!1,a,b)};\nmxGraph.prototype.selectEdges=function(a){this.selectCells(!1,!0,a)};mxGraph.prototype.selectCells=function(a,b,c,d){c=c||this.getDefaultParent();var e=mxUtils.bind(this,function(f){return null!=this.view.getState(f)&&((d||0==this.model.getChildCount(f))&&this.model.isVertex(f)&&a&&!this.model.isEdge(this.model.getParent(f))||this.model.isEdge(f)&&b)});c=this.model.filterDescendants(e,c);null!=c&&this.setSelectionCells(c)};\nmxGraph.prototype.selectCellForEvent=function(a,b){var c=this.isCellSelected(a);this.isToggleEvent(b)?c?this.removeSelectionCell(a):this.addSelectionCell(a):c&&1==this.getSelectionCount()||this.setSelectionCell(a)};mxGraph.prototype.selectCellsForEvent=function(a,b){this.isToggleEvent(b)?this.addSelectionCells(a):this.setSelectionCells(a)};\nmxGraph.prototype.createHandler=function(a){var b=null;if(null!=a)if(this.model.isEdge(a.cell)){b=a.getVisibleTerminalState(!0);var c=a.getVisibleTerminalState(!1),d=this.getCellGeometry(a.cell);b=this.view.getEdgeStyle(a,null!=d?d.points:null,b,c);b=this.createEdgeHandler(a,b)}else b=this.createVertexHandler(a);return b};mxGraph.prototype.createVertexHandler=function(a){return new mxVertexHandler(a)};\nmxGraph.prototype.createEdgeHandler=function(a,b){return b==mxEdgeStyle.Loop||b==mxEdgeStyle.ElbowConnector||b==mxEdgeStyle.SideToSide||b==mxEdgeStyle.TopToBottom?this.createElbowEdgeHandler(a):b==mxEdgeStyle.SegmentConnector||b==mxEdgeStyle.OrthConnector?this.createEdgeSegmentHandler(a):new mxEdgeHandler(a)};mxGraph.prototype.createEdgeSegmentHandler=function(a){return new mxEdgeSegmentHandler(a)};mxGraph.prototype.createElbowEdgeHandler=function(a){return new mxElbowEdgeHandler(a)};\nmxGraph.prototype.addMouseListener=function(a){null==this.mouseListeners&&(this.mouseListeners=[]);this.mouseListeners.push(a)};mxGraph.prototype.removeMouseListener=function(a){if(null!=this.mouseListeners)for(var b=0;b<this.mouseListeners.length;b++)if(this.mouseListeners[b]==a){this.mouseListeners.splice(b,1);break}};\nmxGraph.prototype.updateMouseEvent=function(a,b){if(null==a.graphX||null==a.graphY){var c=mxUtils.convertPoint(this.container,a.getX(),a.getY());a.graphX=c.x-this.panDx;a.graphY=c.y-this.panDy;null==a.getCell()&&this.isMouseDown&&b==mxEvent.MOUSE_MOVE&&(a.state=this.view.getState(this.getCellAt(c.x,c.y,null,null,null,function(d){return null==d.shape||d.shape.paintBackground!=mxRectangleShape.prototype.paintBackground||\"1\"==mxUtils.getValue(d.style,mxConstants.STYLE_POINTER_EVENTS,\"1\")||null!=d.shape.fill&&\nd.shape.fill!=mxConstants.NONE})))}return a};mxGraph.prototype.getStateForTouchEvent=function(a){var b=mxEvent.getClientX(a);a=mxEvent.getClientY(a);b=mxUtils.convertPoint(this.container,b,a);return this.view.getState(this.getCellAt(b.x,b.y))};\nmxGraph.prototype.isEventIgnored=function(a,b,c){var d=mxEvent.isMouseEvent(b.getEvent()),e=!1;b.getEvent()==this.lastEvent?e=!0:this.lastEvent=b.getEvent();if(null!=this.eventSource&&a!=mxEvent.MOUSE_MOVE)mxEvent.removeGestureListeners(this.eventSource,null,this.mouseMoveRedirect,this.mouseUpRedirect),this.eventSource=this.mouseUpRedirect=this.mouseMoveRedirect=null;else if(!mxClient.IS_GC&&null!=this.eventSource&&b.getSource()!=this.eventSource)e=!0;else if(mxClient.IS_TOUCH&&a==mxEvent.MOUSE_DOWN&&\n!d&&!mxEvent.isPenEvent(b.getEvent())){this.eventSource=b.getSource();var f=null;!mxClient.IS_ANDROID&&mxClient.IS_LINUX&&mxClient.IS_GC||(f=b.getEvent().pointerId);this.mouseMoveRedirect=mxUtils.bind(this,function(g){null!=f&&g.pointerId!=f||this.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(g,this.getStateForTouchEvent(g)))});this.mouseUpRedirect=mxUtils.bind(this,function(g){this.fireMouseEvent(mxEvent.MOUSE_UP,new mxMouseEvent(g,this.getStateForTouchEvent(g)));f=null});mxEvent.addGestureListeners(this.eventSource,\nnull,this.mouseMoveRedirect,this.mouseUpRedirect)}this.isSyntheticEventIgnored(a,b,c)&&(e=!0);if(!mxEvent.isPopupTrigger(this.lastEvent)&&a!=mxEvent.MOUSE_MOVE&&2==this.lastEvent.detail)return!0;a==mxEvent.MOUSE_UP&&this.isMouseDown?this.isMouseDown=!1:a!=mxEvent.MOUSE_DOWN||this.isMouseDown?!e&&((!mxClient.IS_FF||a!=mxEvent.MOUSE_MOVE)&&this.isMouseDown&&this.isMouseTrigger!=d||a==mxEvent.MOUSE_DOWN&&this.isMouseDown||a==mxEvent.MOUSE_UP&&!this.isMouseDown)&&(e=!0):(this.isMouseDown=!0,this.isMouseTrigger=\nd);e||a!=mxEvent.MOUSE_DOWN||(this.lastMouseX=b.getX(),this.lastMouseY=b.getY());return e};mxGraph.prototype.isSyntheticEventIgnored=function(a,b,c){c=!1;b=mxEvent.isMouseEvent(b.getEvent());this.ignoreMouseEvents&&b&&a!=mxEvent.MOUSE_MOVE?(this.ignoreMouseEvents=a!=mxEvent.MOUSE_UP,c=!0):mxClient.IS_FF&&!b&&a==mxEvent.MOUSE_UP&&(this.ignoreMouseEvents=!0);return c};\nmxGraph.prototype.isEventSourceIgnored=function(a,b){var c=b.getSource(),d=null!=c.nodeName?c.nodeName.toLowerCase():\"\";b=!mxEvent.isMouseEvent(b.getEvent())||mxEvent.isLeftMouseButton(b.getEvent());return a==mxEvent.MOUSE_DOWN&&b&&(\"select\"==d||\"option\"==d||\"input\"==d&&\"checkbox\"!=c.type&&\"radio\"!=c.type&&\"button\"!=c.type&&\"submit\"!=c.type&&\"file\"!=c.type)};mxGraph.prototype.getEventState=function(a){return a};\nmxGraph.prototype.isPointerEventIgnored=function(a,b){var c=!1;if(mxClient.IS_ANDROID||!mxClient.IS_LINUX||!mxClient.IS_GC){var d=b.getEvent().pointerId;a==mxEvent.MOUSE_DOWN?null!=this.currentPointerId&&this.currentPointerId!=d?c=!0:null==this.currentPointerId&&(this.currentPointerId=b.getEvent().pointerId):a==mxEvent.MOUSE_MOVE?null!=this.currentPointerId&&this.currentPointerId!=d&&(c=!0):a==mxEvent.MOUSE_UP&&(this.currentPointerId=null)}return c};\nmxGraph.prototype.fireMouseEvent=function(a,b,c){if(this.isEventSourceIgnored(a,b))null!=this.tooltipHandler&&this.tooltipHandler.hide();else if(this.isPointerEventIgnored(a,b))this.tapAndHoldValid=!1;else{null==c&&(c=this);b=this.updateMouseEvent(b,a);if(!this.nativeDblClickEnabled&&!mxEvent.isPopupTrigger(b.getEvent())||this.doubleTapEnabled&&mxClient.IS_TOUCH&&(mxEvent.isTouchEvent(b.getEvent())||mxEvent.isPenEvent(b.getEvent()))){var d=(new Date).getTime();if(a==mxEvent.MOUSE_DOWN)if(null!=this.lastTouchEvent&&\nthis.lastTouchEvent!=b.getEvent()&&d-this.lastTouchTime<this.doubleTapTimeout&&Math.abs(this.lastTouchX-b.getX())<this.doubleTapTolerance&&Math.abs(this.lastTouchY-b.getY())<this.doubleTapTolerance&&2>this.doubleClickCounter){if(this.doubleClickCounter++,d=!1,a==mxEvent.MOUSE_UP?b.getCell()==this.lastTouchCell&&null!=this.lastTouchCell&&(this.lastTouchTime=0,d=this.lastTouchCell,this.lastTouchCell=null,this.dblClick(b.getEvent(),d),d=!0):(this.fireDoubleClick=!0,this.lastTouchTime=0),d){mxEvent.consume(b.getEvent());\nreturn}}else{if(null==this.lastTouchEvent||this.lastTouchEvent!=b.getEvent())this.lastTouchCell=b.getCell(),this.lastTouchX=b.getX(),this.lastTouchY=b.getY(),this.lastTouchTime=d,this.lastTouchEvent=b.getEvent(),this.doubleClickCounter=0}else if((this.isMouseDown||a==mxEvent.MOUSE_UP)&&this.fireDoubleClick){this.fireDoubleClick=!1;d=this.lastTouchCell;this.lastTouchCell=null;this.isMouseDown=!1;(null!=d||(mxEvent.isTouchEvent(b.getEvent())||mxEvent.isPenEvent(b.getEvent()))&&(mxClient.IS_GC||mxClient.IS_SF))&&\nMath.abs(this.lastTouchX-b.getX())<this.doubleTapTolerance&&Math.abs(this.lastTouchY-b.getY())<this.doubleTapTolerance?this.dblClick(b.getEvent(),d):mxEvent.consume(b.getEvent());return}}if(!this.isEventIgnored(a,b,c)){b.state=this.getEventState(b.getState());this.fireEvent(new mxEventObject(mxEvent.FIRE_MOUSE_EVENT,\"eventName\",a,\"event\",b));if(mxClient.IS_OP||mxClient.IS_SF||mxClient.IS_GC||mxClient.IS_IE11||mxClient.IS_IE&&mxClient.IS_SVG||b.getEvent().target!=this.container){if(a==mxEvent.MOUSE_MOVE&&\nthis.isMouseDown&&this.autoScroll&&!mxEvent.isMultiTouchEvent(b.getEvent))this.scrollPointToVisible(b.getGraphX(),b.getGraphY(),this.autoExtend);else if(a==mxEvent.MOUSE_UP&&this.ignoreScrollbars&&this.translateToScrollPosition&&(0!=this.container.scrollLeft||0!=this.container.scrollTop)){d=this.view.scale;var e=this.view.translate;this.view.setTranslate(e.x-this.container.scrollLeft/d,e.y-this.container.scrollTop/d);this.container.scrollLeft=0;this.container.scrollTop=0}if(null!=this.mouseListeners)for(d=\n[c,b],b.getEvent().preventDefault||(b.getEvent().returnValue=!0),e=0;e<this.mouseListeners.length;e++){var f=this.mouseListeners[e];a==mxEvent.MOUSE_DOWN?f.mouseDown.apply(f,d):a==mxEvent.MOUSE_MOVE?f.mouseMove.apply(f,d):a==mxEvent.MOUSE_UP&&f.mouseUp.apply(f,d)}a==mxEvent.MOUSE_UP&&this.click(b)}(mxEvent.isTouchEvent(b.getEvent())||mxEvent.isPenEvent(b.getEvent()))&&a==mxEvent.MOUSE_DOWN&&this.tapAndHoldEnabled&&!this.tapAndHoldInProgress?(this.tapAndHoldInProgress=!0,this.initialTouchX=b.getGraphX(),\nthis.initialTouchY=b.getGraphY(),this.tapAndHoldThread&&window.clearTimeout(this.tapAndHoldThread),this.tapAndHoldThread=window.setTimeout(mxUtils.bind(this,function(){this.tapAndHoldValid&&this.tapAndHold(b);this.tapAndHoldValid=this.tapAndHoldInProgress=!1}),this.tapAndHoldDelay),this.tapAndHoldValid=!0):a==mxEvent.MOUSE_UP?this.tapAndHoldValid=this.tapAndHoldInProgress=!1:this.tapAndHoldValid&&(this.tapAndHoldValid=Math.abs(this.initialTouchX-b.getGraphX())<this.tolerance&&Math.abs(this.initialTouchY-\nb.getGraphY())<this.tolerance);a==mxEvent.MOUSE_DOWN&&this.isEditing()&&!this.cellEditor.isEventSource(b.getEvent())&&this.stopEditing(!this.isInvokesStopCellEditing());this.consumeMouseEvent(a,b,c)}}};mxGraph.prototype.consumeMouseEvent=function(a,b,c){this.fireEvent(new mxEventObject(mxEvent.CONSUME_MOUSE_EVENT,\"eventName\",a,\"event\",b));a==mxEvent.MOUSE_DOWN&&mxEvent.isTouchEvent(b.getEvent())&&b.consume(!1)};\nmxGraph.prototype.fireGestureEvent=function(a,b){this.lastTouchTime=0;this.fireEvent(new mxEventObject(mxEvent.GESTURE,\"event\",a,\"cell\",b))};\nmxGraph.prototype.destroy=function(){this.destroyed||(this.destroyed=!0,null!=this.tooltipHandler&&this.tooltipHandler.destroy(),null!=this.selectionCellsHandler&&this.selectionCellsHandler.destroy(),null!=this.panningHandler&&this.panningHandler.destroy(),null!=this.popupMenuHandler&&this.popupMenuHandler.destroy(),null!=this.connectionHandler&&this.connectionHandler.destroy(),null!=this.graphHandler&&this.graphHandler.destroy(),null!=this.cellEditor&&this.cellEditor.destroy(),null!=this.view&&this.view.destroy(),\nnull!=this.model&&null!=this.graphModelChangeListener&&(this.model.removeListener(this.graphModelChangeListener),this.graphModelChangeListener=null),this.container=null)};function mxCellOverlay(a,b,c,d,e,f){this.image=a;this.tooltip=b;this.align=null!=c?c:this.align;this.verticalAlign=null!=d?d:this.verticalAlign;this.offset=null!=e?e:new mxPoint;this.cursor=null!=f?f:\"help\"}mxCellOverlay.prototype=new mxEventSource;mxCellOverlay.prototype.constructor=mxCellOverlay;mxCellOverlay.prototype.image=null;\nmxCellOverlay.prototype.tooltip=null;mxCellOverlay.prototype.align=mxConstants.ALIGN_RIGHT;mxCellOverlay.prototype.verticalAlign=mxConstants.ALIGN_BOTTOM;mxCellOverlay.prototype.offset=null;mxCellOverlay.prototype.cursor=null;mxCellOverlay.prototype.defaultOverlap=.5;\nmxCellOverlay.prototype.getBounds=function(a){var b=a.view.graph.getModel().isEdge(a.cell),c=a.view.scale,d=this.image.width,e=this.image.height;if(b)if(b=a.absolutePoints,1==b.length%2)b=b[Math.floor(b.length/2)];else{var f=b.length/2;a=b[f-1];b=b[f];b=new mxPoint(a.x+(b.x-a.x)/2,a.y+(b.y-a.y)/2)}else b=new mxPoint,b.x=this.align==mxConstants.ALIGN_LEFT?a.x:this.align==mxConstants.ALIGN_CENTER?a.x+a.width/2:a.x+a.width,b.y=this.verticalAlign==mxConstants.ALIGN_TOP?a.y:this.verticalAlign==mxConstants.ALIGN_MIDDLE?\na.y+a.height/2:a.y+a.height;return new mxRectangle(Math.round(b.x-(d*this.defaultOverlap-this.offset.x)*c),Math.round(b.y-(e*this.defaultOverlap-this.offset.y)*c),d*c,e*c)};mxCellOverlay.prototype.toString=function(){return this.tooltip};function mxOutline(a,b){this.source=a;null!=b&&this.init(b)}mxOutline.prototype.source=null;mxOutline.prototype.container=null;mxOutline.prototype.enabled=!0;mxOutline.prototype.suspended=!1;mxOutline.prototype.border=14;\nmxOutline.prototype.opacity=mxClient.IS_IE11?.9:.7;\nmxOutline.prototype.init=function(a){this.container=a;this.updateHandler=mxUtils.bind(this,function(b,c){this.update(!0)});this.source.getModel().addListener(mxEvent.CHANGE,this.updateHandler);this.source.addListener(mxEvent.REFRESH,this.updateHandler);a=this.source.getView();a.addListener(mxEvent.UP,this.updateHandler);a.addListener(mxEvent.DOWN,this.updateHandler);a.addListener(mxEvent.SCALE,this.updateHandler);a.addListener(mxEvent.TRANSLATE,this.updateHandler);a.addListener(mxEvent.SCALE_AND_TRANSLATE,\nthis.updateHandler);this.scrollHandler=mxUtils.bind(this,function(b,c){this.update(!1)});mxEvent.addListener(this.source.container,\"scroll\",this.scrollHandler);this.source.addListener(mxEvent.PAN,this.scrollHandler);this.update(!0)};mxOutline.prototype.isEnabled=function(){return this.enabled};mxOutline.prototype.setEnabled=function(a){this.enabled=a};mxOutline.prototype.isSuspended=function(){return this.suspended};mxOutline.prototype.setSuspended=function(a){this.suspended=a;this.update(!0)};\nmxOutline.prototype.isScrolling=function(){return this.source.useScrollbarsForPanning&&mxUtils.hasScrollbars(this.source.container)};\nmxOutline.prototype.createSvg=function(){var a=document.createElementNS(mxConstants.NS_SVG,\"svg\");a.style.position=\"absolute\";a.style.left=\"0px\";a.style.top=\"0px\";a.style.width=\"100%\";a.style.height=\"100%\";a.style.display=\"block\";a.style.padding=this.border+\"px\";a.style.boxSizing=\"border-box\";a.style.overflow=\"visible\";a.style.cursor=\"default\";a.setAttribute(\"shape-rendering\",\"optimizeSpeed\");a.setAttribute(\"image-rendering\",\"optimizeSpeed\");return a};\nmxOutline.prototype.addGestureListeners=function(a){var b=null,c=0,d=0,e=1,f=mxUtils.bind(this,function(l){if(this.isEnabled()){b=new mxPoint(mxEvent.getClientX(l),mxEvent.getClientY(l));var m=a.clientWidth-2*this.border,n=a.clientHeight-2*this.border,p=this.getViewBox();e=Math.max(p.width/m,p.height/n);if(mxEvent.getSource(l)!=this.viewport)if(this.isScrolling()){m-=p.width/e;n-=p.height/e;var q=this.svg.getBoundingClientRect();this.source.container.scrollLeft=p.x-m*e/2+(b.x-this.border-q.left)*\ne;this.source.container.scrollTop=p.y-n*e/2+(b.y-this.border-q.top)*e}else p=this.source.view.translate,n=this.viewport.getBoundingClientRect(),m=(mxEvent.getClientX(l)-n.left)*e/this.source.view.scale,n=(mxEvent.getClientY(l)-n.top)*e/this.source.view.scale,this.source.getView().setTranslate(p.x-m,p.y-n),this.source.panGraph(0,0);mxEvent.addGestureListeners(document,null,g,k);c=this.source.container.scrollLeft;d=this.source.container.scrollTop;mxEvent.consume(l)}}),g=mxUtils.bind(this,function(l){this.isEnabled()&&\nnull!=b&&(this.isScrolling()?(this.source.container.scrollLeft=c+(mxEvent.getClientX(l)-b.x)*e,this.source.container.scrollTop=d+(mxEvent.getClientY(l)-b.y)*e):this.source.panGraph((b.x-mxEvent.getClientX(l))*e,(b.y-mxEvent.getClientY(l))*e),mxEvent.consume(l))}),k=mxUtils.bind(this,function(l){if(this.isEnabled()&&null!=b){if(!this.isScrolling()){var m=(mxEvent.getClientX(l)-b.x)*e/this.source.view.scale,n=(mxEvent.getClientY(l)-b.y)*e/this.source.view.scale,p=this.source.view.translate;this.source.getView().setTranslate(p.x-\nm,p.y-n);this.source.panGraph(0,0)}mxEvent.removeGestureListeners(document,null,g,k);mxEvent.consume(l);b=null}});mxEvent.addGestureListeners(a,f,g,k)};mxOutline.prototype.getViewBox=function(){return this.source.getGraphBounds()};\nmxOutline.prototype.updateSvg=function(){null==this.svg&&(this.svg=this.createSvg(),this.addGestureListeners(this.svg),this.container.appendChild(this.svg));var a=this.getViewBox();this.svg.setAttribute(\"viewBox\",Math.round(a.x)+\" \"+Math.round(a.y)+\" \"+Math.round(a.width)+\" \"+Math.round(a.height));a=this.source.background;this.svg.style.backgroundColor=a==mxConstants.NONE?\"\":a;this.updateDrawPane()};\nmxOutline.prototype.updateDrawPane=function(){null!=this.drawPane&&this.drawPane.parentNode.removeChild(this.drawPane);this.drawPane=this.source.view.getDrawPane().cloneNode(!0);this.drawPane.style.opacity=this.opacity;this.processSvg(this.drawPane);null!=this.viewport?this.svg.insertBefore(this.drawPane,this.viewport):this.svg.appendChild(this.drawPane)};\nmxOutline.prototype.processSvg=function(a){var b=mxClient.IS_IE11?Math.max(1,this.source.view.scale):this.source.view.scale;Array.prototype.slice.call(a.getElementsByTagName(\"*\")).forEach(mxUtils.bind(this,function(c){if(\"text\"!=c.nodeName&&\"foreignObject\"!=c.nodeName&&\"hidden\"!=c.getAttribute(\"visibility\")&&c instanceof SVGElement){var d=parseInt(c.getAttribute(\"stroke-width\")||1);isNaN(d)||c.setAttribute(\"stroke-width\",Math.max(mxClient.IS_IE11?4:1,d/(5*b)));c.setAttribute(\"vector-effect\",\"non-scaling-stroke\");\nc.style.cursor=\"\"}else c.parentNode.removeChild(c)}))};\nmxOutline.prototype.updateViewport=function(){if(null!=this.svg){null==this.viewport&&(this.viewport=this.createViewport(),this.svg.appendChild(this.viewport));var a=this.source.container;a=new mxRectangle(a.scrollLeft,a.scrollTop,a.clientWidth,a.clientHeight);this.isScrolling()||(a.x=-this.source.panDx,a.y=-this.source.panDy);this.viewport.setAttribute(\"x\",a.x);this.viewport.setAttribute(\"y\",a.y);this.viewport.setAttribute(\"width\",a.width);this.viewport.setAttribute(\"height\",a.height)}};\nmxOutline.prototype.createViewport=function(){var a=this.svg.ownerDocument.createElementNS(mxConstants.NS_SVG,\"rect\");a.setAttribute(\"stroke-width\",mxClient.IS_IE11?\"12\":\"3\");a.setAttribute(\"stroke\",HoverIcons.prototype.arrowFill);a.setAttribute(\"fill\",HoverIcons.prototype.arrowFill);a.setAttribute(\"vector-effect\",\"non-scaling-stroke\");a.setAttribute(\"fill-opacity\",.2);a.style.cursor=\"move\";return a};\nmxOutline.prototype.update=function(a){null!=this.source&&null!=this.source.container&&(null!=this.thread&&(window.clearTimeout(this.thread),this.thread=null),this.fullUpdate=this.fullUpdate||a,this.thread=window.setTimeout(mxUtils.bind(this,function(){this.isSuspended()||(this.fullUpdate&&this.updateSvg(),this.updateViewport());this.thread=this.fullUpdate=null}),this.isScrolling()?10:0))};\nmxOutline.prototype.destroy=function(){null!=this.svg&&(this.svg.parentNode.removeChild(this.svg),this.svg=null);null!=this.source&&(this.source.removeListener(this.updateHandler),this.source.getView().removeListener(this.updateHandler),this.source.getModel().removeListener(this.updateHandler),this.source.removeListener(mxEvent.PAN,this.scrollHandler),mxEvent.removeListener(this.source.container,\"scroll\",this.scrollHandler),this.source=null)};\nfunction mxMultiplicity(a,b,c,d,e,f,g,k,l,m){this.source=a;this.type=b;this.attr=c;this.value=d;this.min=null!=e?e:0;this.max=null!=f?f:\"n\";this.validNeighbors=g;this.countError=mxResources.get(k)||k;this.typeError=mxResources.get(l)||l;this.validNeighborsAllowed=null!=m?m:!0}mxMultiplicity.prototype.type=null;mxMultiplicity.prototype.attr=null;mxMultiplicity.prototype.value=null;mxMultiplicity.prototype.source=null;mxMultiplicity.prototype.min=null;mxMultiplicity.prototype.max=null;\nmxMultiplicity.prototype.validNeighbors=null;mxMultiplicity.prototype.validNeighborsAllowed=!0;mxMultiplicity.prototype.countError=null;mxMultiplicity.prototype.typeError=null;\nmxMultiplicity.prototype.check=function(a,b,c,d,e,f){var g=\"\";if(this.source&&this.checkTerminal(a,c,b)||!this.source&&this.checkTerminal(a,d,b))null!=this.countError&&(this.source&&(0==this.max||e>=this.max)||!this.source&&(0==this.max||f>=this.max))&&(g+=this.countError+\"\\n\"),null!=this.validNeighbors&&null!=this.typeError&&0<this.validNeighbors.length&&(this.checkNeighbors(a,b,c,d)||(g+=this.typeError+\"\\n\"));return 0<g.length?g:null};\nmxMultiplicity.prototype.checkNeighbors=function(a,b,c,d){b=a.model.getValue(c);d=a.model.getValue(d);c=!this.validNeighborsAllowed;for(var e=this.validNeighbors,f=0;f<e.length;f++)if(this.source&&this.checkType(a,d,e[f])){c=this.validNeighborsAllowed;break}else if(!this.source&&this.checkType(a,b,e[f])){c=this.validNeighborsAllowed;break}return c};mxMultiplicity.prototype.checkTerminal=function(a,b,c){b=a.model.getValue(b);return this.checkType(a,b,this.type,this.attr,this.value)};\nmxMultiplicity.prototype.checkType=function(a,b,c,d,e){return null!=b?isNaN(b.nodeType)?b==c:mxUtils.isNode(b,c,d,e):!1};\nfunction mxLayoutManager(a){this.undoHandler=mxUtils.bind(this,function(b,c){this.isEnabled()&&this.beforeUndo(c.getProperty(\"edit\"))});this.moveHandler=mxUtils.bind(this,function(b,c){this.isEnabled()&&this.cellsMoved(c.getProperty(\"cells\"),c.getProperty(\"event\"))});this.resizeHandler=mxUtils.bind(this,function(b,c){this.isEnabled()&&this.cellsResized(c.getProperty(\"cells\"),c.getProperty(\"bounds\"),c.getProperty(\"previous\"))});this.setGraph(a)}mxLayoutManager.prototype=new mxEventSource;\nmxLayoutManager.prototype.constructor=mxLayoutManager;mxLayoutManager.prototype.graph=null;mxLayoutManager.prototype.bubbling=!0;mxLayoutManager.prototype.enabled=!0;mxLayoutManager.prototype.undoHandler=null;mxLayoutManager.prototype.moveHandler=null;mxLayoutManager.prototype.resizeHandler=null;mxLayoutManager.prototype.isEnabled=function(){return this.enabled};mxLayoutManager.prototype.setEnabled=function(a){this.enabled=a};mxLayoutManager.prototype.isBubbling=function(){return this.bubbling};\nmxLayoutManager.prototype.setBubbling=function(a){this.bubbling=a};mxLayoutManager.prototype.getGraph=function(){return this.graph};\nmxLayoutManager.prototype.setGraph=function(a){if(null!=this.graph){var b=this.graph.getModel();b.removeListener(this.undoHandler);this.graph.removeListener(this.moveHandler);this.graph.removeListener(this.resizeHandler)}this.graph=a;null!=this.graph&&(b=this.graph.getModel(),b.addListener(mxEvent.BEFORE_UNDO,this.undoHandler),this.graph.addListener(mxEvent.MOVE_CELLS,this.moveHandler),this.graph.addListener(mxEvent.RESIZE_CELLS,this.resizeHandler))};\nmxLayoutManager.prototype.hasLayout=function(a){return null!=this.getLayout(a,mxEvent.LAYOUT_CELLS)};mxLayoutManager.prototype.getLayout=function(a,b){return null};mxLayoutManager.prototype.beforeUndo=function(a){this.executeLayoutForCells(this.getCellsForChanges(a.changes))};\nmxLayoutManager.prototype.cellsMoved=function(a,b){if(null!=a&&null!=b){b=mxUtils.convertPoint(this.getGraph().container,mxEvent.getClientX(b),mxEvent.getClientY(b));for(var c=this.getGraph().getModel(),d=0;d<a.length;d++){var e=this.getLayout(c.getParent(a[d]),mxEvent.MOVE_CELLS);null!=e&&e.moveCell(a[d],b.x,b.y)}}};\nmxLayoutManager.prototype.cellsResized=function(a,b,c){if(null!=a&&null!=b)for(var d=this.getGraph().getModel(),e=0;e<a.length;e++){var f=this.getLayout(d.getParent(a[e]),mxEvent.RESIZE_CELLS);null!=f&&f.resizeCell(a[e],b[e],c[e])}};mxLayoutManager.prototype.getCellsForChanges=function(a){for(var b=[],c=0;c<a.length;c++){var d=a[c];if(d instanceof mxRootChange)return[];b=b.concat(this.getCellsForChange(d))}return b};\nmxLayoutManager.prototype.getCellsForChange=function(a){return a instanceof mxChildChange?this.addCellsWithLayout(a.child,this.addCellsWithLayout(a.previous)):a instanceof mxValueChange||a instanceof mxTerminalChange||a instanceof mxGeometryChange||a instanceof mxVisibleChange||a instanceof mxStyleChange?this.addCellsWithLayout(a.cell):[]};mxLayoutManager.prototype.addCellsWithLayout=function(a,b){return this.addDescendantsWithLayout(a,this.addAncestorsWithLayout(a,b))};\nmxLayoutManager.prototype.addAncestorsWithLayout=function(a,b){b=null!=b?b:[];if(null!=a&&(this.hasLayout(a)&&b.push(a),this.isBubbling())){var c=this.getGraph().getModel();this.addAncestorsWithLayout(c.getParent(a),b)}return b};mxLayoutManager.prototype.addDescendantsWithLayout=function(a,b){b=null!=b?b:[];if(null!=a&&this.hasLayout(a))for(var c=this.getGraph().getModel(),d=0;d<c.getChildCount(a);d++){var e=c.getChildAt(a,d);this.hasLayout(e)&&(b.push(e),this.addDescendantsWithLayout(e,b))}return b};\nmxLayoutManager.prototype.executeLayoutForCells=function(a){var b=this.getGraph().getModel();b.beginUpdate();try{var c=mxUtils.sortCells(a,!1);this.layoutCells(c,!0);this.layoutCells(c.reverse(),!1)}finally{b.endUpdate()}};\nmxLayoutManager.prototype.layoutCells=function(a,b){if(0<a.length){var c=this.getGraph().getModel();c.beginUpdate();try{for(var d=null,e=0;e<a.length;e++)a[e]!=c.getRoot()&&a[e]!=d&&(this.executeLayout(a[e],b),d=a[e]);this.fireEvent(new mxEventObject(mxEvent.LAYOUT_CELLS,\"cells\",a))}finally{c.endUpdate()}}};mxLayoutManager.prototype.executeLayout=function(a,b){b=this.getLayout(a,b?mxEvent.BEGIN_UPDATE:mxEvent.END_UPDATE);null!=b&&b.execute(a)};mxLayoutManager.prototype.destroy=function(){this.setGraph(null)};\nfunction mxSwimlaneManager(a,b,c,d){this.horizontal=null!=b?b:!0;this.addEnabled=null!=c?c:!0;this.resizeEnabled=null!=d?d:!0;this.addHandler=mxUtils.bind(this,function(e,f){this.isEnabled()&&this.isAddEnabled()&&this.cellsAdded(f.getProperty(\"cells\"))});this.resizeHandler=mxUtils.bind(this,function(e,f){this.isEnabled()&&this.isResizeEnabled()&&this.cellsResized(f.getProperty(\"cells\"))});this.setGraph(a)}mxSwimlaneManager.prototype=new mxEventSource;mxSwimlaneManager.prototype.constructor=mxSwimlaneManager;\nmxSwimlaneManager.prototype.graph=null;mxSwimlaneManager.prototype.enabled=!0;mxSwimlaneManager.prototype.horizontal=!0;mxSwimlaneManager.prototype.addEnabled=!0;mxSwimlaneManager.prototype.resizeEnabled=!0;mxSwimlaneManager.prototype.addHandler=null;mxSwimlaneManager.prototype.resizeHandler=null;mxSwimlaneManager.prototype.isEnabled=function(){return this.enabled};mxSwimlaneManager.prototype.setEnabled=function(a){this.enabled=a};mxSwimlaneManager.prototype.isHorizontal=function(){return this.horizontal};\nmxSwimlaneManager.prototype.setHorizontal=function(a){this.horizontal=a};mxSwimlaneManager.prototype.isAddEnabled=function(){return this.addEnabled};mxSwimlaneManager.prototype.setAddEnabled=function(a){this.addEnabled=a};mxSwimlaneManager.prototype.isResizeEnabled=function(){return this.resizeEnabled};mxSwimlaneManager.prototype.setResizeEnabled=function(a){this.resizeEnabled=a};mxSwimlaneManager.prototype.getGraph=function(){return this.graph};\nmxSwimlaneManager.prototype.setGraph=function(a){null!=this.graph&&(this.graph.removeListener(this.addHandler),this.graph.removeListener(this.resizeHandler));this.graph=a;null!=this.graph&&(this.graph.addListener(mxEvent.ADD_CELLS,this.addHandler),this.graph.addListener(mxEvent.CELLS_RESIZED,this.resizeHandler))};mxSwimlaneManager.prototype.isSwimlaneIgnored=function(a){return!this.getGraph().isSwimlane(a)};\nmxSwimlaneManager.prototype.isCellHorizontal=function(a){return this.graph.isSwimlane(a)?(a=this.graph.getCellStyle(a),1==mxUtils.getValue(a,mxConstants.STYLE_HORIZONTAL,1)):!this.isHorizontal()};mxSwimlaneManager.prototype.cellsAdded=function(a){if(null!=a){var b=this.getGraph().getModel();b.beginUpdate();try{for(var c=0;c<a.length;c++)this.isSwimlaneIgnored(a[c])||this.swimlaneAdded(a[c])}finally{b.endUpdate()}}};\nmxSwimlaneManager.prototype.swimlaneAdded=function(a){for(var b=this.getGraph().getModel(),c=b.getParent(a),d=b.getChildCount(c),e=null,f=0;f<d;f++){var g=b.getChildAt(c,f);if(g!=a&&!this.isSwimlaneIgnored(g)&&(e=b.getGeometry(g),null!=e))break}null!=e&&(b=null!=c?this.isCellHorizontal(c):this.horizontal,this.resizeSwimlane(a,e.width,e.height,b))};\nmxSwimlaneManager.prototype.cellsResized=function(a){if(null!=a){var b=this.getGraph().getModel();b.beginUpdate();try{for(var c=0;c<a.length;c++)if(!this.isSwimlaneIgnored(a[c])){var d=b.getGeometry(a[c]);if(null!=d){for(var e=new mxRectangle(0,0,d.width,d.height),f=a[c],g=f;null!=g;){f=g;g=b.getParent(g);var k=this.graph.isSwimlane(g)?this.graph.getStartSize(g):new mxRectangle;e.width+=k.width;e.height+=k.height}var l=null!=g?this.isCellHorizontal(g):this.horizontal;this.resizeSwimlane(f,e.width,\ne.height,l)}}}finally{b.endUpdate()}}};\nmxSwimlaneManager.prototype.resizeSwimlane=function(a,b,c,d){var e=this.getGraph().getModel();e.beginUpdate();try{var f=this.isCellHorizontal(a);if(!this.isSwimlaneIgnored(a)){var g=e.getGeometry(a);null!=g&&(d&&g.height!=c||!d&&g.width!=b)&&(g=g.clone(),d?g.height=c:g.width=b,e.setGeometry(a,g))}var k=this.graph.isSwimlane(a)?this.graph.getStartSize(a):new mxRectangle;b-=k.width;c-=k.height;var l=e.getChildCount(a);for(d=0;d<l;d++){var m=e.getChildAt(a,d);this.resizeSwimlane(m,b,c,f)}}finally{e.endUpdate()}};\nmxSwimlaneManager.prototype.destroy=function(){this.setGraph(null)};\nfunction mxTemporaryCellStates(a,b,c,d,e,f){b=null!=b?b:1;this.view=a;this.oldValidateCellState=a.validateCellState;this.oldBounds=a.getGraphBounds();this.oldStates=a.getStates();this.oldScale=a.getScale();this.oldDoRedrawShape=a.graph.cellRenderer.doRedrawShape;var g=this;null!=e&&(a.graph.cellRenderer.doRedrawShape=function(m){var n=m.shape.paint;m.shape.paint=function(p){var q=e(m);null!=q&&p.setLink(q,null!=f?f(m):null);n.apply(this,arguments);null!=q&&p.setLink(null)};g.oldDoRedrawShape.apply(a.graph.cellRenderer,\narguments);m.shape.paint=n});a.validateCellState=function(m,n){return null==m||null==d||d(m)?g.oldValidateCellState.apply(a,arguments):null};a.setStates(new mxDictionary);a.setScale(b);if(null!=c){a.resetValidationState();b=null;for(var k=0;k<c.length;k++){var l=a.getBoundingBox(a.validateCellState(a.validateCell(c[k])));null==b?b=l:b.add(l)}a.setGraphBounds(b||new mxRectangle)}}mxTemporaryCellStates.prototype.view=null;mxTemporaryCellStates.prototype.oldStates=null;\nmxTemporaryCellStates.prototype.oldBounds=null;mxTemporaryCellStates.prototype.oldScale=null;mxTemporaryCellStates.prototype.destroy=function(){this.view.setScale(this.oldScale);this.view.setStates(this.oldStates);this.view.setGraphBounds(this.oldBounds);this.view.validateCellState=this.oldValidateCellState;this.view.graph.cellRenderer.doRedrawShape=this.oldDoRedrawShape};function mxCellStatePreview(a){this.deltas=new mxDictionary;this.graph=a}mxCellStatePreview.prototype.graph=null;\nmxCellStatePreview.prototype.deltas=null;mxCellStatePreview.prototype.count=0;mxCellStatePreview.prototype.isEmpty=function(){return 0==this.count};mxCellStatePreview.prototype.moveState=function(a,b,c,d,e){d=null!=d?d:!0;e=null!=e?e:!0;var f=this.deltas.get(a.cell);null==f?(f={point:new mxPoint(b,c),state:a},this.deltas.put(a.cell,f),this.count++):d?(f.point.x+=b,f.point.y+=c):(f.point.x=b,f.point.y=c);e&&this.addEdges(a);return f.point};\nmxCellStatePreview.prototype.show=function(a){this.deltas.visit(mxUtils.bind(this,function(b,c){this.translateState(c.state,c.point.x,c.point.y)}));this.deltas.visit(mxUtils.bind(this,function(b,c){this.revalidateState(c.state,c.point.x,c.point.y,a)}))};\nmxCellStatePreview.prototype.translateState=function(a,b,c){if(null!=a){var d=this.graph.getModel();if(d.isVertex(a.cell)){a.view.updateCellState(a);var e=d.getGeometry(a.cell);0==b&&0==c||null==e||e.relative&&null==this.deltas.get(a.cell)||(a.x+=b,a.y+=c)}e=d.getChildCount(a.cell);for(var f=0;f<e;f++)this.translateState(a.view.getState(d.getChildAt(a.cell,f)),b,c)}};\nmxCellStatePreview.prototype.revalidateState=function(a,b,c,d){if(null!=a){var e=this.graph.getModel();e.isEdge(a.cell)&&a.view.updateCellState(a);var f=this.graph.getCellGeometry(a.cell),g=a.view.getState(e.getParent(a.cell));0==b&&0==c||null==f||!f.relative||!e.isVertex(a.cell)||null!=g&&!e.isVertex(g.cell)&&null==this.deltas.get(a.cell)||(a.x+=b,a.y+=c);this.graph.cellRenderer.redraw(a);null!=d&&d(a);f=e.getChildCount(a.cell);for(g=0;g<f;g++)this.revalidateState(this.graph.view.getState(e.getChildAt(a.cell,\ng)),b,c,d)}};mxCellStatePreview.prototype.addEdges=function(a){for(var b=this.graph.getModel(),c=b.getEdgeCount(a.cell),d=0;d<c;d++){var e=a.view.getState(b.getEdgeAt(a.cell,d));null!=e&&this.moveState(e,0,0)}};function mxConnectionConstraint(a,b,c,d,e){this.point=a;this.perimeter=null!=b?b:!0;this.name=c;this.dx=d?d:0;this.dy=e?e:0}mxConnectionConstraint.prototype.point=null;mxConnectionConstraint.prototype.perimeter=null;mxConnectionConstraint.prototype.name=null;\nmxConnectionConstraint.prototype.dx=null;mxConnectionConstraint.prototype.dy=null;\nfunction mxGraphHandler(a){this.graph=a;this.graph.addMouseListener(this);this.panHandler=mxUtils.bind(this,function(){this.suspended||(this.updatePreview(),this.updateHint())});this.graph.addListener(mxEvent.PAN,this.panHandler);this.escapeHandler=mxUtils.bind(this,function(b,c){this.reset()});this.graph.addListener(mxEvent.ESCAPE,this.escapeHandler);this.refreshHandler=mxUtils.bind(this,function(b,c){this.refreshThread&&window.clearTimeout(this.refreshThread);this.refreshThread=window.setTimeout(mxUtils.bind(this,\nfunction(){this.refreshThread=null;if(null!=this.first&&!this.suspended){var d=this.currentDx,e=this.currentDy;this.currentDy=this.currentDx=0;this.updatePreview();this.bounds=this.graph.getView().getBounds(this.cells);this.pBounds=this.getPreviewBounds(this.cells);null!=this.pBounds||this.livePreviewUsed?(this.currentDx=d,this.currentDy=e,this.updatePreview(),this.updateHint(),this.livePreviewUsed&&(this.setHandlesVisibleForCells(this.graph.selectionCellsHandler.getHandledSelectionCells(),!1,!0),\nthis.updatePreview())):this.reset()}}),0)});this.graph.getModel().addListener(mxEvent.CHANGE,this.refreshHandler);this.graph.addListener(mxEvent.REFRESH,this.refreshHandler);this.keyHandler=mxUtils.bind(this,function(b){null==this.graph.container||\"hidden\"==this.graph.container.style.visibility||null==this.first||this.suspended||(b=this.graph.isCloneEvent(b)&&this.graph.isCellsCloneable()&&this.isCloneEnabled(),b!=this.cloning&&(this.cloning=b,this.checkPreview(),this.updatePreview()))});mxEvent.addListener(document,\n\"keydown\",this.keyHandler);mxEvent.addListener(document,\"keyup\",this.keyHandler)}mxGraphHandler.prototype.graph=null;mxGraphHandler.prototype.maxCells=mxClient.IS_IE?20:50;mxGraphHandler.prototype.enabled=!0;mxGraphHandler.prototype.highlightEnabled=!0;mxGraphHandler.prototype.cloneEnabled=!0;mxGraphHandler.prototype.moveEnabled=!0;mxGraphHandler.prototype.guidesEnabled=!1;mxGraphHandler.prototype.handlesVisible=!0;mxGraphHandler.prototype.guide=null;mxGraphHandler.prototype.currentDx=null;\nmxGraphHandler.prototype.currentDy=null;mxGraphHandler.prototype.updateCursor=!0;mxGraphHandler.prototype.selectEnabled=!0;mxGraphHandler.prototype.removeCellsFromParent=!0;mxGraphHandler.prototype.removeEmptyParents=!1;mxGraphHandler.prototype.connectOnDrop=!1;mxGraphHandler.prototype.scrollOnMove=!0;mxGraphHandler.prototype.minimumSize=6;mxGraphHandler.prototype.previewColor=\"black\";mxGraphHandler.prototype.htmlPreview=!1;mxGraphHandler.prototype.shape=null;mxGraphHandler.prototype.scaleGrid=!1;\nmxGraphHandler.prototype.rotationEnabled=!0;mxGraphHandler.prototype.maxLivePreview=0;mxGraphHandler.prototype.allowLivePreview=mxClient.IS_SVG;mxGraphHandler.prototype.isEnabled=function(){return this.enabled};mxGraphHandler.prototype.setEnabled=function(a){this.enabled=a};mxGraphHandler.prototype.isCloneEnabled=function(){return this.cloneEnabled};mxGraphHandler.prototype.setCloneEnabled=function(a){this.cloneEnabled=a};mxGraphHandler.prototype.isMoveEnabled=function(){return this.moveEnabled};\nmxGraphHandler.prototype.setMoveEnabled=function(a){this.moveEnabled=a};mxGraphHandler.prototype.isSelectEnabled=function(){return this.selectEnabled};mxGraphHandler.prototype.setSelectEnabled=function(a){this.selectEnabled=a};mxGraphHandler.prototype.isRemoveCellsFromParent=function(){return this.removeCellsFromParent};mxGraphHandler.prototype.setRemoveCellsFromParent=function(a){this.removeCellsFromParent=a};\nmxGraphHandler.prototype.isPropagateSelectionCell=function(a,b,c){var d=this.graph.model.getParent(a);return b?(b=this.graph.model.isEdge(a)?null:this.graph.getCellGeometry(a),!this.graph.isSiblingSelected(a)&&(null!=b&&b.relative||!this.graph.isSwimlane(d))):(!this.graph.isToggleEvent(c.getEvent())||!this.graph.isSiblingSelected(a)&&!this.graph.isCellSelected(a)&&!this.graph.isSwimlane(d)||this.graph.isCellSelected(d))&&(this.graph.isToggleEvent(c.getEvent())||!this.graph.isCellSelected(d))};\nmxGraphHandler.prototype.getInitialCellForEvent=function(a){var b=a.getState();if(!(this.graph.isToggleEvent(a.getEvent())&&mxEvent.isAltDown(a.getEvent())||null==b||this.graph.isCellSelected(b.cell)))for(var c=this.graph.model,d=this.graph.view.getState(c.getParent(b.cell));null!=d&&!this.graph.isCellSelected(d.cell)&&(c.isVertex(d.cell)||c.isEdge(d.cell))&&this.isPropagateSelectionCell(b.cell,!0,a);)b=d,d=this.graph.view.getState(this.graph.getModel().getParent(b.cell));return null!=b?b.cell:null};\nmxGraphHandler.prototype.isDelayedSelection=function(a,b){if(!this.graph.isToggleEvent(b.getEvent())||!mxEvent.isAltDown(b.getEvent()))for(;null!=a;){if(this.graph.selectionCellsHandler.isHandled(a))return this.graph.cellEditor.getEditingCell()!=a;a=this.graph.model.getParent(a)}return this.graph.isToggleEvent(b.getEvent())&&!mxEvent.isAltDown(b.getEvent())};\nmxGraphHandler.prototype.selectDelayed=function(a){if(!this.graph.popupMenuHandler.isPopupTrigger(a)){var b=a.getCell();null==b&&(b=this.cell);this.selectCellForEvent(b,a)}};\nmxGraphHandler.prototype.selectCellForEvent=function(a,b){var c=this.graph.view.getState(a);if(null!=c){if(!(b.isSource(c.control)||this.graph.isToggleEvent(b.getEvent())&&mxEvent.isAltDown(b.getEvent()))){c=this.graph.getModel();for(var d=c.getParent(a);null!=this.graph.view.getState(d)&&(c.isVertex(d)||c.isEdge(d)&&!this.graph.isToggleEvent(b.getEvent()))&&this.isPropagateSelectionCell(a,!1,b);)a=d,d=c.getParent(a)}this.graph.selectCellForEvent(a,b.getEvent())}return a};\nmxGraphHandler.prototype.consumeMouseEvent=function(a,b){b.consume()};\nmxGraphHandler.prototype.mouseDown=function(a,b){this.mouseDownX=b.getX();this.mouseDownY=b.getY();if(!b.isConsumed()&&this.isEnabled()&&this.graph.isEnabled()&&null!=b.getState()&&!mxEvent.isMultiTouchEvent(b.getEvent())&&(a=this.getInitialCellForEvent(b),this.delayedSelection=this.isDelayedSelection(a,b),this.cell=null,this.isSelectEnabled()&&!this.delayedSelection&&this.graph.selectCellForEvent(a,b.getEvent()),this.isMoveEnabled())){var c=this.graph.model,d=c.getGeometry(a);this.graph.isCellMovable(a)&&\n(!c.isEdge(a)||1<this.graph.getSelectionCount()||null!=d.points&&0<d.points.length||null==c.getTerminal(a,!0)||null==c.getTerminal(a,!1)||this.graph.allowDanglingEdges||this.graph.isCloneEvent(b.getEvent())&&this.graph.isCellsCloneable())?this.start(a,b.getX(),b.getY()):this.delayedSelection&&(this.cell=a);this.cellWasClicked=!0;this.consumeMouseEvent(mxEvent.MOUSE_DOWN,b)}};\nmxGraphHandler.prototype.getGuideStates=function(){var a=this.graph.getDefaultParent(),b=this.graph.getModel(),c=mxUtils.bind(this,function(d){return null!=this.graph.view.getState(d)&&b.isVertex(d)&&null!=b.getGeometry(d)&&!b.getGeometry(d).relative});return this.graph.view.getCellStates(b.filterDescendants(c,a))};mxGraphHandler.prototype.getCells=function(a){return!this.delayedSelection&&this.graph.isCellMovable(a)?[a]:this.graph.getMovableCells(this.graph.getSelectionCells())};\nmxGraphHandler.prototype.getPreviewBounds=function(a){a=this.getBoundingBox(a);null!=a&&(a.width=Math.max(0,a.width-1),a.height=Math.max(0,a.height-1),a.width<this.minimumSize?(a.x-=(this.minimumSize-a.width)/2,a.width=this.minimumSize):(a.x=Math.round(a.x),a.width=Math.ceil(a.width)),a.height<this.minimumSize?(a.y-=(this.minimumSize-a.height)/2,a.height=this.minimumSize):(a.y=Math.round(a.y),a.height=Math.ceil(a.height)));return a};\nmxGraphHandler.prototype.getBoundingBox=function(a){var b=null;if(null!=a&&0<a.length)for(var c=this.graph.getModel(),d=0;d<a.length;d++)if(c.isVertex(a[d])||c.isEdge(a[d])){var e=this.graph.view.getState(a[d]);if(null!=e){var f=e;c.isVertex(a[d])&&null!=e.shape&&null!=e.shape.boundingBox&&(f=e.shape.boundingBox);null==b?b=mxRectangle.fromRectangle(f):b.add(f)}}return b};\nmxGraphHandler.prototype.createPreviewShape=function(a){a=new mxRectangleShape(a,null,this.previewColor);a.isDashed=!0;this.htmlPreview?(a.dialect=mxConstants.DIALECT_STRICTHTML,a.init(this.graph.container)):(a.dialect=mxConstants.DIALECT_SVG,a.init(this.graph.getView().getOverlayPane()),a.pointerEvents=!1,mxClient.IS_IOS&&(a.getSvgScreenOffset=function(){return 0}));return a};\nmxGraphHandler.prototype.start=function(a,b,c,d,e){if(null==this.first||e){this.cell=a;this.first=mxUtils.convertPoint(this.graph.container,b,c);this.cells=null!=d?d:this.getCells(this.cell);this.bounds=this.graph.getView().getBounds(this.cells);this.pBounds=this.getPreviewBounds(this.cells);this.allCells=new mxDictionary;this.cloning=!1;for(b=this.cellCount=0;b<this.cells.length;b++)this.cellCount+=this.addStates(this.cells[b],this.allCells);if(this.guidesEnabled){this.guide=new mxGuide(this.graph,\nthis.getGuideStates());var f=this.graph.model.getParent(a),g=2>this.graph.model.getChildCount(f),k=new mxDictionary;a=this.graph.getOpposites(this.graph.getEdges(this.cell),this.cell);for(b=0;b<a.length;b++)c=this.graph.view.getState(a[b]),null==c||k.get(c)||k.put(c,!0);this.guide.isStateIgnored=mxUtils.bind(this,function(l){var m=this.graph.model.getParent(l.cell);return null!=l.cell&&(!this.cloning&&this.isCellMoving(l.cell)||l.cell!=(this.target||f)&&!g&&!k.get(l)&&(null==this.target||2<=this.graph.model.getChildCount(this.target))&&\nm!=(this.target||f))})}}};mxGraphHandler.prototype.addStates=function(a,b){var c=this.graph.view.getState(a),d=0;if(null!=c&&null==b.get(a)){b.put(a,c);d++;c=this.graph.model.getChildCount(a);for(var e=0;e<c;e++)d+=this.addStates(this.graph.model.getChildAt(a,e),b)}return d};mxGraphHandler.prototype.isCellMoving=function(a){return null!=this.allCells.get(a)};\nmxGraphHandler.prototype.useGuidesForEvent=function(a){return null!=this.guide?this.guide.isEnabledForEvent(a.getEvent())&&!this.isConstrainedEvent(a):!0};mxGraphHandler.prototype.snap=function(a){var b=this.scaleGrid?this.graph.view.scale:1;a.x=this.graph.snap(a.x/b)*b;a.y=this.graph.snap(a.y/b)*b;return a};mxGraphHandler.prototype.getDelta=function(a){a=mxUtils.convertPoint(this.graph.container,a.getX(),a.getY());return new mxPoint(a.x-this.first.x-this.graph.panDx,a.y-this.first.y-this.graph.panDy)};\nmxGraphHandler.prototype.updateHint=function(a){};mxGraphHandler.prototype.removeHint=function(){};mxGraphHandler.prototype.roundLength=function(a){return Math.round(100*a)/100};mxGraphHandler.prototype.isValidDropTarget=function(a,b){return this.graph.model.getParent(this.cell)!=a};\nmxGraphHandler.prototype.checkPreview=function(){this.livePreviewActive&&this.cloning?(this.resetLivePreview(),this.livePreviewActive=!1):this.maxLivePreview>=this.cellCount&&!this.livePreviewActive&&this.allowLivePreview?this.cloning&&this.livePreviewActive||(this.livePreviewUsed=this.livePreviewActive=!0):this.livePreviewUsed||null!=this.shape||(this.shape=this.createPreviewShape(this.bounds))};\nmxGraphHandler.prototype.mouseMove=function(a,b){a=this.graph;var c=a.tolerance,d=null!=this.first?this.getDelta(b):null;this.delayedSelection&&null!=d&&null!=this.cell&&(Math.abs(d.x)>c||Math.abs(d.y)>c)&&(this.delayedSelection=!1,a.addSelectionCell(this.cell),this.start(this.cell,this.mouseDownX,this.mouseDownY,a.getSelectionCells(),!0));if(b.isConsumed()||!a.isMouseDown||null==this.cell||null==d||null==this.bounds||this.suspended)!this.isMoveEnabled()&&!this.isCloneEnabled()||!this.updateCursor||\nb.isConsumed()||null==b.getState()&&null==b.sourceState||a.isMouseDown||(d=a.getCursorForMouseEvent(b),null==d&&a.isEnabled()&&a.isCellMovable(b.getCell())&&(d=a.getModel().isEdge(b.getCell())?mxConstants.CURSOR_MOVABLE_EDGE:mxConstants.CURSOR_MOVABLE_VERTEX),null!=d&&null!=b.sourceState&&b.sourceState.setCursor(d));else if(mxEvent.isMultiTouchEvent(b.getEvent()))this.reset();else{if(null!=this.shape||this.livePreviewActive||Math.abs(d.x)>c||Math.abs(d.y)>c){null==this.highlight&&(this.highlight=\nnew mxCellHighlight(this.graph,mxConstants.DROP_TARGET_COLOR,3));c=a.isCloneEvent(b.getEvent())&&a.isCellsCloneable()&&this.isCloneEnabled();var e=a.isGridEnabledEvent(b.getEvent()),f=b.getCell();f=null!=f&&0>mxUtils.indexOf(this.cells,f)?f:a.getCellAt(b.getGraphX(),b.getGraphY(),null,null,null,mxUtils.bind(this,function(n,p,q){return 0<=mxUtils.indexOf(this.cells,n.cell)}));var g=!0,k=null;this.cloning=c;a.isDropEnabled()&&this.highlightEnabled&&(k=a.getDropTarget(this.cells,b.getEvent(),f,c));var l=\na.getView().getState(k),m=!1;null!=l&&(c||this.isValidDropTarget(k,b))?(this.target!=k&&(this.target=k,this.setHighlightColor(mxConstants.DROP_TARGET_COLOR)),m=!0):(this.target=null,this.connectOnDrop&&null!=f&&1==this.cells.length&&a.getModel().isVertex(f)&&a.isCellConnectable(f)&&(l=a.getView().getState(f),null!=l&&(a=null==a.getEdgeValidationError(null,this.cell,f)?mxConstants.VALID_COLOR:mxConstants.INVALID_CONNECT_TARGET_COLOR,this.setHighlightColor(a),m=!0)));null!=l&&m?this.highlight.highlight(l):\nthis.highlight.hide();null!=this.guide&&this.useGuidesForEvent(b)?(d=this.guide.move(this.bounds,d,e,c),g=!1):d=this.graph.snapDelta(d,this.bounds,!e,!1,!1);null!=this.guide&&g&&this.guide.hide();this.isConstrainedEvent(b)&&(Math.abs(d.x)>Math.abs(d.y)?d.y=0:d.x=0);this.checkPreview();if(this.currentDx!=d.x||this.currentDy!=d.y)this.currentDx=d.x,this.currentDy=d.y,this.updatePreview()}this.updateHint(b);this.consumeMouseEvent(mxEvent.MOUSE_MOVE,b);mxEvent.consume(b.getEvent())}};\nmxGraphHandler.prototype.isConstrainedEvent=function(a){return(null==this.target||this.graph.isCloneEvent(a.getEvent()))&&this.graph.isConstrainedEvent(a.getEvent())};mxGraphHandler.prototype.updatePreview=function(a){this.livePreviewUsed&&!a?null!=this.cells&&(this.setHandlesVisibleForCells(this.graph.selectionCellsHandler.getHandledSelectionCells(),!1),this.updateLivePreview(this.currentDx,this.currentDy)):this.updatePreviewShape()};\nmxGraphHandler.prototype.updatePreviewShape=function(){null!=this.shape&&null!=this.pBounds&&(this.shape.bounds=new mxRectangle(Math.round(this.pBounds.x+this.currentDx),Math.round(this.pBounds.y+this.currentDy),this.pBounds.width,this.pBounds.height),this.shape.redraw())};\nmxGraphHandler.prototype.updateLivePreview=function(a,b){if(!this.suspended){var c=[];null!=this.allCells&&this.allCells.visit(mxUtils.bind(this,function(n,p){n=this.graph.view.getState(p.cell);n!=p&&(p.destroy(),null!=n?this.allCells.put(p.cell,n):this.allCells.remove(p.cell),p=n);null!=p&&(n=p.clone(),c.push([p,n]),null!=p.shape&&(null==p.shape.originalPointerEvents&&(p.shape.originalPointerEvents=p.shape.pointerEvents),p.shape.pointerEvents=!1,null!=p.text&&(null==p.text.originalPointerEvents&&\n(p.text.originalPointerEvents=p.text.pointerEvents),p.text.pointerEvents=!1)),this.graph.model.isVertex(p.cell))&&((p.x+=a,p.y+=b,this.cloning)?null!=p.text&&(p.text.updateBoundingBox(),null!=p.text.boundingBox&&(p.text.boundingBox.x+=a,p.text.boundingBox.y+=b),null!=p.text.unrotatedBoundingBox&&(p.text.unrotatedBoundingBox.x+=a,p.text.unrotatedBoundingBox.y+=b)):(p.view.graph.cellRenderer.redraw(p,!0),p.view.invalidate(p.cell),p.invalid=!1,null!=p.control&&null!=p.control.node&&(p.control.node.style.visibility=\n\"hidden\")))}));if(0==c.length)this.reset();else{for(var d=this.graph.view.scale,e=0;e<c.length;e++){var f=c[e][0];if(this.graph.model.isEdge(f.cell)){var g=this.graph.getCellGeometry(f.cell),k=[];if(null!=g&&null!=g.points)for(var l=0;l<g.points.length;l++)null!=g.points[l]&&k.push(new mxPoint(g.points[l].x+a/d,g.points[l].y+b/d));g=f.visibleSourceState;l=f.visibleTargetState;var m=c[e][1].absolutePoints;null!=g&&this.isCellMoving(g.cell)?f.view.updateFixedTerminalPoint(f,g,!0,this.graph.getConnectionConstraint(f,\ng,!0)):(g=m[0],f.setAbsoluteTerminalPoint(new mxPoint(g.x+a,g.y+b),!0),g=null);null!=l&&this.isCellMoving(l.cell)?f.view.updateFixedTerminalPoint(f,l,!1,this.graph.getConnectionConstraint(f,l,!1)):(l=m[m.length-1],f.setAbsoluteTerminalPoint(new mxPoint(l.x+a,l.y+b),!1),l=null);f.view.updatePoints(f,k,g,l);f.view.updateFloatingTerminalPoints(f,g,l);f.view.updateEdgeLabelOffset(f);f.invalid=!1;this.cloning||f.view.graph.cellRenderer.redraw(f,!0)}}this.graph.view.validate();this.redrawHandles(c);this.resetPreviewStates(c)}}};\nmxGraphHandler.prototype.redrawHandles=function(a){for(var b=0;b<a.length;b++){var c=this.graph.selectionCellsHandler.getHandler(a[b][0].cell);null!=c&&c.redraw(!0)}};mxGraphHandler.prototype.resetPreviewStates=function(a){for(var b=0;b<a.length;b++)a[b][0].setState(a[b][1])};\nmxGraphHandler.prototype.suspend=function(){this.suspended||(this.livePreviewUsed&&this.updateLivePreview(0,0),null!=this.shape&&(this.shape.node.style.visibility=\"hidden\"),null!=this.guide&&this.guide.setVisible(!1),this.suspended=!0)};mxGraphHandler.prototype.resume=function(){this.suspended&&(this.suspended=null,this.livePreviewUsed&&(this.livePreviewActive=!0),null!=this.shape&&(this.shape.node.style.visibility=\"visible\"),null!=this.guide&&this.guide.setVisible(!0))};\nmxGraphHandler.prototype.resetLivePreview=function(){null!=this.allCells&&(this.allCells.visit(mxUtils.bind(this,function(a,b){null!=b.shape&&null!=b.shape.originalPointerEvents&&(b.shape.pointerEvents=b.shape.originalPointerEvents,b.shape.originalPointerEvents=null,b.shape.bounds=null,null!=b.text&&(b.text.pointerEvents=b.text.originalPointerEvents,b.text.originalPointerEvents=null));null!=b.control&&null!=b.control.node&&\"hidden\"==b.control.node.style.visibility&&(b.control.node.style.visibility=\n\"\");this.cloning||null!=b.text&&b.text.updateBoundingBox();b.view.invalidate(b.cell)})),this.graph.view.validate())};mxGraphHandler.prototype.setHandlesVisibleForCells=function(a,b,c){if(c||this.handlesVisible!=b)for(this.handlesVisible=b,c=0;c<a.length;c++){var d=this.graph.selectionCellsHandler.getHandler(a[c]);null!=d&&(d.setHandlesVisible(b),b&&d.redraw())}};mxGraphHandler.prototype.setHighlightColor=function(a){null!=this.highlight&&this.highlight.setHighlightColor(a)};\nmxGraphHandler.prototype.mouseUp=function(a,b){if(!b.isConsumed())if(this.livePreviewUsed&&this.resetLivePreview(),null==this.cell||null==this.first||null==this.shape&&!this.livePreviewUsed||null==this.currentDx||null==this.currentDy)this.isSelectEnabled()&&this.delayedSelection&&null!=this.cell&&this.selectDelayed(b);else{a=this.graph;var c=b.getCell();if(this.connectOnDrop&&null==this.target&&null!=c&&a.getModel().isVertex(c)&&a.isCellConnectable(c)&&a.isEdgeValid(null,this.cell,c))a.connectionHandler.connect(this.cell,\nc,b.getEvent());else{c=a.isCloneEvent(b.getEvent())&&a.isCellsCloneable()&&this.isCloneEnabled();var d=a.getView().scale,e=this.roundLength(this.currentDx/d);d=this.roundLength(this.currentDy/d);var f=this.target;a.isSplitEnabled()&&a.isSplitTarget(f,this.cells,b.getEvent())?a.splitEdge(f,this.cells,null,e,d,b.getGraphX(),b.getGraphY()):this.moveCells(this.cells,e,d,c,this.target,b.getEvent())}}this.cellWasClicked&&this.consumeMouseEvent(mxEvent.MOUSE_UP,b);this.reset()};\nmxGraphHandler.prototype.reset=function(){this.livePreviewUsed&&(this.resetLivePreview(),this.setHandlesVisibleForCells(this.graph.selectionCellsHandler.getHandledSelectionCells(),!0));this.destroyShapes();this.removeHint();this.delayedSelection=!1;this.livePreviewUsed=this.livePreviewActive=null;this.cellWasClicked=!1;this.cellCount=this.currentDy=this.currentDx=this.suspended=null;this.cloning=!1;this.cell=this.cells=this.first=this.target=this.guides=this.pBounds=this.allCells=null};\nmxGraphHandler.prototype.shouldRemoveCellsFromParent=function(a,b,c){if(this.graph.getModel().isVertex(a)&&(a=this.graph.getView().getState(a),null!=a)){c=mxUtils.convertPoint(this.graph.container,mxEvent.getClientX(c),mxEvent.getClientY(c));var d=mxUtils.toRadians(mxUtils.getValue(a.style,mxConstants.STYLE_ROTATION)||0);if(0!=d){b=Math.cos(-d);d=Math.sin(-d);var e=new mxPoint(a.getCenterX(),a.getCenterY());c=mxUtils.getRotatedPoint(c,b,d,e)}return!mxUtils.contains(a,c.x,c.y)}return!1};\nmxGraphHandler.prototype.moveCells=function(a,b,c,d,e,f){d&&(a=this.graph.getCloneableCells(a));var g=this.graph.getModel().getParent(this.cell);!this.graph.isCellSelected(this.cell)&&this.graph.isCellSelected(g)&&(g=this.graph.getModel().getParent(g));null==e&&null!=f&&this.isRemoveCellsFromParent()&&this.shouldRemoveCellsFromParent(g,a,f)&&(e=this.graph.getDefaultParent());d=d&&!this.graph.isCellLocked(e||this.graph.getDefaultParent());this.graph.getModel().beginUpdate();try{g=[];if(!d&&null!=e&&\nthis.removeEmptyParents){for(var k=new mxDictionary,l=0;l<a.length;l++)k.put(a[l],!0);for(l=0;l<a.length;l++){var m=this.graph.model.getParent(a[l]);null==m||k.get(m)||(k.put(m,!0),g.push(m))}}a=this.graph.moveCells(a,b,c,d,e,f);b=[];for(l=0;l<g.length;l++)this.shouldRemoveParent(g[l])&&b.push(g[l]);this.graph.removeCells(b,!1)}finally{this.graph.getModel().endUpdate()}d&&this.graph.setSelectionCells(a);this.isSelectEnabled()&&this.scrollOnMove&&this.graph.scrollCellToVisible(a[0])};\nmxGraphHandler.prototype.shouldRemoveParent=function(a){a=this.graph.view.getState(a);return null!=a&&(this.graph.model.isEdge(a.cell)||this.graph.model.isVertex(a.cell))&&this.graph.isCellDeletable(a.cell)&&0==this.graph.model.getChildCount(a.cell)&&this.graph.isTransparentState(a)};\nmxGraphHandler.prototype.destroyShapes=function(){null!=this.shape&&(this.shape.destroy(),this.shape=null);null!=this.guide&&(this.guide.destroy(),this.guide=null);null!=this.highlight&&(this.highlight.destroy(),this.highlight=null)};\nmxGraphHandler.prototype.destroy=function(){this.graph.removeMouseListener(this);this.graph.removeListener(this.panHandler);null!=this.escapeHandler&&(this.graph.removeListener(this.escapeHandler),this.escapeHandler=null);null!=this.refreshHandler&&(this.graph.getModel().removeListener(this.refreshHandler),this.graph.removeListener(this.refreshHandler),this.refreshHandler=null);mxEvent.removeListener(document,\"keydown\",this.keyHandler);mxEvent.removeListener(document,\"keyup\",this.keyHandler);this.destroyShapes();\nthis.removeHint()};\nfunction mxPanningHandler(a){null!=a&&(this.graph=a,this.graph.addMouseListener(this),this.forcePanningHandler=mxUtils.bind(this,function(b,c){b=c.getProperty(\"eventName\");c=c.getProperty(\"event\");b==mxEvent.MOUSE_DOWN&&this.isForcePanningEvent(c)&&(this.start(c),this.active=!0,this.fireEvent(new mxEventObject(mxEvent.PAN_START,\"event\",c)),c.consume())}),this.graph.addListener(mxEvent.FIRE_MOUSE_EVENT,this.forcePanningHandler),this.gestureHandler=mxUtils.bind(this,function(b,c){this.isPinchEnabled()&&(b=\nc.getProperty(\"event\"),mxEvent.isConsumed(b)||\"gesturestart\"!=b.type?\"gestureend\"==b.type&&null!=this.initialScale&&(this.initialScale=null):(this.initialScale=this.graph.view.scale,this.active||null==this.mouseDownEvent||(this.start(this.mouseDownEvent),this.mouseDownEvent=null)),null!=this.initialScale&&this.zoomGraph(b))}),this.graph.addListener(mxEvent.GESTURE,this.gestureHandler),this.mouseUpListener=mxUtils.bind(this,function(){this.active&&this.reset()}),mxEvent.addGestureListeners(document,\nnull,null,this.mouseUpListener),mxEvent.addListener(document,\"mouseleave\",this.mouseUpListener))}mxPanningHandler.prototype=new mxEventSource;mxPanningHandler.prototype.constructor=mxPanningHandler;mxPanningHandler.prototype.graph=null;mxPanningHandler.prototype.useLeftButtonForPanning=!1;mxPanningHandler.prototype.usePopupTrigger=!0;mxPanningHandler.prototype.ignoreCell=!1;mxPanningHandler.prototype.previewEnabled=!0;mxPanningHandler.prototype.useGrid=!1;\nmxPanningHandler.prototype.panningEnabled=!0;mxPanningHandler.prototype.pinchEnabled=!0;mxPanningHandler.prototype.maxScale=8;mxPanningHandler.prototype.minScale=.01;mxPanningHandler.prototype.dx=null;mxPanningHandler.prototype.dy=null;mxPanningHandler.prototype.startX=0;mxPanningHandler.prototype.startY=0;mxPanningHandler.prototype.isActive=function(){return this.active||null!=this.initialScale};mxPanningHandler.prototype.isPanningEnabled=function(){return this.panningEnabled};\nmxPanningHandler.prototype.setPanningEnabled=function(a){this.panningEnabled=a};mxPanningHandler.prototype.isPinchEnabled=function(){return this.pinchEnabled};mxPanningHandler.prototype.setPinchEnabled=function(a){this.pinchEnabled=a};mxPanningHandler.prototype.isPanningTrigger=function(a){var b=a.getEvent();return this.useLeftButtonForPanning&&null==a.getState()&&mxEvent.isLeftMouseButton(b)||mxEvent.isControlDown(b)&&mxEvent.isShiftDown(b)||this.usePopupTrigger&&mxEvent.isPopupTrigger(b)};\nmxPanningHandler.prototype.isForcePanningEvent=function(a){return this.ignoreCell||mxEvent.isMultiTouchEvent(a.getEvent())};mxPanningHandler.prototype.mouseDown=function(a,b){this.mouseDownEvent=b;!b.isConsumed()&&this.isPanningEnabled()&&!this.active&&this.isPanningTrigger(b)&&(this.start(b),this.consumePanningTrigger(b))};\nmxPanningHandler.prototype.start=function(a){this.dx0=-this.graph.container.scrollLeft;this.dy0=-this.graph.container.scrollTop;this.startX=a.getX();this.startY=a.getY();this.dy=this.dx=null;this.panningTrigger=!0};mxPanningHandler.prototype.consumePanningTrigger=function(a){a.consume()};\nmxPanningHandler.prototype.mouseMove=function(a,b){this.dx=b.getX()-this.startX;this.dy=b.getY()-this.startY;this.active?(this.previewEnabled&&(this.useGrid&&(this.dx=this.graph.snap(this.dx),this.dy=this.graph.snap(this.dy)),this.graph.panGraph(this.dx+this.dx0,this.dy+this.dy0)),this.fireEvent(new mxEventObject(mxEvent.PAN,\"event\",b))):this.panningTrigger&&(a=this.active,this.active=Math.abs(this.dx)>this.graph.tolerance||Math.abs(this.dy)>this.graph.tolerance,!a&&this.active&&this.fireEvent(new mxEventObject(mxEvent.PAN_START,\n\"event\",b)));(this.active||this.panningTrigger)&&b.consume()};mxPanningHandler.prototype.mouseUp=function(a,b){if(this.active){if(null!=this.dx&&null!=this.dy){if(!this.graph.useScrollbarsForPanning||!mxUtils.hasScrollbars(this.graph.container)){a=this.graph.getView().scale;var c=this.graph.getView().translate;this.graph.panGraph(0,0);this.panGraph(c.x+this.dx/a,c.y+this.dy/a)}b.consume()}this.fireEvent(new mxEventObject(mxEvent.PAN_END,\"event\",b))}this.reset()};\nmxPanningHandler.prototype.zoomGraph=function(a){var b=Math.round(this.initialScale*a.scale*100)/100;null!=this.minScale&&(b=Math.max(this.minScale,b));null!=this.maxScale&&(b=Math.min(this.maxScale,b));this.graph.view.scale!=b&&(this.graph.zoomTo(b),mxEvent.consume(a))};mxPanningHandler.prototype.reset=function(){this.panningTrigger=this.graph.isMouseDown=!1;this.mouseDownEvent=null;this.active=!1;this.dy=this.dx=null};\nmxPanningHandler.prototype.panGraph=function(a,b){this.graph.getView().setTranslate(a,b)};mxPanningHandler.prototype.destroy=function(){this.graph.removeMouseListener(this);this.graph.removeListener(this.forcePanningHandler);this.graph.removeListener(this.gestureHandler);mxEvent.removeGestureListeners(document,null,null,this.mouseUpListener);mxEvent.removeListener(document,\"mouseleave\",this.mouseUpListener)};\nfunction mxPopupMenuHandler(a,b){null!=a&&(this.graph=a,this.factoryMethod=b,this.graph.addMouseListener(this),this.gestureHandler=mxUtils.bind(this,function(c,d){this.inTolerance=!1}),this.graph.addListener(mxEvent.GESTURE,this.gestureHandler),this.init())}mxPopupMenuHandler.prototype=new mxPopupMenu;mxPopupMenuHandler.prototype.constructor=mxPopupMenuHandler;mxPopupMenuHandler.prototype.graph=null;mxPopupMenuHandler.prototype.selectOnPopup=!0;\nmxPopupMenuHandler.prototype.clearSelectionOnBackground=!0;mxPopupMenuHandler.prototype.triggerX=null;mxPopupMenuHandler.prototype.triggerY=null;mxPopupMenuHandler.prototype.screenX=null;mxPopupMenuHandler.prototype.screenY=null;mxPopupMenuHandler.prototype.init=function(){mxPopupMenu.prototype.init.apply(this);mxEvent.addGestureListeners(this.div,mxUtils.bind(this,function(a){this.graph.tooltipHandler.hide()}))};mxPopupMenuHandler.prototype.isSelectOnPopup=function(a){return this.selectOnPopup};\nmxPopupMenuHandler.prototype.mouseDown=function(a,b){this.isEnabled()&&!mxEvent.isMultiTouchEvent(b.getEvent())&&(this.hideMenu(),this.triggerX=b.getGraphX(),this.triggerY=b.getGraphY(),this.screenX=mxEvent.getMainEvent(b.getEvent()).screenX,this.screenY=mxEvent.getMainEvent(b.getEvent()).screenY,this.popupTrigger=this.isPopupTrigger(b),this.inTolerance=!0)};\nmxPopupMenuHandler.prototype.mouseMove=function(a,b){this.inTolerance&&null!=this.screenX&&null!=this.screenY&&(Math.abs(mxEvent.getMainEvent(b.getEvent()).screenX-this.screenX)>this.graph.tolerance||Math.abs(mxEvent.getMainEvent(b.getEvent()).screenY-this.screenY)>this.graph.tolerance)&&(this.inTolerance=!1)};\nmxPopupMenuHandler.prototype.mouseUp=function(a,b,c){a=null==c;c=null!=c?c:mxUtils.bind(this,function(e){var f=mxUtils.getScrollOrigin();this.popup(b.getX()+f.x+1,b.getY()+f.y+1,e,b.getEvent())});if(this.popupTrigger&&this.inTolerance&&null!=this.triggerX&&null!=this.triggerY){var d=this.getCellForPopupEvent(b);this.graph.isEnabled()&&this.isSelectOnPopup(b)&&null!=d&&!this.graph.isCellSelected(d)?this.graph.setSelectionCell(d):this.clearSelectionOnBackground&&null==d&&this.graph.clearSelection();\nthis.graph.tooltipHandler.hide();c(d);a&&b.consume()}this.inTolerance=this.popupTrigger=!1};mxPopupMenuHandler.prototype.getCellForPopupEvent=function(a){return a.getCell()};mxPopupMenuHandler.prototype.destroy=function(){this.graph.removeMouseListener(this);this.graph.removeListener(this.gestureHandler);mxPopupMenu.prototype.destroy.apply(this)};\nfunction mxCellMarker(a,b,c,d){mxEventSource.call(this);null!=a&&(this.graph=a,this.validColor=null!=b?b:mxConstants.DEFAULT_VALID_COLOR,this.invalidColor=null!=c?c:mxConstants.DEFAULT_INVALID_COLOR,this.hotspot=null!=d?d:mxConstants.DEFAULT_HOTSPOT,this.highlight=new mxCellHighlight(a))}mxUtils.extend(mxCellMarker,mxEventSource);mxCellMarker.prototype.graph=null;mxCellMarker.prototype.enabled=!0;mxCellMarker.prototype.hotspot=mxConstants.DEFAULT_HOTSPOT;mxCellMarker.prototype.hotspotEnabled=!1;\nmxCellMarker.prototype.validColor=null;mxCellMarker.prototype.invalidColor=null;mxCellMarker.prototype.currentColor=null;mxCellMarker.prototype.validState=null;mxCellMarker.prototype.markedState=null;mxCellMarker.prototype.setEnabled=function(a){this.enabled=a};mxCellMarker.prototype.isEnabled=function(){return this.enabled};mxCellMarker.prototype.setHotspot=function(a){this.hotspot=a};mxCellMarker.prototype.getHotspot=function(){return this.hotspot};\nmxCellMarker.prototype.setHotspotEnabled=function(a){this.hotspotEnabled=a};mxCellMarker.prototype.isHotspotEnabled=function(){return this.hotspotEnabled};mxCellMarker.prototype.hasValidState=function(){return null!=this.validState};mxCellMarker.prototype.getValidState=function(){return this.validState};mxCellMarker.prototype.getMarkedState=function(){return this.markedState};mxCellMarker.prototype.reset=function(){this.validState=null;null!=this.markedState&&(this.markedState=null,this.unmark())};\nmxCellMarker.prototype.process=function(a){var b=null;this.isEnabled()&&(b=this.getState(a),this.setCurrentState(b,a));return b};mxCellMarker.prototype.setCurrentState=function(a,b,c){var d=null!=a?this.isValidState(a):!1;c=null!=c?c:this.getMarkerColor(b.getEvent(),a,d);this.validState=d?a:null;if(a!=this.markedState||c!=this.currentColor)this.currentColor=c,null!=a&&null!=this.currentColor?(this.markedState=a,this.mark()):null!=this.markedState&&(this.markedState=null,this.unmark())};\nmxCellMarker.prototype.markCell=function(a,b){a=this.graph.getView().getState(a);null!=a&&(this.currentColor=null!=b?b:this.validColor,this.markedState=a,this.mark())};mxCellMarker.prototype.mark=function(){this.highlight.setHighlightColor(this.currentColor);this.highlight.highlight(this.markedState);this.fireEvent(new mxEventObject(mxEvent.MARK,\"state\",this.markedState))};mxCellMarker.prototype.unmark=function(){this.mark()};mxCellMarker.prototype.isValidState=function(a){return!0};\nmxCellMarker.prototype.getMarkerColor=function(a,b,c){return c?this.validColor:this.invalidColor};mxCellMarker.prototype.getState=function(a){var b=this.graph.getView(),c=this.getCell(a);b=this.getStateToMark(b.getState(c));return null!=b&&this.intersects(b,a)?b:null};mxCellMarker.prototype.getCell=function(a){return a.getCell()};mxCellMarker.prototype.getStateToMark=function(a){return a};\nmxCellMarker.prototype.intersects=function(a,b){return this.hotspotEnabled?mxUtils.intersectsHotspot(a,b.getGraphX(),b.getGraphY(),this.hotspot,mxConstants.MIN_HOTSPOT_SIZE,mxConstants.MAX_HOTSPOT_SIZE):!0};mxCellMarker.prototype.destroy=function(){this.highlight.destroy()};\nfunction mxSelectionCellsHandler(a){mxEventSource.call(this);this.graph=a;this.handlers=new mxDictionary;this.graph.addMouseListener(this);this.refreshHandler=mxUtils.bind(this,function(b,c){this.isEnabled()&&this.refresh()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.refreshHandler);this.graph.getModel().addListener(mxEvent.CHANGE,this.refreshHandler);this.graph.getView().addListener(mxEvent.SCALE,this.refreshHandler);this.graph.getView().addListener(mxEvent.TRANSLATE,this.refreshHandler);\nthis.graph.getView().addListener(mxEvent.SCALE_AND_TRANSLATE,this.refreshHandler);this.graph.getView().addListener(mxEvent.DOWN,this.refreshHandler);this.graph.getView().addListener(mxEvent.UP,this.refreshHandler)}mxUtils.extend(mxSelectionCellsHandler,mxEventSource);mxSelectionCellsHandler.prototype.graph=null;mxSelectionCellsHandler.prototype.enabled=!0;mxSelectionCellsHandler.prototype.refreshHandler=null;mxSelectionCellsHandler.prototype.maxHandlers=100;\nmxSelectionCellsHandler.prototype.handlers=null;mxSelectionCellsHandler.prototype.isEnabled=function(){return this.enabled};mxSelectionCellsHandler.prototype.setEnabled=function(a){this.enabled=a};mxSelectionCellsHandler.prototype.getHandler=function(a){return this.handlers.get(a)};mxSelectionCellsHandler.prototype.isHandled=function(a){return null!=this.getHandler(a)};mxSelectionCellsHandler.prototype.reset=function(){this.handlers.visit(function(a,b){b.reset.apply(b)})};\nmxSelectionCellsHandler.prototype.getHandledSelectionCells=function(){return this.graph.getSelectionCells()};\nmxSelectionCellsHandler.prototype.refresh=function(){var a=this.handlers;this.handlers=new mxDictionary;for(var b=mxUtils.sortCells(this.getHandledSelectionCells(),!1),c=0;c<b.length;c++){var d=this.graph.view.getState(b[c]);if(null!=d){var e=a.remove(b[c]);null!=e&&(e.state!=d?(e.destroy(),e=null):this.isHandlerActive(e)||(null!=e.refresh&&e.refresh(),e.redraw()));null!=e&&this.handlers.put(b[c],e)}}a.visit(mxUtils.bind(this,function(f,g){this.fireEvent(new mxEventObject(mxEvent.REMOVE,\"state\",g.state));\ng.destroy()}));for(c=0;c<b.length;c++)d=this.graph.view.getState(b[c]),null!=d&&(e=this.handlers.get(b[c]),null==e?(e=this.graph.createHandler(d),this.fireEvent(new mxEventObject(mxEvent.ADD,\"state\",d)),this.handlers.put(b[c],e)):e.updateParentHighlight())};mxSelectionCellsHandler.prototype.isHandlerActive=function(a){return null!=a.index};\nmxSelectionCellsHandler.prototype.updateHandler=function(a){var b=this.handlers.remove(a.cell);if(null!=b){var c=b.index,d=b.startX,e=b.startY;b.destroy();b=this.graph.createHandler(a);null!=b&&(this.handlers.put(a.cell,b),null!=c&&null!=d&&null!=e&&b.start(d,e,c))}};mxSelectionCellsHandler.prototype.mouseDown=function(a,b){if(this.graph.isEnabled()&&this.isEnabled()){var c=[a,b];this.handlers.visit(function(d,e){e.mouseDown.apply(e,c)})}};\nmxSelectionCellsHandler.prototype.mouseMove=function(a,b){if(this.graph.isEnabled()&&this.isEnabled()){var c=[a,b];this.handlers.visit(function(d,e){e.mouseMove.apply(e,c)})}};mxSelectionCellsHandler.prototype.mouseUp=function(a,b){if(this.graph.isEnabled()&&this.isEnabled()){var c=[a,b];this.handlers.visit(function(d,e){e.mouseUp.apply(e,c)})}};\nmxSelectionCellsHandler.prototype.destroy=function(){this.graph.removeMouseListener(this);null!=this.refreshHandler&&(this.graph.getSelectionModel().removeListener(this.refreshHandler),this.graph.getModel().removeListener(this.refreshHandler),this.graph.getView().removeListener(this.refreshHandler),this.refreshHandler=null)};\nfunction mxConnectionHandler(a,b){mxEventSource.call(this);null!=a&&(this.graph=a,this.factoryMethod=b,this.init(),this.escapeHandler=mxUtils.bind(this,function(c,d){this.reset()}),this.graph.addListener(mxEvent.ESCAPE,this.escapeHandler))}mxUtils.extend(mxConnectionHandler,mxEventSource);mxConnectionHandler.prototype.graph=null;mxConnectionHandler.prototype.factoryMethod=!0;mxConnectionHandler.prototype.moveIconFront=!1;mxConnectionHandler.prototype.moveIconBack=!1;\nmxConnectionHandler.prototype.connectImage=null;mxConnectionHandler.prototype.targetConnectImage=!1;mxConnectionHandler.prototype.enabled=!0;mxConnectionHandler.prototype.select=!0;mxConnectionHandler.prototype.createTarget=!1;mxConnectionHandler.prototype.marker=null;mxConnectionHandler.prototype.constraintHandler=null;mxConnectionHandler.prototype.error=null;mxConnectionHandler.prototype.waypointsEnabled=!1;mxConnectionHandler.prototype.ignoreMouseDown=!1;mxConnectionHandler.prototype.first=null;\nmxConnectionHandler.prototype.connectIconOffset=new mxPoint(0,mxConstants.TOOLTIP_VERTICAL_OFFSET);mxConnectionHandler.prototype.edgeState=null;mxConnectionHandler.prototype.changeHandler=null;mxConnectionHandler.prototype.drillHandler=null;mxConnectionHandler.prototype.mouseDownCounter=0;mxConnectionHandler.prototype.movePreviewAway=!1;mxConnectionHandler.prototype.outlineConnect=!1;mxConnectionHandler.prototype.livePreview=!1;mxConnectionHandler.prototype.cursor=null;\nmxConnectionHandler.prototype.insertBeforeSource=!1;mxConnectionHandler.prototype.isEnabled=function(){return this.enabled};mxConnectionHandler.prototype.setEnabled=function(a){this.enabled=a};mxConnectionHandler.prototype.isInsertBefore=function(a,b,c,d,e){return this.insertBeforeSource&&b!=c&&this.graph.model.getParent(a)==this.graph.model.getParent(b)};mxConnectionHandler.prototype.isCreateTarget=function(a){return this.createTarget};\nmxConnectionHandler.prototype.setCreateTarget=function(a){this.createTarget=a};mxConnectionHandler.prototype.createShape=function(){var a=this.livePreview&&null!=this.edgeState?this.graph.cellRenderer.createShape(this.edgeState):new mxPolyline([],mxConstants.INVALID_COLOR);a.dialect=mxConstants.DIALECT_SVG;a.scale=this.graph.view.scale;a.svgStrokeTolerance=0;a.pointerEvents=!1;a.isDashed=!0;a.init(this.graph.getView().getOverlayPane());mxEvent.redirectMouseEvents(a.node,this.graph,null);return a};\nmxConnectionHandler.prototype.init=function(){this.graph.addMouseListener(this);this.marker=this.createMarker();this.constraintHandler=new mxConstraintHandler(this.graph);this.changeHandler=mxUtils.bind(this,function(a){null!=this.iconState&&(this.iconState=this.graph.getView().getState(this.iconState.cell));null!=this.iconState?(this.redrawIcons(this.icons,this.iconState),this.constraintHandler.reset()):null!=this.previous&&null==this.graph.view.getState(this.previous.cell)&&this.reset()});this.graph.getModel().addListener(mxEvent.CHANGE,\nthis.changeHandler);this.graph.getView().addListener(mxEvent.SCALE,this.changeHandler);this.graph.getView().addListener(mxEvent.TRANSLATE,this.changeHandler);this.graph.getView().addListener(mxEvent.SCALE_AND_TRANSLATE,this.changeHandler);this.drillHandler=mxUtils.bind(this,function(a){this.reset()});this.graph.addListener(mxEvent.START_EDITING,this.drillHandler);this.graph.getView().addListener(mxEvent.DOWN,this.drillHandler);this.graph.getView().addListener(mxEvent.UP,this.drillHandler)};\nmxConnectionHandler.prototype.isConnectableCell=function(a){return!0};\nmxConnectionHandler.prototype.createMarker=function(){var a=new mxCellMarker(this.graph);a.hotspotEnabled=!0;a.getCell=mxUtils.bind(this,function(b){var c=mxCellMarker.prototype.getCell.apply(a,arguments);this.error=null;null==c&&null!=this.currentPoint&&(c=this.graph.getCellAt(this.currentPoint.x,this.currentPoint.y));if(null!=c&&!this.graph.isCellConnectable(c)){var d=this.graph.getModel().getParent(c);this.graph.getModel().isVertex(d)&&this.graph.isCellConnectable(d)&&(c=d)}if(this.graph.isSwimlane(c)&&\nnull!=this.currentPoint&&this.graph.hitsSwimlaneContent(c,this.currentPoint.x,this.currentPoint.y)||!this.isConnectableCell(c))c=null;null!=c?this.isConnecting()?null!=this.previous&&(this.error=this.validateConnection(this.previous.cell,c),null!=this.error&&0==this.error.length&&(c=null,this.isCreateTarget(b.getEvent())&&(this.error=null))):this.isValidSource(c,b)||(c=null):!this.isConnecting()||this.isCreateTarget(b.getEvent())||this.graph.allowDanglingEdges||(this.error=\"\");return c});a.isValidState=\nmxUtils.bind(this,function(b){return this.isConnecting()?null==this.error:mxCellMarker.prototype.isValidState.apply(a,arguments)});a.getMarkerColor=mxUtils.bind(this,function(b,c,d){return null==this.connectImage||this.isConnecting()?mxCellMarker.prototype.getMarkerColor.apply(a,arguments):null});a.intersects=mxUtils.bind(this,function(b,c){return null!=this.connectImage||this.isConnecting()?!0:mxCellMarker.prototype.intersects.apply(a,arguments)});return a};\nmxConnectionHandler.prototype.start=function(a,b,c,d){this.previous=a;this.first=new mxPoint(b,c);this.edgeState=null!=d?d:this.createEdgeState(null);this.marker.currentColor=this.marker.validColor;this.marker.markedState=a;this.marker.mark();this.fireEvent(new mxEventObject(mxEvent.START,\"state\",this.previous))};mxConnectionHandler.prototype.isConnecting=function(){return null!=this.first&&null!=this.shape};mxConnectionHandler.prototype.isValidSource=function(a,b){return this.graph.isValidSource(a)};\nmxConnectionHandler.prototype.isValidTarget=function(a){return!0};mxConnectionHandler.prototype.validateConnection=function(a,b){return this.isValidTarget(b)?this.graph.getEdgeValidationError(null,a,b):\"\"};mxConnectionHandler.prototype.getConnectImage=function(a){return this.connectImage};mxConnectionHandler.prototype.isMoveIconToFrontForState=function(a){return null!=a.text&&a.text.node.parentNode==this.graph.container?!0:this.moveIconFront};\nmxConnectionHandler.prototype.createIcons=function(a){var b=this.getConnectImage(a);if(null!=b&&null!=a){this.iconState=a;var c=[],d=new mxRectangle(0,0,b.width,b.height),e=new mxImageShape(d,b.src,null,null,0);e.preserveImageAspect=!1;this.isMoveIconToFrontForState(a)?(e.dialect=mxConstants.DIALECT_STRICTHTML,e.init(this.graph.container)):(e.dialect=mxConstants.DIALECT_SVG,e.init(this.graph.getView().getOverlayPane()),this.moveIconBack&&null!=e.node.previousSibling&&e.node.parentNode.insertBefore(e.node,\ne.node.parentNode.firstChild));e.node.style.cursor=mxConstants.CURSOR_CONNECT;var f=mxUtils.bind(this,function(){return null!=this.currentState?this.currentState:a});b=mxUtils.bind(this,function(g){mxEvent.isConsumed(g)||(this.icon=e,this.graph.fireMouseEvent(mxEvent.MOUSE_DOWN,new mxMouseEvent(g,f())))});mxEvent.redirectMouseEvents(e.node,this.graph,f,b);c.push(e);this.redrawIcons(c,this.iconState);return c}return null};\nmxConnectionHandler.prototype.redrawIcons=function(a,b){null!=a&&null!=a[0]&&null!=b&&(b=this.getIconPosition(a[0],b),a[0].bounds.x=b.x,a[0].bounds.y=b.y,a[0].redraw())};\nmxConnectionHandler.prototype.getIconPosition=function(a,b){var c=this.graph.getView().scale,d=b.getCenterX(),e=b.getCenterY();if(this.graph.isSwimlane(b.cell)){var f=this.graph.getStartSize(b.cell);d=0!=f.width?b.x+f.width*c/2:d;e=0!=f.height?b.y+f.height*c/2:e;f=mxUtils.toRadians(mxUtils.getValue(b.style,mxConstants.STYLE_ROTATION)||0);0!=f&&(c=Math.cos(f),f=Math.sin(f),b=new mxPoint(b.getCenterX(),b.getCenterY()),e=mxUtils.getRotatedPoint(new mxPoint(d,e),c,f,b),d=e.x,e=e.y)}return new mxPoint(d-\na.bounds.width/2,e-a.bounds.height/2)};mxConnectionHandler.prototype.destroyIcons=function(){if(null!=this.icons){for(var a=0;a<this.icons.length;a++)this.icons[a].destroy();this.iconState=this.selectedIcon=this.icon=this.icons=null}};mxConnectionHandler.prototype.isStartEvent=function(a){return null!=this.constraintHandler.currentFocus&&null!=this.constraintHandler.currentConstraint||null!=this.previous&&null==this.error&&(null==this.icons||null!=this.icons&&null!=this.icon)};\nmxConnectionHandler.prototype.mouseDown=function(a,b){this.mouseDownCounter++;this.isEnabled()&&this.graph.isEnabled()&&!b.isConsumed()&&!this.isConnecting()&&this.isStartEvent(b)&&(null!=this.constraintHandler.currentConstraint&&null!=this.constraintHandler.currentFocus&&null!=this.constraintHandler.currentPoint?(this.sourceConstraint=this.constraintHandler.currentConstraint,this.previous=this.constraintHandler.currentFocus,this.first=this.constraintHandler.currentPoint.clone()):this.first=new mxPoint(b.getGraphX(),\nb.getGraphY()),this.edgeState=this.createEdgeState(b),this.mouseDownCounter=1,this.waypointsEnabled&&null==this.shape&&(this.waypoints=null,this.shape=this.createShape(),null!=this.edgeState&&this.shape.apply(this.edgeState)),null==this.previous&&null!=this.edgeState&&(a=this.graph.getPointForEvent(b.getEvent()),this.edgeState.cell.geometry.setTerminalPoint(a,!0)),this.fireEvent(new mxEventObject(mxEvent.START,\"state\",this.previous)),b.consume());this.selectedIcon=this.icon;this.icon=null};\nmxConnectionHandler.prototype.isImmediateConnectSource=function(a){return!this.graph.isCellMovable(a.cell)};mxConnectionHandler.prototype.createEdgeState=function(a){return null};\nmxConnectionHandler.prototype.isOutlineConnectEvent=function(a){if(mxEvent.isShiftDown(a.getEvent())&&mxEvent.isAltDown(a.getEvent()))return!1;var b=mxUtils.getOffset(this.graph.container),c=a.getEvent(),d=mxEvent.getClientX(c);c=mxEvent.getClientY(c);var e=document.documentElement,f=this.currentPoint.x-this.graph.container.scrollLeft+b.x-((window.pageXOffset||e.scrollLeft)-(e.clientLeft||0));b=this.currentPoint.y-this.graph.container.scrollTop+b.y-((window.pageYOffset||e.scrollTop)-(e.clientTop||\n0));return this.outlineConnect&&(mxEvent.isShiftDown(a.getEvent())&&!mxEvent.isAltDown(a.getEvent())||a.isSource(this.marker.highlight.shape)||!mxEvent.isShiftDown(a.getEvent())&&mxEvent.isAltDown(a.getEvent())&&null!=a.getState()||this.marker.highlight.isHighlightAt(d,c)||(f!=d||b!=c)&&null==a.getState()&&this.marker.highlight.isHighlightAt(f,b))};\nmxConnectionHandler.prototype.updateCurrentState=function(a,b){this.constraintHandler.update(a,null==this.first,!1,null==this.first||a.isSource(this.marker.highlight.shape)?null:b);if(null!=this.constraintHandler.currentFocus&&null!=this.constraintHandler.currentConstraint)null!=this.marker.highlight&&null!=this.marker.highlight.state&&this.marker.highlight.state.cell==this.constraintHandler.currentFocus.cell?\"transparent\"!=this.marker.highlight.shape.stroke&&(this.marker.highlight.shape.stroke=\"transparent\",\nthis.marker.highlight.repaint()):this.marker.markCell(this.constraintHandler.currentFocus.cell,\"transparent\"),null!=this.previous&&(this.error=this.validateConnection(this.previous.cell,this.constraintHandler.currentFocus.cell),null==this.error&&(this.currentState=this.constraintHandler.currentFocus),(null!=this.error||null!=this.currentState&&!this.isCellEnabled(this.currentState.cell))&&this.constraintHandler.reset());else{this.graph.isIgnoreTerminalEvent(a.getEvent())?(this.marker.reset(),this.currentState=\nnull):(this.marker.process(a),this.currentState=this.marker.getValidState());null==this.currentState||this.isCellEnabled(this.currentState.cell)||(this.constraintHandler.reset(),this.marker.reset(),this.currentState=null);var c=this.isOutlineConnectEvent(a);null!=this.currentState&&c&&(a.isSource(this.marker.highlight.shape)&&(b=new mxPoint(a.getGraphX(),a.getGraphY())),c=this.graph.getOutlineConstraint(b,this.currentState,a),this.constraintHandler.setFocus(a,this.currentState,!1),this.constraintHandler.currentConstraint=\nc,this.constraintHandler.currentPoint=b);this.outlineConnect&&null!=this.marker.highlight&&null!=this.marker.highlight.shape&&(b=this.graph.view.scale,null!=this.constraintHandler.currentConstraint&&null!=this.constraintHandler.currentFocus?(this.marker.highlight.shape.stroke=mxConstants.OUTLINE_HIGHLIGHT_COLOR,this.marker.highlight.shape.strokewidth=mxConstants.OUTLINE_HIGHLIGHT_STROKEWIDTH/b/b,this.marker.highlight.repaint()):this.marker.hasValidState()&&(this.graph.isCellConnectable(a.getCell())&&\nthis.marker.getValidState()!=a.getState()?(this.marker.highlight.shape.stroke=\"transparent\",this.currentState=null):this.marker.highlight.shape.stroke=mxConstants.DEFAULT_VALID_COLOR,this.marker.highlight.shape.strokewidth=mxConstants.HIGHLIGHT_STROKEWIDTH/b/b,this.marker.highlight.repaint()))}};mxConnectionHandler.prototype.isCellEnabled=function(a){return!0};\nmxConnectionHandler.prototype.convertWaypoint=function(a){var b=this.graph.getView().getScale(),c=this.graph.getView().getTranslate();a.x=a.x/b-c.x;a.y=a.y/b-c.y};\nmxConnectionHandler.prototype.snapToPreview=function(a,b){if(!mxEvent.isAltDown(a.getEvent())&&null!=this.previous){var c=this.graph.gridSize*this.graph.view.scale/2,d=null!=this.sourceConstraint?this.first:new mxPoint(this.previous.getCenterX(),this.previous.getCenterY());Math.abs(d.x-a.getGraphX())<c&&(b.x=d.x);Math.abs(d.y-a.getGraphY())<c&&(b.y=d.y)}};\nmxConnectionHandler.prototype.mouseMove=function(a,b){if(b.isConsumed()||!this.ignoreMouseDown&&null==this.first&&this.graph.isMouseDown)this.constraintHandler.reset();else{this.isEnabled()||null==this.currentState||(this.destroyIcons(),this.currentState=null);a=this.graph.getView();var c=a.scale,d=a.translate;a=new mxPoint(b.getGraphX(),b.getGraphY());this.error=null;this.graph.isGridEnabledEvent(b.getEvent())&&(a=new mxPoint((this.graph.snap(a.x/c-d.x)+d.x)*c,(this.graph.snap(a.y/c-d.y)+d.y)*c));\nthis.snapToPreview(b,a);this.currentPoint=a;(null!=this.first||this.isEnabled()&&this.graph.isEnabled())&&(null!=this.shape||null==this.first||Math.abs(b.getGraphX()-this.first.x)>this.graph.tolerance||Math.abs(b.getGraphY()-this.first.y)>this.graph.tolerance)&&this.updateCurrentState(b,a);if(null!=this.first){var e=null;c=a;null!=this.constraintHandler.currentConstraint&&null!=this.constraintHandler.currentFocus&&null!=this.constraintHandler.currentPoint?(e=this.constraintHandler.currentConstraint,\nc=this.constraintHandler.currentPoint.clone()):null!=this.previous&&mxEvent.isShiftDown(b.getEvent())&&!this.graph.isIgnoreTerminalEvent(b.getEvent())&&(Math.abs(this.previous.getCenterX()-a.x)<Math.abs(this.previous.getCenterY()-a.y)?a.x=this.previous.getCenterX():a.y=this.previous.getCenterY());d=this.first;if(null!=this.selectedIcon){var f=this.selectedIcon.bounds.width,g=this.selectedIcon.bounds.height;null!=this.currentState&&this.targetConnectImage?(f=this.getIconPosition(this.selectedIcon,\nthis.currentState),this.selectedIcon.bounds.x=f.x,this.selectedIcon.bounds.y=f.y):(f=new mxRectangle(b.getGraphX()+this.connectIconOffset.x,b.getGraphY()+this.connectIconOffset.y,f,g),this.selectedIcon.bounds=f);this.selectedIcon.redraw()}null!=this.edgeState?(this.updateEdgeState(c,e),c=this.edgeState.absolutePoints[this.edgeState.absolutePoints.length-1],d=this.edgeState.absolutePoints[0]):(null!=this.currentState&&null==this.constraintHandler.currentConstraint&&(f=this.getTargetPerimeterPoint(this.currentState,\nb),null!=f&&(c=f)),null==this.sourceConstraint&&null!=this.previous&&(f=this.getSourcePerimeterPoint(this.previous,null!=this.waypoints&&0<this.waypoints.length?this.waypoints[0]:c,b),null!=f&&(d=f)));if(null==this.currentState&&this.movePreviewAway){f=d;null!=this.edgeState&&2<=this.edgeState.absolutePoints.length&&(e=this.edgeState.absolutePoints[this.edgeState.absolutePoints.length-2],null!=e&&(f=e));e=c.x-f.x;f=c.y-f.y;g=Math.sqrt(e*e+f*f);if(0==g)return;this.originalPoint=c.clone();c.x-=4*e/\ng;c.y-=4*f/g}else this.originalPoint=null;null==this.shape&&(e=Math.abs(b.getGraphX()-this.first.x),f=Math.abs(b.getGraphY()-this.first.y),e>this.graph.tolerance||f>this.graph.tolerance)&&(this.shape=this.createShape(),null!=this.edgeState&&this.shape.apply(this.edgeState),this.updateCurrentState(b,a));null!=this.shape&&(null!=this.edgeState?this.shape.points=this.edgeState.absolutePoints:(a=[d],null!=this.waypoints&&(a=a.concat(this.waypoints)),a.push(c),this.shape.points=a),this.drawPreview());\nnull!=this.cursor&&(this.graph.container.style.cursor=this.cursor);mxEvent.consume(b.getEvent());b.consume()}else this.isEnabled()&&this.graph.isEnabled()?this.previous!=this.currentState&&null==this.edgeState?(this.destroyIcons(),null!=this.currentState&&null==this.error&&null==this.constraintHandler.currentConstraint&&(this.icons=this.createIcons(this.currentState),null==this.icons&&(this.currentState.setCursor(mxConstants.CURSOR_CONNECT),b.consume())),this.previous=this.currentState):this.previous!=\nthis.currentState||null==this.currentState||null!=this.icons||this.graph.isMouseDown||b.consume():this.constraintHandler.reset();if(!this.graph.isMouseDown&&null!=this.currentState&&null!=this.icons){a=!1;c=b.getSource();for(d=0;d<this.icons.length&&!a;d++)a=c==this.icons[d].node||c.parentNode==this.icons[d].node;a||this.updateIcons(this.currentState,this.icons,b)}}};\nmxConnectionHandler.prototype.updateEdgeState=function(a,b){null!=this.sourceConstraint&&null!=this.sourceConstraint.point&&(this.edgeState.style[mxConstants.STYLE_EXIT_X]=this.sourceConstraint.point.x,this.edgeState.style[mxConstants.STYLE_EXIT_Y]=this.sourceConstraint.point.y);null!=b&&null!=b.point?(this.edgeState.style[mxConstants.STYLE_ENTRY_X]=b.point.x,this.edgeState.style[mxConstants.STYLE_ENTRY_Y]=b.point.y):(delete this.edgeState.style[mxConstants.STYLE_ENTRY_X],delete this.edgeState.style[mxConstants.STYLE_ENTRY_Y]);\nthis.edgeState.absolutePoints=[null,null!=this.currentState?null:a];this.graph.view.updateFixedTerminalPoint(this.edgeState,this.previous,!0,this.sourceConstraint);null!=this.currentState&&(null==b&&(b=this.graph.getConnectionConstraint(this.edgeState,this.previous,!1)),this.edgeState.setAbsoluteTerminalPoint(null,!1),this.graph.view.updateFixedTerminalPoint(this.edgeState,this.currentState,!1,b));a=null;if(null!=this.waypoints)for(a=[],b=0;b<this.waypoints.length;b++){var c=this.waypoints[b].clone();\nthis.convertWaypoint(c);a[b]=c}this.graph.view.updatePoints(this.edgeState,a,this.previous,this.currentState);this.graph.view.updateFloatingTerminalPoints(this.edgeState,this.previous,this.currentState)};\nmxConnectionHandler.prototype.getTargetPerimeterPoint=function(a,b){b=null;var c=a.view,d=c.getPerimeterFunction(a);if(null!=d){var e=null!=this.waypoints&&0<this.waypoints.length?this.waypoints[this.waypoints.length-1]:new mxPoint(this.previous.getCenterX(),this.previous.getCenterY());a=d(c.getPerimeterBounds(a),this.edgeState,e,!1);null!=a&&(b=a)}else b=new mxPoint(a.getCenterX(),a.getCenterY());return b};\nmxConnectionHandler.prototype.getSourcePerimeterPoint=function(a,b,c){c=null;var d=a.view,e=d.getPerimeterFunction(a),f=new mxPoint(a.getCenterX(),a.getCenterY());if(null!=e){var g=mxUtils.getValue(a.style,mxConstants.STYLE_ROTATION,0),k=Math.PI/180*-g;0!=g&&(b=mxUtils.getRotatedPoint(new mxPoint(b.x,b.y),Math.cos(k),Math.sin(k),f));a=e(d.getPerimeterBounds(a),a,b,!1);null!=a&&(0!=g&&(a=mxUtils.getRotatedPoint(new mxPoint(a.x,a.y),Math.cos(-k),Math.sin(-k),f)),c=a)}else c=f;return c};\nmxConnectionHandler.prototype.updateIcons=function(a,b,c){};mxConnectionHandler.prototype.isStopEvent=function(a){return null!=a.getState()};\nmxConnectionHandler.prototype.addWaypointForEvent=function(a){var b=mxUtils.convertPoint(this.graph.container,a.getX(),a.getY()),c=Math.abs(b.x-this.first.x);b=Math.abs(b.y-this.first.y);if(null!=this.waypoints||1<this.mouseDownCounter&&(c>this.graph.tolerance||b>this.graph.tolerance))null==this.waypoints&&(this.waypoints=[]),c=this.graph.view.scale,b=new mxPoint(this.graph.snap(a.getGraphX()/c)*c,this.graph.snap(a.getGraphY()/c)*c),this.waypoints.push(b)};\nmxConnectionHandler.prototype.checkConstraints=function(a,b){return null==a||null==b||null==a.point||null==b.point||!a.point.equals(b.point)||a.dx!=b.dx||a.dy!=b.dy||a.perimeter!=b.perimeter};\nmxConnectionHandler.prototype.mouseUp=function(a,b){if(!b.isConsumed()&&this.isConnecting()){if(this.waypointsEnabled&&!this.isStopEvent(b)){this.addWaypointForEvent(b);b.consume();return}a=this.sourceConstraint;var c=this.constraintHandler.currentConstraint,d=null!=this.previous?this.previous.cell:null,e=null;null!=this.constraintHandler.currentConstraint&&null!=this.constraintHandler.currentFocus&&(e=this.constraintHandler.currentFocus.cell);null==e&&null!=this.currentState&&(e=this.currentState.cell);\nnull!=this.error||null!=d&&null!=e&&d==e&&!this.checkConstraints(a,c)?(null!=this.previous&&null!=this.marker.validState&&this.previous.cell==this.marker.validState.cell&&this.graph.selectCellForEvent(this.marker.source,b.getEvent()),null!=this.error&&0<this.error.length&&this.graph.validationAlert(this.error)):this.connect(d,e,b.getEvent(),b.getCell());this.destroyIcons();b.consume()}null!=this.first&&this.reset()};\nmxConnectionHandler.prototype.reset=function(){null!=this.shape&&(this.shape.destroy(),this.shape=null);null!=this.cursor&&null!=this.graph.container&&(this.graph.container.style.cursor=\"\");this.destroyIcons();this.marker.reset();this.constraintHandler.reset();this.sourceConstraint=this.error=this.previous=this.edgeState=this.currentPoint=this.originalPoint=null;this.mouseDownCounter=0;this.first=null;this.fireEvent(new mxEventObject(mxEvent.RESET))};\nmxConnectionHandler.prototype.drawPreview=function(){this.updatePreview(null==this.error);null!=this.edgeState&&(this.edgeState.shape=this.shape,this.graph.cellRenderer.postConfigureShape(this.edgeState),this.edgeState.shape=null);this.shape.redraw()};mxConnectionHandler.prototype.updatePreview=function(a){this.shape.strokewidth=this.getEdgeWidth(a);this.shape.stroke=this.getEdgeColor(a)};mxConnectionHandler.prototype.getEdgeColor=function(a){return a?mxConstants.VALID_COLOR:mxConstants.INVALID_COLOR};\nmxConnectionHandler.prototype.getEdgeWidth=function(a){return a?3:1};\nmxConnectionHandler.prototype.connect=function(a,b,c,d){if(null!=b||this.isCreateTarget(c)||this.graph.allowDanglingEdges){var e=this.graph.getModel(),f=!1,g=null;e.beginUpdate();try{if(null!=a&&null==b&&!this.graph.isIgnoreTerminalEvent(c)&&this.isCreateTarget(c)&&(b=this.createTargetVertex(c,a),null!=b)){d=this.graph.getDropTarget([b],c,d);f=!0;if(null!=d&&this.graph.getModel().isEdge(d))d=this.graph.getDefaultParent();else{var k=this.graph.getView().getState(d);if(null!=k){var l=e.getGeometry(b);\nl.x-=k.origin.x;l.y-=k.origin.y}}this.graph.addCell(b,d)}var m=this.graph.getDefaultParent(),n=this.graph.getReferenceTerminal(a),p=this.graph.getReferenceTerminal(b),q=m;null!=n&&null!=p?q=e.getNearestCommonAncestor(n,p):null!=n&&(q=e.getParent(n));null==q||e.isEdge(q)||q==e.getRoot()||(m=q);p=n=null;null!=this.edgeState&&(n=this.edgeState.cell.value,p=this.edgeState.cell.style);g=this.insertEdge(m,null,n,a,b,p);if(null!=g){this.graph.setConnectionConstraint(g,a,!0,this.sourceConstraint);this.graph.setConnectionConstraint(g,\nb,!1,this.constraintHandler.currentConstraint);null!=this.edgeState&&e.setGeometry(g,this.edgeState.cell.geometry);if(this.isInsertBefore(g,a,b,c,d)){for(l=a;null!=l.parent&&null!=l.geometry&&l.geometry.relative&&l.parent!=g.parent;)l=this.graph.model.getParent(l);null!=l&&null!=l.parent&&l.parent==g.parent&&e.add(m,g,l.parent.getIndex(l))}var r=e.getGeometry(g);null==r&&(r=new mxGeometry,r.relative=!0,e.setGeometry(g,r));if(null!=this.waypoints&&0<this.waypoints.length){var t=this.graph.view.scale,\nu=this.graph.view.translate;r.points=[];for(a=0;a<this.waypoints.length;a++){var x=this.waypoints[a];r.points.push(new mxPoint(x.x/t-u.x,x.y/t-u.y))}}if(null==b){var y=this.graph.view.translate;t=this.graph.view.scale;x=null!=this.originalPoint?new mxPoint(this.originalPoint.x/t-y.x,this.originalPoint.y/t-y.y):new mxPoint(this.currentPoint.x/t-y.x,this.currentPoint.y/t-y.y);x.x-=this.graph.panDx/this.graph.view.scale;x.y-=this.graph.panDy/this.graph.view.scale;k=this.graph.getView().getState(e.getParent(g));\nnull!=k&&(x.x-=k.origin.x,x.y-=k.origin.y);r.setTerminalPoint(x,!1)}this.fireEvent(new mxEventObject(mxEvent.CONNECT,\"cell\",g,\"terminal\",b,\"event\",c,\"target\",d,\"terminalInserted\",f))}}catch(B){mxLog.show(),mxLog.debug(B.message)}finally{e.endUpdate()}this.select&&this.selectCells(g,f?b:null)}};mxConnectionHandler.prototype.selectCells=function(a,b){this.graph.setSelectionCell(a)};\nmxConnectionHandler.prototype.insertEdge=function(a,b,c,d,e,f){if(null==this.factoryMethod)return this.graph.insertEdge(a,b,c,d,e,f);b=this.createEdge(c,d,e,f);return b=this.graph.addEdge(b,a,d,e)};\nmxConnectionHandler.prototype.createTargetVertex=function(a,b){for(a=this.graph.getCellGeometry(b);null!=a&&a.relative;)b=this.graph.getModel().getParent(b),a=this.graph.getCellGeometry(b);var c=this.graph.cloneCell(b);a=this.graph.getModel().getGeometry(c);if(null!=a){var d=this.graph.view.translate,e=this.graph.view.scale,f=new mxPoint(this.currentPoint.x/e-d.x,this.currentPoint.y/e-d.y);a.x=Math.round(f.x-a.width/2-this.graph.panDx/e);a.y=Math.round(f.y-a.height/2-this.graph.panDy/e);f=this.getAlignmentTolerance();\nif(0<f){var g=this.graph.view.getState(b);null!=g&&(b=g.x/e-d.x,d=g.y/e-d.y,Math.abs(b-a.x)<=f&&(a.x=Math.round(b)),Math.abs(d-a.y)<=f&&(a.y=Math.round(d)))}}return c};mxConnectionHandler.prototype.getAlignmentTolerance=function(a){return this.graph.isGridEnabled()?this.graph.gridSize/2:this.graph.tolerance};\nmxConnectionHandler.prototype.createEdge=function(a,b,c,d){var e=null;null!=this.factoryMethod&&(e=this.factoryMethod(b,c,d));null==e&&(e=new mxCell(a||\"\"),e.setEdge(!0),e.setStyle(d),a=new mxGeometry,a.relative=!0,e.setGeometry(a));return e};\nmxConnectionHandler.prototype.destroy=function(){this.graph.removeMouseListener(this);null!=this.shape&&(this.shape.destroy(),this.shape=null);null!=this.marker&&(this.marker.destroy(),this.marker=null);null!=this.constraintHandler&&(this.constraintHandler.destroy(),this.constraintHandler=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.graph.getView().removeListener(this.changeHandler),this.changeHandler=null);null!=this.drillHandler&&(this.graph.removeListener(this.drillHandler),\nthis.graph.getView().removeListener(this.drillHandler),this.drillHandler=null);null!=this.escapeHandler&&(this.graph.removeListener(this.escapeHandler),this.escapeHandler=null)};\nfunction mxConstraintHandler(a){this.graph=a;this.resetHandler=mxUtils.bind(this,function(b,c){null!=this.currentFocus&&null==this.graph.view.getState(this.currentFocus.cell)?this.reset():this.redraw()});this.graph.model.addListener(mxEvent.CHANGE,this.resetHandler);this.graph.view.addListener(mxEvent.SCALE_AND_TRANSLATE,this.resetHandler);this.graph.view.addListener(mxEvent.TRANSLATE,this.resetHandler);this.graph.view.addListener(mxEvent.SCALE,this.resetHandler);this.graph.addListener(mxEvent.ROOT,\nthis.resetHandler)}mxConstraintHandler.prototype.pointImage=new mxImage(mxClient.imageBasePath+\"/point.gif\",5,5);mxConstraintHandler.prototype.graph=null;mxConstraintHandler.prototype.enabled=!0;mxConstraintHandler.prototype.highlightColor=mxConstants.DEFAULT_VALID_COLOR;mxConstraintHandler.prototype.isEnabled=function(){return this.enabled};mxConstraintHandler.prototype.setEnabled=function(a){this.enabled=a};\nmxConstraintHandler.prototype.reset=function(){if(null!=this.focusIcons){for(var a=0;a<this.focusIcons.length;a++)this.focusIcons[a].destroy();this.focusIcons=null}null!=this.focusHighlight&&(this.focusHighlight.destroy(),this.focusHighlight=null);this.focusPoints=this.currentFocus=this.currentPoint=this.currentFocusArea=this.currentConstraint=null};mxConstraintHandler.prototype.getTolerance=function(a){return this.graph.getTolerance()};\nmxConstraintHandler.prototype.getImageForConstraint=function(a,b,c){return this.pointImage};mxConstraintHandler.prototype.isEventIgnored=function(a,b){return!1};mxConstraintHandler.prototype.isStateIgnored=function(a,b){return!1};mxConstraintHandler.prototype.destroyIcons=function(){if(null!=this.focusIcons){for(var a=0;a<this.focusIcons.length;a++)this.focusIcons[a].destroy();this.focusPoints=this.focusIcons=null}};\nmxConstraintHandler.prototype.destroyFocusHighlight=function(){null!=this.focusHighlight&&(this.focusHighlight.destroy(),this.focusHighlight=null)};mxConstraintHandler.prototype.isKeepFocusEvent=function(a){return mxEvent.isShiftDown(a.getEvent())&&!mxEvent.isAltDown(a.getEvent())};\nmxConstraintHandler.prototype.getCellForEvent=function(a,b){var c=a.getCell();null!=c||null==b||a.getGraphX()==b.x&&a.getGraphY()==b.y||(c=this.graph.getCellAt(b.x,b.y));null==c||this.graph.isCellConnectable(c)||(a=this.graph.getModel().getParent(c),this.graph.getModel().isVertex(a)&&this.graph.isCellConnectable(a)&&(c=a));return this.graph.isCellLocked(c)?null:c};\nmxConstraintHandler.prototype.update=function(a,b,c,d){if(this.isEnabled()&&!this.isEventIgnored(a)){null==this.mouseleaveHandler&&null!=this.graph.container&&(this.mouseleaveHandler=mxUtils.bind(this,function(){this.reset()}),mxEvent.addListener(this.graph.container,\"mouseleave\",this.resetHandler));var e=this.getTolerance(a),f=null!=d?d.x:a.getGraphX(),g=null!=d?d.y:a.getGraphY();f=new mxRectangle(f-e,g-e,2*e,2*e);e=new mxRectangle(a.getGraphX()-e,a.getGraphY()-e,2*e,2*e);var k=this.graph.view.getState(this.getCellForEvent(a,\nd));this.isKeepFocusEvent(a)||null!=this.currentFocusArea&&null!=this.currentFocus&&null==k&&this.graph.getModel().isVertex(this.currentFocus.cell)&&mxUtils.intersects(this.currentFocusArea,e)||k==this.currentFocus||(this.currentFocus=this.currentFocusArea=null,this.setFocus(a,k,b));a=this.currentPoint=this.currentConstraint=null;if(null!=this.focusIcons&&null!=this.constraints&&(null==k||this.currentFocus==k)){g=e.getCenterX();for(var l=e.getCenterY(),m=0;m<this.focusIcons.length;m++){var n=g-this.focusIcons[m].bounds.getCenterX(),\np=l-this.focusIcons[m].bounds.getCenterY();n=n*n+p*p;if((this.intersects(this.focusIcons[m],e,b,c)||null!=d&&this.intersects(this.focusIcons[m],f,b,c))&&(null==a||n<a)){this.currentConstraint=this.constraints[m];this.currentPoint=this.focusPoints[m];a=n;n=this.focusIcons[m].bounds.clone();n.grow(mxConstants.HIGHLIGHT_SIZE+1);--n.width;--n.height;if(null==this.focusHighlight){p=this.createHighlightShape();p.dialect=mxConstants.DIALECT_SVG;p.pointerEvents=!1;p.init(this.graph.getView().getOverlayPane());\nthis.focusHighlight=p;var q=mxUtils.bind(this,function(){return null!=this.currentFocus?this.currentFocus:k});mxEvent.redirectMouseEvents(p.node,this.graph,q)}this.focusHighlight.bounds=n;this.focusHighlight.redraw()}}}null==this.currentConstraint&&this.destroyFocusHighlight()}else this.currentPoint=this.currentFocus=this.currentConstraint=null};\nmxConstraintHandler.prototype.redraw=function(){if(null!=this.currentFocus&&null!=this.constraints&&null!=this.focusIcons){var a=this.graph.view.getState(this.currentFocus.cell);this.currentFocus=a;this.currentFocusArea=new mxRectangle(a.x,a.y,a.width,a.height);for(var b=0;b<this.constraints.length;b++){var c=this.graph.getConnectionPoint(a,this.constraints[b]),d=this.getImageForConstraint(a,this.constraints[b],c);d=new mxRectangle(Math.round(c.x-d.width/2),Math.round(c.y-d.height/2),d.width,d.height);\nthis.focusIcons[b].bounds=d;this.focusIcons[b].redraw();this.currentFocusArea.add(this.focusIcons[b].bounds);this.focusPoints[b]=c}}};\nmxConstraintHandler.prototype.setFocus=function(a,b,c){this.constraints=null!=b&&!this.isStateIgnored(b,c)&&this.graph.isCellConnectable(b.cell)?this.isEnabled()?this.graph.getAllConnectionConstraints(b,c)||[]:[]:null;if(null!=this.constraints){this.currentFocus=b;this.currentFocusArea=new mxRectangle(b.x,b.y,b.width,b.height);if(null!=this.focusIcons){for(c=0;c<this.focusIcons.length;c++)this.focusIcons[c].destroy();this.focusPoints=this.focusIcons=null}this.focusPoints=[];this.focusIcons=[];for(c=\n0;c<this.constraints.length;c++){var d=this.graph.getConnectionPoint(b,this.constraints[c]),e=this.getImageForConstraint(b,this.constraints[c],d),f=e.src;e=new mxRectangle(Math.round(d.x-e.width/2),Math.round(d.y-e.height/2),e.width,e.height);f=new mxImageShape(e,f);f.dialect=this.graph.dialect!=mxConstants.DIALECT_SVG?mxConstants.DIALECT_MIXEDHTML:mxConstants.DIALECT_SVG;f.preserveImageAspect=!1;f.init(this.graph.getView().getDecoratorPane());null!=f.node.previousSibling&&f.node.parentNode.insertBefore(f.node,\nf.node.parentNode.firstChild);e=mxUtils.bind(this,function(){return null!=this.currentFocus?this.currentFocus:b});f.redraw();mxEvent.redirectMouseEvents(f.node,this.graph,e);this.currentFocusArea.add(f.bounds);this.focusIcons.push(f);this.focusPoints.push(d)}this.currentFocusArea.grow(this.getTolerance(a))}else this.destroyIcons(),this.destroyFocusHighlight()};\nmxConstraintHandler.prototype.createHighlightShape=function(){var a=new mxRectangleShape(null,this.highlightColor,this.highlightColor,mxConstants.HIGHLIGHT_STROKEWIDTH);a.opacity=mxConstants.HIGHLIGHT_OPACITY;return a};mxConstraintHandler.prototype.intersects=function(a,b,c,d){return mxUtils.intersects(a.bounds,b)};\nmxConstraintHandler.prototype.destroy=function(){this.reset();null!=this.resetHandler&&(this.graph.model.removeListener(this.resetHandler),this.graph.view.removeListener(this.resetHandler),this.graph.removeListener(this.resetHandler),this.resetHandler=null);null!=this.mouseleaveHandler&&null!=this.graph.container&&(mxEvent.removeListener(this.graph.container,\"mouseleave\",this.mouseleaveHandler),this.mouseleaveHandler=null)};\nfunction mxRubberband(a){null!=a&&(this.graph=a,this.graph.addMouseListener(this),this.forceRubberbandHandler=mxUtils.bind(this,function(b,c){b=c.getProperty(\"eventName\");c=c.getProperty(\"event\");if(b==mxEvent.MOUSE_DOWN&&this.isForceRubberbandEvent(c)){b=mxUtils.getOffset(this.graph.container);var d=mxUtils.getScrollOrigin(this.graph.container);d.x-=b.x;d.y-=b.y;this.start(c.getX()+d.x,c.getY()+d.y);c.consume(!1)}}),this.graph.addListener(mxEvent.FIRE_MOUSE_EVENT,this.forceRubberbandHandler),this.panHandler=\nmxUtils.bind(this,function(){this.repaint()}),this.graph.addListener(mxEvent.PAN,this.panHandler),this.gestureHandler=mxUtils.bind(this,function(b,c){null!=this.first&&this.reset()}),this.graph.addListener(mxEvent.GESTURE,this.gestureHandler),mxClient.IS_IE&&mxEvent.addListener(window,\"unload\",mxUtils.bind(this,function(){this.destroy()})))}mxRubberband.prototype.defaultOpacity=20;mxRubberband.prototype.enabled=!0;mxRubberband.prototype.div=null;mxRubberband.prototype.sharedDiv=null;\nmxRubberband.prototype.currentX=0;mxRubberband.prototype.currentY=0;mxRubberband.prototype.fadeOut=!1;mxRubberband.prototype.isEnabled=function(){return this.enabled};mxRubberband.prototype.setEnabled=function(a){this.enabled=a};mxRubberband.prototype.isForceRubberbandEvent=function(a){return mxEvent.isAltDown(a.getEvent())};\nmxRubberband.prototype.mouseDown=function(a,b){if(!b.isConsumed()&&this.isEnabled()&&this.graph.isEnabled()&&null==b.getState()&&!mxEvent.isMultiTouchEvent(b.getEvent())){a=mxUtils.getOffset(this.graph.container);var c=mxUtils.getScrollOrigin(this.graph.container);c.x-=a.x;c.y-=a.y;this.start(b.getX()+c.x,b.getY()+c.y);b.consume(!1)}};\nmxRubberband.prototype.start=function(a,b){function c(e){e=new mxMouseEvent(e);var f=mxUtils.convertPoint(d,e.getX(),e.getY());e.graphX=f.x;e.graphY=f.y;return e}this.first=new mxPoint(a,b);var d=this.graph.container;this.dragHandler=mxUtils.bind(this,function(e){this.mouseMove(this.graph,c(e))});this.dropHandler=mxUtils.bind(this,function(e){this.mouseUp(this.graph,c(e))});mxClient.IS_FF&&mxEvent.addGestureListeners(document,null,this.dragHandler,this.dropHandler)};\nmxRubberband.prototype.mouseMove=function(a,b){if(!b.isConsumed()&&null!=this.first){var c=mxUtils.getScrollOrigin(this.graph.container);a=mxUtils.getOffset(this.graph.container);c.x-=a.x;c.y-=a.y;a=b.getX()+c.x;c=b.getY()+c.y;var d=this.first.x-a,e=this.first.y-c,f=this.graph.tolerance;if(null!=this.div||Math.abs(d)>f||Math.abs(e)>f)null==this.div&&(this.div=this.createShape()),mxUtils.clearSelection(),this.update(a,c),b.consume()}};\nmxRubberband.prototype.createShape=function(){null==this.sharedDiv&&(this.sharedDiv=document.createElement(\"div\"),this.sharedDiv.className=\"mxRubberband\",mxUtils.setOpacity(this.sharedDiv,this.defaultOpacity));this.graph.container.appendChild(this.sharedDiv);var a=this.sharedDiv;mxClient.IS_SVG&&(!mxClient.IS_IE||10<=document.documentMode)&&this.fadeOut&&(this.sharedDiv=null);return a};mxRubberband.prototype.isActive=function(a,b){return null!=this.div&&\"none\"!=this.div.style.display};\nmxRubberband.prototype.mouseUp=function(a,b){a=this.isActive();this.reset();a&&(this.execute(b.getEvent()),b.consume())};mxRubberband.prototype.execute=function(a){var b=new mxRectangle(this.x,this.y,this.width,this.height);this.graph.selectRegion(b,a)};\nmxRubberband.prototype.reset=function(){if(null!=this.div)if(mxClient.IS_SVG&&(!mxClient.IS_IE||10<=document.documentMode)&&this.fadeOut){var a=this.div;mxUtils.setPrefixedStyle(a.style,\"transition\",\"all 0.2s linear\");a.style.pointerEvents=\"none\";a.style.opacity=0;window.setTimeout(function(){a.parentNode.removeChild(a)},200)}else this.div.parentNode.removeChild(this.div);mxEvent.removeGestureListeners(document,null,this.dragHandler,this.dropHandler);this.dropHandler=this.dragHandler=null;this.currentY=\nthis.currentX=0;this.div=this.first=null};mxRubberband.prototype.update=function(a,b){this.currentX=a;this.currentY=b;this.repaint()};\nmxRubberband.prototype.repaint=function(){if(null!=this.div){var a=this.currentX-this.graph.panDx,b=this.currentY-this.graph.panDy;this.x=Math.min(this.first.x,a);this.y=Math.min(this.first.y,b);this.width=Math.max(this.first.x,a)-this.x;this.height=Math.max(this.first.y,b)-this.y;this.div.style.left=this.x+0+\"px\";this.div.style.top=this.y+0+\"px\";this.div.style.width=Math.max(1,this.width)+\"px\";this.div.style.height=Math.max(1,this.height)+\"px\"}};\nmxRubberband.prototype.destroy=function(){this.destroyed||(this.destroyed=!0,this.graph.removeMouseListener(this),this.graph.removeListener(this.forceRubberbandHandler),this.graph.removeListener(this.panHandler),this.reset(),null!=this.sharedDiv&&(this.sharedDiv=null))};function mxHandle(a,b,c,d){this.graph=a.view.graph;this.state=a;this.cursor=null!=b?b:this.cursor;this.image=null!=c?c:this.image;this.shape=null!=d?d:null;this.init()}mxHandle.prototype.cursor=\"default\";mxHandle.prototype.image=null;\nmxHandle.prototype.ignoreGrid=!1;mxHandle.prototype.getPosition=function(a){};mxHandle.prototype.setPosition=function(a,b,c){};mxHandle.prototype.execute=function(a){};mxHandle.prototype.copyStyle=function(a){this.graph.setCellStyles(a,this.state.style[a],[this.state.cell])};\nmxHandle.prototype.processEvent=function(a){var b=this.graph.view.scale,c=this.graph.view.translate;c=new mxPoint(a.getGraphX()/b-c.x,a.getGraphY()/b-c.y);null!=this.shape&&null!=this.shape.bounds&&(c.x-=this.shape.bounds.width/b/4,c.y-=this.shape.bounds.height/b/4);b=-mxUtils.toRadians(this.getRotation());var d=-mxUtils.toRadians(this.getTotalRotation())-b;c=this.flipPoint(this.rotatePoint(this.snapPoint(this.rotatePoint(c,b),this.ignoreGrid||!this.graph.isGridEnabledEvent(a.getEvent())),d));this.setPosition(this.state.getPaintBounds(),\nc,a);this.redraw()};mxHandle.prototype.positionChanged=function(){null!=this.state.text&&this.state.text.apply(this.state);null!=this.state.shape&&this.graph.cellRenderer.configureShape(this.state);this.graph.cellRenderer.redraw(this.state,!0)};mxHandle.prototype.getRotation=function(){return null!=this.state.shape?this.state.shape.getRotation():0};mxHandle.prototype.getTotalRotation=function(){return null!=this.state.shape?this.state.shape.getShapeRotation():0};\nmxHandle.prototype.init=function(){var a=this.isHtmlRequired();null!=this.image?(this.shape=new mxImageShape(new mxRectangle(0,0,this.image.width,this.image.height),this.image.src),this.shape.preserveImageAspect=!1):null==this.shape&&(this.shape=this.createShape(a));this.initShape(a)};mxHandle.prototype.createShape=function(a){a=new mxRectangle(0,0,mxConstants.HANDLE_SIZE,mxConstants.HANDLE_SIZE);return new mxRectangleShape(a,mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR)};\nmxHandle.prototype.initShape=function(a){a&&this.shape.isHtmlAllowed()?(this.shape.dialect=mxConstants.DIALECT_STRICTHTML,this.shape.init(this.graph.container)):(this.shape.dialect=this.graph.dialect!=mxConstants.DIALECT_SVG?mxConstants.DIALECT_MIXEDHTML:mxConstants.DIALECT_SVG,null!=this.cursor&&this.shape.init(this.graph.getView().getOverlayPane()));mxEvent.redirectMouseEvents(this.shape.node,this.graph,this.state);this.shape.node.style.cursor=this.cursor};\nmxHandle.prototype.redraw=function(){if(null!=this.shape&&null!=this.state.shape){var a=this.getPosition(this.state.getPaintBounds());if(null!=a){var b=mxUtils.toRadians(this.getTotalRotation());a=this.rotatePoint(this.flipPoint(a),b);b=this.graph.view.scale;var c=this.graph.view.translate;this.shape.bounds.x=Math.floor((a.x+c.x)*b-this.shape.bounds.width/2);this.shape.bounds.y=Math.floor((a.y+c.y)*b-this.shape.bounds.height/2);this.shape.redraw()}}};\nmxHandle.prototype.isHtmlRequired=function(){return null!=this.state.text&&this.state.text.node.parentNode==this.graph.container};mxHandle.prototype.rotatePoint=function(a,b){var c=this.state.getCellBounds();c=new mxPoint(c.getCenterX(),c.getCenterY());return mxUtils.getRotatedPoint(a,Math.cos(b),Math.sin(b),c)};\nmxHandle.prototype.flipPoint=function(a){if(null!=this.state.shape){var b=this.state.getCellBounds();this.state.shape.flipH&&(a.x=2*b.x+b.width-a.x);this.state.shape.flipV&&(a.y=2*b.y+b.height-a.y)}return a};mxHandle.prototype.snapPoint=function(a,b){b||(a.x=this.graph.snap(a.x),a.y=this.graph.snap(a.y));return a};mxHandle.prototype.setVisible=function(a){null!=this.shape&&null!=this.shape.node&&(this.shape.node.style.display=a?\"\":\"none\")};\nmxHandle.prototype.reset=function(){this.setVisible(!0);this.state.style=this.graph.getCellStyle(this.state.cell);this.positionChanged()};mxHandle.prototype.destroy=function(){null!=this.shape&&(this.shape.destroy(),this.shape=null)};\nfunction mxVertexHandler(a){null!=a&&(this.state=a,this.init(),this.escapeHandler=mxUtils.bind(this,function(b,c){this.livePreview&&null!=this.index&&(this.state.view.graph.cellRenderer.redraw(this.state,!0),this.state.view.invalidate(this.state.cell),this.state.invalid=!1,this.state.view.validate());this.reset()}),this.state.view.graph.addListener(mxEvent.ESCAPE,this.escapeHandler))}mxVertexHandler.prototype.graph=null;mxVertexHandler.prototype.state=null;mxVertexHandler.prototype.singleSizer=!1;\nmxVertexHandler.prototype.index=null;mxVertexHandler.prototype.allowHandleBoundsCheck=!0;mxVertexHandler.prototype.handleImage=null;mxVertexHandler.prototype.handlesVisible=!0;mxVertexHandler.prototype.tolerance=0;mxVertexHandler.prototype.rotationEnabled=!1;mxVertexHandler.prototype.parentHighlightEnabled=!1;mxVertexHandler.prototype.rotationRaster=!0;mxVertexHandler.prototype.rotationCursor=\"crosshair\";mxVertexHandler.prototype.livePreview=!1;mxVertexHandler.prototype.movePreviewToFront=!1;\nmxVertexHandler.prototype.manageSizers=!1;mxVertexHandler.prototype.constrainGroupByChildren=!1;mxVertexHandler.prototype.rotationHandleVSpacing=-16;mxVertexHandler.prototype.horizontalOffset=0;mxVertexHandler.prototype.verticalOffset=0;\nmxVertexHandler.prototype.init=function(){this.graph=this.state.view.graph;this.selectionBounds=this.getSelectionBounds(this.state);this.bounds=new mxRectangle(this.selectionBounds.x,this.selectionBounds.y,this.selectionBounds.width,this.selectionBounds.height);this.selectionBorder=this.createSelectionShape(this.bounds);this.selectionBorder.dialect=mxConstants.DIALECT_SVG;this.selectionBorder.svgStrokeTolerance=0;this.selectionBorder.pointerEvents=!1;this.selectionBorder.rotation=Number(this.state.style[mxConstants.STYLE_ROTATION]||\n\"0\");this.selectionBorder.init(this.graph.getView().getOverlayPane());mxEvent.redirectMouseEvents(this.selectionBorder.node,this.graph,this.state);this.graph.isCellMovable(this.state.cell)&&!this.graph.isCellLocked(this.state.cell)&&this.selectionBorder.setCursor(mxConstants.CURSOR_MOVABLE_VERTEX);this.refresh();this.redraw();this.constrainGroupByChildren&&this.updateMinBounds()};\nmxVertexHandler.prototype.isHandlesVisible=function(){return 0>=mxGraphHandler.prototype.maxCells||this.graph.getSelectionCount()<=mxGraphHandler.prototype.maxCells};\nmxVertexHandler.prototype.refresh=function(){var a=this.isHandlesVisible();null==this.sizers&&a?this.sizers=this.createSizers():null==this.sizers||a||this.destroySizers();this.graph.isCellLocked(this.state.cell)||null!=this.customHandles?this.graph.isCellLocked(this.state.cell)&&null!=this.customHandles&&this.destroyCustomHandles():this.customHandles=this.createCustomHandles()};\nmxVertexHandler.prototype.isRotationHandleVisible=function(){return this.graph.isEnabled()&&this.rotationEnabled&&!this.graph.isCellLocked(this.state.cell)&&this.graph.isCellRotatable(this.state.cell)&&this.isHandlesVisible()};mxVertexHandler.prototype.isConstrainedEvent=function(a){return mxEvent.isShiftDown(a.getEvent())||\"fixed\"==this.state.style[mxConstants.STYLE_ASPECT]};mxVertexHandler.prototype.isCenteredEvent=function(a,b){return!1};mxVertexHandler.prototype.createCustomHandles=function(){return null};\nmxVertexHandler.prototype.updateMinBounds=function(){var a=this.graph.getChildCells(this.state.cell);if(0<a.length&&(this.minBounds=this.graph.view.getBounds(a),null!=this.minBounds)){a=this.state.view.scale;var b=this.state.view.translate;this.minBounds.x-=this.state.x;this.minBounds.y-=this.state.y;this.minBounds.x/=a;this.minBounds.y/=a;this.minBounds.width/=a;this.minBounds.height/=a;this.x0=this.state.x/a-b.x;this.y0=this.state.y/a-b.y}};\nmxVertexHandler.prototype.getSelectionBounds=function(a){return new mxRectangle(Math.round(a.x),Math.round(a.y),Math.round(a.width),Math.round(a.height))};mxVertexHandler.prototype.createParentHighlightShape=function(a){return this.createSelectionShape(a)};mxVertexHandler.prototype.createSelectionShape=function(a){a=new mxRectangleShape(mxRectangle.fromRectangle(a),null,this.getSelectionColor());a.strokewidth=this.getSelectionStrokeWidth();a.isDashed=this.isSelectionDashed();return a};\nmxVertexHandler.prototype.getSelectionColor=function(){return this.graph.isCellEditable(this.state.cell)?mxConstants.VERTEX_SELECTION_COLOR:mxConstants.LOCKED_HANDLE_FILLCOLOR};mxVertexHandler.prototype.getSelectionStrokeWidth=function(){return mxConstants.VERTEX_SELECTION_STROKEWIDTH};mxVertexHandler.prototype.isSelectionDashed=function(){return mxConstants.VERTEX_SELECTION_DASHED};\nmxVertexHandler.prototype.createSizer=function(a,b,c,d){c=c||mxConstants.HANDLE_SIZE;c=new mxRectangle(0,0,c,c);d=this.createSizerShape(c,b,d,this.handleImage);d.isHtmlAllowed()&&null!=this.state.text&&this.state.text.node.parentNode==this.graph.container?(--d.bounds.height,--d.bounds.width,d.dialect=mxConstants.DIALECT_STRICTHTML,d.init(this.graph.container)):(d.dialect=this.graph.dialect!=mxConstants.DIALECT_SVG?mxConstants.DIALECT_MIXEDHTML:mxConstants.DIALECT_SVG,d.init(this.graph.getView().getOverlayPane()));\nmxEvent.redirectMouseEvents(d.node,this.graph,this.state);this.graph.isEnabled()&&d.setCursor(a);this.isSizerVisible(b)||(d.visible=!1);return d};mxVertexHandler.prototype.isSizerVisible=function(a){return!0};\nmxVertexHandler.prototype.createSizerShape=function(a,b,c,d){return null!=d?(a=new mxRectangle(a.x,a.y,d.width,d.height),a=new mxImageShape(a,d.src),a.preserveImageAspect=!1,a):b==mxEvent.ROTATION_HANDLE?new mxEllipse(a,c||mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR):new mxRectangleShape(a,c||mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR)};\nmxVertexHandler.prototype.moveSizerTo=function(a,b,c){null!=a&&(a.bounds.x=Math.floor(b-a.bounds.width/2),a.bounds.y=Math.floor(c-a.bounds.height/2),null!=a.node&&\"none\"!=a.node.style.display&&a.redraw())};\nmxVertexHandler.prototype.getHandleForEvent=function(a){var b=mxEvent.isMouseEvent(a.getEvent())?1:this.tolerance,c=this.allowHandleBoundsCheck&&(mxClient.IS_IE||0<b)?new mxRectangle(a.getGraphX()-b,a.getGraphY()-b,2*b,2*b):null;b=mxUtils.bind(this,function(e){var f=null!=e&&e.constructor!=mxImageShape&&this.allowHandleBoundsCheck?e.strokewidth+e.svgStrokeTolerance:null;f=null!=f?new mxRectangle(a.getGraphX()-Math.floor(f/2),a.getGraphY()-Math.floor(f/2),f,f):c;return null!=e&&(a.isSource(e)||e.intersectsRectangle(f))});\nif(b(this.rotationShape))return mxEvent.ROTATION_HANDLE;if(b(this.labelShape))return mxEvent.LABEL_HANDLE;if(null!=this.sizers)for(var d=0;d<this.sizers.length;d++)if(b(this.sizers[d]))return d;if(null!=this.customHandles&&this.isCustomHandleEvent(a))for(d=this.customHandles.length-1;0<=d;d--)if(null!=this.customHandles[d]&&b(this.customHandles[d].shape))return mxEvent.CUSTOM_HANDLE-d;return null};mxVertexHandler.prototype.isCustomHandleEvent=function(a){return!0};\nmxVertexHandler.prototype.mouseDown=function(a,b){!b.isConsumed()&&this.graph.isEnabled()&&(a=this.getHandleForEvent(b),null!=a&&(this.start(b.getGraphX(),b.getGraphY(),a),b.consume()))};mxVertexHandler.prototype.isLivePreviewBorder=function(){return null!=this.state.shape&&null==this.state.shape.fill&&null==this.state.shape.stroke};\nmxVertexHandler.prototype.start=function(a,b,c){if(null!=this.selectionBorder)if(this.livePreviewActive=this.livePreview&&0==this.graph.model.getChildCount(this.state.cell),this.inTolerance=!0,this.childOffsetY=this.childOffsetX=0,this.index=c,this.startX=a,this.startY=b,this.index<=mxEvent.CUSTOM_HANDLE&&this.isGhostPreview())this.ghostPreview=this.createGhostPreview();else{a=this.state.view.graph.model;b=a.getParent(this.state.cell);this.state.view.currentRoot!=b&&(a.isVertex(b)||a.isEdge(b))&&\n(this.parentState=this.state.view.graph.view.getState(b));this.selectionBorder.node.style.display=c==mxEvent.ROTATION_HANDLE?\"inline\":\"none\";if(!this.livePreviewActive||this.isLivePreviewBorder())this.preview=this.createSelectionShape(this.bounds),mxClient.IS_SVG&&0!=Number(this.state.style[mxConstants.STYLE_ROTATION]||\"0\")||null==this.state.text||this.state.text.node.parentNode!=this.graph.container?(this.preview.dialect=mxConstants.DIALECT_SVG,this.preview.init(this.graph.view.getOverlayPane())):\n(this.preview.dialect=mxConstants.DIALECT_STRICTHTML,this.preview.init(this.graph.container));c==mxEvent.ROTATION_HANDLE&&(b=this.getRotationHandlePosition(),a=b.x-this.state.getCenterX(),b=b.y-this.state.getCenterY(),this.startAngle=0!=a?180*Math.atan(b/a)/Math.PI+90:0,this.startDist=Math.sqrt(a*a+b*b));if(this.livePreviewActive)for(this.hideSizers(),c==mxEvent.ROTATION_HANDLE?this.rotationShape.node.style.display=\"\":c==mxEvent.LABEL_HANDLE?this.labelShape.node.style.display=\"\":null!=this.sizers&&\nnull!=this.sizers[c]?this.sizers[c].node.style.display=\"\":c<=mxEvent.CUSTOM_HANDLE&&null!=this.customHandles&&null!=this.customHandles[mxEvent.CUSTOM_HANDLE-c]&&this.customHandles[mxEvent.CUSTOM_HANDLE-c].setVisible(!0),c=this.graph.getEdges(this.state.cell),this.edgeHandlers=[],a=0;a<c.length;a++)b=this.graph.selectionCellsHandler.getHandler(c[a]),null!=b&&this.edgeHandlers.push(b)}};\nmxVertexHandler.prototype.createGhostPreview=function(){var a=this.graph.cellRenderer.createShape(this.state);a.init(this.graph.view.getOverlayPane());a.scale=this.state.view.scale;a.bounds=this.bounds;a.outline=!0;return a};\nmxVertexHandler.prototype.setHandlesVisible=function(a){this.handlesVisible=a;if(null!=this.sizers)for(var b=0;b<this.sizers.length;b++)this.sizers[b].node.style.display=a?\"\":\"none\";if(null!=this.customHandles)for(b=0;b<this.customHandles.length;b++)null!=this.customHandles[b]&&this.customHandles[b].setVisible(a)};mxVertexHandler.prototype.hideSizers=function(){this.setHandlesVisible(!1)};\nmxVertexHandler.prototype.checkTolerance=function(a){this.inTolerance&&null!=this.startX&&null!=this.startY&&(mxEvent.isMouseEvent(a.getEvent())||Math.abs(a.getGraphX()-this.startX)>this.graph.tolerance||Math.abs(a.getGraphY()-this.startY)>this.graph.tolerance)&&(this.inTolerance=!1)};mxVertexHandler.prototype.updateHint=function(a){};mxVertexHandler.prototype.removeHint=function(){};mxVertexHandler.prototype.roundAngle=function(a){return Math.round(10*a)/10};\nmxVertexHandler.prototype.roundLength=function(a){return Math.round(100*a)/100};\nmxVertexHandler.prototype.mouseMove=function(a,b){b.isConsumed()||null==this.index?this.graph.isMouseDown||null==this.getHandleForEvent(b)||b.consume(!1):(this.checkTolerance(b),this.inTolerance||(this.index<=mxEvent.CUSTOM_HANDLE?null!=this.customHandles&&null!=this.customHandles[mxEvent.CUSTOM_HANDLE-this.index]&&(this.customHandles[mxEvent.CUSTOM_HANDLE-this.index].processEvent(b),this.customHandles[mxEvent.CUSTOM_HANDLE-this.index].active=!0,null!=this.ghostPreview?(this.ghostPreview.apply(this.state),\nthis.ghostPreview.strokewidth=this.getSelectionStrokeWidth()/this.ghostPreview.scale/this.ghostPreview.scale,this.ghostPreview.isDashed=this.isSelectionDashed(),this.ghostPreview.stroke=this.getSelectionColor(),this.ghostPreview.redraw(),null!=this.selectionBounds&&(this.selectionBorder.node.style.display=\"none\")):(this.movePreviewToFront&&this.moveToFront(),this.customHandles[mxEvent.CUSTOM_HANDLE-this.index].positionChanged())):this.index==mxEvent.LABEL_HANDLE?this.moveLabel(b):(this.index==mxEvent.ROTATION_HANDLE?\nthis.rotateVertex(b):this.resizeVertex(b),this.updateHint(b))),b.consume())};mxVertexHandler.prototype.isGhostPreview=function(){return 0<this.state.view.graph.model.getChildCount(this.state.cell)};\nmxVertexHandler.prototype.moveLabel=function(a){var b=new mxPoint(a.getGraphX(),a.getGraphY()),c=this.graph.view.translate,d=this.graph.view.scale;this.graph.isGridEnabledEvent(a.getEvent())&&(b.x=(this.graph.snap(b.x/d-c.x)+c.x)*d,b.y=(this.graph.snap(b.y/d-c.y)+c.y)*d);this.moveSizerTo(this.sizers[null!=this.rotationShape?this.sizers.length-2:this.sizers.length-1],b.x,b.y)};\nmxVertexHandler.prototype.rotateVertex=function(a){var b=new mxPoint(a.getGraphX(),a.getGraphY()),c=this.state.x+this.state.width/2-b.x,d=this.state.y+this.state.height/2-b.y;this.currentAlpha=0!=c?180*Math.atan(d/c)/Math.PI+90:0>d?180:0;0<c&&(this.currentAlpha-=180);this.currentAlpha-=this.startAngle;this.rotationRaster&&this.graph.isGridEnabledEvent(a.getEvent())?(c=b.x-this.state.getCenterX(),d=b.y-this.state.getCenterY(),a=Math.sqrt(c*c+d*d),raster=2>a-this.startDist?15:25>a-this.startDist?5:\n1,this.currentAlpha=Math.round(this.currentAlpha/raster)*raster):this.currentAlpha=this.roundAngle(this.currentAlpha);this.selectionBorder.rotation=this.currentAlpha;this.selectionBorder.redraw();this.livePreviewActive&&this.redrawHandles()};\nmxVertexHandler.prototype.resizeVertex=function(a){var b=new mxPoint(this.state.getCenterX(),this.state.getCenterY()),c=mxUtils.toRadians(this.state.style[mxConstants.STYLE_ROTATION]||\"0\"),d=new mxPoint(a.getGraphX(),a.getGraphY()),e=this.graph.view.translate,f=this.graph.view.scale,g=Math.cos(-c),k=Math.sin(-c),l=d.x-this.startX,m=d.y-this.startY;d=k*l+g*m;l=g*l-k*m;m=d;g=this.graph.getCellGeometry(this.state.cell);this.unscaledBounds=this.union(g,l/f,m/f,this.index,this.graph.isGridEnabledEvent(a.getEvent()),\n1,new mxPoint(0,0),this.isConstrainedEvent(a),this.isCenteredEvent(this.state,a));g.relative||(k=this.graph.getMaximumGraphBounds(),null!=k&&null!=this.parentState&&(k=mxRectangle.fromRectangle(k),k.x-=(this.parentState.x-e.x*f)/f,k.y-=(this.parentState.y-e.y*f)/f),this.graph.isConstrainChild(this.state.cell)&&(d=this.graph.getCellContainmentArea(this.state.cell),null!=d&&(l=this.graph.getOverlap(this.state.cell),0<l&&(d=mxRectangle.fromRectangle(d),d.x-=d.width*l,d.y-=d.height*l,d.width+=2*d.width*\nl,d.height+=2*d.height*l),null==k?k=d:(k=mxRectangle.fromRectangle(k),k.intersect(d)))),null!=k&&(this.unscaledBounds.x<k.x&&(this.unscaledBounds.width-=k.x-this.unscaledBounds.x,this.unscaledBounds.x=k.x),this.unscaledBounds.y<k.y&&(this.unscaledBounds.height-=k.y-this.unscaledBounds.y,this.unscaledBounds.y=k.y),this.unscaledBounds.x+this.unscaledBounds.width>k.x+k.width&&(this.unscaledBounds.width-=this.unscaledBounds.x+this.unscaledBounds.width-k.x-k.width),this.unscaledBounds.y+this.unscaledBounds.height>\nk.y+k.height&&(this.unscaledBounds.height-=this.unscaledBounds.y+this.unscaledBounds.height-k.y-k.height)));d=this.bounds;this.bounds=new mxRectangle((null!=this.parentState?this.parentState.x:e.x*f)+this.unscaledBounds.x*f,(null!=this.parentState?this.parentState.y:e.y*f)+this.unscaledBounds.y*f,this.unscaledBounds.width*f,this.unscaledBounds.height*f);g.relative&&null!=this.parentState&&(this.bounds.x+=this.state.x-this.parentState.x,this.bounds.y+=this.state.y-this.parentState.y);g=Math.cos(c);\nk=Math.sin(c);c=new mxPoint(this.bounds.getCenterX(),this.bounds.getCenterY());l=c.x-b.x;m=c.y-b.y;b=g*l-k*m-l;c=k*l+g*m-m;l=this.bounds.x-this.state.x;m=this.bounds.y-this.state.y;e=g*l-k*m;g=k*l+g*m;this.bounds.x+=b;this.bounds.y+=c;this.unscaledBounds.x=this.roundLength(this.unscaledBounds.x+b/f);this.unscaledBounds.y=this.roundLength(this.unscaledBounds.y+c/f);this.unscaledBounds.width=this.roundLength(this.unscaledBounds.width);this.unscaledBounds.height=this.roundLength(this.unscaledBounds.height);\nthis.graph.isCellCollapsed(this.state.cell)||0==b&&0==c?this.childOffsetY=this.childOffsetX=0:(this.childOffsetX=this.state.x-this.bounds.x+e,this.childOffsetY=this.state.y-this.bounds.y+g);d.equals(this.bounds)||(this.livePreviewActive&&this.updateLivePreview(a),null!=this.preview?this.drawPreview():this.updateParentHighlight())};\nmxVertexHandler.prototype.updateLivePreview=function(a){var b=this.graph.view.scale,c=this.graph.view.translate;a=this.state.clone();this.state.x=this.bounds.x;this.state.y=this.bounds.y;this.state.origin=new mxPoint(this.state.x/b-c.x,this.state.y/b-c.y);this.state.width=this.bounds.width;this.state.height=this.bounds.height;b=this.state.absoluteOffset;new mxPoint(b.x,b.y);this.state.absoluteOffset.x=0;this.state.absoluteOffset.y=0;b=this.graph.getCellGeometry(this.state.cell);null!=b&&(c=b.offset||\nthis.EMPTY_POINT,null==c||b.relative||(this.state.absoluteOffset.x=this.state.view.scale*c.x,this.state.absoluteOffset.y=this.state.view.scale*c.y),this.state.view.updateVertexLabelOffset(this.state));this.state.view.graph.cellRenderer.redraw(this.state,!0);this.state.view.invalidate(this.state.cell);this.state.invalid=!1;this.state.view.validate();this.redrawHandles();this.movePreviewToFront&&this.moveToFront();null!=this.state.control&&null!=this.state.control.node&&(this.state.control.node.style.visibility=\n\"hidden\");this.state.setState(a)};\nmxVertexHandler.prototype.moveToFront=function(){if(null!=this.state.text&&null!=this.state.text.node&&null!=this.state.text.node.nextSibling||null!=this.state.shape&&null!=this.state.shape.node&&null!=this.state.shape.node.nextSibling&&(null==this.state.text||this.state.shape.node.nextSibling!=this.state.text.node))null!=this.state.shape&&null!=this.state.shape.node&&this.state.shape.node.parentNode.appendChild(this.state.shape.node),null!=this.state.text&&null!=this.state.text.node&&this.state.text.node.parentNode.appendChild(this.state.text.node)};\nmxVertexHandler.prototype.mouseUp=function(a,b){if(null!=this.index&&null!=this.state){var c=new mxPoint(b.getGraphX(),b.getGraphY());a=this.index;this.index=null;null==this.ghostPreview&&this.state.view.invalidate(this.state.cell,!1,!1);this.graph.getModel().beginUpdate();try{if(a<=mxEvent.CUSTOM_HANDLE){if(null!=this.customHandles&&null!=this.customHandles[mxEvent.CUSTOM_HANDLE-a]){var d=this.state.view.graph.getCellStyle(this.state.cell);this.customHandles[mxEvent.CUSTOM_HANDLE-a].active=!1;this.customHandles[mxEvent.CUSTOM_HANDLE-\na].execute(b);null!=this.customHandles&&null!=this.customHandles[mxEvent.CUSTOM_HANDLE-a]&&(this.state.style=d,this.customHandles[mxEvent.CUSTOM_HANDLE-a].positionChanged())}}else if(a==mxEvent.ROTATION_HANDLE)if(null!=this.currentAlpha){var e=this.currentAlpha-(this.state.style[mxConstants.STYLE_ROTATION]||0);0!=e&&this.rotateCell(this.state.cell,e)}else this.rotateClick();else{var f=this.graph.isGridEnabledEvent(b.getEvent()),g=mxUtils.toRadians(this.state.style[mxConstants.STYLE_ROTATION]||\"0\"),\nk=Math.cos(-g),l=Math.sin(-g),m=c.x-this.startX,n=c.y-this.startY;d=l*m+k*n;m=k*m-l*n;n=d;var p=this.graph.view.scale,q=this.isRecursiveResize(this.state,b);this.resizeCell(this.state.cell,this.roundLength(m/p),this.roundLength(n/p),a,f,this.isConstrainedEvent(b),q)}}finally{this.graph.getModel().endUpdate()}this.state.invalid&&this.state.view.validate();b.consume();this.reset();this.redrawHandles()}};mxVertexHandler.prototype.isRecursiveResize=function(a,b){return this.graph.isRecursiveResize(this.state)};\nmxVertexHandler.prototype.rotateClick=function(){};\nmxVertexHandler.prototype.rotateCell=function(a,b,c){if(0!=b){var d=this.graph.getModel();if(d.isVertex(a)||d.isEdge(a)){if(!d.isEdge(a)){var e=(this.graph.getCurrentCellStyle(a)[mxConstants.STYLE_ROTATION]||0)+b;this.graph.setCellStyles(mxConstants.STYLE_ROTATION,e,[a])}e=this.graph.getCellGeometry(a);if(null!=e){var f=this.graph.getCellGeometry(c);null==f||d.isEdge(c)||(e=e.clone(),e.rotate(b,new mxPoint(f.width/2,f.height/2)),d.setGeometry(a,e));if(d.isVertex(a)&&!e.relative||d.isEdge(a))for(c=\nd.getChildCount(a),e=0;e<c;e++)this.rotateCell(d.getChildAt(a,e),b,a)}}}};\nmxVertexHandler.prototype.reset=function(){null!=this.sizers&&null!=this.index&&null!=this.sizers[this.index]&&\"none\"==this.sizers[this.index].node.style.display&&(this.sizers[this.index].node.style.display=\"\");this.index=this.inTolerance=this.currentAlpha=null;null!=this.preview&&(this.preview.destroy(),this.preview=null);null!=this.ghostPreview&&(this.ghostPreview.destroy(),this.ghostPreview=null);if(this.livePreviewActive&&null!=this.sizers){for(var a=0;a<this.sizers.length;a++)null!=this.sizers[a]&&\n(this.sizers[a].node.style.display=\"\");null!=this.state.control&&null!=this.state.control.node&&(this.state.control.node.style.visibility=\"\")}if(null!=this.customHandles)for(a=0;a<this.customHandles.length;a++)null!=this.customHandles[a]&&(this.customHandles[a].active?(this.customHandles[a].active=!1,this.customHandles[a].reset()):this.customHandles[a].setVisible(!0));null!=this.selectionBorder&&(this.selectionBorder.node.style.display=\"inline\",this.selectionBounds=this.getSelectionBounds(this.state),\nthis.bounds=new mxRectangle(this.selectionBounds.x,this.selectionBounds.y,this.selectionBounds.width,this.selectionBounds.height),this.drawPreview());this.removeHint();this.redrawHandles();this.edgeHandlers=null;this.handlesVisible=!0;this.livePreviewActive=this.unscaledBounds=null};\nmxVertexHandler.prototype.resizeCell=function(a,b,c,d,e,f,g){b=this.graph.model.getGeometry(a);null!=b&&(d==mxEvent.LABEL_HANDLE?(c=-mxUtils.toRadians(this.state.style[mxConstants.STYLE_ROTATION]||\"0\"),g=1==mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,!0),d=Math.cos(c),e=Math.sin(c),c=this.graph.view.scale,d=mxUtils.getRotatedPoint(new mxPoint(Math.round((this.labelShape.bounds.getCenterX()-this.startX)/c),Math.round((this.labelShape.bounds.getCenterY()-this.startY)/c)),d,e),g||\n(d.y=-d.y),b=b.clone(),null==b.offset?b.offset=d:(b.offset.x+=d.x,b.offset.y+=d.y),this.graph.model.setGeometry(a,b)):null!=this.unscaledBounds&&(c=this.graph.view.scale,0==this.childOffsetX&&0==this.childOffsetY||this.moveChildren(a,Math.round(this.childOffsetX/c),Math.round(this.childOffsetY/c)),this.graph.resizeCell(a,this.unscaledBounds,g)))};\nmxVertexHandler.prototype.moveChildren=function(a,b,c){for(var d=this.graph.getModel(),e=d.getChildCount(a),f=0;f<e;f++){var g=d.getChildAt(a,f),k=this.graph.getCellGeometry(g);null!=k&&(k=k.clone(),k.translate(b,c),d.setGeometry(g,k))}};\nmxVertexHandler.prototype.union=function(a,b,c,d,e,f,g,k,l){e=null!=e?e&&this.graph.gridEnabled:this.graph.gridEnabled;if(this.singleSizer)return d=a.x+a.width+b,g=a.y+a.height+c,e&&(d=this.graph.snap(d/f)*f,g=this.graph.snap(g/f)*f),f=new mxRectangle(a.x,a.y,0,0),f.add(new mxRectangle(d,g,0,0)),f;var m=a.width,n=a.height,p=a.x-g.x*f,q=p+m;a=a.y-g.y*f;var r=a+n,t=p+m/2,u=a+n/2;4<d?(r+=c,r=e?this.graph.snap(r/f)*f:Math.round(r/f)*f):3>d&&(a+=c,a=e?this.graph.snap(a/f)*f:Math.round(a/f)*f);if(0==d||\n3==d||5==d)p+=b,p=e?this.graph.snap(p/f)*f:Math.round(p/f)*f;else if(2==d||4==d||7==d)q+=b,q=e?this.graph.snap(q/f)*f:Math.round(q/f)*f;e=q-p;c=r-a;k&&(k=this.graph.getCellGeometry(this.state.cell),null!=k&&(k=k.width/k.height,1==d||2==d||7==d||6==d?e=c*k:c=e/k,0==d&&(p=q-e,a=r-c)));l&&(e+=e-m,c+=c-n,p+=t-(p+e/2),a+=u-(a+c/2));0>e&&(p+=e,e=Math.abs(e));0>c&&(a+=c,c=Math.abs(c));d=new mxRectangle(p+g.x*f,a+g.y*f,e,c);null!=this.minBounds&&(d.width=Math.max(d.width,this.minBounds.x*f+this.minBounds.width*\nf+Math.max(0,this.x0*f-d.x)),d.height=Math.max(d.height,this.minBounds.y*f+this.minBounds.height*f+Math.max(0,this.y0*f-d.y)));return d};mxVertexHandler.prototype.redraw=function(a){this.selectionBounds=this.getSelectionBounds(this.state);this.bounds=new mxRectangle(this.selectionBounds.x,this.selectionBounds.y,this.selectionBounds.width,this.selectionBounds.height);this.drawPreview();a||this.redrawHandles()};\nmxVertexHandler.prototype.getHandlePadding=function(){var a=new mxPoint(0,0),b=this.tolerance;null!=this.sizers&&0<this.sizers.length&&null!=this.sizers[0]&&(this.bounds.width<2*this.sizers[0].bounds.width+2*b||this.bounds.height<2*this.sizers[0].bounds.height+2*b)&&(b/=2,a.x=this.sizers[0].bounds.width+b,a.y=this.sizers[0].bounds.height+b);return a};mxVertexHandler.prototype.getSizerBounds=function(){return this.bounds};\nmxVertexHandler.prototype.redrawHandles=function(){var a=this.getSizerBounds(),b=this.tolerance;this.verticalOffset=this.horizontalOffset=0;if(null!=this.customHandles)for(var c=0;c<this.customHandles.length;c++)if(null!=this.customHandles[c]){var d=this.customHandles[c].shape.node.style.display;this.customHandles[c].redraw();this.customHandles[c].shape.node.style.display=d;this.customHandles[c].shape.node.style.visibility=this.handlesVisible&&this.isCustomHandleVisible(this.customHandles[c])?\"\":\n\"hidden\"}if(null!=this.sizers&&0<this.sizers.length&&null!=this.sizers[0]){if(null==this.index&&this.manageSizers&&8<=this.sizers.length){c=this.getHandlePadding();this.horizontalOffset=c.x;this.verticalOffset=c.y;if(0!=this.horizontalOffset||0!=this.verticalOffset)a=new mxRectangle(a.x,a.y,a.width,a.height),a.x-=this.horizontalOffset/2,a.width+=this.horizontalOffset,a.y-=this.verticalOffset/2,a.height+=this.verticalOffset;8<=this.sizers.length&&(a.width<2*this.sizers[0].bounds.width+2*b||a.height<\n2*this.sizers[0].bounds.height+2*b?(this.sizers[0].node.style.display=\"none\",this.sizers[2].node.style.display=\"none\",this.sizers[5].node.style.display=\"none\",this.sizers[7].node.style.display=\"none\"):this.handlesVisible&&(this.sizers[0].node.style.display=\"\",this.sizers[2].node.style.display=\"\",this.sizers[5].node.style.display=\"\",this.sizers[7].node.style.display=\"\"))}var e=a.x+a.width,f=a.y+a.height;if(this.singleSizer)this.moveSizerTo(this.sizers[0],e,f);else if(b=a.x+a.width/2,c=a.y+a.height/\n2,8<=this.sizers.length){var g=\"nw-resize n-resize ne-resize e-resize se-resize s-resize sw-resize w-resize\".split(\" \"),k=mxUtils.toRadians(this.state.style[mxConstants.STYLE_ROTATION]||\"0\");d=Math.cos(k);var l=Math.sin(k),m=Math.round(4*k/Math.PI);k=new mxPoint(a.getCenterX(),a.getCenterY());var n=mxUtils.getRotatedPoint(new mxPoint(a.x,a.y),d,l,k);this.moveSizerTo(this.sizers[0],n.x,n.y);this.sizers[0].setCursor(g[mxUtils.mod(0+m,g.length)]);n.x=b;n.y=a.y;n=mxUtils.getRotatedPoint(n,d,l,k);this.moveSizerTo(this.sizers[1],\nn.x,n.y);this.sizers[1].setCursor(g[mxUtils.mod(1+m,g.length)]);n.x=e;n.y=a.y;n=mxUtils.getRotatedPoint(n,d,l,k);this.moveSizerTo(this.sizers[2],n.x,n.y);this.sizers[2].setCursor(g[mxUtils.mod(2+m,g.length)]);n.x=a.x;n.y=c;n=mxUtils.getRotatedPoint(n,d,l,k);this.moveSizerTo(this.sizers[3],n.x,n.y);this.sizers[3].setCursor(g[mxUtils.mod(7+m,g.length)]);n.x=e;n.y=c;n=mxUtils.getRotatedPoint(n,d,l,k);this.moveSizerTo(this.sizers[4],n.x,n.y);this.sizers[4].setCursor(g[mxUtils.mod(3+m,g.length)]);n.x=\na.x;n.y=f;n=mxUtils.getRotatedPoint(n,d,l,k);this.moveSizerTo(this.sizers[5],n.x,n.y);this.sizers[5].setCursor(g[mxUtils.mod(6+m,g.length)]);n.x=b;n.y=f;n=mxUtils.getRotatedPoint(n,d,l,k);this.moveSizerTo(this.sizers[6],n.x,n.y);this.sizers[6].setCursor(g[mxUtils.mod(5+m,g.length)]);n.x=e;n.y=f;n=mxUtils.getRotatedPoint(n,d,l,k);this.moveSizerTo(this.sizers[7],n.x,n.y);this.sizers[7].setCursor(g[mxUtils.mod(4+m,g.length)]);a=1==mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,!0);n.x=\nb+this.state.absoluteOffset.x;n.y=c+(a?1:-1)*this.state.absoluteOffset.y;n=mxUtils.getRotatedPoint(n,d,l,k);this.moveSizerTo(this.sizers[8],n.x,n.y)}else 2<=this.state.width&&2<=this.state.height?this.moveSizerTo(this.sizers[0],b+this.state.absoluteOffset.x,c+this.state.absoluteOffset.y):this.moveSizerTo(this.sizers[0],this.state.x,this.state.y)}null!=this.rotationShape&&(k=mxUtils.toRadians(null!=this.currentAlpha?this.currentAlpha:this.state.style[mxConstants.STYLE_ROTATION]||\"0\"),d=Math.cos(k),\nl=Math.sin(k),k=new mxPoint(this.state.getCenterX(),this.state.getCenterY()),n=mxUtils.getRotatedPoint(this.getRotationHandlePosition(),d,l,k),null!=this.rotationShape.node&&(this.moveSizerTo(this.rotationShape,n.x,n.y),this.rotationShape.node.style.visibility=this.state.view.graph.isEditing()||!this.handlesVisible?\"hidden\":\"\"));null!=this.selectionBorder&&(this.selectionBorder.rotation=Number(this.state.style[mxConstants.STYLE_ROTATION]||\"0\"));if(null!=this.edgeHandlers)for(c=0;c<this.edgeHandlers.length;c++)this.edgeHandlers[c].redraw()};\nmxVertexHandler.prototype.isCustomHandleVisible=function(a){return!this.graph.isEditing()&&1==this.state.view.graph.getSelectionCount()};mxVertexHandler.prototype.getRotationHandlePosition=function(){return new mxPoint(this.bounds.x+this.bounds.width/2,this.bounds.y+this.rotationHandleVSpacing)};mxVertexHandler.prototype.isParentHighlightVisible=function(){return!this.graph.isCellSelected(this.graph.model.getParent(this.state.cell))};\nmxVertexHandler.prototype.destroyParentHighlight=function(){null!=this.parentHighlight.state&&(delete this.parentHighlight.state.parentHighlight,delete this.parentHighlight.state);this.parentHighlight.destroy();this.parentHighlight=null};\nmxVertexHandler.prototype.updateParentHighlight=function(){if(!this.isDestroyed()){var a=this.isParentHighlightVisible(),b=this.graph.model.getParent(this.state.cell),c=this.graph.view.getState(b);null!=this.parentHighlight?this.graph.model.isVertex(b)&&a?(a=this.parentHighlight.bounds,null==c||a.x==c.x&&a.y==c.y&&a.width==c.width&&a.height==c.height||(this.parentHighlight.bounds=mxRectangle.fromRectangle(c),this.parentHighlight.redraw())):this.destroyParentHighlight():this.parentHighlightEnabled&&\na&&this.graph.model.isVertex(b)&&null!=c&&null==c.parentHighlight&&(this.parentHighlight=this.createParentHighlightShape(c),this.parentHighlight.dialect=mxConstants.DIALECT_SVG,this.parentHighlight.svgStrokeTolerance=0,this.parentHighlight.pointerEvents=!1,this.parentHighlight.rotation=Number(c.style[mxConstants.STYLE_ROTATION]||\"0\"),this.parentHighlight.init(this.graph.getView().getOverlayPane()),this.parentHighlight.redraw(),c.parentHighlight=this.parentHighlight,this.parentHighlight.state=c)}};\nmxVertexHandler.prototype.drawPreview=function(){null!=this.preview&&(this.preview.bounds=this.bounds,this.preview.node.parentNode==this.graph.container&&(this.preview.bounds.width=Math.max(0,this.preview.bounds.width-1),this.preview.bounds.height=Math.max(0,this.preview.bounds.height-1)),this.preview.rotation=Number(this.state.style[mxConstants.STYLE_ROTATION]||\"0\"),this.preview.redraw());this.selectionBorder.bounds=this.getSelectionBorderBounds();this.selectionBorder.redraw();this.updateParentHighlight()};\nmxVertexHandler.prototype.getSelectionBorderBounds=function(){return this.bounds};\nmxVertexHandler.prototype.createSizers=function(){var a=this.graph.isCellResizable(this.state.cell)&&!this.graph.isCellLocked(this.state.cell),b=[];if(a||this.graph.isLabelMovable(this.state.cell)&&2<=this.state.width&&2<=this.state.height){var c=0;a&&(this.singleSizer||(b.push(this.createSizer(\"nw-resize\",c++)),b.push(this.createSizer(\"n-resize\",c++)),b.push(this.createSizer(\"ne-resize\",c++)),b.push(this.createSizer(\"w-resize\",c++)),b.push(this.createSizer(\"e-resize\",c++)),b.push(this.createSizer(\"sw-resize\",\nc++)),b.push(this.createSizer(\"s-resize\",c++))),b.push(this.createSizer(\"se-resize\",c++)));a=this.graph.model.getGeometry(this.state.cell);null==a||a.relative||this.graph.isSwimlane(this.state.cell)||!this.graph.isLabelMovable(this.state.cell)||(this.labelShape=this.createSizer(mxConstants.CURSOR_LABEL_HANDLE,mxEvent.LABEL_HANDLE,mxConstants.LABEL_HANDLE_SIZE,mxConstants.LABEL_HANDLE_FILLCOLOR),b.push(this.labelShape))}else this.graph.isCellMovable(this.state.cell)&&!a&&2>this.state.width&&2>this.state.height&&\n(this.labelShape=this.createSizer(mxConstants.CURSOR_MOVABLE_VERTEX,mxEvent.LABEL_HANDLE,null,mxConstants.LABEL_HANDLE_FILLCOLOR),b.push(this.labelShape));this.isRotationHandleVisible()&&null==this.rotationShape&&(this.rotationShape=this.createSizer(this.rotationCursor,mxEvent.ROTATION_HANDLE,mxConstants.HANDLE_SIZE+3,mxConstants.HANDLE_FILLCOLOR),b.push(this.rotationShape));return b};\nmxVertexHandler.prototype.destroyCustomHandles=function(){if(null!=this.customHandles){for(var a=0;a<this.customHandles.length;a++)null!=this.customHandles[a]&&this.customHandles[a].destroy();this.customHandles=null}};mxVertexHandler.prototype.destroySizers=function(){if(null!=this.sizers){for(var a=0;a<this.sizers.length;a++)this.sizers[a].destroy();this.sizers=null}};mxVertexHandler.prototype.isDestroyed=function(){return null==this.selectionBorder};\nmxVertexHandler.prototype.destroy=function(){null!=this.escapeHandler&&(this.state.view.graph.removeListener(this.escapeHandler),this.escapeHandler=null);null!=this.preview&&(this.preview.destroy(),this.preview=null);null!=this.ghostPreview&&(this.ghostPreview.destroy(),this.ghostPreview=null);null!=this.selectionBorder&&(this.selectionBorder.destroy(),this.selectionBorder=null);null!=this.parentHighlight&&this.destroyParentHighlight();this.labelShape=null;this.removeHint();this.destroySizers();this.destroyCustomHandles()};\nfunction mxEdgeHandler(a){null!=a&&null!=a.shape&&(this.state=a,this.init(),this.escapeHandler=mxUtils.bind(this,function(b,c){b=null!=this.index;this.reset();b&&this.graph.cellRenderer.redraw(this.state,!1,a.view.isRendering())}),this.state.view.graph.addListener(mxEvent.ESCAPE,this.escapeHandler))}mxEdgeHandler.prototype.graph=null;mxEdgeHandler.prototype.state=null;mxEdgeHandler.prototype.marker=null;mxEdgeHandler.prototype.constraintHandler=null;mxEdgeHandler.prototype.error=null;\nmxEdgeHandler.prototype.shape=null;mxEdgeHandler.prototype.bends=null;mxEdgeHandler.prototype.labelShape=null;mxEdgeHandler.prototype.cloneEnabled=!0;mxEdgeHandler.prototype.addEnabled=!1;mxEdgeHandler.prototype.removeEnabled=!1;mxEdgeHandler.prototype.dblClickRemoveEnabled=!1;mxEdgeHandler.prototype.mergeRemoveEnabled=!1;mxEdgeHandler.prototype.straightRemoveEnabled=!1;mxEdgeHandler.prototype.virtualBendsEnabled=!1;mxEdgeHandler.prototype.virtualBendOpacity=40;\nmxEdgeHandler.prototype.parentHighlightEnabled=!1;mxEdgeHandler.prototype.preferHtml=!1;mxEdgeHandler.prototype.allowHandleBoundsCheck=!0;mxEdgeHandler.prototype.snapToTerminals=!1;mxEdgeHandler.prototype.handleImage=null;mxEdgeHandler.prototype.tolerance=0;mxEdgeHandler.prototype.outlineConnect=!1;mxEdgeHandler.prototype.manageLabelHandle=!1;\nmxEdgeHandler.prototype.init=function(){this.graph=this.state.view.graph;this.marker=this.createMarker();this.points=[];this.abspoints=this.getSelectionPoints(this.state);this.shape=this.createSelectionShape(this.abspoints);this.shape.dialect=this.graph.dialect!=mxConstants.DIALECT_SVG?mxConstants.DIALECT_MIXEDHTML:mxConstants.DIALECT_SVG;this.shape.init(this.graph.getView().getOverlayPane());this.shape.svgStrokeTolerance=0;this.shape.pointerEvents=!1;mxEvent.redirectMouseEvents(this.shape.node,this.graph,\nthis.state);this.graph.isCellMovable(this.state.cell)&&this.shape.setCursor(mxConstants.CURSOR_MOVABLE_EDGE);this.preferHtml=null!=this.state.text&&this.state.text.node.parentNode==this.graph.container;if(!this.preferHtml){var a=this.state.getVisibleTerminalState(!0);null!=a&&(this.preferHtml=null!=a.text&&a.text.node.parentNode==this.graph.container);this.preferHtml||(a=this.state.getVisibleTerminalState(!1),null!=a&&(this.preferHtml=null!=a.text&&a.text.node.parentNode==this.graph.container))}this.graph.isCellEditable(this.state.cell)&&\nthis.isHandlesVisible()&&(this.bends=this.createBends(),this.isVirtualBendsEnabled()&&(this.virtualBends=this.createVirtualBends()));this.label=new mxPoint(this.state.absoluteOffset.x,this.state.absoluteOffset.y);this.isHandlesVisible()&&(this.labelShape=this.createLabelShape(),this.graph.isCellEditable(this.state.cell)&&(this.labelShape.setCursor(mxConstants.CURSOR_LABEL_HANDLE),this.customHandles=this.createCustomHandles()));this.updateParentHighlight();this.redraw()};\nmxEdgeHandler.prototype.createLabelShape=function(){var a=this.createLabelHandleShape();this.initBend(a);return a};mxEdgeHandler.prototype.getConstraintHandler=function(){null==this.constraintHandler&&(this.constraintHandler=this.createConstraintHandler());return this.constraintHandler};mxEdgeHandler.prototype.createConstraintHandler=function(){return new mxConstraintHandler(this.graph)};mxEdgeHandler.prototype.isParentHighlightVisible=mxVertexHandler.prototype.isParentHighlightVisible;\nmxEdgeHandler.prototype.destroyParentHighlight=mxVertexHandler.prototype.destroyParentHighlight;mxEdgeHandler.prototype.updateParentHighlight=mxVertexHandler.prototype.updateParentHighlight;mxEdgeHandler.prototype.createCustomHandles=function(){return null};\nmxEdgeHandler.prototype.isVirtualBendsEnabled=function(a){return this.virtualBendsEnabled&&(null==this.state.style[mxConstants.STYLE_EDGE]||this.state.style[mxConstants.STYLE_EDGE]==mxConstants.NONE||1==this.state.style[mxConstants.STYLE_NOEDGESTYLE])&&\"arrow\"!=mxUtils.getValue(this.state.style,mxConstants.STYLE_SHAPE,null)};mxEdgeHandler.prototype.isCellEnabled=function(a){return!0};mxEdgeHandler.prototype.isAddPointEvent=function(a){return mxEvent.isShiftDown(a)};\nmxEdgeHandler.prototype.isRemovePointEvent=function(a){return mxEvent.isShiftDown(a)};mxEdgeHandler.prototype.getSelectionPoints=function(a){return a.absolutePoints};mxEdgeHandler.prototype.createParentHighlightShape=function(a){a=new mxRectangleShape(mxRectangle.fromRectangle(a),null,this.getSelectionColor());a.strokewidth=this.getSelectionStrokeWidth();a.isDashed=this.isSelectionDashed();return a};\nmxEdgeHandler.prototype.createSelectionShape=function(a){a=new this.state.shape.constructor;a.outline=!0;a.apply(this.state);a.isDashed=this.isSelectionDashed();a.stroke=this.getSelectionColor();a.isShadow=!1;return a};mxEdgeHandler.prototype.getSelectionColor=function(){return this.graph.isCellEditable(this.state.cell)?mxConstants.EDGE_SELECTION_COLOR:mxConstants.LOCKED_HANDLE_FILLCOLOR};mxEdgeHandler.prototype.getSelectionStrokeWidth=function(){return mxConstants.EDGE_SELECTION_STROKEWIDTH};\nmxEdgeHandler.prototype.isSelectionDashed=function(){return mxConstants.EDGE_SELECTION_DASHED};mxEdgeHandler.prototype.isConnectableCell=function(a){return!0};mxEdgeHandler.prototype.getCellAt=function(a,b){return this.outlineConnect?null:this.graph.getCellAt(a,b)};\nmxEdgeHandler.prototype.createMarker=function(){var a=new mxCellMarker(this.graph),b=this;a.getCell=function(c){var d=mxCellMarker.prototype.getCell.apply(this,arguments);d!=b.state.cell&&null!=d||null==b.currentPoint||(d=b.graph.getCellAt(b.currentPoint.x,b.currentPoint.y));if(null!=d&&!this.graph.isCellConnectable(d)){var e=this.graph.getModel().getParent(d);this.graph.getModel().isVertex(e)&&this.graph.isCellConnectable(e)&&(d=e)}e=b.graph.getModel();if(this.graph.isSwimlane(d)&&null!=b.currentPoint&&\nthis.graph.hitsSwimlaneContent(d,b.currentPoint.x,b.currentPoint.y)||!b.isConnectableCell(d)||d==b.state.cell||null!=d&&!b.graph.connectableEdges&&e.isEdge(d)||e.isAncestor(b.state.cell,d))d=null;this.graph.isCellConnectable(d)||(d=null);return d};a.isValidState=function(c){var d=b.graph.getModel();d=b.graph.view.getTerminalPort(c,b.graph.view.getState(d.getTerminal(b.state.cell,!b.isSource)),!b.isSource);d=null!=d?d.cell:null;b.error=b.validateConnection(b.isSource?c.cell:d,b.isSource?d:c.cell);\nreturn null==b.error};return a};mxEdgeHandler.prototype.validateConnection=function(a,b){return this.graph.getEdgeValidationError(this.state.cell,a,b)};\nmxEdgeHandler.prototype.createBends=function(){var a=this.state.cell,b=[];if(null!=this.abspoints)for(var c=0;c<this.abspoints.length;c++)if(this.isHandleVisible(c)){var d=c==this.abspoints.length-1,e=0==c||d;(e||this.graph.isCellBendable(a))&&mxUtils.bind(this,function(f){var g=this.createHandleShape(f,null,f==this.abspoints.length-1);this.initBend(g,mxUtils.bind(this,mxUtils.bind(this,function(){this.dblClickRemoveEnabled&&this.removePoint(this.state,f)})));this.isHandleEnabled(c)&&g.setCursor(e?\nmxConstants.CURSOR_TERMINAL_HANDLE:mxConstants.CURSOR_BEND_HANDLE);b.push(g);e||(this.points.push(new mxPoint(0,0)),g.node.style.visibility=\"hidden\")})(c)}return b};mxEdgeHandler.prototype.createVirtualBends=function(){var a=[];if(this.graph.isCellBendable(this.state.cell))for(var b=1;b<this.abspoints.length;b++)mxUtils.bind(this,function(c){this.initBend(c);c.setCursor(mxConstants.CURSOR_VIRTUAL_BEND_HANDLE);a.push(c)})(this.createHandleShape());return a};\nmxEdgeHandler.prototype.isHandleEnabled=function(a){return!0};mxEdgeHandler.prototype.isHandleVisible=function(a){var b=this.state.getVisibleTerminalState(!0),c=this.state.getVisibleTerminalState(!1),d=this.graph.getCellGeometry(this.state.cell);return(null!=d?this.graph.view.getEdgeStyle(this.state,d.points,b,c):null)!=mxEdgeStyle.EntityRelation||0==a||a==this.abspoints.length-1};\nmxEdgeHandler.prototype.createHandleShape=function(a){if(null!=this.handleImage)return a=new mxImageShape(new mxRectangle(0,0,this.handleImage.width,this.handleImage.height),this.handleImage.src),a.preserveImageAspect=!1,a;a=mxConstants.HANDLE_SIZE;this.preferHtml&&--a;return new mxRectangleShape(new mxRectangle(0,0,a,a),mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR)};\nmxEdgeHandler.prototype.createLabelHandleShape=function(){if(null!=this.labelHandleImage){var a=new mxImageShape(new mxRectangle(0,0,this.labelHandleImage.width,this.labelHandleImage.height),this.labelHandleImage.src);a.preserveImageAspect=!1;return a}a=mxConstants.LABEL_HANDLE_SIZE;return new mxRectangleShape(new mxRectangle(0,0,a,a),mxConstants.LABEL_HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR)};\nmxEdgeHandler.prototype.initBend=function(a,b){this.preferHtml?(a.dialect=mxConstants.DIALECT_STRICTHTML,a.init(this.graph.container)):(a.dialect=this.graph.dialect!=mxConstants.DIALECT_SVG?mxConstants.DIALECT_MIXEDHTML:mxConstants.DIALECT_SVG,a.init(this.graph.getView().getOverlayPane()));mxEvent.redirectMouseEvents(a.node,this.graph,this.state,null,null,null,b);mxClient.IS_TOUCH&&a.node.setAttribute(\"pointer-events\",\"none\")};\nmxEdgeHandler.prototype.getHandleForEvent=function(a){var b=null;if(null!=this.state){var c=function(g){if(null!=g&&(a.isSource(g)||g.intersectsRectangle(e))){var k=a.getGraphX()-g.bounds.getCenterX();g=a.getGraphY()-g.bounds.getCenterY();k=k*k+g*g;if(null==f||k<=f)return f=k,!0}return!1},d=mxEvent.isMouseEvent(a.getEvent())?0:this.tolerance,e=this.allowHandleBoundsCheck&&(mxClient.IS_IE||0<d)?new mxRectangle(a.getGraphX()-d,a.getGraphY()-d,2*d,2*d):null,f=null;if(null!=this.customHandles&&this.isCustomHandleEvent(a))for(d=\nthis.customHandles.length-1;0<=d;d--)if(c(this.customHandles[d].shape))return mxEvent.CUSTOM_HANDLE-d;null!=this.state.text&&(a.isSource(this.state.text)||c(this.labelShape))&&(b=mxEvent.LABEL_HANDLE);if(null!=this.bends)for(d=0;d<this.bends.length;d++)c(this.bends[d])&&(b=d);if(null!=this.virtualBends&&this.isAddVirtualBendEvent(a))for(d=0;d<this.virtualBends.length;d++)c(this.virtualBends[d])&&(b=mxEvent.VIRTUAL_HANDLE-d)}return b};mxEdgeHandler.prototype.isAddVirtualBendEvent=function(a){return!0};\nmxEdgeHandler.prototype.isCustomHandleEvent=function(a){return!0};\nmxEdgeHandler.prototype.mouseDown=function(a,b){if(this.graph.isCellEditable(this.state.cell)&&!mxEvent.isControlDown(b.getEvent())&&!mxEvent.isShiftDown(b.getEvent())){a=this.getHandleForEvent(b);if(null!=this.bends&&null!=this.bends[a]){var c=this.bends[a].bounds;this.snapPoint=new mxPoint(c.getCenterX(),c.getCenterY())}if(this.addEnabled&&null==a&&this.isAddPointEvent(b.getEvent()))this.addPoint(this.state,b.getEvent()),b.consume();else if(null!=a&&!b.isConsumed()&&this.graph.isEnabled()){if(this.removeEnabled&&\nthis.isRemovePointEvent(b.getEvent()))this.removePoint(this.state,a);else if(a!=mxEvent.LABEL_HANDLE||this.graph.isLabelMovable(b.getCell()))a<=mxEvent.VIRTUAL_HANDLE&&mxUtils.setOpacity(this.virtualBends[mxEvent.VIRTUAL_HANDLE-a].node,100),this.start(b.getX(),b.getY(),a);b.consume()}}};\nmxEdgeHandler.prototype.start=function(a,b,c){this.startX=a;this.startY=b;this.isSource=null==this.bends?!1:0==c;this.isTarget=null==this.bends?!1:c==this.bends.length-1;this.isLabel=c==mxEvent.LABEL_HANDLE;if(this.isSource||this.isTarget){if(a=this.state.cell,b=this.graph.model.getTerminal(a,this.isSource),null==b&&this.graph.isTerminalPointMovable(a,this.isSource)||null!=b&&this.graph.isCellDisconnectable(a,b,this.isSource))this.index=c}else this.index=c;if(this.index<=mxEvent.CUSTOM_HANDLE&&this.index>\nmxEvent.VIRTUAL_HANDLE&&null!=this.customHandles)for(c=0;c<this.customHandles.length;c++)c!=mxEvent.CUSTOM_HANDLE-this.index&&this.customHandles[c].setVisible(!1)};mxEdgeHandler.prototype.clonePreviewState=function(a,b){return this.state.clone()};mxEdgeHandler.prototype.getSnapToTerminalTolerance=function(){return 2};mxEdgeHandler.prototype.updateHint=function(a,b){};mxEdgeHandler.prototype.removeHint=function(){};mxEdgeHandler.prototype.roundLength=function(a){return Math.round(a)};\nmxEdgeHandler.prototype.isSnapToTerminalsEvent=function(a){return this.snapToTerminals&&!mxEvent.isAltDown(a.getEvent())};\nmxEdgeHandler.prototype.getPointForEvent=function(a){var b=this.graph.getView(),c=b.scale,d=new mxPoint(this.roundLength(a.getGraphX()/c)*c,this.roundLength(a.getGraphY()/c)*c),e=this.getSnapToTerminalTolerance(),f=!1,g=!1;if(0<e&&this.isSnapToTerminalsEvent(a)){var k=function(n){null!=n&&l.call(this,new mxPoint(b.getRoutingCenterX(n),b.getRoutingCenterY(n)))},l=function(n){if(null!=n){var p=n.x;Math.abs(d.x-p)<e&&(d.x=p,f=!0);n=n.y;Math.abs(d.y-n)<e&&(d.y=n,g=!0)}};k.call(this,this.state.getVisibleTerminalState(!0));\nk.call(this,this.state.getVisibleTerminalState(!1));k=this.state.absolutePoints;if(null!=k)for(var m=0;m<k.length;m++)(0<m||!this.state.isFloatingTerminalPoint(!0))&&(m<k.length-1||!this.state.isFloatingTerminalPoint(!1))&&l.call(this,this.state.absolutePoints[m])}this.graph.isGridEnabledEvent(a.getEvent())&&(a=b.translate,f||(d.x=(this.graph.snap(d.x/c-a.x)+a.x)*c),g||(d.y=(this.graph.snap(d.y/c-a.y)+a.y)*c));return d};\nmxEdgeHandler.prototype.getPreviewTerminalState=function(a){var b=this.getConstraintHandler();b.update(a,this.isSource,!0,a.isSource(this.marker.highlight.shape)?null:this.currentPoint);if(null!=b.currentFocus&&null!=b.currentConstraint)return null!=this.marker.highlight&&null!=this.marker.highlight.state&&this.marker.highlight.state.cell==b.currentFocus.cell?\"transparent\"!=this.marker.highlight.shape.stroke&&(this.marker.highlight.shape.stroke=\"transparent\",this.marker.highlight.repaint()):this.marker.markCell(b.currentFocus.cell,\n\"transparent\"),a=this.graph.getModel(),a=this.graph.view.getTerminalPort(this.state,this.graph.view.getState(a.getTerminal(this.state.cell,!this.isSource)),!this.isSource),a=null!=a?a.cell:null,this.error=this.validateConnection(this.isSource?b.currentFocus.cell:a,this.isSource?a:b.currentFocus.cell),a=null,null==this.error&&(a=b.currentFocus),(null!=this.error||null!=a&&!this.isCellEnabled(a.cell))&&b.reset(),a;if(this.graph.isIgnoreTerminalEvent(a.getEvent()))return this.marker.reset(),null;this.marker.process(a);\na=this.marker.getValidState();null==a||this.isCellEnabled(a.cell)||(b.reset(),this.marker.reset());return this.marker.getValidState()};\nmxEdgeHandler.prototype.getPreviewPoints=function(a,b){var c=this.graph.getCellGeometry(this.state.cell);c=null!=c.points?c.points.slice():null;var d=new mxPoint(a.x,a.y),e=null;if(this.isSource||this.isTarget)this.graph.resetEdgesOnConnect&&(c=null);else if(this.convertPoint(d,!1),null==c)c=[d];else{this.index<=mxEvent.VIRTUAL_HANDLE&&c.splice(mxEvent.VIRTUAL_HANDLE-this.index,0,d);if(!this.isSource&&!this.isTarget){for(var f=0;f<this.bends.length;f++)if(f!=this.index){var g=this.bends[f];null!=\ng&&mxUtils.contains(g.bounds,a.x,a.y)&&(this.index<=mxEvent.VIRTUAL_HANDLE?c.splice(mxEvent.VIRTUAL_HANDLE-this.index,1):c.splice(this.index-1,1),e=c)}if(null==e&&this.straightRemoveEnabled&&(null==b||!mxEvent.isAltDown(b.getEvent()))){b=this.graph.tolerance*this.graph.tolerance;f=this.state.absolutePoints.slice();f[this.index]=a;var k=this.state.getVisibleTerminalState(!0);null!=k&&(g=this.graph.getConnectionConstraint(this.state,k,!0),null==g||null==this.graph.getConnectionPoint(k,g))&&(f[0]=new mxPoint(k.view.getRoutingCenterX(k),\nk.view.getRoutingCenterY(k)));k=this.state.getVisibleTerminalState(!1);null!=k&&(g=this.graph.getConnectionConstraint(this.state,k,!1),null==g||null==this.graph.getConnectionPoint(k,g))&&(f[f.length-1]=new mxPoint(k.view.getRoutingCenterX(k),k.view.getRoutingCenterY(k)));g=this.index;0<g&&g<f.length-1&&mxUtils.ptSegDistSq(f[g-1].x,f[g-1].y,f[g+1].x,f[g+1].y,a.x,a.y)<b&&(c.splice(g-1,1),e=c)}}null==e&&this.index>mxEvent.VIRTUAL_HANDLE&&(c[this.index-1]=d)}return null!=e?e:c};\nmxEdgeHandler.prototype.isOutlineConnectEvent=function(a){if(mxEvent.isShiftDown(a.getEvent())&&mxEvent.isAltDown(a.getEvent()))return!1;var b=mxUtils.getOffset(this.graph.container),c=a.getEvent(),d=mxEvent.getClientX(c);c=mxEvent.getClientY(c);var e=document.documentElement,f=this.currentPoint.x-this.graph.container.scrollLeft+b.x-((window.pageXOffset||e.scrollLeft)-(e.clientLeft||0));b=this.currentPoint.y-this.graph.container.scrollTop+b.y-((window.pageYOffset||e.scrollTop)-(e.clientTop||0));return this.outlineConnect&&\n(mxEvent.isShiftDown(a.getEvent())&&!mxEvent.isAltDown(a.getEvent())||a.isSource(this.marker.highlight.shape)||!mxEvent.isShiftDown(a.getEvent())&&mxEvent.isAltDown(a.getEvent())&&null!=a.getState()||this.marker.highlight.isHighlightAt(d,c)||(f!=d||b!=c)&&null==a.getState()&&this.marker.highlight.isHighlightAt(f,b))};\nmxEdgeHandler.prototype.updatePreviewState=function(a,b,c,d,e){var f=this.isSource?c:this.state.getVisibleTerminalState(!0),g=this.isTarget?c:this.state.getVisibleTerminalState(!1),k=this.graph.getConnectionConstraint(a,f,!0),l=this.graph.getConnectionConstraint(a,g,!1),m=this.getConstraintHandler(),n=m.currentConstraint;null==n&&e&&(null!=c?(d.isSource(this.marker.highlight.shape)&&(b=new mxPoint(d.getGraphX(),d.getGraphY())),n=this.graph.getOutlineConstraint(b,c,d),m.setFocus(d,c,this.isSource),\nm.currentConstraint=n,m.currentPoint=b):n=new mxConnectionConstraint);if(this.outlineConnect&&null!=this.marker.highlight&&null!=this.marker.highlight.shape){var p=this.graph.view.scale;null!=m.currentConstraint&&null!=m.currentFocus?(this.marker.highlight.shape.stroke=e?mxConstants.OUTLINE_HIGHLIGHT_COLOR:\"transparent\",this.marker.highlight.shape.strokewidth=mxConstants.OUTLINE_HIGHLIGHT_STROKEWIDTH/p/p,this.marker.highlight.repaint()):this.marker.hasValidState()&&(this.marker.highlight.shape.stroke=\nthis.graph.isCellConnectable(d.getCell())&&this.marker.getValidState()!=d.getState()?\"transparent\":mxConstants.DEFAULT_VALID_COLOR,this.marker.highlight.shape.strokewidth=mxConstants.HIGHLIGHT_STROKEWIDTH/p/p,this.marker.highlight.repaint())}this.isSource?k=n:this.isTarget&&(l=n);if(this.isSource||this.isTarget)null!=n&&null!=n.point?(a.style[this.isSource?mxConstants.STYLE_EXIT_X:mxConstants.STYLE_ENTRY_X]=n.point.x,a.style[this.isSource?mxConstants.STYLE_EXIT_Y:mxConstants.STYLE_ENTRY_Y]=n.point.y):\n(delete a.style[this.isSource?mxConstants.STYLE_EXIT_X:mxConstants.STYLE_ENTRY_X],delete a.style[this.isSource?mxConstants.STYLE_EXIT_Y:mxConstants.STYLE_ENTRY_Y]);a.setVisibleTerminalState(f,!0);a.setVisibleTerminalState(g,!1);this.isSource&&null==f||a.view.updateFixedTerminalPoint(a,f,!0,k);this.isTarget&&null==g||a.view.updateFixedTerminalPoint(a,g,!1,l);(this.isSource||this.isTarget)&&null==c&&(a.setAbsoluteTerminalPoint(b,this.isSource),null==this.marker.getMarkedState()&&(this.error=this.graph.allowDanglingEdges?\nnull:\"\"));a.view.updatePoints(a,this.points,f,g);a.view.updateFloatingTerminalPoints(a,f,g)};\nmxEdgeHandler.prototype.mouseMove=function(a,b){if(null!=this.index&&null!=this.marker){var c=this.getConstraintHandler();this.currentPoint=this.getPointForEvent(b);this.error=null;null!=this.snapPoint&&mxEvent.isShiftDown(b.getEvent())&&!this.graph.isIgnoreTerminalEvent(b.getEvent())&&null==c.currentFocus&&c.currentFocus!=this.state&&(Math.abs(this.snapPoint.x-this.currentPoint.x)<Math.abs(this.snapPoint.y-this.currentPoint.y)?this.currentPoint.x=this.snapPoint.x:this.currentPoint.y=this.snapPoint.y);\nif(this.index<=mxEvent.CUSTOM_HANDLE&&this.index>mxEvent.VIRTUAL_HANDLE)null!=this.customHandles&&(this.customHandles[mxEvent.CUSTOM_HANDLE-this.index].processEvent(b),this.customHandles[mxEvent.CUSTOM_HANDLE-this.index].positionChanged(),null!=this.shape&&null!=this.shape.node&&(this.shape.node.style.display=\"none\"));else if(this.isLabel)this.label.x=this.currentPoint.x,this.label.y=this.currentPoint.y;else{this.points=this.getPreviewPoints(this.currentPoint,b);a=this.isSource||this.isTarget?this.getPreviewTerminalState(b):\nnull;if(null!=c.currentConstraint&&null!=c.currentFocus&&null!=c.currentPoint)this.currentPoint=c.currentPoint.clone();else if(this.outlineConnect){var d=this.isSource||this.isTarget?this.isOutlineConnectEvent(b):!1;d?a=this.marker.highlight.state:null!=a&&a!=b.getState()&&this.graph.isCellConnectable(b.getCell())&&null!=this.marker.highlight.shape&&(this.marker.highlight.shape.stroke=\"transparent\",this.marker.highlight.repaint(),a=null)}null==a||this.isCellEnabled(a.cell)||(a=null,this.marker.reset());\nc=this.clonePreviewState(this.currentPoint,null!=a?a.cell:null);this.updatePreviewState(c,this.currentPoint,a,b,d);this.setPreviewColor(null==this.error?this.marker.validColor:this.marker.invalidColor);this.abspoints=c.absolutePoints;this.active=!0;this.updateHint(b,this.currentPoint)}this.drawPreview();mxEvent.consume(b.getEvent());b.consume()}else mxClient.IS_IE&&null!=this.getHandleForEvent(b)&&b.consume(!1)};\nmxEdgeHandler.prototype.mouseUp=function(a,b){if(null!=this.index&&null!=this.marker){null!=this.shape&&null!=this.shape.node&&(this.shape.node.style.display=\"\");a=this.state.cell;var c=this.index;this.index=null;if(b.getX()!=this.startX||b.getY()!=this.startY){var d=!this.graph.isIgnoreTerminalEvent(b.getEvent())&&this.graph.isCloneEvent(b.getEvent())&&this.cloneEnabled&&this.graph.isCellsCloneable();if(null!=this.error)0<this.error.length&&this.graph.validationAlert(this.error);else if(c<=mxEvent.CUSTOM_HANDLE&&\nc>mxEvent.VIRTUAL_HANDLE){if(null!=this.customHandles){var e=this.graph.getModel();e.beginUpdate();try{this.customHandles[mxEvent.CUSTOM_HANDLE-c].execute(b),null!=this.shape&&null!=this.shape.node&&(this.shape.apply(this.state),this.shape.redraw())}finally{e.endUpdate()}}}else if(this.isLabel)this.moveLabel(this.state,this.label.x,this.label.y);else if(this.isSource||this.isTarget)if(c=null,null!=this.constraintHandler&&null!=this.constraintHandler.currentConstraint&&null!=this.constraintHandler.currentFocus&&\n(c=this.constraintHandler.currentFocus.cell),null==c&&this.marker.hasValidState()&&null!=this.marker.highlight&&null!=this.marker.highlight.shape&&\"transparent\"!=this.marker.highlight.shape.stroke&&\"white\"!=this.marker.highlight.shape.stroke&&(c=this.marker.validState.cell),null!=c){e=this.graph.getModel();var f=e.getParent(a);e.beginUpdate();try{if(d){var g=e.getGeometry(a);d=this.graph.cloneCell(a);e.add(f,d,e.getChildCount(f));null!=g&&(g=g.clone(),e.setGeometry(d,g));var k=e.getTerminal(a,!this.isSource);\nthis.graph.connectCell(d,k,!this.isSource);a=d}a=this.connect(a,c,this.isSource,d,b)}finally{e.endUpdate()}}else this.graph.isAllowDanglingEdges()&&(g=this.abspoints[this.isSource?0:this.abspoints.length-1],g.x=this.roundLength(g.x/this.graph.view.scale-this.graph.view.translate.x),g.y=this.roundLength(g.y/this.graph.view.scale-this.graph.view.translate.y),k=this.graph.getView().getState(this.graph.getModel().getParent(a)),null!=k&&(g.x-=k.origin.x,g.y-=k.origin.y),g.x-=this.graph.panDx/this.graph.view.scale,\ng.y-=this.graph.panDy/this.graph.view.scale,a=this.changeTerminalPoint(a,g,this.isSource,d));else this.active?a=this.changePoints(a,this.points,d):(this.graph.getView().invalidate(this.state.cell),this.graph.getView().validate(this.state.cell))}else this.graph.isToggleEvent(b.getEvent())&&this.graph.selectCellForEvent(this.state.cell,b.getEvent());null!=this.marker&&(this.reset(),a!=this.state.cell&&this.graph.setSelectionCell(a));b.consume()}};\nmxEdgeHandler.prototype.reset=function(){this.active&&this.refresh();this.snapPoint=this.points=this.label=this.index=this.error=null;this.active=this.isTarget=this.isSource=this.isLabel=!1;if(this.livePreview&&null!=this.sizers)for(var a=0;a<this.sizers.length;a++)null!=this.sizers[a]&&(this.sizers[a].node.style.display=\"\");null!=this.marker&&this.marker.reset();null!=this.constraintHandler&&this.constraintHandler.reset();if(null!=this.customHandles)for(a=0;a<this.customHandles.length;a++)this.customHandles[a].reset();\nthis.setPreviewColor(mxConstants.EDGE_SELECTION_COLOR);this.removeHint();this.redraw()};mxEdgeHandler.prototype.setPreviewColor=function(a){null!=this.shape&&(this.shape.stroke=a)};\nmxEdgeHandler.prototype.convertPoint=function(a,b){var c=this.graph.getView().getScale(),d=this.graph.getView().getTranslate();b&&(a.x=this.graph.snap(a.x),a.y=this.graph.snap(a.y));a.x=Math.round(a.x/c-d.x);a.y=Math.round(a.y/c-d.y);b=this.graph.getView().getState(this.graph.getModel().getParent(this.state.cell));null!=b&&(a.x-=b.origin.x,a.y-=b.origin.y);return a};\nmxEdgeHandler.prototype.moveLabel=function(a,b,c){var d=this.graph.getModel(),e=d.getGeometry(a.cell);if(null!=e){var f=this.graph.getView().scale;e=e.clone();if(e.relative){var g=this.graph.getView().getRelativePoint(a,b,c);e.x=Math.round(1E4*g.x)/1E4;e.y=Math.round(g.y);e.offset=new mxPoint(0,0);g=this.graph.view.getPoint(a,e);e.offset=new mxPoint(Math.round((b-g.x)/f),Math.round((c-g.y)/f))}else{var k=a.absolutePoints;g=k[0];k=k[k.length-1];null!=g&&null!=k&&(e.offset=new mxPoint(Math.round((b-\n(g.x+(k.x-g.x)/2))/f),Math.round((c-(g.y+(k.y-g.y)/2))/f)),e.x=0,e.y=0)}d.setGeometry(a.cell,e)}};mxEdgeHandler.prototype.connect=function(a,b,c,d,e){d=this.graph.getModel();d.beginUpdate();try{var f=null!=this.constraintHandler?this.constraintHandler.currentConstraint:null;null==f&&(f=new mxConnectionConstraint);this.graph.connectCell(a,b,c,f)}finally{d.endUpdate()}return a};\nmxEdgeHandler.prototype.changeTerminalPoint=function(a,b,c,d){var e=this.graph.getModel();e.beginUpdate();try{if(d){var f=e.getParent(a),g=e.getTerminal(a,!c);a=this.graph.cloneCell(a);e.add(f,a,e.getChildCount(f));e.setTerminal(a,g,!c)}var k=e.getGeometry(a);null!=k&&(k=k.clone(),k.setTerminalPoint(b,c),e.setGeometry(a,k),this.graph.connectCell(a,null,c,new mxConnectionConstraint))}finally{e.endUpdate()}return a};\nmxEdgeHandler.prototype.changePoints=function(a,b,c){var d=this.graph.getModel();d.beginUpdate();try{if(c){var e=d.getParent(a),f=d.getTerminal(a,!0),g=d.getTerminal(a,!1);a=this.graph.cloneCell(a);d.add(e,a,d.getChildCount(e));d.setTerminal(a,f,!0);d.setTerminal(a,g,!1)}var k=d.getGeometry(a);null!=k&&(k=k.clone(),k.points=b,d.setGeometry(a,k))}finally{d.endUpdate()}return a};\nmxEdgeHandler.prototype.addPoint=function(a,b){var c=mxUtils.convertPoint(this.graph.container,mxEvent.getClientX(b),mxEvent.getClientY(b)),d=this.graph.isGridEnabledEvent(b);this.convertPoint(c,d);this.addPointAt(a,c.x,c.y);mxEvent.consume(b)};\nmxEdgeHandler.prototype.addPointAt=function(a,b,c){var d=this.graph.getCellGeometry(a.cell);b=new mxPoint(b,c);if(null!=d){d=d.clone();var e=this.graph.view.translate;c=this.graph.view.scale;e=new mxPoint(e.x*c,e.y*c);var f=this.graph.model.getParent(this.state.cell);this.graph.model.isVertex(f)&&(e=this.graph.view.getState(f),e=new mxPoint(e.x,e.y));c=mxUtils.findNearestSegment(a,b.x*c+e.x,b.y*c+e.y);null==d.points?d.points=[b]:d.points.splice(c,0,b);this.graph.getModel().setGeometry(a.cell,d);this.refresh();\nthis.redraw()}};mxEdgeHandler.prototype.removePoint=function(a,b){if(0<b&&b<this.abspoints.length-1){var c=this.graph.getCellGeometry(this.state.cell);null!=c&&null!=c.points&&(c=c.clone(),c.points.splice(b-1,1),this.graph.getModel().setGeometry(a.cell,c),this.refresh(),this.redraw())}};\nmxEdgeHandler.prototype.getHandleFillColor=function(a){a=0==a;var b=this.state.cell,c=this.graph.getModel().getTerminal(b,a),d=mxConstants.HANDLE_FILLCOLOR;null!=c&&!this.graph.isCellDisconnectable(b,c,a)||null==c&&!this.graph.isTerminalPointMovable(b,a)?d=mxConstants.LOCKED_HANDLE_FILLCOLOR:null!=c&&this.graph.isCellDisconnectable(b,c,a)&&(d=mxConstants.CONNECT_HANDLE_FILLCOLOR);return d};\nmxEdgeHandler.prototype.redraw=function(a){if(null!=this.state){this.abspoints=this.state.absolutePoints.slice();var b=this.graph.getModel().getGeometry(this.state.cell);if(null!=b&&(b=b.points,null!=this.bends&&0<this.bends.length&&null!=b)){null==this.points&&(this.points=[]);for(var c=1;c<this.bends.length-1;c++)null!=this.bends[c]&&null!=this.abspoints[c]&&(this.points[c-1]=b[c-1])}this.drawPreview();a||this.redrawHandles()}};mxEdgeHandler.prototype.isTerminalHandleVisible=function(a){return!0};\nmxEdgeHandler.prototype.redrawHandles=function(){var a=this.state.cell;if(null!=this.labelShape){var b=this.labelShape.bounds;this.label=new mxPoint(this.state.absoluteOffset.x,this.state.absoluteOffset.y);this.labelShape.bounds=new mxRectangle(Math.round(this.label.x-b.width/2),Math.round(this.label.y-b.height/2),b.width,b.height);b=this.graph.getLabel(a);this.labelShape.visible=null!=b&&0<b.length&&this.graph.isCellEditable(this.state.cell)&&this.graph.isLabelMovable(a)}if(null!=this.bends&&0<this.bends.length){var c=\nthis.abspoints.length-1;a=this.abspoints[0];var d=a.x,e=a.y;b=this.bends[0].bounds;this.bends[0].bounds=new mxRectangle(Math.floor(d-b.width/2),Math.floor(e-b.height/2),b.width,b.height);this.bends[0].fill=this.getHandleFillColor(0);this.bends[0].redraw();this.manageLabelHandle&&this.checkLabelHandle(this.bends[0].bounds);null!=this.state.visibleSourceState&&(this.bends[0].node.style.visibility=this.isTerminalHandleVisible(!0)?\"\":\"hidden\");c=this.abspoints[c];d=c.x;e=c.y;var f=this.bends.length-1;\nb=this.bends[f].bounds;this.bends[f].bounds=new mxRectangle(Math.floor(d-b.width/2),Math.floor(e-b.height/2),b.width,b.height);this.bends[f].fill=this.getHandleFillColor(f);this.bends[f].redraw();this.manageLabelHandle&&this.checkLabelHandle(this.bends[f].bounds);null!=this.state.visibleTargetState&&(this.bends[f].node.style.visibility=this.isTerminalHandleVisible(!1)?\"\":\"hidden\");this.redrawInnerBends(a,c)}if(null!=this.abspoints&&null!=this.virtualBends&&0<this.virtualBends.length)for(c=this.abspoints[0],\na=0;a<this.virtualBends.length;a++)null!=this.virtualBends[a]&&null!=this.abspoints[a+1]&&(d=this.abspoints[a+1],b=this.virtualBends[a],b.bounds=new mxRectangle(Math.floor(c.x+(d.x-c.x)/2-b.bounds.width/2),Math.floor(c.y+(d.y-c.y)/2-b.bounds.height/2),b.bounds.width,b.bounds.height),b.redraw(),mxUtils.setOpacity(b.node,this.virtualBendOpacity),c=d,this.manageLabelHandle&&this.checkLabelHandle(b.bounds));null!=this.labelShape&&this.labelShape.redraw();if(null!=this.customHandles)for(a=0;a<this.customHandles.length;a++)b=\nthis.customHandles[a].shape.node.style.display,this.customHandles[a].redraw(),this.customHandles[a].shape.node.style.display=b,this.customHandles[a].shape.node.style.visibility=this.isCustomHandleVisible(this.customHandles[a])?\"\":\"hidden\"};mxEdgeHandler.prototype.isCustomHandleVisible=function(a){return!this.graph.isEditing()&&1==this.state.view.graph.getSelectionCount()};\nmxEdgeHandler.prototype.setHandlesVisible=function(a){if(null!=this.bends)for(var b=0;b<this.bends.length;b++)null!=this.bends[b]&&(this.bends[b].node.style.display=a?\"\":\"none\");if(null!=this.virtualBends)for(b=0;b<this.virtualBends.length;b++)null!=this.virtualBends[b]&&(this.virtualBends[b].node.style.display=a?\"\":\"none\");null!=this.labelShape&&(this.labelShape.node.style.display=a?\"\":\"none\");if(null!=this.customHandles)for(b=0;b<this.customHandles.length;b++)this.customHandles[b].setVisible(a)};\nmxEdgeHandler.prototype.redrawInnerBends=function(a,b){for(a=1;a<this.bends.length-1;a++)if(null!=this.bends[a])if(null!=this.abspoints[a]){b=this.abspoints[a].x;var c=this.abspoints[a].y,d=this.bends[a].bounds;this.bends[a].node.style.visibility=\"visible\";this.bends[a].bounds=new mxRectangle(Math.round(b-d.width/2),Math.round(c-d.height/2),d.width,d.height);this.manageLabelHandle?this.checkLabelHandle(this.bends[a].bounds):null==this.handleImage&&this.labelShape.visible&&mxUtils.intersects(this.bends[a].bounds,\nthis.labelShape.bounds)&&(w=mxConstants.HANDLE_SIZE+3,h=mxConstants.HANDLE_SIZE+3,this.bends[a].bounds=new mxRectangle(Math.round(b-w/2),Math.round(c-h/2),w,h));this.bends[a].redraw()}else this.bends[a].destroy(),this.bends[a]=null};mxEdgeHandler.prototype.checkLabelHandle=function(a){if(null!=this.labelShape){var b=this.labelShape.bounds;mxUtils.intersects(a,b)&&(a.getCenterY()<b.getCenterY()?b.y=a.y+a.height:b.y=a.y-b.height)}};\nmxEdgeHandler.prototype.drawPreview=function(){try{if(this.isLabel){var a=this.labelShape.bounds,b=new mxRectangle(Math.round(this.label.x-a.width/2),Math.round(this.label.y-a.height/2),a.width,a.height);this.labelShape.bounds.equals(b)||(this.labelShape.bounds=b,this.labelShape.redraw())}null==this.shape||mxUtils.equalPoints(this.shape.points,this.abspoints)||(this.shape.apply(this.state),this.shape.points=this.abspoints.slice(),this.shape.scale=this.state.view.scale,this.shape.isDashed=this.isSelectionDashed(),\nthis.shape.stroke=this.getSelectionColor(),this.shape.strokewidth=this.getSelectionStrokeWidth()/this.shape.scale/this.shape.scale,this.shape.isShadow=!1,this.shape.redraw());this.updateParentHighlight()}catch(c){}};mxEdgeHandler.prototype.isHandlesVisible=function(){return 0>=mxGraphHandler.prototype.maxCells||this.graph.getSelectionCount()<=mxGraphHandler.prototype.maxCells};\nmxEdgeHandler.prototype.refresh=function(){null!=this.state&&(this.abspoints=this.getSelectionPoints(this.state),this.points=[],null!=this.bends&&(this.destroyBends(this.bends),this.bends=null),this.isHandlesVisible()&&(this.bends=this.createBends()),null!=this.virtualBends&&(this.destroyBends(this.virtualBends),this.virtualBends=null),this.isHandlesVisible()&&(this.virtualBends=this.createVirtualBends()),null!=this.customHandles&&(this.destroyBends(this.customHandles),this.customHandles=null),this.isHandlesVisible()&&\n(this.customHandles=this.createCustomHandles()),null!=this.labelShape&&(this.labelShape.destroy(),this.labelShape=null),this.isHandlesVisible()&&(this.labelShape=this.createLabelShape()),null!=this.labelShape&&null!=this.labelShape.node&&null!=this.labelShape.node.parentNode&&this.labelShape.node.parentNode.appendChild(this.labelShape.node))};mxEdgeHandler.prototype.isDestroyed=function(){return null==this.shape};\nmxEdgeHandler.prototype.destroyBends=function(a){if(null!=a)for(var b=0;b<a.length;b++)null!=a[b]&&a[b].destroy()};\nmxEdgeHandler.prototype.destroy=function(){null!=this.escapeHandler&&(this.state.view.graph.removeListener(this.escapeHandler),this.escapeHandler=null);null!=this.marker&&(this.marker.destroy(),this.marker=null);null!=this.shape&&(this.shape.destroy(),this.shape=null);null!=this.labelShape&&(this.labelShape.destroy(),this.labelShape=null);null!=this.constraintHandler&&(this.constraintHandler.destroy(),this.constraintHandler=null);null!=this.parentHighlight&&this.destroyParentHighlight();this.destroyBends(this.virtualBends);\nthis.virtualBends=null;this.destroyBends(this.customHandles);this.customHandles=null;this.destroyBends(this.bends);this.bends=null;this.removeHint()};function mxElbowEdgeHandler(a){mxEdgeHandler.call(this,a)}mxUtils.extend(mxElbowEdgeHandler,mxEdgeHandler);mxElbowEdgeHandler.prototype.flipEnabled=!0;mxElbowEdgeHandler.prototype.doubleClickOrientationResource=\"none\"!=mxClient.language?\"doubleClickOrientation\":\"\";\nmxElbowEdgeHandler.prototype.createBends=function(){var a=[],b=this.createHandleShape(0);this.initBend(b);b.setCursor(mxConstants.CURSOR_TERMINAL_HANDLE);a.push(b);a.push(this.createVirtualBend(mxUtils.bind(this,function(c){!mxEvent.isConsumed(c)&&this.flipEnabled&&(this.graph.flipEdge(this.state.cell,c),mxEvent.consume(c))})));this.points.push(new mxPoint(0,0));b=this.createHandleShape(2,null,!0);this.initBend(b);b.setCursor(mxConstants.CURSOR_TERMINAL_HANDLE);a.push(b);return a};\nmxElbowEdgeHandler.prototype.createVirtualBends=function(){return null};mxElbowEdgeHandler.prototype.createVirtualBend=function(a){var b=this.createHandleShape();this.initBend(b,a);b.setCursor(this.getCursorForBend());this.graph.isCellBendable(this.state.cell)||(b.node.style.display=\"none\");return b};\nmxElbowEdgeHandler.prototype.getCursorForBend=function(){return this.state.style[mxConstants.STYLE_EDGE]==mxEdgeStyle.TopToBottom||this.state.style[mxConstants.STYLE_EDGE]==mxConstants.EDGESTYLE_TOPTOBOTTOM||(this.state.style[mxConstants.STYLE_EDGE]==mxEdgeStyle.ElbowConnector||this.state.style[mxConstants.STYLE_EDGE]==mxConstants.EDGESTYLE_ELBOW)&&this.state.style[mxConstants.STYLE_ELBOW]==mxConstants.ELBOW_VERTICAL?\"row-resize\":\"col-resize\"};\nmxElbowEdgeHandler.prototype.getTooltipForNode=function(a){var b=null;null==this.bends||null==this.bends[1]||a!=this.bends[1].node&&a.parentNode!=this.bends[1].node||(b=this.doubleClickOrientationResource,b=mxResources.get(b)||b);return b};\nmxElbowEdgeHandler.prototype.convertPoint=function(a,b){var c=this.graph.getView().getScale(),d=this.graph.getView().getTranslate(),e=this.state.origin;b&&(a.x=this.graph.snap(a.x),a.y=this.graph.snap(a.y));a.x=Math.round(a.x/c-d.x-e.x);a.y=Math.round(a.y/c-d.y-e.y);return a};\nmxElbowEdgeHandler.prototype.redrawInnerBends=function(a,b){var c=this.graph.getModel().getGeometry(this.state.cell),d=this.state.absolutePoints,e=null;1<d.length?(a=d[1],b=d[d.length-2]):null!=c.points&&0<c.points.length&&(e=d[0]);e=null==e?new mxPoint(a.x+(b.x-a.x)/2,a.y+(b.y-a.y)/2):new mxPoint(this.graph.getView().scale*(e.x+this.graph.getView().translate.x+this.state.origin.x),this.graph.getView().scale*(e.y+this.graph.getView().translate.y+this.state.origin.y));b=this.bends[1].bounds;a=b.width;\nb=b.height;a=new mxRectangle(Math.round(e.x-a/2),Math.round(e.y-b/2),a,b);this.manageLabelHandle?this.checkLabelHandle(a):null==this.handleImage&&this.labelShape.visible&&mxUtils.intersects(a,this.labelShape.bounds)&&(a=mxConstants.HANDLE_SIZE+3,b=mxConstants.HANDLE_SIZE+3,a=new mxRectangle(Math.floor(e.x-a/2),Math.floor(e.y-b/2),a,b));this.bends[1].bounds=a;this.bends[1].redraw();this.manageLabelHandle&&this.checkLabelHandle(this.bends[1].bounds)};\nfunction mxEdgeSegmentHandler(a){mxEdgeHandler.call(this,a)}mxUtils.extend(mxEdgeSegmentHandler,mxElbowEdgeHandler);\nmxEdgeSegmentHandler.prototype.getCurrentPoints=function(){var a=this.state.absolutePoints;if(null!=a){var b=Math.max(1,this.graph.view.scale);if(2==a.length||3==a.length&&(Math.abs(a[0].x-a[1].x)<b&&Math.abs(a[1].x-a[2].x)<b||Math.abs(a[0].y-a[1].y)<b&&Math.abs(a[1].y-a[2].y)<b)){b=a[0].x+(a[a.length-1].x-a[0].x)/2;var c=a[0].y+(a[a.length-1].y-a[0].y)/2;a=[a[0],new mxPoint(b,c),new mxPoint(b,c),a[a.length-1]]}}return a};\nmxEdgeSegmentHandler.prototype.getPreviewPoints=function(a){if(this.isSource||this.isTarget)return mxElbowEdgeHandler.prototype.getPreviewPoints.apply(this,arguments);var b=this.getCurrentPoints(),c=this.convertPoint(b[0].clone(),!1);a=this.convertPoint(a.clone(),!1);for(var d=[],e=1;e<b.length;e++){var f=this.convertPoint(b[e].clone(),!1);e==this.index&&(0==Math.round(c.x-f.x)&&(c.x=a.x,f.x=a.x),0==Math.round(c.y-f.y)&&(c.y=a.y,f.y=a.y));e<b.length-1&&d.push(f);c=f}if(1==d.length){b=this.state.getVisibleTerminalState(!0);\nc=this.state.getVisibleTerminalState(!1);f=this.state.view.getScale();var g=this.state.view.getTranslate();e=d[0].x*f+g.x;f=d[0].y*f+g.y;if(null!=b&&mxUtils.contains(b,e,f)||null!=c&&mxUtils.contains(c,e,f))d=[a,a]}return d};\nmxEdgeSegmentHandler.prototype.updatePreviewState=function(a,b,c,d){mxEdgeHandler.prototype.updatePreviewState.apply(this,arguments);if(!this.isSource&&!this.isTarget){b=this.convertPoint(b.clone(),!1);for(var e=a.absolutePoints,f=e[0],g=e[1],k=[],l=2;l<e.length;l++){var m=e[l];0==Math.round(f.x-g.x)&&0==Math.round(g.x-m.x)||0==Math.round(f.y-g.y)&&0==Math.round(g.y-m.y)||k.push(this.convertPoint(g.clone(),!1));f=g;g=m}f=this.state.getVisibleTerminalState(!0);g=this.state.getVisibleTerminalState(!1);\nl=this.state.absolutePoints;if(0==k.length&&(0==Math.round(e[0].x-e[e.length-1].x)||0==Math.round(e[0].y-e[e.length-1].y)))k=[b,b];else if(5==e.length&&2==k.length&&null!=f&&null!=g&&null!=l&&0==Math.round(l[0].x-l[l.length-1].x)){k=this.graph.getView();l=k.getScale();m=k.getTranslate();e=k.getRoutingCenterY(f)/l-m.y;var n=this.graph.getConnectionConstraint(a,f,!0);null!=n&&(n=this.graph.getConnectionPoint(f,n),null!=n&&(this.convertPoint(n,!1),e=n.y));k=k.getRoutingCenterY(g)/l-m.y;if(l=this.graph.getConnectionConstraint(a,\ng,!1))n=this.graph.getConnectionPoint(g,l),null!=n&&(this.convertPoint(n,!1),k=n.y);k=[new mxPoint(b.x,e),new mxPoint(b.x,k)]}this.points=k;a.view.updateFixedTerminalPoints(a,f,g);a.view.updatePoints(a,this.points,f,g);a.view.updateFloatingTerminalPoints(a,f,g)}};\nmxEdgeSegmentHandler.prototype.connect=function(a,b,c,d,e){var f=this.graph.getModel(),g=f.getGeometry(a),k=null;if(null!=g&&null!=g.points&&0<g.points.length){var l=this.abspoints,m=l[0],n=l[1];k=[];for(var p=2;p<l.length;p++){var q=l[p];0==Math.round(m.x-n.x)&&0==Math.round(n.x-q.x)||0==Math.round(m.y-n.y)&&0==Math.round(n.y-q.y)||k.push(this.convertPoint(n.clone(),!1));m=n;n=q}}f.beginUpdate();try{null!=k&&(g=f.getGeometry(a),null!=g&&(g=g.clone(),g.points=k,f.setGeometry(a,g))),a=mxEdgeHandler.prototype.connect.apply(this,\narguments)}finally{f.endUpdate()}return a};mxEdgeSegmentHandler.prototype.getTooltipForNode=function(a){return null};mxEdgeSegmentHandler.prototype.start=function(a,b,c){mxEdgeHandler.prototype.start.apply(this,arguments);null==this.bends||null==this.bends[c]||this.isSource||this.isTarget||mxUtils.setOpacity(this.bends[c].node,100)};\nmxEdgeSegmentHandler.prototype.createBends=function(){var a=[],b=this.createHandleShape(0);this.initBend(b);b.setCursor(mxConstants.CURSOR_TERMINAL_HANDLE);a.push(b);var c=this.getCurrentPoints();if(this.graph.isCellBendable(this.state.cell)){null==this.points&&(this.points=[]);for(var d=0;d<c.length-1;d++){b=this.createVirtualBend();a.push(b);var e=0==Math.round(c[d].x-c[d+1].x);0==Math.round(c[d].y-c[d+1].y)&&d<c.length-2&&(e=0==Math.round(c[d].x-c[d+2].x));b.setCursor(e?\"col-resize\":\"row-resize\");\nthis.points.push(new mxPoint(0,0))}}b=this.createHandleShape(c.length,null,!0);this.initBend(b);b.setCursor(mxConstants.CURSOR_TERMINAL_HANDLE);a.push(b);return a};mxEdgeSegmentHandler.prototype.createVirtualBends=function(){return null};mxEdgeSegmentHandler.prototype.redraw=function(){this.refresh();mxEdgeHandler.prototype.redraw.apply(this,arguments)};\nmxEdgeSegmentHandler.prototype.redrawInnerBends=function(a,b){if(this.graph.isCellBendable(this.state.cell)){var c=this.getCurrentPoints();if(null!=c&&1<c.length){var d=!1;if(4==c.length&&0==Math.round(c[1].x-c[2].x)&&0==Math.round(c[1].y-c[2].y))if(d=!0,0==Math.round(c[0].y-c[c.length-1].y)){var e=c[0].x+(c[c.length-1].x-c[0].x)/2;c[1]=new mxPoint(e,c[1].y);c[2]=new mxPoint(e,c[2].y)}else e=c[0].y+(c[c.length-1].y-c[0].y)/2,c[1]=new mxPoint(c[1].x,e),c[2]=new mxPoint(c[2].x,e);for(e=0;e<c.length-\n1;e++)null!=this.bends[e+1]&&(a=c[e],b=c[e+1],a=new mxPoint(a.x+(b.x-a.x)/2,a.y+(b.y-a.y)/2),b=this.bends[e+1].bounds,this.bends[e+1].bounds=new mxRectangle(Math.floor(a.x-b.width/2),Math.floor(a.y-b.height/2),b.width,b.height),this.bends[e+1].redraw(),this.manageLabelHandle&&this.checkLabelHandle(this.bends[e+1].bounds));d&&(mxUtils.setOpacity(this.bends[1].node,this.virtualBendOpacity),mxUtils.setOpacity(this.bends[3].node,this.virtualBendOpacity))}}};\nfunction mxKeyHandler(a,b){null!=a&&(this.graph=a,this.target=b||document.documentElement,this.normalKeys=[],this.shiftKeys=[],this.controlKeys=[],this.controlShiftKeys=[],this.keydownHandler=mxUtils.bind(this,function(c){this.keyDown(c)}),mxEvent.addListener(this.target,\"keydown\",this.keydownHandler),mxClient.IS_IE&&mxEvent.addListener(window,\"unload\",mxUtils.bind(this,function(){this.destroy()})))}mxKeyHandler.prototype.graph=null;mxKeyHandler.prototype.target=null;\nmxKeyHandler.prototype.normalKeys=null;mxKeyHandler.prototype.shiftKeys=null;mxKeyHandler.prototype.controlKeys=null;mxKeyHandler.prototype.controlShiftKeys=null;mxKeyHandler.prototype.enabled=!0;mxKeyHandler.prototype.isEnabled=function(){return this.enabled};mxKeyHandler.prototype.setEnabled=function(a){this.enabled=a};mxKeyHandler.prototype.bindKey=function(a,b){this.normalKeys[a]=b};mxKeyHandler.prototype.bindShiftKey=function(a,b){this.shiftKeys[a]=b};\nmxKeyHandler.prototype.bindControlKey=function(a,b){this.controlKeys[a]=b};mxKeyHandler.prototype.bindControlShiftKey=function(a,b){this.controlShiftKeys[a]=b};mxKeyHandler.prototype.isControlDown=function(a){return mxEvent.isControlDown(a)};mxKeyHandler.prototype.getFunction=function(a){return null==a||mxEvent.isAltDown(a)?null:this.isControlDown(a)?mxEvent.isShiftDown(a)?this.controlShiftKeys[a.keyCode]:this.controlKeys[a.keyCode]:mxEvent.isShiftDown(a)?this.shiftKeys[a.keyCode]:this.normalKeys[a.keyCode]};\nmxKeyHandler.prototype.isGraphEvent=function(a){var b=mxEvent.getSource(a);return b==this.target||b.parentNode==this.target||null!=this.graph.cellEditor&&this.graph.cellEditor.isEventSource(a)?!0:mxUtils.isAncestorNode(this.graph.container,b)};mxKeyHandler.prototype.keyDown=function(a){if(this.isEnabledForEvent(a))if(27==a.keyCode)this.escape(a);else if(!this.isEventIgnored(a)){var b=this.getFunction(a);null!=b&&(b(a),mxEvent.consume(a))}};\nmxKeyHandler.prototype.isEnabledForEvent=function(a){return this.graph.isEnabled()&&!mxEvent.isConsumed(a)&&this.isGraphEvent(a)&&this.isEnabled()};mxKeyHandler.prototype.isEventIgnored=function(a){return this.graph.isEditing()};mxKeyHandler.prototype.escape=function(a){this.graph.isEscapeEnabled()&&this.graph.escape(a)};\nmxKeyHandler.prototype.destroy=function(){null!=this.target&&null!=this.keydownHandler&&(mxEvent.removeListener(this.target,\"keydown\",this.keydownHandler),this.keydownHandler=null);this.target=null};function mxTooltipHandler(a,b){null!=a&&(this.graph=a,this.delay=b||500,this.graph.addMouseListener(this))}mxTooltipHandler.prototype.zIndex=10005;mxTooltipHandler.prototype.graph=null;mxTooltipHandler.prototype.delay=null;mxTooltipHandler.prototype.ignoreTouchEvents=!0;\nmxTooltipHandler.prototype.hideOnHover=!1;mxTooltipHandler.prototype.destroyed=!1;mxTooltipHandler.prototype.enabled=!0;mxTooltipHandler.prototype.isEnabled=function(){return this.enabled};mxTooltipHandler.prototype.setEnabled=function(a){this.enabled=a};mxTooltipHandler.prototype.isHideOnHover=function(){return this.hideOnHover};mxTooltipHandler.prototype.setHideOnHover=function(a){this.hideOnHover=a};\nmxTooltipHandler.prototype.init=function(){null!=document.body&&(this.div=document.createElement(\"div\"),this.div.className=\"mxTooltip\",this.div.style.visibility=\"hidden\",document.body.appendChild(this.div),mxEvent.addGestureListeners(this.div,mxUtils.bind(this,function(a){\"A\"!=mxEvent.getSource(a).nodeName&&this.hideTooltip()})))};mxTooltipHandler.prototype.getStateForEvent=function(a){return a.getState()};mxTooltipHandler.prototype.mouseDown=function(a,b){this.reset(b,!1);this.hideTooltip()};\nmxTooltipHandler.prototype.mouseMove=function(a,b){if(b.getX()!=this.lastX||b.getY()!=this.lastY)this.reset(b,!0),a=this.getStateForEvent(b),(this.isHideOnHover()||a!=this.state||b.getSource()!=this.node&&(!this.stateSource||null!=a&&this.stateSource==(b.isSource(a.shape)||!b.isSource(a.text))))&&this.hideTooltip();this.lastX=b.getX();this.lastY=b.getY()};mxTooltipHandler.prototype.mouseUp=function(a,b){this.reset(b,!0);this.hideTooltip()};\nmxTooltipHandler.prototype.resetTimer=function(){null!=this.thread&&(window.clearTimeout(this.thread),this.thread=null)};\nmxTooltipHandler.prototype.reset=function(a,b,c){if(!this.ignoreTouchEvents||mxEvent.isMouseEvent(a.getEvent()))if(this.resetTimer(),c=null!=c?c:this.getStateForEvent(a),b&&this.isEnabled()&&null!=c&&(null==this.div||\"hidden\"==this.div.style.visibility)){var d=a.getSource(),e=a.getX(),f=a.getY(),g=a.isSource(c.shape)||a.isSource(c.text);this.thread=window.setTimeout(mxUtils.bind(this,function(){if(!this.graph.isEditing()&&!this.graph.popupMenuHandler.isMenuShowing()&&!this.graph.isMouseDown){var k=\nthis.graph.getTooltip(c,d,e,f);this.show(k,e,f);this.state=c;this.node=d;this.stateSource=g}}),this.delay)}};mxTooltipHandler.prototype.hide=function(){this.resetTimer();this.hideTooltip()};mxTooltipHandler.prototype.hideTooltip=function(){null!=this.div&&(this.div.style.visibility=\"hidden\",this.div.innerText=\"\")};\nmxTooltipHandler.prototype.show=function(a,b,c){if(!this.destroyed&&null!=a&&0<a.length){null==this.div&&this.init();var d=mxUtils.getScrollOrigin();this.div.style.zIndex=this.zIndex;this.div.style.left=b+d.x+\"px\";this.div.style.top=c+mxConstants.TOOLTIP_VERTICAL_OFFSET+d.y+\"px\";mxUtils.isNode(a)?(this.div.innerText=\"\",this.div.appendChild(a)):this.div.innerHTML=a.replace(/\\n/g,\"<br>\");this.div.style.visibility=\"\";mxUtils.fit(this.div)}};\nmxTooltipHandler.prototype.destroy=function(){this.destroyed||(this.graph.removeMouseListener(this),mxEvent.release(this.div),null!=this.div&&null!=this.div.parentNode&&this.div.parentNode.removeChild(this.div),this.destroyed=!0,this.div=null)};function mxCellTracker(a,b,c){mxCellMarker.call(this,a,b);this.graph.addMouseListener(this);null!=c&&(this.getCell=c);mxClient.IS_IE&&mxEvent.addListener(window,\"unload\",mxUtils.bind(this,function(){this.destroy()}))}mxUtils.extend(mxCellTracker,mxCellMarker);\nmxCellTracker.prototype.mouseDown=function(a,b){};mxCellTracker.prototype.mouseMove=function(a,b){this.isEnabled()&&this.process(b)};mxCellTracker.prototype.mouseUp=function(a,b){};mxCellTracker.prototype.destroy=function(){this.destroyed||(this.destroyed=!0,this.graph.removeMouseListener(this),mxCellMarker.prototype.destroy.apply(this))};\nfunction mxCellHighlight(a,b,c,d){null!=a&&(this.graph=a,this.highlightColor=null!=b?b:mxConstants.DEFAULT_VALID_COLOR,this.strokeWidth=null!=c?c:mxConstants.HIGHLIGHT_STROKEWIDTH,this.dashed=null!=d?d:!1,this.opacity=mxConstants.HIGHLIGHT_OPACITY,this.repaintHandler=mxUtils.bind(this,function(){if(null!=this.state){var e=this.graph.view.getState(this.state.cell);null==e?this.hide():(this.state=e,this.repaint())}}),this.graph.getView().addListener(mxEvent.SCALE,this.repaintHandler),this.graph.getView().addListener(mxEvent.TRANSLATE,\nthis.repaintHandler),this.graph.getView().addListener(mxEvent.SCALE_AND_TRANSLATE,this.repaintHandler),this.graph.getModel().addListener(mxEvent.CHANGE,this.repaintHandler),this.resetHandler=mxUtils.bind(this,function(){this.hide()}),this.graph.getView().addListener(mxEvent.DOWN,this.resetHandler),this.graph.getView().addListener(mxEvent.UP,this.resetHandler))}mxCellHighlight.prototype.keepOnTop=!1;mxCellHighlight.prototype.graph=null;mxCellHighlight.prototype.state=null;\nmxCellHighlight.prototype.spacing=2;mxCellHighlight.prototype.resetHandler=null;mxCellHighlight.prototype.setHighlightColor=function(a){this.highlightColor=a;null!=this.shape&&(this.shape.stroke=a)};mxCellHighlight.prototype.drawHighlight=function(){this.shape=this.createShape();this.repaint();this.keepOnTop||this.shape.node.parentNode.firstChild==this.shape.node||this.shape.node.parentNode.insertBefore(this.shape.node,this.shape.node.parentNode.firstChild)};\nmxCellHighlight.prototype.createShape=function(){var a=this.graph.cellRenderer.createShape(this.state);a.svgStrokeTolerance=this.graph.tolerance;a.points=this.state.absolutePoints;a.apply(this.state);a.stroke=this.highlightColor;a.opacity=this.opacity;a.isDashed=this.dashed;a.isShadow=!1;a.dialect=mxConstants.DIALECT_SVG;a.init(this.graph.getView().getOverlayPane());mxEvent.redirectMouseEvents(a.node,this.graph,this.state);this.graph.dialect!=mxConstants.DIALECT_SVG?a.pointerEvents=!1:a.svgPointerEvents=\n\"stroke\";return a};mxCellHighlight.prototype.getStrokeWidth=function(a){return this.strokeWidth};\nmxCellHighlight.prototype.repaint=function(){null!=this.state&&null!=this.shape&&(this.shape.scale=this.state.view.scale,this.graph.model.isEdge(this.state.cell)?(this.shape.strokewidth=this.getStrokeWidth(),this.shape.points=this.state.absolutePoints,this.shape.outline=!1):(this.shape.bounds=new mxRectangle(this.state.x-this.spacing,this.state.y-this.spacing,this.state.width+2*this.spacing,this.state.height+2*this.spacing),this.shape.rotation=Number(this.state.style[mxConstants.STYLE_ROTATION]||\n\"0\"),this.shape.strokewidth=this.getStrokeWidth()/this.state.view.scale,this.shape.outline=!0),null!=this.state.shape&&this.shape.setCursor(this.state.shape.getCursor()),this.shape.redraw())};mxCellHighlight.prototype.hide=function(){this.highlight(null)};mxCellHighlight.prototype.highlight=function(a){this.state!=a&&(null!=this.shape&&(this.shape.destroy(),this.shape=null),this.state=a,null!=this.state&&this.drawHighlight())};\nmxCellHighlight.prototype.isHighlightAt=function(a,b){var c=!1;if(null!=this.shape&&null!=document.elementFromPoint)for(a=document.elementFromPoint(a,b);null!=a;){if(a==this.shape.node){c=!0;break}a=a.parentNode}return c};mxCellHighlight.prototype.destroy=function(){this.graph.getView().removeListener(this.resetHandler);this.graph.getView().removeListener(this.repaintHandler);this.graph.getModel().removeListener(this.repaintHandler);null!=this.shape&&(this.shape.destroy(),this.shape=null)};\nvar mxCodecRegistry={codecs:[],aliases:[],register:function(a){if(null!=a){var b=a.getName();mxCodecRegistry.codecs[b]=a;var c=mxUtils.getFunctionName(a.template.constructor);c!=b&&mxCodecRegistry.addAlias(c,b)}return a},addAlias:function(a,b){mxCodecRegistry.aliases[a]=b},getCodec:function(a){var b=null;if(null!=a){b=mxUtils.getFunctionName(a);var c=mxCodecRegistry.aliases[b];null!=c&&(b=c);b=mxCodecRegistry.codecs[b];if(null==b)try{b=new mxObjectCodec(new a),mxCodecRegistry.register(b)}catch(d){}}return b}};\nfunction mxCodec(a){this.document=a||mxUtils.createXmlDocument();this.objects=[]}mxCodec.allowlist=null;mxCodec.prototype.document=null;mxCodec.prototype.objects=null;mxCodec.prototype.elements=null;mxCodec.prototype.encodeDefaults=!1;mxCodec.prototype.putObject=function(a,b){return this.objects[a]=b};mxCodec.prototype.getObject=function(a){var b=null;null!=a&&(b=this.objects[a],null==b&&(b=this.lookup(a),null==b&&(a=this.getElementById(a),null!=a&&(b=this.decode(a)))));return b};\nmxCodec.prototype.lookup=function(a){return null};mxCodec.prototype.getElementById=function(a){this.updateElements();return this.elements[a]};mxCodec.prototype.updateElements=function(){null==this.elements&&(this.elements={},null!=this.document.documentElement&&this.addElement(this.document.documentElement))};\nmxCodec.prototype.addElement=function(a){if(a.nodeType==mxConstants.NODETYPE_ELEMENT){var b=a.getAttribute(\"id\");if(null!=b)if(null==this.elements[b])this.elements[b]=a;else if(this.elements[b]!=a)throw Error(b+\": Duplicate ID\");}for(a=a.firstChild;null!=a;)this.addElement(a),a=a.nextSibling};mxCodec.prototype.getId=function(a){var b=null;null!=a&&(b=this.reference(a),null==b&&a instanceof mxCell&&(b=a.getId(),null==b&&(b=mxCellPath.create(a),0==b.length&&(b=\"root\"))));return b};\nmxCodec.prototype.reference=function(a){return null};mxCodec.prototype.encode=function(a){var b=null;if(null!=a&&null!=a.constructor){var c=mxCodecRegistry.getCodec(a.constructor);null!=c?b=c.encode(this,a):mxUtils.isNode(a)?b=mxUtils.importNode(this.document,a,!0):mxLog.warn(\"mxCodec.encode: No codec for \"+mxUtils.getFunctionName(a.constructor))}return b};\nmxCodec.prototype.decode=function(a,b){this.updateElements();var c=null;null!=a&&a.nodeType==mxConstants.NODETYPE_ELEMENT&&(c=this.getConstructor(a.nodeName),c=mxCodecRegistry.getCodec(c),null!=c?c=c.decode(this,a,b):(c=a.cloneNode(!0),c.removeAttribute(\"as\")));return c};mxCodec.prototype.getConstructor=function(a){var b=null;try{null==mxCodec.allowlist||0<=mxUtils.indexOf(mxCodec.allowlist,a)?b=window[a]:null!=window.console&&console.error(\"mxCodec.getConstructor: \"+a+\" not allowed in mxCodec.allowlist\")}catch(c){}return b};\nmxCodec.prototype.encodeCell=function(a,b,c){b.appendChild(this.encode(a));if(null==c||c){c=a.getChildCount();for(var d=0;d<c;d++)this.encodeCell(a.getChildAt(d),b)}};mxCodec.prototype.isCellCodec=function(a){return null!=a&&\"function\"==typeof a.isCellCodec?a.isCellCodec():!1};\nmxCodec.prototype.decodeCell=function(a,b){b=null!=b?b:!0;var c=null;if(null!=a&&a.nodeType==mxConstants.NODETYPE_ELEMENT){c=mxCodecRegistry.getCodec(a.nodeName);if(!this.isCellCodec(c))for(var d=a.firstChild;null!=d&&!this.isCellCodec(c);)c=mxCodecRegistry.getCodec(d.nodeName),d=d.nextSibling;this.isCellCodec(c)||(c=mxCodecRegistry.getCodec(mxCell));c=c.decode(this,a);b&&this.insertIntoGraph(c)}return c};\nmxCodec.prototype.insertIntoGraph=function(a){var b=a.parent,c=a.getTerminal(!0),d=a.getTerminal(!1);a.setTerminal(null,!1);a.setTerminal(null,!0);a.parent=null;if(null!=b){if(b==a)throw Error(b.id+\": Self Reference\");b.insert(a)}null!=c&&c.insertEdge(a,!0);null!=d&&d.insertEdge(a,!1)};mxCodec.prototype.setAttribute=function(a,b,c){null!=b&&null!=c&&a.setAttribute(b,c)};\nfunction mxObjectCodec(a,b,c,d){this.template=a;this.exclude=null!=b?b:[];this.idrefs=null!=c?c:[];this.mapping=null!=d?d:[];this.reverse={};for(var e in this.mapping)this.reverse[this.mapping[e]]=e}mxObjectCodec.allowEval=!1;mxObjectCodec.prototype.template=null;mxObjectCodec.prototype.exclude=null;mxObjectCodec.prototype.idrefs=null;mxObjectCodec.prototype.mapping=null;mxObjectCodec.prototype.reverse=null;mxObjectCodec.prototype.getName=function(){return mxUtils.getFunctionName(this.template.constructor)};\nmxObjectCodec.prototype.cloneTemplate=function(){return new this.template.constructor};mxObjectCodec.prototype.getFieldName=function(a){if(null!=a){var b=this.reverse[a];null!=b&&(a=b)}return a};mxObjectCodec.prototype.getAttributeName=function(a){if(null!=a){var b=this.mapping[a];null!=b&&(a=b)}return a};mxObjectCodec.prototype.isExcluded=function(a,b,c,d){return b==mxObjectIdentity.FIELD_NAME||0<=mxUtils.indexOf(this.exclude,b)};\nmxObjectCodec.prototype.isReference=function(a,b,c,d){return 0<=mxUtils.indexOf(this.idrefs,b)};mxObjectCodec.prototype.encode=function(a,b){var c=a.document.createElement(this.getName());b=this.beforeEncode(a,b,c);this.encodeObject(a,b,c);return this.afterEncode(a,b,c)};mxObjectCodec.prototype.encodeObject=function(a,b,c){a.setAttribute(c,\"id\",a.getId(b));for(var d in b){var e=d,f=b[e];null==f||this.isExcluded(b,e,f,!0)||(mxUtils.isInteger(e)&&(e=null),this.encodeValue(a,b,e,f,c))}};\nmxObjectCodec.prototype.encodeValue=function(a,b,c,d,e){if(null!=d){if(this.isReference(b,c,d,!0)){var f=a.getId(d);if(null==f){mxLog.warn(\"mxObjectCodec.encode: No ID for \"+this.getName()+\".\"+c+\"=\"+d);return}d=f}f=this.template[c];if(null==c||a.encodeDefaults||f!=d)c=this.getAttributeName(c),this.writeAttribute(a,b,c,d,e)}};mxObjectCodec.prototype.writeAttribute=function(a,b,c,d,e){\"object\"!=typeof d?this.writePrimitiveAttribute(a,b,c,d,e):this.writeComplexAttribute(a,b,c,d,e)};\nmxObjectCodec.prototype.writePrimitiveAttribute=function(a,b,c,d,e){d=this.convertAttributeToXml(a,b,c,d,e);null==c?(b=a.document.createElement(\"add\"),\"function\"==typeof d?b.appendChild(a.document.createTextNode(d)):a.setAttribute(b,\"value\",d),e.appendChild(b)):\"function\"!=typeof d&&a.setAttribute(e,c,d)};\nmxObjectCodec.prototype.writeComplexAttribute=function(a,b,c,d,e){a=a.encode(d);null!=a?(null!=c&&a.setAttribute(\"as\",c),e.appendChild(a)):mxLog.warn(\"mxObjectCodec.encode: No node for \"+this.getName()+\".\"+c+\": \"+d)};mxObjectCodec.prototype.convertAttributeToXml=function(a,b,c,d){this.isBooleanAttribute(a,b,c,d)&&(d=1==d?\"1\":\"0\");return d};mxObjectCodec.prototype.isBooleanAttribute=function(a,b,c,d){return\"undefined\"==typeof d.length&&(1==d||0==d)};\nmxObjectCodec.prototype.convertAttributeFromXml=function(a,b,c){var d=b.value;this.isNumericAttribute(a,b,c)&&(d=parseFloat(d),isNaN(d)||!isFinite(d))&&(d=0);return d};mxObjectCodec.prototype.isNumericAttribute=function(a,b,c){return c.constructor==mxGeometry&&(\"x\"==b.name||\"y\"==b.name||\"width\"==b.name||\"height\"==b.name)||c.constructor==mxPoint&&(\"x\"==b.name||\"y\"==b.name)||mxUtils.isNumeric(b.value)};mxObjectCodec.prototype.beforeEncode=function(a,b,c){return b};\nmxObjectCodec.prototype.afterEncode=function(a,b,c){return c};mxObjectCodec.prototype.decode=function(a,b,c){var d=b.getAttribute(\"id\"),e=a.objects[d];null==e&&(e=c||this.cloneTemplate(),null!=d&&a.putObject(d,e));b=this.beforeDecode(a,b,e);this.decodeNode(a,b,e);return this.afterDecode(a,b,e)};mxObjectCodec.prototype.decodeNode=function(a,b,c){null!=b&&(this.decodeAttributes(a,b,c),this.decodeChildren(a,b,c))};\nmxObjectCodec.prototype.decodeAttributes=function(a,b,c){b=b.attributes;if(null!=b)for(var d=0;d<b.length;d++)this.decodeAttribute(a,b[d],c)};mxObjectCodec.prototype.isIgnoredAttribute=function(a,b,c){return\"as\"==b.nodeName||\"id\"==b.nodeName||\"function\"===typeof c[b.nodeName]};\nmxObjectCodec.prototype.decodeAttribute=function(a,b,c){if(!this.isIgnoredAttribute(a,b,c)){var d=b.nodeName;b=this.convertAttributeFromXml(a,b,c);var e=this.getFieldName(d);if(this.isReference(c,e,b,!1)){a=a.getObject(b);if(null==a){mxLog.warn(\"mxObjectCodec.decode: No object for \"+this.getName()+\".\"+d+\"=\"+b);return}b=a}this.isExcluded(c,d,b,!1)||(c[d]=b)}};\nmxObjectCodec.prototype.decodeChildren=function(a,b,c){for(b=b.firstChild;null!=b;){var d=b.nextSibling;b.nodeType!=mxConstants.NODETYPE_ELEMENT||this.processInclude(a,b,c)||this.decodeChild(a,b,c);b=d}};\nmxObjectCodec.prototype.decodeChild=function(a,b,c){var d=this.getFieldName(b.getAttribute(\"as\"));if(null==d||!this.isExcluded(c,d,b,!1)){var e=this.getFieldTemplate(c,d,b);\"add\"==b.nodeName?(a=b.getAttribute(\"value\"),null==a&&mxObjectCodec.allowEval&&(a=mxUtils.eval(mxUtils.getTextContent(b)))):a=a.decode(b,e);try{this.addObjectValue(c,d,a,e)}catch(f){throw Error(f.message+\" for \"+b.nodeName);}}};\nmxObjectCodec.prototype.getFieldTemplate=function(a,b,c){a=a[b];a instanceof Array&&0<a.length&&(a=null);return a};mxObjectCodec.prototype.addObjectValue=function(a,b,c,d){null!=c&&c!=d&&(null!=b&&0<b.length?a[b]=c:a.push(c))};mxObjectCodec.prototype.processInclude=function(a,b,c){if(\"include\"==b.nodeName){b=b.getAttribute(\"name\");if(null!=b)try{var d=mxUtils.load(b).getDocumentElement();null!=d&&a.decode(d,c)}catch(e){}return!0}return!1};mxObjectCodec.prototype.beforeDecode=function(a,b,c){return b};\nmxObjectCodec.prototype.afterDecode=function(a,b,c){return c};\nmxCodecRegistry.register(function(){var a=new mxObjectCodec(new mxCell,[\"children\",\"edges\",\"overlays\",\"mxTransient\"],[\"parent\",\"source\",\"target\"]);a.isCellCodec=function(){return!0};a.isNumericAttribute=function(b,c,d){return\"value\"!==c.nodeName&&mxObjectCodec.prototype.isNumericAttribute.apply(this,arguments)};a.isExcluded=function(b,c,d,e){return mxObjectCodec.prototype.isExcluded.apply(this,arguments)||e&&\"value\"==c&&mxUtils.isNode(d)};a.afterEncode=function(b,c,d){if(null!=c.value&&mxUtils.isNode(c.value)){var e=\nd;d=mxUtils.importNode(b.document,c.value,!0);d.appendChild(e);b=e.getAttribute(\"id\");d.setAttribute(\"id\",b);e.removeAttribute(\"id\")}return d};a.beforeDecode=function(b,c,d){var e=c.cloneNode(!0),f=this.getName();c.nodeName!=f?(e=c.getElementsByTagName(f)[0],null!=e&&e.parentNode==c?(mxUtils.removeWhitespace(e,!0),mxUtils.removeWhitespace(e,!1),e.parentNode.removeChild(e)):e=null,d.value=c.cloneNode(!0),c=d.value.getAttribute(\"id\"),null!=c&&(d.setId(c),d.value.removeAttribute(\"id\"))):d.setId(c.getAttribute(\"id\"));\nif(null!=e)for(c=0;c<this.idrefs.length;c++){f=this.idrefs[c];var g=e.getAttribute(f);if(null!=g){e.removeAttribute(f);var k=b.objects[g]||b.lookup(g);null==k&&(g=b.getElementById(g),null!=g&&(k=(mxCodecRegistry.codecs[g.nodeName]||this).decode(b,g)));d[f]=k}}return e};return a}());\nmxCodecRegistry.register(function(){var a=new mxObjectCodec(new mxGraphModel);a.encodeObject=function(b,c,d){var e=b.document.createElement(\"root\");b.encodeCell(c.getRoot(),e);d.appendChild(e)};a.decodeChild=function(b,c,d){\"root\"==c.nodeName?this.decodeRoot(b,c,d):mxObjectCodec.prototype.decodeChild.apply(this,arguments)};a.decodeRoot=function(b,c,d){var e=null;for(c=c.firstChild;null!=c;){var f=b.decodeCell(c);null!=f&&null==f.getParent()&&(e=f);c=c.nextSibling}null!=e&&d.setRoot(e)};return a}());\nmxCodecRegistry.register(function(){var a=new mxObjectCodec(new mxRootChange,[\"model\",\"previous\",\"root\"]);a.afterEncode=function(b,c,d){b.encodeCell(c.root,d);return d};a.beforeDecode=function(b,c,d){if(null!=c.firstChild&&c.firstChild.nodeType==mxConstants.NODETYPE_ELEMENT){c=c.cloneNode(!0);var e=c.firstChild;d.root=b.decodeCell(e,!1);d=e.nextSibling;e.parentNode.removeChild(e);for(e=d;null!=e;)d=e.nextSibling,b.decodeCell(e),e.parentNode.removeChild(e),e=d}return c};a.afterDecode=function(b,c,\nd){d.previous=d.root;return d};return a}());\nmxCodecRegistry.register(function(){var a=new mxObjectCodec(new mxChildChange,[\"model\",\"child\",\"previousIndex\"],[\"parent\",\"previous\"]);a.isReference=function(b,c,d,e){return\"child\"!=c||e&&!b.model.contains(b.previous)?0<=mxUtils.indexOf(this.idrefs,c):!0};a.isExcluded=function(b,c,d,e){return mxObjectCodec.prototype.isExcluded.apply(this,arguments)||e&&null!=d&&(\"previous\"==c||\"parent\"==c)&&!b.model.contains(d)};a.afterEncode=function(b,c,d){this.isReference(c,\"child\",c.child,!0)?d.setAttribute(\"child\",\nb.getId(c.child)):b.encodeCell(c.child,d);return d};a.beforeDecode=function(b,c,d){if(null!=c.firstChild&&c.firstChild.nodeType==mxConstants.NODETYPE_ELEMENT){c=c.cloneNode(!0);var e=c.firstChild;d.child=b.decodeCell(e,!1);d=e.nextSibling;e.parentNode.removeChild(e);for(e=d;null!=e;){d=e.nextSibling;if(e.nodeType==mxConstants.NODETYPE_ELEMENT){var f=e.getAttribute(\"id\");null==b.lookup(f)&&b.decodeCell(e)}e.parentNode.removeChild(e);e=d}}else e=c.getAttribute(\"child\"),d.child=b.getObject(e);return c};\na.afterDecode=function(b,c,d){null!=d.child&&(null!=d.child.parent&&null!=d.previous&&d.child.parent!=d.previous&&(d.previous=d.child.parent),d.child.parent=d.previous,d.previous=d.parent,d.previousIndex=d.index);return d};return a}());mxCodecRegistry.register(function(){var a=new mxObjectCodec(new mxTerminalChange,[\"model\",\"previous\"],[\"cell\",\"terminal\"]);a.afterDecode=function(b,c,d){d.previous=d.terminal;return d};return a}());\nvar mxGenericChangeCodec=function(a,b){a=new mxObjectCodec(a,[\"model\",\"previous\"],[\"cell\"]);a.afterDecode=function(c,d,e){mxUtils.isNode(e.cell)&&(e.cell=c.decodeCell(e.cell,!1));e.previous=e[b];return e};return a};mxCodecRegistry.register(mxGenericChangeCodec(new mxValueChange,\"value\"));mxCodecRegistry.register(mxGenericChangeCodec(new mxStyleChange,\"style\"));mxCodecRegistry.register(mxGenericChangeCodec(new mxGeometryChange,\"geometry\"));\nmxCodecRegistry.register(mxGenericChangeCodec(new mxCollapseChange,\"collapsed\"));mxCodecRegistry.register(mxGenericChangeCodec(new mxVisibleChange,\"visible\"));mxCodecRegistry.register(mxGenericChangeCodec(new mxCellAttributeChange,\"value\"));mxCodecRegistry.register(function(){return new mxObjectCodec(new mxGraph,\"graphListeners eventListeners view container cellRenderer editor selection\".split(\" \"))}());\nmxCodecRegistry.register(function(){var a=new mxObjectCodec(new mxGraphView);a.encode=function(b,c){return this.encodeCell(b,c,c.graph.getModel().getRoot())};a.encodeCell=function(b,c,d){var e=c.graph.getModel(),f=c.getState(d),g=e.getParent(d);if(null==g||null!=f){var k=e.getChildCount(d),l=c.graph.getCellGeometry(d),m=null;g==e.getRoot()?m=\"layer\":null==g?m=\"graph\":e.isEdge(d)?m=\"edge\":0<k&&null!=l?m=\"group\":e.isVertex(d)&&(m=\"vertex\");if(null!=m){var n=b.document.createElement(m);null!=c.graph.getLabel(d)&&\n(n.setAttribute(\"label\",c.graph.getLabel(d)),c.graph.isHtmlLabel(d)&&n.setAttribute(\"html\",!0));if(null==g){var p=c.getGraphBounds();null!=p&&(n.setAttribute(\"x\",Math.round(p.x)),n.setAttribute(\"y\",Math.round(p.y)),n.setAttribute(\"width\",Math.round(p.width)),n.setAttribute(\"height\",Math.round(p.height)));n.setAttribute(\"scale\",c.scale)}else if(null!=f&&null!=l){for(p in f.style)g=f.style[p],\"function\"==typeof g&&\"object\"==typeof g&&(g=mxStyleRegistry.getName(g)),null!=g&&\"function\"!=typeof g&&\"object\"!=\ntypeof g&&n.setAttribute(p,g);g=f.absolutePoints;if(null!=g&&0<g.length){l=Math.round(g[0].x)+\",\"+Math.round(g[0].y);for(p=1;p<g.length;p++)l+=\" \"+Math.round(g[p].x)+\",\"+Math.round(g[p].y);n.setAttribute(\"points\",l)}else n.setAttribute(\"x\",Math.round(f.x)),n.setAttribute(\"y\",Math.round(f.y)),n.setAttribute(\"width\",Math.round(f.width)),n.setAttribute(\"height\",Math.round(f.height));p=f.absoluteOffset;null!=p&&(0!=p.x&&n.setAttribute(\"dx\",Math.round(p.x)),0!=p.y&&n.setAttribute(\"dy\",Math.round(p.y)))}for(p=\n0;p<k;p++)f=this.encodeCell(b,c,e.getChildAt(d,p)),null!=f&&n.appendChild(f)}}return n};return a}());\nvar mxStylesheetCodec=mxCodecRegistry.register(function(){var a=new mxObjectCodec(new mxStylesheet);a.encode=function(b,c){var d=b.document.createElement(this.getName()),e;for(e in c.styles){var f=c.styles[e],g=b.document.createElement(\"add\");if(null!=e){g.setAttribute(\"as\",e);for(var k in f){var l=this.getStringValue(k,f[k]);if(null!=l){var m=b.document.createElement(\"add\");m.setAttribute(\"value\",l);m.setAttribute(\"as\",k);g.appendChild(m)}}0<g.childNodes.length&&d.appendChild(g)}}return d};a.getStringValue=\nfunction(b,c){b=typeof c;\"function\"==b?c=mxStyleRegistry.getName(c):\"object\"==b&&(c=null);return c};a.decode=function(b,c,d){d=d||new this.template.constructor;var e=c.getAttribute(\"id\");null!=e&&(b.objects[e]=d);for(c=c.firstChild;null!=c;){if(!this.processInclude(b,c,d)&&\"add\"==c.nodeName&&(e=c.getAttribute(\"as\"),null!=e)){var f=c.getAttribute(\"extend\"),g=null!=f?mxUtils.clone(d.styles[f]):null;null==g&&(null!=f&&mxLog.warn(\"mxStylesheetCodec.decode: stylesheet \"+f+\" not found to extend\"),g={});\nfor(f=c.firstChild;null!=f;){if(f.nodeType==mxConstants.NODETYPE_ELEMENT){var k=f.getAttribute(\"as\");if(\"add\"==f.nodeName){var l=mxUtils.getTextContent(f);null!=l&&0<l.length&&mxStylesheetCodec.allowEval?l=mxUtils.eval(l):(l=f.getAttribute(\"value\"),mxUtils.isNumeric(l)&&(l=parseFloat(l)));null!=l&&(g[k]=l)}else\"remove\"==f.nodeName&&delete g[k]}f=f.nextSibling}d.putCellStyle(e,g)}c=c.nextSibling}return d};return a}());mxStylesheetCodec.allowEval=!1;"
  },
  {
    "path": "static/cherry/pinyin/README.md",
    "content": "https://github.com/liu11hao11/pinyin_js\n\n# pinyin_js\n中文转拼音\n##安装\n```\nnpm install\n```\n\n\n##汉字转化成带音节的拼音\n```javascript\nvar pinyin=require(\"pinyin_js\");\nconsole.log(pinyin.pinyin(\"你好\",\" \"));\n//输出结果是nǐ hǎo \n```\n\n##汉字转化成不带音节的拼音\n```javascript\nvar pinyin=require(\"pinyin_js\");\nconsole.log(pinyin.pinyinWithOutYin(\"你好\",\" \"));\n//输出结果是ni hao \n```\n\n##判断是否是汉字\n```javascript\nvar pinyin=require(\"pinyin_js\");\nconsole.log(pinyin.isChineseWord(\"你好\"));//true\nconsole.log(pinyin.isChineseWord(\"!你好\",false));//true\nconsole.log(pinyin.isChineseWord(\"!你好\",true));//第二个参数：true是严格模式，默认为严格模式\n//false\n```\n\n##首字母排序\n\n```javascript\nvar pinyin=require(\"pinyin_js\");\nvar users = [\n    { 'user': '张三丰',   'age': 40 },\n    { 'user': '123',   'age': 48 },\n    { 'user': '张三',   'age': 48 },\n    { 'user': '李四', 'age': 36 },  \n    { 'user': '张三炮', 'age': 34 }\n];\nvar sortResult = pinyin.sort(users, \"user\");\nconsole.log(sortResult)\n/*[ { user: '123', age: 48 },\n    { user: '李四', age: 36 },\n    { user: '张三', age: 48 },\n    { user: '张三丰', age: 40 },\n    { user: '张三炮', age: 34 } ]*/\n    \n```"
  },
  {
    "path": "static/cherry/pinyin/hanziPinyin.js",
    "content": "exports.hzpy=\"吖ā,阿ā,啊ā,锕ā,錒ā,嗄á,厑ae,哎āi,哀āi,唉āi,埃āi,挨āi,溾āi,锿āi,鎄āi,啀ái,捱ái,皑ái,凒ái,嵦ái,溰ái,嘊ái,敱ái,敳ái,皚ái,癌ái,娾ái,隑ái,剴ái,騃ái,毐ǎi,昹ǎi,矮ǎi,蔼ǎi,躷ǎi,濭ǎi,藹ǎi,譪ǎi,霭ǎi,靄ǎi,鯦ǎi,噯ài,艾ài,伌ài,爱ài,砹ài,硋ài,隘ài,嗌ài,塧ài,嫒ài,愛ài,碍ài,叆ài,暧ài,瑷ài,僾ài,壒ài,嬡ài,懓ài,薆ài,懝ài,曖ài,賹ài,餲ài,鴱ài,皧ài,瞹ài,馤ài,礙ài,譺ài,鑀ài,鱫ài,靉ài,閡ài,欬ài,焥ài,堨ài,乂ài,嗳ài,璦ài,安ān,侒ān,峖ān,桉ān,氨ān,庵ān,谙ān,媕ān,萻ān,葊ān,痷ān,腤ān,鹌ān,蓭ān,誝ān,鞌ān,鞍ān,盦ān,闇ān,馣ān,鮟ān,盫ān,鵪ān,韽ān,鶕ān,啽ān,厰ān,鴳ān,諳ān,玵án,雸án,儑án,垵ǎn,俺ǎn,唵ǎn,埯ǎn,铵ǎn,隌ǎn,揞ǎn,晻ǎn,罯ǎn,銨ǎn,碪ǎn,犴àn,岸àn,按àn,洝àn,荌àn,案àn,胺àn,豻àn,堓àn,婩àn,貋àn,錌àn,黯àn,頇àn,屽àn,垾àn,遃àn,暗àn,肮āng,骯āng,岇áng,昂áng,昻áng,卬áng,枊àng,盎àng,醠àng,凹āo,垇āo,柪āo,軪āo,爊āo,熝āo,眑āo,泑āo,梎āo,敖áo,厫áo,隞áo,嗷áo,嗸áo,嶅áo,廒áo,滶áo,獒áo,獓áo,遨áo,摮áo,璈áo,蔜áo,磝áo,翱áo,聱áo,螯áo,翶áo,謷áo,翺áo,鳌áo,鏖áo,鰲áo,鷔áo,鼇áo,慠áo,鏕áo,嚻áo,熬áo,抝ǎo,芺ǎo,袄ǎo,媪ǎo,镺ǎo,媼ǎo,襖ǎo,郩ǎo,鴁ǎo,蝹ǎo,坳ào,岙ào,扷ào,岰ào,傲ào,奡ào,奥ào,嫯ào,奧ào,澚ào,墺ào,嶴ào,澳ào,懊ào,擙ào,謸ào,鏊ào,驁ào,骜ào,吧ba,八bā,仈bā,巴bā,叭bā,扒bā,朳bā,玐bā,夿bā,岜bā,芭bā,疤bā,哵bā,捌bā,笆bā,粑bā,紦bā,羓bā,蚆bā,釟bā,鲃bā,魞bā,鈀bā,柭bā,丷bā,峇bā,豝bā,叐bá,犮bá,抜bá,坺bá,妭bá,拔bá,茇bá,炦bá,癹bá,胈bá,釛bá,菝bá,詙bá,跋bá,軷bá,颰bá,魃bá,墢bá,鼥bá,把bǎ,钯bǎ,靶bǎ,坝bà,弝bà,爸bà,罢bà,鲅bà,罷bà,鮁bà,覇bà,矲bà,霸bà,壩bà,灞bà,欛bà,鲌bà,鮊bà,皅bà,挀bāi,掰bāi,白bái,百bǎi,佰bǎi,柏bǎi,栢bǎi,捭bǎi,竡bǎi,粨bǎi,絔bǎi,摆bǎi,擺bǎi,襬bǎi,庍bài,拝bài,败bài,拜bài,敗bài,稗bài,粺bài,鞁bài,薭bài,贁bài,韛bài,扳bān,攽bān,朌bān,班bān,般bān,颁bān,斑bān,搬bān,斒bān,頒bān,瘢bān,螁bān,螌bān,褩bān,癍bān,辬bān,籓bān,肦bān,鳻bān,搫bān,阪bǎn,坂bǎn,岅bǎn,昄bǎn,板bǎn,版bǎn,钣bǎn,粄bǎn,舨bǎn,鈑bǎn,蝂bǎn,魬bǎn,覂bǎn,瓪bǎn,办bàn,半bàn,伴bàn,扮bàn,姅bàn,怑bàn,拌bàn,绊bàn,秚bàn,湴bàn,絆bàn,鉡bàn,靽bàn,辦bàn,瓣bàn,跘bàn,邦bāng,峀bāng,垹bāng,帮bāng,捠bāng,梆bāng,浜bāng,邫bāng,幚bāng,縍bāng,幫bāng,鞤bāng,幇bāng,绑bǎng,綁bǎng,榜bǎng,牓bǎng,膀bǎng,騯bǎng,玤bàng,蚌bàng,傍bàng,棒bàng,棓bàng,硥bàng,谤bàng,塝bàng,徬bàng,稖bàng,蒡bàng,蜯bàng,镑bàng,艕bàng,謗bàng,鎊bàng,埲bàng,蚄bàng,蛖bàng,嫎bàng,勹bāo,包bāo,佨bāo,孢bāo,胞bāo,剝bāo,笣bāo,煲bāo,龅bāo,蕔bāo,褒bāo,闁bāo,襃bāo,齙bāo,剥bāo,枹bāo,裦bāo,苞bāo,窇báo,嫑báo,雹báo,铇báo,薄báo,宝bǎo,怉bǎo,饱bǎo,保bǎo,鸨bǎo,珤bǎo,堡bǎo,堢bǎo,媬bǎo,葆bǎo,寚bǎo,飹bǎo,飽bǎo,褓bǎo,駂bǎo,鳵bǎo,緥bǎo,賲bǎo,藵bǎo,寳bǎo,寶bǎo,靌bǎo,宀bǎo,鴇bǎo,勽bào,报bào,抱bào,豹bào,菢bào,袌bào,報bào,鉋bào,鲍bào,靤bào,骲bào,暴bào,髱bào,虣bào,鮑bào,儤bào,曓bào,爆bào,忁bào,鑤bào,蚫bào,瀑bào,萡be,呗bei,唄bei,陂bēi,卑bēi,盃bēi,桮bēi,悲bēi,揹bēi,碑bēi,鹎bēi,藣bēi,鵯bēi,柸bēi,錍bēi,椑bēi,諀bēi,杯bēi,喺béi,北běi,鉳běi,垻bèi,贝bèi,狈bèi,貝bèi,邶bèi,备bèi,昁bèi,牬bèi,苝bèi,背bèi,钡bèi,俻bèi,倍bèi,悖bèi,狽bèi,被bèi,偝bèi,偹bèi,梖bèi,珼bèi,備bèi,僃bèi,惫bèi,焙bèi,琲bèi,軰bèi,辈bèi,愂bèi,碚bèi,禙bèi,蓓bèi,蛽bèi,犕bèi,褙bèi,誖bèi,骳bèi,輩bèi,鋇bèi,憊bèi,糒bèi,鞴bèi,鐾bèi,鐴bèi,杮bèi,韝bèi,棑bèi,哱bèi,鄁bèi,奔bēn,泍bēn,贲bēn,倴bēn,渀bēn,逩bēn,犇bēn,賁bēn,錛bēn,喯bēn,锛bēn,本běn,苯běn,奙běn,畚běn,楍běn,翉běn,夲běn,坌bèn,捹bèn,桳bèn,笨bèn,撪bèn,獖bèn,輽bèn,炃bèn,燌bèn,夯bèn,伻bēng,祊bēng,奟bēng,崩bēng,绷bēng,絣bēng,閍bēng,嵭bēng,痭bēng,嘣bēng,綳bēng,繃bēng,嗙bēng,挷bēng,傰bēng,搒bēng,甭béng,埄běng,菶běng,琣běng,鞛běng,琫běng,泵bèng,迸bèng,逬bèng,跰bèng,塴bèng,甏bèng,镚bèng,蹦bèng,鏰bèng,錋bèng,皀bī,屄bī,偪bī,毴bī,逼bī,豍bī,螕bī,鲾bī,鎞bī,鵖bī,鰏bī,悂bī,鈚bī,柲bí,荸bí,鼻bí,嬶bí,匕bǐ,比bǐ,夶bǐ,朼bǐ,佊bǐ,妣bǐ,沘bǐ,疕bǐ,彼bǐ,柀bǐ,秕bǐ,俾bǐ,笔bǐ,粃bǐ,粊bǐ,舭bǐ,啚bǐ,筆bǐ,鄙bǐ,聛bǐ,貏bǐ,箄bǐ,崥bǐ,魮bǐ,娝bǐ,箃bǐ,吡bǐ,匂bì,币bì,必bì,毕bì,闭bì,佖bì,坒bì,庇bì,诐bì,邲bì,妼bì,怭bì,枈bì,畀bì,苾bì,哔bì,毖bì,珌bì,疪bì,胇bì,荜bì,陛bì,毙bì,狴bì,畢bì,袐bì,铋bì,婢bì,庳bì,敝bì,梐bì,萆bì,萞bì,閇bì,閉bì,堛bì,弻bì,弼bì,愊bì,愎bì,湢bì,皕bì,禆bì,筚bì,貱bì,赑bì,嗶bì,彃bì,楅bì,滗bì,滭bì,煏bì,痹bì,痺bì,腷bì,蓖bì,蓽bì,蜌bì,裨bì,跸bì,鉍bì,閟bì,飶bì,幣bì,弊bì,熚bì,獙bì,碧bì,稫bì,箅bì,箆bì,綼bì,蔽bì,馝bì,幤bì,潷bì,獘bì,罼bì,襅bì,駜bì,髲bì,壁bì,嬖bì,廦bì,篦bì,篳bì,縪bì,薜bì,觱bì,避bì,鮅bì,斃bì,濞bì,臂bì,蹕bì,鞞bì,髀bì,奰bì,璧bì,鄨bì,饆bì,繴bì,襞bì,鏎bì,鞸bì,韠bì,躃bì,躄bì,魓bì,贔bì,驆bì,鷝bì,鷩bì,鼊bì,咇bì,鮩bì,畐bì,踾bì,鶝bì,闬bì,閈bì,祕bì,鴓bì,怶bì,旇bì,翍bì,肶bì,笓bì,鸊bì,肸bì,畁bì,詖bì,鄪bì,襣bì,边biān,砭biān,笾biān,猵biān,编biān,萹biān,煸biān,牑biān,甂biān,箯biān,編biān,蝙biān,獱biān,邉biān,鍽biān,鳊biān,邊biān,鞭biān,鯿biān,籩biān,糄biān,揙biān,臱biān,鯾biān,炞biǎn,贬biǎn,扁biǎn,窆biǎn,匾biǎn,貶biǎn,惼biǎn,碥biǎn,稨biǎn,褊biǎn,鴘biǎn,藊biǎn,釆biǎn,辧biǎn,疺biǎn,覵biǎn,鶣biǎn,卞biàn,弁biàn,忭biàn,抃biàn,汳biàn,汴biàn,苄biàn,峅biàn,便biàn,变biàn,変biàn,昪biàn,覍biàn,缏biàn,遍biàn,閞biàn,辡biàn,緶biàn,艑biàn,辨biàn,辩biàn,辫biàn,辮biàn,辯biàn,變biàn,彪biāo,标biāo,飑biāo,骉biāo,髟biāo,淲biāo,猋biāo,脿biāo,墂biāo,幖biāo,滮biāo,蔈biāo,骠biāo,標biāo,熛biāo,膘biāo,麃biāo,瘭biāo,镖biāo,飙biāo,飚biāo,儦biāo,颷biāo,瀌biāo,藨biāo,謤biāo,爂biāo,臕biāo,贆biāo,鏢biāo,穮biāo,镳biāo,飆biāo,飇biāo,飈biāo,飊biāo,驃biāo,鑣biāo,驫biāo,摽biāo,膔biāo,篻biāo,僄biāo,徱biāo,表biǎo,婊biǎo,裱biǎo,褾biǎo,錶biǎo,檦biǎo,諘biǎo,俵biào,鳔biào,鰾biào,憋biē,鳖biē,鱉biē,鼈biē,虌biē,龞biē,蟞biē,別bié,别bié,莂bié,蛂bié,徶bié,襒bié,蹩bié,穪bié,瘪biě,癟biě,彆biè,汃bīn,邠bīn,砏bīn,宾bīn,彬bīn,斌bīn,椕bīn,滨bīn,缤bīn,槟bīn,瑸bīn,豩bīn,賓bīn,賔bīn,镔bīn,儐bīn,濒bīn,濱bīn,濵bīn,虨bīn,豳bīn,璸bīn,瀕bīn,霦bīn,繽bīn,蠙bīn,鑌bīn,顮bīn,檳bīn,玢bīn,訜bīn,傧bīn,氞bìn,摈bìn,殡bìn,膑bìn,髩bìn,擯bìn,鬂bìn,臏bìn,髌bìn,鬓bìn,髕bìn,鬢bìn,殯bìn,仌bīng,氷bīng,冰bīng,兵bīng,栟bīng,掤bīng,梹bīng,鋲bīng,幷bīng,丙bǐng,邴bǐng,陃bǐng,怲bǐng,抦bǐng,秉bǐng,苪bǐng,昞bǐng,昺bǐng,柄bǐng,炳bǐng,饼bǐng,眪bǐng,窉bǐng,蛃bǐng,禀bǐng,鈵bǐng,鉼bǐng,鞆bǐng,餅bǐng,餠bǐng,燷bǐng,庰bǐng,偋bǐng,寎bǐng,綆bǐng,稟bǐng,癛bǐng,癝bǐng,琕bǐng,棅bǐng,并bìng,並bìng,併bìng,垪bìng,倂bìng,栤bìng,病bìng,竝bìng,傡bìng,摒bìng,誁bìng,靐bìng,疒bìng,啵bo,蔔bo,卜bo,噃bo,趵bō,癶bō,拨bō,波bō,玻bō,袚bō,袯bō,钵bō,饽bō,紴bō,缽bō,菠bō,碆bō,鉢bō,僠bō,嶓bō,撥bō,播bō,餑bō,磻bō,蹳bō,驋bō,鱍bō,帗bō,盋bō,脖bó,仢bó,伯bó,孛bó,犻bó,驳bó,帛bó,泊bó,狛bó,苩bó,侼bó,勃bó,胉bó,郣bó,亳bó,挬bó,浡bó,瓟bó,秡bó,钹bó,铂bó,桲bó,淿bó,舶bó,博bó,渤bó,湐bó,葧bó,鹁bó,愽bó,搏bó,猼bó,鈸bó,鉑bó,馎bó,僰bó,煿bó,箔bó,膊bó,艊bó,馛bó,駁bó,踣bó,鋍bó,镈bó,壆bó,馞bó,駮bó,豰bó,嚗bó,懪bó,礡bó,簙bó,鎛bó,餺bó,鵓bó,犦bó,髆bó,髉bó,欂bó,襮bó,礴bó,鑮bó,肑bó,茀bó,袹bó,穛bó,彴bó,瓝bó,牔bó,蚾bǒ,箥bǒ,跛bǒ,簸bò,孹bò,擘bò,檗bò,糪bò,譒bò,蘗bò,襎bò,檘bò,蔢bò,峬bū,庯bū,逋bū,钸bū,晡bū,鈽bū,誧bū,餔bū,鵏bū,秿bū,陠bū,鯆bū,轐bú,醭bú,不bú,輹bú,卟bǔ,补bǔ,哺bǔ,捕bǔ,補bǔ,鳪bǔ,獛bǔ,鸔bǔ,擈bǔ,佈bù,吥bù,步bù,咘bù,怖bù,歨bù,歩bù,钚bù,勏bù,埗bù,悑bù,捗bù,荹bù,部bù,埠bù,瓿bù,鈈bù,廍bù,蔀bù,踄bù,郶bù,篰bù,餢bù,簿bù,尃bù,箁bù,抪bù,柨bù,布bù,擦cā,攃cā,礤cǎ,礸cǎ,遪cà,偲cāi,猜cāi,揌cāi,才cái,材cái,财cái,財cái,戝cái,裁cái,采cǎi,倸cǎi,埰cǎi,婇cǎi,寀cǎi,彩cǎi,採cǎi,睬cǎi,跴cǎi,綵cǎi,踩cǎi,菜cài,棌cài,蔡cài,縩cài,乲cal,参cān,參cān,飡cān,骖cān,喰cān,湌cān,傪cān,嬠cān,餐cān,驂cān,嵾cān,飱cān,残cán,蚕cán,惭cán,殘cán,慚cán,蝅cán,慙cán,蠶cán,蠺cán,惨cǎn,慘cǎn,噆cǎn,憯cǎn,黪cǎn,黲cǎn,灿càn,粲càn,儏càn,澯càn,薒càn,燦càn,璨càn,爘càn,謲càn,仓cāng,沧cāng,苍cāng,倉cāng,舱cāng,凔cāng,嵢cāng,滄cāng,獊cāng,蒼cāng,濸cāng,艙cāng,螥cāng,罉cāng,藏cáng,欌cáng,鑶cáng,賶càng,撡cāo,操cāo,糙cāo,曺cáo,嘈cáo,嶆cáo,漕cáo,蓸cáo,槽cáo,褿cáo,艚cáo,螬cáo,鏪cáo,慒cáo,曹cáo,艹cǎo,艸cǎo,草cǎo,愺cǎo,懆cǎo,騲cǎo,慅cǎo,肏cào,鄵cào,襙cào,冊cè,册cè,侧cè,厕cè,恻cè,拺cè,测cè,荝cè,敇cè,側cè,粣cè,萗cè,廁cè,惻cè,測cè,策cè,萴cè,筞cè,蓛cè,墄cè,箣cè,憡cè,刂cè,厠cè,膥cēn,岑cén,梣cén,涔cén,硶cén,噌cēng,层céng,層céng,竲céng,驓céng,曾céng,蹭cèng,硛ceok,硳ceok,岾ceom,猠ceon,乽ceor,嚓chā,叉chā,扠chā,芆chā,杈chā,肞chā,臿chā,訍chā,偛chā,嗏chā,插chā,銟chā,锸chā,艖chā,疀chā,鍤chā,鎈chā,垞chá,查chá,査chá,茬chá,茶chá,嵖chá,猹chá,靫chá,槎chá,察chá,碴chá,褨chá,檫chá,搽chá,衩chǎ,镲chǎ,鑔chǎ,奼chà,汊chà,岔chà,侘chà,诧chà,剎chà,姹chà,差chà,紁chà,詫chà,拆chāi,钗chāi,釵chāi,犲chái,侪chái,柴chái,祡chái,豺chái,儕chái,喍chái,虿chài,袃chài,瘥chài,蠆chài,囆chài,辿chān,觇chān,梴chān,掺chān,搀chān,覘chān,裧chān,摻chān,鋓chān,幨chān,襜chān,攙chān,嚵chān,脠chān,婵chán,谗chán,孱chán,棎chán,湹chán,禅chán,馋chán,嬋chán,煘chán,缠chán,獑chán,蝉chán,誗chán,鋋chán,儃chán,廛chán,潹chán,潺chán,緾chán,磛chán,禪chán,毚chán,鄽chán,瀍chán,蟬chán,儳chán,劖chán,蟾chán,酁chán,壥chán,巉chán,瀺chán,纏chán,纒chán,躔chán,艬chán,讒chán,鑱chán,饞chán,繟chán,澶chán,镵chán,产chǎn,刬chǎn,旵chǎn,丳chǎn,浐chǎn,剗chǎn,谄chǎn,產chǎn,産chǎn,铲chǎn,阐chǎn,蒇chǎn,剷chǎn,嵼chǎn,摌chǎn,滻chǎn,幝chǎn,蕆chǎn,諂chǎn,閳chǎn,燀chǎn,簅chǎn,冁chǎn,醦chǎn,闡chǎn,囅chǎn,灛chǎn,讇chǎn,墠chǎn,骣chǎn,鏟chǎn,忏chàn,硟chàn,摲chàn,懴chàn,颤chàn,懺chàn,羼chàn,韂chàn,顫chàn,伥chāng,昌chāng,倀chāng,娼chāng,淐chāng,猖chāng,菖chāng,阊chāng,晿chāng,椙chāng,琩chāng,裮chāng,锠chāng,錩chāng,閶chāng,鲳chāng,鯧chāng,鼚chāng,兏cháng,肠cháng,苌cháng,尝cháng,偿cháng,常cháng,徜cháng,瓺cháng,萇cháng,甞cháng,腸cháng,嘗cháng,嫦cháng,瑺cháng,膓cháng,鋿cháng,償cháng,嚐cháng,蟐cháng,鲿cháng,鏛cháng,鱨cháng,棖cháng,尙cháng,厂chǎng,场chǎng,昶chǎng,場chǎng,敞chǎng,僘chǎng,廠chǎng,氅chǎng,鋹chǎng,惝chǎng,怅chàng,玚chàng,畅chàng,倡chàng,鬯chàng,唱chàng,悵chàng,暢chàng,畼chàng,誯chàng,韔chàng,抄chāo,弨chāo,怊chāo,欩chāo,钞chāo,焯chāo,超chāo,鈔chāo,繛chāo,樔chāo,绰chāo,綽chāo,綤chāo,牊cháo,巢cháo,巣cháo,朝cháo,鄛cháo,漅cháo,嘲cháo,潮cháo,窲cháo,罺cháo,轈cháo,晁cháo,吵chǎo,炒chǎo,眧chǎo,煼chǎo,麨chǎo,巐chǎo,粆chǎo,仦chào,耖chào,觘chào,趠chào,车chē,車chē,砗chē,唓chē,硨chē,蛼chē,莗chē,扯chě,偖chě,撦chě,彻chè,坼chè,迠chè,烢chè,聅chè,掣chè,硩chè,頙chè,徹chè,撤chè,澈chè,勶chè,瞮chè,爡chè,喢chè,賝chen,伧chen,傖chen,抻chēn,郴chēn,棽chēn,琛chēn,嗔chēn,綝chēn,諃chēn,尘chén,臣chén,忱chén,沉chén,辰chén,陈chén,茞chén,宸chén,烥chén,莐chén,陳chén,敐chén,晨chén,訦chén,谌chén,揨chén,煁chén,蔯chén,塵chén,樄chén,瘎chén,霃chén,螴chén,諶chén,麎chén,曟chén,鷐chén,薼chén,趻chěn,碜chěn,墋chěn,夦chěn,磣chěn,踸chěn,贂chěn,衬chèn,疢chèn,龀chèn,趁chèn,榇chèn,齓chèn,齔chèn,嚫chèn,谶chèn,襯chèn,讖chèn,瀋chèn,称chēng,稱chēng,阷chēng,泟chēng,柽chēng,爯chēng,棦chēng,浾chēng,偁chēng,蛏chēng,铛chēng,牚chēng,琤chēng,赪chēng,憆chēng,摚chēng,靗chēng,撐chēng,撑chēng,緽chēng,橕chēng,瞠chēng,赬chēng,頳chēng,檉chēng,竀chēng,蟶chēng,鏳chēng,鏿chēng,饓chēng,鐺chēng,丞chéng,成chéng,呈chéng,承chéng,枨chéng,诚chéng,郕chéng,乗chéng,城chéng,娍chéng,宬chéng,峸chéng,洆chéng,荿chéng,乘chéng,埕chéng,挰chéng,珹chéng,掁chéng,窚chéng,脭chéng,铖chéng,堘chéng,惩chéng,椉chéng,程chéng,筬chéng,絾chéng,裎chéng,塖chéng,溗chéng,碀chéng,誠chéng,畻chéng,酲chéng,鋮chéng,澄chéng,橙chéng,檙chéng,鯎chéng,瀓chéng,懲chéng,騬chéng,塍chéng,悜chěng,逞chěng,骋chěng,庱chěng,睈chěng,騁chěng,秤chèng,吃chī,妛chī,杘chī,侙chī,哧chī,蚩chī,鸱chī,瓻chī,眵chī,笞chī,訵chī,嗤chī,媸chī,摛chī,痴chī,瞝chī,螭chī,鴟chī,鵄chī,癡chī,魑chī,齝chī,攡chī,麶chī,彲chī,黐chī,蚳chī,摴chī,彨chī,弛chí,池chí,驰chí,迟chí,岻chí,茌chí,持chí,竾chí,淔chí,筂chí,貾chí,遅chí,馳chí,墀chí,踟chí,遲chí,篪chí,謘chí,尺chǐ,叺chǐ,呎chǐ,肔chǐ,卶chǐ,齿chǐ,垑chǐ,胣chǐ,恥chǐ,耻chǐ,蚇chǐ,豉chǐ,欼chǐ,歯chǐ,裭chǐ,鉹chǐ,褫chǐ,齒chǐ,侈chǐ,彳chì,叱chì,斥chì,灻chì,赤chì,饬chì,抶chì,勅chì,恜chì,炽chì,翄chì,翅chì,烾chì,痓chì,啻chì,湁chì,飭chì,傺chì,痸chì,腟chì,鉓chì,雴chì,憏chì,翤chì,遫chì,慗chì,瘛chì,翨chì,熾chì,懘chì,趩chì,饎chì,鶒chì,鷘chì,餝chì,歗chì,敕chì,充chōng,冲chōng,忡chōng,茺chōng,珫chōng,翀chōng,舂chōng,嘃chōng,摏chōng,憃chōng,憧chōng,衝chōng,罿chōng,艟chōng,蹖chōng,褈chōng,傭chōng,浺chōng,虫chóng,崇chóng,崈chóng,隀chóng,蟲chóng,宠chǒng,埫chǒng,寵chǒng,沖chòng,铳chòng,銃chòng,抽chōu,紬chōu,瘳chōu,篘chōu,犨chōu,犫chōu,跾chōu,掫chōu,仇chóu,俦chóu,栦chóu,惆chóu,绸chóu,菗chóu,畴chóu,絒chóu,愁chóu,皗chóu,稠chóu,筹chóu,酧chóu,酬chóu,綢chóu,踌chóu,儔chóu,雔chóu,嬦chóu,懤chóu,雠chóu,疇chóu,籌chóu,躊chóu,讎chóu,讐chóu,擣chóu,燽chóu,丑chǒu,丒chǒu,吜chǒu,杽chǒu,侴chǒu,瞅chǒu,醜chǒu,矁chǒu,魗chǒu,臭chòu,遚chòu,殠chòu,榋chu,橻chu,屮chū,出chū,岀chū,初chū,樗chū,貙chū,齣chū,刍chú,除chú,厨chú,滁chú,蒢chú,豠chú,锄chú,耡chú,蒭chú,蜍chú,趎chú,鉏chú,雏chú,犓chú,廚chú,篨chú,鋤chú,橱chú,懨chú,幮chú,櫉chú,蟵chú,躇chú,雛chú,櫥chú,蹰chú,鶵chú,躕chú,媰chú,杵chǔ,础chǔ,储chǔ,楮chǔ,禇chǔ,楚chǔ,褚chǔ,濋chǔ,儲chǔ,檚chǔ,璴chǔ,礎chǔ,齭chǔ,齼chǔ,処chǔ,椘chǔ,亍chù,处chù,竌chù,怵chù,拀chù,绌chù,豖chù,竐chù,俶chù,敊chù,珿chù,絀chù,處chù,傗chù,琡chù,搐chù,触chù,踀chù,閦chù,儊chù,憷chù,斶chù,歜chù,臅chù,黜chù,觸chù,矗chù,觕chù,畜chù,鄐chù,搋chuāi,揣chuāi,膗chuái,嘬chuài,踹chuài,膪chuài,巛chuān,川chuān,氚chuān,穿chuān,剶chuān,瑏chuān,传chuán,舡chuán,船chuán,猭chuán,遄chuán,傳chuán,椽chuán,歂chuán,暷chuán,輲chuán,甎chuán,舛chuǎn,荈chuǎn,喘chuǎn,僢chuǎn,堾chuǎn,踳chuǎn,汌chuàn,串chuàn,玔chuàn,钏chuàn,釧chuàn,賗chuàn,刅chuāng,炊chuī,龡chuī,圌chuí,垂chuí,桘chuí,陲chuí,捶chuí,菙chuí,棰chuí,槌chuí,锤chuí,箠chuí,顀chuí,錘chuí,鰆chun,旾chūn,杶chūn,春chūn,萅chūn,媋chūn,暙chūn,椿chūn,槆chūn,瑃chūn,箺chūn,蝽chūn,橁chūn,輴chūn,櫄chūn,鶞chūn,纯chún,陙chún,唇chún,浱chún,純chún,莼chún,淳chún,脣chún,犉chún,滣chún,鹑chún,漘chún,醇chún,醕chún,鯙chún,鶉chún,蒓chún,偆chǔn,萶chǔn,惷chǔn,睶chǔn,賰chǔn,蠢chǔn,踔chuō,戳chuō,啜chuò,辵chuò,娕chuò,娖chuò,惙chuò,涰chuò,逴chuò,辍chuò,酫chuò,龊chuò,擉chuò,磭chuò,歠chuò,嚽chuò,齪chuò,鑡chuò,齱chuò,婼chuò,鋜chuò,輟chuò,呲cī,玼cī,疵cī,趀cī,偨cī,縒cī,跐cī,髊cī,齹cī,枱cī,词cí,珁cí,垐cí,柌cí,祠cí,茨cí,瓷cí,詞cí,辝cí,慈cí,甆cí,辞cí,鈶cí,雌cí,鹚cí,糍cí,辤cí,飺cí,餈cí,嬨cí,濨cí,鴜cí,礠cí,辭cí,鶿cí,鷀cí,磁cí,此cǐ,佌cǐ,皉cǐ,朿cì,次cì,佽cì,刺cì,刾cì,庛cì,茦cì,栨cì,莿cì,絘cì,赐cì,螆cì,賜cì,蛓cì,嗭cis,囱cōng,匆cōng,囪cōng,苁cōng,忩cōng,枞cōng,茐cōng,怱cōng,悤cōng,棇cōng,焧cōng,葱cōng,楤cōng,漗cōng,聡cōng,蔥cōng,骢cōng,暰cōng,樅cōng,樬cōng,瑽cōng,璁cōng,聪cōng,瞛cōng,篵cōng,聰cōng,蟌cōng,繱cōng,鏦cōng,騘cōng,驄cōng,聦cōng,从cóng,從cóng,丛cóng,従cóng,婃cóng,孮cóng,徖cóng,悰cóng,淙cóng,琮cóng,漎cóng,誴cóng,賨cóng,賩cóng,樷cóng,藂cóng,叢cóng,灇cóng,欉cóng,爜cóng,憁còng,謥còng,凑còu,湊còu,楱còu,腠còu,辏còu,輳còu,粗cū,麁cū,麄cū,麤cū,徂cú,殂cú,蔖cǔ,促cù,猝cù,媨cù,瘄cù,蔟cù,誎cù,趗cù,憱cù,醋cù,瘯cù,簇cù,縬cù,鼀cù,蹴cù,蹵cù,顣cù,蹙cù,汆cuān,撺cuān,镩cuān,蹿cuān,攛cuān,躥cuān,鑹cuān,攅cuán,櫕cuán,巑cuán,攢cuán,窜cuàn,熶cuàn,篡cuàn,殩cuàn,篹cuàn,簒cuàn,竄cuàn,爨cuàn,乼cui,崔cuī,催cuī,凗cuī,墔cuī,摧cuī,榱cuī,獕cuī,磪cuī,鏙cuī,漼cuī,慛cuī,璀cuǐ,皠cuǐ,熣cuǐ,繀cuǐ,忰cuì,疩cuì,翆cuì,脃cuì,脆cuì,啐cuì,啛cuì,悴cuì,淬cuì,萃cuì,毳cuì,焠cuì,瘁cuì,粹cuì,膵cuì,膬cuì,竁cuì,臎cuì,琗cuì,粋cuì,脺cuì,翠cuì,邨cūn,村cūn,皴cūn,澊cūn,竴cūn,存cún,刌cǔn,忖cǔn,寸cùn,籿cùn,襊cuō,搓cuō,瑳cuō,遳cuō,磋cuō,撮cuō,蹉cuō,醝cuō,虘cuó,嵯cuó,痤cuó,矬cuó,蒫cuó,鹾cuó,鹺cuó,嵳cuó,脞cuǒ,剉cuò,剒cuò,厝cuò,夎cuò,挫cuò,莝cuò,莡cuò,措cuò,逪cuò,棤cuò,锉cuò,蓌cuò,错cuò,銼cuò,錯cuò,疸da,咑dā,哒dā,耷dā,畣dā,搭dā,嗒dā,噠dā,撘dā,鎝dā,笚dā,矺dā,褡dā,墶dá,达dá,迏dá,迖dá,妲dá,怛dá,垯dá,炟dá,羍dá,荅dá,荙dá,剳dá,匒dá,笪dá,逹dá,溚dá,答dá,詚dá,達dá,跶dá,瘩dá,靼dá,薘dá,鞑dá,燵dá,蟽dá,鎉dá,躂dá,鐽dá,韃dá,龖dá,龘dá,搨dá,繨dá,打dǎ,觰dǎ,大dà,亣dà,眔dà,橽dà,汏dà,呆dāi,獃dāi,懛dāi,歹dǎi,傣dǎi,逮dǎi,代dài,轪dài,侢dài,垈dài,岱dài,帒dài,甙dài,绐dài,迨dài,带dài,待dài,柋dài,殆dài,玳dài,贷dài,帯dài,軑dài,埭dài,帶dài,紿dài,蚮dài,袋dài,軚dài,貸dài,軩dài,瑇dài,廗dài,叇dài,曃dài,緿dài,鮘dài,鴏dài,戴dài,艜dài,黛dài,簤dài,蹛dài,瀻dài,霴dài,襶dài,靆dài,螮dài,蝳dài,跢dài,箉dài,骀dài,怠dài,黱dài,愖dān,丹dān,妉dān,单dān,担dān,単dān,眈dān,砃dān,耼dān,耽dān,郸dān,聃dān,躭dān,酖dān,單dān,媅dān,殚dān,瘅dān,匰dān,箪dān,褝dān,鄲dān,頕dān,儋dān,勯dān,擔dān,殫dān,癉dān,襌dān,簞dān,瓭dān,卩dān,亻dān,娊dān,噡dān,聸dān,伔dǎn,刐dǎn,狚dǎn,玬dǎn,胆dǎn,衴dǎn,紞dǎn,掸dǎn,亶dǎn,馾dǎn,撣dǎn,澸dǎn,黕dǎn,膽dǎn,丼dǎn,抌dǎn,赕dǎn,賧dǎn,黵dǎn,黮dǎn,繵dàn,譂dàn,旦dàn,但dàn,帎dàn,沊dàn,泹dàn,诞dàn,柦dàn,疍dàn,啖dàn,啗dàn,弹dàn,惮dàn,淡dàn,蛋dàn,啿dàn,氮dàn,腅dàn,蜑dàn,觛dàn,窞dàn,誕dàn,僤dàn,噉dàn,髧dàn,嘾dàn,彈dàn,憚dàn,憺dàn,澹dàn,禫dàn,餤dàn,駳dàn,鴠dàn,甔dàn,癚dàn,嚪dàn,贉dàn,霮dàn,饏dàn,蟺dàn,倓dàn,惔dàn,弾dàn,醈dàn,撢dàn,萏dàn,当dāng,珰dāng,裆dāng,筜dāng,儅dāng,噹dāng,澢dāng,璫dāng,襠dāng,簹dāng,艡dāng,蟷dāng,當dāng,挡dǎng,党dǎng,谠dǎng,擋dǎng,譡dǎng,黨dǎng,灙dǎng,欓dǎng,讜dǎng,氹dàng,凼dàng,圵dàng,宕dàng,砀dàng,垱dàng,荡dàng,档dàng,菪dàng,瓽dàng,逿dàng,潒dàng,碭dàng,瞊dàng,蕩dàng,趤dàng,壋dàng,檔dàng,璗dàng,盪dàng,礑dàng,簜dàng,蘯dàng,闣dàng,愓dàng,嵣dàng,偒dàng,雼dàng,裯dāo,刀dāo,叨dāo,屶dāo,忉dāo,氘dāo,舠dāo,釖dāo,鱽dāo,魛dāo,虭dāo,捯dáo,导dǎo,岛dǎo,陦dǎo,倒dǎo,宲dǎo,捣dǎo,祷dǎo,禂dǎo,搗dǎo,隝dǎo,嶋dǎo,嶌dǎo,槝dǎo,導dǎo,隯dǎo,壔dǎo,嶹dǎo,蹈dǎo,禱dǎo,菿dǎo,島dǎo,帱dào,幬dào,到dào,悼dào,盗dào,椡dào,盜dào,道dào,稲dào,翢dào,噵dào,稻dào,衜dào,檤dào,衟dào,翿dào,軇dào,瓙dào,纛dào,箌dào,的de,嘚dē,恴dé,得dé,淂dé,悳dé,惪dé,锝dé,徳dé,德dé,鍀dé,棏dé,揼dem,扥den,扽den,灯dēng,登dēng,豋dēng,噔dēng,嬁dēng,燈dēng,璒dēng,竳dēng,簦dēng,艠dēng,覴dēng,蹬dēng,墱dēng,戥děng,等děng,澂dèng,邓dèng,僜dèng,凳dèng,鄧dèng,隥dèng,嶝dèng,瞪dèng,磴dèng,镫dèng,櫈dèng,鐙dèng,仾dī,低dī,奃dī,彽dī,袛dī,啲dī,埞dī,羝dī,隄dī,堤dī,趆dī,嘀dī,滴dī,磾dī,鍉dī,鞮dī,氐dī,牴dī,碮dī,踧dí,镝dí,廸dí,狄dí,籴dí,苖dí,迪dí,唙dí,敌dí,涤dí,荻dí,梑dí,笛dí,觌dí,靮dí,滌dí,髢dí,嫡dí,蔋dí,蔐dí,頔dí,魡dí,敵dí,篴dí,嚁dí,藡dí,豴dí,糴dí,覿dí,鸐dí,藋dí,鬄dí,樀dí,蹢dí,鏑dí,泜dǐ,诋dǐ,邸dǐ,阺dǐ,呧dǐ,坻dǐ,底dǐ,弤dǐ,抵dǐ,拞dǐ,柢dǐ,砥dǐ,掋dǐ,菧dǐ,詆dǐ,軧dǐ,聜dǐ,骶dǐ,鯳dǐ,坘dǐ,厎dǐ,赿dì,地dì,弚dì,坔dì,弟dì,旳dì,杕dì,玓dì,怟dì,枤dì,苐dì,帝dì,埊dì,娣dì,递dì,逓dì,偙dì,啇dì,梊dì,焍dì,眱dì,祶dì,第dì,菂dì,谛dì,釱dì,媂dì,棣dì,睇dì,缔dì,蒂dì,僀dì,禘dì,腣dì,遞dì,鉪dì,馰dì,墑dì,墬dì,摕dì,碲dì,蝃dì,遰dì,慸dì,甋dì,締dì,嶳dì,諦dì,踶dì,弔dì,嵽dì,諟dì,珶dì,渧dì,蹏dì,揥dì,墆dì,疐dì,俤dì,蔕dì,嗲diǎ,敁diān,掂diān,傎diān,厧diān,嵮diān,滇diān,槙diān,瘨diān,颠diān,蹎diān,巅diān,顚diān,顛diān,癫diān,巓diān,巔diān,攧diān,癲diān,齻diān,槇diān,典diǎn,点diǎn,婰diǎn,敟diǎn,椣diǎn,碘diǎn,蒧diǎn,蕇diǎn,踮diǎn,點diǎn,痶diǎn,丶diǎn,奌diǎn,电diàn,佃diàn,甸diàn,坫diàn,店diàn,垫diàn,扂diàn,玷diàn,钿diàn,唸diàn,婝diàn,惦diàn,淀diàn,奠diàn,琔diàn,殿diàn,蜔diàn,鈿diàn,電diàn,墊diàn,橂diàn,澱diàn,靛diàn,磹diàn,癜diàn,簟diàn,驔diàn,腍diàn,橝diàn,壂diàn,刁diāo,叼diāo,汈diāo,刟diāo,凋diāo,奝diāo,弴diāo,彫diāo,蛁diāo,琱diāo,貂diāo,碉diāo,鳭diāo,殦diāo,雕diāo,鮉diāo,鲷diāo,簓diāo,鼦diāo,鯛diāo,鵰diāo,颩diāo,矵diāo,錭diāo,淍diāo,屌diǎo,鸼diǎo,鵃diǎo,扚diǎo,伄diào,吊diào,钓diào,窎diào,訋diào,调diào,掉diào,釣diào,铞diào,鈟diào,竨diào,銱diào,雿diào,調diào,瘹diào,窵diào,鋽diào,鑃diào,誂diào,嬥diào,絩diào,爹diē,跌diē,褺diē,跮dié,苵dié,迭dié,垤dié,峌dié,恎dié,绖dié,胅dié,瓞dié,眣dié,耊dié,啑dié,戜dié,谍dié,喋dié,堞dié,幉dié,惵dié,揲dié,畳dié,絰dié,耋dié,臷dié,詄dié,趃dié,叠dié,殜dié,牃dié,牒dié,镻dié,碟dié,蜨dié,褋dié,艓dié,蝶dié,諜dié,蹀dié,鲽dié,曡dié,鰈dié,疉dié,疊dié,氎dié,渉dié,崼dié,鮙dié,跕dié,鐡dié,怢dié,槢dié,挃dié,柣dié,螲dié,疂dié,眰diè,嚸dim,丁dīng,仃dīng,叮dīng,帄dīng,玎dīng,甼dīng,疔dīng,盯dīng,耵dīng,靪dīng,奵dīng,町dīng,虰dīng,酊dǐng,顶dǐng,頂dǐng,鼎dǐng,鼑dǐng,薡dǐng,鐤dǐng,顁dǐng,艼dǐng,濎dǐng,嵿dǐng,钉dìng,釘dìng,订dìng,忊dìng,饤dìng,矴dìng,定dìng,訂dìng,飣dìng,啶dìng,萣dìng,椗dìng,腚dìng,碇dìng,锭dìng,碠dìng,聢dìng,錠dìng,磸dìng,铤dìng,鋌dìng,掟dìng,丟diū,丢diū,铥diū,銩diū,东dōng,冬dōng,咚dōng,東dōng,苳dōng,昸dōng,氡dōng,倲dōng,鸫dōng,埬dōng,娻dōng,崬dōng,涷dōng,笗dōng,菄dōng,氭dōng,蝀dōng,鮗dōng,鼕dōng,鯟dōng,鶇dōng,鶫dōng,徚dōng,夂dōng,岽dōng,揰dǒng,董dǒng,墥dǒng,嬞dǒng,懂dǒng,箽dǒng,蕫dǒng,諌dǒng,湩dǒng,动dòng,冻dòng,侗dòng,垌dòng,峒dòng,峝dòng,恫dòng,挏dòng,栋dòng,洞dòng,胨dòng,迵dòng,凍dòng,戙dòng,胴dòng,動dòng,崠dòng,硐dòng,棟dòng,腖dòng,働dòng,詷dòng,駧dòng,霘dòng,狫dòng,烔dòng,絧dòng,衕dòng,勭dòng,騆dòng,姛dòng,瞗dōu,吺dōu,剅dōu,唗dōu,都dōu,兜dōu,兠dōu,蔸dōu,橷dōu,篼dōu,侸dōu,艔dóu,乧dǒu,阧dǒu,抖dǒu,枓dǒu,陡dǒu,蚪dǒu,鈄dǒu,斗dòu,豆dòu,郖dòu,浢dòu,荳dòu,逗dòu,饾dòu,鬥dòu,梪dòu,毭dòu,脰dòu,酘dòu,痘dòu,閗dòu,窦dòu,鬦dòu,鋀dòu,餖dòu,斣dòu,闘dòu,竇dòu,鬪dòu,鬭dòu,凟dòu,鬬dòu,剢dū,阇dū,嘟dū,督dū,醏dū,闍dū,厾dū,毒dú,涜dú,读dú,渎dú,椟dú,牍dú,犊dú,裻dú,読dú,獨dú,錖dú,匵dú,嬻dú,瀆dú,櫝dú,殰dú,牘dú,犢dú,瓄dú,皾dú,騳dú,讀dú,豄dú,贕dú,韣dú,髑dú,鑟dú,韇dú,韥dú,黷dú,讟dú,独dú,樚dú,襡dú,襩dú,黩dú,笃dǔ,堵dǔ,帾dǔ,琽dǔ,赌dǔ,睹dǔ,覩dǔ,賭dǔ,篤dǔ,暏dǔ,笁dǔ,陼dǔ,芏dù,妒dù,杜dù,肚dù,妬dù,度dù,荰dù,秺dù,渡dù,镀dù,螙dù,殬dù,鍍dù,蠧dù,蠹dù,剫dù,晵dù,靯dù,篅duān,偳duān,媏duān,端duān,褍duān,鍴duān,剬duān,短duǎn,段duàn,断duàn,塅duàn,缎duàn,葮duàn,椴duàn,煅duàn,瑖duàn,腶duàn,碫duàn,锻duàn,緞duàn,毈duàn,簖duàn,鍛duàn,斷duàn,躖duàn,煆duàn,籪duàn,叾dug,搥duī,鎚duī,垖duī,堆duī,塠duī,嵟duī,痽duī,磓duī,頧duī,鴭duī,鐜duī,埻duī,謉duǐ,錞duì,队duì,对duì,兊duì,兌duì,兑duì,対duì,祋duì,怼duì,陮duì,隊duì,碓duì,綐duì,對duì,憝duì,濧duì,薱duì,镦duì,懟duì,瀩duì,譈duì,譵duì,憞duì,鋭duì,杸duì,吨dūn,惇dūn,敦dūn,蜳dūn,墩dūn,墪dūn,壿dūn,撴dūn,獤dūn,噸dūn,撉dūn,橔dūn,犜dūn,礅dūn,蹲dūn,蹾dūn,驐dūn,鐓dūn,盹dǔn,趸dǔn,躉dǔn,伅dùn,囤dùn,庉dùn,沌dùn,炖dùn,盾dùn,砘dùn,逇dùn,钝dùn,遁dùn,鈍dùn,腞dùn,頓dùn,碷dùn,遯dùn,潡dùn,燉dùn,踲dùn,楯dùn,腯dùn,顿dùn,多duō,夛duō,咄duō,哆duō,茤duō,剟duō,崜duō,敠duō,毲duō,裰duō,嚉duō,掇duō,仛duó,夺duó,铎duó,敓duó,敚duó,喥duó,敪duó,鈬duó,奪duó,凙duó,踱duó,鮵duó,鐸duó,跿duó,沰duó,痥duó,奲duǒ,朵duǒ,朶duǒ,哚duǒ,垛duǒ,挅duǒ,挆duǒ,埵duǒ,缍duǒ,椯duǒ,趓duǒ,躱duǒ,躲duǒ,綞duǒ,亸duǒ,鬌duǒ,嚲duǒ,垜duǒ,橢duǒ,硾duǒ,吋duò,刴duò,剁duò,沲duò,陊duò,陏duò,饳duò,柮duò,桗duò,堕duò,舵duò,惰duò,跥duò,跺duò,飿duò,墮duò,嶞duò,憜duò,墯duò,鵽duò,隓duò,貀duò,詑duò,駄duò,媠duò,嫷duò,尮duò,呃e,妸ē,妿ē,娿ē,婀ē,匼ē,讹é,吪é,囮é,迗é,俄é,娥é,峨é,峩é,涐é,莪é,珴é,訛é,睋é,鈋é,锇é,鹅é,蛾é,磀é,誐é,鋨é,頟é,额é,魤é,額é,鵝é,鵞é,譌é,騀é,佮é,鰪é,皒é,欸ě,枙ě,砈ě,鵈ě,玀ě,閜ě,砵è,惡è,厄è,歺è,屵è,戹è,岋è,阨è,扼è,阸è,呝è,砐è,轭è,咢è,咹è,垩è,姶è,峉è,匎è,恶è,砨è,蚅è,饿è,偔è,卾è,堊è,悪è,硆è,谔è,軛è,鄂è,阏è,堮è,崿è,愕è,湂è,萼è,豟è,軶è,遏è,廅è,搤è,搹è,琧è,腭è,詻è,僫è,蝁è,锷è,鹗è,蕚è,遻è,頞è,颚è,餓è,噩è,擜è,覨è,諤è,餩è,鍔è,鳄è,歞è,顎è,櫮è,鰐è,鶚è,讍è,齶è,鱷è,齃è,啈è,搕è,礘è,魥è,蘁è,齾è,苊è,遌è,鑩è,诶ēi,誒ēi,奀ēn,恩ēn,蒽ēn,煾ēn,唔én,峎ěn,摁èn,嗯èn,鞥eng,仒eo,乻eol,旕eos,儿ér,而ér,児ér,侕ér,兒ér,陑ér,峏ér,洏ér,耏ér,荋ér,栭ér,胹ér,唲ér,袻ér,鸸ér,粫ér,聏ér,輀ér,隭ér,髵ér,鮞ér,鴯ér,轜ér,咡ér,杒ér,陾ér,輭ér,鲕ér,尒ěr,尓ěr,尔ěr,耳ěr,迩ěr,洱ěr,饵ěr,栮ěr,毦ěr,珥ěr,铒ěr,爾ěr,鉺ěr,餌ěr,駬ěr,薾ěr,邇ěr,趰ěr,嬭ěr,二èr,弍èr,弐èr,佴èr,刵èr,贰èr,衈èr,貳èr,誀èr,樲èr,髶èr,貮èr,发fā,沷fā,発fā,發fā,彂fā,髪fā,橃fā,醗fā,乏fá,伐fá,姂fá,垡fá,罚fá,阀fá,栰fá,傠fá,筏fá,瞂fá,罰fá,閥fá,罸fá,藅fá,汎fá,佱fǎ,法fǎ,鍅fǎ,灋fǎ,砝fǎ,珐fà,琺fà,髮fà,蕟fà,帆fān,忛fān,犿fān,番fān,勫fān,墦fān,嬏fān,幡fān,憣fān,旙fān,旛fān,翻fān,藩fān,轓fān,颿fān,飜fān,鱕fān,蕃fān,凡fán,凢fán,凣fán,匥fán,杋fán,柉fán,籵fán,钒fán,舤fán,烦fán,舧fán,笲fán,釩fán,棥fán,煩fán,緐fán,樊fán,橎fán,燔fán,璠fán,薠fán,繁fán,繙fán,羳fán,蹯fán,瀿fán,礬fán,蘩fán,鐇fán,蠜fán,鷭fán,氾fán,瀪fán,渢fán,伋fán,舩fán,矾fán,反fǎn,仮fǎn,辺fǎn,返fǎn,攵fǎn,犭fǎn,払fǎn,犯fàn,奿fàn,泛fàn,饭fàn,范fàn,贩fàn,畈fàn,訉fàn,軓fàn,梵fàn,盕fàn,笵fàn,販fàn,軬fàn,飯fàn,飰fàn,滼fàn,嬎fàn,範fàn,嬔fàn,婏fàn,方fāng,邡fāng,坊fāng,芳fāng,牥fāng,钫fāng,淓fāng,堏fāng,鈁fāng,錺fāng,鴋fāng,埅fāng,枋fāng,防fáng,妨fáng,房fáng,肪fáng,鲂fáng,魴fáng,仿fǎng,访fǎng,纺fǎng,昉fǎng,昘fǎng,瓬fǎng,眆fǎng,倣fǎng,旊fǎng,紡fǎng,舫fǎng,訪fǎng,髣fǎng,鶭fǎng,放fàng,飞fēi,妃fēi,非fēi,飛fēi,啡fēi,婓fēi,婔fēi,渄fēi,绯fēi,菲fēi,扉fēi,猆fēi,靟fēi,裶fēi,緋fēi,蜚fēi,霏fēi,鲱fēi,餥fēi,馡fēi,騑fēi,騛fēi,鯡fēi,飝fēi,奜fēi,肥féi,淝féi,暃féi,腓féi,蜰féi,棐féi,萉féi,蟦féi,朏fěi,胐fěi,匪fěi,诽fěi,悱fěi,斐fěi,榧fěi,翡fěi,蕜fěi,誹fěi,篚fěi,襏fèi,吠fèi,废fèi,沸fèi,狒fèi,肺fèi,昲fèi,费fèi,俷fèi,剕fèi,厞fèi,疿fèi,屝fèi,廃fèi,費fèi,痱fèi,廢fèi,曊fèi,癈fèi,鼣fèi,濷fèi,櫠fèi,鐨fèi,靅fèi,蕡fèi,芾fèi,笰fèi,紼fèi,髴fèi,柹fèi,胏fèi,镄fèi,吩fēn,帉fēn,纷fēn,芬fēn,昐fēn,氛fēn,竕fēn,紛fēn,翂fēn,棻fēn,躮fēn,酚fēn,鈖fēn,雰fēn,朆fēn,餴fēn,饙fēn,錀fēn,坟fén,妢fén,岎fén,汾fén,枌fén,梤fén,羒fén,蚠fén,蚡fén,棼fén,焚fén,蒶fén,馚fén,隫fén,墳fén,幩fén,魵fén,橨fén,燓fén,豮fén,鼢fén,羵fén,鼖fén,豶fén,轒fén,馩fén,黂fén,鐼fén,粉fěn,瞓fěn,黺fěn,分fèn,份fèn,坋fèn,弅fèn,奋fèn,忿fèn,秎fèn,偾fèn,愤fèn,粪fèn,僨fèn,憤fèn,奮fèn,膹fèn,糞fèn,鲼fèn,瀵fèn,鱝fèn,丰fēng,风fēng,仹fēng,凨fēng,凬fēng,妦fēng,沣fēng,沨fēng,枫fēng,封fēng,疯fēng,盽fēng,砜fēng,風fēng,峯fēng,峰fēng,偑fēng,桻fēng,烽fēng,琒fēng,崶fēng,溄fēng,猦fēng,葑fēng,锋fēng,楓fēng,犎fēng,蜂fēng,瘋fēng,碸fēng,僼fēng,篈fēng,鄷fēng,鋒fēng,檒fēng,豐fēng,鎽fēng,酆fēng,寷fēng,灃fēng,蘴fēng,靊fēng,飌fēng,麷fēng,豊fēng,凮fēng,鏠fēng,冯féng,捀féng,浲féng,逢féng,堸féng,馮féng,綘féng,缝féng,艂féng,縫féng,讽fěng,唪fěng,諷fěng,凤fèng,奉fèng,甮fèng,俸fèng,湗fèng,焨fèng,煈fèng,鳯fèng,鳳fèng,鴌fèng,賵fèng,蘕fèng,赗fèng,覅fiao,仏fó,佛fó,坲fó,梻fó,垺fóu,紑fóu,缶fǒu,否fǒu,缹fǒu,缻fǒu,雬fǒu,鴀fǒu,芣fǒu,夫fū,邞fū,呋fū,姇fū,枎fū,玞fū,肤fū,怤fū,砆fū,胕fū,荂fū,衭fū,娐fū,荴fū,旉fū,紨fū,趺fū,酜fū,麸fū,稃fū,跗fū,鈇fū,筟fū,綒fū,鄜fū,孵fū,豧fū,敷fū,膚fū,鳺fū,麩fū,糐fū,麬fū,麱fū,懯fū,烰fū,琈fū,粰fū,璷fū,伕fú,乀fú,伏fú,凫fú,甶fú,冹fú,刜fú,孚fú,扶fú,芙fú,咈fú,岪fú,彿fú,怫fú,拂fú,服fú,泭fú,绂fú,绋fú,苻fú,俘fú,垘fú,柫fú,氟fú,洑fú,炥fú,玸fú,祓fú,罘fú,茯fú,郛fú,韨fú,鳬fú,哹fú,栿fú,浮fú,畗fú,砩fú,蚨fú,匐fú,桴fú,涪fú,符fú,紱fú,翇fú,艴fú,菔fú,虙fú,袱fú,幅fú,棴fú,罦fú,葍fú,福fú,綍fú,艀fú,蜉fú,辐fú,鉘fú,鉜fú,颫fú,鳧fú,榑fú,稪fú,箙fú,複fú,韍fú,幞fú,澓fú,蝠fú,鴔fú,諨fú,輻fú,鮄fú,癁fú,鮲fú,黻fú,鵩fú,坿fú,汱fú,酻fú,弗fú,畉fú,絥fú,抚fǔ,甫fǔ,府fǔ,弣fǔ,拊fǔ,斧fǔ,俌fǔ,郙fǔ,俯fǔ,釜fǔ,釡fǔ,捬fǔ,辅fǔ,椨fǔ,焤fǔ,盙fǔ,腑fǔ,滏fǔ,腐fǔ,輔fǔ,撫fǔ,鬴fǔ,簠fǔ,黼fǔ,蚥fǔ,窗chuāng,窻chuāng,傸chuǎng,创chuàng,創chuàng,庄zhuāng,妝zhuāng,荘zhuāng,娤zhuāng,桩zhuāng,讣fù,付fù,妇fù,负fù,附fù,咐fù,竎fù,阜fù,驸fù,复fù,峊fù,祔fù,訃fù,負fù,赴fù,袝fù,偩fù,冨fù,副fù,婦fù,蚹fù,傅fù,媍fù,富fù,復fù,蛗fù,覄fù,詂fù,赋fù,椱fù,缚fù,腹fù,鲋fù,禣fù,褔fù,赙fù,緮fù,蕧fù,蝜fù,蝮fù,賦fù,駙fù,縛fù,鮒fù,賻fù,鍑fù,鍢fù,鳆fù,覆fù,馥fù,鰒fù,軵fù,邚fù,柎fù,父fù,萯fù,旮gā,伽gā,嘎gā,夾gā,呷gā,钆gá,尜gá,釓gá,噶gá,錷gá,嘠gá,尕gǎ,玍gǎ,尬gà,魀gà,侅gāi,该gāi,郂gāi,陔gāi,垓gāi,姟gāi,峐gāi,荄gāi,晐gāi,赅gāi,畡gāi,祴gāi,絯gāi,該gāi,豥gāi,賅gāi,賌gāi,忋gǎi,改gǎi,鎅gǎi,絠gǎi,丐gài,乢gài,匃gài,匄gài,钙gài,盖gài,摡gài,溉gài,葢gài,鈣gài,戤gài,概gài,蓋gài,槩gài,槪gài,漑gài,瓂gài,甘gān,忓gān,芉gān,迀gān,攼gān,玕gān,肝gān,坩gān,泔gān,柑gān,竿gān,疳gān,酐gān,粓gān,亁gān,凲gān,尲gān,尴gān,筸gān,漧gān,鳱gān,尶gān,尷gān,魐gān,矸gān,虷gān,釬gān,乹gān,諴gān,飦gān,苷gān,杆gǎn,仠gǎn,皯gǎn,秆gǎn,衦gǎn,赶gǎn,敢gǎn,桿gǎn,笴gǎn,稈gǎn,感gǎn,澉gǎn,趕gǎn,橄gǎn,擀gǎn,簳gǎn,鱤gǎn,篢gǎn,豃gǎn,扞gǎn,鰔gǎn,扜gǎn,鳡gǎn,干gàn,旰gàn,汵gàn,盰gàn,绀gàn,倝gàn,凎gàn,淦gàn,紺gàn,詌gàn,骭gàn,幹gàn,檊gàn,赣gàn,贛gàn,灨gàn,贑gàn,佄gàn,錎gàn,棡gang,冈gāng,罓gāng,冮gāng,刚gāng,阬gāng,纲gāng,肛gāng,岡gāng,牨gāng,疘gāng,矼gāng,钢gāng,剛gāng,罡gāng,堈gāng,釭gāng,犅gāng,堽gāng,綱gāng,罁gāng,鋼gāng,鎠gāng,頏gāng,缸gāng,岗gǎng,崗gǎng,港gǎng,犺gǎng,掆gàng,杠gàng,焵gàng,筻gàng,槓gàng,戆gàng,戇gàng,戅gàng,皋gāo,羔gāo,高gāo,皐gāo,髙gāo,臯gāo,滜gāo,睾gāo,膏gāo,槹gāo,橰gāo,篙gāo,糕gāo,餻gāo,櫜gāo,韟gāo,鷎gāo,鼛gāo,鷱gāo,獋gāo,槔gāo,夰gǎo,杲gǎo,菒gǎo,稁gǎo,搞gǎo,缟gǎo,槀gǎo,槁gǎo,獔gǎo,稾gǎo,稿gǎo,镐gǎo,縞gǎo,藁gǎo,檺gǎo,藳gǎo,鎬gǎo,筶gǎo,澔gǎo,吿gào,勂gào,诰gào,郜gào,峼gào,祮gào,祰gào,锆gào,暠gào,禞gào,誥gào,鋯gào,告gào,戈gē,圪gē,犵gē,纥gē,戓gē,肐gē,牫gē,疙gē,牱gē,紇gē,哥gē,胳gē,袼gē,鸽gē,割gē,搁gē,彁gē,歌gē,戨gē,鴐gē,鴚gē,擱gē,謌gē,鴿gē,鎶gē,咯gē,滒gē,杚gé,呄gé,匌gé,挌gé,阁gé,革gé,敋gé,格gé,鬲gé,愅gé,臵gé,裓gé,隔gé,嗝gé,塥gé,滆gé,觡gé,搿gé,膈gé,閣gé,镉gé,鞈gé,韐gé,骼gé,諽gé,鮯gé,櫊gé,鎘gé,韚gé,轕gé,鞷gé,騔gé,秴gé,詥gé,佫gé,嘅gé,猲gé,槅gé,閤gě,葛gě,哿gě,舸gě,鲄gě,个gè,各gè,虼gè,個gè,硌gè,铬gè,箇gè,鉻gè,獦gè,吤gè,给gěi,給gěi,根gēn,跟gēn,哏gén,亘gèn,艮gèn,茛gèn,揯gèn,搄gèn,亙gèn,刯gēng,庚gēng,畊gēng,浭gēng,耕gēng,掶gēng,菮gēng,椩gēng,焿gēng,絚gēng,赓gēng,鹒gēng,緪gēng,縆gēng,賡gēng,羹gēng,鶊gēng,絙gēng,郠gěng,哽gěng,埂gěng,峺gěng,挭gěng,耿gěng,莄gěng,梗gěng,鲠gěng,骾gěng,鯁gěng,郉gěng,绠gěng,更gèng,堩gèng,暅gèng,啹geu,喼gib,嗰go,工gōng,弓gōng,公gōng,厷gōng,功gōng,攻gōng,杛gōng,糼gōng,肱gōng,宫gōng,宮gōng,恭gōng,蚣gōng,躬gōng,龚gōng,匑gōng,塨gōng,愩gōng,觥gōng,躳gōng,匔gōng,碽gōng,髸gōng,觵gōng,龔gōng,魟gōng,幊gōng,巩gǒng,汞gǒng,拱gǒng,唝gǒng,拲gǒng,栱gǒng,珙gǒng,輁gǒng,鞏gǒng,嗊gǒng,銾gǒng,供gòng,共gòng,贡gòng,羾gòng,貢gòng,慐gòng,熕gòng,渱gòng,勾gōu,沟gōu,钩gōu,袧gōu,缑gōu,鈎gōu,溝gōu,鉤gōu,緱gōu,褠gōu,篝gōu,簼gōu,鞲gōu,冓gōu,搆gōu,抅gōu,泃gōu,軥gōu,鴝gōu,鸜gōu,佝gōu,岣gǒu,狗gǒu,苟gǒu,枸gǒu,玽gǒu,耇gǒu,耉gǒu,笱gǒu,耈gǒu,蚼gǒu,豿gǒu,坸gòu,构gòu,诟gòu,购gòu,垢gòu,姤gòu,够gòu,夠gòu,訽gòu,媾gòu,彀gòu,詬gòu,遘gòu,雊gòu,構gòu,煹gòu,觏gòu,撀gòu,覯gòu,購gòu,傋gòu,茩gòu,估gū,咕gū,姑gū,孤gū,沽gū,泒gū,柧gū,轱gū,唂gū,唃gū,罛gū,鸪gū,笟gū,菇gū,蛄gū,蓇gū,觚gū,軱gū,軲gū,辜gū,酤gū,毂gū,箍gū,箛gū,嫴gū,篐gū,橭gū,鮕gū,鴣gū,轂gū,苽gū,菰gū,鶻gú,鹘gǔ,古gǔ,扢gǔ,汩gǔ,诂gǔ,谷gǔ,股gǔ,峠gǔ,牯gǔ,骨gǔ,罟gǔ,逧gǔ,钴gǔ,傦gǔ,啒gǔ,淈gǔ,脵gǔ,蛊gǔ,蛌gǔ,尳gǔ,愲gǔ,焸gǔ,硲gǔ,詁gǔ,馉gǔ,榾gǔ,鈷gǔ,鼓gǔ,鼔gǔ,嘏gǔ,榖gǔ,皷gǔ,縎gǔ,糓gǔ,薣gǔ,濲gǔ,臌gǔ,餶gǔ,瀔gǔ,瞽gǔ,抇gǔ,嗀gǔ,羖gǔ,固gù,怘gù,故gù,凅gù,顾gù,堌gù,崓gù,崮gù,梏gù,牿gù,棝gù,祻gù,雇gù,痼gù,稒gù,锢gù,頋gù,僱gù,錮gù,鲴gù,鯝gù,顧gù,盬gù,瓜guā,刮guā,胍guā,鸹guā,焻guā,煱guā,颪guā,趏guā,劀guā,緺guā,銽guā,鴰guā,騧guā,呱guā,諣guā,栝guā,歄guā,冎guǎ,叧guǎ,剐guǎ,剮guǎ,啩guǎ,寡guǎ,卦guà,坬guà,诖guà,挂guà,掛guà,罣guà,絓guà,罫guà,褂guà,詿guà,乖guāi,拐guǎi,枴guǎi,柺guǎi,夬guài,叏guài,怪guài,恠guài,关guān,观guān,官guān,覌guān,倌guān,萖guān,棺guān,蒄guān,窤guān,瘝guān,癏guān,観guān,鳏guān,關guān,鰥guān,觀guān,鱞guān,馆guǎn,痯guǎn,筦guǎn,管guǎn,舘guǎn,錧guǎn,館guǎn,躀guǎn,鳤guǎn,輨guǎn,冠guàn,卝guàn,毌guàn,丱guàn,贯guàn,泴guàn,悺guàn,惯guàn,掼guàn,涫guàn,貫guàn,悹guàn,祼guàn,慣guàn,摜guàn,潅guàn,遦guàn,樌guàn,盥guàn,罆guàn,雚guàn,鏆guàn,灌guàn,爟guàn,瓘guàn,矔guàn,鹳guàn,罐guàn,鑵guàn,鸛guàn,鱹guàn,懽guàn,礶guàn,光guāng,灮guāng,侊guāng,炗guāng,炚guāng,炛guāng,咣guāng,垙guāng,姯guāng,洸guāng,茪guāng,桄guāng,烡guāng,珖guāng,胱guāng,硄guāng,僙guāng,輄guāng,銧guāng,黆guāng,欟guāng,趪guāng,挄guāng,广guǎng,広guǎng,犷guǎng,廣guǎng,臩guǎng,獷guǎng,俇guàng,逛guàng,臦guàng,撗guàng,櫎guàng,归guī,圭guī,妫guī,龟guī,规guī,邽guī,皈guī,茥guī,闺guī,帰guī,珪guī,胿guī,亀guī,硅guī,袿guī,規guī,椝guī,瑰guī,郌guī,嫢guī,摫guī,閨guī,鲑guī,嶲guī,槻guī,槼guī,璝guī,瞡guī,膭guī,鮭guī,龜guī,巂guī,歸guī,鬶guī,瓌guī,鬹guī,櫷guī,佹guī,櫰guī,螝guī,槣guī,鴂guī,鴃guī,傀guī,潙guī,雟guī,嬀guī,宄guǐ,氿guǐ,轨guǐ,庋guǐ,匦guǐ,诡guǐ,陒guǐ,垝guǐ,癸guǐ,軌guǐ,鬼guǐ,庪guǐ,匭guǐ,晷guǐ,湀guǐ,蛫guǐ,觤guǐ,詭guǐ,厬guǐ,簋guǐ,蟡guǐ,攱guǐ,朹guǐ,祪guǐ,猤guì,媯guì,刽guì,刿guì,攰guì,昋guì,柜guì,炅guì,贵guì,桂guì,椢guì,筀guì,貴guì,蓕guì,跪guì,瞆guì,劊guì,劌guì,撌guì,槶guì,瞶guì,櫃guì,襘guì,鳜guì,鞼guì,鱖guì,鱥guì,桧guì,絵guì,檜guì,赽guì,趹guì,嶡guì,禬guì,衮gǔn,惃gǔn,绲gǔn,袞gǔn,辊gǔn,滚gǔn,蓘gǔn,滾gǔn,緄gǔn,蔉gǔn,磙gǔn,輥gǔn,鲧gǔn,鮌gǔn,鯀gǔn,琯gùn,棍gùn,棞gùn,睔gùn,睴gùn,璭gùn,謴gùn,呙guō,埚guō,郭guō,啯guō,崞guō,楇guō,聒guō,鈛guō,锅guō,墎guō,瘑guō,嘓guō,彉guō,蝈guō,鍋guō,彍guō,鐹guō,矌guō,簂guó,囯guó,囶guó,囻guó,国guó,圀guó,國guó,帼guó,掴guó,腘guó,幗guó,摑guó,漍guó,聝guó,蔮guó,膕guó,虢guó,馘guó,慖guó,果guǒ,惈guǒ,淉guǒ,猓guǒ,菓guǒ,馃guǒ,椁guǒ,褁guǒ,槨guǒ,粿guǒ,綶guǒ,蜾guǒ,裹guǒ,輠guǒ,餜guǒ,錁guǒ,过guò,過guò,妎hā,铪hā,鉿hā,哈hā,蛤há,孩hái,骸hái,還hái,还hái,海hǎi,胲hǎi,烸hǎi,塰hǎi,酼hǎi,醢hǎi,亥hài,骇hài,害hài,氦hài,嗐hài,餀hài,駭hài,駴hài,嚡hài,饚hài,乤hal,兯han,爳han,顸hān,哻hān,蚶hān,酣hān,谽hān,馠hān,魽hān,鼾hān,欦hān,憨hān,榦hán,邗hán,含hán,邯hán,函hán,咁hán,肣hán,凾hán,唅hán,圅hán,娢hán,浛hán,崡hán,晗hán,梒hán,涵hán,焓hán,寒hán,嵅hán,韩hán,甝hán,筨hán,蜬hán,澏hán,鋡hán,韓hán,馯hán,椷hán,罕hǎn,浫hǎn,喊hǎn,蔊hǎn,鬫hǎn,糮hǎn,厈hǎn,汉hàn,汗hàn,旱hàn,悍hàn,捍hàn,晘hàn,涆hàn,猂hàn,莟hàn,晥hàn,焊hàn,琀hàn,菡hàn,皔hàn,睅hàn,傼hàn,蛿hàn,撖hàn,漢hàn,蜭hàn,暵hàn,熯hàn,銲hàn,鋎hàn,憾hàn,撼hàn,翰hàn,螒hàn,頷hàn,顄hàn,駻hàn,譀hàn,雗hàn,瀚hàn,鶾hàn,澣hàn,颔hàn,魧hāng,苀háng,迒háng,斻háng,杭háng,垳háng,绗háng,笐háng,蚢háng,颃háng,貥háng,筕háng,絎háng,行háng,航háng,沆hàng,茠hāo,蒿hāo,嚆hāo,薅hāo,竓háo,蚝háo,毫háo,椃háo,嗥háo,獆háo,噑háo,豪háo,嘷háo,儫háo,曍háo,嚎háo,壕háo,濠háo,籇háo,蠔háo,譹háo,虠háo,諕háo,呺háo,郝hǎo,好hǎo,号hào,昊hào,昦hào,哠hào,恏hào,悎hào,浩hào,耗hào,晧hào,淏hào,傐hào,皓hào,滈hào,聕hào,號hào,暤hào,暭hào,皜hào,皞hào,皡hào,薃hào,皥hào,颢hào,灏hào,顥hào,鰝hào,灝hào,鄗hào,藃hào,诃hē,呵hē,抲hē,欱hē,喝hē,訶hē,嗬hē,蠚hē,禾hé,合hé,何hé,劾hé,咊hé,和hé,姀hé,河hé,峆hé,曷hé,柇hé,盇hé,籺hé,阂hé,饸hé,哬hé,敆hé,核hé,盉hé,盍hé,啝hé,涸hé,渮hé,盒hé,菏hé,萂hé,龁hé,惒hé,粭hé,訸hé,颌hé,楁hé,鉌hé,阖hé,熆hé,鹖hé,麧hé,澕hé,頜hé,篕hé,翮hé,螛hé,礉hé,闔hé,鞨hé,齕hé,覈hé,鶡hé,皬hé,鑉hé,龢hé,餄hé,荷hé,魺hé,垎hè,贺hè,隺hè,寉hè,焃hè,湼hè,賀hè,嗃hè,煂hè,碋hè,熇hè,褐hè,赫hè,鹤hè,翯hè,壑hè,癋hè,燺hè,爀hè,靍hè,靎hè,鸖hè,靏hè,鶮hè,謞hè,鶴hè,嗨hēi,黒hēi,黑hēi,嘿hēi,潶hēi,嬒hèi,噷hēn,拫hén,痕hén,鞎hén,佷hěn,很hěn,狠hěn,詪hěn,恨hèn,亨hēng,哼hēng,悙hēng,涥hēng,脝hēng,姮héng,恆héng,恒héng,桁héng,烆héng,珩héng,胻héng,横héng,橫héng,衡héng,鴴héng,鵆héng,蘅héng,鑅héng,鸻héng,堼hèng,叿hōng,灴hōng,轰hōng,訇hōng,烘hōng,軣hōng,揈hōng,渹hōng,焢hōng,硡hōng,薨hōng,輷hōng,嚝hōng,鍧hōng,轟hōng,仜hóng,妅hóng,红hóng,吰hóng,宏hóng,汯hóng,玒hóng,纮hóng,闳hóng,宖hóng,泓hóng,玜hóng,苰hóng,垬hóng,娂hóng,洪hóng,竑hóng,紅hóng,荭hóng,虹hóng,浤hóng,紘hóng,翃hóng,耾hóng,硔hóng,紭hóng,谹hóng,鸿hóng,竤hóng,粠hóng,葓hóng,鈜hóng,閎hóng,綋hóng,翝hóng,谼hóng,潂hóng,鉷hóng,鞃hóng,篊hóng,鋐hóng,彋hóng,蕻hóng,霐hóng,黉hóng,霟hóng,鴻hóng,黌hóng,舼hóng,瓨hóng,弘hóng,葒hóng,哄hǒng,晎hǒng,讧hòng,訌hòng,閧hòng,撔hòng,澋hòng,澒hòng,闀hòng,闂hòng,腄hóu,侯hóu,矦hóu,喉hóu,帿hóu,猴hóu,葔hóu,瘊hóu,睺hóu,銗hóu,篌hóu,糇hóu,翭hóu,骺hóu,鍭hóu,餱hóu,鯸hóu,翵hóu,吼hǒu,犼hǒu,呴hǒu,后hòu,郈hòu,厚hòu,垕hòu,後hòu,洉hòu,逅hòu,候hòu,鄇hòu,堠hòu,鲎hòu,鲘hòu,鮜hòu,鱟hòu,豞hòu,鋘hu,乎hū,匢hū,呼hū,垀hū,忽hū,昒hū,曶hū,泘hū,苸hū,烀hū,轷hū,匫hū,唿hū,惚hū,淴hū,虖hū,軤hū,雽hū,嘑hū,寣hū,滹hū,雐hū,歑hū,謼hū,芔hū,戯hū,戱hū,鹄hú,鵠hú,囫hú,弧hú,狐hú,瓳hú,胡hú,壶hú,壷hú,斛hú,焀hú,喖hú,壺hú,媩hú,湖hú,猢hú,絗hú,葫hú,楜hú,煳hú,瑚hú,嘝hú,蔛hú,鹕hú,槲hú,箶hú,糊hú,蝴hú,衚hú,縠hú,螜hú,醐hú,頶hú,觳hú,鍸hú,餬hú,瀫hú,鬍hú,鰗hú,鶘hú,鶦hú,沍hú,礐hú,瓡hú,俿hǔ,虍hǔ,乕hǔ,汻hǔ,虎hǔ,浒hǔ,唬hǔ,萀hǔ,琥hǔ,虝hǔ,滸hǔ,箎hǔ,錿hǔ,鯱hǔ,互hù,弖hù,戶hù,户hù,戸hù,冴hù,芐hù,帍hù,护hù,沪hù,岵hù,怙hù,戽hù,昈hù,枑hù,祜hù,笏hù,粐hù,婟hù,扈hù,瓠hù,綔hù,鄠hù,嫭hù,嫮hù,摢hù,滬hù,蔰hù,槴hù,熩hù,鳸hù,簄hù,鍙hù,護hù,鳠hù,韄hù,頀hù,鱯hù,鸌hù,濩hù,穫hù,觷hù,魱hù,冱hù,鹱hù,花huā,芲huā,埖huā,婲huā,椛huā,硴huā,糀huā,誮huā,錵huā,蘤huā,蕐huā,砉huā,华huá,哗huá,姡huá,骅huá,華huá,铧huá,滑huá,猾huá,嘩huá,撶huá,璍huá,螖huá,鏵huá,驊huá,鷨huá,划huá,化huà,杹huà,画huà,话huà,崋huà,桦huà,婳huà,畫huà,嬅huà,畵huà,觟huà,話huà,劃huà,摦huà,槬huà,樺huà,嫿huà,澅huà,諙huà,黊huà,繣huà,舙huà,蘳huà,譮huà,檴huà,怀huái,淮huái,槐huái,褢huái,踝huái,懐huái,褱huái,懷huái,耲huái,蘹huái,佪huái,徊huái,坏huài,咶huài,壊huài,壞huài,蘾huài,欢huān,歓huān,鴅huān,懁huān,鵍huān,酄huān,嚾huān,獾huān,歡huān,貛huān,讙huān,驩huān,貆huān,环huán,峘huán,洹huán,狟huán,荁huán,桓huán,萈huán,萑huán,堚huán,寏huán,雈huán,綄huán,羦huán,锾huán,阛huán,寰huán,澴huán,缳huán,環huán,豲huán,鍰huán,镮huán,鹮huán,糫huán,繯huán,轘huán,鐶huán,鬟huán,瞏huán,鉮huán,圜huán,闤huán,睆huǎn,缓huǎn,緩huǎn,攌huǎn,幻huàn,奂huàn,肒huàn,奐huàn,宦huàn,唤huàn,换huàn,浣huàn,涣huàn,烉huàn,患huàn,梙huàn,焕huàn,逭huàn,喚huàn,嵈huàn,愌huàn,換huàn,渙huàn,痪huàn,煥huàn,豢huàn,漶huàn,瘓huàn,槵huàn,鲩huàn,擐huàn,瞣huàn,藧huàn,鯇huàn,鯶huàn,鰀huàn,圂huàn,蠸huàn,瑍huàn,巟huāng,肓huāng,荒huāng,衁huāng,塃huāng,慌huāng,皇huáng,偟huáng,凰huáng,隍huáng,黃huáng,黄huáng,喤huáng,堭huáng,媓huáng,崲huáng,徨huáng,湟huáng,葟huáng,遑huáng,楻huáng,煌huáng,瑝huáng,墴huáng,潢huáng,獚huáng,锽huáng,熿huáng,璜huáng,篁huáng,艎huáng,蝗huáng,癀huáng,磺huáng,穔huáng,諻huáng,簧huáng,蟥huáng,鍠huáng,餭huáng,鳇huáng,鐄huáng,騜huáng,鰉huáng,鷬huáng,惶huáng,鱑huáng,怳huǎng,恍huǎng,炾huǎng,宺huǎng,晃huǎng,晄huǎng,奛huǎng,谎huǎng,幌huǎng,愰huǎng,詤huǎng,縨huǎng,謊huǎng,皩huǎng,兤huǎng,滉huàng,榥huàng,曂huàng,皝huàng,鎤huàng,鰴hui,灰huī,灳huī,诙huī,咴huī,恢huī,拻huī,挥huī,虺huī,晖huī,烣huī,珲huī,豗huī,婎huī,媈huī,揮huī,翚huī,辉huī,暉huī,楎huī,琿huī,禈huī,詼huī,幑huī,睳huī,噅huī,噕huī,翬huī,輝huī,麾huī,徽huī,隳huī,瀈huī,洃huī,煇huí,囘huí,回huí,囬huí,廻huí,廽huí,恛huí,洄huí,茴huí,迴huí,烠huí,逥huí,痐huí,蛔huí,蛕huí,蜖huí,鮰huí,藱huí,悔huǐ,毇huǐ,檓huǐ,燬huǐ,譭huǐ,泋huǐ,毁huǐ,烜huǐ,卉huì,屷huì,汇huì,会huì,讳huì,浍huì,绘huì,荟huì,诲huì,恚huì,恵huì,烩huì,贿huì,彗huì,晦huì,秽huì,喙huì,惠huì,缋huì,翙huì,阓huì,匯huì,彙huì,彚huì,會huì,毀huì,滙huì,詯huì,賄huì,嘒huì,蔧huì,誨huì,圚huì,寭huì,慧huì,憓huì,暳huì,槥huì,潓huì,蕙huì,徻huì,橞huì,澮huì,獩huì,璤huì,薈huì,薉huì,諱huì,檅huì,燴huì,篲huì,餯huì,嚖huì,瞺huì,穢huì,繢huì,蟪huì,櫘huì,繪huì,翽huì,譓huì,儶huì,鏸huì,闠huì,孈huì,鐬huì,靧huì,韢huì,譿huì,顪huì,銊huì,叀huì,僡huì,懳huì,昏hūn,昬hūn,荤hūn,婚hūn,惛hūn,涽hūn,阍hūn,惽hūn,棔hūn,葷hūn,睧hūn,閽hūn,焄hūn,蔒hūn,睯hūn,忶hún,浑hún,馄hún,渾hún,魂hún,餛hún,繉hún,轋hún,鼲hún,混hún,梱hún,湷hún,诨hùn,俒hùn,倱hùn,掍hùn,焝hùn,溷hùn,慁hùn,觨hùn,諢hùn,吙huō,耠huō,锪huō,劐huō,鍃huō,豁huō,攉huō,騞huō,搉huō,佸huó,秮huó,活huó,火huǒ,伙huǒ,邩huǒ,钬huǒ,鈥huǒ,夥huǒ,沎huò,或huò,货huò,咟huò,俰huò,捇huò,眓huò,获huò,閄huò,剨huò,掝huò,祸huò,貨huò,惑huò,旤huò,湱huò,禍huò,奯huò,獲huò,霍huò,謋huò,镬huò,嚯huò,瀖huò,耯huò,藿huò,蠖huò,嚿huò,曤huò,臛huò,癨huò,矐huò,鑊huò,靃huò,謔huò,篧huò,擭huò,夻hwa,丌jī,讥jī,击jī,刉jī,叽jī,饥jī,乩jī,圾jī,机jī,玑jī,肌jī,芨jī,矶jī,鸡jī,枅jī,咭jī,剞jī,唧jī,姬jī,屐jī,积jī,笄jī,飢jī,基jī,喞jī,嵆jī,嵇jī,攲jī,敧jī,犄jī,筓jī,缉jī,赍jī,嗘jī,稘jī,跻jī,鳮jī,僟jī,毄jī,箕jī,銈jī,嘰jī,撃jī,樭jī,畿jī,稽jī,緝jī,觭jī,賫jī,躸jī,齑jī,墼jī,憿jī,機jī,激jī,璣jī,禨jī,積jī,錤jī,隮jī,擊jī,磯jī,簊jī,羁jī,賷jī,鄿jī,櫅jī,耭jī,雞jī,譏jī,韲jī,鶏jī,譤jī,鐖jī,癪jī,躋jī,鞿jī,鷄jī,齎jī,羇jī,虀jī,鑇jī,覉jī,鑙jī,齏jī,羈jī,鸄jī,覊jī,庴jī,垍jī,諅jī,踦jī,璂jī,踑jī,谿jī,刏jī,畸jī,簎jí,諔jí,堲jí,蠀jí,亼jí,及jí,吉jí,彶jí,忣jí,汲jí,级jí,即jí,极jí,亟jí,佶jí,郆jí,卽jí,叝jí,姞jí,急jí,狤jí,皍jí,笈jí,級jí,揤jí,疾jí,觙jí,偮jí,卙jí,楖jí,焏jí,脨jí,谻jí,戢jí,棘jí,極jí,湒jí,集jí,塉jí,嫉jí,愱jí,楫jí,蒺jí,蝍jí,趌jí,辑jí,槉jí,耤jí,膌jí,銡jí,嶯jí,潗jí,瘠jí,箿jí,蕀jí,蕺jí,踖jí,鞊jí,鹡jí,橶jí,檝jí,濈jí,螏jí,輯jí,襋jí,蹐jí,艥jí,籍jí,轚jí,鏶jí,霵jí,鶺jí,鷑jí,躤jí,雦jí,雧jí,嵴jí,尐jí,淁jí,吇jí,莋jí,岌jí,殛jí,鍓jí,颳jǐ,几jǐ,己jǐ,丮jǐ,妀jǐ,犱jǐ,泲jǐ,虮jǐ,挤jǐ,脊jǐ,掎jǐ,鱾jǐ,幾jǐ,戟jǐ,麂jǐ,魢jǐ,撠jǐ,擠jǐ,穖jǐ,蟣jǐ,済jǐ,畟jì,迹jì,绩jì,勣jì,彑jì,旡jì,计jì,记jì,伎jì,纪jì,坖jì,妓jì,忌jì,技jì,芰jì,芶jì,际jì,剂jì,季jì,哜jì,峜jì,既jì,洎jì,济jì,紀jì,茍jì,計jì,剤jì,紒jì,继jì,觊jì,記jì,偈jì,寄jì,徛jì,悸jì,旣jì,梞jì,祭jì,萕jì,惎jì,臮jì,葪jì,蔇jì,兾jì,痵jì,継jì,蓟jì,裚jì,跡jì,際jì,墍jì,暨jì,漃jì,漈jì,禝jì,稩jì,穊jì,誋jì,跽jì,霁jì,鲚jì,稷jì,鲫jì,冀jì,劑jì,曁jì,穄jì,縘jì,薊jì,襀jì,髻jì,嚌jì,檕jì,濟jì,繋jì,罽jì,覬jì,鮆jì,檵jì,璾jì,蹟jì,鯽jì,鵋jì,齌jì,廭jì,懻jì,癠jì,穧jì,糭jì,繫jì,骥jì,鯚jì,瀱jì,繼jì,蘮jì,鱀jì,蘻jì,霽jì,鰶jì,鰿jì,鱭jì,驥jì,訐jì,魝jì,櫭jì,帺jì,褀jì,鬾jì,懠jì,蟿jì,汥jì,鯯jì,齍jì,績jì,寂jì,暩jì,蘎jì,筴jiā,加jiā,抸jiā,佳jiā,泇jiā,迦jiā,枷jiā,毠jiā,浃jiā,珈jiā,埉jiā,家jiā,浹jiā,痂jiā,梜jiā,耞jiā,袈jiā,猳jiā,葭jiā,跏jiā,犌jiā,腵jiā,鉫jiā,嘉jiā,镓jiā,糘jiā,豭jiā,貑jiā,鎵jiā,麚jiā,椵jiā,挟jiā,挾jiā,笳jiā,夹jiá,袷jiá,裌jiá,圿jiá,扴jiá,郏jiá,荚jiá,郟jiá,唊jiá,恝jiá,莢jiá,戛jiá,脥jiá,铗jiá,蛱jiá,颊jiá,蛺jiá,跲jiá,鋏jiá,頬jiá,頰jiá,鴶jiá,鵊jiá,忦jiá,戞jiá,岬jiǎ,甲jiǎ,叚jiǎ,玾jiǎ,胛jiǎ,斚jiǎ,贾jiǎ,钾jiǎ,婽jiǎ,徦jiǎ,斝jiǎ,賈jiǎ,鉀jiǎ,榎jiǎ,槚jiǎ,瘕jiǎ,檟jiǎ,夓jiǎ,假jiǎ,价jià,驾jià,架jià,嫁jià,幏jià,榢jià,價jià,稼jià,駕jià,戋jiān,奸jiān,尖jiān,幵jiān,坚jiān,歼jiān,间jiān,冿jiān,戔jiān,肩jiān,艰jiān,姦jiān,姧jiān,兼jiān,监jiān,堅jiān,惤jiān,猏jiān,笺jiān,菅jiān,菺jiān,牋jiān,犍jiān,缄jiān,葌jiān,葏jiān,間jiān,靬jiān,搛jiān,椾jiān,煎jiān,瑊jiān,睷jiān,碊jiān,缣jiān,蒹jiān,監jiān,箋jiān,樫jiān,熞jiān,緘jiān,蕑jiān,蕳jiān,鲣jiān,鳽jiān,鹣jiān,熸jiān,篯jiān,縑jiān,艱jiān,鞬jiān,餰jiān,馢jiān,麉jiān,瀐jiān,鞯jiān,鳒jiān,殱jiān,礛jiān,覸jiān,鵳jiān,瀸jiān,櫼jiān,殲jiān,譼jiān,鰜jiān,鶼jiān,籛jiān,韀jiān,鰹jiān,囏jiān,虃jiān,鑯jiān,韉jiān,揃jiān,鐗jiān,鐧jiān,閒jiān,黚jiān,傔jiān,攕jiān,纎jiān,钘jiān,鈃jiān,銒jiān,籈jiān,湔jiān,囝jiǎn,拣jiǎn,枧jiǎn,俭jiǎn,茧jiǎn,倹jiǎn,挸jiǎn,捡jiǎn,笕jiǎn,减jiǎn,剪jiǎn,帴jiǎn,梘jiǎn,检jiǎn,湕jiǎn,趼jiǎn,揀jiǎn,検jiǎn,減jiǎn,睑jiǎn,硷jiǎn,裥jiǎn,詃jiǎn,锏jiǎn,弿jiǎn,瑐jiǎn,筧jiǎn,简jiǎn,絸jiǎn,谫jiǎn,彅jiǎn,戩jiǎn,碱jiǎn,儉jiǎn,翦jiǎn,撿jiǎn,檢jiǎn,藆jiǎn,襇jiǎn,襉jiǎn,謇jiǎn,蹇jiǎn,瞼jiǎn,礆jiǎn,簡jiǎn,繭jiǎn,謭jiǎn,鬋jiǎn,鰎jiǎn,鹸jiǎn,瀽jiǎn,蠒jiǎn,鹻jiǎn,譾jiǎn,襺jiǎn,鹼jiǎn,堿jiǎn,偂jiǎn,銭jiǎn,醎jiǎn,鹹jiǎn,涀jiǎn,橏jiǎn,柬jiǎn,戬jiǎn,见jiàn,件jiàn,見jiàn,侟jiàn,饯jiàn,剑jiàn,洊jiàn,牮jiàn,荐jiàn,贱jiàn,俴jiàn,健jiàn,剣jiàn,栫jiàn,涧jiàn,珔jiàn,舰jiàn,剱jiàn,徤jiàn,渐jiàn,袸jiàn,谏jiàn,釼jiàn,寋jiàn,旔jiàn,楗jiàn,毽jiàn,溅jiàn,腱jiàn,臶jiàn,葥jiàn,践jiàn,鉴jiàn,键jiàn,僭jiàn,榗jiàn,漸jiàn,劍jiàn,劎jiàn,墹jiàn,澗jiàn,箭jiàn,糋jiàn,諓jiàn,賤jiàn,趝jiàn,踐jiàn,踺jiàn,劒jiàn,劔jiàn,橺jiàn,薦jiàn,諫jiàn,鍵jiàn,餞jiàn,瞯jiàn,瞷jiàn,磵jiàn,礀jiàn,螹jiàn,鍳jiàn,濺jiàn,繝jiàn,瀳jiàn,鏩jiàn,艦jiàn,轞jiàn,鑑jiàn,鑒jiàn,鑬jiàn,鑳jiàn,鐱jiàn,揵jiàn,蔪jiàn,橌jiàn,廴jiàn,譖jiàn,鋻jiàn,建jiàn,賎jiàn,擶jiàn,江jiāng,姜jiāng,将jiāng,茳jiāng,浆jiāng,畕jiāng,豇jiāng,葁jiāng,摪jiāng,翞jiāng,僵jiāng,漿jiāng,螀jiāng,壃jiāng,彊jiāng,缰jiāng,薑jiāng,殭jiāng,螿jiāng,鳉jiāng,疅jiāng,礓jiāng,疆jiāng,繮jiāng,韁jiāng,鱂jiāng,將jiāng,畺jiāng,糡jiāng,橿jiāng,讲jiǎng,奖jiǎng,桨jiǎng,蒋jiǎng,勥jiǎng,奨jiǎng,奬jiǎng,蔣jiǎng,槳jiǎng,獎jiǎng,耩jiǎng,膙jiǎng,講jiǎng,顜jiǎng,塂jiǎng,匞jiàng,匠jiàng,夅jiàng,弜jiàng,杢jiàng,降jiàng,绛jiàng,弶jiàng,袶jiàng,絳jiàng,酱jiàng,摾jiàng,滰jiàng,嵹jiàng,犟jiàng,醤jiàng,糨jiàng,醬jiàng,櫤jiàng,謽jiàng,蔃jiàng,洚jiàng,艽jiāo,芁jiāo,交jiāo,郊jiāo,姣jiāo,娇jiāo,峧jiāo,浇jiāo,茭jiāo,骄jiāo,胶jiāo,椒jiāo,焳jiāo,蛟jiāo,跤jiāo,僬jiāo,嘄jiāo,鲛jiāo,嬌jiāo,嶕jiāo,嶣jiāo,憍jiāo,澆jiāo,膠jiāo,蕉jiāo,燋jiāo,膲jiāo,礁jiāo,穚jiāo,鮫jiāo,鹪jiāo,簥jiāo,蟭jiāo,轇jiāo,鐎jiāo,驕jiāo,鷦jiāo,鷮jiāo,儌jiāo,撟jiāo,挍jiāo,教jiāo,骹jiāo,嫶jiāo,萩jiāo,嘐jiāo,憢jiāo,焦jiāo,櫵jiáo,嚼jiáo,臫jiǎo,佼jiǎo,挢jiǎo,狡jiǎo,绞jiǎo,饺jiǎo,晈jiǎo,笅jiǎo,皎jiǎo,矫jiǎo,脚jiǎo,铰jiǎo,搅jiǎo,筊jiǎo,絞jiǎo,剿jiǎo,勦jiǎo,敫jiǎo,湬jiǎo,煍jiǎo,腳jiǎo,賋jiǎo,摷jiǎo,暞jiǎo,踋jiǎo,鉸jiǎo,劋jiǎo,撹jiǎo,徼jiǎo,敽jiǎo,敿jiǎo,缴jiǎo,曒jiǎo,璬jiǎo,矯jiǎo,皦jiǎo,蟜jiǎo,鵤jiǎo,繳jiǎo,譑jiǎo,孂jiǎo,纐jiǎo,攪jiǎo,灚jiǎo,鱎jiǎo,潐jiǎo,糸jiǎo,蹻jiǎo,釥jiǎo,纟jiǎo,恔jiǎo,角jiǎo,餃jiǎo,叫jiào,呌jiào,訆jiào,珓jiào,轿jiào,较jiào,窖jiào,滘jiào,較jiào,嘂jiào,嘦jiào,斠jiào,漖jiào,酵jiào,噍jiào,噭jiào,嬓jiào,獥jiào,藠jiào,趭jiào,轎jiào,醮jiào,譥jiào,皭jiào,釂jiào,觉jiào,覐jiào,覚jiào,覺jiào,趫jiào,敎jiào,阶jiē,疖jiē,皆jiē,接jiē,掲jiē,痎jiē,秸jiē,菨jiē,喈jiē,嗟jiē,堦jiē,媘jiē,嫅jiē,揭jiē,椄jiē,湝jiē,脻jiē,街jiē,煯jiē,稭jiē,鞂jiē,蝔jiē,擑jiē,癤jiē,鶛jiē,节jiē,節jiē,袓jiē,謯jiē,階jiē,卪jié,孑jié,讦jié,刦jié,刧jié,劫jié,岊jié,昅jié,刼jié,劼jié,疌jié,衱jié,诘jié,拮jié,洁jié,结jié,迼jié,倢jié,桀jié,桝jié,莭jié,偼jié,婕jié,崨jié,捷jié,袺jié,傑jié,媫jié,結jié,蛣jié,颉jié,嵥jié,楬jié,楶jié,滐jié,睫jié,蜐jié,詰jié,截jié,榤jié,碣jié,竭jié,蓵jié,鲒jié,潔jié,羯jié,誱jié,踕jié,頡jié,幯jié,擳jié,嶻jié,擮jié,礍jié,鍻jié,鮚jié,巀jié,蠞jié,蠘jié,蠽jié,洯jié,絜jié,搩jié,杰jié,鉣jié,姐jiě,毑jiě,媎jiě,解jiě,觧jiě,檞jiě,飷jiě,丯jiè,介jiè,岕jiè,庎jiè,戒jiè,芥jiè,屆jiè,届jiè,斺jiè,玠jiè,界jiè,畍jiè,疥jiè,砎jiè,衸jiè,诫jiè,借jiè,蚧jiè,徣jiè,堺jiè,楐jiè,琾jiè,蛶jiè,骱jiè,犗jiè,誡jiè,魪jiè,藉jiè,繲jiè,雃jiè,嶰jiè,唶jiè,褯jiè,巾jīn,今jīn,斤jīn,钅jīn,兓jīn,金jīn,釒jīn,津jīn,矜jīn,砛jīn,荕jīn,衿jīn,觔jīn,埐jīn,珒jīn,紟jīn,惍jīn,琎jīn,堻jīn,琻jīn,筋jīn,嶜jīn,璡jīn,鹶jīn,黅jīn,襟jīn,濜jīn,仅jǐn,巹jǐn,紧jǐn,堇jǐn,菫jǐn,僅jǐn,厪jǐn,谨jǐn,锦jǐn,嫤jǐn,廑jǐn,漌jǐn,緊jǐn,蓳jǐn,馑jǐn,槿jǐn,瑾jǐn,錦jǐn,謹jǐn,饉jǐn,儘jǐn,婜jǐn,斳jǐn,卺jǐn,笒jìn,盡jìn,劤jìn,尽jìn,劲jìn,妗jìn,近jìn,进jìn,侭jìn,枃jìn,勁jìn,荩jìn,晉jìn,晋jìn,浸jìn,烬jìn,赆jìn,祲jìn,進jìn,煡jìn,缙jìn,寖jìn,搢jìn,溍jìn,禁jìn,靳jìn,墐jìn,慬jìn,瑨jìn,僸jìn,凚jìn,歏jìn,殣jìn,觐jìn,噤jìn,濅jìn,縉jìn,賮jìn,嚍jìn,壗jìn,藎jìn,燼jìn,璶jìn,覲jìn,贐jìn,齽jìn,馸jìn,臸jìn,浕jìn,嬧jìn,坕jīng,坙jīng,巠jīng,京jīng,泾jīng,经jīng,茎jīng,亰jīng,秔jīng,荆jīng,荊jīng,涇jīng,莖jīng,婛jīng,惊jīng,旌jīng,旍jīng,猄jīng,経jīng,菁jīng,晶jīng,稉jīng,腈jīng,粳jīng,經jīng,兢jīng,精jīng,聙jīng,橸jīng,鲸jīng,鵛jīng,鯨jīng,鶁jīng,麖jīng,鼱jīng,驚jīng,麠jīng,徑jīng,仱jīng,靑jīng,睛jīng,井jǐng,阱jǐng,刭jǐng,坓jǐng,宑jǐng,汫jǐng,汬jǐng,肼jǐng,剄jǐng,穽jǐng,颈jǐng,景jǐng,儆jǐng,幜jǐng,璄jǐng,憼jǐng,暻jǐng,燝jǐng,璟jǐng,璥jǐng,頸jǐng,蟼jǐng,警jǐng,擏jǐng,憬jǐng,妌jìng,净jìng,弪jìng,径jìng,迳jìng,浄jìng,胫jìng,凈jìng,弳jìng,痉jìng,竞jìng,逕jìng,婙jìng,婧jìng,桱jìng,梷jìng,淨jìng,竫jìng,脛jìng,敬jìng,痙jìng,竧jìng,傹jìng,靖jìng,境jìng,獍jìng,誩jìng,静jìng,頚jìng,曔jìng,镜jìng,靜jìng,瀞jìng,鏡jìng,競jìng,竸jìng,葝jìng,儬jìng,陘jìng,竟jìng,冋jiōng,扃jiōng,埛jiōng,絅jiōng,駉jiōng,駫jiōng,冏jiōng,浻jiōng,扄jiōng,銄jiōng,囧jiǒng,迥jiǒng,侰jiǒng,炯jiǒng,逈jiǒng,烱jiǒng,煚jiǒng,窘jiǒng,颎jiǒng,綗jiǒng,僒jiǒng,煛jiǒng,熲jiǒng,澃jiǒng,燛jiǒng,褧jiǒng,顈jiǒng,蘔jiǒng,宭jiǒng,蘏jiǒng,丩jiū,勼jiū,纠jiū,朻jiū,究jiū,糺jiū,鸠jiū,赳jiū,阄jiū,萛jiū,啾jiū,揪jiū,揫jiū,鳩jiū,摎jiū,鬏jiū,鬮jiū,稵jiū,糾jiū,九jiǔ,久jiǔ,乆jiǔ,乣jiǔ,奺jiǔ,汣jiǔ,杦jiǔ,灸jiǔ,玖jiǔ,舏jiǔ,韭jiǔ,紤jiǔ,酒jiǔ,镹jiǔ,韮jiǔ,匛jiù,旧jiù,臼jiù,疚jiù,柩jiù,柾jiù,倃jiù,桕jiù,厩jiù,救jiù,就jiù,廄jiù,匓jiù,舅jiù,僦jiù,廏jiù,廐jiù,慦jiù,殧jiù,舊jiù,鹫jiù,麔jiù,匶jiù,齨jiù,鷲jiù,咎jiù,欍jou,鶪ju,伡jū,俥jū,凥jū,匊jū,居jū,狙jū,苴jū,驹jū,倶jū,挶jū,捄jū,疽jū,痀jū,眗jū,砠jū,罝jū,陱jū,娵jū,婅jū,婮jū,崌jū,掬jū,梮jū,涺jū,椐jū,琚jū,腒jū,趄jū,跔jū,锔jū,裾jū,雎jū,艍jū,蜛jū,踘jū,鋦jū,駒jū,鮈jū,鴡jū,鞠jū,鞫jū,鶋jū,臄jū,揟jū,拘jū,諊jū,局jú,泦jú,侷jú,狊jú,桔jú,毩jú,淗jú,焗jú,菊jú,郹jú,椈jú,毱jú,湨jú,犑jú,輂jú,粷jú,蓻jú,趜jú,躹jú,閰jú,檋jú,駶jú,鵙jú,蹫jú,鵴jú,巈jú,蘜jú,鼰jú,鼳jú,驧jú,趉jú,郥jú,橘jú,咀jǔ,弆jǔ,沮jǔ,举jǔ,矩jǔ,莒jǔ,挙jǔ,椇jǔ,筥jǔ,榉jǔ,榘jǔ,蒟jǔ,龃jǔ,聥jǔ,舉jǔ,踽jǔ,擧jǔ,櫸jǔ,齟jǔ,襷jǔ,籧jǔ,郰jǔ,欅jǔ,句jù,巨jù,讵jù,姖jù,岠jù,怇jù,拒jù,洰jù,苣jù,邭jù,具jù,怚jù,拠jù,昛jù,歫jù,炬jù,秬jù,钜jù,俱jù,倨jù,冣jù,剧jù,粔jù,耟jù,蚷jù,埧jù,埾jù,惧jù,詎jù,距jù,焣jù,犋jù,跙jù,鉅jù,飓jù,虡jù,豦jù,锯jù,愳jù,窭jù,聚jù,駏jù,劇jù,勮jù,屦jù,踞jù,鮔jù,壉jù,懅jù,據jù,澽jù,遽jù,鋸jù,屨jù,颶jù,簴jù,躆jù,醵jù,懼jù,鐻jù,爠jù,坥jù,螶jù,忂jù,葅jù,蒩jù,珇jù,据jù,姢juān,娟juān,捐juān,涓juān,脧juān,裐juān,鹃juān,勬juān,鋑juān,鋗juān,镌juān,鎸juān,鵑juān,鐫juān,蠲juān,勌juān,瓹juān,梋juān,鞙juān,朘juān,呟juǎn,帣juǎn,埍juǎn,捲juǎn,菤juǎn,锩juǎn,臇juǎn,錈juǎn,埢juǎn,踡juǎn,蕋juǎn,卷juàn,劵juàn,弮juàn,倦juàn,桊juàn,狷juàn,绢juàn,淃juàn,眷juàn,鄄juàn,睊juàn,絭juàn,罥juàn,睠juàn,絹juàn,慻juàn,蔨juàn,餋juàn,獧juàn,羂juàn,圏juàn,棬juàn,惓juàn,韏juàn,讂juàn,縳juàn,襈juàn,奆juàn,噘juē,撅juē,撧juē,屩juē,屫juē,繑juē,亅jué,孓jué,决jué,刔jué,氒jué,诀jué,抉jué,決jué,芵jué,泬jué,玦jué,玨jué,挗jué,珏jué,砄jué,绝jué,虳jué,捔jué,欮jué,蚗jué,崛jué,掘jué,斍jué,桷jué,殌jué,焆jué,觖jué,逫jué,傕jué,厥jué,絕jué,絶jué,鈌jué,劂jué,勪jué,瑴jué,谲jué,嶥jué,憰jué,潏jué,熦jué,爴jué,獗jué,瘚jué,蕝jué,蕨jué,憠jué,橛jué,镼jué,爵jué,镢jué,蟨jué,蟩jué,爑jué,譎jué,蹷jué,鶌jué,矍jué,鐝jué,灍jué,爝jué,觼jué,彏jué,戄jué,攫jué,玃jué,鷢jué,欔jué,矡jué,龣jué,貜jué,躩jué,钁jué,璚jué,匷jué,啳jué,吷jué,疦jué,弡jué,穱jué,孒jué,訣jué,橜jué,蹶juě,倔juè,誳juè,君jūn,均jūn,汮jūn,姰jūn,袀jūn,軍jūn,钧jūn,莙jūn,蚐jūn,桾jūn,皲jūn,菌jūn,鈞jūn,碅jūn,筠jūn,皸jūn,皹jūn,覠jūn,銁jūn,銞jūn,鲪jūn,麇jūn,鍕jūn,鮶jūn,麏jūn,麕jūn,军jūn,隽jùn,雋jùn,呁jùn,俊jùn,郡jùn,陖jùn,峻jùn,捃jùn,晙jùn,馂jùn,骏jùn,焌jùn,珺jùn,畯jùn,竣jùn,箘jùn,箟jùn,蜠jùn,儁jùn,寯jùn,懏jùn,餕jùn,燇jùn,駿jùn,鵔jùn,鵕jùn,鵘jùn,葰jùn,埈jùn,咔kā,咖kā,喀kā,衉kā,哢kā,呿kā,卡kǎ,佧kǎ,垰kǎ,裃kǎ,鉲kǎ,胩kǎ,开kāi,奒kāi,揩kāi,锎kāi,開kāi,鐦kāi,凯kǎi,剀kǎi,垲kǎi,恺kǎi,闿kǎi,铠kǎi,凱kǎi,慨kǎi,蒈kǎi,塏kǎi,愷kǎi,楷kǎi,輆kǎi,暟kǎi,锴kǎi,鍇kǎi,鎧kǎi,闓kǎi,颽kǎi,喫kài,噄kài,忾kài,烗kài,勓kài,愾kài,鎎kài,愒kài,欯kài,炌kài,乫kal,刊kān,栞kān,勘kān,龛kān,堪kān,嵁kān,戡kān,龕kān,槛kǎn,檻kǎn,冚kǎn,坎kǎn,侃kǎn,砍kǎn,莰kǎn,偘kǎn,埳kǎn,惂kǎn,欿kǎn,塪kǎn,輡kǎn,竷kǎn,轗kǎn,衎kǎn,看kàn,崁kàn,墈kàn,阚kàn,瞰kàn,磡kàn,闞kàn,矙kàn,輱kàn,忼kāng,砊kāng,粇kāng,康kāng,嫝kāng,嵻kāng,慷kāng,漮kāng,槺kāng,穅kāng,糠kāng,躿kāng,鏮kāng,鱇kāng,闶kāng,閌kāng,扛káng,摃káng,亢kàng,伉kàng,匟kàng,囥kàng,抗kàng,炕kàng,钪kàng,鈧kàng,邟kàng,尻kāo,髛kāo,嵪kāo,訄kāo,薧kǎo,攷kǎo,考kǎo,拷kǎo,洘kǎo,栲kǎo,烤kǎo,铐kào,犒kào,銬kào,鲓kào,靠kào,鮳kào,鯌kào,焅kào,屙kē,蚵kē,苛kē,柯kē,牁kē,珂kē,胢kē,轲kē,疴kē,趷kē,钶kē,嵙kē,棵kē,痾kē,萪kē,軻kē,颏kē,犐kē,稞kē,窠kē,鈳kē,榼kē,薖kē,颗kē,樖kē,瞌kē,磕kē,蝌kē,頦kē,醘kē,顆kē,髁kē,礚kē,嗑kē,窼kē,簻kē,科kē,壳ké,咳ké,揢ké,翗ké,嶱ké,殼ké,毼kě,磆kě,坷kě,可kě,岢kě,炣kě,渇kě,嵑kě,敤kě,渴kě,袔kè,悈kè,歁kè,克kè,刻kè,剋kè,勀kè,勊kè,客kè,恪kè,娔kè,尅kè,课kè,堁kè,氪kè,骒kè,缂kè,愙kè,溘kè,锞kè,碦kè,課kè,礊kè,騍kè,硞kè,艐kè,緙kè,肎kěn,肯kěn,肻kěn,垦kěn,恳kěn,啃kěn,豤kěn,貇kěn,墾kěn,錹kěn,懇kěn,頎kěn,掯kèn,裉kèn,褃kèn,硍kèn,妔kēng,踁kēng,劥kēng,吭kēng,坈kēng,坑kēng,挳kēng,硁kēng,牼kēng,硜kēng,铿kēng,硻kēng,誙kēng,銵kēng,鏗kēng,摼kēng,殸kēng,揁kēng,鍞kēng,巪keo,乬keol,唟keos,厼keum,怾ki,空kōng,倥kōng,埪kōng,崆kōng,悾kōng,硿kōng,箜kōng,躻kōng,錓kōng,鵼kōng,椌kōng,宆kōng,孔kǒng,恐kǒng,控kòng,鞚kòng,羫kòng,廤kos,抠kōu,芤kōu,眍kōu,剾kōu,彄kōu,摳kōu,瞘kōu,劶kǒu,竘kǒu,口kǒu,叩kòu,扣kòu,怐kòu,敂kòu,冦kòu,宼kòu,寇kòu,釦kòu,窛kòu,筘kòu,滱kòu,蔲kòu,蔻kòu,瞉kòu,簆kòu,鷇kòu,搰kū,刳kū,矻kū,郀kū,枯kū,哭kū,桍kū,堀kū,崫kū,圐kū,跍kū,窟kū,骷kū,泏kū,窋kū,狜kǔ,苦kǔ,楛kǔ,齁kù,捁kù,库kù,俈kù,绔kù,庫kù,秙kù,袴kù,喾kù,絝kù,裤kù,瘔kù,酷kù,褲kù,嚳kù,鮬kù,恗kuā,夸kuā,姱kuā,晇kuā,舿kuā,誇kuā,侉kuǎ,咵kuǎ,垮kuǎ,銙kuǎ,顝kuǎ,挎kuà,胯kuà,跨kuà,骻kuà,擓kuai,蒯kuǎi,璯kuài,駃kuài,巜kuài,凷kuài,圦kuài,块kuài,快kuài,侩kuài,郐kuài,哙kuài,狯kuài,脍kuài,塊kuài,筷kuài,鲙kuài,儈kuài,鄶kuài,噲kuài,廥kuài,獪kuài,膾kuài,旝kuài,糩kuài,鱠kuài,蕢kuài,宽kuān,寛kuān,寬kuān,髋kuān,鑧kuān,髖kuān,欵kuǎn,款kuǎn,歀kuǎn,窽kuǎn,窾kuǎn,梡kuǎn,匡kuāng,劻kuāng,诓kuāng,邼kuāng,匩kuāng,哐kuāng,恇kuāng,洭kuāng,筐kuāng,筺kuāng,誆kuāng,軭kuāng,狂kuáng,狅kuáng,诳kuáng,軖kuáng,軠kuáng,誑kuáng,鵟kuáng,夼kuǎng,儣kuǎng,懭kuǎng,爌kuǎng,邝kuàng,圹kuàng,况kuàng,旷kuàng,岲kuàng,況kuàng,矿kuàng,昿kuàng,贶kuàng,框kuàng,眖kuàng,砿kuàng,眶kuàng,絋kuàng,絖kuàng,貺kuàng,軦kuàng,鉱kuàng,鋛kuàng,鄺kuàng,壙kuàng,黋kuàng,懬kuàng,曠kuàng,礦kuàng,穬kuàng,纊kuàng,鑛kuàng,纩kuàng,亏kuī,刲kuī,悝kuī,盔kuī,窥kuī,聧kuī,窺kuī,虧kuī,闚kuī,巋kuī,蘬kuī,岿kuī,奎kuí,晆kuí,逵kuí,鄈kuí,頄kuí,馗kuí,喹kuí,揆kuí,葵kuí,骙kuí,戣kuí,暌kuí,楏kuí,楑kuí,魁kuí,睽kuí,蝰kuí,頯kuí,櫆kuí,藈kuí,鍷kuí,騤kuí,夔kuí,蘷kuí,虁kuí,躨kuí,鍨kuí,卼kuǐ,煃kuǐ,跬kuǐ,頍kuǐ,蹞kuǐ,尯kuǐ,匮kuì,欳kuì,喟kuì,媿kuì,愦kuì,愧kuì,溃kuì,蒉kuì,馈kuì,匱kuì,嘳kuì,嬇kuì,憒kuì,潰kuì,聩kuì,聭kuì,樻kuì,殨kuì,餽kuì,簣kuì,聵kuì,籄kuì,鐀kuì,饋kuì,鑎kuì,篑kuì,坤kūn,昆kūn,晜kūn,堃kūn,堒kūn,婫kūn,崐kūn,崑kūn,猑kūn,菎kūn,裈kūn,焜kūn,琨kūn,髠kūn,裩kūn,锟kūn,髡kūn,尡kūn,潉kūn,蜫kūn,褌kūn,髨kūn,熴kūn,瑻kūn,醌kūn,錕kūn,鲲kūn,臗kūn,騉kūn,鯤kūn,鵾kūn,鶤kūn,鹍kūn,悃kǔn,捆kǔn,阃kǔn,壸kǔn,祵kǔn,硱kǔn,稇kǔn,裍kǔn,壼kǔn,稛kǔn,綑kǔn,閫kǔn,閸kǔn,困kùn,睏kùn,涃kùn,秳kuò,漷kuò,扩kuò,拡kuò,括kuò,桰kuò,筈kuò,萿kuò,葀kuò,蛞kuò,阔kuò,廓kuò,頢kuò,擴kuò,濶kuò,闊kuò,鞟kuò,韕kuò,懖kuò,霩kuò,鞹kuò,鬠kuò,穒kweok,鞡la,垃lā,拉lā,柆lā,啦lā,菈lā,搚lā,邋lā,磖lā,翋lā,旯lá,砬lá,揦lá,喇lǎ,藞lǎ,嚹lǎ,剌là,溂là,腊là,揧là,楋là,瘌là,牎chuāng,床chuáng,漺chuǎng,怆chuàng,愴chuàng,莊zhuāng,粧zhuāng,装zhuāng,裝zhuāng,樁zhuāng,蜡là,蝋là,辢là,辣là,蝲là,臈là,攋là,爉là,臘là,鬎là,櫴là,瓎là,镴là,鯻là,鑞là,儠là,擸là,鱲là,蠟là,来lái,來lái,俫lái,倈lái,崃lái,徕lái,涞lái,莱lái,郲lái,婡lái,崍lái,庲lái,徠lái,梾lái,淶lái,猍lái,萊lái,逨lái,棶lái,琜lái,筙lái,铼lái,箂lái,錸lái,騋lái,鯠lái,鶆lái,麳lái,顂lái,勑lài,誺lài,赉lài,睐lài,睞lài,赖lài,賚lài,濑lài,賴lài,頼lài,癞lài,鵣lài,瀨lài,瀬lài,籁lài,藾lài,癩lài,襰lài,籟lài,唻lài,暕lán,兰lán,岚lán,拦lán,栏lán,婪lán,嵐lán,葻lán,阑lán,蓝lán,谰lán,厱lán,褴lán,儖lán,斓lán,篮lán,懢lán,燣lán,藍lán,襕lán,镧lán,闌lán,璼lán,襤lán,譋lán,幱lán,攔lán,瀾lán,灆lán,籃lán,繿lán,蘭lán,斕lán,欄lán,礷lán,襴lán,囒lán,灡lán,籣lán,欗lán,讕lán,躝lán,鑭lán,钄lán,韊lán,惏lán,澜lán,襽lán,览lǎn,浨lǎn,揽lǎn,缆lǎn,榄lǎn,漤lǎn,罱lǎn,醂lǎn,壈lǎn,懒lǎn,覧lǎn,擥lǎn,懶lǎn,孄lǎn,覽lǎn,孏lǎn,攬lǎn,欖lǎn,爦lǎn,纜lǎn,灠lǎn,顲lǎn,蘫làn,嬾làn,烂làn,滥làn,燗làn,嚂làn,壏làn,濫làn,爛làn,爤làn,瓓làn,糷làn,湅làn,煉làn,爁làn,唥lang,啷lāng,羮láng,勆láng,郎láng,郞láng,欴láng,狼láng,嫏láng,廊láng,桹láng,琅láng,蓈láng,榔láng,瑯láng,硠láng,稂láng,锒láng,筤láng,艆láng,蜋láng,郒láng,螂láng,躴láng,鋃láng,鎯láng,阆láng,閬láng,哴láng,悢lǎng,朗lǎng,朖lǎng,烺lǎng,塱lǎng,蓢lǎng,樃lǎng,誏lǎng,朤lǎng,俍lǎng,脼lǎng,莨làng,埌làng,浪làng,蒗làng,捞lāo,粩lāo,撈lāo,劳láo,労láo,牢láo,窂láo,哰láo,崂láo,浶láo,勞láo,痨láo,僗láo,嶗láo,憥láo,朥láo,癆láo,磱láo,簩láo,蟧láo,醪láo,鐒láo,顟láo,髝láo,轑láo,嫪láo,憦láo,铹láo,耂lǎo,老lǎo,佬lǎo,咾lǎo,姥lǎo,恅lǎo,荖lǎo,栳lǎo,珯lǎo,硓lǎo,铑lǎo,蛯lǎo,銠lǎo,橑lǎo,鮱lǎo,唠lào,嘮lào,烙lào,嗠lào,耢lào,酪lào,澇lào,橯lào,耮lào,軂lào,涝lào,饹le,了le,餎le,牞lè,仂lè,阞lè,乐lè,叻lè,忇lè,扐lè,氻lè,艻lè,玏lè,泐lè,竻lè,砳lè,勒lè,楽lè,韷lè,樂lè,簕lè,鳓lè,鰳lè,頛lei,嘞lei,雷léi,嫘léi,缧léi,蔂léi,樏léi,畾léi,檑léi,縲léi,镭léi,櫑léi,瓃léi,羸léi,礧léi,罍léi,蘲léi,鐳léi,轠léi,壨léi,鑘léi,靁léi,虆léi,鱩léi,欙léi,纝léi,鼺léi,磥léi,攂léi,腂lěi,瘣lěi,厽lěi,耒lěi,诔lěi,垒lěi,絫lěi,傫lěi,誄lěi,磊lěi,蕌lěi,蕾lěi,儡lěi,壘lěi,癗lěi,藟lěi,櫐lěi,矋lěi,礨lěi,灅lěi,蠝lěi,蘽lěi,讄lěi,儽lěi,鑸lěi,鸓lěi,洡lěi,礌lěi,塁lěi,纍lèi,肋lèi,泪lèi,类lèi,涙lèi,淚lèi,累lèi,酹lèi,銇lèi,頪lèi,擂lèi,錑lèi,颣lèi,類lèi,纇lèi,蘱lèi,禷lèi,祱lèi,塄léng,棱léng,楞léng,碐léng,稜léng,踜léng,薐léng,輘léng,冷lěng,倰lèng,堎lèng,愣lèng,睖lèng,瓈li,唎lī,粚lí,刕lí,厘lí,剓lí,梨lí,狸lí,荲lí,骊lí,悡lí,梸lí,犁lí,菞lí,喱lí,棃lí,犂lí,鹂lí,剺lí,漓lí,睝lí,筣lí,缡lí,艃lí,蓠lí,蜊lí,嫠lí,孷lí,樆lí,璃lí,盠lí,竰lí,氂lí,犛lí,糎lí,蔾lí,鋫lí,鲡lí,黎lí,篱lí,縭lí,罹lí,錅lí,蟍lí,謧lí,醨lí,嚟lí,藜lí,邌lí,釐lí,離lí,鯏lí,鏫lí,鯬lí,鵹lí,黧lí,囄lí,灕lí,蘺lí,蠡lí,蠫lí,孋lí,廲lí,劙lí,鑗lí,籬lí,驪lí,鱺lí,鸝lí,婯lí,儷lí,矖lí,纚lí,离lí,褵lí,穲lí,礼lǐ,李lǐ,里lǐ,俚lǐ,峛lǐ,哩lǐ,娌lǐ,峲lǐ,浬lǐ,逦lǐ,理lǐ,裡lǐ,锂lǐ,粴lǐ,裏lǐ,鋰lǐ,鲤lǐ,澧lǐ,禮lǐ,鯉lǐ,蟸lǐ,醴lǐ,鳢lǐ,邐lǐ,鱧lǐ,欐lǐ,欚lǐ,銐lì,脷lì,莉lì,力lì,历lì,厉lì,屴lì,立lì,吏lì,朸lì,丽lì,利lì,励lì,呖lì,坜lì,沥lì,苈lì,例lì,岦lì,戾lì,枥lì,沴lì,疠lì,苙lì,隶lì,俐lì,俪lì,栃lì,栎lì,疬lì,砅lì,茘lì,荔lì,轹lì,郦lì,娳lì,悧lì,栗lì,栛lì,栵lì,涖lì,猁lì,珕lì,砺lì,砾lì,秝lì,莅lì,唳lì,悷lì,琍lì,笠lì,粒lì,粝lì,蚸lì,蛎lì,傈lì,凓lì,厤lì,棙lì,痢lì,蛠lì,詈lì,雳lì,塛lì,慄lì,搮lì,溧lì,蒚lì,蒞lì,鉝lì,鳨lì,厯lì,厲lì,暦lì,歴lì,瑮lì,綟lì,蜧lì,勵lì,曆lì,歷lì,篥lì,隷lì,鴗lì,巁lì,檪lì,濿lì,癘lì,磿lì,隸lì,鬁lì,儮lì,櫔lì,爄lì,犡lì,禲lì,蠇lì,嚦lì,壢lì,攊lì,櫟lì,瀝lì,瓅lì,礪lì,藶lì,麗lì,櫪lì,爏lì,瓑lì,皪lì,盭lì,礫lì,糲lì,蠣lì,癧lì,礰lì,酈lì,鷅lì,麜lì,囇lì,攦lì,轢lì,讈lì,轣lì,攭lì,瓥lì,靂lì,鱱lì,靋lì,觻lì,鱳lì,叓lì,蝷lì,赲lì,曞lì,嫾liān,奁lián,连lián,帘lián,怜lián,涟lián,莲lián,連lián,梿lián,联lián,裢lián,亷lián,嗹lián,廉lián,慩lián,溓lián,漣lián,蓮lián,奩lián,熑lián,覝lián,劆lián,匳lián,噒lián,憐lián,磏lián,聨lián,聫lián,褳lián,鲢lián,濂lián,濓lián,縺lián,翴lián,聮lián,薕lián,螊lián,櫣lián,燫lián,聯lián,臁lián,蹥lián,謰lián,鎌lián,镰lián,簾lián,蠊lián,譧lián,鐮lián,鰱lián,籢lián,籨lián,槤lián,僆lián,匲lián,鬑lián,敛liǎn,琏liǎn,脸liǎn,裣liǎn,摙liǎn,璉liǎn,蔹liǎn,嬚liǎn,斂liǎn,歛liǎn,臉liǎn,鄻liǎn,襝liǎn,羷liǎn,蘝liǎn,蘞liǎn,薟liǎn,练liàn,炼liàn,恋liàn,浰liàn,殓liàn,堜liàn,媡liàn,链liàn,楝liàn,瑓liàn,潋liàn,稴liàn,練liàn,澰liàn,錬liàn,殮liàn,鍊liàn,鏈liàn,瀲liàn,鰊liàn,戀liàn,纞liàn,孌liàn,攣liàn,萰liàn,簗liāng,良liáng,凉liáng,梁liáng,涼liáng,椋liáng,辌liáng,粮liáng,粱liáng,墚liáng,綡liáng,輬liáng,糧liáng,駺liáng,樑liáng,冫liǎng,俩liǎng,倆liǎng,両liǎng,两liǎng,兩liǎng,唡liǎng,啢liǎng,掚liǎng,裲liǎng,緉liǎng,蜽liǎng,魉liǎng,魎liǎng,倞liàng,靓liàng,靚liàng,踉liàng,亮liàng,谅liàng,辆liàng,喨liàng,晾liàng,湸liàng,量liàng,煷liàng,輌liàng,諒liàng,輛liàng,鍄liàng,蹽liāo,樛liáo,潦liáo,辽liáo,疗liáo,僚liáo,寥liáo,嵺liáo,憀liáo,漻liáo,膋liáo,嘹liáo,嫽liáo,寮liáo,嶚liáo,嶛liáo,憭liáo,撩liáo,敹liáo,獠liáo,缭liáo,遼liáo,暸liáo,燎liáo,璙liáo,窷liáo,膫liáo,療liáo,竂liáo,鹩liáo,屪liáo,廫liáo,簝liáo,蟟liáo,豂liáo,賿liáo,蹘liáo,爎liáo,髎liáo,飉liáo,鷯liáo,镽liáo,尞liáo,镠liáo,鏐liáo,僇liáo,聊liáo,繚liáo,钌liǎo,釕liǎo,鄝liǎo,蓼liǎo,爒liǎo,瞭liǎo,廖liào,镣liào,鐐liào,尥liào,炓liào,料liào,撂liào,蟉liào,鴷lie,咧liě,毟liě,挘liě,埓liě,忚liě,列liè,劣liè,冽liè,姴liè,峢liè,挒liè,洌liè,茢liè,迾liè,埒liè,浖liè,烈liè,烮liè,捩liè,猎liè,猟liè,脟liè,蛚liè,裂liè,煭liè,睙liè,聗liè,趔liè,巤liè,颲liè,鮤liè,獵liè,犣liè,躐liè,鬛liè,哷liè,劦liè,奊liè,劽liè,鬣liè,拎līn,邻lín,林lín,临lín,啉lín,崊lín,淋lín,晽lín,琳lín,粦lín,痳lín,碄lín,箖lín,粼lín,鄰lín,隣lín,嶙lín,潾lín,獜lín,遴lín,斴lín,暽lín,燐lín,璘lín,辚lín,霖lín,瞵lín,磷lín,繗lín,翷lín,麐lín,轔lín,壣lín,瀶lín,鏻lín,鳞lín,驎lín,麟lín,鱗lín,疄lín,蹸lín,魿lín,涁lín,臨lín,菻lǐn,亃lǐn,僯lǐn,凛lǐn,凜lǐn,撛lǐn,廩lǐn,廪lǐn,懍lǐn,懔lǐn,澟lǐn,檁lǐn,檩lǐn,伈lǐn,吝lìn,恡lìn,赁lìn,焛lìn,賃lìn,蔺lìn,橉lìn,甐lìn,膦lìn,閵lìn,藺lìn,躏lìn,躙lìn,躪lìn,轥lìn,悋lìn,伶líng,刢líng,灵líng,囹líng,坽líng,夌líng,姈líng,岺líng,彾líng,泠líng,狑líng,苓líng,昤líng,柃líng,玲líng,瓴líng,凌líng,皊líng,砱líng,秢líng,竛líng,铃líng,陵líng,鸰líng,婈líng,崚líng,掕líng,棂líng,淩líng,琌líng,笭líng,紷líng,绫líng,羚líng,翎líng,聆líng,舲líng,菱líng,蛉líng,衑líng,祾líng,詅líng,跉líng,蓤líng,裬líng,鈴líng,閝líng,零líng,龄líng,綾líng,蔆líng,霊líng,駖líng,澪líng,蕶líng,錂líng,霗líng,鲮líng,鴒líng,鹷líng,燯líng,霛líng,霝líng,齢líng,瀮líng,酃líng,鯪líng,孁líng,蘦líng,齡líng,櫺líng,靈líng,欞líng,爧líng,麢líng,龗líng,阾líng,袊líng,靇líng,朎líng,軨líng,醽líng,岭lǐng,领lǐng,領lǐng,嶺lǐng,令lìng,另lìng,呤lìng,炩lìng,溜liū,熘liū,澑liū,蹓liū,刘liú,沠liú,畄liú,浏liú,流liú,留liú,旈liú,琉liú,畱liú,硫liú,裗liú,媹liú,嵧liú,旒liú,蓅liú,遛liú,馏liú,骝liú,榴liú,瑠liú,飗liú,劉liú,瑬liú,瘤liú,磂liú,镏liú,駠liú,鹠liú,橊liú,璢liú,疁liú,癅liú,駵liú,嚠liú,懰liú,瀏liú,藰liú,鎏liú,鎦liú,餾liú,麍liú,鐂liú,騮liú,飅liú,鰡liú,鶹liú,驑liú,蒥liú,飀liú,柳liǔ,栁liǔ,桞liǔ,珋liǔ,桺liǔ,绺liǔ,锍liǔ,綹liǔ,熮liǔ,罶liǔ,鋶liǔ,橮liǔ,羀liǔ,嬼liǔ,畂liù,六liù,翏liù,塯liù,廇liù,磟liù,鹨liù,霤liù,雡liù,鬸liù,鷚liù,飂liù,囖lō,谾lóng,龙lóng,屸lóng,咙lóng,泷lóng,茏lóng,昽lóng,栊lóng,珑lóng,胧lóng,眬lóng,砻lóng,笼lóng,聋lóng,隆lóng,湰lóng,嶐lóng,槞lóng,漋lóng,蕯lóng,癃lóng,窿lóng,篭lóng,龍lóng,巃lóng,巄lóng,瀧lóng,蘢lóng,鏧lóng,霳lóng,曨lóng,櫳lóng,爖lóng,瓏lóng,矓lóng,礱lóng,礲lóng,襱lóng,籠lóng,聾lóng,蠪lóng,蠬lóng,龓lóng,豅lóng,躘lóng,鑨lóng,驡lóng,鸗lóng,滝lóng,嚨lóng,朧lǒng,陇lǒng,垄lǒng,垅lǒng,儱lǒng,隴lǒng,壟lǒng,壠lǒng,攏lǒng,竉lǒng,徿lǒng,拢lǒng,梇lòng,衖lòng,贚lòng,喽lou,嘍lou,窶lóu,娄lóu,婁lóu,溇lóu,蒌lóu,楼lóu,廔lóu,慺lóu,蔞lóu,遱lóu,樓lóu,熡lóu,耧lóu,蝼lóu,艛lóu,螻lóu,謱lóu,軁lóu,髅lóu,鞻lóu,髏lóu,漊lóu,屚lóu,膢lóu,耬lóu,嵝lǒu,搂lǒu,塿lǒu,嶁lǒu,摟lǒu,甊lǒu,篓lǒu,簍lǒu,陋lòu,漏lòu,瘘lòu,镂lòu,瘺lòu,鏤lòu,氌lu,氇lu,噜lū,撸lū,嚕lū,擼lū,卢lú,芦lú,垆lú,枦lú,泸lú,炉lú,栌lú,胪lú,轳lú,舮lú,鸬lú,玈lú,舻lú,颅lú,鈩lú,鲈lú,魲lú,盧lú,嚧lú,壚lú,廬lú,攎lú,瀘lú,獹lú,蘆lú,櫨lú,爐lú,瓐lú,臚lú,矑lú,纑lú,罏lú,艫lú,蠦lú,轤lú,鑪lú,顱lú,髗lú,鱸lú,鸕lú,黸lú,鹵lú,塷lú,庐lú,籚lú,卤lǔ,虏lǔ,挔lǔ,捛lǔ,掳lǔ,硵lǔ,鲁lǔ,虜lǔ,滷lǔ,蓾lǔ,樐lǔ,澛lǔ,魯lǔ,擄lǔ,橹lǔ,磠lǔ,镥lǔ,櫓lǔ,艣lǔ,鏀lǔ,艪lǔ,鐪lǔ,鑥lǔ,瀂lǔ,露lù,圥lù,甪lù,陆lù,侓lù,坴lù,彔lù,录lù,峍lù,勎lù,赂lù,辂lù,陸lù,娽lù,淕lù,淥lù,渌lù,硉lù,菉lù,逯lù,鹿lù,椂lù,琭lù,祿lù,剹lù,勠lù,盝lù,睩lù,碌lù,稑lù,賂lù,路lù,輅lù,塶lù,廘lù,摝lù,漉lù,箓lù,粶lù,蔍lù,戮lù,膟lù,觮lù,趢lù,踛lù,辘lù,醁lù,潞lù,穋lù,錄lù,録lù,錴lù,璐lù,簏lù,螰lù,鴼lù,簶lù,蹗lù,轆lù,騄lù,鹭lù,簬lù,簵lù,鯥lù,鵦lù,鵱lù,麓lù,鏴lù,騼lù,籙lù,虂lù,鷺lù,緑lù,攄lù,禄lù,蕗lù,娈luán,孪luán,峦luán,挛luán,栾luán,鸾luán,脔luán,滦luán,銮luán,鵉luán,奱luán,孿luán,巒luán,曫luán,欒luán,灓luán,羉luán,臠luán,圞luán,灤luán,虊luán,鑾luán,癴luán,癵luán,鸞luán,圝luán,卵luǎn,乱luàn,釠luàn,亂luàn,乿luàn,掠luě,稤luě,略luè,畧luè,锊luè,圙luè,鋝luè,鋢luè,剠luè,擽luè,抡lún,掄lún,仑lún,伦lún,囵lún,沦lún,纶lún,轮lún,倫lún,陯lún,圇lún,婨lún,崘lún,崙lún,惀lún,淪lún,菕lún,棆lún,腀lún,碖lún,綸lún,蜦lún,踚lún,輪lún,磮lún,鯩lún,耣lún,稐lǔn,埨lǔn,侖lùn,溣lùn,論lùn,论lùn,頱luō,囉luō,啰luō,罗luó,猡luó,脶luó,萝luó,逻luó,椤luó,腡luó,锣luó,箩luó,骡luó,镙luó,螺luó,羅luó,覶luó,鏍luó,儸luó,覼luó,騾luó,蘿luó,邏luó,欏luó,鸁luó,鑼luó,饠luó,驘luó,攞luó,籮luó,剆luǒ,倮luǒ,砢luǒ,蓏luǒ,裸luǒ,躶luǒ,瘰luǒ,蠃luǒ,臝luǒ,曪luǒ,癳luǒ,茖luò,蛒luò,硦luò,泺luò,峈luò,洛luò,络luò,荦luò,骆luò,洜luò,珞luò,笿luò,絡luò,落luò,摞luò,漯luò,犖luò,雒luò,鮥luò,鵅luò,濼luò,纙luò,挼luò,跞luò,駱luò,瞜lǘ,瘻lǘ,驴lǘ,闾lǘ,榈lǘ,馿lǘ,氀lǘ,櫚lǘ,藘lǘ,曥lǘ,鷜lǘ,驢lǘ,閭lǘ,偻lǚ,僂lǚ,吕lǚ,呂lǚ,侣lǚ,郘lǚ,侶lǚ,旅lǚ,梠lǚ,焒lǚ,祣lǚ,稆lǚ,铝lǚ,屡lǚ,絽lǚ,缕lǚ,屢lǚ,膂lǚ,膐lǚ,褛lǚ,鋁lǚ,履lǚ,褸lǚ,儢lǚ,縷lǚ,穭lǚ,捋lǚ,穞lǚ,寠lǜ,滤lǜ,濾lǜ,寽lǜ,垏lǜ,律lǜ,虑lǜ,率lǜ,绿lǜ,嵂lǜ,氯lǜ,葎lǜ,綠lǜ,慮lǜ,箻lǜ,勴lǜ,繂lǜ,櫖lǜ,爈lǜ,鑢lǜ,卛lǜ,亇ma,吗ma,嗎ma,嘛ma,妈mā,媽mā,痲mā,孖mā,麻má,嫲má,蔴má,犘má,蟆má,蟇má,尛má,马mǎ,犸mǎ,玛mǎ,码mǎ,蚂mǎ,馬mǎ,溤mǎ,獁mǎ,遤mǎ,瑪mǎ,碼mǎ,螞mǎ,鷌mǎ,鰢mǎ,傌mǎ,榪mǎ,鎷mǎ,杩mà,祃mà,閁mà,骂mà,睰mà,嘜mà,禡mà,罵mà,駡mà,礣mà,鬕mà,貍mái,埋mái,霾mái,买mǎi,荬mǎi,買mǎi,嘪mǎi,蕒mǎi,鷶mǎi,唛mài,劢mài,佅mài,売mài,麦mài,卖mài,脈mài,麥mài,衇mài,勱mài,賣mài,邁mài,霡mài,霢mài,迈mài,颟mān,顢mān,姏mán,悗mán,蛮mán,慲mán,摱mán,馒mán,槾mán,樠mán,瞒mán,瞞mán,鞔mán,饅mán,鳗mán,鬗mán,鬘mán,蠻mán,矕mán,僈mán,屘mǎn,満mǎn,睌mǎn,满mǎn,滿mǎn,螨mǎn,襔mǎn,蟎mǎn,鏋mǎn,曼màn,谩màn,墁màn,幔màn,慢màn,漫màn,獌màn,缦màn,蔄màn,蔓màn,熳màn,澷màn,镘màn,縵màn,蟃màn,鏝màn,蘰màn,鰻màn,謾màn,牤māng,朚máng,龒máng,邙máng,吂máng,忙máng,汒máng,芒máng,尨máng,杗máng,杧máng,盲máng,厖máng,恾máng,笀máng,茫máng,哤máng,娏máng,浝máng,狵máng,牻máng,硭máng,釯máng,铓máng,痝máng,鋩máng,駹máng,蘉máng,氓máng,甿máng,庬máng,鹲máng,鸏máng,莽mǎng,茻mǎng,壾mǎng,漭mǎng,蟒mǎng,蠎mǎng,莾mǎng,匁mangmi,猫māo,貓māo,毛máo,矛máo,枆máo,牦máo,茅máo,旄máo,渵máo,軞máo,酕máo,堥máo,锚máo,緢máo,髦máo,髳máo,錨máo,蟊máo,鶜máo,茆máo,罞máo,鉾máo,冇mǎo,戼mǎo,峁mǎo,泖mǎo,昴mǎo,铆mǎo,笷mǎo,蓩mǎo,鉚mǎo,卯mǎo,秏mào,冃mào,皃mào,芼mào,冐mào,茂mào,冒mào,贸mào,耄mào,袤mào,覒mào,媢mào,帽mào,貿mào,鄚mào,愗mào,暓mào,楙mào,毷mào,瑁mào,貌mào,鄮mào,蝐mào,懋mào,霿mào,獏mào,毣mào,萺mào,瞀mào,唜mas,么me,嚜me,麼me,麽me,庅mē,嚒mē,孭mē,濹mè,嚰mè,沒méi,没méi,枚méi,玫méi,苺méi,栂méi,眉méi,脄méi,莓méi,梅méi,珻méi,脢méi,郿méi,堳méi,媒méi,嵋méi,湄méi,湈méi,睂méi,葿méi,楣méi,楳méi,煤méi,瑂méi,禖méi,腜méi,塺méi,槑méi,酶méi,镅méi,鹛méi,鋂méi,霉méi,徾méi,鎇méi,矀méi,攗méi,蘪méi,鶥méi,攟méi,黴méi,坆méi,猸méi,羙měi,毎měi,每měi,凂měi,美měi,挴měi,浼měi,媄měi,渼měi,媺měi,镁měi,嬍měi,燘měi,躾měi,鎂měi,黣měi,嵄měi,眊mèi,妹mèi,抺mèi,沬mèi,昧mèi,祙mèi,袂mèi,眛mèi,媚mèi,寐mèi,痗mèi,跊mèi,鬽mèi,煝mèi,睸mèi,魅mèi,篃mèi,蝞mèi,櫗mèi,氼mèi,们men,們men,椚mēn,门mén,扪mén,钔mén,門mén,閅mén,捫mén,菛mén,璊mén,穈mén,鍆mén,虋mén,怋mén,玣mén,殙mèn,闷mèn,焖mèn,悶mèn,暪mèn,燜mèn,懑mèn,懣mèn,掹mēng,擝mēng,懞mēng,虻méng,冡méng,莔méng,萌méng,萠méng,盟méng,甍méng,儚méng,橗méng,瞢méng,蕄méng,蝱méng,鄳méng,鄸méng,幪méng,濛méng,獴méng,曚méng,朦méng,檬méng,氋méng,礞méng,鯍méng,艨méng,矒méng,靀méng,饛méng,顭méng,蒙méng,鼆méng,夣méng,懜méng,溕méng,矇měng,勐měng,猛měng,锰měng,艋měng,蜢měng,錳měng,懵měng,蠓měng,鯭měng,黽měng,瓾měng,夢mèng,孟mèng,梦mèng,霥mèng,踎meo,咪mī,瞇mī,眯mī,冞mí,弥mí,祢mí,迷mí,袮mí,猕mí,谜mí,蒾mí,詸mí,謎mí,醚mí,彌mí,糜mí,縻mí,麊mí,麋mí,禰mí,靡mí,獼mí,麛mí,爢mí,瓕mí,蘼mí,镾mí,醾mí,醿mí,鸍mí,釄mí,檷mí,籋mí,罙mí,擟mí,米mǐ,羋mǐ,芈mǐ,侎mǐ,沵mǐ,弭mǐ,洣mǐ,敉mǐ,粎mǐ,脒mǐ,葞mǐ,蝆mǐ,蔝mǐ,銤mǐ,瀰mǐ,孊mǐ,灖mǐ,渳mǐ,哋mì,汨mì,沕mì,宓mì,泌mì,觅mì,峚mì,宻mì,秘mì,密mì,淧mì,覓mì,覔mì,幂mì,谧mì,塓mì,幎mì,覛mì,嘧mì,榓mì,漞mì,熐mì,蔤mì,蜜mì,鼏mì,冪mì,樒mì,幦mì,濗mì,藌mì,謐mì,櫁mì,簚mì,羃mì,鑖mì,蓂mì,滵mì,芇mián,眠mián,婂mián,绵mián,媔mián,棉mián,綿mián,緜mián,蝒mián,嬵mián,檰mián,櫋mián,矈mián,矊mián,蠠mián,矏mián,厸miǎn,丏miǎn,汅miǎn,免miǎn,沔miǎn,黾miǎn,俛miǎn,勉miǎn,眄miǎn,娩miǎn,偭miǎn,冕miǎn,勔miǎn,喕miǎn,愐miǎn,湎miǎn,缅miǎn,葂miǎn,腼miǎn,緬miǎn,鮸miǎn,渑miǎn,澠miǎn,靦miǎn,靣miàn,面miàn,糆miàn,麪miàn,麫miàn,麺miàn,麵miàn,喵miāo,苗miáo,媌miáo,瞄miáo,鹋miáo,嫹miáo,鶓miáo,鱙miáo,描miáo,訬miǎo,仯miǎo,杪miǎo,眇miǎo,秒miǎo,淼miǎo,渺miǎo,缈miǎo,篎miǎo,緲miǎo,藐miǎo,邈miǎo,妙miào,庙miào,竗miào,庿miào,廟miào,吀miē,咩miē,哶miē,灭miè,搣miè,滅miè,薎miè,幭miè,懱miè,篾miè,蠛miè,衊miè,鱴miè,蔑miè,民mín,垊mín,姄mín,岷mín,旻mín,旼mín,玟mín,苠mín,珉mín,盿mín,冧mín,罠mín,崏mín,捪mín,琘mín,琝mín,暋mín,瑉mín,痻mín,碈mín,鈱mín,賯mín,錉mín,鍲mín,缗mín,湏mǐn,緍mǐn,緡mǐn,皿mǐn,冺mǐn,刡mǐn,闵mǐn,抿mǐn,泯mǐn,勄mǐn,敃mǐn,闽mǐn,悯mǐn,敏mǐn,笢mǐn,笽mǐn,湣mǐn,閔mǐn,愍mǐn,敯mǐn,閩mǐn,慜mǐn,憫mǐn,潣mǐn,簢mǐn,鳘mǐn,鰵mǐn,僶mǐn,名míng,明míng,鸣míng,洺míng,眀míng,茗míng,冥míng,朙míng,眳míng,铭míng,鄍míng,嫇míng,溟míng,猽míng,暝míng,榠míng,銘míng,鳴míng,瞑míng,螟míng,覭míng,佲mǐng,凕mǐng,慏mǐng,酩mǐng,姳mǐng,命mìng,掵mìng,詺mìng,谬miù,缪miù,繆miù,謬miù,摸mō,嚤mō,嬤mó,嬷mó,戂mó,攠mó,谟mó,嫫mó,馍mó,摹mó,模mó,膜mó,摩mó,魹mó,橅mó,磨mó,糢mó,謨mó,謩mó,擵mó,饃mó,蘑mó,髍mó,魔mó,劘mó,饝mó,嚩mó,懡mǒ,麿mǒ,狢mò,貈mò,貉mò,脉mò,瀎mò,抹mò,末mò,劰mò,圽mò,妺mò,怽mò,歿mò,殁mò,沫mò,茉mò,陌mò,帞mò,昩mò,枺mò,皌mò,眜mò,眿mò,砞mò,秣mò,莈mò,眽mò,粖mò,絈mò,蛨mò,貃mò,嗼mò,塻mò,寞mò,漠mò,蓦mò,貊mò,銆mò,墨mò,嫼mò,暯mò,瘼mò,瞐mò,瞙mò,镆mò,魩mò,黙mò,縸mò,默mò,貘mò,藦mò,蟔mò,鏌mò,爅mò,礳mò,纆mò,耱mò,艒mò,莫mò,驀mò,乮mol,哞mōu,呣móu,蛑móu,蝥móu,牟móu,侔móu,劺móu,恈móu,洠móu,眸móu,谋móu,謀móu,鍪móu,鴾móu,麰móu,鞪móu,某mǒu,呒mú,嘸mú,毪mú,氁mú,母mǔ,亩mǔ,牡mǔ,姆mǔ,拇mǔ,牳mǔ,畆mǔ,畒mǔ,胟mǔ,畝mǔ,畞mǔ,砪mǔ,畮mǔ,鉧mǔ,踇mǔ,坶mǔ,峔mǔ,朷mù,木mù,仫mù,目mù,凩mù,沐mù,狇mù,炑mù,牧mù,苜mù,莯mù,蚞mù,钼mù,募mù,雮mù,墓mù,幕mù,慔mù,楘mù,睦mù,鉬mù,慕mù,暮mù,樢mù,霂mù,穆mù,幙mù,旀myeo,椧myeong,秅ná,拏ná,拿ná,挐ná,誽ná,镎ná,鎿ná,乸ná,詉ná,蒘ná,訤ná,哪nǎ,雫nǎ,郍nǎ,那nà,吶nà,妠nà,纳nà,肭nà,娜nà,钠nà,納nà,袦nà,捺nà,笝nà,豽nà,軜nà,鈉nà,嗱nà,蒳nà,靹nà,魶nà,呐nà,內nà,篛nà,衲nà,腉nái,熋nái,摨nái,孻nái,螚nái,搱nái,乃nǎi,奶nǎi,艿nǎi,氖nǎi,疓nǎi,妳nǎi,廼nǎi,迺nǎi,倷nǎi,釢nǎi,奈nài,柰nài,萘nài,渿nài,鼐nài,褦nài,錼nài,耐nài,囡nān,男nán,抩nán,枏nán,枬nán,侽nán,南nán,柟nán,娚nán,畘nán,莮nán,难nán,喃nán,遖nán,暔nán,楠nán,煵nán,諵nán,難nán,萳nán,嫨nǎn,赧nǎn,揇nǎn,湳nǎn,腩nǎn,戁nǎn,蝻nǎn,婻nàn,囔nāng,涳náng,乪náng,嚢náng,囊náng,蠰náng,鬞náng,馕náng,欜náng,饢náng,搑náng,崀nǎng,擃nǎng,曩nǎng,攮nǎng,灢nǎng,瀼nǎng,儾nàng,齉nàng,孬nāo,檂nāo,巙náo,呶náo,怓náo,挠náo,峱náo,硇náo,铙náo,猱náo,蛲náo,碙náo,撓náo,獶náo,蟯náo,夒náo,譊náo,鐃náo,巎náo,獿náo,憹náo,蝚náo,嶩náo,垴nǎo,恼nǎo,悩nǎo,脑nǎo,匘nǎo,脳nǎo,堖nǎo,惱nǎo,嫐nǎo,瑙nǎo,腦nǎo,碯nǎo,闹nào,婥nào,淖nào,閙nào,鬧nào,臑nào,呢ne,讷nè,抐nè,眲nè,訥nè,娞něi,馁něi,腇něi,餒něi,鮾něi,鯘něi,浽něi,内nèi,氝nèi,焾nem,嫩nèn,媆nèn,嫰nèn,竜néng,能néng,莻neus,鈪ngag,銰ngai,啱ngam,妮nī,尼ní,坭ní,怩ní,泥ní,籾ní,倪ní,屔ní,秜ní,郳ní,铌ní,埿ní,婗ní,猊ní,蚭ní,棿ní,跜ní,鈮ní,蜺ní,觬ní,貎ní,霓ní,鲵ní,鯢ní,麑ní,齯ní,臡ní,抳ní,蛪ní,腝ní,淣ní,聻nǐ,濔nǐ,伱nǐ,你nǐ,拟nǐ,狔nǐ,苨nǐ,柅nǐ,旎nǐ,晲nǐ,孴nǐ,鉨nǐ,馜nǐ,隬nǐ,擬nǐ,薿nǐ,鑈nǐ,儞nǐ,伲nì,迡nì,昵nì,胒nì,逆nì,匿nì,痆nì,眤nì,堄nì,惄nì,嫟nì,愵nì,溺nì,睨nì,腻nì,暱nì,縌nì,膩nì,嬺nì,灄nì,孨nì,拈niān,蔫niān,年nián,秊nián,哖nián,秥nián,鮎nián,鲶nián,鵇nián,黏nián,鯰nián,姩nián,鲇nián,跈niǎn,涊niǎn,捻niǎn,淰niǎn,辇niǎn,撚niǎn,撵niǎn,碾niǎn,輦niǎn,簐niǎn,攆niǎn,蹨niǎn,躎niǎn,辗niǎn,輾niǎn,卄niàn,廿niàn,念niàn,埝niàn,艌niàn,娘niáng,嬢niáng,醸niáng,酿niàng,釀niàng,茮niǎo,尦niǎo,鸟niǎo,袅niǎo,鳥niǎo,嫋niǎo,裊niǎo,蔦niǎo,嬝niǎo,褭niǎo,嬲niǎo,茑niǎo,尿niào,脲niào,捏niē,揑niē,乜niè,帇niè,圼niè,苶niè,枿niè,陧niè,涅niè,聂niè,臬niè,啮niè,惗niè,菍niè,隉niè,喦niè,敜niè,嗫niè,嵲niè,踂niè,摰niè,槷niè,踗niè,踙niè,镊niè,镍niè,嶭niè,篞niè,臲niè,錜niè,颞niè,蹑niè,嚙niè,聶niè,鎳niè,闑niè,孼niè,孽niè,櫱niè,蘖niè,囁niè,齧niè,巕niè,糱niè,糵niè,蠥niè,囓niè,躡niè,鑷niè,顳niè,諗niè,囐niè,銸niè,鋷niè,讘niè,脌nīn,囜nín,您nín,恁nín,拰nǐn,宁níng,咛níng,狞níng,柠níng,聍níng,寍níng,寕níng,寜níng,寧níng,儜níng,凝níng,嚀níng,嬣níng,獰níng,薴níng,檸níng,聹níng,鑏níng,鬡níng,鸋níng,甯níng,濘níng,鬤níng,拧nǐng,擰nǐng,矃nǐng,橣nǐng,佞nìng,侫nìng,泞nìng,寗nìng,澝nìng,妞niū,牛niú,牜niú,忸niǔ,扭niǔ,沑niǔ,狃niǔ,纽niǔ,杻niǔ,炄niǔ,钮niǔ,紐niǔ,莥niǔ,鈕niǔ,靵niǔ,拗niù,莀nóng,农nóng,侬nóng,哝nóng,浓nóng,脓nóng,秾nóng,儂nóng,辳nóng,噥nóng,濃nóng,蕽nóng,禯nóng,膿nóng,穠nóng,襛nóng,醲nóng,欁nóng,癑nóng,農nóng,繷nǒng,廾nòng,弄nòng,挊nòng,挵nòng,齈nòng,羺nóu,譨nóu,啂nǒu,槈nòu,耨nòu,獳nòu,檽nòu,鎒nòu,鐞nòu,譳nòu,嬬nòu,奴nú,驽nú,笯nú,駑nú,砮nú,孥nú,伮nǔ,努nǔ,弩nǔ,胬nǔ,怒nù,傉nù,搙nù,奻nuán,渜nuán,暖nuǎn,煗nuǎn,餪nuǎn,疟nuè,虐nuè,瘧nuè,硸nuè,黁nun,燶nung,挪nuó,梛nuó,傩nuó,搻nuó,儺nuó,橠nuó,袲nuǒ,诺nuò,喏nuò,掿nuò,逽nuò,搦nuò,锘nuò,榒nuò,稬nuò,諾nuò,蹃nuò,糑nuò,懦nuò,懧nuò,糥nuò,穤nuò,糯nuò,堧nuò,耎nuò,愞nuò,女nǚ,钕nǚ,籹nǚ,釹nǚ,衂nǜ,恧nǜ,朒nǜ,衄nǜ,筽o,噢ō,哦ò,夞oes,乯ol,鞰on,吽ōu,讴ōu,欧ōu,殴ōu,瓯ōu,鸥ōu,塸ōu,歐ōu,毆ōu,熰ōu,甌ōu,膒ōu,鴎ōu,櫙ōu,藲ōu,謳ōu,鏂ōu,鷗ōu,沤ōu,蓲ōu,敺ōu,醧ōu,漚ōu,齵óu,澫ǒu,吘ǒu,呕ǒu,偶ǒu,腢ǒu,嘔ǒu,耦ǒu,蕅ǒu,藕ǒu,怄òu,慪òu,妑pā,趴pā,舥pā,啪pā,葩pā,帊pā,杷pá,爬pá,耙pá,掱pá,琶pá,筢pá,潖pá,跁pá,帕pà,怕pà,袙pà,拍pāi,俳pái,徘pái,排pái,猅pái,牌pái,輫pái,簰pái,犤pái,哌pài,派pài,蒎pài,鎃pài,湃pài,磗pak,眅pān,畨pān,潘pān,攀pān,膰pán,爿pán,柈pán,盘pán,媻pán,幋pán,蒰pán,槃pán,盤pán,磐pán,縏pán,蹒pán,瀊pán,蟠pán,蹣pán,鎜pán,鞶pán,踫pán,宷pán,洀pán,闆pǎn,坢pǎn,盻pǎn,眫pàn,冸pàn,判pàn,沜pàn,泮pàn,叛pàn,牉pàn,盼pàn,畔pàn,袢pàn,詊pàn,溿pàn,頖pàn,鋬pàn,鵥pàn,襻pàn,鑻pàn,炍pàn,乓pāng,汸pāng,沗pāng,肨pāng,胮pāng,雱pāng,滂pāng,膖pāng,霶pāng,磅páng,趽páng,彷páng,夆páng,厐páng,庞páng,逄páng,旁páng,舽páng,篣páng,螃páng,鳑páng,龐páng,鰟páng,蠭páng,髈páng,龎páng,耪pǎng,覫pǎng,炐pàng,胖pàng,抛pāo,拋pāo,脬pāo,刨páo,咆páo,垉páo,庖páo,狍páo,炰páo,爮páo,袍páo,匏páo,軳páo,鞄páo,褜páo,麅páo,颮páo,跑pǎo,窌pào,炮pào,奅pào,泡pào,皰pào,砲pào,萢pào,麭pào,礟pào,礮pào,犥pào,疱pào,妚pēi,呸pēi,怌pēi,肧pēi,胚pēi,衃pēi,醅pēi,抷pēi,阫péi,陪péi,陫péi,培péi,毰péi,赔péi,锫péi,裴péi,裵péi,賠péi,錇péi,駍péi,婄péi,俖pěi,茷pèi,攈pèi,伂pèi,沛pèi,佩pèi,帔pèi,姵pèi,旆pèi,浿pèi,珮pèi,配pèi,笩pèi,蓜pèi,辔pèi,馷pèi,嶏pèi,霈pèi,轡pèi,斾pèi,喷pēn,噴pēn,濆pēn,歕pēn,衯pén,瓫pén,盆pén,湓pén,葐pén,呠pěn,翸pěn,匉pēng,怦pēng,抨pēng,泙pēng,恲pēng,胓pēng,砰pēng,烹pēng,硑pēng,軯pēng,閛pēng,漰pēng,嘭pēng,磞pēng,弸pēng,荓pēng,軿pēng,輧pēng,梈pēng,芃péng,朋péng,竼péng,倗péng,莑péng,堋péng,彭péng,棚péng,椖péng,塜péng,塳péng,漨péng,硼péng,稝péng,蓬péng,鹏péng,槰péng,樥péng,憉péng,澎péng,輣péng,篷péng,膨péng,韸péng,髼péng,蟚péng,蟛péng,鬅péng,纄péng,韼péng,鵬péng,鬔péng,鑝péng,淜péng,熢péng,摓pěng,捧pěng,淎pěng,皏pěng,剻pěng,掽pèng,椪pèng,碰pèng,浌peol,巼phas,闏phdeng,乶phoi,喸phos,榌pi,伓pī,伾pī,批pī,纰pī,邳pī,坯pī,披pī,炋pī,狉pī,狓pī,砒pī,秛pī,秠pī,紕pī,耚pī,豾pī,釽pī,鉟pī,銔pī,劈pī,磇pī,駓pī,噼pī,錃pī,魾pī,憵pī,礔pī,礕pī,霹pī,鲏pī,鮍pī,丕pī,髬pī,铍pí,鈹pí,皮pí,阰pí,芘pí,岯pí,枇pí,毞pí,毗pí,毘pí,疲pí,蚍pí,郫pí,陴pí,啤pí,埤pí,蚽pí,豼pí,焷pí,脾pí,腗pí,罴pí,膍pí,蜱pí,隦pí,壀pí,篺pí,螷pí,貔pí,簲pí,羆pí,鵧pí,朇pí,鼙pí,蠯pí,猈pí,琵pí,匹pǐ,庀pǐ,仳pǐ,圮pǐ,苉pǐ,脴pǐ,痞pǐ,銢pǐ,鴄pǐ,噽pǐ,癖pǐ,嚭pǐ,顖pǐ,擗pǐ,辟pì,鈲pì,闢pì,屁pì,淠pì,渒pì,揊pì,媲pì,嫓pì,睤pì,睥pì,潎pì,僻pì,澼pì,嚊pì,甓pì,疈pì,譬pì,鷿pì,囨piān,偏piān,媥piān,犏piān,篇piān,翩piān,骈pián,胼pián,楄pián,楩pián,賆pián,諚pián,骿pián,蹁pián,駢pián,騈pián,徧pián,腁pián,覑piǎn,谝piǎn,貵piǎn,諞piǎn,片piàn,骗piàn,魸piàn,騗piàn,騙piàn,剽piāo,彯piāo,漂piāo,缥piāo,飘piāo,磦piāo,旚piāo,縹piāo,翲piāo,螵piāo,飄piāo,魒piāo,薸piáo,闝piáo,嫖piáo,瓢piáo,莩piǎo,殍piǎo,瞟piǎo,醥piǎo,皫piǎo,顠piǎo,飃piào,票piào,勡piào,嘌piào,慓piào,覕piē,氕piē,撆piē,暼piē,瞥piē,撇piě,丿piě,苤piě,鐅piě,嫳piè,拚pīn,姘pīn,拼pīn,礗pīn,穦pīn,馪pīn,驞pīn,贫pín,貧pín,嫔pín,频pín,頻pín,嬪pín,薲pín,嚬pín,矉pín,颦pín,顰pín,蘋pín,玭pín,品pǐn,榀pǐn,朩pìn,牝pìn,汖pìn,聘pìn,娉pīng,乒pīng,甹pīng,俜pīng,涄pīng,砯pīng,艵pīng,竮pīng,頩pīng,冖píng,平píng,评píng,凭píng,坪píng,岼píng,苹píng,郱píng,屏píng,帡píng,枰píng,洴píng,玶píng,娦píng,瓶píng,屛píng,帲píng,萍píng,蚲píng,塀píng,幈píng,焩píng,甁píng,缾píng,聠píng,蓱píng,蛢píng,評píng,鲆píng,凴píng,慿píng,憑píng,鮃píng,簈píng,呯píng,箳píng,鏺po,钋pō,坡pō,岥pō,泼pō,釙pō,颇pō,溌pō,酦pō,潑pō,醱pō,頗pō,攴pō,巿pó,婆pó,嘙pó,鄱pó,皤pó,謈pó,櫇pó,叵pǒ,尀pǒ,钷pǒ,笸pǒ,鉕pǒ,駊pǒ,屰pò,廹pò,岶pò,迫pò,敀pò,昢pò,洦pò,珀pò,烞pò,破pò,砶pò,粕pò,奤pò,蒪pò,魄pò,皛pò,頮pōu,剖pōu,颒pōu,抙pōu,捊pōu,抔póu,掊póu,裒póu,咅pǒu,哣pǒu,犃pǒu,兺ppun,哛ppun,巬pu,巭pu,扑pū,炇pū,痡pū,駇pū,噗pū,撲pū,鋪pū,潽pū,襆pú,脯pú,蜅pú,仆pú,圤pú,匍pú,莆pú,菩pú,菐pú,葡pú,蒱pú,蒲pú,僕pú,酺pú,墣pú,璞pú,瞨pú,穙pú,镤pú,贌pú,纀pú,鏷pú,襥pú,濮pú,朴pǔ,圃pǔ,埔pǔ,浦pǔ,烳pǔ,普pǔ,圑pǔ,溥pǔ,暜pǔ,谱pǔ,樸pǔ,氆pǔ,諩pǔ,檏pǔ,镨pǔ,譜pǔ,蹼pǔ,鐠pǔ,铺pù,舖pù,舗pù,曝pù,七qī,沏qī,妻qī,恓qī,柒qī,倛qī,凄qī,栖qī,桤qī,缼qī,郪qī,娸qī,戚qī,捿qī,桼qī,淒qī,萋qī,朞qī,期qī,棲qī,欺qī,紪qī,褄qī,僛qī,嘁qī,慽qī,榿qī,漆qī,緀qī,磎qī,諆qī,諿qī,霋qī,蹊qī,魌qī,鏚qī,鶈qī,碕qī,螇qī,傶qī,迉qī,軙qí,荎qí,饑qí,亓qí,祁qí,齐qí,圻qí,岐qí,岓qí,忯qí,芪qí,亝qí,其qí,奇qí,斉qí,歧qí,祇qí,祈qí,肵qí,疧qí,竒qí,剘qí,斊qí,旂qí,脐qí,蚑qí,蚔qí,蚚qí,颀qí,埼qí,崎qí,掑qí,淇qí,渏qí,猉qí,畦qí,萁qí,跂qí,軝qí,釮qí,骐qí,骑qí,嵜qí,棊qí,棋qí,琦qí,琪qí,祺qí,蛴qí,愭qí,碁qí,鬿qí,旗qí,粸qí,綥qí,綦qí,綨qí,緕qí,蜝qí,蜞qí,齊qí,禥qí,蕲qí,螧qí,鲯qí,濝qí,藄qí,檱qí,櫀qí,簱qí,臍qí,騎qí,騏qí,鳍qí,蘄qí,鵸qí,鶀qí,麒qí,籏qí,纃qí,艩qí,蠐qí,鬐qí,騹qí,魕qí,鰭qí,玂qí,麡qí,荠qí,薺qí,扺qí,耆qí,鯕qí,袳qǐ,乞qǐ,邔qǐ,企qǐ,屺qǐ,岂qǐ,芑qǐ,启qǐ,呇qǐ,杞qǐ,玘qǐ,盀qǐ,唘qǐ,豈qǐ,起qǐ,啓qǐ,啔qǐ,啟qǐ,绮qǐ,棨qǐ,綮qǐ,綺qǐ,諬qǐ,簯qǐ,闙qǐ,梩qǐ,婍qǐ,鼜qì,悽qì,槭qì,气qì,讫qì,気qì,汔qì,迄qì,弃qì,汽qì,芞qì,呮qì,泣qì,炁qì,盵qì,咠qì,契qì,砌qì,栔qì,氣qì,訖qì,唭qì,夡qì,棄qì,湆qì,湇qì,葺qì,碛qì,摖qì,暣qì,甈qì,碶qì,噐qì,憇qì,器qì,憩qì,磜qì,磧qì,磩qì,罊qì,趞qì,洓qì,慼qì,欫qì,掐qiā,葜qiā,愘qiā,搳qiā,拤qiá,跒qiǎ,酠qiǎ,鞐qiǎ,圶qià,冾qià,恰qià,洽qià,殎qià,硈qià,髂qià,磍qià,帢qià,千qiān,仟qiān,阡qiān,圱qiān,圲qiān,奷qiān,扦qiān,汘qiān,芊qiān,迁qiān,佥qiān,岍qiān,杄qiān,汧qiān,茾qiān,竏qiān,臤qiān,钎qiān,拪qiān,牵qiān,粁qiān,悭qiān,蚈qiān,铅qiān,牽qiān,釺qiān,谦qiān,鈆qiān,僉qiān,愆qiān,签qiān,鉛qiān,骞qiān,鹐qiān,慳qiān,搴qiān,撁qiān,箞qiān,諐qiān,遷qiān,褰qiān,謙qiān,顅qiān,檶qiān,攐qiān,攑qiān,櫏qiān,簽qiān,鵮qiān,攓qiān,騫qiān,鬜qiān,鬝qiān,籤qiān,韆qiān,鋟qiān,扡qiān,杴qiān,孅qiān,藖qiān,谸qiān,鏲qiān,朁qián,岒qián,忴qián,扲qián,拑qián,前qián,荨qián,钤qián,歬qián,虔qián,钱qián,钳qián,乾qián,掮qián,軡qián,媊qián,鈐qián,鉗qián,榩qián,箝qián,潜qián,羬qián,橬qián,錢qián,黔qián,鎆qián,騝qián,濳qián,騚qián,灊qián,籖qián,鰬qián,潛qián,蚙qián,煔qián,燂qián,葴qián,鍼qián,墘qián,浅qiǎn,肷qiǎn,淺qiǎn,嵰qiǎn,遣qiǎn,槏qiǎn,膁qiǎn,蜸qiǎn,谴qiǎn,缱qiǎn,譴qiǎn,鑓qiǎn,繾qiǎn,欠qiàn,刋qiàn,伣qiàn,芡qiàn,俔qiàn,茜qiàn,倩qiàn,悓qiàn,堑qiàn,嵌qiàn,棈qiàn,椠qiàn,嗛qiàn,皘qiàn,蒨qiàn,塹qiàn,歉qiàn,綪qiàn,蔳qiàn,儙qiàn,槧qiàn,篏qiàn,輤qiàn,篟qiàn,壍qiàn,嬱qiàn,縴qiàn,廞qiàn,鸧qiāng,鶬qiāng,羌qiāng,戕qiāng,戗qiāng,斨qiāng,枪qiāng,玱qiāng,猐qiāng,琷qiāng,跄qiāng,嗴qiāng,獇qiāng,腔qiāng,溬qiāng,蜣qiāng,锖qiāng,嶈qiāng,戧qiāng,槍qiāng,牄qiāng,瑲qiāng,锵qiāng,篬qiāng,錆qiāng,蹌qiāng,镪qiāng,蹡qiāng,鏘qiāng,鏹qiāng,啌qiāng,鎗qiāng,強qiáng,强qiáng,墙qiáng,嫱qiáng,蔷qiáng,樯qiáng,漒qiáng,墻qiáng,嬙qiáng,廧qiáng,薔qiáng,檣qiáng,牆qiáng,謒qiáng,艢qiáng,蘠qiáng,抢qiǎng,羟qiǎng,搶qiǎng,羥qiǎng,墏qiǎng,摤qiǎng,繈qiǎng,襁qiǎng,繦qiǎng,嗆qiàng,炝qiàng,唴qiàng,羻qiàng,呛qiàng,熗qiàng,悄qiāo,硗qiāo,郻qiāo,跷qiāo,鄡qiāo,鄥qiāo,劁qiāo,敲qiāo,踍qiāo,锹qiāo,碻qiāo,頝qiāo,墽qiāo,幧qiāo,橇qiāo,燆qiāo,缲qiāo,鍫qiāo,鍬qiāo,繰qiāo,趬qiāo,鐰qiāo,鞽qiāo,塙qiāo,毃qiāo,鏒qiāo,橾qiāo,喿qiāo,蹺qiāo,峤qiáo,嶠qiáo,乔qiáo,侨qiáo,荍qiáo,荞qiáo,桥qiáo,硚qiáo,菬qiáo,喬qiáo,睄qiáo,僑qiáo,槗qiáo,谯qiáo,嘺qiáo,憔qiáo,蕎qiáo,鞒qiáo,樵qiáo,橋qiáo,犞qiáo,癄qiáo,瞧qiáo,礄qiáo,藮qiáo,譙qiáo,鐈qiáo,墧qiáo,顦qiáo,磽qiǎo,巧qiǎo,愀qiǎo,髜qiǎo,偢qiào,墝qiào,俏qiào,诮qiào,陗qiào,峭qiào,帩qiào,窍qiào,翘qiào,誚qiào,髚qiào,僺qiào,撬qiào,鞘qiào,韒qiào,竅qiào,翹qiào,鞩qiào,躈qiào,踃qiào,切qiē,苆qiē,癿qié,茄qié,聺qié,且qiě,詧qiè,慊qiè,厒qiè,怯qiè,匧qiè,窃qiè,倿qiè,悏qiè,挈qiè,惬qiè,笡qiè,愜qiè,朅qiè,箧qiè,緁qiè,锲qiè,篋qiè,踥qiè,穕qiè,藒qiè,鍥qiè,鯜qiè,鐑qiè,竊qiè,籡qiè,帹qiè,郄qiè,郤qiè,稧qiè,妾qiè,亲qīn,侵qīn,钦qīn,衾qīn,菳qīn,媇qīn,嵚qīn,綅qīn,誛qīn,嶔qīn,親qīn,顉qīn,駸qīn,鮼qīn,寴qīn,欽qīn,骎qīn,鈂qín,庈qín,芩qín,芹qín,埁qín,珡qín,矝qín,秦qín,耹qín,菦qín,捦qín,琴qín,琹qín,禽qín,鈙qín,雂qín,勤qín,嗪qín,嫀qín,靲qín,噙qín,擒qín,鳹qín,懄qín,檎qín,澿qín,瘽qín,螓qín,懃qín,蠄qín,鬵qín,溱qín,坅qǐn,昑qǐn,笉qǐn,梫qǐn,赾qǐn,寑qǐn,锓qǐn,寝qǐn,寢qǐn,螼qǐn,儭qìn,櫬qìn,吢qìn,吣qìn,抋qìn,沁qìn,唚qìn,菣qìn,搇qìn,撳qìn,瀙qìn,藽qìn,鈊qìn,揿qìn,鶄qīng,青qīng,氢qīng,轻qīng,倾qīng,卿qīng,郬qīng,圊qīng,埥qīng,氫qīng,淸qīng,清qīng,軽qīng,傾qīng,廎qīng,蜻qīng,輕qīng,鲭qīng,鯖qīng,鑋qīng,庼qīng,漀qīng,靘qīng,夝qíng,甠qíng,勍qíng,情qíng,硘qíng,晴qíng,棾qíng,氰qíng,暒qíng,樈qíng,擎qíng,檠qíng,黥qíng,殑qíng,苘qǐng,顷qǐng,请qǐng,頃qǐng,請qǐng,檾qǐng,謦qǐng,庆qìng,摐chuāng,牀chuáng,磢chuǎng,刱chuàng,吹chuī,糚zhuāng,庒zhuāng,漴zhuàng,丬zhuàng,壮zhuàng,凊qìng,掅qìng,碃qìng,箐qìng,慶qìng,磬qìng,罄qìng,櫦qìng,濪qìng,藭qiong,跫qióng,銎qióng,卭qióng,邛qióng,穷qióng,穹qióng,茕qióng,桏qióng,笻qióng,筇qióng,赹qióng,惸qióng,焪qióng,焭qióng,琼qióng,蛩qióng,蛬qióng,煢qióng,熍qióng,睘qióng,窮qióng,儝qióng,憌qióng,橩qióng,瓊qióng,竆qióng,嬛qióng,琁qióng,藑qióng,湫qiū,丘qiū,丠qiū,邱qiū,坵qiū,恘qiū,秋qiū,秌qiū,寈qiū,蚯qiū,媝qiū,楸qiū,鹙qiū,篍qiū,緧qiū,蝵qiū,穐qiū,趥qiū,鳅qiū,蟗qiū,鞦qiū,鞧qiū,蘒qiū,鰌qiū,鰍qiū,鱃qiū,龝qiū,逎qiū,櫹qiū,鶖qiū,叴qiú,囚qiú,扏qiú,犰qiú,玌qiú,肍qiú,求qiú,虬qiú,泅qiú,虯qiú,俅qiú,觓qiú,訅qiú,酋qiú,唒qiú,浗qiú,紌qiú,莍qiú,逑qiú,釚qiú,梂qiú,殏qiú,毬qiú,球qiú,釻qiú,崷qiú,巯qiú,湭qiú,皳qiú,盚qiú,遒qiú,煪qiú,絿qiú,蛷qiú,裘qiú,巰qiú,觩qiú,賕qiú,璆qiú,銶qiú,醔qiú,鮂qiú,鼽qiú,鯄qiú,鵭qiú,蠤qiú,鰽qiú,厹qiú,赇qiú,搝qiǔ,糗qiǔ,趍qū,匚qū,区qū,伹qū,匤qū,岖qū,诎qū,阹qū,驱qū,屈qū,岨qū,岴qū,抾qū,浀qū,祛qū,胠qū,袪qū,區qū,蛆qū,躯qū,筁qū,粬qū,蛐qū,詘qū,趋qū,嶇qū,駆qū,憈qū,駈qū,麹qū,髷qū,趨qū,麯qū,軀qū,麴qū,黢qū,驅qū,鰸qū,鱋qū,紶qū,厺qū,佉qū,跼qú,瞿qú,佢qú,劬qú,斪qú,朐qú,胊qú,菃qú,衐qú,鸲qú,淭qú,渠qú,絇qú,葋qú,蕖qú,璖qú,磲qú,璩qú,鼩qú,蘧qú,灈qú,戵qú,欋qú,氍qú,臞qú,癯qú,蠷qú,衢qú,躣qú,蠼qú,鑺qú,臒qú,蟝qú,曲qǔ,取qǔ,娶qǔ,詓qǔ,竬qǔ,龋qǔ,齲qǔ,去qù,刞qù,耝qù,阒qù,觑qù,趣qù,閴qù,麮qù,闃qù,覰qù,覷qù,鼁qù,覻qù,迲qù,峑quān,恮quān,悛quān,圈quān,駩quān,騡quān,鐉quān,腃quān,全quán,权quán,佺quán,诠quán,姾quán,泉quán,洤quán,荃quán,拳quán,辁quán,婘quán,痊quán,硂quán,铨quán,湶quán,犈quán,筌quán,絟quán,葲quán,搼quán,楾quán,瑔quán,觠quán,詮quán,跧quán,輇quán,蜷quán,銓quán,権quán,縓quán,醛quán,闎quán,鳈quán,鬈quán,巏quán,鰁quán,權quán,齤quán,颧quán,顴quán,灥quán,譔quán,牷quán,孉quán,犬quǎn,甽quǎn,畎quǎn,烇quǎn,绻quǎn,綣quǎn,虇quǎn,劝quàn,券quàn,巻quàn,牶quàn,椦quàn,勧quàn,勸quàn,炔quē,缺quē,蒛quē,瘸qué,却què,卻què,崅què,悫què,雀què,确què,阕què,皵què,碏què,阙què,鹊què,愨què,榷què,慤què,確què,燩què,闋què,闕què,鵲què,礭què,殻què,埆què,踆qūn,夋qūn,囷qūn,峮qūn,逡qūn,帬qún,裙qún,羣qún,群qún,裠qún,亽ra,罖ra,囕ram,呥rán,肰rán,衻rán,袇rán,蚦rán,袡rán,蚺rán,然rán,髥rán,嘫rán,髯rán,燃rán,繎rán,冄rán,冉rǎn,姌rǎn,苒rǎn,染rǎn,珃rǎn,媣rǎn,蒅rǎn,孃ráng,穣ráng,獽ráng,禳ráng,瓤ráng,穰ráng,躟ráng,壌rǎng,嚷rǎng,壤rǎng,攘rǎng,爙rǎng,让ràng,懹ràng,譲ràng,讓ràng,荛ráo,饶ráo,桡ráo,橈ráo,襓ráo,饒ráo,犪ráo,嬈ráo,娆ráo,扰rǎo,隢rǎo,擾rǎo,遶rǎo,绕rào,繞rào,惹rě,热rè,熱rè,渃rè,綛ren,人rén,仁rén,壬rén,忈rén,朲rén,忎rén,秂rén,芢rén,鈓rén,魜rén,銋rén,鵀rén,姙rén,忍rěn,荏rěn,栠rěn,栣rěn,荵rěn,秹rěn,稔rěn,躵rěn,刃rèn,刄rèn,认rèn,仞rèn,仭rèn,讱rèn,任rèn,屻rèn,扨rèn,纫rèn,妊rèn,牣rèn,纴rèn,肕rèn,轫rèn,韧rèn,饪rèn,紉rèn,衽rèn,紝rèn,訒rèn,軔rèn,梕rèn,袵rèn,絍rèn,靭rèn,靱rèn,韌rèn,飪rèn,認rèn,餁rèn,扔rēng,仍réng,辸réng,礽réng,芿réng,日rì,驲rì,囸rì,釰rì,鈤rì,馹rì,戎róng,肜róng,栄róng,狨róng,绒róng,茙róng,茸róng,荣róng,容róng,峵róng,毧róng,烿róng,嵘róng,絨róng,羢róng,嫆róng,搈róng,摉róng,榵róng,溶róng,蓉róng,榕róng,榮róng,熔róng,瑢róng,穁róng,蝾róng,褣róng,镕róng,氄róng,縙róng,融róng,螎róng,駥róng,嬫róng,嶸róng,爃róng,鎔róng,瀜róng,蠑róng,媶róng,曧róng,冗rǒng,宂rǒng,傇rǒng,穃ròng,禸róu,柔róu,粈róu,媃róu,揉róu,渘róu,葇róu,瑈róu,腬róu,糅róu,蹂róu,輮róu,鍒róu,鞣róu,瓇róu,騥róu,鰇róu,鶔róu,楺rǒu,煣rǒu,韖rǒu,肉ròu,宍ròu,嶿rū,如rú,侞rú,帤rú,茹rú,桇rú,袽rú,铷rú,渪rú,筎rú,銣rú,蕠rú,儒rú,鴑rú,嚅rú,孺rú,濡rú,薷rú,鴽rú,曘rú,燸rú,襦rú,蠕rú,颥rú,醹rú,顬rú,偄rú,鱬rú,汝rǔ,肗rǔ,乳rǔ,辱rǔ,鄏rǔ,擩rǔ,入rù,扖rù,込rù,杁rù,洳rù,嗕rù,媷rù,溽rù,缛rù,蓐rù,鳰rù,褥rù,縟rù,壖ruán,阮ruǎn,朊ruǎn,软ruǎn,軟ruǎn,碝ruǎn,緛ruǎn,蝡ruǎn,瓀ruǎn,礝ruǎn,瑌ruǎn,撋ruí,桵ruí,甤ruí,緌ruí,蕤ruí,蕊ruǐ,橤ruǐ,繠ruǐ,蘂ruǐ,蘃ruǐ,惢ruǐ,芮ruì,枘ruì,蚋ruì,锐ruì,瑞ruì,睿ruì,銳ruì,叡ruì,壡ruì,润rùn,閏rùn,閠rùn,潤rùn,橍rùn,闰rùn,叒ruò,若ruò,偌ruò,弱ruò,鄀ruò,焫ruò,楉ruò,嵶ruò,蒻ruò,箬ruò,爇ruò,鰙ruò,鰯ruò,鶸ruò,仨sā,桬sā,撒sā,洒sǎ,訯sǎ,靸sǎ,灑sǎ,卅sà,飒sà,脎sà,萨sà,隡sà,馺sà,颯sà,薩sà,櫒sà,栍saeng,毢sāi,塞sāi,毸sāi,腮sāi,嘥sāi,噻sāi,鳃sāi,顋sāi,鰓sāi,嗮sǎi,赛sài,僿sài,賽sài,簺sài,虄sal,厁san,壭san,三sān,弎sān,叁sān,毵sān,毶sān,毿sān,犙sān,鬖sān,糂sān,糝sān,糣sān,彡sān,氵sān,伞sǎn,傘sǎn,馓sǎn,橵sǎn,糤sǎn,繖sǎn,饊sǎn,散sàn,俕sàn,閐sàn,潵sàn,桒sāng,桑sāng,槡sāng,嗓sǎng,搡sǎng,褬sǎng,颡sǎng,鎟sǎng,顙sǎng,磉sǎng,丧sàng,喪sàng,掻sāo,搔sāo,溞sāo,骚sāo,缫sāo,繅sāo,鳋sāo,颾sāo,騒sāo,騷sāo,鰠sāo,鱢sāo,扫sǎo,掃sǎo,嫂sǎo,臊sào,埽sào,瘙sào,氉sào,矂sào,髞sào,色sè,涩sè,啬sè,渋sè,铯sè,歮sè,嗇sè,瑟sè,歰sè,銫sè,澁sè,懎sè,擌sè,濇sè,濏sè,瘷sè,穑sè,澀sè,璱sè,瀒sè,穡sè,繬sè,穯sè,轖sè,鏼sè,譅sè,飋sè,愬sè,鎍sè,溹sè,栜sè,裇sed,聓sei,森sēn,僧sēng,鬙sēng,閪seo,縇seon,杀shā,沙shā,纱shā,乷shā,刹shā,砂shā,唦shā,挱shā,殺shā,猀shā,紗shā,莎shā,铩shā,痧shā,硰shā,蔱shā,裟shā,樧shā,魦shā,鲨shā,閷shā,鯊shā,鯋shā,繺shā,賖shā,啥shá,傻shǎ,儍shǎ,繌shǎ,倽shà,唼shà,萐shà,歃shà,煞shà,翜shà,翣shà,閯shà,霎shà,厦shà,廈shà,筛shāi,篩shāi,簁shāi,簛shāi,酾shāi,釃shāi,摋shǎi,晒shài,曬shài,纔shān,穇shān,凵shān,襂shān,山shān,邖shān,圸shān,删shān,杉shān,杣shān,芟shān,姍shān,姗shān,衫shān,钐shān,埏shān,狦shān,珊shān,舢shān,痁shān,軕shān,笘shān,釤shān,閊shān,跚shān,剼shān,搧shān,嘇shān,幓shān,煽shān,潸shān,澘shān,曑shān,檆shān,膻shān,鯅shān,羴shān,羶shān,炶shān,苫shān,柵shān,栅shān,刪shān,闪shǎn,陕shǎn,陝shǎn,閃shǎn,晱shǎn,睒shǎn,熌shǎn,覢shǎn,曏shǎn,笧shàn,讪shàn,汕shàn,疝shàn,扇shàn,訕shàn,赸shàn,傓shàn,善shàn,椫shàn,銏shàn,骟shàn,僐shàn,鄯shàn,缮shàn,嬗shàn,擅shàn,敾shàn,樿shàn,膳shàn,磰shàn,謆shàn,赡shàn,繕shàn,蟮shàn,譱shàn,贍shàn,鐥shàn,饍shàn,騸shàn,鳝shàn,灗shàn,鱔shàn,鱣shàn,墡shàn,裳shang,塲shāng,伤shāng,殇shāng,商shāng,觞shāng,傷shāng,墒shāng,慯shāng,滳shāng,蔏shāng,殤shāng,熵shāng,螪shāng,觴shāng,謪shāng,鬺shāng,坰shǎng,垧shǎng,晌shǎng,赏shǎng,賞shǎng,鑜shǎng,丄shàng,上shàng,仩shàng,尚shàng,恦shàng,绱shàng,緔shàng,弰shāo,捎shāo,梢shāo,烧shāo,焼shāo,稍shāo,筲shāo,艄shāo,蛸shāo,輎shāo,蕱shāo,燒shāo,髾shāo,鮹shāo,娋shāo,旓shāo,杓sháo,勺sháo,芍sháo,柖sháo,玿sháo,韶sháo,少shǎo,劭shào,卲shào,邵shào,绍shào,哨shào,袑shào,紹shào,潲shào,奢shē,猞shē,赊shē,輋shē,賒shē,檨shē,畲shē,舌shé,佘shé,蛇shé,蛥shé,磼shé,折shé,舍shě,捨shě,厍shè,设shè,社shè,舎shè,厙shè,射shè,涉shè,涻shè,設shè,赦shè,弽shè,慑shè,摄shè,滠shè,慴shè,摵shè,蔎shè,韘shè,騇shè,懾shè,攝shè,麝shè,欇shè,挕shè,蠂shè,堔shen,叄shēn,糁shēn,申shēn,屾shēn,扟shēn,伸shēn,身shēn,侁shēn,呻shēn,妽shēn,籶shēn,绅shēn,诜shēn,柛shēn,氠shēn,珅shēn,穼shēn,籸shēn,娠shēn,峷shēn,甡shēn,眒shēn,砷shēn,深shēn,紳shēn,兟shēn,椮shēn,葠shēn,裑shēn,訷shēn,罧shēn,蓡shēn,詵shēn,甧shēn,蔘shēn,燊shēn,薓shēn,駪shēn,鲹shēn,鯓shēn,鵢shēn,鯵shēn,鰺shēn,莘shēn,叅shēn,神shén,榊shén,鰰shén,棯shěn,槮shěn,邥shěn,弞shěn,沈shěn,审shěn,矤shěn,矧shěn,谂shěn,谉shěn,婶shěn,渖shěn,訠shěn,審shěn,頣shěn,魫shěn,曋shěn,瞫shěn,嬸shěn,覾shěn,讅shěn,哂shěn,肾shèn,侺shèn,昚shèn,甚shèn,胂shèn,眘shèn,渗shèn,祳shèn,脤shèn,腎shèn,愼shèn,慎shèn,瘆shèn,蜃shèn,滲shèn,鋠shèn,瘮shèn,葚shèn,升shēng,生shēng,阩shēng,呏shēng,声shēng,斘shēng,昇shēng,枡shēng,泩shēng,苼shēng,殅shēng,牲shēng,珄shēng,竔shēng,陞shēng,曻shēng,陹shēng,笙shēng,湦shēng,焺shēng,甥shēng,鉎shēng,聲shēng,鍟shēng,鵿shēng,鼪shēng,绳shéng,縄shéng,憴shéng,繩shéng,譝shéng,省shěng,眚shěng,偗shěng,渻shěng,胜shèng,圣shèng,晟shèng,晠shèng,剰shèng,盛shèng,剩shèng,勝shèng,貹shèng,嵊shèng,聖shèng,墭shèng,榺shèng,蕂shèng,橳shèng,賸shèng,鳾shi,觢shi,尸shī,师shī,呞shī,虱shī,诗shī,邿shī,鸤shī,屍shī,施shī,浉shī,狮shī,師shī,絁shī,湤shī,湿shī,葹shī,溮shī,溼shī,獅shī,蒒shī,蓍shī,詩shī,瑡shī,鳲shī,蝨shī,鲺shī,濕shī,鍦shī,鯴shī,鰤shī,鶳shī,襹shī,籭shī,魳shī,失shī,褷shī,匙shí,十shí,什shí,石shí,辻shí,佦shí,时shí,竍shí,识shí,实shí,実shí,旹shí,飠shí,峕shí,拾shí,炻shí,祏shí,蚀shí,食shí,埘shí,寔shí,湜shí,遈shí,塒shí,嵵shí,溡shí,鉐shí,實shí,榯shí,蝕shí,鉽shí,篒shí,鲥shí,鮖shí,鼫shí,識shí,鼭shí,鰣shí,時shí,史shǐ,矢shǐ,乨shǐ,豕shǐ,使shǐ,始shǐ,驶shǐ,兘shǐ,屎shǐ,榁shǐ,鉂shǐ,駛shǐ,笶shǐ,饣shì,莳shì,蒔shì,士shì,氏shì,礻shì,世shì,丗shì,仕shì,市shì,示shì,卋shì,式shì,事shì,侍shì,势shì,呩shì,视shì,试shì,饰shì,冟shì,室shì,恀shì,恃shì,拭shì,枾shì,柿shì,眂shì,贳shì,适shì,栻shì,烒shì,眎shì,眡shì,舐shì,轼shì,逝shì,铈shì,視shì,釈shì,弑shì,揓shì,谥shì,貰shì,释shì,勢shì,嗜shì,弒shì,煶shì,睗shì,筮shì,試shì,軾shì,鈰shì,鉃shì,飾shì,舓shì,誓shì,適shì,奭shì,噬shì,嬕shì,澨shì,諡shì,遾shì,螫shì,簭shì,籂shì,襫shì,釋shì,鰘shì,佀shì,鎩shì,是shì,収shōu,收shōu,手shǒu,守shǒu,垨shǒu,首shǒu,艏shǒu,醻shòu,寿shòu,受shòu,狩shòu,兽shòu,售shòu,授shòu,绶shòu,痩shòu,膄shòu,壽shòu,瘦shòu,綬shòu,夀shòu,獣shòu,獸shòu,鏉shòu,书shū,殳shū,抒shū,纾shū,叔shū,枢shū,姝shū,柕shū,倏shū,倐shū,書shū,殊shū,紓shū,掓shū,梳shū,淑shū,焂shū,菽shū,軗shū,鄃shū,疎shū,疏shū,舒shū,摅shū,毹shū,毺shū,綀shū,输shū,踈shū,樞shū,蔬shū,輸shū,鮛shū,瀭shū,鵨shū,陎shū,尗shú,秫shú,婌shú,孰shú,赎shú,塾shú,熟shú,璹shú,贖shú,暑shǔ,黍shǔ,署shǔ,鼠shǔ,鼡shǔ,蜀shǔ,潻shǔ,薯shǔ,曙shǔ,癙shǔ,糬shǔ,籔shǔ,蠴shǔ,鱰shǔ,属shǔ,屬shǔ,鱪shǔ,丨shù,术shù,戍shù,束shù,沭shù,述shù,怷shù,树shù,竖shù,荗shù,恕shù,庶shù,庻shù,絉shù,蒁shù,術shù,裋shù,数shù,竪shù,腧shù,墅shù,漱shù,潄shù,數shù,豎shù,樹shù,濖shù,錰shù,鏣shù,鶐shù,虪shù,捒shù,忄shù,澍shù,刷shuā,唰shuā,耍shuǎ,誜shuà,缞shuāi,縗shuāi,衰shuāi,摔shuāi,甩shuǎi,帅shuài,帥shuài,蟀shuài,闩shuān,拴shuān,閂shuān,栓shuān,涮shuàn,腨shuàn,双shuāng,脽shuí,誰shuí,水shuǐ,氺shuǐ,閖shuǐ,帨shuì,涗shuì,涚shuì,稅shuì,税shuì,裞shuì,説shuì,睡shuì,吮shǔn,顺shùn,舜shùn,順shùn,蕣shùn,橓shùn,瞚shùn,瞤shùn,瞬shùn,鬊shùn,说shuō,說shuō,妁shuò,烁shuò,朔shuò,铄shuò,欶shuò,硕shuò,矟shuò,搠shuò,蒴shuò,槊shuò,碩shuò,爍shuò,鑠shuò,洬shuò,燿shuò,鎙shuò,愢sī,厶sī,丝sī,司sī,糹sī,私sī,咝sī,泀sī,俬sī,思sī,恖sī,鸶sī,媤sī,斯sī,絲sī,缌sī,蛳sī,楒sī,禗sī,鉰sī,飔sī,凘sī,厮sī,榹sī,禠sī,罳sī,锶sī,嘶sī,噝sī,廝sī,撕sī,澌sī,緦sī,蕬sī,螄sī,鍶sī,蟖sī,蟴sī,颸sī,騦sī,鐁sī,鷥sī,鼶sī,鷉sī,銯sī,死sǐ,灬sì,巳sì,亖sì,四sì,罒sì,寺sì,汜sì,伺sì,似sì,姒sì,泤sì,祀sì,価sì,孠sì,泗sì,饲sì,驷sì,俟sì,娰sì,柶sì,牭sì,洍sì,涘sì,肂sì,飤sì,笥sì,耜sì,釲sì,竢sì,覗sì,嗣sì,肆sì,貄sì,鈻sì,飼sì,禩sì,駟sì,儩sì,瀃sì,兕sì,蕼sì,螦so,乺sol,忪sōng,松sōng,枀sōng,枩sōng,娀sōng,柗sōng,倯sōng,凇sōng,梥sōng,崧sōng,庺sōng,淞sōng,菘sōng,嵩sōng,硹sōng,蜙sōng,憽sōng,檧sōng,濍sōng,怂sǒng,悚sǒng,耸sǒng,竦sǒng,愯sǒng,嵷sǒng,慫sǒng,聳sǒng,駷sǒng,鬆sòng,讼sòng,宋sòng,诵sòng,送sòng,颂sòng,訟sòng,頌sòng,誦sòng,餸sòng,鎹sòng,凁sōu,捜sōu,鄋sōu,嗖sōu,廀sōu,廋sōu,搜sōu,溲sōu,獀sōu,蒐sōu,蓃sōu,馊sōu,飕sōu,摗sōu,锼sōu,螋sōu,醙sōu,鎪sōu,餿sōu,颼sōu,騪sōu,叜sōu,艘sōu,叟sǒu,傁sǒu,嗾sǒu,瞍sǒu,擞sǒu,薮sǒu,擻sǒu,藪sǒu,櫢sǒu,嗽sòu,瘶sòu,苏sū,甦sū,酥sū,稣sū,窣sū,穌sū,鯂sū,蘇sū,蘓sū,櫯sū,囌sū,卹sū,俗sú,玊sù,诉sù,泝sù,肃sù,涑sù,珟sù,素sù,速sù,殐sù,粛sù,骕sù,傃sù,粟sù,訴sù,谡sù,嗉sù,塐sù,塑sù,嫊sù,愫sù,溯sù,溸sù,肅sù,遡sù,鹔sù,僳sù,榡sù,蔌sù,觫sù,趚sù,遬sù,憟sù,樎sù,樕sù,潥sù,鋉sù,餗sù,縤sù,璛sù,簌sù,藗sù,謖sù,蹜sù,驌sù,鱐sù,鷫sù,埣sù,夙sù,膆sù,狻suān,痠suān,酸suān,匴suǎn,祘suàn,笇suàn,筭suàn,蒜suàn,算suàn,夊suī,芕suī,虽suī,倠suī,哸suī,荽suī,荾suī,眭suī,滖suī,睢suī,濉suī,鞖suī,雖suī,簑suī,绥suí,隋suí,随suí,遀suí,綏suí,隨suí,瓍suí,遂suí,瀡suǐ,髄suǐ,髓suǐ,亗suì,岁suì,砕suì,谇suì,歲suì,歳suì,煫suì,碎suì,隧suì,嬘suì,澻suì,穂suì,誶suì,賥suì,檖suì,燧suì,璲suì,禭suì,穗suì,穟suì,襚suì,邃suì,旞suì,繐suì,繸suì,鐆suì,鐩suì,祟suì,譢suì,孙sūn,狲sūn,荪sūn,孫sūn,飧sūn,搎sūn,猻sūn,蓀sūn,槂sūn,蕵sūn,薞sūn,畃sún,损sǔn,笋sǔn,隼sǔn,筍sǔn,損sǔn,榫sǔn,箰sǔn,鎨sǔn,巺sùn,潠sùn,嗍suō,唆suō,娑suō,莏suō,傞suō,桫suō,梭suō,睃suō,嗦suō,羧suō,蓑suō,摍suō,缩suō,趖suō,簔suō,縮suō,髿suō,鮻suō,挲suō,所suǒ,唢suǒ,索suǒ,琐suǒ,琑suǒ,锁suǒ,嗩suǒ,暛suǒ,溑suǒ,瑣suǒ,鎖suǒ,鎻suǒ,鏁suǒ,嵗suò,蜶suò,逤suò,侤ta,澾ta,她tā,他tā,它tā,祂tā,咜tā,趿tā,铊tā,塌tā,榙tā,溻tā,鉈tā,褟tā,遢tā,蹹tá,塔tǎ,墖tǎ,獭tǎ,鳎tǎ,獺tǎ,鰨tǎ,沓tà,挞tà,狧tà,闼tà,崉tà,涾tà,遝tà,阘tà,榻tà,毾tà,禢tà,撻tà,誻tà,踏tà,嚃tà,錔tà,嚺tà,濌tà,蹋tà,鞜tà,闒tà,鞳tà,闥tà,譶tà,躢tà,傝tà,襨tae,漦tāi,咍tāi,囼tāi,孡tāi,胎tāi,駘tāi,檯tāi,斄tái,台tái,邰tái,坮tái,苔tái,炱tái,炲tái,菭tái,跆tái,鲐tái,箈tái,臺tái,颱tái,儓tái,鮐tái,嬯tái,擡tái,薹tái,籉tái,抬tái,呔tǎi,忕tài,太tài,冭tài,夳tài,忲tài,汰tài,态tài,肽tài,钛tài,泰tài,粏tài,舦tài,酞tài,鈦tài,溙tài,燤tài,態tài,坍tān,贪tān,怹tān,啴tān,痑tān,舑tān,貪tān,摊tān,滩tān,嘽tān,潬tān,瘫tān,擹tān,攤tān,灘tān,癱tān,镡tán,蕁tán,坛tán,昙tán,谈tán,郯tán,婒tán,覃tán,榃tán,痰tán,锬tán,谭tán,墵tán,憛tán,潭tán,談tán,壇tán,曇tán,錟tán,檀tán,顃tán,罈tán,藫tán,壜tán,譚tán,貚tán,醰tán,譠tán,罎tán,鷤tán,埮tán,鐔tán,墰tán,忐tǎn,坦tǎn,袒tǎn,钽tǎn,菼tǎn,毯tǎn,鉭tǎn,嗿tǎn,憳tǎn,憻tǎn,醓tǎn,璮tǎn,襢tǎn,緂tǎn,暺tǎn,叹tàn,炭tàn,探tàn,湠tàn,僋tàn,嘆tàn,碳tàn,舕tàn,歎tàn,汤tāng,铴tāng,湯tāng,嘡tāng,劏tāng,羰tāng,蝪tāng,薚tāng,蹚tāng,鐋tāng,鞺tāng,闛tāng,耥tāng,鼞tāng,镗táng,鏜táng,饧táng,坣táng,唐táng,堂táng,傏táng,啺táng,棠táng,鄌táng,塘táng,搪táng,溏táng,蓎táng,隚táng,榶táng,漟táng,煻táng,瑭táng,禟táng,膅táng,樘táng,磄táng,糃táng,膛táng,橖táng,篖táng,糖táng,螗táng,踼táng,糛táng,赯táng,醣táng,餳táng,鎕táng,餹táng,饄táng,鶶táng,螳táng,攩tǎng,伖tǎng,帑tǎng,倘tǎng,淌tǎng,傥tǎng,躺tǎng,镋tǎng,鎲tǎng,儻tǎng,戃tǎng,曭tǎng,爣tǎng,矘tǎng,钂tǎng,烫tàng,摥tàng,趟tàng,燙tàng,漡tàng,焘tāo,轁tāo,涭tāo,仐tāo,弢tāo,绦tāo,掏tāo,絛tāo,詜tāo,嫍tāo,幍tāo,慆tāo,搯tāo,滔tāo,槄tāo,瑫tāo,韬tāo,飸tāo,縚tāo,縧tāo,濤tāo,謟tāo,鞱tāo,韜tāo,饕tāo,饀tāo,燾tāo,涛tāo,迯táo,咷táo,洮táo,逃táo,桃táo,陶táo,啕táo,梼táo,淘táo,萄táo,祹táo,裪táo,綯táo,蜪táo,鞀táo,醄táo,鞉táo,鋾táo,駣táo,檮táo,騊táo,鼗táo,绹táo,讨tǎo,討tǎo,套tào,畓tap,忑tè,特tè,貣tè,脦tè,犆tè,铽tè,慝tè,鋱tè,蟘tè,螣tè,鰧teng,膯tēng,鼟tēng,疼téng,痋téng,幐téng,腾téng,誊téng,漛téng,滕téng,邆téng,縢téng,駦téng,謄téng,儯téng,藤téng,騰téng,籐téng,籘téng,虅téng,驣téng,霯tèng,唞teo,朰teul,剔tī,梯tī,锑tī,踢tī,銻tī,鷈tī,鵜tī,躰tī,骵tī,軆tī,擿tī,姼tí,褆tí,扌tí,虒tí,磃tí,绨tí,偍tí,啼tí,媞tí,崹tí,惿tí,提tí,稊tí,缇tí,罤tí,遆tí,鹈tí,嗁tí,瑅tí,綈tí,徲tí,漽tí,緹tí,蕛tí,蝭tí,题tí,趧tí,蹄tí,醍tí,謕tí,鍗tí,題tí,鮷tí,騠tí,鯷tí,鶗tí,鶙tí,穉tí,厗tí,鳀tí,徥tǐ,体tǐ,挮tǐ,體tǐ,衹tǐ,戻tì,屉tì,剃tì,洟tì,倜tì,悌tì,涕tì,逖tì,屜tì,悐tì,惕tì,掦tì,逷tì,惖tì,替tì,裼tì,褅tì,歒tì,殢tì,髰tì,薙tì,嚏tì,鬀tì,嚔tì,瓋tì,籊tì,鐟tì,楴tì,天tiān,兲tiān,婖tiān,添tiān,酟tiān,靔tiān,黇tiān,靝tiān,呑tiān,瞋tián,田tián,屇tián,沺tián,恬tián,畋tián,畑tián,盷tián,胋tián,甛tián,甜tián,菾tián,湉tián,塡tián,填tián,搷tián,阗tián,碵tián,磌tián,窴tián,鴫tián,璳tián,闐tián,鷆tián,鷏tián,餂tián,寘tián,畠tián,鍩tiǎn,忝tiǎn,殄tiǎn,倎tiǎn,唺tiǎn,悿tiǎn,捵tiǎn,淟tiǎn,晪tiǎn,琠tiǎn,腆tiǎn,觍tiǎn,睓tiǎn,覥tiǎn,賟tiǎn,錪tiǎn,娗tiǎn,铦tiǎn,銛tiǎn,紾tiǎn,舔tiǎn,掭tiàn,瑱tiàn,睼tiàn,舚tiàn,旫tiāo,佻tiāo,庣tiāo,挑tiāo,祧tiāo,聎tiāo,苕tiáo,萔tiáo,芀tiáo,条tiáo,岧tiáo,岹tiáo,迢tiáo,祒tiáo,條tiáo,笤tiáo,蓚tiáo,蓨tiáo,龆tiáo,樤tiáo,蜩tiáo,鋚tiáo,髫tiáo,鲦tiáo,螩tiáo,鯈tiáo,鎥tiáo,齠tiáo,鰷tiáo,趒tiáo,銚tiáo,儵tiáo,鞗tiáo,宨tiǎo,晀tiǎo,朓tiǎo,脁tiǎo,窕tiǎo,窱tiǎo,眺tiào,粜tiào,覜tiào,跳tiào,頫tiào,糶tiào,怗tiē,贴tiē,萜tiē,聑tiē,貼tiē,帖tiē,蛈tiě,僣tiě,鴩tiě,鐵tiě,驖tiě,铁tiě,呫tiè,飻tiè,餮tiè,厅tīng,庁tīng,汀tīng,听tīng,耓tīng,厛tīng,烃tīng,烴tīng,綎tīng,鞓tīng,聴tīng,聼tīng,廰tīng,聽tīng,渟tīng,廳tīng,邒tíng,廷tíng,亭tíng,庭tíng,莛tíng,停tíng,婷tíng,嵉tíng,筳tíng,葶tíng,蜓tíng,楟tíng,榳tíng,閮tíng,霆tíng,聤tíng,蝏tíng,諪tíng,鼮tíng,珵tǐng,侱tǐng,圢tǐng,侹tǐng,挺tǐng,涏tǐng,梃tǐng,烶tǐng,珽tǐng,脡tǐng,颋tǐng,誔tǐng,頲tǐng,艇tǐng,乭tol,囲tōng,炵tōng,通tōng,痌tōng,嗵tōng,蓪tōng,樋tōng,熥tōng,爞tóng,冂tóng,燑tóng,仝tóng,同tóng,佟tóng,彤tóng,峂tóng,庝tóng,哃tóng,狪tóng,茼tóng,晍tóng,桐tóng,浵tóng,砼tóng,蚒tóng,秱tóng,铜tóng,童tóng,粡tóng,赨tóng,酮tóng,鉖tóng,僮tóng,鉵tóng,銅tóng,餇tóng,鲖tóng,潼tóng,獞tóng,曈tóng,朣tóng,橦tóng,氃tóng,犝tóng,膧tóng,瞳tóng,穜tóng,鮦tóng,眮tóng,统tǒng,捅tǒng,桶tǒng,筒tǒng,綂tǒng,統tǒng,恸tòng,痛tòng,慟tòng,憅tòng,偷tōu,偸tōu,鍮tōu,头tóu,投tóu,骰tóu,緰tóu,頭tóu,钭tǒu,妵tǒu,紏tǒu,敨tǒu,斢tǒu,黈tǒu,蘣tǒu,埱tòu,透tòu,綉tòu,宊tū,瑹tū,凸tū,禿tū,秃tū,突tū,涋tū,捸tū,堗tū,湥tū,痜tū,葖tū,嶀tū,鋵tū,鵚tū,鼵tū,唋tū,図tú,图tú,凃tú,峹tú,庩tú,徒tú,捈tú,涂tú,荼tú,途tú,屠tú,梌tú,揬tú,稌tú,塗tú,嵞tú,瘏tú,筡tú,鈯tú,圖tú,圗tú,廜tú,潳tú,酴tú,馟tú,鍎tú,駼tú,鵌tú,鶟tú,鷋tú,鷵tú,兎tú,菟tú,蒤tú,土tǔ,圡tǔ,吐tǔ,汢tǔ,钍tǔ,釷tǔ,迌tù,兔tù,莵tù,堍tù,鵵tù,湍tuān,猯tuān,煓tuān,蓴tuán,团tuán,団tuán,抟tuán,剸tuán,團tuán,塼tuán,慱tuán,摶tuán,槫tuán,漙tuán,篿tuán,檲tuán,鏄tuán,糰tuán,鷒tuán,鷻tuán,嫥tuán,鱄tuán,圕tuǎn,疃tuǎn,畽tuǎn,彖tuàn,湪tuàn,褖tuàn,貒tuàn,忒tuī,推tuī,蓷tuī,藬tuī,焞tuī,騩tuí,墤tuí,颓tuí,隤tuí,尵tuí,頹tuí,頺tuí,魋tuí,穨tuí,蘈tuí,蹪tuí,僓tuí,頽tuí,俀tuǐ,脮tuǐ,腿tuǐ,蹆tuǐ,骽tuǐ,退tuì,娧tuì,煺tuì,蛻tuì,蜕tuì,褪tuì,駾tuì,噋tūn,汭tūn,吞tūn,旽tūn,啍tūn,朜tūn,暾tūn,黗tūn,屯tún,忳tún,芚tún,饨tún,豚tún,軘tún,飩tún,鲀tún,魨tún,霕tún,臀tún,臋tún,坉tún,豘tún,氽tǔn,舃tuō,乇tuō,讬tuō,托tuō,汑tuō,饦tuō,杔tuō,侂tuō,咃tuō,拕tuō,拖tuō,侻tuō,挩tuō,捝tuō,莌tuō,袥tuō,託tuō,涶tuō,脱tuō,飥tuō,馲tuō,魠tuō,驝tuō,棁tuō,脫tuō,鱓tuó,鋖tuó,牠tuó,驮tuó,佗tuó,陀tuó,陁tuó,坨tuó,岮tuó,沱tuó,驼tuó,柁tuó,砣tuó,砤tuó,袉tuó,鸵tuó,紽tuó,堶tuó,跎tuó,酡tuó,碢tuó,馱tuó,槖tuó,踻tuó,駞tuó,橐tuó,鮀tuó,鴕tuó,鼧tuó,騨tuó,鼍tuó,驒tuó,鼉tuó,迆tuó,駝tuó,軃tuǒ,妥tuǒ,毤tuǒ,庹tuǒ,椭tuǒ,楕tuǒ,鵎tuǒ,拓tuò,柝tuò,唾tuò,萚tuò,跅tuò,毻tuò,箨tuò,蘀tuò,籜tuò,哇wa,窐wā,劸wā,徍wā,挖wā,洼wā,娲wā,畖wā,窊wā,媧wā,嗗wā,蛙wā,搲wā,溛wā,漥wā,窪wā,鼃wā,攨wā,屲wā,姽wá,譁wá,娃wá,瓦wǎ,佤wǎ,邷wǎ,咓wǎ,瓲wǎ,砙wǎ,韎wà,帓wà,靺wà,袜wà,聉wà,嗢wà,腽wà,膃wà,韈wà,韤wà,襪wà,咼wāi,瀤wāi,歪wāi,喎wāi,竵wāi,崴wǎi,外wài,顡wài,関wān,闗wān,夘wān,乛wān,弯wān,剜wān,婠wān,帵wān,塆wān,湾wān,睕wān,蜿wān,潫wān,豌wān,彎wān,壪wān,灣wān,埦wān,捥wān,丸wán,刓wán,汍wán,纨wán,芄wán,完wán,岏wán,忨wán,玩wán,笂wán,紈wán,捖wán,顽wán,烷wán,琓wán,貦wán,頑wán,蚖wán,抏wán,邜wǎn,宛wǎn,倇wǎn,唍wǎn,挽wǎn,晚wǎn,盌wǎn,莞wǎn,婉wǎn,惋wǎn,晩wǎn,梚wǎn,绾wǎn,脘wǎn,菀wǎn,晼wǎn,椀wǎn,琬wǎn,皖wǎn,碗wǎn,綩wǎn,綰wǎn,輓wǎn,鋔wǎn,鍐wǎn,莬wǎn,惌wǎn,魭wǎn,夗wǎn,畹wǎn,輐wàn,鄤wàn,孯wàn,掔wàn,万wàn,卍wàn,卐wàn,妧wàn,杤wàn,腕wàn,萬wàn,翫wàn,鋄wàn,薍wàn,錽wàn,贃wàn,鎫wàn,贎wàn,脕wàn,尩wāng,尪wāng,尫wāng,汪wāng,瀇wāng,亡wáng,仼wáng,彺wáng,莣wáng,蚟wáng,王wáng,抂wǎng,网wǎng,忹wǎng,往wǎng,徃wǎng,枉wǎng,罔wǎng,惘wǎng,菵wǎng,暀wǎng,棢wǎng,焹wǎng,蛧wǎng,辋wǎng,網wǎng,蝄wǎng,誷wǎng,輞wǎng,魍wǎng,迬wǎng,琞wàng,妄wàng,忘wàng,迋wàng,旺wàng,盳wàng,望wàng,朢wàng,威wēi,烓wēi,偎wēi,逶wēi,隇wēi,隈wēi,喴wēi,媁wēi,媙wēi,愄wēi,揋wēi,揻wēi,渨wēi,煀wēi,葨wēi,葳wēi,微wēi,椳wēi,楲wēi,溦wēi,煨wēi,詴wēi,縅wēi,蝛wēi,覣wēi,嶶wēi,薇wēi,燰wēi,鳂wēi,癐wēi,鰃wēi,鰄wēi,嵔wēi,蜲wēi,危wēi,巍wēi,恑wéi,撝wéi,囗wéi,为wéi,韦wéi,围wéi,帏wéi,沩wéi,违wéi,闱wéi,峗wéi,峞wéi,洈wéi,為wéi,韋wéi,桅wéi,涠wéi,唯wéi,帷wéi,惟wéi,维wéi,喡wéi,圍wéi,嵬wéi,幃wéi,湋wéi,溈wéi,琟wéi,潍wéi,維wéi,蓶wéi,鄬wéi,潿wéi,醀wéi,濰wéi,鍏wéi,闈wéi,鮠wéi,癓wéi,覹wéi,犩wéi,霺wéi,僞wéi,寪wéi,觹wéi,觽wéi,觿wéi,欈wéi,違wéi,趡wěi,磈wěi,瓗wěi,膸wěi,撱wěi,鰖wěi,伟wěi,伪wěi,尾wěi,纬wěi,芛wěi,苇wěi,委wěi,炜wěi,玮wěi,洧wěi,娓wěi,捤wěi,浘wěi,诿wěi,偉wěi,偽wěi,崣wěi,梶wěi,硊wěi,萎wěi,隗wěi,骩wěi,廆wěi,徫wěi,愇wěi,猥wěi,葦wěi,蒍wěi,骪wěi,骫wěi,暐wěi,椲wěi,煒wěi,瑋wěi,痿wěi,腲wěi,艉wěi,韪wěi,碨wěi,鲔wěi,緯wěi,蔿wěi,諉wěi,踓wěi,韑wěi,頠wěi,薳wěi,儰wěi,濻wěi,鍡wěi,鮪wěi,壝wěi,韙wěi,颹wěi,瀢wěi,韡wěi,亹wěi,斖wěi,茟wěi,蜹wèi,爲wèi,卫wèi,未wèi,位wèi,味wèi,苿wèi,畏wèi,胃wèi,叞wèi,軎wèi,尉wèi,菋wèi,谓wèi,喂wèi,媦wèi,渭wèi,猬wèi,煟wèi,墛wèi,蔚wèi,慰wèi,熭wèi,犚wèi,磑wèi,緭wèi,蝟wèi,衛wèi,懀wèi,濊wèi,璏wèi,罻wèi,衞wèi,謂wèi,錗wèi,餧wèi,鮇wèi,螱wèi,褽wèi,餵wèi,魏wèi,藯wèi,鏏wèi,霨wèi,鳚wèi,蘶wèi,饖wèi,讆wèi,躗wèi,讏wèi,躛wèi,荱wèi,蜼wèi,硙wèi,轊wèi,昷wēn,塭wēn,温wēn,榅wēn,殟wēn,溫wēn,瑥wēn,辒wēn,榲wēn,瘟wēn,豱wēn,輼wēn,鳁wēn,鎾wēn,饂wēn,鰛wēn,鰮wēn,褞wēn,缊wēn,緼wēn,蕰wēn,縕wēn,薀wēn,藴wēn,鴖wén,亠wén,文wén,彣wén,纹wén,炆wén,砇wén,闻wén,紋wén,蚉wén,蚊wén,珳wén,阌wén,鈫wén,雯wén,瘒wén,聞wén,馼wén,魰wén,鳼wén,鴍wén,螡wén,閺wén,閿wén,蟁wén,闅wén,鼤wén,闦wén,芠wén,呅wěn,忞wěn,歾wěn,刎wěn,吻wěn,呚wěn,忟wěn,抆wěn,呡wěn,紊wěn,桽wěn,脗wěn,稳wěn,穏wěn,穩wěn,肳wěn,问wèn,妏wèn,汶wèn,問wèn,渂wèn,搵wèn,絻wèn,顐wèn,璺wèn,翁wēng,嗡wēng,鹟wēng,螉wēng,鎓wēng,鶲wēng,滃wēng,奣wěng,塕wěng,嵡wěng,蓊wěng,瞈wěng,聬wěng,暡wěng,瓮wèng,蕹wèng,甕wèng,罋wèng,齆wèng,堝wō,濄wō,薶wō,捼wō,挝wō,倭wō,涡wō,莴wō,唩wō,涹wō,渦wō,猧wō,萵wō,喔wō,窝wō,窩wō,蜗wō,撾wō,蝸wō,踒wō,涴wó,我wǒ,婐wǒ,婑wǒ,捰wǒ,龏wò,蒦wò,嚄wò,雘wò,艧wò,踠wò,仴wò,沃wò,肟wò,臥wò,偓wò,捾wò,媉wò,幄wò,握wò,渥wò,硪wò,楃wò,腛wò,斡wò,瞃wò,濣wò,瓁wò,龌wò,齷wò,枂wò,馧wò,卧wò,扝wū,乌wū,圬wū,弙wū,污wū,邬wū,呜wū,杇wū,巫wū,屋wū,洿wū,钨wū,烏wū,趶wū,剭wū,窏wū,釫wū,鄔wū,嗚wū,誈wū,誣wū,箼wū,螐wū,鴮wū,鎢wū,鰞wū,兀wū,杅wū,诬wū,幠wú,譕wú,蟱wú,墲wú,亾wú,兦wú,无wú,毋wú,吳wú,吴wú,吾wú,呉wú,芜wú,郚wú,娪wú,梧wú,洖wú,浯wú,茣wú,珸wú,祦wú,鹀wú,無wú,禑wú,蜈wú,蕪wú,璑wú,鵐wú,鯃wú,鼯wú,鷡wú,俉wú,憮wú,橆wú,铻wú,鋙wú,莁wú,陚wǔ,瞴wǔ,娒wǔ,乄wǔ,五wǔ,午wǔ,仵wǔ,伍wǔ,妩wǔ,庑wǔ,忤wǔ,怃wǔ,迕wǔ,旿wǔ,武wǔ,玝wǔ,侮wǔ,倵wǔ,捂wǔ,娬wǔ,牾wǔ,珷wǔ,摀wǔ,熓wǔ,碔wǔ,鹉wǔ,瑦wǔ,舞wǔ,嫵wǔ,廡wǔ,潕wǔ,錻wǔ,儛wǔ,甒wǔ,鵡wǔ,躌wǔ,逜wǔ,膴wǔ,啎wǔ,噁wù,雺wù,渞wù,揾wù,坞wù,塢wù,勿wù,务wù,戊wù,阢wù,伆wù,屼wù,扤wù,岉wù,杌wù,忢wù,物wù,矹wù,敄wù,误wù,務wù,悞wù,悟wù,悮wù,粅wù,晤wù,焐wù,婺wù,嵍wù,痦wù,隖wù,靰wù,骛wù,奦wù,嵨wù,溩wù,雾wù,寤wù,熃wù,誤wù,鹜wù,鋈wù,窹wù,鼿wù,霧wù,齀wù,騖wù,鶩wù,芴wù,霚wù,扱xī,糦xī,宩xī,獡xī,蜤xī,燍xī,夕xī,兮xī,汐xī,西xī,覀xī,吸xī,希xī,扸xī,卥xī,昔xī,析xī,矽xī,穸xī,肹xī,俙xī,徆xī,怸xī,郗xī,饻xī,唏xī,奚xī,屖xī,息xī,悕xī,晞xī,氥xī,浠xī,牺xī,狶xī,莃xī,唽xī,悉xī,惜xī,桸xī,欷xī,淅xī,渓xī,烯xī,焁xī,焈xī,琋xī,硒xī,菥xī,赥xī,釸xī,傒xī,惁xī,晰xī,晳xī,焟xī,犀xī,睎xī,稀xī,粞xī,翕xī,翖xī,舾xī,鄎xī,厀xī,嵠xī,徯xī,溪xī,煕xī,皙xī,蒠xī,锡xī,僖xī,榽xī,熄xī,熙xī,緆xī,蜥xī,豨xī,餏xī,嘻xī,噏xī,嬆xī,嬉xī,膝xī,餙xī,凞xī,樨xī,橀xī,歙xī,熹xī,熺xī,熻xī,窸xī,羲xī,螅xī,錫xī,燨xī,犠xī,瞦xī,礂xī,蟋xī,豀xī,豯xī,貕xī,繥xī,鯑xī,鵗xī,譆xī,鏭xī,隵xī,巇xī,曦xī,爔xī,犧xī,酅xī,鼷xī,蠵xī,鸂xī,鑴xī,憘xī,暿xī,鱚xī,咥xī,訢xī,娭xī,瘜xī,醯xī,雭xí,习xí,郋xí,席xí,習xí,袭xí,觋xí,媳xí,椺xí,蒵xí,蓆xí,嶍xí,漝xí,覡xí,趘xí,薂xí,檄xí,謵xí,鎴xí,霫xí,鳛xí,飁xí,騱xí,騽xí,襲xí,鰼xí,驨xí,隰xí,囍xǐ,杫xǐ,枲xǐ,洗xǐ,玺xǐ,徙xǐ,铣xǐ,喜xǐ,葈xǐ,葸xǐ,鈢xǐ,屣xǐ,漇xǐ,蓰xǐ,銑xǐ,憙xǐ,橲xǐ,禧xǐ,諰xǐ,壐xǐ,縰xǐ,謑xǐ,蟢xǐ,蹝xǐ,璽xǐ,躧xǐ,鉩xǐ,欪xì,钑xì,鈒xì,匸xì,卌xì,戏xì,屃xì,系xì,饩xì,呬xì,忥xì,怬xì,细xì,係xì,恄xì,绤xì,釳xì,阋xì,塈xì,椞xì,舄xì,趇xì,隙xì,慀xì,滊xì,禊xì,綌xì,赩xì,隟xì,熂xì,犔xì,潟xì,澙xì,蕮xì,覤xì,黖xì,戲xì,磶xì,虩xì,餼xì,鬩xì,嚱xì,霼xì,衋xì,細xì,闟xì,虾xiā,谺xiā,傄xiā,閕xiā,敮xiā,颬xiā,瞎xiā,蝦xiā,鰕xiā,魻xiā,郃xiá,匣xiá,侠xiá,狎xiá,俠xiá,峡xiá,柙xiá,炠xiá,狭xiá,陜xiá,峽xiá,烚xiá,狹xiá,珨xiá,祫xiá,硖xiá,舺xiá,陿xiá,溊xiá,硤xiá,遐xiá,暇xiá,瑕xiá,筪xiá,碬xiá,舝xiá,辖xiá,縀xiá,蕸xiá,縖xiá,赮xiá,轄xiá,鍜xiá,霞xiá,鎋xiá,黠xiá,騢xiá,鶷xiá,睱xiá,翈xiá,昰xià,丅xià,下xià,吓xià,圷xià,夏xià,梺xià,嚇xià,懗xià,罅xià,鏬xià,疜xià,姺xiān,仙xiān,仚xiān,屳xiān,先xiān,奾xiān,纤xiān,佡xiān,忺xiān,氙xiān,祆xiān,秈xiān,苮xiān,枮xiān,籼xiān,珗xiān,莶xiān,掀xiān,酰xiān,锨xiān,僊xiān,僲xiān,嘕xiān,鲜xiān,暹xiān,韯xiān,憸xiān,鍁xiān,繊xiān,褼xiān,韱xiān,鮮xiān,馦xiān,蹮xiān,廯xiān,譣xiān,鶱xiān,襳xiān,躚xiān,纖xiān,鱻xiān,縿xiān,跹xiān,咞xián,闲xián,妶xián,弦xián,贤xián,咸xián,挦xián,涎xián,胘xián,娴xián,娹xián,婱xián,舷xián,蚿xián,衔xián,啣xián,痫xián,蛝xián,閑xián,鹇xián,嫌xián,甉xián,銜xián,嫺xián,嫻xián,憪xián,澖xián,誸xián,賢xián,癇xián,癎xián,礥xián,贒xián,鑦xián,鷳xián,鷴xián,鷼xián,伭xián,冼xiǎn,狝xiǎn,显xiǎn,险xiǎn,毨xiǎn,烍xiǎn,猃xiǎn,蚬xiǎn,険xiǎn,赻xiǎn,筅xiǎn,尟xiǎn,尠xiǎn,禒xiǎn,蜆xiǎn,跣xiǎn,箲xiǎn,險xiǎn,獫xiǎn,獮xiǎn,藓xiǎn,鍌xiǎn,燹xiǎn,顕xiǎn,幰xiǎn,攇xiǎn,櫶xiǎn,蘚xiǎn,玁xiǎn,韅xiǎn,顯xiǎn,灦xiǎn,搟xiǎn,县xiàn,岘xiàn,苋xiàn,现xiàn,线xiàn,臽xiàn,限xiàn,姭xiàn,宪xiàn,陥xiàn,哯xiàn,垷xiàn,娨xiàn,峴xiàn,晛xiàn,莧xiàn,陷xiàn,現xiàn,馅xiàn,睍xiàn,絤xiàn,缐xiàn,羡xiàn,献xiàn,粯xiàn,羨xiàn,腺xiàn,僩xiàn,僴xiàn,綫xiàn,誢xiàn,撊xiàn,線xiàn,鋧xiàn,憲xiàn,餡xiàn,豏xiàn,瀗xiàn,臔xiàn,獻xiàn,鏾xiàn,霰xiàn,鼸xiàn,脇xiàn,軐xiàn,県xiàn,縣xiàn,儴xiāng,勷xiāng,蘘xiāng,纕xiāng,乡xiāng,芗xiāng,香xiāng,郷xiāng,厢xiāng,鄉xiāng,鄊xiāng,廂xiāng,湘xiāng,缃xiāng,葙xiāng,鄕xiāng,楿xiāng,薌xiāng,箱xiāng,緗xiāng,膷xiāng,忀xiāng,骧xiāng,麘xiāng,欀xiāng,瓖xiāng,镶xiāng,鱜xiāng,鑲xiāng,驤xiāng,襄xiāng,佭xiáng,详xiáng,庠xiáng,栙xiáng,祥xiáng,絴xiáng,翔xiáng,詳xiáng,跭xiáng,享xiǎng,亯xiǎng,响xiǎng,蚃xiǎng,饷xiǎng,晑xiǎng,飨xiǎng,想xiǎng,餉xiǎng,鲞xiǎng,蠁xiǎng,鮝xiǎng,鯗xiǎng,響xiǎng,饗xiǎng,饟xiǎng,鱶xiǎng,傢xiàng,相xiàng,向xiàng,姠xiàng,巷xiàng,项xiàng,珦xiàng,象xiàng,缿xiàng,萫xiàng,項xiàng,像xiàng,勨xiàng,嶑xiàng,橡xiàng,襐xiàng,蟓xiàng,鐌xiàng,鱌xiàng,鋞xiàng,鬨xiàng,嚮xiàng,鵁xiāo,莦xiāo,颵xiāo,箾xiāo,潚xiāo,橚xiāo,灱xiāo,灲xiāo,枭xiāo,侾xiāo,哓xiāo,枵xiāo,骁xiāo,宯xiāo,宵xiāo,庨xiāo,恷xiāo,消xiāo,绡xiāo,虓xiāo,逍xiāo,鸮xiāo,啋xiāo,婋xiāo,梟xiāo,焇xiāo,猇xiāo,萧xiāo,痚xiāo,痟xiāo,硝xiāo,硣xiāo,窙xiāo,翛xiāo,萷xiāo,销xiāo,揱xiāo,綃xiāo,歊xiāo,箫xiāo,嘵xiāo,撨xiāo,獢xiāo,銷xiāo,霄xiāo,彇xiāo,膮xiāo,蕭xiāo,魈xiāo,鴞xiāo,穘xiāo,簘xiāo,蟂xiāo,蟏xiāo,鴵xiāo,嚣xiāo,瀟xiāo,簫xiāo,蟰xiāo,髇xiāo,囂xiāo,髐xiāo,鷍xiāo,驍xiāo,毊xiāo,虈xiāo,肖xiāo,哮xiāo,烋xiāo,潇xiāo,蠨xiāo,洨xiáo,崤xiáo,淆xiáo,誵xiáo,笹xiǎo,小xiǎo,晓xiǎo,暁xiǎo,筱xiǎo,筿xiǎo,曉xiǎo,篠xiǎo,謏xiǎo,皢xiǎo,孝xiào,効xiào,咲xiào,俲xiào,效xiào,校xiào,涍xiào,笑xiào,傚xiào,敩xiào,滧xiào,詨xiào,嘋xiào,嘨xiào,誟xiào,嘯xiào,熽xiào,斅xiào,斆xiào,澩xiào,啸xiào,些xiē,楔xiē,歇xiē,蝎xiē,蠍xiē,协xié,旪xié,邪xié,協xié,胁xié,垥xié,恊xié,拹xié,脋xié,衺xié,偕xié,斜xié,谐xié,翓xié,嗋xié,愶xié,携xié,瑎xié,綊xié,熁xié,膎xié,勰xié,撷xié,擕xié,緳xié,缬xié,蝢xié,鞋xié,諧xié,燲xié,擷xié,鞵xié,襭xié,攜xié,讗xié,龤xié,魼xié,脅xié,纈xié,写xiě,冩xiě,寫xiě,藛xiě,烲xiè,榝xiè,齛xiè,碿xiè,伳xiè,灺xiè,泄xiè,泻xiè,祄xiè,绁xiè,缷xiè,卸xiè,洩xiè,炧xiè,炨xiè,卨xiè,娎xiè,屑xiè,屓xiè,偰xiè,徢xiè,械xiè,焎xiè,禼xiè,亵xiè,媟xiè,屟xiè,渫xiè,絬xiè,谢xiè,僁xiè,塮xiè,榍xiè,榭xiè,褉xiè,噧xiè,屧xiè,暬xiè,韰xiè,廨xiè,懈xiè,澥xiè,獬xiè,糏xiè,薢xiè,薤xiè,邂xiè,燮xiè,褻xiè,謝xiè,夑xiè,瀉xiè,鞢xiè,瀣xiè,蟹xiè,蠏xiè,齘xiè,齥xiè,齂xiè,躠xiè,屭xiè,躞xiè,蝑xiè,揳xiè,爕xiè,噺xin,心xīn,邤xīn,妡xīn,忻xīn,芯xīn,辛xīn,昕xīn,杺xīn,欣xīn,盺xīn,俽xīn,惞xīn,锌xīn,新xīn,歆xīn,鋅xīn,嬜xīn,薪xīn,馨xīn,鑫xīn,馫xīn,枔xín,襑xín,潃xǐn,阠xìn,伩xìn,囟xìn,孞xìn,炘xìn,信xìn,脪xìn,衅xìn,訫xìn,焮xìn,舋xìn,釁xìn,狌xīng,星xīng,垶xīng,骍xīng,猩xīng,煋xīng,鷞shuāng,骦shuāng,縔shuǎng,艭shuāng,塽shuǎng,壯zhuàng,状zhuàng,狀zhuàng,壵zhuàng,梉zhuàng,瑆xīng,腥xīng,蛵xīng,觪xīng,箵xīng,篂xīng,謃xīng,鮏xīng,曐xīng,觲xīng,騂xīng,皨xīng,鯹xīng,嬹xīng,惺xīng,刑xíng,邢xíng,形xíng,陉xíng,侀xíng,哘xíng,型xíng,洐xíng,娙xíng,硎xíng,铏xíng,鉶xíng,裄xíng,睲xǐng,醒xǐng,擤xǐng,兴xìng,興xìng,杏xìng,姓xìng,幸xìng,性xìng,荇xìng,倖xìng,莕xìng,婞xìng,悻xìng,涬xìng,緈xìng,臖xìng,凶xiōng,兄xiōng,兇xiōng,匈xiōng,芎xiōng,讻xiōng,忷xiōng,汹xiōng,恟xiōng,洶xiōng,胷xiōng,胸xiōng,訩xiōng,詾xiōng,哅xiōng,雄xióng,熊xióng,诇xiòng,詗xiòng,敻xiòng,休xiū,俢xiū,修xiū,咻xiū,庥xiū,烌xiū,羞xiū,脙xiū,鸺xiū,臹xiū,貅xiū,馐xiū,樇xiū,銝xiū,髤xiū,髹xiū,鮴xiū,鵂xiū,饈xiū,鏅xiū,飍xiū,鎀xiū,苬xiú,宿xiǔ,朽xiǔ,綇xiǔ,滫xiǔ,糔xiǔ,臰xiù,秀xiù,岫xiù,珛xiù,绣xiù,袖xiù,琇xiù,锈xiù,溴xiù,璓xiù,螑xiù,繍xiù,繡xiù,鏥xiù,鏽xiù,齅xiù,嗅xiù,蓿xu,繻xū,圩xū,旴xū,疞xū,盱xū,欨xū,胥xū,须xū,顼xū,虗xū,虚xū,谞xū,媭xū,幁xū,欻xū,虛xū,須xū,楈xū,窢xū,頊xū,嘘xū,稰xū,需xū,魆xū,噓xū,墟xū,嬃xū,歔xū,縃xū,歘xū,諝xū,譃xū,魖xū,驉xū,鑐xū,鬚xū,姁xū,偦xū,戌xū,蕦xū,俆xú,徐xú,蒣xú,訏xǔ,许xǔ,诩xǔ,冔xǔ,栩xǔ,珝xǔ,許xǔ,湑xǔ,暊xǔ,詡xǔ,鄦xǔ,糈xǔ,醑xǔ,盨xǔ,滀xù,嘼xù,鉥xù,旭xù,伵xù,序xù,侐xù,沀xù,叙xù,恤xù,昫xù,洫xù,垿xù,欰xù,殈xù,烅xù,珬xù,勖xù,勗xù,敍xù,敘xù,烼xù,绪xù,续xù,酗xù,喣xù,壻xù,婿xù,朂xù,溆xù,絮xù,訹xù,慉xù,続xù,蓄xù,賉xù,槒xù,漵xù,潊xù,盢xù,瞁xù,緒xù,聟xù,稸xù,緖xù,瞲xù,藚xù,續xù,怴xù,芧xù,汿xù,煦xù,煖xuān,吅xuān,轩xuān,昍xuān,咺xuān,宣xuān,晅xuān,軒xuān,谖xuān,喧xuān,媗xuān,愃xuān,愋xuān,揎xuān,萱xuān,萲xuān,暄xuān,煊xuān,瑄xuān,蓒xuān,睻xuān,儇xuān,禤xuān,箮xuān,翧xuān,蝖xuān,蕿xuān,諠xuān,諼xuān,鍹xuān,駽xuān,矎xuān,翾xuān,藼xuān,蘐xuān,蠉xuān,譞xuān,鰚xuān,塇xuān,玹xuán,痃xuán,悬xuán,旋xuán,蜁xuán,嫙xuán,漩xuán,暶xuán,璇xuán,檈xuán,璿xuán,懸xuán,玆xuán,玄xuán,选xuǎn,選xuǎn,癣xuǎn,癬xuǎn,絃xuàn,夐xuàn,怰xuàn,泫xuàn,昡xuàn,炫xuàn,绚xuàn,眩xuàn,袨xuàn,铉xuàn,琄xuàn,眴xuàn,衒xuàn,絢xuàn,楦xuàn,鉉xuàn,碹xuàn,蔙xuàn,镟xuàn,颴xuàn,縼xuàn,繏xuàn,鏇xuàn,贙xuàn,駨xuàn,渲xuàn,疶xuē,蒆xuē,靴xuē,薛xuē,鞾xuē,削xuē,噱xué,穴xué,斈xué,乴xué,坹xué,学xué,岤xué,峃xué,茓xué,泶xué,袕xué,鸴xué,學xué,嶨xué,燢xué,雤xué,鷽xué,踅xué,雪xuě,樰xuě,膤xuě,艝xuě,轌xuě,鳕xuě,鱈xuě,血xuè,泧xuè,狘xuè,桖xuè,烕xuè,谑xuè,趐xuè,瀥xuè,坃xūn,勋xūn,埙xūn,塤xūn,熏xūn,窨xūn,勲xūn,勳xūn,薫xūn,嚑xūn,壎xūn,獯xūn,薰xūn,曛xūn,燻xūn,臐xūn,矄xūn,蘍xūn,壦xūn,爋xūn,纁xūn,醺xūn,勛xūn,郇xún,咰xún,寻xún,巡xún,旬xún,杊xún,询xún,峋xún,恂xún,浔xún,紃xún,荀xún,栒xún,桪xún,毥xún,珣xún,偱xún,尋xún,循xún,揗xún,詢xún,鄩xún,鲟xún,噚xún,潯xún,攳xún,樳xún,燅xún,燖xún,璕xún,蟳xún,鱏xún,鱘xún,侚xún,彐xún,撏xún,洵xún,浚xùn,濬xùn,鶽xùn,驯xùn,馴xùn,卂xùn,训xùn,伨xùn,汛xùn,迅xùn,徇xùn,狥xùn,迿xùn,逊xùn,殉xùn,訊xùn,訓xùn,訙xùn,奞xùn,巽xùn,殾xùn,遜xùn,愻xùn,賐xùn,噀xùn,蕈xùn,顨xùn,鑂xùn,稄xùn,讯xùn,呀ya,圧yā,丫yā,压yā,庘yā,押yā,鸦yā,桠yā,鸭yā,铔yā,椏yā,鴉yā,錏yā,鴨yā,壓yā,鵶yā,鐚yā,唖yā,亜yā,垭yā,俹yā,埡yā,孲yā,拁yá,疨yá,牙yá,伢yá,岈yá,芽yá,厓yá,枒yá,琊yá,笌yá,蚜yá,堐yá,崕yá,崖yá,涯yá,猚yá,瑘yá,睚yá,衙yá,漄yá,齖yá,庌yá,顔yá,釾yá,疋yǎ,厊yǎ,啞yǎ,痖yǎ,雅yǎ,瘂yǎ,蕥yǎ,挜yǎ,掗yǎ,哑yǎ,呾yà,輵yà,潝yà,劜yà,圠yà,亚yà,穵yà,襾yà,讶yà,犽yà,迓yà,亞yà,玡yà,娅yà,砑yà,氩yà,婭yà,訝yà,揠yà,氬yà,猰yà,圔yà,稏yà,窫yà,椻yà,鼼yà,聐yà,淊yān,咽yān,恹yān,剦yān,烟yān,珚yān,胭yān,偣yān,崦yān,淹yān,焉yān,菸yān,阉yān,湮yān,腌yān,傿yān,煙yān,鄢yān,嫣yān,漹yān,嶖yān,樮yān,醃yān,閹yān,嬮yān,篶yān,臙yān,黫yān,弇yān,硽yān,慇yān,黰yān,橪yān,阽yán,炏yán,挻yán,厃yán,唌yán,廵yán,讠yán,円yán,延yán,闫yán,严yán,妍yán,言yán,訁yán,岩yán,昖yán,沿yán,炎yán,郔yán,姸yán,娫yán,狿yán,研yán,莚yán,娮yán,盐yán,琂yán,硏yán,訮yán,閆yán,阎yán,嵒yán,嵓yán,綖yán,蜒yán,塩yán,揅yán,楌yán,詽yán,碞yán,蔅yán,颜yán,虤yán,閻yán,厳yán,檐yán,顏yán,嚴yán,壛yán,巌yán,簷yán,櫩yán,麙yán,壧yán,孍yán,巖yán,巗yán,巚yán,欕yán,礹yán,鹽yán,麣yán,黬yán,偐yán,贗yán,菴yǎn,剡yǎn,嬐yǎn,崄yǎn,嶮yǎn,抁yǎn,沇yǎn,乵yǎn,兖yǎn,奄yǎn,俨yǎn,兗yǎn,匽yǎn,衍yǎn,偃yǎn,厣yǎn,掩yǎn,眼yǎn,萒yǎn,郾yǎn,酓yǎn,嵃yǎn,愝yǎn,扊yǎn,揜yǎn,棪yǎn,渰yǎn,渷yǎn,琰yǎn,隒yǎn,椼yǎn,罨yǎn,演yǎn,褗yǎn,蝘yǎn,魇yǎn,噞yǎn,躽yǎn,檿yǎn,黡yǎn,厴yǎn,甗yǎn,鰋yǎn,鶠yǎn,黤yǎn,齞yǎn,儼yǎn,黭yǎn,顩yǎn,鼴yǎn,巘yǎn,曮yǎn,魘yǎn,鼹yǎn,齴yǎn,黶yǎn,掞yǎn,隁yǎn,喭yǎn,酀yǎn,龂yǎn,齗yǎn,阭yǎn,夵yǎn,裺yǎn,溎yàn,豜yàn,豣yàn,烻yàn,湺yàn,麲yàn,厌yàn,妟yàn,牪yàn,姲yàn,彥yàn,彦yàn,砚yàn,唁yàn,宴yàn,晏yàn,艳yàn,覎yàn,验yàn,焔yàn,谚yàn,堰yàn,敥yàn,焰yàn,焱yàn,猒yàn,硯yàn,葕yàn,雁yàn,滟yàn,鳫yàn,厭yàn,墕yàn,熖yàn,酽yàn,嬊yàn,谳yàn,餍yàn,鴈yàn,燄yàn,燕yàn,諺yàn,赝yàn,鬳yàn,曕yàn,騐yàn,験yàn,嚥yàn,嬿yàn,艶yàn,贋yàn,軅yàn,爓yàn,醶yàn,騴yàn,鷃yàn,灔yàn,觾yàn,讌yàn,饜yàn,驗yàn,鷰yàn,艷yàn,灎yàn,釅yàn,驠yàn,灧yàn,讞yàn,豓yàn,豔yàn,灩yàn,顑yàn,懕yàn,筵yàn,觃yàn,暥yàn,醼yàn,歍yāng,央yāng,咉yāng,姎yāng,抰yāng,泱yāng,殃yāng,胦yāng,眏yāng,秧yāng,鸯yāng,鉠yāng,雵yāng,鞅yāng,鍈yāng,鴦yāng,佒yāng,霙yāng,瑒yáng,婸yáng,扬yáng,羊yáng,阦yáng,旸yáng,杨yáng,炀yáng,佯yáng,劷yáng,氜yáng,疡yáng,钖yáng,飏yáng,垟yáng,徉yáng,昜yáng,洋yáng,羏yáng,烊yáng,珜yáng,眻yáng,陽yáng,崵yáng,崸yáng,揚yáng,蛘yáng,敭yáng,暘yáng,楊yáng,煬yáng,禓yáng,瘍yáng,諹yáng,輰yáng,鴹yáng,颺yáng,鐊yáng,鰑yáng,霷yáng,鸉yáng,阳yáng,鍚yáng,飬yǎng,勜yǎng,仰yǎng,坱yǎng,奍yǎng,岟yǎng,养yǎng,炴yǎng,氧yǎng,痒yǎng,紻yǎng,傟yǎng,楧yǎng,軮yǎng,慃yǎng,氱yǎng,羪yǎng,養yǎng,駚yǎng,懩yǎng,攁yǎng,瀁yǎng,癢yǎng,礢yǎng,柍yǎng,恙yàng,样yàng,羕yàng,詇yàng,様yàng,漾yàng,樣yàng,怏yàng,玅yāo,撽yāo,幺yāo,夭yāo,吆yāo,妖yāo,枖yāo,祅yāo,訞yāo,喓yāo,葽yāo,楆yāo,腰yāo,邀yāo,宎yāo,侥yáo,僥yáo,蕘yáo,匋yáo,恌yáo,铫yáo,爻yáo,尧yáo,尭yáo,肴yáo,垚yáo,姚yáo,峣yáo,轺yáo,倄yáo,珧yáo,窑yáo,傜yáo,堯yáo,揺yáo,殽yáo,谣yáo,軺yáo,嗂yáo,媱yáo,徭yáo,愮yáo,搖yáo,摇yáo,猺yáo,遙yáo,遥yáo,摿yáo,暚yáo,榣yáo,瑤yáo,瑶yáo,飖yáo,餆yáo,嶢yáo,嶤yáo,徺yáo,磘yáo,窯yáo,餚yáo,繇yáo,謠yáo,謡yáo,鎐yáo,鳐yáo,颻yáo,蘨yáo,顤yáo,鰩yáo,鷂yáo,踰yáo,烑yáo,窰yáo,噛yǎo,仸yǎo,岆yǎo,抭yǎo,杳yǎo,殀yǎo,狕yǎo,苭yǎo,咬yǎo,柼yǎo,窅yǎo,窈yǎo,舀yǎo,偠yǎo,婹yǎo,崾yǎo,溔yǎo,蓔yǎo,榚yǎo,闄yǎo,騕yǎo,齩yǎo,鷕yǎo,穾yǎo,鴢yǎo,烄yào,药yào,要yào,袎yào,窔yào,筄yào,葯yào,詏yào,熎yào,覞yào,靿yào,獟yào,鹞yào,薬yào,曜yào,艞yào,藥yào,矅yào,曣yào,耀yào,纅yào,讑yào,鑰yào,怮yào,箹yào,钥yào,籥yào,亪ye,椰yē,暍yē,噎yē,潱yē,蠮yē,耶yē,吔yē,倻yē,峫yé,爷yé,捓yé,揶yé,铘yé,爺yé,鋣yé,鎁yé,擨yé,蠱yě,虵yě,也yě,冶yě,埜yě,野yě,嘢yě,漜yě,壄yě,瓛yè,熀yè,殕yè,啘yè,鐷yè,緤yè,业yè,叶yè,曳yè,页yè,邺yè,夜yè,亱yè,枼yè,洂yè,頁yè,捙yè,晔yè,枽yè,烨yè,偞yè,掖yè,液yè,谒yè,殗yè,腋yè,葉yè,鄓yè,墷yè,楪yè,業yè,馌yè,僷yè,曄yè,曅yè,歋yè,燁yè,擖yè,擛yè,皣yè,瞱yè,靥yè,嶪yè,嶫yè,澲yè,謁yè,餣yè,嚈yè,擫yè,曗yè,瞸yè,鍱yè,擪yè,爗yè,礏yè,鎑yè,饁yè,鵺yè,靨yè,驜yè,鸈yè,黦yè,煠yè,抴yè,鄴yè,膶yen,岃yen,袆yī,褘yī,一yī,弌yī,辷yī,衤yī,伊yī,衣yī,医yī,吚yī,依yī,祎yī,咿yī,洢yī,猗yī,畩yī,郼yī,铱yī,壹yī,揖yī,欹yī,蛜yī,禕yī,嫛yī,漪yī,稦yī,銥yī,嬄yī,噫yī,夁yī,瑿yī,鹥yī,繄yī,檹yī,毉yī,醫yī,黟yī,譩yī,鷖yī,黳yī,悘yī,壱yī,耛yí,拸yí,訑yí,釶yí,鉇yí,箷yí,戺yí,珆yí,鴺yí,銕yí,狏yí,迱yí,彵yí,熈yí,仪yí,匜yí,圯yí,夷yí,冝yí,宐yí,杝yí,沂yí,诒yí,侇yí,宜yí,怡yí,沶yí,狋yí,衪yí,饴yí,咦yí,姨yí,峓yí,弬yí,恞yí,柂yí,瓵yí,荑yí,贻yí,迻yí,宧yí,巸yí,扅yí,桋yí,眙yí,胰yí,袘yí,痍yí,移yí,萓yí,媐yí,椬yí,羠yí,蛦yí,詒yí,貽yí,遗yí,暆yí,椸yí,誃yí,跠yí,頉yí,颐yí,飴yí,疑yí,儀yí,熪yí,遺yí,嶬yí,彛yí,彜yí,螔yí,頥yí,寲yí,嶷yí,簃yí,顊yí,鮧yí,彝yí,彞yí,謻yí,鏔yí,籎yí,觺yí,讉yí,鸃yí,貤yí,乁yí,栘yí,頤yí,钀yǐ,錡yǐ,裿yǐ,迤yǐ,酏yǐ,乙yǐ,已yǐ,以yǐ,钇yǐ,佁yǐ,攺yǐ,矣yǐ,苡yǐ,苢yǐ,庡yǐ,舣yǐ,蚁yǐ,釔yǐ,倚yǐ,扆yǐ,逘yǐ,偯yǐ,崺yǐ,旑yǐ,椅yǐ,鈘yǐ,鉯yǐ,鳦yǐ,旖yǐ,輢yǐ,敼yǐ,螘yǐ,檥yǐ,礒yǐ,艤yǐ,蟻yǐ,顗yǐ,轙yǐ,齮yǐ,肊yǐ,陭yǐ,嬟yǐ,醷yǐ,阤yǐ,叕yǐ,锜yǐ,歖yǐ,笖yǐ,昳yì,睪yì,欥yì,輗yì,掜yì,儗yì,謚yì,紲yì,絏yì,辥yì,义yì,亿yì,弋yì,刈yì,忆yì,艺yì,仡yì,匇yì,议yì,亦yì,伇yì,屹yì,异yì,忔yì,芅yì,伿yì,佚yì,劮yì,呓yì,坄yì,役yì,抑yì,曵yì,杙yì,耴yì,苅yì,译yì,邑yì,佾yì,呭yì,呹yì,妷yì,峄yì,怈yì,怿yì,易yì,枍yì,泆yì,炈yì,绎yì,诣yì,驿yì,俋yì,奕yì,帟yì,帠yì,弈yì,枻yì,浂yì,玴yì,疫yì,羿yì,衵yì,轶yì,唈yì,垼yì,悒yì,挹yì,栧yì,栺yì,欭yì,浥yì,浳yì,益yì,袣yì,谊yì,勚yì,埸yì,悥yì,殹yì,異yì,羛yì,翊yì,翌yì,萟yì,訲yì,訳yì,豙yì,豛yì,逸yì,釴yì,隿yì,幆yì,敡yì,晹yì,棭yì,殔yì,湙yì,焲yì,蛡yì,詍yì,跇yì,軼yì,鈠yì,骮yì,亄yì,意yì,溢yì,獈yì,痬yì,竩yì,缢yì,義yì,肄yì,裔yì,裛yì,詣yì,勩yì,嫕yì,廙yì,榏yì,潩yì,瘗yì,膉yì,蓺yì,蜴yì,靾yì,駅yì,億yì,撎yì,槸yì,毅yì,熠yì,熤yì,熼yì,瘞yì,镒yì,鹝yì,鹢yì,黓yì,劓yì,圛yì,墿yì,嬑yì,嶧yì,憶yì,懌yì,曀yì,殪yì,澺yì,燚yì,瘱yì,瞖yì,穓yì,縊yì,艗yì,薏yì,螠yì,褹yì,寱yì,斁yì,曎yì,檍yì,歝yì,燡yì,翳yì,翼yì,臆yì,貖yì,鮨yì,癔yì,藙yì,藝yì,贀yì,鎰yì,镱yì,繶yì,繹yì,豷yì,霬yì,鯣yì,鶂yì,鶃yì,鶍yì,瀷yì,蘙yì,譯yì,議yì,醳yì,饐yì,囈yì,鐿yì,鷁yì,鷊yì,襼yì,驛yì,鷧yì,虉yì,鷾yì,讛yì,齸yì,襗yì,樴yì,癦yì,焬yì,阣yì,兿yì,誼yì,燱yì,懿yì,鮣yin,乚yīn,囙yīn,因yīn,阥yīn,阴yīn,侌yīn,垔yīn,姻yīn,洇yīn,茵yīn,荫yīn,音yīn,骃yīn,栶yīn,殷yīn,氤yīn,陰yīn,凐yīn,秵yīn,裀yīn,铟yīn,陻yīn,堙yīn,婣yīn,愔yīn,筃yīn,絪yīn,歅yīn,溵yīn,禋yīn,蒑yīn,蔭yīn,瘖yīn,銦yīn,磤yīn,緸yīn,鞇yīn,諲yīn,霒yīn,駰yīn,噾yīn,濦yīn,闉yīn,霠yīn,韾yīn,喑yīn,玪yín,伒yín,乑yín,吟yín,犾yín,苂yín,斦yín,泿yín,圁yín,峾yín,烎yín,狺yín,珢yín,粌yín,荶yín,訔yín,唫yín,婬yín,寅yín,崟yín,崯yín,淫yín,訡yín,银yín,鈝yín,滛yín,碒yín,鄞yín,夤yín,蔩yín,訚yín,誾yín,銀yín,龈yín,噖yín,殥yín,嚚yín,檭yín,蟫yín,霪yín,齦yín,鷣yín,螾yín,垠yín,璌yín,赺yǐn,縯yǐn,尹yǐn,引yǐn,吲yǐn,饮yǐn,蚓yǐn,隐yǐn,淾yǐn,釿yǐn,鈏yǐn,飲yǐn,隠yǐn,靷yǐn,飮yǐn,朄yǐn,趛yǐn,檃yǐn,瘾yǐn,隱yǐn,嶾yǐn,濥yǐn,蘟yǐn,癮yǐn,讔yǐn,輑yǐn,櫽yǐn,堷yìn,梀yìn,隂yìn,印yìn,茚yìn,洕yìn,胤yìn,垽yìn,湚yìn,猌yìn,廕yìn,酳yìn,慭yìn,癊yìn,憖yìn,憗yìn,懚yìn,檼yìn,韹yīng,焽yīng,旲yīng,应yīng,応yīng,英yīng,偀yīng,桜yīng,珱yīng,莺yīng,啨yīng,婴yīng,媖yīng,愥yīng,渶yīng,朠yīng,煐yīng,瑛yīng,嫈yīng,碤yīng,锳yīng,嘤yīng,撄yīng,甇yīng,緓yīng,缨yīng,罂yīng,蝧yīng,賏yīng,樱yīng,璎yīng,噟yīng,罃yīng,褮yīng,鴬yīng,鹦yīng,嬰yīng,應yīng,膺yīng,韺yīng,甖yīng,鹰yīng,嚶yīng,孆yīng,孾yīng,攖yīng,瀴yīng,罌yīng,蘡yīng,櫻yīng,瓔yīng,礯yīng,譻yīng,鶯yīng,鑍yīng,纓yīng,蠳yīng,鷪yīng,軈yīng,鷹yīng,鸎yīng,鸚yīng,謍yīng,譍yīng,绬yīng,鶧yīng,夃yíng,俓yíng,泂yíng,嵤yíng,桯yíng,滎yíng,鎣yíng,盁yíng,迎yíng,茔yíng,盈yíng,荥yíng,荧yíng,莹yíng,萤yíng,营yíng,萦yíng,営yíng,溁yíng,溋yíng,萾yíng,僌yíng,塋yíng,楹yíng,滢yíng,蓥yíng,潆yíng,熒yíng,蝇yíng,瑩yíng,蝿yíng,嬴yíng,營yíng,縈yíng,螢yíng,濙yíng,濚yíng,濴yíng,藀yíng,覮yíng,赢yíng,巆yíng,攍yíng,攚yíng,瀛yíng,瀠yíng,蠅yíng,櫿yíng,灐yíng,籝yíng,灜yíng,贏yíng,籯yíng,耺yíng,蛍yíng,瀯yíng,瀅yíng,矨yǐng,郢yǐng,浧yǐng,梬yǐng,颍yǐng,颕yǐng,颖yǐng,摬yǐng,影yǐng,潁yǐng,瘿yǐng,穎yǐng,頴yǐng,巊yǐng,廮yǐng,鐛yǐng,癭yǐng,鱦yìng,映yìng,暎yìng,硬yìng,媵yìng,膡yìng,鞕yìng,嚛yo,哟yō,唷yō,喲yō,拥yōng,痈yōng,邕yōng,庸yōng,嗈yōng,鄘yōng,雍yōng,墉yōng,嫞yōng,慵yōng,滽yōng,槦yōng,牅yōng,銿yōng,噰yōng,壅yōng,擁yōng,澭yōng,郺yōng,镛yōng,臃yōng,癕yōng,雝yōng,鏞yōng,廱yōng,灉yōng,饔yōng,鱅yōng,鷛yōng,癰yōng,鳙yōng,揘yóng,喁yóng,鰫yóng,嵱yóng,筩yǒng,永yǒng,甬yǒng,咏yǒng,怺yǒng,泳yǒng,俑yǒng,勇yǒng,勈yǒng,栐yǒng,埇yǒng,悀yǒng,柡yǒng,涌yǒng,恿yǒng,傛yǒng,惥yǒng,愑yǒng,湧yǒng,硧yǒng,詠yǒng,彮yǒng,愹yǒng,蛹yǒng,慂yǒng,踊yǒng,禜yǒng,鲬yǒng,踴yǒng,鯒yǒng,塎yǒng,佣yòng,用yòng,苚yòng,砽yòng,醟yòng,妋yōu,优yōu,忧yōu,攸yōu,呦yōu,幽yōu,悠yōu,麀yōu,滺yōu,憂yōu,優yōu,鄾yōu,嚘yōu,懮yōu,瀀yōu,纋yōu,耰yōu,逌yōu,泈yōu,櫌yōu,蓧yóu,蚘yóu,揂yóu,汼yóu,汓yóu,蝤yóu,尣yóu,冘yóu,尢yóu,尤yóu,由yóu,沋yóu,犹yóu,邮yóu,怞yóu,油yóu,肬yóu,怣yóu,斿yóu,疣yóu,峳yóu,浟yóu,秞yóu,莜yóu,莤yóu,莸yóu,郵yóu,铀yóu,偤yóu,蚰yóu,訧yóu,逰yóu,游yóu,猶yóu,鱿yóu,楢yóu,猷yóu,鈾yóu,鲉yóu,輏yóu,駀yóu,蕕yóu,蝣yóu,魷yóu,輶yóu,鮋yóu,櫾yóu,邎yóu,庮yóu,甴yóu,遊yóu,羗yǒu,脩yǒu,戭yǒu,友yǒu,有yǒu,丣yǒu,卣yǒu,苃yǒu,酉yǒu,羑yǒu,羐yǒu,莠yǒu,梄yǒu,聈yǒu,脜yǒu,铕yǒu,湵yǒu,蒏yǒu,蜏yǒu,銪yǒu,槱yǒu,牖yǒu,牗yǒu,黝yǒu,栯yǒu,禉yǒu,痏yòu,褎yòu,褏yòu,銹yòu,柚yòu,又yòu,右yòu,幼yòu,佑yòu,侑yòu,孧yòu,狖yòu,糿yòu,哊yòu,囿yòu,姷yòu,宥yòu,峟yòu,牰yòu,祐yòu,诱yòu,迶yòu,唀yòu,蚴yòu,亴yòu,貁yòu,釉yòu,酭yòu,鼬yòu,誘yòu,纡yū,迂yū,迃yū,穻yū,陓yū,紆yū,虶yū,唹yū,淤yū,盓yū,瘀yū,箊yū,亐yū,丂yú,桙yú,婾yú,媮yú,悇yú,汙yú,汚yú,鱮yú,颙yú,顒yú,渝yú,于yú,邘yú,伃yú,余yú,妤yú,扵yú,欤yú,玗yú,玙yú,於yú,盂yú,臾yú,鱼yú,俞yú,兪yú,禺yú,竽yú,舁yú,茰yú,荢yú,娛yú,娯yú,娱yú,狳yú,谀yú,酑yú,馀yú,渔yú,萸yú,釪yú,隃yú,隅yú,雩yú,魚yú,堣yú,堬yú,崳yú,嵎yú,嵛yú,愉yú,揄yú,楰yú,畬yú,畭yú,硢yú,腴yú,逾yú,骬yú,愚yú,楡yú,榆yú,歈yú,牏yú,瑜yú,艅yú,虞yú,觎yú,漁yú,睮yú,窬yú,舆yú,褕yú,歶yú,羭yú,蕍yú,蝓yú,諛yú,雓yú,餘yú,魣yú,嬩yú,懙yú,覦yú,歟yú,璵yú,螸yú,輿yú,鍝yú,礖yú,謣yú,髃yú,鮽yú,旟yú,籅yú,騟yú,鯲yú,鰅yú,鷠yú,鸆yú,萮yú,芌yú,喩yú,媀yú,貗yú,衧yú,湡yú,澞yú,頨yǔ,蝺yǔ,藇yǔ,予yǔ,与yǔ,伛yǔ,宇yǔ,屿yǔ,羽yǔ,雨yǔ,俁yǔ,俣yǔ,挧yǔ,禹yǔ,语yǔ,圄yǔ,祤yǔ,偊yǔ,匬yǔ,圉yǔ,庾yǔ,敔yǔ,鄅yǔ,萭yǔ,傴yǔ,寙yǔ,斞yǔ,楀yǔ,瑀yǔ,瘐yǔ,與yǔ,語yǔ,窳yǔ,龉yǔ,噳yǔ,嶼yǔ,貐yǔ,斔yǔ,麌yǔ,蘌yǔ,齬yǔ,穥yǔ,峿yǔ,閼yù,穀yù,蟈yù,僪yù,鐍yù,肀yù,翑yù,衘yù,獝yù,玉yù,驭yù,圫yù,聿yù,芋yù,妪yù,忬yù,饫yù,育yù,郁yù,彧yù,昱yù,狱yù,秗yù,俼yù,峪yù,浴yù,砡yù,钰yù,预yù,喐yù,域yù,堉yù,悆yù,惐yù,欲yù,淢yù,淯yù,袬yù,逳yù,阈yù,喅yù,喻yù,寓yù,庽yù,御yù,棛yù,棜yù,棫yù,焴yù,琙yù,矞yù,裕yù,遇yù,飫yù,馭yù,鹆yù,愈yù,滪yù,煜yù,稢yù,罭yù,蒮yù,蓣yù,誉yù,鈺yù,預yù,嶎yù,戫yù,毓yù,獄yù,瘉yù,緎yù,蜟yù,蜮yù,輍yù,銉yù,隩yù,噊yù,慾yù,稶yù,蓹yù,薁yù,豫yù,遹yù,鋊yù,鳿yù,澦yù,燏yù,燠yù,蕷yù,諭yù,錥yù,閾yù,鴥yù,鴧yù,鴪yù,礇yù,禦yù,魊yù,鹬yù,癒yù,礜yù,篽yù,繘yù,鵒yù,櫲yù,饇yù,蘛yù,譽yù,轝yù,鐭yù,霱yù,欎yù,驈yù,鬻yù,籞yù,鱊yù,鷸yù,鸒yù,欝yù,軉yù,鬰yù,鬱yù,灪yù,爩yù,灹yù,吁yù,谕yù,嫗yù,儥yù,籲yù,裷yuān,嫚yuān,囦yuān,鸢yuān,剈yuān,冤yuān,弲yuān,悁yuān,眢yuān,鸳yuān,寃yuān,渁yuān,渆yuān,渊yuān,渕yuān,淵yuān,葾yuān,棩yuān,蒬yuān,蜎yuān,鹓yuān,箢yuān,鳶yuān,蜵yuān,駌yuān,鋺yuān,鴛yuān,嬽yuān,鵷yuān,灁yuān,鼝yuān,蝝yuān,鼘yuān,喛yuán,楥yuán,芫yuán,元yuán,贠yuán,邧yuán,员yuán,园yuán,沅yuán,杬yuán,垣yuán,爰yuán,貟yuán,原yuán,員yuán,圆yuán,笎yuán,袁yuán,厡yuán,酛yuán,圎yuán,援yuán,湲yuán,猨yuán,缘yuán,鈨yuán,鼋yuán,園yuán,圓yuán,塬yuán,媴yuán,源yuán,溒yuán,猿yuán,獂yuán,蒝yuán,榞yuán,榬yuán,辕yuán,緣yuán,縁yuán,蝯yuán,橼yuán,羱yuán,薗yuán,螈yuán,謜yuán,轅yuán,黿yuán,鎱yuán,櫞yuán,邍yuán,騵yuán,鶢yuán,鶰yuán,厵yuán,傆yuán,媛yuán,褑yuán,褤yuán,嫄yuán,远yuǎn,盶yuǎn,遠yuǎn,逺yuǎn,肙yuàn,妴yuàn,苑yuàn,怨yuàn,院yuàn,垸yuàn,衏yuàn,掾yuàn,瑗yuàn,禐yuàn,愿yuàn,裫yuàn,噮yuàn,願yuàn,哕yue,噦yuē,曰yuē,曱yuē,约yuē,約yuē,矱yuē,彟yuē,彠yuē,矆yuè,妜yuè,髺yuè,哾yuè,趯yuè,月yuè,戉yuè,汋yuè,岄yuè,抈yuè,礿yuè,岳yuè,玥yuè,恱yuè,悅yuè,悦yuè,蚎yuè,蚏yuè,軏yuè,钺yuè,阅yuè,捳yuè,跀yuè,跃yuè,粤yuè,越yuè,鈅yuè,粵yuè,鉞yuè,閱yuè,閲yuè,嬳yuè,樾yuè,篗yuè,嶽yuè,籆yuè,瀹yuè,蘥yuè,爚yuè,禴yuè,躍yuè,鸑yuè,籰yuè,龥yuè,鸙yuè,躒yuè,刖yuè,龠yuè,涒yūn,轀yūn,蒀yūn,煴yūn,蒕yūn,熅yūn,奫yūn,赟yūn,頵yūn,贇yūn,氲yūn,氳yūn,晕yūn,暈yūn,云yún,勻yún,匀yún,伝yún,呍yún,囩yún,妘yún,抣yún,纭yún,芸yún,昀yún,畇yún,眃yún,秐yún,郧yún,涢yún,紜yún,耘yún,鄖yún,雲yún,愪yún,溳yún,筼yún,蒷yún,熉yún,澐yún,蕓yún,鋆yún,橒yún,篔yún,縜yún,繧yún,荺yún,沄yún,允yǔn,夽yǔn,狁yǔn,玧yǔn,陨yǔn,殒yǔn,喗yǔn,鈗yǔn,隕yǔn,殞yǔn,馻yǔn,磒yǔn,霣yǔn,齫yǔn,齳yǔn,抎yǔn,緷yùn,孕yùn,运yùn,枟yùn,郓yùn,恽yùn,鄆yùn,酝yùn,傊yùn,惲yùn,愠yùn,運yùn,慍yùn,韫yùn,韵yùn,熨yùn,蕴yùn,賱yùn,醖yùn,醞yùn,餫yùn,韗yùn,韞yùn,蘊yùn,韻yùn,腪yùn,噈zā,帀zā,匝zā,沞zā,咂zā,拶zā,沯zā,桚zā,紮zā,鉔zā,臜zā,臢zā,砸zá,韴zá,雑zá,襍zá,雜zá,雥zá,囋zá,杂zá,咋zǎ,災zāi,灾zāi,甾zāi,哉zāi,栽zāi,烖zāi,渽zāi,溨zāi,睵zāi,賳zāi,宰zǎi,载zǎi,崽zǎi,載zǎi,仔zǎi,再zài,在zài,扗zài,洅zài,傤zài,酨zài,儎zài,篸zān,兂zān,糌zān,簪zān,簮zān,鐕zān,撍zān,咱zán,偺zán,喒zǎn,昝zǎn,寁zǎn,儧zǎn,攒zǎn,儹zǎn,趱zǎn,趲zǎn,揝zǎn,穳zàn,暂zàn,暫zàn,賛zàn,赞zàn,錾zàn,鄼zàn,濽zàn,蹔zàn,酂zàn,瓉zàn,贊zàn,鏨zàn,瓒zàn,灒zàn,讃zàn,瓚zàn,禶zàn,襸zàn,讚zàn,饡zàn,酇zàn,匨zāng,蔵zāng,牂zāng,羘zāng,赃zāng,賍zāng,臧zāng,賘zāng,贓zāng,髒zāng,贜zāng,脏zāng,驵zǎng,駔zǎng,奘zàng,弉zàng,塟zàng,葬zàng,銺zàng,臓zàng,臟zàng,傮zāo,遭zāo,糟zāo,醩zāo,蹧zāo,凿záo,鑿záo,早zǎo,枣zǎo,栆zǎo,蚤zǎo,棗zǎo,璅zǎo,澡zǎo,璪zǎo,薻zǎo,藻zǎo,灶zào,皁zào,皂zào,唕zào,唣zào,造zào,梍zào,慥zào,煰zào,艁zào,噪zào,簉zào,燥zào,竃zào,譟zào,趮zào,竈zào,躁zào,啫zē,伬zé,则zé,択zé,沢zé,择zé,泎zé,泽zé,责zé,迮zé,則zé,啧zé,帻zé,笮zé,舴zé,責zé,溭zé,嘖zé,嫧zé,幘zé,箦zé,蔶zé,樍zé,歵zé,諎zé,赜zé,擇zé,皟zé,瞔zé,礋zé,謮zé,賾zé,蠌zé,齚zé,齰zé,鸅zé,讁zé,葃zé,澤zé,仄zè,夨zè,庂zè,汄zè,昃zè,昗zè,捑zè,崱zè,贼zéi,賊zéi,鲗zéi,蠈zéi,鰂zéi,鱡zéi,怎zěn,谮zèn,囎zèn,譛zèn,曽zēng,増zēng,鄫zēng,增zēng,憎zēng,缯zēng,橧zēng,熷zēng,璔zēng,矰zēng,磳zēng,罾zēng,繒zēng,譄zēng,鱛zēng,縡zēng,鬷zěng,锃zèng,鋥zèng,甑zèng,赠zèng,贈zèng,馇zha,餷zha,蹅zhā,紥zhā,迊zhā,抯zhā,挓zhā,柤zhā,哳zhā,偧zhā,揸zhā,渣zhā,溠zhā,楂zhā,劄zhā,皶zhā,箚zhā,樝zhā,皻zhā,譇zhā,齄zhā,齇zhā,扎zhā,摣zhā,藸zhā,囃zhā,喳zhā,箑zhá,耫zhá,札zhá,轧zhá,軋zhá,闸zhá,蚻zhá,铡zhá,牐zhá,閘zhá,霅zhá,鍘zhá,譗zhá,挿zhǎ,揷zhǎ,厏zhǎ,苲zhǎ,砟zhǎ,鲊zhǎ,鲝zhǎ,踷zhǎ,鮓zhǎ,鮺zhǎ,眨zhǎ,吒zhà,乍zhà,诈zhà,咤zhà,奓zhà,炸zhà,宱zhà,痄zhà,蚱zhà,詐zhà,搾zhà,榨zhà,醡zhà,拃zhà,柞zhà,夈zhāi,粂zhāi,捚zhāi,斋zhāi,斎zhāi,榸zhāi,齋zhāi,摘zhāi,檡zhái,宅zhái,翟zhái,窄zhǎi,鉙zhǎi,骴zhài,簀zhài,债zhài,砦zhài,債zhài,寨zhài,瘵zhài,沾zhān,毡zhān,旃zhān,栴zhān,粘zhān,蛅zhān,惉zhān,詀zhān,趈zhān,詹zhān,閚zhān,谵zhān,嶦zhān,薝zhān,邅zhān,霑zhān,氊zhān,瞻zhān,鹯zhān,旜zhān,譫zhān,饘zhān,鳣zhān,驙zhān,魙zhān,鸇zhān,覱zhān,氈zhān,讝zhán,斩zhǎn,飐zhǎn,展zhǎn,盏zhǎn,崭zhǎn,斬zhǎn,琖zhǎn,搌zhǎn,盞zhǎn,嶃zhǎn,嶄zhǎn,榐zhǎn,颭zhǎn,嫸zhǎn,醆zhǎn,蹍zhǎn,欃zhàn,占zhàn,佔zhàn,战zhàn,栈zhàn,桟zhàn,站zhàn,偡zhàn,绽zhàn,菚zhàn,棧zhàn,湛zhàn,戦zhàn,綻zhàn,嶘zhàn,輚zhàn,戰zhàn,虥zhàn,虦zhàn,轏zhàn,蘸zhàn,驏zhàn,张zhāng,張zhāng,章zhāng,鄣zhāng,嫜zhāng,彰zhāng,慞zhāng,漳zhāng,獐zhāng,粻zhāng,蔁zhāng,遧zhāng,暲zhāng,樟zhāng,璋zhāng,餦zhāng,蟑zhāng,鏱zhāng,騿zhāng,鱆zhāng,麞zhāng,涱zhāng,傽zhāng,长zhǎng,仧zhǎng,長zhǎng,镸zhǎng,仉zhǎng,涨zhǎng,掌zhǎng,漲zhǎng,幥zhǎng,礃zhǎng,鞝zhǎng,鐣zhǎng,丈zhàng,仗zhàng,扙zhàng,杖zhàng,胀zhàng,账zhàng,粀zhàng,帳zhàng,脹zhàng,痮zhàng,障zhàng,墇zhàng,嶂zhàng,幛zhàng,賬zhàng,瘬zhàng,瘴zhàng,瞕zhàng,帐zhàng,鼌zhāo,鼂zhāo,謿zhāo,皽zhāo,佋zhāo,钊zhāo,妱zhāo,巶zhāo,招zhāo,昭zhāo,炤zhāo,盄zhāo,釗zhāo,鉊zhāo,駋zhāo,鍣zhāo,爫zhǎo,沼zhǎo,瑵zhǎo,爪zhǎo,找zhǎo,召zhào,兆zhào,诏zhào,枛zhào,垗zhào,狣zhào,赵zhào,笊zhào,肁zhào,旐zhào,棹zhào,罀zhào,詔zhào,照zhào,罩zhào,肇zhào,肈zhào,趙zhào,曌zhào,燳zhào,鮡zhào,櫂zhào,瞾zhào,羄zhào,啅zhào,龑yan,著zhe,着zhe,蜇zhē,嫬zhē,遮zhē,嗻zhē,摂zhé,歽zhé,砓zhé,籷zhé,虴zhé,哲zhé,埑zhé,粍zhé,袩zhé,啠zhé,悊zhé,晢zhé,晣zhé,辄zhé,喆zhé,蛰zhé,詟zhé,谪zhé,摺zhé,輒zhé,磔zhé,輙zhé,辙zhé,蟄zhé,嚞zhé,謫zhé,鮿zhé,轍zhé,襵zhé,讋zhé,厇zhé,謺zhé,者zhě,锗zhě,赭zhě,褶zhě,鍺zhě,这zhè,柘zhè,浙zhè,這zhè,淛zhè,蔗zhè,樜zhè,鹧zhè,蟅zhè,鷓zhè,趂zhēn,贞zhēn,针zhēn,侦zhēn,浈zhēn,珍zhēn,珎zhēn,貞zhēn,帪zhēn,栕zhēn,眞zhēn,真zhēn,砧zhēn,祯zhēn,針zhēn,偵zhēn,敒zhēn,桭zhēn,酙zhēn,寊zhēn,湞zhēn,遉zhēn,搸zhēn,斟zhēn,楨zhēn,獉zhēn,甄zhēn,禎zhēn,蒖zhēn,蓁zhēn,鉁zhēn,靕zhēn,榛zhēn,殝zhēn,瑧zhēn,禛zhēn,潧zhēn,樼zhēn,澵zhēn,臻zhēn,薽zhēn,錱zhēn,轃zhēn,鍖zhēn,鱵zhēn,胗zhēn,侲zhēn,揕zhēn,鎭zhēn,帧zhēn,幀zhēn,朾zhēn,椹zhēn,桢zhēn,箴zhēn,屒zhén,诊zhěn,抮zhěn,枕zhěn,姫zhěn,弫zhěn,昣zhěn,轸zhěn,畛zhěn,疹zhěn,眕zhěn,袗zhěn,聄zhěn,萙zhěn,裖zhěn,覙zhěn,診zhěn,軫zhěn,缜zhěn,稹zhěn,駗zhěn,縝zhěn,縥zhěn,辴zhěn,鬒zhěn,嫃zhěn,謓zhèn,迧zhèn,圳zhèn,阵zhèn,纼zhèn,挋zhèn,陣zhèn,鸩zhèn,振zhèn,朕zhèn,栚zhèn,紖zhèn,眹zhèn,赈zhèn,塦zhèn,絼zhèn,蜄zhèn,敶zhèn,誫zhèn,賑zhèn,鋴zhèn,镇zhèn,鴆zhèn,鎮zhèn,震zhèn,嶒zhēng,脀zhēng,凧zhēng,争zhēng,佂zhēng,姃zhēng,征zhēng,怔zhēng,爭zhēng,峥zhēng,炡zhēng,狰zhēng,烝zhēng,眐zhēng,钲zhēng,埩zhēng,崝zhēng,崢zhēng,猙zhēng,睁zhēng,聇zhēng,铮zhēng,媜zhēng,筝zhēng,徰zhēng,蒸zhēng,鉦zhēng,箏zhēng,徵zhēng,踭zhēng,篜zhēng,錚zhēng,鬇zhēng,癥zhēng,糽zhēng,睜zhēng,氶zhěng,抍zhěng,拯zhěng,塣zhěng,晸zhěng,愸zhěng,撜zhěng,整zhěng,憕zhèng,徎zhèng,挣zhèng,掙zhèng,正zhèng,证zhèng,诤zhèng,郑zhèng,政zhèng,症zhèng,証zhèng,鄭zhèng,鴊zhèng,證zhèng,諍zhèng,之zhī,支zhī,卮zhī,汁zhī,芝zhī,巵zhī,枝zhī,知zhī,织zhī,肢zhī,徔zhī,栀zhī,祗zhī,秓zhī,秖zhī,胑zhī,胝zhī,衼zhī,倁zhī,疷zhī,祬zhī,秪zhī,脂zhī,隻zhī,梔zhī,椥zhī,搘zhī,禔zhī,綕zhī,榰zhī,蜘zhī,馶zhī,鳷zhī,謢zhī,鴲zhī,織zhī,蘵zhī,鼅zhī,禵zhī,只zhī,鉄zhí,执zhí,侄zhí,坧zhí,直zhí,姪zhí,値zhí,值zhí,聀zhí,釞zhí,埴zhí,執zhí,职zhí,植zhí,殖zhí,絷zhí,跖zhí,墌zhí,摭zhí,馽zhí,嬂zhí,慹zhí,漐zhí,踯zhí,膱zhí,縶zhí,職zhí,蟙zhí,蹠zhí,軄zhí,躑zhí,秇zhí,埶zhí,戠zhí,禃zhí,茝zhǐ,絺zhǐ,觝zhǐ,徴zhǐ,止zhǐ,凪zhǐ,劧zhǐ,旨zhǐ,阯zhǐ,址zhǐ,坁zhǐ,帋zhǐ,沚zhǐ,纸zhǐ,芷zhǐ,抧zhǐ,祉zhǐ,茋zhǐ,咫zhǐ,恉zhǐ,指zhǐ,枳zhǐ,洔zhǐ,砋zhǐ,轵zhǐ,淽zhǐ,疻zhǐ,紙zhǐ,訨zhǐ,趾zhǐ,軹zhǐ,黹zhǐ,酯zhǐ,藢zhǐ,襧zhǐ,汦zhǐ,胵zhì,歭zhì,遟zhì,迣zhì,鶨zhì,亊zhì,銴zhì,至zhì,芖zhì,志zhì,忮zhì,扻zhì,豸zhì,厔zhì,垁zhì,帙zhì,帜zhì,治zhì,炙zhì,质zhì,郅zhì,俧zhì,峙zhì,庢zhì,庤zhì,栉zhì,洷zhì,祑zhì,陟zhì,娡zhì,徏zhì,挚zhì,晊zhì,桎zhì,狾zhì,秩zhì,致zhì,袟zhì,贽zhì,轾zhì,徝zhì,掷zhì,梽zhì,猘zhì,畤zhì,痔zhì,秲zhì,秷zhì,窒zhì,紩zhì,翐zhì,袠zhì,觗zhì,貭zhì,铚zhì,鸷zhì,傂zhì,崻zhì,彘zhì,智zhì,滞zhì,痣zhì,蛭zhì,骘zhì,廌zhì,滍zhì,稙zhì,稚zhì,置zhì,跱zhì,輊zhì,锧zhì,雉zhì,槜zhì,滯zhì,潌zhì,瘈zhì,製zhì,覟zhì,誌zhì,銍zhì,幟zhì,憄zhì,摯zhì,潪zhì,熫zhì,稺zhì,膣zhì,觯zhì,質zhì,踬zhì,鋕zhì,旘zhì,瀄zhì,緻zhì,隲zhì,鴙zhì,儨zhì,劕zhì,懥zhì,擲zhì,櫛zhì,懫zhì,贄zhì,櫍zhì,瓆zhì,觶zhì,騭zhì,礩zhì,豑zhì,騺zhì,驇zhì,躓zhì,鷙zhì,鑕zhì,豒zhì,制zhì,偫zhì,筫zhì,駤zhì,徸zhōng,蝩zhōng,中zhōng,伀zhōng,汷zhōng,刣zhōng,妐zhōng,彸zhōng,忠zhōng,炂zhōng,终zhōng,柊zhōng,盅zhōng,衳zhōng,钟zhōng,舯zhōng,衷zhōng,終zhōng,鈡zhōng,幒zhōng,蔠zhōng,锺zhōng,螤zhōng,鴤zhōng,螽zhōng,鍾zhōng,鼨zhōng,蹱zhōng,鐘zhōng,籦zhōng,衆zhōng,迚zhōng,肿zhǒng,种zhǒng,冢zhǒng,喠zhǒng,尰zhǒng,塚zhǒng,歱zhǒng,腫zhǒng,瘇zhǒng,種zhǒng,踵zhǒng,煄zhǒng,緟zhòng,仲zhòng,众zhòng,妕zhòng,狆zhòng,祌zhòng,茽zhòng,衶zhòng,重zhòng,蚛zhòng,偅zhòng,眾zhòng,堹zhòng,媑zhòng,筗zhòng,諥zhòng,啁zhōu,州zhōu,舟zhōu,诌zhōu,侜zhōu,周zhōu,洲zhōu,炿zhōu,诪zhōu,珘zhōu,辀zhōu,郮zhōu,婤zhōu,徟zhōu,矪zhōu,週zhōu,喌zhōu,粥zhōu,赒zhōu,輈zhōu,銂zhōu,賙zhōu,輖zhōu,霌zhōu,駲zhōu,嚋zhōu,盩zhōu,謅zhōu,譸zhōu,僽zhōu,諏zhōu,烐zhōu,妯zhóu,轴zhóu,軸zhóu,碡zhóu,肘zhǒu,帚zhǒu,菷zhǒu,晭zhǒu,睭zhǒu,箒zhǒu,鯞zhǒu,疛zhǒu,椆zhòu,詶zhòu,薵zhòu,纣zhòu,伷zhòu,呪zhòu,咒zhòu,宙zhòu,绉zhòu,冑zhòu,咮zhòu,昼zhòu,紂zhòu,胄zhòu,荮zhòu,晝zhòu,皱zhòu,酎zhòu,粙zhòu,葤zhòu,詋zhòu,甃zhòu,皺zhòu,駎zhòu,噣zhòu,縐zhòu,骤zhòu,籕zhòu,籒zhòu,驟zhòu,籀zhòu,蕏zhū,藷zhū,朱zhū,劯zhū,侏zhū,诛zhū,邾zhū,洙zhū,茱zhū,株zhū,珠zhū,诸zhū,猪zhū,硃zhū,袾zhū,铢zhū,絑zhū,蛛zhū,誅zhū,跦zhū,槠zhū,潴zhū,蝫zhū,銖zhū,橥zhū,諸zhū,豬zhū,駯zhū,鮢zhū,瀦zhū,櫧zhū,櫫zhū,鼄zhū,鯺zhū,蠩zhū,秼zhū,騶zhū,鴸zhū,薥zhú,鸀zhú,朮zhú,竹zhú,竺zhú,炢zhú,茿zhú,烛zhú,逐zhú,笜zhú,舳zhú,瘃zhú,蓫zhú,燭zhú,蠋zhú,躅zhú,鱁zhú,劚zhú,孎zhú,灟zhú,斸zhú,曯zhú,欘zhú,蠾zhú,钃zhú,劅zhú,斀zhú,爥zhú,主zhǔ,宔zhǔ,拄zhǔ,砫zhǔ,罜zhǔ,渚zhǔ,煑zhǔ,煮zhǔ,詝zhǔ,嘱zhǔ,濐zhǔ,麈zhǔ,瞩zhǔ,囑zhǔ,矚zhǔ,尌zhù,伫zhù,佇zhù,住zhù,助zhù,纻zhù,苎zhù,坾zhù,杼zhù,苧zhù,贮zhù,驻zhù,壴zhù,柱zhù,柷zhù,殶zhù,炷zhù,祝zhù,疰zhù,眝zhù,祩zhù,竚zhù,莇zhù,紵zhù,紸zhù,羜zhù,蛀zhù,嵀zhù,筑zhù,註zhù,貯zhù,跓zhù,軴zhù,铸zhù,筯zhù,鉒zhù,馵zhù,墸zhù,箸zhù,翥zhù,樦zhù,鋳zhù,駐zhù,築zhù,篫zhù,霔zhù,麆zhù,鑄zhù,櫡zhù,注zhù,飳zhù,抓zhuā,檛zhuā,膼zhuā,髽zhuā,跩zhuǎi,睉zhuài,拽zhuài,耑zhuān,专zhuān,専zhuān,砖zhuān,專zhuān,鄟zhuān,瑼zhuān,膞zhuān,磚zhuān,諯zhuān,蟤zhuān,顓zhuān,颛zhuān,转zhuǎn,転zhuǎn,竱zhuǎn,轉zhuǎn,簨zhuàn,灷zhuàn,啭zhuàn,堟zhuàn,蒃zhuàn,瑑zhuàn,僎zhuàn,撰zhuàn,篆zhuàn,馔zhuàn,饌zhuàn,囀zhuàn,籑zhuàn,僝zhuàn,妆zhuāng,追zhuī,骓zhuī,椎zhuī,锥zhuī,錐zhuī,騅zhuī,鵻zhuī,沝zhuǐ,倕zhuì,埀zhuì,腏zhuì,笍zhuì,娷zhuì,缀zhuì,惴zhuì,甀zhuì,缒zhuì,畷zhuì,膇zhuì,墜zhuì,綴zhuì,赘zhuì,縋zhuì,諈zhuì,醊zhuì,錣zhuì,餟zhuì,礈zhuì,贅zhuì,轛zhuì,鑆zhuì,坠zhuì,湻zhūn,宒zhūn,迍zhūn,肫zhūn,窀zhūn,谆zhūn,諄zhūn,衠zhūn,訰zhūn,准zhǔn,準zhǔn,綧zhǔn,稕zhǔn,凖zhǔn,鐯zhuo,拙zhuō,炪zhuō,倬zhuō,捉zhuō,桌zhuō,涿zhuō,棳zhuō,琸zhuō,窧zhuō,槕zhuō,蠿zhuō,矠zhuó,卓zhuó,圴zhuó,犳zhuó,灼zhuó,妰zhuó,茁zhuó,斫zhuó,浊zhuó,丵zhuó,浞zhuó,诼zhuó,酌zhuó,啄zhuó,娺zhuó,梲zhuó,斮zhuó,晫zhuó,椓zhuó,琢zhuó,斱zhuó,硺zhuó,窡zhuó,罬zhuó,撯zhuó,擆zhuó,斲zhuó,禚zhuó,諁zhuó,諑zhuó,濁zhuó,擢zhuó,斵zhuó,濯zhuó,镯zhuó,鵫zhuó,灂zhuó,蠗zhuó,鐲zhuó,籗zhuó,鷟zhuó,籱zhuó,烵zhuó,謶zhuó,薋zī,菑zī,吱zī,孜zī,茊zī,兹zī,咨zī,姕zī,姿zī,茲zī,栥zī,紎zī,赀zī,资zī,崰zī,淄zī,秶zī,缁zī,谘zī,赼zī,嗞zī,嵫zī,椔zī,湽zī,滋zī,粢zī,葘zī,辎zī,鄑zī,孶zī,禌zī,觜zī,貲zī,資zī,趑zī,锱zī,緇zī,鈭zī,镃zī,龇zī,輜zī,鼒zī,澬zī,諮zī,趦zī,輺zī,錙zī,髭zī,鲻zī,鍿zī,頾zī,頿zī,鯔zī,鶅zī,鰦zī,齜zī,訾zī,訿zī,芓zī,孳zī,鎡zī,茈zǐ,泚zǐ,籽zǐ,子zǐ,姉zǐ,姊zǐ,杍zǐ,矷zǐ,秄zǐ,呰zǐ,秭zǐ,耔zǐ,虸zǐ,笫zǐ,梓zǐ,釨zǐ,啙zǐ,紫zǐ,滓zǐ,榟zǐ,橴zǐ,自zì,茡zì,倳zì,剚zì,恣zì,牸zì,渍zì,眥zì,眦zì,胔zì,胾zì,漬zì,字zì,唨zo,潨zōng,宗zōng,倧zōng,综zōng,骔zōng,堫zōng,嵏zōng,嵕zōng,惾zōng,棕zōng,猣zōng,腙zōng,葼zōng,朡zōng,椶zōng,嵸zōng,稯zōng,緃zōng,熧zōng,緵zōng,翪zōng,蝬zōng,踨zōng,踪zōng,磫zōng,豵zōng,蹤zōng,騌zōng,鬃zōng,騣zōng,鬉zōng,鯮zōng,鯼zōng,鑁zōng,綜zōng,潀zóng,潈zóng,蓯zǒng,熜zǒng,緫zǒng,总zǒng,偬zǒng,捴zǒng,惣zǒng,愡zǒng,揔zǒng,搃zǒng,傯zǒng,蓗zǒng,摠zǒng,総zǒng,燪zǒng,總zǒng,鍯zǒng,鏓zǒng,縦zǒng,縂zǒng,纵zòng,昮zòng,疭zòng,倊zòng,猔zòng,碂zòng,粽zòng,糉zòng,瘲zòng,錝zòng,縱zòng,邹zōu,驺zōu,诹zōu,陬zōu,菆zōu,棷zōu,棸zōu,鄒zōu,緅zōu,鄹zōu,鯫zōu,黀zōu,齺zōu,芻zōu,鲰zōu,辶zǒu,赱zǒu,走zǒu,鯐zǒu,搊zǒu,奏zòu,揍zòu,租zū,菹zū,錊zū,伜zú,倅zú,紣zú,綷zú,顇zú,卆zú,足zú,卒zú,哫zú,崒zú,崪zú,族zú,稡zú,箤zú,踤zú,踿zú,镞zú,鏃zú,诅zǔ,阻zǔ,俎zǔ,爼zǔ,祖zǔ,組zǔ,詛zǔ,靻zǔ,鎺zǔ,组zǔ,鉆zuān,劗zuān,躜zuān,鑚zuān,躦zuān,繤zuǎn,缵zuǎn,纂zuǎn,纉zuǎn,籫zuǎn,纘zuǎn,欑zuàn,赚zuàn,賺zuàn,鑽zuàn,钻zuàn,攥zuàn,厜zuī,嗺zuī,樶zuī,蟕zuī,纗zuī,嶉zuǐ,槯zuǐ,嶊zuǐ,噿zuǐ,濢zuǐ,璻zuǐ,嘴zuǐ,睟zuì,枠zuì,栬zuì,絊zuì,酔zuì,晬zuì,最zuì,祽zuì,罪zuì,辠zuì,蕞zuì,醉zuì,嶵zuì,檇zuì,檌zuì,穝zuì,墫zūn,尊zūn,嶟zūn,遵zūn,樽zūn,繜zūn,罇zūn,鶎zūn,鐏zūn,鱒zūn,鷷zūn,鳟zūn,僔zǔn,噂zǔn,撙zǔn,譐zǔn,拵zùn,捘zùn,銌zùn,咗zuo,昨zuó,秨zuó,捽zuó,椊zuó,稓zuó,筰zuó,鈼zuó,阝zuǒ,左zuǒ,佐zuǒ,繓zuǒ,酢zuò,作zuò,坐zuò,阼zuò,岝zuò,岞zuò,怍zuò,侳zuò,祚zuò,胙zuò,唑zuò,座zuò,袏zuò,做zuò,葄zuò,蓙zuò,飵zuò,糳zuò,疮chuāng,牕chuāng,噇chuáng,闖chuǎng,剏chuàng,霜shuāng,欆shuāng,驦shuāng,慡shuǎng,灀shuàng,窓chuāng,瘡chuāng,闯chuǎng,仺chuàng,剙chuàng,雙shuāng,礵shuāng,鸘shuāng,樉shuǎng,谁shuí,鹴shuāng,爽shuǎng,鏯shuǎng,孀shuāng,孇shuāng,騻shuāng,焋zhuàng,幢zhuàng,撞zhuàng,隹zhuī,傱shuǎn,\";\n"
  },
  {
    "path": "static/cherry/pinyin/hanziPinyinWithoutYin.js",
    "content": "exports.hzpy=\"吖a,阿a,啊a,锕a,錒a,嗄a,厑ae,哎ai,哀ai,唉ai,埃ai,挨ai,溾ai,锿ai,鎄ai,啀ai,捱ai,皑ai,凒ai,嵦ai,溰ai,嘊ai,敱ai,敳ai,皚ai,癌ai,娾ai,隑ai,剴ai,騃ai,毐ai,昹ai,矮ai,蔼ai,躷ai,濭ai,藹ai,譪ai,霭ai,靄ai,鯦ai,噯ai,艾ai,伌ai,爱ai,砹ai,硋ai,隘ai,嗌ai,塧ai,嫒ai,愛ai,碍ai,叆ai,暧ai,瑷ai,僾ai,壒ai,嬡ai,懓ai,薆ai,懝ai,曖ai,賹ai,餲ai,鴱ai,皧ai,瞹ai,馤ai,礙ai,譺ai,鑀ai,鱫ai,靉ai,閡ai,欬ai,焥ai,堨ai,乂ai,嗳ai,璦ai,安an,侒an,峖an,桉an,氨an,庵an,谙an,媕an,萻an,葊an,痷an,腤an,鹌an,蓭an,誝an,鞌an,鞍an,盦an,闇an,馣an,鮟an,盫an,鵪an,韽an,鶕an,啽an,厰an,鴳an,諳an,玵an,雸an,儑an,垵an,俺an,唵an,埯an,铵an,隌an,揞an,晻an,罯an,銨an,碪an,犴an,岸an,按an,洝an,荌an,案an,胺an,豻an,堓an,婩an,貋an,錌an,黯an,頇an,屽an,垾an,遃an,暗an,肮ang,骯ang,岇ang,昂ang,昻ang,卬ang,枊ang,盎ang,醠ang,凹ao,垇ao,柪ao,軪ao,爊ao,熝ao,眑ao,泑ao,梎ao,敖ao,厫ao,隞ao,嗷ao,嗸ao,嶅ao,廒ao,滶ao,獒ao,獓ao,遨ao,摮ao,璈ao,蔜ao,磝ao,翱ao,聱ao,螯ao,翶ao,謷ao,翺ao,鳌ao,鏖ao,鰲ao,鷔ao,鼇ao,慠ao,鏕ao,嚻ao,熬ao,抝ao,芺ao,袄ao,媪ao,镺ao,媼ao,襖ao,郩ao,鴁ao,蝹ao,坳ao,岙ao,扷ao,岰ao,傲ao,奡ao,奥ao,嫯ao,奧ao,澚ao,墺ao,嶴ao,澳ao,懊ao,擙ao,謸ao,鏊ao,驁ao,骜ao,吧ba,八ba,仈ba,巴ba,叭ba,扒ba,朳ba,玐ba,夿ba,岜ba,芭ba,疤ba,哵ba,捌ba,笆ba,粑ba,紦ba,羓ba,蚆ba,釟ba,鲃ba,魞ba,鈀ba,柭ba,丷ba,峇ba,豝ba,叐ba,犮ba,抜ba,坺ba,妭ba,拔ba,茇ba,炦ba,癹ba,胈ba,釛ba,菝ba,詙ba,跋ba,軷ba,颰ba,魃ba,墢ba,鼥ba,把ba,钯ba,靶ba,坝ba,弝ba,爸ba,罢ba,鲅ba,罷ba,鮁ba,覇ba,矲ba,霸ba,壩ba,灞ba,欛ba,鲌ba,鮊ba,皅ba,挀bai,掰bai,白bai,百bai,佰bai,柏bai,栢bai,捭bai,竡bai,粨bai,絔bai,摆bai,擺bai,襬bai,庍bai,拝bai,败bai,拜bai,敗bai,稗bai,粺bai,鞁bai,薭bai,贁bai,韛bai,扳ban,攽ban,朌ban,班ban,般ban,颁ban,斑ban,搬ban,斒ban,頒ban,瘢ban,螁ban,螌ban,褩ban,癍ban,辬ban,籓ban,肦ban,鳻ban,搫ban,阪ban,坂ban,岅ban,昄ban,板ban,版ban,钣ban,粄ban,舨ban,鈑ban,蝂ban,魬ban,覂ban,瓪ban,办ban,半ban,伴ban,扮ban,姅ban,怑ban,拌ban,绊ban,秚ban,湴ban,絆ban,鉡ban,靽ban,辦ban,瓣ban,跘ban,邦bang,峀bang,垹bang,帮bang,捠bang,梆bang,浜bang,邫bang,幚bang,縍bang,幫bang,鞤bang,幇bang,绑bang,綁bang,榜bang,牓bang,膀bang,騯bang,玤bang,蚌bang,傍bang,棒bang,棓bang,硥bang,谤bang,塝bang,徬bang,稖bang,蒡bang,蜯bang,镑bang,艕bang,謗bang,鎊bang,埲bang,蚄bang,蛖bang,嫎bang,勹bao,包bao,佨bao,孢bao,胞bao,剝bao,笣bao,煲bao,龅bao,蕔bao,褒bao,闁bao,襃bao,齙bao,剥bao,枹bao,裦bao,苞bao,窇bao,嫑bao,雹bao,铇bao,薄bao,宝bao,怉bao,饱bao,保bao,鸨bao,珤bao,堡bao,堢bao,媬bao,葆bao,寚bao,飹bao,飽bao,褓bao,駂bao,鳵bao,緥bao,賲bao,藵bao,寳bao,寶bao,靌bao,宀bao,鴇bao,勽bao,报bao,抱bao,豹bao,菢bao,袌bao,報bao,鉋bao,鲍bao,靤bao,骲bao,暴bao,髱bao,虣bao,鮑bao,儤bao,曓bao,爆bao,忁bao,鑤bao,蚫bao,瀑bao,萡be,呗bei,唄bei,陂bei,卑bei,盃bei,桮bei,悲bei,揹bei,碑bei,鹎bei,藣bei,鵯bei,柸bei,錍bei,椑bei,諀bei,杯bei,喺bei,北bei,鉳bei,垻bei,贝bei,狈bei,貝bei,邶bei,备bei,昁bei,牬bei,苝bei,背bei,钡bei,俻bei,倍bei,悖bei,狽bei,被bei,偝bei,偹bei,梖bei,珼bei,備bei,僃bei,惫bei,焙bei,琲bei,軰bei,辈bei,愂bei,碚bei,禙bei,蓓bei,蛽bei,犕bei,褙bei,誖bei,骳bei,輩bei,鋇bei,憊bei,糒bei,鞴bei,鐾bei,鐴bei,杮bei,韝bei,棑bei,哱bei,鄁bei,奔ben,泍ben,贲ben,倴ben,渀ben,逩ben,犇ben,賁ben,錛ben,喯ben,锛ben,本ben,苯ben,奙ben,畚ben,楍ben,翉ben,夲ben,坌ben,捹ben,桳ben,笨ben,撪ben,獖ben,輽ben,炃ben,燌ben,夯ben,伻beng,祊beng,奟beng,崩beng,绷beng,絣beng,閍beng,嵭beng,痭beng,嘣beng,綳beng,繃beng,嗙beng,挷beng,傰beng,搒beng,甭beng,埄beng,菶beng,琣beng,鞛beng,琫beng,泵beng,迸beng,逬beng,跰beng,塴beng,甏beng,镚beng,蹦beng,鏰beng,錋beng,皀bi,屄bi,偪bi,毴bi,逼bi,豍bi,螕bi,鲾bi,鎞bi,鵖bi,鰏bi,悂bi,鈚bi,柲bi,荸bi,鼻bi,嬶bi,匕bi,比bi,夶bi,朼bi,佊bi,妣bi,沘bi,疕bi,彼bi,柀bi,秕bi,俾bi,笔bi,粃bi,粊bi,舭bi,啚bi,筆bi,鄙bi,聛bi,貏bi,箄bi,崥bi,魮bi,娝bi,箃bi,吡bi,匂bi,币bi,必bi,毕bi,闭bi,佖bi,坒bi,庇bi,诐bi,邲bi,妼bi,怭bi,枈bi,畀bi,苾bi,哔bi,毖bi,珌bi,疪bi,胇bi,荜bi,陛bi,毙bi,狴bi,畢bi,袐bi,铋bi,婢bi,庳bi,敝bi,梐bi,萆bi,萞bi,閇bi,閉bi,堛bi,弻bi,弼bi,愊bi,愎bi,湢bi,皕bi,禆bi,筚bi,貱bi,赑bi,嗶bi,彃bi,楅bi,滗bi,滭bi,煏bi,痹bi,痺bi,腷bi,蓖bi,蓽bi,蜌bi,裨bi,跸bi,鉍bi,閟bi,飶bi,幣bi,弊bi,熚bi,獙bi,碧bi,稫bi,箅bi,箆bi,綼bi,蔽bi,馝bi,幤bi,潷bi,獘bi,罼bi,襅bi,駜bi,髲bi,壁bi,嬖bi,廦bi,篦bi,篳bi,縪bi,薜bi,觱bi,避bi,鮅bi,斃bi,濞bi,臂bi,蹕bi,鞞bi,髀bi,奰bi,璧bi,鄨bi,饆bi,繴bi,襞bi,鏎bi,鞸bi,韠bi,躃bi,躄bi,魓bi,贔bi,驆bi,鷝bi,鷩bi,鼊bi,咇bi,鮩bi,畐bi,踾bi,鶝bi,闬bi,閈bi,祕bi,鴓bi,怶bi,旇bi,翍bi,肶bi,笓bi,鸊bi,肸bi,畁bi,詖bi,鄪bi,襣bi,边bian,砭bian,笾bian,猵bian,编bian,萹bian,煸bian,牑bian,甂bian,箯bian,編bian,蝙bian,獱bian,邉bian,鍽bian,鳊bian,邊bian,鞭bian,鯿bian,籩bian,糄bian,揙bian,臱bian,鯾bian,炞bian,贬bian,扁bian,窆bian,匾bian,貶bian,惼bian,碥bian,稨bian,褊bian,鴘bian,藊bian,釆bian,辧bian,疺bian,覵bian,鶣bian,卞bian,弁bian,忭bian,抃bian,汳bian,汴bian,苄bian,峅bian,便bian,变bian,変bian,昪bian,覍bian,缏bian,遍bian,閞bian,辡bian,緶bian,艑bian,辨bian,辩bian,辫bian,辮bian,辯bian,變bian,彪biao,标biao,飑biao,骉biao,髟biao,淲biao,猋biao,脿biao,墂biao,幖biao,滮biao,蔈biao,骠biao,標biao,熛biao,膘biao,麃biao,瘭biao,镖biao,飙biao,飚biao,儦biao,颷biao,瀌biao,藨biao,謤biao,爂biao,臕biao,贆biao,鏢biao,穮biao,镳biao,飆biao,飇biao,飈biao,飊biao,驃biao,鑣biao,驫biao,摽biao,膔biao,篻biao,僄biao,徱biao,表biao,婊biao,裱biao,褾biao,錶biao,檦biao,諘biao,俵biao,鳔biao,鰾biao,憋bie,鳖bie,鱉bie,鼈bie,虌bie,龞bie,蟞bie,別bie,别bie,莂bie,蛂bie,徶bie,襒bie,蹩bie,穪bie,瘪bie,癟bie,彆bie,汃bin,邠bin,砏bin,宾bin,彬bin,斌bin,椕bin,滨bin,缤bin,槟bin,瑸bin,豩bin,賓bin,賔bin,镔bin,儐bin,濒bin,濱bin,濵bin,虨bin,豳bin,璸bin,瀕bin,霦bin,繽bin,蠙bin,鑌bin,顮bin,檳bin,玢bin,訜bin,傧bin,氞bin,摈bin,殡bin,膑bin,髩bin,擯bin,鬂bin,臏bin,髌bin,鬓bin,髕bin,鬢bin,殯bin,仌bing,氷bing,冰bing,兵bing,栟bing,掤bing,梹bing,鋲bing,幷bing,丙bing,邴bing,陃bing,怲bing,抦bing,秉bing,苪bing,昞bing,昺bing,柄bing,炳bing,饼bing,眪bing,窉bing,蛃bing,禀bing,鈵bing,鉼bing,鞆bing,餅bing,餠bing,燷bing,庰bing,偋bing,寎bing,綆bing,稟bing,癛bing,癝bing,琕bing,棅bing,并bing,並bing,併bing,垪bing,倂bing,栤bing,病bing,竝bing,傡bing,摒bing,誁bing,靐bing,疒bing,啵bo,蔔bo,卜bo,噃bo,趵bo,癶bo,拨bo,波bo,玻bo,袚bo,袯bo,钵bo,饽bo,紴bo,缽bo,菠bo,碆bo,鉢bo,僠bo,嶓bo,撥bo,播bo,餑bo,磻bo,蹳bo,驋bo,鱍bo,帗bo,盋bo,脖bo,仢bo,伯bo,孛bo,犻bo,驳bo,帛bo,泊bo,狛bo,苩bo,侼bo,勃bo,胉bo,郣bo,亳bo,挬bo,浡bo,瓟bo,秡bo,钹bo,铂bo,桲bo,淿bo,舶bo,博bo,渤bo,湐bo,葧bo,鹁bo,愽bo,搏bo,猼bo,鈸bo,鉑bo,馎bo,僰bo,煿bo,箔bo,膊bo,艊bo,馛bo,駁bo,踣bo,鋍bo,镈bo,壆bo,馞bo,駮bo,豰bo,嚗bo,懪bo,礡bo,簙bo,鎛bo,餺bo,鵓bo,犦bo,髆bo,髉bo,欂bo,襮bo,礴bo,鑮bo,肑bo,茀bo,袹bo,穛bo,彴bo,瓝bo,牔bo,蚾bo,箥bo,跛bo,簸bo,孹bo,擘bo,檗bo,糪bo,譒bo,蘗bo,襎bo,檘bo,蔢bo,峬bu,庯bu,逋bu,钸bu,晡bu,鈽bu,誧bu,餔bu,鵏bu,秿bu,陠bu,鯆bu,轐bu,醭bu,不bu,輹bu,卟bu,补bu,哺bu,捕bu,補bu,鳪bu,獛bu,鸔bu,擈bu,佈bu,吥bu,步bu,咘bu,怖bu,歨bu,歩bu,钚bu,勏bu,埗bu,悑bu,捗bu,荹bu,部bu,埠bu,瓿bu,鈈bu,廍bu,蔀bu,踄bu,郶bu,篰bu,餢bu,簿bu,尃bu,箁bu,抪bu,柨bu,布bu,擦ca,攃ca,礤ca,礸ca,遪ca,偲cai,猜cai,揌cai,才cai,材cai,财cai,財cai,戝cai,裁cai,采cai,倸cai,埰cai,婇cai,寀cai,彩cai,採cai,睬cai,跴cai,綵cai,踩cai,菜cai,棌cai,蔡cai,縩cai,乲cal,参can,參can,飡can,骖can,喰can,湌can,傪can,嬠can,餐can,驂can,嵾can,飱can,残can,蚕can,惭can,殘can,慚can,蝅can,慙can,蠶can,蠺can,惨can,慘can,噆can,憯can,黪can,黲can,灿can,粲can,儏can,澯can,薒can,燦can,璨can,爘can,謲can,仓cang,沧cang,苍cang,倉cang,舱cang,凔cang,嵢cang,滄cang,獊cang,蒼cang,濸cang,艙cang,螥cang,罉cang,藏cang,欌cang,鑶cang,賶cang,撡cao,操cao,糙cao,曺cao,嘈cao,嶆cao,漕cao,蓸cao,槽cao,褿cao,艚cao,螬cao,鏪cao,慒cao,曹cao,艹cao,艸cao,草cao,愺cao,懆cao,騲cao,慅cao,肏cao,鄵cao,襙cao,冊ce,册ce,侧ce,厕ce,恻ce,拺ce,测ce,荝ce,敇ce,側ce,粣ce,萗ce,廁ce,惻ce,測ce,策ce,萴ce,筞ce,蓛ce,墄ce,箣ce,憡ce,刂ce,厠ce,膥cen,岑cen,梣cen,涔cen,硶cen,噌ceng,层ceng,層ceng,竲ceng,驓ceng,曾ceng,蹭ceng,硛ceok,硳ceok,岾ceom,猠ceon,乽ceor,嚓cha,叉cha,扠cha,芆cha,杈cha,肞cha,臿cha,訍cha,偛cha,嗏cha,插cha,銟cha,锸cha,艖cha,疀cha,鍤cha,鎈cha,垞cha,查cha,査cha,茬cha,茶cha,嵖cha,猹cha,靫cha,槎cha,察cha,碴cha,褨cha,檫cha,搽cha,衩cha,镲cha,鑔cha,奼cha,汊cha,岔cha,侘cha,诧cha,剎cha,姹cha,差cha,紁cha,詫cha,拆chai,钗chai,釵chai,犲chai,侪chai,柴chai,祡chai,豺chai,儕chai,喍chai,虿chai,袃chai,瘥chai,蠆chai,囆chai,辿chan,觇chan,梴chan,掺chan,搀chan,覘chan,裧chan,摻chan,鋓chan,幨chan,襜chan,攙chan,嚵chan,脠chan,婵chan,谗chan,孱chan,棎chan,湹chan,禅chan,馋chan,嬋chan,煘chan,缠chan,獑chan,蝉chan,誗chan,鋋chan,儃chan,廛chan,潹chan,潺chan,緾chan,磛chan,禪chan,毚chan,鄽chan,瀍chan,蟬chan,儳chan,劖chan,蟾chan,酁chan,壥chan,巉chan,瀺chan,纏chan,纒chan,躔chan,艬chan,讒chan,鑱chan,饞chan,繟chan,澶chan,镵chan,产chan,刬chan,旵chan,丳chan,浐chan,剗chan,谄chan,產chan,産chan,铲chan,阐chan,蒇chan,剷chan,嵼chan,摌chan,滻chan,幝chan,蕆chan,諂chan,閳chan,燀chan,簅chan,冁chan,醦chan,闡chan,囅chan,灛chan,讇chan,墠chan,骣chan,鏟chan,忏chan,硟chan,摲chan,懴chan,颤chan,懺chan,羼chan,韂chan,顫chan,伥chang,昌chang,倀chang,娼chang,淐chang,猖chang,菖chang,阊chang,晿chang,椙chang,琩chang,裮chang,锠chang,錩chang,閶chang,鲳chang,鯧chang,鼚chang,兏chang,肠chang,苌chang,尝chang,偿chang,常chang,徜chang,瓺chang,萇chang,甞chang,腸chang,嘗chang,嫦chang,瑺chang,膓chang,鋿chang,償chang,嚐chang,蟐chang,鲿chang,鏛chang,鱨chang,棖chang,尙chang,厂chang,场chang,昶chang,場chang,敞chang,僘chang,廠chang,氅chang,鋹chang,惝chang,怅chang,玚chang,畅chang,倡chang,鬯chang,唱chang,悵chang,暢chang,畼chang,誯chang,韔chang,抄chao,弨chao,怊chao,欩chao,钞chao,焯chao,超chao,鈔chao,繛chao,樔chao,绰chao,綽chao,綤chao,牊chao,巢chao,巣chao,朝chao,鄛chao,漅chao,嘲chao,潮chao,窲chao,罺chao,轈chao,晁chao,吵chao,炒chao,眧chao,煼chao,麨chao,巐chao,粆chao,仦chao,耖chao,觘chao,趠chao,车che,車che,砗che,唓che,硨che,蛼che,莗che,扯che,偖che,撦che,彻che,坼che,迠che,烢che,聅che,掣che,硩che,頙che,徹che,撤che,澈che,勶che,瞮che,爡che,喢che,賝chen,伧chen,傖chen,抻chen,郴chen,棽chen,琛chen,嗔chen,綝chen,諃chen,尘chen,臣chen,忱chen,沉chen,辰chen,陈chen,茞chen,宸chen,烥chen,莐chen,陳chen,敐chen,晨chen,訦chen,谌chen,揨chen,煁chen,蔯chen,塵chen,樄chen,瘎chen,霃chen,螴chen,諶chen,麎chen,曟chen,鷐chen,薼chen,趻chen,碜chen,墋chen,夦chen,磣chen,踸chen,贂chen,衬chen,疢chen,龀chen,趁chen,榇chen,齓chen,齔chen,嚫chen,谶chen,襯chen,讖chen,瀋chen,称cheng,稱cheng,阷cheng,泟cheng,柽cheng,爯cheng,棦cheng,浾cheng,偁cheng,蛏cheng,铛cheng,牚cheng,琤cheng,赪cheng,憆cheng,摚cheng,靗cheng,撐cheng,撑cheng,緽cheng,橕cheng,瞠cheng,赬cheng,頳cheng,檉cheng,竀cheng,蟶cheng,鏳cheng,鏿cheng,饓cheng,鐺cheng,丞cheng,成cheng,呈cheng,承cheng,枨cheng,诚cheng,郕cheng,乗cheng,城cheng,娍cheng,宬cheng,峸cheng,洆cheng,荿cheng,乘cheng,埕cheng,挰cheng,珹cheng,掁cheng,窚cheng,脭cheng,铖cheng,堘cheng,惩cheng,椉cheng,程cheng,筬cheng,絾cheng,裎cheng,塖cheng,溗cheng,碀cheng,誠cheng,畻cheng,酲cheng,鋮cheng,澄cheng,橙cheng,檙cheng,鯎cheng,瀓cheng,懲cheng,騬cheng,塍cheng,悜cheng,逞cheng,骋cheng,庱cheng,睈cheng,騁cheng,秤cheng,吃chi,妛chi,杘chi,侙chi,哧chi,蚩chi,鸱chi,瓻chi,眵chi,笞chi,訵chi,嗤chi,媸chi,摛chi,痴chi,瞝chi,螭chi,鴟chi,鵄chi,癡chi,魑chi,齝chi,攡chi,麶chi,彲chi,黐chi,蚳chi,摴chi,彨chi,弛chi,池chi,驰chi,迟chi,岻chi,茌chi,持chi,竾chi,淔chi,筂chi,貾chi,遅chi,馳chi,墀chi,踟chi,遲chi,篪chi,謘chi,尺chi,叺chi,呎chi,肔chi,卶chi,齿chi,垑chi,胣chi,恥chi,耻chi,蚇chi,豉chi,欼chi,歯chi,裭chi,鉹chi,褫chi,齒chi,侈chi,彳chi,叱chi,斥chi,灻chi,赤chi,饬chi,抶chi,勅chi,恜chi,炽chi,翄chi,翅chi,烾chi,痓chi,啻chi,湁chi,飭chi,傺chi,痸chi,腟chi,鉓chi,雴chi,憏chi,翤chi,遫chi,慗chi,瘛chi,翨chi,熾chi,懘chi,趩chi,饎chi,鶒chi,鷘chi,餝chi,歗chi,敕chi,充chong,冲chong,忡chong,茺chong,珫chong,翀chong,舂chong,嘃chong,摏chong,憃chong,憧chong,衝chong,罿chong,艟chong,蹖chong,褈chong,傭chong,浺chong,虫chong,崇chong,崈chong,隀chong,蟲chong,宠chong,埫chong,寵chong,沖chong,铳chong,銃chong,抽chou,紬chou,瘳chou,篘chou,犨chou,犫chou,跾chou,掫chou,仇chou,俦chou,栦chou,惆chou,绸chou,菗chou,畴chou,絒chou,愁chou,皗chou,稠chou,筹chou,酧chou,酬chou,綢chou,踌chou,儔chou,雔chou,嬦chou,懤chou,雠chou,疇chou,籌chou,躊chou,讎chou,讐chou,擣chou,燽chou,丑chou,丒chou,吜chou,杽chou,侴chou,瞅chou,醜chou,矁chou,魗chou,臭chou,遚chou,殠chou,榋chu,橻chu,屮chu,出chu,岀chu,初chu,樗chu,貙chu,齣chu,刍chu,除chu,厨chu,滁chu,蒢chu,豠chu,锄chu,耡chu,蒭chu,蜍chu,趎chu,鉏chu,雏chu,犓chu,廚chu,篨chu,鋤chu,橱chu,懨chu,幮chu,櫉chu,蟵chu,躇chu,雛chu,櫥chu,蹰chu,鶵chu,躕chu,媰chu,杵chu,础chu,储chu,楮chu,禇chu,楚chu,褚chu,濋chu,儲chu,檚chu,璴chu,礎chu,齭chu,齼chu,処chu,椘chu,亍chu,处chu,竌chu,怵chu,拀chu,绌chu,豖chu,竐chu,俶chu,敊chu,珿chu,絀chu,處chu,傗chu,琡chu,搐chu,触chu,踀chu,閦chu,儊chu,憷chu,斶chu,歜chu,臅chu,黜chu,觸chu,矗chu,觕chu,畜chu,鄐chu,搋chuai,揣chuai,膗chuai,嘬chuai,踹chuai,膪chuai,巛chuan,川chuan,氚chuan,穿chuan,剶chuan,瑏chuan,传chuan,舡chuan,船chuan,猭chuan,遄chuan,傳chuan,椽chuan,歂chuan,暷chuan,輲chuan,甎chuan,舛chuan,荈chuan,喘chuan,僢chuan,堾chuan,踳chuan,汌chuan,串chuan,玔chuan,钏chuan,釧chuan,賗chuan,刅chuang,炊chui,龡chui,圌chui,垂chui,桘chui,陲chui,捶chui,菙chui,棰chui,槌chui,锤chui,箠chui,顀chui,錘chui,鰆chun,旾chun,杶chun,春chun,萅chun,媋chun,暙chun,椿chun,槆chun,瑃chun,箺chun,蝽chun,橁chun,輴chun,櫄chun,鶞chun,纯chun,陙chun,唇chun,浱chun,純chun,莼chun,淳chun,脣chun,犉chun,滣chun,鹑chun,漘chun,醇chun,醕chun,鯙chun,鶉chun,蒓chun,偆chun,萶chun,惷chun,睶chun,賰chun,蠢chun,踔chuo,戳chuo,啜chuo,辵chuo,娕chuo,娖chuo,惙chuo,涰chuo,逴chuo,辍chuo,酫chuo,龊chuo,擉chuo,磭chuo,歠chuo,嚽chuo,齪chuo,鑡chuo,齱chuo,婼chuo,鋜chuo,輟chuo,呲ci,玼ci,疵ci,趀ci,偨ci,縒ci,跐ci,髊ci,齹ci,枱ci,词ci,珁ci,垐ci,柌ci,祠ci,茨ci,瓷ci,詞ci,辝ci,慈ci,甆ci,辞ci,鈶ci,雌ci,鹚ci,糍ci,辤ci,飺ci,餈ci,嬨ci,濨ci,鴜ci,礠ci,辭ci,鶿ci,鷀ci,磁ci,此ci,佌ci,皉ci,朿ci,次ci,佽ci,刺ci,刾ci,庛ci,茦ci,栨ci,莿ci,絘ci,赐ci,螆ci,賜ci,蛓ci,嗭cis,囱cong,匆cong,囪cong,苁cong,忩cong,枞cong,茐cong,怱cong,悤cong,棇cong,焧cong,葱cong,楤cong,漗cong,聡cong,蔥cong,骢cong,暰cong,樅cong,樬cong,瑽cong,璁cong,聪cong,瞛cong,篵cong,聰cong,蟌cong,繱cong,鏦cong,騘cong,驄cong,聦cong,从cong,從cong,丛cong,従cong,婃cong,孮cong,徖cong,悰cong,淙cong,琮cong,漎cong,誴cong,賨cong,賩cong,樷cong,藂cong,叢cong,灇cong,欉cong,爜cong,憁cong,謥cong,凑cou,湊cou,楱cou,腠cou,辏cou,輳cou,粗cu,麁cu,麄cu,麤cu,徂cu,殂cu,蔖cu,促cu,猝cu,媨cu,瘄cu,蔟cu,誎cu,趗cu,憱cu,醋cu,瘯cu,簇cu,縬cu,鼀cu,蹴cu,蹵cu,顣cu,蹙cu,汆cuan,撺cuan,镩cuan,蹿cuan,攛cuan,躥cuan,鑹cuan,攅cuan,櫕cuan,巑cuan,攢cuan,窜cuan,熶cuan,篡cuan,殩cuan,篹cuan,簒cuan,竄cuan,爨cuan,乼cui,崔cui,催cui,凗cui,墔cui,摧cui,榱cui,獕cui,磪cui,鏙cui,漼cui,慛cui,璀cui,皠cui,熣cui,繀cui,忰cui,疩cui,翆cui,脃cui,脆cui,啐cui,啛cui,悴cui,淬cui,萃cui,毳cui,焠cui,瘁cui,粹cui,膵cui,膬cui,竁cui,臎cui,琗cui,粋cui,脺cui,翠cui,邨cun,村cun,皴cun,澊cun,竴cun,存cun,刌cun,忖cun,寸cun,籿cun,襊cuo,搓cuo,瑳cuo,遳cuo,磋cuo,撮cuo,蹉cuo,醝cuo,虘cuo,嵯cuo,痤cuo,矬cuo,蒫cuo,鹾cuo,鹺cuo,嵳cuo,脞cuo,剉cuo,剒cuo,厝cuo,夎cuo,挫cuo,莝cuo,莡cuo,措cuo,逪cuo,棤cuo,锉cuo,蓌cuo,错cuo,銼cuo,錯cuo,疸da,咑da,哒da,耷da,畣da,搭da,嗒da,噠da,撘da,鎝da,笚da,矺da,褡da,墶da,达da,迏da,迖da,妲da,怛da,垯da,炟da,羍da,荅da,荙da,剳da,匒da,笪da,逹da,溚da,答da,詚da,達da,跶da,瘩da,靼da,薘da,鞑da,燵da,蟽da,鎉da,躂da,鐽da,韃da,龖da,龘da,搨da,繨da,打da,觰da,大da,亣da,眔da,橽da,汏da,呆dai,獃dai,懛dai,歹dai,傣dai,逮dai,代dai,轪dai,侢dai,垈dai,岱dai,帒dai,甙dai,绐dai,迨dai,带dai,待dai,柋dai,殆dai,玳dai,贷dai,帯dai,軑dai,埭dai,帶dai,紿dai,蚮dai,袋dai,軚dai,貸dai,軩dai,瑇dai,廗dai,叇dai,曃dai,緿dai,鮘dai,鴏dai,戴dai,艜dai,黛dai,簤dai,蹛dai,瀻dai,霴dai,襶dai,靆dai,螮dai,蝳dai,跢dai,箉dai,骀dai,怠dai,黱dai,愖dan,丹dan,妉dan,单dan,担dan,単dan,眈dan,砃dan,耼dan,耽dan,郸dan,聃dan,躭dan,酖dan,單dan,媅dan,殚dan,瘅dan,匰dan,箪dan,褝dan,鄲dan,頕dan,儋dan,勯dan,擔dan,殫dan,癉dan,襌dan,簞dan,瓭dan,卩dan,亻dan,娊dan,噡dan,聸dan,伔dan,刐dan,狚dan,玬dan,胆dan,衴dan,紞dan,掸dan,亶dan,馾dan,撣dan,澸dan,黕dan,膽dan,丼dan,抌dan,赕dan,賧dan,黵dan,黮dan,繵dan,譂dan,旦dan,但dan,帎dan,沊dan,泹dan,诞dan,柦dan,疍dan,啖dan,啗dan,弹dan,惮dan,淡dan,蛋dan,啿dan,氮dan,腅dan,蜑dan,觛dan,窞dan,誕dan,僤dan,噉dan,髧dan,嘾dan,彈dan,憚dan,憺dan,澹dan,禫dan,餤dan,駳dan,鴠dan,甔dan,癚dan,嚪dan,贉dan,霮dan,饏dan,蟺dan,倓dan,惔dan,弾dan,醈dan,撢dan,萏dan,当dang,珰dang,裆dang,筜dang,儅dang,噹dang,澢dang,璫dang,襠dang,簹dang,艡dang,蟷dang,當dang,挡dang,党dang,谠dang,擋dang,譡dang,黨dang,灙dang,欓dang,讜dang,氹dang,凼dang,圵dang,宕dang,砀dang,垱dang,荡dang,档dang,菪dang,瓽dang,逿dang,潒dang,碭dang,瞊dang,蕩dang,趤dang,壋dang,檔dang,璗dang,盪dang,礑dang,簜dang,蘯dang,闣dang,愓dang,嵣dang,偒dang,雼dang,裯dao,刀dao,叨dao,屶dao,忉dao,氘dao,舠dao,釖dao,鱽dao,魛dao,虭dao,捯dao,导dao,岛dao,陦dao,倒dao,宲dao,捣dao,祷dao,禂dao,搗dao,隝dao,嶋dao,嶌dao,槝dao,導dao,隯dao,壔dao,嶹dao,蹈dao,禱dao,菿dao,島dao,帱dao,幬dao,到dao,悼dao,盗dao,椡dao,盜dao,道dao,稲dao,翢dao,噵dao,稻dao,衜dao,檤dao,衟dao,翿dao,軇dao,瓙dao,纛dao,箌dao,的de,嘚de,恴de,得de,淂de,悳de,惪de,锝de,徳de,德de,鍀de,棏de,揼dem,扥den,扽den,灯deng,登deng,豋deng,噔deng,嬁deng,燈deng,璒deng,竳deng,簦deng,艠deng,覴deng,蹬deng,墱deng,戥deng,等deng,澂deng,邓deng,僜deng,凳deng,鄧deng,隥deng,嶝deng,瞪deng,磴deng,镫deng,櫈deng,鐙deng,仾di,低di,奃di,彽di,袛di,啲di,埞di,羝di,隄di,堤di,趆di,嘀di,滴di,磾di,鍉di,鞮di,氐di,牴di,碮di,踧di,镝di,廸di,狄di,籴di,苖di,迪di,唙di,敌di,涤di,荻di,梑di,笛di,觌di,靮di,滌di,髢di,嫡di,蔋di,蔐di,頔di,魡di,敵di,篴di,嚁di,藡di,豴di,糴di,覿di,鸐di,藋di,鬄di,樀di,蹢di,鏑di,泜di,诋di,邸di,阺di,呧di,坻di,底di,弤di,抵di,拞di,柢di,砥di,掋di,菧di,詆di,軧di,聜di,骶di,鯳di,坘di,厎di,赿di,地di,弚di,坔di,弟di,旳di,杕di,玓di,怟di,枤di,苐di,帝di,埊di,娣di,递di,逓di,偙di,啇di,梊di,焍di,眱di,祶di,第di,菂di,谛di,釱di,媂di,棣di,睇di,缔di,蒂di,僀di,禘di,腣di,遞di,鉪di,馰di,墑di,墬di,摕di,碲di,蝃di,遰di,慸di,甋di,締di,嶳di,諦di,踶di,弔di,嵽di,諟di,珶di,渧di,蹏di,揥di,墆di,疐di,俤di,蔕di,嗲dia,敁dian,掂dian,傎dian,厧dian,嵮dian,滇dian,槙dian,瘨dian,颠dian,蹎dian,巅dian,顚dian,顛dian,癫dian,巓dian,巔dian,攧dian,癲dian,齻dian,槇dian,典dian,点dian,婰dian,敟dian,椣dian,碘dian,蒧dian,蕇dian,踮dian,點dian,痶dian,丶dian,奌dian,电dian,佃dian,甸dian,坫dian,店dian,垫dian,扂dian,玷dian,钿dian,唸dian,婝dian,惦dian,淀dian,奠dian,琔dian,殿dian,蜔dian,鈿dian,電dian,墊dian,橂dian,澱dian,靛dian,磹dian,癜dian,簟dian,驔dian,腍dian,橝dian,壂dian,刁diao,叼diao,汈diao,刟diao,凋diao,奝diao,弴diao,彫diao,蛁diao,琱diao,貂diao,碉diao,鳭diao,殦diao,雕diao,鮉diao,鲷diao,簓diao,鼦diao,鯛diao,鵰diao,颩diao,矵diao,錭diao,淍diao,屌diao,鸼diao,鵃diao,扚diao,伄diao,吊diao,钓diao,窎diao,訋diao,调diao,掉diao,釣diao,铞diao,鈟diao,竨diao,銱diao,雿diao,調diao,瘹diao,窵diao,鋽diao,鑃diao,誂diao,嬥diao,絩diao,爹die,跌die,褺die,跮die,苵die,迭die,垤die,峌die,恎die,绖die,胅die,瓞die,眣die,耊die,啑die,戜die,谍die,喋die,堞die,幉die,惵die,揲die,畳die,絰die,耋die,臷die,詄die,趃die,叠die,殜die,牃die,牒die,镻die,碟die,蜨die,褋die,艓die,蝶die,諜die,蹀die,鲽die,曡die,鰈die,疉die,疊die,氎die,渉die,崼die,鮙die,跕die,鐡die,怢die,槢die,挃die,柣die,螲die,疂die,眰die,嚸dim,丁ding,仃ding,叮ding,帄ding,玎ding,甼ding,疔ding,盯ding,耵ding,靪ding,奵ding,町ding,虰ding,酊ding,顶ding,頂ding,鼎ding,鼑ding,薡ding,鐤ding,顁ding,艼ding,濎ding,嵿ding,钉ding,釘ding,订ding,忊ding,饤ding,矴ding,定ding,訂ding,飣ding,啶ding,萣ding,椗ding,腚ding,碇ding,锭ding,碠ding,聢ding,錠ding,磸ding,铤ding,鋌ding,掟ding,丟diu,丢diu,铥diu,銩diu,东dong,冬dong,咚dong,東dong,苳dong,昸dong,氡dong,倲dong,鸫dong,埬dong,娻dong,崬dong,涷dong,笗dong,菄dong,氭dong,蝀dong,鮗dong,鼕dong,鯟dong,鶇dong,鶫dong,徚dong,夂dong,岽dong,揰dong,董dong,墥dong,嬞dong,懂dong,箽dong,蕫dong,諌dong,湩dong,动dong,冻dong,侗dong,垌dong,峒dong,峝dong,恫dong,挏dong,栋dong,洞dong,胨dong,迵dong,凍dong,戙dong,胴dong,動dong,崠dong,硐dong,棟dong,腖dong,働dong,詷dong,駧dong,霘dong,狫dong,烔dong,絧dong,衕dong,勭dong,騆dong,姛dong,瞗dou,吺dou,剅dou,唗dou,都dou,兜dou,兠dou,蔸dou,橷dou,篼dou,侸dou,艔dou,乧dou,阧dou,抖dou,枓dou,陡dou,蚪dou,鈄dou,斗dou,豆dou,郖dou,浢dou,荳dou,逗dou,饾dou,鬥dou,梪dou,毭dou,脰dou,酘dou,痘dou,閗dou,窦dou,鬦dou,鋀dou,餖dou,斣dou,闘dou,竇dou,鬪dou,鬭dou,凟dou,鬬dou,剢du,阇du,嘟du,督du,醏du,闍du,厾du,毒du,涜du,读du,渎du,椟du,牍du,犊du,裻du,読du,獨du,錖du,匵du,嬻du,瀆du,櫝du,殰du,牘du,犢du,瓄du,皾du,騳du,讀du,豄du,贕du,韣du,髑du,鑟du,韇du,韥du,黷du,讟du,独du,樚du,襡du,襩du,黩du,笃du,堵du,帾du,琽du,赌du,睹du,覩du,賭du,篤du,暏du,笁du,陼du,芏du,妒du,杜du,肚du,妬du,度du,荰du,秺du,渡du,镀du,螙du,殬du,鍍du,蠧du,蠹du,剫du,晵du,靯du,篅duan,偳duan,媏duan,端duan,褍duan,鍴duan,剬duan,短duan,段duan,断duan,塅duan,缎duan,葮duan,椴duan,煅duan,瑖duan,腶duan,碫duan,锻duan,緞duan,毈duan,簖duan,鍛duan,斷duan,躖duan,煆duan,籪duan,叾dug,搥dui,鎚dui,垖dui,堆dui,塠dui,嵟dui,痽dui,磓dui,頧dui,鴭dui,鐜dui,埻dui,謉dui,錞dui,队dui,对dui,兊dui,兌dui,兑dui,対dui,祋dui,怼dui,陮dui,隊dui,碓dui,綐dui,對dui,憝dui,濧dui,薱dui,镦dui,懟dui,瀩dui,譈dui,譵dui,憞dui,鋭dui,杸dui,吨dun,惇dun,敦dun,蜳dun,墩dun,墪dun,壿dun,撴dun,獤dun,噸dun,撉dun,橔dun,犜dun,礅dun,蹲dun,蹾dun,驐dun,鐓dun,盹dun,趸dun,躉dun,伅dun,囤dun,庉dun,沌dun,炖dun,盾dun,砘dun,逇dun,钝dun,遁dun,鈍dun,腞dun,頓dun,碷dun,遯dun,潡dun,燉dun,踲dun,楯dun,腯dun,顿dun,多duo,夛duo,咄duo,哆duo,茤duo,剟duo,崜duo,敠duo,毲duo,裰duo,嚉duo,掇duo,仛duo,夺duo,铎duo,敓duo,敚duo,喥duo,敪duo,鈬duo,奪duo,凙duo,踱duo,鮵duo,鐸duo,跿duo,沰duo,痥duo,奲duo,朵duo,朶duo,哚duo,垛duo,挅duo,挆duo,埵duo,缍duo,椯duo,趓duo,躱duo,躲duo,綞duo,亸duo,鬌duo,嚲duo,垜duo,橢duo,硾duo,吋duo,刴duo,剁duo,沲duo,陊duo,陏duo,饳duo,柮duo,桗duo,堕duo,舵duo,惰duo,跥duo,跺duo,飿duo,墮duo,嶞duo,憜duo,墯duo,鵽duo,隓duo,貀duo,詑duo,駄duo,媠duo,嫷duo,尮duo,呃e,妸e,妿e,娿e,婀e,匼e,讹e,吪e,囮e,迗e,俄e,娥e,峨e,峩e,涐e,莪e,珴e,訛e,睋e,鈋e,锇e,鹅e,蛾e,磀e,誐e,鋨e,頟e,额e,魤e,額e,鵝e,鵞e,譌e,騀e,佮e,鰪e,皒e,欸e,枙e,砈e,鵈e,玀e,閜e,砵e,惡e,厄e,歺e,屵e,戹e,岋e,阨e,扼e,阸e,呝e,砐e,轭e,咢e,咹e,垩e,姶e,峉e,匎e,恶e,砨e,蚅e,饿e,偔e,卾e,堊e,悪e,硆e,谔e,軛e,鄂e,阏e,堮e,崿e,愕e,湂e,萼e,豟e,軶e,遏e,廅e,搤e,搹e,琧e,腭e,詻e,僫e,蝁e,锷e,鹗e,蕚e,遻e,頞e,颚e,餓e,噩e,擜e,覨e,諤e,餩e,鍔e,鳄e,歞e,顎e,櫮e,鰐e,鶚e,讍e,齶e,鱷e,齃e,啈e,搕e,礘e,魥e,蘁e,齾e,苊e,遌e,鑩e,诶ei,誒ei,奀en,恩en,蒽en,煾en,唔en,峎en,摁en,嗯en,鞥eng,仒eo,乻eol,旕eos,儿er,而er,児er,侕er,兒er,陑er,峏er,洏er,耏er,荋er,栭er,胹er,唲er,袻er,鸸er,粫er,聏er,輀er,隭er,髵er,鮞er,鴯er,轜er,咡er,杒er,陾er,輭er,鲕er,尒er,尓er,尔er,耳er,迩er,洱er,饵er,栮er,毦er,珥er,铒er,爾er,鉺er,餌er,駬er,薾er,邇er,趰er,嬭er,二er,弍er,弐er,佴er,刵er,贰er,衈er,貳er,誀er,樲er,髶er,貮er,发fa,沷fa,発fa,發fa,彂fa,髪fa,橃fa,醗fa,乏fa,伐fa,姂fa,垡fa,罚fa,阀fa,栰fa,傠fa,筏fa,瞂fa,罰fa,閥fa,罸fa,藅fa,汎fa,佱fa,法fa,鍅fa,灋fa,砝fa,珐fa,琺fa,髮fa,蕟fa,帆fan,忛fan,犿fan,番fan,勫fan,墦fan,嬏fan,幡fan,憣fan,旙fan,旛fan,翻fan,藩fan,轓fan,颿fan,飜fan,鱕fan,蕃fan,凡fan,凢fan,凣fan,匥fan,杋fan,柉fan,籵fan,钒fan,舤fan,烦fan,舧fan,笲fan,釩fan,棥fan,煩fan,緐fan,樊fan,橎fan,燔fan,璠fan,薠fan,繁fan,繙fan,羳fan,蹯fan,瀿fan,礬fan,蘩fan,鐇fan,蠜fan,鷭fan,氾fan,瀪fan,渢fan,伋fan,舩fan,矾fan,反fan,仮fan,辺fan,返fan,攵fan,犭fan,払fan,犯fan,奿fan,泛fan,饭fan,范fan,贩fan,畈fan,訉fan,軓fan,梵fan,盕fan,笵fan,販fan,軬fan,飯fan,飰fan,滼fan,嬎fan,範fan,嬔fan,婏fan,方fang,邡fang,坊fang,芳fang,牥fang,钫fang,淓fang,堏fang,鈁fang,錺fang,鴋fang,埅fang,枋fang,防fang,妨fang,房fang,肪fang,鲂fang,魴fang,仿fang,访fang,纺fang,昉fang,昘fang,瓬fang,眆fang,倣fang,旊fang,紡fang,舫fang,訪fang,髣fang,鶭fang,放fang,飞fei,妃fei,非fei,飛fei,啡fei,婓fei,婔fei,渄fei,绯fei,菲fei,扉fei,猆fei,靟fei,裶fei,緋fei,蜚fei,霏fei,鲱fei,餥fei,馡fei,騑fei,騛fei,鯡fei,飝fei,奜fei,肥fei,淝fei,暃fei,腓fei,蜰fei,棐fei,萉fei,蟦fei,朏fei,胐fei,匪fei,诽fei,悱fei,斐fei,榧fei,翡fei,蕜fei,誹fei,篚fei,襏fei,吠fei,废fei,沸fei,狒fei,肺fei,昲fei,费fei,俷fei,剕fei,厞fei,疿fei,屝fei,廃fei,費fei,痱fei,廢fei,曊fei,癈fei,鼣fei,濷fei,櫠fei,鐨fei,靅fei,蕡fei,芾fei,笰fei,紼fei,髴fei,柹fei,胏fei,镄fei,吩fen,帉fen,纷fen,芬fen,昐fen,氛fen,竕fen,紛fen,翂fen,棻fen,躮fen,酚fen,鈖fen,雰fen,朆fen,餴fen,饙fen,錀fen,坟fen,妢fen,岎fen,汾fen,枌fen,梤fen,羒fen,蚠fen,蚡fen,棼fen,焚fen,蒶fen,馚fen,隫fen,墳fen,幩fen,魵fen,橨fen,燓fen,豮fen,鼢fen,羵fen,鼖fen,豶fen,轒fen,馩fen,黂fen,鐼fen,粉fen,瞓fen,黺fen,分fen,份fen,坋fen,弅fen,奋fen,忿fen,秎fen,偾fen,愤fen,粪fen,僨fen,憤fen,奮fen,膹fen,糞fen,鲼fen,瀵fen,鱝fen,丰feng,风feng,仹feng,凨feng,凬feng,妦feng,沣feng,沨feng,枫feng,封feng,疯feng,盽feng,砜feng,風feng,峯feng,峰feng,偑feng,桻feng,烽feng,琒feng,崶feng,溄feng,猦feng,葑feng,锋feng,楓feng,犎feng,蜂feng,瘋feng,碸feng,僼feng,篈feng,鄷feng,鋒feng,檒feng,豐feng,鎽feng,酆feng,寷feng,灃feng,蘴feng,靊feng,飌feng,麷feng,豊feng,凮feng,鏠feng,冯feng,捀feng,浲feng,逢feng,堸feng,馮feng,綘feng,缝feng,艂feng,縫feng,讽feng,唪feng,諷feng,凤feng,奉feng,甮feng,俸feng,湗feng,焨feng,煈feng,鳯feng,鳳feng,鴌feng,賵feng,蘕feng,赗feng,覅fiao,仏fo,佛fo,坲fo,梻fo,垺fou,紑fou,缶fou,否fou,缹fou,缻fou,雬fou,鴀fou,芣fou,夫fu,邞fu,呋fu,姇fu,枎fu,玞fu,肤fu,怤fu,砆fu,胕fu,荂fu,衭fu,娐fu,荴fu,旉fu,紨fu,趺fu,酜fu,麸fu,稃fu,跗fu,鈇fu,筟fu,綒fu,鄜fu,孵fu,豧fu,敷fu,膚fu,鳺fu,麩fu,糐fu,麬fu,麱fu,懯fu,烰fu,琈fu,粰fu,璷fu,伕fu,乀fu,伏fu,凫fu,甶fu,冹fu,刜fu,孚fu,扶fu,芙fu,咈fu,岪fu,彿fu,怫fu,拂fu,服fu,泭fu,绂fu,绋fu,苻fu,俘fu,垘fu,柫fu,氟fu,洑fu,炥fu,玸fu,祓fu,罘fu,茯fu,郛fu,韨fu,鳬fu,哹fu,栿fu,浮fu,畗fu,砩fu,蚨fu,匐fu,桴fu,涪fu,符fu,紱fu,翇fu,艴fu,菔fu,虙fu,袱fu,幅fu,棴fu,罦fu,葍fu,福fu,綍fu,艀fu,蜉fu,辐fu,鉘fu,鉜fu,颫fu,鳧fu,榑fu,稪fu,箙fu,複fu,韍fu,幞fu,澓fu,蝠fu,鴔fu,諨fu,輻fu,鮄fu,癁fu,鮲fu,黻fu,鵩fu,坿fu,汱fu,酻fu,弗fu,畉fu,絥fu,抚fu,甫fu,府fu,弣fu,拊fu,斧fu,俌fu,郙fu,俯fu,釜fu,釡fu,捬fu,辅fu,椨fu,焤fu,盙fu,腑fu,滏fu,腐fu,輔fu,撫fu,鬴fu,簠fu,黼fu,蚥fu,窗chuang,窻chuang,傸chuang,创chuang,創chuang,庄zhuang,妝zhuang,荘zhuang,娤zhuang,桩zhuang,讣fu,付fu,妇fu,负fu,附fu,咐fu,竎fu,阜fu,驸fu,复fu,峊fu,祔fu,訃fu,負fu,赴fu,袝fu,偩fu,冨fu,副fu,婦fu,蚹fu,傅fu,媍fu,富fu,復fu,蛗fu,覄fu,詂fu,赋fu,椱fu,缚fu,腹fu,鲋fu,禣fu,褔fu,赙fu,緮fu,蕧fu,蝜fu,蝮fu,賦fu,駙fu,縛fu,鮒fu,賻fu,鍑fu,鍢fu,鳆fu,覆fu,馥fu,鰒fu,軵fu,邚fu,柎fu,父fu,萯fu,旮ga,伽ga,嘎ga,夾ga,呷ga,钆ga,尜ga,釓ga,噶ga,錷ga,嘠ga,尕ga,玍ga,尬ga,魀ga,侅gai,该gai,郂gai,陔gai,垓gai,姟gai,峐gai,荄gai,晐gai,赅gai,畡gai,祴gai,絯gai,該gai,豥gai,賅gai,賌gai,忋gai,改gai,鎅gai,絠gai,丐gai,乢gai,匃gai,匄gai,钙gai,盖gai,摡gai,溉gai,葢gai,鈣gai,戤gai,概gai,蓋gai,槩gai,槪gai,漑gai,瓂gai,甘gan,忓gan,芉gan,迀gan,攼gan,玕gan,肝gan,坩gan,泔gan,柑gan,竿gan,疳gan,酐gan,粓gan,亁gan,凲gan,尲gan,尴gan,筸gan,漧gan,鳱gan,尶gan,尷gan,魐gan,矸gan,虷gan,釬gan,乹gan,諴gan,飦gan,苷gan,杆gan,仠gan,皯gan,秆gan,衦gan,赶gan,敢gan,桿gan,笴gan,稈gan,感gan,澉gan,趕gan,橄gan,擀gan,簳gan,鱤gan,篢gan,豃gan,扞gan,鰔gan,扜gan,鳡gan,干gan,旰gan,汵gan,盰gan,绀gan,倝gan,凎gan,淦gan,紺gan,詌gan,骭gan,幹gan,檊gan,赣gan,贛gan,灨gan,贑gan,佄gan,錎gan,棡gang,冈gang,罓gang,冮gang,刚gang,阬gang,纲gang,肛gang,岡gang,牨gang,疘gang,矼gang,钢gang,剛gang,罡gang,堈gang,釭gang,犅gang,堽gang,綱gang,罁gang,鋼gang,鎠gang,頏gang,缸gang,岗gang,崗gang,港gang,犺gang,掆gang,杠gang,焵gang,筻gang,槓gang,戆gang,戇gang,戅gang,皋gao,羔gao,高gao,皐gao,髙gao,臯gao,滜gao,睾gao,膏gao,槹gao,橰gao,篙gao,糕gao,餻gao,櫜gao,韟gao,鷎gao,鼛gao,鷱gao,獋gao,槔gao,夰gao,杲gao,菒gao,稁gao,搞gao,缟gao,槀gao,槁gao,獔gao,稾gao,稿gao,镐gao,縞gao,藁gao,檺gao,藳gao,鎬gao,筶gao,澔gao,吿gao,勂gao,诰gao,郜gao,峼gao,祮gao,祰gao,锆gao,暠gao,禞gao,誥gao,鋯gao,告gao,戈ge,圪ge,犵ge,纥ge,戓ge,肐ge,牫ge,疙ge,牱ge,紇ge,哥ge,胳ge,袼ge,鸽ge,割ge,搁ge,彁ge,歌ge,戨ge,鴐ge,鴚ge,擱ge,謌ge,鴿ge,鎶ge,咯ge,滒ge,杚ge,呄ge,匌ge,挌ge,阁ge,革ge,敋ge,格ge,鬲ge,愅ge,臵ge,裓ge,隔ge,嗝ge,塥ge,滆ge,觡ge,搿ge,膈ge,閣ge,镉ge,鞈ge,韐ge,骼ge,諽ge,鮯ge,櫊ge,鎘ge,韚ge,轕ge,鞷ge,騔ge,秴ge,詥ge,佫ge,嘅ge,猲ge,槅ge,閤ge,葛ge,哿ge,舸ge,鲄ge,个ge,各ge,虼ge,個ge,硌ge,铬ge,箇ge,鉻ge,獦ge,吤ge,给gei,給gei,根gen,跟gen,哏gen,亘gen,艮gen,茛gen,揯gen,搄gen,亙gen,刯geng,庚geng,畊geng,浭geng,耕geng,掶geng,菮geng,椩geng,焿geng,絚geng,赓geng,鹒geng,緪geng,縆geng,賡geng,羹geng,鶊geng,絙geng,郠geng,哽geng,埂geng,峺geng,挭geng,耿geng,莄geng,梗geng,鲠geng,骾geng,鯁geng,郉geng,绠geng,更geng,堩geng,暅geng,啹geu,喼gib,嗰go,工gong,弓gong,公gong,厷gong,功gong,攻gong,杛gong,糼gong,肱gong,宫gong,宮gong,恭gong,蚣gong,躬gong,龚gong,匑gong,塨gong,愩gong,觥gong,躳gong,匔gong,碽gong,髸gong,觵gong,龔gong,魟gong,幊gong,巩gong,汞gong,拱gong,唝gong,拲gong,栱gong,珙gong,輁gong,鞏gong,嗊gong,銾gong,供gong,共gong,贡gong,羾gong,貢gong,慐gong,熕gong,渱gong,勾gou,沟gou,钩gou,袧gou,缑gou,鈎gou,溝gou,鉤gou,緱gou,褠gou,篝gou,簼gou,鞲gou,冓gou,搆gou,抅gou,泃gou,軥gou,鴝gou,鸜gou,佝gou,岣gou,狗gou,苟gou,枸gou,玽gou,耇gou,耉gou,笱gou,耈gou,蚼gou,豿gou,坸gou,构gou,诟gou,购gou,垢gou,姤gou,够gou,夠gou,訽gou,媾gou,彀gou,詬gou,遘gou,雊gou,構gou,煹gou,觏gou,撀gou,覯gou,購gou,傋gou,茩gou,估gu,咕gu,姑gu,孤gu,沽gu,泒gu,柧gu,轱gu,唂gu,唃gu,罛gu,鸪gu,笟gu,菇gu,蛄gu,蓇gu,觚gu,軱gu,軲gu,辜gu,酤gu,毂gu,箍gu,箛gu,嫴gu,篐gu,橭gu,鮕gu,鴣gu,轂gu,苽gu,菰gu,鶻gu,鹘gu,古gu,扢gu,汩gu,诂gu,谷gu,股gu,峠gu,牯gu,骨gu,罟gu,逧gu,钴gu,傦gu,啒gu,淈gu,脵gu,蛊gu,蛌gu,尳gu,愲gu,焸gu,硲gu,詁gu,馉gu,榾gu,鈷gu,鼓gu,鼔gu,嘏gu,榖gu,皷gu,縎gu,糓gu,薣gu,濲gu,臌gu,餶gu,瀔gu,瞽gu,抇gu,嗀gu,羖gu,固gu,怘gu,故gu,凅gu,顾gu,堌gu,崓gu,崮gu,梏gu,牿gu,棝gu,祻gu,雇gu,痼gu,稒gu,锢gu,頋gu,僱gu,錮gu,鲴gu,鯝gu,顧gu,盬gu,瓜gua,刮gua,胍gua,鸹gua,焻gua,煱gua,颪gua,趏gua,劀gua,緺gua,銽gua,鴰gua,騧gua,呱gua,諣gua,栝gua,歄gua,冎gua,叧gua,剐gua,剮gua,啩gua,寡gua,卦gua,坬gua,诖gua,挂gua,掛gua,罣gua,絓gua,罫gua,褂gua,詿gua,乖guai,拐guai,枴guai,柺guai,夬guai,叏guai,怪guai,恠guai,关guan,观guan,官guan,覌guan,倌guan,萖guan,棺guan,蒄guan,窤guan,瘝guan,癏guan,観guan,鳏guan,關guan,鰥guan,觀guan,鱞guan,馆guan,痯guan,筦guan,管guan,舘guan,錧guan,館guan,躀guan,鳤guan,輨guan,冠guan,卝guan,毌guan,丱guan,贯guan,泴guan,悺guan,惯guan,掼guan,涫guan,貫guan,悹guan,祼guan,慣guan,摜guan,潅guan,遦guan,樌guan,盥guan,罆guan,雚guan,鏆guan,灌guan,爟guan,瓘guan,矔guan,鹳guan,罐guan,鑵guan,鸛guan,鱹guan,懽guan,礶guan,光guang,灮guang,侊guang,炗guang,炚guang,炛guang,咣guang,垙guang,姯guang,洸guang,茪guang,桄guang,烡guang,珖guang,胱guang,硄guang,僙guang,輄guang,銧guang,黆guang,欟guang,趪guang,挄guang,广guang,広guang,犷guang,廣guang,臩guang,獷guang,俇guang,逛guang,臦guang,撗guang,櫎guang,归gui,圭gui,妫gui,龟gui,规gui,邽gui,皈gui,茥gui,闺gui,帰gui,珪gui,胿gui,亀gui,硅gui,袿gui,規gui,椝gui,瑰gui,郌gui,嫢gui,摫gui,閨gui,鲑gui,嶲gui,槻gui,槼gui,璝gui,瞡gui,膭gui,鮭gui,龜gui,巂gui,歸gui,鬶gui,瓌gui,鬹gui,櫷gui,佹gui,櫰gui,螝gui,槣gui,鴂gui,鴃gui,傀gui,潙gui,雟gui,嬀gui,宄gui,氿gui,轨gui,庋gui,匦gui,诡gui,陒gui,垝gui,癸gui,軌gui,鬼gui,庪gui,匭gui,晷gui,湀gui,蛫gui,觤gui,詭gui,厬gui,簋gui,蟡gui,攱gui,朹gui,祪gui,猤gui,媯gui,刽gui,刿gui,攰gui,昋gui,柜gui,炅gui,贵gui,桂gui,椢gui,筀gui,貴gui,蓕gui,跪gui,瞆gui,劊gui,劌gui,撌gui,槶gui,瞶gui,櫃gui,襘gui,鳜gui,鞼gui,鱖gui,鱥gui,桧gui,絵gui,檜gui,赽gui,趹gui,嶡gui,禬gui,衮gun,惃gun,绲gun,袞gun,辊gun,滚gun,蓘gun,滾gun,緄gun,蔉gun,磙gun,輥gun,鲧gun,鮌gun,鯀gun,琯gun,棍gun,棞gun,睔gun,睴gun,璭gun,謴gun,呙guo,埚guo,郭guo,啯guo,崞guo,楇guo,聒guo,鈛guo,锅guo,墎guo,瘑guo,嘓guo,彉guo,蝈guo,鍋guo,彍guo,鐹guo,矌guo,簂guo,囯guo,囶guo,囻guo,国guo,圀guo,國guo,帼guo,掴guo,腘guo,幗guo,摑guo,漍guo,聝guo,蔮guo,膕guo,虢guo,馘guo,慖guo,果guo,惈guo,淉guo,猓guo,菓guo,馃guo,椁guo,褁guo,槨guo,粿guo,綶guo,蜾guo,裹guo,輠guo,餜guo,錁guo,过guo,過guo,妎ha,铪ha,鉿ha,哈ha,蛤ha,孩hai,骸hai,還hai,还hai,海hai,胲hai,烸hai,塰hai,酼hai,醢hai,亥hai,骇hai,害hai,氦hai,嗐hai,餀hai,駭hai,駴hai,嚡hai,饚hai,乤hal,兯han,爳han,顸han,哻han,蚶han,酣han,谽han,馠han,魽han,鼾han,欦han,憨han,榦han,邗han,含han,邯han,函han,咁han,肣han,凾han,唅han,圅han,娢han,浛han,崡han,晗han,梒han,涵han,焓han,寒han,嵅han,韩han,甝han,筨han,蜬han,澏han,鋡han,韓han,馯han,椷han,罕han,浫han,喊han,蔊han,鬫han,糮han,厈han,汉han,汗han,旱han,悍han,捍han,晘han,涆han,猂han,莟han,晥han,焊han,琀han,菡han,皔han,睅han,傼han,蛿han,撖han,漢han,蜭han,暵han,熯han,銲han,鋎han,憾han,撼han,翰han,螒han,頷han,顄han,駻han,譀han,雗han,瀚han,鶾han,澣han,颔han,魧hang,苀hang,迒hang,斻hang,杭hang,垳hang,绗hang,笐hang,蚢hang,颃hang,貥hang,筕hang,絎hang,行hang,航hang,沆hang,茠hao,蒿hao,嚆hao,薅hao,竓hao,蚝hao,毫hao,椃hao,嗥hao,獆hao,噑hao,豪hao,嘷hao,儫hao,曍hao,嚎hao,壕hao,濠hao,籇hao,蠔hao,譹hao,虠hao,諕hao,呺hao,郝hao,好hao,号hao,昊hao,昦hao,哠hao,恏hao,悎hao,浩hao,耗hao,晧hao,淏hao,傐hao,皓hao,滈hao,聕hao,號hao,暤hao,暭hao,皜hao,皞hao,皡hao,薃hao,皥hao,颢hao,灏hao,顥hao,鰝hao,灝hao,鄗hao,藃hao,诃he,呵he,抲he,欱he,喝he,訶he,嗬he,蠚he,禾he,合he,何he,劾he,咊he,和he,姀he,河he,峆he,曷he,柇he,盇he,籺he,阂he,饸he,哬he,敆he,核he,盉he,盍he,啝he,涸he,渮he,盒he,菏he,萂he,龁he,惒he,粭he,訸he,颌he,楁he,鉌he,阖he,熆he,鹖he,麧he,澕he,頜he,篕he,翮he,螛he,礉he,闔he,鞨he,齕he,覈he,鶡he,皬he,鑉he,龢he,餄he,荷he,魺he,垎he,贺he,隺he,寉he,焃he,湼he,賀he,嗃he,煂he,碋he,熇he,褐he,赫he,鹤he,翯he,壑he,癋he,燺he,爀he,靍he,靎he,鸖he,靏he,鶮he,謞he,鶴he,嗨hei,黒hei,黑hei,嘿hei,潶hei,嬒hei,噷hen,拫hen,痕hen,鞎hen,佷hen,很hen,狠hen,詪hen,恨hen,亨heng,哼heng,悙heng,涥heng,脝heng,姮heng,恆heng,恒heng,桁heng,烆heng,珩heng,胻heng,横heng,橫heng,衡heng,鴴heng,鵆heng,蘅heng,鑅heng,鸻heng,堼heng,叿hong,灴hong,轰hong,訇hong,烘hong,軣hong,揈hong,渹hong,焢hong,硡hong,薨hong,輷hong,嚝hong,鍧hong,轟hong,仜hong,妅hong,红hong,吰hong,宏hong,汯hong,玒hong,纮hong,闳hong,宖hong,泓hong,玜hong,苰hong,垬hong,娂hong,洪hong,竑hong,紅hong,荭hong,虹hong,浤hong,紘hong,翃hong,耾hong,硔hong,紭hong,谹hong,鸿hong,竤hong,粠hong,葓hong,鈜hong,閎hong,綋hong,翝hong,谼hong,潂hong,鉷hong,鞃hong,篊hong,鋐hong,彋hong,蕻hong,霐hong,黉hong,霟hong,鴻hong,黌hong,舼hong,瓨hong,弘hong,葒hong,哄hong,晎hong,讧hong,訌hong,閧hong,撔hong,澋hong,澒hong,闀hong,闂hong,腄hou,侯hou,矦hou,喉hou,帿hou,猴hou,葔hou,瘊hou,睺hou,銗hou,篌hou,糇hou,翭hou,骺hou,鍭hou,餱hou,鯸hou,翵hou,吼hou,犼hou,呴hou,后hou,郈hou,厚hou,垕hou,後hou,洉hou,逅hou,候hou,鄇hou,堠hou,鲎hou,鲘hou,鮜hou,鱟hou,豞hou,鋘hu,乎hu,匢hu,呼hu,垀hu,忽hu,昒hu,曶hu,泘hu,苸hu,烀hu,轷hu,匫hu,唿hu,惚hu,淴hu,虖hu,軤hu,雽hu,嘑hu,寣hu,滹hu,雐hu,歑hu,謼hu,芔hu,戯hu,戱hu,鹄hu,鵠hu,囫hu,弧hu,狐hu,瓳hu,胡hu,壶hu,壷hu,斛hu,焀hu,喖hu,壺hu,媩hu,湖hu,猢hu,絗hu,葫hu,楜hu,煳hu,瑚hu,嘝hu,蔛hu,鹕hu,槲hu,箶hu,糊hu,蝴hu,衚hu,縠hu,螜hu,醐hu,頶hu,觳hu,鍸hu,餬hu,瀫hu,鬍hu,鰗hu,鶘hu,鶦hu,沍hu,礐hu,瓡hu,俿hu,虍hu,乕hu,汻hu,虎hu,浒hu,唬hu,萀hu,琥hu,虝hu,滸hu,箎hu,錿hu,鯱hu,互hu,弖hu,戶hu,户hu,戸hu,冴hu,芐hu,帍hu,护hu,沪hu,岵hu,怙hu,戽hu,昈hu,枑hu,祜hu,笏hu,粐hu,婟hu,扈hu,瓠hu,綔hu,鄠hu,嫭hu,嫮hu,摢hu,滬hu,蔰hu,槴hu,熩hu,鳸hu,簄hu,鍙hu,護hu,鳠hu,韄hu,頀hu,鱯hu,鸌hu,濩hu,穫hu,觷hu,魱hu,冱hu,鹱hu,花hua,芲hua,埖hua,婲hua,椛hua,硴hua,糀hua,誮hua,錵hua,蘤hua,蕐hua,砉hua,华hua,哗hua,姡hua,骅hua,華hua,铧hua,滑hua,猾hua,嘩hua,撶hua,璍hua,螖hua,鏵hua,驊hua,鷨hua,划hua,化hua,杹hua,画hua,话hua,崋hua,桦hua,婳hua,畫hua,嬅hua,畵hua,觟hua,話hua,劃hua,摦hua,槬hua,樺hua,嫿hua,澅hua,諙hua,黊hua,繣hua,舙hua,蘳hua,譮hua,檴hua,怀huai,淮huai,槐huai,褢huai,踝huai,懐huai,褱huai,懷huai,耲huai,蘹huai,佪huai,徊huai,坏huai,咶huai,壊huai,壞huai,蘾huai,欢huan,歓huan,鴅huan,懁huan,鵍huan,酄huan,嚾huan,獾huan,歡huan,貛huan,讙huan,驩huan,貆huan,环huan,峘huan,洹huan,狟huan,荁huan,桓huan,萈huan,萑huan,堚huan,寏huan,雈huan,綄huan,羦huan,锾huan,阛huan,寰huan,澴huan,缳huan,環huan,豲huan,鍰huan,镮huan,鹮huan,糫huan,繯huan,轘huan,鐶huan,鬟huan,瞏huan,鉮huan,圜huan,闤huan,睆huan,缓huan,緩huan,攌huan,幻huan,奂huan,肒huan,奐huan,宦huan,唤huan,换huan,浣huan,涣huan,烉huan,患huan,梙huan,焕huan,逭huan,喚huan,嵈huan,愌huan,換huan,渙huan,痪huan,煥huan,豢huan,漶huan,瘓huan,槵huan,鲩huan,擐huan,瞣huan,藧huan,鯇huan,鯶huan,鰀huan,圂huan,蠸huan,瑍huan,巟huang,肓huang,荒huang,衁huang,塃huang,慌huang,皇huang,偟huang,凰huang,隍huang,黃huang,黄huang,喤huang,堭huang,媓huang,崲huang,徨huang,湟huang,葟huang,遑huang,楻huang,煌huang,瑝huang,墴huang,潢huang,獚huang,锽huang,熿huang,璜huang,篁huang,艎huang,蝗huang,癀huang,磺huang,穔huang,諻huang,簧huang,蟥huang,鍠huang,餭huang,鳇huang,鐄huang,騜huang,鰉huang,鷬huang,惶huang,鱑huang,怳huang,恍huang,炾huang,宺huang,晃huang,晄huang,奛huang,谎huang,幌huang,愰huang,詤huang,縨huang,謊huang,皩huang,兤huang,滉huang,榥huang,曂huang,皝huang,鎤huang,鰴hui,灰hui,灳hui,诙hui,咴hui,恢hui,拻hui,挥hui,虺hui,晖hui,烣hui,珲hui,豗hui,婎hui,媈hui,揮hui,翚hui,辉hui,暉hui,楎hui,琿hui,禈hui,詼hui,幑hui,睳hui,噅hui,噕hui,翬hui,輝hui,麾hui,徽hui,隳hui,瀈hui,洃hui,煇hui,囘hui,回hui,囬hui,廻hui,廽hui,恛hui,洄hui,茴hui,迴hui,烠hui,逥hui,痐hui,蛔hui,蛕hui,蜖hui,鮰hui,藱hui,悔hui,毇hui,檓hui,燬hui,譭hui,泋hui,毁hui,烜hui,卉hui,屷hui,汇hui,会hui,讳hui,浍hui,绘hui,荟hui,诲hui,恚hui,恵hui,烩hui,贿hui,彗hui,晦hui,秽hui,喙hui,惠hui,缋hui,翙hui,阓hui,匯hui,彙hui,彚hui,會hui,毀hui,滙hui,詯hui,賄hui,嘒hui,蔧hui,誨hui,圚hui,寭hui,慧hui,憓hui,暳hui,槥hui,潓hui,蕙hui,徻hui,橞hui,澮hui,獩hui,璤hui,薈hui,薉hui,諱hui,檅hui,燴hui,篲hui,餯hui,嚖hui,瞺hui,穢hui,繢hui,蟪hui,櫘hui,繪hui,翽hui,譓hui,儶hui,鏸hui,闠hui,孈hui,鐬hui,靧hui,韢hui,譿hui,顪hui,銊hui,叀hui,僡hui,懳hui,昏hun,昬hun,荤hun,婚hun,惛hun,涽hun,阍hun,惽hun,棔hun,葷hun,睧hun,閽hun,焄hun,蔒hun,睯hun,忶hun,浑hun,馄hun,渾hun,魂hun,餛hun,繉hun,轋hun,鼲hun,混hun,梱hun,湷hun,诨hun,俒hun,倱hun,掍hun,焝hun,溷hun,慁hun,觨hun,諢hun,吙huo,耠huo,锪huo,劐huo,鍃huo,豁huo,攉huo,騞huo,搉huo,佸huo,秮huo,活huo,火huo,伙huo,邩huo,钬huo,鈥huo,夥huo,沎huo,或huo,货huo,咟huo,俰huo,捇huo,眓huo,获huo,閄huo,剨huo,掝huo,祸huo,貨huo,惑huo,旤huo,湱huo,禍huo,奯huo,獲huo,霍huo,謋huo,镬huo,嚯huo,瀖huo,耯huo,藿huo,蠖huo,嚿huo,曤huo,臛huo,癨huo,矐huo,鑊huo,靃huo,謔huo,篧huo,擭huo,夻hwa,丌ji,讥ji,击ji,刉ji,叽ji,饥ji,乩ji,圾ji,机ji,玑ji,肌ji,芨ji,矶ji,鸡ji,枅ji,咭ji,剞ji,唧ji,姬ji,屐ji,积ji,笄ji,飢ji,基ji,喞ji,嵆ji,嵇ji,攲ji,敧ji,犄ji,筓ji,缉ji,赍ji,嗘ji,稘ji,跻ji,鳮ji,僟ji,毄ji,箕ji,銈ji,嘰ji,撃ji,樭ji,畿ji,稽ji,緝ji,觭ji,賫ji,躸ji,齑ji,墼ji,憿ji,機ji,激ji,璣ji,禨ji,積ji,錤ji,隮ji,擊ji,磯ji,簊ji,羁ji,賷ji,鄿ji,櫅ji,耭ji,雞ji,譏ji,韲ji,鶏ji,譤ji,鐖ji,癪ji,躋ji,鞿ji,鷄ji,齎ji,羇ji,虀ji,鑇ji,覉ji,鑙ji,齏ji,羈ji,鸄ji,覊ji,庴ji,垍ji,諅ji,踦ji,璂ji,踑ji,谿ji,刏ji,畸ji,簎ji,諔ji,堲ji,蠀ji,亼ji,及ji,吉ji,彶ji,忣ji,汲ji,级ji,即ji,极ji,亟ji,佶ji,郆ji,卽ji,叝ji,姞ji,急ji,狤ji,皍ji,笈ji,級ji,揤ji,疾ji,觙ji,偮ji,卙ji,楖ji,焏ji,脨ji,谻ji,戢ji,棘ji,極ji,湒ji,集ji,塉ji,嫉ji,愱ji,楫ji,蒺ji,蝍ji,趌ji,辑ji,槉ji,耤ji,膌ji,銡ji,嶯ji,潗ji,瘠ji,箿ji,蕀ji,蕺ji,踖ji,鞊ji,鹡ji,橶ji,檝ji,濈ji,螏ji,輯ji,襋ji,蹐ji,艥ji,籍ji,轚ji,鏶ji,霵ji,鶺ji,鷑ji,躤ji,雦ji,雧ji,嵴ji,尐ji,淁ji,吇ji,莋ji,岌ji,殛ji,鍓ji,颳ji,几ji,己ji,丮ji,妀ji,犱ji,泲ji,虮ji,挤ji,脊ji,掎ji,鱾ji,幾ji,戟ji,麂ji,魢ji,撠ji,擠ji,穖ji,蟣ji,済ji,畟ji,迹ji,绩ji,勣ji,彑ji,旡ji,计ji,记ji,伎ji,纪ji,坖ji,妓ji,忌ji,技ji,芰ji,芶ji,际ji,剂ji,季ji,哜ji,峜ji,既ji,洎ji,济ji,紀ji,茍ji,計ji,剤ji,紒ji,继ji,觊ji,記ji,偈ji,寄ji,徛ji,悸ji,旣ji,梞ji,祭ji,萕ji,惎ji,臮ji,葪ji,蔇ji,兾ji,痵ji,継ji,蓟ji,裚ji,跡ji,際ji,墍ji,暨ji,漃ji,漈ji,禝ji,稩ji,穊ji,誋ji,跽ji,霁ji,鲚ji,稷ji,鲫ji,冀ji,劑ji,曁ji,穄ji,縘ji,薊ji,襀ji,髻ji,嚌ji,檕ji,濟ji,繋ji,罽ji,覬ji,鮆ji,檵ji,璾ji,蹟ji,鯽ji,鵋ji,齌ji,廭ji,懻ji,癠ji,穧ji,糭ji,繫ji,骥ji,鯚ji,瀱ji,繼ji,蘮ji,鱀ji,蘻ji,霽ji,鰶ji,鰿ji,鱭ji,驥ji,訐ji,魝ji,櫭ji,帺ji,褀ji,鬾ji,懠ji,蟿ji,汥ji,鯯ji,齍ji,績ji,寂ji,暩ji,蘎ji,筴jia,加jia,抸jia,佳jia,泇jia,迦jia,枷jia,毠jia,浃jia,珈jia,埉jia,家jia,浹jia,痂jia,梜jia,耞jia,袈jia,猳jia,葭jia,跏jia,犌jia,腵jia,鉫jia,嘉jia,镓jia,糘jia,豭jia,貑jia,鎵jia,麚jia,椵jia,挟jia,挾jia,笳jia,夹jia,袷jia,裌jia,圿jia,扴jia,郏jia,荚jia,郟jia,唊jia,恝jia,莢jia,戛jia,脥jia,铗jia,蛱jia,颊jia,蛺jia,跲jia,鋏jia,頬jia,頰jia,鴶jia,鵊jia,忦jia,戞jia,岬jia,甲jia,叚jia,玾jia,胛jia,斚jia,贾jia,钾jia,婽jia,徦jia,斝jia,賈jia,鉀jia,榎jia,槚jia,瘕jia,檟jia,夓jia,假jia,价jia,驾jia,架jia,嫁jia,幏jia,榢jia,價jia,稼jia,駕jia,戋jian,奸jian,尖jian,幵jian,坚jian,歼jian,间jian,冿jian,戔jian,肩jian,艰jian,姦jian,姧jian,兼jian,监jian,堅jian,惤jian,猏jian,笺jian,菅jian,菺jian,牋jian,犍jian,缄jian,葌jian,葏jian,間jian,靬jian,搛jian,椾jian,煎jian,瑊jian,睷jian,碊jian,缣jian,蒹jian,監jian,箋jian,樫jian,熞jian,緘jian,蕑jian,蕳jian,鲣jian,鳽jian,鹣jian,熸jian,篯jian,縑jian,艱jian,鞬jian,餰jian,馢jian,麉jian,瀐jian,鞯jian,鳒jian,殱jian,礛jian,覸jian,鵳jian,瀸jian,櫼jian,殲jian,譼jian,鰜jian,鶼jian,籛jian,韀jian,鰹jian,囏jian,虃jian,鑯jian,韉jian,揃jian,鐗jian,鐧jian,閒jian,黚jian,傔jian,攕jian,纎jian,钘jian,鈃jian,銒jian,籈jian,湔jian,囝jian,拣jian,枧jian,俭jian,茧jian,倹jian,挸jian,捡jian,笕jian,减jian,剪jian,帴jian,梘jian,检jian,湕jian,趼jian,揀jian,検jian,減jian,睑jian,硷jian,裥jian,詃jian,锏jian,弿jian,瑐jian,筧jian,简jian,絸jian,谫jian,彅jian,戩jian,碱jian,儉jian,翦jian,撿jian,檢jian,藆jian,襇jian,襉jian,謇jian,蹇jian,瞼jian,礆jian,簡jian,繭jian,謭jian,鬋jian,鰎jian,鹸jian,瀽jian,蠒jian,鹻jian,譾jian,襺jian,鹼jian,堿jian,偂jian,銭jian,醎jian,鹹jian,涀jian,橏jian,柬jian,戬jian,见jian,件jian,見jian,侟jian,饯jian,剑jian,洊jian,牮jian,荐jian,贱jian,俴jian,健jian,剣jian,栫jian,涧jian,珔jian,舰jian,剱jian,徤jian,渐jian,袸jian,谏jian,釼jian,寋jian,旔jian,楗jian,毽jian,溅jian,腱jian,臶jian,葥jian,践jian,鉴jian,键jian,僭jian,榗jian,漸jian,劍jian,劎jian,墹jian,澗jian,箭jian,糋jian,諓jian,賤jian,趝jian,踐jian,踺jian,劒jian,劔jian,橺jian,薦jian,諫jian,鍵jian,餞jian,瞯jian,瞷jian,磵jian,礀jian,螹jian,鍳jian,濺jian,繝jian,瀳jian,鏩jian,艦jian,轞jian,鑑jian,鑒jian,鑬jian,鑳jian,鐱jian,揵jian,蔪jian,橌jian,廴jian,譖jian,鋻jian,建jian,賎jian,擶jian,江jiang,姜jiang,将jiang,茳jiang,浆jiang,畕jiang,豇jiang,葁jiang,摪jiang,翞jiang,僵jiang,漿jiang,螀jiang,壃jiang,彊jiang,缰jiang,薑jiang,殭jiang,螿jiang,鳉jiang,疅jiang,礓jiang,疆jiang,繮jiang,韁jiang,鱂jiang,將jiang,畺jiang,糡jiang,橿jiang,讲jiang,奖jiang,桨jiang,蒋jiang,勥jiang,奨jiang,奬jiang,蔣jiang,槳jiang,獎jiang,耩jiang,膙jiang,講jiang,顜jiang,塂jiang,匞jiang,匠jiang,夅jiang,弜jiang,杢jiang,降jiang,绛jiang,弶jiang,袶jiang,絳jiang,酱jiang,摾jiang,滰jiang,嵹jiang,犟jiang,醤jiang,糨jiang,醬jiang,櫤jiang,謽jiang,蔃jiang,洚jiang,艽jiao,芁jiao,交jiao,郊jiao,姣jiao,娇jiao,峧jiao,浇jiao,茭jiao,骄jiao,胶jiao,椒jiao,焳jiao,蛟jiao,跤jiao,僬jiao,嘄jiao,鲛jiao,嬌jiao,嶕jiao,嶣jiao,憍jiao,澆jiao,膠jiao,蕉jiao,燋jiao,膲jiao,礁jiao,穚jiao,鮫jiao,鹪jiao,簥jiao,蟭jiao,轇jiao,鐎jiao,驕jiao,鷦jiao,鷮jiao,儌jiao,撟jiao,挍jiao,教jiao,骹jiao,嫶jiao,萩jiao,嘐jiao,憢jiao,焦jiao,櫵jiao,嚼jiao,臫jiao,佼jiao,挢jiao,狡jiao,绞jiao,饺jiao,晈jiao,笅jiao,皎jiao,矫jiao,脚jiao,铰jiao,搅jiao,筊jiao,絞jiao,剿jiao,勦jiao,敫jiao,湬jiao,煍jiao,腳jiao,賋jiao,摷jiao,暞jiao,踋jiao,鉸jiao,劋jiao,撹jiao,徼jiao,敽jiao,敿jiao,缴jiao,曒jiao,璬jiao,矯jiao,皦jiao,蟜jiao,鵤jiao,繳jiao,譑jiao,孂jiao,纐jiao,攪jiao,灚jiao,鱎jiao,潐jiao,糸jiao,蹻jiao,釥jiao,纟jiao,恔jiao,角jiao,餃jiao,叫jiao,呌jiao,訆jiao,珓jiao,轿jiao,较jiao,窖jiao,滘jiao,較jiao,嘂jiao,嘦jiao,斠jiao,漖jiao,酵jiao,噍jiao,噭jiao,嬓jiao,獥jiao,藠jiao,趭jiao,轎jiao,醮jiao,譥jiao,皭jiao,釂jiao,觉jiao,覐jiao,覚jiao,覺jiao,趫jiao,敎jiao,阶jie,疖jie,皆jie,接jie,掲jie,痎jie,秸jie,菨jie,喈jie,嗟jie,堦jie,媘jie,嫅jie,揭jie,椄jie,湝jie,脻jie,街jie,煯jie,稭jie,鞂jie,蝔jie,擑jie,癤jie,鶛jie,节jie,節jie,袓jie,謯jie,階jie,卪jie,孑jie,讦jie,刦jie,刧jie,劫jie,岊jie,昅jie,刼jie,劼jie,疌jie,衱jie,诘jie,拮jie,洁jie,结jie,迼jie,倢jie,桀jie,桝jie,莭jie,偼jie,婕jie,崨jie,捷jie,袺jie,傑jie,媫jie,結jie,蛣jie,颉jie,嵥jie,楬jie,楶jie,滐jie,睫jie,蜐jie,詰jie,截jie,榤jie,碣jie,竭jie,蓵jie,鲒jie,潔jie,羯jie,誱jie,踕jie,頡jie,幯jie,擳jie,嶻jie,擮jie,礍jie,鍻jie,鮚jie,巀jie,蠞jie,蠘jie,蠽jie,洯jie,絜jie,搩jie,杰jie,鉣jie,姐jie,毑jie,媎jie,解jie,觧jie,檞jie,飷jie,丯jie,介jie,岕jie,庎jie,戒jie,芥jie,屆jie,届jie,斺jie,玠jie,界jie,畍jie,疥jie,砎jie,衸jie,诫jie,借jie,蚧jie,徣jie,堺jie,楐jie,琾jie,蛶jie,骱jie,犗jie,誡jie,魪jie,藉jie,繲jie,雃jie,嶰jie,唶jie,褯jie,巾jin,今jin,斤jin,钅jin,兓jin,金jin,釒jin,津jin,矜jin,砛jin,荕jin,衿jin,觔jin,埐jin,珒jin,紟jin,惍jin,琎jin,堻jin,琻jin,筋jin,嶜jin,璡jin,鹶jin,黅jin,襟jin,濜jin,仅jin,巹jin,紧jin,堇jin,菫jin,僅jin,厪jin,谨jin,锦jin,嫤jin,廑jin,漌jin,緊jin,蓳jin,馑jin,槿jin,瑾jin,錦jin,謹jin,饉jin,儘jin,婜jin,斳jin,卺jin,笒jin,盡jin,劤jin,尽jin,劲jin,妗jin,近jin,进jin,侭jin,枃jin,勁jin,荩jin,晉jin,晋jin,浸jin,烬jin,赆jin,祲jin,進jin,煡jin,缙jin,寖jin,搢jin,溍jin,禁jin,靳jin,墐jin,慬jin,瑨jin,僸jin,凚jin,歏jin,殣jin,觐jin,噤jin,濅jin,縉jin,賮jin,嚍jin,壗jin,藎jin,燼jin,璶jin,覲jin,贐jin,齽jin,馸jin,臸jin,浕jin,嬧jin,坕jing,坙jing,巠jing,京jing,泾jing,经jing,茎jing,亰jing,秔jing,荆jing,荊jing,涇jing,莖jing,婛jing,惊jing,旌jing,旍jing,猄jing,経jing,菁jing,晶jing,稉jing,腈jing,粳jing,經jing,兢jing,精jing,聙jing,橸jing,鲸jing,鵛jing,鯨jing,鶁jing,麖jing,鼱jing,驚jing,麠jing,徑jing,仱jing,靑jing,睛jing,井jing,阱jing,刭jing,坓jing,宑jing,汫jing,汬jing,肼jing,剄jing,穽jing,颈jing,景jing,儆jing,幜jing,璄jing,憼jing,暻jing,燝jing,璟jing,璥jing,頸jing,蟼jing,警jing,擏jing,憬jing,妌jing,净jing,弪jing,径jing,迳jing,浄jing,胫jing,凈jing,弳jing,痉jing,竞jing,逕jing,婙jing,婧jing,桱jing,梷jing,淨jing,竫jing,脛jing,敬jing,痙jing,竧jing,傹jing,靖jing,境jing,獍jing,誩jing,静jing,頚jing,曔jing,镜jing,靜jing,瀞jing,鏡jing,競jing,竸jing,葝jing,儬jing,陘jing,竟jing,冋jiong,扃jiong,埛jiong,絅jiong,駉jiong,駫jiong,冏jiong,浻jiong,扄jiong,銄jiong,囧jiong,迥jiong,侰jiong,炯jiong,逈jiong,烱jiong,煚jiong,窘jiong,颎jiong,綗jiong,僒jiong,煛jiong,熲jiong,澃jiong,燛jiong,褧jiong,顈jiong,蘔jiong,宭jiong,蘏jiong,丩jiu,勼jiu,纠jiu,朻jiu,究jiu,糺jiu,鸠jiu,赳jiu,阄jiu,萛jiu,啾jiu,揪jiu,揫jiu,鳩jiu,摎jiu,鬏jiu,鬮jiu,稵jiu,糾jiu,九jiu,久jiu,乆jiu,乣jiu,奺jiu,汣jiu,杦jiu,灸jiu,玖jiu,舏jiu,韭jiu,紤jiu,酒jiu,镹jiu,韮jiu,匛jiu,旧jiu,臼jiu,疚jiu,柩jiu,柾jiu,倃jiu,桕jiu,厩jiu,救jiu,就jiu,廄jiu,匓jiu,舅jiu,僦jiu,廏jiu,廐jiu,慦jiu,殧jiu,舊jiu,鹫jiu,麔jiu,匶jiu,齨jiu,鷲jiu,咎jiu,欍jou,鶪ju,伡ju,俥ju,凥ju,匊ju,居ju,狙ju,苴ju,驹ju,倶ju,挶ju,捄ju,疽ju,痀ju,眗ju,砠ju,罝ju,陱ju,娵ju,婅ju,婮ju,崌ju,掬ju,梮ju,涺ju,椐ju,琚ju,腒ju,趄ju,跔ju,锔ju,裾ju,雎ju,艍ju,蜛ju,踘ju,鋦ju,駒ju,鮈ju,鴡ju,鞠ju,鞫ju,鶋ju,臄ju,揟ju,拘ju,諊ju,局ju,泦ju,侷ju,狊ju,桔ju,毩ju,淗ju,焗ju,菊ju,郹ju,椈ju,毱ju,湨ju,犑ju,輂ju,粷ju,蓻ju,趜ju,躹ju,閰ju,檋ju,駶ju,鵙ju,蹫ju,鵴ju,巈ju,蘜ju,鼰ju,鼳ju,驧ju,趉ju,郥ju,橘ju,咀ju,弆ju,沮ju,举ju,矩ju,莒ju,挙ju,椇ju,筥ju,榉ju,榘ju,蒟ju,龃ju,聥ju,舉ju,踽ju,擧ju,櫸ju,齟ju,襷ju,籧ju,郰ju,欅ju,句ju,巨ju,讵ju,姖ju,岠ju,怇ju,拒ju,洰ju,苣ju,邭ju,具ju,怚ju,拠ju,昛ju,歫ju,炬ju,秬ju,钜ju,俱ju,倨ju,冣ju,剧ju,粔ju,耟ju,蚷ju,埧ju,埾ju,惧ju,詎ju,距ju,焣ju,犋ju,跙ju,鉅ju,飓ju,虡ju,豦ju,锯ju,愳ju,窭ju,聚ju,駏ju,劇ju,勮ju,屦ju,踞ju,鮔ju,壉ju,懅ju,據ju,澽ju,遽ju,鋸ju,屨ju,颶ju,簴ju,躆ju,醵ju,懼ju,鐻ju,爠ju,坥ju,螶ju,忂ju,葅ju,蒩ju,珇ju,据ju,姢juan,娟juan,捐juan,涓juan,脧juan,裐juan,鹃juan,勬juan,鋑juan,鋗juan,镌juan,鎸juan,鵑juan,鐫juan,蠲juan,勌juan,瓹juan,梋juan,鞙juan,朘juan,呟juan,帣juan,埍juan,捲juan,菤juan,锩juan,臇juan,錈juan,埢juan,踡juan,蕋juan,卷juan,劵juan,弮juan,倦juan,桊juan,狷juan,绢juan,淃juan,眷juan,鄄juan,睊juan,絭juan,罥juan,睠juan,絹juan,慻juan,蔨juan,餋juan,獧juan,羂juan,圏juan,棬juan,惓juan,韏juan,讂juan,縳juan,襈juan,奆juan,噘jue,撅jue,撧jue,屩jue,屫jue,繑jue,亅jue,孓jue,决jue,刔jue,氒jue,诀jue,抉jue,決jue,芵jue,泬jue,玦jue,玨jue,挗jue,珏jue,砄jue,绝jue,虳jue,捔jue,欮jue,蚗jue,崛jue,掘jue,斍jue,桷jue,殌jue,焆jue,觖jue,逫jue,傕jue,厥jue,絕jue,絶jue,鈌jue,劂jue,勪jue,瑴jue,谲jue,嶥jue,憰jue,潏jue,熦jue,爴jue,獗jue,瘚jue,蕝jue,蕨jue,憠jue,橛jue,镼jue,爵jue,镢jue,蟨jue,蟩jue,爑jue,譎jue,蹷jue,鶌jue,矍jue,鐝jue,灍jue,爝jue,觼jue,彏jue,戄jue,攫jue,玃jue,鷢jue,欔jue,矡jue,龣jue,貜jue,躩jue,钁jue,璚jue,匷jue,啳jue,吷jue,疦jue,弡jue,穱jue,孒jue,訣jue,橜jue,蹶jue,倔jue,誳jue,君jun,均jun,汮jun,姰jun,袀jun,軍jun,钧jun,莙jun,蚐jun,桾jun,皲jun,菌jun,鈞jun,碅jun,筠jun,皸jun,皹jun,覠jun,銁jun,銞jun,鲪jun,麇jun,鍕jun,鮶jun,麏jun,麕jun,军jun,隽jun,雋jun,呁jun,俊jun,郡jun,陖jun,峻jun,捃jun,晙jun,馂jun,骏jun,焌jun,珺jun,畯jun,竣jun,箘jun,箟jun,蜠jun,儁jun,寯jun,懏jun,餕jun,燇jun,駿jun,鵔jun,鵕jun,鵘jun,葰jun,埈jun,咔ka,咖ka,喀ka,衉ka,哢ka,呿ka,卡ka,佧ka,垰ka,裃ka,鉲ka,胩ka,开kai,奒kai,揩kai,锎kai,開kai,鐦kai,凯kai,剀kai,垲kai,恺kai,闿kai,铠kai,凱kai,慨kai,蒈kai,塏kai,愷kai,楷kai,輆kai,暟kai,锴kai,鍇kai,鎧kai,闓kai,颽kai,喫kai,噄kai,忾kai,烗kai,勓kai,愾kai,鎎kai,愒kai,欯kai,炌kai,乫kal,刊kan,栞kan,勘kan,龛kan,堪kan,嵁kan,戡kan,龕kan,槛kan,檻kan,冚kan,坎kan,侃kan,砍kan,莰kan,偘kan,埳kan,惂kan,欿kan,塪kan,輡kan,竷kan,轗kan,衎kan,看kan,崁kan,墈kan,阚kan,瞰kan,磡kan,闞kan,矙kan,輱kan,忼kang,砊kang,粇kang,康kang,嫝kang,嵻kang,慷kang,漮kang,槺kang,穅kang,糠kang,躿kang,鏮kang,鱇kang,闶kang,閌kang,扛kang,摃kang,亢kang,伉kang,匟kang,囥kang,抗kang,炕kang,钪kang,鈧kang,邟kang,尻kao,髛kao,嵪kao,訄kao,薧kao,攷kao,考kao,拷kao,洘kao,栲kao,烤kao,铐kao,犒kao,銬kao,鲓kao,靠kao,鮳kao,鯌kao,焅kao,屙ke,蚵ke,苛ke,柯ke,牁ke,珂ke,胢ke,轲ke,疴ke,趷ke,钶ke,嵙ke,棵ke,痾ke,萪ke,軻ke,颏ke,犐ke,稞ke,窠ke,鈳ke,榼ke,薖ke,颗ke,樖ke,瞌ke,磕ke,蝌ke,頦ke,醘ke,顆ke,髁ke,礚ke,嗑ke,窼ke,簻ke,科ke,壳ke,咳ke,揢ke,翗ke,嶱ke,殼ke,毼ke,磆ke,坷ke,可ke,岢ke,炣ke,渇ke,嵑ke,敤ke,渴ke,袔ke,悈ke,歁ke,克ke,刻ke,剋ke,勀ke,勊ke,客ke,恪ke,娔ke,尅ke,课ke,堁ke,氪ke,骒ke,缂ke,愙ke,溘ke,锞ke,碦ke,課ke,礊ke,騍ke,硞ke,艐ke,緙ke,肎ken,肯ken,肻ken,垦ken,恳ken,啃ken,豤ken,貇ken,墾ken,錹ken,懇ken,頎ken,掯ken,裉ken,褃ken,硍ken,妔keng,踁keng,劥keng,吭keng,坈keng,坑keng,挳keng,硁keng,牼keng,硜keng,铿keng,硻keng,誙keng,銵keng,鏗keng,摼keng,殸keng,揁keng,鍞keng,巪keo,乬keol,唟keos,厼keum,怾ki,空kong,倥kong,埪kong,崆kong,悾kong,硿kong,箜kong,躻kong,錓kong,鵼kong,椌kong,宆kong,孔kong,恐kong,控kong,鞚kong,羫kong,廤kos,抠kou,芤kou,眍kou,剾kou,彄kou,摳kou,瞘kou,劶kou,竘kou,口kou,叩kou,扣kou,怐kou,敂kou,冦kou,宼kou,寇kou,釦kou,窛kou,筘kou,滱kou,蔲kou,蔻kou,瞉kou,簆kou,鷇kou,搰ku,刳ku,矻ku,郀ku,枯ku,哭ku,桍ku,堀ku,崫ku,圐ku,跍ku,窟ku,骷ku,泏ku,窋ku,狜ku,苦ku,楛ku,齁ku,捁ku,库ku,俈ku,绔ku,庫ku,秙ku,袴ku,喾ku,絝ku,裤ku,瘔ku,酷ku,褲ku,嚳ku,鮬ku,恗kua,夸kua,姱kua,晇kua,舿kua,誇kua,侉kua,咵kua,垮kua,銙kua,顝kua,挎kua,胯kua,跨kua,骻kua,擓kuai,蒯kuai,璯kuai,駃kuai,巜kuai,凷kuai,圦kuai,块kuai,快kuai,侩kuai,郐kuai,哙kuai,狯kuai,脍kuai,塊kuai,筷kuai,鲙kuai,儈kuai,鄶kuai,噲kuai,廥kuai,獪kuai,膾kuai,旝kuai,糩kuai,鱠kuai,蕢kuai,宽kuan,寛kuan,寬kuan,髋kuan,鑧kuan,髖kuan,欵kuan,款kuan,歀kuan,窽kuan,窾kuan,梡kuan,匡kuang,劻kuang,诓kuang,邼kuang,匩kuang,哐kuang,恇kuang,洭kuang,筐kuang,筺kuang,誆kuang,軭kuang,狂kuang,狅kuang,诳kuang,軖kuang,軠kuang,誑kuang,鵟kuang,夼kuang,儣kuang,懭kuang,爌kuang,邝kuang,圹kuang,况kuang,旷kuang,岲kuang,況kuang,矿kuang,昿kuang,贶kuang,框kuang,眖kuang,砿kuang,眶kuang,絋kuang,絖kuang,貺kuang,軦kuang,鉱kuang,鋛kuang,鄺kuang,壙kuang,黋kuang,懬kuang,曠kuang,礦kuang,穬kuang,纊kuang,鑛kuang,纩kuang,亏kui,刲kui,悝kui,盔kui,窥kui,聧kui,窺kui,虧kui,闚kui,巋kui,蘬kui,岿kui,奎kui,晆kui,逵kui,鄈kui,頄kui,馗kui,喹kui,揆kui,葵kui,骙kui,戣kui,暌kui,楏kui,楑kui,魁kui,睽kui,蝰kui,頯kui,櫆kui,藈kui,鍷kui,騤kui,夔kui,蘷kui,虁kui,躨kui,鍨kui,卼kui,煃kui,跬kui,頍kui,蹞kui,尯kui,匮kui,欳kui,喟kui,媿kui,愦kui,愧kui,溃kui,蒉kui,馈kui,匱kui,嘳kui,嬇kui,憒kui,潰kui,聩kui,聭kui,樻kui,殨kui,餽kui,簣kui,聵kui,籄kui,鐀kui,饋kui,鑎kui,篑kui,坤kun,昆kun,晜kun,堃kun,堒kun,婫kun,崐kun,崑kun,猑kun,菎kun,裈kun,焜kun,琨kun,髠kun,裩kun,锟kun,髡kun,尡kun,潉kun,蜫kun,褌kun,髨kun,熴kun,瑻kun,醌kun,錕kun,鲲kun,臗kun,騉kun,鯤kun,鵾kun,鶤kun,鹍kun,悃kun,捆kun,阃kun,壸kun,祵kun,硱kun,稇kun,裍kun,壼kun,稛kun,綑kun,閫kun,閸kun,困kun,睏kun,涃kun,秳kuo,漷kuo,扩kuo,拡kuo,括kuo,桰kuo,筈kuo,萿kuo,葀kuo,蛞kuo,阔kuo,廓kuo,頢kuo,擴kuo,濶kuo,闊kuo,鞟kuo,韕kuo,懖kuo,霩kuo,鞹kuo,鬠kuo,穒kweok,鞡la,垃la,拉la,柆la,啦la,菈la,搚la,邋la,磖la,翋la,旯la,砬la,揦la,喇la,藞la,嚹la,剌la,溂la,腊la,揧la,楋la,瘌la,牎chuang,床chuang,漺chuang,怆chuang,愴chuang,莊zhuang,粧zhuang,装zhuang,裝zhuang,樁zhuang,蜡la,蝋la,辢la,辣la,蝲la,臈la,攋la,爉la,臘la,鬎la,櫴la,瓎la,镴la,鯻la,鑞la,儠la,擸la,鱲la,蠟la,来lai,來lai,俫lai,倈lai,崃lai,徕lai,涞lai,莱lai,郲lai,婡lai,崍lai,庲lai,徠lai,梾lai,淶lai,猍lai,萊lai,逨lai,棶lai,琜lai,筙lai,铼lai,箂lai,錸lai,騋lai,鯠lai,鶆lai,麳lai,顂lai,勑lai,誺lai,赉lai,睐lai,睞lai,赖lai,賚lai,濑lai,賴lai,頼lai,癞lai,鵣lai,瀨lai,瀬lai,籁lai,藾lai,癩lai,襰lai,籟lai,唻lai,暕lan,兰lan,岚lan,拦lan,栏lan,婪lan,嵐lan,葻lan,阑lan,蓝lan,谰lan,厱lan,褴lan,儖lan,斓lan,篮lan,懢lan,燣lan,藍lan,襕lan,镧lan,闌lan,璼lan,襤lan,譋lan,幱lan,攔lan,瀾lan,灆lan,籃lan,繿lan,蘭lan,斕lan,欄lan,礷lan,襴lan,囒lan,灡lan,籣lan,欗lan,讕lan,躝lan,鑭lan,钄lan,韊lan,惏lan,澜lan,襽lan,览lan,浨lan,揽lan,缆lan,榄lan,漤lan,罱lan,醂lan,壈lan,懒lan,覧lan,擥lan,懶lan,孄lan,覽lan,孏lan,攬lan,欖lan,爦lan,纜lan,灠lan,顲lan,蘫lan,嬾lan,烂lan,滥lan,燗lan,嚂lan,壏lan,濫lan,爛lan,爤lan,瓓lan,糷lan,湅lan,煉lan,爁lan,唥lang,啷lang,羮lang,勆lang,郎lang,郞lang,欴lang,狼lang,嫏lang,廊lang,桹lang,琅lang,蓈lang,榔lang,瑯lang,硠lang,稂lang,锒lang,筤lang,艆lang,蜋lang,郒lang,螂lang,躴lang,鋃lang,鎯lang,阆lang,閬lang,哴lang,悢lang,朗lang,朖lang,烺lang,塱lang,蓢lang,樃lang,誏lang,朤lang,俍lang,脼lang,莨lang,埌lang,浪lang,蒗lang,捞lao,粩lao,撈lao,劳lao,労lao,牢lao,窂lao,哰lao,崂lao,浶lao,勞lao,痨lao,僗lao,嶗lao,憥lao,朥lao,癆lao,磱lao,簩lao,蟧lao,醪lao,鐒lao,顟lao,髝lao,轑lao,嫪lao,憦lao,铹lao,耂lao,老lao,佬lao,咾lao,姥lao,恅lao,荖lao,栳lao,珯lao,硓lao,铑lao,蛯lao,銠lao,橑lao,鮱lao,唠lao,嘮lao,烙lao,嗠lao,耢lao,酪lao,澇lao,橯lao,耮lao,軂lao,涝lao,饹le,了le,餎le,牞le,仂le,阞le,乐le,叻le,忇le,扐le,氻le,艻le,玏le,泐le,竻le,砳le,勒le,楽le,韷le,樂le,簕le,鳓le,鰳le,頛lei,嘞lei,雷lei,嫘lei,缧lei,蔂lei,樏lei,畾lei,檑lei,縲lei,镭lei,櫑lei,瓃lei,羸lei,礧lei,罍lei,蘲lei,鐳lei,轠lei,壨lei,鑘lei,靁lei,虆lei,鱩lei,欙lei,纝lei,鼺lei,磥lei,攂lei,腂lei,瘣lei,厽lei,耒lei,诔lei,垒lei,絫lei,傫lei,誄lei,磊lei,蕌lei,蕾lei,儡lei,壘lei,癗lei,藟lei,櫐lei,矋lei,礨lei,灅lei,蠝lei,蘽lei,讄lei,儽lei,鑸lei,鸓lei,洡lei,礌lei,塁lei,纍lei,肋lei,泪lei,类lei,涙lei,淚lei,累lei,酹lei,銇lei,頪lei,擂lei,錑lei,颣lei,類lei,纇lei,蘱lei,禷lei,祱lei,塄leng,棱leng,楞leng,碐leng,稜leng,踜leng,薐leng,輘leng,冷leng,倰leng,堎leng,愣leng,睖leng,瓈li,唎li,粚li,刕li,厘li,剓li,梨li,狸li,荲li,骊li,悡li,梸li,犁li,菞li,喱li,棃li,犂li,鹂li,剺li,漓li,睝li,筣li,缡li,艃li,蓠li,蜊li,嫠li,孷li,樆li,璃li,盠li,竰li,氂li,犛li,糎li,蔾li,鋫li,鲡li,黎li,篱li,縭li,罹li,錅li,蟍li,謧li,醨li,嚟li,藜li,邌li,釐li,離li,鯏li,鏫li,鯬li,鵹li,黧li,囄li,灕li,蘺li,蠡li,蠫li,孋li,廲li,劙li,鑗li,籬li,驪li,鱺li,鸝li,婯li,儷li,矖li,纚li,离li,褵li,穲li,礼li,李li,里li,俚li,峛li,哩li,娌li,峲li,浬li,逦li,理li,裡li,锂li,粴li,裏li,鋰li,鲤li,澧li,禮li,鯉li,蟸li,醴li,鳢li,邐li,鱧li,欐li,欚li,銐li,脷li,莉li,力li,历li,厉li,屴li,立li,吏li,朸li,丽li,利li,励li,呖li,坜li,沥li,苈li,例li,岦li,戾li,枥li,沴li,疠li,苙li,隶li,俐li,俪li,栃li,栎li,疬li,砅li,茘li,荔li,轹li,郦li,娳li,悧li,栗li,栛li,栵li,涖li,猁li,珕li,砺li,砾li,秝li,莅li,唳li,悷li,琍li,笠li,粒li,粝li,蚸li,蛎li,傈li,凓li,厤li,棙li,痢li,蛠li,詈li,雳li,塛li,慄li,搮li,溧li,蒚li,蒞li,鉝li,鳨li,厯li,厲li,暦li,歴li,瑮li,綟li,蜧li,勵li,曆li,歷li,篥li,隷li,鴗li,巁li,檪li,濿li,癘li,磿li,隸li,鬁li,儮li,櫔li,爄li,犡li,禲li,蠇li,嚦li,壢li,攊li,櫟li,瀝li,瓅li,礪li,藶li,麗li,櫪li,爏li,瓑li,皪li,盭li,礫li,糲li,蠣li,癧li,礰li,酈li,鷅li,麜li,囇li,攦li,轢li,讈li,轣li,攭li,瓥li,靂li,鱱li,靋li,觻li,鱳li,叓li,蝷li,赲li,曞li,嫾lian,奁lian,连lian,帘lian,怜lian,涟lian,莲lian,連lian,梿lian,联lian,裢lian,亷lian,嗹lian,廉lian,慩lian,溓lian,漣lian,蓮lian,奩lian,熑lian,覝lian,劆lian,匳lian,噒lian,憐lian,磏lian,聨lian,聫lian,褳lian,鲢lian,濂lian,濓lian,縺lian,翴lian,聮lian,薕lian,螊lian,櫣lian,燫lian,聯lian,臁lian,蹥lian,謰lian,鎌lian,镰lian,簾lian,蠊lian,譧lian,鐮lian,鰱lian,籢lian,籨lian,槤lian,僆lian,匲lian,鬑lian,敛lian,琏lian,脸lian,裣lian,摙lian,璉lian,蔹lian,嬚lian,斂lian,歛lian,臉lian,鄻lian,襝lian,羷lian,蘝lian,蘞lian,薟lian,练lian,炼lian,恋lian,浰lian,殓lian,堜lian,媡lian,链lian,楝lian,瑓lian,潋lian,稴lian,練lian,澰lian,錬lian,殮lian,鍊lian,鏈lian,瀲lian,鰊lian,戀lian,纞lian,孌lian,攣lian,萰lian,簗liang,良liang,凉liang,梁liang,涼liang,椋liang,辌liang,粮liang,粱liang,墚liang,綡liang,輬liang,糧liang,駺liang,樑liang,冫liang,俩liang,倆liang,両liang,两liang,兩liang,唡liang,啢liang,掚liang,裲liang,緉liang,蜽liang,魉liang,魎liang,倞liang,靓liang,靚liang,踉liang,亮liang,谅liang,辆liang,喨liang,晾liang,湸liang,量liang,煷liang,輌liang,諒liang,輛liang,鍄liang,蹽liao,樛liao,潦liao,辽liao,疗liao,僚liao,寥liao,嵺liao,憀liao,漻liao,膋liao,嘹liao,嫽liao,寮liao,嶚liao,嶛liao,憭liao,撩liao,敹liao,獠liao,缭liao,遼liao,暸liao,燎liao,璙liao,窷liao,膫liao,療liao,竂liao,鹩liao,屪liao,廫liao,簝liao,蟟liao,豂liao,賿liao,蹘liao,爎liao,髎liao,飉liao,鷯liao,镽liao,尞liao,镠liao,鏐liao,僇liao,聊liao,繚liao,钌liao,釕liao,鄝liao,蓼liao,爒liao,瞭liao,廖liao,镣liao,鐐liao,尥liao,炓liao,料liao,撂liao,蟉liao,鴷lie,咧lie,毟lie,挘lie,埓lie,忚lie,列lie,劣lie,冽lie,姴lie,峢lie,挒lie,洌lie,茢lie,迾lie,埒lie,浖lie,烈lie,烮lie,捩lie,猎lie,猟lie,脟lie,蛚lie,裂lie,煭lie,睙lie,聗lie,趔lie,巤lie,颲lie,鮤lie,獵lie,犣lie,躐lie,鬛lie,哷lie,劦lie,奊lie,劽lie,鬣lie,拎lin,邻lin,林lin,临lin,啉lin,崊lin,淋lin,晽lin,琳lin,粦lin,痳lin,碄lin,箖lin,粼lin,鄰lin,隣lin,嶙lin,潾lin,獜lin,遴lin,斴lin,暽lin,燐lin,璘lin,辚lin,霖lin,瞵lin,磷lin,繗lin,翷lin,麐lin,轔lin,壣lin,瀶lin,鏻lin,鳞lin,驎lin,麟lin,鱗lin,疄lin,蹸lin,魿lin,涁lin,臨lin,菻lin,亃lin,僯lin,凛lin,凜lin,撛lin,廩lin,廪lin,懍lin,懔lin,澟lin,檁lin,檩lin,伈lin,吝lin,恡lin,赁lin,焛lin,賃lin,蔺lin,橉lin,甐lin,膦lin,閵lin,藺lin,躏lin,躙lin,躪lin,轥lin,悋lin,伶ling,刢ling,灵ling,囹ling,坽ling,夌ling,姈ling,岺ling,彾ling,泠ling,狑ling,苓ling,昤ling,柃ling,玲ling,瓴ling,凌ling,皊ling,砱ling,秢ling,竛ling,铃ling,陵ling,鸰ling,婈ling,崚ling,掕ling,棂ling,淩ling,琌ling,笭ling,紷ling,绫ling,羚ling,翎ling,聆ling,舲ling,菱ling,蛉ling,衑ling,祾ling,詅ling,跉ling,蓤ling,裬ling,鈴ling,閝ling,零ling,龄ling,綾ling,蔆ling,霊ling,駖ling,澪ling,蕶ling,錂ling,霗ling,鲮ling,鴒ling,鹷ling,燯ling,霛ling,霝ling,齢ling,瀮ling,酃ling,鯪ling,孁ling,蘦ling,齡ling,櫺ling,靈ling,欞ling,爧ling,麢ling,龗ling,阾ling,袊ling,靇ling,朎ling,軨ling,醽ling,岭ling,领ling,領ling,嶺ling,令ling,另ling,呤ling,炩ling,溜liu,熘liu,澑liu,蹓liu,刘liu,沠liu,畄liu,浏liu,流liu,留liu,旈liu,琉liu,畱liu,硫liu,裗liu,媹liu,嵧liu,旒liu,蓅liu,遛liu,馏liu,骝liu,榴liu,瑠liu,飗liu,劉liu,瑬liu,瘤liu,磂liu,镏liu,駠liu,鹠liu,橊liu,璢liu,疁liu,癅liu,駵liu,嚠liu,懰liu,瀏liu,藰liu,鎏liu,鎦liu,餾liu,麍liu,鐂liu,騮liu,飅liu,鰡liu,鶹liu,驑liu,蒥liu,飀liu,柳liu,栁liu,桞liu,珋liu,桺liu,绺liu,锍liu,綹liu,熮liu,罶liu,鋶liu,橮liu,羀liu,嬼liu,畂liu,六liu,翏liu,塯liu,廇liu,磟liu,鹨liu,霤liu,雡liu,鬸liu,鷚liu,飂liu,囖lo,谾long,龙long,屸long,咙long,泷long,茏long,昽long,栊long,珑long,胧long,眬long,砻long,笼long,聋long,隆long,湰long,嶐long,槞long,漋long,蕯long,癃long,窿long,篭long,龍long,巃long,巄long,瀧long,蘢long,鏧long,霳long,曨long,櫳long,爖long,瓏long,矓long,礱long,礲long,襱long,籠long,聾long,蠪long,蠬long,龓long,豅long,躘long,鑨long,驡long,鸗long,滝long,嚨long,朧long,陇long,垄long,垅long,儱long,隴long,壟long,壠long,攏long,竉long,徿long,拢long,梇long,衖long,贚long,喽lou,嘍lou,窶lou,娄lou,婁lou,溇lou,蒌lou,楼lou,廔lou,慺lou,蔞lou,遱lou,樓lou,熡lou,耧lou,蝼lou,艛lou,螻lou,謱lou,軁lou,髅lou,鞻lou,髏lou,漊lou,屚lou,膢lou,耬lou,嵝lou,搂lou,塿lou,嶁lou,摟lou,甊lou,篓lou,簍lou,陋lou,漏lou,瘘lou,镂lou,瘺lou,鏤lou,氌lu,氇lu,噜lu,撸lu,嚕lu,擼lu,卢lu,芦lu,垆lu,枦lu,泸lu,炉lu,栌lu,胪lu,轳lu,舮lu,鸬lu,玈lu,舻lu,颅lu,鈩lu,鲈lu,魲lu,盧lu,嚧lu,壚lu,廬lu,攎lu,瀘lu,獹lu,蘆lu,櫨lu,爐lu,瓐lu,臚lu,矑lu,纑lu,罏lu,艫lu,蠦lu,轤lu,鑪lu,顱lu,髗lu,鱸lu,鸕lu,黸lu,鹵lu,塷lu,庐lu,籚lu,卤lu,虏lu,挔lu,捛lu,掳lu,硵lu,鲁lu,虜lu,滷lu,蓾lu,樐lu,澛lu,魯lu,擄lu,橹lu,磠lu,镥lu,櫓lu,艣lu,鏀lu,艪lu,鐪lu,鑥lu,瀂lu,露lu,圥lu,甪lu,陆lu,侓lu,坴lu,彔lu,录lu,峍lu,勎lu,赂lu,辂lu,陸lu,娽lu,淕lu,淥lu,渌lu,硉lu,菉lu,逯lu,鹿lu,椂lu,琭lu,祿lu,剹lu,勠lu,盝lu,睩lu,碌lu,稑lu,賂lu,路lu,輅lu,塶lu,廘lu,摝lu,漉lu,箓lu,粶lu,蔍lu,戮lu,膟lu,觮lu,趢lu,踛lu,辘lu,醁lu,潞lu,穋lu,錄lu,録lu,錴lu,璐lu,簏lu,螰lu,鴼lu,簶lu,蹗lu,轆lu,騄lu,鹭lu,簬lu,簵lu,鯥lu,鵦lu,鵱lu,麓lu,鏴lu,騼lu,籙lu,虂lu,鷺lu,緑lu,攄lu,禄lu,蕗lu,娈luan,孪luan,峦luan,挛luan,栾luan,鸾luan,脔luan,滦luan,銮luan,鵉luan,奱luan,孿luan,巒luan,曫luan,欒luan,灓luan,羉luan,臠luan,圞luan,灤luan,虊luan,鑾luan,癴luan,癵luan,鸞luan,圝luan,卵luan,乱luan,釠luan,亂luan,乿luan,掠lue,稤lue,略lue,畧lue,锊lue,圙lue,鋝lue,鋢lue,剠lue,擽lue,抡lun,掄lun,仑lun,伦lun,囵lun,沦lun,纶lun,轮lun,倫lun,陯lun,圇lun,婨lun,崘lun,崙lun,惀lun,淪lun,菕lun,棆lun,腀lun,碖lun,綸lun,蜦lun,踚lun,輪lun,磮lun,鯩lun,耣lun,稐lun,埨lun,侖lun,溣lun,論lun,论lun,頱luo,囉luo,啰luo,罗luo,猡luo,脶luo,萝luo,逻luo,椤luo,腡luo,锣luo,箩luo,骡luo,镙luo,螺luo,羅luo,覶luo,鏍luo,儸luo,覼luo,騾luo,蘿luo,邏luo,欏luo,鸁luo,鑼luo,饠luo,驘luo,攞luo,籮luo,剆luo,倮luo,砢luo,蓏luo,裸luo,躶luo,瘰luo,蠃luo,臝luo,曪luo,癳luo,茖luo,蛒luo,硦luo,泺luo,峈luo,洛luo,络luo,荦luo,骆luo,洜luo,珞luo,笿luo,絡luo,落luo,摞luo,漯luo,犖luo,雒luo,鮥luo,鵅luo,濼luo,纙luo,挼luo,跞luo,駱luo,瞜lv,瘻lv,驴lv,闾lv,榈lv,馿lv,氀lv,櫚lv,藘lv,曥lv,鷜lv,驢lv,閭lv,偻lv,僂lv,吕lv,呂lv,侣lv,郘lv,侶lv,旅lv,梠lv,焒lv,祣lv,稆lv,铝lv,屡lv,絽lv,缕lv,屢lv,膂lv,膐lv,褛lv,鋁lv,履lv,褸lv,儢lv,縷lv,穭lv,捋lv,穞lv,寠lv,滤lv,濾lv,寽lv,垏lv,律lv,虑lv,率lv,绿lv,嵂lv,氯lv,葎lv,綠lv,慮lv,箻lv,勴lv,繂lv,櫖lv,爈lv,鑢lv,卛lv,亇ma,吗ma,嗎ma,嘛ma,妈ma,媽ma,痲ma,孖ma,麻ma,嫲ma,蔴ma,犘ma,蟆ma,蟇ma,尛ma,马ma,犸ma,玛ma,码ma,蚂ma,馬ma,溤ma,獁ma,遤ma,瑪ma,碼ma,螞ma,鷌ma,鰢ma,傌ma,榪ma,鎷ma,杩ma,祃ma,閁ma,骂ma,睰ma,嘜ma,禡ma,罵ma,駡ma,礣ma,鬕ma,貍mai,埋mai,霾mai,买mai,荬mai,買mai,嘪mai,蕒mai,鷶mai,唛mai,劢mai,佅mai,売mai,麦mai,卖mai,脈mai,麥mai,衇mai,勱mai,賣mai,邁mai,霡mai,霢mai,迈mai,颟man,顢man,姏man,悗man,蛮man,慲man,摱man,馒man,槾man,樠man,瞒man,瞞man,鞔man,饅man,鳗man,鬗man,鬘man,蠻man,矕man,僈man,屘man,満man,睌man,满man,滿man,螨man,襔man,蟎man,鏋man,曼man,谩man,墁man,幔man,慢man,漫man,獌man,缦man,蔄man,蔓man,熳man,澷man,镘man,縵man,蟃man,鏝man,蘰man,鰻man,謾man,牤mang,朚mang,龒mang,邙mang,吂mang,忙mang,汒mang,芒mang,尨mang,杗mang,杧mang,盲mang,厖mang,恾mang,笀mang,茫mang,哤mang,娏mang,浝mang,狵mang,牻mang,硭mang,釯mang,铓mang,痝mang,鋩mang,駹mang,蘉mang,氓mang,甿mang,庬mang,鹲mang,鸏mang,莽mang,茻mang,壾mang,漭mang,蟒mang,蠎mang,莾mang,匁mangmi,猫mao,貓mao,毛mao,矛mao,枆mao,牦mao,茅mao,旄mao,渵mao,軞mao,酕mao,堥mao,锚mao,緢mao,髦mao,髳mao,錨mao,蟊mao,鶜mao,茆mao,罞mao,鉾mao,冇mao,戼mao,峁mao,泖mao,昴mao,铆mao,笷mao,蓩mao,鉚mao,卯mao,秏mao,冃mao,皃mao,芼mao,冐mao,茂mao,冒mao,贸mao,耄mao,袤mao,覒mao,媢mao,帽mao,貿mao,鄚mao,愗mao,暓mao,楙mao,毷mao,瑁mao,貌mao,鄮mao,蝐mao,懋mao,霿mao,獏mao,毣mao,萺mao,瞀mao,唜mas,么me,嚜me,麼me,麽me,庅me,嚒me,孭me,濹me,嚰me,沒mei,没mei,枚mei,玫mei,苺mei,栂mei,眉mei,脄mei,莓mei,梅mei,珻mei,脢mei,郿mei,堳mei,媒mei,嵋mei,湄mei,湈mei,睂mei,葿mei,楣mei,楳mei,煤mei,瑂mei,禖mei,腜mei,塺mei,槑mei,酶mei,镅mei,鹛mei,鋂mei,霉mei,徾mei,鎇mei,矀mei,攗mei,蘪mei,鶥mei,攟mei,黴mei,坆mei,猸mei,羙mei,毎mei,每mei,凂mei,美mei,挴mei,浼mei,媄mei,渼mei,媺mei,镁mei,嬍mei,燘mei,躾mei,鎂mei,黣mei,嵄mei,眊mei,妹mei,抺mei,沬mei,昧mei,祙mei,袂mei,眛mei,媚mei,寐mei,痗mei,跊mei,鬽mei,煝mei,睸mei,魅mei,篃mei,蝞mei,櫗mei,氼mei,们men,們men,椚men,门men,扪men,钔men,門men,閅men,捫men,菛men,璊men,穈men,鍆men,虋men,怋men,玣men,殙men,闷men,焖men,悶men,暪men,燜men,懑men,懣men,掹meng,擝meng,懞meng,虻meng,冡meng,莔meng,萌meng,萠meng,盟meng,甍meng,儚meng,橗meng,瞢meng,蕄meng,蝱meng,鄳meng,鄸meng,幪meng,濛meng,獴meng,曚meng,朦meng,檬meng,氋meng,礞meng,鯍meng,艨meng,矒meng,靀meng,饛meng,顭meng,蒙meng,鼆meng,夣meng,懜meng,溕meng,矇meng,勐meng,猛meng,锰meng,艋meng,蜢meng,錳meng,懵meng,蠓meng,鯭meng,黽meng,瓾meng,夢meng,孟meng,梦meng,霥meng,踎meo,咪mi,瞇mi,眯mi,冞mi,弥mi,祢mi,迷mi,袮mi,猕mi,谜mi,蒾mi,詸mi,謎mi,醚mi,彌mi,糜mi,縻mi,麊mi,麋mi,禰mi,靡mi,獼mi,麛mi,爢mi,瓕mi,蘼mi,镾mi,醾mi,醿mi,鸍mi,釄mi,檷mi,籋mi,罙mi,擟mi,米mi,羋mi,芈mi,侎mi,沵mi,弭mi,洣mi,敉mi,粎mi,脒mi,葞mi,蝆mi,蔝mi,銤mi,瀰mi,孊mi,灖mi,渳mi,哋mi,汨mi,沕mi,宓mi,泌mi,觅mi,峚mi,宻mi,秘mi,密mi,淧mi,覓mi,覔mi,幂mi,谧mi,塓mi,幎mi,覛mi,嘧mi,榓mi,漞mi,熐mi,蔤mi,蜜mi,鼏mi,冪mi,樒mi,幦mi,濗mi,藌mi,謐mi,櫁mi,簚mi,羃mi,鑖mi,蓂mi,滵mi,芇mian,眠mian,婂mian,绵mian,媔mian,棉mian,綿mian,緜mian,蝒mian,嬵mian,檰mian,櫋mian,矈mian,矊mian,蠠mian,矏mian,厸mian,丏mian,汅mian,免mian,沔mian,黾mian,俛mian,勉mian,眄mian,娩mian,偭mian,冕mian,勔mian,喕mian,愐mian,湎mian,缅mian,葂mian,腼mian,緬mian,鮸mian,渑mian,澠mian,靦mian,靣mian,面mian,糆mian,麪mian,麫mian,麺mian,麵mian,喵miao,苗miao,媌miao,瞄miao,鹋miao,嫹miao,鶓miao,鱙miao,描miao,訬miao,仯miao,杪miao,眇miao,秒miao,淼miao,渺miao,缈miao,篎miao,緲miao,藐miao,邈miao,妙miao,庙miao,竗miao,庿miao,廟miao,吀mie,咩mie,哶mie,灭mie,搣mie,滅mie,薎mie,幭mie,懱mie,篾mie,蠛mie,衊mie,鱴mie,蔑mie,民min,垊min,姄min,岷min,旻min,旼min,玟min,苠min,珉min,盿min,冧min,罠min,崏min,捪min,琘min,琝min,暋min,瑉min,痻min,碈min,鈱min,賯min,錉min,鍲min,缗min,湏min,緍min,緡min,皿min,冺min,刡min,闵min,抿min,泯min,勄min,敃min,闽min,悯min,敏min,笢min,笽min,湣min,閔min,愍min,敯min,閩min,慜min,憫min,潣min,簢min,鳘min,鰵min,僶min,名ming,明ming,鸣ming,洺ming,眀ming,茗ming,冥ming,朙ming,眳ming,铭ming,鄍ming,嫇ming,溟ming,猽ming,暝ming,榠ming,銘ming,鳴ming,瞑ming,螟ming,覭ming,佲ming,凕ming,慏ming,酩ming,姳ming,命ming,掵ming,詺ming,谬miu,缪miu,繆miu,謬miu,摸mo,嚤mo,嬤mo,嬷mo,戂mo,攠mo,谟mo,嫫mo,馍mo,摹mo,模mo,膜mo,摩mo,魹mo,橅mo,磨mo,糢mo,謨mo,謩mo,擵mo,饃mo,蘑mo,髍mo,魔mo,劘mo,饝mo,嚩mo,懡mo,麿mo,狢mo,貈mo,貉mo,脉mo,瀎mo,抹mo,末mo,劰mo,圽mo,妺mo,怽mo,歿mo,殁mo,沫mo,茉mo,陌mo,帞mo,昩mo,枺mo,皌mo,眜mo,眿mo,砞mo,秣mo,莈mo,眽mo,粖mo,絈mo,蛨mo,貃mo,嗼mo,塻mo,寞mo,漠mo,蓦mo,貊mo,銆mo,墨mo,嫼mo,暯mo,瘼mo,瞐mo,瞙mo,镆mo,魩mo,黙mo,縸mo,默mo,貘mo,藦mo,蟔mo,鏌mo,爅mo,礳mo,纆mo,耱mo,艒mo,莫mo,驀mo,乮mol,哞mou,呣mou,蛑mou,蝥mou,牟mou,侔mou,劺mou,恈mou,洠mou,眸mou,谋mou,謀mou,鍪mou,鴾mou,麰mou,鞪mou,某mou,呒mu,嘸mu,毪mu,氁mu,母mu,亩mu,牡mu,姆mu,拇mu,牳mu,畆mu,畒mu,胟mu,畝mu,畞mu,砪mu,畮mu,鉧mu,踇mu,坶mu,峔mu,朷mu,木mu,仫mu,目mu,凩mu,沐mu,狇mu,炑mu,牧mu,苜mu,莯mu,蚞mu,钼mu,募mu,雮mu,墓mu,幕mu,慔mu,楘mu,睦mu,鉬mu,慕mu,暮mu,樢mu,霂mu,穆mu,幙mu,旀myeo,椧myeong,秅na,拏na,拿na,挐na,誽na,镎na,鎿na,乸na,詉na,蒘na,訤na,哪na,雫na,郍na,那na,吶na,妠na,纳na,肭na,娜na,钠na,納na,袦na,捺na,笝na,豽na,軜na,鈉na,嗱na,蒳na,靹na,魶na,呐na,內na,篛na,衲na,腉nai,熋nai,摨nai,孻nai,螚nai,搱nai,乃nai,奶nai,艿nai,氖nai,疓nai,妳nai,廼nai,迺nai,倷nai,釢nai,奈nai,柰nai,萘nai,渿nai,鼐nai,褦nai,錼nai,耐nai,囡nan,男nan,抩nan,枏nan,枬nan,侽nan,南nan,柟nan,娚nan,畘nan,莮nan,难nan,喃nan,遖nan,暔nan,楠nan,煵nan,諵nan,難nan,萳nan,嫨nan,赧nan,揇nan,湳nan,腩nan,戁nan,蝻nan,婻nan,囔nang,涳nang,乪nang,嚢nang,囊nang,蠰nang,鬞nang,馕nang,欜nang,饢nang,搑nang,崀nang,擃nang,曩nang,攮nang,灢nang,瀼nang,儾nang,齉nang,孬nao,檂nao,巙nao,呶nao,怓nao,挠nao,峱nao,硇nao,铙nao,猱nao,蛲nao,碙nao,撓nao,獶nao,蟯nao,夒nao,譊nao,鐃nao,巎nao,獿nao,憹nao,蝚nao,嶩nao,垴nao,恼nao,悩nao,脑nao,匘nao,脳nao,堖nao,惱nao,嫐nao,瑙nao,腦nao,碯nao,闹nao,婥nao,淖nao,閙nao,鬧nao,臑nao,呢ne,讷ne,抐ne,眲ne,訥ne,娞nei,馁nei,腇nei,餒nei,鮾nei,鯘nei,浽nei,内nei,氝nei,焾nem,嫩nen,媆nen,嫰nen,竜neng,能neng,莻neus,鈪ngag,銰ngai,啱ngam,妮ni,尼ni,坭ni,怩ni,泥ni,籾ni,倪ni,屔ni,秜ni,郳ni,铌ni,埿ni,婗ni,猊ni,蚭ni,棿ni,跜ni,鈮ni,蜺ni,觬ni,貎ni,霓ni,鲵ni,鯢ni,麑ni,齯ni,臡ni,抳ni,蛪ni,腝ni,淣ni,聻ni,濔ni,伱ni,你ni,拟ni,狔ni,苨ni,柅ni,旎ni,晲ni,孴ni,鉨ni,馜ni,隬ni,擬ni,薿ni,鑈ni,儞ni,伲ni,迡ni,昵ni,胒ni,逆ni,匿ni,痆ni,眤ni,堄ni,惄ni,嫟ni,愵ni,溺ni,睨ni,腻ni,暱ni,縌ni,膩ni,嬺ni,灄ni,孨ni,拈nian,蔫nian,年nian,秊nian,哖nian,秥nian,鮎nian,鲶nian,鵇nian,黏nian,鯰nian,姩nian,鲇nian,跈nian,涊nian,捻nian,淰nian,辇nian,撚nian,撵nian,碾nian,輦nian,簐nian,攆nian,蹨nian,躎nian,辗nian,輾nian,卄nian,廿nian,念nian,埝nian,艌nian,娘niang,嬢niang,醸niang,酿niang,釀niang,茮niao,尦niao,鸟niao,袅niao,鳥niao,嫋niao,裊niao,蔦niao,嬝niao,褭niao,嬲niao,茑niao,尿niao,脲niao,捏nie,揑nie,乜nie,帇nie,圼nie,苶nie,枿nie,陧nie,涅nie,聂nie,臬nie,啮nie,惗nie,菍nie,隉nie,喦nie,敜nie,嗫nie,嵲nie,踂nie,摰nie,槷nie,踗nie,踙nie,镊nie,镍nie,嶭nie,篞nie,臲nie,錜nie,颞nie,蹑nie,嚙nie,聶nie,鎳nie,闑nie,孼nie,孽nie,櫱nie,蘖nie,囁nie,齧nie,巕nie,糱nie,糵nie,蠥nie,囓nie,躡nie,鑷nie,顳nie,諗nie,囐nie,銸nie,鋷nie,讘nie,脌nin,囜nin,您nin,恁nin,拰nin,宁ning,咛ning,狞ning,柠ning,聍ning,寍ning,寕ning,寜ning,寧ning,儜ning,凝ning,嚀ning,嬣ning,獰ning,薴ning,檸ning,聹ning,鑏ning,鬡ning,鸋ning,甯ning,濘ning,鬤ning,拧ning,擰ning,矃ning,橣ning,佞ning,侫ning,泞ning,寗ning,澝ning,妞niu,牛niu,牜niu,忸niu,扭niu,沑niu,狃niu,纽niu,杻niu,炄niu,钮niu,紐niu,莥niu,鈕niu,靵niu,拗niu,莀nong,农nong,侬nong,哝nong,浓nong,脓nong,秾nong,儂nong,辳nong,噥nong,濃nong,蕽nong,禯nong,膿nong,穠nong,襛nong,醲nong,欁nong,癑nong,農nong,繷nong,廾nong,弄nong,挊nong,挵nong,齈nong,羺nou,譨nou,啂nou,槈nou,耨nou,獳nou,檽nou,鎒nou,鐞nou,譳nou,嬬nou,奴nu,驽nu,笯nu,駑nu,砮nu,孥nu,伮nu,努nu,弩nu,胬nu,怒nu,傉nu,搙nu,奻nuan,渜nuan,暖nuan,煗nuan,餪nuan,疟nue,虐nue,瘧nue,硸nue,黁nun,燶nung,挪nuo,梛nuo,傩nuo,搻nuo,儺nuo,橠nuo,袲nuo,诺nuo,喏nuo,掿nuo,逽nuo,搦nuo,锘nuo,榒nuo,稬nuo,諾nuo,蹃nuo,糑nuo,懦nuo,懧nuo,糥nuo,穤nuo,糯nuo,堧nuo,耎nuo,愞nuo,女nv,钕nv,籹nv,釹nv,衂nv,恧nv,朒nv,衄nv,筽o,噢o,哦o,夞oes,乯ol,鞰on,吽ou,讴ou,欧ou,殴ou,瓯ou,鸥ou,塸ou,歐ou,毆ou,熰ou,甌ou,膒ou,鴎ou,櫙ou,藲ou,謳ou,鏂ou,鷗ou,沤ou,蓲ou,敺ou,醧ou,漚ou,齵ou,澫ou,吘ou,呕ou,偶ou,腢ou,嘔ou,耦ou,蕅ou,藕ou,怄ou,慪ou,妑pa,趴pa,舥pa,啪pa,葩pa,帊pa,杷pa,爬pa,耙pa,掱pa,琶pa,筢pa,潖pa,跁pa,帕pa,怕pa,袙pa,拍pai,俳pai,徘pai,排pai,猅pai,牌pai,輫pai,簰pai,犤pai,哌pai,派pai,蒎pai,鎃pai,湃pai,磗pak,眅pan,畨pan,潘pan,攀pan,膰pan,爿pan,柈pan,盘pan,媻pan,幋pan,蒰pan,槃pan,盤pan,磐pan,縏pan,蹒pan,瀊pan,蟠pan,蹣pan,鎜pan,鞶pan,踫pan,宷pan,洀pan,闆pan,坢pan,盻pan,眫pan,冸pan,判pan,沜pan,泮pan,叛pan,牉pan,盼pan,畔pan,袢pan,詊pan,溿pan,頖pan,鋬pan,鵥pan,襻pan,鑻pan,炍pan,乓pang,汸pang,沗pang,肨pang,胮pang,雱pang,滂pang,膖pang,霶pang,磅pang,趽pang,彷pang,夆pang,厐pang,庞pang,逄pang,旁pang,舽pang,篣pang,螃pang,鳑pang,龐pang,鰟pang,蠭pang,髈pang,龎pang,耪pang,覫pang,炐pang,胖pang,抛pao,拋pao,脬pao,刨pao,咆pao,垉pao,庖pao,狍pao,炰pao,爮pao,袍pao,匏pao,軳pao,鞄pao,褜pao,麅pao,颮pao,跑pao,窌pao,炮pao,奅pao,泡pao,皰pao,砲pao,萢pao,麭pao,礟pao,礮pao,犥pao,疱pao,妚pei,呸pei,怌pei,肧pei,胚pei,衃pei,醅pei,抷pei,阫pei,陪pei,陫pei,培pei,毰pei,赔pei,锫pei,裴pei,裵pei,賠pei,錇pei,駍pei,婄pei,俖pei,茷pei,攈pei,伂pei,沛pei,佩pei,帔pei,姵pei,旆pei,浿pei,珮pei,配pei,笩pei,蓜pei,辔pei,馷pei,嶏pei,霈pei,轡pei,斾pei,喷pen,噴pen,濆pen,歕pen,衯pen,瓫pen,盆pen,湓pen,葐pen,呠pen,翸pen,匉peng,怦peng,抨peng,泙peng,恲peng,胓peng,砰peng,烹peng,硑peng,軯peng,閛peng,漰peng,嘭peng,磞peng,弸peng,荓peng,軿peng,輧peng,梈peng,芃peng,朋peng,竼peng,倗peng,莑peng,堋peng,彭peng,棚peng,椖peng,塜peng,塳peng,漨peng,硼peng,稝peng,蓬peng,鹏peng,槰peng,樥peng,憉peng,澎peng,輣peng,篷peng,膨peng,韸peng,髼peng,蟚peng,蟛peng,鬅peng,纄peng,韼peng,鵬peng,鬔peng,鑝peng,淜peng,熢peng,摓peng,捧peng,淎peng,皏peng,剻peng,掽peng,椪peng,碰peng,浌peol,巼phas,闏phdeng,乶phoi,喸phos,榌pi,伓pi,伾pi,批pi,纰pi,邳pi,坯pi,披pi,炋pi,狉pi,狓pi,砒pi,秛pi,秠pi,紕pi,耚pi,豾pi,釽pi,鉟pi,銔pi,劈pi,磇pi,駓pi,噼pi,錃pi,魾pi,憵pi,礔pi,礕pi,霹pi,鲏pi,鮍pi,丕pi,髬pi,铍pi,鈹pi,皮pi,阰pi,芘pi,岯pi,枇pi,毞pi,毗pi,毘pi,疲pi,蚍pi,郫pi,陴pi,啤pi,埤pi,蚽pi,豼pi,焷pi,脾pi,腗pi,罴pi,膍pi,蜱pi,隦pi,壀pi,篺pi,螷pi,貔pi,簲pi,羆pi,鵧pi,朇pi,鼙pi,蠯pi,猈pi,琵pi,匹pi,庀pi,仳pi,圮pi,苉pi,脴pi,痞pi,銢pi,鴄pi,噽pi,癖pi,嚭pi,顖pi,擗pi,辟pi,鈲pi,闢pi,屁pi,淠pi,渒pi,揊pi,媲pi,嫓pi,睤pi,睥pi,潎pi,僻pi,澼pi,嚊pi,甓pi,疈pi,譬pi,鷿pi,囨pian,偏pian,媥pian,犏pian,篇pian,翩pian,骈pian,胼pian,楄pian,楩pian,賆pian,諚pian,骿pian,蹁pian,駢pian,騈pian,徧pian,腁pian,覑pian,谝pian,貵pian,諞pian,片pian,骗pian,魸pian,騗pian,騙pian,剽piao,彯piao,漂piao,缥piao,飘piao,磦piao,旚piao,縹piao,翲piao,螵piao,飄piao,魒piao,薸piao,闝piao,嫖piao,瓢piao,莩piao,殍piao,瞟piao,醥piao,皫piao,顠piao,飃piao,票piao,勡piao,嘌piao,慓piao,覕pie,氕pie,撆pie,暼pie,瞥pie,撇pie,丿pie,苤pie,鐅pie,嫳pie,拚pin,姘pin,拼pin,礗pin,穦pin,馪pin,驞pin,贫pin,貧pin,嫔pin,频pin,頻pin,嬪pin,薲pin,嚬pin,矉pin,颦pin,顰pin,蘋pin,玭pin,品pin,榀pin,朩pin,牝pin,汖pin,聘pin,娉ping,乒ping,甹ping,俜ping,涄ping,砯ping,艵ping,竮ping,頩ping,冖ping,平ping,评ping,凭ping,坪ping,岼ping,苹ping,郱ping,屏ping,帡ping,枰ping,洴ping,玶ping,娦ping,瓶ping,屛ping,帲ping,萍ping,蚲ping,塀ping,幈ping,焩ping,甁ping,缾ping,聠ping,蓱ping,蛢ping,評ping,鲆ping,凴ping,慿ping,憑ping,鮃ping,簈ping,呯ping,箳ping,鏺po,钋po,坡po,岥po,泼po,釙po,颇po,溌po,酦po,潑po,醱po,頗po,攴po,巿po,婆po,嘙po,鄱po,皤po,謈po,櫇po,叵po,尀po,钷po,笸po,鉕po,駊po,屰po,廹po,岶po,迫po,敀po,昢po,洦po,珀po,烞po,破po,砶po,粕po,奤po,蒪po,魄po,皛po,頮pou,剖pou,颒pou,抙pou,捊pou,抔pou,掊pou,裒pou,咅pou,哣pou,犃pou,兺ppun,哛ppun,巬pu,巭pu,扑pu,炇pu,痡pu,駇pu,噗pu,撲pu,鋪pu,潽pu,襆pu,脯pu,蜅pu,仆pu,圤pu,匍pu,莆pu,菩pu,菐pu,葡pu,蒱pu,蒲pu,僕pu,酺pu,墣pu,璞pu,瞨pu,穙pu,镤pu,贌pu,纀pu,鏷pu,襥pu,濮pu,朴pu,圃pu,埔pu,浦pu,烳pu,普pu,圑pu,溥pu,暜pu,谱pu,樸pu,氆pu,諩pu,檏pu,镨pu,譜pu,蹼pu,鐠pu,铺pu,舖pu,舗pu,曝pu,七qi,沏qi,妻qi,恓qi,柒qi,倛qi,凄qi,栖qi,桤qi,缼qi,郪qi,娸qi,戚qi,捿qi,桼qi,淒qi,萋qi,朞qi,期qi,棲qi,欺qi,紪qi,褄qi,僛qi,嘁qi,慽qi,榿qi,漆qi,緀qi,磎qi,諆qi,諿qi,霋qi,蹊qi,魌qi,鏚qi,鶈qi,碕qi,螇qi,傶qi,迉qi,軙qi,荎qi,饑qi,亓qi,祁qi,齐qi,圻qi,岐qi,岓qi,忯qi,芪qi,亝qi,其qi,奇qi,斉qi,歧qi,祇qi,祈qi,肵qi,疧qi,竒qi,剘qi,斊qi,旂qi,脐qi,蚑qi,蚔qi,蚚qi,颀qi,埼qi,崎qi,掑qi,淇qi,渏qi,猉qi,畦qi,萁qi,跂qi,軝qi,釮qi,骐qi,骑qi,嵜qi,棊qi,棋qi,琦qi,琪qi,祺qi,蛴qi,愭qi,碁qi,鬿qi,旗qi,粸qi,綥qi,綦qi,綨qi,緕qi,蜝qi,蜞qi,齊qi,禥qi,蕲qi,螧qi,鲯qi,濝qi,藄qi,檱qi,櫀qi,簱qi,臍qi,騎qi,騏qi,鳍qi,蘄qi,鵸qi,鶀qi,麒qi,籏qi,纃qi,艩qi,蠐qi,鬐qi,騹qi,魕qi,鰭qi,玂qi,麡qi,荠qi,薺qi,扺qi,耆qi,鯕qi,袳qi,乞qi,邔qi,企qi,屺qi,岂qi,芑qi,启qi,呇qi,杞qi,玘qi,盀qi,唘qi,豈qi,起qi,啓qi,啔qi,啟qi,绮qi,棨qi,綮qi,綺qi,諬qi,簯qi,闙qi,梩qi,婍qi,鼜qi,悽qi,槭qi,气qi,讫qi,気qi,汔qi,迄qi,弃qi,汽qi,芞qi,呮qi,泣qi,炁qi,盵qi,咠qi,契qi,砌qi,栔qi,氣qi,訖qi,唭qi,夡qi,棄qi,湆qi,湇qi,葺qi,碛qi,摖qi,暣qi,甈qi,碶qi,噐qi,憇qi,器qi,憩qi,磜qi,磧qi,磩qi,罊qi,趞qi,洓qi,慼qi,欫qi,掐qia,葜qia,愘qia,搳qia,拤qia,跒qia,酠qia,鞐qia,圶qia,冾qia,恰qia,洽qia,殎qia,硈qia,髂qia,磍qia,帢qia,千qian,仟qian,阡qian,圱qian,圲qian,奷qian,扦qian,汘qian,芊qian,迁qian,佥qian,岍qian,杄qian,汧qian,茾qian,竏qian,臤qian,钎qian,拪qian,牵qian,粁qian,悭qian,蚈qian,铅qian,牽qian,釺qian,谦qian,鈆qian,僉qian,愆qian,签qian,鉛qian,骞qian,鹐qian,慳qian,搴qian,撁qian,箞qian,諐qian,遷qian,褰qian,謙qian,顅qian,檶qian,攐qian,攑qian,櫏qian,簽qian,鵮qian,攓qian,騫qian,鬜qian,鬝qian,籤qian,韆qian,鋟qian,扡qian,杴qian,孅qian,藖qian,谸qian,鏲qian,朁qian,岒qian,忴qian,扲qian,拑qian,前qian,荨qian,钤qian,歬qian,虔qian,钱qian,钳qian,乾qian,掮qian,軡qian,媊qian,鈐qian,鉗qian,榩qian,箝qian,潜qian,羬qian,橬qian,錢qian,黔qian,鎆qian,騝qian,濳qian,騚qian,灊qian,籖qian,鰬qian,潛qian,蚙qian,煔qian,燂qian,葴qian,鍼qian,墘qian,浅qian,肷qian,淺qian,嵰qian,遣qian,槏qian,膁qian,蜸qian,谴qian,缱qian,譴qian,鑓qian,繾qian,欠qian,刋qian,伣qian,芡qian,俔qian,茜qian,倩qian,悓qian,堑qian,嵌qian,棈qian,椠qian,嗛qian,皘qian,蒨qian,塹qian,歉qian,綪qian,蔳qian,儙qian,槧qian,篏qian,輤qian,篟qian,壍qian,嬱qian,縴qian,廞qian,鸧qiang,鶬qiang,羌qiang,戕qiang,戗qiang,斨qiang,枪qiang,玱qiang,猐qiang,琷qiang,跄qiang,嗴qiang,獇qiang,腔qiang,溬qiang,蜣qiang,锖qiang,嶈qiang,戧qiang,槍qiang,牄qiang,瑲qiang,锵qiang,篬qiang,錆qiang,蹌qiang,镪qiang,蹡qiang,鏘qiang,鏹qiang,啌qiang,鎗qiang,強qiang,强qiang,墙qiang,嫱qiang,蔷qiang,樯qiang,漒qiang,墻qiang,嬙qiang,廧qiang,薔qiang,檣qiang,牆qiang,謒qiang,艢qiang,蘠qiang,抢qiang,羟qiang,搶qiang,羥qiang,墏qiang,摤qiang,繈qiang,襁qiang,繦qiang,嗆qiang,炝qiang,唴qiang,羻qiang,呛qiang,熗qiang,悄qiao,硗qiao,郻qiao,跷qiao,鄡qiao,鄥qiao,劁qiao,敲qiao,踍qiao,锹qiao,碻qiao,頝qiao,墽qiao,幧qiao,橇qiao,燆qiao,缲qiao,鍫qiao,鍬qiao,繰qiao,趬qiao,鐰qiao,鞽qiao,塙qiao,毃qiao,鏒qiao,橾qiao,喿qiao,蹺qiao,峤qiao,嶠qiao,乔qiao,侨qiao,荍qiao,荞qiao,桥qiao,硚qiao,菬qiao,喬qiao,睄qiao,僑qiao,槗qiao,谯qiao,嘺qiao,憔qiao,蕎qiao,鞒qiao,樵qiao,橋qiao,犞qiao,癄qiao,瞧qiao,礄qiao,藮qiao,譙qiao,鐈qiao,墧qiao,顦qiao,磽qiao,巧qiao,愀qiao,髜qiao,偢qiao,墝qiao,俏qiao,诮qiao,陗qiao,峭qiao,帩qiao,窍qiao,翘qiao,誚qiao,髚qiao,僺qiao,撬qiao,鞘qiao,韒qiao,竅qiao,翹qiao,鞩qiao,躈qiao,踃qiao,切qie,苆qie,癿qie,茄qie,聺qie,且qie,詧qie,慊qie,厒qie,怯qie,匧qie,窃qie,倿qie,悏qie,挈qie,惬qie,笡qie,愜qie,朅qie,箧qie,緁qie,锲qie,篋qie,踥qie,穕qie,藒qie,鍥qie,鯜qie,鐑qie,竊qie,籡qie,帹qie,郄qie,郤qie,稧qie,妾qie,亲qin,侵qin,钦qin,衾qin,菳qin,媇qin,嵚qin,綅qin,誛qin,嶔qin,親qin,顉qin,駸qin,鮼qin,寴qin,欽qin,骎qin,鈂qin,庈qin,芩qin,芹qin,埁qin,珡qin,矝qin,秦qin,耹qin,菦qin,捦qin,琴qin,琹qin,禽qin,鈙qin,雂qin,勤qin,嗪qin,嫀qin,靲qin,噙qin,擒qin,鳹qin,懄qin,檎qin,澿qin,瘽qin,螓qin,懃qin,蠄qin,鬵qin,溱qin,坅qin,昑qin,笉qin,梫qin,赾qin,寑qin,锓qin,寝qin,寢qin,螼qin,儭qin,櫬qin,吢qin,吣qin,抋qin,沁qin,唚qin,菣qin,搇qin,撳qin,瀙qin,藽qin,鈊qin,揿qin,鶄qing,青qing,氢qing,轻qing,倾qing,卿qing,郬qing,圊qing,埥qing,氫qing,淸qing,清qing,軽qing,傾qing,廎qing,蜻qing,輕qing,鲭qing,鯖qing,鑋qing,庼qing,漀qing,靘qing,夝qing,甠qing,勍qing,情qing,硘qing,晴qing,棾qing,氰qing,暒qing,樈qing,擎qing,檠qing,黥qing,殑qing,苘qing,顷qing,请qing,頃qing,請qing,檾qing,謦qing,庆qing,摐chuang,牀chuang,磢chuang,刱chuang,吹chui,糚zhuang,庒zhuang,漴zhuang,丬zhuang,壮zhuang,凊qing,掅qing,碃qing,箐qing,慶qing,磬qing,罄qing,櫦qing,濪qing,藭qiong,跫qiong,銎qiong,卭qiong,邛qiong,穷qiong,穹qiong,茕qiong,桏qiong,笻qiong,筇qiong,赹qiong,惸qiong,焪qiong,焭qiong,琼qiong,蛩qiong,蛬qiong,煢qiong,熍qiong,睘qiong,窮qiong,儝qiong,憌qiong,橩qiong,瓊qiong,竆qiong,嬛qiong,琁qiong,藑qiong,湫qiu,丘qiu,丠qiu,邱qiu,坵qiu,恘qiu,秋qiu,秌qiu,寈qiu,蚯qiu,媝qiu,楸qiu,鹙qiu,篍qiu,緧qiu,蝵qiu,穐qiu,趥qiu,鳅qiu,蟗qiu,鞦qiu,鞧qiu,蘒qiu,鰌qiu,鰍qiu,鱃qiu,龝qiu,逎qiu,櫹qiu,鶖qiu,叴qiu,囚qiu,扏qiu,犰qiu,玌qiu,肍qiu,求qiu,虬qiu,泅qiu,虯qiu,俅qiu,觓qiu,訅qiu,酋qiu,唒qiu,浗qiu,紌qiu,莍qiu,逑qiu,釚qiu,梂qiu,殏qiu,毬qiu,球qiu,釻qiu,崷qiu,巯qiu,湭qiu,皳qiu,盚qiu,遒qiu,煪qiu,絿qiu,蛷qiu,裘qiu,巰qiu,觩qiu,賕qiu,璆qiu,銶qiu,醔qiu,鮂qiu,鼽qiu,鯄qiu,鵭qiu,蠤qiu,鰽qiu,厹qiu,赇qiu,搝qiu,糗qiu,趍qu,匚qu,区qu,伹qu,匤qu,岖qu,诎qu,阹qu,驱qu,屈qu,岨qu,岴qu,抾qu,浀qu,祛qu,胠qu,袪qu,區qu,蛆qu,躯qu,筁qu,粬qu,蛐qu,詘qu,趋qu,嶇qu,駆qu,憈qu,駈qu,麹qu,髷qu,趨qu,麯qu,軀qu,麴qu,黢qu,驅qu,鰸qu,鱋qu,紶qu,厺qu,佉qu,跼qu,瞿qu,佢qu,劬qu,斪qu,朐qu,胊qu,菃qu,衐qu,鸲qu,淭qu,渠qu,絇qu,葋qu,蕖qu,璖qu,磲qu,璩qu,鼩qu,蘧qu,灈qu,戵qu,欋qu,氍qu,臞qu,癯qu,蠷qu,衢qu,躣qu,蠼qu,鑺qu,臒qu,蟝qu,曲qu,取qu,娶qu,詓qu,竬qu,龋qu,齲qu,去qu,刞qu,耝qu,阒qu,觑qu,趣qu,閴qu,麮qu,闃qu,覰qu,覷qu,鼁qu,覻qu,迲qu,峑quan,恮quan,悛quan,圈quan,駩quan,騡quan,鐉quan,腃quan,全quan,权quan,佺quan,诠quan,姾quan,泉quan,洤quan,荃quan,拳quan,辁quan,婘quan,痊quan,硂quan,铨quan,湶quan,犈quan,筌quan,絟quan,葲quan,搼quan,楾quan,瑔quan,觠quan,詮quan,跧quan,輇quan,蜷quan,銓quan,権quan,縓quan,醛quan,闎quan,鳈quan,鬈quan,巏quan,鰁quan,權quan,齤quan,颧quan,顴quan,灥quan,譔quan,牷quan,孉quan,犬quan,甽quan,畎quan,烇quan,绻quan,綣quan,虇quan,劝quan,券quan,巻quan,牶quan,椦quan,勧quan,勸quan,炔que,缺que,蒛que,瘸que,却que,卻que,崅que,悫que,雀que,确que,阕que,皵que,碏que,阙que,鹊que,愨que,榷que,慤que,確que,燩que,闋que,闕que,鵲que,礭que,殻que,埆que,踆qun,夋qun,囷qun,峮qun,逡qun,帬qun,裙qun,羣qun,群qun,裠qun,亽ra,罖ra,囕ram,呥ran,肰ran,衻ran,袇ran,蚦ran,袡ran,蚺ran,然ran,髥ran,嘫ran,髯ran,燃ran,繎ran,冄ran,冉ran,姌ran,苒ran,染ran,珃ran,媣ran,蒅ran,孃rang,穣rang,獽rang,禳rang,瓤rang,穰rang,躟rang,壌rang,嚷rang,壤rang,攘rang,爙rang,让rang,懹rang,譲rang,讓rang,荛rao,饶rao,桡rao,橈rao,襓rao,饒rao,犪rao,嬈rao,娆rao,扰rao,隢rao,擾rao,遶rao,绕rao,繞rao,惹re,热re,熱re,渃re,綛ren,人ren,仁ren,壬ren,忈ren,朲ren,忎ren,秂ren,芢ren,鈓ren,魜ren,銋ren,鵀ren,姙ren,忍ren,荏ren,栠ren,栣ren,荵ren,秹ren,稔ren,躵ren,刃ren,刄ren,认ren,仞ren,仭ren,讱ren,任ren,屻ren,扨ren,纫ren,妊ren,牣ren,纴ren,肕ren,轫ren,韧ren,饪ren,紉ren,衽ren,紝ren,訒ren,軔ren,梕ren,袵ren,絍ren,靭ren,靱ren,韌ren,飪ren,認ren,餁ren,扔reng,仍reng,辸reng,礽reng,芿reng,日ri,驲ri,囸ri,釰ri,鈤ri,馹ri,戎rong,肜rong,栄rong,狨rong,绒rong,茙rong,茸rong,荣rong,容rong,峵rong,毧rong,烿rong,嵘rong,絨rong,羢rong,嫆rong,搈rong,摉rong,榵rong,溶rong,蓉rong,榕rong,榮rong,熔rong,瑢rong,穁rong,蝾rong,褣rong,镕rong,氄rong,縙rong,融rong,螎rong,駥rong,嬫rong,嶸rong,爃rong,鎔rong,瀜rong,蠑rong,媶rong,曧rong,冗rong,宂rong,傇rong,穃rong,禸rou,柔rou,粈rou,媃rou,揉rou,渘rou,葇rou,瑈rou,腬rou,糅rou,蹂rou,輮rou,鍒rou,鞣rou,瓇rou,騥rou,鰇rou,鶔rou,楺rou,煣rou,韖rou,肉rou,宍rou,嶿ru,如ru,侞ru,帤ru,茹ru,桇ru,袽ru,铷ru,渪ru,筎ru,銣ru,蕠ru,儒ru,鴑ru,嚅ru,孺ru,濡ru,薷ru,鴽ru,曘ru,燸ru,襦ru,蠕ru,颥ru,醹ru,顬ru,偄ru,鱬ru,汝ru,肗ru,乳ru,辱ru,鄏ru,擩ru,入ru,扖ru,込ru,杁ru,洳ru,嗕ru,媷ru,溽ru,缛ru,蓐ru,鳰ru,褥ru,縟ru,壖ruan,阮ruan,朊ruan,软ruan,軟ruan,碝ruan,緛ruan,蝡ruan,瓀ruan,礝ruan,瑌ruan,撋rui,桵rui,甤rui,緌rui,蕤rui,蕊rui,橤rui,繠rui,蘂rui,蘃rui,惢rui,芮rui,枘rui,蚋rui,锐rui,瑞rui,睿rui,銳rui,叡rui,壡rui,润run,閏run,閠run,潤run,橍run,闰run,叒ruo,若ruo,偌ruo,弱ruo,鄀ruo,焫ruo,楉ruo,嵶ruo,蒻ruo,箬ruo,爇ruo,鰙ruo,鰯ruo,鶸ruo,仨sa,桬sa,撒sa,洒sa,訯sa,靸sa,灑sa,卅sa,飒sa,脎sa,萨sa,隡sa,馺sa,颯sa,薩sa,櫒sa,栍saeng,毢sai,塞sai,毸sai,腮sai,嘥sai,噻sai,鳃sai,顋sai,鰓sai,嗮sai,赛sai,僿sai,賽sai,簺sai,虄sal,厁san,壭san,三san,弎san,叁san,毵san,毶san,毿san,犙san,鬖san,糂san,糝san,糣san,彡san,氵san,伞san,傘san,馓san,橵san,糤san,繖san,饊san,散san,俕san,閐san,潵san,桒sang,桑sang,槡sang,嗓sang,搡sang,褬sang,颡sang,鎟sang,顙sang,磉sang,丧sang,喪sang,掻sao,搔sao,溞sao,骚sao,缫sao,繅sao,鳋sao,颾sao,騒sao,騷sao,鰠sao,鱢sao,扫sao,掃sao,嫂sao,臊sao,埽sao,瘙sao,氉sao,矂sao,髞sao,色se,涩se,啬se,渋se,铯se,歮se,嗇se,瑟se,歰se,銫se,澁se,懎se,擌se,濇se,濏se,瘷se,穑se,澀se,璱se,瀒se,穡se,繬se,穯se,轖se,鏼se,譅se,飋se,愬se,鎍se,溹se,栜se,裇sed,聓sei,森sen,僧seng,鬙seng,閪seo,縇seon,杀sha,沙sha,纱sha,乷sha,刹sha,砂sha,唦sha,挱sha,殺sha,猀sha,紗sha,莎sha,铩sha,痧sha,硰sha,蔱sha,裟sha,樧sha,魦sha,鲨sha,閷sha,鯊sha,鯋sha,繺sha,賖sha,啥sha,傻sha,儍sha,繌sha,倽sha,唼sha,萐sha,歃sha,煞sha,翜sha,翣sha,閯sha,霎sha,厦sha,廈sha,筛shai,篩shai,簁shai,簛shai,酾shai,釃shai,摋shai,晒shai,曬shai,纔shan,穇shan,凵shan,襂shan,山shan,邖shan,圸shan,删shan,杉shan,杣shan,芟shan,姍shan,姗shan,衫shan,钐shan,埏shan,狦shan,珊shan,舢shan,痁shan,軕shan,笘shan,釤shan,閊shan,跚shan,剼shan,搧shan,嘇shan,幓shan,煽shan,潸shan,澘shan,曑shan,檆shan,膻shan,鯅shan,羴shan,羶shan,炶shan,苫shan,柵shan,栅shan,刪shan,闪shan,陕shan,陝shan,閃shan,晱shan,睒shan,熌shan,覢shan,曏shan,笧shan,讪shan,汕shan,疝shan,扇shan,訕shan,赸shan,傓shan,善shan,椫shan,銏shan,骟shan,僐shan,鄯shan,缮shan,嬗shan,擅shan,敾shan,樿shan,膳shan,磰shan,謆shan,赡shan,繕shan,蟮shan,譱shan,贍shan,鐥shan,饍shan,騸shan,鳝shan,灗shan,鱔shan,鱣shan,墡shan,裳shang,塲shang,伤shang,殇shang,商shang,觞shang,傷shang,墒shang,慯shang,滳shang,蔏shang,殤shang,熵shang,螪shang,觴shang,謪shang,鬺shang,坰shang,垧shang,晌shang,赏shang,賞shang,鑜shang,丄shang,上shang,仩shang,尚shang,恦shang,绱shang,緔shang,弰shao,捎shao,梢shao,烧shao,焼shao,稍shao,筲shao,艄shao,蛸shao,輎shao,蕱shao,燒shao,髾shao,鮹shao,娋shao,旓shao,杓shao,勺shao,芍shao,柖shao,玿shao,韶shao,少shao,劭shao,卲shao,邵shao,绍shao,哨shao,袑shao,紹shao,潲shao,奢she,猞she,赊she,輋she,賒she,檨she,畲she,舌she,佘she,蛇she,蛥she,磼she,折she,舍she,捨she,厍she,设she,社she,舎she,厙she,射she,涉she,涻she,設she,赦she,弽she,慑she,摄she,滠she,慴she,摵she,蔎she,韘she,騇she,懾she,攝she,麝she,欇she,挕she,蠂she,堔shen,叄shen,糁shen,申shen,屾shen,扟shen,伸shen,身shen,侁shen,呻shen,妽shen,籶shen,绅shen,诜shen,柛shen,氠shen,珅shen,穼shen,籸shen,娠shen,峷shen,甡shen,眒shen,砷shen,深shen,紳shen,兟shen,椮shen,葠shen,裑shen,訷shen,罧shen,蓡shen,詵shen,甧shen,蔘shen,燊shen,薓shen,駪shen,鲹shen,鯓shen,鵢shen,鯵shen,鰺shen,莘shen,叅shen,神shen,榊shen,鰰shen,棯shen,槮shen,邥shen,弞shen,沈shen,审shen,矤shen,矧shen,谂shen,谉shen,婶shen,渖shen,訠shen,審shen,頣shen,魫shen,曋shen,瞫shen,嬸shen,覾shen,讅shen,哂shen,肾shen,侺shen,昚shen,甚shen,胂shen,眘shen,渗shen,祳shen,脤shen,腎shen,愼shen,慎shen,瘆shen,蜃shen,滲shen,鋠shen,瘮shen,葚shen,升sheng,生sheng,阩sheng,呏sheng,声sheng,斘sheng,昇sheng,枡sheng,泩sheng,苼sheng,殅sheng,牲sheng,珄sheng,竔sheng,陞sheng,曻sheng,陹sheng,笙sheng,湦sheng,焺sheng,甥sheng,鉎sheng,聲sheng,鍟sheng,鵿sheng,鼪sheng,绳sheng,縄sheng,憴sheng,繩sheng,譝sheng,省sheng,眚sheng,偗sheng,渻sheng,胜sheng,圣sheng,晟sheng,晠sheng,剰sheng,盛sheng,剩sheng,勝sheng,貹sheng,嵊sheng,聖sheng,墭sheng,榺sheng,蕂sheng,橳sheng,賸sheng,鳾shi,觢shi,尸shi,师shi,呞shi,虱shi,诗shi,邿shi,鸤shi,屍shi,施shi,浉shi,狮shi,師shi,絁shi,湤shi,湿shi,葹shi,溮shi,溼shi,獅shi,蒒shi,蓍shi,詩shi,瑡shi,鳲shi,蝨shi,鲺shi,濕shi,鍦shi,鯴shi,鰤shi,鶳shi,襹shi,籭shi,魳shi,失shi,褷shi,匙shi,十shi,什shi,石shi,辻shi,佦shi,时shi,竍shi,识shi,实shi,実shi,旹shi,飠shi,峕shi,拾shi,炻shi,祏shi,蚀shi,食shi,埘shi,寔shi,湜shi,遈shi,塒shi,嵵shi,溡shi,鉐shi,實shi,榯shi,蝕shi,鉽shi,篒shi,鲥shi,鮖shi,鼫shi,識shi,鼭shi,鰣shi,時shi,史shi,矢shi,乨shi,豕shi,使shi,始shi,驶shi,兘shi,屎shi,榁shi,鉂shi,駛shi,笶shi,饣shi,莳shi,蒔shi,士shi,氏shi,礻shi,世shi,丗shi,仕shi,市shi,示shi,卋shi,式shi,事shi,侍shi,势shi,呩shi,视shi,试shi,饰shi,冟shi,室shi,恀shi,恃shi,拭shi,枾shi,柿shi,眂shi,贳shi,适shi,栻shi,烒shi,眎shi,眡shi,舐shi,轼shi,逝shi,铈shi,視shi,釈shi,弑shi,揓shi,谥shi,貰shi,释shi,勢shi,嗜shi,弒shi,煶shi,睗shi,筮shi,試shi,軾shi,鈰shi,鉃shi,飾shi,舓shi,誓shi,適shi,奭shi,噬shi,嬕shi,澨shi,諡shi,遾shi,螫shi,簭shi,籂shi,襫shi,釋shi,鰘shi,佀shi,鎩shi,是shi,収shou,收shou,手shou,守shou,垨shou,首shou,艏shou,醻shou,寿shou,受shou,狩shou,兽shou,售shou,授shou,绶shou,痩shou,膄shou,壽shou,瘦shou,綬shou,夀shou,獣shou,獸shou,鏉shou,书shu,殳shu,抒shu,纾shu,叔shu,枢shu,姝shu,柕shu,倏shu,倐shu,書shu,殊shu,紓shu,掓shu,梳shu,淑shu,焂shu,菽shu,軗shu,鄃shu,疎shu,疏shu,舒shu,摅shu,毹shu,毺shu,綀shu,输shu,踈shu,樞shu,蔬shu,輸shu,鮛shu,瀭shu,鵨shu,陎shu,尗shu,秫shu,婌shu,孰shu,赎shu,塾shu,熟shu,璹shu,贖shu,暑shu,黍shu,署shu,鼠shu,鼡shu,蜀shu,潻shu,薯shu,曙shu,癙shu,糬shu,籔shu,蠴shu,鱰shu,属shu,屬shu,鱪shu,丨shu,术shu,戍shu,束shu,沭shu,述shu,怷shu,树shu,竖shu,荗shu,恕shu,庶shu,庻shu,絉shu,蒁shu,術shu,裋shu,数shu,竪shu,腧shu,墅shu,漱shu,潄shu,數shu,豎shu,樹shu,濖shu,錰shu,鏣shu,鶐shu,虪shu,捒shu,忄shu,澍shu,刷shua,唰shua,耍shua,誜shua,缞shuai,縗shuai,衰shuai,摔shuai,甩shuai,帅shuai,帥shuai,蟀shuai,闩shuan,拴shuan,閂shuan,栓shuan,涮shuan,腨shuan,双shuang,脽shui,誰shui,水shui,氺shui,閖shui,帨shui,涗shui,涚shui,稅shui,税shui,裞shui,説shui,睡shui,吮shun,顺shun,舜shun,順shun,蕣shun,橓shun,瞚shun,瞤shun,瞬shun,鬊shun,说shuo,說shuo,妁shuo,烁shuo,朔shuo,铄shuo,欶shuo,硕shuo,矟shuo,搠shuo,蒴shuo,槊shuo,碩shuo,爍shuo,鑠shuo,洬shuo,燿shuo,鎙shuo,愢si,厶si,丝si,司si,糹si,私si,咝si,泀si,俬si,思si,恖si,鸶si,媤si,斯si,絲si,缌si,蛳si,楒si,禗si,鉰si,飔si,凘si,厮si,榹si,禠si,罳si,锶si,嘶si,噝si,廝si,撕si,澌si,緦si,蕬si,螄si,鍶si,蟖si,蟴si,颸si,騦si,鐁si,鷥si,鼶si,鷉si,銯si,死si,灬si,巳si,亖si,四si,罒si,寺si,汜si,伺si,似si,姒si,泤si,祀si,価si,孠si,泗si,饲si,驷si,俟si,娰si,柶si,牭si,洍si,涘si,肂si,飤si,笥si,耜si,釲si,竢si,覗si,嗣si,肆si,貄si,鈻si,飼si,禩si,駟si,儩si,瀃si,兕si,蕼si,螦so,乺sol,忪song,松song,枀song,枩song,娀song,柗song,倯song,凇song,梥song,崧song,庺song,淞song,菘song,嵩song,硹song,蜙song,憽song,檧song,濍song,怂song,悚song,耸song,竦song,愯song,嵷song,慫song,聳song,駷song,鬆song,讼song,宋song,诵song,送song,颂song,訟song,頌song,誦song,餸song,鎹song,凁sou,捜sou,鄋sou,嗖sou,廀sou,廋sou,搜sou,溲sou,獀sou,蒐sou,蓃sou,馊sou,飕sou,摗sou,锼sou,螋sou,醙sou,鎪sou,餿sou,颼sou,騪sou,叜sou,艘sou,叟sou,傁sou,嗾sou,瞍sou,擞sou,薮sou,擻sou,藪sou,櫢sou,嗽sou,瘶sou,苏su,甦su,酥su,稣su,窣su,穌su,鯂su,蘇su,蘓su,櫯su,囌su,卹su,俗su,玊su,诉su,泝su,肃su,涑su,珟su,素su,速su,殐su,粛su,骕su,傃su,粟su,訴su,谡su,嗉su,塐su,塑su,嫊su,愫su,溯su,溸su,肅su,遡su,鹔su,僳su,榡su,蔌su,觫su,趚su,遬su,憟su,樎su,樕su,潥su,鋉su,餗su,縤su,璛su,簌su,藗su,謖su,蹜su,驌su,鱐su,鷫su,埣su,夙su,膆su,狻suan,痠suan,酸suan,匴suan,祘suan,笇suan,筭suan,蒜suan,算suan,夊sui,芕sui,虽sui,倠sui,哸sui,荽sui,荾sui,眭sui,滖sui,睢sui,濉sui,鞖sui,雖sui,簑sui,绥sui,隋sui,随sui,遀sui,綏sui,隨sui,瓍sui,遂sui,瀡sui,髄sui,髓sui,亗sui,岁sui,砕sui,谇sui,歲sui,歳sui,煫sui,碎sui,隧sui,嬘sui,澻sui,穂sui,誶sui,賥sui,檖sui,燧sui,璲sui,禭sui,穗sui,穟sui,襚sui,邃sui,旞sui,繐sui,繸sui,鐆sui,鐩sui,祟sui,譢sui,孙sun,狲sun,荪sun,孫sun,飧sun,搎sun,猻sun,蓀sun,槂sun,蕵sun,薞sun,畃sun,损sun,笋sun,隼sun,筍sun,損sun,榫sun,箰sun,鎨sun,巺sun,潠sun,嗍suo,唆suo,娑suo,莏suo,傞suo,桫suo,梭suo,睃suo,嗦suo,羧suo,蓑suo,摍suo,缩suo,趖suo,簔suo,縮suo,髿suo,鮻suo,挲suo,所suo,唢suo,索suo,琐suo,琑suo,锁suo,嗩suo,暛suo,溑suo,瑣suo,鎖suo,鎻suo,鏁suo,嵗suo,蜶suo,逤suo,侤ta,澾ta,她ta,他ta,它ta,祂ta,咜ta,趿ta,铊ta,塌ta,榙ta,溻ta,鉈ta,褟ta,遢ta,蹹ta,塔ta,墖ta,獭ta,鳎ta,獺ta,鰨ta,沓ta,挞ta,狧ta,闼ta,崉ta,涾ta,遝ta,阘ta,榻ta,毾ta,禢ta,撻ta,誻ta,踏ta,嚃ta,錔ta,嚺ta,濌ta,蹋ta,鞜ta,闒ta,鞳ta,闥ta,譶ta,躢ta,傝ta,襨tae,漦tai,咍tai,囼tai,孡tai,胎tai,駘tai,檯tai,斄tai,台tai,邰tai,坮tai,苔tai,炱tai,炲tai,菭tai,跆tai,鲐tai,箈tai,臺tai,颱tai,儓tai,鮐tai,嬯tai,擡tai,薹tai,籉tai,抬tai,呔tai,忕tai,太tai,冭tai,夳tai,忲tai,汰tai,态tai,肽tai,钛tai,泰tai,粏tai,舦tai,酞tai,鈦tai,溙tai,燤tai,態tai,坍tan,贪tan,怹tan,啴tan,痑tan,舑tan,貪tan,摊tan,滩tan,嘽tan,潬tan,瘫tan,擹tan,攤tan,灘tan,癱tan,镡tan,蕁tan,坛tan,昙tan,谈tan,郯tan,婒tan,覃tan,榃tan,痰tan,锬tan,谭tan,墵tan,憛tan,潭tan,談tan,壇tan,曇tan,錟tan,檀tan,顃tan,罈tan,藫tan,壜tan,譚tan,貚tan,醰tan,譠tan,罎tan,鷤tan,埮tan,鐔tan,墰tan,忐tan,坦tan,袒tan,钽tan,菼tan,毯tan,鉭tan,嗿tan,憳tan,憻tan,醓tan,璮tan,襢tan,緂tan,暺tan,叹tan,炭tan,探tan,湠tan,僋tan,嘆tan,碳tan,舕tan,歎tan,汤tang,铴tang,湯tang,嘡tang,劏tang,羰tang,蝪tang,薚tang,蹚tang,鐋tang,鞺tang,闛tang,耥tang,鼞tang,镗tang,鏜tang,饧tang,坣tang,唐tang,堂tang,傏tang,啺tang,棠tang,鄌tang,塘tang,搪tang,溏tang,蓎tang,隚tang,榶tang,漟tang,煻tang,瑭tang,禟tang,膅tang,樘tang,磄tang,糃tang,膛tang,橖tang,篖tang,糖tang,螗tang,踼tang,糛tang,赯tang,醣tang,餳tang,鎕tang,餹tang,饄tang,鶶tang,螳tang,攩tang,伖tang,帑tang,倘tang,淌tang,傥tang,躺tang,镋tang,鎲tang,儻tang,戃tang,曭tang,爣tang,矘tang,钂tang,烫tang,摥tang,趟tang,燙tang,漡tang,焘tao,轁tao,涭tao,仐tao,弢tao,绦tao,掏tao,絛tao,詜tao,嫍tao,幍tao,慆tao,搯tao,滔tao,槄tao,瑫tao,韬tao,飸tao,縚tao,縧tao,濤tao,謟tao,鞱tao,韜tao,饕tao,饀tao,燾tao,涛tao,迯tao,咷tao,洮tao,逃tao,桃tao,陶tao,啕tao,梼tao,淘tao,萄tao,祹tao,裪tao,綯tao,蜪tao,鞀tao,醄tao,鞉tao,鋾tao,駣tao,檮tao,騊tao,鼗tao,绹tao,讨tao,討tao,套tao,畓tap,忑te,特te,貣te,脦te,犆te,铽te,慝te,鋱te,蟘te,螣te,鰧teng,膯teng,鼟teng,疼teng,痋teng,幐teng,腾teng,誊teng,漛teng,滕teng,邆teng,縢teng,駦teng,謄teng,儯teng,藤teng,騰teng,籐teng,籘teng,虅teng,驣teng,霯teng,唞teo,朰teul,剔ti,梯ti,锑ti,踢ti,銻ti,鷈ti,鵜ti,躰ti,骵ti,軆ti,擿ti,姼ti,褆ti,扌ti,虒ti,磃ti,绨ti,偍ti,啼ti,媞ti,崹ti,惿ti,提ti,稊ti,缇ti,罤ti,遆ti,鹈ti,嗁ti,瑅ti,綈ti,徲ti,漽ti,緹ti,蕛ti,蝭ti,题ti,趧ti,蹄ti,醍ti,謕ti,鍗ti,題ti,鮷ti,騠ti,鯷ti,鶗ti,鶙ti,穉ti,厗ti,鳀ti,徥ti,体ti,挮ti,體ti,衹ti,戻ti,屉ti,剃ti,洟ti,倜ti,悌ti,涕ti,逖ti,屜ti,悐ti,惕ti,掦ti,逷ti,惖ti,替ti,裼ti,褅ti,歒ti,殢ti,髰ti,薙ti,嚏ti,鬀ti,嚔ti,瓋ti,籊ti,鐟ti,楴ti,天tian,兲tian,婖tian,添tian,酟tian,靔tian,黇tian,靝tian,呑tian,瞋tian,田tian,屇tian,沺tian,恬tian,畋tian,畑tian,盷tian,胋tian,甛tian,甜tian,菾tian,湉tian,塡tian,填tian,搷tian,阗tian,碵tian,磌tian,窴tian,鴫tian,璳tian,闐tian,鷆tian,鷏tian,餂tian,寘tian,畠tian,鍩tian,忝tian,殄tian,倎tian,唺tian,悿tian,捵tian,淟tian,晪tian,琠tian,腆tian,觍tian,睓tian,覥tian,賟tian,錪tian,娗tian,铦tian,銛tian,紾tian,舔tian,掭tian,瑱tian,睼tian,舚tian,旫tiao,佻tiao,庣tiao,挑tiao,祧tiao,聎tiao,苕tiao,萔tiao,芀tiao,条tiao,岧tiao,岹tiao,迢tiao,祒tiao,條tiao,笤tiao,蓚tiao,蓨tiao,龆tiao,樤tiao,蜩tiao,鋚tiao,髫tiao,鲦tiao,螩tiao,鯈tiao,鎥tiao,齠tiao,鰷tiao,趒tiao,銚tiao,儵tiao,鞗tiao,宨tiao,晀tiao,朓tiao,脁tiao,窕tiao,窱tiao,眺tiao,粜tiao,覜tiao,跳tiao,頫tiao,糶tiao,怗tie,贴tie,萜tie,聑tie,貼tie,帖tie,蛈tie,僣tie,鴩tie,鐵tie,驖tie,铁tie,呫tie,飻tie,餮tie,厅ting,庁ting,汀ting,听ting,耓ting,厛ting,烃ting,烴ting,綎ting,鞓ting,聴ting,聼ting,廰ting,聽ting,渟ting,廳ting,邒ting,廷ting,亭ting,庭ting,莛ting,停ting,婷ting,嵉ting,筳ting,葶ting,蜓ting,楟ting,榳ting,閮ting,霆ting,聤ting,蝏ting,諪ting,鼮ting,珵ting,侱ting,圢ting,侹ting,挺ting,涏ting,梃ting,烶ting,珽ting,脡ting,颋ting,誔ting,頲ting,艇ting,乭tol,囲tong,炵tong,通tong,痌tong,嗵tong,蓪tong,樋tong,熥tong,爞tong,冂tong,燑tong,仝tong,同tong,佟tong,彤tong,峂tong,庝tong,哃tong,狪tong,茼tong,晍tong,桐tong,浵tong,砼tong,蚒tong,秱tong,铜tong,童tong,粡tong,赨tong,酮tong,鉖tong,僮tong,鉵tong,銅tong,餇tong,鲖tong,潼tong,獞tong,曈tong,朣tong,橦tong,氃tong,犝tong,膧tong,瞳tong,穜tong,鮦tong,眮tong,统tong,捅tong,桶tong,筒tong,綂tong,統tong,恸tong,痛tong,慟tong,憅tong,偷tou,偸tou,鍮tou,头tou,投tou,骰tou,緰tou,頭tou,钭tou,妵tou,紏tou,敨tou,斢tou,黈tou,蘣tou,埱tou,透tou,綉tou,宊tu,瑹tu,凸tu,禿tu,秃tu,突tu,涋tu,捸tu,堗tu,湥tu,痜tu,葖tu,嶀tu,鋵tu,鵚tu,鼵tu,唋tu,図tu,图tu,凃tu,峹tu,庩tu,徒tu,捈tu,涂tu,荼tu,途tu,屠tu,梌tu,揬tu,稌tu,塗tu,嵞tu,瘏tu,筡tu,鈯tu,圖tu,圗tu,廜tu,潳tu,酴tu,馟tu,鍎tu,駼tu,鵌tu,鶟tu,鷋tu,鷵tu,兎tu,菟tu,蒤tu,土tu,圡tu,吐tu,汢tu,钍tu,釷tu,迌tu,兔tu,莵tu,堍tu,鵵tu,湍tuan,猯tuan,煓tuan,蓴tuan,团tuan,団tuan,抟tuan,剸tuan,團tuan,塼tuan,慱tuan,摶tuan,槫tuan,漙tuan,篿tuan,檲tuan,鏄tuan,糰tuan,鷒tuan,鷻tuan,嫥tuan,鱄tuan,圕tuan,疃tuan,畽tuan,彖tuan,湪tuan,褖tuan,貒tuan,忒tui,推tui,蓷tui,藬tui,焞tui,騩tui,墤tui,颓tui,隤tui,尵tui,頹tui,頺tui,魋tui,穨tui,蘈tui,蹪tui,僓tui,頽tui,俀tui,脮tui,腿tui,蹆tui,骽tui,退tui,娧tui,煺tui,蛻tui,蜕tui,褪tui,駾tui,噋tun,汭tun,吞tun,旽tun,啍tun,朜tun,暾tun,黗tun,屯tun,忳tun,芚tun,饨tun,豚tun,軘tun,飩tun,鲀tun,魨tun,霕tun,臀tun,臋tun,坉tun,豘tun,氽tun,舃tuo,乇tuo,讬tuo,托tuo,汑tuo,饦tuo,杔tuo,侂tuo,咃tuo,拕tuo,拖tuo,侻tuo,挩tuo,捝tuo,莌tuo,袥tuo,託tuo,涶tuo,脱tuo,飥tuo,馲tuo,魠tuo,驝tuo,棁tuo,脫tuo,鱓tuo,鋖tuo,牠tuo,驮tuo,佗tuo,陀tuo,陁tuo,坨tuo,岮tuo,沱tuo,驼tuo,柁tuo,砣tuo,砤tuo,袉tuo,鸵tuo,紽tuo,堶tuo,跎tuo,酡tuo,碢tuo,馱tuo,槖tuo,踻tuo,駞tuo,橐tuo,鮀tuo,鴕tuo,鼧tuo,騨tuo,鼍tuo,驒tuo,鼉tuo,迆tuo,駝tuo,軃tuo,妥tuo,毤tuo,庹tuo,椭tuo,楕tuo,鵎tuo,拓tuo,柝tuo,唾tuo,萚tuo,跅tuo,毻tuo,箨tuo,蘀tuo,籜tuo,哇wa,窐wa,劸wa,徍wa,挖wa,洼wa,娲wa,畖wa,窊wa,媧wa,嗗wa,蛙wa,搲wa,溛wa,漥wa,窪wa,鼃wa,攨wa,屲wa,姽wa,譁wa,娃wa,瓦wa,佤wa,邷wa,咓wa,瓲wa,砙wa,韎wa,帓wa,靺wa,袜wa,聉wa,嗢wa,腽wa,膃wa,韈wa,韤wa,襪wa,咼wai,瀤wai,歪wai,喎wai,竵wai,崴wai,外wai,顡wai,関wan,闗wan,夘wan,乛wan,弯wan,剜wan,婠wan,帵wan,塆wan,湾wan,睕wan,蜿wan,潫wan,豌wan,彎wan,壪wan,灣wan,埦wan,捥wan,丸wan,刓wan,汍wan,纨wan,芄wan,完wan,岏wan,忨wan,玩wan,笂wan,紈wan,捖wan,顽wan,烷wan,琓wan,貦wan,頑wan,蚖wan,抏wan,邜wan,宛wan,倇wan,唍wan,挽wan,晚wan,盌wan,莞wan,婉wan,惋wan,晩wan,梚wan,绾wan,脘wan,菀wan,晼wan,椀wan,琬wan,皖wan,碗wan,綩wan,綰wan,輓wan,鋔wan,鍐wan,莬wan,惌wan,魭wan,夗wan,畹wan,輐wan,鄤wan,孯wan,掔wan,万wan,卍wan,卐wan,妧wan,杤wan,腕wan,萬wan,翫wan,鋄wan,薍wan,錽wan,贃wan,鎫wan,贎wan,脕wan,尩wang,尪wang,尫wang,汪wang,瀇wang,亡wang,仼wang,彺wang,莣wang,蚟wang,王wang,抂wang,网wang,忹wang,往wang,徃wang,枉wang,罔wang,惘wang,菵wang,暀wang,棢wang,焹wang,蛧wang,辋wang,網wang,蝄wang,誷wang,輞wang,魍wang,迬wang,琞wang,妄wang,忘wang,迋wang,旺wang,盳wang,望wang,朢wang,威wei,烓wei,偎wei,逶wei,隇wei,隈wei,喴wei,媁wei,媙wei,愄wei,揋wei,揻wei,渨wei,煀wei,葨wei,葳wei,微wei,椳wei,楲wei,溦wei,煨wei,詴wei,縅wei,蝛wei,覣wei,嶶wei,薇wei,燰wei,鳂wei,癐wei,鰃wei,鰄wei,嵔wei,蜲wei,危wei,巍wei,恑wei,撝wei,囗wei,为wei,韦wei,围wei,帏wei,沩wei,违wei,闱wei,峗wei,峞wei,洈wei,為wei,韋wei,桅wei,涠wei,唯wei,帷wei,惟wei,维wei,喡wei,圍wei,嵬wei,幃wei,湋wei,溈wei,琟wei,潍wei,維wei,蓶wei,鄬wei,潿wei,醀wei,濰wei,鍏wei,闈wei,鮠wei,癓wei,覹wei,犩wei,霺wei,僞wei,寪wei,觹wei,觽wei,觿wei,欈wei,違wei,趡wei,磈wei,瓗wei,膸wei,撱wei,鰖wei,伟wei,伪wei,尾wei,纬wei,芛wei,苇wei,委wei,炜wei,玮wei,洧wei,娓wei,捤wei,浘wei,诿wei,偉wei,偽wei,崣wei,梶wei,硊wei,萎wei,隗wei,骩wei,廆wei,徫wei,愇wei,猥wei,葦wei,蒍wei,骪wei,骫wei,暐wei,椲wei,煒wei,瑋wei,痿wei,腲wei,艉wei,韪wei,碨wei,鲔wei,緯wei,蔿wei,諉wei,踓wei,韑wei,頠wei,薳wei,儰wei,濻wei,鍡wei,鮪wei,壝wei,韙wei,颹wei,瀢wei,韡wei,亹wei,斖wei,茟wei,蜹wei,爲wei,卫wei,未wei,位wei,味wei,苿wei,畏wei,胃wei,叞wei,軎wei,尉wei,菋wei,谓wei,喂wei,媦wei,渭wei,猬wei,煟wei,墛wei,蔚wei,慰wei,熭wei,犚wei,磑wei,緭wei,蝟wei,衛wei,懀wei,濊wei,璏wei,罻wei,衞wei,謂wei,錗wei,餧wei,鮇wei,螱wei,褽wei,餵wei,魏wei,藯wei,鏏wei,霨wei,鳚wei,蘶wei,饖wei,讆wei,躗wei,讏wei,躛wei,荱wei,蜼wei,硙wei,轊wei,昷wen,塭wen,温wen,榅wen,殟wen,溫wen,瑥wen,辒wen,榲wen,瘟wen,豱wen,輼wen,鳁wen,鎾wen,饂wen,鰛wen,鰮wen,褞wen,缊wen,緼wen,蕰wen,縕wen,薀wen,藴wen,鴖wen,亠wen,文wen,彣wen,纹wen,炆wen,砇wen,闻wen,紋wen,蚉wen,蚊wen,珳wen,阌wen,鈫wen,雯wen,瘒wen,聞wen,馼wen,魰wen,鳼wen,鴍wen,螡wen,閺wen,閿wen,蟁wen,闅wen,鼤wen,闦wen,芠wen,呅wen,忞wen,歾wen,刎wen,吻wen,呚wen,忟wen,抆wen,呡wen,紊wen,桽wen,脗wen,稳wen,穏wen,穩wen,肳wen,问wen,妏wen,汶wen,問wen,渂wen,搵wen,絻wen,顐wen,璺wen,翁weng,嗡weng,鹟weng,螉weng,鎓weng,鶲weng,滃weng,奣weng,塕weng,嵡weng,蓊weng,瞈weng,聬weng,暡weng,瓮weng,蕹weng,甕weng,罋weng,齆weng,堝wo,濄wo,薶wo,捼wo,挝wo,倭wo,涡wo,莴wo,唩wo,涹wo,渦wo,猧wo,萵wo,喔wo,窝wo,窩wo,蜗wo,撾wo,蝸wo,踒wo,涴wo,我wo,婐wo,婑wo,捰wo,龏wo,蒦wo,嚄wo,雘wo,艧wo,踠wo,仴wo,沃wo,肟wo,臥wo,偓wo,捾wo,媉wo,幄wo,握wo,渥wo,硪wo,楃wo,腛wo,斡wo,瞃wo,濣wo,瓁wo,龌wo,齷wo,枂wo,馧wo,卧wo,扝wu,乌wu,圬wu,弙wu,污wu,邬wu,呜wu,杇wu,巫wu,屋wu,洿wu,钨wu,烏wu,趶wu,剭wu,窏wu,釫wu,鄔wu,嗚wu,誈wu,誣wu,箼wu,螐wu,鴮wu,鎢wu,鰞wu,兀wu,杅wu,诬wu,幠wu,譕wu,蟱wu,墲wu,亾wu,兦wu,无wu,毋wu,吳wu,吴wu,吾wu,呉wu,芜wu,郚wu,娪wu,梧wu,洖wu,浯wu,茣wu,珸wu,祦wu,鹀wu,無wu,禑wu,蜈wu,蕪wu,璑wu,鵐wu,鯃wu,鼯wu,鷡wu,俉wu,憮wu,橆wu,铻wu,鋙wu,莁wu,陚wu,瞴wu,娒wu,乄wu,五wu,午wu,仵wu,伍wu,妩wu,庑wu,忤wu,怃wu,迕wu,旿wu,武wu,玝wu,侮wu,倵wu,捂wu,娬wu,牾wu,珷wu,摀wu,熓wu,碔wu,鹉wu,瑦wu,舞wu,嫵wu,廡wu,潕wu,錻wu,儛wu,甒wu,鵡wu,躌wu,逜wu,膴wu,啎wu,噁wu,雺wu,渞wu,揾wu,坞wu,塢wu,勿wu,务wu,戊wu,阢wu,伆wu,屼wu,扤wu,岉wu,杌wu,忢wu,物wu,矹wu,敄wu,误wu,務wu,悞wu,悟wu,悮wu,粅wu,晤wu,焐wu,婺wu,嵍wu,痦wu,隖wu,靰wu,骛wu,奦wu,嵨wu,溩wu,雾wu,寤wu,熃wu,誤wu,鹜wu,鋈wu,窹wu,鼿wu,霧wu,齀wu,騖wu,鶩wu,芴wu,霚wu,扱xi,糦xi,宩xi,獡xi,蜤xi,燍xi,夕xi,兮xi,汐xi,西xi,覀xi,吸xi,希xi,扸xi,卥xi,昔xi,析xi,矽xi,穸xi,肹xi,俙xi,徆xi,怸xi,郗xi,饻xi,唏xi,奚xi,屖xi,息xi,悕xi,晞xi,氥xi,浠xi,牺xi,狶xi,莃xi,唽xi,悉xi,惜xi,桸xi,欷xi,淅xi,渓xi,烯xi,焁xi,焈xi,琋xi,硒xi,菥xi,赥xi,釸xi,傒xi,惁xi,晰xi,晳xi,焟xi,犀xi,睎xi,稀xi,粞xi,翕xi,翖xi,舾xi,鄎xi,厀xi,嵠xi,徯xi,溪xi,煕xi,皙xi,蒠xi,锡xi,僖xi,榽xi,熄xi,熙xi,緆xi,蜥xi,豨xi,餏xi,嘻xi,噏xi,嬆xi,嬉xi,膝xi,餙xi,凞xi,樨xi,橀xi,歙xi,熹xi,熺xi,熻xi,窸xi,羲xi,螅xi,錫xi,燨xi,犠xi,瞦xi,礂xi,蟋xi,豀xi,豯xi,貕xi,繥xi,鯑xi,鵗xi,譆xi,鏭xi,隵xi,巇xi,曦xi,爔xi,犧xi,酅xi,鼷xi,蠵xi,鸂xi,鑴xi,憘xi,暿xi,鱚xi,咥xi,訢xi,娭xi,瘜xi,醯xi,雭xi,习xi,郋xi,席xi,習xi,袭xi,觋xi,媳xi,椺xi,蒵xi,蓆xi,嶍xi,漝xi,覡xi,趘xi,薂xi,檄xi,謵xi,鎴xi,霫xi,鳛xi,飁xi,騱xi,騽xi,襲xi,鰼xi,驨xi,隰xi,囍xi,杫xi,枲xi,洗xi,玺xi,徙xi,铣xi,喜xi,葈xi,葸xi,鈢xi,屣xi,漇xi,蓰xi,銑xi,憙xi,橲xi,禧xi,諰xi,壐xi,縰xi,謑xi,蟢xi,蹝xi,璽xi,躧xi,鉩xi,欪xi,钑xi,鈒xi,匸xi,卌xi,戏xi,屃xi,系xi,饩xi,呬xi,忥xi,怬xi,细xi,係xi,恄xi,绤xi,釳xi,阋xi,塈xi,椞xi,舄xi,趇xi,隙xi,慀xi,滊xi,禊xi,綌xi,赩xi,隟xi,熂xi,犔xi,潟xi,澙xi,蕮xi,覤xi,黖xi,戲xi,磶xi,虩xi,餼xi,鬩xi,嚱xi,霼xi,衋xi,細xi,闟xi,虾xia,谺xia,傄xia,閕xia,敮xia,颬xia,瞎xia,蝦xia,鰕xia,魻xia,郃xia,匣xia,侠xia,狎xia,俠xia,峡xia,柙xia,炠xia,狭xia,陜xia,峽xia,烚xia,狹xia,珨xia,祫xia,硖xia,舺xia,陿xia,溊xia,硤xia,遐xia,暇xia,瑕xia,筪xia,碬xia,舝xia,辖xia,縀xia,蕸xia,縖xia,赮xia,轄xia,鍜xia,霞xia,鎋xia,黠xia,騢xia,鶷xia,睱xia,翈xia,昰xia,丅xia,下xia,吓xia,圷xia,夏xia,梺xia,嚇xia,懗xia,罅xia,鏬xia,疜xia,姺xian,仙xian,仚xian,屳xian,先xian,奾xian,纤xian,佡xian,忺xian,氙xian,祆xian,秈xian,苮xian,枮xian,籼xian,珗xian,莶xian,掀xian,酰xian,锨xian,僊xian,僲xian,嘕xian,鲜xian,暹xian,韯xian,憸xian,鍁xian,繊xian,褼xian,韱xian,鮮xian,馦xian,蹮xian,廯xian,譣xian,鶱xian,襳xian,躚xian,纖xian,鱻xian,縿xian,跹xian,咞xian,闲xian,妶xian,弦xian,贤xian,咸xian,挦xian,涎xian,胘xian,娴xian,娹xian,婱xian,舷xian,蚿xian,衔xian,啣xian,痫xian,蛝xian,閑xian,鹇xian,嫌xian,甉xian,銜xian,嫺xian,嫻xian,憪xian,澖xian,誸xian,賢xian,癇xian,癎xian,礥xian,贒xian,鑦xian,鷳xian,鷴xian,鷼xian,伭xian,冼xian,狝xian,显xian,险xian,毨xian,烍xian,猃xian,蚬xian,険xian,赻xian,筅xian,尟xian,尠xian,禒xian,蜆xian,跣xian,箲xian,險xian,獫xian,獮xian,藓xian,鍌xian,燹xian,顕xian,幰xian,攇xian,櫶xian,蘚xian,玁xian,韅xian,顯xian,灦xian,搟xian,县xian,岘xian,苋xian,现xian,线xian,臽xian,限xian,姭xian,宪xian,陥xian,哯xian,垷xian,娨xian,峴xian,晛xian,莧xian,陷xian,現xian,馅xian,睍xian,絤xian,缐xian,羡xian,献xian,粯xian,羨xian,腺xian,僩xian,僴xian,綫xian,誢xian,撊xian,線xian,鋧xian,憲xian,餡xian,豏xian,瀗xian,臔xian,獻xian,鏾xian,霰xian,鼸xian,脇xian,軐xian,県xian,縣xian,儴xiang,勷xiang,蘘xiang,纕xiang,乡xiang,芗xiang,香xiang,郷xiang,厢xiang,鄉xiang,鄊xiang,廂xiang,湘xiang,缃xiang,葙xiang,鄕xiang,楿xiang,薌xiang,箱xiang,緗xiang,膷xiang,忀xiang,骧xiang,麘xiang,欀xiang,瓖xiang,镶xiang,鱜xiang,鑲xiang,驤xiang,襄xiang,佭xiang,详xiang,庠xiang,栙xiang,祥xiang,絴xiang,翔xiang,詳xiang,跭xiang,享xiang,亯xiang,响xiang,蚃xiang,饷xiang,晑xiang,飨xiang,想xiang,餉xiang,鲞xiang,蠁xiang,鮝xiang,鯗xiang,響xiang,饗xiang,饟xiang,鱶xiang,傢xiang,相xiang,向xiang,姠xiang,巷xiang,项xiang,珦xiang,象xiang,缿xiang,萫xiang,項xiang,像xiang,勨xiang,嶑xiang,橡xiang,襐xiang,蟓xiang,鐌xiang,鱌xiang,鋞xiang,鬨xiang,嚮xiang,鵁xiao,莦xiao,颵xiao,箾xiao,潚xiao,橚xiao,灱xiao,灲xiao,枭xiao,侾xiao,哓xiao,枵xiao,骁xiao,宯xiao,宵xiao,庨xiao,恷xiao,消xiao,绡xiao,虓xiao,逍xiao,鸮xiao,啋xiao,婋xiao,梟xiao,焇xiao,猇xiao,萧xiao,痚xiao,痟xiao,硝xiao,硣xiao,窙xiao,翛xiao,萷xiao,销xiao,揱xiao,綃xiao,歊xiao,箫xiao,嘵xiao,撨xiao,獢xiao,銷xiao,霄xiao,彇xiao,膮xiao,蕭xiao,魈xiao,鴞xiao,穘xiao,簘xiao,蟂xiao,蟏xiao,鴵xiao,嚣xiao,瀟xiao,簫xiao,蟰xiao,髇xiao,囂xiao,髐xiao,鷍xiao,驍xiao,毊xiao,虈xiao,肖xiao,哮xiao,烋xiao,潇xiao,蠨xiao,洨xiao,崤xiao,淆xiao,誵xiao,笹xiao,小xiao,晓xiao,暁xiao,筱xiao,筿xiao,曉xiao,篠xiao,謏xiao,皢xiao,孝xiao,効xiao,咲xiao,俲xiao,效xiao,校xiao,涍xiao,笑xiao,傚xiao,敩xiao,滧xiao,詨xiao,嘋xiao,嘨xiao,誟xiao,嘯xiao,熽xiao,斅xiao,斆xiao,澩xiao,啸xiao,些xie,楔xie,歇xie,蝎xie,蠍xie,协xie,旪xie,邪xie,協xie,胁xie,垥xie,恊xie,拹xie,脋xie,衺xie,偕xie,斜xie,谐xie,翓xie,嗋xie,愶xie,携xie,瑎xie,綊xie,熁xie,膎xie,勰xie,撷xie,擕xie,緳xie,缬xie,蝢xie,鞋xie,諧xie,燲xie,擷xie,鞵xie,襭xie,攜xie,讗xie,龤xie,魼xie,脅xie,纈xie,写xie,冩xie,寫xie,藛xie,烲xie,榝xie,齛xie,碿xie,伳xie,灺xie,泄xie,泻xie,祄xie,绁xie,缷xie,卸xie,洩xie,炧xie,炨xie,卨xie,娎xie,屑xie,屓xie,偰xie,徢xie,械xie,焎xie,禼xie,亵xie,媟xie,屟xie,渫xie,絬xie,谢xie,僁xie,塮xie,榍xie,榭xie,褉xie,噧xie,屧xie,暬xie,韰xie,廨xie,懈xie,澥xie,獬xie,糏xie,薢xie,薤xie,邂xie,燮xie,褻xie,謝xie,夑xie,瀉xie,鞢xie,瀣xie,蟹xie,蠏xie,齘xie,齥xie,齂xie,躠xie,屭xie,躞xie,蝑xie,揳xie,爕xie,噺xin,心xin,邤xin,妡xin,忻xin,芯xin,辛xin,昕xin,杺xin,欣xin,盺xin,俽xin,惞xin,锌xin,新xin,歆xin,鋅xin,嬜xin,薪xin,馨xin,鑫xin,馫xin,枔xin,襑xin,潃xin,阠xin,伩xin,囟xin,孞xin,炘xin,信xin,脪xin,衅xin,訫xin,焮xin,舋xin,釁xin,狌xing,星xing,垶xing,骍xing,猩xing,煋xing,鷞shuang,骦shuang,縔shuang,艭shuang,塽shuang,壯zhuang,状zhuang,狀zhuang,壵zhuang,梉zhuang,瑆xing,腥xing,蛵xing,觪xing,箵xing,篂xing,謃xing,鮏xing,曐xing,觲xing,騂xing,皨xing,鯹xing,嬹xing,惺xing,刑xing,邢xing,形xing,陉xing,侀xing,哘xing,型xing,洐xing,娙xing,硎xing,铏xing,鉶xing,裄xing,睲xing,醒xing,擤xing,兴xing,興xing,杏xing,姓xing,幸xing,性xing,荇xing,倖xing,莕xing,婞xing,悻xing,涬xing,緈xing,臖xing,凶xiong,兄xiong,兇xiong,匈xiong,芎xiong,讻xiong,忷xiong,汹xiong,恟xiong,洶xiong,胷xiong,胸xiong,訩xiong,詾xiong,哅xiong,雄xiong,熊xiong,诇xiong,詗xiong,敻xiong,休xiu,俢xiu,修xiu,咻xiu,庥xiu,烌xiu,羞xiu,脙xiu,鸺xiu,臹xiu,貅xiu,馐xiu,樇xiu,銝xiu,髤xiu,髹xiu,鮴xiu,鵂xiu,饈xiu,鏅xiu,飍xiu,鎀xiu,苬xiu,宿xiu,朽xiu,綇xiu,滫xiu,糔xiu,臰xiu,秀xiu,岫xiu,珛xiu,绣xiu,袖xiu,琇xiu,锈xiu,溴xiu,璓xiu,螑xiu,繍xiu,繡xiu,鏥xiu,鏽xiu,齅xiu,嗅xiu,蓿xu,繻xu,圩xu,旴xu,疞xu,盱xu,欨xu,胥xu,须xu,顼xu,虗xu,虚xu,谞xu,媭xu,幁xu,欻xu,虛xu,須xu,楈xu,窢xu,頊xu,嘘xu,稰xu,需xu,魆xu,噓xu,墟xu,嬃xu,歔xu,縃xu,歘xu,諝xu,譃xu,魖xu,驉xu,鑐xu,鬚xu,姁xu,偦xu,戌xu,蕦xu,俆xu,徐xu,蒣xu,訏xu,许xu,诩xu,冔xu,栩xu,珝xu,許xu,湑xu,暊xu,詡xu,鄦xu,糈xu,醑xu,盨xu,滀xu,嘼xu,鉥xu,旭xu,伵xu,序xu,侐xu,沀xu,叙xu,恤xu,昫xu,洫xu,垿xu,欰xu,殈xu,烅xu,珬xu,勖xu,勗xu,敍xu,敘xu,烼xu,绪xu,续xu,酗xu,喣xu,壻xu,婿xu,朂xu,溆xu,絮xu,訹xu,慉xu,続xu,蓄xu,賉xu,槒xu,漵xu,潊xu,盢xu,瞁xu,緒xu,聟xu,稸xu,緖xu,瞲xu,藚xu,續xu,怴xu,芧xu,汿xu,煦xu,煖xuan,吅xuan,轩xuan,昍xuan,咺xuan,宣xuan,晅xuan,軒xuan,谖xuan,喧xuan,媗xuan,愃xuan,愋xuan,揎xuan,萱xuan,萲xuan,暄xuan,煊xuan,瑄xuan,蓒xuan,睻xuan,儇xuan,禤xuan,箮xuan,翧xuan,蝖xuan,蕿xuan,諠xuan,諼xuan,鍹xuan,駽xuan,矎xuan,翾xuan,藼xuan,蘐xuan,蠉xuan,譞xuan,鰚xuan,塇xuan,玹xuan,痃xuan,悬xuan,旋xuan,蜁xuan,嫙xuan,漩xuan,暶xuan,璇xuan,檈xuan,璿xuan,懸xuan,玆xuan,玄xuan,选xuan,選xuan,癣xuan,癬xuan,絃xuan,夐xuan,怰xuan,泫xuan,昡xuan,炫xuan,绚xuan,眩xuan,袨xuan,铉xuan,琄xuan,眴xuan,衒xuan,絢xuan,楦xuan,鉉xuan,碹xuan,蔙xuan,镟xuan,颴xuan,縼xuan,繏xuan,鏇xuan,贙xuan,駨xuan,渲xuan,疶xue,蒆xue,靴xue,薛xue,鞾xue,削xue,噱xue,穴xue,斈xue,乴xue,坹xue,学xue,岤xue,峃xue,茓xue,泶xue,袕xue,鸴xue,學xue,嶨xue,燢xue,雤xue,鷽xue,踅xue,雪xue,樰xue,膤xue,艝xue,轌xue,鳕xue,鱈xue,血xue,泧xue,狘xue,桖xue,烕xue,谑xue,趐xue,瀥xue,坃xun,勋xun,埙xun,塤xun,熏xun,窨xun,勲xun,勳xun,薫xun,嚑xun,壎xun,獯xun,薰xun,曛xun,燻xun,臐xun,矄xun,蘍xun,壦xun,爋xun,纁xun,醺xun,勛xun,郇xun,咰xun,寻xun,巡xun,旬xun,杊xun,询xun,峋xun,恂xun,浔xun,紃xun,荀xun,栒xun,桪xun,毥xun,珣xun,偱xun,尋xun,循xun,揗xun,詢xun,鄩xun,鲟xun,噚xun,潯xun,攳xun,樳xun,燅xun,燖xun,璕xun,蟳xun,鱏xun,鱘xun,侚xun,彐xun,撏xun,洵xun,浚xun,濬xun,鶽xun,驯xun,馴xun,卂xun,训xun,伨xun,汛xun,迅xun,徇xun,狥xun,迿xun,逊xun,殉xun,訊xun,訓xun,訙xun,奞xun,巽xun,殾xun,遜xun,愻xun,賐xun,噀xun,蕈xun,顨xun,鑂xun,稄xun,讯xun,呀ya,圧ya,丫ya,压ya,庘ya,押ya,鸦ya,桠ya,鸭ya,铔ya,椏ya,鴉ya,錏ya,鴨ya,壓ya,鵶ya,鐚ya,唖ya,亜ya,垭ya,俹ya,埡ya,孲ya,拁ya,疨ya,牙ya,伢ya,岈ya,芽ya,厓ya,枒ya,琊ya,笌ya,蚜ya,堐ya,崕ya,崖ya,涯ya,猚ya,瑘ya,睚ya,衙ya,漄ya,齖ya,庌ya,顔ya,釾ya,疋ya,厊ya,啞ya,痖ya,雅ya,瘂ya,蕥ya,挜ya,掗ya,哑ya,呾ya,輵ya,潝ya,劜ya,圠ya,亚ya,穵ya,襾ya,讶ya,犽ya,迓ya,亞ya,玡ya,娅ya,砑ya,氩ya,婭ya,訝ya,揠ya,氬ya,猰ya,圔ya,稏ya,窫ya,椻ya,鼼ya,聐ya,淊yan,咽yan,恹yan,剦yan,烟yan,珚yan,胭yan,偣yan,崦yan,淹yan,焉yan,菸yan,阉yan,湮yan,腌yan,傿yan,煙yan,鄢yan,嫣yan,漹yan,嶖yan,樮yan,醃yan,閹yan,嬮yan,篶yan,臙yan,黫yan,弇yan,硽yan,慇yan,黰yan,橪yan,阽yan,炏yan,挻yan,厃yan,唌yan,廵yan,讠yan,円yan,延yan,闫yan,严yan,妍yan,言yan,訁yan,岩yan,昖yan,沿yan,炎yan,郔yan,姸yan,娫yan,狿yan,研yan,莚yan,娮yan,盐yan,琂yan,硏yan,訮yan,閆yan,阎yan,嵒yan,嵓yan,綖yan,蜒yan,塩yan,揅yan,楌yan,詽yan,碞yan,蔅yan,颜yan,虤yan,閻yan,厳yan,檐yan,顏yan,嚴yan,壛yan,巌yan,簷yan,櫩yan,麙yan,壧yan,孍yan,巖yan,巗yan,巚yan,欕yan,礹yan,鹽yan,麣yan,黬yan,偐yan,贗yan,菴yan,剡yan,嬐yan,崄yan,嶮yan,抁yan,沇yan,乵yan,兖yan,奄yan,俨yan,兗yan,匽yan,衍yan,偃yan,厣yan,掩yan,眼yan,萒yan,郾yan,酓yan,嵃yan,愝yan,扊yan,揜yan,棪yan,渰yan,渷yan,琰yan,隒yan,椼yan,罨yan,演yan,褗yan,蝘yan,魇yan,噞yan,躽yan,檿yan,黡yan,厴yan,甗yan,鰋yan,鶠yan,黤yan,齞yan,儼yan,黭yan,顩yan,鼴yan,巘yan,曮yan,魘yan,鼹yan,齴yan,黶yan,掞yan,隁yan,喭yan,酀yan,龂yan,齗yan,阭yan,夵yan,裺yan,溎yan,豜yan,豣yan,烻yan,湺yan,麲yan,厌yan,妟yan,牪yan,姲yan,彥yan,彦yan,砚yan,唁yan,宴yan,晏yan,艳yan,覎yan,验yan,焔yan,谚yan,堰yan,敥yan,焰yan,焱yan,猒yan,硯yan,葕yan,雁yan,滟yan,鳫yan,厭yan,墕yan,熖yan,酽yan,嬊yan,谳yan,餍yan,鴈yan,燄yan,燕yan,諺yan,赝yan,鬳yan,曕yan,騐yan,験yan,嚥yan,嬿yan,艶yan,贋yan,軅yan,爓yan,醶yan,騴yan,鷃yan,灔yan,觾yan,讌yan,饜yan,驗yan,鷰yan,艷yan,灎yan,釅yan,驠yan,灧yan,讞yan,豓yan,豔yan,灩yan,顑yan,懕yan,筵yan,觃yan,暥yan,醼yan,歍yang,央yang,咉yang,姎yang,抰yang,泱yang,殃yang,胦yang,眏yang,秧yang,鸯yang,鉠yang,雵yang,鞅yang,鍈yang,鴦yang,佒yang,霙yang,瑒yang,婸yang,扬yang,羊yang,阦yang,旸yang,杨yang,炀yang,佯yang,劷yang,氜yang,疡yang,钖yang,飏yang,垟yang,徉yang,昜yang,洋yang,羏yang,烊yang,珜yang,眻yang,陽yang,崵yang,崸yang,揚yang,蛘yang,敭yang,暘yang,楊yang,煬yang,禓yang,瘍yang,諹yang,輰yang,鴹yang,颺yang,鐊yang,鰑yang,霷yang,鸉yang,阳yang,鍚yang,飬yang,勜yang,仰yang,坱yang,奍yang,岟yang,养yang,炴yang,氧yang,痒yang,紻yang,傟yang,楧yang,軮yang,慃yang,氱yang,羪yang,養yang,駚yang,懩yang,攁yang,瀁yang,癢yang,礢yang,柍yang,恙yang,样yang,羕yang,詇yang,様yang,漾yang,樣yang,怏yang,玅yao,撽yao,幺yao,夭yao,吆yao,妖yao,枖yao,祅yao,訞yao,喓yao,葽yao,楆yao,腰yao,邀yao,宎yao,侥yao,僥yao,蕘yao,匋yao,恌yao,铫yao,爻yao,尧yao,尭yao,肴yao,垚yao,姚yao,峣yao,轺yao,倄yao,珧yao,窑yao,傜yao,堯yao,揺yao,殽yao,谣yao,軺yao,嗂yao,媱yao,徭yao,愮yao,搖yao,摇yao,猺yao,遙yao,遥yao,摿yao,暚yao,榣yao,瑤yao,瑶yao,飖yao,餆yao,嶢yao,嶤yao,徺yao,磘yao,窯yao,餚yao,繇yao,謠yao,謡yao,鎐yao,鳐yao,颻yao,蘨yao,顤yao,鰩yao,鷂yao,踰yao,烑yao,窰yao,噛yao,仸yao,岆yao,抭yao,杳yao,殀yao,狕yao,苭yao,咬yao,柼yao,窅yao,窈yao,舀yao,偠yao,婹yao,崾yao,溔yao,蓔yao,榚yao,闄yao,騕yao,齩yao,鷕yao,穾yao,鴢yao,烄yao,药yao,要yao,袎yao,窔yao,筄yao,葯yao,詏yao,熎yao,覞yao,靿yao,獟yao,鹞yao,薬yao,曜yao,艞yao,藥yao,矅yao,曣yao,耀yao,纅yao,讑yao,鑰yao,怮yao,箹yao,钥yao,籥yao,亪ye,椰ye,暍ye,噎ye,潱ye,蠮ye,耶ye,吔ye,倻ye,峫ye,爷ye,捓ye,揶ye,铘ye,爺ye,鋣ye,鎁ye,擨ye,蠱ye,虵ye,也ye,冶ye,埜ye,野ye,嘢ye,漜ye,壄ye,瓛ye,熀ye,殕ye,啘ye,鐷ye,緤ye,业ye,叶ye,曳ye,页ye,邺ye,夜ye,亱ye,枼ye,洂ye,頁ye,捙ye,晔ye,枽ye,烨ye,偞ye,掖ye,液ye,谒ye,殗ye,腋ye,葉ye,鄓ye,墷ye,楪ye,業ye,馌ye,僷ye,曄ye,曅ye,歋ye,燁ye,擖ye,擛ye,皣ye,瞱ye,靥ye,嶪ye,嶫ye,澲ye,謁ye,餣ye,嚈ye,擫ye,曗ye,瞸ye,鍱ye,擪ye,爗ye,礏ye,鎑ye,饁ye,鵺ye,靨ye,驜ye,鸈ye,黦ye,煠ye,抴ye,鄴ye,膶yen,岃yen,袆yi,褘yi,一yi,弌yi,辷yi,衤yi,伊yi,衣yi,医yi,吚yi,依yi,祎yi,咿yi,洢yi,猗yi,畩yi,郼yi,铱yi,壹yi,揖yi,欹yi,蛜yi,禕yi,嫛yi,漪yi,稦yi,銥yi,嬄yi,噫yi,夁yi,瑿yi,鹥yi,繄yi,檹yi,毉yi,醫yi,黟yi,譩yi,鷖yi,黳yi,悘yi,壱yi,耛yi,拸yi,訑yi,釶yi,鉇yi,箷yi,戺yi,珆yi,鴺yi,銕yi,狏yi,迱yi,彵yi,熈yi,仪yi,匜yi,圯yi,夷yi,冝yi,宐yi,杝yi,沂yi,诒yi,侇yi,宜yi,怡yi,沶yi,狋yi,衪yi,饴yi,咦yi,姨yi,峓yi,弬yi,恞yi,柂yi,瓵yi,荑yi,贻yi,迻yi,宧yi,巸yi,扅yi,桋yi,眙yi,胰yi,袘yi,痍yi,移yi,萓yi,媐yi,椬yi,羠yi,蛦yi,詒yi,貽yi,遗yi,暆yi,椸yi,誃yi,跠yi,頉yi,颐yi,飴yi,疑yi,儀yi,熪yi,遺yi,嶬yi,彛yi,彜yi,螔yi,頥yi,寲yi,嶷yi,簃yi,顊yi,鮧yi,彝yi,彞yi,謻yi,鏔yi,籎yi,觺yi,讉yi,鸃yi,貤yi,乁yi,栘yi,頤yi,钀yi,錡yi,裿yi,迤yi,酏yi,乙yi,已yi,以yi,钇yi,佁yi,攺yi,矣yi,苡yi,苢yi,庡yi,舣yi,蚁yi,釔yi,倚yi,扆yi,逘yi,偯yi,崺yi,旑yi,椅yi,鈘yi,鉯yi,鳦yi,旖yi,輢yi,敼yi,螘yi,檥yi,礒yi,艤yi,蟻yi,顗yi,轙yi,齮yi,肊yi,陭yi,嬟yi,醷yi,阤yi,叕yi,锜yi,歖yi,笖yi,昳yi,睪yi,欥yi,輗yi,掜yi,儗yi,謚yi,紲yi,絏yi,辥yi,义yi,亿yi,弋yi,刈yi,忆yi,艺yi,仡yi,匇yi,议yi,亦yi,伇yi,屹yi,异yi,忔yi,芅yi,伿yi,佚yi,劮yi,呓yi,坄yi,役yi,抑yi,曵yi,杙yi,耴yi,苅yi,译yi,邑yi,佾yi,呭yi,呹yi,妷yi,峄yi,怈yi,怿yi,易yi,枍yi,泆yi,炈yi,绎yi,诣yi,驿yi,俋yi,奕yi,帟yi,帠yi,弈yi,枻yi,浂yi,玴yi,疫yi,羿yi,衵yi,轶yi,唈yi,垼yi,悒yi,挹yi,栧yi,栺yi,欭yi,浥yi,浳yi,益yi,袣yi,谊yi,勚yi,埸yi,悥yi,殹yi,異yi,羛yi,翊yi,翌yi,萟yi,訲yi,訳yi,豙yi,豛yi,逸yi,釴yi,隿yi,幆yi,敡yi,晹yi,棭yi,殔yi,湙yi,焲yi,蛡yi,詍yi,跇yi,軼yi,鈠yi,骮yi,亄yi,意yi,溢yi,獈yi,痬yi,竩yi,缢yi,義yi,肄yi,裔yi,裛yi,詣yi,勩yi,嫕yi,廙yi,榏yi,潩yi,瘗yi,膉yi,蓺yi,蜴yi,靾yi,駅yi,億yi,撎yi,槸yi,毅yi,熠yi,熤yi,熼yi,瘞yi,镒yi,鹝yi,鹢yi,黓yi,劓yi,圛yi,墿yi,嬑yi,嶧yi,憶yi,懌yi,曀yi,殪yi,澺yi,燚yi,瘱yi,瞖yi,穓yi,縊yi,艗yi,薏yi,螠yi,褹yi,寱yi,斁yi,曎yi,檍yi,歝yi,燡yi,翳yi,翼yi,臆yi,貖yi,鮨yi,癔yi,藙yi,藝yi,贀yi,鎰yi,镱yi,繶yi,繹yi,豷yi,霬yi,鯣yi,鶂yi,鶃yi,鶍yi,瀷yi,蘙yi,譯yi,議yi,醳yi,饐yi,囈yi,鐿yi,鷁yi,鷊yi,襼yi,驛yi,鷧yi,虉yi,鷾yi,讛yi,齸yi,襗yi,樴yi,癦yi,焬yi,阣yi,兿yi,誼yi,燱yi,懿yi,鮣yin,乚yin,囙yin,因yin,阥yin,阴yin,侌yin,垔yin,姻yin,洇yin,茵yin,荫yin,音yin,骃yin,栶yin,殷yin,氤yin,陰yin,凐yin,秵yin,裀yin,铟yin,陻yin,堙yin,婣yin,愔yin,筃yin,絪yin,歅yin,溵yin,禋yin,蒑yin,蔭yin,瘖yin,銦yin,磤yin,緸yin,鞇yin,諲yin,霒yin,駰yin,噾yin,濦yin,闉yin,霠yin,韾yin,喑yin,玪yin,伒yin,乑yin,吟yin,犾yin,苂yin,斦yin,泿yin,圁yin,峾yin,烎yin,狺yin,珢yin,粌yin,荶yin,訔yin,唫yin,婬yin,寅yin,崟yin,崯yin,淫yin,訡yin,银yin,鈝yin,滛yin,碒yin,鄞yin,夤yin,蔩yin,訚yin,誾yin,銀yin,龈yin,噖yin,殥yin,嚚yin,檭yin,蟫yin,霪yin,齦yin,鷣yin,螾yin,垠yin,璌yin,赺yin,縯yin,尹yin,引yin,吲yin,饮yin,蚓yin,隐yin,淾yin,釿yin,鈏yin,飲yin,隠yin,靷yin,飮yin,朄yin,趛yin,檃yin,瘾yin,隱yin,嶾yin,濥yin,蘟yin,癮yin,讔yin,輑yin,櫽yin,堷yin,梀yin,隂yin,印yin,茚yin,洕yin,胤yin,垽yin,湚yin,猌yin,廕yin,酳yin,慭yin,癊yin,憖yin,憗yin,懚yin,檼yin,韹ying,焽ying,旲ying,应ying,応ying,英ying,偀ying,桜ying,珱ying,莺ying,啨ying,婴ying,媖ying,愥ying,渶ying,朠ying,煐ying,瑛ying,嫈ying,碤ying,锳ying,嘤ying,撄ying,甇ying,緓ying,缨ying,罂ying,蝧ying,賏ying,樱ying,璎ying,噟ying,罃ying,褮ying,鴬ying,鹦ying,嬰ying,應ying,膺ying,韺ying,甖ying,鹰ying,嚶ying,孆ying,孾ying,攖ying,瀴ying,罌ying,蘡ying,櫻ying,瓔ying,礯ying,譻ying,鶯ying,鑍ying,纓ying,蠳ying,鷪ying,軈ying,鷹ying,鸎ying,鸚ying,謍ying,譍ying,绬ying,鶧ying,夃ying,俓ying,泂ying,嵤ying,桯ying,滎ying,鎣ying,盁ying,迎ying,茔ying,盈ying,荥ying,荧ying,莹ying,萤ying,营ying,萦ying,営ying,溁ying,溋ying,萾ying,僌ying,塋ying,楹ying,滢ying,蓥ying,潆ying,熒ying,蝇ying,瑩ying,蝿ying,嬴ying,營ying,縈ying,螢ying,濙ying,濚ying,濴ying,藀ying,覮ying,赢ying,巆ying,攍ying,攚ying,瀛ying,瀠ying,蠅ying,櫿ying,灐ying,籝ying,灜ying,贏ying,籯ying,耺ying,蛍ying,瀯ying,瀅ying,矨ying,郢ying,浧ying,梬ying,颍ying,颕ying,颖ying,摬ying,影ying,潁ying,瘿ying,穎ying,頴ying,巊ying,廮ying,鐛ying,癭ying,鱦ying,映ying,暎ying,硬ying,媵ying,膡ying,鞕ying,嚛yo,哟yo,唷yo,喲yo,拥yong,痈yong,邕yong,庸yong,嗈yong,鄘yong,雍yong,墉yong,嫞yong,慵yong,滽yong,槦yong,牅yong,銿yong,噰yong,壅yong,擁yong,澭yong,郺yong,镛yong,臃yong,癕yong,雝yong,鏞yong,廱yong,灉yong,饔yong,鱅yong,鷛yong,癰yong,鳙yong,揘yong,喁yong,鰫yong,嵱yong,筩yong,永yong,甬yong,咏yong,怺yong,泳yong,俑yong,勇yong,勈yong,栐yong,埇yong,悀yong,柡yong,涌yong,恿yong,傛yong,惥yong,愑yong,湧yong,硧yong,詠yong,彮yong,愹yong,蛹yong,慂yong,踊yong,禜yong,鲬yong,踴yong,鯒yong,塎yong,佣yong,用yong,苚yong,砽yong,醟yong,妋you,优you,忧you,攸you,呦you,幽you,悠you,麀you,滺you,憂you,優you,鄾you,嚘you,懮you,瀀you,纋you,耰you,逌you,泈you,櫌you,蓧you,蚘you,揂you,汼you,汓you,蝤you,尣you,冘you,尢you,尤you,由you,沋you,犹you,邮you,怞you,油you,肬you,怣you,斿you,疣you,峳you,浟you,秞you,莜you,莤you,莸you,郵you,铀you,偤you,蚰you,訧you,逰you,游you,猶you,鱿you,楢you,猷you,鈾you,鲉you,輏you,駀you,蕕you,蝣you,魷you,輶you,鮋you,櫾you,邎you,庮you,甴you,遊you,羗you,脩you,戭you,友you,有you,丣you,卣you,苃you,酉you,羑you,羐you,莠you,梄you,聈you,脜you,铕you,湵you,蒏you,蜏you,銪you,槱you,牖you,牗you,黝you,栯you,禉you,痏you,褎you,褏you,銹you,柚you,又you,右you,幼you,佑you,侑you,孧you,狖you,糿you,哊you,囿you,姷you,宥you,峟you,牰you,祐you,诱you,迶you,唀you,蚴you,亴you,貁you,釉you,酭you,鼬you,誘you,纡yu,迂yu,迃yu,穻yu,陓yu,紆yu,虶yu,唹yu,淤yu,盓yu,瘀yu,箊yu,亐yu,丂yu,桙yu,婾yu,媮yu,悇yu,汙yu,汚yu,鱮yu,颙yu,顒yu,渝yu,于yu,邘yu,伃yu,余yu,妤yu,扵yu,欤yu,玗yu,玙yu,於yu,盂yu,臾yu,鱼yu,俞yu,兪yu,禺yu,竽yu,舁yu,茰yu,荢yu,娛yu,娯yu,娱yu,狳yu,谀yu,酑yu,馀yu,渔yu,萸yu,釪yu,隃yu,隅yu,雩yu,魚yu,堣yu,堬yu,崳yu,嵎yu,嵛yu,愉yu,揄yu,楰yu,畬yu,畭yu,硢yu,腴yu,逾yu,骬yu,愚yu,楡yu,榆yu,歈yu,牏yu,瑜yu,艅yu,虞yu,觎yu,漁yu,睮yu,窬yu,舆yu,褕yu,歶yu,羭yu,蕍yu,蝓yu,諛yu,雓yu,餘yu,魣yu,嬩yu,懙yu,覦yu,歟yu,璵yu,螸yu,輿yu,鍝yu,礖yu,謣yu,髃yu,鮽yu,旟yu,籅yu,騟yu,鯲yu,鰅yu,鷠yu,鸆yu,萮yu,芌yu,喩yu,媀yu,貗yu,衧yu,湡yu,澞yu,頨yu,蝺yu,藇yu,予yu,与yu,伛yu,宇yu,屿yu,羽yu,雨yu,俁yu,俣yu,挧yu,禹yu,语yu,圄yu,祤yu,偊yu,匬yu,圉yu,庾yu,敔yu,鄅yu,萭yu,傴yu,寙yu,斞yu,楀yu,瑀yu,瘐yu,與yu,語yu,窳yu,龉yu,噳yu,嶼yu,貐yu,斔yu,麌yu,蘌yu,齬yu,穥yu,峿yu,閼yu,穀yu,蟈yu,僪yu,鐍yu,肀yu,翑yu,衘yu,獝yu,玉yu,驭yu,圫yu,聿yu,芋yu,妪yu,忬yu,饫yu,育yu,郁yu,彧yu,昱yu,狱yu,秗yu,俼yu,峪yu,浴yu,砡yu,钰yu,预yu,喐yu,域yu,堉yu,悆yu,惐yu,欲yu,淢yu,淯yu,袬yu,逳yu,阈yu,喅yu,喻yu,寓yu,庽yu,御yu,棛yu,棜yu,棫yu,焴yu,琙yu,矞yu,裕yu,遇yu,飫yu,馭yu,鹆yu,愈yu,滪yu,煜yu,稢yu,罭yu,蒮yu,蓣yu,誉yu,鈺yu,預yu,嶎yu,戫yu,毓yu,獄yu,瘉yu,緎yu,蜟yu,蜮yu,輍yu,銉yu,隩yu,噊yu,慾yu,稶yu,蓹yu,薁yu,豫yu,遹yu,鋊yu,鳿yu,澦yu,燏yu,燠yu,蕷yu,諭yu,錥yu,閾yu,鴥yu,鴧yu,鴪yu,礇yu,禦yu,魊yu,鹬yu,癒yu,礜yu,篽yu,繘yu,鵒yu,櫲yu,饇yu,蘛yu,譽yu,轝yu,鐭yu,霱yu,欎yu,驈yu,鬻yu,籞yu,鱊yu,鷸yu,鸒yu,欝yu,軉yu,鬰yu,鬱yu,灪yu,爩yu,灹yu,吁yu,谕yu,嫗yu,儥yu,籲yu,裷yuan,嫚yuan,囦yuan,鸢yuan,剈yuan,冤yuan,弲yuan,悁yuan,眢yuan,鸳yuan,寃yuan,渁yuan,渆yuan,渊yuan,渕yuan,淵yuan,葾yuan,棩yuan,蒬yuan,蜎yuan,鹓yuan,箢yuan,鳶yuan,蜵yuan,駌yuan,鋺yuan,鴛yuan,嬽yuan,鵷yuan,灁yuan,鼝yuan,蝝yuan,鼘yuan,喛yuan,楥yuan,芫yuan,元yuan,贠yuan,邧yuan,员yuan,园yuan,沅yuan,杬yuan,垣yuan,爰yuan,貟yuan,原yuan,員yuan,圆yuan,笎yuan,袁yuan,厡yuan,酛yuan,圎yuan,援yuan,湲yuan,猨yuan,缘yuan,鈨yuan,鼋yuan,園yuan,圓yuan,塬yuan,媴yuan,源yuan,溒yuan,猿yuan,獂yuan,蒝yuan,榞yuan,榬yuan,辕yuan,緣yuan,縁yuan,蝯yuan,橼yuan,羱yuan,薗yuan,螈yuan,謜yuan,轅yuan,黿yuan,鎱yuan,櫞yuan,邍yuan,騵yuan,鶢yuan,鶰yuan,厵yuan,傆yuan,媛yuan,褑yuan,褤yuan,嫄yuan,远yuan,盶yuan,遠yuan,逺yuan,肙yuan,妴yuan,苑yuan,怨yuan,院yuan,垸yuan,衏yuan,掾yuan,瑗yuan,禐yuan,愿yuan,裫yuan,噮yuan,願yuan,哕yue,噦yue,曰yue,曱yue,约yue,約yue,矱yue,彟yue,彠yue,矆yue,妜yue,髺yue,哾yue,趯yue,月yue,戉yue,汋yue,岄yue,抈yue,礿yue,岳yue,玥yue,恱yue,悅yue,悦yue,蚎yue,蚏yue,軏yue,钺yue,阅yue,捳yue,跀yue,跃yue,粤yue,越yue,鈅yue,粵yue,鉞yue,閱yue,閲yue,嬳yue,樾yue,篗yue,嶽yue,籆yue,瀹yue,蘥yue,爚yue,禴yue,躍yue,鸑yue,籰yue,龥yue,鸙yue,躒yue,刖yue,龠yue,涒yun,轀yun,蒀yun,煴yun,蒕yun,熅yun,奫yun,赟yun,頵yun,贇yun,氲yun,氳yun,晕yun,暈yun,云yun,勻yun,匀yun,伝yun,呍yun,囩yun,妘yun,抣yun,纭yun,芸yun,昀yun,畇yun,眃yun,秐yun,郧yun,涢yun,紜yun,耘yun,鄖yun,雲yun,愪yun,溳yun,筼yun,蒷yun,熉yun,澐yun,蕓yun,鋆yun,橒yun,篔yun,縜yun,繧yun,荺yun,沄yun,允yun,夽yun,狁yun,玧yun,陨yun,殒yun,喗yun,鈗yun,隕yun,殞yun,馻yun,磒yun,霣yun,齫yun,齳yun,抎yun,緷yun,孕yun,运yun,枟yun,郓yun,恽yun,鄆yun,酝yun,傊yun,惲yun,愠yun,運yun,慍yun,韫yun,韵yun,熨yun,蕴yun,賱yun,醖yun,醞yun,餫yun,韗yun,韞yun,蘊yun,韻yun,腪yun,噈za,帀za,匝za,沞za,咂za,拶za,沯za,桚za,紮za,鉔za,臜za,臢za,砸za,韴za,雑za,襍za,雜za,雥za,囋za,杂za,咋za,災zai,灾zai,甾zai,哉zai,栽zai,烖zai,渽zai,溨zai,睵zai,賳zai,宰zai,载zai,崽zai,載zai,仔zai,再zai,在zai,扗zai,洅zai,傤zai,酨zai,儎zai,篸zan,兂zan,糌zan,簪zan,簮zan,鐕zan,撍zan,咱zan,偺zan,喒zan,昝zan,寁zan,儧zan,攒zan,儹zan,趱zan,趲zan,揝zan,穳zan,暂zan,暫zan,賛zan,赞zan,錾zan,鄼zan,濽zan,蹔zan,酂zan,瓉zan,贊zan,鏨zan,瓒zan,灒zan,讃zan,瓚zan,禶zan,襸zan,讚zan,饡zan,酇zan,匨zang,蔵zang,牂zang,羘zang,赃zang,賍zang,臧zang,賘zang,贓zang,髒zang,贜zang,脏zang,驵zang,駔zang,奘zang,弉zang,塟zang,葬zang,銺zang,臓zang,臟zang,傮zao,遭zao,糟zao,醩zao,蹧zao,凿zao,鑿zao,早zao,枣zao,栆zao,蚤zao,棗zao,璅zao,澡zao,璪zao,薻zao,藻zao,灶zao,皁zao,皂zao,唕zao,唣zao,造zao,梍zao,慥zao,煰zao,艁zao,噪zao,簉zao,燥zao,竃zao,譟zao,趮zao,竈zao,躁zao,啫ze,伬ze,则ze,択ze,沢ze,择ze,泎ze,泽ze,责ze,迮ze,則ze,啧ze,帻ze,笮ze,舴ze,責ze,溭ze,嘖ze,嫧ze,幘ze,箦ze,蔶ze,樍ze,歵ze,諎ze,赜ze,擇ze,皟ze,瞔ze,礋ze,謮ze,賾ze,蠌ze,齚ze,齰ze,鸅ze,讁ze,葃ze,澤ze,仄ze,夨ze,庂ze,汄ze,昃ze,昗ze,捑ze,崱ze,贼zei,賊zei,鲗zei,蠈zei,鰂zei,鱡zei,怎zen,谮zen,囎zen,譛zen,曽zeng,増zeng,鄫zeng,增zeng,憎zeng,缯zeng,橧zeng,熷zeng,璔zeng,矰zeng,磳zeng,罾zeng,繒zeng,譄zeng,鱛zeng,縡zeng,鬷zeng,锃zeng,鋥zeng,甑zeng,赠zeng,贈zeng,馇zha,餷zha,蹅zha,紥zha,迊zha,抯zha,挓zha,柤zha,哳zha,偧zha,揸zha,渣zha,溠zha,楂zha,劄zha,皶zha,箚zha,樝zha,皻zha,譇zha,齄zha,齇zha,扎zha,摣zha,藸zha,囃zha,喳zha,箑zha,耫zha,札zha,轧zha,軋zha,闸zha,蚻zha,铡zha,牐zha,閘zha,霅zha,鍘zha,譗zha,挿zha,揷zha,厏zha,苲zha,砟zha,鲊zha,鲝zha,踷zha,鮓zha,鮺zha,眨zha,吒zha,乍zha,诈zha,咤zha,奓zha,炸zha,宱zha,痄zha,蚱zha,詐zha,搾zha,榨zha,醡zha,拃zha,柞zha,夈zhai,粂zhai,捚zhai,斋zhai,斎zhai,榸zhai,齋zhai,摘zhai,檡zhai,宅zhai,翟zhai,窄zhai,鉙zhai,骴zhai,簀zhai,债zhai,砦zhai,債zhai,寨zhai,瘵zhai,沾zhan,毡zhan,旃zhan,栴zhan,粘zhan,蛅zhan,惉zhan,詀zhan,趈zhan,詹zhan,閚zhan,谵zhan,嶦zhan,薝zhan,邅zhan,霑zhan,氊zhan,瞻zhan,鹯zhan,旜zhan,譫zhan,饘zhan,鳣zhan,驙zhan,魙zhan,鸇zhan,覱zhan,氈zhan,讝zhan,斩zhan,飐zhan,展zhan,盏zhan,崭zhan,斬zhan,琖zhan,搌zhan,盞zhan,嶃zhan,嶄zhan,榐zhan,颭zhan,嫸zhan,醆zhan,蹍zhan,欃zhan,占zhan,佔zhan,战zhan,栈zhan,桟zhan,站zhan,偡zhan,绽zhan,菚zhan,棧zhan,湛zhan,戦zhan,綻zhan,嶘zhan,輚zhan,戰zhan,虥zhan,虦zhan,轏zhan,蘸zhan,驏zhan,张zhang,張zhang,章zhang,鄣zhang,嫜zhang,彰zhang,慞zhang,漳zhang,獐zhang,粻zhang,蔁zhang,遧zhang,暲zhang,樟zhang,璋zhang,餦zhang,蟑zhang,鏱zhang,騿zhang,鱆zhang,麞zhang,涱zhang,傽zhang,长zhang,仧zhang,長zhang,镸zhang,仉zhang,涨zhang,掌zhang,漲zhang,幥zhang,礃zhang,鞝zhang,鐣zhang,丈zhang,仗zhang,扙zhang,杖zhang,胀zhang,账zhang,粀zhang,帳zhang,脹zhang,痮zhang,障zhang,墇zhang,嶂zhang,幛zhang,賬zhang,瘬zhang,瘴zhang,瞕zhang,帐zhang,鼌zhao,鼂zhao,謿zhao,皽zhao,佋zhao,钊zhao,妱zhao,巶zhao,招zhao,昭zhao,炤zhao,盄zhao,釗zhao,鉊zhao,駋zhao,鍣zhao,爫zhao,沼zhao,瑵zhao,爪zhao,找zhao,召zhao,兆zhao,诏zhao,枛zhao,垗zhao,狣zhao,赵zhao,笊zhao,肁zhao,旐zhao,棹zhao,罀zhao,詔zhao,照zhao,罩zhao,肇zhao,肈zhao,趙zhao,曌zhao,燳zhao,鮡zhao,櫂zhao,瞾zhao,羄zhao,啅zhao,龑yan,著zhe,着zhe,蜇zhe,嫬zhe,遮zhe,嗻zhe,摂zhe,歽zhe,砓zhe,籷zhe,虴zhe,哲zhe,埑zhe,粍zhe,袩zhe,啠zhe,悊zhe,晢zhe,晣zhe,辄zhe,喆zhe,蛰zhe,詟zhe,谪zhe,摺zhe,輒zhe,磔zhe,輙zhe,辙zhe,蟄zhe,嚞zhe,謫zhe,鮿zhe,轍zhe,襵zhe,讋zhe,厇zhe,謺zhe,者zhe,锗zhe,赭zhe,褶zhe,鍺zhe,这zhe,柘zhe,浙zhe,這zhe,淛zhe,蔗zhe,樜zhe,鹧zhe,蟅zhe,鷓zhe,趂zhen,贞zhen,针zhen,侦zhen,浈zhen,珍zhen,珎zhen,貞zhen,帪zhen,栕zhen,眞zhen,真zhen,砧zhen,祯zhen,針zhen,偵zhen,敒zhen,桭zhen,酙zhen,寊zhen,湞zhen,遉zhen,搸zhen,斟zhen,楨zhen,獉zhen,甄zhen,禎zhen,蒖zhen,蓁zhen,鉁zhen,靕zhen,榛zhen,殝zhen,瑧zhen,禛zhen,潧zhen,樼zhen,澵zhen,臻zhen,薽zhen,錱zhen,轃zhen,鍖zhen,鱵zhen,胗zhen,侲zhen,揕zhen,鎭zhen,帧zhen,幀zhen,朾zhen,椹zhen,桢zhen,箴zhen,屒zhen,诊zhen,抮zhen,枕zhen,姫zhen,弫zhen,昣zhen,轸zhen,畛zhen,疹zhen,眕zhen,袗zhen,聄zhen,萙zhen,裖zhen,覙zhen,診zhen,軫zhen,缜zhen,稹zhen,駗zhen,縝zhen,縥zhen,辴zhen,鬒zhen,嫃zhen,謓zhen,迧zhen,圳zhen,阵zhen,纼zhen,挋zhen,陣zhen,鸩zhen,振zhen,朕zhen,栚zhen,紖zhen,眹zhen,赈zhen,塦zhen,絼zhen,蜄zhen,敶zhen,誫zhen,賑zhen,鋴zhen,镇zhen,鴆zhen,鎮zhen,震zhen,嶒zheng,脀zheng,凧zheng,争zheng,佂zheng,姃zheng,征zheng,怔zheng,爭zheng,峥zheng,炡zheng,狰zheng,烝zheng,眐zheng,钲zheng,埩zheng,崝zheng,崢zheng,猙zheng,睁zheng,聇zheng,铮zheng,媜zheng,筝zheng,徰zheng,蒸zheng,鉦zheng,箏zheng,徵zheng,踭zheng,篜zheng,錚zheng,鬇zheng,癥zheng,糽zheng,睜zheng,氶zheng,抍zheng,拯zheng,塣zheng,晸zheng,愸zheng,撜zheng,整zheng,憕zheng,徎zheng,挣zheng,掙zheng,正zheng,证zheng,诤zheng,郑zheng,政zheng,症zheng,証zheng,鄭zheng,鴊zheng,證zheng,諍zheng,之zhi,支zhi,卮zhi,汁zhi,芝zhi,巵zhi,枝zhi,知zhi,织zhi,肢zhi,徔zhi,栀zhi,祗zhi,秓zhi,秖zhi,胑zhi,胝zhi,衼zhi,倁zhi,疷zhi,祬zhi,秪zhi,脂zhi,隻zhi,梔zhi,椥zhi,搘zhi,禔zhi,綕zhi,榰zhi,蜘zhi,馶zhi,鳷zhi,謢zhi,鴲zhi,織zhi,蘵zhi,鼅zhi,禵zhi,只zhi,鉄zhi,执zhi,侄zhi,坧zhi,直zhi,姪zhi,値zhi,值zhi,聀zhi,釞zhi,埴zhi,執zhi,职zhi,植zhi,殖zhi,絷zhi,跖zhi,墌zhi,摭zhi,馽zhi,嬂zhi,慹zhi,漐zhi,踯zhi,膱zhi,縶zhi,職zhi,蟙zhi,蹠zhi,軄zhi,躑zhi,秇zhi,埶zhi,戠zhi,禃zhi,茝zhi,絺zhi,觝zhi,徴zhi,止zhi,凪zhi,劧zhi,旨zhi,阯zhi,址zhi,坁zhi,帋zhi,沚zhi,纸zhi,芷zhi,抧zhi,祉zhi,茋zhi,咫zhi,恉zhi,指zhi,枳zhi,洔zhi,砋zhi,轵zhi,淽zhi,疻zhi,紙zhi,訨zhi,趾zhi,軹zhi,黹zhi,酯zhi,藢zhi,襧zhi,汦zhi,胵zhi,歭zhi,遟zhi,迣zhi,鶨zhi,亊zhi,銴zhi,至zhi,芖zhi,志zhi,忮zhi,扻zhi,豸zhi,厔zhi,垁zhi,帙zhi,帜zhi,治zhi,炙zhi,质zhi,郅zhi,俧zhi,峙zhi,庢zhi,庤zhi,栉zhi,洷zhi,祑zhi,陟zhi,娡zhi,徏zhi,挚zhi,晊zhi,桎zhi,狾zhi,秩zhi,致zhi,袟zhi,贽zhi,轾zhi,徝zhi,掷zhi,梽zhi,猘zhi,畤zhi,痔zhi,秲zhi,秷zhi,窒zhi,紩zhi,翐zhi,袠zhi,觗zhi,貭zhi,铚zhi,鸷zhi,傂zhi,崻zhi,彘zhi,智zhi,滞zhi,痣zhi,蛭zhi,骘zhi,廌zhi,滍zhi,稙zhi,稚zhi,置zhi,跱zhi,輊zhi,锧zhi,雉zhi,槜zhi,滯zhi,潌zhi,瘈zhi,製zhi,覟zhi,誌zhi,銍zhi,幟zhi,憄zhi,摯zhi,潪zhi,熫zhi,稺zhi,膣zhi,觯zhi,質zhi,踬zhi,鋕zhi,旘zhi,瀄zhi,緻zhi,隲zhi,鴙zhi,儨zhi,劕zhi,懥zhi,擲zhi,櫛zhi,懫zhi,贄zhi,櫍zhi,瓆zhi,觶zhi,騭zhi,礩zhi,豑zhi,騺zhi,驇zhi,躓zhi,鷙zhi,鑕zhi,豒zhi,制zhi,偫zhi,筫zhi,駤zhi,徸zhong,蝩zhong,中zhong,伀zhong,汷zhong,刣zhong,妐zhong,彸zhong,忠zhong,炂zhong,终zhong,柊zhong,盅zhong,衳zhong,钟zhong,舯zhong,衷zhong,終zhong,鈡zhong,幒zhong,蔠zhong,锺zhong,螤zhong,鴤zhong,螽zhong,鍾zhong,鼨zhong,蹱zhong,鐘zhong,籦zhong,衆zhong,迚zhong,肿zhong,种zhong,冢zhong,喠zhong,尰zhong,塚zhong,歱zhong,腫zhong,瘇zhong,種zhong,踵zhong,煄zhong,緟zhong,仲zhong,众zhong,妕zhong,狆zhong,祌zhong,茽zhong,衶zhong,重zhong,蚛zhong,偅zhong,眾zhong,堹zhong,媑zhong,筗zhong,諥zhong,啁zhou,州zhou,舟zhou,诌zhou,侜zhou,周zhou,洲zhou,炿zhou,诪zhou,珘zhou,辀zhou,郮zhou,婤zhou,徟zhou,矪zhou,週zhou,喌zhou,粥zhou,赒zhou,輈zhou,銂zhou,賙zhou,輖zhou,霌zhou,駲zhou,嚋zhou,盩zhou,謅zhou,譸zhou,僽zhou,諏zhou,烐zhou,妯zhou,轴zhou,軸zhou,碡zhou,肘zhou,帚zhou,菷zhou,晭zhou,睭zhou,箒zhou,鯞zhou,疛zhou,椆zhou,詶zhou,薵zhou,纣zhou,伷zhou,呪zhou,咒zhou,宙zhou,绉zhou,冑zhou,咮zhou,昼zhou,紂zhou,胄zhou,荮zhou,晝zhou,皱zhou,酎zhou,粙zhou,葤zhou,詋zhou,甃zhou,皺zhou,駎zhou,噣zhou,縐zhou,骤zhou,籕zhou,籒zhou,驟zhou,籀zhou,蕏zhu,藷zhu,朱zhu,劯zhu,侏zhu,诛zhu,邾zhu,洙zhu,茱zhu,株zhu,珠zhu,诸zhu,猪zhu,硃zhu,袾zhu,铢zhu,絑zhu,蛛zhu,誅zhu,跦zhu,槠zhu,潴zhu,蝫zhu,銖zhu,橥zhu,諸zhu,豬zhu,駯zhu,鮢zhu,瀦zhu,櫧zhu,櫫zhu,鼄zhu,鯺zhu,蠩zhu,秼zhu,騶zhu,鴸zhu,薥zhu,鸀zhu,朮zhu,竹zhu,竺zhu,炢zhu,茿zhu,烛zhu,逐zhu,笜zhu,舳zhu,瘃zhu,蓫zhu,燭zhu,蠋zhu,躅zhu,鱁zhu,劚zhu,孎zhu,灟zhu,斸zhu,曯zhu,欘zhu,蠾zhu,钃zhu,劅zhu,斀zhu,爥zhu,主zhu,宔zhu,拄zhu,砫zhu,罜zhu,渚zhu,煑zhu,煮zhu,詝zhu,嘱zhu,濐zhu,麈zhu,瞩zhu,囑zhu,矚zhu,尌zhu,伫zhu,佇zhu,住zhu,助zhu,纻zhu,苎zhu,坾zhu,杼zhu,苧zhu,贮zhu,驻zhu,壴zhu,柱zhu,柷zhu,殶zhu,炷zhu,祝zhu,疰zhu,眝zhu,祩zhu,竚zhu,莇zhu,紵zhu,紸zhu,羜zhu,蛀zhu,嵀zhu,筑zhu,註zhu,貯zhu,跓zhu,軴zhu,铸zhu,筯zhu,鉒zhu,馵zhu,墸zhu,箸zhu,翥zhu,樦zhu,鋳zhu,駐zhu,築zhu,篫zhu,霔zhu,麆zhu,鑄zhu,櫡zhu,注zhu,飳zhu,抓zhua,檛zhua,膼zhua,髽zhua,跩zhuai,睉zhuai,拽zhuai,耑zhuan,专zhuan,専zhuan,砖zhuan,專zhuan,鄟zhuan,瑼zhuan,膞zhuan,磚zhuan,諯zhuan,蟤zhuan,顓zhuan,颛zhuan,转zhuan,転zhuan,竱zhuan,轉zhuan,簨zhuan,灷zhuan,啭zhuan,堟zhuan,蒃zhuan,瑑zhuan,僎zhuan,撰zhuan,篆zhuan,馔zhuan,饌zhuan,囀zhuan,籑zhuan,僝zhuan,妆zhuang,追zhui,骓zhui,椎zhui,锥zhui,錐zhui,騅zhui,鵻zhui,沝zhui,倕zhui,埀zhui,腏zhui,笍zhui,娷zhui,缀zhui,惴zhui,甀zhui,缒zhui,畷zhui,膇zhui,墜zhui,綴zhui,赘zhui,縋zhui,諈zhui,醊zhui,錣zhui,餟zhui,礈zhui,贅zhui,轛zhui,鑆zhui,坠zhui,湻zhun,宒zhun,迍zhun,肫zhun,窀zhun,谆zhun,諄zhun,衠zhun,訰zhun,准zhun,準zhun,綧zhun,稕zhun,凖zhun,鐯zhuo,拙zhuo,炪zhuo,倬zhuo,捉zhuo,桌zhuo,涿zhuo,棳zhuo,琸zhuo,窧zhuo,槕zhuo,蠿zhuo,矠zhuo,卓zhuo,圴zhuo,犳zhuo,灼zhuo,妰zhuo,茁zhuo,斫zhuo,浊zhuo,丵zhuo,浞zhuo,诼zhuo,酌zhuo,啄zhuo,娺zhuo,梲zhuo,斮zhuo,晫zhuo,椓zhuo,琢zhuo,斱zhuo,硺zhuo,窡zhuo,罬zhuo,撯zhuo,擆zhuo,斲zhuo,禚zhuo,諁zhuo,諑zhuo,濁zhuo,擢zhuo,斵zhuo,濯zhuo,镯zhuo,鵫zhuo,灂zhuo,蠗zhuo,鐲zhuo,籗zhuo,鷟zhuo,籱zhuo,烵zhuo,謶zhuo,薋zi,菑zi,吱zi,孜zi,茊zi,兹zi,咨zi,姕zi,姿zi,茲zi,栥zi,紎zi,赀zi,资zi,崰zi,淄zi,秶zi,缁zi,谘zi,赼zi,嗞zi,嵫zi,椔zi,湽zi,滋zi,粢zi,葘zi,辎zi,鄑zi,孶zi,禌zi,觜zi,貲zi,資zi,趑zi,锱zi,緇zi,鈭zi,镃zi,龇zi,輜zi,鼒zi,澬zi,諮zi,趦zi,輺zi,錙zi,髭zi,鲻zi,鍿zi,頾zi,頿zi,鯔zi,鶅zi,鰦zi,齜zi,訾zi,訿zi,芓zi,孳zi,鎡zi,茈zi,泚zi,籽zi,子zi,姉zi,姊zi,杍zi,矷zi,秄zi,呰zi,秭zi,耔zi,虸zi,笫zi,梓zi,釨zi,啙zi,紫zi,滓zi,榟zi,橴zi,自zi,茡zi,倳zi,剚zi,恣zi,牸zi,渍zi,眥zi,眦zi,胔zi,胾zi,漬zi,字zi,唨zo,潨zong,宗zong,倧zong,综zong,骔zong,堫zong,嵏zong,嵕zong,惾zong,棕zong,猣zong,腙zong,葼zong,朡zong,椶zong,嵸zong,稯zong,緃zong,熧zong,緵zong,翪zong,蝬zong,踨zong,踪zong,磫zong,豵zong,蹤zong,騌zong,鬃zong,騣zong,鬉zong,鯮zong,鯼zong,鑁zong,綜zong,潀zong,潈zong,蓯zong,熜zong,緫zong,总zong,偬zong,捴zong,惣zong,愡zong,揔zong,搃zong,傯zong,蓗zong,摠zong,総zong,燪zong,總zong,鍯zong,鏓zong,縦zong,縂zong,纵zong,昮zong,疭zong,倊zong,猔zong,碂zong,粽zong,糉zong,瘲zong,錝zong,縱zong,邹zou,驺zou,诹zou,陬zou,菆zou,棷zou,棸zou,鄒zou,緅zou,鄹zou,鯫zou,黀zou,齺zou,芻zou,鲰zou,辶zou,赱zou,走zou,鯐zou,搊zou,奏zou,揍zou,租zu,菹zu,錊zu,伜zu,倅zu,紣zu,綷zu,顇zu,卆zu,足zu,卒zu,哫zu,崒zu,崪zu,族zu,稡zu,箤zu,踤zu,踿zu,镞zu,鏃zu,诅zu,阻zu,俎zu,爼zu,祖zu,組zu,詛zu,靻zu,鎺zu,组zu,鉆zuan,劗zuan,躜zuan,鑚zuan,躦zuan,繤zuan,缵zuan,纂zuan,纉zuan,籫zuan,纘zuan,欑zuan,赚zuan,賺zuan,鑽zuan,钻zuan,攥zuan,厜zui,嗺zui,樶zui,蟕zui,纗zui,嶉zui,槯zui,嶊zui,噿zui,濢zui,璻zui,嘴zui,睟zui,枠zui,栬zui,絊zui,酔zui,晬zui,最zui,祽zui,罪zui,辠zui,蕞zui,醉zui,嶵zui,檇zui,檌zui,穝zui,墫zun,尊zun,嶟zun,遵zun,樽zun,繜zun,罇zun,鶎zun,鐏zun,鱒zun,鷷zun,鳟zun,僔zun,噂zun,撙zun,譐zun,拵zun,捘zun,銌zun,咗zuo,昨zuo,秨zuo,捽zuo,椊zuo,稓zuo,筰zuo,鈼zuo,阝zuo,左zuo,佐zuo,繓zuo,酢zuo,作zuo,坐zuo,阼zuo,岝zuo,岞zuo,怍zuo,侳zuo,祚zuo,胙zuo,唑zuo,座zuo,袏zuo,做zuo,葄zuo,蓙zuo,飵zuo,糳zuo,疮chuang,牕chuang,噇chuang,闖chuang,剏chuang,霜shuang,欆shuang,驦shuang,慡shuang,灀shuang,窓chuang,瘡chuang,闯chuang,仺chuang,剙chuang,雙shuang,礵shuang,鸘shuang,樉shuang,谁shui,鹴shuang,爽shuang,鏯shuang,孀shuang,孇shuang,騻shuang,焋zhuang,幢zhuang,撞zhuang,隹zhui,傱shuan,\";"
  },
  {
    "path": "static/cherry/pinyin/pinyin.js",
    "content": "/**\n * Created by Alex on 2016/3/7.\n */\nvar hzpy = require(\"./hanziPinyin\").hzpy;\nvar hzpyWithOutYin = require(\"./hanziPinyinWithoutYin\").hzpy;\nvar _ = require(\"lodash\");\n\nfunction pinyin(word,splitStr) {\n    splitStr = splitStr === undefined ? ' ' : splitStr;\n    var str = '';\n    var s;\n    for (var i = 0; i < word.length; i++) {\n        if (hzpy.indexOf(word.charAt(i)) != -1 && word.charCodeAt(i) > 200) {\n            s = 1;\n            while (hzpy.charAt(hzpy.indexOf(word.charAt(i)) + s) != \",\") {\n                str += hzpy.charAt(hzpy.indexOf(word.charAt(i)) + s);\n                s++;\n            }\n            str += splitStr;\n        }\n        else {\n            str += word.charAt(i);\n        }\n    }\n    return str;\n}\n\n//无声调的拼音\nfunction pinyinWithOutYin(word,splitStr) {\n    splitStr = splitStr === undefined ? ' ' : splitStr;\n    var str = '';\n    var s;\n    for (var i = 0; i < word.length; i++) {\n        if (hzpyWithOutYin.indexOf(word.charAt(i)) != -1 && word.charCodeAt(i) > 200) {\n            s = 1;\n            while (hzpyWithOutYin.charAt(hzpyWithOutYin.indexOf(word.charAt(i)) + s) != \",\") {\n                str += hzpyWithOutYin.charAt(hzpyWithOutYin.indexOf(word.charAt(i)) + s);\n                s++;\n            }\n            str +=splitStr;\n        }\n        else {\n            str += word.charAt(i);\n        }\n    }\n\n    return str;\n}\n\nfunction isChineseWord(word, modle) {\n    if (!modle) {\n        //modle为false是非严格中文！默认是严格中文\n        modle = true;\n    }\n    var str = '';\n    var isChinese = false;\n    for (var i = 0; i < word.length; i++) {\n        if (hzpy.indexOf(word.charAt(i)) != -1 && word.charCodeAt(i) > 200) {\n            isChinese = true;\n        }\n        else {\n            if (modle) {\n                return false;\n            }\n        }\n    }\n    return isChinese;\n}\n\nfunction sort(array, key) {\n    return _.sortBy(array, [function (o) {\n        return pinyinWithOutYin(o[key],\"\");\n    }]);\n}\n\nmodule.exports = {\n    pinyin: pinyin,\n    pinyinWithOutYin: pinyinWithOutYin,\n    isChineseWord: isChineseWord,\n    sort: sort\n}\n"
  },
  {
    "path": "static/cherry/pinyin/pinyin_dist.js",
    "content": "var hzpy=\"吖ā,阿ā,啊ā,锕ā,錒ā,嗄á,厑ae,哎āi,哀āi,唉āi,埃āi,挨āi,溾āi,锿āi,鎄āi,啀ái,捱ái,皑ái,凒ái,嵦ái,溰ái,嘊ái,敱ái,敳ái,皚ái,癌ái,娾ái,隑ái,剴ái,騃ái,毐ǎi,昹ǎi,矮ǎi,蔼ǎi,躷ǎi,濭ǎi,藹ǎi,譪ǎi,霭ǎi,靄ǎi,鯦ǎi,噯ài,艾ài,伌ài,爱ài,砹ài,硋ài,隘ài,嗌ài,塧ài,嫒ài,愛ài,碍ài,叆ài,暧ài,瑷ài,僾ài,壒ài,嬡ài,懓ài,薆ài,懝ài,曖ài,賹ài,餲ài,鴱ài,皧ài,瞹ài,馤ài,礙ài,譺ài,鑀ài,鱫ài,靉ài,閡ài,欬ài,焥ài,堨ài,乂ài,嗳ài,璦ài,安ān,侒ān,峖ān,桉ān,氨ān,庵ān,谙ān,媕ān,萻ān,葊ān,痷ān,腤ān,鹌ān,蓭ān,誝ān,鞌ān,鞍ān,盦ān,闇ān,馣ān,鮟ān,盫ān,鵪ān,韽ān,鶕ān,啽ān,厰ān,鴳ān,諳ān,玵án,雸án,儑án,垵ǎn,俺ǎn,唵ǎn,埯ǎn,铵ǎn,隌ǎn,揞ǎn,晻ǎn,罯ǎn,銨ǎn,碪ǎn,犴àn,岸àn,按àn,洝àn,荌àn,案àn,胺àn,豻àn,堓àn,婩àn,貋àn,錌àn,黯àn,頇àn,屽àn,垾àn,遃àn,暗àn,肮āng,骯āng,岇áng,昂áng,昻áng,卬áng,枊àng,盎àng,醠àng,凹āo,垇āo,柪āo,軪āo,爊āo,熝āo,眑āo,泑āo,梎āo,敖áo,厫áo,隞áo,嗷áo,嗸áo,嶅áo,廒áo,滶áo,獒áo,獓áo,遨áo,摮áo,璈áo,蔜áo,磝áo,翱áo,聱áo,螯áo,翶áo,謷áo,翺áo,鳌áo,鏖áo,鰲áo,鷔áo,鼇áo,慠áo,鏕áo,嚻áo,熬áo,抝ǎo,芺ǎo,袄ǎo,媪ǎo,镺ǎo,媼ǎo,襖ǎo,郩ǎo,鴁ǎo,蝹ǎo,坳ào,岙ào,扷ào,岰ào,傲ào,奡ào,奥ào,嫯ào,奧ào,澚ào,墺ào,嶴ào,澳ào,懊ào,擙ào,謸ào,鏊ào,驁ào,骜ào,吧ba,八bā,仈bā,巴bā,叭bā,扒bā,朳bā,玐bā,夿bā,岜bā,芭bā,疤bā,哵bā,捌bā,笆bā,粑bā,紦bā,羓bā,蚆bā,釟bā,鲃bā,魞bā,鈀bā,柭bā,丷bā,峇bā,豝bā,叐bá,犮bá,抜bá,坺bá,妭bá,拔bá,茇bá,炦bá,癹bá,胈bá,釛bá,菝bá,詙bá,跋bá,軷bá,颰bá,魃bá,墢bá,鼥bá,把bǎ,钯bǎ,靶bǎ,坝bà,弝bà,爸bà,罢bà,鲅bà,罷bà,鮁bà,覇bà,矲bà,霸bà,壩bà,灞bà,欛bà,鲌bà,鮊bà,皅bà,挀bāi,掰bāi,白bái,百bǎi,佰bǎi,柏bǎi,栢bǎi,捭bǎi,竡bǎi,粨bǎi,絔bǎi,摆bǎi,擺bǎi,襬bǎi,庍bài,拝bài,败bài,拜bài,敗bài,稗bài,粺bài,鞁bài,薭bài,贁bài,韛bài,扳bān,攽bān,朌bān,班bān,般bān,颁bān,斑bān,搬bān,斒bān,頒bān,瘢bān,螁bān,螌bān,褩bān,癍bān,辬bān,籓bān,肦bān,鳻bān,搫bān,阪bǎn,坂bǎn,岅bǎn,昄bǎn,板bǎn,版bǎn,钣bǎn,粄bǎn,舨bǎn,鈑bǎn,蝂bǎn,魬bǎn,覂bǎn,瓪bǎn,办bàn,半bàn,伴bàn,扮bàn,姅bàn,怑bàn,拌bàn,绊bàn,秚bàn,湴bàn,絆bàn,鉡bàn,靽bàn,辦bàn,瓣bàn,跘bàn,邦bāng,峀bāng,垹bāng,帮bāng,捠bāng,梆bāng,浜bāng,邫bāng,幚bāng,縍bāng,幫bāng,鞤bāng,幇bāng,绑bǎng,綁bǎng,榜bǎng,牓bǎng,膀bǎng,騯bǎng,玤bàng,蚌bàng,傍bàng,棒bàng,棓bàng,硥bàng,谤bàng,塝bàng,徬bàng,稖bàng,蒡bàng,蜯bàng,镑bàng,艕bàng,謗bàng,鎊bàng,埲bàng,蚄bàng,蛖bàng,嫎bàng,勹bāo,包bāo,佨bāo,孢bāo,胞bāo,剝bāo,笣bāo,煲bāo,龅bāo,蕔bāo,褒bāo,闁bāo,襃bāo,齙bāo,剥bāo,枹bāo,裦bāo,苞bāo,窇báo,嫑báo,雹báo,铇báo,薄báo,宝bǎo,怉bǎo,饱bǎo,保bǎo,鸨bǎo,珤bǎo,堡bǎo,堢bǎo,媬bǎo,葆bǎo,寚bǎo,飹bǎo,飽bǎo,褓bǎo,駂bǎo,鳵bǎo,緥bǎo,賲bǎo,藵bǎo,寳bǎo,寶bǎo,靌bǎo,宀bǎo,鴇bǎo,勽bào,报bào,抱bào,豹bào,菢bào,袌bào,報bào,鉋bào,鲍bào,靤bào,骲bào,暴bào,髱bào,虣bào,鮑bào,儤bào,曓bào,爆bào,忁bào,鑤bào,蚫bào,瀑bào,萡be,呗bei,唄bei,陂bēi,卑bēi,盃bēi,桮bēi,悲bēi,揹bēi,碑bēi,鹎bēi,藣bēi,鵯bēi,柸bēi,錍bēi,椑bēi,諀bēi,杯bēi,喺béi,北běi,鉳běi,垻bèi,贝bèi,狈bèi,貝bèi,邶bèi,备bèi,昁bèi,牬bèi,苝bèi,背bèi,钡bèi,俻bèi,倍bèi,悖bèi,狽bèi,被bèi,偝bèi,偹bèi,梖bèi,珼bèi,備bèi,僃bèi,惫bèi,焙bèi,琲bèi,軰bèi,辈bèi,愂bèi,碚bèi,禙bèi,蓓bèi,蛽bèi,犕bèi,褙bèi,誖bèi,骳bèi,輩bèi,鋇bèi,憊bèi,糒bèi,鞴bèi,鐾bèi,鐴bèi,杮bèi,韝bèi,棑bèi,哱bèi,鄁bèi,奔bēn,泍bēn,贲bēn,倴bēn,渀bēn,逩bēn,犇bēn,賁bēn,錛bēn,喯bēn,锛bēn,本běn,苯běn,奙běn,畚běn,楍běn,翉běn,夲běn,坌bèn,捹bèn,桳bèn,笨bèn,撪bèn,獖bèn,輽bèn,炃bèn,燌bèn,夯bèn,伻bēng,祊bēng,奟bēng,崩bēng,绷bēng,絣bēng,閍bēng,嵭bēng,痭bēng,嘣bēng,綳bēng,繃bēng,嗙bēng,挷bēng,傰bēng,搒bēng,甭béng,埄běng,菶běng,琣běng,鞛běng,琫běng,泵bèng,迸bèng,逬bèng,跰bèng,塴bèng,甏bèng,镚bèng,蹦bèng,鏰bèng,錋bèng,皀bī,屄bī,偪bī,毴bī,逼bī,豍bī,螕bī,鲾bī,鎞bī,鵖bī,鰏bī,悂bī,鈚bī,柲bí,荸bí,鼻bí,嬶bí,匕bǐ,比bǐ,夶bǐ,朼bǐ,佊bǐ,妣bǐ,沘bǐ,疕bǐ,彼bǐ,柀bǐ,秕bǐ,俾bǐ,笔bǐ,粃bǐ,粊bǐ,舭bǐ,啚bǐ,筆bǐ,鄙bǐ,聛bǐ,貏bǐ,箄bǐ,崥bǐ,魮bǐ,娝bǐ,箃bǐ,吡bǐ,匂bì,币bì,必bì,毕bì,闭bì,佖bì,坒bì,庇bì,诐bì,邲bì,妼bì,怭bì,枈bì,畀bì,苾bì,哔bì,毖bì,珌bì,疪bì,胇bì,荜bì,陛bì,毙bì,狴bì,畢bì,袐bì,铋bì,婢bì,庳bì,敝bì,梐bì,萆bì,萞bì,閇bì,閉bì,堛bì,弻bì,弼bì,愊bì,愎bì,湢bì,皕bì,禆bì,筚bì,貱bì,赑bì,嗶bì,彃bì,楅bì,滗bì,滭bì,煏bì,痹bì,痺bì,腷bì,蓖bì,蓽bì,蜌bì,裨bì,跸bì,鉍bì,閟bì,飶bì,幣bì,弊bì,熚bì,獙bì,碧bì,稫bì,箅bì,箆bì,綼bì,蔽bì,馝bì,幤bì,潷bì,獘bì,罼bì,襅bì,駜bì,髲bì,壁bì,嬖bì,廦bì,篦bì,篳bì,縪bì,薜bì,觱bì,避bì,鮅bì,斃bì,濞bì,臂bì,蹕bì,鞞bì,髀bì,奰bì,璧bì,鄨bì,饆bì,繴bì,襞bì,鏎bì,鞸bì,韠bì,躃bì,躄bì,魓bì,贔bì,驆bì,鷝bì,鷩bì,鼊bì,咇bì,鮩bì,畐bì,踾bì,鶝bì,闬bì,閈bì,祕bì,鴓bì,怶bì,旇bì,翍bì,肶bì,笓bì,鸊bì,肸bì,畁bì,詖bì,鄪bì,襣bì,边biān,砭biān,笾biān,猵biān,编biān,萹biān,煸biān,牑biān,甂biān,箯biān,編biān,蝙biān,獱biān,邉biān,鍽biān,鳊biān,邊biān,鞭biān,鯿biān,籩biān,糄biān,揙biān,臱biān,鯾biān,炞biǎn,贬biǎn,扁biǎn,窆biǎn,匾biǎn,貶biǎn,惼biǎn,碥biǎn,稨biǎn,褊biǎn,鴘biǎn,藊biǎn,釆biǎn,辧biǎn,疺biǎn,覵biǎn,鶣biǎn,卞biàn,弁biàn,忭biàn,抃biàn,汳biàn,汴biàn,苄biàn,峅biàn,便biàn,变biàn,変biàn,昪biàn,覍biàn,缏biàn,遍biàn,閞biàn,辡biàn,緶biàn,艑biàn,辨biàn,辩biàn,辫biàn,辮biàn,辯biàn,變biàn,彪biāo,标biāo,飑biāo,骉biāo,髟biāo,淲biāo,猋biāo,脿biāo,墂biāo,幖biāo,滮biāo,蔈biāo,骠biāo,標biāo,熛biāo,膘biāo,麃biāo,瘭biāo,镖biāo,飙biāo,飚biāo,儦biāo,颷biāo,瀌biāo,藨biāo,謤biāo,爂biāo,臕biāo,贆biāo,鏢biāo,穮biāo,镳biāo,飆biāo,飇biāo,飈biāo,飊biāo,驃biāo,鑣biāo,驫biāo,摽biāo,膔biāo,篻biāo,僄biāo,徱biāo,表biǎo,婊biǎo,裱biǎo,褾biǎo,錶biǎo,檦biǎo,諘biǎo,俵biào,鳔biào,鰾biào,憋biē,鳖biē,鱉biē,鼈biē,虌biē,龞biē,蟞biē,別bié,别bié,莂bié,蛂bié,徶bié,襒bié,蹩bié,穪bié,瘪biě,癟biě,彆biè,汃bīn,邠bīn,砏bīn,宾bīn,彬bīn,斌bīn,椕bīn,滨bīn,缤bīn,槟bīn,瑸bīn,豩bīn,賓bīn,賔bīn,镔bīn,儐bīn,濒bīn,濱bīn,濵bīn,虨bīn,豳bīn,璸bīn,瀕bīn,霦bīn,繽bīn,蠙bīn,鑌bīn,顮bīn,檳bīn,玢bīn,訜bīn,傧bīn,氞bìn,摈bìn,殡bìn,膑bìn,髩bìn,擯bìn,鬂bìn,臏bìn,髌bìn,鬓bìn,髕bìn,鬢bìn,殯bìn,仌bīng,氷bīng,冰bīng,兵bīng,栟bīng,掤bīng,梹bīng,鋲bīng,幷bīng,丙bǐng,邴bǐng,陃bǐng,怲bǐng,抦bǐng,秉bǐng,苪bǐng,昞bǐng,昺bǐng,柄bǐng,炳bǐng,饼bǐng,眪bǐng,窉bǐng,蛃bǐng,禀bǐng,鈵bǐng,鉼bǐng,鞆bǐng,餅bǐng,餠bǐng,燷bǐng,庰bǐng,偋bǐng,寎bǐng,綆bǐng,稟bǐng,癛bǐng,癝bǐng,琕bǐng,棅bǐng,并bìng,並bìng,併bìng,垪bìng,倂bìng,栤bìng,病bìng,竝bìng,傡bìng,摒bìng,誁bìng,靐bìng,疒bìng,啵bo,蔔bo,卜bo,噃bo,趵bō,癶bō,拨bō,波bō,玻bō,袚bō,袯bō,钵bō,饽bō,紴bō,缽bō,菠bō,碆bō,鉢bō,僠bō,嶓bō,撥bō,播bō,餑bō,磻bō,蹳bō,驋bō,鱍bō,帗bō,盋bō,脖bó,仢bó,伯bó,孛bó,犻bó,驳bó,帛bó,泊bó,狛bó,苩bó,侼bó,勃bó,胉bó,郣bó,亳bó,挬bó,浡bó,瓟bó,秡bó,钹bó,铂bó,桲bó,淿bó,舶bó,博bó,渤bó,湐bó,葧bó,鹁bó,愽bó,搏bó,猼bó,鈸bó,鉑bó,馎bó,僰bó,煿bó,箔bó,膊bó,艊bó,馛bó,駁bó,踣bó,鋍bó,镈bó,壆bó,馞bó,駮bó,豰bó,嚗bó,懪bó,礡bó,簙bó,鎛bó,餺bó,鵓bó,犦bó,髆bó,髉bó,欂bó,襮bó,礴bó,鑮bó,肑bó,茀bó,袹bó,穛bó,彴bó,瓝bó,牔bó,蚾bǒ,箥bǒ,跛bǒ,簸bò,孹bò,擘bò,檗bò,糪bò,譒bò,蘗bò,襎bò,檘bò,蔢bò,峬bū,庯bū,逋bū,钸bū,晡bū,鈽bū,誧bū,餔bū,鵏bū,秿bū,陠bū,鯆bū,轐bú,醭bú,不bú,輹bú,卟bǔ,补bǔ,哺bǔ,捕bǔ,補bǔ,鳪bǔ,獛bǔ,鸔bǔ,擈bǔ,佈bù,吥bù,步bù,咘bù,怖bù,歨bù,歩bù,钚bù,勏bù,埗bù,悑bù,捗bù,荹bù,部bù,埠bù,瓿bù,鈈bù,廍bù,蔀bù,踄bù,郶bù,篰bù,餢bù,簿bù,尃bù,箁bù,抪bù,柨bù,布bù,擦cā,攃cā,礤cǎ,礸cǎ,遪cà,偲cāi,猜cāi,揌cāi,才cái,材cái,财cái,財cái,戝cái,裁cái,采cǎi,倸cǎi,埰cǎi,婇cǎi,寀cǎi,彩cǎi,採cǎi,睬cǎi,跴cǎi,綵cǎi,踩cǎi,菜cài,棌cài,蔡cài,縩cài,乲cal,参cān,參cān,飡cān,骖cān,喰cān,湌cān,傪cān,嬠cān,餐cān,驂cān,嵾cān,飱cān,残cán,蚕cán,惭cán,殘cán,慚cán,蝅cán,慙cán,蠶cán,蠺cán,惨cǎn,慘cǎn,噆cǎn,憯cǎn,黪cǎn,黲cǎn,灿càn,粲càn,儏càn,澯càn,薒càn,燦càn,璨càn,爘càn,謲càn,仓cāng,沧cāng,苍cāng,倉cāng,舱cāng,凔cāng,嵢cāng,滄cāng,獊cāng,蒼cāng,濸cāng,艙cāng,螥cāng,罉cāng,藏cáng,欌cáng,鑶cáng,賶càng,撡cāo,操cāo,糙cāo,曺cáo,嘈cáo,嶆cáo,漕cáo,蓸cáo,槽cáo,褿cáo,艚cáo,螬cáo,鏪cáo,慒cáo,曹cáo,艹cǎo,艸cǎo,草cǎo,愺cǎo,懆cǎo,騲cǎo,慅cǎo,肏cào,鄵cào,襙cào,冊cè,册cè,侧cè,厕cè,恻cè,拺cè,测cè,荝cè,敇cè,側cè,粣cè,萗cè,廁cè,惻cè,測cè,策cè,萴cè,筞cè,蓛cè,墄cè,箣cè,憡cè,刂cè,厠cè,膥cēn,岑cén,梣cén,涔cén,硶cén,噌cēng,层céng,層céng,竲céng,驓céng,曾céng,蹭cèng,硛ceok,硳ceok,岾ceom,猠ceon,乽ceor,嚓chā,叉chā,扠chā,芆chā,杈chā,肞chā,臿chā,訍chā,偛chā,嗏chā,插chā,銟chā,锸chā,艖chā,疀chā,鍤chā,鎈chā,垞chá,查chá,査chá,茬chá,茶chá,嵖chá,猹chá,靫chá,槎chá,察chá,碴chá,褨chá,檫chá,搽chá,衩chǎ,镲chǎ,鑔chǎ,奼chà,汊chà,岔chà,侘chà,诧chà,剎chà,姹chà,差chà,紁chà,詫chà,拆chāi,钗chāi,釵chāi,犲chái,侪chái,柴chái,祡chái,豺chái,儕chái,喍chái,虿chài,袃chài,瘥chài,蠆chài,囆chài,辿chān,觇chān,梴chān,掺chān,搀chān,覘chān,裧chān,摻chān,鋓chān,幨chān,襜chān,攙chān,嚵chān,脠chān,婵chán,谗chán,孱chán,棎chán,湹chán,禅chán,馋chán,嬋chán,煘chán,缠chán,獑chán,蝉chán,誗chán,鋋chán,儃chán,廛chán,潹chán,潺chán,緾chán,磛chán,禪chán,毚chán,鄽chán,瀍chán,蟬chán,儳chán,劖chán,蟾chán,酁chán,壥chán,巉chán,瀺chán,纏chán,纒chán,躔chán,艬chán,讒chán,鑱chán,饞chán,繟chán,澶chán,镵chán,产chǎn,刬chǎn,旵chǎn,丳chǎn,浐chǎn,剗chǎn,谄chǎn,產chǎn,産chǎn,铲chǎn,阐chǎn,蒇chǎn,剷chǎn,嵼chǎn,摌chǎn,滻chǎn,幝chǎn,蕆chǎn,諂chǎn,閳chǎn,燀chǎn,簅chǎn,冁chǎn,醦chǎn,闡chǎn,囅chǎn,灛chǎn,讇chǎn,墠chǎn,骣chǎn,鏟chǎn,忏chàn,硟chàn,摲chàn,懴chàn,颤chàn,懺chàn,羼chàn,韂chàn,顫chàn,伥chāng,昌chāng,倀chāng,娼chāng,淐chāng,猖chāng,菖chāng,阊chāng,晿chāng,椙chāng,琩chāng,裮chāng,锠chāng,錩chāng,閶chāng,鲳chāng,鯧chāng,鼚chāng,兏cháng,肠cháng,苌cháng,尝cháng,偿cháng,常cháng,徜cháng,瓺cháng,萇cháng,甞cháng,腸cháng,嘗cháng,嫦cháng,瑺cháng,膓cháng,鋿cháng,償cháng,嚐cháng,蟐cháng,鲿cháng,鏛cháng,鱨cháng,棖cháng,尙cháng,厂chǎng,场chǎng,昶chǎng,場chǎng,敞chǎng,僘chǎng,廠chǎng,氅chǎng,鋹chǎng,惝chǎng,怅chàng,玚chàng,畅chàng,倡chàng,鬯chàng,唱chàng,悵chàng,暢chàng,畼chàng,誯chàng,韔chàng,抄chāo,弨chāo,怊chāo,欩chāo,钞chāo,焯chāo,超chāo,鈔chāo,繛chāo,樔chāo,绰chāo,綽chāo,綤chāo,牊cháo,巢cháo,巣cháo,朝cháo,鄛cháo,漅cháo,嘲cháo,潮cháo,窲cháo,罺cháo,轈cháo,晁cháo,吵chǎo,炒chǎo,眧chǎo,煼chǎo,麨chǎo,巐chǎo,粆chǎo,仦chào,耖chào,觘chào,趠chào,车chē,車chē,砗chē,唓chē,硨chē,蛼chē,莗chē,扯chě,偖chě,撦chě,彻chè,坼chè,迠chè,烢chè,聅chè,掣chè,硩chè,頙chè,徹chè,撤chè,澈chè,勶chè,瞮chè,爡chè,喢chè,賝chen,伧chen,傖chen,抻chēn,郴chēn,棽chēn,琛chēn,嗔chēn,綝chēn,諃chēn,尘chén,臣chén,忱chén,沉chén,辰chén,陈chén,茞chén,宸chén,烥chén,莐chén,陳chén,敐chén,晨chén,訦chén,谌chén,揨chén,煁chén,蔯chén,塵chén,樄chén,瘎chén,霃chén,螴chén,諶chén,麎chén,曟chén,鷐chén,薼chén,趻chěn,碜chěn,墋chěn,夦chěn,磣chěn,踸chěn,贂chěn,衬chèn,疢chèn,龀chèn,趁chèn,榇chèn,齓chèn,齔chèn,嚫chèn,谶chèn,襯chèn,讖chèn,瀋chèn,称chēng,稱chēng,阷chēng,泟chēng,柽chēng,爯chēng,棦chēng,浾chēng,偁chēng,蛏chēng,铛chēng,牚chēng,琤chēng,赪chēng,憆chēng,摚chēng,靗chēng,撐chēng,撑chēng,緽chēng,橕chēng,瞠chēng,赬chēng,頳chēng,檉chēng,竀chēng,蟶chēng,鏳chēng,鏿chēng,饓chēng,鐺chēng,丞chéng,成chéng,呈chéng,承chéng,枨chéng,诚chéng,郕chéng,乗chéng,城chéng,娍chéng,宬chéng,峸chéng,洆chéng,荿chéng,乘chéng,埕chéng,挰chéng,珹chéng,掁chéng,窚chéng,脭chéng,铖chéng,堘chéng,惩chéng,椉chéng,程chéng,筬chéng,絾chéng,裎chéng,塖chéng,溗chéng,碀chéng,誠chéng,畻chéng,酲chéng,鋮chéng,澄chéng,橙chéng,檙chéng,鯎chéng,瀓chéng,懲chéng,騬chéng,塍chéng,悜chěng,逞chěng,骋chěng,庱chěng,睈chěng,騁chěng,秤chèng,吃chī,妛chī,杘chī,侙chī,哧chī,蚩chī,鸱chī,瓻chī,眵chī,笞chī,訵chī,嗤chī,媸chī,摛chī,痴chī,瞝chī,螭chī,鴟chī,鵄chī,癡chī,魑chī,齝chī,攡chī,麶chī,彲chī,黐chī,蚳chī,摴chī,彨chī,弛chí,池chí,驰chí,迟chí,岻chí,茌chí,持chí,竾chí,淔chí,筂chí,貾chí,遅chí,馳chí,墀chí,踟chí,遲chí,篪chí,謘chí,尺chǐ,叺chǐ,呎chǐ,肔chǐ,卶chǐ,齿chǐ,垑chǐ,胣chǐ,恥chǐ,耻chǐ,蚇chǐ,豉chǐ,欼chǐ,歯chǐ,裭chǐ,鉹chǐ,褫chǐ,齒chǐ,侈chǐ,彳chì,叱chì,斥chì,灻chì,赤chì,饬chì,抶chì,勅chì,恜chì,炽chì,翄chì,翅chì,烾chì,痓chì,啻chì,湁chì,飭chì,傺chì,痸chì,腟chì,鉓chì,雴chì,憏chì,翤chì,遫chì,慗chì,瘛chì,翨chì,熾chì,懘chì,趩chì,饎chì,鶒chì,鷘chì,餝chì,歗chì,敕chì,充chōng,冲chōng,忡chōng,茺chōng,珫chōng,翀chōng,舂chōng,嘃chōng,摏chōng,憃chōng,憧chōng,衝chōng,罿chōng,艟chōng,蹖chōng,褈chōng,傭chōng,浺chōng,虫chóng,崇chóng,崈chóng,隀chóng,蟲chóng,宠chǒng,埫chǒng,寵chǒng,沖chòng,铳chòng,銃chòng,抽chōu,紬chōu,瘳chōu,篘chōu,犨chōu,犫chōu,跾chōu,掫chōu,仇chóu,俦chóu,栦chóu,惆chóu,绸chóu,菗chóu,畴chóu,絒chóu,愁chóu,皗chóu,稠chóu,筹chóu,酧chóu,酬chóu,綢chóu,踌chóu,儔chóu,雔chóu,嬦chóu,懤chóu,雠chóu,疇chóu,籌chóu,躊chóu,讎chóu,讐chóu,擣chóu,燽chóu,丑chǒu,丒chǒu,吜chǒu,杽chǒu,侴chǒu,瞅chǒu,醜chǒu,矁chǒu,魗chǒu,臭chòu,遚chòu,殠chòu,榋chu,橻chu,屮chū,出chū,岀chū,初chū,樗chū,貙chū,齣chū,刍chú,除chú,厨chú,滁chú,蒢chú,豠chú,锄chú,耡chú,蒭chú,蜍chú,趎chú,鉏chú,雏chú,犓chú,廚chú,篨chú,鋤chú,橱chú,懨chú,幮chú,櫉chú,蟵chú,躇chú,雛chú,櫥chú,蹰chú,鶵chú,躕chú,媰chú,杵chǔ,础chǔ,储chǔ,楮chǔ,禇chǔ,楚chǔ,褚chǔ,濋chǔ,儲chǔ,檚chǔ,璴chǔ,礎chǔ,齭chǔ,齼chǔ,処chǔ,椘chǔ,亍chù,处chù,竌chù,怵chù,拀chù,绌chù,豖chù,竐chù,俶chù,敊chù,珿chù,絀chù,處chù,傗chù,琡chù,搐chù,触chù,踀chù,閦chù,儊chù,憷chù,斶chù,歜chù,臅chù,黜chù,觸chù,矗chù,觕chù,畜chù,鄐chù,搋chuāi,揣chuāi,膗chuái,嘬chuài,踹chuài,膪chuài,巛chuān,川chuān,氚chuān,穿chuān,剶chuān,瑏chuān,传chuán,舡chuán,船chuán,猭chuán,遄chuán,傳chuán,椽chuán,歂chuán,暷chuán,輲chuán,甎chuán,舛chuǎn,荈chuǎn,喘chuǎn,僢chuǎn,堾chuǎn,踳chuǎn,汌chuàn,串chuàn,玔chuàn,钏chuàn,釧chuàn,賗chuàn,刅chuāng,炊chuī,龡chuī,圌chuí,垂chuí,桘chuí,陲chuí,捶chuí,菙chuí,棰chuí,槌chuí,锤chuí,箠chuí,顀chuí,錘chuí,鰆chun,旾chūn,杶chūn,春chūn,萅chūn,媋chūn,暙chūn,椿chūn,槆chūn,瑃chūn,箺chūn,蝽chūn,橁chūn,輴chūn,櫄chūn,鶞chūn,纯chún,陙chún,唇chún,浱chún,純chún,莼chún,淳chún,脣chún,犉chún,滣chún,鹑chún,漘chún,醇chún,醕chún,鯙chún,鶉chún,蒓chún,偆chǔn,萶chǔn,惷chǔn,睶chǔn,賰chǔn,蠢chǔn,踔chuō,戳chuō,啜chuò,辵chuò,娕chuò,娖chuò,惙chuò,涰chuò,逴chuò,辍chuò,酫chuò,龊chuò,擉chuò,磭chuò,歠chuò,嚽chuò,齪chuò,鑡chuò,齱chuò,婼chuò,鋜chuò,輟chuò,呲cī,玼cī,疵cī,趀cī,偨cī,縒cī,跐cī,髊cī,齹cī,枱cī,词cí,珁cí,垐cí,柌cí,祠cí,茨cí,瓷cí,詞cí,辝cí,慈cí,甆cí,辞cí,鈶cí,雌cí,鹚cí,糍cí,辤cí,飺cí,餈cí,嬨cí,濨cí,鴜cí,礠cí,辭cí,鶿cí,鷀cí,磁cí,此cǐ,佌cǐ,皉cǐ,朿cì,次cì,佽cì,刺cì,刾cì,庛cì,茦cì,栨cì,莿cì,絘cì,赐cì,螆cì,賜cì,蛓cì,嗭cis,囱cōng,匆cōng,囪cōng,苁cōng,忩cōng,枞cōng,茐cōng,怱cōng,悤cōng,棇cōng,焧cōng,葱cōng,楤cōng,漗cōng,聡cōng,蔥cōng,骢cōng,暰cōng,樅cōng,樬cōng,瑽cōng,璁cōng,聪cōng,瞛cōng,篵cōng,聰cōng,蟌cōng,繱cōng,鏦cōng,騘cōng,驄cōng,聦cōng,从cóng,從cóng,丛cóng,従cóng,婃cóng,孮cóng,徖cóng,悰cóng,淙cóng,琮cóng,漎cóng,誴cóng,賨cóng,賩cóng,樷cóng,藂cóng,叢cóng,灇cóng,欉cóng,爜cóng,憁còng,謥còng,凑còu,湊còu,楱còu,腠còu,辏còu,輳còu,粗cū,麁cū,麄cū,麤cū,徂cú,殂cú,蔖cǔ,促cù,猝cù,媨cù,瘄cù,蔟cù,誎cù,趗cù,憱cù,醋cù,瘯cù,簇cù,縬cù,鼀cù,蹴cù,蹵cù,顣cù,蹙cù,汆cuān,撺cuān,镩cuān,蹿cuān,攛cuān,躥cuān,鑹cuān,攅cuán,櫕cuán,巑cuán,攢cuán,窜cuàn,熶cuàn,篡cuàn,殩cuàn,篹cuàn,簒cuàn,竄cuàn,爨cuàn,乼cui,崔cuī,催cuī,凗cuī,墔cuī,摧cuī,榱cuī,獕cuī,磪cuī,鏙cuī,漼cuī,慛cuī,璀cuǐ,皠cuǐ,熣cuǐ,繀cuǐ,忰cuì,疩cuì,翆cuì,脃cuì,脆cuì,啐cuì,啛cuì,悴cuì,淬cuì,萃cuì,毳cuì,焠cuì,瘁cuì,粹cuì,膵cuì,膬cuì,竁cuì,臎cuì,琗cuì,粋cuì,脺cuì,翠cuì,邨cūn,村cūn,皴cūn,澊cūn,竴cūn,存cún,刌cǔn,忖cǔn,寸cùn,籿cùn,襊cuō,搓cuō,瑳cuō,遳cuō,磋cuō,撮cuō,蹉cuō,醝cuō,虘cuó,嵯cuó,痤cuó,矬cuó,蒫cuó,鹾cuó,鹺cuó,嵳cuó,脞cuǒ,剉cuò,剒cuò,厝cuò,夎cuò,挫cuò,莝cuò,莡cuò,措cuò,逪cuò,棤cuò,锉cuò,蓌cuò,错cuò,銼cuò,錯cuò,疸da,咑dā,哒dā,耷dā,畣dā,搭dā,嗒dā,噠dā,撘dā,鎝dā,笚dā,矺dā,褡dā,墶dá,达dá,迏dá,迖dá,妲dá,怛dá,垯dá,炟dá,羍dá,荅dá,荙dá,剳dá,匒dá,笪dá,逹dá,溚dá,答dá,詚dá,達dá,跶dá,瘩dá,靼dá,薘dá,鞑dá,燵dá,蟽dá,鎉dá,躂dá,鐽dá,韃dá,龖dá,龘dá,搨dá,繨dá,打dǎ,觰dǎ,大dà,亣dà,眔dà,橽dà,汏dà,呆dāi,獃dāi,懛dāi,歹dǎi,傣dǎi,逮dǎi,代dài,轪dài,侢dài,垈dài,岱dài,帒dài,甙dài,绐dài,迨dài,带dài,待dài,柋dài,殆dài,玳dài,贷dài,帯dài,軑dài,埭dài,帶dài,紿dài,蚮dài,袋dài,軚dài,貸dài,軩dài,瑇dài,廗dài,叇dài,曃dài,緿dài,鮘dài,鴏dài,戴dài,艜dài,黛dài,簤dài,蹛dài,瀻dài,霴dài,襶dài,靆dài,螮dài,蝳dài,跢dài,箉dài,骀dài,怠dài,黱dài,愖dān,丹dān,妉dān,单dān,担dān,単dān,眈dān,砃dān,耼dān,耽dān,郸dān,聃dān,躭dān,酖dān,單dān,媅dān,殚dān,瘅dān,匰dān,箪dān,褝dān,鄲dān,頕dān,儋dān,勯dān,擔dān,殫dān,癉dān,襌dān,簞dān,瓭dān,卩dān,亻dān,娊dān,噡dān,聸dān,伔dǎn,刐dǎn,狚dǎn,玬dǎn,胆dǎn,衴dǎn,紞dǎn,掸dǎn,亶dǎn,馾dǎn,撣dǎn,澸dǎn,黕dǎn,膽dǎn,丼dǎn,抌dǎn,赕dǎn,賧dǎn,黵dǎn,黮dǎn,繵dàn,譂dàn,旦dàn,但dàn,帎dàn,沊dàn,泹dàn,诞dàn,柦dàn,疍dàn,啖dàn,啗dàn,弹dàn,惮dàn,淡dàn,蛋dàn,啿dàn,氮dàn,腅dàn,蜑dàn,觛dàn,窞dàn,誕dàn,僤dàn,噉dàn,髧dàn,嘾dàn,彈dàn,憚dàn,憺dàn,澹dàn,禫dàn,餤dàn,駳dàn,鴠dàn,甔dàn,癚dàn,嚪dàn,贉dàn,霮dàn,饏dàn,蟺dàn,倓dàn,惔dàn,弾dàn,醈dàn,撢dàn,萏dàn,当dāng,珰dāng,裆dāng,筜dāng,儅dāng,噹dāng,澢dāng,璫dāng,襠dāng,簹dāng,艡dāng,蟷dāng,當dāng,挡dǎng,党dǎng,谠dǎng,擋dǎng,譡dǎng,黨dǎng,灙dǎng,欓dǎng,讜dǎng,氹dàng,凼dàng,圵dàng,宕dàng,砀dàng,垱dàng,荡dàng,档dàng,菪dàng,瓽dàng,逿dàng,潒dàng,碭dàng,瞊dàng,蕩dàng,趤dàng,壋dàng,檔dàng,璗dàng,盪dàng,礑dàng,簜dàng,蘯dàng,闣dàng,愓dàng,嵣dàng,偒dàng,雼dàng,裯dāo,刀dāo,叨dāo,屶dāo,忉dāo,氘dāo,舠dāo,釖dāo,鱽dāo,魛dāo,虭dāo,捯dáo,导dǎo,岛dǎo,陦dǎo,倒dǎo,宲dǎo,捣dǎo,祷dǎo,禂dǎo,搗dǎo,隝dǎo,嶋dǎo,嶌dǎo,槝dǎo,導dǎo,隯dǎo,壔dǎo,嶹dǎo,蹈dǎo,禱dǎo,菿dǎo,島dǎo,帱dào,幬dào,到dào,悼dào,盗dào,椡dào,盜dào,道dào,稲dào,翢dào,噵dào,稻dào,衜dào,檤dào,衟dào,翿dào,軇dào,瓙dào,纛dào,箌dào,的de,嘚dē,恴dé,得dé,淂dé,悳dé,惪dé,锝dé,徳dé,德dé,鍀dé,棏dé,揼dem,扥den,扽den,灯dēng,登dēng,豋dēng,噔dēng,嬁dēng,燈dēng,璒dēng,竳dēng,簦dēng,艠dēng,覴dēng,蹬dēng,墱dēng,戥děng,等děng,澂dèng,邓dèng,僜dèng,凳dèng,鄧dèng,隥dèng,嶝dèng,瞪dèng,磴dèng,镫dèng,櫈dèng,鐙dèng,仾dī,低dī,奃dī,彽dī,袛dī,啲dī,埞dī,羝dī,隄dī,堤dī,趆dī,嘀dī,滴dī,磾dī,鍉dī,鞮dī,氐dī,牴dī,碮dī,踧dí,镝dí,廸dí,狄dí,籴dí,苖dí,迪dí,唙dí,敌dí,涤dí,荻dí,梑dí,笛dí,觌dí,靮dí,滌dí,髢dí,嫡dí,蔋dí,蔐dí,頔dí,魡dí,敵dí,篴dí,嚁dí,藡dí,豴dí,糴dí,覿dí,鸐dí,藋dí,鬄dí,樀dí,蹢dí,鏑dí,泜dǐ,诋dǐ,邸dǐ,阺dǐ,呧dǐ,坻dǐ,底dǐ,弤dǐ,抵dǐ,拞dǐ,柢dǐ,砥dǐ,掋dǐ,菧dǐ,詆dǐ,軧dǐ,聜dǐ,骶dǐ,鯳dǐ,坘dǐ,厎dǐ,赿dì,地dì,弚dì,坔dì,弟dì,旳dì,杕dì,玓dì,怟dì,枤dì,苐dì,帝dì,埊dì,娣dì,递dì,逓dì,偙dì,啇dì,梊dì,焍dì,眱dì,祶dì,第dì,菂dì,谛dì,釱dì,媂dì,棣dì,睇dì,缔dì,蒂dì,僀dì,禘dì,腣dì,遞dì,鉪dì,馰dì,墑dì,墬dì,摕dì,碲dì,蝃dì,遰dì,慸dì,甋dì,締dì,嶳dì,諦dì,踶dì,弔dì,嵽dì,諟dì,珶dì,渧dì,蹏dì,揥dì,墆dì,疐dì,俤dì,蔕dì,嗲diǎ,敁diān,掂diān,傎diān,厧diān,嵮diān,滇diān,槙diān,瘨diān,颠diān,蹎diān,巅diān,顚diān,顛diān,癫diān,巓diān,巔diān,攧diān,癲diān,齻diān,槇diān,典diǎn,点diǎn,婰diǎn,敟diǎn,椣diǎn,碘diǎn,蒧diǎn,蕇diǎn,踮diǎn,點diǎn,痶diǎn,丶diǎn,奌diǎn,电diàn,佃diàn,甸diàn,坫diàn,店diàn,垫diàn,扂diàn,玷diàn,钿diàn,唸diàn,婝diàn,惦diàn,淀diàn,奠diàn,琔diàn,殿diàn,蜔diàn,鈿diàn,電diàn,墊diàn,橂diàn,澱diàn,靛diàn,磹diàn,癜diàn,簟diàn,驔diàn,腍diàn,橝diàn,壂diàn,刁diāo,叼diāo,汈diāo,刟diāo,凋diāo,奝diāo,弴diāo,彫diāo,蛁diāo,琱diāo,貂diāo,碉diāo,鳭diāo,殦diāo,雕diāo,鮉diāo,鲷diāo,簓diāo,鼦diāo,鯛diāo,鵰diāo,颩diāo,矵diāo,錭diāo,淍diāo,屌diǎo,鸼diǎo,鵃diǎo,扚diǎo,伄diào,吊diào,钓diào,窎diào,訋diào,调diào,掉diào,釣diào,铞diào,鈟diào,竨diào,銱diào,雿diào,調diào,瘹diào,窵diào,鋽diào,鑃diào,誂diào,嬥diào,絩diào,爹diē,跌diē,褺diē,跮dié,苵dié,迭dié,垤dié,峌dié,恎dié,绖dié,胅dié,瓞dié,眣dié,耊dié,啑dié,戜dié,谍dié,喋dié,堞dié,幉dié,惵dié,揲dié,畳dié,絰dié,耋dié,臷dié,詄dié,趃dié,叠dié,殜dié,牃dié,牒dié,镻dié,碟dié,蜨dié,褋dié,艓dié,蝶dié,諜dié,蹀dié,鲽dié,曡dié,鰈dié,疉dié,疊dié,氎dié,渉dié,崼dié,鮙dié,跕dié,鐡dié,怢dié,槢dié,挃dié,柣dié,螲dié,疂dié,眰diè,嚸dim,丁dīng,仃dīng,叮dīng,帄dīng,玎dīng,甼dīng,疔dīng,盯dīng,耵dīng,靪dīng,奵dīng,町dīng,虰dīng,酊dǐng,顶dǐng,頂dǐng,鼎dǐng,鼑dǐng,薡dǐng,鐤dǐng,顁dǐng,艼dǐng,濎dǐng,嵿dǐng,钉dìng,釘dìng,订dìng,忊dìng,饤dìng,矴dìng,定dìng,訂dìng,飣dìng,啶dìng,萣dìng,椗dìng,腚dìng,碇dìng,锭dìng,碠dìng,聢dìng,錠dìng,磸dìng,铤dìng,鋌dìng,掟dìng,丟diū,丢diū,铥diū,銩diū,东dōng,冬dōng,咚dōng,東dōng,苳dōng,昸dōng,氡dōng,倲dōng,鸫dōng,埬dōng,娻dōng,崬dōng,涷dōng,笗dōng,菄dōng,氭dōng,蝀dōng,鮗dōng,鼕dōng,鯟dōng,鶇dōng,鶫dōng,徚dōng,夂dōng,岽dōng,揰dǒng,董dǒng,墥dǒng,嬞dǒng,懂dǒng,箽dǒng,蕫dǒng,諌dǒng,湩dǒng,动dòng,冻dòng,侗dòng,垌dòng,峒dòng,峝dòng,恫dòng,挏dòng,栋dòng,洞dòng,胨dòng,迵dòng,凍dòng,戙dòng,胴dòng,動dòng,崠dòng,硐dòng,棟dòng,腖dòng,働dòng,詷dòng,駧dòng,霘dòng,狫dòng,烔dòng,絧dòng,衕dòng,勭dòng,騆dòng,姛dòng,瞗dōu,吺dōu,剅dōu,唗dōu,都dōu,兜dōu,兠dōu,蔸dōu,橷dōu,篼dōu,侸dōu,艔dóu,乧dǒu,阧dǒu,抖dǒu,枓dǒu,陡dǒu,蚪dǒu,鈄dǒu,斗dòu,豆dòu,郖dòu,浢dòu,荳dòu,逗dòu,饾dòu,鬥dòu,梪dòu,毭dòu,脰dòu,酘dòu,痘dòu,閗dòu,窦dòu,鬦dòu,鋀dòu,餖dòu,斣dòu,闘dòu,竇dòu,鬪dòu,鬭dòu,凟dòu,鬬dòu,剢dū,阇dū,嘟dū,督dū,醏dū,闍dū,厾dū,毒dú,涜dú,读dú,渎dú,椟dú,牍dú,犊dú,裻dú,読dú,獨dú,錖dú,匵dú,嬻dú,瀆dú,櫝dú,殰dú,牘dú,犢dú,瓄dú,皾dú,騳dú,讀dú,豄dú,贕dú,韣dú,髑dú,鑟dú,韇dú,韥dú,黷dú,讟dú,独dú,樚dú,襡dú,襩dú,黩dú,笃dǔ,堵dǔ,帾dǔ,琽dǔ,赌dǔ,睹dǔ,覩dǔ,賭dǔ,篤dǔ,暏dǔ,笁dǔ,陼dǔ,芏dù,妒dù,杜dù,肚dù,妬dù,度dù,荰dù,秺dù,渡dù,镀dù,螙dù,殬dù,鍍dù,蠧dù,蠹dù,剫dù,晵dù,靯dù,篅duān,偳duān,媏duān,端duān,褍duān,鍴duān,剬duān,短duǎn,段duàn,断duàn,塅duàn,缎duàn,葮duàn,椴duàn,煅duàn,瑖duàn,腶duàn,碫duàn,锻duàn,緞duàn,毈duàn,簖duàn,鍛duàn,斷duàn,躖duàn,煆duàn,籪duàn,叾dug,搥duī,鎚duī,垖duī,堆duī,塠duī,嵟duī,痽duī,磓duī,頧duī,鴭duī,鐜duī,埻duī,謉duǐ,錞duì,队duì,对duì,兊duì,兌duì,兑duì,対duì,祋duì,怼duì,陮duì,隊duì,碓duì,綐duì,對duì,憝duì,濧duì,薱duì,镦duì,懟duì,瀩duì,譈duì,譵duì,憞duì,鋭duì,杸duì,吨dūn,惇dūn,敦dūn,蜳dūn,墩dūn,墪dūn,壿dūn,撴dūn,獤dūn,噸dūn,撉dūn,橔dūn,犜dūn,礅dūn,蹲dūn,蹾dūn,驐dūn,鐓dūn,盹dǔn,趸dǔn,躉dǔn,伅dùn,囤dùn,庉dùn,沌dùn,炖dùn,盾dùn,砘dùn,逇dùn,钝dùn,遁dùn,鈍dùn,腞dùn,頓dùn,碷dùn,遯dùn,潡dùn,燉dùn,踲dùn,楯dùn,腯dùn,顿dùn,多duō,夛duō,咄duō,哆duō,茤duō,剟duō,崜duō,敠duō,毲duō,裰duō,嚉duō,掇duō,仛duó,夺duó,铎duó,敓duó,敚duó,喥duó,敪duó,鈬duó,奪duó,凙duó,踱duó,鮵duó,鐸duó,跿duó,沰duó,痥duó,奲duǒ,朵duǒ,朶duǒ,哚duǒ,垛duǒ,挅duǒ,挆duǒ,埵duǒ,缍duǒ,椯duǒ,趓duǒ,躱duǒ,躲duǒ,綞duǒ,亸duǒ,鬌duǒ,嚲duǒ,垜duǒ,橢duǒ,硾duǒ,吋duò,刴duò,剁duò,沲duò,陊duò,陏duò,饳duò,柮duò,桗duò,堕duò,舵duò,惰duò,跥duò,跺duò,飿duò,墮duò,嶞duò,憜duò,墯duò,鵽duò,隓duò,貀duò,詑duò,駄duò,媠duò,嫷duò,尮duò,呃e,妸ē,妿ē,娿ē,婀ē,匼ē,讹é,吪é,囮é,迗é,俄é,娥é,峨é,峩é,涐é,莪é,珴é,訛é,睋é,鈋é,锇é,鹅é,蛾é,磀é,誐é,鋨é,頟é,额é,魤é,額é,鵝é,鵞é,譌é,騀é,佮é,鰪é,皒é,欸ě,枙ě,砈ě,鵈ě,玀ě,閜ě,砵è,惡è,厄è,歺è,屵è,戹è,岋è,阨è,扼è,阸è,呝è,砐è,轭è,咢è,咹è,垩è,姶è,峉è,匎è,恶è,砨è,蚅è,饿è,偔è,卾è,堊è,悪è,硆è,谔è,軛è,鄂è,阏è,堮è,崿è,愕è,湂è,萼è,豟è,軶è,遏è,廅è,搤è,搹è,琧è,腭è,詻è,僫è,蝁è,锷è,鹗è,蕚è,遻è,頞è,颚è,餓è,噩è,擜è,覨è,諤è,餩è,鍔è,鳄è,歞è,顎è,櫮è,鰐è,鶚è,讍è,齶è,鱷è,齃è,啈è,搕è,礘è,魥è,蘁è,齾è,苊è,遌è,鑩è,诶ēi,誒ēi,奀ēn,恩ēn,蒽ēn,煾ēn,唔én,峎ěn,摁èn,嗯èn,鞥eng,仒eo,乻eol,旕eos,儿ér,而ér,児ér,侕ér,兒ér,陑ér,峏ér,洏ér,耏ér,荋ér,栭ér,胹ér,唲ér,袻ér,鸸ér,粫ér,聏ér,輀ér,隭ér,髵ér,鮞ér,鴯ér,轜ér,咡ér,杒ér,陾ér,輭ér,鲕ér,尒ěr,尓ěr,尔ěr,耳ěr,迩ěr,洱ěr,饵ěr,栮ěr,毦ěr,珥ěr,铒ěr,爾ěr,鉺ěr,餌ěr,駬ěr,薾ěr,邇ěr,趰ěr,嬭ěr,二èr,弍èr,弐èr,佴èr,刵èr,贰èr,衈èr,貳èr,誀èr,樲èr,髶èr,貮èr,发fā,沷fā,発fā,發fā,彂fā,髪fā,橃fā,醗fā,乏fá,伐fá,姂fá,垡fá,罚fá,阀fá,栰fá,傠fá,筏fá,瞂fá,罰fá,閥fá,罸fá,藅fá,汎fá,佱fǎ,法fǎ,鍅fǎ,灋fǎ,砝fǎ,珐fà,琺fà,髮fà,蕟fà,帆fān,忛fān,犿fān,番fān,勫fān,墦fān,嬏fān,幡fān,憣fān,旙fān,旛fān,翻fān,藩fān,轓fān,颿fān,飜fān,鱕fān,蕃fān,凡fán,凢fán,凣fán,匥fán,杋fán,柉fán,籵fán,钒fán,舤fán,烦fán,舧fán,笲fán,釩fán,棥fán,煩fán,緐fán,樊fán,橎fán,燔fán,璠fán,薠fán,繁fán,繙fán,羳fán,蹯fán,瀿fán,礬fán,蘩fán,鐇fán,蠜fán,鷭fán,氾fán,瀪fán,渢fán,伋fán,舩fán,矾fán,反fǎn,仮fǎn,辺fǎn,返fǎn,攵fǎn,犭fǎn,払fǎn,犯fàn,奿fàn,泛fàn,饭fàn,范fàn,贩fàn,畈fàn,訉fàn,軓fàn,梵fàn,盕fàn,笵fàn,販fàn,軬fàn,飯fàn,飰fàn,滼fàn,嬎fàn,範fàn,嬔fàn,婏fàn,方fāng,邡fāng,坊fāng,芳fāng,牥fāng,钫fāng,淓fāng,堏fāng,鈁fāng,錺fāng,鴋fāng,埅fāng,枋fāng,防fáng,妨fáng,房fáng,肪fáng,鲂fáng,魴fáng,仿fǎng,访fǎng,纺fǎng,昉fǎng,昘fǎng,瓬fǎng,眆fǎng,倣fǎng,旊fǎng,紡fǎng,舫fǎng,訪fǎng,髣fǎng,鶭fǎng,放fàng,飞fēi,妃fēi,非fēi,飛fēi,啡fēi,婓fēi,婔fēi,渄fēi,绯fēi,菲fēi,扉fēi,猆fēi,靟fēi,裶fēi,緋fēi,蜚fēi,霏fēi,鲱fēi,餥fēi,馡fēi,騑fēi,騛fēi,鯡fēi,飝fēi,奜fēi,肥féi,淝féi,暃féi,腓féi,蜰féi,棐féi,萉féi,蟦féi,朏fěi,胐fěi,匪fěi,诽fěi,悱fěi,斐fěi,榧fěi,翡fěi,蕜fěi,誹fěi,篚fěi,襏fèi,吠fèi,废fèi,沸fèi,狒fèi,肺fèi,昲fèi,费fèi,俷fèi,剕fèi,厞fèi,疿fèi,屝fèi,廃fèi,費fèi,痱fèi,廢fèi,曊fèi,癈fèi,鼣fèi,濷fèi,櫠fèi,鐨fèi,靅fèi,蕡fèi,芾fèi,笰fèi,紼fèi,髴fèi,柹fèi,胏fèi,镄fèi,吩fēn,帉fēn,纷fēn,芬fēn,昐fēn,氛fēn,竕fēn,紛fēn,翂fēn,棻fēn,躮fēn,酚fēn,鈖fēn,雰fēn,朆fēn,餴fēn,饙fēn,錀fēn,坟fén,妢fén,岎fén,汾fén,枌fén,梤fén,羒fén,蚠fén,蚡fén,棼fén,焚fén,蒶fén,馚fén,隫fén,墳fén,幩fén,魵fén,橨fén,燓fén,豮fén,鼢fén,羵fén,鼖fén,豶fén,轒fén,馩fén,黂fén,鐼fén,粉fěn,瞓fěn,黺fěn,分fèn,份fèn,坋fèn,弅fèn,奋fèn,忿fèn,秎fèn,偾fèn,愤fèn,粪fèn,僨fèn,憤fèn,奮fèn,膹fèn,糞fèn,鲼fèn,瀵fèn,鱝fèn,丰fēng,风fēng,仹fēng,凨fēng,凬fēng,妦fēng,沣fēng,沨fēng,枫fēng,封fēng,疯fēng,盽fēng,砜fēng,風fēng,峯fēng,峰fēng,偑fēng,桻fēng,烽fēng,琒fēng,崶fēng,溄fēng,猦fēng,葑fēng,锋fēng,楓fēng,犎fēng,蜂fēng,瘋fēng,碸fēng,僼fēng,篈fēng,鄷fēng,鋒fēng,檒fēng,豐fēng,鎽fēng,酆fēng,寷fēng,灃fēng,蘴fēng,靊fēng,飌fēng,麷fēng,豊fēng,凮fēng,鏠fēng,冯féng,捀féng,浲féng,逢féng,堸féng,馮féng,綘féng,缝féng,艂féng,縫féng,讽fěng,唪fěng,諷fěng,凤fèng,奉fèng,甮fèng,俸fèng,湗fèng,焨fèng,煈fèng,鳯fèng,鳳fèng,鴌fèng,賵fèng,蘕fèng,赗fèng,覅fiao,仏fó,佛fó,坲fó,梻fó,垺fóu,紑fóu,缶fǒu,否fǒu,缹fǒu,缻fǒu,雬fǒu,鴀fǒu,芣fǒu,夫fū,邞fū,呋fū,姇fū,枎fū,玞fū,肤fū,怤fū,砆fū,胕fū,荂fū,衭fū,娐fū,荴fū,旉fū,紨fū,趺fū,酜fū,麸fū,稃fū,跗fū,鈇fū,筟fū,綒fū,鄜fū,孵fū,豧fū,敷fū,膚fū,鳺fū,麩fū,糐fū,麬fū,麱fū,懯fū,烰fū,琈fū,粰fū,璷fū,伕fú,乀fú,伏fú,凫fú,甶fú,冹fú,刜fú,孚fú,扶fú,芙fú,咈fú,岪fú,彿fú,怫fú,拂fú,服fú,泭fú,绂fú,绋fú,苻fú,俘fú,垘fú,柫fú,氟fú,洑fú,炥fú,玸fú,祓fú,罘fú,茯fú,郛fú,韨fú,鳬fú,哹fú,栿fú,浮fú,畗fú,砩fú,蚨fú,匐fú,桴fú,涪fú,符fú,紱fú,翇fú,艴fú,菔fú,虙fú,袱fú,幅fú,棴fú,罦fú,葍fú,福fú,綍fú,艀fú,蜉fú,辐fú,鉘fú,鉜fú,颫fú,鳧fú,榑fú,稪fú,箙fú,複fú,韍fú,幞fú,澓fú,蝠fú,鴔fú,諨fú,輻fú,鮄fú,癁fú,鮲fú,黻fú,鵩fú,坿fú,汱fú,酻fú,弗fú,畉fú,絥fú,抚fǔ,甫fǔ,府fǔ,弣fǔ,拊fǔ,斧fǔ,俌fǔ,郙fǔ,俯fǔ,釜fǔ,釡fǔ,捬fǔ,辅fǔ,椨fǔ,焤fǔ,盙fǔ,腑fǔ,滏fǔ,腐fǔ,輔fǔ,撫fǔ,鬴fǔ,簠fǔ,黼fǔ,蚥fǔ,窗chuāng,窻chuāng,傸chuǎng,创chuàng,創chuàng,庄zhuāng,妝zhuāng,荘zhuāng,娤zhuāng,桩zhuāng,讣fù,付fù,妇fù,负fù,附fù,咐fù,竎fù,阜fù,驸fù,复fù,峊fù,祔fù,訃fù,負fù,赴fù,袝fù,偩fù,冨fù,副fù,婦fù,蚹fù,傅fù,媍fù,富fù,復fù,蛗fù,覄fù,詂fù,赋fù,椱fù,缚fù,腹fù,鲋fù,禣fù,褔fù,赙fù,緮fù,蕧fù,蝜fù,蝮fù,賦fù,駙fù,縛fù,鮒fù,賻fù,鍑fù,鍢fù,鳆fù,覆fù,馥fù,鰒fù,軵fù,邚fù,柎fù,父fù,萯fù,旮gā,伽gā,嘎gā,夾gā,呷gā,钆gá,尜gá,釓gá,噶gá,錷gá,嘠gá,尕gǎ,玍gǎ,尬gà,魀gà,侅gāi,该gāi,郂gāi,陔gāi,垓gāi,姟gāi,峐gāi,荄gāi,晐gāi,赅gāi,畡gāi,祴gāi,絯gāi,該gāi,豥gāi,賅gāi,賌gāi,忋gǎi,改gǎi,鎅gǎi,絠gǎi,丐gài,乢gài,匃gài,匄gài,钙gài,盖gài,摡gài,溉gài,葢gài,鈣gài,戤gài,概gài,蓋gài,槩gài,槪gài,漑gài,瓂gài,甘gān,忓gān,芉gān,迀gān,攼gān,玕gān,肝gān,坩gān,泔gān,柑gān,竿gān,疳gān,酐gān,粓gān,亁gān,凲gān,尲gān,尴gān,筸gān,漧gān,鳱gān,尶gān,尷gān,魐gān,矸gān,虷gān,釬gān,乹gān,諴gān,飦gān,苷gān,杆gǎn,仠gǎn,皯gǎn,秆gǎn,衦gǎn,赶gǎn,敢gǎn,桿gǎn,笴gǎn,稈gǎn,感gǎn,澉gǎn,趕gǎn,橄gǎn,擀gǎn,簳gǎn,鱤gǎn,篢gǎn,豃gǎn,扞gǎn,鰔gǎn,扜gǎn,鳡gǎn,干gàn,旰gàn,汵gàn,盰gàn,绀gàn,倝gàn,凎gàn,淦gàn,紺gàn,詌gàn,骭gàn,幹gàn,檊gàn,赣gàn,贛gàn,灨gàn,贑gàn,佄gàn,錎gàn,棡gang,冈gāng,罓gāng,冮gāng,刚gāng,阬gāng,纲gāng,肛gāng,岡gāng,牨gāng,疘gāng,矼gāng,钢gāng,剛gāng,罡gāng,堈gāng,釭gāng,犅gāng,堽gāng,綱gāng,罁gāng,鋼gāng,鎠gāng,頏gāng,缸gāng,岗gǎng,崗gǎng,港gǎng,犺gǎng,掆gàng,杠gàng,焵gàng,筻gàng,槓gàng,戆gàng,戇gàng,戅gàng,皋gāo,羔gāo,高gāo,皐gāo,髙gāo,臯gāo,滜gāo,睾gāo,膏gāo,槹gāo,橰gāo,篙gāo,糕gāo,餻gāo,櫜gāo,韟gāo,鷎gāo,鼛gāo,鷱gāo,獋gāo,槔gāo,夰gǎo,杲gǎo,菒gǎo,稁gǎo,搞gǎo,缟gǎo,槀gǎo,槁gǎo,獔gǎo,稾gǎo,稿gǎo,镐gǎo,縞gǎo,藁gǎo,檺gǎo,藳gǎo,鎬gǎo,筶gǎo,澔gǎo,吿gào,勂gào,诰gào,郜gào,峼gào,祮gào,祰gào,锆gào,暠gào,禞gào,誥gào,鋯gào,告gào,戈gē,圪gē,犵gē,纥gē,戓gē,肐gē,牫gē,疙gē,牱gē,紇gē,哥gē,胳gē,袼gē,鸽gē,割gē,搁gē,彁gē,歌gē,戨gē,鴐gē,鴚gē,擱gē,謌gē,鴿gē,鎶gē,咯gē,滒gē,杚gé,呄gé,匌gé,挌gé,阁gé,革gé,敋gé,格gé,鬲gé,愅gé,臵gé,裓gé,隔gé,嗝gé,塥gé,滆gé,觡gé,搿gé,膈gé,閣gé,镉gé,鞈gé,韐gé,骼gé,諽gé,鮯gé,櫊gé,鎘gé,韚gé,轕gé,鞷gé,騔gé,秴gé,詥gé,佫gé,嘅gé,猲gé,槅gé,閤gě,葛gě,哿gě,舸gě,鲄gě,个gè,各gè,虼gè,個gè,硌gè,铬gè,箇gè,鉻gè,獦gè,吤gè,给gěi,給gěi,根gēn,跟gēn,哏gén,亘gèn,艮gèn,茛gèn,揯gèn,搄gèn,亙gèn,刯gēng,庚gēng,畊gēng,浭gēng,耕gēng,掶gēng,菮gēng,椩gēng,焿gēng,絚gēng,赓gēng,鹒gēng,緪gēng,縆gēng,賡gēng,羹gēng,鶊gēng,絙gēng,郠gěng,哽gěng,埂gěng,峺gěng,挭gěng,耿gěng,莄gěng,梗gěng,鲠gěng,骾gěng,鯁gěng,郉gěng,绠gěng,更gèng,堩gèng,暅gèng,啹geu,喼gib,嗰go,工gōng,弓gōng,公gōng,厷gōng,功gōng,攻gōng,杛gōng,糼gōng,肱gōng,宫gōng,宮gōng,恭gōng,蚣gōng,躬gōng,龚gōng,匑gōng,塨gōng,愩gōng,觥gōng,躳gōng,匔gōng,碽gōng,髸gōng,觵gōng,龔gōng,魟gōng,幊gōng,巩gǒng,汞gǒng,拱gǒng,唝gǒng,拲gǒng,栱gǒng,珙gǒng,輁gǒng,鞏gǒng,嗊gǒng,銾gǒng,供gòng,共gòng,贡gòng,羾gòng,貢gòng,慐gòng,熕gòng,渱gòng,勾gōu,沟gōu,钩gōu,袧gōu,缑gōu,鈎gōu,溝gōu,鉤gōu,緱gōu,褠gōu,篝gōu,簼gōu,鞲gōu,冓gōu,搆gōu,抅gōu,泃gōu,軥gōu,鴝gōu,鸜gōu,佝gōu,岣gǒu,狗gǒu,苟gǒu,枸gǒu,玽gǒu,耇gǒu,耉gǒu,笱gǒu,耈gǒu,蚼gǒu,豿gǒu,坸gòu,构gòu,诟gòu,购gòu,垢gòu,姤gòu,够gòu,夠gòu,訽gòu,媾gòu,彀gòu,詬gòu,遘gòu,雊gòu,構gòu,煹gòu,觏gòu,撀gòu,覯gòu,購gòu,傋gòu,茩gòu,估gū,咕gū,姑gū,孤gū,沽gū,泒gū,柧gū,轱gū,唂gū,唃gū,罛gū,鸪gū,笟gū,菇gū,蛄gū,蓇gū,觚gū,軱gū,軲gū,辜gū,酤gū,毂gū,箍gū,箛gū,嫴gū,篐gū,橭gū,鮕gū,鴣gū,轂gū,苽gū,菰gū,鶻gú,鹘gǔ,古gǔ,扢gǔ,汩gǔ,诂gǔ,谷gǔ,股gǔ,峠gǔ,牯gǔ,骨gǔ,罟gǔ,逧gǔ,钴gǔ,傦gǔ,啒gǔ,淈gǔ,脵gǔ,蛊gǔ,蛌gǔ,尳gǔ,愲gǔ,焸gǔ,硲gǔ,詁gǔ,馉gǔ,榾gǔ,鈷gǔ,鼓gǔ,鼔gǔ,嘏gǔ,榖gǔ,皷gǔ,縎gǔ,糓gǔ,薣gǔ,濲gǔ,臌gǔ,餶gǔ,瀔gǔ,瞽gǔ,抇gǔ,嗀gǔ,羖gǔ,固gù,怘gù,故gù,凅gù,顾gù,堌gù,崓gù,崮gù,梏gù,牿gù,棝gù,祻gù,雇gù,痼gù,稒gù,锢gù,頋gù,僱gù,錮gù,鲴gù,鯝gù,顧gù,盬gù,瓜guā,刮guā,胍guā,鸹guā,焻guā,煱guā,颪guā,趏guā,劀guā,緺guā,銽guā,鴰guā,騧guā,呱guā,諣guā,栝guā,歄guā,冎guǎ,叧guǎ,剐guǎ,剮guǎ,啩guǎ,寡guǎ,卦guà,坬guà,诖guà,挂guà,掛guà,罣guà,絓guà,罫guà,褂guà,詿guà,乖guāi,拐guǎi,枴guǎi,柺guǎi,夬guài,叏guài,怪guài,恠guài,关guān,观guān,官guān,覌guān,倌guān,萖guān,棺guān,蒄guān,窤guān,瘝guān,癏guān,観guān,鳏guān,關guān,鰥guān,觀guān,鱞guān,馆guǎn,痯guǎn,筦guǎn,管guǎn,舘guǎn,錧guǎn,館guǎn,躀guǎn,鳤guǎn,輨guǎn,冠guàn,卝guàn,毌guàn,丱guàn,贯guàn,泴guàn,悺guàn,惯guàn,掼guàn,涫guàn,貫guàn,悹guàn,祼guàn,慣guàn,摜guàn,潅guàn,遦guàn,樌guàn,盥guàn,罆guàn,雚guàn,鏆guàn,灌guàn,爟guàn,瓘guàn,矔guàn,鹳guàn,罐guàn,鑵guàn,鸛guàn,鱹guàn,懽guàn,礶guàn,光guāng,灮guāng,侊guāng,炗guāng,炚guāng,炛guāng,咣guāng,垙guāng,姯guāng,洸guāng,茪guāng,桄guāng,烡guāng,珖guāng,胱guāng,硄guāng,僙guāng,輄guāng,銧guāng,黆guāng,欟guāng,趪guāng,挄guāng,广guǎng,広guǎng,犷guǎng,廣guǎng,臩guǎng,獷guǎng,俇guàng,逛guàng,臦guàng,撗guàng,櫎guàng,归guī,圭guī,妫guī,龟guī,规guī,邽guī,皈guī,茥guī,闺guī,帰guī,珪guī,胿guī,亀guī,硅guī,袿guī,規guī,椝guī,瑰guī,郌guī,嫢guī,摫guī,閨guī,鲑guī,嶲guī,槻guī,槼guī,璝guī,瞡guī,膭guī,鮭guī,龜guī,巂guī,歸guī,鬶guī,瓌guī,鬹guī,櫷guī,佹guī,櫰guī,螝guī,槣guī,鴂guī,鴃guī,傀guī,潙guī,雟guī,嬀guī,宄guǐ,氿guǐ,轨guǐ,庋guǐ,匦guǐ,诡guǐ,陒guǐ,垝guǐ,癸guǐ,軌guǐ,鬼guǐ,庪guǐ,匭guǐ,晷guǐ,湀guǐ,蛫guǐ,觤guǐ,詭guǐ,厬guǐ,簋guǐ,蟡guǐ,攱guǐ,朹guǐ,祪guǐ,猤guì,媯guì,刽guì,刿guì,攰guì,昋guì,柜guì,炅guì,贵guì,桂guì,椢guì,筀guì,貴guì,蓕guì,跪guì,瞆guì,劊guì,劌guì,撌guì,槶guì,瞶guì,櫃guì,襘guì,鳜guì,鞼guì,鱖guì,鱥guì,桧guì,絵guì,檜guì,赽guì,趹guì,嶡guì,禬guì,衮gǔn,惃gǔn,绲gǔn,袞gǔn,辊gǔn,滚gǔn,蓘gǔn,滾gǔn,緄gǔn,蔉gǔn,磙gǔn,輥gǔn,鲧gǔn,鮌gǔn,鯀gǔn,琯gùn,棍gùn,棞gùn,睔gùn,睴gùn,璭gùn,謴gùn,呙guō,埚guō,郭guō,啯guō,崞guō,楇guō,聒guō,鈛guō,锅guō,墎guō,瘑guō,嘓guō,彉guō,蝈guō,鍋guō,彍guō,鐹guō,矌guō,簂guó,囯guó,囶guó,囻guó,国guó,圀guó,國guó,帼guó,掴guó,腘guó,幗guó,摑guó,漍guó,聝guó,蔮guó,膕guó,虢guó,馘guó,慖guó,果guǒ,惈guǒ,淉guǒ,猓guǒ,菓guǒ,馃guǒ,椁guǒ,褁guǒ,槨guǒ,粿guǒ,綶guǒ,蜾guǒ,裹guǒ,輠guǒ,餜guǒ,錁guǒ,过guò,過guò,妎hā,铪hā,鉿hā,哈hā,蛤há,孩hái,骸hái,還hái,还hái,海hǎi,胲hǎi,烸hǎi,塰hǎi,酼hǎi,醢hǎi,亥hài,骇hài,害hài,氦hài,嗐hài,餀hài,駭hài,駴hài,嚡hài,饚hài,乤hal,兯han,爳han,顸hān,哻hān,蚶hān,酣hān,谽hān,馠hān,魽hān,鼾hān,欦hān,憨hān,榦hán,邗hán,含hán,邯hán,函hán,咁hán,肣hán,凾hán,唅hán,圅hán,娢hán,浛hán,崡hán,晗hán,梒hán,涵hán,焓hán,寒hán,嵅hán,韩hán,甝hán,筨hán,蜬hán,澏hán,鋡hán,韓hán,馯hán,椷hán,罕hǎn,浫hǎn,喊hǎn,蔊hǎn,鬫hǎn,糮hǎn,厈hǎn,汉hàn,汗hàn,旱hàn,悍hàn,捍hàn,晘hàn,涆hàn,猂hàn,莟hàn,晥hàn,焊hàn,琀hàn,菡hàn,皔hàn,睅hàn,傼hàn,蛿hàn,撖hàn,漢hàn,蜭hàn,暵hàn,熯hàn,銲hàn,鋎hàn,憾hàn,撼hàn,翰hàn,螒hàn,頷hàn,顄hàn,駻hàn,譀hàn,雗hàn,瀚hàn,鶾hàn,澣hàn,颔hàn,魧hāng,苀háng,迒háng,斻háng,杭háng,垳háng,绗háng,笐háng,蚢háng,颃háng,貥háng,筕háng,絎háng,行háng,航háng,沆hàng,茠hāo,蒿hāo,嚆hāo,薅hāo,竓háo,蚝háo,毫háo,椃háo,嗥háo,獆háo,噑háo,豪háo,嘷háo,儫háo,曍háo,嚎háo,壕háo,濠háo,籇háo,蠔háo,譹háo,虠háo,諕háo,呺háo,郝hǎo,好hǎo,号hào,昊hào,昦hào,哠hào,恏hào,悎hào,浩hào,耗hào,晧hào,淏hào,傐hào,皓hào,滈hào,聕hào,號hào,暤hào,暭hào,皜hào,皞hào,皡hào,薃hào,皥hào,颢hào,灏hào,顥hào,鰝hào,灝hào,鄗hào,藃hào,诃hē,呵hē,抲hē,欱hē,喝hē,訶hē,嗬hē,蠚hē,禾hé,合hé,何hé,劾hé,咊hé,和hé,姀hé,河hé,峆hé,曷hé,柇hé,盇hé,籺hé,阂hé,饸hé,哬hé,敆hé,核hé,盉hé,盍hé,啝hé,涸hé,渮hé,盒hé,菏hé,萂hé,龁hé,惒hé,粭hé,訸hé,颌hé,楁hé,鉌hé,阖hé,熆hé,鹖hé,麧hé,澕hé,頜hé,篕hé,翮hé,螛hé,礉hé,闔hé,鞨hé,齕hé,覈hé,鶡hé,皬hé,鑉hé,龢hé,餄hé,荷hé,魺hé,垎hè,贺hè,隺hè,寉hè,焃hè,湼hè,賀hè,嗃hè,煂hè,碋hè,熇hè,褐hè,赫hè,鹤hè,翯hè,壑hè,癋hè,燺hè,爀hè,靍hè,靎hè,鸖hè,靏hè,鶮hè,謞hè,鶴hè,嗨hēi,黒hēi,黑hēi,嘿hēi,潶hēi,嬒hèi,噷hēn,拫hén,痕hén,鞎hén,佷hěn,很hěn,狠hěn,詪hěn,恨hèn,亨hēng,哼hēng,悙hēng,涥hēng,脝hēng,姮héng,恆héng,恒héng,桁héng,烆héng,珩héng,胻héng,横héng,橫héng,衡héng,鴴héng,鵆héng,蘅héng,鑅héng,鸻héng,堼hèng,叿hōng,灴hōng,轰hōng,訇hōng,烘hōng,軣hōng,揈hōng,渹hōng,焢hōng,硡hōng,薨hōng,輷hōng,嚝hōng,鍧hōng,轟hōng,仜hóng,妅hóng,红hóng,吰hóng,宏hóng,汯hóng,玒hóng,纮hóng,闳hóng,宖hóng,泓hóng,玜hóng,苰hóng,垬hóng,娂hóng,洪hóng,竑hóng,紅hóng,荭hóng,虹hóng,浤hóng,紘hóng,翃hóng,耾hóng,硔hóng,紭hóng,谹hóng,鸿hóng,竤hóng,粠hóng,葓hóng,鈜hóng,閎hóng,綋hóng,翝hóng,谼hóng,潂hóng,鉷hóng,鞃hóng,篊hóng,鋐hóng,彋hóng,蕻hóng,霐hóng,黉hóng,霟hóng,鴻hóng,黌hóng,舼hóng,瓨hóng,弘hóng,葒hóng,哄hǒng,晎hǒng,讧hòng,訌hòng,閧hòng,撔hòng,澋hòng,澒hòng,闀hòng,闂hòng,腄hóu,侯hóu,矦hóu,喉hóu,帿hóu,猴hóu,葔hóu,瘊hóu,睺hóu,銗hóu,篌hóu,糇hóu,翭hóu,骺hóu,鍭hóu,餱hóu,鯸hóu,翵hóu,吼hǒu,犼hǒu,呴hǒu,后hòu,郈hòu,厚hòu,垕hòu,後hòu,洉hòu,逅hòu,候hòu,鄇hòu,堠hòu,鲎hòu,鲘hòu,鮜hòu,鱟hòu,豞hòu,鋘hu,乎hū,匢hū,呼hū,垀hū,忽hū,昒hū,曶hū,泘hū,苸hū,烀hū,轷hū,匫hū,唿hū,惚hū,淴hū,虖hū,軤hū,雽hū,嘑hū,寣hū,滹hū,雐hū,歑hū,謼hū,芔hū,戯hū,戱hū,鹄hú,鵠hú,囫hú,弧hú,狐hú,瓳hú,胡hú,壶hú,壷hú,斛hú,焀hú,喖hú,壺hú,媩hú,湖hú,猢hú,絗hú,葫hú,楜hú,煳hú,瑚hú,嘝hú,蔛hú,鹕hú,槲hú,箶hú,糊hú,蝴hú,衚hú,縠hú,螜hú,醐hú,頶hú,觳hú,鍸hú,餬hú,瀫hú,鬍hú,鰗hú,鶘hú,鶦hú,沍hú,礐hú,瓡hú,俿hǔ,虍hǔ,乕hǔ,汻hǔ,虎hǔ,浒hǔ,唬hǔ,萀hǔ,琥hǔ,虝hǔ,滸hǔ,箎hǔ,錿hǔ,鯱hǔ,互hù,弖hù,戶hù,户hù,戸hù,冴hù,芐hù,帍hù,护hù,沪hù,岵hù,怙hù,戽hù,昈hù,枑hù,祜hù,笏hù,粐hù,婟hù,扈hù,瓠hù,綔hù,鄠hù,嫭hù,嫮hù,摢hù,滬hù,蔰hù,槴hù,熩hù,鳸hù,簄hù,鍙hù,護hù,鳠hù,韄hù,頀hù,鱯hù,鸌hù,濩hù,穫hù,觷hù,魱hù,冱hù,鹱hù,花huā,芲huā,埖huā,婲huā,椛huā,硴huā,糀huā,誮huā,錵huā,蘤huā,蕐huā,砉huā,华huá,哗huá,姡huá,骅huá,華huá,铧huá,滑huá,猾huá,嘩huá,撶huá,璍huá,螖huá,鏵huá,驊huá,鷨huá,划huá,化huà,杹huà,画huà,话huà,崋huà,桦huà,婳huà,畫huà,嬅huà,畵huà,觟huà,話huà,劃huà,摦huà,槬huà,樺huà,嫿huà,澅huà,諙huà,黊huà,繣huà,舙huà,蘳huà,譮huà,檴huà,怀huái,淮huái,槐huái,褢huái,踝huái,懐huái,褱huái,懷huái,耲huái,蘹huái,佪huái,徊huái,坏huài,咶huài,壊huài,壞huài,蘾huài,欢huān,歓huān,鴅huān,懁huān,鵍huān,酄huān,嚾huān,獾huān,歡huān,貛huān,讙huān,驩huān,貆huān,环huán,峘huán,洹huán,狟huán,荁huán,桓huán,萈huán,萑huán,堚huán,寏huán,雈huán,綄huán,羦huán,锾huán,阛huán,寰huán,澴huán,缳huán,環huán,豲huán,鍰huán,镮huán,鹮huán,糫huán,繯huán,轘huán,鐶huán,鬟huán,瞏huán,鉮huán,圜huán,闤huán,睆huǎn,缓huǎn,緩huǎn,攌huǎn,幻huàn,奂huàn,肒huàn,奐huàn,宦huàn,唤huàn,换huàn,浣huàn,涣huàn,烉huàn,患huàn,梙huàn,焕huàn,逭huàn,喚huàn,嵈huàn,愌huàn,換huàn,渙huàn,痪huàn,煥huàn,豢huàn,漶huàn,瘓huàn,槵huàn,鲩huàn,擐huàn,瞣huàn,藧huàn,鯇huàn,鯶huàn,鰀huàn,圂huàn,蠸huàn,瑍huàn,巟huāng,肓huāng,荒huāng,衁huāng,塃huāng,慌huāng,皇huáng,偟huáng,凰huáng,隍huáng,黃huáng,黄huáng,喤huáng,堭huáng,媓huáng,崲huáng,徨huáng,湟huáng,葟huáng,遑huáng,楻huáng,煌huáng,瑝huáng,墴huáng,潢huáng,獚huáng,锽huáng,熿huáng,璜huáng,篁huáng,艎huáng,蝗huáng,癀huáng,磺huáng,穔huáng,諻huáng,簧huáng,蟥huáng,鍠huáng,餭huáng,鳇huáng,鐄huáng,騜huáng,鰉huáng,鷬huáng,惶huáng,鱑huáng,怳huǎng,恍huǎng,炾huǎng,宺huǎng,晃huǎng,晄huǎng,奛huǎng,谎huǎng,幌huǎng,愰huǎng,詤huǎng,縨huǎng,謊huǎng,皩huǎng,兤huǎng,滉huàng,榥huàng,曂huàng,皝huàng,鎤huàng,鰴hui,灰huī,灳huī,诙huī,咴huī,恢huī,拻huī,挥huī,虺huī,晖huī,烣huī,珲huī,豗huī,婎huī,媈huī,揮huī,翚huī,辉huī,暉huī,楎huī,琿huī,禈huī,詼huī,幑huī,睳huī,噅huī,噕huī,翬huī,輝huī,麾huī,徽huī,隳huī,瀈huī,洃huī,煇huí,囘huí,回huí,囬huí,廻huí,廽huí,恛huí,洄huí,茴huí,迴huí,烠huí,逥huí,痐huí,蛔huí,蛕huí,蜖huí,鮰huí,藱huí,悔huǐ,毇huǐ,檓huǐ,燬huǐ,譭huǐ,泋huǐ,毁huǐ,烜huǐ,卉huì,屷huì,汇huì,会huì,讳huì,浍huì,绘huì,荟huì,诲huì,恚huì,恵huì,烩huì,贿huì,彗huì,晦huì,秽huì,喙huì,惠huì,缋huì,翙huì,阓huì,匯huì,彙huì,彚huì,會huì,毀huì,滙huì,詯huì,賄huì,嘒huì,蔧huì,誨huì,圚huì,寭huì,慧huì,憓huì,暳huì,槥huì,潓huì,蕙huì,徻huì,橞huì,澮huì,獩huì,璤huì,薈huì,薉huì,諱huì,檅huì,燴huì,篲huì,餯huì,嚖huì,瞺huì,穢huì,繢huì,蟪huì,櫘huì,繪huì,翽huì,譓huì,儶huì,鏸huì,闠huì,孈huì,鐬huì,靧huì,韢huì,譿huì,顪huì,銊huì,叀huì,僡huì,懳huì,昏hūn,昬hūn,荤hūn,婚hūn,惛hūn,涽hūn,阍hūn,惽hūn,棔hūn,葷hūn,睧hūn,閽hūn,焄hūn,蔒hūn,睯hūn,忶hún,浑hún,馄hún,渾hún,魂hún,餛hún,繉hún,轋hún,鼲hún,混hún,梱hún,湷hún,诨hùn,俒hùn,倱hùn,掍hùn,焝hùn,溷hùn,慁hùn,觨hùn,諢hùn,吙huō,耠huō,锪huō,劐huō,鍃huō,豁huō,攉huō,騞huō,搉huō,佸huó,秮huó,活huó,火huǒ,伙huǒ,邩huǒ,钬huǒ,鈥huǒ,夥huǒ,沎huò,或huò,货huò,咟huò,俰huò,捇huò,眓huò,获huò,閄huò,剨huò,掝huò,祸huò,貨huò,惑huò,旤huò,湱huò,禍huò,奯huò,獲huò,霍huò,謋huò,镬huò,嚯huò,瀖huò,耯huò,藿huò,蠖huò,嚿huò,曤huò,臛huò,癨huò,矐huò,鑊huò,靃huò,謔huò,篧huò,擭huò,夻hwa,丌jī,讥jī,击jī,刉jī,叽jī,饥jī,乩jī,圾jī,机jī,玑jī,肌jī,芨jī,矶jī,鸡jī,枅jī,咭jī,剞jī,唧jī,姬jī,屐jī,积jī,笄jī,飢jī,基jī,喞jī,嵆jī,嵇jī,攲jī,敧jī,犄jī,筓jī,缉jī,赍jī,嗘jī,稘jī,跻jī,鳮jī,僟jī,毄jī,箕jī,銈jī,嘰jī,撃jī,樭jī,畿jī,稽jī,緝jī,觭jī,賫jī,躸jī,齑jī,墼jī,憿jī,機jī,激jī,璣jī,禨jī,積jī,錤jī,隮jī,擊jī,磯jī,簊jī,羁jī,賷jī,鄿jī,櫅jī,耭jī,雞jī,譏jī,韲jī,鶏jī,譤jī,鐖jī,癪jī,躋jī,鞿jī,鷄jī,齎jī,羇jī,虀jī,鑇jī,覉jī,鑙jī,齏jī,羈jī,鸄jī,覊jī,庴jī,垍jī,諅jī,踦jī,璂jī,踑jī,谿jī,刏jī,畸jī,簎jí,諔jí,堲jí,蠀jí,亼jí,及jí,吉jí,彶jí,忣jí,汲jí,级jí,即jí,极jí,亟jí,佶jí,郆jí,卽jí,叝jí,姞jí,急jí,狤jí,皍jí,笈jí,級jí,揤jí,疾jí,觙jí,偮jí,卙jí,楖jí,焏jí,脨jí,谻jí,戢jí,棘jí,極jí,湒jí,集jí,塉jí,嫉jí,愱jí,楫jí,蒺jí,蝍jí,趌jí,辑jí,槉jí,耤jí,膌jí,銡jí,嶯jí,潗jí,瘠jí,箿jí,蕀jí,蕺jí,踖jí,鞊jí,鹡jí,橶jí,檝jí,濈jí,螏jí,輯jí,襋jí,蹐jí,艥jí,籍jí,轚jí,鏶jí,霵jí,鶺jí,鷑jí,躤jí,雦jí,雧jí,嵴jí,尐jí,淁jí,吇jí,莋jí,岌jí,殛jí,鍓jí,颳jǐ,几jǐ,己jǐ,丮jǐ,妀jǐ,犱jǐ,泲jǐ,虮jǐ,挤jǐ,脊jǐ,掎jǐ,鱾jǐ,幾jǐ,戟jǐ,麂jǐ,魢jǐ,撠jǐ,擠jǐ,穖jǐ,蟣jǐ,済jǐ,畟jì,迹jì,绩jì,勣jì,彑jì,旡jì,计jì,记jì,伎jì,纪jì,坖jì,妓jì,忌jì,技jì,芰jì,芶jì,际jì,剂jì,季jì,哜jì,峜jì,既jì,洎jì,济jì,紀jì,茍jì,計jì,剤jì,紒jì,继jì,觊jì,記jì,偈jì,寄jì,徛jì,悸jì,旣jì,梞jì,祭jì,萕jì,惎jì,臮jì,葪jì,蔇jì,兾jì,痵jì,継jì,蓟jì,裚jì,跡jì,際jì,墍jì,暨jì,漃jì,漈jì,禝jì,稩jì,穊jì,誋jì,跽jì,霁jì,鲚jì,稷jì,鲫jì,冀jì,劑jì,曁jì,穄jì,縘jì,薊jì,襀jì,髻jì,嚌jì,檕jì,濟jì,繋jì,罽jì,覬jì,鮆jì,檵jì,璾jì,蹟jì,鯽jì,鵋jì,齌jì,廭jì,懻jì,癠jì,穧jì,糭jì,繫jì,骥jì,鯚jì,瀱jì,繼jì,蘮jì,鱀jì,蘻jì,霽jì,鰶jì,鰿jì,鱭jì,驥jì,訐jì,魝jì,櫭jì,帺jì,褀jì,鬾jì,懠jì,蟿jì,汥jì,鯯jì,齍jì,績jì,寂jì,暩jì,蘎jì,筴jiā,加jiā,抸jiā,佳jiā,泇jiā,迦jiā,枷jiā,毠jiā,浃jiā,珈jiā,埉jiā,家jiā,浹jiā,痂jiā,梜jiā,耞jiā,袈jiā,猳jiā,葭jiā,跏jiā,犌jiā,腵jiā,鉫jiā,嘉jiā,镓jiā,糘jiā,豭jiā,貑jiā,鎵jiā,麚jiā,椵jiā,挟jiā,挾jiā,笳jiā,夹jiá,袷jiá,裌jiá,圿jiá,扴jiá,郏jiá,荚jiá,郟jiá,唊jiá,恝jiá,莢jiá,戛jiá,脥jiá,铗jiá,蛱jiá,颊jiá,蛺jiá,跲jiá,鋏jiá,頬jiá,頰jiá,鴶jiá,鵊jiá,忦jiá,戞jiá,岬jiǎ,甲jiǎ,叚jiǎ,玾jiǎ,胛jiǎ,斚jiǎ,贾jiǎ,钾jiǎ,婽jiǎ,徦jiǎ,斝jiǎ,賈jiǎ,鉀jiǎ,榎jiǎ,槚jiǎ,瘕jiǎ,檟jiǎ,夓jiǎ,假jiǎ,价jià,驾jià,架jià,嫁jià,幏jià,榢jià,價jià,稼jià,駕jià,戋jiān,奸jiān,尖jiān,幵jiān,坚jiān,歼jiān,间jiān,冿jiān,戔jiān,肩jiān,艰jiān,姦jiān,姧jiān,兼jiān,监jiān,堅jiān,惤jiān,猏jiān,笺jiān,菅jiān,菺jiān,牋jiān,犍jiān,缄jiān,葌jiān,葏jiān,間jiān,靬jiān,搛jiān,椾jiān,煎jiān,瑊jiān,睷jiān,碊jiān,缣jiān,蒹jiān,監jiān,箋jiān,樫jiān,熞jiān,緘jiān,蕑jiān,蕳jiān,鲣jiān,鳽jiān,鹣jiān,熸jiān,篯jiān,縑jiān,艱jiān,鞬jiān,餰jiān,馢jiān,麉jiān,瀐jiān,鞯jiān,鳒jiān,殱jiān,礛jiān,覸jiān,鵳jiān,瀸jiān,櫼jiān,殲jiān,譼jiān,鰜jiān,鶼jiān,籛jiān,韀jiān,鰹jiān,囏jiān,虃jiān,鑯jiān,韉jiān,揃jiān,鐗jiān,鐧jiān,閒jiān,黚jiān,傔jiān,攕jiān,纎jiān,钘jiān,鈃jiān,銒jiān,籈jiān,湔jiān,囝jiǎn,拣jiǎn,枧jiǎn,俭jiǎn,茧jiǎn,倹jiǎn,挸jiǎn,捡jiǎn,笕jiǎn,减jiǎn,剪jiǎn,帴jiǎn,梘jiǎn,检jiǎn,湕jiǎn,趼jiǎn,揀jiǎn,検jiǎn,減jiǎn,睑jiǎn,硷jiǎn,裥jiǎn,詃jiǎn,锏jiǎn,弿jiǎn,瑐jiǎn,筧jiǎn,简jiǎn,絸jiǎn,谫jiǎn,彅jiǎn,戩jiǎn,碱jiǎn,儉jiǎn,翦jiǎn,撿jiǎn,檢jiǎn,藆jiǎn,襇jiǎn,襉jiǎn,謇jiǎn,蹇jiǎn,瞼jiǎn,礆jiǎn,簡jiǎn,繭jiǎn,謭jiǎn,鬋jiǎn,鰎jiǎn,鹸jiǎn,瀽jiǎn,蠒jiǎn,鹻jiǎn,譾jiǎn,襺jiǎn,鹼jiǎn,堿jiǎn,偂jiǎn,銭jiǎn,醎jiǎn,鹹jiǎn,涀jiǎn,橏jiǎn,柬jiǎn,戬jiǎn,见jiàn,件jiàn,見jiàn,侟jiàn,饯jiàn,剑jiàn,洊jiàn,牮jiàn,荐jiàn,贱jiàn,俴jiàn,健jiàn,剣jiàn,栫jiàn,涧jiàn,珔jiàn,舰jiàn,剱jiàn,徤jiàn,渐jiàn,袸jiàn,谏jiàn,釼jiàn,寋jiàn,旔jiàn,楗jiàn,毽jiàn,溅jiàn,腱jiàn,臶jiàn,葥jiàn,践jiàn,鉴jiàn,键jiàn,僭jiàn,榗jiàn,漸jiàn,劍jiàn,劎jiàn,墹jiàn,澗jiàn,箭jiàn,糋jiàn,諓jiàn,賤jiàn,趝jiàn,踐jiàn,踺jiàn,劒jiàn,劔jiàn,橺jiàn,薦jiàn,諫jiàn,鍵jiàn,餞jiàn,瞯jiàn,瞷jiàn,磵jiàn,礀jiàn,螹jiàn,鍳jiàn,濺jiàn,繝jiàn,瀳jiàn,鏩jiàn,艦jiàn,轞jiàn,鑑jiàn,鑒jiàn,鑬jiàn,鑳jiàn,鐱jiàn,揵jiàn,蔪jiàn,橌jiàn,廴jiàn,譖jiàn,鋻jiàn,建jiàn,賎jiàn,擶jiàn,江jiāng,姜jiāng,将jiāng,茳jiāng,浆jiāng,畕jiāng,豇jiāng,葁jiāng,摪jiāng,翞jiāng,僵jiāng,漿jiāng,螀jiāng,壃jiāng,彊jiāng,缰jiāng,薑jiāng,殭jiāng,螿jiāng,鳉jiāng,疅jiāng,礓jiāng,疆jiāng,繮jiāng,韁jiāng,鱂jiāng,將jiāng,畺jiāng,糡jiāng,橿jiāng,讲jiǎng,奖jiǎng,桨jiǎng,蒋jiǎng,勥jiǎng,奨jiǎng,奬jiǎng,蔣jiǎng,槳jiǎng,獎jiǎng,耩jiǎng,膙jiǎng,講jiǎng,顜jiǎng,塂jiǎng,匞jiàng,匠jiàng,夅jiàng,弜jiàng,杢jiàng,降jiàng,绛jiàng,弶jiàng,袶jiàng,絳jiàng,酱jiàng,摾jiàng,滰jiàng,嵹jiàng,犟jiàng,醤jiàng,糨jiàng,醬jiàng,櫤jiàng,謽jiàng,蔃jiàng,洚jiàng,艽jiāo,芁jiāo,交jiāo,郊jiāo,姣jiāo,娇jiāo,峧jiāo,浇jiāo,茭jiāo,骄jiāo,胶jiāo,椒jiāo,焳jiāo,蛟jiāo,跤jiāo,僬jiāo,嘄jiāo,鲛jiāo,嬌jiāo,嶕jiāo,嶣jiāo,憍jiāo,澆jiāo,膠jiāo,蕉jiāo,燋jiāo,膲jiāo,礁jiāo,穚jiāo,鮫jiāo,鹪jiāo,簥jiāo,蟭jiāo,轇jiāo,鐎jiāo,驕jiāo,鷦jiāo,鷮jiāo,儌jiāo,撟jiāo,挍jiāo,教jiāo,骹jiāo,嫶jiāo,萩jiāo,嘐jiāo,憢jiāo,焦jiāo,櫵jiáo,嚼jiáo,臫jiǎo,佼jiǎo,挢jiǎo,狡jiǎo,绞jiǎo,饺jiǎo,晈jiǎo,笅jiǎo,皎jiǎo,矫jiǎo,脚jiǎo,铰jiǎo,搅jiǎo,筊jiǎo,絞jiǎo,剿jiǎo,勦jiǎo,敫jiǎo,湬jiǎo,煍jiǎo,腳jiǎo,賋jiǎo,摷jiǎo,暞jiǎo,踋jiǎo,鉸jiǎo,劋jiǎo,撹jiǎo,徼jiǎo,敽jiǎo,敿jiǎo,缴jiǎo,曒jiǎo,璬jiǎo,矯jiǎo,皦jiǎo,蟜jiǎo,鵤jiǎo,繳jiǎo,譑jiǎo,孂jiǎo,纐jiǎo,攪jiǎo,灚jiǎo,鱎jiǎo,潐jiǎo,糸jiǎo,蹻jiǎo,釥jiǎo,纟jiǎo,恔jiǎo,角jiǎo,餃jiǎo,叫jiào,呌jiào,訆jiào,珓jiào,轿jiào,较jiào,窖jiào,滘jiào,較jiào,嘂jiào,嘦jiào,斠jiào,漖jiào,酵jiào,噍jiào,噭jiào,嬓jiào,獥jiào,藠jiào,趭jiào,轎jiào,醮jiào,譥jiào,皭jiào,釂jiào,觉jiào,覐jiào,覚jiào,覺jiào,趫jiào,敎jiào,阶jiē,疖jiē,皆jiē,接jiē,掲jiē,痎jiē,秸jiē,菨jiē,喈jiē,嗟jiē,堦jiē,媘jiē,嫅jiē,揭jiē,椄jiē,湝jiē,脻jiē,街jiē,煯jiē,稭jiē,鞂jiē,蝔jiē,擑jiē,癤jiē,鶛jiē,节jiē,節jiē,袓jiē,謯jiē,階jiē,卪jié,孑jié,讦jié,刦jié,刧jié,劫jié,岊jié,昅jié,刼jié,劼jié,疌jié,衱jié,诘jié,拮jié,洁jié,结jié,迼jié,倢jié,桀jié,桝jié,莭jié,偼jié,婕jié,崨jié,捷jié,袺jié,傑jié,媫jié,結jié,蛣jié,颉jié,嵥jié,楬jié,楶jié,滐jié,睫jié,蜐jié,詰jié,截jié,榤jié,碣jié,竭jié,蓵jié,鲒jié,潔jié,羯jié,誱jié,踕jié,頡jié,幯jié,擳jié,嶻jié,擮jié,礍jié,鍻jié,鮚jié,巀jié,蠞jié,蠘jié,蠽jié,洯jié,絜jié,搩jié,杰jié,鉣jié,姐jiě,毑jiě,媎jiě,解jiě,觧jiě,檞jiě,飷jiě,丯jiè,介jiè,岕jiè,庎jiè,戒jiè,芥jiè,屆jiè,届jiè,斺jiè,玠jiè,界jiè,畍jiè,疥jiè,砎jiè,衸jiè,诫jiè,借jiè,蚧jiè,徣jiè,堺jiè,楐jiè,琾jiè,蛶jiè,骱jiè,犗jiè,誡jiè,魪jiè,藉jiè,繲jiè,雃jiè,嶰jiè,唶jiè,褯jiè,巾jīn,今jīn,斤jīn,钅jīn,兓jīn,金jīn,釒jīn,津jīn,矜jīn,砛jīn,荕jīn,衿jīn,觔jīn,埐jīn,珒jīn,紟jīn,惍jīn,琎jīn,堻jīn,琻jīn,筋jīn,嶜jīn,璡jīn,鹶jīn,黅jīn,襟jīn,濜jīn,仅jǐn,巹jǐn,紧jǐn,堇jǐn,菫jǐn,僅jǐn,厪jǐn,谨jǐn,锦jǐn,嫤jǐn,廑jǐn,漌jǐn,緊jǐn,蓳jǐn,馑jǐn,槿jǐn,瑾jǐn,錦jǐn,謹jǐn,饉jǐn,儘jǐn,婜jǐn,斳jǐn,卺jǐn,笒jìn,盡jìn,劤jìn,尽jìn,劲jìn,妗jìn,近jìn,进jìn,侭jìn,枃jìn,勁jìn,荩jìn,晉jìn,晋jìn,浸jìn,烬jìn,赆jìn,祲jìn,進jìn,煡jìn,缙jìn,寖jìn,搢jìn,溍jìn,禁jìn,靳jìn,墐jìn,慬jìn,瑨jìn,僸jìn,凚jìn,歏jìn,殣jìn,觐jìn,噤jìn,濅jìn,縉jìn,賮jìn,嚍jìn,壗jìn,藎jìn,燼jìn,璶jìn,覲jìn,贐jìn,齽jìn,馸jìn,臸jìn,浕jìn,嬧jìn,坕jīng,坙jīng,巠jīng,京jīng,泾jīng,经jīng,茎jīng,亰jīng,秔jīng,荆jīng,荊jīng,涇jīng,莖jīng,婛jīng,惊jīng,旌jīng,旍jīng,猄jīng,経jīng,菁jīng,晶jīng,稉jīng,腈jīng,粳jīng,經jīng,兢jīng,精jīng,聙jīng,橸jīng,鲸jīng,鵛jīng,鯨jīng,鶁jīng,麖jīng,鼱jīng,驚jīng,麠jīng,徑jīng,仱jīng,靑jīng,睛jīng,井jǐng,阱jǐng,刭jǐng,坓jǐng,宑jǐng,汫jǐng,汬jǐng,肼jǐng,剄jǐng,穽jǐng,颈jǐng,景jǐng,儆jǐng,幜jǐng,璄jǐng,憼jǐng,暻jǐng,燝jǐng,璟jǐng,璥jǐng,頸jǐng,蟼jǐng,警jǐng,擏jǐng,憬jǐng,妌jìng,净jìng,弪jìng,径jìng,迳jìng,浄jìng,胫jìng,凈jìng,弳jìng,痉jìng,竞jìng,逕jìng,婙jìng,婧jìng,桱jìng,梷jìng,淨jìng,竫jìng,脛jìng,敬jìng,痙jìng,竧jìng,傹jìng,靖jìng,境jìng,獍jìng,誩jìng,静jìng,頚jìng,曔jìng,镜jìng,靜jìng,瀞jìng,鏡jìng,競jìng,竸jìng,葝jìng,儬jìng,陘jìng,竟jìng,冋jiōng,扃jiōng,埛jiōng,絅jiōng,駉jiōng,駫jiōng,冏jiōng,浻jiōng,扄jiōng,銄jiōng,囧jiǒng,迥jiǒng,侰jiǒng,炯jiǒng,逈jiǒng,烱jiǒng,煚jiǒng,窘jiǒng,颎jiǒng,綗jiǒng,僒jiǒng,煛jiǒng,熲jiǒng,澃jiǒng,燛jiǒng,褧jiǒng,顈jiǒng,蘔jiǒng,宭jiǒng,蘏jiǒng,丩jiū,勼jiū,纠jiū,朻jiū,究jiū,糺jiū,鸠jiū,赳jiū,阄jiū,萛jiū,啾jiū,揪jiū,揫jiū,鳩jiū,摎jiū,鬏jiū,鬮jiū,稵jiū,糾jiū,九jiǔ,久jiǔ,乆jiǔ,乣jiǔ,奺jiǔ,汣jiǔ,杦jiǔ,灸jiǔ,玖jiǔ,舏jiǔ,韭jiǔ,紤jiǔ,酒jiǔ,镹jiǔ,韮jiǔ,匛jiù,旧jiù,臼jiù,疚jiù,柩jiù,柾jiù,倃jiù,桕jiù,厩jiù,救jiù,就jiù,廄jiù,匓jiù,舅jiù,僦jiù,廏jiù,廐jiù,慦jiù,殧jiù,舊jiù,鹫jiù,麔jiù,匶jiù,齨jiù,鷲jiù,咎jiù,欍jou,鶪ju,伡jū,俥jū,凥jū,匊jū,居jū,狙jū,苴jū,驹jū,倶jū,挶jū,捄jū,疽jū,痀jū,眗jū,砠jū,罝jū,陱jū,娵jū,婅jū,婮jū,崌jū,掬jū,梮jū,涺jū,椐jū,琚jū,腒jū,趄jū,跔jū,锔jū,裾jū,雎jū,艍jū,蜛jū,踘jū,鋦jū,駒jū,鮈jū,鴡jū,鞠jū,鞫jū,鶋jū,臄jū,揟jū,拘jū,諊jū,局jú,泦jú,侷jú,狊jú,桔jú,毩jú,淗jú,焗jú,菊jú,郹jú,椈jú,毱jú,湨jú,犑jú,輂jú,粷jú,蓻jú,趜jú,躹jú,閰jú,檋jú,駶jú,鵙jú,蹫jú,鵴jú,巈jú,蘜jú,鼰jú,鼳jú,驧jú,趉jú,郥jú,橘jú,咀jǔ,弆jǔ,沮jǔ,举jǔ,矩jǔ,莒jǔ,挙jǔ,椇jǔ,筥jǔ,榉jǔ,榘jǔ,蒟jǔ,龃jǔ,聥jǔ,舉jǔ,踽jǔ,擧jǔ,櫸jǔ,齟jǔ,襷jǔ,籧jǔ,郰jǔ,欅jǔ,句jù,巨jù,讵jù,姖jù,岠jù,怇jù,拒jù,洰jù,苣jù,邭jù,具jù,怚jù,拠jù,昛jù,歫jù,炬jù,秬jù,钜jù,俱jù,倨jù,冣jù,剧jù,粔jù,耟jù,蚷jù,埧jù,埾jù,惧jù,詎jù,距jù,焣jù,犋jù,跙jù,鉅jù,飓jù,虡jù,豦jù,锯jù,愳jù,窭jù,聚jù,駏jù,劇jù,勮jù,屦jù,踞jù,鮔jù,壉jù,懅jù,據jù,澽jù,遽jù,鋸jù,屨jù,颶jù,簴jù,躆jù,醵jù,懼jù,鐻jù,爠jù,坥jù,螶jù,忂jù,葅jù,蒩jù,珇jù,据jù,姢juān,娟juān,捐juān,涓juān,脧juān,裐juān,鹃juān,勬juān,鋑juān,鋗juān,镌juān,鎸juān,鵑juān,鐫juān,蠲juān,勌juān,瓹juān,梋juān,鞙juān,朘juān,呟juǎn,帣juǎn,埍juǎn,捲juǎn,菤juǎn,锩juǎn,臇juǎn,錈juǎn,埢juǎn,踡juǎn,蕋juǎn,卷juàn,劵juàn,弮juàn,倦juàn,桊juàn,狷juàn,绢juàn,淃juàn,眷juàn,鄄juàn,睊juàn,絭juàn,罥juàn,睠juàn,絹juàn,慻juàn,蔨juàn,餋juàn,獧juàn,羂juàn,圏juàn,棬juàn,惓juàn,韏juàn,讂juàn,縳juàn,襈juàn,奆juàn,噘juē,撅juē,撧juē,屩juē,屫juē,繑juē,亅jué,孓jué,决jué,刔jué,氒jué,诀jué,抉jué,決jué,芵jué,泬jué,玦jué,玨jué,挗jué,珏jué,砄jué,绝jué,虳jué,捔jué,欮jué,蚗jué,崛jué,掘jué,斍jué,桷jué,殌jué,焆jué,觖jué,逫jué,傕jué,厥jué,絕jué,絶jué,鈌jué,劂jué,勪jué,瑴jué,谲jué,嶥jué,憰jué,潏jué,熦jué,爴jué,獗jué,瘚jué,蕝jué,蕨jué,憠jué,橛jué,镼jué,爵jué,镢jué,蟨jué,蟩jué,爑jué,譎jué,蹷jué,鶌jué,矍jué,鐝jué,灍jué,爝jué,觼jué,彏jué,戄jué,攫jué,玃jué,鷢jué,欔jué,矡jué,龣jué,貜jué,躩jué,钁jué,璚jué,匷jué,啳jué,吷jué,疦jué,弡jué,穱jué,孒jué,訣jué,橜jué,蹶juě,倔juè,誳juè,君jūn,均jūn,汮jūn,姰jūn,袀jūn,軍jūn,钧jūn,莙jūn,蚐jūn,桾jūn,皲jūn,菌jūn,鈞jūn,碅jūn,筠jūn,皸jūn,皹jūn,覠jūn,銁jūn,銞jūn,鲪jūn,麇jūn,鍕jūn,鮶jūn,麏jūn,麕jūn,军jūn,隽jùn,雋jùn,呁jùn,俊jùn,郡jùn,陖jùn,峻jùn,捃jùn,晙jùn,馂jùn,骏jùn,焌jùn,珺jùn,畯jùn,竣jùn,箘jùn,箟jùn,蜠jùn,儁jùn,寯jùn,懏jùn,餕jùn,燇jùn,駿jùn,鵔jùn,鵕jùn,鵘jùn,葰jùn,埈jùn,咔kā,咖kā,喀kā,衉kā,哢kā,呿kā,卡kǎ,佧kǎ,垰kǎ,裃kǎ,鉲kǎ,胩kǎ,开kāi,奒kāi,揩kāi,锎kāi,開kāi,鐦kāi,凯kǎi,剀kǎi,垲kǎi,恺kǎi,闿kǎi,铠kǎi,凱kǎi,慨kǎi,蒈kǎi,塏kǎi,愷kǎi,楷kǎi,輆kǎi,暟kǎi,锴kǎi,鍇kǎi,鎧kǎi,闓kǎi,颽kǎi,喫kài,噄kài,忾kài,烗kài,勓kài,愾kài,鎎kài,愒kài,欯kài,炌kài,乫kal,刊kān,栞kān,勘kān,龛kān,堪kān,嵁kān,戡kān,龕kān,槛kǎn,檻kǎn,冚kǎn,坎kǎn,侃kǎn,砍kǎn,莰kǎn,偘kǎn,埳kǎn,惂kǎn,欿kǎn,塪kǎn,輡kǎn,竷kǎn,轗kǎn,衎kǎn,看kàn,崁kàn,墈kàn,阚kàn,瞰kàn,磡kàn,闞kàn,矙kàn,輱kàn,忼kāng,砊kāng,粇kāng,康kāng,嫝kāng,嵻kāng,慷kāng,漮kāng,槺kāng,穅kāng,糠kāng,躿kāng,鏮kāng,鱇kāng,闶kāng,閌kāng,扛káng,摃káng,亢kàng,伉kàng,匟kàng,囥kàng,抗kàng,炕kàng,钪kàng,鈧kàng,邟kàng,尻kāo,髛kāo,嵪kāo,訄kāo,薧kǎo,攷kǎo,考kǎo,拷kǎo,洘kǎo,栲kǎo,烤kǎo,铐kào,犒kào,銬kào,鲓kào,靠kào,鮳kào,鯌kào,焅kào,屙kē,蚵kē,苛kē,柯kē,牁kē,珂kē,胢kē,轲kē,疴kē,趷kē,钶kē,嵙kē,棵kē,痾kē,萪kē,軻kē,颏kē,犐kē,稞kē,窠kē,鈳kē,榼kē,薖kē,颗kē,樖kē,瞌kē,磕kē,蝌kē,頦kē,醘kē,顆kē,髁kē,礚kē,嗑kē,窼kē,簻kē,科kē,壳ké,咳ké,揢ké,翗ké,嶱ké,殼ké,毼kě,磆kě,坷kě,可kě,岢kě,炣kě,渇kě,嵑kě,敤kě,渴kě,袔kè,悈kè,歁kè,克kè,刻kè,剋kè,勀kè,勊kè,客kè,恪kè,娔kè,尅kè,课kè,堁kè,氪kè,骒kè,缂kè,愙kè,溘kè,锞kè,碦kè,課kè,礊kè,騍kè,硞kè,艐kè,緙kè,肎kěn,肯kěn,肻kěn,垦kěn,恳kěn,啃kěn,豤kěn,貇kěn,墾kěn,錹kěn,懇kěn,頎kěn,掯kèn,裉kèn,褃kèn,硍kèn,妔kēng,踁kēng,劥kēng,吭kēng,坈kēng,坑kēng,挳kēng,硁kēng,牼kēng,硜kēng,铿kēng,硻kēng,誙kēng,銵kēng,鏗kēng,摼kēng,殸kēng,揁kēng,鍞kēng,巪keo,乬keol,唟keos,厼keum,怾ki,空kōng,倥kōng,埪kōng,崆kōng,悾kōng,硿kōng,箜kōng,躻kōng,錓kōng,鵼kōng,椌kōng,宆kōng,孔kǒng,恐kǒng,控kòng,鞚kòng,羫kòng,廤kos,抠kōu,芤kōu,眍kōu,剾kōu,彄kōu,摳kōu,瞘kōu,劶kǒu,竘kǒu,口kǒu,叩kòu,扣kòu,怐kòu,敂kòu,冦kòu,宼kòu,寇kòu,釦kòu,窛kòu,筘kòu,滱kòu,蔲kòu,蔻kòu,瞉kòu,簆kòu,鷇kòu,搰kū,刳kū,矻kū,郀kū,枯kū,哭kū,桍kū,堀kū,崫kū,圐kū,跍kū,窟kū,骷kū,泏kū,窋kū,狜kǔ,苦kǔ,楛kǔ,齁kù,捁kù,库kù,俈kù,绔kù,庫kù,秙kù,袴kù,喾kù,絝kù,裤kù,瘔kù,酷kù,褲kù,嚳kù,鮬kù,恗kuā,夸kuā,姱kuā,晇kuā,舿kuā,誇kuā,侉kuǎ,咵kuǎ,垮kuǎ,銙kuǎ,顝kuǎ,挎kuà,胯kuà,跨kuà,骻kuà,擓kuai,蒯kuǎi,璯kuài,駃kuài,巜kuài,凷kuài,圦kuài,块kuài,快kuài,侩kuài,郐kuài,哙kuài,狯kuài,脍kuài,塊kuài,筷kuài,鲙kuài,儈kuài,鄶kuài,噲kuài,廥kuài,獪kuài,膾kuài,旝kuài,糩kuài,鱠kuài,蕢kuài,宽kuān,寛kuān,寬kuān,髋kuān,鑧kuān,髖kuān,欵kuǎn,款kuǎn,歀kuǎn,窽kuǎn,窾kuǎn,梡kuǎn,匡kuāng,劻kuāng,诓kuāng,邼kuāng,匩kuāng,哐kuāng,恇kuāng,洭kuāng,筐kuāng,筺kuāng,誆kuāng,軭kuāng,狂kuáng,狅kuáng,诳kuáng,軖kuáng,軠kuáng,誑kuáng,鵟kuáng,夼kuǎng,儣kuǎng,懭kuǎng,爌kuǎng,邝kuàng,圹kuàng,况kuàng,旷kuàng,岲kuàng,況kuàng,矿kuàng,昿kuàng,贶kuàng,框kuàng,眖kuàng,砿kuàng,眶kuàng,絋kuàng,絖kuàng,貺kuàng,軦kuàng,鉱kuàng,鋛kuàng,鄺kuàng,壙kuàng,黋kuàng,懬kuàng,曠kuàng,礦kuàng,穬kuàng,纊kuàng,鑛kuàng,纩kuàng,亏kuī,刲kuī,悝kuī,盔kuī,窥kuī,聧kuī,窺kuī,虧kuī,闚kuī,巋kuī,蘬kuī,岿kuī,奎kuí,晆kuí,逵kuí,鄈kuí,頄kuí,馗kuí,喹kuí,揆kuí,葵kuí,骙kuí,戣kuí,暌kuí,楏kuí,楑kuí,魁kuí,睽kuí,蝰kuí,頯kuí,櫆kuí,藈kuí,鍷kuí,騤kuí,夔kuí,蘷kuí,虁kuí,躨kuí,鍨kuí,卼kuǐ,煃kuǐ,跬kuǐ,頍kuǐ,蹞kuǐ,尯kuǐ,匮kuì,欳kuì,喟kuì,媿kuì,愦kuì,愧kuì,溃kuì,蒉kuì,馈kuì,匱kuì,嘳kuì,嬇kuì,憒kuì,潰kuì,聩kuì,聭kuì,樻kuì,殨kuì,餽kuì,簣kuì,聵kuì,籄kuì,鐀kuì,饋kuì,鑎kuì,篑kuì,坤kūn,昆kūn,晜kūn,堃kūn,堒kūn,婫kūn,崐kūn,崑kūn,猑kūn,菎kūn,裈kūn,焜kūn,琨kūn,髠kūn,裩kūn,锟kūn,髡kūn,尡kūn,潉kūn,蜫kūn,褌kūn,髨kūn,熴kūn,瑻kūn,醌kūn,錕kūn,鲲kūn,臗kūn,騉kūn,鯤kūn,鵾kūn,鶤kūn,鹍kūn,悃kǔn,捆kǔn,阃kǔn,壸kǔn,祵kǔn,硱kǔn,稇kǔn,裍kǔn,壼kǔn,稛kǔn,綑kǔn,閫kǔn,閸kǔn,困kùn,睏kùn,涃kùn,秳kuò,漷kuò,扩kuò,拡kuò,括kuò,桰kuò,筈kuò,萿kuò,葀kuò,蛞kuò,阔kuò,廓kuò,頢kuò,擴kuò,濶kuò,闊kuò,鞟kuò,韕kuò,懖kuò,霩kuò,鞹kuò,鬠kuò,穒kweok,鞡la,垃lā,拉lā,柆lā,啦lā,菈lā,搚lā,邋lā,磖lā,翋lā,旯lá,砬lá,揦lá,喇lǎ,藞lǎ,嚹lǎ,剌là,溂là,腊là,揧là,楋là,瘌là,牎chuāng,床chuáng,漺chuǎng,怆chuàng,愴chuàng,莊zhuāng,粧zhuāng,装zhuāng,裝zhuāng,樁zhuāng,蜡là,蝋là,辢là,辣là,蝲là,臈là,攋là,爉là,臘là,鬎là,櫴là,瓎là,镴là,鯻là,鑞là,儠là,擸là,鱲là,蠟là,来lái,來lái,俫lái,倈lái,崃lái,徕lái,涞lái,莱lái,郲lái,婡lái,崍lái,庲lái,徠lái,梾lái,淶lái,猍lái,萊lái,逨lái,棶lái,琜lái,筙lái,铼lái,箂lái,錸lái,騋lái,鯠lái,鶆lái,麳lái,顂lái,勑lài,誺lài,赉lài,睐lài,睞lài,赖lài,賚lài,濑lài,賴lài,頼lài,癞lài,鵣lài,瀨lài,瀬lài,籁lài,藾lài,癩lài,襰lài,籟lài,唻lài,暕lán,兰lán,岚lán,拦lán,栏lán,婪lán,嵐lán,葻lán,阑lán,蓝lán,谰lán,厱lán,褴lán,儖lán,斓lán,篮lán,懢lán,燣lán,藍lán,襕lán,镧lán,闌lán,璼lán,襤lán,譋lán,幱lán,攔lán,瀾lán,灆lán,籃lán,繿lán,蘭lán,斕lán,欄lán,礷lán,襴lán,囒lán,灡lán,籣lán,欗lán,讕lán,躝lán,鑭lán,钄lán,韊lán,惏lán,澜lán,襽lán,览lǎn,浨lǎn,揽lǎn,缆lǎn,榄lǎn,漤lǎn,罱lǎn,醂lǎn,壈lǎn,懒lǎn,覧lǎn,擥lǎn,懶lǎn,孄lǎn,覽lǎn,孏lǎn,攬lǎn,欖lǎn,爦lǎn,纜lǎn,灠lǎn,顲lǎn,蘫làn,嬾làn,烂làn,滥làn,燗làn,嚂làn,壏làn,濫làn,爛làn,爤làn,瓓làn,糷làn,湅làn,煉làn,爁làn,唥lang,啷lāng,羮láng,勆láng,郎láng,郞láng,欴láng,狼láng,嫏láng,廊láng,桹láng,琅láng,蓈láng,榔láng,瑯láng,硠láng,稂láng,锒láng,筤láng,艆láng,蜋láng,郒láng,螂láng,躴láng,鋃láng,鎯láng,阆láng,閬láng,哴láng,悢lǎng,朗lǎng,朖lǎng,烺lǎng,塱lǎng,蓢lǎng,樃lǎng,誏lǎng,朤lǎng,俍lǎng,脼lǎng,莨làng,埌làng,浪làng,蒗làng,捞lāo,粩lāo,撈lāo,劳láo,労láo,牢láo,窂láo,哰láo,崂láo,浶láo,勞láo,痨láo,僗láo,嶗láo,憥láo,朥láo,癆láo,磱láo,簩láo,蟧láo,醪láo,鐒láo,顟láo,髝láo,轑láo,嫪láo,憦láo,铹láo,耂lǎo,老lǎo,佬lǎo,咾lǎo,姥lǎo,恅lǎo,荖lǎo,栳lǎo,珯lǎo,硓lǎo,铑lǎo,蛯lǎo,銠lǎo,橑lǎo,鮱lǎo,唠lào,嘮lào,烙lào,嗠lào,耢lào,酪lào,澇lào,橯lào,耮lào,軂lào,涝lào,饹le,了le,餎le,牞lè,仂lè,阞lè,乐lè,叻lè,忇lè,扐lè,氻lè,艻lè,玏lè,泐lè,竻lè,砳lè,勒lè,楽lè,韷lè,樂lè,簕lè,鳓lè,鰳lè,頛lei,嘞lei,雷léi,嫘léi,缧léi,蔂léi,樏léi,畾léi,檑léi,縲léi,镭léi,櫑léi,瓃léi,羸léi,礧léi,罍léi,蘲léi,鐳léi,轠léi,壨léi,鑘léi,靁léi,虆léi,鱩léi,欙léi,纝léi,鼺léi,磥léi,攂léi,腂lěi,瘣lěi,厽lěi,耒lěi,诔lěi,垒lěi,絫lěi,傫lěi,誄lěi,磊lěi,蕌lěi,蕾lěi,儡lěi,壘lěi,癗lěi,藟lěi,櫐lěi,矋lěi,礨lěi,灅lěi,蠝lěi,蘽lěi,讄lěi,儽lěi,鑸lěi,鸓lěi,洡lěi,礌lěi,塁lěi,纍lèi,肋lèi,泪lèi,类lèi,涙lèi,淚lèi,累lèi,酹lèi,銇lèi,頪lèi,擂lèi,錑lèi,颣lèi,類lèi,纇lèi,蘱lèi,禷lèi,祱lèi,塄léng,棱léng,楞léng,碐léng,稜léng,踜léng,薐léng,輘léng,冷lěng,倰lèng,堎lèng,愣lèng,睖lèng,瓈li,唎lī,粚lí,刕lí,厘lí,剓lí,梨lí,狸lí,荲lí,骊lí,悡lí,梸lí,犁lí,菞lí,喱lí,棃lí,犂lí,鹂lí,剺lí,漓lí,睝lí,筣lí,缡lí,艃lí,蓠lí,蜊lí,嫠lí,孷lí,樆lí,璃lí,盠lí,竰lí,氂lí,犛lí,糎lí,蔾lí,鋫lí,鲡lí,黎lí,篱lí,縭lí,罹lí,錅lí,蟍lí,謧lí,醨lí,嚟lí,藜lí,邌lí,釐lí,離lí,鯏lí,鏫lí,鯬lí,鵹lí,黧lí,囄lí,灕lí,蘺lí,蠡lí,蠫lí,孋lí,廲lí,劙lí,鑗lí,籬lí,驪lí,鱺lí,鸝lí,婯lí,儷lí,矖lí,纚lí,离lí,褵lí,穲lí,礼lǐ,李lǐ,里lǐ,俚lǐ,峛lǐ,哩lǐ,娌lǐ,峲lǐ,浬lǐ,逦lǐ,理lǐ,裡lǐ,锂lǐ,粴lǐ,裏lǐ,鋰lǐ,鲤lǐ,澧lǐ,禮lǐ,鯉lǐ,蟸lǐ,醴lǐ,鳢lǐ,邐lǐ,鱧lǐ,欐lǐ,欚lǐ,銐lì,脷lì,莉lì,力lì,历lì,厉lì,屴lì,立lì,吏lì,朸lì,丽lì,利lì,励lì,呖lì,坜lì,沥lì,苈lì,例lì,岦lì,戾lì,枥lì,沴lì,疠lì,苙lì,隶lì,俐lì,俪lì,栃lì,栎lì,疬lì,砅lì,茘lì,荔lì,轹lì,郦lì,娳lì,悧lì,栗lì,栛lì,栵lì,涖lì,猁lì,珕lì,砺lì,砾lì,秝lì,莅lì,唳lì,悷lì,琍lì,笠lì,粒lì,粝lì,蚸lì,蛎lì,傈lì,凓lì,厤lì,棙lì,痢lì,蛠lì,詈lì,雳lì,塛lì,慄lì,搮lì,溧lì,蒚lì,蒞lì,鉝lì,鳨lì,厯lì,厲lì,暦lì,歴lì,瑮lì,綟lì,蜧lì,勵lì,曆lì,歷lì,篥lì,隷lì,鴗lì,巁lì,檪lì,濿lì,癘lì,磿lì,隸lì,鬁lì,儮lì,櫔lì,爄lì,犡lì,禲lì,蠇lì,嚦lì,壢lì,攊lì,櫟lì,瀝lì,瓅lì,礪lì,藶lì,麗lì,櫪lì,爏lì,瓑lì,皪lì,盭lì,礫lì,糲lì,蠣lì,癧lì,礰lì,酈lì,鷅lì,麜lì,囇lì,攦lì,轢lì,讈lì,轣lì,攭lì,瓥lì,靂lì,鱱lì,靋lì,觻lì,鱳lì,叓lì,蝷lì,赲lì,曞lì,嫾liān,奁lián,连lián,帘lián,怜lián,涟lián,莲lián,連lián,梿lián,联lián,裢lián,亷lián,嗹lián,廉lián,慩lián,溓lián,漣lián,蓮lián,奩lián,熑lián,覝lián,劆lián,匳lián,噒lián,憐lián,磏lián,聨lián,聫lián,褳lián,鲢lián,濂lián,濓lián,縺lián,翴lián,聮lián,薕lián,螊lián,櫣lián,燫lián,聯lián,臁lián,蹥lián,謰lián,鎌lián,镰lián,簾lián,蠊lián,譧lián,鐮lián,鰱lián,籢lián,籨lián,槤lián,僆lián,匲lián,鬑lián,敛liǎn,琏liǎn,脸liǎn,裣liǎn,摙liǎn,璉liǎn,蔹liǎn,嬚liǎn,斂liǎn,歛liǎn,臉liǎn,鄻liǎn,襝liǎn,羷liǎn,蘝liǎn,蘞liǎn,薟liǎn,练liàn,炼liàn,恋liàn,浰liàn,殓liàn,堜liàn,媡liàn,链liàn,楝liàn,瑓liàn,潋liàn,稴liàn,練liàn,澰liàn,錬liàn,殮liàn,鍊liàn,鏈liàn,瀲liàn,鰊liàn,戀liàn,纞liàn,孌liàn,攣liàn,萰liàn,簗liāng,良liáng,凉liáng,梁liáng,涼liáng,椋liáng,辌liáng,粮liáng,粱liáng,墚liáng,綡liáng,輬liáng,糧liáng,駺liáng,樑liáng,冫liǎng,俩liǎng,倆liǎng,両liǎng,两liǎng,兩liǎng,唡liǎng,啢liǎng,掚liǎng,裲liǎng,緉liǎng,蜽liǎng,魉liǎng,魎liǎng,倞liàng,靓liàng,靚liàng,踉liàng,亮liàng,谅liàng,辆liàng,喨liàng,晾liàng,湸liàng,量liàng,煷liàng,輌liàng,諒liàng,輛liàng,鍄liàng,蹽liāo,樛liáo,潦liáo,辽liáo,疗liáo,僚liáo,寥liáo,嵺liáo,憀liáo,漻liáo,膋liáo,嘹liáo,嫽liáo,寮liáo,嶚liáo,嶛liáo,憭liáo,撩liáo,敹liáo,獠liáo,缭liáo,遼liáo,暸liáo,燎liáo,璙liáo,窷liáo,膫liáo,療liáo,竂liáo,鹩liáo,屪liáo,廫liáo,簝liáo,蟟liáo,豂liáo,賿liáo,蹘liáo,爎liáo,髎liáo,飉liáo,鷯liáo,镽liáo,尞liáo,镠liáo,鏐liáo,僇liáo,聊liáo,繚liáo,钌liǎo,釕liǎo,鄝liǎo,蓼liǎo,爒liǎo,瞭liǎo,廖liào,镣liào,鐐liào,尥liào,炓liào,料liào,撂liào,蟉liào,鴷lie,咧liě,毟liě,挘liě,埓liě,忚liě,列liè,劣liè,冽liè,姴liè,峢liè,挒liè,洌liè,茢liè,迾liè,埒liè,浖liè,烈liè,烮liè,捩liè,猎liè,猟liè,脟liè,蛚liè,裂liè,煭liè,睙liè,聗liè,趔liè,巤liè,颲liè,鮤liè,獵liè,犣liè,躐liè,鬛liè,哷liè,劦liè,奊liè,劽liè,鬣liè,拎līn,邻lín,林lín,临lín,啉lín,崊lín,淋lín,晽lín,琳lín,粦lín,痳lín,碄lín,箖lín,粼lín,鄰lín,隣lín,嶙lín,潾lín,獜lín,遴lín,斴lín,暽lín,燐lín,璘lín,辚lín,霖lín,瞵lín,磷lín,繗lín,翷lín,麐lín,轔lín,壣lín,瀶lín,鏻lín,鳞lín,驎lín,麟lín,鱗lín,疄lín,蹸lín,魿lín,涁lín,臨lín,菻lǐn,亃lǐn,僯lǐn,凛lǐn,凜lǐn,撛lǐn,廩lǐn,廪lǐn,懍lǐn,懔lǐn,澟lǐn,檁lǐn,檩lǐn,伈lǐn,吝lìn,恡lìn,赁lìn,焛lìn,賃lìn,蔺lìn,橉lìn,甐lìn,膦lìn,閵lìn,藺lìn,躏lìn,躙lìn,躪lìn,轥lìn,悋lìn,伶líng,刢líng,灵líng,囹líng,坽líng,夌líng,姈líng,岺líng,彾líng,泠líng,狑líng,苓líng,昤líng,柃líng,玲líng,瓴líng,凌líng,皊líng,砱líng,秢líng,竛líng,铃líng,陵líng,鸰líng,婈líng,崚líng,掕líng,棂líng,淩líng,琌líng,笭líng,紷líng,绫líng,羚líng,翎líng,聆líng,舲líng,菱líng,蛉líng,衑líng,祾líng,詅líng,跉líng,蓤líng,裬líng,鈴líng,閝líng,零líng,龄líng,綾líng,蔆líng,霊líng,駖líng,澪líng,蕶líng,錂líng,霗líng,鲮líng,鴒líng,鹷líng,燯líng,霛líng,霝líng,齢líng,瀮líng,酃líng,鯪líng,孁líng,蘦líng,齡líng,櫺líng,靈líng,欞líng,爧líng,麢líng,龗líng,阾líng,袊líng,靇líng,朎líng,軨líng,醽líng,岭lǐng,领lǐng,領lǐng,嶺lǐng,令lìng,另lìng,呤lìng,炩lìng,溜liū,熘liū,澑liū,蹓liū,刘liú,沠liú,畄liú,浏liú,流liú,留liú,旈liú,琉liú,畱liú,硫liú,裗liú,媹liú,嵧liú,旒liú,蓅liú,遛liú,馏liú,骝liú,榴liú,瑠liú,飗liú,劉liú,瑬liú,瘤liú,磂liú,镏liú,駠liú,鹠liú,橊liú,璢liú,疁liú,癅liú,駵liú,嚠liú,懰liú,瀏liú,藰liú,鎏liú,鎦liú,餾liú,麍liú,鐂liú,騮liú,飅liú,鰡liú,鶹liú,驑liú,蒥liú,飀liú,柳liǔ,栁liǔ,桞liǔ,珋liǔ,桺liǔ,绺liǔ,锍liǔ,綹liǔ,熮liǔ,罶liǔ,鋶liǔ,橮liǔ,羀liǔ,嬼liǔ,畂liù,六liù,翏liù,塯liù,廇liù,磟liù,鹨liù,霤liù,雡liù,鬸liù,鷚liù,飂liù,囖lō,谾lóng,龙lóng,屸lóng,咙lóng,泷lóng,茏lóng,昽lóng,栊lóng,珑lóng,胧lóng,眬lóng,砻lóng,笼lóng,聋lóng,隆lóng,湰lóng,嶐lóng,槞lóng,漋lóng,蕯lóng,癃lóng,窿lóng,篭lóng,龍lóng,巃lóng,巄lóng,瀧lóng,蘢lóng,鏧lóng,霳lóng,曨lóng,櫳lóng,爖lóng,瓏lóng,矓lóng,礱lóng,礲lóng,襱lóng,籠lóng,聾lóng,蠪lóng,蠬lóng,龓lóng,豅lóng,躘lóng,鑨lóng,驡lóng,鸗lóng,滝lóng,嚨lóng,朧lǒng,陇lǒng,垄lǒng,垅lǒng,儱lǒng,隴lǒng,壟lǒng,壠lǒng,攏lǒng,竉lǒng,徿lǒng,拢lǒng,梇lòng,衖lòng,贚lòng,喽lou,嘍lou,窶lóu,娄lóu,婁lóu,溇lóu,蒌lóu,楼lóu,廔lóu,慺lóu,蔞lóu,遱lóu,樓lóu,熡lóu,耧lóu,蝼lóu,艛lóu,螻lóu,謱lóu,軁lóu,髅lóu,鞻lóu,髏lóu,漊lóu,屚lóu,膢lóu,耬lóu,嵝lǒu,搂lǒu,塿lǒu,嶁lǒu,摟lǒu,甊lǒu,篓lǒu,簍lǒu,陋lòu,漏lòu,瘘lòu,镂lòu,瘺lòu,鏤lòu,氌lu,氇lu,噜lū,撸lū,嚕lū,擼lū,卢lú,芦lú,垆lú,枦lú,泸lú,炉lú,栌lú,胪lú,轳lú,舮lú,鸬lú,玈lú,舻lú,颅lú,鈩lú,鲈lú,魲lú,盧lú,嚧lú,壚lú,廬lú,攎lú,瀘lú,獹lú,蘆lú,櫨lú,爐lú,瓐lú,臚lú,矑lú,纑lú,罏lú,艫lú,蠦lú,轤lú,鑪lú,顱lú,髗lú,鱸lú,鸕lú,黸lú,鹵lú,塷lú,庐lú,籚lú,卤lǔ,虏lǔ,挔lǔ,捛lǔ,掳lǔ,硵lǔ,鲁lǔ,虜lǔ,滷lǔ,蓾lǔ,樐lǔ,澛lǔ,魯lǔ,擄lǔ,橹lǔ,磠lǔ,镥lǔ,櫓lǔ,艣lǔ,鏀lǔ,艪lǔ,鐪lǔ,鑥lǔ,瀂lǔ,露lù,圥lù,甪lù,陆lù,侓lù,坴lù,彔lù,录lù,峍lù,勎lù,赂lù,辂lù,陸lù,娽lù,淕lù,淥lù,渌lù,硉lù,菉lù,逯lù,鹿lù,椂lù,琭lù,祿lù,剹lù,勠lù,盝lù,睩lù,碌lù,稑lù,賂lù,路lù,輅lù,塶lù,廘lù,摝lù,漉lù,箓lù,粶lù,蔍lù,戮lù,膟lù,觮lù,趢lù,踛lù,辘lù,醁lù,潞lù,穋lù,錄lù,録lù,錴lù,璐lù,簏lù,螰lù,鴼lù,簶lù,蹗lù,轆lù,騄lù,鹭lù,簬lù,簵lù,鯥lù,鵦lù,鵱lù,麓lù,鏴lù,騼lù,籙lù,虂lù,鷺lù,緑lù,攄lù,禄lù,蕗lù,娈luán,孪luán,峦luán,挛luán,栾luán,鸾luán,脔luán,滦luán,銮luán,鵉luán,奱luán,孿luán,巒luán,曫luán,欒luán,灓luán,羉luán,臠luán,圞luán,灤luán,虊luán,鑾luán,癴luán,癵luán,鸞luán,圝luán,卵luǎn,乱luàn,釠luàn,亂luàn,乿luàn,掠luě,稤luě,略luè,畧luè,锊luè,圙luè,鋝luè,鋢luè,剠luè,擽luè,抡lún,掄lún,仑lún,伦lún,囵lún,沦lún,纶lún,轮lún,倫lún,陯lún,圇lún,婨lún,崘lún,崙lún,惀lún,淪lún,菕lún,棆lún,腀lún,碖lún,綸lún,蜦lún,踚lún,輪lún,磮lún,鯩lún,耣lún,稐lǔn,埨lǔn,侖lùn,溣lùn,論lùn,论lùn,頱luō,囉luō,啰luō,罗luó,猡luó,脶luó,萝luó,逻luó,椤luó,腡luó,锣luó,箩luó,骡luó,镙luó,螺luó,羅luó,覶luó,鏍luó,儸luó,覼luó,騾luó,蘿luó,邏luó,欏luó,鸁luó,鑼luó,饠luó,驘luó,攞luó,籮luó,剆luǒ,倮luǒ,砢luǒ,蓏luǒ,裸luǒ,躶luǒ,瘰luǒ,蠃luǒ,臝luǒ,曪luǒ,癳luǒ,茖luò,蛒luò,硦luò,泺luò,峈luò,洛luò,络luò,荦luò,骆luò,洜luò,珞luò,笿luò,絡luò,落luò,摞luò,漯luò,犖luò,雒luò,鮥luò,鵅luò,濼luò,纙luò,挼luò,跞luò,駱luò,瞜lǘ,瘻lǘ,驴lǘ,闾lǘ,榈lǘ,馿lǘ,氀lǘ,櫚lǘ,藘lǘ,曥lǘ,鷜lǘ,驢lǘ,閭lǘ,偻lǚ,僂lǚ,吕lǚ,呂lǚ,侣lǚ,郘lǚ,侶lǚ,旅lǚ,梠lǚ,焒lǚ,祣lǚ,稆lǚ,铝lǚ,屡lǚ,絽lǚ,缕lǚ,屢lǚ,膂lǚ,膐lǚ,褛lǚ,鋁lǚ,履lǚ,褸lǚ,儢lǚ,縷lǚ,穭lǚ,捋lǚ,穞lǚ,寠lǜ,滤lǜ,濾lǜ,寽lǜ,垏lǜ,律lǜ,虑lǜ,率lǜ,绿lǜ,嵂lǜ,氯lǜ,葎lǜ,綠lǜ,慮lǜ,箻lǜ,勴lǜ,繂lǜ,櫖lǜ,爈lǜ,鑢lǜ,卛lǜ,亇ma,吗ma,嗎ma,嘛ma,妈mā,媽mā,痲mā,孖mā,麻má,嫲má,蔴má,犘má,蟆má,蟇má,尛má,马mǎ,犸mǎ,玛mǎ,码mǎ,蚂mǎ,馬mǎ,溤mǎ,獁mǎ,遤mǎ,瑪mǎ,碼mǎ,螞mǎ,鷌mǎ,鰢mǎ,傌mǎ,榪mǎ,鎷mǎ,杩mà,祃mà,閁mà,骂mà,睰mà,嘜mà,禡mà,罵mà,駡mà,礣mà,鬕mà,貍mái,埋mái,霾mái,买mǎi,荬mǎi,買mǎi,嘪mǎi,蕒mǎi,鷶mǎi,唛mài,劢mài,佅mài,売mài,麦mài,卖mài,脈mài,麥mài,衇mài,勱mài,賣mài,邁mài,霡mài,霢mài,迈mài,颟mān,顢mān,姏mán,悗mán,蛮mán,慲mán,摱mán,馒mán,槾mán,樠mán,瞒mán,瞞mán,鞔mán,饅mán,鳗mán,鬗mán,鬘mán,蠻mán,矕mán,僈mán,屘mǎn,満mǎn,睌mǎn,满mǎn,滿mǎn,螨mǎn,襔mǎn,蟎mǎn,鏋mǎn,曼màn,谩màn,墁màn,幔màn,慢màn,漫màn,獌màn,缦màn,蔄màn,蔓màn,熳màn,澷màn,镘màn,縵màn,蟃màn,鏝màn,蘰màn,鰻màn,謾màn,牤māng,朚máng,龒máng,邙máng,吂máng,忙máng,汒máng,芒máng,尨máng,杗máng,杧máng,盲máng,厖máng,恾máng,笀máng,茫máng,哤máng,娏máng,浝máng,狵máng,牻máng,硭máng,釯máng,铓máng,痝máng,鋩máng,駹máng,蘉máng,氓máng,甿máng,庬máng,鹲máng,鸏máng,莽mǎng,茻mǎng,壾mǎng,漭mǎng,蟒mǎng,蠎mǎng,莾mǎng,匁mangmi,猫māo,貓māo,毛máo,矛máo,枆máo,牦máo,茅máo,旄máo,渵máo,軞máo,酕máo,堥máo,锚máo,緢máo,髦máo,髳máo,錨máo,蟊máo,鶜máo,茆máo,罞máo,鉾máo,冇mǎo,戼mǎo,峁mǎo,泖mǎo,昴mǎo,铆mǎo,笷mǎo,蓩mǎo,鉚mǎo,卯mǎo,秏mào,冃mào,皃mào,芼mào,冐mào,茂mào,冒mào,贸mào,耄mào,袤mào,覒mào,媢mào,帽mào,貿mào,鄚mào,愗mào,暓mào,楙mào,毷mào,瑁mào,貌mào,鄮mào,蝐mào,懋mào,霿mào,獏mào,毣mào,萺mào,瞀mào,唜mas,么me,嚜me,麼me,麽me,庅mē,嚒mē,孭mē,濹mè,嚰mè,沒méi,没méi,枚méi,玫méi,苺méi,栂méi,眉méi,脄méi,莓méi,梅méi,珻méi,脢méi,郿méi,堳méi,媒méi,嵋méi,湄méi,湈méi,睂méi,葿méi,楣méi,楳méi,煤méi,瑂méi,禖méi,腜méi,塺méi,槑méi,酶méi,镅méi,鹛méi,鋂méi,霉méi,徾méi,鎇méi,矀méi,攗méi,蘪méi,鶥méi,攟méi,黴méi,坆méi,猸méi,羙měi,毎měi,每měi,凂měi,美měi,挴měi,浼měi,媄měi,渼měi,媺měi,镁měi,嬍měi,燘měi,躾měi,鎂měi,黣měi,嵄měi,眊mèi,妹mèi,抺mèi,沬mèi,昧mèi,祙mèi,袂mèi,眛mèi,媚mèi,寐mèi,痗mèi,跊mèi,鬽mèi,煝mèi,睸mèi,魅mèi,篃mèi,蝞mèi,櫗mèi,氼mèi,们men,們men,椚mēn,门mén,扪mén,钔mén,門mén,閅mén,捫mén,菛mén,璊mén,穈mén,鍆mén,虋mén,怋mén,玣mén,殙mèn,闷mèn,焖mèn,悶mèn,暪mèn,燜mèn,懑mèn,懣mèn,掹mēng,擝mēng,懞mēng,虻méng,冡méng,莔méng,萌méng,萠méng,盟méng,甍méng,儚méng,橗méng,瞢méng,蕄méng,蝱méng,鄳méng,鄸méng,幪méng,濛méng,獴méng,曚méng,朦méng,檬méng,氋méng,礞méng,鯍méng,艨méng,矒méng,靀méng,饛méng,顭méng,蒙méng,鼆méng,夣méng,懜méng,溕méng,矇měng,勐měng,猛měng,锰měng,艋měng,蜢měng,錳měng,懵měng,蠓měng,鯭měng,黽měng,瓾měng,夢mèng,孟mèng,梦mèng,霥mèng,踎meo,咪mī,瞇mī,眯mī,冞mí,弥mí,祢mí,迷mí,袮mí,猕mí,谜mí,蒾mí,詸mí,謎mí,醚mí,彌mí,糜mí,縻mí,麊mí,麋mí,禰mí,靡mí,獼mí,麛mí,爢mí,瓕mí,蘼mí,镾mí,醾mí,醿mí,鸍mí,釄mí,檷mí,籋mí,罙mí,擟mí,米mǐ,羋mǐ,芈mǐ,侎mǐ,沵mǐ,弭mǐ,洣mǐ,敉mǐ,粎mǐ,脒mǐ,葞mǐ,蝆mǐ,蔝mǐ,銤mǐ,瀰mǐ,孊mǐ,灖mǐ,渳mǐ,哋mì,汨mì,沕mì,宓mì,泌mì,觅mì,峚mì,宻mì,秘mì,密mì,淧mì,覓mì,覔mì,幂mì,谧mì,塓mì,幎mì,覛mì,嘧mì,榓mì,漞mì,熐mì,蔤mì,蜜mì,鼏mì,冪mì,樒mì,幦mì,濗mì,藌mì,謐mì,櫁mì,簚mì,羃mì,鑖mì,蓂mì,滵mì,芇mián,眠mián,婂mián,绵mián,媔mián,棉mián,綿mián,緜mián,蝒mián,嬵mián,檰mián,櫋mián,矈mián,矊mián,蠠mián,矏mián,厸miǎn,丏miǎn,汅miǎn,免miǎn,沔miǎn,黾miǎn,俛miǎn,勉miǎn,眄miǎn,娩miǎn,偭miǎn,冕miǎn,勔miǎn,喕miǎn,愐miǎn,湎miǎn,缅miǎn,葂miǎn,腼miǎn,緬miǎn,鮸miǎn,渑miǎn,澠miǎn,靦miǎn,靣miàn,面miàn,糆miàn,麪miàn,麫miàn,麺miàn,麵miàn,喵miāo,苗miáo,媌miáo,瞄miáo,鹋miáo,嫹miáo,鶓miáo,鱙miáo,描miáo,訬miǎo,仯miǎo,杪miǎo,眇miǎo,秒miǎo,淼miǎo,渺miǎo,缈miǎo,篎miǎo,緲miǎo,藐miǎo,邈miǎo,妙miào,庙miào,竗miào,庿miào,廟miào,吀miē,咩miē,哶miē,灭miè,搣miè,滅miè,薎miè,幭miè,懱miè,篾miè,蠛miè,衊miè,鱴miè,蔑miè,民mín,垊mín,姄mín,岷mín,旻mín,旼mín,玟mín,苠mín,珉mín,盿mín,冧mín,罠mín,崏mín,捪mín,琘mín,琝mín,暋mín,瑉mín,痻mín,碈mín,鈱mín,賯mín,錉mín,鍲mín,缗mín,湏mǐn,緍mǐn,緡mǐn,皿mǐn,冺mǐn,刡mǐn,闵mǐn,抿mǐn,泯mǐn,勄mǐn,敃mǐn,闽mǐn,悯mǐn,敏mǐn,笢mǐn,笽mǐn,湣mǐn,閔mǐn,愍mǐn,敯mǐn,閩mǐn,慜mǐn,憫mǐn,潣mǐn,簢mǐn,鳘mǐn,鰵mǐn,僶mǐn,名míng,明míng,鸣míng,洺míng,眀míng,茗míng,冥míng,朙míng,眳míng,铭míng,鄍míng,嫇míng,溟míng,猽míng,暝míng,榠míng,銘míng,鳴míng,瞑míng,螟míng,覭míng,佲mǐng,凕mǐng,慏mǐng,酩mǐng,姳mǐng,命mìng,掵mìng,詺mìng,谬miù,缪miù,繆miù,謬miù,摸mō,嚤mō,嬤mó,嬷mó,戂mó,攠mó,谟mó,嫫mó,馍mó,摹mó,模mó,膜mó,摩mó,魹mó,橅mó,磨mó,糢mó,謨mó,謩mó,擵mó,饃mó,蘑mó,髍mó,魔mó,劘mó,饝mó,嚩mó,懡mǒ,麿mǒ,狢mò,貈mò,貉mò,脉mò,瀎mò,抹mò,末mò,劰mò,圽mò,妺mò,怽mò,歿mò,殁mò,沫mò,茉mò,陌mò,帞mò,昩mò,枺mò,皌mò,眜mò,眿mò,砞mò,秣mò,莈mò,眽mò,粖mò,絈mò,蛨mò,貃mò,嗼mò,塻mò,寞mò,漠mò,蓦mò,貊mò,銆mò,墨mò,嫼mò,暯mò,瘼mò,瞐mò,瞙mò,镆mò,魩mò,黙mò,縸mò,默mò,貘mò,藦mò,蟔mò,鏌mò,爅mò,礳mò,纆mò,耱mò,艒mò,莫mò,驀mò,乮mol,哞mōu,呣móu,蛑móu,蝥móu,牟móu,侔móu,劺móu,恈móu,洠móu,眸móu,谋móu,謀móu,鍪móu,鴾móu,麰móu,鞪móu,某mǒu,呒mú,嘸mú,毪mú,氁mú,母mǔ,亩mǔ,牡mǔ,姆mǔ,拇mǔ,牳mǔ,畆mǔ,畒mǔ,胟mǔ,畝mǔ,畞mǔ,砪mǔ,畮mǔ,鉧mǔ,踇mǔ,坶mǔ,峔mǔ,朷mù,木mù,仫mù,目mù,凩mù,沐mù,狇mù,炑mù,牧mù,苜mù,莯mù,蚞mù,钼mù,募mù,雮mù,墓mù,幕mù,慔mù,楘mù,睦mù,鉬mù,慕mù,暮mù,樢mù,霂mù,穆mù,幙mù,旀myeo,椧myeong,秅ná,拏ná,拿ná,挐ná,誽ná,镎ná,鎿ná,乸ná,詉ná,蒘ná,訤ná,哪nǎ,雫nǎ,郍nǎ,那nà,吶nà,妠nà,纳nà,肭nà,娜nà,钠nà,納nà,袦nà,捺nà,笝nà,豽nà,軜nà,鈉nà,嗱nà,蒳nà,靹nà,魶nà,呐nà,內nà,篛nà,衲nà,腉nái,熋nái,摨nái,孻nái,螚nái,搱nái,乃nǎi,奶nǎi,艿nǎi,氖nǎi,疓nǎi,妳nǎi,廼nǎi,迺nǎi,倷nǎi,釢nǎi,奈nài,柰nài,萘nài,渿nài,鼐nài,褦nài,錼nài,耐nài,囡nān,男nán,抩nán,枏nán,枬nán,侽nán,南nán,柟nán,娚nán,畘nán,莮nán,难nán,喃nán,遖nán,暔nán,楠nán,煵nán,諵nán,難nán,萳nán,嫨nǎn,赧nǎn,揇nǎn,湳nǎn,腩nǎn,戁nǎn,蝻nǎn,婻nàn,囔nāng,涳náng,乪náng,嚢náng,囊náng,蠰náng,鬞náng,馕náng,欜náng,饢náng,搑náng,崀nǎng,擃nǎng,曩nǎng,攮nǎng,灢nǎng,瀼nǎng,儾nàng,齉nàng,孬nāo,檂nāo,巙náo,呶náo,怓náo,挠náo,峱náo,硇náo,铙náo,猱náo,蛲náo,碙náo,撓náo,獶náo,蟯náo,夒náo,譊náo,鐃náo,巎náo,獿náo,憹náo,蝚náo,嶩náo,垴nǎo,恼nǎo,悩nǎo,脑nǎo,匘nǎo,脳nǎo,堖nǎo,惱nǎo,嫐nǎo,瑙nǎo,腦nǎo,碯nǎo,闹nào,婥nào,淖nào,閙nào,鬧nào,臑nào,呢ne,讷nè,抐nè,眲nè,訥nè,娞něi,馁něi,腇něi,餒něi,鮾něi,鯘něi,浽něi,内nèi,氝nèi,焾nem,嫩nèn,媆nèn,嫰nèn,竜néng,能néng,莻neus,鈪ngag,銰ngai,啱ngam,妮nī,尼ní,坭ní,怩ní,泥ní,籾ní,倪ní,屔ní,秜ní,郳ní,铌ní,埿ní,婗ní,猊ní,蚭ní,棿ní,跜ní,鈮ní,蜺ní,觬ní,貎ní,霓ní,鲵ní,鯢ní,麑ní,齯ní,臡ní,抳ní,蛪ní,腝ní,淣ní,聻nǐ,濔nǐ,伱nǐ,你nǐ,拟nǐ,狔nǐ,苨nǐ,柅nǐ,旎nǐ,晲nǐ,孴nǐ,鉨nǐ,馜nǐ,隬nǐ,擬nǐ,薿nǐ,鑈nǐ,儞nǐ,伲nì,迡nì,昵nì,胒nì,逆nì,匿nì,痆nì,眤nì,堄nì,惄nì,嫟nì,愵nì,溺nì,睨nì,腻nì,暱nì,縌nì,膩nì,嬺nì,灄nì,孨nì,拈niān,蔫niān,年nián,秊nián,哖nián,秥nián,鮎nián,鲶nián,鵇nián,黏nián,鯰nián,姩nián,鲇nián,跈niǎn,涊niǎn,捻niǎn,淰niǎn,辇niǎn,撚niǎn,撵niǎn,碾niǎn,輦niǎn,簐niǎn,攆niǎn,蹨niǎn,躎niǎn,辗niǎn,輾niǎn,卄niàn,廿niàn,念niàn,埝niàn,艌niàn,娘niáng,嬢niáng,醸niáng,酿niàng,釀niàng,茮niǎo,尦niǎo,鸟niǎo,袅niǎo,鳥niǎo,嫋niǎo,裊niǎo,蔦niǎo,嬝niǎo,褭niǎo,嬲niǎo,茑niǎo,尿niào,脲niào,捏niē,揑niē,乜niè,帇niè,圼niè,苶niè,枿niè,陧niè,涅niè,聂niè,臬niè,啮niè,惗niè,菍niè,隉niè,喦niè,敜niè,嗫niè,嵲niè,踂niè,摰niè,槷niè,踗niè,踙niè,镊niè,镍niè,嶭niè,篞niè,臲niè,錜niè,颞niè,蹑niè,嚙niè,聶niè,鎳niè,闑niè,孼niè,孽niè,櫱niè,蘖niè,囁niè,齧niè,巕niè,糱niè,糵niè,蠥niè,囓niè,躡niè,鑷niè,顳niè,諗niè,囐niè,銸niè,鋷niè,讘niè,脌nīn,囜nín,您nín,恁nín,拰nǐn,宁níng,咛níng,狞níng,柠níng,聍níng,寍níng,寕níng,寜níng,寧níng,儜níng,凝níng,嚀níng,嬣níng,獰níng,薴níng,檸níng,聹níng,鑏níng,鬡níng,鸋níng,甯níng,濘níng,鬤níng,拧nǐng,擰nǐng,矃nǐng,橣nǐng,佞nìng,侫nìng,泞nìng,寗nìng,澝nìng,妞niū,牛niú,牜niú,忸niǔ,扭niǔ,沑niǔ,狃niǔ,纽niǔ,杻niǔ,炄niǔ,钮niǔ,紐niǔ,莥niǔ,鈕niǔ,靵niǔ,拗niù,莀nóng,农nóng,侬nóng,哝nóng,浓nóng,脓nóng,秾nóng,儂nóng,辳nóng,噥nóng,濃nóng,蕽nóng,禯nóng,膿nóng,穠nóng,襛nóng,醲nóng,欁nóng,癑nóng,農nóng,繷nǒng,廾nòng,弄nòng,挊nòng,挵nòng,齈nòng,羺nóu,譨nóu,啂nǒu,槈nòu,耨nòu,獳nòu,檽nòu,鎒nòu,鐞nòu,譳nòu,嬬nòu,奴nú,驽nú,笯nú,駑nú,砮nú,孥nú,伮nǔ,努nǔ,弩nǔ,胬nǔ,怒nù,傉nù,搙nù,奻nuán,渜nuán,暖nuǎn,煗nuǎn,餪nuǎn,疟nuè,虐nuè,瘧nuè,硸nuè,黁nun,燶nung,挪nuó,梛nuó,傩nuó,搻nuó,儺nuó,橠nuó,袲nuǒ,诺nuò,喏nuò,掿nuò,逽nuò,搦nuò,锘nuò,榒nuò,稬nuò,諾nuò,蹃nuò,糑nuò,懦nuò,懧nuò,糥nuò,穤nuò,糯nuò,堧nuò,耎nuò,愞nuò,女nǚ,钕nǚ,籹nǚ,釹nǚ,衂nǜ,恧nǜ,朒nǜ,衄nǜ,筽o,噢ō,哦ò,夞oes,乯ol,鞰on,吽ōu,讴ōu,欧ōu,殴ōu,瓯ōu,鸥ōu,塸ōu,歐ōu,毆ōu,熰ōu,甌ōu,膒ōu,鴎ōu,櫙ōu,藲ōu,謳ōu,鏂ōu,鷗ōu,沤ōu,蓲ōu,敺ōu,醧ōu,漚ōu,齵óu,澫ǒu,吘ǒu,呕ǒu,偶ǒu,腢ǒu,嘔ǒu,耦ǒu,蕅ǒu,藕ǒu,怄òu,慪òu,妑pā,趴pā,舥pā,啪pā,葩pā,帊pā,杷pá,爬pá,耙pá,掱pá,琶pá,筢pá,潖pá,跁pá,帕pà,怕pà,袙pà,拍pāi,俳pái,徘pái,排pái,猅pái,牌pái,輫pái,簰pái,犤pái,哌pài,派pài,蒎pài,鎃pài,湃pài,磗pak,眅pān,畨pān,潘pān,攀pān,膰pán,爿pán,柈pán,盘pán,媻pán,幋pán,蒰pán,槃pán,盤pán,磐pán,縏pán,蹒pán,瀊pán,蟠pán,蹣pán,鎜pán,鞶pán,踫pán,宷pán,洀pán,闆pǎn,坢pǎn,盻pǎn,眫pàn,冸pàn,判pàn,沜pàn,泮pàn,叛pàn,牉pàn,盼pàn,畔pàn,袢pàn,詊pàn,溿pàn,頖pàn,鋬pàn,鵥pàn,襻pàn,鑻pàn,炍pàn,乓pāng,汸pāng,沗pāng,肨pāng,胮pāng,雱pāng,滂pāng,膖pāng,霶pāng,磅páng,趽páng,彷páng,夆páng,厐páng,庞páng,逄páng,旁páng,舽páng,篣páng,螃páng,鳑páng,龐páng,鰟páng,蠭páng,髈páng,龎páng,耪pǎng,覫pǎng,炐pàng,胖pàng,抛pāo,拋pāo,脬pāo,刨páo,咆páo,垉páo,庖páo,狍páo,炰páo,爮páo,袍páo,匏páo,軳páo,鞄páo,褜páo,麅páo,颮páo,跑pǎo,窌pào,炮pào,奅pào,泡pào,皰pào,砲pào,萢pào,麭pào,礟pào,礮pào,犥pào,疱pào,妚pēi,呸pēi,怌pēi,肧pēi,胚pēi,衃pēi,醅pēi,抷pēi,阫péi,陪péi,陫péi,培péi,毰péi,赔péi,锫péi,裴péi,裵péi,賠péi,錇péi,駍péi,婄péi,俖pěi,茷pèi,攈pèi,伂pèi,沛pèi,佩pèi,帔pèi,姵pèi,旆pèi,浿pèi,珮pèi,配pèi,笩pèi,蓜pèi,辔pèi,馷pèi,嶏pèi,霈pèi,轡pèi,斾pèi,喷pēn,噴pēn,濆pēn,歕pēn,衯pén,瓫pén,盆pén,湓pén,葐pén,呠pěn,翸pěn,匉pēng,怦pēng,抨pēng,泙pēng,恲pēng,胓pēng,砰pēng,烹pēng,硑pēng,軯pēng,閛pēng,漰pēng,嘭pēng,磞pēng,弸pēng,荓pēng,軿pēng,輧pēng,梈pēng,芃péng,朋péng,竼péng,倗péng,莑péng,堋péng,彭péng,棚péng,椖péng,塜péng,塳péng,漨péng,硼péng,稝péng,蓬péng,鹏péng,槰péng,樥péng,憉péng,澎péng,輣péng,篷péng,膨péng,韸péng,髼péng,蟚péng,蟛péng,鬅péng,纄péng,韼péng,鵬péng,鬔péng,鑝péng,淜péng,熢péng,摓pěng,捧pěng,淎pěng,皏pěng,剻pěng,掽pèng,椪pèng,碰pèng,浌peol,巼phas,闏phdeng,乶phoi,喸phos,榌pi,伓pī,伾pī,批pī,纰pī,邳pī,坯pī,披pī,炋pī,狉pī,狓pī,砒pī,秛pī,秠pī,紕pī,耚pī,豾pī,釽pī,鉟pī,銔pī,劈pī,磇pī,駓pī,噼pī,錃pī,魾pī,憵pī,礔pī,礕pī,霹pī,鲏pī,鮍pī,丕pī,髬pī,铍pí,鈹pí,皮pí,阰pí,芘pí,岯pí,枇pí,毞pí,毗pí,毘pí,疲pí,蚍pí,郫pí,陴pí,啤pí,埤pí,蚽pí,豼pí,焷pí,脾pí,腗pí,罴pí,膍pí,蜱pí,隦pí,壀pí,篺pí,螷pí,貔pí,簲pí,羆pí,鵧pí,朇pí,鼙pí,蠯pí,猈pí,琵pí,匹pǐ,庀pǐ,仳pǐ,圮pǐ,苉pǐ,脴pǐ,痞pǐ,銢pǐ,鴄pǐ,噽pǐ,癖pǐ,嚭pǐ,顖pǐ,擗pǐ,辟pì,鈲pì,闢pì,屁pì,淠pì,渒pì,揊pì,媲pì,嫓pì,睤pì,睥pì,潎pì,僻pì,澼pì,嚊pì,甓pì,疈pì,譬pì,鷿pì,囨piān,偏piān,媥piān,犏piān,篇piān,翩piān,骈pián,胼pián,楄pián,楩pián,賆pián,諚pián,骿pián,蹁pián,駢pián,騈pián,徧pián,腁pián,覑piǎn,谝piǎn,貵piǎn,諞piǎn,片piàn,骗piàn,魸piàn,騗piàn,騙piàn,剽piāo,彯piāo,漂piāo,缥piāo,飘piāo,磦piāo,旚piāo,縹piāo,翲piāo,螵piāo,飄piāo,魒piāo,薸piáo,闝piáo,嫖piáo,瓢piáo,莩piǎo,殍piǎo,瞟piǎo,醥piǎo,皫piǎo,顠piǎo,飃piào,票piào,勡piào,嘌piào,慓piào,覕piē,氕piē,撆piē,暼piē,瞥piē,撇piě,丿piě,苤piě,鐅piě,嫳piè,拚pīn,姘pīn,拼pīn,礗pīn,穦pīn,馪pīn,驞pīn,贫pín,貧pín,嫔pín,频pín,頻pín,嬪pín,薲pín,嚬pín,矉pín,颦pín,顰pín,蘋pín,玭pín,品pǐn,榀pǐn,朩pìn,牝pìn,汖pìn,聘pìn,娉pīng,乒pīng,甹pīng,俜pīng,涄pīng,砯pīng,艵pīng,竮pīng,頩pīng,冖píng,平píng,评píng,凭píng,坪píng,岼píng,苹píng,郱píng,屏píng,帡píng,枰píng,洴píng,玶píng,娦píng,瓶píng,屛píng,帲píng,萍píng,蚲píng,塀píng,幈píng,焩píng,甁píng,缾píng,聠píng,蓱píng,蛢píng,評píng,鲆píng,凴píng,慿píng,憑píng,鮃píng,簈píng,呯píng,箳píng,鏺po,钋pō,坡pō,岥pō,泼pō,釙pō,颇pō,溌pō,酦pō,潑pō,醱pō,頗pō,攴pō,巿pó,婆pó,嘙pó,鄱pó,皤pó,謈pó,櫇pó,叵pǒ,尀pǒ,钷pǒ,笸pǒ,鉕pǒ,駊pǒ,屰pò,廹pò,岶pò,迫pò,敀pò,昢pò,洦pò,珀pò,烞pò,破pò,砶pò,粕pò,奤pò,蒪pò,魄pò,皛pò,頮pōu,剖pōu,颒pōu,抙pōu,捊pōu,抔póu,掊póu,裒póu,咅pǒu,哣pǒu,犃pǒu,兺ppun,哛ppun,巬pu,巭pu,扑pū,炇pū,痡pū,駇pū,噗pū,撲pū,鋪pū,潽pū,襆pú,脯pú,蜅pú,仆pú,圤pú,匍pú,莆pú,菩pú,菐pú,葡pú,蒱pú,蒲pú,僕pú,酺pú,墣pú,璞pú,瞨pú,穙pú,镤pú,贌pú,纀pú,鏷pú,襥pú,濮pú,朴pǔ,圃pǔ,埔pǔ,浦pǔ,烳pǔ,普pǔ,圑pǔ,溥pǔ,暜pǔ,谱pǔ,樸pǔ,氆pǔ,諩pǔ,檏pǔ,镨pǔ,譜pǔ,蹼pǔ,鐠pǔ,铺pù,舖pù,舗pù,曝pù,七qī,沏qī,妻qī,恓qī,柒qī,倛qī,凄qī,栖qī,桤qī,缼qī,郪qī,娸qī,戚qī,捿qī,桼qī,淒qī,萋qī,朞qī,期qī,棲qī,欺qī,紪qī,褄qī,僛qī,嘁qī,慽qī,榿qī,漆qī,緀qī,磎qī,諆qī,諿qī,霋qī,蹊qī,魌qī,鏚qī,鶈qī,碕qī,螇qī,傶qī,迉qī,軙qí,荎qí,饑qí,亓qí,祁qí,齐qí,圻qí,岐qí,岓qí,忯qí,芪qí,亝qí,其qí,奇qí,斉qí,歧qí,祇qí,祈qí,肵qí,疧qí,竒qí,剘qí,斊qí,旂qí,脐qí,蚑qí,蚔qí,蚚qí,颀qí,埼qí,崎qí,掑qí,淇qí,渏qí,猉qí,畦qí,萁qí,跂qí,軝qí,釮qí,骐qí,骑qí,嵜qí,棊qí,棋qí,琦qí,琪qí,祺qí,蛴qí,愭qí,碁qí,鬿qí,旗qí,粸qí,綥qí,綦qí,綨qí,緕qí,蜝qí,蜞qí,齊qí,禥qí,蕲qí,螧qí,鲯qí,濝qí,藄qí,檱qí,櫀qí,簱qí,臍qí,騎qí,騏qí,鳍qí,蘄qí,鵸qí,鶀qí,麒qí,籏qí,纃qí,艩qí,蠐qí,鬐qí,騹qí,魕qí,鰭qí,玂qí,麡qí,荠qí,薺qí,扺qí,耆qí,鯕qí,袳qǐ,乞qǐ,邔qǐ,企qǐ,屺qǐ,岂qǐ,芑qǐ,启qǐ,呇qǐ,杞qǐ,玘qǐ,盀qǐ,唘qǐ,豈qǐ,起qǐ,啓qǐ,啔qǐ,啟qǐ,绮qǐ,棨qǐ,綮qǐ,綺qǐ,諬qǐ,簯qǐ,闙qǐ,梩qǐ,婍qǐ,鼜qì,悽qì,槭qì,气qì,讫qì,気qì,汔qì,迄qì,弃qì,汽qì,芞qì,呮qì,泣qì,炁qì,盵qì,咠qì,契qì,砌qì,栔qì,氣qì,訖qì,唭qì,夡qì,棄qì,湆qì,湇qì,葺qì,碛qì,摖qì,暣qì,甈qì,碶qì,噐qì,憇qì,器qì,憩qì,磜qì,磧qì,磩qì,罊qì,趞qì,洓qì,慼qì,欫qì,掐qiā,葜qiā,愘qiā,搳qiā,拤qiá,跒qiǎ,酠qiǎ,鞐qiǎ,圶qià,冾qià,恰qià,洽qià,殎qià,硈qià,髂qià,磍qià,帢qià,千qiān,仟qiān,阡qiān,圱qiān,圲qiān,奷qiān,扦qiān,汘qiān,芊qiān,迁qiān,佥qiān,岍qiān,杄qiān,汧qiān,茾qiān,竏qiān,臤qiān,钎qiān,拪qiān,牵qiān,粁qiān,悭qiān,蚈qiān,铅qiān,牽qiān,釺qiān,谦qiān,鈆qiān,僉qiān,愆qiān,签qiān,鉛qiān,骞qiān,鹐qiān,慳qiān,搴qiān,撁qiān,箞qiān,諐qiān,遷qiān,褰qiān,謙qiān,顅qiān,檶qiān,攐qiān,攑qiān,櫏qiān,簽qiān,鵮qiān,攓qiān,騫qiān,鬜qiān,鬝qiān,籤qiān,韆qiān,鋟qiān,扡qiān,杴qiān,孅qiān,藖qiān,谸qiān,鏲qiān,朁qián,岒qián,忴qián,扲qián,拑qián,前qián,荨qián,钤qián,歬qián,虔qián,钱qián,钳qián,乾qián,掮qián,軡qián,媊qián,鈐qián,鉗qián,榩qián,箝qián,潜qián,羬qián,橬qián,錢qián,黔qián,鎆qián,騝qián,濳qián,騚qián,灊qián,籖qián,鰬qián,潛qián,蚙qián,煔qián,燂qián,葴qián,鍼qián,墘qián,浅qiǎn,肷qiǎn,淺qiǎn,嵰qiǎn,遣qiǎn,槏qiǎn,膁qiǎn,蜸qiǎn,谴qiǎn,缱qiǎn,譴qiǎn,鑓qiǎn,繾qiǎn,欠qiàn,刋qiàn,伣qiàn,芡qiàn,俔qiàn,茜qiàn,倩qiàn,悓qiàn,堑qiàn,嵌qiàn,棈qiàn,椠qiàn,嗛qiàn,皘qiàn,蒨qiàn,塹qiàn,歉qiàn,綪qiàn,蔳qiàn,儙qiàn,槧qiàn,篏qiàn,輤qiàn,篟qiàn,壍qiàn,嬱qiàn,縴qiàn,廞qiàn,鸧qiāng,鶬qiāng,羌qiāng,戕qiāng,戗qiāng,斨qiāng,枪qiāng,玱qiāng,猐qiāng,琷qiāng,跄qiāng,嗴qiāng,獇qiāng,腔qiāng,溬qiāng,蜣qiāng,锖qiāng,嶈qiāng,戧qiāng,槍qiāng,牄qiāng,瑲qiāng,锵qiāng,篬qiāng,錆qiāng,蹌qiāng,镪qiāng,蹡qiāng,鏘qiāng,鏹qiāng,啌qiāng,鎗qiāng,強qiáng,强qiáng,墙qiáng,嫱qiáng,蔷qiáng,樯qiáng,漒qiáng,墻qiáng,嬙qiáng,廧qiáng,薔qiáng,檣qiáng,牆qiáng,謒qiáng,艢qiáng,蘠qiáng,抢qiǎng,羟qiǎng,搶qiǎng,羥qiǎng,墏qiǎng,摤qiǎng,繈qiǎng,襁qiǎng,繦qiǎng,嗆qiàng,炝qiàng,唴qiàng,羻qiàng,呛qiàng,熗qiàng,悄qiāo,硗qiāo,郻qiāo,跷qiāo,鄡qiāo,鄥qiāo,劁qiāo,敲qiāo,踍qiāo,锹qiāo,碻qiāo,頝qiāo,墽qiāo,幧qiāo,橇qiāo,燆qiāo,缲qiāo,鍫qiāo,鍬qiāo,繰qiāo,趬qiāo,鐰qiāo,鞽qiāo,塙qiāo,毃qiāo,鏒qiāo,橾qiāo,喿qiāo,蹺qiāo,峤qiáo,嶠qiáo,乔qiáo,侨qiáo,荍qiáo,荞qiáo,桥qiáo,硚qiáo,菬qiáo,喬qiáo,睄qiáo,僑qiáo,槗qiáo,谯qiáo,嘺qiáo,憔qiáo,蕎qiáo,鞒qiáo,樵qiáo,橋qiáo,犞qiáo,癄qiáo,瞧qiáo,礄qiáo,藮qiáo,譙qiáo,鐈qiáo,墧qiáo,顦qiáo,磽qiǎo,巧qiǎo,愀qiǎo,髜qiǎo,偢qiào,墝qiào,俏qiào,诮qiào,陗qiào,峭qiào,帩qiào,窍qiào,翘qiào,誚qiào,髚qiào,僺qiào,撬qiào,鞘qiào,韒qiào,竅qiào,翹qiào,鞩qiào,躈qiào,踃qiào,切qiē,苆qiē,癿qié,茄qié,聺qié,且qiě,詧qiè,慊qiè,厒qiè,怯qiè,匧qiè,窃qiè,倿qiè,悏qiè,挈qiè,惬qiè,笡qiè,愜qiè,朅qiè,箧qiè,緁qiè,锲qiè,篋qiè,踥qiè,穕qiè,藒qiè,鍥qiè,鯜qiè,鐑qiè,竊qiè,籡qiè,帹qiè,郄qiè,郤qiè,稧qiè,妾qiè,亲qīn,侵qīn,钦qīn,衾qīn,菳qīn,媇qīn,嵚qīn,綅qīn,誛qīn,嶔qīn,親qīn,顉qīn,駸qīn,鮼qīn,寴qīn,欽qīn,骎qīn,鈂qín,庈qín,芩qín,芹qín,埁qín,珡qín,矝qín,秦qín,耹qín,菦qín,捦qín,琴qín,琹qín,禽qín,鈙qín,雂qín,勤qín,嗪qín,嫀qín,靲qín,噙qín,擒qín,鳹qín,懄qín,檎qín,澿qín,瘽qín,螓qín,懃qín,蠄qín,鬵qín,溱qín,坅qǐn,昑qǐn,笉qǐn,梫qǐn,赾qǐn,寑qǐn,锓qǐn,寝qǐn,寢qǐn,螼qǐn,儭qìn,櫬qìn,吢qìn,吣qìn,抋qìn,沁qìn,唚qìn,菣qìn,搇qìn,撳qìn,瀙qìn,藽qìn,鈊qìn,揿qìn,鶄qīng,青qīng,氢qīng,轻qīng,倾qīng,卿qīng,郬qīng,圊qīng,埥qīng,氫qīng,淸qīng,清qīng,軽qīng,傾qīng,廎qīng,蜻qīng,輕qīng,鲭qīng,鯖qīng,鑋qīng,庼qīng,漀qīng,靘qīng,夝qíng,甠qíng,勍qíng,情qíng,硘qíng,晴qíng,棾qíng,氰qíng,暒qíng,樈qíng,擎qíng,檠qíng,黥qíng,殑qíng,苘qǐng,顷qǐng,请qǐng,頃qǐng,請qǐng,檾qǐng,謦qǐng,庆qìng,摐chuāng,牀chuáng,磢chuǎng,刱chuàng,吹chuī,糚zhuāng,庒zhuāng,漴zhuàng,丬zhuàng,壮zhuàng,凊qìng,掅qìng,碃qìng,箐qìng,慶qìng,磬qìng,罄qìng,櫦qìng,濪qìng,藭qiong,跫qióng,銎qióng,卭qióng,邛qióng,穷qióng,穹qióng,茕qióng,桏qióng,笻qióng,筇qióng,赹qióng,惸qióng,焪qióng,焭qióng,琼qióng,蛩qióng,蛬qióng,煢qióng,熍qióng,睘qióng,窮qióng,儝qióng,憌qióng,橩qióng,瓊qióng,竆qióng,嬛qióng,琁qióng,藑qióng,湫qiū,丘qiū,丠qiū,邱qiū,坵qiū,恘qiū,秋qiū,秌qiū,寈qiū,蚯qiū,媝qiū,楸qiū,鹙qiū,篍qiū,緧qiū,蝵qiū,穐qiū,趥qiū,鳅qiū,蟗qiū,鞦qiū,鞧qiū,蘒qiū,鰌qiū,鰍qiū,鱃qiū,龝qiū,逎qiū,櫹qiū,鶖qiū,叴qiú,囚qiú,扏qiú,犰qiú,玌qiú,肍qiú,求qiú,虬qiú,泅qiú,虯qiú,俅qiú,觓qiú,訅qiú,酋qiú,唒qiú,浗qiú,紌qiú,莍qiú,逑qiú,釚qiú,梂qiú,殏qiú,毬qiú,球qiú,釻qiú,崷qiú,巯qiú,湭qiú,皳qiú,盚qiú,遒qiú,煪qiú,絿qiú,蛷qiú,裘qiú,巰qiú,觩qiú,賕qiú,璆qiú,銶qiú,醔qiú,鮂qiú,鼽qiú,鯄qiú,鵭qiú,蠤qiú,鰽qiú,厹qiú,赇qiú,搝qiǔ,糗qiǔ,趍qū,匚qū,区qū,伹qū,匤qū,岖qū,诎qū,阹qū,驱qū,屈qū,岨qū,岴qū,抾qū,浀qū,祛qū,胠qū,袪qū,區qū,蛆qū,躯qū,筁qū,粬qū,蛐qū,詘qū,趋qū,嶇qū,駆qū,憈qū,駈qū,麹qū,髷qū,趨qū,麯qū,軀qū,麴qū,黢qū,驅qū,鰸qū,鱋qū,紶qū,厺qū,佉qū,跼qú,瞿qú,佢qú,劬qú,斪qú,朐qú,胊qú,菃qú,衐qú,鸲qú,淭qú,渠qú,絇qú,葋qú,蕖qú,璖qú,磲qú,璩qú,鼩qú,蘧qú,灈qú,戵qú,欋qú,氍qú,臞qú,癯qú,蠷qú,衢qú,躣qú,蠼qú,鑺qú,臒qú,蟝qú,曲qǔ,取qǔ,娶qǔ,詓qǔ,竬qǔ,龋qǔ,齲qǔ,去qù,刞qù,耝qù,阒qù,觑qù,趣qù,閴qù,麮qù,闃qù,覰qù,覷qù,鼁qù,覻qù,迲qù,峑quān,恮quān,悛quān,圈quān,駩quān,騡quān,鐉quān,腃quān,全quán,权quán,佺quán,诠quán,姾quán,泉quán,洤quán,荃quán,拳quán,辁quán,婘quán,痊quán,硂quán,铨quán,湶quán,犈quán,筌quán,絟quán,葲quán,搼quán,楾quán,瑔quán,觠quán,詮quán,跧quán,輇quán,蜷quán,銓quán,権quán,縓quán,醛quán,闎quán,鳈quán,鬈quán,巏quán,鰁quán,權quán,齤quán,颧quán,顴quán,灥quán,譔quán,牷quán,孉quán,犬quǎn,甽quǎn,畎quǎn,烇quǎn,绻quǎn,綣quǎn,虇quǎn,劝quàn,券quàn,巻quàn,牶quàn,椦quàn,勧quàn,勸quàn,炔quē,缺quē,蒛quē,瘸qué,却què,卻què,崅què,悫què,雀què,确què,阕què,皵què,碏què,阙què,鹊què,愨què,榷què,慤què,確què,燩què,闋què,闕què,鵲què,礭què,殻què,埆què,踆qūn,夋qūn,囷qūn,峮qūn,逡qūn,帬qún,裙qún,羣qún,群qún,裠qún,亽ra,罖ra,囕ram,呥rán,肰rán,衻rán,袇rán,蚦rán,袡rán,蚺rán,然rán,髥rán,嘫rán,髯rán,燃rán,繎rán,冄rán,冉rǎn,姌rǎn,苒rǎn,染rǎn,珃rǎn,媣rǎn,蒅rǎn,孃ráng,穣ráng,獽ráng,禳ráng,瓤ráng,穰ráng,躟ráng,壌rǎng,嚷rǎng,壤rǎng,攘rǎng,爙rǎng,让ràng,懹ràng,譲ràng,讓ràng,荛ráo,饶ráo,桡ráo,橈ráo,襓ráo,饒ráo,犪ráo,嬈ráo,娆ráo,扰rǎo,隢rǎo,擾rǎo,遶rǎo,绕rào,繞rào,惹rě,热rè,熱rè,渃rè,綛ren,人rén,仁rén,壬rén,忈rén,朲rén,忎rén,秂rén,芢rén,鈓rén,魜rén,銋rén,鵀rén,姙rén,忍rěn,荏rěn,栠rěn,栣rěn,荵rěn,秹rěn,稔rěn,躵rěn,刃rèn,刄rèn,认rèn,仞rèn,仭rèn,讱rèn,任rèn,屻rèn,扨rèn,纫rèn,妊rèn,牣rèn,纴rèn,肕rèn,轫rèn,韧rèn,饪rèn,紉rèn,衽rèn,紝rèn,訒rèn,軔rèn,梕rèn,袵rèn,絍rèn,靭rèn,靱rèn,韌rèn,飪rèn,認rèn,餁rèn,扔rēng,仍réng,辸réng,礽réng,芿réng,日rì,驲rì,囸rì,釰rì,鈤rì,馹rì,戎róng,肜róng,栄róng,狨róng,绒róng,茙róng,茸róng,荣róng,容róng,峵róng,毧róng,烿róng,嵘róng,絨róng,羢róng,嫆róng,搈róng,摉róng,榵róng,溶róng,蓉róng,榕róng,榮róng,熔róng,瑢róng,穁róng,蝾róng,褣róng,镕róng,氄róng,縙róng,融róng,螎róng,駥róng,嬫róng,嶸róng,爃róng,鎔róng,瀜róng,蠑róng,媶róng,曧róng,冗rǒng,宂rǒng,傇rǒng,穃ròng,禸róu,柔róu,粈róu,媃róu,揉róu,渘róu,葇róu,瑈róu,腬róu,糅róu,蹂róu,輮róu,鍒róu,鞣róu,瓇róu,騥róu,鰇róu,鶔róu,楺rǒu,煣rǒu,韖rǒu,肉ròu,宍ròu,嶿rū,如rú,侞rú,帤rú,茹rú,桇rú,袽rú,铷rú,渪rú,筎rú,銣rú,蕠rú,儒rú,鴑rú,嚅rú,孺rú,濡rú,薷rú,鴽rú,曘rú,燸rú,襦rú,蠕rú,颥rú,醹rú,顬rú,偄rú,鱬rú,汝rǔ,肗rǔ,乳rǔ,辱rǔ,鄏rǔ,擩rǔ,入rù,扖rù,込rù,杁rù,洳rù,嗕rù,媷rù,溽rù,缛rù,蓐rù,鳰rù,褥rù,縟rù,壖ruán,阮ruǎn,朊ruǎn,软ruǎn,軟ruǎn,碝ruǎn,緛ruǎn,蝡ruǎn,瓀ruǎn,礝ruǎn,瑌ruǎn,撋ruí,桵ruí,甤ruí,緌ruí,蕤ruí,蕊ruǐ,橤ruǐ,繠ruǐ,蘂ruǐ,蘃ruǐ,惢ruǐ,芮ruì,枘ruì,蚋ruì,锐ruì,瑞ruì,睿ruì,銳ruì,叡ruì,壡ruì,润rùn,閏rùn,閠rùn,潤rùn,橍rùn,闰rùn,叒ruò,若ruò,偌ruò,弱ruò,鄀ruò,焫ruò,楉ruò,嵶ruò,蒻ruò,箬ruò,爇ruò,鰙ruò,鰯ruò,鶸ruò,仨sā,桬sā,撒sā,洒sǎ,訯sǎ,靸sǎ,灑sǎ,卅sà,飒sà,脎sà,萨sà,隡sà,馺sà,颯sà,薩sà,櫒sà,栍saeng,毢sāi,塞sāi,毸sāi,腮sāi,嘥sāi,噻sāi,鳃sāi,顋sāi,鰓sāi,嗮sǎi,赛sài,僿sài,賽sài,簺sài,虄sal,厁san,壭san,三sān,弎sān,叁sān,毵sān,毶sān,毿sān,犙sān,鬖sān,糂sān,糝sān,糣sān,彡sān,氵sān,伞sǎn,傘sǎn,馓sǎn,橵sǎn,糤sǎn,繖sǎn,饊sǎn,散sàn,俕sàn,閐sàn,潵sàn,桒sāng,桑sāng,槡sāng,嗓sǎng,搡sǎng,褬sǎng,颡sǎng,鎟sǎng,顙sǎng,磉sǎng,丧sàng,喪sàng,掻sāo,搔sāo,溞sāo,骚sāo,缫sāo,繅sāo,鳋sāo,颾sāo,騒sāo,騷sāo,鰠sāo,鱢sāo,扫sǎo,掃sǎo,嫂sǎo,臊sào,埽sào,瘙sào,氉sào,矂sào,髞sào,色sè,涩sè,啬sè,渋sè,铯sè,歮sè,嗇sè,瑟sè,歰sè,銫sè,澁sè,懎sè,擌sè,濇sè,濏sè,瘷sè,穑sè,澀sè,璱sè,瀒sè,穡sè,繬sè,穯sè,轖sè,鏼sè,譅sè,飋sè,愬sè,鎍sè,溹sè,栜sè,裇sed,聓sei,森sēn,僧sēng,鬙sēng,閪seo,縇seon,杀shā,沙shā,纱shā,乷shā,刹shā,砂shā,唦shā,挱shā,殺shā,猀shā,紗shā,莎shā,铩shā,痧shā,硰shā,蔱shā,裟shā,樧shā,魦shā,鲨shā,閷shā,鯊shā,鯋shā,繺shā,賖shā,啥shá,傻shǎ,儍shǎ,繌shǎ,倽shà,唼shà,萐shà,歃shà,煞shà,翜shà,翣shà,閯shà,霎shà,厦shà,廈shà,筛shāi,篩shāi,簁shāi,簛shāi,酾shāi,釃shāi,摋shǎi,晒shài,曬shài,纔shān,穇shān,凵shān,襂shān,山shān,邖shān,圸shān,删shān,杉shān,杣shān,芟shān,姍shān,姗shān,衫shān,钐shān,埏shān,狦shān,珊shān,舢shān,痁shān,軕shān,笘shān,釤shān,閊shān,跚shān,剼shān,搧shān,嘇shān,幓shān,煽shān,潸shān,澘shān,曑shān,檆shān,膻shān,鯅shān,羴shān,羶shān,炶shān,苫shān,柵shān,栅shān,刪shān,闪shǎn,陕shǎn,陝shǎn,閃shǎn,晱shǎn,睒shǎn,熌shǎn,覢shǎn,曏shǎn,笧shàn,讪shàn,汕shàn,疝shàn,扇shàn,訕shàn,赸shàn,傓shàn,善shàn,椫shàn,銏shàn,骟shàn,僐shàn,鄯shàn,缮shàn,嬗shàn,擅shàn,敾shàn,樿shàn,膳shàn,磰shàn,謆shàn,赡shàn,繕shàn,蟮shàn,譱shàn,贍shàn,鐥shàn,饍shàn,騸shàn,鳝shàn,灗shàn,鱔shàn,鱣shàn,墡shàn,裳shang,塲shāng,伤shāng,殇shāng,商shāng,觞shāng,傷shāng,墒shāng,慯shāng,滳shāng,蔏shāng,殤shāng,熵shāng,螪shāng,觴shāng,謪shāng,鬺shāng,坰shǎng,垧shǎng,晌shǎng,赏shǎng,賞shǎng,鑜shǎng,丄shàng,上shàng,仩shàng,尚shàng,恦shàng,绱shàng,緔shàng,弰shāo,捎shāo,梢shāo,烧shāo,焼shāo,稍shāo,筲shāo,艄shāo,蛸shāo,輎shāo,蕱shāo,燒shāo,髾shāo,鮹shāo,娋shāo,旓shāo,杓sháo,勺sháo,芍sháo,柖sháo,玿sháo,韶sháo,少shǎo,劭shào,卲shào,邵shào,绍shào,哨shào,袑shào,紹shào,潲shào,奢shē,猞shē,赊shē,輋shē,賒shē,檨shē,畲shē,舌shé,佘shé,蛇shé,蛥shé,磼shé,折shé,舍shě,捨shě,厍shè,设shè,社shè,舎shè,厙shè,射shè,涉shè,涻shè,設shè,赦shè,弽shè,慑shè,摄shè,滠shè,慴shè,摵shè,蔎shè,韘shè,騇shè,懾shè,攝shè,麝shè,欇shè,挕shè,蠂shè,堔shen,叄shēn,糁shēn,申shēn,屾shēn,扟shēn,伸shēn,身shēn,侁shēn,呻shēn,妽shēn,籶shēn,绅shēn,诜shēn,柛shēn,氠shēn,珅shēn,穼shēn,籸shēn,娠shēn,峷shēn,甡shēn,眒shēn,砷shēn,深shēn,紳shēn,兟shēn,椮shēn,葠shēn,裑shēn,訷shēn,罧shēn,蓡shēn,詵shēn,甧shēn,蔘shēn,燊shēn,薓shēn,駪shēn,鲹shēn,鯓shēn,鵢shēn,鯵shēn,鰺shēn,莘shēn,叅shēn,神shén,榊shén,鰰shén,棯shěn,槮shěn,邥shěn,弞shěn,沈shěn,审shěn,矤shěn,矧shěn,谂shěn,谉shěn,婶shěn,渖shěn,訠shěn,審shěn,頣shěn,魫shěn,曋shěn,瞫shěn,嬸shěn,覾shěn,讅shěn,哂shěn,肾shèn,侺shèn,昚shèn,甚shèn,胂shèn,眘shèn,渗shèn,祳shèn,脤shèn,腎shèn,愼shèn,慎shèn,瘆shèn,蜃shèn,滲shèn,鋠shèn,瘮shèn,葚shèn,升shēng,生shēng,阩shēng,呏shēng,声shēng,斘shēng,昇shēng,枡shēng,泩shēng,苼shēng,殅shēng,牲shēng,珄shēng,竔shēng,陞shēng,曻shēng,陹shēng,笙shēng,湦shēng,焺shēng,甥shēng,鉎shēng,聲shēng,鍟shēng,鵿shēng,鼪shēng,绳shéng,縄shéng,憴shéng,繩shéng,譝shéng,省shěng,眚shěng,偗shěng,渻shěng,胜shèng,圣shèng,晟shèng,晠shèng,剰shèng,盛shèng,剩shèng,勝shèng,貹shèng,嵊shèng,聖shèng,墭shèng,榺shèng,蕂shèng,橳shèng,賸shèng,鳾shi,觢shi,尸shī,师shī,呞shī,虱shī,诗shī,邿shī,鸤shī,屍shī,施shī,浉shī,狮shī,師shī,絁shī,湤shī,湿shī,葹shī,溮shī,溼shī,獅shī,蒒shī,蓍shī,詩shī,瑡shī,鳲shī,蝨shī,鲺shī,濕shī,鍦shī,鯴shī,鰤shī,鶳shī,襹shī,籭shī,魳shī,失shī,褷shī,匙shí,十shí,什shí,石shí,辻shí,佦shí,时shí,竍shí,识shí,实shí,実shí,旹shí,飠shí,峕shí,拾shí,炻shí,祏shí,蚀shí,食shí,埘shí,寔shí,湜shí,遈shí,塒shí,嵵shí,溡shí,鉐shí,實shí,榯shí,蝕shí,鉽shí,篒shí,鲥shí,鮖shí,鼫shí,識shí,鼭shí,鰣shí,時shí,史shǐ,矢shǐ,乨shǐ,豕shǐ,使shǐ,始shǐ,驶shǐ,兘shǐ,屎shǐ,榁shǐ,鉂shǐ,駛shǐ,笶shǐ,饣shì,莳shì,蒔shì,士shì,氏shì,礻shì,世shì,丗shì,仕shì,市shì,示shì,卋shì,式shì,事shì,侍shì,势shì,呩shì,视shì,试shì,饰shì,冟shì,室shì,恀shì,恃shì,拭shì,枾shì,柿shì,眂shì,贳shì,适shì,栻shì,烒shì,眎shì,眡shì,舐shì,轼shì,逝shì,铈shì,視shì,釈shì,弑shì,揓shì,谥shì,貰shì,释shì,勢shì,嗜shì,弒shì,煶shì,睗shì,筮shì,試shì,軾shì,鈰shì,鉃shì,飾shì,舓shì,誓shì,適shì,奭shì,噬shì,嬕shì,澨shì,諡shì,遾shì,螫shì,簭shì,籂shì,襫shì,釋shì,鰘shì,佀shì,鎩shì,是shì,収shōu,收shōu,手shǒu,守shǒu,垨shǒu,首shǒu,艏shǒu,醻shòu,寿shòu,受shòu,狩shòu,兽shòu,售shòu,授shòu,绶shòu,痩shòu,膄shòu,壽shòu,瘦shòu,綬shòu,夀shòu,獣shòu,獸shòu,鏉shòu,书shū,殳shū,抒shū,纾shū,叔shū,枢shū,姝shū,柕shū,倏shū,倐shū,書shū,殊shū,紓shū,掓shū,梳shū,淑shū,焂shū,菽shū,軗shū,鄃shū,疎shū,疏shū,舒shū,摅shū,毹shū,毺shū,綀shū,输shū,踈shū,樞shū,蔬shū,輸shū,鮛shū,瀭shū,鵨shū,陎shū,尗shú,秫shú,婌shú,孰shú,赎shú,塾shú,熟shú,璹shú,贖shú,暑shǔ,黍shǔ,署shǔ,鼠shǔ,鼡shǔ,蜀shǔ,潻shǔ,薯shǔ,曙shǔ,癙shǔ,糬shǔ,籔shǔ,蠴shǔ,鱰shǔ,属shǔ,屬shǔ,鱪shǔ,丨shù,术shù,戍shù,束shù,沭shù,述shù,怷shù,树shù,竖shù,荗shù,恕shù,庶shù,庻shù,絉shù,蒁shù,術shù,裋shù,数shù,竪shù,腧shù,墅shù,漱shù,潄shù,數shù,豎shù,樹shù,濖shù,錰shù,鏣shù,鶐shù,虪shù,捒shù,忄shù,澍shù,刷shuā,唰shuā,耍shuǎ,誜shuà,缞shuāi,縗shuāi,衰shuāi,摔shuāi,甩shuǎi,帅shuài,帥shuài,蟀shuài,闩shuān,拴shuān,閂shuān,栓shuān,涮shuàn,腨shuàn,双shuāng,脽shuí,誰shuí,水shuǐ,氺shuǐ,閖shuǐ,帨shuì,涗shuì,涚shuì,稅shuì,税shuì,裞shuì,説shuì,睡shuì,吮shǔn,顺shùn,舜shùn,順shùn,蕣shùn,橓shùn,瞚shùn,瞤shùn,瞬shùn,鬊shùn,说shuō,說shuō,妁shuò,烁shuò,朔shuò,铄shuò,欶shuò,硕shuò,矟shuò,搠shuò,蒴shuò,槊shuò,碩shuò,爍shuò,鑠shuò,洬shuò,燿shuò,鎙shuò,愢sī,厶sī,丝sī,司sī,糹sī,私sī,咝sī,泀sī,俬sī,思sī,恖sī,鸶sī,媤sī,斯sī,絲sī,缌sī,蛳sī,楒sī,禗sī,鉰sī,飔sī,凘sī,厮sī,榹sī,禠sī,罳sī,锶sī,嘶sī,噝sī,廝sī,撕sī,澌sī,緦sī,蕬sī,螄sī,鍶sī,蟖sī,蟴sī,颸sī,騦sī,鐁sī,鷥sī,鼶sī,鷉sī,銯sī,死sǐ,灬sì,巳sì,亖sì,四sì,罒sì,寺sì,汜sì,伺sì,似sì,姒sì,泤sì,祀sì,価sì,孠sì,泗sì,饲sì,驷sì,俟sì,娰sì,柶sì,牭sì,洍sì,涘sì,肂sì,飤sì,笥sì,耜sì,釲sì,竢sì,覗sì,嗣sì,肆sì,貄sì,鈻sì,飼sì,禩sì,駟sì,儩sì,瀃sì,兕sì,蕼sì,螦so,乺sol,忪sōng,松sōng,枀sōng,枩sōng,娀sōng,柗sōng,倯sōng,凇sōng,梥sōng,崧sōng,庺sōng,淞sōng,菘sōng,嵩sōng,硹sōng,蜙sōng,憽sōng,檧sōng,濍sōng,怂sǒng,悚sǒng,耸sǒng,竦sǒng,愯sǒng,嵷sǒng,慫sǒng,聳sǒng,駷sǒng,鬆sòng,讼sòng,宋sòng,诵sòng,送sòng,颂sòng,訟sòng,頌sòng,誦sòng,餸sòng,鎹sòng,凁sōu,捜sōu,鄋sōu,嗖sōu,廀sōu,廋sōu,搜sōu,溲sōu,獀sōu,蒐sōu,蓃sōu,馊sōu,飕sōu,摗sōu,锼sōu,螋sōu,醙sōu,鎪sōu,餿sōu,颼sōu,騪sōu,叜sōu,艘sōu,叟sǒu,傁sǒu,嗾sǒu,瞍sǒu,擞sǒu,薮sǒu,擻sǒu,藪sǒu,櫢sǒu,嗽sòu,瘶sòu,苏sū,甦sū,酥sū,稣sū,窣sū,穌sū,鯂sū,蘇sū,蘓sū,櫯sū,囌sū,卹sū,俗sú,玊sù,诉sù,泝sù,肃sù,涑sù,珟sù,素sù,速sù,殐sù,粛sù,骕sù,傃sù,粟sù,訴sù,谡sù,嗉sù,塐sù,塑sù,嫊sù,愫sù,溯sù,溸sù,肅sù,遡sù,鹔sù,僳sù,榡sù,蔌sù,觫sù,趚sù,遬sù,憟sù,樎sù,樕sù,潥sù,鋉sù,餗sù,縤sù,璛sù,簌sù,藗sù,謖sù,蹜sù,驌sù,鱐sù,鷫sù,埣sù,夙sù,膆sù,狻suān,痠suān,酸suān,匴suǎn,祘suàn,笇suàn,筭suàn,蒜suàn,算suàn,夊suī,芕suī,虽suī,倠suī,哸suī,荽suī,荾suī,眭suī,滖suī,睢suī,濉suī,鞖suī,雖suī,簑suī,绥suí,隋suí,随suí,遀suí,綏suí,隨suí,瓍suí,遂suí,瀡suǐ,髄suǐ,髓suǐ,亗suì,岁suì,砕suì,谇suì,歲suì,歳suì,煫suì,碎suì,隧suì,嬘suì,澻suì,穂suì,誶suì,賥suì,檖suì,燧suì,璲suì,禭suì,穗suì,穟suì,襚suì,邃suì,旞suì,繐suì,繸suì,鐆suì,鐩suì,祟suì,譢suì,孙sūn,狲sūn,荪sūn,孫sūn,飧sūn,搎sūn,猻sūn,蓀sūn,槂sūn,蕵sūn,薞sūn,畃sún,损sǔn,笋sǔn,隼sǔn,筍sǔn,損sǔn,榫sǔn,箰sǔn,鎨sǔn,巺sùn,潠sùn,嗍suō,唆suō,娑suō,莏suō,傞suō,桫suō,梭suō,睃suō,嗦suō,羧suō,蓑suō,摍suō,缩suō,趖suō,簔suō,縮suō,髿suō,鮻suō,挲suō,所suǒ,唢suǒ,索suǒ,琐suǒ,琑suǒ,锁suǒ,嗩suǒ,暛suǒ,溑suǒ,瑣suǒ,鎖suǒ,鎻suǒ,鏁suǒ,嵗suò,蜶suò,逤suò,侤ta,澾ta,她tā,他tā,它tā,祂tā,咜tā,趿tā,铊tā,塌tā,榙tā,溻tā,鉈tā,褟tā,遢tā,蹹tá,塔tǎ,墖tǎ,獭tǎ,鳎tǎ,獺tǎ,鰨tǎ,沓tà,挞tà,狧tà,闼tà,崉tà,涾tà,遝tà,阘tà,榻tà,毾tà,禢tà,撻tà,誻tà,踏tà,嚃tà,錔tà,嚺tà,濌tà,蹋tà,鞜tà,闒tà,鞳tà,闥tà,譶tà,躢tà,傝tà,襨tae,漦tāi,咍tāi,囼tāi,孡tāi,胎tāi,駘tāi,檯tāi,斄tái,台tái,邰tái,坮tái,苔tái,炱tái,炲tái,菭tái,跆tái,鲐tái,箈tái,臺tái,颱tái,儓tái,鮐tái,嬯tái,擡tái,薹tái,籉tái,抬tái,呔tǎi,忕tài,太tài,冭tài,夳tài,忲tài,汰tài,态tài,肽tài,钛tài,泰tài,粏tài,舦tài,酞tài,鈦tài,溙tài,燤tài,態tài,坍tān,贪tān,怹tān,啴tān,痑tān,舑tān,貪tān,摊tān,滩tān,嘽tān,潬tān,瘫tān,擹tān,攤tān,灘tān,癱tān,镡tán,蕁tán,坛tán,昙tán,谈tán,郯tán,婒tán,覃tán,榃tán,痰tán,锬tán,谭tán,墵tán,憛tán,潭tán,談tán,壇tán,曇tán,錟tán,檀tán,顃tán,罈tán,藫tán,壜tán,譚tán,貚tán,醰tán,譠tán,罎tán,鷤tán,埮tán,鐔tán,墰tán,忐tǎn,坦tǎn,袒tǎn,钽tǎn,菼tǎn,毯tǎn,鉭tǎn,嗿tǎn,憳tǎn,憻tǎn,醓tǎn,璮tǎn,襢tǎn,緂tǎn,暺tǎn,叹tàn,炭tàn,探tàn,湠tàn,僋tàn,嘆tàn,碳tàn,舕tàn,歎tàn,汤tāng,铴tāng,湯tāng,嘡tāng,劏tāng,羰tāng,蝪tāng,薚tāng,蹚tāng,鐋tāng,鞺tāng,闛tāng,耥tāng,鼞tāng,镗táng,鏜táng,饧táng,坣táng,唐táng,堂táng,傏táng,啺táng,棠táng,鄌táng,塘táng,搪táng,溏táng,蓎táng,隚táng,榶táng,漟táng,煻táng,瑭táng,禟táng,膅táng,樘táng,磄táng,糃táng,膛táng,橖táng,篖táng,糖táng,螗táng,踼táng,糛táng,赯táng,醣táng,餳táng,鎕táng,餹táng,饄táng,鶶táng,螳táng,攩tǎng,伖tǎng,帑tǎng,倘tǎng,淌tǎng,傥tǎng,躺tǎng,镋tǎng,鎲tǎng,儻tǎng,戃tǎng,曭tǎng,爣tǎng,矘tǎng,钂tǎng,烫tàng,摥tàng,趟tàng,燙tàng,漡tàng,焘tāo,轁tāo,涭tāo,仐tāo,弢tāo,绦tāo,掏tāo,絛tāo,詜tāo,嫍tāo,幍tāo,慆tāo,搯tāo,滔tāo,槄tāo,瑫tāo,韬tāo,飸tāo,縚tāo,縧tāo,濤tāo,謟tāo,鞱tāo,韜tāo,饕tāo,饀tāo,燾tāo,涛tāo,迯táo,咷táo,洮táo,逃táo,桃táo,陶táo,啕táo,梼táo,淘táo,萄táo,祹táo,裪táo,綯táo,蜪táo,鞀táo,醄táo,鞉táo,鋾táo,駣táo,檮táo,騊táo,鼗táo,绹táo,讨tǎo,討tǎo,套tào,畓tap,忑tè,特tè,貣tè,脦tè,犆tè,铽tè,慝tè,鋱tè,蟘tè,螣tè,鰧teng,膯tēng,鼟tēng,疼téng,痋téng,幐téng,腾téng,誊téng,漛téng,滕téng,邆téng,縢téng,駦téng,謄téng,儯téng,藤téng,騰téng,籐téng,籘téng,虅téng,驣téng,霯tèng,唞teo,朰teul,剔tī,梯tī,锑tī,踢tī,銻tī,鷈tī,鵜tī,躰tī,骵tī,軆tī,擿tī,姼tí,褆tí,扌tí,虒tí,磃tí,绨tí,偍tí,啼tí,媞tí,崹tí,惿tí,提tí,稊tí,缇tí,罤tí,遆tí,鹈tí,嗁tí,瑅tí,綈tí,徲tí,漽tí,緹tí,蕛tí,蝭tí,题tí,趧tí,蹄tí,醍tí,謕tí,鍗tí,題tí,鮷tí,騠tí,鯷tí,鶗tí,鶙tí,穉tí,厗tí,鳀tí,徥tǐ,体tǐ,挮tǐ,體tǐ,衹tǐ,戻tì,屉tì,剃tì,洟tì,倜tì,悌tì,涕tì,逖tì,屜tì,悐tì,惕tì,掦tì,逷tì,惖tì,替tì,裼tì,褅tì,歒tì,殢tì,髰tì,薙tì,嚏tì,鬀tì,嚔tì,瓋tì,籊tì,鐟tì,楴tì,天tiān,兲tiān,婖tiān,添tiān,酟tiān,靔tiān,黇tiān,靝tiān,呑tiān,瞋tián,田tián,屇tián,沺tián,恬tián,畋tián,畑tián,盷tián,胋tián,甛tián,甜tián,菾tián,湉tián,塡tián,填tián,搷tián,阗tián,碵tián,磌tián,窴tián,鴫tián,璳tián,闐tián,鷆tián,鷏tián,餂tián,寘tián,畠tián,鍩tiǎn,忝tiǎn,殄tiǎn,倎tiǎn,唺tiǎn,悿tiǎn,捵tiǎn,淟tiǎn,晪tiǎn,琠tiǎn,腆tiǎn,觍tiǎn,睓tiǎn,覥tiǎn,賟tiǎn,錪tiǎn,娗tiǎn,铦tiǎn,銛tiǎn,紾tiǎn,舔tiǎn,掭tiàn,瑱tiàn,睼tiàn,舚tiàn,旫tiāo,佻tiāo,庣tiāo,挑tiāo,祧tiāo,聎tiāo,苕tiáo,萔tiáo,芀tiáo,条tiáo,岧tiáo,岹tiáo,迢tiáo,祒tiáo,條tiáo,笤tiáo,蓚tiáo,蓨tiáo,龆tiáo,樤tiáo,蜩tiáo,鋚tiáo,髫tiáo,鲦tiáo,螩tiáo,鯈tiáo,鎥tiáo,齠tiáo,鰷tiáo,趒tiáo,銚tiáo,儵tiáo,鞗tiáo,宨tiǎo,晀tiǎo,朓tiǎo,脁tiǎo,窕tiǎo,窱tiǎo,眺tiào,粜tiào,覜tiào,跳tiào,頫tiào,糶tiào,怗tiē,贴tiē,萜tiē,聑tiē,貼tiē,帖tiē,蛈tiě,僣tiě,鴩tiě,鐵tiě,驖tiě,铁tiě,呫tiè,飻tiè,餮tiè,厅tīng,庁tīng,汀tīng,听tīng,耓tīng,厛tīng,烃tīng,烴tīng,綎tīng,鞓tīng,聴tīng,聼tīng,廰tīng,聽tīng,渟tīng,廳tīng,邒tíng,廷tíng,亭tíng,庭tíng,莛tíng,停tíng,婷tíng,嵉tíng,筳tíng,葶tíng,蜓tíng,楟tíng,榳tíng,閮tíng,霆tíng,聤tíng,蝏tíng,諪tíng,鼮tíng,珵tǐng,侱tǐng,圢tǐng,侹tǐng,挺tǐng,涏tǐng,梃tǐng,烶tǐng,珽tǐng,脡tǐng,颋tǐng,誔tǐng,頲tǐng,艇tǐng,乭tol,囲tōng,炵tōng,通tōng,痌tōng,嗵tōng,蓪tōng,樋tōng,熥tōng,爞tóng,冂tóng,燑tóng,仝tóng,同tóng,佟tóng,彤tóng,峂tóng,庝tóng,哃tóng,狪tóng,茼tóng,晍tóng,桐tóng,浵tóng,砼tóng,蚒tóng,秱tóng,铜tóng,童tóng,粡tóng,赨tóng,酮tóng,鉖tóng,僮tóng,鉵tóng,銅tóng,餇tóng,鲖tóng,潼tóng,獞tóng,曈tóng,朣tóng,橦tóng,氃tóng,犝tóng,膧tóng,瞳tóng,穜tóng,鮦tóng,眮tóng,统tǒng,捅tǒng,桶tǒng,筒tǒng,綂tǒng,統tǒng,恸tòng,痛tòng,慟tòng,憅tòng,偷tōu,偸tōu,鍮tōu,头tóu,投tóu,骰tóu,緰tóu,頭tóu,钭tǒu,妵tǒu,紏tǒu,敨tǒu,斢tǒu,黈tǒu,蘣tǒu,埱tòu,透tòu,綉tòu,宊tū,瑹tū,凸tū,禿tū,秃tū,突tū,涋tū,捸tū,堗tū,湥tū,痜tū,葖tū,嶀tū,鋵tū,鵚tū,鼵tū,唋tū,図tú,图tú,凃tú,峹tú,庩tú,徒tú,捈tú,涂tú,荼tú,途tú,屠tú,梌tú,揬tú,稌tú,塗tú,嵞tú,瘏tú,筡tú,鈯tú,圖tú,圗tú,廜tú,潳tú,酴tú,馟tú,鍎tú,駼tú,鵌tú,鶟tú,鷋tú,鷵tú,兎tú,菟tú,蒤tú,土tǔ,圡tǔ,吐tǔ,汢tǔ,钍tǔ,釷tǔ,迌tù,兔tù,莵tù,堍tù,鵵tù,湍tuān,猯tuān,煓tuān,蓴tuán,团tuán,団tuán,抟tuán,剸tuán,團tuán,塼tuán,慱tuán,摶tuán,槫tuán,漙tuán,篿tuán,檲tuán,鏄tuán,糰tuán,鷒tuán,鷻tuán,嫥tuán,鱄tuán,圕tuǎn,疃tuǎn,畽tuǎn,彖tuàn,湪tuàn,褖tuàn,貒tuàn,忒tuī,推tuī,蓷tuī,藬tuī,焞tuī,騩tuí,墤tuí,颓tuí,隤tuí,尵tuí,頹tuí,頺tuí,魋tuí,穨tuí,蘈tuí,蹪tuí,僓tuí,頽tuí,俀tuǐ,脮tuǐ,腿tuǐ,蹆tuǐ,骽tuǐ,退tuì,娧tuì,煺tuì,蛻tuì,蜕tuì,褪tuì,駾tuì,噋tūn,汭tūn,吞tūn,旽tūn,啍tūn,朜tūn,暾tūn,黗tūn,屯tún,忳tún,芚tún,饨tún,豚tún,軘tún,飩tún,鲀tún,魨tún,霕tún,臀tún,臋tún,坉tún,豘tún,氽tǔn,舃tuō,乇tuō,讬tuō,托tuō,汑tuō,饦tuō,杔tuō,侂tuō,咃tuō,拕tuō,拖tuō,侻tuō,挩tuō,捝tuō,莌tuō,袥tuō,託tuō,涶tuō,脱tuō,飥tuō,馲tuō,魠tuō,驝tuō,棁tuō,脫tuō,鱓tuó,鋖tuó,牠tuó,驮tuó,佗tuó,陀tuó,陁tuó,坨tuó,岮tuó,沱tuó,驼tuó,柁tuó,砣tuó,砤tuó,袉tuó,鸵tuó,紽tuó,堶tuó,跎tuó,酡tuó,碢tuó,馱tuó,槖tuó,踻tuó,駞tuó,橐tuó,鮀tuó,鴕tuó,鼧tuó,騨tuó,鼍tuó,驒tuó,鼉tuó,迆tuó,駝tuó,軃tuǒ,妥tuǒ,毤tuǒ,庹tuǒ,椭tuǒ,楕tuǒ,鵎tuǒ,拓tuò,柝tuò,唾tuò,萚tuò,跅tuò,毻tuò,箨tuò,蘀tuò,籜tuò,哇wa,窐wā,劸wā,徍wā,挖wā,洼wā,娲wā,畖wā,窊wā,媧wā,嗗wā,蛙wā,搲wā,溛wā,漥wā,窪wā,鼃wā,攨wā,屲wā,姽wá,譁wá,娃wá,瓦wǎ,佤wǎ,邷wǎ,咓wǎ,瓲wǎ,砙wǎ,韎wà,帓wà,靺wà,袜wà,聉wà,嗢wà,腽wà,膃wà,韈wà,韤wà,襪wà,咼wāi,瀤wāi,歪wāi,喎wāi,竵wāi,崴wǎi,外wài,顡wài,関wān,闗wān,夘wān,乛wān,弯wān,剜wān,婠wān,帵wān,塆wān,湾wān,睕wān,蜿wān,潫wān,豌wān,彎wān,壪wān,灣wān,埦wān,捥wān,丸wán,刓wán,汍wán,纨wán,芄wán,完wán,岏wán,忨wán,玩wán,笂wán,紈wán,捖wán,顽wán,烷wán,琓wán,貦wán,頑wán,蚖wán,抏wán,邜wǎn,宛wǎn,倇wǎn,唍wǎn,挽wǎn,晚wǎn,盌wǎn,莞wǎn,婉wǎn,惋wǎn,晩wǎn,梚wǎn,绾wǎn,脘wǎn,菀wǎn,晼wǎn,椀wǎn,琬wǎn,皖wǎn,碗wǎn,綩wǎn,綰wǎn,輓wǎn,鋔wǎn,鍐wǎn,莬wǎn,惌wǎn,魭wǎn,夗wǎn,畹wǎn,輐wàn,鄤wàn,孯wàn,掔wàn,万wàn,卍wàn,卐wàn,妧wàn,杤wàn,腕wàn,萬wàn,翫wàn,鋄wàn,薍wàn,錽wàn,贃wàn,鎫wàn,贎wàn,脕wàn,尩wāng,尪wāng,尫wāng,汪wāng,瀇wāng,亡wáng,仼wáng,彺wáng,莣wáng,蚟wáng,王wáng,抂wǎng,网wǎng,忹wǎng,往wǎng,徃wǎng,枉wǎng,罔wǎng,惘wǎng,菵wǎng,暀wǎng,棢wǎng,焹wǎng,蛧wǎng,辋wǎng,網wǎng,蝄wǎng,誷wǎng,輞wǎng,魍wǎng,迬wǎng,琞wàng,妄wàng,忘wàng,迋wàng,旺wàng,盳wàng,望wàng,朢wàng,威wēi,烓wēi,偎wēi,逶wēi,隇wēi,隈wēi,喴wēi,媁wēi,媙wēi,愄wēi,揋wēi,揻wēi,渨wēi,煀wēi,葨wēi,葳wēi,微wēi,椳wēi,楲wēi,溦wēi,煨wēi,詴wēi,縅wēi,蝛wēi,覣wēi,嶶wēi,薇wēi,燰wēi,鳂wēi,癐wēi,鰃wēi,鰄wēi,嵔wēi,蜲wēi,危wēi,巍wēi,恑wéi,撝wéi,囗wéi,为wéi,韦wéi,围wéi,帏wéi,沩wéi,违wéi,闱wéi,峗wéi,峞wéi,洈wéi,為wéi,韋wéi,桅wéi,涠wéi,唯wéi,帷wéi,惟wéi,维wéi,喡wéi,圍wéi,嵬wéi,幃wéi,湋wéi,溈wéi,琟wéi,潍wéi,維wéi,蓶wéi,鄬wéi,潿wéi,醀wéi,濰wéi,鍏wéi,闈wéi,鮠wéi,癓wéi,覹wéi,犩wéi,霺wéi,僞wéi,寪wéi,觹wéi,觽wéi,觿wéi,欈wéi,違wéi,趡wěi,磈wěi,瓗wěi,膸wěi,撱wěi,鰖wěi,伟wěi,伪wěi,尾wěi,纬wěi,芛wěi,苇wěi,委wěi,炜wěi,玮wěi,洧wěi,娓wěi,捤wěi,浘wěi,诿wěi,偉wěi,偽wěi,崣wěi,梶wěi,硊wěi,萎wěi,隗wěi,骩wěi,廆wěi,徫wěi,愇wěi,猥wěi,葦wěi,蒍wěi,骪wěi,骫wěi,暐wěi,椲wěi,煒wěi,瑋wěi,痿wěi,腲wěi,艉wěi,韪wěi,碨wěi,鲔wěi,緯wěi,蔿wěi,諉wěi,踓wěi,韑wěi,頠wěi,薳wěi,儰wěi,濻wěi,鍡wěi,鮪wěi,壝wěi,韙wěi,颹wěi,瀢wěi,韡wěi,亹wěi,斖wěi,茟wěi,蜹wèi,爲wèi,卫wèi,未wèi,位wèi,味wèi,苿wèi,畏wèi,胃wèi,叞wèi,軎wèi,尉wèi,菋wèi,谓wèi,喂wèi,媦wèi,渭wèi,猬wèi,煟wèi,墛wèi,蔚wèi,慰wèi,熭wèi,犚wèi,磑wèi,緭wèi,蝟wèi,衛wèi,懀wèi,濊wèi,璏wèi,罻wèi,衞wèi,謂wèi,錗wèi,餧wèi,鮇wèi,螱wèi,褽wèi,餵wèi,魏wèi,藯wèi,鏏wèi,霨wèi,鳚wèi,蘶wèi,饖wèi,讆wèi,躗wèi,讏wèi,躛wèi,荱wèi,蜼wèi,硙wèi,轊wèi,昷wēn,塭wēn,温wēn,榅wēn,殟wēn,溫wēn,瑥wēn,辒wēn,榲wēn,瘟wēn,豱wēn,輼wēn,鳁wēn,鎾wēn,饂wēn,鰛wēn,鰮wēn,褞wēn,缊wēn,緼wēn,蕰wēn,縕wēn,薀wēn,藴wēn,鴖wén,亠wén,文wén,彣wén,纹wén,炆wén,砇wén,闻wén,紋wén,蚉wén,蚊wén,珳wén,阌wén,鈫wén,雯wén,瘒wén,聞wén,馼wén,魰wén,鳼wén,鴍wén,螡wén,閺wén,閿wén,蟁wén,闅wén,鼤wén,闦wén,芠wén,呅wěn,忞wěn,歾wěn,刎wěn,吻wěn,呚wěn,忟wěn,抆wěn,呡wěn,紊wěn,桽wěn,脗wěn,稳wěn,穏wěn,穩wěn,肳wěn,问wèn,妏wèn,汶wèn,問wèn,渂wèn,搵wèn,絻wèn,顐wèn,璺wèn,翁wēng,嗡wēng,鹟wēng,螉wēng,鎓wēng,鶲wēng,滃wēng,奣wěng,塕wěng,嵡wěng,蓊wěng,瞈wěng,聬wěng,暡wěng,瓮wèng,蕹wèng,甕wèng,罋wèng,齆wèng,堝wō,濄wō,薶wō,捼wō,挝wō,倭wō,涡wō,莴wō,唩wō,涹wō,渦wō,猧wō,萵wō,喔wō,窝wō,窩wō,蜗wō,撾wō,蝸wō,踒wō,涴wó,我wǒ,婐wǒ,婑wǒ,捰wǒ,龏wò,蒦wò,嚄wò,雘wò,艧wò,踠wò,仴wò,沃wò,肟wò,臥wò,偓wò,捾wò,媉wò,幄wò,握wò,渥wò,硪wò,楃wò,腛wò,斡wò,瞃wò,濣wò,瓁wò,龌wò,齷wò,枂wò,馧wò,卧wò,扝wū,乌wū,圬wū,弙wū,污wū,邬wū,呜wū,杇wū,巫wū,屋wū,洿wū,钨wū,烏wū,趶wū,剭wū,窏wū,釫wū,鄔wū,嗚wū,誈wū,誣wū,箼wū,螐wū,鴮wū,鎢wū,鰞wū,兀wū,杅wū,诬wū,幠wú,譕wú,蟱wú,墲wú,亾wú,兦wú,无wú,毋wú,吳wú,吴wú,吾wú,呉wú,芜wú,郚wú,娪wú,梧wú,洖wú,浯wú,茣wú,珸wú,祦wú,鹀wú,無wú,禑wú,蜈wú,蕪wú,璑wú,鵐wú,鯃wú,鼯wú,鷡wú,俉wú,憮wú,橆wú,铻wú,鋙wú,莁wú,陚wǔ,瞴wǔ,娒wǔ,乄wǔ,五wǔ,午wǔ,仵wǔ,伍wǔ,妩wǔ,庑wǔ,忤wǔ,怃wǔ,迕wǔ,旿wǔ,武wǔ,玝wǔ,侮wǔ,倵wǔ,捂wǔ,娬wǔ,牾wǔ,珷wǔ,摀wǔ,熓wǔ,碔wǔ,鹉wǔ,瑦wǔ,舞wǔ,嫵wǔ,廡wǔ,潕wǔ,錻wǔ,儛wǔ,甒wǔ,鵡wǔ,躌wǔ,逜wǔ,膴wǔ,啎wǔ,噁wù,雺wù,渞wù,揾wù,坞wù,塢wù,勿wù,务wù,戊wù,阢wù,伆wù,屼wù,扤wù,岉wù,杌wù,忢wù,物wù,矹wù,敄wù,误wù,務wù,悞wù,悟wù,悮wù,粅wù,晤wù,焐wù,婺wù,嵍wù,痦wù,隖wù,靰wù,骛wù,奦wù,嵨wù,溩wù,雾wù,寤wù,熃wù,誤wù,鹜wù,鋈wù,窹wù,鼿wù,霧wù,齀wù,騖wù,鶩wù,芴wù,霚wù,扱xī,糦xī,宩xī,獡xī,蜤xī,燍xī,夕xī,兮xī,汐xī,西xī,覀xī,吸xī,希xī,扸xī,卥xī,昔xī,析xī,矽xī,穸xī,肹xī,俙xī,徆xī,怸xī,郗xī,饻xī,唏xī,奚xī,屖xī,息xī,悕xī,晞xī,氥xī,浠xī,牺xī,狶xī,莃xī,唽xī,悉xī,惜xī,桸xī,欷xī,淅xī,渓xī,烯xī,焁xī,焈xī,琋xī,硒xī,菥xī,赥xī,釸xī,傒xī,惁xī,晰xī,晳xī,焟xī,犀xī,睎xī,稀xī,粞xī,翕xī,翖xī,舾xī,鄎xī,厀xī,嵠xī,徯xī,溪xī,煕xī,皙xī,蒠xī,锡xī,僖xī,榽xī,熄xī,熙xī,緆xī,蜥xī,豨xī,餏xī,嘻xī,噏xī,嬆xī,嬉xī,膝xī,餙xī,凞xī,樨xī,橀xī,歙xī,熹xī,熺xī,熻xī,窸xī,羲xī,螅xī,錫xī,燨xī,犠xī,瞦xī,礂xī,蟋xī,豀xī,豯xī,貕xī,繥xī,鯑xī,鵗xī,譆xī,鏭xī,隵xī,巇xī,曦xī,爔xī,犧xī,酅xī,鼷xī,蠵xī,鸂xī,鑴xī,憘xī,暿xī,鱚xī,咥xī,訢xī,娭xī,瘜xī,醯xī,雭xí,习xí,郋xí,席xí,習xí,袭xí,觋xí,媳xí,椺xí,蒵xí,蓆xí,嶍xí,漝xí,覡xí,趘xí,薂xí,檄xí,謵xí,鎴xí,霫xí,鳛xí,飁xí,騱xí,騽xí,襲xí,鰼xí,驨xí,隰xí,囍xǐ,杫xǐ,枲xǐ,洗xǐ,玺xǐ,徙xǐ,铣xǐ,喜xǐ,葈xǐ,葸xǐ,鈢xǐ,屣xǐ,漇xǐ,蓰xǐ,銑xǐ,憙xǐ,橲xǐ,禧xǐ,諰xǐ,壐xǐ,縰xǐ,謑xǐ,蟢xǐ,蹝xǐ,璽xǐ,躧xǐ,鉩xǐ,欪xì,钑xì,鈒xì,匸xì,卌xì,戏xì,屃xì,系xì,饩xì,呬xì,忥xì,怬xì,细xì,係xì,恄xì,绤xì,釳xì,阋xì,塈xì,椞xì,舄xì,趇xì,隙xì,慀xì,滊xì,禊xì,綌xì,赩xì,隟xì,熂xì,犔xì,潟xì,澙xì,蕮xì,覤xì,黖xì,戲xì,磶xì,虩xì,餼xì,鬩xì,嚱xì,霼xì,衋xì,細xì,闟xì,虾xiā,谺xiā,傄xiā,閕xiā,敮xiā,颬xiā,瞎xiā,蝦xiā,鰕xiā,魻xiā,郃xiá,匣xiá,侠xiá,狎xiá,俠xiá,峡xiá,柙xiá,炠xiá,狭xiá,陜xiá,峽xiá,烚xiá,狹xiá,珨xiá,祫xiá,硖xiá,舺xiá,陿xiá,溊xiá,硤xiá,遐xiá,暇xiá,瑕xiá,筪xiá,碬xiá,舝xiá,辖xiá,縀xiá,蕸xiá,縖xiá,赮xiá,轄xiá,鍜xiá,霞xiá,鎋xiá,黠xiá,騢xiá,鶷xiá,睱xiá,翈xiá,昰xià,丅xià,下xià,吓xià,圷xià,夏xià,梺xià,嚇xià,懗xià,罅xià,鏬xià,疜xià,姺xiān,仙xiān,仚xiān,屳xiān,先xiān,奾xiān,纤xiān,佡xiān,忺xiān,氙xiān,祆xiān,秈xiān,苮xiān,枮xiān,籼xiān,珗xiān,莶xiān,掀xiān,酰xiān,锨xiān,僊xiān,僲xiān,嘕xiān,鲜xiān,暹xiān,韯xiān,憸xiān,鍁xiān,繊xiān,褼xiān,韱xiān,鮮xiān,馦xiān,蹮xiān,廯xiān,譣xiān,鶱xiān,襳xiān,躚xiān,纖xiān,鱻xiān,縿xiān,跹xiān,咞xián,闲xián,妶xián,弦xián,贤xián,咸xián,挦xián,涎xián,胘xián,娴xián,娹xián,婱xián,舷xián,蚿xián,衔xián,啣xián,痫xián,蛝xián,閑xián,鹇xián,嫌xián,甉xián,銜xián,嫺xián,嫻xián,憪xián,澖xián,誸xián,賢xián,癇xián,癎xián,礥xián,贒xián,鑦xián,鷳xián,鷴xián,鷼xián,伭xián,冼xiǎn,狝xiǎn,显xiǎn,险xiǎn,毨xiǎn,烍xiǎn,猃xiǎn,蚬xiǎn,険xiǎn,赻xiǎn,筅xiǎn,尟xiǎn,尠xiǎn,禒xiǎn,蜆xiǎn,跣xiǎn,箲xiǎn,險xiǎn,獫xiǎn,獮xiǎn,藓xiǎn,鍌xiǎn,燹xiǎn,顕xiǎn,幰xiǎn,攇xiǎn,櫶xiǎn,蘚xiǎn,玁xiǎn,韅xiǎn,顯xiǎn,灦xiǎn,搟xiǎn,县xiàn,岘xiàn,苋xiàn,现xiàn,线xiàn,臽xiàn,限xiàn,姭xiàn,宪xiàn,陥xiàn,哯xiàn,垷xiàn,娨xiàn,峴xiàn,晛xiàn,莧xiàn,陷xiàn,現xiàn,馅xiàn,睍xiàn,絤xiàn,缐xiàn,羡xiàn,献xiàn,粯xiàn,羨xiàn,腺xiàn,僩xiàn,僴xiàn,綫xiàn,誢xiàn,撊xiàn,線xiàn,鋧xiàn,憲xiàn,餡xiàn,豏xiàn,瀗xiàn,臔xiàn,獻xiàn,鏾xiàn,霰xiàn,鼸xiàn,脇xiàn,軐xiàn,県xiàn,縣xiàn,儴xiāng,勷xiāng,蘘xiāng,纕xiāng,乡xiāng,芗xiāng,香xiāng,郷xiāng,厢xiāng,鄉xiāng,鄊xiāng,廂xiāng,湘xiāng,缃xiāng,葙xiāng,鄕xiāng,楿xiāng,薌xiāng,箱xiāng,緗xiāng,膷xiāng,忀xiāng,骧xiāng,麘xiāng,欀xiāng,瓖xiāng,镶xiāng,鱜xiāng,鑲xiāng,驤xiāng,襄xiāng,佭xiáng,详xiáng,庠xiáng,栙xiáng,祥xiáng,絴xiáng,翔xiáng,詳xiáng,跭xiáng,享xiǎng,亯xiǎng,响xiǎng,蚃xiǎng,饷xiǎng,晑xiǎng,飨xiǎng,想xiǎng,餉xiǎng,鲞xiǎng,蠁xiǎng,鮝xiǎng,鯗xiǎng,響xiǎng,饗xiǎng,饟xiǎng,鱶xiǎng,傢xiàng,相xiàng,向xiàng,姠xiàng,巷xiàng,项xiàng,珦xiàng,象xiàng,缿xiàng,萫xiàng,項xiàng,像xiàng,勨xiàng,嶑xiàng,橡xiàng,襐xiàng,蟓xiàng,鐌xiàng,鱌xiàng,鋞xiàng,鬨xiàng,嚮xiàng,鵁xiāo,莦xiāo,颵xiāo,箾xiāo,潚xiāo,橚xiāo,灱xiāo,灲xiāo,枭xiāo,侾xiāo,哓xiāo,枵xiāo,骁xiāo,宯xiāo,宵xiāo,庨xiāo,恷xiāo,消xiāo,绡xiāo,虓xiāo,逍xiāo,鸮xiāo,啋xiāo,婋xiāo,梟xiāo,焇xiāo,猇xiāo,萧xiāo,痚xiāo,痟xiāo,硝xiāo,硣xiāo,窙xiāo,翛xiāo,萷xiāo,销xiāo,揱xiāo,綃xiāo,歊xiāo,箫xiāo,嘵xiāo,撨xiāo,獢xiāo,銷xiāo,霄xiāo,彇xiāo,膮xiāo,蕭xiāo,魈xiāo,鴞xiāo,穘xiāo,簘xiāo,蟂xiāo,蟏xiāo,鴵xiāo,嚣xiāo,瀟xiāo,簫xiāo,蟰xiāo,髇xiāo,囂xiāo,髐xiāo,鷍xiāo,驍xiāo,毊xiāo,虈xiāo,肖xiāo,哮xiāo,烋xiāo,潇xiāo,蠨xiāo,洨xiáo,崤xiáo,淆xiáo,誵xiáo,笹xiǎo,小xiǎo,晓xiǎo,暁xiǎo,筱xiǎo,筿xiǎo,曉xiǎo,篠xiǎo,謏xiǎo,皢xiǎo,孝xiào,効xiào,咲xiào,俲xiào,效xiào,校xiào,涍xiào,笑xiào,傚xiào,敩xiào,滧xiào,詨xiào,嘋xiào,嘨xiào,誟xiào,嘯xiào,熽xiào,斅xiào,斆xiào,澩xiào,啸xiào,些xiē,楔xiē,歇xiē,蝎xiē,蠍xiē,协xié,旪xié,邪xié,協xié,胁xié,垥xié,恊xié,拹xié,脋xié,衺xié,偕xié,斜xié,谐xié,翓xié,嗋xié,愶xié,携xié,瑎xié,綊xié,熁xié,膎xié,勰xié,撷xié,擕xié,緳xié,缬xié,蝢xié,鞋xié,諧xié,燲xié,擷xié,鞵xié,襭xié,攜xié,讗xié,龤xié,魼xié,脅xié,纈xié,写xiě,冩xiě,寫xiě,藛xiě,烲xiè,榝xiè,齛xiè,碿xiè,伳xiè,灺xiè,泄xiè,泻xiè,祄xiè,绁xiè,缷xiè,卸xiè,洩xiè,炧xiè,炨xiè,卨xiè,娎xiè,屑xiè,屓xiè,偰xiè,徢xiè,械xiè,焎xiè,禼xiè,亵xiè,媟xiè,屟xiè,渫xiè,絬xiè,谢xiè,僁xiè,塮xiè,榍xiè,榭xiè,褉xiè,噧xiè,屧xiè,暬xiè,韰xiè,廨xiè,懈xiè,澥xiè,獬xiè,糏xiè,薢xiè,薤xiè,邂xiè,燮xiè,褻xiè,謝xiè,夑xiè,瀉xiè,鞢xiè,瀣xiè,蟹xiè,蠏xiè,齘xiè,齥xiè,齂xiè,躠xiè,屭xiè,躞xiè,蝑xiè,揳xiè,爕xiè,噺xin,心xīn,邤xīn,妡xīn,忻xīn,芯xīn,辛xīn,昕xīn,杺xīn,欣xīn,盺xīn,俽xīn,惞xīn,锌xīn,新xīn,歆xīn,鋅xīn,嬜xīn,薪xīn,馨xīn,鑫xīn,馫xīn,枔xín,襑xín,潃xǐn,阠xìn,伩xìn,囟xìn,孞xìn,炘xìn,信xìn,脪xìn,衅xìn,訫xìn,焮xìn,舋xìn,釁xìn,狌xīng,星xīng,垶xīng,骍xīng,猩xīng,煋xīng,鷞shuāng,骦shuāng,縔shuǎng,艭shuāng,塽shuǎng,壯zhuàng,状zhuàng,狀zhuàng,壵zhuàng,梉zhuàng,瑆xīng,腥xīng,蛵xīng,觪xīng,箵xīng,篂xīng,謃xīng,鮏xīng,曐xīng,觲xīng,騂xīng,皨xīng,鯹xīng,嬹xīng,惺xīng,刑xíng,邢xíng,形xíng,陉xíng,侀xíng,哘xíng,型xíng,洐xíng,娙xíng,硎xíng,铏xíng,鉶xíng,裄xíng,睲xǐng,醒xǐng,擤xǐng,兴xìng,興xìng,杏xìng,姓xìng,幸xìng,性xìng,荇xìng,倖xìng,莕xìng,婞xìng,悻xìng,涬xìng,緈xìng,臖xìng,凶xiōng,兄xiōng,兇xiōng,匈xiōng,芎xiōng,讻xiōng,忷xiōng,汹xiōng,恟xiōng,洶xiōng,胷xiōng,胸xiōng,訩xiōng,詾xiōng,哅xiōng,雄xióng,熊xióng,诇xiòng,詗xiòng,敻xiòng,休xiū,俢xiū,修xiū,咻xiū,庥xiū,烌xiū,羞xiū,脙xiū,鸺xiū,臹xiū,貅xiū,馐xiū,樇xiū,銝xiū,髤xiū,髹xiū,鮴xiū,鵂xiū,饈xiū,鏅xiū,飍xiū,鎀xiū,苬xiú,宿xiǔ,朽xiǔ,綇xiǔ,滫xiǔ,糔xiǔ,臰xiù,秀xiù,岫xiù,珛xiù,绣xiù,袖xiù,琇xiù,锈xiù,溴xiù,璓xiù,螑xiù,繍xiù,繡xiù,鏥xiù,鏽xiù,齅xiù,嗅xiù,蓿xu,繻xū,圩xū,旴xū,疞xū,盱xū,欨xū,胥xū,须xū,顼xū,虗xū,虚xū,谞xū,媭xū,幁xū,欻xū,虛xū,須xū,楈xū,窢xū,頊xū,嘘xū,稰xū,需xū,魆xū,噓xū,墟xū,嬃xū,歔xū,縃xū,歘xū,諝xū,譃xū,魖xū,驉xū,鑐xū,鬚xū,姁xū,偦xū,戌xū,蕦xū,俆xú,徐xú,蒣xú,訏xǔ,许xǔ,诩xǔ,冔xǔ,栩xǔ,珝xǔ,許xǔ,湑xǔ,暊xǔ,詡xǔ,鄦xǔ,糈xǔ,醑xǔ,盨xǔ,滀xù,嘼xù,鉥xù,旭xù,伵xù,序xù,侐xù,沀xù,叙xù,恤xù,昫xù,洫xù,垿xù,欰xù,殈xù,烅xù,珬xù,勖xù,勗xù,敍xù,敘xù,烼xù,绪xù,续xù,酗xù,喣xù,壻xù,婿xù,朂xù,溆xù,絮xù,訹xù,慉xù,続xù,蓄xù,賉xù,槒xù,漵xù,潊xù,盢xù,瞁xù,緒xù,聟xù,稸xù,緖xù,瞲xù,藚xù,續xù,怴xù,芧xù,汿xù,煦xù,煖xuān,吅xuān,轩xuān,昍xuān,咺xuān,宣xuān,晅xuān,軒xuān,谖xuān,喧xuān,媗xuān,愃xuān,愋xuān,揎xuān,萱xuān,萲xuān,暄xuān,煊xuān,瑄xuān,蓒xuān,睻xuān,儇xuān,禤xuān,箮xuān,翧xuān,蝖xuān,蕿xuān,諠xuān,諼xuān,鍹xuān,駽xuān,矎xuān,翾xuān,藼xuān,蘐xuān,蠉xuān,譞xuān,鰚xuān,塇xuān,玹xuán,痃xuán,悬xuán,旋xuán,蜁xuán,嫙xuán,漩xuán,暶xuán,璇xuán,檈xuán,璿xuán,懸xuán,玆xuán,玄xuán,选xuǎn,選xuǎn,癣xuǎn,癬xuǎn,絃xuàn,夐xuàn,怰xuàn,泫xuàn,昡xuàn,炫xuàn,绚xuàn,眩xuàn,袨xuàn,铉xuàn,琄xuàn,眴xuàn,衒xuàn,絢xuàn,楦xuàn,鉉xuàn,碹xuàn,蔙xuàn,镟xuàn,颴xuàn,縼xuàn,繏xuàn,鏇xuàn,贙xuàn,駨xuàn,渲xuàn,疶xuē,蒆xuē,靴xuē,薛xuē,鞾xuē,削xuē,噱xué,穴xué,斈xué,乴xué,坹xué,学xué,岤xué,峃xué,茓xué,泶xué,袕xué,鸴xué,學xué,嶨xué,燢xué,雤xué,鷽xué,踅xué,雪xuě,樰xuě,膤xuě,艝xuě,轌xuě,鳕xuě,鱈xuě,血xuè,泧xuè,狘xuè,桖xuè,烕xuè,谑xuè,趐xuè,瀥xuè,坃xūn,勋xūn,埙xūn,塤xūn,熏xūn,窨xūn,勲xūn,勳xūn,薫xūn,嚑xūn,壎xūn,獯xūn,薰xūn,曛xūn,燻xūn,臐xūn,矄xūn,蘍xūn,壦xūn,爋xūn,纁xūn,醺xūn,勛xūn,郇xún,咰xún,寻xún,巡xún,旬xún,杊xún,询xún,峋xún,恂xún,浔xún,紃xún,荀xún,栒xún,桪xún,毥xún,珣xún,偱xún,尋xún,循xún,揗xún,詢xún,鄩xún,鲟xún,噚xún,潯xún,攳xún,樳xún,燅xún,燖xún,璕xún,蟳xún,鱏xún,鱘xún,侚xún,彐xún,撏xún,洵xún,浚xùn,濬xùn,鶽xùn,驯xùn,馴xùn,卂xùn,训xùn,伨xùn,汛xùn,迅xùn,徇xùn,狥xùn,迿xùn,逊xùn,殉xùn,訊xùn,訓xùn,訙xùn,奞xùn,巽xùn,殾xùn,遜xùn,愻xùn,賐xùn,噀xùn,蕈xùn,顨xùn,鑂xùn,稄xùn,讯xùn,呀ya,圧yā,丫yā,压yā,庘yā,押yā,鸦yā,桠yā,鸭yā,铔yā,椏yā,鴉yā,錏yā,鴨yā,壓yā,鵶yā,鐚yā,唖yā,亜yā,垭yā,俹yā,埡yā,孲yā,拁yá,疨yá,牙yá,伢yá,岈yá,芽yá,厓yá,枒yá,琊yá,笌yá,蚜yá,堐yá,崕yá,崖yá,涯yá,猚yá,瑘yá,睚yá,衙yá,漄yá,齖yá,庌yá,顔yá,釾yá,疋yǎ,厊yǎ,啞yǎ,痖yǎ,雅yǎ,瘂yǎ,蕥yǎ,挜yǎ,掗yǎ,哑yǎ,呾yà,輵yà,潝yà,劜yà,圠yà,亚yà,穵yà,襾yà,讶yà,犽yà,迓yà,亞yà,玡yà,娅yà,砑yà,氩yà,婭yà,訝yà,揠yà,氬yà,猰yà,圔yà,稏yà,窫yà,椻yà,鼼yà,聐yà,淊yān,咽yān,恹yān,剦yān,烟yān,珚yān,胭yān,偣yān,崦yān,淹yān,焉yān,菸yān,阉yān,湮yān,腌yān,傿yān,煙yān,鄢yān,嫣yān,漹yān,嶖yān,樮yān,醃yān,閹yān,嬮yān,篶yān,臙yān,黫yān,弇yān,硽yān,慇yān,黰yān,橪yān,阽yán,炏yán,挻yán,厃yán,唌yán,廵yán,讠yán,円yán,延yán,闫yán,严yán,妍yán,言yán,訁yán,岩yán,昖yán,沿yán,炎yán,郔yán,姸yán,娫yán,狿yán,研yán,莚yán,娮yán,盐yán,琂yán,硏yán,訮yán,閆yán,阎yán,嵒yán,嵓yán,綖yán,蜒yán,塩yán,揅yán,楌yán,詽yán,碞yán,蔅yán,颜yán,虤yán,閻yán,厳yán,檐yán,顏yán,嚴yán,壛yán,巌yán,簷yán,櫩yán,麙yán,壧yán,孍yán,巖yán,巗yán,巚yán,欕yán,礹yán,鹽yán,麣yán,黬yán,偐yán,贗yán,菴yǎn,剡yǎn,嬐yǎn,崄yǎn,嶮yǎn,抁yǎn,沇yǎn,乵yǎn,兖yǎn,奄yǎn,俨yǎn,兗yǎn,匽yǎn,衍yǎn,偃yǎn,厣yǎn,掩yǎn,眼yǎn,萒yǎn,郾yǎn,酓yǎn,嵃yǎn,愝yǎn,扊yǎn,揜yǎn,棪yǎn,渰yǎn,渷yǎn,琰yǎn,隒yǎn,椼yǎn,罨yǎn,演yǎn,褗yǎn,蝘yǎn,魇yǎn,噞yǎn,躽yǎn,檿yǎn,黡yǎn,厴yǎn,甗yǎn,鰋yǎn,鶠yǎn,黤yǎn,齞yǎn,儼yǎn,黭yǎn,顩yǎn,鼴yǎn,巘yǎn,曮yǎn,魘yǎn,鼹yǎn,齴yǎn,黶yǎn,掞yǎn,隁yǎn,喭yǎn,酀yǎn,龂yǎn,齗yǎn,阭yǎn,夵yǎn,裺yǎn,溎yàn,豜yàn,豣yàn,烻yàn,湺yàn,麲yàn,厌yàn,妟yàn,牪yàn,姲yàn,彥yàn,彦yàn,砚yàn,唁yàn,宴yàn,晏yàn,艳yàn,覎yàn,验yàn,焔yàn,谚yàn,堰yàn,敥yàn,焰yàn,焱yàn,猒yàn,硯yàn,葕yàn,雁yàn,滟yàn,鳫yàn,厭yàn,墕yàn,熖yàn,酽yàn,嬊yàn,谳yàn,餍yàn,鴈yàn,燄yàn,燕yàn,諺yàn,赝yàn,鬳yàn,曕yàn,騐yàn,験yàn,嚥yàn,嬿yàn,艶yàn,贋yàn,軅yàn,爓yàn,醶yàn,騴yàn,鷃yàn,灔yàn,觾yàn,讌yàn,饜yàn,驗yàn,鷰yàn,艷yàn,灎yàn,釅yàn,驠yàn,灧yàn,讞yàn,豓yàn,豔yàn,灩yàn,顑yàn,懕yàn,筵yàn,觃yàn,暥yàn,醼yàn,歍yāng,央yāng,咉yāng,姎yāng,抰yāng,泱yāng,殃yāng,胦yāng,眏yāng,秧yāng,鸯yāng,鉠yāng,雵yāng,鞅yāng,鍈yāng,鴦yāng,佒yāng,霙yāng,瑒yáng,婸yáng,扬yáng,羊yáng,阦yáng,旸yáng,杨yáng,炀yáng,佯yáng,劷yáng,氜yáng,疡yáng,钖yáng,飏yáng,垟yáng,徉yáng,昜yáng,洋yáng,羏yáng,烊yáng,珜yáng,眻yáng,陽yáng,崵yáng,崸yáng,揚yáng,蛘yáng,敭yáng,暘yáng,楊yáng,煬yáng,禓yáng,瘍yáng,諹yáng,輰yáng,鴹yáng,颺yáng,鐊yáng,鰑yáng,霷yáng,鸉yáng,阳yáng,鍚yáng,飬yǎng,勜yǎng,仰yǎng,坱yǎng,奍yǎng,岟yǎng,养yǎng,炴yǎng,氧yǎng,痒yǎng,紻yǎng,傟yǎng,楧yǎng,軮yǎng,慃yǎng,氱yǎng,羪yǎng,養yǎng,駚yǎng,懩yǎng,攁yǎng,瀁yǎng,癢yǎng,礢yǎng,柍yǎng,恙yàng,样yàng,羕yàng,詇yàng,様yàng,漾yàng,樣yàng,怏yàng,玅yāo,撽yāo,幺yāo,夭yāo,吆yāo,妖yāo,枖yāo,祅yāo,訞yāo,喓yāo,葽yāo,楆yāo,腰yāo,邀yāo,宎yāo,侥yáo,僥yáo,蕘yáo,匋yáo,恌yáo,铫yáo,爻yáo,尧yáo,尭yáo,肴yáo,垚yáo,姚yáo,峣yáo,轺yáo,倄yáo,珧yáo,窑yáo,傜yáo,堯yáo,揺yáo,殽yáo,谣yáo,軺yáo,嗂yáo,媱yáo,徭yáo,愮yáo,搖yáo,摇yáo,猺yáo,遙yáo,遥yáo,摿yáo,暚yáo,榣yáo,瑤yáo,瑶yáo,飖yáo,餆yáo,嶢yáo,嶤yáo,徺yáo,磘yáo,窯yáo,餚yáo,繇yáo,謠yáo,謡yáo,鎐yáo,鳐yáo,颻yáo,蘨yáo,顤yáo,鰩yáo,鷂yáo,踰yáo,烑yáo,窰yáo,噛yǎo,仸yǎo,岆yǎo,抭yǎo,杳yǎo,殀yǎo,狕yǎo,苭yǎo,咬yǎo,柼yǎo,窅yǎo,窈yǎo,舀yǎo,偠yǎo,婹yǎo,崾yǎo,溔yǎo,蓔yǎo,榚yǎo,闄yǎo,騕yǎo,齩yǎo,鷕yǎo,穾yǎo,鴢yǎo,烄yào,药yào,要yào,袎yào,窔yào,筄yào,葯yào,詏yào,熎yào,覞yào,靿yào,獟yào,鹞yào,薬yào,曜yào,艞yào,藥yào,矅yào,曣yào,耀yào,纅yào,讑yào,鑰yào,怮yào,箹yào,钥yào,籥yào,亪ye,椰yē,暍yē,噎yē,潱yē,蠮yē,耶yē,吔yē,倻yē,峫yé,爷yé,捓yé,揶yé,铘yé,爺yé,鋣yé,鎁yé,擨yé,蠱yě,虵yě,也yě,冶yě,埜yě,野yě,嘢yě,漜yě,壄yě,瓛yè,熀yè,殕yè,啘yè,鐷yè,緤yè,业yè,叶yè,曳yè,页yè,邺yè,夜yè,亱yè,枼yè,洂yè,頁yè,捙yè,晔yè,枽yè,烨yè,偞yè,掖yè,液yè,谒yè,殗yè,腋yè,葉yè,鄓yè,墷yè,楪yè,業yè,馌yè,僷yè,曄yè,曅yè,歋yè,燁yè,擖yè,擛yè,皣yè,瞱yè,靥yè,嶪yè,嶫yè,澲yè,謁yè,餣yè,嚈yè,擫yè,曗yè,瞸yè,鍱yè,擪yè,爗yè,礏yè,鎑yè,饁yè,鵺yè,靨yè,驜yè,鸈yè,黦yè,煠yè,抴yè,鄴yè,膶yen,岃yen,袆yī,褘yī,一yī,弌yī,辷yī,衤yī,伊yī,衣yī,医yī,吚yī,依yī,祎yī,咿yī,洢yī,猗yī,畩yī,郼yī,铱yī,壹yī,揖yī,欹yī,蛜yī,禕yī,嫛yī,漪yī,稦yī,銥yī,嬄yī,噫yī,夁yī,瑿yī,鹥yī,繄yī,檹yī,毉yī,醫yī,黟yī,譩yī,鷖yī,黳yī,悘yī,壱yī,耛yí,拸yí,訑yí,釶yí,鉇yí,箷yí,戺yí,珆yí,鴺yí,銕yí,狏yí,迱yí,彵yí,熈yí,仪yí,匜yí,圯yí,夷yí,冝yí,宐yí,杝yí,沂yí,诒yí,侇yí,宜yí,怡yí,沶yí,狋yí,衪yí,饴yí,咦yí,姨yí,峓yí,弬yí,恞yí,柂yí,瓵yí,荑yí,贻yí,迻yí,宧yí,巸yí,扅yí,桋yí,眙yí,胰yí,袘yí,痍yí,移yí,萓yí,媐yí,椬yí,羠yí,蛦yí,詒yí,貽yí,遗yí,暆yí,椸yí,誃yí,跠yí,頉yí,颐yí,飴yí,疑yí,儀yí,熪yí,遺yí,嶬yí,彛yí,彜yí,螔yí,頥yí,寲yí,嶷yí,簃yí,顊yí,鮧yí,彝yí,彞yí,謻yí,鏔yí,籎yí,觺yí,讉yí,鸃yí,貤yí,乁yí,栘yí,頤yí,钀yǐ,錡yǐ,裿yǐ,迤yǐ,酏yǐ,乙yǐ,已yǐ,以yǐ,钇yǐ,佁yǐ,攺yǐ,矣yǐ,苡yǐ,苢yǐ,庡yǐ,舣yǐ,蚁yǐ,釔yǐ,倚yǐ,扆yǐ,逘yǐ,偯yǐ,崺yǐ,旑yǐ,椅yǐ,鈘yǐ,鉯yǐ,鳦yǐ,旖yǐ,輢yǐ,敼yǐ,螘yǐ,檥yǐ,礒yǐ,艤yǐ,蟻yǐ,顗yǐ,轙yǐ,齮yǐ,肊yǐ,陭yǐ,嬟yǐ,醷yǐ,阤yǐ,叕yǐ,锜yǐ,歖yǐ,笖yǐ,昳yì,睪yì,欥yì,輗yì,掜yì,儗yì,謚yì,紲yì,絏yì,辥yì,义yì,亿yì,弋yì,刈yì,忆yì,艺yì,仡yì,匇yì,议yì,亦yì,伇yì,屹yì,异yì,忔yì,芅yì,伿yì,佚yì,劮yì,呓yì,坄yì,役yì,抑yì,曵yì,杙yì,耴yì,苅yì,译yì,邑yì,佾yì,呭yì,呹yì,妷yì,峄yì,怈yì,怿yì,易yì,枍yì,泆yì,炈yì,绎yì,诣yì,驿yì,俋yì,奕yì,帟yì,帠yì,弈yì,枻yì,浂yì,玴yì,疫yì,羿yì,衵yì,轶yì,唈yì,垼yì,悒yì,挹yì,栧yì,栺yì,欭yì,浥yì,浳yì,益yì,袣yì,谊yì,勚yì,埸yì,悥yì,殹yì,異yì,羛yì,翊yì,翌yì,萟yì,訲yì,訳yì,豙yì,豛yì,逸yì,釴yì,隿yì,幆yì,敡yì,晹yì,棭yì,殔yì,湙yì,焲yì,蛡yì,詍yì,跇yì,軼yì,鈠yì,骮yì,亄yì,意yì,溢yì,獈yì,痬yì,竩yì,缢yì,義yì,肄yì,裔yì,裛yì,詣yì,勩yì,嫕yì,廙yì,榏yì,潩yì,瘗yì,膉yì,蓺yì,蜴yì,靾yì,駅yì,億yì,撎yì,槸yì,毅yì,熠yì,熤yì,熼yì,瘞yì,镒yì,鹝yì,鹢yì,黓yì,劓yì,圛yì,墿yì,嬑yì,嶧yì,憶yì,懌yì,曀yì,殪yì,澺yì,燚yì,瘱yì,瞖yì,穓yì,縊yì,艗yì,薏yì,螠yì,褹yì,寱yì,斁yì,曎yì,檍yì,歝yì,燡yì,翳yì,翼yì,臆yì,貖yì,鮨yì,癔yì,藙yì,藝yì,贀yì,鎰yì,镱yì,繶yì,繹yì,豷yì,霬yì,鯣yì,鶂yì,鶃yì,鶍yì,瀷yì,蘙yì,譯yì,議yì,醳yì,饐yì,囈yì,鐿yì,鷁yì,鷊yì,襼yì,驛yì,鷧yì,虉yì,鷾yì,讛yì,齸yì,襗yì,樴yì,癦yì,焬yì,阣yì,兿yì,誼yì,燱yì,懿yì,鮣yin,乚yīn,囙yīn,因yīn,阥yīn,阴yīn,侌yīn,垔yīn,姻yīn,洇yīn,茵yīn,荫yīn,音yīn,骃yīn,栶yīn,殷yīn,氤yīn,陰yīn,凐yīn,秵yīn,裀yīn,铟yīn,陻yīn,堙yīn,婣yīn,愔yīn,筃yīn,絪yīn,歅yīn,溵yīn,禋yīn,蒑yīn,蔭yīn,瘖yīn,銦yīn,磤yīn,緸yīn,鞇yīn,諲yīn,霒yīn,駰yīn,噾yīn,濦yīn,闉yīn,霠yīn,韾yīn,喑yīn,玪yín,伒yín,乑yín,吟yín,犾yín,苂yín,斦yín,泿yín,圁yín,峾yín,烎yín,狺yín,珢yín,粌yín,荶yín,訔yín,唫yín,婬yín,寅yín,崟yín,崯yín,淫yín,訡yín,银yín,鈝yín,滛yín,碒yín,鄞yín,夤yín,蔩yín,訚yín,誾yín,銀yín,龈yín,噖yín,殥yín,嚚yín,檭yín,蟫yín,霪yín,齦yín,鷣yín,螾yín,垠yín,璌yín,赺yǐn,縯yǐn,尹yǐn,引yǐn,吲yǐn,饮yǐn,蚓yǐn,隐yǐn,淾yǐn,釿yǐn,鈏yǐn,飲yǐn,隠yǐn,靷yǐn,飮yǐn,朄yǐn,趛yǐn,檃yǐn,瘾yǐn,隱yǐn,嶾yǐn,濥yǐn,蘟yǐn,癮yǐn,讔yǐn,輑yǐn,櫽yǐn,堷yìn,梀yìn,隂yìn,印yìn,茚yìn,洕yìn,胤yìn,垽yìn,湚yìn,猌yìn,廕yìn,酳yìn,慭yìn,癊yìn,憖yìn,憗yìn,懚yìn,檼yìn,韹yīng,焽yīng,旲yīng,应yīng,応yīng,英yīng,偀yīng,桜yīng,珱yīng,莺yīng,啨yīng,婴yīng,媖yīng,愥yīng,渶yīng,朠yīng,煐yīng,瑛yīng,嫈yīng,碤yīng,锳yīng,嘤yīng,撄yīng,甇yīng,緓yīng,缨yīng,罂yīng,蝧yīng,賏yīng,樱yīng,璎yīng,噟yīng,罃yīng,褮yīng,鴬yīng,鹦yīng,嬰yīng,應yīng,膺yīng,韺yīng,甖yīng,鹰yīng,嚶yīng,孆yīng,孾yīng,攖yīng,瀴yīng,罌yīng,蘡yīng,櫻yīng,瓔yīng,礯yīng,譻yīng,鶯yīng,鑍yīng,纓yīng,蠳yīng,鷪yīng,軈yīng,鷹yīng,鸎yīng,鸚yīng,謍yīng,譍yīng,绬yīng,鶧yīng,夃yíng,俓yíng,泂yíng,嵤yíng,桯yíng,滎yíng,鎣yíng,盁yíng,迎yíng,茔yíng,盈yíng,荥yíng,荧yíng,莹yíng,萤yíng,营yíng,萦yíng,営yíng,溁yíng,溋yíng,萾yíng,僌yíng,塋yíng,楹yíng,滢yíng,蓥yíng,潆yíng,熒yíng,蝇yíng,瑩yíng,蝿yíng,嬴yíng,營yíng,縈yíng,螢yíng,濙yíng,濚yíng,濴yíng,藀yíng,覮yíng,赢yíng,巆yíng,攍yíng,攚yíng,瀛yíng,瀠yíng,蠅yíng,櫿yíng,灐yíng,籝yíng,灜yíng,贏yíng,籯yíng,耺yíng,蛍yíng,瀯yíng,瀅yíng,矨yǐng,郢yǐng,浧yǐng,梬yǐng,颍yǐng,颕yǐng,颖yǐng,摬yǐng,影yǐng,潁yǐng,瘿yǐng,穎yǐng,頴yǐng,巊yǐng,廮yǐng,鐛yǐng,癭yǐng,鱦yìng,映yìng,暎yìng,硬yìng,媵yìng,膡yìng,鞕yìng,嚛yo,哟yō,唷yō,喲yō,拥yōng,痈yōng,邕yōng,庸yōng,嗈yōng,鄘yōng,雍yōng,墉yōng,嫞yōng,慵yōng,滽yōng,槦yōng,牅yōng,銿yōng,噰yōng,壅yōng,擁yōng,澭yōng,郺yōng,镛yōng,臃yōng,癕yōng,雝yōng,鏞yōng,廱yōng,灉yōng,饔yōng,鱅yōng,鷛yōng,癰yōng,鳙yōng,揘yóng,喁yóng,鰫yóng,嵱yóng,筩yǒng,永yǒng,甬yǒng,咏yǒng,怺yǒng,泳yǒng,俑yǒng,勇yǒng,勈yǒng,栐yǒng,埇yǒng,悀yǒng,柡yǒng,涌yǒng,恿yǒng,傛yǒng,惥yǒng,愑yǒng,湧yǒng,硧yǒng,詠yǒng,彮yǒng,愹yǒng,蛹yǒng,慂yǒng,踊yǒng,禜yǒng,鲬yǒng,踴yǒng,鯒yǒng,塎yǒng,佣yòng,用yòng,苚yòng,砽yòng,醟yòng,妋yōu,优yōu,忧yōu,攸yōu,呦yōu,幽yōu,悠yōu,麀yōu,滺yōu,憂yōu,優yōu,鄾yōu,嚘yōu,懮yōu,瀀yōu,纋yōu,耰yōu,逌yōu,泈yōu,櫌yōu,蓧yóu,蚘yóu,揂yóu,汼yóu,汓yóu,蝤yóu,尣yóu,冘yóu,尢yóu,尤yóu,由yóu,沋yóu,犹yóu,邮yóu,怞yóu,油yóu,肬yóu,怣yóu,斿yóu,疣yóu,峳yóu,浟yóu,秞yóu,莜yóu,莤yóu,莸yóu,郵yóu,铀yóu,偤yóu,蚰yóu,訧yóu,逰yóu,游yóu,猶yóu,鱿yóu,楢yóu,猷yóu,鈾yóu,鲉yóu,輏yóu,駀yóu,蕕yóu,蝣yóu,魷yóu,輶yóu,鮋yóu,櫾yóu,邎yóu,庮yóu,甴yóu,遊yóu,羗yǒu,脩yǒu,戭yǒu,友yǒu,有yǒu,丣yǒu,卣yǒu,苃yǒu,酉yǒu,羑yǒu,羐yǒu,莠yǒu,梄yǒu,聈yǒu,脜yǒu,铕yǒu,湵yǒu,蒏yǒu,蜏yǒu,銪yǒu,槱yǒu,牖yǒu,牗yǒu,黝yǒu,栯yǒu,禉yǒu,痏yòu,褎yòu,褏yòu,銹yòu,柚yòu,又yòu,右yòu,幼yòu,佑yòu,侑yòu,孧yòu,狖yòu,糿yòu,哊yòu,囿yòu,姷yòu,宥yòu,峟yòu,牰yòu,祐yòu,诱yòu,迶yòu,唀yòu,蚴yòu,亴yòu,貁yòu,釉yòu,酭yòu,鼬yòu,誘yòu,纡yū,迂yū,迃yū,穻yū,陓yū,紆yū,虶yū,唹yū,淤yū,盓yū,瘀yū,箊yū,亐yū,丂yú,桙yú,婾yú,媮yú,悇yú,汙yú,汚yú,鱮yú,颙yú,顒yú,渝yú,于yú,邘yú,伃yú,余yú,妤yú,扵yú,欤yú,玗yú,玙yú,於yú,盂yú,臾yú,鱼yú,俞yú,兪yú,禺yú,竽yú,舁yú,茰yú,荢yú,娛yú,娯yú,娱yú,狳yú,谀yú,酑yú,馀yú,渔yú,萸yú,釪yú,隃yú,隅yú,雩yú,魚yú,堣yú,堬yú,崳yú,嵎yú,嵛yú,愉yú,揄yú,楰yú,畬yú,畭yú,硢yú,腴yú,逾yú,骬yú,愚yú,楡yú,榆yú,歈yú,牏yú,瑜yú,艅yú,虞yú,觎yú,漁yú,睮yú,窬yú,舆yú,褕yú,歶yú,羭yú,蕍yú,蝓yú,諛yú,雓yú,餘yú,魣yú,嬩yú,懙yú,覦yú,歟yú,璵yú,螸yú,輿yú,鍝yú,礖yú,謣yú,髃yú,鮽yú,旟yú,籅yú,騟yú,鯲yú,鰅yú,鷠yú,鸆yú,萮yú,芌yú,喩yú,媀yú,貗yú,衧yú,湡yú,澞yú,頨yǔ,蝺yǔ,藇yǔ,予yǔ,与yǔ,伛yǔ,宇yǔ,屿yǔ,羽yǔ,雨yǔ,俁yǔ,俣yǔ,挧yǔ,禹yǔ,语yǔ,圄yǔ,祤yǔ,偊yǔ,匬yǔ,圉yǔ,庾yǔ,敔yǔ,鄅yǔ,萭yǔ,傴yǔ,寙yǔ,斞yǔ,楀yǔ,瑀yǔ,瘐yǔ,與yǔ,語yǔ,窳yǔ,龉yǔ,噳yǔ,嶼yǔ,貐yǔ,斔yǔ,麌yǔ,蘌yǔ,齬yǔ,穥yǔ,峿yǔ,閼yù,穀yù,蟈yù,僪yù,鐍yù,肀yù,翑yù,衘yù,獝yù,玉yù,驭yù,圫yù,聿yù,芋yù,妪yù,忬yù,饫yù,育yù,郁yù,彧yù,昱yù,狱yù,秗yù,俼yù,峪yù,浴yù,砡yù,钰yù,预yù,喐yù,域yù,堉yù,悆yù,惐yù,欲yù,淢yù,淯yù,袬yù,逳yù,阈yù,喅yù,喻yù,寓yù,庽yù,御yù,棛yù,棜yù,棫yù,焴yù,琙yù,矞yù,裕yù,遇yù,飫yù,馭yù,鹆yù,愈yù,滪yù,煜yù,稢yù,罭yù,蒮yù,蓣yù,誉yù,鈺yù,預yù,嶎yù,戫yù,毓yù,獄yù,瘉yù,緎yù,蜟yù,蜮yù,輍yù,銉yù,隩yù,噊yù,慾yù,稶yù,蓹yù,薁yù,豫yù,遹yù,鋊yù,鳿yù,澦yù,燏yù,燠yù,蕷yù,諭yù,錥yù,閾yù,鴥yù,鴧yù,鴪yù,礇yù,禦yù,魊yù,鹬yù,癒yù,礜yù,篽yù,繘yù,鵒yù,櫲yù,饇yù,蘛yù,譽yù,轝yù,鐭yù,霱yù,欎yù,驈yù,鬻yù,籞yù,鱊yù,鷸yù,鸒yù,欝yù,軉yù,鬰yù,鬱yù,灪yù,爩yù,灹yù,吁yù,谕yù,嫗yù,儥yù,籲yù,裷yuān,嫚yuān,囦yuān,鸢yuān,剈yuān,冤yuān,弲yuān,悁yuān,眢yuān,鸳yuān,寃yuān,渁yuān,渆yuān,渊yuān,渕yuān,淵yuān,葾yuān,棩yuān,蒬yuān,蜎yuān,鹓yuān,箢yuān,鳶yuān,蜵yuān,駌yuān,鋺yuān,鴛yuān,嬽yuān,鵷yuān,灁yuān,鼝yuān,蝝yuān,鼘yuān,喛yuán,楥yuán,芫yuán,元yuán,贠yuán,邧yuán,员yuán,园yuán,沅yuán,杬yuán,垣yuán,爰yuán,貟yuán,原yuán,員yuán,圆yuán,笎yuán,袁yuán,厡yuán,酛yuán,圎yuán,援yuán,湲yuán,猨yuán,缘yuán,鈨yuán,鼋yuán,園yuán,圓yuán,塬yuán,媴yuán,源yuán,溒yuán,猿yuán,獂yuán,蒝yuán,榞yuán,榬yuán,辕yuán,緣yuán,縁yuán,蝯yuán,橼yuán,羱yuán,薗yuán,螈yuán,謜yuán,轅yuán,黿yuán,鎱yuán,櫞yuán,邍yuán,騵yuán,鶢yuán,鶰yuán,厵yuán,傆yuán,媛yuán,褑yuán,褤yuán,嫄yuán,远yuǎn,盶yuǎn,遠yuǎn,逺yuǎn,肙yuàn,妴yuàn,苑yuàn,怨yuàn,院yuàn,垸yuàn,衏yuàn,掾yuàn,瑗yuàn,禐yuàn,愿yuàn,裫yuàn,噮yuàn,願yuàn,哕yue,噦yuē,曰yuē,曱yuē,约yuē,約yuē,矱yuē,彟yuē,彠yuē,矆yuè,妜yuè,髺yuè,哾yuè,趯yuè,月yuè,戉yuè,汋yuè,岄yuè,抈yuè,礿yuè,岳yuè,玥yuè,恱yuè,悅yuè,悦yuè,蚎yuè,蚏yuè,軏yuè,钺yuè,阅yuè,捳yuè,跀yuè,跃yuè,粤yuè,越yuè,鈅yuè,粵yuè,鉞yuè,閱yuè,閲yuè,嬳yuè,樾yuè,篗yuè,嶽yuè,籆yuè,瀹yuè,蘥yuè,爚yuè,禴yuè,躍yuè,鸑yuè,籰yuè,龥yuè,鸙yuè,躒yuè,刖yuè,龠yuè,涒yūn,轀yūn,蒀yūn,煴yūn,蒕yūn,熅yūn,奫yūn,赟yūn,頵yūn,贇yūn,氲yūn,氳yūn,晕yūn,暈yūn,云yún,勻yún,匀yún,伝yún,呍yún,囩yún,妘yún,抣yún,纭yún,芸yún,昀yún,畇yún,眃yún,秐yún,郧yún,涢yún,紜yún,耘yún,鄖yún,雲yún,愪yún,溳yún,筼yún,蒷yún,熉yún,澐yún,蕓yún,鋆yún,橒yún,篔yún,縜yún,繧yún,荺yún,沄yún,允yǔn,夽yǔn,狁yǔn,玧yǔn,陨yǔn,殒yǔn,喗yǔn,鈗yǔn,隕yǔn,殞yǔn,馻yǔn,磒yǔn,霣yǔn,齫yǔn,齳yǔn,抎yǔn,緷yùn,孕yùn,运yùn,枟yùn,郓yùn,恽yùn,鄆yùn,酝yùn,傊yùn,惲yùn,愠yùn,運yùn,慍yùn,韫yùn,韵yùn,熨yùn,蕴yùn,賱yùn,醖yùn,醞yùn,餫yùn,韗yùn,韞yùn,蘊yùn,韻yùn,腪yùn,噈zā,帀zā,匝zā,沞zā,咂zā,拶zā,沯zā,桚zā,紮zā,鉔zā,臜zā,臢zā,砸zá,韴zá,雑zá,襍zá,雜zá,雥zá,囋zá,杂zá,咋zǎ,災zāi,灾zāi,甾zāi,哉zāi,栽zāi,烖zāi,渽zāi,溨zāi,睵zāi,賳zāi,宰zǎi,载zǎi,崽zǎi,載zǎi,仔zǎi,再zài,在zài,扗zài,洅zài,傤zài,酨zài,儎zài,篸zān,兂zān,糌zān,簪zān,簮zān,鐕zān,撍zān,咱zán,偺zán,喒zǎn,昝zǎn,寁zǎn,儧zǎn,攒zǎn,儹zǎn,趱zǎn,趲zǎn,揝zǎn,穳zàn,暂zàn,暫zàn,賛zàn,赞zàn,錾zàn,鄼zàn,濽zàn,蹔zàn,酂zàn,瓉zàn,贊zàn,鏨zàn,瓒zàn,灒zàn,讃zàn,瓚zàn,禶zàn,襸zàn,讚zàn,饡zàn,酇zàn,匨zāng,蔵zāng,牂zāng,羘zāng,赃zāng,賍zāng,臧zāng,賘zāng,贓zāng,髒zāng,贜zāng,脏zāng,驵zǎng,駔zǎng,奘zàng,弉zàng,塟zàng,葬zàng,銺zàng,臓zàng,臟zàng,傮zāo,遭zāo,糟zāo,醩zāo,蹧zāo,凿záo,鑿záo,早zǎo,枣zǎo,栆zǎo,蚤zǎo,棗zǎo,璅zǎo,澡zǎo,璪zǎo,薻zǎo,藻zǎo,灶zào,皁zào,皂zào,唕zào,唣zào,造zào,梍zào,慥zào,煰zào,艁zào,噪zào,簉zào,燥zào,竃zào,譟zào,趮zào,竈zào,躁zào,啫zē,伬zé,则zé,択zé,沢zé,择zé,泎zé,泽zé,责zé,迮zé,則zé,啧zé,帻zé,笮zé,舴zé,責zé,溭zé,嘖zé,嫧zé,幘zé,箦zé,蔶zé,樍zé,歵zé,諎zé,赜zé,擇zé,皟zé,瞔zé,礋zé,謮zé,賾zé,蠌zé,齚zé,齰zé,鸅zé,讁zé,葃zé,澤zé,仄zè,夨zè,庂zè,汄zè,昃zè,昗zè,捑zè,崱zè,贼zéi,賊zéi,鲗zéi,蠈zéi,鰂zéi,鱡zéi,怎zěn,谮zèn,囎zèn,譛zèn,曽zēng,増zēng,鄫zēng,增zēng,憎zēng,缯zēng,橧zēng,熷zēng,璔zēng,矰zēng,磳zēng,罾zēng,繒zēng,譄zēng,鱛zēng,縡zēng,鬷zěng,锃zèng,鋥zèng,甑zèng,赠zèng,贈zèng,馇zha,餷zha,蹅zhā,紥zhā,迊zhā,抯zhā,挓zhā,柤zhā,哳zhā,偧zhā,揸zhā,渣zhā,溠zhā,楂zhā,劄zhā,皶zhā,箚zhā,樝zhā,皻zhā,譇zhā,齄zhā,齇zhā,扎zhā,摣zhā,藸zhā,囃zhā,喳zhā,箑zhá,耫zhá,札zhá,轧zhá,軋zhá,闸zhá,蚻zhá,铡zhá,牐zhá,閘zhá,霅zhá,鍘zhá,譗zhá,挿zhǎ,揷zhǎ,厏zhǎ,苲zhǎ,砟zhǎ,鲊zhǎ,鲝zhǎ,踷zhǎ,鮓zhǎ,鮺zhǎ,眨zhǎ,吒zhà,乍zhà,诈zhà,咤zhà,奓zhà,炸zhà,宱zhà,痄zhà,蚱zhà,詐zhà,搾zhà,榨zhà,醡zhà,拃zhà,柞zhà,夈zhāi,粂zhāi,捚zhāi,斋zhāi,斎zhāi,榸zhāi,齋zhāi,摘zhāi,檡zhái,宅zhái,翟zhái,窄zhǎi,鉙zhǎi,骴zhài,簀zhài,债zhài,砦zhài,債zhài,寨zhài,瘵zhài,沾zhān,毡zhān,旃zhān,栴zhān,粘zhān,蛅zhān,惉zhān,詀zhān,趈zhān,詹zhān,閚zhān,谵zhān,嶦zhān,薝zhān,邅zhān,霑zhān,氊zhān,瞻zhān,鹯zhān,旜zhān,譫zhān,饘zhān,鳣zhān,驙zhān,魙zhān,鸇zhān,覱zhān,氈zhān,讝zhán,斩zhǎn,飐zhǎn,展zhǎn,盏zhǎn,崭zhǎn,斬zhǎn,琖zhǎn,搌zhǎn,盞zhǎn,嶃zhǎn,嶄zhǎn,榐zhǎn,颭zhǎn,嫸zhǎn,醆zhǎn,蹍zhǎn,欃zhàn,占zhàn,佔zhàn,战zhàn,栈zhàn,桟zhàn,站zhàn,偡zhàn,绽zhàn,菚zhàn,棧zhàn,湛zhàn,戦zhàn,綻zhàn,嶘zhàn,輚zhàn,戰zhàn,虥zhàn,虦zhàn,轏zhàn,蘸zhàn,驏zhàn,张zhāng,張zhāng,章zhāng,鄣zhāng,嫜zhāng,彰zhāng,慞zhāng,漳zhāng,獐zhāng,粻zhāng,蔁zhāng,遧zhāng,暲zhāng,樟zhāng,璋zhāng,餦zhāng,蟑zhāng,鏱zhāng,騿zhāng,鱆zhāng,麞zhāng,涱zhāng,傽zhāng,长zhǎng,仧zhǎng,長zhǎng,镸zhǎng,仉zhǎng,涨zhǎng,掌zhǎng,漲zhǎng,幥zhǎng,礃zhǎng,鞝zhǎng,鐣zhǎng,丈zhàng,仗zhàng,扙zhàng,杖zhàng,胀zhàng,账zhàng,粀zhàng,帳zhàng,脹zhàng,痮zhàng,障zhàng,墇zhàng,嶂zhàng,幛zhàng,賬zhàng,瘬zhàng,瘴zhàng,瞕zhàng,帐zhàng,鼌zhāo,鼂zhāo,謿zhāo,皽zhāo,佋zhāo,钊zhāo,妱zhāo,巶zhāo,招zhāo,昭zhāo,炤zhāo,盄zhāo,釗zhāo,鉊zhāo,駋zhāo,鍣zhāo,爫zhǎo,沼zhǎo,瑵zhǎo,爪zhǎo,找zhǎo,召zhào,兆zhào,诏zhào,枛zhào,垗zhào,狣zhào,赵zhào,笊zhào,肁zhào,旐zhào,棹zhào,罀zhào,詔zhào,照zhào,罩zhào,肇zhào,肈zhào,趙zhào,曌zhào,燳zhào,鮡zhào,櫂zhào,瞾zhào,羄zhào,啅zhào,龑yan,著zhe,着zhe,蜇zhē,嫬zhē,遮zhē,嗻zhē,摂zhé,歽zhé,砓zhé,籷zhé,虴zhé,哲zhé,埑zhé,粍zhé,袩zhé,啠zhé,悊zhé,晢zhé,晣zhé,辄zhé,喆zhé,蛰zhé,詟zhé,谪zhé,摺zhé,輒zhé,磔zhé,輙zhé,辙zhé,蟄zhé,嚞zhé,謫zhé,鮿zhé,轍zhé,襵zhé,讋zhé,厇zhé,謺zhé,者zhě,锗zhě,赭zhě,褶zhě,鍺zhě,这zhè,柘zhè,浙zhè,這zhè,淛zhè,蔗zhè,樜zhè,鹧zhè,蟅zhè,鷓zhè,趂zhēn,贞zhēn,针zhēn,侦zhēn,浈zhēn,珍zhēn,珎zhēn,貞zhēn,帪zhēn,栕zhēn,眞zhēn,真zhēn,砧zhēn,祯zhēn,針zhēn,偵zhēn,敒zhēn,桭zhēn,酙zhēn,寊zhēn,湞zhēn,遉zhēn,搸zhēn,斟zhēn,楨zhēn,獉zhēn,甄zhēn,禎zhēn,蒖zhēn,蓁zhēn,鉁zhēn,靕zhēn,榛zhēn,殝zhēn,瑧zhēn,禛zhēn,潧zhēn,樼zhēn,澵zhēn,臻zhēn,薽zhēn,錱zhēn,轃zhēn,鍖zhēn,鱵zhēn,胗zhēn,侲zhēn,揕zhēn,鎭zhēn,帧zhēn,幀zhēn,朾zhēn,椹zhēn,桢zhēn,箴zhēn,屒zhén,诊zhěn,抮zhěn,枕zhěn,姫zhěn,弫zhěn,昣zhěn,轸zhěn,畛zhěn,疹zhěn,眕zhěn,袗zhěn,聄zhěn,萙zhěn,裖zhěn,覙zhěn,診zhěn,軫zhěn,缜zhěn,稹zhěn,駗zhěn,縝zhěn,縥zhěn,辴zhěn,鬒zhěn,嫃zhěn,謓zhèn,迧zhèn,圳zhèn,阵zhèn,纼zhèn,挋zhèn,陣zhèn,鸩zhèn,振zhèn,朕zhèn,栚zhèn,紖zhèn,眹zhèn,赈zhèn,塦zhèn,絼zhèn,蜄zhèn,敶zhèn,誫zhèn,賑zhèn,鋴zhèn,镇zhèn,鴆zhèn,鎮zhèn,震zhèn,嶒zhēng,脀zhēng,凧zhēng,争zhēng,佂zhēng,姃zhēng,征zhēng,怔zhēng,爭zhēng,峥zhēng,炡zhēng,狰zhēng,烝zhēng,眐zhēng,钲zhēng,埩zhēng,崝zhēng,崢zhēng,猙zhēng,睁zhēng,聇zhēng,铮zhēng,媜zhēng,筝zhēng,徰zhēng,蒸zhēng,鉦zhēng,箏zhēng,徵zhēng,踭zhēng,篜zhēng,錚zhēng,鬇zhēng,癥zhēng,糽zhēng,睜zhēng,氶zhěng,抍zhěng,拯zhěng,塣zhěng,晸zhěng,愸zhěng,撜zhěng,整zhěng,憕zhèng,徎zhèng,挣zhèng,掙zhèng,正zhèng,证zhèng,诤zhèng,郑zhèng,政zhèng,症zhèng,証zhèng,鄭zhèng,鴊zhèng,證zhèng,諍zhèng,之zhī,支zhī,卮zhī,汁zhī,芝zhī,巵zhī,枝zhī,知zhī,织zhī,肢zhī,徔zhī,栀zhī,祗zhī,秓zhī,秖zhī,胑zhī,胝zhī,衼zhī,倁zhī,疷zhī,祬zhī,秪zhī,脂zhī,隻zhī,梔zhī,椥zhī,搘zhī,禔zhī,綕zhī,榰zhī,蜘zhī,馶zhī,鳷zhī,謢zhī,鴲zhī,織zhī,蘵zhī,鼅zhī,禵zhī,只zhī,鉄zhí,执zhí,侄zhí,坧zhí,直zhí,姪zhí,値zhí,值zhí,聀zhí,釞zhí,埴zhí,執zhí,职zhí,植zhí,殖zhí,絷zhí,跖zhí,墌zhí,摭zhí,馽zhí,嬂zhí,慹zhí,漐zhí,踯zhí,膱zhí,縶zhí,職zhí,蟙zhí,蹠zhí,軄zhí,躑zhí,秇zhí,埶zhí,戠zhí,禃zhí,茝zhǐ,絺zhǐ,觝zhǐ,徴zhǐ,止zhǐ,凪zhǐ,劧zhǐ,旨zhǐ,阯zhǐ,址zhǐ,坁zhǐ,帋zhǐ,沚zhǐ,纸zhǐ,芷zhǐ,抧zhǐ,祉zhǐ,茋zhǐ,咫zhǐ,恉zhǐ,指zhǐ,枳zhǐ,洔zhǐ,砋zhǐ,轵zhǐ,淽zhǐ,疻zhǐ,紙zhǐ,訨zhǐ,趾zhǐ,軹zhǐ,黹zhǐ,酯zhǐ,藢zhǐ,襧zhǐ,汦zhǐ,胵zhì,歭zhì,遟zhì,迣zhì,鶨zhì,亊zhì,銴zhì,至zhì,芖zhì,志zhì,忮zhì,扻zhì,豸zhì,厔zhì,垁zhì,帙zhì,帜zhì,治zhì,炙zhì,质zhì,郅zhì,俧zhì,峙zhì,庢zhì,庤zhì,栉zhì,洷zhì,祑zhì,陟zhì,娡zhì,徏zhì,挚zhì,晊zhì,桎zhì,狾zhì,秩zhì,致zhì,袟zhì,贽zhì,轾zhì,徝zhì,掷zhì,梽zhì,猘zhì,畤zhì,痔zhì,秲zhì,秷zhì,窒zhì,紩zhì,翐zhì,袠zhì,觗zhì,貭zhì,铚zhì,鸷zhì,傂zhì,崻zhì,彘zhì,智zhì,滞zhì,痣zhì,蛭zhì,骘zhì,廌zhì,滍zhì,稙zhì,稚zhì,置zhì,跱zhì,輊zhì,锧zhì,雉zhì,槜zhì,滯zhì,潌zhì,瘈zhì,製zhì,覟zhì,誌zhì,銍zhì,幟zhì,憄zhì,摯zhì,潪zhì,熫zhì,稺zhì,膣zhì,觯zhì,質zhì,踬zhì,鋕zhì,旘zhì,瀄zhì,緻zhì,隲zhì,鴙zhì,儨zhì,劕zhì,懥zhì,擲zhì,櫛zhì,懫zhì,贄zhì,櫍zhì,瓆zhì,觶zhì,騭zhì,礩zhì,豑zhì,騺zhì,驇zhì,躓zhì,鷙zhì,鑕zhì,豒zhì,制zhì,偫zhì,筫zhì,駤zhì,徸zhōng,蝩zhōng,中zhōng,伀zhōng,汷zhōng,刣zhōng,妐zhōng,彸zhōng,忠zhōng,炂zhōng,终zhōng,柊zhōng,盅zhōng,衳zhōng,钟zhōng,舯zhōng,衷zhōng,終zhōng,鈡zhōng,幒zhōng,蔠zhōng,锺zhōng,螤zhōng,鴤zhōng,螽zhōng,鍾zhōng,鼨zhōng,蹱zhōng,鐘zhōng,籦zhōng,衆zhōng,迚zhōng,肿zhǒng,种zhǒng,冢zhǒng,喠zhǒng,尰zhǒng,塚zhǒng,歱zhǒng,腫zhǒng,瘇zhǒng,種zhǒng,踵zhǒng,煄zhǒng,緟zhòng,仲zhòng,众zhòng,妕zhòng,狆zhòng,祌zhòng,茽zhòng,衶zhòng,重zhòng,蚛zhòng,偅zhòng,眾zhòng,堹zhòng,媑zhòng,筗zhòng,諥zhòng,啁zhōu,州zhōu,舟zhōu,诌zhōu,侜zhōu,周zhōu,洲zhōu,炿zhōu,诪zhōu,珘zhōu,辀zhōu,郮zhōu,婤zhōu,徟zhōu,矪zhōu,週zhōu,喌zhōu,粥zhōu,赒zhōu,輈zhōu,銂zhōu,賙zhōu,輖zhōu,霌zhōu,駲zhōu,嚋zhōu,盩zhōu,謅zhōu,譸zhōu,僽zhōu,諏zhōu,烐zhōu,妯zhóu,轴zhóu,軸zhóu,碡zhóu,肘zhǒu,帚zhǒu,菷zhǒu,晭zhǒu,睭zhǒu,箒zhǒu,鯞zhǒu,疛zhǒu,椆zhòu,詶zhòu,薵zhòu,纣zhòu,伷zhòu,呪zhòu,咒zhòu,宙zhòu,绉zhòu,冑zhòu,咮zhòu,昼zhòu,紂zhòu,胄zhòu,荮zhòu,晝zhòu,皱zhòu,酎zhòu,粙zhòu,葤zhòu,詋zhòu,甃zhòu,皺zhòu,駎zhòu,噣zhòu,縐zhòu,骤zhòu,籕zhòu,籒zhòu,驟zhòu,籀zhòu,蕏zhū,藷zhū,朱zhū,劯zhū,侏zhū,诛zhū,邾zhū,洙zhū,茱zhū,株zhū,珠zhū,诸zhū,猪zhū,硃zhū,袾zhū,铢zhū,絑zhū,蛛zhū,誅zhū,跦zhū,槠zhū,潴zhū,蝫zhū,銖zhū,橥zhū,諸zhū,豬zhū,駯zhū,鮢zhū,瀦zhū,櫧zhū,櫫zhū,鼄zhū,鯺zhū,蠩zhū,秼zhū,騶zhū,鴸zhū,薥zhú,鸀zhú,朮zhú,竹zhú,竺zhú,炢zhú,茿zhú,烛zhú,逐zhú,笜zhú,舳zhú,瘃zhú,蓫zhú,燭zhú,蠋zhú,躅zhú,鱁zhú,劚zhú,孎zhú,灟zhú,斸zhú,曯zhú,欘zhú,蠾zhú,钃zhú,劅zhú,斀zhú,爥zhú,主zhǔ,宔zhǔ,拄zhǔ,砫zhǔ,罜zhǔ,渚zhǔ,煑zhǔ,煮zhǔ,詝zhǔ,嘱zhǔ,濐zhǔ,麈zhǔ,瞩zhǔ,囑zhǔ,矚zhǔ,尌zhù,伫zhù,佇zhù,住zhù,助zhù,纻zhù,苎zhù,坾zhù,杼zhù,苧zhù,贮zhù,驻zhù,壴zhù,柱zhù,柷zhù,殶zhù,炷zhù,祝zhù,疰zhù,眝zhù,祩zhù,竚zhù,莇zhù,紵zhù,紸zhù,羜zhù,蛀zhù,嵀zhù,筑zhù,註zhù,貯zhù,跓zhù,軴zhù,铸zhù,筯zhù,鉒zhù,馵zhù,墸zhù,箸zhù,翥zhù,樦zhù,鋳zhù,駐zhù,築zhù,篫zhù,霔zhù,麆zhù,鑄zhù,櫡zhù,注zhù,飳zhù,抓zhuā,檛zhuā,膼zhuā,髽zhuā,跩zhuǎi,睉zhuài,拽zhuài,耑zhuān,专zhuān,専zhuān,砖zhuān,專zhuān,鄟zhuān,瑼zhuān,膞zhuān,磚zhuān,諯zhuān,蟤zhuān,顓zhuān,颛zhuān,转zhuǎn,転zhuǎn,竱zhuǎn,轉zhuǎn,簨zhuàn,灷zhuàn,啭zhuàn,堟zhuàn,蒃zhuàn,瑑zhuàn,僎zhuàn,撰zhuàn,篆zhuàn,馔zhuàn,饌zhuàn,囀zhuàn,籑zhuàn,僝zhuàn,妆zhuāng,追zhuī,骓zhuī,椎zhuī,锥zhuī,錐zhuī,騅zhuī,鵻zhuī,沝zhuǐ,倕zhuì,埀zhuì,腏zhuì,笍zhuì,娷zhuì,缀zhuì,惴zhuì,甀zhuì,缒zhuì,畷zhuì,膇zhuì,墜zhuì,綴zhuì,赘zhuì,縋zhuì,諈zhuì,醊zhuì,錣zhuì,餟zhuì,礈zhuì,贅zhuì,轛zhuì,鑆zhuì,坠zhuì,湻zhūn,宒zhūn,迍zhūn,肫zhūn,窀zhūn,谆zhūn,諄zhūn,衠zhūn,訰zhūn,准zhǔn,準zhǔn,綧zhǔn,稕zhǔn,凖zhǔn,鐯zhuo,拙zhuō,炪zhuō,倬zhuō,捉zhuō,桌zhuō,涿zhuō,棳zhuō,琸zhuō,窧zhuō,槕zhuō,蠿zhuō,矠zhuó,卓zhuó,圴zhuó,犳zhuó,灼zhuó,妰zhuó,茁zhuó,斫zhuó,浊zhuó,丵zhuó,浞zhuó,诼zhuó,酌zhuó,啄zhuó,娺zhuó,梲zhuó,斮zhuó,晫zhuó,椓zhuó,琢zhuó,斱zhuó,硺zhuó,窡zhuó,罬zhuó,撯zhuó,擆zhuó,斲zhuó,禚zhuó,諁zhuó,諑zhuó,濁zhuó,擢zhuó,斵zhuó,濯zhuó,镯zhuó,鵫zhuó,灂zhuó,蠗zhuó,鐲zhuó,籗zhuó,鷟zhuó,籱zhuó,烵zhuó,謶zhuó,薋zī,菑zī,吱zī,孜zī,茊zī,兹zī,咨zī,姕zī,姿zī,茲zī,栥zī,紎zī,赀zī,资zī,崰zī,淄zī,秶zī,缁zī,谘zī,赼zī,嗞zī,嵫zī,椔zī,湽zī,滋zī,粢zī,葘zī,辎zī,鄑zī,孶zī,禌zī,觜zī,貲zī,資zī,趑zī,锱zī,緇zī,鈭zī,镃zī,龇zī,輜zī,鼒zī,澬zī,諮zī,趦zī,輺zī,錙zī,髭zī,鲻zī,鍿zī,頾zī,頿zī,鯔zī,鶅zī,鰦zī,齜zī,訾zī,訿zī,芓zī,孳zī,鎡zī,茈zǐ,泚zǐ,籽zǐ,子zǐ,姉zǐ,姊zǐ,杍zǐ,矷zǐ,秄zǐ,呰zǐ,秭zǐ,耔zǐ,虸zǐ,笫zǐ,梓zǐ,釨zǐ,啙zǐ,紫zǐ,滓zǐ,榟zǐ,橴zǐ,自zì,茡zì,倳zì,剚zì,恣zì,牸zì,渍zì,眥zì,眦zì,胔zì,胾zì,漬zì,字zì,唨zo,潨zōng,宗zōng,倧zōng,综zōng,骔zōng,堫zōng,嵏zōng,嵕zōng,惾zōng,棕zōng,猣zōng,腙zōng,葼zōng,朡zōng,椶zōng,嵸zōng,稯zōng,緃zōng,熧zōng,緵zōng,翪zōng,蝬zōng,踨zōng,踪zōng,磫zōng,豵zōng,蹤zōng,騌zōng,鬃zōng,騣zōng,鬉zōng,鯮zōng,鯼zōng,鑁zōng,綜zōng,潀zóng,潈zóng,蓯zǒng,熜zǒng,緫zǒng,总zǒng,偬zǒng,捴zǒng,惣zǒng,愡zǒng,揔zǒng,搃zǒng,傯zǒng,蓗zǒng,摠zǒng,総zǒng,燪zǒng,總zǒng,鍯zǒng,鏓zǒng,縦zǒng,縂zǒng,纵zòng,昮zòng,疭zòng,倊zòng,猔zòng,碂zòng,粽zòng,糉zòng,瘲zòng,錝zòng,縱zòng,邹zōu,驺zōu,诹zōu,陬zōu,菆zōu,棷zōu,棸zōu,鄒zōu,緅zōu,鄹zōu,鯫zōu,黀zōu,齺zōu,芻zōu,鲰zōu,辶zǒu,赱zǒu,走zǒu,鯐zǒu,搊zǒu,奏zòu,揍zòu,租zū,菹zū,錊zū,伜zú,倅zú,紣zú,綷zú,顇zú,卆zú,足zú,卒zú,哫zú,崒zú,崪zú,族zú,稡zú,箤zú,踤zú,踿zú,镞zú,鏃zú,诅zǔ,阻zǔ,俎zǔ,爼zǔ,祖zǔ,組zǔ,詛zǔ,靻zǔ,鎺zǔ,组zǔ,鉆zuān,劗zuān,躜zuān,鑚zuān,躦zuān,繤zuǎn,缵zuǎn,纂zuǎn,纉zuǎn,籫zuǎn,纘zuǎn,欑zuàn,赚zuàn,賺zuàn,鑽zuàn,钻zuàn,攥zuàn,厜zuī,嗺zuī,樶zuī,蟕zuī,纗zuī,嶉zuǐ,槯zuǐ,嶊zuǐ,噿zuǐ,濢zuǐ,璻zuǐ,嘴zuǐ,睟zuì,枠zuì,栬zuì,絊zuì,酔zuì,晬zuì,最zuì,祽zuì,罪zuì,辠zuì,蕞zuì,醉zuì,嶵zuì,檇zuì,檌zuì,穝zuì,墫zūn,尊zūn,嶟zūn,遵zūn,樽zūn,繜zūn,罇zūn,鶎zūn,鐏zūn,鱒zūn,鷷zūn,鳟zūn,僔zǔn,噂zǔn,撙zǔn,譐zǔn,拵zùn,捘zùn,銌zùn,咗zuo,昨zuó,秨zuó,捽zuó,椊zuó,稓zuó,筰zuó,鈼zuó,阝zuǒ,左zuǒ,佐zuǒ,繓zuǒ,酢zuò,作zuò,坐zuò,阼zuò,岝zuò,岞zuò,怍zuò,侳zuò,祚zuò,胙zuò,唑zuò,座zuò,袏zuò,做zuò,葄zuò,蓙zuò,飵zuò,糳zuò,疮chuāng,牕chuāng,噇chuáng,闖chuǎng,剏chuàng,霜shuāng,欆shuāng,驦shuāng,慡shuǎng,灀shuàng,窓chuāng,瘡chuāng,闯chuǎng,仺chuàng,剙chuàng,雙shuāng,礵shuāng,鸘shuāng,樉shuǎng,谁shuí,鹴shuāng,爽shuǎng,鏯shuǎng,孀shuāng,孇shuāng,騻shuāng,焋zhuàng,幢zhuàng,撞zhuàng,隹zhuī,傱shuǎn,\";\n\nfunction pinyin(word,splitStr) {\n    splitStr = splitStr === undefined ? ' ' : splitStr;\n    var str = '';\n    var s;\n    for (var i = 0; i < word.length; i++) {\n        if (hzpy.indexOf(word.charAt(i)) != -1 && word.charCodeAt(i) > 200) {\n            s = 1;\n            while (hzpy.charAt(hzpy.indexOf(word.charAt(i)) + s) != \",\") {\n                str += hzpy.charAt(hzpy.indexOf(word.charAt(i)) + s);\n                s++;\n            }\n            str += splitStr;\n        }\n        else {\n            str += word.charAt(i);\n        }\n    }\n    return str;\n}"
  },
  {
    "path": "static/cropper/2.3.4/cropper.css",
    "content": "/*!\n * Cropper v2.3.4\n * https://github.com/fengyuanchen/cropper\n *\n * Copyright (c) 2014-2016 Fengyuan Chen and contributors\n * Released under the MIT license\n *\n * Date: 2016-09-03T05:50:45.412Z\n */\n.cropper-container {\n  font-size: 0;\n  line-height: 0;\n\n  position: relative;\n\n  -webkit-user-select: none;\n     -moz-user-select: none;\n      -ms-user-select: none;\n          user-select: none;\n\n  direction: ltr !important;\n}\n\n.cropper-container img {\n  display: block;\n\n  width: 100%;\n  min-width: 0 !important;\n  max-width: none !important;\n  height: 100%;\n  min-height: 0 !important;\n  max-height: none !important;\n\n  image-orientation: 0deg !important;\n}\n\n.cropper-wrap-box,\n.cropper-canvas,\n.cropper-drag-box,\n.cropper-crop-box,\n.cropper-modal {\n  position: absolute;\n  top: 0;\n  right: 0;\n  bottom: 0;\n  left: 0;\n}\n\n.cropper-wrap-box {\n  overflow: hidden;\n}\n\n.cropper-drag-box {\n  opacity: 0;\n  background-color: #fff;\n\n  filter: alpha(opacity=0);\n}\n\n.cropper-modal {\n  opacity: .5;\n  background-color: #000;\n\n  filter: alpha(opacity=50);\n}\n\n.cropper-view-box {\n  display: block;\n  overflow: hidden;\n\n  width: 100%;\n  height: 100%;\n\n  outline: 1px solid #39f;\n  outline-color: rgba(51, 153, 255, .75);\n}\n\n.cropper-dashed {\n  position: absolute;\n\n  display: block;\n\n  opacity: .5;\n  border: 0 dashed #eee;\n\n  filter: alpha(opacity=50);\n}\n\n.cropper-dashed.dashed-h {\n  top: 33.33333%;\n  left: 0;\n\n  width: 100%;\n  height: 33.33333%;\n\n  border-top-width: 1px;\n  border-bottom-width: 1px;\n}\n\n.cropper-dashed.dashed-v {\n  top: 0;\n  left: 33.33333%;\n\n  width: 33.33333%;\n  height: 100%;\n\n  border-right-width: 1px;\n  border-left-width: 1px;\n}\n\n.cropper-center {\n  position: absolute;\n  top: 50%;\n  left: 50%;\n\n  display: block;\n\n  width: 0;\n  height: 0;\n\n  opacity: .75;\n\n  filter: alpha(opacity=75);\n}\n\n.cropper-center:before,\n.cropper-center:after {\n  position: absolute;\n\n  display: block;\n\n  content: ' ';\n\n  background-color: #eee;\n}\n\n.cropper-center:before {\n  top: 0;\n  left: -3px;\n\n  width: 7px;\n  height: 1px;\n}\n\n.cropper-center:after {\n  top: -3px;\n  left: 0;\n\n  width: 1px;\n  height: 7px;\n}\n\n.cropper-face,\n.cropper-line,\n.cropper-point {\n  position: absolute;\n\n  display: block;\n\n  width: 100%;\n  height: 100%;\n\n  opacity: .1;\n\n  filter: alpha(opacity=10);\n}\n\n.cropper-face {\n  top: 0;\n  left: 0;\n\n  background-color: #fff;\n}\n\n.cropper-line {\n  background-color: #39f;\n}\n\n.cropper-line.line-e {\n  top: 0;\n  right: -3px;\n\n  width: 5px;\n\n  cursor: e-resize;\n}\n\n.cropper-line.line-n {\n  top: -3px;\n  left: 0;\n\n  height: 5px;\n\n  cursor: n-resize;\n}\n\n.cropper-line.line-w {\n  top: 0;\n  left: -3px;\n\n  width: 5px;\n\n  cursor: w-resize;\n}\n\n.cropper-line.line-s {\n  bottom: -3px;\n  left: 0;\n\n  height: 5px;\n\n  cursor: s-resize;\n}\n\n.cropper-point {\n  width: 5px;\n  height: 5px;\n\n  opacity: .75;\n  background-color: #39f;\n\n  filter: alpha(opacity=75);\n}\n\n.cropper-point.point-e {\n  top: 50%;\n  right: -3px;\n\n  margin-top: -3px;\n\n  cursor: e-resize;\n}\n\n.cropper-point.point-n {\n  top: -3px;\n  left: 50%;\n\n  margin-left: -3px;\n\n  cursor: n-resize;\n}\n\n.cropper-point.point-w {\n  top: 50%;\n  left: -3px;\n\n  margin-top: -3px;\n\n  cursor: w-resize;\n}\n\n.cropper-point.point-s {\n  bottom: -3px;\n  left: 50%;\n\n  margin-left: -3px;\n\n  cursor: s-resize;\n}\n\n.cropper-point.point-ne {\n  top: -3px;\n  right: -3px;\n\n  cursor: ne-resize;\n}\n\n.cropper-point.point-nw {\n  top: -3px;\n  left: -3px;\n\n  cursor: nw-resize;\n}\n\n.cropper-point.point-sw {\n  bottom: -3px;\n  left: -3px;\n\n  cursor: sw-resize;\n}\n\n.cropper-point.point-se {\n  right: -3px;\n  bottom: -3px;\n\n  width: 20px;\n  height: 20px;\n\n  cursor: se-resize;\n\n  opacity: 1;\n\n  filter: alpha(opacity=100);\n}\n\n.cropper-point.point-se:before {\n  position: absolute;\n  right: -50%;\n  bottom: -50%;\n\n  display: block;\n\n  width: 200%;\n  height: 200%;\n\n  content: ' ';\n\n  opacity: 0;\n  background-color: #39f;\n\n  filter: alpha(opacity=0);\n}\n\n@media (min-width: 768px) {\n  .cropper-point.point-se {\n    width: 15px;\n    height: 15px;\n  }\n}\n\n@media (min-width: 992px) {\n  .cropper-point.point-se {\n    width: 10px;\n    height: 10px;\n  }\n}\n\n@media (min-width: 1200px) {\n  .cropper-point.point-se {\n    width: 5px;\n    height: 5px;\n\n    opacity: .75;\n\n    filter: alpha(opacity=75);\n  }\n}\n\n.cropper-invisible {\n  opacity: 0;\n\n  filter: alpha(opacity=0);\n}\n\n.cropper-bg {\n  background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAQMAAAAlPW0iAAAAA3NCSVQICAjb4U/gAAAABlBMVEXMzMz////TjRV2AAAACXBIWXMAAArrAAAK6wGCiw1aAAAAHHRFWHRTb2Z0d2FyZQBBZG9iZSBGaXJld29ya3MgQ1M26LyyjAAAABFJREFUCJlj+M/AgBVhF/0PAH6/D/HkDxOGAAAAAElFTkSuQmCC');\n}\n\n.cropper-hide {\n  position: absolute;\n\n  display: block;\n\n  width: 0;\n  height: 0;\n}\n\n.cropper-hidden {\n  display: none !important;\n}\n\n.cropper-move {\n  cursor: move;\n}\n\n.cropper-crop {\n  cursor: crosshair;\n}\n\n.cropper-disabled .cropper-drag-box,\n.cropper-disabled .cropper-face,\n.cropper-disabled .cropper-line,\n.cropper-disabled .cropper-point {\n  cursor: not-allowed;\n}\n"
  },
  {
    "path": "static/cropper/2.3.4/cropper.js",
    "content": "/*!\n * Cropper v2.3.4\n * https://github.com/fengyuanchen/cropper\n *\n * Copyright (c) 2014-2016 Fengyuan Chen and contributors\n * Released under the MIT license\n *\n * Date: 2016-09-03T05:50:45.412Z\n */\n\n(function (factory) {\n  if (typeof define === 'function' && define.amd) {\n    // AMD. Register as anonymous module.\n    define(['jquery'], factory);\n  } else if (typeof exports === 'object') {\n    // Node / CommonJS\n    factory(require('jquery'));\n  } else {\n    // Browser globals.\n    factory(jQuery);\n  }\n})(function ($) {\n\n  'use strict';\n\n  // Globals\n  var $window = $(window);\n  var $document = $(document);\n  var location = window.location;\n  var navigator = window.navigator;\n  var ArrayBuffer = window.ArrayBuffer;\n  var Uint8Array = window.Uint8Array;\n  var DataView = window.DataView;\n  var btoa = window.btoa;\n\n  // Constants\n  var NAMESPACE = 'cropper';\n\n  // Classes\n  var CLASS_MODAL = 'cropper-modal';\n  var CLASS_HIDE = 'cropper-hide';\n  var CLASS_HIDDEN = 'cropper-hidden';\n  var CLASS_INVISIBLE = 'cropper-invisible';\n  var CLASS_MOVE = 'cropper-move';\n  var CLASS_CROP = 'cropper-crop';\n  var CLASS_DISABLED = 'cropper-disabled';\n  var CLASS_BG = 'cropper-bg';\n\n  // Events\n  var EVENT_MOUSE_DOWN = 'mousedown touchstart pointerdown MSPointerDown';\n  var EVENT_MOUSE_MOVE = 'mousemove touchmove pointermove MSPointerMove';\n  var EVENT_MOUSE_UP = 'mouseup touchend touchcancel pointerup pointercancel MSPointerUp MSPointerCancel';\n  var EVENT_WHEEL = 'wheel mousewheel DOMMouseScroll';\n  var EVENT_DBLCLICK = 'dblclick';\n  var EVENT_LOAD = 'load.' + NAMESPACE;\n  var EVENT_ERROR = 'error.' + NAMESPACE;\n  var EVENT_RESIZE = 'resize.' + NAMESPACE; // Bind to window with namespace\n  var EVENT_BUILD = 'build.' + NAMESPACE;\n  var EVENT_BUILT = 'built.' + NAMESPACE;\n  var EVENT_CROP_START = 'cropstart.' + NAMESPACE;\n  var EVENT_CROP_MOVE = 'cropmove.' + NAMESPACE;\n  var EVENT_CROP_END = 'cropend.' + NAMESPACE;\n  var EVENT_CROP = 'crop.' + NAMESPACE;\n  var EVENT_ZOOM = 'zoom.' + NAMESPACE;\n\n  // RegExps\n  var REGEXP_ACTIONS = /^(e|w|s|n|se|sw|ne|nw|all|crop|move|zoom)$/;\n  var REGEXP_DATA_URL = /^data:/;\n  var REGEXP_DATA_URL_HEAD = /^data:([^;]+);base64,/;\n  var REGEXP_DATA_URL_JPEG = /^data:image\\/jpeg.*;base64,/;\n\n  // Data keys\n  var DATA_PREVIEW = 'preview';\n  var DATA_ACTION = 'action';\n\n  // Actions\n  var ACTION_EAST = 'e';\n  var ACTION_WEST = 'w';\n  var ACTION_SOUTH = 's';\n  var ACTION_NORTH = 'n';\n  var ACTION_SOUTH_EAST = 'se';\n  var ACTION_SOUTH_WEST = 'sw';\n  var ACTION_NORTH_EAST = 'ne';\n  var ACTION_NORTH_WEST = 'nw';\n  var ACTION_ALL = 'all';\n  var ACTION_CROP = 'crop';\n  var ACTION_MOVE = 'move';\n  var ACTION_ZOOM = 'zoom';\n  var ACTION_NONE = 'none';\n\n  // Supports\n  var SUPPORT_CANVAS = $.isFunction($('<canvas>')[0].getContext);\n  var IS_SAFARI_OR_UIWEBVIEW = navigator && /(Macintosh|iPhone|iPod|iPad).*AppleWebKit/i.test(navigator.userAgent);\n\n  // Maths\n  var num = Number;\n  var min = Math.min;\n  var max = Math.max;\n  var abs = Math.abs;\n  var sin = Math.sin;\n  var cos = Math.cos;\n  var sqrt = Math.sqrt;\n  var round = Math.round;\n  var floor = Math.floor;\n\n  // Utilities\n  var fromCharCode = String.fromCharCode;\n\n  function isNumber(n) {\n    return typeof n === 'number' && !isNaN(n);\n  }\n\n  function isUndefined(n) {\n    return typeof n === 'undefined';\n  }\n\n  function toArray(obj, offset) {\n    var args = [];\n\n    // This is necessary for IE8\n    if (isNumber(offset)) {\n      args.push(offset);\n    }\n\n    return args.slice.apply(obj, args);\n  }\n\n  // Custom proxy to avoid jQuery's guid\n  function proxy(fn, context) {\n    var args = toArray(arguments, 2);\n\n    return function () {\n      return fn.apply(context, args.concat(toArray(arguments)));\n    };\n  }\n\n  function isCrossOriginURL(url) {\n    var parts = url.match(/^(https?:)\\/\\/([^\\:\\/\\?#]+):?(\\d*)/i);\n\n    return parts && (\n      parts[1] !== location.protocol ||\n      parts[2] !== location.hostname ||\n      parts[3] !== location.port\n    );\n  }\n\n  function addTimestamp(url) {\n    var timestamp = 'timestamp=' + (new Date()).getTime();\n\n    return (url + (url.indexOf('?') === -1 ? '?' : '&') + timestamp);\n  }\n\n  function getCrossOrigin(crossOrigin) {\n    return crossOrigin ? ' crossOrigin=\"' + crossOrigin + '\"' : '';\n  }\n\n  function getImageSize(image, callback) {\n    var newImage;\n\n    // Modern browsers (ignore Safari, #120 & #509)\n    if (image.naturalWidth && !IS_SAFARI_OR_UIWEBVIEW) {\n      return callback(image.naturalWidth, image.naturalHeight);\n    }\n\n    // IE8: Don't use `new Image()` here (#319)\n    newImage = document.createElement('img');\n\n    newImage.onload = function () {\n      callback(this.width, this.height);\n    };\n\n    newImage.src = image.src;\n  }\n\n  function getTransform(options) {\n    var transforms = [];\n    var rotate = options.rotate;\n    var scaleX = options.scaleX;\n    var scaleY = options.scaleY;\n\n    // Rotate should come first before scale to match orientation transform\n    if (isNumber(rotate) && rotate !== 0) {\n      transforms.push('rotate(' + rotate + 'deg)');\n    }\n\n    if (isNumber(scaleX) && scaleX !== 1) {\n      transforms.push('scaleX(' + scaleX + ')');\n    }\n\n    if (isNumber(scaleY) && scaleY !== 1) {\n      transforms.push('scaleY(' + scaleY + ')');\n    }\n\n    return transforms.length ? transforms.join(' ') : 'none';\n  }\n\n  function getRotatedSizes(data, isReversed) {\n    var deg = abs(data.degree) % 180;\n    var arc = (deg > 90 ? (180 - deg) : deg) * Math.PI / 180;\n    var sinArc = sin(arc);\n    var cosArc = cos(arc);\n    var width = data.width;\n    var height = data.height;\n    var aspectRatio = data.aspectRatio;\n    var newWidth;\n    var newHeight;\n\n    if (!isReversed) {\n      newWidth = width * cosArc + height * sinArc;\n      newHeight = width * sinArc + height * cosArc;\n    } else {\n      newWidth = width / (cosArc + sinArc / aspectRatio);\n      newHeight = newWidth / aspectRatio;\n    }\n\n    return {\n      width: newWidth,\n      height: newHeight\n    };\n  }\n\n  function getSourceCanvas(image, data) {\n    var canvas = $('<canvas>')[0];\n    var context = canvas.getContext('2d');\n    var dstX = 0;\n    var dstY = 0;\n    var dstWidth = data.naturalWidth;\n    var dstHeight = data.naturalHeight;\n    var rotate = data.rotate;\n    var scaleX = data.scaleX;\n    var scaleY = data.scaleY;\n    var scalable = isNumber(scaleX) && isNumber(scaleY) && (scaleX !== 1 || scaleY !== 1);\n    var rotatable = isNumber(rotate) && rotate !== 0;\n    var advanced = rotatable || scalable;\n    var canvasWidth = dstWidth * abs(scaleX || 1);\n    var canvasHeight = dstHeight * abs(scaleY || 1);\n    var translateX;\n    var translateY;\n    var rotated;\n\n    if (scalable) {\n      translateX = canvasWidth / 2;\n      translateY = canvasHeight / 2;\n    }\n\n    if (rotatable) {\n      rotated = getRotatedSizes({\n        width: canvasWidth,\n        height: canvasHeight,\n        degree: rotate\n      });\n\n      canvasWidth = rotated.width;\n      canvasHeight = rotated.height;\n      translateX = canvasWidth / 2;\n      translateY = canvasHeight / 2;\n    }\n\n    canvas.width = canvasWidth;\n    canvas.height = canvasHeight;\n\n    if (advanced) {\n      dstX = -dstWidth / 2;\n      dstY = -dstHeight / 2;\n\n      context.save();\n      context.translate(translateX, translateY);\n    }\n\n    // Rotate should come first before scale as in the \"getTransform\" function\n    if (rotatable) {\n      context.rotate(rotate * Math.PI / 180);\n    }\n\n    if (scalable) {\n      context.scale(scaleX, scaleY);\n    }\n\n    context.drawImage(image, floor(dstX), floor(dstY), floor(dstWidth), floor(dstHeight));\n\n    if (advanced) {\n      context.restore();\n    }\n\n    return canvas;\n  }\n\n  function getTouchesCenter(touches) {\n    var length = touches.length;\n    var pageX = 0;\n    var pageY = 0;\n\n    if (length) {\n      $.each(touches, function (i, touch) {\n        pageX += touch.pageX;\n        pageY += touch.pageY;\n      });\n\n      pageX /= length;\n      pageY /= length;\n    }\n\n    return {\n      pageX: pageX,\n      pageY: pageY\n    };\n  }\n\n  function getStringFromCharCode(dataView, start, length) {\n    var str = '';\n    var i;\n\n    for (i = start, length += start; i < length; i++) {\n      str += fromCharCode(dataView.getUint8(i));\n    }\n\n    return str;\n  }\n\n  function getOrientation(arrayBuffer) {\n    var dataView = new DataView(arrayBuffer);\n    var length = dataView.byteLength;\n    var orientation;\n    var exifIDCode;\n    var tiffOffset;\n    var firstIFDOffset;\n    var littleEndian;\n    var endianness;\n    var app1Start;\n    var ifdStart;\n    var offset;\n    var i;\n\n    // Only handle JPEG image (start by 0xFFD8)\n    if (dataView.getUint8(0) === 0xFF && dataView.getUint8(1) === 0xD8) {\n      offset = 2;\n\n      while (offset < length) {\n        if (dataView.getUint8(offset) === 0xFF && dataView.getUint8(offset + 1) === 0xE1) {\n          app1Start = offset;\n          break;\n        }\n\n        offset++;\n      }\n    }\n\n    if (app1Start) {\n      exifIDCode = app1Start + 4;\n      tiffOffset = app1Start + 10;\n\n      if (getStringFromCharCode(dataView, exifIDCode, 4) === 'Exif') {\n        endianness = dataView.getUint16(tiffOffset);\n        littleEndian = endianness === 0x4949;\n\n        if (littleEndian || endianness === 0x4D4D /* bigEndian */) {\n          if (dataView.getUint16(tiffOffset + 2, littleEndian) === 0x002A) {\n            firstIFDOffset = dataView.getUint32(tiffOffset + 4, littleEndian);\n\n            if (firstIFDOffset >= 0x00000008) {\n              ifdStart = tiffOffset + firstIFDOffset;\n            }\n          }\n        }\n      }\n    }\n\n    if (ifdStart) {\n      length = dataView.getUint16(ifdStart, littleEndian);\n\n      for (i = 0; i < length; i++) {\n        offset = ifdStart + i * 12 + 2;\n\n        if (dataView.getUint16(offset, littleEndian) === 0x0112 /* Orientation */) {\n\n          // 8 is the offset of the current tag's value\n          offset += 8;\n\n          // Get the original orientation value\n          orientation = dataView.getUint16(offset, littleEndian);\n\n          // Override the orientation with its default value for Safari (#120)\n          if (IS_SAFARI_OR_UIWEBVIEW) {\n            dataView.setUint16(offset, 1, littleEndian);\n          }\n\n          break;\n        }\n      }\n    }\n\n    return orientation;\n  }\n\n  function dataURLToArrayBuffer(dataURL) {\n    var base64 = dataURL.replace(REGEXP_DATA_URL_HEAD, '');\n    var binary = atob(base64);\n    var length = binary.length;\n    var arrayBuffer = new ArrayBuffer(length);\n    var dataView = new Uint8Array(arrayBuffer);\n    var i;\n\n    for (i = 0; i < length; i++) {\n      dataView[i] = binary.charCodeAt(i);\n    }\n\n    return arrayBuffer;\n  }\n\n  // Only available for JPEG image\n  function arrayBufferToDataURL(arrayBuffer) {\n    var dataView = new Uint8Array(arrayBuffer);\n    var length = dataView.length;\n    var base64 = '';\n    var i;\n\n    for (i = 0; i < length; i++) {\n      base64 += fromCharCode(dataView[i]);\n    }\n\n    return 'data:image/jpeg;base64,' + btoa(base64);\n  }\n\n  function Cropper(element, options) {\n    this.$element = $(element);\n    this.options = $.extend({}, Cropper.DEFAULTS, $.isPlainObject(options) && options);\n    this.isLoaded = false;\n    this.isBuilt = false;\n    this.isCompleted = false;\n    this.isRotated = false;\n    this.isCropped = false;\n    this.isDisabled = false;\n    this.isReplaced = false;\n    this.isLimited = false;\n    this.wheeling = false;\n    this.isImg = false;\n    this.originalUrl = '';\n    this.canvas = null;\n    this.cropBox = null;\n    this.init();\n  }\n\n  Cropper.prototype = {\n    constructor: Cropper,\n\n    init: function () {\n      var $this = this.$element;\n      var url;\n\n      if ($this.is('img')) {\n        this.isImg = true;\n\n        // Should use `$.fn.attr` here. e.g.: \"img/picture.jpg\"\n        this.originalUrl = url = $this.attr('src');\n\n        // Stop when it's a blank image\n        if (!url) {\n          return;\n        }\n\n        // Should use `$.fn.prop` here. e.g.: \"http://example.com/img/picture.jpg\"\n        url = $this.prop('src');\n      } else if ($this.is('canvas') && SUPPORT_CANVAS) {\n        url = $this[0].toDataURL();\n      }\n\n      this.load(url);\n    },\n\n    // A shortcut for triggering custom events\n    trigger: function (type, data) {\n      var e = $.Event(type, data);\n\n      this.$element.trigger(e);\n\n      return e;\n    },\n\n    load: function (url) {\n      var options = this.options;\n      var $this = this.$element;\n      var read;\n      var xhr;\n\n      if (!url) {\n        return;\n      }\n\n      // Trigger build event first\n      $this.one(EVENT_BUILD, options.build);\n\n      if (this.trigger(EVENT_BUILD).isDefaultPrevented()) {\n        return;\n      }\n\n      this.url = url;\n      this.image = {};\n\n      if (!options.checkOrientation || !ArrayBuffer) {\n        return this.clone();\n      }\n\n      read = $.proxy(this.read, this);\n\n      // XMLHttpRequest disallows to open a Data URL in some browsers like IE11 and Safari\n      if (REGEXP_DATA_URL.test(url)) {\n        return REGEXP_DATA_URL_JPEG.test(url) ?\n          read(dataURLToArrayBuffer(url)) :\n          this.clone();\n      }\n\n      xhr = new XMLHttpRequest();\n\n      xhr.onerror = xhr.onabort = $.proxy(function () {\n        this.clone();\n      }, this);\n\n      xhr.onload = function () {\n        read(this.response);\n      };\n\n      if (options.checkCrossOrigin && isCrossOriginURL(url) && $this.prop('crossOrigin')) {\n        url = addTimestamp(url);\n      }\n\n      xhr.open('get', url);\n      xhr.responseType = 'arraybuffer';\n      xhr.send();\n    },\n\n    read: function (arrayBuffer) {\n      var options = this.options;\n      var orientation = getOrientation(arrayBuffer);\n      var image = this.image;\n      var rotate = 0;\n      var scaleX = 1;\n      var scaleY = 1;\n\n      if (orientation > 1) {\n        this.url = arrayBufferToDataURL(arrayBuffer);\n\n        switch (orientation) {\n\n          // flip horizontal\n          case 2:\n            scaleX = -1;\n            break;\n\n          // rotate left 180°\n          case 3:\n            rotate = -180;\n            break;\n\n          // flip vertical\n          case 4:\n            scaleY = -1;\n            break;\n\n          // flip vertical + rotate right 90°\n          case 5:\n            rotate = 90;\n            scaleY = -1;\n            break;\n\n          // rotate right 90°\n          case 6:\n            rotate = 90;\n            break;\n\n          // flip horizontal + rotate right 90°\n          case 7:\n            rotate = 90;\n            scaleX = -1;\n            break;\n\n          // rotate left 90°\n          case 8:\n            rotate = -90;\n            break;\n        }\n      }\n\n      if (options.rotatable) {\n        image.rotate = rotate;\n      }\n\n      if (options.scalable) {\n        image.scaleX = scaleX;\n        image.scaleY = scaleY;\n      }\n\n      this.clone();\n    },\n\n    clone: function () {\n      var options = this.options;\n      var $this = this.$element;\n      var url = this.url;\n      var crossOrigin = '';\n      var crossOriginUrl;\n      var $clone;\n\n      if (options.checkCrossOrigin && isCrossOriginURL(url)) {\n        crossOrigin = $this.prop('crossOrigin');\n\n        if (crossOrigin) {\n          crossOriginUrl = url;\n        } else {\n          crossOrigin = 'anonymous';\n\n          // Bust cache (#148) when there is not a \"crossOrigin\" property\n          crossOriginUrl = addTimestamp(url);\n        }\n      }\n\n      this.crossOrigin = crossOrigin;\n      this.crossOriginUrl = crossOriginUrl;\n      this.$clone = $clone = $('<img' + getCrossOrigin(crossOrigin) + ' src=\"' + (crossOriginUrl || url) + '\">');\n\n      if (this.isImg) {\n        if ($this[0].complete) {\n          this.start();\n        } else {\n          $this.one(EVENT_LOAD, $.proxy(this.start, this));\n        }\n      } else {\n        $clone.\n          one(EVENT_LOAD, $.proxy(this.start, this)).\n          one(EVENT_ERROR, $.proxy(this.stop, this)).\n          addClass(CLASS_HIDE).\n          insertAfter($this);\n      }\n    },\n\n    start: function () {\n      var $image = this.$element;\n      var $clone = this.$clone;\n\n      if (!this.isImg) {\n        $clone.off(EVENT_ERROR, this.stop);\n        $image = $clone;\n      }\n\n      getImageSize($image[0], $.proxy(function (naturalWidth, naturalHeight) {\n        $.extend(this.image, {\n          naturalWidth: naturalWidth,\n          naturalHeight: naturalHeight,\n          aspectRatio: naturalWidth / naturalHeight\n        });\n\n        this.isLoaded = true;\n        this.build();\n      }, this));\n    },\n\n    stop: function () {\n      this.$clone.remove();\n      this.$clone = null;\n    },\n\n    build: function () {\n      var options = this.options;\n      var $this = this.$element;\n      var $clone = this.$clone;\n      var $cropper;\n      var $cropBox;\n      var $face;\n\n      if (!this.isLoaded) {\n        return;\n      }\n\n      // Unbuild first when replace\n      if (this.isBuilt) {\n        this.unbuild();\n      }\n\n      // Create cropper elements\n      this.$container = $this.parent();\n      this.$cropper = $cropper = $(Cropper.TEMPLATE);\n      this.$canvas = $cropper.find('.cropper-canvas').append($clone);\n      this.$dragBox = $cropper.find('.cropper-drag-box');\n      this.$cropBox = $cropBox = $cropper.find('.cropper-crop-box');\n      this.$viewBox = $cropper.find('.cropper-view-box');\n      this.$face = $face = $cropBox.find('.cropper-face');\n\n      // Hide the original image\n      $this.addClass(CLASS_HIDDEN).after($cropper);\n\n      // Show the clone image if is hidden\n      if (!this.isImg) {\n        $clone.removeClass(CLASS_HIDE);\n      }\n\n      this.initPreview();\n      this.bind();\n\n      options.aspectRatio = max(0, options.aspectRatio) || NaN;\n      options.viewMode = max(0, min(3, round(options.viewMode))) || 0;\n\n      if (options.autoCrop) {\n        this.isCropped = true;\n\n        if (options.modal) {\n          this.$dragBox.addClass(CLASS_MODAL);\n        }\n      } else {\n        $cropBox.addClass(CLASS_HIDDEN);\n      }\n\n      if (!options.guides) {\n        $cropBox.find('.cropper-dashed').addClass(CLASS_HIDDEN);\n      }\n\n      if (!options.center) {\n        $cropBox.find('.cropper-center').addClass(CLASS_HIDDEN);\n      }\n\n      if (options.cropBoxMovable) {\n        $face.addClass(CLASS_MOVE).data(DATA_ACTION, ACTION_ALL);\n      }\n\n      if (!options.highlight) {\n        $face.addClass(CLASS_INVISIBLE);\n      }\n\n      if (options.background) {\n        $cropper.addClass(CLASS_BG);\n      }\n\n      if (!options.cropBoxResizable) {\n        $cropBox.find('.cropper-line, .cropper-point').addClass(CLASS_HIDDEN);\n      }\n\n      this.setDragMode(options.dragMode);\n      this.render();\n      this.isBuilt = true;\n      this.setData(options.data);\n      $this.one(EVENT_BUILT, options.built);\n\n      // Trigger the built event asynchronously to keep `data('cropper')` is defined\n      this.completing = setTimeout($.proxy(function () {\n        this.trigger(EVENT_BUILT);\n        this.trigger(EVENT_CROP, this.getData());\n        this.isCompleted = true;\n      }, this), 0);\n    },\n\n    unbuild: function () {\n      if (!this.isBuilt) {\n        return;\n      }\n\n      if (!this.isCompleted) {\n        clearTimeout(this.completing);\n      }\n\n      this.isBuilt = false;\n      this.isCompleted = false;\n      this.initialImage = null;\n\n      // Clear `initialCanvas` is necessary when replace\n      this.initialCanvas = null;\n      this.initialCropBox = null;\n      this.container = null;\n      this.canvas = null;\n\n      // Clear `cropBox` is necessary when replace\n      this.cropBox = null;\n      this.unbind();\n\n      this.resetPreview();\n      this.$preview = null;\n\n      this.$viewBox = null;\n      this.$cropBox = null;\n      this.$dragBox = null;\n      this.$canvas = null;\n      this.$container = null;\n\n      this.$cropper.remove();\n      this.$cropper = null;\n    },\n\n    render: function () {\n      this.initContainer();\n      this.initCanvas();\n      this.initCropBox();\n\n      this.renderCanvas();\n\n      if (this.isCropped) {\n        this.renderCropBox();\n      }\n    },\n\n    initContainer: function () {\n      var options = this.options;\n      var $this = this.$element;\n      var $container = this.$container;\n      var $cropper = this.$cropper;\n\n      $cropper.addClass(CLASS_HIDDEN);\n      $this.removeClass(CLASS_HIDDEN);\n\n      $cropper.css((this.container = {\n        width: max($container.width(), num(options.minContainerWidth) || 200),\n        height: max($container.height(), num(options.minContainerHeight) || 100)\n      }));\n\n      $this.addClass(CLASS_HIDDEN);\n      $cropper.removeClass(CLASS_HIDDEN);\n    },\n\n    // Canvas (image wrapper)\n    initCanvas: function () {\n      var viewMode = this.options.viewMode;\n      var container = this.container;\n      var containerWidth = container.width;\n      var containerHeight = container.height;\n      var image = this.image;\n      var imageNaturalWidth = image.naturalWidth;\n      var imageNaturalHeight = image.naturalHeight;\n      var is90Degree = abs(image.rotate) === 90;\n      var naturalWidth = is90Degree ? imageNaturalHeight : imageNaturalWidth;\n      var naturalHeight = is90Degree ? imageNaturalWidth : imageNaturalHeight;\n      var aspectRatio = naturalWidth / naturalHeight;\n      var canvasWidth = containerWidth;\n      var canvasHeight = containerHeight;\n      var canvas;\n\n      if (containerHeight * aspectRatio > containerWidth) {\n        if (viewMode === 3) {\n          canvasWidth = containerHeight * aspectRatio;\n        } else {\n          canvasHeight = containerWidth / aspectRatio;\n        }\n      } else {\n        if (viewMode === 3) {\n          canvasHeight = containerWidth / aspectRatio;\n        } else {\n          canvasWidth = containerHeight * aspectRatio;\n        }\n      }\n\n      canvas = {\n        naturalWidth: naturalWidth,\n        naturalHeight: naturalHeight,\n        aspectRatio: aspectRatio,\n        width: canvasWidth,\n        height: canvasHeight\n      };\n\n      canvas.oldLeft = canvas.left = (containerWidth - canvasWidth) / 2;\n      canvas.oldTop = canvas.top = (containerHeight - canvasHeight) / 2;\n\n      this.canvas = canvas;\n      this.isLimited = (viewMode === 1 || viewMode === 2);\n      this.limitCanvas(true, true);\n      this.initialImage = $.extend({}, image);\n      this.initialCanvas = $.extend({}, canvas);\n    },\n\n    limitCanvas: function (isSizeLimited, isPositionLimited) {\n      var options = this.options;\n      var viewMode = options.viewMode;\n      var container = this.container;\n      var containerWidth = container.width;\n      var containerHeight = container.height;\n      var canvas = this.canvas;\n      var aspectRatio = canvas.aspectRatio;\n      var cropBox = this.cropBox;\n      var isCropped = this.isCropped && cropBox;\n      var minCanvasWidth;\n      var minCanvasHeight;\n      var newCanvasLeft;\n      var newCanvasTop;\n\n      if (isSizeLimited) {\n        minCanvasWidth = num(options.minCanvasWidth) || 0;\n        minCanvasHeight = num(options.minCanvasHeight) || 0;\n\n        if (viewMode) {\n          if (viewMode > 1) {\n            minCanvasWidth = max(minCanvasWidth, containerWidth);\n            minCanvasHeight = max(minCanvasHeight, containerHeight);\n\n            if (viewMode === 3) {\n              if (minCanvasHeight * aspectRatio > minCanvasWidth) {\n                minCanvasWidth = minCanvasHeight * aspectRatio;\n              } else {\n                minCanvasHeight = minCanvasWidth / aspectRatio;\n              }\n            }\n          } else {\n            if (minCanvasWidth) {\n              minCanvasWidth = max(minCanvasWidth, isCropped ? cropBox.width : 0);\n            } else if (minCanvasHeight) {\n              minCanvasHeight = max(minCanvasHeight, isCropped ? cropBox.height : 0);\n            } else if (isCropped) {\n              minCanvasWidth = cropBox.width;\n              minCanvasHeight = cropBox.height;\n\n              if (minCanvasHeight * aspectRatio > minCanvasWidth) {\n                minCanvasWidth = minCanvasHeight * aspectRatio;\n              } else {\n                minCanvasHeight = minCanvasWidth / aspectRatio;\n              }\n            }\n          }\n        }\n\n        if (minCanvasWidth && minCanvasHeight) {\n          if (minCanvasHeight * aspectRatio > minCanvasWidth) {\n            minCanvasHeight = minCanvasWidth / aspectRatio;\n          } else {\n            minCanvasWidth = minCanvasHeight * aspectRatio;\n          }\n        } else if (minCanvasWidth) {\n          minCanvasHeight = minCanvasWidth / aspectRatio;\n        } else if (minCanvasHeight) {\n          minCanvasWidth = minCanvasHeight * aspectRatio;\n        }\n\n        canvas.minWidth = minCanvasWidth;\n        canvas.minHeight = minCanvasHeight;\n        canvas.maxWidth = Infinity;\n        canvas.maxHeight = Infinity;\n      }\n\n      if (isPositionLimited) {\n        if (viewMode) {\n          newCanvasLeft = containerWidth - canvas.width;\n          newCanvasTop = containerHeight - canvas.height;\n\n          canvas.minLeft = min(0, newCanvasLeft);\n          canvas.minTop = min(0, newCanvasTop);\n          canvas.maxLeft = max(0, newCanvasLeft);\n          canvas.maxTop = max(0, newCanvasTop);\n\n          if (isCropped && this.isLimited) {\n            canvas.minLeft = min(\n              cropBox.left,\n              cropBox.left + cropBox.width - canvas.width\n            );\n            canvas.minTop = min(\n              cropBox.top,\n              cropBox.top + cropBox.height - canvas.height\n            );\n            canvas.maxLeft = cropBox.left;\n            canvas.maxTop = cropBox.top;\n\n            if (viewMode === 2) {\n              if (canvas.width >= containerWidth) {\n                canvas.minLeft = min(0, newCanvasLeft);\n                canvas.maxLeft = max(0, newCanvasLeft);\n              }\n\n              if (canvas.height >= containerHeight) {\n                canvas.minTop = min(0, newCanvasTop);\n                canvas.maxTop = max(0, newCanvasTop);\n              }\n            }\n          }\n        } else {\n          canvas.minLeft = -canvas.width;\n          canvas.minTop = -canvas.height;\n          canvas.maxLeft = containerWidth;\n          canvas.maxTop = containerHeight;\n        }\n      }\n    },\n\n    renderCanvas: function (isChanged) {\n      var canvas = this.canvas;\n      var image = this.image;\n      var rotate = image.rotate;\n      var naturalWidth = image.naturalWidth;\n      var naturalHeight = image.naturalHeight;\n      var aspectRatio;\n      var rotated;\n\n      if (this.isRotated) {\n        this.isRotated = false;\n\n        // Computes rotated sizes with image sizes\n        rotated = getRotatedSizes({\n          width: image.width,\n          height: image.height,\n          degree: rotate\n        });\n\n        aspectRatio = rotated.width / rotated.height;\n\n        if (aspectRatio !== canvas.aspectRatio) {\n          canvas.left -= (rotated.width - canvas.width) / 2;\n          canvas.top -= (rotated.height - canvas.height) / 2;\n          canvas.width = rotated.width;\n          canvas.height = rotated.height;\n          canvas.aspectRatio = aspectRatio;\n          canvas.naturalWidth = naturalWidth;\n          canvas.naturalHeight = naturalHeight;\n\n          // Computes rotated sizes with natural image sizes\n          if (rotate % 180) {\n            rotated = getRotatedSizes({\n              width: naturalWidth,\n              height: naturalHeight,\n              degree: rotate\n            });\n\n            canvas.naturalWidth = rotated.width;\n            canvas.naturalHeight = rotated.height;\n          }\n\n          this.limitCanvas(true, false);\n        }\n      }\n\n      if (canvas.width > canvas.maxWidth || canvas.width < canvas.minWidth) {\n        canvas.left = canvas.oldLeft;\n      }\n\n      if (canvas.height > canvas.maxHeight || canvas.height < canvas.minHeight) {\n        canvas.top = canvas.oldTop;\n      }\n\n      canvas.width = min(max(canvas.width, canvas.minWidth), canvas.maxWidth);\n      canvas.height = min(max(canvas.height, canvas.minHeight), canvas.maxHeight);\n\n      this.limitCanvas(false, true);\n\n      canvas.oldLeft = canvas.left = min(max(canvas.left, canvas.minLeft), canvas.maxLeft);\n      canvas.oldTop = canvas.top = min(max(canvas.top, canvas.minTop), canvas.maxTop);\n\n      this.$canvas.css({\n        width: canvas.width,\n        height: canvas.height,\n        left: canvas.left,\n        top: canvas.top\n      });\n\n      this.renderImage();\n\n      if (this.isCropped && this.isLimited) {\n        this.limitCropBox(true, true);\n      }\n\n      if (isChanged) {\n        this.output();\n      }\n    },\n\n    renderImage: function (isChanged) {\n      var canvas = this.canvas;\n      var image = this.image;\n      var reversed;\n\n      if (image.rotate) {\n        reversed = getRotatedSizes({\n          width: canvas.width,\n          height: canvas.height,\n          degree: image.rotate,\n          aspectRatio: image.aspectRatio\n        }, true);\n      }\n\n      $.extend(image, reversed ? {\n        width: reversed.width,\n        height: reversed.height,\n        left: (canvas.width - reversed.width) / 2,\n        top: (canvas.height - reversed.height) / 2\n      } : {\n        width: canvas.width,\n        height: canvas.height,\n        left: 0,\n        top: 0\n      });\n\n      this.$clone.css({\n        width: image.width,\n        height: image.height,\n        marginLeft: image.left,\n        marginTop: image.top,\n        transform: getTransform(image)\n      });\n\n      if (isChanged) {\n        this.output();\n      }\n    },\n\n    initCropBox: function () {\n      var options = this.options;\n      var canvas = this.canvas;\n      var aspectRatio = options.aspectRatio;\n      var autoCropArea = num(options.autoCropArea) || 0.8;\n      var cropBox = {\n            width: canvas.width,\n            height: canvas.height\n          };\n\n      if (aspectRatio) {\n        if (canvas.height * aspectRatio > canvas.width) {\n          cropBox.height = cropBox.width / aspectRatio;\n        } else {\n          cropBox.width = cropBox.height * aspectRatio;\n        }\n      }\n\n      this.cropBox = cropBox;\n      this.limitCropBox(true, true);\n\n      // Initialize auto crop area\n      cropBox.width = min(max(cropBox.width, cropBox.minWidth), cropBox.maxWidth);\n      cropBox.height = min(max(cropBox.height, cropBox.minHeight), cropBox.maxHeight);\n\n      // The width of auto crop area must large than \"minWidth\", and the height too. (#164)\n      cropBox.width = max(cropBox.minWidth, cropBox.width * autoCropArea);\n      cropBox.height = max(cropBox.minHeight, cropBox.height * autoCropArea);\n      cropBox.oldLeft = cropBox.left = canvas.left + (canvas.width - cropBox.width) / 2;\n      cropBox.oldTop = cropBox.top = canvas.top + (canvas.height - cropBox.height) / 2;\n\n      this.initialCropBox = $.extend({}, cropBox);\n    },\n\n    limitCropBox: function (isSizeLimited, isPositionLimited) {\n      var options = this.options;\n      var aspectRatio = options.aspectRatio;\n      var container = this.container;\n      var containerWidth = container.width;\n      var containerHeight = container.height;\n      var canvas = this.canvas;\n      var cropBox = this.cropBox;\n      var isLimited = this.isLimited;\n      var minCropBoxWidth;\n      var minCropBoxHeight;\n      var maxCropBoxWidth;\n      var maxCropBoxHeight;\n\n      if (isSizeLimited) {\n        minCropBoxWidth = num(options.minCropBoxWidth) || 0;\n        minCropBoxHeight = num(options.minCropBoxHeight) || 0;\n\n        // The min/maxCropBoxWidth/Height must be less than containerWidth/Height\n        minCropBoxWidth = min(minCropBoxWidth, containerWidth);\n        minCropBoxHeight = min(minCropBoxHeight, containerHeight);\n        maxCropBoxWidth = min(containerWidth, isLimited ? canvas.width : containerWidth);\n        maxCropBoxHeight = min(containerHeight, isLimited ? canvas.height : containerHeight);\n\n        if (aspectRatio) {\n          if (minCropBoxWidth && minCropBoxHeight) {\n            if (minCropBoxHeight * aspectRatio > minCropBoxWidth) {\n              minCropBoxHeight = minCropBoxWidth / aspectRatio;\n            } else {\n              minCropBoxWidth = minCropBoxHeight * aspectRatio;\n            }\n          } else if (minCropBoxWidth) {\n            minCropBoxHeight = minCropBoxWidth / aspectRatio;\n          } else if (minCropBoxHeight) {\n            minCropBoxWidth = minCropBoxHeight * aspectRatio;\n          }\n\n          if (maxCropBoxHeight * aspectRatio > maxCropBoxWidth) {\n            maxCropBoxHeight = maxCropBoxWidth / aspectRatio;\n          } else {\n            maxCropBoxWidth = maxCropBoxHeight * aspectRatio;\n          }\n        }\n\n        // The minWidth/Height must be less than maxWidth/Height\n        cropBox.minWidth = min(minCropBoxWidth, maxCropBoxWidth);\n        cropBox.minHeight = min(minCropBoxHeight, maxCropBoxHeight);\n        cropBox.maxWidth = maxCropBoxWidth;\n        cropBox.maxHeight = maxCropBoxHeight;\n      }\n\n      if (isPositionLimited) {\n        if (isLimited) {\n          cropBox.minLeft = max(0, canvas.left);\n          cropBox.minTop = max(0, canvas.top);\n          cropBox.maxLeft = min(containerWidth, canvas.left + canvas.width) - cropBox.width;\n          cropBox.maxTop = min(containerHeight, canvas.top + canvas.height) - cropBox.height;\n        } else {\n          cropBox.minLeft = 0;\n          cropBox.minTop = 0;\n          cropBox.maxLeft = containerWidth - cropBox.width;\n          cropBox.maxTop = containerHeight - cropBox.height;\n        }\n      }\n    },\n\n    renderCropBox: function () {\n      var options = this.options;\n      var container = this.container;\n      var containerWidth = container.width;\n      var containerHeight = container.height;\n      var cropBox = this.cropBox;\n\n      if (cropBox.width > cropBox.maxWidth || cropBox.width < cropBox.minWidth) {\n        cropBox.left = cropBox.oldLeft;\n      }\n\n      if (cropBox.height > cropBox.maxHeight || cropBox.height < cropBox.minHeight) {\n        cropBox.top = cropBox.oldTop;\n      }\n\n      cropBox.width = min(max(cropBox.width, cropBox.minWidth), cropBox.maxWidth);\n      cropBox.height = min(max(cropBox.height, cropBox.minHeight), cropBox.maxHeight);\n\n      this.limitCropBox(false, true);\n\n      cropBox.oldLeft = cropBox.left = min(max(cropBox.left, cropBox.minLeft), cropBox.maxLeft);\n      cropBox.oldTop = cropBox.top = min(max(cropBox.top, cropBox.minTop), cropBox.maxTop);\n\n      if (options.movable && options.cropBoxMovable) {\n\n        // Turn to move the canvas when the crop box is equal to the container\n        this.$face.data(DATA_ACTION, (cropBox.width === containerWidth && cropBox.height === containerHeight) ? ACTION_MOVE : ACTION_ALL);\n      }\n\n      this.$cropBox.css({\n        width: cropBox.width,\n        height: cropBox.height,\n        left: cropBox.left,\n        top: cropBox.top\n      });\n\n      if (this.isCropped && this.isLimited) {\n        this.limitCanvas(true, true);\n      }\n\n      if (!this.isDisabled) {\n        this.output();\n      }\n    },\n\n    output: function () {\n      this.preview();\n\n      if (this.isCompleted) {\n        this.trigger(EVENT_CROP, this.getData());\n      }\n    },\n\n    initPreview: function () {\n      var crossOrigin = getCrossOrigin(this.crossOrigin);\n      var url = crossOrigin ? this.crossOriginUrl : this.url;\n      var $clone2;\n\n      this.$preview = $(this.options.preview);\n      this.$clone2 = $clone2 = $('<img' + crossOrigin + ' src=\"' + url + '\">');\n      this.$viewBox.html($clone2);\n      this.$preview.each(function () {\n        var $this = $(this);\n\n        // Save the original size for recover\n        $this.data(DATA_PREVIEW, {\n          width: $this.width(),\n          height: $this.height(),\n          html: $this.html()\n        });\n\n        /**\n         * Override img element styles\n         * Add `display:block` to avoid margin top issue\n         * (Occur only when margin-top <= -height)\n         */\n        $this.html(\n          '<img' + crossOrigin + ' src=\"' + url + '\" style=\"' +\n          'display:block;width:100%;height:auto;' +\n          'min-width:0!important;min-height:0!important;' +\n          'max-width:none!important;max-height:none!important;' +\n          'image-orientation:0deg!important;\">'\n        );\n      });\n    },\n\n    resetPreview: function () {\n      this.$preview.each(function () {\n        var $this = $(this);\n        var data = $this.data(DATA_PREVIEW);\n\n        $this.css({\n          width: data.width,\n          height: data.height\n        }).html(data.html).removeData(DATA_PREVIEW);\n      });\n    },\n\n    preview: function () {\n      var image = this.image;\n      var canvas = this.canvas;\n      var cropBox = this.cropBox;\n      var cropBoxWidth = cropBox.width;\n      var cropBoxHeight = cropBox.height;\n      var width = image.width;\n      var height = image.height;\n      var left = cropBox.left - canvas.left - image.left;\n      var top = cropBox.top - canvas.top - image.top;\n\n      if (!this.isCropped || this.isDisabled) {\n        return;\n      }\n\n      this.$clone2.css({\n        width: width,\n        height: height,\n        marginLeft: -left,\n        marginTop: -top,\n        transform: getTransform(image)\n      });\n\n      this.$preview.each(function () {\n        var $this = $(this);\n        var data = $this.data(DATA_PREVIEW);\n        var originalWidth = data.width;\n        var originalHeight = data.height;\n        var newWidth = originalWidth;\n        var newHeight = originalHeight;\n        var ratio = 1;\n\n        if (cropBoxWidth) {\n          ratio = originalWidth / cropBoxWidth;\n          newHeight = cropBoxHeight * ratio;\n        }\n\n        if (cropBoxHeight && newHeight > originalHeight) {\n          ratio = originalHeight / cropBoxHeight;\n          newWidth = cropBoxWidth * ratio;\n          newHeight = originalHeight;\n        }\n\n        $this.css({\n          width: newWidth,\n          height: newHeight\n        }).find('img').css({\n          width: width * ratio,\n          height: height * ratio,\n          marginLeft: -left * ratio,\n          marginTop: -top * ratio,\n          transform: getTransform(image)\n        });\n      });\n    },\n\n    bind: function () {\n      var options = this.options;\n      var $this = this.$element;\n      var $cropper = this.$cropper;\n\n      if ($.isFunction(options.cropstart)) {\n        $this.on(EVENT_CROP_START, options.cropstart);\n      }\n\n      if ($.isFunction(options.cropmove)) {\n        $this.on(EVENT_CROP_MOVE, options.cropmove);\n      }\n\n      if ($.isFunction(options.cropend)) {\n        $this.on(EVENT_CROP_END, options.cropend);\n      }\n\n      if ($.isFunction(options.crop)) {\n        $this.on(EVENT_CROP, options.crop);\n      }\n\n      if ($.isFunction(options.zoom)) {\n        $this.on(EVENT_ZOOM, options.zoom);\n      }\n\n      $cropper.on(EVENT_MOUSE_DOWN, $.proxy(this.cropStart, this));\n\n      if (options.zoomable && options.zoomOnWheel) {\n        $cropper.on(EVENT_WHEEL, $.proxy(this.wheel, this));\n      }\n\n      if (options.toggleDragModeOnDblclick) {\n        $cropper.on(EVENT_DBLCLICK, $.proxy(this.dblclick, this));\n      }\n\n      $document.\n        on(EVENT_MOUSE_MOVE, (this._cropMove = proxy(this.cropMove, this))).\n        on(EVENT_MOUSE_UP, (this._cropEnd = proxy(this.cropEnd, this)));\n\n      if (options.responsive) {\n        $window.on(EVENT_RESIZE, (this._resize = proxy(this.resize, this)));\n      }\n    },\n\n    unbind: function () {\n      var options = this.options;\n      var $this = this.$element;\n      var $cropper = this.$cropper;\n\n      if ($.isFunction(options.cropstart)) {\n        $this.off(EVENT_CROP_START, options.cropstart);\n      }\n\n      if ($.isFunction(options.cropmove)) {\n        $this.off(EVENT_CROP_MOVE, options.cropmove);\n      }\n\n      if ($.isFunction(options.cropend)) {\n        $this.off(EVENT_CROP_END, options.cropend);\n      }\n\n      if ($.isFunction(options.crop)) {\n        $this.off(EVENT_CROP, options.crop);\n      }\n\n      if ($.isFunction(options.zoom)) {\n        $this.off(EVENT_ZOOM, options.zoom);\n      }\n\n      $cropper.off(EVENT_MOUSE_DOWN, this.cropStart);\n\n      if (options.zoomable && options.zoomOnWheel) {\n        $cropper.off(EVENT_WHEEL, this.wheel);\n      }\n\n      if (options.toggleDragModeOnDblclick) {\n        $cropper.off(EVENT_DBLCLICK, this.dblclick);\n      }\n\n      $document.\n        off(EVENT_MOUSE_MOVE, this._cropMove).\n        off(EVENT_MOUSE_UP, this._cropEnd);\n\n      if (options.responsive) {\n        $window.off(EVENT_RESIZE, this._resize);\n      }\n    },\n\n    resize: function () {\n      var restore = this.options.restore;\n      var $container = this.$container;\n      var container = this.container;\n      var canvasData;\n      var cropBoxData;\n      var ratio;\n\n      // Check `container` is necessary for IE8\n      if (this.isDisabled || !container) {\n        return;\n      }\n\n      ratio = $container.width() / container.width;\n\n      // Resize when width changed or height changed\n      if (ratio !== 1 || $container.height() !== container.height) {\n        if (restore) {\n          canvasData = this.getCanvasData();\n          cropBoxData = this.getCropBoxData();\n        }\n\n        this.render();\n\n        if (restore) {\n          this.setCanvasData($.each(canvasData, function (i, n) {\n            canvasData[i] = n * ratio;\n          }));\n          this.setCropBoxData($.each(cropBoxData, function (i, n) {\n            cropBoxData[i] = n * ratio;\n          }));\n        }\n      }\n    },\n\n    dblclick: function () {\n      if (this.isDisabled) {\n        return;\n      }\n\n      if (this.$dragBox.hasClass(CLASS_CROP)) {\n        this.setDragMode(ACTION_MOVE);\n      } else {\n        this.setDragMode(ACTION_CROP);\n      }\n    },\n\n    wheel: function (event) {\n      var e = event.originalEvent || event;\n      var ratio = num(this.options.wheelZoomRatio) || 0.1;\n      var delta = 1;\n\n      if (this.isDisabled) {\n        return;\n      }\n\n      event.preventDefault();\n\n      // Limit wheel speed to prevent zoom too fast\n      if (this.wheeling) {\n        return;\n      }\n\n      this.wheeling = true;\n\n      setTimeout($.proxy(function () {\n        this.wheeling = false;\n      }, this), 50);\n\n      if (e.deltaY) {\n        delta = e.deltaY > 0 ? 1 : -1;\n      } else if (e.wheelDelta) {\n        delta = -e.wheelDelta / 120;\n      } else if (e.detail) {\n        delta = e.detail > 0 ? 1 : -1;\n      }\n\n      this.zoom(-delta * ratio, event);\n    },\n\n    cropStart: function (event) {\n      var options = this.options;\n      var originalEvent = event.originalEvent;\n      var touches = originalEvent && originalEvent.touches;\n      var e = event;\n      var touchesLength;\n      var action;\n\n      if (this.isDisabled) {\n        return;\n      }\n\n      if (touches) {\n        touchesLength = touches.length;\n\n        if (touchesLength > 1) {\n          if (options.zoomable && options.zoomOnTouch && touchesLength === 2) {\n            e = touches[1];\n            this.startX2 = e.pageX;\n            this.startY2 = e.pageY;\n            action = ACTION_ZOOM;\n          } else {\n            return;\n          }\n        }\n\n        e = touches[0];\n      }\n\n      action = action || $(e.target).data(DATA_ACTION);\n\n      if (REGEXP_ACTIONS.test(action)) {\n        if (this.trigger(EVENT_CROP_START, {\n          originalEvent: originalEvent,\n          action: action\n        }).isDefaultPrevented()) {\n          return;\n        }\n\n        event.preventDefault();\n\n        this.action = action;\n        this.cropping = false;\n\n        // IE8  has `event.pageX/Y`, but not `event.originalEvent.pageX/Y`\n        // IE10 has `event.originalEvent.pageX/Y`, but not `event.pageX/Y`\n        this.startX = e.pageX || originalEvent && originalEvent.pageX;\n        this.startY = e.pageY || originalEvent && originalEvent.pageY;\n\n        if (action === ACTION_CROP) {\n          this.cropping = true;\n          this.$dragBox.addClass(CLASS_MODAL);\n        }\n      }\n    },\n\n    cropMove: function (event) {\n      var options = this.options;\n      var originalEvent = event.originalEvent;\n      var touches = originalEvent && originalEvent.touches;\n      var e = event;\n      var action = this.action;\n      var touchesLength;\n\n      if (this.isDisabled) {\n        return;\n      }\n\n      if (touches) {\n        touchesLength = touches.length;\n\n        if (touchesLength > 1) {\n          if (options.zoomable && options.zoomOnTouch && touchesLength === 2) {\n            e = touches[1];\n            this.endX2 = e.pageX;\n            this.endY2 = e.pageY;\n          } else {\n            return;\n          }\n        }\n\n        e = touches[0];\n      }\n\n      if (action) {\n        if (this.trigger(EVENT_CROP_MOVE, {\n          originalEvent: originalEvent,\n          action: action\n        }).isDefaultPrevented()) {\n          return;\n        }\n\n        event.preventDefault();\n\n        this.endX = e.pageX || originalEvent && originalEvent.pageX;\n        this.endY = e.pageY || originalEvent && originalEvent.pageY;\n\n        this.change(e.shiftKey, action === ACTION_ZOOM ? event : null);\n      }\n    },\n\n    cropEnd: function (event) {\n      var originalEvent = event.originalEvent;\n      var action = this.action;\n\n      if (this.isDisabled) {\n        return;\n      }\n\n      if (action) {\n        event.preventDefault();\n\n        if (this.cropping) {\n          this.cropping = false;\n          this.$dragBox.toggleClass(CLASS_MODAL, this.isCropped && this.options.modal);\n        }\n\n        this.action = '';\n\n        this.trigger(EVENT_CROP_END, {\n          originalEvent: originalEvent,\n          action: action\n        });\n      }\n    },\n\n    change: function (shiftKey, event) {\n      var options = this.options;\n      var aspectRatio = options.aspectRatio;\n      var action = this.action;\n      var container = this.container;\n      var canvas = this.canvas;\n      var cropBox = this.cropBox;\n      var width = cropBox.width;\n      var height = cropBox.height;\n      var left = cropBox.left;\n      var top = cropBox.top;\n      var right = left + width;\n      var bottom = top + height;\n      var minLeft = 0;\n      var minTop = 0;\n      var maxWidth = container.width;\n      var maxHeight = container.height;\n      var renderable = true;\n      var offset;\n      var range;\n\n      // Locking aspect ratio in \"free mode\" by holding shift key (#259)\n      if (!aspectRatio && shiftKey) {\n        aspectRatio = width && height ? width / height : 1;\n      }\n\n      if (this.isLimited) {\n        minLeft = cropBox.minLeft;\n        minTop = cropBox.minTop;\n        maxWidth = minLeft + min(container.width, canvas.width, canvas.left + canvas.width);\n        maxHeight = minTop + min(container.height, canvas.height, canvas.top + canvas.height);\n      }\n\n      range = {\n        x: this.endX - this.startX,\n        y: this.endY - this.startY\n      };\n\n      if (aspectRatio) {\n        range.X = range.y * aspectRatio;\n        range.Y = range.x / aspectRatio;\n      }\n\n      switch (action) {\n        // Move crop box\n        case ACTION_ALL:\n          left += range.x;\n          top += range.y;\n          break;\n\n        // Resize crop box\n        case ACTION_EAST:\n          if (range.x >= 0 && (right >= maxWidth || aspectRatio &&\n            (top <= minTop || bottom >= maxHeight))) {\n\n            renderable = false;\n            break;\n          }\n\n          width += range.x;\n\n          if (aspectRatio) {\n            height = width / aspectRatio;\n            top -= range.Y / 2;\n          }\n\n          if (width < 0) {\n            action = ACTION_WEST;\n            width = 0;\n          }\n\n          break;\n\n        case ACTION_NORTH:\n          if (range.y <= 0 && (top <= minTop || aspectRatio &&\n            (left <= minLeft || right >= maxWidth))) {\n\n            renderable = false;\n            break;\n          }\n\n          height -= range.y;\n          top += range.y;\n\n          if (aspectRatio) {\n            width = height * aspectRatio;\n            left += range.X / 2;\n          }\n\n          if (height < 0) {\n            action = ACTION_SOUTH;\n            height = 0;\n          }\n\n          break;\n\n        case ACTION_WEST:\n          if (range.x <= 0 && (left <= minLeft || aspectRatio &&\n            (top <= minTop || bottom >= maxHeight))) {\n\n            renderable = false;\n            break;\n          }\n\n          width -= range.x;\n          left += range.x;\n\n          if (aspectRatio) {\n            height = width / aspectRatio;\n            top += range.Y / 2;\n          }\n\n          if (width < 0) {\n            action = ACTION_EAST;\n            width = 0;\n          }\n\n          break;\n\n        case ACTION_SOUTH:\n          if (range.y >= 0 && (bottom >= maxHeight || aspectRatio &&\n            (left <= minLeft || right >= maxWidth))) {\n\n            renderable = false;\n            break;\n          }\n\n          height += range.y;\n\n          if (aspectRatio) {\n            width = height * aspectRatio;\n            left -= range.X / 2;\n          }\n\n          if (height < 0) {\n            action = ACTION_NORTH;\n            height = 0;\n          }\n\n          break;\n\n        case ACTION_NORTH_EAST:\n          if (aspectRatio) {\n            if (range.y <= 0 && (top <= minTop || right >= maxWidth)) {\n              renderable = false;\n              break;\n            }\n\n            height -= range.y;\n            top += range.y;\n            width = height * aspectRatio;\n          } else {\n            if (range.x >= 0) {\n              if (right < maxWidth) {\n                width += range.x;\n              } else if (range.y <= 0 && top <= minTop) {\n                renderable = false;\n              }\n            } else {\n              width += range.x;\n            }\n\n            if (range.y <= 0) {\n              if (top > minTop) {\n                height -= range.y;\n                top += range.y;\n              }\n            } else {\n              height -= range.y;\n              top += range.y;\n            }\n          }\n\n          if (width < 0 && height < 0) {\n            action = ACTION_SOUTH_WEST;\n            height = 0;\n            width = 0;\n          } else if (width < 0) {\n            action = ACTION_NORTH_WEST;\n            width = 0;\n          } else if (height < 0) {\n            action = ACTION_SOUTH_EAST;\n            height = 0;\n          }\n\n          break;\n\n        case ACTION_NORTH_WEST:\n          if (aspectRatio) {\n            if (range.y <= 0 && (top <= minTop || left <= minLeft)) {\n              renderable = false;\n              break;\n            }\n\n            height -= range.y;\n            top += range.y;\n            width = height * aspectRatio;\n            left += range.X;\n          } else {\n            if (range.x <= 0) {\n              if (left > minLeft) {\n                width -= range.x;\n                left += range.x;\n              } else if (range.y <= 0 && top <= minTop) {\n                renderable = false;\n              }\n            } else {\n              width -= range.x;\n              left += range.x;\n            }\n\n            if (range.y <= 0) {\n              if (top > minTop) {\n                height -= range.y;\n                top += range.y;\n              }\n            } else {\n              height -= range.y;\n              top += range.y;\n            }\n          }\n\n          if (width < 0 && height < 0) {\n            action = ACTION_SOUTH_EAST;\n            height = 0;\n            width = 0;\n          } else if (width < 0) {\n            action = ACTION_NORTH_EAST;\n            width = 0;\n          } else if (height < 0) {\n            action = ACTION_SOUTH_WEST;\n            height = 0;\n          }\n\n          break;\n\n        case ACTION_SOUTH_WEST:\n          if (aspectRatio) {\n            if (range.x <= 0 && (left <= minLeft || bottom >= maxHeight)) {\n              renderable = false;\n              break;\n            }\n\n            width -= range.x;\n            left += range.x;\n            height = width / aspectRatio;\n          } else {\n            if (range.x <= 0) {\n              if (left > minLeft) {\n                width -= range.x;\n                left += range.x;\n              } else if (range.y >= 0 && bottom >= maxHeight) {\n                renderable = false;\n              }\n            } else {\n              width -= range.x;\n              left += range.x;\n            }\n\n            if (range.y >= 0) {\n              if (bottom < maxHeight) {\n                height += range.y;\n              }\n            } else {\n              height += range.y;\n            }\n          }\n\n          if (width < 0 && height < 0) {\n            action = ACTION_NORTH_EAST;\n            height = 0;\n            width = 0;\n          } else if (width < 0) {\n            action = ACTION_SOUTH_EAST;\n            width = 0;\n          } else if (height < 0) {\n            action = ACTION_NORTH_WEST;\n            height = 0;\n          }\n\n          break;\n\n        case ACTION_SOUTH_EAST:\n          if (aspectRatio) {\n            if (range.x >= 0 && (right >= maxWidth || bottom >= maxHeight)) {\n              renderable = false;\n              break;\n            }\n\n            width += range.x;\n            height = width / aspectRatio;\n          } else {\n            if (range.x >= 0) {\n              if (right < maxWidth) {\n                width += range.x;\n              } else if (range.y >= 0 && bottom >= maxHeight) {\n                renderable = false;\n              }\n            } else {\n              width += range.x;\n            }\n\n            if (range.y >= 0) {\n              if (bottom < maxHeight) {\n                height += range.y;\n              }\n            } else {\n              height += range.y;\n            }\n          }\n\n          if (width < 0 && height < 0) {\n            action = ACTION_NORTH_WEST;\n            height = 0;\n            width = 0;\n          } else if (width < 0) {\n            action = ACTION_SOUTH_WEST;\n            width = 0;\n          } else if (height < 0) {\n            action = ACTION_NORTH_EAST;\n            height = 0;\n          }\n\n          break;\n\n        // Move canvas\n        case ACTION_MOVE:\n          this.move(range.x, range.y);\n          renderable = false;\n          break;\n\n        // Zoom canvas\n        case ACTION_ZOOM:\n          this.zoom((function (x1, y1, x2, y2) {\n            var z1 = sqrt(x1 * x1 + y1 * y1);\n            var z2 = sqrt(x2 * x2 + y2 * y2);\n\n            return (z2 - z1) / z1;\n          })(\n            abs(this.startX - this.startX2),\n            abs(this.startY - this.startY2),\n            abs(this.endX - this.endX2),\n            abs(this.endY - this.endY2)\n          ), event);\n          this.startX2 = this.endX2;\n          this.startY2 = this.endY2;\n          renderable = false;\n          break;\n\n        // Create crop box\n        case ACTION_CROP:\n          if (!range.x || !range.y) {\n            renderable = false;\n            break;\n          }\n\n          offset = this.$cropper.offset();\n          left = this.startX - offset.left;\n          top = this.startY - offset.top;\n          width = cropBox.minWidth;\n          height = cropBox.minHeight;\n\n          if (range.x > 0) {\n            action = range.y > 0 ? ACTION_SOUTH_EAST : ACTION_NORTH_EAST;\n          } else if (range.x < 0) {\n            left -= width;\n            action = range.y > 0 ? ACTION_SOUTH_WEST : ACTION_NORTH_WEST;\n          }\n\n          if (range.y < 0) {\n            top -= height;\n          }\n\n          // Show the crop box if is hidden\n          if (!this.isCropped) {\n            this.$cropBox.removeClass(CLASS_HIDDEN);\n            this.isCropped = true;\n\n            if (this.isLimited) {\n              this.limitCropBox(true, true);\n            }\n          }\n\n          break;\n\n        // No default\n      }\n\n      if (renderable) {\n        cropBox.width = width;\n        cropBox.height = height;\n        cropBox.left = left;\n        cropBox.top = top;\n        this.action = action;\n\n        this.renderCropBox();\n      }\n\n      // Override\n      this.startX = this.endX;\n      this.startY = this.endY;\n    },\n\n    // Show the crop box manually\n    crop: function () {\n      if (!this.isBuilt || this.isDisabled) {\n        return;\n      }\n\n      if (!this.isCropped) {\n        this.isCropped = true;\n        this.limitCropBox(true, true);\n\n        if (this.options.modal) {\n          this.$dragBox.addClass(CLASS_MODAL);\n        }\n\n        this.$cropBox.removeClass(CLASS_HIDDEN);\n      }\n\n      this.setCropBoxData(this.initialCropBox);\n    },\n\n    // Reset the image and crop box to their initial states\n    reset: function () {\n      if (!this.isBuilt || this.isDisabled) {\n        return;\n      }\n\n      this.image = $.extend({}, this.initialImage);\n      this.canvas = $.extend({}, this.initialCanvas);\n      this.cropBox = $.extend({}, this.initialCropBox);\n\n      this.renderCanvas();\n\n      if (this.isCropped) {\n        this.renderCropBox();\n      }\n    },\n\n    // Clear the crop box\n    clear: function () {\n      if (!this.isCropped || this.isDisabled) {\n        return;\n      }\n\n      $.extend(this.cropBox, {\n        left: 0,\n        top: 0,\n        width: 0,\n        height: 0\n      });\n\n      this.isCropped = false;\n      this.renderCropBox();\n\n      this.limitCanvas(true, true);\n\n      // Render canvas after crop box rendered\n      this.renderCanvas();\n\n      this.$dragBox.removeClass(CLASS_MODAL);\n      this.$cropBox.addClass(CLASS_HIDDEN);\n    },\n\n    /**\n     * Replace the image's src and rebuild the cropper\n     *\n     * @param {String} url\n     * @param {Boolean} onlyColorChanged (optional)\n     */\n    replace: function (url, onlyColorChanged) {\n      if (!this.isDisabled && url) {\n        if (this.isImg) {\n          this.$element.attr('src', url);\n        }\n\n        if (onlyColorChanged) {\n          this.url = url;\n          this.$clone.attr('src', url);\n\n          if (this.isBuilt) {\n            this.$preview.find('img').add(this.$clone2).attr('src', url);\n          }\n        } else {\n          if (this.isImg) {\n            this.isReplaced = true;\n          }\n\n          // Clear previous data\n          this.options.data = null;\n          this.load(url);\n        }\n      }\n    },\n\n    // Enable (unfreeze) the cropper\n    enable: function () {\n      if (this.isBuilt) {\n        this.isDisabled = false;\n        this.$cropper.removeClass(CLASS_DISABLED);\n      }\n    },\n\n    // Disable (freeze) the cropper\n    disable: function () {\n      if (this.isBuilt) {\n        this.isDisabled = true;\n        this.$cropper.addClass(CLASS_DISABLED);\n      }\n    },\n\n    // Destroy the cropper and remove the instance from the image\n    destroy: function () {\n      var $this = this.$element;\n\n      if (this.isLoaded) {\n        if (this.isImg && this.isReplaced) {\n          $this.attr('src', this.originalUrl);\n        }\n\n        this.unbuild();\n        $this.removeClass(CLASS_HIDDEN);\n      } else {\n        if (this.isImg) {\n          $this.off(EVENT_LOAD, this.start);\n        } else if (this.$clone) {\n          this.$clone.remove();\n        }\n      }\n\n      $this.removeData(NAMESPACE);\n    },\n\n    /**\n     * Move the canvas with relative offsets\n     *\n     * @param {Number} offsetX\n     * @param {Number} offsetY (optional)\n     */\n    move: function (offsetX, offsetY) {\n      var canvas = this.canvas;\n\n      this.moveTo(\n        isUndefined(offsetX) ? offsetX : canvas.left + num(offsetX),\n        isUndefined(offsetY) ? offsetY : canvas.top + num(offsetY)\n      );\n    },\n\n    /**\n     * Move the canvas to an absolute point\n     *\n     * @param {Number} x\n     * @param {Number} y (optional)\n     */\n    moveTo: function (x, y) {\n      var canvas = this.canvas;\n      var isChanged = false;\n\n      // If \"y\" is not present, its default value is \"x\"\n      if (isUndefined(y)) {\n        y = x;\n      }\n\n      x = num(x);\n      y = num(y);\n\n      if (this.isBuilt && !this.isDisabled && this.options.movable) {\n        if (isNumber(x)) {\n          canvas.left = x;\n          isChanged = true;\n        }\n\n        if (isNumber(y)) {\n          canvas.top = y;\n          isChanged = true;\n        }\n\n        if (isChanged) {\n          this.renderCanvas(true);\n        }\n      }\n    },\n\n    /**\n     * Zoom the canvas with a relative ratio\n     *\n     * @param {Number} ratio\n     * @param {jQuery Event} _event (private)\n     */\n    zoom: function (ratio, _event) {\n      var canvas = this.canvas;\n\n      ratio = num(ratio);\n\n      if (ratio < 0) {\n        ratio =  1 / (1 - ratio);\n      } else {\n        ratio = 1 + ratio;\n      }\n\n      this.zoomTo(canvas.width * ratio / canvas.naturalWidth, _event);\n    },\n\n    /**\n     * Zoom the canvas to an absolute ratio\n     *\n     * @param {Number} ratio\n     * @param {jQuery Event} _event (private)\n     */\n    zoomTo: function (ratio, _event) {\n      var options = this.options;\n      var canvas = this.canvas;\n      var width = canvas.width;\n      var height = canvas.height;\n      var naturalWidth = canvas.naturalWidth;\n      var naturalHeight = canvas.naturalHeight;\n      var originalEvent;\n      var newWidth;\n      var newHeight;\n      var offset;\n      var center;\n\n      ratio = num(ratio);\n\n      if (ratio >= 0 && this.isBuilt && !this.isDisabled && options.zoomable) {\n        newWidth = naturalWidth * ratio;\n        newHeight = naturalHeight * ratio;\n\n        if (_event) {\n          originalEvent = _event.originalEvent;\n        }\n\n        if (this.trigger(EVENT_ZOOM, {\n          originalEvent: originalEvent,\n          oldRatio: width / naturalWidth,\n          ratio: newWidth / naturalWidth\n        }).isDefaultPrevented()) {\n          return;\n        }\n\n        if (originalEvent) {\n          offset = this.$cropper.offset();\n          center = originalEvent.touches ? getTouchesCenter(originalEvent.touches) : {\n            pageX: _event.pageX || originalEvent.pageX || 0,\n            pageY: _event.pageY || originalEvent.pageY || 0\n          };\n\n          // Zoom from the triggering point of the event\n          canvas.left -= (newWidth - width) * (\n            ((center.pageX - offset.left) - canvas.left) / width\n          );\n          canvas.top -= (newHeight - height) * (\n            ((center.pageY - offset.top) - canvas.top) / height\n          );\n        } else {\n\n          // Zoom from the center of the canvas\n          canvas.left -= (newWidth - width) / 2;\n          canvas.top -= (newHeight - height) / 2;\n        }\n\n        canvas.width = newWidth;\n        canvas.height = newHeight;\n        this.renderCanvas(true);\n      }\n    },\n\n    /**\n     * Rotate the canvas with a relative degree\n     *\n     * @param {Number} degree\n     */\n    rotate: function (degree) {\n      this.rotateTo((this.image.rotate || 0) + num(degree));\n    },\n\n    /**\n     * Rotate the canvas to an absolute degree\n     * https://developer.mozilla.org/en-US/docs/Web/CSS/transform-function#rotate()\n     *\n     * @param {Number} degree\n     */\n    rotateTo: function (degree) {\n      degree = num(degree);\n\n      if (isNumber(degree) && this.isBuilt && !this.isDisabled && this.options.rotatable) {\n        this.image.rotate = degree % 360;\n        this.isRotated = true;\n        this.renderCanvas(true);\n      }\n    },\n\n    /**\n     * Scale the image\n     * https://developer.mozilla.org/en-US/docs/Web/CSS/transform-function#scale()\n     *\n     * @param {Number} scaleX\n     * @param {Number} scaleY (optional)\n     */\n    scale: function (scaleX, scaleY) {\n      var image = this.image;\n      var isChanged = false;\n\n      // If \"scaleY\" is not present, its default value is \"scaleX\"\n      if (isUndefined(scaleY)) {\n        scaleY = scaleX;\n      }\n\n      scaleX = num(scaleX);\n      scaleY = num(scaleY);\n\n      if (this.isBuilt && !this.isDisabled && this.options.scalable) {\n        if (isNumber(scaleX)) {\n          image.scaleX = scaleX;\n          isChanged = true;\n        }\n\n        if (isNumber(scaleY)) {\n          image.scaleY = scaleY;\n          isChanged = true;\n        }\n\n        if (isChanged) {\n          this.renderImage(true);\n        }\n      }\n    },\n\n    /**\n     * Scale the abscissa of the image\n     *\n     * @param {Number} scaleX\n     */\n    scaleX: function (scaleX) {\n      var scaleY = this.image.scaleY;\n\n      this.scale(scaleX, isNumber(scaleY) ? scaleY : 1);\n    },\n\n    /**\n     * Scale the ordinate of the image\n     *\n     * @param {Number} scaleY\n     */\n    scaleY: function (scaleY) {\n      var scaleX = this.image.scaleX;\n\n      this.scale(isNumber(scaleX) ? scaleX : 1, scaleY);\n    },\n\n    /**\n     * Get the cropped area position and size data (base on the original image)\n     *\n     * @param {Boolean} isRounded (optional)\n     * @return {Object} data\n     */\n    getData: function (isRounded) {\n      var options = this.options;\n      var image = this.image;\n      var canvas = this.canvas;\n      var cropBox = this.cropBox;\n      var ratio;\n      var data;\n\n      if (this.isBuilt && this.isCropped) {\n        data = {\n          x: cropBox.left - canvas.left,\n          y: cropBox.top - canvas.top,\n          width: cropBox.width,\n          height: cropBox.height\n        };\n\n        ratio = image.width / image.naturalWidth;\n\n        $.each(data, function (i, n) {\n          n = n / ratio;\n          data[i] = isRounded ? round(n) : n;\n        });\n\n      } else {\n        data = {\n          x: 0,\n          y: 0,\n          width: 0,\n          height: 0\n        };\n      }\n\n      if (options.rotatable) {\n        data.rotate = image.rotate || 0;\n      }\n\n      if (options.scalable) {\n        data.scaleX = image.scaleX || 1;\n        data.scaleY = image.scaleY || 1;\n      }\n\n      return data;\n    },\n\n    /**\n     * Set the cropped area position and size with new data\n     *\n     * @param {Object} data\n     */\n    setData: function (data) {\n      var options = this.options;\n      var image = this.image;\n      var canvas = this.canvas;\n      var cropBoxData = {};\n      var isRotated;\n      var isScaled;\n      var ratio;\n\n      if ($.isFunction(data)) {\n        data = data.call(this.element);\n      }\n\n      if (this.isBuilt && !this.isDisabled && $.isPlainObject(data)) {\n        if (options.rotatable) {\n          if (isNumber(data.rotate) && data.rotate !== image.rotate) {\n            image.rotate = data.rotate;\n            this.isRotated = isRotated = true;\n          }\n        }\n\n        if (options.scalable) {\n          if (isNumber(data.scaleX) && data.scaleX !== image.scaleX) {\n            image.scaleX = data.scaleX;\n            isScaled = true;\n          }\n\n          if (isNumber(data.scaleY) && data.scaleY !== image.scaleY) {\n            image.scaleY = data.scaleY;\n            isScaled = true;\n          }\n        }\n\n        if (isRotated) {\n          this.renderCanvas();\n        } else if (isScaled) {\n          this.renderImage();\n        }\n\n        ratio = image.width / image.naturalWidth;\n\n        if (isNumber(data.x)) {\n          cropBoxData.left = data.x * ratio + canvas.left;\n        }\n\n        if (isNumber(data.y)) {\n          cropBoxData.top = data.y * ratio + canvas.top;\n        }\n\n        if (isNumber(data.width)) {\n          cropBoxData.width = data.width * ratio;\n        }\n\n        if (isNumber(data.height)) {\n          cropBoxData.height = data.height * ratio;\n        }\n\n        this.setCropBoxData(cropBoxData);\n      }\n    },\n\n    /**\n     * Get the container size data\n     *\n     * @return {Object} data\n     */\n    getContainerData: function () {\n      return this.isBuilt ? this.container : {};\n    },\n\n    /**\n     * Get the image position and size data\n     *\n     * @return {Object} data\n     */\n    getImageData: function () {\n      return this.isLoaded ? this.image : {};\n    },\n\n    /**\n     * Get the canvas position and size data\n     *\n     * @return {Object} data\n     */\n    getCanvasData: function () {\n      var canvas = this.canvas;\n      var data = {};\n\n      if (this.isBuilt) {\n        $.each([\n          'left',\n          'top',\n          'width',\n          'height',\n          'naturalWidth',\n          'naturalHeight'\n        ], function (i, n) {\n          data[n] = canvas[n];\n        });\n      }\n\n      return data;\n    },\n\n    /**\n     * Set the canvas position and size with new data\n     *\n     * @param {Object} data\n     */\n    setCanvasData: function (data) {\n      var canvas = this.canvas;\n      var aspectRatio = canvas.aspectRatio;\n\n      if ($.isFunction(data)) {\n        data = data.call(this.$element);\n      }\n\n      if (this.isBuilt && !this.isDisabled && $.isPlainObject(data)) {\n        if (isNumber(data.left)) {\n          canvas.left = data.left;\n        }\n\n        if (isNumber(data.top)) {\n          canvas.top = data.top;\n        }\n\n        if (isNumber(data.width)) {\n          canvas.width = data.width;\n          canvas.height = data.width / aspectRatio;\n        } else if (isNumber(data.height)) {\n          canvas.height = data.height;\n          canvas.width = data.height * aspectRatio;\n        }\n\n        this.renderCanvas(true);\n      }\n    },\n\n    /**\n     * Get the crop box position and size data\n     *\n     * @return {Object} data\n     */\n    getCropBoxData: function () {\n      var cropBox = this.cropBox;\n      var data;\n\n      if (this.isBuilt && this.isCropped) {\n        data = {\n          left: cropBox.left,\n          top: cropBox.top,\n          width: cropBox.width,\n          height: cropBox.height\n        };\n      }\n\n      return data || {};\n    },\n\n    /**\n     * Set the crop box position and size with new data\n     *\n     * @param {Object} data\n     */\n    setCropBoxData: function (data) {\n      var cropBox = this.cropBox;\n      var aspectRatio = this.options.aspectRatio;\n      var isWidthChanged;\n      var isHeightChanged;\n\n      if ($.isFunction(data)) {\n        data = data.call(this.$element);\n      }\n\n      if (this.isBuilt && this.isCropped && !this.isDisabled && $.isPlainObject(data)) {\n\n        if (isNumber(data.left)) {\n          cropBox.left = data.left;\n        }\n\n        if (isNumber(data.top)) {\n          cropBox.top = data.top;\n        }\n\n        if (isNumber(data.width)) {\n          isWidthChanged = true;\n          cropBox.width = data.width;\n        }\n\n        if (isNumber(data.height)) {\n          isHeightChanged = true;\n          cropBox.height = data.height;\n        }\n\n        if (aspectRatio) {\n          if (isWidthChanged) {\n            cropBox.height = cropBox.width / aspectRatio;\n          } else if (isHeightChanged) {\n            cropBox.width = cropBox.height * aspectRatio;\n          }\n        }\n\n        this.renderCropBox();\n      }\n    },\n\n    /**\n     * Get a canvas drawn the cropped image\n     *\n     * @param {Object} options (optional)\n     * @return {HTMLCanvasElement} canvas\n     */\n    getCroppedCanvas: function (options) {\n      var originalWidth;\n      var originalHeight;\n      var canvasWidth;\n      var canvasHeight;\n      var scaledWidth;\n      var scaledHeight;\n      var scaledRatio;\n      var aspectRatio;\n      var canvas;\n      var context;\n      var data;\n\n      if (!this.isBuilt || !SUPPORT_CANVAS) {\n        return;\n      }\n\n      if (!this.isCropped) {\n        return getSourceCanvas(this.$clone[0], this.image);\n      }\n\n      if (!$.isPlainObject(options)) {\n        options = {};\n      }\n\n      data = this.getData();\n      originalWidth = data.width;\n      originalHeight = data.height;\n      aspectRatio = originalWidth / originalHeight;\n\n      if ($.isPlainObject(options)) {\n        scaledWidth = options.width;\n        scaledHeight = options.height;\n\n        if (scaledWidth) {\n          scaledHeight = scaledWidth / aspectRatio;\n          scaledRatio = scaledWidth / originalWidth;\n        } else if (scaledHeight) {\n          scaledWidth = scaledHeight * aspectRatio;\n          scaledRatio = scaledHeight / originalHeight;\n        }\n      }\n\n      // The canvas element will use `Math.floor` on a float number, so floor first\n      canvasWidth = floor(scaledWidth || originalWidth);\n      canvasHeight = floor(scaledHeight || originalHeight);\n\n      canvas = $('<canvas>')[0];\n      canvas.width = canvasWidth;\n      canvas.height = canvasHeight;\n      context = canvas.getContext('2d');\n\n      if (options.fillColor) {\n        context.fillStyle = options.fillColor;\n        context.fillRect(0, 0, canvasWidth, canvasHeight);\n      }\n\n      // https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D.drawImage\n      context.drawImage.apply(context, (function () {\n        var source = getSourceCanvas(this.$clone[0], this.image);\n        var sourceWidth = source.width;\n        var sourceHeight = source.height;\n        var canvas = this.canvas;\n        var params = [source];\n\n        // Source canvas\n        var srcX = data.x + canvas.naturalWidth * (abs(data.scaleX || 1) - 1) / 2;\n        var srcY = data.y + canvas.naturalHeight * (abs(data.scaleY || 1) - 1) / 2;\n        var srcWidth;\n        var srcHeight;\n\n        // Destination canvas\n        var dstX;\n        var dstY;\n        var dstWidth;\n        var dstHeight;\n\n        if (srcX <= -originalWidth || srcX > sourceWidth) {\n          srcX = srcWidth = dstX = dstWidth = 0;\n        } else if (srcX <= 0) {\n          dstX = -srcX;\n          srcX = 0;\n          srcWidth = dstWidth = min(sourceWidth, originalWidth + srcX);\n        } else if (srcX <= sourceWidth) {\n          dstX = 0;\n          srcWidth = dstWidth = min(originalWidth, sourceWidth - srcX);\n        }\n\n        if (srcWidth <= 0 || srcY <= -originalHeight || srcY > sourceHeight) {\n          srcY = srcHeight = dstY = dstHeight = 0;\n        } else if (srcY <= 0) {\n          dstY = -srcY;\n          srcY = 0;\n          srcHeight = dstHeight = min(sourceHeight, originalHeight + srcY);\n        } else if (srcY <= sourceHeight) {\n          dstY = 0;\n          srcHeight = dstHeight = min(originalHeight, sourceHeight - srcY);\n        }\n\n        // All the numerical parameters should be integer for `drawImage` (#476)\n        params.push(floor(srcX), floor(srcY), floor(srcWidth), floor(srcHeight));\n\n        // Scale destination sizes\n        if (scaledRatio) {\n          dstX *= scaledRatio;\n          dstY *= scaledRatio;\n          dstWidth *= scaledRatio;\n          dstHeight *= scaledRatio;\n        }\n\n        // Avoid \"IndexSizeError\" in IE and Firefox\n        if (dstWidth > 0 && dstHeight > 0) {\n          params.push(floor(dstX), floor(dstY), floor(dstWidth), floor(dstHeight));\n        }\n\n        return params;\n      }).call(this));\n\n      return canvas;\n    },\n\n    /**\n     * Change the aspect ratio of the crop box\n     *\n     * @param {Number} aspectRatio\n     */\n    setAspectRatio: function (aspectRatio) {\n      var options = this.options;\n\n      if (!this.isDisabled && !isUndefined(aspectRatio)) {\n\n        // 0 -> NaN\n        options.aspectRatio = max(0, aspectRatio) || NaN;\n\n        if (this.isBuilt) {\n          this.initCropBox();\n\n          if (this.isCropped) {\n            this.renderCropBox();\n          }\n        }\n      }\n    },\n\n    /**\n     * Change the drag mode\n     *\n     * @param {String} mode (optional)\n     */\n    setDragMode: function (mode) {\n      var options = this.options;\n      var croppable;\n      var movable;\n\n      if (this.isLoaded && !this.isDisabled) {\n        croppable = mode === ACTION_CROP;\n        movable = options.movable && mode === ACTION_MOVE;\n        mode = (croppable || movable) ? mode : ACTION_NONE;\n\n        this.$dragBox.\n          data(DATA_ACTION, mode).\n          toggleClass(CLASS_CROP, croppable).\n          toggleClass(CLASS_MOVE, movable);\n\n        if (!options.cropBoxMovable) {\n\n          // Sync drag mode to crop box when it is not movable(#300)\n          this.$face.\n            data(DATA_ACTION, mode).\n            toggleClass(CLASS_CROP, croppable).\n            toggleClass(CLASS_MOVE, movable);\n        }\n      }\n    }\n  };\n\n  Cropper.DEFAULTS = {\n\n    // Define the view mode of the cropper\n    viewMode: 0, // 0, 1, 2, 3\n\n    // Define the dragging mode of the cropper\n    dragMode: 'crop', // 'crop', 'move' or 'none'\n\n    // Define the aspect ratio of the crop box\n    aspectRatio: NaN,\n\n    // An object with the previous cropping result data\n    data: null,\n\n    // A jQuery selector for adding extra containers to preview\n    preview: '',\n\n    // Re-render the cropper when resize the window\n    responsive: true,\n\n    // Restore the cropped area after resize the window\n    restore: true,\n\n    // Check if the current image is a cross-origin image\n    checkCrossOrigin: true,\n\n    // Check the current image's Exif Orientation information\n    checkOrientation: true,\n\n    // Show the black modal\n    modal: true,\n\n    // Show the dashed lines for guiding\n    guides: true,\n\n    // Show the center indicator for guiding\n    center: true,\n\n    // Show the white modal to highlight the crop box\n    highlight: true,\n\n    // Show the grid background\n    background: true,\n\n    // Enable to crop the image automatically when initialize\n    autoCrop: true,\n\n    // Define the percentage of automatic cropping area when initializes\n    autoCropArea: 0.8,\n\n    // Enable to move the image\n    movable: true,\n\n    // Enable to rotate the image\n    rotatable: true,\n\n    // Enable to scale the image\n    scalable: true,\n\n    // Enable to zoom the image\n    zoomable: true,\n\n    // Enable to zoom the image by dragging touch\n    zoomOnTouch: true,\n\n    // Enable to zoom the image by wheeling mouse\n    zoomOnWheel: true,\n\n    // Define zoom ratio when zoom the image by wheeling mouse\n    wheelZoomRatio: 0.1,\n\n    // Enable to move the crop box\n    cropBoxMovable: true,\n\n    // Enable to resize the crop box\n    cropBoxResizable: true,\n\n    // Toggle drag mode between \"crop\" and \"move\" when click twice on the cropper\n    toggleDragModeOnDblclick: true,\n\n    // Size limitation\n    minCanvasWidth: 0,\n    minCanvasHeight: 0,\n    minCropBoxWidth: 0,\n    minCropBoxHeight: 0,\n    minContainerWidth: 200,\n    minContainerHeight: 100,\n\n    // Shortcuts of events\n    build: null,\n    built: null,\n    cropstart: null,\n    cropmove: null,\n    cropend: null,\n    crop: null,\n    zoom: null\n  };\n\n  Cropper.setDefaults = function (options) {\n    $.extend(Cropper.DEFAULTS, options);\n  };\n\n  Cropper.TEMPLATE = (\n    '<div class=\"cropper-container\">' +\n      '<div class=\"cropper-wrap-box\">' +\n        '<div class=\"cropper-canvas\"></div>' +\n      '</div>' +\n      '<div class=\"cropper-drag-box\"></div>' +\n      '<div class=\"cropper-crop-box\">' +\n        '<span class=\"cropper-view-box\"></span>' +\n        '<span class=\"cropper-dashed dashed-h\"></span>' +\n        '<span class=\"cropper-dashed dashed-v\"></span>' +\n        '<span class=\"cropper-center\"></span>' +\n        '<span class=\"cropper-face\"></span>' +\n        '<span class=\"cropper-line line-e\" data-action=\"e\"></span>' +\n        '<span class=\"cropper-line line-n\" data-action=\"n\"></span>' +\n        '<span class=\"cropper-line line-w\" data-action=\"w\"></span>' +\n        '<span class=\"cropper-line line-s\" data-action=\"s\"></span>' +\n        '<span class=\"cropper-point point-e\" data-action=\"e\"></span>' +\n        '<span class=\"cropper-point point-n\" data-action=\"n\"></span>' +\n        '<span class=\"cropper-point point-w\" data-action=\"w\"></span>' +\n        '<span class=\"cropper-point point-s\" data-action=\"s\"></span>' +\n        '<span class=\"cropper-point point-ne\" data-action=\"ne\"></span>' +\n        '<span class=\"cropper-point point-nw\" data-action=\"nw\"></span>' +\n        '<span class=\"cropper-point point-sw\" data-action=\"sw\"></span>' +\n        '<span class=\"cropper-point point-se\" data-action=\"se\"></span>' +\n      '</div>' +\n    '</div>'\n  );\n\n  // Save the other cropper\n  Cropper.other = $.fn.cropper;\n\n  // Register as jQuery plugin\n  $.fn.cropper = function (option) {\n    var args = toArray(arguments, 1);\n    var result;\n\n    this.each(function () {\n      var $this = $(this);\n      var data = $this.data(NAMESPACE);\n      var options;\n      var fn;\n\n      if (!data) {\n        if (/destroy/.test(option)) {\n          return;\n        }\n\n        options = $.extend({}, $this.data(), $.isPlainObject(option) && option);\n        $this.data(NAMESPACE, (data = new Cropper(this, options)));\n      }\n\n      if (typeof option === 'string' && $.isFunction(fn = data[option])) {\n        result = fn.apply(data, args);\n      }\n    });\n\n    return isUndefined(result) ? this : result;\n  };\n\n  $.fn.cropper.Constructor = Cropper;\n  $.fn.cropper.setDefaults = Cropper.setDefaults;\n\n  // No conflict\n  $.fn.cropper.noConflict = function () {\n    $.fn.cropper = Cropper.other;\n    return this;\n  };\n\n});\n"
  },
  {
    "path": "static/css/export.css",
    "content": "body{\n    margin: 5px auto;\n    padding: 5px 30px;\n}\n.article-title{\n    margin: 15px auto;\n    line-height: 35px;\n}\n.editormd-preview-container{\n    padding: 0 !important;\n}\n.markdown-body{\n    -webkit-backface-visibility: inherit !important;\n    backface-visibility: inherit !important;\n}\n.markdown-body pre{\n    max-height: none !important;\n    white-space: pre-wrap !important;\n    word-wrap: break-word !important;\n}\n.markdown-toc{\n    display: none !important;\n    width: 0 !important;\n}\n.article-body .markdown-article{\n    margin-right: 0 !important;\n}\n"
  },
  {
    "path": "static/css/jstree.css",
    "content": ".jstree-contextmenu{\n    z-index: 999999;\n}\n.jstree-contextmenu {\n    z-index: 3000\n}\n\n.jstree-contextmenu.jstree-default-contextmenu {\n    border: 1px solid #d6d6d6;\n    box-shadow: 0 0 8px rgba(99,99,99,.3);\n    background-color: #f6f6f6;\n    padding: 0\n}\n\n.jstree-contextmenu.jstree-default-contextmenu li {\n    display: block\n}\n\n.jstree-contextmenu.jstree-default-contextmenu .vakata-context-separator {\n    display: none\n}\n\n.jstree-contextmenu.jstree-default-contextmenu .vakata-contextmenu-sep {\n    display: none\n}\n\n.jstree-contextmenu.jstree-default-contextmenu li a {\n    border-bottom: 0;\n    height: 30px;\n    line-height: 24px;\n    padding-top: 3px;\n    padding-bottom: 3px\n}\n\n.jstree-contextmenu.jstree-default-contextmenu li.vakata-context-hover a {\n    text-shadow: none;\n    background: #116cd6;\n    box-shadow: none;\n    color: #fff\n}\n\n.jstree-contextmenu.jstree-default-contextmenu li>a>i:empty {\n    width: 24px;\n    height: 24px;\n    line-height: 24px;\n    vertical-align: middle\n}\n\n.jstree .jstree-node .jstree-anchor {\n    padding-right: 36px;\n    color: #666\n}\n\n.jstree .jstree-node .m-tree-operate {\n    position: absolute;\n    right: 6px;\n    z-index: 100;\n    display: block\n}\n\n.jstree .jstree-node .m-tree-operate .operate-show {\n    font-size: 20px;\n    color: #999;\n    display: none\n}\n\n.jstree .jstree-node .m-tree-operate .operate-show i {\n    height: 24px;\n    line-height: 24px;\n    vertical-align: top;\n    margin-top: 1px;\n    display: inline-block;\n    font-size: 18px;\n    transition-property: transform;\n    transition-duration: .3s;\n    transition-timing-function: .3s;\n    transition-delay: 0s;\n    -moz-transition-property: transform;\n    -moz-transition-duration: .3s;\n    -moz-transition-timing-function: .3s;\n    -moz-transition-delay: 0s;\n    -webkit-transition-property: transform;\n    -webkit-transition-duration: .3s;\n    -webkit-transition-timing-function: .3s;\n    -webkit-transition-delay: 0s;\n    -o-transition-property: transform;\n    -o-transition-duration: .3s;\n    -o-transition-timing-function: .3s;\n    -o-transition-delay: 0s\n}\n\n.jstree .jstree-node .m-tree-operate .operate-hide {\n    width: 0;\n    right: 100%;\n    top: 2px;\n    position: absolute;\n    overflow: hidden;\n    transition-property: width;\n    transition-duration: .3s;\n    transition-timing-function: linear;\n    transition-delay: 0s;\n    -moz-transition-property: width;\n    -moz-transition-duration: .3s;\n    -moz-transition-timing-function: linear;\n    -moz-transition-delay: 0s;\n    -webkit-transition-property: width;\n    -webkit-transition-duration: .3s;\n    -webkit-transition-timing-function: linear;\n    -webkit-transition-delay: 0s;\n    -o-transition-property: width;\n    -o-transition-duration: .3s;\n    -o-transition-timing-function: linear;\n    -o-transition-delay: 0s\n}\n\n.jstree .jstree-node .m-tree-operate .operate-hide b {\n    font-size: 12px;\n    display: inline-block;\n    margin: 3px 2px 0;\n    vertical-align: top;\n    width: 18px;\n    height: 18px;\n    text-align: center;\n    line-height: 18px;\n    border-radius: 9px;\n    color: #fff;\n    cursor: pointer\n}\n\n.jstree .jstree-node .m-tree-operate .operate-hide b.add {\n    background-color: #39f\n}\n\n.jstree .jstree-node .m-tree-operate .operate-hide b.del {\n    background-color: #c00\n}\n\n.jstree .jstree-node .m-tree-operate .operate-hide b.edit {\n    background-color: #e5b120\n}\n\n.jstree .jstree-node .m-tree-operate .operate-hide b.up {\n    background-color: #3e8a2a;\n    font-size: 18px\n}\n\n.jstree .jstree-node .m-tree-operate .operate-hide b.down {\n    background-color: #3e8a2a;\n    font-size: 18px\n}\n\n.jstree .jstree-node .m-tree-operate:hover .operate-hide {\n    width: 108px\n}\n\n.jstree .jstree-node .m-tree-operate:hover .operate-show i {\n    color: #333;\n    transform: rotate(360deg);\n    -ms-transform: rotate(360deg);\n    -moz-transform: rotate(360deg);\n    -webkit-transform: rotate(360deg);\n    -o-transform: rotate(360deg)\n}\n\n.jstree .jstree-node .jstree-anchor.jstree-clicked ,.jstree .jstree-hovered{\n    color: #ffffff !important;\n}\n\n.jstree .jstree-node .m-tree-operate.operate-hover .operate-hide {\n    width: 108px\n}\n.jstree-default .jstree-wholerow-hovered {\n    background: #08c;\n    color: white !important;\n}\n.jstree-default .jstree-wholerow-clicked {\n    background: #10af88;\n    background: -webkit-linear-gradient(top, #beebff 0%, #a8e4ff 100%);\n    background: linear-gradient(to bottom, #10af88 0%, #10af88 100%);\n    color: #ffffff;\n}\n.jstree-default .jstree-wholerow {\n    height: 30px;\n}\n.jstree-default .jstree-node {\n    min-height: 30px;\n    line-height: 30px;\n    margin-left: 30px;\n    min-width: 30px;\n}\n.jstree-default .jstree-node {\n    min-height: 20px;\n    line-height: 20px;\n    margin-left: 20px;\n    min-width: 20px;\n}\n.jstree-default .jstree-anchor {\n    line-height: 30px;\n    height: 30px;\n}\n"
  },
  {
    "path": "static/css/kancloud.css",
    "content": "html,\nbody {\n    height: 100%;\n    font-size: 12px;\n}\n\nbody,\nform,\nul,\nol,\ntable,\ninput,\nbutton,\np,\nh1,\nh2,\nh3,\nh4,\nh5,\nh6,\nblockquote,\npre,\ndl,\ndt,\ndd,\ndiv,\nspan,\nb,\ni {\n    margin: 0;\n    padding: 0;\n    -webkit-tap-highlight-color: transparent;\n}\n\nbody {\n    color: #222;\n    background-color: #fff;\n    font-size: 14px;\n    word-wrap: break-word;\n    line-height: 1em;\n    -webkit-font-smoothing: antialiased;\n}\n\nh1,\nh2,\nh3,\nh4,\nh5,\nh6,\nstrong,\ninput,\nselect,\ntextarea,\nbutton,\nbody,\ncode {\n    font-family: \"Helvetica Neue\", Helvetica, \"Segoe UI\", Arial, freesans, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\", \"Microsoft Yahei\", \"Helvetica Neue\", Helvetica;\n}\n\nh1 {\n    font-size: 2.25em;\n    font-weight: 500;\n}\n\nh2 {\n    font-size: 1.75em;\n    font-weight: 500;\n}\n\nh3 {\n    font-size: 1.5em;\n    font-weight: 500\n}\n\nh4 {\n    font-size: 1.2em;\n    font-weight: 300\n}\n\nh5 {\n    font-size: 1.0em;\n    font-weight: 300\n}\n\nh6 {\n    font-size: .8em;\n    font-weight: 200\n}\n\ntable>tbody>tr:hover {\n    background-color: #F5F5F5;\n}\n\n.m-manual:not(.manual-mobile) ::-webkit-scrollbar {\n    height: 10px;\n    width: 7px;\n    background: rgba(0, 0, 0, .1);\n}\n\n.m-manual:not(.manual-mobile) ::-webkit-scrollbar:hover {\n    background: rgba(0, 0, 0, .2)\n}\n\n.m-manual:not(.manual-mobile) ::-webkit-scrollbar-thumb {\n    background: rgba(0, 0, 0, .3);\n    -webkit-border-radius: 6px;\n    -moz-border-radius: 6px;\n    -ms-border-radius: 6px;\n    -o-border-radius: 6px;\n    border-radius: 6px\n}\n\n.m-manual:not(.manual-mobile)::-webkit-scrollbar-thumb:hover {\n    -webkit-box-shadow: inset 1px 1px 1px rgba(0, 0, 0, .25);\n    -moz-box-shadow: inset 1px 1px 1px rgba(0, 0, 0, .25);\n    -ms-box-shadow: inset 1px 1px 1px rgba(0, 0, 0, .25);\n    -o-box-shadow: inset 1px 1px 1px rgba(0, 0, 0, .25);\n    box-shadow: inset 1px 1px 1px rgba(0, 0, 0, .25);\n    background-color: rgba(0, 0, 0, .4)\n}\n\n.m-manual.manual-reader .manual-head .slidebar {\n    display: none\n}\n\n.m-manual .manual-head {\n    min-width: 980px;\n    height: 54px;\n    line-height: 54px;\n    padding: 0 .8em;\n    z-index: 900;\n    position: fixed;\n    top: 0;\n    left: 0;\n    right: 0;\n    background-color: #fff;\n    transition-property: top;\n    transition-duration: .3s;\n    transition-timing-function: linear;\n    transition-delay: 0s;\n    -moz-transition-property: top;\n    -moz-transition-duration: .3s;\n    -moz-transition-timing-function: linear;\n    -moz-transition-delay: 0s;\n    -webkit-transition-property: top;\n    -webkit-transition-duration: .3s;\n    -webkit-transition-timing-function: linear;\n    -webkit-transition-delay: 0s;\n    -o-transition-property: top;\n    -o-transition-duration: .3s;\n    -o-transition-timing-function: linear;\n    -o-transition-delay: 0s\n}\n\n.m-manual .slidebar {\n    display: none;\n}\n\n.m-manual .manual-head .manual-title {\n    display: inline-block;\n    height: 30px;\n    line-height: 54px;\n    color: #333;\n    font-size: 16px;\n    font-weight: bold;\n}\n\n.m-manual .manual-tab {\n    position: absolute;\n    top: 0;\n    bottom: 0;\n    left: 0;\n    right: 0\n}\n\n.m-manual .manual-left {\n    position: absolute;\n    left: 0;\n    top: 55px;\n    z-index: 301;\n    bottom: 0;\n    width: 279px;\n    border-right: 1px solid #ddd;\n    background-color: #fafafa;\n}\n\n.m-manual .manual-tab .tab-navg {\n    zoom: 1;\n    border-bottom: 1px solid #ddd\n}\n\n.m-manual .manual-tab .tab-util {\n    position: absolute;\n    top: 50%;\n    right: -14px\n}\n\n.m-manual .manual-tab .tab-util .item {\n    color: #999;\n    cursor: pointer;\n    height: 24px;\n    line-height: 24px;\n    display: inline-block;\n    margin-top: 4px\n}\n\n.manual-fullscreen-switch {\n    display: block\n}\n\n.manual-fullscreen-switch .open,\n.manual-fullscreen-switch .close {\n    display: inline-block;\n    width: 30px;\n    height: 30px;\n    cursor: pointer;\n    background-color: #5cb85c;\n    border-radius: 50%;\n    color: #fff;\n    position: relative;\n    font-size: 16px;\n    vertical-align: top;\n    opacity: 1;\n    text-shadow: none;\n    font-weight: 400;\n}\n\n.manual-fullscreen-switch .open:hover,\n.manual-fullscreen-switch .close:hover {\n    background-color: #449d44;\n}\n\n.manual-fullscreen-switch .open:before,\n.manual-fullscreen-switch .close:before {\n    position: absolute;\n    top: 7px;\n    right: 5px;\n}\n\n.manual-fullscreen-switch .open {\n    display: none;\n}\n\n.m-manual.manual-fullscreen-active .manual-fullscreen-switch {\n    /*margin-top: 30px;*/\n}\n\n.m-manual.manual-fullscreen-active .manual-fullscreen-switch .open {\n    display: inline-block;\n}\n\n.m-manual.manual-fullscreen-active .manual-fullscreen-switch .close {\n    display: none;\n}\n\n.m-manual.manual-fullscreen-active .manual-left .m-copyright,\n.m-manual.manual-fullscreen-active .manual-left .tab-navg,\n.m-manual.manual-fullscreen-active .manual-left .tab-wrap {\n    display: none;\n}\n\n.m-manual.manual-fullscreen-active .manual-left {\n    width: 0px;\n}\n\n.m-manual .manual-tab .tab-navg:after {\n    content: '.';\n    display: block;\n    width: 0;\n    height: 0;\n    line-height: 9;\n    overflow: hidden;\n    clear: both;\n    visibility: hidden;\n}\n\n.m-manual .manual-tab .tab-navg .navg-item {\n    font-size: 14px;\n    padding: 0 9px;\n    cursor: pointer;\n    float: left;\n    height: 30px;\n    line-height: 30px;\n    color: #999\n}\n\n.m-manual .manual-tab .tab-navg .navg-item .fa {\n    margin-right: 4px;\n    color: #aaa\n}\n\n.m-manual .manual-tab .tab-navg .navg-item .text {\n    font-weight: 200\n}\n\n.m-manual .manual-tab .tab-navg .navg-item.active,\n.m-manual .manual-tab .tab-navg .navg-item.active:hover,\n.m-manual .manual-tab .tab-navg .navg-item:hover {\n    color: #333\n}\n\n.m-manual .manual-tab .tab-navg .navg-item.active .icon,\n.m-manual .manual-tab .tab-navg .navg-item.active:hover .icon,\n.m-manual .manual-tab .tab-navg .navg-item:hover .icon {\n    color: #333\n}\n\n.m-manual .manual-tab .tab-navg .navg-item.active {\n    border-bottom: 1px solid #fafafa;\n    margin-bottom: -1px;\n    border-left: 1px solid #ddd;\n    border-right: 1px solid #ddd;\n    padding-left: 8px;\n    padding-right: 8px;\n    height: 31px;\n}\n\n.m-manual .manual-tab .tab-item {\n    display: none;\n    position: absolute;\n    top: 31px;\n    bottom: 0;\n    left: 0;\n    right: 0;\n    overflow-y: auto;\n    background-color: #fafafa;\n    margin-bottom: 60px;\n}\n\n.m-manual .manual-tab .tab-item.active {\n    display: block\n}\n\n.m-manual.manual-mode-search .manual-search {\n    display: block\n}\n\n.m-manual.manual-mode-view .manual-catalog {\n    display: block\n}\n\n.m-manual.manual-mode-search .manual-search .search-container {\n    position: absolute;\n    top: 0;\n    left: 0;\n    right: 0;\n    bottom: 0;\n}\n\n.m-manual .manual-search .search-form {\n    margin: 5px 5px 10px 5px;\n    position: relative;\n}\n\n.m-manual .manual-search .btn-search {\n    background-color: #ffffff;\n    border: 0;\n    padding: 5px;\n    position: absolute;\n    top: 2px;\n    right: 5px;\n}\n\n.m-manual .manual-search .btn-search .fa {\n    width: 16px;\n    height: 16px;\n    vertical-align: middle;\n}\n\n.m-manual .manual-search .btn-search .loading {\n    background-image: url(\"../images/loading.gif\");\n}\n\n.m-manual .manual-search .search-result {\n    position: absolute;\n    top: 45px;\n    left: 0;\n    right: 0;\n    bottom: 0;\n    width: 275px;\n    overflow-y: auto;\n    border-top: 1px solid #eee;\n}\n\n.m-manual .manual-search .search-result .search-empty {\n    position: absolute;\n    top: 45%;\n    left: 0;\n    right: 0;\n    text-align: center;\n}\n\n.m-manual .manual-search .search-result .search-empty i {\n    font-size: 50px;\n    display: block;\n    color: #999;\n    font-weight: 200;\n}\n\n.m-manual .manual-search .search-result .search-empty .text {\n    font-size: 16px;\n    font-weight: 200;\n    color: #999;\n    line-height: 40px;\n}\n\n.m-manual .manual-search .search-list {\n    position: absolute;\n    top: 0;\n    bottom: 0;\n    min-width: 100%;\n}\n\n.m-manual .manual-search .search-list a {\n    display: block;\n    border-bottom: 0;\n    height: 30px;\n    line-height: 24px;\n    padding: 3px 10px 3px 20px;\n    color: #666;\n    text-decoration: none;\n    white-space: nowrap;\n    overflow: hidden;\n}\n\n.m-manual .manual-search .search-list a:hover {\n    text-shadow: none;\n    background: #116cd6;\n    box-shadow: none;\n    color: #fff;\n    text-decoration: none;\n    white-space: nowrap;\n}\n\n.m-manual .manual-search .search-list a.active {\n    background: #10af88;\n    background: -webkit-linear-gradient(top, #beebff 0%, #a8e4ff 100%);\n    background: linear-gradient(to bottom, #10af88 0%, #10af88 100%);\n    color: #ffffff;\n}\n\n.m-manual .search-highlight {\n    background-color: #FFFF00 !important;\n    font-style: normal;\n}\n\n.m-manual .manual-left .m-copyright {\n    border-top: 0;\n    background: #fafafa;\n    border-top: 1px solid #ccc;\n    opacity: 1;\n    filter: alpha(opacity=100);\n    position: absolute;\n    bottom: 0;\n    margin: 0;\n    font-size: 12px;\n    z-index: 999;\n    height: auto;\n    width: 100%;\n    padding: 5px 0;\n    text-align: center;\n    line-height: 24px\n}\n\n.m-manual .manual-right {\n    position: absolute;\n    left: 280px;\n    top: 55px;\n    z-index: 300;\n    overflow-y: auto;\n    bottom: 0;\n    right: 0;\n    transition-property: top;\n    transition-duration: .3s;\n    transition-timing-function: linear;\n    transition-delay: 0s;\n    -moz-transition-property: top;\n    -moz-transition-duration: .3s;\n    -moz-transition-timing-function: linear;\n    -moz-transition-delay: 0s;\n    -webkit-transition-property: top;\n    -webkit-transition-duration: .3s;\n    -webkit-transition-timing-function: linear;\n    -webkit-transition-delay: 0s;\n    -o-transition-property: top;\n    -o-transition-duration: .3s;\n    -o-transition-timing-function: linear;\n    -o-transition-delay: 0s\n}\n\n.m-manual.manual-fullscreen-active .manual-right {\n    left: 0;\n}\n\n.m-manual .manual-right .manual-article {\n    background: #ffffff;\n}\n\n.manual-article .article-head {\n    position: relative;\n    zoom: 1;\n    padding: 10px 20px;\n    width: 100%;\n}\n\n.manual-reader .book-title {\n    color: #333333;\n}\n\n.manual-reader .book-title:hover {\n    text-decoration: none;\n    color: #333333;\n}\n\n.manual-article .article-head h1 {\n    margin: 0;\n    font-size: 36px;\n    font-weight: 400;\n    text-align: center;\n    line-height: 42px;\n    text-overflow: ellipsis;\n    white-space: nowrap;\n    color: #636363;\n}\n\n.manual-article .article-head h3 {\n    margin: 0;\n    font-size: 12px;\n    font-weight: 200;\n    text-align: center;\n    line-height: 18px;\n    text-overflow: ellipsis;\n    white-space: nowrap;\n    color: #444\n}\n\n.manual-article .article-info {\n    padding: 5px;\n    color: #AAA !important;\n}\n\n.manual-article .article-content {\n    min-width: 980px;\n    max-width: 90%;\n    padding: 10px 20px;\n    margin-left: auto !important;\n    margin-right: auto !important\n}\n\n@media screen and (max-width: 840px) {\n    .manual-article .article-content {\n        min-width: inherit;\n    }\n}\n\n.manual-article .article-content .article-body {\n    min-height: 90px;\n    padding: 5px;\n}\n\n.manual-article .article-content .article-body .attach-list {\n    list-style: none;\n    border-top: 1px solid #DDDDDD;\n    padding-top: 15px;\n    clear: both;\n}\n\n.manual-article .wiki-bottom {\n    border-top: 1px solid #E5E5E5;\n    line-height: 25px;\n    color: #333;\n    text-align: right;\n    font-size: 12px;\n    margin-bottom: 20px;\n    margin-top: 30px;\n    padding: 5px;\n}\n\n.manual-article .wiki-bottom-left {\n    border-top: 1px solid #E5E5E5;\n    line-height: 25px;\n    color: #333;\n    text-align: left;\n    font-size: 12px;\n    margin-bottom: 20px;\n    margin-top: 30px;\n    padding: 5px;\n}\n\n.manual-article .jump-top .view-backtop {\n    position: fixed;\n    bottom: -30px;\n    right: 30px;\n    font-size: 18px;\n    line-height: 30px;\n    text-align: center;\n    color: #fff;\n    z-index: 9999;\n    font-weight: 200;\n    width: 30px;\n    height: 30px;\n    background-color: #999;\n    border-radius: 4px;\n    opacity: 0;\n    filter: alpha(opacity=0);\n    transition-property: all;\n    transition-duration: .2s;\n    transition-timing-function: linear;\n    transition-delay: 0s;\n    -moz-transition-property: all;\n    -moz-transition-duration: .2s;\n    -moz-transition-timing-function: linear;\n    -moz-transition-delay: 0s;\n    -webkit-transition-property: all;\n    -webkit-transition-duration: .2s;\n    -webkit-transition-timing-function: linear;\n    -webkit-transition-delay: 0s;\n    -o-transition-property: all;\n    -o-transition-duration: .2s;\n    -o-transition-timing-function: linear;\n    -o-transition-delay: 0s;\n}\n\n.manual-article .jump-top .view-backtop.active {\n    opacity: 0.5;\n    bottom: 30px;\n}\n\n.manual-article .jump-top .view-backtop.active:hover {\n    background-color: #449D44;\n    opacity: 1;\n}\n\n.m-manual .manual-progress {\n    position: fixed;\n    top: 54px;\n    left: 0;\n    right: 0;\n    height: 1px;\n    z-index: 302;\n    background-color: #ddd;\n    transition-property: top;\n    transition-duration: .3s;\n    transition-timing-function: linear;\n    transition-delay: 0s;\n    -moz-transition-property: top;\n    -moz-transition-duration: .3s;\n    -moz-transition-timing-function: linear;\n    -moz-transition-delay: 0s;\n    -webkit-transition-property: top;\n    -webkit-transition-duration: .3s;\n    -webkit-transition-timing-function: linear;\n    -webkit-transition-delay: 0s;\n    -o-transition-property: top;\n    -o-transition-duration: .3s;\n    -o-transition-timing-function: linear;\n    -o-transition-delay: 0s\n}\n\n.m-manual .manual-progress .progress-bar {\n    display: block;\n    background-color: #136ec2;\n    height: 100%\n}\n\n.m-comment {\n    margin: 30px auto 70px auto;\n}\n\n.m-comment .comment-result .title {\n    display: block;\n    font-size: 16px;\n    padding-bottom: 6px;\n    line-height: 1.5em;\n    border-bottom: 1px solid #ddddd9;\n    margin-bottom: 10px;\n}\n\n.w-textarea.textarea-full {\n    display: block;\n}\n\n.w-fragment.fragment-tip {\n    color: #999;\n}\n\n.w-textarea .textarea-input {\n    font-size: 14px;\n    padding: 5px 10px;\n    border-radius: 3px;\n    border: 1px solid #ccc;\n    line-height: 1.7em;\n    font-weight: 200;\n}\n\n.m-comment .comment-post .form .enter textarea {\n    resize: none;\n    min-height: 72px;\n    overflow: hidden;\n    width: 100%;\n}\n\n.m-comment .comment-list {\n    padding-bottom: 12px\n}\n\n.m-comment .comment-post {\n    padding-bottom: 35px\n}\n\n.m-comment .comment-item {\n    position: relative;\n    font-size: 1em;\n    border-top: 1px dotted #eee;\n    margin-bottom: -1px;\n    padding: 12px 0;\n    line-height: 1.7em\n}\n\n.m-comment .comment-item .avatar {\n    position: absolute;\n    left: 0;\n    top: 12px;\n    display: inline-block;\n    border-radius: 50%;\n    background: #eee\n}\n\n.m-comment .comment-item .avatar img {\n    border-radius: 50%\n}\n\n.m-comment .comment-item .date {\n    font-weight: 200;\n    color: #999;\n    margin-left: 12px\n}\n\n.m-comment .comment-item .name {\n    color: #136ec2\n}\n\n.m-comment .comment-item .content {\n    margin: 6px 0 9px;\n    font-size: 1.14em;\n    padding: 3px 0\n}\n\n.m-comment .comment-item .content pre {\n    padding: 16px;\n    overflow: auto;\n    font-size: 85%;\n    line-height: 1.45;\n    background-color: #f7f7f7;\n    border: 0;\n    border-radius: 3px;\n    font-family: Consolas, \"Liberation Mono\", Menlo, Courier, monospace\n}\n\n.m-comment .comment-item .content pre>code {\n    display: inline;\n    max-width: 100%;\n    padding: 0;\n    margin: 0;\n    overflow: initial;\n    line-height: inherit;\n    background-color: transparent;\n    border: 0;\n    font-size: 100%\n}\n\n.m-comment .comment-item .operate {\n    position: absolute;\n    top: 12px;\n    right: 0;\n    height: 24px;\n    line-height: 24px\n}\n\n.m-comment .comment-item .operate .number {\n    color: #999\n}\n\n.m-comment .comment-item .operate .delete {\n    display: none\n}\n\n.m-comment .comment-item:hover .operate.toggle .delete {\n    display: inline-block\n}\n\n.m-comment .comment-item:hover .operate.toggle .number {\n    display: none\n}\n\n.m-comment .comment-item .info {\n    height: 24px;\n    line-height: 24px\n}\n\n.m-comment .comment-item .info img {\n    height: 22px;\n    border-radius: 50%;\n    margin-right: 4px;\n    display: ruby;\n}\n\n.m-comment .comment-item .vote {\n    display: inline-block;\n    margin-right: 12px\n}\n\n.m-comment .comment-item .vote .agree,\n.m-comment .comment-item .vote .oppose {\n    display: inline-block;\n    vertical-align: top;\n    width: 30px;\n    height: 30px;\n    text-align: center;\n    line-height: 30px;\n    background-color: #f5f5f5;\n    color: #666666;\n}\n\n.m-comment .comment-item .vote .agree:hover,\n.m-comment .comment-item .vote .oppose:hover {\n    color: #333333;\n}\n\n.m-comment .comment-item .vote .count {\n    height: 30px;\n    line-height: 30px;\n    color: #999;\n    display: inline-block;\n    text-align: center;\n    padding: 0 6px;\n    min-width: 12px;\n    font-weight: 200;\n    vertical-align: top;\n    background-color: #f5f5f5;\n    border-left: 1px solid #eee;\n    border-right: 1px solid #eee\n}\n\n.m-comment .comment-item .vote .agree {\n    border-top-right-radius: 0;\n    border-bottom-right-radius: 0\n}\n\n.m-comment .comment-item .vote .oppose {\n    border-top-left-radius: 0;\n    border-bottom-left-radius: 0\n}\n\n.m-comment .comment-item .vote.disabled .agree,\n.m-comment .comment-item .vote.disabled .oppose {\n    cursor: default\n}\n\n.m-comment .comment-item .vote.disabled .agree i,\n.m-comment .comment-item .vote.disabled .oppose i {\n    color: #ccc\n}\n\n.m-comment .comment-item .vote.disabled .agree:hover i,\n.m-comment .comment-item .vote.disabled .oppose:hover i {\n    color: #ccc\n}\n\n.m-comment .comment-item .reply {\n    float: right;\n    line-height: 30px;\n    display: none\n}\n\n.m-comment .comment-item:hover .reply {\n    display: inline-block\n}\n\n.m-comment .comment-empty {\n    text-align: center;\n    display: block;\n    padding-top: 36px;\n    padding-bottom: 36px\n}\n\n.m-comment .comment-empty .text {\n    color: #666;\n    font-weight: 200\n}\n\n.m-comment .comment-empty.empty-active {\n    display: block\n}\n\n.m-comment .comment-more,\n.m-comment .comment-replace {\n    display: none;\n    text-align: center;\n    margin-bottom: 24px\n}\n\n.m-comment .comment-more .more-inner,\n.m-comment .comment-replace .more-inner {\n    display: inline-block;\n    text-align: center;\n    height: 36px;\n    line-height: 36px;\n    cursor: pointer;\n    min-width: 300px;\n    border-radius: 4px;\n    border: 1px solid #aaa\n}\n\n.m-comment .comment-more .more-inner:hover,\n.m-comment .comment-replace .more-inner:hover {\n    background-color: #f3f3f3;\n    border-color: #888\n}\n\n.m-comment .comment-more .more-inner:active,\n.m-comment .comment-replace .more-inner:active {\n    box-shadow: 0 3px 6px rgba(99, 99, 99, .1) inset\n}\n\n.m-comment .comment-more.more-active,\n.m-comment .comment-replace.more-active {\n    display: block\n}\n\n.m-comment .comment-more.replace-active,\n.m-comment .comment-replace.replace-active {\n    display: block\n}\n\n.m-comment .think-loading.loading-ripple-empty {\n    text-align: center\n}\n\n.m-comment .comment-post-disabeld {\n    display: none;\n    height: 72px;\n    border: 1px solid #ccc;\n    border-radius: 3px;\n    padding: 5px 10px;\n    text-align: center;\n    line-height: 72px\n}\n\n.m-comment.comment-disabled .comment-post {\n    display: none\n}\n\n.m-comment.comment-disabled .comment-post-disabeld {\n    display: block\n}\n\n.editor-content {\n    line-height: 1.7em;\n    font-size: 14px\n}\n\n.editor-content p {\n    margin-bottom: 14px;\n    line-height: 1.7em;\n    font-size: 1.3rem;\n    color: #5D5D5D;\n}\n\n.editor-content a {\n    color: #3eb1d0\n}\n\n.editor-content h1 {\n    font-size: 1.7rem;\n    line-height: 1.2\n}\n\n.editor-content h2 {\n    padding-bottom: 0.3em;\n    font-size: 1.6rem;\n    line-height: 2.5em;\n    border-bottom: 1px solid #eee\n}\n\n.editor-content h3 {\n    font-size: 1.65rem;\n    line-height: 2em;\n    border-bottom: 1px solid #eee\n}\n\n.editor-content h4 {\n    font-size: 1.5rem\n}\n\n.editor-content h5 {\n    font-size: 1.45em\n}\n\n.editor-content h6 {\n    font-size: 1.4em;\n    color: #777\n}\n\n.editor-content br {\n    display: block;\n    margin: .2em\n}\n\n.editor-content hr {\n    border: 0;\n    border-bottom: 1px solid #ddd\n}\n\n.editor-content ul {\n    padding-left: 28px\n}\n\n.editor-content ol {\n    padding-left: 28px\n}\n\n.editor-content h1,\n.editor-content h2,\n.editor-content h3,\n.editor-content h4,\n.editor-content h5,\n.editor-content h6,\n.editor-content p,\n.editor-content ul,\n.editor-content ol,\n.editor-content blockquote,\n.teditor-content pre,\n.editor-content table {\n    margin-bottom: 14px\n}\n\n.editor-content table {\n    border-collapse: collapse;\n    table-layout: fixed;\n    display: block;\n    width: 100%;\n    overflow: auto;\n    word-break: keep-all;\n    margin: 10px 0\n}\n\n.editor-content th {\n    text-align: left\n}\n\n.editor-content table thead tr {\n    background-color: #0088CC;\n    color: #ffffff;\n}\n\n.editor-content table tr:nth-child(2n) {\n    background-color: #f8f8f8\n}\n\n.editor-content table td,\n.editor-content table th {\n    padding: 6px 13px;\n    border: 1px solid #ddd;\n}\n\n.editor-content img {\n    max-width: 100%\n}\n\n.editor-content table pre {\n    margin-bottom: 0\n}\n\n.editor-content table p {\n    margin: 0\n}\n\n.editor-content blockquote {\n    padding: 5px 5px 5px 15px;\n    color: #777;\n    border-left: 4px solid #ddd\n}\n\n.editor-content blockquote.info {\n    border-left-color: #5bc0de;\n    color: #5bc0de;\n    background-color: #f4f8fa\n}\n\n.editor-content blockquote.warning {\n    background-color: #fcf8f2;\n    border-color: #f0ad4e;\n    color: #f0ad4e\n}\n\n.editor-content blockquote.danger {\n    color: #d9534f;\n    background-color: #fdf7f7;\n    border-color: #d9534f\n}\n\n.editor-content blockquote.success {\n    background-color: #f3f8f3;\n    border-color: #50af51;\n    color: #50af51\n}\n\n.editor-content blockquote>:last-child {\n    margin-bottom: 0\n}\n\n.editor-content .markdown-toc-list ul:only-child {\n    padding-left: 0;\n    margin-bottom: 0\n}\n\n.editor-content pre {\n    border: 0;\n    margin-bottom: 14px;\n}\n\n.editor-content code,\n.editor-content pre {\n    border-radius: 0;\n    font-family: Menlo, Monaco, Consolas, \"Courier New\", monospace;\n}\n\n.editor-content pre>code {\n    word-break: break-all;\n    white-space: inherit;\n}\n\n.editor-content blockquote {\n    border-color: inherit;\n    color: inherit;\n    background: 0\n}\n\n.hljs-line-numbers {\n    text-align: right;\n    border-right: 1px solid #ccc;\n    color: #999;\n    -webkit-touch-callout: none;\n    -webkit-user-select: none;\n    -khtml-user-select: none;\n    -moz-user-select: none;\n    -ms-user-select: none;\n    user-select: none;\n}\n\n.editor-content .markdown-toc {\n    padding: 15px 5px;\n    background-color: #FFFFFF;\n    line-height: 25px;\n    border: 1px solid #CCCCCC;\n    width: 300px;\n    float: right;\n    overflow-x: auto;\n    margin: 0 0 10px 10px;\n}\n\n.http-method .default {\n    width: 70px;\n    display: inline-block;\n    background-color: #333333;\n    -webkit-border-radius: 3px;\n    border-radius: 3px;\n    vertical-align: middle;\n    margin-bottom: 3px;\n    margin-right: 15px;\n    color: #FFF !important;\n    font-size: 11px;\n    height: 24px;\n    line-height: 24px;\n    text-transform: uppercase;\n    text-align: center;\n    -webkit-box-sizing: border-box;\n    -moz-box-sizing: border-box;\n    box-sizing: border-box;\n}\n\n.http-method .post {\n    background-color: #F47023 !important;\n}\n\n.http-method .get {\n    background-color: #27AE60 !important;\n}\n\n.http-method .put {\n    background-color: #4A90E2 !important;\n}\n\n.http-method .del {\n    background-color: red !important;\n}\n\n.http-method .trace {\n    background-color: #e09d43 !important;\n}\n\n\n\n@media screen and (max-width: 840px) {\n\n    .m-manual.manual-reader {\n        font-size: 12px;\n        min-width: initial\n    }\n\n    .m-manual.manual-reader .manual-head {\n        min-width: initial\n    }\n\n    .m-manual.manual-reader .manual-head .manual-menu {\n        display: none;\n    }\n\n    .m-manual.manual-reader .manual-body {\n        padding-left: 0\n    }\n\n    .m-manual.manual-reader .manual-left {\n        width: 80%;\n        max-width: 360px;\n        left: -80%;\n        top: 0;\n        z-index: 4000\n    }\n\n    .m-manual.manual-reader .manual-head .pull-left {\n        right: 0;\n        left: 0;\n        position: relative\n    }\n\n    .m-manual.manual-reader .manual-head .pull-left .slidebar {\n        display: inline-block;\n        /*position: absolute;*/\n        /*left: 0;*/\n        /*top: 0;*/\n        /*font-size: 20px*/\n    }\n\n    .m-manual.manual-reader .manual-head .pull-left .slidebar i {\n        display: inline-block;\n        vertical-align: top;\n        margin-top: 20px;\n        line-height: 100%\n    }\n\n    .m-manual.manual-reader .manual-head .pull-left .manual-title {\n        padding-left: 30px;\n        height: 54px;\n        line-height: 54px;\n        display: block;\n        white-space: nowrap;\n        text-overflow: ellipsis;\n        overflow: hidden\n    }\n\n    .m-manual.manual-reader .manual-navg {\n        display: block\n    }\n\n    .m-manual.manual-reader .manual-head .left .manual-navg {\n        margin-left: 36px;\n        margin-right: 36px\n    }\n\n    .m-manual.manual-reader .manual-navg .title {\n        float: none;\n        text-align: center;\n        display: block\n    }\n\n    .m-manual.manual-reader .manual-tab .tab-util {\n        display: none\n    }\n\n    .m-manual.manual-reader .article-view .head-util {\n        display: none\n    }\n\n    .m-manual.manual-reader .article-jump .jump-up,\n    .m-manual.manual-reader .article-jump .jump-down {\n        float: none;\n        display: block\n    }\n\n    .m-manual.manual-reader .m-article .think-loading.loading-ripple {\n        margin-left: -48px\n    }\n\n    .m-manual.manual-reader .manual-right {\n        left: 0\n    }\n\n    .m-manual.manual-reader.manual-auto-close .manual-head {\n        top: -55px\n    }\n\n    .m-manual.manual-reader.manual-auto-close .manual-progress {\n        top: 0\n    }\n\n    .m-manual.manual-reader.manual-auto-open .manual-head {\n        top: 0\n    }\n\n    .m-manual.manual-reader .manual-article .article-view {\n        padding: 0 12px\n    }\n\n    .m-manual.manual-reader .manual-article .article-comment {\n        padding: 0 12px\n    }\n\n    .m-manual.manual-reader .manual-article .article-head {\n        display: none\n    }\n\n    .m-manual.manual-reader .manual-article .editor-content .markdown-toc {\n        display: none;\n    }\n\n    .m-manual.manual-reader .manual-mask {\n        position: fixed;\n        top: 0;\n        left: 0;\n        right: 0;\n        bottom: 0;\n        z-index: -10;\n        background-color: #000;\n        opacity: 0\n    }\n\n    .m-manual.manual-reader.manual-mobile-show-left .manual-left {\n        left: 0;\n        z-index: 3001\n    }\n\n    .m-manual.manual-reader.manual-mobile-show-left .manual-mask {\n        opacity: .3;\n        z-index: 3000\n    }\n}"
  },
  {
    "path": "static/css/main.css",
    "content": "body {\n    position: relative;\n    font-family: Helvetica, -apple-system, \"Helvetica Neue\", Helvetica, \"Segoe UI\", Arial, freesans, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\", \"Microsoft Yahei\", \"Helvetica Neue\", Helvetica;\n}\n\na {\n    text-decoration: none;\n}\n\na:hover {\n    text-decoration: none;\n    outline: 0;\n}\n\ntextarea {\n    resize: none;\n}\n\n.text {\n    font-size: 12px;\n    color: #999999;\n    font-weight: 200;\n}\n\n.error-message {\n    color: #d9534f;\n    font-size: 12px;\n}\n\n.success-message {\n    color: #5cb85c;\n    font-size: 12px;\n}\n\n.input-readonly {\n    border: 1px solid rgba(34, 36, 38, .15);\n    background-color: #fff !important;\n    -webkit-box-shadow: none;\n    box-shadow: none;\n}\n\n::-webkit-scrollbar,\nbody .scrollbar-track-color {\n    height: 9px;\n    width: 7px;\n    background: #E6E6E6;\n}\n\n::-webkit-scrollbar:hover {\n    background: #CCCCCC;\n}\n\n::-webkit-scrollbar-thumb {\n    background: #A2A2A2;\n    -webkit-border-radius: 6px;\n    -moz-border-radius: 6px;\n    -ms-border-radius: 6px;\n    -o-border-radius: 6px;\n    border-radius: 6px;\n}\n\n.bootstrap-tagsinput {\n    display: block !important;\n}\n\n.manual-header {\n    margin-bottom: 0;\n    background-color: #fff;\n    border-bottom: 0;\n    box-shadow: rgba(0, 0, 0, .1)0 1px 5px;\n    border-top: 1px solid #009a61;\n}\n\n.manual-header .navbar-brand,\n.manual-header a {\n    font-weight: 500;\n    color: #563d7c;\n    max-width: 300px;\n    white-space: nowrap;\n    overflow: hidden;\n}\n\n.manual-header .navbar-nav li.active a {\n    background-color: #009a61;\n    color: #ffffff;\n}\n\n.manual-reader .slidebar {\n    margin: 5px 10px 0 0;\n}\n\n.user-info {\n    border: 0;\n    background-color: #ffffff;\n    padding: 5px 10px !important;\n    cursor: pointer;\n}\n\n.user-info:hover {\n    background-color: #F5F5F5;\n}\n\n.user-info-dropdown a {\n    font-size: 14px;\n    color: #333333;\n    height: 30px !important;\n    line-height: 25px !important;\n}\n\n.user-info-dropdown a>i {\n    display: inline-block;\n    margin-right: 5px;\n}\n\n.userbar-avatar {\n    display: inline-block;\n    width: 43px;\n    height: 43px;\n    margin-right: 15px;\n}\n\n.userbar-content {\n    display: inline-block;\n    vertical-align: middle;\n}\n\n.userbar-content span {\n    display: inline-block;\n    font-size: 14px;\n    font-weight: 400;\n    margin-right: 40px;\n    color: #3d444f;\n}\n\n.userbar-content div {\n    font-size: 12px;\n    line-height: 1;\n    color: #9ba3af;\n}\n\n/**************首页标签*******************/\n.tag-container-outer {\n    border-bottom: 1px solid #eee;\n    padding-top: 5px;\n    padding-bottom: 5px;\n    line-height: 30px;\n    position: relative;\n    display: block !important;\n    margin-top: 15px;\n}\n\n.tag-container-outer .title {\n    font-weight: 400;\n    font-size: 14px;\n}\n\n.tag-container-outer .tags a {\n    display: inline-block;\n    vertical-align: baseline;\n    line-height: 1;\n    border-radius: 0.3rem;\n    transition: background .1s ease;\n    cursor: pointer;\n    background-color: #e0e0e0;\n    margin: 0 .5em .5em 0 !important;\n    padding: 0.5rem 0.8rem;\n    color: #999999;\n    opacity: 0.8;\n}\n\n.tag-container-outer .tags a:hover {\n    color: #666666;\n    opacity: 1;\n}\n\n.tag-container-outer .tags a>.detail {\n    display: inline-block;\n    vertical-align: top;\n    font-weight: 400;\n    margin-left: 1em;\n    opacity: .8\n}\n\n/*********************************/\n.manual-body {\n    margin-top: 53px;\n}\n\n.manual-body .page-left {\n    position: fixed;\n    overflow: auto;\n    top: 50px;\n    bottom: 0;\n    z-index: 100;\n    width: 199px;\n    background-color: #f5f5f5;\n    border-right: 1px solid #eaeaea\n}\n\n.manual-body .page-left .menu {\n    padding: 18px 0\n}\n\n.manual-body .page-left .menu li {\n    height: 36px;\n    line-height: 0\n}\n\n.manual-body .page-left .menu .item {\n    display: block;\n    padding: 8px 24px;\n    color: #666;\n    white-space: nowrap;\n    overflow: hidden;\n    text-overflow: ellipsis;\n    white-space: nowrap;\n    line-height: 20px;\n    text-decoration: none;\n}\n\n.manual-body .page-left .menu .item:hover {\n    background-color: #eee;\n    text-decoration: none;\n}\n\n.manual-body .page-left .menu a:visited {\n    text-decoration: none;\n}\n\n.manual-body .page-left .menu li.active .item {\n    background-color: #DDB;\n}\n\n.manual-body .page-right {\n    padding: 15px 0 15px 24px;\n    margin-left: 200px;\n    min-width: 400px;\n}\n\n.manual-body .page-right .box-head {\n    border-bottom: 1px solid #DDDDD9;\n}\n\n.m-box .box-head .box-title {\n    display: inline-block;\n    height: 36px;\n    line-height: 36px;\n    padding-bottom: 3px;\n    border-bottom: 2px solid #44B035;\n    margin-bottom: -1px;\n    min-width: 80px;\n    font-weight: 200;\n    font-size: 18px;\n}\n\n.manual-body .page-right .box-body {\n    padding: 12px 0;\n    position: relative;\n}\n\n.manual-body .page-right .box-body label,\n.text-label {\n    font-family: \"Microsoft Yahei\", \"Helvetica Neue\", Helvetica, Arial, sans-serif;\n    color: #222222;\n    font-weight: 300;\n}\n\n.required>.text-label:after {\n    color: #db2828;\n    content: \"*\";\n    vertical-align: middle;\n    margin: -.2em 0 0 .2em;\n}\n\n.manual-body .page-right .box-body .form-right {\n    position: absolute;\n    right: 0;\n    top: 34px\n}\n\n/*************网站首页******************/\n.manual-list {\n    margin: 15px auto;\n}\n\n.manual-list .list-item {\n    float: left;\n    padding-left: 15px;\n    padding-right: 15px;\n    margin: 18px 0;\n    height: 280px;\n    border: 1px solid #ffffff;\n}\n\n.manual-list .list-item .manual-item-standard {\n    float: left;\n    width: 163px;\n    line-height: 1.5em;\n    position: relative;\n}\n\n.manual-list .list-item .manual-item-standard>dt {\n    margin-bottom: 6px;\n    height: 231px;\n    position: relative;\n}\n\n.manual-list .list-item .manual-item-standard>dt>a {\n    display: block;\n    position: relative;\n    width: 100%;\n}\n\n.manual-list .list-item .manual-item-standard>dt>a .image {\n    position: relative;\n    /*display: none;*/\n}\n\n.manual-list .list-item .manual-item-standard .cover {\n    border: none;\n    width: 170px;\n    position: relative;\n    display: inline-block;\n    height: 230px;\n    background-color: #eee;\n    border-radius: 2px;\n    box-shadow: 0 1px 3px 0 #d4d4d5, 0 0 0 1px #d4d4d5;\n}\n\n.manual-list .list-item .manual-item-standard .b-cover:hover {\n    border-color: #4db559;\n    box-shadow: 0 0 4px rgba(77, 181, 89, .7)\n}\n\n.manual-list .list-item .manual-item-standard a.name {\n    vertical-align: top;\n    word-wrap: normal;\n    font-size: 16px;\n    color: #666;\n    display: inline-block;\n    max-width: 100%;\n    white-space: nowrap;\n    text-overflow: ellipsis;\n    overflow: hidden\n}\n\n.manual-list .list-item .manual-item-standard a.name:hover {\n    color: #333333;\n}\n\n.manual-list .list-item .manual-item-standard .author {\n    zoom: 1;\n    vertical-align: top;\n    display: inline-block;\n    height: 20px;\n    line-height: 20px;\n    color: #484848;\n    font-size: 13px;\n}\n\n.manual-list .list-item .manual-item-standard .author>.text {\n    font-weight: 200;\n    color: #484848;\n}\n\n\n/*************文档列表******************/\n.book-list .list-item {\n    display: block;\n    width: 100%;\n    margin: 0;\n    border-bottom: 1px solid #dddddd;\n    padding: 15px 10px;\n}\n\n.book-list .list-item:hover {\n    background: #eaeaea;\n}\n\n.book-list .list-item a {\n    color: #666666;\n    font-size: 16px;\n    text-decoration: none;\n}\n\n.book-list .list-item .pull-right a {\n    font-size: 12px;\n}\n\n.book-list .list-item a:hover {\n    text-decoration: none;\n    color: #428bca;\n}\n\n.book-list .list-item .desc-text {\n    font-size: 12px;\n    margin: 5px;\n    word-wrap: break-word;\n    word-break: break-word;\n}\n\n.book-list .list-item .info {\n    font-size: 12px;\n    color: #666666;\n}\n\n.book-list .list-item .info span {\n    display: inline-block;\n    padding-right: 10px;\n}\n\n/************文档概述*****************/\n.dashboard {}\n\n.dashboard .list {\n    zoom: 1;\n    line-height: 35px;\n}\n\n.dashboard .summary {\n    margin-top: 15px;\n    word-break: break-all;\n}\n\n/************文档成员*************************/\n.users-list .list-item {\n    padding: 12px;\n    border-bottom: 1px dotted #EEE;\n}\n\n.users-list .list-item:hover {\n    background-color: #F9F9F9\n}\n\n.users-list .list-item .operate {\n    float: right;\n}\n\n/**************用户搜索界面样式********************/\n.searchbar {\n    padding: 8px;\n}\n\n.searchbar .search-btn {\n    display: inline-block;\n    line-height: 100%;\n    cursor: pointer;\n    margin-top: -10px;\n    margin-left: -44px;\n    border: 0;\n    background-color: transparent\n}\n\n.searchbar .search-btn>i.fa {\n    padding: 10px;\n}\n\n.manual-search-reader .manual-body {\n    margin-top: 60px;\n}\n\n.manual-search-reader .search-head {\n    margin: 10px auto;\n    padding-bottom: 15px;\n    line-height: 1.5em;\n    border-bottom: 3px solid #EEEEEE;\n}\n\n.manual-search-reader .search-head .search-title {\n    font-size: 22px;\n    font-weight: 300;\n}\n\n.manual-search-reader .search-body {\n    margin-top: 80px;\n}\n\n.manual-search-reader .search-empty {\n    margin: 150px auto;\n    text-align: center;\n}\n\n.manual-search-reader .search-empty .empty-text {\n    font-size: 18px;\n    display: block;\n    margin: 24px;\n    text-align: center;\n    opacity: .5;\n    filter: alpha(opacity=50)\n}\n\n.manual-search-reader .search-empty .empty-image {\n    margin: 5px auto;\n    display: block;\n    text-align: center;\n    opacity: 0.3;\n    filter: alpha(opacity=30);\n}\n\n.manual-search-reader .search-item {\n    margin: 0 15px;\n    padding: 10px 20px;\n    line-height: 25px;\n    word-break: break-word;\n}\n\n.manual-search-reader .search-item:hover {\n    background-color: #F5F5F5;\n}\n\n.manual-search-reader .search-item a {\n    color: #0886E9;\n}\n\n.manual-search-reader .search-item em {\n    color: #FF802C;\n    font-style: normal;\n}\n\n.manual-search-reader .search-item .title {\n    font-size: 16px;\n    font-weight: 400;\n}\n\n.manual-search-reader .search-item .title .label {\n    color: #fff;\n    padding-top: .3em;\n}\n\n.manual-search-reader .search-item .title .mark-book {\n    background-color: #009a61;\n}\n\n.manual-search-reader .search-item .title .mark-blog {\n    background-color: #0084FF;\n}\n\n.manual-search-reader .search-item .title .mark-doc {\n    background-color: #337ab7;\n}\n\n.manual-search-reader .search-item .description {\n    color: #666;\n    line-height: 25px;\n    min-height: 20px;\n    font-size: 12px;\n}\n\n.manual-search-reader .search-item .site {\n    overflow: hidden;\n    text-overflow: ellipsis;\n    -o-text-overflow: ellipsis;\n    white-space: nowrap;\n    max-width: 600px;\n    color: #008000;\n    font-size: 12px;\n}\n\n.manual-search-reader .search-item .source .item {\n    display: inline-block;\n    margin-right: 15px;\n}\n\n.manual-search-reader .search-item .source,\n.manual-search-reader .search-item .source a {\n    font-size: 12px;\n    color: #999999;\n}\n\n/**************用户登录界面样式*******************/\n.login .login-body {\n    width: 400px;\n    padding: 5px 30px 25px 30px;\n    margin: 0 auto;\n    margin-top: 30px;\n    background-color: #FFF;\n    border: 1px solid #ddd;\n    border-radius: 5px;\n}\n\n.login .login-body .tooltip.bottom .tooltip-arrow,\n.has-error .tooltip.bottom .tooltip-arrow {\n    border-bottom-color: #a94442;\n}\n\n.login .login-body .tooltip.top .tooltip-arrow,\n.has-error .tooltip.top .tooltip-arrow {\n    border-top-color: #a94442;\n}\n\n.login .login-body .tooltip.right .tooltip-arrow,\n.has-error .tooltip.right .tooltip-arrow {\n    border-top-color: #a94442;\n}\n\n.login .login-body .tooltip.left .tooltip-arrow,\n.has-error .tooltip.left .tooltip-arrow {\n    border-top-color: #a94442;\n}\n\n.login .login-body .tooltip-inner,\n.has-error .tooltip-inner {\n    background-color: #a94442;\n}\n\n/************图片上传样式*******************/\n\n#upload-logo-panel .wraper {\n    float: left;\n    background: #f6f6f6;\n    position: relative;\n    width: 360px;\n    height: 360px;\n    overflow: hidden;\n}\n\n#upload-logo-panel .watch-crop-list {\n    width: 170px;\n    padding: 10px 20px;\n    margin-left: 10px;\n    background-color: #f6f6f6;\n    text-align: center;\n    float: right;\n    height: 360px;\n}\n\n#image-wraper {\n    text-align: center;\n}\n\n.webuploader-pick {}\n\n.webuploader-pick-hover {}\n\n.webuploader-container {\n    padding: 0;\n    border: 0;\n    height: 40px;\n}\n\n.watch-crop-list>ul {\n    list-style: none;\n    padding: 0;\n    margin: 0;\n}\n\n.webuploader-container div {\n    width: 77px !important;\n    height: 40px !important;\n    left: 0 !important;\n}\n\n.img-preview {\n    margin: 5px auto 10px auto;\n    text-align: center;\n    overflow: hidden;\n}\n\n.img-preview>img {\n    max-width: 100%;\n}\n\n.preview-lg {\n    width: 120px;\n    height: 120px;\n}\n\n.preview-sm {\n    width: 60px;\n    height: 60px;\n}\n\n#error-message {\n    font-size: 13px;\n    color: red;\n    vertical-align: middle;\n    margin-top: -10px;\n    display: inline-block;\n    height: 40px;\n}\n\n.manager .dashboard-item {\n    float: left;\n    width: 100px;\n    height: 115px;\n    padding: 10px;\n    font-size: 10px;\n    line-height: 1.4;\n    text-align: center;\n    background-color: #f9f9f9;\n    border: 1px solid #fff;\n    cursor: pointer;\n    color: #333;\n}\n\n.manager .dashboard-item:hover {\n    background-color: #563D7C;\n    color: #ffffff;\n}\n\n.manager .dashboard-item .fa {\n    margin-top: 5px;\n    margin-bottom: 10px;\n    font-size: 24px;\n}\n\n.manager .dashboard-item .fa-class {\n    display: block;\n    text-align: center;\n    word-wrap: break-word;\n    /* Help out IE10+ with class names */\n}\n\n.pagination-container {\n    margin: 5px auto;\n    display: block !important;\n}\n\n.pagination-container .pagination {\n    box-shadow: 0 1px 2px 0 #e3e3e0;\n}\n\n.pagination-container .pagination>li>a,\n.pagination-container .pagination>li>span {\n    padding: 8px 16px !important;\n}\n\n.pagination-container .pagination>li>a,\n.pagination-container .pagination>li>span {\n    color: #272727;\n}\n\n.pagination-container .pagination>.active>a {\n    /*color: #fff;*/\n    background-color: #f3f3f3;\n    border: 1px solid #e3e3e0;\n}\n\n.pagination-container .pagination>.active>a,\n.pagination>.active>a:focus,\n.pagination>.active>a:hover,\n.pagination>.active>span,\n.pagination>.active>span:focus,\n.pagination>.active>span:hover {\n    color: #272727;\n}\n\n/*************文章相关样式**********/\n.ui.items>.item>.content>.header {\n    display: inline-block;\n    margin: -.21425em 0 0;\n    font-family: 'PingFang SC', 'Helvetica Neue', 'Microsoft YaHei UI', 'Microsoft YaHei', 'Noto Sans CJK SC', Sathu, EucrosiaUPC, Arial, Helvetica, sans-serif;\n    font-weight: 700;\n    color: rgba(0, 0, 0, .85)\n}\n\n.ui.items>.item {\n    display: -webkit-box;\n    display: -ms-flexbox;\n    display: flex;\n    margin: 1em 0;\n    width: 100%;\n    min-height: 0;\n    background: 0 0;\n    padding: 0;\n    border: none;\n    border-radius: 0;\n    -webkit-box-shadow: none;\n    box-shadow: none;\n    -webkit-transition: -webkit-box-shadow .1s ease;\n    transition: -webkit-box-shadow .1s ease;\n    transition: box-shadow .1s ease;\n    transition: box-shadow .1s ease, -webkit-box-shadow .1s ease;\n    z-index: ''\n}\n\n.ui.items>.item a {\n    cursor: pointer\n}\n\n.ui.items {\n    margin: 1.5em 0\n}\n\n.ui.items:first-child {\n    margin-top: 0 !important\n}\n\n.ui.items:last-child {\n    margin-bottom: 0 !important\n}\n\n.ui.items>.item:after {\n    display: block;\n    content: ' ';\n    height: 0;\n    clear: both;\n    overflow: hidden;\n    visibility: hidden\n}\n\n.ui.items>.item:first-child {\n    margin-top: 0\n}\n\n.ui.items>.item:last-child {\n    margin-bottom: 0\n}\n\n.ui.items>.item>.image {\n    position: relative;\n    -webkit-box-flex: 0;\n    -ms-flex: 0 0 auto;\n    flex: 0 0 auto;\n    display: block;\n    float: none;\n    margin: 0;\n    padding: 0;\n    max-height: '';\n    -ms-flex-item-align: top;\n    align-self: top\n}\n\n.ui.items>.item>.image>img {\n    display: block;\n    width: 100%;\n    height: auto;\n    border-radius: .125rem;\n    border: none\n}\n\n.ui.items>.item>.image:only-child>img {\n    border-radius: 0\n}\n\n.ui.items>.item>.content {\n    display: block;\n    -webkit-box-flex: 1;\n    -ms-flex: 1 1 auto;\n    flex: 1 1 auto;\n    background: 0 0;\n    margin: 0;\n    padding: 0;\n    -webkit-box-shadow: none;\n    box-shadow: none;\n    font-size: 1em;\n    border: none;\n    border-radius: 0\n}\n\n.ui.items>.item>.content:after {\n    display: block;\n    content: ' ';\n    height: 0;\n    clear: both;\n    overflow: hidden;\n    visibility: hidden\n}\n\n.ui.items>.item>.image+.content {\n    min-width: 0;\n    width: auto;\n    display: block;\n    margin-left: 0;\n    -ms-flex-item-align: top;\n    align-self: top;\n    padding-left: 1.5em\n}\n\n.ui.items>.item>.content>.header {\n    display: inline-block;\n    margin: -.21425em 0 0;\n    font-family: 'PingFang SC', 'Helvetica Neue', 'Microsoft YaHei UI', 'Microsoft YaHei', 'Noto Sans CJK SC', Sathu, EucrosiaUPC, Arial, Helvetica, sans-serif;\n    font-weight: 700;\n    color: rgba(0, 0, 0, .85)\n}\n\n.ui.items>.item>.content>.header:not(.ui) {\n    font-size: 1.14285714em\n}\n\n.ui.items>.item [class*=\"left floated\"] {\n    float: left\n}\n\n.ui.items>.item [class*=\"right floated\"] {\n    float: right\n}\n\n.ui.items>.item .content img {\n    -ms-flex-item-align: middle;\n    align-self: middle;\n    width: ''\n}\n\n.ui.items>.item .avatar img,\n.ui.items>.item img.avatar {\n    width: '';\n    height: '';\n    border-radius: 500rem\n}\n\n.ui.items>.item>.content>.description {\n    margin-top: .6em;\n    font-size: 1em;\n    line-height: 1.4285em;\n    color: rgba(0, 0, 0, .87);\n    min-height: 40px;\n    word-wrap: break-word;\n    word-break: break-word;\n}\n\n.ui.items>.item>.content p {\n    margin: 0 0 .5em\n}\n\n.ui.items>.item>.content p:last-child {\n    margin-bottom: 0\n}\n\n.ui.items>.item .meta {\n    margin: .5em 0 .5em;\n    font-size: 1em;\n    line-height: 1em;\n    color: rgba(0, 0, 0, .6)\n}\n\n.ui.items>.item .meta * {\n    margin-right: .3em\n}\n\n.ui.items>.item .meta :last-child {\n    margin-right: 0\n}\n\n.ui.items>.item .meta [class*=\"right floated\"] {\n    margin-right: 0;\n    margin-left: .3em\n}\n\n.ui.items>.item>.content a:not(.ui) {\n    color: '';\n    -webkit-transition: color .1s ease;\n    transition: color .1s ease\n}\n\n.ui.items>.item>.content a:not(.ui):hover {\n    color: ''\n}\n\n.ui.items>.item>.content>a.header {\n    color: rgba(0, 0, 0, .85)\n}\n\n.ui.items>.item>.content>a.header:hover {\n    color: #1e70bf\n}\n\n.ui.items>.item .meta>a:not(.ui) {\n    color: rgba(0, 0, 0, .4)\n}\n\n.ui.items>.item .meta>a:not(.ui):hover {\n    color: rgba(0, 0, 0, .87)\n}\n\n.ui.items>.item>.content .favorite.icon {\n    cursor: pointer;\n    opacity: .75;\n    -webkit-transition: color .1s ease;\n    transition: color .1s ease\n}\n\n.ui.items>.item>.content .favorite.icon:hover {\n    opacity: 1;\n    color: #ffb70a\n}\n\n.ui.items>.item>.content .active.favorite.icon {\n    color: #ffe623\n}\n\n.ui.items>.item>.content .like.icon {\n    cursor: pointer;\n    opacity: .75;\n    -webkit-transition: color .1s ease;\n    transition: color .1s ease\n}\n\n.ui.items>.item>.content .like.icon:hover {\n    opacity: 1;\n    color: #ff2733\n}\n\n.ui.items>.item>.content .active.like.icon {\n    color: #ff2733\n}\n\n.ui.items>.item .extra {\n    display: block;\n    position: relative;\n    background: 0 0;\n    margin: .5rem 0 0;\n    width: 100%;\n    padding: 0 0 0;\n    top: 0;\n    left: 0;\n    color: rgba(0, 0, 0, .4);\n    -webkit-box-shadow: none;\n    box-shadow: none;\n    -webkit-transition: color .1s ease;\n    transition: color .1s ease;\n    border-top: none\n}\n\n.ui.items>.item .extra>* {\n    margin: .25rem .5rem .25rem 0\n}\n\n.ui.items>.item .extra>[class*=\"right floated\"] {\n    margin: .25rem 0 .25rem .5rem\n}\n\n.ui.items>.item .extra:after {\n    display: block;\n    content: ' ';\n    height: 0;\n    clear: both;\n    overflow: hidden;\n    visibility: hidden\n}\n\n.ui.items>.item>.image:not(.ui) {\n    width: 175px\n}\n\n.ui.horizontal.list {\n    display: inline-block;\n    font-size: 0\n}\n\n.ui.horizontal.list>.item {\n    display: inline-block;\n    margin-left: 1em;\n    font-size: 1rem\n}\n\n.ui.horizontal.list:not(.celled)>.item:first-child {\n    margin-left: 0 !important;\n    padding-left: 0 !important\n}\n\n.ui.horizontal.list .list {\n    padding-left: 0;\n    padding-bottom: 0\n}\n\n.ui.horizontal.list a {\n    color: rgba(0, 0, 0, .4);\n}\n\n.ui.horizontal.list a:hover {\n    color: rgba(0, 0, 0, .87)\n}\n\n.ui.horizontal.list .list>.item>.content,\n.ui.horizontal.list .list>.item>.icon,\n.ui.horizontal.list .list>.item>.image,\n.ui.horizontal.list>.item>.content,\n.ui.horizontal.list>.item>.icon,\n.ui.horizontal.list>.item>.image {\n    vertical-align: middle\n}\n\n.ui.horizontal.list>.item:first-child,\n.ui.horizontal.list>.item:last-child {\n    padding-top: .21428571em;\n    padding-bottom: .21428571em\n}\n\n.ui.horizontal.list>.item>i.icon {\n    margin: 0;\n    padding: 0 .25em 0 0\n}\n\n.ui.horizontal.list>.item>.icon,\n.ui.horizontal.list>.item>.icon+.content {\n    float: none;\n    display: inline-block\n}\n\n.ui.teal.label {\n    background-color: #00b5ad !important;\n    border-color: #00b5ad !important;\n    color: #fff !important\n}\n\n.ui.items>.item {\n    border-bottom: 1px solid #efefef;\n    margin: 0;\n    padding: 1em 0\n}\n\n/**************项目空间样式******************/\n.ui-card {\n    display: inline-block;\n    width: 22%;\n    margin: 10px 15px;\n    border: solid 1px #d4d4d5;\n    border-radius: 4px;\n    padding: 15px 25px;\n    text-align: center;\n    color: #333333;\n}\n\n.ui-card:hover {\n    -webkit-box-shadow: 0 1px 3px 0 #d4d4d5, 0 0 0 1px #d4d4d5;\n    box-shadow: 0 1px 3px 0 #d4d4d5, 0 0 0 1px #d4d4d5;\n    -webkit-transition: -webkit-box-shadow .1s ease, -webkit-transform .1s ease;\n    transition: -webkit-box-shadow .1s ease, -webkit-transform .1s ease;\n    transition: box-shadow .1s ease, transform .1s ease;\n    transition: box-shadow .1s ease, transform .1s ease, -webkit-box-shadow .1s ease, -webkit-transform .1s ease;\n}\n\n.ui-card>.header {\n    font-weight: 500;\n    font-size: 18px;\n}\n\n.ui-card>.description {\n    font-size: 12px;\n    color: #666;\n    text-align: left;\n}\n\n/**************网站底部样式*************************/\n.footer {\n    color: #777;\n    padding: 30px 0;\n    margin-top: 70px;\n    font-size: 12px;\n    background-color: #ffffff;\n    bottom: 0;\n}\n\n.footer .container {\n    padding: 0;\n}\n\n.footer .container .row {\n    margin-left: 220px;\n    padding-top: 20px;\n    opacity: 0.8;\n    font-size: 13px;\n}\n\n.footer .container .border-top {\n    border-top: 2px solid #DDDDD9;\n}\n\n.manual-container .footer .container .row {\n    margin-left: 0;\n}\n\n.footer a {\n    color: #222;\n    text-decoration: none;\n}\n\n.footer a:hover {\n    color: #2b85ae\n}\n\n@media screen and (max-width: 840px) {\n    .manual-body .page-left {\n        display: none;\n    }\n\n    .manual-body .page-right {\n        margin-left: 0;\n    }\n\n    .manual-body .page-right .box-body .form-right {\n        display: none;\n    }\n\n    .manual-body .page-right .box-body {\n        padding-right: 0 !important;\n    }\n\n    .footer .container .row {\n        margin-left: 0;\n    }\n}\n\n.navbar-mobile {\n    display: inline-block;\n    padding: 10px 0;\n    font-size: 14px;\n    line-height: 30px;\n    color: #563d7c;\n}\n\n.navbar-mobile a {\n    padding-right: 5px;\n}\n\n@media (min-width: 768px) {\n    .navbar-mobile {\n        display: none !important;\n    }\n}"
  },
  {
    "path": "static/css/markdown.css",
    "content": "body {\n    position: absolute;\n    top: 0;\n    left: 0;\n    right: 0;\n    bottom: 0;\n}\n\n::-webkit-scrollbar,\nbody .scrollbar-track-color {\n    height: 9px;\n    width: 7px;\n    background: #E6E6E6;\n}\n\n::-webkit-scrollbar:hover {\n    background: #CCCCCC;\n}\n\n::-webkit-scrollbar-thumb {\n    background: #A2A2A2;\n    -webkit-border-radius: 6px;\n    -moz-border-radius: 6px;\n    -ms-border-radius: 6px;\n    -o-border-radius: 6px;\n    border-radius: 6px;\n}\n\n.error-message {\n    color: red;\n}\n\n.manual-head {\n    padding: 5px 5px 5px 5px;\n    position: fixed;\n    width: 100%;\n}\n\n.manual-category {\n    width: 280px;\n    position: fixed;\n    border-top: 1px solid #DDDDDD;\n    bottom: 0;\n    top: 40px;\n    background-color: #FAFAFA;\n    left: 0;\n    right: 0;\n    padding-bottom: 15px;\n    overflow-y: auto;\n    z-index: 999;\n}\n\n.manual-category .manual-nav {\n    font-size: 14px;\n    color: #333333;\n    font-weight: 200;\n    zoom: 1;\n    border-bottom: 1px solid #ddd\n}\n\n.manual-category .manual-tree {\n    margin-top: 10px;\n    width: 280px;\n    position: absolute;\n    top: 30px;\n    right: 0;\n    left: 0;\n    bottom: 0;\n    overflow-y: auto;\n}\n\n.manual-category .manual-nav .nav-item {\n    font-size: 14px;\n    padding: 0 9px;\n    cursor: pointer;\n    float: left;\n    height: 30px;\n    line-height: 30px;\n    color: #666;\n}\n\n.manual-category .manual-nav .nav-plus {\n    color: #999;\n    cursor: pointer;\n    height: 24px;\n    width: 24px;\n    line-height: 24px;\n    display: inline-block;\n    margin-top: 4px\n}\n\n.manual-category .manual-nav .nav-plus:hover {\n    color: #333333;\n}\n\n.manual-category .manual-nav .nav-item.active {\n    border-bottom: 1px solid #fafafa;\n    margin-bottom: -1px;\n    border-left: 1px solid #ddd;\n    border-right: 1px solid #ddd;\n    padding-left: 8px;\n    padding-right: 8px;\n}\n\n.manual-editor-container {\n    position: absolute;\n    left: 280px;\n    top: 40px;\n    right: 0;\n    bottom: 0;\n    overflow: hidden;\n    border-top: 1px solid #DDDDDD;\n    z-index: 999;\n}\n\n.manual-editor-container .manual-editormd {\n    position: absolute;\n    bottom: 30px;\n    top: -1px;\n    left: 0;\n    right: 0;\n}\n\n.manual-editor-container .manual-editormd .manual-editormd-active,\n.manual-wangEditor,\n.manual-wangEditor .wangEditor-container,\n.manual-wangEditor .wangEditor-container .wangEditor-txt {\n    position: absolute;\n    top: 0;\n    left: 0;\n    right: 0;\n    bottom: 0;\n}\n\n.manual-wangEditor,\n.manual-wangEditor .wangEditor-container {\n    bottom: 15px;\n    border-top: 0;\n    overflow: hidden;\n}\n\n.manual-wangEditor .wangEditor-container .wangEditor-txt {\n    top: 32px;\n}\n\n.manual-wangEditor .wangEditor-container .wangEditor-menu-container {\n    position: fixed;\n    z-index: 10000;\n}\n\n.manual-wangEditor .wangEditor-container .code-textarea {\n    position: absolute;\n    top: 32px;\n    bottom: 0;\n    left: 0;\n    right: 0;\n}\n\n.btn-toolbar {\n    position: absolute;\n}\n\n.editormd-group {\n    float: left;\n    height: 32px;\n    margin-right: 10px;\n}\n\n.editormd-group a,\n.editormd-group .editor-item {\n    float: left;\n}\n\n.editormd-group .change i {\n    color: #ffffff;\n    background-color: #44B036 !important;\n    border: 1px #44B036 solid !important;\n}\n\n.editormd-group .change i:hover {\n    background-color: #58CB48 !important;\n}\n\n.editormd-group .disabled i:hover {\n    background: #ffffff !important;\n}\n\n.editormd-group a.disabled {\n    border-color: #c9c9c9;\n    opacity: .6;\n    cursor: default\n}\n\n.editormd-group a>i {\n    display: inline-block;\n    width: 34px !important;\n    height: 30px !important;\n    line-height: 30px;\n    text-align: center;\n    color: #4b4b4b;\n    border: 1px solid #ccc;\n    background: #fff;\n    border-radius: 4px;\n    font-size: 15px\n}\n\n.editormd-group a>i.item {\n    border-radius: 0;\n    border-right: 0;\n}\n\n.editormd-group a>i.last {\n    border-bottom-left-radius: 0;\n    border-top-left-radius: 0;\n}\n\n.editormd-group a>i.first {\n    border-right: 0;\n    border-bottom-right-radius: 0;\n    border-top-right-radius: 0;\n}\n\n.editormd-group a i:hover {\n    background-color: #e4e4e4\n}\n\n.editormd-group a i:after {\n    display: block;\n    overflow: hidden;\n    line-height: 30px;\n    text-align: center;\n    font-family: icomoon, Helvetica, Arial, sans-serif;\n    font-style: normal;\n}\n\n.manual-editor-status {\n    position: absolute;\n    left: 0;\n    right: 0;\n    bottom: 0;\n    height: 30px;\n    overflow: hidden;\n    border-left: 1px solid #DDDDDD;\n    color: #555;\n    background-color: #FAFAFA;\n    z-index: 1000;\n    line-height: 30px;\n}\n\n.manual-editor-status .item {\n    display: inline-block;\n    margin-right: 10px;\n    margin-left: 10px;\n    cursor: pointer;\n}\n\n/***************附件管理的样式*******************/\n.attach-drop-panel {\n    display: block;\n    position: relative;\n    width: 100%;\n    height: 100%;\n}\n\n.attach-drop-panel .webuploader-element-invisible {\n    width: 500px;\n    height: 100px;\n    position: absolute;\n    top: 0;\n\n}\n\n.attach-drop-panel .webuploader-pick {\n    color: #ccc;\n    text-align: center;\n    margin: 20px 20px 15px !important;\n    padding: 5px !important;\n    font-size: 65px;\n    cursor: pointer;\n    border: 2px dotted #999;\n    display: block !important;\n    background: #ffffff;\n}\n\n.attach-drop-panel .webuploader-pick:hover {\n    color: #333;\n    border-color: #333;\n}\n\n.attach-list {\n\n    background: #ffffff;\n    font-size: 12px;\n}\n\n.attach-list .attach-item {\n    padding: 8px 10px;\n    line-height: 36px;\n    border: 1px solid #ddd;\n    border-bottom: none;\n    border-top-left-radius: 3px;\n    border-top-right-radius: 3px;\n}\n\n.attach-list .attach-item:last-child {\n    border-bottom: 1px solid #ddd;\n    border-bottom-left-radius: 3px;\n    border-bottom-right-radius: 3px;\n}\n\n.attach-list .attach-item .progress {\n    margin-top: 10px;\n    margin-bottom: 10px;\n    height: 10px;\n}\n\n.attach-list .attach-item .form-control {\n    width: 60%;\n    float: left;\n}\n\n.attach-list .attach-item .text {\n    display: inline-block;\n    padding: 0 15px;\n}\n\n.attach-list .attach-item .close {\n    float: right;\n    display: inline-block;\n    padding: 8px 0;\n    color: #586069;\n    background: #ffffff;\n    font-size: 16px;\n}\n\n.attach-list .attach-item .close:hover {\n    color: #333;\n}\n\n/***********选择模板时的样式**************/\n.template-list .container {\n    margin-top: 60px;\n    margin-bottom: 40px;\n    padding: 0 15px;\n    box-sizing: border-box;\n}\n\n.template-list .container .section {\n    position: relative;\n    margin: 0 15px;\n    padding-top: 60px;\n    float: left;\n    width: 150px;\n    height: 236px;\n    background: #fdfefe;\n    border: 1px solid #ddddd9;\n    text-align: center\n}\n\n.template-list .container .section>h3 a {\n    font-size: 20px;\n    font-weight: 200;\n    text-decoration: none;\n    color: #5d606b\n}\n\n.template-list .container .section>a {\n    display: inline-block;\n    position: absolute;\n    left: 50%;\n    top: -28px;\n    width: 56px;\n    height: 56px;\n    margin-left: -28px\n}\n\n.template-list .container .section>a .fa {\n    display: inline-block;\n    width: 56px;\n    height: 56px;\n    background-color: #fbfefe;\n    border: 1px solid #ddddd9;\n    border-radius: 50%;\n    line-height: 54px;\n    font-size: 24px;\n    color: #ddddd9\n}\n\n.template-list .container .section:hover {\n    border-color: #44b035\n}\n\n.template-list .container .section:hover>a {\n    background-color: #44b035;\n    padding: 5px;\n    border-radius: 50%;\n    width: 66px;\n    height: 66px;\n    margin-left: -33px;\n    top: -33px\n}\n\n.template-list .container .section:hover>a .fa {\n    background-color: #78c56d;\n    color: #fff;\n    border: 0;\n    line-height: 54px\n}\n\n.template-list .container .section ul {\n    margin-top: 35px;\n    padding-left: 0;\n    list-style: none\n}\n\n.template-list .container .section ul li {\n    margin-bottom: 10px;\n    padding: 0 10px;\n    line-height: 1.2;\n    color: #8e8d8d\n}\n\n\n.markdown-category {\n    width: 280px;\n    position: fixed;\n    border-top: 1px solid #DDDDDD;\n    top: 0;\n    bottom: 0;\n    background-color: #FAFAFA;\n    left: 0;\n    right: 0;\n    padding-bottom: 15px;\n    overflow-y: auto;\n    z-index: 999;\n}\n\n.markdown-category .markdown-nav {\n    font-size: 14px;\n    color: #333333;\n    font-weight: 200;\n    zoom: 1;\n    border-bottom: 1px solid #ddd\n}\n\n.markdown-category .markdown-tree {\n    margin-top: 0;\n    width: 280px;\n    position: absolute;\n    top: 35px;\n    right: 0;\n    left: 0;\n    bottom: 0;\n    overflow-y: auto;\n}\n\n.markdown-category .editor-status.markdown-tree {\n    bottom: 30px !important;\n}\n\n.markdown-category .markdown-nav .nav-item {\n    font-size: 14px;\n    padding: 0 9px;\n    cursor: pointer;\n    float: left;\n    height: 35px;\n    line-height: 30px;\n    color: #666;\n}\n\n.markdown-category .markdown-nav .nav-plus {\n    color: #999;\n    cursor: pointer;\n    height: 24px;\n    width: 24px;\n    line-height: 24px;\n    display: inline-block;\n    margin-top: 4px\n}\n\n.markdown-category .markdown-nav .nav-plus:hover {\n    color: #333333;\n}\n\n.markdown-category .markdown-nav .nav-item.active {\n    border-bottom: 1px solid #fafafa;\n    margin-bottom: -1px;\n    border-left: 1px solid #ddd;\n    border-right: 1px solid #ddd;\n    padding-left: 8px;\n    padding-right: 8px;\n}\n\n.markdown-editor-container {\n    position: absolute;\n    left: 280px;\n    right: 0;\n    bottom: 0;\n    overflow: hidden;\n    border-top: 1px solid #DDDDDD;\n    z-index: 999;\n}\n\n.markdown-editor-container .markdown-editormd {\n    position: absolute;\n    bottom: 30px;\n    top: -1px;\n    left: 0;\n    right: 0;\n}\n\n.markdown-editor-status {\n    position: absolute;\n    left: 0;\n    right: 0;\n    bottom: 0;\n    height: 30px;\n    overflow: hidden;\n    border-left: 1px solid #DDDDDD;\n    color: #555;\n    background-color: #FAFAFA;\n    z-index: 1000;\n    line-height: 30px;\n}\n\n.markdown-editor-status .item {\n    display: inline-block;\n    margin-right: 10px;\n    margin-left: 10px;\n    cursor: pointer;\n}\n\niframe.cherry-dialog-iframe {\n    width: 100%;\n    height: 100%;\n}\n\n.manual-article.cherry {\n    height: auto !important;\n}\n\n.manual-article.cherry .cherry-highlight-line {\n    background-color: transparent !important;\n}\n\n.manual-article.cherry-markdown .toc {\n    position: fixed;\n    right: 50px;\n    width: 260px;\n    font-size: 12px;\n    overflow: auto;\n    border: 1px solid #e8e8e8;\n    padding: 10px;\n    border-radius: 6px;\n}\n\n/*@media screen and (min-width: 840px) {*/\n/*    .markdown-article {*/\n/*        margin-right: 200px !important;*/\n/*    }*/\n/*}*/\n\n.markdown-article-head {\n    width: unset !important;\n    padding: unset !important;\n    padding-top: 10px !important;\n}\n\n.markdown-title {\n    padding: unset !important;\n    width: 100% !important;\n}\n\n@media screen and (max-width: 839px) {\n    .toc {\n        display: none !important;\n    }\n}"
  },
  {
    "path": "static/css/markdown.preview.css",
    "content": "@font-face {\n    font-family: octicons-link;\n    src: url(data:font/woff;charset=utf-8;base64,d09GRgABAAAAAAZwABAAAAAACFQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABEU0lHAAAGaAAAAAgAAAAIAAAAAUdTVUIAAAZcAAAACgAAAAoAAQAAT1MvMgAAAyQAAABJAAAAYFYEU3RjbWFwAAADcAAAAEUAAACAAJThvmN2dCAAAATkAAAABAAAAAQAAAAAZnBnbQAAA7gAAACyAAABCUM+8IhnYXNwAAAGTAAAABAAAAAQABoAI2dseWYAAAFsAAABPAAAAZwcEq9taGVhZAAAAsgAAAA0AAAANgh4a91oaGVhAAADCAAAABoAAAAkCA8DRGhtdHgAAAL8AAAADAAAAAwGAACfbG9jYQAAAsAAAAAIAAAACABiATBtYXhwAAACqAAAABgAAAAgAA8ASm5hbWUAAAToAAABQgAAAlXu73sOcG9zdAAABiwAAAAeAAAAME3QpOBwcmVwAAAEbAAAAHYAAAB/aFGpk3jaTY6xa8JAGMW/O62BDi0tJLYQincXEypYIiGJjSgHniQ6umTsUEyLm5BV6NDBP8Tpts6F0v+k/0an2i+itHDw3v2+9+DBKTzsJNnWJNTgHEy4BgG3EMI9DCEDOGEXzDADU5hBKMIgNPZqoD3SilVaXZCER3/I7AtxEJLtzzuZfI+VVkprxTlXShWKb3TBecG11rwoNlmmn1P2WYcJczl32etSpKnziC7lQyWe1smVPy/Lt7Kc+0vWY/gAgIIEqAN9we0pwKXreiMasxvabDQMM4riO+qxM2ogwDGOZTXxwxDiycQIcoYFBLj5K3EIaSctAq2kTYiw+ymhce7vwM9jSqO8JyVd5RH9gyTt2+J/yUmYlIR0s04n6+7Vm1ozezUeLEaUjhaDSuXHwVRgvLJn1tQ7xiuVv/ocTRF42mNgZGBgYGbwZOBiAAFGJBIMAAizAFoAAABiAGIAznjaY2BkYGAA4in8zwXi+W2+MjCzMIDApSwvXzC97Z4Ig8N/BxYGZgcgl52BCSQKAA3jCV8CAABfAAAAAAQAAEB42mNgZGBg4f3vACQZQABIMjKgAmYAKEgBXgAAeNpjYGY6wTiBgZWBg2kmUxoDA4MPhGZMYzBi1AHygVLYQUCaawqDA4PChxhmh/8ODDEsvAwHgMKMIDnGL0x7gJQCAwMAJd4MFwAAAHjaY2BgYGaA4DAGRgYQkAHyGMF8NgYrIM3JIAGVYYDT+AEjAwuDFpBmA9KMDEwMCh9i/v8H8sH0/4dQc1iAmAkALaUKLgAAAHjaTY9LDsIgEIbtgqHUPpDi3gPoBVyRTmTddOmqTXThEXqrob2gQ1FjwpDvfwCBdmdXC5AVKFu3e5MfNFJ29KTQT48Ob9/lqYwOGZxeUelN2U2R6+cArgtCJpauW7UQBqnFkUsjAY/kOU1cP+DAgvxwn1chZDwUbd6CFimGXwzwF6tPbFIcjEl+vvmM/byA48e6tWrKArm4ZJlCbdsrxksL1AwWn/yBSJKpYbq8AXaaTb8AAHja28jAwOC00ZrBeQNDQOWO//sdBBgYGRiYWYAEELEwMTE4uzo5Zzo5b2BxdnFOcALxNjA6b2ByTswC8jYwg0VlNuoCTWAMqNzMzsoK1rEhNqByEyerg5PMJlYuVueETKcd/89uBpnpvIEVomeHLoMsAAe1Id4AAAAAAAB42oWQT07CQBTGv0JBhagk7HQzKxca2sJCE1hDt4QF+9JOS0nbaaYDCQfwCJ7Au3AHj+LO13FMmm6cl7785vven0kBjHCBhfpYuNa5Ph1c0e2Xu3jEvWG7UdPDLZ4N92nOm+EBXuAbHmIMSRMs+4aUEd4Nd3CHD8NdvOLTsA2GL8M9PODbcL+hD7C1xoaHeLJSEao0FEW14ckxC+TU8TxvsY6X0eLPmRhry2WVioLpkrbp84LLQPGI7c6sOiUzpWIWS5GzlSgUzzLBSikOPFTOXqly7rqx0Z1Q5BAIoZBSFihQYQOOBEdkCOgXTOHA07HAGjGWiIjaPZNW13/+lm6S9FT7rLHFJ6fQbkATOG1j2OFMucKJJsxIVfQORl+9Jyda6Sl1dUYhSCm1dyClfoeDve4qMYdLEbfqHf3O/AdDumsjAAB42mNgYoAAZQYjBmyAGYQZmdhL8zLdDEydARfoAqIAAAABAAMABwAKABMAB///AA8AAQAAAAAAAAAAAAAAAAABAAAAAA==) format('woff');\n}\n\n/*************表格样式****************/\n.markdown-body{\n    -webkit-backface-visibility: hidden;\n    font-family: Helvetica, -apple-system, BlinkMacSystemFont, \"Helvetica Neue\",Helvetica,\"Segoe UI\",Arial,freesans,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\",\"Segoe UI Symbol\",\"Microsoft Yahei\",\"Helvetica Neue\",Helvetica;\n    -ms-text-size-adjust: 100%;\n    -webkit-text-size-adjust: 100%;\n    line-height: 1.5;\n    color: #24292e;\n    font-family: -apple-system, BlinkMacSystemFont, \"Segoe UI\", Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";\n    word-wrap: break-word;\n}\n.editormd-preview-container table {\n    margin-top: 0;\n    margin-bottom: 24px;\n    width: 100%;\n    overflow: auto;\n    border-bottom: none;\n    line-height: 1.5;\n    display: table;\n}\n\n.editormd-preview-container table td,.editormd-preview-container table th {\n    padding: 8px 13px;\n    border: 1px solid #d9d9d9;\n    word-wrap: break-word;\n    text-align: left\n}\n\n.editormd-preview-container table th {\n    background-color: #f2f2f2;\n    color: #333;\n    font-weight: 400;\n    word-break: keep-all\n}\n\n.editormd-preview-container table tr {\n    background-color: #fff\n}\n.editormd-preview-container .sequence-diagram, .editormd-preview-container .flowchart, .editormd-html-preview .sequence-diagram, .editormd-html-preview .flowchart{\n    overflow: auto;\n}\n/**************TOC*******************/\n.editormd-preview-container{\n    position: relative;\n    height: auto;\n    width: 100%;\n}\n\n.whole-article-wrap {\n    display: flex;\n    flex-direction: column;\n}\n\n/*.content > .whole-article-wrap {*/\n/*    flex-direction: row-reverse;*/\n/*}*/\n\n.content > .whole-article-wrap > .markdown-toc {\n    right: 30px;\n    margin-left: 10px;\n    max-height: 550px;\n}\n\n.content > .whole-article-wrap > .markdown-article {\n    width: 100%;\n}\n\n.article-body .markdown-toc{\n    position: fixed;\n    right: 50px;\n    width: 260px;\n    font-size: 12px;\n    overflow: auto;\n    border: 1px solid #e8e8e8;\n    border-radius: 6px;\n}\n.markdown-toc ul{\n    list-style:none;\n}\n\n.markdown-toc-list {\n    padding:20px 0 !important;\n    margin-bottom: 0 !important;\n}\n\n.markdown-toc .markdown-toc-list>li{\n    padding: 3px 10px 3px 16px;\n    line-height: 18px;\n    /*border-left: 2px solid #e8e8e8;*/\n    color: #595959;\n    margin-left: -2px;\n}\n.markdown-toc .markdown-toc-list>li.active{\n    border-right: 2px solid #25b864;\n}\n\n.article-body .markdown-article{\n    width: calc(100% - 260px);\n    /*margin-right: 250px;*/\n}\n.article-body.content .markdown-toc{\n    position: fixed;\n    margin-top: 0;\n}\n.article-body.content .markdown-article{\n    margin-right: 0;\n}\n\n.markdown-toc-list .directory-item {\n    padding: 3px 10px 3px 16px;\n    line-height: 18px;\n    /*border-left: 2px solid #e8e8e8;*/\n    color: #595959;\n}\n.markdown-toc-list .directory-item-link {\n    width: 100%;\n    display: block;\n    white-space: nowrap;\n    overflow: hidden;\n    text-overflow: ellipsis;\n    color: #595959;\n}\n.markdown-toc-list .directory-item-link:hover {\n    color: #8C8C8C;\n}\n.markdown-toc-list .directory-item-link-1 {\n    padding-left: 0;\n}\n.markdown-toc-list .directory-item-link-2 {\n    padding-left: 1.2em;\n}\n.markdown-toc-list .directory-item-link-3 {\n    padding-left: 2.4em;\n}\n.markdown-toc-list .directory-item-link-4 {\n    padding-left: 3.6em;\n}\n.markdown-toc-list .directory-item-link-5 {\n    padding-left: 4.8em;\n}\n.markdown-toc-list .directory-item-link-6 {\n    padding-left: 6em;\n}\n.markdown-toc-list .directory-item-active {\n    border-left: 2px solid #25b864 !important;\n}\n.markdown-toc-list .directory-item-active a {\n    color: #25b864;\n}\n.markdown-toc-list .directory-item-active a:hover {\n    color: #7CD4A2;\n}\n@media (max-width: 1200px){\n    .article-body .markdown-toc{\n        display: none;\n    }\n    .article-body .markdown-article{\n        width: 100%;\n    }\n    .article-body .markdown-article{\n        margin-right: 0;\n    }\n}\n\n/***********代码样式*****************/\n.markdown-body .highlight pre, .markdown-body pre{\n    padding: 1em;\n    border: none;\n    overflow: auto;\n    line-height: 1.45;\n    max-height: 35em;\n    position: relative;\n    /*background: url(../editor.md/lib/highlight/blueprint.png) #F6F6F6;*/\n    -moz-background-size: 30px,30px;\n    -o-background-size: 30px,30px;\n    -webkit-background-size: 30px,30px;\n    background-size: 30px,30px;\n    border-radius:4px;\n    word-break:break-all;\n    word-wrap:break-word;\n}\n.editormd-preview-container pre.hljs>code {\n    border-radius: 3px;\n    font-size: 1.1em;\n    font-family: \"Source Code Pro\",Consolas,\"Liberation Mono\",Menlo,Courier,'Microsoft Yahei',monospace;\n    border: 0;\n    word-break: break-all;\n    overflow-y: auto; overflow-x: hidden;\n    overflow-wrap: normal;\n    white-space: inherit\n}\n.editormd-preview-container pre.prettyprint, .editormd-html-preview pre.prettyprint {\n    padding: 0;\n}\n\n.editormd-preview-container ol.linenums, .editormd-html-preview ol.linenums{\n    color: #999;\n}\n.editormd-preview-container ol.linenums>li:first-child,.editormd-html-preview ol.linenums>li:first-child{\n    padding-top: 10px;\n}\n.editormd-preview-container ol.linenums>li:last-child ,.editormd-html-preview ol.linenums>li:last-child{\n    padding-bottom: 10px;\n}\n.editormd-preview-container ul>li{\n    line-height: 2em;\n}"
  },
  {
    "path": "static/css/print.css",
    "content": "body {font-size: 12pt !important;}\n.m-manual .manual-left,.navbar {display: none;height: 0 !important; width: 0!important;}\n.m-manual .manual-right{position: relative;left: 0 !important; top: 0;}\n.manual-article .article-content{ min-width: initial !important;max-width: initial !important; width: inherit !important;padding: auto !important;}\npre, code {white-space: pre-wrap !important;word-wrap: break-word !important;}\na:link, a:visited {color: blue !important;text-decoration: underline !important;}"
  },
  {
    "path": "static/editor.md/css/editormd.css",
    "content": "/*\n * Editor.md\n *\n * @file        editormd.css \n * @version     v1.5.0 \n * @description Open source online markdown editor.\n * @license     MIT License\n * @author      Pandao\n * {@link       https://github.com/pandao/editor.md}\n * @updateTime  2015-06-09\n */\n\n@charset \"UTF-8\";\n/*! prefixes.scss v0.1.0 | Author: Pandao | https://github.com/pandao/prefixes.scss | MIT license | Copyright (c) 2015 */\n.editormd {\n  width: 90%;\n  height: 640px;\n  margin: 0 auto;\n  text-align: left;\n  overflow: hidden;\n  position: relative;\n  margin-bottom: 15px;\n  border: 1px solid #ddd;\n  font-family: \"Meiryo UI\", \"Microsoft YaHei\", \"Malgun Gothic\", \"Segoe UI\", \"Trebuchet MS\", Helvetica, \"Monaco\", monospace, Tahoma, STXihei, \"华文细黑\", STHeiti, \"Helvetica Neue\", \"Droid Sans\", \"wenquanyi micro hei\", FreeSans, Arimo, Arial, SimSun, \"宋体\", Heiti, \"黑体\", sans-serif;\n}\n.editormd *, .editormd *:before, .editormd *:after {\n  -webkit-box-sizing: border-box;\n  -moz-box-sizing: border-box;\n  box-sizing: border-box;\n}\n.editormd a {\n  text-decoration: none;\n}\n.editormd img {\n  border: none;\n  vertical-align: middle;\n}\n.editormd > textarea,\n.editormd .editormd-html-textarea,\n.editormd .editormd-markdown-textarea {\n  width: 0;\n  height: 0;\n  outline: 0;\n  resize: none;\n}\n.editormd .editormd-html-textarea,\n.editormd .editormd-markdown-textarea {\n  display: none;\n}\n.editormd input[type=\"text\"],\n.editormd input[type=\"button\"],\n.editormd input[type=\"submit\"],\n.editormd select, .editormd textarea, .editormd button {\n  -webkit-appearance: none;\n  -moz-appearance: none;\n  -ms-appearance: none;\n  appearance: none;\n}\n.editormd ::-webkit-scrollbar {\n  height: 10px;\n  width: 7px;\n  background: rgba(0, 0, 0, 0.1);\n}\n.editormd ::-webkit-scrollbar:hover {\n  background: rgba(0, 0, 0, 0.2);\n}\n.editormd ::-webkit-scrollbar-thumb {\n  background: rgba(0, 0, 0, 0.3);\n  -webkit-border-radius: 6px;\n  -moz-border-radius: 6px;\n  -ms-border-radius: 6px;\n  -o-border-radius: 6px;\n  border-radius: 6px;\n}\n.editormd ::-webkit-scrollbar-thumb:hover {\n  -webkit-box-shadow: inset 1px 1px 1px rgba(0, 0, 0, 0.25);\n  /* Webkit browsers */\n  -moz-box-shadow: inset 1px 1px 1px rgba(0, 0, 0, 0.25);\n  /* Firefox */\n  -ms-box-shadow: inset 1px 1px 1px rgba(0, 0, 0, 0.25);\n  /* IE9 */\n  -o-box-shadow: inset 1px 1px 1px rgba(0, 0, 0, 0.25);\n  /* Opera(Old) */\n  box-shadow: inset 1px 1px 1px rgba(0, 0, 0, 0.25);\n  /* IE9+, News */\n  background-color: rgba(0, 0, 0, 0.4);\n}\n\n.editormd-user-unselect {\n  -webkit-user-select: none;\n  -moz-user-select: none;\n  -ms-user-select: none;\n  -o-user-select: none;\n  user-select: none;\n}\n\n.editormd-toolbar {\n  width: 100%;\n  min-height: 37px;\n  background: #fff;\n  display: none;\n  position: absolute;\n  top: 0;\n  left: 0;\n  z-index: 10;\n  border-bottom: 1px solid #ddd;\n}\n\n.editormd-toolbar-container {\n  padding: 0 8px;\n  min-height: 35px;\n  -webkit-user-select: none;\n  -moz-user-select: none;\n  -ms-user-select: none;\n  -o-user-select: none;\n  user-select: none;\n}\n\n.editormd-menu {\n  margin: 0;\n  padding: 0;\n  list-style: none;\n}\n.editormd-menu > li {\n  margin: 0;\n  padding: 5px 1px;\n  display: inline-block;\n  position: relative;\n}\n.editormd-menu > li.divider {\n  display: inline-block;\n  text-indent: -9999px;\n  margin: 0 5px;\n  height: 65%;\n  border-right: 1px solid #ddd;\n}\n.editormd-menu > li > a {\n  outline: 0;\n  color: #666;\n  display: inline-block;\n  min-width: 24px;\n  font-size: 16px;\n  text-decoration: none;\n  text-align: center;\n  -webkit-border-radius: 2px;\n  -moz-border-radius: 2px;\n  -ms-border-radius: 2px;\n  -o-border-radius: 2px;\n  border-radius: 2px;\n  border: 1px solid #fff;\n  -webkit-transition: all 300ms ease-out;\n  /* Safari, Chrome */\n  -moz-transition: all 300ms ease-out;\n  /* Firefox 4.0~16.0 */\n  transition: all 300ms ease-out;\n  /* IE >9, FF >15, Opera >12.0 */\n}\n.editormd-menu > li > a:hover, .editormd-menu > li > a.active {\n  border: 1px solid #ddd;\n  background: #eee;\n}\n.editormd-menu > li > a > .fa {\n  text-align: center;\n  display: block;\n  padding: 5px;\n}\n.editormd-menu > li > a > .editormd-bold {\n  padding: 5px 2px;\n  display: inline-block;\n  font-weight: bold;\n}\n.editormd-menu > li:hover .editormd-dropdown-menu {\n  display: block;\n}\n.editormd-menu > li + li > a {\n  margin-left: 3px;\n}\n\n.editormd-dropdown-menu {\n  display: none;\n  background: #fff;\n  border: 1px solid #ddd;\n  width: 148px;\n  list-style: none;\n  position: absolute;\n  top: 33px;\n  left: 0;\n  z-index: 100;\n  -webkit-box-shadow: 1px 2px 6px rgba(0, 0, 0, 0.15);\n  /* Webkit browsers */\n  -moz-box-shadow: 1px 2px 6px rgba(0, 0, 0, 0.15);\n  /* Firefox */\n  -ms-box-shadow: 1px 2px 6px rgba(0, 0, 0, 0.15);\n  /* IE9 */\n  -o-box-shadow: 1px 2px 6px rgba(0, 0, 0, 0.15);\n  /* Opera(Old) */\n  box-shadow: 1px 2px 6px rgba(0, 0, 0, 0.15);\n  /* IE9+, News */\n}\n.editormd-dropdown-menu:before, .editormd-dropdown-menu:after {\n  width: 0;\n  height: 0;\n  display: block;\n  content: \"\";\n  position: absolute;\n  top: -11px;\n  left: 8px;\n  border: 5px solid transparent;\n}\n.editormd-dropdown-menu:before {\n  border-bottom-color: #ccc;\n}\n.editormd-dropdown-menu:after {\n  border-bottom-color: #ffffff;\n  top: -10px;\n}\n.editormd-dropdown-menu > li > a {\n  color: #666;\n  display: block;\n  text-decoration: none;\n  padding: 8px 10px;\n}\n.editormd-dropdown-menu > li > a:hover {\n  background: #f6f6f6;\n  -webkit-transition: all 300ms ease-out;\n  /* Safari, Chrome */\n  -moz-transition: all 300ms ease-out;\n  /* Firefox 4.0~16.0 */\n  transition: all 300ms ease-out;\n  /* IE >9, FF >15, Opera >12.0 */\n}\n.editormd-dropdown-menu > li + li {\n  border-top: 1px solid #ddd;\n}\n\n.editormd-container {\n  margin: 0;\n  width: 100%;\n  height: 100%;\n  overflow: hidden;\n  padding: 35px 0 0;\n  position: relative;\n  background: #fff;\n  -webkit-box-sizing: border-box;\n  -moz-box-sizing: border-box;\n  box-sizing: border-box;\n}\n\n.editormd-dialog {\n  color: #666;\n  position: fixed;\n  z-index: 99999;\n  display: none;\n  -webkit-border-radius: 3px;\n  -moz-border-radius: 3px;\n  -ms-border-radius: 3px;\n  -o-border-radius: 3px;\n  border-radius: 3px;\n  -webkit-box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);\n  /* Webkit browsers */\n  -moz-box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);\n  /* Firefox */\n  -ms-box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);\n  /* IE9 */\n  -o-box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);\n  /* Opera(Old) */\n  box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);\n  /* IE9+, News */\n  background: #fff;\n  font-size: 14px;\n}\n\n.editormd-dialog-container {\n  position: relative;\n  padding: 20px;\n  line-height: 1.4;\n}\n.editormd-dialog-container h1 {\n  font-size: 24px;\n  margin-bottom: 10px;\n}\n.editormd-dialog-container h1 .fa {\n  color: #2C7EEA;\n  padding-right: 5px;\n}\n.editormd-dialog-container h1 small {\n  padding-left: 5px;\n  font-weight: normal;\n  font-size: 12px;\n  color: #999;\n}\n.editormd-dialog-container select {\n  color: #999;\n  padding: 3px 8px;\n  border: 1px solid #ddd;\n}\n\n.editormd-dialog-close {\n  position: absolute;\n  top: 12px;\n  right: 15px;\n  font-size: 18px;\n  color: #ccc;\n  -webkit-transition: color 300ms ease-out;\n  /* Safari, Chrome */\n  -moz-transition: color 300ms ease-out;\n  /* Firefox 4.0~16.0 */\n  transition: color 300ms ease-out;\n  /* IE >9, FF >15, Opera >12.0 */\n}\n.editormd-dialog-close:hover {\n  color: #999;\n}\n\n.editormd-dialog-header {\n  padding: 11px 20px;\n  border-bottom: 1px solid #eee;\n  -webkit-transition: background 300ms ease-out;\n  /* Safari, Chrome */\n  -moz-transition: background 300ms ease-out;\n  /* Firefox 4.0~16.0 */\n  transition: background 300ms ease-out;\n  /* IE >9, FF >15, Opera >12.0 */\n}\n.editormd-dialog-header:hover {\n  background: #f6f6f6;\n}\n\n.editormd-dialog-title {\n  font-size: 14px;\n}\n\n.editormd-dialog-footer {\n  padding: 10px 0 0 0;\n  text-align: right;\n}\n\n.editormd-dialog-info {\n  width: 420px;\n}\n.editormd-dialog-info h1 {\n  font-weight: normal;\n}\n.editormd-dialog-info .editormd-dialog-container {\n  padding: 20px 25px 25px;\n}\n.editormd-dialog-info .editormd-dialog-close {\n  top: 10px;\n  right: 10px;\n}\n.editormd-dialog-info p > a, .editormd-dialog-info .hover-link:hover {\n  color: #2196F3;\n}\n.editormd-dialog-info .hover-link {\n  color: #666;\n}\n.editormd-dialog-info a .fa-external-link {\n  display: none;\n}\n.editormd-dialog-info a:hover {\n  color: #2196F3;\n}\n.editormd-dialog-info a:hover .fa-external-link {\n  display: inline-block;\n}\n\n.editormd-mask,\n.editormd-container-mask,\n.editormd-dialog-mask {\n  display: none;\n  width: 100%;\n  height: 100%;\n  position: absolute;\n  top: 0;\n  left: 0;\n}\n\n.editormd-mask,\n.editormd-dialog-mask-bg {\n  background: #fff;\n  opacity: 0.5;\n  filter: alpha(opacity=50);\n}\n\n.editormd-mask {\n  position: fixed;\n  background: #000;\n  opacity: 0.2;\n  /* W3C */\n  filter: alpha(opacity=20);\n  /* IE */\n  z-index: 99998;\n}\n\n.editormd-container-mask,\n.editormd-dialog-mask-con {\n  background: url(../images/loading.gif) no-repeat center center;\n  -webkit-background-size: 32px 32px;\n  /* Chrome, iOS, Safari */\n  -moz-background-size: 32px 32px;\n  /* Firefox 3.6~4.0 */\n  -o-background-size: 32px 32px;\n  /* Opera 9.5 */\n  background-size: 32px 32px;\n  /* IE9+, New */\n}\n\n.editormd-container-mask {\n  z-index: 20;\n  display: block;\n  background-color: #fff;\n}\n\n@media only screen and (-webkit-min-device-pixel-ratio: 2), only screen and (min-device-pixel-ratio: 2) {\n  .editormd-container-mask,\n  .editormd-dialog-mask-con {\n    background-image: url(../images/loading@2x.gif);\n  }\n}\n@media only screen and (-webkit-min-device-pixel-ratio: 3), only screen and (min-device-pixel-ratio: 3) {\n  .editormd-container-mask,\n  .editormd-dialog-mask-con {\n    background-image: url(../images/loading@3x.gif);\n  }\n}\n.editormd-code-block-dialog textarea,\n.editormd-preformatted-text-dialog textarea {\n  width: 100%;\n  height: 400px;\n  margin-bottom: 6px;\n  overflow: auto;\n  border: 1px solid #eee;\n  background: #fff;\n  padding: 15px;\n  resize: none;\n}\n\n.editormd-code-toolbar {\n  color: #999;\n  font-size: 14px;\n  margin: -5px 0 10px;\n}\n\n.editormd-grid-table {\n  width: 99%;\n  display: table;\n  border: 1px solid #ddd;\n  border-collapse: collapse;\n}\n\n.editormd-grid-table-row {\n  width: 100%;\n  display: table-row;\n}\n.editormd-grid-table-row a {\n  font-size: 1.4em;\n  width: 5%;\n  height: 36px;\n  color: #999;\n  text-align: center;\n  display: table-cell;\n  vertical-align: middle;\n  border: 1px solid #ddd;\n  text-decoration: none;\n  -webkit-transition: background-color 300ms ease-out, color 100ms ease-in;\n  /* Safari, Chrome */\n  -moz-transition: background-color 300ms ease-out, color 100ms ease-in;\n  /* Firefox 4.0~16.0 */\n  transition: background-color 300ms ease-out, color 100ms ease-in;\n  /* IE >9, FF >15, Opera >12.0 */\n}\n.editormd-grid-table-row a.selected {\n  color: #666;\n  background-color: #eee;\n}\n.editormd-grid-table-row a:hover {\n  color: #777;\n  background-color: #f6f6f6;\n}\n\n.editormd-tab-head {\n  list-style: none;\n  border-bottom: 1px solid #ddd;\n}\n.editormd-tab-head li {\n  display: inline-block;\n}\n.editormd-tab-head li a {\n  color: #999;\n  display: block;\n  padding: 6px 12px 5px;\n  text-align: center;\n  text-decoration: none;\n  margin-bottom: -1px;\n  border: 1px solid #ddd;\n  -webkit-border-top-left-radius: 3px;\n  -moz-border-top-left-radius: 3px;\n  -ms-border-top-left-radius: 3px;\n  -o-border-top-left-radius: 3px;\n  border-top-left-radius: 3px;\n  -webkit-border-top-right-radius: 3px;\n  -moz-border-top-right-radius: 3px;\n  -ms-border-top-right-radius: 3px;\n  -o-border-top-right-radius: 3px;\n  border-top-right-radius: 3px;\n  background: #f6f6f6;\n  -webkit-transition: all 300ms ease-out;\n  /* Safari, Chrome */\n  -moz-transition: all 300ms ease-out;\n  /* Firefox 4.0~16.0 */\n  transition: all 300ms ease-out;\n  /* IE >9, FF >15, Opera >12.0 */\n}\n.editormd-tab-head li a:hover {\n  color: #666;\n  background: #eee;\n}\n.editormd-tab-head li.active a {\n  color: #666;\n  background: #fff;\n  border-bottom-color: #fff;\n}\n.editormd-tab-head li + li {\n  margin-left: 3px;\n}\n\n.editormd-tab-box {\n  padding: 20px 0;\n}\n\n.editormd-form {\n  color: #666;\n}\n.editormd-form label {\n  float: left;\n  display: block;\n  width: 75px;\n  text-align: left;\n  padding: 7px 0 15px 5px;\n  margin: 0 0 2px;\n  font-weight: normal;\n}\n.editormd-form br {\n  clear: both;\n}\n.editormd-form iframe {\n  display: none;\n}\n.editormd-form input:focus {\n  outline: 0;\n}\n.editormd-form input[type=\"text\"], .editormd-form input[type=\"number\"] {\n  color: #999;\n  padding: 8px;\n  border: 1px solid #ddd;\n}\n.editormd-form input[type=\"number\"] {\n  width: 40px;\n  display: inline-block;\n  padding: 6px 8px;\n}\n.editormd-form input[type=\"text\"] {\n  display: inline-block;\n  width: 264px;\n}\n.editormd-form .fa-btns {\n  display: inline-block;\n}\n.editormd-form .fa-btns a {\n  color: #999;\n  padding: 7px 10px 0 0;\n  display: inline-block;\n  text-decoration: none;\n  text-align: center;\n}\n.editormd-form .fa-btns .fa {\n  font-size: 1.3em;\n}\n.editormd-form .fa-btns label {\n  float: none;\n  display: inline-block;\n  width: auto;\n  text-align: left;\n  padding: 0 0 0 5px;\n  cursor: pointer;\n}\n\n.editormd-form input[type=\"submit\"], .editormd-form .editormd-btn, .editormd-form button,\n.editormd-dialog-container input[type=\"submit\"],\n.editormd-dialog-container .editormd-btn,\n.editormd-dialog-container button,\n.editormd-dialog-footer input[type=\"submit\"],\n.editormd-dialog-footer .editormd-btn,\n.editormd-dialog-footer button {\n  color: #666;\n  min-width: 75px;\n  cursor: pointer;\n  background: #fff;\n  padding: 7px 10px;\n  border: 1px solid #ddd;\n  -webkit-border-radius: 3px;\n  -moz-border-radius: 3px;\n  -ms-border-radius: 3px;\n  -o-border-radius: 3px;\n  border-radius: 3px;\n  -webkit-transition: background 300ms ease-out;\n  /* Safari, Chrome */\n  -moz-transition: background 300ms ease-out;\n  /* Firefox 4.0~16.0 */\n  transition: background 300ms ease-out;\n  /* IE >9, FF >15, Opera >12.0 */\n}\n.editormd-form input[type=\"submit\"]:hover, .editormd-form .editormd-btn:hover, .editormd-form button:hover,\n.editormd-dialog-container input[type=\"submit\"]:hover,\n.editormd-dialog-container .editormd-btn:hover,\n.editormd-dialog-container button:hover,\n.editormd-dialog-footer input[type=\"submit\"]:hover,\n.editormd-dialog-footer .editormd-btn:hover,\n.editormd-dialog-footer button:hover {\n  background: #eee;\n}\n.editormd-form .editormd-btn,\n.editormd-dialog-container .editormd-btn,\n.editormd-dialog-footer .editormd-btn {\n  padding: 5px 8px 4px\\0;\n}\n.editormd-form .editormd-btn + .editormd-btn,\n.editormd-dialog-container .editormd-btn + .editormd-btn,\n.editormd-dialog-footer .editormd-btn + .editormd-btn {\n  margin-left: 8px;\n}\n\n.editormd-file-input {\n  width: 75px;\n  height: 32px;\n  margin-left: 8px;\n  position: relative;\n  display: inline-block;\n}\n.editormd-file-input input[type=\"file\"] {\n  width: 75px;\n  height: 32px;\n  opacity: 0;\n  cursor: pointer;\n  background: #000;\n  display: inline-block;\n  position: absolute;\n  top: 0;\n  right: 0;\n}\n.editormd-file-input input[type=\"file\"]::-webkit-file-upload-button {\n  visibility: hidden;\n}\n.editormd-file-input:hover input[type=\"submit\"] {\n  background: #eee;\n}\n\n.editormd .CodeMirror, .editormd-preview {\n  display: inline-block;\n  width: 50%;\n  height: 100%;\n  vertical-align: top;\n  -webkit-box-sizing: border-box;\n  -moz-box-sizing: border-box;\n  box-sizing: border-box;\n  margin: 0;\n}\n\n.editormd-preview {\n  position: absolute;\n  top: 35px;\n  right: 0;\n  right: -1px\\0;\n  overflow: auto;\n  line-height: 1.6;\n  display: none;\n  background: #fff;\n}\n\n.editormd .CodeMirror {\n  z-index: 10;\n  float: left;\n  border-right: 1px solid #ddd;\n  font-size: 14px;\n  font-family: \"YaHei Consolas Hybrid\", Consolas, \"微软雅黑\", \"Meiryo UI\", \"Malgun Gothic\", \"Segoe UI\", \"Trebuchet MS\", Helvetica, \"Monaco\", courier, monospace;\n  line-height: 1.6;\n  margin-top: 35px;\n}\n.editormd .CodeMirror pre {\n  font-size: 14px;\n  padding: 0 12px;\n}\n.editormd .CodeMirror-linenumbers {\n  padding: 0 5px;\n}\n.editormd .CodeMirror-selected {\n  background: #70B7FF;\n}\n.editormd .CodeMirror-focused .CodeMirror-selected {\n  background: #70B7FF;\n}\n.editormd .CodeMirror, .editormd .CodeMirror-scroll, .editormd .editormd-preview {\n  -webkit-overflow-scrolling: touch;\n}\n.editormd .styled-background {\n  background-color: #ff7;\n}\n.editormd .CodeMirror-focused .cm-matchhighlight {\n  background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAIAAAACCAYAAABytg0kAAAAFklEQVQI12NgYGBgkKzc8x9CMDAwAAAmhwSbidEoSQAAAABJRU5ErkJggg==);\n  background-position: bottom;\n  background-repeat: repeat-x;\n}\n.editormd .CodeMirror-empty.CodeMirror-focused {\n  outline: none;\n}\n.editormd .CodeMirror pre.CodeMirror-placeholder {\n  color: #999;\n}\n.editormd .cm-trailingspace {\n  background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAACCAYAAAB/qH1jAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3QUXCToH00Y1UgAAACFJREFUCNdjPMDBUc/AwNDAAAFMTAwMDA0OP34wQgX/AQBYgwYEx4f9lQAAAABJRU5ErkJggg==);\n  background-position: bottom left;\n  background-repeat: repeat-x;\n}\n.editormd .cm-tab {\n  background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAMCAYAAAAkuj5RAAAAAXNSR0IArs4c6QAAAGFJREFUSMft1LsRQFAQheHPowAKoACx3IgEKtaEHujDjORSgWTH/ZOdnZOcM/sgk/kFFWY0qV8foQwS4MKBCS3qR6ixBJvElOobYAtivseIE120FaowJPN75GMu8j/LfMwNjh4HUpwg4LUAAAAASUVORK5CYII=);\n  background-position: right;\n  background-repeat: no-repeat;\n}\n\n/*! prefixes.scss v0.1.0 | Author: Pandao | https://github.com/pandao/prefixes.scss | MIT license | Copyright (c) 2015 */\n/*!\n *  Font Awesome 4.3.0 by @davegandy - http://fontawesome.io - @fontawesome\n *  License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License)\n */\n/* FONT PATH\n * -------------------------- */\n@font-face {\n  font-family: 'FontAwesome';\n  src: url(\"../fonts/fontawesome-webfont.eot?v=4.3.0\");\n  src: url(\"../fonts/fontawesome-webfont.eot?#iefix&v=4.3.0\") format(\"embedded-opentype\"), url(\"../fonts/fontawesome-webfont.woff2?v=4.3.0\") format(\"woff2\"), url(\"../fonts/fontawesome-webfont.woff?v=4.3.0\") format(\"woff\"), url(\"../fonts/fontawesome-webfont.ttf?v=4.3.0\") format(\"truetype\"), url(\"../fonts/fontawesome-webfont.svg?v=4.3.0#fontawesomeregular\") format(\"svg\");\n  font-weight: normal;\n  font-style: normal;\n}\n.fa {\n  display: inline-block;\n  font: normal normal normal 14px/1 FontAwesome;\n  font-size: inherit;\n  text-rendering: auto;\n  -webkit-font-smoothing: antialiased;\n  -moz-osx-font-smoothing: grayscale;\n  transform: translate(0, 0);\n}\n\n/* makes the font 33% larger relative to the icon container */\n.fa-lg {\n  font-size: 1.33333333em;\n  line-height: 0.75em;\n  vertical-align: -15%;\n}\n\n.fa-2x {\n  font-size: 2em;\n}\n\n.fa-3x {\n  font-size: 3em;\n}\n\n.fa-4x {\n  font-size: 4em;\n}\n\n.fa-5x {\n  font-size: 5em;\n}\n\n.fa-fw {\n  width: 1.28571429em;\n  text-align: center;\n}\n\n.fa-ul {\n  padding-left: 0;\n  margin-left: 2.14285714em;\n  list-style-type: none;\n}\n\n.fa-ul > li {\n  position: relative;\n}\n\n.fa-li {\n  position: absolute;\n  left: -2.14285714em;\n  width: 2.14285714em;\n  top: 0.14285714em;\n  text-align: center;\n}\n\n.fa-li.fa-lg {\n  left: -1.85714286em;\n}\n\n.fa-border {\n  padding: .2em .25em .15em;\n  border: solid 0.08em #eeeeee;\n  border-radius: .1em;\n}\n\n.pull-right {\n  float: right;\n}\n\n.pull-left {\n  float: left;\n}\n\n.fa.pull-left {\n  margin-right: .3em;\n}\n\n.fa.pull-right {\n  margin-left: .3em;\n}\n\n.fa-spin {\n  -webkit-animation: fa-spin 2s infinite linear;\n  animation: fa-spin 2s infinite linear;\n}\n\n.fa-pulse {\n  -webkit-animation: fa-spin 1s infinite steps(8);\n  animation: fa-spin 1s infinite steps(8);\n}\n\n@-webkit-keyframes fa-spin {\n  0% {\n    -webkit-transform: rotate(0deg);\n    transform: rotate(0deg);\n  }\n  100% {\n    -webkit-transform: rotate(359deg);\n    transform: rotate(359deg);\n  }\n}\n@keyframes fa-spin {\n  0% {\n    -webkit-transform: rotate(0deg);\n    transform: rotate(0deg);\n  }\n  100% {\n    -webkit-transform: rotate(359deg);\n    transform: rotate(359deg);\n  }\n}\n.fa-rotate-90 {\n  filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=1);\n  -webkit-transform: rotate(90deg);\n  -ms-transform: rotate(90deg);\n  transform: rotate(90deg);\n}\n\n.fa-rotate-180 {\n  filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=2);\n  -webkit-transform: rotate(180deg);\n  -ms-transform: rotate(180deg);\n  transform: rotate(180deg);\n}\n\n.fa-rotate-270 {\n  filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=3);\n  -webkit-transform: rotate(270deg);\n  -ms-transform: rotate(270deg);\n  transform: rotate(270deg);\n}\n\n.fa-flip-horizontal {\n  filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1);\n  -webkit-transform: scale(-1, 1);\n  -ms-transform: scale(-1, 1);\n  transform: scale(-1, 1);\n}\n\n.fa-flip-vertical {\n  filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1);\n  -webkit-transform: scale(1, -1);\n  -ms-transform: scale(1, -1);\n  transform: scale(1, -1);\n}\n\n:root .fa-rotate-90,\n:root .fa-rotate-180,\n:root .fa-rotate-270,\n:root .fa-flip-horizontal,\n:root .fa-flip-vertical {\n  filter: none;\n}\n\n.fa-stack {\n  position: relative;\n  display: inline-block;\n  width: 2em;\n  height: 2em;\n  line-height: 2em;\n  vertical-align: middle;\n}\n\n.fa-stack-1x,\n.fa-stack-2x {\n  position: absolute;\n  left: 0;\n  width: 100%;\n  text-align: center;\n}\n\n.fa-stack-1x {\n  line-height: inherit;\n}\n\n.fa-stack-2x {\n  font-size: 2em;\n}\n\n.fa-inverse {\n  color: #ffffff;\n}\n\n/* Font Awesome uses the Unicode Private Use Area (PUA) to ensure screen\n   readers do not read off random characters that represent icons */\n.fa-glass:before {\n  content: \"\\f000\";\n}\n\n.fa-music:before {\n  content: \"\\f001\";\n}\n\n.fa-search:before {\n  content: \"\\f002\";\n}\n\n.fa-envelope-o:before {\n  content: \"\\f003\";\n}\n\n.fa-heart:before {\n  content: \"\\f004\";\n}\n\n.fa-star:before {\n  content: \"\\f005\";\n}\n\n.fa-star-o:before {\n  content: \"\\f006\";\n}\n\n.fa-user:before {\n  content: \"\\f007\";\n}\n\n.fa-film:before {\n  content: \"\\f008\";\n}\n\n.fa-th-large:before {\n  content: \"\\f009\";\n}\n\n.fa-th:before {\n  content: \"\\f00a\";\n}\n\n.fa-th-list:before {\n  content: \"\\f00b\";\n}\n\n.fa-check:before {\n  content: \"\\f00c\";\n}\n\n.fa-remove:before,\n.fa-close:before,\n.fa-times:before {\n  content: \"\\f00d\";\n}\n\n.fa-search-plus:before {\n  content: \"\\f00e\";\n}\n\n.fa-search-minus:before {\n  content: \"\\f010\";\n}\n\n.fa-power-off:before {\n  content: \"\\f011\";\n}\n\n.fa-signal:before {\n  content: \"\\f012\";\n}\n\n.fa-gear:before,\n.fa-cog:before {\n  content: \"\\f013\";\n}\n\n.fa-trash-o:before {\n  content: \"\\f014\";\n}\n\n.fa-home:before {\n  content: \"\\f015\";\n}\n\n.fa-file-o:before {\n  content: \"\\f016\";\n}\n\n.fa-clock-o:before {\n  content: \"\\f017\";\n}\n\n.fa-road:before {\n  content: \"\\f018\";\n}\n\n.fa-download:before {\n  content: \"\\f019\";\n}\n\n.fa-arrow-circle-o-down:before {\n  content: \"\\f01a\";\n}\n\n.fa-arrow-circle-o-up:before {\n  content: \"\\f01b\";\n}\n\n.fa-inbox:before {\n  content: \"\\f01c\";\n}\n\n.fa-play-circle-o:before {\n  content: \"\\f01d\";\n}\n\n.fa-rotate-right:before,\n.fa-repeat:before {\n  content: \"\\f01e\";\n}\n\n.fa-refresh:before {\n  content: \"\\f021\";\n}\n\n.fa-list-alt:before {\n  content: \"\\f022\";\n}\n\n.fa-lock:before {\n  content: \"\\f023\";\n}\n\n.fa-flag:before {\n  content: \"\\f024\";\n}\n\n.fa-headphones:before {\n  content: \"\\f025\";\n}\n\n.fa-volume-off:before {\n  content: \"\\f026\";\n}\n\n.fa-volume-down:before {\n  content: \"\\f027\";\n}\n\n.fa-volume-up:before {\n  content: \"\\f028\";\n}\n\n.fa-qrcode:before {\n  content: \"\\f029\";\n}\n\n.fa-barcode:before {\n  content: \"\\f02a\";\n}\n\n.fa-tag:before {\n  content: \"\\f02b\";\n}\n\n.fa-tags:before {\n  content: \"\\f02c\";\n}\n\n.fa-book:before {\n  content: \"\\f02d\";\n}\n\n.fa-bookmark:before {\n  content: \"\\f02e\";\n}\n\n.fa-print:before {\n  content: \"\\f02f\";\n}\n\n.fa-camera:before {\n  content: \"\\f030\";\n}\n\n.fa-font:before {\n  content: \"\\f031\";\n}\n\n.fa-bold:before {\n  content: \"\\f032\";\n}\n\n.fa-italic:before {\n  content: \"\\f033\";\n}\n\n.fa-text-height:before {\n  content: \"\\f034\";\n}\n\n.fa-text-width:before {\n  content: \"\\f035\";\n}\n\n.fa-align-left:before {\n  content: \"\\f036\";\n}\n\n.fa-align-center:before {\n  content: \"\\f037\";\n}\n\n.fa-align-right:before {\n  content: \"\\f038\";\n}\n\n.fa-align-justify:before {\n  content: \"\\f039\";\n}\n\n.fa-list:before {\n  content: \"\\f03a\";\n}\n\n.fa-dedent:before,\n.fa-outdent:before {\n  content: \"\\f03b\";\n}\n\n.fa-indent:before {\n  content: \"\\f03c\";\n}\n\n.fa-video-camera:before {\n  content: \"\\f03d\";\n}\n\n.fa-photo:before,\n.fa-image:before,\n.fa-picture-o:before {\n  content: \"\\f03e\";\n}\n\n.fa-pencil:before {\n  content: \"\\f040\";\n}\n\n.fa-map-marker:before {\n  content: \"\\f041\";\n}\n\n.fa-adjust:before {\n  content: \"\\f042\";\n}\n\n.fa-tint:before {\n  content: \"\\f043\";\n}\n\n.fa-edit:before,\n.fa-pencil-square-o:before {\n  content: \"\\f044\";\n}\n\n.fa-share-square-o:before {\n  content: \"\\f045\";\n}\n\n.fa-check-square-o:before {\n  content: \"\\f046\";\n}\n\n.fa-arrows:before {\n  content: \"\\f047\";\n}\n\n.fa-step-backward:before {\n  content: \"\\f048\";\n}\n\n.fa-fast-backward:before {\n  content: \"\\f049\";\n}\n\n.fa-backward:before {\n  content: \"\\f04a\";\n}\n\n.fa-play:before {\n  content: \"\\f04b\";\n}\n\n.fa-pause:before {\n  content: \"\\f04c\";\n}\n\n.fa-stop:before {\n  content: \"\\f04d\";\n}\n\n.fa-forward:before {\n  content: \"\\f04e\";\n}\n\n.fa-fast-forward:before {\n  content: \"\\f050\";\n}\n\n.fa-step-forward:before {\n  content: \"\\f051\";\n}\n\n.fa-eject:before {\n  content: \"\\f052\";\n}\n\n.fa-chevron-left:before {\n  content: \"\\f053\";\n}\n\n.fa-chevron-right:before {\n  content: \"\\f054\";\n}\n\n.fa-plus-circle:before {\n  content: \"\\f055\";\n}\n\n.fa-minus-circle:before {\n  content: \"\\f056\";\n}\n\n.fa-times-circle:before {\n  content: \"\\f057\";\n}\n\n.fa-check-circle:before {\n  content: \"\\f058\";\n}\n\n.fa-question-circle:before {\n  content: \"\\f059\";\n}\n\n.fa-info-circle:before {\n  content: \"\\f05a\";\n}\n\n.fa-crosshairs:before {\n  content: \"\\f05b\";\n}\n\n.fa-times-circle-o:before {\n  content: \"\\f05c\";\n}\n\n.fa-check-circle-o:before {\n  content: \"\\f05d\";\n}\n\n.fa-ban:before {\n  content: \"\\f05e\";\n}\n\n.fa-arrow-left:before {\n  content: \"\\f060\";\n}\n\n.fa-arrow-right:before {\n  content: \"\\f061\";\n}\n\n.fa-arrow-up:before {\n  content: \"\\f062\";\n}\n\n.fa-arrow-down:before {\n  content: \"\\f063\";\n}\n\n.fa-mail-forward:before,\n.fa-share:before {\n  content: \"\\f064\";\n}\n\n.fa-expand:before {\n  content: \"\\f065\";\n}\n\n.fa-compress:before {\n  content: \"\\f066\";\n}\n\n.fa-plus:before {\n  content: \"\\f067\";\n}\n\n.fa-minus:before {\n  content: \"\\f068\";\n}\n\n.fa-asterisk:before {\n  content: \"\\f069\";\n}\n\n.fa-exclamation-circle:before {\n  content: \"\\f06a\";\n}\n\n.fa-gift:before {\n  content: \"\\f06b\";\n}\n\n.fa-leaf:before {\n  content: \"\\f06c\";\n}\n\n.fa-fire:before {\n  content: \"\\f06d\";\n}\n\n.fa-eye:before {\n  content: \"\\f06e\";\n}\n\n.fa-eye-slash:before {\n  content: \"\\f070\";\n}\n\n.fa-warning:before,\n.fa-exclamation-triangle:before {\n  content: \"\\f071\";\n}\n\n.fa-plane:before {\n  content: \"\\f072\";\n}\n\n.fa-calendar:before {\n  content: \"\\f073\";\n}\n\n.fa-random:before {\n  content: \"\\f074\";\n}\n\n.fa-comment:before {\n  content: \"\\f075\";\n}\n\n.fa-magnet:before {\n  content: \"\\f076\";\n}\n\n.fa-chevron-up:before {\n  content: \"\\f077\";\n}\n\n.fa-chevron-down:before {\n  content: \"\\f078\";\n}\n\n.fa-retweet:before {\n  content: \"\\f079\";\n}\n\n.fa-shopping-cart:before {\n  content: \"\\f07a\";\n}\n\n.fa-folder:before {\n  content: \"\\f07b\";\n}\n\n.fa-folder-open:before {\n  content: \"\\f07c\";\n}\n\n.fa-arrows-v:before {\n  content: \"\\f07d\";\n}\n\n.fa-arrows-h:before {\n  content: \"\\f07e\";\n}\n\n.fa-bar-chart-o:before,\n.fa-bar-chart:before {\n  content: \"\\f080\";\n}\n\n.fa-twitter-square:before {\n  content: \"\\f081\";\n}\n\n.fa-facebook-square:before {\n  content: \"\\f082\";\n}\n\n.fa-camera-retro:before {\n  content: \"\\f083\";\n}\n\n.fa-key:before {\n  content: \"\\f084\";\n}\n\n.fa-gears:before,\n.fa-cogs:before {\n  content: \"\\f085\";\n}\n\n.fa-comments:before {\n  content: \"\\f086\";\n}\n\n.fa-thumbs-o-up:before {\n  content: \"\\f087\";\n}\n\n.fa-thumbs-o-down:before {\n  content: \"\\f088\";\n}\n\n.fa-star-half:before {\n  content: \"\\f089\";\n}\n\n.fa-heart-o:before {\n  content: \"\\f08a\";\n}\n\n.fa-sign-out:before {\n  content: \"\\f08b\";\n}\n\n.fa-linkedin-square:before {\n  content: \"\\f08c\";\n}\n\n.fa-thumb-tack:before {\n  content: \"\\f08d\";\n}\n\n.fa-external-link:before {\n  content: \"\\f08e\";\n}\n\n.fa-sign-in:before {\n  content: \"\\f090\";\n}\n\n.fa-trophy:before {\n  content: \"\\f091\";\n}\n\n.fa-github-square:before {\n  content: \"\\f092\";\n}\n\n.fa-upload:before {\n  content: \"\\f093\";\n}\n\n.fa-lemon-o:before {\n  content: \"\\f094\";\n}\n\n.fa-phone:before {\n  content: \"\\f095\";\n}\n\n.fa-square-o:before {\n  content: \"\\f096\";\n}\n\n.fa-bookmark-o:before {\n  content: \"\\f097\";\n}\n\n.fa-phone-square:before {\n  content: \"\\f098\";\n}\n\n.fa-twitter:before {\n  content: \"\\f099\";\n}\n\n.fa-facebook-f:before,\n.fa-facebook:before {\n  content: \"\\f09a\";\n}\n\n.fa-github:before {\n  content: \"\\f09b\";\n}\n\n.fa-unlock:before {\n  content: \"\\f09c\";\n}\n\n.fa-credit-card:before {\n  content: \"\\f09d\";\n}\n\n.fa-rss:before {\n  content: \"\\f09e\";\n}\n\n.fa-hdd-o:before {\n  content: \"\\f0a0\";\n}\n\n.fa-bullhorn:before {\n  content: \"\\f0a1\";\n}\n\n.fa-bell:before {\n  content: \"\\f0f3\";\n}\n\n.fa-certificate:before {\n  content: \"\\f0a3\";\n}\n\n.fa-hand-o-right:before {\n  content: \"\\f0a4\";\n}\n\n.fa-hand-o-left:before {\n  content: \"\\f0a5\";\n}\n\n.fa-hand-o-up:before {\n  content: \"\\f0a6\";\n}\n\n.fa-hand-o-down:before {\n  content: \"\\f0a7\";\n}\n\n.fa-arrow-circle-left:before {\n  content: \"\\f0a8\";\n}\n\n.fa-arrow-circle-right:before {\n  content: \"\\f0a9\";\n}\n\n.fa-arrow-circle-up:before {\n  content: \"\\f0aa\";\n}\n\n.fa-arrow-circle-down:before {\n  content: \"\\f0ab\";\n}\n\n.fa-globe:before {\n  content: \"\\f0ac\";\n}\n\n.fa-wrench:before {\n  content: \"\\f0ad\";\n}\n\n.fa-tasks:before {\n  content: \"\\f0ae\";\n}\n\n.fa-filter:before {\n  content: \"\\f0b0\";\n}\n\n.fa-briefcase:before {\n  content: \"\\f0b1\";\n}\n\n.fa-arrows-alt:before {\n  content: \"\\f0b2\";\n}\n\n.fa-group:before,\n.fa-users:before {\n  content: \"\\f0c0\";\n}\n\n.fa-chain:before,\n.fa-link:before {\n  content: \"\\f0c1\";\n}\n\n.fa-cloud:before {\n  content: \"\\f0c2\";\n}\n\n.fa-flask:before {\n  content: \"\\f0c3\";\n}\n\n.fa-cut:before,\n.fa-scissors:before {\n  content: \"\\f0c4\";\n}\n\n.fa-copy:before,\n.fa-files-o:before {\n  content: \"\\f0c5\";\n}\n\n.fa-paperclip:before {\n  content: \"\\f0c6\";\n}\n\n.fa-save:before,\n.fa-floppy-o:before {\n  content: \"\\f0c7\";\n}\n\n.fa-square:before {\n  content: \"\\f0c8\";\n}\n\n.fa-navicon:before,\n.fa-reorder:before,\n.fa-bars:before {\n  content: \"\\f0c9\";\n}\n\n.fa-list-ul:before {\n  content: \"\\f0ca\";\n}\n\n.fa-list-ol:before {\n  content: \"\\f0cb\";\n}\n\n.fa-strikethrough:before {\n  content: \"\\f0cc\";\n}\n\n.fa-underline:before {\n  content: \"\\f0cd\";\n}\n\n.fa-table:before {\n  content: \"\\f0ce\";\n}\n\n.fa-magic:before {\n  content: \"\\f0d0\";\n}\n\n.fa-truck:before {\n  content: \"\\f0d1\";\n}\n\n.fa-pinterest:before {\n  content: \"\\f0d2\";\n}\n\n.fa-pinterest-square:before {\n  content: \"\\f0d3\";\n}\n\n.fa-google-plus-square:before {\n  content: \"\\f0d4\";\n}\n\n.fa-google-plus:before {\n  content: \"\\f0d5\";\n}\n\n.fa-money:before {\n  content: \"\\f0d6\";\n}\n\n.fa-caret-down:before {\n  content: \"\\f0d7\";\n}\n\n.fa-caret-up:before {\n  content: \"\\f0d8\";\n}\n\n.fa-caret-left:before {\n  content: \"\\f0d9\";\n}\n\n.fa-caret-right:before {\n  content: \"\\f0da\";\n}\n\n.fa-columns:before {\n  content: \"\\f0db\";\n}\n\n.fa-unsorted:before,\n.fa-sort:before {\n  content: \"\\f0dc\";\n}\n\n.fa-sort-down:before,\n.fa-sort-desc:before {\n  content: \"\\f0dd\";\n}\n\n.fa-sort-up:before,\n.fa-sort-asc:before {\n  content: \"\\f0de\";\n}\n\n.fa-envelope:before {\n  content: \"\\f0e0\";\n}\n\n.fa-linkedin:before {\n  content: \"\\f0e1\";\n}\n\n.fa-rotate-left:before,\n.fa-undo:before {\n  content: \"\\f0e2\";\n}\n\n.fa-legal:before,\n.fa-gavel:before {\n  content: \"\\f0e3\";\n}\n\n.fa-dashboard:before,\n.fa-tachometer:before {\n  content: \"\\f0e4\";\n}\n\n.fa-comment-o:before {\n  content: \"\\f0e5\";\n}\n\n.fa-comments-o:before {\n  content: \"\\f0e6\";\n}\n\n.fa-flash:before,\n.fa-bolt:before {\n  content: \"\\f0e7\";\n}\n\n.fa-sitemap:before {\n  content: \"\\f0e8\";\n}\n\n.fa-umbrella:before {\n  content: \"\\f0e9\";\n}\n\n.fa-paste:before,\n.fa-clipboard:before {\n  content: \"\\f0ea\";\n}\n\n.fa-lightbulb-o:before {\n  content: \"\\f0eb\";\n}\n\n.fa-exchange:before {\n  content: \"\\f0ec\";\n}\n\n.fa-cloud-download:before {\n  content: \"\\f0ed\";\n}\n\n.fa-cloud-upload:before {\n  content: \"\\f0ee\";\n}\n\n.fa-user-md:before {\n  content: \"\\f0f0\";\n}\n\n.fa-stethoscope:before {\n  content: \"\\f0f1\";\n}\n\n.fa-suitcase:before {\n  content: \"\\f0f2\";\n}\n\n.fa-bell-o:before {\n  content: \"\\f0a2\";\n}\n\n.fa-coffee:before {\n  content: \"\\f0f4\";\n}\n\n.fa-cutlery:before {\n  content: \"\\f0f5\";\n}\n\n.fa-file-text-o:before {\n  content: \"\\f0f6\";\n}\n\n.fa-building-o:before {\n  content: \"\\f0f7\";\n}\n\n.fa-hospital-o:before {\n  content: \"\\f0f8\";\n}\n\n.fa-ambulance:before {\n  content: \"\\f0f9\";\n}\n\n.fa-medkit:before {\n  content: \"\\f0fa\";\n}\n\n.fa-fighter-jet:before {\n  content: \"\\f0fb\";\n}\n\n.fa-beer:before {\n  content: \"\\f0fc\";\n}\n\n.fa-h-square:before {\n  content: \"\\f0fd\";\n}\n\n.fa-plus-square:before {\n  content: \"\\f0fe\";\n}\n\n.fa-angle-double-left:before {\n  content: \"\\f100\";\n}\n\n.fa-angle-double-right:before {\n  content: \"\\f101\";\n}\n\n.fa-angle-double-up:before {\n  content: \"\\f102\";\n}\n\n.fa-angle-double-down:before {\n  content: \"\\f103\";\n}\n\n.fa-angle-left:before {\n  content: \"\\f104\";\n}\n\n.fa-angle-right:before {\n  content: \"\\f105\";\n}\n\n.fa-angle-up:before {\n  content: \"\\f106\";\n}\n\n.fa-angle-down:before {\n  content: \"\\f107\";\n}\n\n.fa-desktop:before {\n  content: \"\\f108\";\n}\n\n.fa-laptop:before {\n  content: \"\\f109\";\n}\n\n.fa-tablet:before {\n  content: \"\\f10a\";\n}\n\n.fa-mobile-phone:before,\n.fa-mobile:before {\n  content: \"\\f10b\";\n}\n\n.fa-circle-o:before {\n  content: \"\\f10c\";\n}\n\n.fa-quote-left:before {\n  content: \"\\f10d\";\n}\n\n.fa-quote-right:before {\n  content: \"\\f10e\";\n}\n\n.fa-spinner:before {\n  content: \"\\f110\";\n}\n\n.fa-circle:before {\n  content: \"\\f111\";\n}\n\n.fa-mail-reply:before,\n.fa-reply:before {\n  content: \"\\f112\";\n}\n\n.fa-github-alt:before {\n  content: \"\\f113\";\n}\n\n.fa-folder-o:before {\n  content: \"\\f114\";\n}\n\n.fa-folder-open-o:before {\n  content: \"\\f115\";\n}\n\n.fa-smile-o:before {\n  content: \"\\f118\";\n}\n\n.fa-frown-o:before {\n  content: \"\\f119\";\n}\n\n.fa-meh-o:before {\n  content: \"\\f11a\";\n}\n\n.fa-gamepad:before {\n  content: \"\\f11b\";\n}\n\n.fa-keyboard-o:before {\n  content: \"\\f11c\";\n}\n\n.fa-flag-o:before {\n  content: \"\\f11d\";\n}\n\n.fa-flag-checkered:before {\n  content: \"\\f11e\";\n}\n\n.fa-terminal:before {\n  content: \"\\f120\";\n}\n\n.fa-code:before {\n  content: \"\\f121\";\n}\n\n.fa-mail-reply-all:before,\n.fa-reply-all:before {\n  content: \"\\f122\";\n}\n\n.fa-star-half-empty:before,\n.fa-star-half-full:before,\n.fa-star-half-o:before {\n  content: \"\\f123\";\n}\n\n.fa-location-arrow:before {\n  content: \"\\f124\";\n}\n\n.fa-crop:before {\n  content: \"\\f125\";\n}\n\n.fa-code-fork:before {\n  content: \"\\f126\";\n}\n\n.fa-unlink:before,\n.fa-chain-broken:before {\n  content: \"\\f127\";\n}\n\n.fa-question:before {\n  content: \"\\f128\";\n}\n\n.fa-info:before {\n  content: \"\\f129\";\n}\n\n.fa-exclamation:before {\n  content: \"\\f12a\";\n}\n\n.fa-superscript:before {\n  content: \"\\f12b\";\n}\n\n.fa-subscript:before {\n  content: \"\\f12c\";\n}\n\n.fa-eraser:before {\n  content: \"\\f12d\";\n}\n\n.fa-puzzle-piece:before {\n  content: \"\\f12e\";\n}\n\n.fa-microphone:before {\n  content: \"\\f130\";\n}\n\n.fa-microphone-slash:before {\n  content: \"\\f131\";\n}\n\n.fa-shield:before {\n  content: \"\\f132\";\n}\n\n.fa-calendar-o:before {\n  content: \"\\f133\";\n}\n\n.fa-fire-extinguisher:before {\n  content: \"\\f134\";\n}\n\n.fa-rocket:before {\n  content: \"\\f135\";\n}\n\n.fa-maxcdn:before {\n  content: \"\\f136\";\n}\n\n.fa-chevron-circle-left:before {\n  content: \"\\f137\";\n}\n\n.fa-chevron-circle-right:before {\n  content: \"\\f138\";\n}\n\n.fa-chevron-circle-up:before {\n  content: \"\\f139\";\n}\n\n.fa-chevron-circle-down:before {\n  content: \"\\f13a\";\n}\n\n.fa-html5:before {\n  content: \"\\f13b\";\n}\n\n.fa-css3:before {\n  content: \"\\f13c\";\n}\n\n.fa-anchor:before {\n  content: \"\\f13d\";\n}\n\n.fa-unlock-alt:before {\n  content: \"\\f13e\";\n}\n\n.fa-bullseye:before {\n  content: \"\\f140\";\n}\n\n.fa-ellipsis-h:before {\n  content: \"\\f141\";\n}\n\n.fa-ellipsis-v:before {\n  content: \"\\f142\";\n}\n\n.fa-rss-square:before {\n  content: \"\\f143\";\n}\n\n.fa-play-circle:before {\n  content: \"\\f144\";\n}\n\n.fa-ticket:before {\n  content: \"\\f145\";\n}\n\n.fa-minus-square:before {\n  content: \"\\f146\";\n}\n\n.fa-minus-square-o:before {\n  content: \"\\f147\";\n}\n\n.fa-level-up:before {\n  content: \"\\f148\";\n}\n\n.fa-level-down:before {\n  content: \"\\f149\";\n}\n\n.fa-check-square:before {\n  content: \"\\f14a\";\n}\n\n.fa-pencil-square:before {\n  content: \"\\f14b\";\n}\n\n.fa-external-link-square:before {\n  content: \"\\f14c\";\n}\n\n.fa-share-square:before {\n  content: \"\\f14d\";\n}\n\n.fa-compass:before {\n  content: \"\\f14e\";\n}\n\n.fa-toggle-down:before,\n.fa-caret-square-o-down:before {\n  content: \"\\f150\";\n}\n\n.fa-toggle-up:before,\n.fa-caret-square-o-up:before {\n  content: \"\\f151\";\n}\n\n.fa-toggle-right:before,\n.fa-caret-square-o-right:before {\n  content: \"\\f152\";\n}\n\n.fa-euro:before,\n.fa-eur:before {\n  content: \"\\f153\";\n}\n\n.fa-gbp:before {\n  content: \"\\f154\";\n}\n\n.fa-dollar:before,\n.fa-usd:before {\n  content: \"\\f155\";\n}\n\n.fa-rupee:before,\n.fa-inr:before {\n  content: \"\\f156\";\n}\n\n.fa-cny:before,\n.fa-rmb:before,\n.fa-yen:before,\n.fa-jpy:before {\n  content: \"\\f157\";\n}\n\n.fa-ruble:before,\n.fa-rouble:before,\n.fa-rub:before {\n  content: \"\\f158\";\n}\n\n.fa-won:before,\n.fa-krw:before {\n  content: \"\\f159\";\n}\n\n.fa-bitcoin:before,\n.fa-btc:before {\n  content: \"\\f15a\";\n}\n\n.fa-file:before {\n  content: \"\\f15b\";\n}\n\n.fa-file-text:before {\n  content: \"\\f15c\";\n}\n\n.fa-sort-alpha-asc:before {\n  content: \"\\f15d\";\n}\n\n.fa-sort-alpha-desc:before {\n  content: \"\\f15e\";\n}\n\n.fa-sort-amount-asc:before {\n  content: \"\\f160\";\n}\n\n.fa-sort-amount-desc:before {\n  content: \"\\f161\";\n}\n\n.fa-sort-numeric-asc:before {\n  content: \"\\f162\";\n}\n\n.fa-sort-numeric-desc:before {\n  content: \"\\f163\";\n}\n\n.fa-thumbs-up:before {\n  content: \"\\f164\";\n}\n\n.fa-thumbs-down:before {\n  content: \"\\f165\";\n}\n\n.fa-youtube-square:before {\n  content: \"\\f166\";\n}\n\n.fa-youtube:before {\n  content: \"\\f167\";\n}\n\n.fa-xing:before {\n  content: \"\\f168\";\n}\n\n.fa-xing-square:before {\n  content: \"\\f169\";\n}\n\n.fa-youtube-play:before {\n  content: \"\\f16a\";\n}\n\n.fa-dropbox:before {\n  content: \"\\f16b\";\n}\n\n.fa-stack-overflow:before {\n  content: \"\\f16c\";\n}\n\n.fa-instagram:before {\n  content: \"\\f16d\";\n}\n\n.fa-flickr:before {\n  content: \"\\f16e\";\n}\n\n.fa-adn:before {\n  content: \"\\f170\";\n}\n\n.fa-bitbucket:before {\n  content: \"\\f171\";\n}\n\n.fa-bitbucket-square:before {\n  content: \"\\f172\";\n}\n\n.fa-tumblr:before {\n  content: \"\\f173\";\n}\n\n.fa-tumblr-square:before {\n  content: \"\\f174\";\n}\n\n.fa-long-arrow-down:before {\n  content: \"\\f175\";\n}\n\n.fa-long-arrow-up:before {\n  content: \"\\f176\";\n}\n\n.fa-long-arrow-left:before {\n  content: \"\\f177\";\n}\n\n.fa-long-arrow-right:before {\n  content: \"\\f178\";\n}\n\n.fa-apple:before {\n  content: \"\\f179\";\n}\n\n.fa-windows:before {\n  content: \"\\f17a\";\n}\n\n.fa-android:before {\n  content: \"\\f17b\";\n}\n\n.fa-linux:before {\n  content: \"\\f17c\";\n}\n\n.fa-dribbble:before {\n  content: \"\\f17d\";\n}\n\n.fa-skype:before {\n  content: \"\\f17e\";\n}\n\n.fa-foursquare:before {\n  content: \"\\f180\";\n}\n\n.fa-trello:before {\n  content: \"\\f181\";\n}\n\n.fa-female:before {\n  content: \"\\f182\";\n}\n\n.fa-male:before {\n  content: \"\\f183\";\n}\n\n.fa-gittip:before,\n.fa-gratipay:before {\n  content: \"\\f184\";\n}\n\n.fa-sun-o:before {\n  content: \"\\f185\";\n}\n\n.fa-moon-o:before {\n  content: \"\\f186\";\n}\n\n.fa-archive:before {\n  content: \"\\f187\";\n}\n\n.fa-bug:before {\n  content: \"\\f188\";\n}\n\n.fa-vk:before {\n  content: \"\\f189\";\n}\n\n.fa-weibo:before {\n  content: \"\\f18a\";\n}\n\n.fa-renren:before {\n  content: \"\\f18b\";\n}\n\n.fa-pagelines:before {\n  content: \"\\f18c\";\n}\n\n.fa-stack-exchange:before {\n  content: \"\\f18d\";\n}\n\n.fa-arrow-circle-o-right:before {\n  content: \"\\f18e\";\n}\n\n.fa-arrow-circle-o-left:before {\n  content: \"\\f190\";\n}\n\n.fa-toggle-left:before,\n.fa-caret-square-o-left:before {\n  content: \"\\f191\";\n}\n\n.fa-dot-circle-o:before {\n  content: \"\\f192\";\n}\n\n.fa-wheelchair:before {\n  content: \"\\f193\";\n}\n\n.fa-vimeo-square:before {\n  content: \"\\f194\";\n}\n\n.fa-turkish-lira:before,\n.fa-try:before {\n  content: \"\\f195\";\n}\n\n.fa-plus-square-o:before {\n  content: \"\\f196\";\n}\n\n.fa-space-shuttle:before {\n  content: \"\\f197\";\n}\n\n.fa-slack:before {\n  content: \"\\f198\";\n}\n\n.fa-envelope-square:before {\n  content: \"\\f199\";\n}\n\n.fa-wordpress:before {\n  content: \"\\f19a\";\n}\n\n.fa-openid:before {\n  content: \"\\f19b\";\n}\n\n.fa-institution:before,\n.fa-bank:before,\n.fa-university:before {\n  content: \"\\f19c\";\n}\n\n.fa-mortar-board:before,\n.fa-graduation-cap:before {\n  content: \"\\f19d\";\n}\n\n.fa-yahoo:before {\n  content: \"\\f19e\";\n}\n\n.fa-google:before {\n  content: \"\\f1a0\";\n}\n\n.fa-reddit:before {\n  content: \"\\f1a1\";\n}\n\n.fa-reddit-square:before {\n  content: \"\\f1a2\";\n}\n\n.fa-stumbleupon-circle:before {\n  content: \"\\f1a3\";\n}\n\n.fa-stumbleupon:before {\n  content: \"\\f1a4\";\n}\n\n.fa-delicious:before {\n  content: \"\\f1a5\";\n}\n\n.fa-digg:before {\n  content: \"\\f1a6\";\n}\n\n.fa-pied-piper:before {\n  content: \"\\f1a7\";\n}\n\n.fa-pied-piper-alt:before {\n  content: \"\\f1a8\";\n}\n\n.fa-drupal:before {\n  content: \"\\f1a9\";\n}\n\n.fa-joomla:before {\n  content: \"\\f1aa\";\n}\n\n.fa-language:before {\n  content: \"\\f1ab\";\n}\n\n.fa-fax:before {\n  content: \"\\f1ac\";\n}\n\n.fa-building:before {\n  content: \"\\f1ad\";\n}\n\n.fa-child:before {\n  content: \"\\f1ae\";\n}\n\n.fa-paw:before {\n  content: \"\\f1b0\";\n}\n\n.fa-spoon:before {\n  content: \"\\f1b1\";\n}\n\n.fa-cube:before {\n  content: \"\\f1b2\";\n}\n\n.fa-cubes:before {\n  content: \"\\f1b3\";\n}\n\n.fa-behance:before {\n  content: \"\\f1b4\";\n}\n\n.fa-behance-square:before {\n  content: \"\\f1b5\";\n}\n\n.fa-steam:before {\n  content: \"\\f1b6\";\n}\n\n.fa-steam-square:before {\n  content: \"\\f1b7\";\n}\n\n.fa-recycle:before {\n  content: \"\\f1b8\";\n}\n\n.fa-automobile:before,\n.fa-car:before {\n  content: \"\\f1b9\";\n}\n\n.fa-cab:before,\n.fa-taxi:before {\n  content: \"\\f1ba\";\n}\n\n.fa-tree:before {\n  content: \"\\f1bb\";\n}\n\n.fa-spotify:before {\n  content: \"\\f1bc\";\n}\n\n.fa-deviantart:before {\n  content: \"\\f1bd\";\n}\n\n.fa-soundcloud:before {\n  content: \"\\f1be\";\n}\n\n.fa-database:before {\n  content: \"\\f1c0\";\n}\n\n.fa-file-pdf-o:before {\n  content: \"\\f1c1\";\n}\n\n.fa-file-word-o:before {\n  content: \"\\f1c2\";\n}\n\n.fa-file-excel-o:before {\n  content: \"\\f1c3\";\n}\n\n.fa-file-powerpoint-o:before {\n  content: \"\\f1c4\";\n}\n\n.fa-file-photo-o:before,\n.fa-file-picture-o:before,\n.fa-file-image-o:before {\n  content: \"\\f1c5\";\n}\n\n.fa-file-zip-o:before,\n.fa-file-archive-o:before {\n  content: \"\\f1c6\";\n}\n\n.fa-file-sound-o:before,\n.fa-file-audio-o:before {\n  content: \"\\f1c7\";\n}\n\n.fa-file-movie-o:before,\n.fa-file-video-o:before {\n  content: \"\\f1c8\";\n}\n\n.fa-file-code-o:before {\n  content: \"\\f1c9\";\n}\n\n.fa-vine:before {\n  content: \"\\f1ca\";\n}\n\n.fa-codepen:before {\n  content: \"\\f1cb\";\n}\n\n.fa-jsfiddle:before {\n  content: \"\\f1cc\";\n}\n\n.fa-life-bouy:before,\n.fa-life-buoy:before,\n.fa-life-saver:before,\n.fa-support:before,\n.fa-life-ring:before {\n  content: \"\\f1cd\";\n}\n\n.fa-circle-o-notch:before {\n  content: \"\\f1ce\";\n}\n\n.fa-ra:before,\n.fa-rebel:before {\n  content: \"\\f1d0\";\n}\n\n.fa-ge:before,\n.fa-empire:before {\n  content: \"\\f1d1\";\n}\n\n.fa-git-square:before {\n  content: \"\\f1d2\";\n}\n\n.fa-git:before {\n  content: \"\\f1d3\";\n}\n\n.fa-hacker-news:before {\n  content: \"\\f1d4\";\n}\n\n.fa-tencent-weibo:before {\n  content: \"\\f1d5\";\n}\n\n.fa-qq:before {\n  content: \"\\f1d6\";\n}\n\n.fa-wechat:before,\n.fa-weixin:before {\n  content: \"\\f1d7\";\n}\n\n.fa-send:before,\n.fa-paper-plane:before {\n  content: \"\\f1d8\";\n}\n\n.fa-send-o:before,\n.fa-paper-plane-o:before {\n  content: \"\\f1d9\";\n}\n\n.fa-history:before {\n  content: \"\\f1da\";\n}\n\n.fa-genderless:before,\n.fa-circle-thin:before {\n  content: \"\\f1db\";\n}\n\n.fa-header:before {\n  content: \"\\f1dc\";\n}\n\n.fa-paragraph:before {\n  content: \"\\f1dd\";\n}\n\n.fa-sliders:before {\n  content: \"\\f1de\";\n}\n\n.fa-share-alt:before {\n  content: \"\\f1e0\";\n}\n\n.fa-share-alt-square:before {\n  content: \"\\f1e1\";\n}\n\n.fa-bomb:before {\n  content: \"\\f1e2\";\n}\n\n.fa-soccer-ball-o:before,\n.fa-futbol-o:before {\n  content: \"\\f1e3\";\n}\n\n.fa-tty:before {\n  content: \"\\f1e4\";\n}\n\n.fa-binoculars:before {\n  content: \"\\f1e5\";\n}\n\n.fa-plug:before {\n  content: \"\\f1e6\";\n}\n\n.fa-slideshare:before {\n  content: \"\\f1e7\";\n}\n\n.fa-twitch:before {\n  content: \"\\f1e8\";\n}\n\n.fa-yelp:before {\n  content: \"\\f1e9\";\n}\n\n.fa-newspaper-o:before {\n  content: \"\\f1ea\";\n}\n\n.fa-wifi:before {\n  content: \"\\f1eb\";\n}\n\n.fa-calculator:before {\n  content: \"\\f1ec\";\n}\n\n.fa-paypal:before {\n  content: \"\\f1ed\";\n}\n\n.fa-google-wallet:before {\n  content: \"\\f1ee\";\n}\n\n.fa-cc-visa:before {\n  content: \"\\f1f0\";\n}\n\n.fa-cc-mastercard:before {\n  content: \"\\f1f1\";\n}\n\n.fa-cc-discover:before {\n  content: \"\\f1f2\";\n}\n\n.fa-cc-amex:before {\n  content: \"\\f1f3\";\n}\n\n.fa-cc-paypal:before {\n  content: \"\\f1f4\";\n}\n\n.fa-cc-stripe:before {\n  content: \"\\f1f5\";\n}\n\n.fa-bell-slash:before {\n  content: \"\\f1f6\";\n}\n\n.fa-bell-slash-o:before {\n  content: \"\\f1f7\";\n}\n\n.fa-trash:before {\n  content: \"\\f1f8\";\n}\n\n.fa-copyright:before {\n  content: \"\\f1f9\";\n}\n\n.fa-at:before {\n  content: \"\\f1fa\";\n}\n\n.fa-eyedropper:before {\n  content: \"\\f1fb\";\n}\n\n.fa-paint-brush:before {\n  content: \"\\f1fc\";\n}\n\n.fa-birthday-cake:before {\n  content: \"\\f1fd\";\n}\n\n.fa-area-chart:before {\n  content: \"\\f1fe\";\n}\n\n.fa-pie-chart:before {\n  content: \"\\f200\";\n}\n\n.fa-line-chart:before {\n  content: \"\\f201\";\n}\n\n.fa-lastfm:before {\n  content: \"\\f202\";\n}\n\n.fa-lastfm-square:before {\n  content: \"\\f203\";\n}\n\n.fa-toggle-off:before {\n  content: \"\\f204\";\n}\n\n.fa-toggle-on:before {\n  content: \"\\f205\";\n}\n\n.fa-bicycle:before {\n  content: \"\\f206\";\n}\n\n.fa-bus:before {\n  content: \"\\f207\";\n}\n\n.fa-ioxhost:before {\n  content: \"\\f208\";\n}\n\n.fa-angellist:before {\n  content: \"\\f209\";\n}\n\n.fa-cc:before {\n  content: \"\\f20a\";\n}\n\n.fa-shekel:before,\n.fa-sheqel:before,\n.fa-ils:before {\n  content: \"\\f20b\";\n}\n\n.fa-meanpath:before {\n  content: \"\\f20c\";\n}\n\n.fa-buysellads:before {\n  content: \"\\f20d\";\n}\n\n.fa-connectdevelop:before {\n  content: \"\\f20e\";\n}\n\n.fa-dashcube:before {\n  content: \"\\f210\";\n}\n\n.fa-forumbee:before {\n  content: \"\\f211\";\n}\n\n.fa-leanpub:before {\n  content: \"\\f212\";\n}\n\n.fa-sellsy:before {\n  content: \"\\f213\";\n}\n\n.fa-shirtsinbulk:before {\n  content: \"\\f214\";\n}\n\n.fa-simplybuilt:before {\n  content: \"\\f215\";\n}\n\n.fa-skyatlas:before {\n  content: \"\\f216\";\n}\n\n.fa-cart-plus:before {\n  content: \"\\f217\";\n}\n\n.fa-cart-arrow-down:before {\n  content: \"\\f218\";\n}\n\n.fa-diamond:before {\n  content: \"\\f219\";\n}\n\n.fa-ship:before {\n  content: \"\\f21a\";\n}\n\n.fa-user-secret:before {\n  content: \"\\f21b\";\n}\n\n.fa-motorcycle:before {\n  content: \"\\f21c\";\n}\n\n.fa-street-view:before {\n  content: \"\\f21d\";\n}\n\n.fa-heartbeat:before {\n  content: \"\\f21e\";\n}\n\n.fa-venus:before {\n  content: \"\\f221\";\n}\n\n.fa-mars:before {\n  content: \"\\f222\";\n}\n\n.fa-mercury:before {\n  content: \"\\f223\";\n}\n\n.fa-transgender:before {\n  content: \"\\f224\";\n}\n\n.fa-transgender-alt:before {\n  content: \"\\f225\";\n}\n\n.fa-venus-double:before {\n  content: \"\\f226\";\n}\n\n.fa-mars-double:before {\n  content: \"\\f227\";\n}\n\n.fa-venus-mars:before {\n  content: \"\\f228\";\n}\n\n.fa-mars-stroke:before {\n  content: \"\\f229\";\n}\n\n.fa-mars-stroke-v:before {\n  content: \"\\f22a\";\n}\n\n.fa-mars-stroke-h:before {\n  content: \"\\f22b\";\n}\n\n.fa-neuter:before {\n  content: \"\\f22c\";\n}\n\n.fa-facebook-official:before {\n  content: \"\\f230\";\n}\n\n.fa-pinterest-p:before {\n  content: \"\\f231\";\n}\n\n.fa-whatsapp:before {\n  content: \"\\f232\";\n}\n\n.fa-server:before {\n  content: \"\\f233\";\n}\n\n.fa-user-plus:before {\n  content: \"\\f234\";\n}\n\n.fa-user-times:before {\n  content: \"\\f235\";\n}\n\n.fa-hotel:before,\n.fa-bed:before {\n  content: \"\\f236\";\n}\n\n.fa-viacoin:before {\n  content: \"\\f237\";\n}\n\n.fa-train:before {\n  content: \"\\f238\";\n}\n\n.fa-subway:before {\n  content: \"\\f239\";\n}\n\n.fa-medium:before {\n  content: \"\\f23a\";\n}\n\n/*! prefixes.scss v0.1.0 | Author: Pandao | https://github.com/pandao/prefixes.scss | MIT license | Copyright (c) 2015 */\n@font-face {\n  font-family: 'editormd-logo';\n  src: url(\"../fonts/editormd-logo.eot?-5y8q6h\");\n  src: url(\".../fonts/editormd-logo.eot?#iefix-5y8q6h\") format(\"embedded-opentype\"), url(\"../fonts/editormd-logo.woff?-5y8q6h\") format(\"woff\"), url(\"../fonts/editormd-logo.ttf?-5y8q6h\") format(\"truetype\"), url(\"../fonts/editormd-logo.svg?-5y8q6h#icomoon\") format(\"svg\");\n  font-weight: normal;\n  font-style: normal;\n}\n.editormd-logo,\n.editormd-logo-1x,\n.editormd-logo-2x,\n.editormd-logo-3x,\n.editormd-logo-4x,\n.editormd-logo-5x,\n.editormd-logo-6x,\n.editormd-logo-7x,\n.editormd-logo-8x {\n  font-family: 'editormd-logo';\n  speak: none;\n  font-style: normal;\n  font-weight: normal;\n  font-variant: normal;\n  text-transform: none;\n  font-size: inherit;\n  line-height: 1;\n  display: inline-block;\n  text-rendering: auto;\n  vertical-align: inherit;\n  -webkit-font-smoothing: antialiased;\n  -moz-osx-font-smoothing: grayscale;\n}\n.editormd-logo:before,\n.editormd-logo-1x:before,\n.editormd-logo-2x:before,\n.editormd-logo-3x:before,\n.editormd-logo-4x:before,\n.editormd-logo-5x:before,\n.editormd-logo-6x:before,\n.editormd-logo-7x:before,\n.editormd-logo-8x:before {\n  content: \"\\e1987\";\n  /* \n  HTML Entity &#xe1987; \n  example: <span class=\"editormd-logo\">&#xe1987;</span>\n  */\n}\n\n.editormd-logo-1x {\n  font-size: 1em;\n}\n\n.editormd-logo-lg {\n  font-size: 1.2em;\n}\n\n.editormd-logo-2x {\n  font-size: 2em;\n}\n\n.editormd-logo-3x {\n  font-size: 3em;\n}\n\n.editormd-logo-4x {\n  font-size: 4em;\n}\n\n.editormd-logo-5x {\n  font-size: 5em;\n}\n\n.editormd-logo-6x {\n  font-size: 6em;\n}\n\n.editormd-logo-7x {\n  font-size: 7em;\n}\n\n.editormd-logo-8x {\n  font-size: 8em;\n}\n\n.editormd-logo-color {\n  color: #2196F3;\n}\n\n/*! github-markdown-css | The MIT License (MIT) | Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com) | https://github.com/sindresorhus/github-markdown-css */\n@font-face {\n  font-family: octicons-anchor;\n  src: url(data:font/woff;charset=utf-8;base64,d09GRgABAAAAAAYcAA0AAAAACjQAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABGRlRNAAABMAAAABwAAAAca8vGTk9TLzIAAAFMAAAARAAAAFZG1VHVY21hcAAAAZAAAAA+AAABQgAP9AdjdnQgAAAB0AAAAAQAAAAEACICiGdhc3AAAAHUAAAACAAAAAj//wADZ2x5ZgAAAdwAAADRAAABEKyikaNoZWFkAAACsAAAAC0AAAA2AtXoA2hoZWEAAALgAAAAHAAAACQHngNFaG10eAAAAvwAAAAQAAAAEAwAACJsb2NhAAADDAAAAAoAAAAKALIAVG1heHAAAAMYAAAAHwAAACABEAB2bmFtZQAAAzgAAALBAAAFu3I9x/Nwb3N0AAAF/AAAAB0AAAAvaoFvbwAAAAEAAAAAzBdyYwAAAADP2IQvAAAAAM/bz7t4nGNgZGFgnMDAysDB1Ml0hoGBoR9CM75mMGLkYGBgYmBlZsAKAtJcUxgcPsR8iGF2+O/AEMPsznAYKMwIkgMA5REMOXicY2BgYGaAYBkGRgYQsAHyGMF8FgYFIM0ChED+h5j//yEk/3KoSgZGNgYYk4GRCUgwMaACRoZhDwCs7QgGAAAAIgKIAAAAAf//AAJ4nHWMMQrCQBBF/0zWrCCIKUQsTDCL2EXMohYGSSmorScInsRGL2DOYJe0Ntp7BK+gJ1BxF1stZvjz/v8DRghQzEc4kIgKwiAppcA9LtzKLSkdNhKFY3HF4lK69ExKslx7Xa+vPRVS43G98vG1DnkDMIBUgFN0MDXflU8tbaZOUkXUH0+U27RoRpOIyCKjbMCVejwypzJJG4jIwb43rfl6wbwanocrJm9XFYfskuVC5K/TPyczNU7b84CXcbxks1Un6H6tLH9vf2LRnn8Ax7A5WQAAAHicY2BkYGAA4teL1+yI57f5ysDNwgAC529f0kOmWRiYVgEpDgYmEA8AUzEKsQAAAHicY2BkYGB2+O/AEMPCAAJAkpEBFbAAADgKAe0EAAAiAAAAAAQAAAAEAAAAAAAAKgAqACoAiAAAeJxjYGRgYGBhsGFgYgABEMkFhAwM/xn0QAIAD6YBhwB4nI1Ty07cMBS9QwKlQapQW3VXySvEqDCZGbGaHULiIQ1FKgjWMxknMfLEke2A+IJu+wntrt/QbVf9gG75jK577Lg8K1qQPCfnnnt8fX1NRC/pmjrk/zprC+8D7tBy9DHgBXoWfQ44Av8t4Bj4Z8CLtBL9CniJluPXASf0Lm4CXqFX8Q84dOLnMB17N4c7tBo1AS/Qi+hTwBH4rwHHwN8DXqQ30XXAS7QaLwSc0Gn8NuAVWou/gFmnjLrEaEh9GmDdDGgL3B4JsrRPDU2hTOiMSuJUIdKQQayiAth69r6akSSFqIJuA19TrzCIaY8sIoxyrNIrL//pw7A2iMygkX5vDj+G+kuoLdX4GlGK/8Lnlz6/h9MpmoO9rafrz7ILXEHHaAx95s9lsI7AHNMBWEZHULnfAXwG9/ZqdzLI08iuwRloXE8kfhXYAvE23+23DU3t626rbs8/8adv+9DWknsHp3E17oCf+Z48rvEQNZ78paYM38qfk3v/u3l3u3GXN2Dmvmvpf1Srwk3pB/VSsp512bA/GG5i2WJ7wu430yQ5K3nFGiOqgtmSB5pJVSizwaacmUZzZhXLlZTq8qGGFY2YcSkqbth6aW1tRmlaCFs2016m5qn36SbJrqosG4uMV4aP2PHBmB3tjtmgN2izkGQyLWprekbIntJFing32a5rKWCN/SdSoga45EJykyQ7asZvHQ8PTm6cslIpwyeyjbVltNikc2HTR7YKh9LBl9DADC0U/jLcBZDKrMhUBfQBvXRzLtFtjU9eNHKin0x5InTqb8lNpfKv1s1xHzTXRqgKzek/mb7nB8RZTCDhGEX3kK/8Q75AmUM/eLkfA+0Hi908Kx4eNsMgudg5GLdRD7a84npi+YxNr5i5KIbW5izXas7cHXIMAau1OueZhfj+cOcP3P8MNIWLyYOBuxL6DRylJ4cAAAB4nGNgYoAALjDJyIAOWMCiTIxMLDmZedkABtIBygAAAA==) format(\"woff\");\n}\n.markdown-body {\n  -ms-text-size-adjust: 100%;\n  -webkit-text-size-adjust: 100%;\n  color: #333;\n  overflow: hidden;\n  font-family: \"Microsoft YaHei\", Helvetica, \"Meiryo UI\", \"Malgun Gothic\", \"Segoe UI\", \"Trebuchet MS\", \"Monaco\", monospace, Tahoma, STXihei, \"华文细黑\", STHeiti, \"Helvetica Neue\", \"Droid Sans\", \"wenquanyi micro hei\", FreeSans, Arimo, Arial, SimSun, \"宋体\", Heiti, \"黑体\", sans-serif;\n  font-size: 16px;\n  line-height: 1.6;\n  word-wrap: break-word;\n}\n\n.markdown-body a {\n  background: transparent;\n}\n\n.markdown-body a:active,\n.markdown-body a:hover {\n  outline: 0;\n}\n\n.markdown-body strong {\n  font-weight: bold;\n}\n\n.markdown-body h1 {\n  font-size: 2em;\n  margin: 0.67em 0;\n}\n\n.markdown-body img {\n  border: 0;\n}\n\n.markdown-body hr {\n  -moz-box-sizing: content-box;\n  box-sizing: content-box;\n  height: 0;\n}\n\n.markdown-body pre {\n  overflow: auto;\n}\n\n.markdown-body code,\n.markdown-body kbd,\n.markdown-body pre {\n  font-family: \"Meiryo UI\", \"YaHei Consolas Hybrid\", Consolas, \"Malgun Gothic\", \"Segoe UI\", \"Trebuchet MS\", Helvetica, monospace, monospace;\n  font-size: 1em;\n}\n\n.markdown-body input {\n  color: inherit;\n  font: inherit;\n  margin: 0;\n}\n\n.markdown-body html input[disabled] {\n  cursor: default;\n}\n\n.markdown-body input {\n  line-height: normal;\n}\n\n.markdown-body input[type=\"checkbox\"] {\n  -moz-box-sizing: border-box;\n  box-sizing: border-box;\n  padding: 0;\n}\n\n.markdown-body table {\n  border-collapse: collapse;\n  border-spacing: 0;\n}\n\n.markdown-body td,\n.markdown-body th {\n  padding: 0;\n}\n\n.markdown-body * {\n  -moz-box-sizing: border-box;\n  box-sizing: border-box;\n}\n\n.markdown-body input {\n  font: 13px/1.4 Helvetica, arial, freesans, clean, sans-serif, \"Segoe UI Emoji\", \"Segoe UI Symbol\";\n}\n\n.markdown-body a {\n  color: #08c;\n  text-decoration: none;\n}\n\n.markdown-body a:hover,\n.markdown-body a:active {\n  text-decoration: underline;\n}\n\n.markdown-body hr {\n  height: 0;\n  margin: 15px 0;\n  overflow: hidden;\n  background: transparent;\n  border: 0;\n  border-bottom: 1px solid #ddd;\n}\n\n.markdown-body hr:before {\n  display: table;\n  content: \"\";\n}\n\n.markdown-body hr:after {\n  display: table;\n  clear: both;\n  content: \"\";\n}\n\n.markdown-body h1,\n.markdown-body h2,\n.markdown-body h3,\n.markdown-body h4,\n.markdown-body h5,\n.markdown-body h6 {\n  margin-top: 15px;\n  margin-bottom: 15px;\n  line-height: 1.1;\n}\n\n.markdown-body h1 {\n  font-size: 30px;\n}\n\n.markdown-body h2 {\n  font-size: 21px;\n}\n\n.markdown-body h3 {\n  font-size: 16px;\n}\n\n.markdown-body h4 {\n  font-size: 14px;\n}\n\n.markdown-body h5 {\n  font-size: 12px;\n}\n\n.markdown-body h6 {\n  font-size: 11px;\n}\n\n.markdown-body blockquote {\n  margin: 0;\n}\n\n.markdown-body ul,\n.markdown-body ol {\n  padding: 0;\n  margin-top: 0;\n  margin-bottom: 0;\n}\n\n.markdown-body ol ol,\n.markdown-body ul ol {\n  list-style-type: lower-roman;\n}\n\n.markdown-body ul ul ol,\n.markdown-body ul ol ol,\n.markdown-body ol ul ol,\n.markdown-body ol ol ol {\n  list-style-type: lower-alpha;\n}\n\n.markdown-body dd {\n  margin-left: 0;\n}\n\n.markdown-body code {\n  font-family: Consolas, \"Liberation Mono\", Menlo, Courier, monospace;\n  font-size: 12px;\n}\n\n.markdown-body pre {\n  margin-top: 0;\n  margin-bottom: 0;\n  font: 12px Consolas, \"Liberation Mono\", Menlo, Courier, monospace;\n}\n\n.markdown-body .octicon {\n  font: normal normal 16px octicons-anchor;\n  line-height: 1;\n  display: inline-block;\n  text-decoration: none;\n  -webkit-font-smoothing: antialiased;\n  -moz-osx-font-smoothing: grayscale;\n  -webkit-user-select: none;\n  -moz-user-select: none;\n  -ms-user-select: none;\n  user-select: none;\n}\n\n.markdown-body .octicon-link:before {\n  content: '\\f05c';\n}\n\n.markdown-body > *:first-child {\n  margin-top: 0 !important;\n}\n\n.markdown-body > *:last-child {\n  margin-bottom: 0 !important;\n}\n\n.markdown-body .anchor {\n  position: absolute;\n  top: 0;\n  left: 0;\n  display: block;\n  padding-right: 6px;\n  padding-left: 30px;\n  margin-left: -30px;\n}\n\n.markdown-body .anchor:focus {\n  outline: none;\n}\n\n.markdown-body h1,\n.markdown-body h2,\n.markdown-body h3,\n.markdown-body h4,\n.markdown-body h5,\n.markdown-body h6 {\n  position: relative;\n  margin-top: 1em;\n  margin-bottom: 16px;\n  font-weight: bold;\n  line-height: 1.4;\n}\n\n.markdown-body h1 .octicon-link,\n.markdown-body h2 .octicon-link,\n.markdown-body h3 .octicon-link,\n.markdown-body h4 .octicon-link,\n.markdown-body h5 .octicon-link,\n.markdown-body h6 .octicon-link {\n  display: none;\n  color: #000;\n  vertical-align: middle;\n}\n\n.markdown-body h1:hover .anchor,\n.markdown-body h2:hover .anchor,\n.markdown-body h3:hover .anchor,\n.markdown-body h4:hover .anchor,\n.markdown-body h5:hover .anchor,\n.markdown-body h6:hover .anchor {\n  padding-left: 8px;\n  margin-left: -30px;\n  text-decoration: none;\n}\n\n.markdown-body h1:hover .anchor .octicon-link,\n.markdown-body h2:hover .anchor .octicon-link,\n.markdown-body h3:hover .anchor .octicon-link,\n.markdown-body h4:hover .anchor .octicon-link,\n.markdown-body h5:hover .anchor .octicon-link,\n.markdown-body h6:hover .anchor .octicon-link {\n  display: inline-block;\n}\n\n.markdown-body h1 {\n  padding-bottom: 0.3em;\n  font-size: 2.25em;\n  line-height: 1.2;\n  border-bottom: 1px solid #eee;\n}\n\n.markdown-body h1 .anchor {\n  line-height: 1;\n}\n\n.markdown-body h2 {\n  padding-bottom: 0.3em;\n  font-size: 1.75em;\n  line-height: 1.225;\n  border-bottom: 1px solid #eee;\n}\n\n.markdown-body h2 .anchor {\n  line-height: 1;\n}\n\n.markdown-body h3 {\n  font-size: 1.5em;\n  line-height: 1.43;\n}\n\n.markdown-body h3 .anchor {\n  line-height: 1.2;\n}\n\n.markdown-body h4 {\n  font-size: 1.25em;\n}\n\n.markdown-body h4 .anchor {\n  line-height: 1.2;\n}\n\n.markdown-body h5 {\n  font-size: 1em;\n}\n\n.markdown-body h5 .anchor {\n  line-height: 1.1;\n}\n\n.markdown-body h6 {\n  font-size: 1em;\n  color: #777;\n}\n\n.markdown-body h6 .anchor {\n  line-height: 1.1;\n}\n\n.markdown-body p,\n.markdown-body blockquote,\n.markdown-body ul,\n.markdown-body ol,\n.markdown-body dl,\n.markdown-body table,\n.markdown-body pre {\n  margin-top: 0;\n  margin-bottom: 16px;\n}\n\n/*\n.markdown-body hr {\n  height: 4px;\n  padding: 0;\n  margin: 16px 0;\n  background-color: #e7e7e7;\n  border: 0 none;\n}*/\n.markdown-body ul,\n.markdown-body ol {\n  padding-left: 2em;\n}\n\n.markdown-body ul ul,\n.markdown-body ul ol,\n.markdown-body ol ol,\n.markdown-body ol ul {\n  margin-top: 0;\n  margin-bottom: 0;\n}\n\n.markdown-body li > p {\n  margin-top: 16px;\n}\n\n.markdown-body dl {\n  padding: 0;\n}\n\n.markdown-body dl dt {\n  padding: 0;\n  margin-top: 16px;\n  font-size: 1em;\n  font-style: italic;\n  font-weight: bold;\n}\n\n.markdown-body dl dd {\n  padding: 0 16px;\n  margin-bottom: 16px;\n}\n\n.markdown-body blockquote {\n  padding: 0 15px;\n  color: #777;\n  border-left: 4px solid #ddd;\n}\n\n.markdown-body blockquote > :first-child {\n  margin-top: 0;\n}\n\n.markdown-body blockquote > :last-child {\n  margin-bottom: 0;\n}\n\n.markdown-body table {\n  display: block;\n  width: 100%;\n  overflow: auto;\n  word-break: normal;\n  word-break: keep-all;\n}\n\n.markdown-body table th {\n  font-weight: bold;\n}\n\n.markdown-body table th,\n.markdown-body table td {\n  padding: 6px 13px;\n  border: 1px solid #ddd;\n}\n\n.markdown-body table tr {\n  background-color: #fff;\n  border-top: 1px solid #ccc;\n}\n\n.markdown-body table tr:nth-child(2n) {\n  background-color: #f8f8f8;\n}\n\n.markdown-body img, .markdown-body video {\n  max-width: 100%;\n  -moz-box-sizing: border-box;\n  box-sizing: border-box;\n}\n\n.markdown-body code {\n  padding: 0;\n  padding-top: 0.2em;\n  padding-bottom: 0.2em;\n  margin: 0;\n  font-size: 85%;\n  background-color: rgba(0, 0, 0, 0.04);\n  border-radius: 3px;\n}\n\n.markdown-body code:before,\n.markdown-body code:after {\n  letter-spacing: -0.2em;\n  content: \"\\00a0\";\n}\n\n.markdown-body pre > code {\n  padding: 0;\n  margin: 0;\n  font-size: 100%;\n  word-break: normal;\n  white-space: pre;\n  background: transparent;\n  border: 0;\n}\n\n.markdown-body .highlight {\n  margin-bottom: 16px;\n}\n\n.markdown-body .highlight pre,\n.markdown-body pre {\n  padding: 16px;\n  overflow: auto;\n  font-size: 85%;\n  line-height: 1.45;\n  border-radius: 3px;\n}\n\n.markdown-body .highlight pre {\n  margin-bottom: 0;\n  word-break: normal;\n}\n\n.markdown-body pre {\n  word-wrap: normal;\n}\n\n.markdown-body pre code {\n  display: inline;\n  max-width: initial;\n  padding: 0;\n  margin: 0;\n  overflow: initial;\n  line-height: inherit;\n  word-wrap: normal;\n  border: 0;\n}\n\n.markdown-body pre code:before,\n.markdown-body pre code:after {\n  content: normal;\n}\n\n.markdown-body kbd {\n  display: inline-block;\n  padding: 3px 5px;\n  font-size: 11px;\n  line-height: 10px;\n  color: #555;\n  vertical-align: middle;\n  background-color: #fcfcfc;\n  border: solid 1px #ccc;\n  border-bottom-color: #bbb;\n  border-radius: 3px;\n  box-shadow: inset 0 -1px 0 #bbb;\n}\n\n.markdown-body .pl-c {\n  color: #969896;\n}\n\n.markdown-body .pl-c1,\n.markdown-body .pl-mdh,\n.markdown-body .pl-mm,\n.markdown-body .pl-mp,\n.markdown-body .pl-mr,\n.markdown-body .pl-s1 .pl-v,\n.markdown-body .pl-s3,\n.markdown-body .pl-sc,\n.markdown-body .pl-sv {\n  color: #0086b3;\n}\n\n.markdown-body .pl-e,\n.markdown-body .pl-en {\n  color: #795da3;\n}\n\n.markdown-body .pl-s1 .pl-s2,\n.markdown-body .pl-smi,\n.markdown-body .pl-smp,\n.markdown-body .pl-stj,\n.markdown-body .pl-vo,\n.markdown-body .pl-vpf {\n  color: #333;\n}\n\n.markdown-body .pl-ent {\n  color: #63a35c;\n}\n\n.markdown-body .pl-k,\n.markdown-body .pl-s,\n.markdown-body .pl-st {\n  color: #a71d5d;\n}\n\n.markdown-body .pl-pds,\n.markdown-body .pl-s1,\n.markdown-body .pl-s1 .pl-pse .pl-s2,\n.markdown-body .pl-sr,\n.markdown-body .pl-sr .pl-cce,\n.markdown-body .pl-sr .pl-sra,\n.markdown-body .pl-sr .pl-sre,\n.markdown-body .pl-src {\n  color: #df5000;\n}\n\n.markdown-body .pl-mo,\n.markdown-body .pl-v {\n  color: #1d3e81;\n}\n\n.markdown-body .pl-id {\n  color: #b52a1d;\n}\n\n.markdown-body .pl-ii {\n  background-color: #b52a1d;\n  color: #f8f8f8;\n}\n\n.markdown-body .pl-sr .pl-cce {\n  color: #63a35c;\n  font-weight: bold;\n}\n\n.markdown-body .pl-ml {\n  color: #693a17;\n}\n\n.markdown-body .pl-mh,\n.markdown-body .pl-mh .pl-en,\n.markdown-body .pl-ms {\n  color: #1d3e81;\n  font-weight: bold;\n}\n\n.markdown-body .pl-mq {\n  color: #008080;\n}\n\n.markdown-body .pl-mi {\n  color: #333;\n  font-style: italic;\n}\n\n.markdown-body .pl-mb {\n  color: #333;\n  font-weight: bold;\n}\n\n.markdown-body .pl-md,\n.markdown-body .pl-mdhf {\n  background-color: #ffecec;\n  color: #bd2c00;\n}\n\n.markdown-body .pl-mdht,\n.markdown-body .pl-mi1 {\n  background-color: #eaffea;\n  color: #55a532;\n}\n\n.markdown-body .pl-mdr {\n  color: #795da3;\n  font-weight: bold;\n}\n\n.markdown-body kbd {\n  display: inline-block;\n  padding: 3px 5px;\n  font: 11px Consolas, \"Liberation Mono\", Menlo, Courier, monospace;\n  line-height: 10px;\n  color: #555;\n  vertical-align: middle;\n  background-color: #fcfcfc;\n  border: solid 1px #ccc;\n  border-bottom-color: #bbb;\n  border-radius: 3px;\n  box-shadow: inset 0 -1px 0 #bbb;\n}\n\n.markdown-body .task-list-item {\n  list-style-type: none;\n}\n\n.markdown-body .task-list-item + .task-list-item {\n  margin-top: 3px;\n}\n\n.markdown-body .task-list-item input {\n  float: left;\n  margin: 0.3em 0 0.25em -1.6em;\n  vertical-align: middle;\n}\n\n.markdown-body :checked + .radio-label {\n  z-index: 1;\n  position: relative;\n  border-color: #4183c4;\n}\n\n.editormd-preview-container, .editormd-html-preview {\n  text-align: left;\n  font-size: 14px;\n  line-height: 1.6;\n  padding: 20px;\n  overflow: auto;\n  width: 100%;\n  background-color: #fff;\n}\n.editormd-preview-container blockquote, .editormd-html-preview blockquote {\n  color: #2C3E50;\n  border-left: 5px solid #D6DBDF;\n  font-size: 14px;\n  background: none repeat scroll 0 0 rgba(102,128,153,.05);\n  margin: 8px 0;\n  padding: 8px 16px;\n}\n.editormd-preview-container blockquote.default, .editormd-html-preview blockquote.default  {\n\n\n}\n.editormd-preview-container blockquote.info, .editormd-html-preview blockquote.info  {\n    border-left-color: #5bc0de;\n    color: #5bc0de;\n    background-color: #f4f8fa\n}\n.editormd-preview-container blockquote.warning, .editormd-html-preview blockquote.warning  {\n    background-color: #fcf8f2;\n    border-color: #f0ad4e;\n    color: #f0ad4e\n}\n.editormd-preview-container blockquote.danger, .editormd-html-preview blockquote.danger  {\n    color: #d9534f;\n    background-color: #fdf7f7;\n    border-color: #d9534f\n}\n.editormd-preview-container blockquote.success, .editormd-html-preview blockquote.success  {\n    background-color: #f3f8f3;\n    border-color: #50af51;\n    color: #50af51\n}\n.editormd-preview-container p code, .editormd-html-preview p code {\n  margin-left: 5px;\n  margin-right: 4px;\n}\n.editormd-preview-container abbr, .editormd-html-preview abbr {\n  background: #ffffdd;\n}\n.editormd-preview-container hr, .editormd-html-preview hr {\n  height: 1px;\n  border: none;\n  border-top: 1px solid #ddd;\n  background: none;\n}\n.editormd-preview-container code, .editormd-html-preview code {\n  border: 1px solid #ddd;\n  background: #f6f6f6;\n  padding: 3px;\n  border-radius: 3px;\n  font-size: 14px;\n}\n.editormd-preview-container pre, .editormd-html-preview pre {\n  border: 1px solid #ddd;\n  padding: 10px;\n  -webkit-border-radius: 3px;\n  -moz-border-radius: 3px;\n  -ms-border-radius: 3px;\n  -o-border-radius: 3px;\n  border-radius: 3px;\n}\n.editormd-preview-container pre code, .editormd-html-preview pre code {\n  padding: 0;\n}\n.editormd-preview-container pre, .editormd-preview-container code, .editormd-preview-container kbd, .editormd-html-preview pre, .editormd-html-preview code, .editormd-html-preview kbd {\n  font-family: \"YaHei Consolas Hybrid\", Consolas, \"Meiryo UI\", \"Malgun Gothic\", \"Segoe UI\", \"Trebuchet MS\", Helvetica, monospace, monospace;\n}\n.editormd-preview-container table thead tr, .editormd-html-preview table thead tr {\n  background-color: #F8F8F8;\n}\n.editormd-preview-container p.editormd-tex, .editormd-html-preview p.editormd-tex {\n  text-align: center;\n}\n.editormd-preview-container span.editormd-tex, .editormd-html-preview span.editormd-tex {\n  margin: 0 5px;\n}\n.editormd-preview-container .emoji, .editormd-html-preview .emoji {\n  width: 24px;\n  height: 24px;\n}\n.editormd-preview-container .katex, .editormd-html-preview .katex {\n  font-size: 1.4em;\n}\n.editormd-preview-container .sequence-diagram, .editormd-preview-container .flowchart, .editormd-html-preview .sequence-diagram, .editormd-html-preview .flowchart {\n  margin: 0 auto;\n  text-align: center;\n}\n.editormd-preview-container .sequence-diagram svg, .editormd-preview-container .flowchart svg, .editormd-html-preview .sequence-diagram svg, .editormd-html-preview .flowchart svg {\n  margin: 0 auto;\n}\n.editormd-preview-container .sequence-diagram text, .editormd-preview-container .flowchart text, .editormd-html-preview .sequence-diagram text, .editormd-html-preview .flowchart text {\n  font-size: 15px !important;\n  font-family: \"YaHei Consolas Hybrid\", Consolas, \"Microsoft YaHei\", \"Malgun Gothic\", \"Segoe UI\", Helvetica, Arial !important;\n}\n\n/*! Pretty printing styles. Used with prettify.js. */\n/* SPAN elements with the classes below are added by prettyprint. */\n.pln {\n  color: #000;\n}\n\n/* plain text */\n@media screen {\n  .str {\n    color: #080;\n  }\n\n  /* string content */\n  .kwd {\n    color: #008;\n  }\n\n  /* a keyword */\n  .com {\n    color: #800;\n  }\n\n  /* a comment */\n  .typ {\n    color: #606;\n  }\n\n  /* a type name */\n  .lit {\n    color: #066;\n  }\n\n  /* a literal value */\n  /* punctuation, lisp open bracket, lisp close bracket */\n  .pun, .opn, .clo {\n    color: #660;\n  }\n\n  .tag {\n    color: #008;\n  }\n\n  /* a markup tag name */\n  .atn {\n    color: #606;\n  }\n\n  /* a markup attribute name */\n  .atv {\n    color: #080;\n  }\n\n  /* a markup attribute value */\n  .dec, .var {\n    color: #606;\n  }\n\n  /* a declaration; a variable name */\n  .fun {\n    color: red;\n  }\n\n  /* a function name */\n}\n/* Use higher contrast and text-weight for printable form. */\n@media print, projection {\n  .str {\n    color: #060;\n  }\n\n  .kwd {\n    color: #006;\n    font-weight: bold;\n  }\n\n  .com {\n    color: #600;\n    font-style: italic;\n  }\n\n  .typ {\n    color: #404;\n    font-weight: bold;\n  }\n\n  .lit {\n    color: #044;\n  }\n\n  .pun, .opn, .clo {\n    color: #440;\n  }\n\n  .tag {\n    color: #006;\n    font-weight: bold;\n  }\n\n  .atn {\n    color: #404;\n  }\n\n  .atv {\n    color: #060;\n  }\n}\n/* Put a border around prettyprinted code snippets. */\npre.prettyprint {\n  padding: 2px;\n  border: 1px solid #888;\n}\n\n/* Specify class=linenums on a pre to get line numbering */\nol.linenums {\n  margin-top: 0;\n  margin-bottom: 0;\n}\n\n/* IE indents via margin-left */\nli.L0,\nli.L1,\nli.L2,\nli.L3,\nli.L5,\nli.L6,\nli.L7,\nli.L8 {\n  list-style-type: none;\n}\n\n/* Alternate shading for lines */\nli.L1,\nli.L3,\nli.L5,\nli.L7,\nli.L9 {\n  background: #eee;\n}\n\n.editormd-preview-container pre.prettyprint, .editormd-html-preview pre.prettyprint {\n  padding: 10px;\n  border: 1px solid #ddd;\n  white-space: pre-wrap;\n  word-wrap: break-word;\n}\n.editormd-preview-container ol.linenums, .editormd-html-preview ol.linenums {\n  color: #999;\n  padding-left: 2.5em;\n}\n.editormd-preview-container ol.linenums li, .editormd-html-preview ol.linenums li {\n  list-style-type: decimal;\n}\n.editormd-preview-container ol.linenums li code, .editormd-html-preview ol.linenums li code {\n  border: none;\n  background: none;\n  padding: 0;\n}\n\n.editormd-preview-container .editormd-toc-menu, .editormd-html-preview .editormd-toc-menu {\n  margin: 8px 0 12px 0;\n  display: inline-block;\n}\n.editormd-preview-container .editormd-toc-menu > .markdown-toc, .editormd-html-preview .editormd-toc-menu > .markdown-toc {\n  position: relative;\n  -webkit-border-radius: 4px;\n  -moz-border-radius: 4px;\n  -ms-border-radius: 4px;\n  -o-border-radius: 4px;\n  border-radius: 4px;\n  border: 1px solid #ddd;\n  display: inline-block;\n  font-size: 1em;\n}\n.editormd-preview-container .editormd-toc-menu > .markdown-toc > ul, .editormd-html-preview .editormd-toc-menu > .markdown-toc > ul {\n  width: 160%;\n  min-width: 180px;\n  position: absolute;\n  left: -1px;\n  top: -2px;\n  z-index: 100;\n  padding: 0 10px 10px;\n  display: none;\n  background: #fff;\n  border: 1px solid #ddd;\n  -webkit-border-radius: 4px;\n  -moz-border-radius: 4px;\n  -ms-border-radius: 4px;\n  -o-border-radius: 4px;\n  border-radius: 4px;\n  -webkit-box-shadow: 0 3px 5px rgba(0, 0, 0, 0.2);\n  /* Webkit browsers */\n  -moz-box-shadow: 0 3px 5px rgba(0, 0, 0, 0.2);\n  /* Firefox */\n  -ms-box-shadow: 0 3px 5px rgba(0, 0, 0, 0.2);\n  /* IE9 */\n  -o-box-shadow: 0 3px 5px rgba(0, 0, 0, 0.2);\n  /* Opera(Old) */\n  box-shadow: 0 3px 5px rgba(0, 0, 0, 0.2);\n  /* IE9+, News */\n}\n.editormd-preview-container .editormd-toc-menu > .markdown-toc > ul > li ul, .editormd-html-preview .editormd-toc-menu > .markdown-toc > ul > li ul {\n  width: 100%;\n  min-width: 180px;\n  border: 1px solid #ddd;\n  display: none;\n  background: #fff;\n  -webkit-border-radius: 4px;\n  -moz-border-radius: 4px;\n  -ms-border-radius: 4px;\n  -o-border-radius: 4px;\n  border-radius: 4px;\n}\n.editormd-preview-container .editormd-toc-menu > .markdown-toc > ul > li a, .editormd-html-preview .editormd-toc-menu > .markdown-toc > ul > li a {\n  color: #666;\n  padding: 6px 10px;\n  display: block;\n  -webkit-transition: background-color 500ms ease-out;\n  /* Safari, Chrome */\n  -moz-transition: background-color 500ms ease-out;\n  /* Firefox 4.0~16.0 */\n  transition: background-color 500ms ease-out;\n  /* IE >9, FF >15, Opera >12.0 */\n}\n.editormd-preview-container .editormd-toc-menu > .markdown-toc > ul > li a:hover, .editormd-html-preview .editormd-toc-menu > .markdown-toc > ul > li a:hover {\n  background-color: #f6f6f6;\n}\n.editormd-preview-container .editormd-toc-menu > .markdown-toc li, .editormd-html-preview .editormd-toc-menu > .markdown-toc li {\n  position: relative;\n}\n.editormd-preview-container .editormd-toc-menu > .markdown-toc li > ul, .editormd-html-preview .editormd-toc-menu > .markdown-toc li > ul {\n  position: absolute;\n  top: 32px;\n  left: 10%;\n  display: none;\n  -webkit-box-shadow: 0 3px 5px rgba(0, 0, 0, 0.2);\n  /* Webkit browsers */\n  -moz-box-shadow: 0 3px 5px rgba(0, 0, 0, 0.2);\n  /* Firefox */\n  -ms-box-shadow: 0 3px 5px rgba(0, 0, 0, 0.2);\n  /* IE9 */\n  -o-box-shadow: 0 3px 5px rgba(0, 0, 0, 0.2);\n  /* Opera(Old) */\n  box-shadow: 0 3px 5px rgba(0, 0, 0, 0.2);\n  /* IE9+, News */\n}\n.editormd-preview-container .editormd-toc-menu > .markdown-toc li > ul:before, .editormd-preview-container .editormd-toc-menu > .markdown-toc li > ul:after, .editormd-html-preview .editormd-toc-menu > .markdown-toc li > ul:before, .editormd-html-preview .editormd-toc-menu > .markdown-toc li > ul:after {\n  pointer-events: pointer-events;\n  position: absolute;\n  left: 15px;\n  top: -6px;\n  display: block;\n  content: \"\";\n  width: 0;\n  height: 0;\n  border: 6px solid transparent;\n  border-width: 0 6px 6px;\n  z-index: 10;\n}\n.editormd-preview-container .editormd-toc-menu > .markdown-toc li > ul:before, .editormd-html-preview .editormd-toc-menu > .markdown-toc li > ul:before {\n  border-bottom-color: #ccc;\n}\n.editormd-preview-container .editormd-toc-menu > .markdown-toc li > ul:after, .editormd-html-preview .editormd-toc-menu > .markdown-toc li > ul:after {\n  border-bottom-color: #ffffff;\n  top: -5px;\n}\n.editormd-preview-container .editormd-toc-menu ul, .editormd-html-preview .editormd-toc-menu ul {\n  list-style: none;\n}\n.editormd-preview-container .editormd-toc-menu a, .editormd-html-preview .editormd-toc-menu a {\n  text-decoration: none;\n}\n.editormd-preview-container .editormd-toc-menu h1, .editormd-html-preview .editormd-toc-menu h1 {\n  font-size: 16px;\n  padding: 5px 0 10px 10px;\n  line-height: 1;\n  border-bottom: 1px solid #eee;\n}\n.editormd-preview-container .editormd-toc-menu h1 .fa, .editormd-html-preview .editormd-toc-menu h1 .fa {\n  padding-left: 10px;\n}\n.editormd-preview-container .editormd-toc-menu .toc-menu-btn, .editormd-html-preview .editormd-toc-menu .toc-menu-btn {\n  color: #666;\n  min-width: 180px;\n  padding: 5px 10px;\n  border-radius: 4px;\n  display: inline-block;\n  -webkit-transition: background-color 500ms ease-out;\n  /* Safari, Chrome */\n  -moz-transition: background-color 500ms ease-out;\n  /* Firefox 4.0~16.0 */\n  transition: background-color 500ms ease-out;\n  /* IE >9, FF >15, Opera >12.0 */\n}\n.editormd-preview-container .editormd-toc-menu .toc-menu-btn:hover, .editormd-html-preview .editormd-toc-menu .toc-menu-btn:hover {\n  background-color: #f6f6f6;\n}\n.editormd-preview-container .editormd-toc-menu .toc-menu-btn .fa, .editormd-html-preview .editormd-toc-menu .toc-menu-btn .fa {\n  float: right;\n  padding: 3px 0 0 10px;\n  font-size: 1.3em;\n}\n\n.markdown-body .editormd-toc-menu ul {\n  padding-left: 0;\n}\n.markdown-body .highlight pre, .markdown-body pre {\n  line-height: 1.6;\n}\n\nhr.editormd-page-break {\n  border: 1px dotted #ccc;\n  font-size: 0;\n  height: 2px;\n}\n\n@media only print {\n  hr.editormd-page-break {\n    background: none;\n    border: none;\n    height: 0;\n  }\n}\n.editormd-html-preview textarea {\n  display: none;\n}\n.editormd-html-preview hr.editormd-page-break {\n  background: none;\n  border: none;\n  height: 0;\n}\n\n.editormd-preview-close-btn {\n  color: #fff;\n  padding: 4px 6px;\n  font-size: 18px;\n  -webkit-border-radius: 500px;\n  -moz-border-radius: 500px;\n  -ms-border-radius: 500px;\n  -o-border-radius: 500px;\n  border-radius: 500px;\n  display: none;\n  background-color: #ccc;\n  position: absolute;\n  top: 25px;\n  right: 35px;\n  z-index: 19;\n  -webkit-transition: background-color 300ms ease-out;\n  /* Safari, Chrome */\n  -moz-transition: background-color 300ms ease-out;\n  /* Firefox 4.0~16.0 */\n  transition: background-color 300ms ease-out;\n  /* IE >9, FF >15, Opera >12.0 */\n}\n.editormd-preview-close-btn:hover {\n  background-color: #999;\n}\n\n.editormd-preview-active {\n  width: 100%;\n  padding: 40px;\n}\n\n/* Preview dark theme */\n.editormd-preview-theme-dark {\n  color: #777;\n  background: #2C2827;\n}\n.editormd-preview-theme-dark .editormd-preview-container {\n  color: #888;\n  background-color: #2C2827;\n}\n.editormd-preview-theme-dark .editormd-preview-container pre.prettyprint {\n  border: none;\n}\n.editormd-preview-theme-dark .editormd-preview-container blockquote {\n  color: #555;\n  padding: 0.5em;\n  background: #222;\n  border-color: #333;\n}\n.editormd-preview-theme-dark .editormd-preview-container abbr {\n  color: #fff;\n  padding: 1px 3px;\n  -webkit-border-radius: 3px;\n  -moz-border-radius: 3px;\n  -ms-border-radius: 3px;\n  -o-border-radius: 3px;\n  border-radius: 3px;\n  background: #ff9900;\n}\n.editormd-preview-theme-dark .editormd-preview-container code {\n  color: #fff;\n  border: none;\n  padding: 1px 3px;\n  -webkit-border-radius: 3px;\n  -moz-border-radius: 3px;\n  -ms-border-radius: 3px;\n  -o-border-radius: 3px;\n  border-radius: 3px;\n  background: #5A9600;\n}\n.editormd-preview-theme-dark .editormd-preview-container table {\n  border: none;\n}\n.editormd-preview-theme-dark .editormd-preview-container .fa-emoji {\n  color: #B4BF42;\n}\n.editormd-preview-theme-dark .editormd-preview-container .katex {\n  color: #FEC93F;\n}\n.editormd-preview-theme-dark .editormd-toc-menu > .markdown-toc {\n  background: #fff;\n  border: none;\n}\n.editormd-preview-theme-dark .editormd-toc-menu > .markdown-toc h1 {\n  border-color: #ddd;\n}\n.editormd-preview-theme-dark .markdown-body h1, .editormd-preview-theme-dark .markdown-body h2, .editormd-preview-theme-dark .markdown-body hr {\n  border-color: #222;\n}\n.editormd-preview-theme-dark pre {\n  color: #999;\n  background-color: #111;\n  background-color: rgba(0, 0, 0, 0.4);\n  /* plain text */\n}\n.editormd-preview-theme-dark pre .pln {\n  color: #999;\n}\n.editormd-preview-theme-dark li.L1, .editormd-preview-theme-dark li.L3, .editormd-preview-theme-dark li.L5, .editormd-preview-theme-dark li.L7, .editormd-preview-theme-dark li.L9 {\n  background: none;\n}\n.editormd-preview-theme-dark [class*=editormd-logo] {\n  color: #2196F3;\n}\n.editormd-preview-theme-dark .sequence-diagram text {\n  fill: #fff;\n}\n.editormd-preview-theme-dark .sequence-diagram rect, .editormd-preview-theme-dark .sequence-diagram path {\n  color: #fff;\n  fill: #64D1CB;\n  stroke: #64D1CB;\n}\n.editormd-preview-theme-dark .flowchart rect, .editormd-preview-theme-dark .flowchart path {\n  stroke: #A6C6FF;\n}\n.editormd-preview-theme-dark .flowchart rect {\n  fill: #A6C6FF;\n}\n.editormd-preview-theme-dark .flowchart text {\n  fill: #5879B4;\n}\n\n@media screen {\n  .editormd-preview-theme-dark {\n    /* string content */\n    /* a keyword */\n    /* a comment */\n    /* a type name */\n    /* a literal value */\n    /* punctuation, lisp open bracket, lisp close bracket */\n    /* a markup tag name */\n    /* a markup attribute name */\n    /* a markup attribute value */\n    /* a declaration; a variable name */\n    /* a function name */\n  }\n  .editormd-preview-theme-dark .str {\n    color: #080;\n  }\n  .editormd-preview-theme-dark .kwd {\n    color: #ff9900;\n  }\n  .editormd-preview-theme-dark .com {\n    color: #444444;\n  }\n  .editormd-preview-theme-dark .typ {\n    color: #606;\n  }\n  .editormd-preview-theme-dark .lit {\n    color: #066;\n  }\n  .editormd-preview-theme-dark .pun, .editormd-preview-theme-dark .opn, .editormd-preview-theme-dark .clo {\n    color: #660;\n  }\n  .editormd-preview-theme-dark .tag {\n    color: #ff9900;\n  }\n  .editormd-preview-theme-dark .atn {\n    color: #6C95F5;\n  }\n  .editormd-preview-theme-dark .atv {\n    color: #080;\n  }\n  .editormd-preview-theme-dark .dec, .editormd-preview-theme-dark .var {\n    color: #008BA7;\n  }\n  .editormd-preview-theme-dark .fun {\n    color: red;\n  }\n}\n.editormd-onlyread .editormd-toolbar {\n  display: none;\n}\n.editormd-onlyread .CodeMirror {\n  margin-top: 0;\n}\n.editormd-onlyread .editormd-preview {\n  top: 0;\n}\n\n.editormd-fullscreen {\n  position: fixed;\n  top: 0;\n  left: 0;\n  border: none;\n  margin: 0 auto;\n}\n\n/* Editor.md Dark theme */\n.editormd-theme-dark {\n  border-color: #1a1a17;\n}\n.editormd-theme-dark .editormd-toolbar {\n  background: #1A1A17;\n  border-color: #1a1a17;\n}\n.editormd-theme-dark .editormd-menu > li > a {\n  color: #777;\n  border-color: #1a1a17;\n}\n.editormd-theme-dark .editormd-menu > li > a:hover, .editormd-theme-dark .editormd-menu > li > a.active {\n  border-color: #333;\n  background: #333;\n}\n.editormd-theme-dark .editormd-menu > li.divider {\n  border-right: 1px solid #111;\n}\n.editormd-theme-dark .CodeMirror {\n  border-right: 1px solid rgba(0, 0, 0, 0.1);\n}\n"
  },
  {
    "path": "static/editor.md/css/editormd.logo.css",
    "content": "/*\n * Editor.md\n *\n * @file        editormd.logo.css \n * @version     v1.5.0 \n * @description Open source online markdown editor.\n * @license     MIT License\n * @author      Pandao\n * {@link       https://github.com/pandao/editor.md}\n * @updateTime  2015-06-09\n */\n\n/*! prefixes.scss v0.1.0 | Author: Pandao | https://github.com/pandao/prefixes.scss | MIT license | Copyright (c) 2015 */\n@font-face {\n  font-family: 'editormd-logo';\n  src: url(\"../fonts/editormd-logo.eot?-5y8q6h\");\n  src: url(\".../fonts/editormd-logo.eot?#iefix-5y8q6h\") format(\"embedded-opentype\"), url(\"../fonts/editormd-logo.woff?-5y8q6h\") format(\"woff\"), url(\"../fonts/editormd-logo.ttf?-5y8q6h\") format(\"truetype\"), url(\"../fonts/editormd-logo.svg?-5y8q6h#icomoon\") format(\"svg\");\n  font-weight: normal;\n  font-style: normal;\n}\n.editormd-logo,\n.editormd-logo-1x,\n.editormd-logo-2x,\n.editormd-logo-3x,\n.editormd-logo-4x,\n.editormd-logo-5x,\n.editormd-logo-6x,\n.editormd-logo-7x,\n.editormd-logo-8x {\n  font-family: 'editormd-logo';\n  speak: none;\n  font-style: normal;\n  font-weight: normal;\n  font-variant: normal;\n  text-transform: none;\n  font-size: inherit;\n  line-height: 1;\n  display: inline-block;\n  text-rendering: auto;\n  vertical-align: inherit;\n  -webkit-font-smoothing: antialiased;\n  -moz-osx-font-smoothing: grayscale;\n}\n.editormd-logo:before,\n.editormd-logo-1x:before,\n.editormd-logo-2x:before,\n.editormd-logo-3x:before,\n.editormd-logo-4x:before,\n.editormd-logo-5x:before,\n.editormd-logo-6x:before,\n.editormd-logo-7x:before,\n.editormd-logo-8x:before {\n  content: \"\\e1987\";\n  /* \n  HTML Entity &#xe1987; \n  example: <span class=\"editormd-logo\">&#xe1987;</span>\n  */\n}\n\n.editormd-logo-1x {\n  font-size: 1em;\n}\n\n.editormd-logo-lg {\n  font-size: 1.2em;\n}\n\n.editormd-logo-2x {\n  font-size: 2em;\n}\n\n.editormd-logo-3x {\n  font-size: 3em;\n}\n\n.editormd-logo-4x {\n  font-size: 4em;\n}\n\n.editormd-logo-5x {\n  font-size: 5em;\n}\n\n.editormd-logo-6x {\n  font-size: 6em;\n}\n\n.editormd-logo-7x {\n  font-size: 7em;\n}\n\n.editormd-logo-8x {\n  font-size: 8em;\n}\n\n.editormd-logo-color {\n  color: #2196F3;\n}\n"
  },
  {
    "path": "static/editor.md/css/editormd.preview.css",
    "content": "/*\n * Editor.md\n *\n * @file        editormd.preview.css \n * @version     v1.5.0 \n * @description Open source online markdown editor.\n * @license     MIT License\n * @author      Pandao\n * {@link       https://github.com/pandao/editor.md}\n * @updateTime  2015-06-09\n */\n\n@charset \"UTF-8\";\n/*! prefixes.scss v0.1.0 | Author: Pandao | https://github.com/pandao/prefixes.scss | MIT license | Copyright (c) 2015 */\n/*!\n *  Font Awesome 4.3.0 by @davegandy - http://fontawesome.io - @fontawesome\n *  License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License)\n */\n/* FONT PATH\n * -------------------------- */\n@font-face {\n  font-family: 'FontAwesome';\n  src: url(\"../fonts/fontawesome-webfont.eot?v=4.3.0\");\n  src: url(\"../fonts/fontawesome-webfont.eot?#iefix&v=4.3.0\") format(\"embedded-opentype\"), url(\"../fonts/fontawesome-webfont.woff2?v=4.3.0\") format(\"woff2\"), url(\"../fonts/fontawesome-webfont.woff?v=4.3.0\") format(\"woff\"), url(\"../fonts/fontawesome-webfont.ttf?v=4.3.0\") format(\"truetype\"), url(\"../fonts/fontawesome-webfont.svg?v=4.3.0#fontawesomeregular\") format(\"svg\");\n  font-weight: normal;\n  font-style: normal;\n}\n.fa {\n  display: inline-block;\n  font: normal normal normal 14px/1 FontAwesome;\n  font-size: inherit;\n  text-rendering: auto;\n  -webkit-font-smoothing: antialiased;\n  -moz-osx-font-smoothing: grayscale;\n  transform: translate(0, 0);\n}\n\n/* makes the font 33% larger relative to the icon container */\n.fa-lg {\n  font-size: 1.33333333em;\n  line-height: 0.75em;\n  vertical-align: -15%;\n}\n\n.fa-2x {\n  font-size: 2em;\n}\n\n.fa-3x {\n  font-size: 3em;\n}\n\n.fa-4x {\n  font-size: 4em;\n}\n\n.fa-5x {\n  font-size: 5em;\n}\n\n.fa-fw {\n  width: 1.28571429em;\n  text-align: center;\n}\n\n.fa-ul {\n  padding-left: 0;\n  margin-left: 2.14285714em;\n  list-style-type: none;\n}\n\n.fa-ul > li {\n  position: relative;\n}\n\n.fa-li {\n  position: absolute;\n  left: -2.14285714em;\n  width: 2.14285714em;\n  top: 0.14285714em;\n  text-align: center;\n}\n\n.fa-li.fa-lg {\n  left: -1.85714286em;\n}\n\n.fa-border {\n  padding: .2em .25em .15em;\n  border: solid 0.08em #eeeeee;\n  border-radius: .1em;\n}\n\n.pull-right {\n  float: right;\n}\n\n.pull-left {\n  float: left;\n}\n\n.fa.pull-left {\n  margin-right: .3em;\n}\n\n.fa.pull-right {\n  margin-left: .3em;\n}\n\n.fa-spin {\n  -webkit-animation: fa-spin 2s infinite linear;\n  animation: fa-spin 2s infinite linear;\n}\n\n.fa-pulse {\n  -webkit-animation: fa-spin 1s infinite steps(8);\n  animation: fa-spin 1s infinite steps(8);\n}\n\n@-webkit-keyframes fa-spin {\n  0% {\n    -webkit-transform: rotate(0deg);\n    transform: rotate(0deg);\n  }\n  100% {\n    -webkit-transform: rotate(359deg);\n    transform: rotate(359deg);\n  }\n}\n@keyframes fa-spin {\n  0% {\n    -webkit-transform: rotate(0deg);\n    transform: rotate(0deg);\n  }\n  100% {\n    -webkit-transform: rotate(359deg);\n    transform: rotate(359deg);\n  }\n}\n.fa-rotate-90 {\n  filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=1);\n  -webkit-transform: rotate(90deg);\n  -ms-transform: rotate(90deg);\n  transform: rotate(90deg);\n}\n\n.fa-rotate-180 {\n  filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=2);\n  -webkit-transform: rotate(180deg);\n  -ms-transform: rotate(180deg);\n  transform: rotate(180deg);\n}\n\n.fa-rotate-270 {\n  filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=3);\n  -webkit-transform: rotate(270deg);\n  -ms-transform: rotate(270deg);\n  transform: rotate(270deg);\n}\n\n.fa-flip-horizontal {\n  filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1);\n  -webkit-transform: scale(-1, 1);\n  -ms-transform: scale(-1, 1);\n  transform: scale(-1, 1);\n}\n\n.fa-flip-vertical {\n  filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1);\n  -webkit-transform: scale(1, -1);\n  -ms-transform: scale(1, -1);\n  transform: scale(1, -1);\n}\n\n:root .fa-rotate-90,\n:root .fa-rotate-180,\n:root .fa-rotate-270,\n:root .fa-flip-horizontal,\n:root .fa-flip-vertical {\n  filter: none;\n}\n\n.fa-stack {\n  position: relative;\n  display: inline-block;\n  width: 2em;\n  height: 2em;\n  line-height: 2em;\n  vertical-align: middle;\n}\n\n.fa-stack-1x,\n.fa-stack-2x {\n  position: absolute;\n  left: 0;\n  width: 100%;\n  text-align: center;\n}\n\n.fa-stack-1x {\n  line-height: inherit;\n}\n\n.fa-stack-2x {\n  font-size: 2em;\n}\n\n.fa-inverse {\n  color: #ffffff;\n}\n\n/* Font Awesome uses the Unicode Private Use Area (PUA) to ensure screen\n   readers do not read off random characters that represent icons */\n.fa-glass:before {\n  content: \"\\f000\";\n}\n\n.fa-music:before {\n  content: \"\\f001\";\n}\n\n.fa-search:before {\n  content: \"\\f002\";\n}\n\n.fa-envelope-o:before {\n  content: \"\\f003\";\n}\n\n.fa-heart:before {\n  content: \"\\f004\";\n}\n\n.fa-star:before {\n  content: \"\\f005\";\n}\n\n.fa-star-o:before {\n  content: \"\\f006\";\n}\n\n.fa-user:before {\n  content: \"\\f007\";\n}\n\n.fa-film:before {\n  content: \"\\f008\";\n}\n\n.fa-th-large:before {\n  content: \"\\f009\";\n}\n\n.fa-th:before {\n  content: \"\\f00a\";\n}\n\n.fa-th-list:before {\n  content: \"\\f00b\";\n}\n\n.fa-check:before {\n  content: \"\\f00c\";\n}\n\n.fa-remove:before,\n.fa-close:before,\n.fa-times:before {\n  content: \"\\f00d\";\n}\n\n.fa-search-plus:before {\n  content: \"\\f00e\";\n}\n\n.fa-search-minus:before {\n  content: \"\\f010\";\n}\n\n.fa-power-off:before {\n  content: \"\\f011\";\n}\n\n.fa-signal:before {\n  content: \"\\f012\";\n}\n\n.fa-gear:before,\n.fa-cog:before {\n  content: \"\\f013\";\n}\n\n.fa-trash-o:before {\n  content: \"\\f014\";\n}\n\n.fa-home:before {\n  content: \"\\f015\";\n}\n\n.fa-file-o:before {\n  content: \"\\f016\";\n}\n\n.fa-clock-o:before {\n  content: \"\\f017\";\n}\n\n.fa-road:before {\n  content: \"\\f018\";\n}\n\n.fa-download:before {\n  content: \"\\f019\";\n}\n\n.fa-arrow-circle-o-down:before {\n  content: \"\\f01a\";\n}\n\n.fa-arrow-circle-o-up:before {\n  content: \"\\f01b\";\n}\n\n.fa-inbox:before {\n  content: \"\\f01c\";\n}\n\n.fa-play-circle-o:before {\n  content: \"\\f01d\";\n}\n\n.fa-rotate-right:before,\n.fa-repeat:before {\n  content: \"\\f01e\";\n}\n\n.fa-refresh:before {\n  content: \"\\f021\";\n}\n\n.fa-list-alt:before {\n  content: \"\\f022\";\n}\n\n.fa-lock:before {\n  content: \"\\f023\";\n}\n\n.fa-flag:before {\n  content: \"\\f024\";\n}\n\n.fa-headphones:before {\n  content: \"\\f025\";\n}\n\n.fa-volume-off:before {\n  content: \"\\f026\";\n}\n\n.fa-volume-down:before {\n  content: \"\\f027\";\n}\n\n.fa-volume-up:before {\n  content: \"\\f028\";\n}\n\n.fa-qrcode:before {\n  content: \"\\f029\";\n}\n\n.fa-barcode:before {\n  content: \"\\f02a\";\n}\n\n.fa-tag:before {\n  content: \"\\f02b\";\n}\n\n.fa-tags:before {\n  content: \"\\f02c\";\n}\n\n.fa-book:before {\n  content: \"\\f02d\";\n}\n\n.fa-bookmark:before {\n  content: \"\\f02e\";\n}\n\n.fa-print:before {\n  content: \"\\f02f\";\n}\n\n.fa-camera:before {\n  content: \"\\f030\";\n}\n\n.fa-font:before {\n  content: \"\\f031\";\n}\n\n.fa-bold:before {\n  content: \"\\f032\";\n}\n\n.fa-italic:before {\n  content: \"\\f033\";\n}\n\n.fa-text-height:before {\n  content: \"\\f034\";\n}\n\n.fa-text-width:before {\n  content: \"\\f035\";\n}\n\n.fa-align-left:before {\n  content: \"\\f036\";\n}\n\n.fa-align-center:before {\n  content: \"\\f037\";\n}\n\n.fa-align-right:before {\n  content: \"\\f038\";\n}\n\n.fa-align-justify:before {\n  content: \"\\f039\";\n}\n\n.fa-list:before {\n  content: \"\\f03a\";\n}\n\n.fa-dedent:before,\n.fa-outdent:before {\n  content: \"\\f03b\";\n}\n\n.fa-indent:before {\n  content: \"\\f03c\";\n}\n\n.fa-video-camera:before {\n  content: \"\\f03d\";\n}\n\n.fa-photo:before,\n.fa-image:before,\n.fa-picture-o:before {\n  content: \"\\f03e\";\n}\n\n.fa-pencil:before {\n  content: \"\\f040\";\n}\n\n.fa-map-marker:before {\n  content: \"\\f041\";\n}\n\n.fa-adjust:before {\n  content: \"\\f042\";\n}\n\n.fa-tint:before {\n  content: \"\\f043\";\n}\n\n.fa-edit:before,\n.fa-pencil-square-o:before {\n  content: \"\\f044\";\n}\n\n.fa-share-square-o:before {\n  content: \"\\f045\";\n}\n\n.fa-check-square-o:before {\n  content: \"\\f046\";\n}\n\n.fa-arrows:before {\n  content: \"\\f047\";\n}\n\n.fa-step-backward:before {\n  content: \"\\f048\";\n}\n\n.fa-fast-backward:before {\n  content: \"\\f049\";\n}\n\n.fa-backward:before {\n  content: \"\\f04a\";\n}\n\n.fa-play:before {\n  content: \"\\f04b\";\n}\n\n.fa-pause:before {\n  content: \"\\f04c\";\n}\n\n.fa-stop:before {\n  content: \"\\f04d\";\n}\n\n.fa-forward:before {\n  content: \"\\f04e\";\n}\n\n.fa-fast-forward:before {\n  content: \"\\f050\";\n}\n\n.fa-step-forward:before {\n  content: \"\\f051\";\n}\n\n.fa-eject:before {\n  content: \"\\f052\";\n}\n\n.fa-chevron-left:before {\n  content: \"\\f053\";\n}\n\n.fa-chevron-right:before {\n  content: \"\\f054\";\n}\n\n.fa-plus-circle:before {\n  content: \"\\f055\";\n}\n\n.fa-minus-circle:before {\n  content: \"\\f056\";\n}\n\n.fa-times-circle:before {\n  content: \"\\f057\";\n}\n\n.fa-check-circle:before {\n  content: \"\\f058\";\n}\n\n.fa-question-circle:before {\n  content: \"\\f059\";\n}\n\n.fa-info-circle:before {\n  content: \"\\f05a\";\n}\n\n.fa-crosshairs:before {\n  content: \"\\f05b\";\n}\n\n.fa-times-circle-o:before {\n  content: \"\\f05c\";\n}\n\n.fa-check-circle-o:before {\n  content: \"\\f05d\";\n}\n\n.fa-ban:before {\n  content: \"\\f05e\";\n}\n\n.fa-arrow-left:before {\n  content: \"\\f060\";\n}\n\n.fa-arrow-right:before {\n  content: \"\\f061\";\n}\n\n.fa-arrow-up:before {\n  content: \"\\f062\";\n}\n\n.fa-arrow-down:before {\n  content: \"\\f063\";\n}\n\n.fa-mail-forward:before,\n.fa-share:before {\n  content: \"\\f064\";\n}\n\n.fa-expand:before {\n  content: \"\\f065\";\n}\n\n.fa-compress:before {\n  content: \"\\f066\";\n}\n\n.fa-plus:before {\n  content: \"\\f067\";\n}\n\n.fa-minus:before {\n  content: \"\\f068\";\n}\n\n.fa-asterisk:before {\n  content: \"\\f069\";\n}\n\n.fa-exclamation-circle:before {\n  content: \"\\f06a\";\n}\n\n.fa-gift:before {\n  content: \"\\f06b\";\n}\n\n.fa-leaf:before {\n  content: \"\\f06c\";\n}\n\n.fa-fire:before {\n  content: \"\\f06d\";\n}\n\n.fa-eye:before {\n  content: \"\\f06e\";\n}\n\n.fa-eye-slash:before {\n  content: \"\\f070\";\n}\n\n.fa-warning:before,\n.fa-exclamation-triangle:before {\n  content: \"\\f071\";\n}\n\n.fa-plane:before {\n  content: \"\\f072\";\n}\n\n.fa-calendar:before {\n  content: \"\\f073\";\n}\n\n.fa-random:before {\n  content: \"\\f074\";\n}\n\n.fa-comment:before {\n  content: \"\\f075\";\n}\n\n.fa-magnet:before {\n  content: \"\\f076\";\n}\n\n.fa-chevron-up:before {\n  content: \"\\f077\";\n}\n\n.fa-chevron-down:before {\n  content: \"\\f078\";\n}\n\n.fa-retweet:before {\n  content: \"\\f079\";\n}\n\n.fa-shopping-cart:before {\n  content: \"\\f07a\";\n}\n\n.fa-folder:before {\n  content: \"\\f07b\";\n}\n\n.fa-folder-open:before {\n  content: \"\\f07c\";\n}\n\n.fa-arrows-v:before {\n  content: \"\\f07d\";\n}\n\n.fa-arrows-h:before {\n  content: \"\\f07e\";\n}\n\n.fa-bar-chart-o:before,\n.fa-bar-chart:before {\n  content: \"\\f080\";\n}\n\n.fa-twitter-square:before {\n  content: \"\\f081\";\n}\n\n.fa-facebook-square:before {\n  content: \"\\f082\";\n}\n\n.fa-camera-retro:before {\n  content: \"\\f083\";\n}\n\n.fa-key:before {\n  content: \"\\f084\";\n}\n\n.fa-gears:before,\n.fa-cogs:before {\n  content: \"\\f085\";\n}\n\n.fa-comments:before {\n  content: \"\\f086\";\n}\n\n.fa-thumbs-o-up:before {\n  content: \"\\f087\";\n}\n\n.fa-thumbs-o-down:before {\n  content: \"\\f088\";\n}\n\n.fa-star-half:before {\n  content: \"\\f089\";\n}\n\n.fa-heart-o:before {\n  content: \"\\f08a\";\n}\n\n.fa-sign-out:before {\n  content: \"\\f08b\";\n}\n\n.fa-linkedin-square:before {\n  content: \"\\f08c\";\n}\n\n.fa-thumb-tack:before {\n  content: \"\\f08d\";\n}\n\n.fa-external-link:before {\n  content: \"\\f08e\";\n}\n\n.fa-sign-in:before {\n  content: \"\\f090\";\n}\n\n.fa-trophy:before {\n  content: \"\\f091\";\n}\n\n.fa-github-square:before {\n  content: \"\\f092\";\n}\n\n.fa-upload:before {\n  content: \"\\f093\";\n}\n\n.fa-lemon-o:before {\n  content: \"\\f094\";\n}\n\n.fa-phone:before {\n  content: \"\\f095\";\n}\n\n.fa-square-o:before {\n  content: \"\\f096\";\n}\n\n.fa-bookmark-o:before {\n  content: \"\\f097\";\n}\n\n.fa-phone-square:before {\n  content: \"\\f098\";\n}\n\n.fa-twitter:before {\n  content: \"\\f099\";\n}\n\n.fa-facebook-f:before,\n.fa-facebook:before {\n  content: \"\\f09a\";\n}\n\n.fa-github:before {\n  content: \"\\f09b\";\n}\n\n.fa-unlock:before {\n  content: \"\\f09c\";\n}\n\n.fa-credit-card:before {\n  content: \"\\f09d\";\n}\n\n.fa-rss:before {\n  content: \"\\f09e\";\n}\n\n.fa-hdd-o:before {\n  content: \"\\f0a0\";\n}\n\n.fa-bullhorn:before {\n  content: \"\\f0a1\";\n}\n\n.fa-bell:before {\n  content: \"\\f0f3\";\n}\n\n.fa-certificate:before {\n  content: \"\\f0a3\";\n}\n\n.fa-hand-o-right:before {\n  content: \"\\f0a4\";\n}\n\n.fa-hand-o-left:before {\n  content: \"\\f0a5\";\n}\n\n.fa-hand-o-up:before {\n  content: \"\\f0a6\";\n}\n\n.fa-hand-o-down:before {\n  content: \"\\f0a7\";\n}\n\n.fa-arrow-circle-left:before {\n  content: \"\\f0a8\";\n}\n\n.fa-arrow-circle-right:before {\n  content: \"\\f0a9\";\n}\n\n.fa-arrow-circle-up:before {\n  content: \"\\f0aa\";\n}\n\n.fa-arrow-circle-down:before {\n  content: \"\\f0ab\";\n}\n\n.fa-globe:before {\n  content: \"\\f0ac\";\n}\n\n.fa-wrench:before {\n  content: \"\\f0ad\";\n}\n\n.fa-tasks:before {\n  content: \"\\f0ae\";\n}\n\n.fa-filter:before {\n  content: \"\\f0b0\";\n}\n\n.fa-briefcase:before {\n  content: \"\\f0b1\";\n}\n\n.fa-arrows-alt:before {\n  content: \"\\f0b2\";\n}\n\n.fa-group:before,\n.fa-users:before {\n  content: \"\\f0c0\";\n}\n\n.fa-chain:before,\n.fa-link:before {\n  content: \"\\f0c1\";\n}\n\n.fa-cloud:before {\n  content: \"\\f0c2\";\n}\n\n.fa-flask:before {\n  content: \"\\f0c3\";\n}\n\n.fa-cut:before,\n.fa-scissors:before {\n  content: \"\\f0c4\";\n}\n\n.fa-copy:before,\n.fa-files-o:before {\n  content: \"\\f0c5\";\n}\n\n.fa-paperclip:before {\n  content: \"\\f0c6\";\n}\n\n.fa-save:before,\n.fa-floppy-o:before {\n  content: \"\\f0c7\";\n}\n\n.fa-square:before {\n  content: \"\\f0c8\";\n}\n\n.fa-navicon:before,\n.fa-reorder:before,\n.fa-bars:before {\n  content: \"\\f0c9\";\n}\n\n.fa-list-ul:before {\n  content: \"\\f0ca\";\n}\n\n.fa-list-ol:before {\n  content: \"\\f0cb\";\n}\n\n.fa-strikethrough:before {\n  content: \"\\f0cc\";\n}\n\n.fa-underline:before {\n  content: \"\\f0cd\";\n}\n\n.fa-table:before {\n  content: \"\\f0ce\";\n}\n\n.fa-magic:before {\n  content: \"\\f0d0\";\n}\n\n.fa-truck:before {\n  content: \"\\f0d1\";\n}\n\n.fa-pinterest:before {\n  content: \"\\f0d2\";\n}\n\n.fa-pinterest-square:before {\n  content: \"\\f0d3\";\n}\n\n.fa-google-plus-square:before {\n  content: \"\\f0d4\";\n}\n\n.fa-google-plus:before {\n  content: \"\\f0d5\";\n}\n\n.fa-money:before {\n  content: \"\\f0d6\";\n}\n\n.fa-caret-down:before {\n  content: \"\\f0d7\";\n}\n\n.fa-caret-up:before {\n  content: \"\\f0d8\";\n}\n\n.fa-caret-left:before {\n  content: \"\\f0d9\";\n}\n\n.fa-caret-right:before {\n  content: \"\\f0da\";\n}\n\n.fa-columns:before {\n  content: \"\\f0db\";\n}\n\n.fa-unsorted:before,\n.fa-sort:before {\n  content: \"\\f0dc\";\n}\n\n.fa-sort-down:before,\n.fa-sort-desc:before {\n  content: \"\\f0dd\";\n}\n\n.fa-sort-up:before,\n.fa-sort-asc:before {\n  content: \"\\f0de\";\n}\n\n.fa-envelope:before {\n  content: \"\\f0e0\";\n}\n\n.fa-linkedin:before {\n  content: \"\\f0e1\";\n}\n\n.fa-rotate-left:before,\n.fa-undo:before {\n  content: \"\\f0e2\";\n}\n\n.fa-legal:before,\n.fa-gavel:before {\n  content: \"\\f0e3\";\n}\n\n.fa-dashboard:before,\n.fa-tachometer:before {\n  content: \"\\f0e4\";\n}\n\n.fa-comment-o:before {\n  content: \"\\f0e5\";\n}\n\n.fa-comments-o:before {\n  content: \"\\f0e6\";\n}\n\n.fa-flash:before,\n.fa-bolt:before {\n  content: \"\\f0e7\";\n}\n\n.fa-sitemap:before {\n  content: \"\\f0e8\";\n}\n\n.fa-umbrella:before {\n  content: \"\\f0e9\";\n}\n\n.fa-paste:before,\n.fa-clipboard:before {\n  content: \"\\f0ea\";\n}\n\n.fa-lightbulb-o:before {\n  content: \"\\f0eb\";\n}\n\n.fa-exchange:before {\n  content: \"\\f0ec\";\n}\n\n.fa-cloud-download:before {\n  content: \"\\f0ed\";\n}\n\n.fa-cloud-upload:before {\n  content: \"\\f0ee\";\n}\n\n.fa-user-md:before {\n  content: \"\\f0f0\";\n}\n\n.fa-stethoscope:before {\n  content: \"\\f0f1\";\n}\n\n.fa-suitcase:before {\n  content: \"\\f0f2\";\n}\n\n.fa-bell-o:before {\n  content: \"\\f0a2\";\n}\n\n.fa-coffee:before {\n  content: \"\\f0f4\";\n}\n\n.fa-cutlery:before {\n  content: \"\\f0f5\";\n}\n\n.fa-file-text-o:before {\n  content: \"\\f0f6\";\n}\n\n.fa-building-o:before {\n  content: \"\\f0f7\";\n}\n\n.fa-hospital-o:before {\n  content: \"\\f0f8\";\n}\n\n.fa-ambulance:before {\n  content: \"\\f0f9\";\n}\n\n.fa-medkit:before {\n  content: \"\\f0fa\";\n}\n\n.fa-fighter-jet:before {\n  content: \"\\f0fb\";\n}\n\n.fa-beer:before {\n  content: \"\\f0fc\";\n}\n\n.fa-h-square:before {\n  content: \"\\f0fd\";\n}\n\n.fa-plus-square:before {\n  content: \"\\f0fe\";\n}\n\n.fa-angle-double-left:before {\n  content: \"\\f100\";\n}\n\n.fa-angle-double-right:before {\n  content: \"\\f101\";\n}\n\n.fa-angle-double-up:before {\n  content: \"\\f102\";\n}\n\n.fa-angle-double-down:before {\n  content: \"\\f103\";\n}\n\n.fa-angle-left:before {\n  content: \"\\f104\";\n}\n\n.fa-angle-right:before {\n  content: \"\\f105\";\n}\n\n.fa-angle-up:before {\n  content: \"\\f106\";\n}\n\n.fa-angle-down:before {\n  content: \"\\f107\";\n}\n\n.fa-desktop:before {\n  content: \"\\f108\";\n}\n\n.fa-laptop:before {\n  content: \"\\f109\";\n}\n\n.fa-tablet:before {\n  content: \"\\f10a\";\n}\n\n.fa-mobile-phone:before,\n.fa-mobile:before {\n  content: \"\\f10b\";\n}\n\n.fa-circle-o:before {\n  content: \"\\f10c\";\n}\n\n.fa-quote-left:before {\n  content: \"\\f10d\";\n}\n\n.fa-quote-right:before {\n  content: \"\\f10e\";\n}\n\n.fa-spinner:before {\n  content: \"\\f110\";\n}\n\n.fa-circle:before {\n  content: \"\\f111\";\n}\n\n.fa-mail-reply:before,\n.fa-reply:before {\n  content: \"\\f112\";\n}\n\n.fa-github-alt:before {\n  content: \"\\f113\";\n}\n\n.fa-folder-o:before {\n  content: \"\\f114\";\n}\n\n.fa-folder-open-o:before {\n  content: \"\\f115\";\n}\n\n.fa-smile-o:before {\n  content: \"\\f118\";\n}\n\n.fa-frown-o:before {\n  content: \"\\f119\";\n}\n\n.fa-meh-o:before {\n  content: \"\\f11a\";\n}\n\n.fa-gamepad:before {\n  content: \"\\f11b\";\n}\n\n.fa-keyboard-o:before {\n  content: \"\\f11c\";\n}\n\n.fa-flag-o:before {\n  content: \"\\f11d\";\n}\n\n.fa-flag-checkered:before {\n  content: \"\\f11e\";\n}\n\n.fa-terminal:before {\n  content: \"\\f120\";\n}\n\n.fa-code:before {\n  content: \"\\f121\";\n}\n\n.fa-mail-reply-all:before,\n.fa-reply-all:before {\n  content: \"\\f122\";\n}\n\n.fa-star-half-empty:before,\n.fa-star-half-full:before,\n.fa-star-half-o:before {\n  content: \"\\f123\";\n}\n\n.fa-location-arrow:before {\n  content: \"\\f124\";\n}\n\n.fa-crop:before {\n  content: \"\\f125\";\n}\n\n.fa-code-fork:before {\n  content: \"\\f126\";\n}\n\n.fa-unlink:before,\n.fa-chain-broken:before {\n  content: \"\\f127\";\n}\n\n.fa-question:before {\n  content: \"\\f128\";\n}\n\n.fa-info:before {\n  content: \"\\f129\";\n}\n\n.fa-exclamation:before {\n  content: \"\\f12a\";\n}\n\n.fa-superscript:before {\n  content: \"\\f12b\";\n}\n\n.fa-subscript:before {\n  content: \"\\f12c\";\n}\n\n.fa-eraser:before {\n  content: \"\\f12d\";\n}\n\n.fa-puzzle-piece:before {\n  content: \"\\f12e\";\n}\n\n.fa-microphone:before {\n  content: \"\\f130\";\n}\n\n.fa-microphone-slash:before {\n  content: \"\\f131\";\n}\n\n.fa-shield:before {\n  content: \"\\f132\";\n}\n\n.fa-calendar-o:before {\n  content: \"\\f133\";\n}\n\n.fa-fire-extinguisher:before {\n  content: \"\\f134\";\n}\n\n.fa-rocket:before {\n  content: \"\\f135\";\n}\n\n.fa-maxcdn:before {\n  content: \"\\f136\";\n}\n\n.fa-chevron-circle-left:before {\n  content: \"\\f137\";\n}\n\n.fa-chevron-circle-right:before {\n  content: \"\\f138\";\n}\n\n.fa-chevron-circle-up:before {\n  content: \"\\f139\";\n}\n\n.fa-chevron-circle-down:before {\n  content: \"\\f13a\";\n}\n\n.fa-html5:before {\n  content: \"\\f13b\";\n}\n\n.fa-css3:before {\n  content: \"\\f13c\";\n}\n\n.fa-anchor:before {\n  content: \"\\f13d\";\n}\n\n.fa-unlock-alt:before {\n  content: \"\\f13e\";\n}\n\n.fa-bullseye:before {\n  content: \"\\f140\";\n}\n\n.fa-ellipsis-h:before {\n  content: \"\\f141\";\n}\n\n.fa-ellipsis-v:before {\n  content: \"\\f142\";\n}\n\n.fa-rss-square:before {\n  content: \"\\f143\";\n}\n\n.fa-play-circle:before {\n  content: \"\\f144\";\n}\n\n.fa-ticket:before {\n  content: \"\\f145\";\n}\n\n.fa-minus-square:before {\n  content: \"\\f146\";\n}\n\n.fa-minus-square-o:before {\n  content: \"\\f147\";\n}\n\n.fa-level-up:before {\n  content: \"\\f148\";\n}\n\n.fa-level-down:before {\n  content: \"\\f149\";\n}\n\n.fa-check-square:before {\n  content: \"\\f14a\";\n}\n\n.fa-pencil-square:before {\n  content: \"\\f14b\";\n}\n\n.fa-external-link-square:before {\n  content: \"\\f14c\";\n}\n\n.fa-share-square:before {\n  content: \"\\f14d\";\n}\n\n.fa-compass:before {\n  content: \"\\f14e\";\n}\n\n.fa-toggle-down:before,\n.fa-caret-square-o-down:before {\n  content: \"\\f150\";\n}\n\n.fa-toggle-up:before,\n.fa-caret-square-o-up:before {\n  content: \"\\f151\";\n}\n\n.fa-toggle-right:before,\n.fa-caret-square-o-right:before {\n  content: \"\\f152\";\n}\n\n.fa-euro:before,\n.fa-eur:before {\n  content: \"\\f153\";\n}\n\n.fa-gbp:before {\n  content: \"\\f154\";\n}\n\n.fa-dollar:before,\n.fa-usd:before {\n  content: \"\\f155\";\n}\n\n.fa-rupee:before,\n.fa-inr:before {\n  content: \"\\f156\";\n}\n\n.fa-cny:before,\n.fa-rmb:before,\n.fa-yen:before,\n.fa-jpy:before {\n  content: \"\\f157\";\n}\n\n.fa-ruble:before,\n.fa-rouble:before,\n.fa-rub:before {\n  content: \"\\f158\";\n}\n\n.fa-won:before,\n.fa-krw:before {\n  content: \"\\f159\";\n}\n\n.fa-bitcoin:before,\n.fa-btc:before {\n  content: \"\\f15a\";\n}\n\n.fa-file:before {\n  content: \"\\f15b\";\n}\n\n.fa-file-text:before {\n  content: \"\\f15c\";\n}\n\n.fa-sort-alpha-asc:before {\n  content: \"\\f15d\";\n}\n\n.fa-sort-alpha-desc:before {\n  content: \"\\f15e\";\n}\n\n.fa-sort-amount-asc:before {\n  content: \"\\f160\";\n}\n\n.fa-sort-amount-desc:before {\n  content: \"\\f161\";\n}\n\n.fa-sort-numeric-asc:before {\n  content: \"\\f162\";\n}\n\n.fa-sort-numeric-desc:before {\n  content: \"\\f163\";\n}\n\n.fa-thumbs-up:before {\n  content: \"\\f164\";\n}\n\n.fa-thumbs-down:before {\n  content: \"\\f165\";\n}\n\n.fa-youtube-square:before {\n  content: \"\\f166\";\n}\n\n.fa-youtube:before {\n  content: \"\\f167\";\n}\n\n.fa-xing:before {\n  content: \"\\f168\";\n}\n\n.fa-xing-square:before {\n  content: \"\\f169\";\n}\n\n.fa-youtube-play:before {\n  content: \"\\f16a\";\n}\n\n.fa-dropbox:before {\n  content: \"\\f16b\";\n}\n\n.fa-stack-overflow:before {\n  content: \"\\f16c\";\n}\n\n.fa-instagram:before {\n  content: \"\\f16d\";\n}\n\n.fa-flickr:before {\n  content: \"\\f16e\";\n}\n\n.fa-adn:before {\n  content: \"\\f170\";\n}\n\n.fa-bitbucket:before {\n  content: \"\\f171\";\n}\n\n.fa-bitbucket-square:before {\n  content: \"\\f172\";\n}\n\n.fa-tumblr:before {\n  content: \"\\f173\";\n}\n\n.fa-tumblr-square:before {\n  content: \"\\f174\";\n}\n\n.fa-long-arrow-down:before {\n  content: \"\\f175\";\n}\n\n.fa-long-arrow-up:before {\n  content: \"\\f176\";\n}\n\n.fa-long-arrow-left:before {\n  content: \"\\f177\";\n}\n\n.fa-long-arrow-right:before {\n  content: \"\\f178\";\n}\n\n.fa-apple:before {\n  content: \"\\f179\";\n}\n\n.fa-windows:before {\n  content: \"\\f17a\";\n}\n\n.fa-android:before {\n  content: \"\\f17b\";\n}\n\n.fa-linux:before {\n  content: \"\\f17c\";\n}\n\n.fa-dribbble:before {\n  content: \"\\f17d\";\n}\n\n.fa-skype:before {\n  content: \"\\f17e\";\n}\n\n.fa-foursquare:before {\n  content: \"\\f180\";\n}\n\n.fa-trello:before {\n  content: \"\\f181\";\n}\n\n.fa-female:before {\n  content: \"\\f182\";\n}\n\n.fa-male:before {\n  content: \"\\f183\";\n}\n\n.fa-gittip:before,\n.fa-gratipay:before {\n  content: \"\\f184\";\n}\n\n.fa-sun-o:before {\n  content: \"\\f185\";\n}\n\n.fa-moon-o:before {\n  content: \"\\f186\";\n}\n\n.fa-archive:before {\n  content: \"\\f187\";\n}\n\n.fa-bug:before {\n  content: \"\\f188\";\n}\n\n.fa-vk:before {\n  content: \"\\f189\";\n}\n\n.fa-weibo:before {\n  content: \"\\f18a\";\n}\n\n.fa-renren:before {\n  content: \"\\f18b\";\n}\n\n.fa-pagelines:before {\n  content: \"\\f18c\";\n}\n\n.fa-stack-exchange:before {\n  content: \"\\f18d\";\n}\n\n.fa-arrow-circle-o-right:before {\n  content: \"\\f18e\";\n}\n\n.fa-arrow-circle-o-left:before {\n  content: \"\\f190\";\n}\n\n.fa-toggle-left:before,\n.fa-caret-square-o-left:before {\n  content: \"\\f191\";\n}\n\n.fa-dot-circle-o:before {\n  content: \"\\f192\";\n}\n\n.fa-wheelchair:before {\n  content: \"\\f193\";\n}\n\n.fa-vimeo-square:before {\n  content: \"\\f194\";\n}\n\n.fa-turkish-lira:before,\n.fa-try:before {\n  content: \"\\f195\";\n}\n\n.fa-plus-square-o:before {\n  content: \"\\f196\";\n}\n\n.fa-space-shuttle:before {\n  content: \"\\f197\";\n}\n\n.fa-slack:before {\n  content: \"\\f198\";\n}\n\n.fa-envelope-square:before {\n  content: \"\\f199\";\n}\n\n.fa-wordpress:before {\n  content: \"\\f19a\";\n}\n\n.fa-openid:before {\n  content: \"\\f19b\";\n}\n\n.fa-institution:before,\n.fa-bank:before,\n.fa-university:before {\n  content: \"\\f19c\";\n}\n\n.fa-mortar-board:before,\n.fa-graduation-cap:before {\n  content: \"\\f19d\";\n}\n\n.fa-yahoo:before {\n  content: \"\\f19e\";\n}\n\n.fa-google:before {\n  content: \"\\f1a0\";\n}\n\n.fa-reddit:before {\n  content: \"\\f1a1\";\n}\n\n.fa-reddit-square:before {\n  content: \"\\f1a2\";\n}\n\n.fa-stumbleupon-circle:before {\n  content: \"\\f1a3\";\n}\n\n.fa-stumbleupon:before {\n  content: \"\\f1a4\";\n}\n\n.fa-delicious:before {\n  content: \"\\f1a5\";\n}\n\n.fa-digg:before {\n  content: \"\\f1a6\";\n}\n\n.fa-pied-piper:before {\n  content: \"\\f1a7\";\n}\n\n.fa-pied-piper-alt:before {\n  content: \"\\f1a8\";\n}\n\n.fa-drupal:before {\n  content: \"\\f1a9\";\n}\n\n.fa-joomla:before {\n  content: \"\\f1aa\";\n}\n\n.fa-language:before {\n  content: \"\\f1ab\";\n}\n\n.fa-fax:before {\n  content: \"\\f1ac\";\n}\n\n.fa-building:before {\n  content: \"\\f1ad\";\n}\n\n.fa-child:before {\n  content: \"\\f1ae\";\n}\n\n.fa-paw:before {\n  content: \"\\f1b0\";\n}\n\n.fa-spoon:before {\n  content: \"\\f1b1\";\n}\n\n.fa-cube:before {\n  content: \"\\f1b2\";\n}\n\n.fa-cubes:before {\n  content: \"\\f1b3\";\n}\n\n.fa-behance:before {\n  content: \"\\f1b4\";\n}\n\n.fa-behance-square:before {\n  content: \"\\f1b5\";\n}\n\n.fa-steam:before {\n  content: \"\\f1b6\";\n}\n\n.fa-steam-square:before {\n  content: \"\\f1b7\";\n}\n\n.fa-recycle:before {\n  content: \"\\f1b8\";\n}\n\n.fa-automobile:before,\n.fa-car:before {\n  content: \"\\f1b9\";\n}\n\n.fa-cab:before,\n.fa-taxi:before {\n  content: \"\\f1ba\";\n}\n\n.fa-tree:before {\n  content: \"\\f1bb\";\n}\n\n.fa-spotify:before {\n  content: \"\\f1bc\";\n}\n\n.fa-deviantart:before {\n  content: \"\\f1bd\";\n}\n\n.fa-soundcloud:before {\n  content: \"\\f1be\";\n}\n\n.fa-database:before {\n  content: \"\\f1c0\";\n}\n\n.fa-file-pdf-o:before {\n  content: \"\\f1c1\";\n}\n\n.fa-file-word-o:before {\n  content: \"\\f1c2\";\n}\n\n.fa-file-excel-o:before {\n  content: \"\\f1c3\";\n}\n\n.fa-file-powerpoint-o:before {\n  content: \"\\f1c4\";\n}\n\n.fa-file-photo-o:before,\n.fa-file-picture-o:before,\n.fa-file-image-o:before {\n  content: \"\\f1c5\";\n}\n\n.fa-file-zip-o:before,\n.fa-file-archive-o:before {\n  content: \"\\f1c6\";\n}\n\n.fa-file-sound-o:before,\n.fa-file-audio-o:before {\n  content: \"\\f1c7\";\n}\n\n.fa-file-movie-o:before,\n.fa-file-video-o:before {\n  content: \"\\f1c8\";\n}\n\n.fa-file-code-o:before {\n  content: \"\\f1c9\";\n}\n\n.fa-vine:before {\n  content: \"\\f1ca\";\n}\n\n.fa-codepen:before {\n  content: \"\\f1cb\";\n}\n\n.fa-jsfiddle:before {\n  content: \"\\f1cc\";\n}\n\n.fa-life-bouy:before,\n.fa-life-buoy:before,\n.fa-life-saver:before,\n.fa-support:before,\n.fa-life-ring:before {\n  content: \"\\f1cd\";\n}\n\n.fa-circle-o-notch:before {\n  content: \"\\f1ce\";\n}\n\n.fa-ra:before,\n.fa-rebel:before {\n  content: \"\\f1d0\";\n}\n\n.fa-ge:before,\n.fa-empire:before {\n  content: \"\\f1d1\";\n}\n\n.fa-git-square:before {\n  content: \"\\f1d2\";\n}\n\n.fa-git:before {\n  content: \"\\f1d3\";\n}\n\n.fa-hacker-news:before {\n  content: \"\\f1d4\";\n}\n\n.fa-tencent-weibo:before {\n  content: \"\\f1d5\";\n}\n\n.fa-qq:before {\n  content: \"\\f1d6\";\n}\n\n.fa-wechat:before,\n.fa-weixin:before {\n  content: \"\\f1d7\";\n}\n\n.fa-send:before,\n.fa-paper-plane:before {\n  content: \"\\f1d8\";\n}\n\n.fa-send-o:before,\n.fa-paper-plane-o:before {\n  content: \"\\f1d9\";\n}\n\n.fa-history:before {\n  content: \"\\f1da\";\n}\n\n.fa-genderless:before,\n.fa-circle-thin:before {\n  content: \"\\f1db\";\n}\n\n.fa-header:before {\n  content: \"\\f1dc\";\n}\n\n.fa-paragraph:before {\n  content: \"\\f1dd\";\n}\n\n.fa-sliders:before {\n  content: \"\\f1de\";\n}\n\n.fa-share-alt:before {\n  content: \"\\f1e0\";\n}\n\n.fa-share-alt-square:before {\n  content: \"\\f1e1\";\n}\n\n.fa-bomb:before {\n  content: \"\\f1e2\";\n}\n\n.fa-soccer-ball-o:before,\n.fa-futbol-o:before {\n  content: \"\\f1e3\";\n}\n\n.fa-tty:before {\n  content: \"\\f1e4\";\n}\n\n.fa-binoculars:before {\n  content: \"\\f1e5\";\n}\n\n.fa-plug:before {\n  content: \"\\f1e6\";\n}\n\n.fa-slideshare:before {\n  content: \"\\f1e7\";\n}\n\n.fa-twitch:before {\n  content: \"\\f1e8\";\n}\n\n.fa-yelp:before {\n  content: \"\\f1e9\";\n}\n\n.fa-newspaper-o:before {\n  content: \"\\f1ea\";\n}\n\n.fa-wifi:before {\n  content: \"\\f1eb\";\n}\n\n.fa-calculator:before {\n  content: \"\\f1ec\";\n}\n\n.fa-paypal:before {\n  content: \"\\f1ed\";\n}\n\n.fa-google-wallet:before {\n  content: \"\\f1ee\";\n}\n\n.fa-cc-visa:before {\n  content: \"\\f1f0\";\n}\n\n.fa-cc-mastercard:before {\n  content: \"\\f1f1\";\n}\n\n.fa-cc-discover:before {\n  content: \"\\f1f2\";\n}\n\n.fa-cc-amex:before {\n  content: \"\\f1f3\";\n}\n\n.fa-cc-paypal:before {\n  content: \"\\f1f4\";\n}\n\n.fa-cc-stripe:before {\n  content: \"\\f1f5\";\n}\n\n.fa-bell-slash:before {\n  content: \"\\f1f6\";\n}\n\n.fa-bell-slash-o:before {\n  content: \"\\f1f7\";\n}\n\n.fa-trash:before {\n  content: \"\\f1f8\";\n}\n\n.fa-copyright:before {\n  content: \"\\f1f9\";\n}\n\n.fa-at:before {\n  content: \"\\f1fa\";\n}\n\n.fa-eyedropper:before {\n  content: \"\\f1fb\";\n}\n\n.fa-paint-brush:before {\n  content: \"\\f1fc\";\n}\n\n.fa-birthday-cake:before {\n  content: \"\\f1fd\";\n}\n\n.fa-area-chart:before {\n  content: \"\\f1fe\";\n}\n\n.fa-pie-chart:before {\n  content: \"\\f200\";\n}\n\n.fa-line-chart:before {\n  content: \"\\f201\";\n}\n\n.fa-lastfm:before {\n  content: \"\\f202\";\n}\n\n.fa-lastfm-square:before {\n  content: \"\\f203\";\n}\n\n.fa-toggle-off:before {\n  content: \"\\f204\";\n}\n\n.fa-toggle-on:before {\n  content: \"\\f205\";\n}\n\n.fa-bicycle:before {\n  content: \"\\f206\";\n}\n\n.fa-bus:before {\n  content: \"\\f207\";\n}\n\n.fa-ioxhost:before {\n  content: \"\\f208\";\n}\n\n.fa-angellist:before {\n  content: \"\\f209\";\n}\n\n.fa-cc:before {\n  content: \"\\f20a\";\n}\n\n.fa-shekel:before,\n.fa-sheqel:before,\n.fa-ils:before {\n  content: \"\\f20b\";\n}\n\n.fa-meanpath:before {\n  content: \"\\f20c\";\n}\n\n.fa-buysellads:before {\n  content: \"\\f20d\";\n}\n\n.fa-connectdevelop:before {\n  content: \"\\f20e\";\n}\n\n.fa-dashcube:before {\n  content: \"\\f210\";\n}\n\n.fa-forumbee:before {\n  content: \"\\f211\";\n}\n\n.fa-leanpub:before {\n  content: \"\\f212\";\n}\n\n.fa-sellsy:before {\n  content: \"\\f213\";\n}\n\n.fa-shirtsinbulk:before {\n  content: \"\\f214\";\n}\n\n.fa-simplybuilt:before {\n  content: \"\\f215\";\n}\n\n.fa-skyatlas:before {\n  content: \"\\f216\";\n}\n\n.fa-cart-plus:before {\n  content: \"\\f217\";\n}\n\n.fa-cart-arrow-down:before {\n  content: \"\\f218\";\n}\n\n.fa-diamond:before {\n  content: \"\\f219\";\n}\n\n.fa-ship:before {\n  content: \"\\f21a\";\n}\n\n.fa-user-secret:before {\n  content: \"\\f21b\";\n}\n\n.fa-motorcycle:before {\n  content: \"\\f21c\";\n}\n\n.fa-street-view:before {\n  content: \"\\f21d\";\n}\n\n.fa-heartbeat:before {\n  content: \"\\f21e\";\n}\n\n.fa-venus:before {\n  content: \"\\f221\";\n}\n\n.fa-mars:before {\n  content: \"\\f222\";\n}\n\n.fa-mercury:before {\n  content: \"\\f223\";\n}\n\n.fa-transgender:before {\n  content: \"\\f224\";\n}\n\n.fa-transgender-alt:before {\n  content: \"\\f225\";\n}\n\n.fa-venus-double:before {\n  content: \"\\f226\";\n}\n\n.fa-mars-double:before {\n  content: \"\\f227\";\n}\n\n.fa-venus-mars:before {\n  content: \"\\f228\";\n}\n\n.fa-mars-stroke:before {\n  content: \"\\f229\";\n}\n\n.fa-mars-stroke-v:before {\n  content: \"\\f22a\";\n}\n\n.fa-mars-stroke-h:before {\n  content: \"\\f22b\";\n}\n\n.fa-neuter:before {\n  content: \"\\f22c\";\n}\n\n.fa-facebook-official:before {\n  content: \"\\f230\";\n}\n\n.fa-pinterest-p:before {\n  content: \"\\f231\";\n}\n\n.fa-whatsapp:before {\n  content: \"\\f232\";\n}\n\n.fa-server:before {\n  content: \"\\f233\";\n}\n\n.fa-user-plus:before {\n  content: \"\\f234\";\n}\n\n.fa-user-times:before {\n  content: \"\\f235\";\n}\n\n.fa-hotel:before,\n.fa-bed:before {\n  content: \"\\f236\";\n}\n\n.fa-viacoin:before {\n  content: \"\\f237\";\n}\n\n.fa-train:before {\n  content: \"\\f238\";\n}\n\n.fa-subway:before {\n  content: \"\\f239\";\n}\n\n.fa-medium:before {\n  content: \"\\f23a\";\n}\n\n/*! prefixes.scss v0.1.0 | Author: Pandao | https://github.com/pandao/prefixes.scss | MIT license | Copyright (c) 2015 */\n@font-face {\n  font-family: 'editormd-logo';\n  src: url(\"../fonts/editormd-logo.eot?-5y8q6h\");\n  src: url(\".../fonts/editormd-logo.eot?#iefix-5y8q6h\") format(\"embedded-opentype\"), url(\"../fonts/editormd-logo.woff?-5y8q6h\") format(\"woff\"), url(\"../fonts/editormd-logo.ttf?-5y8q6h\") format(\"truetype\"), url(\"../fonts/editormd-logo.svg?-5y8q6h#icomoon\") format(\"svg\");\n  font-weight: normal;\n  font-style: normal;\n}\n.editormd-logo,\n.editormd-logo-1x,\n.editormd-logo-2x,\n.editormd-logo-3x,\n.editormd-logo-4x,\n.editormd-logo-5x,\n.editormd-logo-6x,\n.editormd-logo-7x,\n.editormd-logo-8x {\n  font-family: 'editormd-logo';\n  speak: none;\n  font-style: normal;\n  font-weight: normal;\n  font-variant: normal;\n  text-transform: none;\n  font-size: inherit;\n  line-height: 1;\n  display: inline-block;\n  text-rendering: auto;\n  vertical-align: inherit;\n  -webkit-font-smoothing: antialiased;\n  -moz-osx-font-smoothing: grayscale;\n}\n.editormd-logo:before,\n.editormd-logo-1x:before,\n.editormd-logo-2x:before,\n.editormd-logo-3x:before,\n.editormd-logo-4x:before,\n.editormd-logo-5x:before,\n.editormd-logo-6x:before,\n.editormd-logo-7x:before,\n.editormd-logo-8x:before {\n  content: \"\\e1987\";\n  /* \n  HTML Entity &#xe1987; \n  example: <span class=\"editormd-logo\">&#xe1987;</span>\n  */\n}\n\n.editormd-logo-1x {\n  font-size: 1em;\n}\n\n.editormd-logo-lg {\n  font-size: 1.2em;\n}\n\n.editormd-logo-2x {\n  font-size: 2em;\n}\n\n.editormd-logo-3x {\n  font-size: 3em;\n}\n\n.editormd-logo-4x {\n  font-size: 4em;\n}\n\n.editormd-logo-5x {\n  font-size: 5em;\n}\n\n.editormd-logo-6x {\n  font-size: 6em;\n}\n\n.editormd-logo-7x {\n  font-size: 7em;\n}\n\n.editormd-logo-8x {\n  font-size: 8em;\n}\n\n.editormd-logo-color {\n  color: #2196F3;\n}\n\n/*! github-markdown-css | The MIT License (MIT) | Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com) | https://github.com/sindresorhus/github-markdown-css */\n@font-face {\n  font-family: octicons-anchor;\n  src: url(data:font/woff;charset=utf-8;base64,d09GRgABAAAAAAYcAA0AAAAACjQAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABGRlRNAAABMAAAABwAAAAca8vGTk9TLzIAAAFMAAAARAAAAFZG1VHVY21hcAAAAZAAAAA+AAABQgAP9AdjdnQgAAAB0AAAAAQAAAAEACICiGdhc3AAAAHUAAAACAAAAAj//wADZ2x5ZgAAAdwAAADRAAABEKyikaNoZWFkAAACsAAAAC0AAAA2AtXoA2hoZWEAAALgAAAAHAAAACQHngNFaG10eAAAAvwAAAAQAAAAEAwAACJsb2NhAAADDAAAAAoAAAAKALIAVG1heHAAAAMYAAAAHwAAACABEAB2bmFtZQAAAzgAAALBAAAFu3I9x/Nwb3N0AAAF/AAAAB0AAAAvaoFvbwAAAAEAAAAAzBdyYwAAAADP2IQvAAAAAM/bz7t4nGNgZGFgnMDAysDB1Ml0hoGBoR9CM75mMGLkYGBgYmBlZsAKAtJcUxgcPsR8iGF2+O/AEMPsznAYKMwIkgMA5REMOXicY2BgYGaAYBkGRgYQsAHyGMF8FgYFIM0ChED+h5j//yEk/3KoSgZGNgYYk4GRCUgwMaACRoZhDwCs7QgGAAAAIgKIAAAAAf//AAJ4nHWMMQrCQBBF/0zWrCCIKUQsTDCL2EXMohYGSSmorScInsRGL2DOYJe0Ntp7BK+gJ1BxF1stZvjz/v8DRghQzEc4kIgKwiAppcA9LtzKLSkdNhKFY3HF4lK69ExKslx7Xa+vPRVS43G98vG1DnkDMIBUgFN0MDXflU8tbaZOUkXUH0+U27RoRpOIyCKjbMCVejwypzJJG4jIwb43rfl6wbwanocrJm9XFYfskuVC5K/TPyczNU7b84CXcbxks1Un6H6tLH9vf2LRnn8Ax7A5WQAAAHicY2BkYGAA4teL1+yI57f5ysDNwgAC529f0kOmWRiYVgEpDgYmEA8AUzEKsQAAAHicY2BkYGB2+O/AEMPCAAJAkpEBFbAAADgKAe0EAAAiAAAAAAQAAAAEAAAAAAAAKgAqACoAiAAAeJxjYGRgYGBhsGFgYgABEMkFhAwM/xn0QAIAD6YBhwB4nI1Ty07cMBS9QwKlQapQW3VXySvEqDCZGbGaHULiIQ1FKgjWMxknMfLEke2A+IJu+wntrt/QbVf9gG75jK577Lg8K1qQPCfnnnt8fX1NRC/pmjrk/zprC+8D7tBy9DHgBXoWfQ44Av8t4Bj4Z8CLtBL9CniJluPXASf0Lm4CXqFX8Q84dOLnMB17N4c7tBo1AS/Qi+hTwBH4rwHHwN8DXqQ30XXAS7QaLwSc0Gn8NuAVWou/gFmnjLrEaEh9GmDdDGgL3B4JsrRPDU2hTOiMSuJUIdKQQayiAth69r6akSSFqIJuA19TrzCIaY8sIoxyrNIrL//pw7A2iMygkX5vDj+G+kuoLdX4GlGK/8Lnlz6/h9MpmoO9rafrz7ILXEHHaAx95s9lsI7AHNMBWEZHULnfAXwG9/ZqdzLI08iuwRloXE8kfhXYAvE23+23DU3t626rbs8/8adv+9DWknsHp3E17oCf+Z48rvEQNZ78paYM38qfk3v/u3l3u3GXN2Dmvmvpf1Srwk3pB/VSsp512bA/GG5i2WJ7wu430yQ5K3nFGiOqgtmSB5pJVSizwaacmUZzZhXLlZTq8qGGFY2YcSkqbth6aW1tRmlaCFs2016m5qn36SbJrqosG4uMV4aP2PHBmB3tjtmgN2izkGQyLWprekbIntJFing32a5rKWCN/SdSoga45EJykyQ7asZvHQ8PTm6cslIpwyeyjbVltNikc2HTR7YKh9LBl9DADC0U/jLcBZDKrMhUBfQBvXRzLtFtjU9eNHKin0x5InTqb8lNpfKv1s1xHzTXRqgKzek/mb7nB8RZTCDhGEX3kK/8Q75AmUM/eLkfA+0Hi908Kx4eNsMgudg5GLdRD7a84npi+YxNr5i5KIbW5izXas7cHXIMAau1OueZhfj+cOcP3P8MNIWLyYOBuxL6DRylJ4cAAAB4nGNgYoAALjDJyIAOWMCiTIxMLDmZedkABtIBygAAAA==) format(\"woff\");\n}\n.markdown-body {\n  -ms-text-size-adjust: 100%;\n  -webkit-text-size-adjust: 100%;\n  color: #333;\n  overflow: hidden;\n  font-family: \"Microsoft YaHei\", Helvetica, \"Meiryo UI\", \"Malgun Gothic\", \"Segoe UI\", \"Trebuchet MS\", \"Monaco\", monospace, Tahoma, STXihei, \"华文细黑\", STHeiti, \"Helvetica Neue\", \"Droid Sans\", \"wenquanyi micro hei\", FreeSans, Arimo, Arial, SimSun, \"宋体\", Heiti, \"黑体\", sans-serif;\n  font-size: 16px;\n  line-height: 1.6;\n  word-wrap: break-word;\n}\n\n.markdown-body a {\n  background: transparent;\n}\n\n.markdown-body a:active,\n.markdown-body a:hover {\n  outline: 0;\n}\n\n.markdown-body strong {\n  font-weight: bold;\n}\n\n.markdown-body h1 {\n  font-size: 2em;\n  margin: 0.67em 0;\n}\n\n.markdown-body img {\n  border: 0;\n}\n\n.markdown-body hr {\n  -moz-box-sizing: content-box;\n  box-sizing: content-box;\n  height: 0;\n}\n\n.markdown-body pre {\n  overflow: auto;\n}\n\n.markdown-body code,\n.markdown-body kbd,\n.markdown-body pre {\n  font-family: \"Meiryo UI\", \"YaHei Consolas Hybrid\", Consolas, \"Malgun Gothic\", \"Segoe UI\", \"Trebuchet MS\", Helvetica, monospace, monospace;\n  font-size: 1em;\n}\n\n.markdown-body input {\n  color: inherit;\n  font: inherit;\n  margin: 0;\n}\n\n.markdown-body html input[disabled] {\n  cursor: default;\n}\n\n.markdown-body input {\n  line-height: normal;\n}\n\n.markdown-body input[type=\"checkbox\"] {\n  -moz-box-sizing: border-box;\n  box-sizing: border-box;\n  padding: 0;\n}\n\n.markdown-body table {\n  border-collapse: collapse;\n  border-spacing: 0;\n}\n\n.markdown-body td,\n.markdown-body th {\n  padding: 0;\n}\n\n.markdown-body * {\n  -moz-box-sizing: border-box;\n  box-sizing: border-box;\n}\n\n.markdown-body input {\n  font: 13px/1.4 Helvetica, arial, freesans, clean, sans-serif, \"Segoe UI Emoji\", \"Segoe UI Symbol\";\n}\n\n.markdown-body a {\n  color: #4183c4;\n  text-decoration: none;\n}\n\n.markdown-body a:hover,\n.markdown-body a:active {\n  text-decoration: underline;\n}\n\n.markdown-body hr {\n  height: 0;\n  margin: 15px 0;\n  overflow: hidden;\n  background: transparent;\n  border: 0;\n  border-bottom: 1px solid #ddd;\n}\n\n.markdown-body hr:before {\n  display: table;\n  content: \"\";\n}\n\n.markdown-body hr:after {\n  display: table;\n  clear: both;\n  content: \"\";\n}\n\n.markdown-body h1,\n.markdown-body h2,\n.markdown-body h3,\n.markdown-body h4,\n.markdown-body h5,\n.markdown-body h6 {\n  margin-top: 15px;\n  margin-bottom: 15px;\n  line-height: 1.1;\n}\n\n.markdown-body h1 {\n  font-size: 30px;\n}\n\n.markdown-body h2 {\n  font-size: 21px;\n}\n\n.markdown-body h3 {\n  font-size: 16px;\n}\n\n.markdown-body h4 {\n  font-size: 14px;\n}\n\n.markdown-body h5 {\n  font-size: 12px;\n}\n\n.markdown-body h6 {\n  font-size: 11px;\n}\n\n.markdown-body blockquote {\n  margin: 0;\n}\n\n.markdown-body ul,\n.markdown-body ol {\n  padding: 0;\n  margin-top: 0;\n  margin-bottom: 0;\n}\n\n.markdown-body ol ol,\n.markdown-body ul ol {\n  list-style-type: lower-roman;\n}\n\n.markdown-body ul ul ol,\n.markdown-body ul ol ol,\n.markdown-body ol ul ol,\n.markdown-body ol ol ol {\n  list-style-type: lower-alpha;\n}\n\n.markdown-body dd {\n  margin-left: 0;\n}\n\n.markdown-body code {\n  font-family: Consolas, \"Liberation Mono\", Menlo, Courier, monospace;\n  font-size: 12px;\n}\n\n.markdown-body pre {\n  margin-top: 0;\n  margin-bottom: 0;\n  font: 12px Consolas, \"Liberation Mono\", Menlo, Courier, monospace;\n}\n\n.markdown-body .octicon {\n  font: normal normal 16px octicons-anchor;\n  line-height: 1;\n  display: inline-block;\n  text-decoration: none;\n  -webkit-font-smoothing: antialiased;\n  -moz-osx-font-smoothing: grayscale;\n  -webkit-user-select: none;\n  -moz-user-select: none;\n  -ms-user-select: none;\n  user-select: none;\n}\n\n.markdown-body .octicon-link:before {\n  content: '\\f05c';\n}\n\n.markdown-body > *:first-child {\n  margin-top: 0 !important;\n}\n\n.markdown-body > *:last-child {\n  margin-bottom: 0 !important;\n}\n\n.markdown-body .anchor {\n  position: absolute;\n  top: 0;\n  left: 0;\n  display: block;\n  padding-right: 6px;\n  padding-left: 30px;\n  margin-left: -30px;\n}\n\n.markdown-body .anchor:focus {\n  outline: none;\n}\n\n.markdown-body h1,\n.markdown-body h2,\n.markdown-body h3,\n.markdown-body h4,\n.markdown-body h5,\n.markdown-body h6 {\n  position: relative;\n  margin-top: 1em;\n  margin-bottom: 16px;\n  font-weight: bold;\n  line-height: 1.4;\n}\n\n.markdown-body h1 .octicon-link,\n.markdown-body h2 .octicon-link,\n.markdown-body h3 .octicon-link,\n.markdown-body h4 .octicon-link,\n.markdown-body h5 .octicon-link,\n.markdown-body h6 .octicon-link {\n  display: none;\n  color: #000;\n  vertical-align: middle;\n}\n\n.markdown-body h1:hover .anchor,\n.markdown-body h2:hover .anchor,\n.markdown-body h3:hover .anchor,\n.markdown-body h4:hover .anchor,\n.markdown-body h5:hover .anchor,\n.markdown-body h6:hover .anchor {\n  padding-left: 8px;\n  margin-left: -30px;\n  text-decoration: none;\n}\n\n.markdown-body h1:hover .anchor .octicon-link,\n.markdown-body h2:hover .anchor .octicon-link,\n.markdown-body h3:hover .anchor .octicon-link,\n.markdown-body h4:hover .anchor .octicon-link,\n.markdown-body h5:hover .anchor .octicon-link,\n.markdown-body h6:hover .anchor .octicon-link {\n  display: inline-block;\n}\n\n.markdown-body h1 {\n  padding-bottom: 0.3em;\n  font-size: 2.25em;\n  line-height: 1.2;\n  border-bottom: 1px solid #eee;\n}\n\n.markdown-body h1 .anchor {\n  line-height: 1;\n}\n\n.markdown-body h2 {\n  padding-bottom: 0.3em;\n  font-size: 1.75em;\n  line-height: 1.225;\n  border-bottom: 1px solid #eee;\n}\n\n.markdown-body h2 .anchor {\n  line-height: 1;\n}\n\n.markdown-body h3 {\n  font-size: 1.5em;\n  line-height: 1.43;\n}\n\n.markdown-body h3 .anchor {\n  line-height: 1.2;\n}\n\n.markdown-body h4 {\n  font-size: 1.25em;\n}\n\n.markdown-body h4 .anchor {\n  line-height: 1.2;\n}\n\n.markdown-body h5 {\n  font-size: 1em;\n}\n\n.markdown-body h5 .anchor {\n  line-height: 1.1;\n}\n\n.markdown-body h6 {\n  font-size: 1em;\n  color: #777;\n}\n\n.markdown-body h6 .anchor {\n  line-height: 1.1;\n}\n\n.markdown-body p,\n.markdown-body blockquote,\n.markdown-body ul,\n.markdown-body ol,\n.markdown-body dl,\n.markdown-body table,\n.markdown-body pre {\n  margin-top: 0;\n  margin-bottom: 16px;\n}\n\n/*\n.markdown-body hr {\n  height: 4px;\n  padding: 0;\n  margin: 16px 0;\n  background-color: #e7e7e7;\n  border: 0 none;\n}*/\n.markdown-body ul,\n.markdown-body ol {\n  padding-left: 2em;\n}\n\n.markdown-body ul ul,\n.markdown-body ul ol,\n.markdown-body ol ol,\n.markdown-body ol ul {\n  margin-top: 0;\n  margin-bottom: 0;\n}\n\n.markdown-body li > p {\n  margin-top: 16px;\n}\n\n.markdown-body dl {\n  padding: 0;\n}\n\n.markdown-body dl dt {\n  padding: 0;\n  margin-top: 16px;\n  font-size: 1em;\n  font-style: italic;\n  font-weight: bold;\n}\n\n.markdown-body dl dd {\n  padding: 0 16px;\n  margin-bottom: 16px;\n}\n\n.markdown-body blockquote {\n  padding: 0 15px;\n  color: #777;\n  border-left: 4px solid #ddd;\n}\n\n.markdown-body blockquote > :first-child {\n  margin-top: 0;\n}\n\n.markdown-body blockquote > :last-child {\n  margin-bottom: 0;\n}\n\n.markdown-body table {\n  display: block;\n  width: 100%;\n  overflow: auto;\n  word-break: normal;\n  word-break: keep-all;\n}\n\n.markdown-body table th {\n  font-weight: bold;\n}\n\n.markdown-body table th,\n.markdown-body table td {\n  padding: 6px 13px;\n  border: 1px solid #ddd;\n}\n\n.markdown-body table tr {\n  background-color: #fff;\n  border-top: 1px solid #ccc;\n}\n\n.markdown-body table tr:nth-child(2n) {\n  background-color: #f8f8f8;\n}\n\n\n.markdown-body img, .markdown-body video {\n  max-width: 100%;\n  -moz-box-sizing: border-box;\n  box-sizing: border-box;\n}\n\n.markdown-body code {\n  padding: 0;\n  padding-top: 0.2em;\n  padding-bottom: 0.2em;\n  margin: 0;\n  font-size: 85%;\n  background-color: rgba(0, 0, 0, 0.04);\n  border-radius: 3px;\n}\n\n.markdown-body code:before,\n.markdown-body code:after {\n  letter-spacing: -0.2em;\n  content: \"\\00a0\";\n}\n\n.markdown-body pre > code {\n  padding: 0;\n  margin: 0;\n  font-size: 100%;\n  word-break: normal;\n  white-space: pre;\n  background: transparent;\n  border: 0;\n}\n\n.markdown-body .highlight {\n  margin-bottom: 16px;\n}\n\n.markdown-body .highlight pre,\n.markdown-body pre {\n  padding: 16px;\n  overflow: auto;\n  font-size: 85%;\n  line-height: 1.45;\n  border-radius: 3px;\n}\n\n.markdown-body .highlight pre {\n  margin-bottom: 0;\n  word-break: normal;\n}\n\n.markdown-body pre {\n  word-wrap: normal;\n}\n\n.markdown-body pre code {\n  display: inline;\n  max-width: initial;\n  padding: 0;\n  margin: 0;\n  overflow: initial;\n  line-height: inherit;\n  word-wrap: normal;\n  border: 0;\n}\n\n.markdown-body pre code:before,\n.markdown-body pre code:after {\n  content: normal;\n}\n\n.markdown-body kbd {\n  display: inline-block;\n  padding: 3px 5px;\n  font-size: 11px;\n  line-height: 10px;\n  color: #555;\n  vertical-align: middle;\n  background-color: #fcfcfc;\n  border: solid 1px #ccc;\n  border-bottom-color: #bbb;\n  border-radius: 3px;\n  box-shadow: inset 0 -1px 0 #bbb;\n}\n\n.markdown-body .pl-c {\n  color: #969896;\n}\n\n.markdown-body .pl-c1,\n.markdown-body .pl-mdh,\n.markdown-body .pl-mm,\n.markdown-body .pl-mp,\n.markdown-body .pl-mr,\n.markdown-body .pl-s1 .pl-v,\n.markdown-body .pl-s3,\n.markdown-body .pl-sc,\n.markdown-body .pl-sv {\n  color: #0086b3;\n}\n\n.markdown-body .pl-e,\n.markdown-body .pl-en {\n  color: #795da3;\n}\n\n.markdown-body .pl-s1 .pl-s2,\n.markdown-body .pl-smi,\n.markdown-body .pl-smp,\n.markdown-body .pl-stj,\n.markdown-body .pl-vo,\n.markdown-body .pl-vpf {\n  color: #333;\n}\n\n.markdown-body .pl-ent {\n  color: #63a35c;\n}\n\n.markdown-body .pl-k,\n.markdown-body .pl-s,\n.markdown-body .pl-st {\n  color: #a71d5d;\n}\n\n.markdown-body .pl-pds,\n.markdown-body .pl-s1,\n.markdown-body .pl-s1 .pl-pse .pl-s2,\n.markdown-body .pl-sr,\n.markdown-body .pl-sr .pl-cce,\n.markdown-body .pl-sr .pl-sra,\n.markdown-body .pl-sr .pl-sre,\n.markdown-body .pl-src {\n  color: #df5000;\n}\n\n.markdown-body .pl-mo,\n.markdown-body .pl-v {\n  color: #1d3e81;\n}\n\n.markdown-body .pl-id {\n  color: #b52a1d;\n}\n\n.markdown-body .pl-ii {\n  background-color: #b52a1d;\n  color: #f8f8f8;\n}\n\n.markdown-body .pl-sr .pl-cce {\n  color: #63a35c;\n  font-weight: bold;\n}\n\n.markdown-body .pl-ml {\n  color: #693a17;\n}\n\n.markdown-body .pl-mh,\n.markdown-body .pl-mh .pl-en,\n.markdown-body .pl-ms {\n  color: #1d3e81;\n  font-weight: bold;\n}\n\n.markdown-body .pl-mq {\n  color: #008080;\n}\n\n.markdown-body .pl-mi {\n  color: #333;\n  font-style: italic;\n}\n\n.markdown-body .pl-mb {\n  color: #333;\n  font-weight: bold;\n}\n\n.markdown-body .pl-md,\n.markdown-body .pl-mdhf {\n  background-color: #ffecec;\n  color: #bd2c00;\n}\n\n.markdown-body .pl-mdht,\n.markdown-body .pl-mi1 {\n  background-color: #eaffea;\n  color: #55a532;\n}\n\n.markdown-body .pl-mdr {\n  color: #795da3;\n  font-weight: bold;\n}\n\n.markdown-body kbd {\n  display: inline-block;\n  padding: 3px 5px;\n  font: 11px Consolas, \"Liberation Mono\", Menlo, Courier, monospace;\n  line-height: 10px;\n  color: #555;\n  vertical-align: middle;\n  background-color: #fcfcfc;\n  border: solid 1px #ccc;\n  border-bottom-color: #bbb;\n  border-radius: 3px;\n  box-shadow: inset 0 -1px 0 #bbb;\n}\n\n.markdown-body .task-list-item {\n  list-style-type: none;\n}\n\n.markdown-body .task-list-item + .task-list-item {\n  margin-top: 3px;\n}\n\n.markdown-body .task-list-item input {\n  float: left;\n  margin: 0.3em 0 0.25em -1.6em;\n  vertical-align: middle;\n}\n\n.markdown-body :checked + .radio-label {\n  z-index: 1;\n  position: relative;\n  border-color: #4183c4;\n}\n\n.editormd-preview-container, .editormd-html-preview {\n  text-align: left;\n  font-size: 14px;\n  padding: 20px;\n  width: 100%;\n  line-height: 1.6em;\n}\n.editormd-preview-container blockquote, .editormd-html-preview blockquote {\n  color: #2C3E50;\n  border-left: 4px solid #D6DBDF;\n  font-size: 14px;\n  background: none repeat scroll 0 0 rgba(102,128,153,.05);\n  margin: 8px 0;\n  padding: 8px 16px;\n}\n.editormd-preview-container p code, .editormd-html-preview p code {\n  margin-left: 5px;\n  margin-right: 4px;\n}\n.editormd-preview-container abbr, .editormd-html-preview abbr {\n  background: #ffffdd;\n}\n.editormd-preview-container hr, .editormd-html-preview hr {\n  height: 1px;\n  border: none;\n  border-top: 1px solid #ddd;\n  background: none;\n}\n.editormd-preview-container code, .editormd-html-preview code {\n  border: 1px solid #ddd;\n  background: #f6f6f6;\n  padding: 3px;\n  border-radius: 3px;\n  font-size: 14px;\n}\n.editormd-preview-container pre, .editormd-html-preview pre {\n  border: 1px solid #ddd;\n  padding: 10px;\n  -webkit-border-radius: 3px;\n  -moz-border-radius: 3px;\n  -ms-border-radius: 3px;\n  -o-border-radius: 3px;\n  border-radius: 3px;\n}\n.editormd-preview-container pre code, .editormd-html-preview pre code {\n  padding: 0;\n}\n.editormd-preview-container pre, .editormd-preview-container code, .editormd-preview-container kbd, .editormd-html-preview pre, .editormd-html-preview code, .editormd-html-preview kbd {\n  font-family: \"YaHei Consolas Hybrid\", Consolas, \"Meiryo UI\", \"Malgun Gothic\", \"Segoe UI\", \"Trebuchet MS\", Helvetica, monospace, monospace;\n}\n.editormd-preview-container table thead tr, .editormd-html-preview table thead tr {\n  background-color: #F8F8F8;\n}\n.editormd-preview-container p.editormd-tex, .editormd-html-preview p.editormd-tex {\n  text-align: center;\n}\n.editormd-preview-container span.editormd-tex, .editormd-html-preview span.editormd-tex {\n  margin: 0 5px;\n}\n.editormd-preview-container .emoji, .editormd-html-preview .emoji {\n  width: 24px;\n  height: 24px;\n}\n.editormd-preview-container .katex, .editormd-html-preview .katex {\n  font-size: 1.4em;\n}\n.editormd-preview-container .sequence-diagram, .editormd-preview-container .flowchart, .editormd-html-preview .sequence-diagram, .editormd-html-preview .flowchart {\n  margin: 0 auto;\n  text-align: center;\n}\n.editormd-preview-container .sequence-diagram svg, .editormd-preview-container .flowchart svg, .editormd-html-preview .sequence-diagram svg, .editormd-html-preview .flowchart svg {\n  margin: 0 auto;\n}\n.editormd-preview-container .sequence-diagram text, .editormd-preview-container .flowchart text, .editormd-html-preview .sequence-diagram text, .editormd-html-preview .flowchart text {\n  font-size: 15px !important;\n  font-family: \"YaHei Consolas Hybrid\", Consolas, \"Microsoft YaHei\", \"Malgun Gothic\", \"Segoe UI\", Helvetica, Arial !important;\n}\n\n.editormd-preview-container blockquote.info, .editormd-html-preview blockquote.info  {\n  border-left-color: #5bc0de;\n  color: #5bc0de;\n  background-color: #f4f8fa\n}\n.editormd-preview-container blockquote.warning, .editormd-html-preview blockquote.warning  {\n  background-color: #fcf8f2;\n  border-color: #f0ad4e;\n  color: #f0ad4e\n}\n.editormd-preview-container blockquote.danger, .editormd-html-preview blockquote.danger  {\n  color: #d9534f;\n  background-color: #fdf7f7;\n  border-color: #d9534f\n}\n.editormd-preview-container blockquote.success, .editormd-html-preview blockquote.success  {\n  background-color: #f3f8f3;\n  border-color: #50af51;\n  color: #50af51\n}\n\n/*! Pretty printing styles. Used with prettify.js. */\n/* SPAN elements with the classes below are added by prettyprint. */\n.pln {\n  color: #000;\n}\n\n/* plain text */\n@media screen {\n  .str {\n    color: #080;\n  }\n\n  /* string content */\n  .kwd {\n    color: #008;\n  }\n\n  /* a keyword */\n  .com {\n    color: #800;\n  }\n\n  /* a comment */\n  .typ {\n    color: #606;\n  }\n\n  /* a type name */\n  .lit {\n    color: #066;\n  }\n\n  /* a literal value */\n  /* punctuation, lisp open bracket, lisp close bracket */\n  .pun, .opn, .clo {\n    color: #660;\n  }\n\n  .tag {\n    color: #008;\n  }\n\n  /* a markup tag name */\n  .atn {\n    color: #606;\n  }\n\n  /* a markup attribute name */\n  .atv {\n    color: #080;\n  }\n\n  /* a markup attribute value */\n  .dec, .var {\n    color: #606;\n  }\n\n  /* a declaration; a variable name */\n  .fun {\n    color: red;\n  }\n\n  /* a function name */\n}\n/* Use higher contrast and text-weight for printable form. */\n@media print, projection {\n  .str {\n    color: #060;\n  }\n\n  .kwd {\n    color: #006;\n    font-weight: bold;\n  }\n\n  .com {\n    color: #600;\n    font-style: italic;\n  }\n\n  .typ {\n    color: #404;\n    font-weight: bold;\n  }\n\n  .lit {\n    color: #044;\n  }\n\n  .pun, .opn, .clo {\n    color: #440;\n  }\n\n  .tag {\n    color: #006;\n    font-weight: bold;\n  }\n\n  .atn {\n    color: #404;\n  }\n\n  .atv {\n    color: #060;\n  }\n}\n/* Put a border around prettyprinted code snippets. */\npre.prettyprint {\n  padding: 2px;\n  border: 1px solid #888;\n}\n\n/* Specify class=linenums on a pre to get line numbering */\nol.linenums {\n  margin-top: 0;\n  margin-bottom: 0;\n}\n\n/* IE indents via margin-left */\nli.L0,\nli.L1,\nli.L2,\nli.L3,\nli.L5,\nli.L6,\nli.L7,\nli.L8 {\n  list-style-type: none;\n}\n\n/* Alternate shading for lines */\nli.L1,\nli.L3,\nli.L5,\nli.L7,\nli.L9 {\n  background: #eee;\n}\n\n.editormd-preview-container pre.prettyprint, .editormd-html-preview pre.prettyprint {\n  padding: 10px;\n  border: 1px solid #ddd;\n  white-space: pre-wrap;\n  word-wrap: break-word;\n}\n.editormd-preview-container ol.linenums, .editormd-html-preview ol.linenums {\n  color: #999;\n  padding-left: 2.5em;\n}\n.editormd-preview-container ol.linenums li, .editormd-html-preview ol.linenums li {\n  list-style-type: decimal;\n}\n.editormd-preview-container ol.linenums li code, .editormd-html-preview ol.linenums li code {\n  border: none;\n  background: none;\n  padding: 0;\n}\n\n.editormd-preview-container .editormd-toc-menu, .editormd-html-preview .editormd-toc-menu {\n  margin: 8px 0 12px 0;\n  display: inline-block;\n}\n.editormd-preview-container .editormd-toc-menu > .markdown-toc, .editormd-html-preview .editormd-toc-menu > .markdown-toc {\n  position: relative;\n  -webkit-border-radius: 4px;\n  -moz-border-radius: 4px;\n  -ms-border-radius: 4px;\n  -o-border-radius: 4px;\n  border-radius: 4px;\n  border: 1px solid #ddd;\n  display: inline-block;\n  font-size: 1em;\n}\n.editormd-preview-container .editormd-toc-menu > .markdown-toc > ul, .editormd-html-preview .editormd-toc-menu > .markdown-toc > ul {\n  width: 160%;\n  min-width: 180px;\n  position: absolute;\n  left: -1px;\n  top: -2px;\n  z-index: 100;\n  padding: 0 10px 10px;\n  display: none;\n  background: #fff;\n  border: 1px solid #ddd;\n  -webkit-border-radius: 4px;\n  -moz-border-radius: 4px;\n  -ms-border-radius: 4px;\n  -o-border-radius: 4px;\n  border-radius: 4px;\n  -webkit-box-shadow: 0 3px 5px rgba(0, 0, 0, 0.2);\n  /* Webkit browsers */\n  -moz-box-shadow: 0 3px 5px rgba(0, 0, 0, 0.2);\n  /* Firefox */\n  -ms-box-shadow: 0 3px 5px rgba(0, 0, 0, 0.2);\n  /* IE9 */\n  -o-box-shadow: 0 3px 5px rgba(0, 0, 0, 0.2);\n  /* Opera(Old) */\n  box-shadow: 0 3px 5px rgba(0, 0, 0, 0.2);\n  /* IE9+, News */\n}\n.editormd-preview-container .editormd-toc-menu > .markdown-toc > ul > li ul, .editormd-html-preview .editormd-toc-menu > .markdown-toc > ul > li ul {\n  width: 100%;\n  min-width: 180px;\n  border: 1px solid #ddd;\n  display: none;\n  background: #fff;\n  -webkit-border-radius: 4px;\n  -moz-border-radius: 4px;\n  -ms-border-radius: 4px;\n  -o-border-radius: 4px;\n  border-radius: 4px;\n}\n.editormd-preview-container .editormd-toc-menu > .markdown-toc > ul > li a, .editormd-html-preview .editormd-toc-menu > .markdown-toc > ul > li a {\n  color: #666;\n  padding: 6px 10px;\n  display: block;\n  -webkit-transition: background-color 500ms ease-out;\n  /* Safari, Chrome */\n  -moz-transition: background-color 500ms ease-out;\n  /* Firefox 4.0~16.0 */\n  transition: background-color 500ms ease-out;\n  /* IE >9, FF >15, Opera >12.0 */\n}\n.editormd-preview-container .editormd-toc-menu > .markdown-toc > ul > li a:hover, .editormd-html-preview .editormd-toc-menu > .markdown-toc > ul > li a:hover {\n  background-color: #f6f6f6;\n}\n.editormd-preview-container .editormd-toc-menu > .markdown-toc li, .editormd-html-preview .editormd-toc-menu > .markdown-toc li {\n  position: relative;\n}\n.editormd-preview-container .editormd-toc-menu > .markdown-toc li > ul, .editormd-html-preview .editormd-toc-menu > .markdown-toc li > ul {\n  position: absolute;\n  top: 32px;\n  left: 10%;\n  display: none;\n  -webkit-box-shadow: 0 3px 5px rgba(0, 0, 0, 0.2);\n  /* Webkit browsers */\n  -moz-box-shadow: 0 3px 5px rgba(0, 0, 0, 0.2);\n  /* Firefox */\n  -ms-box-shadow: 0 3px 5px rgba(0, 0, 0, 0.2);\n  /* IE9 */\n  -o-box-shadow: 0 3px 5px rgba(0, 0, 0, 0.2);\n  /* Opera(Old) */\n  box-shadow: 0 3px 5px rgba(0, 0, 0, 0.2);\n  /* IE9+, News */\n}\n.editormd-preview-container .editormd-toc-menu > .markdown-toc li > ul:before, .editormd-preview-container .editormd-toc-menu > .markdown-toc li > ul:after, .editormd-html-preview .editormd-toc-menu > .markdown-toc li > ul:before, .editormd-html-preview .editormd-toc-menu > .markdown-toc li > ul:after {\n  pointer-events: pointer-events;\n  position: absolute;\n  left: 15px;\n  top: -6px;\n  display: block;\n  content: \"\";\n  width: 0;\n  height: 0;\n  border: 6px solid transparent;\n  border-width: 0 6px 6px;\n  z-index: 10;\n}\n.editormd-preview-container .editormd-toc-menu > .markdown-toc li > ul:before, .editormd-html-preview .editormd-toc-menu > .markdown-toc li > ul:before {\n  border-bottom-color: #ccc;\n}\n.editormd-preview-container .editormd-toc-menu > .markdown-toc li > ul:after, .editormd-html-preview .editormd-toc-menu > .markdown-toc li > ul:after {\n  border-bottom-color: #ffffff;\n  top: -5px;\n}\n.editormd-preview-container .editormd-toc-menu ul, .editormd-html-preview .editormd-toc-menu ul {\n  list-style: none;\n}\n.editormd-preview-container .editormd-toc-menu a, .editormd-html-preview .editormd-toc-menu a {\n  text-decoration: none;\n}\n.editormd-preview-container .editormd-toc-menu h1, .editormd-html-preview .editormd-toc-menu h1 {\n  font-size: 16px;\n  padding: 5px 0 10px 10px;\n  line-height: 1;\n  border-bottom: 1px solid #eee;\n}\n.editormd-preview-container .editormd-toc-menu h1 .fa, .editormd-html-preview .editormd-toc-menu h1 .fa {\n  padding-left: 10px;\n}\n.editormd-preview-container .editormd-toc-menu .toc-menu-btn, .editormd-html-preview .editormd-toc-menu .toc-menu-btn {\n  color: #666;\n  min-width: 180px;\n  padding: 5px 10px;\n  border-radius: 4px;\n  display: inline-block;\n  -webkit-transition: background-color 500ms ease-out;\n  /* Safari, Chrome */\n  -moz-transition: background-color 500ms ease-out;\n  /* Firefox 4.0~16.0 */\n  transition: background-color 500ms ease-out;\n  /* IE >9, FF >15, Opera >12.0 */\n}\n.editormd-preview-container .editormd-toc-menu .toc-menu-btn:hover, .editormd-html-preview .editormd-toc-menu .toc-menu-btn:hover {\n  background-color: #f6f6f6;\n}\n.editormd-preview-container .editormd-toc-menu .toc-menu-btn .fa, .editormd-html-preview .editormd-toc-menu .toc-menu-btn .fa {\n  float: right;\n  padding: 3px 0 0 10px;\n  font-size: 1.3em;\n}\n\n.markdown-body .editormd-toc-menu ul {\n  padding-left: 0;\n}\n.markdown-body .highlight pre, .markdown-body pre {\n  line-height: 1.6;\n}\n\nhr.editormd-page-break {\n  border: 1px dotted #ccc;\n  font-size: 0;\n  height: 2px;\n}\n\n@media only print {\n  hr.editormd-page-break {\n    background: none;\n    border: none;\n    height: 0;\n  }\n}\n.editormd-html-preview textarea {\n  display: none;\n}\n.editormd-html-preview hr.editormd-page-break {\n  background: none;\n  border: none;\n  height: 0;\n}\n\n.editormd-preview-close-btn {\n  color: #fff;\n  padding: 4px 6px;\n  font-size: 18px;\n  -webkit-border-radius: 500px;\n  -moz-border-radius: 500px;\n  -ms-border-radius: 500px;\n  -o-border-radius: 500px;\n  border-radius: 500px;\n  display: none;\n  background-color: #ccc;\n  position: absolute;\n  top: 25px;\n  right: 35px;\n  z-index: 19;\n  -webkit-transition: background-color 300ms ease-out;\n  /* Safari, Chrome */\n  -moz-transition: background-color 300ms ease-out;\n  /* Firefox 4.0~16.0 */\n  transition: background-color 300ms ease-out;\n  /* IE >9, FF >15, Opera >12.0 */\n}\n.editormd-preview-close-btn:hover {\n  background-color: #999;\n}\n\n.editormd-preview-active {\n  width: 100%;\n  padding: 40px;\n}\n"
  },
  {
    "path": "static/editor.md/editormd.amd.js",
    "content": "/*\n * Editor.md\n *\n * @file        editormd.amd.js \n * @version     v1.5.0 \n * @description Open source online markdown editor.\n * @license     MIT License\n * @author      Pandao\n * {@link       https://github.com/pandao/editor.md}\n * @updateTime  2015-06-09\n */\n\n;(function(factory) {\n    \"use strict\";\n    \n\t// CommonJS/Node.js\n\tif (typeof require === \"function\" && typeof exports === \"object\" && typeof module === \"object\")\n    { \n        module.exports = factory;\n    }\n\telse if (typeof define === \"function\")  // AMD/CMD/Sea.js\n\t{\n        if (define.amd) // for Require.js\n        {\n            var cmModePath  = \"codemirror/mode/\";\n            var cmAddonPath = \"codemirror/addon/\";\n\n            var codeMirrorModules = [\n                \"jquery\", \"marked\",\n                //\"prettify\",\n                \"highlight/highlight\",\n                \"mermaid/mermaid\",\n                \"katex\", \"raphael\", \"underscore\", \"flowchart\",  \"jqueryflowchart\",  \"sequenceDiagram\",\n\n                \"codemirror/lib/codemirror\",\n                cmModePath + \"css/css\",\n                cmModePath + \"sass/sass\",\n                cmModePath + \"shell/shell\",\n                cmModePath + \"sql/sql\",\n                cmModePath + \"clike/clike\",\n                cmModePath + \"php/php\",\n                cmModePath + \"xml/xml\",\n                cmModePath + \"markdown/markdown\",\n                cmModePath + \"javascript/javascript\",\n                cmModePath + \"htmlmixed/htmlmixed\",\n                cmModePath + \"gfm/gfm\",\n                cmModePath + \"http/http\",\n                cmModePath + \"go/go\",\n                cmModePath + \"dart/dart\",\n                cmModePath + \"coffeescript/coffeescript\",\n                cmModePath + \"nginx/nginx\",\n                cmModePath + \"python/python\",\n                cmModePath + \"perl/perl\",\n                cmModePath + \"lua/lua\",\n                cmModePath + \"r/r\", \n                cmModePath + \"ruby/ruby\", \n                cmModePath + \"rst/rst\",\n                cmModePath + \"smartymixed/smartymixed\",\n                cmModePath + \"vb/vb\",\n                cmModePath + \"vbscript/vbscript\",\n                cmModePath + \"velocity/velocity\",\n                cmModePath + \"xquery/xquery\",\n                cmModePath + \"yaml/yaml\",\n                cmModePath + \"erlang/erlang\",\n                cmModePath + \"jade/jade\",\n\n                cmAddonPath + \"edit/trailingspace\", \n                cmAddonPath + \"dialog/dialog\", \n                cmAddonPath + \"search/searchcursor\", \n                cmAddonPath + \"search/search\", \n                cmAddonPath + \"scroll/annotatescrollbar\", \n                cmAddonPath + \"search/matchesonscrollbar\", \n                cmAddonPath + \"display/placeholder\", \n                cmAddonPath + \"edit/closetag\", \n                cmAddonPath + \"fold/foldcode\",\n                cmAddonPath + \"fold/foldgutter\",\n                cmAddonPath + \"fold/indent-fold\",\n                cmAddonPath + \"fold/brace-fold\",\n                cmAddonPath + \"fold/xml-fold\", \n                cmAddonPath + \"fold/markdown-fold\",\n                cmAddonPath + \"fold/comment-fold\", \n                cmAddonPath + \"mode/overlay\", \n                cmAddonPath + \"selection/active-line\", \n                cmAddonPath + \"edit/closebrackets\", \n                cmAddonPath + \"display/fullscreen\",\n                cmAddonPath + \"search/match-highlighter\"\n            ];\n\n            define(codeMirrorModules, factory);\n        } \n        else \n        {\n\t\t    define([\"jquery\"], factory);  // for Sea.js\n        }\n\t} \n\telse\n\t{ \n        window.editormd = factory();\n\t}\n    \n}(function() {    \n\n    if (typeof define == \"function\" && define.amd) {\n       $          = arguments[0];\n       marked     = arguments[1];\n       prettify   = arguments[2];\n       katex      = arguments[3];\n       Raphael    = arguments[4];\n       _          = arguments[5];\n       flowchart  = arguments[6];\n       CodeMirror = arguments[9];\n   }\n    \n    \"use strict\";\n    \n    var $ = (typeof (jQuery) !== \"undefined\") ? jQuery : Zepto;\n\n\tif (typeof ($) === \"undefined\") {\n\t\treturn ;\n\t}\n    \n    /**\n     * editormd\n     * \n     * @param   {String} id           编辑器的ID\n     * @param   {Object} options      配置选项 Key/Value\n     * @returns {Object} editormd     返回editormd对象\n     */\n    \n    var editormd         = function (id, options) {\n        return new editormd.fn.init(id, options);\n    };\n    \n    editormd.title        = editormd.$name = \"Editor.md\";\n    editormd.version      = \"1.5.0\";\n    editormd.homePage     = \"https://pandao.github.io/editor.md/\";\n    editormd.classPrefix  = \"editormd-\";\n    \n    editormd.toolbarModes = {\n        full : [\n            \"undo\", \"redo\", \"|\", \n            \"bold\", \"del\", \"italic\", \"quote\", \"ucwords\", \"uppercase\", \"lowercase\", \"|\", \n            \"h1\", \"h2\", \"h3\", \"h4\", \"h5\", \"h6\", \"|\", \n            \"list-ul\", \"list-ol\", \"hr\", \"|\",\n            \"link\", \"reference-link\", \"image\", \"code\", \"preformatted-text\", \"code-block\", \"table\", \"datetime\", \"emoji\", \"html-entities\", \"pagebreak\", \"|\",\n            \"goto-line\", \"watch\", \"preview\", \"fullscreen\", \"clear\", \"search\", \"|\",\n            \"help\", \"info\"\n        ],\n        simple : [\n            \"undo\", \"redo\", \"|\", \n            \"bold\", \"del\", \"italic\", \"quote\", \"uppercase\", \"lowercase\", \"|\", \n            \"h1\", \"h2\", \"h3\", \"h4\", \"h5\", \"h6\", \"|\", \n            \"list-ul\", \"list-ol\", \"hr\", \"|\",\n            \"watch\", \"preview\", \"fullscreen\", \"|\",\n            \"help\", \"info\"\n        ],\n        mini : [\n            \"undo\", \"redo\", \"|\",\n            \"watch\", \"preview\", \"|\",\n            \"help\", \"info\"\n        ]\n    };\n    \n    editormd.defaults     = {\n        mode                 : \"gfm\",          //gfm or markdown\n        name                 : \"\",             // Form element name\n        value                : \"\",             // value for CodeMirror, if mode not gfm/markdown\n        theme                : \"\",             // Editor.md self themes, before v1.5.0 is CodeMirror theme, default empty\n        editorTheme          : \"default\",      // Editor area, this is CodeMirror theme at v1.5.0\n        previewTheme         : \"\",             // Preview area theme, default empty\n        markdown             : \"\",             // Markdown source code\n        appendMarkdown       : \"\",             // if in init textarea value not empty, append markdown to textarea\n        width                : \"100%\",\n        height               : \"100%\",\n        path                 : \"./lib/\",       // Dependents module file directory\n        pluginPath           : \"\",             // If this empty, default use settings.path + \"../plugins/\"\n        delay                : 300,            // Delay parse markdown to html, Uint : ms\n        autoLoadModules      : true,           // Automatic load dependent module files\n        watch                : true,\n        placeholder          : \"Enjoy Markdown! coding now...\",\n        gotoLine             : true,\n        codeFold             : false,\n        autoHeight           : false,\n\t\tautoFocus            : true,\n        autoCloseTags        : true,\n        searchReplace        : true,\n        syncScrolling        : true,           // true | false | \"single\", default true\n        readOnly             : false,\n        tabSize              : 4,\n\t\tindentUnit           : 4,\n        lineNumbers          : true,\n\t\tlineWrapping         : true,\n\t\tautoCloseBrackets    : true,\n\t\tshowTrailingSpace    : true,\n\t\tmatchBrackets        : true,\n\t\tindentWithTabs       : true,\n\t\tstyleSelectedText    : true,\n        matchWordHighlight   : true,           // options: true, false, \"onselected\"\n        styleActiveLine      : true,           // Highlight the current line\n        dialogLockScreen     : true,\n        dialogShowMask       : true,\n        dialogDraggable      : true,\n        dialogMaskBgColor    : \"#fff\",\n        dialogMaskOpacity    : 0.1,\n        fontSize             : \"13px\",\n        saveHTMLToTextarea   : false,\n        disabledKeyMaps      : [],\n        \n        onload               : function() {},\n        onresize             : function() {},\n        onchange             : function() {},\n        onwatch              : null,\n        onunwatch            : null,\n        onpreviewing         : function() {},\n        onpreviewed          : function() {},\n        onfullscreen         : function() {},\n        onfullscreenExit     : function() {},\n        onscroll             : function() {},\n        onpreviewscroll      : function() {},\n        \n        imageUpload          : false,\n        imageFormats         : [\"jpg\", \"jpeg\", \"gif\", \"png\", \"bmp\", \"webp\"],\n        imageUploadURL       : \"\",\n        crossDomainUpload    : false,\n        uploadCallbackURL    : \"\",\n        \n        toc                  : true,           // Table of contents\n        tocm                 : false,           // Using [TOCM], auto create ToC dropdown menu\n        tocTitle             : \"\",             // for ToC dropdown menu btn\n        tocDropdown          : false,\n        tocContainer         : \"\",\n        tocStartLevel        : 1,              // Said from H1 to create ToC\n        htmlDecode           : false,          // Open the HTML tag identification \n        pageBreak            : true,           // Enable parse page break [========]\n        atLink               : true,           // for @link\n        emailLink            : true,           // for email address auto link\n        taskList             : false,          // Enable Github Flavored Markdown task lists\n        emoji                : false,          // :emoji: , Support Github emoji, Twitter Emoji (Twemoji);\n                                               // Support FontAwesome icon emoji :fa-xxx: > Using fontAwesome icon web fonts;\n                                               // Support Editor.md logo icon emoji :editormd-logo: :editormd-logo-1x: > 1~8x;\n        tex                  : false,          // TeX(LaTeX), based on KaTeX\n        flowChart            : false,          // flowChart.js only support IE9+\n        sequenceDiagram      : false,          // sequenceDiagram.js only support IE9+\n        mermaidGantt         : false,          //mermaid/mermaid.js\n        mermaidSequence      : false,\n        mermaidFlowChat      : false,\n        previewCodeHighlight : true,\n        highlightStyle       : \"github\",\n                \n        toolbar              : true,           // show/hide toolbar\n        toolbarAutoFixed     : true,           // on window scroll auto fixed position\n        toolbarIcons         : \"full\",\n        toolbarTitles        : {},\n        toolbarHandlers      : {\n            ucwords : function() {\n                return editormd.toolbarHandlers.ucwords;\n            },\n            lowercase : function() {\n                return editormd.toolbarHandlers.lowercase;\n            }\n        },\n        toolbarCustomIcons   : {               // using html tag create toolbar icon, unused default <a> tag.\n            lowercase        : \"<a href=\\\"javascript:;\\\" title=\\\"Lowercase\\\" unselectable=\\\"on\\\"><i class=\\\"fa\\\" name=\\\"lowercase\\\" style=\\\"font-size:24px;margin-top: -10px;\\\">a</i></a>\",\n            \"ucwords\"        : \"<a href=\\\"javascript:;\\\" title=\\\"ucwords\\\" unselectable=\\\"on\\\"><i class=\\\"fa\\\" name=\\\"ucwords\\\" style=\\\"font-size:20px;margin-top: -3px;\\\">Aa</i></a>\"\n        }, \n        toolbarIconsClass    : {\n            undo             : \"fa-undo\",\n            redo             : \"fa-repeat\",\n            bold             : \"fa-bold\",\n            del              : \"fa-strikethrough\",\n            italic           : \"fa-italic\",\n            quote            : \"fa-quote-left\",\n            uppercase        : \"fa-font\",\n            h1               : editormd.classPrefix + \"bold\",\n            h2               : editormd.classPrefix + \"bold\",\n            h3               : editormd.classPrefix + \"bold\",\n            h4               : editormd.classPrefix + \"bold\",\n            h5               : editormd.classPrefix + \"bold\",\n            h6               : editormd.classPrefix + \"bold\",\n            \"list-ul\"        : \"fa-list-ul\",\n            \"list-ol\"        : \"fa-list-ol\",\n            hr               : \"fa-minus\",\n            link             : \"fa-link\",\n            \"reference-link\" : \"fa-anchor\",\n            image            : \"fa-picture-o\",\n            code             : \"fa-code\",\n            \"preformatted-text\" : \"fa-file-code-o\",\n            \"code-block\"     : \"fa-file-code-o\",\n            table            : \"fa-table\",\n            datetime         : \"fa-clock-o\",\n            emoji            : \"fa-smile-o\",\n            \"html-entities\"  : \"fa-copyright\",\n            pagebreak        : \"fa-newspaper-o\",\n            \"goto-line\"      : \"fa-terminal\", // fa-crosshairs\n            watch            : \"fa-eye-slash\",\n            unwatch          : \"fa-eye\",\n            preview          : \"fa-desktop\",\n            search           : \"fa-search\",\n            fullscreen       : \"fa-arrows-alt\",\n            clear            : \"fa-eraser\",\n            help             : \"fa-question-circle\",\n            info             : \"fa-info-circle\"\n        },        \n        toolbarIconTexts     : {},\n        \n        lang : {\n            name        : \"zh-cn\",\n            description : \"开源在线Markdown编辑器<br/>Open source online Markdown editor.\",\n            tocTitle    : \"目录\",\n            toolbar     : {\n                undo             : \"撤销（Ctrl+Z）\",\n                redo             : \"重做（Ctrl+Y）\",\n                bold             : \"粗体\",\n                del              : \"删除线\",\n                italic           : \"斜体\",\n                quote            : \"引用\",\n                ucwords          : \"将每个单词首字母转成大写\",\n                uppercase        : \"将所选转换成大写\",\n                lowercase        : \"将所选转换成小写\",\n                h1               : \"标题1\",\n                h2               : \"标题2\",\n                h3               : \"标题3\",\n                h4               : \"标题4\",\n                h5               : \"标题5\",\n                h6               : \"标题6\",\n                \"list-ul\"        : \"无序列表\",\n                \"list-ol\"        : \"有序列表\",\n                hr               : \"横线\",\n                link             : \"链接\",\n                \"reference-link\" : \"引用链接\",\n                image            : \"添加图片\",\n                code             : \"行内代码\",\n                \"preformatted-text\" : \"预格式文本 / 代码块（缩进风格）\",\n                \"code-block\"     : \"代码块（多语言风格）\",\n                table            : \"添加表格\",\n                datetime         : \"日期时间\",\n                emoji            : \"Emoji表情\",\n                \"html-entities\"  : \"HTML实体字符\",\n                pagebreak        : \"插入分页符\",\n                \"goto-line\"      : \"跳转到行\",\n                watch            : \"关闭实时预览\",\n                unwatch          : \"开启实时预览\",\n                preview          : \"全窗口预览HTML（按 Shift + ESC还原）\",\n                fullscreen       : \"全屏（按ESC还原）\",\n                clear            : \"清空\",\n                search           : \"搜索\",\n                help             : \"使用帮助\",\n                info             : \"关于\" + editormd.title\n            },\n            buttons : {\n                enter  : \"确定\",\n                cancel : \"取消\",\n                close  : \"关闭\"\n            },\n            dialog : {\n                link : {\n                    title    : \"添加链接\",\n                    url      : \"链接地址\",\n                    urlTitle : \"链接标题\",\n                    urlEmpty : \"错误：请填写链接地址。\"\n                },\n                referenceLink : {\n                    title    : \"添加引用链接\",\n                    name     : \"引用名称\",\n                    url      : \"链接地址\",\n                    urlId    : \"链接ID\",\n                    urlTitle : \"链接标题\",\n                    nameEmpty: \"错误：引用链接的名称不能为空。\",\n                    idEmpty  : \"错误：请填写引用链接的ID。\",\n                    urlEmpty : \"错误：请填写引用链接的URL地址。\"\n                },\n                image : {\n                    title    : \"添加图片\",\n                    url      : \"图片地址\",\n                    link     : \"图片链接\",\n                    alt      : \"图片描述\",\n                    uploadButton     : \"本地上传\",\n                    imageURLEmpty    : \"错误：图片地址不能为空。\",\n                    uploadFileEmpty  : \"错误：上传的图片不能为空。\",\n                    formatNotAllowed : \"错误：只允许上传图片文件，允许上传的图片文件格式有：\"\n                },\n                preformattedText : {\n                    title             : \"添加预格式文本或代码块\", \n                    emptyAlert        : \"错误：请填写预格式文本或代码的内容。\"\n                },\n                codeBlock : {\n                    title             : \"添加代码块\",                    \n                    selectLabel       : \"代码语言：\",\n                    selectDefaultText : \"请选择代码语言\",\n                    otherLanguage     : \"其他语言\",\n                    unselectedLanguageAlert : \"错误：请选择代码所属的语言类型。\",\n                    codeEmptyAlert    : \"错误：请填写代码内容。\"\n                },\n                htmlEntities : {\n                    title : \"HTML 实体字符\"\n                },\n                help : {\n                    title : \"使用帮助\"\n                }\n            }\n        }\n    };\n    \n    editormd.classNames  = {\n        tex : editormd.classPrefix + \"tex\"\n    };\n\n    editormd.dialogZindex = 99999;\n    \n    editormd.$katex       = null;\n    editormd.$marked      = null;\n    editormd.$CodeMirror  = null;\n    editormd.$prettyPrint = null;\n    \n    var timer, flowchartTimer;\n\n    editormd.prototype    = editormd.fn = {\n        state : {\n            watching   : false,\n            loaded     : false,\n            preview    : false,\n            fullscreen : false\n        },\n        \n        /**\n         * 构造函数/实例初始化\n         * Constructor / instance initialization\n         * \n         * @param   {String}   id            编辑器的ID\n         * @param   {Object}   [options={}]  配置选项 Key/Value\n         * @returns {editormd}               返回editormd的实例对象\n         */\n        \n        init : function (id, options) {\n            \n            options              = options || {};\n            \n            if (typeof id === \"object\")\n            {\n                options = id;\n            }\n            \n            var _this            = this;\n            var classPrefix      = this.classPrefix  = editormd.classPrefix; \n            var settings         = this.settings     = $.extend(true, editormd.defaults, options);\n            \n            id                   = (typeof id === \"object\") ? settings.id : id;\n            \n            var editor           = this.editor       = $(\"#\" + id);\n            \n            this.id              = id;\n            this.lang            = settings.lang;\n            \n            var classNames       = this.classNames   = {\n                textarea : {\n                    html     : classPrefix + \"html-textarea\",\n                    markdown : classPrefix + \"markdown-textarea\"\n                }\n            };\n            \n            settings.pluginPath = (settings.pluginPath === \"\") ? settings.path + \"../plugins/\" : settings.pluginPath; \n            \n            this.state.watching = (settings.watch) ? true : false;\n            \n            if ( !editor.hasClass(\"editormd\") ) {\n                editor.addClass(\"editormd\");\n            }\n            \n            editor.css({\n                width  : (typeof settings.width  === \"number\") ? settings.width  + \"px\" : settings.width,\n                height : (typeof settings.height === \"number\") ? settings.height + \"px\" : settings.height\n            });\n            \n            if (settings.autoHeight)\n            {\n                editor.css(\"height\", \"auto\");\n            }\n                        \n            var markdownTextarea = this.markdownTextarea = editor.children(\"textarea\");\n            \n            if (markdownTextarea.length < 1)\n            {\n                editor.append(\"<textarea></textarea>\");\n                markdownTextarea = this.markdownTextarea = editor.children(\"textarea\");\n            }\n            \n            markdownTextarea.addClass(classNames.textarea.markdown).attr(\"placeholder\", settings.placeholder);\n            \n            if (typeof markdownTextarea.attr(\"name\") === \"undefined\" || markdownTextarea.attr(\"name\") === \"\")\n            {\n                markdownTextarea.attr(\"name\", (settings.name !== \"\") ? settings.name : id + \"-markdown-doc\");\n            }\n            \n            var appendElements = [\n                (!settings.readOnly) ? \"<a href=\\\"javascript:;\\\" class=\\\"fa fa-close \" + classPrefix + \"preview-close-btn\\\"></a>\" : \"\",\n                ( (settings.saveHTMLToTextarea) ? \"<textarea class=\\\"\" + classNames.textarea.html + \"\\\" name=\\\"\" + id + \"-html-code\\\"></textarea>\" : \"\" ),\n                \"<div class=\\\"\" + classPrefix + \"preview\\\"><div class=\\\"markdown-body \" + classPrefix + \"preview-container\\\"></div></div>\",\n                \"<div class=\\\"\" + classPrefix + \"container-mask\\\" style=\\\"display:block;\\\"></div>\",\n                \"<div class=\\\"\" + classPrefix + \"mask\\\"></div>\"\n            ].join(\"\\n\");\n            \n            editor.append(appendElements).addClass(classPrefix + \"vertical\");\n            \n            if (settings.theme !== \"\") \n            {\n                editor.addClass(classPrefix + \"theme-\" + settings.theme);\n            }\n            \n            this.mask          = editor.children(\".\" + classPrefix + \"mask\");    \n            this.containerMask = editor.children(\".\" + classPrefix  + \"container-mask\");\n            \n            if (settings.markdown !== \"\")\n            {\n                markdownTextarea.val(settings.markdown);\n            }\n            \n            if (settings.appendMarkdown !== \"\")\n            {\n                markdownTextarea.val(markdownTextarea.val() + settings.appendMarkdown);\n            }\n            \n            this.htmlTextarea     = editor.children(\".\" + classNames.textarea.html);            \n            this.preview          = editor.children(\".\" + classPrefix + \"preview\");\n            this.previewContainer = this.preview.children(\".\" + classPrefix + \"preview-container\");\n            \n            if (settings.previewTheme !== \"\") \n            {\n                this.preview.addClass(classPrefix + \"preview-theme-\" + settings.previewTheme);\n            }\n            \n            if (typeof define === \"function\" && define.amd)\n            {\n                if (typeof katex !== \"undefined\") \n                {\n                    editormd.$katex = katex;\n                }\n                \n                if (settings.searchReplace && !settings.readOnly) \n                {\n                    editormd.loadCSS(settings.path + \"codemirror/addon/dialog/dialog\");\n                    editormd.loadCSS(settings.path + \"codemirror/addon/search/matchesonscrollbar\");\n                }\n            }\n            \n            if ((typeof define === \"function\" && define.amd) || !settings.autoLoadModules)\n            {\n                if (typeof CodeMirror !== \"undefined\") {\n                    editormd.$CodeMirror = CodeMirror;\n                }\n                \n                if (typeof marked     !== \"undefined\") {\n                    editormd.$marked     = marked;\n                }\n                \n                this.setCodeMirror().setToolbar().loadedDisplay();\n            } \n            else \n            {\n                this.loadQueues();\n            }\n\n            return this;\n        },\n        \n        /**\n         * 所需组件加载队列\n         * Required components loading queue\n         * \n         * @returns {editormd}  返回editormd的实例对象\n         */\n        \n        loadQueues : function() {\n            var _this        = this;\n            var settings     = this.settings;\n            var loadPath     = settings.path;\n                                \n            var loadFlowChartOrSequenceDiagram = function() {\n                \n                if (editormd.isIE8) \n                {\n                    _this.loadedDisplay();\n                    \n                    return ;\n                }\n                if (settings.mermaidGantt || settings.mermaidFlowChat || settings.mermaidSequence) {\n                    console.log(\"aa\")\n                    editormd.loadScript(loadPath + \"mermaid/mermaid.min\", function () {\n                        _this.loadedDisplay();\n                    });\n                }\n                if (settings.flowChart || settings.sequenceDiagram) \n                {\n                    editormd.loadScript(loadPath + \"raphael.min\", function() {\n\n                        editormd.loadScript(loadPath + \"underscore.min\", function() {  \n\n                            if (!settings.flowChart && settings.sequenceDiagram) \n                            {\n                                editormd.loadScript(loadPath + \"sequence-diagram.min\", function() {\n                                    _this.loadedDisplay();\n                                });\n                            }\n                            else if (settings.flowChart && !settings.sequenceDiagram) \n                            {      \n                                editormd.loadScript(loadPath + \"flowchart.min\", function() {  \n                                    editormd.loadScript(loadPath + \"jquery.flowchart.min\", function() {\n                                        _this.loadedDisplay();\n                                    });\n                                });\n                            }\n                            else if (settings.flowChart && settings.sequenceDiagram) \n                            {  \n                                editormd.loadScript(loadPath + \"flowchart.min\", function() {  \n                                    editormd.loadScript(loadPath + \"jquery.flowchart.min\", function() {\n                                        editormd.loadScript(loadPath + \"sequence-diagram.min\", function() {\n                                            _this.loadedDisplay();\n                                        });\n                                    });\n                                });\n                            }\n                        });\n\n                    });\n                } \n                else\n                {\n                    _this.loadedDisplay();\n                }\n            }; \n\n            editormd.loadCSS(loadPath + \"codemirror/codemirror.min\");\n            \n            if (settings.searchReplace && !settings.readOnly)\n            {\n                editormd.loadCSS(loadPath + \"codemirror/addon/dialog/dialog\");\n                editormd.loadCSS(loadPath + \"codemirror/addon/search/matchesonscrollbar\");\n            }\n            \n            if (settings.codeFold)\n            {\n                editormd.loadCSS(loadPath + \"codemirror/addon/fold/foldgutter\");            \n            }\n            \n            editormd.loadScript(loadPath + \"codemirror/codemirror.min\", function() {\n                editormd.$CodeMirror = CodeMirror;\n                \n                editormd.loadScript(loadPath + \"codemirror/modes.min\", function() {\n                    \n                    editormd.loadScript(loadPath + \"codemirror/addons.min\", function() {\n                        \n                        _this.setCodeMirror();\n                        \n                        if (settings.mode !== \"gfm\" && settings.mode !== \"markdown\") \n                        {\n                            _this.loadedDisplay();\n                            \n                            return false;\n                        }\n                        \n                        _this.setToolbar();\n\n                        editormd.loadScript(loadPath + \"marked.min\", function() {\n\n                            editormd.$marked = marked;\n                                \n                            if (settings.previewCodeHighlight) \n                            {\n                                // editormd.loadScript(loadPath + \"prettify.min\", function() {\n                                //     loadFlowChartOrSequenceDiagram();\n                                // });\n                                editormd.loadScript(loadPath + \"highlight/highlight\", function() {\n                                    loadFlowChartOrSequenceDiagram();\n                                });\n                            } \n                            else\n                            {                  \n                                loadFlowChartOrSequenceDiagram();\n                            }\n                        });\n                        \n                    });\n                    \n                });\n                \n            });\n\n            return this;\n        },\n        \n        /**\n         * 设置 Editor.md 的整体主题，主要是工具栏\n         * Setting Editor.md theme\n         * \n         * @returns {editormd}  返回editormd的实例对象\n         */\n        \n        setTheme : function(theme) {\n            var editor      = this.editor;\n            var oldTheme    = this.settings.theme;\n            var themePrefix = this.classPrefix + \"theme-\";\n            \n            editor.removeClass(themePrefix + oldTheme).addClass(themePrefix + theme);\n            \n            this.settings.theme = theme;\n            \n            return this;\n        },\n        \n        /**\n         * 设置 CodeMirror（编辑区）的主题\n         * Setting CodeMirror (Editor area) theme\n         * \n         * @returns {editormd}  返回editormd的实例对象\n         */\n        \n        setEditorTheme : function(theme) {  \n            var settings   = this.settings;  \n            settings.editorTheme = theme;  \n            \n            if (theme !== \"default\")\n            {\n                editormd.loadCSS(settings.path + \"codemirror/theme/\" + settings.editorTheme);\n            }\n            \n            this.cm.setOption(\"theme\", theme);\n            \n            return this;\n        },\n        \n        /**\n         * setEditorTheme() 的别名\n         * setEditorTheme() alias\n         * \n         * @returns {editormd}  返回editormd的实例对象\n         */\n        \n        setCodeMirrorTheme : function (theme) {            \n            this.setEditorTheme(theme);\n            \n            return this;\n        },\n        \n        /**\n         * 设置 Editor.md 的主题\n         * Setting Editor.md theme\n         * \n         * @returns {editormd}  返回editormd的实例对象\n         */\n        \n        setPreviewTheme : function(theme) {  \n            var preview     = this.preview;\n            var oldTheme    = this.settings.previewTheme;\n            var themePrefix = this.classPrefix + \"preview-theme-\";\n            \n            preview.removeClass(themePrefix + oldTheme).addClass(themePrefix + theme);\n            \n            this.settings.previewTheme = theme;\n            \n            return this;\n        },\n        \n        /**\n         * 配置和初始化CodeMirror组件\n         * CodeMirror initialization\n         * \n         * @returns {editormd}  返回editormd的实例对象\n         */\n        \n        setCodeMirror : function() { \n            var settings         = this.settings;\n            var editor           = this.editor;\n            \n            if (settings.editorTheme !== \"default\")\n            {\n                editormd.loadCSS(settings.path + \"codemirror/theme/\" + settings.editorTheme);\n            }\n            \n            var codeMirrorConfig = {\n                mode                      : settings.mode,\n                theme                     : settings.editorTheme,\n                tabSize                   : settings.tabSize,\n                dragDrop                  : false,\n                autofocus                 : settings.autoFocus,\n                autoCloseTags             : settings.autoCloseTags,\n                readOnly                  : (settings.readOnly) ? \"nocursor\" : false,\n                indentUnit                : settings.indentUnit,\n                lineNumbers               : settings.lineNumbers,\n                lineWrapping              : settings.lineWrapping,\n                extraKeys                 : {\n                                                \"Ctrl-Q\": function(cm) { \n                                                    cm.foldCode(cm.getCursor()); \n                                                }\n                                            },\n                foldGutter                : settings.codeFold,\n                gutters                   : [\"CodeMirror-linenumbers\", \"CodeMirror-foldgutter\"],\n                matchBrackets             : settings.matchBrackets,\n                indentWithTabs            : settings.indentWithTabs,\n                styleActiveLine           : settings.styleActiveLine,\n                styleSelectedText         : settings.styleSelectedText,\n                autoCloseBrackets         : settings.autoCloseBrackets,\n                showTrailingSpace         : settings.showTrailingSpace,\n                highlightSelectionMatches : ( (!settings.matchWordHighlight) ? false : { showToken: (settings.matchWordHighlight === \"onselected\") ? false : /\\w/ } )\n            };\n            \n            this.codeEditor = this.cm        = editormd.$CodeMirror.fromTextArea(this.markdownTextarea[0], codeMirrorConfig);\n            this.codeMirror = this.cmElement = editor.children(\".CodeMirror\");\n            \n            if (settings.value !== \"\")\n            {\n                this.cm.setValue(settings.value);\n            }\n\n            this.codeMirror.css({\n                fontSize : settings.fontSize,\n                width    : (!settings.watch) ? \"100%\" : \"50%\"\n            });\n            \n            if (settings.autoHeight)\n            {\n                this.codeMirror.css(\"height\", \"auto\");\n                this.cm.setOption(\"viewportMargin\", Infinity);\n            }\n            \n            if (!settings.lineNumbers)\n            {\n                this.codeMirror.find(\".CodeMirror-gutters\").css(\"border-right\", \"none\");\n            }\n\n            return this;\n        },\n        \n        /**\n         * 获取CodeMirror的配置选项\n         * Get CodeMirror setting options\n         * \n         * @returns {Mixed}                  return CodeMirror setting option value\n         */\n        \n        getCodeMirrorOption : function(key) {            \n            return this.cm.getOption(key);\n        },\n        \n        /**\n         * 配置和重配置CodeMirror的选项\n         * CodeMirror setting options / resettings\n         * \n         * @returns {editormd}  返回editormd的实例对象\n         */\n        \n        setCodeMirrorOption : function(key, value) {\n            \n            this.cm.setOption(key, value);\n            \n            return this;\n        },\n        \n        /**\n         * 添加 CodeMirror 键盘快捷键\n         * Add CodeMirror keyboard shortcuts key map\n         * \n         * @returns {editormd}  返回editormd的实例对象\n         */\n        \n        addKeyMap : function(map, bottom) {\n            this.cm.addKeyMap(map, bottom);\n            \n            return this;\n        },\n        \n        /**\n         * 移除 CodeMirror 键盘快捷键\n         * Remove CodeMirror keyboard shortcuts key map\n         * \n         * @returns {editormd}  返回editormd的实例对象\n         */\n        \n        removeKeyMap : function(map) {\n            this.cm.removeKeyMap(map);\n            \n            return this;\n        },\n        \n        /**\n         * 跳转到指定的行\n         * Goto CodeMirror line\n         * \n         * @param   {String|Intiger}   line      line number or \"first\"|\"last\"\n         * @returns {editormd}                   返回editormd的实例对象\n         */\n        \n        gotoLine : function (line) {\n            \n            var settings = this.settings;\n            \n            if (!settings.gotoLine)\n            {\n                return this;\n            }\n            \n            var cm       = this.cm;\n            var editor   = this.editor;\n            var count    = cm.lineCount();\n            var preview  = this.preview;\n            \n            if (typeof line === \"string\")\n            {\n                if(line === \"last\")\n                {\n                    line = count;\n                }\n            \n                if (line === \"first\")\n                {\n                    line = 1;\n                }\n            }\n            \n            if (typeof line !== \"number\") \n            {  \n                alert(\"Error: The line number must be an integer.\");\n                return this;\n            }\n            \n            line  = parseInt(line) - 1;\n            \n            if (line > count)\n            {\n                alert(\"Error: The line number range 1-\" + count);\n                \n                return this;\n            }\n            \n            cm.setCursor( {line : line, ch : 0} );\n            \n            var scrollInfo   = cm.getScrollInfo();\n            var clientHeight = scrollInfo.clientHeight; \n            var coords       = cm.charCoords({line : line, ch : 0}, \"local\");\n            \n            cm.scrollTo(null, (coords.top + coords.bottom - clientHeight) / 2);\n            \n            if (settings.watch)\n            {            \n                var cmScroll  = this.codeMirror.find(\".CodeMirror-scroll\")[0];\n                var height    = $(cmScroll).height(); \n                var scrollTop = cmScroll.scrollTop;         \n                var percent   = (scrollTop / cmScroll.scrollHeight);\n\n                if (scrollTop === 0)\n                {\n                    preview.scrollTop(0);\n                } \n                else if (scrollTop + height >= cmScroll.scrollHeight - 16)\n                { \n                    preview.scrollTop(preview[0].scrollHeight);                    \n                } \n                else\n                {                    \n                    preview.scrollTop(preview[0].scrollHeight * percent);\n                }\n            }\n\n            cm.focus();\n            \n            return this;\n        },\n        \n        /**\n         * 扩展当前实例对象，可同时设置多个或者只设置一个\n         * Extend editormd instance object, can mutil setting.\n         * \n         * @returns {editormd}                  this(editormd instance object.)\n         */\n        \n        extend : function() {\n            if (typeof arguments[1] !== \"undefined\")\n            {\n                if (typeof arguments[1] === \"function\")\n                {\n                    arguments[1] = $.proxy(arguments[1], this);\n                }\n\n                this[arguments[0]] = arguments[1];\n            }\n            \n            if (typeof arguments[0] === \"object\" && typeof arguments[0].length === \"undefined\")\n            {\n                $.extend(true, this, arguments[0]);\n            }\n\n            return this;\n        },\n        \n        /**\n         * 设置或扩展当前实例对象，单个设置\n         * Extend editormd instance object, one by one\n         * \n         * @param   {String|Object}   key       option key\n         * @param   {String|Object}   value     option value\n         * @returns {editormd}                  this(editormd instance object.)\n         */\n        \n        set : function (key, value) {\n            \n            if (typeof value !== \"undefined\" && typeof value === \"function\")\n            {\n                value = $.proxy(value, this);\n            }\n            \n            this[key] = value;\n\n            return this;\n        },\n        \n        /**\n         * 重新配置\n         * Resetting editor options\n         * \n         * @param   {String|Object}   key       option key\n         * @param   {String|Object}   value     option value\n         * @returns {editormd}                  this(editormd instance object.)\n         */\n        \n        config : function(key, value) {\n            var settings = this.settings;\n            \n            if (typeof key === \"object\")\n            {\n                settings = $.extend(true, settings, key);\n            }\n            \n            if (typeof key === \"string\")\n            {\n                settings[key] = value;\n            }\n            \n            this.settings = settings;\n            this.recreate();\n            \n            return this;\n        },\n        \n        /**\n         * 注册事件处理方法\n         * Bind editor event handle\n         * \n         * @param   {String}     eventType      event type\n         * @param   {Function}   callback       回调函数\n         * @returns {editormd}                  this(editormd instance object.)\n         */\n        \n        on : function(eventType, callback) {\n            var settings = this.settings;\n            \n            if (typeof settings[\"on\" + eventType] !== \"undefined\") \n            {                \n                settings[\"on\" + eventType] = $.proxy(callback, this);      \n            }\n\n            return this;\n        },\n        \n        /**\n         * 解除事件处理方法\n         * Unbind editor event handle\n         * \n         * @param   {String}   eventType          event type\n         * @returns {editormd}                    this(editormd instance object.)\n         */\n        \n        off : function(eventType) {\n            var settings = this.settings;\n            \n            if (typeof settings[\"on\" + eventType] !== \"undefined\") \n            {\n                settings[\"on\" + eventType] = function(){};\n            }\n            \n            return this;\n        },\n        \n        /**\n         * 显示工具栏\n         * Display toolbar\n         * \n         * @param   {Function} [callback=function(){}] 回调函数\n         * @returns {editormd}  返回editormd的实例对象\n         */\n        \n        showToolbar : function(callback) {\n            var settings = this.settings;\n            \n            if(settings.readOnly) {\n                return this;\n            }\n            \n            if (settings.toolbar && (this.toolbar.length < 1 || this.toolbar.find(\".\" + this.classPrefix + \"menu\").html() === \"\") )\n            {\n                this.setToolbar();\n            }\n            \n            settings.toolbar = true; \n            \n            this.toolbar.show();\n            this.resize();\n            \n            $.proxy(callback || function(){}, this)();\n\n            return this;\n        },\n        \n        /**\n         * 隐藏工具栏\n         * Hide toolbar\n         * \n         * @param   {Function} [callback=function(){}] 回调函数\n         * @returns {editormd}                         this(editormd instance object.)\n         */\n        \n        hideToolbar : function(callback) { \n            var settings = this.settings;\n            \n            settings.toolbar = false;  \n            this.toolbar.hide();\n            this.resize();\n            \n            $.proxy(callback || function(){}, this)();\n\n            return this;\n        },\n        \n        /**\n         * 页面滚动时工具栏的固定定位\n         * Set toolbar in window scroll auto fixed position\n         * \n         * @returns {editormd}  返回editormd的实例对象\n         */\n        \n        setToolbarAutoFixed : function(fixed) {\n            \n            var state    = this.state;\n            var editor   = this.editor;\n            var toolbar  = this.toolbar;\n            var settings = this.settings;\n            \n            if (typeof fixed !== \"undefined\")\n            {\n                settings.toolbarAutoFixed = fixed;\n            }\n            \n            var autoFixedHandle = function(){\n                var $window = $(window);\n                var top     = $window.scrollTop();\n                \n                if (!settings.toolbarAutoFixed)\n                {\n                    return false;\n                }\n\n                if (top - editor.offset().top > 10 && top < editor.height())\n                {\n                    toolbar.css({\n                        position : \"fixed\",\n                        width    : editor.width() + \"px\",\n                        left     : ($window.width() - editor.width()) / 2 + \"px\"\n                    });\n                }\n                else\n                {\n                    toolbar.css({\n                        position : \"absolute\",\n                        width    : \"100%\",\n                        left     : 0\n                    });\n                }\n            };\n            \n            if (!state.fullscreen && !state.preview && settings.toolbar && settings.toolbarAutoFixed)\n            {\n                $(window).bind(\"scroll\", autoFixedHandle);\n            }\n\n            return this;\n        },\n        \n        /**\n         * 配置和初始化工具栏\n         * Set toolbar and Initialization\n         * \n         * @returns {editormd}  返回editormd的实例对象\n         */\n        \n        setToolbar : function() {\n            var settings    = this.settings;  \n            \n            if(settings.readOnly) {\n                return this;\n            }\n            \n            var editor      = this.editor;\n            var preview     = this.preview;\n            var classPrefix = this.classPrefix;\n            \n            var toolbar     = this.toolbar = editor.children(\".\" + classPrefix + \"toolbar\");\n            \n            if (settings.toolbar && toolbar.length < 1)\n            {            \n                var toolbarHTML = \"<div class=\\\"\" + classPrefix + \"toolbar\\\"><div class=\\\"\" + classPrefix + \"toolbar-container\\\"><ul class=\\\"\" + classPrefix + \"menu\\\"></ul></div></div>\";\n                \n                editor.append(toolbarHTML);\n                toolbar = this.toolbar = editor.children(\".\" + classPrefix + \"toolbar\");\n            }\n            \n            if (!settings.toolbar) \n            {\n                toolbar.hide();\n                \n                return this;\n            }\n            \n            toolbar.show();\n            \n            var icons       = (typeof settings.toolbarIcons === \"function\") ? settings.toolbarIcons() \n                            : ((typeof settings.toolbarIcons === \"string\")  ? editormd.toolbarModes[settings.toolbarIcons] : settings.toolbarIcons);\n            \n            var toolbarMenu = toolbar.find(\".\" + this.classPrefix + \"menu\"), menu = \"\";\n            var pullRight   = false;\n            \n            for (var i = 0, len = icons.length; i < len; i++)\n            {\n                var name = icons[i];\n\n                if (name === \"||\") \n                { \n                    pullRight = true;\n                } \n                else if (name === \"|\")\n                {\n                    menu += \"<li class=\\\"divider\\\" unselectable=\\\"on\\\">|</li>\";\n                }\n                else\n                {\n                    var isHeader = (/h(\\d)/.test(name));\n                    var index    = name;\n                    \n                    if (name === \"watch\" && !settings.watch) {\n                        index = \"unwatch\";\n                    }\n                    \n                    var title     = settings.lang.toolbar[index];\n                    var iconTexts = settings.toolbarIconTexts[index];\n                    var iconClass = settings.toolbarIconsClass[index];\n                    \n                    title     = (typeof title     === \"undefined\") ? \"\" : title;\n                    iconTexts = (typeof iconTexts === \"undefined\") ? \"\" : iconTexts;\n                    iconClass = (typeof iconClass === \"undefined\") ? \"\" : iconClass;\n\n                    var menuItem = pullRight ? \"<li class=\\\"pull-right\\\">\" : \"<li>\";\n                    \n                    if (typeof settings.toolbarCustomIcons[name] !== \"undefined\" && typeof settings.toolbarCustomIcons[name] !== \"function\")\n                    {\n                        menuItem += settings.toolbarCustomIcons[name];\n                    }\n                    else \n                    {\n                        menuItem += \"<a href=\\\"javascript:;\\\" title=\\\"\" + title + \"\\\" unselectable=\\\"on\\\">\";\n                        menuItem += \"<i class=\\\"fa \" + iconClass + \"\\\" name=\\\"\"+name+\"\\\" unselectable=\\\"on\\\">\"+((isHeader) ? name.toUpperCase() : ( (iconClass === \"\") ? iconTexts : \"\") ) + \"</i>\";\n                        menuItem += \"</a>\";\n                    }\n\n                    menuItem += \"</li>\";\n\n                    menu = pullRight ? menuItem + menu : menu + menuItem;\n                }\n            }\n\n            toolbarMenu.html(menu);\n            \n            toolbarMenu.find(\"[title=\\\"Lowercase\\\"]\").attr(\"title\", settings.lang.toolbar.lowercase);\n            toolbarMenu.find(\"[title=\\\"ucwords\\\"]\").attr(\"title\", settings.lang.toolbar.ucwords);\n            \n            this.setToolbarHandler();\n            this.setToolbarAutoFixed();\n\n            return this;\n        },\n        \n        /**\n         * 工具栏图标事件处理对象序列\n         * Get toolbar icons event handlers\n         * \n         * @param   {Object}   cm    CodeMirror的实例对象\n         * @param   {String}   name  要获取的事件处理器名称\n         * @returns {Object}         返回处理对象序列\n         */\n            \n        dialogLockScreen : function() {\n            $.proxy(editormd.dialogLockScreen, this)();\n            \n            return this;\n        },\n\n        dialogShowMask : function(dialog) {\n            $.proxy(editormd.dialogShowMask, this)(dialog);\n            \n            return this;\n        },\n        \n        getToolbarHandles : function(name) {  \n            var toolbarHandlers = this.toolbarHandlers = editormd.toolbarHandlers;\n            \n            return (name && typeof toolbarIconHandlers[name] !== \"undefined\") ? toolbarHandlers[name] : toolbarHandlers;\n        },\n        \n        /**\n         * 工具栏图标事件处理器\n         * Bind toolbar icons event handle\n         * \n         * @returns {editormd}  返回editormd的实例对象\n         */\n        \n        setToolbarHandler : function() {\n            var _this               = this;\n            var settings            = this.settings;\n            \n            if (!settings.toolbar || settings.readOnly) {\n                return this;\n            }\n            \n            var toolbar             = this.toolbar;\n            var cm                  = this.cm;\n            var classPrefix         = this.classPrefix;           \n            var toolbarIcons        = this.toolbarIcons = toolbar.find(\".\" + classPrefix + \"menu > li > a\");  \n            var toolbarIconHandlers = this.getToolbarHandles();  \n                \n            toolbarIcons.bind(editormd.mouseOrTouch(\"click\", \"touchend\"), function(event) {\n\n                var icon                = $(this).children(\".fa\");\n                var name                = icon.attr(\"name\");\n                var cursor              = cm.getCursor();\n                var selection           = cm.getSelection();\n\n                if (name === \"\") {\n                    return ;\n                }\n                \n                _this.activeIcon = icon;\n\n                if (typeof toolbarIconHandlers[name] !== \"undefined\") \n                {\n                    $.proxy(toolbarIconHandlers[name], _this)(cm);\n                }\n                else \n                {\n                    if (typeof settings.toolbarHandlers[name] !== \"undefined\") \n                    {\n                        $.proxy(settings.toolbarHandlers[name], _this)(cm, icon, cursor, selection);\n                    }\n                }\n                \n                if (name !== \"link\" && name !== \"reference-link\" && name !== \"image\" && name !== \"code-block\" && \n                    name !== \"preformatted-text\" && name !== \"watch\" && name !== \"preview\" && name !== \"search\" && name !== \"fullscreen\" && name !== \"info\") \n                {\n                    cm.focus();\n                }\n\n                return false;\n\n            });\n\n            return this;\n        },\n        \n        /**\n         * 动态创建对话框\n         * Creating custom dialogs\n         * \n         * @param   {Object} options  配置项键值对 Key/Value\n         * @returns {dialog}          返回创建的dialog的jQuery实例对象\n         */\n        \n        createDialog : function(options) {            \n            return $.proxy(editormd.createDialog, this)(options);\n        },\n        \n        /**\n         * 创建关于Editor.md的对话框\n         * Create about Editor.md dialog\n         * \n         * @returns {editormd}  返回editormd的实例对象\n         */\n        \n        createInfoDialog : function() {\n            var _this        = this;\n\t\t\tvar editor       = this.editor;\n            var classPrefix  = this.classPrefix;  \n            \n            var infoDialogHTML = [\n                \"<div class=\\\"\" + classPrefix + \"dialog \" + classPrefix + \"dialog-info\\\" style=\\\"\\\">\",\n                \"<div class=\\\"\" + classPrefix + \"dialog-container\\\">\",\n                \"<h1><i class=\\\"editormd-logo editormd-logo-lg editormd-logo-color\\\"></i> \" + editormd.title + \"<small>v\" + editormd.version + \"</small></h1>\",\n                \"<p>\" + this.lang.description + \"</p>\",\n                \"<p style=\\\"margin: 10px 0 20px 0;\\\"><a href=\\\"\" + editormd.homePage + \"\\\" target=\\\"_blank\\\">\" + editormd.homePage + \" <i class=\\\"fa fa-external-link\\\"></i></a></p>\",\n                \"<p style=\\\"font-size: 0.85em;\\\">Copyright &copy; 2015 <a href=\\\"https://github.com/pandao\\\" target=\\\"_blank\\\" class=\\\"hover-link\\\">Pandao</a>, The <a href=\\\"https://github.com/pandao/editor.md/blob/master/LICENSE\\\" target=\\\"_blank\\\" class=\\\"hover-link\\\">MIT</a> License.</p>\",\n                \"</div>\",\n                \"<a href=\\\"javascript:;\\\" class=\\\"fa fa-close \" + classPrefix + \"dialog-close\\\"></a>\",\n                \"</div>\"\n            ].join(\"\\n\");\n\n            editor.append(infoDialogHTML);\n            \n            var infoDialog  = this.infoDialog = editor.children(\".\" + classPrefix + \"dialog-info\");\n\n            infoDialog.find(\".\" + classPrefix + \"dialog-close\").bind(editormd.mouseOrTouch(\"click\", \"touchend\"), function() {\n                _this.hideInfoDialog();\n            });\n            \n            infoDialog.css(\"border\", (editormd.isIE8) ? \"1px solid #ddd\" : \"\").css(\"z-index\", editormd.dialogZindex).show();\n            \n            this.infoDialogPosition();\n\n            return this;\n        },\n        \n        /**\n         * 关于Editor.md对话居中定位\n         * Editor.md dialog position handle\n         * \n         * @returns {editormd}  返回editormd的实例对象\n         */\n        \n        infoDialogPosition : function() {\n            var infoDialog = this.infoDialog;\n            \n\t\t\tvar _infoDialogPosition = function() {\n\t\t\t\tinfoDialog.css({\n\t\t\t\t\ttop  : ($(window).height() - infoDialog.height()) / 2 + \"px\",\n\t\t\t\t\tleft : ($(window).width()  - infoDialog.width()) / 2  + \"px\"\n\t\t\t\t});\n\t\t\t};\n\n\t\t\t_infoDialogPosition();\n\n\t\t\t$(window).resize(_infoDialogPosition);\n            \n            return this;\n        },\n        \n        /**\n         * 显示关于Editor.md\n         * Display about Editor.md dialog\n         * \n         * @returns {editormd}  返回editormd的实例对象\n         */\n        \n        showInfoDialog : function() {\n\n            $(\"html,body\").css(\"overflow-x\", \"hidden\");\n            \n            var _this       = this;\n\t\t\tvar editor      = this.editor;\n            var settings    = this.settings;         \n\t\t\tvar infoDialog  = this.infoDialog = editor.children(\".\" + this.classPrefix + \"dialog-info\");\n            \n            if (infoDialog.length < 1)\n            {\n                this.createInfoDialog();\n            }\n            \n            this.lockScreen(true);\n            \n            this.mask.css({\n\t\t\t\t\t\topacity         : settings.dialogMaskOpacity,\n\t\t\t\t\t\tbackgroundColor : settings.dialogMaskBgColor\n\t\t\t\t\t}).show();\n\n\t\t\tinfoDialog.css(\"z-index\", editormd.dialogZindex).show();\n\n\t\t\tthis.infoDialogPosition();\n\n            return this;\n        },\n        \n        /**\n         * 隐藏关于Editor.md\n         * Hide about Editor.md dialog\n         * \n         * @returns {editormd}  返回editormd的实例对象\n         */\n        \n        hideInfoDialog : function() {            \n            $(\"html,body\").css(\"overflow-x\", \"\");\n            this.infoDialog.hide();\n            this.mask.hide();\n            this.lockScreen(false);\n\n            return this;\n        },\n        \n        /**\n         * 锁屏\n         * lock screen\n         * \n         * @param   {Boolean}    lock    Boolean 布尔值，是否锁屏\n         * @returns {editormd}           返回editormd的实例对象\n         */\n        \n        lockScreen : function(lock) {\n            editormd.lockScreen(lock);\n            this.resize();\n\n            return this;\n        },\n        \n        /**\n         * 编辑器界面重建，用于动态语言包或模块加载等\n         * Recreate editor\n         * \n         * @returns {editormd}  返回editormd的实例对象\n         */\n        \n        recreate : function() {\n            var _this            = this;\n            var editor           = this.editor;\n            var settings         = this.settings;\n            \n            this.codeMirror.remove();\n            \n            this.setCodeMirror();\n\n            if (!settings.readOnly) \n            {\n                if (editor.find(\".editormd-dialog\").length > 0) {\n                    editor.find(\".editormd-dialog\").remove();\n                }\n                \n                if (settings.toolbar) \n                {  \n                    this.getToolbarHandles();                  \n                    this.setToolbar();\n                }\n            }\n            \n            this.loadedDisplay(true);\n\n            return this;\n        },\n        \n        /**\n         * 高亮预览HTML的pre代码部分\n         * highlight of preview codes\n         * \n         * @returns {editormd}             返回editormd的实例对象\n         */\n        \n        previewCodeHighlight : function() {    \n            var settings         = this.settings;\n            var previewContainer = this.previewContainer;\n            \n            if (settings.previewCodeHighlight) \n            {\n                // previewContainer.find(\"pre\").addClass(\"prettyprint\");\n                //\n                // if (typeof prettyPrint !== \"undefined\")\n                // {\n                //     prettyPrint();\n                // }\n                if (typeof hljs !== \"undefined\") {\n                    previewContainer.find('pre').each(function (i, block) {\n                        hljs.highlightBlock(block);\n                    });\n                }\n            }\n\n            return this;\n        },\n        \n        /**\n         * 解析TeX(KaTeX)科学公式\n         * TeX(KaTeX) Renderer\n         * \n         * @returns {editormd}             返回editormd的实例对象\n         */\n        \n        katexRender : function() {\n            \n            if (timer === null)\n            {\n                return this;\n            }\n            \n            this.previewContainer.find(\".\" + editormd.classNames.tex).each(function(){\n                var tex  = $(this);\n                editormd.$katex.render(tex.text(), tex[0]);\n                \n                tex.find(\".katex\").css(\"font-size\", \"1.6em\");\n            });   \n\n            return this;\n        },\n        \n        /**\n         * 解析和渲染流程图及时序图\n         * FlowChart and SequenceDiagram Renderer\n         * \n         * @returns {editormd}             返回editormd的实例对象\n         */\n        \n        flowChartAndSequenceDiagramRender : function() {\n            var $this            = this;\n            var settings         = this.settings;\n            var previewContainer = this.previewContainer;\n            \n            if (editormd.isIE8) {\n                return this;\n            }\n\n            if (settings.flowChart) {\n                if (flowchartTimer === null) {\n                    return this;\n                }\n                \n                previewContainer.find(\".flowchart\").flowChart(); \n            }\n\n            if (settings.sequenceDiagram) {\n                previewContainer.find(\".sequence-diagram\").sequenceDiagram({theme: \"simple\"});\n            }\n                    \n            var preview    = $this.preview;\n            var codeMirror = $this.codeMirror;\n            var codeView   = codeMirror.find(\".CodeMirror-scroll\");\n\n            var height    = codeView.height();\n            var scrollTop = codeView.scrollTop();                    \n            var percent   = (scrollTop / codeView[0].scrollHeight);\n            var tocHeight = 0;\n\n            preview.find(\".markdown-toc-list\").each(function(){\n                tocHeight += $(this).height();\n            });\n\n            var tocMenuHeight = preview.find(\".editormd-toc-menu\").height(); \n            tocMenuHeight = (!tocMenuHeight) ? 0 : tocMenuHeight;\n\n            if (scrollTop === 0) \n            {\n                preview.scrollTop(0);\n            } \n            else if (scrollTop + height >= codeView[0].scrollHeight - 16)\n            { \n                preview.scrollTop(preview[0].scrollHeight);                        \n            } \n            else\n            {                  \n                preview.scrollTop((preview[0].scrollHeight + tocHeight + tocMenuHeight) * percent);\n            }\n\n            return this;\n        },\n        \n        /**\n         * 注册键盘快捷键处理\n         * Register CodeMirror keyMaps (keyboard shortcuts).\n         * \n         * @param   {Object}    keyMap      KeyMap key/value {\"(Ctrl/Shift/Alt)-Key\" : function(){}}\n         * @returns {editormd}              return this\n         */\n        \n        registerKeyMaps : function(keyMap) {\n            \n            var _this           = this;\n            var cm              = this.cm;\n            var settings        = this.settings;\n            var toolbarHandlers = editormd.toolbarHandlers;\n            var disabledKeyMaps = settings.disabledKeyMaps;\n            \n            keyMap              = keyMap || null;\n            \n            if (keyMap)\n            {\n                for (var i in keyMap)\n                {\n                    if ($.inArray(i, disabledKeyMaps) < 0)\n                    {\n                        var map = {};\n                        map[i]  = keyMap[i];\n\n                        cm.addKeyMap(keyMap);\n                    }\n                }\n            }\n            else\n            {\n                for (var k in editormd.keyMaps)\n                {\n                    var _keyMap = editormd.keyMaps[k];\n                    var handle = (typeof _keyMap === \"string\") ? $.proxy(toolbarHandlers[_keyMap], _this) : $.proxy(_keyMap, _this);\n                    \n                    if ($.inArray(k, [\"F9\", \"F10\", \"F11\"]) < 0 && $.inArray(k, disabledKeyMaps) < 0)\n                    {\n                        var _map = {};\n                        _map[k] = handle;\n\n                        cm.addKeyMap(_map);\n                    }\n                }\n                \n                $(window).keydown(function(event) {\n                    \n                    var keymaps = {\n                        \"120\" : \"F9\",\n                        \"121\" : \"F10\",\n                        \"122\" : \"F11\"\n                    };\n                    \n                    if ( $.inArray(keymaps[event.keyCode], disabledKeyMaps) < 0 )\n                    {\n                        switch (event.keyCode)\n                        {\n                            case 120:\n                                    $.proxy(toolbarHandlers[\"watch\"], _this)();\n                                    return false;\n                                break;\n                                \n                            case 121:\n                                    $.proxy(toolbarHandlers[\"preview\"], _this)();\n                                    return false;\n                                break;\n                                \n                            case 122:\n                                    $.proxy(toolbarHandlers[\"fullscreen\"], _this)();                        \n                                    return false;\n                                break;\n                                \n                            default:\n                                break;\n                        }\n                    }\n                });\n            }\n\n            return this;\n        },\n        \n        /**\n         * 绑定同步滚动\n         * \n         * @returns {editormd} return this\n         */\n        \n        bindScrollEvent : function() {\n            \n            var _this            = this;\n            var preview          = this.preview;\n            var settings         = this.settings;\n            var codeMirror       = this.codeMirror;\n            var mouseOrTouch     = editormd.mouseOrTouch;\n            \n            if (!settings.syncScrolling) {\n                return this;\n            }\n                \n            var cmBindScroll = function() {    \n                codeMirror.find(\".CodeMirror-scroll\").bind(mouseOrTouch(\"scroll\", \"touchmove\"), function(event) {\n                    var height    = $(this).height();\n                    var scrollTop = $(this).scrollTop();                    \n                    var percent   = (scrollTop / $(this)[0].scrollHeight);\n                    \n                    var tocHeight = 0;\n                    \n                    preview.find(\".markdown-toc-list\").each(function(){\n                        tocHeight += $(this).height();\n                    });\n                    \n                    var tocMenuHeight = preview.find(\".editormd-toc-menu\").height();\n                    tocMenuHeight = (!tocMenuHeight) ? 0 : tocMenuHeight;\n\n                    if (scrollTop === 0) \n                    {\n                        preview.scrollTop(0);\n                    } \n                    else if (scrollTop + height >= $(this)[0].scrollHeight - 16)\n                    { \n                        preview.scrollTop(preview[0].scrollHeight);                        \n                    } \n                    else\n                    {\n                        preview.scrollTop((preview[0].scrollHeight  + tocHeight + tocMenuHeight) * percent);\n                    }\n                    \n                    $.proxy(settings.onscroll, _this)(event);\n                });\n            };\n\n            var cmUnbindScroll = function() {\n                codeMirror.find(\".CodeMirror-scroll\").unbind(mouseOrTouch(\"scroll\", \"touchmove\"));\n            };\n\n            var previewBindScroll = function() {\n                \n                preview.bind(mouseOrTouch(\"scroll\", \"touchmove\"), function(event) {\n                    var height    = $(this).height();\n                    var scrollTop = $(this).scrollTop();         \n                    var percent   = (scrollTop / $(this)[0].scrollHeight);\n                    var codeView  = codeMirror.find(\".CodeMirror-scroll\");\n\n                    if(scrollTop === 0) \n                    {\n                        codeView.scrollTop(0);\n                    }\n                    else if (scrollTop + height >= $(this)[0].scrollHeight)\n                    {\n                        codeView.scrollTop(codeView[0].scrollHeight);                        \n                    }\n                    else \n                    {\n                        codeView.scrollTop(codeView[0].scrollHeight * percent);\n                    }\n                    \n                    $.proxy(settings.onpreviewscroll, _this)(event);\n                });\n\n            };\n\n            var previewUnbindScroll = function() {\n                preview.unbind(mouseOrTouch(\"scroll\", \"touchmove\"));\n            }; \n\n\t\t\tcodeMirror.bind({\n\t\t\t\tmouseover  : cmBindScroll,\n\t\t\t\tmouseout   : cmUnbindScroll,\n\t\t\t\ttouchstart : cmBindScroll,\n\t\t\t\ttouchend   : cmUnbindScroll\n\t\t\t});\n            \n            if (settings.syncScrolling === \"single\") {\n                return this;\n            }\n            \n\t\t\tpreview.bind({\n\t\t\t\tmouseover  : previewBindScroll,\n\t\t\t\tmouseout   : previewUnbindScroll,\n\t\t\t\ttouchstart : previewBindScroll,\n\t\t\t\ttouchend   : previewUnbindScroll\n\t\t\t});\n\n            return this;\n        },\n        \n        bindChangeEvent : function() {\n            \n            var _this            = this;\n            var cm               = this.cm;\n            var settings         = this.settings;\n            \n            if (!settings.syncScrolling) {\n                return this;\n            }\n            \n            cm.on(\"change\", function(_cm, changeObj) {\n                \n                if (settings.watch)\n                {\n                    _this.previewContainer.css(\"padding\", settings.autoHeight ? \"20px 20px 50px 40px\" : \"20px\");\n                }\n                \n                timer = setTimeout(function() {\n                    clearTimeout(timer);\n                    _this.save();\n                    timer = null;\n                }, settings.delay);\n            });\n\n            return this;\n        },\n        \n        /**\n         * 加载队列完成之后的显示处理\n         * Display handle of the module queues loaded after.\n         * \n         * @param   {Boolean}   recreate   是否为重建编辑器\n         * @returns {editormd}             返回editormd的实例对象\n         */\n        \n        loadedDisplay : function(recreate) {\n            \n            recreate             = recreate || false;\n            \n            var _this            = this;\n            var editor           = this.editor;\n            var preview          = this.preview;\n            var settings         = this.settings;\n            \n            this.containerMask.hide();\n            \n            this.save();\n            \n            if (settings.watch) {\n                preview.show();\n            }\n            \n            editor.data(\"oldWidth\", editor.width()).data(\"oldHeight\", editor.height()); // 为了兼容Zepto\n            \n            this.resize();\n            this.registerKeyMaps();\n            \n            $(window).resize(function(){\n                _this.resize();\n            });\n            \n            this.bindScrollEvent().bindChangeEvent();\n            \n            if (!recreate)\n            {\n                $.proxy(settings.onload, this)();\n            }\n            \n            this.state.loaded = true;\n\n            return this;\n        },\n        \n        /**\n         * 设置编辑器的宽度\n         * Set editor width\n         * \n         * @param   {Number|String} width  编辑器宽度值\n         * @returns {editormd}             返回editormd的实例对象\n         */\n        \n        width : function(width) {\n                \n            this.editor.css(\"width\", (typeof width === \"number\") ? width  + \"px\" : width);            \n            this.resize();\n            \n            return this;\n        },\n        \n        /**\n         * 设置编辑器的高度\n         * Set editor height\n         * \n         * @param   {Number|String} height  编辑器高度值\n         * @returns {editormd}              返回editormd的实例对象\n         */\n        \n        height : function(height) {\n                \n            this.editor.css(\"height\", (typeof height === \"number\")  ? height  + \"px\" : height);            \n            this.resize();\n            \n            return this;\n        },\n        \n        /**\n         * 调整编辑器的尺寸和布局\n         * Resize editor layout\n         * \n         * @param   {Number|String} [width=null]  编辑器宽度值\n         * @param   {Number|String} [height=null] 编辑器高度值\n         * @returns {editormd}                    返回editormd的实例对象\n         */\n        \n        resize : function(width, height) {\n            \n            width  = width  || null;\n            height = height || null;\n            \n            var state      = this.state;\n            var editor     = this.editor;\n            var preview    = this.preview;\n            var toolbar    = this.toolbar;\n            var settings   = this.settings;\n            var codeMirror = this.codeMirror;\n            \n            if (width)\n            {\n                editor.css(\"width\", (typeof width  === \"number\") ? width  + \"px\" : width);\n            }\n            \n            if (settings.autoHeight && !state.fullscreen && !state.preview)\n            {\n                editor.css(\"height\", \"auto\");\n                codeMirror.css(\"height\", \"auto\");\n            } \n            else \n            {\n                if (height) \n                {\n                    editor.css(\"height\", (typeof height === \"number\") ? height + \"px\" : height);\n                }\n                \n                if (state.fullscreen)\n                {\n                    editor.height($(window).height());\n                }\n\n                if (settings.toolbar && !settings.readOnly) \n                {\n                    codeMirror.css(\"margin-top\", toolbar.height() + 1).height(editor.height() - toolbar.height());\n                } \n                else\n                {\n                    codeMirror.css(\"margin-top\", 0).height(editor.height());\n                }\n            }\n            \n            if(settings.watch) \n            {\n                codeMirror.width(editor.width() / 2);\n                preview.width((!state.preview) ? editor.width() / 2 : editor.width());\n                \n                this.previewContainer.css(\"padding\", settings.autoHeight ? \"20px 20px 50px 40px\" : \"20px\");\n                \n                if (settings.toolbar && !settings.readOnly) \n                {\n                    preview.css(\"top\", toolbar.height() + 1);\n                } \n                else \n                {\n                    preview.css(\"top\", 0);\n                }\n                \n                if (settings.autoHeight && !state.fullscreen && !state.preview)\n                {\n                    preview.height(\"\");\n                }\n                else\n                {                \n                    var previewHeight = (settings.toolbar && !settings.readOnly) ? editor.height() - toolbar.height() : editor.height();\n                    \n                    preview.height(previewHeight);\n                }\n            } \n            else \n            {\n                codeMirror.width(editor.width());\n                preview.hide();\n            }\n            \n            if (state.loaded) \n            {\n                $.proxy(settings.onresize, this)();\n            }\n\n            return this;\n        },\n        \n        /**\n         * 解析和保存Markdown代码\n         * Parse & Saving Markdown source code\n         * \n         * @returns {editormd}     返回editormd的实例对象\n         */\n        \n        save : function() {\n            \n            if (timer === null)\n            {\n                return this;\n            }\n            \n            var _this            = this;\n            var state            = this.state;\n            var settings         = this.settings;\n            var cm               = this.cm;            \n            var cmValue          = cm.getValue();\n            var previewContainer = this.previewContainer;\n\n            if (settings.mode !== \"gfm\" && settings.mode !== \"markdown\") \n            {\n                this.markdownTextarea.val(cmValue);\n                \n                return this;\n            }\n            \n            var marked          = editormd.$marked;\n            var markdownToC     = this.markdownToC = [];            \n            var rendererOptions = this.markedRendererOptions = {  \n                toc                  : settings.toc,\n                tocm                 : settings.tocm,\n                tocStartLevel        : settings.tocStartLevel,\n                pageBreak            : settings.pageBreak,\n                taskList             : settings.taskList,\n                emoji                : settings.emoji,\n                tex                  : settings.tex,\n                atLink               : settings.atLink,           // for @link\n                emailLink            : settings.emailLink,        // for mail address auto link\n                flowChart            : settings.flowChart,\n                sequenceDiagram      : settings.sequenceDiagram,\n                previewCodeHighlight : settings.previewCodeHighlight,\n            };\n            \n            var markedOptions = this.markedOptions = {\n                renderer    : editormd.markedRenderer(markdownToC, rendererOptions),\n                gfm         : true,\n                tables      : true,\n                breaks      : true,\n                pedantic    : false,\n                sanitize    : (settings.htmlDecode) ? false : true,  // 关闭忽略HTML标签，即开启识别HTML标签，默认为false\n                smartLists  : true,\n                smartypants : true\n            };\n            \n            marked.setOptions(markedOptions);\n                    \n            var newMarkdownDoc = editormd.$marked(cmValue, markedOptions);\n            \n            //console.info(\"cmValue\", cmValue, newMarkdownDoc);\n            \n            newMarkdownDoc = editormd.filterHTMLTags(newMarkdownDoc, settings.htmlDecode);\n            \n            //console.error(\"cmValue\", cmValue, newMarkdownDoc);\n            \n            this.markdownTextarea.text(cmValue);\n            \n            cm.save();\n            \n            if (settings.saveHTMLToTextarea) \n            {\n                this.htmlTextarea.text(newMarkdownDoc);\n            }\n            \n            if(settings.watch || (!settings.watch && state.preview))\n            {\n                previewContainer.html(newMarkdownDoc);\n\n                this.previewCodeHighlight();\n                \n                if (settings.toc) \n                {\n                    var tocContainer = (settings.tocContainer === \"\") ? previewContainer : $(settings.tocContainer);\n                    var tocMenu      = tocContainer.find(\".\" + this.classPrefix + \"toc-menu\");\n                    \n                    tocContainer.attr(\"previewContainer\", (settings.tocContainer === \"\") ? \"true\" : \"false\");\n                    \n                    if (settings.tocContainer !== \"\" && tocMenu.length > 0)\n                    {\n                        tocMenu.remove();\n                    }\n                    \n                    editormd.markdownToCRenderer(markdownToC, tocContainer, settings.tocDropdown, settings.tocStartLevel);\n            \n                    if (settings.tocDropdown || tocContainer.find(\".\" + this.classPrefix + \"toc-menu\").length > 0)\n                    {\n                        editormd.tocDropdownMenu(tocContainer, (settings.tocTitle !== \"\") ? settings.tocTitle : this.lang.tocTitle);\n                    }\n            \n                    if (settings.tocContainer !== \"\")\n                    {\n                        previewContainer.find(\".markdown-toc\").css(\"border\", \"none\");\n                    }\n                }\n                \n                if (settings.tex)\n                {\n                    if (!editormd.kaTeXLoaded && settings.autoLoadModules) \n                    {\n                        editormd.loadKaTeX(function() {\n                            editormd.$katex = katex;\n                            editormd.kaTeXLoaded = true;\n                            _this.katexRender();\n                        });\n                    } \n                    else \n                    {\n                        editormd.$katex = katex;\n                        this.katexRender();\n                    }\n                }                \n                \n                if (settings.flowChart || settings.sequenceDiagram)\n                {\n                    flowchartTimer = setTimeout(function(){\n                        clearTimeout(flowchartTimer);\n                        _this.flowChartAndSequenceDiagramRender();\n                        flowchartTimer = null;\n                    }, 10);\n                }\n\n                if (state.loaded) \n                {\n                    $.proxy(settings.onchange, this)();\n                }\n            }\n\n            return this;\n        },\n        \n        /**\n         * 聚焦光标位置\n         * Focusing the cursor position\n         * \n         * @returns {editormd}         返回editormd的实例对象\n         */\n        \n        focus : function() {\n            this.cm.focus();\n\n            return this;\n        },\n        \n        /**\n         * 设置光标的位置\n         * Set cursor position\n         * \n         * @param   {Object}    cursor 要设置的光标位置键值对象，例：{line:1, ch:0}\n         * @returns {editormd}         返回editormd的实例对象\n         */\n        \n        setCursor : function(cursor) {\n            this.cm.setCursor(cursor);\n\n            return this;\n        },\n        \n        /**\n         * 获取当前光标的位置\n         * Get the current position of the cursor\n         * \n         * @returns {Cursor}         返回一个光标Cursor对象\n         */\n        \n        getCursor : function() {\n            return this.cm.getCursor();\n        },\n        \n        /**\n         * 设置光标选中的范围\n         * Set cursor selected ranges\n         * \n         * @param   {Object}    from   开始位置的光标键值对象，例：{line:1, ch:0}\n         * @param   {Object}    to     结束位置的光标键值对象，例：{line:1, ch:0}\n         * @returns {editormd}         返回editormd的实例对象\n         */\n        \n        setSelection : function(from, to) {\n        \n            this.cm.setSelection(from, to);\n        \n            return this;\n        },\n        \n        /**\n         * 获取光标选中的文本\n         * Get the texts from cursor selected\n         * \n         * @returns {String}         返回选中文本的字符串形式\n         */\n        \n        getSelection : function() {\n            return this.cm.getSelection();\n        },\n        \n        /**\n         * 设置光标选中的文本范围\n         * Set the cursor selection ranges\n         * \n         * @param   {Array}    ranges  cursor selection ranges array\n         * @returns {Array}            return this\n         */\n        \n        setSelections : function(ranges) {\n            this.cm.setSelections(ranges);\n            \n            return this;\n        },\n        \n        /**\n         * 获取光标选中的文本范围\n         * Get the cursor selection ranges\n         * \n         * @returns {Array}         return selection ranges array\n         */\n        \n        getSelections : function() {\n            return this.cm.getSelections();\n        },\n        \n        /**\n         * 替换当前光标选中的文本或在当前光标处插入新字符\n         * Replace the text at the current cursor selected or insert a new character at the current cursor position\n         * \n         * @param   {String}    value  要插入的字符值\n         * @returns {editormd}         返回editormd的实例对象\n         */\n        \n        replaceSelection : function(value) {\n            this.cm.replaceSelection(value);\n\n            return this;\n        },\n        \n        /**\n         * 在当前光标处插入新字符\n         * Insert a new character at the current cursor position\n         *\n         * 同replaceSelection()方法\n         * With the replaceSelection() method\n         * \n         * @param   {String}    value  要插入的字符值\n         * @returns {editormd}         返回editormd的实例对象\n         */\n        \n        insertValue : function(value) {\n            this.replaceSelection(value);\n\n            return this;\n        },\n        \n        /**\n         * 追加markdown\n         * append Markdown to editor\n         * \n         * @param   {String}    md     要追加的markdown源文档\n         * @returns {editormd}         返回editormd的实例对象\n         */\n        \n        appendMarkdown : function(md) {\n            var settings = this.settings;\n            var cm       = this.cm;\n            \n            cm.setValue(cm.getValue() + md);\n            \n            return this;\n        },\n        \n        /**\n         * 设置和传入编辑器的markdown源文档\n         * Set Markdown source document\n         * \n         * @param   {String}    md     要传入的markdown源文档\n         * @returns {editormd}         返回editormd的实例对象\n         */\n        \n        setMarkdown : function(md) {\n            this.cm.setValue(md || this.settings.markdown);\n            \n            return this;\n        },\n        \n        /**\n         * 获取编辑器的markdown源文档\n         * Set Editor.md markdown/CodeMirror value\n         * \n         * @returns {editormd}         返回editormd的实例对象\n         */\n        \n        getMarkdown : function() {\n            return this.cm.getValue();\n        },\n        \n        /**\n         * 获取编辑器的源文档\n         * Get CodeMirror value\n         * \n         * @returns {editormd}         返回editormd的实例对象\n         */\n        \n        getValue : function() {\n            return this.cm.getValue();\n        },\n        \n        /**\n         * 设置编辑器的源文档\n         * Set CodeMirror value\n         * \n         * @param   {String}     value   set code/value/string/text\n         * @returns {editormd}           返回editormd的实例对象\n         */\n        \n        setValue : function(value) {\n            this.cm.setValue(value);\n            \n            return this;\n        },\n        \n        /**\n         * 清空编辑器\n         * Empty CodeMirror editor container\n         * \n         * @returns {editormd}         返回editormd的实例对象\n         */\n        \n        clear : function() {\n            this.cm.setValue(\"\");\n            \n            return this;\n        },\n        \n        /**\n         * 获取解析后存放在Textarea的HTML源码\n         * Get parsed html code from Textarea\n         * \n         * @returns {String}               返回HTML源码\n         */\n        \n        getHTML : function() {\n            if (!this.settings.saveHTMLToTextarea)\n            {\n                alert(\"Error: settings.saveHTMLToTextarea == false\");\n\n                return false;\n            }\n            \n            return this.htmlTextarea.val();\n        },\n        \n        /**\n         * getHTML()的别名\n         * getHTML (alias)\n         * \n         * @returns {String}           Return html code 返回HTML源码\n         */\n        \n        getTextareaSavedHTML : function() {\n            return this.getHTML();\n        },\n        \n        /**\n         * 获取预览窗口的HTML源码\n         * Get html from preview container\n         * \n         * @returns {editormd}         返回editormd的实例对象\n         */\n        \n        getPreviewedHTML : function() {\n            if (!this.settings.watch)\n            {\n                alert(\"Error: settings.watch == false\");\n\n                return false;\n            }\n            \n            return this.previewContainer.html();\n        },\n        \n        /**\n         * 开启实时预览\n         * Enable real-time watching\n         * \n         * @returns {editormd}         返回editormd的实例对象\n         */\n        \n        watch : function(callback) {     \n            var settings        = this.settings;\n            \n            if ($.inArray(settings.mode, [\"gfm\", \"markdown\"]) < 0)\n            {\n                return this;\n            }\n            \n            this.state.watching = settings.watch = true;\n            this.preview.show();\n            \n            if (this.toolbar)\n            {\n                var watchIcon   = settings.toolbarIconsClass.watch;\n                var unWatchIcon = settings.toolbarIconsClass.unwatch;\n                \n                var icon        = this.toolbar.find(\".fa[name=watch]\");\n                icon.parent().attr(\"title\", settings.lang.toolbar.watch);\n                icon.removeClass(unWatchIcon).addClass(watchIcon);\n            }\n            \n            this.codeMirror.css(\"border-right\", \"1px solid #ddd\").width(this.editor.width() / 2); \n            \n            timer = 0;\n            \n            this.save().resize();\n            \n            if (!settings.onwatch)\n            {\n                settings.onwatch = callback || function() {};\n            }\n            \n            $.proxy(settings.onwatch, this)();\n            \n            return this;\n        },\n        \n        /**\n         * 关闭实时预览\n         * Disable real-time watching\n         * \n         * @returns {editormd}         返回editormd的实例对象\n         */\n        \n        unwatch : function(callback) {\n            var settings        = this.settings;\n            this.state.watching = settings.watch = false;\n            this.preview.hide();\n            \n            if (this.toolbar) \n            {\n                var watchIcon   = settings.toolbarIconsClass.watch;\n                var unWatchIcon = settings.toolbarIconsClass.unwatch;\n                \n                var icon    = this.toolbar.find(\".fa[name=watch]\");\n                icon.parent().attr(\"title\", settings.lang.toolbar.unwatch);\n                icon.removeClass(watchIcon).addClass(unWatchIcon);\n            }\n            \n            this.codeMirror.css(\"border-right\", \"none\").width(this.editor.width());\n            \n            this.resize();\n            \n            if (!settings.onunwatch)\n            {\n                settings.onunwatch = callback || function() {};\n            }\n            \n            $.proxy(settings.onunwatch, this)();\n            \n            return this;\n        },\n        \n        /**\n         * 显示编辑器\n         * Show editor\n         * \n         * @param   {Function} [callback=function()] 回调函数\n         * @returns {editormd}                       返回editormd的实例对象\n         */\n        \n        show : function(callback) {\n            callback  = callback || function() {};\n            \n            var _this = this;\n            this.editor.show(0, function() {\n                $.proxy(callback, _this)();\n            });\n            \n            return this;\n        },\n        \n        /**\n         * 隐藏编辑器\n         * Hide editor\n         * \n         * @param   {Function} [callback=function()] 回调函数\n         * @returns {editormd}                       返回editormd的实例对象\n         */\n        \n        hide : function(callback) {\n            callback  = callback || function() {};\n            \n            var _this = this;\n            this.editor.hide(0, function() {\n                $.proxy(callback, _this)();\n            });\n            \n            return this;\n        },\n        \n        /**\n         * 隐藏编辑器部分，只预览HTML\n         * Enter preview html state\n         * \n         * @returns {editormd}         返回editormd的实例对象\n         */\n        \n        previewing : function() {\n            \n            var _this            = this;\n            var editor           = this.editor;\n            var preview          = this.preview;\n            var toolbar          = this.toolbar;\n            var settings         = this.settings;\n            var codeMirror       = this.codeMirror;\n            var previewContainer = this.previewContainer;\n            \n            if ($.inArray(settings.mode, [\"gfm\", \"markdown\"]) < 0) {\n                return this;\n            }\n            \n            if (settings.toolbar && toolbar) {\n                toolbar.toggle();\n                toolbar.find(\".fa[name=preview]\").toggleClass(\"active\");\n            }\n            \n            codeMirror.toggle();\n            \n            var escHandle = function(event) {\n                if (event.shiftKey && event.keyCode === 27) {\n                    _this.previewed();\n                }\n            };\n\n            if (codeMirror.css(\"display\") === \"none\") // 为了兼容Zepto，而不使用codeMirror.is(\":hidden\")\n            {\n                this.state.preview = true;\n\n                if (this.state.fullscreen) {\n                    preview.css(\"background\", \"#fff\");\n                }\n                \n                editor.find(\".\" + this.classPrefix + \"preview-close-btn\").show().bind(editormd.mouseOrTouch(\"click\", \"touchend\"), function(){\n                    _this.previewed();\n                });\n            \n                if (!settings.watch)\n                {\n                    this.save();\n                } \n                else \n                {\n                    previewContainer.css(\"padding\", \"\");\n                }\n                \n                previewContainer.addClass(this.classPrefix + \"preview-active\");\n\n                preview.show().css({\n                    position  : \"\",\n                    top       : 0,\n                    width     : editor.width(),\n                    height    : (settings.autoHeight && !this.state.fullscreen) ? \"auto\" : editor.height()\n                });\n                \n                if (this.state.loaded)\n                {\n                    $.proxy(settings.onpreviewing, this)();\n                }\n\n                $(window).bind(\"keyup\", escHandle);\n            } \n            else \n            {\n                $(window).unbind(\"keyup\", escHandle);\n                this.previewed();\n            }\n        },\n        \n        /**\n         * 显示编辑器部分，退出只预览HTML\n         * Exit preview html state\n         * \n         * @returns {editormd}         返回editormd的实例对象\n         */\n        \n        previewed : function() {\n            \n            var editor           = this.editor;\n            var preview          = this.preview;\n            var toolbar          = this.toolbar;\n            var settings         = this.settings;\n            var previewContainer = this.previewContainer;\n            var previewCloseBtn  = editor.find(\".\" + this.classPrefix + \"preview-close-btn\");\n\n            this.state.preview   = false;\n            \n            this.codeMirror.show();\n            \n            if (settings.toolbar) {\n                toolbar.show();\n            }\n            \n            preview[(settings.watch) ? \"show\" : \"hide\"]();\n            \n            previewCloseBtn.hide().unbind(editormd.mouseOrTouch(\"click\", \"touchend\"));\n                \n            previewContainer.removeClass(this.classPrefix + \"preview-active\");\n                \n            if (settings.watch)\n            {\n                previewContainer.css(\"padding\", \"20px\");\n            }\n            \n            preview.css({ \n                background : null,\n                position   : \"absolute\",\n                width      : editor.width() / 2,\n                height     : (settings.autoHeight && !this.state.fullscreen) ? \"auto\" : editor.height() - toolbar.height(),\n                top        : (settings.toolbar)    ? toolbar.height() : 0\n            });\n\n            if (this.state.loaded)\n            {\n                $.proxy(settings.onpreviewed, this)();\n            }\n            \n            return this;\n        },\n        \n        /**\n         * 编辑器全屏显示\n         * Fullscreen show\n         * \n         * @returns {editormd}         返回editormd的实例对象\n         */\n        \n        fullscreen : function() {\n            \n            var _this            = this;\n            var state            = this.state;\n            var editor           = this.editor;\n            var preview          = this.preview;\n            var toolbar          = this.toolbar;\n            var settings         = this.settings;\n            var fullscreenClass  = this.classPrefix + \"fullscreen\";\n            \n            if (toolbar) {\n                toolbar.find(\".fa[name=fullscreen]\").parent().toggleClass(\"active\"); \n            }\n            \n            var escHandle = function(event) {\n                if (!event.shiftKey && event.keyCode === 27) \n                {\n                    if (state.fullscreen)\n                    {\n                        _this.fullscreenExit();\n                    }\n                }\n            };\n\n            if (!editor.hasClass(fullscreenClass)) \n            {\n                state.fullscreen = true;\n\n                $(\"html,body\").css(\"overflow\", \"hidden\");\n                \n                editor.css({\n                    width    : $(window).width(),\n                    height   : $(window).height()\n                }).addClass(fullscreenClass);\n\n                this.resize();\n    \n                $.proxy(settings.onfullscreen, this)();\n\n                $(window).bind(\"keyup\", escHandle);\n            }\n            else\n            {           \n                $(window).unbind(\"keyup\", escHandle); \n                this.fullscreenExit();\n            }\n\n            return this;\n        },\n        \n        /**\n         * 编辑器退出全屏显示\n         * Exit fullscreen state\n         * \n         * @returns {editormd}         返回editormd的实例对象\n         */\n        \n        fullscreenExit : function() {\n            \n            var editor            = this.editor;\n            var settings          = this.settings;\n            var toolbar           = this.toolbar;\n            var fullscreenClass   = this.classPrefix + \"fullscreen\";  \n            \n            this.state.fullscreen = false;\n            \n            if (toolbar) {\n                toolbar.find(\".fa[name=fullscreen]\").parent().removeClass(\"active\"); \n            }\n\n            $(\"html,body\").css(\"overflow\", \"\");\n\n            editor.css({\n                width    : editor.data(\"oldWidth\"),\n                height   : editor.data(\"oldHeight\")\n            }).removeClass(fullscreenClass);\n\n            this.resize();\n            \n            $.proxy(settings.onfullscreenExit, this)();\n\n            return this;\n        },\n        \n        /**\n         * 加载并执行插件\n         * Load and execute the plugin\n         * \n         * @param   {String}     name    plugin name / function name\n         * @param   {String}     path    plugin load path\n         * @returns {editormd}           返回editormd的实例对象\n         */\n        \n        executePlugin : function(name, path) {\n            \n            var _this    = this;\n            var cm       = this.cm;\n            var settings = this.settings;\n            \n            path = settings.pluginPath + path;\n            \n            if (typeof define === \"function\") \n            {            \n                if (typeof this[name] === \"undefined\")\n                {\n                    alert(\"Error: \" + name + \" plugin is not found, you are not load this plugin.\");\n                    \n                    return this;\n                }\n                \n                this[name](cm);\n                \n                return this;\n            }\n            \n            if ($.inArray(path, editormd.loadFiles.plugin) < 0)\n            {\n                editormd.loadPlugin(path, function() {\n                    editormd.loadPlugins[name] = _this[name];\n                    _this[name](cm);\n                });\n            }\n            else\n            {\n                $.proxy(editormd.loadPlugins[name], this)(cm);\n            }\n            \n            return this;\n        },\n                \n        /**\n         * 搜索替换\n         * Search & replace\n         * \n         * @param   {String}     command    CodeMirror serach commands, \"find, fintNext, fintPrev, clearSearch, replace, replaceAll\"\n         * @returns {editormd}              return this\n         */\n        \n        search : function(command) {\n            var settings = this.settings;\n            \n            if (!settings.searchReplace)\n            {\n                alert(\"Error: settings.searchReplace == false\");\n                return this;\n            }\n            \n            if (!settings.readOnly)\n            {\n                this.cm.execCommand(command || \"find\");\n            }\n            \n            return this;\n        },\n        \n        searchReplace : function() {            \n            this.search(\"replace\");\n            \n            return this;\n        },\n        \n        searchReplaceAll : function() {          \n            this.search(\"replaceAll\");\n            \n            return this;\n        }\n    };\n    \n    editormd.fn.init.prototype = editormd.fn; \n   \n    /**\n     * 锁屏\n     * lock screen when dialog opening\n     * \n     * @returns {void}\n     */\n\n    editormd.dialogLockScreen = function() {\n        var settings = this.settings || {dialogLockScreen : true};\n        \n        if (settings.dialogLockScreen) \n        {            \n            $(\"html,body\").css(\"overflow\", \"hidden\");\n            this.resize();\n        }\n    };\n   \n    /**\n     * 显示透明背景层\n     * Display mask layer when dialog opening\n     * \n     * @param   {Object}     dialog    dialog jQuery object\n     * @returns {void}\n     */\n    \n    editormd.dialogShowMask = function(dialog) {\n        var editor   = this.editor;\n        var settings = this.settings || {dialogShowMask : true};\n        \n        dialog.css({\n            top  : ($(window).height() - dialog.height()) / 2 + \"px\",\n            left : ($(window).width()  - dialog.width())  / 2 + \"px\"\n        });\n\n        if (settings.dialogShowMask) {\n            editor.children(\".\" + this.classPrefix + \"mask\").css(\"z-index\", parseInt(dialog.css(\"z-index\")) - 1).show();\n        }\n    };\n\n    editormd.toolbarHandlers = {\n        undo : function() {\n            this.cm.undo();\n        },\n        \n        redo : function() {\n            this.cm.redo();\n        },\n        \n        bold : function() {\n            var cm        = this.cm;\n            var cursor    = cm.getCursor();\n            var selection = cm.getSelection();\n\n            cm.replaceSelection(\"**\" + selection + \"**\");\n\n            if(selection === \"\") {\n                cm.setCursor(cursor.line, cursor.ch + 2);\n            }\n        },\n        \n        del : function() {\n            var cm        = this.cm;\n            var cursor    = cm.getCursor();\n            var selection = cm.getSelection();\n\n            cm.replaceSelection(\"~~\" + selection + \"~~\");\n\n            if(selection === \"\") {\n                cm.setCursor(cursor.line, cursor.ch + 2);\n            }\n        },\n\n        italic : function() {\n            var cm        = this.cm;\n            var cursor    = cm.getCursor();\n            var selection = cm.getSelection();\n\n            cm.replaceSelection(\"*\" + selection + \"*\");\n\n            if(selection === \"\") {\n                cm.setCursor(cursor.line, cursor.ch + 1);\n            }\n        },\n\n        quote : function() {\n            var cm        = this.cm;\n            var cursor    = cm.getCursor();\n            var selection = cm.getSelection();\n\n            if (cursor.ch !== 0)\n            {\n                cm.setCursor(cursor.line, 0);\n                cm.replaceSelection(\"> \" + selection);\n                cm.setCursor(cursor.line, cursor.ch + 2);\n            }\n            else\n            {\n                cm.replaceSelection(\"> \" + selection);\n            }\n\n            //cm.replaceSelection(\"> \" + selection);\n            //cm.setCursor(cursor.line, (selection === \"\") ? cursor.ch + 2 : cursor.ch + selection.length + 2);\n        },\n        \n        ucfirst : function() {\n            var cm         = this.cm;\n            var selection  = cm.getSelection();\n            var selections = cm.listSelections();\n\n            cm.replaceSelection(editormd.firstUpperCase(selection));\n            cm.setSelections(selections);\n        },\n        \n        ucwords : function() {\n            var cm         = this.cm;\n            var selection  = cm.getSelection();\n            var selections = cm.listSelections();\n\n            cm.replaceSelection(editormd.wordsFirstUpperCase(selection));\n            cm.setSelections(selections);\n        },\n        \n        uppercase : function() {\n            var cm         = this.cm;\n            var selection  = cm.getSelection();\n            var selections = cm.listSelections();\n\n            cm.replaceSelection(selection.toUpperCase());\n            cm.setSelections(selections);\n        },\n        \n        lowercase : function() {\n            var cm         = this.cm;\n            var cursor     = cm.getCursor();\n            var selection  = cm.getSelection();\n            var selections = cm.listSelections();\n            \n            cm.replaceSelection(selection.toLowerCase());\n            cm.setSelections(selections);\n        },\n\n        h1 : function() {\n            var cm        = this.cm;\n            var cursor    = cm.getCursor();\n            var selection = cm.getSelection();\n\n            if (cursor.ch !== 0)\n            {\n                cm.setCursor(cursor.line, 0);\n                cm.replaceSelection(\"# \" + selection);\n                cm.setCursor(cursor.line, cursor.ch + 2);\n            }\n            else\n            {\n                cm.replaceSelection(\"# \" + selection);\n            }\n        },\n\n        h2 : function() {\n            var cm        = this.cm;\n            var cursor    = cm.getCursor();\n            var selection = cm.getSelection();\n\n            if (cursor.ch !== 0)\n            {\n                cm.setCursor(cursor.line, 0);\n                cm.replaceSelection(\"## \" + selection);\n                cm.setCursor(cursor.line, cursor.ch + 3);\n            }\n            else\n            {\n                cm.replaceSelection(\"## \" + selection);\n            }\n        },\n\n        h3 : function() {\n            var cm        = this.cm;\n            var cursor    = cm.getCursor();\n            var selection = cm.getSelection();\n\n            if (cursor.ch !== 0)\n            {\n                cm.setCursor(cursor.line, 0);\n                cm.replaceSelection(\"### \" + selection);\n                cm.setCursor(cursor.line, cursor.ch + 4);\n            }\n            else\n            {\n                cm.replaceSelection(\"### \" + selection);\n            }\n        },\n\n        h4 : function() {\n            var cm        = this.cm;\n            var cursor    = cm.getCursor();\n            var selection = cm.getSelection();\n\n            if (cursor.ch !== 0)\n            {\n                cm.setCursor(cursor.line, 0);\n                cm.replaceSelection(\"#### \" + selection);\n                cm.setCursor(cursor.line, cursor.ch + 5);\n            }\n            else\n            {\n                cm.replaceSelection(\"#### \" + selection);\n            }\n        },\n\n        h5 : function() {\n            var cm        = this.cm;\n            var cursor    = cm.getCursor();\n            var selection = cm.getSelection();\n\n            if (cursor.ch !== 0)\n            {\n                cm.setCursor(cursor.line, 0);\n                cm.replaceSelection(\"##### \" + selection);\n                cm.setCursor(cursor.line, cursor.ch + 6);\n            }\n            else\n            {\n                cm.replaceSelection(\"##### \" + selection);\n            }\n        },\n\n        h6 : function() {\n            var cm        = this.cm;\n            var cursor    = cm.getCursor();\n            var selection = cm.getSelection();\n\n            if (cursor.ch !== 0)\n            {\n                cm.setCursor(cursor.line, 0);\n                cm.replaceSelection(\"###### \" + selection);\n                cm.setCursor(cursor.line, cursor.ch + 7);\n            }\n            else\n            {\n                cm.replaceSelection(\"###### \" + selection);\n            }\n        },\n\n        \"list-ul\" : function() {\n            var cm        = this.cm;\n            var cursor    = cm.getCursor();\n            var selection = cm.getSelection();\n\n            if (selection === \"\") \n            {\n                cm.replaceSelection(\"- \" + selection);\n            } \n            else \n            {\n                var selectionText = selection.split(\"\\n\");\n\n                for (var i = 0, len = selectionText.length; i < len; i++) \n                {\n                    selectionText[i] = (selectionText[i] === \"\") ? \"\" : \"- \" + selectionText[i];\n                }\n\n                cm.replaceSelection(selectionText.join(\"\\n\"));\n            }\n        },\n\n        \"list-ol\" : function() {\n            var cm        = this.cm;\n            var cursor    = cm.getCursor();\n            var selection = cm.getSelection();\n\n            if(selection === \"\") \n            {\n                cm.replaceSelection(\"1. \" + selection);\n            }\n            else\n            {\n                var selectionText = selection.split(\"\\n\");\n\n                for (var i = 0, len = selectionText.length; i < len; i++) \n                {\n                    selectionText[i] = (selectionText[i] === \"\") ? \"\" : (i+1) + \". \" + selectionText[i];\n                }\n\n                cm.replaceSelection(selectionText.join(\"\\n\"));\n            }\n        },\n\n        hr : function() {\n            var cm        = this.cm;\n            var cursor    = cm.getCursor();\n            var selection = cm.getSelection();\n\n            cm.replaceSelection(((cursor.ch !== 0) ? \"\\n\\n\" : \"\\n\") + \"------------\\n\\n\");\n        },\n\n        tex : function() {\n            if (!this.settings.tex)\n            {\n                alert(\"settings.tex === false\");\n                return this;\n            }\n            \n            var cm        = this.cm;\n            var cursor    = cm.getCursor();\n            var selection = cm.getSelection();\n\n            cm.replaceSelection(\"$$\" + selection + \"$$\");\n\n            if(selection === \"\") {\n                cm.setCursor(cursor.line, cursor.ch + 2);\n            }\n        },\n\n        link : function() {\n            this.executePlugin(\"linkDialog\", \"link-dialog/link-dialog\");\n        },\n\n        \"reference-link\" : function() {\n            this.executePlugin(\"referenceLinkDialog\", \"reference-link-dialog/reference-link-dialog\");\n        },\n\n        pagebreak : function() {\n            if (!this.settings.pageBreak)\n            {\n                alert(\"settings.pageBreak === false\");\n                return this;\n            }\n            \n            var cm        = this.cm;\n            var selection = cm.getSelection();\n\n            cm.replaceSelection(\"\\r\\n[========]\\r\\n\");\n        },\n\n        image : function() {\n            this.executePlugin(\"imageDialog\", \"image-dialog/image-dialog\");\n        },\n        \n        code : function() {\n            var cm        = this.cm;\n            var cursor    = cm.getCursor();\n            var selection = cm.getSelection();\n\n            cm.replaceSelection(\"`\" + selection + \"`\");\n\n            if (selection === \"\") {\n                cm.setCursor(cursor.line, cursor.ch + 1);\n            }\n        },\n\n        \"code-block\" : function() {\n            this.executePlugin(\"codeBlockDialog\", \"code-block-dialog/code-block-dialog\");            \n        },\n\n        \"preformatted-text\" : function() {\n            this.executePlugin(\"preformattedTextDialog\", \"preformatted-text-dialog/preformatted-text-dialog\");\n        },\n        \n        table : function() {\n            this.executePlugin(\"tableDialog\", \"table-dialog/table-dialog\");         \n        },\n        \n        datetime : function() {\n            var cm        = this.cm;\n            var selection = cm.getSelection();\n            var date      = new Date();\n            var langName  = this.settings.lang.name;\n            var datefmt   = editormd.dateFormat() + \" \" + editormd.dateFormat((langName === \"zh-cn\" || langName === \"zh-tw\") ? \"cn-week-day\" : \"week-day\");\n\n            cm.replaceSelection(datefmt);\n        },\n        \n        emoji : function() {\n            this.executePlugin(\"emojiDialog\", \"emoji-dialog/emoji-dialog\");\n        },\n                \n        \"html-entities\" : function() {\n            this.executePlugin(\"htmlEntitiesDialog\", \"html-entities-dialog/html-entities-dialog\");\n        },\n                \n        \"goto-line\" : function() {\n            this.executePlugin(\"gotoLineDialog\", \"goto-line-dialog/goto-line-dialog\");\n        },\n\n        watch : function() {    \n            this[this.settings.watch ? \"unwatch\" : \"watch\"]();\n        },\n\n        preview : function() {\n            this.previewing();\n        },\n\n        fullscreen : function() {\n            this.fullscreen();\n        },\n\n        clear : function() {\n            this.clear();\n        },\n        \n        search : function() {\n            this.search();\n        },\n\n        help : function() {\n            this.executePlugin(\"helpDialog\", \"help-dialog/help-dialog\");\n        },\n\n        info : function() {\n            this.showInfoDialog();\n        }\n    };\n    \n    editormd.keyMaps = {\n        \"Ctrl-1\"       : \"h1\",\n        \"Ctrl-2\"       : \"h2\",\n        \"Ctrl-3\"       : \"h3\",\n        \"Ctrl-4\"       : \"h4\",\n        \"Ctrl-5\"       : \"h5\",\n        \"Ctrl-6\"       : \"h6\",\n        \"Ctrl-B\"       : \"bold\",  // if this is string ==  editormd.toolbarHandlers.xxxx\n        \"Ctrl-D\"       : \"datetime\",\n        \n        \"Ctrl-E\"       : function() { // emoji\n            var cm        = this.cm;\n            var cursor    = cm.getCursor();\n            var selection = cm.getSelection();\n            \n            if (!this.settings.emoji)\n            {\n                alert(\"Error: settings.emoji == false\");\n                return ;\n            }\n\n            cm.replaceSelection(\":\" + selection + \":\");\n\n            if (selection === \"\") {\n                cm.setCursor(cursor.line, cursor.ch + 1);\n            }\n        },\n        \"Ctrl-Alt-G\"   : \"goto-line\",\n        \"Ctrl-H\"       : \"hr\",\n        \"Ctrl-I\"       : \"italic\",\n        \"Ctrl-K\"       : \"code\",\n        \n        \"Ctrl-L\"        : function() {\n            var cm        = this.cm;\n            var cursor    = cm.getCursor();\n            var selection = cm.getSelection();\n            \n            var title = (selection === \"\") ? \"\" : \" \\\"\"+selection+\"\\\"\";\n\n            cm.replaceSelection(\"[\" + selection + \"](\"+title+\")\");\n\n            if (selection === \"\") {\n                cm.setCursor(cursor.line, cursor.ch + 1);\n            }\n        },\n        \"Ctrl-U\"         : \"list-ul\",\n        \n        \"Shift-Ctrl-A\"   : function() {\n            var cm        = this.cm;\n            var cursor    = cm.getCursor();\n            var selection = cm.getSelection();\n            \n            if (!this.settings.atLink)\n            {\n                alert(\"Error: settings.atLink == false\");\n                return ;\n            }\n\n            cm.replaceSelection(\"@\" + selection);\n\n            if (selection === \"\") {\n                cm.setCursor(cursor.line, cursor.ch + 1);\n            }\n        },\n        \n        \"Shift-Ctrl-C\"     : \"code\",\n        \"Shift-Ctrl-Q\"     : \"quote\",\n        \"Shift-Ctrl-S\"     : \"del\",\n        \"Shift-Ctrl-K\"     : \"tex\",  // KaTeX\n        \n        \"Shift-Alt-C\"      : function() {\n            var cm        = this.cm;\n            var cursor    = cm.getCursor();\n            var selection = cm.getSelection();\n            \n            cm.replaceSelection([\"```\", selection, \"```\"].join(\"\\n\"));\n\n            if (selection === \"\") {\n                cm.setCursor(cursor.line, cursor.ch + 3);\n            } \n        },\n        \n        \"Shift-Ctrl-Alt-C\" : \"code-block\",\n        \"Shift-Ctrl-H\"     : \"html-entities\",\n        \"Shift-Alt-H\"      : \"help\",\n        \"Shift-Ctrl-E\"     : \"emoji\",\n        \"Shift-Ctrl-U\"     : \"uppercase\",\n        \"Shift-Alt-U\"      : \"ucwords\",\n        \"Shift-Ctrl-Alt-U\" : \"ucfirst\",\n        \"Shift-Alt-L\"      : \"lowercase\",\n        \n        \"Shift-Ctrl-I\"     : function() {\n            var cm        = this.cm;\n            var cursor    = cm.getCursor();\n            var selection = cm.getSelection();\n            \n            var title = (selection === \"\") ? \"\" : \" \\\"\"+selection+\"\\\"\";\n\n            cm.replaceSelection(\"![\" + selection + \"](\"+title+\")\");\n\n            if (selection === \"\") {\n                cm.setCursor(cursor.line, cursor.ch + 4);\n            }\n        },\n        \n        \"Shift-Ctrl-Alt-I\" : \"image\",\n        \"Shift-Ctrl-L\"     : \"link\",\n        \"Shift-Ctrl-O\"     : \"list-ol\",\n        \"Shift-Ctrl-P\"     : \"preformatted-text\",\n        \"Shift-Ctrl-T\"     : \"table\",\n        \"Shift-Alt-P\"      : \"pagebreak\",\n        \"F9\"               : \"watch\",\n        \"F10\"              : \"preview\",\n        \"F11\"              : \"fullscreen\",\n    };\n    \n    /**\n     * 清除字符串两边的空格\n     * Clear the space of strings both sides.\n     * \n     * @param   {String}    str            string\n     * @returns {String}                   trimed string    \n     */\n    \n    var trim = function(str) {\n        return (!String.prototype.trim) ? str.replace(/^[\\s\\uFEFF\\xA0]+|[\\s\\uFEFF\\xA0]+$/g, \"\") : str.trim();\n    };\n    \n    editormd.trim = trim;\n    \n    /**\n     * 所有单词首字母大写\n     * Words first to uppercase\n     * \n     * @param   {String}    str            string\n     * @returns {String}                   string\n     */\n    \n    var ucwords = function (str) {\n        return str.toLowerCase().replace(/\\b(\\w)|\\s(\\w)/g, function($1) {  \n            return $1.toUpperCase();\n        });\n    };\n    \n    editormd.ucwords = editormd.wordsFirstUpperCase = ucwords;\n    \n    /**\n     * 字符串首字母大写\n     * Only string first char to uppercase\n     * \n     * @param   {String}    str            string\n     * @returns {String}                   string\n     */\n    \n    var firstUpperCase = function(str) {        \n        return str.toLowerCase().replace(/\\b(\\w)/, function($1){\n            return $1.toUpperCase();\n        });\n    };\n    \n    var ucfirst = firstUpperCase;\n    \n    editormd.firstUpperCase = editormd.ucfirst = firstUpperCase;\n    \n    editormd.urls = {\n        atLinkBase : \"https://github.com/\"\n    };\n    \n    editormd.regexs = {\n        atLink        : /@(\\w+)/g,\n        email         : /(\\w+)@(\\w+)\\.(\\w+)\\.?(\\w+)?/g,\n        emailLink     : /(mailto:)?([\\w\\.\\_]+)@(\\w+)\\.(\\w+)\\.?(\\w+)?/g,\n        emoji         : /:([\\w\\+-]+):/g,\n        emojiDatetime : /(\\d{2}:\\d{2}:\\d{2})/g,\n        twemoji       : /:(tw-([\\w]+)-?(\\w+)?):/g,\n        fontAwesome   : /:(fa-([\\w]+)(-(\\w+)){0,}):/g,\n        editormdLogo  : /:(editormd-logo-?(\\w+)?):/g,\n        pageBreak     : /^\\[[=]{8,}\\]$/\n    };\n\n    // Emoji graphics files url path\n    editormd.emoji     = {\n        path  : \"http://www.emoji-cheat-sheet.com/graphics/emojis/\",\n        ext   : \".png\"\n    };\n\n    // Twitter Emoji (Twemoji)  graphics files url path    \n    editormd.twemoji = {\n        path : \"http://twemoji.maxcdn.com/36x36/\",\n        ext  : \".png\"\n    };\n\n    /**\n     * 自定义marked的解析器\n     * Custom Marked renderer rules\n     * \n     * @param   {Array}    markdownToC     传入用于接收TOC的数组\n     * @returns {Renderer} markedRenderer  返回marked的Renderer自定义对象\n     */\n\n    editormd.markedRenderer = function(markdownToC, options) {\n        var defaults = {\n            toc                  : true,           // Table of contents\n            tocm                 : false,\n            tocStartLevel        : 1,              // Said from H1 to create ToC  \n            pageBreak            : true,\n            atLink               : true,           // for @link\n            emailLink            : true,           // for mail address auto link\n            taskList             : false,          // Enable Github Flavored Markdown task lists\n            emoji                : false,          // :emoji: , Support Twemoji, fontAwesome, Editor.md logo emojis.\n            tex                  : false,          // TeX(LaTeX), based on KaTeX\n            flowChart            : false,          // flowChart.js only support IE9+\n            sequenceDiagram      : false,          // sequenceDiagram.js only support IE9+\n        };\n        \n        var settings        = $.extend(defaults, options || {});    \n        var marked          = editormd.$marked;\n        var markedRenderer  = new marked.Renderer();\n        markdownToC         = markdownToC || [];        \n            \n        var regexs          = editormd.regexs;\n        var atLinkReg       = regexs.atLink;\n        var emojiReg        = regexs.emoji;\n        var emailReg        = regexs.email;\n        var emailLinkReg    = regexs.emailLink;\n        var twemojiReg      = regexs.twemoji;\n        var faIconReg       = regexs.fontAwesome;\n        var editormdLogoReg = regexs.editormdLogo;\n        var pageBreakReg    = regexs.pageBreak;\n\n        markedRenderer.emoji = function(text) {\n            \n            text = text.replace(editormd.regexs.emojiDatetime, function($1) {           \n                return $1.replace(/:/g, \"&#58;\");\n            });\n            \n            var matchs = text.match(emojiReg);\n\n            if (!matchs || !settings.emoji) {\n                return text;\n            }\n\n            for (var i = 0, len = matchs.length; i < len; i++)\n            {            \n                if (matchs[i] === \":+1:\") {\n                    matchs[i] = \":\\\\+1:\";\n                }\n\n                text = text.replace(new RegExp(matchs[i]), function($1, $2){\n                    var faMatchs = $1.match(faIconReg);\n                    var name     = $1.replace(/:/g, \"\");\n\n                    if (faMatchs)\n                    {                        \n                        for (var fa = 0, len1 = faMatchs.length; fa < len1; fa++)\n                        {\n                            var faName = faMatchs[fa].replace(/:/g, \"\");\n                            \n                            return \"<i class=\\\"fa \" + faName + \" fa-emoji\\\" title=\\\"\" + faName.replace(\"fa-\", \"\") + \"\\\"></i>\";\n                        }\n                    }\n                    else\n                    {\n                        var emdlogoMathcs = $1.match(editormdLogoReg);\n                        var twemojiMatchs = $1.match(twemojiReg);\n\n                        if (emdlogoMathcs)                                        \n                        {                            \n                            for (var x = 0, len2 = emdlogoMathcs.length; x < len2; x++)\n                            {\n                                var logoName = emdlogoMathcs[x].replace(/:/g, \"\");\n                                return \"<i class=\\\"\" + logoName + \"\\\" title=\\\"Editor.md logo (\" + logoName + \")\\\"></i>\";\n                            }\n                        }\n                        else if (twemojiMatchs) \n                        {\n                            for (var t = 0, len3 = twemojiMatchs.length; t < len3; t++)\n                            {\n                                var twe = twemojiMatchs[t].replace(/:/g, \"\").replace(\"tw-\", \"\");\n                                return \"<img src=\\\"\" + editormd.twemoji.path + twe + editormd.twemoji.ext + \"\\\" title=\\\"twemoji-\" + twe + \"\\\" alt=\\\"twemoji-\" + twe + \"\\\" class=\\\"emoji twemoji\\\" />\";\n                            }\n                        }\n                        else\n                        {\n                            var src = (name === \"+1\") ? \"plus1\" : name;\n                            src     = (src === \"black_large_square\") ? \"black_square\" : src;\n                            src     = (src === \"moon\") ? \"waxing_gibbous_moon\" : src;\n\n                            return \"<img src=\\\"\" + editormd.emoji.path + src + editormd.emoji.ext + \"\\\" class=\\\"emoji\\\" title=\\\"&#58;\" + name + \"&#58;\\\" alt=\\\"&#58;\" + name + \"&#58;\\\" />\";\n                        }\n                    }\n                });\n            }\n\n            return text;\n        };\n\n        markedRenderer.atLink = function(text) {\n\n            if (atLinkReg.test(text))\n            { \n                if (settings.atLink) \n                {\n                    text = text.replace(emailReg, function($1, $2, $3, $4) {\n                        return $1.replace(/@/g, \"_#_&#64;_#_\");\n                    });\n\n                    text = text.replace(atLinkReg, function($1, $2) {\n                        return \"<a href=\\\"\" + editormd.urls.atLinkBase + \"\" + $2 + \"\\\" title=\\\"&#64;\" + $2 + \"\\\" class=\\\"at-link\\\">\" + $1 + \"</a>\";\n                    }).replace(/_#_&#64;_#_/g, \"@\");\n                }\n                \n                if (settings.emailLink)\n                {\n                    text = text.replace(emailLinkReg, function($1, $2, $3, $4, $5) {\n                        return (!$2 && $.inArray($5, \"jpg|jpeg|png|gif|webp|ico|icon|pdf\".split(\"|\")) < 0) ? \"<a href=\\\"mailto:\" + $1 + \"\\\">\"+$1+\"</a>\" : $1;\n                    });\n                }\n\n                return text;\n            }\n\n            return text;\n        };\n                \n        markedRenderer.link = function (href, title, text) {\n\n            if (this.options.sanitize) {\n                try {\n                    var prot = decodeURIComponent(unescape(href)).replace(/[^\\w:]/g,\"\").toLowerCase();\n                } catch(e) {\n                    return \"\";\n                }\n\n                if (prot.indexOf(\"javascript:\") === 0) {\n                    return \"\";\n                }\n            }\n\n            var out = \"<a href=\\\"\" + href + \"\\\"\";\n            \n            if (atLinkReg.test(title) || atLinkReg.test(text))\n            {\n                if (title)\n                {\n                    out += \" title=\\\"\" + title.replace(/@/g, \"&#64;\");\n                }\n                \n                return out + \"\\\">\" + text.replace(/@/g, \"&#64;\") + \"</a>\";\n            }\n\n            if (title) {\n                out += \" title=\\\"\" + title + \"\\\"\";\n            }\n\n            out += \">\" + text + \"</a>\";\n\n            return out;\n        };\n        \n        markedRenderer.heading = function(text, level, raw) {\n                    \n            var linkText       = text;\n            var hasLinkReg     = /\\s*\\<a\\s*href\\=\\\"(.*)\\\"\\s*([^\\>]*)\\>(.*)\\<\\/a\\>\\s*/;\n            var getLinkTextReg = /\\s*\\<a\\s*([^\\>]+)\\>([^\\>]*)\\<\\/a\\>\\s*/g;\n\n            if (hasLinkReg.test(text)) \n            {\n                var tempText = [];\n                text         = text.split(/\\<a\\s*([^\\>]+)\\>([^\\>]*)\\<\\/a\\>/);\n\n                for (var i = 0, len = text.length; i < len; i++)\n                {\n                    tempText.push(text[i].replace(/\\s*href\\=\\\"(.*)\\\"\\s*/g, \"\"));\n                }\n\n                text = tempText.join(\" \");\n            }\n            \n            text = trim(text);\n            \n            var escapedText    = text.toLowerCase().replace(/[^\\w]+/g, \"-\");\n            var toc = {\n                text  : text,\n                level : level,\n                slug  : escapedText\n            };\n            \n            var isChinese = /^[\\u4e00-\\u9fa5]+$/.test(text);\n            var id        = (isChinese) ? escape(text).replace(/\\%/g, \"\") : text.toLowerCase().replace(/[^\\w]+/g, \"-\");\n\n            markdownToC.push(toc);\n            \n            var headingHTML = \"<h\" + level + \" id=\\\"h\"+ level + \"-\" + this.options.headerPrefix + id +\"\\\">\";\n            \n            headingHTML    += \"<a name=\\\"\" + text + \"\\\" class=\\\"reference-link\\\"></a>\";\n            headingHTML    += \"<span class=\\\"header-link octicon octicon-link\\\"></span>\";\n            headingHTML    += (hasLinkReg) ? this.atLink(this.emoji(linkText)) : this.atLink(this.emoji(text));\n            headingHTML    += \"</h\" + level + \">\";\n\n            return headingHTML;\n        };\n        \n        markedRenderer.pageBreak = function(text) {\n            if (pageBreakReg.test(text) && settings.pageBreak)\n            {\n                text = \"<hr style=\\\"page-break-after:always;\\\" class=\\\"page-break editormd-page-break\\\" />\";\n            }\n            \n            return text;\n        };\n\n        markedRenderer.paragraph = function(text) {\n            var isTeXInline     = /\\$\\$(.*)\\$\\$/g.test(text);\n            var isTeXLine       = /^\\$\\$(.*)\\$\\$$/.test(text);\n            var isTeXAddClass   = (isTeXLine)     ? \" class=\\\"\" + editormd.classNames.tex + \"\\\"\" : \"\";\n            var isToC           = (settings.tocm) ? /^(\\[TOC\\]|\\[TOCM\\])$/.test(text) : /^\\[TOC\\]$/.test(text);\n            var isToCMenu       = /^\\[TOCM\\]$/.test(text);\n            \n            if (!isTeXLine && isTeXInline) \n            {\n                text = text.replace(/(\\$\\$([^\\$]*)\\$\\$)+/g, function($1, $2) {\n                    return \"<span class=\\\"\" + editormd.classNames.tex + \"\\\">\" + $2.replace(/\\$/g, \"\") + \"</span>\";\n                });\n            } \n            else \n            {\n                text = (isTeXLine) ? text.replace(/\\$/g, \"\") : text;\n            }\n            \n            var tocHTML = \"<div class=\\\"markdown-toc editormd-markdown-toc\\\">\" + text + \"</div>\";\n            \n            return (isToC) ? ( (isToCMenu) ? \"<div class=\\\"editormd-toc-menu\\\">\" + tocHTML + \"</div><br/>\" : tocHTML )\n                           : ( (pageBreakReg.test(text)) ? this.pageBreak(text) : \"<p\" + isTeXAddClass + \">\" + this.atLink(this.emoji(text)) + \"</p>\\n\" );\n        };\n\n        markedRenderer.code = function (code, lang, escaped) { \n\n            if (lang === \"seq\" || lang === \"sequence\")\n            {\n                return \"<div class=\\\"sequence-diagram\\\">\" + code + \"</div>\";\n            } else  if (lang === \"gantt\"){\n                return \"<div class=\\\"mermain-gantt\\\"\"> + code + \"</div>\"\n            }\n            else if ( lang === \"flow\")\n            {\n                return \"<div class=\\\"flowchart\\\">\" + code + \"</div>\";\n            } \n            else if ( lang === \"math\" || lang === \"latex\" || lang === \"katex\")\n            {\n                return \"<p class=\\\"\" + editormd.classNames.tex + \"\\\">\" + code + \"</p>\";\n            } \n            else \n            {\n\n                return marked.Renderer.prototype.code.apply(this, arguments);\n            }\n        };\n\n        markedRenderer.tablecell = function(content, flags) {\n            var type = (flags.header) ? \"th\" : \"td\";\n            var tag  = (flags.align)  ? \"<\" + type +\" style=\\\"text-align:\" + flags.align + \"\\\">\" : \"<\" + type + \">\";\n            \n            return tag + this.atLink(this.emoji(content)) + \"</\" + type + \">\\n\";\n        };\n\n        markedRenderer.listitem = function(text) {\n            if (settings.taskList && /^\\s*\\[[x\\s]\\]\\s*/.test(text)) \n            {\n                text = text.replace(/^\\s*\\[\\s\\]\\s*/, \"<input type=\\\"checkbox\\\" class=\\\"task-list-item-checkbox\\\" /> \")\n                           .replace(/^\\s*\\[x\\]\\s*/,  \"<input type=\\\"checkbox\\\" class=\\\"task-list-item-checkbox\\\" checked disabled /> \");\n\n                return \"<li style=\\\"list-style: none;\\\">\" + this.atLink(this.emoji(text)) + \"</li>\";\n            }\n            else \n            {\n                return \"<li>\" + this.atLink(this.emoji(text)) + \"</li>\";\n            }\n        };\n        \n        return markedRenderer;\n    };\n    \n    /**\n     *\n     * 生成TOC(Table of Contents)\n     * Creating ToC (Table of Contents)\n     * \n     * @param   {Array}    toc             从marked获取的TOC数组列表\n     * @param   {Element}  container       插入TOC的容器元素\n     * @param   {Integer}  startLevel      Hx 起始层级\n     * @returns {Object}   tocContainer    返回ToC列表容器层的jQuery对象元素\n     */\n    \n    editormd.markdownToCRenderer = function(toc, container, tocDropdown, startLevel) {\n        \n        var html        = \"\";    \n        var lastLevel   = 0;\n        var classPrefix = this.classPrefix;\n        \n        startLevel      = startLevel  || 1;\n        \n        for (var i = 0, len = toc.length; i < len; i++) \n        {\n            var text  = toc[i].text;\n            var level = toc[i].level;\n            \n            if (level < startLevel) {\n                continue;\n            }\n            \n            if (level > lastLevel) \n            {\n                html += \"\";\n            }\n            else if (level < lastLevel) \n            {\n                html += (new Array(lastLevel - level + 2)).join(\"</ul></li>\");\n            } \n            else \n            {\n                html += \"</ul></li>\";\n            }\n\n            html += \"<li><a class=\\\"toc-level-\" + level + \"\\\" href=\\\"#\" + text + \"\\\" level=\\\"\" + level + \"\\\">\" + text + \"</a><ul>\";\n            lastLevel = level;\n        }\n        \n        var tocContainer = container.find(\".markdown-toc\");\n        \n        if ((tocContainer.length < 1 && container.attr(\"previewContainer\") === \"false\"))\n        {\n            var tocHTML = \"<div class=\\\"markdown-toc \" + classPrefix + \"markdown-toc\\\"></div>\";\n            \n            tocHTML = (tocDropdown) ? \"<div class=\\\"\" + classPrefix + \"toc-menu\\\">\" + tocHTML + \"</div>\" : tocHTML;\n            \n            container.html(tocHTML);\n            \n            tocContainer = container.find(\".markdown-toc\");\n        }\n        \n        if (tocDropdown)\n        {\n            tocContainer.wrap(\"<div class=\\\"\" + classPrefix + \"toc-menu\\\"></div><br/>\");\n        }\n        \n        tocContainer.html(\"<ul class=\\\"markdown-toc-list\\\"></ul>\").children(\".markdown-toc-list\").html(html.replace(/\\r?\\n?\\<ul\\>\\<\\/ul\\>/g, \"\"));\n        \n        return tocContainer;\n    };\n    \n    /**\n     *\n     * 生成TOC下拉菜单\n     * Creating ToC dropdown menu\n     * \n     * @param   {Object}   container       插入TOC的容器jQuery对象元素\n     * @param   {String}   tocTitle        ToC title\n     * @returns {Object}                   return toc-menu object\n     */\n    \n    editormd.tocDropdownMenu = function(container, tocTitle) {\n        \n        tocTitle      = tocTitle || \"Table of Contents\";\n        \n        var zindex    = 400;\n        var tocMenus  = container.find(\".\" + this.classPrefix + \"toc-menu\");\n\n        tocMenus.each(function() {\n            var $this  = $(this);\n            var toc    = $this.children(\".markdown-toc\");\n            var icon   = \"<i class=\\\"fa fa-angle-down\\\"></i>\";\n            var btn    = \"<a href=\\\"javascript:;\\\" class=\\\"toc-menu-btn\\\">\" + icon + tocTitle + \"</a>\";\n            var menu   = toc.children(\"ul\");            \n            var list   = menu.find(\"li\");\n            \n            toc.append(btn);\n            \n            list.first().before(\"<li><h1>\" + tocTitle + \" \" + icon + \"</h1></li>\");\n            \n            $this.mouseover(function(){\n                menu.show();\n\n                list.each(function(){\n                    var li = $(this);\n                    var ul = li.children(\"ul\");\n\n                    if (ul.html() === \"\")\n                    {\n                        ul.remove();\n                    }\n\n                    if (ul.length > 0 && ul.html() !== \"\")\n                    {\n                        var firstA = li.children(\"a\").first();\n\n                        if (firstA.children(\".fa\").length < 1)\n                        {\n                            firstA.append( $(icon).css({ float:\"right\", paddingTop:\"4px\" }) );\n                        }\n                    }\n\n                    li.mouseover(function(){\n                        ul.css(\"z-index\", zindex).show();\n                        zindex += 1;\n                    }).mouseleave(function(){\n                        ul.hide();\n                    });\n                });\n            }).mouseleave(function(){\n                menu.hide();\n            }); \n        });       \n        \n        return tocMenus;\n    };\n    \n    /**\n     * 简单地过滤指定的HTML标签\n     * Filter custom html tags\n     * \n     * @param   {String}   html          要过滤HTML\n     * @param   {String}   filters       要过滤的标签\n     * @returns {String}   html          返回过滤的HTML\n     */\n    \n    editormd.filterHTMLTags = function(html, filters) {\n        \n        if (typeof html !== \"string\") {\n            html = new String(html);\n        }\n            \n        if (typeof filters !== \"string\") {\n            return html;\n        }\n\n        var expression = filters.split(\"|\");\n        var filterTags = expression[0].split(\",\");\n        var attrs      = expression[1];\n\n        for (var i = 0, len = filterTags.length; i < len; i++)\n        {\n            var tag = filterTags[i];\n\n            html = html.replace(new RegExp(\"\\<\\s*\" + tag + \"\\s*([^\\>]*)\\>([^\\>]*)\\<\\s*\\/\" + tag + \"\\s*\\>\", \"igm\"), \"\");\n        }\n        \n        //return html;\n\n        if (typeof attrs !== \"undefined\")\n        {\n            var htmlTagRegex = /\\<(\\w+)\\s*([^\\>]*)\\>([^\\>]*)\\<\\/(\\w+)\\>/ig;\n\n            if (attrs === \"*\")\n            {\n                html = html.replace(htmlTagRegex, function($1, $2, $3, $4, $5) {\n                    return \"<\" + $2 + \">\" + $4 + \"</\" + $5 + \">\";\n                });         \n            }\n            else if (attrs === \"on*\")\n            {\n                html = html.replace(htmlTagRegex, function($1, $2, $3, $4, $5) {\n                    var el = $(\"<\" + $2 + \">\" + $4 + \"</\" + $5 + \">\");\n                    var _attrs = $($1)[0].attributes;\n                    var $attrs = {};\n                    \n                    $.each(_attrs, function(i, e) {\n                        if (e.nodeName !== '\"') $attrs[e.nodeName] = e.nodeValue;\n                    });\n                    \n                    $.each($attrs, function(i) {                        \n                        if (i.indexOf(\"on\") === 0) {\n                            delete $attrs[i];\n                        }\n                    });\n                    \n                    el.attr($attrs);\n                    \n                    var text = (typeof el[1] !== \"undefined\") ? $(el[1]).text() : \"\";\n\n                    return el[0].outerHTML + text;\n                });\n            }\n            else\n            {\n                html = html.replace(htmlTagRegex, function($1, $2, $3, $4) {\n                    var filterAttrs = attrs.split(\",\");\n                    var el = $($1);\n                    el.html($4);\n\n                    $.each(filterAttrs, function(i) {\n                        el.attr(filterAttrs[i], null);\n                    });\n\n                    return el[0].outerHTML;\n                });\n            }\n        }\n        \n        return html;\n    };\n    \n    /**\n     * 将Markdown文档解析为HTML用于前台显示\n     * Parse Markdown to HTML for Font-end preview.\n     * \n     * @param   {String}   id            用于显示HTML的对象ID\n     * @param   {Object}   [options={}]  配置选项，可选\n     * @returns {Object}   div           返回jQuery对象元素\n     */\n    \n    editormd.markdownToHTML = function(id, options) {\n        var defaults = {\n            gfm                  : true,\n            toc                  : true,\n            tocm                 : false,\n            tocStartLevel        : 1,\n            tocTitle             : \"目录\",\n            tocDropdown          : false,\n            tocContainer         : \"\",\n            markdown             : \"\",\n            markdownSourceCode   : false,\n            htmlDecode           : false,\n            autoLoadKaTeX        : true,\n            pageBreak            : true,\n            atLink               : true,    // for @link\n            emailLink            : true,    // for mail address auto link\n            tex                  : false,\n            taskList             : false,   // Github Flavored Markdown task lists\n            emoji                : false,\n            flowChart            : false,\n            sequenceDiagram      : false,\n            previewCodeHighlight : true\n        };\n        \n        editormd.$marked  = marked;\n\n        var div           = $(\"#\" + id);\n        var settings      = div.settings = $.extend(true, defaults, options || {});\n        var saveTo        = div.find(\"textarea\");\n        \n        if (saveTo.length < 1)\n        {\n            div.append(\"<textarea></textarea>\");\n            saveTo        = div.find(\"textarea\");\n        }        \n        \n        var markdownDoc   = (settings.markdown === \"\") ? saveTo.val() : settings.markdown; \n        var markdownToC   = [];\n\n        var rendererOptions = {  \n            toc                  : settings.toc,\n            tocm                 : settings.tocm,\n            tocStartLevel        : settings.tocStartLevel,\n            taskList             : settings.taskList,\n            emoji                : settings.emoji,\n            tex                  : settings.tex,\n            pageBreak            : settings.pageBreak,\n            atLink               : settings.atLink,           // for @link\n            emailLink            : settings.emailLink,        // for mail address auto link\n            flowChart            : settings.flowChart,\n            sequenceDiagram      : settings.sequenceDiagram,\n            previewCodeHighlight : settings.previewCodeHighlight,\n        };\n\n        var markedOptions = {\n            renderer    : editormd.markedRenderer(markdownToC, rendererOptions),\n            gfm         : settings.gfm,\n            tables      : true,\n            breaks      : true,\n            pedantic    : false,\n            sanitize    : (settings.htmlDecode) ? false : true, // 是否忽略HTML标签，即是否开启HTML标签解析，为了安全性，默认不开启\n            smartLists  : true,\n            smartypants : true\n        };\n        \n\t\tmarkdownDoc = new String(markdownDoc);\n        \n        var markdownParsed = marked(markdownDoc, markedOptions);\n        \n        markdownParsed = editormd.filterHTMLTags(markdownParsed, settings.htmlDecode);\n        \n        if (settings.markdownSourceCode) {\n            saveTo.text(markdownDoc);\n        } else {\n            saveTo.remove();\n        }\n        \n        div.addClass(\"markdown-body \" + this.classPrefix + \"html-preview\").append(markdownParsed);\n        \n        var tocContainer = (settings.tocContainer !== \"\") ? $(settings.tocContainer) : div;\n        \n        if (settings.tocContainer !== \"\")\n        {\n            tocContainer.attr(\"previewContainer\", false);\n        }\n         \n        if (settings.toc) \n        {\n            div.tocContainer = this.markdownToCRenderer(markdownToC, tocContainer, settings.tocDropdown, settings.tocStartLevel);\n            \n            if (settings.tocDropdown || div.find(\".\" + this.classPrefix + \"toc-menu\").length > 0)\n            {\n                this.tocDropdownMenu(div, settings.tocTitle);\n            }\n            \n            if (settings.tocContainer !== \"\")\n            {\n                div.find(\".editormd-toc-menu, .editormd-markdown-toc\").remove();\n            }\n        }\n            \n        if (settings.previewCodeHighlight) \n        {\n            //div.find(\"pre\").addClass(\"prettyprint\");\n            //prettyPrint();\n            div.find(\"pre\").each(function (i, block) {\n                hljs.highlightBlock(block);\n            });\n        }\n        \n        if (!editormd.isIE8) \n        {\n            if (settings.flowChart) {\n                div.find(\".flowchart\").flowChart(); \n            }\n\n            if (settings.sequenceDiagram) {\n                div.find(\".sequence-diagram\").sequenceDiagram({theme: \"simple\"});\n            }\n        }\n\n        if (settings.tex)\n        {\n            var katexHandle = function() {\n                div.find(\".\" + editormd.classNames.tex).each(function(){\n                    var tex  = $(this);                    \n                    katex.render(tex.html().replace(/&lt;/g, \"<\").replace(/&gt;/g, \">\"), tex[0]);                    \n                    tex.find(\".katex\").css(\"font-size\", \"1.6em\");\n                });\n            };\n            \n            if (settings.autoLoadKaTeX && !editormd.$katex && !editormd.kaTeXLoaded)\n            {\n                this.loadKaTeX(function() {\n                    editormd.$katex      = katex;\n                    editormd.kaTeXLoaded = true;\n                    katexHandle();\n                });\n            }\n            else\n            {\n                katexHandle();\n            }\n        }\n        \n        div.getMarkdown = function() {            \n            return saveTo.val();\n        };\n        \n        return div;\n    };\n    \n    // Editor.md themes, change toolbar themes etc.\n    // added @1.5.0\n    editormd.themes        = [\"default\", \"dark\"];\n    \n    // Preview area themes\n    // added @1.5.0\n    editormd.previewThemes = [\"default\", \"dark\"];\n    \n    // CodeMirror / editor area themes\n    // @1.5.0 rename -> editorThemes, old version -> themes\n    editormd.editorThemes = [\n        \"default\", \"3024-day\", \"3024-night\",\n        \"ambiance\", \"ambiance-mobile\",\n        \"base16-dark\", \"base16-light\", \"blackboard\",\n        \"cobalt\",\n        \"eclipse\", \"elegant\", \"erlang-dark\",\n        \"lesser-dark\",\n        \"mbo\", \"mdn-like\", \"midnight\", \"monokai\",\n        \"neat\", \"neo\", \"night\",\n        \"paraiso-dark\", \"paraiso-light\", \"pastel-on-dark\",\n        \"rubyblue\",\n        \"solarized\",\n        \"the-matrix\", \"tomorrow-night-eighties\", \"twilight\",\n        \"vibrant-ink\",\n        \"xq-dark\", \"xq-light\"\n    ];\n\n    editormd.loadPlugins = {};\n    \n    editormd.loadFiles = {\n        js     : [],\n        css    : [],\n        plugin : []\n    };\n    \n    /**\n     * 动态加载Editor.md插件，但不立即执行\n     * Load editor.md plugins\n     * \n     * @param {String}   fileName              插件文件路径\n     * @param {Function} [callback=function()] 加载成功后执行的回调函数\n     * @param {String}   [into=\"head\"]         嵌入页面的位置\n     */\n    \n    editormd.loadPlugin = function(fileName, callback, into) {\n        callback   = callback || function() {};\n        \n        this.loadScript(fileName, function() {\n            editormd.loadFiles.plugin.push(fileName);\n            callback();\n        }, into);\n    };\n    \n    /**\n     * 动态加载CSS文件的方法\n     * Load css file method\n     * \n     * @param {String}   fileName              CSS文件名\n     * @param {Function} [callback=function()] 加载成功后执行的回调函数\n     * @param {String}   [into=\"head\"]         嵌入页面的位置\n     */\n    \n    editormd.loadCSS   = function(fileName, callback, into) {\n        into       = into     || \"head\";        \n        callback   = callback || function() {};\n        \n        var css    = document.createElement(\"link\");\n        css.type   = \"text/css\";\n        css.rel    = \"stylesheet\";\n        css.onload = css.onreadystatechange = function() {\n            editormd.loadFiles.css.push(fileName);\n            callback();\n        };\n\n        css.href   = fileName + \".css\";\n\n        if(into === \"head\") {\n            document.getElementsByTagName(\"head\")[0].appendChild(css);\n        } else {\n            document.body.appendChild(css);\n        }\n    };\n    \n    editormd.isIE    = (navigator.appName == \"Microsoft Internet Explorer\");\n    editormd.isIE8   = (editormd.isIE && navigator.appVersion.match(/8./i) == \"8.\");\n\n    /**\n     * 动态加载JS文件的方法\n     * Load javascript file method\n     * \n     * @param {String}   fileName              JS文件名\n     * @param {Function} [callback=function()] 加载成功后执行的回调函数\n     * @param {String}   [into=\"head\"]         嵌入页面的位置\n     */\n\n    editormd.loadScript = function(fileName, callback, into) {\n        \n        into          = into     || \"head\";\n        callback      = callback || function() {};\n        \n        var script    = null; \n        script        = document.createElement(\"script\");\n        script.id     = fileName.replace(/[\\./]+/g, \"-\");\n        script.type   = \"text/javascript\";        \n        script.src    = fileName + \".js\";\n        \n        if (editormd.isIE8) \n        {            \n            script.onreadystatechange = function() {\n                if(script.readyState) \n                {\n                    if (script.readyState === \"loaded\" || script.readyState === \"complete\") \n                    {\n                        script.onreadystatechange = null; \n                        editormd.loadFiles.js.push(fileName);\n                        callback();\n                    }\n                } \n            };\n        }\n        else\n        {\n            script.onload = function() {\n                editormd.loadFiles.js.push(fileName);\n                callback();\n            };\n        }\n\n        if (into === \"head\") {\n            document.getElementsByTagName(\"head\")[0].appendChild(script);\n        } else {\n            document.body.appendChild(script);\n        }\n    };\n    \n    // 使用国外的CDN，加载速度有时会很慢，或者自定义URL\n    // You can custom KaTeX load url.\n    editormd.katexURL  = {\n        css : \"//cdnjs.cloudflare.com/ajax/libs/KaTeX/0.3.0/katex.min\",\n        js  : \"//cdnjs.cloudflare.com/ajax/libs/KaTeX/0.3.0/katex.min\"\n    };\n    \n    editormd.kaTeXLoaded = false;\n    \n    /**\n     * 加载KaTeX文件\n     * load KaTeX files\n     * \n     * @param {Function} [callback=function()]  加载成功后执行的回调函数\n     */\n    \n    editormd.loadKaTeX = function (callback) {\n        editormd.loadCSS(editormd.katexURL.css, function(){\n            editormd.loadScript(editormd.katexURL.js, callback || function(){});\n        });\n    };\n        \n    /**\n     * 锁屏\n     * lock screen\n     * \n     * @param   {Boolean}   lock   Boolean 布尔值，是否锁屏\n     * @returns {void}\n     */\n    \n    editormd.lockScreen = function(lock) {\n        $(\"html,body\").css(\"overflow\", (lock) ? \"hidden\" : \"\");\n    };\n        \n    /**\n     * 动态创建对话框\n     * Creating custom dialogs\n     * \n     * @param   {Object} options 配置项键值对 Key/Value\n     * @returns {dialog} 返回创建的dialog的jQuery实例对象\n     */\n\n    editormd.createDialog = function(options) {\n        var defaults = {\n            name : \"\",\n            width : 420,\n            height: 240,\n            title : \"\",\n            drag  : true,\n            closed : true,\n            content : \"\",\n            mask : true,\n            maskStyle : {\n                backgroundColor : \"#fff\",\n                opacity : 0.1\n            },\n            lockScreen : true,\n            footer : true,\n            buttons : false\n        };\n\n        options          = $.extend(true, defaults, options);\n        \n        var $this        = this;\n        var editor       = this.editor;\n        var classPrefix  = editormd.classPrefix;\n        var guid         = (new Date()).getTime();\n        var dialogName   = ( (options.name === \"\") ? classPrefix + \"dialog-\" + guid : options.name);\n        var mouseOrTouch = editormd.mouseOrTouch;\n\n        var html         = \"<div class=\\\"\" + classPrefix + \"dialog \" + dialogName + \"\\\">\";\n\n        if (options.title !== \"\")\n        {\n            html += \"<div class=\\\"\" + classPrefix + \"dialog-header\\\"\" + ( (options.drag) ? \" style=\\\"cursor: move;\\\"\" : \"\" ) + \">\";\n            html += \"<strong class=\\\"\" + classPrefix + \"dialog-title\\\">\" + options.title + \"</strong>\";\n            html += \"</div>\";\n        }\n\n        if (options.closed)\n        {\n            html += \"<a href=\\\"javascript:;\\\" class=\\\"fa fa-close \" + classPrefix + \"dialog-close\\\"></a>\";\n        }\n\n        html += \"<div class=\\\"\" + classPrefix + \"dialog-container\\\">\" + options.content;                    \n\n        if (options.footer || typeof options.footer === \"string\") \n        {\n            html += \"<div class=\\\"\" + classPrefix + \"dialog-footer\\\">\" + ( (typeof options.footer === \"boolean\") ? \"\" : options.footer) + \"</div>\";\n        }\n\n        html += \"</div>\";\n\n        html += \"<div class=\\\"\" + classPrefix + \"dialog-mask \" + classPrefix + \"dialog-mask-bg\\\"></div>\";\n        html += \"<div class=\\\"\" + classPrefix + \"dialog-mask \" + classPrefix + \"dialog-mask-con\\\"></div>\";\n        html += \"</div>\";\n\n        editor.append(html);\n\n        var dialog = editor.find(\".\" + dialogName);\n\n        dialog.lockScreen = function(lock) {\n            if (options.lockScreen)\n            {                \n                $(\"html,body\").css(\"overflow\", (lock) ? \"hidden\" : \"\");\n                $this.resize();\n            }\n\n            return dialog;\n        };\n\n        dialog.showMask = function() {\n            if (options.mask)\n            {\n                editor.find(\".\" + classPrefix + \"mask\").css(options.maskStyle).css(\"z-index\", editormd.dialogZindex - 1).show();\n            }\n            return dialog;\n        };\n\n        dialog.hideMask = function() {\n            if (options.mask)\n            {\n                editor.find(\".\" + classPrefix + \"mask\").hide();\n            }\n\n            return dialog;\n        };\n\n        dialog.loading = function(show) {                        \n            var loading = dialog.find(\".\" + classPrefix + \"dialog-mask\");\n            loading[(show) ? \"show\" : \"hide\"]();\n\n            return dialog;\n        };\n\n        dialog.lockScreen(true).showMask();\n\n        dialog.show().css({\n            zIndex : editormd.dialogZindex,\n            border : (editormd.isIE8) ? \"1px solid #ddd\" : \"\",\n            width  : (typeof options.width  === \"number\") ? options.width + \"px\"  : options.width,\n            height : (typeof options.height === \"number\") ? options.height + \"px\" : options.height\n        });\n\n        var dialogPosition = function(){\n            dialog.css({\n                top    : ($(window).height() - dialog.height()) / 2 + \"px\",\n                left   : ($(window).width() - dialog.width()) / 2 + \"px\"\n            });\n        };\n\n        dialogPosition();\n\n        $(window).resize(dialogPosition);\n\n        dialog.children(\".\" + classPrefix + \"dialog-close\").bind(mouseOrTouch(\"click\", \"touchend\"), function() {\n            dialog.hide().lockScreen(false).hideMask();\n        });\n\n        if (typeof options.buttons === \"object\")\n        {\n            var footer = dialog.footer = dialog.find(\".\" + classPrefix + \"dialog-footer\");\n\n            for (var key in options.buttons)\n            {\n                var btn = options.buttons[key];\n                var btnClassName = classPrefix + key + \"-btn\";\n\n                footer.append(\"<button class=\\\"\" + classPrefix + \"btn \" + btnClassName + \"\\\">\" + btn[0] + \"</button>\");\n                btn[1] = $.proxy(btn[1], dialog);\n                footer.children(\".\" + btnClassName).bind(mouseOrTouch(\"click\", \"touchend\"), btn[1]);\n            }\n        }\n\n        if (options.title !== \"\" && options.drag)\n        {                        \n            var posX, posY;\n            var dialogHeader = dialog.children(\".\" + classPrefix + \"dialog-header\");\n\n            if (!options.mask) {\n                dialogHeader.bind(mouseOrTouch(\"click\", \"touchend\"), function(){\n                    editormd.dialogZindex += 2;\n                    dialog.css(\"z-index\", editormd.dialogZindex);\n                });\n            }\n\n            dialogHeader.mousedown(function(e) {\n                e = e || window.event;  //IE\n                posX = e.clientX - parseInt(dialog[0].style.left);\n                posY = e.clientY - parseInt(dialog[0].style.top);\n\n                document.onmousemove = moveAction;                   \n            });\n\n            var userCanSelect = function (obj) {\n                obj.removeClass(classPrefix + \"user-unselect\").off(\"selectstart\");\n            };\n\n            var userUnselect = function (obj) {\n                obj.addClass(classPrefix + \"user-unselect\").on(\"selectstart\", function(event) { // selectstart for IE                        \n                    return false;\n                });\n            };\n\n            var moveAction = function (e) {\n                e = e || window.event;  //IE\n\n                var left, top, nowLeft = parseInt(dialog[0].style.left), nowTop = parseInt(dialog[0].style.top);\n\n                if( nowLeft >= 0 ) {\n                    if( nowLeft + dialog.width() <= $(window).width()) {\n                        left = e.clientX - posX;\n                    } else {\t\n                        left = $(window).width() - dialog.width();\n                        document.onmousemove = null;\n                    }\n                } else {\n                    left = 0;\n                    document.onmousemove = null;\n                }\n\n                if( nowTop >= 0 ) {\n                    top = e.clientY - posY;\n                } else {\n                    top = 0;\n                    document.onmousemove = null;\n                }\n\n\n                document.onselectstart = function() {\n                    return false;\n                };\n\n                userUnselect($(\"body\"));\n                userUnselect(dialog);\n                dialog[0].style.left = left + \"px\";\n                dialog[0].style.top  = top + \"px\";\n            };\n\n            document.onmouseup = function() {                            \n                userCanSelect($(\"body\"));\n                userCanSelect(dialog);\n\n                document.onselectstart = null;         \n                document.onmousemove = null;\n            };\n\n            dialogHeader.touchDraggable = function() {\n                var offset = null;\n                var start  = function(e) {\n                    var orig = e.originalEvent; \n                    var pos  = $(this).parent().position();\n\n                    offset = {\n                        x : orig.changedTouches[0].pageX - pos.left,\n                        y : orig.changedTouches[0].pageY - pos.top\n                    };\n                };\n\n                var move = function(e) {\n                    e.preventDefault();\n                    var orig = e.originalEvent;\n\n                    $(this).parent().css({\n                        top  : orig.changedTouches[0].pageY - offset.y,\n                        left : orig.changedTouches[0].pageX - offset.x\n                    });\n                };\n\n                this.bind(\"touchstart\", start).bind(\"touchmove\", move);\n            };\n\n            dialogHeader.touchDraggable();\n        }\n\n        editormd.dialogZindex += 2;\n\n        return dialog;\n    };\n    \n    /**\n     * 鼠标和触摸事件的判断/选择方法\n     * MouseEvent or TouchEvent type switch\n     * \n     * @param   {String} [mouseEventType=\"click\"]    供选择的鼠标事件\n     * @param   {String} [touchEventType=\"touchend\"] 供选择的触摸事件\n     * @returns {String} EventType                   返回事件类型名称\n     */\n    \n    editormd.mouseOrTouch = function(mouseEventType, touchEventType) {\n        mouseEventType = mouseEventType || \"click\";\n        touchEventType = touchEventType || \"touchend\";\n        \n        var eventType  = mouseEventType;\n\n        try {\n            document.createEvent(\"TouchEvent\");\n            eventType = touchEventType;\n        } catch(e) {}\n\n        return eventType;\n    };\n    \n    /**\n     * 日期时间的格式化方法\n     * Datetime format method\n     * \n     * @param   {String}   [format=\"\"]  日期时间的格式，类似PHP的格式\n     * @returns {String}   datefmt      返回格式化后的日期时间字符串\n     */\n    \n    editormd.dateFormat = function(format) {                \n        format      = format || \"\";\n\n        var addZero = function(d) {\n            return (d < 10) ? \"0\" + d : d;\n        };\n\n        var date    = new Date(); \n        var year    = date.getFullYear();\n        var year2   = year.toString().slice(2, 4);\n        var month   = addZero(date.getMonth() + 1);\n        var day     = addZero(date.getDate());\n        var weekDay = date.getDay();\n        var hour    = addZero(date.getHours());\n        var min     = addZero(date.getMinutes());\n        var second  = addZero(date.getSeconds());\n        var ms      = addZero(date.getMilliseconds()); \n        var datefmt = \"\";\n\n        var ymd     = year2 + \"-\" + month + \"-\" + day;\n        var fymd    = year  + \"-\" + month + \"-\" + day;\n        var hms     = hour  + \":\" + min   + \":\" + second;\n\n        switch (format) \n        {\n            case \"UNIX Time\" :\n                    datefmt = date.getTime();\n                break;\n\n            case \"UTC\" :\n                    datefmt = date.toUTCString();\n                break;\t\n\n            case \"yy\" :\n                    datefmt = year2;\n                break;\t\n\n            case \"year\" :\n            case \"yyyy\" :\n                    datefmt = year;\n                break;\n\n            case \"month\" :\n            case \"mm\" :\n                    datefmt = month;\n                break;                        \n\n            case \"cn-week-day\" :\n            case \"cn-wd\" :\n                    var cnWeekDays = [\"日\", \"一\", \"二\", \"三\", \"四\", \"五\", \"六\"];\n                    datefmt = \"星期\" + cnWeekDays[weekDay];\n                break;\n\n            case \"week-day\" :\n            case \"wd\" :\n                    var weekDays = [\"Sunday\", \"Monday\", \"Tuesday\", \"Wednesday\", \"Thursday\", \"Friday\", \"Saturday\"];\n                    datefmt = weekDays[weekDay];\n                break;\n\n            case \"day\" :\n            case \"dd\" :\n                    datefmt = day;\n                break;\n\n            case \"hour\" :\n            case \"hh\" :\n                    datefmt = hour;\n                break;\n\n            case \"min\" :\n            case \"ii\" :\n                    datefmt = min;\n                break;\n\n            case \"second\" :\n            case \"ss\" :\n                    datefmt = second;\n                break;\n\n            case \"ms\" :\n                    datefmt = ms;\n                break;\n\n            case \"yy-mm-dd\" :\n                    datefmt = ymd;\n                break;\n\n            case \"yyyy-mm-dd\" :\n                    datefmt = fymd;\n                break;\n\n            case \"yyyy-mm-dd h:i:s ms\" :\n            case \"full + ms\" : \n                    datefmt = fymd + \" \" + hms + \" \" + ms;\n                break;\n\n            case \"full\" :\n            case \"yyyy-mm-dd h:i:s\" :\n                default:\n                    datefmt = fymd + \" \" + hms;\n                break;\n        }\n\n        return datefmt;\n    };\n\n    return editormd;\n\n}));\n"
  },
  {
    "path": "static/editor.md/editormd.js",
    "content": "/*\n * Editor.md\n *\n * @file        editormd.js\n * @version     v1.5.0\n * @description Open source online markdown editor.\n * @license     MIT License\n * @author      Pandao\n * {@link       https://github.com/pandao/editor.md}\n * @updateTime  2015-06-09\n */\n\n;(function(factory) {\n    \"use strict\";\n\n\t// CommonJS/Node.js\n\tif (typeof require === \"function\" && typeof exports === \"object\" && typeof module === \"object\")\n    {\n        module.exports = factory;\n    }\n\telse if (typeof define === \"function\")  // AMD/CMD/Sea.js\n\t{\n        if (define.amd) // for Require.js\n        {\n            /* Require.js define replace */\n        }\n        else\n        {\n\t\t    define([\"jquery\"], factory);  // for Sea.js\n        }\n\t}\n\telse\n\t{\n        window.editormd = factory();\n\t}\n\n}(function() {\n\n    /* Require.js assignment replace */\n\n    \"use strict\";\n\n    var $ = (typeof (jQuery) !== \"undefined\") ? jQuery : Zepto;\n\n\tif (typeof ($) === \"undefined\") {\n\t\treturn ;\n\t}\n\n    /**\n     * editormd\n     *\n     * @param   {String} id           编辑器的ID\n     * @param   {Object} options      配置选项 Key/Value\n     * @returns {Object} editormd     返回editormd对象\n     */\n\n    var editormd         = function (id, options) {\n        return new editormd.fn.init(id, options);\n    };\n\n    editormd.title        = editormd.$name = \"Editor.md\";\n    editormd.version      = \"1.5.0\";\n    editormd.homePage     = \"https://pandao.github.io/editor.md/\";\n    editormd.classPrefix  = \"editormd-\";\n\n    editormd.toolbarModes = {\n        full : [\n            \"undo\", \"redo\", \"|\",\n            \"bold\", \"del\", \"italic\", \"quote\", \"ucwords\", \"uppercase\", \"lowercase\", \"|\",\n            \"h1\", \"h2\", \"h3\", \"h4\", \"h5\", \"h6\", \"|\",\n            \"list-ul\", \"list-ol\", \"hr\", \"|\",\n            \"link\", \"reference-link\", \"image\", \"code\", \"preformatted-text\", \"code-block\", \"table\", \"datetime\", \"emoji\", \"html-entities\", \"pagebreak\", \"|\",\n            \"goto-line\", \"watch\", \"preview\", \"fullscreen\", \"clear\", \"search\", \"|\",\n            \"help\", \"changetheme\", \"info\"\n        ],\n        simple : [\n            \"undo\", \"redo\", \"|\",\n            \"bold\", \"del\", \"italic\", \"quote\", \"uppercase\", \"lowercase\", \"|\",\n            \"h1\", \"h2\", \"h3\", \"h4\", \"h5\", \"h6\", \"|\",\n            \"list-ul\", \"list-ol\", \"hr\", \"|\",\n            \"watch\", \"preview\", \"fullscreen\", \"|\",\n            \"help\", \"changetheme\", \"info\"\n        ],\n        mini : [\n            \"undo\", \"redo\", \"|\",\n            \"watch\", \"preview\", \"|\",\n            \"help\", \"changetheme\", \"info\"\n        ]\n    };\n\n    editormd.defaults     = {\n        debug                : false,\n        mode                 : \"gfm\",          //gfm or markdown\n        name                 : \"\",             // Form element name\n        value                : \"\",             // value for CodeMirror, if mode not gfm/markdown\n        theme                : \"\",             // Editor.md self themes, before v1.5.0 is CodeMirror theme, default empty\n        editorTheme          : \"pastel-on-dark\", //\"default\",      // Editor area, this is CodeMirror theme at v1.5.0\n        previewTheme         : \"dark\", //\"\",             // Preview area theme, default empty\n        markdown             : \"\",             // Markdown source code\n        appendMarkdown       : \"\",             // if in init textarea value not empty, append markdown to textarea\n        width                : \"100%\",\n        height               : \"100%\",\n        path                 : \"./lib/\",       // Dependents module file directory\n        pluginPath           : \"\",             // If this empty, default use settings.path + \"../plugins/\"\n        delay                : 500,            // Delay parse markdown to html, Uint : ms\n        autoLoadModules      : true,           // Automatic load dependent module files\n        watch                : true,\n        placeholder          : \"Enjoy Markdown! coding now...\",\n        gotoLine             : true,\n        codeFold             : false,\n        autoHeight           : false,\n\t\tautoFocus            : true,\n        autoCloseTags        : true,\n        searchReplace        : true,\n        syncScrolling        : true,           // true | false | \"single\", default true\n        readOnly             : false,\n        tabSize              : 4,\n\t\tindentUnit           : 4,\n        lineNumbers          : true,\n\t\tlineWrapping         : true,\n\t\tautoCloseBrackets    : true,\n\t\tshowTrailingSpace    : true,\n\t\tmatchBrackets        : true,\n\t\tindentWithTabs       : true,\n\t\tstyleSelectedText    : true,\n        matchWordHighlight   : true,           // options: true, false, \"onselected\"\n        styleActiveLine      : true,           // Highlight the current line\n        dialogLockScreen     : true,\n        dialogShowMask       : true,\n        dialogDraggable      : true,\n        dialogMaskBgColor    : \"#fff\",\n        dialogMaskOpacity    : 0.1,\n        fontSize             : \"13px\",\n        saveHTMLToTextarea   : false,\n        disabledKeyMaps      : [],\n\n        onload               : function() {},\n        onresize             : function() {},\n        onchange             : function() {},\n        onwatch              : null,\n        onunwatch            : null,\n        onpreviewing         : function() {},\n        onpreviewed          : function() {},\n        onfullscreen         : function() {},\n        onfullscreenExit     : function() {},\n        onscroll             : function() {},\n        onpreviewscroll      : function() {},\n\n        imageUpload          : false,\n        imageFormats         : [\"jpg\", \"jpeg\", \"gif\", \"png\", \"bmp\", \"webp\"],\n        imageUploadURL       : \"\",\n        crossDomainUpload    : false,\n        uploadCallbackURL    : \"\",\n\n        toc                  : true,           // Table of contents\n        tocm                 : false,           // Using [TOCM], auto create ToC dropdown menu\n        tocTitle             : \"\",             // for ToC dropdown menu btn\n        tocDropdown          : false,\n        tocContainer         : \"\",\n        tocStartLevel        : 1,              // Said from H1 to create ToC\n        htmlDecode           : false,          // Open the HTML tag identification\n        pageBreak            : true,           // Enable parse page break [========]\n        atLink               : true,           // for @link\n        emailLink            : true,           // for email address auto link\n        taskList             : false,          // Enable Github Flavored Markdown task lists\n        emoji                : false,          // :emoji: , Support Github emoji, Twitter Emoji (Twemoji);\n                                               // Support FontAwesome icon emoji :fa-xxx: > Using fontAwesome icon web fonts;\n                                               // Support Editor.md logo icon emoji :editormd-logo: :editormd-logo-1x: > 1~8x;\n        tex                  : false,          // TeX(LaTeX), based on KaTeX\n        flowChart            : false,          // flowChart.js only support IE9+\n        sequenceDiagram      : false,          // sequenceDiagram.js only support IE9+\n        mermaid              : true,\n        mindMap              : true,           // 脑图\n        previewCodeHighlight : true,\n\n        toolbar              : true,           // show/hide toolbar\n        toolbarAutoFixed     : true,           // on window scroll auto fixed position\n        toolbarIcons         : \"full\",\n        toolbarTitles        : {},\n        toolbarHandlers      : {\n            ucwords : function() {\n                return editormd.toolbarHandlers.ucwords;\n            },\n            lowercase : function() {\n                return editormd.toolbarHandlers.lowercase;\n            }\n        },\n        toolbarCustomIcons   : {               // using html tag create toolbar icon, unused default <a> tag.\n            lowercase        : \"<a href=\\\"javascript:;\\\" title=\\\"Lowercase\\\" unselectable=\\\"on\\\"><i class=\\\"fa\\\" name=\\\"lowercase\\\" style=\\\"font-size:24px;margin-top: -10px;\\\">a</i></a>\",\n            \"ucwords\"        : \"<a href=\\\"javascript:;\\\" title=\\\"ucwords\\\" unselectable=\\\"on\\\"><i class=\\\"fa\\\" name=\\\"ucwords\\\" style=\\\"font-size:20px;margin-top: -3px;\\\">Aa</i></a>\"\n        },\n        toolbarIconsClass    : {\n            undo             : \"fa-undo\",\n            redo             : \"fa-repeat\",\n            bold             : \"fa-bold\",\n            del              : \"fa-strikethrough\",\n            italic           : \"fa-italic\",\n            quote            : \"fa-quote-left\",\n            uppercase        : \"fa-font\",\n            h1               : editormd.classPrefix + \"bold\",\n            h2               : editormd.classPrefix + \"bold\",\n            h3               : editormd.classPrefix + \"bold\",\n            h4               : editormd.classPrefix + \"bold\",\n            h5               : editormd.classPrefix + \"bold\",\n            h6               : editormd.classPrefix + \"bold\",\n            \"list-ul\"        : \"fa-list-ul\",\n            \"list-ol\"        : \"fa-list-ol\",\n            hr               : \"fa-minus\",\n            link             : \"fa-link\",\n            \"reference-link\" : \"fa-anchor\",\n            image            : \"fa-picture-o\",\n            code             : \"fa-code\",\n            \"preformatted-text\" : \"fa-file-code-o\",\n            \"code-block\"     : \"fa-file-code-o\",\n            table            : \"fa-table\",\n            datetime         : \"fa-clock-o\",\n            emoji            : \"fa-smile-o\",\n            \"html-entities\"  : \"fa-copyright\",\n            pagebreak        : \"fa-newspaper-o\",\n            \"goto-line\"      : \"fa-terminal\", // fa-crosshairs\n            watch            : \"fa-eye-slash\",\n            unwatch          : \"fa-eye\",\n            preview          : \"fa-desktop\",\n            search           : \"fa-search\",\n            fullscreen       : \"fa-arrows-alt\",\n            clear            : \"fa-eraser\",\n            help             : \"fa-question-circle\",\n            changetheme      : \"fa-info-circle\",\n            info             : \"fa-info-circle\"\n        },\n        toolbarIconTexts     : {},\n\n        lang : {\n            name        : \"zh-cn\",\n            description : \"开源在线Markdown编辑器<br/>Open source online Markdown editor.\",\n            tocTitle    : \"目录\",\n            toolbar     : {\n                undo             : \"撤销（Ctrl+Z）\",\n                redo             : \"重做（Ctrl+Y）\",\n                bold             : \"粗体\",\n                del              : \"删除线\",\n                italic           : \"斜体\",\n                quote            : \"引用\",\n                ucwords          : \"将每个单词首字母转成大写\",\n                uppercase        : \"将所选转换成大写\",\n                lowercase        : \"将所选转换成小写\",\n                h1               : \"标题1\",\n                h2               : \"标题2\",\n                h3               : \"标题3\",\n                h4               : \"标题4\",\n                h5               : \"标题5\",\n                h6               : \"标题6\",\n                \"list-ul\"        : \"无序列表\",\n                \"list-ol\"        : \"有序列表\",\n                hr               : \"横线\",\n                link             : \"链接\",\n                \"reference-link\" : \"引用链接\",\n                image            : \"添加图片\",\n                code             : \"行内代码\",\n                \"preformatted-text\" : \"预格式文本 / 代码块（缩进风格）\",\n                \"code-block\"     : \"代码块（多语言风格）\",\n                table            : \"添加表格\",\n                datetime         : \"日期时间\",\n                emoji            : \"Emoji表情\",\n                \"html-entities\"  : \"HTML实体字符\",\n                pagebreak        : \"插入分页符\",\n                \"goto-line\"      : \"跳转到行\",\n                watch            : \"关闭实时预览\",\n                unwatch          : \"开启实时预览\",\n                preview          : \"全窗口预览HTML（按 Shift + ESC还原）\",\n                fullscreen       : \"全屏（按ESC还原）\",\n                clear            : \"清空\",\n                search           : \"搜索\",\n                help             : \"使用帮助\",\n                changetheme      : \"切换编辑主题\",\n                info             : \"关于\" + editormd.title\n            },\n            buttons : {\n                enter  : \"确定\",\n                cancel : \"取消\",\n                close  : \"关闭\"\n            },\n            dialog : {\n                link : {\n                    title    : \"添加链接\",\n                    url      : \"链接地址\",\n                    urlTitle : \"链接标题\",\n                    urlEmpty : \"错误：请填写链接地址。\"\n                },\n                referenceLink : {\n                    title    : \"添加引用链接\",\n                    name     : \"引用名称\",\n                    url      : \"链接地址\",\n                    urlId    : \"链接ID\",\n                    urlTitle : \"链接标题\",\n                    nameEmpty: \"错误：引用链接的名称不能为空。\",\n                    idEmpty  : \"错误：请填写引用链接的ID。\",\n                    urlEmpty : \"错误：请填写引用链接的URL地址。\"\n                },\n                image : {\n                    title    : \"添加图片\",\n                    url      : \"图片地址\",\n                    link     : \"图片链接\",\n                    alt      : \"图片描述\",\n                    uploadButton     : \"本地上传\",\n                    imageURLEmpty    : \"错误：图片地址不能为空。\",\n                    uploadFileEmpty  : \"错误：上传的图片不能为空。\",\n                    formatNotAllowed : \"错误：只允许上传图片文件，允许上传的图片文件格式有：\"\n                },\n                preformattedText : {\n                    title             : \"添加预格式文本或代码块\",\n                    emptyAlert        : \"错误：请填写预格式文本或代码的内容。\"\n                },\n                codeBlock : {\n                    title             : \"添加代码块\",\n                    selectLabel       : \"代码语言：\",\n                    selectDefaultText : \"请选择代码语言\",\n                    otherLanguage     : \"其他语言\",\n                    unselectedLanguageAlert : \"错误：请选择代码所属的语言类型。\",\n                    codeEmptyAlert    : \"错误：请填写代码内容。\"\n                },\n                htmlEntities : {\n                    title : \"HTML 实体字符\"\n                },\n                help : {\n                    title : \"使用帮助\"\n                },\n                changetheme : {\n                    title : \"切换编辑主题\"\n                },\n            }\n        }\n    };\n\n    editormd.classNames  = {\n        tex : editormd.classPrefix + \"tex\"\n    };\n\n    editormd.dialogZindex = 99999;\n\n    editormd.$katex       = null;\n    editormd.$marked      = null;\n    editormd.$CodeMirror  = null;\n    editormd.$prettyPrint = null;\n\n    var timer, flowchartTimer;\n\n    editormd.prototype    = editormd.fn = {\n        state : {\n            watching   : false,\n            loaded     : false,\n            preview    : false,\n            fullscreen : false\n        },\n\n        /**\n         * 构造函数/实例初始化\n         * Constructor / instance initialization\n         *\n         * @param   {String}   id            编辑器的ID\n         * @param   {Object}   [options={}]  配置选项 Key/Value\n         * @returns {editormd}               返回editormd的实例对象\n         */\n\n        init : function (id, options) {\n\n            options              = options || {};\n\n            if (typeof id === \"object\")\n            {\n                options = id;\n            }\n\n            var _this            = this;\n            var classPrefix      = this.classPrefix  = editormd.classPrefix;\n            var settings         = this.settings     = $.extend(true, editormd.defaults, options);\n\n            id                   = (typeof id === \"object\") ? settings.id : id;\n\n            var editor           = this.editor       = $(\"#\" + id);\n\n            this.id              = id;\n            this.lang            = settings.lang;\n\n            var classNames       = this.classNames   = {\n                textarea : {\n                    html     : classPrefix + \"html-textarea\",\n                    markdown : classPrefix + \"markdown-textarea\"\n                }\n            };\n\n            settings.pluginPath = (settings.pluginPath === \"\") ? settings.path + \"../plugins/\" : settings.pluginPath;\n\n            this.state.watching = (settings.watch) ? true : false;\n\n            if ( !editor.hasClass(\"editormd\") ) {\n                editor.addClass(\"editormd\");\n            }\n\n            editor.css({\n                width  : (typeof settings.width  === \"number\") ? settings.width  + \"px\" : settings.width,\n                height : (typeof settings.height === \"number\") ? settings.height + \"px\" : settings.height\n            });\n\n            if (settings.autoHeight)\n            {\n                editor.css(\"height\", \"auto\");\n            }\n\n            var markdownTextarea = this.markdownTextarea = editor.children(\"textarea\");\n\n            if (markdownTextarea.length < 1)\n            {\n                editor.append(\"<textarea></textarea>\");\n                markdownTextarea = this.markdownTextarea = editor.children(\"textarea\");\n            }\n\n            markdownTextarea.addClass(classNames.textarea.markdown).attr(\"placeholder\", settings.placeholder);\n\n            if (typeof markdownTextarea.attr(\"name\") === \"undefined\" || markdownTextarea.attr(\"name\") === \"\")\n            {\n                markdownTextarea.attr(\"name\", (settings.name !== \"\") ? settings.name : id + \"-markdown-doc\");\n            }\n\n            var appendElements = [\n                (!settings.readOnly) ? \"<a href=\\\"javascript:;\\\" class=\\\"fa fa-close \" + classPrefix + \"preview-close-btn\\\"></a>\" : \"\",\n                ( (settings.saveHTMLToTextarea) ? \"<textarea class=\\\"\" + classNames.textarea.html + \"\\\" name=\\\"\" + id + \"-html-code\\\"></textarea>\" : \"\" ),\n                \"<div class=\\\"\" + classPrefix + \"preview\\\"><div class=\\\"markdown-body \" + classPrefix + \"preview-container\\\"></div></div>\",\n                \"<div class=\\\"\" + classPrefix + \"container-mask\\\" style=\\\"display:block;\\\"></div>\",\n                \"<div class=\\\"\" + classPrefix + \"mask\\\"></div>\"\n            ].join(\"\\n\");\n\n            editor.append(appendElements).addClass(classPrefix + \"vertical\");\n\n            if (settings.theme !== \"\")\n            {\n                editor.addClass(classPrefix + \"theme-\" + settings.theme);\n            }\n\n            this.mask          = editor.children(\".\" + classPrefix + \"mask\");\n            this.containerMask = editor.children(\".\" + classPrefix  + \"container-mask\");\n\n            if (settings.markdown !== \"\")\n            {\n                markdownTextarea.val(settings.markdown);\n            }\n\n            if (settings.appendMarkdown !== \"\")\n            {\n                markdownTextarea.val(markdownTextarea.val() + settings.appendMarkdown);\n            }\n\n            this.htmlTextarea     = editor.children(\".\" + classNames.textarea.html);\n            this.preview          = editor.children(\".\" + classPrefix + \"preview\");\n            this.previewContainer = this.preview.children(\".\" + classPrefix + \"preview-container\");\n\n            if (settings.previewTheme !== \"\")\n            {\n                this.preview.addClass(classPrefix + \"preview-theme-\" + settings.previewTheme);\n            }\n\n            if (typeof define === \"function\" && define.amd)\n            {\n                if (typeof katex !== \"undefined\")\n                {\n                    editormd.$katex = katex;\n                }\n\n                if (settings.searchReplace && !settings.readOnly)\n                {\n                    editormd.loadCSS(settings.path + \"codemirror/addon/dialog/dialog\");\n                    editormd.loadCSS(settings.path + \"codemirror/addon/search/matchesonscrollbar\");\n                }\n            }\n\n            if ((typeof define === \"function\" && define.amd) || !settings.autoLoadModules)\n            {\n                if (typeof CodeMirror !== \"undefined\") {\n                    editormd.$CodeMirror = CodeMirror;\n                }\n\n                if (typeof marked     !== \"undefined\") {\n                    editormd.$marked     = marked;\n                }\n\n                this.setCodeMirror().setToolbar().loadedDisplay();\n            }\n            else\n            {\n                this.loadQueues();\n            }\n\n            return this;\n        },\n\n        /**\n         * 所需组件加载队列\n         * Required components loading queue\n         *\n         * @returns {editormd}  返回editormd的实例对象\n         */\n\n        loadQueues : function() {\n            var _this           = this;\n            var settings        = this.settings;\n            var loadPath        = settings.path;\n            var isLoadedDisplay = false;\n\n            var loadFlowChartOrSequenceDiagram = function() {\n\n                if (editormd.isIE8)\n                {\n                    _this.loadedDisplay();\n\n                    return ;\n                }\n\n\n                if (settings.mermaid) {\n                    editormd.loadScript(loadPath + \"mermaid/mermaid.min\", function () {\n                        window.mermaid.initialize({\n                            theme: 'default',\n                            logLevel: 3,\n                            securityLevel: 'loose',\n                            flowchart: { curve: 'basis' },\n                            gantt: { axisFormat: '%m/%d/%Y' },\n                            sequence: { actorMargin: 50 },\n                        });\n                        mermaid.ganttConfig = {\n                            axisFormatter: [\n                                // Within a day\n                                ['%I:%M', function (d) {\n                                    return d.getHours();\n                                }],\n                                // Monday a week\n                                ['%m/%d', function (d) { // redefine date here as '%m/%d'instead of 'w. %U', search mermaid.js\n                                    return d.getDay() == 1;\n                                }],\n                                // Day within a week (not monday)\n                                ['%a %d', function (d) {\n                                    return d.getDay() && d.getDate() != 1;\n                                }],\n                                // within a month\n                                ['%b %d', function (d) {\n                                    return d.getDate() != 1;\n                                }],\n                                // Month\n                                ['%m-%y', function (d) {\n                                    return d.getMonth();\n                                }],[ \"%m-%Y\", function () {\n                                    return d.getFullYear();\n                                }]]\n                        };\n\n                        if (!isLoadedDisplay){\n                            isLoadedDisplay = true;\n                            _this.loadedDisplay();\n                        }\n                    });\n                }\n                if (settings.flowChart)\n                {\n                    editormd.loadScript(loadPath + \"raphael.min\", function() {\n                        editormd.loadScript(loadPath + \"flowchart.min\", function() {\n                            editormd.loadScript(loadPath + \"jquery.flowchart.min\", function() {\n                                if (!isLoadedDisplay){\n                                    isLoadedDisplay = true;\n                                    _this.loadedDisplay();\n                                }\n                            });\n                        });\n                    });\n                }\n\n                if (settings.mindMap)\n                {\n                    editormd.loadScript(loadPath + \"mindmap/transform.min\", function() {\n                        editormd.loadScript(loadPath + \"mindmap/d3@5\", function() {\n                            editormd.loadScript(loadPath + \"mindmap/view.min\", function() {\n                                if (!isLoadedDisplay){\n                                    isLoadedDisplay = true;\n                                    _this.loadedDisplay();\n                                }\n                            });\n                        });\n                    });\n                }\n\n                if(settings.sequenceDiagram) {\n                    editormd.loadCSS(loadPath + \"sequence/sequence-diagram-min\", function () {\n                        editormd.loadScript(loadPath + \"sequence/webfont\", function() {\n                            editormd.loadScript(loadPath + \"sequence/snap.svg-min\", function() {\n                                editormd.loadScript(loadPath + \"sequence/underscore-min\", function() {\n                                    editormd.loadScript(loadPath + \"sequence/sequence-diagram-min\", function() {\n                                        if (!isLoadedDisplay){\n                                            isLoadedDisplay = true;\n                                            _this.loadedDisplay();\n                                        }\n                                    });\n                                });\n                            });\n                        });\n                    });\n                }\n                else\n                {\n                    _this.loadedDisplay();\n                }\n            };\n\n            editormd.loadCSS(loadPath + \"codemirror/codemirror.min\");\n\n            if (settings.searchReplace && !settings.readOnly)\n            {\n                editormd.loadCSS(loadPath + \"codemirror/addon/dialog/dialog\");\n                editormd.loadCSS(loadPath + \"codemirror/addon/search/matchesonscrollbar\");\n            }\n\n            if (settings.codeFold)\n            {\n                editormd.loadCSS(loadPath + \"codemirror/addon/fold/foldgutter\");\n            }\n\n            editormd.loadScript(loadPath + \"codemirror/codemirror.min\", function() {\n                editormd.$CodeMirror = CodeMirror;\n\n                editormd.loadScript(loadPath + \"codemirror/modes.min\", function() {\n\n                    editormd.loadScript(loadPath + \"codemirror/addons.min\", function() {\n\n                        _this.setCodeMirror();\n\n                        if (settings.mode !== \"gfm\" && settings.mode !== \"markdown\")\n                        {\n                            _this.loadedDisplay();\n\n                            return false;\n                        }\n\n                        _this.setToolbar();\n\n                        editormd.loadScript(loadPath + \"marked\", function() {\n\n                            editormd.$marked = marked;\n\n                            if(!settings.highlightStyle){\n                                settings.highlightStyle = \"github\";\n                            }\n                            if (settings.previewCodeHighlight)\n                            {\n                                editormd.loadCSS(loadPath + \"highlight/styles/\" + settings.highlightStyle);\n                                editormd.loadScript(loadPath + \"highlight/highlight\", function() {\n                                    loadFlowChartOrSequenceDiagram();\n                                });\n                            }\n                            else\n                            {\n                                loadFlowChartOrSequenceDiagram();\n                            }\n                        });\n\n                    });\n\n                });\n\n            });\n\n            return this;\n        },\n\n        /**\n         * 设置 Editor.md 的整体主题，主要是工具栏\n         * Setting Editor.md theme\n         *\n         * @returns {editormd}  返回editormd的实例对象\n         */\n\n        setTheme : function(theme) {\n            var editor      = this.editor;\n            var oldTheme    = this.settings.theme;\n            var themePrefix = this.classPrefix + \"theme-\";\n\n            editor.removeClass(themePrefix + oldTheme).addClass(themePrefix + theme);\n\n            this.settings.theme = theme;\n\n            return this;\n        },\n\n        /**\n         * 设置 CodeMirror（编辑区）的主题\n         * Setting CodeMirror (Editor area) theme\n         *\n         * @returns {editormd}  返回editormd的实例对象\n         */\n\n        setEditorTheme : function(theme) {\n            var settings   = this.settings;\n            settings.editorTheme = theme;\n\n            if (theme !== \"default\")\n            {\n                editormd.loadCSS(settings.path + \"codemirror/theme/\" + settings.editorTheme);\n            }\n\n            this.cm.setOption(\"theme\", theme);\n\n            return this;\n        },\n\n        /**\n         * setEditorTheme() 的别名\n         * setEditorTheme() alias\n         *\n         * @returns {editormd}  返回editormd的实例对象\n         */\n\n        setCodeMirrorTheme : function (theme) {\n            this.setEditorTheme(theme);\n\n            return this;\n        },\n\n        /**\n         * 设置 Editor.md 的主题\n         * Setting Editor.md theme\n         *\n         * @returns {editormd}  返回editormd的实例对象\n         */\n\n        setPreviewTheme : function(theme) {\n            var preview     = this.preview;\n            var oldTheme    = this.settings.previewTheme;\n            var themePrefix = this.classPrefix + \"preview-theme-\";\n\n            preview.removeClass(themePrefix + oldTheme).addClass(themePrefix + theme);\n\n            this.settings.previewTheme = theme;\n\n            return this;\n        },\n\n        /**\n         * 配置和初始化CodeMirror组件\n         * CodeMirror initialization\n         *\n         * @returns {editormd}  返回editormd的实例对象\n         */\n\n        setCodeMirror : function() {\n            var settings         = this.settings;\n            var editor           = this.editor;\n\n            if (settings.editorTheme !== \"default\")\n            {\n                editormd.loadCSS(settings.path + \"codemirror/theme/\" + settings.editorTheme);\n            }\n\n            var codeMirrorConfig = {\n                mode                      : settings.mode,\n                theme                     : settings.editorTheme,\n                tabSize                   : settings.tabSize,\n                dragDrop                  : false,\n                autofocus                 : settings.autoFocus,\n                autoCloseTags             : settings.autoCloseTags,\n                readOnly                  : (settings.readOnly) ? \"nocursor\" : false,\n                indentUnit                : settings.indentUnit,\n                lineNumbers               : settings.lineNumbers,\n                lineWrapping              : settings.lineWrapping,\n                extraKeys                 : {\n                                                \"Ctrl-Q\": function(cm) {\n                                                    cm.foldCode(cm.getCursor());\n                                                }\n                                            },\n                foldGutter                : settings.codeFold,\n                gutters                   : [\"CodeMirror-linenumbers\", \"CodeMirror-foldgutter\"],\n                matchBrackets             : settings.matchBrackets,\n                indentWithTabs            : settings.indentWithTabs,\n                styleActiveLine           : settings.styleActiveLine,\n                styleSelectedText         : settings.styleSelectedText,\n                autoCloseBrackets         : settings.autoCloseBrackets,\n                showTrailingSpace         : settings.showTrailingSpace,\n                highlightSelectionMatches : ( (!settings.matchWordHighlight) ? false : { showToken: (settings.matchWordHighlight === \"onselected\") ? false : /\\w/ } )\n            };\n\n            this.codeEditor = this.cm        = editormd.$CodeMirror.fromTextArea(this.markdownTextarea[0], codeMirrorConfig);\n            this.codeMirror = this.cmElement = editor.children(\".CodeMirror\");\n\n            if (settings.value !== \"\")\n            {\n                this.cm.setValue(settings.value);\n            }\n\n            this.codeMirror.css({\n                fontSize : settings.fontSize,\n                width    : (!settings.watch) ? \"100%\" : \"50%\"\n            });\n\n            if (settings.autoHeight)\n            {\n                this.codeMirror.css(\"height\", \"auto\");\n                this.cm.setOption(\"viewportMargin\", Infinity);\n            }\n\n            if (!settings.lineNumbers)\n            {\n                this.codeMirror.find(\".CodeMirror-gutters\").css(\"border-right\", \"none\");\n            }\n\n            return this;\n        },\n\n        /**\n         * 获取CodeMirror的配置选项\n         * Get CodeMirror setting options\n         *\n         * @returns {Mixed}                  return CodeMirror setting option value\n         */\n\n        getCodeMirrorOption : function(key) {\n            return this.cm.getOption(key);\n        },\n\n        /**\n         * 配置和重配置CodeMirror的选项\n         * CodeMirror setting options / resettings\n         *\n         * @returns {editormd}  返回editormd的实例对象\n         */\n\n        setCodeMirrorOption : function(key, value) {\n\n            this.cm.setOption(key, value);\n\n            return this;\n        },\n\n        /**\n         * 添加 CodeMirror 键盘快捷键\n         * Add CodeMirror keyboard shortcuts key map\n         *\n         * @returns {editormd}  返回editormd的实例对象\n         */\n\n        addKeyMap : function(map, bottom) {\n            this.cm.addKeyMap(map, bottom);\n\n            return this;\n        },\n\n        /**\n         * 移除 CodeMirror 键盘快捷键\n         * Remove CodeMirror keyboard shortcuts key map\n         *\n         * @returns {editormd}  返回editormd的实例对象\n         */\n\n        removeKeyMap : function(map) {\n            this.cm.removeKeyMap(map);\n\n            return this;\n        },\n\n        /**\n         * 跳转到指定的行\n         * Goto CodeMirror line\n         *\n         * @param   {String|Intiger}   line      line number or \"first\"|\"last\"\n         * @returns {editormd}                   返回editormd的实例对象\n         */\n\n        gotoLine : function (line) {\n\n            var settings = this.settings;\n\n            if (!settings.gotoLine)\n            {\n                return this;\n            }\n\n            var cm       = this.cm;\n            var editor   = this.editor;\n            var count    = cm.lineCount();\n            var preview  = this.preview;\n\n            if (typeof line === \"string\")\n            {\n                if(line === \"last\")\n                {\n                    line = count;\n                }\n\n                if (line === \"first\")\n                {\n                    line = 1;\n                }\n            }\n\n            if (typeof line !== \"number\")\n            {\n                alert(\"Error: The line number must be an integer.\");\n                return this;\n            }\n\n            line  = parseInt(line) - 1;\n\n            if (line > count)\n            {\n                alert(\"Error: The line number range 1-\" + count);\n\n                return this;\n            }\n\n            cm.setCursor( {line : line, ch : 0} );\n\n            var scrollInfo   = cm.getScrollInfo();\n            var clientHeight = scrollInfo.clientHeight;\n            var coords       = cm.charCoords({line : line, ch : 0}, \"local\");\n\n            cm.scrollTo(null, (coords.top + coords.bottom - clientHeight) / 2);\n\n            if (settings.watch)\n            {\n                var cmScroll  = this.codeMirror.find(\".CodeMirror-scroll\")[0];\n                var height    = $(cmScroll).height();\n                var scrollTop = cmScroll.scrollTop;\n                var percent   = (scrollTop / cmScroll.scrollHeight);\n\n                if (scrollTop === 0)\n                {\n                    preview.scrollTop(0);\n                }\n                else if (scrollTop + height >= cmScroll.scrollHeight - 16)\n                {\n                    preview.scrollTop(preview[0].scrollHeight);\n                }\n                else\n                {\n                    preview.scrollTop(preview[0].scrollHeight * percent);\n                }\n            }\n\n            cm.focus();\n\n            return this;\n        },\n\n        /**\n         * 扩展当前实例对象，可同时设置多个或者只设置一个\n         * Extend editormd instance object, can mutil setting.\n         *\n         * @returns {editormd}                  this(editormd instance object.)\n         */\n\n        extend : function() {\n            if (typeof arguments[1] !== \"undefined\")\n            {\n                if (typeof arguments[1] === \"function\")\n                {\n                    arguments[1] = $.proxy(arguments[1], this);\n                }\n\n                this[arguments[0]] = arguments[1];\n            }\n\n            if (typeof arguments[0] === \"object\" && typeof arguments[0].length === \"undefined\")\n            {\n                $.extend(true, this, arguments[0]);\n            }\n\n            return this;\n        },\n\n        /**\n         * 设置或扩展当前实例对象，单个设置\n         * Extend editormd instance object, one by one\n         *\n         * @param   {String|Object}   key       option key\n         * @param   {String|Object}   value     option value\n         * @returns {editormd}                  this(editormd instance object.)\n         */\n\n        set : function (key, value) {\n\n            if (typeof value !== \"undefined\" && typeof value === \"function\")\n            {\n                value = $.proxy(value, this);\n            }\n\n            this[key] = value;\n\n            return this;\n        },\n\n        /**\n         * 重新配置\n         * Resetting editor options\n         *\n         * @param   {String|Object}   key       option key\n         * @param   {String|Object}   value     option value\n         * @returns {editormd}                  this(editormd instance object.)\n         */\n\n        config : function(key, value) {\n            var settings = this.settings;\n\n            if (typeof key === \"object\")\n            {\n                settings = $.extend(true, settings, key);\n            }\n\n            if (typeof key === \"string\")\n            {\n                settings[key] = value;\n            }\n\n            this.settings = settings;\n            this.recreate();\n\n            return this;\n        },\n\n        /**\n         * 注册事件处理方法\n         * Bind editor event handle\n         *\n         * @param   {String}     eventType      event type\n         * @param   {Function}   callback       回调函数\n         * @returns {editormd}                  this(editormd instance object.)\n         */\n\n        on : function(eventType, callback) {\n            var settings = this.settings;\n\n            if (typeof settings[\"on\" + eventType] !== \"undefined\")\n            {\n                settings[\"on\" + eventType] = $.proxy(callback, this);\n            }\n\n            return this;\n        },\n\n        /**\n         * 解除事件处理方法\n         * Unbind editor event handle\n         *\n         * @param   {String}   eventType          event type\n         * @returns {editormd}                    this(editormd instance object.)\n         */\n\n        off : function(eventType) {\n            var settings = this.settings;\n\n            if (typeof settings[\"on\" + eventType] !== \"undefined\")\n            {\n                settings[\"on\" + eventType] = function(){};\n            }\n\n            return this;\n        },\n\n        /**\n         * 显示工具栏\n         * Display toolbar\n         *\n         * @param   {Function} [callback=function(){}] 回调函数\n         * @returns {editormd}  返回editormd的实例对象\n         */\n\n        showToolbar : function(callback) {\n            var settings = this.settings;\n\n            if(settings.readOnly) {\n                return this;\n            }\n\n            if (settings.toolbar && (this.toolbar.length < 1 || this.toolbar.find(\".\" + this.classPrefix + \"menu\").html() === \"\") )\n            {\n                this.setToolbar();\n            }\n\n            settings.toolbar = true;\n\n            this.toolbar.show();\n            this.resize();\n\n            $.proxy(callback || function(){}, this)();\n\n            return this;\n        },\n\n        /**\n         * 隐藏工具栏\n         * Hide toolbar\n         *\n         * @param   {Function} [callback=function(){}] 回调函数\n         * @returns {editormd}                         this(editormd instance object.)\n         */\n\n        hideToolbar : function(callback) {\n            var settings = this.settings;\n\n            settings.toolbar = false;\n            this.toolbar.hide();\n            this.resize();\n\n            $.proxy(callback || function(){}, this)();\n\n            return this;\n        },\n\n        /**\n         * 页面滚动时工具栏的固定定位\n         * Set toolbar in window scroll auto fixed position\n         *\n         * @returns {editormd}  返回editormd的实例对象\n         */\n\n        setToolbarAutoFixed : function(fixed) {\n\n            var state    = this.state;\n            var editor   = this.editor;\n            var toolbar  = this.toolbar;\n            var settings = this.settings;\n\n            if (typeof fixed !== \"undefined\")\n            {\n                settings.toolbarAutoFixed = fixed;\n            }\n\n            var autoFixedHandle = function(){\n                var $window = $(window);\n                var top     = $window.scrollTop();\n\n                if (!settings.toolbarAutoFixed)\n                {\n                    return false;\n                }\n\n                if (top - editor.offset().top > 10 && top < editor.height())\n                {\n                    toolbar.css({\n                        position : \"fixed\",\n                        width    : editor.width() + \"px\",\n                        left     : ($window.width() - editor.width()) / 2 + \"px\"\n                    });\n                }\n                else\n                {\n                    toolbar.css({\n                        position : \"absolute\",\n                        width    : \"100%\",\n                        left     : 0\n                    });\n                }\n            };\n\n            if (!state.fullscreen && !state.preview && settings.toolbar && settings.toolbarAutoFixed)\n            {\n                $(window).bind(\"scroll\", autoFixedHandle);\n            }\n\n            return this;\n        },\n\n        /**\n         * 配置和初始化工具栏\n         * Set toolbar and Initialization\n         *\n         * @returns {editormd}  返回editormd的实例对象\n         */\n\n        setToolbar : function() {\n            var settings    = this.settings;\n\n            if(settings.readOnly) {\n                return this;\n            }\n\n            var editor      = this.editor;\n            var preview     = this.preview;\n            var classPrefix = this.classPrefix;\n\n            var toolbar     = this.toolbar = editor.children(\".\" + classPrefix + \"toolbar\");\n\n            if (settings.toolbar && toolbar.length < 1)\n            {\n                var toolbarHTML = \"<div class=\\\"\" + classPrefix + \"toolbar\\\"><div class=\\\"\" + classPrefix + \"toolbar-container\\\"><ul class=\\\"\" + classPrefix + \"menu\\\"></ul></div></div>\";\n\n                editor.append(toolbarHTML);\n                toolbar = this.toolbar = editor.children(\".\" + classPrefix + \"toolbar\");\n            }\n\n            if (!settings.toolbar)\n            {\n                toolbar.hide();\n\n                return this;\n            }\n\n            toolbar.show();\n\n            var icons       = (typeof settings.toolbarIcons === \"function\") ? settings.toolbarIcons()\n                            : ((typeof settings.toolbarIcons === \"string\")  ? editormd.toolbarModes[settings.toolbarIcons] : settings.toolbarIcons);\n\n            var toolbarMenu = toolbar.find(\".\" + this.classPrefix + \"menu\"), menu = \"\";\n            var pullRight   = false;\n\n            for (var i = 0, len = icons.length; i < len; i++)\n            {\n                var name = icons[i];\n\n                if (name === \"||\")\n                {\n                    pullRight = true;\n                }\n                else if (name === \"|\")\n                {\n                    menu += \"<li class=\\\"divider\\\" unselectable=\\\"on\\\">|</li>\";\n                }\n                else\n                {\n                    var isHeader = (/h(\\d)/.test(name));\n                    var index    = name;\n\n                    if (name === \"watch\" && !settings.watch) {\n                        index = \"unwatch\";\n                    }\n\n                    var title     = settings.lang.toolbar[index];\n                    var iconTexts = settings.toolbarIconTexts[index];\n                    var iconClass = settings.toolbarIconsClass[index];\n\n                    title     = (typeof title     === \"undefined\") ? \"\" : title;\n                    iconTexts = (typeof iconTexts === \"undefined\") ? \"\" : iconTexts;\n                    iconClass = (typeof iconClass === \"undefined\") ? \"\" : iconClass;\n\n                    var menuItem = pullRight ? \"<li class=\\\"pull-right\\\">\" : \"<li>\";\n\n                    if (typeof settings.toolbarCustomIcons[name] !== \"undefined\" && typeof settings.toolbarCustomIcons[name] !== \"function\")\n                    {\n                        menuItem += settings.toolbarCustomIcons[name];\n                    }\n                    else\n                    {\n                        menuItem += \"<a href=\\\"javascript:;\\\" title=\\\"\" + title + \"\\\" unselectable=\\\"on\\\">\";\n                        menuItem += \"<i class=\\\"fa \" + iconClass + \"\\\" name=\\\"\"+name+\"\\\" unselectable=\\\"on\\\">\"+((isHeader) ? name.toUpperCase() : ( (iconClass === \"\") ? iconTexts : \"\") ) + \"</i>\";\n                        menuItem += \"</a>\";\n                    }\n\n                    menuItem += \"</li>\";\n\n                    menu = pullRight ? menuItem + menu : menu + menuItem;\n                }\n            }\n\n            toolbarMenu.html(menu);\n\n            toolbarMenu.find(\"[title=\\\"Lowercase\\\"]\").attr(\"title\", settings.lang.toolbar.lowercase);\n            toolbarMenu.find(\"[title=\\\"ucwords\\\"]\").attr(\"title\", settings.lang.toolbar.ucwords);\n\n            this.setToolbarHandler();\n            this.setToolbarAutoFixed();\n\n            return this;\n        },\n\n        /**\n         * 工具栏图标事件处理对象序列\n         * Get toolbar icons event handlers\n         *\n         * @param   {Object}   cm    CodeMirror的实例对象\n         * @param   {String}   name  要获取的事件处理器名称\n         * @returns {Object}         返回处理对象序列\n         */\n\n        dialogLockScreen : function() {\n            $.proxy(editormd.dialogLockScreen, this)();\n\n            return this;\n        },\n\n        dialogShowMask : function(dialog) {\n            $.proxy(editormd.dialogShowMask, this)(dialog);\n\n            return this;\n        },\n\n        getToolbarHandles : function(name) {\n            var toolbarHandlers = this.toolbarHandlers = editormd.toolbarHandlers;\n\n            return (name && typeof toolbarIconHandlers[name] !== \"undefined\") ? toolbarHandlers[name] : toolbarHandlers;\n        },\n\n        /**\n         * 工具栏图标事件处理器\n         * Bind toolbar icons event handle\n         *\n         * @returns {editormd}  返回editormd的实例对象\n         */\n\n        setToolbarHandler : function() {\n            var _this               = this;\n            var settings            = this.settings;\n\n            if (!settings.toolbar || settings.readOnly) {\n                return this;\n            }\n\n            var toolbar             = this.toolbar;\n            var cm                  = this.cm;\n            var classPrefix         = this.classPrefix;\n            var toolbarIcons        = this.toolbarIcons = toolbar.find(\".\" + classPrefix + \"menu > li > a\");\n            var toolbarIconHandlers = this.getToolbarHandles();\n\n            toolbarIcons.bind(editormd.mouseOrTouch(\"click\", \"touchend\"), function(event) {\n\n                var icon                = $(this).children(\".fa\");\n                var name                = icon.attr(\"name\");\n                var cursor              = cm.getCursor();\n                var selection           = cm.getSelection();\n\n                if (name === \"\") {\n                    return ;\n                }\n\n                _this.activeIcon = icon;\n\n                if (typeof toolbarIconHandlers[name] !== \"undefined\")\n                {\n                    $.proxy(toolbarIconHandlers[name], _this)(cm);\n                }\n                else\n                {\n                    if (typeof settings.toolbarHandlers[name] !== \"undefined\")\n                    {\n                        $.proxy(settings.toolbarHandlers[name], _this)(cm, icon, cursor, selection);\n                    }\n                }\n\n                if (name !== \"link\" && name !== \"reference-link\" && name !== \"image\" && name !== \"code-block\" &&\n                    name !== \"preformatted-text\" && name !== \"watch\" && name !== \"preview\" && name !== \"search\" && name !== \"fullscreen\" && name !== \"info\")\n                {\n                    cm.focus();\n                }\n\n                return false;\n\n            });\n\n            return this;\n        },\n\n        /**\n         * 动态创建对话框\n         * Creating custom dialogs\n         *\n         * @param   {Object} options  配置项键值对 Key/Value\n         * @returns {dialog}          返回创建的dialog的jQuery实例对象\n         */\n\n        createDialog : function(options) {\n            return $.proxy(editormd.createDialog, this)(options);\n        },\n\n        /**\n         * 创建关于Editor.md的对话框\n         * Create about Editor.md dialog\n         *\n         * @returns {editormd}  返回editormd的实例对象\n         */\n\n        createInfoDialog : function() {\n            var _this        = this;\n\t\t\tvar editor       = this.editor;\n            var classPrefix  = this.classPrefix;\n\n            var infoDialogHTML = [\n                \"<div class=\\\"\" + classPrefix + \"dialog \" + classPrefix + \"dialog-info\\\" style=\\\"\\\">\",\n                \"<div class=\\\"\" + classPrefix + \"dialog-container\\\">\",\n                \"<h1><i class=\\\"editormd-logo editormd-logo-lg editormd-logo-color\\\"></i> \" + editormd.title + \"<small>v\" + editormd.version + \"</small></h1>\",\n                \"<p>\" + this.lang.description + \"</p>\",\n                \"<p style=\\\"margin: 10px 0 20px 0;\\\"><a href=\\\"\" + editormd.homePage + \"\\\" target=\\\"_blank\\\">\" + editormd.homePage + \" <i class=\\\"fa fa-external-link\\\"></i></a></p>\",\n                \"<p style=\\\"font-size: 0.85em;\\\">Copyright &copy; 2015 <a href=\\\"https://github.com/pandao\\\" target=\\\"_blank\\\" class=\\\"hover-link\\\">Pandao</a>, The <a href=\\\"https://github.com/pandao/editor.md/blob/master/LICENSE\\\" target=\\\"_blank\\\" class=\\\"hover-link\\\">MIT</a> License.</p>\",\n                \"</div>\",\n                \"<a href=\\\"javascript:;\\\" class=\\\"fa fa-close \" + classPrefix + \"dialog-close\\\"></a>\",\n                \"</div>\"\n            ].join(\"\\n\");\n\n            editor.append(infoDialogHTML);\n\n            var infoDialog  = this.infoDialog = editor.children(\".\" + classPrefix + \"dialog-info\");\n\n            infoDialog.find(\".\" + classPrefix + \"dialog-close\").bind(editormd.mouseOrTouch(\"click\", \"touchend\"), function() {\n                _this.hideInfoDialog();\n            });\n\n            infoDialog.css(\"border\", (editormd.isIE8) ? \"1px solid #ddd\" : \"\").css(\"z-index\", editormd.dialogZindex).show();\n\n            this.infoDialogPosition();\n\n            return this;\n        },\n\n        /**\n         * 关于Editor.md对话居中定位\n         * Editor.md dialog position handle\n         *\n         * @returns {editormd}  返回editormd的实例对象\n         */\n\n        infoDialogPosition : function() {\n            var infoDialog = this.infoDialog;\n\n\t\t\tvar _infoDialogPosition = function() {\n\t\t\t\tinfoDialog.css({\n\t\t\t\t\ttop  : ($(window).height() - infoDialog.height()) / 2 + \"px\",\n\t\t\t\t\tleft : ($(window).width()  - infoDialog.width()) / 2  + \"px\"\n\t\t\t\t});\n\t\t\t};\n\n\t\t\t_infoDialogPosition();\n\n\t\t\t$(window).resize(_infoDialogPosition);\n\n            return this;\n        },\n\n        /**\n         * 显示关于Editor.md\n         * Display about Editor.md dialog\n         *\n         * @returns {editormd}  返回editormd的实例对象\n         */\n\n        showInfoDialog : function() {\n\n            $(\"html,body\").css(\"overflow-x\", \"hidden\");\n\n            var _this       = this;\n\t\t\tvar editor      = this.editor;\n            var settings    = this.settings;\n\t\t\tvar infoDialog  = this.infoDialog = editor.children(\".\" + this.classPrefix + \"dialog-info\");\n\n            if (infoDialog.length < 1)\n            {\n                this.createInfoDialog();\n            }\n\n            this.lockScreen(true);\n\n            this.mask.css({\n\t\t\t\t\t\topacity         : settings.dialogMaskOpacity,\n\t\t\t\t\t\tbackgroundColor : settings.dialogMaskBgColor\n\t\t\t\t\t}).show();\n\n\t\t\tinfoDialog.css(\"z-index\", editormd.dialogZindex).show();\n\n\t\t\tthis.infoDialogPosition();\n\n            return this;\n        },\n\n        /**\n         * 隐藏关于Editor.md\n         * Hide about Editor.md dialog\n         *\n         * @returns {editormd}  返回editormd的实例对象\n         */\n\n        hideInfoDialog : function() {\n            $(\"html,body\").css(\"overflow-x\", \"\");\n            this.infoDialog.hide();\n            this.mask.hide();\n            this.lockScreen(false);\n\n            return this;\n        },\n\n        /**\n         * 锁屏\n         * lock screen\n         *\n         * @param   {Boolean}    lock    Boolean 布尔值，是否锁屏\n         * @returns {editormd}           返回editormd的实例对象\n         */\n\n        lockScreen : function(lock) {\n            editormd.lockScreen(lock);\n            this.resize();\n\n            return this;\n        },\n\n        /**\n         * 编辑器界面重建，用于动态语言包或模块加载等\n         * Recreate editor\n         *\n         * @returns {editormd}  返回editormd的实例对象\n         */\n\n        recreate : function() {\n            var _this            = this;\n            var editor           = this.editor;\n            var settings         = this.settings;\n\n            this.codeMirror.remove();\n\n            this.setCodeMirror();\n\n            if (!settings.readOnly)\n            {\n                if (editor.find(\".editormd-dialog\").length > 0) {\n                    editor.find(\".editormd-dialog\").remove();\n                }\n\n                if (settings.toolbar)\n                {\n                    this.getToolbarHandles();\n                    this.setToolbar();\n                }\n            }\n\n            this.loadedDisplay(true);\n\n            return this;\n        },\n\n        /**\n         * 高亮预览HTML的pre代码部分\n         * highlight of preview codes\n         *\n         * @returns {editormd}             返回editormd的实例对象\n         */\n\n        previewCodeHighlight : function() {\n            var settings         = this.settings;\n            var previewContainer = this.previewContainer;\n\n            if (settings.previewCodeHighlight)\n            {\n                // previewContainer.find(\"pre\").addClass(\"prettyprint\");\n                //\n                // if (typeof prettyPrint !== \"undefined\")\n                // {\n                //     prettyPrint();\n                // }\n                previewContainer.find(\"pre\").each(function (i, block) {\n                    hljs.highlightBlock(block);\n                });\n            }\n\n            return this;\n        },\n\n        /**\n         * 解析TeX(KaTeX)科学公式\n         * TeX(KaTeX) Renderer\n         *\n         * @returns {editormd}             返回editormd的实例对象\n         */\n\n        katexRender : function() {\n\n            if (timer === null)\n            {\n                return this;\n            }\n\n            this.previewContainer.find(\".\" + editormd.classNames.tex).each(function(){\n                var tex  = $(this);\n                editormd.$katex.render(tex.text(), tex[0]);\n\n                tex.find(\".katex\").css(\"font-size\", \"1.6em\");\n            });\n\n            return this;\n        },\n\n\n        /**\n         * 解析思维导图 - 2020-04-12\n         *\n         * @returns {editormd}             返回editormd的实例对象\n         */\n        mindmapRender:function(){\n            this.previewContainer.find(\".mindmap\").each(function(){\n                var mmap  = $(this);\n                var md_data = window.markmap.transform(mmap.text().trim());\n                window.markmap.markmap(\"svg#\"+this.id,md_data)\n            });\n\n            return this;\n        },\n\n        /**\n         * 解析和渲染流程图及时序图\n         * FlowChart and SequenceDiagram Renderer\n         *\n         * @returns {editormd}             返回editormd的实例对象\n         */\n\n        flowChartAndSequenceDiagramRender : function() {\n            var $this            = this;\n            var settings         = this.settings;\n            var previewContainer = this.previewContainer;\n\n            if (editormd.isIE8) {\n                return this;\n            }\n            if (settings.mermaid) {\n                var mermaid = previewContainer.find(\".lang-mermaid\");\n                if (mermaid) {\n                    try {\n                        window.mermaid.init(void 0, mermaid.removeClass(\"hide\"));\n                    }catch (e) {\n                        console.log(e);\n                    }\n                }\n            }\n\n            if (settings.flowChart) {\n                if (flowchartTimer === null) {\n                    return this;\n                }\n                try {\n                    previewContainer.find(\".flowchart\").flowChart();\n                }catch (e) {\n                    console.log(e);\n                }\n            }\n\n            if (settings.sequenceDiagram) {\n                try {\n                    previewContainer.find(\".sequence-diagram\").sequenceDiagram({theme: \"simple\"});\n                }catch (e) {\n                    console.log(e);\n                }\n            }\n\n            var preview    = $this.preview;\n            var codeMirror = $this.codeMirror;\n            var codeView   = codeMirror.find(\".CodeMirror-scroll\");\n\n            var height    = codeView.height();\n            var scrollTop = codeView.scrollTop();\n            var percent   = (scrollTop / codeView[0].scrollHeight);\n            var tocHeight = 0;\n\n            preview.find(\".markdown-toc-list\").each(function(){\n                tocHeight += $(this).height();\n            });\n\n            var tocMenuHeight = preview.find(\".editormd-toc-menu\").height();\n            tocMenuHeight = (!tocMenuHeight) ? 0 : tocMenuHeight;\n\n            if (scrollTop === 0)\n            {\n                preview.scrollTop(0);\n            }\n            else if (scrollTop + height >= codeView[0].scrollHeight - 16)\n            {\n                preview.scrollTop(preview[0].scrollHeight);\n            }\n            else\n            {\n                preview.scrollTop((preview[0].scrollHeight + tocHeight + tocMenuHeight) * percent);\n            }\n\n            return this;\n        },\n\n        /**\n         * 注册键盘快捷键处理\n         * Register CodeMirror keyMaps (keyboard shortcuts).\n         *\n         * @param   {Object}    keyMap      KeyMap key/value {\"(Ctrl/Shift/Alt)-Key\" : function(){}}\n         * @returns {editormd}              return this\n         */\n\n        registerKeyMaps : function(keyMap) {\n\n            var _this           = this;\n            var cm              = this.cm;\n            var settings        = this.settings;\n            var toolbarHandlers = editormd.toolbarHandlers;\n            var disabledKeyMaps = settings.disabledKeyMaps;\n\n            keyMap              = keyMap || null;\n\n            if (keyMap)\n            {\n                for (var i in keyMap)\n                {\n                    if ($.inArray(i, disabledKeyMaps) < 0)\n                    {\n                        var map = {};\n                        map[i]  = keyMap[i];\n\n                        cm.addKeyMap(keyMap);\n                    }\n                }\n            }\n            else\n            {\n                for (var k in editormd.keyMaps)\n                {\n                    var _keyMap = editormd.keyMaps[k];\n                    var handle = (typeof _keyMap === \"string\") ? $.proxy(toolbarHandlers[_keyMap], _this) : $.proxy(_keyMap, _this);\n\n                    if ($.inArray(k, [\"F9\", \"F10\", \"F11\"]) < 0 && $.inArray(k, disabledKeyMaps) < 0)\n                    {\n                        var _map = {};\n                        _map[k] = handle;\n\n                        cm.addKeyMap(_map);\n                    }\n                }\n\n                $(window).keydown(function(event) {\n\n                    var keymaps = {\n                        \"120\" : \"F9\",\n                        \"121\" : \"F10\",\n                        \"122\" : \"F11\"\n                    };\n\n                    if ( $.inArray(keymaps[event.keyCode], disabledKeyMaps) < 0 )\n                    {\n                        switch (event.keyCode)\n                        {\n                            case 120:\n                                    $.proxy(toolbarHandlers[\"watch\"], _this)();\n                                    return false;\n                                break;\n\n                            case 121:\n                                    $.proxy(toolbarHandlers[\"preview\"], _this)();\n                                    return false;\n                                break;\n\n                            case 122:\n                                    $.proxy(toolbarHandlers[\"fullscreen\"], _this)();\n                                    return false;\n                                break;\n\n                            default:\n                                break;\n                        }\n                    }\n                });\n            }\n\n            return this;\n        },\n\n        /**\n         * 绑定同步滚动\n         *\n         * @returns {editormd} return this\n         */\n\n        bindScrollEvent : function() {\n\n            var _this            = this;\n            var preview          = this.preview;\n            var settings         = this.settings;\n            var codeMirror       = this.codeMirror;\n            var mouseOrTouch     = editormd.mouseOrTouch;\n\n            if (!settings.syncScrolling) {\n                return this;\n            }\n\n            var cmBindScroll = function() {\n                codeMirror.find(\".CodeMirror-scroll\").bind(mouseOrTouch(\"scroll\", \"touchmove\"), function(event) {\n                    var height    = $(this).height();\n                    var scrollTop = $(this).scrollTop();\n                    var percent   = (scrollTop / $(this)[0].scrollHeight);\n\n                    var tocHeight = 0;\n\n                    preview.find(\".markdown-toc-list\").each(function(){\n                        tocHeight += $(this).height();\n                    });\n\n                    var tocMenuHeight = preview.find(\".editormd-toc-menu\").height();\n                    tocMenuHeight = (!tocMenuHeight) ? 0 : tocMenuHeight;\n\n                    if (scrollTop === 0)\n                    {\n                        preview.scrollTop(0);\n                    }\n                    else if (scrollTop + height >= $(this)[0].scrollHeight - 16)\n                    {\n                        preview.scrollTop(preview[0].scrollHeight);\n                    }\n                    else\n                    {\n                        preview.scrollTop((preview[0].scrollHeight  + tocHeight + tocMenuHeight) * percent);\n                    }\n\n                    $.proxy(settings.onscroll, _this)(event);\n                });\n            };\n\n            var cmUnbindScroll = function() {\n                codeMirror.find(\".CodeMirror-scroll\").unbind(mouseOrTouch(\"scroll\", \"touchmove\"));\n            };\n\n            var previewBindScroll = function() {\n\n                preview.bind(mouseOrTouch(\"scroll\", \"touchmove\"), function(event) {\n                    var height    = $(this).height();\n                    var scrollTop = $(this).scrollTop();\n                    var percent   = (scrollTop / $(this)[0].scrollHeight);\n                    var codeView  = codeMirror.find(\".CodeMirror-scroll\");\n\n                    if(scrollTop === 0)\n                    {\n                        codeView.scrollTop(0);\n                    }\n                    else if (scrollTop + height >= $(this)[0].scrollHeight)\n                    {\n                        codeView.scrollTop(codeView[0].scrollHeight);\n                    }\n                    else\n                    {\n                        codeView.scrollTop(codeView[0].scrollHeight * percent);\n                    }\n\n                    $.proxy(settings.onpreviewscroll, _this)(event);\n                });\n\n            };\n\n            var previewUnbindScroll = function() {\n                preview.unbind(mouseOrTouch(\"scroll\", \"touchmove\"));\n            };\n\n\t\t\tcodeMirror.bind({\n\t\t\t\tmouseover  : cmBindScroll,\n\t\t\t\tmouseout   : cmUnbindScroll,\n\t\t\t\ttouchstart : cmBindScroll,\n\t\t\t\ttouchend   : cmUnbindScroll\n\t\t\t});\n\n            if (settings.syncScrolling === \"single\") {\n                return this;\n            }\n\n\t\t\tpreview.bind({\n\t\t\t\tmouseover  : previewBindScroll,\n\t\t\t\tmouseout   : previewUnbindScroll,\n\t\t\t\ttouchstart : previewBindScroll,\n\t\t\t\ttouchend   : previewUnbindScroll\n\t\t\t});\n\n            return this;\n        },\n\n        bindChangeEvent : function() {\n\n            var _this            = this;\n            var cm               = this.cm;\n            var settings         = this.settings;\n\n            if (!settings.syncScrolling) {\n                return this;\n            }\n\n            cm.on(\"change\", function(_cm, changeObj) {\n\n                if (settings.watch)\n                {\n                    _this.previewContainer.css(\"padding\", settings.autoHeight ? \"20px 20px 50px 40px\" : \"20px\");\n                }\n\n                timer = setTimeout(function() {\n                    clearTimeout(timer);\n                    _this.save();\n                    timer = null;\n                }, settings.delay);\n            });\n\n            return this;\n        },\n\n        /**\n         * 加载队列完成之后的显示处理\n         * Display handle of the module queues loaded after.\n         *\n         * @param   {Boolean}   recreate   是否为重建编辑器\n         * @returns {editormd}             返回editormd的实例对象\n         */\n\n        loadedDisplay : function(recreate) {\n\n            recreate             = recreate || false;\n\n            var _this            = this;\n            var editor           = this.editor;\n            var preview          = this.preview;\n            var settings         = this.settings;\n\n            this.containerMask.hide();\n\n            this.save();\n\n            if (settings.watch) {\n                preview.show();\n            }\n\n            editor.data(\"oldWidth\", editor.width()).data(\"oldHeight\", editor.height()); // 为了兼容Zepto\n\n            this.resize();\n            this.registerKeyMaps();\n\n            $(window).resize(function(){\n                _this.resize();\n            });\n\n            this.bindScrollEvent().bindChangeEvent();\n\n            if (!recreate)\n            {\n                $.proxy(settings.onload, this)();\n            }\n\n            this.state.loaded = true;\n\n            return this;\n        },\n\n        /**\n         * 设置编辑器的宽度\n         * Set editor width\n         *\n         * @param   {Number|String} width  编辑器宽度值\n         * @returns {editormd}             返回editormd的实例对象\n         */\n\n        width : function(width) {\n\n            this.editor.css(\"width\", (typeof width === \"number\") ? width  + \"px\" : width);\n            this.resize();\n\n            return this;\n        },\n\n        /**\n         * 设置编辑器的高度\n         * Set editor height\n         *\n         * @param   {Number|String} height  编辑器高度值\n         * @returns {editormd}              返回editormd的实例对象\n         */\n\n        height : function(height) {\n\n            this.editor.css(\"height\", (typeof height === \"number\")  ? height  + \"px\" : height);\n            this.resize();\n\n            return this;\n        },\n\n        /**\n         * 调整编辑器的尺寸和布局\n         * Resize editor layout\n         *\n         * @param   {Number|String} [width=null]  编辑器宽度值\n         * @param   {Number|String} [height=null] 编辑器高度值\n         * @returns {editormd}                    返回editormd的实例对象\n         */\n\n        resize : function(width, height) {\n\n            width  = width  || null;\n            height = height || null;\n\n            var state      = this.state;\n            var editor     = this.editor;\n            var preview    = this.preview;\n            var toolbar    = this.toolbar;\n            var settings   = this.settings;\n            var codeMirror = this.codeMirror;\n\n            if (width)\n            {\n                editor.css(\"width\", (typeof width  === \"number\") ? width  + \"px\" : width);\n            }\n\n            if (settings.autoHeight && !state.fullscreen && !state.preview)\n            {\n                editor.css(\"height\", \"auto\");\n                codeMirror.css(\"height\", \"auto\");\n            }\n            else\n            {\n                if (height)\n                {\n                    editor.css(\"height\", (typeof height === \"number\") ? height + \"px\" : height);\n                }\n\n                if (state.fullscreen)\n                {\n                    editor.height($(window).height());\n                }\n\n                if (settings.toolbar && !settings.readOnly)\n                {\n                    codeMirror.css(\"margin-top\", toolbar.height() + 1).height(editor.height() - toolbar.height());\n                }\n                else\n                {\n                    codeMirror.css(\"margin-top\", 0).height(editor.height());\n                }\n            }\n\n            if(settings.watch)\n            {\n                codeMirror.width(editor.width() / 2);\n                preview.width((!state.preview) ? editor.width() / 2 : editor.width());\n\n                this.previewContainer.css(\"padding\", settings.autoHeight ? \"20px 20px 50px 40px\" : \"20px\");\n\n                if (settings.toolbar && !settings.readOnly)\n                {\n                    preview.css(\"top\", toolbar.height() + 1);\n                }\n                else\n                {\n                    preview.css(\"top\", 0);\n                }\n\n                if (settings.autoHeight && !state.fullscreen && !state.preview)\n                {\n                    preview.height(\"\");\n                }\n                else\n                {\n                    var previewHeight = (settings.toolbar && !settings.readOnly) ? editor.height() - toolbar.height() : editor.height();\n\n                    preview.height(previewHeight);\n                }\n            }\n            else\n            {\n                codeMirror.width(editor.width());\n                preview.hide();\n            }\n\n            if (state.loaded)\n            {\n                $.proxy(settings.onresize, this)();\n            }\n\n            return this;\n        },\n\n        /**\n         * 解析和保存Markdown代码\n         * Parse & Saving Markdown source code\n         *\n         * @returns {editormd}     返回editormd的实例对象\n         */\n\n        save : function() {\n\n            if (timer === null)\n            {\n                return this;\n            }\n\n            var _this            = this;\n            var state            = this.state;\n            var settings         = this.settings;\n            var cm               = this.cm;\n            var cmValue          = cm.getValue();\n            var previewContainer = this.previewContainer;\n\n            if (settings.mode !== \"gfm\" && settings.mode !== \"markdown\")\n            {\n                this.markdownTextarea.val(cmValue);\n\n                return this;\n            }\n\n            var marked          = editormd.$marked;\n            var markdownToC     = this.markdownToC = [];\n            var rendererOptions = this.markedRendererOptions = {\n                toc                  : settings.toc,\n                tocm                 : settings.tocm,\n                tocStartLevel        : settings.tocStartLevel,\n                pageBreak            : settings.pageBreak,\n                taskList             : settings.taskList,\n                emoji                : settings.emoji,\n                tex                  : settings.tex,\n                atLink               : settings.atLink,           // for @link\n                emailLink            : settings.emailLink,        // for mail address auto link\n                flowChart            : settings.flowChart,\n                sequenceDiagram      : settings.sequenceDiagram,\n                previewCodeHighlight : settings.previewCodeHighlight,\n                mermaid              : settings.mermaid,\n                mindMap              : settings.mindMap, // 思维导图\n            };\n\n            var markedOptions = this.markedOptions = {\n                renderer    : editormd.markedRenderer(markdownToC, rendererOptions),\n                gfm         : true,\n                tables      : true,\n                breaks      : true,\n                pedantic    : false,\n                sanitize    : (settings.htmlDecode) ? false : true,  // 关闭忽略HTML标签，即开启识别HTML标签，默认为false\n                smartLists  : true,\n                smartypants : true\n            };\n\n            marked.setOptions(markedOptions);\n\n            var newMarkdownDoc = editormd.$marked(cmValue, markedOptions);\n\n            if(settings.debug) {\n                console.info(\"cmValue\", cmValue, newMarkdownDoc);\n            }\n            newMarkdownDoc = editormd.filterHTMLTags(newMarkdownDoc, settings.htmlDecode);\n\n            //console.error(\"cmValue\", cmValue, newMarkdownDoc);\n\n            this.markdownTextarea.text(cmValue);\n\n            cm.save();\n\n            if (settings.saveHTMLToTextarea)\n            {\n                this.htmlTextarea.text(newMarkdownDoc);\n            }\n\n            if(settings.watch || (!settings.watch && state.preview))\n            {\n                previewContainer.html(newMarkdownDoc);\n\n                this.previewCodeHighlight();\n\n                if (settings.toc)\n                {\n                    var tocContainer = (settings.tocContainer === \"\") ? previewContainer : $(settings.tocContainer);\n                    var tocMenu      = tocContainer.find(\".\" + this.classPrefix + \"toc-menu\");\n\n                    tocContainer.attr(\"previewContainer\", (settings.tocContainer === \"\") ? \"true\" : \"false\");\n\n                    if (settings.tocContainer !== \"\" && tocMenu.length > 0)\n                    {\n                        tocMenu.remove();\n                    }\n\n                    editormd.markdownToCRenderer(markdownToC, tocContainer, settings.tocDropdown, settings.tocStartLevel);\n\n                    if (settings.tocDropdown || tocContainer.find(\".\" + this.classPrefix + \"toc-menu\").length > 0)\n                    {\n                        editormd.tocDropdownMenu(tocContainer, (settings.tocTitle !== \"\") ? settings.tocTitle : this.lang.tocTitle);\n                    }\n\n                    if (settings.tocContainer !== \"\")\n                    {\n                        previewContainer.find(\".markdown-toc\").css(\"border\", \"none\");\n                    }\n                }\n\n                if (settings.tex)\n                {\n                    if (!editormd.kaTeXLoaded && settings.autoLoadModules)\n                    {\n                        editormd.loadKaTeX(function() {\n                            editormd.$katex = katex;\n                            editormd.kaTeXLoaded = true;\n                            _this.katexRender();\n                        });\n                    }\n                    else\n                    {\n                        editormd.$katex = katex;\n                        this.katexRender();\n                    }\n                }\n\n                // 渲染脑图\n                if(settings.mindMap){\n                    setTimeout(function(){\n                        _this.mindmapRender();\n                    },10)\n\n                }\n\n                if (settings.flowChart || settings.sequenceDiagram || settings.mermaid)\n                {\n                    flowchartTimer = setTimeout(function(){\n                        clearTimeout(flowchartTimer);\n                        _this.flowChartAndSequenceDiagramRender();\n                        flowchartTimer = null;\n                    }, 10);\n                }\n\n                if (state.loaded)\n                {\n                    $.proxy(settings.onchange, this)();\n                }\n            }\n\n            return this;\n        },\n\n        /**\n         * 聚焦光标位置\n         * Focusing the cursor position\n         *\n         * @returns {editormd}         返回editormd的实例对象\n         */\n\n        focus : function() {\n            this.cm.focus();\n\n            return this;\n        },\n\n        /**\n         * 设置光标的位置\n         * Set cursor position\n         *\n         * @param   {Object}    cursor 要设置的光标位置键值对象，例：{line:1, ch:0}\n         * @returns {editormd}         返回editormd的实例对象\n         */\n\n        setCursor : function(cursor) {\n            this.cm.setCursor(cursor);\n\n            return this;\n        },\n\n        /**\n         * 获取当前光标的位置\n         * Get the current position of the cursor\n         *\n         * @returns {Cursor}         返回一个光标Cursor对象\n         */\n\n        getCursor : function() {\n            return this.cm.getCursor();\n        },\n\n        /**\n         * 设置光标选中的范围\n         * Set cursor selected ranges\n         *\n         * @param   {Object}    from   开始位置的光标键值对象，例：{line:1, ch:0}\n         * @param   {Object}    to     结束位置的光标键值对象，例：{line:1, ch:0}\n         * @returns {editormd}         返回editormd的实例对象\n         */\n\n        setSelection : function(from, to) {\n\n            this.cm.setSelection(from, to);\n\n            return this;\n        },\n\n        /**\n         * 获取光标选中的文本\n         * Get the texts from cursor selected\n         *\n         * @returns {String}         返回选中文本的字符串形式\n         */\n\n        getSelection : function() {\n            return this.cm.getSelection();\n        },\n\n        /**\n         * 设置光标选中的文本范围\n         * Set the cursor selection ranges\n         *\n         * @param   {Array}    ranges  cursor selection ranges array\n         * @returns {Array}            return this\n         */\n\n        setSelections : function(ranges) {\n            this.cm.setSelections(ranges);\n\n            return this;\n        },\n\n        /**\n         * 获取光标选中的文本范围\n         * Get the cursor selection ranges\n         *\n         * @returns {Array}         return selection ranges array\n         */\n\n        getSelections : function() {\n            return this.cm.getSelections();\n        },\n\n        /**\n         * 替换当前光标选中的文本或在当前光标处插入新字符\n         * Replace the text at the current cursor selected or insert a new character at the current cursor position\n         *\n         * @param   {String}    value  要插入的字符值\n         * @returns {editormd}         返回editormd的实例对象\n         */\n\n        replaceSelection : function(value) {\n            this.cm.replaceSelection(value);\n\n            return this;\n        },\n\n        /**\n         * 在当前光标处插入新字符\n         * Insert a new character at the current cursor position\n         *\n         * 同replaceSelection()方法\n         * With the replaceSelection() method\n         *\n         * @param   {String}    value  要插入的字符值\n         * @returns {editormd}         返回editormd的实例对象\n         */\n\n        insertValue : function(value) {\n            this.replaceSelection(value);\n\n            return this;\n        },\n\n        /**\n         * 追加markdown\n         * append Markdown to editor\n         *\n         * @param   {String}    md     要追加的markdown源文档\n         * @returns {editormd}         返回editormd的实例对象\n         */\n\n        appendMarkdown : function(md) {\n            var settings = this.settings;\n            var cm       = this.cm;\n\n            cm.setValue(cm.getValue() + md);\n\n            return this;\n        },\n\n        /**\n         * 设置和传入编辑器的markdown源文档\n         * Set Markdown source document\n         *\n         * @param   {String}    md     要传入的markdown源文档\n         * @returns {editormd}         返回editormd的实例对象\n         */\n\n        setMarkdown : function(md) {\n            this.cm.setValue(md || this.settings.markdown);\n\n            return this;\n        },\n\n        /**\n         * 获取编辑器的markdown源文档\n         * Set Editor.md markdown/CodeMirror value\n         *\n         * @returns {editormd}         返回editormd的实例对象\n         */\n\n        getMarkdown : function() {\n            return this.cm.getValue();\n        },\n\n        /**\n         * 获取编辑器的源文档\n         * Get CodeMirror value\n         *\n         * @returns {editormd}         返回editormd的实例对象\n         */\n\n        getValue : function() {\n            return this.cm.getValue();\n        },\n\n        /**\n         * 设置编辑器的源文档\n         * Set CodeMirror value\n         *\n         * @param   {String}     value   set code/value/string/text\n         * @returns {editormd}           返回editormd的实例对象\n         */\n\n        setValue : function(value) {\n            this.cm.setValue(value);\n\n            return this;\n        },\n\n        /**\n         * 清空编辑器\n         * Empty CodeMirror editor container\n         *\n         * @returns {editormd}         返回editormd的实例对象\n         */\n\n        clear : function() {\n            this.cm.setValue(\"\");\n\n            return this;\n        },\n\n        /**\n         * 获取解析后存放在Textarea的HTML源码\n         * Get parsed html code from Textarea\n         *\n         * @returns {String}               返回HTML源码\n         */\n\n        getHTML : function() {\n            if (!this.settings.saveHTMLToTextarea)\n            {\n                alert(\"Error: settings.saveHTMLToTextarea == false\");\n\n                return false;\n            }\n\n            return this.htmlTextarea.val();\n        },\n\n        /**\n         * getHTML()的别名\n         * getHTML (alias)\n         *\n         * @returns {String}           Return html code 返回HTML源码\n         */\n\n        getTextareaSavedHTML : function() {\n            return this.getHTML();\n        },\n\n        /**\n         * 获取预览窗口的HTML源码\n         * Get html from preview container\n         *\n         * @returns {editormd}         返回editormd的实例对象\n         */\n\n        getPreviewedHTML : function() {\n            if (!this.settings.watch)\n            {\n                alert(\"Error: settings.watch == false\");\n\n                return false;\n            }\n\n            return this.previewContainer.html();\n        },\n\n        /**\n         * 开启实时预览\n         * Enable real-time watching\n         *\n         * @returns {editormd}         返回editormd的实例对象\n         */\n\n        watch : function(callback) {\n            var settings        = this.settings;\n\n            if ($.inArray(settings.mode, [\"gfm\", \"markdown\"]) < 0)\n            {\n                return this;\n            }\n\n            this.state.watching = settings.watch = true;\n            this.preview.show();\n\n            if (this.toolbar)\n            {\n                var watchIcon   = settings.toolbarIconsClass.watch;\n                var unWatchIcon = settings.toolbarIconsClass.unwatch;\n\n                var icon        = this.toolbar.find(\".fa[name=watch]\");\n                icon.parent().attr(\"title\", settings.lang.toolbar.watch);\n                icon.removeClass(unWatchIcon).addClass(watchIcon);\n            }\n\n            this.codeMirror.css(\"border-right\", \"1px solid #ddd\").width(this.editor.width() / 2);\n\n            timer = 0;\n\n            this.save().resize();\n\n            if (!settings.onwatch)\n            {\n                settings.onwatch = callback || function() {};\n            }\n\n            $.proxy(settings.onwatch, this)();\n\n            return this;\n        },\n\n        /**\n         * 关闭实时预览\n         * Disable real-time watching\n         *\n         * @returns {editormd}         返回editormd的实例对象\n         */\n\n        unwatch : function(callback) {\n            var settings        = this.settings;\n            this.state.watching = settings.watch = false;\n            this.preview.hide();\n\n            if (this.toolbar)\n            {\n                var watchIcon   = settings.toolbarIconsClass.watch;\n                var unWatchIcon = settings.toolbarIconsClass.unwatch;\n\n                var icon    = this.toolbar.find(\".fa[name=watch]\");\n                icon.parent().attr(\"title\", settings.lang.toolbar.unwatch);\n                icon.removeClass(watchIcon).addClass(unWatchIcon);\n            }\n\n            this.codeMirror.css(\"border-right\", \"none\").width(this.editor.width());\n\n            this.resize();\n\n            if (!settings.onunwatch)\n            {\n                settings.onunwatch = callback || function() {};\n            }\n\n            $.proxy(settings.onunwatch, this)();\n\n            return this;\n        },\n\n        /**\n         * 显示编辑器\n         * Show editor\n         *\n         * @param   {Function} [callback=function()] 回调函数\n         * @returns {editormd}                       返回editormd的实例对象\n         */\n\n        show : function(callback) {\n            callback  = callback || function() {};\n\n            var _this = this;\n            this.editor.show(0, function() {\n                $.proxy(callback, _this)();\n            });\n\n            return this;\n        },\n\n        /**\n         * 隐藏编辑器\n         * Hide editor\n         *\n         * @param   {Function} [callback=function()] 回调函数\n         * @returns {editormd}                       返回editormd的实例对象\n         */\n\n        hide : function(callback) {\n            callback  = callback || function() {};\n\n            var _this = this;\n            this.editor.hide(0, function() {\n                $.proxy(callback, _this)();\n            });\n\n            return this;\n        },\n\n        /**\n         * 隐藏编辑器部分，只预览HTML\n         * Enter preview html state\n         *\n         * @returns {editormd}         返回editormd的实例对象\n         */\n\n        previewing : function() {\n\n            var _this            = this;\n            var editor           = this.editor;\n            var preview          = this.preview;\n            var toolbar          = this.toolbar;\n            var settings         = this.settings;\n            var codeMirror       = this.codeMirror;\n            var previewContainer = this.previewContainer;\n\n            if ($.inArray(settings.mode, [\"gfm\", \"markdown\"]) < 0) {\n                return this;\n            }\n\n            if (settings.toolbar && toolbar) {\n                toolbar.toggle();\n                toolbar.find(\".fa[name=preview]\").toggleClass(\"active\");\n            }\n\n            codeMirror.toggle();\n\n            var escHandle = function(event) {\n                if (event.shiftKey && event.keyCode === 27) {\n                    _this.previewed();\n                }\n            };\n\n            if (codeMirror.css(\"display\") === \"none\") // 为了兼容Zepto，而不使用codeMirror.is(\":hidden\")\n            {\n                this.state.preview = true;\n\n                if (this.state.fullscreen) {\n                    preview.css(\"background\", \"#fff\");\n                }\n\n                editor.find(\".\" + this.classPrefix + \"preview-close-btn\").show().bind(editormd.mouseOrTouch(\"click\", \"touchend\"), function(){\n                    _this.previewed();\n                });\n\n                if (!settings.watch)\n                {\n                    this.save();\n                }\n                else\n                {\n                    previewContainer.css(\"padding\", \"\");\n                }\n\n                previewContainer.addClass(this.classPrefix + \"preview-active\");\n\n                preview.show().css({\n                    position  : \"\",\n                    top       : 0,\n                    width     : editor.width(),\n                    height    : (settings.autoHeight && !this.state.fullscreen) ? \"auto\" : editor.height()\n                });\n\n                if (this.state.loaded)\n                {\n                    $.proxy(settings.onpreviewing, this)();\n                }\n\n                $(window).bind(\"keyup\", escHandle);\n            }\n            else\n            {\n                $(window).unbind(\"keyup\", escHandle);\n                this.previewed();\n            }\n        },\n\n        /**\n         * 显示编辑器部分，退出只预览HTML\n         * Exit preview html state\n         *\n         * @returns {editormd}         返回editormd的实例对象\n         */\n\n        previewed : function() {\n\n            var editor           = this.editor;\n            var preview          = this.preview;\n            var toolbar          = this.toolbar;\n            var settings         = this.settings;\n            var previewContainer = this.previewContainer;\n            var previewCloseBtn  = editor.find(\".\" + this.classPrefix + \"preview-close-btn\");\n\n            this.state.preview   = false;\n\n            this.codeMirror.show();\n\n            if (settings.toolbar) {\n                toolbar.show();\n            }\n\n            preview[(settings.watch) ? \"show\" : \"hide\"]();\n\n            previewCloseBtn.hide().unbind(editormd.mouseOrTouch(\"click\", \"touchend\"));\n\n            previewContainer.removeClass(this.classPrefix + \"preview-active\");\n\n            if (settings.watch)\n            {\n                previewContainer.css(\"padding\", \"20px\");\n            }\n\n            preview.css({\n                background : null,\n                position   : \"absolute\",\n                width      : editor.width() / 2,\n                height     : (settings.autoHeight && !this.state.fullscreen) ? \"auto\" : editor.height() - toolbar.height(),\n                top        : (settings.toolbar)    ? toolbar.height() : 0\n            });\n\n            if (this.state.loaded)\n            {\n                $.proxy(settings.onpreviewed, this)();\n            }\n\n            return this;\n        },\n\n        /**\n         * 编辑器全屏显示\n         * Fullscreen show\n         *\n         * @returns {editormd}         返回editormd的实例对象\n         */\n\n        fullscreen : function() {\n\n            var _this            = this;\n            var state            = this.state;\n            var editor           = this.editor;\n            var preview          = this.preview;\n            var toolbar          = this.toolbar;\n            var settings         = this.settings;\n            var fullscreenClass  = this.classPrefix + \"fullscreen\";\n\n            if (toolbar) {\n                toolbar.find(\".fa[name=fullscreen]\").parent().toggleClass(\"active\");\n            }\n\n            var escHandle = function(event) {\n                if (!event.shiftKey && event.keyCode === 27)\n                {\n                    if (state.fullscreen)\n                    {\n                        _this.fullscreenExit();\n                    }\n                }\n            };\n\n            if (!editor.hasClass(fullscreenClass))\n            {\n                state.fullscreen = true;\n\n                $(\"html,body\").css(\"overflow\", \"hidden\");\n\n                editor.css({\n                    width    : $(window).width(),\n                    height   : $(window).height()\n                }).addClass(fullscreenClass);\n\n                this.resize();\n\n                $.proxy(settings.onfullscreen, this)();\n\n                $(window).bind(\"keyup\", escHandle);\n            }\n            else\n            {\n                $(window).unbind(\"keyup\", escHandle);\n                this.fullscreenExit();\n            }\n\n            return this;\n        },\n\n        /**\n         * 编辑器退出全屏显示\n         * Exit fullscreen state\n         *\n         * @returns {editormd}         返回editormd的实例对象\n         */\n\n        fullscreenExit : function() {\n\n            var editor            = this.editor;\n            var settings          = this.settings;\n            var toolbar           = this.toolbar;\n            var fullscreenClass   = this.classPrefix + \"fullscreen\";\n\n            this.state.fullscreen = false;\n\n            if (toolbar) {\n                toolbar.find(\".fa[name=fullscreen]\").parent().removeClass(\"active\");\n            }\n\n            $(\"html,body\").css(\"overflow\", \"\");\n\n            editor.css({\n                width    : editor.data(\"oldWidth\"),\n                height   : editor.data(\"oldHeight\")\n            }).removeClass(fullscreenClass);\n\n            this.resize();\n\n            $.proxy(settings.onfullscreenExit, this)();\n\n            return this;\n        },\n\n        /**\n         * 加载并执行插件\n         * Load and execute the plugin\n         *\n         * @param   {String}     name    plugin name / function name\n         * @param   {String}     path    plugin load path\n         * @returns {editormd}           返回editormd的实例对象\n         */\n\n        executePlugin : function(name, path) {\n\n            var _this    = this;\n            var cm       = this.cm;\n            var settings = this.settings;\n\n            path = settings.pluginPath + path;\n\n            if (typeof define === \"function\")\n            {\n                if (typeof this[name] === \"undefined\")\n                {\n                    alert(\"Error: \" + name + \" plugin is not found, you are not load this plugin.\");\n\n                    return this;\n                }\n\n                this[name](cm);\n\n                return this;\n            }\n\n            if ($.inArray(path, editormd.loadFiles.plugin) < 0)\n            {\n                editormd.loadPlugin(path, function() {\n                    editormd.loadPlugins[name] = _this[name];\n                    _this[name](cm);\n                });\n            }\n            else\n            {\n                $.proxy(editormd.loadPlugins[name], this)(cm);\n            }\n\n            return this;\n        },\n\n        /**\n         * 搜索替换\n         * Search & replace\n         *\n         * @param   {String}     command    CodeMirror serach commands, \"find, fintNext, fintPrev, clearSearch, replace, replaceAll\"\n         * @returns {editormd}              return this\n         */\n\n        search : function(command) {\n            var settings = this.settings;\n\n            if (!settings.searchReplace)\n            {\n                alert(\"Error: settings.searchReplace == false\");\n                return this;\n            }\n\n            if (!settings.readOnly)\n            {\n                this.cm.execCommand(command || \"find\");\n            }\n\n            return this;\n        },\n\n        searchReplace : function() {\n            this.search(\"replace\");\n\n            return this;\n        },\n\n        searchReplaceAll : function() {\n            this.search(\"replaceAll\");\n\n            return this;\n        }\n    };\n\n    editormd.fn.init.prototype = editormd.fn;\n\n    /**\n     * 锁屏\n     * lock screen when dialog opening\n     *\n     * @returns {void}\n     */\n\n    editormd.dialogLockScreen = function() {\n        var settings = this.settings || {dialogLockScreen : true};\n\n        if (settings.dialogLockScreen)\n        {\n            $(\"html,body\").css(\"overflow\", \"hidden\");\n            this.resize();\n        }\n    };\n\n    /**\n     * 显示透明背景层\n     * Display mask layer when dialog opening\n     *\n     * @param   {Object}     dialog    dialog jQuery object\n     * @returns {void}\n     */\n\n    editormd.dialogShowMask = function(dialog) {\n        var editor   = this.editor;\n        var settings = this.settings || {dialogShowMask : true};\n\n        dialog.css({\n            top  : ($(window).height() - dialog.height()) / 2 + \"px\",\n            left : ($(window).width()  - dialog.width())  / 2 + \"px\"\n        });\n\n        if (settings.dialogShowMask) {\n            editor.children(\".\" + this.classPrefix + \"mask\").css(\"z-index\", parseInt(dialog.css(\"z-index\")) - 1).show();\n        }\n    };\n\n    editormd.toolbarHandlers = {\n        undo : function() {\n            this.cm.undo();\n        },\n\n        redo : function() {\n            this.cm.redo();\n        },\n\n        bold : function() {\n            var cm        = this.cm;\n            var cursor    = cm.getCursor();\n            var selection = cm.getSelection();\n\n            cm.replaceSelection(\"**\" + selection + \"**\");\n\n            if(selection === \"\") {\n                cm.setCursor(cursor.line, cursor.ch + 2);\n            }\n        },\n\n        del : function() {\n            var cm        = this.cm;\n            var cursor    = cm.getCursor();\n            var selection = cm.getSelection();\n\n            cm.replaceSelection(\"~~\" + selection + \"~~\");\n\n            if(selection === \"\") {\n                cm.setCursor(cursor.line, cursor.ch + 2);\n            }\n        },\n\n        italic : function() {\n            var cm        = this.cm;\n            var cursor    = cm.getCursor();\n            var selection = cm.getSelection();\n\n            cm.replaceSelection(\"*\" + selection + \"*\");\n\n            if(selection === \"\") {\n                cm.setCursor(cursor.line, cursor.ch + 1);\n            }\n        },\n\n        quote : function() {\n            var cm        = this.cm;\n            var cursor    = cm.getCursor();\n            var selection = cm.getSelection();\n\n            if (cursor.ch !== 0)\n            {\n                cm.setCursor(cursor.line, 0);\n                cm.replaceSelection(\"> \" + selection);\n                cm.setCursor(cursor.line, cursor.ch + 2);\n            }\n            else\n            {\n                cm.replaceSelection(\"> \" + selection);\n            }\n\n            //cm.replaceSelection(\"> \" + selection);\n            //cm.setCursor(cursor.line, (selection === \"\") ? cursor.ch + 2 : cursor.ch + selection.length + 2);\n        },\n\n        ucfirst : function() {\n            var cm         = this.cm;\n            var selection  = cm.getSelection();\n            var selections = cm.listSelections();\n\n            cm.replaceSelection(editormd.firstUpperCase(selection));\n            cm.setSelections(selections);\n        },\n\n        ucwords : function() {\n            var cm         = this.cm;\n            var selection  = cm.getSelection();\n            var selections = cm.listSelections();\n\n            cm.replaceSelection(editormd.wordsFirstUpperCase(selection));\n            cm.setSelections(selections);\n        },\n\n        uppercase : function() {\n            var cm         = this.cm;\n            var selection  = cm.getSelection();\n            var selections = cm.listSelections();\n\n            cm.replaceSelection(selection.toUpperCase());\n            cm.setSelections(selections);\n        },\n\n        lowercase : function() {\n            var cm         = this.cm;\n            var cursor     = cm.getCursor();\n            var selection  = cm.getSelection();\n            var selections = cm.listSelections();\n\n            cm.replaceSelection(selection.toLowerCase());\n            cm.setSelections(selections);\n        },\n\n        h1 : function() {\n            var cm        = this.cm;\n            var cursor    = cm.getCursor();\n            var selection = cm.getLine(cursor.line);\n            var patt1=new RegExp(\"^#{1}[ ]\");//如果存在H1\n            var patt2=new RegExp(\"^#{1,6}[ ]\");//如果存在H2-H6\n            //如果存在H1,取消H1的设置\n            if (patt1.test(selection)===true){\n                selection=selection.replace(/^#{1}[ ]/,\"\");\n                cm.setSelection({line:cursor.line, ch:0}, {line:cursor.line+1, ch:0 });\n                cm.replaceSelection(selection+\"\\n\");\n                cm.setCursor(cursor.line, cursor.ch -2);\n            }\n            //如果存在H1-H6,取消H2-H6,并替换为H1\n            else if(patt2.test(selection)===true){\n                selection=selection.replace(/^#{1,6}[ ]/,\"\");\n                cm.setSelection({line:cursor.line, ch:0}, {line:cursor.line+1, ch:0 });\n                cm.replaceSelection(\"# \"+selection+\"\\n\");\n                cm.setCursor(cursor.line, cursor.ch +2);\n\n            }else\n            //设置为H1\n            {\n                cm.setSelection({line:cursor.line, ch:0}, {line:cursor.line+1, ch:0 });\n                cm.replaceSelection(\"# \"+selection+\"\\n\");\n                cm.setCursor(cursor.line, cursor.ch +2);\n            }\n        },\n\n        h2 : function() {\n            var cm        = this.cm;\n            var cursor    = cm.getCursor();\n            var selection = cm.getLine(cursor.line);\n            var patt1=new RegExp(\"^#{2}[ ]\");//如果存在H1\n            var patt2=new RegExp(\"^#{1,6}[ ]\");//如果存在H1-H6\n            //如果存在H2,取消H2的设置\n            if (patt1.test(selection)===true){\n                selection=selection.replace(/^#{2}[ ]/,\"\");\n                cm.setSelection({line:cursor.line, ch:0}, {line:cursor.line+1, ch:0 });\n                cm.replaceSelection(selection+\"\\n\");\n                cm.setCursor(cursor.line, cursor.ch -3);\n            }else if(patt2.test(selection)===true){\n                selection=selection.replace(/^#{1,6}[ ]/,\"\");\n                cm.setSelection({line:cursor.line, ch:0}, {line:cursor.line+1, ch:0 });\n                cm.replaceSelection(\"## \"+selection+\"\\n\");\n                cm.setCursor(cursor.line, cursor.ch +3);\n\n            }else{\n                cm.setSelection({line:cursor.line, ch:0}, {line:cursor.line+1, ch:0 });\n                cm.replaceSelection(\"## \"+selection+\"\\n\");\n                cm.setCursor(cursor.line, cursor.ch +3);\n            }\n        },\n\n        h3 : function() {\n            var cm        = this.cm;\n            var cursor    = cm.getCursor();\n            var selection = cm.getLine(cursor.line);\n            var patt1=new RegExp(\"^#{3}[ ]\");//如果存在H3\n            var patt2=new RegExp(\"^#{1,6}[ ]\");//如果存在H1-H6\n            //如果存在H3,取消H3的设置\n            if (patt1.test(selection)===true){\n                selection=selection.replace(/^#{3}[ ]/,\"\");\n                cm.setSelection({line:cursor.line, ch:0}, {line:cursor.line+1, ch:0 });\n                cm.replaceSelection(selection+\"\\n\");\n                cm.setCursor(cursor.line, cursor.ch -4);\n            }\n            //如果存在H1-H6,取消H1-H6,并替换为H3\n            else if(patt2.test(selection)===true){\n                selection=selection.replace(/^#{1,6}[ ]/,\"\");\n                cm.setSelection({line:cursor.line, ch:0}, {line:cursor.line+1, ch:0 });\n                cm.replaceSelection(\"### \"+selection+\"\\n\");\n                cm.setCursor(cursor.line, cursor.ch +4);\n\n            }else\n            //设置为H3\n            {\n                cm.setSelection({line:cursor.line, ch:0}, {line:cursor.line+1, ch:0 });\n                cm.replaceSelection(\"### \"+selection+\"\\n\");\n                cm.setCursor(cursor.line, cursor.ch +4);\n            }\n        },\n\n        h4 : function() {\n            var cm        = this.cm;\n            var cursor    = cm.getCursor();\n            var selection = cm.getLine(cursor.line);\n            var patt1=new RegExp(\"^#{4}[ ]\");//如果存在H4\n            var patt2=new RegExp(\"^#{1,6}[ ]\");//如果存在H1-H6\n            //如果存在H4,取消H4的设置\n            if (patt1.test(selection)===true){\n                selection=selection.replace(/^#{4}[ ]/,\"\");\n                cm.setSelection({line:cursor.line, ch:0}, {line:cursor.line+1, ch:0 });\n                cm.replaceSelection(selection+\"\\n\");\n                cm.setCursor(cursor.line, cursor.ch -5);\n            }\n            //如果存在H1-H6,取消H1-H6,并替换为H4\n            else if(patt2.test(selection)===true){\n                selection=selection.replace(/^#{1,6}[ ]/,\"\");\n                cm.setSelection({line:cursor.line, ch:0}, {line:cursor.line+1, ch:0 });\n                cm.replaceSelection(\"#### \"+selection+\"\\n\");\n                cm.setCursor(cursor.line, cursor.ch +5);\n\n            }else\n            //设置为H4\n            {\n                cm.setSelection({line:cursor.line, ch:0}, {line:cursor.line+1, ch:0 });\n                cm.replaceSelection(\"#### \"+selection+\"\\n\");\n                cm.setCursor(cursor.line, cursor.ch +5);\n            }\n        },\n\n        h5 : function() {\n            var cm        = this.cm;\n            var cursor    = cm.getCursor();\n            var selection = cm.getLine(cursor.line);\n            var patt1=new RegExp(\"^#{5}[ ]\");//如果存在H5\n            var patt2=new RegExp(\"^#{1,6}[ ]\");//如果存在H1-H6\n            //如果存在H5,取消H5的设置\n            if (patt1.test(selection)===true){\n                selection=selection.replace(/^#{5}[ ]/,\"\");\n                cm.setSelection({line:cursor.line, ch:0}, {line:cursor.line+1, ch:0 });\n                cm.replaceSelection(selection+\"\\n\");\n                cm.setCursor(cursor.line, cursor.ch -6);\n            }\n            //如果存在H1-H6,取消H1-H6,并替换为H5\n            else if(patt2.test(selection)===true){\n                selection=selection.replace(/^#{1,6}[ ]/,\"\");\n                cm.setSelection({line:cursor.line, ch:0}, {line:cursor.line+1, ch:0 });\n                cm.replaceSelection(\"##### \"+selection+\"\\n\");\n                cm.setCursor(cursor.line, cursor.ch +6);\n\n            }else\n            //设置为H5\n            {\n                cm.setSelection({line:cursor.line, ch:0}, {line:cursor.line+1, ch:0 });\n                cm.replaceSelection(\"##### \"+selection+\"\\n\");\n                cm.setCursor(cursor.line, cursor.ch +6);\n            }\n        },\n\n        h6 : function() {\n            var cm        = this.cm;\n            var cursor    = cm.getCursor();\n            var selection = cm.getLine(cursor.line);\n            var patt1=new RegExp(\"^#{6}[ ]\");//如果存在H6\n            var patt2=new RegExp(\"^#{1,6}[ ]\");//如果存在H1-H6\n            //如果存在H6,取消H6的设置\n            if (patt1.test(selection)===true){\n                selection=selection.replace(/^#{6}[ ]/,\"\");\n                cm.setSelection({line:cursor.line, ch:0}, {line:cursor.line+1, ch:0 });\n                cm.replaceSelection(selection+\"\\n\");\n                cm.setCursor(cursor.line, cursor.ch -7);\n            }\n            //如果存在H1-H6,取消H1-H6,并替换为H6\n            else if(patt2.test(selection)===true){\n                selection=selection.replace(/^#{1,6}[ ]/,\"\");\n                cm.setSelection({line:cursor.line, ch:0}, {line:cursor.line+1, ch:0 });\n                cm.replaceSelection(\"###### \"+selection+\"\\n\");\n                cm.setCursor(cursor.line, cursor.ch +7);\n\n            }else\n            //设置为H6\n            {\n                cm.setSelection({line:cursor.line, ch:0}, {line:cursor.line+1, ch:0 });\n                cm.replaceSelection(\"###### \"+selection+\"\\n\");\n                cm.setCursor(cursor.line, cursor.ch +7);\n            }\n        },\n\n        \"list-ul\" : function() {\n            var cm        = this.cm;\n            var cursor    = cm.getCursor();\n            var selection = cm.getSelection();\n            var patt1=new RegExp(\"^-{1}[ ]\");\n            var cnt =0;\n            //如果未选择，将该行设置为无序列表\n            if (selection === \"\")\n            {\n                cm.setCursor(cursor.line, 0);\n                cm.replaceSelection(\"- \" + selection);\n                cm.setCursor(cursor.line, cursor.ch + 2);\n            }\n            else\n            {\n                var selectionText = selection.split(\"\\n\");\n                //判断取中内容是否已作无序列表标记\n                for (var i = 0, len = selectionText.length; i < len; i++)\n                {\n                    if (patt1.test(selectionText[i])===true ){cnt++;}\n                }\n                //如果全作了无序列表标记，取消标记\n                if(cnt===selectionText.length){\n                    for (var i = 0, len = selectionText.length; i < len; i++){\n                        selectionText[i] = (selectionText[i] === \"\") ? \"\" : selectionText[i].replace(/^-{1}[ ]/,\"\");\n                    }\n                }else\n                //对未打上无序列表标记，打上标记\n                {\n                    for (var i = 0, len = selectionText.length; i < len; i++){\n                        selectionText[i] = (selectionText[i] === \"\") ? \"\" : \"- \"+selectionText[i].replace(/^-{1}[ ]/,\"\");\n                    }\n\n                }\n                cm.replaceSelection(selectionText.join(\"\\n\"));\n            }\n        },\n\n        \"list-ol\" : function() {\n            var cm        = this.cm;\n            var cursor    = cm.getCursor();\n            var selection = cm.getSelection();\n            var patt1=new RegExp(\"^[0-9]+[\\.][ ]\");\n            var cnt =0;\n            //如果未选择，将该行设置为有序列表\n            if (selection === \"\")\n            {\n                cm.setCursor(cursor.line, 0);\n                cm.replaceSelection(\"1. \" + selection);\n                cm.setCursor(cursor.line, cursor.ch + 3);\n            }\n            else\n            {\n                var selectionText = selection.split(\"\\n\");\n                //判断取中内容是否已作有序列表标记\n                for (var i = 0, len = selectionText.length; i < len; i++)\n                {\n                    if (patt1.test(selectionText[i])===true ){cnt++;}\n                }\n                //如果全作了有序列表标记，取消标记\n                if(cnt===selectionText.length){\n                    for (var i = 0, len = selectionText.length; i < len; i++){\n                        selectionText[i] = (selectionText[i] === \"\") ? \"\" : selectionText[i].replace(/^[0-9]+[\\.][ ]/,\"\");\n                    }\n                }else\n                //对未打上有序列表标记，打上标记\n                {\n                    for (var i = 0, len = selectionText.length; i < len; i++){\n                        selectionText[i] = (selectionText[i] === \"\") ? \"\" : (i+1)+\". \"+selectionText[i].replace(/^[0-9]+[\\.][ ]/,\"\");\n                    }\n\n                }\n                cm.replaceSelection(selectionText.join(\"\\n\"));\n            }\n        },\n\n        hr : function() {\n            var cm        = this.cm;\n            var cursor    = cm.getCursor();\n            var selection = cm.getSelection();\n\n            cm.replaceSelection(((cursor.ch !== 0) ? \"\\n\\n\" : \"\\n\") + \"------------\\n\\n\");\n        },\n\n        tex : function() {\n            if (!this.settings.tex)\n            {\n                alert(\"settings.tex === false\");\n                return this;\n            }\n\n            var cm        = this.cm;\n            var cursor    = cm.getCursor();\n            var selection = cm.getSelection();\n\n            cm.replaceSelection(\"$$\" + selection + \"$$\");\n\n            if(selection === \"\") {\n                cm.setCursor(cursor.line, cursor.ch + 2);\n            }\n        },\n\n        link : function() {\n            this.executePlugin(\"linkDialog\", \"link-dialog/link-dialog\");\n        },\n\n        \"reference-link\" : function() {\n            this.executePlugin(\"referenceLinkDialog\", \"reference-link-dialog/reference-link-dialog\");\n        },\n\n        pagebreak : function() {\n            if (!this.settings.pageBreak)\n            {\n                alert(\"settings.pageBreak === false\");\n                return this;\n            }\n\n            var cm        = this.cm;\n            var selection = cm.getSelection();\n\n            cm.replaceSelection(\"\\r\\n[========]\\r\\n\");\n        },\n\n        image : function() {\n            this.executePlugin(\"imageDialog\", \"image-dialog/image-dialog\");\n        },\n\n        code : function() {\n            var cm        = this.cm;\n            var cursor    = cm.getCursor();\n            var selection = cm.getSelection();\n\n            cm.replaceSelection(\"`\" + selection + \"`\");\n\n            if (selection === \"\") {\n                cm.setCursor(cursor.line, cursor.ch + 1);\n            }\n        },\n\n        \"code-block\" : function() {\n            this.executePlugin(\"codeBlockDialog\", \"code-block-dialog/code-block-dialog\");\n        },\n\n        \"preformatted-text\" : function() {\n            this.executePlugin(\"preformattedTextDialog\", \"preformatted-text-dialog/preformatted-text-dialog\");\n        },\n\n        table : function() {\n            this.executePlugin(\"tableDialog\", \"table-dialog/table-dialog\");\n        },\n\n        datetime : function() {\n            var cm        = this.cm;\n            var selection = cm.getSelection();\n            var date      = new Date();\n            var langName  = this.settings.lang.name;\n            var datefmt   = editormd.dateFormat() + \" \" + editormd.dateFormat((langName === \"zh-cn\" || langName === \"zh-tw\") ? \"cn-week-day\" : \"week-day\");\n\n            cm.replaceSelection(datefmt);\n        },\n\n        emoji : function() {\n            this.executePlugin(\"emojiDialog\", \"emoji-dialog/emoji-dialog\");\n        },\n\n        \"html-entities\" : function() {\n            this.executePlugin(\"htmlEntitiesDialog\", \"html-entities-dialog/html-entities-dialog\");\n        },\n\n        \"goto-line\" : function() {\n            this.executePlugin(\"gotoLineDialog\", \"goto-line-dialog/goto-line-dialog\");\n        },\n\n        watch : function() {\n            this[this.settings.watch ? \"unwatch\" : \"watch\"]();\n        },\n\n        preview : function() {\n            this.previewing();\n        },\n\n        fullscreen : function() {\n            this.fullscreen();\n        },\n\n        clear : function() {\n            this.clear();\n        },\n\n        search : function() {\n            this.search();\n        },\n\n        help : function() {\n            this.executePlugin(\"helpDialog\", \"help-dialog/help-dialog\");\n        },\n\n        changetheme : function() {\n            this.setEditorTheme((this.settings.editorTheme==\"default\")?\"pastel-on-dark\":\"default\");\n            this.setPreviewTheme((this.settings.previewTheme==\"\")?\"dark\":\"\");\n        },\n\n        info : function() {\n            this.showInfoDialog();\n        }\n    };\n\n    editormd.keyMaps = {\n        \"Ctrl-1\"       : \"h1\",\n        \"Ctrl-2\"       : \"h2\",\n        \"Ctrl-3\"       : \"h3\",\n        \"Ctrl-4\"       : \"h4\",\n        \"Ctrl-5\"       : \"h5\",\n        \"Ctrl-6\"       : \"h6\",\n        \"Ctrl-B\"       : \"bold\",  // if this is string ==  editormd.toolbarHandlers.xxxx\n        \"Ctrl-D\"       : \"datetime\",\n\n        \"Ctrl-E\"       : function() { // emoji\n            var cm        = this.cm;\n            var cursor    = cm.getCursor();\n            var selection = cm.getSelection();\n\n            if (!this.settings.emoji)\n            {\n                alert(\"Error: settings.emoji == false\");\n                return ;\n            }\n\n            cm.replaceSelection(\":\" + selection + \":\");\n\n            if (selection === \"\") {\n                cm.setCursor(cursor.line, cursor.ch + 1);\n            }\n        },\n        \"Ctrl-Alt-G\"   : \"goto-line\",\n        \"Ctrl-H\"       : \"hr\",\n        \"Ctrl-I\"       : \"italic\",\n        \"Ctrl-K\"       : \"code\",\n\n        \"Ctrl-L\"        : function() {\n            var cm        = this.cm;\n            var cursor    = cm.getCursor();\n            var selection = cm.getSelection();\n\n            var title = (selection === \"\") ? \"\" : \" \\\"\"+selection+\"\\\"\";\n\n            cm.replaceSelection(\"[\" + selection + \"](\"+title+\")\");\n\n            if (selection === \"\") {\n                cm.setCursor(cursor.line, cursor.ch + 1);\n            }\n        },\n        \"Ctrl-U\"         : \"list-ul\",\n\n        \"Shift-Ctrl-A\"   : function() {\n            var cm        = this.cm;\n            var cursor    = cm.getCursor();\n            var selection = cm.getSelection();\n\n            if (!this.settings.atLink)\n            {\n                alert(\"Error: settings.atLink == false\");\n                return ;\n            }\n\n            cm.replaceSelection(\"@\" + selection);\n\n            if (selection === \"\") {\n                cm.setCursor(cursor.line, cursor.ch + 1);\n            }\n        },\n\n        \"Shift-Ctrl-C\"     : \"code\",\n        \"Shift-Ctrl-Q\"     : \"quote\",\n        \"Shift-Ctrl-S\"     : \"del\",\n        \"Shift-Ctrl-K\"     : \"tex\",  // KaTeX\n\n        \"Shift-Alt-C\"      : function() {\n            var cm        = this.cm;\n            var cursor    = cm.getCursor();\n            var selection = cm.getSelection();\n\n            cm.replaceSelection([\"```\", selection, \"```\"].join(\"\\n\"));\n\n            if (selection === \"\") {\n                cm.setCursor(cursor.line, cursor.ch + 3);\n            }\n        },\n\n        \"Shift-Ctrl-Alt-C\" : \"code-block\",\n        \"Shift-Ctrl-H\"     : \"html-entities\",\n        \"Shift-Alt-H\"      : \"help\",\n        \"Shift-Ctrl-E\"     : \"emoji\",\n        \"Shift-Ctrl-U\"     : \"uppercase\",\n        \"Shift-Alt-U\"      : \"ucwords\",\n        \"Shift-Ctrl-Alt-U\" : \"ucfirst\",\n        \"Shift-Alt-L\"      : \"lowercase\",\n\n        \"Shift-Ctrl-I\"     : function() {\n            var cm        = this.cm;\n            var cursor    = cm.getCursor();\n            var selection = cm.getSelection();\n\n            var title = (selection === \"\") ? \"\" : \" \\\"\"+selection+\"\\\"\";\n\n            cm.replaceSelection(\"![\" + selection + \"](\"+title+\")\");\n\n            if (selection === \"\") {\n                cm.setCursor(cursor.line, cursor.ch + 4);\n            }\n        },\n\n        \"Shift-Ctrl-Alt-I\" : \"image\",\n        \"Shift-Ctrl-L\"     : \"link\",\n        \"Shift-Ctrl-O\"     : \"list-ol\",\n        \"Shift-Ctrl-P\"     : \"preformatted-text\",\n        \"Shift-Ctrl-T\"     : \"table\",\n        \"Shift-Alt-P\"      : \"pagebreak\",\n        \"F9\"               : \"watch\",\n        \"F10\"              : \"preview\",\n        \"F11\"              : \"fullscreen\",\n    };\n\n    /**\n     * 清除字符串两边的空格\n     * Clear the space of strings both sides.\n     *\n     * @param   {String}    str            string\n     * @returns {String}                   trimed string\n     */\n\n    var trim = function(str) {\n        return (!String.prototype.trim) ? str.replace(/^[\\s\\uFEFF\\xA0]+|[\\s\\uFEFF\\xA0]+$/g, \"\") : str.trim();\n    };\n\n    editormd.trim = trim;\n\n    /**\n     * 所有单词首字母大写\n     * Words first to uppercase\n     *\n     * @param   {String}    str            string\n     * @returns {String}                   string\n     */\n\n    var ucwords = function (str) {\n        return str.toLowerCase().replace(/\\b(\\w)|\\s(\\w)/g, function($1) {\n            return $1.toUpperCase();\n        });\n    };\n\n    editormd.ucwords = editormd.wordsFirstUpperCase = ucwords;\n\n    /**\n     * 字符串首字母大写\n     * Only string first char to uppercase\n     *\n     * @param   {String}    str            string\n     * @returns {String}                   string\n     */\n\n    var firstUpperCase = function(str) {\n        return str.toLowerCase().replace(/\\b(\\w)/, function($1){\n            return $1.toUpperCase();\n        });\n    };\n\n    var ucfirst = firstUpperCase;\n\n    editormd.firstUpperCase = editormd.ucfirst = firstUpperCase;\n\n    editormd.urls = {\n        atLinkBase : \"https://github.com/\"\n    };\n\n    editormd.regexs = {\n        atLink        : /@(\\w+)/g,\n        email         : /(\\w+)@(\\w+)\\.(\\w+)\\.?(\\w+)?/g,\n        emailLink     : /(mailto:)?([\\w\\.\\_]+)@(\\w+)\\.(\\w+)\\.?(\\w+)?/g,\n        emoji         : /:([\\w\\+-]+):/g,\n        emojiDatetime : /(\\d{2}:\\d{2}:\\d{2})/g,\n        twemoji       : /:(tw-([\\w]+)-?(\\w+)?):/g,\n        fontAwesome   : /:(fa-([\\w]+)(-(\\w+)){0,}):/g,\n        editormdLogo  : /:(editormd-logo-?(\\w+)?):/g,\n        pageBreak     : /^\\[[=]{8,}\\]$/\n    };\n\n    // Emoji graphics files url path\n    editormd.emoji     = {\n        path  : \"http://www.emoji-cheat-sheet.com/graphics/emojis/\",\n        ext   : \".png\"\n    };\n\n    // Twitter Emoji (Twemoji)  graphics files url path\n    editormd.twemoji = {\n        path : \"http://twemoji.maxcdn.com/36x36/\",\n        ext  : \".png\"\n    };\n\n    /**\n     * 自定义marked的解析器\n     * Custom Marked renderer rules\n     *\n     * @param   {Array}    markdownToC     传入用于接收TOC的数组\n     * @returns {Renderer} markedRenderer  返回marked的Renderer自定义对象\n     */\n\n    editormd.markedRenderer = function(markdownToC, options) {\n        var defaults = {\n            toc                  : true,           // Table of contents\n            tocm                 : false,\n            tocStartLevel        : 1,              // Said from H1 to create ToC\n            pageBreak            : true,\n            atLink               : true,           // for @link\n            emailLink            : true,           // for mail address auto link\n            taskList             : false,          // Enable Github Flavored Markdown task lists\n            emoji                : false,          // :emoji: , Support Twemoji, fontAwesome, Editor.md logo emojis.\n            tex                  : false,          // TeX(LaTeX), based on KaTeX\n            flowChart            : false,          // flowChart.js only support IE9+\n            sequenceDiagram      : false,          // sequenceDiagram.js only support IE9+\n            mermaid              : true,\n        };\n\n        var settings        = $.extend(defaults, options || {});\n        var marked          = editormd.$marked;\n        var markedRenderer  = new marked.Renderer();\n        markdownToC         = markdownToC || [];\n\n        var regexs          = editormd.regexs;\n        var atLinkReg       = regexs.atLink;\n        var emojiReg        = regexs.emoji;\n        var emailReg        = regexs.email;\n        var emailLinkReg    = regexs.emailLink;\n        var twemojiReg      = regexs.twemoji;\n        var faIconReg       = regexs.fontAwesome;\n        var editormdLogoReg = regexs.editormdLogo;\n        var pageBreakReg    = regexs.pageBreak;\n\n        markedRenderer.blockquote = function($quote) {\n\n            var quoteBegin = \"\";\n\n            var ps = $quote.match(/<p\\s.*?>/i);\n            if(ps !== null) {\n                quoteBegin = ps[0];\n                $quote = $quote.substr(quoteBegin.length);\n            }\n            var $class = \"default\";\n\n            if($quote.indexOf(\"[info]\") === 0){\n                $class = \"info\";\n                $quote = $quote.substr(6);\n            }else if($quote.indexOf(\"[warning]\") === 0){\n                $class = \"warning\";\n                $quote = $quote.substr(9);\n            }else if($quote.indexOf(\"[success]\") === 0){\n                $class = \"success\";\n                $quote = $quote.substr(9);\n            }else if($quote.indexOf(\"[danger]\") === 0){\n                $class = \"danger\";\n                $quote = $quote.substr(8);\n            }\n\n            return '<blockquote class=\"'+$class+'\">\\n' + quoteBegin + $quote + '</blockquote>\\n';\n        };\n\n        markedRenderer.image = function(href,title,text) {\n            var attr = \"\";\n            var begin = \"\";\n            var end = \"\";\n\n            if(href && href !== \"\"){\n                var a =  document.createElement('a');\n                a.href = href;\n                var attrs = a.hash.match(/size=\\d+x\\d+/i);\n                if(attrs !== null) {\n                    a.hash = a.hash.replace(attrs[0],\"\");\n                    href = a.href;\n                    attrs = attrs[0].replace(\"size=\",\"\").split(\"x\");\n                    if(attrs[0] > 0) {\n                        attr += \" width=\\\"\" + attrs[0] + \"\\\"\"\n                    }\n                    if(attrs[1] > 0) {\n                        attr += \" height=\\\"\" + attrs[1] + \"\\\"\"\n                    }\n                }\n                attrs = a.hash.match(/align=(center|left|right)/i)\n                if (attrs !== null) {\n                    var hash = a.hash.replace(attrs[0],\"\");\n                    if (hash.indexOf(\"#&\") === 0) {\n                        hash = \"#\" + hash.substr(2);\n                    }\n                    a.hash = hash;\n\n                    href = a.href;\n                    attrs = attrs[0].replace(\"align=\",\"\");\n                    end = \"</p>\";\n                    if(attrs === \"center\"){\n                        begin = '<p align=\"center\">';\n                    }else if (attrs === \"left\") {\n                        begin = '<p align=\"left\">';\n                    }else if (attrs === \"right\") {\n                        begin = '<p align=\"right\">';\n                    }\n                }\n            }\n            return begin + \"<img src=\\\"\"+href+\"\\\" title=\\\"\"+title+\"\\\" alt=\\\"\"+text+\"\\\" \"+attr+\">\" + end;\n        };\n\n        markedRenderer.emoji = function(text) {\n\n            text = text.replace(editormd.regexs.emojiDatetime, function($1) {\n                return $1.replace(/:/g, \"&#58;\");\n            });\n\n            var matchs = text.match(emojiReg);\n\n            if (!matchs || !settings.emoji) {\n                return text;\n            }\n\n            for (var i = 0, len = matchs.length; i < len; i++)\n            {\n                if (matchs[i] === \":+1:\") {\n                    matchs[i] = \":\\\\+1:\";\n                }\n\n                text = text.replace(new RegExp(matchs[i]), function($1, $2){\n                    var faMatchs = $1.match(faIconReg);\n                    var name     = $1.replace(/:/g, \"\");\n\n                    if (faMatchs)\n                    {\n                        for (var fa = 0, len1 = faMatchs.length; fa < len1; fa++)\n                        {\n                            var faName = faMatchs[fa].replace(/:/g, \"\");\n\n                            return \"<i class=\\\"fa \" + faName + \" fa-emoji\\\" title=\\\"\" + faName.replace(\"fa-\", \"\") + \"\\\"></i>\";\n                        }\n                    }\n                    else\n                    {\n                        var emdlogoMathcs = $1.match(editormdLogoReg);\n                        var twemojiMatchs = $1.match(twemojiReg);\n\n                        if (emdlogoMathcs)\n                        {\n                            for (var x = 0, len2 = emdlogoMathcs.length; x < len2; x++)\n                            {\n                                var logoName = emdlogoMathcs[x].replace(/:/g, \"\");\n                                return \"<i class=\\\"\" + logoName + \"\\\" title=\\\"Editor.md logo (\" + logoName + \")\\\"></i>\";\n                            }\n                        }\n                        else if (twemojiMatchs)\n                        {\n                            for (var t = 0, len3 = twemojiMatchs.length; t < len3; t++)\n                            {\n                                var twe = twemojiMatchs[t].replace(/:/g, \"\").replace(\"tw-\", \"\");\n                                return \"<img src=\\\"\" + editormd.twemoji.path + twe + editormd.twemoji.ext + \"\\\" title=\\\"twemoji-\" + twe + \"\\\" alt=\\\"twemoji-\" + twe + \"\\\" class=\\\"emoji twemoji\\\" />\";\n                            }\n                        }\n                        else\n                        {\n                            var src = (name === \"+1\") ? \"plus1\" : name;\n                            src     = (src === \"black_large_square\") ? \"black_square\" : src;\n                            src     = (src === \"moon\") ? \"waxing_gibbous_moon\" : src;\n\n                            return \"<img src=\\\"\" + editormd.emoji.path + src + editormd.emoji.ext + \"\\\" class=\\\"emoji\\\" title=\\\"&#58;\" + name + \"&#58;\\\" alt=\\\"&#58;\" + name + \"&#58;\\\" />\";\n                        }\n                    }\n                });\n            }\n\n            return text;\n        };\n\n        markedRenderer.atLink = function(text) {\n\n            if (atLinkReg.test(text))\n            {\n                if (settings.atLink)\n                {\n                    text = text.replace(emailReg, function($1, $2, $3, $4) {\n                        return $1.replace(/@/g, \"_#_&#64;_#_\");\n                    });\n\n                    text = text.replace(atLinkReg, function($1, $2) {\n                        return \"<a href=\\\"\" + editormd.urls.atLinkBase + \"\" + $2 + \"\\\" title=\\\"&#64;\" + $2 + \"\\\" class=\\\"at-link\\\" target='_blank'>\" + $1 + \"</a>\";\n                    }).replace(/_#_&#64;_#_/g, \"@\");\n                }\n\n                if (settings.emailLink)\n                {\n                    text = text.replace(emailLinkReg, function($1, $2, $3, $4, $5) {\n                        return (!$2 && $.inArray($5, \"jpg|jpeg|png|gif|webp|ico|icon|pdf\".split(\"|\")) < 0) ? \"<a href=\\\"mailto:\" + $1 + \"\\\">\"+$1+\"</a>\" : $1;\n                    });\n                }\n\n                return text;\n            }\n\n            return text;\n        };\n\n        markedRenderer.link = function (href, title, text) {\n\n            if (this.options.sanitize) {\n                try {\n                    var prot = decodeURIComponent(unescape(href)).replace(/[^\\w:]/g,\"\").toLowerCase();\n                } catch(e) {\n                    return \"\";\n                }\n\n                if (prot.indexOf(\"javascript:\") === 0) {\n                    return \"\";\n                }\n            }\n            if(href.indexOf(\"@\") === 0){\n                return '<a name=\"'+ href.substr(1) + '\"></a>';\n            }\n\n            var out = \"<a href=\\\"\" + href + \"\\\"\";\n            if(href.indexOf(\"http://\") === 0 || href.indexOf(\"https://\") === 0) {\n                out += \"target=\\\"_blank\\\"\";\n            }\n\n            if (atLinkReg.test(title) || atLinkReg.test(text))\n            {\n                if (title)\n                {\n                    out += \" title=\\\"\" + title.replace(/@/g, \"&#64;\");\n                }\n\n                return out + \"\\\">\" + text.replace(/@/g, \"&#64;\") + \"</a>\";\n            }\n\n            if (title) {\n                out += \" title=\\\"\" + title + \"\\\"\";\n            }\n\n            out += \">\" + text + \"</a>\";\n\n            return out;\n        };\n\n        markedRenderer.heading = function(text, level, raw) {\n\n            var linkText       = text;\n            var hasLinkReg     = /\\s*\\<a\\s*href\\=\\\"(.*)\\\"\\s*([^\\>]*)\\>(.*)\\<\\/a\\>\\s*/;\n            var getLinkTextReg = /\\s*\\<a\\s*([^\\>]+)\\>([^\\>]*)\\<\\/a\\>\\s*/g;\n\n            if (hasLinkReg.test(text))\n            {\n                var tempText = [];\n                text         = text.split(/\\<a\\s*([^\\>]+)\\>([^\\>]*)\\<\\/a\\>/);\n\n                for (var i = 0, len = text.length; i < len; i++)\n                {\n                    tempText.push(text[i].replace(/\\s*href\\=\\\"(.*)\\\"\\s*/g, \"\"));\n                }\n\n                text = tempText.join(\" \");\n            }\n\n            text = trim(text);\n\n            var escapedText    = text.toLowerCase().replace(/[^\\w]+/g, \"-\");\n\n            // var isChinese = /^[\\u4e00-\\u9fa5]+$/.test(text);\n            // var id        = (isChinese) ? escape(text).replace(/\\%/g, \"\") : text.toLowerCase().replace(/[^\\w]+/g, \"-\");\n\n            var id = Math.floor(Math.random() * 1000000000 ).toString(36);\n\n            var toc = {\n                text  : text,\n                level : level,\n                slug  : escapedText,\n                id : id\n            };\n\n            markdownToC.push(toc);\n\n            var headingHTML = \"<h\" + level + \" id=\\\"\" + id +\"\\\" class=\\\"markdown-heading\\\">\";\n\n            headingHTML    += \"<a name=\\\"\" + id + \"\\\" class=\\\"reference-link\\\"></a>\";\n            headingHTML    += \"<span class=\\\"header-link octicon octicon-link\\\"></span>\";\n            headingHTML    += (hasLinkReg) ? this.atLink(this.emoji(linkText)) : this.atLink(this.emoji(text));\n            headingHTML    += \"</h\" + level + \">\";\n\n            return headingHTML;\n        };\n\n        markedRenderer.pageBreak = function(text) {\n            if (pageBreakReg.test(text) && settings.pageBreak)\n            {\n                text = \"<hr style=\\\"page-break-after:always;\\\" class=\\\"page-break editormd-page-break\\\" />\";\n            }\n\n            return text;\n        };\n\n        markedRenderer.paragraph = function(text) {\n            var isTeXInline     = /\\$\\$(.*)\\$\\$/g.test(text);\n            var isTeXLine       = /^\\$\\$(.*)\\$\\$$/.test(text);\n            var isTeXAddClass   = (isTeXLine)     ? \" class=\\\"\" + editormd.classNames.tex + \"\\\"\" : \" class=\\\"line\\\"\";\n            var isToC           = (settings.tocm) ? /^(\\[TOC\\]|\\[TOCM\\])$/.test(text) : /^\\[TOC\\]$/.test(text);\n            var isToCMenu       = /^\\[TOCM\\]$/.test(text);\n\n            if (!isTeXLine && isTeXInline)\n            {\n                text = text.replace(/(\\$\\$([^\\$]*)\\$\\$)+/g, function($1, $2) {\n                    return \"<span class=\\\"\" + editormd.classNames.tex + \"\\\">\" + $2.replace(/\\$/g, \"\") + \"</span>\";\n                });\n            }\n            else\n            {\n                text = (isTeXLine) ? text.replace(/\\$/g, \"\") : text;\n            }\n\n            var tocHTML = \"<div class=\\\"markdown-toc editormd-markdown-toc\\\">\" + text + \"</div>\";\n\n            return (isToC) ? ( (isToCMenu) ? \"<div class=\\\"editormd-toc-menu\\\">\" + tocHTML + \"</div><br/>\" : tocHTML )\n                           : ( (pageBreakReg.test(text)) ? this.pageBreak(text) : \"<p\" + isTeXAddClass + \">\" + this.atLink(this.emoji(text)) + \"</p>\\n\" );\n        };\n\n        markedRenderer.code = function (code, lang, escaped) {\n\n            if (lang === \"seq\" || lang === \"sequence\")\n            {\n                return \"<div class=\\\"sequence-diagram\\\">\" + code + \"</div>\";\n            }\n            else  if (lang === \"mermaid\"){\n                var $chars = 'ABCDEFGHJKLMNOPQRSTUVWXYZabcdefhijlkmnopqrstuvwxyz012345678';\n\n                var maxPos = $chars.length;\n                var id = '';\n                for (var i = 0; i < 4; i++) {\n                    id += $chars.charAt(Math.floor(Math.random() * maxPos));\n                }\n\n                return \"<div class=\\\"lang-mermaid hide\\\" data-anchor-id=\\\"\"+id+\"\\\">\" + code + \"</div>\";\n            }\n            else if ( lang === \"flow\")\n            {\n                return \"<div class=\\\"flowchart\\\">\" + code + \"</div>\";\n            }\n            else if ( lang === \"math\" || lang === \"latex\" || lang === \"katex\")\n            {\n                return \"<p class=\\\"\" + editormd.classNames.tex + \"\\\">\" + code + \"</p>\";\n            }\n            else if (/^mindmap/i.test(lang)){\n                var len = 9 || 32;\n                var $chars = 'ABCDEFGHJKMNPQRSTWXYZabcdefhijkmnprstwxyz2345678';\n                var maxPos = $chars.length;\n                var map_id = '';\n                var custom_height;\n                var h = lang.split('>')[1];\n                if (h != undefined) {\n                    custom_height = h;\n                } else {\n                    custom_height = 150;\n                }\n                for (var i = 0; i < len; i++) {\n                    map_id += $chars.charAt(Math.floor(Math.random() * maxPos));\n                }\n                return \"<svg class='mindmap' style='width:100%;min-height=150px;height:\"+custom_height+\"px;' id='mindmap-\"+ map_id +\"'>\"+code+\"</svg>\";\n            }\n            if (lang === \"drawio\") {\n                var svgCode = decodeURIComponent(escape(window.atob(code)))\n                return \"<div class=\\\"svg\\\" style=\\\"overflow: auto; padding: 10px;\\\">\" + svgCode + \"</div>\"\n            } \n            else\n            {\n                return marked.Renderer.prototype.code.apply(this, arguments);\n            }\n        };\n\n        markedRenderer.tablecell = function(content, flags) {\n            var type = (flags.header) ? \"th\" : \"td\";\n            var tag  = (flags.align)  ? \"<\" + type +\" style=\\\"text-align:\" + flags.align + \"\\\">\" : \"<\" + type + \">\";\n\n            return tag + this.atLink(this.emoji(content)) + \"</\" + type + \">\\n\";\n        };\n\n        markedRenderer.listitem = function(text) {\n            if (settings.taskList && /^\\s*\\[[x\\s]\\]\\s*/.test(text))\n            {\n                text = text.replace(/^\\s*\\[\\s\\]\\s*/, \"<input type=\\\"checkbox\\\" class=\\\"task-list-item-checkbox\\\" /> \")\n                           .replace(/^\\s*\\[x\\]\\s*/,  \"<input type=\\\"checkbox\\\" class=\\\"task-list-item-checkbox\\\" checked disabled /> \");\n\n                return \"<li style=\\\"list-style: none;\\\">\" + this.atLink(this.emoji(text)) + \"</li>\";\n            }\n            else\n            {\n                return \"<li>\" + this.atLink(this.emoji(text)) + \"</li>\";\n            }\n        };\n        markedRenderer.checkbox = function(checked){\n            return checked ? '<i class=\"fa fa-check-square\"></i> ' : '<i class=\"fa fa-square-o\"></i> ';\n        };\n\n        return markedRenderer;\n    };\n\n    /**\n     *\n     * 生成TOC(Table of Contents)\n     * Creating ToC (Table of Contents)\n     *\n     * @param   {Array}    toc             从marked获取的TOC数组列表\n     * @param   {Element}  container       插入TOC的容器元素\n     * @param   {Integer}  startLevel      Hx 起始层级\n     * @returns {Object}   tocContainer    返回ToC列表容器层的jQuery对象元素\n     */\n\n    editormd.markdownToCRenderer = function(toc, container, tocDropdown, startLevel) {\n\n        var html        = \"\";\n        var lastLevel   = 0;\n        var classPrefix = this.classPrefix;\n\n        startLevel      = startLevel  || 1;\n\n        for (var i = 0, len = toc.length; i < len; i++)\n        {\n            var text  = toc[i].text;\n            var level = toc[i].level;\n            var id    = toc[i].id;\n\n            if (level < startLevel) {\n                continue;\n            }\n\n            if (level > lastLevel)\n            {\n                html += \"\";\n            }\n            else if (level < lastLevel)\n            {\n                // html += (new Array(lastLevel - level + 2)).join(\"</ul></li>\");\n            }\n            else\n            {\n                // html += \"</ul></li>\";\n            }\n\n            html += \"<li class=\\\"directory-item\\\"><a class=\\\"directory-item-link directory-item-link-\" + level + \"\\\" href=\\\"#\" + id + \"\\\" level=\\\"\" + level + \"\\\">\" + text + \"</a></li>\";\n            lastLevel = level;\n        }\n\n        var tocContainer = container.find(\".markdown-toc\");\n\n        if ((tocContainer.length < 1 && container.attr(\"previewContainer\") === \"false\"))\n        {\n            var tocHTML = \"<div class=\\\"markdown-toc \" + classPrefix + \"markdown-toc\\\"></div>\";\n\n            tocHTML = (tocDropdown) ? \"<div class=\\\"\" + classPrefix + \"toc-menu\\\">\" + tocHTML + \"</div>\" : tocHTML;\n\n            container.html(tocHTML);\n\n            tocContainer = container.find(\".markdown-toc\");\n        }\n\n        if (tocDropdown)\n        {\n            tocContainer.wrap(\"<div class=\\\"\" + classPrefix + \"toc-menu\\\"></div><br/>\");\n        }\n\n        tocContainer.html(\"<ul class=\\\"markdown-toc-list\\\"></ul>\").children(\".markdown-toc-list\").html(html.replace(/\\r?\\n?\\<ul\\>\\<\\/ul\\>/g, \"\"));\n\n        return tocContainer;\n    };\n\n    /**\n     *\n     * 生成TOC下拉菜单\n     * Creating ToC dropdown menu\n     *\n     * @param   {Object}   container       插入TOC的容器jQuery对象元素\n     * @param   {String}   tocTitle        ToC title\n     * @returns {Object}                   return toc-menu object\n     */\n\n    editormd.tocDropdownMenu = function(container, tocTitle) {\n\n        tocTitle      = tocTitle || \"Table of Contents\";\n\n        var zindex    = 400;\n        var tocMenus  = container.find(\".\" + this.classPrefix + \"toc-menu\");\n\n        tocMenus.each(function() {\n            var $this  = $(this);\n            var toc    = $this.children(\".markdown-toc\");\n            var icon   = \"<i class=\\\"fa fa-angle-down\\\"></i>\";\n            var btn    = \"<a href=\\\"javascript:;\\\" class=\\\"toc-menu-btn\\\">\" + icon + tocTitle + \"</a>\";\n            var menu   = toc.children(\"ul\");\n            var list   = menu.find(\"li\");\n\n            toc.append(btn);\n\n            list.first().before(\"<li><h1>\" + tocTitle + \" \" + icon + \"</h1></li>\");\n\n            $this.mouseover(function(){\n                menu.show();\n\n                list.each(function(){\n                    var li = $(this);\n                    var ul = li.children(\"ul\");\n\n                    if (ul.html() === \"\")\n                    {\n                        ul.remove();\n                    }\n\n                    if (ul.length > 0 && ul.html() !== \"\")\n                    {\n                        var firstA = li.children(\"a\").first();\n\n                        if (firstA.children(\".fa\").length < 1)\n                        {\n                            firstA.append( $(icon).css({ float:\"right\", paddingTop:\"4px\" }) );\n                        }\n                    }\n\n                    li.mouseover(function(){\n                        ul.css(\"z-index\", zindex).show();\n                        zindex += 1;\n                    }).mouseleave(function(){\n                        ul.hide();\n                    });\n                });\n            }).mouseleave(function(){\n                menu.hide();\n            });\n        });\n\n        return tocMenus;\n    };\n\n    /**\n     * 简单地过滤指定的HTML标签\n     * Filter custom html tags\n     *\n     * @param   {String}   html          要过滤HTML\n     * @param   {String}   filters       要过滤的标签\n     * @returns {String}   html          返回过滤的HTML\n     */\n\n    editormd.filterHTMLTags = function(html, filters) {\n\n        if (typeof html !== \"string\") {\n            html = new String(html);\n        }\n\n        if (typeof filters !== \"string\") {\n            return html;\n        }\n\n        var expression = filters.split(\"|\");\n        var filterTags = expression[0].split(\",\");\n        var attrs      = expression[1];\n\n        for (var i = 0, len = filterTags.length; i < len; i++)\n        {\n            var tag = filterTags[i];\n\n            html = html.replace(new RegExp(\"\\<\\s*\" + tag + \"\\s*([^\\>]*)\\>([^\\>]*)\\<\\s*\\/\" + tag + \"\\s*\\>\", \"igm\"), \"\");\n        }\n\n        //return html;\n\n        if (typeof attrs !== \"undefined\")\n        {\n            var htmlTagRegex = /\\<(\\w+)\\s*([^\\>]*)\\>([^\\>]*)\\<\\/(\\w+)\\>/ig;\n\n            if (attrs === \"*\")\n            {\n                html = html.replace(htmlTagRegex, function($1, $2, $3, $4, $5) {\n                    return \"<\" + $2 + \">\" + $4 + \"</\" + $5 + \">\";\n                });\n            }\n            else if (attrs === \"on*\")\n            {\n                html = html.replace(htmlTagRegex, function($1, $2, $3, $4, $5) {\n                    var el = $(\"<\" + $2 + \">\" + $4 + \"</\" + $5 + \">\");\n                    var _attrs = $($1)[0].attributes;\n                    var $attrs = {};\n\n                    $.each(_attrs, function(i, e) {\n                        if (e.nodeName !== '\"') $attrs[e.nodeName] = e.nodeValue;\n                    });\n\n                    $.each($attrs, function(i) {\n                        if (i.indexOf(\"on\") === 0) {\n                            delete $attrs[i];\n                        }\n                    });\n\n                    el.attr($attrs);\n\n                    var text = (typeof el[1] !== \"undefined\") ? $(el[1]).text() : \"\";\n\n                    return el[0].outerHTML + text;\n                });\n            }\n            else\n            {\n                html = html.replace(htmlTagRegex, function($1, $2, $3, $4) {\n                    var filterAttrs = attrs.split(\",\");\n                    var el = $($1);\n                    el.html($4);\n\n                    $.each(filterAttrs, function(i) {\n                        el.attr(filterAttrs[i], null);\n                    });\n\n                    return el[0].outerHTML;\n                });\n            }\n        }\n\n        return html;\n    };\n\n    /**\n     * 将Markdown文档解析为HTML用于前台显示\n     * Parse Markdown to HTML for Font-end preview.\n     *\n     * @param   {String}   id            用于显示HTML的对象ID\n     * @param   {Object}   [options={}]  配置选项，可选\n     * @returns {Object}   div           返回jQuery对象元素\n     */\n\n    editormd.markdownToHTML = function(id, options) {\n        var defaults = {\n            gfm                  : true,\n            toc                  : true,\n            tocm                 : false,\n            tocStartLevel        : 1,\n            tocTitle             : \"目录\",\n            tocDropdown          : false,\n            tocContainer         : \"\",\n            markdown             : \"\",\n            markdownSourceCode   : false,\n            htmlDecode           : false,\n            autoLoadKaTeX        : true,\n            pageBreak            : true,\n            atLink               : true,    // for @link\n            emailLink            : true,    // for mail address auto link\n            tex                  : false,\n            taskList             : false,   // Github Flavored Markdown task lists\n            emoji                : false,\n            flowChart            : false,\n            sequenceDiagram      : false,\n            previewCodeHighlight : true,\n            mermaid              : true,\n            mindMap              : true, //思维导图\n        };\n\n        editormd.$marked  = marked;\n\n        var div           = $(\"#\" + id);\n        var settings      = div.settings = $.extend(true, defaults, options || {});\n        var saveTo        = div.find(\"textarea\");\n\n        if (saveTo.length < 1)\n        {\n            div.append(\"<textarea></textarea>\");\n            saveTo        = div.find(\"textarea\");\n        }\n\n        var markdownDoc   = (settings.markdown === \"\") ? saveTo.val() : settings.markdown;\n        var markdownToC   = [];\n\n        var rendererOptions = {\n            toc                  : settings.toc,\n            tocm                 : settings.tocm,\n            tocStartLevel        : settings.tocStartLevel,\n            taskList             : settings.taskList,\n            emoji                : settings.emoji,\n            tex                  : settings.tex,\n            pageBreak            : settings.pageBreak,\n            atLink               : settings.atLink,           // for @link\n            emailLink            : settings.emailLink,        // for mail address auto link\n            flowChart            : settings.flowChart,\n            sequenceDiagram      : settings.sequenceDiagram,\n            mermaid              : settings.mermaid,\n            mindMap              : settings.mindMap, // 思维导图\n            previewCodeHighlight : settings.previewCodeHighlight,\n        };\n\n        var markedOptions = {\n            renderer    : editormd.markedRenderer(markdownToC, rendererOptions),\n            gfm         : settings.gfm,\n            tables      : true,\n            breaks      : true,\n            pedantic    : false,\n            sanitize    : (settings.htmlDecode) ? false : true, // 是否忽略HTML标签，即是否开启HTML标签解析，为了安全性，默认不开启\n            smartLists  : true,\n            smartypants : true\n        };\n\n\t\tmarkdownDoc = new String(markdownDoc);\n\n        var markdownParsed = marked(markdownDoc, markedOptions);\n\n        markdownParsed = editormd.filterHTMLTags(markdownParsed, settings.htmlDecode);\n\n        if (settings.markdownSourceCode) {\n            saveTo.text(markdownDoc);\n        } else {\n            saveTo.remove();\n        }\n\n        div.addClass(\"markdown-body \" + this.classPrefix + \"html-preview\").append(markdownParsed);\n\n        var tocContainer = (settings.tocContainer !== \"\") ? $(settings.tocContainer) : div;\n\n        if (settings.tocContainer !== \"\")\n        {\n            tocContainer.attr(\"previewContainer\", false);\n        }\n\n        if (settings.toc)\n        {\n            div.tocContainer = this.markdownToCRenderer(markdownToC, tocContainer, settings.tocDropdown, settings.tocStartLevel);\n\n            if (settings.tocDropdown || div.find(\".\" + this.classPrefix + \"toc-menu\").length > 0)\n            {\n                this.tocDropdownMenu(div, settings.tocTitle);\n            }\n\n            if (settings.tocContainer !== \"\")\n            {\n                div.find(\".editormd-toc-menu, .editormd-markdown-toc\").remove();\n            }\n        }\n\n        if (settings.previewCodeHighlight)\n        {\n            div.find(\"pre\").addClass(\"prettyprint\");\n            prettyPrint();\n        }\n\n        if (!editormd.isIE8)\n        {\n            if (settings.flowChart) {\n                div.find(\".flowchart\").flowChart();\n            }\n\n            if (settings.sequenceDiagram) {\n                div.find(\".sequence-diagram\").sequenceDiagram({theme: \"simple\"});\n            }\n            if (settings.mermaid) {\n                window.mermaid.init(void 0,  div.find(\".lang-mermaid\"));\n            }\n        }\n\n        if (settings.tex)\n        {\n            var katexHandle = function() {\n                div.find(\".\" + editormd.classNames.tex).each(function(){\n                    var tex  = $(this);\n                    katex.render(tex.html().replace(/&lt;/g, \"<\").replace(/&gt;/g, \">\"), tex[0]);\n                    tex.find(\".katex\").css(\"font-size\", \"1.6em\");\n                });\n            };\n\n            if (settings.autoLoadKaTeX && !editormd.$katex && !editormd.kaTeXLoaded)\n            {\n                this.loadKaTeX(function() {\n                    editormd.$katex      = katex;\n                    editormd.kaTeXLoaded = true;\n                    katexHandle();\n                });\n            }\n            else\n            {\n                katexHandle();\n            }\n        }\n\n        // 前台渲染脑图\n        if(settings.mindMap){\n            var mindmapHandle = function(){\n                div.find(\".mindmap\").each(function(){\n                    var mmap  = $(this);\n                    var md_data = window.markmap.transform(mmap.text().trim());\n                    window.markmap.markmap(\"svg#\"+this.id,md_data)\n                });\n            }\n            mindmapHandle();\n        }\n\n        div.getMarkdown = function() {\n            return saveTo.val();\n        };\n\n        return div;\n    };\n\n    // Editor.md themes, change toolbar themes etc.\n    // added @1.5.0\n    editormd.themes        = [\"default\", \"dark\"];\n\n    // Preview area themes\n    // added @1.5.0\n    editormd.previewThemes = [\"default\", \"dark\"];\n\n    // CodeMirror / editor area themes\n    // @1.5.0 rename -> editorThemes, old version -> themes\n    editormd.editorThemes = [\n        \"default\", \"3024-day\", \"3024-night\",\n        \"ambiance\", \"ambiance-mobile\",\n        \"base16-dark\", \"base16-light\", \"blackboard\",\n        \"cobalt\",\n        \"eclipse\", \"elegant\", \"erlang-dark\",\n        \"lesser-dark\",\n        \"mbo\", \"mdn-like\", \"midnight\", \"monokai\",\n        \"neat\", \"neo\", \"night\",\n        \"paraiso-dark\", \"paraiso-light\", \"pastel-on-dark\",\n        \"rubyblue\",\n        \"solarized\",\n        \"the-matrix\", \"tomorrow-night-eighties\", \"twilight\",\n        \"vibrant-ink\",\n        \"xq-dark\", \"xq-light\"\n    ];\n\n    editormd.loadPlugins = {};\n\n    editormd.loadFiles = {\n        js     : [],\n        css    : [],\n        plugin : []\n    };\n\n    /**\n     * 动态加载Editor.md插件，但不立即执行\n     * Load editor.md plugins\n     *\n     * @param {String}   fileName              插件文件路径\n     * @param {Function} [callback=function()] 加载成功后执行的回调函数\n     * @param {String}   [into=\"head\"]         嵌入页面的位置\n     */\n\n    editormd.loadPlugin = function(fileName, callback, into) {\n        callback   = callback || function() {};\n\n        this.loadScript(fileName, function() {\n            editormd.loadFiles.plugin.push(fileName);\n            callback();\n        }, into);\n    };\n\n    /**\n     * 动态加载CSS文件的方法\n     * Load css file method\n     *\n     * @param {String}   fileName              CSS文件名\n     * @param {Function} [callback=function()] 加载成功后执行的回调函数\n     * @param {String}   [into=\"head\"]         嵌入页面的位置\n     */\n\n    editormd.loadCSS   = function(fileName, callback, into) {\n        into       = into     || \"head\";\n        callback   = callback || function() {};\n\n        var css    = document.createElement(\"link\");\n        css.type   = \"text/css\";\n        css.rel    = \"stylesheet\";\n        css.onload = css.onreadystatechange = function() {\n            editormd.loadFiles.css.push(fileName);\n            callback();\n        };\n\n        css.href   = fileName + \".css\";\n\n        if(into === \"head\") {\n            document.getElementsByTagName(\"head\")[0].appendChild(css);\n        } else {\n            document.body.appendChild(css);\n        }\n    };\n\n    editormd.isIE    = (navigator.appName == \"Microsoft Internet Explorer\");\n    editormd.isIE8   = (editormd.isIE && navigator.appVersion.match(/8./i) == \"8.\");\n\n    /**\n     * 动态加载JS文件的方法\n     * Load javascript file method\n     *\n     * @param {String}   fileName              JS文件名\n     * @param {Function} [callback=function()] 加载成功后执行的回调函数\n     * @param {String}   [into=\"head\"]         嵌入页面的位置\n     */\n\n    editormd.loadScript = function(fileName, callback, into) {\n\n        into          = into     || \"head\";\n        callback      = callback || function() {};\n\n        var script    = null;\n        script        = document.createElement(\"script\");\n        script.id     = fileName.replace(/[\\./]+/g, \"-\");\n        script.type   = \"text/javascript\";\n        script.src    = fileName + \".js\";\n\n        if (editormd.isIE8)\n        {\n            script.onreadystatechange = function() {\n                if(script.readyState)\n                {\n                    if (script.readyState === \"loaded\" || script.readyState === \"complete\")\n                    {\n                        script.onreadystatechange = null;\n                        editormd.loadFiles.js.push(fileName);\n                        callback();\n                    }\n                }\n            };\n        }\n        else\n        {\n            script.onload = function() {\n                editormd.loadFiles.js.push(fileName);\n                callback();\n            };\n        }\n\n        if (into === \"head\") {\n            document.getElementsByTagName(\"head\")[0].appendChild(script);\n        } else {\n            document.body.appendChild(script);\n        }\n    };\n\n    // 使用国外的CDN，加载速度有时会很慢，或者自定义URL\n    // You can custom KaTeX load url.\n    editormd.katexURL  = {\n        css : \"//cdnjs.cloudflare.com/ajax/libs/KaTeX/0.3.0/katex.min\",\n        js  : \"//cdnjs.cloudflare.com/ajax/libs/KaTeX/0.3.0/katex.min\"\n    };\n\n    editormd.kaTeXLoaded = false;\n\n    /**\n     * 加载KaTeX文件\n     * load KaTeX files\n     *\n     * @param {Function} [callback=function()]  加载成功后执行的回调函数\n     */\n\n    editormd.loadKaTeX = function (callback) {\n        editormd.loadCSS(editormd.katexURL.css, function(){\n            editormd.loadScript(editormd.katexURL.js, callback || function(){});\n        });\n    };\n\n    /**\n     * 锁屏\n     * lock screen\n     *\n     * @param   {Boolean}   lock   Boolean 布尔值，是否锁屏\n     * @returns {void}\n     */\n\n    editormd.lockScreen = function(lock) {\n        $(\"html,body\").css(\"overflow\", (lock) ? \"hidden\" : \"\");\n    };\n\n    /**\n     * 动态创建对话框\n     * Creating custom dialogs\n     *\n     * @param   {Object} options 配置项键值对 Key/Value\n     * @returns {dialog} 返回创建的dialog的jQuery实例对象\n     */\n\n    editormd.createDialog = function(options) {\n        var defaults = {\n            name : \"\",\n            width : 420,\n            height: 240,\n            title : \"\",\n            drag  : true,\n            closed : true,\n            content : \"\",\n            mask : true,\n            maskStyle : {\n                backgroundColor : \"#fff\",\n                opacity : 0.1\n            },\n            lockScreen : true,\n            footer : true,\n            buttons : false\n        };\n\n        options          = $.extend(true, defaults, options);\n\n        var $this        = this;\n        var editor       = this.editor;\n        var classPrefix  = editormd.classPrefix;\n        var guid         = (new Date()).getTime();\n        var dialogName   = ( (options.name === \"\") ? classPrefix + \"dialog-\" + guid : options.name);\n        var mouseOrTouch = editormd.mouseOrTouch;\n\n        var html         = \"<div class=\\\"\" + classPrefix + \"dialog \" + dialogName + \"\\\">\";\n\n        if (options.title !== \"\")\n        {\n            html += \"<div class=\\\"\" + classPrefix + \"dialog-header\\\"\" + ( (options.drag) ? \" style=\\\"cursor: move;\\\"\" : \"\" ) + \">\";\n            html += \"<strong class=\\\"\" + classPrefix + \"dialog-title\\\">\" + options.title + \"</strong>\";\n            html += \"</div>\";\n        }\n\n        if (options.closed)\n        {\n            html += \"<a href=\\\"javascript:;\\\" class=\\\"fa fa-close \" + classPrefix + \"dialog-close\\\"></a>\";\n        }\n\n        html += \"<div class=\\\"\" + classPrefix + \"dialog-container\\\">\" + options.content;\n\n        if (options.footer || typeof options.footer === \"string\")\n        {\n            html += \"<div class=\\\"\" + classPrefix + \"dialog-footer\\\">\" + ( (typeof options.footer === \"boolean\") ? \"\" : options.footer) + \"</div>\";\n        }\n\n        html += \"</div>\";\n\n        html += \"<div class=\\\"\" + classPrefix + \"dialog-mask \" + classPrefix + \"dialog-mask-bg\\\"></div>\";\n        html += \"<div class=\\\"\" + classPrefix + \"dialog-mask \" + classPrefix + \"dialog-mask-con\\\"></div>\";\n        html += \"</div>\";\n\n        editor.append(html);\n\n        var dialog = editor.find(\".\" + dialogName);\n\n        dialog.lockScreen = function(lock) {\n            if (options.lockScreen)\n            {\n                $(\"html,body\").css(\"overflow\", (lock) ? \"hidden\" : \"\");\n                $this.resize();\n            }\n\n            return dialog;\n        };\n\n        dialog.showMask = function() {\n            if (options.mask)\n            {\n                editor.find(\".\" + classPrefix + \"mask\").css(options.maskStyle).css(\"z-index\", editormd.dialogZindex - 1).show();\n            }\n            return dialog;\n        };\n\n        dialog.hideMask = function() {\n            if (options.mask)\n            {\n                editor.find(\".\" + classPrefix + \"mask\").hide();\n            }\n\n            return dialog;\n        };\n\n        dialog.loading = function(show) {\n            var loading = dialog.find(\".\" + classPrefix + \"dialog-mask\");\n            loading[(show) ? \"show\" : \"hide\"]();\n\n            return dialog;\n        };\n\n        dialog.lockScreen(true).showMask();\n\n        dialog.show().css({\n            zIndex : editormd.dialogZindex,\n            border : (editormd.isIE8) ? \"1px solid #ddd\" : \"\",\n            width  : (typeof options.width  === \"number\") ? options.width + \"px\"  : options.width,\n            height : (typeof options.height === \"number\") ? options.height + \"px\" : options.height\n        });\n\n        var dialogPosition = function(){\n            dialog.css({\n                top    : ($(window).height() - dialog.height()) / 2 + \"px\",\n                left   : ($(window).width() - dialog.width()) / 2 + \"px\"\n            });\n        };\n\n        dialogPosition();\n\n        $(window).resize(dialogPosition);\n\n        dialog.children(\".\" + classPrefix + \"dialog-close\").bind(mouseOrTouch(\"click\", \"touchend\"), function() {\n            dialog.hide().lockScreen(false).hideMask();\n        });\n\n        if (typeof options.buttons === \"object\")\n        {\n            var footer = dialog.footer = dialog.find(\".\" + classPrefix + \"dialog-footer\");\n\n            for (var key in options.buttons)\n            {\n                var btn = options.buttons[key];\n                var btnClassName = classPrefix + key + \"-btn\";\n\n                footer.append(\"<button class=\\\"\" + classPrefix + \"btn \" + btnClassName + \"\\\">\" + btn[0] + \"</button>\");\n                btn[1] = $.proxy(btn[1], dialog);\n                footer.children(\".\" + btnClassName).bind(mouseOrTouch(\"click\", \"touchend\"), btn[1]);\n            }\n        }\n\n        if (options.title !== \"\" && options.drag)\n        {\n            var posX, posY;\n            var dialogHeader = dialog.children(\".\" + classPrefix + \"dialog-header\");\n\n            if (!options.mask) {\n                dialogHeader.bind(mouseOrTouch(\"click\", \"touchend\"), function(){\n                    editormd.dialogZindex += 2;\n                    dialog.css(\"z-index\", editormd.dialogZindex);\n                });\n            }\n\n            dialogHeader.mousedown(function(e) {\n                e = e || window.event;  //IE\n                posX = e.clientX - parseInt(dialog[0].style.left);\n                posY = e.clientY - parseInt(dialog[0].style.top);\n\n                document.onmousemove = moveAction;\n            });\n\n            var userCanSelect = function (obj) {\n                obj.removeClass(classPrefix + \"user-unselect\").off(\"selectstart\");\n            };\n\n            var userUnselect = function (obj) {\n                obj.addClass(classPrefix + \"user-unselect\").on(\"selectstart\", function(event) { // selectstart for IE\n                    return false;\n                });\n            };\n\n            var moveAction = function (e) {\n                e = e || window.event;  //IE\n\n                var left, top, nowLeft = parseInt(dialog[0].style.left), nowTop = parseInt(dialog[0].style.top);\n\n                if( nowLeft >= 0 ) {\n                    if( nowLeft + dialog.width() <= $(window).width()) {\n                        left = e.clientX - posX;\n                    } else {\n                        left = $(window).width() - dialog.width();\n                        document.onmousemove = null;\n                    }\n                } else {\n                    left = 0;\n                    document.onmousemove = null;\n                }\n\n                if( nowTop >= 0 ) {\n                    top = e.clientY - posY;\n                } else {\n                    top = 0;\n                    document.onmousemove = null;\n                }\n\n\n                document.onselectstart = function() {\n                    return false;\n                };\n\n                userUnselect($(\"body\"));\n                userUnselect(dialog);\n                dialog[0].style.left = left + \"px\";\n                dialog[0].style.top  = top + \"px\";\n            };\n\n            document.onmouseup = function() {\n                userCanSelect($(\"body\"));\n                userCanSelect(dialog);\n\n                document.onselectstart = null;\n                document.onmousemove = null;\n            };\n\n            dialogHeader.touchDraggable = function() {\n                var offset = null;\n                var start  = function(e) {\n                    var orig = e.originalEvent;\n                    var pos  = $(this).parent().position();\n\n                    offset = {\n                        x : orig.changedTouches[0].pageX - pos.left,\n                        y : orig.changedTouches[0].pageY - pos.top\n                    };\n                };\n\n                var move = function(e) {\n                    e.preventDefault();\n                    var orig = e.originalEvent;\n\n                    $(this).parent().css({\n                        top  : orig.changedTouches[0].pageY - offset.y,\n                        left : orig.changedTouches[0].pageX - offset.x\n                    });\n                };\n\n                this.bind(\"touchstart\", start).bind(\"touchmove\", move);\n            };\n\n            dialogHeader.touchDraggable();\n        }\n\n        editormd.dialogZindex += 2;\n\n        return dialog;\n    };\n\n    /**\n     * 鼠标和触摸事件的判断/选择方法\n     * MouseEvent or TouchEvent type switch\n     *\n     * @param   {String} [mouseEventType=\"click\"]    供选择的鼠标事件\n     * @param   {String} [touchEventType=\"touchend\"] 供选择的触摸事件\n     * @returns {String} EventType                   返回事件类型名称\n     */\n\n    editormd.mouseOrTouch = function(mouseEventType, touchEventType) {\n        mouseEventType = mouseEventType || \"click\";\n        touchEventType = touchEventType || \"touchend\";\n\n        var eventType  = mouseEventType;\n\n        try {\n            document.createEvent(\"TouchEvent\");\n            eventType = touchEventType;\n        } catch(e) {}\n\n        return eventType;\n    };\n\n    /**\n     * 日期时间的格式化方法\n     * Datetime format method\n     *\n     * @param   {String}   [format=\"\"]  日期时间的格式，类似PHP的格式\n     * @returns {String}   datefmt      返回格式化后的日期时间字符串\n     */\n\n    editormd.dateFormat = function(format) {\n        format      = format || \"\";\n\n        var addZero = function(d) {\n            return (d < 10) ? \"0\" + d : d;\n        };\n\n        var date    = new Date();\n        var year    = date.getFullYear();\n        var year2   = year.toString().slice(2, 4);\n        var month   = addZero(date.getMonth() + 1);\n        var day     = addZero(date.getDate());\n        var weekDay = date.getDay();\n        var hour    = addZero(date.getHours());\n        var min     = addZero(date.getMinutes());\n        var second  = addZero(date.getSeconds());\n        var ms      = addZero(date.getMilliseconds());\n        var datefmt = \"\";\n\n        var ymd     = year2 + \"-\" + month + \"-\" + day;\n        var fymd    = year  + \"-\" + month + \"-\" + day;\n        var hms     = hour  + \":\" + min   + \":\" + second;\n\n        switch (format)\n        {\n            case \"UNIX Time\" :\n                    datefmt = date.getTime();\n                break;\n\n            case \"UTC\" :\n                    datefmt = date.toUTCString();\n                break;\n\n            case \"yy\" :\n                    datefmt = year2;\n                break;\n\n            case \"year\" :\n            case \"yyyy\" :\n                    datefmt = year;\n                break;\n\n            case \"month\" :\n            case \"mm\" :\n                    datefmt = month;\n                break;\n\n            case \"cn-week-day\" :\n            case \"cn-wd\" :\n                    var cnWeekDays = [\"日\", \"一\", \"二\", \"三\", \"四\", \"五\", \"六\"];\n                    datefmt = \"星期\" + cnWeekDays[weekDay];\n                break;\n\n            case \"week-day\" :\n            case \"wd\" :\n                    var weekDays = [\"Sunday\", \"Monday\", \"Tuesday\", \"Wednesday\", \"Thursday\", \"Friday\", \"Saturday\"];\n                    datefmt = weekDays[weekDay];\n                break;\n\n            case \"day\" :\n            case \"dd\" :\n                    datefmt = day;\n                break;\n\n            case \"hour\" :\n            case \"hh\" :\n                    datefmt = hour;\n                break;\n\n            case \"min\" :\n            case \"ii\" :\n                    datefmt = min;\n                break;\n\n            case \"second\" :\n            case \"ss\" :\n                    datefmt = second;\n                break;\n\n            case \"ms\" :\n                    datefmt = ms;\n                break;\n\n            case \"yy-mm-dd\" :\n                    datefmt = ymd;\n                break;\n\n            case \"yyyy-mm-dd\" :\n                    datefmt = fymd;\n                break;\n\n            case \"yyyy-mm-dd h:i:s ms\" :\n            case \"full + ms\" :\n                    datefmt = fymd + \" \" + hms + \" \" + ms;\n                break;\n\n            case \"full\" :\n            case \"yyyy-mm-dd h:i:s\" :\n                default:\n                    datefmt = fymd + \" \" + hms;\n                break;\n        }\n\n        return datefmt;\n    };\n    /**\n     * 获取指定行的内容\n     * @param n\n     * @returns {*}\n     */\n    editormd.getLine = function(n) {\n        return this.cm.getLine(n);\n    };\n    return editormd;\n\n}));\n"
  },
  {
    "path": "static/editor.md/languages/en.js",
    "content": "(function(){\n    var factory = function (exports) {\n        var lang = {\n            name : \"en\",\n            description : \"Open source online Markdown editor.\",\n            tocTitle    : \"Table of Contents\",\n            toolbar : {\n                undo             : \"Undo(Ctrl+Z)\",\n                redo             : \"Redo(Ctrl+Y)\",\n                bold             : \"Bold\",\n                del              : \"Strikethrough\",\n                italic           : \"Italic\",\n                quote            : \"Block quote\",\n                ucwords          : \"Words first letter convert to uppercase\",\n                uppercase        : \"Selection text convert to uppercase\",\n                lowercase        : \"Selection text convert to lowercase\",\n                h1               : \"Heading 1\",\n                h2               : \"Heading 2\",\n                h3               : \"Heading 3\",\n                h4               : \"Heading 4\",\n                h5               : \"Heading 5\",\n                h6               : \"Heading 6\",\n                \"list-ul\"        : \"Unordered list\",\n                \"list-ol\"        : \"Ordered list\",\n                hr               : \"Horizontal rule\",\n                link             : \"Link\",\n                \"reference-link\" : \"Reference link\",\n                image            : \"Image\",\n                code             : \"Code inline\",\n                \"preformatted-text\" : \"Preformatted text / Code block (Tab indent)\",\n                \"code-block\"     : \"Code block (Multi-languages)\",\n                table            : \"Tables\",\n                datetime         : \"Datetime\",\n                emoji            : \"Emoji\",\n                \"html-entities\"  : \"HTML Entities\",\n                pagebreak        : \"Page break\",\n                watch            : \"Unwatch\",\n                unwatch          : \"Watch\",\n                preview          : \"HTML Preview (Press Shift + ESC exit)\",\n                fullscreen       : \"Fullscreen (Press ESC exit)\",\n                clear            : \"Clear\",\n                search           : \"Search\",\n                help             : \"Help\",\n                info             : \"About \" + exports.title\n            },\n            buttons : {\n                enter  : \"Enter\",\n                cancel : \"Cancel\",\n                close  : \"Close\"\n            },\n            dialog : {\n                link : {\n                    title    : \"Link\",\n                    url      : \"Address\",\n                    urlTitle : \"Title\",\n                    urlEmpty : \"Error: Please fill in the link address.\"\n                },\n                referenceLink : {\n                    title    : \"Reference link\",\n                    name     : \"Name\",\n                    url      : \"Address\",\n                    urlId    : \"ID\",\n                    urlTitle : \"Title\",\n                    nameEmpty: \"Error: Reference name can't be empty.\",\n                    idEmpty  : \"Error: Please fill in reference link id.\",\n                    urlEmpty : \"Error: Please fill in reference link url address.\"\n                },\n                image : {\n                    title    : \"Image\",\n                    url      : \"Address\",\n                    link     : \"Link\",\n                    alt      : \"Title\",\n                    uploadButton     : \"Upload\",\n                    imageURLEmpty    : \"Error: picture url address can't be empty.\",\n                    uploadFileEmpty  : \"Error: upload pictures cannot be empty!\",\n                    formatNotAllowed : \"Error: only allows to upload pictures file, upload allowed image file format:\"\n                },\n                preformattedText : {\n                    title             : \"Preformatted text / Codes\", \n                    emptyAlert        : \"Error: Please fill in the Preformatted text or content of the codes.\"\n                },\n                codeBlock : {\n                    title             : \"Code block\",         \n                    selectLabel       : \"Languages: \",\n                    selectDefaultText : \"select a code language...\",\n                    otherLanguage     : \"Other languages\",\n                    unselectedLanguageAlert : \"Error: Please select the code language.\",\n                    codeEmptyAlert    : \"Error: Please fill in the code content.\"\n                },\n                htmlEntities : {\n                    title : \"HTML Entities\"\n                },\n                help : {\n                    title : \"Help\"\n                }\n            }\n        };\n        \n        exports.defaults.lang = lang;\n    };\n    \n\t// CommonJS/Node.js\n\tif (typeof require === \"function\" && typeof exports === \"object\" && typeof module === \"object\")\n    { \n        module.exports = factory;\n    }\n\telse if (typeof define === \"function\")  // AMD/CMD/Sea.js\n    {\n\t\tif (define.amd) { // for Require.js\n\n\t\t\tdefine([\"editormd\"], function(editormd) {\n                factory(editormd);\n            });\n\n\t\t} else { // for Sea.js\n\t\t\tdefine(function(require) {\n                var editormd = require(\"../editormd\");\n                factory(editormd);\n            });\n\t\t}\n\t} \n\telse\n\t{\n        factory(window.editormd);\n\t}\n    \n})();"
  },
  {
    "path": "static/editor.md/languages/zh-tw.js",
    "content": "(function(){\n    var factory = function (exports) {\n        var lang = {\n            name : \"zh-tw\",\n            description : \"開源在線Markdown編輯器<br/>Open source online Markdown editor.\",\n            tocTitle    : \"目錄\",\n            toolbar     : {\n                undo             : \"撤銷（Ctrl+Z）\",\n                redo             : \"重做（Ctrl+Y）\",\n                bold             : \"粗體\",\n                del              : \"刪除線\",\n                italic           : \"斜體\",\n                quote            : \"引用\",\n                ucwords          : \"將所選的每個單詞首字母轉成大寫\",\n                uppercase        : \"將所選文本轉成大寫\",\n                lowercase        : \"將所選文本轉成小寫\",\n                h1               : \"標題1\",\n                h2               : \"標題2\",\n                h3               : \"標題3\",\n                h4               : \"標題4\",\n                h5               : \"標題5\",\n                h6               : \"標題6\",\n                \"list-ul\"        : \"無序列表\",\n                \"list-ol\"        : \"有序列表\",\n                hr               : \"横线\",\n                link             : \"链接\",\n                \"reference-link\" : \"引用鏈接\",\n                image            : \"圖片\",\n                code             : \"行內代碼\",\n                \"preformatted-text\" : \"預格式文本 / 代碼塊（縮進風格）\",\n                \"code-block\"     : \"代碼塊（多語言風格）\",\n                table            : \"添加表格\",\n                datetime         : \"日期時間\",\n                emoji            : \"Emoji 表情\",\n                \"html-entities\"  : \"HTML 實體字符\",\n                pagebreak        : \"插入分頁符\",\n                watch            : \"關閉實時預覽\",\n                unwatch          : \"開啟實時預覽\",\n                preview          : \"全窗口預覽HTML（按 Shift + ESC 退出）\",\n                fullscreen       : \"全屏（按 ESC 退出）\",\n                clear            : \"清空\",\n                search           : \"搜尋\",\n                help             : \"使用幫助\",\n                info             : \"關於\" + exports.title\n            },\n            buttons : {\n                enter  : \"確定\",\n                cancel : \"取消\",\n                close  : \"關閉\"\n            },\n            dialog : {\n                link   : {\n                    title    : \"添加鏈接\",\n                    url      : \"鏈接地址\",\n                    urlTitle : \"鏈接標題\",\n                    urlEmpty : \"錯誤：請填寫鏈接地址。\"\n                },\n                referenceLink : {\n                    title    : \"添加引用鏈接\",\n                    name     : \"引用名稱\",\n                    url      : \"鏈接地址\",\n                    urlId    : \"鏈接ID\",\n                    urlTitle : \"鏈接標題\",\n                    nameEmpty: \"錯誤：引用鏈接的名稱不能為空。\",\n                    idEmpty  : \"錯誤：請填寫引用鏈接的ID。\",\n                    urlEmpty : \"錯誤：請填寫引用鏈接的URL地址。\"\n                },\n                image  : {\n                    title    : \"添加圖片\",\n                    url      : \"圖片地址\",\n                    link     : \"圖片鏈接\",\n                    alt      : \"圖片描述\",\n                    uploadButton     : \"本地上傳\",\n                    imageURLEmpty    : \"錯誤：圖片地址不能為空。\",\n                    uploadFileEmpty  : \"錯誤：上傳的圖片不能為空！\",\n                    formatNotAllowed : \"錯誤：只允許上傳圖片文件，允許上傳的圖片文件格式有：\"\n                },\n                preformattedText : {\n                    title             : \"添加預格式文本或代碼塊\", \n                    emptyAlert        : \"錯誤：請填寫預格式文本或代碼的內容。\"\n                },\n                codeBlock : {\n                    title             : \"添加代碼塊\",                 \n                    selectLabel       : \"代碼語言：\",\n                    selectDefaultText : \"請語言代碼語言\",\n                    otherLanguage     : \"其他語言\",\n                    unselectedLanguageAlert : \"錯誤：請選擇代碼所屬的語言類型。\",\n                    codeEmptyAlert    : \"錯誤：請填寫代碼內容。\"\n                },\n                htmlEntities : {\n                    title : \"HTML實體字符\"\n                },\n                help : {\n                    title : \"使用幫助\"\n                }\n            }\n        };\n        \n        exports.defaults.lang = lang;\n    };\n    \n\t// CommonJS/Node.js\n\tif (typeof require === \"function\" && typeof exports === \"object\" && typeof module === \"object\")\n    { \n        module.exports = factory;\n    }\n\telse if (typeof define === \"function\")  // AMD/CMD/Sea.js\n    {\n\t\tif (define.amd) { // for Require.js\n\n\t\t\tdefine([\"editormd\"], function(editormd) {\n                factory(editormd);\n            });\n\n\t\t} else { // for Sea.js\n\t\t\tdefine(function(require) {\n                var editormd = require(\"../editormd\");\n                factory(editormd);\n            });\n\t\t}\n\t} \n\telse\n\t{\n        factory(window.editormd);\n\t}\n    \n})();"
  },
  {
    "path": "static/editor.md/lib/codemirror/AUTHORS",
    "content": "List of CodeMirror contributors. Updated before every release.\n\n4r2r\nAaron Brooks\nAbdelouahab\nAbe Fettig\nAdam Ahmed\nAdam King\nadanlobato\nAdán Lobato\nAdrian Aichner\naeroson\nAhmad Amireh\nAhmad M. Zawawi\nahoward\nAkeksandr Motsjonov\nAlberto González Palomo\nAlberto Pose\nAlbert Xing\nAlexander Pavlov\nAlexander Schepanovski\nAlexander Shvets\nAlexander Solovyov\nAlexandre Bique\nalexey-k\nAlex Piggott\nAliaksei Chapyzhenka\nAmsul\namuntean\nAmy\nAnanya Sen\nanaran\nAndersMad\nAnders Nawroth\nAnderson Mesquita\nAndrea G\nAndreas Reischuck\nAndre von Houck\nAndrey Fedorov\nAndrey Klyuchnikov\nAndrey Lushnikov\nAndy Joslin\nAndy Kimball\nAndy Li\nangelozerr\nangelo.zerr@gmail.com\nAnkit\nAnkit Ahuja\nAnsel Santosa\nAnthony Grimes\nAnton Kovalyov\nareos\nas3boyan\nAtomicPages LLC\nAtul Bhouraskar\nAurelian Oancea\nBastian Müller\nBem Jones-Bey\nbenbro\nBeni Cherniavsky-Paskin\nBenjamin DeCoste\nBen Keen\nBernhard Sirlinger\nBert Chang\nBilly Moon\nbinny\nB Krishna Chaitanya\nBlaine G\nblukat29\nboomyjee\nborawjm\nBrandon Frohs\nBrandon Wamboldt\nBrett Zamir\nBrian Grinstead\nBrian Sletten\nBruce Mitchener\nChandra Sekhar Pydi\nCharles Skelton\nCheah Chu Yeow\nChris Coyier\nChris Granger\nChris Houseknecht\nChris Morgan\nChristian Oyarzun\nChristian Petrov\nChristopher Brown\nciaranj\nCodeAnimal\nComFreek\nCurtis Gagliardi\ndagsta\ndaines\nDale Jung\nDan Bentley\nDan Heberden\nDaniel, Dao Quang Minh\nDaniele Di Sarli\nDaniel Faust\nDaniel Huigens\nDaniel KJ\nDaniel Neel\nDaniel Parnell\nDanny Yoo\ndarealshinji\nDarius Roberts\nDave Myers\nDavid Mignot\nDavid Pathakjee\nDavid Vázquez\ndeebugger\nDeep Thought\nDevon Carew\ndignifiedquire\nDimage Sapelkin\nDmitry Kiselyov\ndomagoj412\nDominator008\nDomizio Demichelis\nDoug Wikle\nDrew Bratcher\nDrew Hintz\nDrew Khoury\nDror BG\nduralog\neborden\nedsharp\nekhaled\nEnam Mijbah Noor\nEric Allam\neustas\nFabien O'Carroll\nFabio Zendhi Nagao\nFaiza Alsaied\nFauntleroy\nfbuchinger\nfeizhang365\nFelipe Lalanne\nFelix Raab\nFilip Noetzel\nflack\nForbesLindesay\nForbes Lindesay\nFord_Lawnmower\nForrest Oliphant\nFrank Wiegand\nGabriel Gheorghian\nGabriel Horner\nGabriel Nahmias\ngalambalazs\nGautam Mehta\ngekkoe\nGerard Braad\nGergely Hegykozi\nGiovanni Calò\nGlenn Jorde\nGlenn Ruehle\nGolevka\nGordon Smith\nGrant Skinner\ngreengiant\nGregory Koberger\nGuillaume Massé\nGuillaume Massé\nGustavo Rodrigues\nHakan Tunc\nHans Engel\nHardest\nHasan Karahan\nHerculano Campos\nHiroyuki Makino\nhitsthings\nHocdoc\nIan Beck\nIan Dickinson\nIan Wehrman\nIan Wetherbee\nIce White\nICHIKAWA, Yuji\nilvalle\nIngo Richter\nIrakli Gozalishvili\nIvan Kurnosov\nJacob Lee\nJakob Miland\nJakub Vrana\nJakub Vrána\nJames Campos\nJames Thorne\nJamie Hill\nJan Jongboom\njankeromnes\nJan Keromnes\nJan Odvarko\nJan T. Sott\nJared Forsyth\nJason\nJason Barnabe\nJason Grout\nJason Johnston\nJason San Jose\nJason Siefken\nJaydeep Solanki\nJean Boussier\njeffkenton\nJeff Pickhardt\njem (graphite)\nJeremy Parmenter\nJochen Berger\nJohan Ask\nJohn Connor\nJohn Lees-Miller\nJohn Snelson\nJohn Van Der Loo\nJonathan Malmaud\njongalloway\nJon Malmaud\nJon Sangster\nJoost-Wim Boekesteijn\nJoseph Pecoraro\nJoshua Newman\nJosh Watzman\njots\njsoojeon\nJuan Benavides Romero\nJucovschi Constantin\nJuho Vuori\nJustin Hileman\njwallers@gmail.com\nkaniga\nKen Newman\nKen Rockot\nKevin Sawicki\nKevin Ushey\nKlaus Silveira\nKoh Zi Han, Cliff\nkomakino\nKonstantin Lopuhin\nkoops\nks-ifware\nkubelsmieci\nKwanEsq\nLanfei\nLanny\nLaszlo Vidacs\nleaf corcoran\nLeonid Khachaturov\nLeon Sorokin\nLeonya Khachaturov\nLiam Newman\nLM\nlochel\nLorenzo Stoakes\nLuciano Longo\nLuke Stagner\nlynschinzer\nMaksim Lin\nMaksym Taran\nMalay Majithia\nManuel Rego Casasnovas\nMarat Dreizin\nMarcel Gerber\nMarco Aurélio\nMarco Munizaga\nMarcus Bointon\nMarek Rudnicki\nMarijn Haverbeke\nMário Gonçalves\nMario Pietsch\nMark Lentczner\nMarko Bonaci\nMartin Balek\nMartín Gaitán\nMartin Hasoň\nMason Malone\nMateusz Paprocki\nMathias Bynens\nmats cronqvist\nMatthew Beale\nMatthias Bussonnier\nMatthias BUSSONNIER\nMatt McDonald\nMatt Pass\nMatt Sacks\nmauricio\nMaximilian Hils\nMaxim Kraev\nMax Kirsch\nMax Xiantu\nmbarkhau\nMetatheos\nMicah Dubinko\nMichael Lehenbauer\nMichael Zhou\nMighty Guava\nMiguel Castillo\nmihailik\nMike\nMike Brevoort\nMike Diaz\nMike Ivanov\nMike Kadin\nMinRK\nMiraculix87\nmisfo\nmloginov\nMoritz Schwörer\nmps\nmtaran-google\nNarciso Jaramillo\nNathan Williams\nndr\nnerbert\nnextrevision\nngn\nnguillaumin\nNg Zhi An\nNicholas Bollweg\nNicholas Bollweg (Nick)\nNick Small\nNiels van Groningen\nnightwing\nNikita Beloglazov\nNikita Vasilyev\nNikolay Kostov\nnilp0inter\nNisarg Jhaveri\nnlwillia\nNorman Rzepka\npablo\nPage\nPanupong Pasupat\nparis\nPatil Arpith\nPatrick Stoica\nPatrick Strawderman\nPaul Garvin\nPaul Ivanov\nPavel Feldman\nPavel Strashkin\nPaweł Bartkiewicz\npeteguhl\nPeter Flynn\npeterkroon\nPeter Kroon\nprasanthj\nPrasanth J\nRadek Piórkowski\nRahul\nRandall Mason\nRandy Burden\nRandy Edmunds\nRasmus Erik Voel Jensen\nRay Ratchup\nRichard van der Meer\nRichard Z.H. Wang\nRobert Crossfield\nRoberto Abdelkader Martínez Pérez\nrobertop23\nRobert Plummer\nRuslan Osmanov\nRyan Prior\nsabaca\nSamuel Ainsworth\nsandeepshetty\nSander AKA Redsandro\nsantec\nSascha Peilicke\nsatchmorun\nsathyamoorthi\nSCLINIC\\jdecker\nScott Aikin\nScott Goodhew\nSebastian Zaha\nshaund\nshaun gilchrist\nShawn A\nsheopory\nShiv Deepak\nShmuel Englard\nShubham Jain\nsilverwind\nsnasa\nsoliton4\nsonson\nspastorelli\nsrajanpaliwal\nStanislav Oaserele\nStas Kobzar\nStefan Borsje\nSteffen Beyer\nSteve O'Hara\nstoskov\nTaha Jahangir\nTakuji Shimokawa\nTarmil\ntel\ntfjgeorge\nThaddee Tyl\nTheHowl\nthink\nThomas Dvornik\nThomas Schmid\nTim Alby\nTim Baumann\nTimothy Farrell\nTimothy Hatcher\nTobiasBg\nTomas-A\nTomas Varaneckas\nTom Erik Støwer\nTom MacWright\nTony Jian\nTravis Heppe\nTriangle717\ntwifkak\nVestimir Markov\nvf\nVincent Woo\nVolker Mische\nwenli\nWesley Wiser\nWill Binns-Smith\nWilliam Jamieson\nWilliam Stein\nWilly\nWojtek Ptak\nXavier Mendez\nYassin N. Hassan\nYNH Webdev\nYunchi Luo\nYuvi Panda\nZachary Dremann\nZhang Hao\nzziuni\n魏鹏刚\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/LICENSE",
    "content": "Copyright (C) 2014 by Marijn Haverbeke <marijnh@gmail.com> and others\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/README.md",
    "content": "# CodeMirror\n[![Build Status](https://travis-ci.org/codemirror/CodeMirror.svg)](https://travis-ci.org/codemirror/CodeMirror)\n[![NPM version](https://img.shields.io/npm/v/codemirror.svg)](https://www.npmjs.org/package/codemirror)  \n[Funding status: ![maintainer happiness](https://marijnhaverbeke.nl/fund/status_s.png)](https://marijnhaverbeke.nl/fund/)\n\nCodeMirror is a JavaScript component that provides a code editor in\nthe browser. When a mode is available for the language you are coding\nin, it will color your code, and optionally help with indentation.\n\nThe project page is http://codemirror.net  \nThe manual is at http://codemirror.net/doc/manual.html  \nThe contributing guidelines are in [CONTRIBUTING.md](https://github.com/codemirror/CodeMirror/blob/master/CONTRIBUTING.md)\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/addon/comment/comment.js",
    "content": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n(function(mod) {\n  if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n    mod(require(\"../../lib/codemirror\"));\n  else if (typeof define == \"function\" && define.amd) // AMD\n    define([\"../../lib/codemirror\"], mod);\n  else // Plain browser env\n    mod(CodeMirror);\n})(function(CodeMirror) {\n  \"use strict\";\n\n  var noOptions = {};\n  var nonWS = /[^\\s\\u00a0]/;\n  var Pos = CodeMirror.Pos;\n\n  function firstNonWS(str) {\n    var found = str.search(nonWS);\n    return found == -1 ? 0 : found;\n  }\n\n  CodeMirror.commands.toggleComment = function(cm) {\n    var minLine = Infinity, ranges = cm.listSelections(), mode = null;\n    for (var i = ranges.length - 1; i >= 0; i--) {\n      var from = ranges[i].from(), to = ranges[i].to();\n      if (from.line >= minLine) continue;\n      if (to.line >= minLine) to = Pos(minLine, 0);\n      minLine = from.line;\n      if (mode == null) {\n        if (cm.uncomment(from, to)) mode = \"un\";\n        else { cm.lineComment(from, to); mode = \"line\"; }\n      } else if (mode == \"un\") {\n        cm.uncomment(from, to);\n      } else {\n        cm.lineComment(from, to);\n      }\n    }\n  };\n\n  CodeMirror.defineExtension(\"lineComment\", function(from, to, options) {\n    if (!options) options = noOptions;\n    var self = this, mode = self.getModeAt(from);\n    var commentString = options.lineComment || mode.lineComment;\n    if (!commentString) {\n      if (options.blockCommentStart || mode.blockCommentStart) {\n        options.fullLines = true;\n        self.blockComment(from, to, options);\n      }\n      return;\n    }\n    var firstLine = self.getLine(from.line);\n    if (firstLine == null) return;\n    var end = Math.min(to.ch != 0 || to.line == from.line ? to.line + 1 : to.line, self.lastLine() + 1);\n    var pad = options.padding == null ? \" \" : options.padding;\n    var blankLines = options.commentBlankLines || from.line == to.line;\n\n    self.operation(function() {\n      if (options.indent) {\n        var baseString = firstLine.slice(0, firstNonWS(firstLine));\n        for (var i = from.line; i < end; ++i) {\n          var line = self.getLine(i), cut = baseString.length;\n          if (!blankLines && !nonWS.test(line)) continue;\n          if (line.slice(0, cut) != baseString) cut = firstNonWS(line);\n          self.replaceRange(baseString + commentString + pad, Pos(i, 0), Pos(i, cut));\n        }\n      } else {\n        for (var i = from.line; i < end; ++i) {\n          if (blankLines || nonWS.test(self.getLine(i)))\n            self.replaceRange(commentString + pad, Pos(i, 0));\n        }\n      }\n    });\n  });\n\n  CodeMirror.defineExtension(\"blockComment\", function(from, to, options) {\n    if (!options) options = noOptions;\n    var self = this, mode = self.getModeAt(from);\n    var startString = options.blockCommentStart || mode.blockCommentStart;\n    var endString = options.blockCommentEnd || mode.blockCommentEnd;\n    if (!startString || !endString) {\n      if ((options.lineComment || mode.lineComment) && options.fullLines != false)\n        self.lineComment(from, to, options);\n      return;\n    }\n\n    var end = Math.min(to.line, self.lastLine());\n    if (end != from.line && to.ch == 0 && nonWS.test(self.getLine(end))) --end;\n\n    var pad = options.padding == null ? \" \" : options.padding;\n    if (from.line > end) return;\n\n    self.operation(function() {\n      if (options.fullLines != false) {\n        var lastLineHasText = nonWS.test(self.getLine(end));\n        self.replaceRange(pad + endString, Pos(end));\n        self.replaceRange(startString + pad, Pos(from.line, 0));\n        var lead = options.blockCommentLead || mode.blockCommentLead;\n        if (lead != null) for (var i = from.line + 1; i <= end; ++i)\n          if (i != end || lastLineHasText)\n            self.replaceRange(lead + pad, Pos(i, 0));\n      } else {\n        self.replaceRange(endString, to);\n        self.replaceRange(startString, from);\n      }\n    });\n  });\n\n  CodeMirror.defineExtension(\"uncomment\", function(from, to, options) {\n    if (!options) options = noOptions;\n    var self = this, mode = self.getModeAt(from);\n    var end = Math.min(to.ch != 0 || to.line == from.line ? to.line : to.line - 1, self.lastLine()), start = Math.min(from.line, end);\n\n    // Try finding line comments\n    var lineString = options.lineComment || mode.lineComment, lines = [];\n    var pad = options.padding == null ? \" \" : options.padding, didSomething;\n    lineComment: {\n      if (!lineString) break lineComment;\n      for (var i = start; i <= end; ++i) {\n        var line = self.getLine(i);\n        var found = line.indexOf(lineString);\n        if (found > -1 && !/comment/.test(self.getTokenTypeAt(Pos(i, found + 1)))) found = -1;\n        if (found == -1 && (i != end || i == start) && nonWS.test(line)) break lineComment;\n        if (found > -1 && nonWS.test(line.slice(0, found))) break lineComment;\n        lines.push(line);\n      }\n      self.operation(function() {\n        for (var i = start; i <= end; ++i) {\n          var line = lines[i - start];\n          var pos = line.indexOf(lineString), endPos = pos + lineString.length;\n          if (pos < 0) continue;\n          if (line.slice(endPos, endPos + pad.length) == pad) endPos += pad.length;\n          didSomething = true;\n          self.replaceRange(\"\", Pos(i, pos), Pos(i, endPos));\n        }\n      });\n      if (didSomething) return true;\n    }\n\n    // Try block comments\n    var startString = options.blockCommentStart || mode.blockCommentStart;\n    var endString = options.blockCommentEnd || mode.blockCommentEnd;\n    if (!startString || !endString) return false;\n    var lead = options.blockCommentLead || mode.blockCommentLead;\n    var startLine = self.getLine(start), endLine = end == start ? startLine : self.getLine(end);\n    var open = startLine.indexOf(startString), close = endLine.lastIndexOf(endString);\n    if (close == -1 && start != end) {\n      endLine = self.getLine(--end);\n      close = endLine.lastIndexOf(endString);\n    }\n    if (open == -1 || close == -1 ||\n        !/comment/.test(self.getTokenTypeAt(Pos(start, open + 1))) ||\n        !/comment/.test(self.getTokenTypeAt(Pos(end, close + 1))))\n      return false;\n\n    // Avoid killing block comments completely outside the selection.\n    // Positions of the last startString before the start of the selection, and the first endString after it.\n    var lastStart = startLine.lastIndexOf(startString, from.ch);\n    var firstEnd = lastStart == -1 ? -1 : startLine.slice(0, from.ch).indexOf(endString, lastStart + startString.length);\n    if (lastStart != -1 && firstEnd != -1 && firstEnd + endString.length != from.ch) return false;\n    // Positions of the first endString after the end of the selection, and the last startString before it.\n    firstEnd = endLine.indexOf(endString, to.ch);\n    var almostLastStart = endLine.slice(to.ch).lastIndexOf(startString, firstEnd - to.ch);\n    lastStart = (firstEnd == -1 || almostLastStart == -1) ? -1 : to.ch + almostLastStart;\n    if (firstEnd != -1 && lastStart != -1 && lastStart != to.ch) return false;\n\n    self.operation(function() {\n      self.replaceRange(\"\", Pos(end, close - (pad && endLine.slice(close - pad.length, close) == pad ? pad.length : 0)),\n                        Pos(end, close + endString.length));\n      var openEnd = open + startString.length;\n      if (pad && startLine.slice(openEnd, openEnd + pad.length) == pad) openEnd += pad.length;\n      self.replaceRange(\"\", Pos(start, open), Pos(start, openEnd));\n      if (lead) for (var i = start + 1; i <= end; ++i) {\n        var line = self.getLine(i), found = line.indexOf(lead);\n        if (found == -1 || nonWS.test(line.slice(0, found))) continue;\n        var foundEnd = found + lead.length;\n        if (pad && line.slice(foundEnd, foundEnd + pad.length) == pad) foundEnd += pad.length;\n        self.replaceRange(\"\", Pos(i, found), Pos(i, foundEnd));\n      }\n    });\n    return true;\n  });\n});\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/addon/comment/continuecomment.js",
    "content": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n(function(mod) {\n  if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n    mod(require(\"../../lib/codemirror\"));\n  else if (typeof define == \"function\" && define.amd) // AMD\n    define([\"../../lib/codemirror\"], mod);\n  else // Plain browser env\n    mod(CodeMirror);\n})(function(CodeMirror) {\n  var modes = [\"clike\", \"css\", \"javascript\"];\n\n  for (var i = 0; i < modes.length; ++i)\n    CodeMirror.extendMode(modes[i], {blockCommentContinue: \" * \"});\n\n  function continueComment(cm) {\n    if (cm.getOption(\"disableInput\")) return CodeMirror.Pass;\n    var ranges = cm.listSelections(), mode, inserts = [];\n    for (var i = 0; i < ranges.length; i++) {\n      var pos = ranges[i].head, token = cm.getTokenAt(pos);\n      if (token.type != \"comment\") return CodeMirror.Pass;\n      var modeHere = CodeMirror.innerMode(cm.getMode(), token.state).mode;\n      if (!mode) mode = modeHere;\n      else if (mode != modeHere) return CodeMirror.Pass;\n\n      var insert = null;\n      if (mode.blockCommentStart && mode.blockCommentContinue) {\n        var end = token.string.indexOf(mode.blockCommentEnd);\n        var full = cm.getRange(CodeMirror.Pos(pos.line, 0), CodeMirror.Pos(pos.line, token.end)), found;\n        if (end != -1 && end == token.string.length - mode.blockCommentEnd.length && pos.ch >= end) {\n          // Comment ended, don't continue it\n        } else if (token.string.indexOf(mode.blockCommentStart) == 0) {\n          insert = full.slice(0, token.start);\n          if (!/^\\s*$/.test(insert)) {\n            insert = \"\";\n            for (var j = 0; j < token.start; ++j) insert += \" \";\n          }\n        } else if ((found = full.indexOf(mode.blockCommentContinue)) != -1 &&\n                   found + mode.blockCommentContinue.length > token.start &&\n                   /^\\s*$/.test(full.slice(0, found))) {\n          insert = full.slice(0, found);\n        }\n        if (insert != null) insert += mode.blockCommentContinue;\n      }\n      if (insert == null && mode.lineComment && continueLineCommentEnabled(cm)) {\n        var line = cm.getLine(pos.line), found = line.indexOf(mode.lineComment);\n        if (found > -1) {\n          insert = line.slice(0, found);\n          if (/\\S/.test(insert)) insert = null;\n          else insert += mode.lineComment + line.slice(found + mode.lineComment.length).match(/^\\s*/)[0];\n        }\n      }\n      if (insert == null) return CodeMirror.Pass;\n      inserts[i] = \"\\n\" + insert;\n    }\n\n    cm.operation(function() {\n      for (var i = ranges.length - 1; i >= 0; i--)\n        cm.replaceRange(inserts[i], ranges[i].from(), ranges[i].to(), \"+insert\");\n    });\n  }\n\n  function continueLineCommentEnabled(cm) {\n    var opt = cm.getOption(\"continueComments\");\n    if (opt && typeof opt == \"object\")\n      return opt.continueLineComment !== false;\n    return true;\n  }\n\n  CodeMirror.defineOption(\"continueComments\", null, function(cm, val, prev) {\n    if (prev && prev != CodeMirror.Init)\n      cm.removeKeyMap(\"continueComment\");\n    if (val) {\n      var key = \"Enter\";\n      if (typeof val == \"string\")\n        key = val;\n      else if (typeof val == \"object\" && val.key)\n        key = val.key;\n      var map = {name: \"continueComment\"};\n      map[key] = continueComment;\n      cm.addKeyMap(map);\n    }\n  });\n});\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/addon/dialog/dialog.css",
    "content": ".CodeMirror-dialog {\n  position: absolute;\n  left: 0; right: 0;\n  background: white;\n  z-index: 15;\n  padding: .1em .8em;\n  overflow: hidden;\n  color: #333;\n}\n\n.CodeMirror-dialog-top {\n  border-bottom: 1px solid #eee;\n  top: 0;\n}\n\n.CodeMirror-dialog-bottom {\n  border-top: 1px solid #eee;\n  bottom: 0;\n}\n\n.CodeMirror-dialog input {\n  border: none;\n  outline: none;\n  background: transparent;\n  width: 20em;\n  color: inherit;\n  font-family: monospace;\n}\n\n.CodeMirror-dialog button {\n  font-size: 70%;\n}\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/addon/dialog/dialog.js",
    "content": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n// Open simple dialogs on top of an editor. Relies on dialog.css.\n\n(function(mod) {\n  if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n    mod(require(\"../../lib/codemirror\"));\n  else if (typeof define == \"function\" && define.amd) // AMD\n    define([\"../../lib/codemirror\"], mod);\n  else // Plain browser env\n    mod(CodeMirror);\n})(function(CodeMirror) {\n  function dialogDiv(cm, template, bottom) {\n    var wrap = cm.getWrapperElement();\n    var dialog;\n    dialog = wrap.appendChild(document.createElement(\"div\"));\n    if (bottom)\n      dialog.className = \"CodeMirror-dialog CodeMirror-dialog-bottom\";\n    else\n      dialog.className = \"CodeMirror-dialog CodeMirror-dialog-top\";\n\n    if (typeof template == \"string\") {\n      dialog.innerHTML = template;\n    } else { // Assuming it's a detached DOM element.\n      dialog.appendChild(template);\n    }\n    return dialog;\n  }\n\n  function closeNotification(cm, newVal) {\n    if (cm.state.currentNotificationClose)\n      cm.state.currentNotificationClose();\n    cm.state.currentNotificationClose = newVal;\n  }\n\n  CodeMirror.defineExtension(\"openDialog\", function(template, callback, options) {\n    if (!options) options = {};\n\n    closeNotification(this, null);\n\n    var dialog = dialogDiv(this, template, options.bottom);\n    var closed = false, me = this;\n    function close(newVal) {\n      if (typeof newVal == 'string') {\n        inp.value = newVal;\n      } else {\n        if (closed) return;\n        closed = true;\n        dialog.parentNode.removeChild(dialog);\n        me.focus();\n\n        if (options.onClose) options.onClose(dialog);\n      }\n    }\n\n    var inp = dialog.getElementsByTagName(\"input\")[0], button;\n    if (inp) {\n      if (options.value) {\n        inp.value = options.value;\n        inp.select();\n      }\n\n      if (options.onInput)\n        CodeMirror.on(inp, \"input\", function(e) { options.onInput(e, inp.value, close);});\n      if (options.onKeyUp)\n        CodeMirror.on(inp, \"keyup\", function(e) {options.onKeyUp(e, inp.value, close);});\n\n      CodeMirror.on(inp, \"keydown\", function(e) {\n        if (options && options.onKeyDown && options.onKeyDown(e, inp.value, close)) { return; }\n        if (e.keyCode == 27 || (options.closeOnEnter !== false && e.keyCode == 13)) {\n          inp.blur();\n          CodeMirror.e_stop(e);\n          close();\n        }\n        if (e.keyCode == 13) callback(inp.value, e);\n      });\n\n      if (options.closeOnBlur !== false) CodeMirror.on(inp, \"blur\", close);\n\n      inp.focus();\n    } else if (button = dialog.getElementsByTagName(\"button\")[0]) {\n      CodeMirror.on(button, \"click\", function() {\n        close();\n        me.focus();\n      });\n\n      if (options.closeOnBlur !== false) CodeMirror.on(button, \"blur\", close);\n\n      button.focus();\n    }\n    return close;\n  });\n\n  CodeMirror.defineExtension(\"openConfirm\", function(template, callbacks, options) {\n    closeNotification(this, null);\n    var dialog = dialogDiv(this, template, options && options.bottom);\n    var buttons = dialog.getElementsByTagName(\"button\");\n    var closed = false, me = this, blurring = 1;\n    function close() {\n      if (closed) return;\n      closed = true;\n      dialog.parentNode.removeChild(dialog);\n      me.focus();\n    }\n    buttons[0].focus();\n    for (var i = 0; i < buttons.length; ++i) {\n      var b = buttons[i];\n      (function(callback) {\n        CodeMirror.on(b, \"click\", function(e) {\n          CodeMirror.e_preventDefault(e);\n          close();\n          if (callback) callback(me);\n        });\n      })(callbacks[i]);\n      CodeMirror.on(b, \"blur\", function() {\n        --blurring;\n        setTimeout(function() { if (blurring <= 0) close(); }, 200);\n      });\n      CodeMirror.on(b, \"focus\", function() { ++blurring; });\n    }\n  });\n\n  /*\n   * openNotification\n   * Opens a notification, that can be closed with an optional timer\n   * (default 5000ms timer) and always closes on click.\n   *\n   * If a notification is opened while another is opened, it will close the\n   * currently opened one and open the new one immediately.\n   */\n  CodeMirror.defineExtension(\"openNotification\", function(template, options) {\n    closeNotification(this, close);\n    var dialog = dialogDiv(this, template, options && options.bottom);\n    var closed = false, doneTimer;\n    var duration = options && typeof options.duration !== \"undefined\" ? options.duration : 5000;\n\n    function close() {\n      if (closed) return;\n      closed = true;\n      clearTimeout(doneTimer);\n      dialog.parentNode.removeChild(dialog);\n    }\n\n    CodeMirror.on(dialog, 'click', function(e) {\n      CodeMirror.e_preventDefault(e);\n      close();\n    });\n\n    if (duration)\n      doneTimer = setTimeout(close, duration);\n\n    return close;\n  });\n});\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/addon/display/fullscreen.css",
    "content": ".CodeMirror-fullscreen {\n  position: fixed;\n  top: 0; left: 0; right: 0; bottom: 0;\n  height: auto;\n  z-index: 9;\n}\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/addon/display/fullscreen.js",
    "content": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n(function(mod) {\n  if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n    mod(require(\"../../lib/codemirror\"));\n  else if (typeof define == \"function\" && define.amd) // AMD\n    define([\"../../lib/codemirror\"], mod);\n  else // Plain browser env\n    mod(CodeMirror);\n})(function(CodeMirror) {\n  \"use strict\";\n\n  CodeMirror.defineOption(\"fullScreen\", false, function(cm, val, old) {\n    if (old == CodeMirror.Init) old = false;\n    if (!old == !val) return;\n    if (val) setFullscreen(cm);\n    else setNormal(cm);\n  });\n\n  function setFullscreen(cm) {\n    var wrap = cm.getWrapperElement();\n    cm.state.fullScreenRestore = {scrollTop: window.pageYOffset, scrollLeft: window.pageXOffset,\n                                  width: wrap.style.width, height: wrap.style.height};\n    wrap.style.width = \"\";\n    wrap.style.height = \"auto\";\n    wrap.className += \" CodeMirror-fullscreen\";\n    document.documentElement.style.overflow = \"hidden\";\n    cm.refresh();\n  }\n\n  function setNormal(cm) {\n    var wrap = cm.getWrapperElement();\n    wrap.className = wrap.className.replace(/\\s*CodeMirror-fullscreen\\b/, \"\");\n    document.documentElement.style.overflow = \"\";\n    var info = cm.state.fullScreenRestore;\n    wrap.style.width = info.width; wrap.style.height = info.height;\n    window.scrollTo(info.scrollLeft, info.scrollTop);\n    cm.refresh();\n  }\n});\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/addon/display/panel.js",
    "content": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n(function(mod) {\n  if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n    mod(require(\"../../lib/codemirror\"));\n  else if (typeof define == \"function\" && define.amd) // AMD\n    define([\"../../lib/codemirror\"], mod);\n  else // Plain browser env\n    mod(CodeMirror);\n})(function(CodeMirror) {\n  CodeMirror.defineExtension(\"addPanel\", function(node, options) {\n    if (!this.state.panels) initPanels(this);\n\n    var info = this.state.panels;\n    if (options && options.position == \"bottom\")\n      info.wrapper.appendChild(node);\n    else\n      info.wrapper.insertBefore(node, info.wrapper.firstChild);\n    var height = (options && options.height) || node.offsetHeight;\n    this._setSize(null, info.heightLeft -= height);\n    info.panels++;\n    return new Panel(this, node, options, height);\n  });\n\n  function Panel(cm, node, options, height) {\n    this.cm = cm;\n    this.node = node;\n    this.options = options;\n    this.height = height;\n    this.cleared = false;\n  }\n\n  Panel.prototype.clear = function() {\n    if (this.cleared) return;\n    this.cleared = true;\n    var info = this.cm.state.panels;\n    this.cm._setSize(null, info.heightLeft += this.height);\n    info.wrapper.removeChild(this.node);\n    if (--info.panels == 0) removePanels(this.cm);\n  };\n\n  Panel.prototype.changed = function(height) {\n    var newHeight = height == null ? this.node.offsetHeight : height;\n    var info = this.cm.state.panels;\n    this.cm._setSize(null, info.height += (newHeight - this.height));\n    this.height = newHeight;\n  };\n\n  function initPanels(cm) {\n    var wrap = cm.getWrapperElement();\n    var style = window.getComputedStyle ? window.getComputedStyle(wrap) : wrap.currentStyle;\n    var height = parseInt(style.height);\n    var info = cm.state.panels = {\n      setHeight: wrap.style.height,\n      heightLeft: height,\n      panels: 0,\n      wrapper: document.createElement(\"div\")\n    };\n    wrap.parentNode.insertBefore(info.wrapper, wrap);\n    var hasFocus = cm.hasFocus();\n    info.wrapper.appendChild(wrap);\n    if (hasFocus) cm.focus();\n\n    cm._setSize = cm.setSize;\n    if (height != null) cm.setSize = function(width, newHeight) {\n      if (newHeight == null) return this._setSize(width, newHeight);\n      info.setHeight = newHeight;\n      if (typeof newHeight != \"number\") {\n        var px = /^(\\d+\\.?\\d*)px$/.exec(newHeight);\n        if (px) {\n          newHeight = Number(px[1]);\n        } else {\n          info.wrapper.style.height = newHeight;\n          newHeight = info.wrapper.offsetHeight;\n          info.wrapper.style.height = \"\";\n        }\n      }\n      cm._setSize(width, info.heightLeft += (newHeight - height));\n      height = newHeight;\n    };\n  }\n\n  function removePanels(cm) {\n    var info = cm.state.panels;\n    cm.state.panels = null;\n\n    var wrap = cm.getWrapperElement();\n    info.wrapper.parentNode.replaceChild(wrap, info.wrapper);\n    wrap.style.height = info.setHeight;\n    cm.setSize = cm._setSize;\n    cm.setSize();\n  }\n});\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/addon/display/placeholder.js",
    "content": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n(function(mod) {\n  if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n    mod(require(\"../../lib/codemirror\"));\n  else if (typeof define == \"function\" && define.amd) // AMD\n    define([\"../../lib/codemirror\"], mod);\n  else // Plain browser env\n    mod(CodeMirror);\n})(function(CodeMirror) {\n  CodeMirror.defineOption(\"placeholder\", \"\", function(cm, val, old) {\n    var prev = old && old != CodeMirror.Init;\n    if (val && !prev) {\n      cm.on(\"blur\", onBlur);\n      cm.on(\"change\", onChange);\n      onChange(cm);\n    } else if (!val && prev) {\n      cm.off(\"blur\", onBlur);\n      cm.off(\"change\", onChange);\n      clearPlaceholder(cm);\n      var wrapper = cm.getWrapperElement();\n      wrapper.className = wrapper.className.replace(\" CodeMirror-empty\", \"\");\n    }\n\n    if (val && !cm.hasFocus()) onBlur(cm);\n  });\n\n  function clearPlaceholder(cm) {\n    if (cm.state.placeholder) {\n      cm.state.placeholder.parentNode.removeChild(cm.state.placeholder);\n      cm.state.placeholder = null;\n    }\n  }\n  function setPlaceholder(cm) {\n    clearPlaceholder(cm);\n    var elt = cm.state.placeholder = document.createElement(\"pre\");\n    elt.style.cssText = \"height: 0; overflow: visible\";\n    elt.className = \"CodeMirror-placeholder\";\n    elt.appendChild(document.createTextNode(cm.getOption(\"placeholder\")));\n    cm.display.lineSpace.insertBefore(elt, cm.display.lineSpace.firstChild);\n  }\n\n  function onBlur(cm) {\n    if (isEmpty(cm)) setPlaceholder(cm);\n  }\n  function onChange(cm) {\n    var wrapper = cm.getWrapperElement(), empty = isEmpty(cm);\n    wrapper.className = wrapper.className.replace(\" CodeMirror-empty\", \"\") + (empty ? \" CodeMirror-empty\" : \"\");\n\n    if (empty) setPlaceholder(cm);\n    else clearPlaceholder(cm);\n  }\n\n  function isEmpty(cm) {\n    return (cm.lineCount() === 1) && (cm.getLine(0) === \"\");\n  }\n});\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/addon/display/rulers.js",
    "content": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n(function(mod) {\n  if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n    mod(require(\"../../lib/codemirror\"));\n  else if (typeof define == \"function\" && define.amd) // AMD\n    define([\"../../lib/codemirror\"], mod);\n  else // Plain browser env\n    mod(CodeMirror);\n})(function(CodeMirror) {\n  \"use strict\";\n\n  CodeMirror.defineOption(\"rulers\", false, function(cm, val, old) {\n    if (old && old != CodeMirror.Init) {\n      clearRulers(cm);\n      cm.off(\"refresh\", refreshRulers);\n    }\n    if (val && val.length) {\n      setRulers(cm);\n      cm.on(\"refresh\", refreshRulers);\n    }\n  });\n\n  function clearRulers(cm) {\n    for (var i = cm.display.lineSpace.childNodes.length - 1; i >= 0; i--) {\n      var node = cm.display.lineSpace.childNodes[i];\n      if (/(^|\\s)CodeMirror-ruler($|\\s)/.test(node.className))\n        node.parentNode.removeChild(node);\n    }\n  }\n\n  function setRulers(cm) {\n    var val = cm.getOption(\"rulers\");\n    var cw = cm.defaultCharWidth();\n    var left = cm.charCoords(CodeMirror.Pos(cm.firstLine(), 0), \"div\").left;\n    var minH = cm.display.scroller.offsetHeight + 30;\n    for (var i = 0; i < val.length; i++) {\n      var elt = document.createElement(\"div\");\n      elt.className = \"CodeMirror-ruler\";\n      var col, cls = null, conf = val[i];\n      if (typeof conf == \"number\") {\n        col = conf;\n      } else {\n        col = conf.column;\n        if (conf.className) elt.className += \" \" + conf.className;\n        if (conf.color) elt.style.borderColor = conf.color;\n        if (conf.lineStyle) elt.style.borderLeftStyle = conf.lineStyle;\n        if (conf.width) elt.style.borderLeftWidth = conf.width;\n        cls = val[i].className;\n      }\n      elt.style.left = (left + col * cw) + \"px\";\n      elt.style.top = \"-50px\";\n      elt.style.bottom = \"-20px\";\n      elt.style.minHeight = minH + \"px\";\n      cm.display.lineSpace.insertBefore(elt, cm.display.cursorDiv);\n    }\n  }\n\n  function refreshRulers(cm) {\n    clearRulers(cm);\n    setRulers(cm);\n  }\n});\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/addon/edit/closebrackets.js",
    "content": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n(function(mod) {\n  if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n    mod(require(\"../../lib/codemirror\"));\n  else if (typeof define == \"function\" && define.amd) // AMD\n    define([\"../../lib/codemirror\"], mod);\n  else // Plain browser env\n    mod(CodeMirror);\n})(function(CodeMirror) {\n  var DEFAULT_BRACKETS = \"()[]{}''\\\"\\\"\";\n  var DEFAULT_TRIPLES = \"'\\\"\";\n  var DEFAULT_EXPLODE_ON_ENTER = \"[]{}\";\n  var SPACE_CHAR_REGEX = /\\s/;\n\n  var Pos = CodeMirror.Pos;\n\n  CodeMirror.defineOption(\"autoCloseBrackets\", false, function(cm, val, old) {\n    if (old != CodeMirror.Init && old)\n      cm.removeKeyMap(\"autoCloseBrackets\");\n    if (!val) return;\n    var pairs = DEFAULT_BRACKETS, triples = DEFAULT_TRIPLES, explode = DEFAULT_EXPLODE_ON_ENTER;\n    if (typeof val == \"string\") pairs = val;\n    else if (typeof val == \"object\") {\n      if (val.pairs != null) pairs = val.pairs;\n      if (val.triples != null) triples = val.triples;\n      if (val.explode != null) explode = val.explode;\n    }\n    var map = buildKeymap(pairs, triples);\n    if (explode) map.Enter = buildExplodeHandler(explode);\n    cm.addKeyMap(map);\n  });\n\n  function charsAround(cm, pos) {\n    var str = cm.getRange(Pos(pos.line, pos.ch - 1),\n                          Pos(pos.line, pos.ch + 1));\n    return str.length == 2 ? str : null;\n  }\n\n  // Project the token type that will exists after the given char is\n  // typed, and use it to determine whether it would cause the start\n  // of a string token.\n  function enteringString(cm, pos, ch) {\n    var line = cm.getLine(pos.line);\n    var token = cm.getTokenAt(pos);\n    if (/\\bstring2?\\b/.test(token.type)) return false;\n    var stream = new CodeMirror.StringStream(line.slice(0, pos.ch) + ch + line.slice(pos.ch), 4);\n    stream.pos = stream.start = token.start;\n    for (;;) {\n      var type1 = cm.getMode().token(stream, token.state);\n      if (stream.pos >= pos.ch + 1) return /\\bstring2?\\b/.test(type1);\n      stream.start = stream.pos;\n    }\n  }\n\n  function buildKeymap(pairs, triples) {\n    var map = {\n      name : \"autoCloseBrackets\",\n      Backspace: function(cm) {\n        if (cm.getOption(\"disableInput\")) return CodeMirror.Pass;\n        var ranges = cm.listSelections();\n        for (var i = 0; i < ranges.length; i++) {\n          if (!ranges[i].empty()) return CodeMirror.Pass;\n          var around = charsAround(cm, ranges[i].head);\n          if (!around || pairs.indexOf(around) % 2 != 0) return CodeMirror.Pass;\n        }\n        for (var i = ranges.length - 1; i >= 0; i--) {\n          var cur = ranges[i].head;\n          cm.replaceRange(\"\", Pos(cur.line, cur.ch - 1), Pos(cur.line, cur.ch + 1));\n        }\n      }\n    };\n    var closingBrackets = \"\";\n    for (var i = 0; i < pairs.length; i += 2) (function(left, right) {\n      closingBrackets += right;\n      map[\"'\" + left + \"'\"] = function(cm) {\n        if (cm.getOption(\"disableInput\")) return CodeMirror.Pass;\n        var ranges = cm.listSelections(), type, next;\n        for (var i = 0; i < ranges.length; i++) {\n          var range = ranges[i], cur = range.head, curType;\n          var next = cm.getRange(cur, Pos(cur.line, cur.ch + 1));\n          if (!range.empty()) {\n            curType = \"surround\";\n          } else if (left == right && next == right) {\n            if (cm.getRange(cur, Pos(cur.line, cur.ch + 3)) == left + left + left)\n              curType = \"skipThree\";\n            else\n              curType = \"skip\";\n          } else if (left == right && cur.ch > 1 && triples.indexOf(left) >= 0 &&\n                     cm.getRange(Pos(cur.line, cur.ch - 2), cur) == left + left &&\n                     (cur.ch <= 2 || cm.getRange(Pos(cur.line, cur.ch - 3), Pos(cur.line, cur.ch - 2)) != left)) {\n            curType = \"addFour\";\n          } else if (left == '\"' || left == \"'\") {\n            if (!CodeMirror.isWordChar(next) && enteringString(cm, cur, left)) curType = \"both\";\n            else return CodeMirror.Pass;\n          } else if (cm.getLine(cur.line).length == cur.ch || closingBrackets.indexOf(next) >= 0 || SPACE_CHAR_REGEX.test(next)) {\n            curType = \"both\";\n          } else {\n            return CodeMirror.Pass;\n          }\n          if (!type) type = curType;\n          else if (type != curType) return CodeMirror.Pass;\n        }\n\n        cm.operation(function() {\n          if (type == \"skip\") {\n            cm.execCommand(\"goCharRight\");\n          } else if (type == \"skipThree\") {\n            for (var i = 0; i < 3; i++)\n              cm.execCommand(\"goCharRight\");\n          } else if (type == \"surround\") {\n            var sels = cm.getSelections();\n            for (var i = 0; i < sels.length; i++)\n              sels[i] = left + sels[i] + right;\n            cm.replaceSelections(sels, \"around\");\n          } else if (type == \"both\") {\n            cm.replaceSelection(left + right, null);\n            cm.execCommand(\"goCharLeft\");\n          } else if (type == \"addFour\") {\n            cm.replaceSelection(left + left + left + left, \"before\");\n            cm.execCommand(\"goCharRight\");\n          }\n        });\n      };\n      if (left != right) map[\"'\" + right + \"'\"] = function(cm) {\n        var ranges = cm.listSelections();\n        for (var i = 0; i < ranges.length; i++) {\n          var range = ranges[i];\n          if (!range.empty() ||\n              cm.getRange(range.head, Pos(range.head.line, range.head.ch + 1)) != right)\n            return CodeMirror.Pass;\n        }\n        cm.execCommand(\"goCharRight\");\n      };\n    })(pairs.charAt(i), pairs.charAt(i + 1));\n    return map;\n  }\n\n  function buildExplodeHandler(pairs) {\n    return function(cm) {\n      if (cm.getOption(\"disableInput\")) return CodeMirror.Pass;\n      var ranges = cm.listSelections();\n      for (var i = 0; i < ranges.length; i++) {\n        if (!ranges[i].empty()) return CodeMirror.Pass;\n        var around = charsAround(cm, ranges[i].head);\n        if (!around || pairs.indexOf(around) % 2 != 0) return CodeMirror.Pass;\n      }\n      cm.operation(function() {\n        cm.replaceSelection(\"\\n\\n\", null);\n        cm.execCommand(\"goCharLeft\");\n        ranges = cm.listSelections();\n        for (var i = 0; i < ranges.length; i++) {\n          var line = ranges[i].head.line;\n          cm.indentLine(line, null, true);\n          cm.indentLine(line + 1, null, true);\n        }\n      });\n    };\n  }\n});\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/addon/edit/closetag.js",
    "content": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n/**\n * Tag-closer extension for CodeMirror.\n *\n * This extension adds an \"autoCloseTags\" option that can be set to\n * either true to get the default behavior, or an object to further\n * configure its behavior.\n *\n * These are supported options:\n *\n * `whenClosing` (default true)\n *   Whether to autoclose when the '/' of a closing tag is typed.\n * `whenOpening` (default true)\n *   Whether to autoclose the tag when the final '>' of an opening\n *   tag is typed.\n * `dontCloseTags` (default is empty tags for HTML, none for XML)\n *   An array of tag names that should not be autoclosed.\n * `indentTags` (default is block tags for HTML, none for XML)\n *   An array of tag names that should, when opened, cause a\n *   blank line to be added inside the tag, and the blank line and\n *   closing line to be indented.\n *\n * See demos/closetag.html for a usage example.\n */\n\n(function(mod) {\n  if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n    mod(require(\"../../lib/codemirror\"), require(\"../fold/xml-fold\"));\n  else if (typeof define == \"function\" && define.amd) // AMD\n    define([\"../../lib/codemirror\", \"../fold/xml-fold\"], mod);\n  else // Plain browser env\n    mod(CodeMirror);\n})(function(CodeMirror) {\n  CodeMirror.defineOption(\"autoCloseTags\", false, function(cm, val, old) {\n    if (old != CodeMirror.Init && old)\n      cm.removeKeyMap(\"autoCloseTags\");\n    if (!val) return;\n    var map = {name: \"autoCloseTags\"};\n    if (typeof val != \"object\" || val.whenClosing)\n      map[\"'/'\"] = function(cm) { return autoCloseSlash(cm); };\n    if (typeof val != \"object\" || val.whenOpening)\n      map[\"'>'\"] = function(cm) { return autoCloseGT(cm); };\n    cm.addKeyMap(map);\n  });\n\n  var htmlDontClose = [\"area\", \"base\", \"br\", \"col\", \"command\", \"embed\", \"hr\", \"img\", \"input\", \"keygen\", \"link\", \"meta\", \"param\",\n                       \"source\", \"track\", \"wbr\"];\n  var htmlIndent = [\"applet\", \"blockquote\", \"body\", \"button\", \"div\", \"dl\", \"fieldset\", \"form\", \"frameset\", \"h1\", \"h2\", \"h3\", \"h4\",\n                    \"h5\", \"h6\", \"head\", \"html\", \"iframe\", \"layer\", \"legend\", \"object\", \"ol\", \"p\", \"select\", \"table\", \"ul\"];\n\n  function autoCloseGT(cm) {\n    if (cm.getOption(\"disableInput\")) return CodeMirror.Pass;\n    var ranges = cm.listSelections(), replacements = [];\n    for (var i = 0; i < ranges.length; i++) {\n      if (!ranges[i].empty()) return CodeMirror.Pass;\n      var pos = ranges[i].head, tok = cm.getTokenAt(pos);\n      var inner = CodeMirror.innerMode(cm.getMode(), tok.state), state = inner.state;\n      if (inner.mode.name != \"xml\" || !state.tagName) return CodeMirror.Pass;\n\n      var opt = cm.getOption(\"autoCloseTags\"), html = inner.mode.configuration == \"html\";\n      var dontCloseTags = (typeof opt == \"object\" && opt.dontCloseTags) || (html && htmlDontClose);\n      var indentTags = (typeof opt == \"object\" && opt.indentTags) || (html && htmlIndent);\n\n      var tagName = state.tagName;\n      if (tok.end > pos.ch) tagName = tagName.slice(0, tagName.length - tok.end + pos.ch);\n      var lowerTagName = tagName.toLowerCase();\n      // Don't process the '>' at the end of an end-tag or self-closing tag\n      if (!tagName ||\n          tok.type == \"string\" && (tok.end != pos.ch || !/[\\\"\\']/.test(tok.string.charAt(tok.string.length - 1)) || tok.string.length == 1) ||\n          tok.type == \"tag\" && state.type == \"closeTag\" ||\n          tok.string.indexOf(\"/\") == (tok.string.length - 1) || // match something like <someTagName />\n          dontCloseTags && indexOf(dontCloseTags, lowerTagName) > -1 ||\n          closingTagExists(cm, tagName, pos, state, true))\n        return CodeMirror.Pass;\n\n      var indent = indentTags && indexOf(indentTags, lowerTagName) > -1;\n      replacements[i] = {indent: indent,\n                         text: \">\" + (indent ? \"\\n\\n\" : \"\") + \"</\" + tagName + \">\",\n                         newPos: indent ? CodeMirror.Pos(pos.line + 1, 0) : CodeMirror.Pos(pos.line, pos.ch + 1)};\n    }\n\n    for (var i = ranges.length - 1; i >= 0; i--) {\n      var info = replacements[i];\n      cm.replaceRange(info.text, ranges[i].head, ranges[i].anchor, \"+insert\");\n      var sel = cm.listSelections().slice(0);\n      sel[i] = {head: info.newPos, anchor: info.newPos};\n      cm.setSelections(sel);\n      if (info.indent) {\n        cm.indentLine(info.newPos.line, null, true);\n        cm.indentLine(info.newPos.line + 1, null, true);\n      }\n    }\n  }\n\n  function autoCloseCurrent(cm, typingSlash) {\n    var ranges = cm.listSelections(), replacements = [];\n    var head = typingSlash ? \"/\" : \"</\";\n    for (var i = 0; i < ranges.length; i++) {\n      if (!ranges[i].empty()) return CodeMirror.Pass;\n      var pos = ranges[i].head, tok = cm.getTokenAt(pos);\n      var inner = CodeMirror.innerMode(cm.getMode(), tok.state), state = inner.state;\n      if (typingSlash && (tok.type == \"string\" || tok.string.charAt(0) != \"<\" ||\n                          tok.start != pos.ch - 1))\n        return CodeMirror.Pass;\n      // Kludge to get around the fact that we are not in XML mode\n      // when completing in JS/CSS snippet in htmlmixed mode. Does not\n      // work for other XML embedded languages (there is no general\n      // way to go from a mixed mode to its current XML state).\n      if (inner.mode.name != \"xml\") {\n        if (cm.getMode().name == \"htmlmixed\" && inner.mode.name == \"javascript\")\n          replacements[i] = head + \"script>\";\n        else if (cm.getMode().name == \"htmlmixed\" && inner.mode.name == \"css\")\n          replacements[i] = head + \"style>\";\n        else\n          return CodeMirror.Pass;\n      } else {\n        if (!state.context || !state.context.tagName ||\n            closingTagExists(cm, state.context.tagName, pos, state))\n          return CodeMirror.Pass;\n        replacements[i] = head + state.context.tagName + \">\";\n      }\n    }\n    cm.replaceSelections(replacements);\n    ranges = cm.listSelections();\n    for (var i = 0; i < ranges.length; i++)\n      if (i == ranges.length - 1 || ranges[i].head.line < ranges[i + 1].head.line)\n        cm.indentLine(ranges[i].head.line);\n  }\n\n  function autoCloseSlash(cm) {\n    if (cm.getOption(\"disableInput\")) return CodeMirror.Pass;\n    return autoCloseCurrent(cm, true);\n  }\n\n  CodeMirror.commands.closeTag = function(cm) { return autoCloseCurrent(cm); };\n\n  function indexOf(collection, elt) {\n    if (collection.indexOf) return collection.indexOf(elt);\n    for (var i = 0, e = collection.length; i < e; ++i)\n      if (collection[i] == elt) return i;\n    return -1;\n  }\n\n  // If xml-fold is loaded, we use its functionality to try and verify\n  // whether a given tag is actually unclosed.\n  function closingTagExists(cm, tagName, pos, state, newTag) {\n    if (!CodeMirror.scanForClosingTag) return false;\n    var end = Math.min(cm.lastLine() + 1, pos.line + 500);\n    var nextClose = CodeMirror.scanForClosingTag(cm, pos, null, end);\n    if (!nextClose || nextClose.tag != tagName) return false;\n    var cx = state.context;\n    // If the immediate wrapping context contains onCx instances of\n    // the same tag, a closing tag only exists if there are at least\n    // that many closing tags of that type following.\n    for (var onCx = newTag ? 1 : 0; cx && cx.tagName == tagName; cx = cx.prev) ++onCx;\n    pos = nextClose.to;\n    for (var i = 1; i < onCx; i++) {\n      var next = CodeMirror.scanForClosingTag(cm, pos, null, end);\n      if (!next || next.tag != tagName) return false;\n      pos = next.to;\n    }\n    return true;\n  }\n});\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/addon/edit/continuelist.js",
    "content": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n(function(mod) {\n  if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n    mod(require(\"../../lib/codemirror\"));\n  else if (typeof define == \"function\" && define.amd) // AMD\n    define([\"../../lib/codemirror\"], mod);\n  else // Plain browser env\n    mod(CodeMirror);\n})(function(CodeMirror) {\n  \"use strict\";\n\n  var listRE = /^(\\s*)(>[> ]*|[*+-]\\s|(\\d+)\\.)(\\s*)/,\n      emptyListRE = /^(\\s*)(>[> ]*|[*+-]|(\\d+)\\.)(\\s*)$/,\n      unorderedListRE = /[*+-]\\s/;\n\n  CodeMirror.commands.newlineAndIndentContinueMarkdownList = function(cm) {\n    if (cm.getOption(\"disableInput\")) return CodeMirror.Pass;\n    var ranges = cm.listSelections(), replacements = [];\n    for (var i = 0; i < ranges.length; i++) {\n      var pos = ranges[i].head, match;\n      var eolState = cm.getStateAfter(pos.line);\n      var inList = eolState.list !== false;\n      var inQuote = eolState.quote !== false;\n\n      if (!ranges[i].empty() || (!inList && !inQuote) || !(match = cm.getLine(pos.line).match(listRE))) {\n        cm.execCommand(\"newlineAndIndent\");\n        return;\n      }\n      if (cm.getLine(pos.line).match(emptyListRE)) {\n        cm.replaceRange(\"\", {\n          line: pos.line, ch: 0\n        }, {\n          line: pos.line, ch: pos.ch + 1\n        });\n        replacements[i] = \"\\n\";\n\n      } else {\n        var indent = match[1], after = match[4];\n        var bullet = unorderedListRE.test(match[2]) || match[2].indexOf(\">\") >= 0\n          ? match[2]\n          : (parseInt(match[3], 10) + 1) + \".\";\n\n        replacements[i] = \"\\n\" + indent + bullet + after;\n      }\n    }\n\n    cm.replaceSelections(replacements);\n  };\n});\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/addon/edit/matchbrackets.js",
    "content": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n(function(mod) {\n  if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n    mod(require(\"../../lib/codemirror\"));\n  else if (typeof define == \"function\" && define.amd) // AMD\n    define([\"../../lib/codemirror\"], mod);\n  else // Plain browser env\n    mod(CodeMirror);\n})(function(CodeMirror) {\n  var ie_lt8 = /MSIE \\d/.test(navigator.userAgent) &&\n    (document.documentMode == null || document.documentMode < 8);\n\n  var Pos = CodeMirror.Pos;\n\n  var matching = {\"(\": \")>\", \")\": \"(<\", \"[\": \"]>\", \"]\": \"[<\", \"{\": \"}>\", \"}\": \"{<\"};\n\n  function findMatchingBracket(cm, where, strict, config) {\n    var line = cm.getLineHandle(where.line), pos = where.ch - 1;\n    var match = (pos >= 0 && matching[line.text.charAt(pos)]) || matching[line.text.charAt(++pos)];\n    if (!match) return null;\n    var dir = match.charAt(1) == \">\" ? 1 : -1;\n    if (strict && (dir > 0) != (pos == where.ch)) return null;\n    var style = cm.getTokenTypeAt(Pos(where.line, pos + 1));\n\n    var found = scanForBracket(cm, Pos(where.line, pos + (dir > 0 ? 1 : 0)), dir, style || null, config);\n    if (found == null) return null;\n    return {from: Pos(where.line, pos), to: found && found.pos,\n            match: found && found.ch == match.charAt(0), forward: dir > 0};\n  }\n\n  // bracketRegex is used to specify which type of bracket to scan\n  // should be a regexp, e.g. /[[\\]]/\n  //\n  // Note: If \"where\" is on an open bracket, then this bracket is ignored.\n  //\n  // Returns false when no bracket was found, null when it reached\n  // maxScanLines and gave up\n  function scanForBracket(cm, where, dir, style, config) {\n    var maxScanLen = (config && config.maxScanLineLength) || 10000;\n    var maxScanLines = (config && config.maxScanLines) || 1000;\n\n    var stack = [];\n    var re = config && config.bracketRegex ? config.bracketRegex : /[(){}[\\]]/;\n    var lineEnd = dir > 0 ? Math.min(where.line + maxScanLines, cm.lastLine() + 1)\n                          : Math.max(cm.firstLine() - 1, where.line - maxScanLines);\n    for (var lineNo = where.line; lineNo != lineEnd; lineNo += dir) {\n      var line = cm.getLine(lineNo);\n      if (!line) continue;\n      var pos = dir > 0 ? 0 : line.length - 1, end = dir > 0 ? line.length : -1;\n      if (line.length > maxScanLen) continue;\n      if (lineNo == where.line) pos = where.ch - (dir < 0 ? 1 : 0);\n      for (; pos != end; pos += dir) {\n        var ch = line.charAt(pos);\n        if (re.test(ch) && (style === undefined || cm.getTokenTypeAt(Pos(lineNo, pos + 1)) == style)) {\n          var match = matching[ch];\n          if ((match.charAt(1) == \">\") == (dir > 0)) stack.push(ch);\n          else if (!stack.length) return {pos: Pos(lineNo, pos), ch: ch};\n          else stack.pop();\n        }\n      }\n    }\n    return lineNo - dir == (dir > 0 ? cm.lastLine() : cm.firstLine()) ? false : null;\n  }\n\n  function matchBrackets(cm, autoclear, config) {\n    // Disable brace matching in long lines, since it'll cause hugely slow updates\n    var maxHighlightLen = cm.state.matchBrackets.maxHighlightLineLength || 1000;\n    var marks = [], ranges = cm.listSelections();\n    for (var i = 0; i < ranges.length; i++) {\n      var match = ranges[i].empty() && findMatchingBracket(cm, ranges[i].head, false, config);\n      if (match && cm.getLine(match.from.line).length <= maxHighlightLen) {\n        var style = match.match ? \"CodeMirror-matchingbracket\" : \"CodeMirror-nonmatchingbracket\";\n        marks.push(cm.markText(match.from, Pos(match.from.line, match.from.ch + 1), {className: style}));\n        if (match.to && cm.getLine(match.to.line).length <= maxHighlightLen)\n          marks.push(cm.markText(match.to, Pos(match.to.line, match.to.ch + 1), {className: style}));\n      }\n    }\n\n    if (marks.length) {\n      // Kludge to work around the IE bug from issue #1193, where text\n      // input stops going to the textare whever this fires.\n      if (ie_lt8 && cm.state.focused) cm.focus();\n\n      var clear = function() {\n        cm.operation(function() {\n          for (var i = 0; i < marks.length; i++) marks[i].clear();\n        });\n      };\n      if (autoclear) setTimeout(clear, 800);\n      else return clear;\n    }\n  }\n\n  var currentlyHighlighted = null;\n  function doMatchBrackets(cm) {\n    cm.operation(function() {\n      if (currentlyHighlighted) {currentlyHighlighted(); currentlyHighlighted = null;}\n      currentlyHighlighted = matchBrackets(cm, false, cm.state.matchBrackets);\n    });\n  }\n\n  CodeMirror.defineOption(\"matchBrackets\", false, function(cm, val, old) {\n    if (old && old != CodeMirror.Init)\n      cm.off(\"cursorActivity\", doMatchBrackets);\n    if (val) {\n      cm.state.matchBrackets = typeof val == \"object\" ? val : {};\n      cm.on(\"cursorActivity\", doMatchBrackets);\n    }\n  });\n\n  CodeMirror.defineExtension(\"matchBrackets\", function() {matchBrackets(this, true);});\n  CodeMirror.defineExtension(\"findMatchingBracket\", function(pos, strict, config){\n    return findMatchingBracket(this, pos, strict, config);\n  });\n  CodeMirror.defineExtension(\"scanForBracket\", function(pos, dir, style, config){\n    return scanForBracket(this, pos, dir, style, config);\n  });\n});\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/addon/edit/matchtags.js",
    "content": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n(function(mod) {\n  if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n    mod(require(\"../../lib/codemirror\"), require(\"../fold/xml-fold\"));\n  else if (typeof define == \"function\" && define.amd) // AMD\n    define([\"../../lib/codemirror\", \"../fold/xml-fold\"], mod);\n  else // Plain browser env\n    mod(CodeMirror);\n})(function(CodeMirror) {\n  \"use strict\";\n\n  CodeMirror.defineOption(\"matchTags\", false, function(cm, val, old) {\n    if (old && old != CodeMirror.Init) {\n      cm.off(\"cursorActivity\", doMatchTags);\n      cm.off(\"viewportChange\", maybeUpdateMatch);\n      clear(cm);\n    }\n    if (val) {\n      cm.state.matchBothTags = typeof val == \"object\" && val.bothTags;\n      cm.on(\"cursorActivity\", doMatchTags);\n      cm.on(\"viewportChange\", maybeUpdateMatch);\n      doMatchTags(cm);\n    }\n  });\n\n  function clear(cm) {\n    if (cm.state.tagHit) cm.state.tagHit.clear();\n    if (cm.state.tagOther) cm.state.tagOther.clear();\n    cm.state.tagHit = cm.state.tagOther = null;\n  }\n\n  function doMatchTags(cm) {\n    cm.state.failedTagMatch = false;\n    cm.operation(function() {\n      clear(cm);\n      if (cm.somethingSelected()) return;\n      var cur = cm.getCursor(), range = cm.getViewport();\n      range.from = Math.min(range.from, cur.line); range.to = Math.max(cur.line + 1, range.to);\n      var match = CodeMirror.findMatchingTag(cm, cur, range);\n      if (!match) return;\n      if (cm.state.matchBothTags) {\n        var hit = match.at == \"open\" ? match.open : match.close;\n        if (hit) cm.state.tagHit = cm.markText(hit.from, hit.to, {className: \"CodeMirror-matchingtag\"});\n      }\n      var other = match.at == \"close\" ? match.open : match.close;\n      if (other)\n        cm.state.tagOther = cm.markText(other.from, other.to, {className: \"CodeMirror-matchingtag\"});\n      else\n        cm.state.failedTagMatch = true;\n    });\n  }\n\n  function maybeUpdateMatch(cm) {\n    if (cm.state.failedTagMatch) doMatchTags(cm);\n  }\n\n  CodeMirror.commands.toMatchingTag = function(cm) {\n    var found = CodeMirror.findMatchingTag(cm, cm.getCursor());\n    if (found) {\n      var other = found.at == \"close\" ? found.open : found.close;\n      if (other) cm.extendSelection(other.to, other.from);\n    }\n  };\n});\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/addon/edit/trailingspace.js",
    "content": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n(function(mod) {\n  if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n    mod(require(\"../../lib/codemirror\"));\n  else if (typeof define == \"function\" && define.amd) // AMD\n    define([\"../../lib/codemirror\"], mod);\n  else // Plain browser env\n    mod(CodeMirror);\n})(function(CodeMirror) {\n  CodeMirror.defineOption(\"showTrailingSpace\", false, function(cm, val, prev) {\n    if (prev == CodeMirror.Init) prev = false;\n    if (prev && !val)\n      cm.removeOverlay(\"trailingspace\");\n    else if (!prev && val)\n      cm.addOverlay({\n        token: function(stream) {\n          for (var l = stream.string.length, i = l; i && /\\s/.test(stream.string.charAt(i - 1)); --i) {}\n          if (i > stream.pos) { stream.pos = i; return null; }\n          stream.pos = l;\n          return \"trailingspace\";\n        },\n        name: \"trailingspace\"\n      });\n  });\n});\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/addon/fold/brace-fold.js",
    "content": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n(function(mod) {\n  if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n    mod(require(\"../../lib/codemirror\"));\n  else if (typeof define == \"function\" && define.amd) // AMD\n    define([\"../../lib/codemirror\"], mod);\n  else // Plain browser env\n    mod(CodeMirror);\n})(function(CodeMirror) {\n\"use strict\";\n\nCodeMirror.registerHelper(\"fold\", \"brace\", function(cm, start) {\n  var line = start.line, lineText = cm.getLine(line);\n  var startCh, tokenType;\n\n  function findOpening(openCh) {\n    for (var at = start.ch, pass = 0;;) {\n      var found = at <= 0 ? -1 : lineText.lastIndexOf(openCh, at - 1);\n      if (found == -1) {\n        if (pass == 1) break;\n        pass = 1;\n        at = lineText.length;\n        continue;\n      }\n      if (pass == 1 && found < start.ch) break;\n      tokenType = cm.getTokenTypeAt(CodeMirror.Pos(line, found + 1));\n      if (!/^(comment|string)/.test(tokenType)) return found + 1;\n      at = found - 1;\n    }\n  }\n\n  var startToken = \"{\", endToken = \"}\", startCh = findOpening(\"{\");\n  if (startCh == null) {\n    startToken = \"[\", endToken = \"]\";\n    startCh = findOpening(\"[\");\n  }\n\n  if (startCh == null) return;\n  var count = 1, lastLine = cm.lastLine(), end, endCh;\n  outer: for (var i = line; i <= lastLine; ++i) {\n    var text = cm.getLine(i), pos = i == line ? startCh : 0;\n    for (;;) {\n      var nextOpen = text.indexOf(startToken, pos), nextClose = text.indexOf(endToken, pos);\n      if (nextOpen < 0) nextOpen = text.length;\n      if (nextClose < 0) nextClose = text.length;\n      pos = Math.min(nextOpen, nextClose);\n      if (pos == text.length) break;\n      if (cm.getTokenTypeAt(CodeMirror.Pos(i, pos + 1)) == tokenType) {\n        if (pos == nextOpen) ++count;\n        else if (!--count) { end = i; endCh = pos; break outer; }\n      }\n      ++pos;\n    }\n  }\n  if (end == null || line == end && endCh == startCh) return;\n  return {from: CodeMirror.Pos(line, startCh),\n          to: CodeMirror.Pos(end, endCh)};\n});\n\nCodeMirror.registerHelper(\"fold\", \"import\", function(cm, start) {\n  function hasImport(line) {\n    if (line < cm.firstLine() || line > cm.lastLine()) return null;\n    var start = cm.getTokenAt(CodeMirror.Pos(line, 1));\n    if (!/\\S/.test(start.string)) start = cm.getTokenAt(CodeMirror.Pos(line, start.end + 1));\n    if (start.type != \"keyword\" || start.string != \"import\") return null;\n    // Now find closing semicolon, return its position\n    for (var i = line, e = Math.min(cm.lastLine(), line + 10); i <= e; ++i) {\n      var text = cm.getLine(i), semi = text.indexOf(\";\");\n      if (semi != -1) return {startCh: start.end, end: CodeMirror.Pos(i, semi)};\n    }\n  }\n\n  var start = start.line, has = hasImport(start), prev;\n  if (!has || hasImport(start - 1) || ((prev = hasImport(start - 2)) && prev.end.line == start - 1))\n    return null;\n  for (var end = has.end;;) {\n    var next = hasImport(end.line + 1);\n    if (next == null) break;\n    end = next.end;\n  }\n  return {from: cm.clipPos(CodeMirror.Pos(start, has.startCh + 1)), to: end};\n});\n\nCodeMirror.registerHelper(\"fold\", \"include\", function(cm, start) {\n  function hasInclude(line) {\n    if (line < cm.firstLine() || line > cm.lastLine()) return null;\n    var start = cm.getTokenAt(CodeMirror.Pos(line, 1));\n    if (!/\\S/.test(start.string)) start = cm.getTokenAt(CodeMirror.Pos(line, start.end + 1));\n    if (start.type == \"meta\" && start.string.slice(0, 8) == \"#include\") return start.start + 8;\n  }\n\n  var start = start.line, has = hasInclude(start);\n  if (has == null || hasInclude(start - 1) != null) return null;\n  for (var end = start;;) {\n    var next = hasInclude(end + 1);\n    if (next == null) break;\n    ++end;\n  }\n  return {from: CodeMirror.Pos(start, has + 1),\n          to: cm.clipPos(CodeMirror.Pos(end))};\n});\n\n});\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/addon/fold/comment-fold.js",
    "content": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n(function(mod) {\n  if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n    mod(require(\"../../lib/codemirror\"));\n  else if (typeof define == \"function\" && define.amd) // AMD\n    define([\"../../lib/codemirror\"], mod);\n  else // Plain browser env\n    mod(CodeMirror);\n})(function(CodeMirror) {\n\"use strict\";\n\nCodeMirror.registerGlobalHelper(\"fold\", \"comment\", function(mode) {\n  return mode.blockCommentStart && mode.blockCommentEnd;\n}, function(cm, start) {\n  var mode = cm.getModeAt(start), startToken = mode.blockCommentStart, endToken = mode.blockCommentEnd;\n  if (!startToken || !endToken) return;\n  var line = start.line, lineText = cm.getLine(line);\n\n  var startCh;\n  for (var at = start.ch, pass = 0;;) {\n    var found = at <= 0 ? -1 : lineText.lastIndexOf(startToken, at - 1);\n    if (found == -1) {\n      if (pass == 1) return;\n      pass = 1;\n      at = lineText.length;\n      continue;\n    }\n    if (pass == 1 && found < start.ch) return;\n    if (/comment/.test(cm.getTokenTypeAt(CodeMirror.Pos(line, found + 1)))) {\n      startCh = found + startToken.length;\n      break;\n    }\n    at = found - 1;\n  }\n\n  var depth = 1, lastLine = cm.lastLine(), end, endCh;\n  outer: for (var i = line; i <= lastLine; ++i) {\n    var text = cm.getLine(i), pos = i == line ? startCh : 0;\n    for (;;) {\n      var nextOpen = text.indexOf(startToken, pos), nextClose = text.indexOf(endToken, pos);\n      if (nextOpen < 0) nextOpen = text.length;\n      if (nextClose < 0) nextClose = text.length;\n      pos = Math.min(nextOpen, nextClose);\n      if (pos == text.length) break;\n      if (pos == nextOpen) ++depth;\n      else if (!--depth) { end = i; endCh = pos; break outer; }\n      ++pos;\n    }\n  }\n  if (end == null || line == end && endCh == startCh) return;\n  return {from: CodeMirror.Pos(line, startCh),\n          to: CodeMirror.Pos(end, endCh)};\n});\n\n});\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/addon/fold/foldcode.js",
    "content": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n(function(mod) {\n  if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n    mod(require(\"../../lib/codemirror\"));\n  else if (typeof define == \"function\" && define.amd) // AMD\n    define([\"../../lib/codemirror\"], mod);\n  else // Plain browser env\n    mod(CodeMirror);\n})(function(CodeMirror) {\n  \"use strict\";\n\n  function doFold(cm, pos, options, force) {\n    if (options && options.call) {\n      var finder = options;\n      options = null;\n    } else {\n      var finder = getOption(cm, options, \"rangeFinder\");\n    }\n    if (typeof pos == \"number\") pos = CodeMirror.Pos(pos, 0);\n    var minSize = getOption(cm, options, \"minFoldSize\");\n\n    function getRange(allowFolded) {\n      var range = finder(cm, pos);\n      if (!range || range.to.line - range.from.line < minSize) return null;\n      var marks = cm.findMarksAt(range.from);\n      for (var i = 0; i < marks.length; ++i) {\n        if (marks[i].__isFold && force !== \"fold\") {\n          if (!allowFolded) return null;\n          range.cleared = true;\n          marks[i].clear();\n        }\n      }\n      return range;\n    }\n\n    var range = getRange(true);\n    if (getOption(cm, options, \"scanUp\")) while (!range && pos.line > cm.firstLine()) {\n      pos = CodeMirror.Pos(pos.line - 1, 0);\n      range = getRange(false);\n    }\n    if (!range || range.cleared || force === \"unfold\") return;\n\n    var myWidget = makeWidget(cm, options);\n    CodeMirror.on(myWidget, \"mousedown\", function(e) {\n      myRange.clear();\n      CodeMirror.e_preventDefault(e);\n    });\n    var myRange = cm.markText(range.from, range.to, {\n      replacedWith: myWidget,\n      clearOnEnter: true,\n      __isFold: true\n    });\n    myRange.on(\"clear\", function(from, to) {\n      CodeMirror.signal(cm, \"unfold\", cm, from, to);\n    });\n    CodeMirror.signal(cm, \"fold\", cm, range.from, range.to);\n  }\n\n  function makeWidget(cm, options) {\n    var widget = getOption(cm, options, \"widget\");\n    if (typeof widget == \"string\") {\n      var text = document.createTextNode(widget);\n      widget = document.createElement(\"span\");\n      widget.appendChild(text);\n      widget.className = \"CodeMirror-foldmarker\";\n    }\n    return widget;\n  }\n\n  // Clumsy backwards-compatible interface\n  CodeMirror.newFoldFunction = function(rangeFinder, widget) {\n    return function(cm, pos) { doFold(cm, pos, {rangeFinder: rangeFinder, widget: widget}); };\n  };\n\n  // New-style interface\n  CodeMirror.defineExtension(\"foldCode\", function(pos, options, force) {\n    doFold(this, pos, options, force);\n  });\n\n  CodeMirror.defineExtension(\"isFolded\", function(pos) {\n    var marks = this.findMarksAt(pos);\n    for (var i = 0; i < marks.length; ++i)\n      if (marks[i].__isFold) return true;\n  });\n\n  CodeMirror.commands.toggleFold = function(cm) {\n    cm.foldCode(cm.getCursor());\n  };\n  CodeMirror.commands.fold = function(cm) {\n    cm.foldCode(cm.getCursor(), null, \"fold\");\n  };\n  CodeMirror.commands.unfold = function(cm) {\n    cm.foldCode(cm.getCursor(), null, \"unfold\");\n  };\n  CodeMirror.commands.foldAll = function(cm) {\n    cm.operation(function() {\n      for (var i = cm.firstLine(), e = cm.lastLine(); i <= e; i++)\n        cm.foldCode(CodeMirror.Pos(i, 0), null, \"fold\");\n    });\n  };\n  CodeMirror.commands.unfoldAll = function(cm) {\n    cm.operation(function() {\n      for (var i = cm.firstLine(), e = cm.lastLine(); i <= e; i++)\n        cm.foldCode(CodeMirror.Pos(i, 0), null, \"unfold\");\n    });\n  };\n\n  CodeMirror.registerHelper(\"fold\", \"combine\", function() {\n    var funcs = Array.prototype.slice.call(arguments, 0);\n    return function(cm, start) {\n      for (var i = 0; i < funcs.length; ++i) {\n        var found = funcs[i](cm, start);\n        if (found) return found;\n      }\n    };\n  });\n\n  CodeMirror.registerHelper(\"fold\", \"auto\", function(cm, start) {\n    var helpers = cm.getHelpers(start, \"fold\");\n    for (var i = 0; i < helpers.length; i++) {\n      var cur = helpers[i](cm, start);\n      if (cur) return cur;\n    }\n  });\n\n  var defaultOptions = {\n    rangeFinder: CodeMirror.fold.auto,\n    widget: \"\\u2194\",\n    minFoldSize: 0,\n    scanUp: false\n  };\n\n  CodeMirror.defineOption(\"foldOptions\", null);\n\n  function getOption(cm, options, name) {\n    if (options && options[name] !== undefined)\n      return options[name];\n    var editorOptions = cm.options.foldOptions;\n    if (editorOptions && editorOptions[name] !== undefined)\n      return editorOptions[name];\n    return defaultOptions[name];\n  }\n\n  CodeMirror.defineExtension(\"foldOption\", function(options, name) {\n    return getOption(this, options, name);\n  });\n});\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/addon/fold/foldgutter.css",
    "content": ".CodeMirror-foldmarker {\n  color: blue;\n  text-shadow: #b9f 1px 1px 2px, #b9f -1px -1px 2px, #b9f 1px -1px 2px, #b9f -1px 1px 2px;\n  font-family: arial;\n  line-height: .3;\n  cursor: pointer;\n}\n.CodeMirror-foldgutter {\n  width: .7em;\n}\n.CodeMirror-foldgutter-open,\n.CodeMirror-foldgutter-folded {\n  cursor: pointer;\n}\n.CodeMirror-foldgutter-open:after {\n  content: \"\\25BE\";\n}\n.CodeMirror-foldgutter-folded:after {\n  content: \"\\25B8\";\n}\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/addon/fold/foldgutter.js",
    "content": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n(function(mod) {\n  if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n    mod(require(\"../../lib/codemirror\"), require(\"./foldcode\"));\n  else if (typeof define == \"function\" && define.amd) // AMD\n    define([\"../../lib/codemirror\", \"./foldcode\"], mod);\n  else // Plain browser env\n    mod(CodeMirror);\n})(function(CodeMirror) {\n  \"use strict\";\n\n  CodeMirror.defineOption(\"foldGutter\", false, function(cm, val, old) {\n    if (old && old != CodeMirror.Init) {\n      cm.clearGutter(cm.state.foldGutter.options.gutter);\n      cm.state.foldGutter = null;\n      cm.off(\"gutterClick\", onGutterClick);\n      cm.off(\"change\", onChange);\n      cm.off(\"viewportChange\", onViewportChange);\n      cm.off(\"fold\", onFold);\n      cm.off(\"unfold\", onFold);\n      cm.off(\"swapDoc\", updateInViewport);\n    }\n    if (val) {\n      cm.state.foldGutter = new State(parseOptions(val));\n      updateInViewport(cm);\n      cm.on(\"gutterClick\", onGutterClick);\n      cm.on(\"change\", onChange);\n      cm.on(\"viewportChange\", onViewportChange);\n      cm.on(\"fold\", onFold);\n      cm.on(\"unfold\", onFold);\n      cm.on(\"swapDoc\", updateInViewport);\n    }\n  });\n\n  var Pos = CodeMirror.Pos;\n\n  function State(options) {\n    this.options = options;\n    this.from = this.to = 0;\n  }\n\n  function parseOptions(opts) {\n    if (opts === true) opts = {};\n    if (opts.gutter == null) opts.gutter = \"CodeMirror-foldgutter\";\n    if (opts.indicatorOpen == null) opts.indicatorOpen = \"CodeMirror-foldgutter-open\";\n    if (opts.indicatorFolded == null) opts.indicatorFolded = \"CodeMirror-foldgutter-folded\";\n    return opts;\n  }\n\n  function isFolded(cm, line) {\n    var marks = cm.findMarksAt(Pos(line));\n    for (var i = 0; i < marks.length; ++i)\n      if (marks[i].__isFold && marks[i].find().from.line == line) return true;\n  }\n\n  function marker(spec) {\n    if (typeof spec == \"string\") {\n      var elt = document.createElement(\"div\");\n      elt.className = spec + \" CodeMirror-guttermarker-subtle\";\n      return elt;\n    } else {\n      return spec.cloneNode(true);\n    }\n  }\n\n  function updateFoldInfo(cm, from, to) {\n    var opts = cm.state.foldGutter.options, cur = from;\n    var minSize = cm.foldOption(opts, \"minFoldSize\");\n    var func = cm.foldOption(opts, \"rangeFinder\");\n    cm.eachLine(from, to, function(line) {\n      var mark = null;\n      if (isFolded(cm, cur)) {\n        mark = marker(opts.indicatorFolded);\n      } else {\n        var pos = Pos(cur, 0);\n        var range = func && func(cm, pos);\n        if (range && range.to.line - range.from.line >= minSize)\n          mark = marker(opts.indicatorOpen);\n      }\n      cm.setGutterMarker(line, opts.gutter, mark);\n      ++cur;\n    });\n  }\n\n  function updateInViewport(cm) {\n    var vp = cm.getViewport(), state = cm.state.foldGutter;\n    if (!state) return;\n    cm.operation(function() {\n      updateFoldInfo(cm, vp.from, vp.to);\n    });\n    state.from = vp.from; state.to = vp.to;\n  }\n\n  function onGutterClick(cm, line, gutter) {\n    var state = cm.state.foldGutter;\n    if (!state) return;\n    var opts = state.options;\n    if (gutter != opts.gutter) return;\n    cm.foldCode(Pos(line, 0), opts.rangeFinder);\n  }\n\n  function onChange(cm) {\n    var state = cm.state.foldGutter;\n    if (!state) return;\n    var opts = state.options;\n    state.from = state.to = 0;\n    clearTimeout(state.changeUpdate);\n    state.changeUpdate = setTimeout(function() { updateInViewport(cm); }, opts.foldOnChangeTimeSpan || 600);\n  }\n\n  function onViewportChange(cm) {\n    var state = cm.state.foldGutter;\n    if (!state) return;\n    var opts = state.options;\n    clearTimeout(state.changeUpdate);\n    state.changeUpdate = setTimeout(function() {\n      var vp = cm.getViewport();\n      if (state.from == state.to || vp.from - state.to > 20 || state.from - vp.to > 20) {\n        updateInViewport(cm);\n      } else {\n        cm.operation(function() {\n          if (vp.from < state.from) {\n            updateFoldInfo(cm, vp.from, state.from);\n            state.from = vp.from;\n          }\n          if (vp.to > state.to) {\n            updateFoldInfo(cm, state.to, vp.to);\n            state.to = vp.to;\n          }\n        });\n      }\n    }, opts.updateViewportTimeSpan || 400);\n  }\n\n  function onFold(cm, from) {\n    var state = cm.state.foldGutter;\n    if (!state) return;\n    var line = from.line;\n    if (line >= state.from && line < state.to)\n      updateFoldInfo(cm, line, line + 1);\n  }\n});\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/addon/fold/indent-fold.js",
    "content": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n(function(mod) {\n  if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n    mod(require(\"../../lib/codemirror\"));\n  else if (typeof define == \"function\" && define.amd) // AMD\n    define([\"../../lib/codemirror\"], mod);\n  else // Plain browser env\n    mod(CodeMirror);\n})(function(CodeMirror) {\n\"use strict\";\n\nCodeMirror.registerHelper(\"fold\", \"indent\", function(cm, start) {\n  var tabSize = cm.getOption(\"tabSize\"), firstLine = cm.getLine(start.line);\n  if (!/\\S/.test(firstLine)) return;\n  var getIndent = function(line) {\n    return CodeMirror.countColumn(line, null, tabSize);\n  };\n  var myIndent = getIndent(firstLine);\n  var lastLineInFold = null;\n  // Go through lines until we find a line that definitely doesn't belong in\n  // the block we're folding, or to the end.\n  for (var i = start.line + 1, end = cm.lastLine(); i <= end; ++i) {\n    var curLine = cm.getLine(i);\n    var curIndent = getIndent(curLine);\n    if (curIndent > myIndent) {\n      // Lines with a greater indent are considered part of the block.\n      lastLineInFold = i;\n    } else if (!/\\S/.test(curLine)) {\n      // Empty lines might be breaks within the block we're trying to fold.\n    } else {\n      // A non-empty line at an indent equal to or less than ours marks the\n      // start of another block.\n      break;\n    }\n  }\n  if (lastLineInFold) return {\n    from: CodeMirror.Pos(start.line, firstLine.length),\n    to: CodeMirror.Pos(lastLineInFold, cm.getLine(lastLineInFold).length)\n  };\n});\n\n});\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/addon/fold/markdown-fold.js",
    "content": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n(function(mod) {\n  if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n    mod(require(\"../../lib/codemirror\"));\n  else if (typeof define == \"function\" && define.amd) // AMD\n    define([\"../../lib/codemirror\"], mod);\n  else // Plain browser env\n    mod(CodeMirror);\n})(function(CodeMirror) {\n\"use strict\";\n\nCodeMirror.registerHelper(\"fold\", \"markdown\", function(cm, start) {\n  var maxDepth = 100;\n\n  function isHeader(lineNo) {\n    var tokentype = cm.getTokenTypeAt(CodeMirror.Pos(lineNo, 0));\n    return tokentype && /\\bheader\\b/.test(tokentype);\n  }\n\n  function headerLevel(lineNo, line, nextLine) {\n    var match = line && line.match(/^#+/);\n    if (match && isHeader(lineNo)) return match[0].length;\n    match = nextLine && nextLine.match(/^[=\\-]+\\s*$/);\n    if (match && isHeader(lineNo + 1)) return nextLine[0] == \"=\" ? 1 : 2;\n    return maxDepth;\n  }\n\n  var firstLine = cm.getLine(start.line), nextLine = cm.getLine(start.line + 1);\n  var level = headerLevel(start.line, firstLine, nextLine);\n  if (level === maxDepth) return undefined;\n\n  var lastLineNo = cm.lastLine();\n  var end = start.line, nextNextLine = cm.getLine(end + 2);\n  while (end < lastLineNo) {\n    if (headerLevel(end + 1, nextLine, nextNextLine) <= level) break;\n    ++end;\n    nextLine = nextNextLine;\n    nextNextLine = cm.getLine(end + 2);\n  }\n\n  return {\n    from: CodeMirror.Pos(start.line, firstLine.length),\n    to: CodeMirror.Pos(end, cm.getLine(end).length)\n  };\n});\n\n});\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/addon/fold/xml-fold.js",
    "content": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n(function(mod) {\n  if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n    mod(require(\"../../lib/codemirror\"));\n  else if (typeof define == \"function\" && define.amd) // AMD\n    define([\"../../lib/codemirror\"], mod);\n  else // Plain browser env\n    mod(CodeMirror);\n})(function(CodeMirror) {\n  \"use strict\";\n\n  var Pos = CodeMirror.Pos;\n  function cmp(a, b) { return a.line - b.line || a.ch - b.ch; }\n\n  var nameStartChar = \"A-Z_a-z\\\\u00C0-\\\\u00D6\\\\u00D8-\\\\u00F6\\\\u00F8-\\\\u02FF\\\\u0370-\\\\u037D\\\\u037F-\\\\u1FFF\\\\u200C-\\\\u200D\\\\u2070-\\\\u218F\\\\u2C00-\\\\u2FEF\\\\u3001-\\\\uD7FF\\\\uF900-\\\\uFDCF\\\\uFDF0-\\\\uFFFD\";\n  var nameChar = nameStartChar + \"\\-\\:\\.0-9\\\\u00B7\\\\u0300-\\\\u036F\\\\u203F-\\\\u2040\";\n  var xmlTagStart = new RegExp(\"<(/?)([\" + nameStartChar + \"][\" + nameChar + \"]*)\", \"g\");\n\n  function Iter(cm, line, ch, range) {\n    this.line = line; this.ch = ch;\n    this.cm = cm; this.text = cm.getLine(line);\n    this.min = range ? range.from : cm.firstLine();\n    this.max = range ? range.to - 1 : cm.lastLine();\n  }\n\n  function tagAt(iter, ch) {\n    var type = iter.cm.getTokenTypeAt(Pos(iter.line, ch));\n    return type && /\\btag\\b/.test(type);\n  }\n\n  function nextLine(iter) {\n    if (iter.line >= iter.max) return;\n    iter.ch = 0;\n    iter.text = iter.cm.getLine(++iter.line);\n    return true;\n  }\n  function prevLine(iter) {\n    if (iter.line <= iter.min) return;\n    iter.text = iter.cm.getLine(--iter.line);\n    iter.ch = iter.text.length;\n    return true;\n  }\n\n  function toTagEnd(iter) {\n    for (;;) {\n      var gt = iter.text.indexOf(\">\", iter.ch);\n      if (gt == -1) { if (nextLine(iter)) continue; else return; }\n      if (!tagAt(iter, gt + 1)) { iter.ch = gt + 1; continue; }\n      var lastSlash = iter.text.lastIndexOf(\"/\", gt);\n      var selfClose = lastSlash > -1 && !/\\S/.test(iter.text.slice(lastSlash + 1, gt));\n      iter.ch = gt + 1;\n      return selfClose ? \"selfClose\" : \"regular\";\n    }\n  }\n  function toTagStart(iter) {\n    for (;;) {\n      var lt = iter.ch ? iter.text.lastIndexOf(\"<\", iter.ch - 1) : -1;\n      if (lt == -1) { if (prevLine(iter)) continue; else return; }\n      if (!tagAt(iter, lt + 1)) { iter.ch = lt; continue; }\n      xmlTagStart.lastIndex = lt;\n      iter.ch = lt;\n      var match = xmlTagStart.exec(iter.text);\n      if (match && match.index == lt) return match;\n    }\n  }\n\n  function toNextTag(iter) {\n    for (;;) {\n      xmlTagStart.lastIndex = iter.ch;\n      var found = xmlTagStart.exec(iter.text);\n      if (!found) { if (nextLine(iter)) continue; else return; }\n      if (!tagAt(iter, found.index + 1)) { iter.ch = found.index + 1; continue; }\n      iter.ch = found.index + found[0].length;\n      return found;\n    }\n  }\n  function toPrevTag(iter) {\n    for (;;) {\n      var gt = iter.ch ? iter.text.lastIndexOf(\">\", iter.ch - 1) : -1;\n      if (gt == -1) { if (prevLine(iter)) continue; else return; }\n      if (!tagAt(iter, gt + 1)) { iter.ch = gt; continue; }\n      var lastSlash = iter.text.lastIndexOf(\"/\", gt);\n      var selfClose = lastSlash > -1 && !/\\S/.test(iter.text.slice(lastSlash + 1, gt));\n      iter.ch = gt + 1;\n      return selfClose ? \"selfClose\" : \"regular\";\n    }\n  }\n\n  function findMatchingClose(iter, tag) {\n    var stack = [];\n    for (;;) {\n      var next = toNextTag(iter), end, startLine = iter.line, startCh = iter.ch - (next ? next[0].length : 0);\n      if (!next || !(end = toTagEnd(iter))) return;\n      if (end == \"selfClose\") continue;\n      if (next[1]) { // closing tag\n        for (var i = stack.length - 1; i >= 0; --i) if (stack[i] == next[2]) {\n          stack.length = i;\n          break;\n        }\n        if (i < 0 && (!tag || tag == next[2])) return {\n          tag: next[2],\n          from: Pos(startLine, startCh),\n          to: Pos(iter.line, iter.ch)\n        };\n      } else { // opening tag\n        stack.push(next[2]);\n      }\n    }\n  }\n  function findMatchingOpen(iter, tag) {\n    var stack = [];\n    for (;;) {\n      var prev = toPrevTag(iter);\n      if (!prev) return;\n      if (prev == \"selfClose\") { toTagStart(iter); continue; }\n      var endLine = iter.line, endCh = iter.ch;\n      var start = toTagStart(iter);\n      if (!start) return;\n      if (start[1]) { // closing tag\n        stack.push(start[2]);\n      } else { // opening tag\n        for (var i = stack.length - 1; i >= 0; --i) if (stack[i] == start[2]) {\n          stack.length = i;\n          break;\n        }\n        if (i < 0 && (!tag || tag == start[2])) return {\n          tag: start[2],\n          from: Pos(iter.line, iter.ch),\n          to: Pos(endLine, endCh)\n        };\n      }\n    }\n  }\n\n  CodeMirror.registerHelper(\"fold\", \"xml\", function(cm, start) {\n    var iter = new Iter(cm, start.line, 0);\n    for (;;) {\n      var openTag = toNextTag(iter), end;\n      if (!openTag || iter.line != start.line || !(end = toTagEnd(iter))) return;\n      if (!openTag[1] && end != \"selfClose\") {\n        var start = Pos(iter.line, iter.ch);\n        var close = findMatchingClose(iter, openTag[2]);\n        return close && {from: start, to: close.from};\n      }\n    }\n  });\n  CodeMirror.findMatchingTag = function(cm, pos, range) {\n    var iter = new Iter(cm, pos.line, pos.ch, range);\n    if (iter.text.indexOf(\">\") == -1 && iter.text.indexOf(\"<\") == -1) return;\n    var end = toTagEnd(iter), to = end && Pos(iter.line, iter.ch);\n    var start = end && toTagStart(iter);\n    if (!end || !start || cmp(iter, pos) > 0) return;\n    var here = {from: Pos(iter.line, iter.ch), to: to, tag: start[2]};\n    if (end == \"selfClose\") return {open: here, close: null, at: \"open\"};\n\n    if (start[1]) { // closing tag\n      return {open: findMatchingOpen(iter, start[2]), close: here, at: \"close\"};\n    } else { // opening tag\n      iter = new Iter(cm, to.line, to.ch, range);\n      return {open: here, close: findMatchingClose(iter, start[2]), at: \"open\"};\n    }\n  };\n\n  CodeMirror.findEnclosingTag = function(cm, pos, range) {\n    var iter = new Iter(cm, pos.line, pos.ch, range);\n    for (;;) {\n      var open = findMatchingOpen(iter);\n      if (!open) break;\n      var forward = new Iter(cm, pos.line, pos.ch, range);\n      var close = findMatchingClose(forward, open.tag);\n      if (close) return {open: open, close: close};\n    }\n  };\n\n  // Used by addon/edit/closetag.js\n  CodeMirror.scanForClosingTag = function(cm, pos, name, end) {\n    var iter = new Iter(cm, pos.line, pos.ch, end ? {from: 0, to: end} : null);\n    return findMatchingClose(iter, name);\n  };\n});\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/addon/hint/anyword-hint.js",
    "content": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n(function(mod) {\n  if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n    mod(require(\"../../lib/codemirror\"));\n  else if (typeof define == \"function\" && define.amd) // AMD\n    define([\"../../lib/codemirror\"], mod);\n  else // Plain browser env\n    mod(CodeMirror);\n})(function(CodeMirror) {\n  \"use strict\";\n\n  var WORD = /[\\w$]+/, RANGE = 500;\n\n  CodeMirror.registerHelper(\"hint\", \"anyword\", function(editor, options) {\n    var word = options && options.word || WORD;\n    var range = options && options.range || RANGE;\n    var cur = editor.getCursor(), curLine = editor.getLine(cur.line);\n    var end = cur.ch, start = end;\n    while (start && word.test(curLine.charAt(start - 1))) --start;\n    var curWord = start != end && curLine.slice(start, end);\n\n    var list = [], seen = {};\n    var re = new RegExp(word.source, \"g\");\n    for (var dir = -1; dir <= 1; dir += 2) {\n      var line = cur.line, endLine = Math.min(Math.max(line + dir * range, editor.firstLine()), editor.lastLine()) + dir;\n      for (; line != endLine; line += dir) {\n        var text = editor.getLine(line), m;\n        while (m = re.exec(text)) {\n          if (line == cur.line && m[0] === curWord) continue;\n          if ((!curWord || m[0].lastIndexOf(curWord, 0) == 0) && !Object.prototype.hasOwnProperty.call(seen, m[0])) {\n            seen[m[0]] = true;\n            list.push(m[0]);\n          }\n        }\n      }\n    }\n    return {list: list, from: CodeMirror.Pos(cur.line, start), to: CodeMirror.Pos(cur.line, end)};\n  });\n});\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/addon/hint/css-hint.js",
    "content": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n(function(mod) {\n  if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n    mod(require(\"../../lib/codemirror\"), require(\"../../mode/css/css\"));\n  else if (typeof define == \"function\" && define.amd) // AMD\n    define([\"../../lib/codemirror\", \"../../mode/css/css\"], mod);\n  else // Plain browser env\n    mod(CodeMirror);\n})(function(CodeMirror) {\n  \"use strict\";\n\n  var pseudoClasses = {link: 1, visited: 1, active: 1, hover: 1, focus: 1,\n                       \"first-letter\": 1, \"first-line\": 1, \"first-child\": 1,\n                       before: 1, after: 1, lang: 1};\n\n  CodeMirror.registerHelper(\"hint\", \"css\", function(cm) {\n    var cur = cm.getCursor(), token = cm.getTokenAt(cur);\n    var inner = CodeMirror.innerMode(cm.getMode(), token.state);\n    if (inner.mode.name != \"css\") return;\n\n    var start = token.start, end = cur.ch, word = token.string.slice(0, end - start);\n    if (/[^\\w$_-]/.test(word)) {\n      word = \"\"; start = end = cur.ch;\n    }\n\n    var spec = CodeMirror.resolveMode(\"text/css\");\n\n    var result = [];\n    function add(keywords) {\n      for (var name in keywords)\n        if (!word || name.lastIndexOf(word, 0) == 0)\n          result.push(name);\n    }\n\n    var st = inner.state.state;\n    if (st == \"pseudo\" || token.type == \"variable-3\") {\n      add(pseudoClasses);\n    } else if (st == \"block\" || st == \"maybeprop\") {\n      add(spec.propertyKeywords);\n    } else if (st == \"prop\" || st == \"parens\" || st == \"at\" || st == \"params\") {\n      add(spec.valueKeywords);\n      add(spec.colorKeywords);\n    } else if (st == \"media\" || st == \"media_parens\") {\n      add(spec.mediaTypes);\n      add(spec.mediaFeatures);\n    }\n\n    if (result.length) return {\n      list: result,\n      from: CodeMirror.Pos(cur.line, start),\n      to: CodeMirror.Pos(cur.line, end)\n    };\n  });\n});\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/addon/hint/html-hint.js",
    "content": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n(function(mod) {\n  if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n    mod(require(\"../../lib/codemirror\"), require(\"./xml-hint\"));\n  else if (typeof define == \"function\" && define.amd) // AMD\n    define([\"../../lib/codemirror\", \"./xml-hint\"], mod);\n  else // Plain browser env\n    mod(CodeMirror);\n})(function(CodeMirror) {\n  \"use strict\";\n\n  var langs = \"ab aa af ak sq am ar an hy as av ae ay az bm ba eu be bn bh bi bs br bg my ca ch ce ny zh cv kw co cr hr cs da dv nl dz en eo et ee fo fj fi fr ff gl ka de el gn gu ht ha he hz hi ho hu ia id ie ga ig ik io is it iu ja jv kl kn kr ks kk km ki rw ky kv kg ko ku kj la lb lg li ln lo lt lu lv gv mk mg ms ml mt mi mr mh mn na nv nb nd ne ng nn no ii nr oc oj cu om or os pa pi fa pl ps pt qu rm rn ro ru sa sc sd se sm sg sr gd sn si sk sl so st es su sw ss sv ta te tg th ti bo tk tl tn to tr ts tt tw ty ug uk ur uz ve vi vo wa cy wo fy xh yi yo za zu\".split(\" \");\n  var targets = [\"_blank\", \"_self\", \"_top\", \"_parent\"];\n  var charsets = [\"ascii\", \"utf-8\", \"utf-16\", \"latin1\", \"latin1\"];\n  var methods = [\"get\", \"post\", \"put\", \"delete\"];\n  var encs = [\"application/x-www-form-urlencoded\", \"multipart/form-data\", \"text/plain\"];\n  var media = [\"all\", \"screen\", \"print\", \"embossed\", \"braille\", \"handheld\", \"print\", \"projection\", \"screen\", \"tty\", \"tv\", \"speech\",\n               \"3d-glasses\", \"resolution [>][<][=] [X]\", \"device-aspect-ratio: X/Y\", \"orientation:portrait\",\n               \"orientation:landscape\", \"device-height: [X]\", \"device-width: [X]\"];\n  var s = { attrs: {} }; // Simple tag, reused for a whole lot of tags\n\n  var data = {\n    a: {\n      attrs: {\n        href: null, ping: null, type: null,\n        media: media,\n        target: targets,\n        hreflang: langs\n      }\n    },\n    abbr: s,\n    acronym: s,\n    address: s,\n    applet: s,\n    area: {\n      attrs: {\n        alt: null, coords: null, href: null, target: null, ping: null,\n        media: media, hreflang: langs, type: null,\n        shape: [\"default\", \"rect\", \"circle\", \"poly\"]\n      }\n    },\n    article: s,\n    aside: s,\n    audio: {\n      attrs: {\n        src: null, mediagroup: null,\n        crossorigin: [\"anonymous\", \"use-credentials\"],\n        preload: [\"none\", \"metadata\", \"auto\"],\n        autoplay: [\"\", \"autoplay\"],\n        loop: [\"\", \"loop\"],\n        controls: [\"\", \"controls\"]\n      }\n    },\n    b: s,\n    base: { attrs: { href: null, target: targets } },\n    basefont: s,\n    bdi: s,\n    bdo: s,\n    big: s,\n    blockquote: { attrs: { cite: null } },\n    body: s,\n    br: s,\n    button: {\n      attrs: {\n        form: null, formaction: null, name: null, value: null,\n        autofocus: [\"\", \"autofocus\"],\n        disabled: [\"\", \"autofocus\"],\n        formenctype: encs,\n        formmethod: methods,\n        formnovalidate: [\"\", \"novalidate\"],\n        formtarget: targets,\n        type: [\"submit\", \"reset\", \"button\"]\n      }\n    },\n    canvas: { attrs: { width: null, height: null } },\n    caption: s,\n    center: s,\n    cite: s,\n    code: s,\n    col: { attrs: { span: null } },\n    colgroup: { attrs: { span: null } },\n    command: {\n      attrs: {\n        type: [\"command\", \"checkbox\", \"radio\"],\n        label: null, icon: null, radiogroup: null, command: null, title: null,\n        disabled: [\"\", \"disabled\"],\n        checked: [\"\", \"checked\"]\n      }\n    },\n    data: { attrs: { value: null } },\n    datagrid: { attrs: { disabled: [\"\", \"disabled\"], multiple: [\"\", \"multiple\"] } },\n    datalist: { attrs: { data: null } },\n    dd: s,\n    del: { attrs: { cite: null, datetime: null } },\n    details: { attrs: { open: [\"\", \"open\"] } },\n    dfn: s,\n    dir: s,\n    div: s,\n    dl: s,\n    dt: s,\n    em: s,\n    embed: { attrs: { src: null, type: null, width: null, height: null } },\n    eventsource: { attrs: { src: null } },\n    fieldset: { attrs: { disabled: [\"\", \"disabled\"], form: null, name: null } },\n    figcaption: s,\n    figure: s,\n    font: s,\n    footer: s,\n    form: {\n      attrs: {\n        action: null, name: null,\n        \"accept-charset\": charsets,\n        autocomplete: [\"on\", \"off\"],\n        enctype: encs,\n        method: methods,\n        novalidate: [\"\", \"novalidate\"],\n        target: targets\n      }\n    },\n    frame: s,\n    frameset: s,\n    h1: s, h2: s, h3: s, h4: s, h5: s, h6: s,\n    head: {\n      attrs: {},\n      children: [\"title\", \"base\", \"link\", \"style\", \"meta\", \"script\", \"noscript\", \"command\"]\n    },\n    header: s,\n    hgroup: s,\n    hr: s,\n    html: {\n      attrs: { manifest: null },\n      children: [\"head\", \"body\"]\n    },\n    i: s,\n    iframe: {\n      attrs: {\n        src: null, srcdoc: null, name: null, width: null, height: null,\n        sandbox: [\"allow-top-navigation\", \"allow-same-origin\", \"allow-forms\", \"allow-scripts\"],\n        seamless: [\"\", \"seamless\"]\n      }\n    },\n    img: {\n      attrs: {\n        alt: null, src: null, ismap: null, usemap: null, width: null, height: null,\n        crossorigin: [\"anonymous\", \"use-credentials\"]\n      }\n    },\n    input: {\n      attrs: {\n        alt: null, dirname: null, form: null, formaction: null,\n        height: null, list: null, max: null, maxlength: null, min: null,\n        name: null, pattern: null, placeholder: null, size: null, src: null,\n        step: null, value: null, width: null,\n        accept: [\"audio/*\", \"video/*\", \"image/*\"],\n        autocomplete: [\"on\", \"off\"],\n        autofocus: [\"\", \"autofocus\"],\n        checked: [\"\", \"checked\"],\n        disabled: [\"\", \"disabled\"],\n        formenctype: encs,\n        formmethod: methods,\n        formnovalidate: [\"\", \"novalidate\"],\n        formtarget: targets,\n        multiple: [\"\", \"multiple\"],\n        readonly: [\"\", \"readonly\"],\n        required: [\"\", \"required\"],\n        type: [\"hidden\", \"text\", \"search\", \"tel\", \"url\", \"email\", \"password\", \"datetime\", \"date\", \"month\",\n               \"week\", \"time\", \"datetime-local\", \"number\", \"range\", \"color\", \"checkbox\", \"radio\",\n               \"file\", \"submit\", \"image\", \"reset\", \"button\"]\n      }\n    },\n    ins: { attrs: { cite: null, datetime: null } },\n    kbd: s,\n    keygen: {\n      attrs: {\n        challenge: null, form: null, name: null,\n        autofocus: [\"\", \"autofocus\"],\n        disabled: [\"\", \"disabled\"],\n        keytype: [\"RSA\"]\n      }\n    },\n    label: { attrs: { \"for\": null, form: null } },\n    legend: s,\n    li: { attrs: { value: null } },\n    link: {\n      attrs: {\n        href: null, type: null,\n        hreflang: langs,\n        media: media,\n        sizes: [\"all\", \"16x16\", \"16x16 32x32\", \"16x16 32x32 64x64\"]\n      }\n    },\n    map: { attrs: { name: null } },\n    mark: s,\n    menu: { attrs: { label: null, type: [\"list\", \"context\", \"toolbar\"] } },\n    meta: {\n      attrs: {\n        content: null,\n        charset: charsets,\n        name: [\"viewport\", \"application-name\", \"author\", \"description\", \"generator\", \"keywords\"],\n        \"http-equiv\": [\"content-language\", \"content-type\", \"default-style\", \"refresh\"]\n      }\n    },\n    meter: { attrs: { value: null, min: null, low: null, high: null, max: null, optimum: null } },\n    nav: s,\n    noframes: s,\n    noscript: s,\n    object: {\n      attrs: {\n        data: null, type: null, name: null, usemap: null, form: null, width: null, height: null,\n        typemustmatch: [\"\", \"typemustmatch\"]\n      }\n    },\n    ol: { attrs: { reversed: [\"\", \"reversed\"], start: null, type: [\"1\", \"a\", \"A\", \"i\", \"I\"] } },\n    optgroup: { attrs: { disabled: [\"\", \"disabled\"], label: null } },\n    option: { attrs: { disabled: [\"\", \"disabled\"], label: null, selected: [\"\", \"selected\"], value: null } },\n    output: { attrs: { \"for\": null, form: null, name: null } },\n    p: s,\n    param: { attrs: { name: null, value: null } },\n    pre: s,\n    progress: { attrs: { value: null, max: null } },\n    q: { attrs: { cite: null } },\n    rp: s,\n    rt: s,\n    ruby: s,\n    s: s,\n    samp: s,\n    script: {\n      attrs: {\n        type: [\"text/javascript\"],\n        src: null,\n        async: [\"\", \"async\"],\n        defer: [\"\", \"defer\"],\n        charset: charsets\n      }\n    },\n    section: s,\n    select: {\n      attrs: {\n        form: null, name: null, size: null,\n        autofocus: [\"\", \"autofocus\"],\n        disabled: [\"\", \"disabled\"],\n        multiple: [\"\", \"multiple\"]\n      }\n    },\n    small: s,\n    source: { attrs: { src: null, type: null, media: null } },\n    span: s,\n    strike: s,\n    strong: s,\n    style: {\n      attrs: {\n        type: [\"text/css\"],\n        media: media,\n        scoped: null\n      }\n    },\n    sub: s,\n    summary: s,\n    sup: s,\n    table: s,\n    tbody: s,\n    td: { attrs: { colspan: null, rowspan: null, headers: null } },\n    textarea: {\n      attrs: {\n        dirname: null, form: null, maxlength: null, name: null, placeholder: null,\n        rows: null, cols: null,\n        autofocus: [\"\", \"autofocus\"],\n        disabled: [\"\", \"disabled\"],\n        readonly: [\"\", \"readonly\"],\n        required: [\"\", \"required\"],\n        wrap: [\"soft\", \"hard\"]\n      }\n    },\n    tfoot: s,\n    th: { attrs: { colspan: null, rowspan: null, headers: null, scope: [\"row\", \"col\", \"rowgroup\", \"colgroup\"] } },\n    thead: s,\n    time: { attrs: { datetime: null } },\n    title: s,\n    tr: s,\n    track: {\n      attrs: {\n        src: null, label: null, \"default\": null,\n        kind: [\"subtitles\", \"captions\", \"descriptions\", \"chapters\", \"metadata\"],\n        srclang: langs\n      }\n    },\n    tt: s,\n    u: s,\n    ul: s,\n    \"var\": s,\n    video: {\n      attrs: {\n        src: null, poster: null, width: null, height: null,\n        crossorigin: [\"anonymous\", \"use-credentials\"],\n        preload: [\"auto\", \"metadata\", \"none\"],\n        autoplay: [\"\", \"autoplay\"],\n        mediagroup: [\"movie\"],\n        muted: [\"\", \"muted\"],\n        controls: [\"\", \"controls\"]\n      }\n    },\n    wbr: s\n  };\n\n  var globalAttrs = {\n    accesskey: [\"a\", \"b\", \"c\", \"d\", \"e\", \"f\", \"g\", \"h\", \"i\", \"j\", \"k\", \"l\", \"m\", \"n\", \"o\", \"p\", \"q\", \"r\", \"s\", \"t\", \"u\", \"v\", \"w\", \"x\", \"y\", \"z\", \"0\", \"1\", \"2\", \"3\", \"4\", \"5\", \"6\", \"7\", \"8\", \"9\"],\n    \"class\": null,\n    contenteditable: [\"true\", \"false\"],\n    contextmenu: null,\n    dir: [\"ltr\", \"rtl\", \"auto\"],\n    draggable: [\"true\", \"false\", \"auto\"],\n    dropzone: [\"copy\", \"move\", \"link\", \"string:\", \"file:\"],\n    hidden: [\"hidden\"],\n    id: null,\n    inert: [\"inert\"],\n    itemid: null,\n    itemprop: null,\n    itemref: null,\n    itemscope: [\"itemscope\"],\n    itemtype: null,\n    lang: [\"en\", \"es\"],\n    spellcheck: [\"true\", \"false\"],\n    style: null,\n    tabindex: [\"1\", \"2\", \"3\", \"4\", \"5\", \"6\", \"7\", \"8\", \"9\"],\n    title: null,\n    translate: [\"yes\", \"no\"],\n    onclick: null,\n    rel: [\"stylesheet\", \"alternate\", \"author\", \"bookmark\", \"help\", \"license\", \"next\", \"nofollow\", \"noreferrer\", \"prefetch\", \"prev\", \"search\", \"tag\"]\n  };\n  function populate(obj) {\n    for (var attr in globalAttrs) if (globalAttrs.hasOwnProperty(attr))\n      obj.attrs[attr] = globalAttrs[attr];\n  }\n\n  populate(s);\n  for (var tag in data) if (data.hasOwnProperty(tag) && data[tag] != s)\n    populate(data[tag]);\n\n  CodeMirror.htmlSchema = data;\n  function htmlHint(cm, options) {\n    var local = {schemaInfo: data};\n    if (options) for (var opt in options) local[opt] = options[opt];\n    return CodeMirror.hint.xml(cm, local);\n  }\n  CodeMirror.registerHelper(\"hint\", \"html\", htmlHint);\n});\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/addon/hint/javascript-hint.js",
    "content": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n(function(mod) {\n  if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n    mod(require(\"../../lib/codemirror\"));\n  else if (typeof define == \"function\" && define.amd) // AMD\n    define([\"../../lib/codemirror\"], mod);\n  else // Plain browser env\n    mod(CodeMirror);\n})(function(CodeMirror) {\n  var Pos = CodeMirror.Pos;\n\n  function forEach(arr, f) {\n    for (var i = 0, e = arr.length; i < e; ++i) f(arr[i]);\n  }\n\n  function arrayContains(arr, item) {\n    if (!Array.prototype.indexOf) {\n      var i = arr.length;\n      while (i--) {\n        if (arr[i] === item) {\n          return true;\n        }\n      }\n      return false;\n    }\n    return arr.indexOf(item) != -1;\n  }\n\n  function scriptHint(editor, keywords, getToken, options) {\n    // Find the token at the cursor\n    var cur = editor.getCursor(), token = getToken(editor, cur);\n    if (/\\b(?:string|comment)\\b/.test(token.type)) return;\n    token.state = CodeMirror.innerMode(editor.getMode(), token.state).state;\n\n    // If it's not a 'word-style' token, ignore the token.\n    if (!/^[\\w$_]*$/.test(token.string)) {\n      token = {start: cur.ch, end: cur.ch, string: \"\", state: token.state,\n               type: token.string == \".\" ? \"property\" : null};\n    } else if (token.end > cur.ch) {\n      token.end = cur.ch;\n      token.string = token.string.slice(0, cur.ch - token.start);\n    }\n\n    var tprop = token;\n    // If it is a property, find out what it is a property of.\n    while (tprop.type == \"property\") {\n      tprop = getToken(editor, Pos(cur.line, tprop.start));\n      if (tprop.string != \".\") return;\n      tprop = getToken(editor, Pos(cur.line, tprop.start));\n      if (!context) var context = [];\n      context.push(tprop);\n    }\n    return {list: getCompletions(token, context, keywords, options),\n            from: Pos(cur.line, token.start),\n            to: Pos(cur.line, token.end)};\n  }\n\n  function javascriptHint(editor, options) {\n    return scriptHint(editor, javascriptKeywords,\n                      function (e, cur) {return e.getTokenAt(cur);},\n                      options);\n  };\n  CodeMirror.registerHelper(\"hint\", \"javascript\", javascriptHint);\n\n  function getCoffeeScriptToken(editor, cur) {\n  // This getToken, it is for coffeescript, imitates the behavior of\n  // getTokenAt method in javascript.js, that is, returning \"property\"\n  // type and treat \".\" as indepenent token.\n    var token = editor.getTokenAt(cur);\n    if (cur.ch == token.start + 1 && token.string.charAt(0) == '.') {\n      token.end = token.start;\n      token.string = '.';\n      token.type = \"property\";\n    }\n    else if (/^\\.[\\w$_]*$/.test(token.string)) {\n      token.type = \"property\";\n      token.start++;\n      token.string = token.string.replace(/\\./, '');\n    }\n    return token;\n  }\n\n  function coffeescriptHint(editor, options) {\n    return scriptHint(editor, coffeescriptKeywords, getCoffeeScriptToken, options);\n  }\n  CodeMirror.registerHelper(\"hint\", \"coffeescript\", coffeescriptHint);\n\n  var stringProps = (\"charAt charCodeAt indexOf lastIndexOf substring substr slice trim trimLeft trimRight \" +\n                     \"toUpperCase toLowerCase split concat match replace search\").split(\" \");\n  var arrayProps = (\"length concat join splice push pop shift unshift slice reverse sort indexOf \" +\n                    \"lastIndexOf every some filter forEach map reduce reduceRight \").split(\" \");\n  var funcProps = \"prototype apply call bind\".split(\" \");\n  var javascriptKeywords = (\"break case catch continue debugger default delete do else false finally for function \" +\n                  \"if in instanceof new null return switch throw true try typeof var void while with\").split(\" \");\n  var coffeescriptKeywords = (\"and break catch class continue delete do else extends false finally for \" +\n                  \"if in instanceof isnt new no not null of off on or return switch then throw true try typeof until void while with yes\").split(\" \");\n\n  function getCompletions(token, context, keywords, options) {\n    var found = [], start = token.string, global = options && options.globalScope || window;\n    function maybeAdd(str) {\n      if (str.lastIndexOf(start, 0) == 0 && !arrayContains(found, str)) found.push(str);\n    }\n    function gatherCompletions(obj) {\n      if (typeof obj == \"string\") forEach(stringProps, maybeAdd);\n      else if (obj instanceof Array) forEach(arrayProps, maybeAdd);\n      else if (obj instanceof Function) forEach(funcProps, maybeAdd);\n      for (var name in obj) maybeAdd(name);\n    }\n\n    if (context && context.length) {\n      // If this is a property, see if it belongs to some object we can\n      // find in the current environment.\n      var obj = context.pop(), base;\n      if (obj.type && obj.type.indexOf(\"variable\") === 0) {\n        if (options && options.additionalContext)\n          base = options.additionalContext[obj.string];\n        if (!options || options.useGlobalScope !== false)\n          base = base || global[obj.string];\n      } else if (obj.type == \"string\") {\n        base = \"\";\n      } else if (obj.type == \"atom\") {\n        base = 1;\n      } else if (obj.type == \"function\") {\n        if (global.jQuery != null && (obj.string == '$' || obj.string == 'jQuery') &&\n            (typeof global.jQuery == 'function'))\n          base = global.jQuery();\n        else if (global._ != null && (obj.string == '_') && (typeof global._ == 'function'))\n          base = global._();\n      }\n      while (base != null && context.length)\n        base = base[context.pop().string];\n      if (base != null) gatherCompletions(base);\n    } else {\n      // If not, just look in the global object and any local scope\n      // (reading into JS mode internals to get at the local and global variables)\n      for (var v = token.state.localVars; v; v = v.next) maybeAdd(v.name);\n      for (var v = token.state.globalVars; v; v = v.next) maybeAdd(v.name);\n      if (!options || options.useGlobalScope !== false)\n        gatherCompletions(global);\n      forEach(keywords, maybeAdd);\n    }\n    return found;\n  }\n});\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/addon/hint/show-hint.css",
    "content": ".CodeMirror-hints {\n  position: absolute;\n  z-index: 10;\n  overflow: hidden;\n  list-style: none;\n\n  margin: 0;\n  padding: 2px;\n\n  -webkit-box-shadow: 2px 3px 5px rgba(0,0,0,.2);\n  -moz-box-shadow: 2px 3px 5px rgba(0,0,0,.2);\n  box-shadow: 2px 3px 5px rgba(0,0,0,.2);\n  border-radius: 3px;\n  border: 1px solid silver;\n\n  background: white;\n  font-size: 90%;\n  font-family: monospace;\n\n  max-height: 20em;\n  overflow-y: auto;\n}\n\n.CodeMirror-hint {\n  margin: 0;\n  padding: 0 4px;\n  border-radius: 2px;\n  max-width: 19em;\n  overflow: hidden;\n  white-space: pre;\n  color: black;\n  cursor: pointer;\n}\n\nli.CodeMirror-hint-active {\n  background: #08f;\n  color: white;\n}\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/addon/hint/show-hint.js",
    "content": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n(function(mod) {\n  if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n    mod(require(\"../../lib/codemirror\"));\n  else if (typeof define == \"function\" && define.amd) // AMD\n    define([\"../../lib/codemirror\"], mod);\n  else // Plain browser env\n    mod(CodeMirror);\n})(function(CodeMirror) {\n  \"use strict\";\n\n  var HINT_ELEMENT_CLASS        = \"CodeMirror-hint\";\n  var ACTIVE_HINT_ELEMENT_CLASS = \"CodeMirror-hint-active\";\n\n  // This is the old interface, kept around for now to stay\n  // backwards-compatible.\n  CodeMirror.showHint = function(cm, getHints, options) {\n    if (!getHints) return cm.showHint(options);\n    if (options && options.async) getHints.async = true;\n    var newOpts = {hint: getHints};\n    if (options) for (var prop in options) newOpts[prop] = options[prop];\n    return cm.showHint(newOpts);\n  };\n\n  var asyncRunID = 0;\n  function retrieveHints(getter, cm, options, then) {\n    if (getter.async) {\n      var id = ++asyncRunID;\n      getter(cm, function(hints) {\n        if (asyncRunID == id) then(hints);\n      }, options);\n    } else {\n      then(getter(cm, options));\n    }\n  }\n\n  CodeMirror.defineExtension(\"showHint\", function(options) {\n    // We want a single cursor position.\n    if (this.listSelections().length > 1 || this.somethingSelected()) return;\n\n    if (this.state.completionActive) this.state.completionActive.close();\n    var completion = this.state.completionActive = new Completion(this, options);\n    var getHints = completion.options.hint;\n    if (!getHints) return;\n\n    CodeMirror.signal(this, \"startCompletion\", this);\n    return retrieveHints(getHints, this, completion.options, function(hints) { completion.showHints(hints); });\n  });\n\n  function Completion(cm, options) {\n    this.cm = cm;\n    this.options = this.buildOptions(options);\n    this.widget = this.onClose = null;\n  }\n\n  Completion.prototype = {\n    close: function() {\n      if (!this.active()) return;\n      this.cm.state.completionActive = null;\n\n      if (this.widget) this.widget.close();\n      if (this.onClose) this.onClose();\n      CodeMirror.signal(this.cm, \"endCompletion\", this.cm);\n    },\n\n    active: function() {\n      return this.cm.state.completionActive == this;\n    },\n\n    pick: function(data, i) {\n      var completion = data.list[i];\n      if (completion.hint) completion.hint(this.cm, data, completion);\n      else this.cm.replaceRange(getText(completion), completion.from || data.from,\n                                completion.to || data.to, \"complete\");\n      CodeMirror.signal(data, \"pick\", completion);\n      this.close();\n    },\n\n    showHints: function(data) {\n      if (!data || !data.list.length || !this.active()) return this.close();\n\n      if (this.options.completeSingle && data.list.length == 1)\n        this.pick(data, 0);\n      else\n        this.showWidget(data);\n    },\n\n    showWidget: function(data) {\n      this.widget = new Widget(this, data);\n      CodeMirror.signal(data, \"shown\");\n\n      var debounce = 0, completion = this, finished;\n      var closeOn = this.options.closeCharacters;\n      var startPos = this.cm.getCursor(), startLen = this.cm.getLine(startPos.line).length;\n\n      var requestAnimationFrame = window.requestAnimationFrame || function(fn) {\n        return setTimeout(fn, 1000/60);\n      };\n      var cancelAnimationFrame = window.cancelAnimationFrame || clearTimeout;\n\n      function done() {\n        if (finished) return;\n        finished = true;\n        completion.close();\n        completion.cm.off(\"cursorActivity\", activity);\n        if (data) CodeMirror.signal(data, \"close\");\n      }\n\n      function update() {\n        if (finished) return;\n        CodeMirror.signal(data, \"update\");\n        retrieveHints(completion.options.hint, completion.cm, completion.options, finishUpdate);\n      }\n      function finishUpdate(data_) {\n        data = data_;\n        if (finished) return;\n        if (!data || !data.list.length) return done();\n        if (completion.widget) completion.widget.close();\n        completion.widget = new Widget(completion, data);\n      }\n\n      function clearDebounce() {\n        if (debounce) {\n          cancelAnimationFrame(debounce);\n          debounce = 0;\n        }\n      }\n\n      function activity() {\n        clearDebounce();\n        var pos = completion.cm.getCursor(), line = completion.cm.getLine(pos.line);\n        if (pos.line != startPos.line || line.length - pos.ch != startLen - startPos.ch ||\n            pos.ch < startPos.ch || completion.cm.somethingSelected() ||\n            (pos.ch && closeOn.test(line.charAt(pos.ch - 1)))) {\n          completion.close();\n        } else {\n          debounce = requestAnimationFrame(update);\n          if (completion.widget) completion.widget.close();\n        }\n      }\n      this.cm.on(\"cursorActivity\", activity);\n      this.onClose = done;\n    },\n\n    buildOptions: function(options) {\n      var editor = this.cm.options.hintOptions;\n      var out = {};\n      for (var prop in defaultOptions) out[prop] = defaultOptions[prop];\n      if (editor) for (var prop in editor)\n        if (editor[prop] !== undefined) out[prop] = editor[prop];\n      if (options) for (var prop in options)\n        if (options[prop] !== undefined) out[prop] = options[prop];\n      return out;\n    }\n  };\n\n  function getText(completion) {\n    if (typeof completion == \"string\") return completion;\n    else return completion.text;\n  }\n\n  function buildKeyMap(completion, handle) {\n    var baseMap = {\n      Up: function() {handle.moveFocus(-1);},\n      Down: function() {handle.moveFocus(1);},\n      PageUp: function() {handle.moveFocus(-handle.menuSize() + 1, true);},\n      PageDown: function() {handle.moveFocus(handle.menuSize() - 1, true);},\n      Home: function() {handle.setFocus(0);},\n      End: function() {handle.setFocus(handle.length - 1);},\n      Enter: handle.pick,\n      Tab: handle.pick,\n      Esc: handle.close\n    };\n    var custom = completion.options.customKeys;\n    var ourMap = custom ? {} : baseMap;\n    function addBinding(key, val) {\n      var bound;\n      if (typeof val != \"string\")\n        bound = function(cm) { return val(cm, handle); };\n      // This mechanism is deprecated\n      else if (baseMap.hasOwnProperty(val))\n        bound = baseMap[val];\n      else\n        bound = val;\n      ourMap[key] = bound;\n    }\n    if (custom)\n      for (var key in custom) if (custom.hasOwnProperty(key))\n        addBinding(key, custom[key]);\n    var extra = completion.options.extraKeys;\n    if (extra)\n      for (var key in extra) if (extra.hasOwnProperty(key))\n        addBinding(key, extra[key]);\n    return ourMap;\n  }\n\n  function getHintElement(hintsElement, el) {\n    while (el && el != hintsElement) {\n      if (el.nodeName.toUpperCase() === \"LI\" && el.parentNode == hintsElement) return el;\n      el = el.parentNode;\n    }\n  }\n\n  function Widget(completion, data) {\n    this.completion = completion;\n    this.data = data;\n    var widget = this, cm = completion.cm;\n\n    var hints = this.hints = document.createElement(\"ul\");\n    hints.className = \"CodeMirror-hints\";\n    this.selectedHint = data.selectedHint || 0;\n\n    var completions = data.list;\n    for (var i = 0; i < completions.length; ++i) {\n      var elt = hints.appendChild(document.createElement(\"li\")), cur = completions[i];\n      var className = HINT_ELEMENT_CLASS + (i != this.selectedHint ? \"\" : \" \" + ACTIVE_HINT_ELEMENT_CLASS);\n      if (cur.className != null) className = cur.className + \" \" + className;\n      elt.className = className;\n      if (cur.render) cur.render(elt, data, cur);\n      else elt.appendChild(document.createTextNode(cur.displayText || getText(cur)));\n      elt.hintId = i;\n    }\n\n    var pos = cm.cursorCoords(completion.options.alignWithWord ? data.from : null);\n    var left = pos.left, top = pos.bottom, below = true;\n    hints.style.left = left + \"px\";\n    hints.style.top = top + \"px\";\n    // If we're at the edge of the screen, then we want the menu to appear on the left of the cursor.\n    var winW = window.innerWidth || Math.max(document.body.offsetWidth, document.documentElement.offsetWidth);\n    var winH = window.innerHeight || Math.max(document.body.offsetHeight, document.documentElement.offsetHeight);\n    (completion.options.container || document.body).appendChild(hints);\n    var box = hints.getBoundingClientRect(), overlapY = box.bottom - winH;\n    if (overlapY > 0) {\n      var height = box.bottom - box.top, curTop = pos.top - (pos.bottom - box.top);\n      if (curTop - height > 0) { // Fits above cursor\n        hints.style.top = (top = pos.top - height) + \"px\";\n        below = false;\n      } else if (height > winH) {\n        hints.style.height = (winH - 5) + \"px\";\n        hints.style.top = (top = pos.bottom - box.top) + \"px\";\n        var cursor = cm.getCursor();\n        if (data.from.ch != cursor.ch) {\n          pos = cm.cursorCoords(cursor);\n          hints.style.left = (left = pos.left) + \"px\";\n          box = hints.getBoundingClientRect();\n        }\n      }\n    }\n    var overlapX = box.right - winW;\n    if (overlapX > 0) {\n      if (box.right - box.left > winW) {\n        hints.style.width = (winW - 5) + \"px\";\n        overlapX -= (box.right - box.left) - winW;\n      }\n      hints.style.left = (left = pos.left - overlapX) + \"px\";\n    }\n\n    cm.addKeyMap(this.keyMap = buildKeyMap(completion, {\n      moveFocus: function(n, avoidWrap) { widget.changeActive(widget.selectedHint + n, avoidWrap); },\n      setFocus: function(n) { widget.changeActive(n); },\n      menuSize: function() { return widget.screenAmount(); },\n      length: completions.length,\n      close: function() { completion.close(); },\n      pick: function() { widget.pick(); },\n      data: data\n    }));\n\n    if (completion.options.closeOnUnfocus) {\n      var closingOnBlur;\n      cm.on(\"blur\", this.onBlur = function() { closingOnBlur = setTimeout(function() { completion.close(); }, 100); });\n      cm.on(\"focus\", this.onFocus = function() { clearTimeout(closingOnBlur); });\n    }\n\n    var startScroll = cm.getScrollInfo();\n    cm.on(\"scroll\", this.onScroll = function() {\n      var curScroll = cm.getScrollInfo(), editor = cm.getWrapperElement().getBoundingClientRect();\n      var newTop = top + startScroll.top - curScroll.top;\n      var point = newTop - (window.pageYOffset || (document.documentElement || document.body).scrollTop);\n      if (!below) point += hints.offsetHeight;\n      if (point <= editor.top || point >= editor.bottom) return completion.close();\n      hints.style.top = newTop + \"px\";\n      hints.style.left = (left + startScroll.left - curScroll.left) + \"px\";\n    });\n\n    CodeMirror.on(hints, \"dblclick\", function(e) {\n      var t = getHintElement(hints, e.target || e.srcElement);\n      if (t && t.hintId != null) {widget.changeActive(t.hintId); widget.pick();}\n    });\n\n    CodeMirror.on(hints, \"click\", function(e) {\n      var t = getHintElement(hints, e.target || e.srcElement);\n      if (t && t.hintId != null) {\n        widget.changeActive(t.hintId);\n        if (completion.options.completeOnSingleClick) widget.pick();\n      }\n    });\n\n    CodeMirror.on(hints, \"mousedown\", function() {\n      setTimeout(function(){cm.focus();}, 20);\n    });\n\n    CodeMirror.signal(data, \"select\", completions[0], hints.firstChild);\n    return true;\n  }\n\n  Widget.prototype = {\n    close: function() {\n      if (this.completion.widget != this) return;\n      this.completion.widget = null;\n      this.hints.parentNode.removeChild(this.hints);\n      this.completion.cm.removeKeyMap(this.keyMap);\n\n      var cm = this.completion.cm;\n      if (this.completion.options.closeOnUnfocus) {\n        cm.off(\"blur\", this.onBlur);\n        cm.off(\"focus\", this.onFocus);\n      }\n      cm.off(\"scroll\", this.onScroll);\n    },\n\n    pick: function() {\n      this.completion.pick(this.data, this.selectedHint);\n    },\n\n    changeActive: function(i, avoidWrap) {\n      if (i >= this.data.list.length)\n        i = avoidWrap ? this.data.list.length - 1 : 0;\n      else if (i < 0)\n        i = avoidWrap ? 0  : this.data.list.length - 1;\n      if (this.selectedHint == i) return;\n      var node = this.hints.childNodes[this.selectedHint];\n      node.className = node.className.replace(\" \" + ACTIVE_HINT_ELEMENT_CLASS, \"\");\n      node = this.hints.childNodes[this.selectedHint = i];\n      node.className += \" \" + ACTIVE_HINT_ELEMENT_CLASS;\n      if (node.offsetTop < this.hints.scrollTop)\n        this.hints.scrollTop = node.offsetTop - 3;\n      else if (node.offsetTop + node.offsetHeight > this.hints.scrollTop + this.hints.clientHeight)\n        this.hints.scrollTop = node.offsetTop + node.offsetHeight - this.hints.clientHeight + 3;\n      CodeMirror.signal(this.data, \"select\", this.data.list[this.selectedHint], node);\n    },\n\n    screenAmount: function() {\n      return Math.floor(this.hints.clientHeight / this.hints.firstChild.offsetHeight) || 1;\n    }\n  };\n\n  CodeMirror.registerHelper(\"hint\", \"auto\", function(cm, options) {\n    var helpers = cm.getHelpers(cm.getCursor(), \"hint\"), words;\n    if (helpers.length) {\n      for (var i = 0; i < helpers.length; i++) {\n        var cur = helpers[i](cm, options);\n        if (cur && cur.list.length) return cur;\n      }\n    } else if (words = cm.getHelper(cm.getCursor(), \"hintWords\")) {\n      if (words) return CodeMirror.hint.fromList(cm, {words: words});\n    } else if (CodeMirror.hint.anyword) {\n      return CodeMirror.hint.anyword(cm, options);\n    }\n  });\n\n  CodeMirror.registerHelper(\"hint\", \"fromList\", function(cm, options) {\n    var cur = cm.getCursor(), token = cm.getTokenAt(cur);\n    var found = [];\n    for (var i = 0; i < options.words.length; i++) {\n      var word = options.words[i];\n      if (word.slice(0, token.string.length) == token.string)\n        found.push(word);\n    }\n\n    if (found.length) return {\n      list: found,\n      from: CodeMirror.Pos(cur.line, token.start),\n            to: CodeMirror.Pos(cur.line, token.end)\n    };\n  });\n\n  CodeMirror.commands.autocomplete = CodeMirror.showHint;\n\n  var defaultOptions = {\n    hint: CodeMirror.hint.auto,\n    completeSingle: true,\n    alignWithWord: true,\n    closeCharacters: /[\\s()\\[\\]{};:>,]/,\n    closeOnUnfocus: true,\n    completeOnSingleClick: false,\n    container: null,\n    customKeys: null,\n    extraKeys: null\n  };\n\n  CodeMirror.defineOption(\"hintOptions\", null);\n});\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/addon/hint/sql-hint.js",
    "content": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n(function(mod) {\n  if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n    mod(require(\"../../lib/codemirror\"), require(\"../../mode/sql/sql\"));\n  else if (typeof define == \"function\" && define.amd) // AMD\n    define([\"../../lib/codemirror\", \"../../mode/sql/sql\"], mod);\n  else // Plain browser env\n    mod(CodeMirror);\n})(function(CodeMirror) {\n  \"use strict\";\n\n  var tables;\n  var defaultTable;\n  var keywords;\n  var CONS = {\n    QUERY_DIV: \";\",\n    ALIAS_KEYWORD: \"AS\"\n  };\n  var Pos = CodeMirror.Pos;\n\n  function getKeywords(editor) {\n    var mode = editor.doc.modeOption;\n    if (mode === \"sql\") mode = \"text/x-sql\";\n    return CodeMirror.resolveMode(mode).keywords;\n  }\n\n  function getText(item) {\n    return typeof item == \"string\" ? item : item.text;\n  }\n\n  function getItem(list, item) {\n    if (!list.slice) return list[item];\n    for (var i = list.length - 1; i >= 0; i--) if (getText(list[i]) == item)\n      return list[i];\n  }\n\n  function shallowClone(object) {\n    var result = {};\n    for (var key in object) if (object.hasOwnProperty(key))\n      result[key] = object[key];\n    return result;\n  }\n\n  function match(string, word) {\n    var len = string.length;\n    var sub = getText(word).substr(0, len);\n    return string.toUpperCase() === sub.toUpperCase();\n  }\n\n  function addMatches(result, search, wordlist, formatter) {\n    for (var word in wordlist) {\n      if (!wordlist.hasOwnProperty(word)) continue;\n      if (Array.isArray(wordlist)) {\n        word = wordlist[word];\n      }\n      if (match(search, word)) {\n        result.push(formatter(word));\n      }\n    }\n  }\n\n  function cleanName(name) {\n    // Get rid name from backticks(`) and preceding dot(.)\n    if (name.charAt(0) == \".\") {\n      name = name.substr(1);\n    }\n    return name.replace(/`/g, \"\");\n  }\n\n  function insertBackticks(name) {\n    var nameParts = getText(name).split(\".\");\n    for (var i = 0; i < nameParts.length; i++)\n      nameParts[i] = \"`\" + nameParts[i] + \"`\";\n    var escaped = nameParts.join(\".\");\n    if (typeof name == \"string\") return escaped;\n    name = shallowClone(name);\n    name.text = escaped;\n    return name;\n  }\n\n  function nameCompletion(cur, token, result, editor) {\n    // Try to complete table, colunm names and return start position of completion\n    var useBacktick = false;\n    var nameParts = [];\n    var start = token.start;\n    var cont = true;\n    while (cont) {\n      cont = (token.string.charAt(0) == \".\");\n      useBacktick = useBacktick || (token.string.charAt(0) == \"`\");\n\n      start = token.start;\n      nameParts.unshift(cleanName(token.string));\n\n      token = editor.getTokenAt(Pos(cur.line, token.start));\n      if (token.string == \".\") {\n        cont = true;\n        token = editor.getTokenAt(Pos(cur.line, token.start));\n      }\n    }\n\n    // Try to complete table names\n    var string = nameParts.join(\".\");\n    addMatches(result, string, tables, function(w) {\n      return useBacktick ? insertBackticks(w) : w;\n    });\n\n    // Try to complete columns from defaultTable\n    addMatches(result, string, defaultTable, function(w) {\n      return useBacktick ? insertBackticks(w) : w;\n    });\n\n    // Try to complete columns\n    string = nameParts.pop();\n    var table = nameParts.join(\".\");\n\n    // Check if table is available. If not, find table by Alias\n    if (!getItem(tables, table))\n      table = findTableByAlias(table, editor);\n\n    var columns = getItem(tables, table);\n    if (columns && Array.isArray(tables) && columns.columns)\n      columns = columns.columns;\n\n    if (columns) {\n      addMatches(result, string, columns, function(w) {\n        if (typeof w == \"string\") {\n          w = table + \".\" + w;\n        } else {\n          w = shallowClone(w);\n          w.text = table + \".\" + w.text;\n        }\n        return useBacktick ? insertBackticks(w) : w;\n      });\n    }\n\n    return start;\n  }\n\n  function eachWord(lineText, f) {\n    if (!lineText) return;\n    var excepted = /[,;]/g;\n    var words = lineText.split(\" \");\n    for (var i = 0; i < words.length; i++) {\n      f(words[i]?words[i].replace(excepted, '') : '');\n    }\n  }\n\n  function convertCurToNumber(cur) {\n    // max characters of a line is 999,999.\n    return cur.line + cur.ch / Math.pow(10, 6);\n  }\n\n  function convertNumberToCur(num) {\n    return Pos(Math.floor(num), +num.toString().split('.').pop());\n  }\n\n  function findTableByAlias(alias, editor) {\n    var doc = editor.doc;\n    var fullQuery = doc.getValue();\n    var aliasUpperCase = alias.toUpperCase();\n    var previousWord = \"\";\n    var table = \"\";\n    var separator = [];\n    var validRange = {\n      start: Pos(0, 0),\n      end: Pos(editor.lastLine(), editor.getLineHandle(editor.lastLine()).length)\n    };\n\n    //add separator\n    var indexOfSeparator = fullQuery.indexOf(CONS.QUERY_DIV);\n    while(indexOfSeparator != -1) {\n      separator.push(doc.posFromIndex(indexOfSeparator));\n      indexOfSeparator = fullQuery.indexOf(CONS.QUERY_DIV, indexOfSeparator+1);\n    }\n    separator.unshift(Pos(0, 0));\n    separator.push(Pos(editor.lastLine(), editor.getLineHandle(editor.lastLine()).text.length));\n\n    //find valid range\n    var prevItem = 0;\n    var current = convertCurToNumber(editor.getCursor());\n    for (var i=0; i< separator.length; i++) {\n      var _v = convertCurToNumber(separator[i]);\n      if (current > prevItem && current <= _v) {\n        validRange = { start: convertNumberToCur(prevItem), end: convertNumberToCur(_v) };\n        break;\n      }\n      prevItem = _v;\n    }\n\n    var query = doc.getRange(validRange.start, validRange.end, false);\n\n    for (var i = 0; i < query.length; i++) {\n      var lineText = query[i];\n      eachWord(lineText, function(word) {\n        var wordUpperCase = word.toUpperCase();\n        if (wordUpperCase === aliasUpperCase && getItem(tables, previousWord))\n          table = previousWord;\n        if (wordUpperCase !== CONS.ALIAS_KEYWORD)\n          previousWord = word;\n      });\n      if (table) break;\n    }\n    return table;\n  }\n\n  CodeMirror.registerHelper(\"hint\", \"sql\", function(editor, options) {\n    tables = (options && options.tables) || {};\n    var defaultTableName = options && options.defaultTable;\n    defaultTable = (defaultTableName && getItem(tables, defaultTableName)) || [];\n    keywords = keywords || getKeywords(editor);\n\n    var cur = editor.getCursor();\n    var result = [];\n    var token = editor.getTokenAt(cur), start, end, search;\n    if (token.end > cur.ch) {\n      token.end = cur.ch;\n      token.string = token.string.slice(0, cur.ch - token.start);\n    }\n\n    if (token.string.match(/^[.`\\w@]\\w*$/)) {\n      search = token.string;\n      start = token.start;\n      end = token.end;\n    } else {\n      start = end = cur.ch;\n      search = \"\";\n    }\n    if (search.charAt(0) == \".\" || search.charAt(0) == \"`\") {\n      start = nameCompletion(cur, token, result, editor);\n    } else {\n      addMatches(result, search, tables, function(w) {return w;});\n      addMatches(result, search, defaultTable, function(w) {return w;});\n      addMatches(result, search, keywords, function(w) {return w.toUpperCase();});\n    }\n\n    return {list: result, from: Pos(cur.line, start), to: Pos(cur.line, end)};\n  });\n});\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/addon/hint/xml-hint.js",
    "content": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n(function(mod) {\n  if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n    mod(require(\"../../lib/codemirror\"));\n  else if (typeof define == \"function\" && define.amd) // AMD\n    define([\"../../lib/codemirror\"], mod);\n  else // Plain browser env\n    mod(CodeMirror);\n})(function(CodeMirror) {\n  \"use strict\";\n\n  var Pos = CodeMirror.Pos;\n\n  function getHints(cm, options) {\n    var tags = options && options.schemaInfo;\n    var quote = (options && options.quoteChar) || '\"';\n    if (!tags) return;\n    var cur = cm.getCursor(), token = cm.getTokenAt(cur);\n    if (token.end > cur.ch) {\n      token.end = cur.ch;\n      token.string = token.string.slice(0, cur.ch - token.start);\n    }\n    var inner = CodeMirror.innerMode(cm.getMode(), token.state);\n    if (inner.mode.name != \"xml\") return;\n    var result = [], replaceToken = false, prefix;\n    var tag = /\\btag\\b/.test(token.type) && !/>$/.test(token.string);\n    var tagName = tag && /^\\w/.test(token.string), tagStart;\n\n    if (tagName) {\n      var before = cm.getLine(cur.line).slice(Math.max(0, token.start - 2), token.start);\n      var tagType = /<\\/$/.test(before) ? \"close\" : /<$/.test(before) ? \"open\" : null;\n      if (tagType) tagStart = token.start - (tagType == \"close\" ? 2 : 1);\n    } else if (tag && token.string == \"<\") {\n      tagType = \"open\";\n    } else if (tag && token.string == \"</\") {\n      tagType = \"close\";\n    }\n\n    if (!tag && !inner.state.tagName || tagType) {\n      if (tagName)\n        prefix = token.string;\n      replaceToken = tagType;\n      var cx = inner.state.context, curTag = cx && tags[cx.tagName];\n      var childList = cx ? curTag && curTag.children : tags[\"!top\"];\n      if (childList && tagType != \"close\") {\n        for (var i = 0; i < childList.length; ++i) if (!prefix || childList[i].lastIndexOf(prefix, 0) == 0)\n          result.push(\"<\" + childList[i]);\n      } else if (tagType != \"close\") {\n        for (var name in tags)\n          if (tags.hasOwnProperty(name) && name != \"!top\" && name != \"!attrs\" && (!prefix || name.lastIndexOf(prefix, 0) == 0))\n            result.push(\"<\" + name);\n      }\n      if (cx && (!prefix || tagType == \"close\" && cx.tagName.lastIndexOf(prefix, 0) == 0))\n        result.push(\"</\" + cx.tagName + \">\");\n    } else {\n      // Attribute completion\n      var curTag = tags[inner.state.tagName], attrs = curTag && curTag.attrs;\n      var globalAttrs = tags[\"!attrs\"];\n      if (!attrs && !globalAttrs) return;\n      if (!attrs) {\n        attrs = globalAttrs;\n      } else if (globalAttrs) { // Combine tag-local and global attributes\n        var set = {};\n        for (var nm in globalAttrs) if (globalAttrs.hasOwnProperty(nm)) set[nm] = globalAttrs[nm];\n        for (var nm in attrs) if (attrs.hasOwnProperty(nm)) set[nm] = attrs[nm];\n        attrs = set;\n      }\n      if (token.type == \"string\" || token.string == \"=\") { // A value\n        var before = cm.getRange(Pos(cur.line, Math.max(0, cur.ch - 60)),\n                                 Pos(cur.line, token.type == \"string\" ? token.start : token.end));\n        var atName = before.match(/([^\\s\\u00a0=<>\\\"\\']+)=$/), atValues;\n        if (!atName || !attrs.hasOwnProperty(atName[1]) || !(atValues = attrs[atName[1]])) return;\n        if (typeof atValues == 'function') atValues = atValues.call(this, cm); // Functions can be used to supply values for autocomplete widget\n        if (token.type == \"string\") {\n          prefix = token.string;\n          var n = 0;\n          if (/['\"]/.test(token.string.charAt(0))) {\n            quote = token.string.charAt(0);\n            prefix = token.string.slice(1);\n            n++;\n          }\n          var len = token.string.length;\n          if (/['\"]/.test(token.string.charAt(len - 1))) {\n            quote = token.string.charAt(len - 1);\n            prefix = token.string.substr(n, len - 2);\n          }\n          replaceToken = true;\n        }\n        for (var i = 0; i < atValues.length; ++i) if (!prefix || atValues[i].lastIndexOf(prefix, 0) == 0)\n          result.push(quote + atValues[i] + quote);\n      } else { // An attribute name\n        if (token.type == \"attribute\") {\n          prefix = token.string;\n          replaceToken = true;\n        }\n        for (var attr in attrs) if (attrs.hasOwnProperty(attr) && (!prefix || attr.lastIndexOf(prefix, 0) == 0))\n          result.push(attr);\n      }\n    }\n    return {\n      list: result,\n      from: replaceToken ? Pos(cur.line, tagStart == null ? token.start : tagStart) : cur,\n      to: replaceToken ? Pos(cur.line, token.end) : cur\n    };\n  }\n\n  CodeMirror.registerHelper(\"hint\", \"xml\", getHints);\n});\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/addon/lint/coffeescript-lint.js",
    "content": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n// Depends on coffeelint.js from http://www.coffeelint.org/js/coffeelint.js\n\n// declare global: coffeelint\n\n(function(mod) {\n  if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n    mod(require(\"../../lib/codemirror\"));\n  else if (typeof define == \"function\" && define.amd) // AMD\n    define([\"../../lib/codemirror\"], mod);\n  else // Plain browser env\n    mod(CodeMirror);\n})(function(CodeMirror) {\n\"use strict\";\n\nCodeMirror.registerHelper(\"lint\", \"coffeescript\", function(text) {\n  var found = [];\n  var parseError = function(err) {\n    var loc = err.lineNumber;\n    found.push({from: CodeMirror.Pos(loc-1, 0),\n                to: CodeMirror.Pos(loc, 0),\n                severity: err.level,\n                message: err.message});\n  };\n  try {\n    var res = coffeelint.lint(text);\n    for(var i = 0; i < res.length; i++) {\n      parseError(res[i]);\n    }\n  } catch(e) {\n    found.push({from: CodeMirror.Pos(e.location.first_line, 0),\n                to: CodeMirror.Pos(e.location.last_line, e.location.last_column),\n                severity: 'error',\n                message: e.message});\n  }\n  return found;\n});\n\n});\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/addon/lint/css-lint.js",
    "content": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n// Depends on csslint.js from https://github.com/stubbornella/csslint\n\n// declare global: CSSLint\n\n(function(mod) {\n  if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n    mod(require(\"../../lib/codemirror\"));\n  else if (typeof define == \"function\" && define.amd) // AMD\n    define([\"../../lib/codemirror\"], mod);\n  else // Plain browser env\n    mod(CodeMirror);\n})(function(CodeMirror) {\n\"use strict\";\n\nCodeMirror.registerHelper(\"lint\", \"css\", function(text) {\n  var found = [];\n  if (!window.CSSLint) return found;\n  var results = CSSLint.verify(text), messages = results.messages, message = null;\n  for ( var i = 0; i < messages.length; i++) {\n    message = messages[i];\n    var startLine = message.line -1, endLine = message.line -1, startCol = message.col -1, endCol = message.col;\n    found.push({\n      from: CodeMirror.Pos(startLine, startCol),\n      to: CodeMirror.Pos(endLine, endCol),\n      message: message.message,\n      severity : message.type\n    });\n  }\n  return found;\n});\n\n});\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/addon/lint/javascript-lint.js",
    "content": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n(function(mod) {\n  if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n    mod(require(\"../../lib/codemirror\"));\n  else if (typeof define == \"function\" && define.amd) // AMD\n    define([\"../../lib/codemirror\"], mod);\n  else // Plain browser env\n    mod(CodeMirror);\n})(function(CodeMirror) {\n  \"use strict\";\n  // declare global: JSHINT\n\n  var bogus = [ \"Dangerous comment\" ];\n\n  var warnings = [ [ \"Expected '{'\",\n                     \"Statement body should be inside '{ }' braces.\" ] ];\n\n  var errors = [ \"Missing semicolon\", \"Extra comma\", \"Missing property name\",\n                 \"Unmatched \", \" and instead saw\", \" is not defined\",\n                 \"Unclosed string\", \"Stopping, unable to continue\" ];\n\n  function validator(text, options) {\n    if (!window.JSHINT) return [];\n    JSHINT(text, options);\n    var errors = JSHINT.data().errors, result = [];\n    if (errors) parseErrors(errors, result);\n    return result;\n  }\n\n  CodeMirror.registerHelper(\"lint\", \"javascript\", validator);\n\n  function cleanup(error) {\n    // All problems are warnings by default\n    fixWith(error, warnings, \"warning\", true);\n    fixWith(error, errors, \"error\");\n\n    return isBogus(error) ? null : error;\n  }\n\n  function fixWith(error, fixes, severity, force) {\n    var description, fix, find, replace, found;\n\n    description = error.description;\n\n    for ( var i = 0; i < fixes.length; i++) {\n      fix = fixes[i];\n      find = (typeof fix === \"string\" ? fix : fix[0]);\n      replace = (typeof fix === \"string\" ? null : fix[1]);\n      found = description.indexOf(find) !== -1;\n\n      if (force || found) {\n        error.severity = severity;\n      }\n      if (found && replace) {\n        error.description = replace;\n      }\n    }\n  }\n\n  function isBogus(error) {\n    var description = error.description;\n    for ( var i = 0; i < bogus.length; i++) {\n      if (description.indexOf(bogus[i]) !== -1) {\n        return true;\n      }\n    }\n    return false;\n  }\n\n  function parseErrors(errors, output) {\n    for ( var i = 0; i < errors.length; i++) {\n      var error = errors[i];\n      if (error) {\n        var linetabpositions, index;\n\n        linetabpositions = [];\n\n        // This next block is to fix a problem in jshint. Jshint\n        // replaces\n        // all tabs with spaces then performs some checks. The error\n        // positions (character/space) are then reported incorrectly,\n        // not taking the replacement step into account. Here we look\n        // at the evidence line and try to adjust the character position\n        // to the correct value.\n        if (error.evidence) {\n          // Tab positions are computed once per line and cached\n          var tabpositions = linetabpositions[error.line];\n          if (!tabpositions) {\n            var evidence = error.evidence;\n            tabpositions = [];\n            // ugggh phantomjs does not like this\n            // forEachChar(evidence, function(item, index) {\n            Array.prototype.forEach.call(evidence, function(item,\n                                                            index) {\n              if (item === '\\t') {\n                // First col is 1 (not 0) to match error\n                // positions\n                tabpositions.push(index + 1);\n              }\n            });\n            linetabpositions[error.line] = tabpositions;\n          }\n          if (tabpositions.length > 0) {\n            var pos = error.character;\n            tabpositions.forEach(function(tabposition) {\n              if (pos > tabposition) pos -= 1;\n            });\n            error.character = pos;\n          }\n        }\n\n        var start = error.character - 1, end = start + 1;\n        if (error.evidence) {\n          index = error.evidence.substring(start).search(/.\\b/);\n          if (index > -1) {\n            end += index;\n          }\n        }\n\n        // Convert to format expected by validation service\n        error.description = error.reason;// + \"(jshint)\";\n        error.start = error.character;\n        error.end = end;\n        error = cleanup(error);\n\n        if (error)\n          output.push({message: error.description,\n                       severity: error.severity,\n                       from: CodeMirror.Pos(error.line - 1, start),\n                       to: CodeMirror.Pos(error.line - 1, end)});\n      }\n    }\n  }\n});\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/addon/lint/json-lint.js",
    "content": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n// Depends on jsonlint.js from https://github.com/zaach/jsonlint\n\n// declare global: jsonlint\n\n(function(mod) {\n  if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n    mod(require(\"../../lib/codemirror\"));\n  else if (typeof define == \"function\" && define.amd) // AMD\n    define([\"../../lib/codemirror\"], mod);\n  else // Plain browser env\n    mod(CodeMirror);\n})(function(CodeMirror) {\n\"use strict\";\n\nCodeMirror.registerHelper(\"lint\", \"json\", function(text) {\n  var found = [];\n  jsonlint.parseError = function(str, hash) {\n    var loc = hash.loc;\n    found.push({from: CodeMirror.Pos(loc.first_line - 1, loc.first_column),\n                to: CodeMirror.Pos(loc.last_line - 1, loc.last_column),\n                message: str});\n  };\n  try { jsonlint.parse(text); }\n  catch(e) {}\n  return found;\n});\n\n});\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/addon/lint/lint.css",
    "content": "/* The lint marker gutter */\n.CodeMirror-lint-markers {\n  width: 16px;\n}\n\n.CodeMirror-lint-tooltip {\n  background-color: infobackground;\n  border: 1px solid black;\n  border-radius: 4px 4px 4px 4px;\n  color: infotext;\n  font-family: monospace;\n  font-size: 10pt;\n  overflow: hidden;\n  padding: 2px 5px;\n  position: fixed;\n  white-space: pre;\n  white-space: pre-wrap;\n  z-index: 100;\n  max-width: 600px;\n  opacity: 0;\n  transition: opacity .4s;\n  -moz-transition: opacity .4s;\n  -webkit-transition: opacity .4s;\n  -o-transition: opacity .4s;\n  -ms-transition: opacity .4s;\n}\n\n.CodeMirror-lint-mark-error, .CodeMirror-lint-mark-warning {\n  background-position: left bottom;\n  background-repeat: repeat-x;\n}\n\n.CodeMirror-lint-mark-error {\n  background-image:\n  url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAADCAYAAAC09K7GAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sJDw4cOCW1/KIAAAAZdEVYdENvbW1lbnQAQ3JlYXRlZCB3aXRoIEdJTVBXgQ4XAAAAHElEQVQI12NggIL/DAz/GdA5/xkY/qPKMDAwAADLZwf5rvm+LQAAAABJRU5ErkJggg==\")\n  ;\n}\n\n.CodeMirror-lint-mark-warning {\n  background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAADCAYAAAC09K7GAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sJFhQXEbhTg7YAAAAZdEVYdENvbW1lbnQAQ3JlYXRlZCB3aXRoIEdJTVBXgQ4XAAAAMklEQVQI12NkgIIvJ3QXMjAwdDN+OaEbysDA4MPAwNDNwMCwiOHLCd1zX07o6kBVGQEAKBANtobskNMAAAAASUVORK5CYII=\");\n}\n\n.CodeMirror-lint-marker-error, .CodeMirror-lint-marker-warning {\n  background-position: center center;\n  background-repeat: no-repeat;\n  cursor: pointer;\n  display: inline-block;\n  height: 16px;\n  width: 16px;\n  vertical-align: middle;\n  position: relative;\n}\n\n.CodeMirror-lint-message-error, .CodeMirror-lint-message-warning {\n  padding-left: 18px;\n  background-position: top left;\n  background-repeat: no-repeat;\n}\n\n.CodeMirror-lint-marker-error, .CodeMirror-lint-message-error {\n  background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAHlBMVEW7AAC7AACxAAC7AAC7AAAAAAC4AAC5AAD///+7AAAUdclpAAAABnRSTlMXnORSiwCK0ZKSAAAATUlEQVR42mWPOQ7AQAgDuQLx/z8csYRmPRIFIwRGnosRrpamvkKi0FTIiMASR3hhKW+hAN6/tIWhu9PDWiTGNEkTtIOucA5Oyr9ckPgAWm0GPBog6v4AAAAASUVORK5CYII=\");\n}\n\n.CodeMirror-lint-marker-warning, .CodeMirror-lint-message-warning {\n  background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAANlBMVEX/uwDvrwD/uwD/uwD/uwD/uwD/uwD/uwD/uwD6twD/uwAAAADurwD2tQD7uAD+ugAAAAD/uwDhmeTRAAAADHRSTlMJ8mN1EYcbmiixgACm7WbuAAAAVklEQVR42n3PUQqAIBBFUU1LLc3u/jdbOJoW1P08DA9Gba8+YWJ6gNJoNYIBzAA2chBth5kLmG9YUoG0NHAUwFXwO9LuBQL1giCQb8gC9Oro2vp5rncCIY8L8uEx5ZkAAAAASUVORK5CYII=\");\n}\n\n.CodeMirror-lint-marker-multiple {\n  background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAHCAMAAADzjKfhAAAACVBMVEUAAAAAAAC/v7914kyHAAAAAXRSTlMAQObYZgAAACNJREFUeNo1ioEJAAAIwmz/H90iFFSGJgFMe3gaLZ0od+9/AQZ0ADosbYraAAAAAElFTkSuQmCC\");\n  background-repeat: no-repeat;\n  background-position: right bottom;\n  width: 100%; height: 100%;\n}\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/addon/lint/lint.js",
    "content": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n(function(mod) {\n  if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n    mod(require(\"../../lib/codemirror\"));\n  else if (typeof define == \"function\" && define.amd) // AMD\n    define([\"../../lib/codemirror\"], mod);\n  else // Plain browser env\n    mod(CodeMirror);\n})(function(CodeMirror) {\n  \"use strict\";\n  var GUTTER_ID = \"CodeMirror-lint-markers\";\n\n  function showTooltip(e, content) {\n    var tt = document.createElement(\"div\");\n    tt.className = \"CodeMirror-lint-tooltip\";\n    tt.appendChild(content.cloneNode(true));\n    document.body.appendChild(tt);\n\n    function position(e) {\n      if (!tt.parentNode) return CodeMirror.off(document, \"mousemove\", position);\n      tt.style.top = Math.max(0, e.clientY - tt.offsetHeight - 5) + \"px\";\n      tt.style.left = (e.clientX + 5) + \"px\";\n    }\n    CodeMirror.on(document, \"mousemove\", position);\n    position(e);\n    if (tt.style.opacity != null) tt.style.opacity = 1;\n    return tt;\n  }\n  function rm(elt) {\n    if (elt.parentNode) elt.parentNode.removeChild(elt);\n  }\n  function hideTooltip(tt) {\n    if (!tt.parentNode) return;\n    if (tt.style.opacity == null) rm(tt);\n    tt.style.opacity = 0;\n    setTimeout(function() { rm(tt); }, 600);\n  }\n\n  function showTooltipFor(e, content, node) {\n    var tooltip = showTooltip(e, content);\n    function hide() {\n      CodeMirror.off(node, \"mouseout\", hide);\n      if (tooltip) { hideTooltip(tooltip); tooltip = null; }\n    }\n    var poll = setInterval(function() {\n      if (tooltip) for (var n = node;; n = n.parentNode) {\n        if (n && n.nodeType == 11) n = n.host;\n        if (n == document.body) return;\n        if (!n) { hide(); break; }\n      }\n      if (!tooltip) return clearInterval(poll);\n    }, 400);\n    CodeMirror.on(node, \"mouseout\", hide);\n  }\n\n  function LintState(cm, options, hasGutter) {\n    this.marked = [];\n    this.options = options;\n    this.timeout = null;\n    this.hasGutter = hasGutter;\n    this.onMouseOver = function(e) { onMouseOver(cm, e); };\n  }\n\n  function parseOptions(cm, options) {\n    if (options instanceof Function) return {getAnnotations: options};\n    if (!options || options === true) options = {};\n    if (!options.getAnnotations) options.getAnnotations = cm.getHelper(CodeMirror.Pos(0, 0), \"lint\");\n    if (!options.getAnnotations) throw new Error(\"Required option 'getAnnotations' missing (lint addon)\");\n    return options;\n  }\n\n  function clearMarks(cm) {\n    var state = cm.state.lint;\n    if (state.hasGutter) cm.clearGutter(GUTTER_ID);\n    for (var i = 0; i < state.marked.length; ++i)\n      state.marked[i].clear();\n    state.marked.length = 0;\n  }\n\n  function makeMarker(labels, severity, multiple, tooltips) {\n    var marker = document.createElement(\"div\"), inner = marker;\n    marker.className = \"CodeMirror-lint-marker-\" + severity;\n    if (multiple) {\n      inner = marker.appendChild(document.createElement(\"div\"));\n      inner.className = \"CodeMirror-lint-marker-multiple\";\n    }\n\n    if (tooltips != false) CodeMirror.on(inner, \"mouseover\", function(e) {\n      showTooltipFor(e, labels, inner);\n    });\n\n    return marker;\n  }\n\n  function getMaxSeverity(a, b) {\n    if (a == \"error\") return a;\n    else return b;\n  }\n\n  function groupByLine(annotations) {\n    var lines = [];\n    for (var i = 0; i < annotations.length; ++i) {\n      var ann = annotations[i], line = ann.from.line;\n      (lines[line] || (lines[line] = [])).push(ann);\n    }\n    return lines;\n  }\n\n  function annotationTooltip(ann) {\n    var severity = ann.severity;\n    if (!severity) severity = \"error\";\n    var tip = document.createElement(\"div\");\n    tip.className = \"CodeMirror-lint-message-\" + severity;\n    tip.appendChild(document.createTextNode(ann.message));\n    return tip;\n  }\n\n  function startLinting(cm) {\n    var state = cm.state.lint, options = state.options;\n    var passOptions = options.options || options; // Support deprecated passing of `options` property in options\n    if (options.async || options.getAnnotations.async)\n      options.getAnnotations(cm.getValue(), updateLinting, passOptions, cm);\n    else\n      updateLinting(cm, options.getAnnotations(cm.getValue(), passOptions, cm));\n  }\n\n  function updateLinting(cm, annotationsNotSorted) {\n    clearMarks(cm);\n    var state = cm.state.lint, options = state.options;\n\n    var annotations = groupByLine(annotationsNotSorted);\n\n    for (var line = 0; line < annotations.length; ++line) {\n      var anns = annotations[line];\n      if (!anns) continue;\n\n      var maxSeverity = null;\n      var tipLabel = state.hasGutter && document.createDocumentFragment();\n\n      for (var i = 0; i < anns.length; ++i) {\n        var ann = anns[i];\n        var severity = ann.severity;\n        if (!severity) severity = \"error\";\n        maxSeverity = getMaxSeverity(maxSeverity, severity);\n\n        if (options.formatAnnotation) ann = options.formatAnnotation(ann);\n        if (state.hasGutter) tipLabel.appendChild(annotationTooltip(ann));\n\n        if (ann.to) state.marked.push(cm.markText(ann.from, ann.to, {\n          className: \"CodeMirror-lint-mark-\" + severity,\n          __annotation: ann\n        }));\n      }\n\n      if (state.hasGutter)\n        cm.setGutterMarker(line, GUTTER_ID, makeMarker(tipLabel, maxSeverity, anns.length > 1,\n                                                       state.options.tooltips));\n    }\n    if (options.onUpdateLinting) options.onUpdateLinting(annotationsNotSorted, annotations, cm);\n  }\n\n  function onChange(cm) {\n    var state = cm.state.lint;\n    clearTimeout(state.timeout);\n    state.timeout = setTimeout(function(){startLinting(cm);}, state.options.delay || 500);\n  }\n\n  function popupSpanTooltip(ann, e) {\n    var target = e.target || e.srcElement;\n    showTooltipFor(e, annotationTooltip(ann), target);\n  }\n\n  function onMouseOver(cm, e) {\n    var target = e.target || e.srcElement;\n    if (!/\\bCodeMirror-lint-mark-/.test(target.className)) return;\n    var box = target.getBoundingClientRect(), x = (box.left + box.right) / 2, y = (box.top + box.bottom) / 2;\n    var spans = cm.findMarksAt(cm.coordsChar({left: x, top: y}, \"client\"));\n    for (var i = 0; i < spans.length; ++i) {\n      var ann = spans[i].__annotation;\n      if (ann) return popupSpanTooltip(ann, e);\n    }\n  }\n\n  CodeMirror.defineOption(\"lint\", false, function(cm, val, old) {\n    if (old && old != CodeMirror.Init) {\n      clearMarks(cm);\n      cm.off(\"change\", onChange);\n      CodeMirror.off(cm.getWrapperElement(), \"mouseover\", cm.state.lint.onMouseOver);\n      delete cm.state.lint;\n    }\n\n    if (val) {\n      var gutters = cm.getOption(\"gutters\"), hasLintGutter = false;\n      for (var i = 0; i < gutters.length; ++i) if (gutters[i] == GUTTER_ID) hasLintGutter = true;\n      var state = cm.state.lint = new LintState(cm, parseOptions(cm, val), hasLintGutter);\n      cm.on(\"change\", onChange);\n      if (state.options.tooltips != false)\n        CodeMirror.on(cm.getWrapperElement(), \"mouseover\", state.onMouseOver);\n\n      startLinting(cm);\n    }\n  });\n});\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/addon/lint/yaml-lint.js",
    "content": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n(function(mod) {\n  if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n    mod(require(\"../../lib/codemirror\"));\n  else if (typeof define == \"function\" && define.amd) // AMD\n    define([\"../../lib/codemirror\"], mod);\n  else // Plain browser env\n    mod(CodeMirror);\n})(function(CodeMirror) {\n\"use strict\";\n\n// Depends on js-yaml.js from https://github.com/nodeca/js-yaml\n\n// declare global: jsyaml\n\nCodeMirror.registerHelper(\"lint\", \"yaml\", function(text) {\n  var found = [];\n  try { jsyaml.load(text); }\n  catch(e) {\n      var loc = e.mark;\n      found.push({ from: CodeMirror.Pos(loc.line, loc.column), to: CodeMirror.Pos(loc.line, loc.column), message: e.message });\n  }\n  return found;\n});\n\n});\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/addon/merge/merge.css",
    "content": ".CodeMirror-merge {\n  position: relative;\n  border: 1px solid #ddd;\n  white-space: pre;\n}\n\n.CodeMirror-merge, .CodeMirror-merge .CodeMirror {\n  height: 350px;\n}\n\n.CodeMirror-merge-2pane .CodeMirror-merge-pane { width: 47%; }\n.CodeMirror-merge-2pane .CodeMirror-merge-gap { width: 6%; }\n.CodeMirror-merge-3pane .CodeMirror-merge-pane { width: 31%; }\n.CodeMirror-merge-3pane .CodeMirror-merge-gap { width: 3.5%; }\n\n.CodeMirror-merge-pane {\n  display: inline-block;\n  white-space: normal;\n  vertical-align: top;\n}\n.CodeMirror-merge-pane-rightmost {\n  position: absolute;\n  right: 0px;\n  z-index: 1;\n}\n\n.CodeMirror-merge-gap {\n  z-index: 2;\n  display: inline-block;\n  height: 100%;\n  -moz-box-sizing: border-box;\n  box-sizing: border-box;\n  overflow: hidden;\n  border-left: 1px solid #ddd;\n  border-right: 1px solid #ddd;\n  position: relative;\n  background: #f8f8f8;\n}\n\n.CodeMirror-merge-scrolllock-wrap {\n  position: absolute;\n  bottom: 0; left: 50%;\n}\n.CodeMirror-merge-scrolllock {\n  position: relative;\n  left: -50%;\n  cursor: pointer;\n  color: #555;\n  line-height: 1;\n}\n\n.CodeMirror-merge-copybuttons-left, .CodeMirror-merge-copybuttons-right {\n  position: absolute;\n  left: 0; top: 0;\n  right: 0; bottom: 0;\n  line-height: 1;\n}\n\n.CodeMirror-merge-copy {\n  position: absolute;\n  cursor: pointer;\n  color: #44c;\n}\n\n.CodeMirror-merge-copy-reverse {\n  position: absolute;\n  cursor: pointer;\n  color: #44c;\n}\n\n.CodeMirror-merge-copybuttons-left .CodeMirror-merge-copy { left: 2px; }\n.CodeMirror-merge-copybuttons-right .CodeMirror-merge-copy { right: 2px; }\n\n.CodeMirror-merge-r-inserted, .CodeMirror-merge-l-inserted {\n  background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAACCAYAAACddGYaAAAAGUlEQVQI12MwuCXy3+CWyH8GBgYGJgYkAABZbAQ9ELXurwAAAABJRU5ErkJggg==);\n  background-position: bottom left;\n  background-repeat: repeat-x;\n}\n\n.CodeMirror-merge-r-deleted, .CodeMirror-merge-l-deleted {\n  background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAACCAYAAACddGYaAAAAGUlEQVQI12M4Kyb2/6yY2H8GBgYGJgYkAABURgPz6Ks7wQAAAABJRU5ErkJggg==);\n  background-position: bottom left;\n  background-repeat: repeat-x;\n}\n\n.CodeMirror-merge-r-chunk { background: #ffffe0; }\n.CodeMirror-merge-r-chunk-start { border-top: 1px solid #ee8; }\n.CodeMirror-merge-r-chunk-end { border-bottom: 1px solid #ee8; }\n.CodeMirror-merge-r-connect { fill: #ffffe0; stroke: #ee8; stroke-width: 1px; }\n\n.CodeMirror-merge-l-chunk { background: #eef; }\n.CodeMirror-merge-l-chunk-start { border-top: 1px solid #88e; }\n.CodeMirror-merge-l-chunk-end { border-bottom: 1px solid #88e; }\n.CodeMirror-merge-l-connect { fill: #eef; stroke: #88e; stroke-width: 1px; }\n\n.CodeMirror-merge-l-chunk.CodeMirror-merge-r-chunk { background: #dfd; }\n.CodeMirror-merge-l-chunk-start.CodeMirror-merge-r-chunk-start { border-top: 1px solid #4e4; }\n.CodeMirror-merge-l-chunk-end.CodeMirror-merge-r-chunk-end { border-bottom: 1px solid #4e4; }\n\n.CodeMirror-merge-collapsed-widget:before {\n  content: \"(...)\";\n}\n.CodeMirror-merge-collapsed-widget {\n  cursor: pointer;\n  color: #88b;\n  background: #eef;\n  border: 1px solid #ddf;\n  font-size: 90%;\n  padding: 0 3px;\n  border-radius: 4px;\n}\n.CodeMirror-merge-collapsed-line .CodeMirror-gutter-elt { display: none; }\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/addon/merge/merge.js",
    "content": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n// declare global: diff_match_patch, DIFF_INSERT, DIFF_DELETE, DIFF_EQUAL\n\n(function(mod) {\n  if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n    mod(require(\"../../lib/codemirror\"), require(\"diff_match_patch\"));\n  else if (typeof define == \"function\" && define.amd) // AMD\n    define([\"../../lib/codemirror\", \"diff_match_patch\"], mod);\n  else // Plain browser env\n    mod(CodeMirror, diff_match_patch);\n})(function(CodeMirror, diff_match_patch) {\n  \"use strict\";\n  var Pos = CodeMirror.Pos;\n  var svgNS = \"http://www.w3.org/2000/svg\";\n\n  function DiffView(mv, type) {\n    this.mv = mv;\n    this.type = type;\n    this.classes = type == \"left\"\n      ? {chunk: \"CodeMirror-merge-l-chunk\",\n         start: \"CodeMirror-merge-l-chunk-start\",\n         end: \"CodeMirror-merge-l-chunk-end\",\n         insert: \"CodeMirror-merge-l-inserted\",\n         del: \"CodeMirror-merge-l-deleted\",\n         connect: \"CodeMirror-merge-l-connect\"}\n      : {chunk: \"CodeMirror-merge-r-chunk\",\n         start: \"CodeMirror-merge-r-chunk-start\",\n         end: \"CodeMirror-merge-r-chunk-end\",\n         insert: \"CodeMirror-merge-r-inserted\",\n         del: \"CodeMirror-merge-r-deleted\",\n         connect: \"CodeMirror-merge-r-connect\"};\n  }\n\n  DiffView.prototype = {\n    constructor: DiffView,\n    init: function(pane, orig, options) {\n      this.edit = this.mv.edit;\n      this.orig = CodeMirror(pane, copyObj({value: orig, readOnly: !this.mv.options.allowEditingOriginals}, copyObj(options)));\n\n      this.diff = getDiff(asString(orig), asString(options.value));\n      this.chunks = getChunks(this.diff);\n      this.diffOutOfDate = this.dealigned = false;\n\n      this.showDifferences = options.showDifferences !== false;\n      this.forceUpdate = registerUpdate(this);\n      setScrollLock(this, true, false);\n      registerScroll(this);\n    },\n    setShowDifferences: function(val) {\n      val = val !== false;\n      if (val != this.showDifferences) {\n        this.showDifferences = val;\n        this.forceUpdate(\"full\");\n      }\n    }\n  };\n\n  function ensureDiff(dv) {\n    if (dv.diffOutOfDate) {\n      dv.diff = getDiff(dv.orig.getValue(), dv.edit.getValue());\n      dv.chunks = getChunks(dv.diff);\n      dv.diffOutOfDate = false;\n      CodeMirror.signal(dv.edit, \"updateDiff\", dv.diff);\n    }\n  }\n\n  var updating = false;\n  function registerUpdate(dv) {\n    var edit = {from: 0, to: 0, marked: []};\n    var orig = {from: 0, to: 0, marked: []};\n    var debounceChange, updatingFast = false;\n    function update(mode) {\n      updating = true;\n      updatingFast = false;\n      if (mode == \"full\") {\n        if (dv.svg) clear(dv.svg);\n        if (dv.copyButtons) clear(dv.copyButtons);\n        clearMarks(dv.edit, edit.marked, dv.classes);\n        clearMarks(dv.orig, orig.marked, dv.classes);\n        edit.from = edit.to = orig.from = orig.to = 0;\n      }\n      ensureDiff(dv);\n      if (dv.showDifferences) {\n        updateMarks(dv.edit, dv.diff, edit, DIFF_INSERT, dv.classes);\n        updateMarks(dv.orig, dv.diff, orig, DIFF_DELETE, dv.classes);\n      }\n      makeConnections(dv);\n\n      if (dv.mv.options.connect == \"align\")\n        alignChunks(dv);\n      updating = false;\n    }\n    function setDealign(fast) {\n      if (updating) return;\n      dv.dealigned = true;\n      set(fast);\n    }\n    function set(fast) {\n      if (updating || updatingFast) return;\n      clearTimeout(debounceChange);\n      if (fast === true) updatingFast = true;\n      debounceChange = setTimeout(update, fast === true ? 20 : 250);\n    }\n    function change(_cm, change) {\n      if (!dv.diffOutOfDate) {\n        dv.diffOutOfDate = true;\n        edit.from = edit.to = orig.from = orig.to = 0;\n      }\n      // Update faster when a line was added/removed\n      setDealign(change.text.length - 1 != change.to.line - change.from.line);\n    }\n    dv.edit.on(\"change\", change);\n    dv.orig.on(\"change\", change);\n    dv.edit.on(\"markerAdded\", setDealign);\n    dv.edit.on(\"markerCleared\", setDealign);\n    dv.orig.on(\"markerAdded\", setDealign);\n    dv.orig.on(\"markerCleared\", setDealign);\n    dv.edit.on(\"viewportChange\", function() { set(false); });\n    dv.orig.on(\"viewportChange\", function() { set(false); });\n    update();\n    return update;\n  }\n\n  function registerScroll(dv) {\n    dv.edit.on(\"scroll\", function() {\n      syncScroll(dv, DIFF_INSERT) && makeConnections(dv);\n    });\n    dv.orig.on(\"scroll\", function() {\n      syncScroll(dv, DIFF_DELETE) && makeConnections(dv);\n    });\n  }\n\n  function syncScroll(dv, type) {\n    // Change handler will do a refresh after a timeout when diff is out of date\n    if (dv.diffOutOfDate) return false;\n    if (!dv.lockScroll) return true;\n    var editor, other, now = +new Date;\n    if (type == DIFF_INSERT) { editor = dv.edit; other = dv.orig; }\n    else { editor = dv.orig; other = dv.edit; }\n    // Don't take action if the position of this editor was recently set\n    // (to prevent feedback loops)\n    if (editor.state.scrollSetBy == dv && (editor.state.scrollSetAt || 0) + 50 > now) return false;\n\n    var sInfo = editor.getScrollInfo();\n    if (dv.mv.options.connect == \"align\") {\n      targetPos = sInfo.top;\n    } else {\n      var halfScreen = .5 * sInfo.clientHeight, midY = sInfo.top + halfScreen;\n      var mid = editor.lineAtHeight(midY, \"local\");\n      var around = chunkBoundariesAround(dv.chunks, mid, type == DIFF_INSERT);\n      var off = getOffsets(editor, type == DIFF_INSERT ? around.edit : around.orig);\n      var offOther = getOffsets(other, type == DIFF_INSERT ? around.orig : around.edit);\n      var ratio = (midY - off.top) / (off.bot - off.top);\n      var targetPos = (offOther.top - halfScreen) + ratio * (offOther.bot - offOther.top);\n\n      var botDist, mix;\n      // Some careful tweaking to make sure no space is left out of view\n      // when scrolling to top or bottom.\n      if (targetPos > sInfo.top && (mix = sInfo.top / halfScreen) < 1) {\n        targetPos = targetPos * mix + sInfo.top * (1 - mix);\n      } else if ((botDist = sInfo.height - sInfo.clientHeight - sInfo.top) < halfScreen) {\n        var otherInfo = other.getScrollInfo();\n        var botDistOther = otherInfo.height - otherInfo.clientHeight - targetPos;\n        if (botDistOther > botDist && (mix = botDist / halfScreen) < 1)\n          targetPos = targetPos * mix + (otherInfo.height - otherInfo.clientHeight - botDist) * (1 - mix);\n      }\n    }\n\n    other.scrollTo(sInfo.left, targetPos);\n    other.state.scrollSetAt = now;\n    other.state.scrollSetBy = dv;\n    return true;\n  }\n\n  function getOffsets(editor, around) {\n    var bot = around.after;\n    if (bot == null) bot = editor.lastLine() + 1;\n    return {top: editor.heightAtLine(around.before || 0, \"local\"),\n            bot: editor.heightAtLine(bot, \"local\")};\n  }\n\n  function setScrollLock(dv, val, action) {\n    dv.lockScroll = val;\n    if (val && action != false) syncScroll(dv, DIFF_INSERT) && makeConnections(dv);\n    dv.lockButton.innerHTML = val ? \"\\u21db\\u21da\" : \"\\u21db&nbsp;&nbsp;\\u21da\";\n  }\n\n  // Updating the marks for editor content\n\n  function clearMarks(editor, arr, classes) {\n    for (var i = 0; i < arr.length; ++i) {\n      var mark = arr[i];\n      if (mark instanceof CodeMirror.TextMarker) {\n        mark.clear();\n      } else if (mark.parent) {\n        editor.removeLineClass(mark, \"background\", classes.chunk);\n        editor.removeLineClass(mark, \"background\", classes.start);\n        editor.removeLineClass(mark, \"background\", classes.end);\n      }\n    }\n    arr.length = 0;\n  }\n\n  // FIXME maybe add a margin around viewport to prevent too many updates\n  function updateMarks(editor, diff, state, type, classes) {\n    var vp = editor.getViewport();\n    editor.operation(function() {\n      if (state.from == state.to || vp.from - state.to > 20 || state.from - vp.to > 20) {\n        clearMarks(editor, state.marked, classes);\n        markChanges(editor, diff, type, state.marked, vp.from, vp.to, classes);\n        state.from = vp.from; state.to = vp.to;\n      } else {\n        if (vp.from < state.from) {\n          markChanges(editor, diff, type, state.marked, vp.from, state.from, classes);\n          state.from = vp.from;\n        }\n        if (vp.to > state.to) {\n          markChanges(editor, diff, type, state.marked, state.to, vp.to, classes);\n          state.to = vp.to;\n        }\n      }\n    });\n  }\n\n  function markChanges(editor, diff, type, marks, from, to, classes) {\n    var pos = Pos(0, 0);\n    var top = Pos(from, 0), bot = editor.clipPos(Pos(to - 1));\n    var cls = type == DIFF_DELETE ? classes.del : classes.insert;\n    function markChunk(start, end) {\n      var bfrom = Math.max(from, start), bto = Math.min(to, end);\n      for (var i = bfrom; i < bto; ++i) {\n        var line = editor.addLineClass(i, \"background\", classes.chunk);\n        if (i == start) editor.addLineClass(line, \"background\", classes.start);\n        if (i == end - 1) editor.addLineClass(line, \"background\", classes.end);\n        marks.push(line);\n      }\n      // When the chunk is empty, make sure a horizontal line shows up\n      if (start == end && bfrom == end && bto == end) {\n        if (bfrom)\n          marks.push(editor.addLineClass(bfrom - 1, \"background\", classes.end));\n        else\n          marks.push(editor.addLineClass(bfrom, \"background\", classes.start));\n      }\n    }\n\n    var chunkStart = 0;\n    for (var i = 0; i < diff.length; ++i) {\n      var part = diff[i], tp = part[0], str = part[1];\n      if (tp == DIFF_EQUAL) {\n        var cleanFrom = pos.line + (startOfLineClean(diff, i) ? 0 : 1);\n        moveOver(pos, str);\n        var cleanTo = pos.line + (endOfLineClean(diff, i) ? 1 : 0);\n        if (cleanTo > cleanFrom) {\n          if (i) markChunk(chunkStart, cleanFrom);\n          chunkStart = cleanTo;\n        }\n      } else {\n        if (tp == type) {\n          var end = moveOver(pos, str, true);\n          var a = posMax(top, pos), b = posMin(bot, end);\n          if (!posEq(a, b))\n            marks.push(editor.markText(a, b, {className: cls}));\n          pos = end;\n        }\n      }\n    }\n    if (chunkStart <= pos.line) markChunk(chunkStart, pos.line + 1);\n  }\n\n  // Updating the gap between editor and original\n\n  function makeConnections(dv) {\n    if (!dv.showDifferences) return;\n\n    if (dv.svg) {\n      clear(dv.svg);\n      var w = dv.gap.offsetWidth;\n      attrs(dv.svg, \"width\", w, \"height\", dv.gap.offsetHeight);\n    }\n    if (dv.copyButtons) clear(dv.copyButtons);\n\n    var vpEdit = dv.edit.getViewport(), vpOrig = dv.orig.getViewport();\n    var sTopEdit = dv.edit.getScrollInfo().top, sTopOrig = dv.orig.getScrollInfo().top;\n    for (var i = 0; i < dv.chunks.length; i++) {\n      var ch = dv.chunks[i];\n      if (ch.editFrom <= vpEdit.to && ch.editTo >= vpEdit.from &&\n          ch.origFrom <= vpOrig.to && ch.origTo >= vpOrig.from)\n        drawConnectorsForChunk(dv, ch, sTopOrig, sTopEdit, w);\n    }\n  }\n\n  function getMatchingOrigLine(editLine, chunks) {\n    var editStart = 0, origStart = 0;\n    for (var i = 0; i < chunks.length; i++) {\n      var chunk = chunks[i];\n      if (chunk.editTo > editLine && chunk.editFrom <= editLine) return null;\n      if (chunk.editFrom > editLine) break;\n      editStart = chunk.editTo;\n      origStart = chunk.origTo;\n    }\n    return origStart + (editLine - editStart);\n  }\n\n  function findAlignedLines(dv, other) {\n    var linesToAlign = [];\n    for (var i = 0; i < dv.chunks.length; i++) {\n      var chunk = dv.chunks[i];\n      linesToAlign.push([chunk.origTo, chunk.editTo, other ? getMatchingOrigLine(chunk.editTo, other.chunks) : null]);\n    }\n    if (other) {\n      for (var i = 0; i < other.chunks.length; i++) {\n        var chunk = other.chunks[i];\n        for (var j = 0; j < linesToAlign.length; j++) {\n          var align = linesToAlign[j];\n          if (align[1] == chunk.editTo) {\n            j = -1;\n            break;\n          } else if (align[1] > chunk.editTo) {\n            break;\n          }\n        }\n        if (j > -1)\n          linesToAlign.splice(j - 1, 0, [getMatchingOrigLine(chunk.editTo, dv.chunks), chunk.editTo, chunk.origTo]);\n      }\n    }\n    return linesToAlign;\n  }\n\n  function alignChunks(dv, force) {\n    if (!dv.dealigned && !force) return;\n    if (!dv.orig.curOp) return dv.orig.operation(function() {\n      alignChunks(dv, force);\n    });\n\n    dv.dealigned = false;\n    var other = dv.mv.left == dv ? dv.mv.right : dv.mv.left;\n    if (other) {\n      ensureDiff(other);\n      other.dealigned = false;\n    }\n    var linesToAlign = findAlignedLines(dv, other);\n\n    // Clear old aligners\n    var aligners = dv.mv.aligners;\n    for (var i = 0; i < aligners.length; i++)\n      aligners[i].clear();\n    aligners.length = 0;\n\n    var cm = [dv.orig, dv.edit], scroll = [];\n    if (other) cm.push(other.orig);\n    for (var i = 0; i < cm.length; i++)\n      scroll.push(cm[i].getScrollInfo().top);\n\n    for (var ln = 0; ln < linesToAlign.length; ln++)\n      alignLines(cm, linesToAlign[ln], aligners);\n\n    for (var i = 0; i < cm.length; i++)\n      cm[i].scrollTo(null, scroll[i]);\n  }\n\n  function alignLines(cm, lines, aligners) {\n    var maxOffset = 0, offset = [];\n    for (var i = 0; i < cm.length; i++) if (lines[i] != null) {\n      var off = cm[i].heightAtLine(lines[i], \"local\");\n      offset[i] = off;\n      maxOffset = Math.max(maxOffset, off);\n    }\n    for (var i = 0; i < cm.length; i++) if (lines[i] != null) {\n      var diff = maxOffset - offset[i];\n      if (diff > 1)\n        aligners.push(padAbove(cm[i], lines[i], diff));\n    }\n  }\n\n  function padAbove(cm, line, size) {\n    var above = true;\n    if (line > cm.lastLine()) {\n      line--;\n      above = false;\n    }\n    var elt = document.createElement(\"div\");\n    elt.className = \"CodeMirror-merge-spacer\";\n    elt.style.height = size + \"px\"; elt.style.minWidth = \"1px\";\n    return cm.addLineWidget(line, elt, {height: size, above: above});\n  }\n\n  function drawConnectorsForChunk(dv, chunk, sTopOrig, sTopEdit, w) {\n    var flip = dv.type == \"left\";\n    var top = dv.orig.heightAtLine(chunk.origFrom, \"local\") - sTopOrig;\n    if (dv.svg) {\n      var topLpx = top;\n      var topRpx = dv.edit.heightAtLine(chunk.editFrom, \"local\") - sTopEdit;\n      if (flip) { var tmp = topLpx; topLpx = topRpx; topRpx = tmp; }\n      var botLpx = dv.orig.heightAtLine(chunk.origTo, \"local\") - sTopOrig;\n      var botRpx = dv.edit.heightAtLine(chunk.editTo, \"local\") - sTopEdit;\n      if (flip) { var tmp = botLpx; botLpx = botRpx; botRpx = tmp; }\n      var curveTop = \" C \" + w/2 + \" \" + topRpx + \" \" + w/2 + \" \" + topLpx + \" \" + (w + 2) + \" \" + topLpx;\n      var curveBot = \" C \" + w/2 + \" \" + botLpx + \" \" + w/2 + \" \" + botRpx + \" -1 \" + botRpx;\n      attrs(dv.svg.appendChild(document.createElementNS(svgNS, \"path\")),\n            \"d\", \"M -1 \" + topRpx + curveTop + \" L \" + (w + 2) + \" \" + botLpx + curveBot + \" z\",\n            \"class\", dv.classes.connect);\n    }\n    if (dv.copyButtons) {\n      var copy = dv.copyButtons.appendChild(elt(\"div\", dv.type == \"left\" ? \"\\u21dd\" : \"\\u21dc\",\n                                                \"CodeMirror-merge-copy\"));\n      var editOriginals = dv.mv.options.allowEditingOriginals;\n      copy.title = editOriginals ? \"Push to left\" : \"Revert chunk\";\n      copy.chunk = chunk;\n      copy.style.top = top + \"px\";\n\n      if (editOriginals) {\n        var topReverse = dv.orig.heightAtLine(chunk.editFrom, \"local\") - sTopEdit;\n        var copyReverse = dv.copyButtons.appendChild(elt(\"div\", dv.type == \"right\" ? \"\\u21dd\" : \"\\u21dc\",\n                                                         \"CodeMirror-merge-copy-reverse\"));\n        copyReverse.title = \"Push to right\";\n        copyReverse.chunk = {editFrom: chunk.origFrom, editTo: chunk.origTo,\n                             origFrom: chunk.editFrom, origTo: chunk.editTo};\n        copyReverse.style.top = topReverse + \"px\";\n        dv.type == \"right\" ? copyReverse.style.left = \"2px\" : copyReverse.style.right = \"2px\";\n      }\n    }\n  }\n\n  function copyChunk(dv, to, from, chunk) {\n    if (dv.diffOutOfDate) return;\n    to.replaceRange(from.getRange(Pos(chunk.origFrom, 0), Pos(chunk.origTo, 0)),\n                         Pos(chunk.editFrom, 0), Pos(chunk.editTo, 0));\n  }\n\n  // Merge view, containing 0, 1, or 2 diff views.\n\n  var MergeView = CodeMirror.MergeView = function(node, options) {\n    if (!(this instanceof MergeView)) return new MergeView(node, options);\n\n    this.options = options;\n    var origLeft = options.origLeft, origRight = options.origRight == null ? options.orig : options.origRight;\n\n    var hasLeft = origLeft != null, hasRight = origRight != null;\n    var panes = 1 + (hasLeft ? 1 : 0) + (hasRight ? 1 : 0);\n    var wrap = [], left = this.left = null, right = this.right = null;\n    var self = this;\n\n    if (hasLeft) {\n      left = this.left = new DiffView(this, \"left\");\n      var leftPane = elt(\"div\", null, \"CodeMirror-merge-pane\");\n      wrap.push(leftPane);\n      wrap.push(buildGap(left));\n    }\n\n    var editPane = elt(\"div\", null, \"CodeMirror-merge-pane\");\n    wrap.push(editPane);\n\n    if (hasRight) {\n      right = this.right = new DiffView(this, \"right\");\n      wrap.push(buildGap(right));\n      var rightPane = elt(\"div\", null, \"CodeMirror-merge-pane\");\n      wrap.push(rightPane);\n    }\n\n    (hasRight ? rightPane : editPane).className += \" CodeMirror-merge-pane-rightmost\";\n\n    wrap.push(elt(\"div\", null, null, \"height: 0; clear: both;\"));\n\n    var wrapElt = this.wrap = node.appendChild(elt(\"div\", wrap, \"CodeMirror-merge CodeMirror-merge-\" + panes + \"pane\"));\n    this.edit = CodeMirror(editPane, copyObj(options));\n\n    if (left) left.init(leftPane, origLeft, options);\n    if (right) right.init(rightPane, origRight, options);\n\n    if (options.collapseIdentical) {\n      updating = true;\n      this.editor().operation(function() {\n        collapseIdenticalStretches(self, options.collapseIdentical);\n      });\n      updating = false;\n    }\n    if (options.connect == \"align\") {\n      this.aligners = [];\n      alignChunks(this.left || this.right, true);\n    }\n\n    var onResize = function() {\n      if (left) makeConnections(left);\n      if (right) makeConnections(right);\n    };\n    CodeMirror.on(window, \"resize\", onResize);\n    var resizeInterval = setInterval(function() {\n      for (var p = wrapElt.parentNode; p && p != document.body; p = p.parentNode) {}\n      if (!p) { clearInterval(resizeInterval); CodeMirror.off(window, \"resize\", onResize); }\n    }, 5000);\n  };\n\n  function buildGap(dv) {\n    var lock = dv.lockButton = elt(\"div\", null, \"CodeMirror-merge-scrolllock\");\n    lock.title = \"Toggle locked scrolling\";\n    var lockWrap = elt(\"div\", [lock], \"CodeMirror-merge-scrolllock-wrap\");\n    CodeMirror.on(lock, \"click\", function() { setScrollLock(dv, !dv.lockScroll); });\n    var gapElts = [lockWrap];\n    if (dv.mv.options.revertButtons !== false) {\n      dv.copyButtons = elt(\"div\", null, \"CodeMirror-merge-copybuttons-\" + dv.type);\n      CodeMirror.on(dv.copyButtons, \"click\", function(e) {\n        var node = e.target || e.srcElement;\n        if (!node.chunk) return;\n        if (node.className == \"CodeMirror-merge-copy-reverse\") {\n          copyChunk(dv, dv.orig, dv.edit, node.chunk);\n          return;\n        }\n        copyChunk(dv, dv.edit, dv.orig, node.chunk);\n      });\n      gapElts.unshift(dv.copyButtons);\n    }\n    if (dv.mv.options.connect != \"align\") {\n      var svg = document.createElementNS && document.createElementNS(svgNS, \"svg\");\n      if (svg && !svg.createSVGRect) svg = null;\n      dv.svg = svg;\n      if (svg) gapElts.push(svg);\n    }\n\n    return dv.gap = elt(\"div\", gapElts, \"CodeMirror-merge-gap\");\n  }\n\n  MergeView.prototype = {\n    constuctor: MergeView,\n    editor: function() { return this.edit; },\n    rightOriginal: function() { return this.right && this.right.orig; },\n    leftOriginal: function() { return this.left && this.left.orig; },\n    setShowDifferences: function(val) {\n      if (this.right) this.right.setShowDifferences(val);\n      if (this.left) this.left.setShowDifferences(val);\n    },\n    rightChunks: function() {\n      if (this.right) { ensureDiff(this.right); return this.right.chunks; }\n    },\n    leftChunks: function() {\n      if (this.left) { ensureDiff(this.left); return this.left.chunks; }\n    }\n  };\n\n  function asString(obj) {\n    if (typeof obj == \"string\") return obj;\n    else return obj.getValue();\n  }\n\n  // Operations on diffs\n\n  var dmp = new diff_match_patch();\n  function getDiff(a, b) {\n    var diff = dmp.diff_main(a, b);\n    dmp.diff_cleanupSemantic(diff);\n    // The library sometimes leaves in empty parts, which confuse the algorithm\n    for (var i = 0; i < diff.length; ++i) {\n      var part = diff[i];\n      if (!part[1]) {\n        diff.splice(i--, 1);\n      } else if (i && diff[i - 1][0] == part[0]) {\n        diff.splice(i--, 1);\n        diff[i][1] += part[1];\n      }\n    }\n    return diff;\n  }\n\n  function getChunks(diff) {\n    var chunks = [];\n    var startEdit = 0, startOrig = 0;\n    var edit = Pos(0, 0), orig = Pos(0, 0);\n    for (var i = 0; i < diff.length; ++i) {\n      var part = diff[i], tp = part[0];\n      if (tp == DIFF_EQUAL) {\n        var startOff = startOfLineClean(diff, i) ? 0 : 1;\n        var cleanFromEdit = edit.line + startOff, cleanFromOrig = orig.line + startOff;\n        moveOver(edit, part[1], null, orig);\n        var endOff = endOfLineClean(diff, i) ? 1 : 0;\n        var cleanToEdit = edit.line + endOff, cleanToOrig = orig.line + endOff;\n        if (cleanToEdit > cleanFromEdit) {\n          if (i) chunks.push({origFrom: startOrig, origTo: cleanFromOrig,\n                              editFrom: startEdit, editTo: cleanFromEdit});\n          startEdit = cleanToEdit; startOrig = cleanToOrig;\n        }\n      } else {\n        moveOver(tp == DIFF_INSERT ? edit : orig, part[1]);\n      }\n    }\n    if (startEdit <= edit.line || startOrig <= orig.line)\n      chunks.push({origFrom: startOrig, origTo: orig.line + 1,\n                   editFrom: startEdit, editTo: edit.line + 1});\n    return chunks;\n  }\n\n  function endOfLineClean(diff, i) {\n    if (i == diff.length - 1) return true;\n    var next = diff[i + 1][1];\n    if (next.length == 1 || next.charCodeAt(0) != 10) return false;\n    if (i == diff.length - 2) return true;\n    next = diff[i + 2][1];\n    return next.length > 1 && next.charCodeAt(0) == 10;\n  }\n\n  function startOfLineClean(diff, i) {\n    if (i == 0) return true;\n    var last = diff[i - 1][1];\n    if (last.charCodeAt(last.length - 1) != 10) return false;\n    if (i == 1) return true;\n    last = diff[i - 2][1];\n    return last.charCodeAt(last.length - 1) == 10;\n  }\n\n  function chunkBoundariesAround(chunks, n, nInEdit) {\n    var beforeE, afterE, beforeO, afterO;\n    for (var i = 0; i < chunks.length; i++) {\n      var chunk = chunks[i];\n      var fromLocal = nInEdit ? chunk.editFrom : chunk.origFrom;\n      var toLocal = nInEdit ? chunk.editTo : chunk.origTo;\n      if (afterE == null) {\n        if (fromLocal > n) { afterE = chunk.editFrom; afterO = chunk.origFrom; }\n        else if (toLocal > n) { afterE = chunk.editTo; afterO = chunk.origTo; }\n      }\n      if (toLocal <= n) { beforeE = chunk.editTo; beforeO = chunk.origTo; }\n      else if (fromLocal <= n) { beforeE = chunk.editFrom; beforeO = chunk.origFrom; }\n    }\n    return {edit: {before: beforeE, after: afterE}, orig: {before: beforeO, after: afterO}};\n  }\n\n  function collapseSingle(cm, from, to) {\n    cm.addLineClass(from, \"wrap\", \"CodeMirror-merge-collapsed-line\");\n    var widget = document.createElement(\"span\");\n    widget.className = \"CodeMirror-merge-collapsed-widget\";\n    widget.title = \"Identical text collapsed. Click to expand.\";\n    var mark = cm.markText(Pos(from, 0), Pos(to - 1), {\n      inclusiveLeft: true,\n      inclusiveRight: true,\n      replacedWith: widget,\n      clearOnEnter: true\n    });\n    function clear() {\n      mark.clear();\n      cm.removeLineClass(from, \"wrap\", \"CodeMirror-merge-collapsed-line\");\n    }\n    widget.addEventListener(\"click\", clear);\n    return {mark: mark, clear: clear};\n  }\n\n  function collapseStretch(size, editors) {\n    var marks = [];\n    function clear() {\n      for (var i = 0; i < marks.length; i++) marks[i].clear();\n    }\n    for (var i = 0; i < editors.length; i++) {\n      var editor = editors[i];\n      var mark = collapseSingle(editor.cm, editor.line, editor.line + size);\n      marks.push(mark);\n      mark.mark.on(\"clear\", clear);\n    }\n    return marks[0].mark;\n  }\n\n  function unclearNearChunks(dv, margin, off, clear) {\n    for (var i = 0; i < dv.chunks.length; i++) {\n      var chunk = dv.chunks[i];\n      for (var l = chunk.editFrom - margin; l < chunk.editTo + margin; l++) {\n        var pos = l + off;\n        if (pos >= 0 && pos < clear.length) clear[pos] = false;\n      }\n    }\n  }\n\n  function collapseIdenticalStretches(mv, margin) {\n    if (typeof margin != \"number\") margin = 2;\n    var clear = [], edit = mv.editor(), off = edit.firstLine();\n    for (var l = off, e = edit.lastLine(); l <= e; l++) clear.push(true);\n    if (mv.left) unclearNearChunks(mv.left, margin, off, clear);\n    if (mv.right) unclearNearChunks(mv.right, margin, off, clear);\n\n    for (var i = 0; i < clear.length; i++) {\n      if (clear[i]) {\n        var line = i + off;\n        for (var size = 1; i < clear.length - 1 && clear[i + 1]; i++, size++) {}\n        if (size > margin) {\n          var editors = [{line: line, cm: edit}];\n          if (mv.left) editors.push({line: getMatchingOrigLine(line, mv.left.chunks), cm: mv.left.orig});\n          if (mv.right) editors.push({line: getMatchingOrigLine(line, mv.right.chunks), cm: mv.right.orig});\n          var mark = collapseStretch(size, editors);\n          if (mv.options.onCollapse) mv.options.onCollapse(mv, line, size, mark);\n        }\n      }\n    }\n  }\n\n  // General utilities\n\n  function elt(tag, content, className, style) {\n    var e = document.createElement(tag);\n    if (className) e.className = className;\n    if (style) e.style.cssText = style;\n    if (typeof content == \"string\") e.appendChild(document.createTextNode(content));\n    else if (content) for (var i = 0; i < content.length; ++i) e.appendChild(content[i]);\n    return e;\n  }\n\n  function clear(node) {\n    for (var count = node.childNodes.length; count > 0; --count)\n      node.removeChild(node.firstChild);\n  }\n\n  function attrs(elt) {\n    for (var i = 1; i < arguments.length; i += 2)\n      elt.setAttribute(arguments[i], arguments[i+1]);\n  }\n\n  function copyObj(obj, target) {\n    if (!target) target = {};\n    for (var prop in obj) if (obj.hasOwnProperty(prop)) target[prop] = obj[prop];\n    return target;\n  }\n\n  function moveOver(pos, str, copy, other) {\n    var out = copy ? Pos(pos.line, pos.ch) : pos, at = 0;\n    for (;;) {\n      var nl = str.indexOf(\"\\n\", at);\n      if (nl == -1) break;\n      ++out.line;\n      if (other) ++other.line;\n      at = nl + 1;\n    }\n    out.ch = (at ? 0 : out.ch) + (str.length - at);\n    if (other) other.ch = (at ? 0 : other.ch) + (str.length - at);\n    return out;\n  }\n\n  function posMin(a, b) { return (a.line - b.line || a.ch - b.ch) < 0 ? a : b; }\n  function posMax(a, b) { return (a.line - b.line || a.ch - b.ch) > 0 ? a : b; }\n  function posEq(a, b) { return a.line == b.line && a.ch == b.ch; }\n});\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/addon/mode/loadmode.js",
    "content": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n(function(mod) {\n  if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n    mod(require(\"../../lib/codemirror\"), \"cjs\");\n  else if (typeof define == \"function\" && define.amd) // AMD\n    define([\"../../lib/codemirror\"], function(CM) { mod(CM, \"amd\"); });\n  else // Plain browser env\n    mod(CodeMirror, \"plain\");\n})(function(CodeMirror, env) {\n  if (!CodeMirror.modeURL) CodeMirror.modeURL = \"../mode/%N/%N.js\";\n\n  var loading = {};\n  function splitCallback(cont, n) {\n    var countDown = n;\n    return function() { if (--countDown == 0) cont(); };\n  }\n  function ensureDeps(mode, cont) {\n    var deps = CodeMirror.modes[mode].dependencies;\n    if (!deps) return cont();\n    var missing = [];\n    for (var i = 0; i < deps.length; ++i) {\n      if (!CodeMirror.modes.hasOwnProperty(deps[i]))\n        missing.push(deps[i]);\n    }\n    if (!missing.length) return cont();\n    var split = splitCallback(cont, missing.length);\n    for (var i = 0; i < missing.length; ++i)\n      CodeMirror.requireMode(missing[i], split);\n  }\n\n  CodeMirror.requireMode = function(mode, cont) {\n    if (typeof mode != \"string\") mode = mode.name;\n    if (CodeMirror.modes.hasOwnProperty(mode)) return ensureDeps(mode, cont);\n    if (loading.hasOwnProperty(mode)) return loading[mode].push(cont);\n\n    var file = CodeMirror.modeURL.replace(/%N/g, mode);\n    if (env == \"plain\") {\n      var script = document.createElement(\"script\");\n      script.src = file;\n      var others = document.getElementsByTagName(\"script\")[0];\n      var list = loading[mode] = [cont];\n      CodeMirror.on(script, \"load\", function() {\n        ensureDeps(mode, function() {\n          for (var i = 0; i < list.length; ++i) list[i]();\n        });\n      });\n      others.parentNode.insertBefore(script, others);\n    } else if (env == \"cjs\") {\n      require(file);\n      cont();\n    } else if (env == \"amd\") {\n      requirejs([file], cont);\n    }\n  };\n\n  CodeMirror.autoLoadMode = function(instance, mode) {\n    if (!CodeMirror.modes.hasOwnProperty(mode))\n      CodeMirror.requireMode(mode, function() {\n        instance.setOption(\"mode\", instance.getOption(\"mode\"));\n      });\n  };\n});\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/addon/mode/multiplex.js",
    "content": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n(function(mod) {\n  if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n    mod(require(\"../../lib/codemirror\"));\n  else if (typeof define == \"function\" && define.amd) // AMD\n    define([\"../../lib/codemirror\"], mod);\n  else // Plain browser env\n    mod(CodeMirror);\n})(function(CodeMirror) {\n\"use strict\";\n\nCodeMirror.multiplexingMode = function(outer /*, others */) {\n  // Others should be {open, close, mode [, delimStyle] [, innerStyle]} objects\n  var others = Array.prototype.slice.call(arguments, 1);\n  var n_others = others.length;\n\n  function indexOf(string, pattern, from) {\n    if (typeof pattern == \"string\") return string.indexOf(pattern, from);\n    var m = pattern.exec(from ? string.slice(from) : string);\n    return m ? m.index + from : -1;\n  }\n\n  return {\n    startState: function() {\n      return {\n        outer: CodeMirror.startState(outer),\n        innerActive: null,\n        inner: null\n      };\n    },\n\n    copyState: function(state) {\n      return {\n        outer: CodeMirror.copyState(outer, state.outer),\n        innerActive: state.innerActive,\n        inner: state.innerActive && CodeMirror.copyState(state.innerActive.mode, state.inner)\n      };\n    },\n\n    token: function(stream, state) {\n      if (!state.innerActive) {\n        var cutOff = Infinity, oldContent = stream.string;\n        for (var i = 0; i < n_others; ++i) {\n          var other = others[i];\n          var found = indexOf(oldContent, other.open, stream.pos);\n          if (found == stream.pos) {\n            stream.match(other.open);\n            state.innerActive = other;\n            state.inner = CodeMirror.startState(other.mode, outer.indent ? outer.indent(state.outer, \"\") : 0);\n            return other.delimStyle;\n          } else if (found != -1 && found < cutOff) {\n            cutOff = found;\n          }\n        }\n        if (cutOff != Infinity) stream.string = oldContent.slice(0, cutOff);\n        var outerToken = outer.token(stream, state.outer);\n        if (cutOff != Infinity) stream.string = oldContent;\n        return outerToken;\n      } else {\n        var curInner = state.innerActive, oldContent = stream.string;\n        if (!curInner.close && stream.sol()) {\n          state.innerActive = state.inner = null;\n          return this.token(stream, state);\n        }\n        var found = curInner.close ? indexOf(oldContent, curInner.close, stream.pos) : -1;\n        if (found == stream.pos) {\n          stream.match(curInner.close);\n          state.innerActive = state.inner = null;\n          return curInner.delimStyle;\n        }\n        if (found > -1) stream.string = oldContent.slice(0, found);\n        var innerToken = curInner.mode.token(stream, state.inner);\n        if (found > -1) stream.string = oldContent;\n\n        if (curInner.innerStyle) {\n          if (innerToken) innerToken = innerToken + ' ' + curInner.innerStyle;\n          else innerToken = curInner.innerStyle;\n        }\n\n        return innerToken;\n      }\n    },\n\n    indent: function(state, textAfter) {\n      var mode = state.innerActive ? state.innerActive.mode : outer;\n      if (!mode.indent) return CodeMirror.Pass;\n      return mode.indent(state.innerActive ? state.inner : state.outer, textAfter);\n    },\n\n    blankLine: function(state) {\n      var mode = state.innerActive ? state.innerActive.mode : outer;\n      if (mode.blankLine) {\n        mode.blankLine(state.innerActive ? state.inner : state.outer);\n      }\n      if (!state.innerActive) {\n        for (var i = 0; i < n_others; ++i) {\n          var other = others[i];\n          if (other.open === \"\\n\") {\n            state.innerActive = other;\n            state.inner = CodeMirror.startState(other.mode, mode.indent ? mode.indent(state.outer, \"\") : 0);\n          }\n        }\n      } else if (state.innerActive.close === \"\\n\") {\n        state.innerActive = state.inner = null;\n      }\n    },\n\n    electricChars: outer.electricChars,\n\n    innerMode: function(state) {\n      return state.inner ? {state: state.inner, mode: state.innerActive.mode} : {state: state.outer, mode: outer};\n    }\n  };\n};\n\n});\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/addon/mode/multiplex_test.js",
    "content": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n(function() {\n  CodeMirror.defineMode(\"markdown_with_stex\", function(){\n    var inner = CodeMirror.getMode({}, \"stex\");\n    var outer = CodeMirror.getMode({}, \"markdown\");\n\n    var innerOptions = {\n      open: '$',\n      close: '$',\n      mode: inner,\n      delimStyle: 'delim',\n      innerStyle: 'inner'\n    };\n\n    return CodeMirror.multiplexingMode(outer, innerOptions);\n  });\n\n  var mode = CodeMirror.getMode({}, \"markdown_with_stex\");\n\n  function MT(name) {\n    test.mode(\n      name,\n      mode,\n      Array.prototype.slice.call(arguments, 1),\n      'multiplexing');\n  }\n\n  MT(\n    \"stexInsideMarkdown\",\n    \"[strong **Equation:**] [delim $][inner&tag \\\\pi][delim $]\");\n})();\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/addon/mode/overlay.js",
    "content": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n// Utility function that allows modes to be combined. The mode given\n// as the base argument takes care of most of the normal mode\n// functionality, but a second (typically simple) mode is used, which\n// can override the style of text. Both modes get to parse all of the\n// text, but when both assign a non-null style to a piece of code, the\n// overlay wins, unless the combine argument was true and not overridden,\n// or state.overlay.combineTokens was true, in which case the styles are\n// combined.\n\n(function(mod) {\n  if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n    mod(require(\"../../lib/codemirror\"));\n  else if (typeof define == \"function\" && define.amd) // AMD\n    define([\"../../lib/codemirror\"], mod);\n  else // Plain browser env\n    mod(CodeMirror);\n})(function(CodeMirror) {\n\"use strict\";\n\nCodeMirror.overlayMode = function(base, overlay, combine) {\n  return {\n    startState: function() {\n      return {\n        base: CodeMirror.startState(base),\n        overlay: CodeMirror.startState(overlay),\n        basePos: 0, baseCur: null,\n        overlayPos: 0, overlayCur: null,\n        streamSeen: null\n      };\n    },\n    copyState: function(state) {\n      return {\n        base: CodeMirror.copyState(base, state.base),\n        overlay: CodeMirror.copyState(overlay, state.overlay),\n        basePos: state.basePos, baseCur: null,\n        overlayPos: state.overlayPos, overlayCur: null\n      };\n    },\n\n    token: function(stream, state) {\n      if (stream != state.streamSeen ||\n          Math.min(state.basePos, state.overlayPos) < stream.start) {\n        state.streamSeen = stream;\n        state.basePos = state.overlayPos = stream.start;\n      }\n\n      if (stream.start == state.basePos) {\n        state.baseCur = base.token(stream, state.base);\n        state.basePos = stream.pos;\n      }\n      if (stream.start == state.overlayPos) {\n        stream.pos = stream.start;\n        state.overlayCur = overlay.token(stream, state.overlay);\n        state.overlayPos = stream.pos;\n      }\n      stream.pos = Math.min(state.basePos, state.overlayPos);\n\n      // state.overlay.combineTokens always takes precedence over combine,\n      // unless set to null\n      if (state.overlayCur == null) return state.baseCur;\n      else if (state.baseCur != null &&\n               state.overlay.combineTokens ||\n               combine && state.overlay.combineTokens == null)\n        return state.baseCur + \" \" + state.overlayCur;\n      else return state.overlayCur;\n    },\n\n    indent: base.indent && function(state, textAfter) {\n      return base.indent(state.base, textAfter);\n    },\n    electricChars: base.electricChars,\n\n    innerMode: function(state) { return {state: state.base, mode: base}; },\n\n    blankLine: function(state) {\n      if (base.blankLine) base.blankLine(state.base);\n      if (overlay.blankLine) overlay.blankLine(state.overlay);\n    }\n  };\n};\n\n});\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/addon/mode/simple.js",
    "content": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n(function(mod) {\n  if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n    mod(require(\"../../lib/codemirror\"));\n  else if (typeof define == \"function\" && define.amd) // AMD\n    define([\"../../lib/codemirror\"], mod);\n  else // Plain browser env\n    mod(CodeMirror);\n})(function(CodeMirror) {\n  \"use strict\";\n\n  CodeMirror.defineSimpleMode = function(name, states) {\n    CodeMirror.defineMode(name, function(config) {\n      return CodeMirror.simpleMode(config, states);\n    });\n  };\n\n  CodeMirror.simpleMode = function(config, states) {\n    ensureState(states, \"start\");\n    var states_ = {}, meta = states.meta || {}, hasIndentation = false;\n    for (var state in states) if (state != meta && states.hasOwnProperty(state)) {\n      var list = states_[state] = [], orig = states[state];\n      for (var i = 0; i < orig.length; i++) {\n        var data = orig[i];\n        list.push(new Rule(data, states));\n        if (data.indent || data.dedent) hasIndentation = true;\n      }\n    }\n    var mode = {\n      startState: function() {\n        return {state: \"start\", pending: null,\n                local: null, localState: null,\n                indent: hasIndentation ? [] : null};\n      },\n      copyState: function(state) {\n        var s = {state: state.state, pending: state.pending,\n                 local: state.local, localState: null,\n                 indent: state.indent && state.indent.slice(0)};\n        if (state.localState)\n          s.localState = CodeMirror.copyState(state.local.mode, state.localState);\n        if (state.stack)\n          s.stack = state.stack.slice(0);\n        for (var pers = state.persistentStates; pers; pers = pers.next)\n          s.persistentStates = {mode: pers.mode,\n                                spec: pers.spec,\n                                state: pers.state == state.localState ? s.localState : CodeMirror.copyState(pers.mode, pers.state),\n                                next: s.persistentStates};\n        return s;\n      },\n      token: tokenFunction(states_, config),\n      innerMode: function(state) { return state.local && {mode: state.local.mode, state: state.localState}; },\n      indent: indentFunction(states_, meta)\n    };\n    if (meta) for (var prop in meta) if (meta.hasOwnProperty(prop))\n      mode[prop] = meta[prop];\n    return mode;\n  };\n\n  function ensureState(states, name) {\n    if (!states.hasOwnProperty(name))\n      throw new Error(\"Undefined state \" + name + \"in simple mode\");\n  }\n\n  function toRegex(val, caret) {\n    if (!val) return /(?:)/;\n    var flags = \"\";\n    if (val instanceof RegExp) {\n      if (val.ignoreCase) flags = \"i\";\n      val = val.source;\n    } else {\n      val = String(val);\n    }\n    return new RegExp((caret === false ? \"\" : \"^\") + \"(?:\" + val + \")\", flags);\n  }\n\n  function asToken(val) {\n    if (!val) return null;\n    if (typeof val == \"string\") return val.replace(/\\./g, \" \");\n    var result = [];\n    for (var i = 0; i < val.length; i++)\n      result.push(val[i] && val[i].replace(/\\./g, \" \"));\n    return result;\n  }\n\n  function Rule(data, states) {\n    if (data.next || data.push) ensureState(states, data.next || data.push);\n    this.regex = toRegex(data.regex);\n    this.token = asToken(data.token);\n    this.data = data;\n  }\n\n  function tokenFunction(states, config) {\n    return function(stream, state) {\n      if (state.pending) {\n        var pend = state.pending.shift();\n        if (state.pending.length == 0) state.pending = null;\n        stream.pos += pend.text.length;\n        return pend.token;\n      }\n\n      if (state.local) {\n        if (state.local.end && stream.match(state.local.end)) {\n          var tok = state.local.endToken || null;\n          state.local = state.localState = null;\n          return tok;\n        } else {\n          var tok = state.local.mode.token(stream, state.localState), m;\n          if (state.local.endScan && (m = state.local.endScan.exec(stream.current())))\n            stream.pos = stream.start + m.index;\n          return tok;\n        }\n      }\n\n      var curState = states[state.state];\n      for (var i = 0; i < curState.length; i++) {\n        var rule = curState[i];\n        var matches = (!rule.data.sol || stream.sol()) && stream.match(rule.regex);\n        if (matches) {\n          if (rule.data.next) {\n            state.state = rule.data.next;\n          } else if (rule.data.push) {\n            (state.stack || (state.stack = [])).push(state.state);\n            state.state = rule.data.push;\n          } else if (rule.data.pop && state.stack && state.stack.length) {\n            state.state = state.stack.pop();\n          }\n\n          if (rule.data.mode)\n            enterLocalMode(config, state, rule.data.mode, rule.token);\n          if (rule.data.indent)\n            state.indent.push(stream.indentation() + config.indentUnit);\n          if (rule.data.dedent)\n            state.indent.pop();\n          if (matches.length > 2) {\n            state.pending = [];\n            for (var j = 2; j < matches.length; j++)\n              if (matches[j])\n                state.pending.push({text: matches[j], token: rule.token[j - 1]});\n            stream.backUp(matches[0].length - (matches[1] ? matches[1].length : 0));\n            return rule.token[0];\n          } else if (rule.token && rule.token.join) {\n            return rule.token[0];\n          } else {\n            return rule.token;\n          }\n        }\n      }\n      stream.next();\n      return null;\n    };\n  }\n\n  function cmp(a, b) {\n    if (a === b) return true;\n    if (!a || typeof a != \"object\" || !b || typeof b != \"object\") return false;\n    var props = 0;\n    for (var prop in a) if (a.hasOwnProperty(prop)) {\n      if (!b.hasOwnProperty(prop) || !cmp(a[prop], b[prop])) return false;\n      props++;\n    }\n    for (var prop in b) if (b.hasOwnProperty(prop)) props--;\n    return props == 0;\n  }\n\n  function enterLocalMode(config, state, spec, token) {\n    var pers;\n    if (spec.persistent) for (var p = state.persistentStates; p && !pers; p = p.next)\n      if (spec.spec ? cmp(spec.spec, p.spec) : spec.mode == p.mode) pers = p;\n    var mode = pers ? pers.mode : spec.mode || CodeMirror.getMode(config, spec.spec);\n    var lState = pers ? pers.state : CodeMirror.startState(mode);\n    if (spec.persistent && !pers)\n      state.persistentStates = {mode: mode, spec: spec.spec, state: lState, next: state.persistentStates};\n\n    state.localState = lState;\n    state.local = {mode: mode,\n                   end: spec.end && toRegex(spec.end),\n                   endScan: spec.end && spec.forceEnd !== false && toRegex(spec.end, false),\n                   endToken: token && token.join ? token[token.length - 1] : token};\n  }\n\n  function indexOf(val, arr) {\n    for (var i = 0; i < arr.length; i++) if (arr[i] === val) return true;\n  }\n\n  function indentFunction(states, meta) {\n    return function(state, textAfter, line) {\n      if (state.local && state.local.mode.indent)\n        return state.local.mode.indent(state.localState, textAfter, line);\n      if (state.indent == null || state.local || meta.dontIndentStates && indexOf(state.state, meta.dontIndentStates) > -1)\n        return CodeMirror.Pass;\n\n      var pos = state.indent.length - 1, rules = states[state.state];\n      scan: for (;;) {\n        for (var i = 0; i < rules.length; i++) {\n          var rule = rules[i];\n          if (rule.data.dedent && rule.data.dedentIfLineStart !== false) {\n            var m = rule.regex.exec(textAfter);\n            if (m && m[0]) {\n              pos--;\n              if (rule.next || rule.push) rules = states[rule.next || rule.push];\n              textAfter = textAfter.slice(m[0].length);\n              continue scan;\n            }\n          }\n        }\n        break;\n      }\n      return pos < 0 ? 0 : state.indent[pos];\n    };\n  }\n});\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/addon/runmode/colorize.js",
    "content": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n(function(mod) {\n  if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n    mod(require(\"../../lib/codemirror\"), require(\"./runmode\"));\n  else if (typeof define == \"function\" && define.amd) // AMD\n    define([\"../../lib/codemirror\", \"./runmode\"], mod);\n  else // Plain browser env\n    mod(CodeMirror);\n})(function(CodeMirror) {\n  \"use strict\";\n\n  var isBlock = /^(p|li|div|h\\\\d|pre|blockquote|td)$/;\n\n  function textContent(node, out) {\n    if (node.nodeType == 3) return out.push(node.nodeValue);\n    for (var ch = node.firstChild; ch; ch = ch.nextSibling) {\n      textContent(ch, out);\n      if (isBlock.test(node.nodeType)) out.push(\"\\n\");\n    }\n  }\n\n  CodeMirror.colorize = function(collection, defaultMode) {\n    if (!collection) collection = document.body.getElementsByTagName(\"pre\");\n\n    for (var i = 0; i < collection.length; ++i) {\n      var node = collection[i];\n      var mode = node.getAttribute(\"data-lang\") || defaultMode;\n      if (!mode) continue;\n\n      var text = [];\n      textContent(node, text);\n      node.innerHTML = \"\";\n      CodeMirror.runMode(text.join(\"\"), mode, node);\n\n      node.className += \" cm-s-default\";\n    }\n  };\n});\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/addon/runmode/runmode-standalone.js",
    "content": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\nwindow.CodeMirror = {};\n\n(function() {\n\"use strict\";\n\nfunction splitLines(string){ return string.split(/\\r?\\n|\\r/); };\n\nfunction StringStream(string) {\n  this.pos = this.start = 0;\n  this.string = string;\n  this.lineStart = 0;\n}\nStringStream.prototype = {\n  eol: function() {return this.pos >= this.string.length;},\n  sol: function() {return this.pos == 0;},\n  peek: function() {return this.string.charAt(this.pos) || null;},\n  next: function() {\n    if (this.pos < this.string.length)\n      return this.string.charAt(this.pos++);\n  },\n  eat: function(match) {\n    var ch = this.string.charAt(this.pos);\n    if (typeof match == \"string\") var ok = ch == match;\n    else var ok = ch && (match.test ? match.test(ch) : match(ch));\n    if (ok) {++this.pos; return ch;}\n  },\n  eatWhile: function(match) {\n    var start = this.pos;\n    while (this.eat(match)){}\n    return this.pos > start;\n  },\n  eatSpace: function() {\n    var start = this.pos;\n    while (/[\\s\\u00a0]/.test(this.string.charAt(this.pos))) ++this.pos;\n    return this.pos > start;\n  },\n  skipToEnd: function() {this.pos = this.string.length;},\n  skipTo: function(ch) {\n    var found = this.string.indexOf(ch, this.pos);\n    if (found > -1) {this.pos = found; return true;}\n  },\n  backUp: function(n) {this.pos -= n;},\n  column: function() {return this.start - this.lineStart;},\n  indentation: function() {return 0;},\n  match: function(pattern, consume, caseInsensitive) {\n    if (typeof pattern == \"string\") {\n      var cased = function(str) {return caseInsensitive ? str.toLowerCase() : str;};\n      var substr = this.string.substr(this.pos, pattern.length);\n      if (cased(substr) == cased(pattern)) {\n        if (consume !== false) this.pos += pattern.length;\n        return true;\n      }\n    } else {\n      var match = this.string.slice(this.pos).match(pattern);\n      if (match && match.index > 0) return null;\n      if (match && consume !== false) this.pos += match[0].length;\n      return match;\n    }\n  },\n  current: function(){return this.string.slice(this.start, this.pos);},\n  hideFirstChars: function(n, inner) {\n    this.lineStart += n;\n    try { return inner(); }\n    finally { this.lineStart -= n; }\n  }\n};\nCodeMirror.StringStream = StringStream;\n\nCodeMirror.startState = function (mode, a1, a2) {\n  return mode.startState ? mode.startState(a1, a2) : true;\n};\n\nvar modes = CodeMirror.modes = {}, mimeModes = CodeMirror.mimeModes = {};\nCodeMirror.defineMode = function (name, mode) {\n  if (arguments.length > 2)\n    mode.dependencies = Array.prototype.slice.call(arguments, 2);\n  modes[name] = mode;\n};\nCodeMirror.defineMIME = function (mime, spec) { mimeModes[mime] = spec; };\nCodeMirror.resolveMode = function(spec) {\n  if (typeof spec == \"string\" && mimeModes.hasOwnProperty(spec)) {\n    spec = mimeModes[spec];\n  } else if (spec && typeof spec.name == \"string\" && mimeModes.hasOwnProperty(spec.name)) {\n    spec = mimeModes[spec.name];\n  }\n  if (typeof spec == \"string\") return {name: spec};\n  else return spec || {name: \"null\"};\n};\nCodeMirror.getMode = function (options, spec) {\n  spec = CodeMirror.resolveMode(spec);\n  var mfactory = modes[spec.name];\n  if (!mfactory) throw new Error(\"Unknown mode: \" + spec);\n  return mfactory(options, spec);\n};\nCodeMirror.registerHelper = CodeMirror.registerGlobalHelper = Math.min;\nCodeMirror.defineMode(\"null\", function() {\n  return {token: function(stream) {stream.skipToEnd();}};\n});\nCodeMirror.defineMIME(\"text/plain\", \"null\");\n\nCodeMirror.runMode = function (string, modespec, callback, options) {\n  var mode = CodeMirror.getMode({ indentUnit: 2 }, modespec);\n\n  if (callback.nodeType == 1) {\n    var tabSize = (options && options.tabSize) || 4;\n    var node = callback, col = 0;\n    node.innerHTML = \"\";\n    callback = function (text, style) {\n      if (text == \"\\n\") {\n        node.appendChild(document.createElement(\"br\"));\n        col = 0;\n        return;\n      }\n      var content = \"\";\n      // replace tabs\n      for (var pos = 0; ;) {\n        var idx = text.indexOf(\"\\t\", pos);\n        if (idx == -1) {\n          content += text.slice(pos);\n          col += text.length - pos;\n          break;\n        } else {\n          col += idx - pos;\n          content += text.slice(pos, idx);\n          var size = tabSize - col % tabSize;\n          col += size;\n          for (var i = 0; i < size; ++i) content += \" \";\n          pos = idx + 1;\n        }\n      }\n\n      if (style) {\n        var sp = node.appendChild(document.createElement(\"span\"));\n        sp.className = \"cm-\" + style.replace(/ +/g, \" cm-\");\n        sp.appendChild(document.createTextNode(content));\n      } else {\n        node.appendChild(document.createTextNode(content));\n      }\n    };\n  }\n\n  var lines = splitLines(string), state = (options && options.state) || CodeMirror.startState(mode);\n  for (var i = 0, e = lines.length; i < e; ++i) {\n    if (i) callback(\"\\n\");\n    var stream = new CodeMirror.StringStream(lines[i]);\n    if (!stream.string && mode.blankLine) mode.blankLine(state);\n    while (!stream.eol()) {\n      var style = mode.token(stream, state);\n      callback(stream.current(), style, i, stream.start, state);\n      stream.start = stream.pos;\n    }\n  }\n};\n})();\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/addon/runmode/runmode.js",
    "content": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n(function(mod) {\n  if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n    mod(require(\"../../lib/codemirror\"));\n  else if (typeof define == \"function\" && define.amd) // AMD\n    define([\"../../lib/codemirror\"], mod);\n  else // Plain browser env\n    mod(CodeMirror);\n})(function(CodeMirror) {\n\"use strict\";\n\nCodeMirror.runMode = function(string, modespec, callback, options) {\n  var mode = CodeMirror.getMode(CodeMirror.defaults, modespec);\n  var ie = /MSIE \\d/.test(navigator.userAgent);\n  var ie_lt9 = ie && (document.documentMode == null || document.documentMode < 9);\n\n  if (callback.nodeType == 1) {\n    var tabSize = (options && options.tabSize) || CodeMirror.defaults.tabSize;\n    var node = callback, col = 0;\n    node.innerHTML = \"\";\n    callback = function(text, style) {\n      if (text == \"\\n\") {\n        // Emitting LF or CRLF on IE8 or earlier results in an incorrect display.\n        // Emitting a carriage return makes everything ok.\n        node.appendChild(document.createTextNode(ie_lt9 ? '\\r' : text));\n        col = 0;\n        return;\n      }\n      var content = \"\";\n      // replace tabs\n      for (var pos = 0;;) {\n        var idx = text.indexOf(\"\\t\", pos);\n        if (idx == -1) {\n          content += text.slice(pos);\n          col += text.length - pos;\n          break;\n        } else {\n          col += idx - pos;\n          content += text.slice(pos, idx);\n          var size = tabSize - col % tabSize;\n          col += size;\n          for (var i = 0; i < size; ++i) content += \" \";\n          pos = idx + 1;\n        }\n      }\n\n      if (style) {\n        var sp = node.appendChild(document.createElement(\"span\"));\n        sp.className = \"cm-\" + style.replace(/ +/g, \" cm-\");\n        sp.appendChild(document.createTextNode(content));\n      } else {\n        node.appendChild(document.createTextNode(content));\n      }\n    };\n  }\n\n  var lines = CodeMirror.splitLines(string), state = (options && options.state) || CodeMirror.startState(mode);\n  for (var i = 0, e = lines.length; i < e; ++i) {\n    if (i) callback(\"\\n\");\n    var stream = new CodeMirror.StringStream(lines[i]);\n    if (!stream.string && mode.blankLine) mode.blankLine(state);\n    while (!stream.eol()) {\n      var style = mode.token(stream, state);\n      callback(stream.current(), style, i, stream.start, state);\n      stream.start = stream.pos;\n    }\n  }\n};\n\n});\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/addon/runmode/runmode.node.js",
    "content": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n/* Just enough of CodeMirror to run runMode under node.js */\n\n// declare global: StringStream\n\nfunction splitLines(string){ return string.split(/\\r?\\n|\\r/); };\n\nfunction StringStream(string) {\n  this.pos = this.start = 0;\n  this.string = string;\n  this.lineStart = 0;\n}\nStringStream.prototype = {\n  eol: function() {return this.pos >= this.string.length;},\n  sol: function() {return this.pos == 0;},\n  peek: function() {return this.string.charAt(this.pos) || null;},\n  next: function() {\n    if (this.pos < this.string.length)\n      return this.string.charAt(this.pos++);\n  },\n  eat: function(match) {\n    var ch = this.string.charAt(this.pos);\n    if (typeof match == \"string\") var ok = ch == match;\n    else var ok = ch && (match.test ? match.test(ch) : match(ch));\n    if (ok) {++this.pos; return ch;}\n  },\n  eatWhile: function(match) {\n    var start = this.pos;\n    while (this.eat(match)){}\n    return this.pos > start;\n  },\n  eatSpace: function() {\n    var start = this.pos;\n    while (/[\\s\\u00a0]/.test(this.string.charAt(this.pos))) ++this.pos;\n    return this.pos > start;\n  },\n  skipToEnd: function() {this.pos = this.string.length;},\n  skipTo: function(ch) {\n    var found = this.string.indexOf(ch, this.pos);\n    if (found > -1) {this.pos = found; return true;}\n  },\n  backUp: function(n) {this.pos -= n;},\n  column: function() {return this.start - this.lineStart;},\n  indentation: function() {return 0;},\n  match: function(pattern, consume, caseInsensitive) {\n    if (typeof pattern == \"string\") {\n      var cased = function(str) {return caseInsensitive ? str.toLowerCase() : str;};\n      var substr = this.string.substr(this.pos, pattern.length);\n      if (cased(substr) == cased(pattern)) {\n        if (consume !== false) this.pos += pattern.length;\n        return true;\n      }\n    } else {\n      var match = this.string.slice(this.pos).match(pattern);\n      if (match && match.index > 0) return null;\n      if (match && consume !== false) this.pos += match[0].length;\n      return match;\n    }\n  },\n  current: function(){return this.string.slice(this.start, this.pos);},\n  hideFirstChars: function(n, inner) {\n    this.lineStart += n;\n    try { return inner(); }\n    finally { this.lineStart -= n; }\n  }\n};\nexports.StringStream = StringStream;\n\nexports.startState = function(mode, a1, a2) {\n  return mode.startState ? mode.startState(a1, a2) : true;\n};\n\nvar modes = exports.modes = {}, mimeModes = exports.mimeModes = {};\nexports.defineMode = function(name, mode) {\n  if (arguments.length > 2)\n    mode.dependencies = Array.prototype.slice.call(arguments, 2);\n  modes[name] = mode;\n};\nexports.defineMIME = function(mime, spec) { mimeModes[mime] = spec; };\n\nexports.defineMode(\"null\", function() {\n  return {token: function(stream) {stream.skipToEnd();}};\n});\nexports.defineMIME(\"text/plain\", \"null\");\n\nexports.resolveMode = function(spec) {\n  if (typeof spec == \"string\" && mimeModes.hasOwnProperty(spec)) {\n    spec = mimeModes[spec];\n  } else if (spec && typeof spec.name == \"string\" && mimeModes.hasOwnProperty(spec.name)) {\n    spec = mimeModes[spec.name];\n  }\n  if (typeof spec == \"string\") return {name: spec};\n  else return spec || {name: \"null\"};\n};\nexports.getMode = function(options, spec) {\n  spec = exports.resolveMode(spec);\n  var mfactory = modes[spec.name];\n  if (!mfactory) throw new Error(\"Unknown mode: \" + spec);\n  return mfactory(options, spec);\n};\nexports.registerHelper = exports.registerGlobalHelper = Math.min;\n\nexports.runMode = function(string, modespec, callback, options) {\n  var mode = exports.getMode({indentUnit: 2}, modespec);\n  var lines = splitLines(string), state = (options && options.state) || exports.startState(mode);\n  for (var i = 0, e = lines.length; i < e; ++i) {\n    if (i) callback(\"\\n\");\n    var stream = new exports.StringStream(lines[i]);\n    if (!stream.string && mode.blankLine) mode.blankLine(state);\n    while (!stream.eol()) {\n      var style = mode.token(stream, state);\n      callback(stream.current(), style, i, stream.start, state);\n      stream.start = stream.pos;\n    }\n  }\n};\n\nrequire.cache[require.resolve(\"../../lib/codemirror\")] = require.cache[require.resolve(\"./runmode.node\")];\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/addon/scroll/annotatescrollbar.js",
    "content": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n(function(mod) {\n  if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n    mod(require(\"../../lib/codemirror\"));\n  else if (typeof define == \"function\" && define.amd) // AMD\n    define([\"../../lib/codemirror\"], mod);\n  else // Plain browser env\n    mod(CodeMirror);\n})(function(CodeMirror) {\n  \"use strict\";\n\n  CodeMirror.defineExtension(\"annotateScrollbar\", function(options) {\n    if (typeof options == \"string\") options = {className: options};\n    return new Annotation(this, options);\n  });\n\n  CodeMirror.defineOption(\"scrollButtonHeight\", 0);\n\n  function Annotation(cm, options) {\n    this.cm = cm;\n    this.options = options;\n    this.buttonHeight = options.scrollButtonHeight || cm.getOption(\"scrollButtonHeight\");\n    this.annotations = [];\n    this.doRedraw = this.doUpdate = null;\n    this.div = cm.getWrapperElement().appendChild(document.createElement(\"div\"));\n    this.div.style.cssText = \"position: absolute; right: 0; top: 0; z-index: 7; pointer-events: none\";\n    this.computeScale();\n\n    function scheduleRedraw(delay) {\n      clearTimeout(self.doRedraw);\n      self.doRedraw = setTimeout(function() { self.redraw(); }, delay);\n    }\n\n    var self = this;\n    cm.on(\"refresh\", this.resizeHandler = function() {\n      clearTimeout(self.doUpdate);\n      self.doUpdate = setTimeout(function() {\n        if (self.computeScale()) scheduleRedraw(20);\n      }, 100);\n    });\n    cm.on(\"markerAdded\", this.resizeHandler);\n    cm.on(\"markerCleared\", this.resizeHandler);\n    if (options.listenForChanges !== false)\n      cm.on(\"change\", this.changeHandler = function() {\n        scheduleRedraw(250);\n      });\n  }\n\n  Annotation.prototype.computeScale = function() {\n    var cm = this.cm;\n    var hScale = (cm.getWrapperElement().clientHeight - cm.display.barHeight - this.buttonHeight * 2) /\n      cm.heightAtLine(cm.lastLine() + 1, \"local\");\n    if (hScale != this.hScale) {\n      this.hScale = hScale;\n      return true;\n    }\n  };\n\n  Annotation.prototype.update = function(annotations) {\n    this.annotations = annotations;\n    this.redraw();\n  };\n\n  Annotation.prototype.redraw = function(compute) {\n    if (compute !== false) this.computeScale();\n    var cm = this.cm, hScale = this.hScale;\n\n    var frag = document.createDocumentFragment(), anns = this.annotations;\n    if (cm.display.barWidth) for (var i = 0, nextTop; i < anns.length; i++) {\n      var ann = anns[i];\n      var top = nextTop || cm.charCoords(ann.from, \"local\").top * hScale;\n      var bottom = cm.charCoords(ann.to, \"local\").bottom * hScale;\n      while (i < anns.length - 1) {\n        nextTop = cm.charCoords(anns[i + 1].from, \"local\").top * hScale;\n        if (nextTop > bottom + .9) break;\n        ann = anns[++i];\n        bottom = cm.charCoords(ann.to, \"local\").bottom * hScale;\n      }\n      if (bottom == top) continue;\n      var height = Math.max(bottom - top, 3);\n\n      var elt = frag.appendChild(document.createElement(\"div\"));\n      elt.style.cssText = \"position: absolute; right: 0px; width: \" + Math.max(cm.display.barWidth - 1, 2) + \"px; top: \"\n        + (top + this.buttonHeight) + \"px; height: \" + height + \"px\";\n      elt.className = this.options.className;\n    }\n    this.div.textContent = \"\";\n    this.div.appendChild(frag);\n  };\n\n  Annotation.prototype.clear = function() {\n    this.cm.off(\"refresh\", this.resizeHandler);\n    this.cm.off(\"markerAdded\", this.resizeHandler);\n    this.cm.off(\"markerCleared\", this.resizeHandler);\n    if (this.changeHandler) this.cm.off(\"change\", this.changeHandler);\n    this.div.parentNode.removeChild(this.div);\n  };\n});\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/addon/scroll/scrollpastend.js",
    "content": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n(function(mod) {\n  if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n    mod(require(\"../../lib/codemirror\"));\n  else if (typeof define == \"function\" && define.amd) // AMD\n    define([\"../../lib/codemirror\"], mod);\n  else // Plain browser env\n    mod(CodeMirror);\n})(function(CodeMirror) {\n  \"use strict\";\n\n  CodeMirror.defineOption(\"scrollPastEnd\", false, function(cm, val, old) {\n    if (old && old != CodeMirror.Init) {\n      cm.off(\"change\", onChange);\n      cm.off(\"refresh\", updateBottomMargin);\n      cm.display.lineSpace.parentNode.style.paddingBottom = \"\";\n      cm.state.scrollPastEndPadding = null;\n    }\n    if (val) {\n      cm.on(\"change\", onChange);\n      cm.on(\"refresh\", updateBottomMargin);\n      updateBottomMargin(cm);\n    }\n  });\n\n  function onChange(cm, change) {\n    if (CodeMirror.changeEnd(change).line == cm.lastLine())\n      updateBottomMargin(cm);\n  }\n\n  function updateBottomMargin(cm) {\n    var padding = \"\";\n    if (cm.lineCount() > 1) {\n      var totalH = cm.display.scroller.clientHeight - 30,\n          lastLineH = cm.getLineHandle(cm.lastLine()).height;\n      padding = (totalH - lastLineH) + \"px\";\n    }\n    if (cm.state.scrollPastEndPadding != padding) {\n      cm.state.scrollPastEndPadding = padding;\n      cm.display.lineSpace.parentNode.style.paddingBottom = padding;\n      cm.setSize();\n    }\n  }\n});\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/addon/scroll/simplescrollbars.css",
    "content": ".CodeMirror-simplescroll-horizontal div, .CodeMirror-simplescroll-vertical div {\n  position: absolute;\n  background: #ccc;\n  -moz-box-sizing: border-box;\n  box-sizing: border-box;\n  border: 1px solid #bbb;\n  border-radius: 2px;\n}\n\n.CodeMirror-simplescroll-horizontal, .CodeMirror-simplescroll-vertical {\n  position: absolute;\n  z-index: 6;\n  background: #eee;\n}\n\n.CodeMirror-simplescroll-horizontal {\n  bottom: 0; left: 0;\n  height: 8px;\n}\n.CodeMirror-simplescroll-horizontal div {\n  bottom: 0;\n  height: 100%;\n}\n\n.CodeMirror-simplescroll-vertical {\n  right: 0; top: 0;\n  width: 8px;\n}\n.CodeMirror-simplescroll-vertical div {\n  right: 0;\n  width: 100%;\n}\n\n\n.CodeMirror-overlayscroll .CodeMirror-scrollbar-filler, .CodeMirror-overlayscroll .CodeMirror-gutter-filler {\n  display: none;\n}\n\n.CodeMirror-overlayscroll-horizontal div, .CodeMirror-overlayscroll-vertical div {\n  position: absolute;\n  background: #bcd;\n  border-radius: 3px;\n}\n\n.CodeMirror-overlayscroll-horizontal, .CodeMirror-overlayscroll-vertical {\n  position: absolute;\n  z-index: 6;\n}\n\n.CodeMirror-overlayscroll-horizontal {\n  bottom: 0; left: 0;\n  height: 6px;\n}\n.CodeMirror-overlayscroll-horizontal div {\n  bottom: 0;\n  height: 100%;\n}\n\n.CodeMirror-overlayscroll-vertical {\n  right: 0; top: 0;\n  width: 6px;\n}\n.CodeMirror-overlayscroll-vertical div {\n  right: 0;\n  width: 100%;\n}\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/addon/scroll/simplescrollbars.js",
    "content": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n(function(mod) {\n  if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n    mod(require(\"../../lib/codemirror\"));\n  else if (typeof define == \"function\" && define.amd) // AMD\n    define([\"../../lib/codemirror\"], mod);\n  else // Plain browser env\n    mod(CodeMirror);\n})(function(CodeMirror) {\n  \"use strict\";\n\n  function Bar(cls, orientation, scroll) {\n    this.orientation = orientation;\n    this.scroll = scroll;\n    this.screen = this.total = this.size = 1;\n    this.pos = 0;\n\n    this.node = document.createElement(\"div\");\n    this.node.className = cls + \"-\" + orientation;\n    this.inner = this.node.appendChild(document.createElement(\"div\"));\n\n    var self = this;\n    CodeMirror.on(this.inner, \"mousedown\", function(e) {\n      if (e.which != 1) return;\n      CodeMirror.e_preventDefault(e);\n      var axis = self.orientation == \"horizontal\" ? \"pageX\" : \"pageY\";\n      var start = e[axis], startpos = self.pos;\n      function done() {\n        CodeMirror.off(document, \"mousemove\", move);\n        CodeMirror.off(document, \"mouseup\", done);\n      }\n      function move(e) {\n        if (e.which != 1) return done();\n        self.moveTo(startpos + (e[axis] - start) * (self.total / self.size));\n      }\n      CodeMirror.on(document, \"mousemove\", move);\n      CodeMirror.on(document, \"mouseup\", done);\n    });\n\n    CodeMirror.on(this.node, \"click\", function(e) {\n      CodeMirror.e_preventDefault(e);\n      var innerBox = self.inner.getBoundingClientRect(), where;\n      if (self.orientation == \"horizontal\")\n        where = e.clientX < innerBox.left ? -1 : e.clientX > innerBox.right ? 1 : 0;\n      else\n        where = e.clientY < innerBox.top ? -1 : e.clientY > innerBox.bottom ? 1 : 0;\n      self.moveTo(self.pos + where * self.screen);\n    });\n\n    function onWheel(e) {\n      var moved = CodeMirror.wheelEventPixels(e)[self.orientation == \"horizontal\" ? \"x\" : \"y\"];\n      var oldPos = self.pos;\n      self.moveTo(self.pos + moved);\n      if (self.pos != oldPos) CodeMirror.e_preventDefault(e);\n    }\n    CodeMirror.on(this.node, \"mousewheel\", onWheel);\n    CodeMirror.on(this.node, \"DOMMouseScroll\", onWheel);\n  }\n\n  Bar.prototype.moveTo = function(pos, update) {\n    if (pos < 0) pos = 0;\n    if (pos > this.total - this.screen) pos = this.total - this.screen;\n    if (pos == this.pos) return;\n    this.pos = pos;\n    this.inner.style[this.orientation == \"horizontal\" ? \"left\" : \"top\"] =\n      (pos * (this.size / this.total)) + \"px\";\n    if (update !== false) this.scroll(pos, this.orientation);\n  };\n\n  Bar.prototype.update = function(scrollSize, clientSize, barSize) {\n    this.screen = clientSize;\n    this.total = scrollSize;\n    this.size = barSize;\n\n    // FIXME clip to min size?\n    this.inner.style[this.orientation == \"horizontal\" ? \"width\" : \"height\"] =\n      this.screen * (this.size / this.total) + \"px\";\n    this.inner.style[this.orientation == \"horizontal\" ? \"left\" : \"top\"] =\n      this.pos * (this.size / this.total) + \"px\";\n  };\n\n  function SimpleScrollbars(cls, place, scroll) {\n    this.addClass = cls;\n    this.horiz = new Bar(cls, \"horizontal\", scroll);\n    place(this.horiz.node);\n    this.vert = new Bar(cls, \"vertical\", scroll);\n    place(this.vert.node);\n    this.width = null;\n  }\n\n  SimpleScrollbars.prototype.update = function(measure) {\n    if (this.width == null) {\n      var style = window.getComputedStyle ? window.getComputedStyle(this.horiz.node) : this.horiz.node.currentStyle;\n      if (style) this.width = parseInt(style.height);\n    }\n    var width = this.width || 0;\n\n    var needsH = measure.scrollWidth > measure.clientWidth + 1;\n    var needsV = measure.scrollHeight > measure.clientHeight + 1;\n    this.vert.node.style.display = needsV ? \"block\" : \"none\";\n    this.horiz.node.style.display = needsH ? \"block\" : \"none\";\n\n    if (needsV) {\n      this.vert.update(measure.scrollHeight, measure.clientHeight,\n                       measure.viewHeight - (needsH ? width : 0));\n      this.vert.node.style.display = \"block\";\n      this.vert.node.style.bottom = needsH ? width + \"px\" : \"0\";\n    }\n    if (needsH) {\n      this.horiz.update(measure.scrollWidth, measure.clientWidth,\n                        measure.viewWidth - (needsV ? width : 0) - measure.barLeft);\n      this.horiz.node.style.right = needsV ? width + \"px\" : \"0\";\n      this.horiz.node.style.left = measure.barLeft + \"px\";\n    }\n\n    return {right: needsV ? width : 0, bottom: needsH ? width : 0};\n  };\n\n  SimpleScrollbars.prototype.setScrollTop = function(pos) {\n    this.vert.moveTo(pos, false);\n  };\n\n  SimpleScrollbars.prototype.setScrollLeft = function(pos) {\n    this.horiz.moveTo(pos, false);\n  };\n\n  SimpleScrollbars.prototype.clear = function() {\n    var parent = this.horiz.node.parentNode;\n    parent.removeChild(this.horiz.node);\n    parent.removeChild(this.vert.node);\n  };\n\n  CodeMirror.scrollbarModel.simple = function(place, scroll) {\n    return new SimpleScrollbars(\"CodeMirror-simplescroll\", place, scroll);\n  };\n  CodeMirror.scrollbarModel.overlay = function(place, scroll) {\n    return new SimpleScrollbars(\"CodeMirror-overlayscroll\", place, scroll);\n  };\n});\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/addon/search/match-highlighter.js",
    "content": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n// Highlighting text that matches the selection\n//\n// Defines an option highlightSelectionMatches, which, when enabled,\n// will style strings that match the selection throughout the\n// document.\n//\n// The option can be set to true to simply enable it, or to a\n// {minChars, style, wordsOnly, showToken, delay} object to explicitly\n// configure it. minChars is the minimum amount of characters that should be\n// selected for the behavior to occur, and style is the token style to\n// apply to the matches. This will be prefixed by \"cm-\" to create an\n// actual CSS class name. If wordsOnly is enabled, the matches will be\n// highlighted only if the selected text is a word. showToken, when enabled,\n// will cause the current token to be highlighted when nothing is selected.\n// delay is used to specify how much time to wait, in milliseconds, before\n// highlighting the matches.\n\n(function(mod) {\n  if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n    mod(require(\"../../lib/codemirror\"));\n  else if (typeof define == \"function\" && define.amd) // AMD\n    define([\"../../lib/codemirror\"], mod);\n  else // Plain browser env\n    mod(CodeMirror);\n})(function(CodeMirror) {\n  \"use strict\";\n\n  var DEFAULT_MIN_CHARS = 2;\n  var DEFAULT_TOKEN_STYLE = \"matchhighlight\";\n  var DEFAULT_DELAY = 100;\n  var DEFAULT_WORDS_ONLY = false;\n\n  function State(options) {\n    if (typeof options == \"object\") {\n      this.minChars = options.minChars;\n      this.style = options.style;\n      this.showToken = options.showToken;\n      this.delay = options.delay;\n      this.wordsOnly = options.wordsOnly;\n    }\n    if (this.style == null) this.style = DEFAULT_TOKEN_STYLE;\n    if (this.minChars == null) this.minChars = DEFAULT_MIN_CHARS;\n    if (this.delay == null) this.delay = DEFAULT_DELAY;\n    if (this.wordsOnly == null) this.wordsOnly = DEFAULT_WORDS_ONLY;\n    this.overlay = this.timeout = null;\n  }\n\n  CodeMirror.defineOption(\"highlightSelectionMatches\", false, function(cm, val, old) {\n    if (old && old != CodeMirror.Init) {\n      var over = cm.state.matchHighlighter.overlay;\n      if (over) cm.removeOverlay(over);\n      clearTimeout(cm.state.matchHighlighter.timeout);\n      cm.state.matchHighlighter = null;\n      cm.off(\"cursorActivity\", cursorActivity);\n    }\n    if (val) {\n      cm.state.matchHighlighter = new State(val);\n      highlightMatches(cm);\n      cm.on(\"cursorActivity\", cursorActivity);\n    }\n  });\n\n  function cursorActivity(cm) {\n    var state = cm.state.matchHighlighter;\n    clearTimeout(state.timeout);\n    state.timeout = setTimeout(function() {highlightMatches(cm);}, state.delay);\n  }\n\n  function highlightMatches(cm) {\n    cm.operation(function() {\n      var state = cm.state.matchHighlighter;\n      if (state.overlay) {\n        cm.removeOverlay(state.overlay);\n        state.overlay = null;\n      }\n      if (!cm.somethingSelected() && state.showToken) {\n        var re = state.showToken === true ? /[\\w$]/ : state.showToken;\n        var cur = cm.getCursor(), line = cm.getLine(cur.line), start = cur.ch, end = start;\n        while (start && re.test(line.charAt(start - 1))) --start;\n        while (end < line.length && re.test(line.charAt(end))) ++end;\n        if (start < end)\n          cm.addOverlay(state.overlay = makeOverlay(line.slice(start, end), re, state.style));\n        return;\n      }\n      var from = cm.getCursor(\"from\"), to = cm.getCursor(\"to\");\n      if (from.line != to.line) return;\n      if (state.wordsOnly && !isWord(cm, from, to)) return;\n      var selection = cm.getRange(from, to).replace(/^\\s+|\\s+$/g, \"\");\n      if (selection.length >= state.minChars)\n        cm.addOverlay(state.overlay = makeOverlay(selection, false, state.style));\n    });\n  }\n\n  function isWord(cm, from, to) {\n    var str = cm.getRange(from, to);\n    if (str.match(/^\\w+$/) !== null) {\n        if (from.ch > 0) {\n            var pos = {line: from.line, ch: from.ch - 1};\n            var chr = cm.getRange(pos, from);\n            if (chr.match(/\\W/) === null) return false;\n        }\n        if (to.ch < cm.getLine(from.line).length) {\n            var pos = {line: to.line, ch: to.ch + 1};\n            var chr = cm.getRange(to, pos);\n            if (chr.match(/\\W/) === null) return false;\n        }\n        return true;\n    } else return false;\n  }\n\n  function boundariesAround(stream, re) {\n    return (!stream.start || !re.test(stream.string.charAt(stream.start - 1))) &&\n      (stream.pos == stream.string.length || !re.test(stream.string.charAt(stream.pos)));\n  }\n\n  function makeOverlay(query, hasBoundary, style) {\n    return {token: function(stream) {\n      if (stream.match(query) &&\n          (!hasBoundary || boundariesAround(stream, hasBoundary)))\n        return style;\n      stream.next();\n      stream.skipTo(query.charAt(0)) || stream.skipToEnd();\n    }};\n  }\n});\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/addon/search/matchesonscrollbar.css",
    "content": ".CodeMirror-search-match {\n  background: gold;\n  border-top: 1px solid orange;\n  border-bottom: 1px solid orange;\n  -moz-box-sizing: border-box;\n  box-sizing: border-box;\n  opacity: .5;\n}\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/addon/search/matchesonscrollbar.js",
    "content": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n(function(mod) {\n  if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n    mod(require(\"../../lib/codemirror\"), require(\"./searchcursor\"), require(\"../scroll/annotatescrollbar\"));\n  else if (typeof define == \"function\" && define.amd) // AMD\n    define([\"../../lib/codemirror\", \"./searchcursor\", \"../scroll/annotatescrollbar\"], mod);\n  else // Plain browser env\n    mod(CodeMirror);\n})(function(CodeMirror) {\n  \"use strict\";\n\n  CodeMirror.defineExtension(\"showMatchesOnScrollbar\", function(query, caseFold, options) {\n    if (typeof options == \"string\") options = {className: options};\n    if (!options) options = {};\n    return new SearchAnnotation(this, query, caseFold, options);\n  });\n\n  function SearchAnnotation(cm, query, caseFold, options) {\n    this.cm = cm;\n    var annotateOptions = {listenForChanges: false};\n    for (var prop in options) annotateOptions[prop] = options[prop];\n    if (!annotateOptions.className) annotateOptions.className = \"CodeMirror-search-match\";\n    this.annotation = cm.annotateScrollbar(annotateOptions);\n    this.query = query;\n    this.caseFold = caseFold;\n    this.gap = {from: cm.firstLine(), to: cm.lastLine() + 1};\n    this.matches = [];\n    this.update = null;\n\n    this.findMatches();\n    this.annotation.update(this.matches);\n\n    var self = this;\n    cm.on(\"change\", this.changeHandler = function(_cm, change) { self.onChange(change); });\n  }\n\n  var MAX_MATCHES = 1000;\n\n  SearchAnnotation.prototype.findMatches = function() {\n    if (!this.gap) return;\n    for (var i = 0; i < this.matches.length; i++) {\n      var match = this.matches[i];\n      if (match.from.line >= this.gap.to) break;\n      if (match.to.line >= this.gap.from) this.matches.splice(i--, 1);\n    }\n    var cursor = this.cm.getSearchCursor(this.query, CodeMirror.Pos(this.gap.from, 0), this.caseFold);\n    while (cursor.findNext()) {\n      var match = {from: cursor.from(), to: cursor.to()};\n      if (match.from.line >= this.gap.to) break;\n      this.matches.splice(i++, 0, match);\n      if (this.matches.length > MAX_MATCHES) break;\n    }\n    this.gap = null;\n  };\n\n  function offsetLine(line, changeStart, sizeChange) {\n    if (line <= changeStart) return line;\n    return Math.max(changeStart, line + sizeChange);\n  }\n\n  SearchAnnotation.prototype.onChange = function(change) {\n    var startLine = change.from.line;\n    var endLine = CodeMirror.changeEnd(change).line;\n    var sizeChange = endLine - change.to.line;\n    if (this.gap) {\n      this.gap.from = Math.min(offsetLine(this.gap.from, startLine, sizeChange), change.from.line);\n      this.gap.to = Math.max(offsetLine(this.gap.to, startLine, sizeChange), change.from.line);\n    } else {\n      this.gap = {from: change.from.line, to: endLine + 1};\n    }\n\n    if (sizeChange) for (var i = 0; i < this.matches.length; i++) {\n      var match = this.matches[i];\n      var newFrom = offsetLine(match.from.line, startLine, sizeChange);\n      if (newFrom != match.from.line) match.from = CodeMirror.Pos(newFrom, match.from.ch);\n      var newTo = offsetLine(match.to.line, startLine, sizeChange);\n      if (newTo != match.to.line) match.to = CodeMirror.Pos(newTo, match.to.ch);\n    }\n    clearTimeout(this.update);\n    var self = this;\n    this.update = setTimeout(function() { self.updateAfterChange(); }, 250);\n  };\n\n  SearchAnnotation.prototype.updateAfterChange = function() {\n    this.findMatches();\n    this.annotation.update(this.matches);\n  };\n\n  SearchAnnotation.prototype.clear = function() {\n    this.cm.off(\"change\", this.changeHandler);\n    this.annotation.clear();\n  };\n});\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/addon/search/search.js",
    "content": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n// Define search commands. Depends on dialog.js or another\n// implementation of the openDialog method.\n\n// Replace works a little oddly -- it will do the replace on the next\n// Ctrl-G (or whatever is bound to findNext) press. You prevent a\n// replace by making sure the match is no longer selected when hitting\n// Ctrl-G.\n\n(function(mod) {\n  if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n    mod(require(\"../../lib/codemirror\"), require(\"./searchcursor\"), require(\"../dialog/dialog\"));\n  else if (typeof define == \"function\" && define.amd) // AMD\n    define([\"../../lib/codemirror\", \"./searchcursor\", \"../dialog/dialog\"], mod);\n  else // Plain browser env\n    mod(CodeMirror);\n})(function(CodeMirror) {\n  \"use strict\";\n  function searchOverlay(query, caseInsensitive) {\n    if (typeof query == \"string\")\n      query = new RegExp(query.replace(/[\\-\\[\\]\\/\\{\\}\\(\\)\\*\\+\\?\\.\\\\\\^\\$\\|]/g, \"\\\\$&\"), caseInsensitive ? \"gi\" : \"g\");\n    else if (!query.global)\n      query = new RegExp(query.source, query.ignoreCase ? \"gi\" : \"g\");\n\n    return {token: function(stream) {\n      query.lastIndex = stream.pos;\n      var match = query.exec(stream.string);\n      if (match && match.index == stream.pos) {\n        stream.pos += match[0].length;\n        return \"searching\";\n      } else if (match) {\n        stream.pos = match.index;\n      } else {\n        stream.skipToEnd();\n      }\n    }};\n  }\n\n  function SearchState() {\n    this.posFrom = this.posTo = this.query = null;\n    this.overlay = null;\n  }\n  function getSearchState(cm) {\n    return cm.state.search || (cm.state.search = new SearchState());\n  }\n  function queryCaseInsensitive(query) {\n    return typeof query == \"string\" && query == query.toLowerCase();\n  }\n  function getSearchCursor(cm, query, pos) {\n    // Heuristic: if the query string is all lowercase, do a case insensitive search.\n    return cm.getSearchCursor(query, pos, queryCaseInsensitive(query));\n  }\n  function dialog(cm, text, shortText, deflt, f) {\n    if (cm.openDialog) cm.openDialog(text, f, {value: deflt});\n    else f(prompt(shortText, deflt));\n  }\n  function confirmDialog(cm, text, shortText, fs) {\n    if (cm.openConfirm) cm.openConfirm(text, fs);\n    else if (confirm(shortText)) fs[0]();\n  }\n  function parseQuery(query) {\n    var isRE = query.match(/^\\/(.*)\\/([a-z]*)$/);\n    if (isRE) {\n      try { query = new RegExp(isRE[1], isRE[2].indexOf(\"i\") == -1 ? \"\" : \"i\"); }\n      catch(e) {} // Not a regular expression after all, do a string search\n    }\n    if (typeof query == \"string\" ? query == \"\" : query.test(\"\"))\n      query = /x^/;\n    return query;\n  }\n  var queryDialog =\n    'Search: <input type=\"text\" style=\"width: 10em\" class=\"CodeMirror-search-field\"/> <span style=\"color: #888\" class=\"CodeMirror-search-hint\">(Use /re/ syntax for regexp search)</span>';\n  function doSearch(cm, rev) {\n    var state = getSearchState(cm);\n    if (state.query) return findNext(cm, rev);\n    dialog(cm, queryDialog, \"Search for:\", cm.getSelection(), function(query) {\n      cm.operation(function() {\n        if (!query || state.query) return;\n        state.query = parseQuery(query);\n        cm.removeOverlay(state.overlay, queryCaseInsensitive(state.query));\n        state.overlay = searchOverlay(state.query, queryCaseInsensitive(state.query));\n        cm.addOverlay(state.overlay);\n        if (cm.showMatchesOnScrollbar) {\n          if (state.annotate) { state.annotate.clear(); state.annotate = null; }\n          state.annotate = cm.showMatchesOnScrollbar(state.query, queryCaseInsensitive(state.query));\n        }\n        state.posFrom = state.posTo = cm.getCursor();\n        findNext(cm, rev);\n      });\n    });\n  }\n  function findNext(cm, rev) {cm.operation(function() {\n    var state = getSearchState(cm);\n    var cursor = getSearchCursor(cm, state.query, rev ? state.posFrom : state.posTo);\n    if (!cursor.find(rev)) {\n      cursor = getSearchCursor(cm, state.query, rev ? CodeMirror.Pos(cm.lastLine()) : CodeMirror.Pos(cm.firstLine(), 0));\n      if (!cursor.find(rev)) return;\n    }\n    cm.setSelection(cursor.from(), cursor.to());\n    cm.scrollIntoView({from: cursor.from(), to: cursor.to()});\n    state.posFrom = cursor.from(); state.posTo = cursor.to();\n  });}\n  function clearSearch(cm) {cm.operation(function() {\n    var state = getSearchState(cm);\n    if (!state.query) return;\n    state.query = null;\n    cm.removeOverlay(state.overlay);\n    if (state.annotate) { state.annotate.clear(); state.annotate = null; }\n  });}\n\n  var replaceQueryDialog =\n    'Replace: <input type=\"text\" style=\"width: 10em\" class=\"CodeMirror-search-field\"/> <span style=\"color: #888\" class=\"CodeMirror-search-hint\">(Use /re/ syntax for regexp search)</span>';\n  var replacementQueryDialog = 'With: <input type=\"text\" style=\"width: 10em\" class=\"CodeMirror-search-field\"/>';\n  var doReplaceConfirm = \"Replace? <button>Yes</button> <button>No</button> <button>Stop</button>\";\n  function replace(cm, all) {\n    if (cm.getOption(\"readOnly\")) return;\n    dialog(cm, replaceQueryDialog, \"Replace:\", cm.getSelection(), function(query) {\n      if (!query) return;\n      query = parseQuery(query);\n      dialog(cm, replacementQueryDialog, \"Replace with:\", \"\", function(text) {\n        if (all) {\n          cm.operation(function() {\n            for (var cursor = getSearchCursor(cm, query); cursor.findNext();) {\n              if (typeof query != \"string\") {\n                var match = cm.getRange(cursor.from(), cursor.to()).match(query);\n                cursor.replace(text.replace(/\\$(\\d)/g, function(_, i) {return match[i];}));\n              } else cursor.replace(text);\n            }\n          });\n        } else {\n          clearSearch(cm);\n          var cursor = getSearchCursor(cm, query, cm.getCursor());\n          var advance = function() {\n            var start = cursor.from(), match;\n            if (!(match = cursor.findNext())) {\n              cursor = getSearchCursor(cm, query);\n              if (!(match = cursor.findNext()) ||\n                  (start && cursor.from().line == start.line && cursor.from().ch == start.ch)) return;\n            }\n            cm.setSelection(cursor.from(), cursor.to());\n            cm.scrollIntoView({from: cursor.from(), to: cursor.to()});\n            confirmDialog(cm, doReplaceConfirm, \"Replace?\",\n                          [function() {doReplace(match);}, advance]);\n          };\n          var doReplace = function(match) {\n            cursor.replace(typeof query == \"string\" ? text :\n                           text.replace(/\\$(\\d)/g, function(_, i) {return match[i];}));\n            advance();\n          };\n          advance();\n        }\n      });\n    });\n  }\n\n  CodeMirror.commands.find = function(cm) {clearSearch(cm); doSearch(cm);};\n  CodeMirror.commands.findNext = doSearch;\n  CodeMirror.commands.findPrev = function(cm) {doSearch(cm, true);};\n  CodeMirror.commands.clearSearch = clearSearch;\n  CodeMirror.commands.replace = replace;\n  CodeMirror.commands.replaceAll = function(cm) {replace(cm, true);};\n});\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/addon/search/searchcursor.js",
    "content": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n(function(mod) {\n  if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n    mod(require(\"../../lib/codemirror\"));\n  else if (typeof define == \"function\" && define.amd) // AMD\n    define([\"../../lib/codemirror\"], mod);\n  else // Plain browser env\n    mod(CodeMirror);\n})(function(CodeMirror) {\n  \"use strict\";\n  var Pos = CodeMirror.Pos;\n\n  function SearchCursor(doc, query, pos, caseFold) {\n    this.atOccurrence = false; this.doc = doc;\n    if (caseFold == null && typeof query == \"string\") caseFold = false;\n\n    pos = pos ? doc.clipPos(pos) : Pos(0, 0);\n    this.pos = {from: pos, to: pos};\n\n    // The matches method is filled in based on the type of query.\n    // It takes a position and a direction, and returns an object\n    // describing the next occurrence of the query, or null if no\n    // more matches were found.\n    if (typeof query != \"string\") { // Regexp match\n      if (!query.global) query = new RegExp(query.source, query.ignoreCase ? \"ig\" : \"g\");\n      this.matches = function(reverse, pos) {\n        if (reverse) {\n          query.lastIndex = 0;\n          var line = doc.getLine(pos.line).slice(0, pos.ch), cutOff = 0, match, start;\n          for (;;) {\n            query.lastIndex = cutOff;\n            var newMatch = query.exec(line);\n            if (!newMatch) break;\n            match = newMatch;\n            start = match.index;\n            cutOff = match.index + (match[0].length || 1);\n            if (cutOff == line.length) break;\n          }\n          var matchLen = (match && match[0].length) || 0;\n          if (!matchLen) {\n            if (start == 0 && line.length == 0) {match = undefined;}\n            else if (start != doc.getLine(pos.line).length) {\n              matchLen++;\n            }\n          }\n        } else {\n          query.lastIndex = pos.ch;\n          var line = doc.getLine(pos.line), match = query.exec(line);\n          var matchLen = (match && match[0].length) || 0;\n          var start = match && match.index;\n          if (start + matchLen != line.length && !matchLen) matchLen = 1;\n        }\n        if (match && matchLen)\n          return {from: Pos(pos.line, start),\n                  to: Pos(pos.line, start + matchLen),\n                  match: match};\n      };\n    } else { // String query\n      var origQuery = query;\n      if (caseFold) query = query.toLowerCase();\n      var fold = caseFold ? function(str){return str.toLowerCase();} : function(str){return str;};\n      var target = query.split(\"\\n\");\n      // Different methods for single-line and multi-line queries\n      if (target.length == 1) {\n        if (!query.length) {\n          // Empty string would match anything and never progress, so\n          // we define it to match nothing instead.\n          this.matches = function() {};\n        } else {\n          this.matches = function(reverse, pos) {\n            if (reverse) {\n              var orig = doc.getLine(pos.line).slice(0, pos.ch), line = fold(orig);\n              var match = line.lastIndexOf(query);\n              if (match > -1) {\n                match = adjustPos(orig, line, match);\n                return {from: Pos(pos.line, match), to: Pos(pos.line, match + origQuery.length)};\n              }\n             } else {\n               var orig = doc.getLine(pos.line).slice(pos.ch), line = fold(orig);\n               var match = line.indexOf(query);\n               if (match > -1) {\n                 match = adjustPos(orig, line, match) + pos.ch;\n                 return {from: Pos(pos.line, match), to: Pos(pos.line, match + origQuery.length)};\n               }\n            }\n          };\n        }\n      } else {\n        var origTarget = origQuery.split(\"\\n\");\n        this.matches = function(reverse, pos) {\n          var last = target.length - 1;\n          if (reverse) {\n            if (pos.line - (target.length - 1) < doc.firstLine()) return;\n            if (fold(doc.getLine(pos.line).slice(0, origTarget[last].length)) != target[target.length - 1]) return;\n            var to = Pos(pos.line, origTarget[last].length);\n            for (var ln = pos.line - 1, i = last - 1; i >= 1; --i, --ln)\n              if (target[i] != fold(doc.getLine(ln))) return;\n            var line = doc.getLine(ln), cut = line.length - origTarget[0].length;\n            if (fold(line.slice(cut)) != target[0]) return;\n            return {from: Pos(ln, cut), to: to};\n          } else {\n            if (pos.line + (target.length - 1) > doc.lastLine()) return;\n            var line = doc.getLine(pos.line), cut = line.length - origTarget[0].length;\n            if (fold(line.slice(cut)) != target[0]) return;\n            var from = Pos(pos.line, cut);\n            for (var ln = pos.line + 1, i = 1; i < last; ++i, ++ln)\n              if (target[i] != fold(doc.getLine(ln))) return;\n            if (fold(doc.getLine(ln).slice(0, origTarget[last].length)) != target[last]) return;\n            return {from: from, to: Pos(ln, origTarget[last].length)};\n          }\n        };\n      }\n    }\n  }\n\n  SearchCursor.prototype = {\n    findNext: function() {return this.find(false);},\n    findPrevious: function() {return this.find(true);},\n\n    find: function(reverse) {\n      var self = this, pos = this.doc.clipPos(reverse ? this.pos.from : this.pos.to);\n      function savePosAndFail(line) {\n        var pos = Pos(line, 0);\n        self.pos = {from: pos, to: pos};\n        self.atOccurrence = false;\n        return false;\n      }\n\n      for (;;) {\n        if (this.pos = this.matches(reverse, pos)) {\n          this.atOccurrence = true;\n          return this.pos.match || true;\n        }\n        if (reverse) {\n          if (!pos.line) return savePosAndFail(0);\n          pos = Pos(pos.line-1, this.doc.getLine(pos.line-1).length);\n        }\n        else {\n          var maxLine = this.doc.lineCount();\n          if (pos.line == maxLine - 1) return savePosAndFail(maxLine);\n          pos = Pos(pos.line + 1, 0);\n        }\n      }\n    },\n\n    from: function() {if (this.atOccurrence) return this.pos.from;},\n    to: function() {if (this.atOccurrence) return this.pos.to;},\n\n    replace: function(newText) {\n      if (!this.atOccurrence) return;\n      var lines = CodeMirror.splitLines(newText);\n      this.doc.replaceRange(lines, this.pos.from, this.pos.to);\n      this.pos.to = Pos(this.pos.from.line + lines.length - 1,\n                        lines[lines.length - 1].length + (lines.length == 1 ? this.pos.from.ch : 0));\n    }\n  };\n\n  // Maps a position in a case-folded line back to a position in the original line\n  // (compensating for codepoints increasing in number during folding)\n  function adjustPos(orig, folded, pos) {\n    if (orig.length == folded.length) return pos;\n    for (var pos1 = Math.min(pos, orig.length);;) {\n      var len1 = orig.slice(0, pos1).toLowerCase().length;\n      if (len1 < pos) ++pos1;\n      else if (len1 > pos) --pos1;\n      else return pos1;\n    }\n  }\n\n  CodeMirror.defineExtension(\"getSearchCursor\", function(query, pos, caseFold) {\n    return new SearchCursor(this.doc, query, pos, caseFold);\n  });\n  CodeMirror.defineDocExtension(\"getSearchCursor\", function(query, pos, caseFold) {\n    return new SearchCursor(this, query, pos, caseFold);\n  });\n\n  CodeMirror.defineExtension(\"selectMatches\", function(query, caseFold) {\n    var ranges = [], next;\n    var cur = this.getSearchCursor(query, this.getCursor(\"from\"), caseFold);\n    while (next = cur.findNext()) {\n      if (CodeMirror.cmpPos(cur.to(), this.getCursor(\"to\")) > 0) break;\n      ranges.push({anchor: cur.from(), head: cur.to()});\n    }\n    if (ranges.length)\n      this.setSelections(ranges, 0);\n  });\n});\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/addon/selection/active-line.js",
    "content": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n// Because sometimes you need to style the cursor's line.\n//\n// Adds an option 'styleActiveLine' which, when enabled, gives the\n// active line's wrapping <div> the CSS class \"CodeMirror-activeline\",\n// and gives its background <div> the class \"CodeMirror-activeline-background\".\n\n(function(mod) {\n  if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n    mod(require(\"../../lib/codemirror\"));\n  else if (typeof define == \"function\" && define.amd) // AMD\n    define([\"../../lib/codemirror\"], mod);\n  else // Plain browser env\n    mod(CodeMirror);\n})(function(CodeMirror) {\n  \"use strict\";\n  var WRAP_CLASS = \"CodeMirror-activeline\";\n  var BACK_CLASS = \"CodeMirror-activeline-background\";\n\n  CodeMirror.defineOption(\"styleActiveLine\", false, function(cm, val, old) {\n    var prev = old && old != CodeMirror.Init;\n    if (val && !prev) {\n      cm.state.activeLines = [];\n      updateActiveLines(cm, cm.listSelections());\n      cm.on(\"beforeSelectionChange\", selectionChange);\n    } else if (!val && prev) {\n      cm.off(\"beforeSelectionChange\", selectionChange);\n      clearActiveLines(cm);\n      delete cm.state.activeLines;\n    }\n  });\n\n  function clearActiveLines(cm) {\n    for (var i = 0; i < cm.state.activeLines.length; i++) {\n      cm.removeLineClass(cm.state.activeLines[i], \"wrap\", WRAP_CLASS);\n      cm.removeLineClass(cm.state.activeLines[i], \"background\", BACK_CLASS);\n    }\n  }\n\n  function sameArray(a, b) {\n    if (a.length != b.length) return false;\n    for (var i = 0; i < a.length; i++)\n      if (a[i] != b[i]) return false;\n    return true;\n  }\n\n  function updateActiveLines(cm, ranges) {\n    var active = [];\n    for (var i = 0; i < ranges.length; i++) {\n      var range = ranges[i];\n      if (!range.empty()) continue;\n      var line = cm.getLineHandleVisualStart(range.head.line);\n      if (active[active.length - 1] != line) active.push(line);\n    }\n    if (sameArray(cm.state.activeLines, active)) return;\n    cm.operation(function() {\n      clearActiveLines(cm);\n      for (var i = 0; i < active.length; i++) {\n        cm.addLineClass(active[i], \"wrap\", WRAP_CLASS);\n        cm.addLineClass(active[i], \"background\", BACK_CLASS);\n      }\n      cm.state.activeLines = active;\n    });\n  }\n\n  function selectionChange(cm, sel) {\n    updateActiveLines(cm, sel.ranges);\n  }\n});\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/addon/selection/mark-selection.js",
    "content": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n// Because sometimes you need to mark the selected *text*.\n//\n// Adds an option 'styleSelectedText' which, when enabled, gives\n// selected text the CSS class given as option value, or\n// \"CodeMirror-selectedtext\" when the value is not a string.\n\n(function(mod) {\n  if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n    mod(require(\"../../lib/codemirror\"));\n  else if (typeof define == \"function\" && define.amd) // AMD\n    define([\"../../lib/codemirror\"], mod);\n  else // Plain browser env\n    mod(CodeMirror);\n})(function(CodeMirror) {\n  \"use strict\";\n\n  CodeMirror.defineOption(\"styleSelectedText\", false, function(cm, val, old) {\n    var prev = old && old != CodeMirror.Init;\n    if (val && !prev) {\n      cm.state.markedSelection = [];\n      cm.state.markedSelectionStyle = typeof val == \"string\" ? val : \"CodeMirror-selectedtext\";\n      reset(cm);\n      cm.on(\"cursorActivity\", onCursorActivity);\n      cm.on(\"change\", onChange);\n    } else if (!val && prev) {\n      cm.off(\"cursorActivity\", onCursorActivity);\n      cm.off(\"change\", onChange);\n      clear(cm);\n      cm.state.markedSelection = cm.state.markedSelectionStyle = null;\n    }\n  });\n\n  function onCursorActivity(cm) {\n    cm.operation(function() { update(cm); });\n  }\n\n  function onChange(cm) {\n    if (cm.state.markedSelection.length)\n      cm.operation(function() { clear(cm); });\n  }\n\n  var CHUNK_SIZE = 8;\n  var Pos = CodeMirror.Pos;\n  var cmp = CodeMirror.cmpPos;\n\n  function coverRange(cm, from, to, addAt) {\n    if (cmp(from, to) == 0) return;\n    var array = cm.state.markedSelection;\n    var cls = cm.state.markedSelectionStyle;\n    for (var line = from.line;;) {\n      var start = line == from.line ? from : Pos(line, 0);\n      var endLine = line + CHUNK_SIZE, atEnd = endLine >= to.line;\n      var end = atEnd ? to : Pos(endLine, 0);\n      var mark = cm.markText(start, end, {className: cls});\n      if (addAt == null) array.push(mark);\n      else array.splice(addAt++, 0, mark);\n      if (atEnd) break;\n      line = endLine;\n    }\n  }\n\n  function clear(cm) {\n    var array = cm.state.markedSelection;\n    for (var i = 0; i < array.length; ++i) array[i].clear();\n    array.length = 0;\n  }\n\n  function reset(cm) {\n    clear(cm);\n    var ranges = cm.listSelections();\n    for (var i = 0; i < ranges.length; i++)\n      coverRange(cm, ranges[i].from(), ranges[i].to());\n  }\n\n  function update(cm) {\n    if (!cm.somethingSelected()) return clear(cm);\n    if (cm.listSelections().length > 1) return reset(cm);\n\n    var from = cm.getCursor(\"start\"), to = cm.getCursor(\"end\");\n\n    var array = cm.state.markedSelection;\n    if (!array.length) return coverRange(cm, from, to);\n\n    var coverStart = array[0].find(), coverEnd = array[array.length - 1].find();\n    if (!coverStart || !coverEnd || to.line - from.line < CHUNK_SIZE ||\n        cmp(from, coverEnd.to) >= 0 || cmp(to, coverStart.from) <= 0)\n      return reset(cm);\n\n    while (cmp(from, coverStart.from) > 0) {\n      array.shift().clear();\n      coverStart = array[0].find();\n    }\n    if (cmp(from, coverStart.from) < 0) {\n      if (coverStart.to.line - from.line < CHUNK_SIZE) {\n        array.shift().clear();\n        coverRange(cm, from, coverStart.to, 0);\n      } else {\n        coverRange(cm, from, coverStart.from, 0);\n      }\n    }\n\n    while (cmp(to, coverEnd.to) < 0) {\n      array.pop().clear();\n      coverEnd = array[array.length - 1].find();\n    }\n    if (cmp(to, coverEnd.to) > 0) {\n      if (to.line - coverEnd.from.line < CHUNK_SIZE) {\n        array.pop().clear();\n        coverRange(cm, coverEnd.from, to);\n      } else {\n        coverRange(cm, coverEnd.to, to);\n      }\n    }\n  }\n});\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/addon/selection/selection-pointer.js",
    "content": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n(function(mod) {\n  if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n    mod(require(\"../../lib/codemirror\"));\n  else if (typeof define == \"function\" && define.amd) // AMD\n    define([\"../../lib/codemirror\"], mod);\n  else // Plain browser env\n    mod(CodeMirror);\n})(function(CodeMirror) {\n  \"use strict\";\n\n  CodeMirror.defineOption(\"selectionPointer\", false, function(cm, val) {\n    var data = cm.state.selectionPointer;\n    if (data) {\n      CodeMirror.off(cm.getWrapperElement(), \"mousemove\", data.mousemove);\n      CodeMirror.off(cm.getWrapperElement(), \"mouseout\", data.mouseout);\n      CodeMirror.off(window, \"scroll\", data.windowScroll);\n      cm.off(\"cursorActivity\", reset);\n      cm.off(\"scroll\", reset);\n      cm.state.selectionPointer = null;\n      cm.display.lineDiv.style.cursor = \"\";\n    }\n    if (val) {\n      data = cm.state.selectionPointer = {\n        value: typeof val == \"string\" ? val : \"default\",\n        mousemove: function(event) { mousemove(cm, event); },\n        mouseout: function(event) { mouseout(cm, event); },\n        windowScroll: function() { reset(cm); },\n        rects: null,\n        mouseX: null, mouseY: null,\n        willUpdate: false\n      };\n      CodeMirror.on(cm.getWrapperElement(), \"mousemove\", data.mousemove);\n      CodeMirror.on(cm.getWrapperElement(), \"mouseout\", data.mouseout);\n      CodeMirror.on(window, \"scroll\", data.windowScroll);\n      cm.on(\"cursorActivity\", reset);\n      cm.on(\"scroll\", reset);\n    }\n  });\n\n  function mousemove(cm, event) {\n    var data = cm.state.selectionPointer;\n    if (event.buttons == null ? event.which : event.buttons) {\n      data.mouseX = data.mouseY = null;\n    } else {\n      data.mouseX = event.clientX;\n      data.mouseY = event.clientY;\n    }\n    scheduleUpdate(cm);\n  }\n\n  function mouseout(cm, event) {\n    if (!cm.getWrapperElement().contains(event.relatedTarget)) {\n      var data = cm.state.selectionPointer;\n      data.mouseX = data.mouseY = null;\n      scheduleUpdate(cm);\n    }\n  }\n\n  function reset(cm) {\n    cm.state.selectionPointer.rects = null;\n    scheduleUpdate(cm);\n  }\n\n  function scheduleUpdate(cm) {\n    if (!cm.state.selectionPointer.willUpdate) {\n      cm.state.selectionPointer.willUpdate = true;\n      setTimeout(function() {\n        update(cm);\n        cm.state.selectionPointer.willUpdate = false;\n      }, 50);\n    }\n  }\n\n  function update(cm) {\n    var data = cm.state.selectionPointer;\n    if (!data) return;\n    if (data.rects == null && data.mouseX != null) {\n      data.rects = [];\n      if (cm.somethingSelected()) {\n        for (var sel = cm.display.selectionDiv.firstChild; sel; sel = sel.nextSibling)\n          data.rects.push(sel.getBoundingClientRect());\n      }\n    }\n    var inside = false;\n    if (data.mouseX != null) for (var i = 0; i < data.rects.length; i++) {\n      var rect = data.rects[i];\n      if (rect.left <= data.mouseX && rect.right >= data.mouseX &&\n          rect.top <= data.mouseY && rect.bottom >= data.mouseY)\n        inside = true;\n    }\n    var cursor = inside ? data.value : \"\";\n    if (cm.display.lineDiv.style.cursor != cursor)\n      cm.display.lineDiv.style.cursor = cursor;\n  }\n});\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/addon/tern/tern.css",
    "content": ".CodeMirror-Tern-completion {\n  padding-left: 22px;\n  position: relative;\n}\n.CodeMirror-Tern-completion:before {\n  position: absolute;\n  left: 2px;\n  bottom: 2px;\n  border-radius: 50%;\n  font-size: 12px;\n  font-weight: bold;\n  height: 15px;\n  width: 15px;\n  line-height: 16px;\n  text-align: center;\n  color: white;\n  -moz-box-sizing: border-box;\n  box-sizing: border-box;\n}\n.CodeMirror-Tern-completion-unknown:before {\n  content: \"?\";\n  background: #4bb;\n}\n.CodeMirror-Tern-completion-object:before {\n  content: \"O\";\n  background: #77c;\n}\n.CodeMirror-Tern-completion-fn:before {\n  content: \"F\";\n  background: #7c7;\n}\n.CodeMirror-Tern-completion-array:before {\n  content: \"A\";\n  background: #c66;\n}\n.CodeMirror-Tern-completion-number:before {\n  content: \"1\";\n  background: #999;\n}\n.CodeMirror-Tern-completion-string:before {\n  content: \"S\";\n  background: #999;\n}\n.CodeMirror-Tern-completion-bool:before {\n  content: \"B\";\n  background: #999;\n}\n\n.CodeMirror-Tern-completion-guess {\n  color: #999;\n}\n\n.CodeMirror-Tern-tooltip {\n  border: 1px solid silver;\n  border-radius: 3px;\n  color: #444;\n  padding: 2px 5px;\n  font-size: 90%;\n  font-family: monospace;\n  background-color: white;\n  white-space: pre-wrap;\n\n  max-width: 40em;\n  position: absolute;\n  z-index: 10;\n  -webkit-box-shadow: 2px 3px 5px rgba(0,0,0,.2);\n  -moz-box-shadow: 2px 3px 5px rgba(0,0,0,.2);\n  box-shadow: 2px 3px 5px rgba(0,0,0,.2);\n\n  transition: opacity 1s;\n  -moz-transition: opacity 1s;\n  -webkit-transition: opacity 1s;\n  -o-transition: opacity 1s;\n  -ms-transition: opacity 1s;\n}\n\n.CodeMirror-Tern-hint-doc {\n  max-width: 25em;\n  margin-top: -3px;\n}\n\n.CodeMirror-Tern-fname { color: black; }\n.CodeMirror-Tern-farg { color: #70a; }\n.CodeMirror-Tern-farg-current { text-decoration: underline; }\n.CodeMirror-Tern-type { color: #07c; }\n.CodeMirror-Tern-fhint-guess { opacity: .7; }\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/addon/tern/tern.js",
    "content": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n// Glue code between CodeMirror and Tern.\n//\n// Create a CodeMirror.TernServer to wrap an actual Tern server,\n// register open documents (CodeMirror.Doc instances) with it, and\n// call its methods to activate the assisting functions that Tern\n// provides.\n//\n// Options supported (all optional):\n// * defs: An array of JSON definition data structures.\n// * plugins: An object mapping plugin names to configuration\n//   options.\n// * getFile: A function(name, c) that can be used to access files in\n//   the project that haven't been loaded yet. Simply do c(null) to\n//   indicate that a file is not available.\n// * fileFilter: A function(value, docName, doc) that will be applied\n//   to documents before passing them on to Tern.\n// * switchToDoc: A function(name, doc) that should, when providing a\n//   multi-file view, switch the view or focus to the named file.\n// * showError: A function(editor, message) that can be used to\n//   override the way errors are displayed.\n// * completionTip: Customize the content in tooltips for completions.\n//   Is passed a single argument—the completion's data as returned by\n//   Tern—and may return a string, DOM node, or null to indicate that\n//   no tip should be shown. By default the docstring is shown.\n// * typeTip: Like completionTip, but for the tooltips shown for type\n//   queries.\n// * responseFilter: A function(doc, query, request, error, data) that\n//   will be applied to the Tern responses before treating them\n//\n//\n// It is possible to run the Tern server in a web worker by specifying\n// these additional options:\n// * useWorker: Set to true to enable web worker mode. You'll probably\n//   want to feature detect the actual value you use here, for example\n//   !!window.Worker.\n// * workerScript: The main script of the worker. Point this to\n//   wherever you are hosting worker.js from this directory.\n// * workerDeps: An array of paths pointing (relative to workerScript)\n//   to the Acorn and Tern libraries and any Tern plugins you want to\n//   load. Or, if you minified those into a single script and included\n//   them in the workerScript, simply leave this undefined.\n\n(function(mod) {\n  if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n    mod(require(\"../../lib/codemirror\"));\n  else if (typeof define == \"function\" && define.amd) // AMD\n    define([\"../../lib/codemirror\"], mod);\n  else // Plain browser env\n    mod(CodeMirror);\n})(function(CodeMirror) {\n  \"use strict\";\n  // declare global: tern\n\n  CodeMirror.TernServer = function(options) {\n    var self = this;\n    this.options = options || {};\n    var plugins = this.options.plugins || (this.options.plugins = {});\n    if (!plugins.doc_comment) plugins.doc_comment = true;\n    if (this.options.useWorker) {\n      this.server = new WorkerServer(this);\n    } else {\n      this.server = new tern.Server({\n        getFile: function(name, c) { return getFile(self, name, c); },\n        async: true,\n        defs: this.options.defs || [],\n        plugins: plugins\n      });\n    }\n    this.docs = Object.create(null);\n    this.trackChange = function(doc, change) { trackChange(self, doc, change); };\n\n    this.cachedArgHints = null;\n    this.activeArgHints = null;\n    this.jumpStack = [];\n\n    this.getHint = function(cm, c) { return hint(self, cm, c); };\n    this.getHint.async = true;\n  };\n\n  CodeMirror.TernServer.prototype = {\n    addDoc: function(name, doc) {\n      var data = {doc: doc, name: name, changed: null};\n      this.server.addFile(name, docValue(this, data));\n      CodeMirror.on(doc, \"change\", this.trackChange);\n      return this.docs[name] = data;\n    },\n\n    delDoc: function(id) {\n      var found = resolveDoc(this, id);\n      if (!found) return;\n      CodeMirror.off(found.doc, \"change\", this.trackChange);\n      delete this.docs[found.name];\n      this.server.delFile(found.name);\n    },\n\n    hideDoc: function(id) {\n      closeArgHints(this);\n      var found = resolveDoc(this, id);\n      if (found && found.changed) sendDoc(this, found);\n    },\n\n    complete: function(cm) {\n      cm.showHint({hint: this.getHint});\n    },\n\n    showType: function(cm, pos, c) { showContextInfo(this, cm, pos, \"type\", c); },\n\n    showDocs: function(cm, pos, c) { showContextInfo(this, cm, pos, \"documentation\", c); },\n\n    updateArgHints: function(cm) { updateArgHints(this, cm); },\n\n    jumpToDef: function(cm) { jumpToDef(this, cm); },\n\n    jumpBack: function(cm) { jumpBack(this, cm); },\n\n    rename: function(cm) { rename(this, cm); },\n\n    selectName: function(cm) { selectName(this, cm); },\n\n    request: function (cm, query, c, pos) {\n      var self = this;\n      var doc = findDoc(this, cm.getDoc());\n      var request = buildRequest(this, doc, query, pos);\n\n      this.server.request(request, function (error, data) {\n        if (!error && self.options.responseFilter)\n          data = self.options.responseFilter(doc, query, request, error, data);\n        c(error, data);\n      });\n    },\n\n    destroy: function () {\n      if (this.worker) {\n        this.worker.terminate();\n        this.worker = null;\n      }\n    }\n  };\n\n  var Pos = CodeMirror.Pos;\n  var cls = \"CodeMirror-Tern-\";\n  var bigDoc = 250;\n\n  function getFile(ts, name, c) {\n    var buf = ts.docs[name];\n    if (buf)\n      c(docValue(ts, buf));\n    else if (ts.options.getFile)\n      ts.options.getFile(name, c);\n    else\n      c(null);\n  }\n\n  function findDoc(ts, doc, name) {\n    for (var n in ts.docs) {\n      var cur = ts.docs[n];\n      if (cur.doc == doc) return cur;\n    }\n    if (!name) for (var i = 0;; ++i) {\n      n = \"[doc\" + (i || \"\") + \"]\";\n      if (!ts.docs[n]) { name = n; break; }\n    }\n    return ts.addDoc(name, doc);\n  }\n\n  function resolveDoc(ts, id) {\n    if (typeof id == \"string\") return ts.docs[id];\n    if (id instanceof CodeMirror) id = id.getDoc();\n    if (id instanceof CodeMirror.Doc) return findDoc(ts, id);\n  }\n\n  function trackChange(ts, doc, change) {\n    var data = findDoc(ts, doc);\n\n    var argHints = ts.cachedArgHints;\n    if (argHints && argHints.doc == doc && cmpPos(argHints.start, change.to) <= 0)\n      ts.cachedArgHints = null;\n\n    var changed = data.changed;\n    if (changed == null)\n      data.changed = changed = {from: change.from.line, to: change.from.line};\n    var end = change.from.line + (change.text.length - 1);\n    if (change.from.line < changed.to) changed.to = changed.to - (change.to.line - end);\n    if (end >= changed.to) changed.to = end + 1;\n    if (changed.from > change.from.line) changed.from = change.from.line;\n\n    if (doc.lineCount() > bigDoc && change.to - changed.from > 100) setTimeout(function() {\n      if (data.changed && data.changed.to - data.changed.from > 100) sendDoc(ts, data);\n    }, 200);\n  }\n\n  function sendDoc(ts, doc) {\n    ts.server.request({files: [{type: \"full\", name: doc.name, text: docValue(ts, doc)}]}, function(error) {\n      if (error) window.console.error(error);\n      else doc.changed = null;\n    });\n  }\n\n  // Completion\n\n  function hint(ts, cm, c) {\n    ts.request(cm, {type: \"completions\", types: true, docs: true, urls: true}, function(error, data) {\n      if (error) return showError(ts, cm, error);\n      var completions = [], after = \"\";\n      var from = data.start, to = data.end;\n      if (cm.getRange(Pos(from.line, from.ch - 2), from) == \"[\\\"\" &&\n          cm.getRange(to, Pos(to.line, to.ch + 2)) != \"\\\"]\")\n        after = \"\\\"]\";\n\n      for (var i = 0; i < data.completions.length; ++i) {\n        var completion = data.completions[i], className = typeToIcon(completion.type);\n        if (data.guess) className += \" \" + cls + \"guess\";\n        completions.push({text: completion.name + after,\n                          displayText: completion.name,\n                          className: className,\n                          data: completion});\n      }\n\n      var obj = {from: from, to: to, list: completions};\n      var tooltip = null;\n      CodeMirror.on(obj, \"close\", function() { remove(tooltip); });\n      CodeMirror.on(obj, \"update\", function() { remove(tooltip); });\n      CodeMirror.on(obj, \"select\", function(cur, node) {\n        remove(tooltip);\n        var content = ts.options.completionTip ? ts.options.completionTip(cur.data) : cur.data.doc;\n        if (content) {\n          tooltip = makeTooltip(node.parentNode.getBoundingClientRect().right + window.pageXOffset,\n                                node.getBoundingClientRect().top + window.pageYOffset, content);\n          tooltip.className += \" \" + cls + \"hint-doc\";\n        }\n      });\n      c(obj);\n    });\n  }\n\n  function typeToIcon(type) {\n    var suffix;\n    if (type == \"?\") suffix = \"unknown\";\n    else if (type == \"number\" || type == \"string\" || type == \"bool\") suffix = type;\n    else if (/^fn\\(/.test(type)) suffix = \"fn\";\n    else if (/^\\[/.test(type)) suffix = \"array\";\n    else suffix = \"object\";\n    return cls + \"completion \" + cls + \"completion-\" + suffix;\n  }\n\n  // Type queries\n\n  function showContextInfo(ts, cm, pos, queryName, c) {\n    ts.request(cm, queryName, function(error, data) {\n      if (error) return showError(ts, cm, error);\n      if (ts.options.typeTip) {\n        var tip = ts.options.typeTip(data);\n      } else {\n        var tip = elt(\"span\", null, elt(\"strong\", null, data.type || \"not found\"));\n        if (data.doc)\n          tip.appendChild(document.createTextNode(\" — \" + data.doc));\n        if (data.url) {\n          tip.appendChild(document.createTextNode(\" \"));\n          var child = tip.appendChild(elt(\"a\", null, \"[docs]\"));\n          child.href = data.url;\n          child.target = \"_blank\";\n        }\n      }\n      tempTooltip(cm, tip);\n      if (c) c();\n    }, pos);\n  }\n\n  // Maintaining argument hints\n\n  function updateArgHints(ts, cm) {\n    closeArgHints(ts);\n\n    if (cm.somethingSelected()) return;\n    var state = cm.getTokenAt(cm.getCursor()).state;\n    var inner = CodeMirror.innerMode(cm.getMode(), state);\n    if (inner.mode.name != \"javascript\") return;\n    var lex = inner.state.lexical;\n    if (lex.info != \"call\") return;\n\n    var ch, argPos = lex.pos || 0, tabSize = cm.getOption(\"tabSize\");\n    for (var line = cm.getCursor().line, e = Math.max(0, line - 9), found = false; line >= e; --line) {\n      var str = cm.getLine(line), extra = 0;\n      for (var pos = 0;;) {\n        var tab = str.indexOf(\"\\t\", pos);\n        if (tab == -1) break;\n        extra += tabSize - (tab + extra) % tabSize - 1;\n        pos = tab + 1;\n      }\n      ch = lex.column - extra;\n      if (str.charAt(ch) == \"(\") {found = true; break;}\n    }\n    if (!found) return;\n\n    var start = Pos(line, ch);\n    var cache = ts.cachedArgHints;\n    if (cache && cache.doc == cm.getDoc() && cmpPos(start, cache.start) == 0)\n      return showArgHints(ts, cm, argPos);\n\n    ts.request(cm, {type: \"type\", preferFunction: true, end: start}, function(error, data) {\n      if (error || !data.type || !(/^fn\\(/).test(data.type)) return;\n      ts.cachedArgHints = {\n        start: pos,\n        type: parseFnType(data.type),\n        name: data.exprName || data.name || \"fn\",\n        guess: data.guess,\n        doc: cm.getDoc()\n      };\n      showArgHints(ts, cm, argPos);\n    });\n  }\n\n  function showArgHints(ts, cm, pos) {\n    closeArgHints(ts);\n\n    var cache = ts.cachedArgHints, tp = cache.type;\n    var tip = elt(\"span\", cache.guess ? cls + \"fhint-guess\" : null,\n                  elt(\"span\", cls + \"fname\", cache.name), \"(\");\n    for (var i = 0; i < tp.args.length; ++i) {\n      if (i) tip.appendChild(document.createTextNode(\", \"));\n      var arg = tp.args[i];\n      tip.appendChild(elt(\"span\", cls + \"farg\" + (i == pos ? \" \" + cls + \"farg-current\" : \"\"), arg.name || \"?\"));\n      if (arg.type != \"?\") {\n        tip.appendChild(document.createTextNode(\":\\u00a0\"));\n        tip.appendChild(elt(\"span\", cls + \"type\", arg.type));\n      }\n    }\n    tip.appendChild(document.createTextNode(tp.rettype ? \") ->\\u00a0\" : \")\"));\n    if (tp.rettype) tip.appendChild(elt(\"span\", cls + \"type\", tp.rettype));\n    var place = cm.cursorCoords(null, \"page\");\n    ts.activeArgHints = makeTooltip(place.right + 1, place.bottom, tip);\n  }\n\n  function parseFnType(text) {\n    var args = [], pos = 3;\n\n    function skipMatching(upto) {\n      var depth = 0, start = pos;\n      for (;;) {\n        var next = text.charAt(pos);\n        if (upto.test(next) && !depth) return text.slice(start, pos);\n        if (/[{\\[\\(]/.test(next)) ++depth;\n        else if (/[}\\]\\)]/.test(next)) --depth;\n        ++pos;\n      }\n    }\n\n    // Parse arguments\n    if (text.charAt(pos) != \")\") for (;;) {\n      var name = text.slice(pos).match(/^([^, \\(\\[\\{]+): /);\n      if (name) {\n        pos += name[0].length;\n        name = name[1];\n      }\n      args.push({name: name, type: skipMatching(/[\\),]/)});\n      if (text.charAt(pos) == \")\") break;\n      pos += 2;\n    }\n\n    var rettype = text.slice(pos).match(/^\\) -> (.*)$/);\n\n    return {args: args, rettype: rettype && rettype[1]};\n  }\n\n  // Moving to the definition of something\n\n  function jumpToDef(ts, cm) {\n    function inner(varName) {\n      var req = {type: \"definition\", variable: varName || null};\n      var doc = findDoc(ts, cm.getDoc());\n      ts.server.request(buildRequest(ts, doc, req), function(error, data) {\n        if (error) return showError(ts, cm, error);\n        if (!data.file && data.url) { window.open(data.url); return; }\n\n        if (data.file) {\n          var localDoc = ts.docs[data.file], found;\n          if (localDoc && (found = findContext(localDoc.doc, data))) {\n            ts.jumpStack.push({file: doc.name,\n                               start: cm.getCursor(\"from\"),\n                               end: cm.getCursor(\"to\")});\n            moveTo(ts, doc, localDoc, found.start, found.end);\n            return;\n          }\n        }\n        showError(ts, cm, \"Could not find a definition.\");\n      });\n    }\n\n    if (!atInterestingExpression(cm))\n      dialog(cm, \"Jump to variable\", function(name) { if (name) inner(name); });\n    else\n      inner();\n  }\n\n  function jumpBack(ts, cm) {\n    var pos = ts.jumpStack.pop(), doc = pos && ts.docs[pos.file];\n    if (!doc) return;\n    moveTo(ts, findDoc(ts, cm.getDoc()), doc, pos.start, pos.end);\n  }\n\n  function moveTo(ts, curDoc, doc, start, end) {\n    doc.doc.setSelection(start, end);\n    if (curDoc != doc && ts.options.switchToDoc) {\n      closeArgHints(ts);\n      ts.options.switchToDoc(doc.name, doc.doc);\n    }\n  }\n\n  // The {line,ch} representation of positions makes this rather awkward.\n  function findContext(doc, data) {\n    var before = data.context.slice(0, data.contextOffset).split(\"\\n\");\n    var startLine = data.start.line - (before.length - 1);\n    var start = Pos(startLine, (before.length == 1 ? data.start.ch : doc.getLine(startLine).length) - before[0].length);\n\n    var text = doc.getLine(startLine).slice(start.ch);\n    for (var cur = startLine + 1; cur < doc.lineCount() && text.length < data.context.length; ++cur)\n      text += \"\\n\" + doc.getLine(cur);\n    if (text.slice(0, data.context.length) == data.context) return data;\n\n    var cursor = doc.getSearchCursor(data.context, 0, false);\n    var nearest, nearestDist = Infinity;\n    while (cursor.findNext()) {\n      var from = cursor.from(), dist = Math.abs(from.line - start.line) * 10000;\n      if (!dist) dist = Math.abs(from.ch - start.ch);\n      if (dist < nearestDist) { nearest = from; nearestDist = dist; }\n    }\n    if (!nearest) return null;\n\n    if (before.length == 1)\n      nearest.ch += before[0].length;\n    else\n      nearest = Pos(nearest.line + (before.length - 1), before[before.length - 1].length);\n    if (data.start.line == data.end.line)\n      var end = Pos(nearest.line, nearest.ch + (data.end.ch - data.start.ch));\n    else\n      var end = Pos(nearest.line + (data.end.line - data.start.line), data.end.ch);\n    return {start: nearest, end: end};\n  }\n\n  function atInterestingExpression(cm) {\n    var pos = cm.getCursor(\"end\"), tok = cm.getTokenAt(pos);\n    if (tok.start < pos.ch && (tok.type == \"comment\" || tok.type == \"string\")) return false;\n    return /\\w/.test(cm.getLine(pos.line).slice(Math.max(pos.ch - 1, 0), pos.ch + 1));\n  }\n\n  // Variable renaming\n\n  function rename(ts, cm) {\n    var token = cm.getTokenAt(cm.getCursor());\n    if (!/\\w/.test(token.string)) return showError(ts, cm, \"Not at a variable\");\n    dialog(cm, \"New name for \" + token.string, function(newName) {\n      ts.request(cm, {type: \"rename\", newName: newName, fullDocs: true}, function(error, data) {\n        if (error) return showError(ts, cm, error);\n        applyChanges(ts, data.changes);\n      });\n    });\n  }\n\n  function selectName(ts, cm) {\n    var name = findDoc(ts, cm.doc).name;\n    ts.request(cm, {type: \"refs\"}, function(error, data) {\n      if (error) return showError(ts, cm, error);\n      var ranges = [], cur = 0;\n      for (var i = 0; i < data.refs.length; i++) {\n        var ref = data.refs[i];\n        if (ref.file == name) {\n          ranges.push({anchor: ref.start, head: ref.end});\n          if (cmpPos(cur, ref.start) >= 0 && cmpPos(cur, ref.end) <= 0)\n            cur = ranges.length - 1;\n        }\n      }\n      cm.setSelections(ranges, cur);\n    });\n  }\n\n  var nextChangeOrig = 0;\n  function applyChanges(ts, changes) {\n    var perFile = Object.create(null);\n    for (var i = 0; i < changes.length; ++i) {\n      var ch = changes[i];\n      (perFile[ch.file] || (perFile[ch.file] = [])).push(ch);\n    }\n    for (var file in perFile) {\n      var known = ts.docs[file], chs = perFile[file];;\n      if (!known) continue;\n      chs.sort(function(a, b) { return cmpPos(b.start, a.start); });\n      var origin = \"*rename\" + (++nextChangeOrig);\n      for (var i = 0; i < chs.length; ++i) {\n        var ch = chs[i];\n        known.doc.replaceRange(ch.text, ch.start, ch.end, origin);\n      }\n    }\n  }\n\n  // Generic request-building helper\n\n  function buildRequest(ts, doc, query, pos) {\n    var files = [], offsetLines = 0, allowFragments = !query.fullDocs;\n    if (!allowFragments) delete query.fullDocs;\n    if (typeof query == \"string\") query = {type: query};\n    query.lineCharPositions = true;\n    if (query.end == null) {\n      query.end = pos || doc.doc.getCursor(\"end\");\n      if (doc.doc.somethingSelected())\n        query.start = doc.doc.getCursor(\"start\");\n    }\n    var startPos = query.start || query.end;\n\n    if (doc.changed) {\n      if (doc.doc.lineCount() > bigDoc && allowFragments !== false &&\n          doc.changed.to - doc.changed.from < 100 &&\n          doc.changed.from <= startPos.line && doc.changed.to > query.end.line) {\n        files.push(getFragmentAround(doc, startPos, query.end));\n        query.file = \"#0\";\n        var offsetLines = files[0].offsetLines;\n        if (query.start != null) query.start = Pos(query.start.line - -offsetLines, query.start.ch);\n        query.end = Pos(query.end.line - offsetLines, query.end.ch);\n      } else {\n        files.push({type: \"full\",\n                    name: doc.name,\n                    text: docValue(ts, doc)});\n        query.file = doc.name;\n        doc.changed = null;\n      }\n    } else {\n      query.file = doc.name;\n    }\n    for (var name in ts.docs) {\n      var cur = ts.docs[name];\n      if (cur.changed && cur != doc) {\n        files.push({type: \"full\", name: cur.name, text: docValue(ts, cur)});\n        cur.changed = null;\n      }\n    }\n\n    return {query: query, files: files};\n  }\n\n  function getFragmentAround(data, start, end) {\n    var doc = data.doc;\n    var minIndent = null, minLine = null, endLine, tabSize = 4;\n    for (var p = start.line - 1, min = Math.max(0, p - 50); p >= min; --p) {\n      var line = doc.getLine(p), fn = line.search(/\\bfunction\\b/);\n      if (fn < 0) continue;\n      var indent = CodeMirror.countColumn(line, null, tabSize);\n      if (minIndent != null && minIndent <= indent) continue;\n      minIndent = indent;\n      minLine = p;\n    }\n    if (minLine == null) minLine = min;\n    var max = Math.min(doc.lastLine(), end.line + 20);\n    if (minIndent == null || minIndent == CodeMirror.countColumn(doc.getLine(start.line), null, tabSize))\n      endLine = max;\n    else for (endLine = end.line + 1; endLine < max; ++endLine) {\n      var indent = CodeMirror.countColumn(doc.getLine(endLine), null, tabSize);\n      if (indent <= minIndent) break;\n    }\n    var from = Pos(minLine, 0);\n\n    return {type: \"part\",\n            name: data.name,\n            offsetLines: from.line,\n            text: doc.getRange(from, Pos(endLine, 0))};\n  }\n\n  // Generic utilities\n\n  var cmpPos = CodeMirror.cmpPos;\n\n  function elt(tagname, cls /*, ... elts*/) {\n    var e = document.createElement(tagname);\n    if (cls) e.className = cls;\n    for (var i = 2; i < arguments.length; ++i) {\n      var elt = arguments[i];\n      if (typeof elt == \"string\") elt = document.createTextNode(elt);\n      e.appendChild(elt);\n    }\n    return e;\n  }\n\n  function dialog(cm, text, f) {\n    if (cm.openDialog)\n      cm.openDialog(text + \": <input type=text>\", f);\n    else\n      f(prompt(text, \"\"));\n  }\n\n  // Tooltips\n\n  function tempTooltip(cm, content) {\n    if (cm.state.ternTooltip) remove(cm.state.ternTooltip);\n    var where = cm.cursorCoords();\n    var tip = cm.state.ternTooltip = makeTooltip(where.right + 1, where.bottom, content);\n    function maybeClear() {\n      old = true;\n      if (!mouseOnTip) clear();\n    }\n    function clear() {\n      cm.state.ternTooltip = null;\n      if (!tip.parentNode) return;\n      cm.off(\"cursorActivity\", clear);\n      cm.off('blur', clear);\n      cm.off('scroll', clear);\n      fadeOut(tip);\n    }\n    var mouseOnTip = false, old = false;\n    CodeMirror.on(tip, \"mousemove\", function() { mouseOnTip = true; });\n    CodeMirror.on(tip, \"mouseout\", function(e) {\n      if (!CodeMirror.contains(tip, e.relatedTarget || e.toElement)) {\n        if (old) clear();\n        else mouseOnTip = false;\n      }\n    });\n    setTimeout(maybeClear, 1700);\n    cm.on(\"cursorActivity\", clear);\n    cm.on('blur', clear);\n    cm.on('scroll', clear);\n  }\n\n  function makeTooltip(x, y, content) {\n    var node = elt(\"div\", cls + \"tooltip\", content);\n    node.style.left = x + \"px\";\n    node.style.top = y + \"px\";\n    document.body.appendChild(node);\n    return node;\n  }\n\n  function remove(node) {\n    var p = node && node.parentNode;\n    if (p) p.removeChild(node);\n  }\n\n  function fadeOut(tooltip) {\n    tooltip.style.opacity = \"0\";\n    setTimeout(function() { remove(tooltip); }, 1100);\n  }\n\n  function showError(ts, cm, msg) {\n    if (ts.options.showError)\n      ts.options.showError(cm, msg);\n    else\n      tempTooltip(cm, String(msg));\n  }\n\n  function closeArgHints(ts) {\n    if (ts.activeArgHints) { remove(ts.activeArgHints); ts.activeArgHints = null; }\n  }\n\n  function docValue(ts, doc) {\n    var val = doc.doc.getValue();\n    if (ts.options.fileFilter) val = ts.options.fileFilter(val, doc.name, doc.doc);\n    return val;\n  }\n\n  // Worker wrapper\n\n  function WorkerServer(ts) {\n    var worker = ts.worker = new Worker(ts.options.workerScript);\n    worker.postMessage({type: \"init\",\n                        defs: ts.options.defs,\n                        plugins: ts.options.plugins,\n                        scripts: ts.options.workerDeps});\n    var msgId = 0, pending = {};\n\n    function send(data, c) {\n      if (c) {\n        data.id = ++msgId;\n        pending[msgId] = c;\n      }\n      worker.postMessage(data);\n    }\n    worker.onmessage = function(e) {\n      var data = e.data;\n      if (data.type == \"getFile\") {\n        getFile(ts, data.name, function(err, text) {\n          send({type: \"getFile\", err: String(err), text: text, id: data.id});\n        });\n      } else if (data.type == \"debug\") {\n        window.console.log(data.message);\n      } else if (data.id && pending[data.id]) {\n        pending[data.id](data.err, data.body);\n        delete pending[data.id];\n      }\n    };\n    worker.onerror = function(e) {\n      for (var id in pending) pending[id](e);\n      pending = {};\n    };\n\n    this.addFile = function(name, text) { send({type: \"add\", name: name, text: text}); };\n    this.delFile = function(name) { send({type: \"del\", name: name}); };\n    this.request = function(body, c) { send({type: \"req\", body: body}, c); };\n  }\n});\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/addon/tern/worker.js",
    "content": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n// declare global: tern, server\n\nvar server;\n\nthis.onmessage = function(e) {\n  var data = e.data;\n  switch (data.type) {\n  case \"init\": return startServer(data.defs, data.plugins, data.scripts);\n  case \"add\": return server.addFile(data.name, data.text);\n  case \"del\": return server.delFile(data.name);\n  case \"req\": return server.request(data.body, function(err, reqData) {\n    postMessage({id: data.id, body: reqData, err: err && String(err)});\n  });\n  case \"getFile\":\n    var c = pending[data.id];\n    delete pending[data.id];\n    return c(data.err, data.text);\n  default: throw new Error(\"Unknown message type: \" + data.type);\n  }\n};\n\nvar nextId = 0, pending = {};\nfunction getFile(file, c) {\n  postMessage({type: \"getFile\", name: file, id: ++nextId});\n  pending[nextId] = c;\n}\n\nfunction startServer(defs, plugins, scripts) {\n  if (scripts) importScripts.apply(null, scripts);\n\n  server = new tern.Server({\n    getFile: getFile,\n    async: true,\n    defs: defs,\n    plugins: plugins\n  });\n}\n\nvar console = {\n  log: function(v) { postMessage({type: \"debug\", message: v}); }\n};\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/addon/wrap/hardwrap.js",
    "content": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n(function(mod) {\n  if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n    mod(require(\"../../lib/codemirror\"));\n  else if (typeof define == \"function\" && define.amd) // AMD\n    define([\"../../lib/codemirror\"], mod);\n  else // Plain browser env\n    mod(CodeMirror);\n})(function(CodeMirror) {\n  \"use strict\";\n\n  var Pos = CodeMirror.Pos;\n\n  function findParagraph(cm, pos, options) {\n    var startRE = options.paragraphStart || cm.getHelper(pos, \"paragraphStart\");\n    for (var start = pos.line, first = cm.firstLine(); start > first; --start) {\n      var line = cm.getLine(start);\n      if (startRE && startRE.test(line)) break;\n      if (!/\\S/.test(line)) { ++start; break; }\n    }\n    var endRE = options.paragraphEnd || cm.getHelper(pos, \"paragraphEnd\");\n    for (var end = pos.line + 1, last = cm.lastLine(); end <= last; ++end) {\n      var line = cm.getLine(end);\n      if (endRE && endRE.test(line)) { ++end; break; }\n      if (!/\\S/.test(line)) break;\n    }\n    return {from: start, to: end};\n  }\n\n  function findBreakPoint(text, column, wrapOn, killTrailingSpace) {\n    for (var at = column; at > 0; --at)\n      if (wrapOn.test(text.slice(at - 1, at + 1))) break;\n    if (at == 0) at = column;\n    var endOfText = at;\n    if (killTrailingSpace)\n      while (text.charAt(endOfText - 1) == \" \") --endOfText;\n    return {from: endOfText, to: at};\n  }\n\n  function wrapRange(cm, from, to, options) {\n    from = cm.clipPos(from); to = cm.clipPos(to);\n    var column = options.column || 80;\n    var wrapOn = options.wrapOn || /\\s\\S|-[^\\.\\d]/;\n    var killTrailing = options.killTrailingSpace !== false;\n    var changes = [], curLine = \"\", curNo = from.line;\n    var lines = cm.getRange(from, to, false);\n    if (!lines.length) return null;\n    var leadingSpace = lines[0].match(/^[ \\t]*/)[0];\n\n    for (var i = 0; i < lines.length; ++i) {\n      var text = lines[i], oldLen = curLine.length, spaceInserted = 0;\n      if (curLine && text && !wrapOn.test(curLine.charAt(curLine.length - 1) + text.charAt(0))) {\n        curLine += \" \";\n        spaceInserted = 1;\n      }\n      var spaceTrimmed = \"\";\n      if (i) {\n        spaceTrimmed = text.match(/^\\s*/)[0];\n        text = text.slice(spaceTrimmed.length);\n      }\n      curLine += text;\n      if (i) {\n        var firstBreak = curLine.length > column && leadingSpace == spaceTrimmed &&\n          findBreakPoint(curLine, column, wrapOn, killTrailing);\n        // If this isn't broken, or is broken at a different point, remove old break\n        if (!firstBreak || firstBreak.from != oldLen || firstBreak.to != oldLen + spaceInserted) {\n          changes.push({text: [spaceInserted ? \" \" : \"\"],\n                        from: Pos(curNo, oldLen),\n                        to: Pos(curNo + 1, spaceTrimmed.length)});\n        } else {\n          curLine = leadingSpace + text;\n          ++curNo;\n        }\n      }\n      while (curLine.length > column) {\n        var bp = findBreakPoint(curLine, column, wrapOn, killTrailing);\n        changes.push({text: [\"\", leadingSpace],\n                      from: Pos(curNo, bp.from),\n                      to: Pos(curNo, bp.to)});\n        curLine = leadingSpace + curLine.slice(bp.to);\n        ++curNo;\n      }\n    }\n    if (changes.length) cm.operation(function() {\n      for (var i = 0; i < changes.length; ++i) {\n        var change = changes[i];\n        cm.replaceRange(change.text, change.from, change.to);\n      }\n    });\n    return changes.length ? {from: changes[0].from, to: CodeMirror.changeEnd(changes[changes.length - 1])} : null;\n  }\n\n  CodeMirror.defineExtension(\"wrapParagraph\", function(pos, options) {\n    options = options || {};\n    if (!pos) pos = this.getCursor();\n    var para = findParagraph(this, pos, options);\n    return wrapRange(this, Pos(para.from, 0), Pos(para.to - 1), options);\n  });\n\n  CodeMirror.commands.wrapLines = function(cm) {\n    cm.operation(function() {\n      var ranges = cm.listSelections(), at = cm.lastLine() + 1;\n      for (var i = ranges.length - 1; i >= 0; i--) {\n        var range = ranges[i], span;\n        if (range.empty()) {\n          var para = findParagraph(cm, range.head, {});\n          span = {from: Pos(para.from, 0), to: Pos(para.to - 1)};\n        } else {\n          span = {from: range.from(), to: range.to()};\n        }\n        if (span.to.line >= at) continue;\n        at = span.from.line;\n        wrapRange(cm, span.from, span.to, {});\n      }\n    });\n  };\n\n  CodeMirror.defineExtension(\"wrapRange\", function(from, to, options) {\n    return wrapRange(this, from, to, options || {});\n  });\n\n  CodeMirror.defineExtension(\"wrapParagraphsInRange\", function(from, to, options) {\n    options = options || {};\n    var cm = this, paras = [];\n    for (var line = from.line; line <= to.line;) {\n      var para = findParagraph(cm, Pos(line, 0), options);\n      paras.push(para);\n      line = para.to;\n    }\n    var madeChange = false;\n    if (paras.length) cm.operation(function() {\n      for (var i = paras.length - 1; i >= 0; --i)\n        madeChange = madeChange || wrapRange(cm, Pos(paras[i].from, 0), Pos(paras[i].to - 1), options);\n    });\n    return madeChange;\n  });\n});\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/bower.json",
    "content": "{\n  \"name\": \"codemirror\",\n  \"version\":\"5.0.0\",\n  \"main\": [\"lib/codemirror.js\", \"lib/codemirror.css\"],\n  \"ignore\": [\n    \"**/.*\",\n    \"node_modules\",\n    \"components\",\n    \"bin\",\n    \"demo\",\n    \"doc\",\n    \"test\",\n    \"index.html\",\n    \"package.json\"\n  ]\n}\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/lib/codemirror.css",
    "content": "/*!\n// CodeMirror v5.0, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n// This is CodeMirror (http://codemirror.net), a code editor\n// implemented in JavaScript on top of the browser's DOM.\n//\n// You can find some technical background for some of the code below\n// at http://marijnhaverbeke.nl/blog/#cm-internals .\n*/\n\n/* BASICS */\n\n.CodeMirror {\n  /* Set height, width, borders, and global font properties here */\n  font-family: monospace;\n  height: 300px;\n  color: black;\n}\n\n/* PADDING */\n\n.CodeMirror-lines {\n  padding: 4px 0; /* Vertical padding around content */\n}\n.CodeMirror pre {\n  padding: 0 4px; /* Horizontal padding of content */\n}\n\n.CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler {\n  background-color: white; /* The little square between H and V scrollbars */\n}\n\n/* GUTTER */\n\n.CodeMirror-gutters {\n  border-right: 1px solid #ddd;\n  background-color: #f7f7f7;\n  white-space: nowrap;\n}\n.CodeMirror-linenumbers {}\n.CodeMirror-linenumber {\n  padding: 0 3px 0 5px;\n  min-width: 20px;\n  text-align: right;\n  color: #999;\n  -moz-box-sizing: content-box;\n  box-sizing: content-box;\n}\n\n.CodeMirror-guttermarker { color: black; }\n.CodeMirror-guttermarker-subtle { color: #999; }\n\n/* CURSOR */\n\n.CodeMirror div.CodeMirror-cursor {\n  border-left: 1px solid black;\n}\n/* Shown when moving in bi-directional text */\n.CodeMirror div.CodeMirror-secondarycursor {\n  border-left: 1px solid silver;\n}\n.CodeMirror.cm-fat-cursor div.CodeMirror-cursor {\n  width: auto;\n  border: 0;\n  background: #7e7;\n}\n.CodeMirror.cm-fat-cursor div.CodeMirror-cursors {\n  z-index: 1;\n}\n\n.cm-animate-fat-cursor {\n  width: auto;\n  border: 0;\n  -webkit-animation: blink 1.06s steps(1) infinite;\n  -moz-animation: blink 1.06s steps(1) infinite;\n  animation: blink 1.06s steps(1) infinite;\n}\n@-moz-keyframes blink {\n  0% { background: #7e7; }\n  50% { background: none; }\n  100% { background: #7e7; }\n}\n@-webkit-keyframes blink {\n  0% { background: #7e7; }\n  50% { background: none; }\n  100% { background: #7e7; }\n}\n@keyframes blink {\n  0% { background: #7e7; }\n  50% { background: none; }\n  100% { background: #7e7; }\n}\n\n/* Can style cursor different in overwrite (non-insert) mode */\ndiv.CodeMirror-overwrite div.CodeMirror-cursor {}\n\n.cm-tab { display: inline-block; text-decoration: inherit; }\n\n.CodeMirror-ruler {\n  border-left: 1px solid #ccc;\n  position: absolute;\n}\n\n/* DEFAULT THEME */\n\n.cm-s-default .cm-keyword {color: #708;}\n.cm-s-default .cm-atom {color: #219;}\n.cm-s-default .cm-number {color: #164;}\n.cm-s-default .cm-def {color: #00f;}\n.cm-s-default .cm-variable,\n.cm-s-default .cm-punctuation,\n.cm-s-default .cm-property,\n.cm-s-default .cm-operator {}\n.cm-s-default .cm-variable-2 {color: #05a;}\n.cm-s-default .cm-variable-3 {color: #085;}\n.cm-s-default .cm-comment {color: #a50;}\n.cm-s-default .cm-string {color: #a11;}\n.cm-s-default .cm-string-2 {color: #f50;}\n.cm-s-default .cm-meta {color: #555;}\n.cm-s-default .cm-qualifier {color: #555;}\n.cm-s-default .cm-builtin {color: #30a;}\n.cm-s-default .cm-bracket {color: #997;}\n.cm-s-default .cm-tag {color: #170;}\n.cm-s-default .cm-attribute {color: #00c;}\n.cm-s-default .cm-header {color: blue;}\n.cm-s-default .cm-quote {color: #090;}\n.cm-s-default .cm-hr {color: #999;}\n.cm-s-default .cm-link {color: #00c;}\n\n.cm-negative {color: #d44;}\n.cm-positive {color: #292;}\n.cm-header, .cm-strong {font-weight: bold;}\n.cm-em {font-style: italic;}\n.cm-link {text-decoration: underline;}\n.cm-strikethrough {text-decoration: line-through;}\n\n.cm-s-default .cm-error {color: #f00;}\n.cm-invalidchar {color: #f00;}\n\n/* Default styles for common addons */\n\ndiv.CodeMirror span.CodeMirror-matchingbracket {color: #0f0;}\ndiv.CodeMirror span.CodeMirror-nonmatchingbracket {color: #f22;}\n.CodeMirror-matchingtag { background: rgba(255, 150, 0, .3); }\n.CodeMirror-activeline-background {background: #e8f2ff;}\n\n/* STOP */\n\n/* The rest of this file contains styles related to the mechanics of\n   the editor. You probably shouldn't touch them. */\n\n.CodeMirror {\n  position: relative;\n  overflow: hidden;\n  background: white;\n}\n\n.CodeMirror-scroll {\n  overflow: scroll !important; /* Things will break if this is overridden */\n  /* 30px is the magic margin used to hide the element's real scrollbars */\n  /* See overflow: hidden in .CodeMirror */\n  margin-bottom: -30px; margin-right: -30px;\n  padding-bottom: 30px;\n  height: 100%;\n  outline: none; /* Prevent dragging from highlighting the element */\n  position: relative;\n  -moz-box-sizing: content-box;\n  box-sizing: content-box;\n}\n.CodeMirror-sizer {\n  position: relative;\n  border-right: 30px solid transparent;\n  -moz-box-sizing: content-box;\n  box-sizing: content-box;\n}\n\n/* The fake, visible scrollbars. Used to force redraw during scrolling\n   before actuall scrolling happens, thus preventing shaking and\n   flickering artifacts. */\n.CodeMirror-vscrollbar, .CodeMirror-hscrollbar, .CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler {\n  position: absolute;\n  z-index: 6;\n  display: none;\n}\n.CodeMirror-vscrollbar {\n  right: 0; top: 0;\n  overflow-x: hidden;\n  overflow-y: scroll;\n}\n.CodeMirror-hscrollbar {\n  bottom: 0; left: 0;\n  overflow-y: hidden;\n  overflow-x: scroll;\n}\n.CodeMirror-scrollbar-filler {\n  right: 0; bottom: 0;\n}\n.CodeMirror-gutter-filler {\n  left: 0; bottom: 0;\n}\n\n.CodeMirror-gutters {\n  position: absolute; left: 0; top: 0;\n  z-index: 3;\n}\n.CodeMirror-gutter {\n  white-space: normal;\n  height: 100%;\n  -moz-box-sizing: content-box;\n  box-sizing: content-box;\n  display: inline-block;\n  margin-bottom: -30px;\n  /* Hack to make IE7 behave */\n  *zoom:1;\n  *display:inline;\n}\n.CodeMirror-gutter-wrapper {\n  position: absolute;\n  z-index: 4;\n  height: 100%;\n}\n.CodeMirror-gutter-elt {\n  position: absolute;\n  cursor: default;\n  z-index: 4;\n}\n.CodeMirror-gutter-wrapper {\n  -webkit-user-select: none;\n  -moz-user-select: none;\n  user-select: none;\n}\n\n.CodeMirror-lines {\n  cursor: text;\n  min-height: 1px; /* prevents collapsing before first draw */\n}\n.CodeMirror pre {\n  /* Reset some styles that the rest of the page might have set */\n  -moz-border-radius: 0; -webkit-border-radius: 0; border-radius: 0;\n  border-width: 0;\n  background: transparent;\n  font-family: inherit;\n  font-size: inherit;\n  margin: 0;\n  white-space: pre;\n  word-wrap: normal;\n  line-height: inherit;\n  color: inherit;\n  z-index: 2;\n  position: relative;\n  overflow: visible;\n  -webkit-tap-highlight-color: transparent;\n}\n.CodeMirror-wrap pre {\n  word-wrap: break-word;\n  white-space: pre-wrap;\n  word-break: normal;\n}\n\n.CodeMirror-linebackground {\n  position: absolute;\n  left: 0; right: 0; top: 0; bottom: 0;\n  z-index: 0;\n}\n\n.CodeMirror-linewidget {\n  position: relative;\n  z-index: 2;\n  overflow: auto;\n}\n\n.CodeMirror-widget {}\n\n.CodeMirror-code {\n  outline: none;\n}\n\n.CodeMirror-measure {\n  position: absolute;\n  width: 100%;\n  height: 0;\n  overflow: hidden;\n  visibility: hidden;\n}\n.CodeMirror-measure pre { position: static; }\n\n.CodeMirror div.CodeMirror-cursor {\n  position: absolute;\n  border-right: none;\n  width: 0;\n}\n\ndiv.CodeMirror-cursors {\n  visibility: hidden;\n  position: relative;\n  z-index: 3;\n}\n.CodeMirror-focused div.CodeMirror-cursors {\n  visibility: visible;\n}\n\n.CodeMirror-selected { background: #d9d9d9; }\n.CodeMirror-focused .CodeMirror-selected { background: #d7d4f0; }\n.CodeMirror-crosshair { cursor: crosshair; }\n.CodeMirror ::selection { background: #d7d4f0; }\n.CodeMirror ::-moz-selection { background: #d7d4f0; }\n\n.cm-searching {\n  background: #ffa;\n  background: rgba(255, 255, 0, .4);\n}\n\n/* IE7 hack to prevent it from returning funny offsetTops on the spans */\n.CodeMirror span { *vertical-align: text-bottom; }\n\n/* Used to force a border model for a node */\n.cm-force-border { padding-right: .1px; }\n\n@media print {\n  /* Hide the cursor when printing */\n  .CodeMirror div.CodeMirror-cursors {\n    visibility: hidden;\n  }\n}\n\n/* See issue #2901 */\n.cm-tab-wrap-hack:after { content: ''; }\n\n/* Help users use markselection to safely style text background */\nspan.CodeMirror-selectedtext { background: none; }\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/lib/codemirror.js",
    "content": "// CodeMirror v5.0, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n// This is CodeMirror (http://codemirror.net), a code editor\n// implemented in JavaScript on top of the browser's DOM.\n//\n// You can find some technical background for some of the code below\n// at http://marijnhaverbeke.nl/blog/#cm-internals .\n\n(function(mod) {\n  if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n    module.exports = mod();\n  else if (typeof define == \"function\" && define.amd) // AMD\n    return define([], mod);\n  else // Plain browser env\n    this.CodeMirror = mod();\n})(function() {\n  \"use strict\";\n\n  // BROWSER SNIFFING\n\n  // Kludges for bugs and behavior differences that can't be feature\n  // detected are enabled based on userAgent etc sniffing.\n\n  var gecko = /gecko\\/\\d/i.test(navigator.userAgent);\n  var ie_upto10 = /MSIE \\d/.test(navigator.userAgent);\n  var ie_11up = /Trident\\/(?:[7-9]|\\d{2,})\\..*rv:(\\d+)/.exec(navigator.userAgent);\n  var ie = ie_upto10 || ie_11up;\n  var ie_version = ie && (ie_upto10 ? document.documentMode || 6 : ie_11up[1]);\n  var webkit = /WebKit\\//.test(navigator.userAgent);\n  var qtwebkit = webkit && /Qt\\/\\d+\\.\\d+/.test(navigator.userAgent);\n  var chrome = /Chrome\\//.test(navigator.userAgent);\n  var presto = /Opera\\//.test(navigator.userAgent);\n  var safari = /Apple Computer/.test(navigator.vendor);\n  var mac_geMountainLion = /Mac OS X 1\\d\\D([8-9]|\\d\\d)\\D/.test(navigator.userAgent);\n  var phantom = /PhantomJS/.test(navigator.userAgent);\n\n  var ios = /AppleWebKit/.test(navigator.userAgent) && /Mobile\\/\\w+/.test(navigator.userAgent);\n  // This is woefully incomplete. Suggestions for alternative methods welcome.\n  var mobile = ios || /Android|webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(navigator.userAgent);\n  var mac = ios || /Mac/.test(navigator.platform);\n  var windows = /win/i.test(navigator.platform);\n\n  var presto_version = presto && navigator.userAgent.match(/Version\\/(\\d*\\.\\d*)/);\n  if (presto_version) presto_version = Number(presto_version[1]);\n  if (presto_version && presto_version >= 15) { presto = false; webkit = true; }\n  // Some browsers use the wrong event properties to signal cmd/ctrl on OS X\n  var flipCtrlCmd = mac && (qtwebkit || presto && (presto_version == null || presto_version < 12.11));\n  var captureRightClick = gecko || (ie && ie_version >= 9);\n\n  // Optimize some code when these features are not used.\n  var sawReadOnlySpans = false, sawCollapsedSpans = false;\n\n  // EDITOR CONSTRUCTOR\n\n  // A CodeMirror instance represents an editor. This is the object\n  // that user code is usually dealing with.\n\n  function CodeMirror(place, options) {\n    if (!(this instanceof CodeMirror)) return new CodeMirror(place, options);\n\n    this.options = options = options ? copyObj(options) : {};\n    // Determine effective options based on given values and defaults.\n    copyObj(defaults, options, false);\n    setGuttersForLineNumbers(options);\n\n    var doc = options.value;\n    if (typeof doc == \"string\") doc = new Doc(doc, options.mode);\n    this.doc = doc;\n\n    var input = new CodeMirror.inputStyles[options.inputStyle](this);\n    var display = this.display = new Display(place, doc, input);\n    display.wrapper.CodeMirror = this;\n    updateGutters(this);\n    themeChanged(this);\n    if (options.lineWrapping)\n      this.display.wrapper.className += \" CodeMirror-wrap\";\n    if (options.autofocus && !mobile) display.input.focus();\n    initScrollbars(this);\n\n    this.state = {\n      keyMaps: [],  // stores maps added by addKeyMap\n      overlays: [], // highlighting overlays, as added by addOverlay\n      modeGen: 0,   // bumped when mode/overlay changes, used to invalidate highlighting info\n      overwrite: false, focused: false,\n      suppressEdits: false, // used to disable editing during key handlers when in readOnly mode\n      pasteIncoming: false, cutIncoming: false, // help recognize paste/cut edits in input.poll\n      draggingText: false,\n      highlight: new Delayed(), // stores highlight worker timeout\n      keySeq: null  // Unfinished key sequence\n    };\n\n    var cm = this;\n\n    // Override magic textarea content restore that IE sometimes does\n    // on our hidden textarea on reload\n    if (ie && ie_version < 11) setTimeout(function() { cm.display.input.reset(true); }, 20);\n\n    registerEventHandlers(this);\n    ensureGlobalHandlers();\n\n    startOperation(this);\n    this.curOp.forceUpdate = true;\n    attachDoc(this, doc);\n\n    if ((options.autofocus && !mobile) || cm.hasFocus())\n      setTimeout(bind(onFocus, this), 20);\n    else\n      onBlur(this);\n\n    for (var opt in optionHandlers) if (optionHandlers.hasOwnProperty(opt))\n      optionHandlers[opt](this, options[opt], Init);\n    maybeUpdateLineNumberWidth(this);\n    if (options.finishInit) options.finishInit(this);\n    for (var i = 0; i < initHooks.length; ++i) initHooks[i](this);\n    endOperation(this);\n    // Suppress optimizelegibility in Webkit, since it breaks text\n    // measuring on line wrapping boundaries.\n    if (webkit && options.lineWrapping &&\n        getComputedStyle(display.lineDiv).textRendering == \"optimizelegibility\")\n      display.lineDiv.style.textRendering = \"auto\";\n  }\n\n  // DISPLAY CONSTRUCTOR\n\n  // The display handles the DOM integration, both for input reading\n  // and content drawing. It holds references to DOM nodes and\n  // display-related state.\n\n  function Display(place, doc, input) {\n    var d = this;\n    this.input = input;\n\n    // Covers bottom-right square when both scrollbars are present.\n    d.scrollbarFiller = elt(\"div\", null, \"CodeMirror-scrollbar-filler\");\n    d.scrollbarFiller.setAttribute(\"cm-not-content\", \"true\");\n    // Covers bottom of gutter when coverGutterNextToScrollbar is on\n    // and h scrollbar is present.\n    d.gutterFiller = elt(\"div\", null, \"CodeMirror-gutter-filler\");\n    d.gutterFiller.setAttribute(\"cm-not-content\", \"true\");\n    // Will contain the actual code, positioned to cover the viewport.\n    d.lineDiv = elt(\"div\", null, \"CodeMirror-code\");\n    // Elements are added to these to represent selection and cursors.\n    d.selectionDiv = elt(\"div\", null, null, \"position: relative; z-index: 1\");\n    d.cursorDiv = elt(\"div\", null, \"CodeMirror-cursors\");\n    // A visibility: hidden element used to find the size of things.\n    d.measure = elt(\"div\", null, \"CodeMirror-measure\");\n    // When lines outside of the viewport are measured, they are drawn in this.\n    d.lineMeasure = elt(\"div\", null, \"CodeMirror-measure\");\n    // Wraps everything that needs to exist inside the vertically-padded coordinate system\n    d.lineSpace = elt(\"div\", [d.measure, d.lineMeasure, d.selectionDiv, d.cursorDiv, d.lineDiv],\n                      null, \"position: relative; outline: none\");\n    // Moved around its parent to cover visible view.\n    d.mover = elt(\"div\", [elt(\"div\", [d.lineSpace], \"CodeMirror-lines\")], null, \"position: relative\");\n    // Set to the height of the document, allowing scrolling.\n    d.sizer = elt(\"div\", [d.mover], \"CodeMirror-sizer\");\n    d.sizerWidth = null;\n    // Behavior of elts with overflow: auto and padding is\n    // inconsistent across browsers. This is used to ensure the\n    // scrollable area is big enough.\n    d.heightForcer = elt(\"div\", null, null, \"position: absolute; height: \" + scrollerGap + \"px; width: 1px;\");\n    // Will contain the gutters, if any.\n    d.gutters = elt(\"div\", null, \"CodeMirror-gutters\");\n    d.lineGutter = null;\n    // Actual scrollable element.\n    d.scroller = elt(\"div\", [d.sizer, d.heightForcer, d.gutters], \"CodeMirror-scroll\");\n    d.scroller.setAttribute(\"tabIndex\", \"-1\");\n    // The element in which the editor lives.\n    d.wrapper = elt(\"div\", [d.scrollbarFiller, d.gutterFiller, d.scroller], \"CodeMirror\");\n\n    // Work around IE7 z-index bug (not perfect, hence IE7 not really being supported)\n    if (ie && ie_version < 8) { d.gutters.style.zIndex = -1; d.scroller.style.paddingRight = 0; }\n    if (!webkit && !(gecko && mobile)) d.scroller.draggable = true;\n\n    if (place) {\n      if (place.appendChild) place.appendChild(d.wrapper);\n      else place(d.wrapper);\n    }\n\n    // Current rendered range (may be bigger than the view window).\n    d.viewFrom = d.viewTo = doc.first;\n    d.reportedViewFrom = d.reportedViewTo = doc.first;\n    // Information about the rendered lines.\n    d.view = [];\n    d.renderedView = null;\n    // Holds info about a single rendered line when it was rendered\n    // for measurement, while not in view.\n    d.externalMeasured = null;\n    // Empty space (in pixels) above the view\n    d.viewOffset = 0;\n    d.lastWrapHeight = d.lastWrapWidth = 0;\n    d.updateLineNumbers = null;\n\n    d.nativeBarWidth = d.barHeight = d.barWidth = 0;\n    d.scrollbarsClipped = false;\n\n    // Used to only resize the line number gutter when necessary (when\n    // the amount of lines crosses a boundary that makes its width change)\n    d.lineNumWidth = d.lineNumInnerWidth = d.lineNumChars = null;\n    // Set to true when a non-horizontal-scrolling line widget is\n    // added. As an optimization, line widget aligning is skipped when\n    // this is false.\n    d.alignWidgets = false;\n\n    d.cachedCharWidth = d.cachedTextHeight = d.cachedPaddingH = null;\n\n    // Tracks the maximum line length so that the horizontal scrollbar\n    // can be kept static when scrolling.\n    d.maxLine = null;\n    d.maxLineLength = 0;\n    d.maxLineChanged = false;\n\n    // Used for measuring wheel scrolling granularity\n    d.wheelDX = d.wheelDY = d.wheelStartX = d.wheelStartY = null;\n\n    // True when shift is held down.\n    d.shift = false;\n\n    // Used to track whether anything happened since the context menu\n    // was opened.\n    d.selForContextMenu = null;\n\n    d.activeTouch = null;\n\n    input.init(d);\n  }\n\n  // STATE UPDATES\n\n  // Used to get the editor into a consistent state again when options change.\n\n  function loadMode(cm) {\n    cm.doc.mode = CodeMirror.getMode(cm.options, cm.doc.modeOption);\n    resetModeState(cm);\n  }\n\n  function resetModeState(cm) {\n    cm.doc.iter(function(line) {\n      if (line.stateAfter) line.stateAfter = null;\n      if (line.styles) line.styles = null;\n    });\n    cm.doc.frontier = cm.doc.first;\n    startWorker(cm, 100);\n    cm.state.modeGen++;\n    if (cm.curOp) regChange(cm);\n  }\n\n  function wrappingChanged(cm) {\n    if (cm.options.lineWrapping) {\n      addClass(cm.display.wrapper, \"CodeMirror-wrap\");\n      cm.display.sizer.style.minWidth = \"\";\n      cm.display.sizerWidth = null;\n    } else {\n      rmClass(cm.display.wrapper, \"CodeMirror-wrap\");\n      findMaxLine(cm);\n    }\n    estimateLineHeights(cm);\n    regChange(cm);\n    clearCaches(cm);\n    setTimeout(function(){updateScrollbars(cm);}, 100);\n  }\n\n  // Returns a function that estimates the height of a line, to use as\n  // first approximation until the line becomes visible (and is thus\n  // properly measurable).\n  function estimateHeight(cm) {\n    var th = textHeight(cm.display), wrapping = cm.options.lineWrapping;\n    var perLine = wrapping && Math.max(5, cm.display.scroller.clientWidth / charWidth(cm.display) - 3);\n    return function(line) {\n      if (lineIsHidden(cm.doc, line)) return 0;\n\n      var widgetsHeight = 0;\n      if (line.widgets) for (var i = 0; i < line.widgets.length; i++) {\n        if (line.widgets[i].height) widgetsHeight += line.widgets[i].height;\n      }\n\n      if (wrapping)\n        return widgetsHeight + (Math.ceil(line.text.length / perLine) || 1) * th;\n      else\n        return widgetsHeight + th;\n    };\n  }\n\n  function estimateLineHeights(cm) {\n    var doc = cm.doc, est = estimateHeight(cm);\n    doc.iter(function(line) {\n      var estHeight = est(line);\n      if (estHeight != line.height) updateLineHeight(line, estHeight);\n    });\n  }\n\n  function themeChanged(cm) {\n    cm.display.wrapper.className = cm.display.wrapper.className.replace(/\\s*cm-s-\\S+/g, \"\") +\n      cm.options.theme.replace(/(^|\\s)\\s*/g, \" cm-s-\");\n    clearCaches(cm);\n  }\n\n  function guttersChanged(cm) {\n    updateGutters(cm);\n    regChange(cm);\n    setTimeout(function(){alignHorizontally(cm);}, 20);\n  }\n\n  // Rebuild the gutter elements, ensure the margin to the left of the\n  // code matches their width.\n  function updateGutters(cm) {\n    var gutters = cm.display.gutters, specs = cm.options.gutters;\n    removeChildren(gutters);\n    for (var i = 0; i < specs.length; ++i) {\n      var gutterClass = specs[i];\n      var gElt = gutters.appendChild(elt(\"div\", null, \"CodeMirror-gutter \" + gutterClass));\n      if (gutterClass == \"CodeMirror-linenumbers\") {\n        cm.display.lineGutter = gElt;\n        gElt.style.width = (cm.display.lineNumWidth || 1) + \"px\";\n      }\n    }\n    gutters.style.display = i ? \"\" : \"none\";\n    updateGutterSpace(cm);\n  }\n\n  function updateGutterSpace(cm) {\n    var width = cm.display.gutters.offsetWidth;\n    cm.display.sizer.style.marginLeft = width + \"px\";\n  }\n\n  // Compute the character length of a line, taking into account\n  // collapsed ranges (see markText) that might hide parts, and join\n  // other lines onto it.\n  function lineLength(line) {\n    if (line.height == 0) return 0;\n    var len = line.text.length, merged, cur = line;\n    while (merged = collapsedSpanAtStart(cur)) {\n      var found = merged.find(0, true);\n      cur = found.from.line;\n      len += found.from.ch - found.to.ch;\n    }\n    cur = line;\n    while (merged = collapsedSpanAtEnd(cur)) {\n      var found = merged.find(0, true);\n      len -= cur.text.length - found.from.ch;\n      cur = found.to.line;\n      len += cur.text.length - found.to.ch;\n    }\n    return len;\n  }\n\n  // Find the longest line in the document.\n  function findMaxLine(cm) {\n    var d = cm.display, doc = cm.doc;\n    d.maxLine = getLine(doc, doc.first);\n    d.maxLineLength = lineLength(d.maxLine);\n    d.maxLineChanged = true;\n    doc.iter(function(line) {\n      var len = lineLength(line);\n      if (len > d.maxLineLength) {\n        d.maxLineLength = len;\n        d.maxLine = line;\n      }\n    });\n  }\n\n  // Make sure the gutters options contains the element\n  // \"CodeMirror-linenumbers\" when the lineNumbers option is true.\n  function setGuttersForLineNumbers(options) {\n    var found = indexOf(options.gutters, \"CodeMirror-linenumbers\");\n    if (found == -1 && options.lineNumbers) {\n      options.gutters = options.gutters.concat([\"CodeMirror-linenumbers\"]);\n    } else if (found > -1 && !options.lineNumbers) {\n      options.gutters = options.gutters.slice(0);\n      options.gutters.splice(found, 1);\n    }\n  }\n\n  // SCROLLBARS\n\n  // Prepare DOM reads needed to update the scrollbars. Done in one\n  // shot to minimize update/measure roundtrips.\n  function measureForScrollbars(cm) {\n    var d = cm.display, gutterW = d.gutters.offsetWidth;\n    var docH = Math.round(cm.doc.height + paddingVert(cm.display));\n    return {\n      clientHeight: d.scroller.clientHeight,\n      viewHeight: d.wrapper.clientHeight,\n      scrollWidth: d.scroller.scrollWidth, clientWidth: d.scroller.clientWidth,\n      viewWidth: d.wrapper.clientWidth,\n      barLeft: cm.options.fixedGutter ? gutterW : 0,\n      docHeight: docH,\n      scrollHeight: docH + scrollGap(cm) + d.barHeight,\n      nativeBarWidth: d.nativeBarWidth,\n      gutterWidth: gutterW\n    };\n  }\n\n  function NativeScrollbars(place, scroll, cm) {\n    this.cm = cm;\n    var vert = this.vert = elt(\"div\", [elt(\"div\", null, null, \"min-width: 1px\")], \"CodeMirror-vscrollbar\");\n    var horiz = this.horiz = elt(\"div\", [elt(\"div\", null, null, \"height: 100%; min-height: 1px\")], \"CodeMirror-hscrollbar\");\n    place(vert); place(horiz);\n\n    on(vert, \"scroll\", function() {\n      if (vert.clientHeight) scroll(vert.scrollTop, \"vertical\");\n    });\n    on(horiz, \"scroll\", function() {\n      if (horiz.clientWidth) scroll(horiz.scrollLeft, \"horizontal\");\n    });\n\n    this.checkedOverlay = false;\n    // Need to set a minimum width to see the scrollbar on IE7 (but must not set it on IE8).\n    if (ie && ie_version < 8) this.horiz.style.minHeight = this.vert.style.minWidth = \"18px\";\n  }\n\n  NativeScrollbars.prototype = copyObj({\n    update: function(measure) {\n      var needsH = measure.scrollWidth > measure.clientWidth + 1;\n      var needsV = measure.scrollHeight > measure.clientHeight + 1;\n      var sWidth = measure.nativeBarWidth;\n\n      if (needsV) {\n        this.vert.style.display = \"block\";\n        this.vert.style.bottom = needsH ? sWidth + \"px\" : \"0\";\n        var totalHeight = measure.viewHeight - (needsH ? sWidth : 0);\n        // A bug in IE8 can cause this value to be negative, so guard it.\n        this.vert.firstChild.style.height =\n          Math.max(0, measure.scrollHeight - measure.clientHeight + totalHeight) + \"px\";\n      } else {\n        this.vert.style.display = \"\";\n        this.vert.firstChild.style.height = \"0\";\n      }\n\n      if (needsH) {\n        this.horiz.style.display = \"block\";\n        this.horiz.style.right = needsV ? sWidth + \"px\" : \"0\";\n        this.horiz.style.left = measure.barLeft + \"px\";\n        var totalWidth = measure.viewWidth - measure.barLeft - (needsV ? sWidth : 0);\n        this.horiz.firstChild.style.width =\n          (measure.scrollWidth - measure.clientWidth + totalWidth) + \"px\";\n      } else {\n        this.horiz.style.display = \"\";\n        this.horiz.firstChild.style.width = \"0\";\n      }\n\n      if (!this.checkedOverlay && measure.clientHeight > 0) {\n        if (sWidth == 0) this.overlayHack();\n        this.checkedOverlay = true;\n      }\n\n      return {right: needsV ? sWidth : 0, bottom: needsH ? sWidth : 0};\n    },\n    setScrollLeft: function(pos) {\n      if (this.horiz.scrollLeft != pos) this.horiz.scrollLeft = pos;\n    },\n    setScrollTop: function(pos) {\n      if (this.vert.scrollTop != pos) this.vert.scrollTop = pos;\n    },\n    overlayHack: function() {\n      var w = mac && !mac_geMountainLion ? \"12px\" : \"18px\";\n      this.horiz.style.minHeight = this.vert.style.minWidth = w;\n      var self = this;\n      var barMouseDown = function(e) {\n        if (e_target(e) != self.vert && e_target(e) != self.horiz)\n          operation(self.cm, onMouseDown)(e);\n      };\n      on(this.vert, \"mousedown\", barMouseDown);\n      on(this.horiz, \"mousedown\", barMouseDown);\n    },\n    clear: function() {\n      var parent = this.horiz.parentNode;\n      parent.removeChild(this.horiz);\n      parent.removeChild(this.vert);\n    }\n  }, NativeScrollbars.prototype);\n\n  function NullScrollbars() {}\n\n  NullScrollbars.prototype = copyObj({\n    update: function() { return {bottom: 0, right: 0}; },\n    setScrollLeft: function() {},\n    setScrollTop: function() {},\n    clear: function() {}\n  }, NullScrollbars.prototype);\n\n  CodeMirror.scrollbarModel = {\"native\": NativeScrollbars, \"null\": NullScrollbars};\n\n  function initScrollbars(cm) {\n    if (cm.display.scrollbars) {\n      cm.display.scrollbars.clear();\n      if (cm.display.scrollbars.addClass)\n        rmClass(cm.display.wrapper, cm.display.scrollbars.addClass);\n    }\n\n    cm.display.scrollbars = new CodeMirror.scrollbarModel[cm.options.scrollbarStyle](function(node) {\n      cm.display.wrapper.insertBefore(node, cm.display.scrollbarFiller);\n      // Prevent clicks in the scrollbars from killing focus\n      on(node, \"mousedown\", function() {\n        if (cm.state.focused) setTimeout(function() { cm.display.input.focus(); }, 0);\n      });\n      node.setAttribute(\"cm-not-content\", \"true\");\n    }, function(pos, axis) {\n      if (axis == \"horizontal\") setScrollLeft(cm, pos);\n      else setScrollTop(cm, pos);\n    }, cm);\n    if (cm.display.scrollbars.addClass)\n      addClass(cm.display.wrapper, cm.display.scrollbars.addClass);\n  }\n\n  function updateScrollbars(cm, measure) {\n    if (!measure) measure = measureForScrollbars(cm);\n    var startWidth = cm.display.barWidth, startHeight = cm.display.barHeight;\n    updateScrollbarsInner(cm, measure);\n    for (var i = 0; i < 4 && startWidth != cm.display.barWidth || startHeight != cm.display.barHeight; i++) {\n      if (startWidth != cm.display.barWidth && cm.options.lineWrapping)\n        updateHeightsInViewport(cm);\n      updateScrollbarsInner(cm, measureForScrollbars(cm));\n      startWidth = cm.display.barWidth; startHeight = cm.display.barHeight;\n    }\n  }\n\n  // Re-synchronize the fake scrollbars with the actual size of the\n  // content.\n  function updateScrollbarsInner(cm, measure) {\n    var d = cm.display;\n    var sizes = d.scrollbars.update(measure);\n\n    d.sizer.style.paddingRight = (d.barWidth = sizes.right) + \"px\";\n    d.sizer.style.paddingBottom = (d.barHeight = sizes.bottom) + \"px\";\n\n    if (sizes.right && sizes.bottom) {\n      d.scrollbarFiller.style.display = \"block\";\n      d.scrollbarFiller.style.height = sizes.bottom + \"px\";\n      d.scrollbarFiller.style.width = sizes.right + \"px\";\n    } else d.scrollbarFiller.style.display = \"\";\n    if (sizes.bottom && cm.options.coverGutterNextToScrollbar && cm.options.fixedGutter) {\n      d.gutterFiller.style.display = \"block\";\n      d.gutterFiller.style.height = sizes.bottom + \"px\";\n      d.gutterFiller.style.width = measure.gutterWidth + \"px\";\n    } else d.gutterFiller.style.display = \"\";\n  }\n\n  // Compute the lines that are visible in a given viewport (defaults\n  // the the current scroll position). viewport may contain top,\n  // height, and ensure (see op.scrollToPos) properties.\n  function visibleLines(display, doc, viewport) {\n    var top = viewport && viewport.top != null ? Math.max(0, viewport.top) : display.scroller.scrollTop;\n    top = Math.floor(top - paddingTop(display));\n    var bottom = viewport && viewport.bottom != null ? viewport.bottom : top + display.wrapper.clientHeight;\n\n    var from = lineAtHeight(doc, top), to = lineAtHeight(doc, bottom);\n    // Ensure is a {from: {line, ch}, to: {line, ch}} object, and\n    // forces those lines into the viewport (if possible).\n    if (viewport && viewport.ensure) {\n      var ensureFrom = viewport.ensure.from.line, ensureTo = viewport.ensure.to.line;\n      if (ensureFrom < from) {\n        from = ensureFrom;\n        to = lineAtHeight(doc, heightAtLine(getLine(doc, ensureFrom)) + display.wrapper.clientHeight);\n      } else if (Math.min(ensureTo, doc.lastLine()) >= to) {\n        from = lineAtHeight(doc, heightAtLine(getLine(doc, ensureTo)) - display.wrapper.clientHeight);\n        to = ensureTo;\n      }\n    }\n    return {from: from, to: Math.max(to, from + 1)};\n  }\n\n  // LINE NUMBERS\n\n  // Re-align line numbers and gutter marks to compensate for\n  // horizontal scrolling.\n  function alignHorizontally(cm) {\n    var display = cm.display, view = display.view;\n    if (!display.alignWidgets && (!display.gutters.firstChild || !cm.options.fixedGutter)) return;\n    var comp = compensateForHScroll(display) - display.scroller.scrollLeft + cm.doc.scrollLeft;\n    var gutterW = display.gutters.offsetWidth, left = comp + \"px\";\n    for (var i = 0; i < view.length; i++) if (!view[i].hidden) {\n      if (cm.options.fixedGutter && view[i].gutter)\n        view[i].gutter.style.left = left;\n      var align = view[i].alignable;\n      if (align) for (var j = 0; j < align.length; j++)\n        align[j].style.left = left;\n    }\n    if (cm.options.fixedGutter)\n      display.gutters.style.left = (comp + gutterW) + \"px\";\n  }\n\n  // Used to ensure that the line number gutter is still the right\n  // size for the current document size. Returns true when an update\n  // is needed.\n  function maybeUpdateLineNumberWidth(cm) {\n    if (!cm.options.lineNumbers) return false;\n    var doc = cm.doc, last = lineNumberFor(cm.options, doc.first + doc.size - 1), display = cm.display;\n    if (last.length != display.lineNumChars) {\n      var test = display.measure.appendChild(elt(\"div\", [elt(\"div\", last)],\n                                                 \"CodeMirror-linenumber CodeMirror-gutter-elt\"));\n      var innerW = test.firstChild.offsetWidth, padding = test.offsetWidth - innerW;\n      display.lineGutter.style.width = \"\";\n      display.lineNumInnerWidth = Math.max(innerW, display.lineGutter.offsetWidth - padding);\n      display.lineNumWidth = display.lineNumInnerWidth + padding;\n      display.lineNumChars = display.lineNumInnerWidth ? last.length : -1;\n      display.lineGutter.style.width = display.lineNumWidth + \"px\";\n      updateGutterSpace(cm);\n      return true;\n    }\n    return false;\n  }\n\n  function lineNumberFor(options, i) {\n    return String(options.lineNumberFormatter(i + options.firstLineNumber));\n  }\n\n  // Computes display.scroller.scrollLeft + display.gutters.offsetWidth,\n  // but using getBoundingClientRect to get a sub-pixel-accurate\n  // result.\n  function compensateForHScroll(display) {\n    return display.scroller.getBoundingClientRect().left - display.sizer.getBoundingClientRect().left;\n  }\n\n  // DISPLAY DRAWING\n\n  function DisplayUpdate(cm, viewport, force) {\n    var display = cm.display;\n\n    this.viewport = viewport;\n    // Store some values that we'll need later (but don't want to force a relayout for)\n    this.visible = visibleLines(display, cm.doc, viewport);\n    this.editorIsHidden = !display.wrapper.offsetWidth;\n    this.wrapperHeight = display.wrapper.clientHeight;\n    this.wrapperWidth = display.wrapper.clientWidth;\n    this.oldDisplayWidth = displayWidth(cm);\n    this.force = force;\n    this.dims = getDimensions(cm);\n    this.events = [];\n  }\n\n  DisplayUpdate.prototype.signal = function(emitter, type) {\n    if (hasHandler(emitter, type))\n      this.events.push(arguments);\n  };\n  DisplayUpdate.prototype.finish = function() {\n    for (var i = 0; i < this.events.length; i++)\n      signal.apply(null, this.events[i]);\n  };\n\n  function maybeClipScrollbars(cm) {\n    var display = cm.display;\n    if (!display.scrollbarsClipped && display.scroller.offsetWidth) {\n      display.nativeBarWidth = display.scroller.offsetWidth - display.scroller.clientWidth;\n      display.heightForcer.style.height = scrollGap(cm) + \"px\";\n      display.sizer.style.marginBottom = -display.nativeBarWidth + \"px\";\n      display.sizer.style.borderRightWidth = scrollGap(cm) + \"px\";\n      display.scrollbarsClipped = true;\n    }\n  }\n\n  // Does the actual updating of the line display. Bails out\n  // (returning false) when there is nothing to be done and forced is\n  // false.\n  function updateDisplayIfNeeded(cm, update) {\n    var display = cm.display, doc = cm.doc;\n\n    if (update.editorIsHidden) {\n      resetView(cm);\n      return false;\n    }\n\n    // Bail out if the visible area is already rendered and nothing changed.\n    if (!update.force &&\n        update.visible.from >= display.viewFrom && update.visible.to <= display.viewTo &&\n        (display.updateLineNumbers == null || display.updateLineNumbers >= display.viewTo) &&\n        display.renderedView == display.view && countDirtyView(cm) == 0)\n      return false;\n\n    if (maybeUpdateLineNumberWidth(cm)) {\n      resetView(cm);\n      update.dims = getDimensions(cm);\n    }\n\n    // Compute a suitable new viewport (from & to)\n    var end = doc.first + doc.size;\n    var from = Math.max(update.visible.from - cm.options.viewportMargin, doc.first);\n    var to = Math.min(end, update.visible.to + cm.options.viewportMargin);\n    if (display.viewFrom < from && from - display.viewFrom < 20) from = Math.max(doc.first, display.viewFrom);\n    if (display.viewTo > to && display.viewTo - to < 20) to = Math.min(end, display.viewTo);\n    if (sawCollapsedSpans) {\n      from = visualLineNo(cm.doc, from);\n      to = visualLineEndNo(cm.doc, to);\n    }\n\n    var different = from != display.viewFrom || to != display.viewTo ||\n      display.lastWrapHeight != update.wrapperHeight || display.lastWrapWidth != update.wrapperWidth;\n    adjustView(cm, from, to);\n\n    display.viewOffset = heightAtLine(getLine(cm.doc, display.viewFrom));\n    // Position the mover div to align with the current scroll position\n    cm.display.mover.style.top = display.viewOffset + \"px\";\n\n    var toUpdate = countDirtyView(cm);\n    if (!different && toUpdate == 0 && !update.force && display.renderedView == display.view &&\n        (display.updateLineNumbers == null || display.updateLineNumbers >= display.viewTo))\n      return false;\n\n    // For big changes, we hide the enclosing element during the\n    // update, since that speeds up the operations on most browsers.\n    var focused = activeElt();\n    if (toUpdate > 4) display.lineDiv.style.display = \"none\";\n    patchDisplay(cm, display.updateLineNumbers, update.dims);\n    if (toUpdate > 4) display.lineDiv.style.display = \"\";\n    display.renderedView = display.view;\n    // There might have been a widget with a focused element that got\n    // hidden or updated, if so re-focus it.\n    if (focused && activeElt() != focused && focused.offsetHeight) focused.focus();\n\n    // Prevent selection and cursors from interfering with the scroll\n    // width and height.\n    removeChildren(display.cursorDiv);\n    removeChildren(display.selectionDiv);\n    display.gutters.style.height = 0;\n\n    if (different) {\n      display.lastWrapHeight = update.wrapperHeight;\n      display.lastWrapWidth = update.wrapperWidth;\n      startWorker(cm, 400);\n    }\n\n    display.updateLineNumbers = null;\n\n    return true;\n  }\n\n  function postUpdateDisplay(cm, update) {\n    var force = update.force, viewport = update.viewport;\n    for (var first = true;; first = false) {\n      if (first && cm.options.lineWrapping && update.oldDisplayWidth != displayWidth(cm)) {\n        force = true;\n      } else {\n        force = false;\n        // Clip forced viewport to actual scrollable area.\n        if (viewport && viewport.top != null)\n          viewport = {top: Math.min(cm.doc.height + paddingVert(cm.display) - displayHeight(cm), viewport.top)};\n        // Updated line heights might result in the drawn area not\n        // actually covering the viewport. Keep looping until it does.\n        update.visible = visibleLines(cm.display, cm.doc, viewport);\n        if (update.visible.from >= cm.display.viewFrom && update.visible.to <= cm.display.viewTo)\n          break;\n      }\n      if (!updateDisplayIfNeeded(cm, update)) break;\n      updateHeightsInViewport(cm);\n      var barMeasure = measureForScrollbars(cm);\n      updateSelection(cm);\n      setDocumentHeight(cm, barMeasure);\n      updateScrollbars(cm, barMeasure);\n    }\n\n    update.signal(cm, \"update\", cm);\n    if (cm.display.viewFrom != cm.display.reportedViewFrom || cm.display.viewTo != cm.display.reportedViewTo) {\n      update.signal(cm, \"viewportChange\", cm, cm.display.viewFrom, cm.display.viewTo);\n      cm.display.reportedViewFrom = cm.display.viewFrom; cm.display.reportedViewTo = cm.display.viewTo;\n    }\n  }\n\n  function updateDisplaySimple(cm, viewport) {\n    var update = new DisplayUpdate(cm, viewport);\n    if (updateDisplayIfNeeded(cm, update)) {\n      updateHeightsInViewport(cm);\n      postUpdateDisplay(cm, update);\n      var barMeasure = measureForScrollbars(cm);\n      updateSelection(cm);\n      setDocumentHeight(cm, barMeasure);\n      updateScrollbars(cm, barMeasure);\n      update.finish();\n    }\n  }\n\n  function setDocumentHeight(cm, measure) {\n    cm.display.sizer.style.minHeight = measure.docHeight + \"px\";\n    var total = measure.docHeight + cm.display.barHeight;\n    cm.display.heightForcer.style.top = total + \"px\";\n    cm.display.gutters.style.height = Math.max(total + scrollGap(cm), measure.clientHeight) + \"px\";\n  }\n\n  // Read the actual heights of the rendered lines, and update their\n  // stored heights to match.\n  function updateHeightsInViewport(cm) {\n    var display = cm.display;\n    var prevBottom = display.lineDiv.offsetTop;\n    for (var i = 0; i < display.view.length; i++) {\n      var cur = display.view[i], height;\n      if (cur.hidden) continue;\n      if (ie && ie_version < 8) {\n        var bot = cur.node.offsetTop + cur.node.offsetHeight;\n        height = bot - prevBottom;\n        prevBottom = bot;\n      } else {\n        var box = cur.node.getBoundingClientRect();\n        height = box.bottom - box.top;\n      }\n      var diff = cur.line.height - height;\n      if (height < 2) height = textHeight(display);\n      if (diff > .001 || diff < -.001) {\n        updateLineHeight(cur.line, height);\n        updateWidgetHeight(cur.line);\n        if (cur.rest) for (var j = 0; j < cur.rest.length; j++)\n          updateWidgetHeight(cur.rest[j]);\n      }\n    }\n  }\n\n  // Read and store the height of line widgets associated with the\n  // given line.\n  function updateWidgetHeight(line) {\n    if (line.widgets) for (var i = 0; i < line.widgets.length; ++i)\n      line.widgets[i].height = line.widgets[i].node.offsetHeight;\n  }\n\n  // Do a bulk-read of the DOM positions and sizes needed to draw the\n  // view, so that we don't interleave reading and writing to the DOM.\n  function getDimensions(cm) {\n    var d = cm.display, left = {}, width = {};\n    var gutterLeft = d.gutters.clientLeft;\n    for (var n = d.gutters.firstChild, i = 0; n; n = n.nextSibling, ++i) {\n      left[cm.options.gutters[i]] = n.offsetLeft + n.clientLeft + gutterLeft;\n      width[cm.options.gutters[i]] = n.clientWidth;\n    }\n    return {fixedPos: compensateForHScroll(d),\n            gutterTotalWidth: d.gutters.offsetWidth,\n            gutterLeft: left,\n            gutterWidth: width,\n            wrapperWidth: d.wrapper.clientWidth};\n  }\n\n  // Sync the actual display DOM structure with display.view, removing\n  // nodes for lines that are no longer in view, and creating the ones\n  // that are not there yet, and updating the ones that are out of\n  // date.\n  function patchDisplay(cm, updateNumbersFrom, dims) {\n    var display = cm.display, lineNumbers = cm.options.lineNumbers;\n    var container = display.lineDiv, cur = container.firstChild;\n\n    function rm(node) {\n      var next = node.nextSibling;\n      // Works around a throw-scroll bug in OS X Webkit\n      if (webkit && mac && cm.display.currentWheelTarget == node)\n        node.style.display = \"none\";\n      else\n        node.parentNode.removeChild(node);\n      return next;\n    }\n\n    var view = display.view, lineN = display.viewFrom;\n    // Loop over the elements in the view, syncing cur (the DOM nodes\n    // in display.lineDiv) with the view as we go.\n    for (var i = 0; i < view.length; i++) {\n      var lineView = view[i];\n      if (lineView.hidden) {\n      } else if (!lineView.node || lineView.node.parentNode != container) { // Not drawn yet\n        var node = buildLineElement(cm, lineView, lineN, dims);\n        container.insertBefore(node, cur);\n      } else { // Already drawn\n        while (cur != lineView.node) cur = rm(cur);\n        var updateNumber = lineNumbers && updateNumbersFrom != null &&\n          updateNumbersFrom <= lineN && lineView.lineNumber;\n        if (lineView.changes) {\n          if (indexOf(lineView.changes, \"gutter\") > -1) updateNumber = false;\n          updateLineForChanges(cm, lineView, lineN, dims);\n        }\n        if (updateNumber) {\n          removeChildren(lineView.lineNumber);\n          lineView.lineNumber.appendChild(document.createTextNode(lineNumberFor(cm.options, lineN)));\n        }\n        cur = lineView.node.nextSibling;\n      }\n      lineN += lineView.size;\n    }\n    while (cur) cur = rm(cur);\n  }\n\n  // When an aspect of a line changes, a string is added to\n  // lineView.changes. This updates the relevant part of the line's\n  // DOM structure.\n  function updateLineForChanges(cm, lineView, lineN, dims) {\n    for (var j = 0; j < lineView.changes.length; j++) {\n      var type = lineView.changes[j];\n      if (type == \"text\") updateLineText(cm, lineView);\n      else if (type == \"gutter\") updateLineGutter(cm, lineView, lineN, dims);\n      else if (type == \"class\") updateLineClasses(lineView);\n      else if (type == \"widget\") updateLineWidgets(cm, lineView, dims);\n    }\n    lineView.changes = null;\n  }\n\n  // Lines with gutter elements, widgets or a background class need to\n  // be wrapped, and have the extra elements added to the wrapper div\n  function ensureLineWrapped(lineView) {\n    if (lineView.node == lineView.text) {\n      lineView.node = elt(\"div\", null, null, \"position: relative\");\n      if (lineView.text.parentNode)\n        lineView.text.parentNode.replaceChild(lineView.node, lineView.text);\n      lineView.node.appendChild(lineView.text);\n      if (ie && ie_version < 8) lineView.node.style.zIndex = 2;\n    }\n    return lineView.node;\n  }\n\n  function updateLineBackground(lineView) {\n    var cls = lineView.bgClass ? lineView.bgClass + \" \" + (lineView.line.bgClass || \"\") : lineView.line.bgClass;\n    if (cls) cls += \" CodeMirror-linebackground\";\n    if (lineView.background) {\n      if (cls) lineView.background.className = cls;\n      else { lineView.background.parentNode.removeChild(lineView.background); lineView.background = null; }\n    } else if (cls) {\n      var wrap = ensureLineWrapped(lineView);\n      lineView.background = wrap.insertBefore(elt(\"div\", null, cls), wrap.firstChild);\n    }\n  }\n\n  // Wrapper around buildLineContent which will reuse the structure\n  // in display.externalMeasured when possible.\n  function getLineContent(cm, lineView) {\n    var ext = cm.display.externalMeasured;\n    if (ext && ext.line == lineView.line) {\n      cm.display.externalMeasured = null;\n      lineView.measure = ext.measure;\n      return ext.built;\n    }\n    return buildLineContent(cm, lineView);\n  }\n\n  // Redraw the line's text. Interacts with the background and text\n  // classes because the mode may output tokens that influence these\n  // classes.\n  function updateLineText(cm, lineView) {\n    var cls = lineView.text.className;\n    var built = getLineContent(cm, lineView);\n    if (lineView.text == lineView.node) lineView.node = built.pre;\n    lineView.text.parentNode.replaceChild(built.pre, lineView.text);\n    lineView.text = built.pre;\n    if (built.bgClass != lineView.bgClass || built.textClass != lineView.textClass) {\n      lineView.bgClass = built.bgClass;\n      lineView.textClass = built.textClass;\n      updateLineClasses(lineView);\n    } else if (cls) {\n      lineView.text.className = cls;\n    }\n  }\n\n  function updateLineClasses(lineView) {\n    updateLineBackground(lineView);\n    if (lineView.line.wrapClass)\n      ensureLineWrapped(lineView).className = lineView.line.wrapClass;\n    else if (lineView.node != lineView.text)\n      lineView.node.className = \"\";\n    var textClass = lineView.textClass ? lineView.textClass + \" \" + (lineView.line.textClass || \"\") : lineView.line.textClass;\n    lineView.text.className = textClass || \"\";\n  }\n\n  function updateLineGutter(cm, lineView, lineN, dims) {\n    if (lineView.gutter) {\n      lineView.node.removeChild(lineView.gutter);\n      lineView.gutter = null;\n    }\n    var markers = lineView.line.gutterMarkers;\n    if (cm.options.lineNumbers || markers) {\n      var wrap = ensureLineWrapped(lineView);\n      var gutterWrap = lineView.gutter = elt(\"div\", null, \"CodeMirror-gutter-wrapper\", \"left: \" +\n                                             (cm.options.fixedGutter ? dims.fixedPos : -dims.gutterTotalWidth) +\n                                             \"px; width: \" + dims.gutterTotalWidth + \"px\");\n      cm.display.input.setUneditable(gutterWrap);\n      wrap.insertBefore(gutterWrap, lineView.text);\n      if (lineView.line.gutterClass)\n        gutterWrap.className += \" \" + lineView.line.gutterClass;\n      if (cm.options.lineNumbers && (!markers || !markers[\"CodeMirror-linenumbers\"]))\n        lineView.lineNumber = gutterWrap.appendChild(\n          elt(\"div\", lineNumberFor(cm.options, lineN),\n              \"CodeMirror-linenumber CodeMirror-gutter-elt\",\n              \"left: \" + dims.gutterLeft[\"CodeMirror-linenumbers\"] + \"px; width: \"\n              + cm.display.lineNumInnerWidth + \"px\"));\n      if (markers) for (var k = 0; k < cm.options.gutters.length; ++k) {\n        var id = cm.options.gutters[k], found = markers.hasOwnProperty(id) && markers[id];\n        if (found)\n          gutterWrap.appendChild(elt(\"div\", [found], \"CodeMirror-gutter-elt\", \"left: \" +\n                                     dims.gutterLeft[id] + \"px; width: \" + dims.gutterWidth[id] + \"px\"));\n      }\n    }\n  }\n\n  function updateLineWidgets(cm, lineView, dims) {\n    if (lineView.alignable) lineView.alignable = null;\n    for (var node = lineView.node.firstChild, next; node; node = next) {\n      var next = node.nextSibling;\n      if (node.className == \"CodeMirror-linewidget\")\n        lineView.node.removeChild(node);\n    }\n    insertLineWidgets(cm, lineView, dims);\n  }\n\n  // Build a line's DOM representation from scratch\n  function buildLineElement(cm, lineView, lineN, dims) {\n    var built = getLineContent(cm, lineView);\n    lineView.text = lineView.node = built.pre;\n    if (built.bgClass) lineView.bgClass = built.bgClass;\n    if (built.textClass) lineView.textClass = built.textClass;\n\n    updateLineClasses(lineView);\n    updateLineGutter(cm, lineView, lineN, dims);\n    insertLineWidgets(cm, lineView, dims);\n    return lineView.node;\n  }\n\n  // A lineView may contain multiple logical lines (when merged by\n  // collapsed spans). The widgets for all of them need to be drawn.\n  function insertLineWidgets(cm, lineView, dims) {\n    insertLineWidgetsFor(cm, lineView.line, lineView, dims, true);\n    if (lineView.rest) for (var i = 0; i < lineView.rest.length; i++)\n      insertLineWidgetsFor(cm, lineView.rest[i], lineView, dims, false);\n  }\n\n  function insertLineWidgetsFor(cm, line, lineView, dims, allowAbove) {\n    if (!line.widgets) return;\n    var wrap = ensureLineWrapped(lineView);\n    for (var i = 0, ws = line.widgets; i < ws.length; ++i) {\n      var widget = ws[i], node = elt(\"div\", [widget.node], \"CodeMirror-linewidget\");\n      if (!widget.handleMouseEvents) node.setAttribute(\"cm-ignore-events\", \"true\");\n      positionLineWidget(widget, node, lineView, dims);\n      cm.display.input.setUneditable(node);\n      if (allowAbove && widget.above)\n        wrap.insertBefore(node, lineView.gutter || lineView.text);\n      else\n        wrap.appendChild(node);\n      signalLater(widget, \"redraw\");\n    }\n  }\n\n  function positionLineWidget(widget, node, lineView, dims) {\n    if (widget.noHScroll) {\n      (lineView.alignable || (lineView.alignable = [])).push(node);\n      var width = dims.wrapperWidth;\n      node.style.left = dims.fixedPos + \"px\";\n      if (!widget.coverGutter) {\n        width -= dims.gutterTotalWidth;\n        node.style.paddingLeft = dims.gutterTotalWidth + \"px\";\n      }\n      node.style.width = width + \"px\";\n    }\n    if (widget.coverGutter) {\n      node.style.zIndex = 5;\n      node.style.position = \"relative\";\n      if (!widget.noHScroll) node.style.marginLeft = -dims.gutterTotalWidth + \"px\";\n    }\n  }\n\n  // POSITION OBJECT\n\n  // A Pos instance represents a position within the text.\n  var Pos = CodeMirror.Pos = function(line, ch) {\n    if (!(this instanceof Pos)) return new Pos(line, ch);\n    this.line = line; this.ch = ch;\n  };\n\n  // Compare two positions, return 0 if they are the same, a negative\n  // number when a is less, and a positive number otherwise.\n  var cmp = CodeMirror.cmpPos = function(a, b) { return a.line - b.line || a.ch - b.ch; };\n\n  function copyPos(x) {return Pos(x.line, x.ch);}\n  function maxPos(a, b) { return cmp(a, b) < 0 ? b : a; }\n  function minPos(a, b) { return cmp(a, b) < 0 ? a : b; }\n\n  // INPUT HANDLING\n\n  function ensureFocus(cm) {\n    if (!cm.state.focused) { cm.display.input.focus(); onFocus(cm); }\n  }\n\n  function isReadOnly(cm) {\n    return cm.options.readOnly || cm.doc.cantEdit;\n  }\n\n  // This will be set to an array of strings when copying, so that,\n  // when pasting, we know what kind of selections the copied text\n  // was made out of.\n  var lastCopied = null;\n\n  function applyTextInput(cm, inserted, deleted, sel) {\n    var doc = cm.doc;\n    cm.display.shift = false;\n    if (!sel) sel = doc.sel;\n\n    var textLines = splitLines(inserted), multiPaste = null;\n    // When pasing N lines into N selections, insert one line per selection\n    if (cm.state.pasteIncoming && sel.ranges.length > 1) {\n      if (lastCopied && lastCopied.join(\"\\n\") == inserted)\n        multiPaste = sel.ranges.length % lastCopied.length == 0 && map(lastCopied, splitLines);\n      else if (textLines.length == sel.ranges.length)\n        multiPaste = map(textLines, function(l) { return [l]; });\n    }\n\n    // Normal behavior is to insert the new text into every selection\n    for (var i = sel.ranges.length - 1; i >= 0; i--) {\n      var range = sel.ranges[i];\n      var from = range.from(), to = range.to();\n      if (range.empty()) {\n        if (deleted && deleted > 0) // Handle deletion\n          from = Pos(from.line, from.ch - deleted);\n        else if (cm.state.overwrite && !cm.state.pasteIncoming) // Handle overwrite\n          to = Pos(to.line, Math.min(getLine(doc, to.line).text.length, to.ch + lst(textLines).length));\n      }\n      var updateInput = cm.curOp.updateInput;\n      var changeEvent = {from: from, to: to, text: multiPaste ? multiPaste[i % multiPaste.length] : textLines,\n                         origin: cm.state.pasteIncoming ? \"paste\" : cm.state.cutIncoming ? \"cut\" : \"+input\"};\n      makeChange(cm.doc, changeEvent);\n      signalLater(cm, \"inputRead\", cm, changeEvent);\n      // When an 'electric' character is inserted, immediately trigger a reindent\n      if (inserted && !cm.state.pasteIncoming && cm.options.electricChars &&\n          cm.options.smartIndent && range.head.ch < 100 &&\n          (!i || sel.ranges[i - 1].head.line != range.head.line)) {\n        var mode = cm.getModeAt(range.head);\n        var end = changeEnd(changeEvent);\n        if (mode.electricChars) {\n          for (var j = 0; j < mode.electricChars.length; j++)\n            if (inserted.indexOf(mode.electricChars.charAt(j)) > -1) {\n              indentLine(cm, end.line, \"smart\");\n              break;\n            }\n        } else if (mode.electricInput) {\n          if (mode.electricInput.test(getLine(doc, end.line).text.slice(0, end.ch)))\n            indentLine(cm, end.line, \"smart\");\n        }\n      }\n    }\n    ensureCursorVisible(cm);\n    cm.curOp.updateInput = updateInput;\n    cm.curOp.typing = true;\n    cm.state.pasteIncoming = cm.state.cutIncoming = false;\n  }\n\n  function copyableRanges(cm) {\n    var text = [], ranges = [];\n    for (var i = 0; i < cm.doc.sel.ranges.length; i++) {\n      var line = cm.doc.sel.ranges[i].head.line;\n      var lineRange = {anchor: Pos(line, 0), head: Pos(line + 1, 0)};\n      ranges.push(lineRange);\n      text.push(cm.getRange(lineRange.anchor, lineRange.head));\n    }\n    return {text: text, ranges: ranges};\n  }\n\n  function disableBrowserMagic(field) {\n    field.setAttribute(\"autocorrect\", \"off\");\n    field.setAttribute(\"autocapitalize\", \"off\");\n    field.setAttribute(\"spellcheck\", \"false\");\n  }\n\n  // TEXTAREA INPUT STYLE\n\n  function TextareaInput(cm) {\n    this.cm = cm;\n    // See input.poll and input.reset\n    this.prevInput = \"\";\n\n    // Flag that indicates whether we expect input to appear real soon\n    // now (after some event like 'keypress' or 'input') and are\n    // polling intensively.\n    this.pollingFast = false;\n    // Self-resetting timeout for the poller\n    this.polling = new Delayed();\n    // Tracks when input.reset has punted to just putting a short\n    // string into the textarea instead of the full selection.\n    this.inaccurateSelection = false;\n    // Used to work around IE issue with selection being forgotten when focus moves away from textarea\n    this.hasSelection = false;\n  };\n\n  function hiddenTextarea() {\n    var te = elt(\"textarea\", null, null, \"position: absolute; padding: 0; width: 1px; height: 1em; outline: none\");\n    var div = elt(\"div\", [te], null, \"overflow: hidden; position: relative; width: 3px; height: 0px;\");\n    // The textarea is kept positioned near the cursor to prevent the\n    // fact that it'll be scrolled into view on input from scrolling\n    // our fake cursor out of view. On webkit, when wrap=off, paste is\n    // very slow. So make the area wide instead.\n    if (webkit) te.style.width = \"1000px\";\n    else te.setAttribute(\"wrap\", \"off\");\n    // If border: 0; -- iOS fails to open keyboard (issue #1287)\n    if (ios) te.style.border = \"1px solid black\";\n    disableBrowserMagic(te);\n    return div;\n  }\n\n  TextareaInput.prototype = copyObj({\n    init: function(display) {\n      var input = this, cm = this.cm;\n\n      // Wraps and hides input textarea\n      var div = this.wrapper = hiddenTextarea();\n      // The semihidden textarea that is focused when the editor is\n      // focused, and receives input.\n      var te = this.textarea = div.firstChild;\n      display.wrapper.insertBefore(div, display.wrapper.firstChild);\n\n      // Needed to hide big blue blinking cursor on Mobile Safari (doesn't seem to work in iOS 8 anymore)\n      if (ios) te.style.width = \"0px\";\n\n      on(te, \"input\", function() {\n        if (ie && ie_version >= 9 && input.hasSelection) input.hasSelection = null;\n        input.poll();\n      });\n\n      on(te, \"paste\", function() {\n        // Workaround for webkit bug https://bugs.webkit.org/show_bug.cgi?id=90206\n        // Add a char to the end of textarea before paste occur so that\n        // selection doesn't span to the end of textarea.\n        if (webkit && !cm.state.fakedLastChar && !(new Date - cm.state.lastMiddleDown < 200)) {\n          var start = te.selectionStart, end = te.selectionEnd;\n          te.value += \"$\";\n          // The selection end needs to be set before the start, otherwise there\n          // can be an intermediate non-empty selection between the two, which\n          // can override the middle-click paste buffer on linux and cause the\n          // wrong thing to get pasted.\n          te.selectionEnd = end;\n          te.selectionStart = start;\n          cm.state.fakedLastChar = true;\n        }\n        cm.state.pasteIncoming = true;\n        input.fastPoll();\n      });\n\n      function prepareCopyCut(e) {\n        if (cm.somethingSelected()) {\n          lastCopied = cm.getSelections();\n          if (input.inaccurateSelection) {\n            input.prevInput = \"\";\n            input.inaccurateSelection = false;\n            te.value = lastCopied.join(\"\\n\");\n            selectInput(te);\n          }\n        } else {\n          var ranges = copyableRanges(cm);\n          lastCopied = ranges.text;\n          if (e.type == \"cut\") {\n            cm.setSelections(ranges.ranges, null, sel_dontScroll);\n          } else {\n            input.prevInput = \"\";\n            te.value = ranges.text.join(\"\\n\");\n            selectInput(te);\n          }\n        }\n        if (e.type == \"cut\") cm.state.cutIncoming = true;\n      }\n      on(te, \"cut\", prepareCopyCut);\n      on(te, \"copy\", prepareCopyCut);\n\n      on(display.scroller, \"paste\", function(e) {\n        if (eventInWidget(display, e)) return;\n        cm.state.pasteIncoming = true;\n        input.focus();\n      });\n\n      // Prevent normal selection in the editor (we handle our own)\n      on(display.lineSpace, \"selectstart\", function(e) {\n        if (!eventInWidget(display, e)) e_preventDefault(e);\n      });\n    },\n\n    prepareSelection: function() {\n      // Redraw the selection and/or cursor\n      var cm = this.cm, display = cm.display, doc = cm.doc;\n      var result = prepareSelection(cm);\n\n      // Move the hidden textarea near the cursor to prevent scrolling artifacts\n      if (cm.options.moveInputWithCursor) {\n        var headPos = cursorCoords(cm, doc.sel.primary().head, \"div\");\n        var wrapOff = display.wrapper.getBoundingClientRect(), lineOff = display.lineDiv.getBoundingClientRect();\n        result.teTop = Math.max(0, Math.min(display.wrapper.clientHeight - 10,\n                                            headPos.top + lineOff.top - wrapOff.top));\n        result.teLeft = Math.max(0, Math.min(display.wrapper.clientWidth - 10,\n                                             headPos.left + lineOff.left - wrapOff.left));\n      }\n\n      return result;\n    },\n\n    showSelection: function(drawn) {\n      var cm = this.cm, display = cm.display;\n      removeChildrenAndAdd(display.cursorDiv, drawn.cursors);\n      removeChildrenAndAdd(display.selectionDiv, drawn.selection);\n      if (drawn.teTop != null) {\n        this.wrapper.style.top = drawn.teTop + \"px\";\n        this.wrapper.style.left = drawn.teLeft + \"px\";\n      }\n    },\n\n    // Reset the input to correspond to the selection (or to be empty,\n    // when not typing and nothing is selected)\n    reset: function(typing) {\n      if (this.contextMenuPending) return;\n      var minimal, selected, cm = this.cm, doc = cm.doc;\n      if (cm.somethingSelected()) {\n        this.prevInput = \"\";\n        var range = doc.sel.primary();\n        minimal = hasCopyEvent &&\n          (range.to().line - range.from().line > 100 || (selected = cm.getSelection()).length > 1000);\n        var content = minimal ? \"-\" : selected || cm.getSelection();\n        this.textarea.value = content;\n        if (cm.state.focused) selectInput(this.textarea);\n        if (ie && ie_version >= 9) this.hasSelection = content;\n      } else if (!typing) {\n        this.prevInput = this.textarea.value = \"\";\n        if (ie && ie_version >= 9) this.hasSelection = null;\n      }\n      this.inaccurateSelection = minimal;\n    },\n\n    getField: function() { return this.textarea; },\n\n    supportsTouch: function() { return false; },\n\n    focus: function() {\n      if (this.cm.options.readOnly != \"nocursor\" && (!mobile || activeElt() != this.textarea)) {\n        try { this.textarea.focus(); }\n        catch (e) {} // IE8 will throw if the textarea is display: none or not in DOM\n      }\n    },\n\n    blur: function() { this.textarea.blur(); },\n\n    resetPosition: function() {\n      this.wrapper.style.top = this.wrapper.style.left = 0;\n    },\n\n    receivedFocus: function() { this.slowPoll(); },\n\n    // Poll for input changes, using the normal rate of polling. This\n    // runs as long as the editor is focused.\n    slowPoll: function() {\n      var input = this;\n      if (input.pollingFast) return;\n      input.polling.set(this.cm.options.pollInterval, function() {\n        input.poll();\n        if (input.cm.state.focused) input.slowPoll();\n      });\n    },\n\n    // When an event has just come in that is likely to add or change\n    // something in the input textarea, we poll faster, to ensure that\n    // the change appears on the screen quickly.\n    fastPoll: function() {\n      var missed = false, input = this;\n      input.pollingFast = true;\n      function p() {\n        var changed = input.poll();\n        if (!changed && !missed) {missed = true; input.polling.set(60, p);}\n        else {input.pollingFast = false; input.slowPoll();}\n      }\n      input.polling.set(20, p);\n    },\n\n    // Read input from the textarea, and update the document to match.\n    // When something is selected, it is present in the textarea, and\n    // selected (unless it is huge, in which case a placeholder is\n    // used). When nothing is selected, the cursor sits after previously\n    // seen text (can be empty), which is stored in prevInput (we must\n    // not reset the textarea when typing, because that breaks IME).\n    poll: function() {\n      var cm = this.cm, input = this.textarea, prevInput = this.prevInput;\n      // Since this is called a *lot*, try to bail out as cheaply as\n      // possible when it is clear that nothing happened. hasSelection\n      // will be the case when there is a lot of text in the textarea,\n      // in which case reading its value would be expensive.\n      if (!cm.state.focused || (hasSelection(input) && !prevInput) ||\n          isReadOnly(cm) || cm.options.disableInput || cm.state.keySeq)\n        return false;\n      // See paste handler for more on the fakedLastChar kludge\n      if (cm.state.pasteIncoming && cm.state.fakedLastChar) {\n        input.value = input.value.substring(0, input.value.length - 1);\n        cm.state.fakedLastChar = false;\n      }\n      var text = input.value;\n      // If nothing changed, bail.\n      if (text == prevInput && !cm.somethingSelected()) return false;\n      // Work around nonsensical selection resetting in IE9/10, and\n      // inexplicable appearance of private area unicode characters on\n      // some key combos in Mac (#2689).\n      if (ie && ie_version >= 9 && this.hasSelection === text ||\n          mac && /[\\uf700-\\uf7ff]/.test(text)) {\n        cm.display.input.reset();\n        return false;\n      }\n\n      if (text.charCodeAt(0) == 0x200b && cm.doc.sel == cm.display.selForContextMenu && !prevInput)\n        prevInput = \"\\u200b\";\n      // Find the part of the input that is actually new\n      var same = 0, l = Math.min(prevInput.length, text.length);\n      while (same < l && prevInput.charCodeAt(same) == text.charCodeAt(same)) ++same;\n\n      var self = this;\n      runInOp(cm, function() {\n        applyTextInput(cm, text.slice(same), prevInput.length - same);\n\n        // Don't leave long text in the textarea, since it makes further polling slow\n        if (text.length > 1000 || text.indexOf(\"\\n\") > -1) input.value = self.prevInput = \"\";\n        else self.prevInput = text;\n      });\n      return true;\n    },\n\n    ensurePolled: function() {\n      if (this.pollingFast && this.poll()) this.pollingFast = false;\n    },\n\n    onKeyPress: function() {\n      if (ie && ie_version >= 9) this.hasSelection = null;\n      this.fastPoll();\n    },\n\n    onContextMenu: function(e) {\n      var input = this, cm = input.cm, display = cm.display, te = input.textarea;\n      var pos = posFromMouse(cm, e), scrollPos = display.scroller.scrollTop;\n      if (!pos || presto) return; // Opera is difficult.\n\n      // Reset the current text selection only if the click is done outside of the selection\n      // and 'resetSelectionOnContextMenu' option is true.\n      var reset = cm.options.resetSelectionOnContextMenu;\n      if (reset && cm.doc.sel.contains(pos) == -1)\n        operation(cm, setSelection)(cm.doc, simpleSelection(pos), sel_dontScroll);\n\n      var oldCSS = te.style.cssText;\n      input.wrapper.style.position = \"absolute\";\n      te.style.cssText = \"position: fixed; width: 30px; height: 30px; top: \" + (e.clientY - 5) +\n        \"px; left: \" + (e.clientX - 5) + \"px; z-index: 1000; background: \" +\n        (ie ? \"rgba(255, 255, 255, .05)\" : \"transparent\") +\n        \"; outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);\";\n      if (webkit) var oldScrollY = window.scrollY; // Work around Chrome issue (#2712)\n      display.input.focus();\n      if (webkit) window.scrollTo(null, oldScrollY);\n      display.input.reset();\n      // Adds \"Select all\" to context menu in FF\n      if (!cm.somethingSelected()) te.value = input.prevInput = \" \";\n      input.contextMenuPending = true;\n      display.selForContextMenu = cm.doc.sel;\n      clearTimeout(display.detectingSelectAll);\n\n      // Select-all will be greyed out if there's nothing to select, so\n      // this adds a zero-width space so that we can later check whether\n      // it got selected.\n      function prepareSelectAllHack() {\n        if (te.selectionStart != null) {\n          var selected = cm.somethingSelected();\n          var extval = te.value = \"\\u200b\" + (selected ? te.value : \"\");\n          input.prevInput = selected ? \"\" : \"\\u200b\";\n          te.selectionStart = 1; te.selectionEnd = extval.length;\n          // Re-set this, in case some other handler touched the\n          // selection in the meantime.\n          display.selForContextMenu = cm.doc.sel;\n        }\n      }\n      function rehide() {\n        input.contextMenuPending = false;\n        input.wrapper.style.position = \"relative\";\n        te.style.cssText = oldCSS;\n        if (ie && ie_version < 9) display.scrollbars.setScrollTop(display.scroller.scrollTop = scrollPos);\n\n        // Try to detect the user choosing select-all\n        if (te.selectionStart != null) {\n          if (!ie || (ie && ie_version < 9)) prepareSelectAllHack();\n          var i = 0, poll = function() {\n            if (display.selForContextMenu == cm.doc.sel && te.selectionStart == 0)\n              operation(cm, commands.selectAll)(cm);\n            else if (i++ < 10) display.detectingSelectAll = setTimeout(poll, 500);\n            else display.input.reset();\n          };\n          display.detectingSelectAll = setTimeout(poll, 200);\n        }\n      }\n\n      if (ie && ie_version >= 9) prepareSelectAllHack();\n      if (captureRightClick) {\n        e_stop(e);\n        var mouseup = function() {\n          off(window, \"mouseup\", mouseup);\n          setTimeout(rehide, 20);\n        };\n        on(window, \"mouseup\", mouseup);\n      } else {\n        setTimeout(rehide, 50);\n      }\n    },\n\n    setUneditable: nothing,\n\n    needsContentAttribute: false\n  }, TextareaInput.prototype);\n\n  // CONTENTEDITABLE INPUT STYLE\n\n  function ContentEditableInput(cm) {\n    this.cm = cm;\n    this.lastAnchorNode = this.lastAnchorOffset = this.lastFocusNode = this.lastFocusOffset = null;\n    this.polling = new Delayed();\n  }\n\n  ContentEditableInput.prototype = copyObj({\n    init: function(display) {\n      var input = this, cm = input.cm;\n      var div = input.div = display.lineDiv;\n      div.contentEditable = \"true\";\n      disableBrowserMagic(div);\n\n      on(div, \"paste\", function(e) {\n        var pasted = e.clipboardData && e.clipboardData.getData(\"text/plain\");\n        if (pasted) {\n          e.preventDefault();\n          cm.replaceSelection(pasted, null, \"paste\");\n        }\n      });\n\n      on(div, \"compositionstart\", function(e) {\n        var data = e.data;\n        input.composing = {sel: cm.doc.sel, data: data, startData: data};\n        if (!data) return;\n        var prim = cm.doc.sel.primary();\n        var line = cm.getLine(prim.head.line);\n        var found = line.indexOf(data, Math.max(0, prim.head.ch - data.length));\n        if (found > -1 && found <= prim.head.ch)\n          input.composing.sel = simpleSelection(Pos(prim.head.line, found),\n                                                Pos(prim.head.line, found + data.length));\n      });\n      on(div, \"compositionupdate\", function(e) {\n        input.composing.data = e.data;\n      });\n      on(div, \"compositionend\", function(e) {\n        var ours = input.composing;\n        if (!ours) return;\n        if (e.data != ours.startData && !/\\u200b/.test(e.data))\n          ours.data = e.data;\n        // Need a small delay to prevent other code (input event,\n        // selection polling) from doing damage when fired right after\n        // compositionend.\n        setTimeout(function() {\n          if (!ours.handled)\n            input.applyComposition(ours);\n          if (input.composing == ours)\n            input.composing = null;\n        }, 50);\n      });\n\n      on(div, \"touchstart\", function() {\n        input.forceCompositionEnd();\n      });\n\n      on(div, \"input\", function() {\n        if (input.composing) return;\n        if (!input.pollContent())\n          runInOp(input.cm, function() {regChange(cm);});\n      });\n\n      function onCopyCut(e) {\n        if (cm.somethingSelected()) {\n          lastCopied = cm.getSelections();\n          if (e.type == \"cut\") cm.replaceSelection(\"\", null, \"cut\");\n        } else {\n          var ranges = copyableRanges(cm);\n          lastCopied = ranges.text;\n          if (e.type == \"cut\") {\n            cm.operation(function() {\n              cm.setSelections(ranges.ranges, 0, sel_dontScroll);\n              cm.replaceSelection(\"\", null, \"cut\");\n            });\n          }\n        }\n        // iOS exposes the clipboard API, but seems to discard content inserted into it\n        if (e.clipboardData && !ios) {\n          e.preventDefault();\n          e.clipboardData.clearData();\n          e.clipboardData.setData(\"text/plain\", lastCopied.join(\"\\n\"));\n        } else {\n          // Old-fashioned briefly-focus-a-textarea hack\n          var kludge = hiddenTextarea(), te = kludge.firstChild;\n          cm.display.lineSpace.insertBefore(kludge, cm.display.lineSpace.firstChild);\n          te.value = lastCopied.join(\"\\n\");\n          var hadFocus = document.activeElement;\n          selectInput(te);\n          setTimeout(function() {\n            cm.display.lineSpace.removeChild(kludge);\n            hadFocus.focus();\n          }, 50);\n        }\n      }\n      on(div, \"copy\", onCopyCut);\n      on(div, \"cut\", onCopyCut);\n    },\n\n    prepareSelection: function() {\n      var result = prepareSelection(this.cm, false);\n      result.focus = this.cm.state.focused;\n      return result;\n    },\n\n    showSelection: function(info) {\n      if (!info || !this.cm.display.view.length) return;\n      if (info.focus) this.showPrimarySelection();\n      this.showMultipleSelections(info);\n    },\n\n    showPrimarySelection: function() {\n      var sel = window.getSelection(), prim = this.cm.doc.sel.primary();\n      var curAnchor = domToPos(this.cm, sel.anchorNode, sel.anchorOffset);\n      var curFocus = domToPos(this.cm, sel.focusNode, sel.focusOffset);\n      if (curAnchor && !curAnchor.bad && curFocus && !curFocus.bad &&\n          cmp(minPos(curAnchor, curFocus), prim.from()) == 0 &&\n          cmp(maxPos(curAnchor, curFocus), prim.to()) == 0)\n        return;\n\n      var start = posToDOM(this.cm, prim.from());\n      var end = posToDOM(this.cm, prim.to());\n      if (!start && !end) return;\n\n      var view = this.cm.display.view;\n      var old = sel.rangeCount && sel.getRangeAt(0);\n      if (!start) {\n        start = {node: view[0].measure.map[2], offset: 0};\n      } else if (!end) { // FIXME dangerously hacky\n        var measure = view[view.length - 1].measure;\n        var map = measure.maps ? measure.maps[measure.maps.length - 1] : measure.map;\n        end = {node: map[map.length - 1], offset: map[map.length - 2] - map[map.length - 3]};\n      }\n\n      try { var rng = range(start.node, start.offset, end.offset, end.node); }\n      catch(e) {} // Our model of the DOM might be outdated, in which case the range we try to set can be impossible\n      if (rng) {\n        sel.removeAllRanges();\n        sel.addRange(rng);\n        if (old && sel.anchorNode == null) sel.addRange(old);\n      }\n      this.rememberSelection();\n    },\n\n    showMultipleSelections: function(info) {\n      removeChildrenAndAdd(this.cm.display.cursorDiv, info.cursors);\n      removeChildrenAndAdd(this.cm.display.selectionDiv, info.selection);\n    },\n\n    rememberSelection: function() {\n      var sel = window.getSelection();\n      this.lastAnchorNode = sel.anchorNode; this.lastAnchorOffset = sel.anchorOffset;\n      this.lastFocusNode = sel.focusNode; this.lastFocusOffset = sel.focusOffset;\n    },\n\n    selectionInEditor: function() {\n      var sel = window.getSelection();\n      if (!sel.rangeCount) return false;\n      var node = sel.getRangeAt(0).commonAncestorContainer;\n      return contains(this.div, node);\n    },\n\n    focus: function() {\n      if (this.cm.options.readOnly != \"nocursor\") this.div.focus();\n    },\n    blur: function() { this.div.blur(); },\n    getField: function() { return this.div; },\n\n    supportsTouch: function() { return true; },\n\n    receivedFocus: function() {\n      var input = this;\n      if (this.selectionInEditor())\n        this.pollSelection();\n      else\n        runInOp(this.cm, function() { input.cm.curOp.selectionChanged = true; });\n\n      function poll() {\n        if (input.cm.state.focused) {\n          input.pollSelection();\n          input.polling.set(input.cm.options.pollInterval, poll);\n        }\n      }\n      this.polling.set(this.cm.options.pollInterval, poll);\n    },\n\n    pollSelection: function() {\n      if (this.composing) return;\n\n      var sel = window.getSelection(), cm = this.cm;\n      if (sel.anchorNode != this.lastAnchorNode || sel.anchorOffset != this.lastAnchorOffset ||\n          sel.focusNode != this.lastFocusNode || sel.focusOffset != this.lastFocusOffset) {\n        this.rememberSelection();\n        var anchor = domToPos(cm, sel.anchorNode, sel.anchorOffset);\n        var head = domToPos(cm, sel.focusNode, sel.focusOffset);\n        if (anchor && head) runInOp(cm, function() {\n          setSelection(cm.doc, simpleSelection(anchor, head), sel_dontScroll);\n          if (anchor.bad || head.bad) cm.curOp.selectionChanged = true;\n        });\n      }\n    },\n\n    pollContent: function() {\n      var cm = this.cm, display = cm.display, sel = cm.doc.sel.primary();\n      var from = sel.from(), to = sel.to();\n      if (from.line < display.viewFrom || to.line > display.viewTo - 1) return false;\n\n      var fromIndex;\n      if (from.line == display.viewFrom || (fromIndex = findViewIndex(cm, from.line)) == 0) {\n        var fromLine = lineNo(display.view[0].line);\n        var fromNode = display.view[0].node;\n      } else {\n        var fromLine = lineNo(display.view[fromIndex].line);\n        var fromNode = display.view[fromIndex - 1].node.nextSibling;\n      }\n      var toIndex = findViewIndex(cm, to.line);\n      if (toIndex == display.view.length - 1) {\n        var toLine = display.viewTo - 1;\n        var toNode = display.view[toIndex].node;\n      } else {\n        var toLine = lineNo(display.view[toIndex + 1].line) - 1;\n        var toNode = display.view[toIndex + 1].node.previousSibling;\n      }\n\n      var newText = splitLines(domTextBetween(cm, fromNode, toNode, fromLine, toLine));\n      var oldText = getBetween(cm.doc, Pos(fromLine, 0), Pos(toLine, getLine(cm.doc, toLine).text.length));\n      while (newText.length > 1 && oldText.length > 1) {\n        if (lst(newText) == lst(oldText)) { newText.pop(); oldText.pop(); toLine--; }\n        else if (newText[0] == oldText[0]) { newText.shift(); oldText.shift(); fromLine++; }\n        else break;\n      }\n\n      var cutFront = 0, cutEnd = 0;\n      var newTop = newText[0], oldTop = oldText[0], maxCutFront = Math.min(newTop.length, oldTop.length);\n      while (cutFront < maxCutFront && newTop.charCodeAt(cutFront) == oldTop.charCodeAt(cutFront))\n        ++cutFront;\n      var newBot = lst(newText), oldBot = lst(oldText);\n      var maxCutEnd = Math.min(newBot.length - (newText.length == 1 ? cutFront : 0),\n                               oldBot.length - (oldText.length == 1 ? cutFront : 0));\n      while (cutEnd < maxCutEnd &&\n             newBot.charCodeAt(newBot.length - cutEnd - 1) == oldBot.charCodeAt(oldBot.length - cutEnd - 1))\n        ++cutEnd;\n\n      newText[newText.length - 1] = newBot.slice(0, newBot.length - cutEnd);\n      newText[0] = newText[0].slice(cutFront);\n\n      var chFrom = Pos(fromLine, cutFront);\n      var chTo = Pos(toLine, oldText.length ? lst(oldText).length - cutEnd : 0);\n      if (newText.length > 1 || newText[0] || cmp(chFrom, chTo)) {\n        replaceRange(cm.doc, newText, chFrom, chTo, \"+input\");\n        return true;\n      }\n    },\n\n    ensurePolled: function() {\n      this.forceCompositionEnd();\n    },\n    reset: function() {\n      this.forceCompositionEnd();\n    },\n    forceCompositionEnd: function() {\n      if (!this.composing || this.composing.handled) return;\n      this.applyComposition(this.composing);\n      this.composing.handled = true;\n      this.div.blur();\n      this.div.focus();\n    },\n    applyComposition: function(composing) {\n      if (composing.data && composing.data != composing.startData)\n        operation(this.cm, applyTextInput)(this.cm, composing.data, 0, composing.sel);\n    },\n\n    setUneditable: function(node) {\n      node.setAttribute(\"contenteditable\", \"false\");\n    },\n\n    onKeyPress: function(e) {\n      e.preventDefault();\n      operation(this.cm, applyTextInput)(this.cm, String.fromCharCode(e.charCode == null ? e.keyCode : e.charCode), 0);\n    },\n\n    onContextMenu: nothing,\n    resetPosition: nothing,\n\n    needsContentAttribute: true\n  }, ContentEditableInput.prototype);\n\n  function posToDOM(cm, pos) {\n    var view = findViewForLine(cm, pos.line);\n    if (!view || view.hidden) return null;\n    var line = getLine(cm.doc, pos.line);\n    var info = mapFromLineView(view, line, pos.line);\n\n    var order = getOrder(line), side = \"left\";\n    if (order) {\n      var partPos = getBidiPartAt(order, pos.ch);\n      side = partPos % 2 ? \"right\" : \"left\";\n    }\n    var result = nodeAndOffsetInLineMap(info.map, pos.ch, \"left\");\n    result.offset = result.collapse == \"right\" ? result.end : result.start;\n    return result;\n  }\n\n  function badPos(pos, bad) { if (bad) pos.bad = true; return pos; }\n\n  function domToPos(cm, node, offset) {\n    var lineNode;\n    if (node == cm.display.lineDiv) {\n      lineNode = cm.display.lineDiv.childNodes[offset];\n      if (!lineNode) return badPos(cm.clipPos(Pos(cm.display.viewTo - 1)), true);\n      node = null; offset = 0;\n    } else {\n      for (lineNode = node;; lineNode = lineNode.parentNode) {\n        if (!lineNode || lineNode == cm.display.lineDiv) return null;\n        if (lineNode.parentNode && lineNode.parentNode == cm.display.lineDiv) break;\n      }\n    }\n    for (var i = 0; i < cm.display.view.length; i++) {\n      var lineView = cm.display.view[i];\n      if (lineView.node == lineNode)\n        return locateNodeInLineView(lineView, node, offset);\n    }\n  }\n\n  function locateNodeInLineView(lineView, node, offset) {\n    var wrapper = lineView.text.firstChild, bad = false;\n    if (!node || !contains(wrapper, node)) return badPos(Pos(lineNo(lineView.line), 0), true);\n    if (node == wrapper) {\n      bad = true;\n      node = wrapper.childNodes[offset];\n      offset = 0;\n      if (!node) {\n        var line = lineView.rest ? lst(lineView.rest) : lineView.line;\n        return badPos(Pos(lineNo(line), line.text.length), bad);\n      }\n    }\n\n    var textNode = node.nodeType == 3 ? node : null, topNode = node;\n    if (!textNode && node.childNodes.length == 1 && node.firstChild.nodeType == 3) {\n      textNode = node.firstChild;\n      if (offset) offset = textNode.nodeValue.length;\n    }\n    while (topNode.parentNode != wrapper) topNode = topNode.parentNode;\n    var measure = lineView.measure, maps = measure.maps;\n\n    function find(textNode, topNode, offset) {\n      for (var i = -1; i < (maps ? maps.length : 0); i++) {\n        var map = i < 0 ? measure.map : maps[i];\n        for (var j = 0; j < map.length; j += 3) {\n          var curNode = map[j + 2];\n          if (curNode == textNode || curNode == topNode) {\n            var line = lineNo(i < 0 ? lineView.line : lineView.rest[i]);\n            var ch = map[j] + offset;\n            if (offset < 0 || curNode != textNode) ch = map[j + (offset ? 1 : 0)];\n            return Pos(line, ch);\n          }\n        }\n      }\n    }\n    var found = find(textNode, topNode, offset);\n    if (found) return badPos(found, bad);\n\n    // FIXME this is all really shaky. might handle the few cases it needs to handle, but likely to cause problems\n    for (var after = topNode.nextSibling, dist = textNode ? textNode.nodeValue.length - offset : 0; after; after = after.nextSibling) {\n      found = find(after, after.firstChild, 0);\n      if (found)\n        return badPos(Pos(found.line, found.ch - dist), bad);\n      else\n        dist += after.textContent.length;\n    }\n    for (var before = topNode.previousSibling, dist = offset; before; before = before.previousSibling) {\n      found = find(before, before.firstChild, -1);\n      if (found)\n        return badPos(Pos(found.line, found.ch + dist), bad);\n      else\n        dist += after.textContent.length;\n    }\n  }\n\n  function domTextBetween(cm, from, to, fromLine, toLine) {\n    var text = \"\", closing = false;\n    function recognizeMarker(id) { return function(marker) { return marker.id == id; }; }\n    function walk(node) {\n      if (node.nodeType == 1) {\n        var cmText = node.getAttribute(\"cm-text\");\n        if (cmText != null) {\n          if (cmText == \"\") cmText = node.textContent.replace(/\\u200b/g, \"\");\n          text += cmText;\n          return;\n        }\n        var markerID = node.getAttribute(\"cm-marker\"), range;\n        if (markerID) {\n          var found = cm.findMarks(Pos(fromLine, 0), Pos(toLine + 1, 0), recognizeMarker(+markerID));\n          if (found.length && (range = found[0].find()))\n            text += getBetween(cm.doc, range.from, range.to).join(\"\\n\");\n          return;\n        }\n        if (node.getAttribute(\"contenteditable\") == \"false\") return;\n        for (var i = 0; i < node.childNodes.length; i++)\n          walk(node.childNodes[i]);\n        if (/^(pre|div|p)$/i.test(node.nodeName))\n          closing = true;\n      } else if (node.nodeType == 3) {\n        var val = node.nodeValue;\n        if (!val) return;\n        if (closing) {\n          text += \"\\n\";\n          closing = false;\n        }\n        text += val;\n      }\n    }\n    for (;;) {\n      walk(from);\n      if (from == to) break;\n      from = from.nextSibling;\n    }\n    return text;\n  }\n\n  CodeMirror.inputStyles = {\"textarea\": TextareaInput, \"contenteditable\": ContentEditableInput};\n\n  // SELECTION / CURSOR\n\n  // Selection objects are immutable. A new one is created every time\n  // the selection changes. A selection is one or more non-overlapping\n  // (and non-touching) ranges, sorted, and an integer that indicates\n  // which one is the primary selection (the one that's scrolled into\n  // view, that getCursor returns, etc).\n  function Selection(ranges, primIndex) {\n    this.ranges = ranges;\n    this.primIndex = primIndex;\n  }\n\n  Selection.prototype = {\n    primary: function() { return this.ranges[this.primIndex]; },\n    equals: function(other) {\n      if (other == this) return true;\n      if (other.primIndex != this.primIndex || other.ranges.length != this.ranges.length) return false;\n      for (var i = 0; i < this.ranges.length; i++) {\n        var here = this.ranges[i], there = other.ranges[i];\n        if (cmp(here.anchor, there.anchor) != 0 || cmp(here.head, there.head) != 0) return false;\n      }\n      return true;\n    },\n    deepCopy: function() {\n      for (var out = [], i = 0; i < this.ranges.length; i++)\n        out[i] = new Range(copyPos(this.ranges[i].anchor), copyPos(this.ranges[i].head));\n      return new Selection(out, this.primIndex);\n    },\n    somethingSelected: function() {\n      for (var i = 0; i < this.ranges.length; i++)\n        if (!this.ranges[i].empty()) return true;\n      return false;\n    },\n    contains: function(pos, end) {\n      if (!end) end = pos;\n      for (var i = 0; i < this.ranges.length; i++) {\n        var range = this.ranges[i];\n        if (cmp(end, range.from()) >= 0 && cmp(pos, range.to()) <= 0)\n          return i;\n      }\n      return -1;\n    }\n  };\n\n  function Range(anchor, head) {\n    this.anchor = anchor; this.head = head;\n  }\n\n  Range.prototype = {\n    from: function() { return minPos(this.anchor, this.head); },\n    to: function() { return maxPos(this.anchor, this.head); },\n    empty: function() {\n      return this.head.line == this.anchor.line && this.head.ch == this.anchor.ch;\n    }\n  };\n\n  // Take an unsorted, potentially overlapping set of ranges, and\n  // build a selection out of it. 'Consumes' ranges array (modifying\n  // it).\n  function normalizeSelection(ranges, primIndex) {\n    var prim = ranges[primIndex];\n    ranges.sort(function(a, b) { return cmp(a.from(), b.from()); });\n    primIndex = indexOf(ranges, prim);\n    for (var i = 1; i < ranges.length; i++) {\n      var cur = ranges[i], prev = ranges[i - 1];\n      if (cmp(prev.to(), cur.from()) >= 0) {\n        var from = minPos(prev.from(), cur.from()), to = maxPos(prev.to(), cur.to());\n        var inv = prev.empty() ? cur.from() == cur.head : prev.from() == prev.head;\n        if (i <= primIndex) --primIndex;\n        ranges.splice(--i, 2, new Range(inv ? to : from, inv ? from : to));\n      }\n    }\n    return new Selection(ranges, primIndex);\n  }\n\n  function simpleSelection(anchor, head) {\n    return new Selection([new Range(anchor, head || anchor)], 0);\n  }\n\n  // Most of the external API clips given positions to make sure they\n  // actually exist within the document.\n  function clipLine(doc, n) {return Math.max(doc.first, Math.min(n, doc.first + doc.size - 1));}\n  function clipPos(doc, pos) {\n    if (pos.line < doc.first) return Pos(doc.first, 0);\n    var last = doc.first + doc.size - 1;\n    if (pos.line > last) return Pos(last, getLine(doc, last).text.length);\n    return clipToLen(pos, getLine(doc, pos.line).text.length);\n  }\n  function clipToLen(pos, linelen) {\n    var ch = pos.ch;\n    if (ch == null || ch > linelen) return Pos(pos.line, linelen);\n    else if (ch < 0) return Pos(pos.line, 0);\n    else return pos;\n  }\n  function isLine(doc, l) {return l >= doc.first && l < doc.first + doc.size;}\n  function clipPosArray(doc, array) {\n    for (var out = [], i = 0; i < array.length; i++) out[i] = clipPos(doc, array[i]);\n    return out;\n  }\n\n  // SELECTION UPDATES\n\n  // The 'scroll' parameter given to many of these indicated whether\n  // the new cursor position should be scrolled into view after\n  // modifying the selection.\n\n  // If shift is held or the extend flag is set, extends a range to\n  // include a given position (and optionally a second position).\n  // Otherwise, simply returns the range between the given positions.\n  // Used for cursor motion and such.\n  function extendRange(doc, range, head, other) {\n    if (doc.cm && doc.cm.display.shift || doc.extend) {\n      var anchor = range.anchor;\n      if (other) {\n        var posBefore = cmp(head, anchor) < 0;\n        if (posBefore != (cmp(other, anchor) < 0)) {\n          anchor = head;\n          head = other;\n        } else if (posBefore != (cmp(head, other) < 0)) {\n          head = other;\n        }\n      }\n      return new Range(anchor, head);\n    } else {\n      return new Range(other || head, head);\n    }\n  }\n\n  // Extend the primary selection range, discard the rest.\n  function extendSelection(doc, head, other, options) {\n    setSelection(doc, new Selection([extendRange(doc, doc.sel.primary(), head, other)], 0), options);\n  }\n\n  // Extend all selections (pos is an array of selections with length\n  // equal the number of selections)\n  function extendSelections(doc, heads, options) {\n    for (var out = [], i = 0; i < doc.sel.ranges.length; i++)\n      out[i] = extendRange(doc, doc.sel.ranges[i], heads[i], null);\n    var newSel = normalizeSelection(out, doc.sel.primIndex);\n    setSelection(doc, newSel, options);\n  }\n\n  // Updates a single range in the selection.\n  function replaceOneSelection(doc, i, range, options) {\n    var ranges = doc.sel.ranges.slice(0);\n    ranges[i] = range;\n    setSelection(doc, normalizeSelection(ranges, doc.sel.primIndex), options);\n  }\n\n  // Reset the selection to a single range.\n  function setSimpleSelection(doc, anchor, head, options) {\n    setSelection(doc, simpleSelection(anchor, head), options);\n  }\n\n  // Give beforeSelectionChange handlers a change to influence a\n  // selection update.\n  function filterSelectionChange(doc, sel) {\n    var obj = {\n      ranges: sel.ranges,\n      update: function(ranges) {\n        this.ranges = [];\n        for (var i = 0; i < ranges.length; i++)\n          this.ranges[i] = new Range(clipPos(doc, ranges[i].anchor),\n                                     clipPos(doc, ranges[i].head));\n      }\n    };\n    signal(doc, \"beforeSelectionChange\", doc, obj);\n    if (doc.cm) signal(doc.cm, \"beforeSelectionChange\", doc.cm, obj);\n    if (obj.ranges != sel.ranges) return normalizeSelection(obj.ranges, obj.ranges.length - 1);\n    else return sel;\n  }\n\n  function setSelectionReplaceHistory(doc, sel, options) {\n    var done = doc.history.done, last = lst(done);\n    if (last && last.ranges) {\n      done[done.length - 1] = sel;\n      setSelectionNoUndo(doc, sel, options);\n    } else {\n      setSelection(doc, sel, options);\n    }\n  }\n\n  // Set a new selection.\n  function setSelection(doc, sel, options) {\n    setSelectionNoUndo(doc, sel, options);\n    addSelectionToHistory(doc, doc.sel, doc.cm ? doc.cm.curOp.id : NaN, options);\n  }\n\n  function setSelectionNoUndo(doc, sel, options) {\n    if (hasHandler(doc, \"beforeSelectionChange\") || doc.cm && hasHandler(doc.cm, \"beforeSelectionChange\"))\n      sel = filterSelectionChange(doc, sel);\n\n    var bias = options && options.bias ||\n      (cmp(sel.primary().head, doc.sel.primary().head) < 0 ? -1 : 1);\n    setSelectionInner(doc, skipAtomicInSelection(doc, sel, bias, true));\n\n    if (!(options && options.scroll === false) && doc.cm)\n      ensureCursorVisible(doc.cm);\n  }\n\n  function setSelectionInner(doc, sel) {\n    if (sel.equals(doc.sel)) return;\n\n    doc.sel = sel;\n\n    if (doc.cm) {\n      doc.cm.curOp.updateInput = doc.cm.curOp.selectionChanged = true;\n      signalCursorActivity(doc.cm);\n    }\n    signalLater(doc, \"cursorActivity\", doc);\n  }\n\n  // Verify that the selection does not partially select any atomic\n  // marked ranges.\n  function reCheckSelection(doc) {\n    setSelectionInner(doc, skipAtomicInSelection(doc, doc.sel, null, false), sel_dontScroll);\n  }\n\n  // Return a selection that does not partially select any atomic\n  // ranges.\n  function skipAtomicInSelection(doc, sel, bias, mayClear) {\n    var out;\n    for (var i = 0; i < sel.ranges.length; i++) {\n      var range = sel.ranges[i];\n      var newAnchor = skipAtomic(doc, range.anchor, bias, mayClear);\n      var newHead = skipAtomic(doc, range.head, bias, mayClear);\n      if (out || newAnchor != range.anchor || newHead != range.head) {\n        if (!out) out = sel.ranges.slice(0, i);\n        out[i] = new Range(newAnchor, newHead);\n      }\n    }\n    return out ? normalizeSelection(out, sel.primIndex) : sel;\n  }\n\n  // Ensure a given position is not inside an atomic range.\n  function skipAtomic(doc, pos, bias, mayClear) {\n    var flipped = false, curPos = pos;\n    var dir = bias || 1;\n    doc.cantEdit = false;\n    search: for (;;) {\n      var line = getLine(doc, curPos.line);\n      if (line.markedSpans) {\n        for (var i = 0; i < line.markedSpans.length; ++i) {\n          var sp = line.markedSpans[i], m = sp.marker;\n          if ((sp.from == null || (m.inclusiveLeft ? sp.from <= curPos.ch : sp.from < curPos.ch)) &&\n              (sp.to == null || (m.inclusiveRight ? sp.to >= curPos.ch : sp.to > curPos.ch))) {\n            if (mayClear) {\n              signal(m, \"beforeCursorEnter\");\n              if (m.explicitlyCleared) {\n                if (!line.markedSpans) break;\n                else {--i; continue;}\n              }\n            }\n            if (!m.atomic) continue;\n            var newPos = m.find(dir < 0 ? -1 : 1);\n            if (cmp(newPos, curPos) == 0) {\n              newPos.ch += dir;\n              if (newPos.ch < 0) {\n                if (newPos.line > doc.first) newPos = clipPos(doc, Pos(newPos.line - 1));\n                else newPos = null;\n              } else if (newPos.ch > line.text.length) {\n                if (newPos.line < doc.first + doc.size - 1) newPos = Pos(newPos.line + 1, 0);\n                else newPos = null;\n              }\n              if (!newPos) {\n                if (flipped) {\n                  // Driven in a corner -- no valid cursor position found at all\n                  // -- try again *with* clearing, if we didn't already\n                  if (!mayClear) return skipAtomic(doc, pos, bias, true);\n                  // Otherwise, turn off editing until further notice, and return the start of the doc\n                  doc.cantEdit = true;\n                  return Pos(doc.first, 0);\n                }\n                flipped = true; newPos = pos; dir = -dir;\n              }\n            }\n            curPos = newPos;\n            continue search;\n          }\n        }\n      }\n      return curPos;\n    }\n  }\n\n  // SELECTION DRAWING\n\n  function updateSelection(cm) {\n    cm.display.input.showSelection(cm.display.input.prepareSelection());\n  }\n\n  function prepareSelection(cm, primary) {\n    var doc = cm.doc, result = {};\n    var curFragment = result.cursors = document.createDocumentFragment();\n    var selFragment = result.selection = document.createDocumentFragment();\n\n    for (var i = 0; i < doc.sel.ranges.length; i++) {\n      if (primary === false && i == doc.sel.primIndex) continue;\n      var range = doc.sel.ranges[i];\n      var collapsed = range.empty();\n      if (collapsed || cm.options.showCursorWhenSelecting)\n        drawSelectionCursor(cm, range, curFragment);\n      if (!collapsed)\n        drawSelectionRange(cm, range, selFragment);\n    }\n    return result;\n  }\n\n  // Draws a cursor for the given range\n  function drawSelectionCursor(cm, range, output) {\n    var pos = cursorCoords(cm, range.head, \"div\", null, null, !cm.options.singleCursorHeightPerLine);\n\n    var cursor = output.appendChild(elt(\"div\", \"\\u00a0\", \"CodeMirror-cursor\"));\n    cursor.style.left = pos.left + \"px\";\n    cursor.style.top = pos.top + \"px\";\n    cursor.style.height = Math.max(0, pos.bottom - pos.top) * cm.options.cursorHeight + \"px\";\n\n    if (pos.other) {\n      // Secondary cursor, shown when on a 'jump' in bi-directional text\n      var otherCursor = output.appendChild(elt(\"div\", \"\\u00a0\", \"CodeMirror-cursor CodeMirror-secondarycursor\"));\n      otherCursor.style.display = \"\";\n      otherCursor.style.left = pos.other.left + \"px\";\n      otherCursor.style.top = pos.other.top + \"px\";\n      otherCursor.style.height = (pos.other.bottom - pos.other.top) * .85 + \"px\";\n    }\n  }\n\n  // Draws the given range as a highlighted selection\n  function drawSelectionRange(cm, range, output) {\n    var display = cm.display, doc = cm.doc;\n    var fragment = document.createDocumentFragment();\n    var padding = paddingH(cm.display), leftSide = padding.left;\n    var rightSide = Math.max(display.sizerWidth, displayWidth(cm) - display.sizer.offsetLeft) - padding.right;\n\n    function add(left, top, width, bottom) {\n      if (top < 0) top = 0;\n      top = Math.round(top);\n      bottom = Math.round(bottom);\n      fragment.appendChild(elt(\"div\", null, \"CodeMirror-selected\", \"position: absolute; left: \" + left +\n                               \"px; top: \" + top + \"px; width: \" + (width == null ? rightSide - left : width) +\n                               \"px; height: \" + (bottom - top) + \"px\"));\n    }\n\n    function drawForLine(line, fromArg, toArg) {\n      var lineObj = getLine(doc, line);\n      var lineLen = lineObj.text.length;\n      var start, end;\n      function coords(ch, bias) {\n        return charCoords(cm, Pos(line, ch), \"div\", lineObj, bias);\n      }\n\n      iterateBidiSections(getOrder(lineObj), fromArg || 0, toArg == null ? lineLen : toArg, function(from, to, dir) {\n        var leftPos = coords(from, \"left\"), rightPos, left, right;\n        if (from == to) {\n          rightPos = leftPos;\n          left = right = leftPos.left;\n        } else {\n          rightPos = coords(to - 1, \"right\");\n          if (dir == \"rtl\") { var tmp = leftPos; leftPos = rightPos; rightPos = tmp; }\n          left = leftPos.left;\n          right = rightPos.right;\n        }\n        if (fromArg == null && from == 0) left = leftSide;\n        if (rightPos.top - leftPos.top > 3) { // Different lines, draw top part\n          add(left, leftPos.top, null, leftPos.bottom);\n          left = leftSide;\n          if (leftPos.bottom < rightPos.top) add(left, leftPos.bottom, null, rightPos.top);\n        }\n        if (toArg == null && to == lineLen) right = rightSide;\n        if (!start || leftPos.top < start.top || leftPos.top == start.top && leftPos.left < start.left)\n          start = leftPos;\n        if (!end || rightPos.bottom > end.bottom || rightPos.bottom == end.bottom && rightPos.right > end.right)\n          end = rightPos;\n        if (left < leftSide + 1) left = leftSide;\n        add(left, rightPos.top, right - left, rightPos.bottom);\n      });\n      return {start: start, end: end};\n    }\n\n    var sFrom = range.from(), sTo = range.to();\n    if (sFrom.line == sTo.line) {\n      drawForLine(sFrom.line, sFrom.ch, sTo.ch);\n    } else {\n      var fromLine = getLine(doc, sFrom.line), toLine = getLine(doc, sTo.line);\n      var singleVLine = visualLine(fromLine) == visualLine(toLine);\n      var leftEnd = drawForLine(sFrom.line, sFrom.ch, singleVLine ? fromLine.text.length + 1 : null).end;\n      var rightStart = drawForLine(sTo.line, singleVLine ? 0 : null, sTo.ch).start;\n      if (singleVLine) {\n        if (leftEnd.top < rightStart.top - 2) {\n          add(leftEnd.right, leftEnd.top, null, leftEnd.bottom);\n          add(leftSide, rightStart.top, rightStart.left, rightStart.bottom);\n        } else {\n          add(leftEnd.right, leftEnd.top, rightStart.left - leftEnd.right, leftEnd.bottom);\n        }\n      }\n      if (leftEnd.bottom < rightStart.top)\n        add(leftSide, leftEnd.bottom, null, rightStart.top);\n    }\n\n    output.appendChild(fragment);\n  }\n\n  // Cursor-blinking\n  function restartBlink(cm) {\n    if (!cm.state.focused) return;\n    var display = cm.display;\n    clearInterval(display.blinker);\n    var on = true;\n    display.cursorDiv.style.visibility = \"\";\n    if (cm.options.cursorBlinkRate > 0)\n      display.blinker = setInterval(function() {\n        display.cursorDiv.style.visibility = (on = !on) ? \"\" : \"hidden\";\n      }, cm.options.cursorBlinkRate);\n    else if (cm.options.cursorBlinkRate < 0)\n      display.cursorDiv.style.visibility = \"hidden\";\n  }\n\n  // HIGHLIGHT WORKER\n\n  function startWorker(cm, time) {\n    if (cm.doc.mode.startState && cm.doc.frontier < cm.display.viewTo)\n      cm.state.highlight.set(time, bind(highlightWorker, cm));\n  }\n\n  function highlightWorker(cm) {\n    var doc = cm.doc;\n    if (doc.frontier < doc.first) doc.frontier = doc.first;\n    if (doc.frontier >= cm.display.viewTo) return;\n    var end = +new Date + cm.options.workTime;\n    var state = copyState(doc.mode, getStateBefore(cm, doc.frontier));\n    var changedLines = [];\n\n    doc.iter(doc.frontier, Math.min(doc.first + doc.size, cm.display.viewTo + 500), function(line) {\n      if (doc.frontier >= cm.display.viewFrom) { // Visible\n        var oldStyles = line.styles;\n        var highlighted = highlightLine(cm, line, state, true);\n        line.styles = highlighted.styles;\n        var oldCls = line.styleClasses, newCls = highlighted.classes;\n        if (newCls) line.styleClasses = newCls;\n        else if (oldCls) line.styleClasses = null;\n        var ischange = !oldStyles || oldStyles.length != line.styles.length ||\n          oldCls != newCls && (!oldCls || !newCls || oldCls.bgClass != newCls.bgClass || oldCls.textClass != newCls.textClass);\n        for (var i = 0; !ischange && i < oldStyles.length; ++i) ischange = oldStyles[i] != line.styles[i];\n        if (ischange) changedLines.push(doc.frontier);\n        line.stateAfter = copyState(doc.mode, state);\n      } else {\n        processLine(cm, line.text, state);\n        line.stateAfter = doc.frontier % 5 == 0 ? copyState(doc.mode, state) : null;\n      }\n      ++doc.frontier;\n      if (+new Date > end) {\n        startWorker(cm, cm.options.workDelay);\n        return true;\n      }\n    });\n    if (changedLines.length) runInOp(cm, function() {\n      for (var i = 0; i < changedLines.length; i++)\n        regLineChange(cm, changedLines[i], \"text\");\n    });\n  }\n\n  // Finds the line to start with when starting a parse. Tries to\n  // find a line with a stateAfter, so that it can start with a\n  // valid state. If that fails, it returns the line with the\n  // smallest indentation, which tends to need the least context to\n  // parse correctly.\n  function findStartLine(cm, n, precise) {\n    var minindent, minline, doc = cm.doc;\n    var lim = precise ? -1 : n - (cm.doc.mode.innerMode ? 1000 : 100);\n    for (var search = n; search > lim; --search) {\n      if (search <= doc.first) return doc.first;\n      var line = getLine(doc, search - 1);\n      if (line.stateAfter && (!precise || search <= doc.frontier)) return search;\n      var indented = countColumn(line.text, null, cm.options.tabSize);\n      if (minline == null || minindent > indented) {\n        minline = search - 1;\n        minindent = indented;\n      }\n    }\n    return minline;\n  }\n\n  function getStateBefore(cm, n, precise) {\n    var doc = cm.doc, display = cm.display;\n    if (!doc.mode.startState) return true;\n    var pos = findStartLine(cm, n, precise), state = pos > doc.first && getLine(doc, pos-1).stateAfter;\n    if (!state) state = startState(doc.mode);\n    else state = copyState(doc.mode, state);\n    doc.iter(pos, n, function(line) {\n      processLine(cm, line.text, state);\n      var save = pos == n - 1 || pos % 5 == 0 || pos >= display.viewFrom && pos < display.viewTo;\n      line.stateAfter = save ? copyState(doc.mode, state) : null;\n      ++pos;\n    });\n    if (precise) doc.frontier = pos;\n    return state;\n  }\n\n  // POSITION MEASUREMENT\n\n  function paddingTop(display) {return display.lineSpace.offsetTop;}\n  function paddingVert(display) {return display.mover.offsetHeight - display.lineSpace.offsetHeight;}\n  function paddingH(display) {\n    if (display.cachedPaddingH) return display.cachedPaddingH;\n    var e = removeChildrenAndAdd(display.measure, elt(\"pre\", \"x\"));\n    var style = window.getComputedStyle ? window.getComputedStyle(e) : e.currentStyle;\n    var data = {left: parseInt(style.paddingLeft), right: parseInt(style.paddingRight)};\n    if (!isNaN(data.left) && !isNaN(data.right)) display.cachedPaddingH = data;\n    return data;\n  }\n\n  function scrollGap(cm) { return scrollerGap - cm.display.nativeBarWidth; }\n  function displayWidth(cm) {\n    return cm.display.scroller.clientWidth - scrollGap(cm) - cm.display.barWidth;\n  }\n  function displayHeight(cm) {\n    return cm.display.scroller.clientHeight - scrollGap(cm) - cm.display.barHeight;\n  }\n\n  // Ensure the lineView.wrapping.heights array is populated. This is\n  // an array of bottom offsets for the lines that make up a drawn\n  // line. When lineWrapping is on, there might be more than one\n  // height.\n  function ensureLineHeights(cm, lineView, rect) {\n    var wrapping = cm.options.lineWrapping;\n    var curWidth = wrapping && displayWidth(cm);\n    if (!lineView.measure.heights || wrapping && lineView.measure.width != curWidth) {\n      var heights = lineView.measure.heights = [];\n      if (wrapping) {\n        lineView.measure.width = curWidth;\n        var rects = lineView.text.firstChild.getClientRects();\n        for (var i = 0; i < rects.length - 1; i++) {\n          var cur = rects[i], next = rects[i + 1];\n          if (Math.abs(cur.bottom - next.bottom) > 2)\n            heights.push((cur.bottom + next.top) / 2 - rect.top);\n        }\n      }\n      heights.push(rect.bottom - rect.top);\n    }\n  }\n\n  // Find a line map (mapping character offsets to text nodes) and a\n  // measurement cache for the given line number. (A line view might\n  // contain multiple lines when collapsed ranges are present.)\n  function mapFromLineView(lineView, line, lineN) {\n    if (lineView.line == line)\n      return {map: lineView.measure.map, cache: lineView.measure.cache};\n    for (var i = 0; i < lineView.rest.length; i++)\n      if (lineView.rest[i] == line)\n        return {map: lineView.measure.maps[i], cache: lineView.measure.caches[i]};\n    for (var i = 0; i < lineView.rest.length; i++)\n      if (lineNo(lineView.rest[i]) > lineN)\n        return {map: lineView.measure.maps[i], cache: lineView.measure.caches[i], before: true};\n  }\n\n  // Render a line into the hidden node display.externalMeasured. Used\n  // when measurement is needed for a line that's not in the viewport.\n  function updateExternalMeasurement(cm, line) {\n    line = visualLine(line);\n    var lineN = lineNo(line);\n    var view = cm.display.externalMeasured = new LineView(cm.doc, line, lineN);\n    view.lineN = lineN;\n    var built = view.built = buildLineContent(cm, view);\n    view.text = built.pre;\n    removeChildrenAndAdd(cm.display.lineMeasure, built.pre);\n    return view;\n  }\n\n  // Get a {top, bottom, left, right} box (in line-local coordinates)\n  // for a given character.\n  function measureChar(cm, line, ch, bias) {\n    return measureCharPrepared(cm, prepareMeasureForLine(cm, line), ch, bias);\n  }\n\n  // Find a line view that corresponds to the given line number.\n  function findViewForLine(cm, lineN) {\n    if (lineN >= cm.display.viewFrom && lineN < cm.display.viewTo)\n      return cm.display.view[findViewIndex(cm, lineN)];\n    var ext = cm.display.externalMeasured;\n    if (ext && lineN >= ext.lineN && lineN < ext.lineN + ext.size)\n      return ext;\n  }\n\n  // Measurement can be split in two steps, the set-up work that\n  // applies to the whole line, and the measurement of the actual\n  // character. Functions like coordsChar, that need to do a lot of\n  // measurements in a row, can thus ensure that the set-up work is\n  // only done once.\n  function prepareMeasureForLine(cm, line) {\n    var lineN = lineNo(line);\n    var view = findViewForLine(cm, lineN);\n    if (view && !view.text)\n      view = null;\n    else if (view && view.changes)\n      updateLineForChanges(cm, view, lineN, getDimensions(cm));\n    if (!view)\n      view = updateExternalMeasurement(cm, line);\n\n    var info = mapFromLineView(view, line, lineN);\n    return {\n      line: line, view: view, rect: null,\n      map: info.map, cache: info.cache, before: info.before,\n      hasHeights: false\n    };\n  }\n\n  // Given a prepared measurement object, measures the position of an\n  // actual character (or fetches it from the cache).\n  function measureCharPrepared(cm, prepared, ch, bias, varHeight) {\n    if (prepared.before) ch = -1;\n    var key = ch + (bias || \"\"), found;\n    if (prepared.cache.hasOwnProperty(key)) {\n      found = prepared.cache[key];\n    } else {\n      if (!prepared.rect)\n        prepared.rect = prepared.view.text.getBoundingClientRect();\n      if (!prepared.hasHeights) {\n        ensureLineHeights(cm, prepared.view, prepared.rect);\n        prepared.hasHeights = true;\n      }\n      found = measureCharInner(cm, prepared, ch, bias);\n      if (!found.bogus) prepared.cache[key] = found;\n    }\n    return {left: found.left, right: found.right,\n            top: varHeight ? found.rtop : found.top,\n            bottom: varHeight ? found.rbottom : found.bottom};\n  }\n\n  var nullRect = {left: 0, right: 0, top: 0, bottom: 0};\n\n  function nodeAndOffsetInLineMap(map, ch, bias) {\n    var node, start, end, collapse;\n    // First, search the line map for the text node corresponding to,\n    // or closest to, the target character.\n    for (var i = 0; i < map.length; i += 3) {\n      var mStart = map[i], mEnd = map[i + 1];\n      if (ch < mStart) {\n        start = 0; end = 1;\n        collapse = \"left\";\n      } else if (ch < mEnd) {\n        start = ch - mStart;\n        end = start + 1;\n      } else if (i == map.length - 3 || ch == mEnd && map[i + 3] > ch) {\n        end = mEnd - mStart;\n        start = end - 1;\n        if (ch >= mEnd) collapse = \"right\";\n      }\n      if (start != null) {\n        node = map[i + 2];\n        if (mStart == mEnd && bias == (node.insertLeft ? \"left\" : \"right\"))\n          collapse = bias;\n        if (bias == \"left\" && start == 0)\n          while (i && map[i - 2] == map[i - 3] && map[i - 1].insertLeft) {\n            node = map[(i -= 3) + 2];\n            collapse = \"left\";\n          }\n        if (bias == \"right\" && start == mEnd - mStart)\n          while (i < map.length - 3 && map[i + 3] == map[i + 4] && !map[i + 5].insertLeft) {\n            node = map[(i += 3) + 2];\n            collapse = \"right\";\n          }\n        break;\n      }\n    }\n    return {node: node, start: start, end: end, collapse: collapse, coverStart: mStart, coverEnd: mEnd};\n  }\n\n  function measureCharInner(cm, prepared, ch, bias) {\n    var place = nodeAndOffsetInLineMap(prepared.map, ch, bias);\n    var node = place.node, start = place.start, end = place.end, collapse = place.collapse;\n\n    var rect;\n    if (node.nodeType == 3) { // If it is a text node, use a range to retrieve the coordinates.\n      for (var i = 0; i < 4; i++) { // Retry a maximum of 4 times when nonsense rectangles are returned\n        while (start && isExtendingChar(prepared.line.text.charAt(place.coverStart + start))) --start;\n        while (place.coverStart + end < place.coverEnd && isExtendingChar(prepared.line.text.charAt(place.coverStart + end))) ++end;\n        if (ie && ie_version < 9 && start == 0 && end == place.coverEnd - place.coverStart) {\n          rect = node.parentNode.getBoundingClientRect();\n        } else if (ie && cm.options.lineWrapping) {\n          var rects = range(node, start, end).getClientRects();\n          if (rects.length)\n            rect = rects[bias == \"right\" ? rects.length - 1 : 0];\n          else\n            rect = nullRect;\n        } else {\n          rect = range(node, start, end).getBoundingClientRect() || nullRect;\n        }\n        if (rect.left || rect.right || start == 0) break;\n        end = start;\n        start = start - 1;\n        collapse = \"right\";\n      }\n      if (ie && ie_version < 11) rect = maybeUpdateRectForZooming(cm.display.measure, rect);\n    } else { // If it is a widget, simply get the box for the whole widget.\n      if (start > 0) collapse = bias = \"right\";\n      var rects;\n      if (cm.options.lineWrapping && (rects = node.getClientRects()).length > 1)\n        rect = rects[bias == \"right\" ? rects.length - 1 : 0];\n      else\n        rect = node.getBoundingClientRect();\n    }\n    if (ie && ie_version < 9 && !start && (!rect || !rect.left && !rect.right)) {\n      var rSpan = node.parentNode.getClientRects()[0];\n      if (rSpan)\n        rect = {left: rSpan.left, right: rSpan.left + charWidth(cm.display), top: rSpan.top, bottom: rSpan.bottom};\n      else\n        rect = nullRect;\n    }\n\n    var rtop = rect.top - prepared.rect.top, rbot = rect.bottom - prepared.rect.top;\n    var mid = (rtop + rbot) / 2;\n    var heights = prepared.view.measure.heights;\n    for (var i = 0; i < heights.length - 1; i++)\n      if (mid < heights[i]) break;\n    var top = i ? heights[i - 1] : 0, bot = heights[i];\n    var result = {left: (collapse == \"right\" ? rect.right : rect.left) - prepared.rect.left,\n                  right: (collapse == \"left\" ? rect.left : rect.right) - prepared.rect.left,\n                  top: top, bottom: bot};\n    if (!rect.left && !rect.right) result.bogus = true;\n    if (!cm.options.singleCursorHeightPerLine) { result.rtop = rtop; result.rbottom = rbot; }\n\n    return result;\n  }\n\n  // Work around problem with bounding client rects on ranges being\n  // returned incorrectly when zoomed on IE10 and below.\n  function maybeUpdateRectForZooming(measure, rect) {\n    if (!window.screen || screen.logicalXDPI == null ||\n        screen.logicalXDPI == screen.deviceXDPI || !hasBadZoomedRects(measure))\n      return rect;\n    var scaleX = screen.logicalXDPI / screen.deviceXDPI;\n    var scaleY = screen.logicalYDPI / screen.deviceYDPI;\n    return {left: rect.left * scaleX, right: rect.right * scaleX,\n            top: rect.top * scaleY, bottom: rect.bottom * scaleY};\n  }\n\n  function clearLineMeasurementCacheFor(lineView) {\n    if (lineView.measure) {\n      lineView.measure.cache = {};\n      lineView.measure.heights = null;\n      if (lineView.rest) for (var i = 0; i < lineView.rest.length; i++)\n        lineView.measure.caches[i] = {};\n    }\n  }\n\n  function clearLineMeasurementCache(cm) {\n    cm.display.externalMeasure = null;\n    removeChildren(cm.display.lineMeasure);\n    for (var i = 0; i < cm.display.view.length; i++)\n      clearLineMeasurementCacheFor(cm.display.view[i]);\n  }\n\n  function clearCaches(cm) {\n    clearLineMeasurementCache(cm);\n    cm.display.cachedCharWidth = cm.display.cachedTextHeight = cm.display.cachedPaddingH = null;\n    if (!cm.options.lineWrapping) cm.display.maxLineChanged = true;\n    cm.display.lineNumChars = null;\n  }\n\n  function pageScrollX() { return window.pageXOffset || (document.documentElement || document.body).scrollLeft; }\n  function pageScrollY() { return window.pageYOffset || (document.documentElement || document.body).scrollTop; }\n\n  // Converts a {top, bottom, left, right} box from line-local\n  // coordinates into another coordinate system. Context may be one of\n  // \"line\", \"div\" (display.lineDiv), \"local\"/null (editor), \"window\",\n  // or \"page\".\n  function intoCoordSystem(cm, lineObj, rect, context) {\n    if (lineObj.widgets) for (var i = 0; i < lineObj.widgets.length; ++i) if (lineObj.widgets[i].above) {\n      var size = widgetHeight(lineObj.widgets[i]);\n      rect.top += size; rect.bottom += size;\n    }\n    if (context == \"line\") return rect;\n    if (!context) context = \"local\";\n    var yOff = heightAtLine(lineObj);\n    if (context == \"local\") yOff += paddingTop(cm.display);\n    else yOff -= cm.display.viewOffset;\n    if (context == \"page\" || context == \"window\") {\n      var lOff = cm.display.lineSpace.getBoundingClientRect();\n      yOff += lOff.top + (context == \"window\" ? 0 : pageScrollY());\n      var xOff = lOff.left + (context == \"window\" ? 0 : pageScrollX());\n      rect.left += xOff; rect.right += xOff;\n    }\n    rect.top += yOff; rect.bottom += yOff;\n    return rect;\n  }\n\n  // Coverts a box from \"div\" coords to another coordinate system.\n  // Context may be \"window\", \"page\", \"div\", or \"local\"/null.\n  function fromCoordSystem(cm, coords, context) {\n    if (context == \"div\") return coords;\n    var left = coords.left, top = coords.top;\n    // First move into \"page\" coordinate system\n    if (context == \"page\") {\n      left -= pageScrollX();\n      top -= pageScrollY();\n    } else if (context == \"local\" || !context) {\n      var localBox = cm.display.sizer.getBoundingClientRect();\n      left += localBox.left;\n      top += localBox.top;\n    }\n\n    var lineSpaceBox = cm.display.lineSpace.getBoundingClientRect();\n    return {left: left - lineSpaceBox.left, top: top - lineSpaceBox.top};\n  }\n\n  function charCoords(cm, pos, context, lineObj, bias) {\n    if (!lineObj) lineObj = getLine(cm.doc, pos.line);\n    return intoCoordSystem(cm, lineObj, measureChar(cm, lineObj, pos.ch, bias), context);\n  }\n\n  // Returns a box for a given cursor position, which may have an\n  // 'other' property containing the position of the secondary cursor\n  // on a bidi boundary.\n  function cursorCoords(cm, pos, context, lineObj, preparedMeasure, varHeight) {\n    lineObj = lineObj || getLine(cm.doc, pos.line);\n    if (!preparedMeasure) preparedMeasure = prepareMeasureForLine(cm, lineObj);\n    function get(ch, right) {\n      var m = measureCharPrepared(cm, preparedMeasure, ch, right ? \"right\" : \"left\", varHeight);\n      if (right) m.left = m.right; else m.right = m.left;\n      return intoCoordSystem(cm, lineObj, m, context);\n    }\n    function getBidi(ch, partPos) {\n      var part = order[partPos], right = part.level % 2;\n      if (ch == bidiLeft(part) && partPos && part.level < order[partPos - 1].level) {\n        part = order[--partPos];\n        ch = bidiRight(part) - (part.level % 2 ? 0 : 1);\n        right = true;\n      } else if (ch == bidiRight(part) && partPos < order.length - 1 && part.level < order[partPos + 1].level) {\n        part = order[++partPos];\n        ch = bidiLeft(part) - part.level % 2;\n        right = false;\n      }\n      if (right && ch == part.to && ch > part.from) return get(ch - 1);\n      return get(ch, right);\n    }\n    var order = getOrder(lineObj), ch = pos.ch;\n    if (!order) return get(ch);\n    var partPos = getBidiPartAt(order, ch);\n    var val = getBidi(ch, partPos);\n    if (bidiOther != null) val.other = getBidi(ch, bidiOther);\n    return val;\n  }\n\n  // Used to cheaply estimate the coordinates for a position. Used for\n  // intermediate scroll updates.\n  function estimateCoords(cm, pos) {\n    var left = 0, pos = clipPos(cm.doc, pos);\n    if (!cm.options.lineWrapping) left = charWidth(cm.display) * pos.ch;\n    var lineObj = getLine(cm.doc, pos.line);\n    var top = heightAtLine(lineObj) + paddingTop(cm.display);\n    return {left: left, right: left, top: top, bottom: top + lineObj.height};\n  }\n\n  // Positions returned by coordsChar contain some extra information.\n  // xRel is the relative x position of the input coordinates compared\n  // to the found position (so xRel > 0 means the coordinates are to\n  // the right of the character position, for example). When outside\n  // is true, that means the coordinates lie outside the line's\n  // vertical range.\n  function PosWithInfo(line, ch, outside, xRel) {\n    var pos = Pos(line, ch);\n    pos.xRel = xRel;\n    if (outside) pos.outside = true;\n    return pos;\n  }\n\n  // Compute the character position closest to the given coordinates.\n  // Input must be lineSpace-local (\"div\" coordinate system).\n  function coordsChar(cm, x, y) {\n    var doc = cm.doc;\n    y += cm.display.viewOffset;\n    if (y < 0) return PosWithInfo(doc.first, 0, true, -1);\n    var lineN = lineAtHeight(doc, y), last = doc.first + doc.size - 1;\n    if (lineN > last)\n      return PosWithInfo(doc.first + doc.size - 1, getLine(doc, last).text.length, true, 1);\n    if (x < 0) x = 0;\n\n    var lineObj = getLine(doc, lineN);\n    for (;;) {\n      var found = coordsCharInner(cm, lineObj, lineN, x, y);\n      var merged = collapsedSpanAtEnd(lineObj);\n      var mergedPos = merged && merged.find(0, true);\n      if (merged && (found.ch > mergedPos.from.ch || found.ch == mergedPos.from.ch && found.xRel > 0))\n        lineN = lineNo(lineObj = mergedPos.to.line);\n      else\n        return found;\n    }\n  }\n\n  function coordsCharInner(cm, lineObj, lineNo, x, y) {\n    var innerOff = y - heightAtLine(lineObj);\n    var wrongLine = false, adjust = 2 * cm.display.wrapper.clientWidth;\n    var preparedMeasure = prepareMeasureForLine(cm, lineObj);\n\n    function getX(ch) {\n      var sp = cursorCoords(cm, Pos(lineNo, ch), \"line\", lineObj, preparedMeasure);\n      wrongLine = true;\n      if (innerOff > sp.bottom) return sp.left - adjust;\n      else if (innerOff < sp.top) return sp.left + adjust;\n      else wrongLine = false;\n      return sp.left;\n    }\n\n    var bidi = getOrder(lineObj), dist = lineObj.text.length;\n    var from = lineLeft(lineObj), to = lineRight(lineObj);\n    var fromX = getX(from), fromOutside = wrongLine, toX = getX(to), toOutside = wrongLine;\n\n    if (x > toX) return PosWithInfo(lineNo, to, toOutside, 1);\n    // Do a binary search between these bounds.\n    for (;;) {\n      if (bidi ? to == from || to == moveVisually(lineObj, from, 1) : to - from <= 1) {\n        var ch = x < fromX || x - fromX <= toX - x ? from : to;\n        var xDiff = x - (ch == from ? fromX : toX);\n        while (isExtendingChar(lineObj.text.charAt(ch))) ++ch;\n        var pos = PosWithInfo(lineNo, ch, ch == from ? fromOutside : toOutside,\n                              xDiff < -1 ? -1 : xDiff > 1 ? 1 : 0);\n        return pos;\n      }\n      var step = Math.ceil(dist / 2), middle = from + step;\n      if (bidi) {\n        middle = from;\n        for (var i = 0; i < step; ++i) middle = moveVisually(lineObj, middle, 1);\n      }\n      var middleX = getX(middle);\n      if (middleX > x) {to = middle; toX = middleX; if (toOutside = wrongLine) toX += 1000; dist = step;}\n      else {from = middle; fromX = middleX; fromOutside = wrongLine; dist -= step;}\n    }\n  }\n\n  var measureText;\n  // Compute the default text height.\n  function textHeight(display) {\n    if (display.cachedTextHeight != null) return display.cachedTextHeight;\n    if (measureText == null) {\n      measureText = elt(\"pre\");\n      // Measure a bunch of lines, for browsers that compute\n      // fractional heights.\n      for (var i = 0; i < 49; ++i) {\n        measureText.appendChild(document.createTextNode(\"x\"));\n        measureText.appendChild(elt(\"br\"));\n      }\n      measureText.appendChild(document.createTextNode(\"x\"));\n    }\n    removeChildrenAndAdd(display.measure, measureText);\n    var height = measureText.offsetHeight / 50;\n    if (height > 3) display.cachedTextHeight = height;\n    removeChildren(display.measure);\n    return height || 1;\n  }\n\n  // Compute the default character width.\n  function charWidth(display) {\n    if (display.cachedCharWidth != null) return display.cachedCharWidth;\n    var anchor = elt(\"span\", \"xxxxxxxxxx\");\n    var pre = elt(\"pre\", [anchor]);\n    removeChildrenAndAdd(display.measure, pre);\n    var rect = anchor.getBoundingClientRect(), width = (rect.right - rect.left) / 10;\n    if (width > 2) display.cachedCharWidth = width;\n    return width || 10;\n  }\n\n  // OPERATIONS\n\n  // Operations are used to wrap a series of changes to the editor\n  // state in such a way that each change won't have to update the\n  // cursor and display (which would be awkward, slow, and\n  // error-prone). Instead, display updates are batched and then all\n  // combined and executed at once.\n\n  var operationGroup = null;\n\n  var nextOpId = 0;\n  // Start a new operation.\n  function startOperation(cm) {\n    cm.curOp = {\n      cm: cm,\n      viewChanged: false,      // Flag that indicates that lines might need to be redrawn\n      startHeight: cm.doc.height, // Used to detect need to update scrollbar\n      forceUpdate: false,      // Used to force a redraw\n      updateInput: null,       // Whether to reset the input textarea\n      typing: false,           // Whether this reset should be careful to leave existing text (for compositing)\n      changeObjs: null,        // Accumulated changes, for firing change events\n      cursorActivityHandlers: null, // Set of handlers to fire cursorActivity on\n      cursorActivityCalled: 0, // Tracks which cursorActivity handlers have been called already\n      selectionChanged: false, // Whether the selection needs to be redrawn\n      updateMaxLine: false,    // Set when the widest line needs to be determined anew\n      scrollLeft: null, scrollTop: null, // Intermediate scroll position, not pushed to DOM yet\n      scrollToPos: null,       // Used to scroll to a specific position\n      id: ++nextOpId           // Unique ID\n    };\n    if (operationGroup) {\n      operationGroup.ops.push(cm.curOp);\n    } else {\n      cm.curOp.ownsGroup = operationGroup = {\n        ops: [cm.curOp],\n        delayedCallbacks: []\n      };\n    }\n  }\n\n  function fireCallbacksForOps(group) {\n    // Calls delayed callbacks and cursorActivity handlers until no\n    // new ones appear\n    var callbacks = group.delayedCallbacks, i = 0;\n    do {\n      for (; i < callbacks.length; i++)\n        callbacks[i]();\n      for (var j = 0; j < group.ops.length; j++) {\n        var op = group.ops[j];\n        if (op.cursorActivityHandlers)\n          while (op.cursorActivityCalled < op.cursorActivityHandlers.length)\n            op.cursorActivityHandlers[op.cursorActivityCalled++](op.cm);\n      }\n    } while (i < callbacks.length);\n  }\n\n  // Finish an operation, updating the display and signalling delayed events\n  function endOperation(cm) {\n    var op = cm.curOp, group = op.ownsGroup;\n    if (!group) return;\n\n    try { fireCallbacksForOps(group); }\n    finally {\n      operationGroup = null;\n      for (var i = 0; i < group.ops.length; i++)\n        group.ops[i].cm.curOp = null;\n      endOperations(group);\n    }\n  }\n\n  // The DOM updates done when an operation finishes are batched so\n  // that the minimum number of relayouts are required.\n  function endOperations(group) {\n    var ops = group.ops;\n    for (var i = 0; i < ops.length; i++) // Read DOM\n      endOperation_R1(ops[i]);\n    for (var i = 0; i < ops.length; i++) // Write DOM (maybe)\n      endOperation_W1(ops[i]);\n    for (var i = 0; i < ops.length; i++) // Read DOM\n      endOperation_R2(ops[i]);\n    for (var i = 0; i < ops.length; i++) // Write DOM (maybe)\n      endOperation_W2(ops[i]);\n    for (var i = 0; i < ops.length; i++) // Read DOM\n      endOperation_finish(ops[i]);\n  }\n\n  function endOperation_R1(op) {\n    var cm = op.cm, display = cm.display;\n    maybeClipScrollbars(cm);\n    if (op.updateMaxLine) findMaxLine(cm);\n\n    op.mustUpdate = op.viewChanged || op.forceUpdate || op.scrollTop != null ||\n      op.scrollToPos && (op.scrollToPos.from.line < display.viewFrom ||\n                         op.scrollToPos.to.line >= display.viewTo) ||\n      display.maxLineChanged && cm.options.lineWrapping;\n    op.update = op.mustUpdate &&\n      new DisplayUpdate(cm, op.mustUpdate && {top: op.scrollTop, ensure: op.scrollToPos}, op.forceUpdate);\n  }\n\n  function endOperation_W1(op) {\n    op.updatedDisplay = op.mustUpdate && updateDisplayIfNeeded(op.cm, op.update);\n  }\n\n  function endOperation_R2(op) {\n    var cm = op.cm, display = cm.display;\n    if (op.updatedDisplay) updateHeightsInViewport(cm);\n\n    op.barMeasure = measureForScrollbars(cm);\n\n    // If the max line changed since it was last measured, measure it,\n    // and ensure the document's width matches it.\n    // updateDisplay_W2 will use these properties to do the actual resizing\n    if (display.maxLineChanged && !cm.options.lineWrapping) {\n      op.adjustWidthTo = measureChar(cm, display.maxLine, display.maxLine.text.length).left + 3;\n      cm.display.sizerWidth = op.adjustWidthTo;\n      op.barMeasure.scrollWidth =\n        Math.max(display.scroller.clientWidth, display.sizer.offsetLeft + op.adjustWidthTo + scrollGap(cm) + cm.display.barWidth);\n      op.maxScrollLeft = Math.max(0, display.sizer.offsetLeft + op.adjustWidthTo - displayWidth(cm));\n    }\n\n    if (op.updatedDisplay || op.selectionChanged)\n      op.preparedSelection = display.input.prepareSelection();\n  }\n\n  function endOperation_W2(op) {\n    var cm = op.cm;\n\n    if (op.adjustWidthTo != null) {\n      cm.display.sizer.style.minWidth = op.adjustWidthTo + \"px\";\n      if (op.maxScrollLeft < cm.doc.scrollLeft)\n        setScrollLeft(cm, Math.min(cm.display.scroller.scrollLeft, op.maxScrollLeft), true);\n      cm.display.maxLineChanged = false;\n    }\n\n    if (op.preparedSelection)\n      cm.display.input.showSelection(op.preparedSelection);\n    if (op.updatedDisplay)\n      setDocumentHeight(cm, op.barMeasure);\n    if (op.updatedDisplay || op.startHeight != cm.doc.height)\n      updateScrollbars(cm, op.barMeasure);\n\n    if (op.selectionChanged) restartBlink(cm);\n\n    if (cm.state.focused && op.updateInput)\n      cm.display.input.reset(op.typing);\n  }\n\n  function endOperation_finish(op) {\n    var cm = op.cm, display = cm.display, doc = cm.doc;\n\n    if (op.updatedDisplay) postUpdateDisplay(cm, op.update);\n\n    // Abort mouse wheel delta measurement, when scrolling explicitly\n    if (display.wheelStartX != null && (op.scrollTop != null || op.scrollLeft != null || op.scrollToPos))\n      display.wheelStartX = display.wheelStartY = null;\n\n    // Propagate the scroll position to the actual DOM scroller\n    if (op.scrollTop != null && (display.scroller.scrollTop != op.scrollTop || op.forceScroll)) {\n      doc.scrollTop = Math.max(0, Math.min(display.scroller.scrollHeight - display.scroller.clientHeight, op.scrollTop));\n      display.scrollbars.setScrollTop(doc.scrollTop);\n      display.scroller.scrollTop = doc.scrollTop;\n    }\n    if (op.scrollLeft != null && (display.scroller.scrollLeft != op.scrollLeft || op.forceScroll)) {\n      doc.scrollLeft = Math.max(0, Math.min(display.scroller.scrollWidth - displayWidth(cm), op.scrollLeft));\n      display.scrollbars.setScrollLeft(doc.scrollLeft);\n      display.scroller.scrollLeft = doc.scrollLeft;\n      alignHorizontally(cm);\n    }\n    // If we need to scroll a specific position into view, do so.\n    if (op.scrollToPos) {\n      var coords = scrollPosIntoView(cm, clipPos(doc, op.scrollToPos.from),\n                                     clipPos(doc, op.scrollToPos.to), op.scrollToPos.margin);\n      if (op.scrollToPos.isCursor && cm.state.focused) maybeScrollWindow(cm, coords);\n    }\n\n    // Fire events for markers that are hidden/unidden by editing or\n    // undoing\n    var hidden = op.maybeHiddenMarkers, unhidden = op.maybeUnhiddenMarkers;\n    if (hidden) for (var i = 0; i < hidden.length; ++i)\n      if (!hidden[i].lines.length) signal(hidden[i], \"hide\");\n    if (unhidden) for (var i = 0; i < unhidden.length; ++i)\n      if (unhidden[i].lines.length) signal(unhidden[i], \"unhide\");\n\n    if (display.wrapper.offsetHeight)\n      doc.scrollTop = cm.display.scroller.scrollTop;\n\n    // Fire change events, and delayed event handlers\n    if (op.changeObjs)\n      signal(cm, \"changes\", cm, op.changeObjs);\n    if (op.update)\n      op.update.finish();\n  }\n\n  // Run the given function in an operation\n  function runInOp(cm, f) {\n    if (cm.curOp) return f();\n    startOperation(cm);\n    try { return f(); }\n    finally { endOperation(cm); }\n  }\n  // Wraps a function in an operation. Returns the wrapped function.\n  function operation(cm, f) {\n    return function() {\n      if (cm.curOp) return f.apply(cm, arguments);\n      startOperation(cm);\n      try { return f.apply(cm, arguments); }\n      finally { endOperation(cm); }\n    };\n  }\n  // Used to add methods to editor and doc instances, wrapping them in\n  // operations.\n  function methodOp(f) {\n    return function() {\n      if (this.curOp) return f.apply(this, arguments);\n      startOperation(this);\n      try { return f.apply(this, arguments); }\n      finally { endOperation(this); }\n    };\n  }\n  function docMethodOp(f) {\n    return function() {\n      var cm = this.cm;\n      if (!cm || cm.curOp) return f.apply(this, arguments);\n      startOperation(cm);\n      try { return f.apply(this, arguments); }\n      finally { endOperation(cm); }\n    };\n  }\n\n  // VIEW TRACKING\n\n  // These objects are used to represent the visible (currently drawn)\n  // part of the document. A LineView may correspond to multiple\n  // logical lines, if those are connected by collapsed ranges.\n  function LineView(doc, line, lineN) {\n    // The starting line\n    this.line = line;\n    // Continuing lines, if any\n    this.rest = visualLineContinued(line);\n    // Number of logical lines in this visual line\n    this.size = this.rest ? lineNo(lst(this.rest)) - lineN + 1 : 1;\n    this.node = this.text = null;\n    this.hidden = lineIsHidden(doc, line);\n  }\n\n  // Create a range of LineView objects for the given lines.\n  function buildViewArray(cm, from, to) {\n    var array = [], nextPos;\n    for (var pos = from; pos < to; pos = nextPos) {\n      var view = new LineView(cm.doc, getLine(cm.doc, pos), pos);\n      nextPos = pos + view.size;\n      array.push(view);\n    }\n    return array;\n  }\n\n  // Updates the display.view data structure for a given change to the\n  // document. From and to are in pre-change coordinates. Lendiff is\n  // the amount of lines added or subtracted by the change. This is\n  // used for changes that span multiple lines, or change the way\n  // lines are divided into visual lines. regLineChange (below)\n  // registers single-line changes.\n  function regChange(cm, from, to, lendiff) {\n    if (from == null) from = cm.doc.first;\n    if (to == null) to = cm.doc.first + cm.doc.size;\n    if (!lendiff) lendiff = 0;\n\n    var display = cm.display;\n    if (lendiff && to < display.viewTo &&\n        (display.updateLineNumbers == null || display.updateLineNumbers > from))\n      display.updateLineNumbers = from;\n\n    cm.curOp.viewChanged = true;\n\n    if (from >= display.viewTo) { // Change after\n      if (sawCollapsedSpans && visualLineNo(cm.doc, from) < display.viewTo)\n        resetView(cm);\n    } else if (to <= display.viewFrom) { // Change before\n      if (sawCollapsedSpans && visualLineEndNo(cm.doc, to + lendiff) > display.viewFrom) {\n        resetView(cm);\n      } else {\n        display.viewFrom += lendiff;\n        display.viewTo += lendiff;\n      }\n    } else if (from <= display.viewFrom && to >= display.viewTo) { // Full overlap\n      resetView(cm);\n    } else if (from <= display.viewFrom) { // Top overlap\n      var cut = viewCuttingPoint(cm, to, to + lendiff, 1);\n      if (cut) {\n        display.view = display.view.slice(cut.index);\n        display.viewFrom = cut.lineN;\n        display.viewTo += lendiff;\n      } else {\n        resetView(cm);\n      }\n    } else if (to >= display.viewTo) { // Bottom overlap\n      var cut = viewCuttingPoint(cm, from, from, -1);\n      if (cut) {\n        display.view = display.view.slice(0, cut.index);\n        display.viewTo = cut.lineN;\n      } else {\n        resetView(cm);\n      }\n    } else { // Gap in the middle\n      var cutTop = viewCuttingPoint(cm, from, from, -1);\n      var cutBot = viewCuttingPoint(cm, to, to + lendiff, 1);\n      if (cutTop && cutBot) {\n        display.view = display.view.slice(0, cutTop.index)\n          .concat(buildViewArray(cm, cutTop.lineN, cutBot.lineN))\n          .concat(display.view.slice(cutBot.index));\n        display.viewTo += lendiff;\n      } else {\n        resetView(cm);\n      }\n    }\n\n    var ext = display.externalMeasured;\n    if (ext) {\n      if (to < ext.lineN)\n        ext.lineN += lendiff;\n      else if (from < ext.lineN + ext.size)\n        display.externalMeasured = null;\n    }\n  }\n\n  // Register a change to a single line. Type must be one of \"text\",\n  // \"gutter\", \"class\", \"widget\"\n  function regLineChange(cm, line, type) {\n    cm.curOp.viewChanged = true;\n    var display = cm.display, ext = cm.display.externalMeasured;\n    if (ext && line >= ext.lineN && line < ext.lineN + ext.size)\n      display.externalMeasured = null;\n\n    if (line < display.viewFrom || line >= display.viewTo) return;\n    var lineView = display.view[findViewIndex(cm, line)];\n    if (lineView.node == null) return;\n    var arr = lineView.changes || (lineView.changes = []);\n    if (indexOf(arr, type) == -1) arr.push(type);\n  }\n\n  // Clear the view.\n  function resetView(cm) {\n    cm.display.viewFrom = cm.display.viewTo = cm.doc.first;\n    cm.display.view = [];\n    cm.display.viewOffset = 0;\n  }\n\n  // Find the view element corresponding to a given line. Return null\n  // when the line isn't visible.\n  function findViewIndex(cm, n) {\n    if (n >= cm.display.viewTo) return null;\n    n -= cm.display.viewFrom;\n    if (n < 0) return null;\n    var view = cm.display.view;\n    for (var i = 0; i < view.length; i++) {\n      n -= view[i].size;\n      if (n < 0) return i;\n    }\n  }\n\n  function viewCuttingPoint(cm, oldN, newN, dir) {\n    var index = findViewIndex(cm, oldN), diff, view = cm.display.view;\n    if (!sawCollapsedSpans || newN == cm.doc.first + cm.doc.size)\n      return {index: index, lineN: newN};\n    for (var i = 0, n = cm.display.viewFrom; i < index; i++)\n      n += view[i].size;\n    if (n != oldN) {\n      if (dir > 0) {\n        if (index == view.length - 1) return null;\n        diff = (n + view[index].size) - oldN;\n        index++;\n      } else {\n        diff = n - oldN;\n      }\n      oldN += diff; newN += diff;\n    }\n    while (visualLineNo(cm.doc, newN) != newN) {\n      if (index == (dir < 0 ? 0 : view.length - 1)) return null;\n      newN += dir * view[index - (dir < 0 ? 1 : 0)].size;\n      index += dir;\n    }\n    return {index: index, lineN: newN};\n  }\n\n  // Force the view to cover a given range, adding empty view element\n  // or clipping off existing ones as needed.\n  function adjustView(cm, from, to) {\n    var display = cm.display, view = display.view;\n    if (view.length == 0 || from >= display.viewTo || to <= display.viewFrom) {\n      display.view = buildViewArray(cm, from, to);\n      display.viewFrom = from;\n    } else {\n      if (display.viewFrom > from)\n        display.view = buildViewArray(cm, from, display.viewFrom).concat(display.view);\n      else if (display.viewFrom < from)\n        display.view = display.view.slice(findViewIndex(cm, from));\n      display.viewFrom = from;\n      if (display.viewTo < to)\n        display.view = display.view.concat(buildViewArray(cm, display.viewTo, to));\n      else if (display.viewTo > to)\n        display.view = display.view.slice(0, findViewIndex(cm, to));\n    }\n    display.viewTo = to;\n  }\n\n  // Count the number of lines in the view whose DOM representation is\n  // out of date (or nonexistent).\n  function countDirtyView(cm) {\n    var view = cm.display.view, dirty = 0;\n    for (var i = 0; i < view.length; i++) {\n      var lineView = view[i];\n      if (!lineView.hidden && (!lineView.node || lineView.changes)) ++dirty;\n    }\n    return dirty;\n  }\n\n  // EVENT HANDLERS\n\n  // Attach the necessary event handlers when initializing the editor\n  function registerEventHandlers(cm) {\n    var d = cm.display;\n    on(d.scroller, \"mousedown\", operation(cm, onMouseDown));\n    // Older IE's will not fire a second mousedown for a double click\n    if (ie && ie_version < 11)\n      on(d.scroller, \"dblclick\", operation(cm, function(e) {\n        if (signalDOMEvent(cm, e)) return;\n        var pos = posFromMouse(cm, e);\n        if (!pos || clickInGutter(cm, e) || eventInWidget(cm.display, e)) return;\n        e_preventDefault(e);\n        var word = cm.findWordAt(pos);\n        extendSelection(cm.doc, word.anchor, word.head);\n      }));\n    else\n      on(d.scroller, \"dblclick\", function(e) { signalDOMEvent(cm, e) || e_preventDefault(e); });\n    // Some browsers fire contextmenu *after* opening the menu, at\n    // which point we can't mess with it anymore. Context menu is\n    // handled in onMouseDown for these browsers.\n    if (!captureRightClick) on(d.scroller, \"contextmenu\", function(e) {onContextMenu(cm, e);});\n\n    // Used to suppress mouse event handling when a touch happens\n    var touchFinished, prevTouch = {end: 0};\n    function finishTouch() {\n      if (d.activeTouch) {\n        touchFinished = setTimeout(function() {d.activeTouch = null;}, 1000);\n        prevTouch = d.activeTouch;\n        prevTouch.end = +new Date;\n      }\n    };\n    function isMouseLikeTouchEvent(e) {\n      if (e.touches.length != 1) return false;\n      var touch = e.touches[0];\n      return touch.radiusX <= 1 && touch.radiusY <= 1;\n    }\n    function farAway(touch, other) {\n      if (other.left == null) return true;\n      var dx = other.left - touch.left, dy = other.top - touch.top;\n      return dx * dx + dy * dy > 20 * 20;\n    }\n    on(d.scroller, \"touchstart\", function(e) {\n      if (!isMouseLikeTouchEvent(e)) {\n        clearTimeout(touchFinished);\n        var now = +new Date;\n        d.activeTouch = {start: now, moved: false,\n                         prev: now - prevTouch.end <= 300 ? prevTouch : null};\n        if (e.touches.length == 1) {\n          d.activeTouch.left = e.touches[0].pageX;\n          d.activeTouch.top = e.touches[0].pageY;\n        }\n      }\n    });\n    on(d.scroller, \"touchmove\", function() {\n      if (d.activeTouch) d.activeTouch.moved = true;\n    });\n    on(d.scroller, \"touchend\", function(e) {\n      var touch = d.activeTouch;\n      if (touch && !eventInWidget(d, e) && touch.left != null &&\n          !touch.moved && new Date - touch.start < 300) {\n        var pos = cm.coordsChar(d.activeTouch, \"page\"), range;\n        if (!touch.prev || farAway(touch, touch.prev)) // Single tap\n          range = new Range(pos, pos);\n        else if (!touch.prev.prev || farAway(touch, touch.prev.prev)) // Double tap\n          range = cm.findWordAt(pos);\n        else // Triple tap\n          range = new Range(Pos(pos.line, 0), clipPos(cm.doc, Pos(pos.line + 1, 0)));\n        cm.setSelection(range.anchor, range.head);\n        cm.focus();\n        e_preventDefault(e);\n      }\n      finishTouch();\n    });\n    on(d.scroller, \"touchcancel\", finishTouch);\n\n    // Sync scrolling between fake scrollbars and real scrollable\n    // area, ensure viewport is updated when scrolling.\n    on(d.scroller, \"scroll\", function() {\n      if (d.scroller.clientHeight) {\n        setScrollTop(cm, d.scroller.scrollTop);\n        setScrollLeft(cm, d.scroller.scrollLeft, true);\n        signal(cm, \"scroll\", cm);\n      }\n    });\n\n    // Listen to wheel events in order to try and update the viewport on time.\n    on(d.scroller, \"mousewheel\", function(e){onScrollWheel(cm, e);});\n    on(d.scroller, \"DOMMouseScroll\", function(e){onScrollWheel(cm, e);});\n\n    // Prevent wrapper from ever scrolling\n    on(d.wrapper, \"scroll\", function() { d.wrapper.scrollTop = d.wrapper.scrollLeft = 0; });\n\n    function drag_(e) {\n      if (!signalDOMEvent(cm, e)) e_stop(e);\n    }\n    if (cm.options.dragDrop) {\n      on(d.scroller, \"dragstart\", function(e){onDragStart(cm, e);});\n      on(d.scroller, \"dragenter\", drag_);\n      on(d.scroller, \"dragover\", drag_);\n      on(d.scroller, \"drop\", operation(cm, onDrop));\n    }\n\n    var inp = d.input.getField();\n    on(inp, \"keyup\", function(e) { onKeyUp.call(cm, e); });\n    on(inp, \"keydown\", operation(cm, onKeyDown));\n    on(inp, \"keypress\", operation(cm, onKeyPress));\n    on(inp, \"focus\", bind(onFocus, cm));\n    on(inp, \"blur\", bind(onBlur, cm));\n  }\n\n  // Called when the window resizes\n  function onResize(cm) {\n    var d = cm.display;\n    if (d.lastWrapHeight == d.wrapper.clientHeight && d.lastWrapWidth == d.wrapper.clientWidth)\n      return;\n    // Might be a text scaling operation, clear size caches.\n    d.cachedCharWidth = d.cachedTextHeight = d.cachedPaddingH = null;\n    d.scrollbarsClipped = false;\n    cm.setSize();\n  }\n\n  // MOUSE EVENTS\n\n  // Return true when the given mouse event happened in a widget\n  function eventInWidget(display, e) {\n    for (var n = e_target(e); n != display.wrapper; n = n.parentNode) {\n      if (!n || (n.nodeType == 1 && n.getAttribute(\"cm-ignore-events\") == \"true\") ||\n          (n.parentNode == display.sizer && n != display.mover))\n        return true;\n    }\n  }\n\n  // Given a mouse event, find the corresponding position. If liberal\n  // is false, it checks whether a gutter or scrollbar was clicked,\n  // and returns null if it was. forRect is used by rectangular\n  // selections, and tries to estimate a character position even for\n  // coordinates beyond the right of the text.\n  function posFromMouse(cm, e, liberal, forRect) {\n    var display = cm.display;\n    if (!liberal && e_target(e).getAttribute(\"cm-not-content\") == \"true\") return null;\n\n    var x, y, space = display.lineSpace.getBoundingClientRect();\n    // Fails unpredictably on IE[67] when mouse is dragged around quickly.\n    try { x = e.clientX - space.left; y = e.clientY - space.top; }\n    catch (e) { return null; }\n    var coords = coordsChar(cm, x, y), line;\n    if (forRect && coords.xRel == 1 && (line = getLine(cm.doc, coords.line).text).length == coords.ch) {\n      var colDiff = countColumn(line, line.length, cm.options.tabSize) - line.length;\n      coords = Pos(coords.line, Math.max(0, Math.round((x - paddingH(cm.display).left) / charWidth(cm.display)) - colDiff));\n    }\n    return coords;\n  }\n\n  // A mouse down can be a single click, double click, triple click,\n  // start of selection drag, start of text drag, new cursor\n  // (ctrl-click), rectangle drag (alt-drag), or xwin\n  // middle-click-paste. Or it might be a click on something we should\n  // not interfere with, such as a scrollbar or widget.\n  function onMouseDown(e) {\n    var cm = this, display = cm.display;\n    if (display.activeTouch && display.input.supportsTouch() || signalDOMEvent(cm, e)) return;\n    display.shift = e.shiftKey;\n\n    if (eventInWidget(display, e)) {\n      if (!webkit) {\n        // Briefly turn off draggability, to allow widgets to do\n        // normal dragging things.\n        display.scroller.draggable = false;\n        setTimeout(function(){display.scroller.draggable = true;}, 100);\n      }\n      return;\n    }\n    if (clickInGutter(cm, e)) return;\n    var start = posFromMouse(cm, e);\n    window.focus();\n\n    switch (e_button(e)) {\n    case 1:\n      if (start)\n        leftButtonDown(cm, e, start);\n      else if (e_target(e) == display.scroller)\n        e_preventDefault(e);\n      break;\n    case 2:\n      if (webkit) cm.state.lastMiddleDown = +new Date;\n      if (start) extendSelection(cm.doc, start);\n      setTimeout(function() {display.input.focus();}, 20);\n      e_preventDefault(e);\n      break;\n    case 3:\n      if (captureRightClick) onContextMenu(cm, e);\n      break;\n    }\n  }\n\n  var lastClick, lastDoubleClick;\n  function leftButtonDown(cm, e, start) {\n    if (ie) setTimeout(bind(ensureFocus, cm), 0);\n    else ensureFocus(cm);\n\n    var now = +new Date, type;\n    if (lastDoubleClick && lastDoubleClick.time > now - 400 && cmp(lastDoubleClick.pos, start) == 0) {\n      type = \"triple\";\n    } else if (lastClick && lastClick.time > now - 400 && cmp(lastClick.pos, start) == 0) {\n      type = \"double\";\n      lastDoubleClick = {time: now, pos: start};\n    } else {\n      type = \"single\";\n      lastClick = {time: now, pos: start};\n    }\n\n    var sel = cm.doc.sel, modifier = mac ? e.metaKey : e.ctrlKey, contained;\n    if (cm.options.dragDrop && dragAndDrop && !isReadOnly(cm) &&\n        type == \"single\" && (contained = sel.contains(start)) > -1 &&\n        !sel.ranges[contained].empty())\n      leftButtonStartDrag(cm, e, start, modifier);\n    else\n      leftButtonSelect(cm, e, start, type, modifier);\n  }\n\n  // Start a text drag. When it ends, see if any dragging actually\n  // happen, and treat as a click if it didn't.\n  function leftButtonStartDrag(cm, e, start, modifier) {\n    var display = cm.display;\n    var dragEnd = operation(cm, function(e2) {\n      if (webkit) display.scroller.draggable = false;\n      cm.state.draggingText = false;\n      off(document, \"mouseup\", dragEnd);\n      off(display.scroller, \"drop\", dragEnd);\n      if (Math.abs(e.clientX - e2.clientX) + Math.abs(e.clientY - e2.clientY) < 10) {\n        e_preventDefault(e2);\n        if (!modifier)\n          extendSelection(cm.doc, start);\n        display.input.focus();\n        // Work around unexplainable focus problem in IE9 (#2127)\n        if (ie && ie_version == 9)\n          setTimeout(function() {document.body.focus(); display.input.focus();}, 20);\n      }\n    });\n    // Let the drag handler handle this.\n    if (webkit) display.scroller.draggable = true;\n    cm.state.draggingText = dragEnd;\n    // IE's approach to draggable\n    if (display.scroller.dragDrop) display.scroller.dragDrop();\n    on(document, \"mouseup\", dragEnd);\n    on(display.scroller, \"drop\", dragEnd);\n  }\n\n  // Normal selection, as opposed to text dragging.\n  function leftButtonSelect(cm, e, start, type, addNew) {\n    var display = cm.display, doc = cm.doc;\n    e_preventDefault(e);\n\n    var ourRange, ourIndex, startSel = doc.sel, ranges = startSel.ranges;\n    if (addNew && !e.shiftKey) {\n      ourIndex = doc.sel.contains(start);\n      if (ourIndex > -1)\n        ourRange = ranges[ourIndex];\n      else\n        ourRange = new Range(start, start);\n    } else {\n      ourRange = doc.sel.primary();\n    }\n\n    if (e.altKey) {\n      type = \"rect\";\n      if (!addNew) ourRange = new Range(start, start);\n      start = posFromMouse(cm, e, true, true);\n      ourIndex = -1;\n    } else if (type == \"double\") {\n      var word = cm.findWordAt(start);\n      if (cm.display.shift || doc.extend)\n        ourRange = extendRange(doc, ourRange, word.anchor, word.head);\n      else\n        ourRange = word;\n    } else if (type == \"triple\") {\n      var line = new Range(Pos(start.line, 0), clipPos(doc, Pos(start.line + 1, 0)));\n      if (cm.display.shift || doc.extend)\n        ourRange = extendRange(doc, ourRange, line.anchor, line.head);\n      else\n        ourRange = line;\n    } else {\n      ourRange = extendRange(doc, ourRange, start);\n    }\n\n    if (!addNew) {\n      ourIndex = 0;\n      setSelection(doc, new Selection([ourRange], 0), sel_mouse);\n      startSel = doc.sel;\n    } else if (ourIndex == -1) {\n      ourIndex = ranges.length;\n      setSelection(doc, normalizeSelection(ranges.concat([ourRange]), ourIndex),\n                   {scroll: false, origin: \"*mouse\"});\n    } else if (ranges.length > 1 && ranges[ourIndex].empty() && type == \"single\") {\n      setSelection(doc, normalizeSelection(ranges.slice(0, ourIndex).concat(ranges.slice(ourIndex + 1)), 0));\n      startSel = doc.sel;\n    } else {\n      replaceOneSelection(doc, ourIndex, ourRange, sel_mouse);\n    }\n\n    var lastPos = start;\n    function extendTo(pos) {\n      if (cmp(lastPos, pos) == 0) return;\n      lastPos = pos;\n\n      if (type == \"rect\") {\n        var ranges = [], tabSize = cm.options.tabSize;\n        var startCol = countColumn(getLine(doc, start.line).text, start.ch, tabSize);\n        var posCol = countColumn(getLine(doc, pos.line).text, pos.ch, tabSize);\n        var left = Math.min(startCol, posCol), right = Math.max(startCol, posCol);\n        for (var line = Math.min(start.line, pos.line), end = Math.min(cm.lastLine(), Math.max(start.line, pos.line));\n             line <= end; line++) {\n          var text = getLine(doc, line).text, leftPos = findColumn(text, left, tabSize);\n          if (left == right)\n            ranges.push(new Range(Pos(line, leftPos), Pos(line, leftPos)));\n          else if (text.length > leftPos)\n            ranges.push(new Range(Pos(line, leftPos), Pos(line, findColumn(text, right, tabSize))));\n        }\n        if (!ranges.length) ranges.push(new Range(start, start));\n        setSelection(doc, normalizeSelection(startSel.ranges.slice(0, ourIndex).concat(ranges), ourIndex),\n                     {origin: \"*mouse\", scroll: false});\n        cm.scrollIntoView(pos);\n      } else {\n        var oldRange = ourRange;\n        var anchor = oldRange.anchor, head = pos;\n        if (type != \"single\") {\n          if (type == \"double\")\n            var range = cm.findWordAt(pos);\n          else\n            var range = new Range(Pos(pos.line, 0), clipPos(doc, Pos(pos.line + 1, 0)));\n          if (cmp(range.anchor, anchor) > 0) {\n            head = range.head;\n            anchor = minPos(oldRange.from(), range.anchor);\n          } else {\n            head = range.anchor;\n            anchor = maxPos(oldRange.to(), range.head);\n          }\n        }\n        var ranges = startSel.ranges.slice(0);\n        ranges[ourIndex] = new Range(clipPos(doc, anchor), head);\n        setSelection(doc, normalizeSelection(ranges, ourIndex), sel_mouse);\n      }\n    }\n\n    var editorSize = display.wrapper.getBoundingClientRect();\n    // Used to ensure timeout re-tries don't fire when another extend\n    // happened in the meantime (clearTimeout isn't reliable -- at\n    // least on Chrome, the timeouts still happen even when cleared,\n    // if the clear happens after their scheduled firing time).\n    var counter = 0;\n\n    function extend(e) {\n      var curCount = ++counter;\n      var cur = posFromMouse(cm, e, true, type == \"rect\");\n      if (!cur) return;\n      if (cmp(cur, lastPos) != 0) {\n        ensureFocus(cm);\n        extendTo(cur);\n        var visible = visibleLines(display, doc);\n        if (cur.line >= visible.to || cur.line < visible.from)\n          setTimeout(operation(cm, function(){if (counter == curCount) extend(e);}), 150);\n      } else {\n        var outside = e.clientY < editorSize.top ? -20 : e.clientY > editorSize.bottom ? 20 : 0;\n        if (outside) setTimeout(operation(cm, function() {\n          if (counter != curCount) return;\n          display.scroller.scrollTop += outside;\n          extend(e);\n        }), 50);\n      }\n    }\n\n    function done(e) {\n      counter = Infinity;\n      e_preventDefault(e);\n      display.input.focus();\n      off(document, \"mousemove\", move);\n      off(document, \"mouseup\", up);\n      doc.history.lastSelOrigin = null;\n    }\n\n    var move = operation(cm, function(e) {\n      if (!e_button(e)) done(e);\n      else extend(e);\n    });\n    var up = operation(cm, done);\n    on(document, \"mousemove\", move);\n    on(document, \"mouseup\", up);\n  }\n\n  // Determines whether an event happened in the gutter, and fires the\n  // handlers for the corresponding event.\n  function gutterEvent(cm, e, type, prevent, signalfn) {\n    try { var mX = e.clientX, mY = e.clientY; }\n    catch(e) { return false; }\n    if (mX >= Math.floor(cm.display.gutters.getBoundingClientRect().right)) return false;\n    if (prevent) e_preventDefault(e);\n\n    var display = cm.display;\n    var lineBox = display.lineDiv.getBoundingClientRect();\n\n    if (mY > lineBox.bottom || !hasHandler(cm, type)) return e_defaultPrevented(e);\n    mY -= lineBox.top - display.viewOffset;\n\n    for (var i = 0; i < cm.options.gutters.length; ++i) {\n      var g = display.gutters.childNodes[i];\n      if (g && g.getBoundingClientRect().right >= mX) {\n        var line = lineAtHeight(cm.doc, mY);\n        var gutter = cm.options.gutters[i];\n        signalfn(cm, type, cm, line, gutter, e);\n        return e_defaultPrevented(e);\n      }\n    }\n  }\n\n  function clickInGutter(cm, e) {\n    return gutterEvent(cm, e, \"gutterClick\", true, signalLater);\n  }\n\n  // Kludge to work around strange IE behavior where it'll sometimes\n  // re-fire a series of drag-related events right after the drop (#1551)\n  var lastDrop = 0;\n\n  function onDrop(e) {\n    var cm = this;\n    if (signalDOMEvent(cm, e) || eventInWidget(cm.display, e))\n      return;\n    e_preventDefault(e);\n    if (ie) lastDrop = +new Date;\n    var pos = posFromMouse(cm, e, true), files = e.dataTransfer.files;\n    if (!pos || isReadOnly(cm)) return;\n    // Might be a file drop, in which case we simply extract the text\n    // and insert it.\n    if (files && files.length && window.FileReader && window.File) {\n      var n = files.length, text = Array(n), read = 0;\n      var loadFile = function(file, i) {\n        var reader = new FileReader;\n        reader.onload = operation(cm, function() {\n          text[i] = reader.result;\n          if (++read == n) {\n            pos = clipPos(cm.doc, pos);\n            var change = {from: pos, to: pos, text: splitLines(text.join(\"\\n\")), origin: \"paste\"};\n            makeChange(cm.doc, change);\n            setSelectionReplaceHistory(cm.doc, simpleSelection(pos, changeEnd(change)));\n          }\n        });\n        reader.readAsText(file);\n      };\n      for (var i = 0; i < n; ++i) loadFile(files[i], i);\n    } else { // Normal drop\n      // Don't do a replace if the drop happened inside of the selected text.\n      if (cm.state.draggingText && cm.doc.sel.contains(pos) > -1) {\n        cm.state.draggingText(e);\n        // Ensure the editor is re-focused\n        setTimeout(function() {cm.display.input.focus();}, 20);\n        return;\n      }\n      try {\n        var text = e.dataTransfer.getData(\"Text\");\n        if (text) {\n          if (cm.state.draggingText && !(mac ? e.metaKey : e.ctrlKey))\n            var selected = cm.listSelections();\n          setSelectionNoUndo(cm.doc, simpleSelection(pos, pos));\n          if (selected) for (var i = 0; i < selected.length; ++i)\n            replaceRange(cm.doc, \"\", selected[i].anchor, selected[i].head, \"drag\");\n          cm.replaceSelection(text, \"around\", \"paste\");\n          cm.display.input.focus();\n        }\n      }\n      catch(e){}\n    }\n  }\n\n  function onDragStart(cm, e) {\n    if (ie && (!cm.state.draggingText || +new Date - lastDrop < 100)) { e_stop(e); return; }\n    if (signalDOMEvent(cm, e) || eventInWidget(cm.display, e)) return;\n\n    e.dataTransfer.setData(\"Text\", cm.getSelection());\n\n    // Use dummy image instead of default browsers image.\n    // Recent Safari (~6.0.2) have a tendency to segfault when this happens, so we don't do it there.\n    if (e.dataTransfer.setDragImage && !safari) {\n      var img = elt(\"img\", null, null, \"position: fixed; left: 0; top: 0;\");\n      img.src = \"data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==\";\n      if (presto) {\n        img.width = img.height = 1;\n        cm.display.wrapper.appendChild(img);\n        // Force a relayout, or Opera won't use our image for some obscure reason\n        img._top = img.offsetTop;\n      }\n      e.dataTransfer.setDragImage(img, 0, 0);\n      if (presto) img.parentNode.removeChild(img);\n    }\n  }\n\n  // SCROLL EVENTS\n\n  // Sync the scrollable area and scrollbars, ensure the viewport\n  // covers the visible area.\n  function setScrollTop(cm, val) {\n    if (Math.abs(cm.doc.scrollTop - val) < 2) return;\n    cm.doc.scrollTop = val;\n    if (!gecko) updateDisplaySimple(cm, {top: val});\n    if (cm.display.scroller.scrollTop != val) cm.display.scroller.scrollTop = val;\n    cm.display.scrollbars.setScrollTop(val);\n    if (gecko) updateDisplaySimple(cm);\n    startWorker(cm, 100);\n  }\n  // Sync scroller and scrollbar, ensure the gutter elements are\n  // aligned.\n  function setScrollLeft(cm, val, isScroller) {\n    if (isScroller ? val == cm.doc.scrollLeft : Math.abs(cm.doc.scrollLeft - val) < 2) return;\n    val = Math.min(val, cm.display.scroller.scrollWidth - cm.display.scroller.clientWidth);\n    cm.doc.scrollLeft = val;\n    alignHorizontally(cm);\n    if (cm.display.scroller.scrollLeft != val) cm.display.scroller.scrollLeft = val;\n    cm.display.scrollbars.setScrollLeft(val);\n  }\n\n  // Since the delta values reported on mouse wheel events are\n  // unstandardized between browsers and even browser versions, and\n  // generally horribly unpredictable, this code starts by measuring\n  // the scroll effect that the first few mouse wheel events have,\n  // and, from that, detects the way it can convert deltas to pixel\n  // offsets afterwards.\n  //\n  // The reason we want to know the amount a wheel event will scroll\n  // is that it gives us a chance to update the display before the\n  // actual scrolling happens, reducing flickering.\n\n  var wheelSamples = 0, wheelPixelsPerUnit = null;\n  // Fill in a browser-detected starting value on browsers where we\n  // know one. These don't have to be accurate -- the result of them\n  // being wrong would just be a slight flicker on the first wheel\n  // scroll (if it is large enough).\n  if (ie) wheelPixelsPerUnit = -.53;\n  else if (gecko) wheelPixelsPerUnit = 15;\n  else if (chrome) wheelPixelsPerUnit = -.7;\n  else if (safari) wheelPixelsPerUnit = -1/3;\n\n  var wheelEventDelta = function(e) {\n    var dx = e.wheelDeltaX, dy = e.wheelDeltaY;\n    if (dx == null && e.detail && e.axis == e.HORIZONTAL_AXIS) dx = e.detail;\n    if (dy == null && e.detail && e.axis == e.VERTICAL_AXIS) dy = e.detail;\n    else if (dy == null) dy = e.wheelDelta;\n    return {x: dx, y: dy};\n  };\n  CodeMirror.wheelEventPixels = function(e) {\n    var delta = wheelEventDelta(e);\n    delta.x *= wheelPixelsPerUnit;\n    delta.y *= wheelPixelsPerUnit;\n    return delta;\n  };\n\n  function onScrollWheel(cm, e) {\n    var delta = wheelEventDelta(e), dx = delta.x, dy = delta.y;\n\n    var display = cm.display, scroll = display.scroller;\n    // Quit if there's nothing to scroll here\n    if (!(dx && scroll.scrollWidth > scroll.clientWidth ||\n          dy && scroll.scrollHeight > scroll.clientHeight)) return;\n\n    // Webkit browsers on OS X abort momentum scrolls when the target\n    // of the scroll event is removed from the scrollable element.\n    // This hack (see related code in patchDisplay) makes sure the\n    // element is kept around.\n    if (dy && mac && webkit) {\n      outer: for (var cur = e.target, view = display.view; cur != scroll; cur = cur.parentNode) {\n        for (var i = 0; i < view.length; i++) {\n          if (view[i].node == cur) {\n            cm.display.currentWheelTarget = cur;\n            break outer;\n          }\n        }\n      }\n    }\n\n    // On some browsers, horizontal scrolling will cause redraws to\n    // happen before the gutter has been realigned, causing it to\n    // wriggle around in a most unseemly way. When we have an\n    // estimated pixels/delta value, we just handle horizontal\n    // scrolling entirely here. It'll be slightly off from native, but\n    // better than glitching out.\n    if (dx && !gecko && !presto && wheelPixelsPerUnit != null) {\n      if (dy)\n        setScrollTop(cm, Math.max(0, Math.min(scroll.scrollTop + dy * wheelPixelsPerUnit, scroll.scrollHeight - scroll.clientHeight)));\n      setScrollLeft(cm, Math.max(0, Math.min(scroll.scrollLeft + dx * wheelPixelsPerUnit, scroll.scrollWidth - scroll.clientWidth)));\n      e_preventDefault(e);\n      display.wheelStartX = null; // Abort measurement, if in progress\n      return;\n    }\n\n    // 'Project' the visible viewport to cover the area that is being\n    // scrolled into view (if we know enough to estimate it).\n    if (dy && wheelPixelsPerUnit != null) {\n      var pixels = dy * wheelPixelsPerUnit;\n      var top = cm.doc.scrollTop, bot = top + display.wrapper.clientHeight;\n      if (pixels < 0) top = Math.max(0, top + pixels - 50);\n      else bot = Math.min(cm.doc.height, bot + pixels + 50);\n      updateDisplaySimple(cm, {top: top, bottom: bot});\n    }\n\n    if (wheelSamples < 20) {\n      if (display.wheelStartX == null) {\n        display.wheelStartX = scroll.scrollLeft; display.wheelStartY = scroll.scrollTop;\n        display.wheelDX = dx; display.wheelDY = dy;\n        setTimeout(function() {\n          if (display.wheelStartX == null) return;\n          var movedX = scroll.scrollLeft - display.wheelStartX;\n          var movedY = scroll.scrollTop - display.wheelStartY;\n          var sample = (movedY && display.wheelDY && movedY / display.wheelDY) ||\n            (movedX && display.wheelDX && movedX / display.wheelDX);\n          display.wheelStartX = display.wheelStartY = null;\n          if (!sample) return;\n          wheelPixelsPerUnit = (wheelPixelsPerUnit * wheelSamples + sample) / (wheelSamples + 1);\n          ++wheelSamples;\n        }, 200);\n      } else {\n        display.wheelDX += dx; display.wheelDY += dy;\n      }\n    }\n  }\n\n  // KEY EVENTS\n\n  // Run a handler that was bound to a key.\n  function doHandleBinding(cm, bound, dropShift) {\n    if (typeof bound == \"string\") {\n      bound = commands[bound];\n      if (!bound) return false;\n    }\n    // Ensure previous input has been read, so that the handler sees a\n    // consistent view of the document\n    cm.display.input.ensurePolled();\n    var prevShift = cm.display.shift, done = false;\n    try {\n      if (isReadOnly(cm)) cm.state.suppressEdits = true;\n      if (dropShift) cm.display.shift = false;\n      done = bound(cm) != Pass;\n    } finally {\n      cm.display.shift = prevShift;\n      cm.state.suppressEdits = false;\n    }\n    return done;\n  }\n\n  function lookupKeyForEditor(cm, name, handle) {\n    for (var i = 0; i < cm.state.keyMaps.length; i++) {\n      var result = lookupKey(name, cm.state.keyMaps[i], handle, cm);\n      if (result) return result;\n    }\n    return (cm.options.extraKeys && lookupKey(name, cm.options.extraKeys, handle, cm))\n      || lookupKey(name, cm.options.keyMap, handle, cm);\n  }\n\n  var stopSeq = new Delayed;\n  function dispatchKey(cm, name, e, handle) {\n    var seq = cm.state.keySeq;\n    if (seq) {\n      if (isModifierKey(name)) return \"handled\";\n      stopSeq.set(50, function() {\n        if (cm.state.keySeq == seq) {\n          cm.state.keySeq = null;\n          cm.display.input.reset();\n        }\n      });\n      name = seq + \" \" + name;\n    }\n    var result = lookupKeyForEditor(cm, name, handle);\n\n    if (result == \"multi\")\n      cm.state.keySeq = name;\n    if (result == \"handled\")\n      signalLater(cm, \"keyHandled\", cm, name, e);\n\n    if (result == \"handled\" || result == \"multi\") {\n      e_preventDefault(e);\n      restartBlink(cm);\n    }\n\n    if (seq && !result && /\\'$/.test(name)) {\n      e_preventDefault(e);\n      return true;\n    }\n    return !!result;\n  }\n\n  // Handle a key from the keydown event.\n  function handleKeyBinding(cm, e) {\n    var name = keyName(e, true);\n    if (!name) return false;\n\n    if (e.shiftKey && !cm.state.keySeq) {\n      // First try to resolve full name (including 'Shift-'). Failing\n      // that, see if there is a cursor-motion command (starting with\n      // 'go') bound to the keyname without 'Shift-'.\n      return dispatchKey(cm, \"Shift-\" + name, e, function(b) {return doHandleBinding(cm, b, true);})\n          || dispatchKey(cm, name, e, function(b) {\n               if (typeof b == \"string\" ? /^go[A-Z]/.test(b) : b.motion)\n                 return doHandleBinding(cm, b);\n             });\n    } else {\n      return dispatchKey(cm, name, e, function(b) { return doHandleBinding(cm, b); });\n    }\n  }\n\n  // Handle a key from the keypress event\n  function handleCharBinding(cm, e, ch) {\n    return dispatchKey(cm, \"'\" + ch + \"'\", e,\n                       function(b) { return doHandleBinding(cm, b, true); });\n  }\n\n  var lastStoppedKey = null;\n  function onKeyDown(e) {\n    var cm = this;\n    ensureFocus(cm);\n    if (signalDOMEvent(cm, e)) return;\n    // IE does strange things with escape.\n    if (ie && ie_version < 11 && e.keyCode == 27) e.returnValue = false;\n    var code = e.keyCode;\n    cm.display.shift = code == 16 || e.shiftKey;\n    var handled = handleKeyBinding(cm, e);\n    if (presto) {\n      lastStoppedKey = handled ? code : null;\n      // Opera has no cut event... we try to at least catch the key combo\n      if (!handled && code == 88 && !hasCopyEvent && (mac ? e.metaKey : e.ctrlKey))\n        cm.replaceSelection(\"\", null, \"cut\");\n    }\n\n    // Turn mouse into crosshair when Alt is held on Mac.\n    if (code == 18 && !/\\bCodeMirror-crosshair\\b/.test(cm.display.lineDiv.className))\n      showCrossHair(cm);\n  }\n\n  function showCrossHair(cm) {\n    var lineDiv = cm.display.lineDiv;\n    addClass(lineDiv, \"CodeMirror-crosshair\");\n\n    function up(e) {\n      if (e.keyCode == 18 || !e.altKey) {\n        rmClass(lineDiv, \"CodeMirror-crosshair\");\n        off(document, \"keyup\", up);\n        off(document, \"mouseover\", up);\n      }\n    }\n    on(document, \"keyup\", up);\n    on(document, \"mouseover\", up);\n  }\n\n  function onKeyUp(e) {\n    if (e.keyCode == 16) this.doc.sel.shift = false;\n    signalDOMEvent(this, e);\n  }\n\n  function onKeyPress(e) {\n    var cm = this;\n    if (eventInWidget(cm.display, e) || signalDOMEvent(cm, e) || e.ctrlKey && !e.altKey || mac && e.metaKey) return;\n    var keyCode = e.keyCode, charCode = e.charCode;\n    if (presto && keyCode == lastStoppedKey) {lastStoppedKey = null; e_preventDefault(e); return;}\n    if ((presto && (!e.which || e.which < 10)) && handleKeyBinding(cm, e)) return;\n    var ch = String.fromCharCode(charCode == null ? keyCode : charCode);\n    if (handleCharBinding(cm, e, ch)) return;\n    cm.display.input.onKeyPress(e);\n  }\n\n  // FOCUS/BLUR EVENTS\n\n  function onFocus(cm) {\n    if (cm.options.readOnly == \"nocursor\") return;\n    if (!cm.state.focused) {\n      signal(cm, \"focus\", cm);\n      cm.state.focused = true;\n      addClass(cm.display.wrapper, \"CodeMirror-focused\");\n      // This test prevents this from firing when a context\n      // menu is closed (since the input reset would kill the\n      // select-all detection hack)\n      if (!cm.curOp && cm.display.selForContextMenu != cm.doc.sel) {\n        cm.display.input.reset();\n        if (webkit) setTimeout(function() { cm.display.input.reset(true); }, 20); // Issue #1730\n      }\n      cm.display.input.receivedFocus();\n    }\n    restartBlink(cm);\n  }\n  function onBlur(cm) {\n    if (cm.state.focused) {\n      signal(cm, \"blur\", cm);\n      cm.state.focused = false;\n      rmClass(cm.display.wrapper, \"CodeMirror-focused\");\n    }\n    clearInterval(cm.display.blinker);\n    setTimeout(function() {if (!cm.state.focused) cm.display.shift = false;}, 150);\n  }\n\n  // CONTEXT MENU HANDLING\n\n  // To make the context menu work, we need to briefly unhide the\n  // textarea (making it as unobtrusive as possible) to let the\n  // right-click take effect on it.\n  function onContextMenu(cm, e) {\n    if (eventInWidget(cm.display, e) || contextMenuInGutter(cm, e)) return;\n    cm.display.input.onContextMenu(e);\n  }\n\n  function contextMenuInGutter(cm, e) {\n    if (!hasHandler(cm, \"gutterContextMenu\")) return false;\n    return gutterEvent(cm, e, \"gutterContextMenu\", false, signal);\n  }\n\n  // UPDATING\n\n  // Compute the position of the end of a change (its 'to' property\n  // refers to the pre-change end).\n  var changeEnd = CodeMirror.changeEnd = function(change) {\n    if (!change.text) return change.to;\n    return Pos(change.from.line + change.text.length - 1,\n               lst(change.text).length + (change.text.length == 1 ? change.from.ch : 0));\n  };\n\n  // Adjust a position to refer to the post-change position of the\n  // same text, or the end of the change if the change covers it.\n  function adjustForChange(pos, change) {\n    if (cmp(pos, change.from) < 0) return pos;\n    if (cmp(pos, change.to) <= 0) return changeEnd(change);\n\n    var line = pos.line + change.text.length - (change.to.line - change.from.line) - 1, ch = pos.ch;\n    if (pos.line == change.to.line) ch += changeEnd(change).ch - change.to.ch;\n    return Pos(line, ch);\n  }\n\n  function computeSelAfterChange(doc, change) {\n    var out = [];\n    for (var i = 0; i < doc.sel.ranges.length; i++) {\n      var range = doc.sel.ranges[i];\n      out.push(new Range(adjustForChange(range.anchor, change),\n                         adjustForChange(range.head, change)));\n    }\n    return normalizeSelection(out, doc.sel.primIndex);\n  }\n\n  function offsetPos(pos, old, nw) {\n    if (pos.line == old.line)\n      return Pos(nw.line, pos.ch - old.ch + nw.ch);\n    else\n      return Pos(nw.line + (pos.line - old.line), pos.ch);\n  }\n\n  // Used by replaceSelections to allow moving the selection to the\n  // start or around the replaced test. Hint may be \"start\" or \"around\".\n  function computeReplacedSel(doc, changes, hint) {\n    var out = [];\n    var oldPrev = Pos(doc.first, 0), newPrev = oldPrev;\n    for (var i = 0; i < changes.length; i++) {\n      var change = changes[i];\n      var from = offsetPos(change.from, oldPrev, newPrev);\n      var to = offsetPos(changeEnd(change), oldPrev, newPrev);\n      oldPrev = change.to;\n      newPrev = to;\n      if (hint == \"around\") {\n        var range = doc.sel.ranges[i], inv = cmp(range.head, range.anchor) < 0;\n        out[i] = new Range(inv ? to : from, inv ? from : to);\n      } else {\n        out[i] = new Range(from, from);\n      }\n    }\n    return new Selection(out, doc.sel.primIndex);\n  }\n\n  // Allow \"beforeChange\" event handlers to influence a change\n  function filterChange(doc, change, update) {\n    var obj = {\n      canceled: false,\n      from: change.from,\n      to: change.to,\n      text: change.text,\n      origin: change.origin,\n      cancel: function() { this.canceled = true; }\n    };\n    if (update) obj.update = function(from, to, text, origin) {\n      if (from) this.from = clipPos(doc, from);\n      if (to) this.to = clipPos(doc, to);\n      if (text) this.text = text;\n      if (origin !== undefined) this.origin = origin;\n    };\n    signal(doc, \"beforeChange\", doc, obj);\n    if (doc.cm) signal(doc.cm, \"beforeChange\", doc.cm, obj);\n\n    if (obj.canceled) return null;\n    return {from: obj.from, to: obj.to, text: obj.text, origin: obj.origin};\n  }\n\n  // Apply a change to a document, and add it to the document's\n  // history, and propagating it to all linked documents.\n  function makeChange(doc, change, ignoreReadOnly) {\n    if (doc.cm) {\n      if (!doc.cm.curOp) return operation(doc.cm, makeChange)(doc, change, ignoreReadOnly);\n      if (doc.cm.state.suppressEdits) return;\n    }\n\n    if (hasHandler(doc, \"beforeChange\") || doc.cm && hasHandler(doc.cm, \"beforeChange\")) {\n      change = filterChange(doc, change, true);\n      if (!change) return;\n    }\n\n    // Possibly split or suppress the update based on the presence\n    // of read-only spans in its range.\n    var split = sawReadOnlySpans && !ignoreReadOnly && removeReadOnlyRanges(doc, change.from, change.to);\n    if (split) {\n      for (var i = split.length - 1; i >= 0; --i)\n        makeChangeInner(doc, {from: split[i].from, to: split[i].to, text: i ? [\"\"] : change.text});\n    } else {\n      makeChangeInner(doc, change);\n    }\n  }\n\n  function makeChangeInner(doc, change) {\n    if (change.text.length == 1 && change.text[0] == \"\" && cmp(change.from, change.to) == 0) return;\n    var selAfter = computeSelAfterChange(doc, change);\n    addChangeToHistory(doc, change, selAfter, doc.cm ? doc.cm.curOp.id : NaN);\n\n    makeChangeSingleDoc(doc, change, selAfter, stretchSpansOverChange(doc, change));\n    var rebased = [];\n\n    linkedDocs(doc, function(doc, sharedHist) {\n      if (!sharedHist && indexOf(rebased, doc.history) == -1) {\n        rebaseHist(doc.history, change);\n        rebased.push(doc.history);\n      }\n      makeChangeSingleDoc(doc, change, null, stretchSpansOverChange(doc, change));\n    });\n  }\n\n  // Revert a change stored in a document's history.\n  function makeChangeFromHistory(doc, type, allowSelectionOnly) {\n    if (doc.cm && doc.cm.state.suppressEdits) return;\n\n    var hist = doc.history, event, selAfter = doc.sel;\n    var source = type == \"undo\" ? hist.done : hist.undone, dest = type == \"undo\" ? hist.undone : hist.done;\n\n    // Verify that there is a useable event (so that ctrl-z won't\n    // needlessly clear selection events)\n    for (var i = 0; i < source.length; i++) {\n      event = source[i];\n      if (allowSelectionOnly ? event.ranges && !event.equals(doc.sel) : !event.ranges)\n        break;\n    }\n    if (i == source.length) return;\n    hist.lastOrigin = hist.lastSelOrigin = null;\n\n    for (;;) {\n      event = source.pop();\n      if (event.ranges) {\n        pushSelectionToHistory(event, dest);\n        if (allowSelectionOnly && !event.equals(doc.sel)) {\n          setSelection(doc, event, {clearRedo: false});\n          return;\n        }\n        selAfter = event;\n      }\n      else break;\n    }\n\n    // Build up a reverse change object to add to the opposite history\n    // stack (redo when undoing, and vice versa).\n    var antiChanges = [];\n    pushSelectionToHistory(selAfter, dest);\n    dest.push({changes: antiChanges, generation: hist.generation});\n    hist.generation = event.generation || ++hist.maxGeneration;\n\n    var filter = hasHandler(doc, \"beforeChange\") || doc.cm && hasHandler(doc.cm, \"beforeChange\");\n\n    for (var i = event.changes.length - 1; i >= 0; --i) {\n      var change = event.changes[i];\n      change.origin = type;\n      if (filter && !filterChange(doc, change, false)) {\n        source.length = 0;\n        return;\n      }\n\n      antiChanges.push(historyChangeFromChange(doc, change));\n\n      var after = i ? computeSelAfterChange(doc, change) : lst(source);\n      makeChangeSingleDoc(doc, change, after, mergeOldSpans(doc, change));\n      if (!i && doc.cm) doc.cm.scrollIntoView({from: change.from, to: changeEnd(change)});\n      var rebased = [];\n\n      // Propagate to the linked documents\n      linkedDocs(doc, function(doc, sharedHist) {\n        if (!sharedHist && indexOf(rebased, doc.history) == -1) {\n          rebaseHist(doc.history, change);\n          rebased.push(doc.history);\n        }\n        makeChangeSingleDoc(doc, change, null, mergeOldSpans(doc, change));\n      });\n    }\n  }\n\n  // Sub-views need their line numbers shifted when text is added\n  // above or below them in the parent document.\n  function shiftDoc(doc, distance) {\n    if (distance == 0) return;\n    doc.first += distance;\n    doc.sel = new Selection(map(doc.sel.ranges, function(range) {\n      return new Range(Pos(range.anchor.line + distance, range.anchor.ch),\n                       Pos(range.head.line + distance, range.head.ch));\n    }), doc.sel.primIndex);\n    if (doc.cm) {\n      regChange(doc.cm, doc.first, doc.first - distance, distance);\n      for (var d = doc.cm.display, l = d.viewFrom; l < d.viewTo; l++)\n        regLineChange(doc.cm, l, \"gutter\");\n    }\n  }\n\n  // More lower-level change function, handling only a single document\n  // (not linked ones).\n  function makeChangeSingleDoc(doc, change, selAfter, spans) {\n    if (doc.cm && !doc.cm.curOp)\n      return operation(doc.cm, makeChangeSingleDoc)(doc, change, selAfter, spans);\n\n    if (change.to.line < doc.first) {\n      shiftDoc(doc, change.text.length - 1 - (change.to.line - change.from.line));\n      return;\n    }\n    if (change.from.line > doc.lastLine()) return;\n\n    // Clip the change to the size of this doc\n    if (change.from.line < doc.first) {\n      var shift = change.text.length - 1 - (doc.first - change.from.line);\n      shiftDoc(doc, shift);\n      change = {from: Pos(doc.first, 0), to: Pos(change.to.line + shift, change.to.ch),\n                text: [lst(change.text)], origin: change.origin};\n    }\n    var last = doc.lastLine();\n    if (change.to.line > last) {\n      change = {from: change.from, to: Pos(last, getLine(doc, last).text.length),\n                text: [change.text[0]], origin: change.origin};\n    }\n\n    change.removed = getBetween(doc, change.from, change.to);\n\n    if (!selAfter) selAfter = computeSelAfterChange(doc, change);\n    if (doc.cm) makeChangeSingleDocInEditor(doc.cm, change, spans);\n    else updateDoc(doc, change, spans);\n    setSelectionNoUndo(doc, selAfter, sel_dontScroll);\n  }\n\n  // Handle the interaction of a change to a document with the editor\n  // that this document is part of.\n  function makeChangeSingleDocInEditor(cm, change, spans) {\n    var doc = cm.doc, display = cm.display, from = change.from, to = change.to;\n\n    var recomputeMaxLength = false, checkWidthStart = from.line;\n    if (!cm.options.lineWrapping) {\n      checkWidthStart = lineNo(visualLine(getLine(doc, from.line)));\n      doc.iter(checkWidthStart, to.line + 1, function(line) {\n        if (line == display.maxLine) {\n          recomputeMaxLength = true;\n          return true;\n        }\n      });\n    }\n\n    if (doc.sel.contains(change.from, change.to) > -1)\n      signalCursorActivity(cm);\n\n    updateDoc(doc, change, spans, estimateHeight(cm));\n\n    if (!cm.options.lineWrapping) {\n      doc.iter(checkWidthStart, from.line + change.text.length, function(line) {\n        var len = lineLength(line);\n        if (len > display.maxLineLength) {\n          display.maxLine = line;\n          display.maxLineLength = len;\n          display.maxLineChanged = true;\n          recomputeMaxLength = false;\n        }\n      });\n      if (recomputeMaxLength) cm.curOp.updateMaxLine = true;\n    }\n\n    // Adjust frontier, schedule worker\n    doc.frontier = Math.min(doc.frontier, from.line);\n    startWorker(cm, 400);\n\n    var lendiff = change.text.length - (to.line - from.line) - 1;\n    // Remember that these lines changed, for updating the display\n    if (change.full)\n      regChange(cm);\n    else if (from.line == to.line && change.text.length == 1 && !isWholeLineUpdate(cm.doc, change))\n      regLineChange(cm, from.line, \"text\");\n    else\n      regChange(cm, from.line, to.line + 1, lendiff);\n\n    var changesHandler = hasHandler(cm, \"changes\"), changeHandler = hasHandler(cm, \"change\");\n    if (changeHandler || changesHandler) {\n      var obj = {\n        from: from, to: to,\n        text: change.text,\n        removed: change.removed,\n        origin: change.origin\n      };\n      if (changeHandler) signalLater(cm, \"change\", cm, obj);\n      if (changesHandler) (cm.curOp.changeObjs || (cm.curOp.changeObjs = [])).push(obj);\n    }\n    cm.display.selForContextMenu = null;\n  }\n\n  function replaceRange(doc, code, from, to, origin) {\n    if (!to) to = from;\n    if (cmp(to, from) < 0) { var tmp = to; to = from; from = tmp; }\n    if (typeof code == \"string\") code = splitLines(code);\n    makeChange(doc, {from: from, to: to, text: code, origin: origin});\n  }\n\n  // SCROLLING THINGS INTO VIEW\n\n  // If an editor sits on the top or bottom of the window, partially\n  // scrolled out of view, this ensures that the cursor is visible.\n  function maybeScrollWindow(cm, coords) {\n    if (signalDOMEvent(cm, \"scrollCursorIntoView\")) return;\n\n    var display = cm.display, box = display.sizer.getBoundingClientRect(), doScroll = null;\n    if (coords.top + box.top < 0) doScroll = true;\n    else if (coords.bottom + box.top > (window.innerHeight || document.documentElement.clientHeight)) doScroll = false;\n    if (doScroll != null && !phantom) {\n      var scrollNode = elt(\"div\", \"\\u200b\", null, \"position: absolute; top: \" +\n                           (coords.top - display.viewOffset - paddingTop(cm.display)) + \"px; height: \" +\n                           (coords.bottom - coords.top + scrollGap(cm) + display.barHeight) + \"px; left: \" +\n                           coords.left + \"px; width: 2px;\");\n      cm.display.lineSpace.appendChild(scrollNode);\n      scrollNode.scrollIntoView(doScroll);\n      cm.display.lineSpace.removeChild(scrollNode);\n    }\n  }\n\n  // Scroll a given position into view (immediately), verifying that\n  // it actually became visible (as line heights are accurately\n  // measured, the position of something may 'drift' during drawing).\n  function scrollPosIntoView(cm, pos, end, margin) {\n    if (margin == null) margin = 0;\n    for (var limit = 0; limit < 5; limit++) {\n      var changed = false, coords = cursorCoords(cm, pos);\n      var endCoords = !end || end == pos ? coords : cursorCoords(cm, end);\n      var scrollPos = calculateScrollPos(cm, Math.min(coords.left, endCoords.left),\n                                         Math.min(coords.top, endCoords.top) - margin,\n                                         Math.max(coords.left, endCoords.left),\n                                         Math.max(coords.bottom, endCoords.bottom) + margin);\n      var startTop = cm.doc.scrollTop, startLeft = cm.doc.scrollLeft;\n      if (scrollPos.scrollTop != null) {\n        setScrollTop(cm, scrollPos.scrollTop);\n        if (Math.abs(cm.doc.scrollTop - startTop) > 1) changed = true;\n      }\n      if (scrollPos.scrollLeft != null) {\n        setScrollLeft(cm, scrollPos.scrollLeft);\n        if (Math.abs(cm.doc.scrollLeft - startLeft) > 1) changed = true;\n      }\n      if (!changed) break;\n    }\n    return coords;\n  }\n\n  // Scroll a given set of coordinates into view (immediately).\n  function scrollIntoView(cm, x1, y1, x2, y2) {\n    var scrollPos = calculateScrollPos(cm, x1, y1, x2, y2);\n    if (scrollPos.scrollTop != null) setScrollTop(cm, scrollPos.scrollTop);\n    if (scrollPos.scrollLeft != null) setScrollLeft(cm, scrollPos.scrollLeft);\n  }\n\n  // Calculate a new scroll position needed to scroll the given\n  // rectangle into view. Returns an object with scrollTop and\n  // scrollLeft properties. When these are undefined, the\n  // vertical/horizontal position does not need to be adjusted.\n  function calculateScrollPos(cm, x1, y1, x2, y2) {\n    var display = cm.display, snapMargin = textHeight(cm.display);\n    if (y1 < 0) y1 = 0;\n    var screentop = cm.curOp && cm.curOp.scrollTop != null ? cm.curOp.scrollTop : display.scroller.scrollTop;\n    var screen = displayHeight(cm), result = {};\n    if (y2 - y1 > screen) y2 = y1 + screen;\n    var docBottom = cm.doc.height + paddingVert(display);\n    var atTop = y1 < snapMargin, atBottom = y2 > docBottom - snapMargin;\n    if (y1 < screentop) {\n      result.scrollTop = atTop ? 0 : y1;\n    } else if (y2 > screentop + screen) {\n      var newTop = Math.min(y1, (atBottom ? docBottom : y2) - screen);\n      if (newTop != screentop) result.scrollTop = newTop;\n    }\n\n    var screenleft = cm.curOp && cm.curOp.scrollLeft != null ? cm.curOp.scrollLeft : display.scroller.scrollLeft;\n    var screenw = displayWidth(cm) - (cm.options.fixedGutter ? display.gutters.offsetWidth : 0);\n    var tooWide = x2 - x1 > screenw;\n    if (tooWide) x2 = x1 + screenw;\n    if (x1 < 10)\n      result.scrollLeft = 0;\n    else if (x1 < screenleft)\n      result.scrollLeft = Math.max(0, x1 - (tooWide ? 0 : 10));\n    else if (x2 > screenw + screenleft - 3)\n      result.scrollLeft = x2 + (tooWide ? 0 : 10) - screenw;\n    return result;\n  }\n\n  // Store a relative adjustment to the scroll position in the current\n  // operation (to be applied when the operation finishes).\n  function addToScrollPos(cm, left, top) {\n    if (left != null || top != null) resolveScrollToPos(cm);\n    if (left != null)\n      cm.curOp.scrollLeft = (cm.curOp.scrollLeft == null ? cm.doc.scrollLeft : cm.curOp.scrollLeft) + left;\n    if (top != null)\n      cm.curOp.scrollTop = (cm.curOp.scrollTop == null ? cm.doc.scrollTop : cm.curOp.scrollTop) + top;\n  }\n\n  // Make sure that at the end of the operation the current cursor is\n  // shown.\n  function ensureCursorVisible(cm) {\n    resolveScrollToPos(cm);\n    var cur = cm.getCursor(), from = cur, to = cur;\n    if (!cm.options.lineWrapping) {\n      from = cur.ch ? Pos(cur.line, cur.ch - 1) : cur;\n      to = Pos(cur.line, cur.ch + 1);\n    }\n    cm.curOp.scrollToPos = {from: from, to: to, margin: cm.options.cursorScrollMargin, isCursor: true};\n  }\n\n  // When an operation has its scrollToPos property set, and another\n  // scroll action is applied before the end of the operation, this\n  // 'simulates' scrolling that position into view in a cheap way, so\n  // that the effect of intermediate scroll commands is not ignored.\n  function resolveScrollToPos(cm) {\n    var range = cm.curOp.scrollToPos;\n    if (range) {\n      cm.curOp.scrollToPos = null;\n      var from = estimateCoords(cm, range.from), to = estimateCoords(cm, range.to);\n      var sPos = calculateScrollPos(cm, Math.min(from.left, to.left),\n                                    Math.min(from.top, to.top) - range.margin,\n                                    Math.max(from.right, to.right),\n                                    Math.max(from.bottom, to.bottom) + range.margin);\n      cm.scrollTo(sPos.scrollLeft, sPos.scrollTop);\n    }\n  }\n\n  // API UTILITIES\n\n  // Indent the given line. The how parameter can be \"smart\",\n  // \"add\"/null, \"subtract\", or \"prev\". When aggressive is false\n  // (typically set to true for forced single-line indents), empty\n  // lines are not indented, and places where the mode returns Pass\n  // are left alone.\n  function indentLine(cm, n, how, aggressive) {\n    var doc = cm.doc, state;\n    if (how == null) how = \"add\";\n    if (how == \"smart\") {\n      // Fall back to \"prev\" when the mode doesn't have an indentation\n      // method.\n      if (!doc.mode.indent) how = \"prev\";\n      else state = getStateBefore(cm, n);\n    }\n\n    var tabSize = cm.options.tabSize;\n    var line = getLine(doc, n), curSpace = countColumn(line.text, null, tabSize);\n    if (line.stateAfter) line.stateAfter = null;\n    var curSpaceString = line.text.match(/^\\s*/)[0], indentation;\n    if (!aggressive && !/\\S/.test(line.text)) {\n      indentation = 0;\n      how = \"not\";\n    } else if (how == \"smart\") {\n      indentation = doc.mode.indent(state, line.text.slice(curSpaceString.length), line.text);\n      if (indentation == Pass || indentation > 150) {\n        if (!aggressive) return;\n        how = \"prev\";\n      }\n    }\n    if (how == \"prev\") {\n      if (n > doc.first) indentation = countColumn(getLine(doc, n-1).text, null, tabSize);\n      else indentation = 0;\n    } else if (how == \"add\") {\n      indentation = curSpace + cm.options.indentUnit;\n    } else if (how == \"subtract\") {\n      indentation = curSpace - cm.options.indentUnit;\n    } else if (typeof how == \"number\") {\n      indentation = curSpace + how;\n    }\n    indentation = Math.max(0, indentation);\n\n    var indentString = \"\", pos = 0;\n    if (cm.options.indentWithTabs)\n      for (var i = Math.floor(indentation / tabSize); i; --i) {pos += tabSize; indentString += \"\\t\";}\n    if (pos < indentation) indentString += spaceStr(indentation - pos);\n\n    if (indentString != curSpaceString) {\n      replaceRange(doc, indentString, Pos(n, 0), Pos(n, curSpaceString.length), \"+input\");\n    } else {\n      // Ensure that, if the cursor was in the whitespace at the start\n      // of the line, it is moved to the end of that space.\n      for (var i = 0; i < doc.sel.ranges.length; i++) {\n        var range = doc.sel.ranges[i];\n        if (range.head.line == n && range.head.ch < curSpaceString.length) {\n          var pos = Pos(n, curSpaceString.length);\n          replaceOneSelection(doc, i, new Range(pos, pos));\n          break;\n        }\n      }\n    }\n    line.stateAfter = null;\n  }\n\n  // Utility for applying a change to a line by handle or number,\n  // returning the number and optionally registering the line as\n  // changed.\n  function changeLine(doc, handle, changeType, op) {\n    var no = handle, line = handle;\n    if (typeof handle == \"number\") line = getLine(doc, clipLine(doc, handle));\n    else no = lineNo(handle);\n    if (no == null) return null;\n    if (op(line, no) && doc.cm) regLineChange(doc.cm, no, changeType);\n    return line;\n  }\n\n  // Helper for deleting text near the selection(s), used to implement\n  // backspace, delete, and similar functionality.\n  function deleteNearSelection(cm, compute) {\n    var ranges = cm.doc.sel.ranges, kill = [];\n    // Build up a set of ranges to kill first, merging overlapping\n    // ranges.\n    for (var i = 0; i < ranges.length; i++) {\n      var toKill = compute(ranges[i]);\n      while (kill.length && cmp(toKill.from, lst(kill).to) <= 0) {\n        var replaced = kill.pop();\n        if (cmp(replaced.from, toKill.from) < 0) {\n          toKill.from = replaced.from;\n          break;\n        }\n      }\n      kill.push(toKill);\n    }\n    // Next, remove those actual ranges.\n    runInOp(cm, function() {\n      for (var i = kill.length - 1; i >= 0; i--)\n        replaceRange(cm.doc, \"\", kill[i].from, kill[i].to, \"+delete\");\n      ensureCursorVisible(cm);\n    });\n  }\n\n  // Used for horizontal relative motion. Dir is -1 or 1 (left or\n  // right), unit can be \"char\", \"column\" (like char, but doesn't\n  // cross line boundaries), \"word\" (across next word), or \"group\" (to\n  // the start of next group of word or non-word-non-whitespace\n  // chars). The visually param controls whether, in right-to-left\n  // text, direction 1 means to move towards the next index in the\n  // string, or towards the character to the right of the current\n  // position. The resulting position will have a hitSide=true\n  // property if it reached the end of the document.\n  function findPosH(doc, pos, dir, unit, visually) {\n    var line = pos.line, ch = pos.ch, origDir = dir;\n    var lineObj = getLine(doc, line);\n    var possible = true;\n    function findNextLine() {\n      var l = line + dir;\n      if (l < doc.first || l >= doc.first + doc.size) return (possible = false);\n      line = l;\n      return lineObj = getLine(doc, l);\n    }\n    function moveOnce(boundToLine) {\n      var next = (visually ? moveVisually : moveLogically)(lineObj, ch, dir, true);\n      if (next == null) {\n        if (!boundToLine && findNextLine()) {\n          if (visually) ch = (dir < 0 ? lineRight : lineLeft)(lineObj);\n          else ch = dir < 0 ? lineObj.text.length : 0;\n        } else return (possible = false);\n      } else ch = next;\n      return true;\n    }\n\n    if (unit == \"char\") moveOnce();\n    else if (unit == \"column\") moveOnce(true);\n    else if (unit == \"word\" || unit == \"group\") {\n      var sawType = null, group = unit == \"group\";\n      var helper = doc.cm && doc.cm.getHelper(pos, \"wordChars\");\n      for (var first = true;; first = false) {\n        if (dir < 0 && !moveOnce(!first)) break;\n        var cur = lineObj.text.charAt(ch) || \"\\n\";\n        var type = isWordChar(cur, helper) ? \"w\"\n          : group && cur == \"\\n\" ? \"n\"\n          : !group || /\\s/.test(cur) ? null\n          : \"p\";\n        if (group && !first && !type) type = \"s\";\n        if (sawType && sawType != type) {\n          if (dir < 0) {dir = 1; moveOnce();}\n          break;\n        }\n\n        if (type) sawType = type;\n        if (dir > 0 && !moveOnce(!first)) break;\n      }\n    }\n    var result = skipAtomic(doc, Pos(line, ch), origDir, true);\n    if (!possible) result.hitSide = true;\n    return result;\n  }\n\n  // For relative vertical movement. Dir may be -1 or 1. Unit can be\n  // \"page\" or \"line\". The resulting position will have a hitSide=true\n  // property if it reached the end of the document.\n  function findPosV(cm, pos, dir, unit) {\n    var doc = cm.doc, x = pos.left, y;\n    if (unit == \"page\") {\n      var pageSize = Math.min(cm.display.wrapper.clientHeight, window.innerHeight || document.documentElement.clientHeight);\n      y = pos.top + dir * (pageSize - (dir < 0 ? 1.5 : .5) * textHeight(cm.display));\n    } else if (unit == \"line\") {\n      y = dir > 0 ? pos.bottom + 3 : pos.top - 3;\n    }\n    for (;;) {\n      var target = coordsChar(cm, x, y);\n      if (!target.outside) break;\n      if (dir < 0 ? y <= 0 : y >= doc.height) { target.hitSide = true; break; }\n      y += dir * 5;\n    }\n    return target;\n  }\n\n  // EDITOR METHODS\n\n  // The publicly visible API. Note that methodOp(f) means\n  // 'wrap f in an operation, performed on its `this` parameter'.\n\n  // This is not the complete set of editor methods. Most of the\n  // methods defined on the Doc type are also injected into\n  // CodeMirror.prototype, for backwards compatibility and\n  // convenience.\n\n  CodeMirror.prototype = {\n    constructor: CodeMirror,\n    focus: function(){window.focus(); this.display.input.focus();},\n\n    setOption: function(option, value) {\n      var options = this.options, old = options[option];\n      if (options[option] == value && option != \"mode\") return;\n      options[option] = value;\n      if (optionHandlers.hasOwnProperty(option))\n        operation(this, optionHandlers[option])(this, value, old);\n    },\n\n    getOption: function(option) {return this.options[option];},\n    getDoc: function() {return this.doc;},\n\n    addKeyMap: function(map, bottom) {\n      this.state.keyMaps[bottom ? \"push\" : \"unshift\"](getKeyMap(map));\n    },\n    removeKeyMap: function(map) {\n      var maps = this.state.keyMaps;\n      for (var i = 0; i < maps.length; ++i)\n        if (maps[i] == map || maps[i].name == map) {\n          maps.splice(i, 1);\n          return true;\n        }\n    },\n\n    addOverlay: methodOp(function(spec, options) {\n      var mode = spec.token ? spec : CodeMirror.getMode(this.options, spec);\n      if (mode.startState) throw new Error(\"Overlays may not be stateful.\");\n      this.state.overlays.push({mode: mode, modeSpec: spec, opaque: options && options.opaque});\n      this.state.modeGen++;\n      regChange(this);\n    }),\n    removeOverlay: methodOp(function(spec) {\n      var overlays = this.state.overlays;\n      for (var i = 0; i < overlays.length; ++i) {\n        var cur = overlays[i].modeSpec;\n        if (cur == spec || typeof spec == \"string\" && cur.name == spec) {\n          overlays.splice(i, 1);\n          this.state.modeGen++;\n          regChange(this);\n          return;\n        }\n      }\n    }),\n\n    indentLine: methodOp(function(n, dir, aggressive) {\n      if (typeof dir != \"string\" && typeof dir != \"number\") {\n        if (dir == null) dir = this.options.smartIndent ? \"smart\" : \"prev\";\n        else dir = dir ? \"add\" : \"subtract\";\n      }\n      if (isLine(this.doc, n)) indentLine(this, n, dir, aggressive);\n    }),\n    indentSelection: methodOp(function(how) {\n      var ranges = this.doc.sel.ranges, end = -1;\n      for (var i = 0; i < ranges.length; i++) {\n        var range = ranges[i];\n        if (!range.empty()) {\n          var from = range.from(), to = range.to();\n          var start = Math.max(end, from.line);\n          end = Math.min(this.lastLine(), to.line - (to.ch ? 0 : 1)) + 1;\n          for (var j = start; j < end; ++j)\n            indentLine(this, j, how);\n          var newRanges = this.doc.sel.ranges;\n          if (from.ch == 0 && ranges.length == newRanges.length && newRanges[i].from().ch > 0)\n            replaceOneSelection(this.doc, i, new Range(from, newRanges[i].to()), sel_dontScroll);\n        } else if (range.head.line > end) {\n          indentLine(this, range.head.line, how, true);\n          end = range.head.line;\n          if (i == this.doc.sel.primIndex) ensureCursorVisible(this);\n        }\n      }\n    }),\n\n    // Fetch the parser token for a given character. Useful for hacks\n    // that want to inspect the mode state (say, for completion).\n    getTokenAt: function(pos, precise) {\n      return takeToken(this, pos, precise);\n    },\n\n    getLineTokens: function(line, precise) {\n      return takeToken(this, Pos(line), precise, true);\n    },\n\n    getTokenTypeAt: function(pos) {\n      pos = clipPos(this.doc, pos);\n      var styles = getLineStyles(this, getLine(this.doc, pos.line));\n      var before = 0, after = (styles.length - 1) / 2, ch = pos.ch;\n      var type;\n      if (ch == 0) type = styles[2];\n      else for (;;) {\n        var mid = (before + after) >> 1;\n        if ((mid ? styles[mid * 2 - 1] : 0) >= ch) after = mid;\n        else if (styles[mid * 2 + 1] < ch) before = mid + 1;\n        else { type = styles[mid * 2 + 2]; break; }\n      }\n      var cut = type ? type.indexOf(\"cm-overlay \") : -1;\n      return cut < 0 ? type : cut == 0 ? null : type.slice(0, cut - 1);\n    },\n\n    getModeAt: function(pos) {\n      var mode = this.doc.mode;\n      if (!mode.innerMode) return mode;\n      return CodeMirror.innerMode(mode, this.getTokenAt(pos).state).mode;\n    },\n\n    getHelper: function(pos, type) {\n      return this.getHelpers(pos, type)[0];\n    },\n\n    getHelpers: function(pos, type) {\n      var found = [];\n      if (!helpers.hasOwnProperty(type)) return helpers;\n      var help = helpers[type], mode = this.getModeAt(pos);\n      if (typeof mode[type] == \"string\") {\n        if (help[mode[type]]) found.push(help[mode[type]]);\n      } else if (mode[type]) {\n        for (var i = 0; i < mode[type].length; i++) {\n          var val = help[mode[type][i]];\n          if (val) found.push(val);\n        }\n      } else if (mode.helperType && help[mode.helperType]) {\n        found.push(help[mode.helperType]);\n      } else if (help[mode.name]) {\n        found.push(help[mode.name]);\n      }\n      for (var i = 0; i < help._global.length; i++) {\n        var cur = help._global[i];\n        if (cur.pred(mode, this) && indexOf(found, cur.val) == -1)\n          found.push(cur.val);\n      }\n      return found;\n    },\n\n    getStateAfter: function(line, precise) {\n      var doc = this.doc;\n      line = clipLine(doc, line == null ? doc.first + doc.size - 1: line);\n      return getStateBefore(this, line + 1, precise);\n    },\n\n    cursorCoords: function(start, mode) {\n      var pos, range = this.doc.sel.primary();\n      if (start == null) pos = range.head;\n      else if (typeof start == \"object\") pos = clipPos(this.doc, start);\n      else pos = start ? range.from() : range.to();\n      return cursorCoords(this, pos, mode || \"page\");\n    },\n\n    charCoords: function(pos, mode) {\n      return charCoords(this, clipPos(this.doc, pos), mode || \"page\");\n    },\n\n    coordsChar: function(coords, mode) {\n      coords = fromCoordSystem(this, coords, mode || \"page\");\n      return coordsChar(this, coords.left, coords.top);\n    },\n\n    lineAtHeight: function(height, mode) {\n      height = fromCoordSystem(this, {top: height, left: 0}, mode || \"page\").top;\n      return lineAtHeight(this.doc, height + this.display.viewOffset);\n    },\n    heightAtLine: function(line, mode) {\n      var end = false, last = this.doc.first + this.doc.size - 1;\n      if (line < this.doc.first) line = this.doc.first;\n      else if (line > last) { line = last; end = true; }\n      var lineObj = getLine(this.doc, line);\n      return intoCoordSystem(this, lineObj, {top: 0, left: 0}, mode || \"page\").top +\n        (end ? this.doc.height - heightAtLine(lineObj) : 0);\n    },\n\n    defaultTextHeight: function() { return textHeight(this.display); },\n    defaultCharWidth: function() { return charWidth(this.display); },\n\n    setGutterMarker: methodOp(function(line, gutterID, value) {\n      return changeLine(this.doc, line, \"gutter\", function(line) {\n        var markers = line.gutterMarkers || (line.gutterMarkers = {});\n        markers[gutterID] = value;\n        if (!value && isEmpty(markers)) line.gutterMarkers = null;\n        return true;\n      });\n    }),\n\n    clearGutter: methodOp(function(gutterID) {\n      var cm = this, doc = cm.doc, i = doc.first;\n      doc.iter(function(line) {\n        if (line.gutterMarkers && line.gutterMarkers[gutterID]) {\n          line.gutterMarkers[gutterID] = null;\n          regLineChange(cm, i, \"gutter\");\n          if (isEmpty(line.gutterMarkers)) line.gutterMarkers = null;\n        }\n        ++i;\n      });\n    }),\n\n    addLineWidget: methodOp(function(handle, node, options) {\n      return addLineWidget(this, handle, node, options);\n    }),\n\n    removeLineWidget: function(widget) { widget.clear(); },\n\n    lineInfo: function(line) {\n      if (typeof line == \"number\") {\n        if (!isLine(this.doc, line)) return null;\n        var n = line;\n        line = getLine(this.doc, line);\n        if (!line) return null;\n      } else {\n        var n = lineNo(line);\n        if (n == null) return null;\n      }\n      return {line: n, handle: line, text: line.text, gutterMarkers: line.gutterMarkers,\n              textClass: line.textClass, bgClass: line.bgClass, wrapClass: line.wrapClass,\n              widgets: line.widgets};\n    },\n\n    getViewport: function() { return {from: this.display.viewFrom, to: this.display.viewTo};},\n\n    addWidget: function(pos, node, scroll, vert, horiz) {\n      var display = this.display;\n      pos = cursorCoords(this, clipPos(this.doc, pos));\n      var top = pos.bottom, left = pos.left;\n      node.style.position = \"absolute\";\n      node.setAttribute(\"cm-ignore-events\", \"true\");\n      this.display.input.setUneditable(node);\n      display.sizer.appendChild(node);\n      if (vert == \"over\") {\n        top = pos.top;\n      } else if (vert == \"above\" || vert == \"near\") {\n        var vspace = Math.max(display.wrapper.clientHeight, this.doc.height),\n        hspace = Math.max(display.sizer.clientWidth, display.lineSpace.clientWidth);\n        // Default to positioning above (if specified and possible); otherwise default to positioning below\n        if ((vert == 'above' || pos.bottom + node.offsetHeight > vspace) && pos.top > node.offsetHeight)\n          top = pos.top - node.offsetHeight;\n        else if (pos.bottom + node.offsetHeight <= vspace)\n          top = pos.bottom;\n        if (left + node.offsetWidth > hspace)\n          left = hspace - node.offsetWidth;\n      }\n      node.style.top = top + \"px\";\n      node.style.left = node.style.right = \"\";\n      if (horiz == \"right\") {\n        left = display.sizer.clientWidth - node.offsetWidth;\n        node.style.right = \"0px\";\n      } else {\n        if (horiz == \"left\") left = 0;\n        else if (horiz == \"middle\") left = (display.sizer.clientWidth - node.offsetWidth) / 2;\n        node.style.left = left + \"px\";\n      }\n      if (scroll)\n        scrollIntoView(this, left, top, left + node.offsetWidth, top + node.offsetHeight);\n    },\n\n    triggerOnKeyDown: methodOp(onKeyDown),\n    triggerOnKeyPress: methodOp(onKeyPress),\n    triggerOnKeyUp: onKeyUp,\n\n    execCommand: function(cmd) {\n      if (commands.hasOwnProperty(cmd))\n        return commands[cmd](this);\n    },\n\n    findPosH: function(from, amount, unit, visually) {\n      var dir = 1;\n      if (amount < 0) { dir = -1; amount = -amount; }\n      for (var i = 0, cur = clipPos(this.doc, from); i < amount; ++i) {\n        cur = findPosH(this.doc, cur, dir, unit, visually);\n        if (cur.hitSide) break;\n      }\n      return cur;\n    },\n\n    moveH: methodOp(function(dir, unit) {\n      var cm = this;\n      cm.extendSelectionsBy(function(range) {\n        if (cm.display.shift || cm.doc.extend || range.empty())\n          return findPosH(cm.doc, range.head, dir, unit, cm.options.rtlMoveVisually);\n        else\n          return dir < 0 ? range.from() : range.to();\n      }, sel_move);\n    }),\n\n    deleteH: methodOp(function(dir, unit) {\n      var sel = this.doc.sel, doc = this.doc;\n      if (sel.somethingSelected())\n        doc.replaceSelection(\"\", null, \"+delete\");\n      else\n        deleteNearSelection(this, function(range) {\n          var other = findPosH(doc, range.head, dir, unit, false);\n          return dir < 0 ? {from: other, to: range.head} : {from: range.head, to: other};\n        });\n    }),\n\n    findPosV: function(from, amount, unit, goalColumn) {\n      var dir = 1, x = goalColumn;\n      if (amount < 0) { dir = -1; amount = -amount; }\n      for (var i = 0, cur = clipPos(this.doc, from); i < amount; ++i) {\n        var coords = cursorCoords(this, cur, \"div\");\n        if (x == null) x = coords.left;\n        else coords.left = x;\n        cur = findPosV(this, coords, dir, unit);\n        if (cur.hitSide) break;\n      }\n      return cur;\n    },\n\n    moveV: methodOp(function(dir, unit) {\n      var cm = this, doc = this.doc, goals = [];\n      var collapse = !cm.display.shift && !doc.extend && doc.sel.somethingSelected();\n      doc.extendSelectionsBy(function(range) {\n        if (collapse)\n          return dir < 0 ? range.from() : range.to();\n        var headPos = cursorCoords(cm, range.head, \"div\");\n        if (range.goalColumn != null) headPos.left = range.goalColumn;\n        goals.push(headPos.left);\n        var pos = findPosV(cm, headPos, dir, unit);\n        if (unit == \"page\" && range == doc.sel.primary())\n          addToScrollPos(cm, null, charCoords(cm, pos, \"div\").top - headPos.top);\n        return pos;\n      }, sel_move);\n      if (goals.length) for (var i = 0; i < doc.sel.ranges.length; i++)\n        doc.sel.ranges[i].goalColumn = goals[i];\n    }),\n\n    // Find the word at the given position (as returned by coordsChar).\n    findWordAt: function(pos) {\n      var doc = this.doc, line = getLine(doc, pos.line).text;\n      var start = pos.ch, end = pos.ch;\n      if (line) {\n        var helper = this.getHelper(pos, \"wordChars\");\n        if ((pos.xRel < 0 || end == line.length) && start) --start; else ++end;\n        var startChar = line.charAt(start);\n        var check = isWordChar(startChar, helper)\n          ? function(ch) { return isWordChar(ch, helper); }\n          : /\\s/.test(startChar) ? function(ch) {return /\\s/.test(ch);}\n          : function(ch) {return !/\\s/.test(ch) && !isWordChar(ch);};\n        while (start > 0 && check(line.charAt(start - 1))) --start;\n        while (end < line.length && check(line.charAt(end))) ++end;\n      }\n      return new Range(Pos(pos.line, start), Pos(pos.line, end));\n    },\n\n    toggleOverwrite: function(value) {\n      if (value != null && value == this.state.overwrite) return;\n      if (this.state.overwrite = !this.state.overwrite)\n        addClass(this.display.cursorDiv, \"CodeMirror-overwrite\");\n      else\n        rmClass(this.display.cursorDiv, \"CodeMirror-overwrite\");\n\n      signal(this, \"overwriteToggle\", this, this.state.overwrite);\n    },\n    hasFocus: function() { return this.display.input.getField() == activeElt(); },\n\n    scrollTo: methodOp(function(x, y) {\n      if (x != null || y != null) resolveScrollToPos(this);\n      if (x != null) this.curOp.scrollLeft = x;\n      if (y != null) this.curOp.scrollTop = y;\n    }),\n    getScrollInfo: function() {\n      var scroller = this.display.scroller;\n      return {left: scroller.scrollLeft, top: scroller.scrollTop,\n              height: scroller.scrollHeight - scrollGap(this) - this.display.barHeight,\n              width: scroller.scrollWidth - scrollGap(this) - this.display.barWidth,\n              clientHeight: displayHeight(this), clientWidth: displayWidth(this)};\n    },\n\n    scrollIntoView: methodOp(function(range, margin) {\n      if (range == null) {\n        range = {from: this.doc.sel.primary().head, to: null};\n        if (margin == null) margin = this.options.cursorScrollMargin;\n      } else if (typeof range == \"number\") {\n        range = {from: Pos(range, 0), to: null};\n      } else if (range.from == null) {\n        range = {from: range, to: null};\n      }\n      if (!range.to) range.to = range.from;\n      range.margin = margin || 0;\n\n      if (range.from.line != null) {\n        resolveScrollToPos(this);\n        this.curOp.scrollToPos = range;\n      } else {\n        var sPos = calculateScrollPos(this, Math.min(range.from.left, range.to.left),\n                                      Math.min(range.from.top, range.to.top) - range.margin,\n                                      Math.max(range.from.right, range.to.right),\n                                      Math.max(range.from.bottom, range.to.bottom) + range.margin);\n        this.scrollTo(sPos.scrollLeft, sPos.scrollTop);\n      }\n    }),\n\n    setSize: methodOp(function(width, height) {\n      var cm = this;\n      function interpret(val) {\n        return typeof val == \"number\" || /^\\d+$/.test(String(val)) ? val + \"px\" : val;\n      }\n      if (width != null) cm.display.wrapper.style.width = interpret(width);\n      if (height != null) cm.display.wrapper.style.height = interpret(height);\n      if (cm.options.lineWrapping) clearLineMeasurementCache(this);\n      var lineNo = cm.display.viewFrom;\n      cm.doc.iter(lineNo, cm.display.viewTo, function(line) {\n        if (line.widgets) for (var i = 0; i < line.widgets.length; i++)\n          if (line.widgets[i].noHScroll) { regLineChange(cm, lineNo, \"widget\"); break; }\n        ++lineNo;\n      });\n      cm.curOp.forceUpdate = true;\n      signal(cm, \"refresh\", this);\n    }),\n\n    operation: function(f){return runInOp(this, f);},\n\n    refresh: methodOp(function() {\n      var oldHeight = this.display.cachedTextHeight;\n      regChange(this);\n      this.curOp.forceUpdate = true;\n      clearCaches(this);\n      this.scrollTo(this.doc.scrollLeft, this.doc.scrollTop);\n      updateGutterSpace(this);\n      if (oldHeight == null || Math.abs(oldHeight - textHeight(this.display)) > .5)\n        estimateLineHeights(this);\n      signal(this, \"refresh\", this);\n    }),\n\n    swapDoc: methodOp(function(doc) {\n      var old = this.doc;\n      old.cm = null;\n      attachDoc(this, doc);\n      clearCaches(this);\n      this.display.input.reset();\n      this.scrollTo(doc.scrollLeft, doc.scrollTop);\n      this.curOp.forceScroll = true;\n      signalLater(this, \"swapDoc\", this, old);\n      return old;\n    }),\n\n    getInputField: function(){return this.display.input.getField();},\n    getWrapperElement: function(){return this.display.wrapper;},\n    getScrollerElement: function(){return this.display.scroller;},\n    getGutterElement: function(){return this.display.gutters;}\n  };\n  eventMixin(CodeMirror);\n\n  // OPTION DEFAULTS\n\n  // The default configuration options.\n  var defaults = CodeMirror.defaults = {};\n  // Functions to run when options are changed.\n  var optionHandlers = CodeMirror.optionHandlers = {};\n\n  function option(name, deflt, handle, notOnInit) {\n    CodeMirror.defaults[name] = deflt;\n    if (handle) optionHandlers[name] =\n      notOnInit ? function(cm, val, old) {if (old != Init) handle(cm, val, old);} : handle;\n  }\n\n  // Passed to option handlers when there is no old value.\n  var Init = CodeMirror.Init = {toString: function(){return \"CodeMirror.Init\";}};\n\n  // These two are, on init, called from the constructor because they\n  // have to be initialized before the editor can start at all.\n  option(\"value\", \"\", function(cm, val) {\n    cm.setValue(val);\n  }, true);\n  option(\"mode\", null, function(cm, val) {\n    cm.doc.modeOption = val;\n    loadMode(cm);\n  }, true);\n\n  option(\"indentUnit\", 2, loadMode, true);\n  option(\"indentWithTabs\", false);\n  option(\"smartIndent\", true);\n  option(\"tabSize\", 4, function(cm) {\n    resetModeState(cm);\n    clearCaches(cm);\n    regChange(cm);\n  }, true);\n  option(\"specialChars\", /[\\t\\u0000-\\u0019\\u00ad\\u200b-\\u200f\\u2028\\u2029\\ufeff]/g, function(cm, val) {\n    cm.options.specialChars = new RegExp(val.source + (val.test(\"\\t\") ? \"\" : \"|\\t\"), \"g\");\n    cm.refresh();\n  }, true);\n  option(\"specialCharPlaceholder\", defaultSpecialCharPlaceholder, function(cm) {cm.refresh();}, true);\n  option(\"electricChars\", true);\n  option(\"inputStyle\", mobile ? \"contenteditable\" : \"textarea\", function() {\n    throw new Error(\"inputStyle can not (yet) be changed in a running editor\"); // FIXME\n  }, true);\n  option(\"rtlMoveVisually\", !windows);\n  option(\"wholeLineUpdateBefore\", true);\n\n  option(\"theme\", \"default\", function(cm) {\n    themeChanged(cm);\n    guttersChanged(cm);\n  }, true);\n  option(\"keyMap\", \"default\", function(cm, val, old) {\n    var next = getKeyMap(val);\n    var prev = old != CodeMirror.Init && getKeyMap(old);\n    if (prev && prev.detach) prev.detach(cm, next);\n    if (next.attach) next.attach(cm, prev || null);\n  });\n  option(\"extraKeys\", null);\n\n  option(\"lineWrapping\", false, wrappingChanged, true);\n  option(\"gutters\", [], function(cm) {\n    setGuttersForLineNumbers(cm.options);\n    guttersChanged(cm);\n  }, true);\n  option(\"fixedGutter\", true, function(cm, val) {\n    cm.display.gutters.style.left = val ? compensateForHScroll(cm.display) + \"px\" : \"0\";\n    cm.refresh();\n  }, true);\n  option(\"coverGutterNextToScrollbar\", false, function(cm) {updateScrollbars(cm);}, true);\n  option(\"scrollbarStyle\", \"native\", function(cm) {\n    initScrollbars(cm);\n    updateScrollbars(cm);\n    cm.display.scrollbars.setScrollTop(cm.doc.scrollTop);\n    cm.display.scrollbars.setScrollLeft(cm.doc.scrollLeft);\n  }, true);\n  option(\"lineNumbers\", false, function(cm) {\n    setGuttersForLineNumbers(cm.options);\n    guttersChanged(cm);\n  }, true);\n  option(\"firstLineNumber\", 1, guttersChanged, true);\n  option(\"lineNumberFormatter\", function(integer) {return integer;}, guttersChanged, true);\n  option(\"showCursorWhenSelecting\", false, updateSelection, true);\n\n  option(\"resetSelectionOnContextMenu\", true);\n\n  option(\"readOnly\", false, function(cm, val) {\n    if (val == \"nocursor\") {\n      onBlur(cm);\n      cm.display.input.blur();\n      cm.display.disabled = true;\n    } else {\n      cm.display.disabled = false;\n      if (!val) cm.display.input.reset();\n    }\n  });\n  option(\"disableInput\", false, function(cm, val) {if (!val) cm.display.input.reset();}, true);\n  option(\"dragDrop\", true);\n\n  option(\"cursorBlinkRate\", 530);\n  option(\"cursorScrollMargin\", 0);\n  option(\"cursorHeight\", 1, updateSelection, true);\n  option(\"singleCursorHeightPerLine\", true, updateSelection, true);\n  option(\"workTime\", 100);\n  option(\"workDelay\", 100);\n  option(\"flattenSpans\", true, resetModeState, true);\n  option(\"addModeClass\", false, resetModeState, true);\n  option(\"pollInterval\", 100);\n  option(\"undoDepth\", 200, function(cm, val){cm.doc.history.undoDepth = val;});\n  option(\"historyEventDelay\", 1250);\n  option(\"viewportMargin\", 10, function(cm){cm.refresh();}, true);\n  option(\"maxHighlightLength\", 10000, resetModeState, true);\n  option(\"moveInputWithCursor\", true, function(cm, val) {\n    if (!val) cm.display.input.resetPosition();\n  });\n\n  option(\"tabindex\", null, function(cm, val) {\n    cm.display.input.getField().tabIndex = val || \"\";\n  });\n  option(\"autofocus\", null);\n\n  // MODE DEFINITION AND QUERYING\n\n  // Known modes, by name and by MIME\n  var modes = CodeMirror.modes = {}, mimeModes = CodeMirror.mimeModes = {};\n\n  // Extra arguments are stored as the mode's dependencies, which is\n  // used by (legacy) mechanisms like loadmode.js to automatically\n  // load a mode. (Preferred mechanism is the require/define calls.)\n  CodeMirror.defineMode = function(name, mode) {\n    if (!CodeMirror.defaults.mode && name != \"null\") CodeMirror.defaults.mode = name;\n    if (arguments.length > 2)\n      mode.dependencies = Array.prototype.slice.call(arguments, 2);\n    modes[name] = mode;\n  };\n\n  CodeMirror.defineMIME = function(mime, spec) {\n    mimeModes[mime] = spec;\n  };\n\n  // Given a MIME type, a {name, ...options} config object, or a name\n  // string, return a mode config object.\n  CodeMirror.resolveMode = function(spec) {\n    if (typeof spec == \"string\" && mimeModes.hasOwnProperty(spec)) {\n      spec = mimeModes[spec];\n    } else if (spec && typeof spec.name == \"string\" && mimeModes.hasOwnProperty(spec.name)) {\n      var found = mimeModes[spec.name];\n      if (typeof found == \"string\") found = {name: found};\n      spec = createObj(found, spec);\n      spec.name = found.name;\n    } else if (typeof spec == \"string\" && /^[\\w\\-]+\\/[\\w\\-]+\\+xml$/.test(spec)) {\n      return CodeMirror.resolveMode(\"application/xml\");\n    }\n    if (typeof spec == \"string\") return {name: spec};\n    else return spec || {name: \"null\"};\n  };\n\n  // Given a mode spec (anything that resolveMode accepts), find and\n  // initialize an actual mode object.\n  CodeMirror.getMode = function(options, spec) {\n    var spec = CodeMirror.resolveMode(spec);\n    var mfactory = modes[spec.name];\n    if (!mfactory) return CodeMirror.getMode(options, \"text/plain\");\n    var modeObj = mfactory(options, spec);\n    if (modeExtensions.hasOwnProperty(spec.name)) {\n      var exts = modeExtensions[spec.name];\n      for (var prop in exts) {\n        if (!exts.hasOwnProperty(prop)) continue;\n        if (modeObj.hasOwnProperty(prop)) modeObj[\"_\" + prop] = modeObj[prop];\n        modeObj[prop] = exts[prop];\n      }\n    }\n    modeObj.name = spec.name;\n    if (spec.helperType) modeObj.helperType = spec.helperType;\n    if (spec.modeProps) for (var prop in spec.modeProps)\n      modeObj[prop] = spec.modeProps[prop];\n\n    return modeObj;\n  };\n\n  // Minimal default mode.\n  CodeMirror.defineMode(\"null\", function() {\n    return {token: function(stream) {stream.skipToEnd();}};\n  });\n  CodeMirror.defineMIME(\"text/plain\", \"null\");\n\n  // This can be used to attach properties to mode objects from\n  // outside the actual mode definition.\n  var modeExtensions = CodeMirror.modeExtensions = {};\n  CodeMirror.extendMode = function(mode, properties) {\n    var exts = modeExtensions.hasOwnProperty(mode) ? modeExtensions[mode] : (modeExtensions[mode] = {});\n    copyObj(properties, exts);\n  };\n\n  // EXTENSIONS\n\n  CodeMirror.defineExtension = function(name, func) {\n    CodeMirror.prototype[name] = func;\n  };\n  CodeMirror.defineDocExtension = function(name, func) {\n    Doc.prototype[name] = func;\n  };\n  CodeMirror.defineOption = option;\n\n  var initHooks = [];\n  CodeMirror.defineInitHook = function(f) {initHooks.push(f);};\n\n  var helpers = CodeMirror.helpers = {};\n  CodeMirror.registerHelper = function(type, name, value) {\n    if (!helpers.hasOwnProperty(type)) helpers[type] = CodeMirror[type] = {_global: []};\n    helpers[type][name] = value;\n  };\n  CodeMirror.registerGlobalHelper = function(type, name, predicate, value) {\n    CodeMirror.registerHelper(type, name, value);\n    helpers[type]._global.push({pred: predicate, val: value});\n  };\n\n  // MODE STATE HANDLING\n\n  // Utility functions for working with state. Exported because nested\n  // modes need to do this for their inner modes.\n\n  var copyState = CodeMirror.copyState = function(mode, state) {\n    if (state === true) return state;\n    if (mode.copyState) return mode.copyState(state);\n    var nstate = {};\n    for (var n in state) {\n      var val = state[n];\n      if (val instanceof Array) val = val.concat([]);\n      nstate[n] = val;\n    }\n    return nstate;\n  };\n\n  var startState = CodeMirror.startState = function(mode, a1, a2) {\n    return mode.startState ? mode.startState(a1, a2) : true;\n  };\n\n  // Given a mode and a state (for that mode), find the inner mode and\n  // state at the position that the state refers to.\n  CodeMirror.innerMode = function(mode, state) {\n    while (mode.innerMode) {\n      var info = mode.innerMode(state);\n      if (!info || info.mode == mode) break;\n      state = info.state;\n      mode = info.mode;\n    }\n    return info || {mode: mode, state: state};\n  };\n\n  // STANDARD COMMANDS\n\n  // Commands are parameter-less actions that can be performed on an\n  // editor, mostly used for keybindings.\n  var commands = CodeMirror.commands = {\n    selectAll: function(cm) {cm.setSelection(Pos(cm.firstLine(), 0), Pos(cm.lastLine()), sel_dontScroll);},\n    singleSelection: function(cm) {\n      cm.setSelection(cm.getCursor(\"anchor\"), cm.getCursor(\"head\"), sel_dontScroll);\n    },\n    killLine: function(cm) {\n      deleteNearSelection(cm, function(range) {\n        if (range.empty()) {\n          var len = getLine(cm.doc, range.head.line).text.length;\n          if (range.head.ch == len && range.head.line < cm.lastLine())\n            return {from: range.head, to: Pos(range.head.line + 1, 0)};\n          else\n            return {from: range.head, to: Pos(range.head.line, len)};\n        } else {\n          return {from: range.from(), to: range.to()};\n        }\n      });\n    },\n    deleteLine: function(cm) {\n      deleteNearSelection(cm, function(range) {\n        return {from: Pos(range.from().line, 0),\n                to: clipPos(cm.doc, Pos(range.to().line + 1, 0))};\n      });\n    },\n    delLineLeft: function(cm) {\n      deleteNearSelection(cm, function(range) {\n        return {from: Pos(range.from().line, 0), to: range.from()};\n      });\n    },\n    delWrappedLineLeft: function(cm) {\n      deleteNearSelection(cm, function(range) {\n        var top = cm.charCoords(range.head, \"div\").top + 5;\n        var leftPos = cm.coordsChar({left: 0, top: top}, \"div\");\n        return {from: leftPos, to: range.from()};\n      });\n    },\n    delWrappedLineRight: function(cm) {\n      deleteNearSelection(cm, function(range) {\n        var top = cm.charCoords(range.head, \"div\").top + 5;\n        var rightPos = cm.coordsChar({left: cm.display.lineDiv.offsetWidth + 100, top: top}, \"div\");\n        return {from: range.from(), to: rightPos };\n      });\n    },\n    undo: function(cm) {cm.undo();},\n    redo: function(cm) {cm.redo();},\n    undoSelection: function(cm) {cm.undoSelection();},\n    redoSelection: function(cm) {cm.redoSelection();},\n    goDocStart: function(cm) {cm.extendSelection(Pos(cm.firstLine(), 0));},\n    goDocEnd: function(cm) {cm.extendSelection(Pos(cm.lastLine()));},\n    goLineStart: function(cm) {\n      cm.extendSelectionsBy(function(range) { return lineStart(cm, range.head.line); },\n                            {origin: \"+move\", bias: 1});\n    },\n    goLineStartSmart: function(cm) {\n      cm.extendSelectionsBy(function(range) {\n        return lineStartSmart(cm, range.head);\n      }, {origin: \"+move\", bias: 1});\n    },\n    goLineEnd: function(cm) {\n      cm.extendSelectionsBy(function(range) { return lineEnd(cm, range.head.line); },\n                            {origin: \"+move\", bias: -1});\n    },\n    goLineRight: function(cm) {\n      cm.extendSelectionsBy(function(range) {\n        var top = cm.charCoords(range.head, \"div\").top + 5;\n        return cm.coordsChar({left: cm.display.lineDiv.offsetWidth + 100, top: top}, \"div\");\n      }, sel_move);\n    },\n    goLineLeft: function(cm) {\n      cm.extendSelectionsBy(function(range) {\n        var top = cm.charCoords(range.head, \"div\").top + 5;\n        return cm.coordsChar({left: 0, top: top}, \"div\");\n      }, sel_move);\n    },\n    goLineLeftSmart: function(cm) {\n      cm.extendSelectionsBy(function(range) {\n        var top = cm.charCoords(range.head, \"div\").top + 5;\n        var pos = cm.coordsChar({left: 0, top: top}, \"div\");\n        if (pos.ch < cm.getLine(pos.line).search(/\\S/)) return lineStartSmart(cm, range.head);\n        return pos;\n      }, sel_move);\n    },\n    goLineUp: function(cm) {cm.moveV(-1, \"line\");},\n    goLineDown: function(cm) {cm.moveV(1, \"line\");},\n    goPageUp: function(cm) {cm.moveV(-1, \"page\");},\n    goPageDown: function(cm) {cm.moveV(1, \"page\");},\n    goCharLeft: function(cm) {cm.moveH(-1, \"char\");},\n    goCharRight: function(cm) {cm.moveH(1, \"char\");},\n    goColumnLeft: function(cm) {cm.moveH(-1, \"column\");},\n    goColumnRight: function(cm) {cm.moveH(1, \"column\");},\n    goWordLeft: function(cm) {cm.moveH(-1, \"word\");},\n    goGroupRight: function(cm) {cm.moveH(1, \"group\");},\n    goGroupLeft: function(cm) {cm.moveH(-1, \"group\");},\n    goWordRight: function(cm) {cm.moveH(1, \"word\");},\n    delCharBefore: function(cm) {cm.deleteH(-1, \"char\");},\n    delCharAfter: function(cm) {cm.deleteH(1, \"char\");},\n    delWordBefore: function(cm) {cm.deleteH(-1, \"word\");},\n    delWordAfter: function(cm) {cm.deleteH(1, \"word\");},\n    delGroupBefore: function(cm) {cm.deleteH(-1, \"group\");},\n    delGroupAfter: function(cm) {cm.deleteH(1, \"group\");},\n    indentAuto: function(cm) {cm.indentSelection(\"smart\");},\n    indentMore: function(cm) {cm.indentSelection(\"add\");},\n    indentLess: function(cm) {cm.indentSelection(\"subtract\");},\n    insertTab: function(cm) {cm.replaceSelection(\"\\t\");},\n    insertSoftTab: function(cm) {\n      var spaces = [], ranges = cm.listSelections(), tabSize = cm.options.tabSize;\n      for (var i = 0; i < ranges.length; i++) {\n        var pos = ranges[i].from();\n        var col = countColumn(cm.getLine(pos.line), pos.ch, tabSize);\n        spaces.push(new Array(tabSize - col % tabSize + 1).join(\" \"));\n      }\n      cm.replaceSelections(spaces);\n    },\n    defaultTab: function(cm) {\n      if (cm.somethingSelected()) cm.indentSelection(\"add\");\n      else cm.execCommand(\"insertTab\");\n    },\n    transposeChars: function(cm) {\n      runInOp(cm, function() {\n        var ranges = cm.listSelections(), newSel = [];\n        for (var i = 0; i < ranges.length; i++) {\n          var cur = ranges[i].head, line = getLine(cm.doc, cur.line).text;\n          if (line) {\n            if (cur.ch == line.length) cur = new Pos(cur.line, cur.ch - 1);\n            if (cur.ch > 0) {\n              cur = new Pos(cur.line, cur.ch + 1);\n              cm.replaceRange(line.charAt(cur.ch - 1) + line.charAt(cur.ch - 2),\n                              Pos(cur.line, cur.ch - 2), cur, \"+transpose\");\n            } else if (cur.line > cm.doc.first) {\n              var prev = getLine(cm.doc, cur.line - 1).text;\n              if (prev)\n                cm.replaceRange(line.charAt(0) + \"\\n\" + prev.charAt(prev.length - 1),\n                                Pos(cur.line - 1, prev.length - 1), Pos(cur.line, 1), \"+transpose\");\n            }\n          }\n          newSel.push(new Range(cur, cur));\n        }\n        cm.setSelections(newSel);\n      });\n    },\n    newlineAndIndent: function(cm) {\n      runInOp(cm, function() {\n        var len = cm.listSelections().length;\n        for (var i = 0; i < len; i++) {\n          var range = cm.listSelections()[i];\n          cm.replaceRange(\"\\n\", range.anchor, range.head, \"+input\");\n          cm.indentLine(range.from().line + 1, null, true);\n          ensureCursorVisible(cm);\n        }\n      });\n    },\n    toggleOverwrite: function(cm) {cm.toggleOverwrite();}\n  };\n\n\n  // STANDARD KEYMAPS\n\n  var keyMap = CodeMirror.keyMap = {};\n\n  keyMap.basic = {\n    \"Left\": \"goCharLeft\", \"Right\": \"goCharRight\", \"Up\": \"goLineUp\", \"Down\": \"goLineDown\",\n    \"End\": \"goLineEnd\", \"Home\": \"goLineStartSmart\", \"PageUp\": \"goPageUp\", \"PageDown\": \"goPageDown\",\n    \"Delete\": \"delCharAfter\", \"Backspace\": \"delCharBefore\", \"Shift-Backspace\": \"delCharBefore\",\n    \"Tab\": \"defaultTab\", \"Shift-Tab\": \"indentAuto\",\n    \"Enter\": \"newlineAndIndent\", \"Insert\": \"toggleOverwrite\",\n    \"Esc\": \"singleSelection\"\n  };\n  // Note that the save and find-related commands aren't defined by\n  // default. User code or addons can define them. Unknown commands\n  // are simply ignored.\n  keyMap.pcDefault = {\n    \"Ctrl-A\": \"selectAll\", \"Ctrl-D\": \"deleteLine\", \"Ctrl-Z\": \"undo\", \"Shift-Ctrl-Z\": \"redo\", \"Ctrl-Y\": \"redo\",\n    \"Ctrl-Home\": \"goDocStart\", \"Ctrl-End\": \"goDocEnd\", \"Ctrl-Up\": \"goLineUp\", \"Ctrl-Down\": \"goLineDown\",\n    \"Ctrl-Left\": \"goGroupLeft\", \"Ctrl-Right\": \"goGroupRight\", \"Alt-Left\": \"goLineStart\", \"Alt-Right\": \"goLineEnd\",\n    \"Ctrl-Backspace\": \"delGroupBefore\", \"Ctrl-Delete\": \"delGroupAfter\", \"Ctrl-S\": \"save\", \"Ctrl-F\": \"find\",\n    \"Ctrl-G\": \"findNext\", \"Shift-Ctrl-G\": \"findPrev\", \"Shift-Ctrl-F\": \"replace\", \"Shift-Ctrl-R\": \"replaceAll\",\n    \"Ctrl-[\": \"indentLess\", \"Ctrl-]\": \"indentMore\",\n    \"Ctrl-U\": \"undoSelection\", \"Shift-Ctrl-U\": \"redoSelection\", \"Alt-U\": \"redoSelection\",\n    fallthrough: \"basic\"\n  };\n  // Very basic readline/emacs-style bindings, which are standard on Mac.\n  keyMap.emacsy = {\n    \"Ctrl-F\": \"goCharRight\", \"Ctrl-B\": \"goCharLeft\", \"Ctrl-P\": \"goLineUp\", \"Ctrl-N\": \"goLineDown\",\n    \"Alt-F\": \"goWordRight\", \"Alt-B\": \"goWordLeft\", \"Ctrl-A\": \"goLineStart\", \"Ctrl-E\": \"goLineEnd\",\n    \"Ctrl-V\": \"goPageDown\", \"Shift-Ctrl-V\": \"goPageUp\", \"Ctrl-D\": \"delCharAfter\", \"Ctrl-H\": \"delCharBefore\",\n    \"Alt-D\": \"delWordAfter\", \"Alt-Backspace\": \"delWordBefore\", \"Ctrl-K\": \"killLine\", \"Ctrl-T\": \"transposeChars\"\n  };\n  keyMap.macDefault = {\n    \"Cmd-A\": \"selectAll\", \"Cmd-D\": \"deleteLine\", \"Cmd-Z\": \"undo\", \"Shift-Cmd-Z\": \"redo\", \"Cmd-Y\": \"redo\",\n    \"Cmd-Home\": \"goDocStart\", \"Cmd-Up\": \"goDocStart\", \"Cmd-End\": \"goDocEnd\", \"Cmd-Down\": \"goDocEnd\", \"Alt-Left\": \"goGroupLeft\",\n    \"Alt-Right\": \"goGroupRight\", \"Cmd-Left\": \"goLineLeft\", \"Cmd-Right\": \"goLineRight\", \"Alt-Backspace\": \"delGroupBefore\",\n    \"Ctrl-Alt-Backspace\": \"delGroupAfter\", \"Alt-Delete\": \"delGroupAfter\", \"Cmd-S\": \"save\", \"Cmd-F\": \"find\",\n    \"Cmd-G\": \"findNext\", \"Shift-Cmd-G\": \"findPrev\", \"Cmd-Alt-F\": \"replace\", \"Shift-Cmd-Alt-F\": \"replaceAll\",\n    \"Cmd-[\": \"indentLess\", \"Cmd-]\": \"indentMore\", \"Cmd-Backspace\": \"delWrappedLineLeft\", \"Cmd-Delete\": \"delWrappedLineRight\",\n    \"Cmd-U\": \"undoSelection\", \"Shift-Cmd-U\": \"redoSelection\", \"Ctrl-Up\": \"goDocStart\", \"Ctrl-Down\": \"goDocEnd\",\n    fallthrough: [\"basic\", \"emacsy\"]\n  };\n  keyMap[\"default\"] = mac ? keyMap.macDefault : keyMap.pcDefault;\n\n  // KEYMAP DISPATCH\n\n  function normalizeKeyName(name) {\n    var parts = name.split(/-(?!$)/), name = parts[parts.length - 1];\n    var alt, ctrl, shift, cmd;\n    for (var i = 0; i < parts.length - 1; i++) {\n      var mod = parts[i];\n      if (/^(cmd|meta|m)$/i.test(mod)) cmd = true;\n      else if (/^a(lt)?$/i.test(mod)) alt = true;\n      else if (/^(c|ctrl|control)$/i.test(mod)) ctrl = true;\n      else if (/^s(hift)$/i.test(mod)) shift = true;\n      else throw new Error(\"Unrecognized modifier name: \" + mod);\n    }\n    if (alt) name = \"Alt-\" + name;\n    if (ctrl) name = \"Ctrl-\" + name;\n    if (cmd) name = \"Cmd-\" + name;\n    if (shift) name = \"Shift-\" + name;\n    return name;\n  }\n\n  // This is a kludge to keep keymaps mostly working as raw objects\n  // (backwards compatibility) while at the same time support features\n  // like normalization and multi-stroke key bindings. It compiles a\n  // new normalized keymap, and then updates the old object to reflect\n  // this.\n  CodeMirror.normalizeKeyMap = function(keymap) {\n    var copy = {};\n    for (var keyname in keymap) if (keymap.hasOwnProperty(keyname)) {\n      var value = keymap[keyname];\n      if (/^(name|fallthrough|(de|at)tach)$/.test(keyname)) continue;\n      if (value == \"...\") { delete keymap[keyname]; continue; }\n\n      var keys = map(keyname.split(\" \"), normalizeKeyName);\n      for (var i = 0; i < keys.length; i++) {\n        var val, name;\n        if (i == keys.length - 1) {\n          name = keyname;\n          val = value;\n        } else {\n          name = keys.slice(0, i + 1).join(\" \");\n          val = \"...\";\n        }\n        var prev = copy[name];\n        if (!prev) copy[name] = val;\n        else if (prev != val) throw new Error(\"Inconsistent bindings for \" + name);\n      }\n      delete keymap[keyname];\n    }\n    for (var prop in copy) keymap[prop] = copy[prop];\n    return keymap;\n  };\n\n  var lookupKey = CodeMirror.lookupKey = function(key, map, handle, context) {\n    map = getKeyMap(map);\n    var found = map.call ? map.call(key, context) : map[key];\n    if (found === false) return \"nothing\";\n    if (found === \"...\") return \"multi\";\n    if (found != null && handle(found)) return \"handled\";\n\n    if (map.fallthrough) {\n      if (Object.prototype.toString.call(map.fallthrough) != \"[object Array]\")\n        return lookupKey(key, map.fallthrough, handle, context);\n      for (var i = 0; i < map.fallthrough.length; i++) {\n        var result = lookupKey(key, map.fallthrough[i], handle, context);\n        if (result) return result;\n      }\n    }\n  };\n\n  // Modifier key presses don't count as 'real' key presses for the\n  // purpose of keymap fallthrough.\n  var isModifierKey = CodeMirror.isModifierKey = function(value) {\n    var name = typeof value == \"string\" ? value : keyNames[value.keyCode];\n    return name == \"Ctrl\" || name == \"Alt\" || name == \"Shift\" || name == \"Mod\";\n  };\n\n  // Look up the name of a key as indicated by an event object.\n  var keyName = CodeMirror.keyName = function(event, noShift) {\n    if (presto && event.keyCode == 34 && event[\"char\"]) return false;\n    var base = keyNames[event.keyCode], name = base;\n    if (name == null || event.altGraphKey) return false;\n    if (event.altKey && base != \"Alt\") name = \"Alt-\" + name;\n    if ((flipCtrlCmd ? event.metaKey : event.ctrlKey) && base != \"Ctrl\") name = \"Ctrl-\" + name;\n    if ((flipCtrlCmd ? event.ctrlKey : event.metaKey) && base != \"Cmd\") name = \"Cmd-\" + name;\n    if (!noShift && event.shiftKey && base != \"Shift\") name = \"Shift-\" + name;\n    return name;\n  };\n\n  function getKeyMap(val) {\n    return typeof val == \"string\" ? keyMap[val] : val;\n  }\n\n  // FROMTEXTAREA\n\n  CodeMirror.fromTextArea = function(textarea, options) {\n    options = options ? copyObj(options) : {};\n    options.value = textarea.value;\n    if (!options.tabindex && textarea.tabIndex)\n      options.tabindex = textarea.tabIndex;\n    if (!options.placeholder && textarea.placeholder)\n      options.placeholder = textarea.placeholder;\n    // Set autofocus to true if this textarea is focused, or if it has\n    // autofocus and no other element is focused.\n    if (options.autofocus == null) {\n      var hasFocus = activeElt();\n      options.autofocus = hasFocus == textarea ||\n        textarea.getAttribute(\"autofocus\") != null && hasFocus == document.body;\n    }\n\n    function save() {textarea.value = cm.getValue();}\n    if (textarea.form) {\n      on(textarea.form, \"submit\", save);\n      // Deplorable hack to make the submit method do the right thing.\n      if (!options.leaveSubmitMethodAlone) {\n        var form = textarea.form, realSubmit = form.submit;\n        try {\n          var wrappedSubmit = form.submit = function() {\n            save();\n            form.submit = realSubmit;\n            form.submit();\n            form.submit = wrappedSubmit;\n          };\n        } catch(e) {}\n      }\n    }\n\n    options.finishInit = function(cm) {\n      cm.save = save;\n      cm.getTextArea = function() { return textarea; };\n      cm.toTextArea = function() {\n        cm.toTextArea = isNaN; // Prevent this from being ran twice\n        save();\n        textarea.parentNode.removeChild(cm.getWrapperElement());\n        textarea.style.display = \"\";\n        if (textarea.form) {\n          off(textarea.form, \"submit\", save);\n          if (typeof textarea.form.submit == \"function\")\n            textarea.form.submit = realSubmit;\n        }\n      };\n    };\n\n    textarea.style.display = \"none\";\n    var cm = CodeMirror(function(node) {\n      textarea.parentNode.insertBefore(node, textarea.nextSibling);\n    }, options);\n    return cm;\n  };\n\n  // STRING STREAM\n\n  // Fed to the mode parsers, provides helper functions to make\n  // parsers more succinct.\n\n  var StringStream = CodeMirror.StringStream = function(string, tabSize) {\n    this.pos = this.start = 0;\n    this.string = string;\n    this.tabSize = tabSize || 8;\n    this.lastColumnPos = this.lastColumnValue = 0;\n    this.lineStart = 0;\n  };\n\n  StringStream.prototype = {\n    eol: function() {return this.pos >= this.string.length;},\n    sol: function() {return this.pos == this.lineStart;},\n    peek: function() {return this.string.charAt(this.pos) || undefined;},\n    next: function() {\n      if (this.pos < this.string.length)\n        return this.string.charAt(this.pos++);\n    },\n    eat: function(match) {\n      var ch = this.string.charAt(this.pos);\n      if (typeof match == \"string\") var ok = ch == match;\n      else var ok = ch && (match.test ? match.test(ch) : match(ch));\n      if (ok) {++this.pos; return ch;}\n    },\n    eatWhile: function(match) {\n      var start = this.pos;\n      while (this.eat(match)){}\n      return this.pos > start;\n    },\n    eatSpace: function() {\n      var start = this.pos;\n      while (/[\\s\\u00a0]/.test(this.string.charAt(this.pos))) ++this.pos;\n      return this.pos > start;\n    },\n    skipToEnd: function() {this.pos = this.string.length;},\n    skipTo: function(ch) {\n      var found = this.string.indexOf(ch, this.pos);\n      if (found > -1) {this.pos = found; return true;}\n    },\n    backUp: function(n) {this.pos -= n;},\n    column: function() {\n      if (this.lastColumnPos < this.start) {\n        this.lastColumnValue = countColumn(this.string, this.start, this.tabSize, this.lastColumnPos, this.lastColumnValue);\n        this.lastColumnPos = this.start;\n      }\n      return this.lastColumnValue - (this.lineStart ? countColumn(this.string, this.lineStart, this.tabSize) : 0);\n    },\n    indentation: function() {\n      return countColumn(this.string, null, this.tabSize) -\n        (this.lineStart ? countColumn(this.string, this.lineStart, this.tabSize) : 0);\n    },\n    match: function(pattern, consume, caseInsensitive) {\n      if (typeof pattern == \"string\") {\n        var cased = function(str) {return caseInsensitive ? str.toLowerCase() : str;};\n        var substr = this.string.substr(this.pos, pattern.length);\n        if (cased(substr) == cased(pattern)) {\n          if (consume !== false) this.pos += pattern.length;\n          return true;\n        }\n      } else {\n        var match = this.string.slice(this.pos).match(pattern);\n        if (match && match.index > 0) return null;\n        if (match && consume !== false) this.pos += match[0].length;\n        return match;\n      }\n    },\n    current: function(){return this.string.slice(this.start, this.pos);},\n    hideFirstChars: function(n, inner) {\n      this.lineStart += n;\n      try { return inner(); }\n      finally { this.lineStart -= n; }\n    }\n  };\n\n  // TEXTMARKERS\n\n  // Created with markText and setBookmark methods. A TextMarker is a\n  // handle that can be used to clear or find a marked position in the\n  // document. Line objects hold arrays (markedSpans) containing\n  // {from, to, marker} object pointing to such marker objects, and\n  // indicating that such a marker is present on that line. Multiple\n  // lines may point to the same marker when it spans across lines.\n  // The spans will have null for their from/to properties when the\n  // marker continues beyond the start/end of the line. Markers have\n  // links back to the lines they currently touch.\n\n  var nextMarkerId = 0;\n\n  var TextMarker = CodeMirror.TextMarker = function(doc, type) {\n    this.lines = [];\n    this.type = type;\n    this.doc = doc;\n    this.id = ++nextMarkerId;\n  };\n  eventMixin(TextMarker);\n\n  // Clear the marker.\n  TextMarker.prototype.clear = function() {\n    if (this.explicitlyCleared) return;\n    var cm = this.doc.cm, withOp = cm && !cm.curOp;\n    if (withOp) startOperation(cm);\n    if (hasHandler(this, \"clear\")) {\n      var found = this.find();\n      if (found) signalLater(this, \"clear\", found.from, found.to);\n    }\n    var min = null, max = null;\n    for (var i = 0; i < this.lines.length; ++i) {\n      var line = this.lines[i];\n      var span = getMarkedSpanFor(line.markedSpans, this);\n      if (cm && !this.collapsed) regLineChange(cm, lineNo(line), \"text\");\n      else if (cm) {\n        if (span.to != null) max = lineNo(line);\n        if (span.from != null) min = lineNo(line);\n      }\n      line.markedSpans = removeMarkedSpan(line.markedSpans, span);\n      if (span.from == null && this.collapsed && !lineIsHidden(this.doc, line) && cm)\n        updateLineHeight(line, textHeight(cm.display));\n    }\n    if (cm && this.collapsed && !cm.options.lineWrapping) for (var i = 0; i < this.lines.length; ++i) {\n      var visual = visualLine(this.lines[i]), len = lineLength(visual);\n      if (len > cm.display.maxLineLength) {\n        cm.display.maxLine = visual;\n        cm.display.maxLineLength = len;\n        cm.display.maxLineChanged = true;\n      }\n    }\n\n    if (min != null && cm && this.collapsed) regChange(cm, min, max + 1);\n    this.lines.length = 0;\n    this.explicitlyCleared = true;\n    if (this.atomic && this.doc.cantEdit) {\n      this.doc.cantEdit = false;\n      if (cm) reCheckSelection(cm.doc);\n    }\n    if (cm) signalLater(cm, \"markerCleared\", cm, this);\n    if (withOp) endOperation(cm);\n    if (this.parent) this.parent.clear();\n  };\n\n  // Find the position of the marker in the document. Returns a {from,\n  // to} object by default. Side can be passed to get a specific side\n  // -- 0 (both), -1 (left), or 1 (right). When lineObj is true, the\n  // Pos objects returned contain a line object, rather than a line\n  // number (used to prevent looking up the same line twice).\n  TextMarker.prototype.find = function(side, lineObj) {\n    if (side == null && this.type == \"bookmark\") side = 1;\n    var from, to;\n    for (var i = 0; i < this.lines.length; ++i) {\n      var line = this.lines[i];\n      var span = getMarkedSpanFor(line.markedSpans, this);\n      if (span.from != null) {\n        from = Pos(lineObj ? line : lineNo(line), span.from);\n        if (side == -1) return from;\n      }\n      if (span.to != null) {\n        to = Pos(lineObj ? line : lineNo(line), span.to);\n        if (side == 1) return to;\n      }\n    }\n    return from && {from: from, to: to};\n  };\n\n  // Signals that the marker's widget changed, and surrounding layout\n  // should be recomputed.\n  TextMarker.prototype.changed = function() {\n    var pos = this.find(-1, true), widget = this, cm = this.doc.cm;\n    if (!pos || !cm) return;\n    runInOp(cm, function() {\n      var line = pos.line, lineN = lineNo(pos.line);\n      var view = findViewForLine(cm, lineN);\n      if (view) {\n        clearLineMeasurementCacheFor(view);\n        cm.curOp.selectionChanged = cm.curOp.forceUpdate = true;\n      }\n      cm.curOp.updateMaxLine = true;\n      if (!lineIsHidden(widget.doc, line) && widget.height != null) {\n        var oldHeight = widget.height;\n        widget.height = null;\n        var dHeight = widgetHeight(widget) - oldHeight;\n        if (dHeight)\n          updateLineHeight(line, line.height + dHeight);\n      }\n    });\n  };\n\n  TextMarker.prototype.attachLine = function(line) {\n    if (!this.lines.length && this.doc.cm) {\n      var op = this.doc.cm.curOp;\n      if (!op.maybeHiddenMarkers || indexOf(op.maybeHiddenMarkers, this) == -1)\n        (op.maybeUnhiddenMarkers || (op.maybeUnhiddenMarkers = [])).push(this);\n    }\n    this.lines.push(line);\n  };\n  TextMarker.prototype.detachLine = function(line) {\n    this.lines.splice(indexOf(this.lines, line), 1);\n    if (!this.lines.length && this.doc.cm) {\n      var op = this.doc.cm.curOp;\n      (op.maybeHiddenMarkers || (op.maybeHiddenMarkers = [])).push(this);\n    }\n  };\n\n  // Collapsed markers have unique ids, in order to be able to order\n  // them, which is needed for uniquely determining an outer marker\n  // when they overlap (they may nest, but not partially overlap).\n  var nextMarkerId = 0;\n\n  // Create a marker, wire it up to the right lines, and\n  function markText(doc, from, to, options, type) {\n    // Shared markers (across linked documents) are handled separately\n    // (markTextShared will call out to this again, once per\n    // document).\n    if (options && options.shared) return markTextShared(doc, from, to, options, type);\n    // Ensure we are in an operation.\n    if (doc.cm && !doc.cm.curOp) return operation(doc.cm, markText)(doc, from, to, options, type);\n\n    var marker = new TextMarker(doc, type), diff = cmp(from, to);\n    if (options) copyObj(options, marker, false);\n    // Don't connect empty markers unless clearWhenEmpty is false\n    if (diff > 0 || diff == 0 && marker.clearWhenEmpty !== false)\n      return marker;\n    if (marker.replacedWith) {\n      // Showing up as a widget implies collapsed (widget replaces text)\n      marker.collapsed = true;\n      marker.widgetNode = elt(\"span\", [marker.replacedWith], \"CodeMirror-widget\");\n      if (!options.handleMouseEvents) marker.widgetNode.setAttribute(\"cm-ignore-events\", \"true\");\n      if (options.insertLeft) marker.widgetNode.insertLeft = true;\n    }\n    if (marker.collapsed) {\n      if (conflictingCollapsedRange(doc, from.line, from, to, marker) ||\n          from.line != to.line && conflictingCollapsedRange(doc, to.line, from, to, marker))\n        throw new Error(\"Inserting collapsed marker partially overlapping an existing one\");\n      sawCollapsedSpans = true;\n    }\n\n    if (marker.addToHistory)\n      addChangeToHistory(doc, {from: from, to: to, origin: \"markText\"}, doc.sel, NaN);\n\n    var curLine = from.line, cm = doc.cm, updateMaxLine;\n    doc.iter(curLine, to.line + 1, function(line) {\n      if (cm && marker.collapsed && !cm.options.lineWrapping && visualLine(line) == cm.display.maxLine)\n        updateMaxLine = true;\n      if (marker.collapsed && curLine != from.line) updateLineHeight(line, 0);\n      addMarkedSpan(line, new MarkedSpan(marker,\n                                         curLine == from.line ? from.ch : null,\n                                         curLine == to.line ? to.ch : null));\n      ++curLine;\n    });\n    // lineIsHidden depends on the presence of the spans, so needs a second pass\n    if (marker.collapsed) doc.iter(from.line, to.line + 1, function(line) {\n      if (lineIsHidden(doc, line)) updateLineHeight(line, 0);\n    });\n\n    if (marker.clearOnEnter) on(marker, \"beforeCursorEnter\", function() { marker.clear(); });\n\n    if (marker.readOnly) {\n      sawReadOnlySpans = true;\n      if (doc.history.done.length || doc.history.undone.length)\n        doc.clearHistory();\n    }\n    if (marker.collapsed) {\n      marker.id = ++nextMarkerId;\n      marker.atomic = true;\n    }\n    if (cm) {\n      // Sync editor state\n      if (updateMaxLine) cm.curOp.updateMaxLine = true;\n      if (marker.collapsed)\n        regChange(cm, from.line, to.line + 1);\n      else if (marker.className || marker.title || marker.startStyle || marker.endStyle || marker.css)\n        for (var i = from.line; i <= to.line; i++) regLineChange(cm, i, \"text\");\n      if (marker.atomic) reCheckSelection(cm.doc);\n      signalLater(cm, \"markerAdded\", cm, marker);\n    }\n    return marker;\n  }\n\n  // SHARED TEXTMARKERS\n\n  // A shared marker spans multiple linked documents. It is\n  // implemented as a meta-marker-object controlling multiple normal\n  // markers.\n  var SharedTextMarker = CodeMirror.SharedTextMarker = function(markers, primary) {\n    this.markers = markers;\n    this.primary = primary;\n    for (var i = 0; i < markers.length; ++i)\n      markers[i].parent = this;\n  };\n  eventMixin(SharedTextMarker);\n\n  SharedTextMarker.prototype.clear = function() {\n    if (this.explicitlyCleared) return;\n    this.explicitlyCleared = true;\n    for (var i = 0; i < this.markers.length; ++i)\n      this.markers[i].clear();\n    signalLater(this, \"clear\");\n  };\n  SharedTextMarker.prototype.find = function(side, lineObj) {\n    return this.primary.find(side, lineObj);\n  };\n\n  function markTextShared(doc, from, to, options, type) {\n    options = copyObj(options);\n    options.shared = false;\n    var markers = [markText(doc, from, to, options, type)], primary = markers[0];\n    var widget = options.widgetNode;\n    linkedDocs(doc, function(doc) {\n      if (widget) options.widgetNode = widget.cloneNode(true);\n      markers.push(markText(doc, clipPos(doc, from), clipPos(doc, to), options, type));\n      for (var i = 0; i < doc.linked.length; ++i)\n        if (doc.linked[i].isParent) return;\n      primary = lst(markers);\n    });\n    return new SharedTextMarker(markers, primary);\n  }\n\n  function findSharedMarkers(doc) {\n    return doc.findMarks(Pos(doc.first, 0), doc.clipPos(Pos(doc.lastLine())),\n                         function(m) { return m.parent; });\n  }\n\n  function copySharedMarkers(doc, markers) {\n    for (var i = 0; i < markers.length; i++) {\n      var marker = markers[i], pos = marker.find();\n      var mFrom = doc.clipPos(pos.from), mTo = doc.clipPos(pos.to);\n      if (cmp(mFrom, mTo)) {\n        var subMark = markText(doc, mFrom, mTo, marker.primary, marker.primary.type);\n        marker.markers.push(subMark);\n        subMark.parent = marker;\n      }\n    }\n  }\n\n  function detachSharedMarkers(markers) {\n    for (var i = 0; i < markers.length; i++) {\n      var marker = markers[i], linked = [marker.primary.doc];;\n      linkedDocs(marker.primary.doc, function(d) { linked.push(d); });\n      for (var j = 0; j < marker.markers.length; j++) {\n        var subMarker = marker.markers[j];\n        if (indexOf(linked, subMarker.doc) == -1) {\n          subMarker.parent = null;\n          marker.markers.splice(j--, 1);\n        }\n      }\n    }\n  }\n\n  // TEXTMARKER SPANS\n\n  function MarkedSpan(marker, from, to) {\n    this.marker = marker;\n    this.from = from; this.to = to;\n  }\n\n  // Search an array of spans for a span matching the given marker.\n  function getMarkedSpanFor(spans, marker) {\n    if (spans) for (var i = 0; i < spans.length; ++i) {\n      var span = spans[i];\n      if (span.marker == marker) return span;\n    }\n  }\n  // Remove a span from an array, returning undefined if no spans are\n  // left (we don't store arrays for lines without spans).\n  function removeMarkedSpan(spans, span) {\n    for (var r, i = 0; i < spans.length; ++i)\n      if (spans[i] != span) (r || (r = [])).push(spans[i]);\n    return r;\n  }\n  // Add a span to a line.\n  function addMarkedSpan(line, span) {\n    line.markedSpans = line.markedSpans ? line.markedSpans.concat([span]) : [span];\n    span.marker.attachLine(line);\n  }\n\n  // Used for the algorithm that adjusts markers for a change in the\n  // document. These functions cut an array of spans at a given\n  // character position, returning an array of remaining chunks (or\n  // undefined if nothing remains).\n  function markedSpansBefore(old, startCh, isInsert) {\n    if (old) for (var i = 0, nw; i < old.length; ++i) {\n      var span = old[i], marker = span.marker;\n      var startsBefore = span.from == null || (marker.inclusiveLeft ? span.from <= startCh : span.from < startCh);\n      if (startsBefore || span.from == startCh && marker.type == \"bookmark\" && (!isInsert || !span.marker.insertLeft)) {\n        var endsAfter = span.to == null || (marker.inclusiveRight ? span.to >= startCh : span.to > startCh);\n        (nw || (nw = [])).push(new MarkedSpan(marker, span.from, endsAfter ? null : span.to));\n      }\n    }\n    return nw;\n  }\n  function markedSpansAfter(old, endCh, isInsert) {\n    if (old) for (var i = 0, nw; i < old.length; ++i) {\n      var span = old[i], marker = span.marker;\n      var endsAfter = span.to == null || (marker.inclusiveRight ? span.to >= endCh : span.to > endCh);\n      if (endsAfter || span.from == endCh && marker.type == \"bookmark\" && (!isInsert || span.marker.insertLeft)) {\n        var startsBefore = span.from == null || (marker.inclusiveLeft ? span.from <= endCh : span.from < endCh);\n        (nw || (nw = [])).push(new MarkedSpan(marker, startsBefore ? null : span.from - endCh,\n                                              span.to == null ? null : span.to - endCh));\n      }\n    }\n    return nw;\n  }\n\n  // Given a change object, compute the new set of marker spans that\n  // cover the line in which the change took place. Removes spans\n  // entirely within the change, reconnects spans belonging to the\n  // same marker that appear on both sides of the change, and cuts off\n  // spans partially within the change. Returns an array of span\n  // arrays with one element for each line in (after) the change.\n  function stretchSpansOverChange(doc, change) {\n    if (change.full) return null;\n    var oldFirst = isLine(doc, change.from.line) && getLine(doc, change.from.line).markedSpans;\n    var oldLast = isLine(doc, change.to.line) && getLine(doc, change.to.line).markedSpans;\n    if (!oldFirst && !oldLast) return null;\n\n    var startCh = change.from.ch, endCh = change.to.ch, isInsert = cmp(change.from, change.to) == 0;\n    // Get the spans that 'stick out' on both sides\n    var first = markedSpansBefore(oldFirst, startCh, isInsert);\n    var last = markedSpansAfter(oldLast, endCh, isInsert);\n\n    // Next, merge those two ends\n    var sameLine = change.text.length == 1, offset = lst(change.text).length + (sameLine ? startCh : 0);\n    if (first) {\n      // Fix up .to properties of first\n      for (var i = 0; i < first.length; ++i) {\n        var span = first[i];\n        if (span.to == null) {\n          var found = getMarkedSpanFor(last, span.marker);\n          if (!found) span.to = startCh;\n          else if (sameLine) span.to = found.to == null ? null : found.to + offset;\n        }\n      }\n    }\n    if (last) {\n      // Fix up .from in last (or move them into first in case of sameLine)\n      for (var i = 0; i < last.length; ++i) {\n        var span = last[i];\n        if (span.to != null) span.to += offset;\n        if (span.from == null) {\n          var found = getMarkedSpanFor(first, span.marker);\n          if (!found) {\n            span.from = offset;\n            if (sameLine) (first || (first = [])).push(span);\n          }\n        } else {\n          span.from += offset;\n          if (sameLine) (first || (first = [])).push(span);\n        }\n      }\n    }\n    // Make sure we didn't create any zero-length spans\n    if (first) first = clearEmptySpans(first);\n    if (last && last != first) last = clearEmptySpans(last);\n\n    var newMarkers = [first];\n    if (!sameLine) {\n      // Fill gap with whole-line-spans\n      var gap = change.text.length - 2, gapMarkers;\n      if (gap > 0 && first)\n        for (var i = 0; i < first.length; ++i)\n          if (first[i].to == null)\n            (gapMarkers || (gapMarkers = [])).push(new MarkedSpan(first[i].marker, null, null));\n      for (var i = 0; i < gap; ++i)\n        newMarkers.push(gapMarkers);\n      newMarkers.push(last);\n    }\n    return newMarkers;\n  }\n\n  // Remove spans that are empty and don't have a clearWhenEmpty\n  // option of false.\n  function clearEmptySpans(spans) {\n    for (var i = 0; i < spans.length; ++i) {\n      var span = spans[i];\n      if (span.from != null && span.from == span.to && span.marker.clearWhenEmpty !== false)\n        spans.splice(i--, 1);\n    }\n    if (!spans.length) return null;\n    return spans;\n  }\n\n  // Used for un/re-doing changes from the history. Combines the\n  // result of computing the existing spans with the set of spans that\n  // existed in the history (so that deleting around a span and then\n  // undoing brings back the span).\n  function mergeOldSpans(doc, change) {\n    var old = getOldSpans(doc, change);\n    var stretched = stretchSpansOverChange(doc, change);\n    if (!old) return stretched;\n    if (!stretched) return old;\n\n    for (var i = 0; i < old.length; ++i) {\n      var oldCur = old[i], stretchCur = stretched[i];\n      if (oldCur && stretchCur) {\n        spans: for (var j = 0; j < stretchCur.length; ++j) {\n          var span = stretchCur[j];\n          for (var k = 0; k < oldCur.length; ++k)\n            if (oldCur[k].marker == span.marker) continue spans;\n          oldCur.push(span);\n        }\n      } else if (stretchCur) {\n        old[i] = stretchCur;\n      }\n    }\n    return old;\n  }\n\n  // Used to 'clip' out readOnly ranges when making a change.\n  function removeReadOnlyRanges(doc, from, to) {\n    var markers = null;\n    doc.iter(from.line, to.line + 1, function(line) {\n      if (line.markedSpans) for (var i = 0; i < line.markedSpans.length; ++i) {\n        var mark = line.markedSpans[i].marker;\n        if (mark.readOnly && (!markers || indexOf(markers, mark) == -1))\n          (markers || (markers = [])).push(mark);\n      }\n    });\n    if (!markers) return null;\n    var parts = [{from: from, to: to}];\n    for (var i = 0; i < markers.length; ++i) {\n      var mk = markers[i], m = mk.find(0);\n      for (var j = 0; j < parts.length; ++j) {\n        var p = parts[j];\n        if (cmp(p.to, m.from) < 0 || cmp(p.from, m.to) > 0) continue;\n        var newParts = [j, 1], dfrom = cmp(p.from, m.from), dto = cmp(p.to, m.to);\n        if (dfrom < 0 || !mk.inclusiveLeft && !dfrom)\n          newParts.push({from: p.from, to: m.from});\n        if (dto > 0 || !mk.inclusiveRight && !dto)\n          newParts.push({from: m.to, to: p.to});\n        parts.splice.apply(parts, newParts);\n        j += newParts.length - 1;\n      }\n    }\n    return parts;\n  }\n\n  // Connect or disconnect spans from a line.\n  function detachMarkedSpans(line) {\n    var spans = line.markedSpans;\n    if (!spans) return;\n    for (var i = 0; i < spans.length; ++i)\n      spans[i].marker.detachLine(line);\n    line.markedSpans = null;\n  }\n  function attachMarkedSpans(line, spans) {\n    if (!spans) return;\n    for (var i = 0; i < spans.length; ++i)\n      spans[i].marker.attachLine(line);\n    line.markedSpans = spans;\n  }\n\n  // Helpers used when computing which overlapping collapsed span\n  // counts as the larger one.\n  function extraLeft(marker) { return marker.inclusiveLeft ? -1 : 0; }\n  function extraRight(marker) { return marker.inclusiveRight ? 1 : 0; }\n\n  // Returns a number indicating which of two overlapping collapsed\n  // spans is larger (and thus includes the other). Falls back to\n  // comparing ids when the spans cover exactly the same range.\n  function compareCollapsedMarkers(a, b) {\n    var lenDiff = a.lines.length - b.lines.length;\n    if (lenDiff != 0) return lenDiff;\n    var aPos = a.find(), bPos = b.find();\n    var fromCmp = cmp(aPos.from, bPos.from) || extraLeft(a) - extraLeft(b);\n    if (fromCmp) return -fromCmp;\n    var toCmp = cmp(aPos.to, bPos.to) || extraRight(a) - extraRight(b);\n    if (toCmp) return toCmp;\n    return b.id - a.id;\n  }\n\n  // Find out whether a line ends or starts in a collapsed span. If\n  // so, return the marker for that span.\n  function collapsedSpanAtSide(line, start) {\n    var sps = sawCollapsedSpans && line.markedSpans, found;\n    if (sps) for (var sp, i = 0; i < sps.length; ++i) {\n      sp = sps[i];\n      if (sp.marker.collapsed && (start ? sp.from : sp.to) == null &&\n          (!found || compareCollapsedMarkers(found, sp.marker) < 0))\n        found = sp.marker;\n    }\n    return found;\n  }\n  function collapsedSpanAtStart(line) { return collapsedSpanAtSide(line, true); }\n  function collapsedSpanAtEnd(line) { return collapsedSpanAtSide(line, false); }\n\n  // Test whether there exists a collapsed span that partially\n  // overlaps (covers the start or end, but not both) of a new span.\n  // Such overlap is not allowed.\n  function conflictingCollapsedRange(doc, lineNo, from, to, marker) {\n    var line = getLine(doc, lineNo);\n    var sps = sawCollapsedSpans && line.markedSpans;\n    if (sps) for (var i = 0; i < sps.length; ++i) {\n      var sp = sps[i];\n      if (!sp.marker.collapsed) continue;\n      var found = sp.marker.find(0);\n      var fromCmp = cmp(found.from, from) || extraLeft(sp.marker) - extraLeft(marker);\n      var toCmp = cmp(found.to, to) || extraRight(sp.marker) - extraRight(marker);\n      if (fromCmp >= 0 && toCmp <= 0 || fromCmp <= 0 && toCmp >= 0) continue;\n      if (fromCmp <= 0 && (cmp(found.to, from) > 0 || (sp.marker.inclusiveRight && marker.inclusiveLeft)) ||\n          fromCmp >= 0 && (cmp(found.from, to) < 0 || (sp.marker.inclusiveLeft && marker.inclusiveRight)))\n        return true;\n    }\n  }\n\n  // A visual line is a line as drawn on the screen. Folding, for\n  // example, can cause multiple logical lines to appear on the same\n  // visual line. This finds the start of the visual line that the\n  // given line is part of (usually that is the line itself).\n  function visualLine(line) {\n    var merged;\n    while (merged = collapsedSpanAtStart(line))\n      line = merged.find(-1, true).line;\n    return line;\n  }\n\n  // Returns an array of logical lines that continue the visual line\n  // started by the argument, or undefined if there are no such lines.\n  function visualLineContinued(line) {\n    var merged, lines;\n    while (merged = collapsedSpanAtEnd(line)) {\n      line = merged.find(1, true).line;\n      (lines || (lines = [])).push(line);\n    }\n    return lines;\n  }\n\n  // Get the line number of the start of the visual line that the\n  // given line number is part of.\n  function visualLineNo(doc, lineN) {\n    var line = getLine(doc, lineN), vis = visualLine(line);\n    if (line == vis) return lineN;\n    return lineNo(vis);\n  }\n  // Get the line number of the start of the next visual line after\n  // the given line.\n  function visualLineEndNo(doc, lineN) {\n    if (lineN > doc.lastLine()) return lineN;\n    var line = getLine(doc, lineN), merged;\n    if (!lineIsHidden(doc, line)) return lineN;\n    while (merged = collapsedSpanAtEnd(line))\n      line = merged.find(1, true).line;\n    return lineNo(line) + 1;\n  }\n\n  // Compute whether a line is hidden. Lines count as hidden when they\n  // are part of a visual line that starts with another line, or when\n  // they are entirely covered by collapsed, non-widget span.\n  function lineIsHidden(doc, line) {\n    var sps = sawCollapsedSpans && line.markedSpans;\n    if (sps) for (var sp, i = 0; i < sps.length; ++i) {\n      sp = sps[i];\n      if (!sp.marker.collapsed) continue;\n      if (sp.from == null) return true;\n      if (sp.marker.widgetNode) continue;\n      if (sp.from == 0 && sp.marker.inclusiveLeft && lineIsHiddenInner(doc, line, sp))\n        return true;\n    }\n  }\n  function lineIsHiddenInner(doc, line, span) {\n    if (span.to == null) {\n      var end = span.marker.find(1, true);\n      return lineIsHiddenInner(doc, end.line, getMarkedSpanFor(end.line.markedSpans, span.marker));\n    }\n    if (span.marker.inclusiveRight && span.to == line.text.length)\n      return true;\n    for (var sp, i = 0; i < line.markedSpans.length; ++i) {\n      sp = line.markedSpans[i];\n      if (sp.marker.collapsed && !sp.marker.widgetNode && sp.from == span.to &&\n          (sp.to == null || sp.to != span.from) &&\n          (sp.marker.inclusiveLeft || span.marker.inclusiveRight) &&\n          lineIsHiddenInner(doc, line, sp)) return true;\n    }\n  }\n\n  // LINE WIDGETS\n\n  // Line widgets are block elements displayed above or below a line.\n\n  var LineWidget = CodeMirror.LineWidget = function(cm, node, options) {\n    if (options) for (var opt in options) if (options.hasOwnProperty(opt))\n      this[opt] = options[opt];\n    this.cm = cm;\n    this.node = node;\n  };\n  eventMixin(LineWidget);\n\n  function adjustScrollWhenAboveVisible(cm, line, diff) {\n    if (heightAtLine(line) < ((cm.curOp && cm.curOp.scrollTop) || cm.doc.scrollTop))\n      addToScrollPos(cm, null, diff);\n  }\n\n  LineWidget.prototype.clear = function() {\n    var cm = this.cm, ws = this.line.widgets, line = this.line, no = lineNo(line);\n    if (no == null || !ws) return;\n    for (var i = 0; i < ws.length; ++i) if (ws[i] == this) ws.splice(i--, 1);\n    if (!ws.length) line.widgets = null;\n    var height = widgetHeight(this);\n    runInOp(cm, function() {\n      adjustScrollWhenAboveVisible(cm, line, -height);\n      regLineChange(cm, no, \"widget\");\n      updateLineHeight(line, Math.max(0, line.height - height));\n    });\n  };\n  LineWidget.prototype.changed = function() {\n    var oldH = this.height, cm = this.cm, line = this.line;\n    this.height = null;\n    var diff = widgetHeight(this) - oldH;\n    if (!diff) return;\n    runInOp(cm, function() {\n      cm.curOp.forceUpdate = true;\n      adjustScrollWhenAboveVisible(cm, line, diff);\n      updateLineHeight(line, line.height + diff);\n    });\n  };\n\n  function widgetHeight(widget) {\n    if (widget.height != null) return widget.height;\n    if (!contains(document.body, widget.node)) {\n      var parentStyle = \"position: relative;\";\n      if (widget.coverGutter)\n        parentStyle += \"margin-left: -\" + widget.cm.display.gutters.offsetWidth + \"px;\";\n      if (widget.noHScroll)\n        parentStyle += \"width: \" + widget.cm.display.wrapper.clientWidth + \"px;\";\n      removeChildrenAndAdd(widget.cm.display.measure, elt(\"div\", [widget.node], null, parentStyle));\n    }\n    return widget.height = widget.node.offsetHeight;\n  }\n\n  function addLineWidget(cm, handle, node, options) {\n    var widget = new LineWidget(cm, node, options);\n    if (widget.noHScroll) cm.display.alignWidgets = true;\n    changeLine(cm.doc, handle, \"widget\", function(line) {\n      var widgets = line.widgets || (line.widgets = []);\n      if (widget.insertAt == null) widgets.push(widget);\n      else widgets.splice(Math.min(widgets.length - 1, Math.max(0, widget.insertAt)), 0, widget);\n      widget.line = line;\n      if (!lineIsHidden(cm.doc, line)) {\n        var aboveVisible = heightAtLine(line) < cm.doc.scrollTop;\n        updateLineHeight(line, line.height + widgetHeight(widget));\n        if (aboveVisible) addToScrollPos(cm, null, widget.height);\n        cm.curOp.forceUpdate = true;\n      }\n      return true;\n    });\n    return widget;\n  }\n\n  // LINE DATA STRUCTURE\n\n  // Line objects. These hold state related to a line, including\n  // highlighting info (the styles array).\n  var Line = CodeMirror.Line = function(text, markedSpans, estimateHeight) {\n    this.text = text;\n    attachMarkedSpans(this, markedSpans);\n    this.height = estimateHeight ? estimateHeight(this) : 1;\n  };\n  eventMixin(Line);\n  Line.prototype.lineNo = function() { return lineNo(this); };\n\n  // Change the content (text, markers) of a line. Automatically\n  // invalidates cached information and tries to re-estimate the\n  // line's height.\n  function updateLine(line, text, markedSpans, estimateHeight) {\n    line.text = text;\n    if (line.stateAfter) line.stateAfter = null;\n    if (line.styles) line.styles = null;\n    if (line.order != null) line.order = null;\n    detachMarkedSpans(line);\n    attachMarkedSpans(line, markedSpans);\n    var estHeight = estimateHeight ? estimateHeight(line) : 1;\n    if (estHeight != line.height) updateLineHeight(line, estHeight);\n  }\n\n  // Detach a line from the document tree and its markers.\n  function cleanUpLine(line) {\n    line.parent = null;\n    detachMarkedSpans(line);\n  }\n\n  function extractLineClasses(type, output) {\n    if (type) for (;;) {\n      var lineClass = type.match(/(?:^|\\s+)line-(background-)?(\\S+)/);\n      if (!lineClass) break;\n      type = type.slice(0, lineClass.index) + type.slice(lineClass.index + lineClass[0].length);\n      var prop = lineClass[1] ? \"bgClass\" : \"textClass\";\n      if (output[prop] == null)\n        output[prop] = lineClass[2];\n      else if (!(new RegExp(\"(?:^|\\s)\" + lineClass[2] + \"(?:$|\\s)\")).test(output[prop]))\n        output[prop] += \" \" + lineClass[2];\n    }\n    return type;\n  }\n\n  function callBlankLine(mode, state) {\n    if (mode.blankLine) return mode.blankLine(state);\n    if (!mode.innerMode) return;\n    var inner = CodeMirror.innerMode(mode, state);\n    if (inner.mode.blankLine) return inner.mode.blankLine(inner.state);\n  }\n\n  function readToken(mode, stream, state, inner) {\n    for (var i = 0; i < 10; i++) {\n      if (inner) inner[0] = CodeMirror.innerMode(mode, state).mode;\n      var style = mode.token(stream, state);\n      if (stream.pos > stream.start) return style;\n    }\n    throw new Error(\"Mode \" + mode.name + \" failed to advance stream.\");\n  }\n\n  // Utility for getTokenAt and getLineTokens\n  function takeToken(cm, pos, precise, asArray) {\n    function getObj(copy) {\n      return {start: stream.start, end: stream.pos,\n              string: stream.current(),\n              type: style || null,\n              state: copy ? copyState(doc.mode, state) : state};\n    }\n\n    var doc = cm.doc, mode = doc.mode, style;\n    pos = clipPos(doc, pos);\n    var line = getLine(doc, pos.line), state = getStateBefore(cm, pos.line, precise);\n    var stream = new StringStream(line.text, cm.options.tabSize), tokens;\n    if (asArray) tokens = [];\n    while ((asArray || stream.pos < pos.ch) && !stream.eol()) {\n      stream.start = stream.pos;\n      style = readToken(mode, stream, state);\n      if (asArray) tokens.push(getObj(true));\n    }\n    return asArray ? tokens : getObj();\n  }\n\n  // Run the given mode's parser over a line, calling f for each token.\n  function runMode(cm, text, mode, state, f, lineClasses, forceToEnd) {\n    var flattenSpans = mode.flattenSpans;\n    if (flattenSpans == null) flattenSpans = cm.options.flattenSpans;\n    var curStart = 0, curStyle = null;\n    var stream = new StringStream(text, cm.options.tabSize), style;\n    var inner = cm.options.addModeClass && [null];\n    if (text == \"\") extractLineClasses(callBlankLine(mode, state), lineClasses);\n    while (!stream.eol()) {\n      if (stream.pos > cm.options.maxHighlightLength) {\n        flattenSpans = false;\n        if (forceToEnd) processLine(cm, text, state, stream.pos);\n        stream.pos = text.length;\n        style = null;\n      } else {\n        style = extractLineClasses(readToken(mode, stream, state, inner), lineClasses);\n      }\n      if (inner) {\n        var mName = inner[0].name;\n        if (mName) style = \"m-\" + (style ? mName + \" \" + style : mName);\n      }\n      if (!flattenSpans || curStyle != style) {\n        while (curStart < stream.start) {\n          curStart = Math.min(stream.start, curStart + 50000);\n          f(curStart, curStyle);\n        }\n        curStyle = style;\n      }\n      stream.start = stream.pos;\n    }\n    while (curStart < stream.pos) {\n      // Webkit seems to refuse to render text nodes longer than 57444 characters\n      var pos = Math.min(stream.pos, curStart + 50000);\n      f(pos, curStyle);\n      curStart = pos;\n    }\n  }\n\n  // Compute a style array (an array starting with a mode generation\n  // -- for invalidation -- followed by pairs of end positions and\n  // style strings), which is used to highlight the tokens on the\n  // line.\n  function highlightLine(cm, line, state, forceToEnd) {\n    // A styles array always starts with a number identifying the\n    // mode/overlays that it is based on (for easy invalidation).\n    var st = [cm.state.modeGen], lineClasses = {};\n    // Compute the base array of styles\n    runMode(cm, line.text, cm.doc.mode, state, function(end, style) {\n      st.push(end, style);\n    }, lineClasses, forceToEnd);\n\n    // Run overlays, adjust style array.\n    for (var o = 0; o < cm.state.overlays.length; ++o) {\n      var overlay = cm.state.overlays[o], i = 1, at = 0;\n      runMode(cm, line.text, overlay.mode, true, function(end, style) {\n        var start = i;\n        // Ensure there's a token end at the current position, and that i points at it\n        while (at < end) {\n          var i_end = st[i];\n          if (i_end > end)\n            st.splice(i, 1, end, st[i+1], i_end);\n          i += 2;\n          at = Math.min(end, i_end);\n        }\n        if (!style) return;\n        if (overlay.opaque) {\n          st.splice(start, i - start, end, \"cm-overlay \" + style);\n          i = start + 2;\n        } else {\n          for (; start < i; start += 2) {\n            var cur = st[start+1];\n            st[start+1] = (cur ? cur + \" \" : \"\") + \"cm-overlay \" + style;\n          }\n        }\n      }, lineClasses);\n    }\n\n    return {styles: st, classes: lineClasses.bgClass || lineClasses.textClass ? lineClasses : null};\n  }\n\n  function getLineStyles(cm, line, updateFrontier) {\n    if (!line.styles || line.styles[0] != cm.state.modeGen) {\n      var result = highlightLine(cm, line, line.stateAfter = getStateBefore(cm, lineNo(line)));\n      line.styles = result.styles;\n      if (result.classes) line.styleClasses = result.classes;\n      else if (line.styleClasses) line.styleClasses = null;\n      if (updateFrontier === cm.doc.frontier) cm.doc.frontier++;\n    }\n    return line.styles;\n  }\n\n  // Lightweight form of highlight -- proceed over this line and\n  // update state, but don't save a style array. Used for lines that\n  // aren't currently visible.\n  function processLine(cm, text, state, startAt) {\n    var mode = cm.doc.mode;\n    var stream = new StringStream(text, cm.options.tabSize);\n    stream.start = stream.pos = startAt || 0;\n    if (text == \"\") callBlankLine(mode, state);\n    while (!stream.eol() && stream.pos <= cm.options.maxHighlightLength) {\n      readToken(mode, stream, state);\n      stream.start = stream.pos;\n    }\n  }\n\n  // Convert a style as returned by a mode (either null, or a string\n  // containing one or more styles) to a CSS style. This is cached,\n  // and also looks for line-wide styles.\n  var styleToClassCache = {}, styleToClassCacheWithMode = {};\n  function interpretTokenStyle(style, options) {\n    if (!style || /^\\s*$/.test(style)) return null;\n    var cache = options.addModeClass ? styleToClassCacheWithMode : styleToClassCache;\n    return cache[style] ||\n      (cache[style] = style.replace(/\\S+/g, \"cm-$&\"));\n  }\n\n  // Render the DOM representation of the text of a line. Also builds\n  // up a 'line map', which points at the DOM nodes that represent\n  // specific stretches of text, and is used by the measuring code.\n  // The returned object contains the DOM node, this map, and\n  // information about line-wide styles that were set by the mode.\n  function buildLineContent(cm, lineView) {\n    // The padding-right forces the element to have a 'border', which\n    // is needed on Webkit to be able to get line-level bounding\n    // rectangles for it (in measureChar).\n    var content = elt(\"span\", null, null, webkit ? \"padding-right: .1px\" : null);\n    var builder = {pre: elt(\"pre\", [content]), content: content, col: 0, pos: 0, cm: cm};\n    lineView.measure = {};\n\n    // Iterate over the logical lines that make up this visual line.\n    for (var i = 0; i <= (lineView.rest ? lineView.rest.length : 0); i++) {\n      var line = i ? lineView.rest[i - 1] : lineView.line, order;\n      builder.pos = 0;\n      builder.addToken = buildToken;\n      // Optionally wire in some hacks into the token-rendering\n      // algorithm, to deal with browser quirks.\n      if ((ie || webkit) && cm.getOption(\"lineWrapping\"))\n        builder.addToken = buildTokenSplitSpaces(builder.addToken);\n      if (hasBadBidiRects(cm.display.measure) && (order = getOrder(line)))\n        builder.addToken = buildTokenBadBidi(builder.addToken, order);\n      builder.map = [];\n      var allowFrontierUpdate = lineView != cm.display.externalMeasured && lineNo(line);\n      insertLineContent(line, builder, getLineStyles(cm, line, allowFrontierUpdate));\n      if (line.styleClasses) {\n        if (line.styleClasses.bgClass)\n          builder.bgClass = joinClasses(line.styleClasses.bgClass, builder.bgClass || \"\");\n        if (line.styleClasses.textClass)\n          builder.textClass = joinClasses(line.styleClasses.textClass, builder.textClass || \"\");\n      }\n\n      // Ensure at least a single node is present, for measuring.\n      if (builder.map.length == 0)\n        builder.map.push(0, 0, builder.content.appendChild(zeroWidthElement(cm.display.measure)));\n\n      // Store the map and a cache object for the current logical line\n      if (i == 0) {\n        lineView.measure.map = builder.map;\n        lineView.measure.cache = {};\n      } else {\n        (lineView.measure.maps || (lineView.measure.maps = [])).push(builder.map);\n        (lineView.measure.caches || (lineView.measure.caches = [])).push({});\n      }\n    }\n\n    // See issue #2901\n    if (webkit && /\\bcm-tab\\b/.test(builder.content.lastChild.className))\n      builder.content.className = \"cm-tab-wrap-hack\";\n\n    signal(cm, \"renderLine\", cm, lineView.line, builder.pre);\n    if (builder.pre.className)\n      builder.textClass = joinClasses(builder.pre.className, builder.textClass || \"\");\n\n    return builder;\n  }\n\n  function defaultSpecialCharPlaceholder(ch) {\n    var token = elt(\"span\", \"\\u2022\", \"cm-invalidchar\");\n    token.title = \"\\\\u\" + ch.charCodeAt(0).toString(16);\n    token.setAttribute(\"aria-label\", token.title);\n    return token;\n  }\n\n  // Build up the DOM representation for a single token, and add it to\n  // the line map. Takes care to render special characters separately.\n  function buildToken(builder, text, style, startStyle, endStyle, title, css) {\n    if (!text) return;\n    var special = builder.cm.options.specialChars, mustWrap = false;\n    if (!special.test(text)) {\n      builder.col += text.length;\n      var content = document.createTextNode(text);\n      builder.map.push(builder.pos, builder.pos + text.length, content);\n      if (ie && ie_version < 9) mustWrap = true;\n      builder.pos += text.length;\n    } else {\n      var content = document.createDocumentFragment(), pos = 0;\n      while (true) {\n        special.lastIndex = pos;\n        var m = special.exec(text);\n        var skipped = m ? m.index - pos : text.length - pos;\n        if (skipped) {\n          var txt = document.createTextNode(text.slice(pos, pos + skipped));\n          if (ie && ie_version < 9) content.appendChild(elt(\"span\", [txt]));\n          else content.appendChild(txt);\n          builder.map.push(builder.pos, builder.pos + skipped, txt);\n          builder.col += skipped;\n          builder.pos += skipped;\n        }\n        if (!m) break;\n        pos += skipped + 1;\n        if (m[0] == \"\\t\") {\n          var tabSize = builder.cm.options.tabSize, tabWidth = tabSize - builder.col % tabSize;\n          var txt = content.appendChild(elt(\"span\", spaceStr(tabWidth), \"cm-tab\"));\n          txt.setAttribute(\"role\", \"presentation\");\n          txt.setAttribute(\"cm-text\", \"\\t\");\n          builder.col += tabWidth;\n        } else {\n          var txt = builder.cm.options.specialCharPlaceholder(m[0]);\n          txt.setAttribute(\"cm-text\", m[0]);\n          if (ie && ie_version < 9) content.appendChild(elt(\"span\", [txt]));\n          else content.appendChild(txt);\n          builder.col += 1;\n        }\n        builder.map.push(builder.pos, builder.pos + 1, txt);\n        builder.pos++;\n      }\n    }\n    if (style || startStyle || endStyle || mustWrap || css) {\n      var fullStyle = style || \"\";\n      if (startStyle) fullStyle += startStyle;\n      if (endStyle) fullStyle += endStyle;\n      var token = elt(\"span\", [content], fullStyle, css);\n      if (title) token.title = title;\n      return builder.content.appendChild(token);\n    }\n    builder.content.appendChild(content);\n  }\n\n  function buildTokenSplitSpaces(inner) {\n    function split(old) {\n      var out = \" \";\n      for (var i = 0; i < old.length - 2; ++i) out += i % 2 ? \" \" : \"\\u00a0\";\n      out += \" \";\n      return out;\n    }\n    return function(builder, text, style, startStyle, endStyle, title) {\n      inner(builder, text.replace(/ {3,}/g, split), style, startStyle, endStyle, title);\n    };\n  }\n\n  // Work around nonsense dimensions being reported for stretches of\n  // right-to-left text.\n  function buildTokenBadBidi(inner, order) {\n    return function(builder, text, style, startStyle, endStyle, title) {\n      style = style ? style + \" cm-force-border\" : \"cm-force-border\";\n      var start = builder.pos, end = start + text.length;\n      for (;;) {\n        // Find the part that overlaps with the start of this text\n        for (var i = 0; i < order.length; i++) {\n          var part = order[i];\n          if (part.to > start && part.from <= start) break;\n        }\n        if (part.to >= end) return inner(builder, text, style, startStyle, endStyle, title);\n        inner(builder, text.slice(0, part.to - start), style, startStyle, null, title);\n        startStyle = null;\n        text = text.slice(part.to - start);\n        start = part.to;\n      }\n    };\n  }\n\n  function buildCollapsedSpan(builder, size, marker, ignoreWidget) {\n    var widget = !ignoreWidget && marker.widgetNode;\n    if (widget) builder.map.push(builder.pos, builder.pos + size, widget);\n    if (!ignoreWidget && builder.cm.display.input.needsContentAttribute) {\n      if (!widget)\n        widget = builder.content.appendChild(document.createElement(\"span\"));\n      widget.setAttribute(\"cm-marker\", marker.id);\n    }\n    if (widget) {\n      builder.cm.display.input.setUneditable(widget);\n      builder.content.appendChild(widget);\n    }\n    builder.pos += size;\n  }\n\n  // Outputs a number of spans to make up a line, taking highlighting\n  // and marked text into account.\n  function insertLineContent(line, builder, styles) {\n    var spans = line.markedSpans, allText = line.text, at = 0;\n    if (!spans) {\n      for (var i = 1; i < styles.length; i+=2)\n        builder.addToken(builder, allText.slice(at, at = styles[i]), interpretTokenStyle(styles[i+1], builder.cm.options));\n      return;\n    }\n\n    var len = allText.length, pos = 0, i = 1, text = \"\", style, css;\n    var nextChange = 0, spanStyle, spanEndStyle, spanStartStyle, title, collapsed;\n    for (;;) {\n      if (nextChange == pos) { // Update current marker set\n        spanStyle = spanEndStyle = spanStartStyle = title = css = \"\";\n        collapsed = null; nextChange = Infinity;\n        var foundBookmarks = [];\n        for (var j = 0; j < spans.length; ++j) {\n          var sp = spans[j], m = sp.marker;\n          if (sp.from <= pos && (sp.to == null || sp.to > pos)) {\n            if (sp.to != null && nextChange > sp.to) { nextChange = sp.to; spanEndStyle = \"\"; }\n            if (m.className) spanStyle += \" \" + m.className;\n            if (m.css) css = m.css;\n            if (m.startStyle && sp.from == pos) spanStartStyle += \" \" + m.startStyle;\n            if (m.endStyle && sp.to == nextChange) spanEndStyle += \" \" + m.endStyle;\n            if (m.title && !title) title = m.title;\n            if (m.collapsed && (!collapsed || compareCollapsedMarkers(collapsed.marker, m) < 0))\n              collapsed = sp;\n          } else if (sp.from > pos && nextChange > sp.from) {\n            nextChange = sp.from;\n          }\n          if (m.type == \"bookmark\" && sp.from == pos && m.widgetNode) foundBookmarks.push(m);\n        }\n        if (collapsed && (collapsed.from || 0) == pos) {\n          buildCollapsedSpan(builder, (collapsed.to == null ? len + 1 : collapsed.to) - pos,\n                             collapsed.marker, collapsed.from == null);\n          if (collapsed.to == null) return;\n        }\n        if (!collapsed && foundBookmarks.length) for (var j = 0; j < foundBookmarks.length; ++j)\n          buildCollapsedSpan(builder, 0, foundBookmarks[j]);\n      }\n      if (pos >= len) break;\n\n      var upto = Math.min(len, nextChange);\n      while (true) {\n        if (text) {\n          var end = pos + text.length;\n          if (!collapsed) {\n            var tokenText = end > upto ? text.slice(0, upto - pos) : text;\n            builder.addToken(builder, tokenText, style ? style + spanStyle : spanStyle,\n                             spanStartStyle, pos + tokenText.length == nextChange ? spanEndStyle : \"\", title, css);\n          }\n          if (end >= upto) {text = text.slice(upto - pos); pos = upto; break;}\n          pos = end;\n          spanStartStyle = \"\";\n        }\n        text = allText.slice(at, at = styles[i++]);\n        style = interpretTokenStyle(styles[i++], builder.cm.options);\n      }\n    }\n  }\n\n  // DOCUMENT DATA STRUCTURE\n\n  // By default, updates that start and end at the beginning of a line\n  // are treated specially, in order to make the association of line\n  // widgets and marker elements with the text behave more intuitive.\n  function isWholeLineUpdate(doc, change) {\n    return change.from.ch == 0 && change.to.ch == 0 && lst(change.text) == \"\" &&\n      (!doc.cm || doc.cm.options.wholeLineUpdateBefore);\n  }\n\n  // Perform a change on the document data structure.\n  function updateDoc(doc, change, markedSpans, estimateHeight) {\n    function spansFor(n) {return markedSpans ? markedSpans[n] : null;}\n    function update(line, text, spans) {\n      updateLine(line, text, spans, estimateHeight);\n      signalLater(line, \"change\", line, change);\n    }\n    function linesFor(start, end) {\n      for (var i = start, result = []; i < end; ++i)\n        result.push(new Line(text[i], spansFor(i), estimateHeight));\n      return result;\n    }\n\n    var from = change.from, to = change.to, text = change.text;\n    var firstLine = getLine(doc, from.line), lastLine = getLine(doc, to.line);\n    var lastText = lst(text), lastSpans = spansFor(text.length - 1), nlines = to.line - from.line;\n\n    // Adjust the line structure\n    if (change.full) {\n      doc.insert(0, linesFor(0, text.length));\n      doc.remove(text.length, doc.size - text.length);\n    } else if (isWholeLineUpdate(doc, change)) {\n      // This is a whole-line replace. Treated specially to make\n      // sure line objects move the way they are supposed to.\n      var added = linesFor(0, text.length - 1);\n      update(lastLine, lastLine.text, lastSpans);\n      if (nlines) doc.remove(from.line, nlines);\n      if (added.length) doc.insert(from.line, added);\n    } else if (firstLine == lastLine) {\n      if (text.length == 1) {\n        update(firstLine, firstLine.text.slice(0, from.ch) + lastText + firstLine.text.slice(to.ch), lastSpans);\n      } else {\n        var added = linesFor(1, text.length - 1);\n        added.push(new Line(lastText + firstLine.text.slice(to.ch), lastSpans, estimateHeight));\n        update(firstLine, firstLine.text.slice(0, from.ch) + text[0], spansFor(0));\n        doc.insert(from.line + 1, added);\n      }\n    } else if (text.length == 1) {\n      update(firstLine, firstLine.text.slice(0, from.ch) + text[0] + lastLine.text.slice(to.ch), spansFor(0));\n      doc.remove(from.line + 1, nlines);\n    } else {\n      update(firstLine, firstLine.text.slice(0, from.ch) + text[0], spansFor(0));\n      update(lastLine, lastText + lastLine.text.slice(to.ch), lastSpans);\n      var added = linesFor(1, text.length - 1);\n      if (nlines > 1) doc.remove(from.line + 1, nlines - 1);\n      doc.insert(from.line + 1, added);\n    }\n\n    signalLater(doc, \"change\", doc, change);\n  }\n\n  // The document is represented as a BTree consisting of leaves, with\n  // chunk of lines in them, and branches, with up to ten leaves or\n  // other branch nodes below them. The top node is always a branch\n  // node, and is the document object itself (meaning it has\n  // additional methods and properties).\n  //\n  // All nodes have parent links. The tree is used both to go from\n  // line numbers to line objects, and to go from objects to numbers.\n  // It also indexes by height, and is used to convert between height\n  // and line object, and to find the total height of the document.\n  //\n  // See also http://marijnhaverbeke.nl/blog/codemirror-line-tree.html\n\n  function LeafChunk(lines) {\n    this.lines = lines;\n    this.parent = null;\n    for (var i = 0, height = 0; i < lines.length; ++i) {\n      lines[i].parent = this;\n      height += lines[i].height;\n    }\n    this.height = height;\n  }\n\n  LeafChunk.prototype = {\n    chunkSize: function() { return this.lines.length; },\n    // Remove the n lines at offset 'at'.\n    removeInner: function(at, n) {\n      for (var i = at, e = at + n; i < e; ++i) {\n        var line = this.lines[i];\n        this.height -= line.height;\n        cleanUpLine(line);\n        signalLater(line, \"delete\");\n      }\n      this.lines.splice(at, n);\n    },\n    // Helper used to collapse a small branch into a single leaf.\n    collapse: function(lines) {\n      lines.push.apply(lines, this.lines);\n    },\n    // Insert the given array of lines at offset 'at', count them as\n    // having the given height.\n    insertInner: function(at, lines, height) {\n      this.height += height;\n      this.lines = this.lines.slice(0, at).concat(lines).concat(this.lines.slice(at));\n      for (var i = 0; i < lines.length; ++i) lines[i].parent = this;\n    },\n    // Used to iterate over a part of the tree.\n    iterN: function(at, n, op) {\n      for (var e = at + n; at < e; ++at)\n        if (op(this.lines[at])) return true;\n    }\n  };\n\n  function BranchChunk(children) {\n    this.children = children;\n    var size = 0, height = 0;\n    for (var i = 0; i < children.length; ++i) {\n      var ch = children[i];\n      size += ch.chunkSize(); height += ch.height;\n      ch.parent = this;\n    }\n    this.size = size;\n    this.height = height;\n    this.parent = null;\n  }\n\n  BranchChunk.prototype = {\n    chunkSize: function() { return this.size; },\n    removeInner: function(at, n) {\n      this.size -= n;\n      for (var i = 0; i < this.children.length; ++i) {\n        var child = this.children[i], sz = child.chunkSize();\n        if (at < sz) {\n          var rm = Math.min(n, sz - at), oldHeight = child.height;\n          child.removeInner(at, rm);\n          this.height -= oldHeight - child.height;\n          if (sz == rm) { this.children.splice(i--, 1); child.parent = null; }\n          if ((n -= rm) == 0) break;\n          at = 0;\n        } else at -= sz;\n      }\n      // If the result is smaller than 25 lines, ensure that it is a\n      // single leaf node.\n      if (this.size - n < 25 &&\n          (this.children.length > 1 || !(this.children[0] instanceof LeafChunk))) {\n        var lines = [];\n        this.collapse(lines);\n        this.children = [new LeafChunk(lines)];\n        this.children[0].parent = this;\n      }\n    },\n    collapse: function(lines) {\n      for (var i = 0; i < this.children.length; ++i) this.children[i].collapse(lines);\n    },\n    insertInner: function(at, lines, height) {\n      this.size += lines.length;\n      this.height += height;\n      for (var i = 0; i < this.children.length; ++i) {\n        var child = this.children[i], sz = child.chunkSize();\n        if (at <= sz) {\n          child.insertInner(at, lines, height);\n          if (child.lines && child.lines.length > 50) {\n            while (child.lines.length > 50) {\n              var spilled = child.lines.splice(child.lines.length - 25, 25);\n              var newleaf = new LeafChunk(spilled);\n              child.height -= newleaf.height;\n              this.children.splice(i + 1, 0, newleaf);\n              newleaf.parent = this;\n            }\n            this.maybeSpill();\n          }\n          break;\n        }\n        at -= sz;\n      }\n    },\n    // When a node has grown, check whether it should be split.\n    maybeSpill: function() {\n      if (this.children.length <= 10) return;\n      var me = this;\n      do {\n        var spilled = me.children.splice(me.children.length - 5, 5);\n        var sibling = new BranchChunk(spilled);\n        if (!me.parent) { // Become the parent node\n          var copy = new BranchChunk(me.children);\n          copy.parent = me;\n          me.children = [copy, sibling];\n          me = copy;\n        } else {\n          me.size -= sibling.size;\n          me.height -= sibling.height;\n          var myIndex = indexOf(me.parent.children, me);\n          me.parent.children.splice(myIndex + 1, 0, sibling);\n        }\n        sibling.parent = me.parent;\n      } while (me.children.length > 10);\n      me.parent.maybeSpill();\n    },\n    iterN: function(at, n, op) {\n      for (var i = 0; i < this.children.length; ++i) {\n        var child = this.children[i], sz = child.chunkSize();\n        if (at < sz) {\n          var used = Math.min(n, sz - at);\n          if (child.iterN(at, used, op)) return true;\n          if ((n -= used) == 0) break;\n          at = 0;\n        } else at -= sz;\n      }\n    }\n  };\n\n  var nextDocId = 0;\n  var Doc = CodeMirror.Doc = function(text, mode, firstLine) {\n    if (!(this instanceof Doc)) return new Doc(text, mode, firstLine);\n    if (firstLine == null) firstLine = 0;\n\n    BranchChunk.call(this, [new LeafChunk([new Line(\"\", null)])]);\n    this.first = firstLine;\n    this.scrollTop = this.scrollLeft = 0;\n    this.cantEdit = false;\n    this.cleanGeneration = 1;\n    this.frontier = firstLine;\n    var start = Pos(firstLine, 0);\n    this.sel = simpleSelection(start);\n    this.history = new History(null);\n    this.id = ++nextDocId;\n    this.modeOption = mode;\n\n    if (typeof text == \"string\") text = splitLines(text);\n    updateDoc(this, {from: start, to: start, text: text});\n    setSelection(this, simpleSelection(start), sel_dontScroll);\n  };\n\n  Doc.prototype = createObj(BranchChunk.prototype, {\n    constructor: Doc,\n    // Iterate over the document. Supports two forms -- with only one\n    // argument, it calls that for each line in the document. With\n    // three, it iterates over the range given by the first two (with\n    // the second being non-inclusive).\n    iter: function(from, to, op) {\n      if (op) this.iterN(from - this.first, to - from, op);\n      else this.iterN(this.first, this.first + this.size, from);\n    },\n\n    // Non-public interface for adding and removing lines.\n    insert: function(at, lines) {\n      var height = 0;\n      for (var i = 0; i < lines.length; ++i) height += lines[i].height;\n      this.insertInner(at - this.first, lines, height);\n    },\n    remove: function(at, n) { this.removeInner(at - this.first, n); },\n\n    // From here, the methods are part of the public interface. Most\n    // are also available from CodeMirror (editor) instances.\n\n    getValue: function(lineSep) {\n      var lines = getLines(this, this.first, this.first + this.size);\n      if (lineSep === false) return lines;\n      return lines.join(lineSep || \"\\n\");\n    },\n    setValue: docMethodOp(function(code) {\n      var top = Pos(this.first, 0), last = this.first + this.size - 1;\n      makeChange(this, {from: top, to: Pos(last, getLine(this, last).text.length),\n                        text: splitLines(code), origin: \"setValue\", full: true}, true);\n      setSelection(this, simpleSelection(top));\n    }),\n    replaceRange: function(code, from, to, origin) {\n      from = clipPos(this, from);\n      to = to ? clipPos(this, to) : from;\n      replaceRange(this, code, from, to, origin);\n    },\n    getRange: function(from, to, lineSep) {\n      var lines = getBetween(this, clipPos(this, from), clipPos(this, to));\n      if (lineSep === false) return lines;\n      return lines.join(lineSep || \"\\n\");\n    },\n\n    getLine: function(line) {var l = this.getLineHandle(line); return l && l.text;},\n\n    getLineHandle: function(line) {if (isLine(this, line)) return getLine(this, line);},\n    getLineNumber: function(line) {return lineNo(line);},\n\n    getLineHandleVisualStart: function(line) {\n      if (typeof line == \"number\") line = getLine(this, line);\n      return visualLine(line);\n    },\n\n    lineCount: function() {return this.size;},\n    firstLine: function() {return this.first;},\n    lastLine: function() {return this.first + this.size - 1;},\n\n    clipPos: function(pos) {return clipPos(this, pos);},\n\n    getCursor: function(start) {\n      var range = this.sel.primary(), pos;\n      if (start == null || start == \"head\") pos = range.head;\n      else if (start == \"anchor\") pos = range.anchor;\n      else if (start == \"end\" || start == \"to\" || start === false) pos = range.to();\n      else pos = range.from();\n      return pos;\n    },\n    listSelections: function() { return this.sel.ranges; },\n    somethingSelected: function() {return this.sel.somethingSelected();},\n\n    setCursor: docMethodOp(function(line, ch, options) {\n      setSimpleSelection(this, clipPos(this, typeof line == \"number\" ? Pos(line, ch || 0) : line), null, options);\n    }),\n    setSelection: docMethodOp(function(anchor, head, options) {\n      setSimpleSelection(this, clipPos(this, anchor), clipPos(this, head || anchor), options);\n    }),\n    extendSelection: docMethodOp(function(head, other, options) {\n      extendSelection(this, clipPos(this, head), other && clipPos(this, other), options);\n    }),\n    extendSelections: docMethodOp(function(heads, options) {\n      extendSelections(this, clipPosArray(this, heads, options));\n    }),\n    extendSelectionsBy: docMethodOp(function(f, options) {\n      extendSelections(this, map(this.sel.ranges, f), options);\n    }),\n    setSelections: docMethodOp(function(ranges, primary, options) {\n      if (!ranges.length) return;\n      for (var i = 0, out = []; i < ranges.length; i++)\n        out[i] = new Range(clipPos(this, ranges[i].anchor),\n                           clipPos(this, ranges[i].head));\n      if (primary == null) primary = Math.min(ranges.length - 1, this.sel.primIndex);\n      setSelection(this, normalizeSelection(out, primary), options);\n    }),\n    addSelection: docMethodOp(function(anchor, head, options) {\n      var ranges = this.sel.ranges.slice(0);\n      ranges.push(new Range(clipPos(this, anchor), clipPos(this, head || anchor)));\n      setSelection(this, normalizeSelection(ranges, ranges.length - 1), options);\n    }),\n\n    getSelection: function(lineSep) {\n      var ranges = this.sel.ranges, lines;\n      for (var i = 0; i < ranges.length; i++) {\n        var sel = getBetween(this, ranges[i].from(), ranges[i].to());\n        lines = lines ? lines.concat(sel) : sel;\n      }\n      if (lineSep === false) return lines;\n      else return lines.join(lineSep || \"\\n\");\n    },\n    getSelections: function(lineSep) {\n      var parts = [], ranges = this.sel.ranges;\n      for (var i = 0; i < ranges.length; i++) {\n        var sel = getBetween(this, ranges[i].from(), ranges[i].to());\n        if (lineSep !== false) sel = sel.join(lineSep || \"\\n\");\n        parts[i] = sel;\n      }\n      return parts;\n    },\n    replaceSelection: function(code, collapse, origin) {\n      var dup = [];\n      for (var i = 0; i < this.sel.ranges.length; i++)\n        dup[i] = code;\n      this.replaceSelections(dup, collapse, origin || \"+input\");\n    },\n    replaceSelections: docMethodOp(function(code, collapse, origin) {\n      var changes = [], sel = this.sel;\n      for (var i = 0; i < sel.ranges.length; i++) {\n        var range = sel.ranges[i];\n        changes[i] = {from: range.from(), to: range.to(), text: splitLines(code[i]), origin: origin};\n      }\n      var newSel = collapse && collapse != \"end\" && computeReplacedSel(this, changes, collapse);\n      for (var i = changes.length - 1; i >= 0; i--)\n        makeChange(this, changes[i]);\n      if (newSel) setSelectionReplaceHistory(this, newSel);\n      else if (this.cm) ensureCursorVisible(this.cm);\n    }),\n    undo: docMethodOp(function() {makeChangeFromHistory(this, \"undo\");}),\n    redo: docMethodOp(function() {makeChangeFromHistory(this, \"redo\");}),\n    undoSelection: docMethodOp(function() {makeChangeFromHistory(this, \"undo\", true);}),\n    redoSelection: docMethodOp(function() {makeChangeFromHistory(this, \"redo\", true);}),\n\n    setExtending: function(val) {this.extend = val;},\n    getExtending: function() {return this.extend;},\n\n    historySize: function() {\n      var hist = this.history, done = 0, undone = 0;\n      for (var i = 0; i < hist.done.length; i++) if (!hist.done[i].ranges) ++done;\n      for (var i = 0; i < hist.undone.length; i++) if (!hist.undone[i].ranges) ++undone;\n      return {undo: done, redo: undone};\n    },\n    clearHistory: function() {this.history = new History(this.history.maxGeneration);},\n\n    markClean: function() {\n      this.cleanGeneration = this.changeGeneration(true);\n    },\n    changeGeneration: function(forceSplit) {\n      if (forceSplit)\n        this.history.lastOp = this.history.lastSelOp = this.history.lastOrigin = null;\n      return this.history.generation;\n    },\n    isClean: function (gen) {\n      return this.history.generation == (gen || this.cleanGeneration);\n    },\n\n    getHistory: function() {\n      return {done: copyHistoryArray(this.history.done),\n              undone: copyHistoryArray(this.history.undone)};\n    },\n    setHistory: function(histData) {\n      var hist = this.history = new History(this.history.maxGeneration);\n      hist.done = copyHistoryArray(histData.done.slice(0), null, true);\n      hist.undone = copyHistoryArray(histData.undone.slice(0), null, true);\n    },\n\n    addLineClass: docMethodOp(function(handle, where, cls) {\n      return changeLine(this, handle, where == \"gutter\" ? \"gutter\" : \"class\", function(line) {\n        var prop = where == \"text\" ? \"textClass\"\n                 : where == \"background\" ? \"bgClass\"\n                 : where == \"gutter\" ? \"gutterClass\" : \"wrapClass\";\n        if (!line[prop]) line[prop] = cls;\n        else if (classTest(cls).test(line[prop])) return false;\n        else line[prop] += \" \" + cls;\n        return true;\n      });\n    }),\n    removeLineClass: docMethodOp(function(handle, where, cls) {\n      return changeLine(this, handle, where == \"gutter\" ? \"gutter\" : \"class\", function(line) {\n        var prop = where == \"text\" ? \"textClass\"\n                 : where == \"background\" ? \"bgClass\"\n                 : where == \"gutter\" ? \"gutterClass\" : \"wrapClass\";\n        var cur = line[prop];\n        if (!cur) return false;\n        else if (cls == null) line[prop] = null;\n        else {\n          var found = cur.match(classTest(cls));\n          if (!found) return false;\n          var end = found.index + found[0].length;\n          line[prop] = cur.slice(0, found.index) + (!found.index || end == cur.length ? \"\" : \" \") + cur.slice(end) || null;\n        }\n        return true;\n      });\n    }),\n\n    markText: function(from, to, options) {\n      return markText(this, clipPos(this, from), clipPos(this, to), options, \"range\");\n    },\n    setBookmark: function(pos, options) {\n      var realOpts = {replacedWith: options && (options.nodeType == null ? options.widget : options),\n                      insertLeft: options && options.insertLeft,\n                      clearWhenEmpty: false, shared: options && options.shared};\n      pos = clipPos(this, pos);\n      return markText(this, pos, pos, realOpts, \"bookmark\");\n    },\n    findMarksAt: function(pos) {\n      pos = clipPos(this, pos);\n      var markers = [], spans = getLine(this, pos.line).markedSpans;\n      if (spans) for (var i = 0; i < spans.length; ++i) {\n        var span = spans[i];\n        if ((span.from == null || span.from <= pos.ch) &&\n            (span.to == null || span.to >= pos.ch))\n          markers.push(span.marker.parent || span.marker);\n      }\n      return markers;\n    },\n    findMarks: function(from, to, filter) {\n      from = clipPos(this, from); to = clipPos(this, to);\n      var found = [], lineNo = from.line;\n      this.iter(from.line, to.line + 1, function(line) {\n        var spans = line.markedSpans;\n        if (spans) for (var i = 0; i < spans.length; i++) {\n          var span = spans[i];\n          if (!(lineNo == from.line && from.ch > span.to ||\n                span.from == null && lineNo != from.line||\n                lineNo == to.line && span.from > to.ch) &&\n              (!filter || filter(span.marker)))\n            found.push(span.marker.parent || span.marker);\n        }\n        ++lineNo;\n      });\n      return found;\n    },\n    getAllMarks: function() {\n      var markers = [];\n      this.iter(function(line) {\n        var sps = line.markedSpans;\n        if (sps) for (var i = 0; i < sps.length; ++i)\n          if (sps[i].from != null) markers.push(sps[i].marker);\n      });\n      return markers;\n    },\n\n    posFromIndex: function(off) {\n      var ch, lineNo = this.first;\n      this.iter(function(line) {\n        var sz = line.text.length + 1;\n        if (sz > off) { ch = off; return true; }\n        off -= sz;\n        ++lineNo;\n      });\n      return clipPos(this, Pos(lineNo, ch));\n    },\n    indexFromPos: function (coords) {\n      coords = clipPos(this, coords);\n      var index = coords.ch;\n      if (coords.line < this.first || coords.ch < 0) return 0;\n      this.iter(this.first, coords.line, function (line) {\n        index += line.text.length + 1;\n      });\n      return index;\n    },\n\n    copy: function(copyHistory) {\n      var doc = new Doc(getLines(this, this.first, this.first + this.size), this.modeOption, this.first);\n      doc.scrollTop = this.scrollTop; doc.scrollLeft = this.scrollLeft;\n      doc.sel = this.sel;\n      doc.extend = false;\n      if (copyHistory) {\n        doc.history.undoDepth = this.history.undoDepth;\n        doc.setHistory(this.getHistory());\n      }\n      return doc;\n    },\n\n    linkedDoc: function(options) {\n      if (!options) options = {};\n      var from = this.first, to = this.first + this.size;\n      if (options.from != null && options.from > from) from = options.from;\n      if (options.to != null && options.to < to) to = options.to;\n      var copy = new Doc(getLines(this, from, to), options.mode || this.modeOption, from);\n      if (options.sharedHist) copy.history = this.history;\n      (this.linked || (this.linked = [])).push({doc: copy, sharedHist: options.sharedHist});\n      copy.linked = [{doc: this, isParent: true, sharedHist: options.sharedHist}];\n      copySharedMarkers(copy, findSharedMarkers(this));\n      return copy;\n    },\n    unlinkDoc: function(other) {\n      if (other instanceof CodeMirror) other = other.doc;\n      if (this.linked) for (var i = 0; i < this.linked.length; ++i) {\n        var link = this.linked[i];\n        if (link.doc != other) continue;\n        this.linked.splice(i, 1);\n        other.unlinkDoc(this);\n        detachSharedMarkers(findSharedMarkers(this));\n        break;\n      }\n      // If the histories were shared, split them again\n      if (other.history == this.history) {\n        var splitIds = [other.id];\n        linkedDocs(other, function(doc) {splitIds.push(doc.id);}, true);\n        other.history = new History(null);\n        other.history.done = copyHistoryArray(this.history.done, splitIds);\n        other.history.undone = copyHistoryArray(this.history.undone, splitIds);\n      }\n    },\n    iterLinkedDocs: function(f) {linkedDocs(this, f);},\n\n    getMode: function() {return this.mode;},\n    getEditor: function() {return this.cm;}\n  });\n\n  // Public alias.\n  Doc.prototype.eachLine = Doc.prototype.iter;\n\n  // Set up methods on CodeMirror's prototype to redirect to the editor's document.\n  var dontDelegate = \"iter insert remove copy getEditor\".split(\" \");\n  for (var prop in Doc.prototype) if (Doc.prototype.hasOwnProperty(prop) && indexOf(dontDelegate, prop) < 0)\n    CodeMirror.prototype[prop] = (function(method) {\n      return function() {return method.apply(this.doc, arguments);};\n    })(Doc.prototype[prop]);\n\n  eventMixin(Doc);\n\n  // Call f for all linked documents.\n  function linkedDocs(doc, f, sharedHistOnly) {\n    function propagate(doc, skip, sharedHist) {\n      if (doc.linked) for (var i = 0; i < doc.linked.length; ++i) {\n        var rel = doc.linked[i];\n        if (rel.doc == skip) continue;\n        var shared = sharedHist && rel.sharedHist;\n        if (sharedHistOnly && !shared) continue;\n        f(rel.doc, shared);\n        propagate(rel.doc, doc, shared);\n      }\n    }\n    propagate(doc, null, true);\n  }\n\n  // Attach a document to an editor.\n  function attachDoc(cm, doc) {\n    if (doc.cm) throw new Error(\"This document is already in use.\");\n    cm.doc = doc;\n    doc.cm = cm;\n    estimateLineHeights(cm);\n    loadMode(cm);\n    if (!cm.options.lineWrapping) findMaxLine(cm);\n    cm.options.mode = doc.modeOption;\n    regChange(cm);\n  }\n\n  // LINE UTILITIES\n\n  // Find the line object corresponding to the given line number.\n  function getLine(doc, n) {\n    n -= doc.first;\n    if (n < 0 || n >= doc.size) throw new Error(\"There is no line \" + (n + doc.first) + \" in the document.\");\n    for (var chunk = doc; !chunk.lines;) {\n      for (var i = 0;; ++i) {\n        var child = chunk.children[i], sz = child.chunkSize();\n        if (n < sz) { chunk = child; break; }\n        n -= sz;\n      }\n    }\n    return chunk.lines[n];\n  }\n\n  // Get the part of a document between two positions, as an array of\n  // strings.\n  function getBetween(doc, start, end) {\n    var out = [], n = start.line;\n    doc.iter(start.line, end.line + 1, function(line) {\n      var text = line.text;\n      if (n == end.line) text = text.slice(0, end.ch);\n      if (n == start.line) text = text.slice(start.ch);\n      out.push(text);\n      ++n;\n    });\n    return out;\n  }\n  // Get the lines between from and to, as array of strings.\n  function getLines(doc, from, to) {\n    var out = [];\n    doc.iter(from, to, function(line) { out.push(line.text); });\n    return out;\n  }\n\n  // Update the height of a line, propagating the height change\n  // upwards to parent nodes.\n  function updateLineHeight(line, height) {\n    var diff = height - line.height;\n    if (diff) for (var n = line; n; n = n.parent) n.height += diff;\n  }\n\n  // Given a line object, find its line number by walking up through\n  // its parent links.\n  function lineNo(line) {\n    if (line.parent == null) return null;\n    var cur = line.parent, no = indexOf(cur.lines, line);\n    for (var chunk = cur.parent; chunk; cur = chunk, chunk = chunk.parent) {\n      for (var i = 0;; ++i) {\n        if (chunk.children[i] == cur) break;\n        no += chunk.children[i].chunkSize();\n      }\n    }\n    return no + cur.first;\n  }\n\n  // Find the line at the given vertical position, using the height\n  // information in the document tree.\n  function lineAtHeight(chunk, h) {\n    var n = chunk.first;\n    outer: do {\n      for (var i = 0; i < chunk.children.length; ++i) {\n        var child = chunk.children[i], ch = child.height;\n        if (h < ch) { chunk = child; continue outer; }\n        h -= ch;\n        n += child.chunkSize();\n      }\n      return n;\n    } while (!chunk.lines);\n    for (var i = 0; i < chunk.lines.length; ++i) {\n      var line = chunk.lines[i], lh = line.height;\n      if (h < lh) break;\n      h -= lh;\n    }\n    return n + i;\n  }\n\n\n  // Find the height above the given line.\n  function heightAtLine(lineObj) {\n    lineObj = visualLine(lineObj);\n\n    var h = 0, chunk = lineObj.parent;\n    for (var i = 0; i < chunk.lines.length; ++i) {\n      var line = chunk.lines[i];\n      if (line == lineObj) break;\n      else h += line.height;\n    }\n    for (var p = chunk.parent; p; chunk = p, p = chunk.parent) {\n      for (var i = 0; i < p.children.length; ++i) {\n        var cur = p.children[i];\n        if (cur == chunk) break;\n        else h += cur.height;\n      }\n    }\n    return h;\n  }\n\n  // Get the bidi ordering for the given line (and cache it). Returns\n  // false for lines that are fully left-to-right, and an array of\n  // BidiSpan objects otherwise.\n  function getOrder(line) {\n    var order = line.order;\n    if (order == null) order = line.order = bidiOrdering(line.text);\n    return order;\n  }\n\n  // HISTORY\n\n  function History(startGen) {\n    // Arrays of change events and selections. Doing something adds an\n    // event to done and clears undo. Undoing moves events from done\n    // to undone, redoing moves them in the other direction.\n    this.done = []; this.undone = [];\n    this.undoDepth = Infinity;\n    // Used to track when changes can be merged into a single undo\n    // event\n    this.lastModTime = this.lastSelTime = 0;\n    this.lastOp = this.lastSelOp = null;\n    this.lastOrigin = this.lastSelOrigin = null;\n    // Used by the isClean() method\n    this.generation = this.maxGeneration = startGen || 1;\n  }\n\n  // Create a history change event from an updateDoc-style change\n  // object.\n  function historyChangeFromChange(doc, change) {\n    var histChange = {from: copyPos(change.from), to: changeEnd(change), text: getBetween(doc, change.from, change.to)};\n    attachLocalSpans(doc, histChange, change.from.line, change.to.line + 1);\n    linkedDocs(doc, function(doc) {attachLocalSpans(doc, histChange, change.from.line, change.to.line + 1);}, true);\n    return histChange;\n  }\n\n  // Pop all selection events off the end of a history array. Stop at\n  // a change event.\n  function clearSelectionEvents(array) {\n    while (array.length) {\n      var last = lst(array);\n      if (last.ranges) array.pop();\n      else break;\n    }\n  }\n\n  // Find the top change event in the history. Pop off selection\n  // events that are in the way.\n  function lastChangeEvent(hist, force) {\n    if (force) {\n      clearSelectionEvents(hist.done);\n      return lst(hist.done);\n    } else if (hist.done.length && !lst(hist.done).ranges) {\n      return lst(hist.done);\n    } else if (hist.done.length > 1 && !hist.done[hist.done.length - 2].ranges) {\n      hist.done.pop();\n      return lst(hist.done);\n    }\n  }\n\n  // Register a change in the history. Merges changes that are within\n  // a single operation, ore are close together with an origin that\n  // allows merging (starting with \"+\") into a single event.\n  function addChangeToHistory(doc, change, selAfter, opId) {\n    var hist = doc.history;\n    hist.undone.length = 0;\n    var time = +new Date, cur;\n\n    if ((hist.lastOp == opId ||\n         hist.lastOrigin == change.origin && change.origin &&\n         ((change.origin.charAt(0) == \"+\" && doc.cm && hist.lastModTime > time - doc.cm.options.historyEventDelay) ||\n          change.origin.charAt(0) == \"*\")) &&\n        (cur = lastChangeEvent(hist, hist.lastOp == opId))) {\n      // Merge this change into the last event\n      var last = lst(cur.changes);\n      if (cmp(change.from, change.to) == 0 && cmp(change.from, last.to) == 0) {\n        // Optimized case for simple insertion -- don't want to add\n        // new changesets for every character typed\n        last.to = changeEnd(change);\n      } else {\n        // Add new sub-event\n        cur.changes.push(historyChangeFromChange(doc, change));\n      }\n    } else {\n      // Can not be merged, start a new event.\n      var before = lst(hist.done);\n      if (!before || !before.ranges)\n        pushSelectionToHistory(doc.sel, hist.done);\n      cur = {changes: [historyChangeFromChange(doc, change)],\n             generation: hist.generation};\n      hist.done.push(cur);\n      while (hist.done.length > hist.undoDepth) {\n        hist.done.shift();\n        if (!hist.done[0].ranges) hist.done.shift();\n      }\n    }\n    hist.done.push(selAfter);\n    hist.generation = ++hist.maxGeneration;\n    hist.lastModTime = hist.lastSelTime = time;\n    hist.lastOp = hist.lastSelOp = opId;\n    hist.lastOrigin = hist.lastSelOrigin = change.origin;\n\n    if (!last) signal(doc, \"historyAdded\");\n  }\n\n  function selectionEventCanBeMerged(doc, origin, prev, sel) {\n    var ch = origin.charAt(0);\n    return ch == \"*\" ||\n      ch == \"+\" &&\n      prev.ranges.length == sel.ranges.length &&\n      prev.somethingSelected() == sel.somethingSelected() &&\n      new Date - doc.history.lastSelTime <= (doc.cm ? doc.cm.options.historyEventDelay : 500);\n  }\n\n  // Called whenever the selection changes, sets the new selection as\n  // the pending selection in the history, and pushes the old pending\n  // selection into the 'done' array when it was significantly\n  // different (in number of selected ranges, emptiness, or time).\n  function addSelectionToHistory(doc, sel, opId, options) {\n    var hist = doc.history, origin = options && options.origin;\n\n    // A new event is started when the previous origin does not match\n    // the current, or the origins don't allow matching. Origins\n    // starting with * are always merged, those starting with + are\n    // merged when similar and close together in time.\n    if (opId == hist.lastSelOp ||\n        (origin && hist.lastSelOrigin == origin &&\n         (hist.lastModTime == hist.lastSelTime && hist.lastOrigin == origin ||\n          selectionEventCanBeMerged(doc, origin, lst(hist.done), sel))))\n      hist.done[hist.done.length - 1] = sel;\n    else\n      pushSelectionToHistory(sel, hist.done);\n\n    hist.lastSelTime = +new Date;\n    hist.lastSelOrigin = origin;\n    hist.lastSelOp = opId;\n    if (options && options.clearRedo !== false)\n      clearSelectionEvents(hist.undone);\n  }\n\n  function pushSelectionToHistory(sel, dest) {\n    var top = lst(dest);\n    if (!(top && top.ranges && top.equals(sel)))\n      dest.push(sel);\n  }\n\n  // Used to store marked span information in the history.\n  function attachLocalSpans(doc, change, from, to) {\n    var existing = change[\"spans_\" + doc.id], n = 0;\n    doc.iter(Math.max(doc.first, from), Math.min(doc.first + doc.size, to), function(line) {\n      if (line.markedSpans)\n        (existing || (existing = change[\"spans_\" + doc.id] = {}))[n] = line.markedSpans;\n      ++n;\n    });\n  }\n\n  // When un/re-doing restores text containing marked spans, those\n  // that have been explicitly cleared should not be restored.\n  function removeClearedSpans(spans) {\n    if (!spans) return null;\n    for (var i = 0, out; i < spans.length; ++i) {\n      if (spans[i].marker.explicitlyCleared) { if (!out) out = spans.slice(0, i); }\n      else if (out) out.push(spans[i]);\n    }\n    return !out ? spans : out.length ? out : null;\n  }\n\n  // Retrieve and filter the old marked spans stored in a change event.\n  function getOldSpans(doc, change) {\n    var found = change[\"spans_\" + doc.id];\n    if (!found) return null;\n    for (var i = 0, nw = []; i < change.text.length; ++i)\n      nw.push(removeClearedSpans(found[i]));\n    return nw;\n  }\n\n  // Used both to provide a JSON-safe object in .getHistory, and, when\n  // detaching a document, to split the history in two\n  function copyHistoryArray(events, newGroup, instantiateSel) {\n    for (var i = 0, copy = []; i < events.length; ++i) {\n      var event = events[i];\n      if (event.ranges) {\n        copy.push(instantiateSel ? Selection.prototype.deepCopy.call(event) : event);\n        continue;\n      }\n      var changes = event.changes, newChanges = [];\n      copy.push({changes: newChanges});\n      for (var j = 0; j < changes.length; ++j) {\n        var change = changes[j], m;\n        newChanges.push({from: change.from, to: change.to, text: change.text});\n        if (newGroup) for (var prop in change) if (m = prop.match(/^spans_(\\d+)$/)) {\n          if (indexOf(newGroup, Number(m[1])) > -1) {\n            lst(newChanges)[prop] = change[prop];\n            delete change[prop];\n          }\n        }\n      }\n    }\n    return copy;\n  }\n\n  // Rebasing/resetting history to deal with externally-sourced changes\n\n  function rebaseHistSelSingle(pos, from, to, diff) {\n    if (to < pos.line) {\n      pos.line += diff;\n    } else if (from < pos.line) {\n      pos.line = from;\n      pos.ch = 0;\n    }\n  }\n\n  // Tries to rebase an array of history events given a change in the\n  // document. If the change touches the same lines as the event, the\n  // event, and everything 'behind' it, is discarded. If the change is\n  // before the event, the event's positions are updated. Uses a\n  // copy-on-write scheme for the positions, to avoid having to\n  // reallocate them all on every rebase, but also avoid problems with\n  // shared position objects being unsafely updated.\n  function rebaseHistArray(array, from, to, diff) {\n    for (var i = 0; i < array.length; ++i) {\n      var sub = array[i], ok = true;\n      if (sub.ranges) {\n        if (!sub.copied) { sub = array[i] = sub.deepCopy(); sub.copied = true; }\n        for (var j = 0; j < sub.ranges.length; j++) {\n          rebaseHistSelSingle(sub.ranges[j].anchor, from, to, diff);\n          rebaseHistSelSingle(sub.ranges[j].head, from, to, diff);\n        }\n        continue;\n      }\n      for (var j = 0; j < sub.changes.length; ++j) {\n        var cur = sub.changes[j];\n        if (to < cur.from.line) {\n          cur.from = Pos(cur.from.line + diff, cur.from.ch);\n          cur.to = Pos(cur.to.line + diff, cur.to.ch);\n        } else if (from <= cur.to.line) {\n          ok = false;\n          break;\n        }\n      }\n      if (!ok) {\n        array.splice(0, i + 1);\n        i = 0;\n      }\n    }\n  }\n\n  function rebaseHist(hist, change) {\n    var from = change.from.line, to = change.to.line, diff = change.text.length - (to - from) - 1;\n    rebaseHistArray(hist.done, from, to, diff);\n    rebaseHistArray(hist.undone, from, to, diff);\n  }\n\n  // EVENT UTILITIES\n\n  // Due to the fact that we still support jurassic IE versions, some\n  // compatibility wrappers are needed.\n\n  var e_preventDefault = CodeMirror.e_preventDefault = function(e) {\n    if (e.preventDefault) e.preventDefault();\n    else e.returnValue = false;\n  };\n  var e_stopPropagation = CodeMirror.e_stopPropagation = function(e) {\n    if (e.stopPropagation) e.stopPropagation();\n    else e.cancelBubble = true;\n  };\n  function e_defaultPrevented(e) {\n    return e.defaultPrevented != null ? e.defaultPrevented : e.returnValue == false;\n  }\n  var e_stop = CodeMirror.e_stop = function(e) {e_preventDefault(e); e_stopPropagation(e);};\n\n  function e_target(e) {return e.target || e.srcElement;}\n  function e_button(e) {\n    var b = e.which;\n    if (b == null) {\n      if (e.button & 1) b = 1;\n      else if (e.button & 2) b = 3;\n      else if (e.button & 4) b = 2;\n    }\n    if (mac && e.ctrlKey && b == 1) b = 3;\n    return b;\n  }\n\n  // EVENT HANDLING\n\n  // Lightweight event framework. on/off also work on DOM nodes,\n  // registering native DOM handlers.\n\n  var on = CodeMirror.on = function(emitter, type, f) {\n    if (emitter.addEventListener)\n      emitter.addEventListener(type, f, false);\n    else if (emitter.attachEvent)\n      emitter.attachEvent(\"on\" + type, f);\n    else {\n      var map = emitter._handlers || (emitter._handlers = {});\n      var arr = map[type] || (map[type] = []);\n      arr.push(f);\n    }\n  };\n\n  var off = CodeMirror.off = function(emitter, type, f) {\n    if (emitter.removeEventListener)\n      emitter.removeEventListener(type, f, false);\n    else if (emitter.detachEvent)\n      emitter.detachEvent(\"on\" + type, f);\n    else {\n      var arr = emitter._handlers && emitter._handlers[type];\n      if (!arr) return;\n      for (var i = 0; i < arr.length; ++i)\n        if (arr[i] == f) { arr.splice(i, 1); break; }\n    }\n  };\n\n  var signal = CodeMirror.signal = function(emitter, type /*, values...*/) {\n    var arr = emitter._handlers && emitter._handlers[type];\n    if (!arr) return;\n    var args = Array.prototype.slice.call(arguments, 2);\n    for (var i = 0; i < arr.length; ++i) arr[i].apply(null, args);\n  };\n\n  var orphanDelayedCallbacks = null;\n\n  // Often, we want to signal events at a point where we are in the\n  // middle of some work, but don't want the handler to start calling\n  // other methods on the editor, which might be in an inconsistent\n  // state or simply not expect any other events to happen.\n  // signalLater looks whether there are any handlers, and schedules\n  // them to be executed when the last operation ends, or, if no\n  // operation is active, when a timeout fires.\n  function signalLater(emitter, type /*, values...*/) {\n    var arr = emitter._handlers && emitter._handlers[type];\n    if (!arr) return;\n    var args = Array.prototype.slice.call(arguments, 2), list;\n    if (operationGroup) {\n      list = operationGroup.delayedCallbacks;\n    } else if (orphanDelayedCallbacks) {\n      list = orphanDelayedCallbacks;\n    } else {\n      list = orphanDelayedCallbacks = [];\n      setTimeout(fireOrphanDelayed, 0);\n    }\n    function bnd(f) {return function(){f.apply(null, args);};};\n    for (var i = 0; i < arr.length; ++i)\n      list.push(bnd(arr[i]));\n  }\n\n  function fireOrphanDelayed() {\n    var delayed = orphanDelayedCallbacks;\n    orphanDelayedCallbacks = null;\n    for (var i = 0; i < delayed.length; ++i) delayed[i]();\n  }\n\n  // The DOM events that CodeMirror handles can be overridden by\n  // registering a (non-DOM) handler on the editor for the event name,\n  // and preventDefault-ing the event in that handler.\n  function signalDOMEvent(cm, e, override) {\n    if (typeof e == \"string\")\n      e = {type: e, preventDefault: function() { this.defaultPrevented = true; }};\n    signal(cm, override || e.type, cm, e);\n    return e_defaultPrevented(e) || e.codemirrorIgnore;\n  }\n\n  function signalCursorActivity(cm) {\n    var arr = cm._handlers && cm._handlers.cursorActivity;\n    if (!arr) return;\n    var set = cm.curOp.cursorActivityHandlers || (cm.curOp.cursorActivityHandlers = []);\n    for (var i = 0; i < arr.length; ++i) if (indexOf(set, arr[i]) == -1)\n      set.push(arr[i]);\n  }\n\n  function hasHandler(emitter, type) {\n    var arr = emitter._handlers && emitter._handlers[type];\n    return arr && arr.length > 0;\n  }\n\n  // Add on and off methods to a constructor's prototype, to make\n  // registering events on such objects more convenient.\n  function eventMixin(ctor) {\n    ctor.prototype.on = function(type, f) {on(this, type, f);};\n    ctor.prototype.off = function(type, f) {off(this, type, f);};\n  }\n\n  // MISC UTILITIES\n\n  // Number of pixels added to scroller and sizer to hide scrollbar\n  var scrollerGap = 30;\n\n  // Returned or thrown by various protocols to signal 'I'm not\n  // handling this'.\n  var Pass = CodeMirror.Pass = {toString: function(){return \"CodeMirror.Pass\";}};\n\n  // Reused option objects for setSelection & friends\n  var sel_dontScroll = {scroll: false}, sel_mouse = {origin: \"*mouse\"}, sel_move = {origin: \"+move\"};\n\n  function Delayed() {this.id = null;}\n  Delayed.prototype.set = function(ms, f) {\n    clearTimeout(this.id);\n    this.id = setTimeout(f, ms);\n  };\n\n  // Counts the column offset in a string, taking tabs into account.\n  // Used mostly to find indentation.\n  var countColumn = CodeMirror.countColumn = function(string, end, tabSize, startIndex, startValue) {\n    if (end == null) {\n      end = string.search(/[^\\s\\u00a0]/);\n      if (end == -1) end = string.length;\n    }\n    for (var i = startIndex || 0, n = startValue || 0;;) {\n      var nextTab = string.indexOf(\"\\t\", i);\n      if (nextTab < 0 || nextTab >= end)\n        return n + (end - i);\n      n += nextTab - i;\n      n += tabSize - (n % tabSize);\n      i = nextTab + 1;\n    }\n  };\n\n  // The inverse of countColumn -- find the offset that corresponds to\n  // a particular column.\n  function findColumn(string, goal, tabSize) {\n    for (var pos = 0, col = 0;;) {\n      var nextTab = string.indexOf(\"\\t\", pos);\n      if (nextTab == -1) nextTab = string.length;\n      var skipped = nextTab - pos;\n      if (nextTab == string.length || col + skipped >= goal)\n        return pos + Math.min(skipped, goal - col);\n      col += nextTab - pos;\n      col += tabSize - (col % tabSize);\n      pos = nextTab + 1;\n      if (col >= goal) return pos;\n    }\n  }\n\n  var spaceStrs = [\"\"];\n  function spaceStr(n) {\n    while (spaceStrs.length <= n)\n      spaceStrs.push(lst(spaceStrs) + \" \");\n    return spaceStrs[n];\n  }\n\n  function lst(arr) { return arr[arr.length-1]; }\n\n  var selectInput = function(node) { node.select(); };\n  if (ios) // Mobile Safari apparently has a bug where select() is broken.\n    selectInput = function(node) { node.selectionStart = 0; node.selectionEnd = node.value.length; };\n  else if (ie) // Suppress mysterious IE10 errors\n    selectInput = function(node) { try { node.select(); } catch(_e) {} };\n\n  function indexOf(array, elt) {\n    for (var i = 0; i < array.length; ++i)\n      if (array[i] == elt) return i;\n    return -1;\n  }\n  function map(array, f) {\n    var out = [];\n    for (var i = 0; i < array.length; i++) out[i] = f(array[i], i);\n    return out;\n  }\n\n  function nothing() {}\n\n  function createObj(base, props) {\n    var inst;\n    if (Object.create) {\n      inst = Object.create(base);\n    } else {\n      nothing.prototype = base;\n      inst = new nothing();\n    }\n    if (props) copyObj(props, inst);\n    return inst;\n  };\n\n  function copyObj(obj, target, overwrite) {\n    if (!target) target = {};\n    for (var prop in obj)\n      if (obj.hasOwnProperty(prop) && (overwrite !== false || !target.hasOwnProperty(prop)))\n        target[prop] = obj[prop];\n    return target;\n  }\n\n  function bind(f) {\n    var args = Array.prototype.slice.call(arguments, 1);\n    return function(){return f.apply(null, args);};\n  }\n\n  var nonASCIISingleCaseWordChar = /[\\u00df\\u0590-\\u05f4\\u0600-\\u06ff\\u3040-\\u309f\\u30a0-\\u30ff\\u3400-\\u4db5\\u4e00-\\u9fcc\\uac00-\\ud7af]/;\n  var isWordCharBasic = CodeMirror.isWordChar = function(ch) {\n    return /\\w/.test(ch) || ch > \"\\x80\" &&\n      (ch.toUpperCase() != ch.toLowerCase() || nonASCIISingleCaseWordChar.test(ch));\n  };\n  function isWordChar(ch, helper) {\n    if (!helper) return isWordCharBasic(ch);\n    if (helper.source.indexOf(\"\\\\w\") > -1 && isWordCharBasic(ch)) return true;\n    return helper.test(ch);\n  }\n\n  function isEmpty(obj) {\n    for (var n in obj) if (obj.hasOwnProperty(n) && obj[n]) return false;\n    return true;\n  }\n\n  // Extending unicode characters. A series of a non-extending char +\n  // any number of extending chars is treated as a single unit as far\n  // as editing and measuring is concerned. This is not fully correct,\n  // since some scripts/fonts/browsers also treat other configurations\n  // of code points as a group.\n  var extendingChars = /[\\u0300-\\u036f\\u0483-\\u0489\\u0591-\\u05bd\\u05bf\\u05c1\\u05c2\\u05c4\\u05c5\\u05c7\\u0610-\\u061a\\u064b-\\u065e\\u0670\\u06d6-\\u06dc\\u06de-\\u06e4\\u06e7\\u06e8\\u06ea-\\u06ed\\u0711\\u0730-\\u074a\\u07a6-\\u07b0\\u07eb-\\u07f3\\u0816-\\u0819\\u081b-\\u0823\\u0825-\\u0827\\u0829-\\u082d\\u0900-\\u0902\\u093c\\u0941-\\u0948\\u094d\\u0951-\\u0955\\u0962\\u0963\\u0981\\u09bc\\u09be\\u09c1-\\u09c4\\u09cd\\u09d7\\u09e2\\u09e3\\u0a01\\u0a02\\u0a3c\\u0a41\\u0a42\\u0a47\\u0a48\\u0a4b-\\u0a4d\\u0a51\\u0a70\\u0a71\\u0a75\\u0a81\\u0a82\\u0abc\\u0ac1-\\u0ac5\\u0ac7\\u0ac8\\u0acd\\u0ae2\\u0ae3\\u0b01\\u0b3c\\u0b3e\\u0b3f\\u0b41-\\u0b44\\u0b4d\\u0b56\\u0b57\\u0b62\\u0b63\\u0b82\\u0bbe\\u0bc0\\u0bcd\\u0bd7\\u0c3e-\\u0c40\\u0c46-\\u0c48\\u0c4a-\\u0c4d\\u0c55\\u0c56\\u0c62\\u0c63\\u0cbc\\u0cbf\\u0cc2\\u0cc6\\u0ccc\\u0ccd\\u0cd5\\u0cd6\\u0ce2\\u0ce3\\u0d3e\\u0d41-\\u0d44\\u0d4d\\u0d57\\u0d62\\u0d63\\u0dca\\u0dcf\\u0dd2-\\u0dd4\\u0dd6\\u0ddf\\u0e31\\u0e34-\\u0e3a\\u0e47-\\u0e4e\\u0eb1\\u0eb4-\\u0eb9\\u0ebb\\u0ebc\\u0ec8-\\u0ecd\\u0f18\\u0f19\\u0f35\\u0f37\\u0f39\\u0f71-\\u0f7e\\u0f80-\\u0f84\\u0f86\\u0f87\\u0f90-\\u0f97\\u0f99-\\u0fbc\\u0fc6\\u102d-\\u1030\\u1032-\\u1037\\u1039\\u103a\\u103d\\u103e\\u1058\\u1059\\u105e-\\u1060\\u1071-\\u1074\\u1082\\u1085\\u1086\\u108d\\u109d\\u135f\\u1712-\\u1714\\u1732-\\u1734\\u1752\\u1753\\u1772\\u1773\\u17b7-\\u17bd\\u17c6\\u17c9-\\u17d3\\u17dd\\u180b-\\u180d\\u18a9\\u1920-\\u1922\\u1927\\u1928\\u1932\\u1939-\\u193b\\u1a17\\u1a18\\u1a56\\u1a58-\\u1a5e\\u1a60\\u1a62\\u1a65-\\u1a6c\\u1a73-\\u1a7c\\u1a7f\\u1b00-\\u1b03\\u1b34\\u1b36-\\u1b3a\\u1b3c\\u1b42\\u1b6b-\\u1b73\\u1b80\\u1b81\\u1ba2-\\u1ba5\\u1ba8\\u1ba9\\u1c2c-\\u1c33\\u1c36\\u1c37\\u1cd0-\\u1cd2\\u1cd4-\\u1ce0\\u1ce2-\\u1ce8\\u1ced\\u1dc0-\\u1de6\\u1dfd-\\u1dff\\u200c\\u200d\\u20d0-\\u20f0\\u2cef-\\u2cf1\\u2de0-\\u2dff\\u302a-\\u302f\\u3099\\u309a\\ua66f-\\ua672\\ua67c\\ua67d\\ua6f0\\ua6f1\\ua802\\ua806\\ua80b\\ua825\\ua826\\ua8c4\\ua8e0-\\ua8f1\\ua926-\\ua92d\\ua947-\\ua951\\ua980-\\ua982\\ua9b3\\ua9b6-\\ua9b9\\ua9bc\\uaa29-\\uaa2e\\uaa31\\uaa32\\uaa35\\uaa36\\uaa43\\uaa4c\\uaab0\\uaab2-\\uaab4\\uaab7\\uaab8\\uaabe\\uaabf\\uaac1\\uabe5\\uabe8\\uabed\\udc00-\\udfff\\ufb1e\\ufe00-\\ufe0f\\ufe20-\\ufe26\\uff9e\\uff9f]/;\n  function isExtendingChar(ch) { return ch.charCodeAt(0) >= 768 && extendingChars.test(ch); }\n\n  // DOM UTILITIES\n\n  function elt(tag, content, className, style) {\n    var e = document.createElement(tag);\n    if (className) e.className = className;\n    if (style) e.style.cssText = style;\n    if (typeof content == \"string\") e.appendChild(document.createTextNode(content));\n    else if (content) for (var i = 0; i < content.length; ++i) e.appendChild(content[i]);\n    return e;\n  }\n\n  var range;\n  if (document.createRange) range = function(node, start, end, endNode) {\n    var r = document.createRange();\n    r.setEnd(endNode || node, end);\n    r.setStart(node, start);\n    return r;\n  };\n  else range = function(node, start, end) {\n    var r = document.body.createTextRange();\n    try { r.moveToElementText(node.parentNode); }\n    catch(e) { return r; }\n    r.collapse(true);\n    r.moveEnd(\"character\", end);\n    r.moveStart(\"character\", start);\n    return r;\n  };\n\n  function removeChildren(e) {\n    for (var count = e.childNodes.length; count > 0; --count)\n      e.removeChild(e.firstChild);\n    return e;\n  }\n\n  function removeChildrenAndAdd(parent, e) {\n    return removeChildren(parent).appendChild(e);\n  }\n\n  var contains = CodeMirror.contains = function(parent, child) {\n    if (child.nodeType == 3) // Android browser always returns false when child is a textnode\n      child = child.parentNode;\n    if (parent.contains)\n      return parent.contains(child);\n    do {\n      if (child.nodeType == 11) child = child.host;\n      if (child == parent) return true;\n    } while (child = child.parentNode);\n  };\n\n  function activeElt() { return document.activeElement; }\n  // Older versions of IE throws unspecified error when touching\n  // document.activeElement in some cases (during loading, in iframe)\n  if (ie && ie_version < 11) activeElt = function() {\n    try { return document.activeElement; }\n    catch(e) { return document.body; }\n  };\n\n  function classTest(cls) { return new RegExp(\"(^|\\\\s)\" + cls + \"(?:$|\\\\s)\\\\s*\"); }\n  var rmClass = CodeMirror.rmClass = function(node, cls) {\n    var current = node.className;\n    var match = classTest(cls).exec(current);\n    if (match) {\n      var after = current.slice(match.index + match[0].length);\n      node.className = current.slice(0, match.index) + (after ? match[1] + after : \"\");\n    }\n  };\n  var addClass = CodeMirror.addClass = function(node, cls) {\n    var current = node.className;\n    if (!classTest(cls).test(current)) node.className += (current ? \" \" : \"\") + cls;\n  };\n  function joinClasses(a, b) {\n    var as = a.split(\" \");\n    for (var i = 0; i < as.length; i++)\n      if (as[i] && !classTest(as[i]).test(b)) b += \" \" + as[i];\n    return b;\n  }\n\n  // WINDOW-WIDE EVENTS\n\n  // These must be handled carefully, because naively registering a\n  // handler for each editor will cause the editors to never be\n  // garbage collected.\n\n  function forEachCodeMirror(f) {\n    if (!document.body.getElementsByClassName) return;\n    var byClass = document.body.getElementsByClassName(\"CodeMirror\");\n    for (var i = 0; i < byClass.length; i++) {\n      var cm = byClass[i].CodeMirror;\n      if (cm) f(cm);\n    }\n  }\n\n  var globalsRegistered = false;\n  function ensureGlobalHandlers() {\n    if (globalsRegistered) return;\n    registerGlobalHandlers();\n    globalsRegistered = true;\n  }\n  function registerGlobalHandlers() {\n    // When the window resizes, we need to refresh active editors.\n    var resizeTimer;\n    on(window, \"resize\", function() {\n      if (resizeTimer == null) resizeTimer = setTimeout(function() {\n        resizeTimer = null;\n        forEachCodeMirror(onResize);\n      }, 100);\n    });\n    // When the window loses focus, we want to show the editor as blurred\n    on(window, \"blur\", function() {\n      forEachCodeMirror(onBlur);\n    });\n  }\n\n  // FEATURE DETECTION\n\n  // Detect drag-and-drop\n  var dragAndDrop = function() {\n    // There is *some* kind of drag-and-drop support in IE6-8, but I\n    // couldn't get it to work yet.\n    if (ie && ie_version < 9) return false;\n    var div = elt('div');\n    return \"draggable\" in div || \"dragDrop\" in div;\n  }();\n\n  var zwspSupported;\n  function zeroWidthElement(measure) {\n    if (zwspSupported == null) {\n      var test = elt(\"span\", \"\\u200b\");\n      removeChildrenAndAdd(measure, elt(\"span\", [test, document.createTextNode(\"x\")]));\n      if (measure.firstChild.offsetHeight != 0)\n        zwspSupported = test.offsetWidth <= 1 && test.offsetHeight > 2 && !(ie && ie_version < 8);\n    }\n    var node = zwspSupported ? elt(\"span\", \"\\u200b\") :\n      elt(\"span\", \"\\u00a0\", null, \"display: inline-block; width: 1px; margin-right: -1px\");\n    node.setAttribute(\"cm-text\", \"\");\n    return node;\n  }\n\n  // Feature-detect IE's crummy client rect reporting for bidi text\n  var badBidiRects;\n  function hasBadBidiRects(measure) {\n    if (badBidiRects != null) return badBidiRects;\n    var txt = removeChildrenAndAdd(measure, document.createTextNode(\"A\\u062eA\"));\n    var r0 = range(txt, 0, 1).getBoundingClientRect();\n    if (!r0 || r0.left == r0.right) return false; // Safari returns null in some cases (#2780)\n    var r1 = range(txt, 1, 2).getBoundingClientRect();\n    return badBidiRects = (r1.right - r0.right < 3);\n  }\n\n  // See if \"\".split is the broken IE version, if so, provide an\n  // alternative way to split lines.\n  var splitLines = CodeMirror.splitLines = \"\\n\\nb\".split(/\\n/).length != 3 ? function(string) {\n    var pos = 0, result = [], l = string.length;\n    while (pos <= l) {\n      var nl = string.indexOf(\"\\n\", pos);\n      if (nl == -1) nl = string.length;\n      var line = string.slice(pos, string.charAt(nl - 1) == \"\\r\" ? nl - 1 : nl);\n      var rt = line.indexOf(\"\\r\");\n      if (rt != -1) {\n        result.push(line.slice(0, rt));\n        pos += rt + 1;\n      } else {\n        result.push(line);\n        pos = nl + 1;\n      }\n    }\n    return result;\n  } : function(string){return string.split(/\\r\\n?|\\n/);};\n\n  var hasSelection = window.getSelection ? function(te) {\n    try { return te.selectionStart != te.selectionEnd; }\n    catch(e) { return false; }\n  } : function(te) {\n    try {var range = te.ownerDocument.selection.createRange();}\n    catch(e) {}\n    if (!range || range.parentElement() != te) return false;\n    return range.compareEndPoints(\"StartToEnd\", range) != 0;\n  };\n\n  var hasCopyEvent = (function() {\n    var e = elt(\"div\");\n    if (\"oncopy\" in e) return true;\n    e.setAttribute(\"oncopy\", \"return;\");\n    return typeof e.oncopy == \"function\";\n  })();\n\n  var badZoomedRects = null;\n  function hasBadZoomedRects(measure) {\n    if (badZoomedRects != null) return badZoomedRects;\n    var node = removeChildrenAndAdd(measure, elt(\"span\", \"x\"));\n    var normal = node.getBoundingClientRect();\n    var fromRange = range(node, 0, 1).getBoundingClientRect();\n    return badZoomedRects = Math.abs(normal.left - fromRange.left) > 1;\n  }\n\n  // KEY NAMES\n\n  var keyNames = {3: \"Enter\", 8: \"Backspace\", 9: \"Tab\", 13: \"Enter\", 16: \"Shift\", 17: \"Ctrl\", 18: \"Alt\",\n                  19: \"Pause\", 20: \"CapsLock\", 27: \"Esc\", 32: \"Space\", 33: \"PageUp\", 34: \"PageDown\", 35: \"End\",\n                  36: \"Home\", 37: \"Left\", 38: \"Up\", 39: \"Right\", 40: \"Down\", 44: \"PrintScrn\", 45: \"Insert\",\n                  46: \"Delete\", 59: \";\", 61: \"=\", 91: \"Mod\", 92: \"Mod\", 93: \"Mod\", 107: \"=\", 109: \"-\", 127: \"Delete\",\n                  173: \"-\", 186: \";\", 187: \"=\", 188: \",\", 189: \"-\", 190: \".\", 191: \"/\", 192: \"`\", 219: \"[\", 220: \"\\\\\",\n                  221: \"]\", 222: \"'\", 63232: \"Up\", 63233: \"Down\", 63234: \"Left\", 63235: \"Right\", 63272: \"Delete\",\n                  63273: \"Home\", 63275: \"End\", 63276: \"PageUp\", 63277: \"PageDown\", 63302: \"Insert\"};\n  CodeMirror.keyNames = keyNames;\n  (function() {\n    // Number keys\n    for (var i = 0; i < 10; i++) keyNames[i + 48] = keyNames[i + 96] = String(i);\n    // Alphabetic keys\n    for (var i = 65; i <= 90; i++) keyNames[i] = String.fromCharCode(i);\n    // Function keys\n    for (var i = 1; i <= 12; i++) keyNames[i + 111] = keyNames[i + 63235] = \"F\" + i;\n  })();\n\n  // BIDI HELPERS\n\n  function iterateBidiSections(order, from, to, f) {\n    if (!order) return f(from, to, \"ltr\");\n    var found = false;\n    for (var i = 0; i < order.length; ++i) {\n      var part = order[i];\n      if (part.from < to && part.to > from || from == to && part.to == from) {\n        f(Math.max(part.from, from), Math.min(part.to, to), part.level == 1 ? \"rtl\" : \"ltr\");\n        found = true;\n      }\n    }\n    if (!found) f(from, to, \"ltr\");\n  }\n\n  function bidiLeft(part) { return part.level % 2 ? part.to : part.from; }\n  function bidiRight(part) { return part.level % 2 ? part.from : part.to; }\n\n  function lineLeft(line) { var order = getOrder(line); return order ? bidiLeft(order[0]) : 0; }\n  function lineRight(line) {\n    var order = getOrder(line);\n    if (!order) return line.text.length;\n    return bidiRight(lst(order));\n  }\n\n  function lineStart(cm, lineN) {\n    var line = getLine(cm.doc, lineN);\n    var visual = visualLine(line);\n    if (visual != line) lineN = lineNo(visual);\n    var order = getOrder(visual);\n    var ch = !order ? 0 : order[0].level % 2 ? lineRight(visual) : lineLeft(visual);\n    return Pos(lineN, ch);\n  }\n  function lineEnd(cm, lineN) {\n    var merged, line = getLine(cm.doc, lineN);\n    while (merged = collapsedSpanAtEnd(line)) {\n      line = merged.find(1, true).line;\n      lineN = null;\n    }\n    var order = getOrder(line);\n    var ch = !order ? line.text.length : order[0].level % 2 ? lineLeft(line) : lineRight(line);\n    return Pos(lineN == null ? lineNo(line) : lineN, ch);\n  }\n  function lineStartSmart(cm, pos) {\n    var start = lineStart(cm, pos.line);\n    var line = getLine(cm.doc, start.line);\n    var order = getOrder(line);\n    if (!order || order[0].level == 0) {\n      var firstNonWS = Math.max(0, line.text.search(/\\S/));\n      var inWS = pos.line == start.line && pos.ch <= firstNonWS && pos.ch;\n      return Pos(start.line, inWS ? 0 : firstNonWS);\n    }\n    return start;\n  }\n\n  function compareBidiLevel(order, a, b) {\n    var linedir = order[0].level;\n    if (a == linedir) return true;\n    if (b == linedir) return false;\n    return a < b;\n  }\n  var bidiOther;\n  function getBidiPartAt(order, pos) {\n    bidiOther = null;\n    for (var i = 0, found; i < order.length; ++i) {\n      var cur = order[i];\n      if (cur.from < pos && cur.to > pos) return i;\n      if ((cur.from == pos || cur.to == pos)) {\n        if (found == null) {\n          found = i;\n        } else if (compareBidiLevel(order, cur.level, order[found].level)) {\n          if (cur.from != cur.to) bidiOther = found;\n          return i;\n        } else {\n          if (cur.from != cur.to) bidiOther = i;\n          return found;\n        }\n      }\n    }\n    return found;\n  }\n\n  function moveInLine(line, pos, dir, byUnit) {\n    if (!byUnit) return pos + dir;\n    do pos += dir;\n    while (pos > 0 && isExtendingChar(line.text.charAt(pos)));\n    return pos;\n  }\n\n  // This is needed in order to move 'visually' through bi-directional\n  // text -- i.e., pressing left should make the cursor go left, even\n  // when in RTL text. The tricky part is the 'jumps', where RTL and\n  // LTR text touch each other. This often requires the cursor offset\n  // to move more than one unit, in order to visually move one unit.\n  function moveVisually(line, start, dir, byUnit) {\n    var bidi = getOrder(line);\n    if (!bidi) return moveLogically(line, start, dir, byUnit);\n    var pos = getBidiPartAt(bidi, start), part = bidi[pos];\n    var target = moveInLine(line, start, part.level % 2 ? -dir : dir, byUnit);\n\n    for (;;) {\n      if (target > part.from && target < part.to) return target;\n      if (target == part.from || target == part.to) {\n        if (getBidiPartAt(bidi, target) == pos) return target;\n        part = bidi[pos += dir];\n        return (dir > 0) == part.level % 2 ? part.to : part.from;\n      } else {\n        part = bidi[pos += dir];\n        if (!part) return null;\n        if ((dir > 0) == part.level % 2)\n          target = moveInLine(line, part.to, -1, byUnit);\n        else\n          target = moveInLine(line, part.from, 1, byUnit);\n      }\n    }\n  }\n\n  function moveLogically(line, start, dir, byUnit) {\n    var target = start + dir;\n    if (byUnit) while (target > 0 && isExtendingChar(line.text.charAt(target))) target += dir;\n    return target < 0 || target > line.text.length ? null : target;\n  }\n\n  // Bidirectional ordering algorithm\n  // See http://unicode.org/reports/tr9/tr9-13.html for the algorithm\n  // that this (partially) implements.\n\n  // One-char codes used for character types:\n  // L (L):   Left-to-Right\n  // R (R):   Right-to-Left\n  // r (AL):  Right-to-Left Arabic\n  // 1 (EN):  European Number\n  // + (ES):  European Number Separator\n  // % (ET):  European Number Terminator\n  // n (AN):  Arabic Number\n  // , (CS):  Common Number Separator\n  // m (NSM): Non-Spacing Mark\n  // b (BN):  Boundary Neutral\n  // s (B):   Paragraph Separator\n  // t (S):   Segment Separator\n  // w (WS):  Whitespace\n  // N (ON):  Other Neutrals\n\n  // Returns null if characters are ordered as they appear\n  // (left-to-right), or an array of sections ({from, to, level}\n  // objects) in the order in which they occur visually.\n  var bidiOrdering = (function() {\n    // Character types for codepoints 0 to 0xff\n    var lowTypes = \"bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN\";\n    // Character types for codepoints 0x600 to 0x6ff\n    var arabicTypes = \"rrrrrrrrrrrr,rNNmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmrrrrrrrnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmNmmmm\";\n    function charType(code) {\n      if (code <= 0xf7) return lowTypes.charAt(code);\n      else if (0x590 <= code && code <= 0x5f4) return \"R\";\n      else if (0x600 <= code && code <= 0x6ed) return arabicTypes.charAt(code - 0x600);\n      else if (0x6ee <= code && code <= 0x8ac) return \"r\";\n      else if (0x2000 <= code && code <= 0x200b) return \"w\";\n      else if (code == 0x200c) return \"b\";\n      else return \"L\";\n    }\n\n    var bidiRE = /[\\u0590-\\u05f4\\u0600-\\u06ff\\u0700-\\u08ac]/;\n    var isNeutral = /[stwN]/, isStrong = /[LRr]/, countsAsLeft = /[Lb1n]/, countsAsNum = /[1n]/;\n    // Browsers seem to always treat the boundaries of block elements as being L.\n    var outerType = \"L\";\n\n    function BidiSpan(level, from, to) {\n      this.level = level;\n      this.from = from; this.to = to;\n    }\n\n    return function(str) {\n      if (!bidiRE.test(str)) return false;\n      var len = str.length, types = [];\n      for (var i = 0, type; i < len; ++i)\n        types.push(type = charType(str.charCodeAt(i)));\n\n      // W1. Examine each non-spacing mark (NSM) in the level run, and\n      // change the type of the NSM to the type of the previous\n      // character. If the NSM is at the start of the level run, it will\n      // get the type of sor.\n      for (var i = 0, prev = outerType; i < len; ++i) {\n        var type = types[i];\n        if (type == \"m\") types[i] = prev;\n        else prev = type;\n      }\n\n      // W2. Search backwards from each instance of a European number\n      // until the first strong type (R, L, AL, or sor) is found. If an\n      // AL is found, change the type of the European number to Arabic\n      // number.\n      // W3. Change all ALs to R.\n      for (var i = 0, cur = outerType; i < len; ++i) {\n        var type = types[i];\n        if (type == \"1\" && cur == \"r\") types[i] = \"n\";\n        else if (isStrong.test(type)) { cur = type; if (type == \"r\") types[i] = \"R\"; }\n      }\n\n      // W4. A single European separator between two European numbers\n      // changes to a European number. A single common separator between\n      // two numbers of the same type changes to that type.\n      for (var i = 1, prev = types[0]; i < len - 1; ++i) {\n        var type = types[i];\n        if (type == \"+\" && prev == \"1\" && types[i+1] == \"1\") types[i] = \"1\";\n        else if (type == \",\" && prev == types[i+1] &&\n                 (prev == \"1\" || prev == \"n\")) types[i] = prev;\n        prev = type;\n      }\n\n      // W5. A sequence of European terminators adjacent to European\n      // numbers changes to all European numbers.\n      // W6. Otherwise, separators and terminators change to Other\n      // Neutral.\n      for (var i = 0; i < len; ++i) {\n        var type = types[i];\n        if (type == \",\") types[i] = \"N\";\n        else if (type == \"%\") {\n          for (var end = i + 1; end < len && types[end] == \"%\"; ++end) {}\n          var replace = (i && types[i-1] == \"!\") || (end < len && types[end] == \"1\") ? \"1\" : \"N\";\n          for (var j = i; j < end; ++j) types[j] = replace;\n          i = end - 1;\n        }\n      }\n\n      // W7. Search backwards from each instance of a European number\n      // until the first strong type (R, L, or sor) is found. If an L is\n      // found, then change the type of the European number to L.\n      for (var i = 0, cur = outerType; i < len; ++i) {\n        var type = types[i];\n        if (cur == \"L\" && type == \"1\") types[i] = \"L\";\n        else if (isStrong.test(type)) cur = type;\n      }\n\n      // N1. A sequence of neutrals takes the direction of the\n      // surrounding strong text if the text on both sides has the same\n      // direction. European and Arabic numbers act as if they were R in\n      // terms of their influence on neutrals. Start-of-level-run (sor)\n      // and end-of-level-run (eor) are used at level run boundaries.\n      // N2. Any remaining neutrals take the embedding direction.\n      for (var i = 0; i < len; ++i) {\n        if (isNeutral.test(types[i])) {\n          for (var end = i + 1; end < len && isNeutral.test(types[end]); ++end) {}\n          var before = (i ? types[i-1] : outerType) == \"L\";\n          var after = (end < len ? types[end] : outerType) == \"L\";\n          var replace = before || after ? \"L\" : \"R\";\n          for (var j = i; j < end; ++j) types[j] = replace;\n          i = end - 1;\n        }\n      }\n\n      // Here we depart from the documented algorithm, in order to avoid\n      // building up an actual levels array. Since there are only three\n      // levels (0, 1, 2) in an implementation that doesn't take\n      // explicit embedding into account, we can build up the order on\n      // the fly, without following the level-based algorithm.\n      var order = [], m;\n      for (var i = 0; i < len;) {\n        if (countsAsLeft.test(types[i])) {\n          var start = i;\n          for (++i; i < len && countsAsLeft.test(types[i]); ++i) {}\n          order.push(new BidiSpan(0, start, i));\n        } else {\n          var pos = i, at = order.length;\n          for (++i; i < len && types[i] != \"L\"; ++i) {}\n          for (var j = pos; j < i;) {\n            if (countsAsNum.test(types[j])) {\n              if (pos < j) order.splice(at, 0, new BidiSpan(1, pos, j));\n              var nstart = j;\n              for (++j; j < i && countsAsNum.test(types[j]); ++j) {}\n              order.splice(at, 0, new BidiSpan(2, nstart, j));\n              pos = j;\n            } else ++j;\n          }\n          if (pos < i) order.splice(at, 0, new BidiSpan(1, pos, i));\n        }\n      }\n      if (order[0].level == 1 && (m = str.match(/^\\s+/))) {\n        order[0].from = m[0].length;\n        order.unshift(new BidiSpan(0, 0, m[0].length));\n      }\n      if (lst(order).level == 1 && (m = str.match(/\\s+$/))) {\n        lst(order).to -= m[0].length;\n        order.push(new BidiSpan(0, len - m[0].length, len));\n      }\n      if (order[0].level != lst(order).level)\n        order.push(new BidiSpan(order[0].level, len, len));\n\n      return order;\n    };\n  })();\n\n  // THE END\n\n  CodeMirror.version = \"5.0.0\";\n\n  return CodeMirror;\n});\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/apl/apl.js",
    "content": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n(function(mod) {\n  if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n    mod(require(\"../../lib/codemirror\"));\n  else if (typeof define == \"function\" && define.amd) // AMD\n    define([\"../../lib/codemirror\"], mod);\n  else // Plain browser env\n    mod(CodeMirror);\n})(function(CodeMirror) {\n\"use strict\";\n\nCodeMirror.defineMode(\"apl\", function() {\n  var builtInOps = {\n    \".\": \"innerProduct\",\n    \"\\\\\": \"scan\",\n    \"/\": \"reduce\",\n    \"⌿\": \"reduce1Axis\",\n    \"⍀\": \"scan1Axis\",\n    \"¨\": \"each\",\n    \"⍣\": \"power\"\n  };\n  var builtInFuncs = {\n    \"+\": [\"conjugate\", \"add\"],\n    \"−\": [\"negate\", \"subtract\"],\n    \"×\": [\"signOf\", \"multiply\"],\n    \"÷\": [\"reciprocal\", \"divide\"],\n    \"⌈\": [\"ceiling\", \"greaterOf\"],\n    \"⌊\": [\"floor\", \"lesserOf\"],\n    \"∣\": [\"absolute\", \"residue\"],\n    \"⍳\": [\"indexGenerate\", \"indexOf\"],\n    \"?\": [\"roll\", \"deal\"],\n    \"⋆\": [\"exponentiate\", \"toThePowerOf\"],\n    \"⍟\": [\"naturalLog\", \"logToTheBase\"],\n    \"○\": [\"piTimes\", \"circularFuncs\"],\n    \"!\": [\"factorial\", \"binomial\"],\n    \"⌹\": [\"matrixInverse\", \"matrixDivide\"],\n    \"<\": [null, \"lessThan\"],\n    \"≤\": [null, \"lessThanOrEqual\"],\n    \"=\": [null, \"equals\"],\n    \">\": [null, \"greaterThan\"],\n    \"≥\": [null, \"greaterThanOrEqual\"],\n    \"≠\": [null, \"notEqual\"],\n    \"≡\": [\"depth\", \"match\"],\n    \"≢\": [null, \"notMatch\"],\n    \"∈\": [\"enlist\", \"membership\"],\n    \"⍷\": [null, \"find\"],\n    \"∪\": [\"unique\", \"union\"],\n    \"∩\": [null, \"intersection\"],\n    \"∼\": [\"not\", \"without\"],\n    \"∨\": [null, \"or\"],\n    \"∧\": [null, \"and\"],\n    \"⍱\": [null, \"nor\"],\n    \"⍲\": [null, \"nand\"],\n    \"⍴\": [\"shapeOf\", \"reshape\"],\n    \",\": [\"ravel\", \"catenate\"],\n    \"⍪\": [null, \"firstAxisCatenate\"],\n    \"⌽\": [\"reverse\", \"rotate\"],\n    \"⊖\": [\"axis1Reverse\", \"axis1Rotate\"],\n    \"⍉\": [\"transpose\", null],\n    \"↑\": [\"first\", \"take\"],\n    \"↓\": [null, \"drop\"],\n    \"⊂\": [\"enclose\", \"partitionWithAxis\"],\n    \"⊃\": [\"diclose\", \"pick\"],\n    \"⌷\": [null, \"index\"],\n    \"⍋\": [\"gradeUp\", null],\n    \"⍒\": [\"gradeDown\", null],\n    \"⊤\": [\"encode\", null],\n    \"⊥\": [\"decode\", null],\n    \"⍕\": [\"format\", \"formatByExample\"],\n    \"⍎\": [\"execute\", null],\n    \"⊣\": [\"stop\", \"left\"],\n    \"⊢\": [\"pass\", \"right\"]\n  };\n\n  var isOperator = /[\\.\\/⌿⍀¨⍣]/;\n  var isNiladic = /⍬/;\n  var isFunction = /[\\+−×÷⌈⌊∣⍳\\?⋆⍟○!⌹<≤=>≥≠≡≢∈⍷∪∩∼∨∧⍱⍲⍴,⍪⌽⊖⍉↑↓⊂⊃⌷⍋⍒⊤⊥⍕⍎⊣⊢]/;\n  var isArrow = /←/;\n  var isComment = /[⍝#].*$/;\n\n  var stringEater = function(type) {\n    var prev;\n    prev = false;\n    return function(c) {\n      prev = c;\n      if (c === type) {\n        return prev === \"\\\\\";\n      }\n      return true;\n    };\n  };\n  return {\n    startState: function() {\n      return {\n        prev: false,\n        func: false,\n        op: false,\n        string: false,\n        escape: false\n      };\n    },\n    token: function(stream, state) {\n      var ch, funcName, word;\n      if (stream.eatSpace()) {\n        return null;\n      }\n      ch = stream.next();\n      if (ch === '\"' || ch === \"'\") {\n        stream.eatWhile(stringEater(ch));\n        stream.next();\n        state.prev = true;\n        return \"string\";\n      }\n      if (/[\\[{\\(]/.test(ch)) {\n        state.prev = false;\n        return null;\n      }\n      if (/[\\]}\\)]/.test(ch)) {\n        state.prev = true;\n        return null;\n      }\n      if (isNiladic.test(ch)) {\n        state.prev = false;\n        return \"niladic\";\n      }\n      if (/[¯\\d]/.test(ch)) {\n        if (state.func) {\n          state.func = false;\n          state.prev = false;\n        } else {\n          state.prev = true;\n        }\n        stream.eatWhile(/[\\w\\.]/);\n        return \"number\";\n      }\n      if (isOperator.test(ch)) {\n        return \"operator apl-\" + builtInOps[ch];\n      }\n      if (isArrow.test(ch)) {\n        return \"apl-arrow\";\n      }\n      if (isFunction.test(ch)) {\n        funcName = \"apl-\";\n        if (builtInFuncs[ch] != null) {\n          if (state.prev) {\n            funcName += builtInFuncs[ch][1];\n          } else {\n            funcName += builtInFuncs[ch][0];\n          }\n        }\n        state.func = true;\n        state.prev = false;\n        return \"function \" + funcName;\n      }\n      if (isComment.test(ch)) {\n        stream.skipToEnd();\n        return \"comment\";\n      }\n      if (ch === \"∘\" && stream.peek() === \".\") {\n        stream.next();\n        return \"function jot-dot\";\n      }\n      stream.eatWhile(/[\\w\\$_]/);\n      word = stream.current();\n      state.prev = true;\n      return \"keyword\";\n    }\n  };\n});\n\nCodeMirror.defineMIME(\"text/apl\", \"apl\");\n\n});\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/apl/index.html",
    "content": "<!doctype html>\n\n<title>CodeMirror: APL mode</title>\n<meta charset=\"utf-8\"/>\n<link rel=stylesheet href=\"../../doc/docs.css\">\n\n<link rel=\"stylesheet\" href=\"../../lib/codemirror.css\">\n<script src=\"../../lib/codemirror.js\"></script>\n<script src=\"../../addon/edit/matchbrackets.js\"></script>\n<script src=\"./apl.js\"></script>\n<style>\n\t.CodeMirror { border: 2px inset #dee; }\n    </style>\n<div id=nav>\n  <a href=\"http://codemirror.net\"><h1>CodeMirror</h1><img id=logo src=\"../../doc/logo.png\"></a>\n\n  <ul>\n    <li><a href=\"../../index.html\">Home</a>\n    <li><a href=\"../../doc/manual.html\">Manual</a>\n    <li><a href=\"https://github.com/codemirror/codemirror\">Code</a>\n  </ul>\n  <ul>\n    <li><a href=\"../index.html\">Language modes</a>\n    <li><a class=active href=\"#\">APL</a>\n  </ul>\n</div>\n\n<article>\n<h2>APL mode</h2>\n<form><textarea id=\"code\" name=\"code\">\n⍝ Conway's game of life\n\n⍝ This example was inspired by the impressive demo at\n⍝ http://www.youtube.com/watch?v=a9xAKttWgP4\n\n⍝ Create a matrix:\n⍝     0 1 1\n⍝     1 1 0\n⍝     0 1 0\ncreature ← (3 3 ⍴ ⍳ 9) ∈ 1 2 3 4 7   ⍝ Original creature from demo\ncreature ← (3 3 ⍴ ⍳ 9) ∈ 1 3 6 7 8   ⍝ Glider\n\n⍝ Place the creature on a larger board, near the centre\nboard ← ¯1 ⊖ ¯2 ⌽ 5 7 ↑ creature\n\n⍝ A function to move from one generation to the next\nlife ← {∨/ 1 ⍵ ∧ 3 4 = ⊂+/ +⌿ 1 0 ¯1 ∘.⊖ 1 0 ¯1 ⌽¨ ⊂⍵}\n\n⍝ Compute n-th generation and format it as a\n⍝ character matrix\ngen ← {' #'[(life ⍣ ⍵) board]}\n\n⍝ Show first three generations\n(gen 1) (gen 2) (gen 3)\n</textarea></form>\n\n    <script>\n      var editor = CodeMirror.fromTextArea(document.getElementById(\"code\"), {\n        lineNumbers: true,\n        matchBrackets: true,\n        mode: \"text/apl\"\n      });\n    </script>\n\n    <p>Simple mode that tries to handle APL as well as it can.</p>\n    <p>It attempts to label functions/operators based upon\n    monadic/dyadic usage (but this is far from fully fleshed out).\n    This means there are meaningful classnames so hover states can\n    have popups etc.</p>\n\n    <p><strong>MIME types defined:</strong> <code>text/apl</code> (APL code)</p>\n  </article>\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/asterisk/asterisk.js",
    "content": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n/*\n * =====================================================================================\n *\n *       Filename:  mode/asterisk/asterisk.js\n *\n *    Description:  CodeMirror mode for Asterisk dialplan\n *\n *        Created:  05/17/2012 09:20:25 PM\n *       Revision:  none\n *\n *         Author:  Stas Kobzar (stas@modulis.ca),\n *        Company:  Modulis.ca Inc.\n *\n * =====================================================================================\n */\n\n(function(mod) {\n  if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n    mod(require(\"../../lib/codemirror\"));\n  else if (typeof define == \"function\" && define.amd) // AMD\n    define([\"../../lib/codemirror\"], mod);\n  else // Plain browser env\n    mod(CodeMirror);\n})(function(CodeMirror) {\n\"use strict\";\n\nCodeMirror.defineMode(\"asterisk\", function() {\n  var atoms    = [\"exten\", \"same\", \"include\",\"ignorepat\",\"switch\"],\n      dpcmd    = [\"#include\",\"#exec\"],\n      apps     = [\n                  \"addqueuemember\",\"adsiprog\",\"aelsub\",\"agentlogin\",\"agentmonitoroutgoing\",\"agi\",\n                  \"alarmreceiver\",\"amd\",\"answer\",\"authenticate\",\"background\",\"backgrounddetect\",\n                  \"bridge\",\"busy\",\"callcompletioncancel\",\"callcompletionrequest\",\"celgenuserevent\",\n                  \"changemonitor\",\"chanisavail\",\"channelredirect\",\"chanspy\",\"clearhash\",\"confbridge\",\n                  \"congestion\",\"continuewhile\",\"controlplayback\",\"dahdiacceptr2call\",\"dahdibarge\",\n                  \"dahdiras\",\"dahdiscan\",\"dahdisendcallreroutingfacility\",\"dahdisendkeypadfacility\",\n                  \"datetime\",\"dbdel\",\"dbdeltree\",\"deadagi\",\"dial\",\"dictate\",\"directory\",\"disa\",\n                  \"dumpchan\",\"eagi\",\"echo\",\"endwhile\",\"exec\",\"execif\",\"execiftime\",\"exitwhile\",\"extenspy\",\n                  \"externalivr\",\"festival\",\"flash\",\"followme\",\"forkcdr\",\"getcpeid\",\"gosub\",\"gosubif\",\n                  \"goto\",\"gotoif\",\"gotoiftime\",\"hangup\",\"iax2provision\",\"ices\",\"importvar\",\"incomplete\",\n                  \"ivrdemo\",\"jabberjoin\",\"jabberleave\",\"jabbersend\",\"jabbersendgroup\",\"jabberstatus\",\n                  \"jack\",\"log\",\"macro\",\"macroexclusive\",\"macroexit\",\"macroif\",\"mailboxexists\",\"meetme\",\n                  \"meetmeadmin\",\"meetmechanneladmin\",\"meetmecount\",\"milliwatt\",\"minivmaccmess\",\"minivmdelete\",\n                  \"minivmgreet\",\"minivmmwi\",\"minivmnotify\",\"minivmrecord\",\"mixmonitor\",\"monitor\",\"morsecode\",\n                  \"mp3player\",\"mset\",\"musiconhold\",\"nbscat\",\"nocdr\",\"noop\",\"odbc\",\"odbc\",\"odbcfinish\",\n                  \"originate\",\"ospauth\",\"ospfinish\",\"osplookup\",\"ospnext\",\"page\",\"park\",\"parkandannounce\",\n                  \"parkedcall\",\"pausemonitor\",\"pausequeuemember\",\"pickup\",\"pickupchan\",\"playback\",\"playtones\",\n                  \"privacymanager\",\"proceeding\",\"progress\",\"queue\",\"queuelog\",\"raiseexception\",\"read\",\"readexten\",\n                  \"readfile\",\"receivefax\",\"receivefax\",\"receivefax\",\"record\",\"removequeuemember\",\n                  \"resetcdr\",\"retrydial\",\"return\",\"ringing\",\"sayalpha\",\"saycountedadj\",\"saycountednoun\",\n                  \"saycountpl\",\"saydigits\",\"saynumber\",\"sayphonetic\",\"sayunixtime\",\"senddtmf\",\"sendfax\",\n                  \"sendfax\",\"sendfax\",\"sendimage\",\"sendtext\",\"sendurl\",\"set\",\"setamaflags\",\n                  \"setcallerpres\",\"setmusiconhold\",\"sipaddheader\",\"sipdtmfmode\",\"sipremoveheader\",\"skel\",\n                  \"slastation\",\"slatrunk\",\"sms\",\"softhangup\",\"speechactivategrammar\",\"speechbackground\",\n                  \"speechcreate\",\"speechdeactivategrammar\",\"speechdestroy\",\"speechloadgrammar\",\"speechprocessingsound\",\n                  \"speechstart\",\"speechunloadgrammar\",\"stackpop\",\"startmusiconhold\",\"stopmixmonitor\",\"stopmonitor\",\n                  \"stopmusiconhold\",\"stopplaytones\",\"system\",\"testclient\",\"testserver\",\"transfer\",\"tryexec\",\n                  \"trysystem\",\"unpausemonitor\",\"unpausequeuemember\",\"userevent\",\"verbose\",\"vmauthenticate\",\n                  \"vmsayname\",\"voicemail\",\"voicemailmain\",\"wait\",\"waitexten\",\"waitfornoise\",\"waitforring\",\n                  \"waitforsilence\",\"waitmusiconhold\",\"waituntil\",\"while\",\"zapateller\"\n                 ];\n\n  function basicToken(stream,state){\n    var cur = '';\n    var ch  = '';\n    ch = stream.next();\n    // comment\n    if(ch == \";\") {\n      stream.skipToEnd();\n      return \"comment\";\n    }\n    // context\n    if(ch == '[') {\n      stream.skipTo(']');\n      stream.eat(']');\n      return \"header\";\n    }\n    // string\n    if(ch == '\"') {\n      stream.skipTo('\"');\n      return \"string\";\n    }\n    if(ch == \"'\") {\n      stream.skipTo(\"'\");\n      return \"string-2\";\n    }\n    // dialplan commands\n    if(ch == '#') {\n      stream.eatWhile(/\\w/);\n      cur = stream.current();\n      if(dpcmd.indexOf(cur) !== -1) {\n        stream.skipToEnd();\n        return \"strong\";\n      }\n    }\n    // application args\n    if(ch == '$'){\n      var ch1 = stream.peek();\n      if(ch1 == '{'){\n        stream.skipTo('}');\n        stream.eat('}');\n        return \"variable-3\";\n      }\n    }\n    // extension\n    stream.eatWhile(/\\w/);\n    cur = stream.current();\n    if(atoms.indexOf(cur) !== -1) {\n      state.extenStart = true;\n      switch(cur) {\n        case 'same': state.extenSame = true; break;\n        case 'include':\n        case 'switch':\n        case 'ignorepat':\n          state.extenInclude = true;break;\n        default:break;\n      }\n      return \"atom\";\n    }\n  }\n\n  return {\n    startState: function() {\n      return {\n        extenStart: false,\n        extenSame:  false,\n        extenInclude: false,\n        extenExten: false,\n        extenPriority: false,\n        extenApplication: false\n      };\n    },\n    token: function(stream, state) {\n\n      var cur = '';\n      var ch  = '';\n      if(stream.eatSpace()) return null;\n      // extension started\n      if(state.extenStart){\n        stream.eatWhile(/[^\\s]/);\n        cur = stream.current();\n        if(/^=>?$/.test(cur)){\n          state.extenExten = true;\n          state.extenStart = false;\n          return \"strong\";\n        } else {\n          state.extenStart = false;\n          stream.skipToEnd();\n          return \"error\";\n        }\n      } else if(state.extenExten) {\n        // set exten and priority\n        state.extenExten = false;\n        state.extenPriority = true;\n        stream.eatWhile(/[^,]/);\n        if(state.extenInclude) {\n          stream.skipToEnd();\n          state.extenPriority = false;\n          state.extenInclude = false;\n        }\n        if(state.extenSame) {\n          state.extenPriority = false;\n          state.extenSame = false;\n          state.extenApplication = true;\n        }\n        return \"tag\";\n      } else if(state.extenPriority) {\n        state.extenPriority = false;\n        state.extenApplication = true;\n        ch = stream.next(); // get comma\n        if(state.extenSame) return null;\n        stream.eatWhile(/[^,]/);\n        return \"number\";\n      } else if(state.extenApplication) {\n        stream.eatWhile(/,/);\n        cur = stream.current();\n        if(cur === ',') return null;\n        stream.eatWhile(/\\w/);\n        cur = stream.current().toLowerCase();\n        state.extenApplication = false;\n        if(apps.indexOf(cur) !== -1){\n          return \"def strong\";\n        }\n      } else{\n        return basicToken(stream,state);\n      }\n\n      return null;\n    }\n  };\n});\n\nCodeMirror.defineMIME(\"text/x-asterisk\", \"asterisk\");\n\n});\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/asterisk/index.html",
    "content": "<!doctype html>\n\n<title>CodeMirror: Asterisk dialplan mode</title>\n<meta charset=\"utf-8\"/>\n<link rel=stylesheet href=\"../../doc/docs.css\">\n\n<link rel=\"stylesheet\" href=\"../../lib/codemirror.css\">\n<script src=\"../../lib/codemirror.js\"></script>\n<script src=\"asterisk.js\"></script>\n<style>\n      .CodeMirror {border: 1px solid #999;}\n      .cm-s-default span.cm-arrow { color: red; }\n    </style>\n<div id=nav>\n  <a href=\"http://codemirror.net\"><h1>CodeMirror</h1><img id=logo src=\"../../doc/logo.png\"></a>\n\n  <ul>\n    <li><a href=\"../../index.html\">Home</a>\n    <li><a href=\"../../doc/manual.html\">Manual</a>\n    <li><a href=\"https://github.com/codemirror/codemirror\">Code</a>\n  </ul>\n  <ul>\n    <li><a href=\"../index.html\">Language modes</a>\n    <li><a class=active href=\"#\">Asterisk dialplan</a>\n  </ul>\n</div>\n\n<article>\n<h2>Asterisk dialplan mode</h2>\n<form><textarea id=\"code\" name=\"code\">\n; extensions.conf - the Asterisk dial plan\n;\n\n[general]\n;\n; If static is set to no, or omitted, then the pbx_config will rewrite\n; this file when extensions are modified.  Remember that all comments\n; made in the file will be lost when that happens.\nstatic=yes\n\n#include \"/etc/asterisk/additional_general.conf\n\n[iaxprovider]\nswitch => IAX2/user:[key]@myserver/mycontext\n\n[dynamic]\n#exec /usr/bin/dynamic-peers.pl\n\n[trunkint]\n;\n; International long distance through trunk\n;\nexten => _9011.,1,Macro(dundi-e164,${EXTEN:4})\nexten => _9011.,n,Dial(${GLOBAL(TRUNK)}/${FILTER(0-9,${EXTEN:${GLOBAL(TRUNKMSD)}})})\n\n[local]\n;\n; Master context for local, toll-free, and iaxtel calls only\n;\nignorepat => 9\ninclude => default\n\n[demo]\ninclude => stdexten\n;\n; We start with what to do when a call first comes in.\n;\nexten => s,1,Wait(1)\t\t\t; Wait a second, just for fun\nsame  => n,Answer\t\t\t; Answer the line\nsame  => n,Set(TIMEOUT(digit)=5)\t; Set Digit Timeout to 5 seconds\nsame  => n,Set(TIMEOUT(response)=10)\t; Set Response Timeout to 10 seconds\nsame  => n(restart),BackGround(demo-congrats)\t; Play a congratulatory message\nsame  => n(instruct),BackGround(demo-instruct)\t; Play some instructions\nsame  => n,WaitExten\t\t\t; Wait for an extension to be dialed.\n\nexten => 2,1,BackGround(demo-moreinfo)\t; Give some more information.\nexten => 2,n,Goto(s,instruct)\n\nexten => 3,1,Set(LANGUAGE()=fr)\t\t; Set language to french\nexten => 3,n,Goto(s,restart)\t\t; Start with the congratulations\n\nexten => 1000,1,Goto(default,s,1)\n;\n; We also create an example user, 1234, who is on the console and has\n; voicemail, etc.\n;\nexten => 1234,1,Playback(transfer,skip)\t\t; \"Please hold while...\"\n\t\t\t\t\t; (but skip if channel is not up)\nexten => 1234,n,Gosub(${EXTEN},stdexten(${GLOBAL(CONSOLE)}))\nexten => 1234,n,Goto(default,s,1)\t\t; exited Voicemail\n\nexten => 1235,1,Voicemail(1234,u)\t\t; Right to voicemail\n\nexten => 1236,1,Dial(Console/dsp)\t\t; Ring forever\nexten => 1236,n,Voicemail(1234,b)\t\t; Unless busy\n\n;\n; # for when they're done with the demo\n;\nexten => #,1,Playback(demo-thanks)\t; \"Thanks for trying the demo\"\nexten => #,n,Hangup\t\t\t; Hang them up.\n\n;\n; A timeout and \"invalid extension rule\"\n;\nexten => t,1,Goto(#,1)\t\t\t; If they take too long, give up\nexten => i,1,Playback(invalid)\t\t; \"That's not valid, try again\"\n\n;\n; Create an extension, 500, for dialing the\n; Asterisk demo.\n;\nexten => 500,1,Playback(demo-abouttotry); Let them know what's going on\nexten => 500,n,Dial(IAX2/guest@pbx.digium.com/s@default)\t; Call the Asterisk demo\nexten => 500,n,Playback(demo-nogo)\t; Couldn't connect to the demo site\nexten => 500,n,Goto(s,6)\t\t; Return to the start over message.\n\n;\n; Create an extension, 600, for evaluating echo latency.\n;\nexten => 600,1,Playback(demo-echotest)\t; Let them know what's going on\nexten => 600,n,Echo\t\t\t; Do the echo test\nexten => 600,n,Playback(demo-echodone)\t; Let them know it's over\nexten => 600,n,Goto(s,6)\t\t; Start over\n\n;\n;\tYou can use the Macro Page to intercom a individual user\nexten => 76245,1,Macro(page,SIP/Grandstream1)\n; or if your peernames are the same as extensions\nexten => _7XXX,1,Macro(page,SIP/${EXTEN})\n;\n;\n; System Wide Page at extension 7999\n;\nexten => 7999,1,Set(TIMEOUT(absolute)=60)\nexten => 7999,2,Page(Local/Grandstream1@page&Local/Xlite1@page&Local/1234@page/n,d)\n\n; Give voicemail at extension 8500\n;\nexten => 8500,1,VoicemailMain\nexten => 8500,n,Goto(s,6)\n\n    </textarea></form>\n    <script>\n      var editor = CodeMirror.fromTextArea(document.getElementById(\"code\"), {\n        mode: \"text/x-asterisk\",\n        matchBrackets: true,\n        lineNumber: true\n      });\n    </script>\n\n    <p><strong>MIME types defined:</strong> <code>text/x-asterisk</code>.</p>\n\n  </article>\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/clike/clike.js",
    "content": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n(function(mod) {\n  if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n    mod(require(\"../../lib/codemirror\"));\n  else if (typeof define == \"function\" && define.amd) // AMD\n    define([\"../../lib/codemirror\"], mod);\n  else // Plain browser env\n    mod(CodeMirror);\n})(function(CodeMirror) {\n\"use strict\";\n\nCodeMirror.defineMode(\"clike\", function(config, parserConfig) {\n  var indentUnit = config.indentUnit,\n      statementIndentUnit = parserConfig.statementIndentUnit || indentUnit,\n      dontAlignCalls = parserConfig.dontAlignCalls,\n      keywords = parserConfig.keywords || {},\n      builtin = parserConfig.builtin || {},\n      blockKeywords = parserConfig.blockKeywords || {},\n      atoms = parserConfig.atoms || {},\n      hooks = parserConfig.hooks || {},\n      multiLineStrings = parserConfig.multiLineStrings,\n      indentStatements = parserConfig.indentStatements !== false;\n  var isOperatorChar = /[+\\-*&%=<>!?|\\/]/;\n\n  var curPunc;\n\n  function tokenBase(stream, state) {\n    var ch = stream.next();\n    if (hooks[ch]) {\n      var result = hooks[ch](stream, state);\n      if (result !== false) return result;\n    }\n    if (ch == '\"' || ch == \"'\") {\n      state.tokenize = tokenString(ch);\n      return state.tokenize(stream, state);\n    }\n    if (/[\\[\\]{}\\(\\),;\\:\\.]/.test(ch)) {\n      curPunc = ch;\n      return null;\n    }\n    if (/\\d/.test(ch)) {\n      stream.eatWhile(/[\\w\\.]/);\n      return \"number\";\n    }\n    if (ch == \"/\") {\n      if (stream.eat(\"*\")) {\n        state.tokenize = tokenComment;\n        return tokenComment(stream, state);\n      }\n      if (stream.eat(\"/\")) {\n        stream.skipToEnd();\n        return \"comment\";\n      }\n    }\n    if (isOperatorChar.test(ch)) {\n      stream.eatWhile(isOperatorChar);\n      return \"operator\";\n    }\n    stream.eatWhile(/[\\w\\$_\\xa1-\\uffff]/);\n    var cur = stream.current();\n    if (keywords.propertyIsEnumerable(cur)) {\n      if (blockKeywords.propertyIsEnumerable(cur)) curPunc = \"newstatement\";\n      return \"keyword\";\n    }\n    if (builtin.propertyIsEnumerable(cur)) {\n      if (blockKeywords.propertyIsEnumerable(cur)) curPunc = \"newstatement\";\n      return \"builtin\";\n    }\n    if (atoms.propertyIsEnumerable(cur)) return \"atom\";\n    return \"variable\";\n  }\n\n  function tokenString(quote) {\n    return function(stream, state) {\n      var escaped = false, next, end = false;\n      while ((next = stream.next()) != null) {\n        if (next == quote && !escaped) {end = true; break;}\n        escaped = !escaped && next == \"\\\\\";\n      }\n      if (end || !(escaped || multiLineStrings))\n        state.tokenize = null;\n      return \"string\";\n    };\n  }\n\n  function tokenComment(stream, state) {\n    var maybeEnd = false, ch;\n    while (ch = stream.next()) {\n      if (ch == \"/\" && maybeEnd) {\n        state.tokenize = null;\n        break;\n      }\n      maybeEnd = (ch == \"*\");\n    }\n    return \"comment\";\n  }\n\n  function Context(indented, column, type, align, prev) {\n    this.indented = indented;\n    this.column = column;\n    this.type = type;\n    this.align = align;\n    this.prev = prev;\n  }\n  function pushContext(state, col, type) {\n    var indent = state.indented;\n    if (state.context && state.context.type == \"statement\")\n      indent = state.context.indented;\n    return state.context = new Context(indent, col, type, null, state.context);\n  }\n  function popContext(state) {\n    var t = state.context.type;\n    if (t == \")\" || t == \"]\" || t == \"}\")\n      state.indented = state.context.indented;\n    return state.context = state.context.prev;\n  }\n\n  // Interface\n\n  return {\n    startState: function(basecolumn) {\n      return {\n        tokenize: null,\n        context: new Context((basecolumn || 0) - indentUnit, 0, \"top\", false),\n        indented: 0,\n        startOfLine: true\n      };\n    },\n\n    token: function(stream, state) {\n      var ctx = state.context;\n      if (stream.sol()) {\n        if (ctx.align == null) ctx.align = false;\n        state.indented = stream.indentation();\n        state.startOfLine = true;\n      }\n      if (stream.eatSpace()) return null;\n      curPunc = null;\n      var style = (state.tokenize || tokenBase)(stream, state);\n      if (style == \"comment\" || style == \"meta\") return style;\n      if (ctx.align == null) ctx.align = true;\n\n      if ((curPunc == \";\" || curPunc == \":\" || curPunc == \",\") && ctx.type == \"statement\") popContext(state);\n      else if (curPunc == \"{\") pushContext(state, stream.column(), \"}\");\n      else if (curPunc == \"[\") pushContext(state, stream.column(), \"]\");\n      else if (curPunc == \"(\") pushContext(state, stream.column(), \")\");\n      else if (curPunc == \"}\") {\n        while (ctx.type == \"statement\") ctx = popContext(state);\n        if (ctx.type == \"}\") ctx = popContext(state);\n        while (ctx.type == \"statement\") ctx = popContext(state);\n      }\n      else if (curPunc == ctx.type) popContext(state);\n      else if (indentStatements &&\n               (((ctx.type == \"}\" || ctx.type == \"top\") && curPunc != ';') ||\n                (ctx.type == \"statement\" && curPunc == \"newstatement\")))\n        pushContext(state, stream.column(), \"statement\");\n      state.startOfLine = false;\n      return style;\n    },\n\n    indent: function(state, textAfter) {\n      if (state.tokenize != tokenBase && state.tokenize != null) return CodeMirror.Pass;\n      var ctx = state.context, firstChar = textAfter && textAfter.charAt(0);\n      if (ctx.type == \"statement\" && firstChar == \"}\") ctx = ctx.prev;\n      var closing = firstChar == ctx.type;\n      if (ctx.type == \"statement\") return ctx.indented + (firstChar == \"{\" ? 0 : statementIndentUnit);\n      else if (ctx.align && (!dontAlignCalls || ctx.type != \")\")) return ctx.column + (closing ? 0 : 1);\n      else if (ctx.type == \")\" && !closing) return ctx.indented + statementIndentUnit;\n      else return ctx.indented + (closing ? 0 : indentUnit);\n    },\n\n    electricChars: \"{}\",\n    blockCommentStart: \"/*\",\n    blockCommentEnd: \"*/\",\n    lineComment: \"//\",\n    fold: \"brace\"\n  };\n});\n\n  function words(str) {\n    var obj = {}, words = str.split(\" \");\n    for (var i = 0; i < words.length; ++i) obj[words[i]] = true;\n    return obj;\n  }\n  var cKeywords = \"auto if break int case long char register continue return default short do sizeof \" +\n    \"double static else struct entry switch extern typedef float union for unsigned \" +\n    \"goto while enum void const signed volatile\";\n\n  function cppHook(stream, state) {\n    if (!state.startOfLine) return false;\n    for (;;) {\n      if (stream.skipTo(\"\\\\\")) {\n        stream.next();\n        if (stream.eol()) {\n          state.tokenize = cppHook;\n          break;\n        }\n      } else {\n        stream.skipToEnd();\n        state.tokenize = null;\n        break;\n      }\n    }\n    return \"meta\";\n  }\n\n  function cpp11StringHook(stream, state) {\n    stream.backUp(1);\n    // Raw strings.\n    if (stream.match(/(R|u8R|uR|UR|LR)/)) {\n      var match = stream.match(/\"([^\\s\\\\()]{0,16})\\(/);\n      if (!match) {\n        return false;\n      }\n      state.cpp11RawStringDelim = match[1];\n      state.tokenize = tokenRawString;\n      return tokenRawString(stream, state);\n    }\n    // Unicode strings/chars.\n    if (stream.match(/(u8|u|U|L)/)) {\n      if (stream.match(/[\"']/, /* eat */ false)) {\n        return \"string\";\n      }\n      return false;\n    }\n    // Ignore this hook.\n    stream.next();\n    return false;\n  }\n\n  // C#-style strings where \"\" escapes a quote.\n  function tokenAtString(stream, state) {\n    var next;\n    while ((next = stream.next()) != null) {\n      if (next == '\"' && !stream.eat('\"')) {\n        state.tokenize = null;\n        break;\n      }\n    }\n    return \"string\";\n  }\n\n  // C++11 raw string literal is <prefix>\"<delim>( anything )<delim>\", where\n  // <delim> can be a string up to 16 characters long.\n  function tokenRawString(stream, state) {\n    // Escape characters that have special regex meanings.\n    var delim = state.cpp11RawStringDelim.replace(/[^\\w\\s]/g, '\\\\$&');\n    var match = stream.match(new RegExp(\".*?\\\\)\" + delim + '\"'));\n    if (match)\n      state.tokenize = null;\n    else\n      stream.skipToEnd();\n    return \"string\";\n  }\n\n  function def(mimes, mode) {\n    if (typeof mimes == \"string\") mimes = [mimes];\n    var words = [];\n    function add(obj) {\n      if (obj) for (var prop in obj) if (obj.hasOwnProperty(prop))\n        words.push(prop);\n    }\n    add(mode.keywords);\n    add(mode.builtin);\n    add(mode.atoms);\n    if (words.length) {\n      mode.helperType = mimes[0];\n      CodeMirror.registerHelper(\"hintWords\", mimes[0], words);\n    }\n\n    for (var i = 0; i < mimes.length; ++i)\n      CodeMirror.defineMIME(mimes[i], mode);\n  }\n\n  def([\"text/x-csrc\", \"text/x-c\", \"text/x-chdr\"], {\n    name: \"clike\",\n    keywords: words(cKeywords),\n    blockKeywords: words(\"case do else for if switch while struct\"),\n    atoms: words(\"null\"),\n    hooks: {\"#\": cppHook},\n    modeProps: {fold: [\"brace\", \"include\"]}\n  });\n\n  def([\"text/x-c++src\", \"text/x-c++hdr\"], {\n    name: \"clike\",\n    keywords: words(cKeywords + \" asm dynamic_cast namespace reinterpret_cast try bool explicit new \" +\n                    \"static_cast typeid catch operator template typename class friend private \" +\n                    \"this using const_cast inline public throw virtual delete mutable protected \" +\n                    \"wchar_t alignas alignof constexpr decltype nullptr noexcept thread_local final \" +\n                    \"static_assert override\"),\n    blockKeywords: words(\"catch class do else finally for if struct switch try while\"),\n    atoms: words(\"true false null\"),\n    hooks: {\n      \"#\": cppHook,\n      \"u\": cpp11StringHook,\n      \"U\": cpp11StringHook,\n      \"L\": cpp11StringHook,\n      \"R\": cpp11StringHook\n    },\n    modeProps: {fold: [\"brace\", \"include\"]}\n  });\n\n  def(\"text/x-java\", {\n    name: \"clike\",\n    keywords: words(\"abstract assert boolean break byte case catch char class const continue default \" +\n                    \"do double else enum extends final finally float for goto if implements import \" +\n                    \"instanceof int interface long native new package private protected public \" +\n                    \"return short static strictfp super switch synchronized this throw throws transient \" +\n                    \"try void volatile while\"),\n    blockKeywords: words(\"catch class do else finally for if switch try while\"),\n    atoms: words(\"true false null\"),\n    hooks: {\n      \"@\": function(stream) {\n        stream.eatWhile(/[\\w\\$_]/);\n        return \"meta\";\n      }\n    },\n    modeProps: {fold: [\"brace\", \"import\"]}\n  });\n\n  def(\"text/x-csharp\", {\n    name: \"clike\",\n    keywords: words(\"abstract as base break case catch checked class const continue\" +\n                    \" default delegate do else enum event explicit extern finally fixed for\" +\n                    \" foreach goto if implicit in interface internal is lock namespace new\" +\n                    \" operator out override params private protected public readonly ref return sealed\" +\n                    \" sizeof stackalloc static struct switch this throw try typeof unchecked\" +\n                    \" unsafe using virtual void volatile while add alias ascending descending dynamic from get\" +\n                    \" global group into join let orderby partial remove select set value var yield\"),\n    blockKeywords: words(\"catch class do else finally for foreach if struct switch try while\"),\n    builtin: words(\"Boolean Byte Char DateTime DateTimeOffset Decimal Double\" +\n                    \" Guid Int16 Int32 Int64 Object SByte Single String TimeSpan UInt16 UInt32\" +\n                    \" UInt64 bool byte char decimal double short int long object\"  +\n                    \" sbyte float string ushort uint ulong\"),\n    atoms: words(\"true false null\"),\n    hooks: {\n      \"@\": function(stream, state) {\n        if (stream.eat('\"')) {\n          state.tokenize = tokenAtString;\n          return tokenAtString(stream, state);\n        }\n        stream.eatWhile(/[\\w\\$_]/);\n        return \"meta\";\n      }\n    }\n  });\n\n  function tokenTripleString(stream, state) {\n    var escaped = false;\n    while (!stream.eol()) {\n      if (!escaped && stream.match('\"\"\"')) {\n        state.tokenize = null;\n        break;\n      }\n      escaped = stream.next() == \"\\\\\" && !escaped;\n    }\n    return \"string\";\n  }\n\n  def(\"text/x-scala\", {\n    name: \"clike\",\n    keywords: words(\n\n      /* scala */\n      \"abstract case catch class def do else extends false final finally for forSome if \" +\n      \"implicit import lazy match new null object override package private protected return \" +\n      \"sealed super this throw trait try trye type val var while with yield _ : = => <- <: \" +\n      \"<% >: # @ \" +\n\n      /* package scala */\n      \"assert assume require print println printf readLine readBoolean readByte readShort \" +\n      \"readChar readInt readLong readFloat readDouble \" +\n\n      \"AnyVal App Application Array BufferedIterator BigDecimal BigInt Char Console Either \" +\n      \"Enumeration Equiv Error Exception Fractional Function IndexedSeq Integral Iterable \" +\n      \"Iterator List Map Numeric Nil NotNull Option Ordered Ordering PartialFunction PartialOrdering \" +\n      \"Product Proxy Range Responder Seq Serializable Set Specializable Stream StringBuilder \" +\n      \"StringContext Symbol Throwable Traversable TraversableOnce Tuple Unit Vector :: #:: \" +\n\n      /* package java.lang */\n      \"Boolean Byte Character CharSequence Class ClassLoader Cloneable Comparable \" +\n      \"Compiler Double Exception Float Integer Long Math Number Object Package Pair Process \" +\n      \"Runtime Runnable SecurityManager Short StackTraceElement StrictMath String \" +\n      \"StringBuffer System Thread ThreadGroup ThreadLocal Throwable Triple Void\"\n    ),\n    multiLineStrings: true,\n    blockKeywords: words(\"catch class do else finally for forSome if match switch try while\"),\n    atoms: words(\"true false null\"),\n    indentStatements: false,\n    hooks: {\n      \"@\": function(stream) {\n        stream.eatWhile(/[\\w\\$_]/);\n        return \"meta\";\n      },\n      '\"': function(stream, state) {\n        if (!stream.match('\"\"')) return false;\n        state.tokenize = tokenTripleString;\n        return state.tokenize(stream, state);\n      },\n      \"'\": function(stream) {\n        stream.eatWhile(/[\\w\\$_\\xa1-\\uffff]/);\n        return \"atom\";\n      }\n    }\n  });\n\n  def([\"x-shader/x-vertex\", \"x-shader/x-fragment\"], {\n    name: \"clike\",\n    keywords: words(\"float int bool void \" +\n                    \"vec2 vec3 vec4 ivec2 ivec3 ivec4 bvec2 bvec3 bvec4 \" +\n                    \"mat2 mat3 mat4 \" +\n                    \"sampler1D sampler2D sampler3D samplerCube \" +\n                    \"sampler1DShadow sampler2DShadow \" +\n                    \"const attribute uniform varying \" +\n                    \"break continue discard return \" +\n                    \"for while do if else struct \" +\n                    \"in out inout\"),\n    blockKeywords: words(\"for while do if else struct\"),\n    builtin: words(\"radians degrees sin cos tan asin acos atan \" +\n                    \"pow exp log exp2 sqrt inversesqrt \" +\n                    \"abs sign floor ceil fract mod min max clamp mix step smoothstep \" +\n                    \"length distance dot cross normalize ftransform faceforward \" +\n                    \"reflect refract matrixCompMult \" +\n                    \"lessThan lessThanEqual greaterThan greaterThanEqual \" +\n                    \"equal notEqual any all not \" +\n                    \"texture1D texture1DProj texture1DLod texture1DProjLod \" +\n                    \"texture2D texture2DProj texture2DLod texture2DProjLod \" +\n                    \"texture3D texture3DProj texture3DLod texture3DProjLod \" +\n                    \"textureCube textureCubeLod \" +\n                    \"shadow1D shadow2D shadow1DProj shadow2DProj \" +\n                    \"shadow1DLod shadow2DLod shadow1DProjLod shadow2DProjLod \" +\n                    \"dFdx dFdy fwidth \" +\n                    \"noise1 noise2 noise3 noise4\"),\n    atoms: words(\"true false \" +\n                \"gl_FragColor gl_SecondaryColor gl_Normal gl_Vertex \" +\n                \"gl_MultiTexCoord0 gl_MultiTexCoord1 gl_MultiTexCoord2 gl_MultiTexCoord3 \" +\n                \"gl_MultiTexCoord4 gl_MultiTexCoord5 gl_MultiTexCoord6 gl_MultiTexCoord7 \" +\n                \"gl_FogCoord gl_PointCoord \" +\n                \"gl_Position gl_PointSize gl_ClipVertex \" +\n                \"gl_FrontColor gl_BackColor gl_FrontSecondaryColor gl_BackSecondaryColor \" +\n                \"gl_TexCoord gl_FogFragCoord \" +\n                \"gl_FragCoord gl_FrontFacing \" +\n                \"gl_FragData gl_FragDepth \" +\n                \"gl_ModelViewMatrix gl_ProjectionMatrix gl_ModelViewProjectionMatrix \" +\n                \"gl_TextureMatrix gl_NormalMatrix gl_ModelViewMatrixInverse \" +\n                \"gl_ProjectionMatrixInverse gl_ModelViewProjectionMatrixInverse \" +\n                \"gl_TexureMatrixTranspose gl_ModelViewMatrixInverseTranspose \" +\n                \"gl_ProjectionMatrixInverseTranspose \" +\n                \"gl_ModelViewProjectionMatrixInverseTranspose \" +\n                \"gl_TextureMatrixInverseTranspose \" +\n                \"gl_NormalScale gl_DepthRange gl_ClipPlane \" +\n                \"gl_Point gl_FrontMaterial gl_BackMaterial gl_LightSource gl_LightModel \" +\n                \"gl_FrontLightModelProduct gl_BackLightModelProduct \" +\n                \"gl_TextureColor gl_EyePlaneS gl_EyePlaneT gl_EyePlaneR gl_EyePlaneQ \" +\n                \"gl_FogParameters \" +\n                \"gl_MaxLights gl_MaxClipPlanes gl_MaxTextureUnits gl_MaxTextureCoords \" +\n                \"gl_MaxVertexAttribs gl_MaxVertexUniformComponents gl_MaxVaryingFloats \" +\n                \"gl_MaxVertexTextureImageUnits gl_MaxTextureImageUnits \" +\n                \"gl_MaxFragmentUniformComponents gl_MaxCombineTextureImageUnits \" +\n                \"gl_MaxDrawBuffers\"),\n    hooks: {\"#\": cppHook},\n    modeProps: {fold: [\"brace\", \"include\"]}\n  });\n\n  def(\"text/x-nesc\", {\n    name: \"clike\",\n    keywords: words(cKeywords + \"as atomic async call command component components configuration event generic \" +\n                    \"implementation includes interface module new norace nx_struct nx_union post provides \" +\n                    \"signal task uses abstract extends\"),\n    blockKeywords: words(\"case do else for if switch while struct\"),\n    atoms: words(\"null\"),\n    hooks: {\"#\": cppHook},\n    modeProps: {fold: [\"brace\", \"include\"]}\n  });\n\n  def(\"text/x-objectivec\", {\n    name: \"clike\",\n    keywords: words(cKeywords + \"inline restrict _Bool _Complex _Imaginery BOOL Class bycopy byref id IMP in \" +\n                    \"inout nil oneway out Protocol SEL self super atomic nonatomic retain copy readwrite readonly\"),\n    atoms: words(\"YES NO NULL NILL ON OFF\"),\n    hooks: {\n      \"@\": function(stream) {\n        stream.eatWhile(/[\\w\\$]/);\n        return \"keyword\";\n      },\n      \"#\": cppHook\n    },\n    modeProps: {fold: \"brace\"}\n  });\n\n});\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/clike/index.html",
    "content": "<!doctype html>\n\n<title>CodeMirror: C-like mode</title>\n<meta charset=\"utf-8\"/>\n<link rel=stylesheet href=\"../../doc/docs.css\">\n\n<link rel=\"stylesheet\" href=\"../../lib/codemirror.css\">\n<script src=\"../../lib/codemirror.js\"></script>\n<script src=\"../../addon/edit/matchbrackets.js\"></script>\n<link rel=\"stylesheet\" href=\"../../addon/hint/show-hint.css\">\n<script src=\"../../addon/hint/show-hint.js\"></script>\n<script src=\"clike.js\"></script>\n<style>.CodeMirror {border: 2px inset #dee;}</style>\n<div id=nav>\n  <a href=\"http://codemirror.net\"><h1>CodeMirror</h1><img id=logo src=\"../../doc/logo.png\"></a>\n\n  <ul>\n    <li><a href=\"../../index.html\">Home</a>\n    <li><a href=\"../../doc/manual.html\">Manual</a>\n    <li><a href=\"https://github.com/codemirror/codemirror\">Code</a>\n  </ul>\n  <ul>\n    <li><a href=\"../index.html\">Language modes</a>\n    <li><a class=active href=\"#\">C-like</a>\n  </ul>\n</div>\n\n<article>\n<h2>C-like mode</h2>\n\n<div><textarea id=\"c-code\">\n/* C demo code */\n\n#include <zmq.h>\n#include <pthread.h>\n#include <semaphore.h>\n#include <time.h>\n#include <stdio.h>\n#include <fcntl.h>\n#include <malloc.h>\n\ntypedef struct {\n  void* arg_socket;\n  zmq_msg_t* arg_msg;\n  char* arg_string;\n  unsigned long arg_len;\n  int arg_int, arg_command;\n\n  int signal_fd;\n  int pad;\n  void* context;\n  sem_t sem;\n} acl_zmq_context;\n\n#define p(X) (context->arg_##X)\n\nvoid* zmq_thread(void* context_pointer) {\n  acl_zmq_context* context = (acl_zmq_context*)context_pointer;\n  char ok = 'K', err = 'X';\n  int res;\n\n  while (1) {\n    while ((res = sem_wait(&amp;context->sem)) == EINTR);\n    if (res) {write(context->signal_fd, &amp;err, 1); goto cleanup;}\n    switch(p(command)) {\n    case 0: goto cleanup;\n    case 1: p(socket) = zmq_socket(context->context, p(int)); break;\n    case 2: p(int) = zmq_close(p(socket)); break;\n    case 3: p(int) = zmq_bind(p(socket), p(string)); break;\n    case 4: p(int) = zmq_connect(p(socket), p(string)); break;\n    case 5: p(int) = zmq_getsockopt(p(socket), p(int), (void*)p(string), &amp;p(len)); break;\n    case 6: p(int) = zmq_setsockopt(p(socket), p(int), (void*)p(string), p(len)); break;\n    case 7: p(int) = zmq_send(p(socket), p(msg), p(int)); break;\n    case 8: p(int) = zmq_recv(p(socket), p(msg), p(int)); break;\n    case 9: p(int) = zmq_poll(p(socket), p(int), p(len)); break;\n    }\n    p(command) = errno;\n    write(context->signal_fd, &amp;ok, 1);\n  }\n cleanup:\n  close(context->signal_fd);\n  free(context_pointer);\n  return 0;\n}\n\nvoid* zmq_thread_init(void* zmq_context, int signal_fd) {\n  acl_zmq_context* context = malloc(sizeof(acl_zmq_context));\n  pthread_t thread;\n\n  context->context = zmq_context;\n  context->signal_fd = signal_fd;\n  sem_init(&amp;context->sem, 1, 0);\n  pthread_create(&amp;thread, 0, &amp;zmq_thread, context);\n  pthread_detach(thread);\n  return context;\n}\n</textarea></div>\n\n<h2>C++ example</h2>\n\n<div><textarea id=\"cpp-code\">\n#include <iostream>\n#include \"mystuff/util.h\"\n\nnamespace {\nenum Enum {\n  VAL1, VAL2, VAL3\n};\n\nchar32_t unicode_string = U\"\\U0010FFFF\";\nstring raw_string = R\"delim(anything\nyou\nwant)delim\";\n\nint Helper(const MyType& param) {\n  return 0;\n}\n} // namespace\n\nclass ForwardDec;\n\ntemplate <class T, class V>\nclass Class : public BaseClass {\n  const MyType<T, V> member_;\n\n public:\n  const MyType<T, V>& Method() const {\n    return member_;\n  }\n\n  void Method2(MyType<T, V>* value);\n}\n\ntemplate <class T, class V>\nvoid Class::Method2(MyType<T, V>* value) {\n  std::out << 1 >> method();\n  value->Method3(member_);\n  member_ = value;\n}\n</textarea></div>\n\n<h2>Objective-C example</h2>\n\n<div><textarea id=\"objectivec-code\">\n/*\nThis is a longer comment\nThat spans two lines\n*/\n\n#import <Test/Test.h>\n@implementation YourAppDelegate\n\n// This is a one-line comment\n\n- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions{\n  char myString[] = \"This is a C character array\";\n  int test = 5;\n  return YES;\n}\n</textarea></div>\n\n<h2>Java example</h2>\n\n<div><textarea id=\"java-code\">\nimport com.demo.util.MyType;\nimport com.demo.util.MyInterface;\n\npublic enum Enum {\n  VAL1, VAL2, VAL3\n}\n\npublic class Class<T, V> implements MyInterface {\n  public static final MyType<T, V> member;\n  \n  private class InnerClass {\n    public int zero() {\n      return 0;\n    }\n  }\n\n  @Override\n  public MyType method() {\n    return member;\n  }\n\n  public void method2(MyType<T, V> value) {\n    method();\n    value.method3();\n    member = value;\n  }\n}\n</textarea></div>\n\n<h2>Scala example</h2>\n\n<div><textarea id=\"scala-code\">\nobject FilterTest extends App {\n  def filter(xs: List[Int], threshold: Int) = {\n    def process(ys: List[Int]): List[Int] =\n      if (ys.isEmpty) ys\n      else if (ys.head < threshold) ys.head :: process(ys.tail)\n      else process(ys.tail)\n    process(xs)\n  }\n  println(filter(List(1, 9, 2, 8, 3, 7, 4), 5))\n}\n</textarea></div>\n\n    <script>\n      var cEditor = CodeMirror.fromTextArea(document.getElementById(\"c-code\"), {\n        lineNumbers: true,\n        matchBrackets: true,\n        mode: \"text/x-csrc\"\n      });\n      var cppEditor = CodeMirror.fromTextArea(document.getElementById(\"cpp-code\"), {\n        lineNumbers: true,\n        matchBrackets: true,\n        mode: \"text/x-c++src\"\n      });\n      var javaEditor = CodeMirror.fromTextArea(document.getElementById(\"java-code\"), {\n        lineNumbers: true,\n        matchBrackets: true,\n        mode: \"text/x-java\"\n      });\n      var objectivecEditor = CodeMirror.fromTextArea(document.getElementById(\"objectivec-code\"), {\n        lineNumbers: true,\n        matchBrackets: true,\n        mode: \"text/x-objectivec\"\n      });\n      var scalaEditor = CodeMirror.fromTextArea(document.getElementById(\"scala-code\"), {\n        lineNumbers: true,\n        matchBrackets: true,\n        mode: \"text/x-scala\"\n      });\n      var mac = CodeMirror.keyMap.default == CodeMirror.keyMap.macDefault;\n      CodeMirror.keyMap.default[(mac ? \"Cmd\" : \"Ctrl\") + \"-Space\"] = \"autocomplete\";\n    </script>\n\n    <p>Simple mode that tries to handle C-like languages as well as it\n    can. Takes two configuration parameters: <code>keywords</code>, an\n    object whose property names are the keywords in the language,\n    and <code>useCPP</code>, which determines whether C preprocessor\n    directives are recognized.</p>\n\n    <p><strong>MIME types defined:</strong> <code>text/x-csrc</code>\n    (C), <code>text/x-c++src</code> (C++), <code>text/x-java</code>\n    (Java), <code>text/x-csharp</code> (C#),\n    <code>text/x-objectivec</code> (Objective-C),\n    <code>text/x-scala</code> (Scala), <code>text/x-vertex</code>\n    and <code>x-shader/x-fragment</code> (shader programs).</p>\n</article>\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/clike/scala.html",
    "content": "<!doctype html>\n\n<title>CodeMirror: Scala mode</title>\n<meta charset=\"utf-8\"/>\n<link rel=stylesheet href=\"../../doc/docs.css\">\n\n<link rel=\"stylesheet\" href=\"../../lib/codemirror.css\">\n<link rel=\"stylesheet\" href=\"../../theme/ambiance.css\">\n<script src=\"../../lib/codemirror.js\"></script>\n<script src=\"../../addon/edit/matchbrackets.js\"></script>\n<script src=\"clike.js\"></script>\n<div id=nav>\n  <a href=\"http://codemirror.net\"><h1>CodeMirror</h1><img id=logo src=\"../../doc/logo.png\"></a>\n\n  <ul>\n    <li><a href=\"../../index.html\">Home</a>\n    <li><a href=\"../../doc/manual.html\">Manual</a>\n    <li><a href=\"https://github.com/codemirror/codemirror\">Code</a>\n  </ul>\n  <ul>\n    <li><a href=\"../index.html\">Language modes</a>\n    <li><a class=active href=\"#\">Scala</a>\n  </ul>\n</div>\n\n<article>\n<h2>Scala mode</h2>\n<form>\n<textarea id=\"code\" name=\"code\">\n\n  /*                     __                                               *\\\n  **     ________ ___   / /  ___     Scala API                            **\n  **    / __/ __// _ | / /  / _ |    (c) 2003-2011, LAMP/EPFL             **\n  **  __\\ \\/ /__/ __ |/ /__/ __ |    http://scala-lang.org/               **\n  ** /____/\\___/_/ |_/____/_/ | |                                         **\n  **                          |/                                          **\n  \\*                                                                      */\n\n  package scala.collection\n\n  import generic._\n  import mutable.{ Builder, ListBuffer }\n  import annotation.{tailrec, migration, bridge}\n  import annotation.unchecked.{ uncheckedVariance => uV }\n  import parallel.ParIterable\n\n  /** A template trait for traversable collections of type `Traversable[A]`.\n   *  \n   *  $traversableInfo\n   *  @define mutability\n   *  @define traversableInfo\n   *  This is a base trait of all kinds of $mutability Scala collections. It\n   *  implements the behavior common to all collections, in terms of a method\n   *  `foreach` with signature:\n   * {{{\n   *     def foreach[U](f: Elem => U): Unit\n   * }}}\n   *  Collection classes mixing in this trait provide a concrete \n   *  `foreach` method which traverses all the\n   *  elements contained in the collection, applying a given function to each.\n   *  They also need to provide a method `newBuilder`\n   *  which creates a builder for collections of the same kind.\n   *  \n   *  A traversable class might or might not have two properties: strictness\n   *  and orderedness. Neither is represented as a type.\n   *  \n   *  The instances of a strict collection class have all their elements\n   *  computed before they can be used as values. By contrast, instances of\n   *  a non-strict collection class may defer computation of some of their\n   *  elements until after the instance is available as a value.\n   *  A typical example of a non-strict collection class is a\n   *  <a href=\"../immutable/Stream.html\" target=\"ContentFrame\">\n   *  `scala.collection.immutable.Stream`</a>.\n   *  A more general class of examples are `TraversableViews`.\n   *  \n   *  If a collection is an instance of an ordered collection class, traversing\n   *  its elements with `foreach` will always visit elements in the\n   *  same order, even for different runs of the program. If the class is not\n   *  ordered, `foreach` can visit elements in different orders for\n   *  different runs (but it will keep the same order in the same run).'\n   * \n   *  A typical example of a collection class which is not ordered is a\n   *  `HashMap` of objects. The traversal order for hash maps will\n   *  depend on the hash codes of its elements, and these hash codes might\n   *  differ from one run to the next. By contrast, a `LinkedHashMap`\n   *  is ordered because it's `foreach` method visits elements in the\n   *  order they were inserted into the `HashMap`.\n   *\n   *  @author Martin Odersky\n   *  @version 2.8\n   *  @since   2.8\n   *  @tparam A    the element type of the collection\n   *  @tparam Repr the type of the actual collection containing the elements.\n   *\n   *  @define Coll Traversable\n   *  @define coll traversable collection\n   */\n  trait TraversableLike[+A, +Repr] extends HasNewBuilder[A, Repr] \n                                      with FilterMonadic[A, Repr]\n                                      with TraversableOnce[A]\n                                      with GenTraversableLike[A, Repr]\n                                      with Parallelizable[A, ParIterable[A]]\n  {\n    self =>\n\n    import Traversable.breaks._\n\n    /** The type implementing this traversable */\n    protected type Self = Repr\n\n    /** The collection of type $coll underlying this `TraversableLike` object.\n     *  By default this is implemented as the `TraversableLike` object itself,\n     *  but this can be overridden.\n     */\n    def repr: Repr = this.asInstanceOf[Repr]\n\n    /** The underlying collection seen as an instance of `$Coll`.\n     *  By default this is implemented as the current collection object itself,\n     *  but this can be overridden.\n     */\n    protected[this] def thisCollection: Traversable[A] = this.asInstanceOf[Traversable[A]]\n\n    /** A conversion from collections of type `Repr` to `$Coll` objects.\n     *  By default this is implemented as just a cast, but this can be overridden.\n     */\n    protected[this] def toCollection(repr: Repr): Traversable[A] = repr.asInstanceOf[Traversable[A]]\n\n    /** Creates a new builder for this collection type.\n     */\n    protected[this] def newBuilder: Builder[A, Repr]\n\n    protected[this] def parCombiner = ParIterable.newCombiner[A]\n\n    /** Applies a function `f` to all elements of this $coll.\n     *  \n     *    Note: this method underlies the implementation of most other bulk operations.\n     *    It's important to implement this method in an efficient way.\n     *  \n     *\n     *  @param  f   the function that is applied for its side-effect to every element.\n     *              The result of function `f` is discarded.\n     *              \n     *  @tparam  U  the type parameter describing the result of function `f`. \n     *              This result will always be ignored. Typically `U` is `Unit`,\n     *              but this is not necessary.\n     *\n     *  @usecase def foreach(f: A => Unit): Unit\n     */\n    def foreach[U](f: A => U): Unit\n\n    /** Tests whether this $coll is empty.\n     *\n     *  @return    `true` if the $coll contain no elements, `false` otherwise.\n     */\n    def isEmpty: Boolean = {\n      var result = true\n      breakable {\n        for (x <- this) {\n          result = false\n          break\n        }\n      }\n      result\n    }\n\n    /** Tests whether this $coll is known to have a finite size.\n     *  All strict collections are known to have finite size. For a non-strict collection\n     *  such as `Stream`, the predicate returns `true` if all elements have been computed.\n     *  It returns `false` if the stream is not yet evaluated to the end.\n     *\n     *  Note: many collection methods will not work on collections of infinite sizes. \n     *\n     *  @return  `true` if this collection is known to have finite size, `false` otherwise.\n     */\n    def hasDefiniteSize = true\n\n    def ++[B >: A, That](that: GenTraversableOnce[B])(implicit bf: CanBuildFrom[Repr, B, That]): That = {\n      val b = bf(repr)\n      if (that.isInstanceOf[IndexedSeqLike[_, _]]) b.sizeHint(this, that.seq.size)\n      b ++= thisCollection\n      b ++= that.seq\n      b.result\n    }\n\n    @bridge\n    def ++[B >: A, That](that: TraversableOnce[B])(implicit bf: CanBuildFrom[Repr, B, That]): That =\n      ++(that: GenTraversableOnce[B])(bf)\n\n    /** Concatenates this $coll with the elements of a traversable collection.\n     *  It differs from ++ in that the right operand determines the type of the\n     *  resulting collection rather than the left one.\n     * \n     *  @param that   the traversable to append.\n     *  @tparam B     the element type of the returned collection. \n     *  @tparam That  $thatinfo\n     *  @param bf     $bfinfo\n     *  @return       a new collection of type `That` which contains all elements\n     *                of this $coll followed by all elements of `that`.\n     * \n     *  @usecase def ++:[B](that: TraversableOnce[B]): $Coll[B]\n     *  \n     *  @return       a new $coll which contains all elements of this $coll\n     *                followed by all elements of `that`.\n     */\n    def ++:[B >: A, That](that: TraversableOnce[B])(implicit bf: CanBuildFrom[Repr, B, That]): That = {\n      val b = bf(repr)\n      if (that.isInstanceOf[IndexedSeqLike[_, _]]) b.sizeHint(this, that.size)\n      b ++= that\n      b ++= thisCollection\n      b.result\n    }\n\n    /** This overload exists because: for the implementation of ++: we should reuse\n     *  that of ++ because many collections override it with more efficient versions.\n     *  Since TraversableOnce has no '++' method, we have to implement that directly,\n     *  but Traversable and down can use the overload.\n     */\n    def ++:[B >: A, That](that: Traversable[B])(implicit bf: CanBuildFrom[Repr, B, That]): That =\n      (that ++ seq)(breakOut)\n\n    def map[B, That](f: A => B)(implicit bf: CanBuildFrom[Repr, B, That]): That = {\n      val b = bf(repr)\n      b.sizeHint(this) \n      for (x <- this) b += f(x)\n      b.result\n    }\n\n    def flatMap[B, That](f: A => GenTraversableOnce[B])(implicit bf: CanBuildFrom[Repr, B, That]): That = {\n      val b = bf(repr)\n      for (x <- this) b ++= f(x).seq\n      b.result\n    }\n\n    /** Selects all elements of this $coll which satisfy a predicate.\n     *\n     *  @param p     the predicate used to test elements.\n     *  @return      a new $coll consisting of all elements of this $coll that satisfy the given\n     *               predicate `p`. The order of the elements is preserved.\n     */\n    def filter(p: A => Boolean): Repr = {\n      val b = newBuilder\n      for (x <- this) \n        if (p(x)) b += x\n      b.result\n    }\n\n    /** Selects all elements of this $coll which do not satisfy a predicate.\n     *\n     *  @param p     the predicate used to test elements.\n     *  @return      a new $coll consisting of all elements of this $coll that do not satisfy the given\n     *               predicate `p`. The order of the elements is preserved.\n     */\n    def filterNot(p: A => Boolean): Repr = filter(!p(_))\n\n    def collect[B, That](pf: PartialFunction[A, B])(implicit bf: CanBuildFrom[Repr, B, That]): That = {\n      val b = bf(repr)\n      for (x <- this) if (pf.isDefinedAt(x)) b += pf(x)\n      b.result\n    }\n\n    /** Builds a new collection by applying an option-valued function to all\n     *  elements of this $coll on which the function is defined.\n     *\n     *  @param f      the option-valued function which filters and maps the $coll.\n     *  @tparam B     the element type of the returned collection.\n     *  @tparam That  $thatinfo\n     *  @param bf     $bfinfo\n     *  @return       a new collection of type `That` resulting from applying the option-valued function\n     *                `f` to each element and collecting all defined results.\n     *                The order of the elements is preserved.\n     *\n     *  @usecase def filterMap[B](f: A => Option[B]): $Coll[B]\n     *  \n     *  @param pf     the partial function which filters and maps the $coll.\n     *  @return       a new $coll resulting from applying the given option-valued function\n     *                `f` to each element and collecting all defined results.\n     *                The order of the elements is preserved.\n    def filterMap[B, That](f: A => Option[B])(implicit bf: CanBuildFrom[Repr, B, That]): That = {\n      val b = bf(repr)\n      for (x <- this) \n        f(x) match {\n          case Some(y) => b += y\n          case _ =>\n        }\n      b.result\n    }\n     */\n\n    /** Partitions this $coll in two ${coll}s according to a predicate.\n     *\n     *  @param p the predicate on which to partition.\n     *  @return  a pair of ${coll}s: the first $coll consists of all elements that \n     *           satisfy the predicate `p` and the second $coll consists of all elements\n     *           that don't. The relative order of the elements in the resulting ${coll}s\n     *           is the same as in the original $coll.\n     */\n    def partition(p: A => Boolean): (Repr, Repr) = {\n      val l, r = newBuilder\n      for (x <- this) (if (p(x)) l else r) += x\n      (l.result, r.result)\n    }\n\n    def groupBy[K](f: A => K): immutable.Map[K, Repr] = {\n      val m = mutable.Map.empty[K, Builder[A, Repr]]\n      for (elem <- this) {\n        val key = f(elem)\n        val bldr = m.getOrElseUpdate(key, newBuilder)\n        bldr += elem\n      }\n      val b = immutable.Map.newBuilder[K, Repr]\n      for ((k, v) <- m)\n        b += ((k, v.result))\n\n      b.result\n    }\n\n    /** Tests whether a predicate holds for all elements of this $coll.\n     *\n     *  $mayNotTerminateInf\n     *\n     *  @param   p     the predicate used to test elements.\n     *  @return        `true` if the given predicate `p` holds for all elements\n     *                 of this $coll, otherwise `false`.\n     */\n    def forall(p: A => Boolean): Boolean = {\n      var result = true\n      breakable {\n        for (x <- this)\n          if (!p(x)) { result = false; break }\n      }\n      result\n    }\n\n    /** Tests whether a predicate holds for some of the elements of this $coll.\n     *\n     *  $mayNotTerminateInf\n     *\n     *  @param   p     the predicate used to test elements.\n     *  @return        `true` if the given predicate `p` holds for some of the\n     *                 elements of this $coll, otherwise `false`.\n     */\n    def exists(p: A => Boolean): Boolean = {\n      var result = false\n      breakable {\n        for (x <- this)\n          if (p(x)) { result = true; break }\n      }\n      result\n    }\n\n    /** Finds the first element of the $coll satisfying a predicate, if any.\n     * \n     *  $mayNotTerminateInf\n     *  $orderDependent\n     *\n     *  @param p    the predicate used to test elements.\n     *  @return     an option value containing the first element in the $coll\n     *              that satisfies `p`, or `None` if none exists.\n     */\n    def find(p: A => Boolean): Option[A] = {\n      var result: Option[A] = None\n      breakable {\n        for (x <- this)\n          if (p(x)) { result = Some(x); break }\n      }\n      result\n    }\n\n    def scan[B >: A, That](z: B)(op: (B, B) => B)(implicit cbf: CanBuildFrom[Repr, B, That]): That = scanLeft(z)(op)\n\n    def scanLeft[B, That](z: B)(op: (B, A) => B)(implicit bf: CanBuildFrom[Repr, B, That]): That = {\n      val b = bf(repr)\n      b.sizeHint(this, 1)\n      var acc = z\n      b += acc\n      for (x <- this) { acc = op(acc, x); b += acc }\n      b.result\n    }\n\n    @migration(2, 9,\n      \"This scanRight definition has changed in 2.9.\\n\" +\n      \"The previous behavior can be reproduced with scanRight.reverse.\"\n    )\n    def scanRight[B, That](z: B)(op: (A, B) => B)(implicit bf: CanBuildFrom[Repr, B, That]): That = {\n      var scanned = List(z)\n      var acc = z\n      for (x <- reversed) {\n        acc = op(x, acc)\n        scanned ::= acc\n      }\n      val b = bf(repr)\n      for (elem <- scanned) b += elem\n      b.result\n    }\n\n    /** Selects the first element of this $coll.\n     *  $orderDependent\n     *  @return  the first element of this $coll.\n     *  @throws `NoSuchElementException` if the $coll is empty.\n     */\n    def head: A = {\n      var result: () => A = () => throw new NoSuchElementException\n      breakable {\n        for (x <- this) {\n          result = () => x\n          break\n        }\n      }\n      result()\n    }\n\n    /** Optionally selects the first element.\n     *  $orderDependent\n     *  @return  the first element of this $coll if it is nonempty, `None` if it is empty.\n     */\n    def headOption: Option[A] = if (isEmpty) None else Some(head)\n\n    /** Selects all elements except the first.\n     *  $orderDependent\n     *  @return  a $coll consisting of all elements of this $coll\n     *           except the first one.\n     *  @throws `UnsupportedOperationException` if the $coll is empty.\n     */ \n    override def tail: Repr = {\n      if (isEmpty) throw new UnsupportedOperationException(\"empty.tail\")\n      drop(1)\n    }\n\n    /** Selects the last element.\n      * $orderDependent\n      * @return The last element of this $coll.\n      * @throws NoSuchElementException If the $coll is empty.\n      */\n    def last: A = {\n      var lst = head\n      for (x <- this)\n        lst = x\n      lst\n    }\n\n    /** Optionally selects the last element.\n     *  $orderDependent\n     *  @return  the last element of this $coll$ if it is nonempty, `None` if it is empty.\n     */\n    def lastOption: Option[A] = if (isEmpty) None else Some(last)\n\n    /** Selects all elements except the last.\n     *  $orderDependent\n     *  @return  a $coll consisting of all elements of this $coll\n     *           except the last one.\n     *  @throws `UnsupportedOperationException` if the $coll is empty.\n     */\n    def init: Repr = {\n      if (isEmpty) throw new UnsupportedOperationException(\"empty.init\")\n      var lst = head\n      var follow = false\n      val b = newBuilder\n      b.sizeHint(this, -1)\n      for (x <- this.seq) {\n        if (follow) b += lst\n        else follow = true\n        lst = x\n      }\n      b.result\n    }\n\n    def take(n: Int): Repr = slice(0, n)\n\n    def drop(n: Int): Repr = \n      if (n <= 0) {\n        val b = newBuilder\n        b.sizeHint(this)\n        b ++= thisCollection result\n      }\n      else sliceWithKnownDelta(n, Int.MaxValue, -n)\n\n    def slice(from: Int, until: Int): Repr = sliceWithKnownBound(math.max(from, 0), until)\n\n    // Precondition: from >= 0, until > 0, builder already configured for building.\n    private[this] def sliceInternal(from: Int, until: Int, b: Builder[A, Repr]): Repr = {\n      var i = 0\n      breakable {\n        for (x <- this.seq) {\n          if (i >= from) b += x\n          i += 1\n          if (i >= until) break\n        }\n      }\n      b.result\n    }\n    // Precondition: from >= 0\n    private[scala] def sliceWithKnownDelta(from: Int, until: Int, delta: Int): Repr = {\n      val b = newBuilder\n      if (until <= from) b.result\n      else {\n        b.sizeHint(this, delta)\n        sliceInternal(from, until, b)\n      }\n    }\n    // Precondition: from >= 0\n    private[scala] def sliceWithKnownBound(from: Int, until: Int): Repr = {\n      val b = newBuilder\n      if (until <= from) b.result\n      else {\n        b.sizeHintBounded(until - from, this)      \n        sliceInternal(from, until, b)\n      }\n    }\n\n    def takeWhile(p: A => Boolean): Repr = {\n      val b = newBuilder\n      breakable {\n        for (x <- this) {\n          if (!p(x)) break\n          b += x\n        }\n      }\n      b.result\n    }\n\n    def dropWhile(p: A => Boolean): Repr = {\n      val b = newBuilder\n      var go = false\n      for (x <- this) {\n        if (!p(x)) go = true\n        if (go) b += x\n      }\n      b.result\n    }\n\n    def span(p: A => Boolean): (Repr, Repr) = {\n      val l, r = newBuilder\n      var toLeft = true\n      for (x <- this) {\n        toLeft = toLeft && p(x)\n        (if (toLeft) l else r) += x\n      }\n      (l.result, r.result)\n    }\n\n    def splitAt(n: Int): (Repr, Repr) = {\n      val l, r = newBuilder\n      l.sizeHintBounded(n, this)\n      if (n >= 0) r.sizeHint(this, -n)\n      var i = 0\n      for (x <- this) {\n        (if (i < n) l else r) += x\n        i += 1\n      }\n      (l.result, r.result)\n    }\n\n    /** Iterates over the tails of this $coll. The first value will be this\n     *  $coll and the final one will be an empty $coll, with the intervening\n     *  values the results of successive applications of `tail`.\n     *\n     *  @return   an iterator over all the tails of this $coll\n     *  @example  `List(1,2,3).tails = Iterator(List(1,2,3), List(2,3), List(3), Nil)`\n     */  \n    def tails: Iterator[Repr] = iterateUntilEmpty(_.tail)\n\n    /** Iterates over the inits of this $coll. The first value will be this\n     *  $coll and the final one will be an empty $coll, with the intervening\n     *  values the results of successive applications of `init`.\n     *\n     *  @return  an iterator over all the inits of this $coll\n     *  @example  `List(1,2,3).inits = Iterator(List(1,2,3), List(1,2), List(1), Nil)`\n     */\n    def inits: Iterator[Repr] = iterateUntilEmpty(_.init)\n\n    /** Copies elements of this $coll to an array.\n     *  Fills the given array `xs` with at most `len` elements of\n     *  this $coll, starting at position `start`.\n     *  Copying will stop once either the end of the current $coll is reached,\n     *  or the end of the array is reached, or `len` elements have been copied.\n     *\n     *  $willNotTerminateInf\n     * \n     *  @param  xs     the array to fill.\n     *  @param  start  the starting index.\n     *  @param  len    the maximal number of elements to copy.\n     *  @tparam B      the type of the elements of the array. \n     * \n     *\n     *  @usecase def copyToArray(xs: Array[A], start: Int, len: Int): Unit\n     */\n    def copyToArray[B >: A](xs: Array[B], start: Int, len: Int) {\n      var i = start\n      val end = (start + len) min xs.length\n      breakable {\n        for (x <- this) {\n          if (i >= end) break\n          xs(i) = x\n          i += 1\n        }\n      }\n    }\n\n    def toTraversable: Traversable[A] = thisCollection\n    def toIterator: Iterator[A] = toStream.iterator\n    def toStream: Stream[A] = toBuffer.toStream\n\n    /** Converts this $coll to a string.\n     *\n     *  @return   a string representation of this collection. By default this\n     *            string consists of the `stringPrefix` of this $coll,\n     *            followed by all elements separated by commas and enclosed in parentheses.\n     */\n    override def toString = mkString(stringPrefix + \"(\", \", \", \")\")\n\n    /** Defines the prefix of this object's `toString` representation.\n     *\n     *  @return  a string representation which starts the result of `toString`\n     *           applied to this $coll. By default the string prefix is the\n     *           simple name of the collection class $coll.\n     */\n    def stringPrefix : String = {\n      var string = repr.asInstanceOf[AnyRef].getClass.getName\n      val idx1 = string.lastIndexOf('.' : Int)\n      if (idx1 != -1) string = string.substring(idx1 + 1)\n      val idx2 = string.indexOf('$')\n      if (idx2 != -1) string = string.substring(0, idx2)\n      string\n    }\n\n    /** Creates a non-strict view of this $coll.\n     * \n     *  @return a non-strict view of this $coll.\n     */\n    def view = new TraversableView[A, Repr] {\n      protected lazy val underlying = self.repr\n      override def foreach[U](f: A => U) = self foreach f\n    }\n\n    /** Creates a non-strict view of a slice of this $coll.\n     *\n     *  Note: the difference between `view` and `slice` is that `view` produces\n     *        a view of the current $coll, whereas `slice` produces a new $coll.\n     * \n     *  Note: `view(from, to)` is equivalent to `view.slice(from, to)`\n     *  $orderDependent\n     * \n     *  @param from   the index of the first element of the view\n     *  @param until  the index of the element following the view\n     *  @return a non-strict view of a slice of this $coll, starting at index `from`\n     *  and extending up to (but not including) index `until`.\n     */\n    def view(from: Int, until: Int): TraversableView[A, Repr] = view.slice(from, until)\n\n    /** Creates a non-strict filter of this $coll.\n     *\n     *  Note: the difference between `c filter p` and `c withFilter p` is that\n     *        the former creates a new collection, whereas the latter only\n     *        restricts the domain of subsequent `map`, `flatMap`, `foreach`,\n     *        and `withFilter` operations.\n     *  $orderDependent\n     * \n     *  @param p   the predicate used to test elements.\n     *  @return    an object of class `WithFilter`, which supports\n     *             `map`, `flatMap`, `foreach`, and `withFilter` operations.\n     *             All these operations apply to those elements of this $coll which\n     *             satisfy the predicate `p`.\n     */\n    def withFilter(p: A => Boolean): FilterMonadic[A, Repr] = new WithFilter(p)\n\n    /** A class supporting filtered operations. Instances of this class are\n     *  returned by method `withFilter`.\n     */\n    class WithFilter(p: A => Boolean) extends FilterMonadic[A, Repr] {\n\n      /** Builds a new collection by applying a function to all elements of the\n       *  outer $coll containing this `WithFilter` instance that satisfy predicate `p`.\n       *\n       *  @param f      the function to apply to each element.\n       *  @tparam B     the element type of the returned collection.\n       *  @tparam That  $thatinfo\n       *  @param bf     $bfinfo\n       *  @return       a new collection of type `That` resulting from applying\n       *                the given function `f` to each element of the outer $coll\n       *                that satisfies predicate `p` and collecting the results.\n       *\n       *  @usecase def map[B](f: A => B): $Coll[B] \n       *  \n       *  @return       a new $coll resulting from applying the given function\n       *                `f` to each element of the outer $coll that satisfies\n       *                predicate `p` and collecting the results.\n       */\n      def map[B, That](f: A => B)(implicit bf: CanBuildFrom[Repr, B, That]): That = {\n        val b = bf(repr)\n        for (x <- self) \n          if (p(x)) b += f(x)\n        b.result\n      }\n\n      /** Builds a new collection by applying a function to all elements of the\n       *  outer $coll containing this `WithFilter` instance that satisfy\n       *  predicate `p` and concatenating the results. \n       *\n       *  @param f      the function to apply to each element.\n       *  @tparam B     the element type of the returned collection.\n       *  @tparam That  $thatinfo\n       *  @param bf     $bfinfo\n       *  @return       a new collection of type `That` resulting from applying\n       *                the given collection-valued function `f` to each element\n       *                of the outer $coll that satisfies predicate `p` and\n       *                concatenating the results.\n       *\n       *  @usecase def flatMap[B](f: A => TraversableOnce[B]): $Coll[B]\n       * \n       *  @return       a new $coll resulting from applying the given collection-valued function\n       *                `f` to each element of the outer $coll that satisfies predicate `p` and concatenating the results.\n       */\n      def flatMap[B, That](f: A => GenTraversableOnce[B])(implicit bf: CanBuildFrom[Repr, B, That]): That = {\n        val b = bf(repr)\n        for (x <- self) \n          if (p(x)) b ++= f(x).seq\n        b.result\n      }\n\n      /** Applies a function `f` to all elements of the outer $coll containing\n       *  this `WithFilter` instance that satisfy predicate `p`.\n       *\n       *  @param  f   the function that is applied for its side-effect to every element.\n       *              The result of function `f` is discarded.\n       *              \n       *  @tparam  U  the type parameter describing the result of function `f`. \n       *              This result will always be ignored. Typically `U` is `Unit`,\n       *              but this is not necessary.\n       *\n       *  @usecase def foreach(f: A => Unit): Unit\n       */   \n      def foreach[U](f: A => U): Unit = \n        for (x <- self) \n          if (p(x)) f(x)\n\n      /** Further refines the filter for this $coll.\n       *\n       *  @param q   the predicate used to test elements.\n       *  @return    an object of class `WithFilter`, which supports\n       *             `map`, `flatMap`, `foreach`, and `withFilter` operations.\n       *             All these operations apply to those elements of this $coll which\n       *             satisfy the predicate `q` in addition to the predicate `p`.\n       */\n      def withFilter(q: A => Boolean): WithFilter = \n        new WithFilter(x => p(x) && q(x))\n    }\n\n    // A helper for tails and inits.\n    private def iterateUntilEmpty(f: Traversable[A @uV] => Traversable[A @uV]): Iterator[Repr] = {\n      val it = Iterator.iterate(thisCollection)(f) takeWhile (x => !x.isEmpty)\n      it ++ Iterator(Nil) map (newBuilder ++= _ result)\n    }\n  }\n\n\n</textarea>\n</form>\n\n    <script>\n      var editor = CodeMirror.fromTextArea(document.getElementById(\"code\"), {\n        lineNumbers: true,\n        matchBrackets: true,\n        theme: \"ambiance\",\n        mode: \"text/x-scala\"\n      });\n    </script>\n  </article>\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/clojure/clojure.js",
    "content": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n/**\n * Author: Hans Engel\n * Branched from CodeMirror's Scheme mode (by Koh Zi Han, based on implementation by Koh Zi Chun)\n */\n\n(function(mod) {\n  if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n    mod(require(\"../../lib/codemirror\"));\n  else if (typeof define == \"function\" && define.amd) // AMD\n    define([\"../../lib/codemirror\"], mod);\n  else // Plain browser env\n    mod(CodeMirror);\n})(function(CodeMirror) {\n\"use strict\";\n\nCodeMirror.defineMode(\"clojure\", function (options) {\n    var BUILTIN = \"builtin\", COMMENT = \"comment\", STRING = \"string\", CHARACTER = \"string-2\",\n        ATOM = \"atom\", NUMBER = \"number\", BRACKET = \"bracket\", KEYWORD = \"keyword\", VAR = \"variable\";\n    var INDENT_WORD_SKIP = options.indentUnit || 2;\n    var NORMAL_INDENT_UNIT = options.indentUnit || 2;\n\n    function makeKeywords(str) {\n        var obj = {}, words = str.split(\" \");\n        for (var i = 0; i < words.length; ++i) obj[words[i]] = true;\n        return obj;\n    }\n\n    var atoms = makeKeywords(\"true false nil\");\n\n    var keywords = makeKeywords(\n      \"defn defn- def def- defonce defmulti defmethod defmacro defstruct deftype defprotocol defrecord defproject deftest slice defalias defhinted defmacro- defn-memo defnk defnk defonce- defunbound defunbound- defvar defvar- let letfn do case cond condp for loop recur when when-not when-let when-first if if-let if-not . .. -> ->> doto and or dosync doseq dotimes dorun doall load import unimport ns in-ns refer try catch finally throw with-open with-local-vars binding gen-class gen-and-load-class gen-and-save-class handler-case handle\");\n\n    var builtins = makeKeywords(\n        \"* *' *1 *2 *3 *agent* *allow-unresolved-vars* *assert* *clojure-version* *command-line-args* *compile-files* *compile-path* *compiler-options* *data-readers* *e *err* *file* *flush-on-newline* *fn-loader* *in* *math-context* *ns* *out* *print-dup* *print-length* *print-level* *print-meta* *print-readably* *read-eval* *source-path* *unchecked-math* *use-context-classloader* *verbose-defrecords* *warn-on-reflection* + +' - -' -> ->> ->ArrayChunk ->Vec ->VecNode ->VecSeq -cache-protocol-fn -reset-methods .. / < <= = == > >= EMPTY-NODE accessor aclone add-classpath add-watch agent agent-error agent-errors aget alength alias all-ns alter alter-meta! alter-var-root amap ancestors and apply areduce array-map aset aset-boolean aset-byte aset-char aset-double aset-float aset-int aset-long aset-short assert assoc assoc! assoc-in associative? atom await await-for await1 bases bean bigdec bigint biginteger binding bit-and bit-and-not bit-clear bit-flip bit-not bit-or bit-set bit-shift-left bit-shift-right bit-test bit-xor boolean boolean-array booleans bound-fn bound-fn* bound? butlast byte byte-array bytes case cast char char-array char-escape-string char-name-string char? chars chunk chunk-append chunk-buffer chunk-cons chunk-first chunk-next chunk-rest chunked-seq? class class? clear-agent-errors clojure-version coll? comment commute comp comparator compare compare-and-set! compile complement concat cond condp conj conj! cons constantly construct-proxy contains? count counted? create-ns create-struct cycle dec dec' decimal? declare default-data-readers definline definterface defmacro defmethod defmulti defn defn- defonce defprotocol defrecord defstruct deftype delay delay? deliver denominator deref derive descendants destructure disj disj! dissoc dissoc! distinct distinct? doall dorun doseq dosync dotimes doto double double-array doubles drop drop-last drop-while empty empty? ensure enumeration-seq error-handler error-mode eval even? every-pred every? ex-data ex-info extend extend-protocol extend-type extenders extends? false? ffirst file-seq filter filterv find find-keyword find-ns find-protocol-impl find-protocol-method find-var first flatten float float-array float? floats flush fn fn? fnext fnil for force format frequencies future future-call future-cancel future-cancelled? future-done? future? gen-class gen-interface gensym get get-in get-method get-proxy-class get-thread-bindings get-validator group-by hash hash-combine hash-map hash-set identical? identity if-let if-not ifn? import in-ns inc inc' init-proxy instance? int int-array integer? interleave intern interpose into into-array ints io! isa? iterate iterator-seq juxt keep keep-indexed key keys keyword keyword? last lazy-cat lazy-seq let letfn line-seq list list* list? load load-file load-reader load-string loaded-libs locking long long-array longs loop macroexpand macroexpand-1 make-array make-hierarchy map map-indexed map? mapcat mapv max max-key memfn memoize merge merge-with meta method-sig methods min min-key mod munge name namespace namespace-munge neg? newline next nfirst nil? nnext not not-any? not-empty not-every? not= ns ns-aliases ns-imports ns-interns ns-map ns-name ns-publics ns-refers ns-resolve ns-unalias ns-unmap nth nthnext nthrest num number? numerator object-array odd? or parents partial partition partition-all partition-by pcalls peek persistent! pmap pop pop! pop-thread-bindings pos? pr pr-str prefer-method prefers primitives-classnames print print-ctor print-dup print-method print-simple print-str printf println println-str prn prn-str promise proxy proxy-call-with-super proxy-mappings proxy-name proxy-super push-thread-bindings pvalues quot rand rand-int rand-nth range ratio? rational? rationalize re-find re-groups re-matcher re-matches re-pattern re-seq read read-line read-string realized? reduce reduce-kv reductions ref ref-history-count ref-max-history ref-min-history ref-set refer refer-clojure reify release-pending-sends rem remove remove-all-methods remove-method remove-ns remove-watch repeat repeatedly replace replicate require reset! reset-meta! resolve rest restart-agent resultset-seq reverse reversible? rseq rsubseq satisfies? second select-keys send send-off seq seq? seque sequence sequential? set set-error-handler! set-error-mode! set-validator! set? short short-array shorts shuffle shutdown-agents slurp some some-fn sort sort-by sorted-map sorted-map-by sorted-set sorted-set-by sorted? special-symbol? spit split-at split-with str string? struct struct-map subs subseq subvec supers swap! symbol symbol? sync take take-last take-nth take-while test the-ns thread-bound? time to-array to-array-2d trampoline transient tree-seq true? type unchecked-add unchecked-add-int unchecked-byte unchecked-char unchecked-dec unchecked-dec-int unchecked-divide-int unchecked-double unchecked-float unchecked-inc unchecked-inc-int unchecked-int unchecked-long unchecked-multiply unchecked-multiply-int unchecked-negate unchecked-negate-int unchecked-remainder-int unchecked-short unchecked-subtract unchecked-subtract-int underive unquote unquote-splicing update-in update-proxy use val vals var-get var-set var? vary-meta vec vector vector-of vector? when when-first when-let when-not while with-bindings with-bindings* with-in-str with-loading-context with-local-vars with-meta with-open with-out-str with-precision with-redefs with-redefs-fn xml-seq zero? zipmap *default-data-reader-fn* as-> cond-> cond->> reduced reduced? send-via set-agent-send-executor! set-agent-send-off-executor! some-> some->>\");\n\n    var indentKeys = makeKeywords(\n        // Built-ins\n        \"ns fn def defn defmethod bound-fn if if-not case condp when while when-not when-first do future comment doto locking proxy with-open with-precision reify deftype defrecord defprotocol extend extend-protocol extend-type try catch \" +\n\n        // Binding forms\n        \"let letfn binding loop for doseq dotimes when-let if-let \" +\n\n        // Data structures\n        \"defstruct struct-map assoc \" +\n\n        // clojure.test\n        \"testing deftest \" +\n\n        // contrib\n        \"handler-case handle dotrace deftrace\");\n\n    var tests = {\n        digit: /\\d/,\n        digit_or_colon: /[\\d:]/,\n        hex: /[0-9a-f]/i,\n        sign: /[+-]/,\n        exponent: /e/i,\n        keyword_char: /[^\\s\\(\\[\\;\\)\\]]/,\n        symbol: /[\\w*+!\\-\\._?:<>\\/\\xa1-\\uffff]/\n    };\n\n    function stateStack(indent, type, prev) { // represents a state stack object\n        this.indent = indent;\n        this.type = type;\n        this.prev = prev;\n    }\n\n    function pushStack(state, indent, type) {\n        state.indentStack = new stateStack(indent, type, state.indentStack);\n    }\n\n    function popStack(state) {\n        state.indentStack = state.indentStack.prev;\n    }\n\n    function isNumber(ch, stream){\n        // hex\n        if ( ch === '0' && stream.eat(/x/i) ) {\n            stream.eatWhile(tests.hex);\n            return true;\n        }\n\n        // leading sign\n        if ( ( ch == '+' || ch == '-' ) && ( tests.digit.test(stream.peek()) ) ) {\n          stream.eat(tests.sign);\n          ch = stream.next();\n        }\n\n        if ( tests.digit.test(ch) ) {\n            stream.eat(ch);\n            stream.eatWhile(tests.digit);\n\n            if ( '.' == stream.peek() ) {\n                stream.eat('.');\n                stream.eatWhile(tests.digit);\n            }\n\n            if ( stream.eat(tests.exponent) ) {\n                stream.eat(tests.sign);\n                stream.eatWhile(tests.digit);\n            }\n\n            return true;\n        }\n\n        return false;\n    }\n\n    // Eat character that starts after backslash \\\n    function eatCharacter(stream) {\n        var first = stream.next();\n        // Read special literals: backspace, newline, space, return.\n        // Just read all lowercase letters.\n        if (first && first.match(/[a-z]/) && stream.match(/[a-z]+/, true)) {\n            return;\n        }\n        // Read unicode character: \\u1000 \\uA0a1\n        if (first === \"u\") {\n            stream.match(/[0-9a-z]{4}/i, true);\n        }\n    }\n\n    return {\n        startState: function () {\n            return {\n                indentStack: null,\n                indentation: 0,\n                mode: false\n            };\n        },\n\n        token: function (stream, state) {\n            if (state.indentStack == null && stream.sol()) {\n                // update indentation, but only if indentStack is empty\n                state.indentation = stream.indentation();\n            }\n\n            // skip spaces\n            if (stream.eatSpace()) {\n                return null;\n            }\n            var returnType = null;\n\n            switch(state.mode){\n                case \"string\": // multi-line string parsing mode\n                    var next, escaped = false;\n                    while ((next = stream.next()) != null) {\n                        if (next == \"\\\"\" && !escaped) {\n\n                            state.mode = false;\n                            break;\n                        }\n                        escaped = !escaped && next == \"\\\\\";\n                    }\n                    returnType = STRING; // continue on in string mode\n                    break;\n                default: // default parsing mode\n                    var ch = stream.next();\n\n                    if (ch == \"\\\"\") {\n                        state.mode = \"string\";\n                        returnType = STRING;\n                    } else if (ch == \"\\\\\") {\n                        eatCharacter(stream);\n                        returnType = CHARACTER;\n                    } else if (ch == \"'\" && !( tests.digit_or_colon.test(stream.peek()) )) {\n                        returnType = ATOM;\n                    } else if (ch == \";\") { // comment\n                        stream.skipToEnd(); // rest of the line is a comment\n                        returnType = COMMENT;\n                    } else if (isNumber(ch,stream)){\n                        returnType = NUMBER;\n                    } else if (ch == \"(\" || ch == \"[\" || ch == \"{\" ) {\n                        var keyWord = '', indentTemp = stream.column(), letter;\n                        /**\n                        Either\n                        (indent-word ..\n                        (non-indent-word ..\n                        (;something else, bracket, etc.\n                        */\n\n                        if (ch == \"(\") while ((letter = stream.eat(tests.keyword_char)) != null) {\n                            keyWord += letter;\n                        }\n\n                        if (keyWord.length > 0 && (indentKeys.propertyIsEnumerable(keyWord) ||\n                                                   /^(?:def|with)/.test(keyWord))) { // indent-word\n                            pushStack(state, indentTemp + INDENT_WORD_SKIP, ch);\n                        } else { // non-indent word\n                            // we continue eating the spaces\n                            stream.eatSpace();\n                            if (stream.eol() || stream.peek() == \";\") {\n                                // nothing significant after\n                                // we restart indentation the user defined spaces after\n                                pushStack(state, indentTemp + NORMAL_INDENT_UNIT, ch);\n                            } else {\n                                pushStack(state, indentTemp + stream.current().length, ch); // else we match\n                            }\n                        }\n                        stream.backUp(stream.current().length - 1); // undo all the eating\n\n                        returnType = BRACKET;\n                    } else if (ch == \")\" || ch == \"]\" || ch == \"}\") {\n                        returnType = BRACKET;\n                        if (state.indentStack != null && state.indentStack.type == (ch == \")\" ? \"(\" : (ch == \"]\" ? \"[\" :\"{\"))) {\n                            popStack(state);\n                        }\n                    } else if ( ch == \":\" ) {\n                        stream.eatWhile(tests.symbol);\n                        return ATOM;\n                    } else {\n                        stream.eatWhile(tests.symbol);\n\n                        if (keywords && keywords.propertyIsEnumerable(stream.current())) {\n                            returnType = KEYWORD;\n                        } else if (builtins && builtins.propertyIsEnumerable(stream.current())) {\n                            returnType = BUILTIN;\n                        } else if (atoms && atoms.propertyIsEnumerable(stream.current())) {\n                            returnType = ATOM;\n                        } else {\n                          returnType = VAR;\n                        }\n                    }\n            }\n\n            return returnType;\n        },\n\n        indent: function (state) {\n            if (state.indentStack == null) return state.indentation;\n            return state.indentStack.indent;\n        },\n\n        lineComment: \";;\"\n    };\n});\n\nCodeMirror.defineMIME(\"text/x-clojure\", \"clojure\");\n\n});\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/clojure/index.html",
    "content": "<!doctype html>\n\n<title>CodeMirror: Clojure mode</title>\n<meta charset=\"utf-8\"/>\n<link rel=stylesheet href=\"../../doc/docs.css\">\n\n<link rel=\"stylesheet\" href=\"../../lib/codemirror.css\">\n<script src=\"../../lib/codemirror.js\"></script>\n<script src=\"clojure.js\"></script>\n<style>.CodeMirror {background: #f8f8f8;}</style>\n<div id=nav>\n  <a href=\"http://codemirror.net\"><h1>CodeMirror</h1><img id=logo src=\"../../doc/logo.png\"></a>\n\n  <ul>\n    <li><a href=\"../../index.html\">Home</a>\n    <li><a href=\"../../doc/manual.html\">Manual</a>\n    <li><a href=\"https://github.com/codemirror/codemirror\">Code</a>\n  </ul>\n  <ul>\n    <li><a href=\"../index.html\">Language modes</a>\n    <li><a class=active href=\"#\">Clojure</a>\n  </ul>\n</div>\n\n<article>\n<h2>Clojure mode</h2>\n<form><textarea id=\"code\" name=\"code\">\n; Conway's Game of Life, based on the work of:\n;; Laurent Petit https://gist.github.com/1200343\n;; Christophe Grand http://clj-me.cgrand.net/2011/08/19/conways-game-of-life\n\n(ns ^{:doc \"Conway's Game of Life.\"}\n game-of-life)\n\n;; Core game of life's algorithm functions\n\n(defn neighbours\n  \"Given a cell's coordinates, returns the coordinates of its neighbours.\"\n  [[x y]]\n  (for [dx [-1 0 1] dy (if (zero? dx) [-1 1] [-1 0 1])]\n    [(+ dx x) (+ dy y)]))\n\n(defn step\n  \"Given a set of living cells, computes the new set of living cells.\"\n  [cells]\n  (set (for [[cell n] (frequencies (mapcat neighbours cells))\n             :when (or (= n 3) (and (= n 2) (cells cell)))]\n         cell)))\n\n;; Utility methods for displaying game on a text terminal\n\n(defn print-board\n  \"Prints a board on *out*, representing a step in the game.\"\n  [board w h]\n  (doseq [x (range (inc w)) y (range (inc h))]\n    (if (= y 0) (print \"\\n\"))\n    (print (if (board [x y]) \"[X]\" \" . \"))))\n\n(defn display-grids\n  \"Prints a squence of boards on *out*, representing several steps.\"\n  [grids w h]\n  (doseq [board grids]\n    (print-board board w h)\n    (print \"\\n\")))\n\n;; Launches an example board\n\n(def\n  ^{:doc \"board represents the initial set of living cells\"}\n   board #{[2 1] [2 2] [2 3]})\n\n(display-grids (take 3 (iterate step board)) 5 5)\n\n;; Let's play with characters\n(println \\1 \\a \\# \\\\\n         \\\" \\( \\newline\n         \\} \\\" \\space\n         \\tab \\return \\backspace\n         \\u1000 \\uAaAa \\u9F9F)\n\n</textarea></form>\n    <script>\n      var editor = CodeMirror.fromTextArea(document.getElementById(\"code\"), {});\n    </script>\n\n    <p><strong>MIME types defined:</strong> <code>text/x-clojure</code>.</p>\n\n  </article>\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/cobol/cobol.js",
    "content": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n/**\n * Author: Gautam Mehta\n * Branched from CodeMirror's Scheme mode\n */\n(function(mod) {\n  if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n    mod(require(\"../../lib/codemirror\"));\n  else if (typeof define == \"function\" && define.amd) // AMD\n    define([\"../../lib/codemirror\"], mod);\n  else // Plain browser env\n    mod(CodeMirror);\n})(function(CodeMirror) {\n\"use strict\";\n\nCodeMirror.defineMode(\"cobol\", function () {\n  var BUILTIN = \"builtin\", COMMENT = \"comment\", STRING = \"string\",\n      ATOM = \"atom\", NUMBER = \"number\", KEYWORD = \"keyword\", MODTAG = \"header\",\n      COBOLLINENUM = \"def\", PERIOD = \"link\";\n  function makeKeywords(str) {\n    var obj = {}, words = str.split(\" \");\n    for (var i = 0; i < words.length; ++i) obj[words[i]] = true;\n    return obj;\n  }\n  var atoms = makeKeywords(\"TRUE FALSE ZEROES ZEROS ZERO SPACES SPACE LOW-VALUE LOW-VALUES \");\n  var keywords = makeKeywords(\n      \"ACCEPT ACCESS ACQUIRE ADD ADDRESS \" +\n      \"ADVANCING AFTER ALIAS ALL ALPHABET \" +\n      \"ALPHABETIC ALPHABETIC-LOWER ALPHABETIC-UPPER ALPHANUMERIC ALPHANUMERIC-EDITED \" +\n      \"ALSO ALTER ALTERNATE AND ANY \" +\n      \"ARE AREA AREAS ARITHMETIC ASCENDING \" +\n      \"ASSIGN AT ATTRIBUTE AUTHOR AUTO \" +\n      \"AUTO-SKIP AUTOMATIC B-AND B-EXOR B-LESS \" +\n      \"B-NOT B-OR BACKGROUND-COLOR BACKGROUND-COLOUR BEEP \" +\n      \"BEFORE BELL BINARY BIT BITS \" +\n      \"BLANK BLINK BLOCK BOOLEAN BOTTOM \" +\n      \"BY CALL CANCEL CD CF \" +\n      \"CH CHARACTER CHARACTERS CLASS CLOCK-UNITS \" +\n      \"CLOSE COBOL CODE CODE-SET COL \" +\n      \"COLLATING COLUMN COMMA COMMIT COMMITMENT \" +\n      \"COMMON COMMUNICATION COMP COMP-0 COMP-1 \" +\n      \"COMP-2 COMP-3 COMP-4 COMP-5 COMP-6 \" +\n      \"COMP-7 COMP-8 COMP-9 COMPUTATIONAL COMPUTATIONAL-0 \" +\n      \"COMPUTATIONAL-1 COMPUTATIONAL-2 COMPUTATIONAL-3 COMPUTATIONAL-4 COMPUTATIONAL-5 \" +\n      \"COMPUTATIONAL-6 COMPUTATIONAL-7 COMPUTATIONAL-8 COMPUTATIONAL-9 COMPUTE \" +\n      \"CONFIGURATION CONNECT CONSOLE CONTAINED CONTAINS \" +\n      \"CONTENT CONTINUE CONTROL CONTROL-AREA CONTROLS \" +\n      \"CONVERTING COPY CORR CORRESPONDING COUNT \" +\n      \"CRT CRT-UNDER CURRENCY CURRENT CURSOR \" +\n      \"DATA DATE DATE-COMPILED DATE-WRITTEN DAY \" +\n      \"DAY-OF-WEEK DB DB-ACCESS-CONTROL-KEY DB-DATA-NAME DB-EXCEPTION \" +\n      \"DB-FORMAT-NAME DB-RECORD-NAME DB-SET-NAME DB-STATUS DBCS \" +\n      \"DBCS-EDITED DE DEBUG-CONTENTS DEBUG-ITEM DEBUG-LINE \" +\n      \"DEBUG-NAME DEBUG-SUB-1 DEBUG-SUB-2 DEBUG-SUB-3 DEBUGGING \" +\n      \"DECIMAL-POINT DECLARATIVES DEFAULT DELETE DELIMITED \" +\n      \"DELIMITER DEPENDING DESCENDING DESCRIBED DESTINATION \" +\n      \"DETAIL DISABLE DISCONNECT DISPLAY DISPLAY-1 \" +\n      \"DISPLAY-2 DISPLAY-3 DISPLAY-4 DISPLAY-5 DISPLAY-6 \" +\n      \"DISPLAY-7 DISPLAY-8 DISPLAY-9 DIVIDE DIVISION \" +\n      \"DOWN DROP DUPLICATE DUPLICATES DYNAMIC \" +\n      \"EBCDIC EGI EJECT ELSE EMI \" +\n      \"EMPTY EMPTY-CHECK ENABLE END END. END-ACCEPT END-ACCEPT. \" +\n      \"END-ADD END-CALL END-COMPUTE END-DELETE END-DISPLAY \" +\n      \"END-DIVIDE END-EVALUATE END-IF END-INVOKE END-MULTIPLY \" +\n      \"END-OF-PAGE END-PERFORM END-READ END-RECEIVE END-RETURN \" +\n      \"END-REWRITE END-SEARCH END-START END-STRING END-SUBTRACT \" +\n      \"END-UNSTRING END-WRITE END-XML ENTER ENTRY \" +\n      \"ENVIRONMENT EOP EQUAL EQUALS ERASE \" +\n      \"ERROR ESI EVALUATE EVERY EXCEEDS \" +\n      \"EXCEPTION EXCLUSIVE EXIT EXTEND EXTERNAL \" +\n      \"EXTERNALLY-DESCRIBED-KEY FD FETCH FILE FILE-CONTROL \" +\n      \"FILE-STREAM FILES FILLER FINAL FIND \" +\n      \"FINISH FIRST FOOTING FOR FOREGROUND-COLOR \" +\n      \"FOREGROUND-COLOUR FORMAT FREE FROM FULL \" +\n      \"FUNCTION GENERATE GET GIVING GLOBAL \" +\n      \"GO GOBACK GREATER GROUP HEADING \" +\n      \"HIGH-VALUE HIGH-VALUES HIGHLIGHT I-O I-O-CONTROL \" +\n      \"ID IDENTIFICATION IF IN INDEX \" +\n      \"INDEX-1 INDEX-2 INDEX-3 INDEX-4 INDEX-5 \" +\n      \"INDEX-6 INDEX-7 INDEX-8 INDEX-9 INDEXED \" +\n      \"INDIC INDICATE INDICATOR INDICATORS INITIAL \" +\n      \"INITIALIZE INITIATE INPUT INPUT-OUTPUT INSPECT \" +\n      \"INSTALLATION INTO INVALID INVOKE IS \" +\n      \"JUST JUSTIFIED KANJI KEEP KEY \" +\n      \"LABEL LAST LD LEADING LEFT \" +\n      \"LEFT-JUSTIFY LENGTH LENGTH-CHECK LESS LIBRARY \" +\n      \"LIKE LIMIT LIMITS LINAGE LINAGE-COUNTER \" +\n      \"LINE LINE-COUNTER LINES LINKAGE LOCAL-STORAGE \" +\n      \"LOCALE LOCALLY LOCK \" +\n      \"MEMBER MEMORY MERGE MESSAGE METACLASS \" +\n      \"MODE MODIFIED MODIFY MODULES MOVE \" +\n      \"MULTIPLE MULTIPLY NATIONAL NATIVE NEGATIVE \" +\n      \"NEXT NO NO-ECHO NONE NOT \" +\n      \"NULL NULL-KEY-MAP NULL-MAP NULLS NUMBER \" +\n      \"NUMERIC NUMERIC-EDITED OBJECT OBJECT-COMPUTER OCCURS \" +\n      \"OF OFF OMITTED ON ONLY \" +\n      \"OPEN OPTIONAL OR ORDER ORGANIZATION \" +\n      \"OTHER OUTPUT OVERFLOW OWNER PACKED-DECIMAL \" +\n      \"PADDING PAGE PAGE-COUNTER PARSE PERFORM \" +\n      \"PF PH PIC PICTURE PLUS \" +\n      \"POINTER POSITION POSITIVE PREFIX PRESENT \" +\n      \"PRINTING PRIOR PROCEDURE PROCEDURE-POINTER PROCEDURES \" +\n      \"PROCEED PROCESS PROCESSING PROGRAM PROGRAM-ID \" +\n      \"PROMPT PROTECTED PURGE QUEUE QUOTE \" +\n      \"QUOTES RANDOM RD READ READY \" +\n      \"REALM RECEIVE RECONNECT RECORD RECORD-NAME \" +\n      \"RECORDS RECURSIVE REDEFINES REEL REFERENCE \" +\n      \"REFERENCE-MONITOR REFERENCES RELATION RELATIVE RELEASE \" +\n      \"REMAINDER REMOVAL RENAMES REPEATED REPLACE \" +\n      \"REPLACING REPORT REPORTING REPORTS REPOSITORY \" +\n      \"REQUIRED RERUN RESERVE RESET RETAINING \" +\n      \"RETRIEVAL RETURN RETURN-CODE RETURNING REVERSE-VIDEO \" +\n      \"REVERSED REWIND REWRITE RF RH \" +\n      \"RIGHT RIGHT-JUSTIFY ROLLBACK ROLLING ROUNDED \" +\n      \"RUN SAME SCREEN SD SEARCH \" +\n      \"SECTION SECURE SECURITY SEGMENT SEGMENT-LIMIT \" +\n      \"SELECT SEND SENTENCE SEPARATE SEQUENCE \" +\n      \"SEQUENTIAL SET SHARED SIGN SIZE \" +\n      \"SKIP1 SKIP2 SKIP3 SORT SORT-MERGE \" +\n      \"SORT-RETURN SOURCE SOURCE-COMPUTER SPACE-FILL \" +\n      \"SPECIAL-NAMES STANDARD STANDARD-1 STANDARD-2 \" +\n      \"START STARTING STATUS STOP STORE \" +\n      \"STRING SUB-QUEUE-1 SUB-QUEUE-2 SUB-QUEUE-3 SUB-SCHEMA \" +\n      \"SUBFILE SUBSTITUTE SUBTRACT SUM SUPPRESS \" +\n      \"SYMBOLIC SYNC SYNCHRONIZED SYSIN SYSOUT \" +\n      \"TABLE TALLYING TAPE TENANT TERMINAL \" +\n      \"TERMINATE TEST TEXT THAN THEN \" +\n      \"THROUGH THRU TIME TIMES TITLE \" +\n      \"TO TOP TRAILING TRAILING-SIGN TRANSACTION \" +\n      \"TYPE TYPEDEF UNDERLINE UNEQUAL UNIT \" +\n      \"UNSTRING UNTIL UP UPDATE UPON \" +\n      \"USAGE USAGE-MODE USE USING VALID \" +\n      \"VALIDATE VALUE VALUES VARYING VLR \" +\n      \"WAIT WHEN WHEN-COMPILED WITH WITHIN \" +\n      \"WORDS WORKING-STORAGE WRITE XML XML-CODE \" +\n      \"XML-EVENT XML-NTEXT XML-TEXT ZERO ZERO-FILL \" );\n\n  var builtins = makeKeywords(\"- * ** / + < <= = > >= \");\n  var tests = {\n    digit: /\\d/,\n    digit_or_colon: /[\\d:]/,\n    hex: /[0-9a-f]/i,\n    sign: /[+-]/,\n    exponent: /e/i,\n    keyword_char: /[^\\s\\(\\[\\;\\)\\]]/,\n    symbol: /[\\w*+\\-]/\n  };\n  function isNumber(ch, stream){\n    // hex\n    if ( ch === '0' && stream.eat(/x/i) ) {\n      stream.eatWhile(tests.hex);\n      return true;\n    }\n    // leading sign\n    if ( ( ch == '+' || ch == '-' ) && ( tests.digit.test(stream.peek()) ) ) {\n      stream.eat(tests.sign);\n      ch = stream.next();\n    }\n    if ( tests.digit.test(ch) ) {\n      stream.eat(ch);\n      stream.eatWhile(tests.digit);\n      if ( '.' == stream.peek()) {\n        stream.eat('.');\n        stream.eatWhile(tests.digit);\n      }\n      if ( stream.eat(tests.exponent) ) {\n        stream.eat(tests.sign);\n        stream.eatWhile(tests.digit);\n      }\n      return true;\n    }\n    return false;\n  }\n  return {\n    startState: function () {\n      return {\n        indentStack: null,\n        indentation: 0,\n        mode: false\n      };\n    },\n    token: function (stream, state) {\n      if (state.indentStack == null && stream.sol()) {\n        // update indentation, but only if indentStack is empty\n        state.indentation = 6 ; //stream.indentation();\n      }\n      // skip spaces\n      if (stream.eatSpace()) {\n        return null;\n      }\n      var returnType = null;\n      switch(state.mode){\n      case \"string\": // multi-line string parsing mode\n        var next = false;\n        while ((next = stream.next()) != null) {\n          if (next == \"\\\"\" || next == \"\\'\") {\n            state.mode = false;\n            break;\n          }\n        }\n        returnType = STRING; // continue on in string mode\n        break;\n      default: // default parsing mode\n        var ch = stream.next();\n        var col = stream.column();\n        if (col >= 0 && col <= 5) {\n          returnType = COBOLLINENUM;\n        } else if (col >= 72 && col <= 79) {\n          stream.skipToEnd();\n          returnType = MODTAG;\n        } else if (ch == \"*\" && col == 6) { // comment\n          stream.skipToEnd(); // rest of the line is a comment\n          returnType = COMMENT;\n        } else if (ch == \"\\\"\" || ch == \"\\'\") {\n          state.mode = \"string\";\n          returnType = STRING;\n        } else if (ch == \"'\" && !( tests.digit_or_colon.test(stream.peek()) )) {\n          returnType = ATOM;\n        } else if (ch == \".\") {\n          returnType = PERIOD;\n        } else if (isNumber(ch,stream)){\n          returnType = NUMBER;\n        } else {\n          if (stream.current().match(tests.symbol)) {\n            while (col < 71) {\n              if (stream.eat(tests.symbol) === undefined) {\n                break;\n              } else {\n                col++;\n              }\n            }\n          }\n          if (keywords && keywords.propertyIsEnumerable(stream.current().toUpperCase())) {\n            returnType = KEYWORD;\n          } else if (builtins && builtins.propertyIsEnumerable(stream.current().toUpperCase())) {\n            returnType = BUILTIN;\n          } else if (atoms && atoms.propertyIsEnumerable(stream.current().toUpperCase())) {\n            returnType = ATOM;\n          } else returnType = null;\n        }\n      }\n      return returnType;\n    },\n    indent: function (state) {\n      if (state.indentStack == null) return state.indentation;\n      return state.indentStack.indent;\n    }\n  };\n});\n\nCodeMirror.defineMIME(\"text/x-cobol\", \"cobol\");\n\n});\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/cobol/index.html",
    "content": "<!doctype html>\n\n<title>CodeMirror: COBOL mode</title>\n<meta charset=\"utf-8\"/>\n<link rel=stylesheet href=\"../../doc/docs.css\">\n\n<link rel=\"stylesheet\" href=\"../../lib/codemirror.css\">\n<link rel=\"stylesheet\" href=\"../../theme/neat.css\">\n<link rel=\"stylesheet\" href=\"../../theme/elegant.css\">\n<link rel=\"stylesheet\" href=\"../../theme/erlang-dark.css\">\n<link rel=\"stylesheet\" href=\"../../theme/night.css\">\n<link rel=\"stylesheet\" href=\"../../theme/monokai.css\">\n<link rel=\"stylesheet\" href=\"../../theme/cobalt.css\">\n<link rel=\"stylesheet\" href=\"../../theme/eclipse.css\">\n<link rel=\"stylesheet\" href=\"../../theme/rubyblue.css\">\n<link rel=\"stylesheet\" href=\"../../theme/lesser-dark.css\">\n<link rel=\"stylesheet\" href=\"../../theme/xq-dark.css\">\n<link rel=\"stylesheet\" href=\"../../theme/xq-light.css\">\n<link rel=\"stylesheet\" href=\"../../theme/ambiance.css\">\n<link rel=\"stylesheet\" href=\"../../theme/blackboard.css\">\n<link rel=\"stylesheet\" href=\"../../theme/vibrant-ink.css\">\n<link rel=\"stylesheet\" href=\"../../theme/solarized.css\">\n<link rel=\"stylesheet\" href=\"../../theme/twilight.css\">\n<link rel=\"stylesheet\" href=\"../../theme/midnight.css\">\n<link rel=\"stylesheet\" href=\"../../addon/dialog/dialog.css\">\n<script src=\"../../lib/codemirror.js\"></script>\n<script src=\"../../addon/edit/matchbrackets.js\"></script>\n<script src=\"cobol.js\"></script>\n<script src=\"../../addon/selection/active-line.js\"></script>\n<script src=\"../../addon/search/search.js\"></script>\n<script src=\"../../addon/dialog/dialog.js\"></script>\n<script src=\"../../addon/search/searchcursor.js\"></script>\n<style>\n        .CodeMirror {\n          border: 1px solid #eee;\n          font-size : 20px;\n          height : auto !important;\n        }\n        .CodeMirror-activeline-background {background: #555555 !important;}\n    </style>\n<div id=nav>\n  <a href=\"http://codemirror.net\"><h1>CodeMirror</h1><img id=logo src=\"../../doc/logo.png\"></a>\n\n  <ul>\n    <li><a href=\"../../index.html\">Home</a>\n    <li><a href=\"../../doc/manual.html\">Manual</a>\n    <li><a href=\"https://github.com/codemirror/codemirror\">Code</a>\n  </ul>\n  <ul>\n    <li><a href=\"../index.html\">Language modes</a>\n    <li><a class=active href=\"#\">COBOL</a>\n  </ul>\n</div>\n\n<article>\n<h2>COBOL mode</h2>\n\n    <p> Select Theme <select onchange=\"selectTheme()\" id=\"selectTheme\">\n        <option>default</option>\n        <option>ambiance</option>\n        <option>blackboard</option>\n        <option>cobalt</option>\n        <option>eclipse</option>\n        <option>elegant</option>\n        <option>erlang-dark</option>\n        <option>lesser-dark</option>\n        <option>midnight</option>\n        <option>monokai</option>\n        <option>neat</option>\n        <option>night</option>\n        <option>rubyblue</option>\n        <option>solarized dark</option>\n        <option>solarized light</option>\n        <option selected>twilight</option>\n        <option>vibrant-ink</option>\n        <option>xq-dark</option>\n        <option>xq-light</option>\n    </select>    Select Font Size <select onchange=\"selectFontsize()\" id=\"selectFontSize\">\n          <option value=\"13px\">13px</option>\n          <option value=\"14px\">14px</option>\n          <option value=\"16px\">16px</option>\n          <option value=\"18px\">18px</option>\n          <option value=\"20px\" selected=\"selected\">20px</option>\n          <option value=\"24px\">24px</option>\n          <option value=\"26px\">26px</option>\n          <option value=\"28px\">28px</option>\n          <option value=\"30px\">30px</option>\n          <option value=\"32px\">32px</option>\n          <option value=\"34px\">34px</option>\n          <option value=\"36px\">36px</option>\n        </select>\n<label for=\"checkBoxReadOnly\">Read-only</label>\n<input type=\"checkbox\" id=\"checkBoxReadOnly\" onchange=\"selectReadOnly()\">\n<label for=\"id_tabToIndentSpace\">Insert Spaces on Tab</label>\n<input type=\"checkbox\" id=\"id_tabToIndentSpace\" onchange=\"tabToIndentSpace()\">\n</p>\n<textarea id=\"code\" name=\"code\">\n---------1---------2---------3---------4---------5---------6---------7---------8\n12345678911234567892123456789312345678941234567895123456789612345678971234567898\n000010 IDENTIFICATION DIVISION.                                        MODTGHERE\n000020 PROGRAM-ID.       SAMPLE.\n000030 AUTHOR.           TEST SAM. \n000040 DATE-WRITTEN.     5 February 2013\n000041\n000042* A sample program just to show the form.\n000043* The program copies its input to the output,\n000044* and counts the number of records.\n000045* At the end this number is printed.\n000046\n000050 ENVIRONMENT DIVISION.\n000060 INPUT-OUTPUT SECTION.\n000070 FILE-CONTROL.\n000080     SELECT STUDENT-FILE     ASSIGN TO SYSIN\n000090         ORGANIZATION IS LINE SEQUENTIAL.\n000100     SELECT PRINT-FILE       ASSIGN TO SYSOUT\n000110         ORGANIZATION IS LINE SEQUENTIAL.\n000120\n000130 DATA DIVISION.\n000140 FILE SECTION.\n000150 FD  STUDENT-FILE\n000160     RECORD CONTAINS 43 CHARACTERS\n000170     DATA RECORD IS STUDENT-IN.\n000180 01  STUDENT-IN              PIC X(43).\n000190\n000200 FD  PRINT-FILE\n000210     RECORD CONTAINS 80 CHARACTERS\n000220     DATA RECORD IS PRINT-LINE.\n000230 01  PRINT-LINE              PIC X(80).\n000240\n000250 WORKING-STORAGE SECTION.\n000260 01  DATA-REMAINS-SWITCH     PIC X(2)      VALUE SPACES.\n000261 01  RECORDS-WRITTEN         PIC 99.\n000270\n000280 01  DETAIL-LINE.\n000290     05  FILLER              PIC X(7)      VALUE SPACES.\n000300     05  RECORD-IMAGE        PIC X(43).\n000310     05  FILLER              PIC X(30)     VALUE SPACES.\n000311 \n000312 01  SUMMARY-LINE.\n000313     05  FILLER              PIC X(7)      VALUE SPACES.\n000314     05  TOTAL-READ          PIC 99.\n000315     05  FILLER              PIC X         VALUE SPACE.\n000316     05  FILLER              PIC X(17)     \n000317                 VALUE  'Records were read'.\n000318     05  FILLER              PIC X(53)     VALUE SPACES.\n000319\n000320 PROCEDURE DIVISION.\n000321\n000330 PREPARE-SENIOR-REPORT.\n000340     OPEN INPUT  STUDENT-FILE\n000350          OUTPUT PRINT-FILE.\n000351     MOVE ZERO TO RECORDS-WRITTEN.\n000360     READ STUDENT-FILE\n000370         AT END MOVE 'NO' TO DATA-REMAINS-SWITCH\n000380     END-READ.\n000390     PERFORM PROCESS-RECORDS\n000410         UNTIL DATA-REMAINS-SWITCH = 'NO'.\n000411     PERFORM PRINT-SUMMARY.\n000420     CLOSE STUDENT-FILE\n000430           PRINT-FILE.\n000440     STOP RUN.\n000450\n000460 PROCESS-RECORDS.\n000470     MOVE STUDENT-IN TO RECORD-IMAGE.\n000480     MOVE DETAIL-LINE TO PRINT-LINE.\n000490     WRITE PRINT-LINE.\n000500     ADD 1 TO RECORDS-WRITTEN.\n000510     READ STUDENT-FILE\n000520         AT END MOVE 'NO' TO DATA-REMAINS-SWITCH\n000530     END-READ. \n000540\n000550 PRINT-SUMMARY.\n000560     MOVE RECORDS-WRITTEN TO TOTAL-READ.\n000570     MOVE SUMMARY-LINE TO PRINT-LINE.\n000571     WRITE PRINT-LINE. \n000572\n000580\n</textarea>\n    <script>\n      var editor = CodeMirror.fromTextArea(document.getElementById(\"code\"), {\n        lineNumbers: true,\n        matchBrackets: true,\n        mode: \"text/x-cobol\",\n        theme : \"twilight\",\n        styleActiveLine: true,\n        showCursorWhenSelecting : true,  \n      });\n      function selectTheme() {\n        var themeInput = document.getElementById(\"selectTheme\");\n        var theme = themeInput.options[themeInput.selectedIndex].innerHTML;\n        editor.setOption(\"theme\", theme);\n      }\n      function selectFontsize() {\n        var fontSizeInput = document.getElementById(\"selectFontSize\");\n        var fontSize = fontSizeInput.options[fontSizeInput.selectedIndex].innerHTML;\n        editor.getWrapperElement().style.fontSize = fontSize;\n        editor.refresh();\n      }\n      function selectReadOnly() {\n        editor.setOption(\"readOnly\", document.getElementById(\"checkBoxReadOnly\").checked);\n      }\n      function tabToIndentSpace() {\n        if (document.getElementById(\"id_tabToIndentSpace\").checked) {\n            editor.setOption(\"extraKeys\", {Tab: function(cm) { cm.replaceSelection(\"    \", \"end\"); }});\n        } else {\n            editor.setOption(\"extraKeys\", {Tab: function(cm) { cm.replaceSelection(\"    \", \"end\"); }});\n        }\n      }\n    </script>\n  </article>\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/coffeescript/coffeescript.js",
    "content": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n/**\n * Link to the project's GitHub page:\n * https://github.com/pickhardt/coffeescript-codemirror-mode\n */\n(function(mod) {\n  if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n    mod(require(\"../../lib/codemirror\"));\n  else if (typeof define == \"function\" && define.amd) // AMD\n    define([\"../../lib/codemirror\"], mod);\n  else // Plain browser env\n    mod(CodeMirror);\n})(function(CodeMirror) {\n\"use strict\";\n\nCodeMirror.defineMode(\"coffeescript\", function(conf, parserConf) {\n  var ERRORCLASS = \"error\";\n\n  function wordRegexp(words) {\n    return new RegExp(\"^((\" + words.join(\")|(\") + \"))\\\\b\");\n  }\n\n  var operators = /^(?:->|=>|\\+[+=]?|-[\\-=]?|\\*[\\*=]?|\\/[\\/=]?|[=!]=|<[><]?=?|>>?=?|%=?|&=?|\\|=?|\\^=?|\\~|!|\\?|(or|and|\\|\\||&&|\\?)=)/;\n  var delimiters = /^(?:[()\\[\\]{},:`=;]|\\.\\.?\\.?)/;\n  var identifiers = /^[_A-Za-z$][_A-Za-z$0-9]*/;\n  var properties = /^(@|this\\.)[_A-Za-z$][_A-Za-z$0-9]*/;\n\n  var wordOperators = wordRegexp([\"and\", \"or\", \"not\",\n                                  \"is\", \"isnt\", \"in\",\n                                  \"instanceof\", \"typeof\"]);\n  var indentKeywords = [\"for\", \"while\", \"loop\", \"if\", \"unless\", \"else\",\n                        \"switch\", \"try\", \"catch\", \"finally\", \"class\"];\n  var commonKeywords = [\"break\", \"by\", \"continue\", \"debugger\", \"delete\",\n                        \"do\", \"in\", \"of\", \"new\", \"return\", \"then\",\n                        \"this\", \"@\", \"throw\", \"when\", \"until\", \"extends\"];\n\n  var keywords = wordRegexp(indentKeywords.concat(commonKeywords));\n\n  indentKeywords = wordRegexp(indentKeywords);\n\n\n  var stringPrefixes = /^('{3}|\\\"{3}|['\\\"])/;\n  var regexPrefixes = /^(\\/{3}|\\/)/;\n  var commonConstants = [\"Infinity\", \"NaN\", \"undefined\", \"null\", \"true\", \"false\", \"on\", \"off\", \"yes\", \"no\"];\n  var constants = wordRegexp(commonConstants);\n\n  // Tokenizers\n  function tokenBase(stream, state) {\n    // Handle scope changes\n    if (stream.sol()) {\n      if (state.scope.align === null) state.scope.align = false;\n      var scopeOffset = state.scope.offset;\n      if (stream.eatSpace()) {\n        var lineOffset = stream.indentation();\n        if (lineOffset > scopeOffset && state.scope.type == \"coffee\") {\n          return \"indent\";\n        } else if (lineOffset < scopeOffset) {\n          return \"dedent\";\n        }\n        return null;\n      } else {\n        if (scopeOffset > 0) {\n          dedent(stream, state);\n        }\n      }\n    }\n    if (stream.eatSpace()) {\n      return null;\n    }\n\n    var ch = stream.peek();\n\n    // Handle docco title comment (single line)\n    if (stream.match(\"####\")) {\n      stream.skipToEnd();\n      return \"comment\";\n    }\n\n    // Handle multi line comments\n    if (stream.match(\"###\")) {\n      state.tokenize = longComment;\n      return state.tokenize(stream, state);\n    }\n\n    // Single line comment\n    if (ch === \"#\") {\n      stream.skipToEnd();\n      return \"comment\";\n    }\n\n    // Handle number literals\n    if (stream.match(/^-?[0-9\\.]/, false)) {\n      var floatLiteral = false;\n      // Floats\n      if (stream.match(/^-?\\d*\\.\\d+(e[\\+\\-]?\\d+)?/i)) {\n        floatLiteral = true;\n      }\n      if (stream.match(/^-?\\d+\\.\\d*/)) {\n        floatLiteral = true;\n      }\n      if (stream.match(/^-?\\.\\d+/)) {\n        floatLiteral = true;\n      }\n\n      if (floatLiteral) {\n        // prevent from getting extra . on 1..\n        if (stream.peek() == \".\"){\n          stream.backUp(1);\n        }\n        return \"number\";\n      }\n      // Integers\n      var intLiteral = false;\n      // Hex\n      if (stream.match(/^-?0x[0-9a-f]+/i)) {\n        intLiteral = true;\n      }\n      // Decimal\n      if (stream.match(/^-?[1-9]\\d*(e[\\+\\-]?\\d+)?/)) {\n        intLiteral = true;\n      }\n      // Zero by itself with no other piece of number.\n      if (stream.match(/^-?0(?![\\dx])/i)) {\n        intLiteral = true;\n      }\n      if (intLiteral) {\n        return \"number\";\n      }\n    }\n\n    // Handle strings\n    if (stream.match(stringPrefixes)) {\n      state.tokenize = tokenFactory(stream.current(), false, \"string\");\n      return state.tokenize(stream, state);\n    }\n    // Handle regex literals\n    if (stream.match(regexPrefixes)) {\n      if (stream.current() != \"/\" || stream.match(/^.*\\//, false)) { // prevent highlight of division\n        state.tokenize = tokenFactory(stream.current(), true, \"string-2\");\n        return state.tokenize(stream, state);\n      } else {\n        stream.backUp(1);\n      }\n    }\n\n    // Handle operators and delimiters\n    if (stream.match(operators) || stream.match(wordOperators)) {\n      return \"operator\";\n    }\n    if (stream.match(delimiters)) {\n      return \"punctuation\";\n    }\n\n    if (stream.match(constants)) {\n      return \"atom\";\n    }\n\n    if (stream.match(keywords)) {\n      return \"keyword\";\n    }\n\n    if (stream.match(identifiers)) {\n      return \"variable\";\n    }\n\n    if (stream.match(properties)) {\n      return \"property\";\n    }\n\n    // Handle non-detected items\n    stream.next();\n    return ERRORCLASS;\n  }\n\n  function tokenFactory(delimiter, singleline, outclass) {\n    return function(stream, state) {\n      while (!stream.eol()) {\n        stream.eatWhile(/[^'\"\\/\\\\]/);\n        if (stream.eat(\"\\\\\")) {\n          stream.next();\n          if (singleline && stream.eol()) {\n            return outclass;\n          }\n        } else if (stream.match(delimiter)) {\n          state.tokenize = tokenBase;\n          return outclass;\n        } else {\n          stream.eat(/['\"\\/]/);\n        }\n      }\n      if (singleline) {\n        if (parserConf.singleLineStringErrors) {\n          outclass = ERRORCLASS;\n        } else {\n          state.tokenize = tokenBase;\n        }\n      }\n      return outclass;\n    };\n  }\n\n  function longComment(stream, state) {\n    while (!stream.eol()) {\n      stream.eatWhile(/[^#]/);\n      if (stream.match(\"###\")) {\n        state.tokenize = tokenBase;\n        break;\n      }\n      stream.eatWhile(\"#\");\n    }\n    return \"comment\";\n  }\n\n  function indent(stream, state, type) {\n    type = type || \"coffee\";\n    var offset = 0, align = false, alignOffset = null;\n    for (var scope = state.scope; scope; scope = scope.prev) {\n      if (scope.type === \"coffee\" || scope.type == \"}\") {\n        offset = scope.offset + conf.indentUnit;\n        break;\n      }\n    }\n    if (type !== \"coffee\") {\n      align = null;\n      alignOffset = stream.column() + stream.current().length;\n    } else if (state.scope.align) {\n      state.scope.align = false;\n    }\n    state.scope = {\n      offset: offset,\n      type: type,\n      prev: state.scope,\n      align: align,\n      alignOffset: alignOffset\n    };\n  }\n\n  function dedent(stream, state) {\n    if (!state.scope.prev) return;\n    if (state.scope.type === \"coffee\") {\n      var _indent = stream.indentation();\n      var matched = false;\n      for (var scope = state.scope; scope; scope = scope.prev) {\n        if (_indent === scope.offset) {\n          matched = true;\n          break;\n        }\n      }\n      if (!matched) {\n        return true;\n      }\n      while (state.scope.prev && state.scope.offset !== _indent) {\n        state.scope = state.scope.prev;\n      }\n      return false;\n    } else {\n      state.scope = state.scope.prev;\n      return false;\n    }\n  }\n\n  function tokenLexer(stream, state) {\n    var style = state.tokenize(stream, state);\n    var current = stream.current();\n\n    // Handle \".\" connected identifiers\n    if (current === \".\") {\n      style = state.tokenize(stream, state);\n      current = stream.current();\n      if (/^\\.[\\w$]+$/.test(current)) {\n        return \"variable\";\n      } else {\n        return ERRORCLASS;\n      }\n    }\n\n    // Handle scope changes.\n    if (current === \"return\") {\n      state.dedent = true;\n    }\n    if (((current === \"->\" || current === \"=>\") &&\n         !state.lambda &&\n         !stream.peek())\n        || style === \"indent\") {\n      indent(stream, state);\n    }\n    var delimiter_index = \"[({\".indexOf(current);\n    if (delimiter_index !== -1) {\n      indent(stream, state, \"])}\".slice(delimiter_index, delimiter_index+1));\n    }\n    if (indentKeywords.exec(current)){\n      indent(stream, state);\n    }\n    if (current == \"then\"){\n      dedent(stream, state);\n    }\n\n\n    if (style === \"dedent\") {\n      if (dedent(stream, state)) {\n        return ERRORCLASS;\n      }\n    }\n    delimiter_index = \"])}\".indexOf(current);\n    if (delimiter_index !== -1) {\n      while (state.scope.type == \"coffee\" && state.scope.prev)\n        state.scope = state.scope.prev;\n      if (state.scope.type == current)\n        state.scope = state.scope.prev;\n    }\n    if (state.dedent && stream.eol()) {\n      if (state.scope.type == \"coffee\" && state.scope.prev)\n        state.scope = state.scope.prev;\n      state.dedent = false;\n    }\n\n    return style;\n  }\n\n  var external = {\n    startState: function(basecolumn) {\n      return {\n        tokenize: tokenBase,\n        scope: {offset:basecolumn || 0, type:\"coffee\", prev: null, align: false},\n        lastToken: null,\n        lambda: false,\n        dedent: 0\n      };\n    },\n\n    token: function(stream, state) {\n      var fillAlign = state.scope.align === null && state.scope;\n      if (fillAlign && stream.sol()) fillAlign.align = false;\n\n      var style = tokenLexer(stream, state);\n      if (fillAlign && style && style != \"comment\") fillAlign.align = true;\n\n      state.lastToken = {style:style, content: stream.current()};\n\n      if (stream.eol() && stream.lambda) {\n        state.lambda = false;\n      }\n\n      return style;\n    },\n\n    indent: function(state, text) {\n      if (state.tokenize != tokenBase) return 0;\n      var scope = state.scope;\n      var closer = text && \"])}\".indexOf(text.charAt(0)) > -1;\n      if (closer) while (scope.type == \"coffee\" && scope.prev) scope = scope.prev;\n      var closes = closer && scope.type === text.charAt(0);\n      if (scope.align)\n        return scope.alignOffset - (closes ? 1 : 0);\n      else\n        return (closes ? scope.prev : scope).offset;\n    },\n\n    lineComment: \"#\",\n    fold: \"indent\"\n  };\n  return external;\n});\n\nCodeMirror.defineMIME(\"text/x-coffeescript\", \"coffeescript\");\n\n});\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/coffeescript/index.html",
    "content": "<!doctype html>\n\n<title>CodeMirror: CoffeeScript mode</title>\n<meta charset=\"utf-8\"/>\n<link rel=stylesheet href=\"../../doc/docs.css\">\n\n<link rel=\"stylesheet\" href=\"../../lib/codemirror.css\">\n<script src=\"../../lib/codemirror.js\"></script>\n<script src=\"coffeescript.js\"></script>\n<style>.CodeMirror {border-top: 1px solid silver; border-bottom: 1px solid silver;}</style>\n<div id=nav>\n  <a href=\"http://codemirror.net\"><h1>CodeMirror</h1><img id=logo src=\"../../doc/logo.png\"></a>\n\n  <ul>\n    <li><a href=\"../../index.html\">Home</a>\n    <li><a href=\"../../doc/manual.html\">Manual</a>\n    <li><a href=\"https://github.com/codemirror/codemirror\">Code</a>\n  </ul>\n  <ul>\n    <li><a href=\"../index.html\">Language modes</a>\n    <li><a class=active href=\"#\">CoffeeScript</a>\n  </ul>\n</div>\n\n<article>\n<h2>CoffeeScript mode</h2>\n<form><textarea id=\"code\" name=\"code\">\n# CoffeeScript mode for CodeMirror\n# Copyright (c) 2011 Jeff Pickhardt, released under\n# the MIT License.\n#\n# Modified from the Python CodeMirror mode, which also is \n# under the MIT License Copyright (c) 2010 Timothy Farrell.\n#\n# The following script, Underscore.coffee, is used to \n# demonstrate CoffeeScript mode for CodeMirror.\n#\n# To download CoffeeScript mode for CodeMirror, go to:\n# https://github.com/pickhardt/coffeescript-codemirror-mode\n\n# **Underscore.coffee\n# (c) 2011 Jeremy Ashkenas, DocumentCloud Inc.**\n# Underscore is freely distributable under the terms of the\n# [MIT license](http://en.wikipedia.org/wiki/MIT_License).\n# Portions of Underscore are inspired by or borrowed from\n# [Prototype.js](http://prototypejs.org/api), Oliver Steele's\n# [Functional](http://osteele.com), and John Resig's\n# [Micro-Templating](http://ejohn.org).\n# For all details and documentation:\n# http://documentcloud.github.com/underscore/\n\n\n# Baseline setup\n# --------------\n\n# Establish the root object, `window` in the browser, or `global` on the server.\nroot = this\n\n\n# Save the previous value of the `_` variable.\npreviousUnderscore = root._\n\n### Multiline\n    comment\n###\n\n# Establish the object that gets thrown to break out of a loop iteration.\n# `StopIteration` is SOP on Mozilla.\nbreaker = if typeof(StopIteration) is 'undefined' then '__break__' else StopIteration\n\n\n#### Docco style single line comment (title)\n\n\n# Helper function to escape **RegExp** contents, because JS doesn't have one.\nescapeRegExp = (string) -> string.replace(/([.*+?^${}()|[\\]\\/\\\\])/g, '\\\\$1')\n\n\n# Save bytes in the minified (but not gzipped) version:\nArrayProto = Array.prototype\nObjProto = Object.prototype\n\n\n# Create quick reference variables for speed access to core prototypes.\nslice = ArrayProto.slice\nunshift = ArrayProto.unshift\ntoString = ObjProto.toString\nhasOwnProperty = ObjProto.hasOwnProperty\npropertyIsEnumerable = ObjProto.propertyIsEnumerable\n\n\n# All **ECMA5** native implementations we hope to use are declared here.\nnativeForEach = ArrayProto.forEach\nnativeMap = ArrayProto.map\nnativeReduce = ArrayProto.reduce\nnativeReduceRight = ArrayProto.reduceRight\nnativeFilter = ArrayProto.filter\nnativeEvery = ArrayProto.every\nnativeSome = ArrayProto.some\nnativeIndexOf = ArrayProto.indexOf\nnativeLastIndexOf = ArrayProto.lastIndexOf\nnativeIsArray = Array.isArray\nnativeKeys = Object.keys\n\n\n# Create a safe reference to the Underscore object for use below.\n_ = (obj) -> new wrapper(obj)\n\n\n# Export the Underscore object for **CommonJS**.\nif typeof(exports) != 'undefined' then exports._ = _\n\n\n# Export Underscore to global scope.\nroot._ = _\n\n\n# Current version.\n_.VERSION = '1.1.0'\n\n\n# Collection Functions\n# --------------------\n\n# The cornerstone, an **each** implementation.\n# Handles objects implementing **forEach**, arrays, and raw objects.\n_.each = (obj, iterator, context) ->\n  try\n    if nativeForEach and obj.forEach is nativeForEach\n      obj.forEach iterator, context\n    else if _.isNumber obj.length\n      iterator.call context, obj[i], i, obj for i in [0...obj.length]\n    else\n      iterator.call context, val, key, obj for own key, val of obj\n  catch e\n    throw e if e isnt breaker\n  obj\n\n\n# Return the results of applying the iterator to each element. Use JavaScript\n# 1.6's version of **map**, if possible.\n_.map = (obj, iterator, context) ->\n  return obj.map(iterator, context) if nativeMap and obj.map is nativeMap\n  results = []\n  _.each obj, (value, index, list) ->\n    results.push iterator.call context, value, index, list\n  results\n\n\n# **Reduce** builds up a single result from a list of values. Also known as\n# **inject**, or **foldl**. Uses JavaScript 1.8's version of **reduce**, if possible.\n_.reduce = (obj, iterator, memo, context) ->\n  if nativeReduce and obj.reduce is nativeReduce\n    iterator = _.bind iterator, context if context\n    return obj.reduce iterator, memo\n  _.each obj, (value, index, list) ->\n    memo = iterator.call context, memo, value, index, list\n  memo\n\n\n# The right-associative version of **reduce**, also known as **foldr**. Uses\n# JavaScript 1.8's version of **reduceRight**, if available.\n_.reduceRight = (obj, iterator, memo, context) ->\n  if nativeReduceRight and obj.reduceRight is nativeReduceRight\n    iterator = _.bind iterator, context if context\n    return obj.reduceRight iterator, memo\n  reversed = _.clone(_.toArray(obj)).reverse()\n  _.reduce reversed, iterator, memo, context\n\n\n# Return the first value which passes a truth test.\n_.detect = (obj, iterator, context) ->\n  result = null\n  _.each obj, (value, index, list) ->\n    if iterator.call context, value, index, list\n      result = value\n      _.breakLoop()\n  result\n\n\n# Return all the elements that pass a truth test. Use JavaScript 1.6's\n# **filter**, if it exists.\n_.filter = (obj, iterator, context) ->\n  return obj.filter iterator, context if nativeFilter and obj.filter is nativeFilter\n  results = []\n  _.each obj, (value, index, list) ->\n    results.push value if iterator.call context, value, index, list\n  results\n\n\n# Return all the elements for which a truth test fails.\n_.reject = (obj, iterator, context) ->\n  results = []\n  _.each obj, (value, index, list) ->\n    results.push value if not iterator.call context, value, index, list\n  results\n\n\n# Determine whether all of the elements match a truth test. Delegate to\n# JavaScript 1.6's **every**, if it is present.\n_.every = (obj, iterator, context) ->\n  iterator ||= _.identity\n  return obj.every iterator, context if nativeEvery and obj.every is nativeEvery\n  result = true\n  _.each obj, (value, index, list) ->\n    _.breakLoop() unless (result = result and iterator.call(context, value, index, list))\n  result\n\n\n# Determine if at least one element in the object matches a truth test. Use\n# JavaScript 1.6's **some**, if it exists.\n_.some = (obj, iterator, context) ->\n  iterator ||= _.identity\n  return obj.some iterator, context if nativeSome and obj.some is nativeSome\n  result = false\n  _.each obj, (value, index, list) ->\n    _.breakLoop() if (result = iterator.call(context, value, index, list))\n  result\n\n\n# Determine if a given value is included in the array or object,\n# based on `===`.\n_.include = (obj, target) ->\n  return _.indexOf(obj, target) isnt -1 if nativeIndexOf and obj.indexOf is nativeIndexOf\n  return true for own key, val of obj when val is target\n  false\n\n\n# Invoke a method with arguments on every item in a collection.\n_.invoke = (obj, method) ->\n  args = _.rest arguments, 2\n  (if method then val[method] else val).apply(val, args) for val in obj\n\n\n# Convenience version of a common use case of **map**: fetching a property.\n_.pluck = (obj, key) ->\n  _.map(obj, (val) -> val[key])\n\n\n# Return the maximum item or (item-based computation).\n_.max = (obj, iterator, context) ->\n  return Math.max.apply(Math, obj) if not iterator and _.isArray(obj)\n  result = computed: -Infinity\n  _.each obj, (value, index, list) ->\n    computed = if iterator then iterator.call(context, value, index, list) else value\n    computed >= result.computed and (result = {value: value, computed: computed})\n  result.value\n\n\n# Return the minimum element (or element-based computation).\n_.min = (obj, iterator, context) ->\n  return Math.min.apply(Math, obj) if not iterator and _.isArray(obj)\n  result = computed: Infinity\n  _.each obj, (value, index, list) ->\n    computed = if iterator then iterator.call(context, value, index, list) else value\n    computed < result.computed and (result = {value: value, computed: computed})\n  result.value\n\n\n# Sort the object's values by a criterion produced by an iterator.\n_.sortBy = (obj, iterator, context) ->\n  _.pluck(((_.map obj, (value, index, list) ->\n    {value: value, criteria: iterator.call(context, value, index, list)}\n  ).sort((left, right) ->\n    a = left.criteria; b = right.criteria\n    if a < b then -1 else if a > b then 1 else 0\n  )), 'value')\n\n\n# Use a comparator function to figure out at what index an object should\n# be inserted so as to maintain order. Uses binary search.\n_.sortedIndex = (array, obj, iterator) ->\n  iterator ||= _.identity\n  low = 0\n  high = array.length\n  while low < high\n    mid = (low + high) >> 1\n    if iterator(array[mid]) < iterator(obj) then low = mid + 1 else high = mid\n  low\n\n\n# Convert anything iterable into a real, live array.\n_.toArray = (iterable) ->\n  return [] if (!iterable)\n  return iterable.toArray() if (iterable.toArray)\n  return iterable if (_.isArray(iterable))\n  return slice.call(iterable) if (_.isArguments(iterable))\n  _.values(iterable)\n\n\n# Return the number of elements in an object.\n_.size = (obj) -> _.toArray(obj).length\n\n\n# Array Functions\n# ---------------\n\n# Get the first element of an array. Passing `n` will return the first N\n# values in the array. Aliased as **head**. The `guard` check allows it to work\n# with **map**.\n_.first = (array, n, guard) ->\n  if n and not guard then slice.call(array, 0, n) else array[0]\n\n\n# Returns everything but the first entry of the array. Aliased as **tail**.\n# Especially useful on the arguments object. Passing an `index` will return\n# the rest of the values in the array from that index onward. The `guard`\n# check allows it to work with **map**.\n_.rest = (array, index, guard) ->\n  slice.call(array, if _.isUndefined(index) or guard then 1 else index)\n\n\n# Get the last element of an array.\n_.last = (array) -> array[array.length - 1]\n\n\n# Trim out all falsy values from an array.\n_.compact = (array) -> item for item in array when item\n\n\n# Return a completely flattened version of an array.\n_.flatten = (array) ->\n  _.reduce array, (memo, value) ->\n    return memo.concat(_.flatten(value)) if _.isArray value\n    memo.push value\n    memo\n  , []\n\n\n# Return a version of the array that does not contain the specified value(s).\n_.without = (array) ->\n  values = _.rest arguments\n  val for val in _.toArray(array) when not _.include values, val\n\n\n# Produce a duplicate-free version of the array. If the array has already\n# been sorted, you have the option of using a faster algorithm.\n_.uniq = (array, isSorted) ->\n  memo = []\n  for el, i in _.toArray array\n    memo.push el if i is 0 || (if isSorted is true then _.last(memo) isnt el else not _.include(memo, el))\n  memo\n\n\n# Produce an array that contains every item shared between all the\n# passed-in arrays.\n_.intersect = (array) ->\n  rest = _.rest arguments\n  _.select _.uniq(array), (item) ->\n    _.all rest, (other) ->\n      _.indexOf(other, item) >= 0\n\n\n# Zip together multiple lists into a single array -- elements that share\n# an index go together.\n_.zip = ->\n  length = _.max _.pluck arguments, 'length'\n  results = new Array length\n  for i in [0...length]\n    results[i] = _.pluck arguments, String i\n  results\n\n\n# If the browser doesn't supply us with **indexOf** (I'm looking at you, MSIE),\n# we need this function. Return the position of the first occurrence of an\n# item in an array, or -1 if the item is not included in the array.\n_.indexOf = (array, item) ->\n  return array.indexOf item if nativeIndexOf and array.indexOf is nativeIndexOf\n  i = 0; l = array.length\n  while l - i\n    if array[i] is item then return i else i++\n  -1\n\n\n# Provide JavaScript 1.6's **lastIndexOf**, delegating to the native function,\n# if possible.\n_.lastIndexOf = (array, item) ->\n  return array.lastIndexOf(item) if nativeLastIndexOf and array.lastIndexOf is nativeLastIndexOf\n  i = array.length\n  while i\n    if array[i] is item then return i else i--\n  -1\n\n\n# Generate an integer Array containing an arithmetic progression. A port of\n# [the native Python **range** function](http://docs.python.org/library/functions.html#range).\n_.range = (start, stop, step) ->\n  a = arguments\n  solo = a.length <= 1\n  i = start = if solo then 0 else a[0]\n  stop = if solo then a[0] else a[1]\n  step = a[2] or 1\n  len = Math.ceil((stop - start) / step)\n  return [] if len <= 0\n  range = new Array len\n  idx = 0\n  loop\n    return range if (if step > 0 then i - stop else stop - i) >= 0\n    range[idx] = i\n    idx++\n    i+= step\n\n\n# Function Functions\n# ------------------\n\n# Create a function bound to a given object (assigning `this`, and arguments,\n# optionally). Binding with arguments is also known as **curry**.\n_.bind = (func, obj) ->\n  args = _.rest arguments, 2\n  -> func.apply obj or root, args.concat arguments\n\n\n# Bind all of an object's methods to that object. Useful for ensuring that\n# all callbacks defined on an object belong to it.\n_.bindAll = (obj) ->\n  funcs = if arguments.length > 1 then _.rest(arguments) else _.functions(obj)\n  _.each funcs, (f) -> obj[f] = _.bind obj[f], obj\n  obj\n\n\n# Delays a function for the given number of milliseconds, and then calls\n# it with the arguments supplied.\n_.delay = (func, wait) ->\n  args = _.rest arguments, 2\n  setTimeout((-> func.apply(func, args)), wait)\n\n\n# Memoize an expensive function by storing its results.\n_.memoize = (func, hasher) ->\n  memo = {}\n  hasher or= _.identity\n  ->\n    key = hasher.apply this, arguments\n    return memo[key] if key of memo\n    memo[key] = func.apply this, arguments\n\n\n# Defers a function, scheduling it to run after the current call stack has\n# cleared.\n_.defer = (func) ->\n  _.delay.apply _, [func, 1].concat _.rest arguments\n\n\n# Returns the first function passed as an argument to the second,\n# allowing you to adjust arguments, run code before and after, and\n# conditionally execute the original function.\n_.wrap = (func, wrapper) ->\n  -> wrapper.apply wrapper, [func].concat arguments\n\n\n# Returns a function that is the composition of a list of functions, each\n# consuming the return value of the function that follows.\n_.compose = ->\n  funcs = arguments\n  ->\n    args = arguments\n    for i in [funcs.length - 1..0] by -1\n      args = [funcs[i].apply(this, args)]\n    args[0]\n\n\n# Object Functions\n# ----------------\n\n# Retrieve the names of an object's properties.\n_.keys = nativeKeys or (obj) ->\n  return _.range 0, obj.length if _.isArray(obj)\n  key for key, val of obj\n\n\n# Retrieve the values of an object's properties.\n_.values = (obj) ->\n  _.map obj, _.identity\n\n\n# Return a sorted list of the function names available in Underscore.\n_.functions = (obj) ->\n  _.filter(_.keys(obj), (key) -> _.isFunction(obj[key])).sort()\n\n\n# Extend a given object with all of the properties in a source object.\n_.extend = (obj) ->\n  for source in _.rest(arguments)\n    obj[key] = val for key, val of source\n  obj\n\n\n# Create a (shallow-cloned) duplicate of an object.\n_.clone = (obj) ->\n  return obj.slice 0 if _.isArray obj\n  _.extend {}, obj\n\n\n# Invokes interceptor with the obj, and then returns obj.\n# The primary purpose of this method is to \"tap into\" a method chain,\n# in order to perform operations on intermediate results within\n the chain.\n_.tap = (obj, interceptor) ->\n  interceptor obj\n  obj\n\n\n# Perform a deep comparison to check if two objects are equal.\n_.isEqual = (a, b) ->\n  # Check object identity.\n  return true if a is b\n  # Different types?\n  atype = typeof(a); btype = typeof(b)\n  return false if atype isnt btype\n  # Basic equality test (watch out for coercions).\n  return true if `a == b`\n  # One is falsy and the other truthy.\n  return false if (!a and b) or (a and !b)\n  # One of them implements an `isEqual()`?\n  return a.isEqual(b) if a.isEqual\n  # Check dates' integer values.\n  return a.getTime() is b.getTime() if _.isDate(a) and _.isDate(b)\n  # Both are NaN?\n  return false if _.isNaN(a) and _.isNaN(b)\n  # Compare regular expressions.\n  if _.isRegExp(a) and _.isRegExp(b)\n    return a.source is b.source and\n           a.global is b.global and\n           a.ignoreCase is b.ignoreCase and\n           a.multiline is b.multiline\n  # If a is not an object by this point, we can't handle it.\n  return false if atype isnt 'object'\n  # Check for different array lengths before comparing contents.\n  return false if a.length and (a.length isnt b.length)\n  # Nothing else worked, deep compare the contents.\n  aKeys = _.keys(a); bKeys = _.keys(b)\n  # Different object sizes?\n  return false if aKeys.length isnt bKeys.length\n  # Recursive comparison of contents.\n  return false for key, val of a when !(key of b) or !_.isEqual(val, b[key])\n  true\n\n\n# Is a given array or object empty?\n_.isEmpty = (obj) ->\n  return obj.length is 0 if _.isArray(obj) or _.isString(obj)\n  return false for own key of obj\n  true\n\n\n# Is a given value a DOM element?\n_.isElement = (obj) -> obj and obj.nodeType is 1\n\n\n# Is a given value an array?\n_.isArray = nativeIsArray or (obj) -> !!(obj and obj.concat and obj.unshift and not obj.callee)\n\n\n# Is a given variable an arguments object?\n_.isArguments = (obj) -> obj and obj.callee\n\n\n# Is the given value a function?\n_.isFunction = (obj) -> !!(obj and obj.constructor and obj.call and obj.apply)\n\n\n# Is the given value a string?\n_.isString = (obj) -> !!(obj is '' or (obj and obj.charCodeAt and obj.substr))\n\n\n# Is a given value a number?\n_.isNumber = (obj) -> (obj is +obj) or toString.call(obj) is '[object Number]'\n\n\n# Is a given value a boolean?\n_.isBoolean = (obj) -> obj is true or obj is false\n\n\n# Is a given value a Date?\n_.isDate = (obj) -> !!(obj and obj.getTimezoneOffset and obj.setUTCFullYear)\n\n\n# Is the given value a regular expression?\n_.isRegExp = (obj) -> !!(obj and obj.exec and (obj.ignoreCase or obj.ignoreCase is false))\n\n\n# Is the given value NaN -- this one is interesting. `NaN != NaN`, and\n# `isNaN(undefined) == true`, so we make sure it's a number first.\n_.isNaN = (obj) -> _.isNumber(obj) and window.isNaN(obj)\n\n\n# Is a given value equal to null?\n_.isNull = (obj) -> obj is null\n\n\n# Is a given variable undefined?\n_.isUndefined = (obj) -> typeof obj is 'undefined'\n\n\n# Utility Functions\n# -----------------\n\n# Run Underscore.js in noConflict mode, returning the `_` variable to its\n# previous owner. Returns a reference to the Underscore object.\n_.noConflict = ->\n  root._ = previousUnderscore\n  this\n\n\n# Keep the identity function around for default iterators.\n_.identity = (value) -> value\n\n\n# Run a function `n` times.\n_.times = (n, iterator, context) ->\n  iterator.call context, i for i in [0...n]\n\n\n# Break out of the middle of an iteration.\n_.breakLoop = -> throw breaker\n\n\n# Add your own custom functions to the Underscore object, ensuring that\n# they're correctly added to the OOP wrapper as well.\n_.mixin = (obj) ->\n  for name in _.functions(obj)\n    addToWrapper name, _[name] = obj[name]\n\n\n# Generate a unique integer id (unique within the entire client session).\n# Useful for temporary DOM ids.\nidCounter = 0\n_.uniqueId = (prefix) ->\n  (prefix or '') + idCounter++\n\n\n# By default, Underscore uses **ERB**-style template delimiters, change the\n# following template settings to use alternative delimiters.\n_.templateSettings = {\n  start: '<%'\n  end: '%>'\n  interpolate: /<%=(.+?)%>/g\n}\n\n\n# JavaScript templating a-la **ERB**, pilfered from John Resig's\n# *Secrets of the JavaScript Ninja*, page 83.\n# Single-quote fix from Rick Strahl.\n# With alterations for arbitrary delimiters, and to preserve whitespace.\n_.template = (str, data) ->\n  c = _.templateSettings\n  endMatch = new RegExp(\"'(?=[^\"+c.end.substr(0, 1)+\"]*\"+escapeRegExp(c.end)+\")\",\"g\")\n  fn = new Function 'obj',\n    'var p=[],print=function(){p.push.apply(p,arguments);};' +\n    'with(obj||{}){p.push(\\'' +\n    str.replace(/\\r/g, '\\\\r')\n       .replace(/\\n/g, '\\\\n')\n       .replace(/\\t/g, '\\\\t')\n       .replace(endMatch,\"���\")\n       .split(\"'\").join(\"\\\\'\")\n       .split(\"���\").join(\"'\")\n       .replace(c.interpolate, \"',$1,'\")\n       .split(c.start).join(\"');\")\n       .split(c.end).join(\"p.push('\") +\n       \"');}return p.join('');\"\n  if data then fn(data) else fn\n\n\n# Aliases\n# -------\n\n_.forEach = _.each\n_.foldl = _.inject = _.reduce\n_.foldr = _.reduceRight\n_.select = _.filter\n_.all = _.every\n_.any = _.some\n_.contains = _.include\n_.head = _.first\n_.tail = _.rest\n_.methods = _.functions\n\n\n# Setup the OOP Wrapper\n# ---------------------\n\n# If Underscore is called as a function, it returns a wrapped object that\n# can be used OO-style. This wrapper holds altered versions of all the\n# underscore functions. Wrapped objects may be chained.\nwrapper = (obj) ->\n  this._wrapped = obj\n  this\n\n\n# Helper function to continue chaining intermediate results.\nresult = (obj, chain) ->\n  if chain then _(obj).chain() else obj\n\n\n# A method to easily add functions to the OOP wrapper.\naddToWrapper = (name, func) ->\n  wrapper.prototype[name] = ->\n    args = _.toArray arguments\n    unshift.call args, this._wrapped\n    result func.apply(_, args), this._chain\n\n\n# Add all ofthe Underscore functions to the wrapper object.\n_.mixin _\n\n\n# Add all mutator Array functions to the wrapper.\n_.each ['pop', 'push', 'reverse', 'shift', 'sort', 'splice', 'unshift'], (name) ->\n  method = Array.prototype[name]\n  wrapper.prototype[name] = ->\n    method.apply(this._wrapped, arguments)\n    result(this._wrapped, this._chain)\n\n\n# Add all accessor Array functions to the wrapper.\n_.each ['concat', 'join', 'slice'], (name) ->\n  method = Array.prototype[name]\n  wrapper.prototype[name] = ->\n    result(method.apply(this._wrapped, arguments), this._chain)\n\n\n# Start chaining a wrapped Underscore object.\nwrapper::chain = ->\n  this._chain = true\n  this\n\n\n# Extracts the result from a wrapped and chained object.\nwrapper::value = -> this._wrapped\n</textarea></form>\n    <script>\n      var editor = CodeMirror.fromTextArea(document.getElementById(\"code\"), {});\n    </script>\n\n    <p><strong>MIME types defined:</strong> <code>text/x-coffeescript</code>.</p>\n\n    <p>The CoffeeScript mode was written by Jeff Pickhardt.</p>\n\n  </article>\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/commonlisp/commonlisp.js",
    "content": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n(function(mod) {\n  if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n    mod(require(\"../../lib/codemirror\"));\n  else if (typeof define == \"function\" && define.amd) // AMD\n    define([\"../../lib/codemirror\"], mod);\n  else // Plain browser env\n    mod(CodeMirror);\n})(function(CodeMirror) {\n\"use strict\";\n\nCodeMirror.defineMode(\"commonlisp\", function (config) {\n  var specialForm = /^(block|let*|return-from|catch|load-time-value|setq|eval-when|locally|symbol-macrolet|flet|macrolet|tagbody|function|multiple-value-call|the|go|multiple-value-prog1|throw|if|progn|unwind-protect|labels|progv|let|quote)$/;\n  var assumeBody = /^with|^def|^do|^prog|case$|^cond$|bind$|when$|unless$/;\n  var numLiteral = /^(?:[+\\-]?(?:\\d+|\\d*\\.\\d+)(?:[efd][+\\-]?\\d+)?|[+\\-]?\\d+(?:\\/[+\\-]?\\d+)?|#b[+\\-]?[01]+|#o[+\\-]?[0-7]+|#x[+\\-]?[\\da-f]+)/;\n  var symbol = /[^\\s'`,@()\\[\\]\";]/;\n  var type;\n\n  function readSym(stream) {\n    var ch;\n    while (ch = stream.next()) {\n      if (ch == \"\\\\\") stream.next();\n      else if (!symbol.test(ch)) { stream.backUp(1); break; }\n    }\n    return stream.current();\n  }\n\n  function base(stream, state) {\n    if (stream.eatSpace()) {type = \"ws\"; return null;}\n    if (stream.match(numLiteral)) return \"number\";\n    var ch = stream.next();\n    if (ch == \"\\\\\") ch = stream.next();\n\n    if (ch == '\"') return (state.tokenize = inString)(stream, state);\n    else if (ch == \"(\") { type = \"open\"; return \"bracket\"; }\n    else if (ch == \")\" || ch == \"]\") { type = \"close\"; return \"bracket\"; }\n    else if (ch == \";\") { stream.skipToEnd(); type = \"ws\"; return \"comment\"; }\n    else if (/['`,@]/.test(ch)) return null;\n    else if (ch == \"|\") {\n      if (stream.skipTo(\"|\")) { stream.next(); return \"symbol\"; }\n      else { stream.skipToEnd(); return \"error\"; }\n    } else if (ch == \"#\") {\n      var ch = stream.next();\n      if (ch == \"[\") { type = \"open\"; return \"bracket\"; }\n      else if (/[+\\-=\\.']/.test(ch)) return null;\n      else if (/\\d/.test(ch) && stream.match(/^\\d*#/)) return null;\n      else if (ch == \"|\") return (state.tokenize = inComment)(stream, state);\n      else if (ch == \":\") { readSym(stream); return \"meta\"; }\n      else return \"error\";\n    } else {\n      var name = readSym(stream);\n      if (name == \".\") return null;\n      type = \"symbol\";\n      if (name == \"nil\" || name == \"t\" || name.charAt(0) == \":\") return \"atom\";\n      if (state.lastType == \"open\" && (specialForm.test(name) || assumeBody.test(name))) return \"keyword\";\n      if (name.charAt(0) == \"&\") return \"variable-2\";\n      return \"variable\";\n    }\n  }\n\n  function inString(stream, state) {\n    var escaped = false, next;\n    while (next = stream.next()) {\n      if (next == '\"' && !escaped) { state.tokenize = base; break; }\n      escaped = !escaped && next == \"\\\\\";\n    }\n    return \"string\";\n  }\n\n  function inComment(stream, state) {\n    var next, last;\n    while (next = stream.next()) {\n      if (next == \"#\" && last == \"|\") { state.tokenize = base; break; }\n      last = next;\n    }\n    type = \"ws\";\n    return \"comment\";\n  }\n\n  return {\n    startState: function () {\n      return {ctx: {prev: null, start: 0, indentTo: 0}, lastType: null, tokenize: base};\n    },\n\n    token: function (stream, state) {\n      if (stream.sol() && typeof state.ctx.indentTo != \"number\")\n        state.ctx.indentTo = state.ctx.start + 1;\n\n      type = null;\n      var style = state.tokenize(stream, state);\n      if (type != \"ws\") {\n        if (state.ctx.indentTo == null) {\n          if (type == \"symbol\" && assumeBody.test(stream.current()))\n            state.ctx.indentTo = state.ctx.start + config.indentUnit;\n          else\n            state.ctx.indentTo = \"next\";\n        } else if (state.ctx.indentTo == \"next\") {\n          state.ctx.indentTo = stream.column();\n        }\n        state.lastType = type;\n      }\n      if (type == \"open\") state.ctx = {prev: state.ctx, start: stream.column(), indentTo: null};\n      else if (type == \"close\") state.ctx = state.ctx.prev || state.ctx;\n      return style;\n    },\n\n    indent: function (state, _textAfter) {\n      var i = state.ctx.indentTo;\n      return typeof i == \"number\" ? i : state.ctx.start + 1;\n    },\n\n    lineComment: \";;\",\n    blockCommentStart: \"#|\",\n    blockCommentEnd: \"|#\"\n  };\n});\n\nCodeMirror.defineMIME(\"text/x-common-lisp\", \"commonlisp\");\n\n});\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/commonlisp/index.html",
    "content": "<!doctype html>\n\n<title>CodeMirror: Common Lisp mode</title>\n<meta charset=\"utf-8\"/>\n<link rel=stylesheet href=\"../../doc/docs.css\">\n\n<link rel=\"stylesheet\" href=\"../../lib/codemirror.css\">\n<script src=\"../../lib/codemirror.js\"></script>\n<script src=\"commonlisp.js\"></script>\n<style>.CodeMirror {background: #f8f8f8;}</style>\n<div id=nav>\n  <a href=\"http://codemirror.net\"><h1>CodeMirror</h1><img id=logo src=\"../../doc/logo.png\"></a>\n\n  <ul>\n    <li><a href=\"../../index.html\">Home</a>\n    <li><a href=\"../../doc/manual.html\">Manual</a>\n    <li><a href=\"https://github.com/codemirror/codemirror\">Code</a>\n  </ul>\n  <ul>\n    <li><a href=\"../index.html\">Language modes</a>\n    <li><a class=active href=\"#\">Common Lisp</a>\n  </ul>\n</div>\n\n<article>\n<h2>Common Lisp mode</h2>\n<form><textarea id=\"code\" name=\"code\">(in-package :cl-postgres)\n\n;; These are used to synthesize reader and writer names for integer\n;; reading/writing functions when the amount of bytes and the\n;; signedness is known. Both the macro that creates the functions and\n;; some macros that use them create names this way.\n(eval-when (:compile-toplevel :load-toplevel :execute)\n  (defun integer-reader-name (bytes signed)\n    (intern (with-standard-io-syntax\n              (format nil \"~a~a~a~a\" '#:read- (if signed \"\" '#:u) '#:int bytes))))\n  (defun integer-writer-name (bytes signed)\n    (intern (with-standard-io-syntax\n              (format nil \"~a~a~a~a\" '#:write- (if signed \"\" '#:u) '#:int bytes)))))\n\n(defmacro integer-reader (bytes)\n  \"Create a function to read integers from a binary stream.\"\n  (let ((bits (* bytes 8)))\n    (labels ((return-form (signed)\n               (if signed\n                   `(if (logbitp ,(1- bits) result)\n                        (dpb result (byte ,(1- bits) 0) -1)\n                        result)\n                   `result))\n             (generate-reader (signed)\n               `(defun ,(integer-reader-name bytes signed) (socket)\n                  (declare (type stream socket)\n                           #.*optimize*)\n                  ,(if (= bytes 1)\n                       `(let ((result (the (unsigned-byte 8) (read-byte socket))))\n                          (declare (type (unsigned-byte 8) result))\n                          ,(return-form signed))\n                       `(let ((result 0))\n                          (declare (type (unsigned-byte ,bits) result))\n                          ,@(loop :for byte :from (1- bytes) :downto 0\n                                   :collect `(setf (ldb (byte 8 ,(* 8 byte)) result)\n                                                   (the (unsigned-byte 8) (read-byte socket))))\n                          ,(return-form signed))))))\n      `(progn\n;; This causes weird errors on SBCL in some circumstances. Disabled for now.\n;;         (declaim (inline ,(integer-reader-name bytes t)\n;;                          ,(integer-reader-name bytes nil)))\n         (declaim (ftype (function (t) (signed-byte ,bits))\n                         ,(integer-reader-name bytes t)))\n         ,(generate-reader t)\n         (declaim (ftype (function (t) (unsigned-byte ,bits))\n                         ,(integer-reader-name bytes nil)))\n         ,(generate-reader nil)))))\n\n(defmacro integer-writer (bytes)\n  \"Create a function to write integers to a binary stream.\"\n  (let ((bits (* 8 bytes)))\n    `(progn\n      (declaim (inline ,(integer-writer-name bytes t)\n                       ,(integer-writer-name bytes nil)))\n      (defun ,(integer-writer-name bytes nil) (socket value)\n        (declare (type stream socket)\n                 (type (unsigned-byte ,bits) value)\n                 #.*optimize*)\n        ,@(if (= bytes 1)\n              `((write-byte value socket))\n              (loop :for byte :from (1- bytes) :downto 0\n                    :collect `(write-byte (ldb (byte 8 ,(* byte 8)) value)\n                               socket)))\n        (values))\n      (defun ,(integer-writer-name bytes t) (socket value)\n        (declare (type stream socket)\n                 (type (signed-byte ,bits) value)\n                 #.*optimize*)\n        ,@(if (= bytes 1)\n              `((write-byte (ldb (byte 8 0) value) socket))\n              (loop :for byte :from (1- bytes) :downto 0\n                    :collect `(write-byte (ldb (byte 8 ,(* byte 8)) value)\n                               socket)))\n        (values)))))\n\n;; All the instances of the above that we need.\n\n(integer-reader 1)\n(integer-reader 2)\n(integer-reader 4)\n(integer-reader 8)\n\n(integer-writer 1)\n(integer-writer 2)\n(integer-writer 4)\n\n(defun write-bytes (socket bytes)\n  \"Write a byte-array to a stream.\"\n  (declare (type stream socket)\n           (type (simple-array (unsigned-byte 8)) bytes)\n           #.*optimize*)\n  (write-sequence bytes socket))\n\n(defun write-str (socket string)\n  \"Write a null-terminated string to a stream \\(encoding it when UTF-8\nsupport is enabled.).\"\n  (declare (type stream socket)\n           (type string string)\n           #.*optimize*)\n  (enc-write-string string socket)\n  (write-uint1 socket 0))\n\n(declaim (ftype (function (t unsigned-byte)\n                          (simple-array (unsigned-byte 8) (*)))\n                read-bytes))\n(defun read-bytes (socket length)\n  \"Read a byte array of the given length from a stream.\"\n  (declare (type stream socket)\n           (type fixnum length)\n           #.*optimize*)\n  (let ((result (make-array length :element-type '(unsigned-byte 8))))\n    (read-sequence result socket)\n    result))\n\n(declaim (ftype (function (t) string) read-str))\n(defun read-str (socket)\n  \"Read a null-terminated string from a stream. Takes care of encoding\nwhen UTF-8 support is enabled.\"\n  (declare (type stream socket)\n           #.*optimize*)\n  (enc-read-string socket :null-terminated t))\n\n(defun skip-bytes (socket length)\n  \"Skip a given number of bytes in a binary stream.\"\n  (declare (type stream socket)\n           (type (unsigned-byte 32) length)\n           #.*optimize*)\n  (dotimes (i length)\n    (read-byte socket)))\n\n(defun skip-str (socket)\n  \"Skip a null-terminated string.\"\n  (declare (type stream socket)\n           #.*optimize*)\n  (loop :for char :of-type fixnum = (read-byte socket)\n        :until (zerop char)))\n\n(defun ensure-socket-is-closed (socket &amp;key abort)\n  (when (open-stream-p socket)\n    (handler-case\n        (close socket :abort abort)\n      (error (error)\n        (warn \"Ignoring the error which happened while trying to close PostgreSQL socket: ~A\" error)))))\n</textarea></form>\n    <script>\n      var editor = CodeMirror.fromTextArea(document.getElementById(\"code\"), {lineNumbers: true});\n    </script>\n\n    <p><strong>MIME types defined:</strong> <code>text/x-common-lisp</code>.</p>\n\n  </article>\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/css/css.js",
    "content": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n(function(mod) {\n  if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n    mod(require(\"../../lib/codemirror\"));\n  else if (typeof define == \"function\" && define.amd) // AMD\n    define([\"../../lib/codemirror\"], mod);\n  else // Plain browser env\n    mod(CodeMirror);\n})(function(CodeMirror) {\n\"use strict\";\n\nCodeMirror.defineMode(\"css\", function(config, parserConfig) {\n  if (!parserConfig.propertyKeywords) parserConfig = CodeMirror.resolveMode(\"text/css\");\n\n  var indentUnit = config.indentUnit,\n      tokenHooks = parserConfig.tokenHooks,\n      documentTypes = parserConfig.documentTypes || {},\n      mediaTypes = parserConfig.mediaTypes || {},\n      mediaFeatures = parserConfig.mediaFeatures || {},\n      propertyKeywords = parserConfig.propertyKeywords || {},\n      nonStandardPropertyKeywords = parserConfig.nonStandardPropertyKeywords || {},\n      fontProperties = parserConfig.fontProperties || {},\n      counterDescriptors = parserConfig.counterDescriptors || {},\n      colorKeywords = parserConfig.colorKeywords || {},\n      valueKeywords = parserConfig.valueKeywords || {},\n      allowNested = parserConfig.allowNested;\n\n  var type, override;\n  function ret(style, tp) { type = tp; return style; }\n\n  // Tokenizers\n\n  function tokenBase(stream, state) {\n    var ch = stream.next();\n    if (tokenHooks[ch]) {\n      var result = tokenHooks[ch](stream, state);\n      if (result !== false) return result;\n    }\n    if (ch == \"@\") {\n      stream.eatWhile(/[\\w\\\\\\-]/);\n      return ret(\"def\", stream.current());\n    } else if (ch == \"=\" || (ch == \"~\" || ch == \"|\") && stream.eat(\"=\")) {\n      return ret(null, \"compare\");\n    } else if (ch == \"\\\"\" || ch == \"'\") {\n      state.tokenize = tokenString(ch);\n      return state.tokenize(stream, state);\n    } else if (ch == \"#\") {\n      stream.eatWhile(/[\\w\\\\\\-]/);\n      return ret(\"atom\", \"hash\");\n    } else if (ch == \"!\") {\n      stream.match(/^\\s*\\w*/);\n      return ret(\"keyword\", \"important\");\n    } else if (/\\d/.test(ch) || ch == \".\" && stream.eat(/\\d/)) {\n      stream.eatWhile(/[\\w.%]/);\n      return ret(\"number\", \"unit\");\n    } else if (ch === \"-\") {\n      if (/[\\d.]/.test(stream.peek())) {\n        stream.eatWhile(/[\\w.%]/);\n        return ret(\"number\", \"unit\");\n      } else if (stream.match(/^-[\\w\\\\\\-]+/)) {\n        stream.eatWhile(/[\\w\\\\\\-]/);\n        if (stream.match(/^\\s*:/, false))\n          return ret(\"variable-2\", \"variable-definition\");\n        return ret(\"variable-2\", \"variable\");\n      } else if (stream.match(/^\\w+-/)) {\n        return ret(\"meta\", \"meta\");\n      }\n    } else if (/[,+>*\\/]/.test(ch)) {\n      return ret(null, \"select-op\");\n    } else if (ch == \".\" && stream.match(/^-?[_a-z][_a-z0-9-]*/i)) {\n      return ret(\"qualifier\", \"qualifier\");\n    } else if (/[:;{}\\[\\]\\(\\)]/.test(ch)) {\n      return ret(null, ch);\n    } else if ((ch == \"u\" && stream.match(/rl(-prefix)?\\(/)) ||\n               (ch == \"d\" && stream.match(\"omain(\")) ||\n               (ch == \"r\" && stream.match(\"egexp(\"))) {\n      stream.backUp(1);\n      state.tokenize = tokenParenthesized;\n      return ret(\"property\", \"word\");\n    } else if (/[\\w\\\\\\-]/.test(ch)) {\n      stream.eatWhile(/[\\w\\\\\\-]/);\n      return ret(\"property\", \"word\");\n    } else {\n      return ret(null, null);\n    }\n  }\n\n  function tokenString(quote) {\n    return function(stream, state) {\n      var escaped = false, ch;\n      while ((ch = stream.next()) != null) {\n        if (ch == quote && !escaped) {\n          if (quote == \")\") stream.backUp(1);\n          break;\n        }\n        escaped = !escaped && ch == \"\\\\\";\n      }\n      if (ch == quote || !escaped && quote != \")\") state.tokenize = null;\n      return ret(\"string\", \"string\");\n    };\n  }\n\n  function tokenParenthesized(stream, state) {\n    stream.next(); // Must be '('\n    if (!stream.match(/\\s*[\\\"\\')]/, false))\n      state.tokenize = tokenString(\")\");\n    else\n      state.tokenize = null;\n    return ret(null, \"(\");\n  }\n\n  // Context management\n\n  function Context(type, indent, prev) {\n    this.type = type;\n    this.indent = indent;\n    this.prev = prev;\n  }\n\n  function pushContext(state, stream, type) {\n    state.context = new Context(type, stream.indentation() + indentUnit, state.context);\n    return type;\n  }\n\n  function popContext(state) {\n    state.context = state.context.prev;\n    return state.context.type;\n  }\n\n  function pass(type, stream, state) {\n    return states[state.context.type](type, stream, state);\n  }\n  function popAndPass(type, stream, state, n) {\n    for (var i = n || 1; i > 0; i--)\n      state.context = state.context.prev;\n    return pass(type, stream, state);\n  }\n\n  // Parser\n\n  function wordAsValue(stream) {\n    var word = stream.current().toLowerCase();\n    if (valueKeywords.hasOwnProperty(word))\n      override = \"atom\";\n    else if (colorKeywords.hasOwnProperty(word))\n      override = \"keyword\";\n    else\n      override = \"variable\";\n  }\n\n  var states = {};\n\n  states.top = function(type, stream, state) {\n    if (type == \"{\") {\n      return pushContext(state, stream, \"block\");\n    } else if (type == \"}\" && state.context.prev) {\n      return popContext(state);\n    } else if (/@(media|supports|(-moz-)?document)/.test(type)) {\n      return pushContext(state, stream, \"atBlock\");\n    } else if (/@(font-face|counter-style)/.test(type)) {\n      state.stateArg = type;\n      return \"restricted_atBlock_before\";\n    } else if (/^@(-(moz|ms|o|webkit)-)?keyframes$/.test(type)) {\n      return \"keyframes\";\n    } else if (type && type.charAt(0) == \"@\") {\n      return pushContext(state, stream, \"at\");\n    } else if (type == \"hash\") {\n      override = \"builtin\";\n    } else if (type == \"word\") {\n      override = \"tag\";\n    } else if (type == \"variable-definition\") {\n      return \"maybeprop\";\n    } else if (type == \"interpolation\") {\n      return pushContext(state, stream, \"interpolation\");\n    } else if (type == \":\") {\n      return \"pseudo\";\n    } else if (allowNested && type == \"(\") {\n      return pushContext(state, stream, \"parens\");\n    }\n    return state.context.type;\n  };\n\n  states.block = function(type, stream, state) {\n    if (type == \"word\") {\n      var word = stream.current().toLowerCase();\n      if (propertyKeywords.hasOwnProperty(word)) {\n        override = \"property\";\n        return \"maybeprop\";\n      } else if (nonStandardPropertyKeywords.hasOwnProperty(word)) {\n        override = \"string-2\";\n        return \"maybeprop\";\n      } else if (allowNested) {\n        override = stream.match(/^\\s*:(?:\\s|$)/, false) ? \"property\" : \"tag\";\n        return \"block\";\n      } else {\n        override += \" error\";\n        return \"maybeprop\";\n      }\n    } else if (type == \"meta\") {\n      return \"block\";\n    } else if (!allowNested && (type == \"hash\" || type == \"qualifier\")) {\n      override = \"error\";\n      return \"block\";\n    } else {\n      return states.top(type, stream, state);\n    }\n  };\n\n  states.maybeprop = function(type, stream, state) {\n    if (type == \":\") return pushContext(state, stream, \"prop\");\n    return pass(type, stream, state);\n  };\n\n  states.prop = function(type, stream, state) {\n    if (type == \";\") return popContext(state);\n    if (type == \"{\" && allowNested) return pushContext(state, stream, \"propBlock\");\n    if (type == \"}\" || type == \"{\") return popAndPass(type, stream, state);\n    if (type == \"(\") return pushContext(state, stream, \"parens\");\n\n    if (type == \"hash\" && !/^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/.test(stream.current())) {\n      override += \" error\";\n    } else if (type == \"word\") {\n      wordAsValue(stream);\n    } else if (type == \"interpolation\") {\n      return pushContext(state, stream, \"interpolation\");\n    }\n    return \"prop\";\n  };\n\n  states.propBlock = function(type, _stream, state) {\n    if (type == \"}\") return popContext(state);\n    if (type == \"word\") { override = \"property\"; return \"maybeprop\"; }\n    return state.context.type;\n  };\n\n  states.parens = function(type, stream, state) {\n    if (type == \"{\" || type == \"}\") return popAndPass(type, stream, state);\n    if (type == \")\") return popContext(state);\n    if (type == \"(\") return pushContext(state, stream, \"parens\");\n    if (type == \"word\") wordAsValue(stream);\n    return \"parens\";\n  };\n\n  states.pseudo = function(type, stream, state) {\n    if (type == \"word\") {\n      override = \"variable-3\";\n      return state.context.type;\n    }\n    return pass(type, stream, state);\n  };\n\n  states.atBlock = function(type, stream, state) {\n    if (type == \"(\") return pushContext(state, stream, \"atBlock_parens\");\n    if (type == \"}\") return popAndPass(type, stream, state);\n    if (type == \"{\") return popContext(state) && pushContext(state, stream, allowNested ? \"block\" : \"top\");\n\n    if (type == \"word\") {\n      var word = stream.current().toLowerCase();\n      if (word == \"only\" || word == \"not\" || word == \"and\" || word == \"or\")\n        override = \"keyword\";\n      else if (documentTypes.hasOwnProperty(word))\n        override = \"tag\";\n      else if (mediaTypes.hasOwnProperty(word))\n        override = \"attribute\";\n      else if (mediaFeatures.hasOwnProperty(word))\n        override = \"property\";\n      else if (propertyKeywords.hasOwnProperty(word))\n        override = \"property\";\n      else if (nonStandardPropertyKeywords.hasOwnProperty(word))\n        override = \"string-2\";\n      else if (valueKeywords.hasOwnProperty(word))\n        override = \"atom\";\n      else\n        override = \"error\";\n    }\n    return state.context.type;\n  };\n\n  states.atBlock_parens = function(type, stream, state) {\n    if (type == \")\") return popContext(state);\n    if (type == \"{\" || type == \"}\") return popAndPass(type, stream, state, 2);\n    return states.atBlock(type, stream, state);\n  };\n\n  states.restricted_atBlock_before = function(type, stream, state) {\n    if (type == \"{\")\n      return pushContext(state, stream, \"restricted_atBlock\");\n    if (type == \"word\" && state.stateArg == \"@counter-style\") {\n      override = \"variable\";\n      return \"restricted_atBlock_before\";\n    }\n    return pass(type, stream, state);\n  };\n\n  states.restricted_atBlock = function(type, stream, state) {\n    if (type == \"}\") {\n      state.stateArg = null;\n      return popContext(state);\n    }\n    if (type == \"word\") {\n      if ((state.stateArg == \"@font-face\" && !fontProperties.hasOwnProperty(stream.current().toLowerCase())) ||\n          (state.stateArg == \"@counter-style\" && !counterDescriptors.hasOwnProperty(stream.current().toLowerCase())))\n        override = \"error\";\n      else\n        override = \"property\";\n      return \"maybeprop\";\n    }\n    return \"restricted_atBlock\";\n  };\n\n  states.keyframes = function(type, stream, state) {\n    if (type == \"word\") { override = \"variable\"; return \"keyframes\"; }\n    if (type == \"{\") return pushContext(state, stream, \"top\");\n    return pass(type, stream, state);\n  };\n\n  states.at = function(type, stream, state) {\n    if (type == \";\") return popContext(state);\n    if (type == \"{\" || type == \"}\") return popAndPass(type, stream, state);\n    if (type == \"word\") override = \"tag\";\n    else if (type == \"hash\") override = \"builtin\";\n    return \"at\";\n  };\n\n  states.interpolation = function(type, stream, state) {\n    if (type == \"}\") return popContext(state);\n    if (type == \"{\" || type == \";\") return popAndPass(type, stream, state);\n    if (type != \"variable\") override = \"error\";\n    return \"interpolation\";\n  };\n\n  return {\n    startState: function(base) {\n      return {tokenize: null,\n              state: \"top\",\n              stateArg: null,\n              context: new Context(\"top\", base || 0, null)};\n    },\n\n    token: function(stream, state) {\n      if (!state.tokenize && stream.eatSpace()) return null;\n      var style = (state.tokenize || tokenBase)(stream, state);\n      if (style && typeof style == \"object\") {\n        type = style[1];\n        style = style[0];\n      }\n      override = style;\n      state.state = states[state.state](type, stream, state);\n      return override;\n    },\n\n    indent: function(state, textAfter) {\n      var cx = state.context, ch = textAfter && textAfter.charAt(0);\n      var indent = cx.indent;\n      if (cx.type == \"prop\" && (ch == \"}\" || ch == \")\")) cx = cx.prev;\n      if (cx.prev &&\n          (ch == \"}\" && (cx.type == \"block\" || cx.type == \"top\" || cx.type == \"interpolation\" || cx.type == \"restricted_atBlock\") ||\n           ch == \")\" && (cx.type == \"parens\" || cx.type == \"atBlock_parens\") ||\n           ch == \"{\" && (cx.type == \"at\" || cx.type == \"atBlock\"))) {\n        indent = cx.indent - indentUnit;\n        cx = cx.prev;\n      }\n      return indent;\n    },\n\n    electricChars: \"}\",\n    blockCommentStart: \"/*\",\n    blockCommentEnd: \"*/\",\n    fold: \"brace\"\n  };\n});\n\n  function keySet(array) {\n    var keys = {};\n    for (var i = 0; i < array.length; ++i) {\n      keys[array[i]] = true;\n    }\n    return keys;\n  }\n\n  var documentTypes_ = [\n    \"domain\", \"regexp\", \"url\", \"url-prefix\"\n  ], documentTypes = keySet(documentTypes_);\n\n  var mediaTypes_ = [\n    \"all\", \"aural\", \"braille\", \"handheld\", \"print\", \"projection\", \"screen\",\n    \"tty\", \"tv\", \"embossed\"\n  ], mediaTypes = keySet(mediaTypes_);\n\n  var mediaFeatures_ = [\n    \"width\", \"min-width\", \"max-width\", \"height\", \"min-height\", \"max-height\",\n    \"device-width\", \"min-device-width\", \"max-device-width\", \"device-height\",\n    \"min-device-height\", \"max-device-height\", \"aspect-ratio\",\n    \"min-aspect-ratio\", \"max-aspect-ratio\", \"device-aspect-ratio\",\n    \"min-device-aspect-ratio\", \"max-device-aspect-ratio\", \"color\", \"min-color\",\n    \"max-color\", \"color-index\", \"min-color-index\", \"max-color-index\",\n    \"monochrome\", \"min-monochrome\", \"max-monochrome\", \"resolution\",\n    \"min-resolution\", \"max-resolution\", \"scan\", \"grid\"\n  ], mediaFeatures = keySet(mediaFeatures_);\n\n  var propertyKeywords_ = [\n    \"align-content\", \"align-items\", \"align-self\", \"alignment-adjust\",\n    \"alignment-baseline\", \"anchor-point\", \"animation\", \"animation-delay\",\n    \"animation-direction\", \"animation-duration\", \"animation-fill-mode\",\n    \"animation-iteration-count\", \"animation-name\", \"animation-play-state\",\n    \"animation-timing-function\", \"appearance\", \"azimuth\", \"backface-visibility\",\n    \"background\", \"background-attachment\", \"background-clip\", \"background-color\",\n    \"background-image\", \"background-origin\", \"background-position\",\n    \"background-repeat\", \"background-size\", \"baseline-shift\", \"binding\",\n    \"bleed\", \"bookmark-label\", \"bookmark-level\", \"bookmark-state\",\n    \"bookmark-target\", \"border\", \"border-bottom\", \"border-bottom-color\",\n    \"border-bottom-left-radius\", \"border-bottom-right-radius\",\n    \"border-bottom-style\", \"border-bottom-width\", \"border-collapse\",\n    \"border-color\", \"border-image\", \"border-image-outset\",\n    \"border-image-repeat\", \"border-image-slice\", \"border-image-source\",\n    \"border-image-width\", \"border-left\", \"border-left-color\",\n    \"border-left-style\", \"border-left-width\", \"border-radius\", \"border-right\",\n    \"border-right-color\", \"border-right-style\", \"border-right-width\",\n    \"border-spacing\", \"border-style\", \"border-top\", \"border-top-color\",\n    \"border-top-left-radius\", \"border-top-right-radius\", \"border-top-style\",\n    \"border-top-width\", \"border-width\", \"bottom\", \"box-decoration-break\",\n    \"box-shadow\", \"box-sizing\", \"break-after\", \"break-before\", \"break-inside\",\n    \"caption-side\", \"clear\", \"clip\", \"color\", \"color-profile\", \"column-count\",\n    \"column-fill\", \"column-gap\", \"column-rule\", \"column-rule-color\",\n    \"column-rule-style\", \"column-rule-width\", \"column-span\", \"column-width\",\n    \"columns\", \"content\", \"counter-increment\", \"counter-reset\", \"crop\", \"cue\",\n    \"cue-after\", \"cue-before\", \"cursor\", \"direction\", \"display\",\n    \"dominant-baseline\", \"drop-initial-after-adjust\",\n    \"drop-initial-after-align\", \"drop-initial-before-adjust\",\n    \"drop-initial-before-align\", \"drop-initial-size\", \"drop-initial-value\",\n    \"elevation\", \"empty-cells\", \"fit\", \"fit-position\", \"flex\", \"flex-basis\",\n    \"flex-direction\", \"flex-flow\", \"flex-grow\", \"flex-shrink\", \"flex-wrap\",\n    \"float\", \"float-offset\", \"flow-from\", \"flow-into\", \"font\", \"font-feature-settings\",\n    \"font-family\", \"font-kerning\", \"font-language-override\", \"font-size\", \"font-size-adjust\",\n    \"font-stretch\", \"font-style\", \"font-synthesis\", \"font-variant\",\n    \"font-variant-alternates\", \"font-variant-caps\", \"font-variant-east-asian\",\n    \"font-variant-ligatures\", \"font-variant-numeric\", \"font-variant-position\",\n    \"font-weight\", \"grid\", \"grid-area\", \"grid-auto-columns\", \"grid-auto-flow\",\n    \"grid-auto-position\", \"grid-auto-rows\", \"grid-column\", \"grid-column-end\",\n    \"grid-column-start\", \"grid-row\", \"grid-row-end\", \"grid-row-start\",\n    \"grid-template\", \"grid-template-areas\", \"grid-template-columns\",\n    \"grid-template-rows\", \"hanging-punctuation\", \"height\", \"hyphens\",\n    \"icon\", \"image-orientation\", \"image-rendering\", \"image-resolution\",\n    \"inline-box-align\", \"justify-content\", \"left\", \"letter-spacing\",\n    \"line-break\", \"line-height\", \"line-stacking\", \"line-stacking-ruby\",\n    \"line-stacking-shift\", \"line-stacking-strategy\", \"list-style\",\n    \"list-style-image\", \"list-style-position\", \"list-style-type\", \"margin\",\n    \"margin-bottom\", \"margin-left\", \"margin-right\", \"margin-top\",\n    \"marker-offset\", \"marks\", \"marquee-direction\", \"marquee-loop\",\n    \"marquee-play-count\", \"marquee-speed\", \"marquee-style\", \"max-height\",\n    \"max-width\", \"min-height\", \"min-width\", \"move-to\", \"nav-down\", \"nav-index\",\n    \"nav-left\", \"nav-right\", \"nav-up\", \"object-fit\", \"object-position\",\n    \"opacity\", \"order\", \"orphans\", \"outline\",\n    \"outline-color\", \"outline-offset\", \"outline-style\", \"outline-width\",\n    \"overflow\", \"overflow-style\", \"overflow-wrap\", \"overflow-x\", \"overflow-y\",\n    \"padding\", \"padding-bottom\", \"padding-left\", \"padding-right\", \"padding-top\",\n    \"page\", \"page-break-after\", \"page-break-before\", \"page-break-inside\",\n    \"page-policy\", \"pause\", \"pause-after\", \"pause-before\", \"perspective\",\n    \"perspective-origin\", \"pitch\", \"pitch-range\", \"play-during\", \"position\",\n    \"presentation-level\", \"punctuation-trim\", \"quotes\", \"region-break-after\",\n    \"region-break-before\", \"region-break-inside\", \"region-fragment\",\n    \"rendering-intent\", \"resize\", \"rest\", \"rest-after\", \"rest-before\", \"richness\",\n    \"right\", \"rotation\", \"rotation-point\", \"ruby-align\", \"ruby-overhang\",\n    \"ruby-position\", \"ruby-span\", \"shape-image-threshold\", \"shape-inside\", \"shape-margin\",\n    \"shape-outside\", \"size\", \"speak\", \"speak-as\", \"speak-header\",\n    \"speak-numeral\", \"speak-punctuation\", \"speech-rate\", \"stress\", \"string-set\",\n    \"tab-size\", \"table-layout\", \"target\", \"target-name\", \"target-new\",\n    \"target-position\", \"text-align\", \"text-align-last\", \"text-decoration\",\n    \"text-decoration-color\", \"text-decoration-line\", \"text-decoration-skip\",\n    \"text-decoration-style\", \"text-emphasis\", \"text-emphasis-color\",\n    \"text-emphasis-position\", \"text-emphasis-style\", \"text-height\",\n    \"text-indent\", \"text-justify\", \"text-outline\", \"text-overflow\", \"text-shadow\",\n    \"text-size-adjust\", \"text-space-collapse\", \"text-transform\", \"text-underline-position\",\n    \"text-wrap\", \"top\", \"transform\", \"transform-origin\", \"transform-style\",\n    \"transition\", \"transition-delay\", \"transition-duration\",\n    \"transition-property\", \"transition-timing-function\", \"unicode-bidi\",\n    \"vertical-align\", \"visibility\", \"voice-balance\", \"voice-duration\",\n    \"voice-family\", \"voice-pitch\", \"voice-range\", \"voice-rate\", \"voice-stress\",\n    \"voice-volume\", \"volume\", \"white-space\", \"widows\", \"width\", \"word-break\",\n    \"word-spacing\", \"word-wrap\", \"z-index\",\n    // SVG-specific\n    \"clip-path\", \"clip-rule\", \"mask\", \"enable-background\", \"filter\", \"flood-color\",\n    \"flood-opacity\", \"lighting-color\", \"stop-color\", \"stop-opacity\", \"pointer-events\",\n    \"color-interpolation\", \"color-interpolation-filters\",\n    \"color-rendering\", \"fill\", \"fill-opacity\", \"fill-rule\", \"image-rendering\",\n    \"marker\", \"marker-end\", \"marker-mid\", \"marker-start\", \"shape-rendering\", \"stroke\",\n    \"stroke-dasharray\", \"stroke-dashoffset\", \"stroke-linecap\", \"stroke-linejoin\",\n    \"stroke-miterlimit\", \"stroke-opacity\", \"stroke-width\", \"text-rendering\",\n    \"baseline-shift\", \"dominant-baseline\", \"glyph-orientation-horizontal\",\n    \"glyph-orientation-vertical\", \"text-anchor\", \"writing-mode\"\n  ], propertyKeywords = keySet(propertyKeywords_);\n\n  var nonStandardPropertyKeywords_ = [\n    \"scrollbar-arrow-color\", \"scrollbar-base-color\", \"scrollbar-dark-shadow-color\",\n    \"scrollbar-face-color\", \"scrollbar-highlight-color\", \"scrollbar-shadow-color\",\n    \"scrollbar-3d-light-color\", \"scrollbar-track-color\", \"shape-inside\",\n    \"searchfield-cancel-button\", \"searchfield-decoration\", \"searchfield-results-button\",\n    \"searchfield-results-decoration\", \"zoom\"\n  ], nonStandardPropertyKeywords = keySet(nonStandardPropertyKeywords_);\n\n  var fontProperties_ = [\n    \"font-family\", \"src\", \"unicode-range\", \"font-variant\", \"font-feature-settings\",\n    \"font-stretch\", \"font-weight\", \"font-style\"\n  ], fontProperties = keySet(fontProperties_);\n\n  var counterDescriptors_ = [\n    \"additive-symbols\", \"fallback\", \"negative\", \"pad\", \"prefix\", \"range\",\n    \"speak-as\", \"suffix\", \"symbols\", \"system\"\n  ], counterDescriptors = keySet(counterDescriptors_);\n\n  var colorKeywords_ = [\n    \"aliceblue\", \"antiquewhite\", \"aqua\", \"aquamarine\", \"azure\", \"beige\",\n    \"bisque\", \"black\", \"blanchedalmond\", \"blue\", \"blueviolet\", \"brown\",\n    \"burlywood\", \"cadetblue\", \"chartreuse\", \"chocolate\", \"coral\", \"cornflowerblue\",\n    \"cornsilk\", \"crimson\", \"cyan\", \"darkblue\", \"darkcyan\", \"darkgoldenrod\",\n    \"darkgray\", \"darkgreen\", \"darkkhaki\", \"darkmagenta\", \"darkolivegreen\",\n    \"darkorange\", \"darkorchid\", \"darkred\", \"darksalmon\", \"darkseagreen\",\n    \"darkslateblue\", \"darkslategray\", \"darkturquoise\", \"darkviolet\",\n    \"deeppink\", \"deepskyblue\", \"dimgray\", \"dodgerblue\", \"firebrick\",\n    \"floralwhite\", \"forestgreen\", \"fuchsia\", \"gainsboro\", \"ghostwhite\",\n    \"gold\", \"goldenrod\", \"gray\", \"grey\", \"green\", \"greenyellow\", \"honeydew\",\n    \"hotpink\", \"indianred\", \"indigo\", \"ivory\", \"khaki\", \"lavender\",\n    \"lavenderblush\", \"lawngreen\", \"lemonchiffon\", \"lightblue\", \"lightcoral\",\n    \"lightcyan\", \"lightgoldenrodyellow\", \"lightgray\", \"lightgreen\", \"lightpink\",\n    \"lightsalmon\", \"lightseagreen\", \"lightskyblue\", \"lightslategray\",\n    \"lightsteelblue\", \"lightyellow\", \"lime\", \"limegreen\", \"linen\", \"magenta\",\n    \"maroon\", \"mediumaquamarine\", \"mediumblue\", \"mediumorchid\", \"mediumpurple\",\n    \"mediumseagreen\", \"mediumslateblue\", \"mediumspringgreen\", \"mediumturquoise\",\n    \"mediumvioletred\", \"midnightblue\", \"mintcream\", \"mistyrose\", \"moccasin\",\n    \"navajowhite\", \"navy\", \"oldlace\", \"olive\", \"olivedrab\", \"orange\", \"orangered\",\n    \"orchid\", \"palegoldenrod\", \"palegreen\", \"paleturquoise\", \"palevioletred\",\n    \"papayawhip\", \"peachpuff\", \"peru\", \"pink\", \"plum\", \"powderblue\",\n    \"purple\", \"rebeccapurple\", \"red\", \"rosybrown\", \"royalblue\", \"saddlebrown\",\n    \"salmon\", \"sandybrown\", \"seagreen\", \"seashell\", \"sienna\", \"silver\", \"skyblue\",\n    \"slateblue\", \"slategray\", \"snow\", \"springgreen\", \"steelblue\", \"tan\",\n    \"teal\", \"thistle\", \"tomato\", \"turquoise\", \"violet\", \"wheat\", \"white\",\n    \"whitesmoke\", \"yellow\", \"yellowgreen\"\n  ], colorKeywords = keySet(colorKeywords_);\n\n  var valueKeywords_ = [\n    \"above\", \"absolute\", \"activeborder\", \"additive\", \"activecaption\", \"afar\",\n    \"after-white-space\", \"ahead\", \"alias\", \"all\", \"all-scroll\", \"alphabetic\", \"alternate\",\n    \"always\", \"amharic\", \"amharic-abegede\", \"antialiased\", \"appworkspace\",\n    \"arabic-indic\", \"armenian\", \"asterisks\", \"attr\", \"auto\", \"avoid\", \"avoid-column\", \"avoid-page\",\n    \"avoid-region\", \"background\", \"backwards\", \"baseline\", \"below\", \"bidi-override\", \"binary\",\n    \"bengali\", \"blink\", \"block\", \"block-axis\", \"bold\", \"bolder\", \"border\", \"border-box\",\n    \"both\", \"bottom\", \"break\", \"break-all\", \"break-word\", \"bullets\", \"button\", \"button-bevel\",\n    \"buttonface\", \"buttonhighlight\", \"buttonshadow\", \"buttontext\", \"calc\", \"cambodian\",\n    \"capitalize\", \"caps-lock-indicator\", \"caption\", \"captiontext\", \"caret\",\n    \"cell\", \"center\", \"checkbox\", \"circle\", \"cjk-decimal\", \"cjk-earthly-branch\",\n    \"cjk-heavenly-stem\", \"cjk-ideographic\", \"clear\", \"clip\", \"close-quote\",\n    \"col-resize\", \"collapse\", \"column\", \"compact\", \"condensed\", \"contain\", \"content\",\n    \"content-box\", \"context-menu\", \"continuous\", \"copy\", \"counter\", \"counters\", \"cover\", \"crop\",\n    \"cross\", \"crosshair\", \"currentcolor\", \"cursive\", \"cyclic\", \"dashed\", \"decimal\",\n    \"decimal-leading-zero\", \"default\", \"default-button\", \"destination-atop\",\n    \"destination-in\", \"destination-out\", \"destination-over\", \"devanagari\",\n    \"disc\", \"discard\", \"disclosure-closed\", \"disclosure-open\", \"document\",\n    \"dot-dash\", \"dot-dot-dash\",\n    \"dotted\", \"double\", \"down\", \"e-resize\", \"ease\", \"ease-in\", \"ease-in-out\", \"ease-out\",\n    \"element\", \"ellipse\", \"ellipsis\", \"embed\", \"end\", \"ethiopic\", \"ethiopic-abegede\",\n    \"ethiopic-abegede-am-et\", \"ethiopic-abegede-gez\", \"ethiopic-abegede-ti-er\",\n    \"ethiopic-abegede-ti-et\", \"ethiopic-halehame-aa-er\",\n    \"ethiopic-halehame-aa-et\", \"ethiopic-halehame-am-et\",\n    \"ethiopic-halehame-gez\", \"ethiopic-halehame-om-et\",\n    \"ethiopic-halehame-sid-et\", \"ethiopic-halehame-so-et\",\n    \"ethiopic-halehame-ti-er\", \"ethiopic-halehame-ti-et\", \"ethiopic-halehame-tig\",\n    \"ethiopic-numeric\", \"ew-resize\", \"expanded\", \"extends\", \"extra-condensed\",\n    \"extra-expanded\", \"fantasy\", \"fast\", \"fill\", \"fixed\", \"flat\", \"flex\", \"footnotes\",\n    \"forwards\", \"from\", \"geometricPrecision\", \"georgian\", \"graytext\", \"groove\",\n    \"gujarati\", \"gurmukhi\", \"hand\", \"hangul\", \"hangul-consonant\", \"hebrew\",\n    \"help\", \"hidden\", \"hide\", \"higher\", \"highlight\", \"highlighttext\",\n    \"hiragana\", \"hiragana-iroha\", \"horizontal\", \"hsl\", \"hsla\", \"icon\", \"ignore\",\n    \"inactiveborder\", \"inactivecaption\", \"inactivecaptiontext\", \"infinite\",\n    \"infobackground\", \"infotext\", \"inherit\", \"initial\", \"inline\", \"inline-axis\",\n    \"inline-block\", \"inline-flex\", \"inline-table\", \"inset\", \"inside\", \"intrinsic\", \"invert\",\n    \"italic\", \"japanese-formal\", \"japanese-informal\", \"justify\", \"kannada\",\n    \"katakana\", \"katakana-iroha\", \"keep-all\", \"khmer\",\n    \"korean-hangul-formal\", \"korean-hanja-formal\", \"korean-hanja-informal\",\n    \"landscape\", \"lao\", \"large\", \"larger\", \"left\", \"level\", \"lighter\",\n    \"line-through\", \"linear\", \"linear-gradient\", \"lines\", \"list-item\", \"listbox\", \"listitem\",\n    \"local\", \"logical\", \"loud\", \"lower\", \"lower-alpha\", \"lower-armenian\",\n    \"lower-greek\", \"lower-hexadecimal\", \"lower-latin\", \"lower-norwegian\",\n    \"lower-roman\", \"lowercase\", \"ltr\", \"malayalam\", \"match\", \"matrix\", \"matrix3d\",\n    \"media-controls-background\", \"media-current-time-display\",\n    \"media-fullscreen-button\", \"media-mute-button\", \"media-play-button\",\n    \"media-return-to-realtime-button\", \"media-rewind-button\",\n    \"media-seek-back-button\", \"media-seek-forward-button\", \"media-slider\",\n    \"media-sliderthumb\", \"media-time-remaining-display\", \"media-volume-slider\",\n    \"media-volume-slider-container\", \"media-volume-sliderthumb\", \"medium\",\n    \"menu\", \"menulist\", \"menulist-button\", \"menulist-text\",\n    \"menulist-textfield\", \"menutext\", \"message-box\", \"middle\", \"min-intrinsic\",\n    \"mix\", \"mongolian\", \"monospace\", \"move\", \"multiple\", \"myanmar\", \"n-resize\",\n    \"narrower\", \"ne-resize\", \"nesw-resize\", \"no-close-quote\", \"no-drop\",\n    \"no-open-quote\", \"no-repeat\", \"none\", \"normal\", \"not-allowed\", \"nowrap\",\n    \"ns-resize\", \"numbers\", \"numeric\", \"nw-resize\", \"nwse-resize\", \"oblique\", \"octal\", \"open-quote\",\n    \"optimizeLegibility\", \"optimizeSpeed\", \"oriya\", \"oromo\", \"outset\",\n    \"outside\", \"outside-shape\", \"overlay\", \"overline\", \"padding\", \"padding-box\",\n    \"painted\", \"page\", \"paused\", \"persian\", \"perspective\", \"plus-darker\", \"plus-lighter\",\n    \"pointer\", \"polygon\", \"portrait\", \"pre\", \"pre-line\", \"pre-wrap\", \"preserve-3d\",\n    \"progress\", \"push-button\", \"radial-gradient\", \"radio\", \"read-only\",\n    \"read-write\", \"read-write-plaintext-only\", \"rectangle\", \"region\",\n    \"relative\", \"repeat\", \"repeating-linear-gradient\",\n    \"repeating-radial-gradient\", \"repeat-x\", \"repeat-y\", \"reset\", \"reverse\",\n    \"rgb\", \"rgba\", \"ridge\", \"right\", \"rotate\", \"rotate3d\", \"rotateX\", \"rotateY\",\n    \"rotateZ\", \"round\", \"row-resize\", \"rtl\", \"run-in\", \"running\",\n    \"s-resize\", \"sans-serif\", \"scale\", \"scale3d\", \"scaleX\", \"scaleY\", \"scaleZ\",\n    \"scroll\", \"scrollbar\", \"se-resize\", \"searchfield\",\n    \"searchfield-cancel-button\", \"searchfield-decoration\",\n    \"searchfield-results-button\", \"searchfield-results-decoration\",\n    \"semi-condensed\", \"semi-expanded\", \"separate\", \"serif\", \"show\", \"sidama\",\n    \"simp-chinese-formal\", \"simp-chinese-informal\", \"single\",\n    \"skew\", \"skewX\", \"skewY\", \"skip-white-space\", \"slide\", \"slider-horizontal\",\n    \"slider-vertical\", \"sliderthumb-horizontal\", \"sliderthumb-vertical\", \"slow\",\n    \"small\", \"small-caps\", \"small-caption\", \"smaller\", \"solid\", \"somali\",\n    \"source-atop\", \"source-in\", \"source-out\", \"source-over\", \"space\", \"spell-out\", \"square\",\n    \"square-button\", \"start\", \"static\", \"status-bar\", \"stretch\", \"stroke\", \"sub\",\n    \"subpixel-antialiased\", \"super\", \"sw-resize\", \"symbolic\", \"symbols\", \"table\",\n    \"table-caption\", \"table-cell\", \"table-column\", \"table-column-group\",\n    \"table-footer-group\", \"table-header-group\", \"table-row\", \"table-row-group\",\n    \"tamil\",\n    \"telugu\", \"text\", \"text-bottom\", \"text-top\", \"textarea\", \"textfield\", \"thai\",\n    \"thick\", \"thin\", \"threeddarkshadow\", \"threedface\", \"threedhighlight\",\n    \"threedlightshadow\", \"threedshadow\", \"tibetan\", \"tigre\", \"tigrinya-er\",\n    \"tigrinya-er-abegede\", \"tigrinya-et\", \"tigrinya-et-abegede\", \"to\", \"top\",\n    \"trad-chinese-formal\", \"trad-chinese-informal\",\n    \"translate\", \"translate3d\", \"translateX\", \"translateY\", \"translateZ\",\n    \"transparent\", \"ultra-condensed\", \"ultra-expanded\", \"underline\", \"up\",\n    \"upper-alpha\", \"upper-armenian\", \"upper-greek\", \"upper-hexadecimal\",\n    \"upper-latin\", \"upper-norwegian\", \"upper-roman\", \"uppercase\", \"urdu\", \"url\",\n    \"var\", \"vertical\", \"vertical-text\", \"visible\", \"visibleFill\", \"visiblePainted\",\n    \"visibleStroke\", \"visual\", \"w-resize\", \"wait\", \"wave\", \"wider\",\n    \"window\", \"windowframe\", \"windowtext\", \"words\", \"x-large\", \"x-small\", \"xor\",\n    \"xx-large\", \"xx-small\"\n  ], valueKeywords = keySet(valueKeywords_);\n\n  var allWords = documentTypes_.concat(mediaTypes_).concat(mediaFeatures_).concat(propertyKeywords_)\n    .concat(nonStandardPropertyKeywords_).concat(colorKeywords_).concat(valueKeywords_);\n  CodeMirror.registerHelper(\"hintWords\", \"css\", allWords);\n\n  function tokenCComment(stream, state) {\n    var maybeEnd = false, ch;\n    while ((ch = stream.next()) != null) {\n      if (maybeEnd && ch == \"/\") {\n        state.tokenize = null;\n        break;\n      }\n      maybeEnd = (ch == \"*\");\n    }\n    return [\"comment\", \"comment\"];\n  }\n\n  function tokenSGMLComment(stream, state) {\n    if (stream.skipTo(\"-->\")) {\n      stream.match(\"-->\");\n      state.tokenize = null;\n    } else {\n      stream.skipToEnd();\n    }\n    return [\"comment\", \"comment\"];\n  }\n\n  CodeMirror.defineMIME(\"text/css\", {\n    documentTypes: documentTypes,\n    mediaTypes: mediaTypes,\n    mediaFeatures: mediaFeatures,\n    propertyKeywords: propertyKeywords,\n    nonStandardPropertyKeywords: nonStandardPropertyKeywords,\n    fontProperties: fontProperties,\n    counterDescriptors: counterDescriptors,\n    colorKeywords: colorKeywords,\n    valueKeywords: valueKeywords,\n    tokenHooks: {\n      \"<\": function(stream, state) {\n        if (!stream.match(\"!--\")) return false;\n        state.tokenize = tokenSGMLComment;\n        return tokenSGMLComment(stream, state);\n      },\n      \"/\": function(stream, state) {\n        if (!stream.eat(\"*\")) return false;\n        state.tokenize = tokenCComment;\n        return tokenCComment(stream, state);\n      }\n    },\n    name: \"css\"\n  });\n\n  CodeMirror.defineMIME(\"text/x-scss\", {\n    mediaTypes: mediaTypes,\n    mediaFeatures: mediaFeatures,\n    propertyKeywords: propertyKeywords,\n    nonStandardPropertyKeywords: nonStandardPropertyKeywords,\n    colorKeywords: colorKeywords,\n    valueKeywords: valueKeywords,\n    fontProperties: fontProperties,\n    allowNested: true,\n    tokenHooks: {\n      \"/\": function(stream, state) {\n        if (stream.eat(\"/\")) {\n          stream.skipToEnd();\n          return [\"comment\", \"comment\"];\n        } else if (stream.eat(\"*\")) {\n          state.tokenize = tokenCComment;\n          return tokenCComment(stream, state);\n        } else {\n          return [\"operator\", \"operator\"];\n        }\n      },\n      \":\": function(stream) {\n        if (stream.match(/\\s*\\{/))\n          return [null, \"{\"];\n        return false;\n      },\n      \"$\": function(stream) {\n        stream.match(/^[\\w-]+/);\n        if (stream.match(/^\\s*:/, false))\n          return [\"variable-2\", \"variable-definition\"];\n        return [\"variable-2\", \"variable\"];\n      },\n      \"#\": function(stream) {\n        if (!stream.eat(\"{\")) return false;\n        return [null, \"interpolation\"];\n      }\n    },\n    name: \"css\",\n    helperType: \"scss\"\n  });\n\n  CodeMirror.defineMIME(\"text/x-less\", {\n    mediaTypes: mediaTypes,\n    mediaFeatures: mediaFeatures,\n    propertyKeywords: propertyKeywords,\n    nonStandardPropertyKeywords: nonStandardPropertyKeywords,\n    colorKeywords: colorKeywords,\n    valueKeywords: valueKeywords,\n    fontProperties: fontProperties,\n    allowNested: true,\n    tokenHooks: {\n      \"/\": function(stream, state) {\n        if (stream.eat(\"/\")) {\n          stream.skipToEnd();\n          return [\"comment\", \"comment\"];\n        } else if (stream.eat(\"*\")) {\n          state.tokenize = tokenCComment;\n          return tokenCComment(stream, state);\n        } else {\n          return [\"operator\", \"operator\"];\n        }\n      },\n      \"@\": function(stream) {\n        if (stream.match(/^(charset|document|font-face|import|(-(moz|ms|o|webkit)-)?keyframes|media|namespace|page|supports)\\b/, false)) return false;\n        stream.eatWhile(/[\\w\\\\\\-]/);\n        if (stream.match(/^\\s*:/, false))\n          return [\"variable-2\", \"variable-definition\"];\n        return [\"variable-2\", \"variable\"];\n      },\n      \"&\": function() {\n        return [\"atom\", \"atom\"];\n      }\n    },\n    name: \"css\",\n    helperType: \"less\"\n  });\n\n});\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/css/index.html",
    "content": "<!doctype html>\n\n<title>CodeMirror: CSS mode</title>\n<meta charset=\"utf-8\"/>\n<link rel=stylesheet href=\"../../doc/docs.css\">\n\n<link rel=\"stylesheet\" href=\"../../lib/codemirror.css\">\n<link rel=\"stylesheet\" href=\"../../addon/hint/show-hint.css\">\n<script src=\"../../lib/codemirror.js\"></script>\n<script src=\"css.js\"></script>\n<script src=\"../../addon/hint/show-hint.js\"></script>\n<script src=\"../../addon/hint/css-hint.js\"></script>\n<style>.CodeMirror {background: #f8f8f8;}</style>\n<div id=nav>\n  <a href=\"http://codemirror.net\"><h1>CodeMirror</h1><img id=logo src=\"../../doc/logo.png\"></a>\n\n  <ul>\n    <li><a href=\"../../index.html\">Home</a>\n    <li><a href=\"../../doc/manual.html\">Manual</a>\n    <li><a href=\"https://github.com/codemirror/codemirror\">Code</a>\n  </ul>\n  <ul>\n    <li><a href=\"../index.html\">Language modes</a>\n    <li><a class=active href=\"#\">CSS</a>\n  </ul>\n</div>\n\n<article>\n<h2>CSS mode</h2>\n<form><textarea id=\"code\" name=\"code\">\n/* Some example CSS */\n\n@import url(\"something.css\");\n\nbody {\n  margin: 0;\n  padding: 3em 6em;\n  font-family: tahoma, arial, sans-serif;\n  color: #000;\n}\n\n#navigation a {\n  font-weight: bold;\n  text-decoration: none !important;\n}\n\nh1 {\n  font-size: 2.5em;\n}\n\nh2 {\n  font-size: 1.7em;\n}\n\nh1:before, h2:before {\n  content: \"::\";\n}\n\ncode {\n  font-family: courier, monospace;\n  font-size: 80%;\n  color: #418A8A;\n}\n</textarea></form>\n    <script>\n      var editor = CodeMirror.fromTextArea(document.getElementById(\"code\"), {\n        extraKeys: {\"Ctrl-Space\": \"autocomplete\"},\n      });\n    </script>\n\n    <p><strong>MIME types defined:</strong> <code>text/css</code>, <code>text/x-scss</code> (<a href=\"scss.html\">demo</a>), <code>text/x-less</code> (<a href=\"less.html\">demo</a>).</p>\n\n    <p><strong>Parsing/Highlighting Tests:</strong> <a href=\"../../test/index.html#css_*\">normal</a>,  <a href=\"../../test/index.html#verbose,css_*\">verbose</a>.</p>\n\n  </article>\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/css/less.html",
    "content": "<!doctype html>\n\n<title>CodeMirror: LESS mode</title>\n<meta charset=\"utf-8\"/>\n<link rel=stylesheet href=\"../../doc/docs.css\">\n\n<link rel=\"stylesheet\" href=\"../../lib/codemirror.css\">\n<script src=\"../../lib/codemirror.js\"></script>\n<script src=\"../../addon/edit/matchbrackets.js\"></script>\n<script src=\"css.js\"></script>\n<style>.CodeMirror {border: 1px solid #ddd; line-height: 1.2;}</style>\n<div id=nav>\n  <a href=\"http://codemirror.net\"><h1>CodeMirror</h1><img id=logo src=\"../../doc/logo.png\"></a>\n\n  <ul>\n    <li><a href=\"../../index.html\">Home</a>\n    <li><a href=\"../../doc/manual.html\">Manual</a>\n    <li><a href=\"https://github.com/codemirror/codemirror\">Code</a>\n  </ul>\n  <ul>\n    <li><a href=\"../index.html\">Language modes</a>\n    <li><a class=active href=\"#\">LESS</a>\n  </ul>\n</div>\n\n<article>\n<h2>LESS mode</h2>\n<form><textarea id=\"code\" name=\"code\">@media screen and (device-aspect-ratio: 16/9) { … }\n@media screen and (device-aspect-ratio: 1280/720) { … }\n@media screen and (device-aspect-ratio: 2560/1440) { … }\n\nhtml:lang(fr-be)\n\ntr:nth-child(2n+1) /* represents every odd row of an HTML table */\n\nimg:nth-of-type(2n+1) { float: right; }\nimg:nth-of-type(2n) { float: left; }\n\nbody > h2:not(:first-of-type):not(:last-of-type)\n\nhtml|*:not(:link):not(:visited)\n*|*:not(:hover)\np::first-line { text-transform: uppercase }\n\n@namespace foo url(http://www.example.com);\nfoo|h1 { color: blue }  /* first rule */\n\nspan[hello=\"Ocean\"][goodbye=\"Land\"]\n\nE[foo]{\n  padding:65px;\n}\n\ninput[type=\"search\"]::-webkit-search-decoration,\ninput[type=\"search\"]::-webkit-search-cancel-button {\n  -webkit-appearance: none; // Inner-padding issues in Chrome OSX, Safari 5\n}\nbutton::-moz-focus-inner,\ninput::-moz-focus-inner { // Inner padding and border oddities in FF3/4\n  padding: 0;\n  border: 0;\n}\n.btn {\n  // reset here as of 2.0.3 due to Recess property order\n  border-color: #ccc;\n  border-color: rgba(0,0,0,.1) rgba(0,0,0,.1) rgba(0,0,0,.25);\n}\nfieldset span button, fieldset span input[type=\"file\"] {\n  font-size:12px;\n\tfont-family:Arial, Helvetica, sans-serif;\n}\n\n.rounded-corners (@radius: 5px) {\n  border-radius: @radius;\n  -webkit-border-radius: @radius;\n  -moz-border-radius: @radius;\n}\n\n@import url(\"something.css\");\n\n@light-blue:   hsl(190, 50%, 65%);\n\n#menu {\n  position: absolute;\n  width: 100%;\n  z-index: 3;\n  clear: both;\n  display: block;\n  background-color: @blue;\n  height: 42px;\n  border-top: 2px solid lighten(@alpha-blue, 20%);\n  border-bottom: 2px solid darken(@alpha-blue, 25%);\n  .box-shadow(0, 1px, 8px, 0.6);\n  -moz-box-shadow: 0 0 0 #000; // Because firefox sucks.\n\n  &.docked {\n    background-color: hsla(210, 60%, 40%, 0.4);\n  }\n  &:hover {\n    background-color: @blue;\n  }\n\n  #dropdown {\n    margin: 0 0 0 117px;\n    padding: 0;\n    padding-top: 5px;\n    display: none;\n    width: 190px;\n    border-top: 2px solid @medium;\n    color: @highlight;\n    border: 2px solid darken(@medium, 25%);\n    border-left-color: darken(@medium, 15%);\n    border-right-color: darken(@medium, 15%);\n    border-top-width: 0;\n    background-color: darken(@medium, 10%);\n    ul {\n      padding: 0px;  \n    }\n    li {\n      font-size: 14px;\n      display: block;\n      text-align: left;\n      padding: 0;\n      border: 0;\n      a {\n        display: block;\n        padding: 0px 15px;  \n        text-decoration: none;\n        color: white;  \n        &:hover {\n          background-color: darken(@medium, 15%);\n          text-decoration: none;\n        }\n      }\n    }\n    .border-radius(5px, bottom);\n    .box-shadow(0, 6px, 8px, 0.5);\n  }\n}\n</textarea></form>\n    <script>\n      var editor = CodeMirror.fromTextArea(document.getElementById(\"code\"), {\n        lineNumbers : true,\n        matchBrackets : true,\n        mode: \"text/x-less\"\n      });\n    </script>\n\n    <p>The LESS mode is a sub-mode of the <a href=\"index.html\">CSS mode</a> (defined in <code>css.js</code>.</p>\n\n    <p><strong>Parsing/Highlighting Tests:</strong> <a href=\"../../test/index.html#less_*\">normal</a>,  <a href=\"../../test/index.html#verbose,less_*\">verbose</a>.</p>\n  </article>\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/css/less_test.js",
    "content": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n(function() {\n  \"use strict\";\n\n  var mode = CodeMirror.getMode({indentUnit: 2}, \"text/x-less\");\n  function MT(name) { test.mode(name, mode, Array.prototype.slice.call(arguments, 1), \"less\"); }\n\n  MT(\"variable\",\n     \"[variable-2 @base]: [atom #f04615];\",\n     \"[qualifier .class] {\",\n     \"  [property width]: [variable percentage]([number 0.5]); [comment // returns `50%`]\",\n     \"  [property color]: [variable saturate]([variable-2 @base], [number 5%]);\",\n     \"}\");\n\n  MT(\"amp\",\n     \"[qualifier .child], [qualifier .sibling] {\",\n     \"  [qualifier .parent] [atom &] {\",\n     \"    [property color]: [keyword black];\",\n     \"  }\",\n     \"  [atom &] + [atom &] {\",\n     \"    [property color]: [keyword red];\",\n     \"  }\",\n     \"}\");\n\n  MT(\"mixin\",\n     \"[qualifier .mixin] ([variable dark]; [variable-2 @color]) {\",\n     \"  [property color]: [variable darken]([variable-2 @color], [number 10%]);\",\n     \"}\",\n     \"[qualifier .mixin] ([variable light]; [variable-2 @color]) {\",\n     \"  [property color]: [variable lighten]([variable-2 @color], [number 10%]);\",\n     \"}\",\n     \"[qualifier .mixin] ([variable-2 @_]; [variable-2 @color]) {\",\n     \"  [property display]: [atom block];\",\n     \"}\",\n     \"[variable-2 @switch]: [variable light];\",\n     \"[qualifier .class] {\",\n     \"  [qualifier .mixin]([variable-2 @switch]; [atom #888]);\",\n     \"}\");\n\n  MT(\"nest\",\n     \"[qualifier .one] {\",\n     \"  [def @media] ([property width]: [number 400px]) {\",\n     \"    [property font-size]: [number 1.2em];\",\n     \"    [def @media] [attribute print] [keyword and] [property color] {\",\n     \"      [property color]: [keyword blue];\",\n     \"    }\",\n     \"  }\",\n     \"}\");\n})();\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/css/scss.html",
    "content": "<!doctype html>\n\n<title>CodeMirror: SCSS mode</title>\n<meta charset=\"utf-8\"/>\n<link rel=stylesheet href=\"../../doc/docs.css\">\n\n<link rel=\"stylesheet\" href=\"../../lib/codemirror.css\">\n<script src=\"../../lib/codemirror.js\"></script>\n<script src=\"css.js\"></script>\n<style>.CodeMirror {background: #f8f8f8;}</style>\n<div id=nav>\n  <a href=\"http://codemirror.net\"><h1>CodeMirror</h1><img id=logo src=\"../../doc/logo.png\"></a>\n\n  <ul>\n    <li><a href=\"../../index.html\">Home</a>\n    <li><a href=\"../../doc/manual.html\">Manual</a>\n    <li><a href=\"https://github.com/codemirror/codemirror\">Code</a>\n  </ul>\n  <ul>\n    <li><a href=\"../index.html\">Language modes</a>\n    <li><a class=active href=\"#\">SCSS</a>\n  </ul>\n</div>\n\n<article>\n<h2>SCSS mode</h2>\n<form><textarea id=\"code\" name=\"code\">\n/* Some example SCSS */\n\n@import \"compass/css3\";\n$variable: #333;\n\n$blue: #3bbfce;\n$margin: 16px;\n\n.content-navigation {\n  #nested {\n    background-color: black;\n  }\n  border-color: $blue;\n  color:\n    darken($blue, 9%);\n}\n\n.border {\n  padding: $margin / 2;\n  margin: $margin / 2;\n  border-color: $blue;\n}\n\n@mixin table-base {\n  th {\n    text-align: center;\n    font-weight: bold;\n  }\n  td, th {padding: 2px}\n}\n\ntable.hl {\n  margin: 2em 0;\n  td.ln {\n    text-align: right;\n  }\n}\n\nli {\n  font: {\n    family: serif;\n    weight: bold;\n    size: 1.2em;\n  }\n}\n\n@mixin left($dist) {\n  float: left;\n  margin-left: $dist;\n}\n\n#data {\n  @include left(10px);\n  @include table-base;\n}\n\n.source {\n  @include flow-into(target);\n  border: 10px solid green;\n  margin: 20px;\n  width: 200px; }\n\n.new-container {\n  @include flow-from(target);\n  border: 10px solid red;\n  margin: 20px;\n  width: 200px; }\n\nbody {\n  margin: 0;\n  padding: 3em 6em;\n  font-family: tahoma, arial, sans-serif;\n  color: #000;\n}\n\n@mixin yellow() {\n  background: yellow;\n}\n\n.big {\n  font-size: 14px;\n}\n\n.nested {\n  @include border-radius(3px);\n  @extend .big;\n  p {\n    background: whitesmoke;\n    a {\n      color: red;\n    }\n  }\n}\n\n#navigation a {\n  font-weight: bold;\n  text-decoration: none !important;\n}\n\nh1 {\n  font-size: 2.5em;\n}\n\nh2 {\n  font-size: 1.7em;\n}\n\nh1:before, h2:before {\n  content: \"::\";\n}\n\ncode {\n  font-family: courier, monospace;\n  font-size: 80%;\n  color: #418A8A;\n}\n</textarea></form>\n    <script>\n      var editor = CodeMirror.fromTextArea(document.getElementById(\"code\"), {\n        lineNumbers: true,\n        matchBrackets: true,\n        mode: \"text/x-scss\"\n      });\n    </script>\n\n    <p>The SCSS mode is a sub-mode of the <a href=\"index.html\">CSS mode</a> (defined in <code>css.js</code>.</p>\n\n    <p><strong>Parsing/Highlighting Tests:</strong> <a href=\"../../test/index.html#scss_*\">normal</a>,  <a href=\"../../test/index.html#verbose,scss_*\">verbose</a>.</p>\n\n  </article>\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/css/scss_test.js",
    "content": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n(function() {\n  var mode = CodeMirror.getMode({indentUnit: 2}, \"text/x-scss\");\n  function MT(name) { test.mode(name, mode, Array.prototype.slice.call(arguments, 1), \"scss\"); }\n\n  MT('url_with_quotation',\n    \"[tag foo] { [property background]:[atom url]([string test.jpg]) }\");\n\n  MT('url_with_double_quotes',\n    \"[tag foo] { [property background]:[atom url]([string \\\"test.jpg\\\"]) }\");\n\n  MT('url_with_single_quotes',\n    \"[tag foo] { [property background]:[atom url]([string \\'test.jpg\\']) }\");\n\n  MT('string',\n    \"[def @import] [string \\\"compass/css3\\\"]\");\n\n  MT('important_keyword',\n    \"[tag foo] { [property background]:[atom url]([string \\'test.jpg\\']) [keyword !important] }\");\n\n  MT('variable',\n    \"[variable-2 $blue]:[atom #333]\");\n\n  MT('variable_as_attribute',\n    \"[tag foo] { [property color]:[variable-2 $blue] }\");\n\n  MT('numbers',\n    \"[tag foo] { [property padding]:[number 10px] [number 10] [number 10em] [number 8in] }\");\n\n  MT('number_percentage',\n    \"[tag foo] { [property width]:[number 80%] }\");\n\n  MT('selector',\n    \"[builtin #hello][qualifier .world]{}\");\n\n  MT('singleline_comment',\n    \"[comment // this is a comment]\");\n\n  MT('multiline_comment',\n    \"[comment /*foobar*/]\");\n\n  MT('attribute_with_hyphen',\n    \"[tag foo] { [property font-size]:[number 10px] }\");\n\n  MT('string_after_attribute',\n    \"[tag foo] { [property content]:[string \\\"::\\\"] }\");\n\n  MT('directives',\n    \"[def @include] [qualifier .mixin]\");\n\n  MT('basic_structure',\n    \"[tag p] { [property background]:[keyword red]; }\");\n\n  MT('nested_structure',\n    \"[tag p] { [tag a] { [property color]:[keyword red]; } }\");\n\n  MT('mixin',\n    \"[def @mixin] [tag table-base] {}\");\n\n  MT('number_without_semicolon',\n    \"[tag p] {[property width]:[number 12]}\",\n    \"[tag a] {[property color]:[keyword red];}\");\n\n  MT('atom_in_nested_block',\n    \"[tag p] { [tag a] { [property color]:[atom #000]; } }\");\n\n  MT('interpolation_in_property',\n    \"[tag foo] { #{[variable-2 $hello]}:[number 2]; }\");\n\n  MT('interpolation_in_selector',\n    \"[tag foo]#{[variable-2 $hello]} { [property color]:[atom #000]; }\");\n\n  MT('interpolation_error',\n    \"[tag foo]#{[error foo]} { [property color]:[atom #000]; }\");\n\n  MT(\"divide_operator\",\n    \"[tag foo] { [property width]:[number 4] [operator /] [number 2] }\");\n\n  MT('nested_structure_with_id_selector',\n    \"[tag p] { [builtin #hello] { [property color]:[keyword red]; } }\");\n\n  MT('indent_mixin',\n     \"[def @mixin] [tag container] (\",\n     \"  [variable-2 $a]: [number 10],\",\n     \"  [variable-2 $b]: [number 10])\",\n     \"{}\");\n\n  MT('indent_nested',\n     \"[tag foo] {\",\n     \"  [tag bar] {\",\n     \"  }\",\n     \"}\");\n\n  MT('indent_parentheses',\n     \"[tag foo] {\",\n     \"  [property color]: [variable darken]([variable-2 $blue],\",\n     \"    [number 9%]);\",\n     \"}\");\n\n  MT('indent_vardef',\n     \"[variable-2 $name]:\",\n     \"  [string 'val'];\",\n     \"[tag tag] {\",\n     \"  [tag inner] {\",\n     \"    [property margin]: [number 3px];\",\n     \"  }\",\n     \"}\");\n})();\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/css/test.js",
    "content": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n(function() {\n  var mode = CodeMirror.getMode({indentUnit: 2}, \"css\");\n  function MT(name) { test.mode(name, mode, Array.prototype.slice.call(arguments, 1)); }\n\n  // Error, because \"foobarhello\" is neither a known type or property, but\n  // property was expected (after \"and\"), and it should be in parenthese.\n  MT(\"atMediaUnknownType\",\n     \"[def @media] [attribute screen] [keyword and] [error foobarhello] { }\");\n\n  // Soft error, because \"foobarhello\" is not a known property or type.\n  MT(\"atMediaUnknownProperty\",\n     \"[def @media] [attribute screen] [keyword and] ([error foobarhello]) { }\");\n\n  // Make sure nesting works with media queries\n  MT(\"atMediaMaxWidthNested\",\n     \"[def @media] [attribute screen] [keyword and] ([property max-width]: [number 25px]) { [tag foo] { } }\");\n\n  MT(\"tagSelector\",\n     \"[tag foo] { }\");\n\n  MT(\"classSelector\",\n     \"[qualifier .foo-bar_hello] { }\");\n\n  MT(\"idSelector\",\n     \"[builtin #foo] { [error #foo] }\");\n\n  MT(\"tagSelectorUnclosed\",\n     \"[tag foo] { [property margin]: [number 0] } [tag bar] { }\");\n\n  MT(\"tagStringNoQuotes\",\n     \"[tag foo] { [property font-family]: [variable hello] [variable world]; }\");\n\n  MT(\"tagStringDouble\",\n     \"[tag foo] { [property font-family]: [string \\\"hello world\\\"]; }\");\n\n  MT(\"tagStringSingle\",\n     \"[tag foo] { [property font-family]: [string 'hello world']; }\");\n\n  MT(\"tagColorKeyword\",\n     \"[tag foo] {\",\n     \"  [property color]: [keyword black];\",\n     \"  [property color]: [keyword navy];\",\n     \"  [property color]: [keyword yellow];\",\n     \"}\");\n\n  MT(\"tagColorHex3\",\n     \"[tag foo] { [property background]: [atom #fff]; }\");\n\n  MT(\"tagColorHex6\",\n     \"[tag foo] { [property background]: [atom #ffffff]; }\");\n\n  MT(\"tagColorHex4\",\n     \"[tag foo] { [property background]: [atom&error #ffff]; }\");\n\n  MT(\"tagColorHexInvalid\",\n     \"[tag foo] { [property background]: [atom&error #ffg]; }\");\n\n  MT(\"tagNegativeNumber\",\n     \"[tag foo] { [property margin]: [number -5px]; }\");\n\n  MT(\"tagPositiveNumber\",\n     \"[tag foo] { [property padding]: [number 5px]; }\");\n\n  MT(\"tagVendor\",\n     \"[tag foo] { [meta -foo-][property box-sizing]: [meta -foo-][atom border-box]; }\");\n\n  MT(\"tagBogusProperty\",\n     \"[tag foo] { [property&error barhelloworld]: [number 0]; }\");\n\n  MT(\"tagTwoProperties\",\n     \"[tag foo] { [property margin]: [number 0]; [property padding]: [number 0]; }\");\n\n  MT(\"tagTwoPropertiesURL\",\n     \"[tag foo] { [property background]: [atom url]([string //example.com/foo.png]); [property padding]: [number 0]; }\");\n\n  MT(\"commentSGML\",\n     \"[comment <!--comment-->]\");\n\n  MT(\"commentSGML2\",\n     \"[comment <!--comment]\",\n     \"[comment -->] [tag div] {}\");\n\n  MT(\"indent_tagSelector\",\n     \"[tag strong], [tag em] {\",\n     \"  [property background]: [atom rgba](\",\n     \"    [number 255], [number 255], [number 0], [number .2]\",\n     \"  );\",\n     \"}\");\n\n  MT(\"indent_atMedia\",\n     \"[def @media] {\",\n     \"  [tag foo] {\",\n     \"    [property color]:\",\n     \"      [keyword yellow];\",\n     \"  }\",\n     \"}\");\n\n  MT(\"indent_comma\",\n     \"[tag foo] {\",\n     \"  [property font-family]: [variable verdana],\",\n     \"    [atom sans-serif];\",\n     \"}\");\n\n  MT(\"indent_parentheses\",\n     \"[tag foo]:[variable-3 before] {\",\n     \"  [property background]: [atom url](\",\n     \"[string     blahblah]\",\n     \"[string     etc]\",\n     \"[string   ]) [keyword !important];\",\n     \"}\");\n\n  MT(\"font_face\",\n     \"[def @font-face] {\",\n     \"  [property font-family]: [string 'myfont'];\",\n     \"  [error nonsense]: [string 'abc'];\",\n     \"  [property src]: [atom url]([string http://blah]),\",\n     \"    [atom url]([string http://foo]);\",\n     \"}\");\n\n  MT(\"empty_url\",\n     \"[def @import] [tag url]() [tag screen];\");\n\n  MT(\"parens\",\n     \"[qualifier .foo] {\",\n     \"  [property background-image]: [variable fade]([atom #000], [number 20%]);\",\n     \"  [property border-image]: [atom linear-gradient](\",\n     \"    [atom to] [atom bottom],\",\n     \"    [variable fade]([atom #000], [number 20%]) [number 0%],\",\n     \"    [variable fade]([atom #000], [number 20%]) [number 100%]\",\n     \"  );\",\n     \"}\");\n\n  MT(\"css_variable\",\n     \":[variable-3 root] {\",\n     \"  [variable-2 --main-color]: [atom #06c];\",\n     \"}\",\n     \"[tag h1][builtin #foo] {\",\n     \"  [property color]: [atom var]([variable-2 --main-color]);\",\n     \"}\");\n\n  MT(\"supports\",\n     \"[def @supports] ([keyword not] (([property text-align-last]: [atom justify]) [keyword or] ([meta -moz-][property text-align-last]: [atom justify])) {\",\n     \"  [property text-align-last]: [atom justify];\",\n     \"}\");\n\n   MT(\"document\",\n      \"[def @document] [tag url]([string http://blah]),\",\n      \"  [tag url-prefix]([string https://]),\",\n      \"  [tag domain]([string blah.com]),\",\n      \"  [tag regexp]([string \\\".*blah.+\\\"]) {\",\n      \"    [builtin #id] {\",\n      \"      [property background-color]: [keyword white];\",\n      \"    }\",\n      \"    [tag foo] {\",\n      \"      [property font-family]: [variable Verdana], [atom sans-serif];\",\n      \"    }\",\n      \"  }\");\n\n   MT(\"document_url\",\n      \"[def @document] [tag url]([string http://blah]) { [qualifier .class] { } }\");\n\n   MT(\"document_urlPrefix\",\n      \"[def @document] [tag url-prefix]([string https://]) { [builtin #id] { } }\");\n\n   MT(\"document_domain\",\n      \"[def @document] [tag domain]([string blah.com]) { [tag foo] { } }\");\n\n   MT(\"document_regexp\",\n      \"[def @document] [tag regexp]([string \\\".*blah.+\\\"]) { [builtin #id] { } }\");\n\n   MT(\"counter-style\",\n      \"[def @counter-style] [variable binary] {\",\n      \"  [property system]: [atom numeric];\",\n      \"  [property symbols]: [number 0] [number 1];\",\n      \"  [property suffix]: [string \\\".\\\"];\",\n      \"  [property range]: [atom infinite];\",\n      \"  [property speak-as]: [atom numeric];\",\n      \"}\");\n\n   MT(\"counter-style-additive-symbols\",\n      \"[def @counter-style] [variable simple-roman] {\",\n      \"  [property system]: [atom additive];\",\n      \"  [property additive-symbols]: [number 10] [variable X], [number 5] [variable V], [number 1] [variable I];\",\n      \"  [property range]: [number 1] [number 49];\",\n      \"}\");\n\n   MT(\"counter-style-use\",\n      \"[tag ol][qualifier .roman] { [property list-style]: [variable simple-roman]; }\");\n\n   MT(\"counter-style-symbols\",\n      \"[tag ol] { [property list-style]: [atom symbols]([atom cyclic] [string \\\"*\\\"] [string \\\"\\\\2020\\\"] [string \\\"\\\\2021\\\"] [string \\\"\\\\A7\\\"]); }\");\n})();\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/cypher/cypher.js",
    "content": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n// By the Neo4j Team and contributors.\n// https://github.com/neo4j-contrib/CodeMirror\n\n(function(mod) {\n  if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n    mod(require(\"../../lib/codemirror\"));\n  else if (typeof define == \"function\" && define.amd) // AMD\n    define([\"../../lib/codemirror\"], mod);\n  else // Plain browser env\n    mod(CodeMirror);\n})(function(CodeMirror) {\n  \"use strict\";\n  var wordRegexp = function(words) {\n    return new RegExp(\"^(?:\" + words.join(\"|\") + \")$\", \"i\");\n  };\n\n  CodeMirror.defineMode(\"cypher\", function(config) {\n    var tokenBase = function(stream/*, state*/) {\n      var ch = stream.next(), curPunc = null;\n      if (ch === \"\\\"\" || ch === \"'\") {\n        stream.match(/.+?[\"']/);\n        return \"string\";\n      }\n      if (/[{}\\(\\),\\.;\\[\\]]/.test(ch)) {\n        curPunc = ch;\n        return \"node\";\n      } else if (ch === \"/\" && stream.eat(\"/\")) {\n        stream.skipToEnd();\n        return \"comment\";\n      } else if (operatorChars.test(ch)) {\n        stream.eatWhile(operatorChars);\n        return null;\n      } else {\n        stream.eatWhile(/[_\\w\\d]/);\n        if (stream.eat(\":\")) {\n          stream.eatWhile(/[\\w\\d_\\-]/);\n          return \"atom\";\n        }\n        var word = stream.current();\n        if (funcs.test(word)) return \"builtin\";\n        if (preds.test(word)) return \"def\";\n        if (keywords.test(word)) return \"keyword\";\n        return \"variable\";\n      }\n    };\n    var pushContext = function(state, type, col) {\n      return state.context = {\n        prev: state.context,\n        indent: state.indent,\n        col: col,\n        type: type\n      };\n    };\n    var popContext = function(state) {\n      state.indent = state.context.indent;\n      return state.context = state.context.prev;\n    };\n    var indentUnit = config.indentUnit;\n    var curPunc;\n    var funcs = wordRegexp([\"abs\", \"acos\", \"allShortestPaths\", \"asin\", \"atan\", \"atan2\", \"avg\", \"ceil\", \"coalesce\", \"collect\", \"cos\", \"cot\", \"count\", \"degrees\", \"e\", \"endnode\", \"exp\", \"extract\", \"filter\", \"floor\", \"haversin\", \"head\", \"id\", \"keys\", \"labels\", \"last\", \"left\", \"length\", \"log\", \"log10\", \"lower\", \"ltrim\", \"max\", \"min\", \"node\", \"nodes\", \"percentileCont\", \"percentileDisc\", \"pi\", \"radians\", \"rand\", \"range\", \"reduce\", \"rel\", \"relationship\", \"relationships\", \"replace\", \"right\", \"round\", \"rtrim\", \"shortestPath\", \"sign\", \"sin\", \"split\", \"sqrt\", \"startnode\", \"stdev\", \"stdevp\", \"str\", \"substring\", \"sum\", \"tail\", \"tan\", \"timestamp\", \"toFloat\", \"toInt\", \"trim\", \"type\", \"upper\"]);\n    var preds = wordRegexp([\"all\", \"and\", \"any\", \"has\", \"in\", \"none\", \"not\", \"or\", \"single\", \"xor\"]);\n    var keywords = wordRegexp([\"as\", \"asc\", \"ascending\", \"assert\", \"by\", \"case\", \"commit\", \"constraint\", \"create\", \"csv\", \"cypher\", \"delete\", \"desc\", \"descending\", \"distinct\", \"drop\", \"else\", \"end\", \"explain\", \"false\", \"fieldterminator\", \"foreach\", \"from\", \"headers\", \"in\", \"index\", \"is\", \"limit\", \"load\", \"match\", \"merge\", \"null\", \"on\", \"optional\", \"order\", \"periodic\", \"profile\", \"remove\", \"return\", \"scan\", \"set\", \"skip\", \"start\", \"then\", \"true\", \"union\", \"unique\", \"unwind\", \"using\", \"when\", \"where\", \"with\"]);\n    var operatorChars = /[*+\\-<>=&|~%^]/;\n\n    return {\n      startState: function(/*base*/) {\n        return {\n          tokenize: tokenBase,\n          context: null,\n          indent: 0,\n          col: 0\n        };\n      },\n      token: function(stream, state) {\n        if (stream.sol()) {\n          if (state.context && (state.context.align == null)) {\n            state.context.align = false;\n          }\n          state.indent = stream.indentation();\n        }\n        if (stream.eatSpace()) {\n          return null;\n        }\n        var style = state.tokenize(stream, state);\n        if (style !== \"comment\" && state.context && (state.context.align == null) && state.context.type !== \"pattern\") {\n          state.context.align = true;\n        }\n        if (curPunc === \"(\") {\n          pushContext(state, \")\", stream.column());\n        } else if (curPunc === \"[\") {\n          pushContext(state, \"]\", stream.column());\n        } else if (curPunc === \"{\") {\n          pushContext(state, \"}\", stream.column());\n        } else if (/[\\]\\}\\)]/.test(curPunc)) {\n          while (state.context && state.context.type === \"pattern\") {\n            popContext(state);\n          }\n          if (state.context && curPunc === state.context.type) {\n            popContext(state);\n          }\n        } else if (curPunc === \".\" && state.context && state.context.type === \"pattern\") {\n          popContext(state);\n        } else if (/atom|string|variable/.test(style) && state.context) {\n          if (/[\\}\\]]/.test(state.context.type)) {\n            pushContext(state, \"pattern\", stream.column());\n          } else if (state.context.type === \"pattern\" && !state.context.align) {\n            state.context.align = true;\n            state.context.col = stream.column();\n          }\n        }\n        return style;\n      },\n      indent: function(state, textAfter) {\n        var firstChar = textAfter && textAfter.charAt(0);\n        var context = state.context;\n        if (/[\\]\\}]/.test(firstChar)) {\n          while (context && context.type === \"pattern\") {\n            context = context.prev;\n          }\n        }\n        var closing = context && firstChar === context.type;\n        if (!context) return 0;\n        if (context.type === \"keywords\") return CodeMirror.commands.newlineAndIndent;\n        if (context.align) return context.col + (closing ? 0 : 1);\n        return context.indent + (closing ? 0 : indentUnit);\n      }\n    };\n  });\n\n  CodeMirror.modeExtensions[\"cypher\"] = {\n    autoFormatLineBreaks: function(text) {\n      var i, lines, reProcessedPortion;\n      var lines = text.split(\"\\n\");\n      var reProcessedPortion = /\\s+\\b(return|where|order by|match|with|skip|limit|create|delete|set)\\b\\s/g;\n      for (var i = 0; i < lines.length; i++)\n        lines[i] = lines[i].replace(reProcessedPortion, \" \\n$1 \").trim();\n      return lines.join(\"\\n\");\n    }\n  };\n\n  CodeMirror.defineMIME(\"application/x-cypher-query\", \"cypher\");\n\n});\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/cypher/index.html",
    "content": "<!doctype html>\n\n<title>CodeMirror: Cypher Mode for CodeMirror</title>\n<meta charset=\"utf-8\"/>\n<link rel=stylesheet href=\"../../doc/docs.css\">\n\n<link rel=\"stylesheet\" href=\"../../lib/codemirror.css\" />\n<link rel=\"stylesheet\" href=\"../../theme/neo.css\" />\n<script src=\"../../lib/codemirror.js\"></script>\n<script src=\"cypher.js\"></script>\n<style>\n.CodeMirror {\n    border-top: 1px solid black;\n    border-bottom: 1px solid black;\n}\n        </style>\n<div id=nav>\n  <a href=\"http://codemirror.net\"><h1>CodeMirror</h1><img id=logo src=\"../../doc/logo.png\"></a>\n\n  <ul>\n    <li><a href=\"../../index.html\">Home</a>\n    <li><a href=\"../../doc/manual.html\">Manual</a>\n    <li><a href=\"https://github.com/codemirror/codemirror\">Code</a>\n  </ul>\n  <ul>\n    <li><a href=\"../index.html\">Language modes</a>\n    <li><a class=active href=\"#\">Cypher Mode for CodeMirror</a>\n  </ul>\n</div>\n\n<article>\n<h2>Cypher Mode for CodeMirror</h2>\n<form>\n            <textarea id=\"code\" name=\"code\">// Cypher Mode for CodeMirror, using the neo theme\nMATCH (joe { name: 'Joe' })-[:knows*2..2]-(friend_of_friend)\nWHERE NOT (joe)-[:knows]-(friend_of_friend)\nRETURN friend_of_friend.name, COUNT(*)\nORDER BY COUNT(*) DESC , friend_of_friend.name\n</textarea>\n            </form>\n            <p><strong>MIME types defined:</strong> \n            <code><a href=\"?mime=application/x-cypher-query\">application/x-cypher-query</a></code>\n        </p>\n<script>\nwindow.onload = function() {\n  var mime = 'application/x-cypher-query';\n  // get mime type\n  if (window.location.href.indexOf('mime=') > -1) {\n    mime = window.location.href.substr(window.location.href.indexOf('mime=') + 5);\n  }\n  window.editor = CodeMirror.fromTextArea(document.getElementById('code'), {\n    mode: mime,\n    indentWithTabs: true,\n    smartIndent: true,\n    lineNumbers: true,\n    matchBrackets : true,\n    autofocus: true,\n    theme: 'neo'\n  });\n};\n</script>\n\n</article>\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/d/d.js",
    "content": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n(function(mod) {\n  if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n    mod(require(\"../../lib/codemirror\"));\n  else if (typeof define == \"function\" && define.amd) // AMD\n    define([\"../../lib/codemirror\"], mod);\n  else // Plain browser env\n    mod(CodeMirror);\n})(function(CodeMirror) {\n\"use strict\";\n\nCodeMirror.defineMode(\"d\", function(config, parserConfig) {\n  var indentUnit = config.indentUnit,\n      statementIndentUnit = parserConfig.statementIndentUnit || indentUnit,\n      keywords = parserConfig.keywords || {},\n      builtin = parserConfig.builtin || {},\n      blockKeywords = parserConfig.blockKeywords || {},\n      atoms = parserConfig.atoms || {},\n      hooks = parserConfig.hooks || {},\n      multiLineStrings = parserConfig.multiLineStrings;\n  var isOperatorChar = /[+\\-*&%=<>!?|\\/]/;\n\n  var curPunc;\n\n  function tokenBase(stream, state) {\n    var ch = stream.next();\n    if (hooks[ch]) {\n      var result = hooks[ch](stream, state);\n      if (result !== false) return result;\n    }\n    if (ch == '\"' || ch == \"'\" || ch == \"`\") {\n      state.tokenize = tokenString(ch);\n      return state.tokenize(stream, state);\n    }\n    if (/[\\[\\]{}\\(\\),;\\:\\.]/.test(ch)) {\n      curPunc = ch;\n      return null;\n    }\n    if (/\\d/.test(ch)) {\n      stream.eatWhile(/[\\w\\.]/);\n      return \"number\";\n    }\n    if (ch == \"/\") {\n      if (stream.eat(\"+\")) {\n        state.tokenize = tokenComment;\n        return tokenNestedComment(stream, state);\n      }\n      if (stream.eat(\"*\")) {\n        state.tokenize = tokenComment;\n        return tokenComment(stream, state);\n      }\n      if (stream.eat(\"/\")) {\n        stream.skipToEnd();\n        return \"comment\";\n      }\n    }\n    if (isOperatorChar.test(ch)) {\n      stream.eatWhile(isOperatorChar);\n      return \"operator\";\n    }\n    stream.eatWhile(/[\\w\\$_\\xa1-\\uffff]/);\n    var cur = stream.current();\n    if (keywords.propertyIsEnumerable(cur)) {\n      if (blockKeywords.propertyIsEnumerable(cur)) curPunc = \"newstatement\";\n      return \"keyword\";\n    }\n    if (builtin.propertyIsEnumerable(cur)) {\n      if (blockKeywords.propertyIsEnumerable(cur)) curPunc = \"newstatement\";\n      return \"builtin\";\n    }\n    if (atoms.propertyIsEnumerable(cur)) return \"atom\";\n    return \"variable\";\n  }\n\n  function tokenString(quote) {\n    return function(stream, state) {\n      var escaped = false, next, end = false;\n      while ((next = stream.next()) != null) {\n        if (next == quote && !escaped) {end = true; break;}\n        escaped = !escaped && next == \"\\\\\";\n      }\n      if (end || !(escaped || multiLineStrings))\n        state.tokenize = null;\n      return \"string\";\n    };\n  }\n\n  function tokenComment(stream, state) {\n    var maybeEnd = false, ch;\n    while (ch = stream.next()) {\n      if (ch == \"/\" && maybeEnd) {\n        state.tokenize = null;\n        break;\n      }\n      maybeEnd = (ch == \"*\");\n    }\n    return \"comment\";\n  }\n\n  function tokenNestedComment(stream, state) {\n    var maybeEnd = false, ch;\n    while (ch = stream.next()) {\n      if (ch == \"/\" && maybeEnd) {\n        state.tokenize = null;\n        break;\n      }\n      maybeEnd = (ch == \"+\");\n    }\n    return \"comment\";\n  }\n\n  function Context(indented, column, type, align, prev) {\n    this.indented = indented;\n    this.column = column;\n    this.type = type;\n    this.align = align;\n    this.prev = prev;\n  }\n  function pushContext(state, col, type) {\n    var indent = state.indented;\n    if (state.context && state.context.type == \"statement\")\n      indent = state.context.indented;\n    return state.context = new Context(indent, col, type, null, state.context);\n  }\n  function popContext(state) {\n    var t = state.context.type;\n    if (t == \")\" || t == \"]\" || t == \"}\")\n      state.indented = state.context.indented;\n    return state.context = state.context.prev;\n  }\n\n  // Interface\n\n  return {\n    startState: function(basecolumn) {\n      return {\n        tokenize: null,\n        context: new Context((basecolumn || 0) - indentUnit, 0, \"top\", false),\n        indented: 0,\n        startOfLine: true\n      };\n    },\n\n    token: function(stream, state) {\n      var ctx = state.context;\n      if (stream.sol()) {\n        if (ctx.align == null) ctx.align = false;\n        state.indented = stream.indentation();\n        state.startOfLine = true;\n      }\n      if (stream.eatSpace()) return null;\n      curPunc = null;\n      var style = (state.tokenize || tokenBase)(stream, state);\n      if (style == \"comment\" || style == \"meta\") return style;\n      if (ctx.align == null) ctx.align = true;\n\n      if ((curPunc == \";\" || curPunc == \":\" || curPunc == \",\") && ctx.type == \"statement\") popContext(state);\n      else if (curPunc == \"{\") pushContext(state, stream.column(), \"}\");\n      else if (curPunc == \"[\") pushContext(state, stream.column(), \"]\");\n      else if (curPunc == \"(\") pushContext(state, stream.column(), \")\");\n      else if (curPunc == \"}\") {\n        while (ctx.type == \"statement\") ctx = popContext(state);\n        if (ctx.type == \"}\") ctx = popContext(state);\n        while (ctx.type == \"statement\") ctx = popContext(state);\n      }\n      else if (curPunc == ctx.type) popContext(state);\n      else if (((ctx.type == \"}\" || ctx.type == \"top\") && curPunc != ';') || (ctx.type == \"statement\" && curPunc == \"newstatement\"))\n        pushContext(state, stream.column(), \"statement\");\n      state.startOfLine = false;\n      return style;\n    },\n\n    indent: function(state, textAfter) {\n      if (state.tokenize != tokenBase && state.tokenize != null) return CodeMirror.Pass;\n      var ctx = state.context, firstChar = textAfter && textAfter.charAt(0);\n      if (ctx.type == \"statement\" && firstChar == \"}\") ctx = ctx.prev;\n      var closing = firstChar == ctx.type;\n      if (ctx.type == \"statement\") return ctx.indented + (firstChar == \"{\" ? 0 : statementIndentUnit);\n      else if (ctx.align) return ctx.column + (closing ? 0 : 1);\n      else return ctx.indented + (closing ? 0 : indentUnit);\n    },\n\n    electricChars: \"{}\"\n  };\n});\n\n  function words(str) {\n    var obj = {}, words = str.split(\" \");\n    for (var i = 0; i < words.length; ++i) obj[words[i]] = true;\n    return obj;\n  }\n\n  var blockKeywords = \"body catch class do else enum for foreach foreach_reverse if in interface mixin \" +\n                      \"out scope struct switch try union unittest version while with\";\n\n  CodeMirror.defineMIME(\"text/x-d\", {\n    name: \"d\",\n    keywords: words(\"abstract alias align asm assert auto break case cast cdouble cent cfloat const continue \" +\n                    \"debug default delegate delete deprecated export extern final finally function goto immutable \" +\n                    \"import inout invariant is lazy macro module new nothrow override package pragma private \" +\n                    \"protected public pure ref return shared short static super synchronized template this \" +\n                    \"throw typedef typeid typeof volatile __FILE__ __LINE__ __gshared __traits __vector __parameters \" +\n                    blockKeywords),\n    blockKeywords: words(blockKeywords),\n    builtin: words(\"bool byte char creal dchar double float idouble ifloat int ireal long real short ubyte \" +\n                   \"ucent uint ulong ushort wchar wstring void size_t sizediff_t\"),\n    atoms: words(\"exit failure success true false null\"),\n    hooks: {\n      \"@\": function(stream, _state) {\n        stream.eatWhile(/[\\w\\$_]/);\n        return \"meta\";\n      }\n    }\n  });\n\n});\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/d/index.html",
    "content": "<!doctype html>\n\n<title>CodeMirror: D mode</title>\n<meta charset=\"utf-8\"/>\n<link rel=stylesheet href=\"../../doc/docs.css\">\n\n<link rel=\"stylesheet\" href=\"../../lib/codemirror.css\">\n<script src=\"../../lib/codemirror.js\"></script>\n<script src=\"../../addon/edit/matchbrackets.js\"></script>\n<script src=\"d.js\"></script>\n<style>.CodeMirror {border: 2px inset #dee;}</style>\n<div id=nav>\n  <a href=\"http://codemirror.net\"><h1>CodeMirror</h1><img id=logo src=\"../../doc/logo.png\"></a>\n\n  <ul>\n    <li><a href=\"../../index.html\">Home</a>\n    <li><a href=\"../../doc/manual.html\">Manual</a>\n    <li><a href=\"https://github.com/codemirror/codemirror\">Code</a>\n  </ul>\n  <ul>\n    <li><a href=\"../index.html\">Language modes</a>\n    <li><a class=active href=\"#\">D</a>\n  </ul>\n</div>\n\n<article>\n<h2>D mode</h2>\n<form><textarea id=\"code\" name=\"code\">\n/* D demo code // copied from phobos/sd/metastrings.d */\n// Written in the D programming language.\n\n/**\nTemplates with which to do compile-time manipulation of strings.\n\nMacros:\n WIKI = Phobos/StdMetastrings\n\nCopyright: Copyright Digital Mars 2007 - 2009.\nLicense:   <a href=\"http://www.boost.org/LICENSE_1_0.txt\">Boost License 1.0</a>.\nAuthors:   $(WEB digitalmars.com, Walter Bright),\n           Don Clugston\nSource:    $(PHOBOSSRC std/_metastrings.d)\n*/\n/*\n         Copyright Digital Mars 2007 - 2009.\nDistributed under the Boost Software License, Version 1.0.\n   (See accompanying file LICENSE_1_0.txt or copy at\n         http://www.boost.org/LICENSE_1_0.txt)\n */\nmodule std.metastrings;\n\n/**\nFormats constants into a string at compile time.  Analogous to $(XREF\nstring,format).\n\nParameters:\n\nA = tuple of constants, which can be strings, characters, or integral\n    values.\n\nFormats:\n *    The formats supported are %s for strings, and %%\n *    for the % character.\nExample:\n---\nimport std.metastrings;\nimport std.stdio;\n\nvoid main()\n{\n  string s = Format!(\"Arg %s = %s\", \"foo\", 27);\n  writefln(s); // \"Arg foo = 27\"\n}\n * ---\n */\n\ntemplate Format(A...)\n{\n    static if (A.length == 0)\n        enum Format = \"\";\n    else static if (is(typeof(A[0]) : const(char)[]))\n        enum Format = FormatString!(A[0], A[1..$]);\n    else\n        enum Format = toStringNow!(A[0]) ~ Format!(A[1..$]);\n}\n\ntemplate FormatString(const(char)[] F, A...)\n{\n    static if (F.length == 0)\n        enum FormatString = Format!(A);\n    else static if (F.length == 1)\n        enum FormatString = F[0] ~ Format!(A);\n    else static if (F[0..2] == \"%s\")\n        enum FormatString\n            = toStringNow!(A[0]) ~ FormatString!(F[2..$],A[1..$]);\n    else static if (F[0..2] == \"%%\")\n        enum FormatString = \"%\" ~ FormatString!(F[2..$],A);\n    else\n    {\n        static assert(F[0] != '%', \"unrecognized format %\" ~ F[1]);\n        enum FormatString = F[0] ~ FormatString!(F[1..$],A);\n    }\n}\n\nunittest\n{\n    auto s = Format!(\"hel%slo\", \"world\", -138, 'c', true);\n    assert(s == \"helworldlo-138ctrue\", \"[\" ~ s ~ \"]\");\n}\n\n/**\n * Convert constant argument to a string.\n */\n\ntemplate toStringNow(ulong v)\n{\n    static if (v < 10)\n        enum toStringNow = \"\" ~ cast(char)(v + '0');\n    else\n        enum toStringNow = toStringNow!(v / 10) ~ toStringNow!(v % 10);\n}\n\nunittest\n{\n    static assert(toStringNow!(1uL << 62) == \"4611686018427387904\");\n}\n\n/// ditto\ntemplate toStringNow(long v)\n{\n    static if (v < 0)\n        enum toStringNow = \"-\" ~ toStringNow!(cast(ulong) -v);\n    else\n        enum toStringNow = toStringNow!(cast(ulong) v);\n}\n\nunittest\n{\n    static assert(toStringNow!(0x100000000) == \"4294967296\");\n    static assert(toStringNow!(-138L) == \"-138\");\n}\n\n/// ditto\ntemplate toStringNow(uint U)\n{\n    enum toStringNow = toStringNow!(cast(ulong)U);\n}\n\n/// ditto\ntemplate toStringNow(int I)\n{\n    enum toStringNow = toStringNow!(cast(long)I);\n}\n\n/// ditto\ntemplate toStringNow(bool B)\n{\n    enum toStringNow = B ? \"true\" : \"false\";\n}\n\n/// ditto\ntemplate toStringNow(string S)\n{\n    enum toStringNow = S;\n}\n\n/// ditto\ntemplate toStringNow(char C)\n{\n    enum toStringNow = \"\" ~ C;\n}\n\n\n/********\n * Parse unsigned integer literal from the start of string s.\n * returns:\n *    .value = the integer literal as a string,\n *    .rest = the string following the integer literal\n * Otherwise:\n *    .value = null,\n *    .rest = s\n */\n\ntemplate parseUinteger(const(char)[] s)\n{\n    static if (s.length == 0)\n    {\n        enum value = \"\";\n        enum rest = \"\";\n    }\n    else static if (s[0] >= '0' && s[0] <= '9')\n    {\n        enum value = s[0] ~ parseUinteger!(s[1..$]).value;\n        enum rest = parseUinteger!(s[1..$]).rest;\n    }\n    else\n    {\n        enum value = \"\";\n        enum rest = s;\n    }\n}\n\n/********\nParse integer literal optionally preceded by $(D '-') from the start\nof string $(D s).\n\nReturns:\n   .value = the integer literal as a string,\n   .rest = the string following the integer literal\n\nOtherwise:\n   .value = null,\n   .rest = s\n*/\n\ntemplate parseInteger(const(char)[] s)\n{\n    static if (s.length == 0)\n    {\n        enum value = \"\";\n        enum rest = \"\";\n    }\n    else static if (s[0] >= '0' && s[0] <= '9')\n    {\n        enum value = s[0] ~ parseUinteger!(s[1..$]).value;\n        enum rest = parseUinteger!(s[1..$]).rest;\n    }\n    else static if (s.length >= 2 &&\n            s[0] == '-' && s[1] >= '0' && s[1] <= '9')\n    {\n        enum value = s[0..2] ~ parseUinteger!(s[2..$]).value;\n        enum rest = parseUinteger!(s[2..$]).rest;\n    }\n    else\n    {\n        enum value = \"\";\n        enum rest = s;\n    }\n}\n\nunittest\n{\n    assert(parseUinteger!(\"1234abc\").value == \"1234\");\n    assert(parseUinteger!(\"1234abc\").rest == \"abc\");\n    assert(parseInteger!(\"-1234abc\").value == \"-1234\");\n    assert(parseInteger!(\"-1234abc\").rest == \"abc\");\n}\n\n/**\nDeprecated aliases held for backward compatibility.\n*/\ndeprecated alias toStringNow ToString;\n/// Ditto\ndeprecated alias parseUinteger ParseUinteger;\n/// Ditto\ndeprecated alias parseUinteger ParseInteger;\n\n</textarea></form>\n\n    <script>\n      var editor = CodeMirror.fromTextArea(document.getElementById(\"code\"), {\n        lineNumbers: true,\n        matchBrackets: true,\n        indentUnit: 4,\n        mode: \"text/x-d\"\n      });\n    </script>\n\n    <p>Simple mode that handle D-Syntax (<a href=\"http://www.dlang.org\">DLang Homepage</a>).</p>\n\n    <p><strong>MIME types defined:</strong> <code>text/x-d</code>\n    .</p>\n  </article>\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/dart/dart.js",
    "content": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n(function(mod) {\n  if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n    mod(require(\"../../lib/codemirror\"), require(\"../clike/clike\"));\n  else if (typeof define == \"function\" && define.amd) // AMD\n    define([\"../../lib/codemirror\", \"../clike/clike\"], mod);\n  else // Plain browser env\n    mod(CodeMirror);\n})(function(CodeMirror) {\n  \"use strict\";\n\n  var keywords = (\"this super static final const abstract class extends external factory \" +\n    \"implements get native operator set typedef with enum throw rethrow \" +\n    \"assert break case continue default in return new deferred async await \" +\n    \"try catch finally do else for if switch while import library export \" +\n    \"part of show hide is\").split(\" \");\n  var blockKeywords = \"try catch finally do else for if switch while\".split(\" \");\n  var atoms = \"true false null\".split(\" \");\n  var builtins = \"void bool num int double dynamic var String\".split(\" \");\n\n  function set(words) {\n    var obj = {};\n    for (var i = 0; i < words.length; ++i) obj[words[i]] = true;\n    return obj;\n  }\n\n  CodeMirror.defineMIME(\"application/dart\", {\n    name: \"clike\",\n    keywords: set(keywords),\n    multiLineStrings: true,\n    blockKeywords: set(blockKeywords),\n    builtin: set(builtins),\n    atoms: set(atoms),\n    hooks: {\n      \"@\": function(stream) {\n        stream.eatWhile(/[\\w\\$_]/);\n        return \"meta\";\n      }\n    }\n  });\n\n  CodeMirror.registerHelper(\"hintWords\", \"application/dart\", keywords.concat(atoms).concat(builtins));\n\n  // This is needed to make loading through meta.js work.\n  CodeMirror.defineMode(\"dart\", function(conf) {\n    return CodeMirror.getMode(conf, \"application/dart\");\n  }, \"clike\");\n});\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/dart/index.html",
    "content": "<!doctype html>\n\n<title>CodeMirror: Dart mode</title>\n<meta charset=\"utf-8\"/>\n<link rel=stylesheet href=\"../../doc/docs.css\">\n<link rel=\"stylesheet\" href=\"../../lib/codemirror.css\">\n<script src=\"../../lib/codemirror.js\"></script>\n<script src=\"../clike/clike.js\"></script>\n<script src=\"dart.js\"></script>\n<style>.CodeMirror {border: 1px solid #dee;}</style>\n<div id=nav>\n  <a href=\"http://codemirror.net\"><h1>CodeMirror</h1><img id=logo src=\"../../doc/logo.png\"></a>\n\n  <ul>\n    <li><a href=\"../../index.html\">Home</a>\n    <li><a href=\"../../doc/manual.html\">Manual</a>\n    <li><a href=\"https://github.com/codemirror/codemirror\">Code</a>\n  </ul>\n  <ul>\n    <li><a href=\"../index.html\">Language modes</a>\n    <li><a class=active href=\"#\">Dart</a>\n  </ul>\n</div>\n\n<article>\n<h2>Dart mode</h2>\n<form>\n<textarea id=\"code\" name=\"code\">\nimport 'dart:math' show Random;\n\nvoid main() {\n  print(new Die(n: 12).roll());\n}\n\n// Define a class.\nclass Die {\n  // Define a class variable.\n  static Random shaker = new Random();\n\n  // Define instance variables.\n  int sides, value;\n\n  // Define a method using shorthand syntax.\n  String toString() => '$value';\n\n  // Define a constructor.\n  Die({int n: 6}) {\n    if (4 <= n && n <= 20) {\n      sides = n;\n    } else {\n      // Support for errors and exceptions.\n      throw new ArgumentError(/* */);\n    }\n  }\n\n  // Define an instance method.\n  int roll() {\n    return value = shaker.nextInt(sides) + 1;\n  }\n}\n</textarea>\n</form>\n\n<script>\n  var editor = CodeMirror.fromTextArea(document.getElementById(\"code\"), {\n    lineNumbers: true,\n    mode: \"application/dart\"\n  });\n</script>\n\n</article>\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/diff/diff.js",
    "content": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n(function(mod) {\n  if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n    mod(require(\"../../lib/codemirror\"));\n  else if (typeof define == \"function\" && define.amd) // AMD\n    define([\"../../lib/codemirror\"], mod);\n  else // Plain browser env\n    mod(CodeMirror);\n})(function(CodeMirror) {\n\"use strict\";\n\nCodeMirror.defineMode(\"diff\", function() {\n\n  var TOKEN_NAMES = {\n    '+': 'positive',\n    '-': 'negative',\n    '@': 'meta'\n  };\n\n  return {\n    token: function(stream) {\n      var tw_pos = stream.string.search(/[\\t ]+?$/);\n\n      if (!stream.sol() || tw_pos === 0) {\n        stream.skipToEnd();\n        return (\"error \" + (\n          TOKEN_NAMES[stream.string.charAt(0)] || '')).replace(/ $/, '');\n      }\n\n      var token_name = TOKEN_NAMES[stream.peek()] || stream.skipToEnd();\n\n      if (tw_pos === -1) {\n        stream.skipToEnd();\n      } else {\n        stream.pos = tw_pos;\n      }\n\n      return token_name;\n    }\n  };\n});\n\nCodeMirror.defineMIME(\"text/x-diff\", \"diff\");\n\n});\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/diff/index.html",
    "content": "<!doctype html>\n\n<title>CodeMirror: Diff mode</title>\n<meta charset=\"utf-8\"/>\n<link rel=stylesheet href=\"../../doc/docs.css\">\n\n<link rel=\"stylesheet\" href=\"../../lib/codemirror.css\">\n<script src=\"../../lib/codemirror.js\"></script>\n<script src=\"diff.js\"></script>\n<style>\n      .CodeMirror {border-top: 1px solid #ddd; border-bottom: 1px solid #ddd;}\n      span.cm-meta {color: #a0b !important;}\n      span.cm-error { background-color: black; opacity: 0.4;}\n      span.cm-error.cm-string { background-color: red; }\n      span.cm-error.cm-tag { background-color: #2b2; }\n    </style>\n<div id=nav>\n  <a href=\"http://codemirror.net\"><h1>CodeMirror</h1><img id=logo src=\"../../doc/logo.png\"></a>\n\n  <ul>\n    <li><a href=\"../../index.html\">Home</a>\n    <li><a href=\"../../doc/manual.html\">Manual</a>\n    <li><a href=\"https://github.com/codemirror/codemirror\">Code</a>\n  </ul>\n  <ul>\n    <li><a href=\"../index.html\">Language modes</a>\n    <li><a class=active href=\"#\">Diff</a>\n  </ul>\n</div>\n\n<article>\n<h2>Diff mode</h2>\n<form><textarea id=\"code\" name=\"code\">\ndiff --git a/index.html b/index.html\nindex c1d9156..7764744 100644\n--- a/index.html\n+++ b/index.html\n@@ -95,7 +95,8 @@ StringStream.prototype = {\n     <script>\n       var editor = CodeMirror.fromTextArea(document.getElementById(\"code\"), {\n         lineNumbers: true,\n-        autoMatchBrackets: true\n+        autoMatchBrackets: true,\n+      onGutterClick: function(x){console.log(x);}\n       });\n     </script>\n   </body>\ndiff --git a/lib/codemirror.js b/lib/codemirror.js\nindex 04646a9..9a39cc7 100644\n--- a/lib/codemirror.js\n+++ b/lib/codemirror.js\n@@ -399,10 +399,16 @@ var CodeMirror = (function() {\n     }\n \n     function onMouseDown(e) {\n-      var start = posFromMouse(e), last = start;    \n+      var start = posFromMouse(e), last = start, target = e.target();\n       if (!start) return;\n       setCursor(start.line, start.ch, false);\n       if (e.button() != 1) return;\n+      if (target.parentNode == gutter) {    \n+        if (options.onGutterClick)\n+          options.onGutterClick(indexOf(gutter.childNodes, target) + showingFrom);\n+        return;\n+      }\n+\n       if (!focused) onFocus();\n \n       e.stop();\n@@ -808,7 +814,7 @@ var CodeMirror = (function() {\n       for (var i = showingFrom; i < showingTo; ++i) {\n         var marker = lines[i].gutterMarker;\n         if (marker) html.push('<div class=\"' + marker.style + '\">' + htmlEscape(marker.text) + '</div>');\n-        else html.push(\"<div>\" + (options.lineNumbers ? i + 1 : \"\\u00a0\") + \"</div>\");\n+        else html.push(\"<div>\" + (options.lineNumbers ? i + options.firstLineNumber : \"\\u00a0\") + \"</div>\");\n       }\n       gutter.style.display = \"none\"; // TODO test whether this actually helps\n       gutter.innerHTML = html.join(\"\");\n@@ -1371,10 +1377,8 @@ var CodeMirror = (function() {\n         if (option == \"parser\") setParser(value);\n         else if (option === \"lineNumbers\") setLineNumbers(value);\n         else if (option === \"gutter\") setGutter(value);\n-        else if (option === \"readOnly\") options.readOnly = value;\n-        else if (option === \"indentUnit\") {options.indentUnit = indentUnit = value; setParser(options.parser);}\n-        else if (/^(?:enterMode|tabMode|indentWithTabs|readOnly|autoMatchBrackets|undoDepth)$/.test(option)) options[option] = value;\n-        else throw new Error(\"Can't set option \" + option);\n+        else if (option === \"indentUnit\") {options.indentUnit = value; setParser(options.parser);}\n+        else options[option] = value;\n       },\n       cursorCoords: cursorCoords,\n       undo: operation(undo),\n@@ -1402,7 +1406,8 @@ var CodeMirror = (function() {\n       replaceRange: operation(replaceRange),\n \n       operation: function(f){return operation(f)();},\n-      refresh: function(){updateDisplay([{from: 0, to: lines.length}]);}\n+      refresh: function(){updateDisplay([{from: 0, to: lines.length}]);},\n+      getInputField: function(){return input;}\n     };\n     return instance;\n   }\n@@ -1420,6 +1425,7 @@ var CodeMirror = (function() {\n     readOnly: false,\n     onChange: null,\n     onCursorActivity: null,\n+    onGutterClick: null,\n     autoMatchBrackets: false,\n     workTime: 200,\n     workDelay: 300,\n</textarea></form>\n    <script>\n      var editor = CodeMirror.fromTextArea(document.getElementById(\"code\"), {});\n    </script>\n\n    <p><strong>MIME types defined:</strong> <code>text/x-diff</code>.</p>\n\n  </article>\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/django/django.js",
    "content": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n(function(mod) {\n  if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n    mod(require(\"../../lib/codemirror\"), require(\"../htmlmixed/htmlmixed\"),\n        require(\"../../addon/mode/overlay\"));\n  else if (typeof define == \"function\" && define.amd) // AMD\n    define([\"../../lib/codemirror\", \"../htmlmixed/htmlmixed\",\n            \"../../addon/mode/overlay\"], mod);\n  else // Plain browser env\n    mod(CodeMirror);\n})(function(CodeMirror) {\n  \"use strict\";\n\n  CodeMirror.defineMode(\"django:inner\", function() {\n    var keywords = [\"block\", \"endblock\", \"for\", \"endfor\", \"in\", \"true\", \"false\",\n                    \"loop\", \"none\", \"self\", \"super\", \"if\", \"endif\", \"as\", \"not\", \"and\",\n                    \"else\", \"import\", \"with\", \"endwith\", \"without\", \"context\", \"ifequal\", \"endifequal\",\n                    \"ifnotequal\", \"endifnotequal\", \"extends\", \"include\", \"load\", \"length\", \"comment\",\n                    \"endcomment\", \"empty\"];\n    keywords = new RegExp(\"^((\" + keywords.join(\")|(\") + \"))\\\\b\");\n\n    function tokenBase (stream, state) {\n      stream.eatWhile(/[^\\{]/);\n      var ch = stream.next();\n      if (ch == \"{\") {\n        if (ch = stream.eat(/\\{|%|#/)) {\n          state.tokenize = inTag(ch);\n          return \"tag\";\n        }\n      }\n    }\n    function inTag (close) {\n      if (close == \"{\") {\n        close = \"}\";\n      }\n      return function (stream, state) {\n        var ch = stream.next();\n        if ((ch == close) && stream.eat(\"}\")) {\n          state.tokenize = tokenBase;\n          return \"tag\";\n        }\n        if (stream.match(keywords)) {\n          return \"keyword\";\n        }\n        return close == \"#\" ? \"comment\" : \"string\";\n      };\n    }\n    return {\n      startState: function () {\n        return {tokenize: tokenBase};\n      },\n      token: function (stream, state) {\n        return state.tokenize(stream, state);\n      }\n    };\n  });\n\n  CodeMirror.defineMode(\"django\", function(config) {\n    var htmlBase = CodeMirror.getMode(config, \"text/html\");\n    var djangoInner = CodeMirror.getMode(config, \"django:inner\");\n    return CodeMirror.overlayMode(htmlBase, djangoInner);\n  });\n\n  CodeMirror.defineMIME(\"text/x-django\", \"django\");\n});\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/django/index.html",
    "content": "<!doctype html>\n\n<title>CodeMirror: Django template mode</title>\n<meta charset=\"utf-8\"/>\n<link rel=stylesheet href=\"../../doc/docs.css\">\n\n<link rel=\"stylesheet\" href=\"../../lib/codemirror.css\">\n<script src=\"../../lib/codemirror.js\"></script>\n<script src=\"../../addon/mode/overlay.js\"></script>\n<script src=\"../xml/xml.js\"></script>\n<script src=\"../htmlmixed/htmlmixed.js\"></script>\n<script src=\"django.js\"></script>\n<style type=\"text/css\">.CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}</style>\n<div id=nav>\n  <a href=\"http://codemirror.net\"><h1>CodeMirror</h1><img id=logo src=\"../../doc/logo.png\"></a>\n\n  <ul>\n    <li><a href=\"../../index.html\">Home</a>\n    <li><a href=\"../../doc/manual.html\">Manual</a>\n    <li><a href=\"https://github.com/codemirror/codemirror\">Code</a>\n  </ul>\n  <ul>\n    <li><a href=\"../index.html\">Language modes</a>\n    <li><a class=active href=\"#\">Django</a>\n  </ul>\n</div>\n\n<article>\n<h2>Django template mode</h2>\n<form><textarea id=\"code\" name=\"code\">\n<!doctype html>\n<html>\n    <head>\n        <title>My Django web application</title>\n    </head>\n    <body>\n        <h1>\n            {{ page.title }}\n        </h1>\n        <ul class=\"my-list\">\n            {% for item in items %}\n                <li>{% item.name %}</li>\n            {% empty %}\n                <li>You have no items in your list.</li>\n            {% endfor %}\n        </ul>\n    </body>\n</html>\n</textarea></form>\n\n    <script>\n      var editor = CodeMirror.fromTextArea(document.getElementById(\"code\"), {\n        lineNumbers: true,\n        mode: \"django\",\n        indentUnit: 4,\n        indentWithTabs: true\n      });\n    </script>\n\n    <p>Mode for HTML with embedded Django template markup.</p>\n\n    <p><strong>MIME types defined:</strong> <code>text/x-django</code></p>\n  </article>\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/dockerfile/dockerfile.js",
    "content": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n(function(mod) {\n  if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n    mod(require(\"../../lib/codemirror\"), require(\"../../addon/mode/simple\"));\n  else if (typeof define == \"function\" && define.amd) // AMD\n    define([\"../../lib/codemirror\", \"../../addon/mode/simple\"], mod);\n  else // Plain browser env\n    mod(CodeMirror);\n})(function(CodeMirror) {\n  \"use strict\";\n\n  // Collect all Dockerfile directives\n  var instructions = [\"from\", \"maintainer\", \"run\", \"cmd\", \"expose\", \"env\",\n                      \"add\", \"copy\", \"entrypoint\", \"volume\", \"user\",\n                      \"workdir\", \"onbuild\"],\n      instructionRegex = \"(\" + instructions.join('|') + \")\",\n      instructionOnlyLine = new RegExp(instructionRegex + \"\\\\s*$\", \"i\"),\n      instructionWithArguments = new RegExp(instructionRegex + \"(\\\\s+)\", \"i\");\n\n  CodeMirror.defineSimpleMode(\"dockerfile\", {\n    start: [\n      // Block comment: This is a line starting with a comment\n      {\n        regex: /#.*$/,\n        token: \"comment\"\n      },\n      // Highlight an instruction without any arguments (for convenience)\n      {\n        regex: instructionOnlyLine,\n        token: \"variable-2\"\n      },\n      // Highlight an instruction followed by arguments\n      {\n        regex: instructionWithArguments,\n        token: [\"variable-2\", null],\n        next: \"arguments\"\n      },\n      {\n        regex: /./,\n        token: null\n      }\n    ],\n    arguments: [\n      {\n        // Line comment without instruction arguments is an error\n        regex: /#.*$/,\n        token: \"error\",\n        next: \"start\"\n      },\n      {\n        regex: /[^#]+\\\\$/,\n        token: null\n      },\n      {\n        // Match everything except for the inline comment\n        regex: /[^#]+/,\n        token: null,\n        next: \"start\"\n      },\n      {\n        regex: /$/,\n        token: null,\n        next: \"start\"\n      },\n      // Fail safe return to start\n      {\n        token: null,\n        next: \"start\"\n      }\n    ]\n  });\n\n  CodeMirror.defineMIME(\"text/x-dockerfile\", \"dockerfile\");\n});\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/dockerfile/index.html",
    "content": "<!doctype html>\n\n<title>CodeMirror: Dockerfile mode</title>\n<meta charset=\"utf-8\"/>\n<link rel=stylesheet href=\"../../doc/docs.css\">\n\n<link rel=\"stylesheet\" href=\"../../lib/codemirror.css\">\n<script src=\"../../lib/codemirror.js\"></script>\n<script src=\"../../addon/mode/simple.js\"></script>\n<script src=\"dockerfile.js\"></script>\n<style type=\"text/css\">.CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}</style>\n<div id=nav>\n  <a href=\"http://codemirror.net\"><h1>CodeMirror</h1><img id=logo src=\"../../doc/logo.png\"></a>\n\n  <ul>\n    <li><a href=\"../../index.html\">Home</a>\n    <li><a href=\"../../doc/manual.html\">Manual</a>\n    <li><a href=\"https://github.com/codemirror/codemirror\">Code</a>\n  </ul>\n  <ul>\n    <li><a href=\"../index.html\">Language modes</a>\n    <li><a class=active href=\"#\">Dockerfile</a>\n  </ul>\n</div>\n\n<article>\n<h2>Dockerfile mode</h2>\n<form><textarea id=\"code\" name=\"code\"># Install Ghost blogging platform and run development environment\n#\n# VERSION 1.0.0\n\nFROM ubuntu:12.10\nMAINTAINER Amer Grgic \"amer@livebyt.es\"\nWORKDIR /data/ghost\n\n# Install dependencies for nginx installation\nRUN apt-get update\nRUN apt-get install -y python g++ make software-properties-common --force-yes\nRUN add-apt-repository ppa:chris-lea/node.js\nRUN apt-get update\n# Install unzip\nRUN apt-get install -y unzip\n# Install curl\nRUN apt-get install -y curl\n# Install nodejs & npm\nRUN apt-get install -y rlwrap\nRUN apt-get install -y nodejs \n# Download Ghost v0.4.1\nRUN curl -L https://ghost.org/zip/ghost-latest.zip -o /tmp/ghost.zip\n# Unzip Ghost zip to /data/ghost\nRUN unzip -uo /tmp/ghost.zip -d /data/ghost\n# Add custom config js to /data/ghost\nADD ./config.example.js /data/ghost/config.js\n# Install Ghost with NPM\nRUN cd /data/ghost/ && npm install --production\n# Expose port 2368\nEXPOSE 2368\n# Run Ghost\nCMD [\"npm\",\"start\"]\n</textarea></form>\n\n    <script>\n      var editor = CodeMirror.fromTextArea(document.getElementById(\"code\"), {\n        lineNumbers: true,\n        mode: \"dockerfile\"\n      });\n    </script>\n\n    <p>Dockerfile syntax highlighting for CodeMirror. Depends on\n    the <a href=\"../../demo/simplemode.html\">simplemode</a> addon.</p>\n\n    <p><strong>MIME types defined:</strong> <code>text/x-dockerfile</code></p>\n  </article>\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/dtd/dtd.js",
    "content": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n/*\n  DTD mode\n  Ported to CodeMirror by Peter Kroon <plakroon@gmail.com>\n  Report bugs/issues here: https://github.com/codemirror/CodeMirror/issues\n  GitHub: @peterkroon\n*/\n\n(function(mod) {\n  if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n    mod(require(\"../../lib/codemirror\"));\n  else if (typeof define == \"function\" && define.amd) // AMD\n    define([\"../../lib/codemirror\"], mod);\n  else // Plain browser env\n    mod(CodeMirror);\n})(function(CodeMirror) {\n\"use strict\";\n\nCodeMirror.defineMode(\"dtd\", function(config) {\n  var indentUnit = config.indentUnit, type;\n  function ret(style, tp) {type = tp; return style;}\n\n  function tokenBase(stream, state) {\n    var ch = stream.next();\n\n    if (ch == \"<\" && stream.eat(\"!\") ) {\n      if (stream.eatWhile(/[\\-]/)) {\n        state.tokenize = tokenSGMLComment;\n        return tokenSGMLComment(stream, state);\n      } else if (stream.eatWhile(/[\\w]/)) return ret(\"keyword\", \"doindent\");\n    } else if (ch == \"<\" && stream.eat(\"?\")) { //xml declaration\n      state.tokenize = inBlock(\"meta\", \"?>\");\n      return ret(\"meta\", ch);\n    } else if (ch == \"#\" && stream.eatWhile(/[\\w]/)) return ret(\"atom\", \"tag\");\n    else if (ch == \"|\") return ret(\"keyword\", \"seperator\");\n    else if (ch.match(/[\\(\\)\\[\\]\\-\\.,\\+\\?>]/)) return ret(null, ch);//if(ch === \">\") return ret(null, \"endtag\"); else\n    else if (ch.match(/[\\[\\]]/)) return ret(\"rule\", ch);\n    else if (ch == \"\\\"\" || ch == \"'\") {\n      state.tokenize = tokenString(ch);\n      return state.tokenize(stream, state);\n    } else if (stream.eatWhile(/[a-zA-Z\\?\\+\\d]/)) {\n      var sc = stream.current();\n      if( sc.substr(sc.length-1,sc.length).match(/\\?|\\+/) !== null )stream.backUp(1);\n      return ret(\"tag\", \"tag\");\n    } else if (ch == \"%\" || ch == \"*\" ) return ret(\"number\", \"number\");\n    else {\n      stream.eatWhile(/[\\w\\\\\\-_%.{,]/);\n      return ret(null, null);\n    }\n  }\n\n  function tokenSGMLComment(stream, state) {\n    var dashes = 0, ch;\n    while ((ch = stream.next()) != null) {\n      if (dashes >= 2 && ch == \">\") {\n        state.tokenize = tokenBase;\n        break;\n      }\n      dashes = (ch == \"-\") ? dashes + 1 : 0;\n    }\n    return ret(\"comment\", \"comment\");\n  }\n\n  function tokenString(quote) {\n    return function(stream, state) {\n      var escaped = false, ch;\n      while ((ch = stream.next()) != null) {\n        if (ch == quote && !escaped) {\n          state.tokenize = tokenBase;\n          break;\n        }\n        escaped = !escaped && ch == \"\\\\\";\n      }\n      return ret(\"string\", \"tag\");\n    };\n  }\n\n  function inBlock(style, terminator) {\n    return function(stream, state) {\n      while (!stream.eol()) {\n        if (stream.match(terminator)) {\n          state.tokenize = tokenBase;\n          break;\n        }\n        stream.next();\n      }\n      return style;\n    };\n  }\n\n  return {\n    startState: function(base) {\n      return {tokenize: tokenBase,\n              baseIndent: base || 0,\n              stack: []};\n    },\n\n    token: function(stream, state) {\n      if (stream.eatSpace()) return null;\n      var style = state.tokenize(stream, state);\n\n      var context = state.stack[state.stack.length-1];\n      if (stream.current() == \"[\" || type === \"doindent\" || type == \"[\") state.stack.push(\"rule\");\n      else if (type === \"endtag\") state.stack[state.stack.length-1] = \"endtag\";\n      else if (stream.current() == \"]\" || type == \"]\" || (type == \">\" && context == \"rule\")) state.stack.pop();\n      else if (type == \"[\") state.stack.push(\"[\");\n      return style;\n    },\n\n    indent: function(state, textAfter) {\n      var n = state.stack.length;\n\n      if( textAfter.match(/\\]\\s+|\\]/) )n=n-1;\n      else if(textAfter.substr(textAfter.length-1, textAfter.length) === \">\"){\n        if(textAfter.substr(0,1) === \"<\")n;\n        else if( type == \"doindent\" && textAfter.length > 1 )n;\n        else if( type == \"doindent\")n--;\n        else if( type == \">\" && textAfter.length > 1)n;\n        else if( type == \"tag\" && textAfter !== \">\")n;\n        else if( type == \"tag\" && state.stack[state.stack.length-1] == \"rule\")n--;\n        else if( type == \"tag\")n++;\n        else if( textAfter === \">\" && state.stack[state.stack.length-1] == \"rule\" && type === \">\")n--;\n        else if( textAfter === \">\" && state.stack[state.stack.length-1] == \"rule\")n;\n        else if( textAfter.substr(0,1) !== \"<\" && textAfter.substr(0,1) === \">\" )n=n-1;\n        else if( textAfter === \">\")n;\n        else n=n-1;\n        //over rule them all\n        if(type == null || type == \"]\")n--;\n      }\n\n      return state.baseIndent + n * indentUnit;\n    },\n\n    electricChars: \"]>\"\n  };\n});\n\nCodeMirror.defineMIME(\"application/xml-dtd\", \"dtd\");\n\n});\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/dtd/index.html",
    "content": "<!doctype html>\n\n<title>CodeMirror: DTD mode</title>\n<meta charset=\"utf-8\"/>\n<link rel=stylesheet href=\"../../doc/docs.css\">\n\n<link rel=\"stylesheet\" href=\"../../lib/codemirror.css\">\n<script src=\"../../lib/codemirror.js\"></script>\n<script src=\"dtd.js\"></script>\n<style type=\"text/css\">.CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}</style>\n<div id=nav>\n  <a href=\"http://codemirror.net\"><h1>CodeMirror</h1><img id=logo src=\"../../doc/logo.png\"></a>\n\n  <ul>\n    <li><a href=\"../../index.html\">Home</a>\n    <li><a href=\"../../doc/manual.html\">Manual</a>\n    <li><a href=\"https://github.com/codemirror/codemirror\">Code</a>\n  </ul>\n  <ul>\n    <li><a href=\"../index.html\">Language modes</a>\n    <li><a class=active href=\"#\">DTD</a>\n  </ul>\n</div>\n\n<article>\n<h2>DTD mode</h2>\n<form><textarea id=\"code\" name=\"code\"><?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<!ATTLIST title\n  xmlns\tCDATA\t#FIXED\t\"http://docbook.org/ns/docbook\"\n  role\tCDATA\t#IMPLIED\n  %db.common.attributes;\n  %db.common.linking.attributes;\n>\n\n<!--\n  Try: http://docbook.org/xml/5.0/dtd/docbook.dtd\n-->\n\n<!DOCTYPE xsl:stylesheet\n  [\n    <!ENTITY nbsp   \"&amp;#160;\">\n    <!ENTITY copy   \"&amp;#169;\">\n    <!ENTITY reg    \"&amp;#174;\">\n    <!ENTITY trade  \"&amp;#8482;\">\n    <!ENTITY mdash  \"&amp;#8212;\">\n    <!ENTITY ldquo  \"&amp;#8220;\">\n    <!ENTITY rdquo  \"&amp;#8221;\">\n    <!ENTITY pound  \"&amp;#163;\">\n    <!ENTITY yen    \"&amp;#165;\">\n    <!ENTITY euro   \"&amp;#8364;\">\n    <!ENTITY mathml \"http://www.w3.org/1998/Math/MathML\">\n  ]\n>\n\n<!ELEMENT title (#PCDATA|inlinemediaobject|remark|superscript|subscript|xref|link|olink|anchor|biblioref|alt|annotation|indexterm|abbrev|acronym|date|emphasis|footnote|footnoteref|foreignphrase|phrase|quote|wordasword|firstterm|glossterm|coref|trademark|productnumber|productname|database|application|hardware|citation|citerefentry|citetitle|citebiblioid|author|person|personname|org|orgname|editor|jobtitle|replaceable|package|parameter|termdef|nonterminal|systemitem|option|optional|property|inlineequation|tag|markup|token|symbol|literal|code|constant|email|uri|guiicon|guibutton|guimenuitem|guimenu|guisubmenu|guilabel|menuchoice|mousebutton|keycombo|keycap|keycode|keysym|shortcut|accel|prompt|envar|filename|command|computeroutput|userinput|function|varname|returnvalue|type|classname|exceptionname|interfacename|methodname|modifier|initializer|ooclass|ooexception|oointerface|errorcode|errortext|errorname|errortype)*>\n\n<!ENTITY % db.common.attributes \"\n  xml:id\tID\t#IMPLIED\n  version\tCDATA\t#IMPLIED\n  xml:lang\tCDATA\t#IMPLIED\n  xml:base\tCDATA\t#IMPLIED\n  remap\tCDATA\t#IMPLIED\n  xreflabel\tCDATA\t#IMPLIED\n  revisionflag\t(changed|added|deleted|off)\t#IMPLIED\n  dir\t(ltr|rtl|lro|rlo)\t#IMPLIED\n  arch\tCDATA\t#IMPLIED\n  audience\tCDATA\t#IMPLIED\n  condition\tCDATA\t#IMPLIED\n  conformance\tCDATA\t#IMPLIED\n  os\tCDATA\t#IMPLIED\n  revision\tCDATA\t#IMPLIED\n  security\tCDATA\t#IMPLIED\n  userlevel\tCDATA\t#IMPLIED\n  vendor\tCDATA\t#IMPLIED\n  wordsize\tCDATA\t#IMPLIED\n  annotations\tCDATA\t#IMPLIED\n\n\"></textarea></form>\n    <script>\n      var editor = CodeMirror.fromTextArea(document.getElementById(\"code\"), {\n        mode: {name: \"dtd\", alignCDATA: true},\n        lineNumbers: true,\n        lineWrapping: true\n      });\n    </script>\n\n    <p><strong>MIME types defined:</strong> <code>application/xml-dtd</code>.</p>\n  </article>\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/dylan/dylan.js",
    "content": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n(function(mod) {\n  if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n    mod(require(\"../../lib/codemirror\"));\n  else if (typeof define == \"function\" && define.amd) // AMD\n    define([\"../../lib/codemirror\"], mod);\n  else // Plain browser env\n    mod(CodeMirror);\n})(function(CodeMirror) {\n\"use strict\";\n\nCodeMirror.defineMode(\"dylan\", function(_config) {\n  // Words\n  var words = {\n    // Words that introduce unnamed definitions like \"define interface\"\n    unnamedDefinition: [\"interface\"],\n\n    // Words that introduce simple named definitions like \"define library\"\n    namedDefinition: [\"module\", \"library\", \"macro\",\n                      \"C-struct\", \"C-union\",\n                      \"C-function\", \"C-callable-wrapper\"\n                     ],\n\n    // Words that introduce type definitions like \"define class\".\n    // These are also parameterized like \"define method\" and are\n    // appended to otherParameterizedDefinitionWords\n    typeParameterizedDefinition: [\"class\", \"C-subtype\", \"C-mapped-subtype\"],\n\n    // Words that introduce trickier definitions like \"define method\".\n    // These require special definitions to be added to startExpressions\n    otherParameterizedDefinition: [\"method\", \"function\",\n                                   \"C-variable\", \"C-address\"\n                                  ],\n\n    // Words that introduce module constant definitions.\n    // These must also be simple definitions and are\n    // appended to otherSimpleDefinitionWords\n    constantSimpleDefinition: [\"constant\"],\n\n    // Words that introduce module variable definitions.\n    // These must also be simple definitions and are\n    // appended to otherSimpleDefinitionWords\n    variableSimpleDefinition: [\"variable\"],\n\n    // Other words that introduce simple definitions\n    // (without implicit bodies).\n    otherSimpleDefinition: [\"generic\", \"domain\",\n                            \"C-pointer-type\",\n                            \"table\"\n                           ],\n\n    // Words that begin statements with implicit bodies.\n    statement: [\"if\", \"block\", \"begin\", \"method\", \"case\",\n                \"for\", \"select\", \"when\", \"unless\", \"until\",\n                \"while\", \"iterate\", \"profiling\", \"dynamic-bind\"\n               ],\n\n    // Patterns that act as separators in compound statements.\n    // This may include any general pattern that must be indented\n    // specially.\n    separator: [\"finally\", \"exception\", \"cleanup\", \"else\",\n                \"elseif\", \"afterwards\"\n               ],\n\n    // Keywords that do not require special indentation handling,\n    // but which should be highlighted\n    other: [\"above\", \"below\", \"by\", \"from\", \"handler\", \"in\",\n            \"instance\", \"let\", \"local\", \"otherwise\", \"slot\",\n            \"subclass\", \"then\", \"to\", \"keyed-by\", \"virtual\"\n           ],\n\n    // Condition signaling function calls\n    signalingCalls: [\"signal\", \"error\", \"cerror\",\n                     \"break\", \"check-type\", \"abort\"\n                    ]\n  };\n\n  words[\"otherDefinition\"] =\n    words[\"unnamedDefinition\"]\n    .concat(words[\"namedDefinition\"])\n    .concat(words[\"otherParameterizedDefinition\"]);\n\n  words[\"definition\"] =\n    words[\"typeParameterizedDefinition\"]\n    .concat(words[\"otherDefinition\"]);\n\n  words[\"parameterizedDefinition\"] =\n    words[\"typeParameterizedDefinition\"]\n    .concat(words[\"otherParameterizedDefinition\"]);\n\n  words[\"simpleDefinition\"] =\n    words[\"constantSimpleDefinition\"]\n    .concat(words[\"variableSimpleDefinition\"])\n    .concat(words[\"otherSimpleDefinition\"]);\n\n  words[\"keyword\"] =\n    words[\"statement\"]\n    .concat(words[\"separator\"])\n    .concat(words[\"other\"]);\n\n  // Patterns\n  var symbolPattern = \"[-_a-zA-Z?!*@<>$%]+\";\n  var symbol = new RegExp(\"^\" + symbolPattern);\n  var patterns = {\n    // Symbols with special syntax\n    symbolKeyword: symbolPattern + \":\",\n    symbolClass: \"<\" + symbolPattern + \">\",\n    symbolGlobal: \"\\\\*\" + symbolPattern + \"\\\\*\",\n    symbolConstant: \"\\\\$\" + symbolPattern\n  };\n  var patternStyles = {\n    symbolKeyword: \"atom\",\n    symbolClass: \"tag\",\n    symbolGlobal: \"variable-2\",\n    symbolConstant: \"variable-3\"\n  };\n\n  // Compile all patterns to regular expressions\n  for (var patternName in patterns)\n    if (patterns.hasOwnProperty(patternName))\n      patterns[patternName] = new RegExp(\"^\" + patterns[patternName]);\n\n  // Names beginning \"with-\" and \"without-\" are commonly\n  // used as statement macro\n  patterns[\"keyword\"] = [/^with(?:out)?-[-_a-zA-Z?!*@<>$%]+/];\n\n  var styles = {};\n  styles[\"keyword\"] = \"keyword\";\n  styles[\"definition\"] = \"def\";\n  styles[\"simpleDefinition\"] = \"def\";\n  styles[\"signalingCalls\"] = \"builtin\";\n\n  // protected words lookup table\n  var wordLookup = {};\n  var styleLookup = {};\n\n  [\n    \"keyword\",\n    \"definition\",\n    \"simpleDefinition\",\n    \"signalingCalls\"\n  ].forEach(function(type) {\n    words[type].forEach(function(word) {\n      wordLookup[word] = type;\n      styleLookup[word] = styles[type];\n    });\n  });\n\n\n  function chain(stream, state, f) {\n    state.tokenize = f;\n    return f(stream, state);\n  }\n\n  var type, content;\n\n  function ret(_type, style, _content) {\n    type = _type;\n    content = _content;\n    return style;\n  }\n\n  function tokenBase(stream, state) {\n    // String\n    var ch = stream.peek();\n    if (ch == \"'\" || ch == '\"') {\n      stream.next();\n      return chain(stream, state, tokenString(ch, \"string\", \"string\"));\n    }\n    // Comment\n    else if (ch == \"/\") {\n      stream.next();\n      if (stream.eat(\"*\")) {\n        return chain(stream, state, tokenComment);\n      } else if (stream.eat(\"/\")) {\n        stream.skipToEnd();\n        return ret(\"comment\", \"comment\");\n      } else {\n        stream.skipTo(\" \");\n        return ret(\"operator\", \"operator\");\n      }\n    }\n    // Decimal\n    else if (/\\d/.test(ch)) {\n      stream.match(/^\\d*(?:\\.\\d*)?(?:e[+\\-]?\\d+)?/);\n      return ret(\"number\", \"number\");\n    }\n    // Hash\n    else if (ch == \"#\") {\n      stream.next();\n      // Symbol with string syntax\n      ch = stream.peek();\n      if (ch == '\"') {\n        stream.next();\n        return chain(stream, state, tokenString('\"', \"symbol\", \"string-2\"));\n      }\n      // Binary number\n      else if (ch == \"b\") {\n        stream.next();\n        stream.eatWhile(/[01]/);\n        return ret(\"number\", \"number\");\n      }\n      // Hex number\n      else if (ch == \"x\") {\n        stream.next();\n        stream.eatWhile(/[\\da-f]/i);\n        return ret(\"number\", \"number\");\n      }\n      // Octal number\n      else if (ch == \"o\") {\n        stream.next();\n        stream.eatWhile(/[0-7]/);\n        return ret(\"number\", \"number\");\n      }\n      // Hash symbol\n      else {\n        stream.eatWhile(/[-a-zA-Z]/);\n        return ret(\"hash\", \"keyword\");\n      }\n    } else if (stream.match(\"end\")) {\n      return ret(\"end\", \"keyword\");\n    }\n    for (var name in patterns) {\n      if (patterns.hasOwnProperty(name)) {\n        var pattern = patterns[name];\n        if ((pattern instanceof Array && pattern.some(function(p) {\n          return stream.match(p);\n        })) || stream.match(pattern))\n          return ret(name, patternStyles[name], stream.current());\n      }\n    }\n    if (stream.match(\"define\")) {\n      return ret(\"definition\", \"def\");\n    } else {\n      stream.eatWhile(/[\\w\\-]/);\n      // Keyword\n      if (wordLookup[stream.current()]) {\n        return ret(wordLookup[stream.current()], styleLookup[stream.current()], stream.current());\n      } else if (stream.current().match(symbol)) {\n        return ret(\"variable\", \"variable\");\n      } else {\n        stream.next();\n        return ret(\"other\", \"variable-2\");\n      }\n    }\n  }\n\n  function tokenComment(stream, state) {\n    var maybeEnd = false,\n    ch;\n    while ((ch = stream.next())) {\n      if (ch == \"/\" && maybeEnd) {\n        state.tokenize = tokenBase;\n        break;\n      }\n      maybeEnd = (ch == \"*\");\n    }\n    return ret(\"comment\", \"comment\");\n  }\n\n  function tokenString(quote, type, style) {\n    return function(stream, state) {\n      var next, end = false;\n      while ((next = stream.next()) != null) {\n        if (next == quote) {\n          end = true;\n          break;\n        }\n      }\n      if (end)\n        state.tokenize = tokenBase;\n      return ret(type, style);\n    };\n  }\n\n  // Interface\n  return {\n    startState: function() {\n      return {\n        tokenize: tokenBase,\n        currentIndent: 0\n      };\n    },\n    token: function(stream, state) {\n      if (stream.eatSpace())\n        return null;\n      var style = state.tokenize(stream, state);\n      return style;\n    },\n    blockCommentStart: \"/*\",\n    blockCommentEnd: \"*/\"\n  };\n});\n\nCodeMirror.defineMIME(\"text/x-dylan\", \"dylan\");\n\n});\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/dylan/index.html",
    "content": "<!doctype html>\n\n<title>CodeMirror: Dylan mode</title>\n<meta charset=\"utf-8\"/>\n<link rel=stylesheet href=\"../../doc/docs.css\">\n\n<link rel=\"stylesheet\" href=\"../../lib/codemirror.css\">\n<script src=\"../../lib/codemirror.js\"></script>\n<script src=\"../../addon/edit/matchbrackets.js\"></script>\n<script src=\"../../addon/comment/continuecomment.js\"></script>\n<script src=\"../../addon/comment/comment.js\"></script>\n<script src=\"dylan.js\"></script>\n<style type=\"text/css\">.CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}</style>\n<div id=nav>\n  <a href=\"http://codemirror.net\"><h1>CodeMirror</h1><img id=logo src=\"../../doc/logo.png\"></a>\n\n  <ul>\n    <li><a href=\"../../index.html\">Home</a>\n    <li><a href=\"../../doc/manual.html\">Manual</a>\n    <li><a href=\"https://github.com/codemirror/codemirror\">Code</a>\n  </ul>\n  <ul>\n    <li><a href=\"../index.html\">Language modes</a>\n    <li><a class=active href=\"#\">Dylan</a>\n  </ul>\n</div>\n\n<article>\n<h2>Dylan mode</h2>\n\n\n<div><textarea id=\"code\" name=\"code\">\nModule:       locators-internals\nSynopsis:     Abstract modeling of locations\nAuthor:       Andy Armstrong\nCopyright:    Original Code is Copyright (c) 1995-2004 Functional Objects, Inc.\n              All rights reserved.\nLicense:      See License.txt in this distribution for details.\nWarranty:     Distributed WITHOUT WARRANTY OF ANY KIND\n\ndefine open generic locator-server\n    (locator :: <locator>) => (server :: false-or(<server-locator>));\ndefine open generic locator-host\n    (locator :: <locator>) => (host :: false-or(<string>));\ndefine open generic locator-volume\n    (locator :: <locator>) => (volume :: false-or(<string>));\ndefine open generic locator-directory\n    (locator :: <locator>) => (directory :: false-or(<directory-locator>));\ndefine open generic locator-relative?\n    (locator :: <locator>) => (relative? :: <boolean>);\ndefine open generic locator-path\n    (locator :: <locator>) => (path :: <sequence>);\ndefine open generic locator-base\n    (locator :: <locator>) => (base :: false-or(<string>));\ndefine open generic locator-extension\n    (locator :: <locator>) => (extension :: false-or(<string>));\n\n/// Locator classes\n\ndefine open abstract class <directory-locator> (<physical-locator>)\nend class <directory-locator>;\n\ndefine open abstract class <file-locator> (<physical-locator>)\nend class <file-locator>;\n\ndefine method as\n    (class == <directory-locator>, string :: <string>)\n => (locator :: <directory-locator>)\n  as(<native-directory-locator>, string)\nend method as;\n\ndefine method make\n    (class == <directory-locator>,\n     #key server :: false-or(<server-locator>) = #f,\n          path :: <sequence> = #[],\n          relative? :: <boolean> = #f,\n          name :: false-or(<string>) = #f)\n => (locator :: <directory-locator>)\n  make(<native-directory-locator>,\n       server:    server,\n       path:      path,\n       relative?: relative?,\n       name:      name)\nend method make;\n\ndefine method as\n    (class == <file-locator>, string :: <string>)\n => (locator :: <file-locator>)\n  as(<native-file-locator>, string)\nend method as;\n\ndefine method make\n    (class == <file-locator>,\n     #key directory :: false-or(<directory-locator>) = #f,\n          base :: false-or(<string>) = #f,\n          extension :: false-or(<string>) = #f,\n          name :: false-or(<string>) = #f)\n => (locator :: <file-locator>)\n  make(<native-file-locator>,\n       directory: directory,\n       base:      base,\n       extension: extension,\n       name:      name)\nend method make;\n\n/// Locator coercion\n\n//---*** andrewa: This caching scheme doesn't work yet, so disable it.\ndefine constant $cache-locators?        = #f;\ndefine constant $cache-locator-strings? = #f;\n\ndefine constant $locator-to-string-cache = make(<object-table>, weak: #\"key\");\ndefine constant $string-to-locator-cache = make(<string-table>, weak: #\"value\");\n\ndefine open generic locator-as-string\n    (class :: subclass(<string>), locator :: <locator>)\n => (string :: <string>);\n\ndefine open generic string-as-locator\n    (class :: subclass(<locator>), string :: <string>)\n => (locator :: <locator>);\n\ndefine sealed sideways method as\n    (class :: subclass(<string>), locator :: <locator>)\n => (string :: <string>)\n  let string = element($locator-to-string-cache, locator, default: #f);\n  if (string)\n    as(class, string)\n  else\n    let string = locator-as-string(class, locator);\n    if ($cache-locator-strings?)\n      element($locator-to-string-cache, locator) := string;\n    else\n      string\n    end\n  end\nend method as;\n\ndefine sealed sideways method as\n    (class :: subclass(<locator>), string :: <string>)\n => (locator :: <locator>)\n  let locator = element($string-to-locator-cache, string, default: #f);\n  if (instance?(locator, class))\n    locator\n  else\n    let locator = string-as-locator(class, string);\n    if ($cache-locators?)\n      element($string-to-locator-cache, string) := locator;\n    else\n      locator\n    end\n  end\nend method as;\n\n/// Locator conditions\n\ndefine class <locator-error> (<format-string-condition>, <error>)\nend class <locator-error>;\n\ndefine function locator-error\n    (format-string :: <string>, #rest format-arguments)\n  error(make(<locator-error>, \n             format-string:    format-string,\n             format-arguments: format-arguments))\nend function locator-error;\n\n/// Useful locator protocols\n\ndefine open generic locator-test\n    (locator :: <directory-locator>) => (test :: <function>);\n\ndefine method locator-test\n    (locator :: <directory-locator>) => (test :: <function>)\n  \\=\nend method locator-test;\n\ndefine open generic locator-might-have-links?\n    (locator :: <directory-locator>) => (links? :: <boolean>);\n\ndefine method locator-might-have-links?\n    (locator :: <directory-locator>) => (links? :: singleton(#f))\n  #f\nend method locator-might-have-links?;\n\ndefine method locator-relative?\n    (locator :: <file-locator>) => (relative? :: <boolean>)\n  let directory = locator.locator-directory;\n  ~directory | directory.locator-relative?\nend method locator-relative?;\n\ndefine method current-directory-locator?\n    (locator :: <directory-locator>) => (current-directory? :: <boolean>)\n  locator.locator-relative?\n    & locator.locator-path = #[#\"self\"]\nend method current-directory-locator?;\n\ndefine method locator-directory\n    (locator :: <directory-locator>) => (parent :: false-or(<directory-locator>))\n  let path = locator.locator-path;\n  unless (empty?(path))\n    make(object-class(locator),\n         server:    locator.locator-server,\n         path:      copy-sequence(path, end: path.size - 1),\n         relative?: locator.locator-relative?)\n  end\nend method locator-directory;\n\n/// Simplify locator\n\ndefine open generic simplify-locator\n    (locator :: <physical-locator>)\n => (simplified-locator :: <physical-locator>);\n\ndefine method simplify-locator\n    (locator :: <directory-locator>)\n => (simplified-locator :: <directory-locator>)\n  let path = locator.locator-path;\n  let relative? = locator.locator-relative?;\n  let resolve-parent? = ~locator.locator-might-have-links?;\n  let simplified-path\n    = simplify-path(path, \n                    resolve-parent?: resolve-parent?,\n                    relative?: relative?);\n  if (path ~= simplified-path)\n    make(object-class(locator),\n         server:    locator.locator-server,\n         path:      simplified-path,\n         relative?: locator.locator-relative?)\n  else\n    locator\n  end\nend method simplify-locator;\n\ndefine method simplify-locator\n    (locator :: <file-locator>) => (simplified-locator :: <file-locator>)\n  let directory = locator.locator-directory;\n  let simplified-directory = directory & simplify-locator(directory);\n  if (directory ~= simplified-directory)\n    make(object-class(locator),\n         directory: simplified-directory,\n         base:      locator.locator-base,\n         extension: locator.locator-extension)\n  else\n    locator\n  end\nend method simplify-locator;\n\n/// Subdirectory locator\n\ndefine open generic subdirectory-locator\n    (locator :: <directory-locator>, #rest sub-path)\n => (subdirectory :: <directory-locator>);\n\ndefine method subdirectory-locator\n    (locator :: <directory-locator>, #rest sub-path)\n => (subdirectory :: <directory-locator>)\n  let old-path = locator.locator-path;\n  let new-path = concatenate-as(<simple-object-vector>, old-path, sub-path);\n  make(object-class(locator),\n       server:    locator.locator-server,\n       path:      new-path,\n       relative?: locator.locator-relative?)\nend method subdirectory-locator;\n\n/// Relative locator\n\ndefine open generic relative-locator\n    (locator :: <physical-locator>, from-locator :: <physical-locator>)\n => (relative-locator :: <physical-locator>);\n\ndefine method relative-locator\n    (locator :: <directory-locator>, from-locator :: <directory-locator>)\n => (relative-locator :: <directory-locator>)\n  let path = locator.locator-path;\n  let from-path = from-locator.locator-path;\n  case\n    ~locator.locator-relative? & from-locator.locator-relative? =>\n      locator-error\n        (\"Cannot find relative path of absolute locator %= from relative locator %=\",\n         locator, from-locator);\n    locator.locator-server ~= from-locator.locator-server =>\n      locator;\n    path = from-path =>\n      make(object-class(locator),\n           path: vector(#\"self\"),\n           relative?: #t);\n    otherwise =>\n      make(object-class(locator),\n           path: relative-path(path, from-path, test: locator.locator-test),\n           relative?: #t);\n  end\nend method relative-locator;\n\ndefine method relative-locator\n    (locator :: <file-locator>, from-directory :: <directory-locator>)\n => (relative-locator :: <file-locator>)\n  let directory = locator.locator-directory;\n  let relative-directory = directory & relative-locator(directory, from-directory);\n  if (relative-directory ~= directory)\n    simplify-locator\n      (make(object-class(locator),\n            directory: relative-directory,\n            base:      locator.locator-base,\n            extension: locator.locator-extension))\n  else\n    locator\n  end\nend method relative-locator;\n\ndefine method relative-locator\n    (locator :: <physical-locator>, from-locator :: <file-locator>)\n => (relative-locator :: <physical-locator>)\n  let from-directory = from-locator.locator-directory;\n  case\n    from-directory =>\n      relative-locator(locator, from-directory);\n    ~locator.locator-relative? =>\n      locator-error\n        (\"Cannot find relative path of absolute locator %= from relative locator %=\",\n         locator, from-locator);\n    otherwise =>\n      locator;\n  end\nend method relative-locator;\n\n/// Merge locators\n\ndefine open generic merge-locators\n    (locator :: <physical-locator>, from-locator :: <physical-locator>)\n => (merged-locator :: <physical-locator>);\n\n/// Merge locators\n\ndefine method merge-locators\n    (locator :: <directory-locator>, from-locator :: <directory-locator>)\n => (merged-locator :: <directory-locator>)\n  if (locator.locator-relative?)\n    let path = concatenate(from-locator.locator-path, locator.locator-path);\n    simplify-locator\n      (make(object-class(locator),\n            server:    from-locator.locator-server,\n            path:      path,\n            relative?: from-locator.locator-relative?))\n  else\n    locator\n  end\nend method merge-locators;\n\ndefine method merge-locators\n    (locator :: <file-locator>, from-locator :: <directory-locator>)\n => (merged-locator :: <file-locator>)\n  let directory = locator.locator-directory;\n  let merged-directory \n    = if (directory)\n        merge-locators(directory, from-locator)\n      else\n        simplify-locator(from-locator)\n      end;\n  if (merged-directory ~= directory)\n    make(object-class(locator),\n         directory: merged-directory,\n         base:      locator.locator-base,\n         extension: locator.locator-extension)\n  else\n    locator\n  end\nend method merge-locators;\n\ndefine method merge-locators\n    (locator :: <physical-locator>, from-locator :: <file-locator>)\n => (merged-locator :: <physical-locator>)\n  let from-directory = from-locator.locator-directory;\n  if (from-directory)\n    merge-locators(locator, from-directory)\n  else\n    locator\n  end\nend method merge-locators;\n\n/// Locator protocols\n\ndefine sideways method supports-open-locator?\n    (locator :: <file-locator>) => (openable? :: <boolean>)\n  ~locator.locator-relative?\nend method supports-open-locator?;\n\ndefine sideways method open-locator\n    (locator :: <file-locator>, #rest keywords, #key, #all-keys)\n => (stream :: <stream>)\n  apply(open-file-stream, locator, keywords)\nend method open-locator;\n</textarea></div>\n\n    <script>\n      var editor = CodeMirror.fromTextArea(document.getElementById(\"code\"), {\n        mode: \"text/x-dylan\",\n        lineNumbers: true,\n        matchBrackets: true,\n        continueComments: \"Enter\",\n        extraKeys: {\"Ctrl-Q\": \"toggleComment\"},\n        tabMode: \"indent\",\n        indentUnit: 2\n      });\n    </script>\n\n    <p><strong>MIME types defined:</strong> <code>text/x-dylan</code>.</p>\n</article>\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/ebnf/ebnf.js",
    "content": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n(function(mod) {\n  if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n    mod(require(\"../../lib/codemirror\"));\n  else if (typeof define == \"function\" && define.amd) // AMD\n    define([\"../../lib/codemirror\"], mod);\n  else // Plain browser env\n    mod(CodeMirror);\n})(function(CodeMirror) {\n  \"use strict\";\n\n  CodeMirror.defineMode(\"ebnf\", function (config) {\n    var commentType = {slash: 0, parenthesis: 1};\n    var stateType = {comment: 0, _string: 1, characterClass: 2};\n    var bracesMode = null;\n\n    if (config.bracesMode)\n      bracesMode = CodeMirror.getMode(config, config.bracesMode);\n\n    return {\n      startState: function () {\n        return {\n          stringType: null,\n          commentType: null,\n          braced: 0,\n          lhs: true,\n          localState: null,\n          stack: [],\n          inDefinition: false\n        };\n      },\n      token: function (stream, state) {\n        if (!stream) return;\n\n        //check for state changes\n        if (state.stack.length === 0) {\n          //strings\n          if ((stream.peek() == '\"') || (stream.peek() == \"'\")) {\n            state.stringType = stream.peek();\n            stream.next(); // Skip quote\n            state.stack.unshift(stateType._string);\n          } else if (stream.match(/^\\/\\*/)) { //comments starting with /*\n            state.stack.unshift(stateType.comment);\n            state.commentType = commentType.slash;\n          } else if (stream.match(/^\\(\\*/)) { //comments starting with (*\n            state.stack.unshift(stateType.comment);\n            state.commentType = commentType.parenthesis;\n          }\n        }\n\n        //return state\n        //stack has\n        switch (state.stack[0]) {\n        case stateType._string:\n          while (state.stack[0] === stateType._string && !stream.eol()) {\n            if (stream.peek() === state.stringType) {\n              stream.next(); // Skip quote\n              state.stack.shift(); // Clear flag\n            } else if (stream.peek() === \"\\\\\") {\n              stream.next();\n              stream.next();\n            } else {\n              stream.match(/^.[^\\\\\\\"\\']*/);\n            }\n          }\n          return state.lhs ? \"property string\" : \"string\"; // Token style\n\n        case stateType.comment:\n          while (state.stack[0] === stateType.comment && !stream.eol()) {\n            if (state.commentType === commentType.slash && stream.match(/\\*\\//)) {\n              state.stack.shift(); // Clear flag\n              state.commentType = null;\n            } else if (state.commentType === commentType.parenthesis && stream.match(/\\*\\)/)) {\n              state.stack.shift(); // Clear flag\n              state.commentType = null;\n            } else {\n              stream.match(/^.[^\\*]*/);\n            }\n          }\n          return \"comment\";\n\n        case stateType.characterClass:\n          while (state.stack[0] === stateType.characterClass && !stream.eol()) {\n            if (!(stream.match(/^[^\\]\\\\]+/) || stream.match(/^\\\\./))) {\n              state.stack.shift();\n            }\n          }\n          return \"operator\";\n        }\n\n        var peek = stream.peek();\n\n        if (bracesMode !== null && (state.braced || peek === \"{\")) {\n          if (state.localState === null)\n            state.localState = bracesMode.startState();\n\n          var token = bracesMode.token(stream, state.localState),\n          text = stream.current();\n\n          if (!token) {\n            for (var i = 0; i < text.length; i++) {\n              if (text[i] === \"{\") {\n                if (state.braced === 0) {\n                  token = \"matchingbracket\";\n                }\n                state.braced++;\n              } else if (text[i] === \"}\") {\n                state.braced--;\n                if (state.braced === 0) {\n                  token = \"matchingbracket\";\n                }\n              }\n            }\n          }\n          return token;\n        }\n\n        //no stack\n        switch (peek) {\n        case \"[\":\n          stream.next();\n          state.stack.unshift(stateType.characterClass);\n          return \"bracket\";\n        case \":\":\n        case \"|\":\n        case \";\":\n          stream.next();\n          return \"operator\";\n        case \"%\":\n          if (stream.match(\"%%\")) {\n            return \"header\";\n          } else if (stream.match(/[%][A-Za-z]+/)) {\n            return \"keyword\";\n          } else if (stream.match(/[%][}]/)) {\n            return \"matchingbracket\";\n          }\n          break;\n        case \"/\":\n          if (stream.match(/[\\/][A-Za-z]+/)) {\n          return \"keyword\";\n        }\n        case \"\\\\\":\n          if (stream.match(/[\\][a-z]+/)) {\n            return \"string-2\";\n          }\n        case \".\":\n          if (stream.match(\".\")) {\n            return \"atom\";\n          }\n        case \"*\":\n        case \"-\":\n        case \"+\":\n        case \"^\":\n          if (stream.match(peek)) {\n            return \"atom\";\n          }\n        case \"$\":\n          if (stream.match(\"$$\")) {\n            return \"builtin\";\n          } else if (stream.match(/[$][0-9]+/)) {\n            return \"variable-3\";\n          }\n        case \"<\":\n          if (stream.match(/<<[a-zA-Z_]+>>/)) {\n            return \"builtin\";\n          }\n        }\n\n        if (stream.match(/^\\/\\//)) {\n          stream.skipToEnd();\n          return \"comment\";\n        } else if (stream.match(/return/)) {\n          return \"operator\";\n        } else if (stream.match(/^[a-zA-Z_][a-zA-Z0-9_]*/)) {\n          if (stream.match(/(?=[\\(.])/)) {\n            return \"variable\";\n          } else if (stream.match(/(?=[\\s\\n]*[:=])/)) {\n            return \"def\";\n          }\n          return \"variable-2\";\n        } else if ([\"[\", \"]\", \"(\", \")\"].indexOf(stream.peek()) != -1) {\n          stream.next();\n          return \"bracket\";\n        } else if (!stream.eatSpace()) {\n          stream.next();\n        }\n        return null;\n      }\n    };\n  });\n\n  CodeMirror.defineMIME(\"text/x-ebnf\", \"ebnf\");\n});\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/ebnf/index.html",
    "content": "<!doctype html>\n<html>\n  <head>\n    <title>CodeMirror: EBNF Mode</title>\n    <meta charset=\"utf-8\"/>\n    <link rel=stylesheet href=\"../../doc/docs.css\">\n\n    <link rel=\"stylesheet\" href=\"../../lib/codemirror.css\">\n    <script src=\"../../lib/codemirror.js\"></script>\n    <script src=\"../javascript/javascript.js\"></script>\n    <script src=\"ebnf.js\"></script>\n    <style type=\"text/css\">.CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}</style>\n  </head>\n  <body>\n    <div id=nav>\n      <a href=\"http://codemirror.net\"><h1>CodeMirror</h1><img id=logo src=\"../../doc/logo.png\"></a>\n\n      <ul>\n        <li><a href=\"../../index.html\">Home</a>\n        <li><a href=\"../../doc/manual.html\">Manual</a>\n        <li><a href=\"https://github.com/codemirror/codemirror\">Code</a>\n      </ul>\n      <ul>\n        <li><a href=\"../index.html\">Language modes</a>\n        <li><a class=active href=\"#\">EBNF Mode</a>\n      </ul>\n    </div>\n\n    <article>\n      <h2>EBNF Mode (bracesMode setting = \"javascript\")</h2>\n      <form><textarea id=\"code\" name=\"code\">\n/* description: Parses end executes mathematical expressions. */\n\n/* lexical grammar */\n%lex\n\n%%\n\\s+                   /* skip whitespace */\n[0-9]+(\".\"[0-9]+)?\\b  return 'NUMBER';\n\"*\"                   return '*';\n\"/\"                   return '/';\n\"-\"                   return '-';\n\"+\"                   return '+';\n\"^\"                   return '^';\n\"(\"                   return '(';\n\")\"                   return ')';\n\"PI\"                  return 'PI';\n\"E\"                   return 'E';\n&lt;&lt;EOF&gt;&gt;               return 'EOF';\n\n/lex\n\n/* operator associations and precedence */\n\n%left '+' '-'\n%left '*' '/'\n%left '^'\n%left UMINUS\n\n%start expressions\n\n%% /* language grammar */\n\nexpressions\n: e EOF\n{print($1); return $1;}\n;\n\ne\n: e '+' e\n{$$ = $1+$3;}\n| e '-' e\n{$$ = $1-$3;}\n| e '*' e\n{$$ = $1*$3;}\n| e '/' e\n{$$ = $1/$3;}\n| e '^' e\n{$$ = Math.pow($1, $3);}\n| '-' e %prec UMINUS\n{$$ = -$2;}\n| '(' e ')'\n{$$ = $2;}\n| NUMBER\n{$$ = Number(yytext);}\n| E\n{$$ = Math.E;}\n| PI\n{$$ = Math.PI;}\n;</textarea></form>\n      <script>\n        var editor = CodeMirror.fromTextArea(document.getElementById(\"code\"), {\n          mode: {name: \"ebnf\"},\n          lineNumbers: true,\n          bracesMode: 'javascript'\n        });\n      </script>\n      <h3>The EBNF Mode</h3>\n      <p> Created by <a href=\"https://github.com/robertleeplummerjr\">Robert Plummer</a></p>\n    </article>\n  </body>\n</html>\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/ecl/ecl.js",
    "content": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n(function(mod) {\n  if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n    mod(require(\"../../lib/codemirror\"));\n  else if (typeof define == \"function\" && define.amd) // AMD\n    define([\"../../lib/codemirror\"], mod);\n  else // Plain browser env\n    mod(CodeMirror);\n})(function(CodeMirror) {\n\"use strict\";\n\nCodeMirror.defineMode(\"ecl\", function(config) {\n\n  function words(str) {\n    var obj = {}, words = str.split(\" \");\n    for (var i = 0; i < words.length; ++i) obj[words[i]] = true;\n    return obj;\n  }\n\n  function metaHook(stream, state) {\n    if (!state.startOfLine) return false;\n    stream.skipToEnd();\n    return \"meta\";\n  }\n\n  var indentUnit = config.indentUnit;\n  var keyword = words(\"abs acos allnodes ascii asin asstring atan atan2 ave case choose choosen choosesets clustersize combine correlation cos cosh count covariance cron dataset dedup define denormalize distribute distributed distribution ebcdic enth error evaluate event eventextra eventname exists exp failcode failmessage fetch fromunicode getisvalid global graph group hash hash32 hash64 hashcrc hashmd5 having if index intformat isvalid iterate join keyunicode length library limit ln local log loop map matched matchlength matchposition matchtext matchunicode max merge mergejoin min nolocal nonempty normalize parse pipe power preload process project pull random range rank ranked realformat recordof regexfind regexreplace regroup rejected rollup round roundup row rowdiff sample set sin sinh sizeof soapcall sort sorted sqrt stepped stored sum table tan tanh thisnode topn tounicode transfer trim truncate typeof ungroup unicodeorder variance which workunit xmldecode xmlencode xmltext xmlunicode\");\n  var variable = words(\"apply assert build buildindex evaluate fail keydiff keypatch loadxml nothor notify output parallel sequential soapcall wait\");\n  var variable_2 = words(\"__compressed__ all and any as atmost before beginc++ best between case const counter csv descend encrypt end endc++ endmacro except exclusive expire export extend false few first flat from full function group header heading hole ifblock import in interface joined keep keyed last left limit load local locale lookup macro many maxcount maxlength min skew module named nocase noroot noscan nosort not of only opt or outer overwrite packed partition penalty physicallength pipe quote record relationship repeat return right scan self separator service shared skew skip sql store terminator thor threshold token transform trim true type unicodeorder unsorted validate virtual whole wild within xml xpath\");\n  var variable_3 = words(\"ascii big_endian boolean data decimal ebcdic integer pattern qstring real record rule set of string token udecimal unicode unsigned varstring varunicode\");\n  var builtin = words(\"checkpoint deprecated failcode failmessage failure global independent onwarning persist priority recovery stored success wait when\");\n  var blockKeywords = words(\"catch class do else finally for if switch try while\");\n  var atoms = words(\"true false null\");\n  var hooks = {\"#\": metaHook};\n  var multiLineStrings;\n  var isOperatorChar = /[+\\-*&%=<>!?|\\/]/;\n\n  var curPunc;\n\n  function tokenBase(stream, state) {\n    var ch = stream.next();\n    if (hooks[ch]) {\n      var result = hooks[ch](stream, state);\n      if (result !== false) return result;\n    }\n    if (ch == '\"' || ch == \"'\") {\n      state.tokenize = tokenString(ch);\n      return state.tokenize(stream, state);\n    }\n    if (/[\\[\\]{}\\(\\),;\\:\\.]/.test(ch)) {\n      curPunc = ch;\n      return null;\n    }\n    if (/\\d/.test(ch)) {\n      stream.eatWhile(/[\\w\\.]/);\n      return \"number\";\n    }\n    if (ch == \"/\") {\n      if (stream.eat(\"*\")) {\n        state.tokenize = tokenComment;\n        return tokenComment(stream, state);\n      }\n      if (stream.eat(\"/\")) {\n        stream.skipToEnd();\n        return \"comment\";\n      }\n    }\n    if (isOperatorChar.test(ch)) {\n      stream.eatWhile(isOperatorChar);\n      return \"operator\";\n    }\n    stream.eatWhile(/[\\w\\$_]/);\n    var cur = stream.current().toLowerCase();\n    if (keyword.propertyIsEnumerable(cur)) {\n      if (blockKeywords.propertyIsEnumerable(cur)) curPunc = \"newstatement\";\n      return \"keyword\";\n    } else if (variable.propertyIsEnumerable(cur)) {\n      if (blockKeywords.propertyIsEnumerable(cur)) curPunc = \"newstatement\";\n      return \"variable\";\n    } else if (variable_2.propertyIsEnumerable(cur)) {\n      if (blockKeywords.propertyIsEnumerable(cur)) curPunc = \"newstatement\";\n      return \"variable-2\";\n    } else if (variable_3.propertyIsEnumerable(cur)) {\n      if (blockKeywords.propertyIsEnumerable(cur)) curPunc = \"newstatement\";\n      return \"variable-3\";\n    } else if (builtin.propertyIsEnumerable(cur)) {\n      if (blockKeywords.propertyIsEnumerable(cur)) curPunc = \"newstatement\";\n      return \"builtin\";\n    } else { //Data types are of from KEYWORD##\n                var i = cur.length - 1;\n                while(i >= 0 && (!isNaN(cur[i]) || cur[i] == '_'))\n                        --i;\n\n                if (i > 0) {\n                        var cur2 = cur.substr(0, i + 1);\n                if (variable_3.propertyIsEnumerable(cur2)) {\n                        if (blockKeywords.propertyIsEnumerable(cur2)) curPunc = \"newstatement\";\n                        return \"variable-3\";\n                }\n            }\n    }\n    if (atoms.propertyIsEnumerable(cur)) return \"atom\";\n    return null;\n  }\n\n  function tokenString(quote) {\n    return function(stream, state) {\n      var escaped = false, next, end = false;\n      while ((next = stream.next()) != null) {\n        if (next == quote && !escaped) {end = true; break;}\n        escaped = !escaped && next == \"\\\\\";\n      }\n      if (end || !(escaped || multiLineStrings))\n        state.tokenize = tokenBase;\n      return \"string\";\n    };\n  }\n\n  function tokenComment(stream, state) {\n    var maybeEnd = false, ch;\n    while (ch = stream.next()) {\n      if (ch == \"/\" && maybeEnd) {\n        state.tokenize = tokenBase;\n        break;\n      }\n      maybeEnd = (ch == \"*\");\n    }\n    return \"comment\";\n  }\n\n  function Context(indented, column, type, align, prev) {\n    this.indented = indented;\n    this.column = column;\n    this.type = type;\n    this.align = align;\n    this.prev = prev;\n  }\n  function pushContext(state, col, type) {\n    return state.context = new Context(state.indented, col, type, null, state.context);\n  }\n  function popContext(state) {\n    var t = state.context.type;\n    if (t == \")\" || t == \"]\" || t == \"}\")\n      state.indented = state.context.indented;\n    return state.context = state.context.prev;\n  }\n\n  // Interface\n\n  return {\n    startState: function(basecolumn) {\n      return {\n        tokenize: null,\n        context: new Context((basecolumn || 0) - indentUnit, 0, \"top\", false),\n        indented: 0,\n        startOfLine: true\n      };\n    },\n\n    token: function(stream, state) {\n      var ctx = state.context;\n      if (stream.sol()) {\n        if (ctx.align == null) ctx.align = false;\n        state.indented = stream.indentation();\n        state.startOfLine = true;\n      }\n      if (stream.eatSpace()) return null;\n      curPunc = null;\n      var style = (state.tokenize || tokenBase)(stream, state);\n      if (style == \"comment\" || style == \"meta\") return style;\n      if (ctx.align == null) ctx.align = true;\n\n      if ((curPunc == \";\" || curPunc == \":\") && ctx.type == \"statement\") popContext(state);\n      else if (curPunc == \"{\") pushContext(state, stream.column(), \"}\");\n      else if (curPunc == \"[\") pushContext(state, stream.column(), \"]\");\n      else if (curPunc == \"(\") pushContext(state, stream.column(), \")\");\n      else if (curPunc == \"}\") {\n        while (ctx.type == \"statement\") ctx = popContext(state);\n        if (ctx.type == \"}\") ctx = popContext(state);\n        while (ctx.type == \"statement\") ctx = popContext(state);\n      }\n      else if (curPunc == ctx.type) popContext(state);\n      else if (ctx.type == \"}\" || ctx.type == \"top\" || (ctx.type == \"statement\" && curPunc == \"newstatement\"))\n        pushContext(state, stream.column(), \"statement\");\n      state.startOfLine = false;\n      return style;\n    },\n\n    indent: function(state, textAfter) {\n      if (state.tokenize != tokenBase && state.tokenize != null) return 0;\n      var ctx = state.context, firstChar = textAfter && textAfter.charAt(0);\n      if (ctx.type == \"statement\" && firstChar == \"}\") ctx = ctx.prev;\n      var closing = firstChar == ctx.type;\n      if (ctx.type == \"statement\") return ctx.indented + (firstChar == \"{\" ? 0 : indentUnit);\n      else if (ctx.align) return ctx.column + (closing ? 0 : 1);\n      else return ctx.indented + (closing ? 0 : indentUnit);\n    },\n\n    electricChars: \"{}\"\n  };\n});\n\nCodeMirror.defineMIME(\"text/x-ecl\", \"ecl\");\n\n});\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/ecl/index.html",
    "content": "<!doctype html>\n\n<title>CodeMirror: ECL mode</title>\n<meta charset=\"utf-8\"/>\n<link rel=stylesheet href=\"../../doc/docs.css\">\n\n<link rel=\"stylesheet\" href=\"../../lib/codemirror.css\">\n<script src=\"../../lib/codemirror.js\"></script>\n<script src=\"ecl.js\"></script>\n<style>.CodeMirror {border: 1px solid black;}</style>\n<div id=nav>\n  <a href=\"http://codemirror.net\"><h1>CodeMirror</h1><img id=logo src=\"../../doc/logo.png\"></a>\n\n  <ul>\n    <li><a href=\"../../index.html\">Home</a>\n    <li><a href=\"../../doc/manual.html\">Manual</a>\n    <li><a href=\"https://github.com/codemirror/codemirror\">Code</a>\n  </ul>\n  <ul>\n    <li><a href=\"../index.html\">Language modes</a>\n    <li><a class=active href=\"#\">ECL</a>\n  </ul>\n</div>\n\n<article>\n<h2>ECL mode</h2>\n<form><textarea id=\"code\" name=\"code\">\n/*\nsample useless code to demonstrate ecl syntax highlighting\nthis is a multiline comment!\n*/\n\n//  this is a singleline comment!\n\nimport ut;\nr := \n  record\n   string22 s1 := '123';\n   integer4 i1 := 123;\n  end;\n#option('tmp', true);\nd := dataset('tmp::qb', r, thor);\noutput(d);\n</textarea></form>\n    <script>\n      var editor = CodeMirror.fromTextArea(document.getElementById(\"code\"), {});\n    </script>\n\n    <p>Based on CodeMirror's clike mode.  For more information see <a href=\"http://hpccsystems.com\">HPCC Systems</a> web site.</p>\n    <p><strong>MIME types defined:</strong> <code>text/x-ecl</code>.</p>\n\n  </article>\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/eiffel/eiffel.js",
    "content": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n(function(mod) {\n  if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n    mod(require(\"../../lib/codemirror\"));\n  else if (typeof define == \"function\" && define.amd) // AMD\n    define([\"../../lib/codemirror\"], mod);\n  else // Plain browser env\n    mod(CodeMirror);\n})(function(CodeMirror) {\n\"use strict\";\n\nCodeMirror.defineMode(\"eiffel\", function() {\n  function wordObj(words) {\n    var o = {};\n    for (var i = 0, e = words.length; i < e; ++i) o[words[i]] = true;\n    return o;\n  }\n  var keywords = wordObj([\n    'note',\n    'across',\n    'when',\n    'variant',\n    'until',\n    'unique',\n    'undefine',\n    'then',\n    'strip',\n    'select',\n    'retry',\n    'rescue',\n    'require',\n    'rename',\n    'reference',\n    'redefine',\n    'prefix',\n    'once',\n    'old',\n    'obsolete',\n    'loop',\n    'local',\n    'like',\n    'is',\n    'inspect',\n    'infix',\n    'include',\n    'if',\n    'frozen',\n    'from',\n    'external',\n    'export',\n    'ensure',\n    'end',\n    'elseif',\n    'else',\n    'do',\n    'creation',\n    'create',\n    'check',\n    'alias',\n    'agent',\n    'separate',\n    'invariant',\n    'inherit',\n    'indexing',\n    'feature',\n    'expanded',\n    'deferred',\n    'class',\n    'Void',\n    'True',\n    'Result',\n    'Precursor',\n    'False',\n    'Current',\n    'create',\n    'attached',\n    'detachable',\n    'as',\n    'and',\n    'implies',\n    'not',\n    'or'\n  ]);\n  var operators = wordObj([\":=\", \"and then\",\"and\", \"or\",\"<<\",\">>\"]);\n  var curPunc;\n\n  function chain(newtok, stream, state) {\n    state.tokenize.push(newtok);\n    return newtok(stream, state);\n  }\n\n  function tokenBase(stream, state) {\n    curPunc = null;\n    if (stream.eatSpace()) return null;\n    var ch = stream.next();\n    if (ch == '\"'||ch == \"'\") {\n      return chain(readQuoted(ch, \"string\"), stream, state);\n    } else if (ch == \"-\"&&stream.eat(\"-\")) {\n      stream.skipToEnd();\n      return \"comment\";\n    } else if (ch == \":\"&&stream.eat(\"=\")) {\n      return \"operator\";\n    } else if (/[0-9]/.test(ch)) {\n      stream.eatWhile(/[xXbBCc0-9\\.]/);\n      stream.eat(/[\\?\\!]/);\n      return \"ident\";\n    } else if (/[a-zA-Z_0-9]/.test(ch)) {\n      stream.eatWhile(/[a-zA-Z_0-9]/);\n      stream.eat(/[\\?\\!]/);\n      return \"ident\";\n    } else if (/[=+\\-\\/*^%<>~]/.test(ch)) {\n      stream.eatWhile(/[=+\\-\\/*^%<>~]/);\n      return \"operator\";\n    } else {\n      return null;\n    }\n  }\n\n  function readQuoted(quote, style,  unescaped) {\n    return function(stream, state) {\n      var escaped = false, ch;\n      while ((ch = stream.next()) != null) {\n        if (ch == quote && (unescaped || !escaped)) {\n          state.tokenize.pop();\n          break;\n        }\n        escaped = !escaped && ch == \"%\";\n      }\n      return style;\n    };\n  }\n\n  return {\n    startState: function() {\n      return {tokenize: [tokenBase]};\n    },\n\n    token: function(stream, state) {\n      var style = state.tokenize[state.tokenize.length-1](stream, state);\n      if (style == \"ident\") {\n        var word = stream.current();\n        style = keywords.propertyIsEnumerable(stream.current()) ? \"keyword\"\n          : operators.propertyIsEnumerable(stream.current()) ? \"operator\"\n          : /^[A-Z][A-Z_0-9]*$/g.test(word) ? \"tag\"\n          : /^0[bB][0-1]+$/g.test(word) ? \"number\"\n          : /^0[cC][0-7]+$/g.test(word) ? \"number\"\n          : /^0[xX][a-fA-F0-9]+$/g.test(word) ? \"number\"\n          : /^([0-9]+\\.[0-9]*)|([0-9]*\\.[0-9]+)$/g.test(word) ? \"number\"\n          : /^[0-9]+$/g.test(word) ? \"number\"\n          : \"variable\";\n      }\n      return style;\n    },\n    lineComment: \"--\"\n  };\n});\n\nCodeMirror.defineMIME(\"text/x-eiffel\", \"eiffel\");\n\n});\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/eiffel/index.html",
    "content": "<!doctype html>\n\n<title>CodeMirror: Eiffel mode</title>\n<meta charset=\"utf-8\"/>\n<link rel=stylesheet href=\"../../doc/docs.css\">\n\n<link rel=\"stylesheet\" href=\"../../lib/codemirror.css\">\n<link rel=\"stylesheet\" href=\"../../theme/neat.css\">\n<script src=\"../../lib/codemirror.js\"></script>\n<script src=\"eiffel.js\"></script>\n<style>\n      .CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}\n      .cm-s-default span.cm-arrow { color: red; }\n    </style>\n<div id=nav>\n  <a href=\"http://codemirror.net\"><h1>CodeMirror</h1><img id=logo src=\"../../doc/logo.png\"></a>\n\n  <ul>\n    <li><a href=\"../../index.html\">Home</a>\n    <li><a href=\"../../doc/manual.html\">Manual</a>\n    <li><a href=\"https://github.com/codemirror/codemirror\">Code</a>\n  </ul>\n  <ul>\n    <li><a href=\"../index.html\">Language modes</a>\n    <li><a class=active href=\"#\">Eiffel</a>\n  </ul>\n</div>\n\n<article>\n<h2>Eiffel mode</h2>\n<form><textarea id=\"code\" name=\"code\">\nnote\n    description: \"[\n        Project-wide universal properties.\n        This class is an ancestor to all developer-written classes.\n        ANY may be customized for individual projects or teams.\n        ]\"\n\n    library: \"Free implementation of ELKS library\"\n    status: \"See notice at end of class.\"\n    legal: \"See notice at end of class.\"\n    date: \"$Date: 2013-01-25 11:49:00 -0800 (Fri, 25 Jan 2013) $\"\n    revision: \"$Revision: 712 $\"\n\nclass\n    ANY\n\nfeature -- Customization\n\nfeature -- Access\n\n    generator: STRING\n            -- Name of current object's generating class\n            -- (base class of the type of which it is a direct instance)\n        external\n            \"built_in\"\n        ensure\n            generator_not_void: Result /= Void\n            generator_not_empty: not Result.is_empty\n        end\n\n    generating_type: TYPE [detachable like Current]\n            -- Type of current object\n            -- (type of which it is a direct instance)\n        do\n            Result := {detachable like Current}\n        ensure\n            generating_type_not_void: Result /= Void\n        end\n\nfeature -- Status report\n\n    conforms_to (other: ANY): BOOLEAN\n            -- Does type of current object conform to type\n            -- of `other' (as per Eiffel: The Language, chapter 13)?\n        require\n            other_not_void: other /= Void\n        external\n            \"built_in\"\n        end\n\n    same_type (other: ANY): BOOLEAN\n            -- Is type of current object identical to type of `other'?\n        require\n            other_not_void: other /= Void\n        external\n            \"built_in\"\n        ensure\n            definition: Result = (conforms_to (other) and\n                                        other.conforms_to (Current))\n        end\n\nfeature -- Comparison\n\n    is_equal (other: like Current): BOOLEAN\n            -- Is `other' attached to an object considered\n            -- equal to current object?\n        require\n            other_not_void: other /= Void\n        external\n            \"built_in\"\n        ensure\n            symmetric: Result implies other ~ Current\n            consistent: standard_is_equal (other) implies Result\n        end\n\n    frozen standard_is_equal (other: like Current): BOOLEAN\n            -- Is `other' attached to an object of the same type\n            -- as current object, and field-by-field identical to it?\n        require\n            other_not_void: other /= Void\n        external\n            \"built_in\"\n        ensure\n            same_type: Result implies same_type (other)\n            symmetric: Result implies other.standard_is_equal (Current)\n        end\n\n    frozen equal (a: detachable ANY; b: like a): BOOLEAN\n            -- Are `a' and `b' either both void or attached\n            -- to objects considered equal?\n        do\n            if a = Void then\n                Result := b = Void\n            else\n                Result := b /= Void and then\n                            a.is_equal (b)\n            end\n        ensure\n            definition: Result = (a = Void and b = Void) or else\n                        ((a /= Void and b /= Void) and then\n                        a.is_equal (b))\n        end\n\n    frozen standard_equal (a: detachable ANY; b: like a): BOOLEAN\n            -- Are `a' and `b' either both void or attached to\n            -- field-by-field identical objects of the same type?\n            -- Always uses default object comparison criterion.\n        do\n            if a = Void then\n                Result := b = Void\n            else\n                Result := b /= Void and then\n                            a.standard_is_equal (b)\n            end\n        ensure\n            definition: Result = (a = Void and b = Void) or else\n                        ((a /= Void and b /= Void) and then\n                        a.standard_is_equal (b))\n        end\n\n    frozen is_deep_equal (other: like Current): BOOLEAN\n            -- Are `Current' and `other' attached to isomorphic object structures?\n        require\n            other_not_void: other /= Void\n        external\n            \"built_in\"\n        ensure\n            shallow_implies_deep: standard_is_equal (other) implies Result\n            same_type: Result implies same_type (other)\n            symmetric: Result implies other.is_deep_equal (Current)\n        end\n\n    frozen deep_equal (a: detachable ANY; b: like a): BOOLEAN\n            -- Are `a' and `b' either both void\n            -- or attached to isomorphic object structures?\n        do\n            if a = Void then\n                Result := b = Void\n            else\n                Result := b /= Void and then a.is_deep_equal (b)\n            end\n        ensure\n            shallow_implies_deep: standard_equal (a, b) implies Result\n            both_or_none_void: (a = Void) implies (Result = (b = Void))\n            same_type: (Result and (a /= Void)) implies (b /= Void and then a.same_type (b))\n            symmetric: Result implies deep_equal (b, a)\n        end\n\nfeature -- Duplication\n\n    frozen twin: like Current\n            -- New object equal to `Current'\n            -- `twin' calls `copy'; to change copying/twinning semantics, redefine `copy'.\n        external\n            \"built_in\"\n        ensure\n            twin_not_void: Result /= Void\n            is_equal: Result ~ Current\n        end\n\n    copy (other: like Current)\n            -- Update current object using fields of object attached\n            -- to `other', so as to yield equal objects.\n        require\n            other_not_void: other /= Void\n            type_identity: same_type (other)\n        external\n            \"built_in\"\n        ensure\n            is_equal: Current ~ other\n        end\n\n    frozen standard_copy (other: like Current)\n            -- Copy every field of `other' onto corresponding field\n            -- of current object.\n        require\n            other_not_void: other /= Void\n            type_identity: same_type (other)\n        external\n            \"built_in\"\n        ensure\n            is_standard_equal: standard_is_equal (other)\n        end\n\n    frozen clone (other: detachable ANY): like other\n            -- Void if `other' is void; otherwise new object\n            -- equal to `other'\n            --\n            -- For non-void `other', `clone' calls `copy';\n            -- to change copying/cloning semantics, redefine `copy'.\n        obsolete\n            \"Use `twin' instead.\"\n        do\n            if other /= Void then\n                Result := other.twin\n            end\n        ensure\n            equal: Result ~ other\n        end\n\n    frozen standard_clone (other: detachable ANY): like other\n            -- Void if `other' is void; otherwise new object\n            -- field-by-field identical to `other'.\n            -- Always uses default copying semantics.\n        obsolete\n            \"Use `standard_twin' instead.\"\n        do\n            if other /= Void then\n                Result := other.standard_twin\n            end\n        ensure\n            equal: standard_equal (Result, other)\n        end\n\n    frozen standard_twin: like Current\n            -- New object field-by-field identical to `other'.\n            -- Always uses default copying semantics.\n        external\n            \"built_in\"\n        ensure\n            standard_twin_not_void: Result /= Void\n            equal: standard_equal (Result, Current)\n        end\n\n    frozen deep_twin: like Current\n            -- New object structure recursively duplicated from Current.\n        external\n            \"built_in\"\n        ensure\n            deep_twin_not_void: Result /= Void\n            deep_equal: deep_equal (Current, Result)\n        end\n\n    frozen deep_clone (other: detachable ANY): like other\n            -- Void if `other' is void: otherwise, new object structure\n            -- recursively duplicated from the one attached to `other'\n        obsolete\n            \"Use `deep_twin' instead.\"\n        do\n            if other /= Void then\n                Result := other.deep_twin\n            end\n        ensure\n            deep_equal: deep_equal (other, Result)\n        end\n\n    frozen deep_copy (other: like Current)\n            -- Effect equivalent to that of:\n            --      `copy' (`other' . `deep_twin')\n        require\n            other_not_void: other /= Void\n        do\n            copy (other.deep_twin)\n        ensure\n            deep_equal: deep_equal (Current, other)\n        end\n\nfeature {NONE} -- Retrieval\n\n    frozen internal_correct_mismatch\n            -- Called from runtime to perform a proper dynamic dispatch on `correct_mismatch'\n            -- from MISMATCH_CORRECTOR.\n        local\n            l_msg: STRING\n            l_exc: EXCEPTIONS\n        do\n            if attached {MISMATCH_CORRECTOR} Current as l_corrector then\n                l_corrector.correct_mismatch\n            else\n                create l_msg.make_from_string (\"Mismatch: \")\n                create l_exc\n                l_msg.append (generating_type.name)\n                l_exc.raise_retrieval_exception (l_msg)\n            end\n        end\n\nfeature -- Output\n\n    io: STD_FILES\n            -- Handle to standard file setup\n        once\n            create Result\n            Result.set_output_default\n        ensure\n            io_not_void: Result /= Void\n        end\n\n    out: STRING\n            -- New string containing terse printable representation\n            -- of current object\n        do\n            Result := tagged_out\n        ensure\n            out_not_void: Result /= Void\n        end\n\n    frozen tagged_out: STRING\n            -- New string containing terse printable representation\n            -- of current object\n        external\n            \"built_in\"\n        ensure\n            tagged_out_not_void: Result /= Void\n        end\n\n    print (o: detachable ANY)\n            -- Write terse external representation of `o'\n            -- on standard output.\n        do\n            if o /= Void then\n                io.put_string (o.out)\n            end\n        end\n\nfeature -- Platform\n\n    Operating_environment: OPERATING_ENVIRONMENT\n            -- Objects available from the operating system\n        once\n            create Result\n        ensure\n            operating_environment_not_void: Result /= Void\n        end\n\nfeature {NONE} -- Initialization\n\n    default_create\n            -- Process instances of classes with no creation clause.\n            -- (Default: do nothing.)\n        do\n        end\n\nfeature -- Basic operations\n\n    default_rescue\n            -- Process exception for routines with no Rescue clause.\n            -- (Default: do nothing.)\n        do\n        end\n\n    frozen do_nothing\n            -- Execute a null action.\n        do\n        end\n\n    frozen default: detachable like Current\n            -- Default value of object's type\n        do\n        end\n\n    frozen default_pointer: POINTER\n            -- Default value of type `POINTER'\n            -- (Avoid the need to write `p'.`default' for\n            -- some `p' of type `POINTER'.)\n        do\n        ensure\n            -- Result = Result.default\n        end\n\n    frozen as_attached: attached like Current\n            -- Attached version of Current\n            -- (Can be used during transitional period to convert\n            -- non-void-safe classes to void-safe ones.)\n        do\n            Result := Current\n        end\n\ninvariant\n    reflexive_equality: standard_is_equal (Current)\n    reflexive_conformance: conforms_to (Current)\n\nnote\n    copyright: \"Copyright (c) 1984-2012, Eiffel Software and others\"\n    license:   \"Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)\"\n    source: \"[\n            Eiffel Software\n            5949 Hollister Ave., Goleta, CA 93117 USA\n            Telephone 805-685-1006, Fax 805-685-6869\n            Website http://www.eiffel.com\n            Customer support http://support.eiffel.com\n        ]\"\n\nend\n\n</textarea></form>\n    <script>\n      var editor = CodeMirror.fromTextArea(document.getElementById(\"code\"), {\n        mode: \"text/x-eiffel\",\n        indentUnit: 4,\n        lineNumbers: true,\n        theme: \"neat\"\n      });\n    </script>\n\n    <p><strong>MIME types defined:</strong> <code>text/x-eiffel</code>.</p>\n \n <p> Created by <a href=\"https://github.com/ynh\">YNH</a>.</p>\n  </article>\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/erlang/erlang.js",
    "content": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n/*jshint unused:true, eqnull:true, curly:true, bitwise:true */\n/*jshint undef:true, latedef:true, trailing:true */\n/*global CodeMirror:true */\n\n// erlang mode.\n// tokenizer -> token types -> CodeMirror styles\n// tokenizer maintains a parse stack\n// indenter uses the parse stack\n\n// TODO indenter:\n//   bit syntax\n//   old guard/bif/conversion clashes (e.g. \"float/1\")\n//   type/spec/opaque\n\n(function(mod) {\n  if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n    mod(require(\"../../lib/codemirror\"));\n  else if (typeof define == \"function\" && define.amd) // AMD\n    define([\"../../lib/codemirror\"], mod);\n  else // Plain browser env\n    mod(CodeMirror);\n})(function(CodeMirror) {\n\"use strict\";\n\nCodeMirror.defineMIME(\"text/x-erlang\", \"erlang\");\n\nCodeMirror.defineMode(\"erlang\", function(cmCfg) {\n  \"use strict\";\n\n/////////////////////////////////////////////////////////////////////////////\n// constants\n\n  var typeWords = [\n    \"-type\", \"-spec\", \"-export_type\", \"-opaque\"];\n\n  var keywordWords = [\n    \"after\",\"begin\",\"catch\",\"case\",\"cond\",\"end\",\"fun\",\"if\",\n    \"let\",\"of\",\"query\",\"receive\",\"try\",\"when\"];\n\n  var separatorRE    = /[\\->,;]/;\n  var separatorWords = [\n    \"->\",\";\",\",\"];\n\n  var operatorAtomWords = [\n    \"and\",\"andalso\",\"band\",\"bnot\",\"bor\",\"bsl\",\"bsr\",\"bxor\",\n    \"div\",\"not\",\"or\",\"orelse\",\"rem\",\"xor\"];\n\n  var operatorSymbolRE    = /[\\+\\-\\*\\/<>=\\|:!]/;\n  var operatorSymbolWords = [\n    \"=\",\"+\",\"-\",\"*\",\"/\",\">\",\">=\",\"<\",\"=<\",\"=:=\",\"==\",\"=/=\",\"/=\",\"||\",\"<-\",\"!\"];\n\n  var openParenRE    = /[<\\(\\[\\{]/;\n  var openParenWords = [\n    \"<<\",\"(\",\"[\",\"{\"];\n\n  var closeParenRE    = /[>\\)\\]\\}]/;\n  var closeParenWords = [\n    \"}\",\"]\",\")\",\">>\"];\n\n  var guardWords = [\n    \"is_atom\",\"is_binary\",\"is_bitstring\",\"is_boolean\",\"is_float\",\n    \"is_function\",\"is_integer\",\"is_list\",\"is_number\",\"is_pid\",\n    \"is_port\",\"is_record\",\"is_reference\",\"is_tuple\",\n    \"atom\",\"binary\",\"bitstring\",\"boolean\",\"function\",\"integer\",\"list\",\n    \"number\",\"pid\",\"port\",\"record\",\"reference\",\"tuple\"];\n\n  var bifWords = [\n    \"abs\",\"adler32\",\"adler32_combine\",\"alive\",\"apply\",\"atom_to_binary\",\n    \"atom_to_list\",\"binary_to_atom\",\"binary_to_existing_atom\",\n    \"binary_to_list\",\"binary_to_term\",\"bit_size\",\"bitstring_to_list\",\n    \"byte_size\",\"check_process_code\",\"contact_binary\",\"crc32\",\n    \"crc32_combine\",\"date\",\"decode_packet\",\"delete_module\",\n    \"disconnect_node\",\"element\",\"erase\",\"exit\",\"float\",\"float_to_list\",\n    \"garbage_collect\",\"get\",\"get_keys\",\"group_leader\",\"halt\",\"hd\",\n    \"integer_to_list\",\"internal_bif\",\"iolist_size\",\"iolist_to_binary\",\n    \"is_alive\",\"is_atom\",\"is_binary\",\"is_bitstring\",\"is_boolean\",\n    \"is_float\",\"is_function\",\"is_integer\",\"is_list\",\"is_number\",\"is_pid\",\n    \"is_port\",\"is_process_alive\",\"is_record\",\"is_reference\",\"is_tuple\",\n    \"length\",\"link\",\"list_to_atom\",\"list_to_binary\",\"list_to_bitstring\",\n    \"list_to_existing_atom\",\"list_to_float\",\"list_to_integer\",\n    \"list_to_pid\",\"list_to_tuple\",\"load_module\",\"make_ref\",\"module_loaded\",\n    \"monitor_node\",\"node\",\"node_link\",\"node_unlink\",\"nodes\",\"notalive\",\n    \"now\",\"open_port\",\"pid_to_list\",\"port_close\",\"port_command\",\n    \"port_connect\",\"port_control\",\"pre_loaded\",\"process_flag\",\n    \"process_info\",\"processes\",\"purge_module\",\"put\",\"register\",\n    \"registered\",\"round\",\"self\",\"setelement\",\"size\",\"spawn\",\"spawn_link\",\n    \"spawn_monitor\",\"spawn_opt\",\"split_binary\",\"statistics\",\n    \"term_to_binary\",\"time\",\"throw\",\"tl\",\"trunc\",\"tuple_size\",\n    \"tuple_to_list\",\"unlink\",\"unregister\",\"whereis\"];\n\n// upper case: [A-Z] [Ø-Þ] [À-Ö]\n// lower case: [a-z] [ß-ö] [ø-ÿ]\n  var anumRE       = /[\\w@Ø-ÞÀ-Öß-öø-ÿ]/;\n  var escapesRE    =\n    /[0-7]{1,3}|[bdefnrstv\\\\\"']|\\^[a-zA-Z]|x[0-9a-zA-Z]{2}|x{[0-9a-zA-Z]+}/;\n\n/////////////////////////////////////////////////////////////////////////////\n// tokenizer\n\n  function tokenizer(stream,state) {\n    // in multi-line string\n    if (state.in_string) {\n      state.in_string = (!doubleQuote(stream));\n      return rval(state,stream,\"string\");\n    }\n\n    // in multi-line atom\n    if (state.in_atom) {\n      state.in_atom = (!singleQuote(stream));\n      return rval(state,stream,\"atom\");\n    }\n\n    // whitespace\n    if (stream.eatSpace()) {\n      return rval(state,stream,\"whitespace\");\n    }\n\n    // attributes and type specs\n    if (!peekToken(state) &&\n        stream.match(/-\\s*[a-zß-öø-ÿ][\\wØ-ÞÀ-Öß-öø-ÿ]*/)) {\n      if (is_member(stream.current(),typeWords)) {\n        return rval(state,stream,\"type\");\n      }else{\n        return rval(state,stream,\"attribute\");\n      }\n    }\n\n    var ch = stream.next();\n\n    // comment\n    if (ch == '%') {\n      stream.skipToEnd();\n      return rval(state,stream,\"comment\");\n    }\n\n    // colon\n    if (ch == \":\") {\n      return rval(state,stream,\"colon\");\n    }\n\n    // macro\n    if (ch == '?') {\n      stream.eatSpace();\n      stream.eatWhile(anumRE);\n      return rval(state,stream,\"macro\");\n    }\n\n    // record\n    if (ch == \"#\") {\n      stream.eatSpace();\n      stream.eatWhile(anumRE);\n      return rval(state,stream,\"record\");\n    }\n\n    // dollar escape\n    if (ch == \"$\") {\n      if (stream.next() == \"\\\\\" && !stream.match(escapesRE)) {\n        return rval(state,stream,\"error\");\n      }\n      return rval(state,stream,\"number\");\n    }\n\n    // dot\n    if (ch == \".\") {\n      return rval(state,stream,\"dot\");\n    }\n\n    // quoted atom\n    if (ch == '\\'') {\n      if (!(state.in_atom = (!singleQuote(stream)))) {\n        if (stream.match(/\\s*\\/\\s*[0-9]/,false)) {\n          stream.match(/\\s*\\/\\s*[0-9]/,true);\n          return rval(state,stream,\"fun\");      // 'f'/0 style fun\n        }\n        if (stream.match(/\\s*\\(/,false) || stream.match(/\\s*:/,false)) {\n          return rval(state,stream,\"function\");\n        }\n      }\n      return rval(state,stream,\"atom\");\n    }\n\n    // string\n    if (ch == '\"') {\n      state.in_string = (!doubleQuote(stream));\n      return rval(state,stream,\"string\");\n    }\n\n    // variable\n    if (/[A-Z_Ø-ÞÀ-Ö]/.test(ch)) {\n      stream.eatWhile(anumRE);\n      return rval(state,stream,\"variable\");\n    }\n\n    // atom/keyword/BIF/function\n    if (/[a-z_ß-öø-ÿ]/.test(ch)) {\n      stream.eatWhile(anumRE);\n\n      if (stream.match(/\\s*\\/\\s*[0-9]/,false)) {\n        stream.match(/\\s*\\/\\s*[0-9]/,true);\n        return rval(state,stream,\"fun\");      // f/0 style fun\n      }\n\n      var w = stream.current();\n\n      if (is_member(w,keywordWords)) {\n        return rval(state,stream,\"keyword\");\n      }else if (is_member(w,operatorAtomWords)) {\n        return rval(state,stream,\"operator\");\n      }else if (stream.match(/\\s*\\(/,false)) {\n        // 'put' and 'erlang:put' are bifs, 'foo:put' is not\n        if (is_member(w,bifWords) &&\n            ((peekToken(state).token != \":\") ||\n             (peekToken(state,2).token == \"erlang\"))) {\n          return rval(state,stream,\"builtin\");\n        }else if (is_member(w,guardWords)) {\n          return rval(state,stream,\"guard\");\n        }else{\n          return rval(state,stream,\"function\");\n        }\n      }else if (is_member(w,operatorAtomWords)) {\n        return rval(state,stream,\"operator\");\n      }else if (lookahead(stream) == \":\") {\n        if (w == \"erlang\") {\n          return rval(state,stream,\"builtin\");\n        } else {\n          return rval(state,stream,\"function\");\n        }\n      }else if (is_member(w,[\"true\",\"false\"])) {\n        return rval(state,stream,\"boolean\");\n      }else if (is_member(w,[\"true\",\"false\"])) {\n        return rval(state,stream,\"boolean\");\n      }else{\n        return rval(state,stream,\"atom\");\n      }\n    }\n\n    // number\n    var digitRE      = /[0-9]/;\n    var radixRE      = /[0-9a-zA-Z]/;         // 36#zZ style int\n    if (digitRE.test(ch)) {\n      stream.eatWhile(digitRE);\n      if (stream.eat('#')) {                // 36#aZ  style integer\n        if (!stream.eatWhile(radixRE)) {\n          stream.backUp(1);                 //\"36#\" - syntax error\n        }\n      } else if (stream.eat('.')) {       // float\n        if (!stream.eatWhile(digitRE)) {\n          stream.backUp(1);        // \"3.\" - probably end of function\n        } else {\n          if (stream.eat(/[eE]/)) {        // float with exponent\n            if (stream.eat(/[-+]/)) {\n              if (!stream.eatWhile(digitRE)) {\n                stream.backUp(2);            // \"2e-\" - syntax error\n              }\n            } else {\n              if (!stream.eatWhile(digitRE)) {\n                stream.backUp(1);            // \"2e\" - syntax error\n              }\n            }\n          }\n        }\n      }\n      return rval(state,stream,\"number\");   // normal integer\n    }\n\n    // open parens\n    if (nongreedy(stream,openParenRE,openParenWords)) {\n      return rval(state,stream,\"open_paren\");\n    }\n\n    // close parens\n    if (nongreedy(stream,closeParenRE,closeParenWords)) {\n      return rval(state,stream,\"close_paren\");\n    }\n\n    // separators\n    if (greedy(stream,separatorRE,separatorWords)) {\n      return rval(state,stream,\"separator\");\n    }\n\n    // operators\n    if (greedy(stream,operatorSymbolRE,operatorSymbolWords)) {\n      return rval(state,stream,\"operator\");\n    }\n\n    return rval(state,stream,null);\n  }\n\n/////////////////////////////////////////////////////////////////////////////\n// utilities\n  function nongreedy(stream,re,words) {\n    if (stream.current().length == 1 && re.test(stream.current())) {\n      stream.backUp(1);\n      while (re.test(stream.peek())) {\n        stream.next();\n        if (is_member(stream.current(),words)) {\n          return true;\n        }\n      }\n      stream.backUp(stream.current().length-1);\n    }\n    return false;\n  }\n\n  function greedy(stream,re,words) {\n    if (stream.current().length == 1 && re.test(stream.current())) {\n      while (re.test(stream.peek())) {\n        stream.next();\n      }\n      while (0 < stream.current().length) {\n        if (is_member(stream.current(),words)) {\n          return true;\n        }else{\n          stream.backUp(1);\n        }\n      }\n      stream.next();\n    }\n    return false;\n  }\n\n  function doubleQuote(stream) {\n    return quote(stream, '\"', '\\\\');\n  }\n\n  function singleQuote(stream) {\n    return quote(stream,'\\'','\\\\');\n  }\n\n  function quote(stream,quoteChar,escapeChar) {\n    while (!stream.eol()) {\n      var ch = stream.next();\n      if (ch == quoteChar) {\n        return true;\n      }else if (ch == escapeChar) {\n        stream.next();\n      }\n    }\n    return false;\n  }\n\n  function lookahead(stream) {\n    var m = stream.match(/([\\n\\s]+|%[^\\n]*\\n)*(.)/,false);\n    return m ? m.pop() : \"\";\n  }\n\n  function is_member(element,list) {\n    return (-1 < list.indexOf(element));\n  }\n\n  function rval(state,stream,type) {\n\n    // parse stack\n    pushToken(state,realToken(type,stream));\n\n    // map erlang token type to CodeMirror style class\n    //     erlang             -> CodeMirror tag\n    switch (type) {\n      case \"atom\":        return \"atom\";\n      case \"attribute\":   return \"attribute\";\n      case \"boolean\":     return \"atom\";\n      case \"builtin\":     return \"builtin\";\n      case \"close_paren\": return null;\n      case \"colon\":       return null;\n      case \"comment\":     return \"comment\";\n      case \"dot\":         return null;\n      case \"error\":       return \"error\";\n      case \"fun\":         return \"meta\";\n      case \"function\":    return \"tag\";\n      case \"guard\":       return \"property\";\n      case \"keyword\":     return \"keyword\";\n      case \"macro\":       return \"variable-2\";\n      case \"number\":      return \"number\";\n      case \"open_paren\":  return null;\n      case \"operator\":    return \"operator\";\n      case \"record\":      return \"bracket\";\n      case \"separator\":   return null;\n      case \"string\":      return \"string\";\n      case \"type\":        return \"def\";\n      case \"variable\":    return \"variable\";\n      default:            return null;\n    }\n  }\n\n  function aToken(tok,col,ind,typ) {\n    return {token:  tok,\n            column: col,\n            indent: ind,\n            type:   typ};\n  }\n\n  function realToken(type,stream) {\n    return aToken(stream.current(),\n                 stream.column(),\n                 stream.indentation(),\n                 type);\n  }\n\n  function fakeToken(type) {\n    return aToken(type,0,0,type);\n  }\n\n  function peekToken(state,depth) {\n    var len = state.tokenStack.length;\n    var dep = (depth ? depth : 1);\n\n    if (len < dep) {\n      return false;\n    }else{\n      return state.tokenStack[len-dep];\n    }\n  }\n\n  function pushToken(state,token) {\n\n    if (!(token.type == \"comment\" || token.type == \"whitespace\")) {\n      state.tokenStack = maybe_drop_pre(state.tokenStack,token);\n      state.tokenStack = maybe_drop_post(state.tokenStack);\n    }\n  }\n\n  function maybe_drop_pre(s,token) {\n    var last = s.length-1;\n\n    if (0 < last && s[last].type === \"record\" && token.type === \"dot\") {\n      s.pop();\n    }else if (0 < last && s[last].type === \"group\") {\n      s.pop();\n      s.push(token);\n    }else{\n      s.push(token);\n    }\n    return s;\n  }\n\n  function maybe_drop_post(s) {\n    var last = s.length-1;\n\n    if (s[last].type === \"dot\") {\n      return [];\n    }\n    if (s[last].type === \"fun\" && s[last-1].token === \"fun\") {\n      return s.slice(0,last-1);\n    }\n    switch (s[s.length-1].token) {\n      case \"}\":    return d(s,{g:[\"{\"]});\n      case \"]\":    return d(s,{i:[\"[\"]});\n      case \")\":    return d(s,{i:[\"(\"]});\n      case \">>\":   return d(s,{i:[\"<<\"]});\n      case \"end\":  return d(s,{i:[\"begin\",\"case\",\"fun\",\"if\",\"receive\",\"try\"]});\n      case \",\":    return d(s,{e:[\"begin\",\"try\",\"when\",\"->\",\n                                  \",\",\"(\",\"[\",\"{\",\"<<\"]});\n      case \"->\":   return d(s,{r:[\"when\"],\n                               m:[\"try\",\"if\",\"case\",\"receive\"]});\n      case \";\":    return d(s,{E:[\"case\",\"fun\",\"if\",\"receive\",\"try\",\"when\"]});\n      case \"catch\":return d(s,{e:[\"try\"]});\n      case \"of\":   return d(s,{e:[\"case\"]});\n      case \"after\":return d(s,{e:[\"receive\",\"try\"]});\n      default:     return s;\n    }\n  }\n\n  function d(stack,tt) {\n    // stack is a stack of Token objects.\n    // tt is an object; {type:tokens}\n    // type is a char, tokens is a list of token strings.\n    // The function returns (possibly truncated) stack.\n    // It will descend the stack, looking for a Token such that Token.token\n    //  is a member of tokens. If it does not find that, it will normally (but\n    //  see \"E\" below) return stack. If it does find a match, it will remove\n    //  all the Tokens between the top and the matched Token.\n    // If type is \"m\", that is all it does.\n    // If type is \"i\", it will also remove the matched Token and the top Token.\n    // If type is \"g\", like \"i\", but add a fake \"group\" token at the top.\n    // If type is \"r\", it will remove the matched Token, but not the top Token.\n    // If type is \"e\", it will keep the matched Token but not the top Token.\n    // If type is \"E\", it behaves as for type \"e\", except if there is no match,\n    //  in which case it will return an empty stack.\n\n    for (var type in tt) {\n      var len = stack.length-1;\n      var tokens = tt[type];\n      for (var i = len-1; -1 < i ; i--) {\n        if (is_member(stack[i].token,tokens)) {\n          var ss = stack.slice(0,i);\n          switch (type) {\n              case \"m\": return ss.concat(stack[i]).concat(stack[len]);\n              case \"r\": return ss.concat(stack[len]);\n              case \"i\": return ss;\n              case \"g\": return ss.concat(fakeToken(\"group\"));\n              case \"E\": return ss.concat(stack[i]);\n              case \"e\": return ss.concat(stack[i]);\n          }\n        }\n      }\n    }\n    return (type == \"E\" ? [] : stack);\n  }\n\n/////////////////////////////////////////////////////////////////////////////\n// indenter\n\n  function indenter(state,textAfter) {\n    var t;\n    var unit = cmCfg.indentUnit;\n    var wordAfter = wordafter(textAfter);\n    var currT = peekToken(state,1);\n    var prevT = peekToken(state,2);\n\n    if (state.in_string || state.in_atom) {\n      return CodeMirror.Pass;\n    }else if (!prevT) {\n      return 0;\n    }else if (currT.token == \"when\") {\n      return currT.column+unit;\n    }else if (wordAfter === \"when\" && prevT.type === \"function\") {\n      return prevT.indent+unit;\n    }else if (wordAfter === \"(\" && currT.token === \"fun\") {\n      return  currT.column+3;\n    }else if (wordAfter === \"catch\" && (t = getToken(state,[\"try\"]))) {\n      return t.column;\n    }else if (is_member(wordAfter,[\"end\",\"after\",\"of\"])) {\n      t = getToken(state,[\"begin\",\"case\",\"fun\",\"if\",\"receive\",\"try\"]);\n      return t ? t.column : CodeMirror.Pass;\n    }else if (is_member(wordAfter,closeParenWords)) {\n      t = getToken(state,openParenWords);\n      return t ? t.column : CodeMirror.Pass;\n    }else if (is_member(currT.token,[\",\",\"|\",\"||\"]) ||\n              is_member(wordAfter,[\",\",\"|\",\"||\"])) {\n      t = postcommaToken(state);\n      return t ? t.column+t.token.length : unit;\n    }else if (currT.token == \"->\") {\n      if (is_member(prevT.token, [\"receive\",\"case\",\"if\",\"try\"])) {\n        return prevT.column+unit+unit;\n      }else{\n        return prevT.column+unit;\n      }\n    }else if (is_member(currT.token,openParenWords)) {\n      return currT.column+currT.token.length;\n    }else{\n      t = defaultToken(state);\n      return truthy(t) ? t.column+unit : 0;\n    }\n  }\n\n  function wordafter(str) {\n    var m = str.match(/,|[a-z]+|\\}|\\]|\\)|>>|\\|+|\\(/);\n\n    return truthy(m) && (m.index === 0) ? m[0] : \"\";\n  }\n\n  function postcommaToken(state) {\n    var objs = state.tokenStack.slice(0,-1);\n    var i = getTokenIndex(objs,\"type\",[\"open_paren\"]);\n\n    return truthy(objs[i]) ? objs[i] : false;\n  }\n\n  function defaultToken(state) {\n    var objs = state.tokenStack;\n    var stop = getTokenIndex(objs,\"type\",[\"open_paren\",\"separator\",\"keyword\"]);\n    var oper = getTokenIndex(objs,\"type\",[\"operator\"]);\n\n    if (truthy(stop) && truthy(oper) && stop < oper) {\n      return objs[stop+1];\n    } else if (truthy(stop)) {\n      return objs[stop];\n    } else {\n      return false;\n    }\n  }\n\n  function getToken(state,tokens) {\n    var objs = state.tokenStack;\n    var i = getTokenIndex(objs,\"token\",tokens);\n\n    return truthy(objs[i]) ? objs[i] : false;\n  }\n\n  function getTokenIndex(objs,propname,propvals) {\n\n    for (var i = objs.length-1; -1 < i ; i--) {\n      if (is_member(objs[i][propname],propvals)) {\n        return i;\n      }\n    }\n    return false;\n  }\n\n  function truthy(x) {\n    return (x !== false) && (x != null);\n  }\n\n/////////////////////////////////////////////////////////////////////////////\n// this object defines the mode\n\n  return {\n    startState:\n      function() {\n        return {tokenStack: [],\n                in_string:  false,\n                in_atom:    false};\n      },\n\n    token:\n      function(stream, state) {\n        return tokenizer(stream, state);\n      },\n\n    indent:\n      function(state, textAfter) {\n        return indenter(state,textAfter);\n      },\n\n    lineComment: \"%\"\n  };\n});\n\n});\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/erlang/index.html",
    "content": "<!doctype html>\n\n<title>CodeMirror: Erlang mode</title>\n<meta charset=\"utf-8\"/>\n<link rel=stylesheet href=\"../../doc/docs.css\">\n\n<link rel=\"stylesheet\" href=\"../../lib/codemirror.css\">\n<link rel=\"stylesheet\" href=\"../../theme/erlang-dark.css\">\n<script src=\"../../lib/codemirror.js\"></script>\n<script src=\"../../addon/edit/matchbrackets.js\"></script>\n<script src=\"erlang.js\"></script>\n<style type=\"text/css\">.CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}</style>\n<div id=nav>\n  <a href=\"http://codemirror.net\"><h1>CodeMirror</h1><img id=logo src=\"../../doc/logo.png\"></a>\n\n  <ul>\n    <li><a href=\"../../index.html\">Home</a>\n    <li><a href=\"../../doc/manual.html\">Manual</a>\n    <li><a href=\"https://github.com/codemirror/codemirror\">Code</a>\n  </ul>\n  <ul>\n    <li><a href=\"../index.html\">Language modes</a>\n    <li><a class=active href=\"#\">Erlang</a>\n  </ul>\n</div>\n\n<article>\n<h2>Erlang mode</h2>\n<form><textarea id=\"code\" name=\"code\">\n%% -*- mode: erlang; erlang-indent-level: 2 -*-\n%%% Created :  7 May 2012 by mats cronqvist <masse@klarna.com>\n\n%% @doc\n%% Demonstrates how to print a record.\n%% @end\n\n-module('ex').\n-author('mats cronqvist').\n-export([demo/0,\n         rec_info/1]).\n\n-record(demo,{a=\"One\",b=\"Two\",c=\"Three\",d=\"Four\"}).\n\nrec_info(demo) -> record_info(fields,demo).\n\ndemo() -> expand_recs(?MODULE,#demo{a=\"A\",b=\"BB\"}).\n\nexpand_recs(M,List) when is_list(List) ->\n  [expand_recs(M,L)||L<-List];\nexpand_recs(M,Tup) when is_tuple(Tup) ->\n  case tuple_size(Tup) of\n    L when L < 1 -> Tup;\n    L ->\n      try\n        Fields = M:rec_info(element(1,Tup)),\n        L = length(Fields)+1,\n        lists:zip(Fields,expand_recs(M,tl(tuple_to_list(Tup))))\n      catch\n        _:_ -> list_to_tuple(expand_recs(M,tuple_to_list(Tup)))\n      end\n  end;\nexpand_recs(_,Term) ->\n  Term.\n</textarea></form>\n\n    <script>\n      var editor = CodeMirror.fromTextArea(document.getElementById(\"code\"), {\n        lineNumbers: true,\n        matchBrackets: true,\n        extraKeys: {\"Tab\":  \"indentAuto\"},\n        theme: \"erlang-dark\"\n      });\n    </script>\n\n    <p><strong>MIME types defined:</strong> <code>text/x-erlang</code>.</p>\n  </article>\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/forth/forth.js",
    "content": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n// Author: Aliaksei Chapyzhenka\n\n(function(mod) {\n  if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n    mod(require(\"../../lib/codemirror\"));\n  else if (typeof define == \"function\" && define.amd) // AMD\n    define([\"../../lib/codemirror\"], mod);\n  else // Plain browser env\n    mod(CodeMirror);\n})(function(CodeMirror) {\n  \"use strict\";\n\n  function toWordList(words) {\n    var ret = [];\n    words.split(' ').forEach(function(e){\n      ret.push({name: e});\n    });\n    return ret;\n  }\n\n  var coreWordList = toWordList(\n'INVERT AND OR XOR\\\n 2* 2/ LSHIFT RSHIFT\\\n 0= = 0< < > U< MIN MAX\\\n 2DROP 2DUP 2OVER 2SWAP ?DUP DEPTH DROP DUP OVER ROT SWAP\\\n >R R> R@\\\n + - 1+ 1- ABS NEGATE\\\n S>D * M* UM*\\\n FM/MOD SM/REM UM/MOD */ */MOD / /MOD MOD\\\n HERE , @ ! CELL+ CELLS C, C@ C! CHARS 2@ 2!\\\n ALIGN ALIGNED +! ALLOT\\\n CHAR [CHAR] [ ] BL\\\n FIND EXECUTE IMMEDIATE COUNT LITERAL STATE\\\n ; DOES> >BODY\\\n EVALUATE\\\n SOURCE >IN\\\n <# # #S #> HOLD SIGN BASE >NUMBER HEX DECIMAL\\\n FILL MOVE\\\n . CR EMIT SPACE SPACES TYPE U. .R U.R\\\n ACCEPT\\\n TRUE FALSE\\\n <> U> 0<> 0>\\\n NIP TUCK ROLL PICK\\\n 2>R 2R@ 2R>\\\n WITHIN UNUSED MARKER\\\n I J\\\n TO\\\n COMPILE, [COMPILE]\\\n SAVE-INPUT RESTORE-INPUT\\\n PAD ERASE\\\n 2LITERAL DNEGATE\\\n D- D+ D0< D0= D2* D2/ D< D= DMAX DMIN D>S DABS\\\n M+ M*/ D. D.R 2ROT DU<\\\n CATCH THROW\\\n FREE RESIZE ALLOCATE\\\n CS-PICK CS-ROLL\\\n GET-CURRENT SET-CURRENT FORTH-WORDLIST GET-ORDER SET-ORDER\\\n PREVIOUS SEARCH-WORDLIST WORDLIST FIND ALSO ONLY FORTH DEFINITIONS ORDER\\\n -TRAILING /STRING SEARCH COMPARE CMOVE CMOVE> BLANK SLITERAL');\n\n  var immediateWordList = toWordList('IF ELSE THEN BEGIN WHILE REPEAT UNTIL RECURSE [IF] [ELSE] [THEN] ?DO DO LOOP +LOOP UNLOOP LEAVE EXIT AGAIN CASE OF ENDOF ENDCASE');\n\n  CodeMirror.defineMode('forth', function() {\n    function searchWordList (wordList, word) {\n      var i;\n      for (i = wordList.length - 1; i >= 0; i--) {\n        if (wordList[i].name === word.toUpperCase()) {\n          return wordList[i];\n        }\n      }\n      return undefined;\n    }\n  return {\n    startState: function() {\n      return {\n        state: '',\n        base: 10,\n        coreWordList: coreWordList,\n        immediateWordList: immediateWordList,\n        wordList: []\n      };\n    },\n    token: function (stream, stt) {\n      var mat;\n      if (stream.eatSpace()) {\n        return null;\n      }\n      if (stt.state === '') { // interpretation\n        if (stream.match(/^(\\]|:NONAME)(\\s|$)/i)) {\n          stt.state = ' compilation';\n          return 'builtin compilation';\n        }\n        mat = stream.match(/^(\\:)\\s+(\\S+)(\\s|$)+/);\n        if (mat) {\n          stt.wordList.push({name: mat[2].toUpperCase()});\n          stt.state = ' compilation';\n          return 'def' + stt.state;\n        }\n        mat = stream.match(/^(VARIABLE|2VARIABLE|CONSTANT|2CONSTANT|CREATE|POSTPONE|VALUE|WORD)\\s+(\\S+)(\\s|$)+/i);\n        if (mat) {\n          stt.wordList.push({name: mat[2].toUpperCase()});\n          return 'def' + stt.state;\n        }\n        mat = stream.match(/^(\\'|\\[\\'\\])\\s+(\\S+)(\\s|$)+/);\n        if (mat) {\n          return 'builtin' + stt.state;\n        }\n        } else { // compilation\n        // ; [\n        if (stream.match(/^(\\;|\\[)(\\s)/)) {\n          stt.state = '';\n          stream.backUp(1);\n          return 'builtin compilation';\n        }\n        if (stream.match(/^(\\;|\\[)($)/)) {\n          stt.state = '';\n          return 'builtin compilation';\n        }\n        if (stream.match(/^(POSTPONE)\\s+\\S+(\\s|$)+/)) {\n          return 'builtin';\n        }\n      }\n\n      // dynamic wordlist\n      mat = stream.match(/^(\\S+)(\\s+|$)/);\n      if (mat) {\n        if (searchWordList(stt.wordList, mat[1]) !== undefined) {\n          return 'variable' + stt.state;\n        }\n\n        // comments\n        if (mat[1] === '\\\\') {\n          stream.skipToEnd();\n            return 'comment' + stt.state;\n          }\n\n          // core words\n          if (searchWordList(stt.coreWordList, mat[1]) !== undefined) {\n            return 'builtin' + stt.state;\n          }\n          if (searchWordList(stt.immediateWordList, mat[1]) !== undefined) {\n            return 'keyword' + stt.state;\n          }\n\n          if (mat[1] === '(') {\n            stream.eatWhile(function (s) { return s !== ')'; });\n            stream.eat(')');\n            return 'comment' + stt.state;\n          }\n\n          // // strings\n          if (mat[1] === '.(') {\n            stream.eatWhile(function (s) { return s !== ')'; });\n            stream.eat(')');\n            return 'string' + stt.state;\n          }\n          if (mat[1] === 'S\"' || mat[1] === '.\"' || mat[1] === 'C\"') {\n            stream.eatWhile(function (s) { return s !== '\"'; });\n            stream.eat('\"');\n            return 'string' + stt.state;\n          }\n\n          // numbers\n          if (mat[1] - 0xfffffffff) {\n            return 'number' + stt.state;\n          }\n          // if (mat[1].match(/^[-+]?[0-9]+\\.[0-9]*/)) {\n          //     return 'number' + stt.state;\n          // }\n\n          return 'atom' + stt.state;\n        }\n      }\n    };\n  });\n  CodeMirror.defineMIME(\"text/x-forth\", \"forth\");\n});\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/forth/index.html",
    "content": "<!doctype html>\n\n<title>CodeMirror: Forth mode</title>\n<meta charset=\"utf-8\"/>\n<link rel=stylesheet href=\"../../doc/docs.css\">\n\n<link href='http://fonts.googleapis.com/css?family=Droid+Sans+Mono' rel='stylesheet' type='text/css'>\n<link rel=\"stylesheet\" href=\"../../lib/codemirror.css\">\n<link rel=stylesheet href=\"../../theme/colorforth.css\">\n<script src=\"../../lib/codemirror.js\"></script>\n<script src=\"forth.js\"></script>\n<style>\n.CodeMirror {\n    font-family: 'Droid Sans Mono', monospace;\n    font-size: 14px;\n}\n</style>\n<div id=nav>\n  <a href=\"http://codemirror.net\"><h1>CodeMirror</h1><img id=logo src=\"../../doc/logo.png\"></a>\n\n  <ul>\n    <li><a href=\"../../index.html\">Home</a>\n    <li><a href=\"../../doc/manual.html\">Manual</a>\n    <li><a href=\"https://github.com/codemirror/codemirror\">Code</a>\n  </ul>\n  <ul>\n    <li><a href=\"../index.html\">Language modes</a>\n    <li><a class=active href=\"#\">Forth</a>\n  </ul>\n</div>\n\n<article>\n\n<h2>Forth mode</h2>\n\n<form><textarea id=\"code\" name=\"code\">\n\\ Insertion sort\n\n: cell-  1 cells - ;\n\n: insert ( start end -- start )\n  dup @ >r ( r: v )\n  begin\n    2dup <\n  while\n    r@ over cell- @ <\n  while\n    cell-\n    dup @ over cell+ !\n  repeat then\n  r> swap ! ;\n\n: sort ( array len -- )\n  1 ?do\n    dup i cells + insert\n  loop drop ;</textarea>\n  </form>\n\n<script>\n  var editor = CodeMirror.fromTextArea(document.getElementById(\"code\"), {\n    lineNumbers: true,\n    lineWrapping: true,\n    indentUnit: 2,\n    tabSize: 2,\n    autofocus: true,\n    theme: \"colorforth\",\n    mode: \"text/x-forth\"\n  });\n</script>\n\n<p>Simple mode that handle Forth-Syntax (<a href=\"http://en.wikipedia.org/wiki/Forth_%28programming_language%29\">Forth on WikiPedia</a>).</p>\n\n<p><strong>MIME types defined:</strong> <code>text/x-forth</code>.</p>\n\n</article>\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/fortran/fortran.js",
    "content": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n(function(mod) {\n  if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n    mod(require(\"../../lib/codemirror\"));\n  else if (typeof define == \"function\" && define.amd) // AMD\n    define([\"../../lib/codemirror\"], mod);\n  else // Plain browser env\n    mod(CodeMirror);\n})(function(CodeMirror) {\n\"use strict\";\n\nCodeMirror.defineMode(\"fortran\", function() {\n  function words(array) {\n    var keys = {};\n    for (var i = 0; i < array.length; ++i) {\n      keys[array[i]] = true;\n    }\n    return keys;\n  }\n\n  var keywords = words([\n                  \"abstract\", \"accept\", \"allocatable\", \"allocate\",\n                  \"array\", \"assign\", \"asynchronous\", \"backspace\",\n                  \"bind\", \"block\", \"byte\", \"call\", \"case\",\n                  \"class\", \"close\", \"common\", \"contains\",\n                  \"continue\", \"cycle\", \"data\", \"deallocate\",\n                  \"decode\", \"deferred\", \"dimension\", \"do\",\n                  \"elemental\", \"else\", \"encode\", \"end\",\n                  \"endif\", \"entry\", \"enumerator\", \"equivalence\",\n                  \"exit\", \"external\", \"extrinsic\", \"final\",\n                  \"forall\", \"format\", \"function\", \"generic\",\n                  \"go\", \"goto\", \"if\", \"implicit\", \"import\", \"include\",\n                  \"inquire\", \"intent\", \"interface\", \"intrinsic\",\n                  \"module\", \"namelist\", \"non_intrinsic\",\n                  \"non_overridable\", \"none\", \"nopass\",\n                  \"nullify\", \"open\", \"optional\", \"options\",\n                  \"parameter\", \"pass\", \"pause\", \"pointer\",\n                  \"print\", \"private\", \"program\", \"protected\",\n                  \"public\", \"pure\", \"read\", \"recursive\", \"result\",\n                  \"return\", \"rewind\", \"save\", \"select\", \"sequence\",\n                  \"stop\", \"subroutine\", \"target\", \"then\", \"to\", \"type\",\n                  \"use\", \"value\", \"volatile\", \"where\", \"while\",\n                  \"write\"]);\n  var builtins = words([\"abort\", \"abs\", \"access\", \"achar\", \"acos\",\n                          \"adjustl\", \"adjustr\", \"aimag\", \"aint\", \"alarm\",\n                          \"all\", \"allocated\", \"alog\", \"amax\", \"amin\",\n                          \"amod\", \"and\", \"anint\", \"any\", \"asin\",\n                          \"associated\", \"atan\", \"besj\", \"besjn\", \"besy\",\n                          \"besyn\", \"bit_size\", \"btest\", \"cabs\", \"ccos\",\n                          \"ceiling\", \"cexp\", \"char\", \"chdir\", \"chmod\",\n                          \"clog\", \"cmplx\", \"command_argument_count\",\n                          \"complex\", \"conjg\", \"cos\", \"cosh\", \"count\",\n                          \"cpu_time\", \"cshift\", \"csin\", \"csqrt\", \"ctime\",\n                          \"c_funloc\", \"c_loc\", \"c_associated\", \"c_null_ptr\",\n                          \"c_null_funptr\", \"c_f_pointer\", \"c_null_char\",\n                          \"c_alert\", \"c_backspace\", \"c_form_feed\",\n                          \"c_new_line\", \"c_carriage_return\",\n                          \"c_horizontal_tab\", \"c_vertical_tab\", \"dabs\",\n                          \"dacos\", \"dasin\", \"datan\", \"date_and_time\",\n                          \"dbesj\", \"dbesj\", \"dbesjn\", \"dbesy\", \"dbesy\",\n                          \"dbesyn\", \"dble\", \"dcos\", \"dcosh\", \"ddim\", \"derf\",\n                          \"derfc\", \"dexp\", \"digits\", \"dim\", \"dint\", \"dlog\",\n                          \"dlog\", \"dmax\", \"dmin\", \"dmod\", \"dnint\",\n                          \"dot_product\", \"dprod\", \"dsign\", \"dsinh\",\n                          \"dsin\", \"dsqrt\", \"dtanh\", \"dtan\", \"dtime\",\n                          \"eoshift\", \"epsilon\", \"erf\", \"erfc\", \"etime\",\n                          \"exit\", \"exp\", \"exponent\", \"extends_type_of\",\n                          \"fdate\", \"fget\", \"fgetc\", \"float\", \"floor\",\n                          \"flush\", \"fnum\", \"fputc\", \"fput\", \"fraction\",\n                          \"fseek\", \"fstat\", \"ftell\", \"gerror\", \"getarg\",\n                          \"get_command\", \"get_command_argument\",\n                          \"get_environment_variable\", \"getcwd\",\n                          \"getenv\", \"getgid\", \"getlog\", \"getpid\",\n                          \"getuid\", \"gmtime\", \"hostnm\", \"huge\", \"iabs\",\n                          \"iachar\", \"iand\", \"iargc\", \"ibclr\", \"ibits\",\n                          \"ibset\", \"ichar\", \"idate\", \"idim\", \"idint\",\n                          \"idnint\", \"ieor\", \"ierrno\", \"ifix\", \"imag\",\n                          \"imagpart\", \"index\", \"int\", \"ior\", \"irand\",\n                          \"isatty\", \"ishft\", \"ishftc\", \"isign\",\n                          \"iso_c_binding\", \"is_iostat_end\", \"is_iostat_eor\",\n                          \"itime\", \"kill\", \"kind\", \"lbound\", \"len\", \"len_trim\",\n                          \"lge\", \"lgt\", \"link\", \"lle\", \"llt\", \"lnblnk\", \"loc\",\n                          \"log\", \"logical\", \"long\", \"lshift\", \"lstat\", \"ltime\",\n                          \"matmul\", \"max\", \"maxexponent\", \"maxloc\", \"maxval\",\n                          \"mclock\", \"merge\", \"move_alloc\", \"min\", \"minexponent\",\n                          \"minloc\", \"minval\", \"mod\", \"modulo\", \"mvbits\",\n                          \"nearest\", \"new_line\", \"nint\", \"not\", \"or\", \"pack\",\n                          \"perror\", \"precision\", \"present\", \"product\", \"radix\",\n                          \"rand\", \"random_number\", \"random_seed\", \"range\",\n                          \"real\", \"realpart\", \"rename\", \"repeat\", \"reshape\",\n                          \"rrspacing\", \"rshift\", \"same_type_as\", \"scale\",\n                          \"scan\", \"second\", \"selected_int_kind\",\n                          \"selected_real_kind\", \"set_exponent\", \"shape\",\n                          \"short\", \"sign\", \"signal\", \"sinh\", \"sin\", \"sleep\",\n                          \"sngl\", \"spacing\", \"spread\", \"sqrt\", \"srand\", \"stat\",\n                          \"sum\", \"symlnk\", \"system\", \"system_clock\", \"tan\",\n                          \"tanh\", \"time\", \"tiny\", \"transfer\", \"transpose\",\n                          \"trim\", \"ttynam\", \"ubound\", \"umask\", \"unlink\",\n                          \"unpack\", \"verify\", \"xor\", \"zabs\", \"zcos\", \"zexp\",\n                          \"zlog\", \"zsin\", \"zsqrt\"]);\n\n    var dataTypes =  words([\"c_bool\", \"c_char\", \"c_double\", \"c_double_complex\",\n                     \"c_float\", \"c_float_complex\", \"c_funptr\", \"c_int\",\n                     \"c_int16_t\", \"c_int32_t\", \"c_int64_t\", \"c_int8_t\",\n                     \"c_int_fast16_t\", \"c_int_fast32_t\", \"c_int_fast64_t\",\n                     \"c_int_fast8_t\", \"c_int_least16_t\", \"c_int_least32_t\",\n                     \"c_int_least64_t\", \"c_int_least8_t\", \"c_intmax_t\",\n                     \"c_intptr_t\", \"c_long\", \"c_long_double\",\n                     \"c_long_double_complex\", \"c_long_long\", \"c_ptr\",\n                     \"c_short\", \"c_signed_char\", \"c_size_t\", \"character\",\n                     \"complex\", \"double\", \"integer\", \"logical\", \"real\"]);\n  var isOperatorChar = /[+\\-*&=<>\\/\\:]/;\n  var litOperator = new RegExp(\"(\\.and\\.|\\.or\\.|\\.eq\\.|\\.lt\\.|\\.le\\.|\\.gt\\.|\\.ge\\.|\\.ne\\.|\\.not\\.|\\.eqv\\.|\\.neqv\\.)\", \"i\");\n\n  function tokenBase(stream, state) {\n\n    if (stream.match(litOperator)){\n        return 'operator';\n    }\n\n    var ch = stream.next();\n    if (ch == \"!\") {\n      stream.skipToEnd();\n      return \"comment\";\n    }\n    if (ch == '\"' || ch == \"'\") {\n      state.tokenize = tokenString(ch);\n      return state.tokenize(stream, state);\n    }\n    if (/[\\[\\]\\(\\),]/.test(ch)) {\n      return null;\n    }\n    if (/\\d/.test(ch)) {\n      stream.eatWhile(/[\\w\\.]/);\n      return \"number\";\n    }\n    if (isOperatorChar.test(ch)) {\n      stream.eatWhile(isOperatorChar);\n      return \"operator\";\n    }\n    stream.eatWhile(/[\\w\\$_]/);\n    var word = stream.current().toLowerCase();\n\n    if (keywords.hasOwnProperty(word)){\n            return 'keyword';\n    }\n    if (builtins.hasOwnProperty(word) || dataTypes.hasOwnProperty(word)) {\n            return 'builtin';\n    }\n    return \"variable\";\n  }\n\n  function tokenString(quote) {\n    return function(stream, state) {\n      var escaped = false, next, end = false;\n      while ((next = stream.next()) != null) {\n        if (next == quote && !escaped) {\n            end = true;\n            break;\n        }\n        escaped = !escaped && next == \"\\\\\";\n      }\n      if (end || !escaped) state.tokenize = null;\n      return \"string\";\n    };\n  }\n\n  // Interface\n\n  return {\n    startState: function() {\n      return {tokenize: null};\n    },\n\n    token: function(stream, state) {\n      if (stream.eatSpace()) return null;\n      var style = (state.tokenize || tokenBase)(stream, state);\n      if (style == \"comment\" || style == \"meta\") return style;\n      return style;\n    }\n  };\n});\n\nCodeMirror.defineMIME(\"text/x-fortran\", \"fortran\");\n\n});\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/fortran/index.html",
    "content": "<!doctype html>\n\n<title>CodeMirror: Fortran mode</title>\n<meta charset=\"utf-8\"/>\n<link rel=stylesheet href=\"../../doc/docs.css\">\n\n<link rel=\"stylesheet\" href=\"../../lib/codemirror.css\">\n<script src=\"../../lib/codemirror.js\"></script>\n<script src=\"fortran.js\"></script>\n<style type=\"text/css\">.CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}</style>\n<div id=nav>\n  <a href=\"http://codemirror.net\"><h1>CodeMirror</h1><img id=logo src=\"../../doc/logo.png\"></a>\n\n  <ul>\n    <li><a href=\"../../index.html\">Home</a>\n    <li><a href=\"../../doc/manual.html\">Manual</a>\n    <li><a href=\"https://github.com/codemirror/codemirror\">Code</a>\n  </ul>\n  <ul>\n    <li><a href=\"../index.html\">Language modes</a>\n    <li><a class=active href=\"#\">Fortran</a>\n  </ul>\n</div>\n\n<article>\n<h2>Fortran mode</h2>\n\n\n<div><textarea id=\"code\" name=\"code\">\n! Example Fortran code\n  program average\n\n  ! Read in some numbers and take the average\n  ! As written, if there are no data points, an average of zero is returned\n  ! While this may not be desired behavior, it keeps this example simple\n\n  implicit none\n\n  real, dimension(:), allocatable :: points\n  integer                         :: number_of_points\n  real                            :: average_points=0., positive_average=0., negative_average=0.\n\n  write (*,*) \"Input number of points to average:\"\n  read  (*,*) number_of_points\n\n  allocate (points(number_of_points))\n\n  write (*,*) \"Enter the points to average:\"\n  read  (*,*) points\n\n  ! Take the average by summing points and dividing by number_of_points\n  if (number_of_points > 0) average_points = sum(points) / number_of_points\n\n  ! Now form average over positive and negative points only\n  if (count(points > 0.) > 0) then\n     positive_average = sum(points, points > 0.) / count(points > 0.)\n  end if\n\n  if (count(points < 0.) > 0) then\n     negative_average = sum(points, points < 0.) / count(points < 0.)\n  end if\n\n  deallocate (points)\n\n  ! Print result to terminal\n  write (*,'(a,g12.4)') 'Average = ', average_points\n  write (*,'(a,g12.4)') 'Average of positive points = ', positive_average\n  write (*,'(a,g12.4)') 'Average of negative points = ', negative_average\n\n  end program average\n</textarea></div>\n\n    <script>\n      var editor = CodeMirror.fromTextArea(document.getElementById(\"code\"), {\n        lineNumbers: true,\n        mode: \"text/x-fortran\"\n      });\n    </script>\n\n    <p><strong>MIME types defined:</strong> <code>text/x-Fortran</code>.</p>\n  </article>\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/gas/gas.js",
    "content": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n(function(mod) {\n  if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n    mod(require(\"../../lib/codemirror\"));\n  else if (typeof define == \"function\" && define.amd) // AMD\n    define([\"../../lib/codemirror\"], mod);\n  else // Plain browser env\n    mod(CodeMirror);\n})(function(CodeMirror) {\n\"use strict\";\n\nCodeMirror.defineMode(\"gas\", function(_config, parserConfig) {\n  'use strict';\n\n  // If an architecture is specified, its initialization function may\n  // populate this array with custom parsing functions which will be\n  // tried in the event that the standard functions do not find a match.\n  var custom = [];\n\n  // The symbol used to start a line comment changes based on the target\n  // architecture.\n  // If no architecture is pased in \"parserConfig\" then only multiline\n  // comments will have syntax support.\n  var lineCommentStartSymbol = \"\";\n\n  // These directives are architecture independent.\n  // Machine specific directives should go in their respective\n  // architecture initialization function.\n  // Reference:\n  // http://sourceware.org/binutils/docs/as/Pseudo-Ops.html#Pseudo-Ops\n  var directives = {\n    \".abort\" : \"builtin\",\n    \".align\" : \"builtin\",\n    \".altmacro\" : \"builtin\",\n    \".ascii\" : \"builtin\",\n    \".asciz\" : \"builtin\",\n    \".balign\" : \"builtin\",\n    \".balignw\" : \"builtin\",\n    \".balignl\" : \"builtin\",\n    \".bundle_align_mode\" : \"builtin\",\n    \".bundle_lock\" : \"builtin\",\n    \".bundle_unlock\" : \"builtin\",\n    \".byte\" : \"builtin\",\n    \".cfi_startproc\" : \"builtin\",\n    \".comm\" : \"builtin\",\n    \".data\" : \"builtin\",\n    \".def\" : \"builtin\",\n    \".desc\" : \"builtin\",\n    \".dim\" : \"builtin\",\n    \".double\" : \"builtin\",\n    \".eject\" : \"builtin\",\n    \".else\" : \"builtin\",\n    \".elseif\" : \"builtin\",\n    \".end\" : \"builtin\",\n    \".endef\" : \"builtin\",\n    \".endfunc\" : \"builtin\",\n    \".endif\" : \"builtin\",\n    \".equ\" : \"builtin\",\n    \".equiv\" : \"builtin\",\n    \".eqv\" : \"builtin\",\n    \".err\" : \"builtin\",\n    \".error\" : \"builtin\",\n    \".exitm\" : \"builtin\",\n    \".extern\" : \"builtin\",\n    \".fail\" : \"builtin\",\n    \".file\" : \"builtin\",\n    \".fill\" : \"builtin\",\n    \".float\" : \"builtin\",\n    \".func\" : \"builtin\",\n    \".global\" : \"builtin\",\n    \".gnu_attribute\" : \"builtin\",\n    \".hidden\" : \"builtin\",\n    \".hword\" : \"builtin\",\n    \".ident\" : \"builtin\",\n    \".if\" : \"builtin\",\n    \".incbin\" : \"builtin\",\n    \".include\" : \"builtin\",\n    \".int\" : \"builtin\",\n    \".internal\" : \"builtin\",\n    \".irp\" : \"builtin\",\n    \".irpc\" : \"builtin\",\n    \".lcomm\" : \"builtin\",\n    \".lflags\" : \"builtin\",\n    \".line\" : \"builtin\",\n    \".linkonce\" : \"builtin\",\n    \".list\" : \"builtin\",\n    \".ln\" : \"builtin\",\n    \".loc\" : \"builtin\",\n    \".loc_mark_labels\" : \"builtin\",\n    \".local\" : \"builtin\",\n    \".long\" : \"builtin\",\n    \".macro\" : \"builtin\",\n    \".mri\" : \"builtin\",\n    \".noaltmacro\" : \"builtin\",\n    \".nolist\" : \"builtin\",\n    \".octa\" : \"builtin\",\n    \".offset\" : \"builtin\",\n    \".org\" : \"builtin\",\n    \".p2align\" : \"builtin\",\n    \".popsection\" : \"builtin\",\n    \".previous\" : \"builtin\",\n    \".print\" : \"builtin\",\n    \".protected\" : \"builtin\",\n    \".psize\" : \"builtin\",\n    \".purgem\" : \"builtin\",\n    \".pushsection\" : \"builtin\",\n    \".quad\" : \"builtin\",\n    \".reloc\" : \"builtin\",\n    \".rept\" : \"builtin\",\n    \".sbttl\" : \"builtin\",\n    \".scl\" : \"builtin\",\n    \".section\" : \"builtin\",\n    \".set\" : \"builtin\",\n    \".short\" : \"builtin\",\n    \".single\" : \"builtin\",\n    \".size\" : \"builtin\",\n    \".skip\" : \"builtin\",\n    \".sleb128\" : \"builtin\",\n    \".space\" : \"builtin\",\n    \".stab\" : \"builtin\",\n    \".string\" : \"builtin\",\n    \".struct\" : \"builtin\",\n    \".subsection\" : \"builtin\",\n    \".symver\" : \"builtin\",\n    \".tag\" : \"builtin\",\n    \".text\" : \"builtin\",\n    \".title\" : \"builtin\",\n    \".type\" : \"builtin\",\n    \".uleb128\" : \"builtin\",\n    \".val\" : \"builtin\",\n    \".version\" : \"builtin\",\n    \".vtable_entry\" : \"builtin\",\n    \".vtable_inherit\" : \"builtin\",\n    \".warning\" : \"builtin\",\n    \".weak\" : \"builtin\",\n    \".weakref\" : \"builtin\",\n    \".word\" : \"builtin\"\n  };\n\n  var registers = {};\n\n  function x86(_parserConfig) {\n    lineCommentStartSymbol = \"#\";\n\n    registers.ax  = \"variable\";\n    registers.eax = \"variable-2\";\n    registers.rax = \"variable-3\";\n\n    registers.bx  = \"variable\";\n    registers.ebx = \"variable-2\";\n    registers.rbx = \"variable-3\";\n\n    registers.cx  = \"variable\";\n    registers.ecx = \"variable-2\";\n    registers.rcx = \"variable-3\";\n\n    registers.dx  = \"variable\";\n    registers.edx = \"variable-2\";\n    registers.rdx = \"variable-3\";\n\n    registers.si  = \"variable\";\n    registers.esi = \"variable-2\";\n    registers.rsi = \"variable-3\";\n\n    registers.di  = \"variable\";\n    registers.edi = \"variable-2\";\n    registers.rdi = \"variable-3\";\n\n    registers.sp  = \"variable\";\n    registers.esp = \"variable-2\";\n    registers.rsp = \"variable-3\";\n\n    registers.bp  = \"variable\";\n    registers.ebp = \"variable-2\";\n    registers.rbp = \"variable-3\";\n\n    registers.ip  = \"variable\";\n    registers.eip = \"variable-2\";\n    registers.rip = \"variable-3\";\n\n    registers.cs  = \"keyword\";\n    registers.ds  = \"keyword\";\n    registers.ss  = \"keyword\";\n    registers.es  = \"keyword\";\n    registers.fs  = \"keyword\";\n    registers.gs  = \"keyword\";\n  }\n\n  function armv6(_parserConfig) {\n    // Reference:\n    // http://infocenter.arm.com/help/topic/com.arm.doc.qrc0001l/QRC0001_UAL.pdf\n    // http://infocenter.arm.com/help/topic/com.arm.doc.ddi0301h/DDI0301H_arm1176jzfs_r0p7_trm.pdf\n    lineCommentStartSymbol = \"@\";\n    directives.syntax = \"builtin\";\n\n    registers.r0  = \"variable\";\n    registers.r1  = \"variable\";\n    registers.r2  = \"variable\";\n    registers.r3  = \"variable\";\n    registers.r4  = \"variable\";\n    registers.r5  = \"variable\";\n    registers.r6  = \"variable\";\n    registers.r7  = \"variable\";\n    registers.r8  = \"variable\";\n    registers.r9  = \"variable\";\n    registers.r10 = \"variable\";\n    registers.r11 = \"variable\";\n    registers.r12 = \"variable\";\n\n    registers.sp  = \"variable-2\";\n    registers.lr  = \"variable-2\";\n    registers.pc  = \"variable-2\";\n    registers.r13 = registers.sp;\n    registers.r14 = registers.lr;\n    registers.r15 = registers.pc;\n\n    custom.push(function(ch, stream) {\n      if (ch === '#') {\n        stream.eatWhile(/\\w/);\n        return \"number\";\n      }\n    });\n  }\n\n  var arch = (parserConfig.architecture || \"x86\").toLowerCase();\n  if (arch === \"x86\") {\n    x86(parserConfig);\n  } else if (arch === \"arm\" || arch === \"armv6\") {\n    armv6(parserConfig);\n  }\n\n  function nextUntilUnescaped(stream, end) {\n    var escaped = false, next;\n    while ((next = stream.next()) != null) {\n      if (next === end && !escaped) {\n        return false;\n      }\n      escaped = !escaped && next === \"\\\\\";\n    }\n    return escaped;\n  }\n\n  function clikeComment(stream, state) {\n    var maybeEnd = false, ch;\n    while ((ch = stream.next()) != null) {\n      if (ch === \"/\" && maybeEnd) {\n        state.tokenize = null;\n        break;\n      }\n      maybeEnd = (ch === \"*\");\n    }\n    return \"comment\";\n  }\n\n  return {\n    startState: function() {\n      return {\n        tokenize: null\n      };\n    },\n\n    token: function(stream, state) {\n      if (state.tokenize) {\n        return state.tokenize(stream, state);\n      }\n\n      if (stream.eatSpace()) {\n        return null;\n      }\n\n      var style, cur, ch = stream.next();\n\n      if (ch === \"/\") {\n        if (stream.eat(\"*\")) {\n          state.tokenize = clikeComment;\n          return clikeComment(stream, state);\n        }\n      }\n\n      if (ch === lineCommentStartSymbol) {\n        stream.skipToEnd();\n        return \"comment\";\n      }\n\n      if (ch === '\"') {\n        nextUntilUnescaped(stream, '\"');\n        return \"string\";\n      }\n\n      if (ch === '.') {\n        stream.eatWhile(/\\w/);\n        cur = stream.current().toLowerCase();\n        style = directives[cur];\n        return style || null;\n      }\n\n      if (ch === '=') {\n        stream.eatWhile(/\\w/);\n        return \"tag\";\n      }\n\n      if (ch === '{') {\n        return \"braket\";\n      }\n\n      if (ch === '}') {\n        return \"braket\";\n      }\n\n      if (/\\d/.test(ch)) {\n        if (ch === \"0\" && stream.eat(\"x\")) {\n          stream.eatWhile(/[0-9a-fA-F]/);\n          return \"number\";\n        }\n        stream.eatWhile(/\\d/);\n        return \"number\";\n      }\n\n      if (/\\w/.test(ch)) {\n        stream.eatWhile(/\\w/);\n        if (stream.eat(\":\")) {\n          return 'tag';\n        }\n        cur = stream.current().toLowerCase();\n        style = registers[cur];\n        return style || null;\n      }\n\n      for (var i = 0; i < custom.length; i++) {\n        style = custom[i](ch, stream, state);\n        if (style) {\n          return style;\n        }\n      }\n    },\n\n    lineComment: lineCommentStartSymbol,\n    blockCommentStart: \"/*\",\n    blockCommentEnd: \"*/\"\n  };\n});\n\n});\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/gas/index.html",
    "content": "<!doctype html>\n\n<title>CodeMirror: Gas mode</title>\n<meta charset=\"utf-8\"/>\n<link rel=stylesheet href=\"../../doc/docs.css\">\n\n<link rel=\"stylesheet\" href=\"../../lib/codemirror.css\">\n<script src=\"../../lib/codemirror.js\"></script>\n<script src=\"gas.js\"></script>\n<style>.CodeMirror {border: 2px inset #dee;}</style>\n<div id=nav>\n  <a href=\"http://codemirror.net\"><h1>CodeMirror</h1><img id=logo src=\"../../doc/logo.png\"></a>\n\n  <ul>\n    <li><a href=\"../../index.html\">Home</a>\n    <li><a href=\"../../doc/manual.html\">Manual</a>\n    <li><a href=\"https://github.com/codemirror/codemirror\">Code</a>\n  </ul>\n  <ul>\n    <li><a href=\"../index.html\">Language modes</a>\n    <li><a class=active href=\"#\">Gas</a>\n  </ul>\n</div>\n\n<article>\n<h2>Gas mode</h2>\n<form>\n<textarea id=\"code\" name=\"code\">\n.syntax unified\n.global main\n\n/* \n *  A\n *  multi-line\n *  comment.\n */\n\n@ A single line comment.\n\nmain:\n        push    {sp, lr}\n        ldr     r0, =message\n        bl      puts\n        mov     r0, #0\n        pop     {sp, pc}\n\nmessage:\n        .asciz \"Hello world!<br />\"\n</textarea>\n        </form>\n\n        <script>\n            var editor = CodeMirror.fromTextArea(document.getElementById(\"code\"), {\n                lineNumbers: true,\n                mode: {name: \"gas\", architecture: \"ARMv6\"},\n            });\n        </script>\n\n        <p>Handles AT&amp;T assembler syntax (more specifically this handles\n        the GNU Assembler (gas) syntax.)\n        It takes a single optional configuration parameter:\n        <code>architecture</code>, which can be one of <code>\"ARM\"</code>,\n        <code>\"ARMv6\"</code> or <code>\"x86\"</code>.\n        Including the parameter adds syntax for the registers and special\n        directives for the supplied architecture.\n\n        <p><strong>MIME types defined:</strong> <code>text/x-gas</code></p>\n    </article>\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/gfm/gfm.js",
    "content": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n(function(mod) {\n  if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n    mod(require(\"../../lib/codemirror\"), require(\"../markdown/markdown\"), require(\"../../addon/mode/overlay\"));\n  else if (typeof define == \"function\" && define.amd) // AMD\n    define([\"../../lib/codemirror\", \"../markdown/markdown\", \"../../addon/mode/overlay\"], mod);\n  else // Plain browser env\n    mod(CodeMirror);\n})(function(CodeMirror) {\n\"use strict\";\n\nCodeMirror.defineMode(\"gfm\", function(config, modeConfig) {\n  var codeDepth = 0;\n  function blankLine(state) {\n    state.code = false;\n    return null;\n  }\n  var gfmOverlay = {\n    startState: function() {\n      return {\n        code: false,\n        codeBlock: false,\n        ateSpace: false\n      };\n    },\n    copyState: function(s) {\n      return {\n        code: s.code,\n        codeBlock: s.codeBlock,\n        ateSpace: s.ateSpace\n      };\n    },\n    token: function(stream, state) {\n      state.combineTokens = null;\n\n      // Hack to prevent formatting override inside code blocks (block and inline)\n      if (state.codeBlock) {\n        if (stream.match(/^```/)) {\n          state.codeBlock = false;\n          return null;\n        }\n        stream.skipToEnd();\n        return null;\n      }\n      if (stream.sol()) {\n        state.code = false;\n      }\n      if (stream.sol() && stream.match(/^```/)) {\n        stream.skipToEnd();\n        state.codeBlock = true;\n        return null;\n      }\n      // If this block is changed, it may need to be updated in Markdown mode\n      if (stream.peek() === '`') {\n        stream.next();\n        var before = stream.pos;\n        stream.eatWhile('`');\n        var difference = 1 + stream.pos - before;\n        if (!state.code) {\n          codeDepth = difference;\n          state.code = true;\n        } else {\n          if (difference === codeDepth) { // Must be exact\n            state.code = false;\n          }\n        }\n        return null;\n      } else if (state.code) {\n        stream.next();\n        return null;\n      }\n      // Check if space. If so, links can be formatted later on\n      if (stream.eatSpace()) {\n        state.ateSpace = true;\n        return null;\n      }\n      if (stream.sol() || state.ateSpace) {\n        state.ateSpace = false;\n        if(stream.match(/^(?:[a-zA-Z0-9\\-_]+\\/)?(?:[a-zA-Z0-9\\-_]+@)?(?:[a-f0-9]{7,40}\\b)/)) {\n          // User/Project@SHA\n          // User@SHA\n          // SHA\n          state.combineTokens = true;\n          return \"link\";\n        } else if (stream.match(/^(?:[a-zA-Z0-9\\-_]+\\/)?(?:[a-zA-Z0-9\\-_]+)?#[0-9]+\\b/)) {\n          // User/Project#Num\n          // User#Num\n          // #Num\n          state.combineTokens = true;\n          return \"link\";\n        }\n      }\n      if (stream.match(/^((?:[a-z][\\w-]+:(?:\\/{1,3}|[a-z0-9%])|www\\d{0,3}[.]|[a-z0-9.\\-]+[.][a-z]{2,4}\\/)(?:[^\\s()<>]|\\([^\\s()<>]*\\))+(?:\\([^\\s()<>]*\\)|[^\\s`*!()\\[\\]{};:'\".,<>?«»“”‘’]))/i) &&\n         stream.string.slice(stream.start - 2, stream.start) != \"](\") {\n        // URLs\n        // Taken from http://daringfireball.net/2010/07/improved_regex_for_matching_urls\n        // And then (issue #1160) simplified to make it not crash the Chrome Regexp engine\n        state.combineTokens = true;\n        return \"link\";\n      }\n      stream.next();\n      return null;\n    },\n    blankLine: blankLine\n  };\n\n  var markdownConfig = {\n    underscoresBreakWords: false,\n    taskLists: true,\n    fencedCodeBlocks: true,\n    strikethrough: true\n  };\n  for (var attr in modeConfig) {\n    markdownConfig[attr] = modeConfig[attr];\n  }\n  markdownConfig.name = \"markdown\";\n  CodeMirror.defineMIME(\"gfmBase\", markdownConfig);\n  return CodeMirror.overlayMode(CodeMirror.getMode(config, \"gfmBase\"), gfmOverlay);\n}, \"markdown\");\n\n});\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/gfm/index.html",
    "content": "<!doctype html>\n\n<title>CodeMirror: GFM mode</title>\n<meta charset=\"utf-8\"/>\n<link rel=stylesheet href=\"../../doc/docs.css\">\n\n<link rel=\"stylesheet\" href=\"../../lib/codemirror.css\">\n<script src=\"../../lib/codemirror.js\"></script>\n<script src=\"../../addon/mode/overlay.js\"></script>\n<script src=\"../xml/xml.js\"></script>\n<script src=\"../markdown/markdown.js\"></script>\n<script src=\"gfm.js\"></script>\n<script src=\"../javascript/javascript.js\"></script>\n<script src=\"../css/css.js\"></script>\n<script src=\"../htmlmixed/htmlmixed.js\"></script>\n<script src=\"../clike/clike.js\"></script>\n<script src=\"../meta.js\"></script>\n<style type=\"text/css\">.CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}</style>\n<div id=nav>\n  <a href=\"http://codemirror.net\"><h1>CodeMirror</h1><img id=logo src=\"../../doc/logo.png\"></a>\n\n  <ul>\n    <li><a href=\"../../index.html\">Home</a>\n    <li><a href=\"../../doc/manual.html\">Manual</a>\n    <li><a href=\"https://github.com/codemirror/codemirror\">Code</a>\n  </ul>\n  <ul>\n    <li><a href=\"../index.html\">Language modes</a>\n    <li><a class=active href=\"#\">GFM</a>\n  </ul>\n</div>\n\n<article>\n<h2>GFM mode</h2>\n<form><textarea id=\"code\" name=\"code\">\nGitHub Flavored Markdown\n========================\n\nEverything from markdown plus GFM features:\n\n## URL autolinking\n\nUnderscores_are_allowed_between_words.\n\n## Strikethrough text\n\nGFM adds syntax to strikethrough text, which is missing from standard Markdown.\n\n~~Mistaken text.~~\n~~**works with other fomatting**~~\n\n~~spans across\nlines~~\n\n## Fenced code blocks (and syntax highlighting)\n\n```javascript\nfor (var i = 0; i &lt; items.length; i++) {\n    console.log(items[i], i); // log them\n}\n```\n\n## Task Lists\n\n- [ ] Incomplete task list item\n- [x] **Completed** task list item\n\n## A bit of GitHub spice\n\n* SHA: be6a8cc1c1ecfe9489fb51e4869af15a13fc2cd2\n* User@SHA ref: mojombo@be6a8cc1c1ecfe9489fb51e4869af15a13fc2cd2\n* User/Project@SHA: mojombo/god@be6a8cc1c1ecfe9489fb51e4869af15a13fc2cd2\n* \\#Num: #1\n* User/#Num: mojombo#1\n* User/Project#Num: mojombo/god#1\n\nSee http://github.github.com/github-flavored-markdown/.\n\n</textarea></form>\n\n    <script>\n      var editor = CodeMirror.fromTextArea(document.getElementById(\"code\"), {\n        mode: 'gfm',\n        lineNumbers: true,\n        theme: \"default\"\n      });\n    </script>\n\n    <p>Optionally depends on other modes for properly highlighted code blocks.</p>\n\n    <p><strong>Parsing/Highlighting Tests:</strong> <a href=\"../../test/index.html#gfm_*\">normal</a>,  <a href=\"../../test/index.html#verbose,gfm_*\">verbose</a>.</p>\n\n  </article>\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/gfm/test.js",
    "content": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n(function() {\n  var mode = CodeMirror.getMode({tabSize: 4}, \"gfm\");\n  function MT(name) { test.mode(name, mode, Array.prototype.slice.call(arguments, 1)); }\n  var modeHighlightFormatting = CodeMirror.getMode({tabSize: 4}, {name: \"gfm\", highlightFormatting: true});\n  function FT(name) { test.mode(name, modeHighlightFormatting, Array.prototype.slice.call(arguments, 1)); }\n\n  FT(\"codeBackticks\",\n     \"[comment&formatting&formatting-code `][comment foo][comment&formatting&formatting-code `]\");\n\n  FT(\"doubleBackticks\",\n     \"[comment&formatting&formatting-code ``][comment foo ` bar][comment&formatting&formatting-code ``]\");\n\n  FT(\"codeBlock\",\n     \"[comment&formatting&formatting-code-block ```css]\",\n     \"[tag foo]\",\n     \"[comment&formatting&formatting-code-block ```]\");\n\n  FT(\"taskList\",\n     \"[variable-2&formatting&formatting-list&formatting-list-ul - ][meta&formatting&formatting-task [ ]]][variable-2  foo]\",\n     \"[variable-2&formatting&formatting-list&formatting-list-ul - ][property&formatting&formatting-task [x]]][variable-2  foo]\");\n\n  FT(\"formatting_strikethrough\",\n     \"[strikethrough&formatting&formatting-strikethrough ~~][strikethrough foo][strikethrough&formatting&formatting-strikethrough ~~]\");\n\n  FT(\"formatting_strikethrough\",\n     \"foo [strikethrough&formatting&formatting-strikethrough ~~][strikethrough bar][strikethrough&formatting&formatting-strikethrough ~~]\");\n\n  MT(\"emInWordAsterisk\",\n     \"foo[em *bar*]hello\");\n\n  MT(\"emInWordUnderscore\",\n     \"foo_bar_hello\");\n\n  MT(\"emStrongUnderscore\",\n     \"[strong __][em&strong _foo__][em _] bar\");\n\n  MT(\"fencedCodeBlocks\",\n     \"[comment ```]\",\n     \"[comment foo]\",\n     \"\",\n     \"[comment ```]\",\n     \"bar\");\n\n  MT(\"fencedCodeBlockModeSwitching\",\n     \"[comment ```javascript]\",\n     \"[variable foo]\",\n     \"\",\n     \"[comment ```]\",\n     \"bar\");\n\n  MT(\"taskListAsterisk\",\n     \"[variable-2 * []] foo]\", // Invalid; must have space or x between []\n     \"[variable-2 * [ ]]bar]\", // Invalid; must have space after ]\n     \"[variable-2 * [x]]hello]\", // Invalid; must have space after ]\n     \"[variable-2 * ][meta [ ]]][variable-2  [world]]]\", // Valid; tests reference style links\n     \"    [variable-3 * ][property [x]]][variable-3  foo]\"); // Valid; can be nested\n\n  MT(\"taskListPlus\",\n     \"[variable-2 + []] foo]\", // Invalid; must have space or x between []\n     \"[variable-2 + [ ]]bar]\", // Invalid; must have space after ]\n     \"[variable-2 + [x]]hello]\", // Invalid; must have space after ]\n     \"[variable-2 + ][meta [ ]]][variable-2  [world]]]\", // Valid; tests reference style links\n     \"    [variable-3 + ][property [x]]][variable-3  foo]\"); // Valid; can be nested\n\n  MT(\"taskListDash\",\n     \"[variable-2 - []] foo]\", // Invalid; must have space or x between []\n     \"[variable-2 - [ ]]bar]\", // Invalid; must have space after ]\n     \"[variable-2 - [x]]hello]\", // Invalid; must have space after ]\n     \"[variable-2 - ][meta [ ]]][variable-2  [world]]]\", // Valid; tests reference style links\n     \"    [variable-3 - ][property [x]]][variable-3  foo]\"); // Valid; can be nested\n\n  MT(\"taskListNumber\",\n     \"[variable-2 1. []] foo]\", // Invalid; must have space or x between []\n     \"[variable-2 2. [ ]]bar]\", // Invalid; must have space after ]\n     \"[variable-2 3. [x]]hello]\", // Invalid; must have space after ]\n     \"[variable-2 4. ][meta [ ]]][variable-2  [world]]]\", // Valid; tests reference style links\n     \"    [variable-3 1. ][property [x]]][variable-3  foo]\"); // Valid; can be nested\n\n  MT(\"SHA\",\n     \"foo [link be6a8cc1c1ecfe9489fb51e4869af15a13fc2cd2] bar\");\n\n  MT(\"SHAEmphasis\",\n     \"[em *foo ][em&link be6a8cc1c1ecfe9489fb51e4869af15a13fc2cd2][em *]\");\n\n  MT(\"shortSHA\",\n     \"foo [link be6a8cc] bar\");\n\n  MT(\"tooShortSHA\",\n     \"foo be6a8c bar\");\n\n  MT(\"longSHA\",\n     \"foo be6a8cc1c1ecfe9489fb51e4869af15a13fc2cd22 bar\");\n\n  MT(\"badSHA\",\n     \"foo be6a8cc1c1ecfe9489fb51e4869af15a13fc2cg2 bar\");\n\n  MT(\"userSHA\",\n     \"foo [link bar@be6a8cc1c1ecfe9489fb51e4869af15a13fc2cd2] hello\");\n\n  MT(\"userSHAEmphasis\",\n     \"[em *foo ][em&link bar@be6a8cc1c1ecfe9489fb51e4869af15a13fc2cd2][em *]\");\n\n  MT(\"userProjectSHA\",\n     \"foo [link bar/hello@be6a8cc1c1ecfe9489fb51e4869af15a13fc2cd2] world\");\n\n  MT(\"userProjectSHAEmphasis\",\n     \"[em *foo ][em&link bar/hello@be6a8cc1c1ecfe9489fb51e4869af15a13fc2cd2][em *]\");\n\n  MT(\"num\",\n     \"foo [link #1] bar\");\n\n  MT(\"numEmphasis\",\n     \"[em *foo ][em&link #1][em *]\");\n\n  MT(\"badNum\",\n     \"foo #1bar hello\");\n\n  MT(\"userNum\",\n     \"foo [link bar#1] hello\");\n\n  MT(\"userNumEmphasis\",\n     \"[em *foo ][em&link bar#1][em *]\");\n\n  MT(\"userProjectNum\",\n     \"foo [link bar/hello#1] world\");\n\n  MT(\"userProjectNumEmphasis\",\n     \"[em *foo ][em&link bar/hello#1][em *]\");\n\n  MT(\"vanillaLink\",\n     \"foo [link http://www.example.com/] bar\");\n\n  MT(\"vanillaLinkPunctuation\",\n     \"foo [link http://www.example.com/]. bar\");\n\n  MT(\"vanillaLinkExtension\",\n     \"foo [link http://www.example.com/index.html] bar\");\n\n  MT(\"vanillaLinkEmphasis\",\n     \"foo [em *][em&link http://www.example.com/index.html][em *] bar\");\n\n  MT(\"notALink\",\n     \"[comment ```css]\",\n     \"[tag foo] {[property color]:[keyword black];}\",\n     \"[comment ```][link http://www.example.com/]\");\n\n  MT(\"notALink\",\n     \"[comment ``foo `bar` http://www.example.com/``] hello\");\n\n  MT(\"notALink\",\n     \"[comment `foo]\",\n     \"[link http://www.example.com/]\",\n     \"[comment `foo]\",\n     \"\",\n     \"[link http://www.example.com/]\");\n\n  MT(\"headerCodeBlockGithub\",\n     \"[header&header-1 # heading]\",\n     \"\",\n     \"[comment ```]\",\n     \"[comment code]\",\n     \"[comment ```]\",\n     \"\",\n     \"Commit: [link be6a8cc1c1ecfe9489fb51e4869af15a13fc2cd2]\",\n     \"Issue: [link #1]\",\n     \"Link: [link http://www.example.com/]\");\n\n  MT(\"strikethrough\",\n     \"[strikethrough ~~foo~~]\");\n\n  MT(\"strikethroughWithStartingSpace\",\n     \"~~ foo~~\");\n\n  MT(\"strikethroughUnclosedStrayTildes\",\n    \"[strikethrough ~~foo~~~]\");\n\n  MT(\"strikethroughUnclosedStrayTildes\",\n     \"[strikethrough ~~foo ~~]\");\n\n  MT(\"strikethroughUnclosedStrayTildes\",\n    \"[strikethrough ~~foo ~~ bar]\");\n\n  MT(\"strikethroughUnclosedStrayTildes\",\n    \"[strikethrough ~~foo ~~ bar~~]hello\");\n\n  MT(\"strikethroughOneLetter\",\n     \"[strikethrough ~~a~~]\");\n\n  MT(\"strikethroughWrapped\",\n     \"[strikethrough ~~foo]\",\n     \"[strikethrough foo~~]\");\n\n  MT(\"strikethroughParagraph\",\n     \"[strikethrough ~~foo]\",\n     \"\",\n     \"foo[strikethrough ~~bar]\");\n\n  MT(\"strikethroughEm\",\n     \"[strikethrough ~~foo][em&strikethrough *bar*][strikethrough ~~]\");\n\n  MT(\"strikethroughEm\",\n     \"[em *][em&strikethrough ~~foo~~][em *]\");\n\n  MT(\"strikethroughStrong\",\n     \"[strikethrough ~~][strong&strikethrough **foo**][strikethrough ~~]\");\n\n  MT(\"strikethroughStrong\",\n     \"[strong **][strong&strikethrough ~~foo~~][strong **]\");\n\n})();\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/gherkin/gherkin.js",
    "content": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n/*\nGherkin mode - http://www.cukes.info/\nReport bugs/issues here: https://github.com/codemirror/CodeMirror/issues\n*/\n\n// Following Objs from Brackets implementation: https://github.com/tregusti/brackets-gherkin/blob/master/main.js\n//var Quotes = {\n//  SINGLE: 1,\n//  DOUBLE: 2\n//};\n\n//var regex = {\n//  keywords: /(Feature| {2}(Scenario|In order to|As|I)| {4}(Given|When|Then|And))/\n//};\n\n(function(mod) {\n  if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n    mod(require(\"../../lib/codemirror\"));\n  else if (typeof define == \"function\" && define.amd) // AMD\n    define([\"../../lib/codemirror\"], mod);\n  else // Plain browser env\n    mod(CodeMirror);\n})(function(CodeMirror) {\n\"use strict\";\n\nCodeMirror.defineMode(\"gherkin\", function () {\n  return {\n    startState: function () {\n      return {\n        lineNumber: 0,\n        tableHeaderLine: false,\n        allowFeature: true,\n        allowBackground: false,\n        allowScenario: false,\n        allowSteps: false,\n        allowPlaceholders: false,\n        allowMultilineArgument: false,\n        inMultilineString: false,\n        inMultilineTable: false,\n        inKeywordLine: false\n      };\n    },\n    token: function (stream, state) {\n      if (stream.sol()) {\n        state.lineNumber++;\n        state.inKeywordLine = false;\n        if (state.inMultilineTable) {\n            state.tableHeaderLine = false;\n            if (!stream.match(/\\s*\\|/, false)) {\n              state.allowMultilineArgument = false;\n              state.inMultilineTable = false;\n            }\n        }\n      }\n\n      stream.eatSpace();\n\n      if (state.allowMultilineArgument) {\n\n        // STRING\n        if (state.inMultilineString) {\n          if (stream.match('\"\"\"')) {\n            state.inMultilineString = false;\n            state.allowMultilineArgument = false;\n          } else {\n            stream.match(/.*/);\n          }\n          return \"string\";\n        }\n\n        // TABLE\n        if (state.inMultilineTable) {\n          if (stream.match(/\\|\\s*/)) {\n            return \"bracket\";\n          } else {\n            stream.match(/[^\\|]*/);\n            return state.tableHeaderLine ? \"header\" : \"string\";\n          }\n        }\n\n        // DETECT START\n        if (stream.match('\"\"\"')) {\n          // String\n          state.inMultilineString = true;\n          return \"string\";\n        } else if (stream.match(\"|\")) {\n          // Table\n          state.inMultilineTable = true;\n          state.tableHeaderLine = true;\n          return \"bracket\";\n        }\n\n      }\n\n      // LINE COMMENT\n      if (stream.match(/#.*/)) {\n        return \"comment\";\n\n      // TAG\n      } else if (!state.inKeywordLine && stream.match(/@\\S+/)) {\n        return \"tag\";\n\n      // FEATURE\n      } else if (!state.inKeywordLine && state.allowFeature && stream.match(/(機能|功能|フィーチャ|기능|โครงหลัก|ความสามารถ|ความต้องการทางธุรกิจ|ಹೆಚ್ಚಳ|గుణము|ਮੁਹਾਂਦਰਾ|ਨਕਸ਼ ਨੁਹਾਰ|ਖਾਸੀਅਤ|रूप लेख|وِیژگی|خاصية|תכונה|Функціонал|Функция|Функционалност|Функционал|Үзенчәлеклелек|Свойство|Особина|Мөмкинлек|Могућност|Λειτουργία|Δυνατότητα|Właściwość|Vlastnosť|Trajto|Tính năng|Savybė|Pretty much|Požiadavka|Požadavek|Potrzeba biznesowa|Özellik|Osobina|Ominaisuus|Omadus|OH HAI|Mogućnost|Mogucnost|Jellemző|Hwæt|Hwaet|Funzionalità|Funktionalitéit|Funktionalität|Funkcja|Funkcionalnost|Funkcionalitāte|Funkcia|Fungsi|Functionaliteit|Funcționalitate|Funcţionalitate|Functionalitate|Funcionalitat|Funcionalidade|Fonctionnalité|Fitur|Fīča|Feature|Eiginleiki|Egenskap|Egenskab|Característica|Caracteristica|Business Need|Aspekt|Arwedd|Ahoy matey!|Ability):/)) {\n        state.allowScenario = true;\n        state.allowBackground = true;\n        state.allowPlaceholders = false;\n        state.allowSteps = false;\n        state.allowMultilineArgument = false;\n        state.inKeywordLine = true;\n        return \"keyword\";\n\n      // BACKGROUND\n      } else if (!state.inKeywordLine && state.allowBackground && stream.match(/(背景|배경|แนวคิด|ಹಿನ್ನೆಲೆ|నేపథ్యం|ਪਿਛੋਕੜ|पृष्ठभूमि|زمینه|الخلفية|רקע|Тарих|Предыстория|Предистория|Позадина|Передумова|Основа|Контекст|Кереш|Υπόβαθρο|Założenia|Yo\\-ho\\-ho|Tausta|Taust|Situācija|Rerefons|Pozadina|Pozadie|Pozadí|Osnova|Latar Belakang|Kontext|Konteksts|Kontekstas|Kontekst|Háttér|Hannergrond|Grundlage|Geçmiş|Fundo|Fono|First off|Dis is what went down|Dasar|Contexto|Contexte|Context|Contesto|Cenário de Fundo|Cenario de Fundo|Cefndir|Bối cảnh|Bakgrunnur|Bakgrunn|Bakgrund|Baggrund|Background|B4|Antecedents|Antecedentes|Ær|Aer|Achtergrond):/)) {\n        state.allowPlaceholders = false;\n        state.allowSteps = true;\n        state.allowBackground = false;\n        state.allowMultilineArgument = false;\n        state.inKeywordLine = true;\n        return \"keyword\";\n\n      // SCENARIO OUTLINE\n      } else if (!state.inKeywordLine && state.allowScenario && stream.match(/(場景大綱|场景大纲|劇本大綱|剧本大纲|テンプレ|シナリオテンプレート|シナリオテンプレ|シナリオアウトライン|시나리오 개요|สรุปเหตุการณ์|โครงสร้างของเหตุการณ์|ವಿವರಣೆ|కథనం|ਪਟਕਥਾ ਰੂਪ ਰੇਖਾ|ਪਟਕਥਾ ਢਾਂਚਾ|परिदृश्य रूपरेखा|سيناريو مخطط|الگوی سناریو|תבנית תרחיש|Сценарийның төзелеше|Сценарий структураси|Структура сценарію|Структура сценария|Структура сценарија|Скица|Рамка на сценарий|Концепт|Περιγραφή Σεναρίου|Wharrimean is|Template Situai|Template Senario|Template Keadaan|Tapausaihio|Szenariogrundriss|Szablon scenariusza|Swa hwær swa|Swa hwaer swa|Struktura scenarija|Structură scenariu|Structura scenariu|Skica|Skenario konsep|Shiver me timbers|Senaryo taslağı|Schema dello scenario|Scenariomall|Scenariomal|Scenario Template|Scenario Outline|Scenario Amlinellol|Scenārijs pēc parauga|Scenarijaus šablonas|Reckon it's like|Raamstsenaarium|Plang vum Szenario|Plan du Scénario|Plan du scénario|Osnova scénáře|Osnova Scenára|Náčrt Scenáru|Náčrt Scénáře|Náčrt Scenára|MISHUN SRSLY|Menggariskan Senario|Lýsing Dæma|Lýsing Atburðarásar|Konturo de la scenaro|Koncept|Khung tình huống|Khung kịch bản|Forgatókönyv vázlat|Esquema do Cenário|Esquema do Cenario|Esquema del escenario|Esquema de l'escenari|Esbozo do escenario|Delineação do Cenário|Delineacao do Cenario|All y'all|Abstrakt Scenario|Abstract Scenario):/)) {\n        state.allowPlaceholders = true;\n        state.allowSteps = true;\n        state.allowMultilineArgument = false;\n        state.inKeywordLine = true;\n        return \"keyword\";\n\n      // EXAMPLES\n      } else if (state.allowScenario && stream.match(/(例子|例|サンプル|예|ชุดของเหตุการณ์|ชุดของตัวอย่าง|ಉದಾಹರಣೆಗಳು|ఉదాహరణలు|ਉਦਾਹਰਨਾਂ|उदाहरण|نمونه ها|امثلة|דוגמאות|Үрнәкләр|Сценарији|Примеры|Примери|Приклади|Мисоллар|Мисаллар|Σενάρια|Παραδείγματα|You'll wanna|Voorbeelden|Variantai|Tapaukset|Se þe|Se the|Se ðe|Scenarios|Scenariji|Scenarijai|Przykłady|Primjeri|Primeri|Příklady|Príklady|Piemēri|Példák|Pavyzdžiai|Paraugs|Örnekler|Juhtumid|Exemplos|Exemples|Exemple|Exempel|EXAMPLZ|Examples|Esempi|Enghreifftiau|Ekzemploj|Eksempler|Ejemplos|Dữ liệu|Dead men tell no tales|Dæmi|Contoh|Cenários|Cenarios|Beispiller|Beispiele|Atburðarásir):/)) {\n        state.allowPlaceholders = false;\n        state.allowSteps = true;\n        state.allowBackground = false;\n        state.allowMultilineArgument = true;\n        return \"keyword\";\n\n      // SCENARIO\n      } else if (!state.inKeywordLine && state.allowScenario && stream.match(/(場景|场景|劇本|剧本|シナリオ|시나리오|เหตุการณ์|ಕಥಾಸಾರಾಂಶ|సన్నివేశం|ਪਟਕਥਾ|परिदृश्य|سيناريو|سناریو|תרחיש|Сценарій|Сценарио|Сценарий|Пример|Σενάριο|Tình huống|The thing of it is|Tapaus|Szenario|Swa|Stsenaarium|Skenario|Situai|Senaryo|Senario|Scenaro|Scenariusz|Scenariu|Scénario|Scenario|Scenarijus|Scenārijs|Scenarij|Scenarie|Scénář|Scenár|Primer|MISHUN|Kịch bản|Keadaan|Heave to|Forgatókönyv|Escenario|Escenari|Cenário|Cenario|Awww, look mate|Atburðarás):/)) {\n        state.allowPlaceholders = false;\n        state.allowSteps = true;\n        state.allowBackground = false;\n        state.allowMultilineArgument = false;\n        state.inKeywordLine = true;\n        return \"keyword\";\n\n      // STEPS\n      } else if (!state.inKeywordLine && state.allowSteps && stream.match(/(那麼|那么|而且|當|当|并且|同時|同时|前提|假设|假設|假定|假如|但是|但し|並且|もし|ならば|ただし|しかし|かつ|하지만|조건|먼저|만일|만약|단|그리고|그러면|และ |เมื่อ |แต่ |ดังนั้น |กำหนดให้ |ಸ್ಥಿತಿಯನ್ನು |ಮತ್ತು |ನೀಡಿದ |ನಂತರ |ಆದರೆ |మరియు |చెప్పబడినది |కాని |ఈ పరిస్థితిలో |అప్పుడు |ਪਰ |ਤਦ |ਜੇਕਰ |ਜਿਵੇਂ ਕਿ |ਜਦੋਂ |ਅਤੇ |यदि |परन्तु |पर |तब |तदा |तथा |जब |चूंकि |किन्तु |कदा |और |अगर |و |هنگامی |متى |لكن |عندما |ثم |بفرض |با فرض |اما |اذاً |آنگاه |כאשר |וגם |בהינתן |אזי |אז |אבל |Якщо |Һәм |Унда |Тоді |Тогда |То |Также |Та |Пусть |Припустимо, що |Припустимо |Онда |Но |Нехай |Нәтиҗәдә |Лекин |Ләкин |Коли |Когда |Когато |Када |Кад |К тому же |І |И |Задато |Задати |Задате |Если |Допустим |Дано |Дадено |Вә |Ва |Бирок |Әмма |Әйтик |Әгәр |Аммо |Али |Але |Агар |А також |А |Τότε |Όταν |Και |Δεδομένου |Αλλά |Þurh |Þegar |Þa þe |Þá |Þa |Zatati |Zakładając |Zadato |Zadate |Zadano |Zadani |Zadan |Za předpokladu |Za predpokladu |Youse know when youse got |Youse know like when |Yna |Yeah nah |Y'know |Y |Wun |Wtedy |When y'all |When |Wenn |WEN |wann |Ve |Và |Und |Un |ugeholl |Too right |Thurh |Thì |Then y'all |Then |Tha the |Tha |Tetapi |Tapi |Tak |Tada |Tad |Stel |Soit |Siis |Și |Şi |Si |Sed |Se |Så |Quando |Quand |Quan |Pryd |Potom |Pokud |Pokiaľ |Però |Pero |Pak |Oraz |Onda |Ond |Oletetaan |Og |Och |O zaman |Niin |Nhưng |När |Når |Mutta |Men |Mas |Maka |Majd |Mając |Mais |Maar |mä |Ma |Lorsque |Lorsqu'|Logo |Let go and haul |Kun |Kuid |Kui |Kiedy |Khi |Ketika |Kemudian |Keď |Když |Kaj |Kai |Kada |Kad |Jeżeli |Jeśli |Ja |It's just unbelievable |Ir |I CAN HAZ |I |Ha |Givun |Givet |Given y'all |Given |Gitt |Gegeven |Gegeben seien |Gegeben sei |Gdy |Gangway! |Fakat |Étant donnés |Etant donnés |Étant données |Etant données |Étant donnée |Etant donnée |Étant donné |Etant donné |Et |És |Entonces |Entón |Então |Entao |En |Eğer ki |Ef |Eeldades |E |Ðurh |Duota |Dun |Donitaĵo |Donat |Donada |Do |Diyelim ki |Diberi |Dengan |Den youse gotta |DEN |De |Dato |Dați fiind |Daţi fiind |Dati fiind |Dati |Date fiind |Date |Data |Dat fiind |Dar |Dann |dann |Dan |Dados |Dado |Dadas |Dada |Ða ðe |Ða |Cuando |Cho |Cando |Când |Cand |Cal |But y'all |But at the end of the day I reckon |BUT |But |Buh |Blimey! |Biết |Bet |Bagi |Aye |awer |Avast! |Atunci |Atesa |Atès |Apabila |Anrhegedig a |Angenommen |And y'all |And |AN |An |an |Amikor |Amennyiben |Ama |Als |Alors |Allora |Ali |Aleshores |Ale |Akkor |Ak |Adott |Ac |Aber |A zároveň |A tiež |A taktiež |A také |A |a |7 |\\* )/)) {\n        state.inStep = true;\n        state.allowPlaceholders = true;\n        state.allowMultilineArgument = true;\n        state.inKeywordLine = true;\n        return \"keyword\";\n\n      // INLINE STRING\n      } else if (stream.match(/\"[^\"]*\"?/)) {\n        return \"string\";\n\n      // PLACEHOLDER\n      } else if (state.allowPlaceholders && stream.match(/<[^>]*>?/)) {\n        return \"variable\";\n\n      // Fall through\n      } else {\n        stream.next();\n        stream.eatWhile(/[^@\"<#]/);\n        return null;\n      }\n    }\n  };\n});\n\nCodeMirror.defineMIME(\"text/x-feature\", \"gherkin\");\n\n});\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/gherkin/index.html",
    "content": "<!doctype html>\n\n<title>CodeMirror: Gherkin mode</title>\n<meta charset=\"utf-8\"/>\n<link rel=stylesheet href=\"../../doc/docs.css\">\n\n<link rel=\"stylesheet\" href=\"../../lib/codemirror.css\">\n<script src=\"../../lib/codemirror.js\"></script>\n<script src=\"gherkin.js\"></script>\n<style>.CodeMirror { border-top: 1px solid #ddd; border-bottom: 1px solid #ddd; }</style>\n<div id=nav>\n  <a href=\"http://codemirror.net\"><h1>CodeMirror</h1><img id=logo src=\"../../doc/logo.png\"></a>\n\n  <ul>\n    <li><a href=\"../../index.html\">Home</a>\n    <li><a href=\"../../doc/manual.html\">Manual</a>\n    <li><a href=\"https://github.com/codemirror/codemirror\">Code</a>\n  </ul>\n  <ul>\n    <li><a href=\"../index.html\">Language modes</a>\n    <li><a class=active href=\"#\">Gherkin</a>\n  </ul>\n</div>\n\n<article>\n<h2>Gherkin mode</h2>\n<form><textarea id=\"code\" name=\"code\">\nFeature: Using Google\n  Background: \n    Something something\n    Something else\n  Scenario: Has a homepage\n    When I navigate to the google home page\n    Then the home page should contain the menu and the search form\n  Scenario: Searching for a term \n    When I navigate to the google home page\n    When I search for Tofu\n    Then the search results page is displayed\n    Then the search results page contains 10 individual search results\n    Then the search results contain a link to the wikipedia tofu page\n</textarea></form>\n    <script>\n      var editor = CodeMirror.fromTextArea(document.getElementById(\"code\"), {});\n    </script>\n\n    <p><strong>MIME types defined:</strong> <code>text/x-feature</code>.</p>\n\n  </article>\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/go/go.js",
    "content": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n(function(mod) {\n  if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n    mod(require(\"../../lib/codemirror\"));\n  else if (typeof define == \"function\" && define.amd) // AMD\n    define([\"../../lib/codemirror\"], mod);\n  else // Plain browser env\n    mod(CodeMirror);\n})(function(CodeMirror) {\n\"use strict\";\n\nCodeMirror.defineMode(\"go\", function(config) {\n  var indentUnit = config.indentUnit;\n\n  var keywords = {\n    \"break\":true, \"case\":true, \"chan\":true, \"const\":true, \"continue\":true,\n    \"default\":true, \"defer\":true, \"else\":true, \"fallthrough\":true, \"for\":true,\n    \"func\":true, \"go\":true, \"goto\":true, \"if\":true, \"import\":true,\n    \"interface\":true, \"map\":true, \"package\":true, \"range\":true, \"return\":true,\n    \"select\":true, \"struct\":true, \"switch\":true, \"type\":true, \"var\":true,\n    \"bool\":true, \"byte\":true, \"complex64\":true, \"complex128\":true,\n    \"float32\":true, \"float64\":true, \"int8\":true, \"int16\":true, \"int32\":true,\n    \"int64\":true, \"string\":true, \"uint8\":true, \"uint16\":true, \"uint32\":true,\n    \"uint64\":true, \"int\":true, \"uint\":true, \"uintptr\":true\n  };\n\n  var atoms = {\n    \"true\":true, \"false\":true, \"iota\":true, \"nil\":true, \"append\":true,\n    \"cap\":true, \"close\":true, \"complex\":true, \"copy\":true, \"imag\":true,\n    \"len\":true, \"make\":true, \"new\":true, \"panic\":true, \"print\":true,\n    \"println\":true, \"real\":true, \"recover\":true\n  };\n\n  var isOperatorChar = /[+\\-*&^%:=<>!|\\/]/;\n\n  var curPunc;\n\n  function tokenBase(stream, state) {\n    var ch = stream.next();\n    if (ch == '\"' || ch == \"'\" || ch == \"`\") {\n      state.tokenize = tokenString(ch);\n      return state.tokenize(stream, state);\n    }\n    if (/[\\d\\.]/.test(ch)) {\n      if (ch == \".\") {\n        stream.match(/^[0-9]+([eE][\\-+]?[0-9]+)?/);\n      } else if (ch == \"0\") {\n        stream.match(/^[xX][0-9a-fA-F]+/) || stream.match(/^0[0-7]+/);\n      } else {\n        stream.match(/^[0-9]*\\.?[0-9]*([eE][\\-+]?[0-9]+)?/);\n      }\n      return \"number\";\n    }\n    if (/[\\[\\]{}\\(\\),;\\:\\.]/.test(ch)) {\n      curPunc = ch;\n      return null;\n    }\n    if (ch == \"/\") {\n      if (stream.eat(\"*\")) {\n        state.tokenize = tokenComment;\n        return tokenComment(stream, state);\n      }\n      if (stream.eat(\"/\")) {\n        stream.skipToEnd();\n        return \"comment\";\n      }\n    }\n    if (isOperatorChar.test(ch)) {\n      stream.eatWhile(isOperatorChar);\n      return \"operator\";\n    }\n    stream.eatWhile(/[\\w\\$_\\xa1-\\uffff]/);\n    var cur = stream.current();\n    if (keywords.propertyIsEnumerable(cur)) {\n      if (cur == \"case\" || cur == \"default\") curPunc = \"case\";\n      return \"keyword\";\n    }\n    if (atoms.propertyIsEnumerable(cur)) return \"atom\";\n    return \"variable\";\n  }\n\n  function tokenString(quote) {\n    return function(stream, state) {\n      var escaped = false, next, end = false;\n      while ((next = stream.next()) != null) {\n        if (next == quote && !escaped) {end = true; break;}\n        escaped = !escaped && next == \"\\\\\";\n      }\n      if (end || !(escaped || quote == \"`\"))\n        state.tokenize = tokenBase;\n      return \"string\";\n    };\n  }\n\n  function tokenComment(stream, state) {\n    var maybeEnd = false, ch;\n    while (ch = stream.next()) {\n      if (ch == \"/\" && maybeEnd) {\n        state.tokenize = tokenBase;\n        break;\n      }\n      maybeEnd = (ch == \"*\");\n    }\n    return \"comment\";\n  }\n\n  function Context(indented, column, type, align, prev) {\n    this.indented = indented;\n    this.column = column;\n    this.type = type;\n    this.align = align;\n    this.prev = prev;\n  }\n  function pushContext(state, col, type) {\n    return state.context = new Context(state.indented, col, type, null, state.context);\n  }\n  function popContext(state) {\n    if (!state.context.prev) return;\n    var t = state.context.type;\n    if (t == \")\" || t == \"]\" || t == \"}\")\n      state.indented = state.context.indented;\n    return state.context = state.context.prev;\n  }\n\n  // Interface\n\n  return {\n    startState: function(basecolumn) {\n      return {\n        tokenize: null,\n        context: new Context((basecolumn || 0) - indentUnit, 0, \"top\", false),\n        indented: 0,\n        startOfLine: true\n      };\n    },\n\n    token: function(stream, state) {\n      var ctx = state.context;\n      if (stream.sol()) {\n        if (ctx.align == null) ctx.align = false;\n        state.indented = stream.indentation();\n        state.startOfLine = true;\n        if (ctx.type == \"case\") ctx.type = \"}\";\n      }\n      if (stream.eatSpace()) return null;\n      curPunc = null;\n      var style = (state.tokenize || tokenBase)(stream, state);\n      if (style == \"comment\") return style;\n      if (ctx.align == null) ctx.align = true;\n\n      if (curPunc == \"{\") pushContext(state, stream.column(), \"}\");\n      else if (curPunc == \"[\") pushContext(state, stream.column(), \"]\");\n      else if (curPunc == \"(\") pushContext(state, stream.column(), \")\");\n      else if (curPunc == \"case\") ctx.type = \"case\";\n      else if (curPunc == \"}\" && ctx.type == \"}\") ctx = popContext(state);\n      else if (curPunc == ctx.type) popContext(state);\n      state.startOfLine = false;\n      return style;\n    },\n\n    indent: function(state, textAfter) {\n      if (state.tokenize != tokenBase && state.tokenize != null) return 0;\n      var ctx = state.context, firstChar = textAfter && textAfter.charAt(0);\n      if (ctx.type == \"case\" && /^(?:case|default)\\b/.test(textAfter)) {\n        state.context.type = \"}\";\n        return ctx.indented;\n      }\n      var closing = firstChar == ctx.type;\n      if (ctx.align) return ctx.column + (closing ? 0 : 1);\n      else return ctx.indented + (closing ? 0 : indentUnit);\n    },\n\n    electricChars: \"{}):\",\n    fold: \"brace\",\n    blockCommentStart: \"/*\",\n    blockCommentEnd: \"*/\",\n    lineComment: \"//\"\n  };\n});\n\nCodeMirror.defineMIME(\"text/x-go\", \"go\");\n\n});\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/go/index.html",
    "content": "<!doctype html>\n\n<title>CodeMirror: Go mode</title>\n<meta charset=\"utf-8\"/>\n<link rel=stylesheet href=\"../../doc/docs.css\">\n\n<link rel=\"stylesheet\" href=\"../../lib/codemirror.css\">\n<link rel=\"stylesheet\" href=\"../../theme/elegant.css\">\n<script src=\"../../lib/codemirror.js\"></script>\n<script src=\"../../addon/edit/matchbrackets.js\"></script>\n<script src=\"go.js\"></script>\n<style>.CodeMirror {border:1px solid #999; background:#ffc}</style>\n<div id=nav>\n  <a href=\"http://codemirror.net\"><h1>CodeMirror</h1><img id=logo src=\"../../doc/logo.png\"></a>\n\n  <ul>\n    <li><a href=\"../../index.html\">Home</a>\n    <li><a href=\"../../doc/manual.html\">Manual</a>\n    <li><a href=\"https://github.com/codemirror/codemirror\">Code</a>\n  </ul>\n  <ul>\n    <li><a href=\"../index.html\">Language modes</a>\n    <li><a class=active href=\"#\">Go</a>\n  </ul>\n</div>\n\n<article>\n<h2>Go mode</h2>\n<form><textarea id=\"code\" name=\"code\">\n// Prime Sieve in Go.\n// Taken from the Go specification.\n// Copyright © The Go Authors.\n\npackage main\n\nimport \"fmt\"\n\n// Send the sequence 2, 3, 4, ... to channel 'ch'.\nfunc generate(ch chan&lt;- int) {\n\tfor i := 2; ; i++ {\n\t\tch &lt;- i  // Send 'i' to channel 'ch'\n\t}\n}\n\n// Copy the values from channel 'src' to channel 'dst',\n// removing those divisible by 'prime'.\nfunc filter(src &lt;-chan int, dst chan&lt;- int, prime int) {\n\tfor i := range src {    // Loop over values received from 'src'.\n\t\tif i%prime != 0 {\n\t\t\tdst &lt;- i  // Send 'i' to channel 'dst'.\n\t\t}\n\t}\n}\n\n// The prime sieve: Daisy-chain filter processes together.\nfunc sieve() {\n\tch := make(chan int)  // Create a new channel.\n\tgo generate(ch)       // Start generate() as a subprocess.\n\tfor {\n\t\tprime := &lt;-ch\n\t\tfmt.Print(prime, \"\\n\")\n\t\tch1 := make(chan int)\n\t\tgo filter(ch, ch1, prime)\n\t\tch = ch1\n\t}\n}\n\nfunc main() {\n\tsieve()\n}\n</textarea></form>\n\n    <script>\n      var editor = CodeMirror.fromTextArea(document.getElementById(\"code\"), {\n        theme: \"elegant\",\n        matchBrackets: true,\n        indentUnit: 8,\n        tabSize: 8,\n        indentWithTabs: true,\n        mode: \"text/x-go\"\n      });\n    </script>\n\n    <p><strong>MIME type:</strong> <code>text/x-go</code></p>\n  </article>\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/groovy/groovy.js",
    "content": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n(function(mod) {\n  if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n    mod(require(\"../../lib/codemirror\"));\n  else if (typeof define == \"function\" && define.amd) // AMD\n    define([\"../../lib/codemirror\"], mod);\n  else // Plain browser env\n    mod(CodeMirror);\n})(function(CodeMirror) {\n\"use strict\";\n\nCodeMirror.defineMode(\"groovy\", function(config) {\n  function words(str) {\n    var obj = {}, words = str.split(\" \");\n    for (var i = 0; i < words.length; ++i) obj[words[i]] = true;\n    return obj;\n  }\n  var keywords = words(\n    \"abstract as assert boolean break byte case catch char class const continue def default \" +\n    \"do double else enum extends final finally float for goto if implements import in \" +\n    \"instanceof int interface long native new package private protected public return \" +\n    \"short static strictfp super switch synchronized threadsafe throw throws transient \" +\n    \"try void volatile while\");\n  var blockKeywords = words(\"catch class do else finally for if switch try while enum interface def\");\n  var atoms = words(\"null true false this\");\n\n  var curPunc;\n  function tokenBase(stream, state) {\n    var ch = stream.next();\n    if (ch == '\"' || ch == \"'\") {\n      return startString(ch, stream, state);\n    }\n    if (/[\\[\\]{}\\(\\),;\\:\\.]/.test(ch)) {\n      curPunc = ch;\n      return null;\n    }\n    if (/\\d/.test(ch)) {\n      stream.eatWhile(/[\\w\\.]/);\n      if (stream.eat(/eE/)) { stream.eat(/\\+\\-/); stream.eatWhile(/\\d/); }\n      return \"number\";\n    }\n    if (ch == \"/\") {\n      if (stream.eat(\"*\")) {\n        state.tokenize.push(tokenComment);\n        return tokenComment(stream, state);\n      }\n      if (stream.eat(\"/\")) {\n        stream.skipToEnd();\n        return \"comment\";\n      }\n      if (expectExpression(state.lastToken)) {\n        return startString(ch, stream, state);\n      }\n    }\n    if (ch == \"-\" && stream.eat(\">\")) {\n      curPunc = \"->\";\n      return null;\n    }\n    if (/[+\\-*&%=<>!?|\\/~]/.test(ch)) {\n      stream.eatWhile(/[+\\-*&%=<>|~]/);\n      return \"operator\";\n    }\n    stream.eatWhile(/[\\w\\$_]/);\n    if (ch == \"@\") { stream.eatWhile(/[\\w\\$_\\.]/); return \"meta\"; }\n    if (state.lastToken == \".\") return \"property\";\n    if (stream.eat(\":\")) { curPunc = \"proplabel\"; return \"property\"; }\n    var cur = stream.current();\n    if (atoms.propertyIsEnumerable(cur)) { return \"atom\"; }\n    if (keywords.propertyIsEnumerable(cur)) {\n      if (blockKeywords.propertyIsEnumerable(cur)) curPunc = \"newstatement\";\n      return \"keyword\";\n    }\n    return \"variable\";\n  }\n  tokenBase.isBase = true;\n\n  function startString(quote, stream, state) {\n    var tripleQuoted = false;\n    if (quote != \"/\" && stream.eat(quote)) {\n      if (stream.eat(quote)) tripleQuoted = true;\n      else return \"string\";\n    }\n    function t(stream, state) {\n      var escaped = false, next, end = !tripleQuoted;\n      while ((next = stream.next()) != null) {\n        if (next == quote && !escaped) {\n          if (!tripleQuoted) { break; }\n          if (stream.match(quote + quote)) { end = true; break; }\n        }\n        if (quote == '\"' && next == \"$\" && !escaped && stream.eat(\"{\")) {\n          state.tokenize.push(tokenBaseUntilBrace());\n          return \"string\";\n        }\n        escaped = !escaped && next == \"\\\\\";\n      }\n      if (end) state.tokenize.pop();\n      return \"string\";\n    }\n    state.tokenize.push(t);\n    return t(stream, state);\n  }\n\n  function tokenBaseUntilBrace() {\n    var depth = 1;\n    function t(stream, state) {\n      if (stream.peek() == \"}\") {\n        depth--;\n        if (depth == 0) {\n          state.tokenize.pop();\n          return state.tokenize[state.tokenize.length-1](stream, state);\n        }\n      } else if (stream.peek() == \"{\") {\n        depth++;\n      }\n      return tokenBase(stream, state);\n    }\n    t.isBase = true;\n    return t;\n  }\n\n  function tokenComment(stream, state) {\n    var maybeEnd = false, ch;\n    while (ch = stream.next()) {\n      if (ch == \"/\" && maybeEnd) {\n        state.tokenize.pop();\n        break;\n      }\n      maybeEnd = (ch == \"*\");\n    }\n    return \"comment\";\n  }\n\n  function expectExpression(last) {\n    return !last || last == \"operator\" || last == \"->\" || /[\\.\\[\\{\\(,;:]/.test(last) ||\n      last == \"newstatement\" || last == \"keyword\" || last == \"proplabel\";\n  }\n\n  function Context(indented, column, type, align, prev) {\n    this.indented = indented;\n    this.column = column;\n    this.type = type;\n    this.align = align;\n    this.prev = prev;\n  }\n  function pushContext(state, col, type) {\n    return state.context = new Context(state.indented, col, type, null, state.context);\n  }\n  function popContext(state) {\n    var t = state.context.type;\n    if (t == \")\" || t == \"]\" || t == \"}\")\n      state.indented = state.context.indented;\n    return state.context = state.context.prev;\n  }\n\n  // Interface\n\n  return {\n    startState: function(basecolumn) {\n      return {\n        tokenize: [tokenBase],\n        context: new Context((basecolumn || 0) - config.indentUnit, 0, \"top\", false),\n        indented: 0,\n        startOfLine: true,\n        lastToken: null\n      };\n    },\n\n    token: function(stream, state) {\n      var ctx = state.context;\n      if (stream.sol()) {\n        if (ctx.align == null) ctx.align = false;\n        state.indented = stream.indentation();\n        state.startOfLine = true;\n        // Automatic semicolon insertion\n        if (ctx.type == \"statement\" && !expectExpression(state.lastToken)) {\n          popContext(state); ctx = state.context;\n        }\n      }\n      if (stream.eatSpace()) return null;\n      curPunc = null;\n      var style = state.tokenize[state.tokenize.length-1](stream, state);\n      if (style == \"comment\") return style;\n      if (ctx.align == null) ctx.align = true;\n\n      if ((curPunc == \";\" || curPunc == \":\") && ctx.type == \"statement\") popContext(state);\n      // Handle indentation for {x -> \\n ... }\n      else if (curPunc == \"->\" && ctx.type == \"statement\" && ctx.prev.type == \"}\") {\n        popContext(state);\n        state.context.align = false;\n      }\n      else if (curPunc == \"{\") pushContext(state, stream.column(), \"}\");\n      else if (curPunc == \"[\") pushContext(state, stream.column(), \"]\");\n      else if (curPunc == \"(\") pushContext(state, stream.column(), \")\");\n      else if (curPunc == \"}\") {\n        while (ctx.type == \"statement\") ctx = popContext(state);\n        if (ctx.type == \"}\") ctx = popContext(state);\n        while (ctx.type == \"statement\") ctx = popContext(state);\n      }\n      else if (curPunc == ctx.type) popContext(state);\n      else if (ctx.type == \"}\" || ctx.type == \"top\" || (ctx.type == \"statement\" && curPunc == \"newstatement\"))\n        pushContext(state, stream.column(), \"statement\");\n      state.startOfLine = false;\n      state.lastToken = curPunc || style;\n      return style;\n    },\n\n    indent: function(state, textAfter) {\n      if (!state.tokenize[state.tokenize.length-1].isBase) return 0;\n      var firstChar = textAfter && textAfter.charAt(0), ctx = state.context;\n      if (ctx.type == \"statement\" && !expectExpression(state.lastToken)) ctx = ctx.prev;\n      var closing = firstChar == ctx.type;\n      if (ctx.type == \"statement\") return ctx.indented + (firstChar == \"{\" ? 0 : config.indentUnit);\n      else if (ctx.align) return ctx.column + (closing ? 0 : 1);\n      else return ctx.indented + (closing ? 0 : config.indentUnit);\n    },\n\n    electricChars: \"{}\",\n    fold: \"brace\"\n  };\n});\n\nCodeMirror.defineMIME(\"text/x-groovy\", \"groovy\");\n\n});\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/groovy/index.html",
    "content": "<!doctype html>\n\n<title>CodeMirror: Groovy mode</title>\n<meta charset=\"utf-8\"/>\n<link rel=stylesheet href=\"../../doc/docs.css\">\n\n<link rel=\"stylesheet\" href=\"../../lib/codemirror.css\">\n<script src=\"../../lib/codemirror.js\"></script>\n<script src=\"../../addon/edit/matchbrackets.js\"></script>\n<script src=\"groovy.js\"></script>\n<style>.CodeMirror {border-top: 1px solid #500; border-bottom: 1px solid #500;}</style>\n<div id=nav>\n  <a href=\"http://codemirror.net\"><h1>CodeMirror</h1><img id=logo src=\"../../doc/logo.png\"></a>\n\n  <ul>\n    <li><a href=\"../../index.html\">Home</a>\n    <li><a href=\"../../doc/manual.html\">Manual</a>\n    <li><a href=\"https://github.com/codemirror/codemirror\">Code</a>\n  </ul>\n  <ul>\n    <li><a href=\"../index.html\">Language modes</a>\n    <li><a class=active href=\"#\">Groovy</a>\n  </ul>\n</div>\n\n<article>\n<h2>Groovy mode</h2>\n<form><textarea id=\"code\" name=\"code\">\n//Pattern for groovy script\ndef p = ~/.*\\.groovy/\nnew File( 'd:\\\\scripts' ).eachFileMatch(p) {f ->\n  // imports list\n  def imports = []\n  f.eachLine {\n    // condition to detect an import instruction\n    ln -> if ( ln =~ '^import .*' ) {\n      imports << \"${ln - 'import '}\"\n    }\n  }\n  // print thmen\n  if ( ! imports.empty ) {\n    println f\n    imports.each{ println \"   $it\" }\n  }\n}\n\n/* Coin changer demo code from http://groovy.codehaus.org */\n\nenum UsCoin {\n  quarter(25), dime(10), nickel(5), penny(1)\n  UsCoin(v) { value = v }\n  final value\n}\n\nenum OzzieCoin {\n  fifty(50), twenty(20), ten(10), five(5)\n  OzzieCoin(v) { value = v }\n  final value\n}\n\ndef plural(word, count) {\n  if (count == 1) return word\n  word[-1] == 'y' ? word[0..-2] + \"ies\" : word + \"s\"\n}\n\ndef change(currency, amount) {\n  currency.values().inject([]){ list, coin ->\n     int count = amount / coin.value\n     amount = amount % coin.value\n     list += \"$count ${plural(coin.toString(), count)}\"\n  }\n}\n</textarea></form>\n\n    <script>\n      var editor = CodeMirror.fromTextArea(document.getElementById(\"code\"), {\n        lineNumbers: true,\n        matchBrackets: true,\n        mode: \"text/x-groovy\"\n      });\n    </script>\n\n    <p><strong>MIME types defined:</strong> <code>text/x-groovy</code></p>\n  </article>\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/haml/haml.js",
    "content": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n(function(mod) {\n  if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n    mod(require(\"../../lib/codemirror\"), require(\"../htmlmixed/htmlmixed\"), require(\"../ruby/ruby\"));\n  else if (typeof define == \"function\" && define.amd) // AMD\n    define([\"../../lib/codemirror\", \"../htmlmixed/htmlmixed\", \"../ruby/ruby\"], mod);\n  else // Plain browser env\n    mod(CodeMirror);\n})(function(CodeMirror) {\n\"use strict\";\n\n  // full haml mode. This handled embeded ruby and html fragments too\n  CodeMirror.defineMode(\"haml\", function(config) {\n    var htmlMode = CodeMirror.getMode(config, {name: \"htmlmixed\"});\n    var rubyMode = CodeMirror.getMode(config, \"ruby\");\n\n    function rubyInQuote(endQuote) {\n      return function(stream, state) {\n        var ch = stream.peek();\n        if (ch == endQuote && state.rubyState.tokenize.length == 1) {\n          // step out of ruby context as it seems to complete processing all the braces\n          stream.next();\n          state.tokenize = html;\n          return \"closeAttributeTag\";\n        } else {\n          return ruby(stream, state);\n        }\n      };\n    }\n\n    function ruby(stream, state) {\n      if (stream.match(\"-#\")) {\n        stream.skipToEnd();\n        return \"comment\";\n      }\n      return rubyMode.token(stream, state.rubyState);\n    }\n\n    function html(stream, state) {\n      var ch = stream.peek();\n\n      // handle haml declarations. All declarations that cant be handled here\n      // will be passed to html mode\n      if (state.previousToken.style == \"comment\" ) {\n        if (state.indented > state.previousToken.indented) {\n          stream.skipToEnd();\n          return \"commentLine\";\n        }\n      }\n\n      if (state.startOfLine) {\n        if (ch == \"!\" && stream.match(\"!!\")) {\n          stream.skipToEnd();\n          return \"tag\";\n        } else if (stream.match(/^%[\\w:#\\.]+=/)) {\n          state.tokenize = ruby;\n          return \"hamlTag\";\n        } else if (stream.match(/^%[\\w:]+/)) {\n          return \"hamlTag\";\n        } else if (ch == \"/\" ) {\n          stream.skipToEnd();\n          return \"comment\";\n        }\n      }\n\n      if (state.startOfLine || state.previousToken.style == \"hamlTag\") {\n        if ( ch == \"#\" || ch == \".\") {\n          stream.match(/[\\w-#\\.]*/);\n          return \"hamlAttribute\";\n        }\n      }\n\n      // donot handle --> as valid ruby, make it HTML close comment instead\n      if (state.startOfLine && !stream.match(\"-->\", false) && (ch == \"=\" || ch == \"-\" )) {\n        state.tokenize = ruby;\n        return state.tokenize(stream, state);\n      }\n\n      if (state.previousToken.style == \"hamlTag\" ||\n          state.previousToken.style == \"closeAttributeTag\" ||\n          state.previousToken.style == \"hamlAttribute\") {\n        if (ch == \"(\") {\n          state.tokenize = rubyInQuote(\")\");\n          return state.tokenize(stream, state);\n        } else if (ch == \"{\") {\n          state.tokenize = rubyInQuote(\"}\");\n          return state.tokenize(stream, state);\n        }\n      }\n\n      return htmlMode.token(stream, state.htmlState);\n    }\n\n    return {\n      // default to html mode\n      startState: function() {\n        var htmlState = htmlMode.startState();\n        var rubyState = rubyMode.startState();\n        return {\n          htmlState: htmlState,\n          rubyState: rubyState,\n          indented: 0,\n          previousToken: { style: null, indented: 0},\n          tokenize: html\n        };\n      },\n\n      copyState: function(state) {\n        return {\n          htmlState : CodeMirror.copyState(htmlMode, state.htmlState),\n          rubyState: CodeMirror.copyState(rubyMode, state.rubyState),\n          indented: state.indented,\n          previousToken: state.previousToken,\n          tokenize: state.tokenize\n        };\n      },\n\n      token: function(stream, state) {\n        if (stream.sol()) {\n          state.indented = stream.indentation();\n          state.startOfLine = true;\n        }\n        if (stream.eatSpace()) return null;\n        var style = state.tokenize(stream, state);\n        state.startOfLine = false;\n        // dont record comment line as we only want to measure comment line with\n        // the opening comment block\n        if (style && style != \"commentLine\") {\n          state.previousToken = { style: style, indented: state.indented };\n        }\n        // if current state is ruby and the previous token is not `,` reset the\n        // tokenize to html\n        if (stream.eol() && state.tokenize == ruby) {\n          stream.backUp(1);\n          var ch = stream.peek();\n          stream.next();\n          if (ch && ch != \",\") {\n            state.tokenize = html;\n          }\n        }\n        // reprocess some of the specific style tag when finish setting previousToken\n        if (style == \"hamlTag\") {\n          style = \"tag\";\n        } else if (style == \"commentLine\") {\n          style = \"comment\";\n        } else if (style == \"hamlAttribute\") {\n          style = \"attribute\";\n        } else if (style == \"closeAttributeTag\") {\n          style = null;\n        }\n        return style;\n      }\n    };\n  }, \"htmlmixed\", \"ruby\");\n\n  CodeMirror.defineMIME(\"text/x-haml\", \"haml\");\n});\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/haml/index.html",
    "content": "<!doctype html>\n\n<title>CodeMirror: HAML mode</title>\n<meta charset=\"utf-8\"/>\n<link rel=stylesheet href=\"../../doc/docs.css\">\n\n<link rel=\"stylesheet\" href=\"../../lib/codemirror.css\">\n<script src=\"../../lib/codemirror.js\"></script>\n<script src=\"../xml/xml.js\"></script>\n<script src=\"../htmlmixed/htmlmixed.js\"></script>\n<script src=\"../javascript/javascript.js\"></script>\n<script src=\"../ruby/ruby.js\"></script>\n<script src=\"haml.js\"></script>\n<style>.CodeMirror {background: #f8f8f8;}</style>\n<div id=nav>\n  <a href=\"http://codemirror.net\"><h1>CodeMirror</h1><img id=logo src=\"../../doc/logo.png\"></a>\n\n  <ul>\n    <li><a href=\"../../index.html\">Home</a>\n    <li><a href=\"../../doc/manual.html\">Manual</a>\n    <li><a href=\"https://github.com/codemirror/codemirror\">Code</a>\n  </ul>\n  <ul>\n    <li><a href=\"../index.html\">Language modes</a>\n    <li><a class=active href=\"#\">HAML</a>\n  </ul>\n</div>\n\n<article>\n<h2>HAML mode</h2>\n<form><textarea id=\"code\" name=\"code\">\n!!!\n#content\n.left.column(title=\"title\"){:href => \"/hello\", :test => \"#{hello}_#{world}\"}\n    <!-- This is a comment -->\n    %h2 Welcome to our site!\n    %p= puts \"HAML MODE\"\n  .right.column\n    = render :partial => \"sidebar\"\n\n.container\n  .row\n    .span8\n      %h1.title= @page_title\n%p.title= @page_title\n%p\n  /\n    The same as HTML comment\n    Hello multiline comment\n\n  -# haml comment\n      This wont be displayed\n      nor will this\n  Date/Time:\n  - now = DateTime.now\n  %strong= now\n  - if now > DateTime.parse(\"December 31, 2006\")\n    = \"Happy new \" + \"year!\"\n\n%title\n  = @title\n  \\= @title\n  <h1>Title</h1>\n  <h1 title=\"HELLO\">\n    Title\n  </h1>\n    </textarea></form>\n    <script>\n      var editor = CodeMirror.fromTextArea(document.getElementById(\"code\"), {\n        lineNumbers: true,\n        mode: \"text/x-haml\"\n      });\n    </script>\n\n    <p><strong>MIME types defined:</strong> <code>text/x-haml</code>.</p>\n\n    <p><strong>Parsing/Highlighting Tests:</strong> <a href=\"../../test/index.html#haml_*\">normal</a>,  <a href=\"../../test/index.html#verbose,haml_*\">verbose</a>.</p>\n\n  </article>\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/haml/test.js",
    "content": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n(function() {\n  var mode = CodeMirror.getMode({tabSize: 4, indentUnit: 2}, \"haml\");\n  function MT(name) { test.mode(name, mode, Array.prototype.slice.call(arguments, 1)); }\n\n  // Requires at least one media query\n  MT(\"elementName\",\n     \"[tag %h1] Hey There\");\n\n  MT(\"oneElementPerLine\",\n     \"[tag %h1] Hey There %h2\");\n\n  MT(\"idSelector\",\n     \"[tag %h1][attribute #test] Hey There\");\n\n  MT(\"classSelector\",\n     \"[tag %h1][attribute .hello] Hey There\");\n\n  MT(\"docType\",\n     \"[tag !!! XML]\");\n\n  MT(\"comment\",\n     \"[comment / Hello WORLD]\");\n\n  MT(\"notComment\",\n     \"[tag %h1] This is not a / comment \");\n\n  MT(\"attributes\",\n     \"[tag %a]([variable title][operator =][string \\\"test\\\"]){[atom :title] [operator =>] [string \\\"test\\\"]}\");\n\n  MT(\"htmlCode\",\n     \"[tag&bracket <][tag h1][tag&bracket >]Title[tag&bracket </][tag h1][tag&bracket >]\");\n\n  MT(\"rubyBlock\",\n     \"[operator =][variable-2 @item]\");\n\n  MT(\"selectorRubyBlock\",\n     \"[tag %a.selector=] [variable-2 @item]\");\n\n  MT(\"nestedRubyBlock\",\n      \"[tag %a]\",\n      \"   [operator =][variable puts] [string \\\"test\\\"]\");\n\n  MT(\"multilinePlaintext\",\n      \"[tag %p]\",\n      \"  Hello,\",\n      \"  World\");\n\n  MT(\"multilineRuby\",\n      \"[tag %p]\",\n      \"  [comment -# this is a comment]\",\n      \"     [comment and this is a comment too]\",\n      \"  Date/Time\",\n      \"  [operator -] [variable now] [operator =] [tag DateTime][operator .][property now]\",\n      \"  [tag %strong=] [variable now]\",\n      \"  [operator -] [keyword if] [variable now] [operator >] [tag DateTime][operator .][property parse]([string \\\"December 31, 2006\\\"])\",\n      \"     [operator =][string \\\"Happy\\\"]\",\n      \"     [operator =][string \\\"Belated\\\"]\",\n      \"     [operator =][string \\\"Birthday\\\"]\");\n\n  MT(\"multilineComment\",\n      \"[comment /]\",\n      \"  [comment Multiline]\",\n      \"  [comment Comment]\");\n\n  MT(\"hamlComment\",\n     \"[comment -# this is a comment]\");\n\n  MT(\"multilineHamlComment\",\n     \"[comment -# this is a comment]\",\n     \"   [comment and this is a comment too]\");\n\n  MT(\"multilineHTMLComment\",\n    \"[comment <!--]\",\n    \"  [comment what a comment]\",\n    \"  [comment -->]\");\n\n  MT(\"hamlAfterRubyTag\",\n    \"[attribute .block]\",\n    \"  [tag %strong=] [variable now]\",\n    \"  [attribute .test]\",\n    \"     [operator =][variable now]\",\n    \"  [attribute .right]\");\n\n  MT(\"stretchedRuby\",\n     \"[operator =] [variable puts] [string \\\"Hello\\\"],\",\n     \"   [string \\\"World\\\"]\");\n\n  MT(\"interpolationInHashAttribute\",\n     //\"[tag %div]{[atom :id] [operator =>] [string \\\"#{][variable test][string }_#{][variable ting][string }\\\"]} test\");\n     \"[tag %div]{[atom :id] [operator =>] [string \\\"#{][variable test][string }_#{][variable ting][string }\\\"]} test\");\n\n  MT(\"interpolationInHTMLAttribute\",\n     \"[tag %div]([variable title][operator =][string \\\"#{][variable test][string }_#{][variable ting]()[string }\\\"]) Test\");\n})();\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/haskell/haskell.js",
    "content": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n(function(mod) {\n  if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n    mod(require(\"../../lib/codemirror\"));\n  else if (typeof define == \"function\" && define.amd) // AMD\n    define([\"../../lib/codemirror\"], mod);\n  else // Plain browser env\n    mod(CodeMirror);\n})(function(CodeMirror) {\n\"use strict\";\n\nCodeMirror.defineMode(\"haskell\", function(_config, modeConfig) {\n\n  function switchState(source, setState, f) {\n    setState(f);\n    return f(source, setState);\n  }\n\n  // These should all be Unicode extended, as per the Haskell 2010 report\n  var smallRE = /[a-z_]/;\n  var largeRE = /[A-Z]/;\n  var digitRE = /\\d/;\n  var hexitRE = /[0-9A-Fa-f]/;\n  var octitRE = /[0-7]/;\n  var idRE = /[a-z_A-Z0-9'\\xa1-\\uffff]/;\n  var symbolRE = /[-!#$%&*+.\\/<=>?@\\\\^|~:]/;\n  var specialRE = /[(),;[\\]`{}]/;\n  var whiteCharRE = /[ \\t\\v\\f]/; // newlines are handled in tokenizer\n\n  function normal(source, setState) {\n    if (source.eatWhile(whiteCharRE)) {\n      return null;\n    }\n\n    var ch = source.next();\n    if (specialRE.test(ch)) {\n      if (ch == '{' && source.eat('-')) {\n        var t = \"comment\";\n        if (source.eat('#')) {\n          t = \"meta\";\n        }\n        return switchState(source, setState, ncomment(t, 1));\n      }\n      return null;\n    }\n\n    if (ch == '\\'') {\n      if (source.eat('\\\\')) {\n        source.next();  // should handle other escapes here\n      }\n      else {\n        source.next();\n      }\n      if (source.eat('\\'')) {\n        return \"string\";\n      }\n      return \"error\";\n    }\n\n    if (ch == '\"') {\n      return switchState(source, setState, stringLiteral);\n    }\n\n    if (largeRE.test(ch)) {\n      source.eatWhile(idRE);\n      if (source.eat('.')) {\n        return \"qualifier\";\n      }\n      return \"variable-2\";\n    }\n\n    if (smallRE.test(ch)) {\n      source.eatWhile(idRE);\n      return \"variable\";\n    }\n\n    if (digitRE.test(ch)) {\n      if (ch == '0') {\n        if (source.eat(/[xX]/)) {\n          source.eatWhile(hexitRE); // should require at least 1\n          return \"integer\";\n        }\n        if (source.eat(/[oO]/)) {\n          source.eatWhile(octitRE); // should require at least 1\n          return \"number\";\n        }\n      }\n      source.eatWhile(digitRE);\n      var t = \"number\";\n      if (source.match(/^\\.\\d+/)) {\n        t = \"number\";\n      }\n      if (source.eat(/[eE]/)) {\n        t = \"number\";\n        source.eat(/[-+]/);\n        source.eatWhile(digitRE); // should require at least 1\n      }\n      return t;\n    }\n\n    if (ch == \".\" && source.eat(\".\"))\n      return \"keyword\";\n\n    if (symbolRE.test(ch)) {\n      if (ch == '-' && source.eat(/-/)) {\n        source.eatWhile(/-/);\n        if (!source.eat(symbolRE)) {\n          source.skipToEnd();\n          return \"comment\";\n        }\n      }\n      var t = \"variable\";\n      if (ch == ':') {\n        t = \"variable-2\";\n      }\n      source.eatWhile(symbolRE);\n      return t;\n    }\n\n    return \"error\";\n  }\n\n  function ncomment(type, nest) {\n    if (nest == 0) {\n      return normal;\n    }\n    return function(source, setState) {\n      var currNest = nest;\n      while (!source.eol()) {\n        var ch = source.next();\n        if (ch == '{' && source.eat('-')) {\n          ++currNest;\n        }\n        else if (ch == '-' && source.eat('}')) {\n          --currNest;\n          if (currNest == 0) {\n            setState(normal);\n            return type;\n          }\n        }\n      }\n      setState(ncomment(type, currNest));\n      return type;\n    };\n  }\n\n  function stringLiteral(source, setState) {\n    while (!source.eol()) {\n      var ch = source.next();\n      if (ch == '\"') {\n        setState(normal);\n        return \"string\";\n      }\n      if (ch == '\\\\') {\n        if (source.eol() || source.eat(whiteCharRE)) {\n          setState(stringGap);\n          return \"string\";\n        }\n        if (source.eat('&')) {\n        }\n        else {\n          source.next(); // should handle other escapes here\n        }\n      }\n    }\n    setState(normal);\n    return \"error\";\n  }\n\n  function stringGap(source, setState) {\n    if (source.eat('\\\\')) {\n      return switchState(source, setState, stringLiteral);\n    }\n    source.next();\n    setState(normal);\n    return \"error\";\n  }\n\n\n  var wellKnownWords = (function() {\n    var wkw = {};\n    function setType(t) {\n      return function () {\n        for (var i = 0; i < arguments.length; i++)\n          wkw[arguments[i]] = t;\n      };\n    }\n\n    setType(\"keyword\")(\n      \"case\", \"class\", \"data\", \"default\", \"deriving\", \"do\", \"else\", \"foreign\",\n      \"if\", \"import\", \"in\", \"infix\", \"infixl\", \"infixr\", \"instance\", \"let\",\n      \"module\", \"newtype\", \"of\", \"then\", \"type\", \"where\", \"_\");\n\n    setType(\"keyword\")(\n      \"\\.\\.\", \":\", \"::\", \"=\", \"\\\\\", \"\\\"\", \"<-\", \"->\", \"@\", \"~\", \"=>\");\n\n    setType(\"builtin\")(\n      \"!!\", \"$!\", \"$\", \"&&\", \"+\", \"++\", \"-\", \".\", \"/\", \"/=\", \"<\", \"<=\", \"=<<\",\n      \"==\", \">\", \">=\", \">>\", \">>=\", \"^\", \"^^\", \"||\", \"*\", \"**\");\n\n    setType(\"builtin\")(\n      \"Bool\", \"Bounded\", \"Char\", \"Double\", \"EQ\", \"Either\", \"Enum\", \"Eq\",\n      \"False\", \"FilePath\", \"Float\", \"Floating\", \"Fractional\", \"Functor\", \"GT\",\n      \"IO\", \"IOError\", \"Int\", \"Integer\", \"Integral\", \"Just\", \"LT\", \"Left\",\n      \"Maybe\", \"Monad\", \"Nothing\", \"Num\", \"Ord\", \"Ordering\", \"Rational\", \"Read\",\n      \"ReadS\", \"Real\", \"RealFloat\", \"RealFrac\", \"Right\", \"Show\", \"ShowS\",\n      \"String\", \"True\");\n\n    setType(\"builtin\")(\n      \"abs\", \"acos\", \"acosh\", \"all\", \"and\", \"any\", \"appendFile\", \"asTypeOf\",\n      \"asin\", \"asinh\", \"atan\", \"atan2\", \"atanh\", \"break\", \"catch\", \"ceiling\",\n      \"compare\", \"concat\", \"concatMap\", \"const\", \"cos\", \"cosh\", \"curry\",\n      \"cycle\", \"decodeFloat\", \"div\", \"divMod\", \"drop\", \"dropWhile\", \"either\",\n      \"elem\", \"encodeFloat\", \"enumFrom\", \"enumFromThen\", \"enumFromThenTo\",\n      \"enumFromTo\", \"error\", \"even\", \"exp\", \"exponent\", \"fail\", \"filter\",\n      \"flip\", \"floatDigits\", \"floatRadix\", \"floatRange\", \"floor\", \"fmap\",\n      \"foldl\", \"foldl1\", \"foldr\", \"foldr1\", \"fromEnum\", \"fromInteger\",\n      \"fromIntegral\", \"fromRational\", \"fst\", \"gcd\", \"getChar\", \"getContents\",\n      \"getLine\", \"head\", \"id\", \"init\", \"interact\", \"ioError\", \"isDenormalized\",\n      \"isIEEE\", \"isInfinite\", \"isNaN\", \"isNegativeZero\", \"iterate\", \"last\",\n      \"lcm\", \"length\", \"lex\", \"lines\", \"log\", \"logBase\", \"lookup\", \"map\",\n      \"mapM\", \"mapM_\", \"max\", \"maxBound\", \"maximum\", \"maybe\", \"min\", \"minBound\",\n      \"minimum\", \"mod\", \"negate\", \"not\", \"notElem\", \"null\", \"odd\", \"or\",\n      \"otherwise\", \"pi\", \"pred\", \"print\", \"product\", \"properFraction\",\n      \"putChar\", \"putStr\", \"putStrLn\", \"quot\", \"quotRem\", \"read\", \"readFile\",\n      \"readIO\", \"readList\", \"readLn\", \"readParen\", \"reads\", \"readsPrec\",\n      \"realToFrac\", \"recip\", \"rem\", \"repeat\", \"replicate\", \"return\", \"reverse\",\n      \"round\", \"scaleFloat\", \"scanl\", \"scanl1\", \"scanr\", \"scanr1\", \"seq\",\n      \"sequence\", \"sequence_\", \"show\", \"showChar\", \"showList\", \"showParen\",\n      \"showString\", \"shows\", \"showsPrec\", \"significand\", \"signum\", \"sin\",\n      \"sinh\", \"snd\", \"span\", \"splitAt\", \"sqrt\", \"subtract\", \"succ\", \"sum\",\n      \"tail\", \"take\", \"takeWhile\", \"tan\", \"tanh\", \"toEnum\", \"toInteger\",\n      \"toRational\", \"truncate\", \"uncurry\", \"undefined\", \"unlines\", \"until\",\n      \"unwords\", \"unzip\", \"unzip3\", \"userError\", \"words\", \"writeFile\", \"zip\",\n      \"zip3\", \"zipWith\", \"zipWith3\");\n\n    var override = modeConfig.overrideKeywords;\n    if (override) for (var word in override) if (override.hasOwnProperty(word))\n      wkw[word] = override[word];\n\n    return wkw;\n  })();\n\n\n\n  return {\n    startState: function ()  { return { f: normal }; },\n    copyState:  function (s) { return { f: s.f }; },\n\n    token: function(stream, state) {\n      var t = state.f(stream, function(s) { state.f = s; });\n      var w = stream.current();\n      return wellKnownWords.hasOwnProperty(w) ? wellKnownWords[w] : t;\n    },\n\n    blockCommentStart: \"{-\",\n    blockCommentEnd: \"-}\",\n    lineComment: \"--\"\n  };\n\n});\n\nCodeMirror.defineMIME(\"text/x-haskell\", \"haskell\");\n\n});\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/haskell/index.html",
    "content": "<!doctype html>\n\n<title>CodeMirror: Haskell mode</title>\n<meta charset=\"utf-8\"/>\n<link rel=stylesheet href=\"../../doc/docs.css\">\n\n<link rel=\"stylesheet\" href=\"../../lib/codemirror.css\">\n<link rel=\"stylesheet\" href=\"../../theme/elegant.css\">\n<script src=\"../../lib/codemirror.js\"></script>\n<script src=\"../../addon/edit/matchbrackets.js\"></script>\n<script src=\"haskell.js\"></script>\n<style type=\"text/css\">.CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}</style>\n<div id=nav>\n  <a href=\"http://codemirror.net\"><h1>CodeMirror</h1><img id=logo src=\"../../doc/logo.png\"></a>\n\n  <ul>\n    <li><a href=\"../../index.html\">Home</a>\n    <li><a href=\"../../doc/manual.html\">Manual</a>\n    <li><a href=\"https://github.com/codemirror/codemirror\">Code</a>\n  </ul>\n  <ul>\n    <li><a href=\"../index.html\">Language modes</a>\n    <li><a class=active href=\"#\">Haskell</a>\n  </ul>\n</div>\n\n<article>\n<h2>Haskell mode</h2>\n<form><textarea id=\"code\" name=\"code\">\nmodule UniquePerms (\n    uniquePerms\n    )\nwhere\n\n-- | Find all unique permutations of a list where there might be duplicates.\nuniquePerms :: (Eq a) => [a] -> [[a]]\nuniquePerms = permBag . makeBag\n\n-- | An unordered collection where duplicate values are allowed,\n-- but represented with a single value and a count.\ntype Bag a = [(a, Int)]\n\nmakeBag :: (Eq a) => [a] -> Bag a\nmakeBag [] = []\nmakeBag (a:as) = mix a $ makeBag as\n  where\n    mix a []                        = [(a,1)]\n    mix a (bn@(b,n):bs) | a == b    = (b,n+1):bs\n                        | otherwise = bn : mix a bs\n\npermBag :: Bag a -> [[a]]\npermBag [] = [[]]\npermBag bs = concatMap (\\(f,cs) -> map (f:) $ permBag cs) . oneOfEach $ bs\n  where\n    oneOfEach [] = []\n    oneOfEach (an@(a,n):bs) =\n        let bs' = if n == 1 then bs else (a,n-1):bs\n        in (a,bs') : mapSnd (an:) (oneOfEach bs)\n    \n    apSnd f (a,b) = (a, f b)\n    mapSnd = map . apSnd\n</textarea></form>\n\n    <script>\n      var editor = CodeMirror.fromTextArea(document.getElementById(\"code\"), {\n        lineNumbers: true,\n        matchBrackets: true,\n        theme: \"elegant\"\n      });\n    </script>\n\n    <p><strong>MIME types defined:</strong> <code>text/x-haskell</code>.</p>\n  </article>\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/haxe/haxe.js",
    "content": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n(function(mod) {\n  if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n    mod(require(\"../../lib/codemirror\"));\n  else if (typeof define == \"function\" && define.amd) // AMD\n    define([\"../../lib/codemirror\"], mod);\n  else // Plain browser env\n    mod(CodeMirror);\n})(function(CodeMirror) {\n\"use strict\";\n\nCodeMirror.defineMode(\"haxe\", function(config, parserConfig) {\n  var indentUnit = config.indentUnit;\n\n  // Tokenizer\n\n  var keywords = function(){\n    function kw(type) {return {type: type, style: \"keyword\"};}\n    var A = kw(\"keyword a\"), B = kw(\"keyword b\"), C = kw(\"keyword c\");\n    var operator = kw(\"operator\"), atom = {type: \"atom\", style: \"atom\"}, attribute = {type:\"attribute\", style: \"attribute\"};\n  var type = kw(\"typedef\");\n    return {\n      \"if\": A, \"while\": A, \"else\": B, \"do\": B, \"try\": B,\n      \"return\": C, \"break\": C, \"continue\": C, \"new\": C, \"throw\": C,\n      \"var\": kw(\"var\"), \"inline\":attribute, \"static\": attribute, \"using\":kw(\"import\"),\n    \"public\": attribute, \"private\": attribute, \"cast\": kw(\"cast\"), \"import\": kw(\"import\"), \"macro\": kw(\"macro\"),\n      \"function\": kw(\"function\"), \"catch\": kw(\"catch\"), \"untyped\": kw(\"untyped\"), \"callback\": kw(\"cb\"),\n      \"for\": kw(\"for\"), \"switch\": kw(\"switch\"), \"case\": kw(\"case\"), \"default\": kw(\"default\"),\n      \"in\": operator, \"never\": kw(\"property_access\"), \"trace\":kw(\"trace\"),\n    \"class\": type, \"abstract\":type, \"enum\":type, \"interface\":type, \"typedef\":type, \"extends\":type, \"implements\":type, \"dynamic\":type,\n      \"true\": atom, \"false\": atom, \"null\": atom\n    };\n  }();\n\n  var isOperatorChar = /[+\\-*&%=<>!?|]/;\n\n  function chain(stream, state, f) {\n    state.tokenize = f;\n    return f(stream, state);\n  }\n\n  function nextUntilUnescaped(stream, end) {\n    var escaped = false, next;\n    while ((next = stream.next()) != null) {\n      if (next == end && !escaped)\n        return false;\n      escaped = !escaped && next == \"\\\\\";\n    }\n    return escaped;\n  }\n\n  // Used as scratch variables to communicate multiple values without\n  // consing up tons of objects.\n  var type, content;\n  function ret(tp, style, cont) {\n    type = tp; content = cont;\n    return style;\n  }\n\n  function haxeTokenBase(stream, state) {\n    var ch = stream.next();\n    if (ch == '\"' || ch == \"'\")\n      return chain(stream, state, haxeTokenString(ch));\n    else if (/[\\[\\]{}\\(\\),;\\:\\.]/.test(ch))\n      return ret(ch);\n    else if (ch == \"0\" && stream.eat(/x/i)) {\n      stream.eatWhile(/[\\da-f]/i);\n      return ret(\"number\", \"number\");\n    }\n    else if (/\\d/.test(ch) || ch == \"-\" && stream.eat(/\\d/)) {\n      stream.match(/^\\d*(?:\\.\\d*)?(?:[eE][+\\-]?\\d+)?/);\n      return ret(\"number\", \"number\");\n    }\n    else if (state.reAllowed && (ch == \"~\" && stream.eat(/\\//))) {\n      nextUntilUnescaped(stream, \"/\");\n      stream.eatWhile(/[gimsu]/);\n      return ret(\"regexp\", \"string-2\");\n    }\n    else if (ch == \"/\") {\n      if (stream.eat(\"*\")) {\n        return chain(stream, state, haxeTokenComment);\n      }\n      else if (stream.eat(\"/\")) {\n        stream.skipToEnd();\n        return ret(\"comment\", \"comment\");\n      }\n      else {\n        stream.eatWhile(isOperatorChar);\n        return ret(\"operator\", null, stream.current());\n      }\n    }\n    else if (ch == \"#\") {\n        stream.skipToEnd();\n        return ret(\"conditional\", \"meta\");\n    }\n    else if (ch == \"@\") {\n      stream.eat(/:/);\n      stream.eatWhile(/[\\w_]/);\n      return ret (\"metadata\", \"meta\");\n    }\n    else if (isOperatorChar.test(ch)) {\n      stream.eatWhile(isOperatorChar);\n      return ret(\"operator\", null, stream.current());\n    }\n    else {\n    var word;\n    if(/[A-Z]/.test(ch))\n    {\n      stream.eatWhile(/[\\w_<>]/);\n      word = stream.current();\n      return ret(\"type\", \"variable-3\", word);\n    }\n    else\n    {\n        stream.eatWhile(/[\\w_]/);\n        var word = stream.current(), known = keywords.propertyIsEnumerable(word) && keywords[word];\n        return (known && state.kwAllowed) ? ret(known.type, known.style, word) :\n                       ret(\"variable\", \"variable\", word);\n    }\n    }\n  }\n\n  function haxeTokenString(quote) {\n    return function(stream, state) {\n      if (!nextUntilUnescaped(stream, quote))\n        state.tokenize = haxeTokenBase;\n      return ret(\"string\", \"string\");\n    };\n  }\n\n  function haxeTokenComment(stream, state) {\n    var maybeEnd = false, ch;\n    while (ch = stream.next()) {\n      if (ch == \"/\" && maybeEnd) {\n        state.tokenize = haxeTokenBase;\n        break;\n      }\n      maybeEnd = (ch == \"*\");\n    }\n    return ret(\"comment\", \"comment\");\n  }\n\n  // Parser\n\n  var atomicTypes = {\"atom\": true, \"number\": true, \"variable\": true, \"string\": true, \"regexp\": true};\n\n  function HaxeLexical(indented, column, type, align, prev, info) {\n    this.indented = indented;\n    this.column = column;\n    this.type = type;\n    this.prev = prev;\n    this.info = info;\n    if (align != null) this.align = align;\n  }\n\n  function inScope(state, varname) {\n    for (var v = state.localVars; v; v = v.next)\n      if (v.name == varname) return true;\n  }\n\n  function parseHaxe(state, style, type, content, stream) {\n    var cc = state.cc;\n    // Communicate our context to the combinators.\n    // (Less wasteful than consing up a hundred closures on every call.)\n    cx.state = state; cx.stream = stream; cx.marked = null, cx.cc = cc;\n\n    if (!state.lexical.hasOwnProperty(\"align\"))\n      state.lexical.align = true;\n\n    while(true) {\n      var combinator = cc.length ? cc.pop() : statement;\n      if (combinator(type, content)) {\n        while(cc.length && cc[cc.length - 1].lex)\n          cc.pop()();\n        if (cx.marked) return cx.marked;\n        if (type == \"variable\" && inScope(state, content)) return \"variable-2\";\n    if (type == \"variable\" && imported(state, content)) return \"variable-3\";\n        return style;\n      }\n    }\n  }\n\n  function imported(state, typename)\n  {\n  if (/[a-z]/.test(typename.charAt(0)))\n    return false;\n  var len = state.importedtypes.length;\n  for (var i = 0; i<len; i++)\n    if(state.importedtypes[i]==typename) return true;\n  }\n\n\n  function registerimport(importname) {\n  var state = cx.state;\n  for (var t = state.importedtypes; t; t = t.next)\n    if(t.name == importname) return;\n  state.importedtypes = { name: importname, next: state.importedtypes };\n  }\n  // Combinator utils\n\n  var cx = {state: null, column: null, marked: null, cc: null};\n  function pass() {\n    for (var i = arguments.length - 1; i >= 0; i--) cx.cc.push(arguments[i]);\n  }\n  function cont() {\n    pass.apply(null, arguments);\n    return true;\n  }\n  function register(varname) {\n    var state = cx.state;\n    if (state.context) {\n      cx.marked = \"def\";\n      for (var v = state.localVars; v; v = v.next)\n        if (v.name == varname) return;\n      state.localVars = {name: varname, next: state.localVars};\n    }\n  }\n\n  // Combinators\n\n  var defaultVars = {name: \"this\", next: null};\n  function pushcontext() {\n    if (!cx.state.context) cx.state.localVars = defaultVars;\n    cx.state.context = {prev: cx.state.context, vars: cx.state.localVars};\n  }\n  function popcontext() {\n    cx.state.localVars = cx.state.context.vars;\n    cx.state.context = cx.state.context.prev;\n  }\n  function pushlex(type, info) {\n    var result = function() {\n      var state = cx.state;\n      state.lexical = new HaxeLexical(state.indented, cx.stream.column(), type, null, state.lexical, info);\n    };\n    result.lex = true;\n    return result;\n  }\n  function poplex() {\n    var state = cx.state;\n    if (state.lexical.prev) {\n      if (state.lexical.type == \")\")\n        state.indented = state.lexical.indented;\n      state.lexical = state.lexical.prev;\n    }\n  }\n  poplex.lex = true;\n\n  function expect(wanted) {\n    function f(type) {\n      if (type == wanted) return cont();\n      else if (wanted == \";\") return pass();\n      else return cont(f);\n    };\n    return f;\n  }\n\n  function statement(type) {\n    if (type == \"@\") return cont(metadef);\n    if (type == \"var\") return cont(pushlex(\"vardef\"), vardef1, expect(\";\"), poplex);\n    if (type == \"keyword a\") return cont(pushlex(\"form\"), expression, statement, poplex);\n    if (type == \"keyword b\") return cont(pushlex(\"form\"), statement, poplex);\n    if (type == \"{\") return cont(pushlex(\"}\"), pushcontext, block, poplex, popcontext);\n    if (type == \";\") return cont();\n    if (type == \"attribute\") return cont(maybeattribute);\n    if (type == \"function\") return cont(functiondef);\n    if (type == \"for\") return cont(pushlex(\"form\"), expect(\"(\"), pushlex(\")\"), forspec1, expect(\")\"),\n                                      poplex, statement, poplex);\n    if (type == \"variable\") return cont(pushlex(\"stat\"), maybelabel);\n    if (type == \"switch\") return cont(pushlex(\"form\"), expression, pushlex(\"}\", \"switch\"), expect(\"{\"),\n                                         block, poplex, poplex);\n    if (type == \"case\") return cont(expression, expect(\":\"));\n    if (type == \"default\") return cont(expect(\":\"));\n    if (type == \"catch\") return cont(pushlex(\"form\"), pushcontext, expect(\"(\"), funarg, expect(\")\"),\n                                        statement, poplex, popcontext);\n    if (type == \"import\") return cont(importdef, expect(\";\"));\n    if (type == \"typedef\") return cont(typedef);\n    return pass(pushlex(\"stat\"), expression, expect(\";\"), poplex);\n  }\n  function expression(type) {\n    if (atomicTypes.hasOwnProperty(type)) return cont(maybeoperator);\n    if (type == \"function\") return cont(functiondef);\n    if (type == \"keyword c\") return cont(maybeexpression);\n    if (type == \"(\") return cont(pushlex(\")\"), maybeexpression, expect(\")\"), poplex, maybeoperator);\n    if (type == \"operator\") return cont(expression);\n    if (type == \"[\") return cont(pushlex(\"]\"), commasep(expression, \"]\"), poplex, maybeoperator);\n    if (type == \"{\") return cont(pushlex(\"}\"), commasep(objprop, \"}\"), poplex, maybeoperator);\n    return cont();\n  }\n  function maybeexpression(type) {\n    if (type.match(/[;\\}\\)\\],]/)) return pass();\n    return pass(expression);\n  }\n\n  function maybeoperator(type, value) {\n    if (type == \"operator\" && /\\+\\+|--/.test(value)) return cont(maybeoperator);\n    if (type == \"operator\" || type == \":\") return cont(expression);\n    if (type == \";\") return;\n    if (type == \"(\") return cont(pushlex(\")\"), commasep(expression, \")\"), poplex, maybeoperator);\n    if (type == \".\") return cont(property, maybeoperator);\n    if (type == \"[\") return cont(pushlex(\"]\"), expression, expect(\"]\"), poplex, maybeoperator);\n  }\n\n  function maybeattribute(type) {\n    if (type == \"attribute\") return cont(maybeattribute);\n    if (type == \"function\") return cont(functiondef);\n    if (type == \"var\") return cont(vardef1);\n  }\n\n  function metadef(type) {\n    if(type == \":\") return cont(metadef);\n    if(type == \"variable\") return cont(metadef);\n    if(type == \"(\") return cont(pushlex(\")\"), commasep(metaargs, \")\"), poplex, statement);\n  }\n  function metaargs(type) {\n    if(type == \"variable\") return cont();\n  }\n\n  function importdef (type, value) {\n  if(type == \"variable\" && /[A-Z]/.test(value.charAt(0))) { registerimport(value); return cont(); }\n  else if(type == \"variable\" || type == \"property\" || type == \".\" || value == \"*\") return cont(importdef);\n  }\n\n  function typedef (type, value)\n  {\n  if(type == \"variable\" && /[A-Z]/.test(value.charAt(0))) { registerimport(value); return cont(); }\n  else if (type == \"type\" && /[A-Z]/.test(value.charAt(0))) { return cont(); }\n  }\n\n  function maybelabel(type) {\n    if (type == \":\") return cont(poplex, statement);\n    return pass(maybeoperator, expect(\";\"), poplex);\n  }\n  function property(type) {\n    if (type == \"variable\") {cx.marked = \"property\"; return cont();}\n  }\n  function objprop(type) {\n    if (type == \"variable\") cx.marked = \"property\";\n    if (atomicTypes.hasOwnProperty(type)) return cont(expect(\":\"), expression);\n  }\n  function commasep(what, end) {\n    function proceed(type) {\n      if (type == \",\") return cont(what, proceed);\n      if (type == end) return cont();\n      return cont(expect(end));\n    }\n    return function(type) {\n      if (type == end) return cont();\n      else return pass(what, proceed);\n    };\n  }\n  function block(type) {\n    if (type == \"}\") return cont();\n    return pass(statement, block);\n  }\n  function vardef1(type, value) {\n    if (type == \"variable\"){register(value); return cont(typeuse, vardef2);}\n    return cont();\n  }\n  function vardef2(type, value) {\n    if (value == \"=\") return cont(expression, vardef2);\n    if (type == \",\") return cont(vardef1);\n  }\n  function forspec1(type, value) {\n  if (type == \"variable\") {\n    register(value);\n  }\n  return cont(pushlex(\")\"), pushcontext, forin, expression, poplex, statement, popcontext);\n  }\n  function forin(_type, value) {\n    if (value == \"in\") return cont();\n  }\n  function functiondef(type, value) {\n    if (type == \"variable\") {register(value); return cont(functiondef);}\n    if (value == \"new\") return cont(functiondef);\n    if (type == \"(\") return cont(pushlex(\")\"), pushcontext, commasep(funarg, \")\"), poplex, typeuse, statement, popcontext);\n  }\n  function typeuse(type) {\n    if(type == \":\") return cont(typestring);\n  }\n  function typestring(type) {\n    if(type == \"type\") return cont();\n    if(type == \"variable\") return cont();\n    if(type == \"{\") return cont(pushlex(\"}\"), commasep(typeprop, \"}\"), poplex);\n  }\n  function typeprop(type) {\n    if(type == \"variable\") return cont(typeuse);\n  }\n  function funarg(type, value) {\n    if (type == \"variable\") {register(value); return cont(typeuse);}\n  }\n\n  // Interface\n\n  return {\n    startState: function(basecolumn) {\n    var defaulttypes = [\"Int\", \"Float\", \"String\", \"Void\", \"Std\", \"Bool\", \"Dynamic\", \"Array\"];\n      return {\n        tokenize: haxeTokenBase,\n        reAllowed: true,\n        kwAllowed: true,\n        cc: [],\n        lexical: new HaxeLexical((basecolumn || 0) - indentUnit, 0, \"block\", false),\n        localVars: parserConfig.localVars,\n    importedtypes: defaulttypes,\n        context: parserConfig.localVars && {vars: parserConfig.localVars},\n        indented: 0\n      };\n    },\n\n    token: function(stream, state) {\n      if (stream.sol()) {\n        if (!state.lexical.hasOwnProperty(\"align\"))\n          state.lexical.align = false;\n        state.indented = stream.indentation();\n      }\n      if (stream.eatSpace()) return null;\n      var style = state.tokenize(stream, state);\n      if (type == \"comment\") return style;\n      state.reAllowed = !!(type == \"operator\" || type == \"keyword c\" || type.match(/^[\\[{}\\(,;:]$/));\n      state.kwAllowed = type != '.';\n      return parseHaxe(state, style, type, content, stream);\n    },\n\n    indent: function(state, textAfter) {\n      if (state.tokenize != haxeTokenBase) return 0;\n      var firstChar = textAfter && textAfter.charAt(0), lexical = state.lexical;\n      if (lexical.type == \"stat\" && firstChar == \"}\") lexical = lexical.prev;\n      var type = lexical.type, closing = firstChar == type;\n      if (type == \"vardef\") return lexical.indented + 4;\n      else if (type == \"form\" && firstChar == \"{\") return lexical.indented;\n      else if (type == \"stat\" || type == \"form\") return lexical.indented + indentUnit;\n      else if (lexical.info == \"switch\" && !closing)\n        return lexical.indented + (/^(?:case|default)\\b/.test(textAfter) ? indentUnit : 2 * indentUnit);\n      else if (lexical.align) return lexical.column + (closing ? 0 : 1);\n      else return lexical.indented + (closing ? 0 : indentUnit);\n    },\n\n    electricChars: \"{}\",\n    blockCommentStart: \"/*\",\n    blockCommentEnd: \"*/\",\n    lineComment: \"//\"\n  };\n});\n\nCodeMirror.defineMIME(\"text/x-haxe\", \"haxe\");\n\nCodeMirror.defineMode(\"hxml\", function () {\n\n  return {\n    startState: function () {\n      return {\n        define: false,\n        inString: false\n      };\n    },\n    token: function (stream, state) {\n      var ch = stream.peek();\n      var sol = stream.sol();\n\n      ///* comments */\n      if (ch == \"#\") {\n        stream.skipToEnd();\n        return \"comment\";\n      }\n      if (sol && ch == \"-\") {\n        var style = \"variable-2\";\n\n        stream.eat(/-/);\n\n        if (stream.peek() == \"-\") {\n          stream.eat(/-/);\n          style = \"keyword a\";\n        }\n\n        if (stream.peek() == \"D\") {\n          stream.eat(/[D]/);\n          style = \"keyword c\";\n          state.define = true;\n        }\n\n        stream.eatWhile(/[A-Z]/i);\n        return style;\n      }\n\n      var ch = stream.peek();\n\n      if (state.inString == false && ch == \"'\") {\n        state.inString = true;\n        ch = stream.next();\n      }\n\n      if (state.inString == true) {\n        if (stream.skipTo(\"'\")) {\n\n        } else {\n          stream.skipToEnd();\n        }\n\n        if (stream.peek() == \"'\") {\n          stream.next();\n          state.inString = false;\n        }\n\n        return \"string\";\n      }\n\n      stream.next();\n      return null;\n    },\n    lineComment: \"#\"\n  };\n});\n\nCodeMirror.defineMIME(\"text/x-hxml\", \"hxml\");\n\n});\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/haxe/index.html",
    "content": "<!doctype html>\n\n<title>CodeMirror: Haxe mode</title>\n<meta charset=\"utf-8\"/>\n<link rel=stylesheet href=\"../../doc/docs.css\">\n\n<link rel=\"stylesheet\" href=\"../../lib/codemirror.css\">\n<script src=\"../../lib/codemirror.js\"></script>\n<script src=\"haxe.js\"></script>\n<style type=\"text/css\">.CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}</style>\n<div id=nav>\n  <a href=\"http://codemirror.net\"><h1>CodeMirror</h1><img id=logo src=\"../../doc/logo.png\"></a>\n\n  <ul>\n    <li><a href=\"../../index.html\">Home</a>\n    <li><a href=\"../../doc/manual.html\">Manual</a>\n    <li><a href=\"https://github.com/codemirror/codemirror\">Code</a>\n  </ul>\n  <ul>\n    <li><a href=\"../index.html\">Language modes</a>\n    <li><a class=active href=\"#\">Haxe</a>\n  </ul>\n</div>\n\n<article>\n<h2>Haxe mode</h2>\n\n\n<div><p><textarea id=\"code-haxe\" name=\"code\">\nimport one.two.Three;\n\n@attr(\"test\")\nclass Foo&lt;T&gt; extends Three\n{\n\tpublic function new()\n\t{\n\t\tnoFoo = 12;\n\t}\n\t\n\tpublic static inline function doFoo(obj:{k:Int, l:Float}):Int\n\t{\n\t\tfor(i in 0...10)\n\t\t{\n\t\t\tobj.k++;\n\t\t\ttrace(i);\n\t\t\tvar var1 = new Array();\n\t\t\tif(var1.length > 1)\n\t\t\t\tthrow \"Error\";\n\t\t}\n\t\t// The following line should not be colored, the variable is scoped out\n\t\tvar1;\n\t\t/* Multi line\n\t\t * Comment test\n\t\t */\n\t\treturn obj.k;\n\t}\n\tprivate function bar():Void\n\t{\n\t\t#if flash\n\t\tvar t1:String = \"1.21\";\n\t\t#end\n\t\ttry {\n\t\t\tdoFoo({k:3, l:1.2});\n\t\t}\n\t\tcatch (e : String) {\n\t\t\ttrace(e);\n\t\t}\n\t\tvar t2:Float = cast(3.2);\n\t\tvar t3:haxe.Timer = new haxe.Timer();\n\t\tvar t4 = {k:Std.int(t2), l:Std.parseFloat(t1)};\n\t\tvar t5 = ~/123+.*$/i;\n\t\tdoFoo(t4);\n\t\tuntyped t1 = 4;\n\t\tbob = new Foo&lt;Int&gt;\n\t}\n\tpublic var okFoo(default, never):Float;\n\tvar noFoo(getFoo, null):Int;\n\tfunction getFoo():Int {\n\t\treturn noFoo;\n\t}\n\t\n\tpublic var three:Int;\n}\nenum Color\n{\n\tred;\n\tgreen;\n\tblue;\n\tgrey( v : Int );\n\trgb (r:Int,g:Int,b:Int);\n}\n</textarea></p>\n\n<p>Hxml mode:</p>\n\n<p><textarea id=\"code-hxml\">\n-cp test\n-js path/to/file.js\n#-remap nme:flash\n--next\n-D source-map-content\n-cmd 'test'\n-lib lime\n</textarea></p>\n</div>\n\n    <script>\n      var editor = CodeMirror.fromTextArea(document.getElementById(\"code-haxe\"), {\n      \tmode: \"haxe\",\n        lineNumbers: true,\n        indentUnit: 4,\n        indentWithTabs: true\n      });\n      \n      editor = CodeMirror.fromTextArea(document.getElementById(\"code-hxml\"), {\n      \tmode: \"hxml\",\n        lineNumbers: true,\n        indentUnit: 4,\n        indentWithTabs: true\n      });\n    </script>\n\n    <p><strong>MIME types defined:</strong> <code>text/x-haxe, text/x-hxml</code>.</p>\n  </article>\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/htmlembedded/htmlembedded.js",
    "content": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n(function(mod) {\n  if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n    mod(require(\"../../lib/codemirror\"), require(\"../htmlmixed/htmlmixed\"));\n  else if (typeof define == \"function\" && define.amd) // AMD\n    define([\"../../lib/codemirror\", \"../htmlmixed/htmlmixed\"], mod);\n  else // Plain browser env\n    mod(CodeMirror);\n})(function(CodeMirror) {\n\"use strict\";\n\nCodeMirror.defineMode(\"htmlembedded\", function(config, parserConfig) {\n\n  //config settings\n  var scriptStartRegex = parserConfig.scriptStartRegex || /^<%/i,\n      scriptEndRegex = parserConfig.scriptEndRegex || /^%>/i;\n\n  //inner modes\n  var scriptingMode, htmlMixedMode;\n\n  //tokenizer when in html mode\n  function htmlDispatch(stream, state) {\n      if (stream.match(scriptStartRegex, false)) {\n          state.token=scriptingDispatch;\n          return scriptingMode.token(stream, state.scriptState);\n          }\n      else\n          return htmlMixedMode.token(stream, state.htmlState);\n    }\n\n  //tokenizer when in scripting mode\n  function scriptingDispatch(stream, state) {\n      if (stream.match(scriptEndRegex, false))  {\n          state.token=htmlDispatch;\n          return htmlMixedMode.token(stream, state.htmlState);\n         }\n      else\n          return scriptingMode.token(stream, state.scriptState);\n         }\n\n\n  return {\n    startState: function() {\n      scriptingMode = scriptingMode || CodeMirror.getMode(config, parserConfig.scriptingModeSpec);\n      htmlMixedMode = htmlMixedMode || CodeMirror.getMode(config, \"htmlmixed\");\n      return {\n          token :  parserConfig.startOpen ? scriptingDispatch : htmlDispatch,\n          htmlState : CodeMirror.startState(htmlMixedMode),\n          scriptState : CodeMirror.startState(scriptingMode)\n      };\n    },\n\n    token: function(stream, state) {\n      return state.token(stream, state);\n    },\n\n    indent: function(state, textAfter) {\n      if (state.token == htmlDispatch)\n        return htmlMixedMode.indent(state.htmlState, textAfter);\n      else if (scriptingMode.indent)\n        return scriptingMode.indent(state.scriptState, textAfter);\n    },\n\n    copyState: function(state) {\n      return {\n       token : state.token,\n       htmlState : CodeMirror.copyState(htmlMixedMode, state.htmlState),\n       scriptState : CodeMirror.copyState(scriptingMode, state.scriptState)\n      };\n    },\n\n    innerMode: function(state) {\n      if (state.token == scriptingDispatch) return {state: state.scriptState, mode: scriptingMode};\n      else return {state: state.htmlState, mode: htmlMixedMode};\n    }\n  };\n}, \"htmlmixed\");\n\nCodeMirror.defineMIME(\"application/x-ejs\", { name: \"htmlembedded\", scriptingModeSpec:\"javascript\"});\nCodeMirror.defineMIME(\"application/x-aspx\", { name: \"htmlembedded\", scriptingModeSpec:\"text/x-csharp\"});\nCodeMirror.defineMIME(\"application/x-jsp\", { name: \"htmlembedded\", scriptingModeSpec:\"text/x-java\"});\nCodeMirror.defineMIME(\"application/x-erb\", { name: \"htmlembedded\", scriptingModeSpec:\"ruby\"});\n\n});\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/htmlembedded/index.html",
    "content": "<!doctype html>\n\n<title>CodeMirror: Html Embedded Scripts mode</title>\n<meta charset=\"utf-8\"/>\n<link rel=stylesheet href=\"../../doc/docs.css\">\n\n<link rel=\"stylesheet\" href=\"../../lib/codemirror.css\">\n<script src=\"../../lib/codemirror.js\"></script>\n<script src=\"../xml/xml.js\"></script>\n<script src=\"../javascript/javascript.js\"></script>\n<script src=\"../css/css.js\"></script>\n<script src=\"../htmlmixed/htmlmixed.js\"></script>\n<script src=\"htmlembedded.js\"></script>\n<style type=\"text/css\">.CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}</style>\n<div id=nav>\n  <a href=\"http://codemirror.net\"><h1>CodeMirror</h1><img id=logo src=\"../../doc/logo.png\"></a>\n\n  <ul>\n    <li><a href=\"../../index.html\">Home</a>\n    <li><a href=\"../../doc/manual.html\">Manual</a>\n    <li><a href=\"https://github.com/codemirror/codemirror\">Code</a>\n  </ul>\n  <ul>\n    <li><a href=\"../index.html\">Language modes</a>\n    <li><a class=active href=\"#\">Html Embedded Scripts</a>\n  </ul>\n</div>\n\n<article>\n<h2>Html Embedded Scripts mode</h2>\n<form><textarea id=\"code\" name=\"code\">\n<%\nfunction hello(who) {\n\treturn \"Hello \" + who;\n}\n%>\nThis is an example of EJS (embedded javascript)\n<p>The program says <%= hello(\"world\") %>.</p>\n<script>\n\talert(\"And here is some normal JS code\"); // also colored\n</script>\n</textarea></form>\n\n    <script>\n      var editor = CodeMirror.fromTextArea(document.getElementById(\"code\"), {\n        lineNumbers: true,\n        mode: \"application/x-ejs\",\n        indentUnit: 4,\n        indentWithTabs: true\n      });\n    </script>\n\n    <p>Mode for html embedded scripts like JSP and ASP.NET. Depends on HtmlMixed which in turn depends on\n    JavaScript, CSS and XML.<br />Other dependancies include those of the scriping language chosen.</p>\n\n    <p><strong>MIME types defined:</strong> <code>application/x-aspx</code> (ASP.NET), \n    <code>application/x-ejs</code> (Embedded Javascript), <code>application/x-jsp</code> (JavaServer Pages)</p>\n  </article>\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/htmlmixed/htmlmixed.js",
    "content": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n(function(mod) {\n  if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n    mod(require(\"../../lib/codemirror\"), require(\"../xml/xml\"), require(\"../javascript/javascript\"), require(\"../css/css\"));\n  else if (typeof define == \"function\" && define.amd) // AMD\n    define([\"../../lib/codemirror\", \"../xml/xml\", \"../javascript/javascript\", \"../css/css\"], mod);\n  else // Plain browser env\n    mod(CodeMirror);\n})(function(CodeMirror) {\n\"use strict\";\n\nCodeMirror.defineMode(\"htmlmixed\", function(config, parserConfig) {\n  var htmlMode = CodeMirror.getMode(config, {name: \"xml\",\n                                             htmlMode: true,\n                                             multilineTagIndentFactor: parserConfig.multilineTagIndentFactor,\n                                             multilineTagIndentPastTag: parserConfig.multilineTagIndentPastTag});\n  var cssMode = CodeMirror.getMode(config, \"css\");\n\n  var scriptTypes = [], scriptTypesConf = parserConfig && parserConfig.scriptTypes;\n  scriptTypes.push({matches: /^(?:text|application)\\/(?:x-)?(?:java|ecma)script$|^$/i,\n                    mode: CodeMirror.getMode(config, \"javascript\")});\n  if (scriptTypesConf) for (var i = 0; i < scriptTypesConf.length; ++i) {\n    var conf = scriptTypesConf[i];\n    scriptTypes.push({matches: conf.matches, mode: conf.mode && CodeMirror.getMode(config, conf.mode)});\n  }\n  scriptTypes.push({matches: /./,\n                    mode: CodeMirror.getMode(config, \"text/plain\")});\n\n  function html(stream, state) {\n    var tagName = state.htmlState.tagName;\n    if (tagName) tagName = tagName.toLowerCase();\n    var style = htmlMode.token(stream, state.htmlState);\n    if (tagName == \"script\" && /\\btag\\b/.test(style) && stream.current() == \">\") {\n      // Script block: mode to change to depends on type attribute\n      var scriptType = stream.string.slice(Math.max(0, stream.pos - 100), stream.pos).match(/\\btype\\s*=\\s*(\"[^\"]+\"|'[^']+'|\\S+)[^<]*$/i);\n      scriptType = scriptType ? scriptType[1] : \"\";\n      if (scriptType && /[\\\"\\']/.test(scriptType.charAt(0))) scriptType = scriptType.slice(1, scriptType.length - 1);\n      for (var i = 0; i < scriptTypes.length; ++i) {\n        var tp = scriptTypes[i];\n        if (typeof tp.matches == \"string\" ? scriptType == tp.matches : tp.matches.test(scriptType)) {\n          if (tp.mode) {\n            state.token = script;\n            state.localMode = tp.mode;\n            state.localState = tp.mode.startState && tp.mode.startState(htmlMode.indent(state.htmlState, \"\"));\n          }\n          break;\n        }\n      }\n    } else if (tagName == \"style\" && /\\btag\\b/.test(style) && stream.current() == \">\") {\n      state.token = css;\n      state.localMode = cssMode;\n      state.localState = cssMode.startState(htmlMode.indent(state.htmlState, \"\"));\n    }\n    return style;\n  }\n  function maybeBackup(stream, pat, style) {\n    var cur = stream.current();\n    var close = cur.search(pat), m;\n    if (close > -1) stream.backUp(cur.length - close);\n    else if (m = cur.match(/<\\/?$/)) {\n      stream.backUp(cur.length);\n      if (!stream.match(pat, false)) stream.match(cur);\n    }\n    return style;\n  }\n  function script(stream, state) {\n    if (stream.match(/^<\\/\\s*script\\s*>/i, false)) {\n      state.token = html;\n      state.localState = state.localMode = null;\n      return null;\n    }\n    return maybeBackup(stream, /<\\/\\s*script\\s*>/,\n                       state.localMode.token(stream, state.localState));\n  }\n  function css(stream, state) {\n    if (stream.match(/^<\\/\\s*style\\s*>/i, false)) {\n      state.token = html;\n      state.localState = state.localMode = null;\n      return null;\n    }\n    return maybeBackup(stream, /<\\/\\s*style\\s*>/,\n                       cssMode.token(stream, state.localState));\n  }\n\n  return {\n    startState: function() {\n      var state = htmlMode.startState();\n      return {token: html, localMode: null, localState: null, htmlState: state};\n    },\n\n    copyState: function(state) {\n      if (state.localState)\n        var local = CodeMirror.copyState(state.localMode, state.localState);\n      return {token: state.token, localMode: state.localMode, localState: local,\n              htmlState: CodeMirror.copyState(htmlMode, state.htmlState)};\n    },\n\n    token: function(stream, state) {\n      return state.token(stream, state);\n    },\n\n    indent: function(state, textAfter) {\n      if (!state.localMode || /^\\s*<\\//.test(textAfter))\n        return htmlMode.indent(state.htmlState, textAfter);\n      else if (state.localMode.indent)\n        return state.localMode.indent(state.localState, textAfter);\n      else\n        return CodeMirror.Pass;\n    },\n\n    innerMode: function(state) {\n      return {state: state.localState || state.htmlState, mode: state.localMode || htmlMode};\n    }\n  };\n}, \"xml\", \"javascript\", \"css\");\n\nCodeMirror.defineMIME(\"text/html\", \"htmlmixed\");\n\n});\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/htmlmixed/index.html",
    "content": "<!doctype html>\n\n<title>CodeMirror: HTML mixed mode</title>\n<meta charset=\"utf-8\"/>\n<link rel=stylesheet href=\"../../doc/docs.css\">\n\n<link rel=\"stylesheet\" href=\"../../lib/codemirror.css\">\n<script src=\"../../lib/codemirror.js\"></script>\n<script src=\"../../addon/selection/selection-pointer.js\"></script>\n<script src=\"../xml/xml.js\"></script>\n<script src=\"../javascript/javascript.js\"></script>\n<script src=\"../css/css.js\"></script>\n<script src=\"../vbscript/vbscript.js\"></script>\n<script src=\"htmlmixed.js\"></script>\n<style>.CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}</style>\n<div id=nav>\n  <a href=\"http://codemirror.net\"><h1>CodeMirror</h1><img id=logo src=\"../../doc/logo.png\"></a>\n\n  <ul>\n    <li><a href=\"../../index.html\">Home</a>\n    <li><a href=\"../../doc/manual.html\">Manual</a>\n    <li><a href=\"https://github.com/codemirror/codemirror\">Code</a>\n  </ul>\n  <ul>\n    <li><a href=\"../index.html\">Language modes</a>\n    <li><a class=active href=\"#\">HTML mixed</a>\n  </ul>\n</div>\n\n<article>\n<h2>HTML mixed mode</h2>\n<form><textarea id=\"code\" name=\"code\">\n<html style=\"color: green\">\n  <!-- this is a comment -->\n  <head>\n    <title>Mixed HTML Example</title>\n    <style type=\"text/css\">\n      h1 {font-family: comic sans; color: #f0f;}\n      div {background: yellow !important;}\n      body {\n        max-width: 50em;\n        margin: 1em 2em 1em 5em;\n      }\n    </style>\n  </head>\n  <body>\n    <h1>Mixed HTML Example</h1>\n    <script>\n      function jsFunc(arg1, arg2) {\n        if (arg1 && arg2) document.body.innerHTML = \"achoo\";\n      }\n    </script>\n  </body>\n</html>\n</textarea></form>\n    <script>\n      // Define an extended mixed-mode that understands vbscript and\n      // leaves mustache/handlebars embedded templates in html mode\n      var mixedMode = {\n        name: \"htmlmixed\",\n        scriptTypes: [{matches: /\\/x-handlebars-template|\\/x-mustache/i,\n                       mode: null},\n                      {matches: /(text|application)\\/(x-)?vb(a|script)/i,\n                       mode: \"vbscript\"}]\n      };\n      var editor = CodeMirror.fromTextArea(document.getElementById(\"code\"), {\n        mode: mixedMode,\n        selectionPointer: true\n      });\n    </script>\n\n    <p>The HTML mixed mode depends on the XML, JavaScript, and CSS modes.</p>\n\n    <p>It takes an optional mode configuration\n    option, <code>scriptTypes</code>, which can be used to add custom\n    behavior for specific <code>&lt;script type=\"...\"></code> tags. If\n    given, it should hold an array of <code>{matches, mode}</code>\n    objects, where <code>matches</code> is a string or regexp that\n    matches the script type, and <code>mode</code> is\n    either <code>null</code>, for script types that should stay in\n    HTML mode, or a <a href=\"../../doc/manual.html#option_mode\">mode\n    spec</a> corresponding to the mode that should be used for the\n    script.</p>\n\n    <p><strong>MIME types defined:</strong> <code>text/html</code>\n    (redefined, only takes effect if you load this parser after the\n    XML parser).</p>\n\n  </article>\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/http/http.js",
    "content": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n(function(mod) {\n  if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n    mod(require(\"../../lib/codemirror\"));\n  else if (typeof define == \"function\" && define.amd) // AMD\n    define([\"../../lib/codemirror\"], mod);\n  else // Plain browser env\n    mod(CodeMirror);\n})(function(CodeMirror) {\n\"use strict\";\n\nCodeMirror.defineMode(\"http\", function() {\n  function failFirstLine(stream, state) {\n    stream.skipToEnd();\n    state.cur = header;\n    return \"error\";\n  }\n\n  function start(stream, state) {\n    if (stream.match(/^HTTP\\/\\d\\.\\d/)) {\n      state.cur = responseStatusCode;\n      return \"keyword\";\n    } else if (stream.match(/^[A-Z]+/) && /[ \\t]/.test(stream.peek())) {\n      state.cur = requestPath;\n      return \"keyword\";\n    } else {\n      return failFirstLine(stream, state);\n    }\n  }\n\n  function responseStatusCode(stream, state) {\n    var code = stream.match(/^\\d+/);\n    if (!code) return failFirstLine(stream, state);\n\n    state.cur = responseStatusText;\n    var status = Number(code[0]);\n    if (status >= 100 && status < 200) {\n      return \"positive informational\";\n    } else if (status >= 200 && status < 300) {\n      return \"positive success\";\n    } else if (status >= 300 && status < 400) {\n      return \"positive redirect\";\n    } else if (status >= 400 && status < 500) {\n      return \"negative client-error\";\n    } else if (status >= 500 && status < 600) {\n      return \"negative server-error\";\n    } else {\n      return \"error\";\n    }\n  }\n\n  function responseStatusText(stream, state) {\n    stream.skipToEnd();\n    state.cur = header;\n    return null;\n  }\n\n  function requestPath(stream, state) {\n    stream.eatWhile(/\\S/);\n    state.cur = requestProtocol;\n    return \"string-2\";\n  }\n\n  function requestProtocol(stream, state) {\n    if (stream.match(/^HTTP\\/\\d\\.\\d$/)) {\n      state.cur = header;\n      return \"keyword\";\n    } else {\n      return failFirstLine(stream, state);\n    }\n  }\n\n  function header(stream) {\n    if (stream.sol() && !stream.eat(/[ \\t]/)) {\n      if (stream.match(/^.*?:/)) {\n        return \"atom\";\n      } else {\n        stream.skipToEnd();\n        return \"error\";\n      }\n    } else {\n      stream.skipToEnd();\n      return \"string\";\n    }\n  }\n\n  function body(stream) {\n    stream.skipToEnd();\n    return null;\n  }\n\n  return {\n    token: function(stream, state) {\n      var cur = state.cur;\n      if (cur != header && cur != body && stream.eatSpace()) return null;\n      return cur(stream, state);\n    },\n\n    blankLine: function(state) {\n      state.cur = body;\n    },\n\n    startState: function() {\n      return {cur: start};\n    }\n  };\n});\n\nCodeMirror.defineMIME(\"message/http\", \"http\");\n\n});\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/http/index.html",
    "content": "<!doctype html>\n\n<title>CodeMirror: HTTP mode</title>\n<meta charset=\"utf-8\"/>\n<link rel=stylesheet href=\"../../doc/docs.css\">\n\n<link rel=\"stylesheet\" href=\"../../lib/codemirror.css\">\n<script src=\"../../lib/codemirror.js\"></script>\n<script src=\"http.js\"></script>\n<style type=\"text/css\">.CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}</style>\n<div id=nav>\n  <a href=\"http://codemirror.net\"><h1>CodeMirror</h1><img id=logo src=\"../../doc/logo.png\"></a>\n\n  <ul>\n    <li><a href=\"../../index.html\">Home</a>\n    <li><a href=\"../../doc/manual.html\">Manual</a>\n    <li><a href=\"https://github.com/codemirror/codemirror\">Code</a>\n  </ul>\n  <ul>\n    <li><a href=\"../index.html\">Language modes</a>\n    <li><a class=active href=\"#\">HTTP</a>\n  </ul>\n</div>\n\n<article>\n<h2>HTTP mode</h2>\n\n\n<div><textarea id=\"code\" name=\"code\">\nPOST /somewhere HTTP/1.1\nHost: example.com\nIf-Modified-Since: Sat, 29 Oct 1994 19:43:31 GMT\nContent-Type: application/x-www-form-urlencoded;\n\tcharset=utf-8\nUser-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/536.11 (KHTML, like Gecko) Ubuntu/12.04 Chromium/20.0.1132.47 Chrome/20.0.1132.47 Safari/536.11\n\nThis is the request body!\n</textarea></div>\n\n    <script>\n      var editor = CodeMirror.fromTextArea(document.getElementById(\"code\"), {});\n    </script>\n\n    <p><strong>MIME types defined:</strong> <code>message/http</code>.</p>\n  </article>\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/idl/idl.js",
    "content": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n(function(mod) {\n  if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n    mod(require(\"../../lib/codemirror\"));\n  else if (typeof define == \"function\" && define.amd) // AMD\n    define([\"../../lib/codemirror\"], mod);\n  else // Plain browser env\n    mod(CodeMirror);\n})(function(CodeMirror) {\n  \"use strict\";\n\n  function wordRegexp(words) {\n    return new RegExp('^((' + words.join(')|(') + '))\\\\b', 'i');\n  };\n\n  var builtinArray = [\n    'a_correlate', 'abs', 'acos', 'adapt_hist_equal', 'alog',\n    'alog2', 'alog10', 'amoeba', 'annotate', 'app_user_dir',\n    'app_user_dir_query', 'arg_present', 'array_equal', 'array_indices',\n    'arrow', 'ascii_template', 'asin', 'assoc', 'atan',\n    'axis', 'axis', 'bandpass_filter', 'bandreject_filter', 'barplot',\n    'bar_plot', 'beseli', 'beselj', 'beselk', 'besely',\n    'beta', 'biginteger', 'bilinear', 'bin_date', 'binary_template',\n    'bindgen', 'binomial', 'bit_ffs', 'bit_population', 'blas_axpy',\n    'blk_con', 'boolarr', 'boolean', 'boxplot', 'box_cursor',\n    'breakpoint', 'broyden', 'bubbleplot', 'butterworth', 'bytarr',\n    'byte', 'byteorder', 'bytscl', 'c_correlate', 'calendar',\n    'caldat', 'call_external', 'call_function', 'call_method',\n    'call_procedure', 'canny', 'catch', 'cd', 'cdf', 'ceil',\n    'chebyshev', 'check_math', 'chisqr_cvf', 'chisqr_pdf', 'choldc',\n    'cholsol', 'cindgen', 'cir_3pnt', 'clipboard', 'close',\n    'clust_wts', 'cluster', 'cluster_tree', 'cmyk_convert', 'code_coverage',\n    'color_convert', 'color_exchange', 'color_quan', 'color_range_map',\n    'colorbar', 'colorize_sample', 'colormap_applicable',\n    'colormap_gradient', 'colormap_rotation', 'colortable',\n    'comfit', 'command_line_args', 'common', 'compile_opt', 'complex',\n    'complexarr', 'complexround', 'compute_mesh_normals', 'cond', 'congrid',\n    'conj', 'constrained_min', 'contour', 'contour', 'convert_coord',\n    'convol', 'convol_fft', 'coord2to3', 'copy_lun', 'correlate',\n    'cos', 'cosh', 'cpu', 'cramer', 'createboxplotdata',\n    'create_cursor', 'create_struct', 'create_view', 'crossp', 'crvlength',\n    'ct_luminance', 'cti_test', 'cursor', 'curvefit', 'cv_coord',\n    'cvttobm', 'cw_animate', 'cw_animate_getp', 'cw_animate_load',\n    'cw_animate_run', 'cw_arcball', 'cw_bgroup', 'cw_clr_index',\n    'cw_colorsel', 'cw_defroi', 'cw_field', 'cw_filesel', 'cw_form',\n    'cw_fslider', 'cw_light_editor', 'cw_light_editor_get',\n    'cw_light_editor_set', 'cw_orient', 'cw_palette_editor',\n    'cw_palette_editor_get', 'cw_palette_editor_set', 'cw_pdmenu',\n    'cw_rgbslider', 'cw_tmpl', 'cw_zoom', 'db_exists',\n    'dblarr', 'dcindgen', 'dcomplex', 'dcomplexarr', 'define_key',\n    'define_msgblk', 'define_msgblk_from_file', 'defroi', 'defsysv',\n    'delvar', 'dendro_plot', 'dendrogram', 'deriv', 'derivsig',\n    'determ', 'device', 'dfpmin', 'diag_matrix', 'dialog_dbconnect',\n    'dialog_message', 'dialog_pickfile', 'dialog_printersetup',\n    'dialog_printjob', 'dialog_read_image',\n    'dialog_write_image', 'dictionary', 'digital_filter', 'dilate', 'dindgen',\n    'dissolve', 'dist', 'distance_measure', 'dlm_load', 'dlm_register',\n    'doc_library', 'double', 'draw_roi', 'edge_dog', 'efont',\n    'eigenql', 'eigenvec', 'ellipse', 'elmhes', 'emboss',\n    'empty', 'enable_sysrtn', 'eof', 'eos', 'erase',\n    'erf', 'erfc', 'erfcx', 'erode', 'errorplot',\n    'errplot', 'estimator_filter', 'execute', 'exit', 'exp',\n    'expand', 'expand_path', 'expint', 'extrac', 'extract_slice',\n    'f_cvf', 'f_pdf', 'factorial', 'fft', 'file_basename',\n    'file_chmod', 'file_copy', 'file_delete', 'file_dirname',\n    'file_expand_path', 'file_gunzip', 'file_gzip', 'file_info',\n    'file_lines', 'file_link', 'file_mkdir', 'file_move',\n    'file_poll_input', 'file_readlink', 'file_same',\n    'file_search', 'file_tar', 'file_test', 'file_untar', 'file_unzip',\n    'file_which', 'file_zip', 'filepath', 'findgen', 'finite',\n    'fix', 'flick', 'float', 'floor', 'flow3',\n    'fltarr', 'flush', 'format_axis_values', 'forward_function', 'free_lun',\n    'fstat', 'fulstr', 'funct', 'function', 'fv_test',\n    'fx_root', 'fz_roots', 'gamma', 'gamma_ct', 'gauss_cvf',\n    'gauss_pdf', 'gauss_smooth', 'gauss2dfit', 'gaussfit',\n    'gaussian_function', 'gaussint', 'get_drive_list', 'get_dxf_objects',\n    'get_kbrd', 'get_login_info',\n    'get_lun', 'get_screen_size', 'getenv', 'getwindows', 'greg2jul',\n    'grib', 'grid_input', 'grid_tps', 'grid3', 'griddata',\n    'gs_iter', 'h_eq_ct', 'h_eq_int', 'hanning', 'hash',\n    'hdf', 'hdf5', 'heap_free', 'heap_gc', 'heap_nosave',\n    'heap_refcount', 'heap_save', 'help', 'hilbert', 'hist_2d',\n    'hist_equal', 'histogram', 'hls', 'hough', 'hqr',\n    'hsv', 'i18n_multibytetoutf8',\n    'i18n_multibytetowidechar', 'i18n_utf8tomultibyte',\n    'i18n_widechartomultibyte',\n    'ibeta', 'icontour', 'iconvertcoord', 'idelete', 'identity',\n    'idl_base64', 'idl_container', 'idl_validname',\n    'idlexbr_assistant', 'idlitsys_createtool',\n    'idlunit', 'iellipse', 'igamma', 'igetcurrent', 'igetdata',\n    'igetid', 'igetproperty', 'iimage', 'image', 'image_cont',\n    'image_statistics', 'image_threshold', 'imaginary', 'imap', 'indgen',\n    'int_2d', 'int_3d', 'int_tabulated', 'intarr', 'interpol',\n    'interpolate', 'interval_volume', 'invert', 'ioctl', 'iopen',\n    'ir_filter', 'iplot', 'ipolygon', 'ipolyline', 'iputdata',\n    'iregister', 'ireset', 'iresolve', 'irotate', 'isa',\n    'isave', 'iscale', 'isetcurrent', 'isetproperty', 'ishft',\n    'isocontour', 'isosurface', 'isurface', 'itext', 'itranslate',\n    'ivector', 'ivolume', 'izoom', 'journal', 'json_parse',\n    'json_serialize', 'jul2greg', 'julday', 'keyword_set', 'krig2d',\n    'kurtosis', 'kw_test', 'l64indgen', 'la_choldc', 'la_cholmprove',\n    'la_cholsol', 'la_determ', 'la_eigenproblem', 'la_eigenql', 'la_eigenvec',\n    'la_elmhes', 'la_gm_linear_model', 'la_hqr', 'la_invert',\n    'la_least_square_equality', 'la_least_squares', 'la_linear_equation',\n    'la_ludc', 'la_lumprove', 'la_lusol',\n    'la_svd', 'la_tridc', 'la_trimprove', 'la_triql', 'la_trired',\n    'la_trisol', 'label_date', 'label_region', 'ladfit', 'laguerre',\n    'lambda', 'lambdap', 'lambertw', 'laplacian', 'least_squares_filter',\n    'leefilt', 'legend', 'legendre', 'linbcg', 'lindgen',\n    'linfit', 'linkimage', 'list', 'll_arc_distance', 'lmfit',\n    'lmgr', 'lngamma', 'lnp_test', 'loadct', 'locale_get',\n    'logical_and', 'logical_or', 'logical_true', 'lon64arr', 'lonarr',\n    'long', 'long64', 'lsode', 'lu_complex', 'ludc',\n    'lumprove', 'lusol', 'm_correlate', 'machar', 'make_array',\n    'make_dll', 'make_rt', 'map', 'mapcontinents', 'mapgrid',\n    'map_2points', 'map_continents', 'map_grid', 'map_image', 'map_patch',\n    'map_proj_forward', 'map_proj_image', 'map_proj_info',\n    'map_proj_init', 'map_proj_inverse',\n    'map_set', 'matrix_multiply', 'matrix_power', 'max', 'md_test',\n    'mean', 'meanabsdev', 'mean_filter', 'median', 'memory',\n    'mesh_clip', 'mesh_decimate', 'mesh_issolid',\n    'mesh_merge', 'mesh_numtriangles',\n    'mesh_obj', 'mesh_smooth', 'mesh_surfacearea',\n    'mesh_validate', 'mesh_volume',\n    'message', 'min', 'min_curve_surf', 'mk_html_help', 'modifyct',\n    'moment', 'morph_close', 'morph_distance',\n    'morph_gradient', 'morph_hitormiss',\n    'morph_open', 'morph_thin', 'morph_tophat', 'multi', 'n_elements',\n    'n_params', 'n_tags', 'ncdf', 'newton', 'noise_hurl',\n    'noise_pick', 'noise_scatter', 'noise_slur', 'norm', 'obj_class',\n    'obj_destroy', 'obj_hasmethod', 'obj_isa', 'obj_new', 'obj_valid',\n    'objarr', 'on_error', 'on_ioerror', 'online_help', 'openr',\n    'openu', 'openw', 'oplot', 'oploterr', 'orderedhash',\n    'p_correlate', 'parse_url', 'particle_trace', 'path_cache', 'path_sep',\n    'pcomp', 'plot', 'plot3d', 'plot', 'plot_3dbox',\n    'plot_field', 'ploterr', 'plots', 'polar_contour', 'polar_surface',\n    'polyfill', 'polyshade', 'pnt_line', 'point_lun', 'polarplot',\n    'poly', 'poly_2d', 'poly_area', 'poly_fit', 'polyfillv',\n    'polygon', 'polyline', 'polywarp', 'popd', 'powell',\n    'pref_commit', 'pref_get', 'pref_set', 'prewitt', 'primes',\n    'print', 'printf', 'printd', 'pro', 'product',\n    'profile', 'profiler', 'profiles', 'project_vol', 'ps_show_fonts',\n    'psafm', 'pseudo', 'ptr_free', 'ptr_new', 'ptr_valid',\n    'ptrarr', 'pushd', 'qgrid3', 'qhull', 'qromb',\n    'qromo', 'qsimp', 'query_*', 'query_ascii', 'query_bmp',\n    'query_csv', 'query_dicom', 'query_gif', 'query_image', 'query_jpeg',\n    'query_jpeg2000', 'query_mrsid', 'query_pict', 'query_png', 'query_ppm',\n    'query_srf', 'query_tiff', 'query_video', 'query_wav', 'r_correlate',\n    'r_test', 'radon', 'randomn', 'randomu', 'ranks',\n    'rdpix', 'read', 'readf', 'read_ascii', 'read_binary',\n    'read_bmp', 'read_csv', 'read_dicom', 'read_gif', 'read_image',\n    'read_interfile', 'read_jpeg', 'read_jpeg2000', 'read_mrsid', 'read_pict',\n    'read_png', 'read_ppm', 'read_spr', 'read_srf', 'read_sylk',\n    'read_tiff', 'read_video', 'read_wav', 'read_wave', 'read_x11_bitmap',\n    'read_xwd', 'reads', 'readu', 'real_part', 'rebin',\n    'recall_commands', 'recon3', 'reduce_colors', 'reform', 'region_grow',\n    'register_cursor', 'regress', 'replicate',\n    'replicate_inplace', 'resolve_all',\n    'resolve_routine', 'restore', 'retall', 'return', 'reverse',\n    'rk4', 'roberts', 'rot', 'rotate', 'round',\n    'routine_filepath', 'routine_info', 'rs_test', 's_test', 'save',\n    'savgol', 'scale3', 'scale3d', 'scatterplot', 'scatterplot3d',\n    'scope_level', 'scope_traceback', 'scope_varfetch',\n    'scope_varname', 'search2d',\n    'search3d', 'sem_create', 'sem_delete', 'sem_lock', 'sem_release',\n    'set_plot', 'set_shading', 'setenv', 'sfit', 'shade_surf',\n    'shade_surf_irr', 'shade_volume', 'shift', 'shift_diff', 'shmdebug',\n    'shmmap', 'shmunmap', 'shmvar', 'show3', 'showfont',\n    'signum', 'simplex', 'sin', 'sindgen', 'sinh',\n    'size', 'skewness', 'skip_lun', 'slicer3', 'slide_image',\n    'smooth', 'sobel', 'socket', 'sort', 'spawn',\n    'sph_4pnt', 'sph_scat', 'spher_harm', 'spl_init', 'spl_interp',\n    'spline', 'spline_p', 'sprsab', 'sprsax', 'sprsin',\n    'sprstp', 'sqrt', 'standardize', 'stddev', 'stop',\n    'strarr', 'strcmp', 'strcompress', 'streamline', 'streamline',\n    'stregex', 'stretch', 'string', 'strjoin', 'strlen',\n    'strlowcase', 'strmatch', 'strmessage', 'strmid', 'strpos',\n    'strput', 'strsplit', 'strtrim', 'struct_assign', 'struct_hide',\n    'strupcase', 'surface', 'surface', 'surfr', 'svdc',\n    'svdfit', 'svsol', 'swap_endian', 'swap_endian_inplace', 'symbol',\n    'systime', 't_cvf', 't_pdf', 't3d', 'tag_names',\n    'tan', 'tanh', 'tek_color', 'temporary', 'terminal_size',\n    'tetra_clip', 'tetra_surface', 'tetra_volume', 'text', 'thin',\n    'thread', 'threed', 'tic', 'time_test2', 'timegen',\n    'timer', 'timestamp', 'timestamptovalues', 'tm_test', 'toc',\n    'total', 'trace', 'transpose', 'tri_surf', 'triangulate',\n    'trigrid', 'triql', 'trired', 'trisol', 'truncate_lun',\n    'ts_coef', 'ts_diff', 'ts_fcast', 'ts_smooth', 'tv',\n    'tvcrs', 'tvlct', 'tvrd', 'tvscl', 'typename',\n    'uindgen', 'uint', 'uintarr', 'ul64indgen', 'ulindgen',\n    'ulon64arr', 'ulonarr', 'ulong', 'ulong64', 'uniq',\n    'unsharp_mask', 'usersym', 'value_locate', 'variance', 'vector',\n    'vector_field', 'vel', 'velovect', 'vert_t3d', 'voigt',\n    'volume', 'voronoi', 'voxel_proj', 'wait', 'warp_tri',\n    'watershed', 'wdelete', 'wf_draw', 'where', 'widget_base',\n    'widget_button', 'widget_combobox', 'widget_control',\n    'widget_displaycontextmenu', 'widget_draw',\n    'widget_droplist', 'widget_event', 'widget_info',\n    'widget_label', 'widget_list',\n    'widget_propertysheet', 'widget_slider', 'widget_tab',\n    'widget_table', 'widget_text',\n    'widget_tree', 'widget_tree_move', 'widget_window',\n    'wiener_filter', 'window',\n    'window', 'write_bmp', 'write_csv', 'write_gif', 'write_image',\n    'write_jpeg', 'write_jpeg2000', 'write_nrif', 'write_pict', 'write_png',\n    'write_ppm', 'write_spr', 'write_srf', 'write_sylk', 'write_tiff',\n    'write_video', 'write_wav', 'write_wave', 'writeu', 'wset',\n    'wshow', 'wtn', 'wv_applet', 'wv_cwt', 'wv_cw_wavelet',\n    'wv_denoise', 'wv_dwt', 'wv_fn_coiflet',\n    'wv_fn_daubechies', 'wv_fn_gaussian',\n    'wv_fn_haar', 'wv_fn_morlet', 'wv_fn_paul',\n    'wv_fn_symlet', 'wv_import_data',\n    'wv_import_wavelet', 'wv_plot3d_wps', 'wv_plot_multires',\n    'wv_pwt', 'wv_tool_denoise',\n    'xbm_edit', 'xdisplayfile', 'xdxf', 'xfont', 'xinteranimate',\n    'xloadct', 'xmanager', 'xmng_tmpl', 'xmtool', 'xobjview',\n    'xobjview_rotate', 'xobjview_write_image',\n    'xpalette', 'xpcolor', 'xplot3d',\n    'xregistered', 'xroi', 'xsq_test', 'xsurface', 'xvaredit',\n    'xvolume', 'xvolume_rotate', 'xvolume_write_image',\n    'xyouts', 'zlib_compress', 'zlib_uncompress', 'zoom', 'zoom_24'\n  ];\n  var builtins = wordRegexp(builtinArray);\n\n  var keywordArray = [\n    'begin', 'end', 'endcase', 'endfor',\n    'endwhile', 'endif', 'endrep', 'endforeach',\n    'break', 'case', 'continue', 'for',\n    'foreach', 'goto', 'if', 'then', 'else',\n    'repeat', 'until', 'switch', 'while',\n    'do', 'pro', 'function'\n  ];\n  var keywords = wordRegexp(keywordArray);\n\n  CodeMirror.registerHelper(\"hintWords\", \"idl\", builtinArray.concat(keywordArray));\n\n  var identifiers = new RegExp('^[_a-z\\xa1-\\uffff][_a-z0-9\\xa1-\\uffff]*', 'i');\n\n  var singleOperators = /[+\\-*&=<>\\/@#~$]/;\n  var boolOperators = new RegExp('(and|or|eq|lt|le|gt|ge|ne|not)', 'i');\n\n  function tokenBase(stream) {\n    // whitespaces\n    if (stream.eatSpace()) return null;\n\n    // Handle one line Comments\n    if (stream.match(';')) {\n      stream.skipToEnd();\n      return 'comment';\n    }\n\n    // Handle Number Literals\n    if (stream.match(/^[0-9\\.+-]/, false)) {\n      if (stream.match(/^[+-]?0x[0-9a-fA-F]+/))\n        return 'number';\n      if (stream.match(/^[+-]?\\d*\\.\\d+([EeDd][+-]?\\d+)?/))\n        return 'number';\n      if (stream.match(/^[+-]?\\d+([EeDd][+-]?\\d+)?/))\n        return 'number';\n    }\n\n    // Handle Strings\n    if (stream.match(/^\"([^\"]|(\"\"))*\"/)) { return 'string'; }\n    if (stream.match(/^'([^']|(''))*'/)) { return 'string'; }\n\n    // Handle words\n    if (stream.match(keywords)) { return 'keyword'; }\n    if (stream.match(builtins)) { return 'builtin'; }\n    if (stream.match(identifiers)) { return 'variable'; }\n\n    if (stream.match(singleOperators) || stream.match(boolOperators)) {\n      return 'operator'; }\n\n    // Handle non-detected items\n    stream.next();\n    return null;\n  };\n\n  CodeMirror.defineMode('idl', function() {\n    return {\n      token: function(stream) {\n        return tokenBase(stream);\n      }\n    };\n  });\n\n  CodeMirror.defineMIME('text/x-idl', 'idl');\n});\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/idl/index.html",
    "content": "<!doctype html>\n\n<title>CodeMirror: IDL mode</title>\n<meta charset=\"utf-8\"/>\n<link rel=stylesheet href=\"../../doc/docs.css\">\n\n<link rel=\"stylesheet\" href=\"../../lib/codemirror.css\">\n<script src=\"../../lib/codemirror.js\"></script>\n<script src=\"idl.js\"></script>\n<style type=\"text/css\">.CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}</style>\n<div id=nav>\n  <a href=\"http://codemirror.net\"><h1>CodeMirror</h1><img id=logo src=\"../../doc/logo.png\"></a>\n\n  <ul>\n    <li><a href=\"../../index.html\">Home</a>\n    <li><a href=\"../../doc/manual.html\">Manual</a>\n    <li><a href=\"https://github.com/codemirror/codemirror\">Code</a>\n  </ul>\n  <ul>\n    <li><a href=\"../index.html\">Language modes</a>\n    <li><a class=active href=\"#\">IDL</a>\n  </ul>\n</div>\n\n<article>\n<h2>IDL mode</h2>\n\n    <div><textarea id=\"code\" name=\"code\">\n;; Example IDL code\nFUNCTION mean_and_stddev,array\n  ;; This program reads in an array of numbers\n  ;; and returns a structure containing the\n  ;; average and standard deviation\n\n  ave = 0.0\n  count = 0.0\n\n  for i=0,N_ELEMENTS(array)-1 do begin\n      ave = ave + array[i]\n      count = count + 1\n  endfor\n  \n  ave = ave/count\n\n  std = stddev(array)  \n\n  return, {average:ave,std:std}\n\nEND\n\n    </textarea></div>\n    <script>\n      var editor = CodeMirror.fromTextArea(document.getElementById(\"code\"), {\n        mode: {name: \"idl\",\n               version: 1,\n               singleLineStringErrors: false},\n        lineNumbers: true,\n        indentUnit: 4,\n        matchBrackets: true\n      });\n    </script>\n\n    <p><strong>MIME types defined:</strong> <code>text/x-idl</code>.</p>\n</article>\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/index.html",
    "content": "<!doctype html>\n\n<title>CodeMirror: Language Modes</title>\n<meta charset=\"utf-8\"/>\n<link rel=stylesheet href=\"../doc/docs.css\">\n\n<div id=nav>\n  <a href=\"http://codemirror.net\"><h1>CodeMirror</h1><img id=logo src=\"../doc/logo.png\"></a>\n\n  <ul>\n    <li><a href=\"../index.html\">Home</a>\n    <li><a href=\"../doc/manual.html\">Manual</a>\n    <li><a href=\"https://github.com/codemirror/codemirror\">Code</a>\n  </ul>\n  <ul>\n    <li><a class=active href=\"#\">Language modes</a>\n  </ul>\n</div>\n\n<article>\n\n  <h2>Language modes</h2>\n\n  <p>This is a list of every mode in the distribution. Each mode lives\nin a subdirectory of the <code>mode/</code> directory, and typically\ndefines a single JavaScript file that implements the mode. Loading\nsuch file will make the language available to CodeMirror, through\nthe <a href=\"../doc/manual.html#option_mode\"><code>mode</code></a>\noption.</p>\n\n  <div style=\"-webkit-columns: 100px 2; -moz-columns: 100px 2; columns: 100px 2;\">\n    <ul style=\"margin-top: 0\">\n      <li><a href=\"apl/index.html\">APL</a></li>\n      <li><a href=\"asterisk/index.html\">Asterisk dialplan</a></li>\n      <li><a href=\"clike/index.html\">C, C++, C#</a></li>\n      <li><a href=\"clojure/index.html\">Clojure</a></li>\n      <li><a href=\"cobol/index.html\">COBOL</a></li>\n      <li><a href=\"coffeescript/index.html\">CoffeeScript</a></li>\n      <li><a href=\"commonlisp/index.html\">Common Lisp</a></li>\n      <li><a href=\"css/index.html\">CSS</a></li>\n      <li><a href=\"cypher/index.html\">Cypher</a></li>\n      <li><a href=\"python/index.html\">Cython</a></li>\n      <li><a href=\"d/index.html\">D</a></li>\n      <li><a href=\"dart/index.html\">Dart</a></li>\n      <li><a href=\"django/index.html\">Django</a> (templating language)</li>\n      <li><a href=\"dockerfile/index.html\">Dockerfile</a></li>\n      <li><a href=\"diff/index.html\">diff</a></li>\n      <li><a href=\"dtd/index.html\">DTD</a></li>\n      <li><a href=\"dylan/index.html\">Dylan</a></li>\n      <li><a href=\"ebnf/index.html\">EBNF</a></li>\n      <li><a href=\"ecl/index.html\">ECL</a></li>\n      <li><a href=\"eiffel/index.html\">Eiffel</a></li>\n      <li><a href=\"erlang/index.html\">Erlang</a></li>\n      <li><a href=\"forth/index.html\">Forth</a></li>\n      <li><a href=\"fortran/index.html\">Fortran</a></li>\n      <li><a href=\"mllike/index.html\">F#</a></li>\n      <li><a href=\"gas/index.html\">Gas</a> (AT&amp;T-style assembly)</li>\n      <li><a href=\"gherkin/index.html\">Gherkin</a></li>\n      <li><a href=\"go/index.html\">Go</a></li>\n      <li><a href=\"groovy/index.html\">Groovy</a></li>\n      <li><a href=\"haml/index.html\">HAML</a></li>\n      <li><a href=\"haskell/index.html\">Haskell</a></li>\n      <li><a href=\"haxe/index.html\">Haxe</a></li>\n      <li><a href=\"htmlembedded/index.html\">HTML embedded scripts</a></li>\n      <li><a href=\"htmlmixed/index.html\">HTML mixed-mode</a></li>\n      <li><a href=\"http/index.html\">HTTP</a></li>\n      <li><a href=\"idl/index.html\">IDL</a></li>\n      <li><a href=\"clike/index.html\">Java</a></li>\n      <li><a href=\"jade/index.html\">Jade</a></li>\n      <li><a href=\"javascript/index.html\">JavaScript</a></li>\n      <li><a href=\"jinja2/index.html\">Jinja2</a></li>\n      <li><a href=\"julia/index.html\">Julia</a></li>\n      <li><a href=\"kotlin/index.html\">Kotlin</a></li>\n      <li><a href=\"css/less.html\">LESS</a></li>\n      <li><a href=\"livescript/index.html\">LiveScript</a></li>\n      <li><a href=\"lua/index.html\">Lua</a></li>\n      <li><a href=\"markdown/index.html\">Markdown</a> (<a href=\"gfm/index.html\">GitHub-flavour</a>)</li>\n      <li><a href=\"mirc/index.html\">mIRC</a></li>\n      <li><a href=\"modelica/index.html\">Modelica</a></li>\n      <li><a href=\"nginx/index.html\">Nginx</a></li>\n      <li><a href=\"ntriples/index.html\">NTriples</a></li>\n      <li><a href=\"clike/index.html\">Objective C</a></li>\n      <li><a href=\"mllike/index.html\">OCaml</a></li>\n      <li><a href=\"octave/index.html\">Octave</a> (MATLAB)</li>\n      <li><a href=\"pascal/index.html\">Pascal</a></li>\n      <li><a href=\"pegjs/index.html\">PEG.js</a></li>\n      <li><a href=\"perl/index.html\">Perl</a></li>\n      <li><a href=\"php/index.html\">PHP</a></li>\n      <li><a href=\"pig/index.html\">Pig Latin</a></li>\n      <li><a href=\"properties/index.html\">Properties files</a></li>\n      <li><a href=\"puppet/index.html\">Puppet</a></li>\n      <li><a href=\"python/index.html\">Python</a></li>\n      <li><a href=\"q/index.html\">Q</a></li>\n      <li><a href=\"r/index.html\">R</a></li>\n      <li><a href=\"rpm/index.html\">RPM</a></li>\n      <li><a href=\"rst/index.html\">reStructuredText</a></li>\n      <li><a href=\"ruby/index.html\">Ruby</a></li>\n      <li><a href=\"rust/index.html\">Rust</a></li>\n      <li><a href=\"sass/index.html\">Sass</a></li>\n      <li><a href=\"spreadsheet/index.html\">Spreadsheet</a></li>\n      <li><a href=\"clike/scala.html\">Scala</a></li>\n      <li><a href=\"scheme/index.html\">Scheme</a></li>\n      <li><a href=\"css/scss.html\">SCSS</a></li>\n      <li><a href=\"shell/index.html\">Shell</a></li>\n      <li><a href=\"sieve/index.html\">Sieve</a></li>\n      <li><a href=\"slim/index.html\">Slim</a></li>\n      <li><a href=\"smalltalk/index.html\">Smalltalk</a></li>\n      <li><a href=\"smarty/index.html\">Smarty</a></li>\n      <li><a href=\"smartymixed/index.html\">Smarty/HTML mixed</a></li>\n      <li><a href=\"solr/index.html\">Solr</a></li>\n      <li><a href=\"soy/index.html\">Soy</a></li>\n      <li><a href=\"stylus/index.html\">Stylus</a></li>\n      <li><a href=\"sql/index.html\">SQL</a> (several dialects)</li>\n      <li><a href=\"sparql/index.html\">SPARQL</a></li>\n      <li><a href=\"stex/index.html\">sTeX, LaTeX</a></li>\n      <li><a href=\"tcl/index.html\">Tcl</a></li>\n      <li><a href=\"textile/index.html\">Textile</a></li>\n      <li><a href=\"tiddlywiki/index.html\">Tiddlywiki</a></li>\n      <li><a href=\"tiki/index.html\">Tiki wiki</a></li>\n      <li><a href=\"toml/index.html\">TOML</a></li>\n      <li><a href=\"tornado/index.html\">Tornado</a> (templating language)</li>\n      <li><a href=\"turtle/index.html\">Turtle</a></li>\n      <li><a href=\"vb/index.html\">VB.NET</a></li>\n      <li><a href=\"vbscript/index.html\">VBScript</a></li>\n      <li><a href=\"velocity/index.html\">Velocity</a></li>\n      <li><a href=\"verilog/index.html\">Verilog/SystemVerilog</a></li>\n      <li><a href=\"xml/index.html\">XML/HTML</a></li>\n      <li><a href=\"xquery/index.html\">XQuery</a></li>\n      <li><a href=\"yaml/index.html\">YAML</a></li>\n      <li><a href=\"z80/index.html\">Z80</a></li>\n    </ul>\n  </div>\n\n</article>\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/jade/index.html",
    "content": "<!doctype html>\n\n<title>CodeMirror: Jade Templating Mode</title>\n<meta charset=\"utf-8\"/>\n<link rel=stylesheet href=\"../../doc/docs.css\">\n\n<link rel=\"stylesheet\" href=\"../../lib/codemirror.css\">\n<script src=\"../../lib/codemirror.js\"></script>\n<script src=\"../javascript/javascript.js\"></script>\n<script src=\"../css/css.js\"></script>\n<script src=\"../xml/xml.js\"></script>\n<script src=\"../htmlmixed/htmlmixed.js\"></script>\n<script src=\"jade.js\"></script>\n<style type=\"text/css\">.CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}</style>\n<div id=nav>\n  <a href=\"http://codemirror.net\"><h1>CodeMirror</h1><img id=logo src=\"../../doc/logo.png\"></a>\n\n  <ul>\n    <li><a href=\"../../index.html\">Home</a>\n    <li><a href=\"../../doc/manual.html\">Manual</a>\n    <li><a href=\"https://github.com/codemirror/codemirror\">Code</a>\n  </ul>\n  <ul>\n    <li><a href=\"../index.html\">Language modes</a>\n    <li><a class=active href=\"#\">Jade Templating Mode</a>\n  </ul>\n</div>\n\n<article>\n<h2>Jade Templating Mode</h2>\n<form><textarea id=\"code\" name=\"code\">\ndoctype html\n  html\n    head\n      title= \"Jade Templating CodeMirror Mode Example\"\n      link(rel='stylesheet', href='/css/bootstrap.min.css')\n      link(rel='stylesheet', href='/css/index.css')\n      script(type='text/javascript', src='/js/jquery-1.9.1.min.js')\n      script(type='text/javascript', src='/js/bootstrap.min.js')\n    body\n      div.header\n        h1 Welcome to this Example\n      div.spots\n        if locals.spots\n          each spot in spots\n            div.spot.well\n         div\n           if spot.logo\n             img.img-rounded.logo(src=spot.logo)\n           else\n             img.img-rounded.logo(src=\"img/placeholder.png\")\n         h3\n           a(href=spot.hash) ##{spot.hash}\n           if spot.title\n             span.title #{spot.title}\n           if spot.desc\n             div #{spot.desc}\n        else\n          h3 There are no spots currently available.\n</textarea></form>\n    <script>\n      var editor = CodeMirror.fromTextArea(document.getElementById(\"code\"), {\n        mode: {name: \"jade\", alignCDATA: true},\n        lineNumbers: true\n      });\n    </script>\n    <h3>The Jade Templating Mode</h3>\n      <p> Created by Forbes Lindesay. Managed as part of a Brackets extension at <a href=\"https://github.com/ForbesLindesay/jade-brackets\">https://github.com/ForbesLindesay/jade-brackets</a>.</p>\n    <p><strong>MIME type defined:</strong> <code>text/x-jade</code>.</p>\n  </article>\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/jade/jade.js",
    "content": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n(function(mod) {\n  if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n    mod(require(\"../../lib/codemirror\"), require(\"../javascript/javascript\"), require(\"../css/css\"), require(\"../htmlmixed/htmlmixed\"));\n  else if (typeof define == \"function\" && define.amd) // AMD\n    define([\"../../lib/codemirror\", \"../javascript/javascript\", \"../css/css\", \"../htmlmixed/htmlmixed\"], mod);\n  else // Plain browser env\n    mod(CodeMirror);\n})(function(CodeMirror) {\n\"use strict\";\n\nCodeMirror.defineMode('jade', function (config) {\n  // token types\n  var KEYWORD = 'keyword';\n  var DOCTYPE = 'meta';\n  var ID = 'builtin';\n  var CLASS = 'qualifier';\n\n  var ATTRS_NEST = {\n    '{': '}',\n    '(': ')',\n    '[': ']'\n  };\n\n  var jsMode = CodeMirror.getMode(config, 'javascript');\n\n  function State() {\n    this.javaScriptLine = false;\n    this.javaScriptLineExcludesColon = false;\n\n    this.javaScriptArguments = false;\n    this.javaScriptArgumentsDepth = 0;\n\n    this.isInterpolating = false;\n    this.interpolationNesting = 0;\n\n    this.jsState = jsMode.startState();\n\n    this.restOfLine = '';\n\n    this.isIncludeFiltered = false;\n    this.isEach = false;\n\n    this.lastTag = '';\n    this.scriptType = '';\n\n    // Attributes Mode\n    this.isAttrs = false;\n    this.attrsNest = [];\n    this.inAttributeName = true;\n    this.attributeIsType = false;\n    this.attrValue = '';\n\n    // Indented Mode\n    this.indentOf = Infinity;\n    this.indentToken = '';\n\n    this.innerMode = null;\n    this.innerState = null;\n\n    this.innerModeForLine = false;\n  }\n  /**\n   * Safely copy a state\n   *\n   * @return {State}\n   */\n  State.prototype.copy = function () {\n    var res = new State();\n    res.javaScriptLine = this.javaScriptLine;\n    res.javaScriptLineExcludesColon = this.javaScriptLineExcludesColon;\n    res.javaScriptArguments = this.javaScriptArguments;\n    res.javaScriptArgumentsDepth = this.javaScriptArgumentsDepth;\n    res.isInterpolating = this.isInterpolating;\n    res.interpolationNesting = this.intpolationNesting;\n\n    res.jsState = CodeMirror.copyState(jsMode, this.jsState);\n\n    res.innerMode = this.innerMode;\n    if (this.innerMode && this.innerState) {\n      res.innerState = CodeMirror.copyState(this.innerMode, this.innerState);\n    }\n\n    res.restOfLine = this.restOfLine;\n\n    res.isIncludeFiltered = this.isIncludeFiltered;\n    res.isEach = this.isEach;\n    res.lastTag = this.lastTag;\n    res.scriptType = this.scriptType;\n    res.isAttrs = this.isAttrs;\n    res.attrsNest = this.attrsNest.slice();\n    res.inAttributeName = this.inAttributeName;\n    res.attributeIsType = this.attributeIsType;\n    res.attrValue = this.attrValue;\n    res.indentOf = this.indentOf;\n    res.indentToken = this.indentToken;\n\n    res.innerModeForLine = this.innerModeForLine;\n\n    return res;\n  };\n\n  function javaScript(stream, state) {\n    if (stream.sol()) {\n      // if javaScriptLine was set at end of line, ignore it\n      state.javaScriptLine = false;\n      state.javaScriptLineExcludesColon = false;\n    }\n    if (state.javaScriptLine) {\n      if (state.javaScriptLineExcludesColon && stream.peek() === ':') {\n        state.javaScriptLine = false;\n        state.javaScriptLineExcludesColon = false;\n        return;\n      }\n      var tok = jsMode.token(stream, state.jsState);\n      if (stream.eol()) state.javaScriptLine = false;\n      return tok || true;\n    }\n  }\n  function javaScriptArguments(stream, state) {\n    if (state.javaScriptArguments) {\n      if (state.javaScriptArgumentsDepth === 0 && stream.peek() !== '(') {\n        state.javaScriptArguments = false;\n        return;\n      }\n      if (stream.peek() === '(') {\n        state.javaScriptArgumentsDepth++;\n      } else if (stream.peek() === ')') {\n        state.javaScriptArgumentsDepth--;\n      }\n      if (state.javaScriptArgumentsDepth === 0) {\n        state.javaScriptArguments = false;\n        return;\n      }\n\n      var tok = jsMode.token(stream, state.jsState);\n      return tok || true;\n    }\n  }\n\n  function yieldStatement(stream) {\n    if (stream.match(/^yield\\b/)) {\n        return 'keyword';\n    }\n  }\n\n  function doctype(stream) {\n    if (stream.match(/^(?:doctype) *([^\\n]+)?/)) {\n        return DOCTYPE;\n    }\n  }\n\n  function interpolation(stream, state) {\n    if (stream.match('#{')) {\n      state.isInterpolating = true;\n      state.interpolationNesting = 0;\n      return 'punctuation';\n    }\n  }\n\n  function interpolationContinued(stream, state) {\n    if (state.isInterpolating) {\n      if (stream.peek() === '}') {\n        state.interpolationNesting--;\n        if (state.interpolationNesting < 0) {\n          stream.next();\n          state.isInterpolating = false;\n          return 'puncutation';\n        }\n      } else if (stream.peek() === '{') {\n        state.interpolationNesting++;\n      }\n      return jsMode.token(stream, state.jsState) || true;\n    }\n  }\n\n  function caseStatement(stream, state) {\n    if (stream.match(/^case\\b/)) {\n      state.javaScriptLine = true;\n      return KEYWORD;\n    }\n  }\n\n  function when(stream, state) {\n    if (stream.match(/^when\\b/)) {\n      state.javaScriptLine = true;\n      state.javaScriptLineExcludesColon = true;\n      return KEYWORD;\n    }\n  }\n\n  function defaultStatement(stream) {\n    if (stream.match(/^default\\b/)) {\n      return KEYWORD;\n    }\n  }\n\n  function extendsStatement(stream, state) {\n    if (stream.match(/^extends?\\b/)) {\n      state.restOfLine = 'string';\n      return KEYWORD;\n    }\n  }\n\n  function append(stream, state) {\n    if (stream.match(/^append\\b/)) {\n      state.restOfLine = 'variable';\n      return KEYWORD;\n    }\n  }\n  function prepend(stream, state) {\n    if (stream.match(/^prepend\\b/)) {\n      state.restOfLine = 'variable';\n      return KEYWORD;\n    }\n  }\n  function block(stream, state) {\n    if (stream.match(/^block\\b *(?:(prepend|append)\\b)?/)) {\n      state.restOfLine = 'variable';\n      return KEYWORD;\n    }\n  }\n\n  function include(stream, state) {\n    if (stream.match(/^include\\b/)) {\n      state.restOfLine = 'string';\n      return KEYWORD;\n    }\n  }\n\n  function includeFiltered(stream, state) {\n    if (stream.match(/^include:([a-zA-Z0-9\\-]+)/, false) && stream.match('include')) {\n      state.isIncludeFiltered = true;\n      return KEYWORD;\n    }\n  }\n\n  function includeFilteredContinued(stream, state) {\n    if (state.isIncludeFiltered) {\n      var tok = filter(stream, state);\n      state.isIncludeFiltered = false;\n      state.restOfLine = 'string';\n      return tok;\n    }\n  }\n\n  function mixin(stream, state) {\n    if (stream.match(/^mixin\\b/)) {\n      state.javaScriptLine = true;\n      return KEYWORD;\n    }\n  }\n\n  function call(stream, state) {\n    if (stream.match(/^\\+([-\\w]+)/)) {\n      if (!stream.match(/^\\( *[-\\w]+ *=/, false)) {\n        state.javaScriptArguments = true;\n        state.javaScriptArgumentsDepth = 0;\n      }\n      return 'variable';\n    }\n    if (stream.match(/^\\+#{/, false)) {\n      stream.next();\n      state.mixinCallAfter = true;\n      return interpolation(stream, state);\n    }\n  }\n  function callArguments(stream, state) {\n    if (state.mixinCallAfter) {\n      state.mixinCallAfter = false;\n      if (!stream.match(/^\\( *[-\\w]+ *=/, false)) {\n        state.javaScriptArguments = true;\n        state.javaScriptArgumentsDepth = 0;\n      }\n      return true;\n    }\n  }\n\n  function conditional(stream, state) {\n    if (stream.match(/^(if|unless|else if|else)\\b/)) {\n      state.javaScriptLine = true;\n      return KEYWORD;\n    }\n  }\n\n  function each(stream, state) {\n    if (stream.match(/^(- *)?(each|for)\\b/)) {\n      state.isEach = true;\n      return KEYWORD;\n    }\n  }\n  function eachContinued(stream, state) {\n    if (state.isEach) {\n      if (stream.match(/^ in\\b/)) {\n        state.javaScriptLine = true;\n        state.isEach = false;\n        return KEYWORD;\n      } else if (stream.sol() || stream.eol()) {\n        state.isEach = false;\n      } else if (stream.next()) {\n        while (!stream.match(/^ in\\b/, false) && stream.next());\n        return 'variable';\n      }\n    }\n  }\n\n  function whileStatement(stream, state) {\n    if (stream.match(/^while\\b/)) {\n      state.javaScriptLine = true;\n      return KEYWORD;\n    }\n  }\n\n  function tag(stream, state) {\n    var captures;\n    if (captures = stream.match(/^(\\w(?:[-:\\w]*\\w)?)\\/?/)) {\n      state.lastTag = captures[1].toLowerCase();\n      if (state.lastTag === 'script') {\n        state.scriptType = 'application/javascript';\n      }\n      return 'tag';\n    }\n  }\n\n  function filter(stream, state) {\n    if (stream.match(/^:([\\w\\-]+)/)) {\n      var innerMode;\n      if (config && config.innerModes) {\n        innerMode = config.innerModes(stream.current().substring(1));\n      }\n      if (!innerMode) {\n        innerMode = stream.current().substring(1);\n      }\n      if (typeof innerMode === 'string') {\n        innerMode = CodeMirror.getMode(config, innerMode);\n      }\n      setInnerMode(stream, state, innerMode);\n      return 'atom';\n    }\n  }\n\n  function code(stream, state) {\n    if (stream.match(/^(!?=|-)/)) {\n      state.javaScriptLine = true;\n      return 'punctuation';\n    }\n  }\n\n  function id(stream) {\n    if (stream.match(/^#([\\w-]+)/)) {\n      return ID;\n    }\n  }\n\n  function className(stream) {\n    if (stream.match(/^\\.([\\w-]+)/)) {\n      return CLASS;\n    }\n  }\n\n  function attrs(stream, state) {\n    if (stream.peek() == '(') {\n      stream.next();\n      state.isAttrs = true;\n      state.attrsNest = [];\n      state.inAttributeName = true;\n      state.attrValue = '';\n      state.attributeIsType = false;\n      return 'punctuation';\n    }\n  }\n\n  function attrsContinued(stream, state) {\n    if (state.isAttrs) {\n      if (ATTRS_NEST[stream.peek()]) {\n        state.attrsNest.push(ATTRS_NEST[stream.peek()]);\n      }\n      if (state.attrsNest[state.attrsNest.length - 1] === stream.peek()) {\n        state.attrsNest.pop();\n      } else  if (stream.eat(')')) {\n        state.isAttrs = false;\n        return 'punctuation';\n      }\n      if (state.inAttributeName && stream.match(/^[^=,\\)!]+/)) {\n        if (stream.peek() === '=' || stream.peek() === '!') {\n          state.inAttributeName = false;\n          state.jsState = jsMode.startState();\n          if (state.lastTag === 'script' && stream.current().trim().toLowerCase() === 'type') {\n            state.attributeIsType = true;\n          } else {\n            state.attributeIsType = false;\n          }\n        }\n        return 'attribute';\n      }\n\n      var tok = jsMode.token(stream, state.jsState);\n      if (state.attributeIsType && tok === 'string') {\n        state.scriptType = stream.current().toString();\n      }\n      if (state.attrsNest.length === 0 && (tok === 'string' || tok === 'variable' || tok === 'keyword')) {\n        try {\n          Function('', 'var x ' + state.attrValue.replace(/,\\s*$/, '').replace(/^!/, ''));\n          state.inAttributeName = true;\n          state.attrValue = '';\n          stream.backUp(stream.current().length);\n          return attrsContinued(stream, state);\n        } catch (ex) {\n          //not the end of an attribute\n        }\n      }\n      state.attrValue += stream.current();\n      return tok || true;\n    }\n  }\n\n  function attributesBlock(stream, state) {\n    if (stream.match(/^&attributes\\b/)) {\n      state.javaScriptArguments = true;\n      state.javaScriptArgumentsDepth = 0;\n      return 'keyword';\n    }\n  }\n\n  function indent(stream) {\n    if (stream.sol() && stream.eatSpace()) {\n      return 'indent';\n    }\n  }\n\n  function comment(stream, state) {\n    if (stream.match(/^ *\\/\\/(-)?([^\\n]*)/)) {\n      state.indentOf = stream.indentation();\n      state.indentToken = 'comment';\n      return 'comment';\n    }\n  }\n\n  function colon(stream) {\n    if (stream.match(/^: */)) {\n      return 'colon';\n    }\n  }\n\n  function text(stream, state) {\n    if (stream.match(/^(?:\\| ?| )([^\\n]+)/)) {\n      return 'string';\n    }\n    if (stream.match(/^(<[^\\n]*)/, false)) {\n      // html string\n      setInnerMode(stream, state, 'htmlmixed');\n      state.innerModeForLine = true;\n      return innerMode(stream, state, true);\n    }\n  }\n\n  function dot(stream, state) {\n    if (stream.eat('.')) {\n      var innerMode = null;\n      if (state.lastTag === 'script' && state.scriptType.toLowerCase().indexOf('javascript') != -1) {\n        innerMode = state.scriptType.toLowerCase().replace(/\"|'/g, '');\n      } else if (state.lastTag === 'style') {\n        innerMode = 'css';\n      }\n      setInnerMode(stream, state, innerMode);\n      return 'dot';\n    }\n  }\n\n  function fail(stream) {\n    stream.next();\n    return null;\n  }\n\n\n  function setInnerMode(stream, state, mode) {\n    mode = CodeMirror.mimeModes[mode] || mode;\n    mode = config.innerModes ? config.innerModes(mode) || mode : mode;\n    mode = CodeMirror.mimeModes[mode] || mode;\n    mode = CodeMirror.getMode(config, mode);\n    state.indentOf = stream.indentation();\n\n    if (mode && mode.name !== 'null') {\n      state.innerMode = mode;\n    } else {\n      state.indentToken = 'string';\n    }\n  }\n  function innerMode(stream, state, force) {\n    if (stream.indentation() > state.indentOf || (state.innerModeForLine && !stream.sol()) || force) {\n      if (state.innerMode) {\n        if (!state.innerState) {\n          state.innerState = state.innerMode.startState ? state.innerMode.startState(stream.indentation()) : {};\n        }\n        return stream.hideFirstChars(state.indentOf + 2, function () {\n          return state.innerMode.token(stream, state.innerState) || true;\n        });\n      } else {\n        stream.skipToEnd();\n        return state.indentToken;\n      }\n    } else if (stream.sol()) {\n      state.indentOf = Infinity;\n      state.indentToken = null;\n      state.innerMode = null;\n      state.innerState = null;\n    }\n  }\n  function restOfLine(stream, state) {\n    if (stream.sol()) {\n      // if restOfLine was set at end of line, ignore it\n      state.restOfLine = '';\n    }\n    if (state.restOfLine) {\n      stream.skipToEnd();\n      var tok = state.restOfLine;\n      state.restOfLine = '';\n      return tok;\n    }\n  }\n\n\n  function startState() {\n    return new State();\n  }\n  function copyState(state) {\n    return state.copy();\n  }\n  /**\n   * Get the next token in the stream\n   *\n   * @param {Stream} stream\n   * @param {State} state\n   */\n  function nextToken(stream, state) {\n    var tok = innerMode(stream, state)\n      || restOfLine(stream, state)\n      || interpolationContinued(stream, state)\n      || includeFilteredContinued(stream, state)\n      || eachContinued(stream, state)\n      || attrsContinued(stream, state)\n      || javaScript(stream, state)\n      || javaScriptArguments(stream, state)\n      || callArguments(stream, state)\n\n      || yieldStatement(stream, state)\n      || doctype(stream, state)\n      || interpolation(stream, state)\n      || caseStatement(stream, state)\n      || when(stream, state)\n      || defaultStatement(stream, state)\n      || extendsStatement(stream, state)\n      || append(stream, state)\n      || prepend(stream, state)\n      || block(stream, state)\n      || include(stream, state)\n      || includeFiltered(stream, state)\n      || mixin(stream, state)\n      || call(stream, state)\n      || conditional(stream, state)\n      || each(stream, state)\n      || whileStatement(stream, state)\n      || tag(stream, state)\n      || filter(stream, state)\n      || code(stream, state)\n      || id(stream, state)\n      || className(stream, state)\n      || attrs(stream, state)\n      || attributesBlock(stream, state)\n      || indent(stream, state)\n      || text(stream, state)\n      || comment(stream, state)\n      || colon(stream, state)\n      || dot(stream, state)\n      || fail(stream, state);\n\n    return tok === true ? null : tok;\n  }\n  return {\n    startState: startState,\n    copyState: copyState,\n    token: nextToken\n  };\n});\n\nCodeMirror.defineMIME('text/x-jade', 'jade');\n\n});\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/javascript/index.html",
    "content": "<!doctype html>\n\n<title>CodeMirror: JavaScript mode</title>\n<meta charset=\"utf-8\"/>\n<link rel=stylesheet href=\"../../doc/docs.css\">\n\n<link rel=\"stylesheet\" href=\"../../lib/codemirror.css\">\n<script src=\"../../lib/codemirror.js\"></script>\n<script src=\"../../addon/edit/matchbrackets.js\"></script>\n<script src=\"../../addon/comment/continuecomment.js\"></script>\n<script src=\"../../addon/comment/comment.js\"></script>\n<script src=\"javascript.js\"></script>\n<style type=\"text/css\">.CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}</style>\n<div id=nav>\n  <a href=\"http://codemirror.net\"><h1>CodeMirror</h1><img id=logo src=\"../../doc/logo.png\"></a>\n\n  <ul>\n    <li><a href=\"../../index.html\">Home</a>\n    <li><a href=\"../../doc/manual.html\">Manual</a>\n    <li><a href=\"https://github.com/codemirror/codemirror\">Code</a>\n  </ul>\n  <ul>\n    <li><a href=\"../index.html\">Language modes</a>\n    <li><a class=active href=\"#\">JavaScript</a>\n  </ul>\n</div>\n\n<article>\n<h2>JavaScript mode</h2>\n\n\n<div><textarea id=\"code\" name=\"code\">\n// Demo code (the actual new parser character stream implementation)\n\nfunction StringStream(string) {\n  this.pos = 0;\n  this.string = string;\n}\n\nStringStream.prototype = {\n  done: function() {return this.pos >= this.string.length;},\n  peek: function() {return this.string.charAt(this.pos);},\n  next: function() {\n    if (this.pos &lt; this.string.length)\n      return this.string.charAt(this.pos++);\n  },\n  eat: function(match) {\n    var ch = this.string.charAt(this.pos);\n    if (typeof match == \"string\") var ok = ch == match;\n    else var ok = ch &amp;&amp; match.test ? match.test(ch) : match(ch);\n    if (ok) {this.pos++; return ch;}\n  },\n  eatWhile: function(match) {\n    var start = this.pos;\n    while (this.eat(match));\n    if (this.pos > start) return this.string.slice(start, this.pos);\n  },\n  backUp: function(n) {this.pos -= n;},\n  column: function() {return this.pos;},\n  eatSpace: function() {\n    var start = this.pos;\n    while (/\\s/.test(this.string.charAt(this.pos))) this.pos++;\n    return this.pos - start;\n  },\n  match: function(pattern, consume, caseInsensitive) {\n    if (typeof pattern == \"string\") {\n      function cased(str) {return caseInsensitive ? str.toLowerCase() : str;}\n      if (cased(this.string).indexOf(cased(pattern), this.pos) == this.pos) {\n        if (consume !== false) this.pos += str.length;\n        return true;\n      }\n    }\n    else {\n      var match = this.string.slice(this.pos).match(pattern);\n      if (match &amp;&amp; consume !== false) this.pos += match[0].length;\n      return match;\n    }\n  }\n};\n</textarea></div>\n\n    <script>\n      var editor = CodeMirror.fromTextArea(document.getElementById(\"code\"), {\n        lineNumbers: true,\n        matchBrackets: true,\n        continueComments: \"Enter\",\n        extraKeys: {\"Ctrl-Q\": \"toggleComment\"}\n      });\n    </script>\n\n    <p>\n      JavaScript mode supports several configuration options:\n      <ul>\n        <li><code>json</code> which will set the mode to expect JSON\n        data rather than a JavaScript program.</li>\n        <li><code>jsonld</code> which will set the mode to expect\n        <a href=\"http://json-ld.org\">JSON-LD</a> linked data rather\n        than a JavaScript program (<a href=\"json-ld.html\">demo</a>).</li>\n        <li><code>typescript</code> which will activate additional\n        syntax highlighting and some other things for TypeScript code\n        (<a href=\"typescript.html\">demo</a>).</li>\n        <li><code>statementIndent</code> which (given a number) will\n        determine the amount of indentation to use for statements\n        continued on a new line.</li>\n        <li><code>wordCharacters</code>, a regexp that indicates which\n        characters should be considered part of an identifier.\n        Defaults to <code>/[\\w$]/</code>, which does not handle\n        non-ASCII identifiers. Can be set to something more elaborate\n        to improve Unicode support.</li>\n      </ul>\n    </p>\n\n    <p><strong>MIME types defined:</strong> <code>text/javascript</code>, <code>application/json</code>, <code>application/ld+json</code>, <code>text/typescript</code>, <code>application/typescript</code>.</p>\n  </article>\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/javascript/javascript.js",
    "content": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n// TODO actually recognize syntax of TypeScript constructs\n\n(function(mod) {\n  if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n    mod(require(\"../../lib/codemirror\"));\n  else if (typeof define == \"function\" && define.amd) // AMD\n    define([\"../../lib/codemirror\"], mod);\n  else // Plain browser env\n    mod(CodeMirror);\n})(function(CodeMirror) {\n\"use strict\";\n\nCodeMirror.defineMode(\"javascript\", function(config, parserConfig) {\n  var indentUnit = config.indentUnit;\n  var statementIndent = parserConfig.statementIndent;\n  var jsonldMode = parserConfig.jsonld;\n  var jsonMode = parserConfig.json || jsonldMode;\n  var isTS = parserConfig.typescript;\n  var wordRE = parserConfig.wordCharacters || /[\\w$\\xa1-\\uffff]/;\n\n  // Tokenizer\n\n  var keywords = function(){\n    function kw(type) {return {type: type, style: \"keyword\"};}\n    var A = kw(\"keyword a\"), B = kw(\"keyword b\"), C = kw(\"keyword c\");\n    var operator = kw(\"operator\"), atom = {type: \"atom\", style: \"atom\"};\n\n    var jsKeywords = {\n      \"if\": kw(\"if\"), \"while\": A, \"with\": A, \"else\": B, \"do\": B, \"try\": B, \"finally\": B,\n      \"return\": C, \"break\": C, \"continue\": C, \"new\": C, \"delete\": C, \"throw\": C, \"debugger\": C,\n      \"var\": kw(\"var\"), \"const\": kw(\"var\"), \"let\": kw(\"var\"),\n      \"function\": kw(\"function\"), \"catch\": kw(\"catch\"),\n      \"for\": kw(\"for\"), \"switch\": kw(\"switch\"), \"case\": kw(\"case\"), \"default\": kw(\"default\"),\n      \"in\": operator, \"typeof\": operator, \"instanceof\": operator,\n      \"true\": atom, \"false\": atom, \"null\": atom, \"undefined\": atom, \"NaN\": atom, \"Infinity\": atom,\n      \"this\": kw(\"this\"), \"module\": kw(\"module\"), \"class\": kw(\"class\"), \"super\": kw(\"atom\"),\n      \"yield\": C, \"export\": kw(\"export\"), \"import\": kw(\"import\"), \"extends\": C\n    };\n\n    // Extend the 'normal' keywords with the TypeScript language extensions\n    if (isTS) {\n      var type = {type: \"variable\", style: \"variable-3\"};\n      var tsKeywords = {\n        // object-like things\n        \"interface\": kw(\"interface\"),\n        \"extends\": kw(\"extends\"),\n        \"constructor\": kw(\"constructor\"),\n\n        // scope modifiers\n        \"public\": kw(\"public\"),\n        \"private\": kw(\"private\"),\n        \"protected\": kw(\"protected\"),\n        \"static\": kw(\"static\"),\n\n        // types\n        \"string\": type, \"number\": type, \"bool\": type, \"any\": type\n      };\n\n      for (var attr in tsKeywords) {\n        jsKeywords[attr] = tsKeywords[attr];\n      }\n    }\n\n    return jsKeywords;\n  }();\n\n  var isOperatorChar = /[+\\-*&%=<>!?|~^]/;\n  var isJsonldKeyword = /^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)\"/;\n\n  function readRegexp(stream) {\n    var escaped = false, next, inSet = false;\n    while ((next = stream.next()) != null) {\n      if (!escaped) {\n        if (next == \"/\" && !inSet) return;\n        if (next == \"[\") inSet = true;\n        else if (inSet && next == \"]\") inSet = false;\n      }\n      escaped = !escaped && next == \"\\\\\";\n    }\n  }\n\n  // Used as scratch variables to communicate multiple values without\n  // consing up tons of objects.\n  var type, content;\n  function ret(tp, style, cont) {\n    type = tp; content = cont;\n    return style;\n  }\n  function tokenBase(stream, state) {\n    var ch = stream.next();\n    if (ch == '\"' || ch == \"'\") {\n      state.tokenize = tokenString(ch);\n      return state.tokenize(stream, state);\n    } else if (ch == \".\" && stream.match(/^\\d+(?:[eE][+\\-]?\\d+)?/)) {\n      return ret(\"number\", \"number\");\n    } else if (ch == \".\" && stream.match(\"..\")) {\n      return ret(\"spread\", \"meta\");\n    } else if (/[\\[\\]{}\\(\\),;\\:\\.]/.test(ch)) {\n      return ret(ch);\n    } else if (ch == \"=\" && stream.eat(\">\")) {\n      return ret(\"=>\", \"operator\");\n    } else if (ch == \"0\" && stream.eat(/x/i)) {\n      stream.eatWhile(/[\\da-f]/i);\n      return ret(\"number\", \"number\");\n    } else if (/\\d/.test(ch)) {\n      stream.match(/^\\d*(?:\\.\\d*)?(?:[eE][+\\-]?\\d+)?/);\n      return ret(\"number\", \"number\");\n    } else if (ch == \"/\") {\n      if (stream.eat(\"*\")) {\n        state.tokenize = tokenComment;\n        return tokenComment(stream, state);\n      } else if (stream.eat(\"/\")) {\n        stream.skipToEnd();\n        return ret(\"comment\", \"comment\");\n      } else if (state.lastType == \"operator\" || state.lastType == \"keyword c\" ||\n               state.lastType == \"sof\" || /^[\\[{}\\(,;:]$/.test(state.lastType)) {\n        readRegexp(stream);\n        stream.match(/^\\b(([gimyu])(?![gimyu]*\\2))+\\b/);\n        return ret(\"regexp\", \"string-2\");\n      } else {\n        stream.eatWhile(isOperatorChar);\n        return ret(\"operator\", \"operator\", stream.current());\n      }\n    } else if (ch == \"`\") {\n      state.tokenize = tokenQuasi;\n      return tokenQuasi(stream, state);\n    } else if (ch == \"#\") {\n      stream.skipToEnd();\n      return ret(\"error\", \"error\");\n    } else if (isOperatorChar.test(ch)) {\n      stream.eatWhile(isOperatorChar);\n      return ret(\"operator\", \"operator\", stream.current());\n    } else if (wordRE.test(ch)) {\n      stream.eatWhile(wordRE);\n      var word = stream.current(), known = keywords.propertyIsEnumerable(word) && keywords[word];\n      return (known && state.lastType != \".\") ? ret(known.type, known.style, word) :\n                     ret(\"variable\", \"variable\", word);\n    }\n  }\n\n  function tokenString(quote) {\n    return function(stream, state) {\n      var escaped = false, next;\n      if (jsonldMode && stream.peek() == \"@\" && stream.match(isJsonldKeyword)){\n        state.tokenize = tokenBase;\n        return ret(\"jsonld-keyword\", \"meta\");\n      }\n      while ((next = stream.next()) != null) {\n        if (next == quote && !escaped) break;\n        escaped = !escaped && next == \"\\\\\";\n      }\n      if (!escaped) state.tokenize = tokenBase;\n      return ret(\"string\", \"string\");\n    };\n  }\n\n  function tokenComment(stream, state) {\n    var maybeEnd = false, ch;\n    while (ch = stream.next()) {\n      if (ch == \"/\" && maybeEnd) {\n        state.tokenize = tokenBase;\n        break;\n      }\n      maybeEnd = (ch == \"*\");\n    }\n    return ret(\"comment\", \"comment\");\n  }\n\n  function tokenQuasi(stream, state) {\n    var escaped = false, next;\n    while ((next = stream.next()) != null) {\n      if (!escaped && (next == \"`\" || next == \"$\" && stream.eat(\"{\"))) {\n        state.tokenize = tokenBase;\n        break;\n      }\n      escaped = !escaped && next == \"\\\\\";\n    }\n    return ret(\"quasi\", \"string-2\", stream.current());\n  }\n\n  var brackets = \"([{}])\";\n  // This is a crude lookahead trick to try and notice that we're\n  // parsing the argument patterns for a fat-arrow function before we\n  // actually hit the arrow token. It only works if the arrow is on\n  // the same line as the arguments and there's no strange noise\n  // (comments) in between. Fallback is to only notice when we hit the\n  // arrow, and not declare the arguments as locals for the arrow\n  // body.\n  function findFatArrow(stream, state) {\n    if (state.fatArrowAt) state.fatArrowAt = null;\n    var arrow = stream.string.indexOf(\"=>\", stream.start);\n    if (arrow < 0) return;\n\n    var depth = 0, sawSomething = false;\n    for (var pos = arrow - 1; pos >= 0; --pos) {\n      var ch = stream.string.charAt(pos);\n      var bracket = brackets.indexOf(ch);\n      if (bracket >= 0 && bracket < 3) {\n        if (!depth) { ++pos; break; }\n        if (--depth == 0) break;\n      } else if (bracket >= 3 && bracket < 6) {\n        ++depth;\n      } else if (wordRE.test(ch)) {\n        sawSomething = true;\n      } else if (/[\"'\\/]/.test(ch)) {\n        return;\n      } else if (sawSomething && !depth) {\n        ++pos;\n        break;\n      }\n    }\n    if (sawSomething && !depth) state.fatArrowAt = pos;\n  }\n\n  // Parser\n\n  var atomicTypes = {\"atom\": true, \"number\": true, \"variable\": true, \"string\": true, \"regexp\": true, \"this\": true, \"jsonld-keyword\": true};\n\n  function JSLexical(indented, column, type, align, prev, info) {\n    this.indented = indented;\n    this.column = column;\n    this.type = type;\n    this.prev = prev;\n    this.info = info;\n    if (align != null) this.align = align;\n  }\n\n  function inScope(state, varname) {\n    for (var v = state.localVars; v; v = v.next)\n      if (v.name == varname) return true;\n    for (var cx = state.context; cx; cx = cx.prev) {\n      for (var v = cx.vars; v; v = v.next)\n        if (v.name == varname) return true;\n    }\n  }\n\n  function parseJS(state, style, type, content, stream) {\n    var cc = state.cc;\n    // Communicate our context to the combinators.\n    // (Less wasteful than consing up a hundred closures on every call.)\n    cx.state = state; cx.stream = stream; cx.marked = null, cx.cc = cc; cx.style = style;\n\n    if (!state.lexical.hasOwnProperty(\"align\"))\n      state.lexical.align = true;\n\n    while(true) {\n      var combinator = cc.length ? cc.pop() : jsonMode ? expression : statement;\n      if (combinator(type, content)) {\n        while(cc.length && cc[cc.length - 1].lex)\n          cc.pop()();\n        if (cx.marked) return cx.marked;\n        if (type == \"variable\" && inScope(state, content)) return \"variable-2\";\n        return style;\n      }\n    }\n  }\n\n  // Combinator utils\n\n  var cx = {state: null, column: null, marked: null, cc: null};\n  function pass() {\n    for (var i = arguments.length - 1; i >= 0; i--) cx.cc.push(arguments[i]);\n  }\n  function cont() {\n    pass.apply(null, arguments);\n    return true;\n  }\n  function register(varname) {\n    function inList(list) {\n      for (var v = list; v; v = v.next)\n        if (v.name == varname) return true;\n      return false;\n    }\n    var state = cx.state;\n    if (state.context) {\n      cx.marked = \"def\";\n      if (inList(state.localVars)) return;\n      state.localVars = {name: varname, next: state.localVars};\n    } else {\n      if (inList(state.globalVars)) return;\n      if (parserConfig.globalVars)\n        state.globalVars = {name: varname, next: state.globalVars};\n    }\n  }\n\n  // Combinators\n\n  var defaultVars = {name: \"this\", next: {name: \"arguments\"}};\n  function pushcontext() {\n    cx.state.context = {prev: cx.state.context, vars: cx.state.localVars};\n    cx.state.localVars = defaultVars;\n  }\n  function popcontext() {\n    cx.state.localVars = cx.state.context.vars;\n    cx.state.context = cx.state.context.prev;\n  }\n  function pushlex(type, info) {\n    var result = function() {\n      var state = cx.state, indent = state.indented;\n      if (state.lexical.type == \"stat\") indent = state.lexical.indented;\n      else for (var outer = state.lexical; outer && outer.type == \")\" && outer.align; outer = outer.prev)\n        indent = outer.indented;\n      state.lexical = new JSLexical(indent, cx.stream.column(), type, null, state.lexical, info);\n    };\n    result.lex = true;\n    return result;\n  }\n  function poplex() {\n    var state = cx.state;\n    if (state.lexical.prev) {\n      if (state.lexical.type == \")\")\n        state.indented = state.lexical.indented;\n      state.lexical = state.lexical.prev;\n    }\n  }\n  poplex.lex = true;\n\n  function expect(wanted) {\n    function exp(type) {\n      if (type == wanted) return cont();\n      else if (wanted == \";\") return pass();\n      else return cont(exp);\n    };\n    return exp;\n  }\n\n  function statement(type, value) {\n    if (type == \"var\") return cont(pushlex(\"vardef\", value.length), vardef, expect(\";\"), poplex);\n    if (type == \"keyword a\") return cont(pushlex(\"form\"), expression, statement, poplex);\n    if (type == \"keyword b\") return cont(pushlex(\"form\"), statement, poplex);\n    if (type == \"{\") return cont(pushlex(\"}\"), block, poplex);\n    if (type == \";\") return cont();\n    if (type == \"if\") {\n      if (cx.state.lexical.info == \"else\" && cx.state.cc[cx.state.cc.length - 1] == poplex)\n        cx.state.cc.pop()();\n      return cont(pushlex(\"form\"), expression, statement, poplex, maybeelse);\n    }\n    if (type == \"function\") return cont(functiondef);\n    if (type == \"for\") return cont(pushlex(\"form\"), forspec, statement, poplex);\n    if (type == \"variable\") return cont(pushlex(\"stat\"), maybelabel);\n    if (type == \"switch\") return cont(pushlex(\"form\"), expression, pushlex(\"}\", \"switch\"), expect(\"{\"),\n                                      block, poplex, poplex);\n    if (type == \"case\") return cont(expression, expect(\":\"));\n    if (type == \"default\") return cont(expect(\":\"));\n    if (type == \"catch\") return cont(pushlex(\"form\"), pushcontext, expect(\"(\"), funarg, expect(\")\"),\n                                     statement, poplex, popcontext);\n    if (type == \"module\") return cont(pushlex(\"form\"), pushcontext, afterModule, popcontext, poplex);\n    if (type == \"class\") return cont(pushlex(\"form\"), className, poplex);\n    if (type == \"export\") return cont(pushlex(\"form\"), afterExport, poplex);\n    if (type == \"import\") return cont(pushlex(\"form\"), afterImport, poplex);\n    return pass(pushlex(\"stat\"), expression, expect(\";\"), poplex);\n  }\n  function expression(type) {\n    return expressionInner(type, false);\n  }\n  function expressionNoComma(type) {\n    return expressionInner(type, true);\n  }\n  function expressionInner(type, noComma) {\n    if (cx.state.fatArrowAt == cx.stream.start) {\n      var body = noComma ? arrowBodyNoComma : arrowBody;\n      if (type == \"(\") return cont(pushcontext, pushlex(\")\"), commasep(pattern, \")\"), poplex, expect(\"=>\"), body, popcontext);\n      else if (type == \"variable\") return pass(pushcontext, pattern, expect(\"=>\"), body, popcontext);\n    }\n\n    var maybeop = noComma ? maybeoperatorNoComma : maybeoperatorComma;\n    if (atomicTypes.hasOwnProperty(type)) return cont(maybeop);\n    if (type == \"function\") return cont(functiondef, maybeop);\n    if (type == \"keyword c\") return cont(noComma ? maybeexpressionNoComma : maybeexpression);\n    if (type == \"(\") return cont(pushlex(\")\"), maybeexpression, comprehension, expect(\")\"), poplex, maybeop);\n    if (type == \"operator\" || type == \"spread\") return cont(noComma ? expressionNoComma : expression);\n    if (type == \"[\") return cont(pushlex(\"]\"), arrayLiteral, poplex, maybeop);\n    if (type == \"{\") return contCommasep(objprop, \"}\", null, maybeop);\n    if (type == \"quasi\") { return pass(quasi, maybeop); }\n    return cont();\n  }\n  function maybeexpression(type) {\n    if (type.match(/[;\\}\\)\\],]/)) return pass();\n    return pass(expression);\n  }\n  function maybeexpressionNoComma(type) {\n    if (type.match(/[;\\}\\)\\],]/)) return pass();\n    return pass(expressionNoComma);\n  }\n\n  function maybeoperatorComma(type, value) {\n    if (type == \",\") return cont(expression);\n    return maybeoperatorNoComma(type, value, false);\n  }\n  function maybeoperatorNoComma(type, value, noComma) {\n    var me = noComma == false ? maybeoperatorComma : maybeoperatorNoComma;\n    var expr = noComma == false ? expression : expressionNoComma;\n    if (type == \"=>\") return cont(pushcontext, noComma ? arrowBodyNoComma : arrowBody, popcontext);\n    if (type == \"operator\") {\n      if (/\\+\\+|--/.test(value)) return cont(me);\n      if (value == \"?\") return cont(expression, expect(\":\"), expr);\n      return cont(expr);\n    }\n    if (type == \"quasi\") { return pass(quasi, me); }\n    if (type == \";\") return;\n    if (type == \"(\") return contCommasep(expressionNoComma, \")\", \"call\", me);\n    if (type == \".\") return cont(property, me);\n    if (type == \"[\") return cont(pushlex(\"]\"), maybeexpression, expect(\"]\"), poplex, me);\n  }\n  function quasi(type, value) {\n    if (type != \"quasi\") return pass();\n    if (value.slice(value.length - 2) != \"${\") return cont(quasi);\n    return cont(expression, continueQuasi);\n  }\n  function continueQuasi(type) {\n    if (type == \"}\") {\n      cx.marked = \"string-2\";\n      cx.state.tokenize = tokenQuasi;\n      return cont(quasi);\n    }\n  }\n  function arrowBody(type) {\n    findFatArrow(cx.stream, cx.state);\n    return pass(type == \"{\" ? statement : expression);\n  }\n  function arrowBodyNoComma(type) {\n    findFatArrow(cx.stream, cx.state);\n    return pass(type == \"{\" ? statement : expressionNoComma);\n  }\n  function maybelabel(type) {\n    if (type == \":\") return cont(poplex, statement);\n    return pass(maybeoperatorComma, expect(\";\"), poplex);\n  }\n  function property(type) {\n    if (type == \"variable\") {cx.marked = \"property\"; return cont();}\n  }\n  function objprop(type, value) {\n    if (type == \"variable\" || cx.style == \"keyword\") {\n      cx.marked = \"property\";\n      if (value == \"get\" || value == \"set\") return cont(getterSetter);\n      return cont(afterprop);\n    } else if (type == \"number\" || type == \"string\") {\n      cx.marked = jsonldMode ? \"property\" : (cx.style + \" property\");\n      return cont(afterprop);\n    } else if (type == \"jsonld-keyword\") {\n      return cont(afterprop);\n    } else if (type == \"[\") {\n      return cont(expression, expect(\"]\"), afterprop);\n    }\n  }\n  function getterSetter(type) {\n    if (type != \"variable\") return pass(afterprop);\n    cx.marked = \"property\";\n    return cont(functiondef);\n  }\n  function afterprop(type) {\n    if (type == \":\") return cont(expressionNoComma);\n    if (type == \"(\") return pass(functiondef);\n  }\n  function commasep(what, end) {\n    function proceed(type) {\n      if (type == \",\") {\n        var lex = cx.state.lexical;\n        if (lex.info == \"call\") lex.pos = (lex.pos || 0) + 1;\n        return cont(what, proceed);\n      }\n      if (type == end) return cont();\n      return cont(expect(end));\n    }\n    return function(type) {\n      if (type == end) return cont();\n      return pass(what, proceed);\n    };\n  }\n  function contCommasep(what, end, info) {\n    for (var i = 3; i < arguments.length; i++)\n      cx.cc.push(arguments[i]);\n    return cont(pushlex(end, info), commasep(what, end), poplex);\n  }\n  function block(type) {\n    if (type == \"}\") return cont();\n    return pass(statement, block);\n  }\n  function maybetype(type) {\n    if (isTS && type == \":\") return cont(typedef);\n  }\n  function typedef(type) {\n    if (type == \"variable\"){cx.marked = \"variable-3\"; return cont();}\n  }\n  function vardef() {\n    return pass(pattern, maybetype, maybeAssign, vardefCont);\n  }\n  function pattern(type, value) {\n    if (type == \"variable\") { register(value); return cont(); }\n    if (type == \"[\") return contCommasep(pattern, \"]\");\n    if (type == \"{\") return contCommasep(proppattern, \"}\");\n  }\n  function proppattern(type, value) {\n    if (type == \"variable\" && !cx.stream.match(/^\\s*:/, false)) {\n      register(value);\n      return cont(maybeAssign);\n    }\n    if (type == \"variable\") cx.marked = \"property\";\n    return cont(expect(\":\"), pattern, maybeAssign);\n  }\n  function maybeAssign(_type, value) {\n    if (value == \"=\") return cont(expressionNoComma);\n  }\n  function vardefCont(type) {\n    if (type == \",\") return cont(vardef);\n  }\n  function maybeelse(type, value) {\n    if (type == \"keyword b\" && value == \"else\") return cont(pushlex(\"form\", \"else\"), statement, poplex);\n  }\n  function forspec(type) {\n    if (type == \"(\") return cont(pushlex(\")\"), forspec1, expect(\")\"), poplex);\n  }\n  function forspec1(type) {\n    if (type == \"var\") return cont(vardef, expect(\";\"), forspec2);\n    if (type == \";\") return cont(forspec2);\n    if (type == \"variable\") return cont(formaybeinof);\n    return pass(expression, expect(\";\"), forspec2);\n  }\n  function formaybeinof(_type, value) {\n    if (value == \"in\" || value == \"of\") { cx.marked = \"keyword\"; return cont(expression); }\n    return cont(maybeoperatorComma, forspec2);\n  }\n  function forspec2(type, value) {\n    if (type == \";\") return cont(forspec3);\n    if (value == \"in\" || value == \"of\") { cx.marked = \"keyword\"; return cont(expression); }\n    return pass(expression, expect(\";\"), forspec3);\n  }\n  function forspec3(type) {\n    if (type != \")\") cont(expression);\n  }\n  function functiondef(type, value) {\n    if (value == \"*\") {cx.marked = \"keyword\"; return cont(functiondef);}\n    if (type == \"variable\") {register(value); return cont(functiondef);}\n    if (type == \"(\") return cont(pushcontext, pushlex(\")\"), commasep(funarg, \")\"), poplex, statement, popcontext);\n  }\n  function funarg(type) {\n    if (type == \"spread\") return cont(funarg);\n    return pass(pattern, maybetype);\n  }\n  function className(type, value) {\n    if (type == \"variable\") {register(value); return cont(classNameAfter);}\n  }\n  function classNameAfter(type, value) {\n    if (value == \"extends\") return cont(expression, classNameAfter);\n    if (type == \"{\") return cont(pushlex(\"}\"), classBody, poplex);\n  }\n  function classBody(type, value) {\n    if (type == \"variable\" || cx.style == \"keyword\") {\n      cx.marked = \"property\";\n      if (value == \"get\" || value == \"set\") return cont(classGetterSetter, functiondef, classBody);\n      return cont(functiondef, classBody);\n    }\n    if (value == \"*\") {\n      cx.marked = \"keyword\";\n      return cont(classBody);\n    }\n    if (type == \";\") return cont(classBody);\n    if (type == \"}\") return cont();\n  }\n  function classGetterSetter(type) {\n    if (type != \"variable\") return pass();\n    cx.marked = \"property\";\n    return cont();\n  }\n  function afterModule(type, value) {\n    if (type == \"string\") return cont(statement);\n    if (type == \"variable\") { register(value); return cont(maybeFrom); }\n  }\n  function afterExport(_type, value) {\n    if (value == \"*\") { cx.marked = \"keyword\"; return cont(maybeFrom, expect(\";\")); }\n    if (value == \"default\") { cx.marked = \"keyword\"; return cont(expression, expect(\";\")); }\n    return pass(statement);\n  }\n  function afterImport(type) {\n    if (type == \"string\") return cont();\n    return pass(importSpec, maybeFrom);\n  }\n  function importSpec(type, value) {\n    if (type == \"{\") return contCommasep(importSpec, \"}\");\n    if (type == \"variable\") register(value);\n    return cont();\n  }\n  function maybeFrom(_type, value) {\n    if (value == \"from\") { cx.marked = \"keyword\"; return cont(expression); }\n  }\n  function arrayLiteral(type) {\n    if (type == \"]\") return cont();\n    return pass(expressionNoComma, maybeArrayComprehension);\n  }\n  function maybeArrayComprehension(type) {\n    if (type == \"for\") return pass(comprehension, expect(\"]\"));\n    if (type == \",\") return cont(commasep(maybeexpressionNoComma, \"]\"));\n    return pass(commasep(expressionNoComma, \"]\"));\n  }\n  function comprehension(type) {\n    if (type == \"for\") return cont(forspec, comprehension);\n    if (type == \"if\") return cont(expression, comprehension);\n  }\n\n  function isContinuedStatement(state, textAfter) {\n    return state.lastType == \"operator\" || state.lastType == \",\" ||\n      isOperatorChar.test(textAfter.charAt(0)) ||\n      /[,.]/.test(textAfter.charAt(0));\n  }\n\n  // Interface\n\n  return {\n    startState: function(basecolumn) {\n      var state = {\n        tokenize: tokenBase,\n        lastType: \"sof\",\n        cc: [],\n        lexical: new JSLexical((basecolumn || 0) - indentUnit, 0, \"block\", false),\n        localVars: parserConfig.localVars,\n        context: parserConfig.localVars && {vars: parserConfig.localVars},\n        indented: 0\n      };\n      if (parserConfig.globalVars && typeof parserConfig.globalVars == \"object\")\n        state.globalVars = parserConfig.globalVars;\n      return state;\n    },\n\n    token: function(stream, state) {\n      if (stream.sol()) {\n        if (!state.lexical.hasOwnProperty(\"align\"))\n          state.lexical.align = false;\n        state.indented = stream.indentation();\n        findFatArrow(stream, state);\n      }\n      if (state.tokenize != tokenComment && stream.eatSpace()) return null;\n      var style = state.tokenize(stream, state);\n      if (type == \"comment\") return style;\n      state.lastType = type == \"operator\" && (content == \"++\" || content == \"--\") ? \"incdec\" : type;\n      return parseJS(state, style, type, content, stream);\n    },\n\n    indent: function(state, textAfter) {\n      if (state.tokenize == tokenComment) return CodeMirror.Pass;\n      if (state.tokenize != tokenBase) return 0;\n      var firstChar = textAfter && textAfter.charAt(0), lexical = state.lexical;\n      // Kludge to prevent 'maybelse' from blocking lexical scope pops\n      if (!/^\\s*else\\b/.test(textAfter)) for (var i = state.cc.length - 1; i >= 0; --i) {\n        var c = state.cc[i];\n        if (c == poplex) lexical = lexical.prev;\n        else if (c != maybeelse) break;\n      }\n      if (lexical.type == \"stat\" && firstChar == \"}\") lexical = lexical.prev;\n      if (statementIndent && lexical.type == \")\" && lexical.prev.type == \"stat\")\n        lexical = lexical.prev;\n      var type = lexical.type, closing = firstChar == type;\n\n      if (type == \"vardef\") return lexical.indented + (state.lastType == \"operator\" || state.lastType == \",\" ? lexical.info + 1 : 0);\n      else if (type == \"form\" && firstChar == \"{\") return lexical.indented;\n      else if (type == \"form\") return lexical.indented + indentUnit;\n      else if (type == \"stat\")\n        return lexical.indented + (isContinuedStatement(state, textAfter) ? statementIndent || indentUnit : 0);\n      else if (lexical.info == \"switch\" && !closing && parserConfig.doubleIndentSwitch != false)\n        return lexical.indented + (/^(?:case|default)\\b/.test(textAfter) ? indentUnit : 2 * indentUnit);\n      else if (lexical.align) return lexical.column + (closing ? 0 : 1);\n      else return lexical.indented + (closing ? 0 : indentUnit);\n    },\n\n    electricInput: /^\\s*(?:case .*?:|default:|\\{|\\})$/,\n    blockCommentStart: jsonMode ? null : \"/*\",\n    blockCommentEnd: jsonMode ? null : \"*/\",\n    lineComment: jsonMode ? null : \"//\",\n    fold: \"brace\",\n\n    helperType: jsonMode ? \"json\" : \"javascript\",\n    jsonldMode: jsonldMode,\n    jsonMode: jsonMode\n  };\n});\n\nCodeMirror.registerHelper(\"wordChars\", \"javascript\", /[\\w$]/);\n\nCodeMirror.defineMIME(\"text/javascript\", \"javascript\");\nCodeMirror.defineMIME(\"text/ecmascript\", \"javascript\");\nCodeMirror.defineMIME(\"application/javascript\", \"javascript\");\nCodeMirror.defineMIME(\"application/x-javascript\", \"javascript\");\nCodeMirror.defineMIME(\"application/ecmascript\", \"javascript\");\nCodeMirror.defineMIME(\"application/json\", {name: \"javascript\", json: true});\nCodeMirror.defineMIME(\"application/x-json\", {name: \"javascript\", json: true});\nCodeMirror.defineMIME(\"application/ld+json\", {name: \"javascript\", jsonld: true});\nCodeMirror.defineMIME(\"text/typescript\", { name: \"javascript\", typescript: true });\nCodeMirror.defineMIME(\"application/typescript\", { name: \"javascript\", typescript: true });\n\n});\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/javascript/json-ld.html",
    "content": "<!doctype html>\n\n<title>CodeMirror: JSON-LD mode</title>\n<meta charset=\"utf-8\"/>\n<link rel=stylesheet href=\"../../doc/docs.css\">\n\n<link rel=\"stylesheet\" href=\"../../lib/codemirror.css\">\n<script src=\"../../lib/codemirror.js\"></script>\n<script src=\"../../addon/edit/matchbrackets.js\"></script>\n<script src=\"../../addon/comment/continuecomment.js\"></script>\n<script src=\"../../addon/comment/comment.js\"></script>\n<script src=\"javascript.js\"></script>\n<style type=\"text/css\">.CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}</style>\n<div id=\"nav\">\n  <a href=\"http://codemirror.net\"><h1>CodeMirror</h1><img id=logo src=\"../../doc/logo.png\"/></a>\n\n  <ul>\n    <li><a href=\"../../index.html\">Home</a>\n    <li><a href=\"../../doc/manual.html\">Manual</a>\n    <li><a href=\"https://github.com/codemirror/codemirror\">Code</a>\n  </ul>\n  <ul>\n    <li><a href=\"../index.html\">Language modes</a>\n    <li><a class=active href=\"#\">JSON-LD</a>\n  </ul>\n</div>\n\n<article>\n<h2>JSON-LD mode</h2>\n\n\n<div><textarea id=\"code\" name=\"code\">\n{\n  \"@context\": {\n    \"name\": \"http://schema.org/name\",\n    \"description\": \"http://schema.org/description\",\n    \"image\": {\n      \"@id\": \"http://schema.org/image\",\n      \"@type\": \"@id\"\n    },\n    \"geo\": \"http://schema.org/geo\",\n    \"latitude\": {\n      \"@id\": \"http://schema.org/latitude\",\n      \"@type\": \"xsd:float\"\n    },\n    \"longitude\": {\n      \"@id\": \"http://schema.org/longitude\",\n      \"@type\": \"xsd:float\"\n    },\n    \"xsd\": \"http://www.w3.org/2001/XMLSchema#\"\n  },\n  \"name\": \"The Empire State Building\",\n  \"description\": \"The Empire State Building is a 102-story landmark in New York City.\",\n  \"image\": \"http://www.civil.usherbrooke.ca/cours/gci215a/empire-state-building.jpg\",\n  \"geo\": {\n    \"latitude\": \"40.75\",\n    \"longitude\": \"73.98\"\n  }\n}\n</textarea></div>\n\n    <script>\n      var editor = CodeMirror.fromTextArea(document.getElementById(\"code\"), {\n        matchBrackets: true,\n        autoCloseBrackets: true,\n        mode: \"application/ld+json\",\n        lineWrapping: true\n      });\n    </script>\n    \n    <p>This is a specialization of the <a href=\"index.html\">JavaScript mode</a>.</p>\n  </article>\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/javascript/test.js",
    "content": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n(function() {\n  var mode = CodeMirror.getMode({indentUnit: 2}, \"javascript\");\n  function MT(name) { test.mode(name, mode, Array.prototype.slice.call(arguments, 1)); }\n\n  MT(\"locals\",\n     \"[keyword function] [variable foo]([def a], [def b]) { [keyword var] [def c] [operator =] [number 10]; [keyword return] [variable-2 a] [operator +] [variable-2 c] [operator +] [variable d]; }\");\n\n  MT(\"comma-and-binop\",\n     \"[keyword function](){ [keyword var] [def x] [operator =] [number 1] [operator +] [number 2], [def y]; }\");\n\n  MT(\"destructuring\",\n     \"([keyword function]([def a], [[[def b], [def c] ]]) {\",\n     \"  [keyword let] {[def d], [property foo]: [def c][operator =][number 10], [def x]} [operator =] [variable foo]([variable-2 a]);\",\n     \"  [[[variable-2 c], [variable y] ]] [operator =] [variable-2 c];\",\n     \"})();\");\n\n  MT(\"class_body\",\n     \"[keyword class] [variable Foo] {\",\n     \"  [property constructor]() {}\",\n     \"  [property sayName]() {\",\n     \"    [keyword return] [string-2 `foo${][variable foo][string-2 }oo`];\",\n     \"  }\",\n     \"}\");\n\n  MT(\"class\",\n     \"[keyword class] [variable Point] [keyword extends] [variable SuperThing] {\",\n     \"  [property get] [property prop]() { [keyword return] [number 24]; }\",\n     \"  [property constructor]([def x], [def y]) {\",\n     \"    [keyword super]([string 'something']);\",\n     \"    [keyword this].[property x] [operator =] [variable-2 x];\",\n     \"  }\",\n     \"}\");\n\n  MT(\"module\",\n     \"[keyword module] [string 'foo'] {\",\n     \"  [keyword export] [keyword let] [def x] [operator =] [number 42];\",\n     \"  [keyword export] [keyword *] [keyword from] [string 'somewhere'];\",\n     \"}\");\n\n  MT(\"import\",\n     \"[keyword function] [variable foo]() {\",\n     \"  [keyword import] [def $] [keyword from] [string 'jquery'];\",\n     \"  [keyword module] [def crypto] [keyword from] [string 'crypto'];\",\n     \"  [keyword import] { [def encrypt], [def decrypt] } [keyword from] [string 'crypto'];\",\n     \"}\");\n\n  MT(\"const\",\n     \"[keyword function] [variable f]() {\",\n     \"  [keyword const] [[ [def a], [def b] ]] [operator =] [[ [number 1], [number 2] ]];\",\n     \"}\");\n\n  MT(\"for/of\",\n     \"[keyword for]([keyword let] [variable of] [keyword of] [variable something]) {}\");\n\n  MT(\"generator\",\n     \"[keyword function*] [variable repeat]([def n]) {\",\n     \"  [keyword for]([keyword var] [def i] [operator =] [number 0]; [variable-2 i] [operator <] [variable-2 n]; [operator ++][variable-2 i])\",\n     \"    [keyword yield] [variable-2 i];\",\n     \"}\");\n\n  MT(\"quotedStringAddition\",\n     \"[keyword let] [variable f] [operator =] [variable a] [operator +] [string 'fatarrow'] [operator +] [variable c];\");\n\n  MT(\"quotedFatArrow\",\n     \"[keyword let] [variable f] [operator =] [variable a] [operator +] [string '=>'] [operator +] [variable c];\");\n\n  MT(\"fatArrow\",\n     \"[variable array].[property filter]([def a] [operator =>] [variable-2 a] [operator +] [number 1]);\",\n     \"[variable a];\", // No longer in scope\n     \"[keyword let] [variable f] [operator =] ([[ [def a], [def b] ]], [def c]) [operator =>] [variable-2 a] [operator +] [variable-2 c];\",\n     \"[variable c];\");\n\n  MT(\"spread\",\n     \"[keyword function] [variable f]([def a], [meta ...][def b]) {\",\n     \"  [variable something]([variable-2 a], [meta ...][variable-2 b]);\",\n     \"}\");\n\n  MT(\"comprehension\",\n     \"[keyword function] [variable f]() {\",\n     \"  [[([variable x] [operator +] [number 1]) [keyword for] ([keyword var] [def x] [keyword in] [variable y]) [keyword if] [variable pred]([variable-2 x]) ]];\",\n     \"  ([variable u] [keyword for] ([keyword var] [def u] [keyword of] [variable generateValues]()) [keyword if] ([variable-2 u].[property color] [operator ===] [string 'blue']));\",\n     \"}\");\n\n  MT(\"quasi\",\n     \"[variable re][string-2 `fofdlakj${][variable x] [operator +] ([variable re][string-2 `foo`]) [operator +] [number 1][string-2 }fdsa`] [operator +] [number 2]\");\n\n  MT(\"quasi_no_function\",\n     \"[variable x] [operator =] [string-2 `fofdlakj${][variable x] [operator +] [string-2 `foo`] [operator +] [number 1][string-2 }fdsa`] [operator +] [number 2]\");\n\n  MT(\"indent_statement\",\n     \"[keyword var] [variable x] [operator =] [number 10]\",\n     \"[variable x] [operator +=] [variable y] [operator +]\",\n     \"  [atom Infinity]\",\n     \"[keyword debugger];\");\n\n  MT(\"indent_if\",\n     \"[keyword if] ([number 1])\",\n     \"  [keyword break];\",\n     \"[keyword else] [keyword if] ([number 2])\",\n     \"  [keyword continue];\",\n     \"[keyword else]\",\n     \"  [number 10];\",\n     \"[keyword if] ([number 1]) {\",\n     \"  [keyword break];\",\n     \"} [keyword else] [keyword if] ([number 2]) {\",\n     \"  [keyword continue];\",\n     \"} [keyword else] {\",\n     \"  [number 10];\",\n     \"}\");\n\n  MT(\"indent_for\",\n     \"[keyword for] ([keyword var] [variable i] [operator =] [number 0];\",\n     \"     [variable i] [operator <] [number 100];\",\n     \"     [variable i][operator ++])\",\n     \"  [variable doSomething]([variable i]);\",\n     \"[keyword debugger];\");\n\n  MT(\"indent_c_style\",\n     \"[keyword function] [variable foo]()\",\n     \"{\",\n     \"  [keyword debugger];\",\n     \"}\");\n\n  MT(\"indent_else\",\n     \"[keyword for] (;;)\",\n     \"  [keyword if] ([variable foo])\",\n     \"    [keyword if] ([variable bar])\",\n     \"      [number 1];\",\n     \"    [keyword else]\",\n     \"      [number 2];\",\n     \"  [keyword else]\",\n     \"    [number 3];\");\n\n  MT(\"indent_funarg\",\n     \"[variable foo]([number 10000],\",\n     \"    [keyword function]([def a]) {\",\n     \"  [keyword debugger];\",\n     \"};\");\n\n  MT(\"indent_below_if\",\n     \"[keyword for] (;;)\",\n     \"  [keyword if] ([variable foo])\",\n     \"    [number 1];\",\n     \"[number 2];\");\n\n  MT(\"multilinestring\",\n     \"[keyword var] [variable x] [operator =] [string 'foo\\\\]\",\n     \"[string bar'];\");\n\n  MT(\"scary_regexp\",\n     \"[string-2 /foo[[/]]bar/];\");\n\n  MT(\"indent_strange_array\",\n     \"[keyword var] [variable x] [operator =] [[\",\n     \"  [number 1],,\",\n     \"  [number 2],\",\n     \"]];\",\n     \"[number 10];\");\n\n  var jsonld_mode = CodeMirror.getMode(\n    {indentUnit: 2},\n    {name: \"javascript\", jsonld: true}\n  );\n  function LD(name) {\n    test.mode(name, jsonld_mode, Array.prototype.slice.call(arguments, 1));\n  }\n\n  LD(\"json_ld_keywords\",\n    '{',\n    '  [meta \"@context\"]: {',\n    '    [meta \"@base\"]: [string \"http://example.com\"],',\n    '    [meta \"@vocab\"]: [string \"http://xmlns.com/foaf/0.1/\"],',\n    '    [property \"likesFlavor\"]: {',\n    '      [meta \"@container\"]: [meta \"@list\"]',\n    '      [meta \"@reverse\"]: [string \"@beFavoriteOf\"]',\n    '    },',\n    '    [property \"nick\"]: { [meta \"@container\"]: [meta \"@set\"] },',\n    '    [property \"nick\"]: { [meta \"@container\"]: [meta \"@index\"] }',\n    '  },',\n    '  [meta \"@graph\"]: [[ {',\n    '    [meta \"@id\"]: [string \"http://dbpedia.org/resource/John_Lennon\"],',\n    '    [property \"name\"]: [string \"John Lennon\"],',\n    '    [property \"modified\"]: {',\n    '      [meta \"@value\"]: [string \"2010-05-29T14:17:39+02:00\"],',\n    '      [meta \"@type\"]: [string \"http://www.w3.org/2001/XMLSchema#dateTime\"]',\n    '    }',\n    '  } ]]',\n    '}');\n\n  LD(\"json_ld_fake\",\n    '{',\n    '  [property \"@fake\"]: [string \"@fake\"],',\n    '  [property \"@contextual\"]: [string \"@identifier\"],',\n    '  [property \"user@domain.com\"]: [string \"@graphical\"],',\n    '  [property \"@ID\"]: [string \"@@ID\"]',\n    '}');\n})();\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/javascript/typescript.html",
    "content": "<!doctype html>\n\n<title>CodeMirror: TypeScript mode</title>\n<meta charset=\"utf-8\"/>\n<link rel=stylesheet href=\"../../doc/docs.css\">\n\n<link rel=\"stylesheet\" href=\"../../lib/codemirror.css\">\n<script src=\"../../lib/codemirror.js\"></script>\n<script src=\"javascript.js\"></script>\n<style type=\"text/css\">.CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}</style>\n<div id=nav>\n  <a href=\"http://codemirror.net\"><h1>CodeMirror</h1><img id=logo src=\"../../doc/logo.png\"></a>\n\n  <ul>\n    <li><a href=\"../../index.html\">Home</a>\n    <li><a href=\"../../doc/manual.html\">Manual</a>\n    <li><a href=\"https://github.com/codemirror/codemirror\">Code</a>\n  </ul>\n  <ul>\n    <li><a href=\"../index.html\">Language modes</a>\n    <li><a class=active href=\"#\">TypeScript</a>\n  </ul>\n</div>\n\n<article>\n<h2>TypeScript mode</h2>\n\n\n<div><textarea id=\"code\" name=\"code\">\nclass Greeter {\n\tgreeting: string;\n\tconstructor (message: string) {\n\t\tthis.greeting = message;\n\t}\n\tgreet() {\n\t\treturn \"Hello, \" + this.greeting;\n\t}\n}   \n\nvar greeter = new Greeter(\"world\");\n\nvar button = document.createElement('button')\nbutton.innerText = \"Say Hello\"\nbutton.onclick = function() {\n\talert(greeter.greet())\n}\n\ndocument.body.appendChild(button)\n\n</textarea></div>\n\n    <script>\n      var editor = CodeMirror.fromTextArea(document.getElementById(\"code\"), {\n        lineNumbers: true,\n        matchBrackets: true,\n        mode: \"text/typescript\"\n      });\n    </script>\n\n    <p>This is a specialization of the <a href=\"index.html\">JavaScript mode</a>.</p>\n  </article>\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/jinja2/index.html",
    "content": "<!doctype html>\n\n<title>CodeMirror: Jinja2 mode</title>\n<meta charset=\"utf-8\"/>\n<link rel=stylesheet href=\"../../doc/docs.css\">\n\n<link rel=\"stylesheet\" href=\"../../lib/codemirror.css\">\n<script src=\"../../lib/codemirror.js\"></script>\n<script src=\"jinja2.js\"></script>\n<style type=\"text/css\">.CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}</style>\n<div id=nav>\n  <a href=\"http://codemirror.net\"><h1>CodeMirror</h1><img id=logo src=\"../../doc/logo.png\"></a>\n\n  <ul>\n    <li><a href=\"../../index.html\">Home</a>\n    <li><a href=\"../../doc/manual.html\">Manual</a>\n    <li><a href=\"https://github.com/codemirror/codemirror\">Code</a>\n  </ul>\n  <ul>\n    <li><a href=\"../index.html\">Language modes</a>\n    <li><a class=active href=\"#\">Jinja2</a>\n  </ul>\n</div>\n\n<article>\n<h2>Jinja2 mode</h2>\n<form><textarea id=\"code\" name=\"code\">\n{# this is a comment #}\n{%- for item in li -%}\n  &lt;li&gt;{{ item.label }}&lt;/li&gt;\n{% endfor -%}\n{{ item.sand == true and item.keyword == false ? 1 : 0 }}\n{{ app.get(55, 1.2, true) }}\n{% if app.get(&#39;_route&#39;) == (&#39;_home&#39;) %}home{% endif %}\n{% if app.session.flashbag.has(&#39;message&#39;) %}\n  {% for message in app.session.flashbag.get(&#39;message&#39;) %}\n    {{ message.content }}\n  {% endfor %}\n{% endif %}\n{{ path(&#39;_home&#39;, {&#39;section&#39;: app.request.get(&#39;section&#39;)}) }}\n{{ path(&#39;_home&#39;, {\n    &#39;section&#39;: app.request.get(&#39;section&#39;),\n    &#39;boolean&#39;: true,\n    &#39;number&#39;: 55.33\n  })\n}}\n{% include (&#39;test.incl.html.twig&#39;) %}\n</textarea></form>\n    <script>\n      var editor =\n      CodeMirror.fromTextArea(document.getElementById(\"code\"), {mode:\n        {name: \"jinja2\", htmlMode: true}});\n    </script>\n  </article>\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/jinja2/jinja2.js",
    "content": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n(function(mod) {\n  if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n    mod(require(\"../../lib/codemirror\"));\n  else if (typeof define == \"function\" && define.amd) // AMD\n    define([\"../../lib/codemirror\"], mod);\n  else // Plain browser env\n    mod(CodeMirror);\n})(function(CodeMirror) {\n  \"use strict\";\n\n  CodeMirror.defineMode(\"jinja2\", function() {\n    var keywords = [\"and\", \"as\", \"block\", \"endblock\", \"by\", \"cycle\", \"debug\", \"else\", \"elif\",\n      \"extends\", \"filter\", \"endfilter\", \"firstof\", \"for\",\n      \"endfor\", \"if\", \"endif\", \"ifchanged\", \"endifchanged\",\n      \"ifequal\", \"endifequal\", \"ifnotequal\",\n      \"endifnotequal\", \"in\", \"include\", \"load\", \"not\", \"now\", \"or\",\n      \"parsed\", \"regroup\", \"reversed\", \"spaceless\",\n      \"endspaceless\", \"ssi\", \"templatetag\", \"openblock\",\n      \"closeblock\", \"openvariable\", \"closevariable\",\n      \"openbrace\", \"closebrace\", \"opencomment\",\n      \"closecomment\", \"widthratio\", \"url\", \"with\", \"endwith\",\n      \"get_current_language\", \"trans\", \"endtrans\", \"noop\", \"blocktrans\",\n      \"endblocktrans\", \"get_available_languages\",\n      \"get_current_language_bidi\", \"plural\"],\n    operator = /^[+\\-*&%=<>!?|~^]/,\n    sign = /^[:\\[\\(\\{]/,\n    atom = [\"true\", \"false\"],\n    number = /^(\\d[+\\-\\*\\/])?\\d+(\\.\\d+)?/;\n\n    keywords = new RegExp(\"((\" + keywords.join(\")|(\") + \"))\\\\b\");\n    atom = new RegExp(\"((\" + atom.join(\")|(\") + \"))\\\\b\");\n\n    function tokenBase (stream, state) {\n      var ch = stream.peek();\n\n      //Comment\n      if (state.incomment) {\n        if(!stream.skipTo(\"#}\")) {\n          stream.skipToEnd();\n        } else {\n          stream.eatWhile(/\\#|}/);\n          state.incomment = false;\n        }\n        return \"comment\";\n      //Tag\n      } else if (state.intag) {\n        //After operator\n        if(state.operator) {\n          state.operator = false;\n          if(stream.match(atom)) {\n            return \"atom\";\n          }\n          if(stream.match(number)) {\n            return \"number\";\n          }\n        }\n        //After sign\n        if(state.sign) {\n          state.sign = false;\n          if(stream.match(atom)) {\n            return \"atom\";\n          }\n          if(stream.match(number)) {\n            return \"number\";\n          }\n        }\n\n        if(state.instring) {\n          if(ch == state.instring) {\n            state.instring = false;\n          }\n          stream.next();\n          return \"string\";\n        } else if(ch == \"'\" || ch == '\"') {\n          state.instring = ch;\n          stream.next();\n          return \"string\";\n        } else if(stream.match(state.intag + \"}\") || stream.eat(\"-\") && stream.match(state.intag + \"}\")) {\n          state.intag = false;\n          return \"tag\";\n        } else if(stream.match(operator)) {\n          state.operator = true;\n          return \"operator\";\n        } else if(stream.match(sign)) {\n          state.sign = true;\n        } else {\n          if(stream.eat(\" \") || stream.sol()) {\n            if(stream.match(keywords)) {\n              return \"keyword\";\n            }\n            if(stream.match(atom)) {\n              return \"atom\";\n            }\n            if(stream.match(number)) {\n              return \"number\";\n            }\n            if(stream.sol()) {\n              stream.next();\n            }\n          } else {\n            stream.next();\n          }\n\n        }\n        return \"variable\";\n      } else if (stream.eat(\"{\")) {\n        if (ch = stream.eat(\"#\")) {\n          state.incomment = true;\n          if(!stream.skipTo(\"#}\")) {\n            stream.skipToEnd();\n          } else {\n            stream.eatWhile(/\\#|}/);\n            state.incomment = false;\n          }\n          return \"comment\";\n        //Open tag\n        } else if (ch = stream.eat(/\\{|%/)) {\n          //Cache close tag\n          state.intag = ch;\n          if(ch == \"{\") {\n            state.intag = \"}\";\n          }\n          stream.eat(\"-\");\n          return \"tag\";\n        }\n      }\n      stream.next();\n    };\n\n    return {\n      startState: function () {\n        return {tokenize: tokenBase};\n      },\n      token: function (stream, state) {\n        return state.tokenize(stream, state);\n      }\n    };\n  });\n});\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/julia/index.html",
    "content": "<!doctype html>\n\n<title>CodeMirror: Julia mode</title>\n<meta charset=\"utf-8\"/>\n<link rel=stylesheet href=\"../../doc/docs.css\">\n\n<link rel=\"stylesheet\" href=\"../../lib/codemirror.css\">\n<script src=\"../../lib/codemirror.js\"></script>\n<script src=\"julia.js\"></script>\n<style type=\"text/css\">.CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}</style>\n<div id=nav>\n  <a href=\"http://codemirror.net\"><h1>CodeMirror</h1><img id=logo src=\"../../doc/logo.png\"></a>\n\n  <ul>\n    <li><a href=\"../../index.html\">Home</a>\n    <li><a href=\"../../doc/manual.html\">Manual</a>\n    <li><a href=\"https://github.com/codemirror/codemirror\">Code</a>\n  </ul>\n  <ul>\n    <li><a href=\"../index.html\">Language modes</a>\n    <li><a class=active href=\"#\">Julia</a>\n  </ul>\n</div>\n\n<article>\n<h2>Julia mode</h2>\n\n    <div><textarea id=\"code\" name=\"code\">\n#numbers\n1234\n1234im\n.234\n.234im\n2.23im\n2.3f3\n23e2\n0x234\n\n#strings\n'a'\n\"asdf\"\nr\"regex\"\nb\"bytestring\"\n\n\"\"\"\nmultiline string\n\"\"\"\n\n#identifiers\na\nas123\nfunction_name!\n\n#unicode identifiers\n# a = x\\ddot\na⃗ = ẍ\n# a = v\\dot\na⃗ = v̇\n#F\\vec = m \\cdotp a\\vec\nF⃗ = m·a⃗\n\n#literal identifier multiples\n3x\n4[1, 2, 3]\n\n#dicts and indexing\nx=[1, 2, 3]\nx[end-1]\nx={\"julia\"=>\"language of technical computing\"}\n\n\n#exception handling\ntry\n  f()\ncatch\n  @printf \"Error\"\nfinally\n  g()\nend\n\n#types\nimmutable Color{T<:Number}\n  r::T\n  g::T\n  b::T\nend\n\n#functions\nfunction change!(x::Vector{Float64})\n  for i = 1:length(x)\n    x[i] *= 2\n  end\nend\n\n#function invocation\nf('b', (2, 3)...)\n\n#operators\n|=\n&=\n^=\n\\-\n%=\n*=\n+=\n-=\n<=\n>=\n!=\n==\n%\n*\n+\n-\n<\n>\n!\n=\n|\n&\n^\n\\\n?\n~\n:\n$\n<:\n.<\n.>\n<<\n<<=\n>>\n>>>>\n>>=\n>>>=\n<<=\n<<<=\n.<=\n.>=\n.==\n->\n//\nin\n...\n//\n:=\n.//=\n.*=\n./=\n.^=\n.%=\n.+=\n.-=\n\\=\n\\\\=\n||\n===\n&&\n|=\n.|=\n<:\n>:\n|>\n<|\n::\nx ? y : z\n\n#macros\n@spawnat 2 1+1\n@eval(:x)\n\n#keywords and operators\nif else elseif while for\n begin let end do\ntry catch finally return break continue\nglobal local const \nexport import importall using\nfunction macro module baremodule \ntype immutable quote\ntrue false enumerate\n\n\n    </textarea></div>\n    <script>\n      var editor = CodeMirror.fromTextArea(document.getElementById(\"code\"), {\n        mode: {name: \"julia\",\n               },\n        lineNumbers: true,\n        indentUnit: 4,\n        matchBrackets: true\n      });\n    </script>\n\n    <p><strong>MIME types defined:</strong> <code>text/x-julia</code>.</p>\n</article>\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/julia/julia.js",
    "content": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n(function(mod) {\n  if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n    mod(require(\"../../lib/codemirror\"));\n  else if (typeof define == \"function\" && define.amd) // AMD\n    define([\"../../lib/codemirror\"], mod);\n  else // Plain browser env\n    mod(CodeMirror);\n})(function(CodeMirror) {\n\"use strict\";\n\nCodeMirror.defineMode(\"julia\", function(_conf, parserConf) {\n  var ERRORCLASS = 'error';\n\n  function wordRegexp(words) {\n    return new RegExp(\"^((\" + words.join(\")|(\") + \"))\\\\b\");\n  }\n\n  var operators = parserConf.operators || /^\\.?[|&^\\\\%*+\\-<>!=\\/]=?|\\?|~|:|\\$|\\.[<>]|<<=?|>>>?=?|\\.[<>=]=|->?|\\/\\/|\\bin\\b/;\n  var delimiters = parserConf.delimiters || /^[;,()[\\]{}]/;\n  var identifiers = parserConf.identifiers|| /^[_A-Za-z\\u00A1-\\uFFFF][_A-Za-z0-9\\u00A1-\\uFFFF]*!*/;\n  var blockOpeners = [\"begin\", \"function\", \"type\", \"immutable\", \"let\", \"macro\", \"for\", \"while\", \"quote\", \"if\", \"else\", \"elseif\", \"try\", \"finally\", \"catch\", \"do\"];\n  var blockClosers = [\"end\", \"else\", \"elseif\", \"catch\", \"finally\"];\n  var keywordList = ['if', 'else', 'elseif', 'while', 'for', 'begin', 'let', 'end', 'do', 'try', 'catch', 'finally', 'return', 'break', 'continue', 'global', 'local', 'const', 'export', 'import', 'importall', 'using', 'function', 'macro', 'module', 'baremodule', 'type', 'immutable', 'quote', 'typealias', 'abstract', 'bitstype', 'ccall'];\n  var builtinList = ['true', 'false', 'enumerate', 'open', 'close', 'nothing', 'NaN', 'Inf', 'print', 'println', 'Int', 'Int8', 'Uint8', 'Int16', 'Uint16', 'Int32', 'Uint32', 'Int64', 'Uint64', 'Int128', 'Uint128', 'Bool', 'Char', 'Float16', 'Float32', 'Float64', 'Array', 'Vector', 'Matrix', 'String', 'UTF8String', 'ASCIIString', 'error', 'warn', 'info', '@printf'];\n\n  //var stringPrefixes = new RegExp(\"^[br]?('|\\\")\")\n  var stringPrefixes = /^(`|'|\"{3}|([br]?\"))/;\n  var keywords = wordRegexp(keywordList);\n  var builtins = wordRegexp(builtinList);\n  var openers = wordRegexp(blockOpeners);\n  var closers = wordRegexp(blockClosers);\n  var macro = /^@[_A-Za-z][_A-Za-z0-9]*/;\n  var symbol = /^:[_A-Za-z][_A-Za-z0-9]*/;\n  var indentInfo = null;\n\n  function in_array(state) {\n    var ch = cur_scope(state);\n    if(ch==\"[\" || ch==\"{\") {\n      return true;\n    }\n    else {\n      return false;\n    }\n  }\n\n  function cur_scope(state) {\n    if(state.scopes.length==0) {\n      return null;\n    }\n    return state.scopes[state.scopes.length - 1];\n  }\n\n  // tokenizers\n  function tokenBase(stream, state) {\n    // Handle scope changes\n    var leaving_expr = state.leaving_expr;\n    if(stream.sol()) {\n      leaving_expr = false;\n    }\n    state.leaving_expr = false;\n    if(leaving_expr) {\n      if(stream.match(/^'+/)) {\n        return 'operator';\n      }\n\n    }\n\n    if(stream.match(/^\\.{2,3}/)) {\n      return 'operator';\n    }\n\n    if (stream.eatSpace()) {\n      return null;\n    }\n\n    var ch = stream.peek();\n    // Handle Comments\n    if (ch === '#') {\n        stream.skipToEnd();\n        return 'comment';\n    }\n    if(ch==='[') {\n      state.scopes.push(\"[\");\n    }\n\n    if(ch==='{') {\n      state.scopes.push(\"{\");\n    }\n\n    var scope=cur_scope(state);\n\n    if(scope==='[' && ch===']') {\n      state.scopes.pop();\n      state.leaving_expr=true;\n    }\n\n    if(scope==='{' && ch==='}') {\n      state.scopes.pop();\n      state.leaving_expr=true;\n    }\n\n    if(ch===')') {\n      state.leaving_expr = true;\n    }\n\n    var match;\n    if(!in_array(state) && (match=stream.match(openers, false))) {\n      state.scopes.push(match);\n    }\n\n    if(!in_array(state) && stream.match(closers, false)) {\n      state.scopes.pop();\n    }\n\n    if(in_array(state)) {\n      if(stream.match(/^end/)) {\n        return 'number';\n      }\n\n    }\n\n    if(stream.match(/^=>/)) {\n      return 'operator';\n    }\n\n\n    // Handle Number Literals\n    if (stream.match(/^[0-9\\.]/, false)) {\n      var imMatcher = RegExp(/^im\\b/);\n      var floatLiteral = false;\n      // Floats\n      if (stream.match(/^\\d*\\.(?!\\.)\\d+([ef][\\+\\-]?\\d+)?/i)) { floatLiteral = true; }\n      if (stream.match(/^\\d+\\.(?!\\.)\\d*/)) { floatLiteral = true; }\n      if (stream.match(/^\\.\\d+/)) { floatLiteral = true; }\n      if (floatLiteral) {\n          // Float literals may be \"imaginary\"\n          stream.match(imMatcher);\n          state.leaving_expr = true;\n          return 'number';\n      }\n      // Integers\n      var intLiteral = false;\n      // Hex\n      if (stream.match(/^0x[0-9a-f]+/i)) { intLiteral = true; }\n      // Binary\n      if (stream.match(/^0b[01]+/i)) { intLiteral = true; }\n      // Octal\n      if (stream.match(/^0o[0-7]+/i)) { intLiteral = true; }\n      // Decimal\n      if (stream.match(/^[1-9]\\d*(e[\\+\\-]?\\d+)?/)) {\n          intLiteral = true;\n      }\n      // Zero by itself with no other piece of number.\n      if (stream.match(/^0(?![\\dx])/i)) { intLiteral = true; }\n      if (intLiteral) {\n          // Integer literals may be \"long\"\n          stream.match(imMatcher);\n          state.leaving_expr = true;\n          return 'number';\n      }\n    }\n\n    if(stream.match(/^(::)|(<:)/)) {\n      return 'operator';\n    }\n\n    // Handle symbols\n    if(!leaving_expr && stream.match(symbol)) {\n      return 'string';\n    }\n\n    // Handle operators and Delimiters\n    if (stream.match(operators)) {\n      return 'operator';\n    }\n\n\n    // Handle Strings\n    if (stream.match(stringPrefixes)) {\n      state.tokenize = tokenStringFactory(stream.current());\n      return state.tokenize(stream, state);\n    }\n\n    if (stream.match(macro)) {\n      return 'meta';\n    }\n\n\n    if (stream.match(delimiters)) {\n      return null;\n    }\n\n    if (stream.match(keywords)) {\n      return 'keyword';\n    }\n\n    if (stream.match(builtins)) {\n      return 'builtin';\n    }\n\n\n    if (stream.match(identifiers)) {\n      state.leaving_expr=true;\n      return 'variable';\n    }\n    // Handle non-detected items\n    stream.next();\n    return ERRORCLASS;\n  }\n\n  function tokenStringFactory(delimiter) {\n    while ('rub'.indexOf(delimiter.charAt(0).toLowerCase()) >= 0) {\n      delimiter = delimiter.substr(1);\n    }\n    var singleline = delimiter.length == 1;\n    var OUTCLASS = 'string';\n\n    function tokenString(stream, state) {\n      while (!stream.eol()) {\n        stream.eatWhile(/[^'\"\\\\]/);\n        if (stream.eat('\\\\')) {\n            stream.next();\n            if (singleline && stream.eol()) {\n              return OUTCLASS;\n            }\n        } else if (stream.match(delimiter)) {\n            state.tokenize = tokenBase;\n            return OUTCLASS;\n        } else {\n            stream.eat(/['\"]/);\n        }\n      }\n      if (singleline) {\n        if (parserConf.singleLineStringErrors) {\n            return ERRORCLASS;\n        } else {\n            state.tokenize = tokenBase;\n        }\n      }\n      return OUTCLASS;\n    }\n    tokenString.isString = true;\n    return tokenString;\n  }\n\n  function tokenLexer(stream, state) {\n    indentInfo = null;\n    var style = state.tokenize(stream, state);\n    var current = stream.current();\n\n    // Handle '.' connected identifiers\n    if (current === '.') {\n      style = stream.match(identifiers, false) ? null : ERRORCLASS;\n      if (style === null && state.lastStyle === 'meta') {\n          // Apply 'meta' style to '.' connected identifiers when\n          // appropriate.\n        style = 'meta';\n      }\n      return style;\n    }\n\n    return style;\n  }\n\n  var external = {\n    startState: function() {\n      return {\n        tokenize: tokenBase,\n        scopes: [],\n        leaving_expr: false\n      };\n    },\n\n    token: function(stream, state) {\n      var style = tokenLexer(stream, state);\n      state.lastStyle = style;\n      return style;\n    },\n\n    indent: function(state, textAfter) {\n      var delta = 0;\n      if(textAfter==\"end\" || textAfter==\"]\" || textAfter==\"}\" || textAfter==\"else\" || textAfter==\"elseif\" || textAfter==\"catch\" || textAfter==\"finally\") {\n        delta = -1;\n      }\n      return (state.scopes.length + delta) * 4;\n    },\n\n    lineComment: \"#\",\n    fold: \"indent\",\n    electricChars: \"edlsifyh]}\"\n  };\n  return external;\n});\n\n\nCodeMirror.defineMIME(\"text/x-julia\", \"julia\");\n\n});\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/kotlin/index.html",
    "content": "<!doctype html>\n\n<title>CodeMirror: Kotlin mode</title>\n<meta charset=\"utf-8\"/>\n<link rel=stylesheet href=\"../../doc/docs.css\">\n\n<link rel=\"stylesheet\" href=\"../../lib/codemirror.css\">\n<script src=\"../../lib/codemirror.js\"></script>\n<script src=\"kotlin.js\"></script>\n<style type=\"text/css\">.CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}</style>\n<div id=nav>\n  <a href=\"http://codemirror.net\"><h1>CodeMirror</h1><img id=logo src=\"../../doc/logo.png\"></a>\n\n  <ul>\n    <li><a href=\"../../index.html\">Home</a>\n    <li><a href=\"../../doc/manual.html\">Manual</a>\n    <li><a href=\"https://github.com/codemirror/codemirror\">Code</a>\n  </ul>\n  <ul>\n    <li><a href=\"../index.html\">Language modes</a>\n    <li><a class=active href=\"#\">Kotlin</a>\n  </ul>\n</div>\n\n<article>\n<h2>Kotlin mode</h2>\n\n\n<div><textarea id=\"code\" name=\"code\">\npackage org.wasabi.http\n\nimport java.util.concurrent.Executors\nimport java.net.InetSocketAddress\nimport org.wasabi.app.AppConfiguration\nimport io.netty.bootstrap.ServerBootstrap\nimport io.netty.channel.nio.NioEventLoopGroup\nimport io.netty.channel.socket.nio.NioServerSocketChannel\nimport org.wasabi.app.AppServer\n\npublic class HttpServer(private val appServer: AppServer) {\n\n    val bootstrap: ServerBootstrap\n    val primaryGroup: NioEventLoopGroup\n    val workerGroup:  NioEventLoopGroup\n\n    {\n        // Define worker groups\n        primaryGroup = NioEventLoopGroup()\n        workerGroup = NioEventLoopGroup()\n\n        // Initialize bootstrap of server\n        bootstrap = ServerBootstrap()\n\n        bootstrap.group(primaryGroup, workerGroup)\n        bootstrap.channel(javaClass<NioServerSocketChannel>())\n        bootstrap.childHandler(NettyPipelineInitializer(appServer))\n    }\n\n    public fun start(wait: Boolean = true) {\n        val channel = bootstrap.bind(appServer.configuration.port)?.sync()?.channel()\n\n        if (wait) {\n            channel?.closeFuture()?.sync()\n        }\n    }\n\n    public fun stop() {\n        // Shutdown all event loops\n        primaryGroup.shutdownGracefully()\n        workerGroup.shutdownGracefully()\n\n        // Wait till all threads are terminated\n        primaryGroup.terminationFuture().sync()\n        workerGroup.terminationFuture().sync()\n    }\n}\n</textarea></div>\n\n    <script>\n        var editor = CodeMirror.fromTextArea(document.getElementById(\"code\"), {\n            mode: {name: \"kotlin\"},\n            lineNumbers: true,\n            indentUnit: 4\n        });\n    </script>\n    <h3>Mode for Kotlin (http://kotlin.jetbrains.org/)</h3>\n    <p>Developed by Hadi Hariri (https://github.com/hhariri).</p>\n    <p><strong>MIME type defined:</strong> <code>text/x-kotlin</code>.</p>\n</article>\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/kotlin/kotlin.js",
    "content": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n(function(mod) {\n  if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n    mod(require(\"../../lib/codemirror\"));\n  else if (typeof define == \"function\" && define.amd) // AMD\n    define([\"../../lib/codemirror\"], mod);\n  else // Plain browser env\n    mod(CodeMirror);\n})(function(CodeMirror) {\n\"use strict\";\n\nCodeMirror.defineMode(\"kotlin\", function (config, parserConfig) {\n  function words(str) {\n    var obj = {}, words = str.split(\" \");\n    for (var i = 0; i < words.length; ++i) obj[words[i]] = true;\n    return obj;\n  }\n\n  var multiLineStrings = parserConfig.multiLineStrings;\n\n  var keywords = words(\n          \"package continue return object while break class data trait throw super\" +\n          \" when type this else This try val var fun for is in if do as true false null get set\");\n  var softKeywords = words(\"import\" +\n      \" where by get set abstract enum open annotation override private public internal\" +\n      \" protected catch out vararg inline finally final ref\");\n  var blockKeywords = words(\"catch class do else finally for if where try while enum\");\n  var atoms = words(\"null true false this\");\n\n  var curPunc;\n\n  function tokenBase(stream, state) {\n    var ch = stream.next();\n    if (ch == '\"' || ch == \"'\") {\n      return startString(ch, stream, state);\n    }\n    // Wildcard import w/o trailing semicolon (import smth.*)\n    if (ch == \".\" && stream.eat(\"*\")) {\n      return \"word\";\n    }\n    if (/[\\[\\]{}\\(\\),;\\:\\.]/.test(ch)) {\n      curPunc = ch;\n      return null;\n    }\n    if (/\\d/.test(ch)) {\n      if (stream.eat(/eE/)) {\n        stream.eat(/\\+\\-/);\n        stream.eatWhile(/\\d/);\n      }\n      return \"number\";\n    }\n    if (ch == \"/\") {\n      if (stream.eat(\"*\")) {\n        state.tokenize.push(tokenComment);\n        return tokenComment(stream, state);\n      }\n      if (stream.eat(\"/\")) {\n        stream.skipToEnd();\n        return \"comment\";\n      }\n      if (expectExpression(state.lastToken)) {\n        return startString(ch, stream, state);\n      }\n    }\n    // Commented\n    if (ch == \"-\" && stream.eat(\">\")) {\n      curPunc = \"->\";\n      return null;\n    }\n    if (/[\\-+*&%=<>!?|\\/~]/.test(ch)) {\n      stream.eatWhile(/[\\-+*&%=<>|~]/);\n      return \"operator\";\n    }\n    stream.eatWhile(/[\\w\\$_]/);\n\n    var cur = stream.current();\n    if (atoms.propertyIsEnumerable(cur)) {\n      return \"atom\";\n    }\n    if (softKeywords.propertyIsEnumerable(cur)) {\n      if (blockKeywords.propertyIsEnumerable(cur)) curPunc = \"newstatement\";\n      return \"softKeyword\";\n    }\n\n    if (keywords.propertyIsEnumerable(cur)) {\n      if (blockKeywords.propertyIsEnumerable(cur)) curPunc = \"newstatement\";\n      return \"keyword\";\n    }\n    return \"word\";\n  }\n\n  tokenBase.isBase = true;\n\n  function startString(quote, stream, state) {\n    var tripleQuoted = false;\n    if (quote != \"/\" && stream.eat(quote)) {\n      if (stream.eat(quote)) tripleQuoted = true;\n      else return \"string\";\n    }\n    function t(stream, state) {\n      var escaped = false, next, end = !tripleQuoted;\n\n      while ((next = stream.next()) != null) {\n        if (next == quote && !escaped) {\n          if (!tripleQuoted) {\n            break;\n          }\n          if (stream.match(quote + quote)) {\n            end = true;\n            break;\n          }\n        }\n\n        if (quote == '\"' && next == \"$\" && !escaped && stream.eat(\"{\")) {\n          state.tokenize.push(tokenBaseUntilBrace());\n          return \"string\";\n        }\n\n        if (next == \"$\" && !escaped && !stream.eat(\" \")) {\n          state.tokenize.push(tokenBaseUntilSpace());\n          return \"string\";\n        }\n        escaped = !escaped && next == \"\\\\\";\n      }\n      if (multiLineStrings)\n        state.tokenize.push(t);\n      if (end) state.tokenize.pop();\n      return \"string\";\n    }\n\n    state.tokenize.push(t);\n    return t(stream, state);\n  }\n\n  function tokenBaseUntilBrace() {\n    var depth = 1;\n\n    function t(stream, state) {\n      if (stream.peek() == \"}\") {\n        depth--;\n        if (depth == 0) {\n          state.tokenize.pop();\n          return state.tokenize[state.tokenize.length - 1](stream, state);\n        }\n      } else if (stream.peek() == \"{\") {\n        depth++;\n      }\n      return tokenBase(stream, state);\n    }\n\n    t.isBase = true;\n    return t;\n  }\n\n  function tokenBaseUntilSpace() {\n    function t(stream, state) {\n      if (stream.eat(/[\\w]/)) {\n        var isWord = stream.eatWhile(/[\\w]/);\n        if (isWord) {\n          state.tokenize.pop();\n          return \"word\";\n        }\n      }\n      state.tokenize.pop();\n      return \"string\";\n    }\n\n    t.isBase = true;\n    return t;\n  }\n\n  function tokenComment(stream, state) {\n    var maybeEnd = false, ch;\n    while (ch = stream.next()) {\n      if (ch == \"/\" && maybeEnd) {\n        state.tokenize.pop();\n        break;\n      }\n      maybeEnd = (ch == \"*\");\n    }\n    return \"comment\";\n  }\n\n  function expectExpression(last) {\n    return !last || last == \"operator\" || last == \"->\" || /[\\.\\[\\{\\(,;:]/.test(last) ||\n        last == \"newstatement\" || last == \"keyword\" || last == \"proplabel\";\n  }\n\n  function Context(indented, column, type, align, prev) {\n    this.indented = indented;\n    this.column = column;\n    this.type = type;\n    this.align = align;\n    this.prev = prev;\n  }\n\n  function pushContext(state, col, type) {\n    return state.context = new Context(state.indented, col, type, null, state.context);\n  }\n\n  function popContext(state) {\n    var t = state.context.type;\n    if (t == \")\" || t == \"]\" || t == \"}\")\n      state.indented = state.context.indented;\n    return state.context = state.context.prev;\n  }\n\n  // Interface\n\n  return {\n    startState: function (basecolumn) {\n      return {\n        tokenize: [tokenBase],\n        context: new Context((basecolumn || 0) - config.indentUnit, 0, \"top\", false),\n        indented: 0,\n        startOfLine: true,\n        lastToken: null\n      };\n    },\n\n    token: function (stream, state) {\n      var ctx = state.context;\n      if (stream.sol()) {\n        if (ctx.align == null) ctx.align = false;\n        state.indented = stream.indentation();\n        state.startOfLine = true;\n        // Automatic semicolon insertion\n        if (ctx.type == \"statement\" && !expectExpression(state.lastToken)) {\n          popContext(state);\n          ctx = state.context;\n        }\n      }\n      if (stream.eatSpace()) return null;\n      curPunc = null;\n      var style = state.tokenize[state.tokenize.length - 1](stream, state);\n      if (style == \"comment\") return style;\n      if (ctx.align == null) ctx.align = true;\n      if ((curPunc == \";\" || curPunc == \":\") && ctx.type == \"statement\") popContext(state);\n      // Handle indentation for {x -> \\n ... }\n      else if (curPunc == \"->\" && ctx.type == \"statement\" && ctx.prev.type == \"}\") {\n        popContext(state);\n        state.context.align = false;\n      }\n      else if (curPunc == \"{\") pushContext(state, stream.column(), \"}\");\n      else if (curPunc == \"[\") pushContext(state, stream.column(), \"]\");\n      else if (curPunc == \"(\") pushContext(state, stream.column(), \")\");\n      else if (curPunc == \"}\") {\n        while (ctx.type == \"statement\") ctx = popContext(state);\n        if (ctx.type == \"}\") ctx = popContext(state);\n        while (ctx.type == \"statement\") ctx = popContext(state);\n      }\n      else if (curPunc == ctx.type) popContext(state);\n      else if (ctx.type == \"}\" || ctx.type == \"top\" || (ctx.type == \"statement\" && curPunc == \"newstatement\"))\n        pushContext(state, stream.column(), \"statement\");\n      state.startOfLine = false;\n      state.lastToken = curPunc || style;\n      return style;\n    },\n\n    indent: function (state, textAfter) {\n      if (!state.tokenize[state.tokenize.length - 1].isBase) return 0;\n      var firstChar = textAfter && textAfter.charAt(0), ctx = state.context;\n      if (ctx.type == \"statement\" && !expectExpression(state.lastToken)) ctx = ctx.prev;\n      var closing = firstChar == ctx.type;\n      if (ctx.type == \"statement\") {\n        return ctx.indented + (firstChar == \"{\" ? 0 : config.indentUnit);\n      }\n      else if (ctx.align) return ctx.column + (closing ? 0 : 1);\n      else return ctx.indented + (closing ? 0 : config.indentUnit);\n    },\n\n    electricChars: \"{}\"\n  };\n});\n\nCodeMirror.defineMIME(\"text/x-kotlin\", \"kotlin\");\n\n});\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/livescript/index.html",
    "content": "<!doctype html>\n\n<title>CodeMirror: LiveScript mode</title>\n<meta charset=\"utf-8\"/>\n<link rel=stylesheet href=\"../../doc/docs.css\">\n\n<link rel=\"stylesheet\" href=\"../../lib/codemirror.css\">\n<link rel=\"stylesheet\" href=\"../../theme/solarized.css\">\n<script src=\"../../lib/codemirror.js\"></script>\n<script src=\"livescript.js\"></script>\n<style>.CodeMirror {font-size: 80%;border-top: 1px solid silver; border-bottom: 1px solid silver;}</style>\n<div id=nav>\n  <a href=\"http://codemirror.net\"><h1>CodeMirror</h1><img id=logo src=\"../../doc/logo.png\"></a>\n\n  <ul>\n    <li><a href=\"../../index.html\">Home</a>\n    <li><a href=\"../../doc/manual.html\">Manual</a>\n    <li><a href=\"https://github.com/codemirror/codemirror\">Code</a>\n  </ul>\n  <ul>\n    <li><a href=\"../index.html\">Language modes</a>\n    <li><a class=active href=\"#\">LiveScript</a>\n  </ul>\n</div>\n\n<article>\n<h2>LiveScript mode</h2>\n<form><textarea id=\"code\" name=\"code\">\n# LiveScript mode for CodeMirror\n# The following script, prelude.ls, is used to\n# demonstrate LiveScript mode for CodeMirror.\n#   https://github.com/gkz/prelude-ls\n\nexport objToFunc = objToFunc = (obj) ->\n  (key) -> obj[key]\n\nexport each = (f, xs) -->\n  if typeof! xs is \\Object\n    for , x of xs then f x\n  else\n    for x in xs then f x\n  xs\n\nexport map = (f, xs) -->\n  f = objToFunc f if typeof! f isnt \\Function\n  type = typeof! xs\n  if type is \\Object\n    {[key, f x] for key, x of xs}\n  else\n    result = [f x for x in xs]\n    if type is \\String then result * '' else result\n\nexport filter = (f, xs) -->\n  f = objToFunc f if typeof! f isnt \\Function\n  type = typeof! xs\n  if type is \\Object\n    {[key, x] for key, x of xs when f x}\n  else\n    result = [x for x in xs when f x]\n    if type is \\String then result * '' else result\n\nexport reject = (f, xs) -->\n  f = objToFunc f if typeof! f isnt \\Function\n  type = typeof! xs\n  if type is \\Object\n    {[key, x] for key, x of xs when not f x}\n  else\n    result = [x for x in xs when not f x]\n    if type is \\String then result * '' else result\n\nexport partition = (f, xs) -->\n  f = objToFunc f if typeof! f isnt \\Function\n  type = typeof! xs\n  if type is \\Object\n    passed = {}\n    failed = {}\n    for key, x of xs\n      (if f x then passed else failed)[key] = x\n  else\n    passed = []\n    failed = []\n    for x in xs\n      (if f x then passed else failed)push x\n    if type is \\String\n      passed *= ''\n      failed *= ''\n  [passed, failed]\n\nexport find = (f, xs) -->\n  f = objToFunc f if typeof! f isnt \\Function\n  if typeof! xs is \\Object\n    for , x of xs when f x then return x\n  else\n    for x in xs when f x then return x\n  void\n\nexport head = export first = (xs) ->\n  return void if not xs.length\n  xs.0\n\nexport tail = (xs) ->\n  return void if not xs.length\n  xs.slice 1\n\nexport last = (xs) ->\n  return void if not xs.length\n  xs[*-1]\n\nexport initial = (xs) ->\n  return void if not xs.length\n  xs.slice 0 xs.length - 1\n\nexport empty = (xs) ->\n  if typeof! xs is \\Object\n    for x of xs then return false\n    return yes\n  not xs.length\n\nexport values = (obj) ->\n  [x for , x of obj]\n\nexport keys = (obj) ->\n  [x for x of obj]\n\nexport len = (xs) ->\n  xs = values xs if typeof! xs is \\Object\n  xs.length\n\nexport cons = (x, xs) -->\n  if typeof! xs is \\String then x + xs else [x] ++ xs\n\nexport append = (xs, ys) -->\n  if typeof! ys is \\String then xs + ys else xs ++ ys\n\nexport join = (sep, xs) -->\n  xs = values xs if typeof! xs is \\Object\n  xs.join sep\n\nexport reverse = (xs) ->\n  if typeof! xs is \\String\n  then (xs / '')reverse! * ''\n  else xs.slice!reverse!\n\nexport fold = export foldl = (f, memo, xs) -->\n  if typeof! xs is \\Object\n    for , x of xs then memo = f memo, x\n  else\n    for x in xs then memo = f memo, x\n  memo\n\nexport fold1 = export foldl1 = (f, xs) --> fold f, xs.0, xs.slice 1\n\nexport foldr = (f, memo, xs) --> fold f, memo, xs.slice!reverse!\n\nexport foldr1 = (f, xs) -->\n  xs.=slice!reverse!\n  fold f, xs.0, xs.slice 1\n\nexport unfoldr = export unfold = (f, b) -->\n  if (f b)?\n    [that.0] ++ unfoldr f, that.1\n  else\n    []\n\nexport andList = (xs) ->\n  for x in xs when not x\n    return false\n  true\n\nexport orList = (xs) ->\n  for x in xs when x\n    return true\n  false\n\nexport any = (f, xs) -->\n  f = objToFunc f if typeof! f isnt \\Function\n  for x in xs when f x\n    return yes\n  no\n\nexport all = (f, xs) -->\n  f = objToFunc f if typeof! f isnt \\Function\n  for x in xs when not f x\n    return no\n  yes\n\nexport unique = (xs) ->\n  result = []\n  if typeof! xs is \\Object\n    for , x of xs when x not in result then result.push x\n  else\n    for x   in xs when x not in result then result.push x\n  if typeof! xs is \\String then result * '' else result\n\nexport sort = (xs) ->\n  xs.concat!sort (x, y) ->\n    | x > y =>  1\n    | x < y => -1\n    | _     =>  0\n\nexport sortBy = (f, xs) -->\n  return [] unless xs.length\n  xs.concat!sort f\n\nexport compare = (f, x, y) -->\n  | (f x) > (f y) =>  1\n  | (f x) < (f y) => -1\n  | otherwise     =>  0\n\nexport sum = (xs) ->\n  result = 0\n  if typeof! xs is \\Object\n    for , x of xs then result += x\n  else\n    for x   in xs then result += x\n  result\n\nexport product = (xs) ->\n  result = 1\n  if typeof! xs is \\Object\n    for , x of xs then result *= x\n  else\n    for x   in xs then result *= x\n  result\n\nexport mean = export average = (xs) -> (sum xs) / len xs\n\nexport concat = (xss) -> fold append, [], xss\n\nexport concatMap = (f, xs) --> fold ((memo, x) -> append memo, f x), [], xs\n\nexport listToObj = (xs) ->\n  {[x.0, x.1] for x in xs}\n\nexport maximum = (xs) -> fold1 (>?), xs\n\nexport minimum = (xs) -> fold1 (<?), xs\n\nexport scan = export scanl = (f, memo, xs) -->\n  last = memo\n  if typeof! xs is \\Object\n  then [memo] ++ [last = f last, x for , x of xs]\n  else [memo] ++ [last = f last, x for x in xs]\n\nexport scan1 = export scanl1 = (f, xs) --> scan f, xs.0, xs.slice 1\n\nexport scanr = (f, memo, xs) -->\n  xs.=slice!reverse!\n  scan f, memo, xs .reverse!\n\nexport scanr1 = (f, xs) -->\n  xs.=slice!reverse!\n  scan f, xs.0, xs.slice 1 .reverse!\n\nexport replicate = (n, x) -->\n  result = []\n  i = 0\n  while i < n, ++i then result.push x\n  result\n\nexport take = (n, xs) -->\n  | n <= 0\n    if typeof! xs is \\String then '' else []\n  | not xs.length => xs\n  | otherwise     => xs.slice 0, n\n\nexport drop = (n, xs) -->\n  | n <= 0        => xs\n  | not xs.length => xs\n  | otherwise     => xs.slice n\n\nexport splitAt = (n, xs) --> [(take n, xs), (drop n, xs)]\n\nexport takeWhile = (p, xs) -->\n  return xs if not xs.length\n  p = objToFunc p if typeof! p isnt \\Function\n  result = []\n  for x in xs\n    break if not p x\n    result.push x\n  if typeof! xs is \\String then result * '' else result\n\nexport dropWhile = (p, xs) -->\n  return xs if not xs.length\n  p = objToFunc p if typeof! p isnt \\Function\n  i = 0\n  for x in xs\n    break if not p x\n    ++i\n  drop i, xs\n\nexport span = (p, xs) --> [(takeWhile p, xs), (dropWhile p, xs)]\n\nexport breakIt = (p, xs) --> span (not) << p, xs\n\nexport zip = (xs, ys) -->\n  result = []\n  for zs, i in [xs, ys]\n    for z, j in zs\n      result.push [] if i is 0\n      result[j]?push z\n  result\n\nexport zipWith = (f,xs, ys) -->\n  f = objToFunc f if typeof! f isnt \\Function\n  if not xs.length or not ys.length\n    []\n  else\n    [f.apply this, zs for zs in zip.call this, xs, ys]\n\nexport zipAll = (...xss) ->\n  result = []\n  for xs, i in xss\n    for x, j in xs\n      result.push [] if i is 0\n      result[j]?push x\n  result\n\nexport zipAllWith = (f, ...xss) ->\n  f = objToFunc f if typeof! f isnt \\Function\n  if not xss.0.length or not xss.1.length\n    []\n  else\n    [f.apply this, xs for xs in zipAll.apply this, xss]\n\nexport compose = (...funcs) ->\n  ->\n    args = arguments\n    for f in funcs\n      args = [f.apply this, args]\n    args.0\n\nexport curry = (f) ->\n  curry$ f # using util method curry$ from livescript\n\nexport id = (x) -> x\n\nexport flip = (f, x, y) --> f y, x\n\nexport fix = (f) ->\n  ( (g, x) -> -> f(g g) ...arguments ) do\n    (g, x) -> -> f(g g) ...arguments\n\nexport lines = (str) ->\n  return [] if not str.length\n  str / \\\\n\n\nexport unlines = (strs) -> strs * \\\\n\n\nexport words = (str) ->\n  return [] if not str.length\n  str / /[ ]+/\n\nexport unwords = (strs) -> strs * ' '\n\nexport max = (>?)\n\nexport min = (<?)\n\nexport negate = (x) -> -x\n\nexport abs = Math.abs\n\nexport signum = (x) ->\n  | x < 0     => -1\n  | x > 0     =>  1\n  | otherwise =>  0\n\nexport quot = (x, y) --> ~~(x / y)\n\nexport rem = (%)\n\nexport div = (x, y) --> Math.floor x / y\n\nexport mod = (%%)\n\nexport recip = (1 /)\n\nexport pi = Math.PI\n\nexport tau = pi * 2\n\nexport exp = Math.exp\n\nexport sqrt = Math.sqrt\n\n# changed from log as log is a\n# common function for logging things\nexport ln = Math.log\n\nexport pow = (^)\n\nexport sin = Math.sin\n\nexport tan = Math.tan\n\nexport cos = Math.cos\n\nexport asin = Math.asin\n\nexport acos = Math.acos\n\nexport atan = Math.atan\n\nexport atan2 = (x, y) --> Math.atan2 x, y\n\n# sinh\n# tanh\n# cosh\n# asinh\n# atanh\n# acosh\n\nexport truncate = (x) -> ~~x\n\nexport round = Math.round\n\nexport ceiling = Math.ceil\n\nexport floor = Math.floor\n\nexport isItNaN = (x) -> x isnt x\n\nexport even = (x) -> x % 2 == 0\n\nexport odd = (x) -> x % 2 != 0\n\nexport gcd = (x, y) -->\n  x = Math.abs x\n  y = Math.abs y\n  until y is 0\n    z = x % y\n    x = y\n    y = z\n  x\n\nexport lcm = (x, y) -->\n  Math.abs Math.floor (x / (gcd x, y) * y)\n\n# meta\nexport installPrelude = !(target) ->\n  unless target.prelude?isInstalled\n    target <<< out$ # using out$ generated by livescript\n    target <<< target.prelude.isInstalled = true\n\nexport prelude = out$\n</textarea></form>\n    <script>\n      var editor = CodeMirror.fromTextArea(document.getElementById(\"code\"), {\n        theme: \"solarized light\",\n        lineNumbers: true\n      });\n    </script>\n\n    <p><strong>MIME types defined:</strong> <code>text/x-livescript</code>.</p>\n\n    <p>The LiveScript mode was written by Kenneth Bentley.</p>\n\n  </article>\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/livescript/livescript.js",
    "content": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n/**\n * Link to the project's GitHub page:\n * https://github.com/duralog/CodeMirror\n */\n\n(function(mod) {\n  if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n    mod(require(\"../../lib/codemirror\"));\n  else if (typeof define == \"function\" && define.amd) // AMD\n    define([\"../../lib/codemirror\"], mod);\n  else // Plain browser env\n    mod(CodeMirror);\n})(function(CodeMirror) {\n  \"use strict\";\n\n  CodeMirror.defineMode('livescript', function(){\n    var tokenBase = function(stream, state) {\n      var next_rule = state.next || \"start\";\n      if (next_rule) {\n        state.next = state.next;\n        var nr = Rules[next_rule];\n        if (nr.splice) {\n          for (var i$ = 0; i$ < nr.length; ++i$) {\n            var r = nr[i$], m;\n            if (r.regex && (m = stream.match(r.regex))) {\n              state.next = r.next || state.next;\n              return r.token;\n            }\n          }\n          stream.next();\n          return 'error';\n        }\n        if (stream.match(r = Rules[next_rule])) {\n          if (r.regex && stream.match(r.regex)) {\n            state.next = r.next;\n            return r.token;\n          } else {\n            stream.next();\n            return 'error';\n          }\n        }\n      }\n      stream.next();\n      return 'error';\n    };\n    var external = {\n      startState: function(){\n        return {\n          next: 'start',\n          lastToken: null\n        };\n      },\n      token: function(stream, state){\n        while (stream.pos == stream.start)\n          var style = tokenBase(stream, state);\n        state.lastToken = {\n          style: style,\n          indent: stream.indentation(),\n          content: stream.current()\n        };\n        return style.replace(/\\./g, ' ');\n      },\n      indent: function(state){\n        var indentation = state.lastToken.indent;\n        if (state.lastToken.content.match(indenter)) {\n          indentation += 2;\n        }\n        return indentation;\n      }\n    };\n    return external;\n  });\n\n  var identifier = '(?![\\\\d\\\\s])[$\\\\w\\\\xAA-\\\\uFFDC](?:(?!\\\\s)[$\\\\w\\\\xAA-\\\\uFFDC]|-[A-Za-z])*';\n  var indenter = RegExp('(?:[({[=:]|[-~]>|\\\\b(?:e(?:lse|xport)|d(?:o|efault)|t(?:ry|hen)|finally|import(?:\\\\s*all)?|const|var|let|new|catch(?:\\\\s*' + identifier + ')?))\\\\s*$');\n  var keywordend = '(?![$\\\\w]|-[A-Za-z]|\\\\s*:(?![:=]))';\n  var stringfill = {\n    token: 'string',\n    regex: '.+'\n  };\n  var Rules = {\n    start: [\n      {\n        token: 'comment.doc',\n        regex: '/\\\\*',\n        next: 'comment'\n      }, {\n        token: 'comment',\n        regex: '#.*'\n      }, {\n        token: 'keyword',\n        regex: '(?:t(?:h(?:is|row|en)|ry|ypeof!?)|c(?:on(?:tinue|st)|a(?:se|tch)|lass)|i(?:n(?:stanceof)?|mp(?:ort(?:\\\\s+all)?|lements)|[fs])|d(?:e(?:fault|lete|bugger)|o)|f(?:or(?:\\\\s+own)?|inally|unction)|s(?:uper|witch)|e(?:lse|x(?:tends|port)|val)|a(?:nd|rguments)|n(?:ew|ot)|un(?:less|til)|w(?:hile|ith)|o[fr]|return|break|let|var|loop)' + keywordend\n      }, {\n        token: 'constant.language',\n        regex: '(?:true|false|yes|no|on|off|null|void|undefined)' + keywordend\n      }, {\n        token: 'invalid.illegal',\n        regex: '(?:p(?:ackage|r(?:ivate|otected)|ublic)|i(?:mplements|nterface)|enum|static|yield)' + keywordend\n      }, {\n        token: 'language.support.class',\n        regex: '(?:R(?:e(?:gExp|ferenceError)|angeError)|S(?:tring|yntaxError)|E(?:rror|valError)|Array|Boolean|Date|Function|Number|Object|TypeError|URIError)' + keywordend\n      }, {\n        token: 'language.support.function',\n        regex: '(?:is(?:NaN|Finite)|parse(?:Int|Float)|Math|JSON|(?:en|de)codeURI(?:Component)?)' + keywordend\n      }, {\n        token: 'variable.language',\n        regex: '(?:t(?:hat|il|o)|f(?:rom|allthrough)|it|by|e)' + keywordend\n      }, {\n        token: 'identifier',\n        regex: identifier + '\\\\s*:(?![:=])'\n      }, {\n        token: 'variable',\n        regex: identifier\n      }, {\n        token: 'keyword.operator',\n        regex: '(?:\\\\.{3}|\\\\s+\\\\?)'\n      }, {\n        token: 'keyword.variable',\n        regex: '(?:@+|::|\\\\.\\\\.)',\n        next: 'key'\n      }, {\n        token: 'keyword.operator',\n        regex: '\\\\.\\\\s*',\n        next: 'key'\n      }, {\n        token: 'string',\n        regex: '\\\\\\\\\\\\S[^\\\\s,;)}\\\\]]*'\n      }, {\n        token: 'string.doc',\n        regex: '\\'\\'\\'',\n        next: 'qdoc'\n      }, {\n        token: 'string.doc',\n        regex: '\"\"\"',\n        next: 'qqdoc'\n      }, {\n        token: 'string',\n        regex: '\\'',\n        next: 'qstring'\n      }, {\n        token: 'string',\n        regex: '\"',\n        next: 'qqstring'\n      }, {\n        token: 'string',\n        regex: '`',\n        next: 'js'\n      }, {\n        token: 'string',\n        regex: '<\\\\[',\n        next: 'words'\n      }, {\n        token: 'string.regex',\n        regex: '//',\n        next: 'heregex'\n      }, {\n        token: 'string.regex',\n        regex: '\\\\/(?:[^[\\\\/\\\\n\\\\\\\\]*(?:(?:\\\\\\\\.|\\\\[[^\\\\]\\\\n\\\\\\\\]*(?:\\\\\\\\.[^\\\\]\\\\n\\\\\\\\]*)*\\\\])[^[\\\\/\\\\n\\\\\\\\]*)*)\\\\/[gimy$]{0,4}',\n        next: 'key'\n      }, {\n        token: 'constant.numeric',\n        regex: '(?:0x[\\\\da-fA-F][\\\\da-fA-F_]*|(?:[2-9]|[12]\\\\d|3[0-6])r[\\\\da-zA-Z][\\\\da-zA-Z_]*|(?:\\\\d[\\\\d_]*(?:\\\\.\\\\d[\\\\d_]*)?|\\\\.\\\\d[\\\\d_]*)(?:e[+-]?\\\\d[\\\\d_]*)?[\\\\w$]*)'\n      }, {\n        token: 'lparen',\n        regex: '[({[]'\n      }, {\n        token: 'rparen',\n        regex: '[)}\\\\]]',\n        next: 'key'\n      }, {\n        token: 'keyword.operator',\n        regex: '\\\\S+'\n      }, {\n        token: 'text',\n        regex: '\\\\s+'\n      }\n    ],\n    heregex: [\n      {\n        token: 'string.regex',\n        regex: '.*?//[gimy$?]{0,4}',\n        next: 'start'\n      }, {\n        token: 'string.regex',\n        regex: '\\\\s*#{'\n      }, {\n        token: 'comment.regex',\n        regex: '\\\\s+(?:#.*)?'\n      }, {\n        token: 'string.regex',\n        regex: '\\\\S+'\n      }\n    ],\n    key: [\n      {\n        token: 'keyword.operator',\n        regex: '[.?@!]+'\n      }, {\n        token: 'identifier',\n        regex: identifier,\n        next: 'start'\n      }, {\n        token: 'text',\n        regex: '',\n        next: 'start'\n      }\n    ],\n    comment: [\n      {\n        token: 'comment.doc',\n        regex: '.*?\\\\*/',\n        next: 'start'\n      }, {\n        token: 'comment.doc',\n        regex: '.+'\n      }\n    ],\n    qdoc: [\n      {\n        token: 'string',\n        regex: \".*?'''\",\n        next: 'key'\n      }, stringfill\n    ],\n    qqdoc: [\n      {\n        token: 'string',\n        regex: '.*?\"\"\"',\n        next: 'key'\n      }, stringfill\n    ],\n    qstring: [\n      {\n        token: 'string',\n        regex: '[^\\\\\\\\\\']*(?:\\\\\\\\.[^\\\\\\\\\\']*)*\\'',\n        next: 'key'\n      }, stringfill\n    ],\n    qqstring: [\n      {\n        token: 'string',\n        regex: '[^\\\\\\\\\"]*(?:\\\\\\\\.[^\\\\\\\\\"]*)*\"',\n        next: 'key'\n      }, stringfill\n    ],\n    js: [\n      {\n        token: 'string',\n        regex: '[^\\\\\\\\`]*(?:\\\\\\\\.[^\\\\\\\\`]*)*`',\n        next: 'key'\n      }, stringfill\n    ],\n    words: [\n      {\n        token: 'string',\n        regex: '.*?\\\\]>',\n        next: 'key'\n      }, stringfill\n    ]\n  };\n  for (var idx in Rules) {\n    var r = Rules[idx];\n    if (r.splice) {\n      for (var i = 0, len = r.length; i < len; ++i) {\n        var rr = r[i];\n        if (typeof rr.regex === 'string') {\n          Rules[idx][i].regex = new RegExp('^' + rr.regex);\n        }\n      }\n    } else if (typeof rr.regex === 'string') {\n      Rules[idx].regex = new RegExp('^' + r.regex);\n    }\n  }\n\n  CodeMirror.defineMIME('text/x-livescript', 'livescript');\n\n});\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/lua/index.html",
    "content": "<!doctype html>\n\n<title>CodeMirror: Lua mode</title>\n<meta charset=\"utf-8\"/>\n<link rel=stylesheet href=\"../../doc/docs.css\">\n\n<link rel=\"stylesheet\" href=\"../../lib/codemirror.css\">\n<link rel=\"stylesheet\" href=\"../../theme/neat.css\">\n<script src=\"../../addon/edit/matchbrackets.js\"></script>\n<script src=\"../../lib/codemirror.js\"></script>\n<script src=\"lua.js\"></script>\n<style>.CodeMirror {border: 1px solid black;}</style>\n<div id=nav>\n  <a href=\"http://codemirror.net\"><h1>CodeMirror</h1><img id=logo src=\"../../doc/logo.png\"></a>\n\n  <ul>\n    <li><a href=\"../../index.html\">Home</a>\n    <li><a href=\"../../doc/manual.html\">Manual</a>\n    <li><a href=\"https://github.com/codemirror/codemirror\">Code</a>\n  </ul>\n  <ul>\n    <li><a href=\"../index.html\">Language modes</a>\n    <li><a class=active href=\"#\">Lua</a>\n  </ul>\n</div>\n\n<article>\n<h2>Lua mode</h2>\n<form><textarea id=\"code\" name=\"code\">\n--[[\nexample useless code to show lua syntax highlighting\nthis is multiline comment\n]]\n\nfunction blahblahblah(x)\n\n  local table = {\n    \"asd\" = 123,\n    \"x\" = 0.34,  \n  }\n  if x ~= 3 then\n    print( x )\n  elseif x == \"string\"\n    my_custom_function( 0x34 )\n  else\n    unknown_function( \"some string\" )\n  end\n\n  --single line comment\n  \nend\n\nfunction blablabla3()\n\n  for k,v in ipairs( table ) do\n    --abcde..\n    y=[=[\n  x=[[\n      x is a multi line string\n   ]]\n  but its definition is iside a highest level string!\n  ]=]\n    print(\" \\\"\\\" \")\n\n    s = math.sin( x )\n  end\n\nend\n</textarea></form>\n    <script>\n      var editor = CodeMirror.fromTextArea(document.getElementById(\"code\"), {\n        matchBrackets: true,\n        theme: \"neat\"\n      });\n    </script>\n\n    <p>Loosely based on Franciszek\n    Wawrzak's <a href=\"http://codemirror.net/1/contrib/lua\">CodeMirror\n    1 mode</a>. One configuration parameter is\n    supported, <code>specials</code>, to which you can provide an\n    array of strings to have those identifiers highlighted with\n    the <code>lua-special</code> style.</p>\n    <p><strong>MIME types defined:</strong> <code>text/x-lua</code>.</p>\n\n  </article>\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/lua/lua.js",
    "content": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n// LUA mode. Ported to CodeMirror 2 from Franciszek Wawrzak's\n// CodeMirror 1 mode.\n// highlights keywords, strings, comments (no leveling supported! (\"[==[\")), tokens, basic indenting\n\n(function(mod) {\n  if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n    mod(require(\"../../lib/codemirror\"));\n  else if (typeof define == \"function\" && define.amd) // AMD\n    define([\"../../lib/codemirror\"], mod);\n  else // Plain browser env\n    mod(CodeMirror);\n})(function(CodeMirror) {\n\"use strict\";\n\nCodeMirror.defineMode(\"lua\", function(config, parserConfig) {\n  var indentUnit = config.indentUnit;\n\n  function prefixRE(words) {\n    return new RegExp(\"^(?:\" + words.join(\"|\") + \")\", \"i\");\n  }\n  function wordRE(words) {\n    return new RegExp(\"^(?:\" + words.join(\"|\") + \")$\", \"i\");\n  }\n  var specials = wordRE(parserConfig.specials || []);\n\n  // long list of standard functions from lua manual\n  var builtins = wordRE([\n    \"_G\",\"_VERSION\",\"assert\",\"collectgarbage\",\"dofile\",\"error\",\"getfenv\",\"getmetatable\",\"ipairs\",\"load\",\n    \"loadfile\",\"loadstring\",\"module\",\"next\",\"pairs\",\"pcall\",\"print\",\"rawequal\",\"rawget\",\"rawset\",\"require\",\n    \"select\",\"setfenv\",\"setmetatable\",\"tonumber\",\"tostring\",\"type\",\"unpack\",\"xpcall\",\n\n    \"coroutine.create\",\"coroutine.resume\",\"coroutine.running\",\"coroutine.status\",\"coroutine.wrap\",\"coroutine.yield\",\n\n    \"debug.debug\",\"debug.getfenv\",\"debug.gethook\",\"debug.getinfo\",\"debug.getlocal\",\"debug.getmetatable\",\n    \"debug.getregistry\",\"debug.getupvalue\",\"debug.setfenv\",\"debug.sethook\",\"debug.setlocal\",\"debug.setmetatable\",\n    \"debug.setupvalue\",\"debug.traceback\",\n\n    \"close\",\"flush\",\"lines\",\"read\",\"seek\",\"setvbuf\",\"write\",\n\n    \"io.close\",\"io.flush\",\"io.input\",\"io.lines\",\"io.open\",\"io.output\",\"io.popen\",\"io.read\",\"io.stderr\",\"io.stdin\",\n    \"io.stdout\",\"io.tmpfile\",\"io.type\",\"io.write\",\n\n    \"math.abs\",\"math.acos\",\"math.asin\",\"math.atan\",\"math.atan2\",\"math.ceil\",\"math.cos\",\"math.cosh\",\"math.deg\",\n    \"math.exp\",\"math.floor\",\"math.fmod\",\"math.frexp\",\"math.huge\",\"math.ldexp\",\"math.log\",\"math.log10\",\"math.max\",\n    \"math.min\",\"math.modf\",\"math.pi\",\"math.pow\",\"math.rad\",\"math.random\",\"math.randomseed\",\"math.sin\",\"math.sinh\",\n    \"math.sqrt\",\"math.tan\",\"math.tanh\",\n\n    \"os.clock\",\"os.date\",\"os.difftime\",\"os.execute\",\"os.exit\",\"os.getenv\",\"os.remove\",\"os.rename\",\"os.setlocale\",\n    \"os.time\",\"os.tmpname\",\n\n    \"package.cpath\",\"package.loaded\",\"package.loaders\",\"package.loadlib\",\"package.path\",\"package.preload\",\n    \"package.seeall\",\n\n    \"string.byte\",\"string.char\",\"string.dump\",\"string.find\",\"string.format\",\"string.gmatch\",\"string.gsub\",\n    \"string.len\",\"string.lower\",\"string.match\",\"string.rep\",\"string.reverse\",\"string.sub\",\"string.upper\",\n\n    \"table.concat\",\"table.insert\",\"table.maxn\",\"table.remove\",\"table.sort\"\n  ]);\n  var keywords = wordRE([\"and\",\"break\",\"elseif\",\"false\",\"nil\",\"not\",\"or\",\"return\",\n                         \"true\",\"function\", \"end\", \"if\", \"then\", \"else\", \"do\",\n                         \"while\", \"repeat\", \"until\", \"for\", \"in\", \"local\" ]);\n\n  var indentTokens = wordRE([\"function\", \"if\",\"repeat\",\"do\", \"\\\\(\", \"{\"]);\n  var dedentTokens = wordRE([\"end\", \"until\", \"\\\\)\", \"}\"]);\n  var dedentPartial = prefixRE([\"end\", \"until\", \"\\\\)\", \"}\", \"else\", \"elseif\"]);\n\n  function readBracket(stream) {\n    var level = 0;\n    while (stream.eat(\"=\")) ++level;\n    stream.eat(\"[\");\n    return level;\n  }\n\n  function normal(stream, state) {\n    var ch = stream.next();\n    if (ch == \"-\" && stream.eat(\"-\")) {\n      if (stream.eat(\"[\") && stream.eat(\"[\"))\n        return (state.cur = bracketed(readBracket(stream), \"comment\"))(stream, state);\n      stream.skipToEnd();\n      return \"comment\";\n    }\n    if (ch == \"\\\"\" || ch == \"'\")\n      return (state.cur = string(ch))(stream, state);\n    if (ch == \"[\" && /[\\[=]/.test(stream.peek()))\n      return (state.cur = bracketed(readBracket(stream), \"string\"))(stream, state);\n    if (/\\d/.test(ch)) {\n      stream.eatWhile(/[\\w.%]/);\n      return \"number\";\n    }\n    if (/[\\w_]/.test(ch)) {\n      stream.eatWhile(/[\\w\\\\\\-_.]/);\n      return \"variable\";\n    }\n    return null;\n  }\n\n  function bracketed(level, style) {\n    return function(stream, state) {\n      var curlev = null, ch;\n      while ((ch = stream.next()) != null) {\n        if (curlev == null) {if (ch == \"]\") curlev = 0;}\n        else if (ch == \"=\") ++curlev;\n        else if (ch == \"]\" && curlev == level) { state.cur = normal; break; }\n        else curlev = null;\n      }\n      return style;\n    };\n  }\n\n  function string(quote) {\n    return function(stream, state) {\n      var escaped = false, ch;\n      while ((ch = stream.next()) != null) {\n        if (ch == quote && !escaped) break;\n        escaped = !escaped && ch == \"\\\\\";\n      }\n      if (!escaped) state.cur = normal;\n      return \"string\";\n    };\n  }\n\n  return {\n    startState: function(basecol) {\n      return {basecol: basecol || 0, indentDepth: 0, cur: normal};\n    },\n\n    token: function(stream, state) {\n      if (stream.eatSpace()) return null;\n      var style = state.cur(stream, state);\n      var word = stream.current();\n      if (style == \"variable\") {\n        if (keywords.test(word)) style = \"keyword\";\n        else if (builtins.test(word)) style = \"builtin\";\n        else if (specials.test(word)) style = \"variable-2\";\n      }\n      if ((style != \"comment\") && (style != \"string\")){\n        if (indentTokens.test(word)) ++state.indentDepth;\n        else if (dedentTokens.test(word)) --state.indentDepth;\n      }\n      return style;\n    },\n\n    indent: function(state, textAfter) {\n      var closing = dedentPartial.test(textAfter);\n      return state.basecol + indentUnit * (state.indentDepth - (closing ? 1 : 0));\n    },\n\n    lineComment: \"--\",\n    blockCommentStart: \"--[[\",\n    blockCommentEnd: \"]]\"\n  };\n});\n\nCodeMirror.defineMIME(\"text/x-lua\", \"lua\");\n\n});\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/markdown/index.html",
    "content": "<!doctype html>\n\n<title>CodeMirror: Markdown mode</title>\n<meta charset=\"utf-8\"/>\n<link rel=stylesheet href=\"../../doc/docs.css\">\n\n<link rel=\"stylesheet\" href=\"../../lib/codemirror.css\">\n<script src=\"../../lib/codemirror.js\"></script>\n<script src=\"../../addon/edit/continuelist.js\"></script>\n<script src=\"../xml/xml.js\"></script>\n<script src=\"markdown.js\"></script>\n<style type=\"text/css\">\n      .CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}\n      .cm-s-default .cm-trailing-space-a:before,\n      .cm-s-default .cm-trailing-space-b:before {position: absolute; content: \"\\00B7\"; color: #777;}\n      .cm-s-default .cm-trailing-space-new-line:before {position: absolute; content: \"\\21B5\"; color: #777;}\n    </style>\n<div id=nav>\n  <a href=\"http://codemirror.net\"><h1>CodeMirror</h1><img id=logo src=\"../../doc/logo.png\"></a>\n\n  <ul>\n    <li><a href=\"../../index.html\">Home</a>\n    <li><a href=\"../../doc/manual.html\">Manual</a>\n    <li><a href=\"https://github.com/codemirror/codemirror\">Code</a>\n  </ul>\n  <ul>\n    <li><a href=\"../index.html\">Language modes</a>\n    <li><a class=active href=\"#\">Markdown</a>\n  </ul>\n</div>\n\n<article>\n<h2>Markdown mode</h2>\n<form><textarea id=\"code\" name=\"code\">\nMarkdown: Basics\n================\n\n&lt;ul id=\"ProjectSubmenu\"&gt;\n    &lt;li&gt;&lt;a href=\"/projects/markdown/\" title=\"Markdown Project Page\"&gt;Main&lt;/a&gt;&lt;/li&gt;\n    &lt;li&gt;&lt;a class=\"selected\" title=\"Markdown Basics\"&gt;Basics&lt;/a&gt;&lt;/li&gt;\n    &lt;li&gt;&lt;a href=\"/projects/markdown/syntax\" title=\"Markdown Syntax Documentation\"&gt;Syntax&lt;/a&gt;&lt;/li&gt;\n    &lt;li&gt;&lt;a href=\"/projects/markdown/license\" title=\"Pricing and License Information\"&gt;License&lt;/a&gt;&lt;/li&gt;\n    &lt;li&gt;&lt;a href=\"/projects/markdown/dingus\" title=\"Online Markdown Web Form\"&gt;Dingus&lt;/a&gt;&lt;/li&gt;\n&lt;/ul&gt;\n\n\nGetting the Gist of Markdown's Formatting Syntax\n------------------------------------------------\n\nThis page offers a brief overview of what it's like to use Markdown.\nThe [syntax page] [s] provides complete, detailed documentation for\nevery feature, but Markdown should be very easy to pick up simply by\nlooking at a few examples of it in action. The examples on this page\nare written in a before/after style, showing example syntax and the\nHTML output produced by Markdown.\n\nIt's also helpful to simply try Markdown out; the [Dingus] [d] is a\nweb application that allows you type your own Markdown-formatted text\nand translate it to XHTML.\n\n**Note:** This document is itself written using Markdown; you\ncan [see the source for it by adding '.text' to the URL] [src].\n\n  [s]: /projects/markdown/syntax  \"Markdown Syntax\"\n  [d]: /projects/markdown/dingus  \"Markdown Dingus\"\n  [src]: /projects/markdown/basics.text\n\n\n## Paragraphs, Headers, Blockquotes ##\n\nA paragraph is simply one or more consecutive lines of text, separated\nby one or more blank lines. (A blank line is any line that looks like\na blank line -- a line containing nothing but spaces or tabs is\nconsidered blank.) Normal paragraphs should not be indented with\nspaces or tabs.\n\nMarkdown offers two styles of headers: *Setext* and *atx*.\nSetext-style headers for `&lt;h1&gt;` and `&lt;h2&gt;` are created by\n\"underlining\" with equal signs (`=`) and hyphens (`-`), respectively.\nTo create an atx-style header, you put 1-6 hash marks (`#`) at the\nbeginning of the line -- the number of hashes equals the resulting\nHTML header level.\n\nBlockquotes are indicated using email-style '`&gt;`' angle brackets.\n\nMarkdown:\n\n    A First Level Header\n    ====================\n    \n    A Second Level Header\n    ---------------------\n\n    Now is the time for all good men to come to\n    the aid of their country. This is just a\n    regular paragraph.\n\n    The quick brown fox jumped over the lazy\n    dog's back.\n    \n    ### Header 3\n\n    &gt; This is a blockquote.\n    &gt; \n    &gt; This is the second paragraph in the blockquote.\n    &gt;\n    &gt; ## This is an H2 in a blockquote\n\n\nOutput:\n\n    &lt;h1&gt;A First Level Header&lt;/h1&gt;\n    \n    &lt;h2&gt;A Second Level Header&lt;/h2&gt;\n    \n    &lt;p&gt;Now is the time for all good men to come to\n    the aid of their country. This is just a\n    regular paragraph.&lt;/p&gt;\n    \n    &lt;p&gt;The quick brown fox jumped over the lazy\n    dog's back.&lt;/p&gt;\n    \n    &lt;h3&gt;Header 3&lt;/h3&gt;\n    \n    &lt;blockquote&gt;\n        &lt;p&gt;This is a blockquote.&lt;/p&gt;\n        \n        &lt;p&gt;This is the second paragraph in the blockquote.&lt;/p&gt;\n        \n        &lt;h2&gt;This is an H2 in a blockquote&lt;/h2&gt;\n    &lt;/blockquote&gt;\n\n\n\n### Phrase Emphasis ###\n\nMarkdown uses asterisks and underscores to indicate spans of emphasis.\n\nMarkdown:\n\n    Some of these words *are emphasized*.\n    Some of these words _are emphasized also_.\n    \n    Use two asterisks for **strong emphasis**.\n    Or, if you prefer, __use two underscores instead__.\n\nOutput:\n\n    &lt;p&gt;Some of these words &lt;em&gt;are emphasized&lt;/em&gt;.\n    Some of these words &lt;em&gt;are emphasized also&lt;/em&gt;.&lt;/p&gt;\n    \n    &lt;p&gt;Use two asterisks for &lt;strong&gt;strong emphasis&lt;/strong&gt;.\n    Or, if you prefer, &lt;strong&gt;use two underscores instead&lt;/strong&gt;.&lt;/p&gt;\n   \n\n\n## Lists ##\n\nUnordered (bulleted) lists use asterisks, pluses, and hyphens (`*`,\n`+`, and `-`) as list markers. These three markers are\ninterchangable; this:\n\n    *   Candy.\n    *   Gum.\n    *   Booze.\n\nthis:\n\n    +   Candy.\n    +   Gum.\n    +   Booze.\n\nand this:\n\n    -   Candy.\n    -   Gum.\n    -   Booze.\n\nall produce the same output:\n\n    &lt;ul&gt;\n    &lt;li&gt;Candy.&lt;/li&gt;\n    &lt;li&gt;Gum.&lt;/li&gt;\n    &lt;li&gt;Booze.&lt;/li&gt;\n    &lt;/ul&gt;\n\nOrdered (numbered) lists use regular numbers, followed by periods, as\nlist markers:\n\n    1.  Red\n    2.  Green\n    3.  Blue\n\nOutput:\n\n    &lt;ol&gt;\n    &lt;li&gt;Red&lt;/li&gt;\n    &lt;li&gt;Green&lt;/li&gt;\n    &lt;li&gt;Blue&lt;/li&gt;\n    &lt;/ol&gt;\n\nIf you put blank lines between items, you'll get `&lt;p&gt;` tags for the\nlist item text. You can create multi-paragraph list items by indenting\nthe paragraphs by 4 spaces or 1 tab:\n\n    *   A list item.\n    \n        With multiple paragraphs.\n\n    *   Another item in the list.\n\nOutput:\n\n    &lt;ul&gt;\n    &lt;li&gt;&lt;p&gt;A list item.&lt;/p&gt;\n    &lt;p&gt;With multiple paragraphs.&lt;/p&gt;&lt;/li&gt;\n    &lt;li&gt;&lt;p&gt;Another item in the list.&lt;/p&gt;&lt;/li&gt;\n    &lt;/ul&gt;\n    \n\n\n### Links ###\n\nMarkdown supports two styles for creating links: *inline* and\n*reference*. With both styles, you use square brackets to delimit the\ntext you want to turn into a link.\n\nInline-style links use parentheses immediately after the link text.\nFor example:\n\n    This is an [example link](http://example.com/).\n\nOutput:\n\n    &lt;p&gt;This is an &lt;a href=\"http://example.com/\"&gt;\n    example link&lt;/a&gt;.&lt;/p&gt;\n\nOptionally, you may include a title attribute in the parentheses:\n\n    This is an [example link](http://example.com/ \"With a Title\").\n\nOutput:\n\n    &lt;p&gt;This is an &lt;a href=\"http://example.com/\" title=\"With a Title\"&gt;\n    example link&lt;/a&gt;.&lt;/p&gt;\n\nReference-style links allow you to refer to your links by names, which\nyou define elsewhere in your document:\n\n    I get 10 times more traffic from [Google][1] than from\n    [Yahoo][2] or [MSN][3].\n\n    [1]: http://google.com/        \"Google\"\n    [2]: http://search.yahoo.com/  \"Yahoo Search\"\n    [3]: http://search.msn.com/    \"MSN Search\"\n\nOutput:\n\n    &lt;p&gt;I get 10 times more traffic from &lt;a href=\"http://google.com/\"\n    title=\"Google\"&gt;Google&lt;/a&gt; than from &lt;a href=\"http://search.yahoo.com/\"\n    title=\"Yahoo Search\"&gt;Yahoo&lt;/a&gt; or &lt;a href=\"http://search.msn.com/\"\n    title=\"MSN Search\"&gt;MSN&lt;/a&gt;.&lt;/p&gt;\n\nThe title attribute is optional. Link names may contain letters,\nnumbers and spaces, but are *not* case sensitive:\n\n    I start my morning with a cup of coffee and\n    [The New York Times][NY Times].\n\n    [ny times]: http://www.nytimes.com/\n\nOutput:\n\n    &lt;p&gt;I start my morning with a cup of coffee and\n    &lt;a href=\"http://www.nytimes.com/\"&gt;The New York Times&lt;/a&gt;.&lt;/p&gt;\n\n\n### Images ###\n\nImage syntax is very much like link syntax.\n\nInline (titles are optional):\n\n    ![alt text](/path/to/img.jpg \"Title\")\n\nReference-style:\n\n    ![alt text][id]\n\n    [id]: /path/to/img.jpg \"Title\"\n\nBoth of the above examples produce the same output:\n\n    &lt;img src=\"/path/to/img.jpg\" alt=\"alt text\" title=\"Title\" /&gt;\n\n\n\n### Code ###\n\nIn a regular paragraph, you can create code span by wrapping text in\nbacktick quotes. Any ampersands (`&amp;`) and angle brackets (`&lt;` or\n`&gt;`) will automatically be translated into HTML entities. This makes\nit easy to use Markdown to write about HTML example code:\n\n    I strongly recommend against using any `&lt;blink&gt;` tags.\n\n    I wish SmartyPants used named entities like `&amp;mdash;`\n    instead of decimal-encoded entites like `&amp;#8212;`.\n\nOutput:\n\n    &lt;p&gt;I strongly recommend against using any\n    &lt;code&gt;&amp;lt;blink&amp;gt;&lt;/code&gt; tags.&lt;/p&gt;\n    \n    &lt;p&gt;I wish SmartyPants used named entities like\n    &lt;code&gt;&amp;amp;mdash;&lt;/code&gt; instead of decimal-encoded\n    entites like &lt;code&gt;&amp;amp;#8212;&lt;/code&gt;.&lt;/p&gt;\n\n\nTo specify an entire block of pre-formatted code, indent every line of\nthe block by 4 spaces or 1 tab. Just like with code spans, `&amp;`, `&lt;`,\nand `&gt;` characters will be escaped automatically.\n\nMarkdown:\n\n    If you want your page to validate under XHTML 1.0 Strict,\n    you've got to put paragraph tags in your blockquotes:\n\n        &lt;blockquote&gt;\n            &lt;p&gt;For example.&lt;/p&gt;\n        &lt;/blockquote&gt;\n\nOutput:\n\n    &lt;p&gt;If you want your page to validate under XHTML 1.0 Strict,\n    you've got to put paragraph tags in your blockquotes:&lt;/p&gt;\n    \n    &lt;pre&gt;&lt;code&gt;&amp;lt;blockquote&amp;gt;\n        &amp;lt;p&amp;gt;For example.&amp;lt;/p&amp;gt;\n    &amp;lt;/blockquote&amp;gt;\n    &lt;/code&gt;&lt;/pre&gt;\n</textarea></form>\n\n    <script>\n      var editor = CodeMirror.fromTextArea(document.getElementById(\"code\"), {\n        mode: 'markdown',\n        lineNumbers: true,\n        theme: \"default\",\n        extraKeys: {\"Enter\": \"newlineAndIndentContinueMarkdownList\"}\n      });\n    </script>\n\n    <p>Optionally depends on the XML mode for properly highlighted inline XML blocks.</p>\n\n    <p><strong>MIME types defined:</strong> <code>text/x-markdown</code>.</p>\n\n    <p><strong>Parsing/Highlighting Tests:</strong> <a href=\"../../test/index.html#markdown_*\">normal</a>,  <a href=\"../../test/index.html#verbose,markdown_*\">verbose</a>.</p>\n\n  </article>\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/markdown/markdown.js",
    "content": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n(function(mod) {\n  if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n    mod(require(\"../../lib/codemirror\"), require(\"../xml/xml\"), require(\"../meta\"));\n  else if (typeof define == \"function\" && define.amd) // AMD\n    define([\"../../lib/codemirror\", \"../xml/xml\", \"../meta\"], mod);\n  else // Plain browser env\n    mod(CodeMirror);\n})(function(CodeMirror) {\n\"use strict\";\n\nCodeMirror.defineMode(\"markdown\", function(cmCfg, modeCfg) {\n\n  var htmlFound = CodeMirror.modes.hasOwnProperty(\"xml\");\n  var htmlMode = CodeMirror.getMode(cmCfg, htmlFound ? {name: \"xml\", htmlMode: true} : \"text/plain\");\n\n  function getMode(name) {\n    if (CodeMirror.findModeByName) {\n      var found = CodeMirror.findModeByName(name);\n      if (found) name = found.mime || found.mimes[0];\n    }\n    var mode = CodeMirror.getMode(cmCfg, name);\n    return mode.name == \"null\" ? null : mode;\n  }\n\n  // Should characters that affect highlighting be highlighted separate?\n  // Does not include characters that will be output (such as `1.` and `-` for lists)\n  if (modeCfg.highlightFormatting === undefined)\n    modeCfg.highlightFormatting = false;\n\n  // Maximum number of nested blockquotes. Set to 0 for infinite nesting.\n  // Excess `>` will emit `error` token.\n  if (modeCfg.maxBlockquoteDepth === undefined)\n    modeCfg.maxBlockquoteDepth = 0;\n\n  // Should underscores in words open/close em/strong?\n  if (modeCfg.underscoresBreakWords === undefined)\n    modeCfg.underscoresBreakWords = true;\n\n  // Turn on fenced code blocks? (\"```\" to start/end)\n  if (modeCfg.fencedCodeBlocks === undefined) modeCfg.fencedCodeBlocks = false;\n\n  // Turn on task lists? (\"- [ ] \" and \"- [x] \")\n  if (modeCfg.taskLists === undefined) modeCfg.taskLists = false;\n\n  // Turn on strikethrough syntax\n  if (modeCfg.strikethrough === undefined)\n    modeCfg.strikethrough = false;\n\n  var codeDepth = 0;\n\n  var header   = 'header'\n  ,   code     = 'comment'\n  ,   quote    = 'quote'\n  ,   list1    = 'variable-2'\n  ,   list2    = 'variable-3'\n  ,   list3    = 'keyword'\n  ,   hr       = 'hr'\n  ,   image    = 'tag'\n  ,   formatting = 'formatting'\n  ,   linkinline = 'link'\n  ,   linkemail = 'link'\n  ,   linktext = 'link'\n  ,   linkhref = 'string'\n  ,   em       = 'em'\n  ,   strong   = 'strong'\n  ,   strikethrough = 'strikethrough';\n\n  var hrRE = /^([*\\-=_])(?:\\s*\\1){2,}\\s*$/\n  ,   ulRE = /^[*\\-+]\\s+/\n  ,   olRE = /^[0-9]+\\.\\s+/\n  ,   taskListRE = /^\\[(x| )\\](?=\\s)/ // Must follow ulRE or olRE\n  ,   atxHeaderRE = /^#+/\n  ,   setextHeaderRE = /^(?:\\={1,}|-{1,})$/\n  ,   textRE = /^[^#!\\[\\]*_\\\\<>` \"'(~]+/;\n\n  function switchInline(stream, state, f) {\n    state.f = state.inline = f;\n    return f(stream, state);\n  }\n\n  function switchBlock(stream, state, f) {\n    state.f = state.block = f;\n    return f(stream, state);\n  }\n\n\n  // Blocks\n\n  function blankLine(state) {\n    // Reset linkTitle state\n    state.linkTitle = false;\n    // Reset EM state\n    state.em = false;\n    // Reset STRONG state\n    state.strong = false;\n    // Reset strikethrough state\n    state.strikethrough = false;\n    // Reset state.quote\n    state.quote = 0;\n    if (!htmlFound && state.f == htmlBlock) {\n      state.f = inlineNormal;\n      state.block = blockNormal;\n    }\n    // Reset state.trailingSpace\n    state.trailingSpace = 0;\n    state.trailingSpaceNewLine = false;\n    // Mark this line as blank\n    state.thisLineHasContent = false;\n    return null;\n  }\n\n  function blockNormal(stream, state) {\n\n    var sol = stream.sol();\n\n    var prevLineIsList = (state.list !== false);\n    if (state.list !== false && state.indentationDiff >= 0) { // Continued list\n      if (state.indentationDiff < 4) { // Only adjust indentation if *not* a code block\n        state.indentation -= state.indentationDiff;\n      }\n      state.list = null;\n    } else if (state.list !== false && state.indentation > 0) {\n      state.list = null;\n      state.listDepth = Math.floor(state.indentation / 4);\n    } else if (state.list !== false) { // No longer a list\n      state.list = false;\n      state.listDepth = 0;\n    }\n\n    var match = null;\n    if (state.indentationDiff >= 4) {\n      state.indentation -= 4;\n      stream.skipToEnd();\n      return code;\n    } else if (stream.eatSpace()) {\n      return null;\n    } else if (match = stream.match(atxHeaderRE)) {\n      state.header = match[0].length <= 6 ? match[0].length : 6;\n      if (modeCfg.highlightFormatting) state.formatting = \"header\";\n      state.f = state.inline;\n      return getType(state);\n    } else if (state.prevLineHasContent && (match = stream.match(setextHeaderRE))) {\n      state.header = match[0].charAt(0) == '=' ? 1 : 2;\n      if (modeCfg.highlightFormatting) state.formatting = \"header\";\n      state.f = state.inline;\n      return getType(state);\n    } else if (stream.eat('>')) {\n      state.indentation++;\n      state.quote = sol ? 1 : state.quote + 1;\n      if (modeCfg.highlightFormatting) state.formatting = \"quote\";\n      stream.eatSpace();\n      return getType(state);\n    } else if (stream.peek() === '[') {\n      return switchInline(stream, state, footnoteLink);\n    } else if (stream.match(hrRE, true)) {\n      return hr;\n    } else if ((!state.prevLineHasContent || prevLineIsList) && (stream.match(ulRE, false) || stream.match(olRE, false))) {\n      var listType = null;\n      if (stream.match(ulRE, true)) {\n        listType = 'ul';\n      } else {\n        stream.match(olRE, true);\n        listType = 'ol';\n      }\n      state.indentation += 4;\n      state.list = true;\n      state.listDepth++;\n      if (modeCfg.taskLists && stream.match(taskListRE, false)) {\n        state.taskList = true;\n      }\n      state.f = state.inline;\n      if (modeCfg.highlightFormatting) state.formatting = [\"list\", \"list-\" + listType];\n      return getType(state);\n    } else if (modeCfg.fencedCodeBlocks && stream.match(/^```[ \\t]*([\\w+#]*)/, true)) {\n      // try switching mode\n      state.localMode = getMode(RegExp.$1);\n      if (state.localMode) state.localState = state.localMode.startState();\n      state.f = state.block = local;\n      if (modeCfg.highlightFormatting) state.formatting = \"code-block\";\n      state.code = true;\n      return getType(state);\n    }\n\n    return switchInline(stream, state, state.inline);\n  }\n\n  function htmlBlock(stream, state) {\n    var style = htmlMode.token(stream, state.htmlState);\n    if ((htmlFound && state.htmlState.tagStart === null && !state.htmlState.context) ||\n        (state.md_inside && stream.current().indexOf(\">\") > -1)) {\n      state.f = inlineNormal;\n      state.block = blockNormal;\n      state.htmlState = null;\n    }\n    return style;\n  }\n\n  function local(stream, state) {\n    if (stream.sol() && stream.match(\"```\", false)) {\n      state.localMode = state.localState = null;\n      state.f = state.block = leavingLocal;\n      return null;\n    } else if (state.localMode) {\n      return state.localMode.token(stream, state.localState);\n    } else {\n      stream.skipToEnd();\n      return code;\n    }\n  }\n\n  function leavingLocal(stream, state) {\n    stream.match(\"```\");\n    state.block = blockNormal;\n    state.f = inlineNormal;\n    if (modeCfg.highlightFormatting) state.formatting = \"code-block\";\n    state.code = true;\n    var returnType = getType(state);\n    state.code = false;\n    return returnType;\n  }\n\n  // Inline\n  function getType(state) {\n    var styles = [];\n\n    if (state.formatting) {\n      styles.push(formatting);\n\n      if (typeof state.formatting === \"string\") state.formatting = [state.formatting];\n\n      for (var i = 0; i < state.formatting.length; i++) {\n        styles.push(formatting + \"-\" + state.formatting[i]);\n\n        if (state.formatting[i] === \"header\") {\n          styles.push(formatting + \"-\" + state.formatting[i] + \"-\" + state.header);\n        }\n\n        // Add `formatting-quote` and `formatting-quote-#` for blockquotes\n        // Add `error` instead if the maximum blockquote nesting depth is passed\n        if (state.formatting[i] === \"quote\") {\n          if (!modeCfg.maxBlockquoteDepth || modeCfg.maxBlockquoteDepth >= state.quote) {\n            styles.push(formatting + \"-\" + state.formatting[i] + \"-\" + state.quote);\n          } else {\n            styles.push(\"error\");\n          }\n        }\n      }\n    }\n\n    if (state.taskOpen) {\n      styles.push(\"meta\");\n      return styles.length ? styles.join(' ') : null;\n    }\n    if (state.taskClosed) {\n      styles.push(\"property\");\n      return styles.length ? styles.join(' ') : null;\n    }\n\n    if (state.linkHref) {\n      styles.push(linkhref);\n      return styles.length ? styles.join(' ') : null;\n    }\n\n    if (state.strong) { styles.push(strong); }\n    if (state.em) { styles.push(em); }\n    if (state.strikethrough) { styles.push(strikethrough); }\n\n    if (state.linkText) { styles.push(linktext); }\n\n    if (state.code) { styles.push(code); }\n\n    if (state.header) { styles.push(header); styles.push(header + \"-\" + state.header); }\n\n    if (state.quote) {\n      styles.push(quote);\n\n      // Add `quote-#` where the maximum for `#` is modeCfg.maxBlockquoteDepth\n      if (!modeCfg.maxBlockquoteDepth || modeCfg.maxBlockquoteDepth >= state.quote) {\n        styles.push(quote + \"-\" + state.quote);\n      } else {\n        styles.push(quote + \"-\" + modeCfg.maxBlockquoteDepth);\n      }\n    }\n\n    if (state.list !== false) {\n      var listMod = (state.listDepth - 1) % 3;\n      if (!listMod) {\n        styles.push(list1);\n      } else if (listMod === 1) {\n        styles.push(list2);\n      } else {\n        styles.push(list3);\n      }\n    }\n\n    if (state.trailingSpaceNewLine) {\n      styles.push(\"trailing-space-new-line\");\n    } else if (state.trailingSpace) {\n      styles.push(\"trailing-space-\" + (state.trailingSpace % 2 ? \"a\" : \"b\"));\n    }\n\n    return styles.length ? styles.join(' ') : null;\n  }\n\n  function handleText(stream, state) {\n    if (stream.match(textRE, true)) {\n      return getType(state);\n    }\n    return undefined;\n  }\n\n  function inlineNormal(stream, state) {\n    var style = state.text(stream, state);\n    if (typeof style !== 'undefined')\n      return style;\n\n    if (state.list) { // List marker (*, +, -, 1., etc)\n      state.list = null;\n      return getType(state);\n    }\n\n    if (state.taskList) {\n      var taskOpen = stream.match(taskListRE, true)[1] !== \"x\";\n      if (taskOpen) state.taskOpen = true;\n      else state.taskClosed = true;\n      if (modeCfg.highlightFormatting) state.formatting = \"task\";\n      state.taskList = false;\n      return getType(state);\n    }\n\n    state.taskOpen = false;\n    state.taskClosed = false;\n\n    if (state.header && stream.match(/^#+$/, true)) {\n      if (modeCfg.highlightFormatting) state.formatting = \"header\";\n      return getType(state);\n    }\n\n    // Get sol() value now, before character is consumed\n    var sol = stream.sol();\n\n    var ch = stream.next();\n\n    if (ch === '\\\\') {\n      stream.next();\n      if (modeCfg.highlightFormatting) {\n        var type = getType(state);\n        return type ? type + \" formatting-escape\" : \"formatting-escape\";\n      }\n    }\n\n    // Matches link titles present on next line\n    if (state.linkTitle) {\n      state.linkTitle = false;\n      var matchCh = ch;\n      if (ch === '(') {\n        matchCh = ')';\n      }\n      matchCh = (matchCh+'').replace(/([.?*+^$[\\]\\\\(){}|-])/g, \"\\\\$1\");\n      var regex = '^\\\\s*(?:[^' + matchCh + '\\\\\\\\]+|\\\\\\\\\\\\\\\\|\\\\\\\\.)' + matchCh;\n      if (stream.match(new RegExp(regex), true)) {\n        return linkhref;\n      }\n    }\n\n    // If this block is changed, it may need to be updated in GFM mode\n    if (ch === '`') {\n      var previousFormatting = state.formatting;\n      if (modeCfg.highlightFormatting) state.formatting = \"code\";\n      var t = getType(state);\n      var before = stream.pos;\n      stream.eatWhile('`');\n      var difference = 1 + stream.pos - before;\n      if (!state.code) {\n        codeDepth = difference;\n        state.code = true;\n        return getType(state);\n      } else {\n        if (difference === codeDepth) { // Must be exact\n          state.code = false;\n          return t;\n        }\n        state.formatting = previousFormatting;\n        return getType(state);\n      }\n    } else if (state.code) {\n      return getType(state);\n    }\n\n    if (ch === '!' && stream.match(/\\[[^\\]]*\\] ?(?:\\(|\\[)/, false)) {\n      stream.match(/\\[[^\\]]*\\]/);\n      state.inline = state.f = linkHref;\n      return image;\n    }\n\n    if (ch === '[' && stream.match(/.*\\](\\(.*\\)| ?\\[.*\\])/, false)) {\n      state.linkText = true;\n      if (modeCfg.highlightFormatting) state.formatting = \"link\";\n      return getType(state);\n    }\n\n    if (ch === ']' && state.linkText && stream.match(/\\(.*\\)| ?\\[.*\\]/, false)) {\n      if (modeCfg.highlightFormatting) state.formatting = \"link\";\n      var type = getType(state);\n      state.linkText = false;\n      state.inline = state.f = linkHref;\n      return type;\n    }\n\n    if (ch === '<' && stream.match(/^(https?|ftps?):\\/\\/(?:[^\\\\>]|\\\\.)+>/, false)) {\n      state.f = state.inline = linkInline;\n      if (modeCfg.highlightFormatting) state.formatting = \"link\";\n      var type = getType(state);\n      if (type){\n        type += \" \";\n      } else {\n        type = \"\";\n      }\n      return type + linkinline;\n    }\n\n    if (ch === '<' && stream.match(/^[^> \\\\]+@(?:[^\\\\>]|\\\\.)+>/, false)) {\n      state.f = state.inline = linkInline;\n      if (modeCfg.highlightFormatting) state.formatting = \"link\";\n      var type = getType(state);\n      if (type){\n        type += \" \";\n      } else {\n        type = \"\";\n      }\n      return type + linkemail;\n    }\n\n    if (ch === '<' && stream.match(/^\\w/, false)) {\n      if (stream.string.indexOf(\">\") != -1) {\n        var atts = stream.string.substring(1,stream.string.indexOf(\">\"));\n        if (/markdown\\s*=\\s*('|\"){0,1}1('|\"){0,1}/.test(atts)) {\n          state.md_inside = true;\n        }\n      }\n      stream.backUp(1);\n      state.htmlState = CodeMirror.startState(htmlMode);\n      return switchBlock(stream, state, htmlBlock);\n    }\n\n    if (ch === '<' && stream.match(/^\\/\\w*?>/)) {\n      state.md_inside = false;\n      return \"tag\";\n    }\n\n    var ignoreUnderscore = false;\n    if (!modeCfg.underscoresBreakWords) {\n      if (ch === '_' && stream.peek() !== '_' && stream.match(/(\\w)/, false)) {\n        var prevPos = stream.pos - 2;\n        if (prevPos >= 0) {\n          var prevCh = stream.string.charAt(prevPos);\n          if (prevCh !== '_' && prevCh.match(/(\\w)/, false)) {\n            ignoreUnderscore = true;\n          }\n        }\n      }\n    }\n    if (ch === '*' || (ch === '_' && !ignoreUnderscore)) {\n      if (sol && stream.peek() === ' ') {\n        // Do nothing, surrounded by newline and space\n      } else if (state.strong === ch && stream.eat(ch)) { // Remove STRONG\n        if (modeCfg.highlightFormatting) state.formatting = \"strong\";\n        var t = getType(state);\n        state.strong = false;\n        return t;\n      } else if (!state.strong && stream.eat(ch)) { // Add STRONG\n        state.strong = ch;\n        if (modeCfg.highlightFormatting) state.formatting = \"strong\";\n        return getType(state);\n      } else if (state.em === ch) { // Remove EM\n        if (modeCfg.highlightFormatting) state.formatting = \"em\";\n        var t = getType(state);\n        state.em = false;\n        return t;\n      } else if (!state.em) { // Add EM\n        state.em = ch;\n        if (modeCfg.highlightFormatting) state.formatting = \"em\";\n        return getType(state);\n      }\n    } else if (ch === ' ') {\n      if (stream.eat('*') || stream.eat('_')) { // Probably surrounded by spaces\n        if (stream.peek() === ' ') { // Surrounded by spaces, ignore\n          return getType(state);\n        } else { // Not surrounded by spaces, back up pointer\n          stream.backUp(1);\n        }\n      }\n    }\n\n    if (modeCfg.strikethrough) {\n      if (ch === '~' && stream.eatWhile(ch)) {\n        if (state.strikethrough) {// Remove strikethrough\n          if (modeCfg.highlightFormatting) state.formatting = \"strikethrough\";\n          var t = getType(state);\n          state.strikethrough = false;\n          return t;\n        } else if (stream.match(/^[^\\s]/, false)) {// Add strikethrough\n          state.strikethrough = true;\n          if (modeCfg.highlightFormatting) state.formatting = \"strikethrough\";\n          return getType(state);\n        }\n      } else if (ch === ' ') {\n        if (stream.match(/^~~/, true)) { // Probably surrounded by space\n          if (stream.peek() === ' ') { // Surrounded by spaces, ignore\n            return getType(state);\n          } else { // Not surrounded by spaces, back up pointer\n            stream.backUp(2);\n          }\n        }\n      }\n    }\n\n    if (ch === ' ') {\n      if (stream.match(/ +$/, false)) {\n        state.trailingSpace++;\n      } else if (state.trailingSpace) {\n        state.trailingSpaceNewLine = true;\n      }\n    }\n\n    return getType(state);\n  }\n\n  function linkInline(stream, state) {\n    var ch = stream.next();\n\n    if (ch === \">\") {\n      state.f = state.inline = inlineNormal;\n      if (modeCfg.highlightFormatting) state.formatting = \"link\";\n      var type = getType(state);\n      if (type){\n        type += \" \";\n      } else {\n        type = \"\";\n      }\n      return type + linkinline;\n    }\n\n    stream.match(/^[^>]+/, true);\n\n    return linkinline;\n  }\n\n  function linkHref(stream, state) {\n    // Check if space, and return NULL if so (to avoid marking the space)\n    if(stream.eatSpace()){\n      return null;\n    }\n    var ch = stream.next();\n    if (ch === '(' || ch === '[') {\n      state.f = state.inline = getLinkHrefInside(ch === \"(\" ? \")\" : \"]\");\n      if (modeCfg.highlightFormatting) state.formatting = \"link-string\";\n      state.linkHref = true;\n      return getType(state);\n    }\n    return 'error';\n  }\n\n  function getLinkHrefInside(endChar) {\n    return function(stream, state) {\n      var ch = stream.next();\n\n      if (ch === endChar) {\n        state.f = state.inline = inlineNormal;\n        if (modeCfg.highlightFormatting) state.formatting = \"link-string\";\n        var returnState = getType(state);\n        state.linkHref = false;\n        return returnState;\n      }\n\n      if (stream.match(inlineRE(endChar), true)) {\n        stream.backUp(1);\n      }\n\n      state.linkHref = true;\n      return getType(state);\n    };\n  }\n\n  function footnoteLink(stream, state) {\n    if (stream.match(/^[^\\]]*\\]:/, false)) {\n      state.f = footnoteLinkInside;\n      stream.next(); // Consume [\n      if (modeCfg.highlightFormatting) state.formatting = \"link\";\n      state.linkText = true;\n      return getType(state);\n    }\n    return switchInline(stream, state, inlineNormal);\n  }\n\n  function footnoteLinkInside(stream, state) {\n    if (stream.match(/^\\]:/, true)) {\n      state.f = state.inline = footnoteUrl;\n      if (modeCfg.highlightFormatting) state.formatting = \"link\";\n      var returnType = getType(state);\n      state.linkText = false;\n      return returnType;\n    }\n\n    stream.match(/^[^\\]]+/, true);\n\n    return linktext;\n  }\n\n  function footnoteUrl(stream, state) {\n    // Check if space, and return NULL if so (to avoid marking the space)\n    if(stream.eatSpace()){\n      return null;\n    }\n    // Match URL\n    stream.match(/^[^\\s]+/, true);\n    // Check for link title\n    if (stream.peek() === undefined) { // End of line, set flag to check next line\n      state.linkTitle = true;\n    } else { // More content on line, check if link title\n      stream.match(/^(?:\\s+(?:\"(?:[^\"\\\\]|\\\\\\\\|\\\\.)+\"|'(?:[^'\\\\]|\\\\\\\\|\\\\.)+'|\\((?:[^)\\\\]|\\\\\\\\|\\\\.)+\\)))?/, true);\n    }\n    state.f = state.inline = inlineNormal;\n    return linkhref;\n  }\n\n  var savedInlineRE = [];\n  function inlineRE(endChar) {\n    if (!savedInlineRE[endChar]) {\n      // Escape endChar for RegExp (taken from http://stackoverflow.com/a/494122/526741)\n      endChar = (endChar+'').replace(/([.?*+^$[\\]\\\\(){}|-])/g, \"\\\\$1\");\n      // Match any non-endChar, escaped character, as well as the closing\n      // endChar.\n      savedInlineRE[endChar] = new RegExp('^(?:[^\\\\\\\\]|\\\\\\\\.)*?(' + endChar + ')');\n    }\n    return savedInlineRE[endChar];\n  }\n\n  var mode = {\n    startState: function() {\n      return {\n        f: blockNormal,\n\n        prevLineHasContent: false,\n        thisLineHasContent: false,\n\n        block: blockNormal,\n        htmlState: null,\n        indentation: 0,\n\n        inline: inlineNormal,\n        text: handleText,\n\n        formatting: false,\n        linkText: false,\n        linkHref: false,\n        linkTitle: false,\n        em: false,\n        strong: false,\n        header: 0,\n        taskList: false,\n        list: false,\n        listDepth: 0,\n        quote: 0,\n        trailingSpace: 0,\n        trailingSpaceNewLine: false,\n        strikethrough: false\n      };\n    },\n\n    copyState: function(s) {\n      return {\n        f: s.f,\n\n        prevLineHasContent: s.prevLineHasContent,\n        thisLineHasContent: s.thisLineHasContent,\n\n        block: s.block,\n        htmlState: s.htmlState && CodeMirror.copyState(htmlMode, s.htmlState),\n        indentation: s.indentation,\n\n        localMode: s.localMode,\n        localState: s.localMode ? CodeMirror.copyState(s.localMode, s.localState) : null,\n\n        inline: s.inline,\n        text: s.text,\n        formatting: false,\n        linkTitle: s.linkTitle,\n        em: s.em,\n        strong: s.strong,\n        strikethrough: s.strikethrough,\n        header: s.header,\n        taskList: s.taskList,\n        list: s.list,\n        listDepth: s.listDepth,\n        quote: s.quote,\n        trailingSpace: s.trailingSpace,\n        trailingSpaceNewLine: s.trailingSpaceNewLine,\n        md_inside: s.md_inside\n      };\n    },\n\n    token: function(stream, state) {\n\n      // Reset state.formatting\n      state.formatting = false;\n\n      if (stream.sol()) {\n        var forceBlankLine = !!state.header;\n\n        // Reset state.header\n        state.header = 0;\n\n        if (stream.match(/^\\s*$/, true) || forceBlankLine) {\n          state.prevLineHasContent = false;\n          blankLine(state);\n          return forceBlankLine ? this.token(stream, state) : null;\n        } else {\n          state.prevLineHasContent = state.thisLineHasContent;\n          state.thisLineHasContent = true;\n        }\n\n        // Reset state.taskList\n        state.taskList = false;\n\n        // Reset state.code\n        state.code = false;\n\n        // Reset state.trailingSpace\n        state.trailingSpace = 0;\n        state.trailingSpaceNewLine = false;\n\n        state.f = state.block;\n        var indentation = stream.match(/^\\s*/, true)[0].replace(/\\t/g, '    ').length;\n        var difference = Math.floor((indentation - state.indentation) / 4) * 4;\n        if (difference > 4) difference = 4;\n        var adjustedIndentation = state.indentation + difference;\n        state.indentationDiff = adjustedIndentation - state.indentation;\n        state.indentation = adjustedIndentation;\n        if (indentation > 0) return null;\n      }\n      return state.f(stream, state);\n    },\n\n    innerMode: function(state) {\n      if (state.block == htmlBlock) return {state: state.htmlState, mode: htmlMode};\n      if (state.localState) return {state: state.localState, mode: state.localMode};\n      return {state: state, mode: mode};\n    },\n\n    blankLine: blankLine,\n\n    getType: getType,\n\n    fold: \"markdown\"\n  };\n  return mode;\n}, \"xml\");\n\nCodeMirror.defineMIME(\"text/x-markdown\", \"markdown\");\n\n});\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/markdown/test.js",
    "content": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n(function() {\n  var mode = CodeMirror.getMode({tabSize: 4}, \"markdown\");\n  function MT(name) { test.mode(name, mode, Array.prototype.slice.call(arguments, 1)); }\n  var modeHighlightFormatting = CodeMirror.getMode({tabSize: 4}, {name: \"markdown\", highlightFormatting: true});\n  function FT(name) { test.mode(name, modeHighlightFormatting, Array.prototype.slice.call(arguments, 1)); }\n\n  FT(\"formatting_emAsterisk\",\n     \"[em&formatting&formatting-em *][em foo][em&formatting&formatting-em *]\");\n\n  FT(\"formatting_emUnderscore\",\n     \"[em&formatting&formatting-em _][em foo][em&formatting&formatting-em _]\");\n\n  FT(\"formatting_strongAsterisk\",\n     \"[strong&formatting&formatting-strong **][strong foo][strong&formatting&formatting-strong **]\");\n\n  FT(\"formatting_strongUnderscore\",\n     \"[strong&formatting&formatting-strong __][strong foo][strong&formatting&formatting-strong __]\");\n\n  FT(\"formatting_codeBackticks\",\n     \"[comment&formatting&formatting-code `][comment foo][comment&formatting&formatting-code `]\");\n\n  FT(\"formatting_doubleBackticks\",\n     \"[comment&formatting&formatting-code ``][comment foo ` bar][comment&formatting&formatting-code ``]\");\n\n  FT(\"formatting_atxHeader\",\n     \"[header&header-1&formatting&formatting-header&formatting-header-1 #][header&header-1  foo # bar ][header&header-1&formatting&formatting-header&formatting-header-1 #]\");\n\n  FT(\"formatting_setextHeader\",\n     \"foo\",\n     \"[header&header-1&formatting&formatting-header&formatting-header-1 =]\");\n\n  FT(\"formatting_blockquote\",\n     \"[quote&quote-1&formatting&formatting-quote&formatting-quote-1 > ][quote&quote-1 foo]\");\n\n  FT(\"formatting_list\",\n     \"[variable-2&formatting&formatting-list&formatting-list-ul - ][variable-2 foo]\");\n  FT(\"formatting_list\",\n     \"[variable-2&formatting&formatting-list&formatting-list-ol 1. ][variable-2 foo]\");\n\n  FT(\"formatting_link\",\n     \"[link&formatting&formatting-link [][link foo][link&formatting&formatting-link ]]][string&formatting&formatting-link-string (][string http://example.com/][string&formatting&formatting-link-string )]\");\n\n  FT(\"formatting_linkReference\",\n     \"[link&formatting&formatting-link [][link foo][link&formatting&formatting-link ]]][string&formatting&formatting-link-string [][string bar][string&formatting&formatting-link-string ]]]\",\n     \"[link&formatting&formatting-link [][link bar][link&formatting&formatting-link ]]:] [string http://example.com/]\");\n\n  FT(\"formatting_linkWeb\",\n     \"[link&formatting&formatting-link <][link http://example.com/][link&formatting&formatting-link >]\");\n\n  FT(\"formatting_linkEmail\",\n     \"[link&formatting&formatting-link <][link user@example.com][link&formatting&formatting-link >]\");\n\n  FT(\"formatting_escape\",\n     \"[formatting-escape \\\\*]\");\n\n  MT(\"plainText\",\n     \"foo\");\n\n  // Don't style single trailing space\n  MT(\"trailingSpace1\",\n     \"foo \");\n\n  // Two or more trailing spaces should be styled with line break character\n  MT(\"trailingSpace2\",\n     \"foo[trailing-space-a  ][trailing-space-new-line  ]\");\n\n  MT(\"trailingSpace3\",\n     \"foo[trailing-space-a  ][trailing-space-b  ][trailing-space-new-line  ]\");\n\n  MT(\"trailingSpace4\",\n     \"foo[trailing-space-a  ][trailing-space-b  ][trailing-space-a  ][trailing-space-new-line  ]\");\n\n  // Code blocks using 4 spaces (regardless of CodeMirror.tabSize value)\n  MT(\"codeBlocksUsing4Spaces\",\n     \"    [comment foo]\");\n\n  // Code blocks using 4 spaces with internal indentation\n  MT(\"codeBlocksUsing4SpacesIndentation\",\n     \"    [comment bar]\",\n     \"        [comment hello]\",\n     \"            [comment world]\",\n     \"    [comment foo]\",\n     \"bar\");\n\n  // Code blocks using 4 spaces with internal indentation\n  MT(\"codeBlocksUsing4SpacesIndentation\",\n     \" foo\",\n     \"    [comment bar]\",\n     \"        [comment hello]\",\n     \"    [comment world]\");\n\n  // Code blocks should end even after extra indented lines\n  MT(\"codeBlocksWithTrailingIndentedLine\",\n     \"    [comment foo]\",\n     \"        [comment bar]\",\n     \"    [comment baz]\",\n     \"    \",\n     \"hello\");\n\n  // Code blocks using 1 tab (regardless of CodeMirror.indentWithTabs value)\n  MT(\"codeBlocksUsing1Tab\",\n     \"\\t[comment foo]\");\n\n  // Inline code using backticks\n  MT(\"inlineCodeUsingBackticks\",\n     \"foo [comment `bar`]\");\n\n  // Block code using single backtick (shouldn't work)\n  MT(\"blockCodeSingleBacktick\",\n     \"[comment `]\",\n     \"foo\",\n     \"[comment `]\");\n\n  // Unclosed backticks\n  // Instead of simply marking as CODE, it would be nice to have an\n  // incomplete flag for CODE, that is styled slightly different.\n  MT(\"unclosedBackticks\",\n     \"foo [comment `bar]\");\n\n  // Per documentation: \"To include a literal backtick character within a\n  // code span, you can use multiple backticks as the opening and closing\n  // delimiters\"\n  MT(\"doubleBackticks\",\n     \"[comment ``foo ` bar``]\");\n\n  // Tests based on Dingus\n  // http://daringfireball.net/projects/markdown/dingus\n  //\n  // Multiple backticks within an inline code block\n  MT(\"consecutiveBackticks\",\n     \"[comment `foo```bar`]\");\n\n  // Multiple backticks within an inline code block with a second code block\n  MT(\"consecutiveBackticks\",\n     \"[comment `foo```bar`] hello [comment `world`]\");\n\n  // Unclosed with several different groups of backticks\n  MT(\"unclosedBackticks\",\n     \"[comment ``foo ``` bar` hello]\");\n\n  // Closed with several different groups of backticks\n  MT(\"closedBackticks\",\n     \"[comment ``foo ``` bar` hello``] world\");\n\n  // atx headers\n  // http://daringfireball.net/projects/markdown/syntax#header\n\n  MT(\"atxH1\",\n     \"[header&header-1 # foo]\");\n\n  MT(\"atxH2\",\n     \"[header&header-2 ## foo]\");\n\n  MT(\"atxH3\",\n     \"[header&header-3 ### foo]\");\n\n  MT(\"atxH4\",\n     \"[header&header-4 #### foo]\");\n\n  MT(\"atxH5\",\n     \"[header&header-5 ##### foo]\");\n\n  MT(\"atxH6\",\n     \"[header&header-6 ###### foo]\");\n\n  // H6 - 7x '#' should still be H6, per Dingus\n  // http://daringfireball.net/projects/markdown/dingus\n  MT(\"atxH6NotH7\",\n     \"[header&header-6 ####### foo]\");\n\n  // Inline styles should be parsed inside headers\n  MT(\"atxH1inline\",\n     \"[header&header-1 # foo ][header&header-1&em *bar*]\");\n\n  // Setext headers - H1, H2\n  // Per documentation, \"Any number of underlining =’s or -’s will work.\"\n  // http://daringfireball.net/projects/markdown/syntax#header\n  // Ideally, the text would be marked as `header` as well, but this is\n  // not really feasible at the moment. So, instead, we're testing against\n  // what works today, to avoid any regressions.\n  //\n  // Check if single underlining = works\n  MT(\"setextH1\",\n     \"foo\",\n     \"[header&header-1 =]\");\n\n  // Check if 3+ ='s work\n  MT(\"setextH1\",\n     \"foo\",\n     \"[header&header-1 ===]\");\n\n  // Check if single underlining - works\n  MT(\"setextH2\",\n     \"foo\",\n     \"[header&header-2 -]\");\n\n  // Check if 3+ -'s work\n  MT(\"setextH2\",\n     \"foo\",\n     \"[header&header-2 ---]\");\n\n  // Single-line blockquote with trailing space\n  MT(\"blockquoteSpace\",\n     \"[quote&quote-1 > foo]\");\n\n  // Single-line blockquote\n  MT(\"blockquoteNoSpace\",\n     \"[quote&quote-1 >foo]\");\n\n  // No blank line before blockquote\n  MT(\"blockquoteNoBlankLine\",\n     \"foo\",\n     \"[quote&quote-1 > bar]\");\n\n  // Nested blockquote\n  MT(\"blockquoteSpace\",\n     \"[quote&quote-1 > foo]\",\n     \"[quote&quote-1 >][quote&quote-2 > foo]\",\n     \"[quote&quote-1 >][quote&quote-2 >][quote&quote-3 > foo]\");\n\n  // Single-line blockquote followed by normal paragraph\n  MT(\"blockquoteThenParagraph\",\n     \"[quote&quote-1 >foo]\",\n     \"\",\n     \"bar\");\n\n  // Multi-line blockquote (lazy mode)\n  MT(\"multiBlockquoteLazy\",\n     \"[quote&quote-1 >foo]\",\n     \"[quote&quote-1 bar]\");\n\n  // Multi-line blockquote followed by normal paragraph (lazy mode)\n  MT(\"multiBlockquoteLazyThenParagraph\",\n     \"[quote&quote-1 >foo]\",\n     \"[quote&quote-1 bar]\",\n     \"\",\n     \"hello\");\n\n  // Multi-line blockquote (non-lazy mode)\n  MT(\"multiBlockquote\",\n     \"[quote&quote-1 >foo]\",\n     \"[quote&quote-1 >bar]\");\n\n  // Multi-line blockquote followed by normal paragraph (non-lazy mode)\n  MT(\"multiBlockquoteThenParagraph\",\n     \"[quote&quote-1 >foo]\",\n     \"[quote&quote-1 >bar]\",\n     \"\",\n     \"hello\");\n\n  // Check list types\n\n  MT(\"listAsterisk\",\n     \"foo\",\n     \"bar\",\n     \"\",\n     \"[variable-2 * foo]\",\n     \"[variable-2 * bar]\");\n\n  MT(\"listPlus\",\n     \"foo\",\n     \"bar\",\n     \"\",\n     \"[variable-2 + foo]\",\n     \"[variable-2 + bar]\");\n\n  MT(\"listDash\",\n     \"foo\",\n     \"bar\",\n     \"\",\n     \"[variable-2 - foo]\",\n     \"[variable-2 - bar]\");\n\n  MT(\"listNumber\",\n     \"foo\",\n     \"bar\",\n     \"\",\n     \"[variable-2 1. foo]\",\n     \"[variable-2 2. bar]\");\n\n  // Lists require a preceding blank line (per Dingus)\n  MT(\"listBogus\",\n     \"foo\",\n     \"1. bar\",\n     \"2. hello\");\n\n  // List after header\n  MT(\"listAfterHeader\",\n     \"[header&header-1 # foo]\",\n     \"[variable-2 - bar]\");\n\n  // Formatting in lists (*)\n  MT(\"listAsteriskFormatting\",\n     \"[variable-2 * ][variable-2&em *foo*][variable-2  bar]\",\n     \"[variable-2 * ][variable-2&strong **foo**][variable-2  bar]\",\n     \"[variable-2 * ][variable-2&strong **][variable-2&em&strong *foo**][variable-2&em *][variable-2  bar]\",\n     \"[variable-2 * ][variable-2&comment `foo`][variable-2  bar]\");\n\n  // Formatting in lists (+)\n  MT(\"listPlusFormatting\",\n     \"[variable-2 + ][variable-2&em *foo*][variable-2  bar]\",\n     \"[variable-2 + ][variable-2&strong **foo**][variable-2  bar]\",\n     \"[variable-2 + ][variable-2&strong **][variable-2&em&strong *foo**][variable-2&em *][variable-2  bar]\",\n     \"[variable-2 + ][variable-2&comment `foo`][variable-2  bar]\");\n\n  // Formatting in lists (-)\n  MT(\"listDashFormatting\",\n     \"[variable-2 - ][variable-2&em *foo*][variable-2  bar]\",\n     \"[variable-2 - ][variable-2&strong **foo**][variable-2  bar]\",\n     \"[variable-2 - ][variable-2&strong **][variable-2&em&strong *foo**][variable-2&em *][variable-2  bar]\",\n     \"[variable-2 - ][variable-2&comment `foo`][variable-2  bar]\");\n\n  // Formatting in lists (1.)\n  MT(\"listNumberFormatting\",\n     \"[variable-2 1. ][variable-2&em *foo*][variable-2  bar]\",\n     \"[variable-2 2. ][variable-2&strong **foo**][variable-2  bar]\",\n     \"[variable-2 3. ][variable-2&strong **][variable-2&em&strong *foo**][variable-2&em *][variable-2  bar]\",\n     \"[variable-2 4. ][variable-2&comment `foo`][variable-2  bar]\");\n\n  // Paragraph lists\n  MT(\"listParagraph\",\n     \"[variable-2 * foo]\",\n     \"\",\n     \"[variable-2 * bar]\");\n\n  // Multi-paragraph lists\n  //\n  // 4 spaces\n  MT(\"listMultiParagraph\",\n     \"[variable-2 * foo]\",\n     \"\",\n     \"[variable-2 * bar]\",\n     \"\",\n     \"    [variable-2 hello]\");\n\n  // 4 spaces, extra blank lines (should still be list, per Dingus)\n  MT(\"listMultiParagraphExtra\",\n     \"[variable-2 * foo]\",\n     \"\",\n     \"[variable-2 * bar]\",\n     \"\",\n     \"\",\n     \"    [variable-2 hello]\");\n\n  // 4 spaces, plus 1 space (should still be list, per Dingus)\n  MT(\"listMultiParagraphExtraSpace\",\n     \"[variable-2 * foo]\",\n     \"\",\n     \"[variable-2 * bar]\",\n     \"\",\n     \"     [variable-2 hello]\",\n     \"\",\n     \"    [variable-2 world]\");\n\n  // 1 tab\n  MT(\"listTab\",\n     \"[variable-2 * foo]\",\n     \"\",\n     \"[variable-2 * bar]\",\n     \"\",\n     \"\\t[variable-2 hello]\");\n\n  // No indent\n  MT(\"listNoIndent\",\n     \"[variable-2 * foo]\",\n     \"\",\n     \"[variable-2 * bar]\",\n     \"\",\n     \"hello\");\n\n  // Blockquote\n  MT(\"blockquote\",\n     \"[variable-2 * foo]\",\n     \"\",\n     \"[variable-2 * bar]\",\n     \"\",\n     \"    [variable-2&quote&quote-1 > hello]\");\n\n  // Code block\n  MT(\"blockquoteCode\",\n     \"[variable-2 * foo]\",\n     \"\",\n     \"[variable-2 * bar]\",\n     \"\",\n     \"        [comment > hello]\",\n     \"\",\n     \"    [variable-2 world]\");\n\n  // Code block followed by text\n  MT(\"blockquoteCodeText\",\n     \"[variable-2 * foo]\",\n     \"\",\n     \"    [variable-2 bar]\",\n     \"\",\n     \"        [comment hello]\",\n     \"\",\n     \"    [variable-2 world]\");\n\n  // Nested list\n\n  MT(\"listAsteriskNested\",\n     \"[variable-2 * foo]\",\n     \"\",\n     \"    [variable-3 * bar]\");\n\n  MT(\"listPlusNested\",\n     \"[variable-2 + foo]\",\n     \"\",\n     \"    [variable-3 + bar]\");\n\n  MT(\"listDashNested\",\n     \"[variable-2 - foo]\",\n     \"\",\n     \"    [variable-3 - bar]\");\n\n  MT(\"listNumberNested\",\n     \"[variable-2 1. foo]\",\n     \"\",\n     \"    [variable-3 2. bar]\");\n\n  MT(\"listMixed\",\n     \"[variable-2 * foo]\",\n     \"\",\n     \"    [variable-3 + bar]\",\n     \"\",\n     \"        [keyword - hello]\",\n     \"\",\n     \"            [variable-2 1. world]\");\n\n  MT(\"listBlockquote\",\n     \"[variable-2 * foo]\",\n     \"\",\n     \"    [variable-3 + bar]\",\n     \"\",\n     \"        [quote&quote-1&variable-3 > hello]\");\n\n  MT(\"listCode\",\n     \"[variable-2 * foo]\",\n     \"\",\n     \"    [variable-3 + bar]\",\n     \"\",\n     \"            [comment hello]\");\n\n  // Code with internal indentation\n  MT(\"listCodeIndentation\",\n     \"[variable-2 * foo]\",\n     \"\",\n     \"        [comment bar]\",\n     \"            [comment hello]\",\n     \"                [comment world]\",\n     \"        [comment foo]\",\n     \"    [variable-2 bar]\");\n\n  // List nesting edge cases\n  MT(\"listNested\",\n    \"[variable-2 * foo]\",\n    \"\",\n    \"    [variable-3 * bar]\",\n    \"\",\n    \"       [variable-2 hello]\"\n  );\n  MT(\"listNested\",\n    \"[variable-2 * foo]\",\n    \"\",\n    \"    [variable-3 * bar]\",\n    \"\",\n    \"      [variable-3 * foo]\"\n  );\n\n  // Code followed by text\n  MT(\"listCodeText\",\n     \"[variable-2 * foo]\",\n     \"\",\n     \"        [comment bar]\",\n     \"\",\n     \"hello\");\n\n  // Following tests directly from official Markdown documentation\n  // http://daringfireball.net/projects/markdown/syntax#hr\n\n  MT(\"hrSpace\",\n     \"[hr * * *]\");\n\n  MT(\"hr\",\n     \"[hr ***]\");\n\n  MT(\"hrLong\",\n     \"[hr *****]\");\n\n  MT(\"hrSpaceDash\",\n     \"[hr - - -]\");\n\n  MT(\"hrDashLong\",\n     \"[hr ---------------------------------------]\");\n\n  // Inline link with title\n  MT(\"linkTitle\",\n     \"[link [[foo]]][string (http://example.com/ \\\"bar\\\")] hello\");\n\n  // Inline link without title\n  MT(\"linkNoTitle\",\n     \"[link [[foo]]][string (http://example.com/)] bar\");\n\n  // Inline link with image\n  MT(\"linkImage\",\n     \"[link [[][tag ![[foo]]][string (http://example.com/)][link ]]][string (http://example.com/)] bar\");\n\n  // Inline link with Em\n  MT(\"linkEm\",\n     \"[link [[][link&em *foo*][link ]]][string (http://example.com/)] bar\");\n\n  // Inline link with Strong\n  MT(\"linkStrong\",\n     \"[link [[][link&strong **foo**][link ]]][string (http://example.com/)] bar\");\n\n  // Inline link with EmStrong\n  MT(\"linkEmStrong\",\n     \"[link [[][link&strong **][link&em&strong *foo**][link&em *][link ]]][string (http://example.com/)] bar\");\n\n  // Image with title\n  MT(\"imageTitle\",\n     \"[tag ![[foo]]][string (http://example.com/ \\\"bar\\\")] hello\");\n\n  // Image without title\n  MT(\"imageNoTitle\",\n     \"[tag ![[foo]]][string (http://example.com/)] bar\");\n\n  // Image with asterisks\n  MT(\"imageAsterisks\",\n     \"[tag ![[*foo*]]][string (http://example.com/)] bar\");\n\n  // Not a link. Should be normal text due to square brackets being used\n  // regularly in text, especially in quoted material, and no space is allowed\n  // between square brackets and parentheses (per Dingus).\n  MT(\"notALink\",\n     \"[[foo]] (bar)\");\n\n  // Reference-style links\n  MT(\"linkReference\",\n     \"[link [[foo]]][string [[bar]]] hello\");\n\n  // Reference-style links with Em\n  MT(\"linkReferenceEm\",\n     \"[link [[][link&em *foo*][link ]]][string [[bar]]] hello\");\n\n  // Reference-style links with Strong\n  MT(\"linkReferenceStrong\",\n     \"[link [[][link&strong **foo**][link ]]][string [[bar]]] hello\");\n\n  // Reference-style links with EmStrong\n  MT(\"linkReferenceEmStrong\",\n     \"[link [[][link&strong **][link&em&strong *foo**][link&em *][link ]]][string [[bar]]] hello\");\n\n  // Reference-style links with optional space separator (per docuentation)\n  // \"You can optionally use a space to separate the sets of brackets\"\n  MT(\"linkReferenceSpace\",\n     \"[link [[foo]]] [string [[bar]]] hello\");\n\n  // Should only allow a single space (\"...use *a* space...\")\n  MT(\"linkReferenceDoubleSpace\",\n     \"[[foo]]  [[bar]] hello\");\n\n  // Reference-style links with implicit link name\n  MT(\"linkImplicit\",\n     \"[link [[foo]]][string [[]]] hello\");\n\n  // @todo It would be nice if, at some point, the document was actually\n  // checked to see if the referenced link exists\n\n  // Link label, for reference-style links (taken from documentation)\n\n  MT(\"labelNoTitle\",\n     \"[link [[foo]]:] [string http://example.com/]\");\n\n  MT(\"labelIndented\",\n     \"   [link [[foo]]:] [string http://example.com/]\");\n\n  MT(\"labelSpaceTitle\",\n     \"[link [[foo bar]]:] [string http://example.com/ \\\"hello\\\"]\");\n\n  MT(\"labelDoubleTitle\",\n     \"[link [[foo bar]]:] [string http://example.com/ \\\"hello\\\"] \\\"world\\\"\");\n\n  MT(\"labelTitleDoubleQuotes\",\n     \"[link [[foo]]:] [string http://example.com/  \\\"bar\\\"]\");\n\n  MT(\"labelTitleSingleQuotes\",\n     \"[link [[foo]]:] [string http://example.com/  'bar']\");\n\n  MT(\"labelTitleParenthese\",\n     \"[link [[foo]]:] [string http://example.com/  (bar)]\");\n\n  MT(\"labelTitleInvalid\",\n     \"[link [[foo]]:] [string http://example.com/] bar\");\n\n  MT(\"labelLinkAngleBrackets\",\n     \"[link [[foo]]:] [string <http://example.com/>  \\\"bar\\\"]\");\n\n  MT(\"labelTitleNextDoubleQuotes\",\n     \"[link [[foo]]:] [string http://example.com/]\",\n     \"[string \\\"bar\\\"] hello\");\n\n  MT(\"labelTitleNextSingleQuotes\",\n     \"[link [[foo]]:] [string http://example.com/]\",\n     \"[string 'bar'] hello\");\n\n  MT(\"labelTitleNextParenthese\",\n     \"[link [[foo]]:] [string http://example.com/]\",\n     \"[string (bar)] hello\");\n\n  MT(\"labelTitleNextMixed\",\n     \"[link [[foo]]:] [string http://example.com/]\",\n     \"(bar\\\" hello\");\n\n  MT(\"linkWeb\",\n     \"[link <http://example.com/>] foo\");\n\n  MT(\"linkWebDouble\",\n     \"[link <http://example.com/>] foo [link <http://example.com/>]\");\n\n  MT(\"linkEmail\",\n     \"[link <user@example.com>] foo\");\n\n  MT(\"linkEmailDouble\",\n     \"[link <user@example.com>] foo [link <user@example.com>]\");\n\n  MT(\"emAsterisk\",\n     \"[em *foo*] bar\");\n\n  MT(\"emUnderscore\",\n     \"[em _foo_] bar\");\n\n  MT(\"emInWordAsterisk\",\n     \"foo[em *bar*]hello\");\n\n  MT(\"emInWordUnderscore\",\n     \"foo[em _bar_]hello\");\n\n  // Per documentation: \"...surround an * or _ with spaces, it’ll be\n  // treated as a literal asterisk or underscore.\"\n\n  MT(\"emEscapedBySpaceIn\",\n     \"foo [em _bar _ hello_] world\");\n\n  MT(\"emEscapedBySpaceOut\",\n     \"foo _ bar[em _hello_]world\");\n\n  MT(\"emEscapedByNewline\",\n     \"foo\",\n     \"_ bar[em _hello_]world\");\n\n  // Unclosed emphasis characters\n  // Instead of simply marking as EM / STRONG, it would be nice to have an\n  // incomplete flag for EM and STRONG, that is styled slightly different.\n  MT(\"emIncompleteAsterisk\",\n     \"foo [em *bar]\");\n\n  MT(\"emIncompleteUnderscore\",\n     \"foo [em _bar]\");\n\n  MT(\"strongAsterisk\",\n     \"[strong **foo**] bar\");\n\n  MT(\"strongUnderscore\",\n     \"[strong __foo__] bar\");\n\n  MT(\"emStrongAsterisk\",\n     \"[em *foo][em&strong **bar*][strong hello**] world\");\n\n  MT(\"emStrongUnderscore\",\n     \"[em _foo][em&strong __bar_][strong hello__] world\");\n\n  // \"...same character must be used to open and close an emphasis span.\"\"\n  MT(\"emStrongMixed\",\n     \"[em _foo][em&strong **bar*hello__ world]\");\n\n  MT(\"emStrongMixed\",\n     \"[em *foo][em&strong __bar_hello** world]\");\n\n  // These characters should be escaped:\n  // \\   backslash\n  // `   backtick\n  // *   asterisk\n  // _   underscore\n  // {}  curly braces\n  // []  square brackets\n  // ()  parentheses\n  // #   hash mark\n  // +   plus sign\n  // -   minus sign (hyphen)\n  // .   dot\n  // !   exclamation mark\n\n  MT(\"escapeBacktick\",\n     \"foo \\\\`bar\\\\`\");\n\n  MT(\"doubleEscapeBacktick\",\n     \"foo \\\\\\\\[comment `bar\\\\\\\\`]\");\n\n  MT(\"escapeAsterisk\",\n     \"foo \\\\*bar\\\\*\");\n\n  MT(\"doubleEscapeAsterisk\",\n     \"foo \\\\\\\\[em *bar\\\\\\\\*]\");\n\n  MT(\"escapeUnderscore\",\n     \"foo \\\\_bar\\\\_\");\n\n  MT(\"doubleEscapeUnderscore\",\n     \"foo \\\\\\\\[em _bar\\\\\\\\_]\");\n\n  MT(\"escapeHash\",\n     \"\\\\# foo\");\n\n  MT(\"doubleEscapeHash\",\n     \"\\\\\\\\# foo\");\n\n  MT(\"escapeNewline\",\n     \"\\\\\",\n     \"[em *foo*]\");\n\n\n  // Tests to make sure GFM-specific things aren't getting through\n\n  MT(\"taskList\",\n     \"[variable-2 * [ ]] bar]\");\n\n  MT(\"fencedCodeBlocks\",\n     \"[comment ```]\",\n     \"foo\",\n     \"[comment ```]\");\n\n  // Tests that require XML mode\n\n  MT(\"xmlMode\",\n     \"[tag&bracket <][tag div][tag&bracket >]\",\n     \"*foo*\",\n     \"[tag&bracket <][tag http://github.com][tag&bracket />]\",\n     \"[tag&bracket </][tag div][tag&bracket >]\",\n     \"[link <http://github.com/>]\");\n\n  MT(\"xmlModeWithMarkdownInside\",\n     \"[tag&bracket <][tag div] [attribute markdown]=[string 1][tag&bracket >]\",\n     \"[em *foo*]\",\n     \"[link <http://github.com/>]\",\n     \"[tag </div>]\",\n     \"[link <http://github.com/>]\",\n     \"[tag&bracket <][tag div][tag&bracket >]\",\n     \"[tag&bracket </][tag div][tag&bracket >]\");\n\n})();\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/meta.js",
    "content": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n(function(mod) {\n  if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n    mod(require(\"../lib/codemirror\"));\n  else if (typeof define == \"function\" && define.amd) // AMD\n    define([\"../lib/codemirror\"], mod);\n  else // Plain browser env\n    mod(CodeMirror);\n})(function(CodeMirror) {\n  \"use strict\";\n\n  CodeMirror.modeInfo = [\n    {name: \"APL\", mime: \"text/apl\", mode: \"apl\", ext: [\"dyalog\", \"apl\"]},\n    {name: \"Asterisk\", mime: \"text/x-asterisk\", mode: \"asterisk\", file: /^extensions\\.conf$/i},\n    {name: \"C\", mime: \"text/x-csrc\", mode: \"clike\", ext: [\"c\", \"h\"]},\n    {name: \"C++\", mime: \"text/x-c++src\", mode: \"clike\", ext: [\"cpp\", \"c++\", \"cc\", \"cxx\", \"hpp\", \"h++\", \"hh\", \"hxx\"], alias: [\"cpp\"]},\n    {name: \"Cobol\", mime: \"text/x-cobol\", mode: \"cobol\", ext: [\"cob\", \"cpy\"]},\n    {name: \"C#\", mime: \"text/x-csharp\", mode: \"clike\", ext: [\"cs\"], alias: [\"csharp\"]},\n    {name: \"Clojure\", mime: \"text/x-clojure\", mode: \"clojure\", ext: [\"clj\"]},\n    {name: \"CoffeeScript\", mime: \"text/x-coffeescript\", mode: \"coffeescript\", ext: [\"coffee\"], alias: [\"coffee\", \"coffee-script\"]},\n    {name: \"Common Lisp\", mime: \"text/x-common-lisp\", mode: \"commonlisp\", ext: [\"cl\", \"lisp\", \"el\"], alias: [\"lisp\"]},\n    {name: \"Cypher\", mime: \"application/x-cypher-query\", mode: \"cypher\", ext: [\"cyp\", \"cypher\"]},\n    {name: \"Cython\", mime: \"text/x-cython\", mode: \"python\", ext: [\"pyx\", \"pxd\", \"pxi\"]},\n    {name: \"CSS\", mime: \"text/css\", mode: \"css\", ext: [\"css\"]},\n    {name: \"CQL\", mime: \"text/x-cassandra\", mode: \"sql\", ext: [\"cql\"]},\n    {name: \"D\", mime: \"text/x-d\", mode: \"d\", ext: [\"d\"]},\n    {name: \"Dart\", mimes: [\"application/dart\", \"text/x-dart\"], mode: \"dart\", ext: [\"dart\"]},\n    {name: \"diff\", mime: \"text/x-diff\", mode: \"diff\", ext: [\"diff\", \"patch\"]},\n    {name: \"Django\", mime: \"text/x-django\", mode: \"django\"},\n    {name: \"Dockerfile\", mime: \"text/x-dockerfile\", mode: \"dockerfile\", file: /^Dockerfile$/},\n    {name: \"DTD\", mime: \"application/xml-dtd\", mode: \"dtd\", ext: [\"dtd\"]},\n    {name: \"Dylan\", mime: \"text/x-dylan\", mode: \"dylan\", ext: [\"dylan\", \"dyl\", \"intr\"]},\n    {name: \"EBNF\", mime: \"text/x-ebnf\", mode: \"ebnf\"},\n    {name: \"ECL\", mime: \"text/x-ecl\", mode: \"ecl\", ext: [\"ecl\"]},\n    {name: \"Eiffel\", mime: \"text/x-eiffel\", mode: \"eiffel\", ext: [\"e\"]},\n    {name: \"Embedded Javascript\", mime: \"application/x-ejs\", mode: \"htmlembedded\", ext: [\"ejs\"]},\n    {name: \"Embedded Ruby\", mime: \"application/x-erb\", mode: \"htmlembedded\", ext: [\"erb\"]},\n    {name: \"Erlang\", mime: \"text/x-erlang\", mode: \"erlang\", ext: [\"erl\"]},\n    {name: \"Forth\", mime: \"text/x-forth\", mode: \"forth\", ext: [\"forth\", \"fth\", \"4th\"]},\n    {name: \"Fortran\", mime: \"text/x-fortran\", mode: \"fortran\", ext: [\"f\", \"for\", \"f77\", \"f90\"]},\n    {name: \"F#\", mime: \"text/x-fsharp\", mode: \"mllike\", ext: [\"fs\"], alias: [\"fsharp\"]},\n    {name: \"Gas\", mime: \"text/x-gas\", mode: \"gas\", ext: [\"s\"]},\n    {name: \"Gherkin\", mime: \"text/x-feature\", mode: \"gherkin\", ext: [\"feature\"]},\n    {name: \"GitHub Flavored Markdown\", mime: \"text/x-gfm\", mode: \"gfm\", file: /^(readme|contributing|history).md$/i},\n    {name: \"Go\", mime: \"text/x-go\", mode: \"go\", ext: [\"go\"]},\n    {name: \"Groovy\", mime: \"text/x-groovy\", mode: \"groovy\", ext: [\"groovy\"]},\n    {name: \"HAML\", mime: \"text/x-haml\", mode: \"haml\", ext: [\"haml\"]},\n    {name: \"Haskell\", mime: \"text/x-haskell\", mode: \"haskell\", ext: [\"hs\"]},\n    {name: \"Haxe\", mime: \"text/x-haxe\", mode: \"haxe\", ext: [\"hx\"]},\n    {name: \"HXML\", mime: \"text/x-hxml\", mode: \"haxe\", ext: [\"hxml\"]},\n    {name: \"ASP.NET\", mime: \"application/x-aspx\", mode: \"htmlembedded\", ext: [\"aspx\"], alias: [\"asp\", \"aspx\"]},\n    {name: \"HTML\", mime: \"text/html\", mode: \"htmlmixed\", ext: [\"html\", \"htm\"], alias: [\"xhtml\"]},\n    {name: \"HTTP\", mime: \"message/http\", mode: \"http\"},\n    {name: \"IDL\", mime: \"text/x-idl\", mode: \"idl\", ext: [\"pro\"]},\n    {name: \"Jade\", mime: \"text/x-jade\", mode: \"jade\", ext: [\"jade\"]},\n    {name: \"Java\", mime: \"text/x-java\", mode: \"clike\", ext: [\"java\"]},\n    {name: \"Java Server Pages\", mime: \"application/x-jsp\", mode: \"htmlembedded\", ext: [\"jsp\"], alias: [\"jsp\"]},\n    {name: \"JavaScript\", mimes: [\"text/javascript\", \"text/ecmascript\", \"application/javascript\", \"application/x-javascript\", \"application/ecmascript\"],\n     mode: \"javascript\", ext: [\"js\"], alias: [\"ecmascript\", \"js\", \"node\"]},\n    {name: \"JSON\", mimes: [\"application/json\", \"application/x-json\"], mode: \"javascript\", ext: [\"json\", \"map\"], alias: [\"json5\"]},\n    {name: \"JSON-LD\", mime: \"application/ld+json\", mode: \"javascript\", ext: [\"jsonld\"], alias: [\"jsonld\"]},\n    {name: \"Jinja2\", mime: \"null\", mode: \"jinja2\"},\n    {name: \"Julia\", mime: \"text/x-julia\", mode: \"julia\", ext: [\"jl\"]},\n    {name: \"Kotlin\", mime: \"text/x-kotlin\", mode: \"kotlin\", ext: [\"kt\"]},\n    {name: \"LESS\", mime: \"text/x-less\", mode: \"css\", ext: [\"less\"]},\n    {name: \"LiveScript\", mime: \"text/x-livescript\", mode: \"livescript\", ext: [\"ls\"], alias: [\"ls\"]},\n    {name: \"Lua\", mime: \"text/x-lua\", mode: \"lua\", ext: [\"lua\"]},\n    {name: \"Markdown\", mime: \"text/x-markdown\", mode: \"markdown\", ext: [\"markdown\", \"md\", \"mkd\"]},\n    {name: \"mIRC\", mime: \"text/mirc\", mode: \"mirc\"},\n    {name: \"MariaDB SQL\", mime: \"text/x-mariadb\", mode: \"sql\"},\n    {name: \"Modelica\", mime: \"text/x-modelica\", mode: \"modelica\", ext: [\"mo\"]},\n    {name: \"MS SQL\", mime: \"text/x-mssql\", mode: \"sql\"},\n    {name: \"MySQL\", mime: \"text/x-mysql\", mode: \"sql\"},\n    {name: \"Nginx\", mime: \"text/x-nginx-conf\", mode: \"nginx\", file: /nginx.*\\.conf$/i},\n    {name: \"NTriples\", mime: \"text/n-triples\", mode: \"ntriples\", ext: [\"nt\"]},\n    {name: \"Objective C\", mime: \"text/x-objectivec\", mode: \"clike\", ext: [\"m\", \"mm\"]},\n    {name: \"OCaml\", mime: \"text/x-ocaml\", mode: \"mllike\", ext: [\"ml\", \"mli\", \"mll\", \"mly\"]},\n    {name: \"Octave\", mime: \"text/x-octave\", mode: \"octave\", ext: [\"m\"]},\n    {name: \"Pascal\", mime: \"text/x-pascal\", mode: \"pascal\", ext: [\"p\", \"pas\"]},\n    {name: \"PEG.js\", mime: \"null\", mode: \"pegjs\", ext: [\"jsonld\"]},\n    {name: \"Perl\", mime: \"text/x-perl\", mode: \"perl\", ext: [\"pl\", \"pm\"]},\n    {name: \"PHP\", mime: \"application/x-httpd-php\", mode: \"php\", ext: [\"php\", \"php3\", \"php4\", \"php5\", \"phtml\"]},\n    {name: \"Pig\", mime: \"text/x-pig\", mode: \"pig\", ext: [\"pig\"]},\n    {name: \"Plain Text\", mime: \"text/plain\", mode: \"null\", ext: [\"txt\", \"text\", \"conf\", \"def\", \"list\", \"log\"]},\n    {name: \"PLSQL\", mime: \"text/x-plsql\", mode: \"sql\", ext: [\"pls\"]},\n    {name: \"Properties files\", mime: \"text/x-properties\", mode: \"properties\", ext: [\"properties\", \"ini\", \"in\"], alias: [\"ini\", \"properties\"]},\n    {name: \"Python\", mime: \"text/x-python\", mode: \"python\", ext: [\"py\", \"pyw\"]},\n    {name: \"Puppet\", mime: \"text/x-puppet\", mode: \"puppet\", ext: [\"pp\"]},\n    {name: \"Q\", mime: \"text/x-q\", mode: \"q\", ext: [\"q\"]},\n    {name: \"R\", mime: \"text/x-rsrc\", mode: \"r\", ext: [\"r\"], alias: [\"rscript\"]},\n    {name: \"reStructuredText\", mime: \"text/x-rst\", mode: \"rst\", ext: [\"rst\"], alias: [\"rst\"]},\n    {name: \"RPM Changes\", mime: \"text/x-rpm-changes\", mode: \"rpm\"},\n    {name: \"RPM Spec\", mime: \"text/x-rpm-spec\", mode: \"rpm\", ext: [\"spec\"]},\n    {name: \"Ruby\", mime: \"text/x-ruby\", mode: \"ruby\", ext: [\"rb\"], alias: [\"jruby\", \"macruby\", \"rake\", \"rb\", \"rbx\"]},\n    {name: \"Rust\", mime: \"text/x-rustsrc\", mode: \"rust\", ext: [\"rs\"]},\n    {name: \"Sass\", mime: \"text/x-sass\", mode: \"sass\", ext: [\"sass\"]},\n    {name: \"Scala\", mime: \"text/x-scala\", mode: \"clike\", ext: [\"scala\"]},\n    {name: \"Scheme\", mime: \"text/x-scheme\", mode: \"scheme\", ext: [\"scm\", \"ss\"]},\n    {name: \"SCSS\", mime: \"text/x-scss\", mode: \"css\", ext: [\"scss\"]},\n    {name: \"Shell\", mime: \"text/x-sh\", mode: \"shell\", ext: [\"sh\", \"ksh\", \"bash\"], alias: [\"bash\", \"sh\", \"zsh\"]},\n    {name: \"Sieve\", mime: \"application/sieve\", mode: \"sieve\", ext: [\"siv\", \"sieve\"]},\n    {name: \"Slim\", mimes: [\"text/x-slim\", \"application/x-slim\"], mode: \"slim\", ext: [\"slim\"]},\n    {name: \"Smalltalk\", mime: \"text/x-stsrc\", mode: \"smalltalk\", ext: [\"st\"]},\n    {name: \"Smarty\", mime: \"text/x-smarty\", mode: \"smarty\", ext: [\"tpl\"]},\n    {name: \"SmartyMixed\", mime: \"text/x-smarty\", mode: \"smartymixed\"},\n    {name: \"Solr\", mime: \"text/x-solr\", mode: \"solr\"},\n    {name: \"Soy\", mime: \"text/x-soy\", mode: \"soy\", ext: [\"soy\"], alias: [\"closure template\"]},\n    {name: \"SPARQL\", mime: \"application/sparql-query\", mode: \"sparql\", ext: [\"rq\", \"sparql\"], alias: [\"sparul\"]},\n    {name: \"Spreadsheet\", mime: \"text/x-spreadsheet\", mode: \"spreadsheet\", alias: [\"excel\", \"formula\"]},\n    {name: \"SQL\", mime: \"text/x-sql\", mode: \"sql\", ext: [\"sql\"]},\n    {name: \"MariaDB\", mime: \"text/x-mariadb\", mode: \"sql\"},\n    {name: \"sTeX\", mime: \"text/x-stex\", mode: \"stex\"},\n    {name: \"LaTeX\", mime: \"text/x-latex\", mode: \"stex\", ext: [\"text\", \"ltx\"], alias: [\"tex\"]},\n    {name: \"SystemVerilog\", mime: \"text/x-systemverilog\", mode: \"verilog\", ext: [\"v\"]},\n    {name: \"Tcl\", mime: \"text/x-tcl\", mode: \"tcl\", ext: [\"tcl\"]},\n    {name: \"Textile\", mime: \"text/x-textile\", mode: \"textile\", ext: [\"textile\"]},\n    {name: \"TiddlyWiki \", mime: \"text/x-tiddlywiki\", mode: \"tiddlywiki\"},\n    {name: \"Tiki wiki\", mime: \"text/tiki\", mode: \"tiki\"},\n    {name: \"TOML\", mime: \"text/x-toml\", mode: \"toml\", ext: [\"toml\"]},\n    {name: \"Tornado\", mime: \"text/x-tornado\", mode: \"tornado\"},\n    {name: \"Turtle\", mime: \"text/turtle\", mode: \"turtle\", ext: [\"ttl\"]},\n    {name: \"TypeScript\", mime: \"application/typescript\", mode: \"javascript\", ext: [\"ts\"], alias: [\"ts\"]},\n    {name: \"VB.NET\", mime: \"text/x-vb\", mode: \"vb\", ext: [\"vb\"]},\n    {name: \"VBScript\", mime: \"text/vbscript\", mode: \"vbscript\", ext: [\"vbs\"]},\n    {name: \"Velocity\", mime: \"text/velocity\", mode: \"velocity\", ext: [\"vtl\"]},\n    {name: \"Verilog\", mime: \"text/x-verilog\", mode: \"verilog\", ext: [\"v\"]},\n    {name: \"XML\", mimes: [\"application/xml\", \"text/xml\"], mode: \"xml\", ext: [\"xml\", \"xsl\", \"xsd\"], alias: [\"rss\", \"wsdl\", \"xsd\"]},\n    {name: \"XQuery\", mime: \"application/xquery\", mode: \"xquery\", ext: [\"xy\", \"xquery\"]},\n    {name: \"YAML\", mime: \"text/x-yaml\", mode: \"yaml\", ext: [\"yaml\"], alias: [\"yml\"]},\n    {name: \"Z80\", mime: \"text/x-z80\", mode: \"z80\", ext: [\"z80\"]}\n  ];\n  // Ensure all modes have a mime property for backwards compatibility\n  for (var i = 0; i < CodeMirror.modeInfo.length; i++) {\n    var info = CodeMirror.modeInfo[i];\n    if (info.mimes) info.mime = info.mimes[0];\n  }\n\n  CodeMirror.findModeByMIME = function(mime) {\n    mime = mime.toLowerCase();\n    for (var i = 0; i < CodeMirror.modeInfo.length; i++) {\n      var info = CodeMirror.modeInfo[i];\n      if (info.mime == mime) return info;\n      if (info.mimes) for (var j = 0; j < info.mimes.length; j++)\n        if (info.mimes[j] == mime) return info;\n    }\n  };\n\n  CodeMirror.findModeByExtension = function(ext) {\n    for (var i = 0; i < CodeMirror.modeInfo.length; i++) {\n      var info = CodeMirror.modeInfo[i];\n      if (info.ext) for (var j = 0; j < info.ext.length; j++)\n        if (info.ext[j] == ext) return info;\n    }\n  };\n\n  CodeMirror.findModeByFileName = function(filename) {\n    for (var i = 0; i < CodeMirror.modeInfo.length; i++) {\n      var info = CodeMirror.modeInfo[i];\n      if (info.file && info.file.test(filename)) return info;\n    }\n    var dot = filename.lastIndexOf(\".\");\n    var ext = dot > -1 && filename.substring(dot + 1, filename.length);\n    if (ext) return CodeMirror.findModeByExtension(ext);\n  };\n\n  CodeMirror.findModeByName = function(name) {\n    name = name.toLowerCase();\n    for (var i = 0; i < CodeMirror.modeInfo.length; i++) {\n      var info = CodeMirror.modeInfo[i];\n      if (info.name.toLowerCase() == name) return info;\n      if (info.alias) for (var j = 0; j < info.alias.length; j++)\n        if (info.alias[j].toLowerCase() == name) return info;\n    }\n  };\n});\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/mirc/index.html",
    "content": "<!doctype html>\n\n<title>CodeMirror: mIRC mode</title>\n<meta charset=\"utf-8\"/>\n<link rel=stylesheet href=\"../../doc/docs.css\">\n\n<link rel=\"stylesheet\" href=\"../../lib/codemirror.css\">\n<link rel=\"stylesheet\" href=\"../../theme/twilight.css\">\n<script src=\"../../lib/codemirror.js\"></script>\n<script src=\"mirc.js\"></script>\n<style>.CodeMirror {border: 1px solid black;}</style>\n<div id=nav>\n  <a href=\"http://codemirror.net\"><h1>CodeMirror</h1><img id=logo src=\"../../doc/logo.png\"></a>\n\n  <ul>\n    <li><a href=\"../../index.html\">Home</a>\n    <li><a href=\"../../doc/manual.html\">Manual</a>\n    <li><a href=\"https://github.com/codemirror/codemirror\">Code</a>\n  </ul>\n  <ul>\n    <li><a href=\"../index.html\">Language modes</a>\n    <li><a class=active href=\"#\">mIRC</a>\n  </ul>\n</div>\n\n<article>\n<h2>mIRC mode</h2>\n<form><textarea id=\"code\" name=\"code\">\n;AKA Nick Tracker by Ford_Lawnmower irc.GeekShed.net #Script-Help\n;*****************************************************************************;\n;**Start Setup\n;Change JoinDisplay, below, for On Join AKA Display. On = 1 - Off = 0\nalias -l JoinDisplay { return 1 }\n;Change MaxNicks, below, to the number of nicknames you want to store for each hostmask. I wouldn't go over 400 with this ;/\nalias -l MaxNicks { return 20 }\n;Change AKALogo, below, To the text you want displayed before each AKA result.\nalias -l AKALogo { return \u000306\u0007 \u000305A\u000306K\u000307A \u000306\u0007 }\n;**End Setup\n;*****************************************************************************;\nOn *:Join:#: {\n  if ($nick == $me) { .timer 1 1 ialupdateCheck $chan }\n  NickNamesAdd $nick $+($network,$wildsite)\n  if ($JoinDisplay) { .timerNickNames $+ $nick 1 2 NickNames.display $nick $chan $network $wildsite }\n}\non *:Nick: { NickNamesAdd $newnick $+($network,$wildsite) $nick }\nalias -l NickNames.display {\n  if ($gettok($hget(NickNames,$+($3,$4)),0,126) > 1) {\n    echo -g $2 $AKALogo $+(\u000309,$1) $AKALogo \u000307 $mid($replace($hget(NickNames,$+($3,$4)),$chr(126),$chr(44)),2,-1)\n  }\n}\nalias -l NickNamesAdd {\n  if ($hget(NickNames,$2)) {\n    if (!$regex($hget(NickNames,$2),/~\\Q $+ $replacecs($1,\\E,\\E\\\\E\\Q) $+ \\E~/i)) {\n      if ($gettok($hget(NickNames,$2),0,126) <= $MaxNicks) {\n        hadd NickNames $2 $+($hget(NickNames,$2),$1,~)\n      }\n      else {\n        hadd NickNames $2 $+($mid($hget(NickNames,$2),$pos($hget(NickNames,$2),~,2)),$1,~)\n      }\n    }\n  }\n  else {\n    hadd -m NickNames $2 $+(~,$1,~,$iif($3,$+($3,~)))\n  }\n}\nalias -l Fix.All.MindUser {\n  var %Fix.Count = $hfind(NickNames,/[^~]+[0-9]{4}~/,0,r).data\n  while (%Fix.Count) {\n    if ($Fix.MindUser($hget(NickNames,$hfind(NickNames,/[^~]+[0-9]{4}~/,%Fix.Count,r).data))) {\n      echo -ag Record %Fix.Count - $v1 - Was Cleaned\n      hadd NickNames $hfind(NickNames,/[^~]+[0-9]{4}~/,%Fix.Count,r).data $v1\n    }\n    dec %Fix.Count\n  }\n}\nalias -l Fix.MindUser { return $regsubex($1,/[^~]+[0-9]{4}~/g,$null) }\nmenu nicklist,query {\n  -\n  .AKA\n  ..Check $$1: {\n    if ($gettok($hget(NickNames,$+($network,$address($1,2))),0,126) > 1) {\n      NickNames.display $1 $active $network $address($1,2)\n    }\n    else { echo -ag $AKALogo $+(\u000309,$1) \u000307has not been known by any other nicknames while I have been watching. }\n  }\n  ..Cleanup $$1:hadd NickNames $+($network,$address($1,2)) $fix.minduser($hget(NickNames,$+($network,$address($1,2))))\n  ..Clear $$1:hadd NickNames $+($network,$address($1,2)) $+(~,$1,~)\n  ..AKA Search Dialog:dialog $iif($dialog(AKA_Search),-v,-m) AKA_Search AKA_Search\n  -\n}\nmenu status,channel {\n  -\n  .AKA\n  ..AKA Search Dialog:dialog $iif($dialog(AKA_Search),-v,-m) AKA_Search AKA_Search\n  ..Clean All Records:Fix.All.Minduser\n  -\n}\ndialog AKA_Search {\n  title \"AKA Search Engine\"\n  size -1 -1 206 221\n  option dbu\n  edit \"\", 1, 8 5 149 10, autohs\n  button \"Search\", 2, 163 4 32 12\n  radio \"Search HostMask\", 4, 61 22 55 10\n  radio \"Search Nicknames\", 5, 123 22 56 10\n  list 6, 8 38 190 169, sort extsel vsbar\n  button \"Check Selected\", 7, 67 206 40 12\n  button \"Close\", 8, 160 206 38 12, cancel\n  box \"Search Type\", 3, 11 17 183 18\n  button \"Copy to Clipboard\", 9, 111 206 46 12\n}\nOn *:Dialog:Aka_Search:init:*: { did -c $dname 5 }\nOn *:Dialog:Aka_Search:Sclick:2,7,9: {\n  if ($did == 2) && ($did($dname,1)) {\n    did -r $dname 6\n    var %search $+(*,$v1,*), %type $iif($did($dname,5).state,data,item), %matches = $hfind(NickNames,%search,0,w). [ $+ [ %type ] ]\n    while (%matches) {\n      did -a $dname 6 $hfind(NickNames,%search,%matches,w). [ $+ [ %type ] ]\n      dec %matches\n    }\n    did -c $dname 6 1\n  }\n  elseif ($did == 7) && ($did($dname,6).seltext) { echo -ga $AKALogo \u000307 $mid($replace($hget(NickNames,$v1),$chr(126),$chr(44)),2,-1) }\n  elseif ($did == 9) && ($did($dname,6).seltext) { clipboard $mid($v1,$pos($v1,*,1)) }\n}\nOn *:Start:{\n  if (!$hget(NickNames)) { hmake NickNames 10 }\n  if ($isfile(NickNames.hsh)) { hload  NickNames NickNames.hsh }\n}\nOn *:Exit: { if ($hget(NickNames)) { hsave NickNames NickNames.hsh } }\nOn *:Disconnect: { if ($hget(NickNames)) { hsave NickNames NickNames.hsh } }\nOn *:Unload: { hfree NickNames }\nalias -l ialupdateCheck {\n  inc -z $+(%,ialupdateCheck,$network) $calc($nick($1,0) / 4)\n  ;If your ial is already being updated on join .who $1 out.\n  ;If you are using /names to update ial you will still need this line.\n  .who $1\n}\nRaw 352:*: {\n  if ($($+(%,ialupdateCheck,$network),2)) haltdef\n  NickNamesAdd $6 $+($network,$address($6,2))\n}\nRaw 315:*: {\n  if ($($+(%,ialupdateCheck,$network),2)) haltdef\n}\n\n</textarea></form>\n    <script>\n      var editor = CodeMirror.fromTextArea(document.getElementById(\"code\"), {\n        theme: \"twilight\",\n        lineNumbers: true,\n        matchBrackets: true,\n        indentUnit: 4,\n        mode: \"text/mirc\"\n      });\n    </script>\n\n    <p><strong>MIME types defined:</strong> <code>text/mirc</code>.</p>\n\n  </article>\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/mirc/mirc.js",
    "content": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n//mIRC mode by Ford_Lawnmower :: Based on Velocity mode by Steve O'Hara\n\n(function(mod) {\n  if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n    mod(require(\"../../lib/codemirror\"));\n  else if (typeof define == \"function\" && define.amd) // AMD\n    define([\"../../lib/codemirror\"], mod);\n  else // Plain browser env\n    mod(CodeMirror);\n})(function(CodeMirror) {\n\"use strict\";\n\nCodeMirror.defineMIME(\"text/mirc\", \"mirc\");\nCodeMirror.defineMode(\"mirc\", function() {\n  function parseWords(str) {\n    var obj = {}, words = str.split(\" \");\n    for (var i = 0; i < words.length; ++i) obj[words[i]] = true;\n    return obj;\n  }\n  var specials = parseWords(\"$! $$ $& $? $+ $abook $abs $active $activecid \" +\n                            \"$activewid $address $addtok $agent $agentname $agentstat $agentver \" +\n                            \"$alias $and $anick $ansi2mirc $aop $appactive $appstate $asc $asctime \" +\n                            \"$asin $atan $avoice $away $awaymsg $awaytime $banmask $base $bfind \" +\n                            \"$binoff $biton $bnick $bvar $bytes $calc $cb $cd $ceil $chan $chanmodes \" +\n                            \"$chantypes $chat $chr $cid $clevel $click $cmdbox $cmdline $cnick $color \" +\n                            \"$com $comcall $comchan $comerr $compact $compress $comval $cos $count \" +\n                            \"$cr $crc $creq $crlf $ctime $ctimer $ctrlenter $date $day $daylight \" +\n                            \"$dbuh $dbuw $dccignore $dccport $dde $ddename $debug $decode $decompress \" +\n                            \"$deltok $devent $dialog $did $didreg $didtok $didwm $disk $dlevel $dll \" +\n                            \"$dllcall $dname $dns $duration $ebeeps $editbox $emailaddr $encode $error \" +\n                            \"$eval $event $exist $feof $ferr $fgetc $file $filename $filtered $finddir \" +\n                            \"$finddirn $findfile $findfilen $findtok $fline $floor $fopen $fread $fserve \" +\n                            \"$fulladdress $fulldate $fullname $fullscreen $get $getdir $getdot $gettok $gmt \" +\n                            \"$group $halted $hash $height $hfind $hget $highlight $hnick $hotline \" +\n                            \"$hotlinepos $ial $ialchan $ibl $idle $iel $ifmatch $ignore $iif $iil \" +\n                            \"$inelipse $ini $inmidi $inpaste $inpoly $input $inrect $inroundrect \" +\n                            \"$insong $instok $int $inwave $ip $isalias $isbit $isdde $isdir $isfile \" +\n                            \"$isid $islower $istok $isupper $keychar $keyrpt $keyval $knick $lactive \" +\n                            \"$lactivecid $lactivewid $left $len $level $lf $line $lines $link $lock \" +\n                            \"$lock $locked $log $logstamp $logstampfmt $longfn $longip $lower $ltimer \" +\n                            \"$maddress $mask $matchkey $matchtok $md5 $me $menu $menubar $menucontext \" +\n                            \"$menutype $mid $middir $mircdir $mircexe $mircini $mklogfn $mnick $mode \" +\n                            \"$modefirst $modelast $modespl $mouse $msfile $network $newnick $nick $nofile \" +\n                            \"$nopath $noqt $not $notags $notify $null $numeric $numok $oline $onpoly \" +\n                            \"$opnick $or $ord $os $passivedcc $pic $play $pnick $port $portable $portfree \" +\n                            \"$pos $prefix $prop $protect $puttok $qt $query $rand $r $rawmsg $read $readomo \" +\n                            \"$readn $regex $regml $regsub $regsubex $remove $remtok $replace $replacex \" +\n                            \"$reptok $result $rgb $right $round $scid $scon $script $scriptdir $scriptline \" +\n                            \"$sdir $send $server $serverip $sfile $sha1 $shortfn $show $signal $sin \" +\n                            \"$site $sline $snick $snicks $snotify $sock $sockbr $sockerr $sockname \" +\n                            \"$sorttok $sound $sqrt $ssl $sreq $sslready $status $strip $str $stripped \" +\n                            \"$syle $submenu $switchbar $tan $target $ticks $time $timer $timestamp \" +\n                            \"$timestampfmt $timezone $tip $titlebar $toolbar $treebar $trust $ulevel \" +\n                            \"$ulist $upper $uptime $url $usermode $v1 $v2 $var $vcmd $vcmdstat $vcmdver \" +\n                            \"$version $vnick $vol $wid $width $wildsite $wildtok $window $wrap $xor\");\n  var keywords = parseWords(\"abook ajinvite alias aline ame amsg anick aop auser autojoin avoice \" +\n                            \"away background ban bcopy beep bread break breplace bset btrunc bunset bwrite \" +\n                            \"channel clear clearall cline clipboard close cnick color comclose comopen \" +\n                            \"comreg continue copy creq ctcpreply ctcps dcc dccserver dde ddeserver \" +\n                            \"debug dec describe dialog did didtok disable disconnect dlevel dline dll \" +\n                            \"dns dqwindow drawcopy drawdot drawfill drawline drawpic drawrect drawreplace \" +\n                            \"drawrot drawsave drawscroll drawtext ebeeps echo editbox emailaddr enable \" +\n                            \"events exit fclose filter findtext finger firewall flash flist flood flush \" +\n                            \"flushini font fopen fseek fsend fserve fullname fwrite ghide gload gmove \" +\n                            \"gopts goto gplay gpoint gqreq groups gshow gsize gstop gtalk gunload hadd \" +\n                            \"halt haltdef hdec hdel help hfree hinc hload hmake hop hsave ial ialclear \" +\n                            \"ialmark identd if ignore iline inc invite iuser join kick linesep links list \" +\n                            \"load loadbuf localinfo log mdi me menubar mkdir mnick mode msg nick noop notice \" +\n                            \"notify omsg onotice part partall pdcc perform play playctrl pop protect pvoice \" +\n                            \"qme qmsg query queryn quit raw reload remini remote remove rename renwin \" +\n                            \"reseterror resetidle return rlevel rline rmdir run ruser save savebuf saveini \" +\n                            \"say scid scon server set showmirc signam sline sockaccept sockclose socklist \" +\n                            \"socklisten sockmark sockopen sockpause sockread sockrename sockudp sockwrite \" +\n                            \"sound speak splay sreq strip switchbar timer timestamp titlebar tnick tokenize \" +\n                            \"toolbar topic tray treebar ulist unload unset unsetall updatenl url uwho \" +\n                            \"var vcadd vcmd vcrem vol while whois window winhelp write writeint if isalnum \" +\n                            \"isalpha isaop isavoice isban ischan ishop isignore isin isincs isletter islower \" +\n                            \"isnotify isnum ison isop isprotect isreg isupper isvoice iswm iswmcs \" +\n                            \"elseif else goto menu nicklist status title icon size option text edit \" +\n                            \"button check radio box scroll list combo link tab item\");\n  var functions = parseWords(\"if elseif else and not or eq ne in ni for foreach while switch\");\n  var isOperatorChar = /[+\\-*&%=<>!?^\\/\\|]/;\n  function chain(stream, state, f) {\n    state.tokenize = f;\n    return f(stream, state);\n  }\n  function tokenBase(stream, state) {\n    var beforeParams = state.beforeParams;\n    state.beforeParams = false;\n    var ch = stream.next();\n    if (/[\\[\\]{}\\(\\),\\.]/.test(ch)) {\n      if (ch == \"(\" && beforeParams) state.inParams = true;\n      else if (ch == \")\") state.inParams = false;\n      return null;\n    }\n    else if (/\\d/.test(ch)) {\n      stream.eatWhile(/[\\w\\.]/);\n      return \"number\";\n    }\n    else if (ch == \"\\\\\") {\n      stream.eat(\"\\\\\");\n      stream.eat(/./);\n      return \"number\";\n    }\n    else if (ch == \"/\" && stream.eat(\"*\")) {\n      return chain(stream, state, tokenComment);\n    }\n    else if (ch == \";\" && stream.match(/ *\\( *\\(/)) {\n      return chain(stream, state, tokenUnparsed);\n    }\n    else if (ch == \";\" && !state.inParams) {\n      stream.skipToEnd();\n      return \"comment\";\n    }\n    else if (ch == '\"') {\n      stream.eat(/\"/);\n      return \"keyword\";\n    }\n    else if (ch == \"$\") {\n      stream.eatWhile(/[$_a-z0-9A-Z\\.:]/);\n      if (specials && specials.propertyIsEnumerable(stream.current().toLowerCase())) {\n        return \"keyword\";\n      }\n      else {\n        state.beforeParams = true;\n        return \"builtin\";\n      }\n    }\n    else if (ch == \"%\") {\n      stream.eatWhile(/[^,^\\s^\\(^\\)]/);\n      state.beforeParams = true;\n      return \"string\";\n    }\n    else if (isOperatorChar.test(ch)) {\n      stream.eatWhile(isOperatorChar);\n      return \"operator\";\n    }\n    else {\n      stream.eatWhile(/[\\w\\$_{}]/);\n      var word = stream.current().toLowerCase();\n      if (keywords && keywords.propertyIsEnumerable(word))\n        return \"keyword\";\n      if (functions && functions.propertyIsEnumerable(word)) {\n        state.beforeParams = true;\n        return \"keyword\";\n      }\n      return null;\n    }\n  }\n  function tokenComment(stream, state) {\n    var maybeEnd = false, ch;\n    while (ch = stream.next()) {\n      if (ch == \"/\" && maybeEnd) {\n        state.tokenize = tokenBase;\n        break;\n      }\n      maybeEnd = (ch == \"*\");\n    }\n    return \"comment\";\n  }\n  function tokenUnparsed(stream, state) {\n    var maybeEnd = 0, ch;\n    while (ch = stream.next()) {\n      if (ch == \";\" && maybeEnd == 2) {\n        state.tokenize = tokenBase;\n        break;\n      }\n      if (ch == \")\")\n        maybeEnd++;\n      else if (ch != \" \")\n        maybeEnd = 0;\n    }\n    return \"meta\";\n  }\n  return {\n    startState: function() {\n      return {\n        tokenize: tokenBase,\n        beforeParams: false,\n        inParams: false\n      };\n    },\n    token: function(stream, state) {\n      if (stream.eatSpace()) return null;\n      return state.tokenize(stream, state);\n    }\n  };\n});\n\n});\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/mllike/index.html",
    "content": "<!doctype html>\n\n<title>CodeMirror: ML-like mode</title>\n<meta charset=\"utf-8\"/>\n<link rel=stylesheet href=\"../../doc/docs.css\">\n\n<link rel=stylesheet href=../../lib/codemirror.css>\n<script src=../../lib/codemirror.js></script>\n<script src=../../addon/edit/matchbrackets.js></script>\n<script src=mllike.js></script>\n<style type=text/css>\n  .CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}\n</style>\n<div id=nav>\n  <a href=\"http://codemirror.net\"><h1>CodeMirror</h1><img id=logo src=\"../../doc/logo.png\"></a>\n\n  <ul>\n    <li><a href=\"../../index.html\">Home</a>\n    <li><a href=\"../../doc/manual.html\">Manual</a>\n    <li><a href=\"https://github.com/codemirror/codemirror\">Code</a>\n  </ul>\n  <ul>\n    <li><a href=\"../index.html\">Language modes</a>\n    <li><a class=active href=\"#\">ML-like</a>\n  </ul>\n</div>\n\n<article>\n<h2>OCaml mode</h2>\n\n\n<textarea id=\"ocamlCode\">\n(* Summing a list of integers *)\nlet rec sum xs =\n  match xs with\n    | []       -&gt; 0\n    | x :: xs' -&gt; x + sum xs'\n\n(* Quicksort *)\nlet rec qsort = function\n   | [] -&gt; []\n   | pivot :: rest -&gt;\n       let is_less x = x &lt; pivot in\n       let left, right = List.partition is_less rest in\n       qsort left @ [pivot] @ qsort right\n\n(* Fibonacci Sequence *)\nlet rec fib_aux n a b =\n  match n with\n  | 0 -&gt; a\n  | _ -&gt; fib_aux (n - 1) (a + b) a\nlet fib n = fib_aux n 0 1\n\n(* Birthday paradox *)\nlet year_size = 365.\n\nlet rec birthday_paradox prob people =\n    let prob' = (year_size -. float people) /. year_size *. prob  in\n    if prob' &lt; 0.5 then\n        Printf.printf \"answer = %d\\n\" (people+1)\n    else\n        birthday_paradox prob' (people+1) ;;\n\nbirthday_paradox 1.0 1\n\n(* Church numerals *)\nlet zero f x = x\nlet succ n f x = f (n f x)\nlet one = succ zero\nlet two = succ (succ zero)\nlet add n1 n2 f x = n1 f (n2 f x)\nlet to_string n = n (fun k -&gt; \"S\" ^ k) \"0\"\nlet _ = to_string (add (succ two) two)\n\n(* Elementary functions *)\nlet square x = x * x;;\nlet rec fact x =\n  if x &lt;= 1 then 1 else x * fact (x - 1);;\n\n(* Automatic memory management *)\nlet l = 1 :: 2 :: 3 :: [];;\n[1; 2; 3];;\n5 :: l;;\n\n(* Polymorphism: sorting lists *)\nlet rec sort = function\n  | [] -&gt; []\n  | x :: l -&gt; insert x (sort l)\n\nand insert elem = function\n  | [] -&gt; [elem]\n  | x :: l -&gt;\n      if elem &lt; x then elem :: x :: l else x :: insert elem l;;\n\n(* Imperative features *)\nlet add_polynom p1 p2 =\n  let n1 = Array.length p1\n  and n2 = Array.length p2 in\n  let result = Array.create (max n1 n2) 0 in\n  for i = 0 to n1 - 1 do result.(i) &lt;- p1.(i) done;\n  for i = 0 to n2 - 1 do result.(i) &lt;- result.(i) + p2.(i) done;\n  result;;\nadd_polynom [| 1; 2 |] [| 1; 2; 3 |];;\n\n(* We may redefine fact using a reference cell and a for loop *)\nlet fact n =\n  let result = ref 1 in\n  for i = 2 to n do\n    result := i * !result\n   done;\n   !result;;\nfact 5;;\n\n(* Triangle (graphics) *)\nlet () =\n  ignore( Glut.init Sys.argv );\n  Glut.initDisplayMode ~double_buffer:true ();\n  ignore (Glut.createWindow ~title:\"OpenGL Demo\");\n  let angle t = 10. *. t *. t in\n  let render () =\n    GlClear.clear [ `color ];\n    GlMat.load_identity ();\n    GlMat.rotate ~angle: (angle (Sys.time ())) ~z:1. ();\n    GlDraw.begins `triangles;\n    List.iter GlDraw.vertex2 [-1., -1.; 0., 1.; 1., -1.];\n    GlDraw.ends ();\n    Glut.swapBuffers () in\n  GlMat.mode `modelview;\n  Glut.displayFunc ~cb:render;\n  Glut.idleFunc ~cb:(Some Glut.postRedisplay);\n  Glut.mainLoop ()\n\n(* A Hundred Lines of Caml - http://caml.inria.fr/about/taste.en.html *)\n(* OCaml page on Wikipedia - http://en.wikipedia.org/wiki/OCaml *)\n</textarea>\n\n<h2>F# mode</h2>\n<textarea id=\"fsharpCode\">\nmodule CodeMirror.FSharp\n\nlet rec fib = function\n    | 0 -> 0\n    | 1 -> 1\n    | n -> fib (n - 1) + fib (n - 2)\n\ntype Point =\n    {\n        x : int\n        y : int\n    }\n\ntype Color =\n    | Red\n    | Green\n    | Blue\n\n[0 .. 10]\n|> List.map ((+) 2)\n|> List.fold (fun x y -> x + y) 0\n|> printf \"%i\"\n</textarea>\n\n\n<script>\n  var ocamlEditor = CodeMirror.fromTextArea(document.getElementById('ocamlCode'), {\n    mode: 'text/x-ocaml',\n    lineNumbers: true,\n    matchBrackets: true\n  });\n\n  var fsharpEditor = CodeMirror.fromTextArea(document.getElementById('fsharpCode'), {\n    mode: 'text/x-fsharp',\n    lineNumbers: true,\n    matchBrackets: true\n  });\n</script>\n\n<p><strong>MIME types defined:</strong> <code>text/x-ocaml</code> (OCaml) and <code>text/x-fsharp</code> (F#).</p>\n</article>\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/mllike/mllike.js",
    "content": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n(function(mod) {\n  if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n    mod(require(\"../../lib/codemirror\"));\n  else if (typeof define == \"function\" && define.amd) // AMD\n    define([\"../../lib/codemirror\"], mod);\n  else // Plain browser env\n    mod(CodeMirror);\n})(function(CodeMirror) {\n\"use strict\";\n\nCodeMirror.defineMode('mllike', function(_config, parserConfig) {\n  var words = {\n    'let': 'keyword',\n    'rec': 'keyword',\n    'in': 'keyword',\n    'of': 'keyword',\n    'and': 'keyword',\n    'if': 'keyword',\n    'then': 'keyword',\n    'else': 'keyword',\n    'for': 'keyword',\n    'to': 'keyword',\n    'while': 'keyword',\n    'do': 'keyword',\n    'done': 'keyword',\n    'fun': 'keyword',\n    'function': 'keyword',\n    'val': 'keyword',\n    'type': 'keyword',\n    'mutable': 'keyword',\n    'match': 'keyword',\n    'with': 'keyword',\n    'try': 'keyword',\n    'open': 'builtin',\n    'ignore': 'builtin',\n    'begin': 'keyword',\n    'end': 'keyword'\n  };\n\n  var extraWords = parserConfig.extraWords || {};\n  for (var prop in extraWords) {\n    if (extraWords.hasOwnProperty(prop)) {\n      words[prop] = parserConfig.extraWords[prop];\n    }\n  }\n\n  function tokenBase(stream, state) {\n    var ch = stream.next();\n\n    if (ch === '\"') {\n      state.tokenize = tokenString;\n      return state.tokenize(stream, state);\n    }\n    if (ch === '(') {\n      if (stream.eat('*')) {\n        state.commentLevel++;\n        state.tokenize = tokenComment;\n        return state.tokenize(stream, state);\n      }\n    }\n    if (ch === '~') {\n      stream.eatWhile(/\\w/);\n      return 'variable-2';\n    }\n    if (ch === '`') {\n      stream.eatWhile(/\\w/);\n      return 'quote';\n    }\n    if (ch === '/' && parserConfig.slashComments && stream.eat('/')) {\n      stream.skipToEnd();\n      return 'comment';\n    }\n    if (/\\d/.test(ch)) {\n      stream.eatWhile(/[\\d]/);\n      if (stream.eat('.')) {\n        stream.eatWhile(/[\\d]/);\n      }\n      return 'number';\n    }\n    if ( /[+\\-*&%=<>!?|]/.test(ch)) {\n      return 'operator';\n    }\n    stream.eatWhile(/\\w/);\n    var cur = stream.current();\n    return words[cur] || 'variable';\n  }\n\n  function tokenString(stream, state) {\n    var next, end = false, escaped = false;\n    while ((next = stream.next()) != null) {\n      if (next === '\"' && !escaped) {\n        end = true;\n        break;\n      }\n      escaped = !escaped && next === '\\\\';\n    }\n    if (end && !escaped) {\n      state.tokenize = tokenBase;\n    }\n    return 'string';\n  };\n\n  function tokenComment(stream, state) {\n    var prev, next;\n    while(state.commentLevel > 0 && (next = stream.next()) != null) {\n      if (prev === '(' && next === '*') state.commentLevel++;\n      if (prev === '*' && next === ')') state.commentLevel--;\n      prev = next;\n    }\n    if (state.commentLevel <= 0) {\n      state.tokenize = tokenBase;\n    }\n    return 'comment';\n  }\n\n  return {\n    startState: function() {return {tokenize: tokenBase, commentLevel: 0};},\n    token: function(stream, state) {\n      if (stream.eatSpace()) return null;\n      return state.tokenize(stream, state);\n    },\n\n    blockCommentStart: \"(*\",\n    blockCommentEnd: \"*)\",\n    lineComment: parserConfig.slashComments ? \"//\" : null\n  };\n});\n\nCodeMirror.defineMIME('text/x-ocaml', {\n  name: 'mllike',\n  extraWords: {\n    'succ': 'keyword',\n    'trace': 'builtin',\n    'exit': 'builtin',\n    'print_string': 'builtin',\n    'print_endline': 'builtin',\n    'true': 'atom',\n    'false': 'atom',\n    'raise': 'keyword'\n  }\n});\n\nCodeMirror.defineMIME('text/x-fsharp', {\n  name: 'mllike',\n  extraWords: {\n    'abstract': 'keyword',\n    'as': 'keyword',\n    'assert': 'keyword',\n    'base': 'keyword',\n    'class': 'keyword',\n    'default': 'keyword',\n    'delegate': 'keyword',\n    'downcast': 'keyword',\n    'downto': 'keyword',\n    'elif': 'keyword',\n    'exception': 'keyword',\n    'extern': 'keyword',\n    'finally': 'keyword',\n    'global': 'keyword',\n    'inherit': 'keyword',\n    'inline': 'keyword',\n    'interface': 'keyword',\n    'internal': 'keyword',\n    'lazy': 'keyword',\n    'let!': 'keyword',\n    'member' : 'keyword',\n    'module': 'keyword',\n    'namespace': 'keyword',\n    'new': 'keyword',\n    'null': 'keyword',\n    'override': 'keyword',\n    'private': 'keyword',\n    'public': 'keyword',\n    'return': 'keyword',\n    'return!': 'keyword',\n    'select': 'keyword',\n    'static': 'keyword',\n    'struct': 'keyword',\n    'upcast': 'keyword',\n    'use': 'keyword',\n    'use!': 'keyword',\n    'val': 'keyword',\n    'when': 'keyword',\n    'yield': 'keyword',\n    'yield!': 'keyword',\n\n    'List': 'builtin',\n    'Seq': 'builtin',\n    'Map': 'builtin',\n    'Set': 'builtin',\n    'int': 'builtin',\n    'string': 'builtin',\n    'raise': 'builtin',\n    'failwith': 'builtin',\n    'not': 'builtin',\n    'true': 'builtin',\n    'false': 'builtin'\n  },\n  slashComments: true\n});\n\n});\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/modelica/index.html",
    "content": "<!doctype html>\n\n<title>CodeMirror: Modelica mode</title>\n<meta charset=\"utf-8\"/>\n<link rel=stylesheet href=\"../../doc/docs.css\">\n\n<link rel=\"stylesheet\" href=\"../../lib/codemirror.css\">\n<script src=\"../../lib/codemirror.js\"></script>\n<script src=\"../../addon/edit/matchbrackets.js\"></script>\n<link rel=\"stylesheet\" href=\"../../addon/hint/show-hint.css\">\n<script src=\"../../addon/hint/show-hint.js\"></script>\n<script src=\"modelica.js\"></script>\n<style>.CodeMirror {border: 2px inset #dee;}</style>\n<div id=nav>\n  <a href=\"http://codemirror.net\"><h1>CodeMirror</h1><img id=logo src=\"../../doc/logo.png\"></a>\n\n  <ul>\n    <li><a href=\"../../index.html\">Home</a>\n    <li><a href=\"../../doc/manual.html\">Manual</a>\n    <li><a href=\"https://github.com/codemirror/codemirror\">Code</a>\n  </ul>\n  <ul>\n    <li><a href=\"../index.html\">Language modes</a>\n    <li><a class=active href=\"#\">Modelica</a>\n  </ul>\n</div>\n\n<article>\n<h2>Modelica mode</h2>\n\n<div><textarea id=\"modelica\">\nmodel BouncingBall\n  parameter Real e = 0.7;\n  parameter Real g = 9.81;\n  Real h(start=1);\n  Real v;\n  Boolean flying(start=true);\n  Boolean impact;\n  Real v_new;\nequation\n  impact = h <= 0.0;\n  der(v) = if flying then -g else 0;\n  der(h) = v;\n  when {h <= 0.0 and v <= 0.0, impact} then\n    v_new = if edge(impact) then -e*pre(v) else 0;\n    flying = v_new > 0;\n    reinit(v, v_new);\n  end when;\n  annotation (uses(Modelica(version=\"3.2\")));\nend BouncingBall;\n</textarea></div>\n\n    <script>\n      var modelicaEditor = CodeMirror.fromTextArea(document.getElementById(\"modelica\"), {\n        lineNumbers: true,\n        matchBrackets: true,\n        mode: \"text/x-modelica\"\n      });\n      var mac = CodeMirror.keyMap.default == CodeMirror.keyMap.macDefault;\n      CodeMirror.keyMap.default[(mac ? \"Cmd\" : \"Ctrl\") + \"-Space\"] = \"autocomplete\";\n    </script>\n\n    <p>Simple mode that tries to handle Modelica as well as it can.</p>\n\n    <p><strong>MIME types defined:</strong> <code>text/x-modelica</code>\n    (Modlica code).</p>\n</article>\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/modelica/modelica.js",
    "content": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n// Modelica support for CodeMirror, copyright (c) by Lennart Ochel\n\n(function(mod) {\n  if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n    mod(require(\"../../lib/codemirror\"));\n  else if (typeof define == \"function\" && define.amd) // AMD\n    define([\"../../lib/codemirror\"], mod);\n  else // Plain browser env\n    mod(CodeMirror);\n})\n\n(function(CodeMirror) {\n  \"use strict\";\n\n  CodeMirror.defineMode(\"modelica\", function(config, parserConfig) {\n\n    var indentUnit = config.indentUnit;\n    var keywords = parserConfig.keywords || {};\n    var builtin = parserConfig.builtin || {};\n    var atoms = parserConfig.atoms || {};\n\n    var isSingleOperatorChar = /[;=\\(:\\),{}.*<>+\\-\\/^\\[\\]]/;\n    var isDoubleOperatorChar = /(:=|<=|>=|==|<>|\\.\\+|\\.\\-|\\.\\*|\\.\\/|\\.\\^)/;\n    var isDigit = /[0-9]/;\n    var isNonDigit = /[_a-zA-Z]/;\n\n    function tokenLineComment(stream, state) {\n      stream.skipToEnd();\n      state.tokenize = null;\n      return \"comment\";\n    }\n\n    function tokenBlockComment(stream, state) {\n      var maybeEnd = false, ch;\n      while (ch = stream.next()) {\n        if (maybeEnd && ch == \"/\") {\n          state.tokenize = null;\n          break;\n        }\n        maybeEnd = (ch == \"*\");\n      }\n      return \"comment\";\n    }\n\n    function tokenString(stream, state) {\n      var escaped = false, ch;\n      while ((ch = stream.next()) != null) {\n        if (ch == '\"' && !escaped) {\n          state.tokenize = null;\n          state.sol = false;\n          break;\n        }\n        escaped = !escaped && ch == \"\\\\\";\n      }\n\n      return \"string\";\n    }\n\n    function tokenIdent(stream, state) {\n      stream.eatWhile(isDigit);\n      while (stream.eat(isDigit) || stream.eat(isNonDigit)) { }\n\n\n      var cur = stream.current();\n\n      if(state.sol && (cur == \"package\" || cur == \"model\" || cur == \"when\" || cur == \"connector\")) state.level++;\n      else if(state.sol && cur == \"end\" && state.level > 0) state.level--;\n\n      state.tokenize = null;\n      state.sol = false;\n\n      if (keywords.propertyIsEnumerable(cur)) return \"keyword\";\n      else if (builtin.propertyIsEnumerable(cur)) return \"builtin\";\n      else if (atoms.propertyIsEnumerable(cur)) return \"atom\";\n      else return \"variable\";\n    }\n\n    function tokenQIdent(stream, state) {\n      while (stream.eat(/[^']/)) { }\n\n      state.tokenize = null;\n      state.sol = false;\n\n      if(stream.eat(\"'\"))\n        return \"variable\";\n      else\n        return \"error\";\n    }\n\n    function tokenUnsignedNuber(stream, state) {\n      stream.eatWhile(isDigit);\n      if (stream.eat('.')) {\n        stream.eatWhile(isDigit);\n      }\n      if (stream.eat('e') || stream.eat('E')) {\n        if (!stream.eat('-'))\n          stream.eat('+');\n        stream.eatWhile(isDigit);\n      }\n\n      state.tokenize = null;\n      state.sol = false;\n      return \"number\";\n    }\n\n    // Interface\n    return {\n      startState: function() {\n        return {\n          tokenize: null,\n          level: 0,\n          sol: true\n        };\n      },\n\n      token: function(stream, state) {\n        if(state.tokenize != null) {\n          return state.tokenize(stream, state);\n        }\n\n        if(stream.sol()) {\n          state.sol = true;\n        }\n\n        // WHITESPACE\n        if(stream.eatSpace()) {\n          state.tokenize = null;\n          return null;\n        }\n\n        var ch = stream.next();\n\n        // LINECOMMENT\n        if(ch == '/' && stream.eat('/')) {\n          state.tokenize = tokenLineComment;\n        }\n        // BLOCKCOMMENT\n        else if(ch == '/' && stream.eat('*')) {\n          state.tokenize = tokenBlockComment;\n        }\n        // TWO SYMBOL TOKENS\n        else if(isDoubleOperatorChar.test(ch+stream.peek())) {\n          stream.next();\n          state.tokenize = null;\n          return \"operator\";\n        }\n        // SINGLE SYMBOL TOKENS\n        else if(isSingleOperatorChar.test(ch)) {\n          state.tokenize = null;\n          return \"operator\";\n        }\n        // IDENT\n        else if(isNonDigit.test(ch)) {\n          state.tokenize = tokenIdent;\n        }\n        // Q-IDENT\n        else if(ch == \"'\" && stream.peek() && stream.peek() != \"'\") {\n          state.tokenize = tokenQIdent;\n        }\n        // STRING\n        else if(ch == '\"') {\n          state.tokenize = tokenString;\n        }\n        // UNSIGNED_NUBER\n        else if(isDigit.test(ch)) {\n          state.tokenize = tokenUnsignedNuber;\n        }\n        // ERROR\n        else {\n          state.tokenize = null;\n          return \"error\";\n        }\n\n        return state.tokenize(stream, state);\n      },\n\n      indent: function(state, textAfter) {\n        if (state.tokenize != null) return CodeMirror.Pass;\n\n        var level = state.level;\n        if(/(algorithm)/.test(textAfter)) level--;\n        if(/(equation)/.test(textAfter)) level--;\n        if(/(initial algorithm)/.test(textAfter)) level--;\n        if(/(initial equation)/.test(textAfter)) level--;\n        if(/(end)/.test(textAfter)) level--;\n\n        if(level > 0)\n          return indentUnit*level;\n        else\n          return 0;\n      },\n\n      blockCommentStart: \"/*\",\n      blockCommentEnd: \"*/\",\n      lineComment: \"//\"\n    };\n  });\n\n  function words(str) {\n    var obj = {}, words = str.split(\" \");\n    for (var i=0; i<words.length; ++i)\n      obj[words[i]] = true;\n    return obj;\n  }\n\n  var modelicaKeywords = \"algorithm and annotation assert block break class connect connector constant constrainedby der discrete each else elseif elsewhen encapsulated end enumeration equation expandable extends external false final flow for function if import impure in initial inner input loop model not operator or outer output package parameter partial protected public pure record redeclare replaceable return stream then true type when while within\";\n  var modelicaBuiltin = \"abs acos actualStream asin atan atan2 cardinality ceil cos cosh delay div edge exp floor getInstanceName homotopy inStream integer log log10 mod pre reinit rem semiLinear sign sin sinh spatialDistribution sqrt tan tanh\";\n  var modelicaAtoms = \"Real Boolean Integer String\";\n\n  function def(mimes, mode) {\n    if (typeof mimes == \"string\")\n      mimes = [mimes];\n\n    var words = [];\n\n    function add(obj) {\n      if (obj)\n        for (var prop in obj)\n          if (obj.hasOwnProperty(prop))\n            words.push(prop);\n    }\n\n    add(mode.keywords);\n    add(mode.builtin);\n    add(mode.atoms);\n\n    if (words.length) {\n      mode.helperType = mimes[0];\n      CodeMirror.registerHelper(\"hintWords\", mimes[0], words);\n    }\n\n    for (var i=0; i<mimes.length; ++i)\n      CodeMirror.defineMIME(mimes[i], mode);\n  }\n\n  def([\"text/x-modelica\"], {\n    name: \"modelica\",\n    keywords: words(modelicaKeywords),\n    builtin: words(modelicaBuiltin),\n    atoms: words(modelicaAtoms)\n  });\n});\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/nginx/index.html",
    "content": "<!doctype html>\n\n<title>CodeMirror: NGINX mode</title>\n<meta charset=\"utf-8\"/>\n<link rel=stylesheet href=\"../../doc/docs.css\">\n\n<link rel=\"stylesheet\" href=\"../../lib/codemirror.css\">\n<script src=\"../../lib/codemirror.js\"></script>\n<script src=\"nginx.js\"></script>\n<style>.CodeMirror {background: #f8f8f8;}</style>\n    <link rel=\"stylesheet\" href=\"../../doc/docs.css\">\n  </head>\n\n  <style>\n    body {\n      margin: 0em auto;\n    }\n\n    .CodeMirror, .CodeMirror-scroll {\n      height: 600px;\n    }\n  </style>\n<div id=nav>\n  <a href=\"http://codemirror.net\"><h1>CodeMirror</h1><img id=logo src=\"../../doc/logo.png\"></a>\n\n  <ul>\n    <li><a href=\"../../index.html\">Home</a>\n    <li><a href=\"../../doc/manual.html\">Manual</a>\n    <li><a href=\"https://github.com/codemirror/codemirror\">Code</a>\n  </ul>\n  <ul>\n    <li><a href=\"../index.html\">Language modes</a>\n    <li><a class=active href=\"#\">NGINX</a>\n  </ul>\n</div>\n\n<article>\n<h2>NGINX mode</h2>\n<form><textarea id=\"code\" name=\"code\" style=\"height: 800px;\">\nserver {\n  listen 173.255.219.235:80;\n  server_name website.com.au;\n  rewrite / $scheme://www.$host$request_uri permanent; ## Forcibly prepend a www\n}\n\nserver {\n  listen 173.255.219.235:443;\n  server_name website.com.au;\n  rewrite / $scheme://www.$host$request_uri permanent; ## Forcibly prepend a www\n}\n\nserver {\n\n  listen      173.255.219.235:80;\n  server_name www.website.com.au;\n\n\n\n  root        /data/www;\n  index       index.html index.php;\n\n  location / {\n    index index.html index.php;     ## Allow a static html file to be shown first\n    try_files $uri $uri/ @handler;  ## If missing pass the URI to Magento's front handler\n    expires 30d;                    ## Assume all files are cachable\n  }\n\n  ## These locations would be hidden by .htaccess normally\n  location /app/                { deny all; }\n  location /includes/           { deny all; }\n  location /lib/                { deny all; }\n  location /media/downloadable/ { deny all; }\n  location /pkginfo/            { deny all; }\n  location /report/config.xml   { deny all; }\n  location /var/                { deny all; }\n\n  location /var/export/ { ## Allow admins only to view export folder\n    auth_basic           \"Restricted\"; ## Message shown in login window\n    auth_basic_user_file /rs/passwords/testfile; ## See /etc/nginx/htpassword\n    autoindex            on;\n  }\n\n  location  /. { ## Disable .htaccess and other hidden files\n    return 404;\n  }\n\n  location @handler { ## Magento uses a common front handler\n    rewrite / /index.php;\n  }\n\n  location ~ .php/ { ## Forward paths like /js/index.php/x.js to relevant handler\n    rewrite ^/(.*.php)/ /$1 last;\n  }\n\n  location ~ \\.php$ {\n    if (!-e $request_filename) { rewrite / /index.php last; } ## Catch 404s that try_files miss\n\n    fastcgi_pass   127.0.0.1:9000;\n    fastcgi_index  index.php;\n    fastcgi_param PATH_INFO $fastcgi_script_name;\n    fastcgi_param  SCRIPT_FILENAME $document_root$fastcgi_script_name;\n    include        /rs/confs/nginx/fastcgi_params;\n  }\n\n}\n\n\nserver {\n\n  listen              173.255.219.235:443;\n  server_name         website.com.au www.website.com.au;\n\n  root   /data/www;\n  index index.html index.php;\n\n  ssl                 on;\n  ssl_certificate     /rs/ssl/ssl.crt;\n  ssl_certificate_key /rs/ssl/ssl.key;\n\n  ssl_session_timeout  5m;\n\n  ssl_protocols  SSLv2 SSLv3 TLSv1;\n  ssl_ciphers  ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP;\n  ssl_prefer_server_ciphers   on;\n\n\n\n  location / {\n    index index.html index.php; ## Allow a static html file to be shown first\n    try_files $uri $uri/ @handler; ## If missing pass the URI to Magento's front handler\n    expires 30d; ## Assume all files are cachable\n  }\n\n  ## These locations would be hidden by .htaccess normally\n  location /app/                { deny all; }\n  location /includes/           { deny all; }\n  location /lib/                { deny all; }\n  location /media/downloadable/ { deny all; }\n  location /pkginfo/            { deny all; }\n  location /report/config.xml   { deny all; }\n  location /var/                { deny all; }\n\n  location /var/export/ { ## Allow admins only to view export folder\n    auth_basic           \"Restricted\"; ## Message shown in login window\n    auth_basic_user_file htpasswd; ## See /etc/nginx/htpassword\n    autoindex            on;\n  }\n\n  location  /. { ## Disable .htaccess and other hidden files\n    return 404;\n  }\n\n  location @handler { ## Magento uses a common front handler\n    rewrite / /index.php;\n  }\n\n  location ~ .php/ { ## Forward paths like /js/index.php/x.js to relevant handler\n    rewrite ^/(.*.php)/ /$1 last;\n  }\n\n  location ~ .php$ { ## Execute PHP scripts\n    if (!-e $request_filename) { rewrite  /index.php last; } ## Catch 404s that try_files miss\n\n    fastcgi_pass 127.0.0.1:9000;\n    fastcgi_index  index.php;\n    fastcgi_param PATH_INFO $fastcgi_script_name;\n    fastcgi_param  SCRIPT_FILENAME $document_root$fastcgi_script_name;\n    include        /rs/confs/nginx/fastcgi_params;\n\n    fastcgi_param HTTPS on;\n  }\n\n}\n</textarea></form>\n    <script>\n      var editor = CodeMirror.fromTextArea(document.getElementById(\"code\"), {});\n    </script>\n\n    <p><strong>MIME types defined:</strong> <code>text/nginx</code>.</p>\n\n  </article>\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/nginx/nginx.js",
    "content": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n(function(mod) {\n  if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n    mod(require(\"../../lib/codemirror\"));\n  else if (typeof define == \"function\" && define.amd) // AMD\n    define([\"../../lib/codemirror\"], mod);\n  else // Plain browser env\n    mod(CodeMirror);\n})(function(CodeMirror) {\n\"use strict\";\n\nCodeMirror.defineMode(\"nginx\", function(config) {\n\n  function words(str) {\n    var obj = {}, words = str.split(\" \");\n    for (var i = 0; i < words.length; ++i) obj[words[i]] = true;\n    return obj;\n  }\n\n  var keywords = words(\n    /* ngxDirectiveControl */ \"break return rewrite set\" +\n    /* ngxDirective */ \" accept_mutex accept_mutex_delay access_log add_after_body add_before_body add_header addition_types aio alias allow ancient_browser ancient_browser_value auth_basic auth_basic_user_file auth_http auth_http_header auth_http_timeout autoindex autoindex_exact_size autoindex_localtime charset charset_types client_body_buffer_size client_body_in_file_only client_body_in_single_buffer client_body_temp_path client_body_timeout client_header_buffer_size client_header_timeout client_max_body_size connection_pool_size create_full_put_path daemon dav_access dav_methods debug_connection debug_points default_type degradation degrade deny devpoll_changes devpoll_events directio directio_alignment empty_gif env epoll_events error_log eventport_events expires fastcgi_bind fastcgi_buffer_size fastcgi_buffers fastcgi_busy_buffers_size fastcgi_cache fastcgi_cache_key fastcgi_cache_methods fastcgi_cache_min_uses fastcgi_cache_path fastcgi_cache_use_stale fastcgi_cache_valid fastcgi_catch_stderr fastcgi_connect_timeout fastcgi_hide_header fastcgi_ignore_client_abort fastcgi_ignore_headers fastcgi_index fastcgi_intercept_errors fastcgi_max_temp_file_size fastcgi_next_upstream fastcgi_param fastcgi_pass_header fastcgi_pass_request_body fastcgi_pass_request_headers fastcgi_read_timeout fastcgi_send_lowat fastcgi_send_timeout fastcgi_split_path_info fastcgi_store fastcgi_store_access fastcgi_temp_file_write_size fastcgi_temp_path fastcgi_upstream_fail_timeout fastcgi_upstream_max_fails flv geoip_city geoip_country google_perftools_profiles gzip gzip_buffers gzip_comp_level gzip_disable gzip_hash gzip_http_version gzip_min_length gzip_no_buffer gzip_proxied gzip_static gzip_types gzip_vary gzip_window if_modified_since ignore_invalid_headers image_filter image_filter_buffer image_filter_jpeg_quality image_filter_transparency imap_auth imap_capabilities imap_client_buffer index ip_hash keepalive_requests keepalive_timeout kqueue_changes kqueue_events large_client_header_buffers limit_conn limit_conn_log_level limit_rate limit_rate_after limit_req limit_req_log_level limit_req_zone limit_zone lingering_time lingering_timeout lock_file log_format log_not_found log_subrequest map_hash_bucket_size map_hash_max_size master_process memcached_bind memcached_buffer_size memcached_connect_timeout memcached_next_upstream memcached_read_timeout memcached_send_timeout memcached_upstream_fail_timeout memcached_upstream_max_fails merge_slashes min_delete_depth modern_browser modern_browser_value msie_padding msie_refresh multi_accept open_file_cache open_file_cache_errors open_file_cache_events open_file_cache_min_uses open_file_cache_valid open_log_file_cache output_buffers override_charset perl perl_modules perl_require perl_set pid pop3_auth pop3_capabilities port_in_redirect postpone_gzipping postpone_output protocol proxy proxy_bind proxy_buffer proxy_buffer_size proxy_buffering proxy_buffers proxy_busy_buffers_size proxy_cache proxy_cache_key proxy_cache_methods proxy_cache_min_uses proxy_cache_path proxy_cache_use_stale proxy_cache_valid proxy_connect_timeout proxy_headers_hash_bucket_size proxy_headers_hash_max_size proxy_hide_header proxy_ignore_client_abort proxy_ignore_headers proxy_intercept_errors proxy_max_temp_file_size proxy_method proxy_next_upstream proxy_pass_error_message proxy_pass_header proxy_pass_request_body proxy_pass_request_headers proxy_read_timeout proxy_redirect proxy_send_lowat proxy_send_timeout proxy_set_body proxy_set_header proxy_ssl_session_reuse proxy_store proxy_store_access proxy_temp_file_write_size proxy_temp_path proxy_timeout proxy_upstream_fail_timeout proxy_upstream_max_fails random_index read_ahead real_ip_header recursive_error_pages request_pool_size reset_timedout_connection resolver resolver_timeout rewrite_log rtsig_overflow_events rtsig_overflow_test rtsig_overflow_threshold rtsig_signo satisfy secure_link_secret send_lowat send_timeout sendfile sendfile_max_chunk server_name_in_redirect server_names_hash_bucket_size server_names_hash_max_size server_tokens set_real_ip_from smtp_auth smtp_capabilities smtp_client_buffer smtp_greeting_delay so_keepalive source_charset ssi ssi_ignore_recycled_buffers ssi_min_file_chunk ssi_silent_errors ssi_types ssi_value_length ssl ssl_certificate ssl_certificate_key ssl_ciphers ssl_client_certificate ssl_crl ssl_dhparam ssl_engine ssl_prefer_server_ciphers ssl_protocols ssl_session_cache ssl_session_timeout ssl_verify_client ssl_verify_depth starttls stub_status sub_filter sub_filter_once sub_filter_types tcp_nodelay tcp_nopush thread_stack_size timeout timer_resolution types_hash_bucket_size types_hash_max_size underscores_in_headers uninitialized_variable_warn use user userid userid_domain userid_expires userid_mark userid_name userid_p3p userid_path userid_service valid_referers variables_hash_bucket_size variables_hash_max_size worker_connections worker_cpu_affinity worker_priority worker_processes worker_rlimit_core worker_rlimit_nofile worker_rlimit_sigpending worker_threads working_directory xclient xml_entities xslt_stylesheet xslt_typesdrew@li229-23\"\n    );\n\n  var keywords_block = words(\n    /* ngxDirectiveBlock */ \"http mail events server types location upstream charset_map limit_except if geo map\"\n    );\n\n  var keywords_important = words(\n    /* ngxDirectiveImportant */ \"include root server server_name listen internal proxy_pass memcached_pass fastcgi_pass try_files\"\n    );\n\n  var indentUnit = config.indentUnit, type;\n  function ret(style, tp) {type = tp; return style;}\n\n  function tokenBase(stream, state) {\n\n\n    stream.eatWhile(/[\\w\\$_]/);\n\n    var cur = stream.current();\n\n\n    if (keywords.propertyIsEnumerable(cur)) {\n      return \"keyword\";\n    }\n    else if (keywords_block.propertyIsEnumerable(cur)) {\n      return \"variable-2\";\n    }\n    else if (keywords_important.propertyIsEnumerable(cur)) {\n      return \"string-2\";\n    }\n    /**/\n\n    var ch = stream.next();\n    if (ch == \"@\") {stream.eatWhile(/[\\w\\\\\\-]/); return ret(\"meta\", stream.current());}\n    else if (ch == \"/\" && stream.eat(\"*\")) {\n      state.tokenize = tokenCComment;\n      return tokenCComment(stream, state);\n    }\n    else if (ch == \"<\" && stream.eat(\"!\")) {\n      state.tokenize = tokenSGMLComment;\n      return tokenSGMLComment(stream, state);\n    }\n    else if (ch == \"=\") ret(null, \"compare\");\n    else if ((ch == \"~\" || ch == \"|\") && stream.eat(\"=\")) return ret(null, \"compare\");\n    else if (ch == \"\\\"\" || ch == \"'\") {\n      state.tokenize = tokenString(ch);\n      return state.tokenize(stream, state);\n    }\n    else if (ch == \"#\") {\n      stream.skipToEnd();\n      return ret(\"comment\", \"comment\");\n    }\n    else if (ch == \"!\") {\n      stream.match(/^\\s*\\w*/);\n      return ret(\"keyword\", \"important\");\n    }\n    else if (/\\d/.test(ch)) {\n      stream.eatWhile(/[\\w.%]/);\n      return ret(\"number\", \"unit\");\n    }\n    else if (/[,.+>*\\/]/.test(ch)) {\n      return ret(null, \"select-op\");\n    }\n    else if (/[;{}:\\[\\]]/.test(ch)) {\n      return ret(null, ch);\n    }\n    else {\n      stream.eatWhile(/[\\w\\\\\\-]/);\n      return ret(\"variable\", \"variable\");\n    }\n  }\n\n  function tokenCComment(stream, state) {\n    var maybeEnd = false, ch;\n    while ((ch = stream.next()) != null) {\n      if (maybeEnd && ch == \"/\") {\n        state.tokenize = tokenBase;\n        break;\n      }\n      maybeEnd = (ch == \"*\");\n    }\n    return ret(\"comment\", \"comment\");\n  }\n\n  function tokenSGMLComment(stream, state) {\n    var dashes = 0, ch;\n    while ((ch = stream.next()) != null) {\n      if (dashes >= 2 && ch == \">\") {\n        state.tokenize = tokenBase;\n        break;\n      }\n      dashes = (ch == \"-\") ? dashes + 1 : 0;\n    }\n    return ret(\"comment\", \"comment\");\n  }\n\n  function tokenString(quote) {\n    return function(stream, state) {\n      var escaped = false, ch;\n      while ((ch = stream.next()) != null) {\n        if (ch == quote && !escaped)\n          break;\n        escaped = !escaped && ch == \"\\\\\";\n      }\n      if (!escaped) state.tokenize = tokenBase;\n      return ret(\"string\", \"string\");\n    };\n  }\n\n  return {\n    startState: function(base) {\n      return {tokenize: tokenBase,\n              baseIndent: base || 0,\n              stack: []};\n    },\n\n    token: function(stream, state) {\n      if (stream.eatSpace()) return null;\n      type = null;\n      var style = state.tokenize(stream, state);\n\n      var context = state.stack[state.stack.length-1];\n      if (type == \"hash\" && context == \"rule\") style = \"atom\";\n      else if (style == \"variable\") {\n        if (context == \"rule\") style = \"number\";\n        else if (!context || context == \"@media{\") style = \"tag\";\n      }\n\n      if (context == \"rule\" && /^[\\{\\};]$/.test(type))\n        state.stack.pop();\n      if (type == \"{\") {\n        if (context == \"@media\") state.stack[state.stack.length-1] = \"@media{\";\n        else state.stack.push(\"{\");\n      }\n      else if (type == \"}\") state.stack.pop();\n      else if (type == \"@media\") state.stack.push(\"@media\");\n      else if (context == \"{\" && type != \"comment\") state.stack.push(\"rule\");\n      return style;\n    },\n\n    indent: function(state, textAfter) {\n      var n = state.stack.length;\n      if (/^\\}/.test(textAfter))\n        n -= state.stack[state.stack.length-1] == \"rule\" ? 2 : 1;\n      return state.baseIndent + n * indentUnit;\n    },\n\n    electricChars: \"}\"\n  };\n});\n\nCodeMirror.defineMIME(\"text/nginx\", \"text/x-nginx-conf\");\n\n});\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/ntriples/index.html",
    "content": "<!doctype html>\n\n<title>CodeMirror: NTriples mode</title>\n<meta charset=\"utf-8\"/>\n<link rel=stylesheet href=\"../../doc/docs.css\">\n\n<link rel=\"stylesheet\" href=\"../../lib/codemirror.css\">\n<script src=\"../../lib/codemirror.js\"></script>\n<script src=\"ntriples.js\"></script>\n<style type=\"text/css\">\n      .CodeMirror {\n        border: 1px solid #eee;\n      }\n    </style>\n<div id=nav>\n  <a href=\"http://codemirror.net\"><h1>CodeMirror</h1><img id=logo src=\"../../doc/logo.png\"></a>\n\n  <ul>\n    <li><a href=\"../../index.html\">Home</a>\n    <li><a href=\"../../doc/manual.html\">Manual</a>\n    <li><a href=\"https://github.com/codemirror/codemirror\">Code</a>\n  </ul>\n  <ul>\n    <li><a href=\"../index.html\">Language modes</a>\n    <li><a class=active href=\"#\">NTriples</a>\n  </ul>\n</div>\n\n<article>\n<h2>NTriples mode</h2>\n<form>\n<textarea id=\"ntriples\" name=\"ntriples\">    \n<http://Sub1>     <http://pred1>     <http://obj> .\n<http://Sub2>     <http://pred2#an2> \"literal 1\" .\n<http://Sub3#an3> <http://pred3>     _:bnode3 .\n_:bnode4          <http://pred4>     \"literal 2\"@lang .\n_:bnode5          <http://pred5>     \"literal 3\"^^<http://type> .\n</textarea>\n</form>\n\n    <script>\n      var editor = CodeMirror.fromTextArea(document.getElementById(\"ntriples\"), {});\n    </script>\n    <p><strong>MIME types defined:</strong> <code>text/n-triples</code>.</p>\n  </article>\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/ntriples/ntriples.js",
    "content": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n/**********************************************************\n* This script provides syntax highlighting support for\n* the Ntriples format.\n* Ntriples format specification:\n*     http://www.w3.org/TR/rdf-testcases/#ntriples\n***********************************************************/\n\n/*\n    The following expression defines the defined ASF grammar transitions.\n\n    pre_subject ->\n        {\n        ( writing_subject_uri | writing_bnode_uri )\n            -> pre_predicate\n                -> writing_predicate_uri\n                    -> pre_object\n                        -> writing_object_uri | writing_object_bnode |\n                          (\n                            writing_object_literal\n                                -> writing_literal_lang | writing_literal_type\n                          )\n                            -> post_object\n                                -> BEGIN\n         } otherwise {\n             -> ERROR\n         }\n*/\n\n(function(mod) {\n  if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n    mod(require(\"../../lib/codemirror\"));\n  else if (typeof define == \"function\" && define.amd) // AMD\n    define([\"../../lib/codemirror\"], mod);\n  else // Plain browser env\n    mod(CodeMirror);\n})(function(CodeMirror) {\n\"use strict\";\n\nCodeMirror.defineMode(\"ntriples\", function() {\n\n  var Location = {\n    PRE_SUBJECT         : 0,\n    WRITING_SUB_URI     : 1,\n    WRITING_BNODE_URI   : 2,\n    PRE_PRED            : 3,\n    WRITING_PRED_URI    : 4,\n    PRE_OBJ             : 5,\n    WRITING_OBJ_URI     : 6,\n    WRITING_OBJ_BNODE   : 7,\n    WRITING_OBJ_LITERAL : 8,\n    WRITING_LIT_LANG    : 9,\n    WRITING_LIT_TYPE    : 10,\n    POST_OBJ            : 11,\n    ERROR               : 12\n  };\n  function transitState(currState, c) {\n    var currLocation = currState.location;\n    var ret;\n\n    // Opening.\n    if     (currLocation == Location.PRE_SUBJECT && c == '<') ret = Location.WRITING_SUB_URI;\n    else if(currLocation == Location.PRE_SUBJECT && c == '_') ret = Location.WRITING_BNODE_URI;\n    else if(currLocation == Location.PRE_PRED    && c == '<') ret = Location.WRITING_PRED_URI;\n    else if(currLocation == Location.PRE_OBJ     && c == '<') ret = Location.WRITING_OBJ_URI;\n    else if(currLocation == Location.PRE_OBJ     && c == '_') ret = Location.WRITING_OBJ_BNODE;\n    else if(currLocation == Location.PRE_OBJ     && c == '\"') ret = Location.WRITING_OBJ_LITERAL;\n\n    // Closing.\n    else if(currLocation == Location.WRITING_SUB_URI     && c == '>') ret = Location.PRE_PRED;\n    else if(currLocation == Location.WRITING_BNODE_URI   && c == ' ') ret = Location.PRE_PRED;\n    else if(currLocation == Location.WRITING_PRED_URI    && c == '>') ret = Location.PRE_OBJ;\n    else if(currLocation == Location.WRITING_OBJ_URI     && c == '>') ret = Location.POST_OBJ;\n    else if(currLocation == Location.WRITING_OBJ_BNODE   && c == ' ') ret = Location.POST_OBJ;\n    else if(currLocation == Location.WRITING_OBJ_LITERAL && c == '\"') ret = Location.POST_OBJ;\n    else if(currLocation == Location.WRITING_LIT_LANG && c == ' ') ret = Location.POST_OBJ;\n    else if(currLocation == Location.WRITING_LIT_TYPE && c == '>') ret = Location.POST_OBJ;\n\n    // Closing typed and language literal.\n    else if(currLocation == Location.WRITING_OBJ_LITERAL && c == '@') ret = Location.WRITING_LIT_LANG;\n    else if(currLocation == Location.WRITING_OBJ_LITERAL && c == '^') ret = Location.WRITING_LIT_TYPE;\n\n    // Spaces.\n    else if( c == ' ' &&\n             (\n               currLocation == Location.PRE_SUBJECT ||\n               currLocation == Location.PRE_PRED    ||\n               currLocation == Location.PRE_OBJ     ||\n               currLocation == Location.POST_OBJ\n             )\n           ) ret = currLocation;\n\n    // Reset.\n    else if(currLocation == Location.POST_OBJ && c == '.') ret = Location.PRE_SUBJECT;\n\n    // Error\n    else ret = Location.ERROR;\n\n    currState.location=ret;\n  }\n\n  return {\n    startState: function() {\n       return {\n           location : Location.PRE_SUBJECT,\n           uris     : [],\n           anchors  : [],\n           bnodes   : [],\n           langs    : [],\n           types    : []\n       };\n    },\n    token: function(stream, state) {\n      var ch = stream.next();\n      if(ch == '<') {\n         transitState(state, ch);\n         var parsedURI = '';\n         stream.eatWhile( function(c) { if( c != '#' && c != '>' ) { parsedURI += c; return true; } return false;} );\n         state.uris.push(parsedURI);\n         if( stream.match('#', false) ) return 'variable';\n         stream.next();\n         transitState(state, '>');\n         return 'variable';\n      }\n      if(ch == '#') {\n        var parsedAnchor = '';\n        stream.eatWhile(function(c) { if(c != '>' && c != ' ') { parsedAnchor+= c; return true; } return false;});\n        state.anchors.push(parsedAnchor);\n        return 'variable-2';\n      }\n      if(ch == '>') {\n          transitState(state, '>');\n          return 'variable';\n      }\n      if(ch == '_') {\n          transitState(state, ch);\n          var parsedBNode = '';\n          stream.eatWhile(function(c) { if( c != ' ' ) { parsedBNode += c; return true; } return false;});\n          state.bnodes.push(parsedBNode);\n          stream.next();\n          transitState(state, ' ');\n          return 'builtin';\n      }\n      if(ch == '\"') {\n          transitState(state, ch);\n          stream.eatWhile( function(c) { return c != '\"'; } );\n          stream.next();\n          if( stream.peek() != '@' && stream.peek() != '^' ) {\n              transitState(state, '\"');\n          }\n          return 'string';\n      }\n      if( ch == '@' ) {\n          transitState(state, '@');\n          var parsedLang = '';\n          stream.eatWhile(function(c) { if( c != ' ' ) { parsedLang += c; return true; } return false;});\n          state.langs.push(parsedLang);\n          stream.next();\n          transitState(state, ' ');\n          return 'string-2';\n      }\n      if( ch == '^' ) {\n          stream.next();\n          transitState(state, '^');\n          var parsedType = '';\n          stream.eatWhile(function(c) { if( c != '>' ) { parsedType += c; return true; } return false;} );\n          state.types.push(parsedType);\n          stream.next();\n          transitState(state, '>');\n          return 'variable';\n      }\n      if( ch == ' ' ) {\n          transitState(state, ch);\n      }\n      if( ch == '.' ) {\n          transitState(state, ch);\n      }\n    }\n  };\n});\n\nCodeMirror.defineMIME(\"text/n-triples\", \"ntriples\");\n\n});\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/octave/index.html",
    "content": "<!doctype html>\n\n<title>CodeMirror: Octave mode</title>\n<meta charset=\"utf-8\"/>\n<link rel=stylesheet href=\"../../doc/docs.css\">\n\n<link rel=\"stylesheet\" href=\"../../lib/codemirror.css\">\n<script src=\"../../lib/codemirror.js\"></script>\n<script src=\"octave.js\"></script>\n<style type=\"text/css\">.CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}</style>\n<div id=nav>\n  <a href=\"http://codemirror.net\"><h1>CodeMirror</h1><img id=logo src=\"../../doc/logo.png\"></a>\n\n  <ul>\n    <li><a href=\"../../index.html\">Home</a>\n    <li><a href=\"../../doc/manual.html\">Manual</a>\n    <li><a href=\"https://github.com/codemirror/codemirror\">Code</a>\n  </ul>\n  <ul>\n    <li><a href=\"../index.html\">Language modes</a>\n    <li><a class=active href=\"#\">Octave</a>\n  </ul>\n</div>\n\n<article>\n<h2>Octave mode</h2>\n\n    <div><textarea id=\"code\" name=\"code\">\n%numbers\n[1234 1234i 1234j]\n[.234 .234j 2.23i]\n[23e2 12E1j 123D-4 0x234]\n\n%strings\n'asda''a'\n\"asda\"\"a\"\n\n%identifiers\na + as123 - __asd__\n\n%operators\n-\n+\n=\n==\n>\n<\n>=\n<=\n&\n~\n...\nbreak zeros default margin round ones rand\nceil floor size clear zeros eye mean std cov\nerror eval function\nabs acos atan asin cos cosh exp log prod sum\nlog10 max min sign sin sinh sqrt tan reshape\nreturn\ncase switch\nelse elseif end if otherwise\ndo for while\ntry catch\nclassdef properties events methods\nglobal persistent\n\n%one line comment\n%{ multi \nline commment %}\n\n    </textarea></div>\n    <script>\n      var editor = CodeMirror.fromTextArea(document.getElementById(\"code\"), {\n        mode: {name: \"octave\",\n               version: 2,\n               singleLineStringErrors: false},\n        lineNumbers: true,\n        indentUnit: 4,\n        matchBrackets: true\n      });\n    </script>\n\n    <p><strong>MIME types defined:</strong> <code>text/x-octave</code>.</p>\n</article>\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/octave/octave.js",
    "content": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n(function(mod) {\n  if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n    mod(require(\"../../lib/codemirror\"));\n  else if (typeof define == \"function\" && define.amd) // AMD\n    define([\"../../lib/codemirror\"], mod);\n  else // Plain browser env\n    mod(CodeMirror);\n})(function(CodeMirror) {\n\"use strict\";\n\nCodeMirror.defineMode(\"octave\", function() {\n  function wordRegexp(words) {\n    return new RegExp(\"^((\" + words.join(\")|(\") + \"))\\\\b\");\n  }\n\n  var singleOperators = new RegExp(\"^[\\\\+\\\\-\\\\*/&|\\\\^~<>!@'\\\\\\\\]\");\n  var singleDelimiters = new RegExp('^[\\\\(\\\\[\\\\{\\\\},:=;]');\n  var doubleOperators = new RegExp(\"^((==)|(~=)|(<=)|(>=)|(<<)|(>>)|(\\\\.[\\\\+\\\\-\\\\*/\\\\^\\\\\\\\]))\");\n  var doubleDelimiters = new RegExp(\"^((!=)|(\\\\+=)|(\\\\-=)|(\\\\*=)|(/=)|(&=)|(\\\\|=)|(\\\\^=))\");\n  var tripleDelimiters = new RegExp(\"^((>>=)|(<<=))\");\n  var expressionEnd = new RegExp(\"^[\\\\]\\\\)]\");\n  var identifiers = new RegExp(\"^[_A-Za-z\\xa1-\\uffff][_A-Za-z0-9\\xa1-\\uffff]*\");\n\n  var builtins = wordRegexp([\n    'error', 'eval', 'function', 'abs', 'acos', 'atan', 'asin', 'cos',\n    'cosh', 'exp', 'log', 'prod', 'sum', 'log10', 'max', 'min', 'sign', 'sin', 'sinh',\n    'sqrt', 'tan', 'reshape', 'break', 'zeros', 'default', 'margin', 'round', 'ones',\n    'rand', 'syn', 'ceil', 'floor', 'size', 'clear', 'zeros', 'eye', 'mean', 'std', 'cov',\n    'det', 'eig', 'inv', 'norm', 'rank', 'trace', 'expm', 'logm', 'sqrtm', 'linspace', 'plot',\n    'title', 'xlabel', 'ylabel', 'legend', 'text', 'grid', 'meshgrid', 'mesh', 'num2str',\n    'fft', 'ifft', 'arrayfun', 'cellfun', 'input', 'fliplr', 'flipud', 'ismember'\n  ]);\n\n  var keywords = wordRegexp([\n    'return', 'case', 'switch', 'else', 'elseif', 'end', 'endif', 'endfunction',\n    'if', 'otherwise', 'do', 'for', 'while', 'try', 'catch', 'classdef', 'properties', 'events',\n    'methods', 'global', 'persistent', 'endfor', 'endwhile', 'printf', 'sprintf', 'disp', 'until',\n    'continue', 'pkg'\n  ]);\n\n\n  // tokenizers\n  function tokenTranspose(stream, state) {\n    if (!stream.sol() && stream.peek() === '\\'') {\n      stream.next();\n      state.tokenize = tokenBase;\n      return 'operator';\n    }\n    state.tokenize = tokenBase;\n    return tokenBase(stream, state);\n  }\n\n\n  function tokenComment(stream, state) {\n    if (stream.match(/^.*%}/)) {\n      state.tokenize = tokenBase;\n      return 'comment';\n    };\n    stream.skipToEnd();\n    return 'comment';\n  }\n\n  function tokenBase(stream, state) {\n    // whitespaces\n    if (stream.eatSpace()) return null;\n\n    // Handle one line Comments\n    if (stream.match('%{')){\n      state.tokenize = tokenComment;\n      stream.skipToEnd();\n      return 'comment';\n    }\n\n    if (stream.match(/^[%#]/)){\n      stream.skipToEnd();\n      return 'comment';\n    }\n\n    // Handle Number Literals\n    if (stream.match(/^[0-9\\.+-]/, false)) {\n      if (stream.match(/^[+-]?0x[0-9a-fA-F]+[ij]?/)) {\n        stream.tokenize = tokenBase;\n        return 'number'; };\n      if (stream.match(/^[+-]?\\d*\\.\\d+([EeDd][+-]?\\d+)?[ij]?/)) { return 'number'; };\n      if (stream.match(/^[+-]?\\d+([EeDd][+-]?\\d+)?[ij]?/)) { return 'number'; };\n    }\n    if (stream.match(wordRegexp(['nan','NaN','inf','Inf']))) { return 'number'; };\n\n    // Handle Strings\n    if (stream.match(/^\"([^\"]|(\"\"))*\"/)) { return 'string'; } ;\n    if (stream.match(/^'([^']|(''))*'/)) { return 'string'; } ;\n\n    // Handle words\n    if (stream.match(keywords)) { return 'keyword'; } ;\n    if (stream.match(builtins)) { return 'builtin'; } ;\n    if (stream.match(identifiers)) { return 'variable'; } ;\n\n    if (stream.match(singleOperators) || stream.match(doubleOperators)) { return 'operator'; };\n    if (stream.match(singleDelimiters) || stream.match(doubleDelimiters) || stream.match(tripleDelimiters)) { return null; };\n\n    if (stream.match(expressionEnd)) {\n      state.tokenize = tokenTranspose;\n      return null;\n    };\n\n\n    // Handle non-detected items\n    stream.next();\n    return 'error';\n  };\n\n\n  return {\n    startState: function() {\n      return {\n        tokenize: tokenBase\n      };\n    },\n\n    token: function(stream, state) {\n      var style = state.tokenize(stream, state);\n      if (style === 'number' || style === 'variable'){\n        state.tokenize = tokenTranspose;\n      }\n      return style;\n    }\n  };\n});\n\nCodeMirror.defineMIME(\"text/x-octave\", \"octave\");\n\n});\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/pascal/index.html",
    "content": "<!doctype html>\n\n<title>CodeMirror: Pascal mode</title>\n<meta charset=\"utf-8\"/>\n<link rel=stylesheet href=\"../../doc/docs.css\">\n\n<link rel=\"stylesheet\" href=\"../../lib/codemirror.css\">\n<script src=\"../../lib/codemirror.js\"></script>\n<script src=\"pascal.js\"></script>\n<style type=\"text/css\">.CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}</style>\n<div id=nav>\n  <a href=\"http://codemirror.net\"><h1>CodeMirror</h1><img id=logo src=\"../../doc/logo.png\"></a>\n\n  <ul>\n    <li><a href=\"../../index.html\">Home</a>\n    <li><a href=\"../../doc/manual.html\">Manual</a>\n    <li><a href=\"https://github.com/codemirror/codemirror\">Code</a>\n  </ul>\n  <ul>\n    <li><a href=\"../index.html\">Language modes</a>\n    <li><a class=active href=\"#\">Pascal</a>\n  </ul>\n</div>\n\n<article>\n<h2>Pascal mode</h2>\n\n\n<div><textarea id=\"code\" name=\"code\">\n(* Example Pascal code *)\n\nwhile a <> b do writeln('Waiting');\n \nif a > b then \n  writeln('Condition met')\nelse \n  writeln('Condition not met');\n \nfor i := 1 to 10 do \n  writeln('Iteration: ', i:1);\n \nrepeat\n  a := a + 1\nuntil a = 10;\n \ncase i of\n  0: write('zero');\n  1: write('one');\n  2: write('two')\nend;\n</textarea></div>\n\n    <script>\n      var editor = CodeMirror.fromTextArea(document.getElementById(\"code\"), {\n        lineNumbers: true,\n        mode: \"text/x-pascal\"\n      });\n    </script>\n\n    <p><strong>MIME types defined:</strong> <code>text/x-pascal</code>.</p>\n  </article>\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/pascal/pascal.js",
    "content": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n(function(mod) {\n  if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n    mod(require(\"../../lib/codemirror\"));\n  else if (typeof define == \"function\" && define.amd) // AMD\n    define([\"../../lib/codemirror\"], mod);\n  else // Plain browser env\n    mod(CodeMirror);\n})(function(CodeMirror) {\n\"use strict\";\n\nCodeMirror.defineMode(\"pascal\", function() {\n  function words(str) {\n    var obj = {}, words = str.split(\" \");\n    for (var i = 0; i < words.length; ++i) obj[words[i]] = true;\n    return obj;\n  }\n  var keywords = words(\"and array begin case const div do downto else end file for forward integer \" +\n                       \"boolean char function goto if in label mod nil not of or packed procedure \" +\n                       \"program record repeat set string then to type until var while with\");\n  var atoms = {\"null\": true};\n\n  var isOperatorChar = /[+\\-*&%=<>!?|\\/]/;\n\n  function tokenBase(stream, state) {\n    var ch = stream.next();\n    if (ch == \"#\" && state.startOfLine) {\n      stream.skipToEnd();\n      return \"meta\";\n    }\n    if (ch == '\"' || ch == \"'\") {\n      state.tokenize = tokenString(ch);\n      return state.tokenize(stream, state);\n    }\n    if (ch == \"(\" && stream.eat(\"*\")) {\n      state.tokenize = tokenComment;\n      return tokenComment(stream, state);\n    }\n    if (/[\\[\\]{}\\(\\),;\\:\\.]/.test(ch)) {\n      return null;\n    }\n    if (/\\d/.test(ch)) {\n      stream.eatWhile(/[\\w\\.]/);\n      return \"number\";\n    }\n    if (ch == \"/\") {\n      if (stream.eat(\"/\")) {\n        stream.skipToEnd();\n        return \"comment\";\n      }\n    }\n    if (isOperatorChar.test(ch)) {\n      stream.eatWhile(isOperatorChar);\n      return \"operator\";\n    }\n    stream.eatWhile(/[\\w\\$_]/);\n    var cur = stream.current();\n    if (keywords.propertyIsEnumerable(cur)) return \"keyword\";\n    if (atoms.propertyIsEnumerable(cur)) return \"atom\";\n    return \"variable\";\n  }\n\n  function tokenString(quote) {\n    return function(stream, state) {\n      var escaped = false, next, end = false;\n      while ((next = stream.next()) != null) {\n        if (next == quote && !escaped) {end = true; break;}\n        escaped = !escaped && next == \"\\\\\";\n      }\n      if (end || !escaped) state.tokenize = null;\n      return \"string\";\n    };\n  }\n\n  function tokenComment(stream, state) {\n    var maybeEnd = false, ch;\n    while (ch = stream.next()) {\n      if (ch == \")\" && maybeEnd) {\n        state.tokenize = null;\n        break;\n      }\n      maybeEnd = (ch == \"*\");\n    }\n    return \"comment\";\n  }\n\n  // Interface\n\n  return {\n    startState: function() {\n      return {tokenize: null};\n    },\n\n    token: function(stream, state) {\n      if (stream.eatSpace()) return null;\n      var style = (state.tokenize || tokenBase)(stream, state);\n      if (style == \"comment\" || style == \"meta\") return style;\n      return style;\n    },\n\n    electricChars: \"{}\"\n  };\n});\n\nCodeMirror.defineMIME(\"text/x-pascal\", \"pascal\");\n\n});\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/pegjs/index.html",
    "content": "<!doctype html>\n<html>\n  <head>\n    <title>CodeMirror: PEG.js Mode</title>\n    <meta charset=\"utf-8\"/>\n    <link rel=stylesheet href=\"../../doc/docs.css\">\n\n    <link rel=\"stylesheet\" href=\"../../lib/codemirror.css\">\n    <script src=\"../../lib/codemirror.js\"></script>\n    <script src=\"../javascript/javascript.js\"></script>\n    <script src=\"pegjs.js\"></script>\n    <style type=\"text/css\">.CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}</style>\n  </head>\n  <body>\n    <div id=nav>\n      <a href=\"http://codemirror.net\"><h1>CodeMirror</h1><img id=logo src=\"../../doc/logo.png\"></a>\n\n      <ul>\n        <li><a href=\"../../index.html\">Home</a>\n        <li><a href=\"../../doc/manual.html\">Manual</a>\n        <li><a href=\"https://github.com/codemirror/codemirror\">Code</a>\n      </ul>\n      <ul>\n        <li><a href=\"../index.html\">Language modes</a>\n        <li><a class=active href=\"#\">PEG.js Mode</a>\n      </ul>\n    </div>\n\n    <article>\n      <h2>PEG.js Mode</h2>\n      <form><textarea id=\"code\" name=\"code\">\n/*\n * Classic example grammar, which recognizes simple arithmetic expressions like\n * \"2*(3+4)\". The parser generated from this grammar then computes their value.\n */\n\nstart\n  = additive\n\nadditive\n  = left:multiplicative \"+\" right:additive { return left + right; }\n  / multiplicative\n\nmultiplicative\n  = left:primary \"*\" right:multiplicative { return left * right; }\n  / primary\n\nprimary\n  = integer\n  / \"(\" additive:additive \")\" { return additive; }\n\ninteger \"integer\"\n  = digits:[0-9]+ { return parseInt(digits.join(\"\"), 10); }\n\nletter = [a-z]+</textarea></form>\n      <script>\n        var editor = CodeMirror.fromTextArea(document.getElementById(\"code\"), {\n          mode: {name: \"pegjs\"},\n          lineNumbers: true\n        });\n      </script>\n      <h3>The PEG.js Mode</h3>\n      <p> Created by Forbes Lindesay.</p>\n    </article>\n  </body>\n</html>\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/pegjs/pegjs.js",
    "content": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n(function(mod) {\n  if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n    mod(require(\"../../lib/codemirror\"), require(\"../javascript/javascript\"));\n  else if (typeof define == \"function\" && define.amd) // AMD\n    define([\"../../lib/codemirror\", \"../javascript/javascript\"], mod);\n  else // Plain browser env\n    mod(CodeMirror);\n})(function(CodeMirror) {\n\"use strict\";\n\nCodeMirror.defineMode(\"pegjs\", function (config) {\n  var jsMode = CodeMirror.getMode(config, \"javascript\");\n\n  function identifier(stream) {\n    return stream.match(/^[a-zA-Z_][a-zA-Z0-9_]*/);\n  }\n\n  return {\n    startState: function () {\n      return {\n        inString: false,\n        stringType: null,\n        inComment: false,\n        inChracterClass: false,\n        braced: 0,\n        lhs: true,\n        localState: null\n      };\n    },\n    token: function (stream, state) {\n      if (stream)\n\n      //check for state changes\n      if (!state.inString && !state.inComment && ((stream.peek() == '\"') || (stream.peek() == \"'\"))) {\n        state.stringType = stream.peek();\n        stream.next(); // Skip quote\n        state.inString = true; // Update state\n      }\n      if (!state.inString && !state.inComment && stream.match(/^\\/\\*/)) {\n        state.inComment = true;\n      }\n\n      //return state\n      if (state.inString) {\n        while (state.inString && !stream.eol()) {\n          if (stream.peek() === state.stringType) {\n            stream.next(); // Skip quote\n            state.inString = false; // Clear flag\n          } else if (stream.peek() === '\\\\') {\n            stream.next();\n            stream.next();\n          } else {\n            stream.match(/^.[^\\\\\\\"\\']*/);\n          }\n        }\n        return state.lhs ? \"property string\" : \"string\"; // Token style\n      } else if (state.inComment) {\n        while (state.inComment && !stream.eol()) {\n          if (stream.match(/\\*\\//)) {\n            state.inComment = false; // Clear flag\n          } else {\n            stream.match(/^.[^\\*]*/);\n          }\n        }\n        return \"comment\";\n      } else if (state.inChracterClass) {\n          while (state.inChracterClass && !stream.eol()) {\n            if (!(stream.match(/^[^\\]\\\\]+/) || stream.match(/^\\\\./))) {\n              state.inChracterClass = false;\n            }\n          }\n      } else if (stream.peek() === '[') {\n        stream.next();\n        state.inChracterClass = true;\n        return 'bracket';\n      } else if (stream.match(/^\\/\\//)) {\n        stream.skipToEnd();\n        return \"comment\";\n      } else if (state.braced || stream.peek() === '{') {\n        if (state.localState === null) {\n          state.localState = jsMode.startState();\n        }\n        var token = jsMode.token(stream, state.localState);\n        var text = stream.current();\n        if (!token) {\n          for (var i = 0; i < text.length; i++) {\n            if (text[i] === '{') {\n              state.braced++;\n            } else if (text[i] === '}') {\n              state.braced--;\n            }\n          };\n        }\n        return token;\n      } else if (identifier(stream)) {\n        if (stream.peek() === ':') {\n          return 'variable';\n        }\n        return 'variable-2';\n      } else if (['[', ']', '(', ')'].indexOf(stream.peek()) != -1) {\n        stream.next();\n        return 'bracket';\n      } else if (!stream.eatSpace()) {\n        stream.next();\n      }\n      return null;\n    }\n  };\n}, \"javascript\");\n\n});\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/perl/index.html",
    "content": "<!doctype html>\n\n<title>CodeMirror: Perl mode</title>\n<meta charset=\"utf-8\"/>\n<link rel=stylesheet href=\"../../doc/docs.css\">\n\n<link rel=\"stylesheet\" href=\"../../lib/codemirror.css\">\n<script src=\"../../lib/codemirror.js\"></script>\n<script src=\"perl.js\"></script>\n<style type=\"text/css\">.CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}</style>\n<div id=nav>\n  <a href=\"http://codemirror.net\"><h1>CodeMirror</h1><img id=logo src=\"../../doc/logo.png\"></a>\n\n  <ul>\n    <li><a href=\"../../index.html\">Home</a>\n    <li><a href=\"../../doc/manual.html\">Manual</a>\n    <li><a href=\"https://github.com/codemirror/codemirror\">Code</a>\n  </ul>\n  <ul>\n    <li><a href=\"../index.html\">Language modes</a>\n    <li><a class=active href=\"#\">Perl</a>\n  </ul>\n</div>\n\n<article>\n<h2>Perl mode</h2>\n\n\n<div><textarea id=\"code\" name=\"code\">\n#!/usr/bin/perl\n\nuse Something qw(func1 func2);\n\n# strings\nmy $s1 = qq'single line';\nour $s2 = q(multi-\n              line);\n\n=item Something\n\tExample.\n=cut\n\nmy $html=<<'HTML'\n<html>\n<title>hi!</title>\n</html>\nHTML\n\nprint \"first,\".join(',', 'second', qq~third~);\n\nif($s1 =~ m[(?<!\\s)(l.ne)\\z]o) {\n\t$h->{$1}=$$.' predefined variables';\n\t$s2 =~ s/\\-line//ox;\n\t$s1 =~ s[\n\t\t  line ]\n\t\t[\n\t\t  block\n\t\t]ox;\n}\n\n1; # numbers and comments\n\n__END__\nsomething...\n\n</textarea></div>\n\n    <script>\n      var editor = CodeMirror.fromTextArea(document.getElementById(\"code\"), {\n        lineNumbers: true\n      });\n    </script>\n\n    <p><strong>MIME types defined:</strong> <code>text/x-perl</code>.</p>\n  </article>\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/perl/perl.js",
    "content": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n// CodeMirror2 mode/perl/perl.js (text/x-perl) beta 0.10 (2011-11-08)\n// This is a part of CodeMirror from https://github.com/sabaca/CodeMirror_mode_perl (mail@sabaca.com)\n\n(function(mod) {\n  if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n    mod(require(\"../../lib/codemirror\"));\n  else if (typeof define == \"function\" && define.amd) // AMD\n    define([\"../../lib/codemirror\"], mod);\n  else // Plain browser env\n    mod(CodeMirror);\n})(function(CodeMirror) {\n\"use strict\";\n\nCodeMirror.defineMode(\"perl\",function(){\n        // http://perldoc.perl.org\n        var PERL={                                      //   null - magic touch\n                                                        //   1 - keyword\n                                                        //   2 - def\n                                                        //   3 - atom\n                                                        //   4 - operator\n                                                        //   5 - variable-2 (predefined)\n                                                        //   [x,y] - x=1,2,3; y=must be defined if x{...}\n                                                //      PERL operators\n                '->'                            :   4,\n                '++'                            :   4,\n                '--'                            :   4,\n                '**'                            :   4,\n                                                        //   ! ~ \\ and unary + and -\n                '=~'                            :   4,\n                '!~'                            :   4,\n                '*'                             :   4,\n                '/'                             :   4,\n                '%'                             :   4,\n                'x'                             :   4,\n                '+'                             :   4,\n                '-'                             :   4,\n                '.'                             :   4,\n                '<<'                            :   4,\n                '>>'                            :   4,\n                                                        //   named unary operators\n                '<'                             :   4,\n                '>'                             :   4,\n                '<='                            :   4,\n                '>='                            :   4,\n                'lt'                            :   4,\n                'gt'                            :   4,\n                'le'                            :   4,\n                'ge'                            :   4,\n                '=='                            :   4,\n                '!='                            :   4,\n                '<=>'                           :   4,\n                'eq'                            :   4,\n                'ne'                            :   4,\n                'cmp'                           :   4,\n                '~~'                            :   4,\n                '&'                             :   4,\n                '|'                             :   4,\n                '^'                             :   4,\n                '&&'                            :   4,\n                '||'                            :   4,\n                '//'                            :   4,\n                '..'                            :   4,\n                '...'                           :   4,\n                '?'                             :   4,\n                ':'                             :   4,\n                '='                             :   4,\n                '+='                            :   4,\n                '-='                            :   4,\n                '*='                            :   4,  //   etc. ???\n                ','                             :   4,\n                '=>'                            :   4,\n                '::'                            :   4,\n                                                        //   list operators (rightward)\n                'not'                           :   4,\n                'and'                           :   4,\n                'or'                            :   4,\n                'xor'                           :   4,\n                                                //      PERL predefined variables (I know, what this is a paranoid idea, but may be needed for people, who learn PERL, and for me as well, ...and may be for you?;)\n                'BEGIN'                         :   [5,1],\n                'END'                           :   [5,1],\n                'PRINT'                         :   [5,1],\n                'PRINTF'                        :   [5,1],\n                'GETC'                          :   [5,1],\n                'READ'                          :   [5,1],\n                'READLINE'                      :   [5,1],\n                'DESTROY'                       :   [5,1],\n                'TIE'                           :   [5,1],\n                'TIEHANDLE'                     :   [5,1],\n                'UNTIE'                         :   [5,1],\n                'STDIN'                         :    5,\n                'STDIN_TOP'                     :    5,\n                'STDOUT'                        :    5,\n                'STDOUT_TOP'                    :    5,\n                'STDERR'                        :    5,\n                'STDERR_TOP'                    :    5,\n                '$ARG'                          :    5,\n                '$_'                            :    5,\n                '@ARG'                          :    5,\n                '@_'                            :    5,\n                '$LIST_SEPARATOR'               :    5,\n                '$\"'                            :    5,\n                '$PROCESS_ID'                   :    5,\n                '$PID'                          :    5,\n                '$$'                            :    5,\n                '$REAL_GROUP_ID'                :    5,\n                '$GID'                          :    5,\n                '$('                            :    5,\n                '$EFFECTIVE_GROUP_ID'           :    5,\n                '$EGID'                         :    5,\n                '$)'                            :    5,\n                '$PROGRAM_NAME'                 :    5,\n                '$0'                            :    5,\n                '$SUBSCRIPT_SEPARATOR'          :    5,\n                '$SUBSEP'                       :    5,\n                '$;'                            :    5,\n                '$REAL_USER_ID'                 :    5,\n                '$UID'                          :    5,\n                '$<'                            :    5,\n                '$EFFECTIVE_USER_ID'            :    5,\n                '$EUID'                         :    5,\n                '$>'                            :    5,\n                '$a'                            :    5,\n                '$b'                            :    5,\n                '$COMPILING'                    :    5,\n                '$^C'                           :    5,\n                '$DEBUGGING'                    :    5,\n                '$^D'                           :    5,\n                '${^ENCODING}'                  :    5,\n                '$ENV'                          :    5,\n                '%ENV'                          :    5,\n                '$SYSTEM_FD_MAX'                :    5,\n                '$^F'                           :    5,\n                '@F'                            :    5,\n                '${^GLOBAL_PHASE}'              :    5,\n                '$^H'                           :    5,\n                '%^H'                           :    5,\n                '@INC'                          :    5,\n                '%INC'                          :    5,\n                '$INPLACE_EDIT'                 :    5,\n                '$^I'                           :    5,\n                '$^M'                           :    5,\n                '$OSNAME'                       :    5,\n                '$^O'                           :    5,\n                '${^OPEN}'                      :    5,\n                '$PERLDB'                       :    5,\n                '$^P'                           :    5,\n                '$SIG'                          :    5,\n                '%SIG'                          :    5,\n                '$BASETIME'                     :    5,\n                '$^T'                           :    5,\n                '${^TAINT}'                     :    5,\n                '${^UNICODE}'                   :    5,\n                '${^UTF8CACHE}'                 :    5,\n                '${^UTF8LOCALE}'                :    5,\n                '$PERL_VERSION'                 :    5,\n                '$^V'                           :    5,\n                '${^WIN32_SLOPPY_STAT}'         :    5,\n                '$EXECUTABLE_NAME'              :    5,\n                '$^X'                           :    5,\n                '$1'                            :    5, // - regexp $1, $2...\n                '$MATCH'                        :    5,\n                '$&'                            :    5,\n                '${^MATCH}'                     :    5,\n                '$PREMATCH'                     :    5,\n                '$`'                            :    5,\n                '${^PREMATCH}'                  :    5,\n                '$POSTMATCH'                    :    5,\n                \"$'\"                            :    5,\n                '${^POSTMATCH}'                 :    5,\n                '$LAST_PAREN_MATCH'             :    5,\n                '$+'                            :    5,\n                '$LAST_SUBMATCH_RESULT'         :    5,\n                '$^N'                           :    5,\n                '@LAST_MATCH_END'               :    5,\n                '@+'                            :    5,\n                '%LAST_PAREN_MATCH'             :    5,\n                '%+'                            :    5,\n                '@LAST_MATCH_START'             :    5,\n                '@-'                            :    5,\n                '%LAST_MATCH_START'             :    5,\n                '%-'                            :    5,\n                '$LAST_REGEXP_CODE_RESULT'      :    5,\n                '$^R'                           :    5,\n                '${^RE_DEBUG_FLAGS}'            :    5,\n                '${^RE_TRIE_MAXBUF}'            :    5,\n                '$ARGV'                         :    5,\n                '@ARGV'                         :    5,\n                'ARGV'                          :    5,\n                'ARGVOUT'                       :    5,\n                '$OUTPUT_FIELD_SEPARATOR'       :    5,\n                '$OFS'                          :    5,\n                '$,'                            :    5,\n                '$INPUT_LINE_NUMBER'            :    5,\n                '$NR'                           :    5,\n                '$.'                            :    5,\n                '$INPUT_RECORD_SEPARATOR'       :    5,\n                '$RS'                           :    5,\n                '$/'                            :    5,\n                '$OUTPUT_RECORD_SEPARATOR'      :    5,\n                '$ORS'                          :    5,\n                '$\\\\'                           :    5,\n                '$OUTPUT_AUTOFLUSH'             :    5,\n                '$|'                            :    5,\n                '$ACCUMULATOR'                  :    5,\n                '$^A'                           :    5,\n                '$FORMAT_FORMFEED'              :    5,\n                '$^L'                           :    5,\n                '$FORMAT_PAGE_NUMBER'           :    5,\n                '$%'                            :    5,\n                '$FORMAT_LINES_LEFT'            :    5,\n                '$-'                            :    5,\n                '$FORMAT_LINE_BREAK_CHARACTERS' :    5,\n                '$:'                            :    5,\n                '$FORMAT_LINES_PER_PAGE'        :    5,\n                '$='                            :    5,\n                '$FORMAT_TOP_NAME'              :    5,\n                '$^'                            :    5,\n                '$FORMAT_NAME'                  :    5,\n                '$~'                            :    5,\n                '${^CHILD_ERROR_NATIVE}'        :    5,\n                '$EXTENDED_OS_ERROR'            :    5,\n                '$^E'                           :    5,\n                '$EXCEPTIONS_BEING_CAUGHT'      :    5,\n                '$^S'                           :    5,\n                '$WARNING'                      :    5,\n                '$^W'                           :    5,\n                '${^WARNING_BITS}'              :    5,\n                '$OS_ERROR'                     :    5,\n                '$ERRNO'                        :    5,\n                '$!'                            :    5,\n                '%OS_ERROR'                     :    5,\n                '%ERRNO'                        :    5,\n                '%!'                            :    5,\n                '$CHILD_ERROR'                  :    5,\n                '$?'                            :    5,\n                '$EVAL_ERROR'                   :    5,\n                '$@'                            :    5,\n                '$OFMT'                         :    5,\n                '$#'                            :    5,\n                '$*'                            :    5,\n                '$ARRAY_BASE'                   :    5,\n                '$['                            :    5,\n                '$OLD_PERL_VERSION'             :    5,\n                '$]'                            :    5,\n                                                //      PERL blocks\n                'if'                            :[1,1],\n                elsif                           :[1,1],\n                'else'                          :[1,1],\n                'while'                         :[1,1],\n                unless                          :[1,1],\n                'for'                           :[1,1],\n                foreach                         :[1,1],\n                                                //      PERL functions\n                'abs'                           :1,     // - absolute value function\n                accept                          :1,     // - accept an incoming socket connect\n                alarm                           :1,     // - schedule a SIGALRM\n                'atan2'                         :1,     // - arctangent of Y/X in the range -PI to PI\n                bind                            :1,     // - binds an address to a socket\n                binmode                         :1,     // - prepare binary files for I/O\n                bless                           :1,     // - create an object\n                bootstrap                       :1,     //\n                'break'                         :1,     // - break out of a \"given\" block\n                caller                          :1,     // - get context of the current subroutine call\n                chdir                           :1,     // - change your current working directory\n                chmod                           :1,     // - changes the permissions on a list of files\n                chomp                           :1,     // - remove a trailing record separator from a string\n                chop                            :1,     // - remove the last character from a string\n                chown                           :1,     // - change the owership on a list of files\n                chr                             :1,     // - get character this number represents\n                chroot                          :1,     // - make directory new root for path lookups\n                close                           :1,     // - close file (or pipe or socket) handle\n                closedir                        :1,     // - close directory handle\n                connect                         :1,     // - connect to a remote socket\n                'continue'                      :[1,1], // - optional trailing block in a while or foreach\n                'cos'                           :1,     // - cosine function\n                crypt                           :1,     // - one-way passwd-style encryption\n                dbmclose                        :1,     // - breaks binding on a tied dbm file\n                dbmopen                         :1,     // - create binding on a tied dbm file\n                'default'                       :1,     //\n                defined                         :1,     // - test whether a value, variable, or function is defined\n                'delete'                        :1,     // - deletes a value from a hash\n                die                             :1,     // - raise an exception or bail out\n                'do'                            :1,     // - turn a BLOCK into a TERM\n                dump                            :1,     // - create an immediate core dump\n                each                            :1,     // - retrieve the next key/value pair from a hash\n                endgrent                        :1,     // - be done using group file\n                endhostent                      :1,     // - be done using hosts file\n                endnetent                       :1,     // - be done using networks file\n                endprotoent                     :1,     // - be done using protocols file\n                endpwent                        :1,     // - be done using passwd file\n                endservent                      :1,     // - be done using services file\n                eof                             :1,     // - test a filehandle for its end\n                'eval'                          :1,     // - catch exceptions or compile and run code\n                'exec'                          :1,     // - abandon this program to run another\n                exists                          :1,     // - test whether a hash key is present\n                exit                            :1,     // - terminate this program\n                'exp'                           :1,     // - raise I to a power\n                fcntl                           :1,     // - file control system call\n                fileno                          :1,     // - return file descriptor from filehandle\n                flock                           :1,     // - lock an entire file with an advisory lock\n                fork                            :1,     // - create a new process just like this one\n                format                          :1,     // - declare a picture format with use by the write() function\n                formline                        :1,     // - internal function used for formats\n                getc                            :1,     // - get the next character from the filehandle\n                getgrent                        :1,     // - get next group record\n                getgrgid                        :1,     // - get group record given group user ID\n                getgrnam                        :1,     // - get group record given group name\n                gethostbyaddr                   :1,     // - get host record given its address\n                gethostbyname                   :1,     // - get host record given name\n                gethostent                      :1,     // - get next hosts record\n                getlogin                        :1,     // - return who logged in at this tty\n                getnetbyaddr                    :1,     // - get network record given its address\n                getnetbyname                    :1,     // - get networks record given name\n                getnetent                       :1,     // - get next networks record\n                getpeername                     :1,     // - find the other end of a socket connection\n                getpgrp                         :1,     // - get process group\n                getppid                         :1,     // - get parent process ID\n                getpriority                     :1,     // - get current nice value\n                getprotobyname                  :1,     // - get protocol record given name\n                getprotobynumber                :1,     // - get protocol record numeric protocol\n                getprotoent                     :1,     // - get next protocols record\n                getpwent                        :1,     // - get next passwd record\n                getpwnam                        :1,     // - get passwd record given user login name\n                getpwuid                        :1,     // - get passwd record given user ID\n                getservbyname                   :1,     // - get services record given its name\n                getservbyport                   :1,     // - get services record given numeric port\n                getservent                      :1,     // - get next services record\n                getsockname                     :1,     // - retrieve the sockaddr for a given socket\n                getsockopt                      :1,     // - get socket options on a given socket\n                given                           :1,     //\n                glob                            :1,     // - expand filenames using wildcards\n                gmtime                          :1,     // - convert UNIX time into record or string using Greenwich time\n                'goto'                          :1,     // - create spaghetti code\n                grep                            :1,     // - locate elements in a list test true against a given criterion\n                hex                             :1,     // - convert a string to a hexadecimal number\n                'import'                        :1,     // - patch a module's namespace into your own\n                index                           :1,     // - find a substring within a string\n                'int'                           :1,     // - get the integer portion of a number\n                ioctl                           :1,     // - system-dependent device control system call\n                'join'                          :1,     // - join a list into a string using a separator\n                keys                            :1,     // - retrieve list of indices from a hash\n                kill                            :1,     // - send a signal to a process or process group\n                last                            :1,     // - exit a block prematurely\n                lc                              :1,     // - return lower-case version of a string\n                lcfirst                         :1,     // - return a string with just the next letter in lower case\n                length                          :1,     // - return the number of bytes in a string\n                'link'                          :1,     // - create a hard link in the filesytem\n                listen                          :1,     // - register your socket as a server\n                local                           : 2,    // - create a temporary value for a global variable (dynamic scoping)\n                localtime                       :1,     // - convert UNIX time into record or string using local time\n                lock                            :1,     // - get a thread lock on a variable, subroutine, or method\n                'log'                           :1,     // - retrieve the natural logarithm for a number\n                lstat                           :1,     // - stat a symbolic link\n                m                               :null,  // - match a string with a regular expression pattern\n                map                             :1,     // - apply a change to a list to get back a new list with the changes\n                mkdir                           :1,     // - create a directory\n                msgctl                          :1,     // - SysV IPC message control operations\n                msgget                          :1,     // - get SysV IPC message queue\n                msgrcv                          :1,     // - receive a SysV IPC message from a message queue\n                msgsnd                          :1,     // - send a SysV IPC message to a message queue\n                my                              : 2,    // - declare and assign a local variable (lexical scoping)\n                'new'                           :1,     //\n                next                            :1,     // - iterate a block prematurely\n                no                              :1,     // - unimport some module symbols or semantics at compile time\n                oct                             :1,     // - convert a string to an octal number\n                open                            :1,     // - open a file, pipe, or descriptor\n                opendir                         :1,     // - open a directory\n                ord                             :1,     // - find a character's numeric representation\n                our                             : 2,    // - declare and assign a package variable (lexical scoping)\n                pack                            :1,     // - convert a list into a binary representation\n                'package'                       :1,     // - declare a separate global namespace\n                pipe                            :1,     // - open a pair of connected filehandles\n                pop                             :1,     // - remove the last element from an array and return it\n                pos                             :1,     // - find or set the offset for the last/next m//g search\n                print                           :1,     // - output a list to a filehandle\n                printf                          :1,     // - output a formatted list to a filehandle\n                prototype                       :1,     // - get the prototype (if any) of a subroutine\n                push                            :1,     // - append one or more elements to an array\n                q                               :null,  // - singly quote a string\n                qq                              :null,  // - doubly quote a string\n                qr                              :null,  // - Compile pattern\n                quotemeta                       :null,  // - quote regular expression magic characters\n                qw                              :null,  // - quote a list of words\n                qx                              :null,  // - backquote quote a string\n                rand                            :1,     // - retrieve the next pseudorandom number\n                read                            :1,     // - fixed-length buffered input from a filehandle\n                readdir                         :1,     // - get a directory from a directory handle\n                readline                        :1,     // - fetch a record from a file\n                readlink                        :1,     // - determine where a symbolic link is pointing\n                readpipe                        :1,     // - execute a system command and collect standard output\n                recv                            :1,     // - receive a message over a Socket\n                redo                            :1,     // - start this loop iteration over again\n                ref                             :1,     // - find out the type of thing being referenced\n                rename                          :1,     // - change a filename\n                require                         :1,     // - load in external functions from a library at runtime\n                reset                           :1,     // - clear all variables of a given name\n                'return'                        :1,     // - get out of a function early\n                reverse                         :1,     // - flip a string or a list\n                rewinddir                       :1,     // - reset directory handle\n                rindex                          :1,     // - right-to-left substring search\n                rmdir                           :1,     // - remove a directory\n                s                               :null,  // - replace a pattern with a string\n                say                             :1,     // - print with newline\n                scalar                          :1,     // - force a scalar context\n                seek                            :1,     // - reposition file pointer for random-access I/O\n                seekdir                         :1,     // - reposition directory pointer\n                select                          :1,     // - reset default output or do I/O multiplexing\n                semctl                          :1,     // - SysV semaphore control operations\n                semget                          :1,     // - get set of SysV semaphores\n                semop                           :1,     // - SysV semaphore operations\n                send                            :1,     // - send a message over a socket\n                setgrent                        :1,     // - prepare group file for use\n                sethostent                      :1,     // - prepare hosts file for use\n                setnetent                       :1,     // - prepare networks file for use\n                setpgrp                         :1,     // - set the process group of a process\n                setpriority                     :1,     // - set a process's nice value\n                setprotoent                     :1,     // - prepare protocols file for use\n                setpwent                        :1,     // - prepare passwd file for use\n                setservent                      :1,     // - prepare services file for use\n                setsockopt                      :1,     // - set some socket options\n                shift                           :1,     // - remove the first element of an array, and return it\n                shmctl                          :1,     // - SysV shared memory operations\n                shmget                          :1,     // - get SysV shared memory segment identifier\n                shmread                         :1,     // - read SysV shared memory\n                shmwrite                        :1,     // - write SysV shared memory\n                shutdown                        :1,     // - close down just half of a socket connection\n                'sin'                           :1,     // - return the sine of a number\n                sleep                           :1,     // - block for some number of seconds\n                socket                          :1,     // - create a socket\n                socketpair                      :1,     // - create a pair of sockets\n                'sort'                          :1,     // - sort a list of values\n                splice                          :1,     // - add or remove elements anywhere in an array\n                'split'                         :1,     // - split up a string using a regexp delimiter\n                sprintf                         :1,     // - formatted print into a string\n                'sqrt'                          :1,     // - square root function\n                srand                           :1,     // - seed the random number generator\n                stat                            :1,     // - get a file's status information\n                state                           :1,     // - declare and assign a state variable (persistent lexical scoping)\n                study                           :1,     // - optimize input data for repeated searches\n                'sub'                           :1,     // - declare a subroutine, possibly anonymously\n                'substr'                        :1,     // - get or alter a portion of a stirng\n                symlink                         :1,     // - create a symbolic link to a file\n                syscall                         :1,     // - execute an arbitrary system call\n                sysopen                         :1,     // - open a file, pipe, or descriptor\n                sysread                         :1,     // - fixed-length unbuffered input from a filehandle\n                sysseek                         :1,     // - position I/O pointer on handle used with sysread and syswrite\n                system                          :1,     // - run a separate program\n                syswrite                        :1,     // - fixed-length unbuffered output to a filehandle\n                tell                            :1,     // - get current seekpointer on a filehandle\n                telldir                         :1,     // - get current seekpointer on a directory handle\n                tie                             :1,     // - bind a variable to an object class\n                tied                            :1,     // - get a reference to the object underlying a tied variable\n                time                            :1,     // - return number of seconds since 1970\n                times                           :1,     // - return elapsed time for self and child processes\n                tr                              :null,  // - transliterate a string\n                truncate                        :1,     // - shorten a file\n                uc                              :1,     // - return upper-case version of a string\n                ucfirst                         :1,     // - return a string with just the next letter in upper case\n                umask                           :1,     // - set file creation mode mask\n                undef                           :1,     // - remove a variable or function definition\n                unlink                          :1,     // - remove one link to a file\n                unpack                          :1,     // - convert binary structure into normal perl variables\n                unshift                         :1,     // - prepend more elements to the beginning of a list\n                untie                           :1,     // - break a tie binding to a variable\n                use                             :1,     // - load in a module at compile time\n                utime                           :1,     // - set a file's last access and modify times\n                values                          :1,     // - return a list of the values in a hash\n                vec                             :1,     // - test or set particular bits in a string\n                wait                            :1,     // - wait for any child process to die\n                waitpid                         :1,     // - wait for a particular child process to die\n                wantarray                       :1,     // - get void vs scalar vs list context of current subroutine call\n                warn                            :1,     // - print debugging info\n                when                            :1,     //\n                write                           :1,     // - print a picture record\n                y                               :null}; // - transliterate a string\n\n        var RXstyle=\"string-2\";\n        var RXmodifiers=/[goseximacplud]/;              // NOTE: \"m\", \"s\", \"y\" and \"tr\" need to correct real modifiers for each regexp type\n\n        function tokenChain(stream,state,chain,style,tail){     // NOTE: chain.length > 2 is not working now (it's for s[...][...]geos;)\n                state.chain=null;                               //                                                          12   3tail\n                state.style=null;\n                state.tail=null;\n                state.tokenize=function(stream,state){\n                        var e=false,c,i=0;\n                        while(c=stream.next()){\n                                if(c===chain[i]&&!e){\n                                        if(chain[++i]!==undefined){\n                                                state.chain=chain[i];\n                                                state.style=style;\n                                                state.tail=tail;}\n                                        else if(tail)\n                                                stream.eatWhile(tail);\n                                        state.tokenize=tokenPerl;\n                                        return style;}\n                                e=!e&&c==\"\\\\\";}\n                        return style;};\n                return state.tokenize(stream,state);}\n\n        function tokenSOMETHING(stream,state,string){\n                state.tokenize=function(stream,state){\n                        if(stream.string==string)\n                                state.tokenize=tokenPerl;\n                        stream.skipToEnd();\n                        return \"string\";};\n                return state.tokenize(stream,state);}\n\n        function tokenPerl(stream,state){\n                if(stream.eatSpace())\n                        return null;\n                if(state.chain)\n                        return tokenChain(stream,state,state.chain,state.style,state.tail);\n                if(stream.match(/^\\-?[\\d\\.]/,false))\n                        if(stream.match(/^(\\-?(\\d*\\.\\d+(e[+-]?\\d+)?|\\d+\\.\\d*)|0x[\\da-fA-F]+|0b[01]+|\\d+(e[+-]?\\d+)?)/))\n                                return 'number';\n                if(stream.match(/^<<(?=\\w)/)){                  // NOTE: <<SOMETHING\\n...\\nSOMETHING\\n\n                        stream.eatWhile(/\\w/);\n                        return tokenSOMETHING(stream,state,stream.current().substr(2));}\n                if(stream.sol()&&stream.match(/^\\=item(?!\\w)/)){// NOTE: \\n=item...\\n=cut\\n\n                        return tokenSOMETHING(stream,state,'=cut');}\n                var ch=stream.next();\n                if(ch=='\"'||ch==\"'\"){                           // NOTE: ' or \" or <<'SOMETHING'\\n...\\nSOMETHING\\n or <<\"SOMETHING\"\\n...\\nSOMETHING\\n\n                        if(prefix(stream, 3)==\"<<\"+ch){\n                                var p=stream.pos;\n                                stream.eatWhile(/\\w/);\n                                var n=stream.current().substr(1);\n                                if(n&&stream.eat(ch))\n                                        return tokenSOMETHING(stream,state,n);\n                                stream.pos=p;}\n                        return tokenChain(stream,state,[ch],\"string\");}\n                if(ch==\"q\"){\n                        var c=look(stream, -2);\n                        if(!(c&&/\\w/.test(c))){\n                                c=look(stream, 0);\n                                if(c==\"x\"){\n                                        c=look(stream, 1);\n                                        if(c==\"(\"){\n                                                eatSuffix(stream, 2);\n                                                return tokenChain(stream,state,[\")\"],RXstyle,RXmodifiers);}\n                                        if(c==\"[\"){\n                                                eatSuffix(stream, 2);\n                                                return tokenChain(stream,state,[\"]\"],RXstyle,RXmodifiers);}\n                                        if(c==\"{\"){\n                                                eatSuffix(stream, 2);\n                                                return tokenChain(stream,state,[\"}\"],RXstyle,RXmodifiers);}\n                                        if(c==\"<\"){\n                                                eatSuffix(stream, 2);\n                                                return tokenChain(stream,state,[\">\"],RXstyle,RXmodifiers);}\n                                        if(/[\\^'\"!~\\/]/.test(c)){\n                                                eatSuffix(stream, 1);\n                                                return tokenChain(stream,state,[stream.eat(c)],RXstyle,RXmodifiers);}}\n                                else if(c==\"q\"){\n                                        c=look(stream, 1);\n                                        if(c==\"(\"){\n                                                eatSuffix(stream, 2);\n                                                return tokenChain(stream,state,[\")\"],\"string\");}\n                                        if(c==\"[\"){\n                                                eatSuffix(stream, 2);\n                                                return tokenChain(stream,state,[\"]\"],\"string\");}\n                                        if(c==\"{\"){\n                                                eatSuffix(stream, 2);\n                                                return tokenChain(stream,state,[\"}\"],\"string\");}\n                                        if(c==\"<\"){\n                                                eatSuffix(stream, 2);\n                                                return tokenChain(stream,state,[\">\"],\"string\");}\n                                        if(/[\\^'\"!~\\/]/.test(c)){\n                                                eatSuffix(stream, 1);\n                                                return tokenChain(stream,state,[stream.eat(c)],\"string\");}}\n                                else if(c==\"w\"){\n                                        c=look(stream, 1);\n                                        if(c==\"(\"){\n                                                eatSuffix(stream, 2);\n                                                return tokenChain(stream,state,[\")\"],\"bracket\");}\n                                        if(c==\"[\"){\n                                                eatSuffix(stream, 2);\n                                                return tokenChain(stream,state,[\"]\"],\"bracket\");}\n                                        if(c==\"{\"){\n                                                eatSuffix(stream, 2);\n                                                return tokenChain(stream,state,[\"}\"],\"bracket\");}\n                                        if(c==\"<\"){\n                                                eatSuffix(stream, 2);\n                                                return tokenChain(stream,state,[\">\"],\"bracket\");}\n                                        if(/[\\^'\"!~\\/]/.test(c)){\n                                                eatSuffix(stream, 1);\n                                                return tokenChain(stream,state,[stream.eat(c)],\"bracket\");}}\n                                else if(c==\"r\"){\n                                        c=look(stream, 1);\n                                        if(c==\"(\"){\n                                                eatSuffix(stream, 2);\n                                                return tokenChain(stream,state,[\")\"],RXstyle,RXmodifiers);}\n                                        if(c==\"[\"){\n                                                eatSuffix(stream, 2);\n                                                return tokenChain(stream,state,[\"]\"],RXstyle,RXmodifiers);}\n                                        if(c==\"{\"){\n                                                eatSuffix(stream, 2);\n                                                return tokenChain(stream,state,[\"}\"],RXstyle,RXmodifiers);}\n                                        if(c==\"<\"){\n                                                eatSuffix(stream, 2);\n                                                return tokenChain(stream,state,[\">\"],RXstyle,RXmodifiers);}\n                                        if(/[\\^'\"!~\\/]/.test(c)){\n                                                eatSuffix(stream, 1);\n                                                return tokenChain(stream,state,[stream.eat(c)],RXstyle,RXmodifiers);}}\n                                else if(/[\\^'\"!~\\/(\\[{<]/.test(c)){\n                                        if(c==\"(\"){\n                                                eatSuffix(stream, 1);\n                                                return tokenChain(stream,state,[\")\"],\"string\");}\n                                        if(c==\"[\"){\n                                                eatSuffix(stream, 1);\n                                                return tokenChain(stream,state,[\"]\"],\"string\");}\n                                        if(c==\"{\"){\n                                                eatSuffix(stream, 1);\n                                                return tokenChain(stream,state,[\"}\"],\"string\");}\n                                        if(c==\"<\"){\n                                                eatSuffix(stream, 1);\n                                                return tokenChain(stream,state,[\">\"],\"string\");}\n                                        if(/[\\^'\"!~\\/]/.test(c)){\n                                                return tokenChain(stream,state,[stream.eat(c)],\"string\");}}}}\n                if(ch==\"m\"){\n                        var c=look(stream, -2);\n                        if(!(c&&/\\w/.test(c))){\n                                c=stream.eat(/[(\\[{<\\^'\"!~\\/]/);\n                                if(c){\n                                        if(/[\\^'\"!~\\/]/.test(c)){\n                                                return tokenChain(stream,state,[c],RXstyle,RXmodifiers);}\n                                        if(c==\"(\"){\n                                                return tokenChain(stream,state,[\")\"],RXstyle,RXmodifiers);}\n                                        if(c==\"[\"){\n                                                return tokenChain(stream,state,[\"]\"],RXstyle,RXmodifiers);}\n                                        if(c==\"{\"){\n                                                return tokenChain(stream,state,[\"}\"],RXstyle,RXmodifiers);}\n                                        if(c==\"<\"){\n                                                return tokenChain(stream,state,[\">\"],RXstyle,RXmodifiers);}}}}\n                if(ch==\"s\"){\n                        var c=/[\\/>\\]})\\w]/.test(look(stream, -2));\n                        if(!c){\n                                c=stream.eat(/[(\\[{<\\^'\"!~\\/]/);\n                                if(c){\n                                        if(c==\"[\")\n                                                return tokenChain(stream,state,[\"]\",\"]\"],RXstyle,RXmodifiers);\n                                        if(c==\"{\")\n                                                return tokenChain(stream,state,[\"}\",\"}\"],RXstyle,RXmodifiers);\n                                        if(c==\"<\")\n                                                return tokenChain(stream,state,[\">\",\">\"],RXstyle,RXmodifiers);\n                                        if(c==\"(\")\n                                                return tokenChain(stream,state,[\")\",\")\"],RXstyle,RXmodifiers);\n                                        return tokenChain(stream,state,[c,c],RXstyle,RXmodifiers);}}}\n                if(ch==\"y\"){\n                        var c=/[\\/>\\]})\\w]/.test(look(stream, -2));\n                        if(!c){\n                                c=stream.eat(/[(\\[{<\\^'\"!~\\/]/);\n                                if(c){\n                                        if(c==\"[\")\n                                                return tokenChain(stream,state,[\"]\",\"]\"],RXstyle,RXmodifiers);\n                                        if(c==\"{\")\n                                                return tokenChain(stream,state,[\"}\",\"}\"],RXstyle,RXmodifiers);\n                                        if(c==\"<\")\n                                                return tokenChain(stream,state,[\">\",\">\"],RXstyle,RXmodifiers);\n                                        if(c==\"(\")\n                                                return tokenChain(stream,state,[\")\",\")\"],RXstyle,RXmodifiers);\n                                        return tokenChain(stream,state,[c,c],RXstyle,RXmodifiers);}}}\n                if(ch==\"t\"){\n                        var c=/[\\/>\\]})\\w]/.test(look(stream, -2));\n                        if(!c){\n                                c=stream.eat(\"r\");if(c){\n                                c=stream.eat(/[(\\[{<\\^'\"!~\\/]/);\n                                if(c){\n                                        if(c==\"[\")\n                                                return tokenChain(stream,state,[\"]\",\"]\"],RXstyle,RXmodifiers);\n                                        if(c==\"{\")\n                                                return tokenChain(stream,state,[\"}\",\"}\"],RXstyle,RXmodifiers);\n                                        if(c==\"<\")\n                                                return tokenChain(stream,state,[\">\",\">\"],RXstyle,RXmodifiers);\n                                        if(c==\"(\")\n                                                return tokenChain(stream,state,[\")\",\")\"],RXstyle,RXmodifiers);\n                                        return tokenChain(stream,state,[c,c],RXstyle,RXmodifiers);}}}}\n                if(ch==\"`\"){\n                        return tokenChain(stream,state,[ch],\"variable-2\");}\n                if(ch==\"/\"){\n                        if(!/~\\s*$/.test(prefix(stream)))\n                                return \"operator\";\n                        else\n                                return tokenChain(stream,state,[ch],RXstyle,RXmodifiers);}\n                if(ch==\"$\"){\n                        var p=stream.pos;\n                        if(stream.eatWhile(/\\d/)||stream.eat(\"{\")&&stream.eatWhile(/\\d/)&&stream.eat(\"}\"))\n                                return \"variable-2\";\n                        else\n                                stream.pos=p;}\n                if(/[$@%]/.test(ch)){\n                        var p=stream.pos;\n                        if(stream.eat(\"^\")&&stream.eat(/[A-Z]/)||!/[@$%&]/.test(look(stream, -2))&&stream.eat(/[=|\\\\\\-#?@;:&`~\\^!\\[\\]*'\"$+.,\\/<>()]/)){\n                                var c=stream.current();\n                                if(PERL[c])\n                                        return \"variable-2\";}\n                        stream.pos=p;}\n                if(/[$@%&]/.test(ch)){\n                        if(stream.eatWhile(/[\\w$\\[\\]]/)||stream.eat(\"{\")&&stream.eatWhile(/[\\w$\\[\\]]/)&&stream.eat(\"}\")){\n                                var c=stream.current();\n                                if(PERL[c])\n                                        return \"variable-2\";\n                                else\n                                        return \"variable\";}}\n                if(ch==\"#\"){\n                        if(look(stream, -2)!=\"$\"){\n                                stream.skipToEnd();\n                                return \"comment\";}}\n                if(/[:+\\-\\^*$&%@=<>!?|\\/~\\.]/.test(ch)){\n                        var p=stream.pos;\n                        stream.eatWhile(/[:+\\-\\^*$&%@=<>!?|\\/~\\.]/);\n                        if(PERL[stream.current()])\n                                return \"operator\";\n                        else\n                                stream.pos=p;}\n                if(ch==\"_\"){\n                        if(stream.pos==1){\n                                if(suffix(stream, 6)==\"_END__\"){\n                                        return tokenChain(stream,state,['\\0'],\"comment\");}\n                                else if(suffix(stream, 7)==\"_DATA__\"){\n                                        return tokenChain(stream,state,['\\0'],\"variable-2\");}\n                                else if(suffix(stream, 7)==\"_C__\"){\n                                        return tokenChain(stream,state,['\\0'],\"string\");}}}\n                if(/\\w/.test(ch)){\n                        var p=stream.pos;\n                        if(look(stream, -2)==\"{\"&&(look(stream, 0)==\"}\"||stream.eatWhile(/\\w/)&&look(stream, 0)==\"}\"))\n                                return \"string\";\n                        else\n                                stream.pos=p;}\n                if(/[A-Z]/.test(ch)){\n                        var l=look(stream, -2);\n                        var p=stream.pos;\n                        stream.eatWhile(/[A-Z_]/);\n                        if(/[\\da-z]/.test(look(stream, 0))){\n                                stream.pos=p;}\n                        else{\n                                var c=PERL[stream.current()];\n                                if(!c)\n                                        return \"meta\";\n                                if(c[1])\n                                        c=c[0];\n                                if(l!=\":\"){\n                                        if(c==1)\n                                                return \"keyword\";\n                                        else if(c==2)\n                                                return \"def\";\n                                        else if(c==3)\n                                                return \"atom\";\n                                        else if(c==4)\n                                                return \"operator\";\n                                        else if(c==5)\n                                                return \"variable-2\";\n                                        else\n                                                return \"meta\";}\n                                else\n                                        return \"meta\";}}\n                if(/[a-zA-Z_]/.test(ch)){\n                        var l=look(stream, -2);\n                        stream.eatWhile(/\\w/);\n                        var c=PERL[stream.current()];\n                        if(!c)\n                                return \"meta\";\n                        if(c[1])\n                                c=c[0];\n                        if(l!=\":\"){\n                                if(c==1)\n                                        return \"keyword\";\n                                else if(c==2)\n                                        return \"def\";\n                                else if(c==3)\n                                        return \"atom\";\n                                else if(c==4)\n                                        return \"operator\";\n                                else if(c==5)\n                                        return \"variable-2\";\n                                else\n                                        return \"meta\";}\n                        else\n                                return \"meta\";}\n                return null;}\n\n        return {\n            startState: function() {\n                return {\n                    tokenize: tokenPerl,\n                    chain: null,\n                    style: null,\n                    tail: null\n                };\n            },\n            token: function(stream, state) {\n                return (state.tokenize || tokenPerl)(stream, state);\n            },\n            lineComment: '#'\n        };\n});\n\nCodeMirror.registerHelper(\"wordChars\", \"perl\", /[\\w$]/);\n\nCodeMirror.defineMIME(\"text/x-perl\", \"perl\");\n\n// it's like \"peek\", but need for look-ahead or look-behind if index < 0\nfunction look(stream, c){\n  return stream.string.charAt(stream.pos+(c||0));\n}\n\n// return a part of prefix of current stream from current position\nfunction prefix(stream, c){\n  if(c){\n    var x=stream.pos-c;\n    return stream.string.substr((x>=0?x:0),c);}\n  else{\n    return stream.string.substr(0,stream.pos-1);\n  }\n}\n\n// return a part of suffix of current stream from current position\nfunction suffix(stream, c){\n  var y=stream.string.length;\n  var x=y-stream.pos+1;\n  return stream.string.substr(stream.pos,(c&&c<y?c:x));\n}\n\n// eating and vomiting a part of stream from current position\nfunction eatSuffix(stream, c){\n  var x=stream.pos+c;\n  var y;\n  if(x<=0)\n    stream.pos=0;\n  else if(x>=(y=stream.string.length-1))\n    stream.pos=y;\n  else\n    stream.pos=x;\n}\n\n});\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/php/index.html",
    "content": "<!doctype html>\n\n<title>CodeMirror: PHP mode</title>\n<meta charset=\"utf-8\"/>\n<link rel=stylesheet href=\"../../doc/docs.css\">\n\n<link rel=\"stylesheet\" href=\"../../lib/codemirror.css\">\n<script src=\"../../lib/codemirror.js\"></script>\n<script src=\"../../addon/edit/matchbrackets.js\"></script>\n<script src=\"../htmlmixed/htmlmixed.js\"></script>\n<script src=\"../xml/xml.js\"></script>\n<script src=\"../javascript/javascript.js\"></script>\n<script src=\"../css/css.js\"></script>\n<script src=\"../clike/clike.js\"></script>\n<script src=\"php.js\"></script>\n<style type=\"text/css\">.CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}</style>\n<div id=nav>\n  <a href=\"http://codemirror.net\"><h1>CodeMirror</h1><img id=logo src=\"../../doc/logo.png\"></a>\n\n  <ul>\n    <li><a href=\"../../index.html\">Home</a>\n    <li><a href=\"../../doc/manual.html\">Manual</a>\n    <li><a href=\"https://github.com/codemirror/codemirror\">Code</a>\n  </ul>\n  <ul>\n    <li><a href=\"../index.html\">Language modes</a>\n    <li><a class=active href=\"#\">PHP</a>\n  </ul>\n</div>\n\n<article>\n<h2>PHP mode</h2>\n<form><textarea id=\"code\" name=\"code\">\n<?php\n$a = array('a' => 1, 'b' => 2, 3 => 'c');\n\necho \"$a[a] ${a[3] /* } comment */} {$a[b]} \\$a[a]\";\n\nfunction hello($who) {\n\treturn \"Hello $who!\";\n}\n?>\n<p>The program says <?= hello(\"World\") ?>.</p>\n<script>\n\talert(\"And here is some JS code\"); // also colored\n</script>\n</textarea></form>\n\n    <script>\n      var editor = CodeMirror.fromTextArea(document.getElementById(\"code\"), {\n        lineNumbers: true,\n        matchBrackets: true,\n        mode: \"application/x-httpd-php\",\n        indentUnit: 4,\n        indentWithTabs: true\n      });\n    </script>\n\n    <p>Simple HTML/PHP mode based on\n    the <a href=\"../clike/\">C-like</a> mode. Depends on XML,\n    JavaScript, CSS, HTMLMixed, and C-like modes.</p>\n\n    <p><strong>MIME types defined:</strong> <code>application/x-httpd-php</code> (HTML with PHP code), <code>text/x-php</code> (plain, non-wrapped PHP code).</p>\n  </article>\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/php/php.js",
    "content": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n(function(mod) {\n  if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n    mod(require(\"../../lib/codemirror\"), require(\"../htmlmixed/htmlmixed\"), require(\"../clike/clike\"));\n  else if (typeof define == \"function\" && define.amd) // AMD\n    define([\"../../lib/codemirror\", \"../htmlmixed/htmlmixed\", \"../clike/clike\"], mod);\n  else // Plain browser env\n    mod(CodeMirror);\n})(function(CodeMirror) {\n  \"use strict\";\n\n  function keywords(str) {\n    var obj = {}, words = str.split(\" \");\n    for (var i = 0; i < words.length; ++i) obj[words[i]] = true;\n    return obj;\n  }\n\n  // Helper for stringWithEscapes\n  function matchSequence(list, end) {\n    if (list.length == 0) return stringWithEscapes(end);\n    return function (stream, state) {\n      var patterns = list[0];\n      for (var i = 0; i < patterns.length; i++) if (stream.match(patterns[i][0])) {\n        state.tokenize = matchSequence(list.slice(1), end);\n        return patterns[i][1];\n      }\n      state.tokenize = stringWithEscapes(end);\n      return \"string\";\n    };\n  }\n  function stringWithEscapes(closing) {\n    return function(stream, state) { return stringWithEscapes_(stream, state, closing); };\n  }\n  function stringWithEscapes_(stream, state, closing) {\n    // \"Complex\" syntax\n    if (stream.match(\"${\", false) || stream.match(\"{$\", false)) {\n      state.tokenize = null;\n      return \"string\";\n    }\n\n    // Simple syntax\n    if (stream.match(/^\\$[a-zA-Z_][a-zA-Z0-9_]*/)) {\n      // After the variable name there may appear array or object operator.\n      if (stream.match(\"[\", false)) {\n        // Match array operator\n        state.tokenize = matchSequence([\n          [[\"[\", null]],\n          [[/\\d[\\w\\.]*/, \"number\"],\n           [/\\$[a-zA-Z_][a-zA-Z0-9_]*/, \"variable-2\"],\n           [/[\\w\\$]+/, \"variable\"]],\n          [[\"]\", null]]\n        ], closing);\n      }\n      if (stream.match(/\\-\\>\\w/, false)) {\n        // Match object operator\n        state.tokenize = matchSequence([\n          [[\"->\", null]],\n          [[/[\\w]+/, \"variable\"]]\n        ], closing);\n      }\n      return \"variable-2\";\n    }\n\n    var escaped = false;\n    // Normal string\n    while (!stream.eol() &&\n           (escaped || (!stream.match(\"{$\", false) &&\n                        !stream.match(/^(\\$[a-zA-Z_][a-zA-Z0-9_]*|\\$\\{)/, false)))) {\n      if (!escaped && stream.match(closing)) {\n        state.tokenize = null;\n        state.tokStack.pop(); state.tokStack.pop();\n        break;\n      }\n      escaped = stream.next() == \"\\\\\" && !escaped;\n    }\n    return \"string\";\n  }\n\n  var phpKeywords = \"abstract and array as break case catch class clone const continue declare default \" +\n    \"do else elseif enddeclare endfor endforeach endif endswitch endwhile extends final \" +\n    \"for foreach function global goto if implements interface instanceof namespace \" +\n    \"new or private protected public static switch throw trait try use var while xor \" +\n    \"die echo empty exit eval include include_once isset list require require_once return \" +\n    \"print unset __halt_compiler self static parent yield insteadof finally\";\n  var phpAtoms = \"true false null TRUE FALSE NULL __CLASS__ __DIR__ __FILE__ __LINE__ __METHOD__ __FUNCTION__ __NAMESPACE__ __TRAIT__\";\n  var phpBuiltin = \"func_num_args func_get_arg func_get_args strlen strcmp strncmp strcasecmp strncasecmp each error_reporting define defined trigger_error user_error set_error_handler restore_error_handler get_declared_classes get_loaded_extensions extension_loaded get_extension_funcs debug_backtrace constant bin2hex hex2bin sleep usleep time mktime gmmktime strftime gmstrftime strtotime date gmdate getdate localtime checkdate flush wordwrap htmlspecialchars htmlentities html_entity_decode md5 md5_file crc32 getimagesize image_type_to_mime_type phpinfo phpversion phpcredits strnatcmp strnatcasecmp substr_count strspn strcspn strtok strtoupper strtolower strpos strrpos strrev hebrev hebrevc nl2br basename dirname pathinfo stripslashes stripcslashes strstr stristr strrchr str_shuffle str_word_count strcoll substr substr_replace quotemeta ucfirst ucwords strtr addslashes addcslashes rtrim str_replace str_repeat count_chars chunk_split trim ltrim strip_tags similar_text explode implode setlocale localeconv parse_str str_pad chop strchr sprintf printf vprintf vsprintf sscanf fscanf parse_url urlencode urldecode rawurlencode rawurldecode readlink linkinfo link unlink exec system escapeshellcmd escapeshellarg passthru shell_exec proc_open proc_close rand srand getrandmax mt_rand mt_srand mt_getrandmax base64_decode base64_encode abs ceil floor round is_finite is_nan is_infinite bindec hexdec octdec decbin decoct dechex base_convert number_format fmod ip2long long2ip getenv putenv getopt microtime gettimeofday getrusage uniqid quoted_printable_decode set_time_limit get_cfg_var magic_quotes_runtime set_magic_quotes_runtime get_magic_quotes_gpc get_magic_quotes_runtime import_request_variables error_log serialize unserialize memory_get_usage var_dump var_export debug_zval_dump print_r highlight_file show_source highlight_string ini_get ini_get_all ini_set ini_alter ini_restore get_include_path set_include_path restore_include_path setcookie header headers_sent connection_aborted connection_status ignore_user_abort parse_ini_file is_uploaded_file move_uploaded_file intval floatval doubleval strval gettype settype is_null is_resource is_bool is_long is_float is_int is_integer is_double is_real is_numeric is_string is_array is_object is_scalar ereg ereg_replace eregi eregi_replace split spliti join sql_regcase dl pclose popen readfile rewind rmdir umask fclose feof fgetc fgets fgetss fread fopen fpassthru ftruncate fstat fseek ftell fflush fwrite fputs mkdir rename copy tempnam tmpfile file file_get_contents stream_select stream_context_create stream_context_set_params stream_context_set_option stream_context_get_options stream_filter_prepend stream_filter_append fgetcsv flock get_meta_tags stream_set_write_buffer set_file_buffer set_socket_blocking stream_set_blocking socket_set_blocking stream_get_meta_data stream_register_wrapper stream_wrapper_register stream_set_timeout socket_set_timeout socket_get_status realpath fnmatch fsockopen pfsockopen pack unpack get_browser crypt opendir closedir chdir getcwd rewinddir readdir dir glob fileatime filectime filegroup fileinode filemtime fileowner fileperms filesize filetype file_exists is_writable is_writeable is_readable is_executable is_file is_dir is_link stat lstat chown touch clearstatcache mail ob_start ob_flush ob_clean ob_end_flush ob_end_clean ob_get_flush ob_get_clean ob_get_length ob_get_level ob_get_status ob_get_contents ob_implicit_flush ob_list_handlers ksort krsort natsort natcasesort asort arsort sort rsort usort uasort uksort shuffle array_walk count end prev next reset current key min max in_array array_search extract compact array_fill range array_multisort array_push array_pop array_shift array_unshift array_splice array_slice array_merge array_merge_recursive array_keys array_values array_count_values array_reverse array_reduce array_pad array_flip array_change_key_case array_rand array_unique array_intersect array_intersect_assoc array_diff array_diff_assoc array_sum array_filter array_map array_chunk array_key_exists pos sizeof key_exists assert assert_options version_compare ftok str_rot13 aggregate session_name session_module_name session_save_path session_id session_regenerate_id session_decode session_register session_unregister session_is_registered session_encode session_start session_destroy session_unset session_set_save_handler session_cache_limiter session_cache_expire session_set_cookie_params session_get_cookie_params session_write_close preg_match preg_match_all preg_replace preg_replace_callback preg_split preg_quote preg_grep overload ctype_alnum ctype_alpha ctype_cntrl ctype_digit ctype_lower ctype_graph ctype_print ctype_punct ctype_space ctype_upper ctype_xdigit virtual apache_request_headers apache_note apache_lookup_uri apache_child_terminate apache_setenv apache_response_headers apache_get_version getallheaders mysql_connect mysql_pconnect mysql_close mysql_select_db mysql_create_db mysql_drop_db mysql_query mysql_unbuffered_query mysql_db_query mysql_list_dbs mysql_list_tables mysql_list_fields mysql_list_processes mysql_error mysql_errno mysql_affected_rows mysql_insert_id mysql_result mysql_num_rows mysql_num_fields mysql_fetch_row mysql_fetch_array mysql_fetch_assoc mysql_fetch_object mysql_data_seek mysql_fetch_lengths mysql_fetch_field mysql_field_seek mysql_free_result mysql_field_name mysql_field_table mysql_field_len mysql_field_type mysql_field_flags mysql_escape_string mysql_real_escape_string mysql_stat mysql_thread_id mysql_client_encoding mysql_get_client_info mysql_get_host_info mysql_get_proto_info mysql_get_server_info mysql_info mysql mysql_fieldname mysql_fieldtable mysql_fieldlen mysql_fieldtype mysql_fieldflags mysql_selectdb mysql_createdb mysql_dropdb mysql_freeresult mysql_numfields mysql_numrows mysql_listdbs mysql_listtables mysql_listfields mysql_db_name mysql_dbname mysql_tablename mysql_table_name pg_connect pg_pconnect pg_close pg_connection_status pg_connection_busy pg_connection_reset pg_host pg_dbname pg_port pg_tty pg_options pg_ping pg_query pg_send_query pg_cancel_query pg_fetch_result pg_fetch_row pg_fetch_assoc pg_fetch_array pg_fetch_object pg_fetch_all pg_affected_rows pg_get_result pg_result_seek pg_result_status pg_free_result pg_last_oid pg_num_rows pg_num_fields pg_field_name pg_field_num pg_field_size pg_field_type pg_field_prtlen pg_field_is_null pg_get_notify pg_get_pid pg_result_error pg_last_error pg_last_notice pg_put_line pg_end_copy pg_copy_to pg_copy_from pg_trace pg_untrace pg_lo_create pg_lo_unlink pg_lo_open pg_lo_close pg_lo_read pg_lo_write pg_lo_read_all pg_lo_import pg_lo_export pg_lo_seek pg_lo_tell pg_escape_string pg_escape_bytea pg_unescape_bytea pg_client_encoding pg_set_client_encoding pg_meta_data pg_convert pg_insert pg_update pg_delete pg_select pg_exec pg_getlastoid pg_cmdtuples pg_errormessage pg_numrows pg_numfields pg_fieldname pg_fieldsize pg_fieldtype pg_fieldnum pg_fieldprtlen pg_fieldisnull pg_freeresult pg_result pg_loreadall pg_locreate pg_lounlink pg_loopen pg_loclose pg_loread pg_lowrite pg_loimport pg_loexport http_response_code get_declared_traits getimagesizefromstring socket_import_stream stream_set_chunk_size trait_exists header_register_callback class_uses session_status session_register_shutdown echo print global static exit array empty eval isset unset die include require include_once require_once json_decode json_encode json_last_error json_last_error_msg curl_close curl_copy_handle curl_errno curl_error curl_escape curl_exec curl_file_create curl_getinfo curl_init curl_multi_add_handle curl_multi_close curl_multi_exec curl_multi_getcontent curl_multi_info_read curl_multi_init curl_multi_remove_handle curl_multi_select curl_multi_setopt curl_multi_strerror curl_pause curl_reset curl_setopt_array curl_setopt curl_share_close curl_share_init curl_share_setopt curl_strerror curl_unescape curl_version mysqli_affected_rows mysqli_autocommit mysqli_change_user mysqli_character_set_name mysqli_close mysqli_commit mysqli_connect_errno mysqli_connect_error mysqli_connect mysqli_data_seek mysqli_debug mysqli_dump_debug_info mysqli_errno mysqli_error_list mysqli_error mysqli_fetch_all mysqli_fetch_array mysqli_fetch_assoc mysqli_fetch_field_direct mysqli_fetch_field mysqli_fetch_fields mysqli_fetch_lengths mysqli_fetch_object mysqli_fetch_row mysqli_field_count mysqli_field_seek mysqli_field_tell mysqli_free_result mysqli_get_charset mysqli_get_client_info mysqli_get_client_stats mysqli_get_client_version mysqli_get_connection_stats mysqli_get_host_info mysqli_get_proto_info mysqli_get_server_info mysqli_get_server_version mysqli_info mysqli_init mysqli_insert_id mysqli_kill mysqli_more_results mysqli_multi_query mysqli_next_result mysqli_num_fields mysqli_num_rows mysqli_options mysqli_ping mysqli_prepare mysqli_query mysqli_real_connect mysqli_real_escape_string mysqli_real_query mysqli_reap_async_query mysqli_refresh mysqli_rollback mysqli_select_db mysqli_set_charset mysqli_set_local_infile_default mysqli_set_local_infile_handler mysqli_sqlstate mysqli_ssl_set mysqli_stat mysqli_stmt_init mysqli_store_result mysqli_thread_id mysqli_thread_safe mysqli_use_result mysqli_warning_count\";\n  CodeMirror.registerHelper(\"hintWords\", \"php\", [phpKeywords, phpAtoms, phpBuiltin].join(\" \").split(\" \"));\n  CodeMirror.registerHelper(\"wordChars\", \"php\", /[\\w$]/);\n\n  var phpConfig = {\n    name: \"clike\",\n    helperType: \"php\",\n    keywords: keywords(phpKeywords),\n    blockKeywords: keywords(\"catch do else elseif for foreach if switch try while finally\"),\n    atoms: keywords(phpAtoms),\n    builtin: keywords(phpBuiltin),\n    multiLineStrings: true,\n    hooks: {\n      \"$\": function(stream) {\n        stream.eatWhile(/[\\w\\$_]/);\n        return \"variable-2\";\n      },\n      \"<\": function(stream, state) {\n        if (stream.match(/<</)) {\n          stream.eatWhile(/[\\w\\.]/);\n          var delim = stream.current().slice(3);\n          if (delim) {\n            (state.tokStack || (state.tokStack = [])).push(delim, 0);\n            state.tokenize = stringWithEscapes(delim);\n            return \"string\";\n          }\n        }\n        return false;\n      },\n      \"#\": function(stream) {\n        while (!stream.eol() && !stream.match(\"?>\", false)) stream.next();\n        return \"comment\";\n      },\n      \"/\": function(stream) {\n        if (stream.eat(\"/\")) {\n          while (!stream.eol() && !stream.match(\"?>\", false)) stream.next();\n          return \"comment\";\n        }\n        return false;\n      },\n      '\"': function(_stream, state) {\n        (state.tokStack || (state.tokStack = [])).push('\"', 0);\n        state.tokenize = stringWithEscapes('\"');\n        return \"string\";\n      },\n      \"{\": function(_stream, state) {\n        if (state.tokStack && state.tokStack.length)\n          state.tokStack[state.tokStack.length - 1]++;\n        return false;\n      },\n      \"}\": function(_stream, state) {\n        if (state.tokStack && state.tokStack.length > 0 &&\n            !--state.tokStack[state.tokStack.length - 1]) {\n          state.tokenize = stringWithEscapes(state.tokStack[state.tokStack.length - 2]);\n        }\n        return false;\n      }\n    }\n  };\n\n  CodeMirror.defineMode(\"php\", function(config, parserConfig) {\n    var htmlMode = CodeMirror.getMode(config, \"text/html\");\n    var phpMode = CodeMirror.getMode(config, phpConfig);\n\n    function dispatch(stream, state) {\n      var isPHP = state.curMode == phpMode;\n      if (stream.sol() && state.pending && state.pending != '\"' && state.pending != \"'\") state.pending = null;\n      if (!isPHP) {\n        if (stream.match(/^<\\?\\w*/)) {\n          state.curMode = phpMode;\n          state.curState = state.php;\n          return \"meta\";\n        }\n        if (state.pending == '\"' || state.pending == \"'\") {\n          while (!stream.eol() && stream.next() != state.pending) {}\n          var style = \"string\";\n        } else if (state.pending && stream.pos < state.pending.end) {\n          stream.pos = state.pending.end;\n          var style = state.pending.style;\n        } else {\n          var style = htmlMode.token(stream, state.curState);\n        }\n        if (state.pending) state.pending = null;\n        var cur = stream.current(), openPHP = cur.search(/<\\?/), m;\n        if (openPHP != -1) {\n          if (style == \"string\" && (m = cur.match(/[\\'\\\"]$/)) && !/\\?>/.test(cur)) state.pending = m[0];\n          else state.pending = {end: stream.pos, style: style};\n          stream.backUp(cur.length - openPHP);\n        }\n        return style;\n      } else if (isPHP && state.php.tokenize == null && stream.match(\"?>\")) {\n        state.curMode = htmlMode;\n        state.curState = state.html;\n        return \"meta\";\n      } else {\n        return phpMode.token(stream, state.curState);\n      }\n    }\n\n    return {\n      startState: function() {\n        var html = CodeMirror.startState(htmlMode), php = CodeMirror.startState(phpMode);\n        return {html: html,\n                php: php,\n                curMode: parserConfig.startOpen ? phpMode : htmlMode,\n                curState: parserConfig.startOpen ? php : html,\n                pending: null};\n      },\n\n      copyState: function(state) {\n        var html = state.html, htmlNew = CodeMirror.copyState(htmlMode, html),\n            php = state.php, phpNew = CodeMirror.copyState(phpMode, php), cur;\n        if (state.curMode == htmlMode) cur = htmlNew;\n        else cur = phpNew;\n        return {html: htmlNew, php: phpNew, curMode: state.curMode, curState: cur,\n                pending: state.pending};\n      },\n\n      token: dispatch,\n\n      indent: function(state, textAfter) {\n        if ((state.curMode != phpMode && /^\\s*<\\//.test(textAfter)) ||\n            (state.curMode == phpMode && /^\\?>/.test(textAfter)))\n          return htmlMode.indent(state.html, textAfter);\n        return state.curMode.indent(state.curState, textAfter);\n      },\n\n      blockCommentStart: \"/*\",\n      blockCommentEnd: \"*/\",\n      lineComment: \"//\",\n\n      innerMode: function(state) { return {state: state.curState, mode: state.curMode}; }\n    };\n  }, \"htmlmixed\", \"clike\");\n\n  CodeMirror.defineMIME(\"application/x-httpd-php\", \"php\");\n  CodeMirror.defineMIME(\"application/x-httpd-php-open\", {name: \"php\", startOpen: true});\n  CodeMirror.defineMIME(\"text/x-php\", phpConfig);\n});\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/php/test.js",
    "content": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n(function() {\n  var mode = CodeMirror.getMode({indentUnit: 2}, \"php\");\n  function MT(name) { test.mode(name, mode, Array.prototype.slice.call(arguments, 1)); }\n\n  MT('simple_test',\n     '[meta <?php] ' +\n     '[keyword echo] [string \"aaa\"]; ' +\n     '[meta ?>]');\n\n  MT('variable_interpolation_non_alphanumeric',\n     '[meta <?php]',\n     '[keyword echo] [string \"aaa$~$!$@$#$$$%$^$&$*$($)$.$<$>$/$\\\\$}$\\\\\\\"$:$;$?$|$[[$]]$+$=aaa\"]',\n     '[meta ?>]');\n\n  MT('variable_interpolation_digits',\n     '[meta <?php]',\n     '[keyword echo] [string \"aaa$1$2$3$4$5$6$7$8$9$0aaa\"]',\n     '[meta ?>]');\n\n  MT('variable_interpolation_simple_syntax_1',\n     '[meta <?php]',\n     '[keyword echo] [string \"aaa][variable-2 $aaa][string .aaa\"];',\n     '[meta ?>]');\n\n  MT('variable_interpolation_simple_syntax_2',\n     '[meta <?php]',\n     '[keyword echo] [string \"][variable-2 $aaaa][[','[number 2]',         ']][string aa\"];',\n     '[keyword echo] [string \"][variable-2 $aaaa][[','[number 2345]',      ']][string aa\"];',\n     '[keyword echo] [string \"][variable-2 $aaaa][[','[number 2.3]',       ']][string aa\"];',\n     '[keyword echo] [string \"][variable-2 $aaaa][[','[variable aaaaa]',   ']][string aa\"];',\n     '[keyword echo] [string \"][variable-2 $aaaa][[','[variable-2 $aaaaa]',']][string aa\"];',\n\n     '[keyword echo] [string \"1aaa][variable-2 $aaaa][[','[number 2]',         ']][string aa\"];',\n     '[keyword echo] [string \"aaa][variable-2 $aaaa][[','[number 2345]',      ']][string aa\"];',\n     '[keyword echo] [string \"aaa][variable-2 $aaaa][[','[number 2.3]',       ']][string aa\"];',\n     '[keyword echo] [string \"aaa][variable-2 $aaaa][[','[variable aaaaa]',   ']][string aa\"];',\n     '[keyword echo] [string \"aaa][variable-2 $aaaa][[','[variable-2 $aaaaa]',']][string aa\"];',\n     '[meta ?>]');\n\n  MT('variable_interpolation_simple_syntax_3',\n     '[meta <?php]',\n     '[keyword echo] [string \"aaa][variable-2 $aaaa]->[variable aaaaa][string .aaaaaa\"];',\n     '[keyword echo] [string \"aaa][variable-2 $aaaa][string ->][variable-2 $aaaaa][string .aaaaaa\"];',\n     '[keyword echo] [string \"aaa][variable-2 $aaaa]->[variable aaaaa][string [[2]].aaaaaa\"];',\n     '[keyword echo] [string \"aaa][variable-2 $aaaa]->[variable aaaaa][string ->aaaa2.aaaaaa\"];',\n     '[meta ?>]');\n\n  MT('variable_interpolation_escaping',\n     '[meta <?php] [comment /* Escaping */]',\n     '[keyword echo] [string \"aaa\\\\$aaaa->aaa.aaa\"];',\n     '[keyword echo] [string \"aaa\\\\$aaaa[[2]]aaa.aaa\"];',\n     '[keyword echo] [string \"aaa\\\\$aaaa[[asd]]aaa.aaa\"];',\n     '[keyword echo] [string \"aaa{\\\\$aaaa->aaa.aaa\"];',\n     '[keyword echo] [string \"aaa{\\\\$aaaa[[2]]aaa.aaa\"];',\n     '[keyword echo] [string \"aaa{\\\\aaaaa[[asd]]aaa.aaa\"];',\n     '[keyword echo] [string \"aaa\\\\${aaaa->aaa.aaa\"];',\n     '[keyword echo] [string \"aaa\\\\${aaaa[[2]]aaa.aaa\"];',\n     '[keyword echo] [string \"aaa\\\\${aaaa[[asd]]aaa.aaa\"];',\n     '[meta ?>]');\n\n  MT('variable_interpolation_complex_syntax_1',\n     '[meta <?php]',\n     '[keyword echo] [string \"aaa][variable-2 $]{[variable aaaa]}[string ->aaa.aaa\"];',\n     '[keyword echo] [string \"aaa][variable-2 $]{[variable-2 $aaaa]}[string ->aaa.aaa\"];',\n     '[keyword echo] [string \"aaa][variable-2 $]{[variable-2 $aaaa][[','  [number 42]',']]}[string ->aaa.aaa\"];',\n     '[keyword echo] [string \"aaa][variable-2 $]{[variable aaaa][meta ?>]aaaaaa');\n\n  MT('variable_interpolation_complex_syntax_2',\n     '[meta <?php] [comment /* Monsters */]',\n     '[keyword echo] [string \"][variable-2 $]{[variable aaa][comment /*}?>} $aaa<?php } */]}[string ->aaa.aaa\"];',\n     '[keyword echo] [string \"][variable-2 $]{[variable aaa][comment /*}?>*/][[','  [string \"aaa][variable-2 $aaa][string {}][variable-2 $]{[variable aaa]}[string \"]',']]}[string ->aaa.aaa\"];',\n     '[keyword echo] [string \"][variable-2 $]{[variable aaa][comment /*} } $aaa } */]}[string ->aaa.aaa\"];');\n\n\n  function build_recursive_monsters(nt, t, n){\n    var monsters = [t];\n    for (var i = 1; i <= n; ++i)\n      monsters[i] = nt.join(monsters[i - 1]);\n    return monsters;\n  }\n\n  var m1 = build_recursive_monsters(\n    ['[string \"][variable-2 $]{[variable aaa] [operator +] ', '}[string \"]'],\n    '[comment /* }?>} */] [string \"aaa][variable-2 $aaa][string .aaa\"]',\n    10\n  );\n\n  MT('variable_interpolation_complex_syntax_3_1',\n     '[meta <?php] [comment /* Recursive monsters */]',\n     '[keyword echo] ' + m1[4] + ';',\n     '[keyword echo] ' + m1[7] + ';',\n     '[keyword echo] ' + m1[8] + ';',\n     '[keyword echo] ' + m1[5] + ';',\n     '[keyword echo] ' + m1[1] + ';',\n     '[keyword echo] ' + m1[6] + ';',\n     '[keyword echo] ' + m1[9] + ';',\n     '[keyword echo] ' + m1[0] + ';',\n     '[keyword echo] ' + m1[10] + ';',\n     '[keyword echo] ' + m1[2] + ';',\n     '[keyword echo] ' + m1[3] + ';',\n     '[keyword echo] [string \"end\"];',\n     '[meta ?>]');\n\n  var m2 = build_recursive_monsters(\n    ['[string \"a][variable-2 $]{[variable aaa] [operator +] ', ' [operator +] ', '}[string .a\"]'],\n    '[comment /* }?>{{ */] [string \"a?>}{{aa][variable-2 $aaa][string .a}a?>a\"]',\n    5\n  );\n\n  MT('variable_interpolation_complex_syntax_3_2',\n     '[meta <?php] [comment /* Recursive monsters 2 */]',\n     '[keyword echo] ' + m2[0] + ';',\n     '[keyword echo] ' + m2[1] + ';',\n     '[keyword echo] ' + m2[5] + ';',\n     '[keyword echo] ' + m2[4] + ';',\n     '[keyword echo] ' + m2[2] + ';',\n     '[keyword echo] ' + m2[3] + ';',\n     '[keyword echo] [string \"end\"];',\n     '[meta ?>]');\n\n  function build_recursive_monsters_2(mf1, mf2, nt, t, n){\n    var monsters = [t];\n    for (var i = 1; i <= n; ++i)\n      monsters[i] = nt[0] + mf1[i - 1] + nt[1] + mf2[i - 1] + nt[2] + monsters[i - 1] + nt[3];\n    return monsters;\n  }\n\n  var m3 = build_recursive_monsters_2(\n    m1,\n    m2,\n    ['[string \"a][variable-2 $]{[variable aaa] [operator +] ', ' [operator +] ', ' [operator +] ', '}[string .a\"]'],\n    '[comment /* }?>{{ */] [string \"a?>}{{aa][variable-2 $aaa][string .a}a?>a\"]',\n    4\n  );\n\n  MT('variable_interpolation_complex_syntax_3_3',\n     '[meta <?php] [comment /* Recursive monsters 2 */]',\n     '[keyword echo] ' + m3[4] + ';',\n     '[keyword echo] ' + m3[0] + ';',\n     '[keyword echo] ' + m3[3] + ';',\n     '[keyword echo] ' + m3[1] + ';',\n     '[keyword echo] ' + m3[2] + ';',\n     '[keyword echo] [string \"end\"];',\n     '[meta ?>]');\n\n  MT(\"variable_interpolation_heredoc\",\n     \"[meta <?php]\",\n     \"[string <<<here]\",\n     \"[string doc ][variable-2 $]{[variable yay]}[string more]\",\n     \"[string here]; [comment // normal]\");\n})();\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/pig/index.html",
    "content": "<!doctype html>\n\n<title>CodeMirror: Pig Latin mode</title>\n<meta charset=\"utf-8\"/>\n<link rel=stylesheet href=\"../../doc/docs.css\">\n\n<link rel=\"stylesheet\" href=\"../../lib/codemirror.css\">\n<script src=\"../../lib/codemirror.js\"></script>\n<script src=\"pig.js\"></script>\n<style>.CodeMirror {border: 2px inset #dee;}</style>\n<div id=nav>\n  <a href=\"http://codemirror.net\"><h1>CodeMirror</h1><img id=logo src=\"../../doc/logo.png\"></a>\n\n  <ul>\n    <li><a href=\"../../index.html\">Home</a>\n    <li><a href=\"../../doc/manual.html\">Manual</a>\n    <li><a href=\"https://github.com/codemirror/codemirror\">Code</a>\n  </ul>\n  <ul>\n    <li><a href=\"../index.html\">Language modes</a>\n    <li><a class=active href=\"#\">Pig Latin</a>\n  </ul>\n</div>\n\n<article>\n<h2>Pig Latin mode</h2>\n<form><textarea id=\"code\" name=\"code\">\n-- Apache Pig (Pig Latin Language) Demo\n/* \nThis is a multiline comment.\n*/\na = LOAD \"\\path\\to\\input\" USING PigStorage('\\t') AS (x:long, y:chararray, z:bytearray);\nb = GROUP a BY (x,y,3+4);\nc = FOREACH b GENERATE flatten(group) as (x,y), SUM(group.$2) as z;\nSTORE c INTO \"\\path\\to\\output\";\n\n--\n</textarea></form>\n\n    <script>\n      var editor = CodeMirror.fromTextArea(document.getElementById(\"code\"), {\n        lineNumbers: true,\n        indentUnit: 4,\n        mode: \"text/x-pig\"\n      });\n    </script>\n\n    <p>\n        Simple mode that handles Pig Latin language.\n    </p>\n\n    <p><strong>MIME type defined:</strong> <code>text/x-pig</code>\n    (PIG code)\n</html>\n</article>\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/pig/pig.js",
    "content": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n/*\n *      Pig Latin Mode for CodeMirror 2\n *      @author Prasanth Jayachandran\n *      @link   https://github.com/prasanthj/pig-codemirror-2\n *  This implementation is adapted from PL/SQL mode in CodeMirror 2.\n */\n(function(mod) {\n  if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n    mod(require(\"../../lib/codemirror\"));\n  else if (typeof define == \"function\" && define.amd) // AMD\n    define([\"../../lib/codemirror\"], mod);\n  else // Plain browser env\n    mod(CodeMirror);\n})(function(CodeMirror) {\n\"use strict\";\n\nCodeMirror.defineMode(\"pig\", function(_config, parserConfig) {\n  var keywords = parserConfig.keywords,\n  builtins = parserConfig.builtins,\n  types = parserConfig.types,\n  multiLineStrings = parserConfig.multiLineStrings;\n\n  var isOperatorChar = /[*+\\-%<>=&?:\\/!|]/;\n\n  function chain(stream, state, f) {\n    state.tokenize = f;\n    return f(stream, state);\n  }\n\n  var type;\n  function ret(tp, style) {\n    type = tp;\n    return style;\n  }\n\n  function tokenComment(stream, state) {\n    var isEnd = false;\n    var ch;\n    while(ch = stream.next()) {\n      if(ch == \"/\" && isEnd) {\n        state.tokenize = tokenBase;\n        break;\n      }\n      isEnd = (ch == \"*\");\n    }\n    return ret(\"comment\", \"comment\");\n  }\n\n  function tokenString(quote) {\n    return function(stream, state) {\n      var escaped = false, next, end = false;\n      while((next = stream.next()) != null) {\n        if (next == quote && !escaped) {\n          end = true; break;\n        }\n        escaped = !escaped && next == \"\\\\\";\n      }\n      if (end || !(escaped || multiLineStrings))\n        state.tokenize = tokenBase;\n      return ret(\"string\", \"error\");\n    };\n  }\n\n  function tokenBase(stream, state) {\n    var ch = stream.next();\n\n    // is a start of string?\n    if (ch == '\"' || ch == \"'\")\n      return chain(stream, state, tokenString(ch));\n    // is it one of the special chars\n    else if(/[\\[\\]{}\\(\\),;\\.]/.test(ch))\n      return ret(ch);\n    // is it a number?\n    else if(/\\d/.test(ch)) {\n      stream.eatWhile(/[\\w\\.]/);\n      return ret(\"number\", \"number\");\n    }\n    // multi line comment or operator\n    else if (ch == \"/\") {\n      if (stream.eat(\"*\")) {\n        return chain(stream, state, tokenComment);\n      }\n      else {\n        stream.eatWhile(isOperatorChar);\n        return ret(\"operator\", \"operator\");\n      }\n    }\n    // single line comment or operator\n    else if (ch==\"-\") {\n      if(stream.eat(\"-\")){\n        stream.skipToEnd();\n        return ret(\"comment\", \"comment\");\n      }\n      else {\n        stream.eatWhile(isOperatorChar);\n        return ret(\"operator\", \"operator\");\n      }\n    }\n    // is it an operator\n    else if (isOperatorChar.test(ch)) {\n      stream.eatWhile(isOperatorChar);\n      return ret(\"operator\", \"operator\");\n    }\n    else {\n      // get the while word\n      stream.eatWhile(/[\\w\\$_]/);\n      // is it one of the listed keywords?\n      if (keywords && keywords.propertyIsEnumerable(stream.current().toUpperCase())) {\n        if (stream.eat(\")\") || stream.eat(\".\")) {\n          //keywords can be used as variables like flatten(group), group.$0 etc..\n        }\n        else {\n          return (\"keyword\", \"keyword\");\n        }\n      }\n      // is it one of the builtin functions?\n      if (builtins && builtins.propertyIsEnumerable(stream.current().toUpperCase()))\n      {\n        return (\"keyword\", \"variable-2\");\n      }\n      // is it one of the listed types?\n      if (types && types.propertyIsEnumerable(stream.current().toUpperCase()))\n        return (\"keyword\", \"variable-3\");\n      // default is a 'variable'\n      return ret(\"variable\", \"pig-word\");\n    }\n  }\n\n  // Interface\n  return {\n    startState: function() {\n      return {\n        tokenize: tokenBase,\n        startOfLine: true\n      };\n    },\n\n    token: function(stream, state) {\n      if(stream.eatSpace()) return null;\n      var style = state.tokenize(stream, state);\n      return style;\n    }\n  };\n});\n\n(function() {\n  function keywords(str) {\n    var obj = {}, words = str.split(\" \");\n    for (var i = 0; i < words.length; ++i) obj[words[i]] = true;\n    return obj;\n  }\n\n  // builtin funcs taken from trunk revision 1303237\n  var pBuiltins = \"ABS ACOS ARITY ASIN ATAN AVG BAGSIZE BINSTORAGE BLOOM BUILDBLOOM CBRT CEIL \"\n    + \"CONCAT COR COS COSH COUNT COUNT_STAR COV CONSTANTSIZE CUBEDIMENSIONS DIFF DISTINCT DOUBLEABS \"\n    + \"DOUBLEAVG DOUBLEBASE DOUBLEMAX DOUBLEMIN DOUBLEROUND DOUBLESUM EXP FLOOR FLOATABS FLOATAVG \"\n    + \"FLOATMAX FLOATMIN FLOATROUND FLOATSUM GENERICINVOKER INDEXOF INTABS INTAVG INTMAX INTMIN \"\n    + \"INTSUM INVOKEFORDOUBLE INVOKEFORFLOAT INVOKEFORINT INVOKEFORLONG INVOKEFORSTRING INVOKER \"\n    + \"ISEMPTY JSONLOADER JSONMETADATA JSONSTORAGE LAST_INDEX_OF LCFIRST LOG LOG10 LOWER LONGABS \"\n    + \"LONGAVG LONGMAX LONGMIN LONGSUM MAX MIN MAPSIZE MONITOREDUDF NONDETERMINISTIC OUTPUTSCHEMA  \"\n    + \"PIGSTORAGE PIGSTREAMING RANDOM REGEX_EXTRACT REGEX_EXTRACT_ALL REPLACE ROUND SIN SINH SIZE \"\n    + \"SQRT STRSPLIT SUBSTRING SUM STRINGCONCAT STRINGMAX STRINGMIN STRINGSIZE TAN TANH TOBAG \"\n    + \"TOKENIZE TOMAP TOP TOTUPLE TRIM TEXTLOADER TUPLESIZE UCFIRST UPPER UTF8STORAGECONVERTER \";\n\n  // taken from QueryLexer.g\n  var pKeywords = \"VOID IMPORT RETURNS DEFINE LOAD FILTER FOREACH ORDER CUBE DISTINCT COGROUP \"\n    + \"JOIN CROSS UNION SPLIT INTO IF OTHERWISE ALL AS BY USING INNER OUTER ONSCHEMA PARALLEL \"\n    + \"PARTITION GROUP AND OR NOT GENERATE FLATTEN ASC DESC IS STREAM THROUGH STORE MAPREDUCE \"\n    + \"SHIP CACHE INPUT OUTPUT STDERROR STDIN STDOUT LIMIT SAMPLE LEFT RIGHT FULL EQ GT LT GTE LTE \"\n    + \"NEQ MATCHES TRUE FALSE DUMP\";\n\n  // data types\n  var pTypes = \"BOOLEAN INT LONG FLOAT DOUBLE CHARARRAY BYTEARRAY BAG TUPLE MAP \";\n\n  CodeMirror.defineMIME(\"text/x-pig\", {\n    name: \"pig\",\n    builtins: keywords(pBuiltins),\n    keywords: keywords(pKeywords),\n    types: keywords(pTypes)\n  });\n\n  CodeMirror.registerHelper(\"hintWords\", \"pig\", (pBuiltins + pTypes + pKeywords).split(\" \"));\n}());\n\n});\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/properties/index.html",
    "content": "<!doctype html>\n\n<title>CodeMirror: Properties files mode</title>\n<meta charset=\"utf-8\"/>\n<link rel=stylesheet href=\"../../doc/docs.css\">\n\n<link rel=\"stylesheet\" href=\"../../lib/codemirror.css\">\n<script src=\"../../lib/codemirror.js\"></script>\n<script src=\"properties.js\"></script>\n<style>.CodeMirror {border-top: 1px solid #ddd; border-bottom: 1px solid #ddd;}</style>\n<div id=nav>\n  <a href=\"http://codemirror.net\"><h1>CodeMirror</h1><img id=logo src=\"../../doc/logo.png\"></a>\n\n  <ul>\n    <li><a href=\"../../index.html\">Home</a>\n    <li><a href=\"../../doc/manual.html\">Manual</a>\n    <li><a href=\"https://github.com/codemirror/codemirror\">Code</a>\n  </ul>\n  <ul>\n    <li><a href=\"../index.html\">Language modes</a>\n    <li><a class=active href=\"#\">Properties files</a>\n  </ul>\n</div>\n\n<article>\n<h2>Properties files mode</h2>\n<form><textarea id=\"code\" name=\"code\">\n# This is a properties file\na.key = A value\nanother.key = http://example.com\n! Exclamation mark as comment\nbut.not=Within ! A value # indeed\n   # Spaces at the beginning of a line\n   spaces.before.key=value\nbackslash=Used for multi\\\n          line entries,\\\n          that's convenient.\n# Unicode sequences\nunicode.key=This is \\u0020 Unicode\nno.multiline=here\n# Colons\ncolons : can be used too\n# Spaces\nspaces\\ in\\ keys=Not very common...\n</textarea></form>\n    <script>\n      var editor = CodeMirror.fromTextArea(document.getElementById(\"code\"), {});\n    </script>\n\n    <p><strong>MIME types defined:</strong> <code>text/x-properties</code>,\n    <code>text/x-ini</code>.</p>\n\n  </article>\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/properties/properties.js",
    "content": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n(function(mod) {\n  if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n    mod(require(\"../../lib/codemirror\"));\n  else if (typeof define == \"function\" && define.amd) // AMD\n    define([\"../../lib/codemirror\"], mod);\n  else // Plain browser env\n    mod(CodeMirror);\n})(function(CodeMirror) {\n\"use strict\";\n\nCodeMirror.defineMode(\"properties\", function() {\n  return {\n    token: function(stream, state) {\n      var sol = stream.sol() || state.afterSection;\n      var eol = stream.eol();\n\n      state.afterSection = false;\n\n      if (sol) {\n        if (state.nextMultiline) {\n          state.inMultiline = true;\n          state.nextMultiline = false;\n        } else {\n          state.position = \"def\";\n        }\n      }\n\n      if (eol && ! state.nextMultiline) {\n        state.inMultiline = false;\n        state.position = \"def\";\n      }\n\n      if (sol) {\n        while(stream.eatSpace());\n      }\n\n      var ch = stream.next();\n\n      if (sol && (ch === \"#\" || ch === \"!\" || ch === \";\")) {\n        state.position = \"comment\";\n        stream.skipToEnd();\n        return \"comment\";\n      } else if (sol && ch === \"[\") {\n        state.afterSection = true;\n        stream.skipTo(\"]\"); stream.eat(\"]\");\n        return \"header\";\n      } else if (ch === \"=\" || ch === \":\") {\n        state.position = \"quote\";\n        return null;\n      } else if (ch === \"\\\\\" && state.position === \"quote\") {\n        if (stream.next() !== \"u\") {    // u = Unicode sequence \\u1234\n          // Multiline value\n          state.nextMultiline = true;\n        }\n      }\n\n      return state.position;\n    },\n\n    startState: function() {\n      return {\n        position : \"def\",       // Current position, \"def\", \"quote\" or \"comment\"\n        nextMultiline : false,  // Is the next line multiline value\n        inMultiline : false,    // Is the current line a multiline value\n        afterSection : false    // Did we just open a section\n      };\n    }\n\n  };\n});\n\nCodeMirror.defineMIME(\"text/x-properties\", \"properties\");\nCodeMirror.defineMIME(\"text/x-ini\", \"properties\");\n\n});\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/puppet/index.html",
    "content": "<!doctype html>\n\n<title>CodeMirror: Puppet mode</title>\n<meta charset=\"utf-8\"/>\n<link rel=stylesheet href=\"../../doc/docs.css\">\n\n<link rel=\"stylesheet\" href=\"../../lib/codemirror.css\">\n<script src=\"../../lib/codemirror.js\"></script>\n<script src=\"../../addon/edit/matchbrackets.js\"></script>\n<script src=\"puppet.js\"></script>\n<style>\n      .CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}\n      .cm-s-default span.cm-arrow { color: red; }\n    </style>\n<div id=nav>\n  <a href=\"http://codemirror.net\"><h1>CodeMirror</h1><img id=logo src=\"../../doc/logo.png\"></a>\n\n  <ul>\n    <li><a href=\"../../index.html\">Home</a>\n    <li><a href=\"../../doc/manual.html\">Manual</a>\n    <li><a href=\"https://github.com/codemirror/codemirror\">Code</a>\n  </ul>\n  <ul>\n    <li><a href=\"../index.html\">Language modes</a>\n    <li><a class=active href=\"#\">Puppet</a>\n  </ul>\n</div>\n\n<article>\n<h2>Puppet mode</h2>\n<form><textarea id=\"code\" name=\"code\">\n# == Class: automysqlbackup\n#\n# Puppet module to install AutoMySQLBackup for periodic MySQL backups.\n#\n# class { 'automysqlbackup':\n#   backup_dir => '/mnt/backups',\n# }\n#\n\nclass automysqlbackup (\n  $bin_dir = $automysqlbackup::params::bin_dir,\n  $etc_dir = $automysqlbackup::params::etc_dir,\n  $backup_dir = $automysqlbackup::params::backup_dir,\n  $install_multicore = undef,\n  $config = {},\n  $config_defaults = {},\n) inherits automysqlbackup::params {\n\n# Ensure valid paths are assigned\n  validate_absolute_path($bin_dir)\n  validate_absolute_path($etc_dir)\n  validate_absolute_path($backup_dir)\n\n# Create a subdirectory in /etc for config files\n  file { $etc_dir:\n    ensure => directory,\n    owner => 'root',\n    group => 'root',\n    mode => '0750',\n  }\n\n# Create an example backup file, useful for reference\n  file { \"${etc_dir}/automysqlbackup.conf.example\":\n    ensure => file,\n    owner => 'root',\n    group => 'root',\n    mode => '0660',\n    source => 'puppet:///modules/automysqlbackup/automysqlbackup.conf',\n  }\n\n# Add files from the developer\n  file { \"${etc_dir}/AMB_README\":\n    ensure => file,\n    source => 'puppet:///modules/automysqlbackup/AMB_README',\n  }\n  file { \"${etc_dir}/AMB_LICENSE\":\n    ensure => file,\n    source => 'puppet:///modules/automysqlbackup/AMB_LICENSE',\n  }\n\n# Install the actual binary file\n  file { \"${bin_dir}/automysqlbackup\":\n    ensure => file,\n    owner => 'root',\n    group => 'root',\n    mode => '0755',\n    source => 'puppet:///modules/automysqlbackup/automysqlbackup',\n  }\n\n# Create the base backup directory\n  file { $backup_dir:\n    ensure => directory,\n    owner => 'root',\n    group => 'root',\n    mode => '0755',\n  }\n\n# If you'd like to keep your config in hiera and pass it to this class\n  if !empty($config) {\n    create_resources('automysqlbackup::backup', $config, $config_defaults)\n  }\n\n# If using RedHat family, must have the RPMforge repo's enabled\n  if $install_multicore {\n    package { ['pigz', 'pbzip2']: ensure => installed }\n  }\n\n}\n</textarea></form>\n    <script>\n      var editor = CodeMirror.fromTextArea(document.getElementById(\"code\"), {\n        mode: \"text/x-puppet\",\n        matchBrackets: true,\n        indentUnit: 4\n      });\n    </script>\n\n    <p><strong>MIME types defined:</strong> <code>text/x-puppet</code>.</p>\n\n  </article>\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/puppet/puppet.js",
    "content": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n(function(mod) {\n  if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n    mod(require(\"../../lib/codemirror\"));\n  else if (typeof define == \"function\" && define.amd) // AMD\n    define([\"../../lib/codemirror\"], mod);\n  else // Plain browser env\n    mod(CodeMirror);\n})(function(CodeMirror) {\n\"use strict\";\n\nCodeMirror.defineMode(\"puppet\", function () {\n  // Stores the words from the define method\n  var words = {};\n  // Taken, mostly, from the Puppet official variable standards regex\n  var variable_regex = /({)?([a-z][a-z0-9_]*)?((::[a-z][a-z0-9_]*)*::)?[a-zA-Z0-9_]+(})?/;\n\n  // Takes a string of words separated by spaces and adds them as\n  // keys with the value of the first argument 'style'\n  function define(style, string) {\n    var split = string.split(' ');\n    for (var i = 0; i < split.length; i++) {\n      words[split[i]] = style;\n    }\n  }\n\n  // Takes commonly known puppet types/words and classifies them to a style\n  define('keyword', 'class define site node include import inherits');\n  define('keyword', 'case if else in and elsif default or');\n  define('atom', 'false true running present absent file directory undef');\n  define('builtin', 'action augeas burst chain computer cron destination dport exec ' +\n    'file filebucket group host icmp iniface interface jump k5login limit log_level ' +\n    'log_prefix macauthorization mailalias maillist mcx mount nagios_command ' +\n    'nagios_contact nagios_contactgroup nagios_host nagios_hostdependency ' +\n    'nagios_hostescalation nagios_hostextinfo nagios_hostgroup nagios_service ' +\n    'nagios_servicedependency nagios_serviceescalation nagios_serviceextinfo ' +\n    'nagios_servicegroup nagios_timeperiod name notify outiface package proto reject ' +\n    'resources router schedule scheduled_task selboolean selmodule service source ' +\n    'sport ssh_authorized_key sshkey stage state table tidy todest toports tosource ' +\n    'user vlan yumrepo zfs zone zpool');\n\n  // After finding a start of a string ('|\") this function attempts to find the end;\n  // If a variable is encountered along the way, we display it differently when it\n  // is encapsulated in a double-quoted string.\n  function tokenString(stream, state) {\n    var current, prev, found_var = false;\n    while (!stream.eol() && (current = stream.next()) != state.pending) {\n      if (current === '$' && prev != '\\\\' && state.pending == '\"') {\n        found_var = true;\n        break;\n      }\n      prev = current;\n    }\n    if (found_var) {\n      stream.backUp(1);\n    }\n    if (current == state.pending) {\n      state.continueString = false;\n    } else {\n      state.continueString = true;\n    }\n    return \"string\";\n  }\n\n  // Main function\n  function tokenize(stream, state) {\n    // Matches one whole word\n    var word = stream.match(/[\\w]+/, false);\n    // Matches attributes (i.e. ensure => present ; 'ensure' would be matched)\n    var attribute = stream.match(/(\\s+)?\\w+\\s+=>.*/, false);\n    // Matches non-builtin resource declarations\n    // (i.e. \"apache::vhost {\" or \"mycustomclasss {\" would be matched)\n    var resource = stream.match(/(\\s+)?[\\w:_]+(\\s+)?{/, false);\n    // Matches virtual and exported resources (i.e. @@user { ; and the like)\n    var special_resource = stream.match(/(\\s+)?[@]{1,2}[\\w:_]+(\\s+)?{/, false);\n\n    // Finally advance the stream\n    var ch = stream.next();\n\n    // Have we found a variable?\n    if (ch === '$') {\n      if (stream.match(variable_regex)) {\n        // If so, and its in a string, assign it a different color\n        return state.continueString ? 'variable-2' : 'variable';\n      }\n      // Otherwise return an invalid variable\n      return \"error\";\n    }\n    // Should we still be looking for the end of a string?\n    if (state.continueString) {\n      // If so, go through the loop again\n      stream.backUp(1);\n      return tokenString(stream, state);\n    }\n    // Are we in a definition (class, node, define)?\n    if (state.inDefinition) {\n      // If so, return def (i.e. for 'class myclass {' ; 'myclass' would be matched)\n      if (stream.match(/(\\s+)?[\\w:_]+(\\s+)?/)) {\n        return 'def';\n      }\n      // Match the rest it the next time around\n      stream.match(/\\s+{/);\n      state.inDefinition = false;\n    }\n    // Are we in an 'include' statement?\n    if (state.inInclude) {\n      // Match and return the included class\n      stream.match(/(\\s+)?\\S+(\\s+)?/);\n      state.inInclude = false;\n      return 'def';\n    }\n    // Do we just have a function on our hands?\n    // In 'ensure_resource(\"myclass\")', 'ensure_resource' is matched\n    if (stream.match(/(\\s+)?\\w+\\(/)) {\n      stream.backUp(1);\n      return 'def';\n    }\n    // Have we matched the prior attribute regex?\n    if (attribute) {\n      stream.match(/(\\s+)?\\w+/);\n      return 'tag';\n    }\n    // Do we have Puppet specific words?\n    if (word && words.hasOwnProperty(word)) {\n      // Negates the initial next()\n      stream.backUp(1);\n      // Acutally move the stream\n      stream.match(/[\\w]+/);\n      // We want to process these words differently\n      // do to the importance they have in Puppet\n      if (stream.match(/\\s+\\S+\\s+{/, false)) {\n        state.inDefinition = true;\n      }\n      if (word == 'include') {\n        state.inInclude = true;\n      }\n      // Returns their value as state in the prior define methods\n      return words[word];\n    }\n    // Is there a match on a reference?\n    if (/(^|\\s+)[A-Z][\\w:_]+/.test(word)) {\n      // Negate the next()\n      stream.backUp(1);\n      // Match the full reference\n      stream.match(/(^|\\s+)[A-Z][\\w:_]+/);\n      return 'def';\n    }\n    // Have we matched the prior resource regex?\n    if (resource) {\n      stream.match(/(\\s+)?[\\w:_]+/);\n      return 'def';\n    }\n    // Have we matched the prior special_resource regex?\n    if (special_resource) {\n      stream.match(/(\\s+)?[@]{1,2}/);\n      return 'special';\n    }\n    // Match all the comments. All of them.\n    if (ch == \"#\") {\n      stream.skipToEnd();\n      return \"comment\";\n    }\n    // Have we found a string?\n    if (ch == \"'\" || ch == '\"') {\n      // Store the type (single or double)\n      state.pending = ch;\n      // Perform the looping function to find the end\n      return tokenString(stream, state);\n    }\n    // Match all the brackets\n    if (ch == '{' || ch == '}') {\n      return 'bracket';\n    }\n    // Match characters that we are going to assume\n    // are trying to be regex\n    if (ch == '/') {\n      stream.match(/.*?\\//);\n      return 'variable-3';\n    }\n    // Match all the numbers\n    if (ch.match(/[0-9]/)) {\n      stream.eatWhile(/[0-9]+/);\n      return 'number';\n    }\n    // Match the '=' and '=>' operators\n    if (ch == '=') {\n      if (stream.peek() == '>') {\n          stream.next();\n      }\n      return \"operator\";\n    }\n    // Keep advancing through all the rest\n    stream.eatWhile(/[\\w-]/);\n    // Return a blank line for everything else\n    return null;\n  }\n  // Start it all\n  return {\n    startState: function () {\n      var state = {};\n      state.inDefinition = false;\n      state.inInclude = false;\n      state.continueString = false;\n      state.pending = false;\n      return state;\n    },\n    token: function (stream, state) {\n      // Strip the spaces, but regex will account for them eitherway\n      if (stream.eatSpace()) return null;\n      // Go through the main process\n      return tokenize(stream, state);\n    }\n  };\n});\n\nCodeMirror.defineMIME(\"text/x-puppet\", \"puppet\");\n\n});\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/python/index.html",
    "content": "<!doctype html>\n\n<title>CodeMirror: Python mode</title>\n<meta charset=\"utf-8\"/>\n<link rel=stylesheet href=\"../../doc/docs.css\">\n\n<link rel=\"stylesheet\" href=\"../../lib/codemirror.css\">\n<script src=\"../../lib/codemirror.js\"></script>\n<script src=\"../../addon/edit/matchbrackets.js\"></script>\n<script src=\"python.js\"></script>\n<style type=\"text/css\">.CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}</style>\n<div id=nav>\n  <a href=\"http://codemirror.net\"><h1>CodeMirror</h1><img id=logo src=\"../../doc/logo.png\"></a>\n\n  <ul>\n    <li><a href=\"../../index.html\">Home</a>\n    <li><a href=\"../../doc/manual.html\">Manual</a>\n    <li><a href=\"https://github.com/codemirror/codemirror\">Code</a>\n  </ul>\n  <ul>\n    <li><a href=\"../index.html\">Language modes</a>\n    <li><a class=active href=\"#\">Python</a>\n  </ul>\n</div>\n\n<article>\n<h2>Python mode</h2>\n\n    <div><textarea id=\"code\" name=\"code\">\n# Literals\n1234\n0.0e101\n.123\n0b01010011100\n0o01234567\n0x0987654321abcdef\n7\n2147483647\n3L\n79228162514264337593543950336L\n0x100000000L\n79228162514264337593543950336\n0xdeadbeef\n3.14j\n10.j\n10j\n.001j\n1e100j\n3.14e-10j\n\n\n# String Literals\n'For\\''\n\"God\\\"\"\n\"\"\"so loved\nthe world\"\"\"\n'''that he gave\nhis only begotten\\' '''\n'that whosoever believeth \\\nin him'\n''\n\n# Identifiers\n__a__\na.b\na.b.c\n\n#Unicode identifiers on Python3\n# a = x\\ddot\na⃗ = ẍ\n# a = v\\dot\na⃗ = v̇\n\n#F\\vec = m \\cdot a\\vec\nF⃗ = m•a⃗ \n\n# Operators\n+ - * / % & | ^ ~ < >\n== != <= >= <> << >> // **\nand or not in is\n\n#infix matrix multiplication operator (PEP 465)\nA @ B\n\n# Delimiters\n() [] {} , : ` = ; @ .  # Note that @ and . require the proper context on Python 2.\n+= -= *= /= %= &= |= ^=\n//= >>= <<= **=\n\n# Keywords\nas assert break class continue def del elif else except\nfinally for from global if import lambda pass raise\nreturn try while with yield\n\n# Python 2 Keywords (otherwise Identifiers)\nexec print\n\n# Python 3 Keywords (otherwise Identifiers)\nnonlocal\n\n# Types\nbool classmethod complex dict enumerate float frozenset int list object\nproperty reversed set slice staticmethod str super tuple type\n\n# Python 2 Types (otherwise Identifiers)\nbasestring buffer file long unicode xrange\n\n# Python 3 Types (otherwise Identifiers)\nbytearray bytes filter map memoryview open range zip\n\n# Some Example code\nimport os\nfrom package import ParentClass\n\n@nonsenseDecorator\ndef doesNothing():\n    pass\n\nclass ExampleClass(ParentClass):\n    @staticmethod\n    def example(inputStr):\n        a = list(inputStr)\n        a.reverse()\n        return ''.join(a)\n\n    def __init__(self, mixin = 'Hello'):\n        self.mixin = mixin\n\n</textarea></div>\n\n\n<h2>Cython mode</h2>\n\n<div><textarea id=\"code-cython\" name=\"code-cython\">\n\nimport numpy as np\ncimport cython\nfrom libc.math cimport sqrt\n\n@cython.boundscheck(False)\n@cython.wraparound(False)\ndef pairwise_cython(double[:, ::1] X):\n    cdef int M = X.shape[0]\n    cdef int N = X.shape[1]\n    cdef double tmp, d\n    cdef double[:, ::1] D = np.empty((M, M), dtype=np.float64)\n    for i in range(M):\n        for j in range(M):\n            d = 0.0\n            for k in range(N):\n                tmp = X[i, k] - X[j, k]\n                d += tmp * tmp\n            D[i, j] = sqrt(d)\n    return np.asarray(D)\n\n</textarea></div>\n\n    <script>\n      var editor = CodeMirror.fromTextArea(document.getElementById(\"code\"), {\n        mode: {name: \"python\",\n               version: 3,\n               singleLineStringErrors: false},\n        lineNumbers: true,\n        indentUnit: 4,\n        matchBrackets: true\n    });\n\n    CodeMirror.fromTextArea(document.getElementById(\"code-cython\"), {\n        mode: {name: \"text/x-cython\",\n               version: 2,\n               singleLineStringErrors: false},\n        lineNumbers: true,\n        indentUnit: 4,\n        matchBrackets: true\n      });\n    </script>\n    <h2>Configuration Options for Python mode:</h2>\n    <ul>\n      <li>version - 2/3 - The version of Python to recognize.  Default is 2.</li>\n      <li>singleLineStringErrors - true/false - If you have a single-line string that is not terminated at the end of the line, this will show subsequent lines as errors if true, otherwise it will consider the newline as the end of the string. Default is false.</li>\n      <li>hangingIndent - int - If you want to write long arguments to a function starting on a new line, how much that line should be indented. Defaults to one normal indentation unit.</li>\n    </ul>\n    <h2>Advanced Configuration Options:</h2>\n    <p>Usefull for superset of python syntax like Enthought enaml, IPython magics and  questionmark help</p>\n    <ul>\n      <li>singleOperators - RegEx - Regular Expression for single operator matching,  default : <pre>^[\\\\+\\\\-\\\\*/%&amp;|\\\\^~&lt;&gt;!]</pre> including <pre>@</pre> on Python 3</li>\n      <li>singleDelimiters - RegEx - Regular Expression for single delimiter matching, default :  <pre>^[\\\\(\\\\)\\\\[\\\\]\\\\{\\\\}@,:`=;\\\\.]</pre></li>\n      <li>doubleOperators - RegEx - Regular Expression for double operators matching, default : <pre>^((==)|(!=)|(&lt;=)|(&gt;=)|(&lt;&gt;)|(&lt;&lt;)|(&gt;&gt;)|(//)|(\\\\*\\\\*))</pre></li>\n      <li>doubleDelimiters - RegEx - Regular Expressoin for double delimiters matching, default : <pre>^((\\\\+=)|(\\\\-=)|(\\\\*=)|(%=)|(/=)|(&amp;=)|(\\\\|=)|(\\\\^=))</pre></li>\n      <li>tripleDelimiters - RegEx - Regular Expression for triple delimiters matching, default : <pre>^((//=)|(&gt;&gt;=)|(&lt;&lt;=)|(\\\\*\\\\*=))</pre></li>\n      <li>identifiers - RegEx - Regular Expression for identifier, default : <pre>^[_A-Za-z][_A-Za-z0-9]*</pre> on Python 2 and <pre>^[_A-Za-z\\u00A1-\\uFFFF][_A-Za-z0-9\\u00A1-\\uFFFF]*</pre> on Python 3.</li>\n      <li>extra_keywords - list of string - List of extra words ton consider as keywords</li>\n      <li>extra_builtins - list of string - List of extra words ton consider as builtins</li>\n    </ul>\n\n\n    <p><strong>MIME types defined:</strong> <code>text/x-python</code> and <code>text/x-cython</code>.</p>\n  </article>\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/python/python.js",
    "content": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n(function(mod) {\n  if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n    mod(require(\"../../lib/codemirror\"));\n  else if (typeof define == \"function\" && define.amd) // AMD\n    define([\"../../lib/codemirror\"], mod);\n  else // Plain browser env\n    mod(CodeMirror);\n})(function(CodeMirror) {\n  \"use strict\";\n\n  function wordRegexp(words) {\n    return new RegExp(\"^((\" + words.join(\")|(\") + \"))\\\\b\");\n  }\n\n  var wordOperators = wordRegexp([\"and\", \"or\", \"not\", \"is\"]);\n  var commonKeywords = [\"as\", \"assert\", \"break\", \"class\", \"continue\",\n                        \"def\", \"del\", \"elif\", \"else\", \"except\", \"finally\",\n                        \"for\", \"from\", \"global\", \"if\", \"import\",\n                        \"lambda\", \"pass\", \"raise\", \"return\",\n                        \"try\", \"while\", \"with\", \"yield\", \"in\"];\n  var commonBuiltins = [\"abs\", \"all\", \"any\", \"bin\", \"bool\", \"bytearray\", \"callable\", \"chr\",\n                        \"classmethod\", \"compile\", \"complex\", \"delattr\", \"dict\", \"dir\", \"divmod\",\n                        \"enumerate\", \"eval\", \"filter\", \"float\", \"format\", \"frozenset\",\n                        \"getattr\", \"globals\", \"hasattr\", \"hash\", \"help\", \"hex\", \"id\",\n                        \"input\", \"int\", \"isinstance\", \"issubclass\", \"iter\", \"len\",\n                        \"list\", \"locals\", \"map\", \"max\", \"memoryview\", \"min\", \"next\",\n                        \"object\", \"oct\", \"open\", \"ord\", \"pow\", \"property\", \"range\",\n                        \"repr\", \"reversed\", \"round\", \"set\", \"setattr\", \"slice\",\n                        \"sorted\", \"staticmethod\", \"str\", \"sum\", \"super\", \"tuple\",\n                        \"type\", \"vars\", \"zip\", \"__import__\", \"NotImplemented\",\n                        \"Ellipsis\", \"__debug__\"];\n  var py2 = {builtins: [\"apply\", \"basestring\", \"buffer\", \"cmp\", \"coerce\", \"execfile\",\n                        \"file\", \"intern\", \"long\", \"raw_input\", \"reduce\", \"reload\",\n                        \"unichr\", \"unicode\", \"xrange\", \"False\", \"True\", \"None\"],\n             keywords: [\"exec\", \"print\"]};\n  var py3 = {builtins: [\"ascii\", \"bytes\", \"exec\", \"print\"],\n             keywords: [\"nonlocal\", \"False\", \"True\", \"None\"]};\n\n  CodeMirror.registerHelper(\"hintWords\", \"python\", commonKeywords.concat(commonBuiltins));\n\n  function top(state) {\n    return state.scopes[state.scopes.length - 1];\n  }\n\n  CodeMirror.defineMode(\"python\", function(conf, parserConf) {\n    var ERRORCLASS = \"error\";\n\n    var singleDelimiters = parserConf.singleDelimiters || new RegExp(\"^[\\\\(\\\\)\\\\[\\\\]\\\\{\\\\}@,:`=;\\\\.]\");\n    var doubleOperators = parserConf.doubleOperators || new RegExp(\"^((==)|(!=)|(<=)|(>=)|(<>)|(<<)|(>>)|(//)|(\\\\*\\\\*))\");\n    var doubleDelimiters = parserConf.doubleDelimiters || new RegExp(\"^((\\\\+=)|(\\\\-=)|(\\\\*=)|(%=)|(/=)|(&=)|(\\\\|=)|(\\\\^=))\");\n    var tripleDelimiters = parserConf.tripleDelimiters || new RegExp(\"^((//=)|(>>=)|(<<=)|(\\\\*\\\\*=))\");\n\n    if (parserConf.version && parseInt(parserConf.version, 10) == 3){\n        // since http://legacy.python.org/dev/peps/pep-0465/ @ is also an operator\n        var singleOperators = parserConf.singleOperators || new RegExp(\"^[\\\\+\\\\-\\\\*/%&|\\\\^~<>!@]\");\n        var identifiers = parserConf.identifiers|| new RegExp(\"^[_A-Za-z\\u00A1-\\uFFFF][_A-Za-z0-9\\u00A1-\\uFFFF]*\");\n    } else {\n        var singleOperators = parserConf.singleOperators || new RegExp(\"^[\\\\+\\\\-\\\\*/%&|\\\\^~<>!]\");\n        var identifiers = parserConf.identifiers|| new RegExp(\"^[_A-Za-z][_A-Za-z0-9]*\");\n    }\n\n    var hangingIndent = parserConf.hangingIndent || conf.indentUnit;\n\n    var myKeywords = commonKeywords, myBuiltins = commonBuiltins;\n    if(parserConf.extra_keywords != undefined){\n      myKeywords = myKeywords.concat(parserConf.extra_keywords);\n    }\n    if(parserConf.extra_builtins != undefined){\n      myBuiltins = myBuiltins.concat(parserConf.extra_builtins);\n    }\n    if (parserConf.version && parseInt(parserConf.version, 10) == 3) {\n      myKeywords = myKeywords.concat(py3.keywords);\n      myBuiltins = myBuiltins.concat(py3.builtins);\n      var stringPrefixes = new RegExp(\"^(([rb]|(br))?('{3}|\\\"{3}|['\\\"]))\", \"i\");\n    } else {\n      myKeywords = myKeywords.concat(py2.keywords);\n      myBuiltins = myBuiltins.concat(py2.builtins);\n      var stringPrefixes = new RegExp(\"^(([rub]|(ur)|(br))?('{3}|\\\"{3}|['\\\"]))\", \"i\");\n    }\n    var keywords = wordRegexp(myKeywords);\n    var builtins = wordRegexp(myBuiltins);\n\n    // tokenizers\n    function tokenBase(stream, state) {\n      // Handle scope changes\n      if (stream.sol() && top(state).type == \"py\") {\n        var scopeOffset = top(state).offset;\n        if (stream.eatSpace()) {\n          var lineOffset = stream.indentation();\n          if (lineOffset > scopeOffset)\n            pushScope(stream, state, \"py\");\n          else if (lineOffset < scopeOffset && dedent(stream, state))\n            state.errorToken = true;\n          return null;\n        } else {\n          var style = tokenBaseInner(stream, state);\n          if (scopeOffset > 0 && dedent(stream, state))\n            style += \" \" + ERRORCLASS;\n          return style;\n        }\n      }\n      return tokenBaseInner(stream, state);\n    }\n\n    function tokenBaseInner(stream, state) {\n      if (stream.eatSpace()) return null;\n\n      var ch = stream.peek();\n\n      // Handle Comments\n      if (ch == \"#\") {\n        stream.skipToEnd();\n        return \"comment\";\n      }\n\n      // Handle Number Literals\n      if (stream.match(/^[0-9\\.]/, false)) {\n        var floatLiteral = false;\n        // Floats\n        if (stream.match(/^\\d*\\.\\d+(e[\\+\\-]?\\d+)?/i)) { floatLiteral = true; }\n        if (stream.match(/^\\d+\\.\\d*/)) { floatLiteral = true; }\n        if (stream.match(/^\\.\\d+/)) { floatLiteral = true; }\n        if (floatLiteral) {\n          // Float literals may be \"imaginary\"\n          stream.eat(/J/i);\n          return \"number\";\n        }\n        // Integers\n        var intLiteral = false;\n        // Hex\n        if (stream.match(/^0x[0-9a-f]+/i)) intLiteral = true;\n        // Binary\n        if (stream.match(/^0b[01]+/i)) intLiteral = true;\n        // Octal\n        if (stream.match(/^0o[0-7]+/i)) intLiteral = true;\n        // Decimal\n        if (stream.match(/^[1-9]\\d*(e[\\+\\-]?\\d+)?/)) {\n          // Decimal literals may be \"imaginary\"\n          stream.eat(/J/i);\n          // TODO - Can you have imaginary longs?\n          intLiteral = true;\n        }\n        // Zero by itself with no other piece of number.\n        if (stream.match(/^0(?![\\dx])/i)) intLiteral = true;\n        if (intLiteral) {\n          // Integer literals may be \"long\"\n          stream.eat(/L/i);\n          return \"number\";\n        }\n      }\n\n      // Handle Strings\n      if (stream.match(stringPrefixes)) {\n        state.tokenize = tokenStringFactory(stream.current());\n        return state.tokenize(stream, state);\n      }\n\n      // Handle operators and Delimiters\n      if (stream.match(tripleDelimiters) || stream.match(doubleDelimiters))\n        return null;\n\n      if (stream.match(doubleOperators)\n          || stream.match(singleOperators)\n          || stream.match(wordOperators))\n        return \"operator\";\n\n      if (stream.match(singleDelimiters))\n        return null;\n\n      if (stream.match(keywords))\n        return \"keyword\";\n\n      if (stream.match(builtins))\n        return \"builtin\";\n\n      if (stream.match(/^(self|cls)\\b/))\n        return \"variable-2\";\n\n      if (stream.match(identifiers)) {\n        if (state.lastToken == \"def\" || state.lastToken == \"class\")\n          return \"def\";\n        return \"variable\";\n      }\n\n      // Handle non-detected items\n      stream.next();\n      return ERRORCLASS;\n    }\n\n    function tokenStringFactory(delimiter) {\n      while (\"rub\".indexOf(delimiter.charAt(0).toLowerCase()) >= 0)\n        delimiter = delimiter.substr(1);\n\n      var singleline = delimiter.length == 1;\n      var OUTCLASS = \"string\";\n\n      function tokenString(stream, state) {\n        while (!stream.eol()) {\n          stream.eatWhile(/[^'\"\\\\]/);\n          if (stream.eat(\"\\\\\")) {\n            stream.next();\n            if (singleline && stream.eol())\n              return OUTCLASS;\n          } else if (stream.match(delimiter)) {\n            state.tokenize = tokenBase;\n            return OUTCLASS;\n          } else {\n            stream.eat(/['\"]/);\n          }\n        }\n        if (singleline) {\n          if (parserConf.singleLineStringErrors)\n            return ERRORCLASS;\n          else\n            state.tokenize = tokenBase;\n        }\n        return OUTCLASS;\n      }\n      tokenString.isString = true;\n      return tokenString;\n    }\n\n    function pushScope(stream, state, type) {\n      var offset = 0, align = null;\n      if (type == \"py\") {\n        while (top(state).type != \"py\")\n          state.scopes.pop();\n      }\n      offset = top(state).offset + (type == \"py\" ? conf.indentUnit : hangingIndent);\n      if (type != \"py\" && !stream.match(/^(\\s|#.*)*$/, false))\n        align = stream.column() + 1;\n      state.scopes.push({offset: offset, type: type, align: align});\n    }\n\n    function dedent(stream, state) {\n      var indented = stream.indentation();\n      while (top(state).offset > indented) {\n        if (top(state).type != \"py\") return true;\n        state.scopes.pop();\n      }\n      return top(state).offset != indented;\n    }\n\n    function tokenLexer(stream, state) {\n      var style = state.tokenize(stream, state);\n      var current = stream.current();\n\n      // Handle '.' connected identifiers\n      if (current == \".\") {\n        style = stream.match(identifiers, false) ? null : ERRORCLASS;\n        if (style == null && state.lastStyle == \"meta\") {\n          // Apply 'meta' style to '.' connected identifiers when\n          // appropriate.\n          style = \"meta\";\n        }\n        return style;\n      }\n\n      // Handle decorators\n      if (current == \"@\"){\n        if(parserConf.version && parseInt(parserConf.version, 10) == 3){\n            return stream.match(identifiers, false) ? \"meta\" : \"operator\";\n        } else {\n            return stream.match(identifiers, false) ? \"meta\" : ERRORCLASS;\n        }\n      }\n\n      if ((style == \"variable\" || style == \"builtin\")\n          && state.lastStyle == \"meta\")\n        style = \"meta\";\n\n      // Handle scope changes.\n      if (current == \"pass\" || current == \"return\")\n        state.dedent += 1;\n\n      if (current == \"lambda\") state.lambda = true;\n      if (current == \":\" && !state.lambda && top(state).type == \"py\")\n        pushScope(stream, state, \"py\");\n\n      var delimiter_index = current.length == 1 ? \"[({\".indexOf(current) : -1;\n      if (delimiter_index != -1)\n        pushScope(stream, state, \"])}\".slice(delimiter_index, delimiter_index+1));\n\n      delimiter_index = \"])}\".indexOf(current);\n      if (delimiter_index != -1) {\n        if (top(state).type == current) state.scopes.pop();\n        else return ERRORCLASS;\n      }\n      if (state.dedent > 0 && stream.eol() && top(state).type == \"py\") {\n        if (state.scopes.length > 1) state.scopes.pop();\n        state.dedent -= 1;\n      }\n\n      return style;\n    }\n\n    var external = {\n      startState: function(basecolumn) {\n        return {\n          tokenize: tokenBase,\n          scopes: [{offset: basecolumn || 0, type: \"py\", align: null}],\n          lastStyle: null,\n          lastToken: null,\n          lambda: false,\n          dedent: 0\n        };\n      },\n\n      token: function(stream, state) {\n        var addErr = state.errorToken;\n        if (addErr) state.errorToken = false;\n        var style = tokenLexer(stream, state);\n\n        state.lastStyle = style;\n\n        var current = stream.current();\n        if (current && style)\n          state.lastToken = current;\n\n        if (stream.eol() && state.lambda)\n          state.lambda = false;\n        return addErr ? style + \" \" + ERRORCLASS : style;\n      },\n\n      indent: function(state, textAfter) {\n        if (state.tokenize != tokenBase)\n          return state.tokenize.isString ? CodeMirror.Pass : 0;\n\n        var scope = top(state);\n        var closing = textAfter && textAfter.charAt(0) == scope.type;\n        if (scope.align != null)\n          return scope.align - (closing ? 1 : 0);\n        else if (closing && state.scopes.length > 1)\n          return state.scopes[state.scopes.length - 2].offset;\n        else\n          return scope.offset;\n      },\n\n      lineComment: \"#\",\n      fold: \"indent\"\n    };\n    return external;\n  });\n\n  CodeMirror.defineMIME(\"text/x-python\", \"python\");\n\n  var words = function(str) { return str.split(\" \"); };\n\n  CodeMirror.defineMIME(\"text/x-cython\", {\n    name: \"python\",\n    extra_keywords: words(\"by cdef cimport cpdef ctypedef enum except\"+\n                          \"extern gil include nogil property public\"+\n                          \"readonly struct union DEF IF ELIF ELSE\")\n  });\n\n});\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/q/index.html",
    "content": "<!doctype html>\n\n<title>CodeMirror: Q mode</title>\n<meta charset=\"utf-8\"/>\n<link rel=stylesheet href=\"../../doc/docs.css\">\n\n<link rel=\"stylesheet\" href=\"../../lib/codemirror.css\">\n<script src=\"../../lib/codemirror.js\"></script>\n<script src=\"../../addon/edit/matchbrackets.js\"></script>\n<script src=\"q.js\"></script>\n<style type=\"text/css\">.CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}</style>\n<div id=nav>\n  <a href=\"http://codemirror.net\"><h1>CodeMirror</h1><img id=logo src=\"../../doc/logo.png\"></a>\n\n  <ul>\n    <li><a href=\"../../index.html\">Home</a>\n    <li><a href=\"../../doc/manual.html\">Manual</a>\n    <li><a href=\"https://github.com/codemirror/codemirror\">Code</a>\n  </ul>\n  <ul>\n    <li><a href=\"../index.html\">Language modes</a>\n    <li><a class=active href=\"#\">Q</a>\n  </ul>\n</div>\n\n<article>\n<h2>Q mode</h2>\n\n\n<div><textarea id=\"code\" name=\"code\">\n/ utilities to quickly load a csv file - for more exhaustive analysis of the csv contents see csvguess.q\n/ 2009.09.20 - updated to match latest csvguess.q \n\n/ .csv.colhdrs[file] - return a list of colhdrs from file\n/ info:.csv.info[file] - return a table of information about the file\n/ columns are: \n/\tc - column name; ci - column index; t - load type; mw - max width; \n/\tdchar - distinct characters in values; rule - rule that caught the type\n/\tmaybe - needs checking, _could_ be say a date, but perhaps just a float?\n/ .csv.info0[file;onlycols] - like .csv.info except that it only analyses <onlycols>\n/ example:\n/\tinfo:.csv.info0[file;(.csv.colhdrs file)like\"*price\"]\n/\tinfo:.csv.infolike[file;\"*price\"]\n/\tshow delete from info where t=\" \"\n/ .csv.data[file;info] - use the info from .csv.info to read the data\n/ .csv.data10[file;info] - like .csv.data but only returns the first 10 rows\n/ bulkload[file;info] - bulk loads file into table DATA (which must be already defined :: DATA:() )\n/ .csv.read[file]/read10[file] - for when you don't care about checking/tweaking the <info> before reading \n\n\\d .csv\nDELIM:\",\"\nZAPHDRS:0b / lowercase and remove _ from colhdrs (junk characters are always removed)\nWIDTHHDR:25000 / number of characters read to get the header\nREADLINES:222 / number of lines read and used to guess the types\nSYMMAXWIDTH:11 / character columns narrower than this are stored as symbols\nSYMMAXGR:10 / max symbol granularity% before we give up and keep as a * string\nFORCECHARWIDTH:30 / every field (of any type) with values this wide or more is forced to character \"*\"\nDISCARDEMPTY:0b / completely ignore empty columns if true else set them to \"C\"\nCHUNKSIZE:50000000 / used in fs2 (modified .Q.fs)\n\nk)nameltrim:{$[~@x;.z.s'x;~(*x)in aA:.Q.a,.Q.A;(+/&\\~x in aA)_x;x]}\nk)fs2:{[f;s]((-7!s)>){[f;s;x]i:1+last@&0xa=r:1:(s;x;CHUNKSIZE);f@`\\:i#r;x+i}[f;s]/0j}\ncleanhdrs:{{$[ZAPHDRS;lower x except\"_\";x]}x where x in DELIM,.Q.an}\ncancast:{nw:x$\"\";if[not x in\"BXCS\";nw:(min 0#;max 0#;::)@\\:nw];$[not any nw in x$(11&count y)#y;$[11<count y;not any nw in x$y;1b];0b]}\n\nread:{[file]data[file;info[file]]}  \nread10:{[file]data10[file;info[file]]}  \n\ncolhdrs:{[file]\n\t`$nameltrim DELIM vs cleanhdrs first read0(file;0;1+first where 0xa=read1(file;0;WIDTHHDR))}\ndata:{[file;info]\n\t(exec c from info where not t=\" \")xcol(exec t from info;enlist DELIM)0:file}\ndata10:{[file;info]\n\tdata[;info](file;0;1+last 11#where 0xa=read1(file;0;15*WIDTHHDR))}\ninfo0:{[file;onlycols]\n\tcolhdrs:`$nameltrim DELIM vs cleanhdrs first head:read0(file;0;1+last where 0xa=read1(file;0;WIDTHHDR));\n\tloadfmts:(count colhdrs)#\"S\";if[count onlycols;loadfmts[where not colhdrs in onlycols]:\"C\"];\n\tbreaks:where 0xa=read1(file;0;floor(10+READLINES)*WIDTHHDR%count head);\n\tnas:count as:colhdrs xcol(loadfmts;enlist DELIM)0:(file;0;1+last((1+READLINES)&count breaks)#breaks);\n\tinfo:([]c:key flip as;v:value flip as);as:();\n\treserved:key`.q;reserved,:.Q.res;reserved,:`i;\n\tinfo:update res:c in reserved from info;\n\tinfo:update ci:i,t:\"?\",ipa:0b,mdot:0,mw:0,rule:0,gr:0,ndv:0,maybe:0b,empty:0b,j10:0b,j12:0b from info;\n\tinfo:update ci:`s#ci from info;\n\tif[count onlycols;info:update t:\" \",rule:10 from info where not c in onlycols];\n\tinfo:update sdv:{string(distinct x)except`}peach v from info; \n\tinfo:update ndv:count each sdv from info;\n\tinfo:update gr:floor 0.5+100*ndv%nas,mw:{max count each x}peach sdv from info where 0<ndv;\n\tinfo:update t:\"*\",rule:20 from info where mw>.csv.FORCECHARWIDTH; / long values\n\tinfo:update t:\"C \"[.csv.DISCARDEMPTY],rule:30,empty:1b from info where t=\"?\",mw=0; / empty columns\n\tinfo:update dchar:{asc distinct raze x}peach sdv from info where t=\"?\";\n\tinfo:update mdot:{max sum each\".\"=x}peach sdv from info where t=\"?\",{\".\"in x}each dchar;\n\tinfo:update t:\"n\",rule:40 from info where t=\"?\",{any x in\"0123456789\"}each dchar; / vaguely numeric..\n\tinfo:update t:\"I\",rule:50,ipa:1b from info where t=\"n\",mw within 7 15,mdot=3,{all x in\".0123456789\"}each dchar,.csv.cancast[\"I\"]peach sdv; / ip-address\n\tinfo:update t:\"J\",rule:60 from info where t=\"n\",mdot=0,{all x in\"+-0123456789\"}each dchar,.csv.cancast[\"J\"]peach sdv;\n\tinfo:update t:\"I\",rule:70 from info where t=\"J\",mw<12,.csv.cancast[\"I\"]peach sdv;\n\tinfo:update t:\"H\",rule:80 from info where t=\"I\",mw<7,.csv.cancast[\"H\"]peach sdv;\n\tinfo:update t:\"F\",rule:90 from info where t=\"n\",mdot<2,mw>1,.csv.cancast[\"F\"]peach sdv;\n\tinfo:update t:\"E\",rule:100,maybe:1b from info where t=\"F\",mw<9;\n\tinfo:update t:\"M\",rule:110,maybe:1b from info where t in\"nIHEF\",mdot<2,mw within 4 7,.csv.cancast[\"M\"]peach sdv; \n\tinfo:update t:\"D\",rule:120,maybe:1b from info where t in\"nI\",mdot in 0 2,mw within 6 11,.csv.cancast[\"D\"]peach sdv; \n\tinfo:update t:\"V\",rule:130,maybe:1b from info where t=\"I\",mw in 5 6,7<count each dchar,{all x like\"*[0-9][0-5][0-9][0-5][0-9]\"}peach sdv,.csv.cancast[\"V\"]peach sdv; / 235959 12345        \n\tinfo:update t:\"U\",rule:140,maybe:1b from info where t=\"H\",mw in 3 4,7<count each dchar,{all x like\"*[0-9][0-5][0-9]\"}peach sdv,.csv.cancast[\"U\"]peach sdv; /2359\n\tinfo:update t:\"U\",rule:150,maybe:0b from info where t=\"n\",mw in 4 5,mdot=0,{all x like\"*[0-9]:[0-5][0-9]\"}peach sdv,.csv.cancast[\"U\"]peach sdv;\n\tinfo:update t:\"T\",rule:160,maybe:0b from info where t=\"n\",mw within 7 12,mdot<2,{all x like\"*[0-9]:[0-5][0-9]:[0-5][0-9]*\"}peach sdv,.csv.cancast[\"T\"]peach sdv;\n\tinfo:update t:\"V\",rule:170,maybe:0b from info where t=\"T\",mw in 7 8,mdot=0,.csv.cancast[\"V\"]peach sdv;\n\tinfo:update t:\"T\",rule:180,maybe:1b from info where t in\"EF\",mw within 7 10,mdot=1,{all x like\"*[0-9][0-5][0-9][0-5][0-9].*\"}peach sdv,.csv.cancast[\"T\"]peach sdv;\n\tinfo:update t:\"Z\",rule:190,maybe:0b from info where t=\"n\",mw within 11 24,mdot<4,.csv.cancast[\"Z\"]peach sdv;\n\tinfo:update t:\"P\",rule:200,maybe:1b from info where t=\"n\",mw within 12 29,mdot<4,{all x like\"[12]*\"}peach sdv,.csv.cancast[\"P\"]peach sdv;\n\tinfo:update t:\"N\",rule:210,maybe:1b from info where t=\"n\",mw within 3 28,mdot=1,.csv.cancast[\"N\"]peach sdv;\n\tinfo:update t:\"?\",rule:220,maybe:0b from info where t=\"n\"; / reset remaining maybe numeric\n\tinfo:update t:\"C\",rule:230,maybe:0b from info where t=\"?\",mw=1; / char\n\tinfo:update t:\"B\",rule:240,maybe:0b from info where t in\"HC\",mw=1,mdot=0,{$[all x in\"01tTfFyYnN\";(any\"0fFnN\"in x)and any\"1tTyY\"in x;0b]}each dchar; / boolean\n\tinfo:update t:\"B\",rule:250,maybe:1b from info where t in\"HC\",mw=1,mdot=0,{all x in\"01tTfFyYnN\"}each dchar; / boolean\n\tinfo:update t:\"X\",rule:260,maybe:0b from info where t=\"?\",mw=2,{$[all x in\"0123456789abcdefABCDEF\";(any .Q.n in x)and any\"abcdefABCDEF\"in x;0b]}each dchar; /hex\n\tinfo:update t:\"S\",rule:270,maybe:1b from info where t=\"?\",mw<.csv.SYMMAXWIDTH,mw>1,gr<.csv.SYMMAXGR; / symbols (max width permitting)\n\tinfo:update t:\"*\",rule:280,maybe:0b from info where t=\"?\"; / the rest as strings\n\t/ flag those S/* columns which could be encoded to integers (.Q.j10/x10/j12/x12) to avoid symbols\n\tinfo:update j12:1b from info where t in\"S*\",mw<13,{all x in .Q.nA}each dchar;\n\tinfo:update j10:1b from info where t in\"S*\",mw<11,{all x in .Q.b6}each dchar; \n\tselect c,ci,t,maybe,empty,res,j10,j12,ipa,mw,mdot,rule,gr,ndv,dchar from info}\ninfo:info0[;()] / by default don't restrict columns\ninfolike:{[file;pattern] info0[file;{x where x like y}[lower colhdrs[file];pattern]]} / .csv.infolike[file;\"*time\"]\n\n\\d .\n/ DATA:()\nbulkload:{[file;info]\n\tif[not`DATA in system\"v\";'`DATA.not.defined];\n\tif[count DATA;'`DATA.not.empty];\n\tloadhdrs:exec c from info where not t=\" \";loadfmts:exec t from info;\n\t.csv.fs2[{[file;loadhdrs;loadfmts] `DATA insert $[count DATA;flip loadhdrs!(loadfmts;.csv.DELIM)0:file;loadhdrs xcol(loadfmts;enlist .csv.DELIM)0:file]}[file;loadhdrs;loadfmts]];\n\tcount DATA}\n@[.:;\"\\\\l csvutil.custom.q\";::]; / save your custom settings in csvutil.custom.q to override those set at the beginning of the file \n</textarea></div>\n\n    <script>\n      var editor = CodeMirror.fromTextArea(document.getElementById(\"code\"), {\n        lineNumbers: true,\n        matchBrackets: true\n      });\n    </script>\n\n    <p><strong>MIME type defined:</strong> <code>text/x-q</code>.</p>\n  </article>\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/q/q.js",
    "content": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n(function(mod) {\n  if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n    mod(require(\"../../lib/codemirror\"));\n  else if (typeof define == \"function\" && define.amd) // AMD\n    define([\"../../lib/codemirror\"], mod);\n  else // Plain browser env\n    mod(CodeMirror);\n})(function(CodeMirror) {\n\"use strict\";\n\nCodeMirror.defineMode(\"q\",function(config){\n  var indentUnit=config.indentUnit,\n      curPunc,\n      keywords=buildRE([\"abs\",\"acos\",\"aj\",\"aj0\",\"all\",\"and\",\"any\",\"asc\",\"asin\",\"asof\",\"atan\",\"attr\",\"avg\",\"avgs\",\"bin\",\"by\",\"ceiling\",\"cols\",\"cor\",\"cos\",\"count\",\"cov\",\"cross\",\"csv\",\"cut\",\"delete\",\"deltas\",\"desc\",\"dev\",\"differ\",\"distinct\",\"div\",\"do\",\"each\",\"ej\",\"enlist\",\"eval\",\"except\",\"exec\",\"exit\",\"exp\",\"fby\",\"fills\",\"first\",\"fkeys\",\"flip\",\"floor\",\"from\",\"get\",\"getenv\",\"group\",\"gtime\",\"hclose\",\"hcount\",\"hdel\",\"hopen\",\"hsym\",\"iasc\",\"idesc\",\"if\",\"ij\",\"in\",\"insert\",\"inter\",\"inv\",\"key\",\"keys\",\"last\",\"like\",\"list\",\"lj\",\"load\",\"log\",\"lower\",\"lsq\",\"ltime\",\"ltrim\",\"mavg\",\"max\",\"maxs\",\"mcount\",\"md5\",\"mdev\",\"med\",\"meta\",\"min\",\"mins\",\"mmax\",\"mmin\",\"mmu\",\"mod\",\"msum\",\"neg\",\"next\",\"not\",\"null\",\"or\",\"over\",\"parse\",\"peach\",\"pj\",\"plist\",\"prd\",\"prds\",\"prev\",\"prior\",\"rand\",\"rank\",\"ratios\",\"raze\",\"read0\",\"read1\",\"reciprocal\",\"reverse\",\"rload\",\"rotate\",\"rsave\",\"rtrim\",\"save\",\"scan\",\"select\",\"set\",\"setenv\",\"show\",\"signum\",\"sin\",\"sqrt\",\"ss\",\"ssr\",\"string\",\"sublist\",\"sum\",\"sums\",\"sv\",\"system\",\"tables\",\"tan\",\"til\",\"trim\",\"txf\",\"type\",\"uj\",\"ungroup\",\"union\",\"update\",\"upper\",\"upsert\",\"value\",\"var\",\"view\",\"views\",\"vs\",\"wavg\",\"where\",\"where\",\"while\",\"within\",\"wj\",\"wj1\",\"wsum\",\"xasc\",\"xbar\",\"xcol\",\"xcols\",\"xdesc\",\"xexp\",\"xgroup\",\"xkey\",\"xlog\",\"xprev\",\"xrank\"]),\n      E=/[|/&^!+:\\\\\\-*%$=~#;@><,?_\\'\\\"\\[\\(\\]\\)\\s{}]/;\n  function buildRE(w){return new RegExp(\"^(\"+w.join(\"|\")+\")$\");}\n  function tokenBase(stream,state){\n    var sol=stream.sol(),c=stream.next();\n    curPunc=null;\n    if(sol)\n      if(c==\"/\")\n        return(state.tokenize=tokenLineComment)(stream,state);\n      else if(c==\"\\\\\"){\n        if(stream.eol()||/\\s/.test(stream.peek()))\n          return stream.skipToEnd(),/^\\\\\\s*$/.test(stream.current())?(state.tokenize=tokenCommentToEOF)(stream, state):state.tokenize=tokenBase,\"comment\";\n        else\n          return state.tokenize=tokenBase,\"builtin\";\n      }\n    if(/\\s/.test(c))\n      return stream.peek()==\"/\"?(stream.skipToEnd(),\"comment\"):\"whitespace\";\n    if(c=='\"')\n      return(state.tokenize=tokenString)(stream,state);\n    if(c=='`')\n      return stream.eatWhile(/[A-Z|a-z|\\d|_|:|\\/|\\.]/),\"symbol\";\n    if((\".\"==c&&/\\d/.test(stream.peek()))||/\\d/.test(c)){\n      var t=null;\n      stream.backUp(1);\n      if(stream.match(/^\\d{4}\\.\\d{2}(m|\\.\\d{2}([D|T](\\d{2}(:\\d{2}(:\\d{2}(\\.\\d{1,9})?)?)?)?)?)/)\n      || stream.match(/^\\d+D(\\d{2}(:\\d{2}(:\\d{2}(\\.\\d{1,9})?)?)?)/)\n      || stream.match(/^\\d{2}:\\d{2}(:\\d{2}(\\.\\d{1,9})?)?/)\n      || stream.match(/^\\d+[ptuv]{1}/))\n        t=\"temporal\";\n      else if(stream.match(/^0[NwW]{1}/)\n      || stream.match(/^0x[\\d|a-f|A-F]*/)\n      || stream.match(/^[0|1]+[b]{1}/)\n      || stream.match(/^\\d+[chijn]{1}/)\n      || stream.match(/-?\\d*(\\.\\d*)?(e[+\\-]?\\d+)?(e|f)?/))\n        t=\"number\";\n      return(t&&(!(c=stream.peek())||E.test(c)))?t:(stream.next(),\"error\");\n    }\n    if(/[A-Z|a-z]|\\./.test(c))\n      return stream.eatWhile(/[A-Z|a-z|\\.|_|\\d]/),keywords.test(stream.current())?\"keyword\":\"variable\";\n    if(/[|/&^!+:\\\\\\-*%$=~#;@><\\.,?_\\']/.test(c))\n      return null;\n    if(/[{}\\(\\[\\]\\)]/.test(c))\n      return null;\n    return\"error\";\n  }\n  function tokenLineComment(stream,state){\n    return stream.skipToEnd(),/\\/\\s*$/.test(stream.current())?(state.tokenize=tokenBlockComment)(stream,state):(state.tokenize=tokenBase),\"comment\";\n  }\n  function tokenBlockComment(stream,state){\n    var f=stream.sol()&&stream.peek()==\"\\\\\";\n    stream.skipToEnd();\n    if(f&&/^\\\\\\s*$/.test(stream.current()))\n      state.tokenize=tokenBase;\n    return\"comment\";\n  }\n  function tokenCommentToEOF(stream){return stream.skipToEnd(),\"comment\";}\n  function tokenString(stream,state){\n    var escaped=false,next,end=false;\n    while((next=stream.next())){\n      if(next==\"\\\"\"&&!escaped){end=true;break;}\n      escaped=!escaped&&next==\"\\\\\";\n    }\n    if(end)state.tokenize=tokenBase;\n    return\"string\";\n  }\n  function pushContext(state,type,col){state.context={prev:state.context,indent:state.indent,col:col,type:type};}\n  function popContext(state){state.indent=state.context.indent;state.context=state.context.prev;}\n  return{\n    startState:function(){\n      return{tokenize:tokenBase,\n             context:null,\n             indent:0,\n             col:0};\n    },\n    token:function(stream,state){\n      if(stream.sol()){\n        if(state.context&&state.context.align==null)\n          state.context.align=false;\n        state.indent=stream.indentation();\n      }\n      //if (stream.eatSpace()) return null;\n      var style=state.tokenize(stream,state);\n      if(style!=\"comment\"&&state.context&&state.context.align==null&&state.context.type!=\"pattern\"){\n        state.context.align=true;\n      }\n      if(curPunc==\"(\")pushContext(state,\")\",stream.column());\n      else if(curPunc==\"[\")pushContext(state,\"]\",stream.column());\n      else if(curPunc==\"{\")pushContext(state,\"}\",stream.column());\n      else if(/[\\]\\}\\)]/.test(curPunc)){\n        while(state.context&&state.context.type==\"pattern\")popContext(state);\n        if(state.context&&curPunc==state.context.type)popContext(state);\n      }\n      else if(curPunc==\".\"&&state.context&&state.context.type==\"pattern\")popContext(state);\n      else if(/atom|string|variable/.test(style)&&state.context){\n        if(/[\\}\\]]/.test(state.context.type))\n          pushContext(state,\"pattern\",stream.column());\n        else if(state.context.type==\"pattern\"&&!state.context.align){\n          state.context.align=true;\n          state.context.col=stream.column();\n        }\n      }\n      return style;\n    },\n    indent:function(state,textAfter){\n      var firstChar=textAfter&&textAfter.charAt(0);\n      var context=state.context;\n      if(/[\\]\\}]/.test(firstChar))\n        while (context&&context.type==\"pattern\")context=context.prev;\n      var closing=context&&firstChar==context.type;\n      if(!context)\n        return 0;\n      else if(context.type==\"pattern\")\n        return context.col;\n      else if(context.align)\n        return context.col+(closing?0:1);\n      else\n        return context.indent+(closing?0:indentUnit);\n    }\n  };\n});\nCodeMirror.defineMIME(\"text/x-q\",\"q\");\n\n});\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/r/index.html",
    "content": "<!doctype html>\n\n<title>CodeMirror: R mode</title>\n<meta charset=\"utf-8\"/>\n<link rel=stylesheet href=\"../../doc/docs.css\">\n\n<link rel=\"stylesheet\" href=\"../../lib/codemirror.css\">\n<script src=\"../../lib/codemirror.js\"></script>\n<script src=\"r.js\"></script>\n<style>\n      .CodeMirror { border-top: 1px solid silver; border-bottom: 1px solid silver; }\n      .cm-s-default span.cm-semi { color: blue; font-weight: bold; }\n      .cm-s-default span.cm-dollar { color: orange; font-weight: bold; }\n      .cm-s-default span.cm-arrow { color: brown; }\n      .cm-s-default span.cm-arg-is { color: brown; }\n    </style>\n<div id=nav>\n  <a href=\"http://codemirror.net\"><h1>CodeMirror</h1><img id=logo src=\"../../doc/logo.png\"></a>\n\n  <ul>\n    <li><a href=\"../../index.html\">Home</a>\n    <li><a href=\"../../doc/manual.html\">Manual</a>\n    <li><a href=\"https://github.com/codemirror/codemirror\">Code</a>\n  </ul>\n  <ul>\n    <li><a href=\"../index.html\">Language modes</a>\n    <li><a class=active href=\"#\">R</a>\n  </ul>\n</div>\n\n<article>\n<h2>R mode</h2>\n<form><textarea id=\"code\" name=\"code\">\n# Code from http://www.mayin.org/ajayshah/KB/R/\n\n# FIRST LEARN ABOUT LISTS --\nX = list(height=5.4, weight=54)\nprint(\"Use default printing --\")\nprint(X)\nprint(\"Accessing individual elements --\")\ncat(\"Your height is \", X$height, \" and your weight is \", X$weight, \"\\n\")\n\n# FUNCTIONS --\nsquare <- function(x) {\n  return(x*x)\n}\ncat(\"The square of 3 is \", square(3), \"\\n\")\n\n                 # default value of the arg is set to 5.\ncube <- function(x=5) {\n  return(x*x*x);\n}\ncat(\"Calling cube with 2 : \", cube(2), \"\\n\")    # will give 2^3\ncat(\"Calling cube        : \", cube(), \"\\n\")     # will default to 5^3.\n\n# LEARN ABOUT FUNCTIONS THAT RETURN MULTIPLE OBJECTS --\npowers <- function(x) {\n  parcel = list(x2=x*x, x3=x*x*x, x4=x*x*x*x);\n  return(parcel);\n}\n\nX = powers(3);\nprint(\"Showing powers of 3 --\"); print(X);\n\n# WRITING THIS COMPACTLY (4 lines instead of 7)\n\npowerful <- function(x) {\n  return(list(x2=x*x, x3=x*x*x, x4=x*x*x*x));\n}\nprint(\"Showing powers of 3 --\"); print(powerful(3));\n\n# In R, the last expression in a function is, by default, what is\n# returned. So you could equally just say:\npowerful <- function(x) {list(x2=x*x, x3=x*x*x, x4=x*x*x*x)}\n</textarea></form>\n    <script>\n      var editor = CodeMirror.fromTextArea(document.getElementById(\"code\"), {});\n    </script>\n\n    <p><strong>MIME types defined:</strong> <code>text/x-rsrc</code>.</p>\n\n    <p>Development of the CodeMirror R mode was kindly sponsored\n    by <a href=\"https://twitter.com/ubalo\">Ubalo</a>.</p>\n\n  </article>\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/r/r.js",
    "content": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n(function(mod) {\n  if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n    mod(require(\"../../lib/codemirror\"));\n  else if (typeof define == \"function\" && define.amd) // AMD\n    define([\"../../lib/codemirror\"], mod);\n  else // Plain browser env\n    mod(CodeMirror);\n})(function(CodeMirror) {\n\"use strict\";\n\nCodeMirror.defineMode(\"r\", function(config) {\n  function wordObj(str) {\n    var words = str.split(\" \"), res = {};\n    for (var i = 0; i < words.length; ++i) res[words[i]] = true;\n    return res;\n  }\n  var atoms = wordObj(\"NULL NA Inf NaN NA_integer_ NA_real_ NA_complex_ NA_character_\");\n  var builtins = wordObj(\"list quote bquote eval return call parse deparse\");\n  var keywords = wordObj(\"if else repeat while function for in next break\");\n  var blockkeywords = wordObj(\"if else repeat while function for\");\n  var opChars = /[+\\-*\\/^<>=!&|~$:]/;\n  var curPunc;\n\n  function tokenBase(stream, state) {\n    curPunc = null;\n    var ch = stream.next();\n    if (ch == \"#\") {\n      stream.skipToEnd();\n      return \"comment\";\n    } else if (ch == \"0\" && stream.eat(\"x\")) {\n      stream.eatWhile(/[\\da-f]/i);\n      return \"number\";\n    } else if (ch == \".\" && stream.eat(/\\d/)) {\n      stream.match(/\\d*(?:e[+\\-]?\\d+)?/);\n      return \"number\";\n    } else if (/\\d/.test(ch)) {\n      stream.match(/\\d*(?:\\.\\d+)?(?:e[+\\-]\\d+)?L?/);\n      return \"number\";\n    } else if (ch == \"'\" || ch == '\"') {\n      state.tokenize = tokenString(ch);\n      return \"string\";\n    } else if (ch == \".\" && stream.match(/.[.\\d]+/)) {\n      return \"keyword\";\n    } else if (/[\\w\\.]/.test(ch) && ch != \"_\") {\n      stream.eatWhile(/[\\w\\.]/);\n      var word = stream.current();\n      if (atoms.propertyIsEnumerable(word)) return \"atom\";\n      if (keywords.propertyIsEnumerable(word)) {\n        // Block keywords start new blocks, except 'else if', which only starts\n        // one new block for the 'if', no block for the 'else'.\n        if (blockkeywords.propertyIsEnumerable(word) &&\n            !stream.match(/\\s*if(\\s+|$)/, false))\n          curPunc = \"block\";\n        return \"keyword\";\n      }\n      if (builtins.propertyIsEnumerable(word)) return \"builtin\";\n      return \"variable\";\n    } else if (ch == \"%\") {\n      if (stream.skipTo(\"%\")) stream.next();\n      return \"variable-2\";\n    } else if (ch == \"<\" && stream.eat(\"-\")) {\n      return \"arrow\";\n    } else if (ch == \"=\" && state.ctx.argList) {\n      return \"arg-is\";\n    } else if (opChars.test(ch)) {\n      if (ch == \"$\") return \"dollar\";\n      stream.eatWhile(opChars);\n      return \"operator\";\n    } else if (/[\\(\\){}\\[\\];]/.test(ch)) {\n      curPunc = ch;\n      if (ch == \";\") return \"semi\";\n      return null;\n    } else {\n      return null;\n    }\n  }\n\n  function tokenString(quote) {\n    return function(stream, state) {\n      if (stream.eat(\"\\\\\")) {\n        var ch = stream.next();\n        if (ch == \"x\") stream.match(/^[a-f0-9]{2}/i);\n        else if ((ch == \"u\" || ch == \"U\") && stream.eat(\"{\") && stream.skipTo(\"}\")) stream.next();\n        else if (ch == \"u\") stream.match(/^[a-f0-9]{4}/i);\n        else if (ch == \"U\") stream.match(/^[a-f0-9]{8}/i);\n        else if (/[0-7]/.test(ch)) stream.match(/^[0-7]{1,2}/);\n        return \"string-2\";\n      } else {\n        var next;\n        while ((next = stream.next()) != null) {\n          if (next == quote) { state.tokenize = tokenBase; break; }\n          if (next == \"\\\\\") { stream.backUp(1); break; }\n        }\n        return \"string\";\n      }\n    };\n  }\n\n  function push(state, type, stream) {\n    state.ctx = {type: type,\n                 indent: state.indent,\n                 align: null,\n                 column: stream.column(),\n                 prev: state.ctx};\n  }\n  function pop(state) {\n    state.indent = state.ctx.indent;\n    state.ctx = state.ctx.prev;\n  }\n\n  return {\n    startState: function() {\n      return {tokenize: tokenBase,\n              ctx: {type: \"top\",\n                    indent: -config.indentUnit,\n                    align: false},\n              indent: 0,\n              afterIdent: false};\n    },\n\n    token: function(stream, state) {\n      if (stream.sol()) {\n        if (state.ctx.align == null) state.ctx.align = false;\n        state.indent = stream.indentation();\n      }\n      if (stream.eatSpace()) return null;\n      var style = state.tokenize(stream, state);\n      if (style != \"comment\" && state.ctx.align == null) state.ctx.align = true;\n\n      var ctype = state.ctx.type;\n      if ((curPunc == \";\" || curPunc == \"{\" || curPunc == \"}\") && ctype == \"block\") pop(state);\n      if (curPunc == \"{\") push(state, \"}\", stream);\n      else if (curPunc == \"(\") {\n        push(state, \")\", stream);\n        if (state.afterIdent) state.ctx.argList = true;\n      }\n      else if (curPunc == \"[\") push(state, \"]\", stream);\n      else if (curPunc == \"block\") push(state, \"block\", stream);\n      else if (curPunc == ctype) pop(state);\n      state.afterIdent = style == \"variable\" || style == \"keyword\";\n      return style;\n    },\n\n    indent: function(state, textAfter) {\n      if (state.tokenize != tokenBase) return 0;\n      var firstChar = textAfter && textAfter.charAt(0), ctx = state.ctx,\n          closing = firstChar == ctx.type;\n      if (ctx.type == \"block\") return ctx.indent + (firstChar == \"{\" ? 0 : config.indentUnit);\n      else if (ctx.align) return ctx.column + (closing ? 0 : 1);\n      else return ctx.indent + (closing ? 0 : config.indentUnit);\n    },\n\n    lineComment: \"#\"\n  };\n});\n\nCodeMirror.defineMIME(\"text/x-rsrc\", \"r\");\n\n});\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/rpm/changes/index.html",
    "content": "<!doctype html>\n\n<title>CodeMirror: RPM changes mode</title>\n<meta charset=\"utf-8\"/>\n<link rel=stylesheet href=\"../../doc/docs.css\">\n\n    <link rel=\"stylesheet\" href=\"../../../lib/codemirror.css\">\n    <script src=\"../../../lib/codemirror.js\"></script>\n    <script src=\"changes.js\"></script>\n    <link rel=\"stylesheet\" href=\"../../../doc/docs.css\">\n    <style type=\"text/css\">.CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}</style>\n\n<div id=nav>\n  <a href=\"http://codemirror.net\"><h1>CodeMirror</h1><img id=logo src=\"../../../doc/logo.png\"></a>\n\n  <ul>\n    <li><a href=\"../../../index.html\">Home</a>\n    <li><a href=\"../../../doc/manual.html\">Manual</a>\n    <li><a href=\"https://github.com/codemirror/codemirror\">Code</a>\n  </ul>\n  <ul>\n    <li><a href=\"../../index.html\">Language modes</a>\n    <li><a class=active href=\"#\">RPM changes</a>\n  </ul>\n</div>\n\n<article>\n<h2>RPM changes mode</h2>\n\n    <div><textarea id=\"code\" name=\"code\">\n-------------------------------------------------------------------\nTue Oct 18 13:58:40 UTC 2011 - misterx@example.com\n\n- Update to r60.3\n- Fixes bug in the reflect package\n  * disallow Interface method on Value obtained via unexported name\n\n-------------------------------------------------------------------\nThu Oct  6 08:14:24 UTC 2011 - misterx@example.com\n\n- Update to r60.2\n- Fixes memory leak in certain map types\n\n-------------------------------------------------------------------\nWed Oct  5 14:34:10 UTC 2011 - misterx@example.com\n\n- Tweaks for gdb debugging\n- go.spec changes:\n  - move %go_arch definition to %prep section\n  - pass correct location of go specific gdb pretty printer and\n    functions to cpp as HOST_EXTRA_CFLAGS macro\n  - install go gdb functions & printer\n- gdb-printer.patch\n  - patch linker (src/cmd/ld/dwarf.c) to emit correct location of go\n    gdb functions and pretty printer\n</textarea></div>\n    <script>\n      var editor = CodeMirror.fromTextArea(document.getElementById(\"code\"), {\n        mode: {name: \"changes\"},\n        lineNumbers: true,\n        indentUnit: 4\n      });\n    </script>\n\n    <p><strong>MIME types defined:</strong> <code>text/x-rpm-changes</code>.</p>\n</article>\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/rpm/index.html",
    "content": "<!doctype html>\n\n<title>CodeMirror: RPM changes mode</title>\n<meta charset=\"utf-8\"/>\n<link rel=stylesheet href=\"../../doc/docs.css\">\n\n    <link rel=\"stylesheet\" href=\"../../lib/codemirror.css\">\n    <script src=\"../../lib/codemirror.js\"></script>\n    <script src=\"rpm.js\"></script>\n    <link rel=\"stylesheet\" href=\"../../doc/docs.css\">\n    <style type=\"text/css\">.CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}</style>\n\n<div id=nav>\n  <a href=\"http://codemirror.net\"><h1>CodeMirror</h1><img id=logo src=\"../../doc/logo.png\"></a>\n\n  <ul>\n    <li><a href=\"../../index.html\">Home</a>\n    <li><a href=\"../../doc/manual.html\">Manual</a>\n    <li><a href=\"https://github.com/codemirror/codemirror\">Code</a>\n  </ul>\n  <ul>\n    <li><a href=\"../index.html\">Language modes</a>\n    <li><a class=active href=\"#\">RPM</a>\n  </ul>\n</div>\n\n<article>\n<h2>RPM changes mode</h2>\n\n    <div><textarea id=\"code\" name=\"code\">\n-------------------------------------------------------------------\nTue Oct 18 13:58:40 UTC 2011 - misterx@example.com\n\n- Update to r60.3\n- Fixes bug in the reflect package\n  * disallow Interface method on Value obtained via unexported name\n\n-------------------------------------------------------------------\nThu Oct  6 08:14:24 UTC 2011 - misterx@example.com\n\n- Update to r60.2\n- Fixes memory leak in certain map types\n\n-------------------------------------------------------------------\nWed Oct  5 14:34:10 UTC 2011 - misterx@example.com\n\n- Tweaks for gdb debugging\n- go.spec changes:\n  - move %go_arch definition to %prep section\n  - pass correct location of go specific gdb pretty printer and\n    functions to cpp as HOST_EXTRA_CFLAGS macro\n  - install go gdb functions & printer\n- gdb-printer.patch\n  - patch linker (src/cmd/ld/dwarf.c) to emit correct location of go\n    gdb functions and pretty printer\n</textarea></div>\n    <script>\n      var editor = CodeMirror.fromTextArea(document.getElementById(\"code\"), {\n        mode: {name: \"rpm-changes\"},\n        lineNumbers: true,\n        indentUnit: 4\n      });\n    </script>\n\n<h2>RPM spec mode</h2>\n    \n    <div><textarea id=\"code2\" name=\"code2\">\n#\n# spec file for package minidlna\n#\n# Copyright (c) 2011, Sascha Peilicke <saschpe@gmx.de>\n#\n# All modifications and additions to the file contributed by third parties\n# remain the property of their copyright owners, unless otherwise agreed\n# upon. The license for this file, and modifications and additions to the\n# file, is the same license as for the pristine package itself (unless the\n# license for the pristine package is not an Open Source License, in which\n# case the license is the MIT License). An \"Open Source License\" is a\n# license that conforms to the Open Source Definition (Version 1.9)\n# published by the Open Source Initiative.\n\n\nName:           libupnp6\nVersion:        1.6.13\nRelease:        0\nSummary:        Portable Universal Plug and Play (UPnP) SDK\nGroup:          System/Libraries\nLicense:        BSD-3-Clause\nUrl:            http://sourceforge.net/projects/pupnp/\nSource0:        http://downloads.sourceforge.net/pupnp/libupnp-%{version}.tar.bz2\nBuildRoot:      %{_tmppath}/%{name}-%{version}-build\n\n%description\nThe portable Universal Plug and Play (UPnP) SDK provides support for building\nUPnP-compliant control points, devices, and bridges on several operating\nsystems.\n\n%package -n libupnp-devel\nSummary:        Portable Universal Plug and Play (UPnP) SDK\nGroup:          Development/Libraries/C and C++\nProvides:       pkgconfig(libupnp)\nRequires:       %{name} = %{version}\n\n%description -n libupnp-devel\nThe portable Universal Plug and Play (UPnP) SDK provides support for building\nUPnP-compliant control points, devices, and bridges on several operating\nsystems.\n\n%prep\n%setup -n libupnp-%{version}\n\n%build\n%configure --disable-static\nmake %{?_smp_mflags}\n\n%install\n%makeinstall\nfind %{buildroot} -type f -name '*.la' -exec rm -f {} ';'\n\n%post -p /sbin/ldconfig\n\n%postun -p /sbin/ldconfig\n\n%files\n%defattr(-,root,root,-)\n%doc ChangeLog NEWS README TODO\n%{_libdir}/libixml.so.*\n%{_libdir}/libthreadutil.so.*\n%{_libdir}/libupnp.so.*\n\n%files -n libupnp-devel\n%defattr(-,root,root,-)\n%{_libdir}/pkgconfig/libupnp.pc\n%{_libdir}/libixml.so\n%{_libdir}/libthreadutil.so\n%{_libdir}/libupnp.so\n%{_includedir}/upnp/\n\n%changelog</textarea></div>\n    <script>\n      var editor = CodeMirror.fromTextArea(document.getElementById(\"code2\"), {\n        mode: {name: \"rpm-spec\"},\n        lineNumbers: true,\n        indentUnit: 4\n      });\n    </script>\n\n    <p><strong>MIME types defined:</strong> <code>text/x-rpm-spec</code>, <code>text/x-rpm-changes</code>.</p>\n</article>\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/rpm/rpm.js",
    "content": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n(function(mod) {\n  if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n    mod(require(\"../../lib/codemirror\"));\n  else if (typeof define == \"function\" && define.amd) // AMD\n    define([\"../../lib/codemirror\"], mod);\n  else // Plain browser env\n    mod(CodeMirror);\n})(function(CodeMirror) {\n\"use strict\";\n\nCodeMirror.defineMode(\"rpm-changes\", function() {\n  var headerSeperator = /^-+$/;\n  var headerLine = /^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)  ?\\d{1,2} \\d{2}:\\d{2}(:\\d{2})? [A-Z]{3,4} \\d{4} - /;\n  var simpleEmail = /^[\\w+.-]+@[\\w.-]+/;\n\n  return {\n    token: function(stream) {\n      if (stream.sol()) {\n        if (stream.match(headerSeperator)) { return 'tag'; }\n        if (stream.match(headerLine)) { return 'tag'; }\n      }\n      if (stream.match(simpleEmail)) { return 'string'; }\n      stream.next();\n      return null;\n    }\n  };\n});\n\nCodeMirror.defineMIME(\"text/x-rpm-changes\", \"rpm-changes\");\n\n// Quick and dirty spec file highlighting\n\nCodeMirror.defineMode(\"rpm-spec\", function() {\n  var arch = /^(i386|i586|i686|x86_64|ppc64|ppc|ia64|s390x|s390|sparc64|sparcv9|sparc|noarch|alphaev6|alpha|hppa|mipsel)/;\n\n  var preamble = /^(Name|Version|Release|License|Summary|Url|Group|Source|BuildArch|BuildRequires|BuildRoot|AutoReqProv|Provides|Requires(\\(\\w+\\))?|Obsoletes|Conflicts|Recommends|Source\\d*|Patch\\d*|ExclusiveArch|NoSource|Supplements):/;\n  var section = /^%(debug_package|package|description|prep|build|install|files|clean|changelog|preinstall|preun|postinstall|postun|pre|post|triggerin|triggerun|pretrans|posttrans|verifyscript|check|triggerpostun|triggerprein|trigger)/;\n  var control_flow_complex = /^%(ifnarch|ifarch|if)/; // rpm control flow macros\n  var control_flow_simple = /^%(else|endif)/; // rpm control flow macros\n  var operators = /^(\\!|\\?|\\<\\=|\\<|\\>\\=|\\>|\\=\\=|\\&\\&|\\|\\|)/; // operators in control flow macros\n\n  return {\n    startState: function () {\n        return {\n          controlFlow: false,\n          macroParameters: false,\n          section: false\n        };\n    },\n    token: function (stream, state) {\n      var ch = stream.peek();\n      if (ch == \"#\") { stream.skipToEnd(); return \"comment\"; }\n\n      if (stream.sol()) {\n        if (stream.match(preamble)) { return \"preamble\"; }\n        if (stream.match(section)) { return \"section\"; }\n      }\n\n      if (stream.match(/^\\$\\w+/)) { return \"def\"; } // Variables like '$RPM_BUILD_ROOT'\n      if (stream.match(/^\\$\\{\\w+\\}/)) { return \"def\"; } // Variables like '${RPM_BUILD_ROOT}'\n\n      if (stream.match(control_flow_simple)) { return \"keyword\"; }\n      if (stream.match(control_flow_complex)) {\n        state.controlFlow = true;\n        return \"keyword\";\n      }\n      if (state.controlFlow) {\n        if (stream.match(operators)) { return \"operator\"; }\n        if (stream.match(/^(\\d+)/)) { return \"number\"; }\n        if (stream.eol()) { state.controlFlow = false; }\n      }\n\n      if (stream.match(arch)) { return \"number\"; }\n\n      // Macros like '%make_install' or '%attr(0775,root,root)'\n      if (stream.match(/^%[\\w]+/)) {\n        if (stream.match(/^\\(/)) { state.macroParameters = true; }\n        return \"macro\";\n      }\n      if (state.macroParameters) {\n        if (stream.match(/^\\d+/)) { return \"number\";}\n        if (stream.match(/^\\)/)) {\n          state.macroParameters = false;\n          return \"macro\";\n        }\n      }\n      if (stream.match(/^%\\{\\??[\\w \\-]+\\}/)) { return \"macro\"; } // Macros like '%{defined fedora}'\n\n      //TODO: Include bash script sub-parser (CodeMirror supports that)\n      stream.next();\n      return null;\n    }\n  };\n});\n\nCodeMirror.defineMIME(\"text/x-rpm-spec\", \"rpm-spec\");\n\n});\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/rst/index.html",
    "content": "<!doctype html>\n\n<title>CodeMirror: reStructuredText mode</title>\n<meta charset=\"utf-8\"/>\n<link rel=stylesheet href=\"../../doc/docs.css\">\n\n<link rel=\"stylesheet\" href=\"../../lib/codemirror.css\">\n<script src=\"../../lib/codemirror.js\"></script>\n<script src=\"../../addon/mode/overlay.js\"></script>\n<script src=\"rst.js\"></script>\n<style type=\"text/css\">.CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}</style>\n<div id=nav>\n  <a href=\"http://codemirror.net\"><h1>CodeMirror</h1><img id=logo src=\"../../doc/logo.png\"></a>\n\n  <ul>\n    <li><a href=\"../../index.html\">Home</a>\n    <li><a href=\"../../doc/manual.html\">Manual</a>\n    <li><a href=\"https://github.com/codemirror/codemirror\">Code</a>\n  </ul>\n  <ul>\n    <li><a href=\"../index.html\">Language modes</a>\n    <li><a class=active href=\"#\">reStructuredText</a>\n  </ul>\n</div>\n\n<article>\n<h2>reStructuredText mode</h2>\n<form><textarea id=\"code\" name=\"code\">\n.. This is an excerpt from Sphinx documentation: http://sphinx.pocoo.org/_sources/rest.txt\n\n.. highlightlang:: rest\n\n.. _rst-primer:\n\nreStructuredText Primer\n=======================\n\nThis section is a brief introduction to reStructuredText (reST) concepts and\nsyntax, intended to provide authors with enough information to author documents\nproductively.  Since reST was designed to be a simple, unobtrusive markup\nlanguage, this will not take too long.\n\n.. seealso::\n\n   The authoritative `reStructuredText User Documentation\n   &lt;http://docutils.sourceforge.net/rst.html&gt;`_.  The \"ref\" links in this\n   document link to the description of the individual constructs in the reST\n   reference.\n\n\nParagraphs\n----------\n\nThe paragraph (:duref:`ref &lt;paragraphs&gt;`) is the most basic block in a reST\ndocument.  Paragraphs are simply chunks of text separated by one or more blank\nlines.  As in Python, indentation is significant in reST, so all lines of the\nsame paragraph must be left-aligned to the same level of indentation.\n\n\n.. _inlinemarkup:\n\nInline markup\n-------------\n\nThe standard reST inline markup is quite simple: use\n\n* one asterisk: ``*text*`` for emphasis (italics),\n* two asterisks: ``**text**`` for strong emphasis (boldface), and\n* backquotes: ````text```` for code samples.\n\nIf asterisks or backquotes appear in running text and could be confused with\ninline markup delimiters, they have to be escaped with a backslash.\n\nBe aware of some restrictions of this markup:\n\n* it may not be nested,\n* content may not start or end with whitespace: ``* text*`` is wrong,\n* it must be separated from surrounding text by non-word characters.  Use a\n  backslash escaped space to work around that: ``thisis\\ *one*\\ word``.\n\nThese restrictions may be lifted in future versions of the docutils.\n\nreST also allows for custom \"interpreted text roles\"', which signify that the\nenclosed text should be interpreted in a specific way.  Sphinx uses this to\nprovide semantic markup and cross-referencing of identifiers, as described in\nthe appropriate section.  The general syntax is ``:rolename:`content```.\n\nStandard reST provides the following roles:\n\n* :durole:`emphasis` -- alternate spelling for ``*emphasis*``\n* :durole:`strong` -- alternate spelling for ``**strong**``\n* :durole:`literal` -- alternate spelling for ````literal````\n* :durole:`subscript` -- subscript text\n* :durole:`superscript` -- superscript text\n* :durole:`title-reference` -- for titles of books, periodicals, and other\n  materials\n\nSee :ref:`inline-markup` for roles added by Sphinx.\n\n\nLists and Quote-like blocks\n---------------------------\n\nList markup (:duref:`ref &lt;bullet-lists&gt;`) is natural: just place an asterisk at\nthe start of a paragraph and indent properly.  The same goes for numbered lists;\nthey can also be autonumbered using a ``#`` sign::\n\n   * This is a bulleted list.\n   * It has two items, the second\n     item uses two lines.\n\n   1. This is a numbered list.\n   2. It has two items too.\n\n   #. This is a numbered list.\n   #. It has two items too.\n\n\nNested lists are possible, but be aware that they must be separated from the\nparent list items by blank lines::\n\n   * this is\n   * a list\n\n     * with a nested list\n     * and some subitems\n\n   * and here the parent list continues\n\nDefinition lists (:duref:`ref &lt;definition-lists&gt;`) are created as follows::\n\n   term (up to a line of text)\n      Definition of the term, which must be indented\n\n      and can even consist of multiple paragraphs\n\n   next term\n      Description.\n\nNote that the term cannot have more than one line of text.\n\nQuoted paragraphs (:duref:`ref &lt;block-quotes&gt;`) are created by just indenting\nthem more than the surrounding paragraphs.\n\nLine blocks (:duref:`ref &lt;line-blocks&gt;`) are a way of preserving line breaks::\n\n   | These lines are\n   | broken exactly like in\n   | the source file.\n\nThere are also several more special blocks available:\n\n* field lists (:duref:`ref &lt;field-lists&gt;`)\n* option lists (:duref:`ref &lt;option-lists&gt;`)\n* quoted literal blocks (:duref:`ref &lt;quoted-literal-blocks&gt;`)\n* doctest blocks (:duref:`ref &lt;doctest-blocks&gt;`)\n\n\nSource Code\n-----------\n\nLiteral code blocks (:duref:`ref &lt;literal-blocks&gt;`) are introduced by ending a\nparagraph with the special marker ``::``.  The literal block must be indented\n(and, like all paragraphs, separated from the surrounding ones by blank lines)::\n\n   This is a normal text paragraph. The next paragraph is a code sample::\n\n      It is not processed in any way, except\n      that the indentation is removed.\n\n      It can span multiple lines.\n\n   This is a normal text paragraph again.\n\nThe handling of the ``::`` marker is smart:\n\n* If it occurs as a paragraph of its own, that paragraph is completely left\n  out of the document.\n* If it is preceded by whitespace, the marker is removed.\n* If it is preceded by non-whitespace, the marker is replaced by a single\n  colon.\n\nThat way, the second sentence in the above example's first paragraph would be\nrendered as \"The next paragraph is a code sample:\".\n\n\n.. _rst-tables:\n\nTables\n------\n\nTwo forms of tables are supported.  For *grid tables* (:duref:`ref\n&lt;grid-tables&gt;`), you have to \"paint\" the cell grid yourself.  They look like\nthis::\n\n   +------------------------+------------+----------+----------+\n   | Header row, column 1   | Header 2   | Header 3 | Header 4 |\n   | (header rows optional) |            |          |          |\n   +========================+============+==========+==========+\n   | body row 1, column 1   | column 2   | column 3 | column 4 |\n   +------------------------+------------+----------+----------+\n   | body row 2             | ...        | ...      |          |\n   +------------------------+------------+----------+----------+\n\n*Simple tables* (:duref:`ref &lt;simple-tables&gt;`) are easier to write, but\nlimited: they must contain more than one row, and the first column cannot\ncontain multiple lines.  They look like this::\n\n   =====  =====  =======\n   A      B      A and B\n   =====  =====  =======\n   False  False  False\n   True   False  False\n   False  True   False\n   True   True   True\n   =====  =====  =======\n\n\nHyperlinks\n----------\n\nExternal links\n^^^^^^^^^^^^^^\n\nUse ```Link text &lt;http://example.com/&gt;`_`` for inline web links.  If the link\ntext should be the web address, you don't need special markup at all, the parser\nfinds links and mail addresses in ordinary text.\n\nYou can also separate the link and the target definition (:duref:`ref\n&lt;hyperlink-targets&gt;`), like this::\n\n   This is a paragraph that contains `a link`_.\n\n   .. _a link: http://example.com/\n\n\nInternal links\n^^^^^^^^^^^^^^\n\nInternal linking is done via a special reST role provided by Sphinx, see the\nsection on specific markup, :ref:`ref-role`.\n\n\nSections\n--------\n\nSection headers (:duref:`ref &lt;sections&gt;`) are created by underlining (and\noptionally overlining) the section title with a punctuation character, at least\nas long as the text::\n\n   =================\n   This is a heading\n   =================\n\nNormally, there are no heading levels assigned to certain characters as the\nstructure is determined from the succession of headings.  However, for the\nPython documentation, this convention is used which you may follow:\n\n* ``#`` with overline, for parts\n* ``*`` with overline, for chapters\n* ``=``, for sections\n* ``-``, for subsections\n* ``^``, for subsubsections\n* ``\"``, for paragraphs\n\nOf course, you are free to use your own marker characters (see the reST\ndocumentation), and use a deeper nesting level, but keep in mind that most\ntarget formats (HTML, LaTeX) have a limited supported nesting depth.\n\n\nExplicit Markup\n---------------\n\n\"Explicit markup\" (:duref:`ref &lt;explicit-markup-blocks&gt;`) is used in reST for\nmost constructs that need special handling, such as footnotes,\nspecially-highlighted paragraphs, comments, and generic directives.\n\nAn explicit markup block begins with a line starting with ``..`` followed by\nwhitespace and is terminated by the next paragraph at the same level of\nindentation.  (There needs to be a blank line between explicit markup and normal\nparagraphs.  This may all sound a bit complicated, but it is intuitive enough\nwhen you write it.)\n\n\n.. _directives:\n\nDirectives\n----------\n\nA directive (:duref:`ref &lt;directives&gt;`) is a generic block of explicit markup.\nBesides roles, it is one of the extension mechanisms of reST, and Sphinx makes\nheavy use of it.\n\nDocutils supports the following directives:\n\n* Admonitions: :dudir:`attention`, :dudir:`caution`, :dudir:`danger`,\n  :dudir:`error`, :dudir:`hint`, :dudir:`important`, :dudir:`note`,\n  :dudir:`tip`, :dudir:`warning` and the generic :dudir:`admonition`.\n  (Most themes style only \"note\" and \"warning\" specially.)\n\n* Images:\n\n  - :dudir:`image` (see also Images_ below)\n  - :dudir:`figure` (an image with caption and optional legend)\n\n* Additional body elements:\n\n  - :dudir:`contents` (a local, i.e. for the current file only, table of\n    contents)\n  - :dudir:`container` (a container with a custom class, useful to generate an\n    outer ``&lt;div&gt;`` in HTML)\n  - :dudir:`rubric` (a heading without relation to the document sectioning)\n  - :dudir:`topic`, :dudir:`sidebar` (special highlighted body elements)\n  - :dudir:`parsed-literal` (literal block that supports inline markup)\n  - :dudir:`epigraph` (a block quote with optional attribution line)\n  - :dudir:`highlights`, :dudir:`pull-quote` (block quotes with their own\n    class attribute)\n  - :dudir:`compound` (a compound paragraph)\n\n* Special tables:\n\n  - :dudir:`table` (a table with title)\n  - :dudir:`csv-table` (a table generated from comma-separated values)\n  - :dudir:`list-table` (a table generated from a list of lists)\n\n* Special directives:\n\n  - :dudir:`raw` (include raw target-format markup)\n  - :dudir:`include` (include reStructuredText from another file)\n    -- in Sphinx, when given an absolute include file path, this directive takes\n    it as relative to the source directory\n  - :dudir:`class` (assign a class attribute to the next element) [1]_\n\n* HTML specifics:\n\n  - :dudir:`meta` (generation of HTML ``&lt;meta&gt;`` tags)\n  - :dudir:`title` (override document title)\n\n* Influencing markup:\n\n  - :dudir:`default-role` (set a new default role)\n  - :dudir:`role` (create a new role)\n\n  Since these are only per-file, better use Sphinx' facilities for setting the\n  :confval:`default_role`.\n\nDo *not* use the directives :dudir:`sectnum`, :dudir:`header` and\n:dudir:`footer`.\n\nDirectives added by Sphinx are described in :ref:`sphinxmarkup`.\n\nBasically, a directive consists of a name, arguments, options and content. (Keep\nthis terminology in mind, it is used in the next chapter describing custom\ndirectives.)  Looking at this example, ::\n\n   .. function:: foo(x)\n                 foo(y, z)\n      :module: some.module.name\n\n      Return a line of text input from the user.\n\n``function`` is the directive name.  It is given two arguments here, the\nremainder of the first line and the second line, as well as one option\n``module`` (as you can see, options are given in the lines immediately following\nthe arguments and indicated by the colons).  Options must be indented to the\nsame level as the directive content.\n\nThe directive content follows after a blank line and is indented relative to the\ndirective start.\n\n\nImages\n------\n\nreST supports an image directive (:dudir:`ref &lt;image&gt;`), used like so::\n\n   .. image:: gnu.png\n      (options)\n\nWhen used within Sphinx, the file name given (here ``gnu.png``) must either be\nrelative to the source file, or absolute which means that they are relative to\nthe top source directory.  For example, the file ``sketch/spam.rst`` could refer\nto the image ``images/spam.png`` as ``../images/spam.png`` or\n``/images/spam.png``.\n\nSphinx will automatically copy image files over to a subdirectory of the output\ndirectory on building (e.g. the ``_static`` directory for HTML output.)\n\nInterpretation of image size options (``width`` and ``height``) is as follows:\nif the size has no unit or the unit is pixels, the given size will only be\nrespected for output channels that support pixels (i.e. not in LaTeX output).\nOther units (like ``pt`` for points) will be used for HTML and LaTeX output.\n\nSphinx extends the standard docutils behavior by allowing an asterisk for the\nextension::\n\n   .. image:: gnu.*\n\nSphinx then searches for all images matching the provided pattern and determines\ntheir type.  Each builder then chooses the best image out of these candidates.\nFor instance, if the file name ``gnu.*`` was given and two files :file:`gnu.pdf`\nand :file:`gnu.png` existed in the source tree, the LaTeX builder would choose\nthe former, while the HTML builder would prefer the latter.\n\n.. versionchanged:: 0.4\n   Added the support for file names ending in an asterisk.\n\n.. versionchanged:: 0.6\n   Image paths can now be absolute.\n\n\nFootnotes\n---------\n\nFor footnotes (:duref:`ref &lt;footnotes&gt;`), use ``[#name]_`` to mark the footnote\nlocation, and add the footnote body at the bottom of the document after a\n\"Footnotes\" rubric heading, like so::\n\n   Lorem ipsum [#f1]_ dolor sit amet ... [#f2]_\n\n   .. rubric:: Footnotes\n\n   .. [#f1] Text of the first footnote.\n   .. [#f2] Text of the second footnote.\n\nYou can also explicitly number the footnotes (``[1]_``) or use auto-numbered\nfootnotes without names (``[#]_``).\n\n\nCitations\n---------\n\nStandard reST citations (:duref:`ref &lt;citations&gt;`) are supported, with the\nadditional feature that they are \"global\", i.e. all citations can be referenced\nfrom all files.  Use them like so::\n\n   Lorem ipsum [Ref]_ dolor sit amet.\n\n   .. [Ref] Book or article reference, URL or whatever.\n\nCitation usage is similar to footnote usage, but with a label that is not\nnumeric or begins with ``#``.\n\n\nSubstitutions\n-------------\n\nreST supports \"substitutions\" (:duref:`ref &lt;substitution-definitions&gt;`), which\nare pieces of text and/or markup referred to in the text by ``|name|``.  They\nare defined like footnotes with explicit markup blocks, like this::\n\n   .. |name| replace:: replacement *text*\n\nor this::\n\n   .. |caution| image:: warning.png\n                :alt: Warning!\n\nSee the :duref:`reST reference for substitutions &lt;substitution-definitions&gt;`\nfor details.\n\nIf you want to use some substitutions for all documents, put them into\n:confval:`rst_prolog` or put them into a separate file and include it into all\ndocuments you want to use them in, using the :rst:dir:`include` directive.  (Be\nsure to give the include file a file name extension differing from that of other\nsource files, to avoid Sphinx finding it as a standalone document.)\n\nSphinx defines some default substitutions, see :ref:`default-substitutions`.\n\n\nComments\n--------\n\nEvery explicit markup block which isn't a valid markup construct (like the\nfootnotes above) is regarded as a comment (:duref:`ref &lt;comments&gt;`).  For\nexample::\n\n   .. This is a comment.\n\nYou can indent text after a comment start to form multiline comments::\n\n   ..\n      This whole indented block\n      is a comment.\n\n      Still in the comment.\n\n\nSource encoding\n---------------\n\nSince the easiest way to include special characters like em dashes or copyright\nsigns in reST is to directly write them as Unicode characters, one has to\nspecify an encoding.  Sphinx assumes source files to be encoded in UTF-8 by\ndefault; you can change this with the :confval:`source_encoding` config value.\n\n\nGotchas\n-------\n\nThere are some problems one commonly runs into while authoring reST documents:\n\n* **Separation of inline markup:** As said above, inline markup spans must be\n  separated from the surrounding text by non-word characters, you have to use a\n  backslash-escaped space to get around that.  See `the reference\n  &lt;http://docutils.sf.net/docs/ref/rst/restructuredtext.html#inline-markup&gt;`_\n  for the details.\n\n* **No nested inline markup:** Something like ``*see :func:`foo`*`` is not\n  possible.\n\n\n.. rubric:: Footnotes\n\n.. [1] When the default domain contains a :rst:dir:`class` directive, this directive\n       will be shadowed.  Therefore, Sphinx re-exports it as :rst:dir:`rst-class`.\n</textarea></form>\n\n    <script>\n      var editor = CodeMirror.fromTextArea(document.getElementById(\"code\"), {\n        lineNumbers: true,\n      });\n    </script>\n    <p>\n        The <code>python</code> mode will be used for highlighting blocks\n        containing Python/IPython terminal sessions: blocks starting with\n        <code>&gt;&gt;&gt;</code> (for Python) or <code>In [num]:</code> (for\n        IPython).\n\n        Further, the <code>stex</code> mode will be used for highlighting\n        blocks containing LaTex code.\n    </p>\n\n    <p><strong>MIME types defined:</strong> <code>text/x-rst</code>.</p>\n  </article>\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/rst/rst.js",
    "content": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n(function(mod) {\n  if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n    mod(require(\"../../lib/codemirror\"), require(\"../python/python\"), require(\"../stex/stex\"), require(\"../../addon/mode/overlay\"));\n  else if (typeof define == \"function\" && define.amd) // AMD\n    define([\"../../lib/codemirror\", \"../python/python\", \"../stex/stex\", \"../../addon/mode/overlay\"], mod);\n  else // Plain browser env\n    mod(CodeMirror);\n})(function(CodeMirror) {\n\"use strict\";\n\nCodeMirror.defineMode('rst', function (config, options) {\n\n  var rx_strong = /^\\*\\*[^\\*\\s](?:[^\\*]*[^\\*\\s])?\\*\\*/;\n  var rx_emphasis = /^\\*[^\\*\\s](?:[^\\*]*[^\\*\\s])?\\*/;\n  var rx_literal = /^``[^`\\s](?:[^`]*[^`\\s])``/;\n\n  var rx_number = /^(?:[\\d]+(?:[\\.,]\\d+)*)/;\n  var rx_positive = /^(?:\\s\\+[\\d]+(?:[\\.,]\\d+)*)/;\n  var rx_negative = /^(?:\\s\\-[\\d]+(?:[\\.,]\\d+)*)/;\n\n  var rx_uri_protocol = \"[Hh][Tt][Tt][Pp][Ss]?://\";\n  var rx_uri_domain = \"(?:[\\\\d\\\\w.-]+)\\\\.(?:\\\\w{2,6})\";\n  var rx_uri_path = \"(?:/[\\\\d\\\\w\\\\#\\\\%\\\\&\\\\-\\\\.\\\\,\\\\/\\\\:\\\\=\\\\?\\\\~]+)*\";\n  var rx_uri = new RegExp(\"^\" + rx_uri_protocol + rx_uri_domain + rx_uri_path);\n\n  var overlay = {\n    token: function (stream) {\n\n      if (stream.match(rx_strong) && stream.match (/\\W+|$/, false))\n        return 'strong';\n      if (stream.match(rx_emphasis) && stream.match (/\\W+|$/, false))\n        return 'em';\n      if (stream.match(rx_literal) && stream.match (/\\W+|$/, false))\n        return 'string-2';\n      if (stream.match(rx_number))\n        return 'number';\n      if (stream.match(rx_positive))\n        return 'positive';\n      if (stream.match(rx_negative))\n        return 'negative';\n      if (stream.match(rx_uri))\n        return 'link';\n\n      while (stream.next() != null) {\n        if (stream.match(rx_strong, false)) break;\n        if (stream.match(rx_emphasis, false)) break;\n        if (stream.match(rx_literal, false)) break;\n        if (stream.match(rx_number, false)) break;\n        if (stream.match(rx_positive, false)) break;\n        if (stream.match(rx_negative, false)) break;\n        if (stream.match(rx_uri, false)) break;\n      }\n\n      return null;\n    }\n  };\n\n  var mode = CodeMirror.getMode(\n    config, options.backdrop || 'rst-base'\n  );\n\n  return CodeMirror.overlayMode(mode, overlay, true); // combine\n}, 'python', 'stex');\n\n///////////////////////////////////////////////////////////////////////////////\n///////////////////////////////////////////////////////////////////////////////\n\nCodeMirror.defineMode('rst-base', function (config) {\n\n  ///////////////////////////////////////////////////////////////////////////\n  ///////////////////////////////////////////////////////////////////////////\n\n  function format(string) {\n    var args = Array.prototype.slice.call(arguments, 1);\n    return string.replace(/{(\\d+)}/g, function (match, n) {\n      return typeof args[n] != 'undefined' ? args[n] : match;\n    });\n  }\n\n  ///////////////////////////////////////////////////////////////////////////\n  ///////////////////////////////////////////////////////////////////////////\n\n  var mode_python = CodeMirror.getMode(config, 'python');\n  var mode_stex = CodeMirror.getMode(config, 'stex');\n\n  ///////////////////////////////////////////////////////////////////////////\n  ///////////////////////////////////////////////////////////////////////////\n\n  var SEPA = \"\\\\s+\";\n  var TAIL = \"(?:\\\\s*|\\\\W|$)\",\n  rx_TAIL = new RegExp(format('^{0}', TAIL));\n\n  var NAME =\n    \"(?:[^\\\\W\\\\d_](?:[\\\\w!\\\"#$%&'()\\\\*\\\\+,\\\\-\\\\.\\/:;<=>\\\\?]*[^\\\\W_])?)\",\n  rx_NAME = new RegExp(format('^{0}', NAME));\n  var NAME_WWS =\n    \"(?:[^\\\\W\\\\d_](?:[\\\\w\\\\s!\\\"#$%&'()\\\\*\\\\+,\\\\-\\\\.\\/:;<=>\\\\?]*[^\\\\W_])?)\";\n  var REF_NAME = format('(?:{0}|`{1}`)', NAME, NAME_WWS);\n\n  var TEXT1 = \"(?:[^\\\\s\\\\|](?:[^\\\\|]*[^\\\\s\\\\|])?)\";\n  var TEXT2 = \"(?:[^\\\\`]+)\",\n  rx_TEXT2 = new RegExp(format('^{0}', TEXT2));\n\n  var rx_section = new RegExp(\n    \"^([!'#$%&\\\"()*+,-./:;<=>?@\\\\[\\\\\\\\\\\\]^_`{|}~])\\\\1{3,}\\\\s*$\");\n  var rx_explicit = new RegExp(\n    format('^\\\\.\\\\.{0}', SEPA));\n  var rx_link = new RegExp(\n    format('^_{0}:{1}|^__:{1}', REF_NAME, TAIL));\n  var rx_directive = new RegExp(\n    format('^{0}::{1}', REF_NAME, TAIL));\n  var rx_substitution = new RegExp(\n    format('^\\\\|{0}\\\\|{1}{2}::{3}', TEXT1, SEPA, REF_NAME, TAIL));\n  var rx_footnote = new RegExp(\n    format('^\\\\[(?:\\\\d+|#{0}?|\\\\*)]{1}', REF_NAME, TAIL));\n  var rx_citation = new RegExp(\n    format('^\\\\[{0}\\\\]{1}', REF_NAME, TAIL));\n\n  var rx_substitution_ref = new RegExp(\n    format('^\\\\|{0}\\\\|', TEXT1));\n  var rx_footnote_ref = new RegExp(\n    format('^\\\\[(?:\\\\d+|#{0}?|\\\\*)]_', REF_NAME));\n  var rx_citation_ref = new RegExp(\n    format('^\\\\[{0}\\\\]_', REF_NAME));\n  var rx_link_ref1 = new RegExp(\n    format('^{0}__?', REF_NAME));\n  var rx_link_ref2 = new RegExp(\n    format('^`{0}`_', TEXT2));\n\n  var rx_role_pre = new RegExp(\n    format('^:{0}:`{1}`{2}', NAME, TEXT2, TAIL));\n  var rx_role_suf = new RegExp(\n    format('^`{1}`:{0}:{2}', NAME, TEXT2, TAIL));\n  var rx_role = new RegExp(\n    format('^:{0}:{1}', NAME, TAIL));\n\n  var rx_directive_name = new RegExp(format('^{0}', REF_NAME));\n  var rx_directive_tail = new RegExp(format('^::{0}', TAIL));\n  var rx_substitution_text = new RegExp(format('^\\\\|{0}\\\\|', TEXT1));\n  var rx_substitution_sepa = new RegExp(format('^{0}', SEPA));\n  var rx_substitution_name = new RegExp(format('^{0}', REF_NAME));\n  var rx_substitution_tail = new RegExp(format('^::{0}', TAIL));\n  var rx_link_head = new RegExp(\"^_\");\n  var rx_link_name = new RegExp(format('^{0}|_', REF_NAME));\n  var rx_link_tail = new RegExp(format('^:{0}', TAIL));\n\n  var rx_verbatim = new RegExp('^::\\\\s*$');\n  var rx_examples = new RegExp('^\\\\s+(?:>>>|In \\\\[\\\\d+\\\\]:)\\\\s');\n\n  ///////////////////////////////////////////////////////////////////////////\n  ///////////////////////////////////////////////////////////////////////////\n\n  function to_normal(stream, state) {\n    var token = null;\n\n    if (stream.sol() && stream.match(rx_examples, false)) {\n      change(state, to_mode, {\n        mode: mode_python, local: CodeMirror.startState(mode_python)\n      });\n    } else if (stream.sol() && stream.match(rx_explicit)) {\n      change(state, to_explicit);\n      token = 'meta';\n    } else if (stream.sol() && stream.match(rx_section)) {\n      change(state, to_normal);\n      token = 'header';\n    } else if (phase(state) == rx_role_pre ||\n               stream.match(rx_role_pre, false)) {\n\n      switch (stage(state)) {\n      case 0:\n        change(state, to_normal, context(rx_role_pre, 1));\n        stream.match(/^:/);\n        token = 'meta';\n        break;\n      case 1:\n        change(state, to_normal, context(rx_role_pre, 2));\n        stream.match(rx_NAME);\n        token = 'keyword';\n\n        if (stream.current().match(/^(?:math|latex)/)) {\n          state.tmp_stex = true;\n        }\n        break;\n      case 2:\n        change(state, to_normal, context(rx_role_pre, 3));\n        stream.match(/^:`/);\n        token = 'meta';\n        break;\n      case 3:\n        if (state.tmp_stex) {\n          state.tmp_stex = undefined; state.tmp = {\n            mode: mode_stex, local: CodeMirror.startState(mode_stex)\n          };\n        }\n\n        if (state.tmp) {\n          if (stream.peek() == '`') {\n            change(state, to_normal, context(rx_role_pre, 4));\n            state.tmp = undefined;\n            break;\n          }\n\n          token = state.tmp.mode.token(stream, state.tmp.local);\n          break;\n        }\n\n        change(state, to_normal, context(rx_role_pre, 4));\n        stream.match(rx_TEXT2);\n        token = 'string';\n        break;\n      case 4:\n        change(state, to_normal, context(rx_role_pre, 5));\n        stream.match(/^`/);\n        token = 'meta';\n        break;\n      case 5:\n        change(state, to_normal, context(rx_role_pre, 6));\n        stream.match(rx_TAIL);\n        break;\n      default:\n        change(state, to_normal);\n      }\n    } else if (phase(state) == rx_role_suf ||\n               stream.match(rx_role_suf, false)) {\n\n      switch (stage(state)) {\n      case 0:\n        change(state, to_normal, context(rx_role_suf, 1));\n        stream.match(/^`/);\n        token = 'meta';\n        break;\n      case 1:\n        change(state, to_normal, context(rx_role_suf, 2));\n        stream.match(rx_TEXT2);\n        token = 'string';\n        break;\n      case 2:\n        change(state, to_normal, context(rx_role_suf, 3));\n        stream.match(/^`:/);\n        token = 'meta';\n        break;\n      case 3:\n        change(state, to_normal, context(rx_role_suf, 4));\n        stream.match(rx_NAME);\n        token = 'keyword';\n        break;\n      case 4:\n        change(state, to_normal, context(rx_role_suf, 5));\n        stream.match(/^:/);\n        token = 'meta';\n        break;\n      case 5:\n        change(state, to_normal, context(rx_role_suf, 6));\n        stream.match(rx_TAIL);\n        break;\n      default:\n        change(state, to_normal);\n      }\n    } else if (phase(state) == rx_role || stream.match(rx_role, false)) {\n\n      switch (stage(state)) {\n      case 0:\n        change(state, to_normal, context(rx_role, 1));\n        stream.match(/^:/);\n        token = 'meta';\n        break;\n      case 1:\n        change(state, to_normal, context(rx_role, 2));\n        stream.match(rx_NAME);\n        token = 'keyword';\n        break;\n      case 2:\n        change(state, to_normal, context(rx_role, 3));\n        stream.match(/^:/);\n        token = 'meta';\n        break;\n      case 3:\n        change(state, to_normal, context(rx_role, 4));\n        stream.match(rx_TAIL);\n        break;\n      default:\n        change(state, to_normal);\n      }\n    } else if (phase(state) == rx_substitution_ref ||\n               stream.match(rx_substitution_ref, false)) {\n\n      switch (stage(state)) {\n      case 0:\n        change(state, to_normal, context(rx_substitution_ref, 1));\n        stream.match(rx_substitution_text);\n        token = 'variable-2';\n        break;\n      case 1:\n        change(state, to_normal, context(rx_substitution_ref, 2));\n        if (stream.match(/^_?_?/)) token = 'link';\n        break;\n      default:\n        change(state, to_normal);\n      }\n    } else if (stream.match(rx_footnote_ref)) {\n      change(state, to_normal);\n      token = 'quote';\n    } else if (stream.match(rx_citation_ref)) {\n      change(state, to_normal);\n      token = 'quote';\n    } else if (stream.match(rx_link_ref1)) {\n      change(state, to_normal);\n      if (!stream.peek() || stream.peek().match(/^\\W$/)) {\n        token = 'link';\n      }\n    } else if (phase(state) == rx_link_ref2 ||\n               stream.match(rx_link_ref2, false)) {\n\n      switch (stage(state)) {\n      case 0:\n        if (!stream.peek() || stream.peek().match(/^\\W$/)) {\n          change(state, to_normal, context(rx_link_ref2, 1));\n        } else {\n          stream.match(rx_link_ref2);\n        }\n        break;\n      case 1:\n        change(state, to_normal, context(rx_link_ref2, 2));\n        stream.match(/^`/);\n        token = 'link';\n        break;\n      case 2:\n        change(state, to_normal, context(rx_link_ref2, 3));\n        stream.match(rx_TEXT2);\n        break;\n      case 3:\n        change(state, to_normal, context(rx_link_ref2, 4));\n        stream.match(/^`_/);\n        token = 'link';\n        break;\n      default:\n        change(state, to_normal);\n      }\n    } else if (stream.match(rx_verbatim)) {\n      change(state, to_verbatim);\n    }\n\n    else {\n      if (stream.next()) change(state, to_normal);\n    }\n\n    return token;\n  }\n\n  ///////////////////////////////////////////////////////////////////////////\n  ///////////////////////////////////////////////////////////////////////////\n\n  function to_explicit(stream, state) {\n    var token = null;\n\n    if (phase(state) == rx_substitution ||\n        stream.match(rx_substitution, false)) {\n\n      switch (stage(state)) {\n      case 0:\n        change(state, to_explicit, context(rx_substitution, 1));\n        stream.match(rx_substitution_text);\n        token = 'variable-2';\n        break;\n      case 1:\n        change(state, to_explicit, context(rx_substitution, 2));\n        stream.match(rx_substitution_sepa);\n        break;\n      case 2:\n        change(state, to_explicit, context(rx_substitution, 3));\n        stream.match(rx_substitution_name);\n        token = 'keyword';\n        break;\n      case 3:\n        change(state, to_explicit, context(rx_substitution, 4));\n        stream.match(rx_substitution_tail);\n        token = 'meta';\n        break;\n      default:\n        change(state, to_normal);\n      }\n    } else if (phase(state) == rx_directive ||\n               stream.match(rx_directive, false)) {\n\n      switch (stage(state)) {\n      case 0:\n        change(state, to_explicit, context(rx_directive, 1));\n        stream.match(rx_directive_name);\n        token = 'keyword';\n\n        if (stream.current().match(/^(?:math|latex)/))\n          state.tmp_stex = true;\n        else if (stream.current().match(/^python/))\n          state.tmp_py = true;\n        break;\n      case 1:\n        change(state, to_explicit, context(rx_directive, 2));\n        stream.match(rx_directive_tail);\n        token = 'meta';\n\n        if (stream.match(/^latex\\s*$/) || state.tmp_stex) {\n          state.tmp_stex = undefined; change(state, to_mode, {\n            mode: mode_stex, local: CodeMirror.startState(mode_stex)\n          });\n        }\n        break;\n      case 2:\n        change(state, to_explicit, context(rx_directive, 3));\n        if (stream.match(/^python\\s*$/) || state.tmp_py) {\n          state.tmp_py = undefined; change(state, to_mode, {\n            mode: mode_python, local: CodeMirror.startState(mode_python)\n          });\n        }\n        break;\n      default:\n        change(state, to_normal);\n      }\n    } else if (phase(state) == rx_link || stream.match(rx_link, false)) {\n\n      switch (stage(state)) {\n      case 0:\n        change(state, to_explicit, context(rx_link, 1));\n        stream.match(rx_link_head);\n        stream.match(rx_link_name);\n        token = 'link';\n        break;\n      case 1:\n        change(state, to_explicit, context(rx_link, 2));\n        stream.match(rx_link_tail);\n        token = 'meta';\n        break;\n      default:\n        change(state, to_normal);\n      }\n    } else if (stream.match(rx_footnote)) {\n      change(state, to_normal);\n      token = 'quote';\n    } else if (stream.match(rx_citation)) {\n      change(state, to_normal);\n      token = 'quote';\n    }\n\n    else {\n      stream.eatSpace();\n      if (stream.eol()) {\n        change(state, to_normal);\n      } else {\n        stream.skipToEnd();\n        change(state, to_comment);\n        token = 'comment';\n      }\n    }\n\n    return token;\n  }\n\n  ///////////////////////////////////////////////////////////////////////////\n  ///////////////////////////////////////////////////////////////////////////\n\n  function to_comment(stream, state) {\n    return as_block(stream, state, 'comment');\n  }\n\n  function to_verbatim(stream, state) {\n    return as_block(stream, state, 'meta');\n  }\n\n  function as_block(stream, state, token) {\n    if (stream.eol() || stream.eatSpace()) {\n      stream.skipToEnd();\n      return token;\n    } else {\n      change(state, to_normal);\n      return null;\n    }\n  }\n\n  ///////////////////////////////////////////////////////////////////////////\n  ///////////////////////////////////////////////////////////////////////////\n\n  function to_mode(stream, state) {\n\n    if (state.ctx.mode && state.ctx.local) {\n\n      if (stream.sol()) {\n        if (!stream.eatSpace()) change(state, to_normal);\n        return null;\n      }\n\n      return state.ctx.mode.token(stream, state.ctx.local);\n    }\n\n    change(state, to_normal);\n    return null;\n  }\n\n  ///////////////////////////////////////////////////////////////////////////\n  ///////////////////////////////////////////////////////////////////////////\n\n  function context(phase, stage, mode, local) {\n    return {phase: phase, stage: stage, mode: mode, local: local};\n  }\n\n  function change(state, tok, ctx) {\n    state.tok = tok;\n    state.ctx = ctx || {};\n  }\n\n  function stage(state) {\n    return state.ctx.stage || 0;\n  }\n\n  function phase(state) {\n    return state.ctx.phase;\n  }\n\n  ///////////////////////////////////////////////////////////////////////////\n  ///////////////////////////////////////////////////////////////////////////\n\n  return {\n    startState: function () {\n      return {tok: to_normal, ctx: context(undefined, 0)};\n    },\n\n    copyState: function (state) {\n      var ctx = state.ctx, tmp = state.tmp;\n      if (ctx.local)\n        ctx = {mode: ctx.mode, local: CodeMirror.copyState(ctx.mode, ctx.local)};\n      if (tmp)\n        tmp = {mode: tmp.mode, local: CodeMirror.copyState(tmp.mode, tmp.local)};\n      return {tok: state.tok, ctx: ctx, tmp: tmp};\n    },\n\n    innerMode: function (state) {\n      return state.tmp      ? {state: state.tmp.local, mode: state.tmp.mode}\n      : state.ctx.mode ? {state: state.ctx.local, mode: state.ctx.mode}\n      : null;\n    },\n\n    token: function (stream, state) {\n      return state.tok(stream, state);\n    }\n  };\n}, 'python', 'stex');\n\n///////////////////////////////////////////////////////////////////////////////\n///////////////////////////////////////////////////////////////////////////////\n\nCodeMirror.defineMIME('text/x-rst', 'rst');\n\n///////////////////////////////////////////////////////////////////////////////\n///////////////////////////////////////////////////////////////////////////////\n\n});\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/ruby/index.html",
    "content": "<!doctype html>\n\n<title>CodeMirror: Ruby mode</title>\n<meta charset=\"utf-8\"/>\n<link rel=stylesheet href=\"../../doc/docs.css\">\n\n<link rel=\"stylesheet\" href=\"../../lib/codemirror.css\">\n<script src=\"../../lib/codemirror.js\"></script>\n<script src=\"../../addon/edit/matchbrackets.js\"></script>\n<script src=\"ruby.js\"></script>\n<style>\n      .CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}\n      .cm-s-default span.cm-arrow { color: red; }\n    </style>\n<div id=nav>\n  <a href=\"http://codemirror.net\"><h1>CodeMirror</h1><img id=logo src=\"../../doc/logo.png\"></a>\n\n  <ul>\n    <li><a href=\"../../index.html\">Home</a>\n    <li><a href=\"../../doc/manual.html\">Manual</a>\n    <li><a href=\"https://github.com/codemirror/codemirror\">Code</a>\n  </ul>\n  <ul>\n    <li><a href=\"../index.html\">Language modes</a>\n    <li><a class=active href=\"#\">Ruby</a>\n  </ul>\n</div>\n\n<article>\n<h2>Ruby mode</h2>\n<form><textarea id=\"code\" name=\"code\">\n# Code from http://sandbox.mc.edu/~bennet/ruby/code/poly_rb.html\n#\n# This program evaluates polynomials.  It first asks for the coefficients\n# of a polynomial, which must be entered on one line, highest-order first.\n# It then requests values of x and will compute the value of the poly for\n# each x.  It will repeatly ask for x values, unless you the user enters\n# a blank line.  It that case, it will ask for another polynomial.  If the\n# user types quit for either input, the program immediately exits.\n#\n\n#\n# Function to evaluate a polynomial at x.  The polynomial is given\n# as a list of coefficients, from the greatest to the least.\ndef polyval(x, coef)\n    sum = 0\n    coef = coef.clone           # Don't want to destroy the original\n    while true\n        sum += coef.shift       # Add and remove the next coef\n        break if coef.empty?    # If no more, done entirely.\n        sum *= x                # This happens the right number of times.\n    end\n    return sum\nend\n\n#\n# Function to read a line containing a list of integers and return\n# them as an array of integers.  If the string conversion fails, it\n# throws TypeError.  If the input line is the word 'quit', then it\n# converts it to an end-of-file exception\ndef readints(prompt)\n    # Read a line\n    print prompt\n    line = readline.chomp\n    raise EOFError.new if line == 'quit' # You can also use a real EOF.\n            \n    # Go through each item on the line, converting each one and adding it\n    # to retval.\n    retval = [ ]\n    for str in line.split(/\\s+/)\n        if str =~ /^\\-?\\d+$/\n            retval.push(str.to_i)\n        else\n            raise TypeError.new\n        end\n    end\n\n    return retval\nend\n\n#\n# Take a coeff and an exponent and return the string representation, ignoring\n# the sign of the coefficient.\ndef term_to_str(coef, exp)\n    ret = \"\"\n\n    # Show coeff, unless it's 1 or at the right\n    coef = coef.abs\n    ret = coef.to_s     unless coef == 1 && exp > 0\n    ret += \"x\" if exp > 0                               # x if exponent not 0\n    ret += \"^\" + exp.to_s if exp > 1                    # ^exponent, if > 1.\n\n    return ret\nend\n\n#\n# Create a string of the polynomial in sort-of-readable form.\ndef polystr(p)\n    # Get the exponent of first coefficient, plus 1.\n    exp = p.length\n\n    # Assign exponents to each term, making pairs of coeff and exponent,\n    # Then get rid of the zero terms.\n    p = (p.map { |c| exp -= 1; [ c, exp ] }).select { |p| p[0] != 0 }\n\n    # If there's nothing left, it's a zero\n    return \"0\" if p.empty?\n\n    # *** Now p is a non-empty list of [ coef, exponent ] pairs. ***\n\n    # Convert the first term, preceded by a \"-\" if it's negative.\n    result = (if p[0][0] < 0 then \"-\" else \"\" end) + term_to_str(*p[0])\n\n    # Convert the rest of the terms, in each case adding the appropriate\n    # + or - separating them.  \n    for term in p[1...p.length]\n        # Add the separator then the rep. of the term.\n        result += (if term[0] < 0 then \" - \" else \" + \" end) + \n                term_to_str(*term)\n    end\n\n    return result\nend\n        \n#\n# Run until some kind of endfile.\nbegin\n    # Repeat until an exception or quit gets us out.\n    while true\n        # Read a poly until it works.  An EOF will except out of the\n        # program.\n        print \"\\n\"\n        begin\n            poly = readints(\"Enter a polynomial coefficients: \")\n        rescue TypeError\n            print \"Try again.\\n\"\n            retry\n        end\n        break if poly.empty?\n\n        # Read and evaluate x values until the user types a blank line.\n        # Again, an EOF will except out of the pgm.\n        while true\n            # Request an integer.\n            print \"Enter x value or blank line: \"\n            x = readline.chomp\n            break if x == ''\n            raise EOFError.new if x == 'quit'\n\n            # If it looks bad, let's try again.\n            if x !~ /^\\-?\\d+$/\n                print \"That doesn't look like an integer.  Please try again.\\n\"\n                next\n            end\n\n            # Convert to an integer and print the result.\n            x = x.to_i\n            print \"p(x) = \", polystr(poly), \"\\n\"\n            print \"p(\", x, \") = \", polyval(x, poly), \"\\n\"\n        end\n    end\nrescue EOFError\n    print \"\\n=== EOF ===\\n\"\nrescue Interrupt, SignalException\n    print \"\\n=== Interrupted ===\\n\"\nelse\n    print \"--- Bye ---\\n\"\nend\n</textarea></form>\n    <script>\n      var editor = CodeMirror.fromTextArea(document.getElementById(\"code\"), {\n        mode: \"text/x-ruby\",\n        matchBrackets: true,\n        indentUnit: 4\n      });\n    </script>\n\n    <p><strong>MIME types defined:</strong> <code>text/x-ruby</code>.</p>\n\n    <p>Development of the CodeMirror Ruby mode was kindly sponsored\n    by <a href=\"http://ubalo.com/\">Ubalo</a>.</p>\n\n  </article>\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/ruby/ruby.js",
    "content": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n(function(mod) {\n  if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n    mod(require(\"../../lib/codemirror\"));\n  else if (typeof define == \"function\" && define.amd) // AMD\n    define([\"../../lib/codemirror\"], mod);\n  else // Plain browser env\n    mod(CodeMirror);\n})(function(CodeMirror) {\n\"use strict\";\n\nCodeMirror.defineMode(\"ruby\", function(config) {\n  function wordObj(words) {\n    var o = {};\n    for (var i = 0, e = words.length; i < e; ++i) o[words[i]] = true;\n    return o;\n  }\n  var keywords = wordObj([\n    \"alias\", \"and\", \"BEGIN\", \"begin\", \"break\", \"case\", \"class\", \"def\", \"defined?\", \"do\", \"else\",\n    \"elsif\", \"END\", \"end\", \"ensure\", \"false\", \"for\", \"if\", \"in\", \"module\", \"next\", \"not\", \"or\",\n    \"redo\", \"rescue\", \"retry\", \"return\", \"self\", \"super\", \"then\", \"true\", \"undef\", \"unless\",\n    \"until\", \"when\", \"while\", \"yield\", \"nil\", \"raise\", \"throw\", \"catch\", \"fail\", \"loop\", \"callcc\",\n    \"caller\", \"lambda\", \"proc\", \"public\", \"protected\", \"private\", \"require\", \"load\",\n    \"require_relative\", \"extend\", \"autoload\", \"__END__\", \"__FILE__\", \"__LINE__\", \"__dir__\"\n  ]);\n  var indentWords = wordObj([\"def\", \"class\", \"case\", \"for\", \"while\", \"module\", \"then\",\n                             \"catch\", \"loop\", \"proc\", \"begin\"]);\n  var dedentWords = wordObj([\"end\", \"until\"]);\n  var matching = {\"[\": \"]\", \"{\": \"}\", \"(\": \")\"};\n  var curPunc;\n\n  function chain(newtok, stream, state) {\n    state.tokenize.push(newtok);\n    return newtok(stream, state);\n  }\n\n  function tokenBase(stream, state) {\n    curPunc = null;\n    if (stream.sol() && stream.match(\"=begin\") && stream.eol()) {\n      state.tokenize.push(readBlockComment);\n      return \"comment\";\n    }\n    if (stream.eatSpace()) return null;\n    var ch = stream.next(), m;\n    if (ch == \"`\" || ch == \"'\" || ch == '\"') {\n      return chain(readQuoted(ch, \"string\", ch == '\"' || ch == \"`\"), stream, state);\n    } else if (ch == \"/\") {\n      var currentIndex = stream.current().length;\n      if (stream.skipTo(\"/\")) {\n        var search_till = stream.current().length;\n        stream.backUp(stream.current().length - currentIndex);\n        var balance = 0;  // balance brackets\n        while (stream.current().length < search_till) {\n          var chchr = stream.next();\n          if (chchr == \"(\") balance += 1;\n          else if (chchr == \")\") balance -= 1;\n          if (balance < 0) break;\n        }\n        stream.backUp(stream.current().length - currentIndex);\n        if (balance == 0)\n          return chain(readQuoted(ch, \"string-2\", true), stream, state);\n      }\n      return \"operator\";\n    } else if (ch == \"%\") {\n      var style = \"string\", embed = true;\n      if (stream.eat(\"s\")) style = \"atom\";\n      else if (stream.eat(/[WQ]/)) style = \"string\";\n      else if (stream.eat(/[r]/)) style = \"string-2\";\n      else if (stream.eat(/[wxq]/)) { style = \"string\"; embed = false; }\n      var delim = stream.eat(/[^\\w\\s=]/);\n      if (!delim) return \"operator\";\n      if (matching.propertyIsEnumerable(delim)) delim = matching[delim];\n      return chain(readQuoted(delim, style, embed, true), stream, state);\n    } else if (ch == \"#\") {\n      stream.skipToEnd();\n      return \"comment\";\n    } else if (ch == \"<\" && (m = stream.match(/^<-?[\\`\\\"\\']?([a-zA-Z_?]\\w*)[\\`\\\"\\']?(?:;|$)/))) {\n      return chain(readHereDoc(m[1]), stream, state);\n    } else if (ch == \"0\") {\n      if (stream.eat(\"x\")) stream.eatWhile(/[\\da-fA-F]/);\n      else if (stream.eat(\"b\")) stream.eatWhile(/[01]/);\n      else stream.eatWhile(/[0-7]/);\n      return \"number\";\n    } else if (/\\d/.test(ch)) {\n      stream.match(/^[\\d_]*(?:\\.[\\d_]+)?(?:[eE][+\\-]?[\\d_]+)?/);\n      return \"number\";\n    } else if (ch == \"?\") {\n      while (stream.match(/^\\\\[CM]-/)) {}\n      if (stream.eat(\"\\\\\")) stream.eatWhile(/\\w/);\n      else stream.next();\n      return \"string\";\n    } else if (ch == \":\") {\n      if (stream.eat(\"'\")) return chain(readQuoted(\"'\", \"atom\", false), stream, state);\n      if (stream.eat('\"')) return chain(readQuoted('\"', \"atom\", true), stream, state);\n\n      // :> :>> :< :<< are valid symbols\n      if (stream.eat(/[\\<\\>]/)) {\n        stream.eat(/[\\<\\>]/);\n        return \"atom\";\n      }\n\n      // :+ :- :/ :* :| :& :! are valid symbols\n      if (stream.eat(/[\\+\\-\\*\\/\\&\\|\\:\\!]/)) {\n        return \"atom\";\n      }\n\n      // Symbols can't start by a digit\n      if (stream.eat(/[a-zA-Z$@_\\xa1-\\uffff]/)) {\n        stream.eatWhile(/[\\w$\\xa1-\\uffff]/);\n        // Only one ? ! = is allowed and only as the last character\n        stream.eat(/[\\?\\!\\=]/);\n        return \"atom\";\n      }\n      return \"operator\";\n    } else if (ch == \"@\" && stream.match(/^@?[a-zA-Z_\\xa1-\\uffff]/)) {\n      stream.eat(\"@\");\n      stream.eatWhile(/[\\w\\xa1-\\uffff]/);\n      return \"variable-2\";\n    } else if (ch == \"$\") {\n      if (stream.eat(/[a-zA-Z_]/)) {\n        stream.eatWhile(/[\\w]/);\n      } else if (stream.eat(/\\d/)) {\n        stream.eat(/\\d/);\n      } else {\n        stream.next(); // Must be a special global like $: or $!\n      }\n      return \"variable-3\";\n    } else if (/[a-zA-Z_\\xa1-\\uffff]/.test(ch)) {\n      stream.eatWhile(/[\\w\\xa1-\\uffff]/);\n      stream.eat(/[\\?\\!]/);\n      if (stream.eat(\":\")) return \"atom\";\n      return \"ident\";\n    } else if (ch == \"|\" && (state.varList || state.lastTok == \"{\" || state.lastTok == \"do\")) {\n      curPunc = \"|\";\n      return null;\n    } else if (/[\\(\\)\\[\\]{}\\\\;]/.test(ch)) {\n      curPunc = ch;\n      return null;\n    } else if (ch == \"-\" && stream.eat(\">\")) {\n      return \"arrow\";\n    } else if (/[=+\\-\\/*:\\.^%<>~|]/.test(ch)) {\n      var more = stream.eatWhile(/[=+\\-\\/*:\\.^%<>~|]/);\n      if (ch == \".\" && !more) curPunc = \".\";\n      return \"operator\";\n    } else {\n      return null;\n    }\n  }\n\n  function tokenBaseUntilBrace(depth) {\n    if (!depth) depth = 1;\n    return function(stream, state) {\n      if (stream.peek() == \"}\") {\n        if (depth == 1) {\n          state.tokenize.pop();\n          return state.tokenize[state.tokenize.length-1](stream, state);\n        } else {\n          state.tokenize[state.tokenize.length - 1] = tokenBaseUntilBrace(depth - 1);\n        }\n      } else if (stream.peek() == \"{\") {\n        state.tokenize[state.tokenize.length - 1] = tokenBaseUntilBrace(depth + 1);\n      }\n      return tokenBase(stream, state);\n    };\n  }\n  function tokenBaseOnce() {\n    var alreadyCalled = false;\n    return function(stream, state) {\n      if (alreadyCalled) {\n        state.tokenize.pop();\n        return state.tokenize[state.tokenize.length-1](stream, state);\n      }\n      alreadyCalled = true;\n      return tokenBase(stream, state);\n    };\n  }\n  function readQuoted(quote, style, embed, unescaped) {\n    return function(stream, state) {\n      var escaped = false, ch;\n\n      if (state.context.type === 'read-quoted-paused') {\n        state.context = state.context.prev;\n        stream.eat(\"}\");\n      }\n\n      while ((ch = stream.next()) != null) {\n        if (ch == quote && (unescaped || !escaped)) {\n          state.tokenize.pop();\n          break;\n        }\n        if (embed && ch == \"#\" && !escaped) {\n          if (stream.eat(\"{\")) {\n            if (quote == \"}\") {\n              state.context = {prev: state.context, type: 'read-quoted-paused'};\n            }\n            state.tokenize.push(tokenBaseUntilBrace());\n            break;\n          } else if (/[@\\$]/.test(stream.peek())) {\n            state.tokenize.push(tokenBaseOnce());\n            break;\n          }\n        }\n        escaped = !escaped && ch == \"\\\\\";\n      }\n      return style;\n    };\n  }\n  function readHereDoc(phrase) {\n    return function(stream, state) {\n      if (stream.match(phrase)) state.tokenize.pop();\n      else stream.skipToEnd();\n      return \"string\";\n    };\n  }\n  function readBlockComment(stream, state) {\n    if (stream.sol() && stream.match(\"=end\") && stream.eol())\n      state.tokenize.pop();\n    stream.skipToEnd();\n    return \"comment\";\n  }\n\n  return {\n    startState: function() {\n      return {tokenize: [tokenBase],\n              indented: 0,\n              context: {type: \"top\", indented: -config.indentUnit},\n              continuedLine: false,\n              lastTok: null,\n              varList: false};\n    },\n\n    token: function(stream, state) {\n      if (stream.sol()) state.indented = stream.indentation();\n      var style = state.tokenize[state.tokenize.length-1](stream, state), kwtype;\n      var thisTok = curPunc;\n      if (style == \"ident\") {\n        var word = stream.current();\n        style = state.lastTok == \".\" ? \"property\"\n          : keywords.propertyIsEnumerable(stream.current()) ? \"keyword\"\n          : /^[A-Z]/.test(word) ? \"tag\"\n          : (state.lastTok == \"def\" || state.lastTok == \"class\" || state.varList) ? \"def\"\n          : \"variable\";\n        if (style == \"keyword\") {\n          thisTok = word;\n          if (indentWords.propertyIsEnumerable(word)) kwtype = \"indent\";\n          else if (dedentWords.propertyIsEnumerable(word)) kwtype = \"dedent\";\n          else if ((word == \"if\" || word == \"unless\") && stream.column() == stream.indentation())\n            kwtype = \"indent\";\n          else if (word == \"do\" && state.context.indented < state.indented)\n            kwtype = \"indent\";\n        }\n      }\n      if (curPunc || (style && style != \"comment\")) state.lastTok = thisTok;\n      if (curPunc == \"|\") state.varList = !state.varList;\n\n      if (kwtype == \"indent\" || /[\\(\\[\\{]/.test(curPunc))\n        state.context = {prev: state.context, type: curPunc || style, indented: state.indented};\n      else if ((kwtype == \"dedent\" || /[\\)\\]\\}]/.test(curPunc)) && state.context.prev)\n        state.context = state.context.prev;\n\n      if (stream.eol())\n        state.continuedLine = (curPunc == \"\\\\\" || style == \"operator\");\n      return style;\n    },\n\n    indent: function(state, textAfter) {\n      if (state.tokenize[state.tokenize.length-1] != tokenBase) return 0;\n      var firstChar = textAfter && textAfter.charAt(0);\n      var ct = state.context;\n      var closing = ct.type == matching[firstChar] ||\n        ct.type == \"keyword\" && /^(?:end|until|else|elsif|when|rescue)\\b/.test(textAfter);\n      return ct.indented + (closing ? 0 : config.indentUnit) +\n        (state.continuedLine ? config.indentUnit : 0);\n    },\n\n    electricChars: \"}de\", // enD and rescuE\n    lineComment: \"#\"\n  };\n});\n\nCodeMirror.defineMIME(\"text/x-ruby\", \"ruby\");\n\n});\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/ruby/test.js",
    "content": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n(function() {\n  var mode = CodeMirror.getMode({indentUnit: 2}, \"ruby\");\n  function MT(name) { test.mode(name, mode, Array.prototype.slice.call(arguments, 1)); }\n\n  MT(\"divide_equal_operator\",\n     \"[variable bar] [operator /=] [variable foo]\");\n\n  MT(\"divide_equal_operator_no_spacing\",\n     \"[variable foo][operator /=][number 42]\");\n\n})();\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/rust/index.html",
    "content": "<!doctype html>\n\n<title>CodeMirror: Rust mode</title>\n<meta charset=\"utf-8\"/>\n<link rel=stylesheet href=\"../../doc/docs.css\">\n\n<link rel=\"stylesheet\" href=\"../../lib/codemirror.css\">\n<script src=\"../../lib/codemirror.js\"></script>\n<script src=\"rust.js\"></script>\n<style type=\"text/css\">.CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}</style>\n<div id=nav>\n  <a href=\"http://codemirror.net\"><h1>CodeMirror</h1><img id=logo src=\"../../doc/logo.png\"></a>\n\n  <ul>\n    <li><a href=\"../../index.html\">Home</a>\n    <li><a href=\"../../doc/manual.html\">Manual</a>\n    <li><a href=\"https://github.com/codemirror/codemirror\">Code</a>\n  </ul>\n  <ul>\n    <li><a href=\"../index.html\">Language modes</a>\n    <li><a class=active href=\"#\">Rust</a>\n  </ul>\n</div>\n\n<article>\n<h2>Rust mode</h2>\n\n\n<div><textarea id=\"code\" name=\"code\">\n// Demo code.\n\ntype foo<T> = int;\nenum bar {\n    some(int, foo<float>),\n    none\n}\n\nfn check_crate(x: int) {\n    let v = 10;\n    alt foo {\n      1 to 3 {\n        print_foo();\n        if x {\n            blah() + 10;\n        }\n      }\n      (x, y) { \"bye\" }\n      _ { \"hi\" }\n    }\n}\n</textarea></div>\n\n    <script>\n      var editor = CodeMirror.fromTextArea(document.getElementById(\"code\"), {\n        lineNumbers: true\n      });\n    </script>\n\n    <p><strong>MIME types defined:</strong> <code>text/x-rustsrc</code>.</p>\n  </article>\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/rust/rust.js",
    "content": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n(function(mod) {\n  if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n    mod(require(\"../../lib/codemirror\"));\n  else if (typeof define == \"function\" && define.amd) // AMD\n    define([\"../../lib/codemirror\"], mod);\n  else // Plain browser env\n    mod(CodeMirror);\n})(function(CodeMirror) {\n\"use strict\";\n\nCodeMirror.defineMode(\"rust\", function() {\n  var indentUnit = 4, altIndentUnit = 2;\n  var valKeywords = {\n    \"if\": \"if-style\", \"while\": \"if-style\", \"loop\": \"else-style\", \"else\": \"else-style\",\n    \"do\": \"else-style\", \"ret\": \"else-style\", \"fail\": \"else-style\",\n    \"break\": \"atom\", \"cont\": \"atom\", \"const\": \"let\", \"resource\": \"fn\",\n    \"let\": \"let\", \"fn\": \"fn\", \"for\": \"for\", \"alt\": \"alt\", \"iface\": \"iface\",\n    \"impl\": \"impl\", \"type\": \"type\", \"enum\": \"enum\", \"mod\": \"mod\",\n    \"as\": \"op\", \"true\": \"atom\", \"false\": \"atom\", \"assert\": \"op\", \"check\": \"op\",\n    \"claim\": \"op\", \"native\": \"ignore\", \"unsafe\": \"ignore\", \"import\": \"else-style\",\n    \"export\": \"else-style\", \"copy\": \"op\", \"log\": \"op\", \"log_err\": \"op\",\n    \"use\": \"op\", \"bind\": \"op\", \"self\": \"atom\", \"struct\": \"enum\"\n  };\n  var typeKeywords = function() {\n    var keywords = {\"fn\": \"fn\", \"block\": \"fn\", \"obj\": \"obj\"};\n    var atoms = \"bool uint int i8 i16 i32 i64 u8 u16 u32 u64 float f32 f64 str char\".split(\" \");\n    for (var i = 0, e = atoms.length; i < e; ++i) keywords[atoms[i]] = \"atom\";\n    return keywords;\n  }();\n  var operatorChar = /[+\\-*&%=<>!?|\\.@]/;\n\n  // Tokenizer\n\n  // Used as scratch variable to communicate multiple values without\n  // consing up tons of objects.\n  var tcat, content;\n  function r(tc, style) {\n    tcat = tc;\n    return style;\n  }\n\n  function tokenBase(stream, state) {\n    var ch = stream.next();\n    if (ch == '\"') {\n      state.tokenize = tokenString;\n      return state.tokenize(stream, state);\n    }\n    if (ch == \"'\") {\n      tcat = \"atom\";\n      if (stream.eat(\"\\\\\")) {\n        if (stream.skipTo(\"'\")) { stream.next(); return \"string\"; }\n        else { return \"error\"; }\n      } else {\n        stream.next();\n        return stream.eat(\"'\") ? \"string\" : \"error\";\n      }\n    }\n    if (ch == \"/\") {\n      if (stream.eat(\"/\")) { stream.skipToEnd(); return \"comment\"; }\n      if (stream.eat(\"*\")) {\n        state.tokenize = tokenComment(1);\n        return state.tokenize(stream, state);\n      }\n    }\n    if (ch == \"#\") {\n      if (stream.eat(\"[\")) { tcat = \"open-attr\"; return null; }\n      stream.eatWhile(/\\w/);\n      return r(\"macro\", \"meta\");\n    }\n    if (ch == \":\" && stream.match(\":<\")) {\n      return r(\"op\", null);\n    }\n    if (ch.match(/\\d/) || (ch == \".\" && stream.eat(/\\d/))) {\n      var flp = false;\n      if (!stream.match(/^x[\\da-f]+/i) && !stream.match(/^b[01]+/)) {\n        stream.eatWhile(/\\d/);\n        if (stream.eat(\".\")) { flp = true; stream.eatWhile(/\\d/); }\n        if (stream.match(/^e[+\\-]?\\d+/i)) { flp = true; }\n      }\n      if (flp) stream.match(/^f(?:32|64)/);\n      else stream.match(/^[ui](?:8|16|32|64)/);\n      return r(\"atom\", \"number\");\n    }\n    if (ch.match(/[()\\[\\]{}:;,]/)) return r(ch, null);\n    if (ch == \"-\" && stream.eat(\">\")) return r(\"->\", null);\n    if (ch.match(operatorChar)) {\n      stream.eatWhile(operatorChar);\n      return r(\"op\", null);\n    }\n    stream.eatWhile(/\\w/);\n    content = stream.current();\n    if (stream.match(/^::\\w/)) {\n      stream.backUp(1);\n      return r(\"prefix\", \"variable-2\");\n    }\n    if (state.keywords.propertyIsEnumerable(content))\n      return r(state.keywords[content], content.match(/true|false/) ? \"atom\" : \"keyword\");\n    return r(\"name\", \"variable\");\n  }\n\n  function tokenString(stream, state) {\n    var ch, escaped = false;\n    while (ch = stream.next()) {\n      if (ch == '\"' && !escaped) {\n        state.tokenize = tokenBase;\n        return r(\"atom\", \"string\");\n      }\n      escaped = !escaped && ch == \"\\\\\";\n    }\n    // Hack to not confuse the parser when a string is split in\n    // pieces.\n    return r(\"op\", \"string\");\n  }\n\n  function tokenComment(depth) {\n    return function(stream, state) {\n      var lastCh = null, ch;\n      while (ch = stream.next()) {\n        if (ch == \"/\" && lastCh == \"*\") {\n          if (depth == 1) {\n            state.tokenize = tokenBase;\n            break;\n          } else {\n            state.tokenize = tokenComment(depth - 1);\n            return state.tokenize(stream, state);\n          }\n        }\n        if (ch == \"*\" && lastCh == \"/\") {\n          state.tokenize = tokenComment(depth + 1);\n          return state.tokenize(stream, state);\n        }\n        lastCh = ch;\n      }\n      return \"comment\";\n    };\n  }\n\n  // Parser\n\n  var cx = {state: null, stream: null, marked: null, cc: null};\n  function pass() {\n    for (var i = arguments.length - 1; i >= 0; i--) cx.cc.push(arguments[i]);\n  }\n  function cont() {\n    pass.apply(null, arguments);\n    return true;\n  }\n\n  function pushlex(type, info) {\n    var result = function() {\n      var state = cx.state;\n      state.lexical = {indented: state.indented, column: cx.stream.column(),\n                       type: type, prev: state.lexical, info: info};\n    };\n    result.lex = true;\n    return result;\n  }\n  function poplex() {\n    var state = cx.state;\n    if (state.lexical.prev) {\n      if (state.lexical.type == \")\")\n        state.indented = state.lexical.indented;\n      state.lexical = state.lexical.prev;\n    }\n  }\n  function typecx() { cx.state.keywords = typeKeywords; }\n  function valcx() { cx.state.keywords = valKeywords; }\n  poplex.lex = typecx.lex = valcx.lex = true;\n\n  function commasep(comb, end) {\n    function more(type) {\n      if (type == \",\") return cont(comb, more);\n      if (type == end) return cont();\n      return cont(more);\n    }\n    return function(type) {\n      if (type == end) return cont();\n      return pass(comb, more);\n    };\n  }\n\n  function stat_of(comb, tag) {\n    return cont(pushlex(\"stat\", tag), comb, poplex, block);\n  }\n  function block(type) {\n    if (type == \"}\") return cont();\n    if (type == \"let\") return stat_of(letdef1, \"let\");\n    if (type == \"fn\") return stat_of(fndef);\n    if (type == \"type\") return cont(pushlex(\"stat\"), tydef, endstatement, poplex, block);\n    if (type == \"enum\") return stat_of(enumdef);\n    if (type == \"mod\") return stat_of(mod);\n    if (type == \"iface\") return stat_of(iface);\n    if (type == \"impl\") return stat_of(impl);\n    if (type == \"open-attr\") return cont(pushlex(\"]\"), commasep(expression, \"]\"), poplex);\n    if (type == \"ignore\" || type.match(/[\\]\\);,]/)) return cont(block);\n    return pass(pushlex(\"stat\"), expression, poplex, endstatement, block);\n  }\n  function endstatement(type) {\n    if (type == \";\") return cont();\n    return pass();\n  }\n  function expression(type) {\n    if (type == \"atom\" || type == \"name\") return cont(maybeop);\n    if (type == \"{\") return cont(pushlex(\"}\"), exprbrace, poplex);\n    if (type.match(/[\\[\\(]/)) return matchBrackets(type, expression);\n    if (type.match(/[\\]\\)\\};,]/)) return pass();\n    if (type == \"if-style\") return cont(expression, expression);\n    if (type == \"else-style\" || type == \"op\") return cont(expression);\n    if (type == \"for\") return cont(pattern, maybetype, inop, expression, expression);\n    if (type == \"alt\") return cont(expression, altbody);\n    if (type == \"fn\") return cont(fndef);\n    if (type == \"macro\") return cont(macro);\n    return cont();\n  }\n  function maybeop(type) {\n    if (content == \".\") return cont(maybeprop);\n    if (content == \"::<\"){return cont(typarams, maybeop);}\n    if (type == \"op\" || content == \":\") return cont(expression);\n    if (type == \"(\" || type == \"[\") return matchBrackets(type, expression);\n    return pass();\n  }\n  function maybeprop() {\n    if (content.match(/^\\w+$/)) {cx.marked = \"variable\"; return cont(maybeop);}\n    return pass(expression);\n  }\n  function exprbrace(type) {\n    if (type == \"op\") {\n      if (content == \"|\") return cont(blockvars, poplex, pushlex(\"}\", \"block\"), block);\n      if (content == \"||\") return cont(poplex, pushlex(\"}\", \"block\"), block);\n    }\n    if (content == \"mutable\" || (content.match(/^\\w+$/) && cx.stream.peek() == \":\"\n                                 && !cx.stream.match(\"::\", false)))\n      return pass(record_of(expression));\n    return pass(block);\n  }\n  function record_of(comb) {\n    function ro(type) {\n      if (content == \"mutable\" || content == \"with\") {cx.marked = \"keyword\"; return cont(ro);}\n      if (content.match(/^\\w*$/)) {cx.marked = \"variable\"; return cont(ro);}\n      if (type == \":\") return cont(comb, ro);\n      if (type == \"}\") return cont();\n      return cont(ro);\n    }\n    return ro;\n  }\n  function blockvars(type) {\n    if (type == \"name\") {cx.marked = \"def\"; return cont(blockvars);}\n    if (type == \"op\" && content == \"|\") return cont();\n    return cont(blockvars);\n  }\n\n  function letdef1(type) {\n    if (type.match(/[\\]\\)\\};]/)) return cont();\n    if (content == \"=\") return cont(expression, letdef2);\n    if (type == \",\") return cont(letdef1);\n    return pass(pattern, maybetype, letdef1);\n  }\n  function letdef2(type) {\n    if (type.match(/[\\]\\)\\};,]/)) return pass(letdef1);\n    else return pass(expression, letdef2);\n  }\n  function maybetype(type) {\n    if (type == \":\") return cont(typecx, rtype, valcx);\n    return pass();\n  }\n  function inop(type) {\n    if (type == \"name\" && content == \"in\") {cx.marked = \"keyword\"; return cont();}\n    return pass();\n  }\n  function fndef(type) {\n    if (content == \"@\" || content == \"~\") {cx.marked = \"keyword\"; return cont(fndef);}\n    if (type == \"name\") {cx.marked = \"def\"; return cont(fndef);}\n    if (content == \"<\") return cont(typarams, fndef);\n    if (type == \"{\") return pass(expression);\n    if (type == \"(\") return cont(pushlex(\")\"), commasep(argdef, \")\"), poplex, fndef);\n    if (type == \"->\") return cont(typecx, rtype, valcx, fndef);\n    if (type == \";\") return cont();\n    return cont(fndef);\n  }\n  function tydef(type) {\n    if (type == \"name\") {cx.marked = \"def\"; return cont(tydef);}\n    if (content == \"<\") return cont(typarams, tydef);\n    if (content == \"=\") return cont(typecx, rtype, valcx);\n    return cont(tydef);\n  }\n  function enumdef(type) {\n    if (type == \"name\") {cx.marked = \"def\"; return cont(enumdef);}\n    if (content == \"<\") return cont(typarams, enumdef);\n    if (content == \"=\") return cont(typecx, rtype, valcx, endstatement);\n    if (type == \"{\") return cont(pushlex(\"}\"), typecx, enumblock, valcx, poplex);\n    return cont(enumdef);\n  }\n  function enumblock(type) {\n    if (type == \"}\") return cont();\n    if (type == \"(\") return cont(pushlex(\")\"), commasep(rtype, \")\"), poplex, enumblock);\n    if (content.match(/^\\w+$/)) cx.marked = \"def\";\n    return cont(enumblock);\n  }\n  function mod(type) {\n    if (type == \"name\") {cx.marked = \"def\"; return cont(mod);}\n    if (type == \"{\") return cont(pushlex(\"}\"), block, poplex);\n    return pass();\n  }\n  function iface(type) {\n    if (type == \"name\") {cx.marked = \"def\"; return cont(iface);}\n    if (content == \"<\") return cont(typarams, iface);\n    if (type == \"{\") return cont(pushlex(\"}\"), block, poplex);\n    return pass();\n  }\n  function impl(type) {\n    if (content == \"<\") return cont(typarams, impl);\n    if (content == \"of\" || content == \"for\") {cx.marked = \"keyword\"; return cont(rtype, impl);}\n    if (type == \"name\") {cx.marked = \"def\"; return cont(impl);}\n    if (type == \"{\") return cont(pushlex(\"}\"), block, poplex);\n    return pass();\n  }\n  function typarams() {\n    if (content == \">\") return cont();\n    if (content == \",\") return cont(typarams);\n    if (content == \":\") return cont(rtype, typarams);\n    return pass(rtype, typarams);\n  }\n  function argdef(type) {\n    if (type == \"name\") {cx.marked = \"def\"; return cont(argdef);}\n    if (type == \":\") return cont(typecx, rtype, valcx);\n    return pass();\n  }\n  function rtype(type) {\n    if (type == \"name\") {cx.marked = \"variable-3\"; return cont(rtypemaybeparam); }\n    if (content == \"mutable\") {cx.marked = \"keyword\"; return cont(rtype);}\n    if (type == \"atom\") return cont(rtypemaybeparam);\n    if (type == \"op\" || type == \"obj\") return cont(rtype);\n    if (type == \"fn\") return cont(fntype);\n    if (type == \"{\") return cont(pushlex(\"{\"), record_of(rtype), poplex);\n    return matchBrackets(type, rtype);\n  }\n  function rtypemaybeparam() {\n    if (content == \"<\") return cont(typarams);\n    return pass();\n  }\n  function fntype(type) {\n    if (type == \"(\") return cont(pushlex(\"(\"), commasep(rtype, \")\"), poplex, fntype);\n    if (type == \"->\") return cont(rtype);\n    return pass();\n  }\n  function pattern(type) {\n    if (type == \"name\") {cx.marked = \"def\"; return cont(patternmaybeop);}\n    if (type == \"atom\") return cont(patternmaybeop);\n    if (type == \"op\") return cont(pattern);\n    if (type.match(/[\\]\\)\\};,]/)) return pass();\n    return matchBrackets(type, pattern);\n  }\n  function patternmaybeop(type) {\n    if (type == \"op\" && content == \".\") return cont();\n    if (content == \"to\") {cx.marked = \"keyword\"; return cont(pattern);}\n    else return pass();\n  }\n  function altbody(type) {\n    if (type == \"{\") return cont(pushlex(\"}\", \"alt\"), altblock1, poplex);\n    return pass();\n  }\n  function altblock1(type) {\n    if (type == \"}\") return cont();\n    if (type == \"|\") return cont(altblock1);\n    if (content == \"when\") {cx.marked = \"keyword\"; return cont(expression, altblock2);}\n    if (type.match(/[\\]\\);,]/)) return cont(altblock1);\n    return pass(pattern, altblock2);\n  }\n  function altblock2(type) {\n    if (type == \"{\") return cont(pushlex(\"}\", \"alt\"), block, poplex, altblock1);\n    else return pass(altblock1);\n  }\n\n  function macro(type) {\n    if (type.match(/[\\[\\(\\{]/)) return matchBrackets(type, expression);\n    return pass();\n  }\n  function matchBrackets(type, comb) {\n    if (type == \"[\") return cont(pushlex(\"]\"), commasep(comb, \"]\"), poplex);\n    if (type == \"(\") return cont(pushlex(\")\"), commasep(comb, \")\"), poplex);\n    if (type == \"{\") return cont(pushlex(\"}\"), commasep(comb, \"}\"), poplex);\n    return cont();\n  }\n\n  function parse(state, stream, style) {\n    var cc = state.cc;\n    // Communicate our context to the combinators.\n    // (Less wasteful than consing up a hundred closures on every call.)\n    cx.state = state; cx.stream = stream; cx.marked = null, cx.cc = cc;\n\n    while (true) {\n      var combinator = cc.length ? cc.pop() : block;\n      if (combinator(tcat)) {\n        while(cc.length && cc[cc.length - 1].lex)\n          cc.pop()();\n        return cx.marked || style;\n      }\n    }\n  }\n\n  return {\n    startState: function() {\n      return {\n        tokenize: tokenBase,\n        cc: [],\n        lexical: {indented: -indentUnit, column: 0, type: \"top\", align: false},\n        keywords: valKeywords,\n        indented: 0\n      };\n    },\n\n    token: function(stream, state) {\n      if (stream.sol()) {\n        if (!state.lexical.hasOwnProperty(\"align\"))\n          state.lexical.align = false;\n        state.indented = stream.indentation();\n      }\n      if (stream.eatSpace()) return null;\n      tcat = content = null;\n      var style = state.tokenize(stream, state);\n      if (style == \"comment\") return style;\n      if (!state.lexical.hasOwnProperty(\"align\"))\n        state.lexical.align = true;\n      if (tcat == \"prefix\") return style;\n      if (!content) content = stream.current();\n      return parse(state, stream, style);\n    },\n\n    indent: function(state, textAfter) {\n      if (state.tokenize != tokenBase) return 0;\n      var firstChar = textAfter && textAfter.charAt(0), lexical = state.lexical,\n          type = lexical.type, closing = firstChar == type;\n      if (type == \"stat\") return lexical.indented + indentUnit;\n      if (lexical.align) return lexical.column + (closing ? 0 : 1);\n      return lexical.indented + (closing ? 0 : (lexical.info == \"alt\" ? altIndentUnit : indentUnit));\n    },\n\n    electricChars: \"{}\",\n    blockCommentStart: \"/*\",\n    blockCommentEnd: \"*/\",\n    lineComment: \"//\",\n    fold: \"brace\"\n  };\n});\n\nCodeMirror.defineMIME(\"text/x-rustsrc\", \"rust\");\n\n});\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/sass/index.html",
    "content": "<!doctype html>\n\n<title>CodeMirror: Sass mode</title>\n<meta charset=\"utf-8\"/>\n<link rel=stylesheet href=\"../../doc/docs.css\">\n\n<link rel=\"stylesheet\" href=\"../../lib/codemirror.css\">\n<script src=\"../../lib/codemirror.js\"></script>\n<script src=\"../../addon/edit/matchbrackets.js\"></script>\n<script src=\"sass.js\"></script>\n<style>.CodeMirror {border: 1px solid #ddd; font-size:12px; height: 400px}</style>\n<div id=nav>\n  <a href=\"http://codemirror.net\"><h1>CodeMirror</h1><img id=logo src=\"../../doc/logo.png\"></a>\n\n  <ul>\n    <li><a href=\"../../index.html\">Home</a>\n    <li><a href=\"../../doc/manual.html\">Manual</a>\n    <li><a href=\"https://github.com/codemirror/codemirror\">Code</a>\n  </ul>\n  <ul>\n    <li><a href=\"../index.html\">Language modes</a>\n    <li><a class=active href=\"#\">Sass</a>\n  </ul>\n</div>\n\n<article>\n<h2>Sass mode</h2>\n<form><textarea id=\"code\" name=\"code\">// Variable Definitions\n\n$page-width:    800px\n$sidebar-width: 200px\n$primary-color: #eeeeee\n\n// Global Attributes\n\nbody\n  font:\n    family: sans-serif\n    size: 30em\n    weight: bold\n\n// Scoped Styles\n\n#contents\n  width: $page-width\n  #sidebar\n    float: right\n    width: $sidebar-width\n  #main\n    width: $page-width - $sidebar-width\n    background: $primary-color\n    h2\n      color: blue\n\n#footer\n  height: 200px\n</textarea></form>\n    <script>\n      var editor = CodeMirror.fromTextArea(document.getElementById(\"code\"), {\n        lineNumbers : true,\n        matchBrackets : true\n      });\n    </script>\n\n    <p><strong>MIME types defined:</strong> <code>text/x-sass</code>.</p>\n  </article>\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/sass/sass.js",
    "content": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n(function(mod) {\n  if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n    mod(require(\"../../lib/codemirror\"));\n  else if (typeof define == \"function\" && define.amd) // AMD\n    define([\"../../lib/codemirror\"], mod);\n  else // Plain browser env\n    mod(CodeMirror);\n})(function(CodeMirror) {\n\"use strict\";\n\nCodeMirror.defineMode(\"sass\", function(config) {\n  function tokenRegexp(words) {\n    return new RegExp(\"^\" + words.join(\"|\"));\n  }\n\n  var keywords = [\"true\", \"false\", \"null\", \"auto\"];\n  var keywordsRegexp = new RegExp(\"^\" + keywords.join(\"|\"));\n\n  var operators = [\"\\\\(\", \"\\\\)\", \"=\", \">\", \"<\", \"==\", \">=\", \"<=\", \"\\\\+\", \"-\",\n                   \"\\\\!=\", \"/\", \"\\\\*\", \"%\", \"and\", \"or\", \"not\", \";\",\"\\\\{\",\"\\\\}\",\":\"];\n  var opRegexp = tokenRegexp(operators);\n\n  var pseudoElementsRegexp = /^::?[a-zA-Z_][\\w\\-]*/;\n\n  function urlTokens(stream, state) {\n    var ch = stream.peek();\n\n    if (ch === \")\") {\n      stream.next();\n      state.tokenizer = tokenBase;\n      return \"operator\";\n    } else if (ch === \"(\") {\n      stream.next();\n      stream.eatSpace();\n\n      return \"operator\";\n    } else if (ch === \"'\" || ch === '\"') {\n      state.tokenizer = buildStringTokenizer(stream.next());\n      return \"string\";\n    } else {\n      state.tokenizer = buildStringTokenizer(\")\", false);\n      return \"string\";\n    }\n  }\n  function comment(indentation, multiLine) {\n    return function(stream, state) {\n      if (stream.sol() && stream.indentation() <= indentation) {\n        state.tokenizer = tokenBase;\n        return tokenBase(stream, state);\n      }\n\n      if (multiLine && stream.skipTo(\"*/\")) {\n        stream.next();\n        stream.next();\n        state.tokenizer = tokenBase;\n      } else {\n        stream.skipToEnd();\n      }\n\n      return \"comment\";\n    };\n  }\n\n  function buildStringTokenizer(quote, greedy) {\n    if (greedy == null) { greedy = true; }\n\n    function stringTokenizer(stream, state) {\n      var nextChar = stream.next();\n      var peekChar = stream.peek();\n      var previousChar = stream.string.charAt(stream.pos-2);\n\n      var endingString = ((nextChar !== \"\\\\\" && peekChar === quote) || (nextChar === quote && previousChar !== \"\\\\\"));\n\n      if (endingString) {\n        if (nextChar !== quote && greedy) { stream.next(); }\n        state.tokenizer = tokenBase;\n        return \"string\";\n      } else if (nextChar === \"#\" && peekChar === \"{\") {\n        state.tokenizer = buildInterpolationTokenizer(stringTokenizer);\n        stream.next();\n        return \"operator\";\n      } else {\n        return \"string\";\n      }\n    }\n\n    return stringTokenizer;\n  }\n\n  function buildInterpolationTokenizer(currentTokenizer) {\n    return function(stream, state) {\n      if (stream.peek() === \"}\") {\n        stream.next();\n        state.tokenizer = currentTokenizer;\n        return \"operator\";\n      } else {\n        return tokenBase(stream, state);\n      }\n    };\n  }\n\n  function indent(state) {\n    if (state.indentCount == 0) {\n      state.indentCount++;\n      var lastScopeOffset = state.scopes[0].offset;\n      var currentOffset = lastScopeOffset + config.indentUnit;\n      state.scopes.unshift({ offset:currentOffset });\n    }\n  }\n\n  function dedent(state) {\n    if (state.scopes.length == 1) return;\n\n    state.scopes.shift();\n  }\n\n  function tokenBase(stream, state) {\n    var ch = stream.peek();\n\n    // Comment\n    if (stream.match(\"/*\")) {\n      state.tokenizer = comment(stream.indentation(), true);\n      return state.tokenizer(stream, state);\n    }\n    if (stream.match(\"//\")) {\n      state.tokenizer = comment(stream.indentation(), false);\n      return state.tokenizer(stream, state);\n    }\n\n    // Interpolation\n    if (stream.match(\"#{\")) {\n      state.tokenizer = buildInterpolationTokenizer(tokenBase);\n      return \"operator\";\n    }\n\n    // Strings\n    if (ch === '\"' || ch === \"'\") {\n      stream.next();\n      state.tokenizer = buildStringTokenizer(ch);\n      return \"string\";\n    }\n\n    if(!state.cursorHalf){// state.cursorHalf === 0\n    // first half i.e. before : for key-value pairs\n    // including selectors\n\n      if (ch === \".\") {\n        stream.next();\n        if (stream.match(/^[\\w-]+/)) {\n          indent(state);\n          return \"atom\";\n        } else if (stream.peek() === \"#\") {\n          indent(state);\n          return \"atom\";\n        }\n      }\n\n      if (ch === \"#\") {\n        stream.next();\n        // ID selectors\n        if (stream.match(/^[\\w-]+/)) {\n          indent(state);\n          return \"atom\";\n        }\n        if (stream.peek() === \"#\") {\n          indent(state);\n          return \"atom\";\n        }\n      }\n\n      // Variables\n      if (ch === \"$\") {\n        stream.next();\n        stream.eatWhile(/[\\w-]/);\n        return \"variable-2\";\n      }\n\n      // Numbers\n      if (stream.match(/^-?[0-9\\.]+/))\n        return \"number\";\n\n      // Units\n      if (stream.match(/^(px|em|in)\\b/))\n        return \"unit\";\n\n      if (stream.match(keywordsRegexp))\n        return \"keyword\";\n\n      if (stream.match(/^url/) && stream.peek() === \"(\") {\n        state.tokenizer = urlTokens;\n        return \"atom\";\n      }\n\n      if (ch === \"=\") {\n        // Match shortcut mixin definition\n        if (stream.match(/^=[\\w-]+/)) {\n          indent(state);\n          return \"meta\";\n        }\n      }\n\n      if (ch === \"+\") {\n        // Match shortcut mixin definition\n        if (stream.match(/^\\+[\\w-]+/)){\n          return \"variable-3\";\n        }\n      }\n\n      if(ch === \"@\"){\n        if(stream.match(/@extend/)){\n          if(!stream.match(/\\s*[\\w]/))\n            dedent(state);\n        }\n      }\n\n\n      // Indent Directives\n      if (stream.match(/^@(else if|if|media|else|for|each|while|mixin|function)/)) {\n        indent(state);\n        return \"meta\";\n      }\n\n      // Other Directives\n      if (ch === \"@\") {\n        stream.next();\n        stream.eatWhile(/[\\w-]/);\n        return \"meta\";\n      }\n\n      if (stream.eatWhile(/[\\w-]/)){\n        if(stream.match(/ *: *[\\w-\\+\\$#!\\(\"']/,false)){\n          return \"propery\";\n        }\n        else if(stream.match(/ *:/,false)){\n          indent(state);\n          state.cursorHalf = 1;\n          return \"atom\";\n        }\n        else if(stream.match(/ *,/,false)){\n          return \"atom\";\n        }\n        else{\n          indent(state);\n          return \"atom\";\n        }\n      }\n\n      if(ch === \":\"){\n        if (stream.match(pseudoElementsRegexp)){ // could be a pseudo-element\n          return \"keyword\";\n        }\n        stream.next();\n        state.cursorHalf=1;\n        return \"operator\";\n      }\n\n    } // cursorHalf===0 ends here\n    else{\n\n      if (ch === \"#\") {\n        stream.next();\n        // Hex numbers\n        if (stream.match(/[0-9a-fA-F]{6}|[0-9a-fA-F]{3}/)){\n          if(!stream.peek()){\n            state.cursorHalf = 0;\n          }\n          return \"number\";\n        }\n      }\n\n      // Numbers\n      if (stream.match(/^-?[0-9\\.]+/)){\n        if(!stream.peek()){\n          state.cursorHalf = 0;\n        }\n        return \"number\";\n      }\n\n      // Units\n      if (stream.match(/^(px|em|in)\\b/)){\n        if(!stream.peek()){\n          state.cursorHalf = 0;\n        }\n        return \"unit\";\n      }\n\n      if (stream.match(keywordsRegexp)){\n        if(!stream.peek()){\n          state.cursorHalf = 0;\n        }\n        return \"keyword\";\n      }\n\n      if (stream.match(/^url/) && stream.peek() === \"(\") {\n        state.tokenizer = urlTokens;\n        if(!stream.peek()){\n          state.cursorHalf = 0;\n        }\n        return \"atom\";\n      }\n\n      // Variables\n      if (ch === \"$\") {\n        stream.next();\n        stream.eatWhile(/[\\w-]/);\n        if(!stream.peek()){\n          state.cursorHalf = 0;\n        }\n        return \"variable-3\";\n      }\n\n      // bang character for !important, !default, etc.\n      if (ch === \"!\") {\n        stream.next();\n        if(!stream.peek()){\n          state.cursorHalf = 0;\n        }\n        return stream.match(/^[\\w]+/) ? \"keyword\": \"operator\";\n      }\n\n      if (stream.match(opRegexp)){\n        if(!stream.peek()){\n          state.cursorHalf = 0;\n        }\n        return \"operator\";\n      }\n\n      // attributes\n      if (stream.eatWhile(/[\\w-]/)) {\n        if(!stream.peek()){\n          state.cursorHalf = 0;\n        }\n        return \"attribute\";\n      }\n\n      //stream.eatSpace();\n      if(!stream.peek()){\n        state.cursorHalf = 0;\n        return null;\n      }\n\n    } // else ends here\n\n    if (stream.match(opRegexp))\n      return \"operator\";\n\n    // If we haven't returned by now, we move 1 character\n    // and return an error\n    stream.next();\n    return null;\n  }\n\n  function tokenLexer(stream, state) {\n    if (stream.sol()) state.indentCount = 0;\n    var style = state.tokenizer(stream, state);\n    var current = stream.current();\n\n    if (current === \"@return\" || current === \"}\"){\n      dedent(state);\n    }\n\n    if (style !== null) {\n      var startOfToken = stream.pos - current.length;\n\n      var withCurrentIndent = startOfToken + (config.indentUnit * state.indentCount);\n\n      var newScopes = [];\n\n      for (var i = 0; i < state.scopes.length; i++) {\n        var scope = state.scopes[i];\n\n        if (scope.offset <= withCurrentIndent)\n          newScopes.push(scope);\n      }\n\n      state.scopes = newScopes;\n    }\n\n\n    return style;\n  }\n\n  return {\n    startState: function() {\n      return {\n        tokenizer: tokenBase,\n        scopes: [{offset: 0, type: \"sass\"}],\n        indentCount: 0,\n        cursorHalf: 0,  // cursor half tells us if cursor lies after (1)\n                        // or before (0) colon (well... more or less)\n        definedVars: [],\n        definedMixins: []\n      };\n    },\n    token: function(stream, state) {\n      var style = tokenLexer(stream, state);\n\n      state.lastToken = { style: style, content: stream.current() };\n\n      return style;\n    },\n\n    indent: function(state) {\n      return state.scopes[0].offset;\n    }\n  };\n});\n\nCodeMirror.defineMIME(\"text/x-sass\", \"sass\");\n\n});\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/scheme/index.html",
    "content": "<!doctype html>\n\n<title>CodeMirror: Scheme mode</title>\n<meta charset=\"utf-8\"/>\n<link rel=stylesheet href=\"../../doc/docs.css\">\n\n<link rel=\"stylesheet\" href=\"../../lib/codemirror.css\">\n<script src=\"../../lib/codemirror.js\"></script>\n<script src=\"scheme.js\"></script>\n<style>.CodeMirror {background: #f8f8f8;}</style>\n<div id=nav>\n  <a href=\"http://codemirror.net\"><h1>CodeMirror</h1><img id=logo src=\"../../doc/logo.png\"></a>\n\n  <ul>\n    <li><a href=\"../../index.html\">Home</a>\n    <li><a href=\"../../doc/manual.html\">Manual</a>\n    <li><a href=\"https://github.com/codemirror/codemirror\">Code</a>\n  </ul>\n  <ul>\n    <li><a href=\"../index.html\">Language modes</a>\n    <li><a class=active href=\"#\">Scheme</a>\n  </ul>\n</div>\n\n<article>\n<h2>Scheme mode</h2>\n<form><textarea id=\"code\" name=\"code\">\n; See if the input starts with a given symbol.\n(define (match-symbol input pattern)\n  (cond ((null? (remain input)) #f)\n\t((eqv? (car (remain input)) pattern) (r-cdr input))\n\t(else #f)))\n\n; Allow the input to start with one of a list of patterns.\n(define (match-or input pattern)\n  (cond ((null? pattern) #f)\n\t((match-pattern input (car pattern)))\n\t(else (match-or input (cdr pattern)))))\n\n; Allow a sequence of patterns.\n(define (match-seq input pattern)\n  (if (null? pattern)\n      input\n      (let ((match (match-pattern input (car pattern))))\n\t(if match (match-seq match (cdr pattern)) #f))))\n\n; Match with the pattern but no problem if it does not match.\n(define (match-opt input pattern)\n  (let ((match (match-pattern input (car pattern))))\n    (if match match input)))\n\n; Match anything (other than '()), until pattern is found. The rather\n; clumsy form of requiring an ending pattern is needed to decide where\n; the end of the match is. If none is given, this will match the rest\n; of the sentence.\n(define (match-any input pattern)\n  (cond ((null? (remain input)) #f)\n\t((null? pattern) (f-cons (remain input) (clear-remain input)))\n\t(else\n\t (let ((accum-any (collector)))\n\t   (define (match-pattern-any input pattern)\n\t     (cond ((null? (remain input)) #f)\n\t\t   (else (accum-any (car (remain input)))\n\t\t\t (cond ((match-pattern (r-cdr input) pattern))\n\t\t\t       (else (match-pattern-any (r-cdr input) pattern))))))\n\t   (let ((retval (match-pattern-any input (car pattern))))\n\t     (if retval\n\t\t (f-cons (accum-any) retval)\n\t\t #f))))))\n</textarea></form>\n    <script>\n      var editor = CodeMirror.fromTextArea(document.getElementById(\"code\"), {});\n    </script>\n\n    <p><strong>MIME types defined:</strong> <code>text/x-scheme</code>.</p>\n\n  </article>\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/scheme/scheme.js",
    "content": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n/**\n * Author: Koh Zi Han, based on implementation by Koh Zi Chun\n */\n\n(function(mod) {\n  if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n    mod(require(\"../../lib/codemirror\"));\n  else if (typeof define == \"function\" && define.amd) // AMD\n    define([\"../../lib/codemirror\"], mod);\n  else // Plain browser env\n    mod(CodeMirror);\n})(function(CodeMirror) {\n\"use strict\";\n\nCodeMirror.defineMode(\"scheme\", function () {\n    var BUILTIN = \"builtin\", COMMENT = \"comment\", STRING = \"string\",\n        ATOM = \"atom\", NUMBER = \"number\", BRACKET = \"bracket\";\n    var INDENT_WORD_SKIP = 2;\n\n    function makeKeywords(str) {\n        var obj = {}, words = str.split(\" \");\n        for (var i = 0; i < words.length; ++i) obj[words[i]] = true;\n        return obj;\n    }\n\n    var keywords = makeKeywords(\"λ case-lambda call/cc class define-class exit-handler field import inherit init-field interface let*-values let-values let/ec mixin opt-lambda override protect provide public rename require require-for-syntax syntax syntax-case syntax-error unit/sig unless when with-syntax and begin call-with-current-continuation call-with-input-file call-with-output-file case cond define define-syntax delay do dynamic-wind else for-each if lambda let let* let-syntax letrec letrec-syntax map or syntax-rules abs acos angle append apply asin assoc assq assv atan boolean? caar cadr call-with-input-file call-with-output-file call-with-values car cdddar cddddr cdr ceiling char->integer char-alphabetic? char-ci<=? char-ci<? char-ci=? char-ci>=? char-ci>? char-downcase char-lower-case? char-numeric? char-ready? char-upcase char-upper-case? char-whitespace? char<=? char<? char=? char>=? char>? char? close-input-port close-output-port complex? cons cos current-input-port current-output-port denominator display eof-object? eq? equal? eqv? eval even? exact->inexact exact? exp expt #f floor force gcd imag-part inexact->exact inexact? input-port? integer->char integer? interaction-environment lcm length list list->string list->vector list-ref list-tail list? load log magnitude make-polar make-rectangular make-string make-vector max member memq memv min modulo negative? newline not null-environment null? number->string number? numerator odd? open-input-file open-output-file output-port? pair? peek-char port? positive? procedure? quasiquote quote quotient rational? rationalize read read-char real-part real? remainder reverse round scheme-report-environment set! set-car! set-cdr! sin sqrt string string->list string->number string->symbol string-append string-ci<=? string-ci<? string-ci=? string-ci>=? string-ci>? string-copy string-fill! string-length string-ref string-set! string<=? string<? string=? string>=? string>? string? substring symbol->string symbol? #t tan transcript-off transcript-on truncate values vector vector->list vector-fill! vector-length vector-ref vector-set! with-input-from-file with-output-to-file write write-char zero?\");\n    var indentKeys = makeKeywords(\"define let letrec let* lambda\");\n\n    function stateStack(indent, type, prev) { // represents a state stack object\n        this.indent = indent;\n        this.type = type;\n        this.prev = prev;\n    }\n\n    function pushStack(state, indent, type) {\n        state.indentStack = new stateStack(indent, type, state.indentStack);\n    }\n\n    function popStack(state) {\n        state.indentStack = state.indentStack.prev;\n    }\n\n    var binaryMatcher = new RegExp(/^(?:[-+]i|[-+][01]+#*(?:\\/[01]+#*)?i|[-+]?[01]+#*(?:\\/[01]+#*)?@[-+]?[01]+#*(?:\\/[01]+#*)?|[-+]?[01]+#*(?:\\/[01]+#*)?[-+](?:[01]+#*(?:\\/[01]+#*)?)?i|[-+]?[01]+#*(?:\\/[01]+#*)?)(?=[()\\s;\"]|$)/i);\n    var octalMatcher = new RegExp(/^(?:[-+]i|[-+][0-7]+#*(?:\\/[0-7]+#*)?i|[-+]?[0-7]+#*(?:\\/[0-7]+#*)?@[-+]?[0-7]+#*(?:\\/[0-7]+#*)?|[-+]?[0-7]+#*(?:\\/[0-7]+#*)?[-+](?:[0-7]+#*(?:\\/[0-7]+#*)?)?i|[-+]?[0-7]+#*(?:\\/[0-7]+#*)?)(?=[()\\s;\"]|$)/i);\n    var hexMatcher = new RegExp(/^(?:[-+]i|[-+][\\da-f]+#*(?:\\/[\\da-f]+#*)?i|[-+]?[\\da-f]+#*(?:\\/[\\da-f]+#*)?@[-+]?[\\da-f]+#*(?:\\/[\\da-f]+#*)?|[-+]?[\\da-f]+#*(?:\\/[\\da-f]+#*)?[-+](?:[\\da-f]+#*(?:\\/[\\da-f]+#*)?)?i|[-+]?[\\da-f]+#*(?:\\/[\\da-f]+#*)?)(?=[()\\s;\"]|$)/i);\n    var decimalMatcher = new RegExp(/^(?:[-+]i|[-+](?:(?:(?:\\d+#+\\.?#*|\\d+\\.\\d*#*|\\.\\d+#*|\\d+)(?:[esfdl][-+]?\\d+)?)|\\d+#*\\/\\d+#*)i|[-+]?(?:(?:(?:\\d+#+\\.?#*|\\d+\\.\\d*#*|\\.\\d+#*|\\d+)(?:[esfdl][-+]?\\d+)?)|\\d+#*\\/\\d+#*)@[-+]?(?:(?:(?:\\d+#+\\.?#*|\\d+\\.\\d*#*|\\.\\d+#*|\\d+)(?:[esfdl][-+]?\\d+)?)|\\d+#*\\/\\d+#*)|[-+]?(?:(?:(?:\\d+#+\\.?#*|\\d+\\.\\d*#*|\\.\\d+#*|\\d+)(?:[esfdl][-+]?\\d+)?)|\\d+#*\\/\\d+#*)[-+](?:(?:(?:\\d+#+\\.?#*|\\d+\\.\\d*#*|\\.\\d+#*|\\d+)(?:[esfdl][-+]?\\d+)?)|\\d+#*\\/\\d+#*)?i|(?:(?:(?:\\d+#+\\.?#*|\\d+\\.\\d*#*|\\.\\d+#*|\\d+)(?:[esfdl][-+]?\\d+)?)|\\d+#*\\/\\d+#*))(?=[()\\s;\"]|$)/i);\n\n    function isBinaryNumber (stream) {\n        return stream.match(binaryMatcher);\n    }\n\n    function isOctalNumber (stream) {\n        return stream.match(octalMatcher);\n    }\n\n    function isDecimalNumber (stream, backup) {\n        if (backup === true) {\n            stream.backUp(1);\n        }\n        return stream.match(decimalMatcher);\n    }\n\n    function isHexNumber (stream) {\n        return stream.match(hexMatcher);\n    }\n\n    return {\n        startState: function () {\n            return {\n                indentStack: null,\n                indentation: 0,\n                mode: false,\n                sExprComment: false\n            };\n        },\n\n        token: function (stream, state) {\n            if (state.indentStack == null && stream.sol()) {\n                // update indentation, but only if indentStack is empty\n                state.indentation = stream.indentation();\n            }\n\n            // skip spaces\n            if (stream.eatSpace()) {\n                return null;\n            }\n            var returnType = null;\n\n            switch(state.mode){\n                case \"string\": // multi-line string parsing mode\n                    var next, escaped = false;\n                    while ((next = stream.next()) != null) {\n                        if (next == \"\\\"\" && !escaped) {\n\n                            state.mode = false;\n                            break;\n                        }\n                        escaped = !escaped && next == \"\\\\\";\n                    }\n                    returnType = STRING; // continue on in scheme-string mode\n                    break;\n                case \"comment\": // comment parsing mode\n                    var next, maybeEnd = false;\n                    while ((next = stream.next()) != null) {\n                        if (next == \"#\" && maybeEnd) {\n\n                            state.mode = false;\n                            break;\n                        }\n                        maybeEnd = (next == \"|\");\n                    }\n                    returnType = COMMENT;\n                    break;\n                case \"s-expr-comment\": // s-expr commenting mode\n                    state.mode = false;\n                    if(stream.peek() == \"(\" || stream.peek() == \"[\"){\n                        // actually start scheme s-expr commenting mode\n                        state.sExprComment = 0;\n                    }else{\n                        // if not we just comment the entire of the next token\n                        stream.eatWhile(/[^/s]/); // eat non spaces\n                        returnType = COMMENT;\n                        break;\n                    }\n                default: // default parsing mode\n                    var ch = stream.next();\n\n                    if (ch == \"\\\"\") {\n                        state.mode = \"string\";\n                        returnType = STRING;\n\n                    } else if (ch == \"'\") {\n                        returnType = ATOM;\n                    } else if (ch == '#') {\n                        if (stream.eat(\"|\")) {                    // Multi-line comment\n                            state.mode = \"comment\"; // toggle to comment mode\n                            returnType = COMMENT;\n                        } else if (stream.eat(/[tf]/i)) {            // #t/#f (atom)\n                            returnType = ATOM;\n                        } else if (stream.eat(';')) {                // S-Expr comment\n                            state.mode = \"s-expr-comment\";\n                            returnType = COMMENT;\n                        } else {\n                            var numTest = null, hasExactness = false, hasRadix = true;\n                            if (stream.eat(/[ei]/i)) {\n                                hasExactness = true;\n                            } else {\n                                stream.backUp(1);       // must be radix specifier\n                            }\n                            if (stream.match(/^#b/i)) {\n                                numTest = isBinaryNumber;\n                            } else if (stream.match(/^#o/i)) {\n                                numTest = isOctalNumber;\n                            } else if (stream.match(/^#x/i)) {\n                                numTest = isHexNumber;\n                            } else if (stream.match(/^#d/i)) {\n                                numTest = isDecimalNumber;\n                            } else if (stream.match(/^[-+0-9.]/, false)) {\n                                hasRadix = false;\n                                numTest = isDecimalNumber;\n                            // re-consume the intial # if all matches failed\n                            } else if (!hasExactness) {\n                                stream.eat('#');\n                            }\n                            if (numTest != null) {\n                                if (hasRadix && !hasExactness) {\n                                    // consume optional exactness after radix\n                                    stream.match(/^#[ei]/i);\n                                }\n                                if (numTest(stream))\n                                    returnType = NUMBER;\n                            }\n                        }\n                    } else if (/^[-+0-9.]/.test(ch) && isDecimalNumber(stream, true)) { // match non-prefixed number, must be decimal\n                        returnType = NUMBER;\n                    } else if (ch == \";\") { // comment\n                        stream.skipToEnd(); // rest of the line is a comment\n                        returnType = COMMENT;\n                    } else if (ch == \"(\" || ch == \"[\") {\n                      var keyWord = ''; var indentTemp = stream.column(), letter;\n                        /**\n                        Either\n                        (indent-word ..\n                        (non-indent-word ..\n                        (;something else, bracket, etc.\n                        */\n\n                        while ((letter = stream.eat(/[^\\s\\(\\[\\;\\)\\]]/)) != null) {\n                            keyWord += letter;\n                        }\n\n                        if (keyWord.length > 0 && indentKeys.propertyIsEnumerable(keyWord)) { // indent-word\n\n                            pushStack(state, indentTemp + INDENT_WORD_SKIP, ch);\n                        } else { // non-indent word\n                            // we continue eating the spaces\n                            stream.eatSpace();\n                            if (stream.eol() || stream.peek() == \";\") {\n                                // nothing significant after\n                                // we restart indentation 1 space after\n                                pushStack(state, indentTemp + 1, ch);\n                            } else {\n                                pushStack(state, indentTemp + stream.current().length, ch); // else we match\n                            }\n                        }\n                        stream.backUp(stream.current().length - 1); // undo all the eating\n\n                        if(typeof state.sExprComment == \"number\") state.sExprComment++;\n\n                        returnType = BRACKET;\n                    } else if (ch == \")\" || ch == \"]\") {\n                        returnType = BRACKET;\n                        if (state.indentStack != null && state.indentStack.type == (ch == \")\" ? \"(\" : \"[\")) {\n                            popStack(state);\n\n                            if(typeof state.sExprComment == \"number\"){\n                                if(--state.sExprComment == 0){\n                                    returnType = COMMENT; // final closing bracket\n                                    state.sExprComment = false; // turn off s-expr commenting mode\n                                }\n                            }\n                        }\n                    } else {\n                        stream.eatWhile(/[\\w\\$_\\-!$%&*+\\.\\/:<=>?@\\^~]/);\n\n                        if (keywords && keywords.propertyIsEnumerable(stream.current())) {\n                            returnType = BUILTIN;\n                        } else returnType = \"variable\";\n                    }\n            }\n            return (typeof state.sExprComment == \"number\") ? COMMENT : returnType;\n        },\n\n        indent: function (state) {\n            if (state.indentStack == null) return state.indentation;\n            return state.indentStack.indent;\n        },\n\n        lineComment: \";;\"\n    };\n});\n\nCodeMirror.defineMIME(\"text/x-scheme\", \"scheme\");\n\n});\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/shell/index.html",
    "content": "<!doctype html>\n\n<title>CodeMirror: Shell mode</title>\n<meta charset=\"utf-8\"/>\n<link rel=stylesheet href=\"../../doc/docs.css\">\n\n<link rel=stylesheet href=../../lib/codemirror.css>\n<script src=../../lib/codemirror.js></script>\n<script src=\"../../addon/edit/matchbrackets.js\"></script>\n<script src=shell.js></script>\n<style type=text/css>\n  .CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}\n</style>\n<div id=nav>\n  <a href=\"http://codemirror.net\"><h1>CodeMirror</h1><img id=logo src=\"../../doc/logo.png\"></a>\n\n  <ul>\n    <li><a href=\"../../index.html\">Home</a>\n    <li><a href=\"../../doc/manual.html\">Manual</a>\n    <li><a href=\"https://github.com/codemirror/codemirror\">Code</a>\n  </ul>\n  <ul>\n    <li><a href=\"../index.html\">Language modes</a>\n    <li><a class=active href=\"#\">Shell</a>\n  </ul>\n</div>\n\n<article>\n<h2>Shell mode</h2>\n\n\n<textarea id=code>\n#!/bin/bash\n\n# clone the repository\ngit clone http://github.com/garden/tree\n\n# generate HTTPS credentials\ncd tree\nopenssl genrsa -aes256 -out https.key 1024\nopenssl req -new -nodes -key https.key -out https.csr\nopenssl x509 -req -days 365 -in https.csr -signkey https.key -out https.crt\ncp https.key{,.orig}\nopenssl rsa -in https.key.orig -out https.key\n\n# start the server in HTTPS mode\ncd web\nsudo node ../server.js 443 'yes' &gt;&gt; ../node.log &amp;\n\n# here is how to stop the server\nfor pid in `ps aux | grep 'node ../server.js' | awk '{print $2}'` ; do\n  sudo kill -9 $pid 2&gt; /dev/null\ndone\n\nexit 0</textarea>\n\n<script>\n  var editor = CodeMirror.fromTextArea(document.getElementById('code'), {\n    mode: 'shell',\n    lineNumbers: true,\n    matchBrackets: true\n  });\n</script>\n\n<p><strong>MIME types defined:</strong> <code>text/x-sh</code>.</p>\n</article>\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/shell/shell.js",
    "content": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n(function(mod) {\n  if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n    mod(require(\"../../lib/codemirror\"));\n  else if (typeof define == \"function\" && define.amd) // AMD\n    define([\"../../lib/codemirror\"], mod);\n  else // Plain browser env\n    mod(CodeMirror);\n})(function(CodeMirror) {\n\"use strict\";\n\nCodeMirror.defineMode('shell', function() {\n\n  var words = {};\n  function define(style, string) {\n    var split = string.split(' ');\n    for(var i = 0; i < split.length; i++) {\n      words[split[i]] = style;\n    }\n  };\n\n  // Atoms\n  define('atom', 'true false');\n\n  // Keywords\n  define('keyword', 'if then do else elif while until for in esac fi fin ' +\n    'fil done exit set unset export function');\n\n  // Commands\n  define('builtin', 'ab awk bash beep cat cc cd chown chmod chroot clear cp ' +\n    'curl cut diff echo find gawk gcc get git grep kill killall ln ls make ' +\n    'mkdir openssl mv nc node npm ping ps restart rm rmdir sed service sh ' +\n    'shopt shred source sort sleep ssh start stop su sudo tee telnet top ' +\n    'touch vi vim wall wc wget who write yes zsh');\n\n  function tokenBase(stream, state) {\n    if (stream.eatSpace()) return null;\n\n    var sol = stream.sol();\n    var ch = stream.next();\n\n    if (ch === '\\\\') {\n      stream.next();\n      return null;\n    }\n    if (ch === '\\'' || ch === '\"' || ch === '`') {\n      state.tokens.unshift(tokenString(ch));\n      return tokenize(stream, state);\n    }\n    if (ch === '#') {\n      if (sol && stream.eat('!')) {\n        stream.skipToEnd();\n        return 'meta'; // 'comment'?\n      }\n      stream.skipToEnd();\n      return 'comment';\n    }\n    if (ch === '$') {\n      state.tokens.unshift(tokenDollar);\n      return tokenize(stream, state);\n    }\n    if (ch === '+' || ch === '=') {\n      return 'operator';\n    }\n    if (ch === '-') {\n      stream.eat('-');\n      stream.eatWhile(/\\w/);\n      return 'attribute';\n    }\n    if (/\\d/.test(ch)) {\n      stream.eatWhile(/\\d/);\n      if(stream.eol() || !/\\w/.test(stream.peek())) {\n        return 'number';\n      }\n    }\n    stream.eatWhile(/[\\w-]/);\n    var cur = stream.current();\n    if (stream.peek() === '=' && /\\w+/.test(cur)) return 'def';\n    return words.hasOwnProperty(cur) ? words[cur] : null;\n  }\n\n  function tokenString(quote) {\n    return function(stream, state) {\n      var next, end = false, escaped = false;\n      while ((next = stream.next()) != null) {\n        if (next === quote && !escaped) {\n          end = true;\n          break;\n        }\n        if (next === '$' && !escaped && quote !== '\\'') {\n          escaped = true;\n          stream.backUp(1);\n          state.tokens.unshift(tokenDollar);\n          break;\n        }\n        escaped = !escaped && next === '\\\\';\n      }\n      if (end || !escaped) {\n        state.tokens.shift();\n      }\n      return (quote === '`' || quote === ')' ? 'quote' : 'string');\n    };\n  };\n\n  var tokenDollar = function(stream, state) {\n    if (state.tokens.length > 1) stream.eat('$');\n    var ch = stream.next(), hungry = /\\w/;\n    if (ch === '{') hungry = /[^}]/;\n    if (ch === '(') {\n      state.tokens[0] = tokenString(')');\n      return tokenize(stream, state);\n    }\n    if (!/\\d/.test(ch)) {\n      stream.eatWhile(hungry);\n      stream.eat('}');\n    }\n    state.tokens.shift();\n    return 'def';\n  };\n\n  function tokenize(stream, state) {\n    return (state.tokens[0] || tokenBase) (stream, state);\n  };\n\n  return {\n    startState: function() {return {tokens:[]};},\n    token: function(stream, state) {\n      return tokenize(stream, state);\n    },\n    lineComment: '#',\n    fold: \"brace\"\n  };\n});\n\nCodeMirror.defineMIME('text/x-sh', 'shell');\n\n});\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/shell/test.js",
    "content": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n(function() {\n  var mode = CodeMirror.getMode({}, \"shell\");\n  function MT(name) { test.mode(name, mode, Array.prototype.slice.call(arguments, 1)); }\n\n  MT(\"var\",\n     \"text [def $var] text\");\n  MT(\"varBraces\",\n     \"text[def ${var}]text\");\n  MT(\"varVar\",\n     \"text [def $a$b] text\");\n  MT(\"varBracesVarBraces\",\n     \"text[def ${a}${b}]text\");\n\n  MT(\"singleQuotedVar\",\n     \"[string 'text $var text']\");\n  MT(\"singleQuotedVarBraces\",\n     \"[string 'text ${var} text']\");\n\n  MT(\"doubleQuotedVar\",\n     '[string \"text ][def $var][string  text\"]');\n  MT(\"doubleQuotedVarBraces\",\n     '[string \"text][def ${var}][string text\"]');\n  MT(\"doubleQuotedVarPunct\",\n     '[string \"text ][def $@][string  text\"]');\n  MT(\"doubleQuotedVarVar\",\n     '[string \"][def $a$b][string \"]');\n  MT(\"doubleQuotedVarBracesVarBraces\",\n     '[string \"][def ${a}${b}][string \"]');\n\n  MT(\"notAString\",\n     \"text\\\\'text\");\n  MT(\"escapes\",\n     \"outside\\\\'\\\\\\\"\\\\`\\\\\\\\[string \\\"inside\\\\`\\\\'\\\\\\\"\\\\\\\\`\\\\$notAVar\\\"]outside\\\\$\\\\(notASubShell\\\\)\");\n\n  MT(\"subshell\",\n     \"[builtin echo] [quote $(whoami)] s log, stardate [quote `date`].\");\n  MT(\"doubleQuotedSubshell\",\n     \"[builtin echo] [string \\\"][quote $(whoami)][string 's log, stardate `date`.\\\"]\");\n\n  MT(\"hashbang\",\n     \"[meta #!/bin/bash]\");\n  MT(\"comment\",\n     \"text [comment # Blurb]\");\n\n  MT(\"numbers\",\n     \"[number 0] [number 1] [number 2]\");\n  MT(\"keywords\",\n     \"[keyword while] [atom true]; [keyword do]\",\n     \"  [builtin sleep] [number 3]\",\n     \"[keyword done]\");\n  MT(\"options\",\n     \"[builtin ls] [attribute -l] [attribute --human-readable]\");\n  MT(\"operator\",\n     \"[def var][operator =]value\");\n})();\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/sieve/index.html",
    "content": "<!doctype html>\n\n<title>CodeMirror: Sieve (RFC5228) mode</title>\n<meta charset=\"utf-8\"/>\n<link rel=stylesheet href=\"../../doc/docs.css\">\n\n<link rel=\"stylesheet\" href=\"../../lib/codemirror.css\">\n<script src=\"../../lib/codemirror.js\"></script>\n<script src=\"sieve.js\"></script>\n<style>.CodeMirror {background: #f8f8f8;}</style>\n<div id=nav>\n  <a href=\"http://codemirror.net\"><h1>CodeMirror</h1><img id=logo src=\"../../doc/logo.png\"></a>\n\n  <ul>\n    <li><a href=\"../../index.html\">Home</a>\n    <li><a href=\"../../doc/manual.html\">Manual</a>\n    <li><a href=\"https://github.com/codemirror/codemirror\">Code</a>\n  </ul>\n  <ul>\n    <li><a href=\"../index.html\">Language modes</a>\n    <li><a class=active href=\"#\">Sieve (RFC5228)</a>\n  </ul>\n</div>\n\n<article>\n<h2>Sieve (RFC5228) mode</h2>\n<form><textarea id=\"code\" name=\"code\">\n#\n# Example Sieve Filter\n# Declare any optional features or extension used by the script\n#\n\nrequire [\"fileinto\", \"reject\"];\n\n#\n# Reject any large messages (note that the four leading dots get\n# \"stuffed\" to three)\n#\nif size :over 1M\n{\n  reject text:\nPlease do not send me large attachments.\nPut your file on a server and send me the URL.\nThank you.\n.... Fred\n.\n;\n  stop;\n}\n\n#\n# Handle messages from known mailing lists\n# Move messages from IETF filter discussion list to filter folder\n#\nif header :is \"Sender\" \"owner-ietf-mta-filters@imc.org\"\n{\n  fileinto \"filter\";  # move to \"filter\" folder\n}\n#\n# Keep all messages to or from people in my company\n#\nelsif address :domain :is [\"From\", \"To\"] \"example.com\"\n{\n  keep;               # keep in \"In\" folder\n}\n\n#\n# Try and catch unsolicited email.  If a message is not to me,\n# or it contains a subject known to be spam, file it away.\n#\nelsif anyof (not address :all :contains\n               [\"To\", \"Cc\", \"Bcc\"] \"me@example.com\",\n             header :matches \"subject\"\n               [\"*make*money*fast*\", \"*university*dipl*mas*\"])\n{\n  # If message header does not contain my address,\n  # it's from a list.\n  fileinto \"spam\";   # move to \"spam\" folder\n}\nelse\n{\n  # Move all other (non-company) mail to \"personal\"\n  # folder.\n  fileinto \"personal\";\n}\n</textarea></form>\n    <script>\n      var editor = CodeMirror.fromTextArea(document.getElementById(\"code\"), {});\n    </script>\n\n    <p><strong>MIME types defined:</strong> <code>application/sieve</code>.</p>\n\n  </article>\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/sieve/sieve.js",
    "content": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n(function(mod) {\n  if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n    mod(require(\"../../lib/codemirror\"));\n  else if (typeof define == \"function\" && define.amd) // AMD\n    define([\"../../lib/codemirror\"], mod);\n  else // Plain browser env\n    mod(CodeMirror);\n})(function(CodeMirror) {\n\"use strict\";\n\nCodeMirror.defineMode(\"sieve\", function(config) {\n  function words(str) {\n    var obj = {}, words = str.split(\" \");\n    for (var i = 0; i < words.length; ++i) obj[words[i]] = true;\n    return obj;\n  }\n\n  var keywords = words(\"if elsif else stop require\");\n  var atoms = words(\"true false not\");\n  var indentUnit = config.indentUnit;\n\n  function tokenBase(stream, state) {\n\n    var ch = stream.next();\n    if (ch == \"/\" && stream.eat(\"*\")) {\n      state.tokenize = tokenCComment;\n      return tokenCComment(stream, state);\n    }\n\n    if (ch === '#') {\n      stream.skipToEnd();\n      return \"comment\";\n    }\n\n    if (ch == \"\\\"\") {\n      state.tokenize = tokenString(ch);\n      return state.tokenize(stream, state);\n    }\n\n    if (ch == \"(\") {\n      state._indent.push(\"(\");\n      // add virtual angel wings so that editor behaves...\n      // ...more sane incase of broken brackets\n      state._indent.push(\"{\");\n      return null;\n    }\n\n    if (ch === \"{\") {\n      state._indent.push(\"{\");\n      return null;\n    }\n\n    if (ch == \")\")  {\n      state._indent.pop();\n      state._indent.pop();\n    }\n\n    if (ch === \"}\") {\n      state._indent.pop();\n      return null;\n    }\n\n    if (ch == \",\")\n      return null;\n\n    if (ch == \";\")\n      return null;\n\n\n    if (/[{}\\(\\),;]/.test(ch))\n      return null;\n\n    // 1*DIGIT \"K\" / \"M\" / \"G\"\n    if (/\\d/.test(ch)) {\n      stream.eatWhile(/[\\d]/);\n      stream.eat(/[KkMmGg]/);\n      return \"number\";\n    }\n\n    // \":\" (ALPHA / \"_\") *(ALPHA / DIGIT / \"_\")\n    if (ch == \":\") {\n      stream.eatWhile(/[a-zA-Z_]/);\n      stream.eatWhile(/[a-zA-Z0-9_]/);\n\n      return \"operator\";\n    }\n\n    stream.eatWhile(/\\w/);\n    var cur = stream.current();\n\n    // \"text:\" *(SP / HTAB) (hash-comment / CRLF)\n    // *(multiline-literal / multiline-dotstart)\n    // \".\" CRLF\n    if ((cur == \"text\") && stream.eat(\":\"))\n    {\n      state.tokenize = tokenMultiLineString;\n      return \"string\";\n    }\n\n    if (keywords.propertyIsEnumerable(cur))\n      return \"keyword\";\n\n    if (atoms.propertyIsEnumerable(cur))\n      return \"atom\";\n\n    return null;\n  }\n\n  function tokenMultiLineString(stream, state)\n  {\n    state._multiLineString = true;\n    // the first line is special it may contain a comment\n    if (!stream.sol()) {\n      stream.eatSpace();\n\n      if (stream.peek() == \"#\") {\n        stream.skipToEnd();\n        return \"comment\";\n      }\n\n      stream.skipToEnd();\n      return \"string\";\n    }\n\n    if ((stream.next() == \".\")  && (stream.eol()))\n    {\n      state._multiLineString = false;\n      state.tokenize = tokenBase;\n    }\n\n    return \"string\";\n  }\n\n  function tokenCComment(stream, state) {\n    var maybeEnd = false, ch;\n    while ((ch = stream.next()) != null) {\n      if (maybeEnd && ch == \"/\") {\n        state.tokenize = tokenBase;\n        break;\n      }\n      maybeEnd = (ch == \"*\");\n    }\n    return \"comment\";\n  }\n\n  function tokenString(quote) {\n    return function(stream, state) {\n      var escaped = false, ch;\n      while ((ch = stream.next()) != null) {\n        if (ch == quote && !escaped)\n          break;\n        escaped = !escaped && ch == \"\\\\\";\n      }\n      if (!escaped) state.tokenize = tokenBase;\n      return \"string\";\n    };\n  }\n\n  return {\n    startState: function(base) {\n      return {tokenize: tokenBase,\n              baseIndent: base || 0,\n              _indent: []};\n    },\n\n    token: function(stream, state) {\n      if (stream.eatSpace())\n        return null;\n\n      return (state.tokenize || tokenBase)(stream, state);;\n    },\n\n    indent: function(state, _textAfter) {\n      var length = state._indent.length;\n      if (_textAfter && (_textAfter[0] == \"}\"))\n        length--;\n\n      if (length <0)\n        length = 0;\n\n      return length * indentUnit;\n    },\n\n    electricChars: \"}\"\n  };\n});\n\nCodeMirror.defineMIME(\"application/sieve\", \"sieve\");\n\n});\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/slim/index.html",
    "content": "<!doctype html>\n\n<title>CodeMirror: SLIM mode</title>\n<meta charset=\"utf-8\"/>\n<link rel=stylesheet href=\"../../doc/docs.css\">\n\n<link rel=\"stylesheet\" href=\"../../lib/codemirror.css\">\n<link rel=\"stylesheet\" href=\"../../theme/ambiance.css\">\n<script src=\"https://code.jquery.com/jquery-1.11.1.min.js\"></script>\n<script src=\"https://code.jquery.com/ui/1.11.0/jquery-ui.min.js\"></script>\n<link rel=\"stylesheet\" href=\"https://code.jquery.com/ui/1.11.0/themes/smoothness/jquery-ui.css\">\n<script src=\"../../lib/codemirror.js\"></script>\n<script src=\"../xml/xml.js\"></script>\n<script src=\"../htmlembedded/htmlembedded.js\"></script>\n<script src=\"../htmlmixed/htmlmixed.js\"></script>\n<script src=\"../coffeescript/coffeescript.js\"></script>\n<script src=\"../javascript/javascript.js\"></script>\n<script src=\"../ruby/ruby.js\"></script>\n<script src=\"../markdown/markdown.js\"></script>\n<script src=\"slim.js\"></script>\n<style>.CodeMirror {background: #f8f8f8;}</style>\n<div id=nav>\n  <a href=\"http://codemirror.net\"><h1>CodeMirror</h1><img id=logo src=\"../../doc/logo.png\"></a>\n\n  <ul>\n    <li><a href=\"../../index.html\">Home</a>\n    <li><a href=\"../../doc/manual.html\">Manual</a>\n    <li><a href=\"https://github.com/codemirror/codemirror\">Code</a>\n  </ul>\n  <ul>\n    <li><a href=\"../index.html\">Language modes</a>\n    <li><a class=active href=\"#\">SLIM</a>\n  </ul>\n</div>\n\n<article>\n  <h2>SLIM mode</h2>\n  <form><textarea id=\"code\" name=\"code\">\nbody\n  table\n    - for user in users\n      td id=\"user_#{user.id}\" class=user.role\n        a href=user_action(user, :edit) Edit #{user.name}\n        a href=(path_to_user user) = user.name\nbody\n  h1(id=\"logo\") = page_logo\n  h2[id=\"tagline\" class=\"small tagline\"] = page_tagline\n\nh2[id=\"tagline\"\n   class=\"small tagline\"] = page_tagline\n\nh1 id = \"logo\" = page_logo\nh2 [ id = \"tagline\" ] = page_tagline\n\n/ comment\n  second line\n/! html comment\n   second line\n<!-- html comment -->\n<a href=\"#{'hello' if set}\">link</a>\na.slim href=\"work\" disabled=false running==:atom Text <b>bold</b>\n.clazz data-id=\"test\" == 'hello' unless quark\n | Text mode #{12}\n   Second line\n= x ||= :ruby_atom\n#menu.left\n  - @env.each do |x|\n    li: a = x\n*@dyntag attr=\"val\"\n.first *{:class => [:second, :third]} Text\n.second class=[\"text\",\"more\"]\n.third class=:text,:symbol\n\n  </textarea></form>\n  <script>\n    var editor = CodeMirror.fromTextArea(document.getElementById(\"code\"), {\n      lineNumbers: true,\n      theme: \"ambiance\",\n      mode: \"application/x-slim\"\n    });\n    $('.CodeMirror').resizable({\n      resize: function() {\n        editor.setSize($(this).width(), $(this).height());\n        //editor.refresh();\n      }\n    });\n  </script>\n\n  <p><strong>MIME types defined:</strong> <code>application/x-slim</code>.</p>\n\n  <p>\n    <strong>Parsing/Highlighting Tests:</strong>\n    <a href=\"../../test/index.html#slim_*\">normal</a>,\n    <a href=\"../../test/index.html#verbose,slim_*\">verbose</a>.\n  </p>\n</article>\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/slim/slim.js",
    "content": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n// Slim Highlighting for CodeMirror copyright (c) HicknHack Software Gmbh\n\n(function(mod) {\n  if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n    mod(require(\"../../lib/codemirror\"), require(\"../htmlmixed/htmlmixed\"), require(\"../ruby/ruby\"));\n  else if (typeof define == \"function\" && define.amd) // AMD\n    define([\"../../lib/codemirror\", \"../htmlmixed/htmlmixed\", \"../ruby/ruby\"], mod);\n  else // Plain browser env\n    mod(CodeMirror);\n})(function(CodeMirror) {\n\"use strict\";\n\n  CodeMirror.defineMode(\"slim\", function(config) {\n    var htmlMode = CodeMirror.getMode(config, {name: \"htmlmixed\"});\n    var rubyMode = CodeMirror.getMode(config, \"ruby\");\n    var modes = { html: htmlMode, ruby: rubyMode };\n    var embedded = {\n      ruby: \"ruby\",\n      javascript: \"javascript\",\n      css: \"text/css\",\n      sass: \"text/x-sass\",\n      scss: \"text/x-scss\",\n      less: \"text/x-less\",\n      styl: \"text/x-styl\", // no highlighting so far\n      coffee: \"coffeescript\",\n      asciidoc: \"text/x-asciidoc\",\n      markdown: \"text/x-markdown\",\n      textile: \"text/x-textile\", // no highlighting so far\n      creole: \"text/x-creole\", // no highlighting so far\n      wiki: \"text/x-wiki\", // no highlighting so far\n      mediawiki: \"text/x-mediawiki\", // no highlighting so far\n      rdoc: \"text/x-rdoc\", // no highlighting so far\n      builder: \"text/x-builder\", // no highlighting so far\n      nokogiri: \"text/x-nokogiri\", // no highlighting so far\n      erb: \"application/x-erb\"\n    };\n    var embeddedRegexp = function(map){\n      var arr = [];\n      for(var key in map) arr.push(key);\n      return new RegExp(\"^(\"+arr.join('|')+\"):\");\n    }(embedded);\n\n    var styleMap = {\n      \"commentLine\": \"comment\",\n      \"slimSwitch\": \"operator special\",\n      \"slimTag\": \"tag\",\n      \"slimId\": \"attribute def\",\n      \"slimClass\": \"attribute qualifier\",\n      \"slimAttribute\": \"attribute\",\n      \"slimSubmode\": \"keyword special\",\n      \"closeAttributeTag\": null,\n      \"slimDoctype\": null,\n      \"lineContinuation\": null\n    };\n    var closing = {\n      \"{\": \"}\",\n      \"[\": \"]\",\n      \"(\": \")\"\n    };\n\n    var nameStartChar = \"_a-zA-Z\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\";\n    var nameChar = nameStartChar + \"\\\\-0-9\\xB7\\u0300-\\u036F\\u203F-\\u2040\";\n    var nameRegexp = new RegExp(\"^[:\"+nameStartChar+\"](?::[\"+nameChar+\"]|[\"+nameChar+\"]*)\");\n    var attributeNameRegexp = new RegExp(\"^[:\"+nameStartChar+\"][:\\\\.\"+nameChar+\"]*(?=\\\\s*=)\");\n    var wrappedAttributeNameRegexp = new RegExp(\"^[:\"+nameStartChar+\"][:\\\\.\"+nameChar+\"]*\");\n    var classNameRegexp = /^\\.-?[_a-zA-Z]+[\\w\\-]*/;\n    var classIdRegexp = /^#[_a-zA-Z]+[\\w\\-]*/;\n\n    function backup(pos, tokenize, style) {\n      var restore = function(stream, state) {\n        state.tokenize = tokenize;\n        if (stream.pos < pos) {\n          stream.pos = pos;\n          return style;\n        }\n        return state.tokenize(stream, state);\n      };\n      return function(stream, state) {\n        state.tokenize = restore;\n        return tokenize(stream, state);\n      };\n    }\n\n    function maybeBackup(stream, state, pat, offset, style) {\n      var cur = stream.current();\n      var idx = cur.search(pat);\n      if (idx > -1) {\n        state.tokenize = backup(stream.pos, state.tokenize, style);\n        stream.backUp(cur.length - idx - offset);\n      }\n      return style;\n    }\n\n    function continueLine(state, column) {\n      state.stack = {\n        parent: state.stack,\n        style: \"continuation\",\n        indented: column,\n        tokenize: state.line\n      };\n      state.line = state.tokenize;\n    }\n    function finishContinue(state) {\n      if (state.line == state.tokenize) {\n        state.line = state.stack.tokenize;\n        state.stack = state.stack.parent;\n      }\n    }\n\n    function lineContinuable(column, tokenize) {\n      return function(stream, state) {\n        finishContinue(state);\n        if (stream.match(/^\\\\$/)) {\n          continueLine(state, column);\n          return \"lineContinuation\";\n        }\n        var style = tokenize(stream, state);\n        if (stream.eol() && stream.current().match(/(?:^|[^\\\\])(?:\\\\\\\\)*\\\\$/)) {\n          stream.backUp(1);\n        }\n        return style;\n      };\n    }\n    function commaContinuable(column, tokenize) {\n      return function(stream, state) {\n        finishContinue(state);\n        var style = tokenize(stream, state);\n        if (stream.eol() && stream.current().match(/,$/)) {\n          continueLine(state, column);\n        }\n        return style;\n      };\n    }\n\n    function rubyInQuote(endQuote, tokenize) {\n      // TODO: add multi line support\n      return function(stream, state) {\n        var ch = stream.peek();\n        if (ch == endQuote && state.rubyState.tokenize.length == 1) {\n          // step out of ruby context as it seems to complete processing all the braces\n          stream.next();\n          state.tokenize = tokenize;\n          return \"closeAttributeTag\";\n        } else {\n          return ruby(stream, state);\n        }\n      };\n    }\n    function startRubySplat(tokenize) {\n      var rubyState;\n      var runSplat = function(stream, state) {\n        if (state.rubyState.tokenize.length == 1 && !state.rubyState.context.prev) {\n          stream.backUp(1);\n          if (stream.eatSpace()) {\n            state.rubyState = rubyState;\n            state.tokenize = tokenize;\n            return tokenize(stream, state);\n          }\n          stream.next();\n        }\n        return ruby(stream, state);\n      };\n      return function(stream, state) {\n        rubyState = state.rubyState;\n        state.rubyState = rubyMode.startState();\n        state.tokenize = runSplat;\n        return ruby(stream, state);\n      };\n    }\n\n    function ruby(stream, state) {\n      return rubyMode.token(stream, state.rubyState);\n    }\n\n    function htmlLine(stream, state) {\n      if (stream.match(/^\\\\$/)) {\n        return \"lineContinuation\";\n      }\n      return html(stream, state);\n    }\n    function html(stream, state) {\n      if (stream.match(/^#\\{/)) {\n        state.tokenize = rubyInQuote(\"}\", state.tokenize);\n        return null;\n      }\n      return maybeBackup(stream, state, /[^\\\\]#\\{/, 1, htmlMode.token(stream, state.htmlState));\n    }\n\n    function startHtmlLine(lastTokenize) {\n      return function(stream, state) {\n        var style = htmlLine(stream, state);\n        if (stream.eol()) state.tokenize = lastTokenize;\n        return style;\n      };\n    }\n\n    function startHtmlMode(stream, state, offset) {\n      state.stack = {\n        parent: state.stack,\n        style: \"html\",\n        indented: stream.column() + offset, // pipe + space\n        tokenize: state.line\n      };\n      state.line = state.tokenize = html;\n      return null;\n    }\n\n    function comment(stream, state) {\n      stream.skipToEnd();\n      return state.stack.style;\n    }\n\n    function commentMode(stream, state) {\n      state.stack = {\n        parent: state.stack,\n        style: \"comment\",\n        indented: state.indented + 1,\n        tokenize: state.line\n      };\n      state.line = comment;\n      return comment(stream, state);\n    }\n\n    function attributeWrapper(stream, state) {\n      if (stream.eat(state.stack.endQuote)) {\n        state.line = state.stack.line;\n        state.tokenize = state.stack.tokenize;\n        state.stack = state.stack.parent;\n        return null;\n      }\n      if (stream.match(wrappedAttributeNameRegexp)) {\n        state.tokenize = attributeWrapperAssign;\n        return \"slimAttribute\";\n      }\n      stream.next();\n      return null;\n    }\n    function attributeWrapperAssign(stream, state) {\n      if (stream.match(/^==?/)) {\n        state.tokenize = attributeWrapperValue;\n        return null;\n      }\n      return attributeWrapper(stream, state);\n    }\n    function attributeWrapperValue(stream, state) {\n      var ch = stream.peek();\n      if (ch == '\"' || ch == \"\\'\") {\n        state.tokenize = readQuoted(ch, \"string\", true, false, attributeWrapper);\n        stream.next();\n        return state.tokenize(stream, state);\n      }\n      if (ch == '[') {\n        return startRubySplat(attributeWrapper)(stream, state);\n      }\n      if (stream.match(/^(true|false|nil)\\b/)) {\n        state.tokenize = attributeWrapper;\n        return \"keyword\";\n      }\n      return startRubySplat(attributeWrapper)(stream, state);\n    }\n\n    function startAttributeWrapperMode(state, endQuote, tokenize) {\n      state.stack = {\n        parent: state.stack,\n        style: \"wrapper\",\n        indented: state.indented + 1,\n        tokenize: tokenize,\n        line: state.line,\n        endQuote: endQuote\n      };\n      state.line = state.tokenize = attributeWrapper;\n      return null;\n    }\n\n    function sub(stream, state) {\n      if (stream.match(/^#\\{/)) {\n        state.tokenize = rubyInQuote(\"}\", state.tokenize);\n        return null;\n      }\n      var subStream = new CodeMirror.StringStream(stream.string.slice(state.stack.indented), stream.tabSize);\n      subStream.pos = stream.pos - state.stack.indented;\n      subStream.start = stream.start - state.stack.indented;\n      subStream.lastColumnPos = stream.lastColumnPos - state.stack.indented;\n      subStream.lastColumnValue = stream.lastColumnValue - state.stack.indented;\n      var style = state.subMode.token(subStream, state.subState);\n      stream.pos = subStream.pos + state.stack.indented;\n      return style;\n    }\n    function firstSub(stream, state) {\n      state.stack.indented = stream.column();\n      state.line = state.tokenize = sub;\n      return state.tokenize(stream, state);\n    }\n\n    function createMode(mode) {\n      var query = embedded[mode];\n      var spec = CodeMirror.mimeModes[query];\n      if (spec) {\n        return CodeMirror.getMode(config, spec);\n      }\n      var factory = CodeMirror.modes[query];\n      if (factory) {\n        return factory(config, {name: query});\n      }\n      return CodeMirror.getMode(config, \"null\");\n    }\n\n    function getMode(mode) {\n      if (!modes.hasOwnProperty(mode)) {\n        return modes[mode] = createMode(mode);\n      }\n      return modes[mode];\n    }\n\n    function startSubMode(mode, state) {\n      var subMode = getMode(mode);\n      var subState = subMode.startState && subMode.startState();\n\n      state.subMode = subMode;\n      state.subState = subState;\n\n      state.stack = {\n        parent: state.stack,\n        style: \"sub\",\n        indented: state.indented + 1,\n        tokenize: state.line\n      };\n      state.line = state.tokenize = firstSub;\n      return \"slimSubmode\";\n    }\n\n    function doctypeLine(stream, _state) {\n      stream.skipToEnd();\n      return \"slimDoctype\";\n    }\n\n    function startLine(stream, state) {\n      var ch = stream.peek();\n      if (ch == '<') {\n        return (state.tokenize = startHtmlLine(state.tokenize))(stream, state);\n      }\n      if (stream.match(/^[|']/)) {\n        return startHtmlMode(stream, state, 1);\n      }\n      if (stream.match(/^\\/(!|\\[\\w+])?/)) {\n        return commentMode(stream, state);\n      }\n      if (stream.match(/^(-|==?[<>]?)/)) {\n        state.tokenize = lineContinuable(stream.column(), commaContinuable(stream.column(), ruby));\n        return \"slimSwitch\";\n      }\n      if (stream.match(/^doctype\\b/)) {\n        state.tokenize = doctypeLine;\n        return \"keyword\";\n      }\n\n      var m = stream.match(embeddedRegexp);\n      if (m) {\n        return startSubMode(m[1], state);\n      }\n\n      return slimTag(stream, state);\n    }\n\n    function slim(stream, state) {\n      if (state.startOfLine) {\n        return startLine(stream, state);\n      }\n      return slimTag(stream, state);\n    }\n\n    function slimTag(stream, state) {\n      if (stream.eat('*')) {\n        state.tokenize = startRubySplat(slimTagExtras);\n        return null;\n      }\n      if (stream.match(nameRegexp)) {\n        state.tokenize = slimTagExtras;\n        return \"slimTag\";\n      }\n      return slimClass(stream, state);\n    }\n    function slimTagExtras(stream, state) {\n      if (stream.match(/^(<>?|><?)/)) {\n        state.tokenize = slimClass;\n        return null;\n      }\n      return slimClass(stream, state);\n    }\n    function slimClass(stream, state) {\n      if (stream.match(classIdRegexp)) {\n        state.tokenize = slimClass;\n        return \"slimId\";\n      }\n      if (stream.match(classNameRegexp)) {\n        state.tokenize = slimClass;\n        return \"slimClass\";\n      }\n      return slimAttribute(stream, state);\n    }\n    function slimAttribute(stream, state) {\n      if (stream.match(/^([\\[\\{\\(])/)) {\n        return startAttributeWrapperMode(state, closing[RegExp.$1], slimAttribute);\n      }\n      if (stream.match(attributeNameRegexp)) {\n        state.tokenize = slimAttributeAssign;\n        return \"slimAttribute\";\n      }\n      if (stream.peek() == '*') {\n        stream.next();\n        state.tokenize = startRubySplat(slimContent);\n        return null;\n      }\n      return slimContent(stream, state);\n    }\n    function slimAttributeAssign(stream, state) {\n      if (stream.match(/^==?/)) {\n        state.tokenize = slimAttributeValue;\n        return null;\n      }\n      // should never happen, because of forward lookup\n      return slimAttribute(stream, state);\n    }\n\n    function slimAttributeValue(stream, state) {\n      var ch = stream.peek();\n      if (ch == '\"' || ch == \"\\'\") {\n        state.tokenize = readQuoted(ch, \"string\", true, false, slimAttribute);\n        stream.next();\n        return state.tokenize(stream, state);\n      }\n      if (ch == '[') {\n        return startRubySplat(slimAttribute)(stream, state);\n      }\n      if (ch == ':') {\n        return startRubySplat(slimAttributeSymbols)(stream, state);\n      }\n      if (stream.match(/^(true|false|nil)\\b/)) {\n        state.tokenize = slimAttribute;\n        return \"keyword\";\n      }\n      return startRubySplat(slimAttribute)(stream, state);\n    }\n    function slimAttributeSymbols(stream, state) {\n      stream.backUp(1);\n      if (stream.match(/^[^\\s],(?=:)/)) {\n        state.tokenize = startRubySplat(slimAttributeSymbols);\n        return null;\n      }\n      stream.next();\n      return slimAttribute(stream, state);\n    }\n    function readQuoted(quote, style, embed, unescaped, nextTokenize) {\n      return function(stream, state) {\n        finishContinue(state);\n        var fresh = stream.current().length == 0;\n        if (stream.match(/^\\\\$/, fresh)) {\n          if (!fresh) return style;\n          continueLine(state, state.indented);\n          return \"lineContinuation\";\n        }\n        if (stream.match(/^#\\{/, fresh)) {\n          if (!fresh) return style;\n          state.tokenize = rubyInQuote(\"}\", state.tokenize);\n          return null;\n        }\n        var escaped = false, ch;\n        while ((ch = stream.next()) != null) {\n          if (ch == quote && (unescaped || !escaped)) {\n            state.tokenize = nextTokenize;\n            break;\n          }\n          if (embed && ch == \"#\" && !escaped) {\n            if (stream.eat(\"{\")) {\n              stream.backUp(2);\n              break;\n            }\n          }\n          escaped = !escaped && ch == \"\\\\\";\n        }\n        if (stream.eol() && escaped) {\n          stream.backUp(1);\n        }\n        return style;\n      };\n    }\n    function slimContent(stream, state) {\n      if (stream.match(/^==?/)) {\n        state.tokenize = ruby;\n        return \"slimSwitch\";\n      }\n      if (stream.match(/^\\/$/)) { // tag close hint\n        state.tokenize = slim;\n        return null;\n      }\n      if (stream.match(/^:/)) { // inline tag\n        state.tokenize = slimTag;\n        return \"slimSwitch\";\n      }\n      startHtmlMode(stream, state, 0);\n      return state.tokenize(stream, state);\n    }\n\n    var mode = {\n      // default to html mode\n      startState: function() {\n        var htmlState = htmlMode.startState();\n        var rubyState = rubyMode.startState();\n        return {\n          htmlState: htmlState,\n          rubyState: rubyState,\n          stack: null,\n          last: null,\n          tokenize: slim,\n          line: slim,\n          indented: 0\n        };\n      },\n\n      copyState: function(state) {\n        return {\n          htmlState : CodeMirror.copyState(htmlMode, state.htmlState),\n          rubyState: CodeMirror.copyState(rubyMode, state.rubyState),\n          subMode: state.subMode,\n          subState: state.subMode && CodeMirror.copyState(state.subMode, state.subState),\n          stack: state.stack,\n          last: state.last,\n          tokenize: state.tokenize,\n          line: state.line\n        };\n      },\n\n      token: function(stream, state) {\n        if (stream.sol()) {\n          state.indented = stream.indentation();\n          state.startOfLine = true;\n          state.tokenize = state.line;\n          while (state.stack && state.stack.indented > state.indented && state.last != \"slimSubmode\") {\n            state.line = state.tokenize = state.stack.tokenize;\n            state.stack = state.stack.parent;\n            state.subMode = null;\n            state.subState = null;\n          }\n        }\n        if (stream.eatSpace()) return null;\n        var style = state.tokenize(stream, state);\n        state.startOfLine = false;\n        if (style) state.last = style;\n        return styleMap.hasOwnProperty(style) ? styleMap[style] : style;\n      },\n\n      blankLine: function(state) {\n        if (state.subMode && state.subMode.blankLine) {\n          return state.subMode.blankLine(state.subState);\n        }\n      },\n\n      innerMode: function(state) {\n        if (state.subMode) return {state: state.subState, mode: state.subMode};\n        return {state: state, mode: mode};\n      }\n\n      //indent: function(state) {\n      //  return state.indented;\n      //}\n    };\n    return mode;\n  }, \"htmlmixed\", \"ruby\");\n\n  CodeMirror.defineMIME(\"text/x-slim\", \"slim\");\n  CodeMirror.defineMIME(\"application/x-slim\", \"slim\");\n});\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/slim/test.js",
    "content": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n// Slim Highlighting for CodeMirror copyright (c) HicknHack Software Gmbh\n\n(function() {\n  var mode = CodeMirror.getMode({tabSize: 4, indentUnit: 2}, \"slim\");\n  function MT(name) { test.mode(name, mode, Array.prototype.slice.call(arguments, 1)); }\n\n  // Requires at least one media query\n  MT(\"elementName\",\n     \"[tag h1] Hey There\");\n\n  MT(\"oneElementPerLine\",\n     \"[tag h1] Hey There .h2\");\n\n  MT(\"idShortcut\",\n     \"[attribute&def #test] Hey There\");\n\n  MT(\"tagWithIdShortcuts\",\n     \"[tag h1][attribute&def #test] Hey There\");\n\n  MT(\"classShortcut\",\n     \"[attribute&qualifier .hello] Hey There\");\n\n  MT(\"tagWithIdAndClassShortcuts\",\n     \"[tag h1][attribute&def #test][attribute&qualifier .hello] Hey There\");\n\n  MT(\"docType\",\n     \"[keyword doctype] xml\");\n\n  MT(\"comment\",\n     \"[comment / Hello WORLD]\");\n\n  MT(\"notComment\",\n     \"[tag h1] This is not a / comment \");\n\n  MT(\"attributes\",\n     \"[tag a]([attribute title]=[string \\\"test\\\"]) [attribute href]=[string \\\"link\\\"]}\");\n\n  MT(\"multiLineAttributes\",\n     \"[tag a]([attribute title]=[string \\\"test\\\"]\",\n     \"  ) [attribute href]=[string \\\"link\\\"]}\");\n\n  MT(\"htmlCode\",\n     \"[tag&bracket <][tag h1][tag&bracket >]Title[tag&bracket </][tag h1][tag&bracket >]\");\n\n  MT(\"rubyBlock\",\n     \"[operator&special =][variable-2 @item]\");\n\n  MT(\"selectorRubyBlock\",\n     \"[tag a][attribute&qualifier .test][operator&special =] [variable-2 @item]\");\n\n  MT(\"nestedRubyBlock\",\n      \"[tag a]\",\n      \"  [operator&special =][variable puts] [string \\\"test\\\"]\");\n\n  MT(\"multilinePlaintext\",\n      \"[tag p]\",\n      \"  | Hello,\",\n      \"    World\");\n\n  MT(\"multilineRuby\",\n      \"[tag p]\",\n      \"  [comment /# this is a comment]\",\n      \"     [comment and this is a comment too]\",\n      \"  | Date/Time\",\n      \"  [operator&special -] [variable now] [operator =] [tag DateTime][operator .][property now]\",\n      \"  [tag strong][operator&special =] [variable now]\",\n      \"  [operator&special -] [keyword if] [variable now] [operator >] [tag DateTime][operator .][property parse]([string \\\"December 31, 2006\\\"])\",\n      \"     [operator&special =][string \\\"Happy\\\"]\",\n      \"     [operator&special =][string \\\"Belated\\\"]\",\n      \"     [operator&special =][string \\\"Birthday\\\"]\");\n\n  MT(\"multilineComment\",\n      \"[comment /]\",\n      \"  [comment Multiline]\",\n      \"  [comment Comment]\");\n\n  MT(\"hamlAfterRubyTag\",\n    \"[attribute&qualifier .block]\",\n    \"  [tag strong][operator&special =] [variable now]\",\n    \"  [attribute&qualifier .test]\",\n    \"     [operator&special =][variable now]\",\n    \"  [attribute&qualifier .right]\");\n\n  MT(\"stretchedRuby\",\n     \"[operator&special =] [variable puts] [string \\\"Hello\\\"],\",\n     \"   [string \\\"World\\\"]\");\n\n  MT(\"interpolationInHashAttribute\",\n     \"[tag div]{[attribute id] = [string \\\"]#{[variable test]}[string _]#{[variable ting]}[string \\\"]} test\");\n\n  MT(\"interpolationInHTMLAttribute\",\n     \"[tag div]([attribute title]=[string \\\"]#{[variable test]}[string _]#{[variable ting]()}[string \\\"]) Test\");\n})();\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/smalltalk/index.html",
    "content": "<!doctype html>\n\n<title>CodeMirror: Smalltalk mode</title>\n<meta charset=\"utf-8\"/>\n<link rel=stylesheet href=\"../../doc/docs.css\">\n\n<link rel=\"stylesheet\" href=\"../../lib/codemirror.css\">\n<script src=\"../../lib/codemirror.js\"></script>\n<script src=\"../../addon/edit/matchbrackets.js\"></script>\n<script src=\"smalltalk.js\"></script>\n<style>\n      .CodeMirror {border: 2px solid #dee; border-right-width: 10px;}\n      .CodeMirror-gutter {border: none; background: #dee;}\n      .CodeMirror-gutter pre {color: white; font-weight: bold;}\n    </style>\n<div id=nav>\n  <a href=\"http://codemirror.net\"><h1>CodeMirror</h1><img id=logo src=\"../../doc/logo.png\"></a>\n\n  <ul>\n    <li><a href=\"../../index.html\">Home</a>\n    <li><a href=\"../../doc/manual.html\">Manual</a>\n    <li><a href=\"https://github.com/codemirror/codemirror\">Code</a>\n  </ul>\n  <ul>\n    <li><a href=\"../index.html\">Language modes</a>\n    <li><a class=active href=\"#\">Smalltalk</a>\n  </ul>\n</div>\n\n<article>\n<h2>Smalltalk mode</h2>\n<form><textarea id=\"code\" name=\"code\">\n\" \n    This is a test of the Smalltalk code\n\"\nSeaside.WAComponent subclass: #MyCounter [\n    | count |\n    MyCounter class &gt;&gt; canBeRoot [ ^true ]\n\n    initialize [\n        super initialize.\n        count := 0.\n    ]\n    states [ ^{ self } ]\n    renderContentOn: html [\n        html heading: count.\n        html anchor callback: [ count := count + 1 ]; with: '++'.\n        html space.\n        html anchor callback: [ count := count - 1 ]; with: '--'.\n    ]\n]\n\nMyCounter registerAsApplication: 'mycounter'\n</textarea></form>\n\n    <script>\n      var editor = CodeMirror.fromTextArea(document.getElementById(\"code\"), {\n        lineNumbers: true,\n        matchBrackets: true,\n        mode: \"text/x-stsrc\",\n        indentUnit: 4\n      });\n    </script>\n\n    <p>Simple Smalltalk mode.</p>\n\n    <p><strong>MIME types defined:</strong> <code>text/x-stsrc</code>.</p>\n  </article>\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/smalltalk/smalltalk.js",
    "content": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n(function(mod) {\n  if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n    mod(require(\"../../lib/codemirror\"));\n  else if (typeof define == \"function\" && define.amd) // AMD\n    define([\"../../lib/codemirror\"], mod);\n  else // Plain browser env\n    mod(CodeMirror);\n})(function(CodeMirror) {\n\"use strict\";\n\nCodeMirror.defineMode('smalltalk', function(config) {\n\n  var specialChars = /[+\\-\\/\\\\*~<>=@%|&?!.,:;^]/;\n  var keywords = /true|false|nil|self|super|thisContext/;\n\n  var Context = function(tokenizer, parent) {\n    this.next = tokenizer;\n    this.parent = parent;\n  };\n\n  var Token = function(name, context, eos) {\n    this.name = name;\n    this.context = context;\n    this.eos = eos;\n  };\n\n  var State = function() {\n    this.context = new Context(next, null);\n    this.expectVariable = true;\n    this.indentation = 0;\n    this.userIndentationDelta = 0;\n  };\n\n  State.prototype.userIndent = function(indentation) {\n    this.userIndentationDelta = indentation > 0 ? (indentation / config.indentUnit - this.indentation) : 0;\n  };\n\n  var next = function(stream, context, state) {\n    var token = new Token(null, context, false);\n    var aChar = stream.next();\n\n    if (aChar === '\"') {\n      token = nextComment(stream, new Context(nextComment, context));\n\n    } else if (aChar === '\\'') {\n      token = nextString(stream, new Context(nextString, context));\n\n    } else if (aChar === '#') {\n      if (stream.peek() === '\\'') {\n        stream.next();\n        token = nextSymbol(stream, new Context(nextSymbol, context));\n      } else {\n        if (stream.eatWhile(/[^\\s.{}\\[\\]()]/))\n          token.name = 'string-2';\n        else\n          token.name = 'meta';\n      }\n\n    } else if (aChar === '$') {\n      if (stream.next() === '<') {\n        stream.eatWhile(/[^\\s>]/);\n        stream.next();\n      }\n      token.name = 'string-2';\n\n    } else if (aChar === '|' && state.expectVariable) {\n      token.context = new Context(nextTemporaries, context);\n\n    } else if (/[\\[\\]{}()]/.test(aChar)) {\n      token.name = 'bracket';\n      token.eos = /[\\[{(]/.test(aChar);\n\n      if (aChar === '[') {\n        state.indentation++;\n      } else if (aChar === ']') {\n        state.indentation = Math.max(0, state.indentation - 1);\n      }\n\n    } else if (specialChars.test(aChar)) {\n      stream.eatWhile(specialChars);\n      token.name = 'operator';\n      token.eos = aChar !== ';'; // ; cascaded message expression\n\n    } else if (/\\d/.test(aChar)) {\n      stream.eatWhile(/[\\w\\d]/);\n      token.name = 'number';\n\n    } else if (/[\\w_]/.test(aChar)) {\n      stream.eatWhile(/[\\w\\d_]/);\n      token.name = state.expectVariable ? (keywords.test(stream.current()) ? 'keyword' : 'variable') : null;\n\n    } else {\n      token.eos = state.expectVariable;\n    }\n\n    return token;\n  };\n\n  var nextComment = function(stream, context) {\n    stream.eatWhile(/[^\"]/);\n    return new Token('comment', stream.eat('\"') ? context.parent : context, true);\n  };\n\n  var nextString = function(stream, context) {\n    stream.eatWhile(/[^']/);\n    return new Token('string', stream.eat('\\'') ? context.parent : context, false);\n  };\n\n  var nextSymbol = function(stream, context) {\n    stream.eatWhile(/[^']/);\n    return new Token('string-2', stream.eat('\\'') ? context.parent : context, false);\n  };\n\n  var nextTemporaries = function(stream, context) {\n    var token = new Token(null, context, false);\n    var aChar = stream.next();\n\n    if (aChar === '|') {\n      token.context = context.parent;\n      token.eos = true;\n\n    } else {\n      stream.eatWhile(/[^|]/);\n      token.name = 'variable';\n    }\n\n    return token;\n  };\n\n  return {\n    startState: function() {\n      return new State;\n    },\n\n    token: function(stream, state) {\n      state.userIndent(stream.indentation());\n\n      if (stream.eatSpace()) {\n        return null;\n      }\n\n      var token = state.context.next(stream, state.context, state);\n      state.context = token.context;\n      state.expectVariable = token.eos;\n\n      return token.name;\n    },\n\n    blankLine: function(state) {\n      state.userIndent(0);\n    },\n\n    indent: function(state, textAfter) {\n      var i = state.context.next === next && textAfter && textAfter.charAt(0) === ']' ? -1 : state.userIndentationDelta;\n      return (state.indentation + i) * config.indentUnit;\n    },\n\n    electricChars: ']'\n  };\n\n});\n\nCodeMirror.defineMIME('text/x-stsrc', {name: 'smalltalk'});\n\n});\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/smarty/index.html",
    "content": "<!doctype html>\n\n<title>CodeMirror: Smarty mode</title>\n<meta charset=\"utf-8\"/>\n<link rel=stylesheet href=\"../../doc/docs.css\">\n\n<link rel=\"stylesheet\" href=\"../../lib/codemirror.css\">\n<script src=\"../../lib/codemirror.js\"></script>\n<script src=\"smarty.js\"></script>\n<style type=\"text/css\">.CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}</style>\n<div id=nav>\n  <a href=\"http://codemirror.net\"><h1>CodeMirror</h1><img id=logo src=\"../../doc/logo.png\"></a>\n\n  <ul>\n    <li><a href=\"../../index.html\">Home</a>\n    <li><a href=\"../../doc/manual.html\">Manual</a>\n    <li><a href=\"https://github.com/codemirror/codemirror\">Code</a>\n  </ul>\n  <ul>\n    <li><a href=\"../index.html\">Language modes</a>\n    <li><a class=active href=\"#\">Smarty</a>\n  </ul>\n</div>\n\n<article>\n<h2>Smarty mode</h2>\n<form><textarea id=\"code\" name=\"code\">\n{extends file=\"parent.tpl\"}\n{include file=\"template.tpl\"}\n\n{* some example Smarty content *}\n{if isset($name) && $name == 'Blog'}\n  This is a {$var}.\n  {$integer = 451}, {$array[] = \"a\"}, {$stringvar = \"string\"}\n  {assign var='bob' value=$var.prop}\n{elseif $name == $foo}\n  {function name=menu level=0}\n    {foreach $data as $entry}\n      {if is_array($entry)}\n        - {$entry@key}\n        {menu data=$entry level=$level+1}\n      {else}\n        {$entry}\n      {/if}\n    {/foreach}\n  {/function}\n{/if}</textarea></form>\n\n    <script>\n      var editor = CodeMirror.fromTextArea(document.getElementById(\"code\"), {\n        lineNumbers: true,\n        mode: \"smarty\"\n      });\n    </script>\n\n    <br />\n\n\t<h3>Smarty 2, custom delimiters</h3>\n    <form><textarea id=\"code2\" name=\"code2\">\n{--extends file=\"parent.tpl\"--}\n{--include file=\"template.tpl\"--}\n\n{--* some example Smarty content *--}\n{--if isset($name) && $name == 'Blog'--}\n  This is a {--$var--}.\n  {--$integer = 451--}, {--$array[] = \"a\"--}, {--$stringvar = \"string\"--}\n  {--assign var='bob' value=$var.prop--}\n{--elseif $name == $foo--}\n  {--function name=menu level=0--}\n    {--foreach $data as $entry--}\n      {--if is_array($entry)--}\n        - {--$entry@key--}\n        {--menu data=$entry level=$level+1--}\n      {--else--}\n        {--$entry--}\n      {--/if--}\n    {--/foreach--}\n  {--/function--}\n{--/if--}</textarea></form>\n\n    <script>\n      var editor = CodeMirror.fromTextArea(document.getElementById(\"code2\"), {\n        lineNumbers: true,\n        mode: {\n          name: \"smarty\",\n          leftDelimiter: \"{--\",\n          rightDelimiter: \"--}\"\n        }\n      });\n    </script>\n\n\t<br />\n\n\t<h3>Smarty 3</h3>\n\n\t<textarea id=\"code3\" name=\"code3\">\nNested tags {$foo={counter one=1 two={inception}}+3} are now valid in Smarty 3.\n\n<script>\nfunction test() {\n\tconsole.log(\"Smarty 3 permits single curly braces followed by whitespace to NOT slip into Smarty mode.\");\n}\n</script>\n\n{assign var=foo value=[1,2,3]}\n{assign var=foo value=['y'=>'yellow','b'=>'blue']}\n{assign var=foo value=[1,[9,8],3]}\n\n{$foo=$bar+2} {* a comment *}\n{$foo.bar=1}  {* another comment *}\n{$foo = myfunct(($x+$y)*3)}\n{$foo = strlen($bar)}\n{$foo.bar.baz=1}, {$foo[]=1}\n\nSmarty \"dot\" syntax (note: embedded {} are used to address ambiguities):\n\n{$foo.a.b.c}      => $foo['a']['b']['c']\n{$foo.a.$b.c}     => $foo['a'][$b]['c']\n{$foo.a.{$b+4}.c} => $foo['a'][$b+4]['c']\n{$foo.a.{$b.c}}   => $foo['a'][$b['c']]\n\n{$object->method1($x)->method2($y)}</textarea>\n\n\t<script>\n\t\tvar editor = CodeMirror.fromTextArea(document.getElementById(\"code3\"), {\n\t\t\tlineNumbers: true,\n\t\t\tmode: \"smarty\",\n\t\t\tsmartyVersion: 3\n\t\t});\n\t</script>\n\n\n    <p>A plain text/Smarty version 2 or 3 mode, which allows for custom delimiter tags.</p>\n\n    <p><strong>MIME types defined:</strong> <code>text/x-smarty</code></p>\n  </article>\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/smarty/smarty.js",
    "content": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n/**\n * Smarty 2 and 3 mode.\n */\n\n(function(mod) {\n  if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n    mod(require(\"../../lib/codemirror\"));\n  else if (typeof define == \"function\" && define.amd) // AMD\n    define([\"../../lib/codemirror\"], mod);\n  else // Plain browser env\n    mod(CodeMirror);\n})(function(CodeMirror) {\n\"use strict\";\n\nCodeMirror.defineMode(\"smarty\", function(config) {\n  \"use strict\";\n\n  // our default settings; check to see if they're overridden\n  var settings = {\n    rightDelimiter: '}',\n    leftDelimiter: '{',\n    smartyVersion: 2 // for backward compatibility\n  };\n  if (config.hasOwnProperty(\"leftDelimiter\")) {\n    settings.leftDelimiter = config.leftDelimiter;\n  }\n  if (config.hasOwnProperty(\"rightDelimiter\")) {\n    settings.rightDelimiter = config.rightDelimiter;\n  }\n  if (config.hasOwnProperty(\"smartyVersion\") && config.smartyVersion === 3) {\n    settings.smartyVersion = 3;\n  }\n\n  var keyFunctions = [\"debug\", \"extends\", \"function\", \"include\", \"literal\"];\n  var last;\n  var regs = {\n    operatorChars: /[+\\-*&%=<>!?]/,\n    validIdentifier: /[a-zA-Z0-9_]/,\n    stringChar: /['\"]/\n  };\n\n  var helpers = {\n    cont: function(style, lastType) {\n      last = lastType;\n      return style;\n    },\n    chain: function(stream, state, parser) {\n      state.tokenize = parser;\n      return parser(stream, state);\n    }\n  };\n\n\n  // our various parsers\n  var parsers = {\n\n    // the main tokenizer\n    tokenizer: function(stream, state) {\n      if (stream.match(settings.leftDelimiter, true)) {\n        if (stream.eat(\"*\")) {\n          return helpers.chain(stream, state, parsers.inBlock(\"comment\", \"*\" + settings.rightDelimiter));\n        } else {\n          // Smarty 3 allows { and } surrounded by whitespace to NOT slip into Smarty mode\n          state.depth++;\n          var isEol = stream.eol();\n          var isFollowedByWhitespace = /\\s/.test(stream.peek());\n          if (settings.smartyVersion === 3 && settings.leftDelimiter === \"{\" && (isEol || isFollowedByWhitespace)) {\n            state.depth--;\n            return null;\n          } else {\n            state.tokenize = parsers.smarty;\n            last = \"startTag\";\n            return \"tag\";\n          }\n        }\n      } else {\n        stream.next();\n        return null;\n      }\n    },\n\n    // parsing Smarty content\n    smarty: function(stream, state) {\n      if (stream.match(settings.rightDelimiter, true)) {\n        if (settings.smartyVersion === 3) {\n          state.depth--;\n          if (state.depth <= 0) {\n            state.tokenize = parsers.tokenizer;\n          }\n        } else {\n          state.tokenize = parsers.tokenizer;\n        }\n        return helpers.cont(\"tag\", null);\n      }\n\n      if (stream.match(settings.leftDelimiter, true)) {\n        state.depth++;\n        return helpers.cont(\"tag\", \"startTag\");\n      }\n\n      var ch = stream.next();\n      if (ch == \"$\") {\n        stream.eatWhile(regs.validIdentifier);\n        return helpers.cont(\"variable-2\", \"variable\");\n      } else if (ch == \"|\") {\n        return helpers.cont(\"operator\", \"pipe\");\n      } else if (ch == \".\") {\n        return helpers.cont(\"operator\", \"property\");\n      } else if (regs.stringChar.test(ch)) {\n        state.tokenize = parsers.inAttribute(ch);\n        return helpers.cont(\"string\", \"string\");\n      } else if (regs.operatorChars.test(ch)) {\n        stream.eatWhile(regs.operatorChars);\n        return helpers.cont(\"operator\", \"operator\");\n      } else if (ch == \"[\" || ch == \"]\") {\n        return helpers.cont(\"bracket\", \"bracket\");\n      } else if (ch == \"(\" || ch == \")\") {\n        return helpers.cont(\"bracket\", \"operator\");\n      } else if (/\\d/.test(ch)) {\n        stream.eatWhile(/\\d/);\n        return helpers.cont(\"number\", \"number\");\n      } else {\n\n        if (state.last == \"variable\") {\n          if (ch == \"@\") {\n            stream.eatWhile(regs.validIdentifier);\n            return helpers.cont(\"property\", \"property\");\n          } else if (ch == \"|\") {\n            stream.eatWhile(regs.validIdentifier);\n            return helpers.cont(\"qualifier\", \"modifier\");\n          }\n        } else if (state.last == \"pipe\") {\n          stream.eatWhile(regs.validIdentifier);\n          return helpers.cont(\"qualifier\", \"modifier\");\n        } else if (state.last == \"whitespace\") {\n          stream.eatWhile(regs.validIdentifier);\n          return helpers.cont(\"attribute\", \"modifier\");\n        } if (state.last == \"property\") {\n          stream.eatWhile(regs.validIdentifier);\n          return helpers.cont(\"property\", null);\n        } else if (/\\s/.test(ch)) {\n          last = \"whitespace\";\n          return null;\n        }\n\n        var str = \"\";\n        if (ch != \"/\") {\n          str += ch;\n        }\n        var c = null;\n        while (c = stream.eat(regs.validIdentifier)) {\n          str += c;\n        }\n        for (var i=0, j=keyFunctions.length; i<j; i++) {\n          if (keyFunctions[i] == str) {\n            return helpers.cont(\"keyword\", \"keyword\");\n          }\n        }\n        if (/\\s/.test(ch)) {\n          return null;\n        }\n        return helpers.cont(\"tag\", \"tag\");\n      }\n    },\n\n    inAttribute: function(quote) {\n      return function(stream, state) {\n        var prevChar = null;\n        var currChar = null;\n        while (!stream.eol()) {\n          currChar = stream.peek();\n          if (stream.next() == quote && prevChar !== '\\\\') {\n            state.tokenize = parsers.smarty;\n            break;\n          }\n          prevChar = currChar;\n        }\n        return \"string\";\n      };\n    },\n\n    inBlock: function(style, terminator) {\n      return function(stream, state) {\n        while (!stream.eol()) {\n          if (stream.match(terminator)) {\n            state.tokenize = parsers.tokenizer;\n            break;\n          }\n          stream.next();\n        }\n        return style;\n      };\n    }\n  };\n\n\n  // the public API for CodeMirror\n  return {\n    startState: function() {\n      return {\n        tokenize: parsers.tokenizer,\n        mode: \"smarty\",\n        last: null,\n        depth: 0\n      };\n    },\n    token: function(stream, state) {\n      var style = state.tokenize(stream, state);\n      state.last = last;\n      return style;\n    },\n    electricChars: \"\"\n  };\n});\n\nCodeMirror.defineMIME(\"text/x-smarty\", \"smarty\");\n\n});\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/smartymixed/index.html",
    "content": "<!doctype html>\n\n<title>CodeMirror: Smarty mixed mode</title>\n<meta charset=\"utf-8\"/>\n<link rel=stylesheet href=\"../../doc/docs.css\">\n\n<link rel=\"stylesheet\" href=\"../../lib/codemirror.css\">\n<script src=\"../../lib/codemirror.js\"></script>\n<script src=\"../../mode/xml/xml.js\"></script>\n<script src=\"../../mode/javascript/javascript.js\"></script>\n<script src=\"../../mode/css/css.js\"></script>\n<script src=\"../../mode/htmlmixed/htmlmixed.js\"></script>\n<script src=\"../../mode/smarty/smarty.js\"></script>\n<script src=\"../../mode/smartymixed/smartymixed.js\"></script>\n<div id=nav>\n  <a href=\"http://codemirror.net\"><h1>CodeMirror</h1><img id=logo src=\"../../doc/logo.png\"></a>\n\n  <ul>\n    <li><a href=\"../../index.html\">Home</a>\n    <li><a href=\"../../doc/manual.html\">Manual</a>\n    <li><a href=\"https://github.com/codemirror/codemirror\">Code</a>\n  </ul>\n  <ul>\n    <li><a href=\"../index.html\">Language modes</a>\n    <li><a class=active href=\"#\">Smarty mixed</a>\n  </ul>\n</div>\n\n<article>\n<h2>Smarty mixed mode</h2>\n<form><textarea id=\"code\" name=\"code\">\n{**\n* @brief Smarty mixed mode\n* @author Ruslan Osmanov\n* @date 29.06.2013\n*}\n<html>\n<head>\n  <title>{$title|htmlspecialchars|truncate:30}</title>\n</head>\n<body class=\"{$bodyclass}\">\n  {* Multiline smarty\n  * comment, no {$variables} here\n  *}\n  {literal}\n  {literal} is just an HTML text.\n  <script type=\"text/javascript\">//<![CDATA[\n    var a = {$just_a_normal_js_object : \"value\"};\n    var myCodeMirror = CodeMirror.fromTextArea(document.getElementById(\"code\"), {\n      mode           : \"smartymixed\",\n      tabSize        : 2,\n      indentUnit     : 2,\n      indentWithTabs : false,\n      lineNumbers    : true,\n      smartyVersion  : 3\n    });\n    // ]]>\n  </script>\n  <style>\n    /* CSS content \n    {$no_smarty} */\n    .some-class { font-weight: bolder; color: \"orange\"; }\n  </style>\n  {/literal}\n\n  {extends file=\"parent.tpl\"}\n  {include file=\"template.tpl\"}\n\n  {* some example Smarty content *}\n  {if isset($name) && $name == 'Blog'}\n    This is a {$var}.\n    {$integer = 4511}, {$array[] = \"a\"}, {$stringvar = \"string\"}\n    {$integer = 4512} {$array[] = \"a\"} {$stringvar = \"string\"}\n    {assign var='bob' value=$var.prop}\n  {elseif $name == $foo}\n    {function name=menu level=0}\n    {foreach $data as $entry}\n      {if is_array($entry)}\n      - {$entry@key}\n      {menu data=$entry level=$level+1}\n      {else}\n      {$entry}\n      {* One\n      * Two\n      * Three\n      *}\n      {/if}\n    {/foreach}\n    {/function}\n  {/if}\n  </body>\n  <!-- R.O. -->\n</html>\n</textarea></form>\n\n    <script type=\"text/javascript\">\n      var myCodeMirror = CodeMirror.fromTextArea(document.getElementById(\"code\"), {\n        mode           : \"smartymixed\",\n        tabSize        : 2,\n        indentUnit     : 2,\n        indentWithTabs : false,\n        lineNumbers    : true,\n        smartyVersion  : 3,\n        matchBrackets  : true,\n      });\n    </script>\n\n    <p>The Smarty mixed mode depends on the Smarty and HTML mixed modes. HTML\n    mixed mode itself depends on XML, JavaScript, and CSS modes.</p>\n\n    <p>It takes the same options, as Smarty and HTML mixed modes.</p>\n\n    <p><strong>MIME types defined:</strong> <code>text/x-smarty</code>.</p>\n  </article>\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/smartymixed/smartymixed.js",
    "content": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n/**\n* @file smartymixed.js\n* @brief Smarty Mixed Codemirror mode (Smarty + Mixed HTML)\n* @author Ruslan Osmanov <rrosmanov at gmail dot com>\n* @version 3.0\n* @date 05.07.2013\n*/\n\n// Warning: Don't base other modes on this one. This here is a\n// terrible way to write a mixed mode.\n\n(function(mod) {\n  if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n    mod(require(\"../../lib/codemirror\"), require(\"../htmlmixed/htmlmixed\"), require(\"../smarty/smarty\"));\n  else if (typeof define == \"function\" && define.amd) // AMD\n    define([\"../../lib/codemirror\", \"../htmlmixed/htmlmixed\", \"../smarty/smarty\"], mod);\n  else // Plain browser env\n    mod(CodeMirror);\n})(function(CodeMirror) {\n\"use strict\";\n\nCodeMirror.defineMode(\"smartymixed\", function(config) {\n  var htmlMixedMode = CodeMirror.getMode(config, \"htmlmixed\");\n  var smartyMode = CodeMirror.getMode(config, \"smarty\");\n\n  var settings = {\n    rightDelimiter: '}',\n    leftDelimiter: '{'\n  };\n\n  if (config.hasOwnProperty(\"leftDelimiter\")) {\n    settings.leftDelimiter = config.leftDelimiter;\n  }\n  if (config.hasOwnProperty(\"rightDelimiter\")) {\n    settings.rightDelimiter = config.rightDelimiter;\n  }\n\n  function reEsc(str) { return str.replace(/[^\\s\\w]/g, \"\\\\$&\"); }\n\n  var reLeft = reEsc(settings.leftDelimiter), reRight = reEsc(settings.rightDelimiter);\n  var regs = {\n    smartyComment: new RegExp(\"^\" + reRight + \"\\\\*\"),\n    literalOpen: new RegExp(reLeft + \"literal\" + reRight),\n    literalClose: new RegExp(reLeft + \"\\/literal\" + reRight),\n    hasLeftDelimeter: new RegExp(\".*\" + reLeft),\n    htmlHasLeftDelimeter: new RegExp(\"[^<>]*\" + reLeft)\n  };\n\n  var helpers = {\n    chain: function(stream, state, parser) {\n      state.tokenize = parser;\n      return parser(stream, state);\n    },\n\n    cleanChain: function(stream, state, parser) {\n      state.tokenize = null;\n      state.localState = null;\n      state.localMode = null;\n      return (typeof parser == \"string\") ? (parser ? parser : null) : parser(stream, state);\n    },\n\n    maybeBackup: function(stream, pat, style) {\n      var cur = stream.current();\n      var close = cur.search(pat),\n      m;\n      if (close > - 1) stream.backUp(cur.length - close);\n      else if (m = cur.match(/<\\/?$/)) {\n        stream.backUp(cur.length);\n        if (!stream.match(pat, false)) stream.match(cur[0]);\n      }\n      return style;\n    }\n  };\n\n  var parsers = {\n    html: function(stream, state) {\n      var htmlTagName = state.htmlMixedState.htmlState.context && state.htmlMixedState.htmlState.context.tagName\n        ? state.htmlMixedState.htmlState.context.tagName\n        : null;\n\n      if (!state.inLiteral && stream.match(regs.htmlHasLeftDelimeter, false) && htmlTagName === null) {\n        state.tokenize = parsers.smarty;\n        state.localMode = smartyMode;\n        state.localState = smartyMode.startState(htmlMixedMode.indent(state.htmlMixedState, \"\"));\n        return helpers.maybeBackup(stream, settings.leftDelimiter, smartyMode.token(stream, state.localState));\n      } else if (!state.inLiteral && stream.match(settings.leftDelimiter, false)) {\n        state.tokenize = parsers.smarty;\n        state.localMode = smartyMode;\n        state.localState = smartyMode.startState(htmlMixedMode.indent(state.htmlMixedState, \"\"));\n        return helpers.maybeBackup(stream, settings.leftDelimiter, smartyMode.token(stream, state.localState));\n      }\n      return htmlMixedMode.token(stream, state.htmlMixedState);\n    },\n\n    smarty: function(stream, state) {\n      if (stream.match(settings.leftDelimiter, false)) {\n        if (stream.match(regs.smartyComment, false)) {\n          return helpers.chain(stream, state, parsers.inBlock(\"comment\", \"*\" + settings.rightDelimiter));\n        }\n      } else if (stream.match(settings.rightDelimiter, false)) {\n        stream.eat(settings.rightDelimiter);\n        state.tokenize = parsers.html;\n        state.localMode = htmlMixedMode;\n        state.localState = state.htmlMixedState;\n        return \"tag\";\n      }\n\n      return helpers.maybeBackup(stream, settings.rightDelimiter, smartyMode.token(stream, state.localState));\n    },\n\n    inBlock: function(style, terminator) {\n      return function(stream, state) {\n        while (!stream.eol()) {\n          if (stream.match(terminator)) {\n            helpers.cleanChain(stream, state, \"\");\n            break;\n          }\n          stream.next();\n        }\n        return style;\n      };\n    }\n  };\n\n  return {\n    startState: function() {\n      var state = htmlMixedMode.startState();\n      return {\n        token: parsers.html,\n        localMode: null,\n        localState: null,\n        htmlMixedState: state,\n        tokenize: null,\n        inLiteral: false\n      };\n    },\n\n    copyState: function(state) {\n      var local = null, tok = (state.tokenize || state.token);\n      if (state.localState) {\n        local = CodeMirror.copyState((tok != parsers.html ? smartyMode : htmlMixedMode), state.localState);\n      }\n      return {\n        token: state.token,\n        tokenize: state.tokenize,\n        localMode: state.localMode,\n        localState: local,\n        htmlMixedState: CodeMirror.copyState(htmlMixedMode, state.htmlMixedState),\n        inLiteral: state.inLiteral\n      };\n    },\n\n    token: function(stream, state) {\n      if (stream.match(settings.leftDelimiter, false)) {\n        if (!state.inLiteral && stream.match(regs.literalOpen, true)) {\n          state.inLiteral = true;\n          return \"keyword\";\n        } else if (state.inLiteral && stream.match(regs.literalClose, true)) {\n          state.inLiteral = false;\n          return \"keyword\";\n        }\n      }\n      if (state.inLiteral && state.localState != state.htmlMixedState) {\n        state.tokenize = parsers.html;\n        state.localMode = htmlMixedMode;\n        state.localState = state.htmlMixedState;\n      }\n\n      var style = (state.tokenize || state.token)(stream, state);\n      return style;\n    },\n\n    indent: function(state, textAfter) {\n      if (state.localMode == smartyMode\n          || (state.inLiteral && !state.localMode)\n         || regs.hasLeftDelimeter.test(textAfter)) {\n        return CodeMirror.Pass;\n      }\n      return htmlMixedMode.indent(state.htmlMixedState, textAfter);\n    },\n\n    innerMode: function(state) {\n      return {\n        state: state.localState || state.htmlMixedState,\n        mode: state.localMode || htmlMixedMode\n      };\n    }\n  };\n}, \"htmlmixed\", \"smarty\");\n\nCodeMirror.defineMIME(\"text/x-smarty\", \"smartymixed\");\n// vim: et ts=2 sts=2 sw=2\n\n});\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/solr/index.html",
    "content": "<!doctype html>\n\n<title>CodeMirror: Solr mode</title>\n<meta charset=\"utf-8\"/>\n<link rel=stylesheet href=\"../../doc/docs.css\">\n\n<link rel=\"stylesheet\" href=\"../../lib/codemirror.css\">\n<script src=\"../../lib/codemirror.js\"></script>\n<script src=\"solr.js\"></script>\n<style type=\"text/css\">\n  .CodeMirror {\n    border-top: 1px solid black;\n    border-bottom: 1px solid black;\n  }\n\n  .CodeMirror .cm-operator {\n    color: orange;\n  }\n</style>\n<div id=nav>\n  <a href=\"http://codemirror.net\"><h1>CodeMirror</h1><img id=logo src=\"../../doc/logo.png\"></a>\n\n  <ul>\n    <li><a href=\"../../index.html\">Home</a>\n    <li><a href=\"../../doc/manual.html\">Manual</a>\n    <li><a href=\"https://github.com/codemirror/codemirror\">Code</a>\n  </ul>\n  <ul>\n    <li><a href=\"../index.html\">Language modes</a>\n    <li><a class=active href=\"#\">Solr</a>\n  </ul>\n</div>\n\n<article>\n  <h2>Solr mode</h2>\n\n  <div>\n    <textarea id=\"code\" name=\"code\">author:Camus\n\ntitle:\"The Rebel\" and author:Camus\n\nphilosophy:Existentialism -author:Kierkegaard\n\nhardToSpell:Dostoevsky~\n\npublished:[194* TO 1960] and author:(Sartre or \"Simone de Beauvoir\")</textarea>\n  </div>\n\n  <script>\n    var editor = CodeMirror.fromTextArea(document.getElementById(\"code\"), {\n      mode: 'solr',\n      lineNumbers: true\n    });\n  </script>\n\n  <p><strong>MIME types defined:</strong> <code>text/x-solr</code>.</p>\n</article>\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/solr/solr.js",
    "content": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n(function(mod) {\n  if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n    mod(require(\"../../lib/codemirror\"));\n  else if (typeof define == \"function\" && define.amd) // AMD\n    define([\"../../lib/codemirror\"], mod);\n  else // Plain browser env\n    mod(CodeMirror);\n})(function(CodeMirror) {\n\"use strict\";\n\nCodeMirror.defineMode(\"solr\", function() {\n  \"use strict\";\n\n  var isStringChar = /[^\\s\\|\\!\\+\\-\\*\\?\\~\\^\\&\\:\\(\\)\\[\\]\\{\\}\\^\\\"\\\\]/;\n  var isOperatorChar = /[\\|\\!\\+\\-\\*\\?\\~\\^\\&]/;\n  var isOperatorString = /^(OR|AND|NOT|TO)$/i;\n\n  function isNumber(word) {\n    return parseFloat(word, 10).toString() === word;\n  }\n\n  function tokenString(quote) {\n    return function(stream, state) {\n      var escaped = false, next;\n      while ((next = stream.next()) != null) {\n        if (next == quote && !escaped) break;\n        escaped = !escaped && next == \"\\\\\";\n      }\n\n      if (!escaped) state.tokenize = tokenBase;\n      return \"string\";\n    };\n  }\n\n  function tokenOperator(operator) {\n    return function(stream, state) {\n      var style = \"operator\";\n      if (operator == \"+\")\n        style += \" positive\";\n      else if (operator == \"-\")\n        style += \" negative\";\n      else if (operator == \"|\")\n        stream.eat(/\\|/);\n      else if (operator == \"&\")\n        stream.eat(/\\&/);\n      else if (operator == \"^\")\n        style += \" boost\";\n\n      state.tokenize = tokenBase;\n      return style;\n    };\n  }\n\n  function tokenWord(ch) {\n    return function(stream, state) {\n      var word = ch;\n      while ((ch = stream.peek()) && ch.match(isStringChar) != null) {\n        word += stream.next();\n      }\n\n      state.tokenize = tokenBase;\n      if (isOperatorString.test(word))\n        return \"operator\";\n      else if (isNumber(word))\n        return \"number\";\n      else if (stream.peek() == \":\")\n        return \"field\";\n      else\n        return \"string\";\n    };\n  }\n\n  function tokenBase(stream, state) {\n    var ch = stream.next();\n    if (ch == '\"')\n      state.tokenize = tokenString(ch);\n    else if (isOperatorChar.test(ch))\n      state.tokenize = tokenOperator(ch);\n    else if (isStringChar.test(ch))\n      state.tokenize = tokenWord(ch);\n\n    return (state.tokenize != tokenBase) ? state.tokenize(stream, state) : null;\n  }\n\n  return {\n    startState: function() {\n      return {\n        tokenize: tokenBase\n      };\n    },\n\n    token: function(stream, state) {\n      if (stream.eatSpace()) return null;\n      return state.tokenize(stream, state);\n    }\n  };\n});\n\nCodeMirror.defineMIME(\"text/x-solr\", \"solr\");\n\n});\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/soy/index.html",
    "content": "<!doctype html>\n\n<title>CodeMirror: Soy (Closure Template) mode</title>\n<meta charset=\"utf-8\"/>\n<link rel=stylesheet href=\"../../doc/docs.css\">\n\n<link rel=\"stylesheet\" href=\"../../lib/codemirror.css\">\n<script src=\"../../lib/codemirror.js\"></script>\n<script src=\"../../addon/edit/matchbrackets.js\"></script>\n<script src=\"../htmlmixed/htmlmixed.js\"></script>\n<script src=\"../xml/xml.js\"></script>\n<script src=\"../javascript/javascript.js\"></script>\n<script src=\"../css/css.js\"></script>\n<script src=\"soy.js\"></script>\n<style type=\"text/css\">.CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}</style>\n<div id=nav>\n  <a href=\"http://codemirror.net\"><h1>CodeMirror</h1><img id=logo src=\"../../doc/logo.png\"></a>\n\n  <ul>\n    <li><a href=\"../../index.html\">Home</a>\n    <li><a href=\"../../doc/manual.html\">Manual</a>\n    <li><a href=\"https://github.com/codemirror/codemirror\">Code</a>\n  </ul>\n  <ul>\n    <li><a href=\"../index.html\">Language modes</a>\n    <li><a class=active href=\"#\">Soy (Closure Template)</a>\n  </ul>\n</div>\n\n<article>\n<h2>Soy (Closure Template) mode</h2>\n<form><textarea id=\"code\" name=\"code\">\n{namespace example}\n\n/**\n * Says hello to the world.\n */\n{template .helloWorld}\n  {@param name: string}\n  {@param? score: number}\n  Hello <b>{$name}</b>!\n  <div>\n    {if $score}\n      <em>{$score} points</em>\n    {else}\n      no score\n    {/if}\n  </div>\n{/template}\n\n{template .alertHelloWorld kind=\"js\"}\n  alert('Hello World');\n{/template}\n</textarea></form>\n\n    <script>\n      var editor = CodeMirror.fromTextArea(document.getElementById(\"code\"), {\n        lineNumbers: true,\n        matchBrackets: true,\n        mode: \"text/x-soy\",\n        indentUnit: 2,\n        indentWithTabs: false\n      });\n    </script>\n\n    <p>A mode for <a href=\"https://developers.google.com/closure/templates/\">Closure Templates</a> (Soy).</p>\n    <p><strong>MIME type defined:</strong> <code>text/x-soy</code>.</p>\n  </article>\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/soy/soy.js",
    "content": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n(function(mod) {\n  if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n    mod(require(\"../../lib/codemirror\"), require(\"../htmlmixed/htmlmixed\"));\n  else if (typeof define == \"function\" && define.amd) // AMD\n    define([\"../../lib/codemirror\", \"../htmlmixed/htmlmixed\"], mod);\n  else // Plain browser env\n    mod(CodeMirror);\n})(function(CodeMirror) {\n  \"use strict\";\n\n  var indentingTags = [\"template\", \"literal\", \"msg\", \"fallbackmsg\", \"let\", \"if\", \"elseif\",\n                       \"else\", \"switch\", \"case\", \"default\", \"foreach\", \"ifempty\", \"for\",\n                       \"call\", \"param\", \"deltemplate\", \"delcall\", \"log\"];\n\n  CodeMirror.defineMode(\"soy\", function(config) {\n    var textMode = CodeMirror.getMode(config, \"text/plain\");\n    var modes = {\n      html: CodeMirror.getMode(config, {name: \"text/html\", multilineTagIndentFactor: 2, multilineTagIndentPastTag: false}),\n      attributes: textMode,\n      text: textMode,\n      uri: textMode,\n      css: CodeMirror.getMode(config, \"text/css\"),\n      js: CodeMirror.getMode(config, {name: \"text/javascript\", statementIndent: 2 * config.indentUnit})\n    };\n\n    function last(array) {\n      return array[array.length - 1];\n    }\n\n    function tokenUntil(stream, state, untilRegExp) {\n      var oldString = stream.string;\n      var match = untilRegExp.exec(oldString.substr(stream.pos));\n      if (match) {\n        // We don't use backUp because it backs up just the position, not the state.\n        // This uses an undocumented API.\n        stream.string = oldString.substr(0, stream.pos + match.index);\n      }\n      var result = stream.hideFirstChars(state.indent, function() {\n        return state.localMode.token(stream, state.localState);\n      });\n      stream.string = oldString;\n      return result;\n    }\n\n    return {\n      startState: function() {\n        return {\n          kind: [],\n          kindTag: [],\n          soyState: [],\n          indent: 0,\n          localMode: modes.html,\n          localState: CodeMirror.startState(modes.html)\n        };\n      },\n\n      copyState: function(state) {\n        return {\n          tag: state.tag, // Last seen Soy tag.\n          kind: state.kind.concat([]), // Values of kind=\"\" attributes.\n          kindTag: state.kindTag.concat([]), // Opened tags with kind=\"\" attributes.\n          soyState: state.soyState.concat([]),\n          indent: state.indent, // Indentation of the following line.\n          localMode: state.localMode,\n          localState: CodeMirror.copyState(state.localMode, state.localState)\n        };\n      },\n\n      token: function(stream, state) {\n        var match;\n\n        switch (last(state.soyState)) {\n          case \"comment\":\n            if (stream.match(/^.*?\\*\\//)) {\n              state.soyState.pop();\n            } else {\n              stream.skipToEnd();\n            }\n            return \"comment\";\n\n          case \"variable\":\n            if (stream.match(/^}/)) {\n              state.indent -= 2 * config.indentUnit;\n              state.soyState.pop();\n              return \"variable-2\";\n            }\n            stream.next();\n            return null;\n\n          case \"tag\":\n            if (stream.match(/^\\/?}/)) {\n              if (state.tag == \"/template\" || state.tag == \"/deltemplate\") state.indent = 0;\n              else state.indent -= (stream.current() == \"/}\" || indentingTags.indexOf(state.tag) == -1 ? 2 : 1) * config.indentUnit;\n              state.soyState.pop();\n              return \"keyword\";\n            } else if (stream.match(/^(\\w+)(?==)/)) {\n              if (stream.current() == \"kind\" && (match = stream.match(/^=\"([^\"]+)/, false))) {\n                var kind = match[1];\n                state.kind.push(kind);\n                state.kindTag.push(state.tag);\n                state.localMode = modes[kind] || modes.html;\n                state.localState = CodeMirror.startState(state.localMode);\n              }\n              return \"attribute\";\n            } else if (stream.match(/^\"/)) {\n              state.soyState.push(\"string\");\n              return \"string\";\n            }\n            stream.next();\n            return null;\n\n          case \"literal\":\n            if (stream.match(/^(?=\\{\\/literal})/)) {\n              state.indent -= config.indentUnit;\n              state.soyState.pop();\n              return this.token(stream, state);\n            }\n            return tokenUntil(stream, state, /\\{\\/literal}/);\n\n          case \"string\":\n            if (stream.match(/^.*?\"/)) {\n              state.soyState.pop();\n            } else {\n              stream.skipToEnd();\n            }\n            return \"string\";\n        }\n\n        if (stream.match(/^\\/\\*/)) {\n          state.soyState.push(\"comment\");\n          return \"comment\";\n        } else if (stream.match(stream.sol() ? /^\\s*\\/\\/.*/ : /^\\s+\\/\\/.*/)) {\n          return \"comment\";\n        } else if (stream.match(/^\\{\\$\\w*/)) {\n          state.indent += 2 * config.indentUnit;\n          state.soyState.push(\"variable\");\n          return \"variable-2\";\n        } else if (stream.match(/^\\{literal}/)) {\n          state.indent += config.indentUnit;\n          state.soyState.push(\"literal\");\n          return \"keyword\";\n        } else if (match = stream.match(/^\\{([\\/@\\\\]?\\w*)/)) {\n          if (match[1] != \"/switch\")\n            state.indent += (/^(\\/|(else|elseif|case|default)$)/.test(match[1]) && state.tag != \"switch\" ? 1 : 2) * config.indentUnit;\n          state.tag = match[1];\n          if (state.tag == \"/\" + last(state.kindTag)) {\n            // We found the tag that opened the current kind=\"\".\n            state.kind.pop();\n            state.kindTag.pop();\n            state.localMode = modes[last(state.kind)] || modes.html;\n            state.localState = CodeMirror.startState(state.localMode);\n          }\n          state.soyState.push(\"tag\");\n          return \"keyword\";\n        }\n\n        return tokenUntil(stream, state, /\\{|\\s+\\/\\/|\\/\\*/);\n      },\n\n      indent: function(state, textAfter) {\n        var indent = state.indent, top = last(state.soyState);\n        if (top == \"comment\") return CodeMirror.Pass;\n\n        if (top == \"literal\") {\n          if (/^\\{\\/literal}/.test(textAfter)) indent -= config.indentUnit;\n        } else {\n          if (/^\\s*\\{\\/(template|deltemplate)\\b/.test(textAfter)) return 0;\n          if (/^\\{(\\/|(fallbackmsg|elseif|else|ifempty)\\b)/.test(textAfter)) indent -= config.indentUnit;\n          if (state.tag != \"switch\" && /^\\{(case|default)\\b/.test(textAfter)) indent -= config.indentUnit;\n          if (/^\\{\\/switch\\b/.test(textAfter)) indent -= config.indentUnit;\n        }\n        if (indent && state.localMode.indent)\n          indent += state.localMode.indent(state.localState, textAfter);\n        return indent;\n      },\n\n      innerMode: function(state) {\n        if (state.soyState.length && last(state.soyState) != \"literal\") return null;\n        else return {state: state.localState, mode: state.localMode};\n      },\n\n      electricInput: /^\\s*\\{(\\/|\\/template|\\/deltemplate|\\/switch|fallbackmsg|elseif|else|case|default|ifempty|\\/literal\\})$/,\n      lineComment: \"//\",\n      blockCommentStart: \"/*\",\n      blockCommentEnd: \"*/\",\n      blockCommentContinue: \" * \",\n      fold: \"indent\"\n    };\n  }, \"htmlmixed\");\n\n  CodeMirror.registerHelper(\"hintWords\", \"soy\", indentingTags.concat(\n      [\"delpackage\", \"namespace\", \"alias\", \"print\", \"css\", \"debugger\"]));\n\n  CodeMirror.defineMIME(\"text/x-soy\", \"soy\");\n});\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/sparql/index.html",
    "content": "<!doctype html>\n\n<title>CodeMirror: SPARQL mode</title>\n<meta charset=\"utf-8\"/>\n<link rel=stylesheet href=\"../../doc/docs.css\">\n\n<link rel=\"stylesheet\" href=\"../../lib/codemirror.css\">\n<script src=\"../../lib/codemirror.js\"></script>\n<script src=\"../../addon/edit/matchbrackets.js\"></script>\n<script src=\"sparql.js\"></script>\n<style>.CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}</style>\n<div id=nav>\n  <a href=\"http://codemirror.net\"><h1>CodeMirror</h1><img id=logo src=\"../../doc/logo.png\"></a>\n\n  <ul>\n    <li><a href=\"../../index.html\">Home</a>\n    <li><a href=\"../../doc/manual.html\">Manual</a>\n    <li><a href=\"https://github.com/codemirror/codemirror\">Code</a>\n  </ul>\n  <ul>\n    <li><a href=\"../index.html\">Language modes</a>\n    <li><a class=active href=\"#\">SPARQL</a>\n  </ul>\n</div>\n\n<article>\n<h2>SPARQL mode</h2>\n<form><textarea id=\"code\" name=\"code\">\nPREFIX a: &lt;http://www.w3.org/2000/10/annotation-ns#>\nPREFIX dc: &lt;http://purl.org/dc/elements/1.1/>\nPREFIX foaf: &lt;http://xmlns.com/foaf/0.1/>\nPREFIX rdfs: &lt;http://www.w3.org/2000/01/rdf-schema#>\n\n# Comment!\n\nSELECT ?given ?family\nWHERE {\n  {\n    ?annot a:annotates &lt;http://www.w3.org/TR/rdf-sparql-query/> .\n    ?annot dc:creator ?c .\n    OPTIONAL {?c foaf:givenName ?given ;\n                 foaf:familyName ?family }\n  } UNION {\n    ?c !foaf:knows/foaf:knows? ?thing.\n    ?thing rdfs\n  } MINUS {\n    ?thing rdfs:label \"剛柔流\"@jp\n  }\n  FILTER isBlank(?c)\n}\n</textarea></form>\n    <script>\n      var editor = CodeMirror.fromTextArea(document.getElementById(\"code\"), {\n        mode: \"application/sparql-query\",\n        matchBrackets: true\n      });\n    </script>\n\n    <p><strong>MIME types defined:</strong> <code>application/sparql-query</code>.</p>\n\n  </article>\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/sparql/sparql.js",
    "content": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n(function(mod) {\n  if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n    mod(require(\"../../lib/codemirror\"));\n  else if (typeof define == \"function\" && define.amd) // AMD\n    define([\"../../lib/codemirror\"], mod);\n  else // Plain browser env\n    mod(CodeMirror);\n})(function(CodeMirror) {\n\"use strict\";\n\nCodeMirror.defineMode(\"sparql\", function(config) {\n  var indentUnit = config.indentUnit;\n  var curPunc;\n\n  function wordRegexp(words) {\n    return new RegExp(\"^(?:\" + words.join(\"|\") + \")$\", \"i\");\n  }\n  var ops = wordRegexp([\"str\", \"lang\", \"langmatches\", \"datatype\", \"bound\", \"sameterm\", \"isiri\", \"isuri\",\n                        \"iri\", \"uri\", \"bnode\", \"count\", \"sum\", \"min\", \"max\", \"avg\", \"sample\",\n                        \"group_concat\", \"rand\", \"abs\", \"ceil\", \"floor\", \"round\", \"concat\", \"substr\", \"strlen\",\n                        \"replace\", \"ucase\", \"lcase\", \"encode_for_uri\", \"contains\", \"strstarts\", \"strends\",\n                        \"strbefore\", \"strafter\", \"year\", \"month\", \"day\", \"hours\", \"minutes\", \"seconds\",\n                        \"timezone\", \"tz\", \"now\", \"uuid\", \"struuid\", \"md5\", \"sha1\", \"sha256\", \"sha384\",\n                        \"sha512\", \"coalesce\", \"if\", \"strlang\", \"strdt\", \"isnumeric\", \"regex\", \"exists\",\n                        \"isblank\", \"isliteral\", \"a\"]);\n  var keywords = wordRegexp([\"base\", \"prefix\", \"select\", \"distinct\", \"reduced\", \"construct\", \"describe\",\n                             \"ask\", \"from\", \"named\", \"where\", \"order\", \"limit\", \"offset\", \"filter\", \"optional\",\n                             \"graph\", \"by\", \"asc\", \"desc\", \"as\", \"having\", \"undef\", \"values\", \"group\",\n                             \"minus\", \"in\", \"not\", \"service\", \"silent\", \"using\", \"insert\", \"delete\", \"union\",\n                             \"true\", \"false\", \"with\",\n                             \"data\", \"copy\", \"to\", \"move\", \"add\", \"create\", \"drop\", \"clear\", \"load\"]);\n  var operatorChars = /[*+\\-<>=&|\\^\\/!\\?]/;\n\n  function tokenBase(stream, state) {\n    var ch = stream.next();\n    curPunc = null;\n    if (ch == \"$\" || ch == \"?\") {\n      if(ch == \"?\" && stream.match(/\\s/, false)){\n        return \"operator\";\n      }\n      stream.match(/^[\\w\\d]*/);\n      return \"variable-2\";\n    }\n    else if (ch == \"<\" && !stream.match(/^[\\s\\u00a0=]/, false)) {\n      stream.match(/^[^\\s\\u00a0>]*>?/);\n      return \"atom\";\n    }\n    else if (ch == \"\\\"\" || ch == \"'\") {\n      state.tokenize = tokenLiteral(ch);\n      return state.tokenize(stream, state);\n    }\n    else if (/[{}\\(\\),\\.;\\[\\]]/.test(ch)) {\n      curPunc = ch;\n      return \"bracket\";\n    }\n    else if (ch == \"#\") {\n      stream.skipToEnd();\n      return \"comment\";\n    }\n    else if (operatorChars.test(ch)) {\n      stream.eatWhile(operatorChars);\n      return \"operator\";\n    }\n    else if (ch == \":\") {\n      stream.eatWhile(/[\\w\\d\\._\\-]/);\n      return \"atom\";\n    }\n    else if (ch == \"@\") {\n      stream.eatWhile(/[a-z\\d\\-]/i);\n      return \"meta\";\n    }\n    else {\n      stream.eatWhile(/[_\\w\\d]/);\n      if (stream.eat(\":\")) {\n        stream.eatWhile(/[\\w\\d_\\-]/);\n        return \"atom\";\n      }\n      var word = stream.current();\n      if (ops.test(word))\n        return \"builtin\";\n      else if (keywords.test(word))\n        return \"keyword\";\n      else\n        return \"variable\";\n    }\n  }\n\n  function tokenLiteral(quote) {\n    return function(stream, state) {\n      var escaped = false, ch;\n      while ((ch = stream.next()) != null) {\n        if (ch == quote && !escaped) {\n          state.tokenize = tokenBase;\n          break;\n        }\n        escaped = !escaped && ch == \"\\\\\";\n      }\n      return \"string\";\n    };\n  }\n\n  function pushContext(state, type, col) {\n    state.context = {prev: state.context, indent: state.indent, col: col, type: type};\n  }\n  function popContext(state) {\n    state.indent = state.context.indent;\n    state.context = state.context.prev;\n  }\n\n  return {\n    startState: function() {\n      return {tokenize: tokenBase,\n              context: null,\n              indent: 0,\n              col: 0};\n    },\n\n    token: function(stream, state) {\n      if (stream.sol()) {\n        if (state.context && state.context.align == null) state.context.align = false;\n        state.indent = stream.indentation();\n      }\n      if (stream.eatSpace()) return null;\n      var style = state.tokenize(stream, state);\n\n      if (style != \"comment\" && state.context && state.context.align == null && state.context.type != \"pattern\") {\n        state.context.align = true;\n      }\n\n      if (curPunc == \"(\") pushContext(state, \")\", stream.column());\n      else if (curPunc == \"[\") pushContext(state, \"]\", stream.column());\n      else if (curPunc == \"{\") pushContext(state, \"}\", stream.column());\n      else if (/[\\]\\}\\)]/.test(curPunc)) {\n        while (state.context && state.context.type == \"pattern\") popContext(state);\n        if (state.context && curPunc == state.context.type) popContext(state);\n      }\n      else if (curPunc == \".\" && state.context && state.context.type == \"pattern\") popContext(state);\n      else if (/atom|string|variable/.test(style) && state.context) {\n        if (/[\\}\\]]/.test(state.context.type))\n          pushContext(state, \"pattern\", stream.column());\n        else if (state.context.type == \"pattern\" && !state.context.align) {\n          state.context.align = true;\n          state.context.col = stream.column();\n        }\n      }\n\n      return style;\n    },\n\n    indent: function(state, textAfter) {\n      var firstChar = textAfter && textAfter.charAt(0);\n      var context = state.context;\n      if (/[\\]\\}]/.test(firstChar))\n        while (context && context.type == \"pattern\") context = context.prev;\n\n      var closing = context && firstChar == context.type;\n      if (!context)\n        return 0;\n      else if (context.type == \"pattern\")\n        return context.col;\n      else if (context.align)\n        return context.col + (closing ? 0 : 1);\n      else\n        return context.indent + (closing ? 0 : indentUnit);\n    }\n  };\n});\n\nCodeMirror.defineMIME(\"application/sparql-query\", \"sparql\");\n\n});\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/spreadsheet/index.html",
    "content": "<!doctype html>\n\n<title>CodeMirror: Spreadsheet mode</title>\n<meta charset=\"utf-8\"/>\n<link rel=stylesheet href=\"../../doc/docs.css\">\n\n<link rel=\"stylesheet\" href=\"../../lib/codemirror.css\">\n<script src=\"../../lib/codemirror.js\"></script>\n<script src=\"../../addon/edit/matchbrackets.js\"></script>\n<script src=\"spreadsheet.js\"></script>\n<style type=\"text/css\">.CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}</style>\n<div id=nav>\n  <a href=\"http://codemirror.net\"><h1>CodeMirror</h1><img id=logo src=\"../../doc/logo.png\"></a>\n\n  <ul>\n    <li><a href=\"../../index.html\">Home</a>\n    <li><a href=\"../../doc/manual.html\">Manual</a>\n    <li><a href=\"https://github.com/codemirror/codemirror\">Code</a>\n  </ul>\n  <ul>\n    <li><a href=\"../index.html\">Language modes</a>\n    <li><a class=active href=\"#\">Spreadsheet</a>\n  </ul>\n</div>\n\n<article>\n  <h2>Spreadsheet mode</h2>\n  <form><textarea id=\"code\" name=\"code\">=IF(A1:B2, TRUE, FALSE) / 100</textarea></form>\n\n  <script>\n    var editor = CodeMirror.fromTextArea(document.getElementById(\"code\"), {\n      lineNumbers: true,\n      matchBrackets: true,\n      extraKeys: {\"Tab\":  \"indentAuto\"}\n    });\n  </script>\n\n  <p><strong>MIME types defined:</strong> <code>text/x-spreadsheet</code>.</p>\n  \n  <h3>The Spreadsheet Mode</h3>\n  <p> Created by <a href=\"https://github.com/robertleeplummerjr\">Robert Plummer</a></p>\n</article>\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/spreadsheet/spreadsheet.js",
    "content": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n(function(mod) {\n  if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n    mod(require(\"../../lib/codemirror\"));\n  else if (typeof define == \"function\" && define.amd) // AMD\n    define([\"../../lib/codemirror\"], mod);\n  else // Plain browser env\n    mod(CodeMirror);\n})(function(CodeMirror) {\n  \"use strict\";\n\n  CodeMirror.defineMode(\"spreadsheet\", function () {\n    return {\n      startState: function () {\n        return {\n          stringType: null,\n          stack: []\n        };\n      },\n      token: function (stream, state) {\n        if (!stream) return;\n\n        //check for state changes\n        if (state.stack.length === 0) {\n          //strings\n          if ((stream.peek() == '\"') || (stream.peek() == \"'\")) {\n            state.stringType = stream.peek();\n            stream.next(); // Skip quote\n            state.stack.unshift(\"string\");\n          }\n        }\n\n        //return state\n        //stack has\n        switch (state.stack[0]) {\n        case \"string\":\n          while (state.stack[0] === \"string\" && !stream.eol()) {\n            if (stream.peek() === state.stringType) {\n              stream.next(); // Skip quote\n              state.stack.shift(); // Clear flag\n            } else if (stream.peek() === \"\\\\\") {\n              stream.next();\n              stream.next();\n            } else {\n              stream.match(/^.[^\\\\\\\"\\']*/);\n            }\n          }\n          return \"string\";\n\n        case \"characterClass\":\n          while (state.stack[0] === \"characterClass\" && !stream.eol()) {\n            if (!(stream.match(/^[^\\]\\\\]+/) || stream.match(/^\\\\./)))\n              state.stack.shift();\n          }\n          return \"operator\";\n        }\n\n        var peek = stream.peek();\n\n        //no stack\n        switch (peek) {\n        case \"[\":\n          stream.next();\n          state.stack.unshift(\"characterClass\");\n          return \"bracket\";\n        case \":\":\n          stream.next();\n          return \"operator\";\n        case \"\\\\\":\n          if (stream.match(/\\\\[a-z]+/)) return \"string-2\";\n          else return null;\n        case \".\":\n        case \",\":\n        case \";\":\n        case \"*\":\n        case \"-\":\n        case \"+\":\n        case \"^\":\n        case \"<\":\n        case \"/\":\n        case \"=\":\n          stream.next();\n          return \"atom\";\n        case \"$\":\n          stream.next();\n          return \"builtin\";\n        }\n\n        if (stream.match(/\\d+/)) {\n          if (stream.match(/^\\w+/)) return \"error\";\n          return \"number\";\n        } else if (stream.match(/^[a-zA-Z_]\\w*/)) {\n          if (stream.match(/(?=[\\(.])/, false)) return \"keyword\";\n          return \"variable-2\";\n        } else if ([\"[\", \"]\", \"(\", \")\", \"{\", \"}\"].indexOf(peek) != -1) {\n          stream.next();\n          return \"bracket\";\n        } else if (!stream.eatSpace()) {\n          stream.next();\n        }\n        return null;\n      }\n    };\n  });\n\n  CodeMirror.defineMIME(\"text/x-spreadsheet\", \"spreadsheet\");\n});\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/sql/index.html",
    "content": "<!doctype html>\n\n<title>CodeMirror: SQL Mode for CodeMirror</title>\n<meta charset=\"utf-8\"/>\n<link rel=stylesheet href=\"../../doc/docs.css\">\n\n<link rel=\"stylesheet\" href=\"../../lib/codemirror.css\" />\n<script src=\"../../lib/codemirror.js\"></script>\n<script src=\"sql.js\"></script>\n<link rel=\"stylesheet\" href=\"../../addon/hint/show-hint.css\" />\n<script src=\"../../addon/hint/show-hint.js\"></script>\n<script src=\"../../addon/hint/sql-hint.js\"></script>\n<style>\n.CodeMirror {\n    border-top: 1px solid black;\n    border-bottom: 1px solid black;\n}\n        </style>\n<div id=nav>\n  <a href=\"http://codemirror.net\"><h1>CodeMirror</h1><img id=logo src=\"../../doc/logo.png\"></a>\n\n  <ul>\n    <li><a href=\"../../index.html\">Home</a>\n    <li><a href=\"../../doc/manual.html\">Manual</a>\n    <li><a href=\"https://github.com/codemirror/codemirror\">Code</a>\n  </ul>\n  <ul>\n    <li><a href=\"../index.html\">Language modes</a>\n    <li><a class=active href=\"#\">SQL Mode for CodeMirror</a>\n  </ul>\n</div>\n\n<article>\n<h2>SQL Mode for CodeMirror</h2>\n<form>\n            <textarea id=\"code\" name=\"code\">-- SQL Mode for CodeMirror\nSELECT SQL_NO_CACHE DISTINCT\n\t\t@var1 AS `val1`, @'val2', @global.'sql_mode',\n\t\t1.1 AS `float_val`, .14 AS `another_float`, 0.09e3 AS `int_with_esp`,\n\t\t0xFA5 AS `hex`, x'fa5' AS `hex2`, 0b101 AS `bin`, b'101' AS `bin2`,\n\t\tDATE '1994-01-01' AS `sql_date`, { T \"1994-01-01\" } AS `odbc_date`,\n\t\t'my string', _utf8'your string', N'her string',\n        TRUE, FALSE, UNKNOWN\n\tFROM DUAL\n\t-- space needed after '--'\n\t# 1 line comment\n\t/* multiline\n\tcomment! */\n\tLIMIT 1 OFFSET 0;\n</textarea>\n            </form>\n            <p><strong>MIME types defined:</strong> \n            <code><a href=\"?mime=text/x-sql\">text/x-sql</a></code>,\n            <code><a href=\"?mime=text/x-mysql\">text/x-mysql</a></code>,\n            <code><a href=\"?mime=text/x-mariadb\">text/x-mariadb</a></code>,\n            <code><a href=\"?mime=text/x-cassandra\">text/x-cassandra</a></code>,\n            <code><a href=\"?mime=text/x-plsql\">text/x-plsql</a></code>,\n            <code><a href=\"?mime=text/x-mssql\">text/x-mssql</a></code>,\n            <code><a href=\"?mime=text/x-hive\">text/x-hive</a></code>.\n        </p>\n<script>\nwindow.onload = function() {\n  var mime = 'text/x-mariadb';\n  // get mime type\n  if (window.location.href.indexOf('mime=') > -1) {\n    mime = window.location.href.substr(window.location.href.indexOf('mime=') + 5);\n  }\n  window.editor = CodeMirror.fromTextArea(document.getElementById('code'), {\n    mode: mime,\n    indentWithTabs: true,\n    smartIndent: true,\n    lineNumbers: true,\n    matchBrackets : true,\n    autofocus: true,\n    extraKeys: {\"Ctrl-Space\": \"autocomplete\"},\n    hintOptions: {tables: {\n      users: {name: null, score: null, birthDate: null},\n      countries: {name: null, population: null, size: null}\n    }}\n  });\n};\n</script>\n\n</article>\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/sql/sql.js",
    "content": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n(function(mod) {\n  if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n    mod(require(\"../../lib/codemirror\"));\n  else if (typeof define == \"function\" && define.amd) // AMD\n    define([\"../../lib/codemirror\"], mod);\n  else // Plain browser env\n    mod(CodeMirror);\n})(function(CodeMirror) {\n\"use strict\";\n\nCodeMirror.defineMode(\"sql\", function(config, parserConfig) {\n  \"use strict\";\n\n  var client         = parserConfig.client || {},\n      atoms          = parserConfig.atoms || {\"false\": true, \"true\": true, \"null\": true},\n      builtin        = parserConfig.builtin || {},\n      keywords       = parserConfig.keywords || {},\n      operatorChars  = parserConfig.operatorChars || /^[*+\\-%<>!=&|~^]/,\n      support        = parserConfig.support || {},\n      hooks          = parserConfig.hooks || {},\n      dateSQL        = parserConfig.dateSQL || {\"date\" : true, \"time\" : true, \"timestamp\" : true};\n\n  function tokenBase(stream, state) {\n    var ch = stream.next();\n\n    // call hooks from the mime type\n    if (hooks[ch]) {\n      var result = hooks[ch](stream, state);\n      if (result !== false) return result;\n    }\n\n    if (support.hexNumber == true &&\n      ((ch == \"0\" && stream.match(/^[xX][0-9a-fA-F]+/))\n      || (ch == \"x\" || ch == \"X\") && stream.match(/^'[0-9a-fA-F]+'/))) {\n      // hex\n      // ref: http://dev.mysql.com/doc/refman/5.5/en/hexadecimal-literals.html\n      return \"number\";\n    } else if (support.binaryNumber == true &&\n      (((ch == \"b\" || ch == \"B\") && stream.match(/^'[01]+'/))\n      || (ch == \"0\" && stream.match(/^b[01]+/)))) {\n      // bitstring\n      // ref: http://dev.mysql.com/doc/refman/5.5/en/bit-field-literals.html\n      return \"number\";\n    } else if (ch.charCodeAt(0) > 47 && ch.charCodeAt(0) < 58) {\n      // numbers\n      // ref: http://dev.mysql.com/doc/refman/5.5/en/number-literals.html\n          stream.match(/^[0-9]*\\.?[0-9]+([eE][-+]?[0-9]+)?/);\n      support.decimallessFloat == true && stream.eat('.');\n      return \"number\";\n    } else if (ch == \"?\" && (stream.eatSpace() || stream.eol() || stream.eat(\";\"))) {\n      // placeholders\n      return \"variable-3\";\n    } else if (ch == \"'\" || (ch == '\"' && support.doubleQuote)) {\n      // strings\n      // ref: http://dev.mysql.com/doc/refman/5.5/en/string-literals.html\n      state.tokenize = tokenLiteral(ch);\n      return state.tokenize(stream, state);\n    } else if ((((support.nCharCast == true && (ch == \"n\" || ch == \"N\"))\n        || (support.charsetCast == true && ch == \"_\" && stream.match(/[a-z][a-z0-9]*/i)))\n        && (stream.peek() == \"'\" || stream.peek() == '\"'))) {\n      // charset casting: _utf8'str', N'str', n'str'\n      // ref: http://dev.mysql.com/doc/refman/5.5/en/string-literals.html\n      return \"keyword\";\n    } else if (/^[\\(\\),\\;\\[\\]]/.test(ch)) {\n      // no highlightning\n      return null;\n    } else if (support.commentSlashSlash && ch == \"/\" && stream.eat(\"/\")) {\n      // 1-line comment\n      stream.skipToEnd();\n      return \"comment\";\n    } else if ((support.commentHash && ch == \"#\")\n        || (ch == \"-\" && stream.eat(\"-\") && (!support.commentSpaceRequired || stream.eat(\" \")))) {\n      // 1-line comments\n      // ref: https://kb.askmonty.org/en/comment-syntax/\n      stream.skipToEnd();\n      return \"comment\";\n    } else if (ch == \"/\" && stream.eat(\"*\")) {\n      // multi-line comments\n      // ref: https://kb.askmonty.org/en/comment-syntax/\n      state.tokenize = tokenComment;\n      return state.tokenize(stream, state);\n    } else if (ch == \".\") {\n      // .1 for 0.1\n      if (support.zerolessFloat == true && stream.match(/^(?:\\d+(?:e[+-]?\\d+)?)/i)) {\n        return \"number\";\n      }\n      // .table_name (ODBC)\n      // // ref: http://dev.mysql.com/doc/refman/5.6/en/identifier-qualifiers.html\n      if (support.ODBCdotTable == true && stream.match(/^[a-zA-Z_]+/)) {\n        return \"variable-2\";\n      }\n    } else if (operatorChars.test(ch)) {\n      // operators\n      stream.eatWhile(operatorChars);\n      return null;\n    } else if (ch == '{' &&\n        (stream.match(/^( )*(d|D|t|T|ts|TS)( )*'[^']*'( )*}/) || stream.match(/^( )*(d|D|t|T|ts|TS)( )*\"[^\"]*\"( )*}/))) {\n      // dates (weird ODBC syntax)\n      // ref: http://dev.mysql.com/doc/refman/5.5/en/date-and-time-literals.html\n      return \"number\";\n    } else {\n      stream.eatWhile(/^[_\\w\\d]/);\n      var word = stream.current().toLowerCase();\n      // dates (standard SQL syntax)\n      // ref: http://dev.mysql.com/doc/refman/5.5/en/date-and-time-literals.html\n      if (dateSQL.hasOwnProperty(word) && (stream.match(/^( )+'[^']*'/) || stream.match(/^( )+\"[^\"]*\"/)))\n        return \"number\";\n      if (atoms.hasOwnProperty(word)) return \"atom\";\n      if (builtin.hasOwnProperty(word)) return \"builtin\";\n      if (keywords.hasOwnProperty(word)) return \"keyword\";\n      if (client.hasOwnProperty(word)) return \"string-2\";\n      return null;\n    }\n  }\n\n  // 'string', with char specified in quote escaped by '\\'\n  function tokenLiteral(quote) {\n    return function(stream, state) {\n      var escaped = false, ch;\n      while ((ch = stream.next()) != null) {\n        if (ch == quote && !escaped) {\n          state.tokenize = tokenBase;\n          break;\n        }\n        escaped = !escaped && ch == \"\\\\\";\n      }\n      return \"string\";\n    };\n  }\n  function tokenComment(stream, state) {\n    while (true) {\n      if (stream.skipTo(\"*\")) {\n        stream.next();\n        if (stream.eat(\"/\")) {\n          state.tokenize = tokenBase;\n          break;\n        }\n      } else {\n        stream.skipToEnd();\n        break;\n      }\n    }\n    return \"comment\";\n  }\n\n  function pushContext(stream, state, type) {\n    state.context = {\n      prev: state.context,\n      indent: stream.indentation(),\n      col: stream.column(),\n      type: type\n    };\n  }\n\n  function popContext(state) {\n    state.indent = state.context.indent;\n    state.context = state.context.prev;\n  }\n\n  return {\n    startState: function() {\n      return {tokenize: tokenBase, context: null};\n    },\n\n    token: function(stream, state) {\n      if (stream.sol()) {\n        if (state.context && state.context.align == null)\n          state.context.align = false;\n      }\n      if (stream.eatSpace()) return null;\n\n      var style = state.tokenize(stream, state);\n      if (style == \"comment\") return style;\n\n      if (state.context && state.context.align == null)\n        state.context.align = true;\n\n      var tok = stream.current();\n      if (tok == \"(\")\n        pushContext(stream, state, \")\");\n      else if (tok == \"[\")\n        pushContext(stream, state, \"]\");\n      else if (state.context && state.context.type == tok)\n        popContext(state);\n      return style;\n    },\n\n    indent: function(state, textAfter) {\n      var cx = state.context;\n      if (!cx) return CodeMirror.Pass;\n      var closing = textAfter.charAt(0) == cx.type;\n      if (cx.align) return cx.col + (closing ? 0 : 1);\n      else return cx.indent + (closing ? 0 : config.indentUnit);\n    },\n\n    blockCommentStart: \"/*\",\n    blockCommentEnd: \"*/\",\n    lineComment: support.commentSlashSlash ? \"//\" : support.commentHash ? \"#\" : null\n  };\n});\n\n(function() {\n  \"use strict\";\n\n  // `identifier`\n  function hookIdentifier(stream) {\n    // MySQL/MariaDB identifiers\n    // ref: http://dev.mysql.com/doc/refman/5.6/en/identifier-qualifiers.html\n    var ch;\n    while ((ch = stream.next()) != null) {\n      if (ch == \"`\" && !stream.eat(\"`\")) return \"variable-2\";\n    }\n    stream.backUp(stream.current().length - 1);\n    return stream.eatWhile(/\\w/) ? \"variable-2\" : null;\n  }\n\n  // variable token\n  function hookVar(stream) {\n    // variables\n    // @@prefix.varName @varName\n    // varName can be quoted with ` or ' or \"\n    // ref: http://dev.mysql.com/doc/refman/5.5/en/user-variables.html\n    if (stream.eat(\"@\")) {\n      stream.match(/^session\\./);\n      stream.match(/^local\\./);\n      stream.match(/^global\\./);\n    }\n\n    if (stream.eat(\"'\")) {\n      stream.match(/^.*'/);\n      return \"variable-2\";\n    } else if (stream.eat('\"')) {\n      stream.match(/^.*\"/);\n      return \"variable-2\";\n    } else if (stream.eat(\"`\")) {\n      stream.match(/^.*`/);\n      return \"variable-2\";\n    } else if (stream.match(/^[0-9a-zA-Z$\\.\\_]+/)) {\n      return \"variable-2\";\n    }\n    return null;\n  };\n\n  // short client keyword token\n  function hookClient(stream) {\n    // \\N means NULL\n    // ref: http://dev.mysql.com/doc/refman/5.5/en/null-values.html\n    if (stream.eat(\"N\")) {\n        return \"atom\";\n    }\n    // \\g, etc\n    // ref: http://dev.mysql.com/doc/refman/5.5/en/mysql-commands.html\n    return stream.match(/^[a-zA-Z.#!?]/) ? \"variable-2\" : null;\n  }\n\n  // these keywords are used by all SQL dialects (however, a mode can still overwrite it)\n  var sqlKeywords = \"alter and as asc between by count create delete desc distinct drop from having in insert into is join like not on or order select set table union update values where \";\n\n  // turn a space-separated list into an array\n  function set(str) {\n    var obj = {}, words = str.split(\" \");\n    for (var i = 0; i < words.length; ++i) obj[words[i]] = true;\n    return obj;\n  }\n\n  // A generic SQL Mode. It's not a standard, it just try to support what is generally supported\n  CodeMirror.defineMIME(\"text/x-sql\", {\n    name: \"sql\",\n    keywords: set(sqlKeywords + \"begin\"),\n    builtin: set(\"bool boolean bit blob enum long longblob longtext medium mediumblob mediumint mediumtext time timestamp tinyblob tinyint tinytext text bigint int int1 int2 int3 int4 int8 integer float float4 float8 double char varbinary varchar varcharacter precision real date datetime year unsigned signed decimal numeric\"),\n    atoms: set(\"false true null unknown\"),\n    operatorChars: /^[*+\\-%<>!=]/,\n    dateSQL: set(\"date time timestamp\"),\n    support: set(\"ODBCdotTable doubleQuote binaryNumber hexNumber\")\n  });\n\n  CodeMirror.defineMIME(\"text/x-mssql\", {\n    name: \"sql\",\n    client: set(\"charset clear connect edit ego exit go help nopager notee nowarning pager print prompt quit rehash source status system tee\"),\n    keywords: set(sqlKeywords + \"begin trigger proc view index for add constraint key primary foreign collate clustered nonclustered\"),\n    builtin: set(\"bigint numeric bit smallint decimal smallmoney int tinyint money float real char varchar text nchar nvarchar ntext binary varbinary image cursor timestamp hierarchyid uniqueidentifier sql_variant xml table \"),\n    atoms: set(\"false true null unknown\"),\n    operatorChars: /^[*+\\-%<>!=]/,\n    dateSQL: set(\"date datetimeoffset datetime2 smalldatetime datetime time\"),\n    hooks: {\n      \"@\":   hookVar\n    }\n  });\n\n  CodeMirror.defineMIME(\"text/x-mysql\", {\n    name: \"sql\",\n    client: set(\"charset clear connect edit ego exit go help nopager notee nowarning pager print prompt quit rehash source status system tee\"),\n    keywords: set(sqlKeywords + \"accessible action add after algorithm all analyze asensitive at authors auto_increment autocommit avg avg_row_length before binary binlog both btree cache call cascade cascaded case catalog_name chain change changed character check checkpoint checksum class_origin client_statistics close coalesce code collate collation collations column columns comment commit committed completion concurrent condition connection consistent constraint contains continue contributors convert cross current current_date current_time current_timestamp current_user cursor data database databases day_hour day_microsecond day_minute day_second deallocate dec declare default delay_key_write delayed delimiter des_key_file describe deterministic dev_pop dev_samp deviance diagnostics directory disable discard distinctrow div dual dumpfile each elseif enable enclosed end ends engine engines enum errors escape escaped even event events every execute exists exit explain extended fast fetch field fields first flush for force foreign found_rows full fulltext function general get global grant grants group groupby_concat handler hash help high_priority hosts hour_microsecond hour_minute hour_second if ignore ignore_server_ids import index index_statistics infile inner innodb inout insensitive insert_method install interval invoker isolation iterate key keys kill language last leading leave left level limit linear lines list load local localtime localtimestamp lock logs low_priority master master_heartbeat_period master_ssl_verify_server_cert masters match max max_rows maxvalue message_text middleint migrate min min_rows minute_microsecond minute_second mod mode modifies modify mutex mysql_errno natural next no no_write_to_binlog offline offset one online open optimize option optionally out outer outfile pack_keys parser partition partitions password phase plugin plugins prepare preserve prev primary privileges procedure processlist profile profiles purge query quick range read read_write reads real rebuild recover references regexp relaylog release remove rename reorganize repair repeatable replace require resignal restrict resume return returns revoke right rlike rollback rollup row row_format rtree savepoint schedule schema schema_name schemas second_microsecond security sensitive separator serializable server session share show signal slave slow smallint snapshot soname spatial specific sql sql_big_result sql_buffer_result sql_cache sql_calc_found_rows sql_no_cache sql_small_result sqlexception sqlstate sqlwarning ssl start starting starts status std stddev stddev_pop stddev_samp storage straight_join subclass_origin sum suspend table_name table_statistics tables tablespace temporary terminated to trailing transaction trigger triggers truncate uncommitted undo uninstall unique unlock upgrade usage use use_frm user user_resources user_statistics using utc_date utc_time utc_timestamp value variables varying view views warnings when while with work write xa xor year_month zerofill begin do then else loop repeat\"),\n    builtin: set(\"bool boolean bit blob decimal double float long longblob longtext medium mediumblob mediumint mediumtext time timestamp tinyblob tinyint tinytext text bigint int int1 int2 int3 int4 int8 integer float float4 float8 double char varbinary varchar varcharacter precision date datetime year unsigned signed numeric\"),\n    atoms: set(\"false true null unknown\"),\n    operatorChars: /^[*+\\-%<>!=&|^]/,\n    dateSQL: set(\"date time timestamp\"),\n    support: set(\"ODBCdotTable decimallessFloat zerolessFloat binaryNumber hexNumber doubleQuote nCharCast charsetCast commentHash commentSpaceRequired\"),\n    hooks: {\n      \"@\":   hookVar,\n      \"`\":   hookIdentifier,\n      \"\\\\\":  hookClient\n    }\n  });\n\n  CodeMirror.defineMIME(\"text/x-mariadb\", {\n    name: \"sql\",\n    client: set(\"charset clear connect edit ego exit go help nopager notee nowarning pager print prompt quit rehash source status system tee\"),\n    keywords: set(sqlKeywords + \"accessible action add after algorithm all always analyze asensitive at authors auto_increment autocommit avg avg_row_length before binary binlog both btree cache call cascade cascaded case catalog_name chain change changed character check checkpoint checksum class_origin client_statistics close coalesce code collate collation collations column columns comment commit committed completion concurrent condition connection consistent constraint contains continue contributors convert cross current current_date current_time current_timestamp current_user cursor data database databases day_hour day_microsecond day_minute day_second deallocate dec declare default delay_key_write delayed delimiter des_key_file describe deterministic dev_pop dev_samp deviance diagnostics directory disable discard distinctrow div dual dumpfile each elseif enable enclosed end ends engine engines enum errors escape escaped even event events every execute exists exit explain extended fast fetch field fields first flush for force foreign found_rows full fulltext function general generated get global grant grants group groupby_concat handler hard hash help high_priority hosts hour_microsecond hour_minute hour_second if ignore ignore_server_ids import index index_statistics infile inner innodb inout insensitive insert_method install interval invoker isolation iterate key keys kill language last leading leave left level limit linear lines list load local localtime localtimestamp lock logs low_priority master master_heartbeat_period master_ssl_verify_server_cert masters match max max_rows maxvalue message_text middleint migrate min min_rows minute_microsecond minute_second mod mode modifies modify mutex mysql_errno natural next no no_write_to_binlog offline offset one online open optimize option optionally out outer outfile pack_keys parser partition partitions password persistent phase plugin plugins prepare preserve prev primary privileges procedure processlist profile profiles purge query quick range read read_write reads real rebuild recover references regexp relaylog release remove rename reorganize repair repeatable replace require resignal restrict resume return returns revoke right rlike rollback rollup row row_format rtree savepoint schedule schema schema_name schemas second_microsecond security sensitive separator serializable server session share show shutdown signal slave slow smallint snapshot soft soname spatial specific sql sql_big_result sql_buffer_result sql_cache sql_calc_found_rows sql_no_cache sql_small_result sqlexception sqlstate sqlwarning ssl start starting starts status std stddev stddev_pop stddev_samp storage straight_join subclass_origin sum suspend table_name table_statistics tables tablespace temporary terminated to trailing transaction trigger triggers truncate uncommitted undo uninstall unique unlock upgrade usage use use_frm user user_resources user_statistics using utc_date utc_time utc_timestamp value variables varying view views virtual warnings when while with work write xa xor year_month zerofill begin do then else loop repeat\"),\n    builtin: set(\"bool boolean bit blob decimal double float long longblob longtext medium mediumblob mediumint mediumtext time timestamp tinyblob tinyint tinytext text bigint int int1 int2 int3 int4 int8 integer float float4 float8 double char varbinary varchar varcharacter precision date datetime year unsigned signed numeric\"),\n    atoms: set(\"false true null unknown\"),\n    operatorChars: /^[*+\\-%<>!=&|^]/,\n    dateSQL: set(\"date time timestamp\"),\n    support: set(\"ODBCdotTable decimallessFloat zerolessFloat binaryNumber hexNumber doubleQuote nCharCast charsetCast commentHash commentSpaceRequired\"),\n    hooks: {\n      \"@\":   hookVar,\n      \"`\":   hookIdentifier,\n      \"\\\\\":  hookClient\n    }\n  });\n\n  // the query language used by Apache Cassandra is called CQL, but this mime type\n  // is called Cassandra to avoid confusion with Contextual Query Language\n  CodeMirror.defineMIME(\"text/x-cassandra\", {\n    name: \"sql\",\n    client: { },\n    keywords: set(\"use select from using consistency where limit first reversed first and in insert into values using consistency ttl update set delete truncate begin batch apply create keyspace with columnfamily primary key index on drop alter type add any one quorum all local_quorum each_quorum\"),\n    builtin: set(\"ascii bigint blob boolean counter decimal double float int text timestamp uuid varchar varint\"),\n    atoms: set(\"false true\"),\n    operatorChars: /^[<>=]/,\n    dateSQL: { },\n    support: set(\"commentSlashSlash decimallessFloat\"),\n    hooks: { }\n  });\n\n  // this is based on Peter Raganitsch's 'plsql' mode\n  CodeMirror.defineMIME(\"text/x-plsql\", {\n    name:       \"sql\",\n    client:     set(\"appinfo arraysize autocommit autoprint autorecovery autotrace blockterminator break btitle cmdsep colsep compatibility compute concat copycommit copytypecheck define describe echo editfile embedded escape exec execute feedback flagger flush heading headsep instance linesize lno loboffset logsource long longchunksize markup native newpage numformat numwidth pagesize pause pno recsep recsepchar release repfooter repheader serveroutput shiftinout show showmode size spool sqlblanklines sqlcase sqlcode sqlcontinue sqlnumber sqlpluscompatibility sqlprefix sqlprompt sqlterminator suffix tab term termout time timing trimout trimspool ttitle underline verify version wrap\"),\n    keywords:   set(\"abort accept access add all alter and any array arraylen as asc assert assign at attributes audit authorization avg base_table begin between binary_integer body boolean by case cast char char_base check close cluster clusters colauth column comment commit compress connect connected constant constraint crash create current currval cursor data_base database date dba deallocate debugoff debugon decimal declare default definition delay delete desc digits dispose distinct do drop else elseif elsif enable end entry escape exception exception_init exchange exclusive exists exit external fast fetch file for force form from function generic goto grant group having identified if immediate in increment index indexes indicator initial initrans insert interface intersect into is key level library like limited local lock log logging long loop master maxextents maxtrans member minextents minus mislabel mode modify multiset new next no noaudit nocompress nologging noparallel not nowait number_base object of off offline on online only open option or order out package parallel partition pctfree pctincrease pctused pls_integer positive positiven pragma primary prior private privileges procedure public raise range raw read rebuild record ref references refresh release rename replace resource restrict return returning returns reverse revoke rollback row rowid rowlabel rownum rows run savepoint schema segment select separate session set share snapshot some space split sql start statement storage subtype successful synonym tabauth table tables tablespace task terminate then to trigger truncate type union unique unlimited unrecoverable unusable update use using validate value values variable view views when whenever where while with work\"),\n    builtin:    set(\"abs acos add_months ascii asin atan atan2 average bfile bfilename bigserial bit blob ceil character chartorowid chr clob concat convert cos cosh count dec decode deref dual dump dup_val_on_index empty error exp false float floor found glb greatest hextoraw initcap instr instrb int integer isopen last_day least lenght lenghtb ln lower lpad ltrim lub make_ref max min mlslabel mod months_between natural naturaln nchar nclob new_time next_day nextval nls_charset_decl_len nls_charset_id nls_charset_name nls_initcap nls_lower nls_sort nls_upper nlssort no_data_found notfound null number numeric nvarchar2 nvl others power rawtohex real reftohex round rowcount rowidtochar rowtype rpad rtrim serial sign signtype sin sinh smallint soundex sqlcode sqlerrm sqrt stddev string substr substrb sum sysdate tan tanh to_char text to_date to_label to_multi_byte to_number to_single_byte translate true trunc uid unlogged upper user userenv varchar varchar2 variance varying vsize xml\"),\n    operatorChars: /^[*+\\-%<>!=~]/,\n    dateSQL:    set(\"date time timestamp\"),\n    support:    set(\"doubleQuote nCharCast zerolessFloat binaryNumber hexNumber\")\n  });\n\n  // Created to support specific hive keywords\n  CodeMirror.defineMIME(\"text/x-hive\", {\n    name: \"sql\",\n    keywords: set(\"select alter $elem$ $key$ $value$ add after all analyze and archive as asc before between binary both bucket buckets by cascade case cast change cluster clustered clusterstatus collection column columns comment compute concatenate continue create cross cursor data database databases dbproperties deferred delete delimited desc describe directory disable distinct distribute drop else enable end escaped exclusive exists explain export extended external false fetch fields fileformat first format formatted from full function functions grant group having hold_ddltime idxproperties if import in index indexes inpath inputdriver inputformat insert intersect into is items join keys lateral left like limit lines load local location lock locks mapjoin materialized minus msck no_drop nocompress not of offline on option or order out outer outputdriver outputformat overwrite partition partitioned partitions percent plus preserve procedure purge range rcfile read readonly reads rebuild recordreader recordwriter recover reduce regexp rename repair replace restrict revoke right rlike row schema schemas semi sequencefile serde serdeproperties set shared show show_database sort sorted ssl statistics stored streamtable table tables tablesample tblproperties temporary terminated textfile then tmp to touch transform trigger true unarchive undo union uniquejoin unlock update use using utc utc_tmestamp view when where while with\"),\n    builtin: set(\"bool boolean long timestamp tinyint smallint bigint int float double date datetime unsigned string array struct map uniontype\"),\n    atoms: set(\"false true null unknown\"),\n    operatorChars: /^[*+\\-%<>!=]/,\n    dateSQL: set(\"date timestamp\"),\n    support: set(\"ODBCdotTable doubleQuote binaryNumber hexNumber\")\n  });\n}());\n\n});\n\n/*\n  How Properties of Mime Types are used by SQL Mode\n  =================================================\n\n  keywords:\n    A list of keywords you want to be highlighted.\n  builtin:\n    A list of builtin types you want to be highlighted (if you want types to be of class \"builtin\" instead of \"keyword\").\n  operatorChars:\n    All characters that must be handled as operators.\n  client:\n    Commands parsed and executed by the client (not the server).\n  support:\n    A list of supported syntaxes which are not common, but are supported by more than 1 DBMS.\n    * ODBCdotTable: .tableName\n    * zerolessFloat: .1\n    * doubleQuote\n    * nCharCast: N'string'\n    * charsetCast: _utf8'string'\n    * commentHash: use # char for comments\n    * commentSlashSlash: use // for comments\n    * commentSpaceRequired: require a space after -- for comments\n  atoms:\n    Keywords that must be highlighted as atoms,. Some DBMS's support more atoms than others:\n    UNKNOWN, INFINITY, UNDERFLOW, NaN...\n  dateSQL:\n    Used for date/time SQL standard syntax, because not all DBMS's support same temporal types.\n*/\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/stex/index.html",
    "content": "<!doctype html>\n\n<title>CodeMirror: sTeX mode</title>\n<meta charset=\"utf-8\"/>\n<link rel=stylesheet href=\"../../doc/docs.css\">\n\n<link rel=\"stylesheet\" href=\"../../lib/codemirror.css\">\n<script src=\"../../lib/codemirror.js\"></script>\n<script src=\"stex.js\"></script>\n<style>.CodeMirror {background: #f8f8f8;}</style>\n<div id=nav>\n  <a href=\"http://codemirror.net\"><h1>CodeMirror</h1><img id=logo src=\"../../doc/logo.png\"></a>\n\n  <ul>\n    <li><a href=\"../../index.html\">Home</a>\n    <li><a href=\"../../doc/manual.html\">Manual</a>\n    <li><a href=\"https://github.com/codemirror/codemirror\">Code</a>\n  </ul>\n  <ul>\n    <li><a href=\"../index.html\">Language modes</a>\n    <li><a class=active href=\"#\">sTeX</a>\n  </ul>\n</div>\n\n<article>\n<h2>sTeX mode</h2>\n<form><textarea id=\"code\" name=\"code\">\n\\begin{module}[id=bbt-size]\n\\importmodule[balanced-binary-trees]{balanced-binary-trees}\n\\importmodule[\\KWARCslides{dmath/en/cardinality}]{cardinality}\n\n\\begin{frame}\n  \\frametitle{Size Lemma for Balanced Trees}\n  \\begin{itemize}\n  \\item\n    \\begin{assertion}[id=size-lemma,type=lemma] \n    Let $G=\\tup{V,E}$ be a \\termref[cd=binary-trees]{balanced binary tree} \n    of \\termref[cd=graph-depth,name=vertex-depth]{depth}$n>i$, then the set\n     $\\defeq{\\livar{V}i}{\\setst{\\inset{v}{V}}{\\gdepth{v} = i}}$ of\n    \\termref[cd=graphs-intro,name=node]{nodes} at \n    \\termref[cd=graph-depth,name=vertex-depth]{depth} $i$ has\n    \\termref[cd=cardinality,name=cardinality]{cardinality} $\\power2i$.\n   \\end{assertion}\n  \\item\n    \\begin{sproof}[id=size-lemma-pf,proofend=,for=size-lemma]{via induction over the depth $i$.}\n      \\begin{spfcases}{We have to consider two cases}\n        \\begin{spfcase}{$i=0$}\n          \\begin{spfstep}[display=flow]\n            then $\\livar{V}i=\\set{\\livar{v}r}$, where $\\livar{v}r$ is the root, so\n            $\\eq{\\card{\\livar{V}0},\\card{\\set{\\livar{v}r}},1,\\power20}$.\n          \\end{spfstep}\n        \\end{spfcase}\n        \\begin{spfcase}{$i>0$}\n          \\begin{spfstep}[display=flow]\n           then $\\livar{V}{i-1}$ contains $\\power2{i-1}$ vertexes \n           \\begin{justification}[method=byIH](IH)\\end{justification}\n          \\end{spfstep}\n          \\begin{spfstep}\n           By the \\begin{justification}[method=byDef]definition of a binary\n              tree\\end{justification}, each $\\inset{v}{\\livar{V}{i-1}}$ is a leaf or has\n            two children that are at depth $i$.\n          \\end{spfstep}\n          \\begin{spfstep}\n           As $G$ is \\termref[cd=balanced-binary-trees,name=balanced-binary-tree]{balanced} and $\\gdepth{G}=n>i$, $\\livar{V}{i-1}$ cannot contain\n            leaves.\n          \\end{spfstep}\n          \\begin{spfstep}[type=conclusion]\n           Thus $\\eq{\\card{\\livar{V}i},{\\atimes[cdot]{2,\\card{\\livar{V}{i-1}}}},{\\atimes[cdot]{2,\\power2{i-1}}},\\power2i}$.\n          \\end{spfstep}\n        \\end{spfcase}\n      \\end{spfcases}\n    \\end{sproof}\n  \\item \n    \\begin{assertion}[id=fbbt,type=corollary]\t\n      A fully balanced tree of depth $d$ has $\\power2{d+1}-1$ nodes.\n    \\end{assertion}\n  \\item\n      \\begin{sproof}[for=fbbt,id=fbbt-pf]{}\n        \\begin{spfstep}\n          Let $\\defeq{G}{\\tup{V,E}}$ be a fully balanced tree\n        \\end{spfstep}\n        \\begin{spfstep}\n          Then $\\card{V}=\\Sumfromto{i}1d{\\power2i}= \\power2{d+1}-1$.\n        \\end{spfstep}\n      \\end{sproof}\n    \\end{itemize}\n  \\end{frame}\n\\begin{note}\n  \\begin{omtext}[type=conclusion,for=binary-tree]\n    This shows that balanced binary trees grow in breadth very quickly, a consequence of\n    this is that they are very shallow (and this compute very fast), which is the essence of\n    the next result.\n  \\end{omtext}\n\\end{note}\n\\end{module}\n\n%%% Local Variables: \n%%% mode: LaTeX\n%%% TeX-master: \"all\"\n%%% End: \\end{document}\n</textarea></form>\n    <script>\n      var editor = CodeMirror.fromTextArea(document.getElementById(\"code\"), {});\n    </script>\n\n    <p><strong>MIME types defined:</strong> <code>text/x-stex</code>.</p>\n\n    <p><strong>Parsing/Highlighting Tests:</strong> <a href=\"../../test/index.html#stex_*\">normal</a>,  <a href=\"../../test/index.html#verbose,stex_*\">verbose</a>.</p>\n\n  </article>\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/stex/stex.js",
    "content": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n/*\n * Author: Constantin Jucovschi (c.jucovschi@jacobs-university.de)\n * Licence: MIT\n */\n\n(function(mod) {\n  if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n    mod(require(\"../../lib/codemirror\"));\n  else if (typeof define == \"function\" && define.amd) // AMD\n    define([\"../../lib/codemirror\"], mod);\n  else // Plain browser env\n    mod(CodeMirror);\n})(function(CodeMirror) {\n  \"use strict\";\n\n  CodeMirror.defineMode(\"stex\", function() {\n    \"use strict\";\n\n    function pushCommand(state, command) {\n      state.cmdState.push(command);\n    }\n\n    function peekCommand(state) {\n      if (state.cmdState.length > 0) {\n        return state.cmdState[state.cmdState.length - 1];\n      } else {\n        return null;\n      }\n    }\n\n    function popCommand(state) {\n      var plug = state.cmdState.pop();\n      if (plug) {\n        plug.closeBracket();\n      }\n    }\n\n    // returns the non-default plugin closest to the end of the list\n    function getMostPowerful(state) {\n      var context = state.cmdState;\n      for (var i = context.length - 1; i >= 0; i--) {\n        var plug = context[i];\n        if (plug.name == \"DEFAULT\") {\n          continue;\n        }\n        return plug;\n      }\n      return { styleIdentifier: function() { return null; } };\n    }\n\n    function addPluginPattern(pluginName, cmdStyle, styles) {\n      return function () {\n        this.name = pluginName;\n        this.bracketNo = 0;\n        this.style = cmdStyle;\n        this.styles = styles;\n        this.argument = null;   // \\begin and \\end have arguments that follow. These are stored in the plugin\n\n        this.styleIdentifier = function() {\n          return this.styles[this.bracketNo - 1] || null;\n        };\n        this.openBracket = function() {\n          this.bracketNo++;\n          return \"bracket\";\n        };\n        this.closeBracket = function() {};\n      };\n    }\n\n    var plugins = {};\n\n    plugins[\"importmodule\"] = addPluginPattern(\"importmodule\", \"tag\", [\"string\", \"builtin\"]);\n    plugins[\"documentclass\"] = addPluginPattern(\"documentclass\", \"tag\", [\"\", \"atom\"]);\n    plugins[\"usepackage\"] = addPluginPattern(\"usepackage\", \"tag\", [\"atom\"]);\n    plugins[\"begin\"] = addPluginPattern(\"begin\", \"tag\", [\"atom\"]);\n    plugins[\"end\"] = addPluginPattern(\"end\", \"tag\", [\"atom\"]);\n\n    plugins[\"DEFAULT\"] = function () {\n      this.name = \"DEFAULT\";\n      this.style = \"tag\";\n\n      this.styleIdentifier = this.openBracket = this.closeBracket = function() {};\n    };\n\n    function setState(state, f) {\n      state.f = f;\n    }\n\n    // called when in a normal (no environment) context\n    function normal(source, state) {\n      var plug;\n      // Do we look like '\\command' ?  If so, attempt to apply the plugin 'command'\n      if (source.match(/^\\\\[a-zA-Z@]+/)) {\n        var cmdName = source.current().slice(1);\n        plug = plugins[cmdName] || plugins[\"DEFAULT\"];\n        plug = new plug();\n        pushCommand(state, plug);\n        setState(state, beginParams);\n        return plug.style;\n      }\n\n      // escape characters\n      if (source.match(/^\\\\[$&%#{}_]/)) {\n        return \"tag\";\n      }\n\n      // white space control characters\n      if (source.match(/^\\\\[,;!\\/\\\\]/)) {\n        return \"tag\";\n      }\n\n      // find if we're starting various math modes\n      if (source.match(\"\\\\[\")) {\n        setState(state, function(source, state){ return inMathMode(source, state, \"\\\\]\"); });\n        return \"keyword\";\n      }\n      if (source.match(\"$$\")) {\n        setState(state, function(source, state){ return inMathMode(source, state, \"$$\"); });\n        return \"keyword\";\n      }\n      if (source.match(\"$\")) {\n        setState(state, function(source, state){ return inMathMode(source, state, \"$\"); });\n        return \"keyword\";\n      }\n\n      var ch = source.next();\n      if (ch == \"%\") {\n        source.skipToEnd();\n        return \"comment\";\n      } else if (ch == '}' || ch == ']') {\n        plug = peekCommand(state);\n        if (plug) {\n          plug.closeBracket(ch);\n          setState(state, beginParams);\n        } else {\n          return \"error\";\n        }\n        return \"bracket\";\n      } else if (ch == '{' || ch == '[') {\n        plug = plugins[\"DEFAULT\"];\n        plug = new plug();\n        pushCommand(state, plug);\n        return \"bracket\";\n      } else if (/\\d/.test(ch)) {\n        source.eatWhile(/[\\w.%]/);\n        return \"atom\";\n      } else {\n        source.eatWhile(/[\\w\\-_]/);\n        plug = getMostPowerful(state);\n        if (plug.name == 'begin') {\n          plug.argument = source.current();\n        }\n        return plug.styleIdentifier();\n      }\n    }\n\n    function inMathMode(source, state, endModeSeq) {\n      if (source.eatSpace()) {\n        return null;\n      }\n      if (source.match(endModeSeq)) {\n        setState(state, normal);\n        return \"keyword\";\n      }\n      if (source.match(/^\\\\[a-zA-Z@]+/)) {\n        return \"tag\";\n      }\n      if (source.match(/^[a-zA-Z]+/)) {\n        return \"variable-2\";\n      }\n      // escape characters\n      if (source.match(/^\\\\[$&%#{}_]/)) {\n        return \"tag\";\n      }\n      // white space control characters\n      if (source.match(/^\\\\[,;!\\/]/)) {\n        return \"tag\";\n      }\n      // special math-mode characters\n      if (source.match(/^[\\^_&]/)) {\n        return \"tag\";\n      }\n      // non-special characters\n      if (source.match(/^[+\\-<>|=,\\/@!*:;'\"`~#?]/)) {\n        return null;\n      }\n      if (source.match(/^(\\d+\\.\\d*|\\d*\\.\\d+|\\d+)/)) {\n        return \"number\";\n      }\n      var ch = source.next();\n      if (ch == \"{\" || ch == \"}\" || ch == \"[\" || ch == \"]\" || ch == \"(\" || ch == \")\") {\n        return \"bracket\";\n      }\n\n      if (ch == \"%\") {\n        source.skipToEnd();\n        return \"comment\";\n      }\n      return \"error\";\n    }\n\n    function beginParams(source, state) {\n      var ch = source.peek(), lastPlug;\n      if (ch == '{' || ch == '[') {\n        lastPlug = peekCommand(state);\n        lastPlug.openBracket(ch);\n        source.eat(ch);\n        setState(state, normal);\n        return \"bracket\";\n      }\n      if (/[ \\t\\r]/.test(ch)) {\n        source.eat(ch);\n        return null;\n      }\n      setState(state, normal);\n      popCommand(state);\n\n      return normal(source, state);\n    }\n\n    return {\n      startState: function() {\n        return {\n          cmdState: [],\n          f: normal\n        };\n      },\n      copyState: function(s) {\n        return {\n          cmdState: s.cmdState.slice(),\n          f: s.f\n        };\n      },\n      token: function(stream, state) {\n        return state.f(stream, state);\n      },\n      blankLine: function(state) {\n        state.f = normal;\n        state.cmdState.length = 0;\n      },\n      lineComment: \"%\"\n    };\n  });\n\n  CodeMirror.defineMIME(\"text/x-stex\", \"stex\");\n  CodeMirror.defineMIME(\"text/x-latex\", \"stex\");\n\n});\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/stex/test.js",
    "content": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n(function() {\n  var mode = CodeMirror.getMode({tabSize: 4}, \"stex\");\n  function MT(name) { test.mode(name, mode, Array.prototype.slice.call(arguments, 1)); }\n\n  MT(\"word\",\n     \"foo\");\n\n  MT(\"twoWords\",\n     \"foo bar\");\n\n  MT(\"beginEndDocument\",\n     \"[tag \\\\begin][bracket {][atom document][bracket }]\",\n     \"[tag \\\\end][bracket {][atom document][bracket }]\");\n\n  MT(\"beginEndEquation\",\n     \"[tag \\\\begin][bracket {][atom equation][bracket }]\",\n     \"  E=mc^2\",\n     \"[tag \\\\end][bracket {][atom equation][bracket }]\");\n\n  MT(\"beginModule\",\n     \"[tag \\\\begin][bracket {][atom module][bracket }[[]]]\");\n\n  MT(\"beginModuleId\",\n     \"[tag \\\\begin][bracket {][atom module][bracket }[[]id=bbt-size[bracket ]]]\");\n\n  MT(\"importModule\",\n     \"[tag \\\\importmodule][bracket [[][string b-b-t][bracket ]]{][builtin b-b-t][bracket }]\");\n\n  MT(\"importModulePath\",\n     \"[tag \\\\importmodule][bracket [[][tag \\\\KWARCslides][bracket {][string dmath/en/cardinality][bracket }]]{][builtin card][bracket }]\");\n\n  MT(\"psForPDF\",\n     \"[tag \\\\PSforPDF][bracket [[][atom 1][bracket ]]{]#1[bracket }]\");\n\n  MT(\"comment\",\n     \"[comment % foo]\");\n\n  MT(\"tagComment\",\n     \"[tag \\\\item][comment % bar]\");\n\n  MT(\"commentTag\",\n     \" [comment % \\\\item]\");\n\n  MT(\"commentLineBreak\",\n     \"[comment %]\",\n     \"foo\");\n\n  MT(\"tagErrorCurly\",\n     \"[tag \\\\begin][error }][bracket {]\");\n\n  MT(\"tagErrorSquare\",\n     \"[tag \\\\item][error ]]][bracket {]\");\n\n  MT(\"commentCurly\",\n     \"[comment % }]\");\n\n  MT(\"tagHash\",\n     \"the [tag \\\\#] key\");\n\n  MT(\"tagNumber\",\n     \"a [tag \\\\$][atom 5] stetson\");\n\n  MT(\"tagPercent\",\n     \"[atom 100][tag \\\\%] beef\");\n\n  MT(\"tagAmpersand\",\n     \"L [tag \\\\&] N\");\n\n  MT(\"tagUnderscore\",\n     \"foo[tag \\\\_]bar\");\n\n  MT(\"tagBracketOpen\",\n     \"[tag \\\\emph][bracket {][tag \\\\{][bracket }]\");\n\n  MT(\"tagBracketClose\",\n     \"[tag \\\\emph][bracket {][tag \\\\}][bracket }]\");\n\n  MT(\"tagLetterNumber\",\n     \"section [tag \\\\S][atom 1]\");\n\n  MT(\"textTagNumber\",\n     \"para [tag \\\\P][atom 2]\");\n\n  MT(\"thinspace\",\n     \"x[tag \\\\,]y\");\n\n  MT(\"thickspace\",\n     \"x[tag \\\\;]y\");\n\n  MT(\"negativeThinspace\",\n     \"x[tag \\\\!]y\");\n\n  MT(\"periodNotSentence\",\n     \"J.\\\\ L.\\\\ is\");\n\n  MT(\"periodSentence\",\n     \"X[tag \\\\@]. The\");\n\n  MT(\"italicCorrection\",\n     \"[bracket {][tag \\\\em] If[tag \\\\/][bracket }] I\");\n\n  MT(\"tagBracket\",\n     \"[tag \\\\newcommand][bracket {][tag \\\\pop][bracket }]\");\n\n  MT(\"inlineMathTagFollowedByNumber\",\n     \"[keyword $][tag \\\\pi][number 2][keyword $]\");\n\n  MT(\"inlineMath\",\n     \"[keyword $][number 3][variable-2 x][tag ^][number 2.45]-[tag \\\\sqrt][bracket {][tag \\\\$\\\\alpha][bracket }] = [number 2][keyword $] other text\");\n\n  MT(\"displayMath\",\n     \"More [keyword $$]\\t[variable-2 S][tag ^][variable-2 n][tag \\\\sum] [variable-2 i][keyword $$] other text\");\n\n  MT(\"mathWithComment\",\n     \"[keyword $][variable-2 x] [comment % $]\",\n     \"[variable-2 y][keyword $] other text\");\n\n  MT(\"lineBreakArgument\",\n    \"[tag \\\\\\\\][bracket [[][atom 1cm][bracket ]]]\");\n})();\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/stylus/index.html",
    "content": "<!doctype html>\n\n<title>CodeMirror: Stylus mode</title>\n<meta charset=\"utf-8\"/>\n<link rel=stylesheet href=\"../../doc/docs.css\">\n<link rel=\"stylesheet\" href=\"../../lib/codemirror.css\">\n<link rel=\"stylesheet\" href=\"../../addon/hint/show-hint.css\">\n<script src=\"../../lib/codemirror.js\"></script>\n<script src=\"stylus.js\"></script>\n<script src=\"../../addon/hint/show-hint.js\"></script>\n<script src=\"../../addon/hint/css-hint.js\"></script>\n<style>.CodeMirror {background: #f8f8f8;} form{margin-bottom: .7em;}</style>\n<div id=nav>\n  <a href=\"http://codemirror.net\"><h1>CodeMirror</h1><img id=logo src=\"../../doc/logo.png\"></a>\n\n  <ul>\n    <li><a href=\"../../index.html\">Home</a>\n    <li><a href=\"../../doc/manual.html\">Manual</a>\n    <li><a href=\"https://github.com/codemirror/codemirror\">Code</a>\n  </ul>\n  <ul>\n    <li><a href=\"../index.html\">Language modes</a>\n    <li><a class=active href=\"#\">Stylus</a>\n  </ul>\n</div>\n\n<article>\n<h2>Stylus mode</h2>\n<form><textarea id=\"code\" name=\"code\">\n/* Stylus mode */\n#id\n.class\narticle\n  font-family Arial, sans-serif\n\n#id,\n.class,\narticle {\n  font-family: Arial, sans-serif;\n}\n\n// Variables\nfont-size-base = 16px\nline-height-base = 1.5\nfont-family-base = \"Helvetica Neue\", Helvetica, Arial, sans-serif\ntext-color = lighten(#000, 20%)\n\nbody\n  font font-size-base/line-height-base font-family-base\n  color text-color\n\nbody {\n  font: 400 16px/1.5 \"Helvetica Neue\", Helvetica, Arial, sans-serif;\n  color: #333;\n}\n\n// Variables\nlink-color = darken(#428bca, 6.5%)\nlink-hover-color = darken(link-color, 15%)\nlink-decoration = none\nlink-hover-decoration = false\n\n// Mixin\ntab-focus()\n  outline thin dotted\n  outline 5px auto -webkit-focus-ring-color\n  outline-offset -2px\n\na\n  color link-color\n  if link-decoration\n    text-decoration link-decoration\n  &:hover\n  &:focus\n    color link-hover-color\n    if link-hover-decoration\n      text-decoration link-hover-decoration\n  &:focus\n    tab-focus()\n\na {\n  color: #3782c4;\n  text-decoration: none;\n}\na:hover,\na:focus {\n  color: #2f6ea7;\n}\na:focus {\n  outline: thin dotted;\n  outline: 5px auto -webkit-focus-ring-color;\n  outline-offset: -2px;\n}\n</textarea>\n</form>\n<script>\n  var editor = CodeMirror.fromTextArea(document.getElementById(\"code\"), {\n    extraKeys: {\"Ctrl-Space\": \"autocomplete\"},\n  });\n</script>\n\n<p><strong>MIME types defined:</strong> <code>text/x-styl</code>.</p>\n\n</article>\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/stylus/stylus.js",
    "content": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n(function(mod) {\n  if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n    mod(require(\"../../lib/codemirror\"));\n  else if (typeof define == \"function\" && define.amd) // AMD\n    define([\"../../lib/codemirror\"], mod);\n  else // Plain browser env\n    mod(CodeMirror);\n})(function(CodeMirror) {\n  \"use strict\";\n\n  CodeMirror.defineMode(\"stylus\", function(config) {\n\n    var operatorsRegexp = /^(\\?:?|\\+[+=]?|-[\\-=]?|\\*[\\*=]?|\\/=?|[=!:\\?]?=|<=?|>=?|%=?|&&|\\|=?|\\~|!|\\^|\\\\)/,\n        delimitersRegexp = /^(?:[()\\[\\]{},:`=;]|\\.\\.?\\.?)/,\n        wordOperatorsRegexp = wordRegexp(wordOperators),\n        commonKeywordsRegexp = wordRegexp(commonKeywords),\n        commonAtomsRegexp = wordRegexp(commonAtoms),\n        commonDefRegexp = wordRegexp(commonDef),\n        vendorPrefixesRegexp = new RegExp(/^\\-(moz|ms|o|webkit)-/),\n        cssValuesWithBracketsRegexp = new RegExp(\"^(\" + cssValuesWithBrackets_.join(\"|\") + \")\\\\([\\\\w\\-\\\\#\\\\,\\\\.\\\\%\\\\s\\\\(\\\\)]*\\\\)\");\n\n    var tokenBase = function(stream, state) {\n\n      if (stream.eatSpace()) return null;\n\n      var ch = stream.peek();\n\n      // Single line Comment\n      if (stream.match('//')) {\n        stream.skipToEnd();\n        return \"comment\";\n      }\n\n      // Multiline Comment\n      if (stream.match('/*')) {\n        state.tokenizer = multilineComment;\n        return state.tokenizer(stream, state);\n      }\n\n      // Strings\n      if (ch === '\"' || ch === \"'\") {\n        stream.next();\n        state.tokenizer = buildStringTokenizer(ch);\n        return \"string\";\n      }\n\n      // Def\n      if (ch === \"@\") {\n        stream.next();\n        if (stream.match(/extend/)) {\n          dedent(state); // remove indentation after selectors\n        } else if (stream.match(/media[\\w-\\s]*[\\w-]/)) {\n          indent(state);\n        } else if(stream.eatWhile(/[\\w-]/)) {\n          if(stream.current().match(commonDefRegexp)) {\n            indent(state);\n          }\n        }\n        return \"def\";\n      }\n\n      // Number\n      if (stream.match(/^-?[0-9\\.]/, false)) {\n\n        // Floats\n        if (stream.match(/^-?\\d*\\.\\d+(e[\\+\\-]?\\d+)?/i) || stream.match(/^-?\\d+\\.\\d*/)) {\n\n          // Prevent from getting extra . on 1..\n          if (stream.peek() == \".\") {\n            stream.backUp(1);\n          }\n          // Units\n          stream.eatWhile(/[a-z%]/i);\n          return \"number\";\n        }\n        // Integers\n        if (stream.match(/^-?[1-9]\\d*(e[\\+\\-]?\\d+)?/) || stream.match(/^-?0(?![\\dx])/i)) {\n          // Units\n          stream.eatWhile(/[a-z%]/i);\n          return \"number\";\n        }\n      }\n\n      // Hex color and id selector\n      if (ch === \"#\") {\n        stream.next();\n\n        // Hex color\n        if (stream.match(/^[0-9a-f]{6}|[0-9a-f]{3}/i)) {\n          return \"atom\";\n        }\n\n        // ID selector\n        if (stream.match(/^[\\w-]+/i)) {\n          indent(state);\n          return \"builtin\";\n        }\n      }\n\n      // Vendor prefixes\n      if (stream.match(vendorPrefixesRegexp)) {\n        return \"meta\";\n      }\n\n      // Gradients and animation as CSS value\n      if (stream.match(cssValuesWithBracketsRegexp)) {\n        return \"atom\";\n      }\n\n      // Mixins / Functions with indentation\n      if (stream.sol() && stream.match(/^\\.?[a-z][\\w-]*\\(/i)) {\n        stream.backUp(1);\n        indent(state);\n        return \"keyword\";\n      }\n\n      // Mixins / Functions\n      if (stream.match(/^\\.?[a-z][\\w-]*\\(/i)) {\n        stream.backUp(1);\n        return \"keyword\";\n      }\n\n      // +Block mixins\n      if (stream.match(/^(\\+|\\-)[a-z][\\w-]+\\(/i)) {\n        stream.backUp(1);\n        indent(state);\n        return \"keyword\";\n      }\n\n      // url tokens\n      if (stream.match(/^url/) && stream.peek() === \"(\") {\n        state.tokenizer = urlTokens;\n        if(!stream.peek()) {\n          state.cursorHalf = 0;\n        }\n        return \"atom\";\n      }\n\n      // Class\n      if (stream.match(/^\\.[a-z][\\w-]*/i)) {\n        indent(state);\n        return \"qualifier\";\n      }\n\n      // & Parent Reference with BEM naming\n      if (stream.match(/^(_|__|-|--)[a-z0-9-]+/)) {\n        return \"qualifier\";\n      }\n\n      // Pseudo elements/classes\n      if (ch == ':' && stream.match(/^::?[\\w-]+/)) {\n        indent(state);\n        return \"variable-3\";\n      }\n\n      // Conditionals\n      if (stream.match(wordRegexp([\"for\", \"if\", \"else\", \"unless\"]))) {\n        indent(state);\n        return \"keyword\";\n      }\n\n      // Keywords\n      if (stream.match(commonKeywordsRegexp)) {\n        return \"keyword\";\n      }\n\n      // Atoms\n      if (stream.match(commonAtomsRegexp)) {\n        return \"atom\";\n      }\n\n      // Variables\n      if (stream.match(/^\\$?[a-z][\\w-]+\\s?=(\\s|[\\w-'\"\\$])/i)) {\n        stream.backUp(2);\n        var cssPropertie = stream.current().toLowerCase().match(/[\\w-]+/)[0];\n        return cssProperties[cssPropertie] === undefined ? \"variable-2\" : \"property\";\n      } else if (stream.match(/\\$[\\w-\\.]+/i)) {\n        return \"variable-2\";\n      } else if (stream.match(/\\$?[\\w-]+\\.[\\w-]+/i)) {\n        var cssTypeSelector = stream.current().toLowerCase().match(/[\\w]+/)[0];\n        if(cssTypeSelectors[cssTypeSelector] === undefined) {\n          return \"variable-2\";\n        } else stream.backUp(stream.current().length);\n      }\n\n      // !important\n      if (ch === \"!\") {\n        stream.next();\n        return stream.match(/^[\\w]+/) ? \"keyword\": \"operator\";\n      }\n\n      // / Root Reference\n      if (stream.match(/^\\/(:|\\.|#|[a-z])/)) {\n        stream.backUp(1);\n        return \"variable-3\";\n      }\n\n      // Operators and delimiters\n      if (stream.match(operatorsRegexp) || stream.match(wordOperatorsRegexp)) {\n        return \"operator\";\n      }\n      if (stream.match(delimitersRegexp)) {\n        return null;\n      }\n\n      // & Parent Reference\n      if (ch === \"&\") {\n        stream.next();\n        return \"variable-3\";\n      }\n\n      // Font family\n      if (stream.match(/^[A-Z][a-z0-9-]+/)) {\n        return \"string\";\n      }\n\n      // CSS rule\n      // NOTE: Some css selectors and property values have the same name\n      // (embed, menu, pre, progress, sub, table),\n      // so they will have the same color (.cm-atom).\n      if (stream.match(/[\\w-]*/i)) {\n\n        var word = stream.current().toLowerCase();\n\n        if(cssProperties[word] !== undefined) {\n          // CSS property\n          if(!stream.eol())\n            return \"property\";\n          else\n            return \"variable-2\";\n\n        } else if(cssValues[word] !== undefined) {\n          // CSS value\n          return \"atom\";\n\n        } else if(cssTypeSelectors[word] !== undefined) {\n          // CSS type selectors\n          indent(state);\n          return \"tag\";\n\n        } else if(word) {\n          // By default variable-2\n          return \"variable-2\";\n        }\n      }\n\n      // Handle non-detected items\n      stream.next();\n      return null;\n\n    };\n\n    var tokenLexer = function(stream, state) {\n\n      if (stream.sol()) {\n        state.indentCount = 0;\n      }\n\n      var style = state.tokenizer(stream, state);\n      var current = stream.current();\n\n      if (stream.eol() && (current === \"}\" || current === \",\")) {\n        dedent(state);\n      }\n\n      if (style !== null) {\n        var startOfToken = stream.pos - current.length;\n        var withCurrentIndent = startOfToken + (config.indentUnit * state.indentCount);\n\n        var newScopes = [];\n\n        for (var i = 0; i < state.scopes.length; i++) {\n          var scope = state.scopes[i];\n\n          if (scope.offset <= withCurrentIndent) {\n            newScopes.push(scope);\n          }\n        }\n\n        state.scopes = newScopes;\n      }\n\n      return style;\n    };\n\n    return {\n      startState: function() {\n        return {\n          tokenizer: tokenBase,\n          scopes: [{offset: 0, type: 'styl'}]\n        };\n      },\n\n      token: function(stream, state) {\n        var style = tokenLexer(stream, state);\n        state.lastToken = { style: style, content: stream.current() };\n        return style;\n      },\n\n      indent: function(state) {\n        return state.scopes[0].offset;\n      },\n\n      lineComment: \"//\",\n      fold: \"indent\"\n\n    };\n\n    function urlTokens(stream, state) {\n      var ch = stream.peek();\n\n      if (ch === \")\") {\n        stream.next();\n        state.tokenizer = tokenBase;\n        return \"operator\";\n      } else if (ch === \"(\") {\n        stream.next();\n        stream.eatSpace();\n\n        return \"operator\";\n      } else if (ch === \"'\" || ch === '\"') {\n        state.tokenizer = buildStringTokenizer(stream.next());\n        return \"string\";\n      } else {\n        state.tokenizer = buildStringTokenizer(\")\", false);\n        return \"string\";\n      }\n    }\n\n    function multilineComment(stream, state) {\n      if (stream.skipTo(\"*/\")) {\n        stream.next();\n        stream.next();\n        state.tokenizer = tokenBase;\n      } else {\n        stream.next();\n      }\n      return \"comment\";\n    }\n\n    function buildStringTokenizer(quote, greedy) {\n\n      if(greedy == null) {\n        greedy = true;\n      }\n\n      function stringTokenizer(stream, state) {\n        var nextChar = stream.next();\n        var peekChar = stream.peek();\n        var previousChar = stream.string.charAt(stream.pos-2);\n\n        var endingString = ((nextChar !== \"\\\\\" && peekChar === quote) ||\n                            (nextChar === quote && previousChar !== \"\\\\\"));\n\n        if (endingString) {\n          if (nextChar !== quote && greedy) {\n            stream.next();\n          }\n          state.tokenizer = tokenBase;\n          return \"string\";\n        } else if (nextChar === \"#\" && peekChar === \"{\") {\n          state.tokenizer = buildInterpolationTokenizer(stringTokenizer);\n          stream.next();\n          return \"operator\";\n        } else {\n          return \"string\";\n        }\n      }\n\n      return stringTokenizer;\n    }\n\n    function buildInterpolationTokenizer(currentTokenizer) {\n      return function(stream, state) {\n        if (stream.peek() === \"}\") {\n          stream.next();\n          state.tokenizer = currentTokenizer;\n          return \"operator\";\n        } else {\n          return tokenBase(stream, state);\n        }\n      };\n    }\n\n    function indent(state) {\n      if (state.indentCount == 0) {\n        state.indentCount++;\n        var lastScopeOffset = state.scopes[0].offset;\n        var currentOffset = lastScopeOffset + config.indentUnit;\n        state.scopes.unshift({ offset:currentOffset });\n      }\n    }\n\n    function dedent(state) {\n      if (state.scopes.length == 1) { return true; }\n      state.scopes.shift();\n    }\n\n  });\n\n  // https://developer.mozilla.org/en-US/docs/Web/HTML/Element\n  var cssTypeSelectors_ = [\"a\",\"abbr\",\"address\",\"area\",\"article\",\"aside\",\"audio\", \"b\", \"base\",\"bdi\",\"bdo\",\"bgsound\",\"blockquote\",\"body\",\"br\",\"button\",\"canvas\",\"caption\",\"cite\",\"code\",\"col\",\"colgroup\",\"data\",\"datalist\",\"dd\",\"del\",\"details\",\"dfn\",\"div\",\"dl\",\"dt\",\"em\",\"embed\",\"fieldset\",\"figcaption\",\"figure\",\"footer\",\"form\",\"h1\",\"h2\",\"h3\",\"h4\",\"h5\",\"h6\",\"head\",\"header\",\"hgroup\",\"hr\",\"html\",\"i\",\"iframe\",\"img\",\"input\",\"ins\",\"kbd\",\"keygen\",\"label\",\"legend\",\"li\",\"link\",\"main\",\"map\",\"mark\",\"marquee\",\"menu\",\"menuitem\",\"meta\",\"meter\",\"nav\",\"nobr\",\"noframes\",\"noscript\",\"object\",\"ol\",\"optgroup\",\"option\",\"output\",\"p\",\"param\",\"pre\",\"progress\",\"q\",\"rp\",\"rt\",\"ruby\",\"s\",\"samp\",\"script\",\"section\",\"select\",\"small\",\"source\",\"span\",\"strong\",\"style\",\"sub\",\"summary\",\"sup\",\"table\",\"tbody\",\"td\",\"textarea\",\"tfoot\",\"th\",\"thead\",\"time\",\"title\",\"tr\",\"track\",\"u\",\"ul\",\"var\",\"video\",\"wbr\"];\n  // https://github.com/csscomb/csscomb.js/blob/master/config/zen.json\n  var cssProperties_ = [\"position\",\"top\",\"right\",\"bottom\",\"left\",\"z-index\",\"display\",\"visibility\",\"flex-direction\",\"flex-order\",\"flex-pack\",\"float\",\"clear\",\"flex-align\",\"overflow\",\"overflow-x\",\"overflow-y\",\"overflow-scrolling\",\"clip\",\"box-sizing\",\"margin\",\"margin-top\",\"margin-right\",\"margin-bottom\",\"margin-left\",\"padding\",\"padding-top\",\"padding-right\",\"padding-bottom\",\"padding-left\",\"min-width\",\"min-height\",\"max-width\",\"max-height\",\"width\",\"height\",\"outline\",\"outline-width\",\"outline-style\",\"outline-color\",\"outline-offset\",\"border\",\"border-spacing\",\"border-collapse\",\"border-width\",\"border-style\",\"border-color\",\"border-top\",\"border-top-width\",\"border-top-style\",\"border-top-color\",\"border-right\",\"border-right-width\",\"border-right-style\",\"border-right-color\",\"border-bottom\",\"border-bottom-width\",\"border-bottom-style\",\"border-bottom-color\",\"border-left\",\"border-left-width\",\"border-left-style\",\"border-left-color\",\"border-radius\",\"border-top-left-radius\",\"border-top-right-radius\",\"border-bottom-right-radius\",\"border-bottom-left-radius\",\"border-image\",\"border-image-source\",\"border-image-slice\",\"border-image-width\",\"border-image-outset\",\"border-image-repeat\",\"border-top-image\",\"border-right-image\",\"border-bottom-image\",\"border-left-image\",\"border-corner-image\",\"border-top-left-image\",\"border-top-right-image\",\"border-bottom-right-image\",\"border-bottom-left-image\",\"background\",\"filter:progid:DXImageTransform\\\\.Microsoft\\\\.AlphaImageLoader\",\"background-color\",\"background-image\",\"background-attachment\",\"background-position\",\"background-position-x\",\"background-position-y\",\"background-clip\",\"background-origin\",\"background-size\",\"background-repeat\",\"box-decoration-break\",\"box-shadow\",\"color\",\"table-layout\",\"caption-side\",\"empty-cells\",\"list-style\",\"list-style-position\",\"list-style-type\",\"list-style-image\",\"quotes\",\"content\",\"counter-increment\",\"counter-reset\",\"writing-mode\",\"vertical-align\",\"text-align\",\"text-align-last\",\"text-decoration\",\"text-emphasis\",\"text-emphasis-position\",\"text-emphasis-style\",\"text-emphasis-color\",\"text-indent\",\"-ms-text-justify\",\"text-justify\",\"text-outline\",\"text-transform\",\"text-wrap\",\"text-overflow\",\"text-overflow-ellipsis\",\"text-overflow-mode\",\"text-size-adjust\",\"text-shadow\",\"white-space\",\"word-spacing\",\"word-wrap\",\"word-break\",\"tab-size\",\"hyphens\",\"letter-spacing\",\"font\",\"font-weight\",\"font-style\",\"font-variant\",\"font-size-adjust\",\"font-stretch\",\"font-size\",\"font-family\",\"src\",\"line-height\",\"opacity\",\"filter:\\\\\\\\\\\\\\\\'progid:DXImageTransform.Microsoft.Alpha\",\"filter:progid:DXImageTransform.Microsoft.Alpha\\\\(Opacity\",\"interpolation-mode\",\"filter\",\"resize\",\"cursor\",\"nav-index\",\"nav-up\",\"nav-right\",\"nav-down\",\"nav-left\",\"transition\",\"transition-delay\",\"transition-timing-function\",\"transition-duration\",\"transition-property\",\"transform\",\"transform-origin\",\"animation\",\"animation-name\",\"animation-duration\",\"animation-play-state\",\"animation-timing-function\",\"animation-delay\",\"animation-iteration-count\",\"animation-direction\",\"pointer-events\",\"unicode-bidi\",\"direction\",\"columns\",\"column-span\",\"column-width\",\"column-count\",\"column-fill\",\"column-gap\",\"column-rule\",\"column-rule-width\",\"column-rule-style\",\"column-rule-color\",\"break-before\",\"break-inside\",\"break-after\",\"page-break-before\",\"page-break-inside\",\"page-break-after\",\"orphans\",\"widows\",\"zoom\",\"max-zoom\",\"min-zoom\",\"user-zoom\",\"orientation\",\"text-rendering\",\"speak\",\"animation-fill-mode\",\"backface-visibility\",\"user-drag\",\"user-select\",\"appearance\"];\n  // https://github.com/codemirror/CodeMirror/blob/master/mode/css/css.js#L501\n  var cssValues_ = [\"above\",\"absolute\",\"activeborder\",\"activecaption\",\"afar\",\"after-white-space\",\"ahead\",\"alias\",\"all\",\"all-scroll\",\"alternate\",\"always\",\"amharic\",\"amharic-abegede\",\"antialiased\",\"appworkspace\",\"arabic-indic\",\"armenian\",\"asterisks\",\"auto\",\"avoid\",\"avoid-column\",\"avoid-page\",\"avoid-region\",\"background\",\"backwards\",\"baseline\",\"below\",\"bidi-override\",\"binary\",\"bengali\",\"block\",\"block-axis\",\"bold\",\"bolder\",\"border\",\"border-box\",\"both\",\"bottom\",\"break\",\"break-all\",\"break-word\",\"button-bevel\",\"buttonface\",\"buttonhighlight\",\"buttonshadow\",\"buttontext\",\"cambodian\",\"capitalize\",\"caps-lock-indicator\",\"captiontext\",\"caret\",\"cell\",\"center\",\"checkbox\",\"circle\",\"cjk-earthly-branch\",\"cjk-heavenly-stem\",\"cjk-ideographic\",\"clear\",\"clip\",\"close-quote\",\"col-resize\",\"collapse\",\"column\",\"compact\",\"condensed\",\"contain\",\"content\",\"content-box\",\"context-menu\",\"continuous\",\"copy\",\"cover\",\"crop\",\"cross\",\"crosshair\",\"currentcolor\",\"cursive\",\"dashed\",\"decimal\",\"decimal-leading-zero\",\"default\",\"default-button\",\"destination-atop\",\"destination-in\",\"destination-out\",\"destination-over\",\"devanagari\",\"disc\",\"discard\",\"document\",\"dot-dash\",\"dot-dot-dash\",\"dotted\",\"double\",\"down\",\"e-resize\",\"ease\",\"ease-in\",\"ease-in-out\",\"ease-out\",\"element\",\"ellipse\",\"ellipsis\",\"embed\",\"end\",\"ethiopic\",\"ethiopic-abegede\",\"ethiopic-abegede-am-et\",\"ethiopic-abegede-gez\",\"ethiopic-abegede-ti-er\",\"ethiopic-abegede-ti-et\",\"ethiopic-halehame-aa-er\",\"ethiopic-halehame-aa-et\",\"ethiopic-halehame-am-et\",\"ethiopic-halehame-gez\",\"ethiopic-halehame-om-et\",\"ethiopic-halehame-sid-et\",\"ethiopic-halehame-so-et\",\"ethiopic-halehame-ti-er\",\"ethiopic-halehame-ti-et\",\"ethiopic-halehame-tig\",\"ew-resize\",\"expanded\",\"extra-condensed\",\"extra-expanded\",\"fantasy\",\"fast\",\"fill\",\"fixed\",\"flat\",\"footnotes\",\"forwards\",\"from\",\"geometricPrecision\",\"georgian\",\"graytext\",\"groove\",\"gujarati\",\"gurmukhi\",\"hand\",\"hangul\",\"hangul-consonant\",\"hebrew\",\"help\",\"hidden\",\"hide\",\"higher\",\"highlight\",\"highlighttext\",\"hiragana\",\"hiragana-iroha\",\"horizontal\",\"hsl\",\"hsla\",\"icon\",\"ignore\",\"inactiveborder\",\"inactivecaption\",\"inactivecaptiontext\",\"infinite\",\"infobackground\",\"infotext\",\"inherit\",\"initial\",\"inline\",\"inline-axis\",\"inline-block\",\"inline-table\",\"inset\",\"inside\",\"intrinsic\",\"invert\",\"italic\",\"justify\",\"kannada\",\"katakana\",\"katakana-iroha\",\"keep-all\",\"khmer\",\"landscape\",\"lao\",\"large\",\"larger\",\"left\",\"level\",\"lighter\",\"line-through\",\"linear\",\"lines\",\"list-item\",\"listbox\",\"listitem\",\"local\",\"logical\",\"loud\",\"lower\",\"lower-alpha\",\"lower-armenian\",\"lower-greek\",\"lower-hexadecimal\",\"lower-latin\",\"lower-norwegian\",\"lower-roman\",\"lowercase\",\"ltr\",\"malayalam\",\"match\",\"media-controls-background\",\"media-current-time-display\",\"media-fullscreen-button\",\"media-mute-button\",\"media-play-button\",\"media-return-to-realtime-button\",\"media-rewind-button\",\"media-seek-back-button\",\"media-seek-forward-button\",\"media-slider\",\"media-sliderthumb\",\"media-time-remaining-display\",\"media-volume-slider\",\"media-volume-slider-container\",\"media-volume-sliderthumb\",\"medium\",\"menu\",\"menulist\",\"menulist-button\",\"menulist-text\",\"menulist-textfield\",\"menutext\",\"message-box\",\"middle\",\"min-intrinsic\",\"mix\",\"mongolian\",\"monospace\",\"move\",\"multiple\",\"myanmar\",\"n-resize\",\"narrower\",\"ne-resize\",\"nesw-resize\",\"no-close-quote\",\"no-drop\",\"no-open-quote\",\"no-repeat\",\"none\",\"normal\",\"not-allowed\",\"nowrap\",\"ns-resize\",\"nw-resize\",\"nwse-resize\",\"oblique\",\"octal\",\"open-quote\",\"optimizeLegibility\",\"optimizeSpeed\",\"oriya\",\"oromo\",\"outset\",\"outside\",\"outside-shape\",\"overlay\",\"overline\",\"padding\",\"padding-box\",\"painted\",\"page\",\"paused\",\"persian\",\"plus-darker\",\"plus-lighter\",\"pointer\",\"polygon\",\"portrait\",\"pre\",\"pre-line\",\"pre-wrap\",\"preserve-3d\",\"progress\",\"push-button\",\"radio\",\"read-only\",\"read-write\",\"read-write-plaintext-only\",\"rectangle\",\"region\",\"relative\",\"repeat\",\"repeat-x\",\"repeat-y\",\"reset\",\"reverse\",\"rgb\",\"rgba\",\"ridge\",\"right\",\"round\",\"row-resize\",\"rtl\",\"run-in\",\"running\",\"s-resize\",\"sans-serif\",\"scroll\",\"scrollbar\",\"se-resize\",\"searchfield\",\"searchfield-cancel-button\",\"searchfield-decoration\",\"searchfield-results-button\",\"searchfield-results-decoration\",\"semi-condensed\",\"semi-expanded\",\"separate\",\"serif\",\"show\",\"sidama\",\"single\",\"skip-white-space\",\"slide\",\"slider-horizontal\",\"slider-vertical\",\"sliderthumb-horizontal\",\"sliderthumb-vertical\",\"slow\",\"small-caps\",\"small-caption\",\"smaller\",\"solid\",\"somali\",\"source-atop\",\"source-in\",\"source-out\",\"source-over\",\"space\",\"square\",\"square-button\",\"start\",\"static\",\"status-bar\",\"stretch\",\"stroke\",\"sub\",\"subpixel-antialiased\",\"super\",\"sw-resize\",\"table\",\"table-caption\",\"table-cell\",\"table-column\",\"table-column-group\",\"table-footer-group\",\"table-header-group\",\"table-row\",\"table-row-group\",\"telugu\",\"text\",\"text-bottom\",\"text-top\",\"textfield\",\"thai\",\"thick\",\"thin\",\"threeddarkshadow\",\"threedface\",\"threedhighlight\",\"threedlightshadow\",\"threedshadow\",\"tibetan\",\"tigre\",\"tigrinya-er\",\"tigrinya-er-abegede\",\"tigrinya-et\",\"tigrinya-et-abegede\",\"to\",\"top\",\"transparent\",\"ultra-condensed\",\"ultra-expanded\",\"underline\",\"up\",\"upper-alpha\",\"upper-armenian\",\"upper-greek\",\"upper-hexadecimal\",\"upper-latin\",\"upper-norwegian\",\"upper-roman\",\"uppercase\",\"urdu\",\"url\",\"vertical\",\"vertical-text\",\"visible\",\"visibleFill\",\"visiblePainted\",\"visibleStroke\",\"visual\",\"w-resize\",\"wait\",\"wave\",\"wider\",\"window\",\"windowframe\",\"windowtext\",\"x-large\",\"x-small\",\"xor\",\"xx-large\",\"xx-small\",\"bicubic\",\"optimizespeed\",\"grayscale\"];\n  var cssColorValues_ = [\"aliceblue\",\"antiquewhite\",\"aqua\",\"aquamarine\",\"azure\",\"beige\",\"bisque\",\"black\",\"blanchedalmond\",\"blue\",\"blueviolet\",\"brown\",\"burlywood\",\"cadetblue\",\"chartreuse\",\"chocolate\",\"coral\",\"cornflowerblue\",\"cornsilk\",\"crimson\",\"cyan\",\"darkblue\",\"darkcyan\",\"darkgoldenrod\",\"darkgray\",\"darkgreen\",\"darkkhaki\",\"darkmagenta\",\"darkolivegreen\",\"darkorange\",\"darkorchid\",\"darkred\",\"darksalmon\",\"darkseagreen\",\"darkslateblue\",\"darkslategray\",\"darkturquoise\",\"darkviolet\",\"deeppink\",\"deepskyblue\",\"dimgray\",\"dodgerblue\",\"firebrick\",\"floralwhite\",\"forestgreen\",\"fuchsia\",\"gainsboro\",\"ghostwhite\",\"gold\",\"goldenrod\",\"gray\",\"grey\",\"green\",\"greenyellow\",\"honeydew\",\"hotpink\",\"indianred\",\"indigo\",\"ivory\",\"khaki\",\"lavender\",\"lavenderblush\",\"lawngreen\",\"lemonchiffon\",\"lightblue\",\"lightcoral\",\"lightcyan\",\"lightgoldenrodyellow\",\"lightgray\",\"lightgreen\",\"lightpink\",\"lightsalmon\",\"lightseagreen\",\"lightskyblue\",\"lightslategray\",\"lightsteelblue\",\"lightyellow\",\"lime\",\"limegreen\",\"linen\",\"magenta\",\"maroon\",\"mediumaquamarine\",\"mediumblue\",\"mediumorchid\",\"mediumpurple\",\"mediumseagreen\",\"mediumslateblue\",\"mediumspringgreen\",\"mediumturquoise\",\"mediumvioletred\",\"midnightblue\",\"mintcream\",\"mistyrose\",\"moccasin\",\"navajowhite\",\"navy\",\"oldlace\",\"olive\",\"olivedrab\",\"orange\",\"orangered\",\"orchid\",\"palegoldenrod\",\"palegreen\",\"paleturquoise\",\"palevioletred\",\"papayawhip\",\"peachpuff\",\"peru\",\"pink\",\"plum\",\"powderblue\",\"purple\",\"red\",\"rosybrown\",\"royalblue\",\"saddlebrown\",\"salmon\",\"sandybrown\",\"seagreen\",\"seashell\",\"sienna\",\"silver\",\"skyblue\",\"slateblue\",\"slategray\",\"snow\",\"springgreen\",\"steelblue\",\"tan\",\"teal\",\"thistle\",\"tomato\",\"turquoise\",\"violet\",\"wheat\",\"white\",\"whitesmoke\",\"yellow\",\"yellowgreen\"];\n  var cssValuesWithBrackets_ = [\"gradient\",\"linear-gradient\",\"radial-gradient\",\"repeating-linear-gradient\",\"repeating-radial-gradient\",\"cubic-bezier\",\"translateX\",\"translateY\",\"translate3d\",\"rotate3d\",\"scale\",\"scale3d\",\"perspective\",\"skewX\"];\n\n  var wordOperators = [\"in\", \"and\", \"or\", \"not\", \"is a\", \"is\", \"isnt\", \"defined\", \"if unless\"],\n      commonKeywords = [\"for\", \"if\", \"else\", \"unless\", \"return\"],\n      commonAtoms = [\"null\", \"true\", \"false\", \"href\", \"title\", \"type\", \"not-allowed\", \"readonly\", \"disabled\"],\n      commonDef = [\"@font-face\", \"@keyframes\", \"@media\", \"@viewport\", \"@page\", \"@host\", \"@supports\", \"@block\", \"@css\"],\n      cssTypeSelectors = keySet(cssTypeSelectors_),\n      cssProperties = keySet(cssProperties_),\n      cssValues = keySet(cssValues_.concat(cssColorValues_)),\n      hintWords = wordOperators.concat(commonKeywords,\n                                       commonAtoms,\n                                       commonDef,\n                                       cssTypeSelectors_,\n                                       cssProperties_,\n                                       cssValues_,\n                                       cssValuesWithBrackets_,\n                                       cssColorValues_);\n\n  function wordRegexp(words) {\n    return new RegExp(\"^((\" + words.join(\")|(\") + \"))\\\\b\");\n  };\n\n  function keySet(array) {\n    var keys = {};\n    for (var i = 0; i < array.length; ++i) {\n      keys[array[i]] = true;\n    }\n    return keys;\n  };\n\n  CodeMirror.registerHelper(\"hintWords\", \"stylus\", hintWords);\n  CodeMirror.defineMIME(\"text/x-styl\", \"stylus\");\n\n});\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/tcl/index.html",
    "content": "<!doctype html>\n\n<title>CodeMirror: Tcl mode</title>\n<meta charset=\"utf-8\"/>\n<link rel=stylesheet href=\"../../doc/docs.css\">\n\n<link rel=\"stylesheet\" href=\"../../lib/codemirror.css\">\n<link rel=\"stylesheet\" href=\"../../theme/night.css\">\n<script src=\"../../lib/codemirror.js\"></script>\n<script src=\"tcl.js\"></script>\n<script src=\"../../addon/scroll/scrollpastend.js\"></script>\n<div id=nav>\n  <a href=\"http://codemirror.net\"><h1>CodeMirror</h1><img id=logo src=\"../../doc/logo.png\"></a>\n\n  <ul>\n    <li><a href=\"../../index.html\">Home</a>\n    <li><a href=\"../../doc/manual.html\">Manual</a>\n    <li><a href=\"https://github.com/codemirror/codemirror\">Code</a>\n  </ul>\n  <ul>\n    <li><a href=\"../index.html\">Language modes</a>\n    <li><a class=active href=\"#\">Tcl</a>\n  </ul>\n</div>\n\n<article>\n<h2>Tcl mode</h2>\n<form><textarea id=\"code\" name=\"code\">\n##############################################################################################\n##  ##     whois.tcl for eggdrop by Ford_Lawnmower irc.geekshed.net #Script-Help        ##  ##\n##############################################################################################\n## To use this script you must set channel flag +whois (ie .chanset #chan +whois)           ##\n##############################################################################################\n##      ____                __                 ###########################################  ##\n##     / __/___ _ ___ _ ___/ /____ ___   ___   ###########################################  ##\n##    / _/ / _ `// _ `// _  // __// _ \\ / _ \\  ###########################################  ##\n##   /___/ \\_, / \\_, / \\_,_//_/   \\___// .__/  ###########################################  ##\n##        /___/ /___/                 /_/      ###########################################  ##\n##                                             ###########################################  ##\n##############################################################################################\n##  ##                             Start Setup.                                         ##  ##\n##############################################################################################\nnamespace eval whois {\n## change cmdchar to the trigger you want to use                                        ##  ##\n  variable cmdchar \"!\"\n## change command to the word trigger you would like to use.                            ##  ##\n## Keep in mind, This will also change the .chanset +/-command                          ##  ##\n  variable command \"whois\"\n## change textf to the colors you want for the text.                                    ##  ##\n  variable textf \"\\017\\00304\"\n## change tagf to the colors you want for tags:                                         ##  ##\n  variable tagf \"\\017\\002\"\n## Change logo to the logo you want at the start of the line.                           ##  ##\n  variable logo \"\\017\\00304\\002\\[\\00306W\\003hois\\00304\\]\\017\"\n## Change lineout to the results you want. Valid results are channel users modes topic  ##  ##\n  variable lineout \"channel users modes topic\"\n##############################################################################################\n##  ##                           End Setup.                                              ## ##\n##############################################################################################\n  variable channel \"\"\n  setudef flag $whois::command\n  bind pub -|- [string trimleft $whois::cmdchar]${whois::command} whois::list\n  bind raw -|- \"311\" whois::311\n  bind raw -|- \"312\" whois::312\n  bind raw -|- \"319\" whois::319\n  bind raw -|- \"317\" whois::317\n  bind raw -|- \"313\" whois::multi\n  bind raw -|- \"310\" whois::multi\n  bind raw -|- \"335\" whois::multi\n  bind raw -|- \"301\" whois::301\n  bind raw -|- \"671\" whois::multi\n  bind raw -|- \"320\" whois::multi\n  bind raw -|- \"401\" whois::multi\n  bind raw -|- \"318\" whois::318\n  bind raw -|- \"307\" whois::307\n}\nproc whois::311 {from key text} {\n  if {[regexp -- {^[^\\s]+\\s(.+?)\\s(.+?)\\s(.+?)\\s\\*\\s\\:(.+)$} $text wholematch nick ident host realname]} {\n    putserv \"PRIVMSG $whois::channel :${whois::logo} ${whois::tagf}Host:${whois::textf} \\\n        $nick \\(${ident}@${host}\\) ${whois::tagf}Realname:${whois::textf} $realname\"\n  }\n}\nproc whois::multi {from key text} {\n  if {[regexp {\\:(.*)$} $text match $key]} {\n    putserv \"PRIVMSG $whois::channel :${whois::logo} ${whois::tagf}Note:${whois::textf} [subst $$key]\"\n        return 1\n  }\n}\nproc whois::312 {from key text} {\n  regexp {([^\\s]+)\\s\\:} $text match server\n  putserv \"PRIVMSG $whois::channel :${whois::logo} ${whois::tagf}Server:${whois::textf} $server\"\n}\nproc whois::319 {from key text} {\n  if {[regexp {.+\\:(.+)$} $text match channels]} {\n    putserv \"PRIVMSG $whois::channel :${whois::logo} ${whois::tagf}Channels:${whois::textf} $channels\"\n  }\n}\nproc whois::317 {from key text} {\n  if {[regexp -- {.*\\s(\\d+)\\s(\\d+)\\s\\:} $text wholematch idle signon]} {\n    putserv \"PRIVMSG $whois::channel :${whois::logo} ${whois::tagf}Connected:${whois::textf} \\\n        [ctime $signon] ${whois::tagf}Idle:${whois::textf} [duration $idle]\"\n  }\n}\nproc whois::301 {from key text} {\n  if {[regexp {^.+\\s[^\\s]+\\s\\:(.*)$} $text match awaymsg]} {\n    putserv \"PRIVMSG $whois::channel :${whois::logo} ${whois::tagf}Away:${whois::textf} $awaymsg\"\n  }\n}\nproc whois::318 {from key text} {\n  namespace eval whois {\n        variable channel \"\"\n  }\n  variable whois::channel \"\"\n}\nproc whois::307 {from key text} {\n  putserv \"PRIVMSG $whois::channel :${whois::logo} ${whois::tagf}Services:${whois::textf} Registered Nick\"\n}\nproc whois::list {nick host hand chan text} {\n  if {[lsearch -exact [channel info $chan] \"+${whois::command}\"] != -1} {\n    namespace eval whois {\n          variable channel \"\"\n        }\n    variable whois::channel $chan\n    putserv \"WHOIS $text\"\n  }\n}\nputlog \"\\002*Loaded* \\017\\00304\\002\\[\\00306W\\003hois\\00304\\]\\017 \\002by \\\nFord_Lawnmower irc.GeekShed.net #Script-Help\"\n</textarea></form>\n    <script>\n      var editor = CodeMirror.fromTextArea(document.getElementById(\"code\"), {\n        theme: \"night\",\n        lineNumbers: true,\n        indentUnit: 2,\n        scrollPastEnd: true,\n        mode: \"text/x-tcl\"\n      });\n    </script>\n\n    <p><strong>MIME types defined:</strong> <code>text/x-tcl</code>.</p>\n\n  </article>\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/tcl/tcl.js",
    "content": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n//tcl mode by Ford_Lawnmower :: Based on Velocity mode by Steve O'Hara\n\n(function(mod) {\n  if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n    mod(require(\"../../lib/codemirror\"));\n  else if (typeof define == \"function\" && define.amd) // AMD\n    define([\"../../lib/codemirror\"], mod);\n  else // Plain browser env\n    mod(CodeMirror);\n})(function(CodeMirror) {\n\"use strict\";\n\nCodeMirror.defineMode(\"tcl\", function() {\n  function parseWords(str) {\n    var obj = {}, words = str.split(\" \");\n    for (var i = 0; i < words.length; ++i) obj[words[i]] = true;\n    return obj;\n  }\n  var keywords = parseWords(\"Tcl safe after append array auto_execok auto_import auto_load \" +\n        \"auto_mkindex auto_mkindex_old auto_qualify auto_reset bgerror \" +\n        \"binary break catch cd close concat continue dde eof encoding error \" +\n        \"eval exec exit expr fblocked fconfigure fcopy file fileevent filename \" +\n        \"filename flush for foreach format gets glob global history http if \" +\n        \"incr info interp join lappend lindex linsert list llength load lrange \" +\n        \"lreplace lsearch lset lsort memory msgcat namespace open package parray \" +\n        \"pid pkg::create pkg_mkIndex proc puts pwd re_syntax read regex regexp \" +\n        \"registry regsub rename resource return scan seek set socket source split \" +\n        \"string subst switch tcl_endOfWord tcl_findLibrary tcl_startOfNextWord \" +\n        \"tcl_wordBreakAfter tcl_startOfPreviousWord tcl_wordBreakBefore tcltest \" +\n        \"tclvars tell time trace unknown unset update uplevel upvar variable \" +\n    \"vwait\");\n    var functions = parseWords(\"if elseif else and not or eq ne in ni for foreach while switch\");\n    var isOperatorChar = /[+\\-*&%=<>!?^\\/\\|]/;\n    function chain(stream, state, f) {\n      state.tokenize = f;\n      return f(stream, state);\n    }\n    function tokenBase(stream, state) {\n      var beforeParams = state.beforeParams;\n      state.beforeParams = false;\n      var ch = stream.next();\n      if ((ch == '\"' || ch == \"'\") && state.inParams)\n        return chain(stream, state, tokenString(ch));\n      else if (/[\\[\\]{}\\(\\),;\\.]/.test(ch)) {\n        if (ch == \"(\" && beforeParams) state.inParams = true;\n        else if (ch == \")\") state.inParams = false;\n          return null;\n      }\n      else if (/\\d/.test(ch)) {\n        stream.eatWhile(/[\\w\\.]/);\n        return \"number\";\n      }\n      else if (ch == \"#\" && stream.eat(\"*\")) {\n        return chain(stream, state, tokenComment);\n      }\n      else if (ch == \"#\" && stream.match(/ *\\[ *\\[/)) {\n        return chain(stream, state, tokenUnparsed);\n      }\n      else if (ch == \"#\" && stream.eat(\"#\")) {\n        stream.skipToEnd();\n        return \"comment\";\n      }\n      else if (ch == '\"') {\n        stream.skipTo(/\"/);\n        return \"comment\";\n      }\n      else if (ch == \"$\") {\n        stream.eatWhile(/[$_a-z0-9A-Z\\.{:]/);\n        stream.eatWhile(/}/);\n        state.beforeParams = true;\n        return \"builtin\";\n      }\n      else if (isOperatorChar.test(ch)) {\n        stream.eatWhile(isOperatorChar);\n        return \"comment\";\n      }\n      else {\n        stream.eatWhile(/[\\w\\$_{}\\xa1-\\uffff]/);\n        var word = stream.current().toLowerCase();\n        if (keywords && keywords.propertyIsEnumerable(word))\n          return \"keyword\";\n        if (functions && functions.propertyIsEnumerable(word)) {\n          state.beforeParams = true;\n          return \"keyword\";\n        }\n        return null;\n      }\n    }\n    function tokenString(quote) {\n      return function(stream, state) {\n      var escaped = false, next, end = false;\n      while ((next = stream.next()) != null) {\n        if (next == quote && !escaped) {\n          end = true;\n          break;\n        }\n        escaped = !escaped && next == \"\\\\\";\n      }\n      if (end) state.tokenize = tokenBase;\n        return \"string\";\n      };\n    }\n    function tokenComment(stream, state) {\n      var maybeEnd = false, ch;\n      while (ch = stream.next()) {\n        if (ch == \"#\" && maybeEnd) {\n          state.tokenize = tokenBase;\n          break;\n        }\n        maybeEnd = (ch == \"*\");\n      }\n      return \"comment\";\n    }\n    function tokenUnparsed(stream, state) {\n      var maybeEnd = 0, ch;\n      while (ch = stream.next()) {\n        if (ch == \"#\" && maybeEnd == 2) {\n          state.tokenize = tokenBase;\n          break;\n        }\n        if (ch == \"]\")\n          maybeEnd++;\n        else if (ch != \" \")\n          maybeEnd = 0;\n      }\n      return \"meta\";\n    }\n    return {\n      startState: function() {\n        return {\n          tokenize: tokenBase,\n          beforeParams: false,\n          inParams: false\n        };\n      },\n      token: function(stream, state) {\n        if (stream.eatSpace()) return null;\n        return state.tokenize(stream, state);\n      }\n    };\n});\nCodeMirror.defineMIME(\"text/x-tcl\", \"tcl\");\n\n});\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/textile/index.html",
    "content": "<!doctype html>\n\n<title>CodeMirror: Textile mode</title>\n<meta charset=\"utf-8\"/>\n<link rel=stylesheet href=\"../../doc/docs.css\">\n\n<link rel=\"stylesheet\" href=\"../../lib/codemirror.css\">\n<script src=\"../../lib/codemirror.js\"></script>\n<script src=\"textile.js\"></script>\n<style>.CodeMirror {background: #f8f8f8;}</style>\n<div id=nav>\n  <a href=\"http://codemirror.net\"><h1>CodeMirror</h1><img id=logo src=\"../../doc/logo.png\"></a>\n\n  <ul>\n    <li><a href=\"../../index.html\">Home</a>\n    <li><a href=\"../../doc/manual.html\">Manual</a>\n    <li><a href=\"https://github.com/marijnh/codemirror\">Code</a>\n  </ul>\n  <ul>\n    <li><a href=\"../index.html\">Language modes</a>\n    <li><a class=\"active\" href=\"#\">Textile</a>\n  </ul>\n</div>\n\n<article>\n    <h2>Textile mode</h2>\n    <form><textarea id=\"code\" name=\"code\">\nh1. Textile Mode\n\nA paragraph without formatting.\n\np. A simple Paragraph.\n\n\nh2. Phrase Modifiers\n\nHere are some simple phrase modifiers: *strong*, _emphasis_, **bold**, and __italic__.\n\nA ??citation??, -deleted text-, +inserted text+, some ^superscript^, and some ~subscript~.\n\nA %span element% and @code element@\n\nA \"link\":http://example.com, a \"link with (alt text)\":urlAlias\n\n[urlAlias]http://example.com/\n\nAn image: !http://example.com/image.png! and an image with a link: !http://example.com/image.png!:http://example.com\n\nA sentence with a footnote.[123]\n\nfn123. The footnote is defined here.\n\nRegistered(r), Trademark(tm), and Copyright(c)\n\n\nh2. Headers\n\nh1. Top level\nh2. Second level\nh3. Third level\nh4. Fourth level\nh5. Fifth level\nh6. Lowest level\n\n\nh2.  Lists\n\n* An unordered list\n** foo bar\n*** foo bar\n**** foo bar\n** foo bar\n\n# An ordered list\n## foo bar\n### foo bar\n#### foo bar\n## foo bar\n\n- definition list := description\n- another item    := foo bar\n- spanning ines   :=\n                     foo bar\n\n                     foo bar =:\n\n\nh2. Attributes\n\nLayouts and phrase modifiers can be modified with various kinds of attributes: alignment, CSS ID, CSS class names, language, padding, and CSS styles.\n\nh3. Alignment\n\ndiv<. left align\ndiv>. right align\n\nh3. CSS ID and class name\n\nYou are a %(my-id#my-classname) rad% person.\n\nh3. Language\n\np[en_CA]. Strange weather, eh?\n\nh3. Horizontal Padding\n\np(())). 2em left padding, 3em right padding\n\nh3. CSS styling\n\np{background: red}. Fire!\n\n\nh2. Table\n\n|_.              Header 1               |_.      Header 2        |\n|{background:#ddd}. Cell with background|         Normal         |\n|\\2.         Cell spanning 2 columns                             |\n|/2.         Cell spanning 2 rows       |(cell-class). one       |\n|                                                two             |\n|>.                  Right aligned cell |<. Left aligned cell    |\n\n\nh3. A table with attributes:\n\ntable(#prices).\n|Adults|$5|\n|Children|$2|\n\n\nh2. Code blocks\n\nbc.\nfunction factorial(n) {\n    if (n === 0) {\n        return 1;\n    }\n    return n * factorial(n - 1);\n}\n\npre..\n                ,,,,,,\n            o#'9MMHb':'-,o,\n         .oH\":HH$' \"' ' -*R&o,\n        dMMM*\"\"'`'      .oM\"HM?.\n       ,MMM'          \"HLbd< ?&H\\\n      .:MH .\"\\          ` MM  MM&b\n     . \"*H    -        &MMMMMMMMMH:\n     .    dboo        MMMMMMMMMMMM.\n     .   dMMMMMMb      *MMMMMMMMMP.\n     .    MMMMMMMP        *MMMMMP .\n          `#MMMMM           MM6P ,\n       '    `MMMP\"           HM*`,\n        '    :MM             .- ,\n         '.   `#?..  .       ..'\n            -.   .         .-\n              ''-.oo,oo.-''\n\n\\. _(9>\n \\==_)\n  -'=\n\nh2. Temporarily disabling textile markup\n\nnotextile. Don't __touch this!__\n\nSurround text with double-equals to disable textile inline. Example: Use ==*asterisks*== for *strong* text.\n\n\nh2. HTML\n\nSome block layouts are simply textile versions of HTML tags with the same name, like @div@, @pre@, and @p@. HTML tags can also exist on their own line:\n\n<section>\n  <h1>Title</h1>\n  <p>Hello!</p>\n</section>\n\n</textarea></form>\n    <script>\n        var editor = CodeMirror.fromTextArea(document.getElementById(\"code\"), {\n            lineNumbers: true,\n            mode: \"text/x-textile\"\n        });\n    </script>\n\n    <p><strong>MIME types defined:</strong> <code>text/x-textile</code>.</p>\n\n    <p><strong>Parsing/Highlighting Tests:</strong> <a href=\"../../test/index.html#textile_*\">normal</a>,  <a href=\"../../test/index.html#verbose,textile_*\">verbose</a>.</p>\n\n</article>\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/textile/test.js",
    "content": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n(function() {\n  var mode = CodeMirror.getMode({tabSize: 4}, 'textile');\n  function MT(name) { test.mode(name, mode, Array.prototype.slice.call(arguments, 1)); }\n\n  MT('simpleParagraphs',\n      'Some text.',\n      '',\n      'Some more text.');\n\n  /*\n   * Phrase Modifiers\n   */\n\n  MT('em',\n      'foo [em _bar_]');\n\n  MT('emBoogus',\n      'code_mirror');\n\n  MT('strong',\n      'foo [strong *bar*]');\n\n  MT('strongBogus',\n      '3 * 3 = 9');\n\n  MT('italic',\n      'foo [em __bar__]');\n\n  MT('italicBogus',\n      'code__mirror');\n\n  MT('bold',\n      'foo [strong **bar**]');\n\n  MT('boldBogus',\n      '3 ** 3 = 27');\n\n  MT('simpleLink',\n      '[link \"CodeMirror\":http://codemirror.net]');\n\n  MT('referenceLink',\n      '[link \"CodeMirror\":code_mirror]',\n      'Normal Text.',\n      '[link [[code_mirror]]http://codemirror.net]');\n\n  MT('footCite',\n      'foo bar[qualifier [[1]]]');\n\n  MT('footCiteBogus',\n      'foo bar[[1a2]]');\n\n  MT('special-characters',\n          'Registered [tag (r)], ' +\n          'Trademark [tag (tm)], and ' +\n          'Copyright [tag (c)] 2008');\n\n  MT('cite',\n      \"A book is [keyword ??The Count of Monte Cristo??] by Dumas.\");\n\n  MT('additionAndDeletion',\n      'The news networks declared [negative -Al Gore-] ' +\n        '[positive +George W. Bush+] the winner in Florida.');\n\n  MT('subAndSup',\n      'f(x, n) = log [builtin ~4~] x [builtin ^n^]');\n\n  MT('spanAndCode',\n      'A [quote %span element%] and [atom @code element@]');\n\n  MT('spanBogus',\n      'Percentage 25% is not a span.');\n\n  MT('citeBogus',\n      'Question? is not a citation.');\n\n  MT('codeBogus',\n      'user@example.com');\n\n  MT('subBogus',\n      '~username');\n\n  MT('supBogus',\n      'foo ^ bar');\n\n  MT('deletionBogus',\n      '3 - 3 = 0');\n\n  MT('additionBogus',\n      '3 + 3 = 6');\n\n  MT('image',\n      'An image: [string !http://www.example.com/image.png!]');\n\n  MT('imageWithAltText',\n      'An image: [string !http://www.example.com/image.png (Alt Text)!]');\n\n  MT('imageWithUrl',\n      'An image: [string !http://www.example.com/image.png!:http://www.example.com/]');\n\n  /*\n   * Headers\n   */\n\n  MT('h1',\n      '[header&header-1 h1. foo]');\n\n  MT('h2',\n      '[header&header-2 h2. foo]');\n\n  MT('h3',\n      '[header&header-3 h3. foo]');\n\n  MT('h4',\n      '[header&header-4 h4. foo]');\n\n  MT('h5',\n      '[header&header-5 h5. foo]');\n\n  MT('h6',\n      '[header&header-6 h6. foo]');\n\n  MT('h7Bogus',\n      'h7. foo');\n\n  MT('multipleHeaders',\n      '[header&header-1 h1. Heading 1]',\n      '',\n      'Some text.',\n      '',\n      '[header&header-2 h2. Heading 2]',\n      '',\n      'More text.');\n\n  MT('h1inline',\n      '[header&header-1 h1. foo ][header&header-1&em _bar_][header&header-1  baz]');\n\n  /*\n   * Lists\n   */\n\n  MT('ul',\n      'foo',\n      'bar',\n      '',\n      '[variable-2 * foo]',\n      '[variable-2 * bar]');\n\n  MT('ulNoBlank',\n      'foo',\n      'bar',\n      '[variable-2 * foo]',\n      '[variable-2 * bar]');\n\n  MT('ol',\n      'foo',\n      'bar',\n      '',\n      '[variable-2 # foo]',\n      '[variable-2 # bar]');\n\n  MT('olNoBlank',\n      'foo',\n      'bar',\n      '[variable-2 # foo]',\n      '[variable-2 # bar]');\n\n  MT('ulFormatting',\n      '[variable-2 * ][variable-2&em _foo_][variable-2  bar]',\n      '[variable-2 * ][variable-2&strong *][variable-2&em&strong _foo_]' +\n        '[variable-2&strong *][variable-2  bar]',\n      '[variable-2 * ][variable-2&strong *foo*][variable-2  bar]');\n\n  MT('olFormatting',\n      '[variable-2 # ][variable-2&em _foo_][variable-2  bar]',\n      '[variable-2 # ][variable-2&strong *][variable-2&em&strong _foo_]' +\n        '[variable-2&strong *][variable-2  bar]',\n      '[variable-2 # ][variable-2&strong *foo*][variable-2  bar]');\n\n  MT('ulNested',\n      '[variable-2 * foo]',\n      '[variable-3 ** bar]',\n      '[keyword *** bar]',\n      '[variable-2 **** bar]',\n      '[variable-3 ** bar]');\n\n  MT('olNested',\n      '[variable-2 # foo]',\n      '[variable-3 ## bar]',\n      '[keyword ### bar]',\n      '[variable-2 #### bar]',\n      '[variable-3 ## bar]');\n\n  MT('ulNestedWithOl',\n      '[variable-2 * foo]',\n      '[variable-3 ## bar]',\n      '[keyword *** bar]',\n      '[variable-2 #### bar]',\n      '[variable-3 ** bar]');\n\n  MT('olNestedWithUl',\n      '[variable-2 # foo]',\n      '[variable-3 ** bar]',\n      '[keyword ### bar]',\n      '[variable-2 **** bar]',\n      '[variable-3 ## bar]');\n\n  MT('definitionList',\n      '[number - coffee := Hot ][number&em _and_][number  black]',\n      '',\n      'Normal text.');\n\n  MT('definitionListSpan',\n      '[number - coffee :=]',\n      '',\n      '[number Hot ][number&em _and_][number  black =:]',\n      '',\n      'Normal text.');\n\n  MT('boo',\n      '[number - dog := woof woof]',\n      '[number - cat := meow meow]',\n      '[number - whale :=]',\n      '[number Whale noises.]',\n      '',\n      '[number Also, ][number&em _splashing_][number . =:]');\n\n  /*\n   * Attributes\n   */\n\n  MT('divWithAttribute',\n      '[punctuation div][punctuation&attribute (#my-id)][punctuation . foo bar]');\n\n  MT('divWithAttributeAnd2emRightPadding',\n      '[punctuation div][punctuation&attribute (#my-id)((][punctuation . foo bar]');\n\n  MT('divWithClassAndId',\n      '[punctuation div][punctuation&attribute (my-class#my-id)][punctuation . foo bar]');\n\n  MT('paragraphWithCss',\n      'p[attribute {color:red;}]. foo bar');\n\n  MT('paragraphNestedStyles',\n      'p. [strong *foo ][strong&em _bar_][strong *]');\n\n  MT('paragraphWithLanguage',\n      'p[attribute [[fr]]]. Parlez-vous français?');\n\n  MT('paragraphLeftAlign',\n      'p[attribute <]. Left');\n\n  MT('paragraphRightAlign',\n      'p[attribute >]. Right');\n\n  MT('paragraphRightAlign',\n      'p[attribute =]. Center');\n\n  MT('paragraphJustified',\n      'p[attribute <>]. Justified');\n\n  MT('paragraphWithLeftIndent1em',\n      'p[attribute (]. Left');\n\n  MT('paragraphWithRightIndent1em',\n      'p[attribute )]. Right');\n\n  MT('paragraphWithLeftIndent2em',\n      'p[attribute ((]. Left');\n\n  MT('paragraphWithRightIndent2em',\n      'p[attribute ))]. Right');\n\n  MT('paragraphWithLeftIndent3emRightIndent2em',\n      'p[attribute ((())]. Right');\n\n  MT('divFormatting',\n      '[punctuation div. ][punctuation&strong *foo ]' +\n        '[punctuation&strong&em _bar_][punctuation&strong *]');\n\n  MT('phraseModifierAttributes',\n      'p[attribute (my-class)]. This is a paragraph that has a class and' +\n      ' this [em _][em&attribute (#special-phrase)][em emphasized phrase_]' +\n      ' has an id.');\n\n  MT('linkWithClass',\n      '[link \"(my-class). This is a link with class\":http://redcloth.org]');\n\n  /*\n   * Layouts\n   */\n\n  MT('paragraphLayouts',\n      'p. This is one paragraph.',\n      '',\n      'p. This is another.');\n\n  MT('div',\n      '[punctuation div. foo bar]');\n\n  MT('pre',\n      '[operator pre. Text]');\n\n  MT('bq.',\n      '[bracket bq. foo bar]',\n      '',\n      'Normal text.');\n\n  MT('footnote',\n      '[variable fn123. foo ][variable&strong *bar*]');\n\n  /*\n   * Spanning Layouts\n   */\n\n  MT('bq..ThenParagraph',\n      '[bracket bq.. foo bar]',\n      '',\n      '[bracket More quote.]',\n      'p. Normal Text');\n\n  MT('bq..ThenH1',\n      '[bracket bq.. foo bar]',\n      '',\n      '[bracket More quote.]',\n      '[header&header-1 h1. Header Text]');\n\n  MT('bc..ThenParagraph',\n      '[atom bc.. # Some ruby code]',\n      '[atom obj = {foo: :bar}]',\n      '[atom puts obj]',\n      '',\n      '[atom obj[[:love]] = \"*love*\"]',\n      '[atom puts obj.love.upcase]',\n      '',\n      'p. Normal text.');\n\n  MT('fn1..ThenParagraph',\n      '[variable fn1.. foo bar]',\n      '',\n      '[variable More.]',\n      'p. Normal Text');\n\n  MT('pre..ThenParagraph',\n      '[operator pre.. foo bar]',\n      '',\n      '[operator More.]',\n      'p. Normal Text');\n\n  /*\n   * Tables\n   */\n\n  MT('table',\n      '[variable-3&operator |_. name |_. age|]',\n      '[variable-3 |][variable-3&strong *Walter*][variable-3 |   5  |]',\n      '[variable-3 |Florence|   6  |]',\n      '',\n      'p. Normal text.');\n\n  MT('tableWithAttributes',\n      '[variable-3&operator |_. name |_. age|]',\n      '[variable-3 |][variable-3&attribute /2.][variable-3  Jim |]',\n      '[variable-3 |][variable-3&attribute \\\\2{color: red}.][variable-3  Sam |]');\n\n  /*\n   * HTML\n   */\n\n  MT('html',\n      '[comment <div id=\"wrapper\">]',\n      '[comment <section id=\"introduction\">]',\n      '',\n      '[header&header-1 h1. Welcome]',\n      '',\n      '[variable-2 * Item one]',\n      '[variable-2 * Item two]',\n      '',\n      '[comment <a href=\"http://example.com\">Example</a>]',\n      '',\n      '[comment </section>]',\n      '[comment </div>]');\n\n  MT('inlineHtml',\n      'I can use HTML directly in my [comment <span class=\"youbetcha\">Textile</span>].');\n\n  /*\n   * No-Textile\n   */\n\n  MT('notextile',\n    '[string-2 notextile. *No* formatting]');\n\n  MT('notextileInline',\n      'Use [string-2 ==*asterisks*==] for [strong *strong*] text.');\n\n  MT('notextileWithPre',\n      '[operator pre. *No* formatting]');\n\n  MT('notextileWithSpanningPre',\n      '[operator pre.. *No* formatting]',\n      '',\n      '[operator *No* formatting]');\n\n  /* Only toggling phrases between non-word chars. */\n\n  MT('phrase-in-word',\n     'foo_bar_baz');\n\n  MT('phrase-non-word',\n     '[negative -x-] aaa-bbb ccc-ddd [negative -eee-] fff [negative -ggg-]');\n\n  MT('phrase-lone-dash',\n     'foo - bar - baz');\n})();\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/textile/textile.js",
    "content": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n(function(mod) {\n  if (typeof exports == \"object\" && typeof module == \"object\") { // CommonJS\n    mod(require(\"../../lib/codemirror\"));\n  } else if (typeof define == \"function\" && define.amd) { // AMD\n    define([\"../../lib/codemirror\"], mod);\n  } else { // Plain browser env\n    mod(CodeMirror);\n  }\n})(function(CodeMirror) {\n  \"use strict\";\n\n  var TOKEN_STYLES = {\n    addition: \"positive\",\n    attributes: \"attribute\",\n    bold: \"strong\",\n    cite: \"keyword\",\n    code: \"atom\",\n    definitionList: \"number\",\n    deletion: \"negative\",\n    div: \"punctuation\",\n    em: \"em\",\n    footnote: \"variable\",\n    footCite: \"qualifier\",\n    header: \"header\",\n    html: \"comment\",\n    image: \"string\",\n    italic: \"em\",\n    link: \"link\",\n    linkDefinition: \"link\",\n    list1: \"variable-2\",\n    list2: \"variable-3\",\n    list3: \"keyword\",\n    notextile: \"string-2\",\n    pre: \"operator\",\n    p: \"property\",\n    quote: \"bracket\",\n    span: \"quote\",\n    specialChar: \"tag\",\n    strong: \"strong\",\n    sub: \"builtin\",\n    sup: \"builtin\",\n    table: \"variable-3\",\n    tableHeading: \"operator\"\n  };\n\n  function startNewLine(stream, state) {\n    state.mode = Modes.newLayout;\n    state.tableHeading = false;\n\n    if (state.layoutType === \"definitionList\" && state.spanningLayout &&\n        stream.match(RE(\"definitionListEnd\"), false))\n      state.spanningLayout = false;\n  }\n\n  function handlePhraseModifier(stream, state, ch) {\n    if (ch === \"_\") {\n      if (stream.eat(\"_\"))\n        return togglePhraseModifier(stream, state, \"italic\", /__/, 2);\n      else\n        return togglePhraseModifier(stream, state, \"em\", /_/, 1);\n    }\n\n    if (ch === \"*\") {\n      if (stream.eat(\"*\")) {\n        return togglePhraseModifier(stream, state, \"bold\", /\\*\\*/, 2);\n      }\n      return togglePhraseModifier(stream, state, \"strong\", /\\*/, 1);\n    }\n\n    if (ch === \"[\") {\n      if (stream.match(/\\d+\\]/)) state.footCite = true;\n      return tokenStyles(state);\n    }\n\n    if (ch === \"(\") {\n      var spec = stream.match(/^(r|tm|c)\\)/);\n      if (spec)\n        return tokenStylesWith(state, TOKEN_STYLES.specialChar);\n    }\n\n    if (ch === \"<\" && stream.match(/(\\w+)[^>]+>[^<]+<\\/\\1>/))\n      return tokenStylesWith(state, TOKEN_STYLES.html);\n\n    if (ch === \"?\" && stream.eat(\"?\"))\n      return togglePhraseModifier(stream, state, \"cite\", /\\?\\?/, 2);\n\n    if (ch === \"=\" && stream.eat(\"=\"))\n      return togglePhraseModifier(stream, state, \"notextile\", /==/, 2);\n\n    if (ch === \"-\" && !stream.eat(\"-\"))\n      return togglePhraseModifier(stream, state, \"deletion\", /-/, 1);\n\n    if (ch === \"+\")\n      return togglePhraseModifier(stream, state, \"addition\", /\\+/, 1);\n\n    if (ch === \"~\")\n      return togglePhraseModifier(stream, state, \"sub\", /~/, 1);\n\n    if (ch === \"^\")\n      return togglePhraseModifier(stream, state, \"sup\", /\\^/, 1);\n\n    if (ch === \"%\")\n      return togglePhraseModifier(stream, state, \"span\", /%/, 1);\n\n    if (ch === \"@\")\n      return togglePhraseModifier(stream, state, \"code\", /@/, 1);\n\n    if (ch === \"!\") {\n      var type = togglePhraseModifier(stream, state, \"image\", /(?:\\([^\\)]+\\))?!/, 1);\n      stream.match(/^:\\S+/); // optional Url portion\n      return type;\n    }\n    return tokenStyles(state);\n  }\n\n  function togglePhraseModifier(stream, state, phraseModifier, closeRE, openSize) {\n    var charBefore = stream.pos > openSize ? stream.string.charAt(stream.pos - openSize - 1) : null;\n    var charAfter = stream.peek();\n    if (state[phraseModifier]) {\n      if ((!charAfter || /\\W/.test(charAfter)) && charBefore && /\\S/.test(charBefore)) {\n        var type = tokenStyles(state);\n        state[phraseModifier] = false;\n        return type;\n      }\n    } else if ((!charBefore || /\\W/.test(charBefore)) && charAfter && /\\S/.test(charAfter) &&\n               stream.match(new RegExp(\"^.*\\\\S\" + closeRE.source + \"(?:\\\\W|$)\"), false)) {\n      state[phraseModifier] = true;\n      state.mode = Modes.attributes;\n    }\n    return tokenStyles(state);\n  };\n\n  function tokenStyles(state) {\n    var disabled = textileDisabled(state);\n    if (disabled) return disabled;\n\n    var styles = [];\n    if (state.layoutType) styles.push(TOKEN_STYLES[state.layoutType]);\n\n    styles = styles.concat(activeStyles(\n      state, \"addition\", \"bold\", \"cite\", \"code\", \"deletion\", \"em\", \"footCite\",\n      \"image\", \"italic\", \"link\", \"span\", \"strong\", \"sub\", \"sup\", \"table\", \"tableHeading\"));\n\n    if (state.layoutType === \"header\")\n      styles.push(TOKEN_STYLES.header + \"-\" + state.header);\n\n    return styles.length ? styles.join(\" \") : null;\n  }\n\n  function textileDisabled(state) {\n    var type = state.layoutType;\n\n    switch(type) {\n    case \"notextile\":\n    case \"code\":\n    case \"pre\":\n      return TOKEN_STYLES[type];\n    default:\n      if (state.notextile)\n        return TOKEN_STYLES.notextile + (type ? (\" \" + TOKEN_STYLES[type]) : \"\");\n      return null;\n    }\n  }\n\n  function tokenStylesWith(state, extraStyles) {\n    var disabled = textileDisabled(state);\n    if (disabled) return disabled;\n\n    var type = tokenStyles(state);\n    if (extraStyles)\n      return type ? (type + \" \" + extraStyles) : extraStyles;\n    else\n      return type;\n  }\n\n  function activeStyles(state) {\n    var styles = [];\n    for (var i = 1; i < arguments.length; ++i) {\n      if (state[arguments[i]])\n        styles.push(TOKEN_STYLES[arguments[i]]);\n    }\n    return styles;\n  }\n\n  function blankLine(state) {\n    var spanningLayout = state.spanningLayout, type = state.layoutType;\n\n    for (var key in state) if (state.hasOwnProperty(key))\n      delete state[key];\n\n    state.mode = Modes.newLayout;\n    if (spanningLayout) {\n      state.layoutType = type;\n      state.spanningLayout = true;\n    }\n  }\n\n  var REs = {\n    cache: {},\n    single: {\n      bc: \"bc\",\n      bq: \"bq\",\n      definitionList: /- [^(?::=)]+:=+/,\n      definitionListEnd: /.*=:\\s*$/,\n      div: \"div\",\n      drawTable: /\\|.*\\|/,\n      foot: /fn\\d+/,\n      header: /h[1-6]/,\n      html: /\\s*<(?:\\/)?(\\w+)(?:[^>]+)?>(?:[^<]+<\\/\\1>)?/,\n      link: /[^\"]+\":\\S/,\n      linkDefinition: /\\[[^\\s\\]]+\\]\\S+/,\n      list: /(?:#+|\\*+)/,\n      notextile: \"notextile\",\n      para: \"p\",\n      pre: \"pre\",\n      table: \"table\",\n      tableCellAttributes: /[\\/\\\\]\\d+/,\n      tableHeading: /\\|_\\./,\n      tableText: /[^\"_\\*\\[\\(\\?\\+~\\^%@|-]+/,\n      text: /[^!\"_=\\*\\[\\(<\\?\\+~\\^%@-]+/\n    },\n    attributes: {\n      align: /(?:<>|<|>|=)/,\n      selector: /\\([^\\(][^\\)]+\\)/,\n      lang: /\\[[^\\[\\]]+\\]/,\n      pad: /(?:\\(+|\\)+){1,2}/,\n      css: /\\{[^\\}]+\\}/\n    },\n    createRe: function(name) {\n      switch (name) {\n      case \"drawTable\":\n        return REs.makeRe(\"^\", REs.single.drawTable, \"$\");\n      case \"html\":\n        return REs.makeRe(\"^\", REs.single.html, \"(?:\", REs.single.html, \")*\", \"$\");\n      case \"linkDefinition\":\n        return REs.makeRe(\"^\", REs.single.linkDefinition, \"$\");\n      case \"listLayout\":\n        return REs.makeRe(\"^\", REs.single.list, RE(\"allAttributes\"), \"*\\\\s+\");\n      case \"tableCellAttributes\":\n        return REs.makeRe(\"^\", REs.choiceRe(REs.single.tableCellAttributes,\n                                            RE(\"allAttributes\")), \"+\\\\.\");\n      case \"type\":\n        return REs.makeRe(\"^\", RE(\"allTypes\"));\n      case \"typeLayout\":\n        return REs.makeRe(\"^\", RE(\"allTypes\"), RE(\"allAttributes\"),\n                          \"*\\\\.\\\\.?\", \"(\\\\s+|$)\");\n      case \"attributes\":\n        return REs.makeRe(\"^\", RE(\"allAttributes\"), \"+\");\n\n      case \"allTypes\":\n        return REs.choiceRe(REs.single.div, REs.single.foot,\n                            REs.single.header, REs.single.bc, REs.single.bq,\n                            REs.single.notextile, REs.single.pre, REs.single.table,\n                            REs.single.para);\n\n      case \"allAttributes\":\n        return REs.choiceRe(REs.attributes.selector, REs.attributes.css,\n                            REs.attributes.lang, REs.attributes.align, REs.attributes.pad);\n\n      default:\n        return REs.makeRe(\"^\", REs.single[name]);\n      }\n    },\n    makeRe: function() {\n      var pattern = \"\";\n      for (var i = 0; i < arguments.length; ++i) {\n        var arg = arguments[i];\n        pattern += (typeof arg === \"string\") ? arg : arg.source;\n      }\n      return new RegExp(pattern);\n    },\n    choiceRe: function() {\n      var parts = [arguments[0]];\n      for (var i = 1; i < arguments.length; ++i) {\n        parts[i * 2 - 1] = \"|\";\n        parts[i * 2] = arguments[i];\n      }\n\n      parts.unshift(\"(?:\");\n      parts.push(\")\");\n      return REs.makeRe.apply(null, parts);\n    }\n  };\n\n  function RE(name) {\n    return (REs.cache[name] || (REs.cache[name] = REs.createRe(name)));\n  }\n\n  var Modes = {\n    newLayout: function(stream, state) {\n      if (stream.match(RE(\"typeLayout\"), false)) {\n        state.spanningLayout = false;\n        return (state.mode = Modes.blockType)(stream, state);\n      }\n      var newMode;\n      if (!textileDisabled(state)) {\n        if (stream.match(RE(\"listLayout\"), false))\n          newMode = Modes.list;\n        else if (stream.match(RE(\"drawTable\"), false))\n          newMode = Modes.table;\n        else if (stream.match(RE(\"linkDefinition\"), false))\n          newMode = Modes.linkDefinition;\n        else if (stream.match(RE(\"definitionList\")))\n          newMode = Modes.definitionList;\n        else if (stream.match(RE(\"html\"), false))\n          newMode = Modes.html;\n      }\n      return (state.mode = (newMode || Modes.text))(stream, state);\n    },\n\n    blockType: function(stream, state) {\n      var match, type;\n      state.layoutType = null;\n\n      if (match = stream.match(RE(\"type\")))\n        type = match[0];\n      else\n        return (state.mode = Modes.text)(stream, state);\n\n      if (match = type.match(RE(\"header\"))) {\n        state.layoutType = \"header\";\n        state.header = parseInt(match[0][1]);\n      } else if (type.match(RE(\"bq\"))) {\n        state.layoutType = \"quote\";\n      } else if (type.match(RE(\"bc\"))) {\n        state.layoutType = \"code\";\n      } else if (type.match(RE(\"foot\"))) {\n        state.layoutType = \"footnote\";\n      } else if (type.match(RE(\"notextile\"))) {\n        state.layoutType = \"notextile\";\n      } else if (type.match(RE(\"pre\"))) {\n        state.layoutType = \"pre\";\n      } else if (type.match(RE(\"div\"))) {\n        state.layoutType = \"div\";\n      } else if (type.match(RE(\"table\"))) {\n        state.layoutType = \"table\";\n      }\n\n      state.mode = Modes.attributes;\n      return tokenStyles(state);\n    },\n\n    text: function(stream, state) {\n      if (stream.match(RE(\"text\"))) return tokenStyles(state);\n\n      var ch = stream.next();\n      if (ch === '\"')\n        return (state.mode = Modes.link)(stream, state);\n      return handlePhraseModifier(stream, state, ch);\n    },\n\n    attributes: function(stream, state) {\n      state.mode = Modes.layoutLength;\n\n      if (stream.match(RE(\"attributes\")))\n        return tokenStylesWith(state, TOKEN_STYLES.attributes);\n      else\n        return tokenStyles(state);\n    },\n\n    layoutLength: function(stream, state) {\n      if (stream.eat(\".\") && stream.eat(\".\"))\n        state.spanningLayout = true;\n\n      state.mode = Modes.text;\n      return tokenStyles(state);\n    },\n\n    list: function(stream, state) {\n      var match = stream.match(RE(\"list\"));\n      state.listDepth = match[0].length;\n      var listMod = (state.listDepth - 1) % 3;\n      if (!listMod)\n        state.layoutType = \"list1\";\n      else if (listMod === 1)\n        state.layoutType = \"list2\";\n      else\n        state.layoutType = \"list3\";\n\n      state.mode = Modes.attributes;\n      return tokenStyles(state);\n    },\n\n    link: function(stream, state) {\n      state.mode = Modes.text;\n      if (stream.match(RE(\"link\"))) {\n        stream.match(/\\S+/);\n        return tokenStylesWith(state, TOKEN_STYLES.link);\n      }\n      return tokenStyles(state);\n    },\n\n    linkDefinition: function(stream, state) {\n      stream.skipToEnd();\n      return tokenStylesWith(state, TOKEN_STYLES.linkDefinition);\n    },\n\n    definitionList: function(stream, state) {\n      stream.match(RE(\"definitionList\"));\n\n      state.layoutType = \"definitionList\";\n\n      if (stream.match(/\\s*$/))\n        state.spanningLayout = true;\n      else\n        state.mode = Modes.attributes;\n\n      return tokenStyles(state);\n    },\n\n    html: function(stream, state) {\n      stream.skipToEnd();\n      return tokenStylesWith(state, TOKEN_STYLES.html);\n    },\n\n    table: function(stream, state) {\n      state.layoutType = \"table\";\n      return (state.mode = Modes.tableCell)(stream, state);\n    },\n\n    tableCell: function(stream, state) {\n      if (stream.match(RE(\"tableHeading\")))\n        state.tableHeading = true;\n      else\n        stream.eat(\"|\");\n\n      state.mode = Modes.tableCellAttributes;\n      return tokenStyles(state);\n    },\n\n    tableCellAttributes: function(stream, state) {\n      state.mode = Modes.tableText;\n\n      if (stream.match(RE(\"tableCellAttributes\")))\n        return tokenStylesWith(state, TOKEN_STYLES.attributes);\n      else\n        return tokenStyles(state);\n    },\n\n    tableText: function(stream, state) {\n      if (stream.match(RE(\"tableText\")))\n        return tokenStyles(state);\n\n      if (stream.peek() === \"|\") { // end of cell\n        state.mode = Modes.tableCell;\n        return tokenStyles(state);\n      }\n      return handlePhraseModifier(stream, state, stream.next());\n    }\n  };\n\n  CodeMirror.defineMode(\"textile\", function() {\n    return {\n      startState: function() {\n        return { mode: Modes.newLayout };\n      },\n      token: function(stream, state) {\n        if (stream.sol()) startNewLine(stream, state);\n        return state.mode(stream, state);\n      },\n      blankLine: blankLine\n    };\n  });\n\n  CodeMirror.defineMIME(\"text/x-textile\", \"textile\");\n});\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/tiddlywiki/index.html",
    "content": "<!doctype html>\n\n<title>CodeMirror: TiddlyWiki mode</title>\n<meta charset=\"utf-8\"/>\n<link rel=stylesheet href=\"../../doc/docs.css\">\n\n<link rel=\"stylesheet\" href=\"../../lib/codemirror.css\">\n<link rel=\"stylesheet\" href=\"tiddlywiki.css\">\n<script src=\"../../lib/codemirror.js\"></script>\n<script src=\"../../addon/edit/matchbrackets.js\"></script>\n<script src=\"tiddlywiki.js\"></script>\n<style type=\"text/css\">.CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}</style>\n<div id=nav>\n  <a href=\"http://codemirror.net\"><h1>CodeMirror</h1><img id=logo src=\"../../doc/logo.png\"></a>\n\n  <ul>\n    <li><a href=\"../../index.html\">Home</a>\n    <li><a href=\"../../doc/manual.html\">Manual</a>\n    <li><a href=\"https://github.com/codemirror/codemirror\">Code</a>\n  </ul>\n  <ul>\n    <li><a href=\"../index.html\">Language modes</a>\n    <li><a class=active href=\"#\">TiddlyWiki</a>\n  </ul>\n</div>\n\n<article>\n<h2>TiddlyWiki mode</h2>\n\n\n<div><textarea id=\"code\" name=\"code\">\n!TiddlyWiki Formatting\n* Rendered versions can be found at: http://www.tiddlywiki.com/#Reference\n\n|!Option            | !Syntax            |\n|bold font          | ''bold''           |\n|italic type        | //italic//         |\n|underlined text    | __underlined__     |\n|strikethrough text | --strikethrough--  |\n|superscript text   | super^^script^^    |\n|subscript text     | sub~~script~~      |\n|highlighted text   | @@highlighted@@    |\n|preformatted text  | {{{preformatted}}} |\n\n!Block Elements\n<<<\n!Heading 1\n\n!!Heading 2\n\n!!!Heading 3\n\n!!!!Heading 4\n\n!!!!!Heading 5\n<<<\n\n!!Lists\n<<<\n* unordered list, level 1\n** unordered list, level 2\n*** unordered list, level 3\n\n# ordered list, level 1\n## ordered list, level 2\n### unordered list, level 3\n\n; definition list, term\n: definition list, description\n<<<\n\n!!Blockquotes\n<<<\n> blockquote, level 1\n>> blockquote, level 2\n>>> blockquote, level 3\n\n> blockquote\n<<<\n\n!!Preformatted Text\n<<<\n{{{\npreformatted (e.g. code)\n}}}\n<<<\n\n!!Code Sections\n<<<\n{{{\nText style code\n}}}\n\n//{{{\nJS styled code. TiddlyWiki mixed mode should support highlighter switching in the future.\n//}}}\n\n<!--{{{-->\nXML styled code. TiddlyWiki mixed mode should support highlighter switching in the future.\n<!--}}}-->\n<<<\n\n!!Tables\n<<<\n|CssClass|k\n|!heading column 1|!heading column 2|\n|row 1, column 1|row 1, column 2|\n|row 2, column 1|row 2, column 2|\n|>|COLSPAN|\n|ROWSPAN| ... |\n|~| ... |\n|CssProperty:value;...| ... |\n|caption|c\n\n''Annotation:''\n* The {{{>}}} marker creates a \"colspan\", causing the current cell to merge with the one to the right.\n* The {{{~}}} marker creates a \"rowspan\", causing the current cell to merge with the one above.\n<<<\n!!Images /% TODO %/\ncf. [[TiddlyWiki.com|http://www.tiddlywiki.com/#EmbeddedImages]]\n\n!Hyperlinks\n* [[WikiWords|WikiWord]] are automatically transformed to hyperlinks to the respective tiddler\n** the automatic transformation can be suppressed by preceding the respective WikiWord with a tilde ({{{~}}}): {{{~WikiWord}}}\n* [[PrettyLinks]] are enclosed in square brackets and contain the desired tiddler name: {{{[[tiddler name]]}}}\n** optionally, a custom title or description can be added, separated by a pipe character ({{{|}}}): {{{[[title|target]]}}}<br>'''N.B.:''' In this case, the target can also be any website (i.e. URL).\n\n!Custom Styling\n* {{{@@CssProperty:value;CssProperty:value;...@@}}}<br>''N.B.:'' CSS color definitions should use lowercase letters to prevent the inadvertent creation of WikiWords.\n* <html><code>{{customCssClass{...}}}</code></html>\n* raw HTML can be inserted by enclosing the respective code in HTML tags: {{{<html> ... </html>}}}\n\n!Special Markers\n* {{{<br>}}} forces a manual line break\n* {{{----}}} creates a horizontal ruler\n* [[HTML entities|http://www.tiddlywiki.com/#HtmlEntities]]\n* [[HTML entities local|HtmlEntities]]\n* {{{<<macroName>>}}} calls the respective [[macro|Macros]]\n* To hide text within a tiddler so that it is not displayed, it can be wrapped in {{{/%}}} and {{{%/}}}.<br/>This can be a useful trick for hiding drafts or annotating complex markup.\n* To prevent wiki markup from taking effect for a particular section, that section can be enclosed in three double quotes: e.g. {{{\"\"\"WikiWord\"\"\"}}}.\n</textarea></div>\n\n    <script>\n      var editor = CodeMirror.fromTextArea(document.getElementById(\"code\"), {\n        mode: 'tiddlywiki',      \n        lineNumbers: true,\n        matchBrackets: true\n      });\n    </script>\n\n    <p>TiddlyWiki mode supports a single configuration.</p>\n\n    <p><strong>MIME types defined:</strong> <code>text/x-tiddlywiki</code>.</p>\n  </article>\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/tiddlywiki/tiddlywiki.css",
    "content": "span.cm-underlined {\n  text-decoration: underline;\n}\nspan.cm-strikethrough {\n  text-decoration: line-through;\n}\nspan.cm-brace {\n  color: #170;\n  font-weight: bold;\n}\nspan.cm-table {\n  color: blue;\n  font-weight: bold;\n}\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/tiddlywiki/tiddlywiki.js",
    "content": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n/***\n    |''Name''|tiddlywiki.js|\n    |''Description''|Enables TiddlyWikiy syntax highlighting using CodeMirror|\n    |''Author''|PMario|\n    |''Version''|0.1.7|\n    |''Status''|''stable''|\n    |''Source''|[[GitHub|https://github.com/pmario/CodeMirror2/blob/tw-syntax/mode/tiddlywiki]]|\n    |''Documentation''|http://codemirror.tiddlyspace.com/|\n    |''License''|[[MIT License|http://www.opensource.org/licenses/mit-license.php]]|\n    |''CoreVersion''|2.5.0|\n    |''Requires''|codemirror.js|\n    |''Keywords''|syntax highlighting color code mirror codemirror|\n    ! Info\n    CoreVersion parameter is needed for TiddlyWiki only!\n***/\n//{{{\n\n(function(mod) {\n  if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n    mod(require(\"../../lib/codemirror\"));\n  else if (typeof define == \"function\" && define.amd) // AMD\n    define([\"../../lib/codemirror\"], mod);\n  else // Plain browser env\n    mod(CodeMirror);\n})(function(CodeMirror) {\n\"use strict\";\n\nCodeMirror.defineMode(\"tiddlywiki\", function () {\n  // Tokenizer\n  var textwords = {};\n\n  var keywords = function () {\n    function kw(type) {\n      return { type: type, style: \"macro\"};\n    }\n    return {\n      \"allTags\": kw('allTags'), \"closeAll\": kw('closeAll'), \"list\": kw('list'),\n      \"newJournal\": kw('newJournal'), \"newTiddler\": kw('newTiddler'),\n      \"permaview\": kw('permaview'), \"saveChanges\": kw('saveChanges'),\n      \"search\": kw('search'), \"slider\": kw('slider'),   \"tabs\": kw('tabs'),\n      \"tag\": kw('tag'), \"tagging\": kw('tagging'),       \"tags\": kw('tags'),\n      \"tiddler\": kw('tiddler'), \"timeline\": kw('timeline'),\n      \"today\": kw('today'), \"version\": kw('version'),   \"option\": kw('option'),\n\n      \"with\": kw('with'),\n      \"filter\": kw('filter')\n    };\n  }();\n\n  var isSpaceName = /[\\w_\\-]/i,\n  reHR = /^\\-\\-\\-\\-+$/,                                 // <hr>\n  reWikiCommentStart = /^\\/\\*\\*\\*$/,            // /***\n  reWikiCommentStop = /^\\*\\*\\*\\/$/,             // ***/\n  reBlockQuote = /^<<<$/,\n\n  reJsCodeStart = /^\\/\\/\\{\\{\\{$/,                       // //{{{ js block start\n  reJsCodeStop = /^\\/\\/\\}\\}\\}$/,                        // //}}} js stop\n  reXmlCodeStart = /^<!--\\{\\{\\{-->$/,           // xml block start\n  reXmlCodeStop = /^<!--\\}\\}\\}-->$/,            // xml stop\n\n  reCodeBlockStart = /^\\{\\{\\{$/,                        // {{{ TW text div block start\n  reCodeBlockStop = /^\\}\\}\\}$/,                 // }}} TW text stop\n\n  reUntilCodeStop = /.*?\\}\\}\\}/;\n\n  function chain(stream, state, f) {\n    state.tokenize = f;\n    return f(stream, state);\n  }\n\n  // Used as scratch variables to communicate multiple values without\n  // consing up tons of objects.\n  var type, content;\n\n  function ret(tp, style, cont) {\n    type = tp;\n    content = cont;\n    return style;\n  }\n\n  function jsTokenBase(stream, state) {\n    var sol = stream.sol(), ch;\n\n    state.block = false;        // indicates the start of a code block.\n\n    ch = stream.peek();         // don't eat, to make matching simpler\n\n    // check start of  blocks\n    if (sol && /[<\\/\\*{}\\-]/.test(ch)) {\n      if (stream.match(reCodeBlockStart)) {\n        state.block = true;\n        return chain(stream, state, twTokenCode);\n      }\n      if (stream.match(reBlockQuote)) {\n        return ret('quote', 'quote');\n      }\n      if (stream.match(reWikiCommentStart) || stream.match(reWikiCommentStop)) {\n        return ret('code', 'comment');\n      }\n      if (stream.match(reJsCodeStart) || stream.match(reJsCodeStop) || stream.match(reXmlCodeStart) || stream.match(reXmlCodeStop)) {\n        return ret('code', 'comment');\n      }\n      if (stream.match(reHR)) {\n        return ret('hr', 'hr');\n      }\n    } // sol\n    ch = stream.next();\n\n    if (sol && /[\\/\\*!#;:>|]/.test(ch)) {\n      if (ch == \"!\") { // tw header\n        stream.skipToEnd();\n        return ret(\"header\", \"header\");\n      }\n      if (ch == \"*\") { // tw list\n        stream.eatWhile('*');\n        return ret(\"list\", \"comment\");\n      }\n      if (ch == \"#\") { // tw numbered list\n        stream.eatWhile('#');\n        return ret(\"list\", \"comment\");\n      }\n      if (ch == \";\") { // definition list, term\n        stream.eatWhile(';');\n        return ret(\"list\", \"comment\");\n      }\n      if (ch == \":\") { // definition list, description\n        stream.eatWhile(':');\n        return ret(\"list\", \"comment\");\n      }\n      if (ch == \">\") { // single line quote\n        stream.eatWhile(\">\");\n        return ret(\"quote\", \"quote\");\n      }\n      if (ch == '|') {\n        return ret('table', 'header');\n      }\n    }\n\n    if (ch == '{' && stream.match(/\\{\\{/)) {\n      return chain(stream, state, twTokenCode);\n    }\n\n    // rudimentary html:// file:// link matching. TW knows much more ...\n    if (/[hf]/i.test(ch)) {\n      if (/[ti]/i.test(stream.peek()) && stream.match(/\\b(ttps?|tp|ile):\\/\\/[\\-A-Z0-9+&@#\\/%?=~_|$!:,.;]*[A-Z0-9+&@#\\/%=~_|$]/i)) {\n        return ret(\"link\", \"link\");\n      }\n    }\n    // just a little string indicator, don't want to have the whole string covered\n    if (ch == '\"') {\n      return ret('string', 'string');\n    }\n    if (ch == '~') {    // _no_ CamelCase indicator should be bold\n      return ret('text', 'brace');\n    }\n    if (/[\\[\\]]/.test(ch)) { // check for [[..]]\n      if (stream.peek() == ch) {\n        stream.next();\n        return ret('brace', 'brace');\n      }\n    }\n    if (ch == \"@\") {    // check for space link. TODO fix @@...@@ highlighting\n      stream.eatWhile(isSpaceName);\n      return ret(\"link\", \"link\");\n    }\n    if (/\\d/.test(ch)) {        // numbers\n      stream.eatWhile(/\\d/);\n      return ret(\"number\", \"number\");\n    }\n    if (ch == \"/\") { // tw invisible comment\n      if (stream.eat(\"%\")) {\n        return chain(stream, state, twTokenComment);\n      }\n      else if (stream.eat(\"/\")) { //\n        return chain(stream, state, twTokenEm);\n      }\n    }\n    if (ch == \"_\") { // tw underline\n      if (stream.eat(\"_\")) {\n        return chain(stream, state, twTokenUnderline);\n      }\n    }\n    // strikethrough and mdash handling\n    if (ch == \"-\") {\n      if (stream.eat(\"-\")) {\n        // if strikethrough looks ugly, change CSS.\n        if (stream.peek() != ' ')\n          return chain(stream, state, twTokenStrike);\n        // mdash\n        if (stream.peek() == ' ')\n          return ret('text', 'brace');\n      }\n    }\n    if (ch == \"'\") { // tw bold\n      if (stream.eat(\"'\")) {\n        return chain(stream, state, twTokenStrong);\n      }\n    }\n    if (ch == \"<\") { // tw macro\n      if (stream.eat(\"<\")) {\n        return chain(stream, state, twTokenMacro);\n      }\n    }\n    else {\n      return ret(ch);\n    }\n\n    // core macro handling\n    stream.eatWhile(/[\\w\\$_]/);\n    var word = stream.current(),\n    known = textwords.propertyIsEnumerable(word) && textwords[word];\n\n    return known ? ret(known.type, known.style, word) : ret(\"text\", null, word);\n\n  } // jsTokenBase()\n\n  // tw invisible comment\n  function twTokenComment(stream, state) {\n    var maybeEnd = false,\n    ch;\n    while (ch = stream.next()) {\n      if (ch == \"/\" && maybeEnd) {\n        state.tokenize = jsTokenBase;\n        break;\n      }\n      maybeEnd = (ch == \"%\");\n    }\n    return ret(\"comment\", \"comment\");\n  }\n\n  // tw strong / bold\n  function twTokenStrong(stream, state) {\n    var maybeEnd = false,\n    ch;\n    while (ch = stream.next()) {\n      if (ch == \"'\" && maybeEnd) {\n        state.tokenize = jsTokenBase;\n        break;\n      }\n      maybeEnd = (ch == \"'\");\n    }\n    return ret(\"text\", \"strong\");\n  }\n\n  // tw code\n  function twTokenCode(stream, state) {\n    var ch, sb = state.block;\n\n    if (sb && stream.current()) {\n      return ret(\"code\", \"comment\");\n    }\n\n    if (!sb && stream.match(reUntilCodeStop)) {\n      state.tokenize = jsTokenBase;\n      return ret(\"code\", \"comment\");\n    }\n\n    if (sb && stream.sol() && stream.match(reCodeBlockStop)) {\n      state.tokenize = jsTokenBase;\n      return ret(\"code\", \"comment\");\n    }\n\n    ch = stream.next();\n    return (sb) ? ret(\"code\", \"comment\") : ret(\"code\", \"comment\");\n  }\n\n  // tw em / italic\n  function twTokenEm(stream, state) {\n    var maybeEnd = false,\n    ch;\n    while (ch = stream.next()) {\n      if (ch == \"/\" && maybeEnd) {\n        state.tokenize = jsTokenBase;\n        break;\n      }\n      maybeEnd = (ch == \"/\");\n    }\n    return ret(\"text\", \"em\");\n  }\n\n  // tw underlined text\n  function twTokenUnderline(stream, state) {\n    var maybeEnd = false,\n    ch;\n    while (ch = stream.next()) {\n      if (ch == \"_\" && maybeEnd) {\n        state.tokenize = jsTokenBase;\n        break;\n      }\n      maybeEnd = (ch == \"_\");\n    }\n    return ret(\"text\", \"underlined\");\n  }\n\n  // tw strike through text looks ugly\n  // change CSS if needed\n  function twTokenStrike(stream, state) {\n    var maybeEnd = false, ch;\n\n    while (ch = stream.next()) {\n      if (ch == \"-\" && maybeEnd) {\n        state.tokenize = jsTokenBase;\n        break;\n      }\n      maybeEnd = (ch == \"-\");\n    }\n    return ret(\"text\", \"strikethrough\");\n  }\n\n  // macro\n  function twTokenMacro(stream, state) {\n    var ch, word, known;\n\n    if (stream.current() == '<<') {\n      return ret('brace', 'macro');\n    }\n\n    ch = stream.next();\n    if (!ch) {\n      state.tokenize = jsTokenBase;\n      return ret(ch);\n    }\n    if (ch == \">\") {\n      if (stream.peek() == '>') {\n        stream.next();\n        state.tokenize = jsTokenBase;\n        return ret(\"brace\", \"macro\");\n      }\n    }\n\n    stream.eatWhile(/[\\w\\$_]/);\n    word = stream.current();\n    known = keywords.propertyIsEnumerable(word) && keywords[word];\n\n    if (known) {\n      return ret(known.type, known.style, word);\n    }\n    else {\n      return ret(\"macro\", null, word);\n    }\n  }\n\n  // Interface\n  return {\n    startState: function () {\n      return {\n        tokenize: jsTokenBase,\n        indented: 0,\n        level: 0\n      };\n    },\n\n    token: function (stream, state) {\n      if (stream.eatSpace()) return null;\n      var style = state.tokenize(stream, state);\n      return style;\n    },\n\n    electricChars: \"\"\n  };\n});\n\nCodeMirror.defineMIME(\"text/x-tiddlywiki\", \"tiddlywiki\");\n});\n\n//}}}\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/tiki/index.html",
    "content": "<!doctype html>\n\n<title>CodeMirror: Tiki wiki mode</title>\n<meta charset=\"utf-8\"/>\n<link rel=stylesheet href=\"../../doc/docs.css\">\n\n<link rel=\"stylesheet\" href=\"../../lib/codemirror.css\">\n<link rel=\"stylesheet\" href=\"tiki.css\">\n<script src=\"../../lib/codemirror.js\"></script>\n<script src=\"tiki.js\"></script>\n<style type=\"text/css\">.CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}</style>\n<div id=nav>\n  <a href=\"http://codemirror.net\"><h1>CodeMirror</h1><img id=logo src=\"../../doc/logo.png\"></a>\n\n  <ul>\n    <li><a href=\"../../index.html\">Home</a>\n    <li><a href=\"../../doc/manual.html\">Manual</a>\n    <li><a href=\"https://github.com/codemirror/codemirror\">Code</a>\n  </ul>\n  <ul>\n    <li><a href=\"../index.html\">Language modes</a>\n    <li><a class=active href=\"#\">Tiki wiki</a>\n  </ul>\n</div>\n\n<article>\n<h2>Tiki wiki mode</h2>\n\n\n<div><textarea id=\"code\" name=\"code\">\nHeadings\n!Header 1\n!!Header 2\n!!!Header 3\n!!!!Header 4\n!!!!!Header 5\n!!!!!!Header 6\n\nStyling\n-=titlebar=-\n^^ Box on multi\nlines\nof content^^\n__bold__\n''italic''\n===underline===\n::center::\n--Line Through--\n\nOperators\n~np~No parse~/np~\n\nLink\n[link|desc|nocache]\n\nWiki\n((Wiki))\n((Wiki|desc))\n((Wiki|desc|timeout))\n\nTable\n||row1 col1|row1 col2|row1 col3\nrow2 col1|row2 col2|row2 col3\nrow3 col1|row3 col2|row3 col3||\n\nLists:\n*bla\n**bla-1\n++continue-bla-1\n***bla-2\n++continue-bla-1\n*bla\n+continue-bla\n#bla\n** tra-la-la\n+continue-bla\n#bla\n\nPlugin (standard):\n{PLUGIN(attr=\"my attr\")}\nPlugin Body\n{PLUGIN}\n\nPlugin (inline):\n{plugin attr=\"my attr\"}\n</textarea></div>\n\n<script type=\"text/javascript\">\n\tvar editor = CodeMirror.fromTextArea(document.getElementById(\"code\"), {\n        mode: 'tiki',      \n        lineNumbers: true\n    });\n</script>\n\n</article>\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/tiki/tiki.css",
    "content": ".cm-tw-syntaxerror {\n\tcolor: #FFF;\n\tbackground-color: #900;\n}\n\n.cm-tw-deleted {\n\ttext-decoration: line-through;\n}\n\n.cm-tw-header5 {\n\tfont-weight: bold;\n}\n.cm-tw-listitem:first-child { /*Added first child to fix duplicate padding when highlighting*/\n\tpadding-left: 10px;\n}\n\n.cm-tw-box {\n\tborder-top-width: 0px ! important;\n\tborder-style: solid;\n\tborder-width: 1px;\n\tborder-color: inherit;\n}\n\n.cm-tw-underline {\n\ttext-decoration: underline;\n}"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/tiki/tiki.js",
    "content": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n(function(mod) {\n  if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n    mod(require(\"../../lib/codemirror\"));\n  else if (typeof define == \"function\" && define.amd) // AMD\n    define([\"../../lib/codemirror\"], mod);\n  else // Plain browser env\n    mod(CodeMirror);\n})(function(CodeMirror) {\n\"use strict\";\n\nCodeMirror.defineMode('tiki', function(config) {\n  function inBlock(style, terminator, returnTokenizer) {\n    return function(stream, state) {\n      while (!stream.eol()) {\n        if (stream.match(terminator)) {\n          state.tokenize = inText;\n          break;\n        }\n        stream.next();\n      }\n\n      if (returnTokenizer) state.tokenize = returnTokenizer;\n\n      return style;\n    };\n  }\n\n  function inLine(style) {\n    return function(stream, state) {\n      while(!stream.eol()) {\n        stream.next();\n      }\n      state.tokenize = inText;\n      return style;\n    };\n  }\n\n  function inText(stream, state) {\n    function chain(parser) {\n      state.tokenize = parser;\n      return parser(stream, state);\n    }\n\n    var sol = stream.sol();\n    var ch = stream.next();\n\n    //non start of line\n    switch (ch) { //switch is generally much faster than if, so it is used here\n    case \"{\": //plugin\n      stream.eat(\"/\");\n      stream.eatSpace();\n      var tagName = \"\";\n      var c;\n      while ((c = stream.eat(/[^\\s\\u00a0=\\\"\\'\\/?(}]/))) tagName += c;\n      state.tokenize = inPlugin;\n      return \"tag\";\n      break;\n    case \"_\": //bold\n      if (stream.eat(\"_\")) {\n        return chain(inBlock(\"strong\", \"__\", inText));\n      }\n      break;\n    case \"'\": //italics\n      if (stream.eat(\"'\")) {\n        // Italic text\n        return chain(inBlock(\"em\", \"''\", inText));\n      }\n      break;\n    case \"(\":// Wiki Link\n      if (stream.eat(\"(\")) {\n        return chain(inBlock(\"variable-2\", \"))\", inText));\n      }\n      break;\n    case \"[\":// Weblink\n      return chain(inBlock(\"variable-3\", \"]\", inText));\n      break;\n    case \"|\": //table\n      if (stream.eat(\"|\")) {\n        return chain(inBlock(\"comment\", \"||\"));\n      }\n      break;\n    case \"-\":\n      if (stream.eat(\"=\")) {//titleBar\n        return chain(inBlock(\"header string\", \"=-\", inText));\n      } else if (stream.eat(\"-\")) {//deleted\n        return chain(inBlock(\"error tw-deleted\", \"--\", inText));\n      }\n      break;\n    case \"=\": //underline\n      if (stream.match(\"==\")) {\n        return chain(inBlock(\"tw-underline\", \"===\", inText));\n      }\n      break;\n    case \":\":\n      if (stream.eat(\":\")) {\n        return chain(inBlock(\"comment\", \"::\"));\n      }\n      break;\n    case \"^\": //box\n      return chain(inBlock(\"tw-box\", \"^\"));\n      break;\n    case \"~\": //np\n      if (stream.match(\"np~\")) {\n        return chain(inBlock(\"meta\", \"~/np~\"));\n      }\n      break;\n    }\n\n    //start of line types\n    if (sol) {\n      switch (ch) {\n      case \"!\": //header at start of line\n        if (stream.match('!!!!!')) {\n          return chain(inLine(\"header string\"));\n        } else if (stream.match('!!!!')) {\n          return chain(inLine(\"header string\"));\n        } else if (stream.match('!!!')) {\n          return chain(inLine(\"header string\"));\n        } else if (stream.match('!!')) {\n          return chain(inLine(\"header string\"));\n        } else {\n          return chain(inLine(\"header string\"));\n        }\n        break;\n      case \"*\": //unordered list line item, or <li /> at start of line\n      case \"#\": //ordered list line item, or <li /> at start of line\n      case \"+\": //ordered list line item, or <li /> at start of line\n        return chain(inLine(\"tw-listitem bracket\"));\n        break;\n      }\n    }\n\n    //stream.eatWhile(/[&{]/); was eating up plugins, turned off to act less like html and more like tiki\n    return null;\n  }\n\n  var indentUnit = config.indentUnit;\n\n  // Return variables for tokenizers\n  var pluginName, type;\n  function inPlugin(stream, state) {\n    var ch = stream.next();\n    var peek = stream.peek();\n\n    if (ch == \"}\") {\n      state.tokenize = inText;\n      //type = ch == \")\" ? \"endPlugin\" : \"selfclosePlugin\"; inPlugin\n      return \"tag\";\n    } else if (ch == \"(\" || ch == \")\") {\n      return \"bracket\";\n    } else if (ch == \"=\") {\n      type = \"equals\";\n\n      if (peek == \">\") {\n        ch = stream.next();\n        peek = stream.peek();\n      }\n\n      //here we detect values directly after equal character with no quotes\n      if (!/[\\'\\\"]/.test(peek)) {\n        state.tokenize = inAttributeNoQuote();\n      }\n      //end detect values\n\n      return \"operator\";\n    } else if (/[\\'\\\"]/.test(ch)) {\n      state.tokenize = inAttribute(ch);\n      return state.tokenize(stream, state);\n    } else {\n      stream.eatWhile(/[^\\s\\u00a0=\\\"\\'\\/?]/);\n      return \"keyword\";\n    }\n  }\n\n  function inAttribute(quote) {\n    return function(stream, state) {\n      while (!stream.eol()) {\n        if (stream.next() == quote) {\n          state.tokenize = inPlugin;\n          break;\n        }\n      }\n      return \"string\";\n    };\n  }\n\n  function inAttributeNoQuote() {\n    return function(stream, state) {\n      while (!stream.eol()) {\n        var ch = stream.next();\n        var peek = stream.peek();\n        if (ch == \" \" || ch == \",\" || /[ )}]/.test(peek)) {\n      state.tokenize = inPlugin;\n      break;\n    }\n  }\n  return \"string\";\n};\n                     }\n\nvar curState, setStyle;\nfunction pass() {\n  for (var i = arguments.length - 1; i >= 0; i--) curState.cc.push(arguments[i]);\n}\n\nfunction cont() {\n  pass.apply(null, arguments);\n  return true;\n}\n\nfunction pushContext(pluginName, startOfLine) {\n  var noIndent = curState.context && curState.context.noIndent;\n  curState.context = {\n    prev: curState.context,\n    pluginName: pluginName,\n    indent: curState.indented,\n    startOfLine: startOfLine,\n    noIndent: noIndent\n  };\n}\n\nfunction popContext() {\n  if (curState.context) curState.context = curState.context.prev;\n}\n\nfunction element(type) {\n  if (type == \"openPlugin\") {curState.pluginName = pluginName; return cont(attributes, endplugin(curState.startOfLine));}\n  else if (type == \"closePlugin\") {\n    var err = false;\n    if (curState.context) {\n      err = curState.context.pluginName != pluginName;\n      popContext();\n    } else {\n      err = true;\n    }\n    if (err) setStyle = \"error\";\n    return cont(endcloseplugin(err));\n  }\n  else if (type == \"string\") {\n    if (!curState.context || curState.context.name != \"!cdata\") pushContext(\"!cdata\");\n    if (curState.tokenize == inText) popContext();\n    return cont();\n  }\n  else return cont();\n}\n\nfunction endplugin(startOfLine) {\n  return function(type) {\n    if (\n      type == \"selfclosePlugin\" ||\n        type == \"endPlugin\"\n    )\n      return cont();\n    if (type == \"endPlugin\") {pushContext(curState.pluginName, startOfLine); return cont();}\n    return cont();\n  };\n}\n\nfunction endcloseplugin(err) {\n  return function(type) {\n    if (err) setStyle = \"error\";\n    if (type == \"endPlugin\") return cont();\n    return pass();\n  };\n}\n\nfunction attributes(type) {\n  if (type == \"keyword\") {setStyle = \"attribute\"; return cont(attributes);}\n  if (type == \"equals\") return cont(attvalue, attributes);\n  return pass();\n}\nfunction attvalue(type) {\n  if (type == \"keyword\") {setStyle = \"string\"; return cont();}\n  if (type == \"string\") return cont(attvaluemaybe);\n  return pass();\n}\nfunction attvaluemaybe(type) {\n  if (type == \"string\") return cont(attvaluemaybe);\n  else return pass();\n}\nreturn {\n  startState: function() {\n    return {tokenize: inText, cc: [], indented: 0, startOfLine: true, pluginName: null, context: null};\n  },\n  token: function(stream, state) {\n    if (stream.sol()) {\n      state.startOfLine = true;\n      state.indented = stream.indentation();\n    }\n    if (stream.eatSpace()) return null;\n\n    setStyle = type = pluginName = null;\n    var style = state.tokenize(stream, state);\n    if ((style || type) && style != \"comment\") {\n      curState = state;\n      while (true) {\n        var comb = state.cc.pop() || element;\n        if (comb(type || style)) break;\n      }\n    }\n    state.startOfLine = false;\n    return setStyle || style;\n  },\n  indent: function(state, textAfter) {\n    var context = state.context;\n    if (context && context.noIndent) return 0;\n    if (context && /^{\\//.test(textAfter))\n        context = context.prev;\n        while (context && !context.startOfLine)\n          context = context.prev;\n        if (context) return context.indent + indentUnit;\n        else return 0;\n       },\n    electricChars: \"/\"\n  };\n});\n\nCodeMirror.defineMIME(\"text/tiki\", \"tiki\");\n\n});\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/toml/index.html",
    "content": "<!doctype html>\n\n<title>CodeMirror: TOML Mode</title>\n<meta charset=\"utf-8\"/>\n<link rel=stylesheet href=\"../../doc/docs.css\">\n\n<link rel=\"stylesheet\" href=\"../../lib/codemirror.css\">\n<script src=\"../../lib/codemirror.js\"></script>\n<script src=\"toml.js\"></script>\n<style type=\"text/css\">.CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}</style>\n<div id=nav>\n  <a href=\"http://codemirror.net\"><h1>CodeMirror</h1><img id=logo src=\"../../doc/logo.png\"></a>\n\n  <ul>\n    <li><a href=\"../../index.html\">Home</a>\n    <li><a href=\"../../doc/manual.html\">Manual</a>\n    <li><a href=\"https://github.com/codemirror/codemirror\">Code</a>\n  </ul>\n  <ul>\n    <li><a href=\"../index.html\">Language modes</a>\n    <li><a class=active href=\"#\">TOML Mode</a>\n  </ul>\n</div>\n\n<article>\n<h2>TOML Mode</h2>\n<form><textarea id=\"code\" name=\"code\">\n# This is a TOML document. Boom.\n\ntitle = \"TOML Example\"\n\n[owner]\nname = \"Tom Preston-Werner\"\norganization = \"GitHub\"\nbio = \"GitHub Cofounder &amp; CEO\\nLikes tater tots and beer.\"\ndob = 1979-05-27T07:32:00Z # First class dates? Why not?\n\n[database]\nserver = \"192.168.1.1\"\nports = [ 8001, 8001, 8002 ]\nconnection_max = 5000\nenabled = true\n\n[servers]\n\n  # You can indent as you please. Tabs or spaces. TOML don't care.\n  [servers.alpha]\n  ip = \"10.0.0.1\"\n  dc = \"eqdc10\"\n  \n  [servers.beta]\n  ip = \"10.0.0.2\"\n  dc = \"eqdc10\"\n  \n[clients]\ndata = [ [\"gamma\", \"delta\"], [1, 2] ]\n\n# Line breaks are OK when inside arrays\nhosts = [\n  \"alpha\",\n  \"omega\"\n]\n</textarea></form>\n    <script>\n      var editor = CodeMirror.fromTextArea(document.getElementById(\"code\"), {\n        mode: {name: \"toml\"},\n        lineNumbers: true\n      });\n    </script>\n    <h3>The TOML Mode</h3>\n      <p> Created by Forbes Lindesay.</p>\n    <p><strong>MIME type defined:</strong> <code>text/x-toml</code>.</p>\n  </article>\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/toml/toml.js",
    "content": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n(function(mod) {\n  if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n    mod(require(\"../../lib/codemirror\"));\n  else if (typeof define == \"function\" && define.amd) // AMD\n    define([\"../../lib/codemirror\"], mod);\n  else // Plain browser env\n    mod(CodeMirror);\n})(function(CodeMirror) {\n\"use strict\";\n\nCodeMirror.defineMode(\"toml\", function () {\n  return {\n    startState: function () {\n      return {\n        inString: false,\n        stringType: \"\",\n        lhs: true,\n        inArray: 0\n      };\n    },\n    token: function (stream, state) {\n      //check for state changes\n      if (!state.inString && ((stream.peek() == '\"') || (stream.peek() == \"'\"))) {\n        state.stringType = stream.peek();\n        stream.next(); // Skip quote\n        state.inString = true; // Update state\n      }\n      if (stream.sol() && state.inArray === 0) {\n        state.lhs = true;\n      }\n      //return state\n      if (state.inString) {\n        while (state.inString && !stream.eol()) {\n          if (stream.peek() === state.stringType) {\n            stream.next(); // Skip quote\n            state.inString = false; // Clear flag\n          } else if (stream.peek() === '\\\\') {\n            stream.next();\n            stream.next();\n          } else {\n            stream.match(/^.[^\\\\\\\"\\']*/);\n          }\n        }\n        return state.lhs ? \"property string\" : \"string\"; // Token style\n      } else if (state.inArray && stream.peek() === ']') {\n        stream.next();\n        state.inArray--;\n        return 'bracket';\n      } else if (state.lhs && stream.peek() === '[' && stream.skipTo(']')) {\n        stream.next();//skip closing ]\n        // array of objects has an extra open & close []\n        if (stream.peek() === ']') stream.next();\n        return \"atom\";\n      } else if (stream.peek() === \"#\") {\n        stream.skipToEnd();\n        return \"comment\";\n      } else if (stream.eatSpace()) {\n        return null;\n      } else if (state.lhs && stream.eatWhile(function (c) { return c != '=' && c != ' '; })) {\n        return \"property\";\n      } else if (state.lhs && stream.peek() === \"=\") {\n        stream.next();\n        state.lhs = false;\n        return null;\n      } else if (!state.lhs && stream.match(/^\\d\\d\\d\\d[\\d\\-\\:\\.T]*Z/)) {\n        return 'atom'; //date\n      } else if (!state.lhs && (stream.match('true') || stream.match('false'))) {\n        return 'atom';\n      } else if (!state.lhs && stream.peek() === '[') {\n        state.inArray++;\n        stream.next();\n        return 'bracket';\n      } else if (!state.lhs && stream.match(/^\\-?\\d+(?:\\.\\d+)?/)) {\n        return 'number';\n      } else if (!stream.eatSpace()) {\n        stream.next();\n      }\n      return null;\n    }\n  };\n});\n\nCodeMirror.defineMIME('text/x-toml', 'toml');\n\n});\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/tornado/index.html",
    "content": "<!doctype html>\n\n<title>CodeMirror: Tornado template mode</title>\n<meta charset=\"utf-8\"/>\n<link rel=stylesheet href=\"../../doc/docs.css\">\n\n<link rel=\"stylesheet\" href=\"../../lib/codemirror.css\">\n<script src=\"../../lib/codemirror.js\"></script>\n<script src=\"../../addon/mode/overlay.js\"></script>\n<script src=\"../xml/xml.js\"></script>\n<script src=\"../htmlmixed/htmlmixed.js\"></script>\n<script src=\"tornado.js\"></script>\n<style type=\"text/css\">.CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}</style>\n<div id=nav>\n  <a href=\"http://codemirror.net\"><h1>CodeMirror</h1><img id=logo src=\"../../doc/logo.png\"></a>\n\n  <ul>\n    <li><a href=\"../../index.html\">Home</a>\n    <li><a href=\"../../doc/manual.html\">Manual</a>\n    <li><a href=\"https://github.com/marijnh/codemirror\">Code</a>\n  </ul>\n  <ul>\n    <li><a href=\"../index.html\">Language modes</a>\n    <li><a class=active href=\"#\">Tornado</a>\n  </ul>\n</div>\n\n<article>\n<h2>Tornado template mode</h2>\n<form><textarea id=\"code\" name=\"code\">\n<!doctype html>\n<html>\n    <head>\n        <title>My Tornado web application</title>\n    </head>\n    <body>\n        <h1>\n            {{ title }}\n        </h1>\n        <ul class=\"my-list\">\n            {% for item in items %}\n                <li>{% item.name %}</li>\n            {% empty %}\n                <li>You have no items in your list.</li>\n            {% end %}\n        </ul>\n    </body>\n</html>\n</textarea></form>\n\n    <script>\n      var editor = CodeMirror.fromTextArea(document.getElementById(\"code\"), {\n        lineNumbers: true,\n        mode: \"tornado\",\n        indentUnit: 4,\n        indentWithTabs: true\n      });\n    </script>\n\n    <p>Mode for HTML with embedded Tornado template markup.</p>\n\n    <p><strong>MIME types defined:</strong> <code>text/x-tornado</code></p>\n  </article>\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/tornado/tornado.js",
    "content": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n(function(mod) {\n  if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n    mod(require(\"../../lib/codemirror\"), require(\"../htmlmixed/htmlmixed\"),\n        require(\"../../addon/mode/overlay\"));\n  else if (typeof define == \"function\" && define.amd) // AMD\n    define([\"../../lib/codemirror\", \"../htmlmixed/htmlmixed\",\n            \"../../addon/mode/overlay\"], mod);\n  else // Plain browser env\n    mod(CodeMirror);\n})(function(CodeMirror) {\n  \"use strict\";\n\n  CodeMirror.defineMode(\"tornado:inner\", function() {\n    var keywords = [\"and\",\"as\",\"assert\",\"autoescape\",\"block\",\"break\",\"class\",\"comment\",\"context\",\n                    \"continue\",\"datetime\",\"def\",\"del\",\"elif\",\"else\",\"end\",\"escape\",\"except\",\n                    \"exec\",\"extends\",\"false\",\"finally\",\"for\",\"from\",\"global\",\"if\",\"import\",\"in\",\n                    \"include\",\"is\",\"json_encode\",\"lambda\",\"length\",\"linkify\",\"load\",\"module\",\n                    \"none\",\"not\",\"or\",\"pass\",\"print\",\"put\",\"raise\",\"raw\",\"return\",\"self\",\"set\",\n                    \"squeeze\",\"super\",\"true\",\"try\",\"url_escape\",\"while\",\"with\",\"without\",\"xhtml_escape\",\"yield\"];\n    keywords = new RegExp(\"^((\" + keywords.join(\")|(\") + \"))\\\\b\");\n\n    function tokenBase (stream, state) {\n      stream.eatWhile(/[^\\{]/);\n      var ch = stream.next();\n      if (ch == \"{\") {\n        if (ch = stream.eat(/\\{|%|#/)) {\n          state.tokenize = inTag(ch);\n          return \"tag\";\n        }\n      }\n    }\n    function inTag (close) {\n      if (close == \"{\") {\n        close = \"}\";\n      }\n      return function (stream, state) {\n        var ch = stream.next();\n        if ((ch == close) && stream.eat(\"}\")) {\n          state.tokenize = tokenBase;\n          return \"tag\";\n        }\n        if (stream.match(keywords)) {\n          return \"keyword\";\n        }\n        return close == \"#\" ? \"comment\" : \"string\";\n      };\n    }\n    return {\n      startState: function () {\n        return {tokenize: tokenBase};\n      },\n      token: function (stream, state) {\n        return state.tokenize(stream, state);\n      }\n    };\n  });\n\n  CodeMirror.defineMode(\"tornado\", function(config) {\n    var htmlBase = CodeMirror.getMode(config, \"text/html\");\n    var tornadoInner = CodeMirror.getMode(config, \"tornado:inner\");\n    return CodeMirror.overlayMode(htmlBase, tornadoInner);\n  });\n\n  CodeMirror.defineMIME(\"text/x-tornado\", \"tornado\");\n});\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/turtle/index.html",
    "content": "<!doctype html>\n\n<title>CodeMirror: Turtle mode</title>\n<meta charset=\"utf-8\"/>\n<link rel=stylesheet href=\"../../doc/docs.css\">\n\n<link rel=\"stylesheet\" href=\"../../lib/codemirror.css\">\n<script src=\"../../lib/codemirror.js\"></script>\n<script src=\"turtle.js\"></script>\n<style>.CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}</style>\n<div id=nav>\n  <a href=\"http://codemirror.net\"><h1>CodeMirror</h1><img id=logo src=\"../../doc/logo.png\"></a>\n\n  <ul>\n    <li><a href=\"../../index.html\">Home</a>\n    <li><a href=\"../../doc/manual.html\">Manual</a>\n    <li><a href=\"https://github.com/codemirror/codemirror\">Code</a>\n  </ul>\n  <ul>\n    <li><a href=\"../index.html\">Language modes</a>\n    <li><a class=active href=\"#\">Turtle</a>\n  </ul>\n</div>\n\n<article>\n<h2>Turtle mode</h2>\n<form><textarea id=\"code\" name=\"code\">\n@prefix foaf: <http://xmlns.com/foaf/0.1/> .\n@prefix geo: <http://www.w3.org/2003/01/geo/wgs84_pos#> .\n@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .\n\n<http://purl.org/net/bsletten> \n    a foaf:Person;\n    foaf:interest <http://www.w3.org/2000/01/sw/>;\n    foaf:based_near [\n        geo:lat \"34.0736111\" ;\n        geo:lon \"-118.3994444\"\n   ]\n\n</textarea></form>\n    <script>\n      var editor = CodeMirror.fromTextArea(document.getElementById(\"code\"), {\n        mode: \"text/turtle\",\n        matchBrackets: true\n      });\n    </script>\n\n    <p><strong>MIME types defined:</strong> <code>text/turtle</code>.</p>\n\n  </article>\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/turtle/turtle.js",
    "content": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n(function(mod) {\n  if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n    mod(require(\"../../lib/codemirror\"));\n  else if (typeof define == \"function\" && define.amd) // AMD\n    define([\"../../lib/codemirror\"], mod);\n  else // Plain browser env\n    mod(CodeMirror);\n})(function(CodeMirror) {\n\"use strict\";\n\nCodeMirror.defineMode(\"turtle\", function(config) {\n  var indentUnit = config.indentUnit;\n  var curPunc;\n\n  function wordRegexp(words) {\n    return new RegExp(\"^(?:\" + words.join(\"|\") + \")$\", \"i\");\n  }\n  var ops = wordRegexp([]);\n  var keywords = wordRegexp([\"@prefix\", \"@base\", \"a\"]);\n  var operatorChars = /[*+\\-<>=&|]/;\n\n  function tokenBase(stream, state) {\n    var ch = stream.next();\n    curPunc = null;\n    if (ch == \"<\" && !stream.match(/^[\\s\\u00a0=]/, false)) {\n      stream.match(/^[^\\s\\u00a0>]*>?/);\n      return \"atom\";\n    }\n    else if (ch == \"\\\"\" || ch == \"'\") {\n      state.tokenize = tokenLiteral(ch);\n      return state.tokenize(stream, state);\n    }\n    else if (/[{}\\(\\),\\.;\\[\\]]/.test(ch)) {\n      curPunc = ch;\n      return null;\n    }\n    else if (ch == \"#\") {\n      stream.skipToEnd();\n      return \"comment\";\n    }\n    else if (operatorChars.test(ch)) {\n      stream.eatWhile(operatorChars);\n      return null;\n    }\n    else if (ch == \":\") {\n          return \"operator\";\n        } else {\n      stream.eatWhile(/[_\\w\\d]/);\n      if(stream.peek() == \":\") {\n        return \"variable-3\";\n      } else {\n             var word = stream.current();\n\n             if(keywords.test(word)) {\n                        return \"meta\";\n             }\n\n             if(ch >= \"A\" && ch <= \"Z\") {\n                    return \"comment\";\n                 } else {\n                        return \"keyword\";\n                 }\n      }\n      var word = stream.current();\n      if (ops.test(word))\n        return null;\n      else if (keywords.test(word))\n        return \"meta\";\n      else\n        return \"variable\";\n    }\n  }\n\n  function tokenLiteral(quote) {\n    return function(stream, state) {\n      var escaped = false, ch;\n      while ((ch = stream.next()) != null) {\n        if (ch == quote && !escaped) {\n          state.tokenize = tokenBase;\n          break;\n        }\n        escaped = !escaped && ch == \"\\\\\";\n      }\n      return \"string\";\n    };\n  }\n\n  function pushContext(state, type, col) {\n    state.context = {prev: state.context, indent: state.indent, col: col, type: type};\n  }\n  function popContext(state) {\n    state.indent = state.context.indent;\n    state.context = state.context.prev;\n  }\n\n  return {\n    startState: function() {\n      return {tokenize: tokenBase,\n              context: null,\n              indent: 0,\n              col: 0};\n    },\n\n    token: function(stream, state) {\n      if (stream.sol()) {\n        if (state.context && state.context.align == null) state.context.align = false;\n        state.indent = stream.indentation();\n      }\n      if (stream.eatSpace()) return null;\n      var style = state.tokenize(stream, state);\n\n      if (style != \"comment\" && state.context && state.context.align == null && state.context.type != \"pattern\") {\n        state.context.align = true;\n      }\n\n      if (curPunc == \"(\") pushContext(state, \")\", stream.column());\n      else if (curPunc == \"[\") pushContext(state, \"]\", stream.column());\n      else if (curPunc == \"{\") pushContext(state, \"}\", stream.column());\n      else if (/[\\]\\}\\)]/.test(curPunc)) {\n        while (state.context && state.context.type == \"pattern\") popContext(state);\n        if (state.context && curPunc == state.context.type) popContext(state);\n      }\n      else if (curPunc == \".\" && state.context && state.context.type == \"pattern\") popContext(state);\n      else if (/atom|string|variable/.test(style) && state.context) {\n        if (/[\\}\\]]/.test(state.context.type))\n          pushContext(state, \"pattern\", stream.column());\n        else if (state.context.type == \"pattern\" && !state.context.align) {\n          state.context.align = true;\n          state.context.col = stream.column();\n        }\n      }\n\n      return style;\n    },\n\n    indent: function(state, textAfter) {\n      var firstChar = textAfter && textAfter.charAt(0);\n      var context = state.context;\n      if (/[\\]\\}]/.test(firstChar))\n        while (context && context.type == \"pattern\") context = context.prev;\n\n      var closing = context && firstChar == context.type;\n      if (!context)\n        return 0;\n      else if (context.type == \"pattern\")\n        return context.col;\n      else if (context.align)\n        return context.col + (closing ? 0 : 1);\n      else\n        return context.indent + (closing ? 0 : indentUnit);\n    },\n\n    lineComment: \"#\"\n  };\n});\n\nCodeMirror.defineMIME(\"text/turtle\", \"turtle\");\n\n});\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/vb/index.html",
    "content": "<!doctype html>\n\n<title>CodeMirror: VB.NET mode</title>\n<meta charset=\"utf-8\"/>\n<link rel=stylesheet href=\"../../doc/docs.css\">\n\n<link rel=\"stylesheet\" href=\"../../lib/codemirror.css\">\n<link href=\"http://fonts.googleapis.com/css?family=Inconsolata\" rel=\"stylesheet\" type=\"text/css\">\n<script src=\"../../lib/codemirror.js\"></script>\n<script src=\"vb.js\"></script>\n<script type=\"text/javascript\" src=\"../../addon/runmode/runmode.js\"></script>\n<style>\n      .CodeMirror {border: 1px solid #aaa; height:210px; height: auto;}\n      .CodeMirror-scroll { overflow-x: auto; overflow-y: hidden;}\n      .CodeMirror pre { font-family: Inconsolata; font-size: 14px}\n    </style>\n<div id=nav>\n  <a href=\"http://codemirror.net\"><h1>CodeMirror</h1><img id=logo src=\"../../doc/logo.png\"></a>\n\n  <ul>\n    <li><a href=\"../../index.html\">Home</a>\n    <li><a href=\"../../doc/manual.html\">Manual</a>\n    <li><a href=\"https://github.com/codemirror/codemirror\">Code</a>\n  </ul>\n  <ul>\n    <li><a href=\"../index.html\">Language modes</a>\n    <li><a class=active href=\"#\">VB.NET</a>\n  </ul>\n</div>\n\n<article>\n<h2>VB.NET mode</h2>\n\n<script type=\"text/javascript\">\nfunction test(golden, text) {\n  var ok = true;\n  var i = 0;\n  function callback(token, style, lineNo, pos){\n\t\t//console.log(String(token) + \" \" + String(style) + \" \" + String(lineNo) + \" \" + String(pos));\n    var result = [String(token), String(style)];\n    if (golden[i][0] != result[0] || golden[i][1] != result[1]){\n      return \"Error, expected: \" + String(golden[i]) + \", got: \" + String(result);\n      ok = false;\n    }\n    i++;\n  }\n  CodeMirror.runMode(text, \"text/x-vb\",callback); \n\n  if (ok) return \"Tests OK\";\n}\nfunction testTypes() {\n  var golden = [['Integer','keyword'],[' ','null'],['Float','keyword']]\n  var text =  \"Integer Float\";\n  return test(golden,text);\n}\nfunction testIf(){\n  var golden = [['If','keyword'],[' ','null'],['True','keyword'],[' ','null'],['End','keyword'],[' ','null'],['If','keyword']];\n  var text = 'If True End If';\n  return test(golden, text);\n}\nfunction testDecl(){\n   var golden = [['Dim','keyword'],[' ','null'],['x','variable'],[' ','null'],['as','keyword'],[' ','null'],['Integer','keyword']];\n   var text = 'Dim x as Integer';\n   return test(golden, text);\n}\nfunction testAll(){\n  var result = \"\";\n\n  result += testTypes() + \"\\n\";\n  result += testIf() + \"\\n\";\n  result += testDecl() + \"\\n\";\n  return result;\n\n}\nfunction initText(editor) {\n  var content = 'Class rocket\\nPrivate quality as Double\\nPublic Sub launch() as String\\nif quality > 0.8\\nlaunch = \"Successful\"\\nElse\\nlaunch = \"Failed\"\\nEnd If\\nEnd sub\\nEnd class\\n';\n  editor.setValue(content);\n  for (var i =0; i< editor.lineCount(); i++) editor.indentLine(i);\n}\nfunction init() {\n    editor = CodeMirror.fromTextArea(document.getElementById(\"solution\"), {\n        lineNumbers: true,\n        mode: \"text/x-vb\",\n        readOnly: false\n    });\n    runTest();\n}\nfunction runTest() {\n\tdocument.getElementById('testresult').innerHTML = testAll();\n  initText(editor);\n\t\n}\ndocument.body.onload = init;\n</script>\n\n  <div id=\"edit\">\n  <textarea style=\"width:95%;height:200px;padding:5px;\" name=\"solution\" id=\"solution\" ></textarea>\n  </div>\n  <pre id=\"testresult\"></pre>\n  <p>MIME type defined: <code>text/x-vb</code>.</p>\n\n</article>\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/vb/vb.js",
    "content": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n(function(mod) {\n  if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n    mod(require(\"../../lib/codemirror\"));\n  else if (typeof define == \"function\" && define.amd) // AMD\n    define([\"../../lib/codemirror\"], mod);\n  else // Plain browser env\n    mod(CodeMirror);\n})(function(CodeMirror) {\n\"use strict\";\n\nCodeMirror.defineMode(\"vb\", function(conf, parserConf) {\n    var ERRORCLASS = 'error';\n\n    function wordRegexp(words) {\n        return new RegExp(\"^((\" + words.join(\")|(\") + \"))\\\\b\", \"i\");\n    }\n\n    var singleOperators = new RegExp(\"^[\\\\+\\\\-\\\\*/%&\\\\\\\\|\\\\^~<>!]\");\n    var singleDelimiters = new RegExp('^[\\\\(\\\\)\\\\[\\\\]\\\\{\\\\}@,:`=;\\\\.]');\n    var doubleOperators = new RegExp(\"^((==)|(<>)|(<=)|(>=)|(<>)|(<<)|(>>)|(//)|(\\\\*\\\\*))\");\n    var doubleDelimiters = new RegExp(\"^((\\\\+=)|(\\\\-=)|(\\\\*=)|(%=)|(/=)|(&=)|(\\\\|=)|(\\\\^=))\");\n    var tripleDelimiters = new RegExp(\"^((//=)|(>>=)|(<<=)|(\\\\*\\\\*=))\");\n    var identifiers = new RegExp(\"^[_A-Za-z][_A-Za-z0-9]*\");\n\n    var openingKeywords = ['class','module', 'sub','enum','select','while','if','function',  'get','set','property', 'try'];\n    var middleKeywords = ['else','elseif','case', 'catch'];\n    var endKeywords = ['next','loop'];\n\n    var wordOperators = wordRegexp(['and', 'or', 'not', 'xor', 'in']);\n    var commonkeywords = ['as', 'dim', 'break',  'continue','optional', 'then',  'until',\n                          'goto', 'byval','byref','new','handles','property', 'return',\n                          'const','private', 'protected', 'friend', 'public', 'shared', 'static', 'true','false'];\n    var commontypes = ['integer','string','double','decimal','boolean','short','char', 'float','single'];\n\n    var keywords = wordRegexp(commonkeywords);\n    var types = wordRegexp(commontypes);\n    var stringPrefixes = '\"';\n\n    var opening = wordRegexp(openingKeywords);\n    var middle = wordRegexp(middleKeywords);\n    var closing = wordRegexp(endKeywords);\n    var doubleClosing = wordRegexp(['end']);\n    var doOpening = wordRegexp(['do']);\n\n    var indentInfo = null;\n\n\n\n\n    function indent(_stream, state) {\n      state.currentIndent++;\n    }\n\n    function dedent(_stream, state) {\n      state.currentIndent--;\n    }\n    // tokenizers\n    function tokenBase(stream, state) {\n        if (stream.eatSpace()) {\n            return null;\n        }\n\n        var ch = stream.peek();\n\n        // Handle Comments\n        if (ch === \"'\") {\n            stream.skipToEnd();\n            return 'comment';\n        }\n\n\n        // Handle Number Literals\n        if (stream.match(/^((&H)|(&O))?[0-9\\.a-f]/i, false)) {\n            var floatLiteral = false;\n            // Floats\n            if (stream.match(/^\\d*\\.\\d+F?/i)) { floatLiteral = true; }\n            else if (stream.match(/^\\d+\\.\\d*F?/)) { floatLiteral = true; }\n            else if (stream.match(/^\\.\\d+F?/)) { floatLiteral = true; }\n\n            if (floatLiteral) {\n                // Float literals may be \"imaginary\"\n                stream.eat(/J/i);\n                return 'number';\n            }\n            // Integers\n            var intLiteral = false;\n            // Hex\n            if (stream.match(/^&H[0-9a-f]+/i)) { intLiteral = true; }\n            // Octal\n            else if (stream.match(/^&O[0-7]+/i)) { intLiteral = true; }\n            // Decimal\n            else if (stream.match(/^[1-9]\\d*F?/)) {\n                // Decimal literals may be \"imaginary\"\n                stream.eat(/J/i);\n                // TODO - Can you have imaginary longs?\n                intLiteral = true;\n            }\n            // Zero by itself with no other piece of number.\n            else if (stream.match(/^0(?![\\dx])/i)) { intLiteral = true; }\n            if (intLiteral) {\n                // Integer literals may be \"long\"\n                stream.eat(/L/i);\n                return 'number';\n            }\n        }\n\n        // Handle Strings\n        if (stream.match(stringPrefixes)) {\n            state.tokenize = tokenStringFactory(stream.current());\n            return state.tokenize(stream, state);\n        }\n\n        // Handle operators and Delimiters\n        if (stream.match(tripleDelimiters) || stream.match(doubleDelimiters)) {\n            return null;\n        }\n        if (stream.match(doubleOperators)\n            || stream.match(singleOperators)\n            || stream.match(wordOperators)) {\n            return 'operator';\n        }\n        if (stream.match(singleDelimiters)) {\n            return null;\n        }\n        if (stream.match(doOpening)) {\n            indent(stream,state);\n            state.doInCurrentLine = true;\n            return 'keyword';\n        }\n        if (stream.match(opening)) {\n            if (! state.doInCurrentLine)\n              indent(stream,state);\n            else\n              state.doInCurrentLine = false;\n            return 'keyword';\n        }\n        if (stream.match(middle)) {\n            return 'keyword';\n        }\n\n        if (stream.match(doubleClosing)) {\n            dedent(stream,state);\n            dedent(stream,state);\n            return 'keyword';\n        }\n        if (stream.match(closing)) {\n            dedent(stream,state);\n            return 'keyword';\n        }\n\n        if (stream.match(types)) {\n            return 'keyword';\n        }\n\n        if (stream.match(keywords)) {\n            return 'keyword';\n        }\n\n        if (stream.match(identifiers)) {\n            return 'variable';\n        }\n\n        // Handle non-detected items\n        stream.next();\n        return ERRORCLASS;\n    }\n\n    function tokenStringFactory(delimiter) {\n        var singleline = delimiter.length == 1;\n        var OUTCLASS = 'string';\n\n        return function(stream, state) {\n            while (!stream.eol()) {\n                stream.eatWhile(/[^'\"]/);\n                if (stream.match(delimiter)) {\n                    state.tokenize = tokenBase;\n                    return OUTCLASS;\n                } else {\n                    stream.eat(/['\"]/);\n                }\n            }\n            if (singleline) {\n                if (parserConf.singleLineStringErrors) {\n                    return ERRORCLASS;\n                } else {\n                    state.tokenize = tokenBase;\n                }\n            }\n            return OUTCLASS;\n        };\n    }\n\n\n    function tokenLexer(stream, state) {\n        var style = state.tokenize(stream, state);\n        var current = stream.current();\n\n        // Handle '.' connected identifiers\n        if (current === '.') {\n            style = state.tokenize(stream, state);\n            current = stream.current();\n            if (style === 'variable') {\n                return 'variable';\n            } else {\n                return ERRORCLASS;\n            }\n        }\n\n\n        var delimiter_index = '[({'.indexOf(current);\n        if (delimiter_index !== -1) {\n            indent(stream, state );\n        }\n        if (indentInfo === 'dedent') {\n            if (dedent(stream, state)) {\n                return ERRORCLASS;\n            }\n        }\n        delimiter_index = '])}'.indexOf(current);\n        if (delimiter_index !== -1) {\n            if (dedent(stream, state)) {\n                return ERRORCLASS;\n            }\n        }\n\n        return style;\n    }\n\n    var external = {\n        electricChars:\"dDpPtTfFeE \",\n        startState: function() {\n            return {\n              tokenize: tokenBase,\n              lastToken: null,\n              currentIndent: 0,\n              nextLineIndent: 0,\n              doInCurrentLine: false\n\n\n          };\n        },\n\n        token: function(stream, state) {\n            if (stream.sol()) {\n              state.currentIndent += state.nextLineIndent;\n              state.nextLineIndent = 0;\n              state.doInCurrentLine = 0;\n            }\n            var style = tokenLexer(stream, state);\n\n            state.lastToken = {style:style, content: stream.current()};\n\n\n\n            return style;\n        },\n\n        indent: function(state, textAfter) {\n            var trueText = textAfter.replace(/^\\s+|\\s+$/g, '') ;\n            if (trueText.match(closing) || trueText.match(doubleClosing) || trueText.match(middle)) return conf.indentUnit*(state.currentIndent-1);\n            if(state.currentIndent < 0) return 0;\n            return state.currentIndent * conf.indentUnit;\n        }\n\n    };\n    return external;\n});\n\nCodeMirror.defineMIME(\"text/x-vb\", \"vb\");\n\n});\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/vbscript/index.html",
    "content": "<!doctype html>\n\n<title>CodeMirror: VBScript mode</title>\n<meta charset=\"utf-8\"/>\n<link rel=stylesheet href=\"../../doc/docs.css\">\n\n<link rel=\"stylesheet\" href=\"../../lib/codemirror.css\">\n<script src=\"../../lib/codemirror.js\"></script>\n<script src=\"vbscript.js\"></script>\n<style type=\"text/css\">.CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}</style>\n<div id=nav>\n  <a href=\"http://codemirror.net\"><h1>CodeMirror</h1><img id=logo src=\"../../doc/logo.png\"></a>\n\n  <ul>\n    <li><a href=\"../../index.html\">Home</a>\n    <li><a href=\"../../doc/manual.html\">Manual</a>\n    <li><a href=\"https://github.com/codemirror/codemirror\">Code</a>\n  </ul>\n  <ul>\n    <li><a href=\"../index.html\">Language modes</a>\n    <li><a class=active href=\"#\">VBScript</a>\n  </ul>\n</div>\n\n<article>\n<h2>VBScript mode</h2>\n\n\n<div><textarea id=\"code\" name=\"code\">\n' Pete Guhl\n' 03-04-2012\n'\n' Basic VBScript support for codemirror2\n\nConst ForReading = 1, ForWriting = 2, ForAppending = 8\n\nCall Sub020_PostBroadcastToUrbanAirship(strUserName, strPassword, intTransmitID, strResponse)\n\nIf Not IsNull(strResponse) AND Len(strResponse) = 0 Then\n\tboolTransmitOkYN = False\nElse\n\t' WScript.Echo \"Oh Happy Day! Oh Happy DAY!\"\n\tboolTransmitOkYN = True\nEnd If\n</textarea></div>\n\n    <script>\n      var editor = CodeMirror.fromTextArea(document.getElementById(\"code\"), {\n        lineNumbers: true,\n        indentUnit: 4\n      });\n    </script>\n\n    <p><strong>MIME types defined:</strong> <code>text/vbscript</code>.</p>\n  </article>\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/vbscript/vbscript.js",
    "content": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n/*\nFor extra ASP classic objects, initialize CodeMirror instance with this option:\n    isASP: true\n\nE.G.:\n    var editor = CodeMirror.fromTextArea(document.getElementById(\"code\"), {\n        lineNumbers: true,\n        isASP: true\n      });\n*/\n\n(function(mod) {\n  if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n    mod(require(\"../../lib/codemirror\"));\n  else if (typeof define == \"function\" && define.amd) // AMD\n    define([\"../../lib/codemirror\"], mod);\n  else // Plain browser env\n    mod(CodeMirror);\n})(function(CodeMirror) {\n\"use strict\";\n\nCodeMirror.defineMode(\"vbscript\", function(conf, parserConf) {\n    var ERRORCLASS = 'error';\n\n    function wordRegexp(words) {\n        return new RegExp(\"^((\" + words.join(\")|(\") + \"))\\\\b\", \"i\");\n    }\n\n    var singleOperators = new RegExp(\"^[\\\\+\\\\-\\\\*/&\\\\\\\\\\\\^<>=]\");\n    var doubleOperators = new RegExp(\"^((<>)|(<=)|(>=))\");\n    var singleDelimiters = new RegExp('^[\\\\.,]');\n    var brakets = new RegExp('^[\\\\(\\\\)]');\n    var identifiers = new RegExp(\"^[A-Za-z][_A-Za-z0-9]*\");\n\n    var openingKeywords = ['class','sub','select','while','if','function', 'property', 'with', 'for'];\n    var middleKeywords = ['else','elseif','case'];\n    var endKeywords = ['next','loop','wend'];\n\n    var wordOperators = wordRegexp(['and', 'or', 'not', 'xor', 'is', 'mod', 'eqv', 'imp']);\n    var commonkeywords = ['dim', 'redim', 'then',  'until', 'randomize',\n                          'byval','byref','new','property', 'exit', 'in',\n                          'const','private', 'public',\n                          'get','set','let', 'stop', 'on error resume next', 'on error goto 0', 'option explicit', 'call', 'me'];\n\n    //This list was from: http://msdn.microsoft.com/en-us/library/f8tbc79x(v=vs.84).aspx\n    var atomWords = ['true', 'false', 'nothing', 'empty', 'null'];\n    //This list was from: http://msdn.microsoft.com/en-us/library/3ca8tfek(v=vs.84).aspx\n    var builtinFuncsWords = ['abs', 'array', 'asc', 'atn', 'cbool', 'cbyte', 'ccur', 'cdate', 'cdbl', 'chr', 'cint', 'clng', 'cos', 'csng', 'cstr', 'date', 'dateadd', 'datediff', 'datepart',\n                        'dateserial', 'datevalue', 'day', 'escape', 'eval', 'execute', 'exp', 'filter', 'formatcurrency', 'formatdatetime', 'formatnumber', 'formatpercent', 'getlocale', 'getobject',\n                        'getref', 'hex', 'hour', 'inputbox', 'instr', 'instrrev', 'int', 'fix', 'isarray', 'isdate', 'isempty', 'isnull', 'isnumeric', 'isobject', 'join', 'lbound', 'lcase', 'left',\n                        'len', 'loadpicture', 'log', 'ltrim', 'rtrim', 'trim', 'maths', 'mid', 'minute', 'month', 'monthname', 'msgbox', 'now', 'oct', 'replace', 'rgb', 'right', 'rnd', 'round',\n                        'scriptengine', 'scriptenginebuildversion', 'scriptenginemajorversion', 'scriptengineminorversion', 'second', 'setlocale', 'sgn', 'sin', 'space', 'split', 'sqr', 'strcomp',\n                        'string', 'strreverse', 'tan', 'time', 'timer', 'timeserial', 'timevalue', 'typename', 'ubound', 'ucase', 'unescape', 'vartype', 'weekday', 'weekdayname', 'year'];\n\n    //This list was from: http://msdn.microsoft.com/en-us/library/ydz4cfk3(v=vs.84).aspx\n    var builtinConsts = ['vbBlack', 'vbRed', 'vbGreen', 'vbYellow', 'vbBlue', 'vbMagenta', 'vbCyan', 'vbWhite', 'vbBinaryCompare', 'vbTextCompare',\n                         'vbSunday', 'vbMonday', 'vbTuesday', 'vbWednesday', 'vbThursday', 'vbFriday', 'vbSaturday', 'vbUseSystemDayOfWeek', 'vbFirstJan1', 'vbFirstFourDays', 'vbFirstFullWeek',\n                         'vbGeneralDate', 'vbLongDate', 'vbShortDate', 'vbLongTime', 'vbShortTime', 'vbObjectError',\n                         'vbOKOnly', 'vbOKCancel', 'vbAbortRetryIgnore', 'vbYesNoCancel', 'vbYesNo', 'vbRetryCancel', 'vbCritical', 'vbQuestion', 'vbExclamation', 'vbInformation', 'vbDefaultButton1', 'vbDefaultButton2',\n                         'vbDefaultButton3', 'vbDefaultButton4', 'vbApplicationModal', 'vbSystemModal', 'vbOK', 'vbCancel', 'vbAbort', 'vbRetry', 'vbIgnore', 'vbYes', 'vbNo',\n                         'vbCr', 'VbCrLf', 'vbFormFeed', 'vbLf', 'vbNewLine', 'vbNullChar', 'vbNullString', 'vbTab', 'vbVerticalTab', 'vbUseDefault', 'vbTrue', 'vbFalse',\n                         'vbEmpty', 'vbNull', 'vbInteger', 'vbLong', 'vbSingle', 'vbDouble', 'vbCurrency', 'vbDate', 'vbString', 'vbObject', 'vbError', 'vbBoolean', 'vbVariant', 'vbDataObject', 'vbDecimal', 'vbByte', 'vbArray'];\n    //This list was from: http://msdn.microsoft.com/en-us/library/hkc375ea(v=vs.84).aspx\n    var builtinObjsWords = ['WScript', 'err', 'debug', 'RegExp'];\n    var knownProperties = ['description', 'firstindex', 'global', 'helpcontext', 'helpfile', 'ignorecase', 'length', 'number', 'pattern', 'source', 'value', 'count'];\n    var knownMethods = ['clear', 'execute', 'raise', 'replace', 'test', 'write', 'writeline', 'close', 'open', 'state', 'eof', 'update', 'addnew', 'end', 'createobject', 'quit'];\n\n    var aspBuiltinObjsWords = ['server', 'response', 'request', 'session', 'application'];\n    var aspKnownProperties = ['buffer', 'cachecontrol', 'charset', 'contenttype', 'expires', 'expiresabsolute', 'isclientconnected', 'pics', 'status', //response\n                              'clientcertificate', 'cookies', 'form', 'querystring', 'servervariables', 'totalbytes', //request\n                              'contents', 'staticobjects', //application\n                              'codepage', 'lcid', 'sessionid', 'timeout', //session\n                              'scripttimeout']; //server\n    var aspKnownMethods = ['addheader', 'appendtolog', 'binarywrite', 'end', 'flush', 'redirect', //response\n                           'binaryread', //request\n                           'remove', 'removeall', 'lock', 'unlock', //application\n                           'abandon', //session\n                           'getlasterror', 'htmlencode', 'mappath', 'transfer', 'urlencode']; //server\n\n    var knownWords = knownMethods.concat(knownProperties);\n\n    builtinObjsWords = builtinObjsWords.concat(builtinConsts);\n\n    if (conf.isASP){\n        builtinObjsWords = builtinObjsWords.concat(aspBuiltinObjsWords);\n        knownWords = knownWords.concat(aspKnownMethods, aspKnownProperties);\n    };\n\n    var keywords = wordRegexp(commonkeywords);\n    var atoms = wordRegexp(atomWords);\n    var builtinFuncs = wordRegexp(builtinFuncsWords);\n    var builtinObjs = wordRegexp(builtinObjsWords);\n    var known = wordRegexp(knownWords);\n    var stringPrefixes = '\"';\n\n    var opening = wordRegexp(openingKeywords);\n    var middle = wordRegexp(middleKeywords);\n    var closing = wordRegexp(endKeywords);\n    var doubleClosing = wordRegexp(['end']);\n    var doOpening = wordRegexp(['do']);\n    var noIndentWords = wordRegexp(['on error resume next', 'exit']);\n    var comment = wordRegexp(['rem']);\n\n\n    function indent(_stream, state) {\n      state.currentIndent++;\n    }\n\n    function dedent(_stream, state) {\n      state.currentIndent--;\n    }\n    // tokenizers\n    function tokenBase(stream, state) {\n        if (stream.eatSpace()) {\n            return 'space';\n            //return null;\n        }\n\n        var ch = stream.peek();\n\n        // Handle Comments\n        if (ch === \"'\") {\n            stream.skipToEnd();\n            return 'comment';\n        }\n        if (stream.match(comment)){\n            stream.skipToEnd();\n            return 'comment';\n        }\n\n\n        // Handle Number Literals\n        if (stream.match(/^((&H)|(&O))?[0-9\\.]/i, false) && !stream.match(/^((&H)|(&O))?[0-9\\.]+[a-z_]/i, false)) {\n            var floatLiteral = false;\n            // Floats\n            if (stream.match(/^\\d*\\.\\d+/i)) { floatLiteral = true; }\n            else if (stream.match(/^\\d+\\.\\d*/)) { floatLiteral = true; }\n            else if (stream.match(/^\\.\\d+/)) { floatLiteral = true; }\n\n            if (floatLiteral) {\n                // Float literals may be \"imaginary\"\n                stream.eat(/J/i);\n                return 'number';\n            }\n            // Integers\n            var intLiteral = false;\n            // Hex\n            if (stream.match(/^&H[0-9a-f]+/i)) { intLiteral = true; }\n            // Octal\n            else if (stream.match(/^&O[0-7]+/i)) { intLiteral = true; }\n            // Decimal\n            else if (stream.match(/^[1-9]\\d*F?/)) {\n                // Decimal literals may be \"imaginary\"\n                stream.eat(/J/i);\n                // TODO - Can you have imaginary longs?\n                intLiteral = true;\n            }\n            // Zero by itself with no other piece of number.\n            else if (stream.match(/^0(?![\\dx])/i)) { intLiteral = true; }\n            if (intLiteral) {\n                // Integer literals may be \"long\"\n                stream.eat(/L/i);\n                return 'number';\n            }\n        }\n\n        // Handle Strings\n        if (stream.match(stringPrefixes)) {\n            state.tokenize = tokenStringFactory(stream.current());\n            return state.tokenize(stream, state);\n        }\n\n        // Handle operators and Delimiters\n        if (stream.match(doubleOperators)\n            || stream.match(singleOperators)\n            || stream.match(wordOperators)) {\n            return 'operator';\n        }\n        if (stream.match(singleDelimiters)) {\n            return null;\n        }\n\n        if (stream.match(brakets)) {\n            return \"bracket\";\n        }\n\n        if (stream.match(noIndentWords)) {\n            state.doInCurrentLine = true;\n\n            return 'keyword';\n        }\n\n        if (stream.match(doOpening)) {\n            indent(stream,state);\n            state.doInCurrentLine = true;\n\n            return 'keyword';\n        }\n        if (stream.match(opening)) {\n            if (! state.doInCurrentLine)\n              indent(stream,state);\n            else\n              state.doInCurrentLine = false;\n\n            return 'keyword';\n        }\n        if (stream.match(middle)) {\n            return 'keyword';\n        }\n\n\n        if (stream.match(doubleClosing)) {\n            dedent(stream,state);\n            dedent(stream,state);\n\n            return 'keyword';\n        }\n        if (stream.match(closing)) {\n            if (! state.doInCurrentLine)\n              dedent(stream,state);\n            else\n              state.doInCurrentLine = false;\n\n            return 'keyword';\n        }\n\n        if (stream.match(keywords)) {\n            return 'keyword';\n        }\n\n        if (stream.match(atoms)) {\n            return 'atom';\n        }\n\n        if (stream.match(known)) {\n            return 'variable-2';\n        }\n\n        if (stream.match(builtinFuncs)) {\n            return 'builtin';\n        }\n\n        if (stream.match(builtinObjs)){\n            return 'variable-2';\n        }\n\n        if (stream.match(identifiers)) {\n            return 'variable';\n        }\n\n        // Handle non-detected items\n        stream.next();\n        return ERRORCLASS;\n    }\n\n    function tokenStringFactory(delimiter) {\n        var singleline = delimiter.length == 1;\n        var OUTCLASS = 'string';\n\n        return function(stream, state) {\n            while (!stream.eol()) {\n                stream.eatWhile(/[^'\"]/);\n                if (stream.match(delimiter)) {\n                    state.tokenize = tokenBase;\n                    return OUTCLASS;\n                } else {\n                    stream.eat(/['\"]/);\n                }\n            }\n            if (singleline) {\n                if (parserConf.singleLineStringErrors) {\n                    return ERRORCLASS;\n                } else {\n                    state.tokenize = tokenBase;\n                }\n            }\n            return OUTCLASS;\n        };\n    }\n\n\n    function tokenLexer(stream, state) {\n        var style = state.tokenize(stream, state);\n        var current = stream.current();\n\n        // Handle '.' connected identifiers\n        if (current === '.') {\n            style = state.tokenize(stream, state);\n\n            current = stream.current();\n            if (style && (style.substr(0, 8) === 'variable' || style==='builtin' || style==='keyword')){//|| knownWords.indexOf(current.substring(1)) > -1) {\n                if (style === 'builtin' || style === 'keyword') style='variable';\n                if (knownWords.indexOf(current.substr(1)) > -1) style='variable-2';\n\n                return style;\n            } else {\n                return ERRORCLASS;\n            }\n        }\n\n        return style;\n    }\n\n    var external = {\n        electricChars:\"dDpPtTfFeE \",\n        startState: function() {\n            return {\n              tokenize: tokenBase,\n              lastToken: null,\n              currentIndent: 0,\n              nextLineIndent: 0,\n              doInCurrentLine: false,\n              ignoreKeyword: false\n\n\n          };\n        },\n\n        token: function(stream, state) {\n            if (stream.sol()) {\n              state.currentIndent += state.nextLineIndent;\n              state.nextLineIndent = 0;\n              state.doInCurrentLine = 0;\n            }\n            var style = tokenLexer(stream, state);\n\n            state.lastToken = {style:style, content: stream.current()};\n\n            if (style==='space') style=null;\n\n            return style;\n        },\n\n        indent: function(state, textAfter) {\n            var trueText = textAfter.replace(/^\\s+|\\s+$/g, '') ;\n            if (trueText.match(closing) || trueText.match(doubleClosing) || trueText.match(middle)) return conf.indentUnit*(state.currentIndent-1);\n            if(state.currentIndent < 0) return 0;\n            return state.currentIndent * conf.indentUnit;\n        }\n\n    };\n    return external;\n});\n\nCodeMirror.defineMIME(\"text/vbscript\", \"vbscript\");\n\n});\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/velocity/index.html",
    "content": "<!doctype html>\n\n<title>CodeMirror: Velocity mode</title>\n<meta charset=\"utf-8\"/>\n<link rel=stylesheet href=\"../../doc/docs.css\">\n\n<link rel=\"stylesheet\" href=\"../../lib/codemirror.css\">\n<link rel=\"stylesheet\" href=\"../../theme/night.css\">\n<script src=\"../../lib/codemirror.js\"></script>\n<script src=\"velocity.js\"></script>\n<style>.CodeMirror {border: 1px solid black;}</style>\n<div id=nav>\n  <a href=\"http://codemirror.net\"><h1>CodeMirror</h1><img id=logo src=\"../../doc/logo.png\"></a>\n\n  <ul>\n    <li><a href=\"../../index.html\">Home</a>\n    <li><a href=\"../../doc/manual.html\">Manual</a>\n    <li><a href=\"https://github.com/codemirror/codemirror\">Code</a>\n  </ul>\n  <ul>\n    <li><a href=\"../index.html\">Language modes</a>\n    <li><a class=active href=\"#\">Velocity</a>\n  </ul>\n</div>\n\n<article>\n<h2>Velocity mode</h2>\n<form><textarea id=\"code\" name=\"code\">\n## Velocity Code Demo\n#*\n   based on PL/SQL mode by Peter Raganitsch, adapted to Velocity by Steve O'Hara ( http://www.pivotal-solutions.co.uk )\n   August 2011\n*#\n\n#*\n   This is a multiline comment.\n   This is the second line\n*#\n\n#[[ hello steve\n   This has invalid syntax that would normally need \"poor man's escaping\" like:\n\n   #define()\n\n   ${blah\n]]#\n\n#include( \"disclaimer.txt\" \"opinion.txt\" )\n#include( $foo $bar )\n\n#parse( \"lecorbusier.vm\" )\n#parse( $foo )\n\n#evaluate( 'string with VTL #if(true)will be displayed#end' )\n\n#define( $hello ) Hello $who #end #set( $who = \"World!\") $hello ## displays Hello World!\n\n#foreach( $customer in $customerList )\n\n    $foreach.count $customer.Name\n\n    #if( $foo == ${bar})\n        it's true!\n        #break\n    #{else}\n        it's not!\n        #stop\n    #end\n\n    #if ($foreach.parent.hasNext)\n        $velocityCount\n    #end\n#end\n\n$someObject.getValues(\"this is a string split\n        across lines\")\n\n$someObject(\"This plus $something in the middle\").method(7567).property\n\n#macro( tablerows $color $somelist )\n    #foreach( $something in $somelist )\n        <tr><td bgcolor=$color>$something</td></tr>\n        <tr><td bgcolor=$color>$bodyContent</td></tr>\n    #end\n#end\n\n#tablerows(\"red\" [\"dadsdf\",\"dsa\"])\n#@tablerows(\"red\" [\"dadsdf\",\"dsa\"]) some body content #end\n\n   Variable reference: #set( $monkey = $bill )\n   String literal: #set( $monkey.Friend = 'monica' )\n   Property reference: #set( $monkey.Blame = $whitehouse.Leak )\n   Method reference: #set( $monkey.Plan = $spindoctor.weave($web) )\n   Number literal: #set( $monkey.Number = 123 )\n   Range operator: #set( $monkey.Numbers = [1..3] )\n   Object list: #set( $monkey.Say = [\"Not\", $my, \"fault\"] )\n   Object map: #set( $monkey.Map = {\"banana\" : \"good\", \"roast beef\" : \"bad\"})\n\nThe RHS can also be a simple arithmetic expression, such as:\nAddition: #set( $value = $foo + 1 )\n   Subtraction: #set( $value = $bar - 1 )\n   Multiplication: #set( $value = $foo * $bar )\n   Division: #set( $value = $foo / $bar )\n   Remainder: #set( $value = $foo % $bar )\n\n</textarea></form>\n    <script>\n      var editor = CodeMirror.fromTextArea(document.getElementById(\"code\"), {\n        theme: \"night\",\n        lineNumbers: true,\n        indentUnit: 4,\n        mode: \"text/velocity\"\n      });\n    </script>\n\n    <p><strong>MIME types defined:</strong> <code>text/velocity</code>.</p>\n\n  </article>\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/velocity/velocity.js",
    "content": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n(function(mod) {\n  if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n    mod(require(\"../../lib/codemirror\"));\n  else if (typeof define == \"function\" && define.amd) // AMD\n    define([\"../../lib/codemirror\"], mod);\n  else // Plain browser env\n    mod(CodeMirror);\n})(function(CodeMirror) {\n\"use strict\";\n\nCodeMirror.defineMode(\"velocity\", function() {\n    function parseWords(str) {\n        var obj = {}, words = str.split(\" \");\n        for (var i = 0; i < words.length; ++i) obj[words[i]] = true;\n        return obj;\n    }\n\n    var keywords = parseWords(\"#end #else #break #stop #[[ #]] \" +\n                              \"#{end} #{else} #{break} #{stop}\");\n    var functions = parseWords(\"#if #elseif #foreach #set #include #parse #macro #define #evaluate \" +\n                               \"#{if} #{elseif} #{foreach} #{set} #{include} #{parse} #{macro} #{define} #{evaluate}\");\n    var specials = parseWords(\"$foreach.count $foreach.hasNext $foreach.first $foreach.last $foreach.topmost $foreach.parent.count $foreach.parent.hasNext $foreach.parent.first $foreach.parent.last $foreach.parent $velocityCount $!bodyContent $bodyContent\");\n    var isOperatorChar = /[+\\-*&%=<>!?:\\/|]/;\n\n    function chain(stream, state, f) {\n        state.tokenize = f;\n        return f(stream, state);\n    }\n    function tokenBase(stream, state) {\n        var beforeParams = state.beforeParams;\n        state.beforeParams = false;\n        var ch = stream.next();\n        // start of unparsed string?\n        if ((ch == \"'\") && state.inParams) {\n            state.lastTokenWasBuiltin = false;\n            return chain(stream, state, tokenString(ch));\n        }\n        // start of parsed string?\n        else if ((ch == '\"')) {\n            state.lastTokenWasBuiltin = false;\n            if (state.inString) {\n                state.inString = false;\n                return \"string\";\n            }\n            else if (state.inParams)\n                return chain(stream, state, tokenString(ch));\n        }\n        // is it one of the special signs []{}().,;? Seperator?\n        else if (/[\\[\\]{}\\(\\),;\\.]/.test(ch)) {\n            if (ch == \"(\" && beforeParams)\n                state.inParams = true;\n            else if (ch == \")\") {\n                state.inParams = false;\n                state.lastTokenWasBuiltin = true;\n            }\n            return null;\n        }\n        // start of a number value?\n        else if (/\\d/.test(ch)) {\n            state.lastTokenWasBuiltin = false;\n            stream.eatWhile(/[\\w\\.]/);\n            return \"number\";\n        }\n        // multi line comment?\n        else if (ch == \"#\" && stream.eat(\"*\")) {\n            state.lastTokenWasBuiltin = false;\n            return chain(stream, state, tokenComment);\n        }\n        // unparsed content?\n        else if (ch == \"#\" && stream.match(/ *\\[ *\\[/)) {\n            state.lastTokenWasBuiltin = false;\n            return chain(stream, state, tokenUnparsed);\n        }\n        // single line comment?\n        else if (ch == \"#\" && stream.eat(\"#\")) {\n            state.lastTokenWasBuiltin = false;\n            stream.skipToEnd();\n            return \"comment\";\n        }\n        // variable?\n        else if (ch == \"$\") {\n            stream.eatWhile(/[\\w\\d\\$_\\.{}]/);\n            // is it one of the specials?\n            if (specials && specials.propertyIsEnumerable(stream.current())) {\n                return \"keyword\";\n            }\n            else {\n                state.lastTokenWasBuiltin = true;\n                state.beforeParams = true;\n                return \"builtin\";\n            }\n        }\n        // is it a operator?\n        else if (isOperatorChar.test(ch)) {\n            state.lastTokenWasBuiltin = false;\n            stream.eatWhile(isOperatorChar);\n            return \"operator\";\n        }\n        else {\n            // get the whole word\n            stream.eatWhile(/[\\w\\$_{}@]/);\n            var word = stream.current();\n            // is it one of the listed keywords?\n            if (keywords && keywords.propertyIsEnumerable(word))\n                return \"keyword\";\n            // is it one of the listed functions?\n            if (functions && functions.propertyIsEnumerable(word) ||\n                    (stream.current().match(/^#@?[a-z0-9_]+ *$/i) && stream.peek()==\"(\") &&\n                     !(functions && functions.propertyIsEnumerable(word.toLowerCase()))) {\n                state.beforeParams = true;\n                state.lastTokenWasBuiltin = false;\n                return \"keyword\";\n            }\n            if (state.inString) {\n                state.lastTokenWasBuiltin = false;\n                return \"string\";\n            }\n            if (stream.pos > word.length && stream.string.charAt(stream.pos-word.length-1)==\".\" && state.lastTokenWasBuiltin)\n                return \"builtin\";\n            // default: just a \"word\"\n            state.lastTokenWasBuiltin = false;\n            return null;\n        }\n    }\n\n    function tokenString(quote) {\n        return function(stream, state) {\n            var escaped = false, next, end = false;\n            while ((next = stream.next()) != null) {\n                if ((next == quote) && !escaped) {\n                    end = true;\n                    break;\n                }\n                if (quote=='\"' && stream.peek() == '$' && !escaped) {\n                    state.inString = true;\n                    end = true;\n                    break;\n                }\n                escaped = !escaped && next == \"\\\\\";\n            }\n            if (end) state.tokenize = tokenBase;\n            return \"string\";\n        };\n    }\n\n    function tokenComment(stream, state) {\n        var maybeEnd = false, ch;\n        while (ch = stream.next()) {\n            if (ch == \"#\" && maybeEnd) {\n                state.tokenize = tokenBase;\n                break;\n            }\n            maybeEnd = (ch == \"*\");\n        }\n        return \"comment\";\n    }\n\n    function tokenUnparsed(stream, state) {\n        var maybeEnd = 0, ch;\n        while (ch = stream.next()) {\n            if (ch == \"#\" && maybeEnd == 2) {\n                state.tokenize = tokenBase;\n                break;\n            }\n            if (ch == \"]\")\n                maybeEnd++;\n            else if (ch != \" \")\n                maybeEnd = 0;\n        }\n        return \"meta\";\n    }\n    // Interface\n\n    return {\n        startState: function() {\n            return {\n                tokenize: tokenBase,\n                beforeParams: false,\n                inParams: false,\n                inString: false,\n                lastTokenWasBuiltin: false\n            };\n        },\n\n        token: function(stream, state) {\n            if (stream.eatSpace()) return null;\n            return state.tokenize(stream, state);\n        },\n        blockCommentStart: \"#*\",\n        blockCommentEnd: \"*#\",\n        lineComment: \"##\",\n        fold: \"velocity\"\n    };\n});\n\nCodeMirror.defineMIME(\"text/velocity\", \"velocity\");\n\n});\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/verilog/index.html",
    "content": "<!doctype html>\n\n<title>CodeMirror: Verilog/SystemVerilog mode</title>\n<meta charset=\"utf-8\"/>\n<link rel=stylesheet href=\"../../doc/docs.css\">\n\n<link rel=\"stylesheet\" href=\"../../lib/codemirror.css\">\n<script src=\"../../lib/codemirror.js\"></script>\n<script src=\"../../addon/edit/matchbrackets.js\"></script>\n<script src=\"verilog.js\"></script>\n<style type=\"text/css\">.CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}</style>\n<div id=nav>\n  <a href=\"http://codemirror.net\"><h1>CodeMirror</h1><img id=logo src=\"../../doc/logo.png\"></a>\n\n  <ul>\n    <li><a href=\"../../index.html\">Home</a>\n    <li><a href=\"../../doc/manual.html\">Manual</a>\n    <li><a href=\"https://github.com/codemirror/codemirror\">Code</a>\n  </ul>\n  <ul>\n    <li><a href=\"../index.html\">Language modes</a>\n    <li><a class=active href=\"#\">Verilog/SystemVerilog</a>\n  </ul>\n</div>\n\n<article>\n<h2>SystemVerilog mode</h2>\n\n<div><textarea id=\"code\" name=\"code\">\n// Literals\n1'b0\n1'bx\n1'bz\n16'hDC78\n'hdeadbeef\n'b0011xxzz\n1234\n32'd5678\n3.4e6\n-128.7\n\n// Macro definition\n`define BUS_WIDTH = 8;\n\n// Module definition\nmodule block(\n  input                   clk,\n  input                   rst_n,\n  input  [`BUS_WIDTH-1:0] data_in,\n  output [`BUS_WIDTH-1:0] data_out\n);\n  \n  always @(posedge clk or negedge rst_n) begin\n\n    if (~rst_n) begin\n      data_out <= 8'b0;\n    end else begin\n      data_out <= data_in;\n    end\n    \n    if (~rst_n)\n      data_out <= 8'b0;\n    else\n      data_out <= data_in;\n    \n    if (~rst_n)\n      begin\n        data_out <= 8'b0;\n      end\n    else\n      begin\n        data_out <= data_in;\n      end\n\n  end\n  \nendmodule\n\n// Class definition\nclass test;\n\n  /**\n   * Sum two integers\n   */\n  function int sum(int a, int b);\n    int result = a + b;\n    string msg = $sformatf(\"%d + %d = %d\", a, b, result);\n    $display(msg);\n    return result;\n  endfunction\n  \n  task delay(int num_cycles);\n    repeat(num_cycles) #1;\n  endtask\n  \nendclass\n\n</textarea></div>\n\n<script>\n  var editor = CodeMirror.fromTextArea(document.getElementById(\"code\"), {\n    lineNumbers: true,\n    matchBrackets: true,\n    mode: {\n      name: \"verilog\",\n      noIndentKeywords: [\"package\"]\n    }\n  });\n</script>\n\n<p>\nSyntax highlighting and indentation for the Verilog and SystemVerilog languages (IEEE 1800).\n<h2>Configuration options:</h2>\n  <ul>\n    <li><strong>noIndentKeywords</strong> - List of keywords which should not cause identation to increase. E.g. [\"package\", \"module\"]. Default: None</li>\n  </ul>\n</p>\n\n<p><strong>MIME types defined:</strong> <code>text/x-verilog</code> and <code>text/x-systemverilog</code>.</p>\n</article>\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/verilog/test.js",
    "content": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n(function() {\n  var mode = CodeMirror.getMode({indentUnit: 4}, \"verilog\");\n  function MT(name) { test.mode(name, mode, Array.prototype.slice.call(arguments, 1)); }\n\n  MT(\"binary_literals\",\n     \"[number 1'b0]\",\n     \"[number 1'b1]\",\n     \"[number 1'bx]\",\n     \"[number 1'bz]\",\n     \"[number 1'bX]\",\n     \"[number 1'bZ]\",\n     \"[number 1'B0]\",\n     \"[number 1'B1]\",\n     \"[number 1'Bx]\",\n     \"[number 1'Bz]\",\n     \"[number 1'BX]\",\n     \"[number 1'BZ]\",\n     \"[number 1'b0]\",\n     \"[number 1'b1]\",\n     \"[number 2'b01]\",\n     \"[number 2'bxz]\",\n     \"[number 2'b11]\",\n     \"[number 2'b10]\",\n     \"[number 2'b1Z]\",\n     \"[number 12'b0101_0101_0101]\",\n     \"[number 1'b 0]\",\n     \"[number 'b0101]\"\n  );\n\n  MT(\"octal_literals\",\n     \"[number 3'o7]\",\n     \"[number 3'O7]\",\n     \"[number 3'so7]\",\n     \"[number 3'SO7]\"\n  );\n\n  MT(\"decimal_literals\",\n     \"[number 0]\",\n     \"[number 1]\",\n     \"[number 7]\",\n     \"[number 123_456]\",\n     \"[number 'd33]\",\n     \"[number 8'd255]\",\n     \"[number 8'D255]\",\n     \"[number 8'sd255]\",\n     \"[number 8'SD255]\",\n     \"[number 32'd123]\",\n     \"[number 32 'd123]\",\n     \"[number 32 'd 123]\"\n  );\n\n  MT(\"hex_literals\",\n     \"[number 4'h0]\",\n     \"[number 4'ha]\",\n     \"[number 4'hF]\",\n     \"[number 4'hx]\",\n     \"[number 4'hz]\",\n     \"[number 4'hX]\",\n     \"[number 4'hZ]\",\n     \"[number 32'hdc78]\",\n     \"[number 32'hDC78]\",\n     \"[number 32 'hDC78]\",\n     \"[number 32'h DC78]\",\n     \"[number 32 'h DC78]\",\n     \"[number 32'h44x7]\",\n     \"[number 32'hFFF?]\"\n  );\n\n  MT(\"real_number_literals\",\n     \"[number 1.2]\",\n     \"[number 0.1]\",\n     \"[number 2394.26331]\",\n     \"[number 1.2E12]\",\n     \"[number 1.2e12]\",\n     \"[number 1.30e-2]\",\n     \"[number 0.1e-0]\",\n     \"[number 23E10]\",\n     \"[number 29E-2]\",\n     \"[number 236.123_763_e-12]\"\n  );\n\n  MT(\"operators\",\n     \"[meta ^]\"\n  );\n\n  MT(\"keywords\",\n     \"[keyword logic]\",\n     \"[keyword logic] [variable foo]\",\n     \"[keyword reg] [variable abc]\"\n  );\n\n  MT(\"variables\",\n     \"[variable _leading_underscore]\",\n     \"[variable _if]\",\n     \"[number 12] [variable foo]\",\n     \"[variable foo] [number 14]\"\n  );\n\n  MT(\"tick_defines\",\n     \"[def `FOO]\",\n     \"[def `foo]\",\n     \"[def `FOO_bar]\"\n  );\n\n  MT(\"system_calls\",\n     \"[meta $display]\",\n     \"[meta $vpi_printf]\"\n  );\n\n  MT(\"line_comment\", \"[comment // Hello world]\");\n\n  // Alignment tests\n  MT(\"align_port_map_style1\",\n     /**\n      * mod mod(.a(a),\n      *         .b(b)\n      *        );\n      */\n     \"[variable mod] [variable mod][bracket (].[variable a][bracket (][variable a][bracket )],\",\n     \"        .[variable b][bracket (][variable b][bracket )]\",\n     \"       [bracket )];\",\n     \"\"\n  );\n\n  MT(\"align_port_map_style2\",\n     /**\n      * mod mod(\n      *     .a(a),\n      *     .b(b)\n      * );\n      */\n     \"[variable mod] [variable mod][bracket (]\",\n     \"    .[variable a][bracket (][variable a][bracket )],\",\n     \"    .[variable b][bracket (][variable b][bracket )]\",\n     \"[bracket )];\",\n     \"\"\n  );\n\n  // Indentation tests\n  MT(\"indent_single_statement_if\",\n      \"[keyword if] [bracket (][variable foo][bracket )]\",\n      \"    [keyword break];\",\n      \"\"\n  );\n\n  MT(\"no_indent_after_single_line_if\",\n      \"[keyword if] [bracket (][variable foo][bracket )] [keyword break];\",\n      \"\"\n  );\n\n  MT(\"indent_after_if_begin_same_line\",\n      \"[keyword if] [bracket (][variable foo][bracket )] [keyword begin]\",\n      \"    [keyword break];\",\n      \"    [keyword break];\",\n      \"[keyword end]\",\n      \"\"\n  );\n\n  MT(\"indent_after_if_begin_next_line\",\n      \"[keyword if] [bracket (][variable foo][bracket )]\",\n      \"    [keyword begin]\",\n      \"        [keyword break];\",\n      \"        [keyword break];\",\n      \"    [keyword end]\",\n      \"\"\n  );\n\n  MT(\"indent_single_statement_if_else\",\n      \"[keyword if] [bracket (][variable foo][bracket )]\",\n      \"    [keyword break];\",\n      \"[keyword else]\",\n      \"    [keyword break];\",\n      \"\"\n  );\n\n  MT(\"indent_if_else_begin_same_line\",\n      \"[keyword if] [bracket (][variable foo][bracket )] [keyword begin]\",\n      \"    [keyword break];\",\n      \"    [keyword break];\",\n      \"[keyword end] [keyword else] [keyword begin]\",\n      \"    [keyword break];\",\n      \"    [keyword break];\",\n      \"[keyword end]\",\n      \"\"\n  );\n\n  MT(\"indent_if_else_begin_next_line\",\n      \"[keyword if] [bracket (][variable foo][bracket )]\",\n      \"    [keyword begin]\",\n      \"        [keyword break];\",\n      \"        [keyword break];\",\n      \"    [keyword end]\",\n      \"[keyword else]\",\n      \"    [keyword begin]\",\n      \"        [keyword break];\",\n      \"        [keyword break];\",\n      \"    [keyword end]\",\n      \"\"\n  );\n\n  MT(\"indent_if_nested_without_begin\",\n      \"[keyword if] [bracket (][variable foo][bracket )]\",\n      \"    [keyword if] [bracket (][variable foo][bracket )]\",\n      \"        [keyword if] [bracket (][variable foo][bracket )]\",\n      \"            [keyword break];\",\n      \"\"\n  );\n\n  MT(\"indent_case\",\n      \"[keyword case] [bracket (][variable state][bracket )]\",\n      \"    [variable FOO]:\",\n      \"        [keyword break];\",\n      \"    [variable BAR]:\",\n      \"        [keyword break];\",\n      \"[keyword endcase]\",\n      \"\"\n  );\n\n  MT(\"unindent_after_end_with_preceding_text\",\n      \"[keyword begin]\",\n      \"    [keyword break]; [keyword end]\",\n      \"\"\n  );\n\n  MT(\"export_function_one_line_does_not_indent\",\n     \"[keyword export] [string \\\"DPI-C\\\"] [keyword function] [variable helloFromSV];\",\n     \"\"\n  );\n\n  MT(\"export_task_one_line_does_not_indent\",\n     \"[keyword export] [string \\\"DPI-C\\\"] [keyword task] [variable helloFromSV];\",\n     \"\"\n  );\n\n  MT(\"export_function_two_lines_indents_properly\",\n    \"[keyword export]\",\n    \"    [string \\\"DPI-C\\\"] [keyword function] [variable helloFromSV];\",\n    \"\"\n  );\n\n  MT(\"export_task_two_lines_indents_properly\",\n    \"[keyword export]\",\n    \"    [string \\\"DPI-C\\\"] [keyword task] [variable helloFromSV];\",\n    \"\"\n  );\n\n  MT(\"import_function_one_line_does_not_indent\",\n    \"[keyword import] [string \\\"DPI-C\\\"] [keyword function] [variable helloFromC];\",\n    \"\"\n  );\n\n  MT(\"import_task_one_line_does_not_indent\",\n    \"[keyword import] [string \\\"DPI-C\\\"] [keyword task] [variable helloFromC];\",\n    \"\"\n  );\n\n  MT(\"import_package_single_line_does_not_indent\",\n    \"[keyword import] [variable p]::[variable x];\",\n    \"[keyword import] [variable p]::[variable y];\",\n    \"\"\n  );\n\n  MT(\"covergoup_with_function_indents_properly\",\n    \"[keyword covergroup] [variable cg] [keyword with] [keyword function] [variable sample][bracket (][keyword bit] [variable b][bracket )];\",\n    \"    [variable c] : [keyword coverpoint] [variable c];\",\n    \"[keyword endgroup]: [variable cg]\",\n    \"\"\n  );\n\n})();\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/verilog/verilog.js",
    "content": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n(function(mod) {\n  if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n    mod(require(\"../../lib/codemirror\"));\n  else if (typeof define == \"function\" && define.amd) // AMD\n    define([\"../../lib/codemirror\"], mod);\n  else // Plain browser env\n    mod(CodeMirror);\n})(function(CodeMirror) {\n\"use strict\";\n\nCodeMirror.defineMode(\"verilog\", function(config, parserConfig) {\n\n  var indentUnit = config.indentUnit,\n      statementIndentUnit = parserConfig.statementIndentUnit || indentUnit,\n      dontAlignCalls = parserConfig.dontAlignCalls,\n      noIndentKeywords = parserConfig.noIndentKeywords || [],\n      multiLineStrings = parserConfig.multiLineStrings,\n      hooks = parserConfig.hooks || {};\n\n  function words(str) {\n    var obj = {}, words = str.split(\" \");\n    for (var i = 0; i < words.length; ++i) obj[words[i]] = true;\n    return obj;\n  }\n\n  /**\n   * Keywords from IEEE 1800-2012\n   */\n  var keywords = words(\n    \"accept_on alias always always_comb always_ff always_latch and assert assign assume automatic before begin bind \" +\n    \"bins binsof bit break buf bufif0 bufif1 byte case casex casez cell chandle checker class clocking cmos config \" +\n    \"const constraint context continue cover covergroup coverpoint cross deassign default defparam design disable \" +\n    \"dist do edge else end endcase endchecker endclass endclocking endconfig endfunction endgenerate endgroup \" +\n    \"endinterface endmodule endpackage endprimitive endprogram endproperty endspecify endsequence endtable endtask \" +\n    \"enum event eventually expect export extends extern final first_match for force foreach forever fork forkjoin \" +\n    \"function generate genvar global highz0 highz1 if iff ifnone ignore_bins illegal_bins implements implies import \" +\n    \"incdir include initial inout input inside instance int integer interconnect interface intersect join join_any \" +\n    \"join_none large let liblist library local localparam logic longint macromodule matches medium modport module \" +\n    \"nand negedge nettype new nexttime nmos nor noshowcancelled not notif0 notif1 null or output package packed \" +\n    \"parameter pmos posedge primitive priority program property protected pull0 pull1 pulldown pullup \" +\n    \"pulsestyle_ondetect pulsestyle_onevent pure rand randc randcase randsequence rcmos real realtime ref reg \" +\n    \"reject_on release repeat restrict return rnmos rpmos rtran rtranif0 rtranif1 s_always s_eventually s_nexttime \" +\n    \"s_until s_until_with scalared sequence shortint shortreal showcancelled signed small soft solve specify \" +\n    \"specparam static string strong strong0 strong1 struct super supply0 supply1 sync_accept_on sync_reject_on \" +\n    \"table tagged task this throughout time timeprecision timeunit tran tranif0 tranif1 tri tri0 tri1 triand trior \" +\n    \"trireg type typedef union unique unique0 unsigned until until_with untyped use uwire var vectored virtual void \" +\n    \"wait wait_order wand weak weak0 weak1 while wildcard wire with within wor xnor xor\");\n\n  /** Operators from IEEE 1800-2012\n     unary_operator ::=\n       + | - | ! | ~ | & | ~& | | | ~| | ^ | ~^ | ^~\n     binary_operator ::=\n       + | - | * | / | % | == | != | === | !== | ==? | !=? | && | || | **\n       | < | <= | > | >= | & | | | ^ | ^~ | ~^ | >> | << | >>> | <<<\n       | -> | <->\n     inc_or_dec_operator ::= ++ | --\n     unary_module_path_operator ::=\n       ! | ~ | & | ~& | | | ~| | ^ | ~^ | ^~\n     binary_module_path_operator ::=\n       == | != | && | || | & | | | ^ | ^~ | ~^\n  */\n  var isOperatorChar = /[\\+\\-\\*\\/!~&|^%=?:]/;\n  var isBracketChar = /[\\[\\]{}()]/;\n\n  var unsignedNumber = /\\d[0-9_]*/;\n  var decimalLiteral = /\\d*\\s*'s?d\\s*\\d[0-9_]*/i;\n  var binaryLiteral = /\\d*\\s*'s?b\\s*[xz01][xz01_]*/i;\n  var octLiteral = /\\d*\\s*'s?o\\s*[xz0-7][xz0-7_]*/i;\n  var hexLiteral = /\\d*\\s*'s?h\\s*[0-9a-fxz?][0-9a-fxz?_]*/i;\n  var realLiteral = /(\\d[\\d_]*(\\.\\d[\\d_]*)?E-?[\\d_]+)|(\\d[\\d_]*\\.\\d[\\d_]*)/i;\n\n  var closingBracketOrWord = /^((\\w+)|[)}\\]])/;\n  var closingBracket = /[)}\\]]/;\n\n  var curPunc;\n  var curKeyword;\n\n  // Block openings which are closed by a matching keyword in the form of (\"end\" + keyword)\n  // E.g. \"task\" => \"endtask\"\n  var blockKeywords = words(\n    \"case checker class clocking config function generate interface module package\" +\n    \"primitive program property specify sequence table task\"\n  );\n\n  // Opening/closing pairs\n  var openClose = {};\n  for (var keyword in blockKeywords) {\n    openClose[keyword] = \"end\" + keyword;\n  }\n  openClose[\"begin\"] = \"end\";\n  openClose[\"casex\"] = \"endcase\";\n  openClose[\"casez\"] = \"endcase\";\n  openClose[\"do\"   ] = \"while\";\n  openClose[\"fork\" ] = \"join;join_any;join_none\";\n  openClose[\"covergroup\"] = \"endgroup\";\n\n  for (var i in noIndentKeywords) {\n    var keyword = noIndentKeywords[i];\n    if (openClose[keyword]) {\n      openClose[keyword] = undefined;\n    }\n  }\n\n  // Keywords which open statements that are ended with a semi-colon\n  var statementKeywords = words(\"always always_comb always_ff always_latch assert assign assume else export for foreach forever if import initial repeat while\");\n\n  function tokenBase(stream, state) {\n    var ch = stream.peek(), style;\n    if (hooks[ch] && (style = hooks[ch](stream, state)) != false) return style;\n    if (hooks.tokenBase && (style = hooks.tokenBase(stream, state)) != false)\n      return style;\n\n    if (/[,;:\\.]/.test(ch)) {\n      curPunc = stream.next();\n      return null;\n    }\n    if (isBracketChar.test(ch)) {\n      curPunc = stream.next();\n      return \"bracket\";\n    }\n    // Macros (tick-defines)\n    if (ch == '`') {\n      stream.next();\n      if (stream.eatWhile(/[\\w\\$_]/)) {\n        return \"def\";\n      } else {\n        return null;\n      }\n    }\n    // System calls\n    if (ch == '$') {\n      stream.next();\n      if (stream.eatWhile(/[\\w\\$_]/)) {\n        return \"meta\";\n      } else {\n        return null;\n      }\n    }\n    // Time literals\n    if (ch == '#') {\n      stream.next();\n      stream.eatWhile(/[\\d_.]/);\n      return \"def\";\n    }\n    // Strings\n    if (ch == '\"') {\n      stream.next();\n      state.tokenize = tokenString(ch);\n      return state.tokenize(stream, state);\n    }\n    // Comments\n    if (ch == \"/\") {\n      stream.next();\n      if (stream.eat(\"*\")) {\n        state.tokenize = tokenComment;\n        return tokenComment(stream, state);\n      }\n      if (stream.eat(\"/\")) {\n        stream.skipToEnd();\n        return \"comment\";\n      }\n      stream.backUp(1);\n    }\n\n    // Numeric literals\n    if (stream.match(realLiteral) ||\n        stream.match(decimalLiteral) ||\n        stream.match(binaryLiteral) ||\n        stream.match(octLiteral) ||\n        stream.match(hexLiteral) ||\n        stream.match(unsignedNumber) ||\n        stream.match(realLiteral)) {\n      return \"number\";\n    }\n\n    // Operators\n    if (stream.eatWhile(isOperatorChar)) {\n      return \"meta\";\n    }\n\n    // Keywords / plain variables\n    if (stream.eatWhile(/[\\w\\$_]/)) {\n      var cur = stream.current();\n      if (keywords[cur]) {\n        if (openClose[cur]) {\n          curPunc = \"newblock\";\n        }\n        if (statementKeywords[cur]) {\n          curPunc = \"newstatement\";\n        }\n        curKeyword = cur;\n        return \"keyword\";\n      }\n      return \"variable\";\n    }\n\n    stream.next();\n    return null;\n  }\n\n  function tokenString(quote) {\n    return function(stream, state) {\n      var escaped = false, next, end = false;\n      while ((next = stream.next()) != null) {\n        if (next == quote && !escaped) {end = true; break;}\n        escaped = !escaped && next == \"\\\\\";\n      }\n      if (end || !(escaped || multiLineStrings))\n        state.tokenize = tokenBase;\n      return \"string\";\n    };\n  }\n\n  function tokenComment(stream, state) {\n    var maybeEnd = false, ch;\n    while (ch = stream.next()) {\n      if (ch == \"/\" && maybeEnd) {\n        state.tokenize = tokenBase;\n        break;\n      }\n      maybeEnd = (ch == \"*\");\n    }\n    return \"comment\";\n  }\n\n  function Context(indented, column, type, align, prev) {\n    this.indented = indented;\n    this.column = column;\n    this.type = type;\n    this.align = align;\n    this.prev = prev;\n  }\n  function pushContext(state, col, type) {\n    var indent = state.indented;\n    var c = new Context(indent, col, type, null, state.context);\n    return state.context = c;\n  }\n  function popContext(state) {\n    var t = state.context.type;\n    if (t == \")\" || t == \"]\" || t == \"}\") {\n      state.indented = state.context.indented;\n    }\n    return state.context = state.context.prev;\n  }\n\n  function isClosing(text, contextClosing) {\n    if (text == contextClosing) {\n      return true;\n    } else {\n      // contextClosing may be mulitple keywords separated by ;\n      var closingKeywords = contextClosing.split(\";\");\n      for (var i in closingKeywords) {\n        if (text == closingKeywords[i]) {\n          return true;\n        }\n      }\n      return false;\n    }\n  }\n\n  function buildElectricInputRegEx() {\n    // Reindentation should occur on any bracket char: {}()[]\n    // or on a match of any of the block closing keywords, at\n    // the end of a line\n    var allClosings = [];\n    for (var i in openClose) {\n      if (openClose[i]) {\n        var closings = openClose[i].split(\";\");\n        for (var j in closings) {\n          allClosings.push(closings[j]);\n        }\n      }\n    }\n    var re = new RegExp(\"[{}()\\\\[\\\\]]|(\" + allClosings.join(\"|\") + \")$\");\n    return re;\n  }\n\n  // Interface\n  return {\n\n    // Regex to force current line to reindent\n    electricInput: buildElectricInputRegEx(),\n\n    startState: function(basecolumn) {\n      var state = {\n        tokenize: null,\n        context: new Context((basecolumn || 0) - indentUnit, 0, \"top\", false),\n        indented: 0,\n        startOfLine: true\n      };\n      if (hooks.startState) hooks.startState(state);\n      return state;\n    },\n\n    token: function(stream, state) {\n      var ctx = state.context;\n      if (stream.sol()) {\n        if (ctx.align == null) ctx.align = false;\n        state.indented = stream.indentation();\n        state.startOfLine = true;\n      }\n      if (hooks.token) hooks.token(stream, state);\n      if (stream.eatSpace()) return null;\n      curPunc = null;\n      curKeyword = null;\n      var style = (state.tokenize || tokenBase)(stream, state);\n      if (style == \"comment\" || style == \"meta\" || style == \"variable\") return style;\n      if (ctx.align == null) ctx.align = true;\n\n      if (curPunc == ctx.type) {\n        popContext(state);\n      } else if ((curPunc == \";\" && ctx.type == \"statement\") ||\n               (ctx.type && isClosing(curKeyword, ctx.type))) {\n        ctx = popContext(state);\n        while (ctx && ctx.type == \"statement\") ctx = popContext(state);\n      } else if (curPunc == \"{\") {\n        pushContext(state, stream.column(), \"}\");\n      } else if (curPunc == \"[\") {\n        pushContext(state, stream.column(), \"]\");\n      } else if (curPunc == \"(\") {\n        pushContext(state, stream.column(), \")\");\n      } else if (ctx && ctx.type == \"endcase\" && curPunc == \":\") {\n        pushContext(state, stream.column(), \"statement\");\n      } else if (curPunc == \"newstatement\") {\n        pushContext(state, stream.column(), \"statement\");\n      } else if (curPunc == \"newblock\") {\n        if (curKeyword == \"function\" && ctx && (ctx.type == \"statement\" || ctx.type == \"endgroup\")) {\n          // The 'function' keyword can appear in some other contexts where it actually does not\n          // indicate a function (import/export DPI and covergroup definitions).\n          // Do nothing in this case\n        } else if (curKeyword == \"task\" && ctx && ctx.type == \"statement\") {\n          // Same thing for task\n        } else {\n          var close = openClose[curKeyword];\n          pushContext(state, stream.column(), close);\n        }\n      }\n\n      state.startOfLine = false;\n      return style;\n    },\n\n    indent: function(state, textAfter) {\n      if (state.tokenize != tokenBase && state.tokenize != null) return CodeMirror.Pass;\n      if (hooks.indent) {\n        var fromHook = hooks.indent(state);\n        if (fromHook >= 0) return fromHook;\n      }\n      var ctx = state.context, firstChar = textAfter && textAfter.charAt(0);\n      if (ctx.type == \"statement\" && firstChar == \"}\") ctx = ctx.prev;\n      var closing = false;\n      var possibleClosing = textAfter.match(closingBracketOrWord);\n      if (possibleClosing)\n        closing = isClosing(possibleClosing[0], ctx.type);\n      if (ctx.type == \"statement\") return ctx.indented + (firstChar == \"{\" ? 0 : statementIndentUnit);\n      else if (closingBracket.test(ctx.type) && ctx.align && !dontAlignCalls) return ctx.column + (closing ? 0 : 1);\n      else if (ctx.type == \")\" && !closing) return ctx.indented + statementIndentUnit;\n      else return ctx.indented + (closing ? 0 : indentUnit);\n    },\n\n    blockCommentStart: \"/*\",\n    blockCommentEnd: \"*/\",\n    lineComment: \"//\"\n  };\n});\n\n  CodeMirror.defineMIME(\"text/x-verilog\", {\n    name: \"verilog\"\n  });\n\n  CodeMirror.defineMIME(\"text/x-systemverilog\", {\n    name: \"verilog\"\n  });\n\n  // SVXVerilog mode\n\n  var svxchScopePrefixes = {\n    \">\": \"property\", \"->\": \"property\", \"-\": \"hr\", \"|\": \"link\", \"?$\": \"qualifier\", \"?*\": \"qualifier\",\n    \"@-\": \"variable-3\", \"@\": \"variable-3\", \"?\": \"qualifier\"\n  };\n\n  function svxGenIndent(stream, state) {\n    var svxindentUnit = 2;\n    var rtnIndent = -1, indentUnitRq = 0, curIndent = stream.indentation();\n    switch (state.svxCurCtlFlowChar) {\n    case \"\\\\\":\n      curIndent = 0;\n      break;\n    case \"|\":\n      if (state.svxPrevPrevCtlFlowChar == \"@\") {\n        indentUnitRq = -2; //-2 new pipe rq after cur pipe\n        break;\n      }\n      if (svxchScopePrefixes[state.svxPrevCtlFlowChar])\n        indentUnitRq = 1; // +1 new scope\n      break;\n    case \"M\":  // m4\n      if (state.svxPrevPrevCtlFlowChar == \"@\") {\n        indentUnitRq = -2; //-2 new inst rq after  pipe\n        break;\n      }\n      if (svxchScopePrefixes[state.svxPrevCtlFlowChar])\n        indentUnitRq = 1; // +1 new scope\n      break;\n    case \"@\":\n      if (state.svxPrevCtlFlowChar == \"S\")\n        indentUnitRq = -1; // new pipe stage after stmts\n      if (state.svxPrevCtlFlowChar == \"|\")\n        indentUnitRq = 1; // 1st pipe stage\n      break;\n    case \"S\":\n      if (state.svxPrevCtlFlowChar == \"@\")\n        indentUnitRq = 1; // flow in pipe stage\n      if (svxchScopePrefixes[state.svxPrevCtlFlowChar])\n        indentUnitRq = 1; // +1 new scope\n      break;\n    }\n    var statementIndentUnit = svxindentUnit;\n    rtnIndent = curIndent + (indentUnitRq*statementIndentUnit);\n    return rtnIndent >= 0 ? rtnIndent : curIndent;\n  }\n\n  CodeMirror.defineMIME(\"text/x-svx\", {\n    name: \"verilog\",\n    hooks: {\n      \"\\\\\": function(stream, state) {\n        var vxIndent = 0, style = false;\n        var curPunc  = stream.string;\n        if ((stream.sol()) && (/\\\\SV/.test(stream.string))) {\n          curPunc = (/\\\\SVX_version/.test(stream.string))\n            ? \"\\\\SVX_version\" : stream.string;\n          stream.skipToEnd();\n          if (curPunc == \"\\\\SV\" && state.vxCodeActive) {state.vxCodeActive = false;};\n          if ((/\\\\SVX/.test(curPunc) && !state.vxCodeActive)\n            || (curPunc==\"\\\\SVX_version\" && state.vxCodeActive)) {state.vxCodeActive = true;};\n          style = \"keyword\";\n          state.svxCurCtlFlowChar  = state.svxPrevPrevCtlFlowChar\n            = state.svxPrevCtlFlowChar = \"\";\n          if (state.vxCodeActive == true) {\n            state.svxCurCtlFlowChar  = \"\\\\\";\n            vxIndent = svxGenIndent(stream, state);\n          }\n          state.vxIndentRq = vxIndent;\n        }\n        return style;\n      },\n      tokenBase: function(stream, state) {\n        var vxIndent = 0, style = false;\n        var svxisOperatorChar = /[\\[\\]=:]/;\n        var svxkpScopePrefixs = {\n          \"**\":\"variable-2\", \"*\":\"variable-2\", \"$$\":\"variable\", \"$\":\"variable\",\n          \"^^\":\"attribute\", \"^\":\"attribute\"};\n        var ch = stream.peek();\n        var vxCurCtlFlowCharValueAtStart = state.svxCurCtlFlowChar;\n        if (state.vxCodeActive == true) {\n          if (/[\\[\\]{}\\(\\);\\:]/.test(ch)) {\n            // bypass nesting and 1 char punc\n            style = \"meta\";\n            stream.next();\n          } else if (ch == \"/\") {\n            stream.next();\n            if (stream.eat(\"/\")) {\n              stream.skipToEnd();\n              style = \"comment\";\n              state.svxCurCtlFlowChar = \"S\";\n            } else {\n              stream.backUp(1);\n            }\n          } else if (ch == \"@\") {\n            // pipeline stage\n            style = svxchScopePrefixes[ch];\n            state.svxCurCtlFlowChar = \"@\";\n            stream.next();\n            stream.eatWhile(/[\\w\\$_]/);\n          } else if (stream.match(/\\b[mM]4+/, true)) { // match: function(pattern, consume, caseInsensitive)\n            // m4 pre proc\n            stream.skipTo(\"(\");\n            style = \"def\";\n            state.svxCurCtlFlowChar = \"M\";\n          } else if (ch == \"!\" && stream.sol()) {\n            // v stmt in svx region\n            // state.svxCurCtlFlowChar  = \"S\";\n            style = \"comment\";\n            stream.next();\n          } else if (svxisOperatorChar.test(ch)) {\n            // operators\n            stream.eatWhile(svxisOperatorChar);\n            style = \"operator\";\n          } else if (ch == \"#\") {\n            // phy hier\n            state.svxCurCtlFlowChar  = (state.svxCurCtlFlowChar == \"\")\n              ? ch : state.svxCurCtlFlowChar;\n            stream.next();\n            stream.eatWhile(/[+-]\\d/);\n            style = \"tag\";\n          } else if (svxkpScopePrefixs.propertyIsEnumerable(ch)) {\n            // special SVX operators\n            style = svxkpScopePrefixs[ch];\n            state.svxCurCtlFlowChar = state.svxCurCtlFlowChar == \"\" ? \"S\" : state.svxCurCtlFlowChar;  // stmt\n            stream.next();\n            stream.match(/[a-zA-Z_0-9]+/);\n          } else if (style = svxchScopePrefixes[ch] || false) {\n            // special SVX operators\n            state.svxCurCtlFlowChar = state.svxCurCtlFlowChar == \"\" ? ch : state.svxCurCtlFlowChar;\n            stream.next();\n            stream.match(/[a-zA-Z_0-9]+/);\n          }\n          if (state.svxCurCtlFlowChar != vxCurCtlFlowCharValueAtStart) { // flow change\n            vxIndent = svxGenIndent(stream, state);\n            state.vxIndentRq = vxIndent;\n          }\n        }\n        return style;\n      },\n      token: function(stream, state) {\n        if (state.vxCodeActive == true && stream.sol() && state.svxCurCtlFlowChar != \"\") {\n          state.svxPrevPrevCtlFlowChar = state.svxPrevCtlFlowChar;\n          state.svxPrevCtlFlowChar = state.svxCurCtlFlowChar;\n          state.svxCurCtlFlowChar = \"\";\n        }\n      },\n      indent: function(state) {\n        return (state.vxCodeActive == true) ? state.vxIndentRq : -1;\n      },\n      startState: function(state) {\n        state.svxCurCtlFlowChar = \"\";\n        state.svxPrevCtlFlowChar = \"\";\n        state.svxPrevPrevCtlFlowChar = \"\";\n        state.vxCodeActive = true;\n        state.vxIndentRq = 0;\n      }\n    }\n  });\n});\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/xml/index.html",
    "content": "<!doctype html>\n\n<title>CodeMirror: XML mode</title>\n<meta charset=\"utf-8\"/>\n<link rel=stylesheet href=\"../../doc/docs.css\">\n\n<link rel=\"stylesheet\" href=\"../../lib/codemirror.css\">\n<script src=\"../../lib/codemirror.js\"></script>\n<script src=\"xml.js\"></script>\n<style type=\"text/css\">.CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}</style>\n<div id=nav>\n  <a href=\"http://codemirror.net\"><h1>CodeMirror</h1><img id=logo src=\"../../doc/logo.png\"></a>\n\n  <ul>\n    <li><a href=\"../../index.html\">Home</a>\n    <li><a href=\"../../doc/manual.html\">Manual</a>\n    <li><a href=\"https://github.com/codemirror/codemirror\">Code</a>\n  </ul>\n  <ul>\n    <li><a href=\"../index.html\">Language modes</a>\n    <li><a class=active href=\"#\">XML</a>\n  </ul>\n</div>\n\n<article>\n<h2>XML mode</h2>\n<form><textarea id=\"code\" name=\"code\">\n&lt;html style=\"color: green\"&gt;\n  &lt;!-- this is a comment --&gt;\n  &lt;head&gt;\n    &lt;title&gt;HTML Example&lt;/title&gt;\n  &lt;/head&gt;\n  &lt;body&gt;\n    The indentation tries to be &lt;em&gt;somewhat &amp;quot;do what\n    I mean&amp;quot;&lt;/em&gt;... but might not match your style.\n  &lt;/body&gt;\n&lt;/html&gt;\n</textarea></form>\n    <script>\n      var editor = CodeMirror.fromTextArea(document.getElementById(\"code\"), {\n        mode: \"text/html\",\n        lineNumbers: true\n      });\n    </script>\n    <p>The XML mode supports two configuration parameters:</p>\n    <dl>\n      <dt><code>htmlMode (boolean)</code></dt>\n      <dd>This switches the mode to parse HTML instead of XML. This\n      means attributes do not have to be quoted, and some elements\n      (such as <code>br</code>) do not require a closing tag.</dd>\n      <dt><code>alignCDATA (boolean)</code></dt>\n      <dd>Setting this to true will force the opening tag of CDATA\n      blocks to not be indented.</dd>\n    </dl>\n\n    <p><strong>MIME types defined:</strong> <code>application/xml</code>, <code>text/html</code>.</p>\n  </article>\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/xml/test.js",
    "content": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n(function() {\n  var mode = CodeMirror.getMode({indentUnit: 2}, \"xml\"), mname = \"xml\";\n  function MT(name) { test.mode(name, mode, Array.prototype.slice.call(arguments, 1), mname); }\n\n  MT(\"matching\",\n     \"[tag&bracket <][tag top][tag&bracket >]\",\n     \"  text\",\n     \"  [tag&bracket <][tag inner][tag&bracket />]\",\n     \"[tag&bracket </][tag top][tag&bracket >]\");\n\n  MT(\"nonmatching\",\n     \"[tag&bracket <][tag top][tag&bracket >]\",\n     \"  [tag&bracket <][tag inner][tag&bracket />]\",\n     \"  [tag&bracket </][tag&error tip][tag&bracket&error >]\");\n\n  MT(\"doctype\",\n     \"[meta <!doctype foobar>]\",\n     \"[tag&bracket <][tag top][tag&bracket />]\");\n\n  MT(\"cdata\",\n     \"[tag&bracket <][tag top][tag&bracket >]\",\n     \"  [atom <![CDATA[foo]\",\n     \"[atom barbazguh]]]]>]\",\n     \"[tag&bracket </][tag top][tag&bracket >]\");\n\n  // HTML tests\n  mode = CodeMirror.getMode({indentUnit: 2}, \"text/html\");\n\n  MT(\"selfclose\",\n     \"[tag&bracket <][tag html][tag&bracket >]\",\n     \"  [tag&bracket <][tag link] [attribute rel]=[string stylesheet] [attribute href]=[string \\\"/foobar\\\"][tag&bracket >]\",\n     \"[tag&bracket </][tag html][tag&bracket >]\");\n\n  MT(\"list\",\n     \"[tag&bracket <][tag ol][tag&bracket >]\",\n     \"  [tag&bracket <][tag li][tag&bracket >]one\",\n     \"  [tag&bracket <][tag li][tag&bracket >]two\",\n     \"[tag&bracket </][tag ol][tag&bracket >]\");\n\n  MT(\"valueless\",\n     \"[tag&bracket <][tag input] [attribute type]=[string checkbox] [attribute checked][tag&bracket />]\");\n\n  MT(\"pThenArticle\",\n     \"[tag&bracket <][tag p][tag&bracket >]\",\n     \"  foo\",\n     \"[tag&bracket <][tag article][tag&bracket >]bar\");\n\n})();\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/xml/xml.js",
    "content": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n(function(mod) {\n  if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n    mod(require(\"../../lib/codemirror\"));\n  else if (typeof define == \"function\" && define.amd) // AMD\n    define([\"../../lib/codemirror\"], mod);\n  else // Plain browser env\n    mod(CodeMirror);\n})(function(CodeMirror) {\n\"use strict\";\n\nCodeMirror.defineMode(\"xml\", function(config, parserConfig) {\n  var indentUnit = config.indentUnit;\n  var multilineTagIndentFactor = parserConfig.multilineTagIndentFactor || 1;\n  var multilineTagIndentPastTag = parserConfig.multilineTagIndentPastTag;\n  if (multilineTagIndentPastTag == null) multilineTagIndentPastTag = true;\n\n  var Kludges = parserConfig.htmlMode ? {\n    autoSelfClosers: {'area': true, 'base': true, 'br': true, 'col': true, 'command': true,\n                      'embed': true, 'frame': true, 'hr': true, 'img': true, 'input': true,\n                      'keygen': true, 'link': true, 'meta': true, 'param': true, 'source': true,\n                      'track': true, 'wbr': true, 'menuitem': true},\n    implicitlyClosed: {'dd': true, 'li': true, 'optgroup': true, 'option': true, 'p': true,\n                       'rp': true, 'rt': true, 'tbody': true, 'td': true, 'tfoot': true,\n                       'th': true, 'tr': true},\n    contextGrabbers: {\n      'dd': {'dd': true, 'dt': true},\n      'dt': {'dd': true, 'dt': true},\n      'li': {'li': true},\n      'option': {'option': true, 'optgroup': true},\n      'optgroup': {'optgroup': true},\n      'p': {'address': true, 'article': true, 'aside': true, 'blockquote': true, 'dir': true,\n            'div': true, 'dl': true, 'fieldset': true, 'footer': true, 'form': true,\n            'h1': true, 'h2': true, 'h3': true, 'h4': true, 'h5': true, 'h6': true,\n            'header': true, 'hgroup': true, 'hr': true, 'menu': true, 'nav': true, 'ol': true,\n            'p': true, 'pre': true, 'section': true, 'table': true, 'ul': true},\n      'rp': {'rp': true, 'rt': true},\n      'rt': {'rp': true, 'rt': true},\n      'tbody': {'tbody': true, 'tfoot': true},\n      'td': {'td': true, 'th': true},\n      'tfoot': {'tbody': true},\n      'th': {'td': true, 'th': true},\n      'thead': {'tbody': true, 'tfoot': true},\n      'tr': {'tr': true}\n    },\n    doNotIndent: {\"pre\": true},\n    allowUnquoted: true,\n    allowMissing: true,\n    caseFold: true\n  } : {\n    autoSelfClosers: {},\n    implicitlyClosed: {},\n    contextGrabbers: {},\n    doNotIndent: {},\n    allowUnquoted: false,\n    allowMissing: false,\n    caseFold: false\n  };\n  var alignCDATA = parserConfig.alignCDATA;\n\n  // Return variables for tokenizers\n  var type, setStyle;\n\n  function inText(stream, state) {\n    function chain(parser) {\n      state.tokenize = parser;\n      return parser(stream, state);\n    }\n\n    var ch = stream.next();\n    if (ch == \"<\") {\n      if (stream.eat(\"!\")) {\n        if (stream.eat(\"[\")) {\n          if (stream.match(\"CDATA[\")) return chain(inBlock(\"atom\", \"]]>\"));\n          else return null;\n        } else if (stream.match(\"--\")) {\n          return chain(inBlock(\"comment\", \"-->\"));\n        } else if (stream.match(\"DOCTYPE\", true, true)) {\n          stream.eatWhile(/[\\w\\._\\-]/);\n          return chain(doctype(1));\n        } else {\n          return null;\n        }\n      } else if (stream.eat(\"?\")) {\n        stream.eatWhile(/[\\w\\._\\-]/);\n        state.tokenize = inBlock(\"meta\", \"?>\");\n        return \"meta\";\n      } else {\n        type = stream.eat(\"/\") ? \"closeTag\" : \"openTag\";\n        state.tokenize = inTag;\n        return \"tag bracket\";\n      }\n    } else if (ch == \"&\") {\n      var ok;\n      if (stream.eat(\"#\")) {\n        if (stream.eat(\"x\")) {\n          ok = stream.eatWhile(/[a-fA-F\\d]/) && stream.eat(\";\");\n        } else {\n          ok = stream.eatWhile(/[\\d]/) && stream.eat(\";\");\n        }\n      } else {\n        ok = stream.eatWhile(/[\\w\\.\\-:]/) && stream.eat(\";\");\n      }\n      return ok ? \"atom\" : \"error\";\n    } else {\n      stream.eatWhile(/[^&<]/);\n      return null;\n    }\n  }\n\n  function inTag(stream, state) {\n    var ch = stream.next();\n    if (ch == \">\" || (ch == \"/\" && stream.eat(\">\"))) {\n      state.tokenize = inText;\n      type = ch == \">\" ? \"endTag\" : \"selfcloseTag\";\n      return \"tag bracket\";\n    } else if (ch == \"=\") {\n      type = \"equals\";\n      return null;\n    } else if (ch == \"<\") {\n      state.tokenize = inText;\n      state.state = baseState;\n      state.tagName = state.tagStart = null;\n      var next = state.tokenize(stream, state);\n      return next ? next + \" tag error\" : \"tag error\";\n    } else if (/[\\'\\\"]/.test(ch)) {\n      state.tokenize = inAttribute(ch);\n      state.stringStartCol = stream.column();\n      return state.tokenize(stream, state);\n    } else {\n      stream.match(/^[^\\s\\u00a0=<>\\\"\\']*[^\\s\\u00a0=<>\\\"\\'\\/]/);\n      return \"word\";\n    }\n  }\n\n  function inAttribute(quote) {\n    var closure = function(stream, state) {\n      while (!stream.eol()) {\n        if (stream.next() == quote) {\n          state.tokenize = inTag;\n          break;\n        }\n      }\n      return \"string\";\n    };\n    closure.isInAttribute = true;\n    return closure;\n  }\n\n  function inBlock(style, terminator) {\n    return function(stream, state) {\n      while (!stream.eol()) {\n        if (stream.match(terminator)) {\n          state.tokenize = inText;\n          break;\n        }\n        stream.next();\n      }\n      return style;\n    };\n  }\n  function doctype(depth) {\n    return function(stream, state) {\n      var ch;\n      while ((ch = stream.next()) != null) {\n        if (ch == \"<\") {\n          state.tokenize = doctype(depth + 1);\n          return state.tokenize(stream, state);\n        } else if (ch == \">\") {\n          if (depth == 1) {\n            state.tokenize = inText;\n            break;\n          } else {\n            state.tokenize = doctype(depth - 1);\n            return state.tokenize(stream, state);\n          }\n        }\n      }\n      return \"meta\";\n    };\n  }\n\n  function Context(state, tagName, startOfLine) {\n    this.prev = state.context;\n    this.tagName = tagName;\n    this.indent = state.indented;\n    this.startOfLine = startOfLine;\n    if (Kludges.doNotIndent.hasOwnProperty(tagName) || (state.context && state.context.noIndent))\n      this.noIndent = true;\n  }\n  function popContext(state) {\n    if (state.context) state.context = state.context.prev;\n  }\n  function maybePopContext(state, nextTagName) {\n    var parentTagName;\n    while (true) {\n      if (!state.context) {\n        return;\n      }\n      parentTagName = state.context.tagName;\n      if (!Kludges.contextGrabbers.hasOwnProperty(parentTagName) ||\n          !Kludges.contextGrabbers[parentTagName].hasOwnProperty(nextTagName)) {\n        return;\n      }\n      popContext(state);\n    }\n  }\n\n  function baseState(type, stream, state) {\n    if (type == \"openTag\") {\n      state.tagStart = stream.column();\n      return tagNameState;\n    } else if (type == \"closeTag\") {\n      return closeTagNameState;\n    } else {\n      return baseState;\n    }\n  }\n  function tagNameState(type, stream, state) {\n    if (type == \"word\") {\n      state.tagName = stream.current();\n      setStyle = \"tag\";\n      return attrState;\n    } else {\n      setStyle = \"error\";\n      return tagNameState;\n    }\n  }\n  function closeTagNameState(type, stream, state) {\n    if (type == \"word\") {\n      var tagName = stream.current();\n      if (state.context && state.context.tagName != tagName &&\n          Kludges.implicitlyClosed.hasOwnProperty(state.context.tagName))\n        popContext(state);\n      if (state.context && state.context.tagName == tagName) {\n        setStyle = \"tag\";\n        return closeState;\n      } else {\n        setStyle = \"tag error\";\n        return closeStateErr;\n      }\n    } else {\n      setStyle = \"error\";\n      return closeStateErr;\n    }\n  }\n\n  function closeState(type, _stream, state) {\n    if (type != \"endTag\") {\n      setStyle = \"error\";\n      return closeState;\n    }\n    popContext(state);\n    return baseState;\n  }\n  function closeStateErr(type, stream, state) {\n    setStyle = \"error\";\n    return closeState(type, stream, state);\n  }\n\n  function attrState(type, _stream, state) {\n    if (type == \"word\") {\n      setStyle = \"attribute\";\n      return attrEqState;\n    } else if (type == \"endTag\" || type == \"selfcloseTag\") {\n      var tagName = state.tagName, tagStart = state.tagStart;\n      state.tagName = state.tagStart = null;\n      if (type == \"selfcloseTag\" ||\n          Kludges.autoSelfClosers.hasOwnProperty(tagName)) {\n        maybePopContext(state, tagName);\n      } else {\n        maybePopContext(state, tagName);\n        state.context = new Context(state, tagName, tagStart == state.indented);\n      }\n      return baseState;\n    }\n    setStyle = \"error\";\n    return attrState;\n  }\n  function attrEqState(type, stream, state) {\n    if (type == \"equals\") return attrValueState;\n    if (!Kludges.allowMissing) setStyle = \"error\";\n    return attrState(type, stream, state);\n  }\n  function attrValueState(type, stream, state) {\n    if (type == \"string\") return attrContinuedState;\n    if (type == \"word\" && Kludges.allowUnquoted) {setStyle = \"string\"; return attrState;}\n    setStyle = \"error\";\n    return attrState(type, stream, state);\n  }\n  function attrContinuedState(type, stream, state) {\n    if (type == \"string\") return attrContinuedState;\n    return attrState(type, stream, state);\n  }\n\n  return {\n    startState: function() {\n      return {tokenize: inText,\n              state: baseState,\n              indented: 0,\n              tagName: null, tagStart: null,\n              context: null};\n    },\n\n    token: function(stream, state) {\n      if (!state.tagName && stream.sol())\n        state.indented = stream.indentation();\n\n      if (stream.eatSpace()) return null;\n      type = null;\n      var style = state.tokenize(stream, state);\n      if ((style || type) && style != \"comment\") {\n        setStyle = null;\n        state.state = state.state(type || style, stream, state);\n        if (setStyle)\n          style = setStyle == \"error\" ? style + \" error\" : setStyle;\n      }\n      return style;\n    },\n\n    indent: function(state, textAfter, fullLine) {\n      var context = state.context;\n      // Indent multi-line strings (e.g. css).\n      if (state.tokenize.isInAttribute) {\n        if (state.tagStart == state.indented)\n          return state.stringStartCol + 1;\n        else\n          return state.indented + indentUnit;\n      }\n      if (context && context.noIndent) return CodeMirror.Pass;\n      if (state.tokenize != inTag && state.tokenize != inText)\n        return fullLine ? fullLine.match(/^(\\s*)/)[0].length : 0;\n      // Indent the starts of attribute names.\n      if (state.tagName) {\n        if (multilineTagIndentPastTag)\n          return state.tagStart + state.tagName.length + 2;\n        else\n          return state.tagStart + indentUnit * multilineTagIndentFactor;\n      }\n      if (alignCDATA && /<!\\[CDATA\\[/.test(textAfter)) return 0;\n      var tagAfter = textAfter && /^<(\\/)?([\\w_:\\.-]*)/.exec(textAfter);\n      if (tagAfter && tagAfter[1]) { // Closing tag spotted\n        while (context) {\n          if (context.tagName == tagAfter[2]) {\n            context = context.prev;\n            break;\n          } else if (Kludges.implicitlyClosed.hasOwnProperty(context.tagName)) {\n            context = context.prev;\n          } else {\n            break;\n          }\n        }\n      } else if (tagAfter) { // Opening tag spotted\n        while (context) {\n          var grabbers = Kludges.contextGrabbers[context.tagName];\n          if (grabbers && grabbers.hasOwnProperty(tagAfter[2]))\n            context = context.prev;\n          else\n            break;\n        }\n      }\n      while (context && !context.startOfLine)\n        context = context.prev;\n      if (context) return context.indent + indentUnit;\n      else return 0;\n    },\n\n    electricInput: /<\\/[\\s\\w:]+>$/,\n    blockCommentStart: \"<!--\",\n    blockCommentEnd: \"-->\",\n\n    configuration: parserConfig.htmlMode ? \"html\" : \"xml\",\n    helperType: parserConfig.htmlMode ? \"html\" : \"xml\"\n  };\n});\n\nCodeMirror.defineMIME(\"text/xml\", \"xml\");\nCodeMirror.defineMIME(\"application/xml\", \"xml\");\nif (!CodeMirror.mimeModes.hasOwnProperty(\"text/html\"))\n  CodeMirror.defineMIME(\"text/html\", {name: \"xml\", htmlMode: true});\n\n});\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/xquery/index.html",
    "content": "<!doctype html>\n\n<title>CodeMirror: XQuery mode</title>\n<meta charset=\"utf-8\"/>\n<link rel=stylesheet href=\"../../doc/docs.css\">\n\n<link rel=\"stylesheet\" href=\"../../lib/codemirror.css\">\n<link rel=\"stylesheet\" href=\"../../theme/xq-dark.css\">\n<script src=\"../../lib/codemirror.js\"></script>\n<script src=\"xquery.js\"></script>\n<style type=\"text/css\">\n\t.CodeMirror {\n\t  border-top: 1px solid black; border-bottom: 1px solid black;\n\t  height:400px;\n\t}\n    </style>\n<div id=nav>\n  <a href=\"http://codemirror.net\"><h1>CodeMirror</h1><img id=logo src=\"../../doc/logo.png\"></a>\n\n  <ul>\n    <li><a href=\"../../index.html\">Home</a>\n    <li><a href=\"../../doc/manual.html\">Manual</a>\n    <li><a href=\"https://github.com/codemirror/codemirror\">Code</a>\n  </ul>\n  <ul>\n    <li><a href=\"../index.html\">Language modes</a>\n    <li><a class=active href=\"#\">XQuery</a>\n  </ul>\n</div>\n\n<article>\n<h2>XQuery mode</h2>\n \n \n<div class=\"cm-s-default\"> \n\t<textarea id=\"code\" name=\"code\"> \nxquery version &quot;1.0-ml&quot;;\n(: this is\n : a \n   \"comment\" :)\nlet $let := &lt;x attr=&quot;value&quot;&gt;&quot;test&quot;&lt;func&gt;function() $var {function()} {$var}&lt;/func&gt;&lt;/x&gt;\nlet $joe:=1\nreturn element element {\n\tattribute attribute { 1 },\n\telement test { &#39;a&#39; }, \n\tattribute foo { &quot;bar&quot; },\n\tfn:doc()[ foo/@bar eq $let ],\n\t//x }    \n \n(: a more 'evil' test :)\n(: Modified Blakeley example (: with nested comment :) ... :)\ndeclare private function local:declare() {()};\ndeclare private function local:private() {()};\ndeclare private function local:function() {()};\ndeclare private function local:local() {()};\nlet $let := &lt;let&gt;let $let := &quot;let&quot;&lt;/let&gt;\nreturn element element {\n\tattribute attribute { try { xdmp:version() } catch($e) { xdmp:log($e) } },\n\tattribute fn:doc { &quot;bar&quot; castable as xs:string },\n\telement text { text { &quot;text&quot; } },\n\tfn:doc()[ child::eq/(@bar | attribute::attribute) eq $let ],\n\t//fn:doc\n}\n\n\n\nxquery version &quot;1.0-ml&quot;;\n\n(: Copyright 2006-2010 Mark Logic Corporation. :)\n\n(:\n : Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);\n : you may not use this file except in compliance with the License.\n : You may obtain a copy of the License at\n :\n :     http://www.apache.org/licenses/LICENSE-2.0\n :\n : Unless required by applicable law or agreed to in writing, software\n : distributed under the License is distributed on an &quot;AS IS&quot; BASIS,\n : WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n : See the License for the specific language governing permissions and\n : limitations under the License.\n :)\n\nmodule namespace json = &quot;http://marklogic.com/json&quot;;\ndeclare default function namespace &quot;http://www.w3.org/2005/xpath-functions&quot;;\n\n(: Need to backslash escape any double quotes, backslashes, and newlines :)\ndeclare function json:escape($s as xs:string) as xs:string {\n  let $s := replace($s, &quot;\\\\&quot;, &quot;\\\\\\\\&quot;)\n  let $s := replace($s, &quot;&quot;&quot;&quot;, &quot;\\\\&quot;&quot;&quot;)\n  let $s := replace($s, codepoints-to-string((13, 10)), &quot;\\\\n&quot;)\n  let $s := replace($s, codepoints-to-string(13), &quot;\\\\n&quot;)\n  let $s := replace($s, codepoints-to-string(10), &quot;\\\\n&quot;)\n  return $s\n};\n\ndeclare function json:atomize($x as element()) as xs:string {\n  if (count($x/node()) = 0) then 'null'\n  else if ($x/@type = &quot;number&quot;) then\n    let $castable := $x castable as xs:float or\n                     $x castable as xs:double or\n                     $x castable as xs:decimal\n    return\n    if ($castable) then xs:string($x)\n    else error(concat(&quot;Not a number: &quot;, xdmp:describe($x)))\n  else if ($x/@type = &quot;boolean&quot;) then\n    let $castable := $x castable as xs:boolean\n    return\n    if ($castable) then xs:string(xs:boolean($x))\n    else error(concat(&quot;Not a boolean: &quot;, xdmp:describe($x)))\n  else concat('&quot;', json:escape($x), '&quot;')\n};\n\n(: Print the thing that comes after the colon :)\ndeclare function json:print-value($x as element()) as xs:string {\n  if (count($x/*) = 0) then\n    json:atomize($x)\n  else if ($x/@quote = &quot;true&quot;) then\n    concat('&quot;', json:escape(xdmp:quote($x/node())), '&quot;')\n  else\n    string-join(('{',\n      string-join(for $i in $x/* return json:print-name-value($i), &quot;,&quot;),\n    '}'), &quot;&quot;)\n};\n\n(: Print the name and value both :)\ndeclare function json:print-name-value($x as element()) as xs:string? {\n  let $name := name($x)\n  let $first-in-array :=\n    count($x/preceding-sibling::*[name(.) = $name]) = 0 and\n    (count($x/following-sibling::*[name(.) = $name]) &gt; 0 or $x/@array = &quot;true&quot;)\n  let $later-in-array := count($x/preceding-sibling::*[name(.) = $name]) &gt; 0\n  return\n\n  if ($later-in-array) then\n    ()  (: I was handled previously :)\n  else if ($first-in-array) then\n    string-join(('&quot;', json:escape($name), '&quot;:[',\n      string-join((for $i in ($x, $x/following-sibling::*[name(.) = $name]) return json:print-value($i)), &quot;,&quot;),\n    ']'), &quot;&quot;)\n   else\n     string-join(('&quot;', json:escape($name), '&quot;:', json:print-value($x)), &quot;&quot;)\n};\n\n(:~\n  Transforms an XML element into a JSON string representation.  See http://json.org.\n  &lt;p/&gt;\n  Sample usage:\n  &lt;pre&gt;\n    xquery version &quot;1.0-ml&quot;;\n    import module namespace json=&quot;http://marklogic.com/json&quot; at &quot;json.xqy&quot;;\n    json:serialize(&amp;lt;foo&amp;gt;&amp;lt;bar&amp;gt;kid&amp;lt;/bar&amp;gt;&amp;lt;/foo&amp;gt;)\n  &lt;/pre&gt;\n  Sample transformations:\n  &lt;pre&gt;\n  &amp;lt;e/&amp;gt; becomes {&quot;e&quot;:null}\n  &amp;lt;e&amp;gt;text&amp;lt;/e&amp;gt; becomes {&quot;e&quot;:&quot;text&quot;}\n  &amp;lt;e&amp;gt;quote &quot; escaping&amp;lt;/e&amp;gt; becomes {&quot;e&quot;:&quot;quote \\&quot; escaping&quot;}\n  &amp;lt;e&amp;gt;backslash \\ escaping&amp;lt;/e&amp;gt; becomes {&quot;e&quot;:&quot;backslash \\\\ escaping&quot;}\n  &amp;lt;e&amp;gt;&amp;lt;a&amp;gt;text1&amp;lt;/a&amp;gt;&amp;lt;b&amp;gt;text2&amp;lt;/b&amp;gt;&amp;lt;/e&amp;gt; becomes {&quot;e&quot;:{&quot;a&quot;:&quot;text1&quot;,&quot;b&quot;:&quot;text2&quot;}}\n  &amp;lt;e&amp;gt;&amp;lt;a&amp;gt;text1&amp;lt;/a&amp;gt;&amp;lt;a&amp;gt;text2&amp;lt;/a&amp;gt;&amp;lt;/e&amp;gt; becomes {&quot;e&quot;:{&quot;a&quot;:[&quot;text1&quot;,&quot;text2&quot;]}}\n  &amp;lt;e&amp;gt;&amp;lt;a array=&quot;true&quot;&amp;gt;text1&amp;lt;/a&amp;gt;&amp;lt;/e&amp;gt; becomes {&quot;e&quot;:{&quot;a&quot;:[&quot;text1&quot;]}}\n  &amp;lt;e&amp;gt;&amp;lt;a type=&quot;boolean&quot;&amp;gt;false&amp;lt;/a&amp;gt;&amp;lt;/e&amp;gt; becomes {&quot;e&quot;:{&quot;a&quot;:false}}\n  &amp;lt;e&amp;gt;&amp;lt;a type=&quot;number&quot;&amp;gt;123.5&amp;lt;/a&amp;gt;&amp;lt;/e&amp;gt; becomes {&quot;e&quot;:{&quot;a&quot;:123.5}}\n  &amp;lt;e quote=&quot;true&quot;&amp;gt;&amp;lt;div attrib=&quot;value&quot;/&amp;gt;&amp;lt;/e&amp;gt; becomes {&quot;e&quot;:&quot;&amp;lt;div attrib=\\&quot;value\\&quot;/&amp;gt;&quot;}\n  &lt;/pre&gt;\n  &lt;p/&gt;\n  Namespace URIs are ignored.  Namespace prefixes are included in the JSON name.\n  &lt;p/&gt;\n  Attributes are ignored, except for the special attribute @array=&quot;true&quot; that\n  indicates the JSON serialization should write the node, even if single, as an\n  array, and the attribute @type that can be set to &quot;boolean&quot; or &quot;number&quot; to\n  dictate the value should be written as that type (unquoted).  There's also\n  an @quote attribute that when set to true writes the inner content as text\n  rather than as structured JSON, useful for sending some XHTML over the\n  wire.\n  &lt;p/&gt;\n  Text nodes within mixed content are ignored.\n\n  @param $x Element node to convert\n  @return String holding JSON serialized representation of $x\n\n  @author Jason Hunter\n  @version 1.0.1\n  \n  Ported to xquery 1.0-ml; double escaped backslashes in json:escape\n:)\ndeclare function json:serialize($x as element())  as xs:string {\n  string-join(('{', json:print-name-value($x), '}'), &quot;&quot;)\n};\n  </textarea> \n</div> \n \n    <script> \n      var editor = CodeMirror.fromTextArea(document.getElementById(\"code\"), {\n        lineNumbers: true,\n        matchBrackets: true,\n        theme: \"xq-dark\"\n      });\n    </script> \n \n    <p><strong>MIME types defined:</strong> <code>application/xquery</code>.</p> \n \n    <p>Development of the CodeMirror XQuery mode was sponsored by \n      <a href=\"http://marklogic.com\">MarkLogic</a> and developed by \n      <a href=\"https://twitter.com/mbrevoort\">Mike Brevoort</a>.\n    </p>\n \n  </article>\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/xquery/test.js",
    "content": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n// Don't take these too seriously -- the expected results appear to be\n// based on the results of actual runs without any serious manual\n// verification. If a change you made causes them to fail, the test is\n// as likely to wrong as the code.\n\n(function() {\n  var mode = CodeMirror.getMode({tabSize: 4}, \"xquery\");\n  function MT(name) { test.mode(name, mode, Array.prototype.slice.call(arguments, 1)); }\n\n  MT(\"eviltest\",\n     \"[keyword xquery] [keyword version] [variable &quot;1][keyword .][atom 0][keyword -][variable ml&quot;][def&variable ;]      [comment (: this is       : a          \\\"comment\\\" :)]\",\n     \"      [keyword let] [variable $let] [keyword :=] [variable &lt;x] [variable attr][keyword =][variable &quot;value&quot;&gt;&quot;test&quot;&lt;func&gt][def&variable ;function]() [variable $var] {[keyword function]()} {[variable $var]}[variable &lt;][keyword /][variable func&gt;&lt;][keyword /][variable x&gt;]\",\n     \"      [keyword let] [variable $joe][keyword :=][atom 1]\",\n     \"      [keyword return] [keyword element] [variable element] {\",\n     \"          [keyword attribute] [variable attribute] { [atom 1] },\",\n     \"          [keyword element] [variable test] { [variable &#39;a&#39;] },           [keyword attribute] [variable foo] { [variable &quot;bar&quot;] },\",\n     \"          [def&variable fn:doc]()[[ [variable foo][keyword /][variable @bar] [keyword eq] [variable $let] ]],\",\n     \"          [keyword //][variable x] }                 [comment (: a more 'evil' test :)]\",\n     \"      [comment (: Modified Blakeley example (: with nested comment :) ... :)]\",\n     \"      [keyword declare] [keyword private] [keyword function] [def&variable local:declare]() {()}[variable ;]\",\n     \"      [keyword declare] [keyword private] [keyword function] [def&variable local:private]() {()}[variable ;]\",\n     \"      [keyword declare] [keyword private] [keyword function] [def&variable local:function]() {()}[variable ;]\",\n     \"      [keyword declare] [keyword private] [keyword function] [def&variable local:local]() {()}[variable ;]\",\n     \"      [keyword let] [variable $let] [keyword :=] [variable &lt;let&gt;let] [variable $let] [keyword :=] [variable &quot;let&quot;&lt;][keyword /let][variable &gt;]\",\n     \"      [keyword return] [keyword element] [variable element] {\",\n     \"          [keyword attribute] [variable attribute] { [keyword try] { [def&variable xdmp:version]() } [keyword catch]([variable $e]) { [def&variable xdmp:log]([variable $e]) } },\",\n     \"          [keyword attribute] [variable fn:doc] { [variable &quot;bar&quot;] [variable castable] [keyword as] [atom xs:string] },\",\n     \"          [keyword element] [variable text] { [keyword text] { [variable &quot;text&quot;] } },\",\n     \"          [def&variable fn:doc]()[[ [qualifier child::][variable eq][keyword /]([variable @bar] [keyword |] [qualifier attribute::][variable attribute]) [keyword eq] [variable $let] ]],\",\n     \"          [keyword //][variable fn:doc]\",\n     \"      }\");\n\n  MT(\"testEmptySequenceKeyword\",\n     \"[string \\\"foo\\\"] [keyword instance] [keyword of] [keyword empty-sequence]()\");\n\n  MT(\"testMultiAttr\",\n     \"[tag <p ][attribute a1]=[string \\\"foo\\\"] [attribute a2]=[string \\\"bar\\\"][tag >][variable hello] [variable world][tag </p>]\");\n\n  MT(\"test namespaced variable\",\n     \"[keyword declare] [keyword namespace] [variable e] [keyword =] [string \\\"http://example.com/ANamespace\\\"][variable ;declare] [keyword variable] [variable $e:exampleComThisVarIsNotRecognized] [keyword as] [keyword element]([keyword *]) [variable external;]\");\n\n  MT(\"test EQName variable\",\n     \"[keyword declare] [keyword variable] [variable $\\\"http://www.example.com/ns/my\\\":var] [keyword :=] [atom 12][variable ;]\",\n     \"[tag <out>]{[variable $\\\"http://www.example.com/ns/my\\\":var]}[tag </out>]\");\n\n  MT(\"test EQName function\",\n     \"[keyword declare] [keyword function] [def&variable \\\"http://www.example.com/ns/my\\\":fn] ([variable $a] [keyword as] [atom xs:integer]) [keyword as] [atom xs:integer] {\",\n     \"   [variable $a] [keyword +] [atom 2]\",\n     \"}[variable ;]\",\n     \"[tag <out>]{[def&variable \\\"http://www.example.com/ns/my\\\":fn]([atom 12])}[tag </out>]\");\n\n  MT(\"test EQName function with single quotes\",\n     \"[keyword declare] [keyword function] [def&variable 'http://www.example.com/ns/my':fn] ([variable $a] [keyword as] [atom xs:integer]) [keyword as] [atom xs:integer] {\",\n     \"   [variable $a] [keyword +] [atom 2]\",\n     \"}[variable ;]\",\n     \"[tag <out>]{[def&variable 'http://www.example.com/ns/my':fn]([atom 12])}[tag </out>]\");\n\n  MT(\"testProcessingInstructions\",\n     \"[def&variable data]([comment&meta <?target content?>]) [keyword instance] [keyword of] [atom xs:string]\");\n\n  MT(\"testQuoteEscapeDouble\",\n     \"[keyword let] [variable $rootfolder] [keyword :=] [string \\\"c:\\\\builds\\\\winnt\\\\HEAD\\\\qa\\\\scripts\\\\\\\"]\",\n     \"[keyword let] [variable $keysfolder] [keyword :=] [def&variable concat]([variable $rootfolder], [string \\\"keys\\\\\\\"])\");\n})();\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/xquery/xquery.js",
    "content": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n(function(mod) {\n  if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n    mod(require(\"../../lib/codemirror\"));\n  else if (typeof define == \"function\" && define.amd) // AMD\n    define([\"../../lib/codemirror\"], mod);\n  else // Plain browser env\n    mod(CodeMirror);\n})(function(CodeMirror) {\n\"use strict\";\n\nCodeMirror.defineMode(\"xquery\", function() {\n\n  // The keywords object is set to the result of this self executing\n  // function. Each keyword is a property of the keywords object whose\n  // value is {type: atype, style: astyle}\n  var keywords = function(){\n    // conveinence functions used to build keywords object\n    function kw(type) {return {type: type, style: \"keyword\"};}\n    var A = kw(\"keyword a\")\n      , B = kw(\"keyword b\")\n      , C = kw(\"keyword c\")\n      , operator = kw(\"operator\")\n      , atom = {type: \"atom\", style: \"atom\"}\n      , punctuation = {type: \"punctuation\", style: null}\n      , qualifier = {type: \"axis_specifier\", style: \"qualifier\"};\n\n    // kwObj is what is return from this function at the end\n    var kwObj = {\n      'if': A, 'switch': A, 'while': A, 'for': A,\n      'else': B, 'then': B, 'try': B, 'finally': B, 'catch': B,\n      'element': C, 'attribute': C, 'let': C, 'implements': C, 'import': C, 'module': C, 'namespace': C,\n      'return': C, 'super': C, 'this': C, 'throws': C, 'where': C, 'private': C,\n      ',': punctuation,\n      'null': atom, 'fn:false()': atom, 'fn:true()': atom\n    };\n\n    // a list of 'basic' keywords. For each add a property to kwObj with the value of\n    // {type: basic[i], style: \"keyword\"} e.g. 'after' --> {type: \"after\", style: \"keyword\"}\n    var basic = ['after','ancestor','ancestor-or-self','and','as','ascending','assert','attribute','before',\n    'by','case','cast','child','comment','declare','default','define','descendant','descendant-or-self',\n    'descending','document','document-node','element','else','eq','every','except','external','following',\n    'following-sibling','follows','for','function','if','import','in','instance','intersect','item',\n    'let','module','namespace','node','node','of','only','or','order','parent','precedes','preceding',\n    'preceding-sibling','processing-instruction','ref','return','returns','satisfies','schema','schema-element',\n    'self','some','sortby','stable','text','then','to','treat','typeswitch','union','variable','version','where',\n    'xquery', 'empty-sequence'];\n    for(var i=0, l=basic.length; i < l; i++) { kwObj[basic[i]] = kw(basic[i]);};\n\n    // a list of types. For each add a property to kwObj with the value of\n    // {type: \"atom\", style: \"atom\"}\n    var types = ['xs:string', 'xs:float', 'xs:decimal', 'xs:double', 'xs:integer', 'xs:boolean', 'xs:date', 'xs:dateTime',\n    'xs:time', 'xs:duration', 'xs:dayTimeDuration', 'xs:time', 'xs:yearMonthDuration', 'numeric', 'xs:hexBinary',\n    'xs:base64Binary', 'xs:anyURI', 'xs:QName', 'xs:byte','xs:boolean','xs:anyURI','xf:yearMonthDuration'];\n    for(var i=0, l=types.length; i < l; i++) { kwObj[types[i]] = atom;};\n\n    // each operator will add a property to kwObj with value of {type: \"operator\", style: \"keyword\"}\n    var operators = ['eq', 'ne', 'lt', 'le', 'gt', 'ge', ':=', '=', '>', '>=', '<', '<=', '.', '|', '?', 'and', 'or', 'div', 'idiv', 'mod', '*', '/', '+', '-'];\n    for(var i=0, l=operators.length; i < l; i++) { kwObj[operators[i]] = operator;};\n\n    // each axis_specifiers will add a property to kwObj with value of {type: \"axis_specifier\", style: \"qualifier\"}\n    var axis_specifiers = [\"self::\", \"attribute::\", \"child::\", \"descendant::\", \"descendant-or-self::\", \"parent::\",\n    \"ancestor::\", \"ancestor-or-self::\", \"following::\", \"preceding::\", \"following-sibling::\", \"preceding-sibling::\"];\n    for(var i=0, l=axis_specifiers.length; i < l; i++) { kwObj[axis_specifiers[i]] = qualifier; };\n\n    return kwObj;\n  }();\n\n  // Used as scratch variables to communicate multiple values without\n  // consing up tons of objects.\n  var type, content;\n\n  function ret(tp, style, cont) {\n    type = tp; content = cont;\n    return style;\n  }\n\n  function chain(stream, state, f) {\n    state.tokenize = f;\n    return f(stream, state);\n  }\n\n  // the primary mode tokenizer\n  function tokenBase(stream, state) {\n    var ch = stream.next(),\n        mightBeFunction = false,\n        isEQName = isEQNameAhead(stream);\n\n    // an XML tag (if not in some sub, chained tokenizer)\n    if (ch == \"<\") {\n      if(stream.match(\"!--\", true))\n        return chain(stream, state, tokenXMLComment);\n\n      if(stream.match(\"![CDATA\", false)) {\n        state.tokenize = tokenCDATA;\n        return ret(\"tag\", \"tag\");\n      }\n\n      if(stream.match(\"?\", false)) {\n        return chain(stream, state, tokenPreProcessing);\n      }\n\n      var isclose = stream.eat(\"/\");\n      stream.eatSpace();\n      var tagName = \"\", c;\n      while ((c = stream.eat(/[^\\s\\u00a0=<>\\\"\\'\\/?]/))) tagName += c;\n\n      return chain(stream, state, tokenTag(tagName, isclose));\n    }\n    // start code block\n    else if(ch == \"{\") {\n      pushStateStack(state,{ type: \"codeblock\"});\n      return ret(\"\", null);\n    }\n    // end code block\n    else if(ch == \"}\") {\n      popStateStack(state);\n      return ret(\"\", null);\n    }\n    // if we're in an XML block\n    else if(isInXmlBlock(state)) {\n      if(ch == \">\")\n        return ret(\"tag\", \"tag\");\n      else if(ch == \"/\" && stream.eat(\">\")) {\n        popStateStack(state);\n        return ret(\"tag\", \"tag\");\n      }\n      else\n        return ret(\"word\", \"variable\");\n    }\n    // if a number\n    else if (/\\d/.test(ch)) {\n      stream.match(/^\\d*(?:\\.\\d*)?(?:E[+\\-]?\\d+)?/);\n      return ret(\"number\", \"atom\");\n    }\n    // comment start\n    else if (ch === \"(\" && stream.eat(\":\")) {\n      pushStateStack(state, { type: \"comment\"});\n      return chain(stream, state, tokenComment);\n    }\n    // quoted string\n    else if (  !isEQName && (ch === '\"' || ch === \"'\"))\n      return chain(stream, state, tokenString(ch));\n    // variable\n    else if(ch === \"$\") {\n      return chain(stream, state, tokenVariable);\n    }\n    // assignment\n    else if(ch ===\":\" && stream.eat(\"=\")) {\n      return ret(\"operator\", \"keyword\");\n    }\n    // open paren\n    else if(ch === \"(\") {\n      pushStateStack(state, { type: \"paren\"});\n      return ret(\"\", null);\n    }\n    // close paren\n    else if(ch === \")\") {\n      popStateStack(state);\n      return ret(\"\", null);\n    }\n    // open paren\n    else if(ch === \"[\") {\n      pushStateStack(state, { type: \"bracket\"});\n      return ret(\"\", null);\n    }\n    // close paren\n    else if(ch === \"]\") {\n      popStateStack(state);\n      return ret(\"\", null);\n    }\n    else {\n      var known = keywords.propertyIsEnumerable(ch) && keywords[ch];\n\n      // if there's a EQName ahead, consume the rest of the string portion, it's likely a function\n      if(isEQName && ch === '\\\"') while(stream.next() !== '\"'){}\n      if(isEQName && ch === '\\'') while(stream.next() !== '\\''){}\n\n      // gobble up a word if the character is not known\n      if(!known) stream.eatWhile(/[\\w\\$_-]/);\n\n      // gobble a colon in the case that is a lib func type call fn:doc\n      var foundColon = stream.eat(\":\");\n\n      // if there's not a second colon, gobble another word. Otherwise, it's probably an axis specifier\n      // which should get matched as a keyword\n      if(!stream.eat(\":\") && foundColon) {\n        stream.eatWhile(/[\\w\\$_-]/);\n      }\n      // if the next non whitespace character is an open paren, this is probably a function (if not a keyword of other sort)\n      if(stream.match(/^[ \\t]*\\(/, false)) {\n        mightBeFunction = true;\n      }\n      // is the word a keyword?\n      var word = stream.current();\n      known = keywords.propertyIsEnumerable(word) && keywords[word];\n\n      // if we think it's a function call but not yet known,\n      // set style to variable for now for lack of something better\n      if(mightBeFunction && !known) known = {type: \"function_call\", style: \"variable def\"};\n\n      // if the previous word was element, attribute, axis specifier, this word should be the name of that\n      if(isInXmlConstructor(state)) {\n        popStateStack(state);\n        return ret(\"word\", \"variable\", word);\n      }\n      // as previously checked, if the word is element,attribute, axis specifier, call it an \"xmlconstructor\" and\n      // push the stack so we know to look for it on the next word\n      if(word == \"element\" || word == \"attribute\" || known.type == \"axis_specifier\") pushStateStack(state, {type: \"xmlconstructor\"});\n\n      // if the word is known, return the details of that else just call this a generic 'word'\n      return known ? ret(known.type, known.style, word) :\n                     ret(\"word\", \"variable\", word);\n    }\n  }\n\n  // handle comments, including nested\n  function tokenComment(stream, state) {\n    var maybeEnd = false, maybeNested = false, nestedCount = 0, ch;\n    while (ch = stream.next()) {\n      if (ch == \")\" && maybeEnd) {\n        if(nestedCount > 0)\n          nestedCount--;\n        else {\n          popStateStack(state);\n          break;\n        }\n      }\n      else if(ch == \":\" && maybeNested) {\n        nestedCount++;\n      }\n      maybeEnd = (ch == \":\");\n      maybeNested = (ch == \"(\");\n    }\n\n    return ret(\"comment\", \"comment\");\n  }\n\n  // tokenizer for string literals\n  // optionally pass a tokenizer function to set state.tokenize back to when finished\n  function tokenString(quote, f) {\n    return function(stream, state) {\n      var ch;\n\n      if(isInString(state) && stream.current() == quote) {\n        popStateStack(state);\n        if(f) state.tokenize = f;\n        return ret(\"string\", \"string\");\n      }\n\n      pushStateStack(state, { type: \"string\", name: quote, tokenize: tokenString(quote, f) });\n\n      // if we're in a string and in an XML block, allow an embedded code block\n      if(stream.match(\"{\", false) && isInXmlAttributeBlock(state)) {\n        state.tokenize = tokenBase;\n        return ret(\"string\", \"string\");\n      }\n\n\n      while (ch = stream.next()) {\n        if (ch ==  quote) {\n          popStateStack(state);\n          if(f) state.tokenize = f;\n          break;\n        }\n        else {\n          // if we're in a string and in an XML block, allow an embedded code block in an attribute\n          if(stream.match(\"{\", false) && isInXmlAttributeBlock(state)) {\n            state.tokenize = tokenBase;\n            return ret(\"string\", \"string\");\n          }\n\n        }\n      }\n\n      return ret(\"string\", \"string\");\n    };\n  }\n\n  // tokenizer for variables\n  function tokenVariable(stream, state) {\n    var isVariableChar = /[\\w\\$_-]/;\n\n    // a variable may start with a quoted EQName so if the next character is quote, consume to the next quote\n    if(stream.eat(\"\\\"\")) {\n      while(stream.next() !== '\\\"'){};\n      stream.eat(\":\");\n    } else {\n      stream.eatWhile(isVariableChar);\n      if(!stream.match(\":=\", false)) stream.eat(\":\");\n    }\n    stream.eatWhile(isVariableChar);\n    state.tokenize = tokenBase;\n    return ret(\"variable\", \"variable\");\n  }\n\n  // tokenizer for XML tags\n  function tokenTag(name, isclose) {\n    return function(stream, state) {\n      stream.eatSpace();\n      if(isclose && stream.eat(\">\")) {\n        popStateStack(state);\n        state.tokenize = tokenBase;\n        return ret(\"tag\", \"tag\");\n      }\n      // self closing tag without attributes?\n      if(!stream.eat(\"/\"))\n        pushStateStack(state, { type: \"tag\", name: name, tokenize: tokenBase});\n      if(!stream.eat(\">\")) {\n        state.tokenize = tokenAttribute;\n        return ret(\"tag\", \"tag\");\n      }\n      else {\n        state.tokenize = tokenBase;\n      }\n      return ret(\"tag\", \"tag\");\n    };\n  }\n\n  // tokenizer for XML attributes\n  function tokenAttribute(stream, state) {\n    var ch = stream.next();\n\n    if(ch == \"/\" && stream.eat(\">\")) {\n      if(isInXmlAttributeBlock(state)) popStateStack(state);\n      if(isInXmlBlock(state)) popStateStack(state);\n      return ret(\"tag\", \"tag\");\n    }\n    if(ch == \">\") {\n      if(isInXmlAttributeBlock(state)) popStateStack(state);\n      return ret(\"tag\", \"tag\");\n    }\n    if(ch == \"=\")\n      return ret(\"\", null);\n    // quoted string\n    if (ch == '\"' || ch == \"'\")\n      return chain(stream, state, tokenString(ch, tokenAttribute));\n\n    if(!isInXmlAttributeBlock(state))\n      pushStateStack(state, { type: \"attribute\", tokenize: tokenAttribute});\n\n    stream.eat(/[a-zA-Z_:]/);\n    stream.eatWhile(/[-a-zA-Z0-9_:.]/);\n    stream.eatSpace();\n\n    // the case where the attribute has not value and the tag was closed\n    if(stream.match(\">\", false) || stream.match(\"/\", false)) {\n      popStateStack(state);\n      state.tokenize = tokenBase;\n    }\n\n    return ret(\"attribute\", \"attribute\");\n  }\n\n  // handle comments, including nested\n  function tokenXMLComment(stream, state) {\n    var ch;\n    while (ch = stream.next()) {\n      if (ch == \"-\" && stream.match(\"->\", true)) {\n        state.tokenize = tokenBase;\n        return ret(\"comment\", \"comment\");\n      }\n    }\n  }\n\n\n  // handle CDATA\n  function tokenCDATA(stream, state) {\n    var ch;\n    while (ch = stream.next()) {\n      if (ch == \"]\" && stream.match(\"]\", true)) {\n        state.tokenize = tokenBase;\n        return ret(\"comment\", \"comment\");\n      }\n    }\n  }\n\n  // handle preprocessing instructions\n  function tokenPreProcessing(stream, state) {\n    var ch;\n    while (ch = stream.next()) {\n      if (ch == \"?\" && stream.match(\">\", true)) {\n        state.tokenize = tokenBase;\n        return ret(\"comment\", \"comment meta\");\n      }\n    }\n  }\n\n\n  // functions to test the current context of the state\n  function isInXmlBlock(state) { return isIn(state, \"tag\"); }\n  function isInXmlAttributeBlock(state) { return isIn(state, \"attribute\"); }\n  function isInXmlConstructor(state) { return isIn(state, \"xmlconstructor\"); }\n  function isInString(state) { return isIn(state, \"string\"); }\n\n  function isEQNameAhead(stream) {\n    // assume we've already eaten a quote (\")\n    if(stream.current() === '\"')\n      return stream.match(/^[^\\\"]+\\\"\\:/, false);\n    else if(stream.current() === '\\'')\n      return stream.match(/^[^\\\"]+\\'\\:/, false);\n    else\n      return false;\n  }\n\n  function isIn(state, type) {\n    return (state.stack.length && state.stack[state.stack.length - 1].type == type);\n  }\n\n  function pushStateStack(state, newState) {\n    state.stack.push(newState);\n  }\n\n  function popStateStack(state) {\n    state.stack.pop();\n    var reinstateTokenize = state.stack.length && state.stack[state.stack.length-1].tokenize;\n    state.tokenize = reinstateTokenize || tokenBase;\n  }\n\n  // the interface for the mode API\n  return {\n    startState: function() {\n      return {\n        tokenize: tokenBase,\n        cc: [],\n        stack: []\n      };\n    },\n\n    token: function(stream, state) {\n      if (stream.eatSpace()) return null;\n      var style = state.tokenize(stream, state);\n      return style;\n    },\n\n    blockCommentStart: \"(:\",\n    blockCommentEnd: \":)\"\n\n  };\n\n});\n\nCodeMirror.defineMIME(\"application/xquery\", \"xquery\");\n\n});\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/yaml/index.html",
    "content": "<!doctype html>\n\n<title>CodeMirror: YAML mode</title>\n<meta charset=\"utf-8\"/>\n<link rel=stylesheet href=\"../../doc/docs.css\">\n\n<link rel=\"stylesheet\" href=\"../../lib/codemirror.css\">\n<script src=\"../../lib/codemirror.js\"></script>\n<script src=\"yaml.js\"></script>\n<style>.CodeMirror { border-top: 1px solid #ddd; border-bottom: 1px solid #ddd; }</style>\n<div id=nav>\n  <a href=\"http://codemirror.net\"><h1>CodeMirror</h1><img id=logo src=\"../../doc/logo.png\"></a>\n\n  <ul>\n    <li><a href=\"../../index.html\">Home</a>\n    <li><a href=\"../../doc/manual.html\">Manual</a>\n    <li><a href=\"https://github.com/codemirror/codemirror\">Code</a>\n  </ul>\n  <ul>\n    <li><a href=\"../index.html\">Language modes</a>\n    <li><a class=active href=\"#\">YAML</a>\n  </ul>\n</div>\n\n<article>\n<h2>YAML mode</h2>\n<form><textarea id=\"code\" name=\"code\">\n--- # Favorite movies\n- Casablanca\n- North by Northwest\n- The Man Who Wasn't There\n--- # Shopping list\n[milk, pumpkin pie, eggs, juice]\n--- # Indented Blocks, common in YAML data files, use indentation and new lines to separate the key: value pairs\n  name: John Smith\n  age: 33\n--- # Inline Blocks, common in YAML data streams, use commas to separate the key: value pairs between braces\n{name: John Smith, age: 33}\n---\nreceipt:     Oz-Ware Purchase Invoice\ndate:        2007-08-06\ncustomer:\n    given:   Dorothy\n    family:  Gale\n\nitems:\n    - part_no:   A4786\n      descrip:   Water Bucket (Filled)\n      price:     1.47\n      quantity:  4\n\n    - part_no:   E1628\n      descrip:   High Heeled \"Ruby\" Slippers\n      size:       8\n      price:     100.27\n      quantity:  1\n\nbill-to:  &id001\n    street: |\n            123 Tornado Alley\n            Suite 16\n    city:   East Centerville\n    state:  KS\n\nship-to:  *id001\n\nspecialDelivery:  >\n    Follow the Yellow Brick\n    Road to the Emerald City.\n    Pay no attention to the\n    man behind the curtain.\n...\n</textarea></form>\n    <script>\n      var editor = CodeMirror.fromTextArea(document.getElementById(\"code\"), {});\n    </script>\n\n    <p><strong>MIME types defined:</strong> <code>text/x-yaml</code>.</p>\n\n  </article>\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/yaml/yaml.js",
    "content": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n(function(mod) {\n  if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n    mod(require(\"../../lib/codemirror\"));\n  else if (typeof define == \"function\" && define.amd) // AMD\n    define([\"../../lib/codemirror\"], mod);\n  else // Plain browser env\n    mod(CodeMirror);\n})(function(CodeMirror) {\n\"use strict\";\n\nCodeMirror.defineMode(\"yaml\", function() {\n\n  var cons = ['true', 'false', 'on', 'off', 'yes', 'no'];\n  var keywordRegex = new RegExp(\"\\\\b((\"+cons.join(\")|(\")+\"))$\", 'i');\n\n  return {\n    token: function(stream, state) {\n      var ch = stream.peek();\n      var esc = state.escaped;\n      state.escaped = false;\n      /* comments */\n      if (ch == \"#\" && (stream.pos == 0 || /\\s/.test(stream.string.charAt(stream.pos - 1)))) {\n        stream.skipToEnd();\n        return \"comment\";\n      }\n\n      if (stream.match(/^('([^']|\\\\.)*'?|\"([^\"]|\\\\.)*\"?)/))\n        return \"string\";\n\n      if (state.literal && stream.indentation() > state.keyCol) {\n        stream.skipToEnd(); return \"string\";\n      } else if (state.literal) { state.literal = false; }\n      if (stream.sol()) {\n        state.keyCol = 0;\n        state.pair = false;\n        state.pairStart = false;\n        /* document start */\n        if(stream.match(/---/)) { return \"def\"; }\n        /* document end */\n        if (stream.match(/\\.\\.\\./)) { return \"def\"; }\n        /* array list item */\n        if (stream.match(/\\s*-\\s+/)) { return 'meta'; }\n      }\n      /* inline pairs/lists */\n      if (stream.match(/^(\\{|\\}|\\[|\\])/)) {\n        if (ch == '{')\n          state.inlinePairs++;\n        else if (ch == '}')\n          state.inlinePairs--;\n        else if (ch == '[')\n          state.inlineList++;\n        else\n          state.inlineList--;\n        return 'meta';\n      }\n\n      /* list seperator */\n      if (state.inlineList > 0 && !esc && ch == ',') {\n        stream.next();\n        return 'meta';\n      }\n      /* pairs seperator */\n      if (state.inlinePairs > 0 && !esc && ch == ',') {\n        state.keyCol = 0;\n        state.pair = false;\n        state.pairStart = false;\n        stream.next();\n        return 'meta';\n      }\n\n      /* start of value of a pair */\n      if (state.pairStart) {\n        /* block literals */\n        if (stream.match(/^\\s*(\\||\\>)\\s*/)) { state.literal = true; return 'meta'; };\n        /* references */\n        if (stream.match(/^\\s*(\\&|\\*)[a-z0-9\\._-]+\\b/i)) { return 'variable-2'; }\n        /* numbers */\n        if (state.inlinePairs == 0 && stream.match(/^\\s*-?[0-9\\.\\,]+\\s?$/)) { return 'number'; }\n        if (state.inlinePairs > 0 && stream.match(/^\\s*-?[0-9\\.\\,]+\\s?(?=(,|}))/)) { return 'number'; }\n        /* keywords */\n        if (stream.match(keywordRegex)) { return 'keyword'; }\n      }\n\n      /* pairs (associative arrays) -> key */\n      if (!state.pair && stream.match(/^\\s*(?:[,\\[\\]{}&*!|>'\"%@`][^\\s'\":]|[^,\\[\\]{}#&*!|>'\"%@`])[^#]*?(?=\\s*:($|\\s))/)) {\n        state.pair = true;\n        state.keyCol = stream.indentation();\n        return \"atom\";\n      }\n      if (state.pair && stream.match(/^:\\s*/)) { state.pairStart = true; return 'meta'; }\n\n      /* nothing found, continue */\n      state.pairStart = false;\n      state.escaped = (ch == '\\\\');\n      stream.next();\n      return null;\n    },\n    startState: function() {\n      return {\n        pair: false,\n        pairStart: false,\n        keyCol: 0,\n        inlinePairs: 0,\n        inlineList: 0,\n        literal: false,\n        escaped: false\n      };\n    }\n  };\n});\n\nCodeMirror.defineMIME(\"text/x-yaml\", \"yaml\");\n\n});\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/z80/index.html",
    "content": "<!doctype html>\n\n<title>CodeMirror: Z80 assembly mode</title>\n<meta charset=\"utf-8\"/>\n<link rel=stylesheet href=\"../../doc/docs.css\">\n\n<link rel=\"stylesheet\" href=\"../../lib/codemirror.css\">\n<script src=\"../../lib/codemirror.js\"></script>\n<script src=\"z80.js\"></script>\n<style type=\"text/css\">.CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}</style>\n<div id=nav>\n  <a href=\"http://codemirror.net\"><h1>CodeMirror</h1><img id=logo src=\"../../doc/logo.png\"></a>\n\n  <ul>\n    <li><a href=\"../../index.html\">Home</a>\n    <li><a href=\"../../doc/manual.html\">Manual</a>\n    <li><a href=\"https://github.com/codemirror/codemirror\">Code</a>\n  </ul>\n  <ul>\n    <li><a href=\"../index.html\">Language modes</a>\n    <li><a class=active href=\"#\">Z80 assembly</a>\n  </ul>\n</div>\n\n<article>\n<h2>Z80 assembly mode</h2>\n\n\n<div><textarea id=\"code\" name=\"code\">\n#include    \"ti83plus.inc\"\n#define     progStart   $9D95\n.org        progStart-2\n.db         $BB,$6D\n    bcall(_ClrLCDFull)\n    ld  HL, 0\n    ld  (PenCol),   HL\n    ld  HL, Message\n    bcall(_PutS) ; Displays the string\n    bcall(_NewLine)\n    ret\nMessage:\n.db         \"Hello world!\",0\n</textarea></div>\n\n    <script>\n      var editor = CodeMirror.fromTextArea(document.getElementById(\"code\"), {\n        lineNumbers: true\n      });\n    </script>\n\n    <p><strong>MIME type defined:</strong> <code>text/x-z80</code>.</p>\n  </article>\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/mode/z80/z80.js",
    "content": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n(function(mod) {\n  if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n    mod(require(\"../../lib/codemirror\"));\n  else if (typeof define == \"function\" && define.amd) // AMD\n    define([\"../../lib/codemirror\"], mod);\n  else // Plain browser env\n    mod(CodeMirror);\n})(function(CodeMirror) {\n\"use strict\";\n\nCodeMirror.defineMode('z80', function() {\n  var keywords1 = /^(exx?|(ld|cp|in)([di]r?)?|pop|push|ad[cd]|cpl|daa|dec|inc|neg|sbc|sub|and|bit|[cs]cf|x?or|res|set|r[lr]c?a?|r[lr]d|s[lr]a|srl|djnz|nop|rst|[de]i|halt|im|ot[di]r|out[di]?)\\b/i;\n  var keywords2 = /^(call|j[pr]|ret[in]?)\\b/i;\n  var keywords3 = /^b_?(call|jump)\\b/i;\n  var variables1 = /^(af?|bc?|c|de?|e|hl?|l|i[xy]?|r|sp)\\b/i;\n  var variables2 = /^(n?[zc]|p[oe]?|m)\\b/i;\n  var errors = /^([hl][xy]|i[xy][hl]|slia|sll)\\b/i;\n  var numbers = /^([\\da-f]+h|[0-7]+o|[01]+b|\\d+)\\b/i;\n\n  return {\n    startState: function() {\n      return {context: 0};\n    },\n    token: function(stream, state) {\n      if (!stream.column())\n        state.context = 0;\n\n      if (stream.eatSpace())\n        return null;\n\n      var w;\n\n      if (stream.eatWhile(/\\w/)) {\n        w = stream.current();\n\n        if (stream.indentation()) {\n          if (state.context == 1 && variables1.test(w))\n            return 'variable-2';\n\n          if (state.context == 2 && variables2.test(w))\n            return 'variable-3';\n\n          if (keywords1.test(w)) {\n            state.context = 1;\n            return 'keyword';\n          } else if (keywords2.test(w)) {\n            state.context = 2;\n            return 'keyword';\n          } else if (keywords3.test(w)) {\n            state.context = 3;\n            return 'keyword';\n          }\n\n          if (errors.test(w))\n            return 'error';\n        } else if (numbers.test(w)) {\n          return 'number';\n        } else {\n          return null;\n        }\n      } else if (stream.eat(';')) {\n        stream.skipToEnd();\n        return 'comment';\n      } else if (stream.eat('\"')) {\n        while (w = stream.next()) {\n          if (w == '\"')\n            break;\n\n          if (w == '\\\\')\n            stream.next();\n        }\n        return 'string';\n      } else if (stream.eat('\\'')) {\n        if (stream.match(/\\\\?.'/))\n          return 'number';\n      } else if (stream.eat('.') || stream.sol() && stream.eat('#')) {\n        state.context = 4;\n\n        if (stream.eatWhile(/\\w/))\n          return 'def';\n      } else if (stream.eat('$')) {\n        if (stream.eatWhile(/[\\da-f]/i))\n          return 'number';\n      } else if (stream.eat('%')) {\n        if (stream.eatWhile(/[01]/))\n          return 'number';\n      } else {\n        stream.next();\n      }\n      return null;\n    }\n  };\n});\n\nCodeMirror.defineMIME(\"text/x-z80\", \"z80\");\n\n});\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/package.json",
    "content": "{\n    \"name\": \"codemirror\",\n    \"version\":\"5.0.0\",\n    \"main\": \"lib/codemirror.js\",\n    \"description\": \"In-browser code editing made bearable\",\n    \"licenses\": [{\"type\": \"MIT\",\n                  \"url\": \"http://codemirror.net/LICENSE\"}],\n    \"directories\": {\"lib\": \"./lib\"},\n    \"scripts\": {\"test\": \"node ./test/run.js\"},\n    \"devDependencies\": {\"node-static\": \"0.6.0\",\n                        \"phantomjs\": \"1.9.2-5\",\n                        \"blint\": \">=0.1.1\"},\n    \"bugs\": \"http://github.com/codemirror/CodeMirror/issues\",\n    \"keywords\": [\"JavaScript\", \"CodeMirror\", \"Editor\"],\n    \"homepage\": \"http://codemirror.net\",\n    \"maintainers\":[{\"name\": \"Marijn Haverbeke\",\n                    \"email\": \"marijnh@gmail.com\",\n                    \"web\": \"http://marijnhaverbeke.nl\"}],\n    \"repository\": {\"type\": \"git\",\n                   \"url\": \"https://github.com/codemirror/CodeMirror.git\"}\n}\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/theme/3024-day.css",
    "content": "/*\n\n    Name:       3024 day\n    Author:     Jan T. Sott (http://github.com/idleberg)\n\n    CodeMirror template by Jan T. Sott (https://github.com/idleberg/base16-codemirror)\n    Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16)\n\n*/\n\n.cm-s-3024-day.CodeMirror {background: #f7f7f7; color: #3a3432;}\n.cm-s-3024-day div.CodeMirror-selected {background: #d6d5d4 !important;}\n.cm-s-3024-day.CodeMirror ::selection { background: #d6d5d4; }\n.cm-s-3024-day.CodeMirror ::-moz-selection { background: #d9d9d9; }\n\n.cm-s-3024-day .CodeMirror-gutters {background: #f7f7f7; border-right: 0px;}\n.cm-s-3024-day .CodeMirror-guttermarker { color: #db2d20; }\n.cm-s-3024-day .CodeMirror-guttermarker-subtle { color: #807d7c; }\n.cm-s-3024-day .CodeMirror-linenumber {color: #807d7c;}\n\n.cm-s-3024-day .CodeMirror-cursor {border-left: 1px solid #5c5855 !important;}\n\n.cm-s-3024-day span.cm-comment {color: #cdab53;}\n.cm-s-3024-day span.cm-atom {color: #a16a94;}\n.cm-s-3024-day span.cm-number {color: #a16a94;}\n\n.cm-s-3024-day span.cm-property, .cm-s-3024-day span.cm-attribute {color: #01a252;}\n.cm-s-3024-day span.cm-keyword {color: #db2d20;}\n.cm-s-3024-day span.cm-string {color: #fded02;}\n\n.cm-s-3024-day span.cm-variable {color: #01a252;}\n.cm-s-3024-day span.cm-variable-2 {color: #01a0e4;}\n.cm-s-3024-day span.cm-def {color: #e8bbd0;}\n.cm-s-3024-day span.cm-bracket {color: #3a3432;}\n.cm-s-3024-day span.cm-tag {color: #db2d20;}\n.cm-s-3024-day span.cm-link {color: #a16a94;}\n.cm-s-3024-day span.cm-error {background: #db2d20; color: #5c5855;}\n\n.cm-s-3024-day .CodeMirror-activeline-background {background: #e8f2ff !important;}\n.cm-s-3024-day .CodeMirror-matchingbracket { text-decoration: underline; color: #a16a94 !important;}\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/theme/3024-night.css",
    "content": "/*\n\n    Name:       3024 night\n    Author:     Jan T. Sott (http://github.com/idleberg)\n\n    CodeMirror template by Jan T. Sott (https://github.com/idleberg/base16-codemirror)\n    Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16)\n\n*/\n\n.cm-s-3024-night.CodeMirror {background: #090300; color: #d6d5d4;}\n.cm-s-3024-night div.CodeMirror-selected {background: #3a3432 !important;}\n.cm-s-3024-night.CodeMirror ::selection { background: rgba(58, 52, 50, .99); }\n.cm-s-3024-night.CodeMirror ::-moz-selection { background: rgba(58, 52, 50, .99); }\n.cm-s-3024-night .CodeMirror-gutters {background: #090300; border-right: 0px;}\n.cm-s-3024-night .CodeMirror-guttermarker { color: #db2d20; }\n.cm-s-3024-night .CodeMirror-guttermarker-subtle { color: #5c5855; }\n.cm-s-3024-night .CodeMirror-linenumber {color: #5c5855;}\n\n.cm-s-3024-night .CodeMirror-cursor {border-left: 1px solid #807d7c !important;}\n\n.cm-s-3024-night span.cm-comment {color: #cdab53;}\n.cm-s-3024-night span.cm-atom {color: #a16a94;}\n.cm-s-3024-night span.cm-number {color: #a16a94;}\n\n.cm-s-3024-night span.cm-property, .cm-s-3024-night span.cm-attribute {color: #01a252;}\n.cm-s-3024-night span.cm-keyword {color: #db2d20;}\n.cm-s-3024-night span.cm-string {color: #fded02;}\n\n.cm-s-3024-night span.cm-variable {color: #01a252;}\n.cm-s-3024-night span.cm-variable-2 {color: #01a0e4;}\n.cm-s-3024-night span.cm-def {color: #e8bbd0;}\n.cm-s-3024-night span.cm-bracket {color: #d6d5d4;}\n.cm-s-3024-night span.cm-tag {color: #db2d20;}\n.cm-s-3024-night span.cm-link {color: #a16a94;}\n.cm-s-3024-night span.cm-error {background: #db2d20; color: #807d7c;}\n\n.cm-s-3024-night .CodeMirror-activeline-background {background: #2F2F2F !important;}\n.cm-s-3024-night .CodeMirror-matchingbracket { text-decoration: underline; color: white !important;}\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/theme/ambiance-mobile.css",
    "content": ".cm-s-ambiance.CodeMirror {\n  -webkit-box-shadow: none;\n  -moz-box-shadow: none;\n  box-shadow: none;\n}\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/theme/ambiance.css",
    "content": "/* ambiance theme for codemirror */\n\n/* Color scheme */\n\n.cm-s-ambiance .cm-keyword { color: #cda869; }\n.cm-s-ambiance .cm-atom { color: #CF7EA9; }\n.cm-s-ambiance .cm-number { color: #78CF8A; }\n.cm-s-ambiance .cm-def { color: #aac6e3; }\n.cm-s-ambiance .cm-variable { color: #ffb795; }\n.cm-s-ambiance .cm-variable-2 { color: #eed1b3; }\n.cm-s-ambiance .cm-variable-3 { color: #faded3; }\n.cm-s-ambiance .cm-property { color: #eed1b3; }\n.cm-s-ambiance .cm-operator {color: #fa8d6a;}\n.cm-s-ambiance .cm-comment { color: #555; font-style:italic; }\n.cm-s-ambiance .cm-string { color: #8f9d6a; }\n.cm-s-ambiance .cm-string-2 { color: #9d937c; }\n.cm-s-ambiance .cm-meta { color: #D2A8A1; }\n.cm-s-ambiance .cm-qualifier { color: yellow; }\n.cm-s-ambiance .cm-builtin { color: #9999cc; }\n.cm-s-ambiance .cm-bracket { color: #24C2C7; }\n.cm-s-ambiance .cm-tag { color: #fee4ff }\n.cm-s-ambiance .cm-attribute {  color: #9B859D; }\n.cm-s-ambiance .cm-header {color: blue;}\n.cm-s-ambiance .cm-quote { color: #24C2C7; }\n.cm-s-ambiance .cm-hr { color: pink; }\n.cm-s-ambiance .cm-link { color: #F4C20B; }\n.cm-s-ambiance .cm-special { color: #FF9D00; }\n.cm-s-ambiance .cm-error { color: #AF2018; }\n\n.cm-s-ambiance .CodeMirror-matchingbracket { color: #0f0; }\n.cm-s-ambiance .CodeMirror-nonmatchingbracket { color: #f22; }\n\n.cm-s-ambiance .CodeMirror-selected { background: rgba(255, 255, 255, 0.15); }\n.cm-s-ambiance.CodeMirror-focused .CodeMirror-selected { background: rgba(255, 255, 255, 0.10); }\n.cm-s-ambiance.CodeMirror ::selection { background: rgba(255, 255, 255, 0.10); }\n.cm-s-ambiance.CodeMirror ::-moz-selection { background: rgba(255, 255, 255, 0.10); }\n\n/* Editor styling */\n\n.cm-s-ambiance.CodeMirror {\n  line-height: 1.40em;\n  color: #E6E1DC;\n  background-color: #202020;\n  -webkit-box-shadow: inset 0 0 10px black;\n  -moz-box-shadow: inset 0 0 10px black;\n  box-shadow: inset 0 0 10px black;\n}\n\n.cm-s-ambiance .CodeMirror-gutters {\n  background: #3D3D3D;\n  border-right: 1px solid #4D4D4D;\n  box-shadow: 0 10px 20px black;\n}\n\n.cm-s-ambiance .CodeMirror-linenumber {\n  text-shadow: 0px 1px 1px #4d4d4d;\n  color: #111;\n  padding: 0 5px;\n}\n\n.cm-s-ambiance .CodeMirror-guttermarker { color: #aaa; }\n.cm-s-ambiance .CodeMirror-guttermarker-subtle { color: #111; }\n\n.cm-s-ambiance .CodeMirror-lines .CodeMirror-cursor {\n  border-left: 1px solid #7991E8;\n}\n\n.cm-s-ambiance .CodeMirror-activeline-background {\n  background: none repeat scroll 0% 0% rgba(255, 255, 255, 0.031);\n}\n\n.cm-s-ambiance.CodeMirror,\n.cm-s-ambiance .CodeMirror-gutters {\n  background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAQAAAAHUWYVAABFFUlEQVQYGbzBCeDVU/74/6fj9HIcx/FRHx9JCFmzMyGRURhLZIkUsoeRfUjS2FNDtr6WkMhO9sm+S8maJfu+Jcsg+/o/c+Z4z/t97/vezy3z+z8ekGlnYICG/o7gdk+wmSHZ1z4pJItqapjoKXWahm8NmV6eOTbWUOp6/6a/XIg6GQqmenJ2lDHyvCFZ2cBDbmtHA043VFhHwXxClWmeYAdLhV00Bd85go8VmaFCkbVkzlQENzfBDZ5gtN7HwF0KDrTwJ0dypSOzpaKCMwQHKTIreYIxlmhXTzTWkVm+LTynZhiSBT3RZQ7aGfjGEd3qyXQ1FDymqbKxpspERQN2MiRjNZlFFQXfCNFm9nM1zpAsoYjmtRTc5ajwuaXc5xrWskT97RaKzAGe5ARHhVUsDbjKklziiX5WROcJwSNCNI+9w1Jwv4Zb2r7lCMZ4oq5C0EdTx+2GzNuKpJ+iFf38JEWkHJn9DNF7mmBDITrWEg0VWL3pHU20tSZnuqWu+R3BtYa8XxV1HO7GyD32UkOpL/yDloINFTmvtId+nmAjxRw40VMwVKiwrKLE4bK5UOVntYwhOcSSXKrJHKPJedocpGjVz/ZMIbnYUPB10/eKCrs5apqpgVmWzBYWpmtKHecJPjaUuEgRDDaU0oZghCJ6zNMQ5ZhDYx05r5v2muQdM0EILtXUsaKiQX9WMEUotagQzFbUNN6NUPC2nm5pxEWGCjMc3GdJHjSU2kORLK/JGSrkfGEIjncU/CYUnOipoYemwj8tST9NsJmB7TUVXtbUtXATJVZXBMvYeTXJfobgJUPmGMP/yFaWonaa6BcFO3nqcIqCozSZoZoSr1g4zJOzuyGnxTEX3lUEJ7WcZgme8ddaWvWJo2AJR9DZU3CUIbhCSG6ybSwN6qtJVnCU2svDTP2ZInOw2cBTrqtQahtNZn9NcJ4l2NaSmSkkP1noZWnVwkLmdUPOwLZEwy2Z3S3R+4rIG9hcbpPXHFVWcQdZkn2FOta3cKWQnNRC5g1LsJah4GCzSVsKnCOY5OAFRTBekyyryeyilhFKva75r4Mc0aWanGEaThcy31s439KKxTzJYY5WTHPU1FtIHjQU3Oip4xlNzj/lBw23dYZVliQa7WAXf4shetcQfatI+jWRDBPmyNeW6A1P5kdDgyYJlba0BIM8BZu1JfrFwItyjcAMR3K0BWOIrtMEXyhyrlVEx3ui5dUBjmB/Q3CXW85R4mBD0s7B+4q5tKUjOlb9qqmhi5AZ6GFIC5HXtOobdYGlVdMVbNJ8toNTFcHxnoL+muBagcctjWnbNMuR00uI7nQESwg5q2qqrKWIfrNUmeQocY6HuyxJV02wj36w00yhpmUFenv4p6fUkZYqLyuinx2RGOjhCXYyJF84oiU00YMOOhhquNdfbOB7gU88pY4xJO8LVdp6/q2voeB4R04vIdhSE40xZObx1HGGJ/ja0LBthFInKaLPPFzuCaYaoj8JjPME8yoyxo6zlBqkiUZYgq00OYMswbWO5NGmq+xhipxHLRW29ARjNKXO0wRnear8XSg4XFPLKEPUS1GqvyLwiuBUoa7zpZ0l5xxFwWmWZC1H5h5FwU8eQ7K+g8UcVY6TMQreVQT/8uQ8Z+ALIXnSEa2pYZQneE9RZbSBNYXfWYJzW/h/4j4Dp1tYVcFIC5019Vyi4ThPqSFCzjGWaHQTBU8q6vrVwgxP9Lkm840imWKpcLCjYTtrKuwvsKSnrvHCXGkSMk9p6lhckfRpIeis+N2PiszT+mFLspyGleUhDwcLrZqmyeylxwjBcKHEapqkmyangyLZRVOijwOtCY5SsG5zL0OwlCJ4y5KznF3EUNDDrinwiyLZRzOXtlBbK5ITHFGLp8Q0R6ab6mS7enI2cFrxOyHvOCFaT1HThS1krjCwqWeurCkk+willhCC+RSZnRXBiZaC5RXRIZYKp2lyfrHwiKPKR0JDzrdU2EFgpidawlFDR6FgXUMNa+g1FY3bUQh2cLCwosRdnuQTS/S+JVrGLeWIvtQUvONJxlqSQYYKpwoN2kaocLjdVsis4Mk80ESF2YpSkzwldjHkjFCUutI/r+EHDU8oCs6yzL3PhWiEooZdFMkymlas4AcI3KmoMMNSQ3tHzjGWCrcJJdYyZC7QFGwjRL9p+MrRkAGWzIaWCn9W0F3TsK01c2ZvQw0byvxuQU0r1lM0qJO7wW0kRIMdDTtXEdzi4VIh+EoIHm0mWtAtpCixlabgn83fKTI7anJe9ST7WIK1DMGpQmYeA58ImV6ezOGOzK2Kgq01pd60cKWiUi9Lievb/0vIDPHQ05Kzt4ddPckQBQtoaurjyHnek/nKzpQLrVgKPjIkh2v4uyezpv+Xoo7fPFXaGFp1vaLKxQ4uUpQQS5VuQs7BCq4xRJv7fwpVvvFEB3j+620haOuocqMhWd6TTPAEx+mdFNGHdranFe95WrWmIvlY4F1Dle2ECgc6cto7SryuqGGGha0tFQ5V53migUKmg6XKAo4qS3mik+0OZpAhOLeZKicacgaYcyx5hypYQE02ZA4xi/pNhOQxR4klNKyqacj+mpxnLTnnGSo85++3ZCZq6lrZkXlGEX3o+C9FieccJbZWVFjC0Yo1FZnJhoYMFoI1hEZ9r6hwg75HwzBNhbZCdJEfJwTPGzJvaKImw1yYX1HDAmpXR+ZJQ/SmgqMNVQb5vgamGwLtt7VwvP7Qk1xpiM5x5Cyv93E06MZmgs0Nya2azIKOYKCGBQQW97RmhKNKF02JZqHEJ4o58qp7X5EcZmc56trXEqzjCBZ1MFGR87Ql2tSTs6CGxS05PTzRQorkbw7aKoKXFDXsYW42VJih/q+FP2BdTzDTwVqOYB13liM50vG7wy28qagyuIXMeQI/Oqq8bcn5wJI50xH00CRntyfpL1T4hydYpoXgNiFzoIUTDZnLNRzh4TBHwbYGDvZkxmlyJloyr6tRihpeUG94GnKtIznREF0tzJG/OOr73JBcrSh1k6WuTprgLU+mnSGnv6Zge0NNz+kTDdH8nuAuTdJDCNb21LCiIuqlYbqGzT3RAoZofQfjFazkqeNWdYaGvYTM001EW2oKPvVk1ldUGSgUtHFwjKM1h9jnFcmy5lChoLNaQMGGDsYbKixlaMBmmsx1QjCfflwTfO/gckW0ruZ3jugKR3R5W9hGUWqCgxuFgsuaCHorotGKzGaeZB9DMsaTnKCpMtwTvOzhYk0rdrArKCqcaWmVk1+F372ur1YkKxgatI8Qfe1gIX9wE9FgS8ESmuABIXnRUbCapcKe+nO7slClSZFzpV/LkLncEb1qiO42fS3R855Su2mCLh62t1SYZZYVmKwIHjREF2uihTzB20JOkz7dkxzYQnK0UOU494wh+VWRc6Un2kpTaVgLDFEkJ/uhzRcI0YKGgpGWOlocBU/a4fKoJ/pEaNV6jip3+Es9VXY078rGnmAdf7t9ylPXS34RBSuYPs1UecZTU78WanhBCHpZ5sAoTz0LGZKjPf9TRypqWEiTvOFglL1fCEY3wY/++rbk7C8bWebA6p6om6PgOL2kp44TFJlVNBXae2rqqdZztOJpT87GQsE9jqCPIe9VReZuQ/CIgacsyZdCpIScSYqcZk8r+nsyCzhyfhOqHGOIvrLknC8wTpFcaYiGC/RU1NRbUeUpocQOnkRpGOrIOcNRx+1uA0UrzhSSt+VyS3SJpnFWkzNDqOFGIWcfR86DnmARTQ1HKIL33ExPiemeOhYSSjzlSUZZuE4TveoJLnBUOFof6KiysCbnAEcZgcUNTDOwkqWu3RWtmGpZwlHhJENdZ3miGz0lJlsKnjbwqSHQjpxnFDlTLLwqJPMZMjd7KrzkSG7VsxXBZE+F8YZkb01Oe00yyRK9psh5SYh29ySPKBo2ylNht7ZkZnsKenjKNJu9PNEyZpaCHv4Kt6RQsLvAVp7M9kIimmCUwGeWqLMmGuIotYMmWNpSahkhZw9FqZsVnKJhsjAHvtHMsTM9fCI06Dx/u3vfUXCqfsKRc4oFY2jMsoo/7DJDwZ1CsIKnJu+J9ldkpmiCxQx1rWjI+T9FwcWWzOuaYH0Hj7klNRVWEQpmaqosakiGNTFHdjS/qnUdmf0NJW5xsL0HhimCCZZSRzmSPTXJQ4aaztAwtZnoabebJ+htCaZ7Cm535ByoqXKbX1WRc4Eh2MkRXWzImVc96Cj4VdOKVxR84VdQsIUM8Psoou2byVHyZFuq7O8otbSQ2UAoeEWTudATLGSpZzVLlXVkPU2Jc+27lsw2jmg5T5VhbeE3BT083K9WsTTkFU/Osi0rC5lRlpwRHUiesNS0sOvmqGML1aRbPAxTJD9ZKtxuob+hhl8cwYGWpJ8nub7t5p6coYbMovZ1BTdaKn1jYD6h4GFDNFyT/Kqe1XCXphXHOKLZmuRSRdBPEfVUXQzJm5YGPGGJdvAEr7hHNdGZnuBvrpciGmopOLf5N0uVMy0FfYToJk90uUCbJupaVpO53UJXR2bVpoU00V2KOo4zMFrBd0Jtz2pa0clT5Q5L8IpQ177mWQejPMEJhuQjS10ref6HHjdEhy1P1EYR7GtO0uSsKJQYLiTnG1rVScj5lyazpqWGl5uBbRWl7m6ixGOOnEsMJR7z8J0n6KMnCdxhiNYQCoZ6CmYLnO8omC3MkW3bktlPmEt/VQQHejL3+dOE5FlPdK/Mq8hZxxJtLyRrepLThYKbLZxkSb5W52vYxNOaOxUF0yxMUPwBTYqCzy01XayYK0sJyWBLqX0MwU5CzoymRzV0EjjeUeLgDpTo6ij42ZAzvD01dHUUTPLU96MdLbBME8nFBn7zJCMtJcZokn8YoqU0FS5WFKyniHobguMcmW8N0XkWZjkyN3hqOMtS08r+/xTBwpZSZ3qiVRX8SzMHHjfUNFjgHEPmY9PL3ykEzxkSre/1ZD6z/NuznuB0RcE1TWTm9zRgfUWVJiG6yrzgmWPXC8EAR4Wxhlad0ZbgQyEz3pG5RVEwwDJH2mgKpjcTiCOzn1lfUWANFbZ2BA8balnEweJC9J0iuaeZoI+ippFCztEKVvckR2iice1JvhVytrQwUAZpgsubCPaU7xUe9vWnaOpaSBEspalykhC9bUlOMpT42ZHca6hyrqKmw/wMR8H5ZmdFoBVJb03O4UL0tSNnvIeRmkrLWqrs78gcrEn2tpcboh0UPOW3UUR9PMk4T4nnNKWmCjlrefhCwxRNztfmIQVdDElvS4m1/WuOujoZCs5XVOjtKPGokJzsYCtFYoWonSPT21DheU/wWhM19FcElwqNGOsp9Q8N/cwXaiND1MmeL1Q5XROtYYgGeFq1aTMsoMmcrKjQrOFQTQ1fmBYhmW6o8Jkjc7iDJRTBIo5kgJD5yMEYA3srCg7VFKwiVJkmRCc5ohGOKhsYMn/XBLdo5taZjlb9YAlGWRimqbCsoY7HFAXLa5I1HPRxMMsQDHFkWtRNniqT9UEeNjcE7RUlrCJ4R2CSJuqlKHWvJXjAUNcITYkenuBRB84TbeepcqTj3zZyFJzgYQdHnqfgI0ddUwS6GqWpsKWhjq9cV0vBAEMN2znq+EBfIWT+pClYw5xsTlJU6GeIBsjGmmANTzJZiIYpgrM0Oa8ZMjd7NP87jxhqGOhJlnQtjuQpB+8aEE00wZFznSJPyHxgH3HkPOsJFvYk8zqCHzTs1BYOa4J3PFU+UVRZxlHDM4YavlNUuMoRveiZA2d7grMNc2g+RbSCEKzmgYsUmWmazFJyoiOZ4KnyhKOGRzWJa0+moyV4TVHDzn51Awtqaphfk/lRQ08FX1iiqxTB/kLwd0VynKfEvI6cd4XMV5bMhZ7gZUWVzYQ6Nm2BYzxJbw3bGthEUUMfgbGeorae6DxHtJoZ6alhZ0+ytiVoK1R4z5PTrOECT/SugseEOlb1MMNR4VRNcJy+V1Hg9ONClSZFZjdHlc6W6FBLdJja2MC5hhpu0DBYEY1TFGwiFAxRRCsYkiM9JRb0JNMVkW6CZYT/2EiTGWmo8k+h4FhDNE7BvppoTSFnmCV5xZKzvcCdDo7VVPnIU+I+Rc68juApC90MwcFCsJ5hDqxgScYKreruyQwTqrzoqDCmhWi4IbhB0Yrt3RGa6GfDv52rKXWhh28dyZaWUvcZeMTBaZoSGyiCtRU5J8iviioHaErs7Jkj61syVzTTgOcUOQ8buFBTYWdL5g3T4qlpe0+wvD63heAXRfCCIed9RbCsp2CiI7raUOYOTU13N8PNHvpaGvayo4a3LLT1lDrVEPT2zLUlheB1R+ZTRfKWJ+dcocLJfi11vyJ51lLqJ0WD7tRwryezjiV5W28uJO9qykzX8JDe2lHl/9oyBwa2UMfOngpXCixvKdXTk3wrsKmiVYdZIqsoWEERjbcUNDuiaQomGoIbFdEHmsyWnuR+IeriKDVLnlawlyNHKwKlSU631PKep8J4Q+ayjkSLKYLhalNHlYvttb6fHm0p6OApsZ4l2VfdqZkjuysy6ysKLlckf1KUutCTs39bmCgEyyoasIWlVaMF7mgmWtBT8Kol5xpH9IGllo8cJdopcvZ2sImlDmMIbtDk3KIpeNiS08lQw11NFPTwVFlPP6pJ2gvRfI7gQUfmNAtf6Gs0wQxDsKGlVBdF8rCa3jzdwMaGHOsItrZk7hAyOzpK9VS06j5F49b0VNGOOfKs3lDToMsMBe9ZWtHFEgxTJLs7qrygKZjUnmCYoeAqeU6jqWuLJup4WghOdvCYJnrSkSzoyRkm5M2StQwVltPkfCAk58tET/CSg+8MUecmotMEnhBKfWBIZsg2ihruMJQaoIm+tkTLKEqspMh00w95gvFCQRtDwTT1gVDDSEVdlwqZfxoQRbK0g+tbiBZxzKlpnpypejdDwTaeOvorMk/IJE10h9CqRe28hhLbe0pMsdSwv4ZbhKivo2BjDWfL8UKJgeavwlwb5KlwhyE4u4XkGE2ytZCznKLCDZZq42VzT8HLCrpruFbIfOIINmh/qCdZ1ZBc65kLHR1Bkyf5zn6pN3SvGKIlFNGplhrO9QSXanLOMQTLCa0YJCRrCZm/CZmrLTm7WzCK4GJDiWUdFeYx1LCFg3NMd0XmCuF3Y5rITLDUsYS9zoHVzwnJoYpSTQoObyEzr4cFBNqYTopoaU/wkyLZ2lPhX/5Y95ulxGTV7KjhWrOZgl8MyUUafjYraNjNU1N3IWcjT5WzWqjwtoarHSUObGYO3GCJZpsBlnJGPd6ZYLyl1GdCA2625IwwJDP8GUKymbzuyPlZlvTUsaUh5zFDhRWFzPKKZLAlWdcQbObgF9tOqOsmB1dqcqYJmWstFbZRRI9poolmqiLnU0POvxScpah2iSL5UJNzgScY5+AuIbpO0YD3NCW+dLMszFSdFCWGqG6eVq2uYVNDdICGD6W7EPRWZEY5gpsE9rUkS3mijzzJnm6UpUFXG1hCUeVoS5WfNcFpblELL2qqrCvMvRfd45oalvKU2tiQ6ePJOVMRXase9iTtLJztPxJKLWpo2CRDcJwn2sWSLKIO1WQWNTCvpVUvOZhgSC40JD0dOctaSqzkCRbXsKlb11Oip6PCJ0IwSJM31j3akRxlP7Rwn6aGaUL0qiLnJkvB3xWZ2+Q1TfCwpQH3G0o92UzmX4o/oJNQMMSQc547wVHhdk+VCw01DFYEnTxzZKAm74QmeNNR1w6WzEhNK15VJzuCdxQ53dRUDws5KvwgBMOEgpcVNe0hZI6RXT1Jd0cyj5nsaEAHgVmGaJIlWdsc5Ui2ElrRR6jrRAttNMEAIWrTDFubkZaok7/AkzfIwfuWVq0jHzuCK4QabtLUMVPB3kJ0oyHTSVFlqMALilJf2Rf8k5aaHtMfayocLBS8L89oKoxpJvnAkDPa0qp5DAUTHKWmCcnthlou8iCKaFFLHWcINd1nyIwXqrSxMNmSs6KmoL2QrKuWtlQ5V0120xQ5vRyZS1rgFkWwhiOwiuQbR0OOVhQM9iS3tiXp4RawRPMp5tDletOOBL95MpM01dZTBM9pkn5qF010rIeHFcFZhmSGpYpTsI6nwhqe5C9ynhlpp5ophuRb6WcJFldkVnVEwwxVfrVkvnWUuNLCg5bgboFHPDlDPDmnK7hUrWiIbjadDclujlZcaokOFup4Ri1kacV6jmrrK1hN9bGwpKEBQ4Q6DvIUXOmo6U5LqQM6EPyiKNjVkPnJkDPNEaxhiFay5ExW1NXVUGqcpYYdPcGiCq7z/TSlbhL4pplWXKd7NZO5QQFrefhRQW/NHOsqcIglc4UhWklR8K0QzbAw08CBDnpbgqXdeD/QUsM4RZXDFBW6WJKe/mFPdH0LtBgiq57wFLzlyQzz82qYx5D5WJP5yVJDW01BfyHnS6HKO/reZqId1WGa4Hkh2kWodJ8i6KoIPlAj2hPt76CzXsVR6koPRzWTfKqIentatYpQw2me4AA3y1Kind3SwoOKZDcFXTwl9tWU6mfgRk9d71sKtlNwrjnYw5tC5n5LdKiGry3JKNlHEd3oaMCFHrazBPMp/uNJ+V7IudcSbeOIdjUEdwl0VHCOZo5t6YluEuaC9mQeMgSfOyKnYGFHcIeQ84yQWbuJYJpZw5CzglDH7gKnWqqM9ZTaXcN0TeYhR84eQtJT76JJ1lREe7WnnvsMmRc9FQ7SBBM9mV3lCUdmHk/S2RAMt0QjFNFqQpWjDPQ01DXWUdDBkXziKPjGEP3VP+zIWU2t7im41FOloyWzn/L6dkUy3VLDaZ6appgDLHPjJEsyvJngWEPUyVBiAaHCTEXwrLvSEbV1e1gKJniicWorC1MUrVjB3uDhJE/wgSOzk1DXpk0k73qCM8xw2UvD5kJmDUfOomqMpWCkJRlvKXGmoeBm18USjVIk04SClxTB6YrgLAPLWYK9HLUt5cmc0vYES8GnTeRc6skZbQkWdxRsIcyBRzx1DbTk9FbU0caTPOgJHhJKnOGIVhQqvKmo0llRw9sabrZkDtdg3PqaKi9oatjY8B+G371paMg6+mZFNNtQ04mWBq3rYLOmtWWQp8KJnpy9DdFensyjdqZ+yY40VJlH8wcdLzC8PZnvHMFUTZUrDTkLyQaGus5X5LzpYAf3i+e/ZlhqGqWhh6Ou6xTR9Z6oi5AZZtp7Mj2EEm8oSpxiYZCHU/1fbGdNNNRRoZMhmilEb2gqHOEJDtXkHK/JnG6IrvbPCwV3NhONVdS1thBMs1T4QOBcTWa2IzhMk2nW5Kyn9tXUtpv9RsG2msxk+ZsQzRQacJncpgke0+T8y5Fzj8BiGo7XlJjaTIlpQs7KFjpqGnKuoyEPeIKnFMkZHvopgh81ySxNFWvJWcKRs70j2FOT012IllEEO1n4pD1513Yg2ssQPOThOkvyrqHUdEXOSEsihmBbTbKX1kLBPWqWkLOqJbjB3GBIZmoa8qWl4CG/iZ7oiA72ZL7TJNeZUY7kFQftDcHHluBzRbCegzMtrRjVQpX2lgoPKKLJAkcbMl01XK2p7yhL8pCBbQ3BN2avJgKvttcrWDK3CiUOVxQ8ZP+pqXKyIxnmBymCg5vJjNfkPK4+c8cIfK8ocVt7kmfd/I5SR1hKvCzUtb+lhgc00ZaO6CyhIQP1Uv4yIZjload72PXX0OIJvnFU+0Zf6MhsJwTfW0r0UwQfW4LNLZl5HK261JCZ4qnBaAreVAS3WrjV0LBnNDUNNDToCEeFfwgcb4gOEqLRhirWkexrCEYKVV711DLYEE1XBEsp5tpTGjorkomKYF9FDXv7fR3BGwbettSxnyL53MBPjsxDZjMh+VUW9NRxq1DhVk+FSxQcaGjV9Pawv6eGByw5qzoy7xk4RsOShqjJwWKe/1pEEfzkobeD/dQJmpqedcyBTy2sr4nGNRH0c0SPWTLrqAc0OQcb/gemKgqucQT7ySWKCn2EUotoCvpZct7RO2sy/QW0IWcXd7pQRQyZVwT2USRO87uhjioTLKV2brpMUcMQRbKH/N2T+UlTpaMls6cmc6CCNy3JdYYSUzzJQ4oSD3oKLncULOiJvjBEC2oqnCJkJluCYy2ZQ5so9YYlZ1VLlQU1mXEW1jZERwj/MUSRc24TdexlqLKfQBtDTScJUV8FszXBEY5ktpD5Ur9hYB4Nb1iikw3JoYpkKX+RodRKFt53MMuRnKSpY31PwYaGaILh3wxJGz9TkTPEETxoCWZrgvOlmyMzxFEwVJE5xZKzvyJ4WxEc16Gd4Xe3Weq4XH2jKRikqOkGQ87hQnC7wBmGYLAnesX3M+S87eFATauuN+Qcrh7xIxXJbUIdMw3JGE3ylCWzrieaqCn4zhGM19TQ3z1oH1AX+pWEqIc7wNGAkULBo/ZxRaV9NNyh4Br3rCHZzbzmSfawBL0dNRwpW1kK9mxPXR9povcdrGSZK9c2k0xwFGzjuniCtRSZCZ6ccZ7gaktmgAOtKbG/JnOkJrjcQTdFMsxRQ2cLY3WTIrlCw1eWKn8R6pvt4GFDso3QoL4a3nLk3G6JrtME3dSenpx7PNFTmga0EaJTLQ061sEeQoWXhSo9LTXsaSjoJQRXeZLtDclbCrYzfzHHeaKjHCVOUkQHO3JeEepr56mhiyaYYKjjNU+Fed1wS5VlhWSqI/hYUdDOkaxiKehoyOnrCV5yBHtbWFqTHCCwtpDcYolesVR5yUzTZBb3RNMd0d6WP+SvhuBmRcGxnuQzT95IC285cr41cLGQ6aJJhmi4TMGempxeimBRQw1tFKV+8jd6KuzoSTqqDxzRtpZkurvKEHxlqXKRIjjfUNNXQsNOsRScoWFLT+YeRZVD3GRN0MdQcKqQjHDMrdGGVu3iYJpQx3WGUvfbmxwFfR20WBq0oYY7LMFhhgYtr8jpaEnaOzjawWWaTP8mMr0t/EPDPoqcnxTBI5o58L7uoWnMrpoqPwgVrlAUWE+V+TQl9rawoyP6QGAlQw2TPRX+YSkxyBC8Z6jhHkXBgQL7WII3DVFnRfCrBfxewv9D6xsyjys4VkhWb9pUU627JllV0YDNHMku/ldNMMXDEo4aFnAkk4U6frNEU4XgZUPmEKHUl44KrzmYamjAbh0JFvGnaTLPu1s9jPCwjFpYiN7z1DTOk/nc07CfDFzmCf7i+bfNHXhDtLeBXzTBT5rkMvWOIxpl4EMh2LGJBu2syDnAEx2naEhHDWMMzPZEhygyS1mS5RTJr5ZkoKbEUoYqr2kqdDUE8ztK7OaIntJkFrIECwv8LJTaVx5XJE86go8dFeZ3FN3rjabCAYpoYEeC9zzJVULBbmZhDyd7ko09ydpNZ3nm2Kee4FPPXHnYEF1nqOFEC08LUVcDvYXkJHW8gTaKCk9YGOeIJhqiE4ToPEepdp7IWFjdwnWaufGMwJJCMtUTTBBK9BGCOy2tGGrJTHIwyEOzp6aPzNMOtlZkDvcEWpP5SVNhfkvDxhmSazTJXYrM9U1E0xwFVwqZQwzJxw6+kGGGUj2FglGGmnb1/G51udRSMNlTw6GGnCcUwVcOpmsqTHa06o72sw1RL02p9z0VbnMLOaIX3QKaYKSCFQzBKEUNHTSc48k53RH9wxGMtpQa5KjjW0W0n6XCCCG4yxNNdhQ4R4l1Ff+2sSd6UFHiIEOyqqFgT01mEUMD+joy75jPhOA+oVVLm309FR4yVOlp4RhLiScNmSmaYF5Pw0STrOIoWMSR2UkRXOMp+M4SHW8o8Zoi6OZgjKOaFar8zZDzkWzvKOjkKBjmCXby8JahhjXULY4KlzgKLvAwxVGhvyd4zxB1d9T0piazmKLCVZY5sKiD0y2ZSYrkUEPUbIk+dlQ4SJHTR50k1DPaUWIdTZW9NJwnJMOECgd7ou/MnppMJ02O1VT4Wsh85MnZzcFTngpXGKo84qmwgKbCL/orR/SzJ2crA+t6Mp94KvxJUeIbT3CQu1uIdlQEOzlKfS3UMcrTiFmOuroocrZrT2AcmamOKg8YomeEKm/rlT2sociMaybaUlFhuqHCM2qIJ+rg4EcDFymiDSxzaHdPcpE62pD5kyM5SBMoA1PaUtfIthS85ig1VPiPPYXgYEMNk4Qq7TXBgo7oT57gPUdwgCHzhIVFPFU6OYJzHAX9m5oNrVjeE61miDrqQ4VSa1oiURTsKHC0IfjNwU2WzK6eqK8jWln4g15TVBnqmDteCJ501PGAocJhhqjZdtBEB6lnhLreFJKxmlKbeGrqLiSThVIbCdGzloasa6lpMQXHCME2boLpJgT7yWaemu6wBONbqGNVRS0PKIL7LckbjmQtR7K8I5qtqel+T/ChJTNIKLjdUMNIRyvOEko9YYl2cwQveBikCNawJKcLBbc7+JM92mysNvd/Fqp8a0k6CNEe7cnZrxlW0wQXaXjaktnRwNOGZKYiONwS7a1JVheq3WgJHlQUGKHKmp4KAxXR/ULURcNgoa4zhKSLpZR3kxRRb0NmD0OFn+UCS7CzI1nbP6+o4x47QZE5xRCt3ZagnYcvmpYQktXdk5YKXTzBC57kKEe0VVuiSYqapssMS3C9p2CKkHOg8B8Pa8p5atrIw3qezIWanMGa5HRDNF6RM9wcacl0N+Q8Z8hsIkSnaIIdHRUOEebAPy1zbCkhM062FCJtif7PU+UtoVXzWKqM1PxXO8cfdruhFQ/a6x3JKYagvVDhQEtNiyiiSQ7OsuRsZUku0CRNDs4Sog6KKjsZgk2bYJqijgsEenoKeniinRXBn/U3lgpPdyDZynQx8IiioMnCep5Ky8mjGs6Wty0l1hUQTcNWswS3WRp2kCNZwJG8omG8JphPUaFbC8lEfabwP7VtM9yoaNCAjpR41VNhrD9LkbN722v0CoZMByFzhaW+MyzRYEWFDQwN2M4/JiT76PuljT3VU/A36eaIThb+R9oZGOAJ9tewkgGvqOMNRWYjT/Cwu99Q8LqDE4TgbLWxJ1jaDDAERsFOFrobgjUsBScaguXU8kKm2RL19tRypSHnHNlHiIZqgufs4opgQdVdwxBNNFBR6kVFqb8ogimOzB6a6HTzrlDHEpYaxjiiA4TMQobkDg2vejjfwJGWmnbVFAw3H3hq2NyQfG7hz4aC+w3BbwbesG0swYayvpAs6++Ri1Vfzx93mFChvyN5xVHTS+0p9aqCAxyZ6ZacZyw5+7uuQkFPR9DDk9NOiE7X1PCYJVjVUqq7JlrHwWALF5nfHNGjApdpqgzx5OwilDhCiDYTgnc9waGW4BdLNNUQvOtpzDOWHDH8D7TR/A/85KljEQu3NREc4Pl/6B1Hhc8Umb5CsKMmGC9EPcxoT2amwHNCmeOEnOPbklnMkbOgIvO5UMOpQrS9UGVdt6iH/fURjhI/WOpaW9OKLYRod6HCUEdOX000wpDZQ6hwg6LgZfOqo1RfT/CrJzjekXOGhpc1VW71ZLbXyyp+93ILbC1kPtIEYx0FIx1VDrLoVzXRKRYWk809yYlC9ImcrinxtabKnzRJk3lAU1OLEN1j2zrYzr2myHRXJFf4h4QKT1qSTzTB5+ZNTzTRkAxX8FcLV2uS8eoQQ2aAkFzvCM72sJIcJET3WPjRk5wi32uSS9rfZajpWEvj9hW42F4o5NytSXYy8IKHay10VYdrcl4SkqscrXpMwyGOgtkajheSxdQqmpxP1L3t4R5PqasFnrQEjytq6qgp9Y09Qx9o4S1FzhUCn1kyHSzBWLemoSGvOqLNhZyBjmCaAUYpMgt4Ck7wBBMMwWKWgjsUwTaGVsxWC1mYoKiyqqeGKYqonSIRQ3KIkHO0pmAxTdBHkbOvfllfr+AA+7gnc50huVKYK393FOyg7rbPO/izI7hE4CnHHHnJ0ogNPRUGeUpsrZZTBJcrovUcJe51BPsr6GkJdhCCsZ6aTtMEb2pqWkqeVtDXE/QVggsU/Nl86d9RMF3DxvZTA58agu810RWawCiSzzXBeU3MMW9oyJUedvNEvQyNu1f10BSMddR1vaLCYpYa/mGocLSiYDcLbQz8aMn5iyF4xBNMs1P0QEOV7o5gaWGuzSeLue4tt3ro7y4Tgm4G/mopdZgl6q0o6KzJWE3mMksNr3r+a6CbT8g5wZNzT9O7fi/zpaOmnz3BRoqos+tv9zMbdpxsqDBOEewtJLt7cg5wtKKbvldpSzRRCD43VFheCI7yZLppggMVBS/KMAdHODJvOwq2NQSbKKKPLdFWQs7Fqo+mpl01JXYRgq8dnGLhTiFzqmWsUMdpllZdbKlyvSdYxhI9YghOtxR8LgSLWHK62mGGVoxzBE8LNWzqH9CUesQzFy5RQzTc56mhi6fgXEWwpKfE5Z7M05ZgZUPmo6auiv8YKzDYwWBLMErIbKHJvOwIrvEdhOBcQ9JdU1NHQ7CXn2XIDFBKU2WAgcX9UAUzDXWd5alwuyJ41Z9rjKLCL4aCp4WarhPm2rH+SaHUYE001JDZ2ZAzXPjdMpZWvC9wmqIB2lLhQ01D5jO06hghWMndbM7yRJMsoCj1vYbnFQVrW9jak3OlEJ3s/96+p33dEPRV5GxiqaGjIthUU6FFEZyqCa5qJrpBdzSw95IUnOPIrCUUjRZQFrbw5PR0R1qiYx3cb6nrWUMrBmmiBQxVHtTew5ICP/ip6g4hed/Akob/32wvBHsIOX83cI8hGeNeNPCIkPmXe8fPKx84OMSRM1MTdXSwjCZ4S30jVGhvqTRak/OVhgGazHuOCud5onEO1lJr6ecVyaOK6H7zqlBlIaHE0oroCgfvGJIdPcmfLNGLjpz7hZwZQpUbFME0A1cIJa7VNORkgfsMBatbKgwwJM9bSvQXeNOvbIjelg6WWvo5kvbKaJJNHexkKNHL9xRyFlH8Ti2riB5wVPhUk7nGkJnoCe428LR/wRGdYIlmWebCyxou1rCk4g/ShugBDX0V0ZQWkh0dOVsagkM0yV6OoLd5ye+pRlsCr0n+KiQrGuq5yJDzrTAXHtLUMduTDBVKrSm3eHL+6ijxhFDX9Z5gVU/wliHYTMiMFpKLNMEywu80wd3meoFmt6VbRMPenhrOc6DVe4pgXU8DnnHakLOIIrlF4FZPIw6R+zxBP0dyq6OOZ4Q5sLKCcz084ok+VsMMyQhNZmmBgX5xIXOEJTmi7VsGTvMTNdHHhpzdbE8Du2oKxgvBqQKdDDnTFOylCFaxR1syz2iqrOI/FEpNc3C6f11/7+ASS6l2inq2ciTrCCzgyemrCL5SVPjQkdPZUmGy2c9Sw9FtR1sS30RmsKPCS4rkIC/2U0MduwucYolGaPjKEyhzmiPYXagyWbYz8LWBDdzRimAXzxx4z8K9hpzlhLq+NiQ97HuKorMUfK/OVvC2JfiHUPCQI/q7J2gjK+tTDNxkCc4TMssqCs4TGtLVwQihyoAWgj9bosU80XGW6Ac9TJGziaUh5+hnFcHOnlaM1iRn29NaqGENTTTSUHCH2tWTeV0osUhH6psuVLjRUmGWhm6OZEshGeNowABHcJ2Bpy2ZszRcKkRXd2QuKVEeXnbfaEq825FguqfgfE2whlChSRMdron+LATTPQ2Z369t4B9C5gs/ylzv+CMmepIDPclFQl13W0rspPd1JOcbghGOEutqCv5qacURQl3dDKyvyJlqKXGPgcM9FfawJAMVmdcspcYKOZc4GjDYkFlK05olNMHyHn4zFNykyOxt99RkHlfwmiHo60l2EKI+mhreEKp080Tbug08BVPcgoqC5zWt+NLDTZ7oNSF51N1qie7Va3uCCwyZbkINf/NED6jzOsBdZjFN8oqG3wxVunqCSYYKf3EdhJyf9YWGf7tRU2oH3VHgPr1fe5J9hOgHd7xQ0y7qBwXr23aGErP0cm64JVjZwsOGqL+mhNgZmhJLW2oY4UhedsyBgzrCKrq7BmcpNVhR6jBPq64Vgi+kn6XE68pp8J5/+0wRHGOpsKenQn9DZntPzjRLZpDAdD2fnSgkG9tmIXnUwQ6WVighs7Yi2MxQ0N3CqYaCXkJ0oyOztMDJjmSSpcpvlrk0RMMOjmArQ04PRV1DO1FwhCVaUVPpKUM03JK5SxPsIWRu8/CGHi8UHChiqGFDTbSRJWeYUDDcH6vJWUxR4k1FXbMUwV6e4AJFXS8oMqsZKqzvYQ9DDQdZckY4aGsIhtlubbd2r3j4QBMoTamdPZk7O/Bf62lacZwneNjQoGcdVU7zJOd7ghsUHOkosagic6cnWc8+4gg285R6zZP5s1/LUbCKIznTwK36PkdwlOrl4U1LwfdCCa+IrvFkmgw1PCAUXKWo0sURXWcI2muKJlgyFzhynCY4RBOsqCjoI1R5zREco0n2Vt09BQtYSizgKNHfUmUrQ5UOCh51BFcLmY7umhYqXKQomOop8bUnWNNQcIiBcYaC6xzMNOS8JQQfeqKBmmglB+97ok/lfk3ygaHSyZaCRTzRxQo6GzLfa2jWBPepw+UmT7SQEJyiyRkhBLMVOfcoMjcK0eZChfUNzFAUzCsEN5vP/X1uP/n/aoMX+K+nw/Hjr/9xOo7j7Pju61tLcgvJpTWXNbfN5jLpi6VfCOviTktKlFusQixdEKWmEBUKNaIpjZRSSOXSgzaaKLdabrm1/9nZ+/f+vd/vz/v9+Xy+zZ7PRorYoZqyLrCwQdEAixxVOEXNNnjX2nUSRlkqGmWowk8lxR50JPy9Bo6qJXaXwNvREBvnThPEPrewryLhcAnj5WE15Fqi8W7R1sAuEu86S4ENikItFN4xkv9Af4nXSnUVcLiA9xzesFpivRRVeFKtsMRaKBhuSbjOELnAUtlSQUpXgdfB4Z1oSbnFEetbQ0IrAe+Y+pqnDcEJFj6S8LDZzZHwY4e3XONNlARraomNEt2bkvGsosA3ioyHm+6jCMbI59wqt4eeara28IzEmyPgoRaUOEDhTVdEJhmCoTWfC0p8aNkCp0oYqih2iqGi4yXeMkOsn4LdLLnmKfh/YogjNsPebeFGR4m9BJHLzB61XQ3BtpISfS2FugsK9FAtLWX1dCRcrCnUp44CNzuCowUZmxSRgYaE6Za0W2u/E7CVXCiI/UOR8aAm1+OSyE3mOUcwyc1zBBeoX1kiKy0Zfxck1Gsyulti11i83QTBF5Kg3pDQThFMVHiPSlK+0cSedng/VaS8bOZbtsBcTcZAR8JP5KeqQ1OYKAi20njdNNRpgnsU//K+JnaXJaGTomr7aYIphoRn9aeShJWKEq9LcozSF7QleEfDI5LYm5bgVkFkRwVDBCVu0DDIkGupo8TZBq+/pMQURYErJQmPKGKjNDkWOLx7Jd5QizdUweIaKrlP7SwJDhZvONjLkOsBBX9UpGxnydhXkfBLQ8IxgojQbLFnJf81JytSljclYYyEFyx0kVBvKWOFJmONpshGAcsduQY5giVNCV51eOdJYo/pLhbvM0uDHSevNKRcrKZIqnCtJeEsO95RoqcgGK4ocZcho1tTYtcZvH41pNQ7vA0WrhIfOSraIIntIAi+NXWCErdbkvrWwjRLrt0NKUdL6KSOscTOdMSOUtBHwL6OLA0vNSdynaWQEnCpIvKaIrJJEbvHkmuNhn6OjM8VkSGSqn1uYJCGHnq9I3aLhNME3t6GjIkO7xrNFumpyTNX/NrwX7CrIRiqqWijI9JO4d1iieykyfiposQIQ8YjjsjlBh6oHWbwRjgYJQn2NgSnNycmJAk3NiXhx44Sxykihxm8ybUwT1OVKySc7vi3OXVkdBJ4AyXBeksDXG0IhgtYY0lY5ahCD0ehborIk5aUWRJviMA7Xt5kyRjonrXENkm8yYqgs8VzgrJmClK20uMM3jRJ0FiQICQF9hdETlLQWRIb5ki6WDfWRPobvO6a4GP5mcOrNzDFELtTkONLh9dXE8xypEg7z8A9jkhrQ6Fhjlg/QVktJXxt4WXzT/03Q8IaQWSqIuEvloQ2mqC9Jfi7wRul4RX3pSPlzpoVlmCtI2jvKHCFhjcM3sN6lqF6HxnKelLjXWbwrpR4xzuCrTUZx2qq9oAh8p6ixCUGr78g8oyjRAtB5CZFwi80VerVpI0h+IeBxa6Zg6kWvpDHaioYYuEsRbDC3eOmC2JvGYLeioxGknL2UATNJN6hmtj1DlpLvDVmocYbrGCVJKOrg4X6DgddLA203BKMFngdJJFtFd7vJLm6KEpc5yjQrkk7M80SGe34X24nSex1Ra5Omgb71JKyg8SrU3i/kARKwWpH0kOGhKkObyfd0ZGjvyXlAkVZ4xRbYJ2irFMkFY1SwyWxr2oo4zlNiV+7zmaweFpT4kR3kaDAFW6xpSqzJay05FtYR4HmZhc9UxKbbfF2V8RG1MBmSaE+kmC6JnaRXK9gsiXhJHl/U0qM0WTcbyhwkYIvFGwjSbjfwhiJt8ZSQU+Bd5+marPMOkVkD0muxYLIfEuhh60x/J92itguihJSEMySVPQnTewnEm+620rTQEMsOfo4/kP/0ARvWjitlpSX7GxBgcMEsd3EEeYWvdytd+Saawi6aCIj1CkGb6Aj9rwhx16Cf3vAwFy5pyLhVonXzy51FDpdEblbkdJbUcEPDEFzQ8qNmhzzLTmmKWKbFCXeEuRabp6rxbvAtLF442QjQ+wEA9eL1xSR7Q0JXzlSHjJ4exq89yR0laScJ/FW6z4a73pFMEfDiRZvuvijIt86RaSFOl01riV2mD1UEvxGk/Geg5aWwGki1zgKPG9J2U8PEg8qYvMsZeytiTRXBMslCU8JSlxi8EabjwUldlDNLfzTUmCgxWsjqWCOHavYAqsknKFIO0yQ61VL5AVFxk6WhEaCAkdJgt9aSkzXlKNX2jEa79waYuc7gq0N3GDJGCBhoiTXUEPsdknCUE1CK0fwsiaylSF2uiDyO4XX3pFhNd7R4itFGc0k/ElBZwWvq+GC6szVeEoS/MZ+qylwpKNKv9Z469UOjqCjwlusicyTxG6VpNxcQ8IncoR4RhLbR+NdpGGmJWOcIzJGUuKPGpQg8rrG21dOMqQssJQ4RxH5jaUqnZuQ0F4Q+cjxLwPtpZbIAk3QTJHQWBE5S1BokoVtDd6lhqr9UpHSUxMcIYl9pojsb8h4SBOsMQcqvOWC2E8EVehqiJ1hrrAEbQxeK0NGZ0Gkq+guSRgniM23bIHVkqwx4hiHd7smaOyglyIyQuM978j4VS08J/A2G1KeMBRo4fBaSNhKUEZfQewVQ/C1I+MgfbEleEzCUw7mKXI0M3hd1EESVji8x5uQ41nxs1q4RMJCCXs7Iq9acpxn22oSDnQ/sJTxsCbHIYZiLyhY05TY0ZLIOQrGaSJDDN4t8pVaIrsqqFdEegtizc1iTew5Q4ayBDMUsQMkXocaYkc0hZua412siZ1rSXlR460zRJ5SlHGe5j801RLMlJTxtaOM3Q1pvxJ45zUlWFD7rsAbpfEm1JHxG0eh8w2R7QQVzBUw28FhFp5QZzq8t2rx2joqulYTWSuJdTYfWwqMFMcovFmSyJPNyLhE4E10pHzYjOC3huArRa571ZsGajQpQx38SBP5pyZB6lMU3khDnp0MBV51BE9o2E+TY5Ml2E8S7C0o6w1xvCZjf0HkVEHCzFoyNmqC+9wdcqN+Tp7jSDheE9ws8Y5V0NJCn2bk2tqSY4okdrEhx1iDN8cSudwepWmAGXKcJXK65H9to8jYQRH7SBF01ESUJdd0TayVInaWhLkOjlXE5irKGOnI6GSWGCJa482zBI9rCr0jyTVcEuzriC1vcr6mwFGSiqy5zMwxBH/TJHwjSPhL8+01kaaSUuMFKTcLEvaUePcrSmwn8DZrgikWb7CGPxkSjhQwrRk57tctmxLsb9sZvL9LSlyuSLlWkqOjwduo8b6Uv1DkmudIeFF2dHCgxVtk8dpIvHpBxhEOdhKk7OLIUSdJ+cSRY57B+0DgGUUlNfpthTfGkauzxrvTsUUaCVhlKeteTXCoJDCa2NOKhOmC4G1H8JBd4OBZReSRGkqcb/CO1PyLJTLB4j1q8JYaIutEjSLX8YKM+a6phdMsdLFUoV5RTm9JSkuDN8WcIon0NZMNZWh1q8C7SJEwV5HxrmnnTrf3KoJBlmCYI2ilSLlfEvlE4011NNgjgthzEua0oKK7JLE7HZHlEl60BLMVFewg4EWNt0ThrVNEVkkiTwpKXSWJzdRENgvKGq4IhjsiezgSFtsfCUq8qki5S1LRQeYQQ4nemmCkImWMw3tFUoUBZk4NOeZYEp4XRKTGa6wJjrWNHBVJR4m3FCnbuD6aak2WsMTh3SZImGCIPKNgsDpVwnsa70K31lCFJZYcwwSMFcQulGTsZuEaSdBXkPGZhu0FsdUO73RHjq8MPGGIfaGIbVTk6iuI3GFgucHrIQkmWSJdBd7BBu+uOryWAhY7+Lki9rK5wtEQzWwvtbqGhIMFwWRJsElsY4m9IIg9L6lCX0VklaPAYkfkZEGDnOWowlBJjtMUkcGK4Lg6EtoZInMUBVYLgn0UsdmCyCz7gIGHFfk+k1QwTh5We7A9x+IdJ6CvIkEagms0hR50eH9UnTQJ+2oiKyVlLFUE+8gBGu8MQ3CppUHesnjTHN4QB/UGPhCTHLFPHMFrCqa73gqObUJGa03wgbhHkrCfpEpzNLE7JDS25FMKhlhKKWKfCgqstLCPu1zBXy0J2ztwjtixBu8UTRn9LVtkmCN2iyFhtME70JHRQ1KVZXqKI/KNIKYMCYs1GUMEKbM1bKOI9LDXC7zbHS+bt+1MTWS9odA9DtrYtpbImQJ2VHh/lisEwaHqUk1kjKTAKknkBEXkbkdMGwq0dnhzLJF3NJH3JVwrqOB4Sca2hti75nmJN0WzxS6UxDYoEpxpa4htVlRjkYE7DZGzJVU72uC9IyhQL4i8YfGWSYLLNcHXloyz7QhNifmKSE9JgfGmuyLhc403Xm9vqcp6gXe3xuuv8F6VJNxkyTHEkHG2g0aKXL0MsXc1bGfgas2//dCONXiNLCX+5mB7eZIl1kHh7ajwpikyzlUUWOVOsjSQlsS+M0R+pPje/dzBXRZGO0rMtgQrLLG9VSu9n6CMXS3BhwYmSoIBhsjNBmZbgusE9BCPCP5triU4VhNbJfE+swSP27aayE8tuTpYYjtrYjMVGZdp2NpS1s6aBnKSHDsbKuplKbHM4a0wMFd/5/DmGyKrJSUaW4IBrqUhx0vyfzTBBLPIUcnZdrAkNsKR0sWRspumSns6Ch0v/qqIbBYUWKvPU/CFoyrDJGwSNFhbA/MlzKqjrO80hRbpKx0Jewsi/STftwGSlKc1JZyAzx05dhLEdnfQvhZOqiHWWEAHC7+30FuRcZUgaO5gpaIK+xsiHRUsqaPElTV40xQZQ107Q9BZE1nryDVGU9ZSQ47bmhBpLcYpUt7S+xuK/FiT8qKjwXYw5ypS2iuCv7q1gtgjhuBuB8LCFY5cUuCNtsQOFcT+4Ih9JX+k8Ea6v0iCIRZOtCT0Et00JW5UeC85Cg0ScK0k411HcG1zKtre3SeITBRk7WfwDhEvaYLTHP9le0m8By0JDwn4TlLW/aJOvGHxdjYUes+ScZigCkYQdNdEOhkiezgShqkx8ueKjI8lDfK2oNiOFvrZH1hS+tk7NV7nOmLHicGWEgubkXKdwdtZknCLJXaCpkrjZBtLZFsDP9CdxWsSr05Sxl6CMmoFbCOgryX40uDtamB7SVmXW4Ihlgpmq+00tBKUUa83WbjLUNkzDmY7cow1JDygyPGlhgGKYKz4vcV7QBNbJIgM11TUqZaMdwTeSguH6rOaw1JRKzaaGyxVm2EJ/uCIrVWUcZUkcp2grMsEjK+DMwS59jQk3Kd6SEq1d0S6uVmO4Bc1lDXTUcHjluCXEq+1OlBDj1pi9zgiXxnKuE0SqTXwhqbETW6RggMEnGl/q49UT2iCzgJvRwVXS2K/d6+ZkyUl7jawSVLit46EwxVljDZwoSQ20sDBihztHfk2yA8NVZghiXwrYHQdfKAOtzsayjhY9bY0yE2CWEeJ9xfzO423xhL5syS2TFJofO2pboHob0nY4GiAgRrvGQEDa/FWSsoaaYl0syRsEt3kWoH3B01shCXhTUWe9w3Bt44SC9QCh3eShQctwbaK2ApLroGCMlZrYqvlY3qYhM0aXpFkPOuoqJ3Dm6fxXrGwVF9gCWZagjPqznfkuMKQ8DPTQRO8ZqG1hPGKEm9IgpGW4DZDgTNriTxvFiq+Lz+0cKfp4wj6OCK9JSnzNSn9LFU7UhKZZMnYwcJ8s8yRsECScK4j5UOB95HFO0CzhY4xJxuCix0lDlEUeMdS6EZBkTsUkZ4K74dugyTXS7aNgL8aqjDfkCE0ZbwkCXpaWCKhl8P7VD5jxykivSyxyZrYERbe168LYu9ZYh86IkscgVLE7tWPKmJv11CgoyJltMEbrohtVAQfO4ImltiHEroYEs7RxAarVpY8AwXMcMReFOTYWe5iiLRQxJ5Q8DtJ8LQhWOhIeFESPGsILhbNDRljNbHzNRlTFbk2S3L0NOS6V1KFJYKUbSTcIIhM0wQ/s2TM0SRMNcQmSap3jCH4yhJZKSkwyRHpYYgsFeQ4U7xoCB7VVOExhXepo9ABBsYbvGWKXPME3lyH95YioZ0gssQRWWbI+FaSMkXijZXwgiTlYdPdkNLaETxlyDVIwqeaEus0aTcYcg0RVOkpR3CSJqIddK+90JCxzsDVloyrFd5ZAr4TBKfaWa6boEA7C7s6EpYaeFPjveooY72mjIccLHJ9HUwVlDhKkmutJDJBwnp1rvulJZggKDRfbXAkvC/4l3ozQOG9a8lxjx0i7nV4jSXc7vhe3OwIxjgSHjdEhhsif9YkPGlus3iLFDnWOFhtCZbJg0UbQcIaR67JjthoCyMEZRwhiXWyxO5QxI6w5NhT4U1WsJvDO60J34fW9hwzwlKij6ZAW9ne4L0s8C6XeBMEkd/LQy1VucBRot6QMlbivaBhoBgjqGiCJNhsqVp/S2SsG6DIONCR0dXhvWbJ+MRRZJkkuEjgDXJjFQW6SSL7GXK8Z2CZg7cVsbWGoKmEpzQ5elpiy8Ryg7dMkLLUEauzeO86CuwlSOlgYLojZWeJ9xM3S1PWfEfKl5ISLQ0MEKR8YOB2QfCxJBjrKPCN4f9MkaSsqoVXJBmP7EpFZ9UQfOoOFwSzBN4MQ8LsGrymlipcJQhmy0GaQjPqCHaXRwuCZwRbqK2Fg9wlClZqYicrIgMdZfxTQ0c7TBIbrChxmuzoKG8XRaSrIhhiyNFJkrC7oIAWMEOQa5aBekPCRknCo4IKPrYkvCDI8aYmY7WFtprgekcJZ3oLIqssCSMtFbQTJKwXYy3BY5oCh2iKPCpJOE+zRdpYgi6O2KmOAgvVCYaU4ySRek1sgyFhJ403QFHiVEmJHwtybO1gs8Hr5+BETQX3War0qZngYGgtVZtoqd6vFSk/UwdZElYqyjrF4HXUeFspIi9IGKf4j92pKGAdCYMVsbcV3kRF0N+R8LUd5PCsIGWoxDtBkCI0nKofdJQxT+LtZflvuc8Q3CjwWkq8KwUpHzkK/NmSsclCL0nseQdj5FRH5CNHSgtLiW80Of5HU9Hhlsga9bnBq3fEVltKfO5IaSTmGjjc4J0otcP7QsJUSQM8pEj5/wCuUuC2DWz8AAAAAElFTkSuQmCC\");\n}\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/theme/base16-dark.css",
    "content": "/*\n\n    Name:       Base16 Default Dark\n    Author:     Chris Kempson (http://chriskempson.com)\n\n    CodeMirror template by Jan T. Sott (https://github.com/idleberg/base16-chrome-devtools)\n    Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16)\n\n*/\n\n.cm-s-base16-dark.CodeMirror {background: #151515; color: #e0e0e0;}\n.cm-s-base16-dark div.CodeMirror-selected {background: #303030 !important;}\n.cm-s-base16-dark.CodeMirror ::selection { background: rgba(48, 48, 48, .99); }\n.cm-s-base16-dark.CodeMirror ::-moz-selection { background: rgba(48, 48, 48, .99); }\n.cm-s-base16-dark .CodeMirror-gutters {background: #151515; border-right: 0px;}\n.cm-s-base16-dark .CodeMirror-guttermarker { color: #ac4142; }\n.cm-s-base16-dark .CodeMirror-guttermarker-subtle { color: #505050; }\n.cm-s-base16-dark .CodeMirror-linenumber {color: #505050;}\n.cm-s-base16-dark .CodeMirror-cursor {border-left: 1px solid #b0b0b0 !important;}\n\n.cm-s-base16-dark span.cm-comment {color: #8f5536;}\n.cm-s-base16-dark span.cm-atom {color: #aa759f;}\n.cm-s-base16-dark span.cm-number {color: #aa759f;}\n\n.cm-s-base16-dark span.cm-property, .cm-s-base16-dark span.cm-attribute {color: #90a959;}\n.cm-s-base16-dark span.cm-keyword {color: #ac4142;}\n.cm-s-base16-dark span.cm-string {color: #f4bf75;}\n\n.cm-s-base16-dark span.cm-variable {color: #90a959;}\n.cm-s-base16-dark span.cm-variable-2 {color: #6a9fb5;}\n.cm-s-base16-dark span.cm-def {color: #d28445;}\n.cm-s-base16-dark span.cm-bracket {color: #e0e0e0;}\n.cm-s-base16-dark span.cm-tag {color: #ac4142;}\n.cm-s-base16-dark span.cm-link {color: #aa759f;}\n.cm-s-base16-dark span.cm-error {background: #ac4142; color: #b0b0b0;}\n\n.cm-s-base16-dark .CodeMirror-activeline-background {background: #202020 !important;}\n.cm-s-base16-dark .CodeMirror-matchingbracket { text-decoration: underline; color: white !important;}\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/theme/base16-light.css",
    "content": "/*\n\n    Name:       Base16 Default Light\n    Author:     Chris Kempson (http://chriskempson.com)\n\n    CodeMirror template by Jan T. Sott (https://github.com/idleberg/base16-chrome-devtools)\n    Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16)\n\n*/\n\n.cm-s-base16-light.CodeMirror {background: #f5f5f5; color: #202020;}\n.cm-s-base16-light div.CodeMirror-selected {background: #e0e0e0 !important;}\n.cm-s-base16-light.CodeMirror ::selection { background: #e0e0e0; }\n.cm-s-base16-light.CodeMirror ::-moz-selection { background: #e0e0e0; }\n.cm-s-base16-light .CodeMirror-gutters {background: #f5f5f5; border-right: 0px;}\n.cm-s-base16-light .CodeMirror-guttermarker { color: #ac4142; }\n.cm-s-base16-light .CodeMirror-guttermarker-subtle { color: #b0b0b0; }\n.cm-s-base16-light .CodeMirror-linenumber {color: #b0b0b0;}\n.cm-s-base16-light .CodeMirror-cursor {border-left: 1px solid #505050 !important;}\n\n.cm-s-base16-light span.cm-comment {color: #8f5536;}\n.cm-s-base16-light span.cm-atom {color: #aa759f;}\n.cm-s-base16-light span.cm-number {color: #aa759f;}\n\n.cm-s-base16-light span.cm-property, .cm-s-base16-light span.cm-attribute {color: #90a959;}\n.cm-s-base16-light span.cm-keyword {color: #ac4142;}\n.cm-s-base16-light span.cm-string {color: #f4bf75;}\n\n.cm-s-base16-light span.cm-variable {color: #90a959;}\n.cm-s-base16-light span.cm-variable-2 {color: #6a9fb5;}\n.cm-s-base16-light span.cm-def {color: #d28445;}\n.cm-s-base16-light span.cm-bracket {color: #202020;}\n.cm-s-base16-light span.cm-tag {color: #ac4142;}\n.cm-s-base16-light span.cm-link {color: #aa759f;}\n.cm-s-base16-light span.cm-error {background: #ac4142; color: #505050;}\n\n.cm-s-base16-light .CodeMirror-activeline-background {background: #DDDCDC !important;}\n.cm-s-base16-light .CodeMirror-matchingbracket { text-decoration: underline; color: white !important;}\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/theme/blackboard.css",
    "content": "/* Port of TextMate's Blackboard theme */\n\n.cm-s-blackboard.CodeMirror { background: #0C1021; color: #F8F8F8; }\n.cm-s-blackboard .CodeMirror-selected { background: #253B76 !important; }\n.cm-s-blackboard.CodeMirror ::selection { background: rgba(37, 59, 118, .99); }\n.cm-s-blackboard.CodeMirror ::-moz-selection { background: rgba(37, 59, 118, .99); }\n.cm-s-blackboard .CodeMirror-gutters { background: #0C1021; border-right: 0; }\n.cm-s-blackboard .CodeMirror-guttermarker { color: #FBDE2D; }\n.cm-s-blackboard .CodeMirror-guttermarker-subtle { color: #888; }\n.cm-s-blackboard .CodeMirror-linenumber { color: #888; }\n.cm-s-blackboard .CodeMirror-cursor { border-left: 1px solid #A7A7A7 !important; }\n\n.cm-s-blackboard .cm-keyword { color: #FBDE2D; }\n.cm-s-blackboard .cm-atom { color: #D8FA3C; }\n.cm-s-blackboard .cm-number { color: #D8FA3C; }\n.cm-s-blackboard .cm-def { color: #8DA6CE; }\n.cm-s-blackboard .cm-variable { color: #FF6400; }\n.cm-s-blackboard .cm-operator { color: #FBDE2D;}\n.cm-s-blackboard .cm-comment { color: #AEAEAE; }\n.cm-s-blackboard .cm-string { color: #61CE3C; }\n.cm-s-blackboard .cm-string-2 { color: #61CE3C; }\n.cm-s-blackboard .cm-meta { color: #D8FA3C; }\n.cm-s-blackboard .cm-builtin { color: #8DA6CE; }\n.cm-s-blackboard .cm-tag { color: #8DA6CE; }\n.cm-s-blackboard .cm-attribute { color: #8DA6CE; }\n.cm-s-blackboard .cm-header { color: #FF6400; }\n.cm-s-blackboard .cm-hr { color: #AEAEAE; }\n.cm-s-blackboard .cm-link { color: #8DA6CE; }\n.cm-s-blackboard .cm-error { background: #9D1E15; color: #F8F8F8; }\n\n.cm-s-blackboard .CodeMirror-activeline-background {background: #3C3636 !important;}\n.cm-s-blackboard .CodeMirror-matchingbracket {outline:1px solid grey;color:white !important}"
  },
  {
    "path": "static/editor.md/lib/codemirror/theme/cobalt.css",
    "content": ".cm-s-cobalt.CodeMirror { background: #002240; color: white; }\n.cm-s-cobalt div.CodeMirror-selected { background: #b36539 !important; }\n.cm-s-cobalt.CodeMirror ::selection { background: rgba(179, 101, 57, .99); }\n.cm-s-cobalt.CodeMirror ::-moz-selection { background: rgba(179, 101, 57, .99); }\n.cm-s-cobalt .CodeMirror-gutters { background: #002240; border-right: 1px solid #aaa; }\n.cm-s-cobalt .CodeMirror-guttermarker { color: #ffee80; }\n.cm-s-cobalt .CodeMirror-guttermarker-subtle { color: #d0d0d0; }\n.cm-s-cobalt .CodeMirror-linenumber { color: #d0d0d0; }\n.cm-s-cobalt .CodeMirror-cursor { border-left: 1px solid white !important; }\n\n.cm-s-cobalt span.cm-comment { color: #08f; }\n.cm-s-cobalt span.cm-atom { color: #845dc4; }\n.cm-s-cobalt span.cm-number, .cm-s-cobalt span.cm-attribute { color: #ff80e1; }\n.cm-s-cobalt span.cm-keyword { color: #ffee80; }\n.cm-s-cobalt span.cm-string { color: #3ad900; }\n.cm-s-cobalt span.cm-meta { color: #ff9d00; }\n.cm-s-cobalt span.cm-variable-2, .cm-s-cobalt span.cm-tag { color: #9effff; }\n.cm-s-cobalt span.cm-variable-3, .cm-s-cobalt span.cm-def { color: white; }\n.cm-s-cobalt span.cm-bracket { color: #d8d8d8; }\n.cm-s-cobalt span.cm-builtin, .cm-s-cobalt span.cm-special { color: #ff9e59; }\n.cm-s-cobalt span.cm-link { color: #845dc4; }\n.cm-s-cobalt span.cm-error { color: #9d1e15; }\n\n.cm-s-cobalt .CodeMirror-activeline-background {background: #002D57 !important;}\n.cm-s-cobalt .CodeMirror-matchingbracket {outline:1px solid grey;color:white !important}\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/theme/colorforth.css",
    "content": ".cm-s-colorforth.CodeMirror { background: #000000; color: #f8f8f8; }\n.cm-s-colorforth .CodeMirror-gutters { background: #0a001f; border-right: 1px solid #aaa; }\n.cm-s-colorforth .CodeMirror-guttermarker { color: #FFBD40; }\n.cm-s-colorforth .CodeMirror-guttermarker-subtle { color: #78846f; }\n.cm-s-colorforth .CodeMirror-linenumber { color: #bababa; }\n.cm-s-colorforth .CodeMirror-cursor { border-left: 1px solid white !important; }\n\n.cm-s-colorforth span.cm-comment     { color: #ededed; }\n.cm-s-colorforth span.cm-def         { color: #ff1c1c; font-weight:bold; }\n.cm-s-colorforth span.cm-keyword     { color: #ffd900; }\n.cm-s-colorforth span.cm-builtin     { color: #00d95a; }\n.cm-s-colorforth span.cm-variable    { color: #73ff00; }\n.cm-s-colorforth span.cm-string      { color: #007bff; }\n.cm-s-colorforth span.cm-number      { color: #00c4ff; }\n.cm-s-colorforth span.cm-atom        { color: #606060; }\n\n.cm-s-colorforth span.cm-variable-2  { color: #EEE; }\n.cm-s-colorforth span.cm-variable-3  { color: #DDD; }\n.cm-s-colorforth span.cm-property    {}\n.cm-s-colorforth span.cm-operator    {}\n\n.cm-s-colorforth span.cm-meta        { color: yellow; }\n.cm-s-colorforth span.cm-qualifier   { color: #FFF700; }\n.cm-s-colorforth span.cm-bracket     { color: #cc7; }\n.cm-s-colorforth span.cm-tag         { color: #FFBD40; }\n.cm-s-colorforth span.cm-attribute   { color: #FFF700; }\n.cm-s-colorforth span.cm-error       { color: #f00; }\n\n.cm-s-colorforth .CodeMirror-selected { background: #333d53 !important; }\n\n.cm-s-colorforth span.cm-compilation { background: rgba(255, 255, 255, 0.12); }\n\n.cm-s-colorforth .CodeMirror-activeline-background {background: #253540 !important;}\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/theme/eclipse.css",
    "content": ".cm-s-eclipse span.cm-meta {color: #FF1717;}\n.cm-s-eclipse span.cm-keyword { line-height: 1em; font-weight: bold; color: #7F0055; }\n.cm-s-eclipse span.cm-atom {color: #219;}\n.cm-s-eclipse span.cm-number {color: #164;}\n.cm-s-eclipse span.cm-def {color: #00f;}\n.cm-s-eclipse span.cm-variable {color: black;}\n.cm-s-eclipse span.cm-variable-2 {color: #0000C0;}\n.cm-s-eclipse span.cm-variable-3 {color: #0000C0;}\n.cm-s-eclipse span.cm-property {color: black;}\n.cm-s-eclipse span.cm-operator {color: black;}\n.cm-s-eclipse span.cm-comment {color: #3F7F5F;}\n.cm-s-eclipse span.cm-string {color: #2A00FF;}\n.cm-s-eclipse span.cm-string-2 {color: #f50;}\n.cm-s-eclipse span.cm-qualifier {color: #555;}\n.cm-s-eclipse span.cm-builtin {color: #30a;}\n.cm-s-eclipse span.cm-bracket {color: #cc7;}\n.cm-s-eclipse span.cm-tag {color: #170;}\n.cm-s-eclipse span.cm-attribute {color: #00c;}\n.cm-s-eclipse span.cm-link {color: #219;}\n.cm-s-eclipse span.cm-error {color: #f00;}\n\n.cm-s-eclipse .CodeMirror-activeline-background {background: #e8f2ff !important;}\n.cm-s-eclipse .CodeMirror-matchingbracket {outline:1px solid grey; color:black !important;}\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/theme/elegant.css",
    "content": ".cm-s-elegant span.cm-number, .cm-s-elegant span.cm-string, .cm-s-elegant span.cm-atom {color: #762;}\n.cm-s-elegant span.cm-comment {color: #262; font-style: italic; line-height: 1em;}\n.cm-s-elegant span.cm-meta {color: #555; font-style: italic; line-height: 1em;}\n.cm-s-elegant span.cm-variable {color: black;}\n.cm-s-elegant span.cm-variable-2 {color: #b11;}\n.cm-s-elegant span.cm-qualifier {color: #555;}\n.cm-s-elegant span.cm-keyword {color: #730;}\n.cm-s-elegant span.cm-builtin {color: #30a;}\n.cm-s-elegant span.cm-link {color: #762;}\n.cm-s-elegant span.cm-error {background-color: #fdd;}\n\n.cm-s-elegant .CodeMirror-activeline-background {background: #e8f2ff !important;}\n.cm-s-elegant .CodeMirror-matchingbracket {outline:1px solid grey; color:black !important;}\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/theme/erlang-dark.css",
    "content": ".cm-s-erlang-dark.CodeMirror { background: #002240; color: white; }\n.cm-s-erlang-dark div.CodeMirror-selected { background: #b36539 !important; }\n.cm-s-erlang-dark.CodeMirror ::selection { background: rgba(179, 101, 57, .99); }\n.cm-s-erlang-dark.CodeMirror ::-moz-selection { background: rgba(179, 101, 57, .99); }\n.cm-s-erlang-dark .CodeMirror-gutters { background: #002240; border-right: 1px solid #aaa; }\n.cm-s-erlang-dark .CodeMirror-guttermarker { color: white; }\n.cm-s-erlang-dark .CodeMirror-guttermarker-subtle { color: #d0d0d0; }\n.cm-s-erlang-dark .CodeMirror-linenumber { color: #d0d0d0; }\n.cm-s-erlang-dark .CodeMirror-cursor { border-left: 1px solid white !important; }\n\n.cm-s-erlang-dark span.cm-atom       { color: #f133f1; }\n.cm-s-erlang-dark span.cm-attribute  { color: #ff80e1; }\n.cm-s-erlang-dark span.cm-bracket    { color: #ff9d00; }\n.cm-s-erlang-dark span.cm-builtin    { color: #eaa; }\n.cm-s-erlang-dark span.cm-comment    { color: #77f; }\n.cm-s-erlang-dark span.cm-def        { color: #e7a; }\n.cm-s-erlang-dark span.cm-keyword    { color: #ffee80; }\n.cm-s-erlang-dark span.cm-meta       { color: #50fefe; }\n.cm-s-erlang-dark span.cm-number     { color: #ffd0d0; }\n.cm-s-erlang-dark span.cm-operator   { color: #d55; }\n.cm-s-erlang-dark span.cm-property   { color: #ccc; }\n.cm-s-erlang-dark span.cm-qualifier  { color: #ccc; }\n.cm-s-erlang-dark span.cm-quote      { color: #ccc; }\n.cm-s-erlang-dark span.cm-special    { color: #ffbbbb; }\n.cm-s-erlang-dark span.cm-string     { color: #3ad900; }\n.cm-s-erlang-dark span.cm-string-2   { color: #ccc; }\n.cm-s-erlang-dark span.cm-tag        { color: #9effff; }\n.cm-s-erlang-dark span.cm-variable   { color: #50fe50; }\n.cm-s-erlang-dark span.cm-variable-2 { color: #e0e; }\n.cm-s-erlang-dark span.cm-variable-3 { color: #ccc; }\n.cm-s-erlang-dark span.cm-error      { color: #9d1e15; }\n\n.cm-s-erlang-dark .CodeMirror-activeline-background {background: #013461 !important;}\n.cm-s-erlang-dark .CodeMirror-matchingbracket {outline:1px solid grey; color:white !important;}\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/theme/lesser-dark.css",
    "content": "/*\nhttp://lesscss.org/ dark theme\nPorted to CodeMirror by Peter Kroon\n*/\n.cm-s-lesser-dark {\n  line-height: 1.3em;\n}\n.cm-s-lesser-dark.CodeMirror { background: #262626; color: #EBEFE7; text-shadow: 0 -1px 1px #262626; }\n.cm-s-lesser-dark div.CodeMirror-selected {background: #45443B !important;} /* 33322B*/\n.cm-s-lesser-dark.CodeMirror ::selection { background: rgba(69, 68, 59, .99); }\n.cm-s-lesser-dark.CodeMirror ::-moz-selection { background: rgba(69, 68, 59, .99); }\n.cm-s-lesser-dark .CodeMirror-cursor { border-left: 1px solid white !important; }\n.cm-s-lesser-dark pre { padding: 0 8px; }/*editable code holder*/\n\n.cm-s-lesser-dark.CodeMirror span.CodeMirror-matchingbracket { color: #7EFC7E; }/*65FC65*/\n\n.cm-s-lesser-dark .CodeMirror-gutters { background: #262626; border-right:1px solid #aaa; }\n.cm-s-lesser-dark .CodeMirror-guttermarker { color: #599eff; }\n.cm-s-lesser-dark .CodeMirror-guttermarker-subtle { color: #777; }\n.cm-s-lesser-dark .CodeMirror-linenumber { color: #777; }\n\n.cm-s-lesser-dark span.cm-keyword { color: #599eff; }\n.cm-s-lesser-dark span.cm-atom { color: #C2B470; }\n.cm-s-lesser-dark span.cm-number { color: #B35E4D; }\n.cm-s-lesser-dark span.cm-def {color: white;}\n.cm-s-lesser-dark span.cm-variable { color:#D9BF8C; }\n.cm-s-lesser-dark span.cm-variable-2 { color: #669199; }\n.cm-s-lesser-dark span.cm-variable-3 { color: white; }\n.cm-s-lesser-dark span.cm-property {color: #92A75C;}\n.cm-s-lesser-dark span.cm-operator {color: #92A75C;}\n.cm-s-lesser-dark span.cm-comment { color: #666; }\n.cm-s-lesser-dark span.cm-string { color: #BCD279; }\n.cm-s-lesser-dark span.cm-string-2 {color: #f50;}\n.cm-s-lesser-dark span.cm-meta { color: #738C73; }\n.cm-s-lesser-dark span.cm-qualifier {color: #555;}\n.cm-s-lesser-dark span.cm-builtin { color: #ff9e59; }\n.cm-s-lesser-dark span.cm-bracket { color: #EBEFE7; }\n.cm-s-lesser-dark span.cm-tag { color: #669199; }\n.cm-s-lesser-dark span.cm-attribute {color: #00c;}\n.cm-s-lesser-dark span.cm-header {color: #a0a;}\n.cm-s-lesser-dark span.cm-quote {color: #090;}\n.cm-s-lesser-dark span.cm-hr {color: #999;}\n.cm-s-lesser-dark span.cm-link {color: #00c;}\n.cm-s-lesser-dark span.cm-error { color: #9d1e15; }\n\n.cm-s-lesser-dark .CodeMirror-activeline-background {background: #3C3A3A !important;}\n.cm-s-lesser-dark .CodeMirror-matchingbracket {outline:1px solid grey; color:white !important;}\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/theme/mbo.css",
    "content": "/****************************************************************/\n/*   Based on mbonaci's Brackets mbo theme                      */\n/*   https://github.com/mbonaci/global/blob/master/Mbo.tmTheme  */\n/*   Create your own: http://tmtheme-editor.herokuapp.com       */\n/****************************************************************/\n\n.cm-s-mbo.CodeMirror {background: #2c2c2c; color: #ffffec;}\n.cm-s-mbo div.CodeMirror-selected {background: #716C62 !important;}\n.cm-s-mbo.CodeMirror ::selection { background: rgba(113, 108, 98, .99); }\n.cm-s-mbo.CodeMirror ::-moz-selection { background: rgba(113, 108, 98, .99); }\n.cm-s-mbo .CodeMirror-gutters {background: #4e4e4e; border-right: 0px;}\n.cm-s-mbo .CodeMirror-guttermarker { color: white; }\n.cm-s-mbo .CodeMirror-guttermarker-subtle { color: grey; }\n.cm-s-mbo .CodeMirror-linenumber {color: #dadada;}\n.cm-s-mbo .CodeMirror-cursor {border-left: 1px solid #ffffec !important;}\n\n.cm-s-mbo span.cm-comment {color: #95958a;}\n.cm-s-mbo span.cm-atom {color: #00a8c6;}\n.cm-s-mbo span.cm-number {color: #00a8c6;}\n\n.cm-s-mbo span.cm-property, .cm-s-mbo span.cm-attribute {color: #9ddfe9;}\n.cm-s-mbo span.cm-keyword {color: #ffb928;}\n.cm-s-mbo span.cm-string {color: #ffcf6c;}\n.cm-s-mbo span.cm-string.cm-property {color: #ffffec;}\n\n.cm-s-mbo span.cm-variable {color: #ffffec;}\n.cm-s-mbo span.cm-variable-2 {color: #00a8c6;}\n.cm-s-mbo span.cm-def {color: #ffffec;}\n.cm-s-mbo span.cm-bracket {color: #fffffc; font-weight: bold;}\n.cm-s-mbo span.cm-tag {color: #9ddfe9;}\n.cm-s-mbo span.cm-link {color: #f54b07;}\n.cm-s-mbo span.cm-error {border-bottom: #636363; color: #ffffec;}\n.cm-s-mbo span.cm-qualifier {color: #ffffec;}\n\n.cm-s-mbo .CodeMirror-activeline-background {background: #494b41 !important;}\n.cm-s-mbo .CodeMirror-matchingbracket {color: #222 !important;}\n.cm-s-mbo .CodeMirror-matchingtag {background: rgba(255, 255, 255, .37);}\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/theme/mdn-like.css",
    "content": "/*\n  MDN-LIKE Theme - Mozilla\n  Ported to CodeMirror by Peter Kroon <plakroon@gmail.com>\n  Report bugs/issues here: https://github.com/codemirror/CodeMirror/issues\n  GitHub: @peterkroon\n\n  The mdn-like theme is inspired on the displayed code examples at: https://developer.mozilla.org/en-US/docs/Web/CSS/animation\n\n*/\n.cm-s-mdn-like.CodeMirror { color: #999; background-color: #fff; }\n.cm-s-mdn-like .CodeMirror-selected { background: #cfc !important; }\n.cm-s-mdn-like.CodeMirror ::selection { background: #cfc; }\n.cm-s-mdn-like.CodeMirror ::-moz-selection { background: #cfc; }\n\n.cm-s-mdn-like .CodeMirror-gutters { background: #f8f8f8; border-left: 6px solid rgba(0,83,159,0.65); color: #333; }\n.cm-s-mdn-like .CodeMirror-linenumber { color: #aaa; margin-left: 3px; }\ndiv.cm-s-mdn-like .CodeMirror-cursor { border-left: 2px solid #222; }\n\n.cm-s-mdn-like .cm-keyword {  color: #6262FF; }\n.cm-s-mdn-like .cm-atom { color: #F90; }\n.cm-s-mdn-like .cm-number { color:  #ca7841; }\n.cm-s-mdn-like .cm-def { color: #8DA6CE; }\n.cm-s-mdn-like span.cm-variable-2, .cm-s-mdn-like span.cm-tag { color: #690; }\n.cm-s-mdn-like span.cm-variable-3, .cm-s-mdn-like span.cm-def { color: #07a; }\n\n.cm-s-mdn-like .cm-variable { color: #07a; }\n.cm-s-mdn-like .cm-property { color: #905; }\n.cm-s-mdn-like .cm-qualifier { color: #690; }\n\n.cm-s-mdn-like .cm-operator { color: #cda869; }\n.cm-s-mdn-like .cm-comment { color:#777; font-weight:normal; }\n.cm-s-mdn-like .cm-string { color:#07a; font-style:italic; }\n.cm-s-mdn-like .cm-string-2 { color:#bd6b18; } /*?*/\n.cm-s-mdn-like .cm-meta { color: #000; } /*?*/\n.cm-s-mdn-like .cm-builtin { color: #9B7536; } /*?*/\n.cm-s-mdn-like .cm-tag { color: #997643; }\n.cm-s-mdn-like .cm-attribute { color: #d6bb6d; } /*?*/\n.cm-s-mdn-like .cm-header { color: #FF6400; }\n.cm-s-mdn-like .cm-hr { color: #AEAEAE; }\n.cm-s-mdn-like .cm-link {   color:#ad9361; font-style:italic; text-decoration:none; }\n.cm-s-mdn-like .cm-error { border-bottom: 1px solid red; }\n\ndiv.cm-s-mdn-like .CodeMirror-activeline-background {background: #efefff;}\ndiv.cm-s-mdn-like span.CodeMirror-matchingbracket {outline:1px solid grey; color: inherit;}\n\n.cm-s-mdn-like.CodeMirror { background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFcAAAAyCAYAAAAp8UeFAAAHvklEQVR42s2b63bcNgyEQZCSHCdt2vd/0tWF7I+Q6XgMXiTtuvU5Pl57ZQKkKHzEAOtF5KeIJBGJ8uvL599FRFREZhFx8DeXv8trn68RuGaC8TRfo3SNp9dlDDHedyLyTUTeRWStXKPZrjtpZxaRw5hPqozRs1N8/enzIiQRWcCgy4MUA0f+XWliDhyL8Lfyvx7ei/Ae3iQFHyw7U/59pQVIMEEPEz0G7XiwdRjzSfC3UTtz9vchIntxvry5iMgfIhJoEflOz2CQr3F5h/HfeFe+GTdLaKcu9L8LTeQb/R/7GgbsfKedyNdoHsN31uRPWrfZ5wsj/NzzRQHuToIdU3ahwnsKPxXCjJITuOsi7XLc7SG/v5GdALs7wf8JjTFiB5+QvTEfRyGOfX3Lrx8wxyQi3sNq46O7QahQiCsRFgqddjBouVEHOKDgXAQHD9gJCr5sMKkEdjwsarG/ww3BMHBU7OBjXnzdyY7SfCxf5/z6ATccrwlKuwC/jhznnPF4CgVzhhVf4xp2EixcBActO75iZ8/fM9zAs2OMzKdslgXWJ9XG8PQoOAMA5fGcsvORgv0doBXyHrCwfLJAOwo71QLNkb8n2Pl6EWiR7OCibtkPaz4Kc/0NNAze2gju3zOwekALDaCFPI5vjPFmgGY5AZqyGEvH1x7QfIb8YtxMnA/b+QQ0aQDAwc6JMFg8CbQZ4qoYEEHbRwNojuK3EHwd7VALSgq+MNDKzfT58T8qdpADrgW0GmgcAS1lhzztJmkAzcPNOQbsWEALBDSlMKUG0Eq4CLAQWvEVQ9WU57gZJwZtgPO3r9oBTQ9WO8TjqXINx8R0EYpiZEUWOF3FxkbJkgU9B2f41YBrIj5ZfsQa0M5kTgiAAqM3ShXLgu8XMqcrQBvJ0CL5pnTsfMB13oB8athpAq2XOQmcGmoACCLydx7nToa23ATaSIY2ichfOdPTGxlasXMLaL0MLZAOwAKIM+y8CmicobGdCcbbK9DzN+yYGVoNNI5iUKTMyYOjPse4A8SM1MmcXgU0toOq1yO/v8FOxlASyc7TgeYaAMBJHcY1CcCwGI/TK4AmDbDyKYBBtFUkRwto8gygiQEaByFgJ00BH2M8JWwQS1nafDXQCidWyOI8AcjDCSjCLk8ngObuAm3JAHAdubAmOaK06V8MNEsKPJOhobSprwQa6gD7DclRQdqcwL4zxqgBrQcabUiBLclRDKAlWp+etPkBaNMA0AKlrHwTdEByZAA4GM+SNluSY6wAzcMNewxmgig5Ks0nkrSpBvSaQHMdKTBAnLojOdYyGpQ254602ZILPdTD1hdlggdIm74jbTp8vDwF5ZYUeLWGJpWsh6XNyXgcYwVoJQTEhhTYkxzZjiU5npU2TaB979TQehlaAVq4kaGpiPwwwLkYUuBbQwocyQTv1tA0+1UFWoJF3iv1oq+qoSk8EQdJmwHkziIF7oOZk14EGitibAdjLYYK78H5vZOhtWpoI0ATGHs0Q8OMb4Ey+2bU2UYztCtA0wFAs7TplGLRVQCcqaFdGSPCeTI1QNIC52iWNzof6Uib7xjEp07mNNoUYmVosVItHrHzRlLgBn9LFyRHaQCtVUMbtTNhoXWiTOO9k/V8BdAc1Oq0ArSQs6/5SU0hckNy9NnXqQY0PGYo5dWJ7nINaN6o958FWin27aBaWRka1r5myvLOAm0j30eBJqCxHLReVclxhxOEN2JfDWjxBtAC7MIH1fVaGdoOp4qJYDgKtKPSFNID2gSnGldrCqkFZ+5UeQXQBIRrSwocbdZYQT/2LwRahBPBXoHrB8nxaGROST62DKUbQOMMzZIC9abkuELfQzQALWTnDNAm8KHWFOJgJ5+SHIvTPcmx1xQyZRhNL5Qci689aXMEaN/uNIWkEwDAvFpOZmgsBaaGnbs1NPa1Jm32gBZAIh1pCtG7TSH4aE0y1uVY4uqoFPisGlpP2rSA5qTecWn5agK6BzSpgAyD+wFaqhnYoSZ1Vwr8CmlTQbrcO3ZaX0NAEyMbYaAlyquFoLKK3SPby9CeVUPThrSJmkCAE0CrKUQadi4DrdSlWhmah0YL9z9vClH59YGbHx1J8VZTyAjQepJjmXwAKTDQI3omc3p1U4gDUf6RfcdYfrUp5ClAi2J3Ba6UOXGo+K+bQrjjssitG2SJzshaLwMtXgRagUNpYYoVkMSBLM+9GGiJZMvduG6DRZ4qc04DMPtQQxOjEtACmhO7K1AbNbQDEggZyJwscFpAGwENhoBeUwh3bWolhe8BTYVKxQEWrSUn/uhcM5KhvUu/+eQu0Lzhi+VrK0PrZZNDQKs9cpYUuFYgMVpD4/NxenJTiMCNqdUEUf1qZWjppLT5qSkkUZbCwkbZMSuVnu80hfSkzRbQeqCZSAh6huR4VtoM2gHAlLf72smuWgE+VV7XpE25Ab2WFDgyhnSuKbs4GuGzCjR+tIoUuMFg3kgcWKLTwRqanJQ2W00hAsenfaApRC42hbCvK1SlE0HtE9BGgneJO+ELamitD1YjjOYnNYVcraGhtKkW0EqVVeDx733I2NH581k1NNxNLG0i0IJ8/NjVaOZ0tYZ2Vtr0Xv7tPV3hkWp9EFkgS/J0vosngTaSoaG06WHi+xObQkaAdlbanP8B2+2l0f90LmUAAAAASUVORK5CYII=); }\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/theme/midnight.css",
    "content": "/* Based on the theme at http://bonsaiden.github.com/JavaScript-Garden */\n\n/*<!--match-->*/\n.cm-s-midnight span.CodeMirror-matchhighlight { background: #494949; }\n.cm-s-midnight.CodeMirror-focused span.CodeMirror-matchhighlight { background: #314D67 !important; }\n\n/*<!--activeline-->*/\n.cm-s-midnight .CodeMirror-activeline-background {background: #253540 !important;}\n\n.cm-s-midnight.CodeMirror {\n    background: #0F192A;\n    color: #D1EDFF;\n}\n\n.cm-s-midnight.CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}\n\n.cm-s-midnight div.CodeMirror-selected {background: #314D67 !important;}\n.cm-s-midnight.CodeMirror ::selection { background: rgba(49, 77, 103, .99); }\n.cm-s-midnight.CodeMirror ::-moz-selection { background: rgba(49, 77, 103, .99); }\n.cm-s-midnight .CodeMirror-gutters {background: #0F192A; border-right: 1px solid;}\n.cm-s-midnight .CodeMirror-guttermarker { color: white; }\n.cm-s-midnight .CodeMirror-guttermarker-subtle { color: #d0d0d0; }\n.cm-s-midnight .CodeMirror-linenumber {color: #D0D0D0;}\n.cm-s-midnight .CodeMirror-cursor {\n    border-left: 1px solid #F8F8F0 !important;\n}\n\n.cm-s-midnight span.cm-comment {color: #428BDD;}\n.cm-s-midnight span.cm-atom {color: #AE81FF;}\n.cm-s-midnight span.cm-number {color: #D1EDFF;}\n\n.cm-s-midnight span.cm-property, .cm-s-midnight span.cm-attribute {color: #A6E22E;}\n.cm-s-midnight span.cm-keyword {color: #E83737;}\n.cm-s-midnight span.cm-string {color: #1DC116;}\n\n.cm-s-midnight span.cm-variable {color: #FFAA3E;}\n.cm-s-midnight span.cm-variable-2 {color: #FFAA3E;}\n.cm-s-midnight span.cm-def {color: #4DD;}\n.cm-s-midnight span.cm-bracket {color: #D1EDFF;}\n.cm-s-midnight span.cm-tag {color: #449;}\n.cm-s-midnight span.cm-link {color: #AE81FF;}\n.cm-s-midnight span.cm-error {background: #F92672; color: #F8F8F0;}\n\n.cm-s-midnight .CodeMirror-matchingbracket {\n  text-decoration: underline;\n  color: white !important;\n}\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/theme/monokai.css",
    "content": "/* Based on Sublime Text's Monokai theme */\n\n.cm-s-monokai.CodeMirror {background: #272822; color: #f8f8f2;}\n.cm-s-monokai div.CodeMirror-selected {background: #49483E !important;}\n.cm-s-monokai.CodeMirror ::selection { background: rgba(73, 72, 62, .99); }\n.cm-s-monokai.CodeMirror ::-moz-selection { background: rgba(73, 72, 62, .99); }\n.cm-s-monokai .CodeMirror-gutters {background: #272822; border-right: 0px;}\n.cm-s-monokai .CodeMirror-guttermarker { color: white; }\n.cm-s-monokai .CodeMirror-guttermarker-subtle { color: #d0d0d0; }\n.cm-s-monokai .CodeMirror-linenumber {color: #d0d0d0;}\n.cm-s-monokai .CodeMirror-cursor {border-left: 1px solid #f8f8f0 !important;}\n\n.cm-s-monokai span.cm-comment {color: #75715e;}\n.cm-s-monokai span.cm-atom {color: #ae81ff;}\n.cm-s-monokai span.cm-number {color: #ae81ff;}\n\n.cm-s-monokai span.cm-property, .cm-s-monokai span.cm-attribute {color: #a6e22e;}\n.cm-s-monokai span.cm-keyword {color: #f92672;}\n.cm-s-monokai span.cm-string {color: #e6db74;}\n\n.cm-s-monokai span.cm-variable {color: #a6e22e;}\n.cm-s-monokai span.cm-variable-2 {color: #9effff;}\n.cm-s-monokai span.cm-def {color: #fd971f;}\n.cm-s-monokai span.cm-bracket {color: #f8f8f2;}\n.cm-s-monokai span.cm-tag {color: #f92672;}\n.cm-s-monokai span.cm-link {color: #ae81ff;}\n.cm-s-monokai span.cm-error {background: #f92672; color: #f8f8f0;}\n\n.cm-s-monokai .CodeMirror-activeline-background {background: #373831 !important;}\n.cm-s-monokai .CodeMirror-matchingbracket {\n  text-decoration: underline;\n  color: white !important;\n}\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/theme/neat.css",
    "content": ".cm-s-neat span.cm-comment { color: #a86; }\n.cm-s-neat span.cm-keyword { line-height: 1em; font-weight: bold; color: blue; }\n.cm-s-neat span.cm-string { color: #a22; }\n.cm-s-neat span.cm-builtin { line-height: 1em; font-weight: bold; color: #077; }\n.cm-s-neat span.cm-special { line-height: 1em; font-weight: bold; color: #0aa; }\n.cm-s-neat span.cm-variable { color: black; }\n.cm-s-neat span.cm-number, .cm-s-neat span.cm-atom { color: #3a3; }\n.cm-s-neat span.cm-meta {color: #555;}\n.cm-s-neat span.cm-link { color: #3a3; }\n\n.cm-s-neat .CodeMirror-activeline-background {background: #e8f2ff !important;}\n.cm-s-neat .CodeMirror-matchingbracket {outline:1px solid grey; color:black !important;}\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/theme/neo.css",
    "content": "/* neo theme for codemirror */\n\n/* Color scheme */\n\n.cm-s-neo.CodeMirror {\n  background-color:#ffffff;\n  color:#2e383c;\n  line-height:1.4375;\n}\n.cm-s-neo .cm-comment {color:#75787b}\n.cm-s-neo .cm-keyword, .cm-s-neo .cm-property {color:#1d75b3}\n.cm-s-neo .cm-atom,.cm-s-neo .cm-number {color:#75438a}\n.cm-s-neo .cm-node,.cm-s-neo .cm-tag {color:#9c3328}\n.cm-s-neo .cm-string {color:#b35e14}\n.cm-s-neo .cm-variable,.cm-s-neo .cm-qualifier {color:#047d65}\n\n\n/* Editor styling */\n\n.cm-s-neo pre {\n  padding:0;\n}\n\n.cm-s-neo .CodeMirror-gutters {\n  border:none;\n  border-right:10px solid transparent;\n  background-color:transparent;\n}\n\n.cm-s-neo .CodeMirror-linenumber {\n  padding:0;\n  color:#e0e2e5;\n}\n\n.cm-s-neo .CodeMirror-guttermarker { color: #1d75b3; }\n.cm-s-neo .CodeMirror-guttermarker-subtle { color: #e0e2e5; }\n\n.cm-s-neo div.CodeMirror-cursor {\n  width: auto;\n  border: 0;\n  background: rgba(155,157,162,0.37);\n  z-index: 1;\n}\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/theme/night.css",
    "content": "/* Loosely based on the Midnight Textmate theme */\n\n.cm-s-night.CodeMirror { background: #0a001f; color: #f8f8f8; }\n.cm-s-night div.CodeMirror-selected { background: #447 !important; }\n.cm-s-night.CodeMirror ::selection { background: rgba(68, 68, 119, .99); }\n.cm-s-night.CodeMirror ::-moz-selection { background: rgba(68, 68, 119, .99); }\n.cm-s-night .CodeMirror-gutters { background: #0a001f; border-right: 1px solid #aaa; }\n.cm-s-night .CodeMirror-guttermarker { color: white; }\n.cm-s-night .CodeMirror-guttermarker-subtle { color: #bbb; }\n.cm-s-night .CodeMirror-linenumber { color: #f8f8f8; }\n.cm-s-night .CodeMirror-cursor { border-left: 1px solid white !important; }\n\n.cm-s-night span.cm-comment { color: #6900a1; }\n.cm-s-night span.cm-atom { color: #845dc4; }\n.cm-s-night span.cm-number, .cm-s-night span.cm-attribute { color: #ffd500; }\n.cm-s-night span.cm-keyword { color: #599eff; }\n.cm-s-night span.cm-string { color: #37f14a; }\n.cm-s-night span.cm-meta { color: #7678e2; }\n.cm-s-night span.cm-variable-2, .cm-s-night span.cm-tag { color: #99b2ff; }\n.cm-s-night span.cm-variable-3, .cm-s-night span.cm-def { color: white; }\n.cm-s-night span.cm-bracket { color: #8da6ce; }\n.cm-s-night span.cm-comment { color: #6900a1; }\n.cm-s-night span.cm-builtin, .cm-s-night span.cm-special { color: #ff9e59; }\n.cm-s-night span.cm-link { color: #845dc4; }\n.cm-s-night span.cm-error { color: #9d1e15; }\n\n.cm-s-night .CodeMirror-activeline-background {background: #1C005A !important;}\n.cm-s-night .CodeMirror-matchingbracket {outline:1px solid grey; color:white !important;}\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/theme/paraiso-dark.css",
    "content": "/*\n\n    Name:       Paraíso (Dark)\n    Author:     Jan T. Sott\n\n    Color scheme by Jan T. Sott (https://github.com/idleberg/Paraiso-CodeMirror)\n    Inspired by the art of Rubens LP (http://www.rubenslp.com.br)\n\n*/\n\n.cm-s-paraiso-dark.CodeMirror {background: #2f1e2e; color: #b9b6b0;}\n.cm-s-paraiso-dark div.CodeMirror-selected {background: #41323f !important;}\n.cm-s-paraiso-dark.CodeMirror ::selection { background: rgba(65, 50, 63, .99); }\n.cm-s-paraiso-dark.CodeMirror ::-moz-selection { background: rgba(65, 50, 63, .99); }\n.cm-s-paraiso-dark .CodeMirror-gutters {background: #2f1e2e; border-right: 0px;}\n.cm-s-paraiso-dark .CodeMirror-guttermarker { color: #ef6155; }\n.cm-s-paraiso-dark .CodeMirror-guttermarker-subtle { color: #776e71; }\n.cm-s-paraiso-dark .CodeMirror-linenumber {color: #776e71;}\n.cm-s-paraiso-dark .CodeMirror-cursor {border-left: 1px solid #8d8687 !important;}\n\n.cm-s-paraiso-dark span.cm-comment {color: #e96ba8;}\n.cm-s-paraiso-dark span.cm-atom {color: #815ba4;}\n.cm-s-paraiso-dark span.cm-number {color: #815ba4;}\n\n.cm-s-paraiso-dark span.cm-property, .cm-s-paraiso-dark span.cm-attribute {color: #48b685;}\n.cm-s-paraiso-dark span.cm-keyword {color: #ef6155;}\n.cm-s-paraiso-dark span.cm-string {color: #fec418;}\n\n.cm-s-paraiso-dark span.cm-variable {color: #48b685;}\n.cm-s-paraiso-dark span.cm-variable-2 {color: #06b6ef;}\n.cm-s-paraiso-dark span.cm-def {color: #f99b15;}\n.cm-s-paraiso-dark span.cm-bracket {color: #b9b6b0;}\n.cm-s-paraiso-dark span.cm-tag {color: #ef6155;}\n.cm-s-paraiso-dark span.cm-link {color: #815ba4;}\n.cm-s-paraiso-dark span.cm-error {background: #ef6155; color: #8d8687;}\n\n.cm-s-paraiso-dark .CodeMirror-activeline-background {background: #4D344A !important;}\n.cm-s-paraiso-dark .CodeMirror-matchingbracket { text-decoration: underline; color: white !important;}\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/theme/paraiso-light.css",
    "content": "/*\n\n    Name:       Paraíso (Light)\n    Author:     Jan T. Sott\n\n    Color scheme by Jan T. Sott (https://github.com/idleberg/Paraiso-CodeMirror)\n    Inspired by the art of Rubens LP (http://www.rubenslp.com.br)\n\n*/\n\n.cm-s-paraiso-light.CodeMirror {background: #e7e9db; color: #41323f;}\n.cm-s-paraiso-light div.CodeMirror-selected {background: #b9b6b0 !important;}\n.cm-s-paraiso-light.CodeMirror ::selection { background: #b9b6b0; }\n.cm-s-paraiso-light.CodeMirror ::-moz-selection { background: #b9b6b0; }\n.cm-s-paraiso-light .CodeMirror-gutters {background: #e7e9db; border-right: 0px;}\n.cm-s-paraiso-light .CodeMirror-guttermarker { color: black; }\n.cm-s-paraiso-light .CodeMirror-guttermarker-subtle { color: #8d8687; }\n.cm-s-paraiso-light .CodeMirror-linenumber {color: #8d8687;}\n.cm-s-paraiso-light .CodeMirror-cursor {border-left: 1px solid #776e71 !important;}\n\n.cm-s-paraiso-light span.cm-comment {color: #e96ba8;}\n.cm-s-paraiso-light span.cm-atom {color: #815ba4;}\n.cm-s-paraiso-light span.cm-number {color: #815ba4;}\n\n.cm-s-paraiso-light span.cm-property, .cm-s-paraiso-light span.cm-attribute {color: #48b685;}\n.cm-s-paraiso-light span.cm-keyword {color: #ef6155;}\n.cm-s-paraiso-light span.cm-string {color: #fec418;}\n\n.cm-s-paraiso-light span.cm-variable {color: #48b685;}\n.cm-s-paraiso-light span.cm-variable-2 {color: #06b6ef;}\n.cm-s-paraiso-light span.cm-def {color: #f99b15;}\n.cm-s-paraiso-light span.cm-bracket {color: #41323f;}\n.cm-s-paraiso-light span.cm-tag {color: #ef6155;}\n.cm-s-paraiso-light span.cm-link {color: #815ba4;}\n.cm-s-paraiso-light span.cm-error {background: #ef6155; color: #776e71;}\n\n.cm-s-paraiso-light .CodeMirror-activeline-background {background: #CFD1C4 !important;}\n.cm-s-paraiso-light .CodeMirror-matchingbracket { text-decoration: underline; color: white !important;}\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/theme/pastel-on-dark.css",
    "content": "/**\n * Pastel On Dark theme ported from ACE editor\n * @license MIT\n * @copyright AtomicPages LLC 2014\n * @author Dennis Thompson, AtomicPages LLC\n * @version 1.1\n * @source https://github.com/atomicpages/codemirror-pastel-on-dark-theme\n */\n\n.cm-s-pastel-on-dark.CodeMirror {\n\tbackground: #2c2827;\n\tcolor: #8F938F;\n\tline-height: 1.5;\n\tfont-size: 14px;\n}\n.cm-s-pastel-on-dark div.CodeMirror-selected { background: rgba(221,240,255,0.2) !important; }\n.cm-s-pastel-on-dark.CodeMirror ::selection { background: rgba(221,240,255,0.2); }\n.cm-s-pastel-on-dark.CodeMirror ::-moz-selection { background: rgba(221,240,255,0.2); }\n\n.cm-s-pastel-on-dark .CodeMirror-gutters {\n\tbackground: #34302f;\n\tborder-right: 0px;\n\tpadding: 0 3px;\n}\n.cm-s-pastel-on-dark .CodeMirror-guttermarker { color: white; }\n.cm-s-pastel-on-dark .CodeMirror-guttermarker-subtle { color: #8F938F; }\n.cm-s-pastel-on-dark .CodeMirror-linenumber { color: #8F938F; }\n.cm-s-pastel-on-dark .CodeMirror-cursor { border-left: 1px solid #A7A7A7 !important; }\n.cm-s-pastel-on-dark span.cm-comment { color: #A6C6FF; }\n.cm-s-pastel-on-dark span.cm-atom { color: #DE8E30; }\n.cm-s-pastel-on-dark span.cm-number { color: #CCCCCC; }\n.cm-s-pastel-on-dark span.cm-property { color: #8F938F; }\n.cm-s-pastel-on-dark span.cm-attribute { color: #a6e22e; }\n.cm-s-pastel-on-dark span.cm-keyword { color: #AEB2F8; }\n.cm-s-pastel-on-dark span.cm-string { color: #66A968; }\n.cm-s-pastel-on-dark span.cm-variable { color: #AEB2F8; }\n.cm-s-pastel-on-dark span.cm-variable-2 { color: #BEBF55; }\n.cm-s-pastel-on-dark span.cm-variable-3 { color: #DE8E30; }\n.cm-s-pastel-on-dark span.cm-def { color: #757aD8; }\n.cm-s-pastel-on-dark span.cm-bracket { color: #f8f8f2; }\n.cm-s-pastel-on-dark span.cm-tag { color: #C1C144; }\n.cm-s-pastel-on-dark span.cm-link { color: #ae81ff; }\n.cm-s-pastel-on-dark span.cm-qualifier,.cm-s-pastel-on-dark span.cm-builtin { color: #C1C144; }\n.cm-s-pastel-on-dark span.cm-error {\n\tbackground: #757aD8;\n\tcolor: #f8f8f0;\n}\n.cm-s-pastel-on-dark .CodeMirror-activeline-background { background: rgba(255, 255, 255, 0.031) !important; }\n.cm-s-pastel-on-dark .CodeMirror-matchingbracket {\n\tborder: 1px solid rgba(255,255,255,0.25);\n\tcolor: #8F938F !important;\n\tmargin: -1px -1px 0 -1px;\n}\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/theme/rubyblue.css",
    "content": ".cm-s-rubyblue.CodeMirror { background: #112435; color: white; }\n.cm-s-rubyblue div.CodeMirror-selected { background: #38566F !important; }\n.cm-s-rubyblue.CodeMirror ::selection { background: rgba(56, 86, 111, 0.99); }\n.cm-s-rubyblue.CodeMirror ::-moz-selection { background: rgba(56, 86, 111, 0.99); }\n.cm-s-rubyblue .CodeMirror-gutters { background: #1F4661; border-right: 7px solid #3E7087; }\n.cm-s-rubyblue .CodeMirror-guttermarker { color: white; }\n.cm-s-rubyblue .CodeMirror-guttermarker-subtle { color: #3E7087; }\n.cm-s-rubyblue .CodeMirror-linenumber { color: white; }\n.cm-s-rubyblue .CodeMirror-cursor { border-left: 1px solid white !important; }\n\n.cm-s-rubyblue span.cm-comment { color: #999; font-style:italic; line-height: 1em; }\n.cm-s-rubyblue span.cm-atom { color: #F4C20B; }\n.cm-s-rubyblue span.cm-number, .cm-s-rubyblue span.cm-attribute { color: #82C6E0; }\n.cm-s-rubyblue span.cm-keyword { color: #F0F; }\n.cm-s-rubyblue span.cm-string { color: #F08047; }\n.cm-s-rubyblue span.cm-meta { color: #F0F; }\n.cm-s-rubyblue span.cm-variable-2, .cm-s-rubyblue span.cm-tag { color: #7BD827; }\n.cm-s-rubyblue span.cm-variable-3, .cm-s-rubyblue span.cm-def { color: white; }\n.cm-s-rubyblue span.cm-bracket { color: #F0F; }\n.cm-s-rubyblue span.cm-link { color: #F4C20B; }\n.cm-s-rubyblue span.CodeMirror-matchingbracket { color:#F0F !important; }\n.cm-s-rubyblue span.cm-builtin, .cm-s-rubyblue span.cm-special { color: #FF9D00; }\n.cm-s-rubyblue span.cm-error { color: #AF2018; }\n\n.cm-s-rubyblue .CodeMirror-activeline-background {background: #173047 !important;}\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/theme/solarized.css",
    "content": "/*\nSolarized theme for code-mirror\nhttp://ethanschoonover.com/solarized\n*/\n\n/*\nSolarized color pallet\nhttp://ethanschoonover.com/solarized/img/solarized-palette.png\n*/\n\n.solarized.base03 { color: #002b36; }\n.solarized.base02 { color: #073642; }\n.solarized.base01 { color: #586e75; }\n.solarized.base00 { color: #657b83; }\n.solarized.base0 { color: #839496; }\n.solarized.base1 { color: #93a1a1; }\n.solarized.base2 { color: #eee8d5; }\n.solarized.base3  { color: #fdf6e3; }\n.solarized.solar-yellow  { color: #b58900; }\n.solarized.solar-orange  { color: #cb4b16; }\n.solarized.solar-red { color: #dc322f; }\n.solarized.solar-magenta { color: #d33682; }\n.solarized.solar-violet  { color: #6c71c4; }\n.solarized.solar-blue { color: #268bd2; }\n.solarized.solar-cyan { color: #2aa198; }\n.solarized.solar-green { color: #859900; }\n\n/* Color scheme for code-mirror */\n\n.cm-s-solarized {\n  line-height: 1.45em;\n  color-profile: sRGB;\n  rendering-intent: auto;\n}\n.cm-s-solarized.cm-s-dark {\n  color: #839496;\n  background-color:  #002b36;\n  text-shadow: #002b36 0 1px;\n}\n.cm-s-solarized.cm-s-light {\n  background-color: #fdf6e3;\n  color: #657b83;\n  text-shadow: #eee8d5 0 1px;\n}\n\n.cm-s-solarized .CodeMirror-widget {\n  text-shadow: none;\n}\n\n\n.cm-s-solarized .cm-keyword { color: #cb4b16 }\n.cm-s-solarized .cm-atom { color: #d33682; }\n.cm-s-solarized .cm-number { color: #d33682; }\n.cm-s-solarized .cm-def { color: #2aa198; }\n\n.cm-s-solarized .cm-variable { color: #268bd2; }\n.cm-s-solarized .cm-variable-2 { color: #b58900; }\n.cm-s-solarized .cm-variable-3 { color: #6c71c4; }\n\n.cm-s-solarized .cm-property { color: #2aa198; }\n.cm-s-solarized .cm-operator {color: #6c71c4;}\n\n.cm-s-solarized .cm-comment { color: #586e75; font-style:italic; }\n\n.cm-s-solarized .cm-string { color: #859900; }\n.cm-s-solarized .cm-string-2 { color: #b58900; }\n\n.cm-s-solarized .cm-meta { color: #859900; }\n.cm-s-solarized .cm-qualifier { color: #b58900; }\n.cm-s-solarized .cm-builtin { color: #d33682; }\n.cm-s-solarized .cm-bracket { color: #cb4b16; }\n.cm-s-solarized .CodeMirror-matchingbracket { color: #859900; }\n.cm-s-solarized .CodeMirror-nonmatchingbracket { color: #dc322f; }\n.cm-s-solarized .cm-tag { color: #93a1a1 }\n.cm-s-solarized .cm-attribute {  color: #2aa198; }\n.cm-s-solarized .cm-header { color: #586e75; }\n.cm-s-solarized .cm-quote { color: #93a1a1; }\n.cm-s-solarized .cm-hr {\n  color: transparent;\n  border-top: 1px solid #586e75;\n  display: block;\n}\n.cm-s-solarized .cm-link { color: #93a1a1; cursor: pointer; }\n.cm-s-solarized .cm-special { color: #6c71c4; }\n.cm-s-solarized .cm-em {\n  color: #999;\n  text-decoration: underline;\n  text-decoration-style: dotted;\n}\n.cm-s-solarized .cm-strong { color: #eee; }\n.cm-s-solarized .cm-error,\n.cm-s-solarized .cm-invalidchar {\n  color: #586e75;\n  border-bottom: 1px dotted #dc322f;\n}\n\n.cm-s-solarized.cm-s-dark .CodeMirror-selected { background: #073642; }\n.cm-s-solarized.cm-s-dark.CodeMirror ::selection { background: rgba(7, 54, 66, 0.99); }\n.cm-s-solarized.cm-s-dark.CodeMirror ::-moz-selection { background: rgba(7, 54, 66, 0.99); }\n\n.cm-s-solarized.cm-s-light .CodeMirror-selected { background: #eee8d5; }\n.cm-s-solarized.cm-s-light.CodeMirror ::selection { background: #eee8d5; }\n.cm-s-solarized.cm-s-lightCodeMirror ::-moz-selection { background: #eee8d5; }\n\n/* Editor styling */\n\n\n\n/* Little shadow on the view-port of the buffer view */\n.cm-s-solarized.CodeMirror {\n  -moz-box-shadow: inset 7px 0 12px -6px #000;\n  -webkit-box-shadow: inset 7px 0 12px -6px #000;\n  box-shadow: inset 7px 0 12px -6px #000;\n}\n\n/* Gutter border and some shadow from it  */\n.cm-s-solarized .CodeMirror-gutters {\n  border-right: 1px solid;\n}\n\n/* Gutter colors and line number styling based of color scheme (dark / light) */\n\n/* Dark */\n.cm-s-solarized.cm-s-dark .CodeMirror-gutters {\n  background-color:  #002b36;\n  border-color: #00232c;\n}\n\n.cm-s-solarized.cm-s-dark .CodeMirror-linenumber {\n  text-shadow: #021014 0 -1px;\n}\n\n/* Light */\n.cm-s-solarized.cm-s-light .CodeMirror-gutters {\n  background-color: #fdf6e3;\n  border-color: #eee8d5;\n}\n\n/* Common */\n.cm-s-solarized .CodeMirror-linenumber {\n  color: #586e75;\n  padding: 0 5px;\n}\n.cm-s-solarized .CodeMirror-guttermarker-subtle { color: #586e75; }\n.cm-s-solarized.cm-s-dark .CodeMirror-guttermarker { color: #ddd; }\n.cm-s-solarized.cm-s-light .CodeMirror-guttermarker { color: #cb4b16; }\n\n.cm-s-solarized .CodeMirror-gutter .CodeMirror-gutter-text {\n  color: #586e75;\n}\n\n.cm-s-solarized .CodeMirror-lines .CodeMirror-cursor {\n  border-left: 1px solid #819090;\n}\n\n/*\nActive line. Negative margin compensates left padding of the text in the\nview-port\n*/\n.cm-s-solarized.cm-s-dark .CodeMirror-activeline-background {\n  background: rgba(255, 255, 255, 0.10);\n}\n.cm-s-solarized.cm-s-light .CodeMirror-activeline-background {\n  background: rgba(0, 0, 0, 0.10);\n}\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/theme/the-matrix.css",
    "content": ".cm-s-the-matrix.CodeMirror { background: #000000; color: #00FF00; }\n.cm-s-the-matrix div.CodeMirror-selected { background: #2D2D2D !important; }\n.cm-s-the-matrix.CodeMirror ::selection { background: rgba(45, 45, 45, 0.99); }\n.cm-s-the-matrix.CodeMirror ::-moz-selection { background: rgba(45, 45, 45, 0.99); }\n.cm-s-the-matrix .CodeMirror-gutters { background: #060; border-right: 2px solid #00FF00; }\n.cm-s-the-matrix .CodeMirror-guttermarker { color: #0f0; }\n.cm-s-the-matrix .CodeMirror-guttermarker-subtle { color: white; }\n.cm-s-the-matrix .CodeMirror-linenumber { color: #FFFFFF; }\n.cm-s-the-matrix .CodeMirror-cursor { border-left: 1px solid #00FF00 !important; }\n\n.cm-s-the-matrix span.cm-keyword {color: #008803; font-weight: bold;}\n.cm-s-the-matrix span.cm-atom {color: #3FF;}\n.cm-s-the-matrix span.cm-number {color: #FFB94F;}\n.cm-s-the-matrix span.cm-def {color: #99C;}\n.cm-s-the-matrix span.cm-variable {color: #F6C;}\n.cm-s-the-matrix span.cm-variable-2 {color: #C6F;}\n.cm-s-the-matrix span.cm-variable-3 {color: #96F;}\n.cm-s-the-matrix span.cm-property {color: #62FFA0;}\n.cm-s-the-matrix span.cm-operator {color: #999}\n.cm-s-the-matrix span.cm-comment {color: #CCCCCC;}\n.cm-s-the-matrix span.cm-string {color: #39C;}\n.cm-s-the-matrix span.cm-meta {color: #C9F;}\n.cm-s-the-matrix span.cm-qualifier {color: #FFF700;}\n.cm-s-the-matrix span.cm-builtin {color: #30a;}\n.cm-s-the-matrix span.cm-bracket {color: #cc7;}\n.cm-s-the-matrix span.cm-tag {color: #FFBD40;}\n.cm-s-the-matrix span.cm-attribute {color: #FFF700;}\n.cm-s-the-matrix span.cm-error {color: #FF0000;}\n\n.cm-s-the-matrix .CodeMirror-activeline-background {background: #040;}\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/theme/tomorrow-night-bright.css",
    "content": "/*\n\n    Name:       Tomorrow Night - Bright\n    Author:     Chris Kempson\n\n    Port done by Gerard Braad <me@gbraad.nl>\n\n*/\n\n.cm-s-tomorrow-night-bright.CodeMirror {background: #000000; color: #eaeaea;}\n.cm-s-tomorrow-night-bright div.CodeMirror-selected {background: #424242 !important;}\n.cm-s-tomorrow-night-bright .CodeMirror-gutters {background: #000000; border-right: 0px;}\n.cm-s-tomorrow-night-bright .CodeMirror-guttermarker { color: #e78c45; }\n.cm-s-tomorrow-night-bright .CodeMirror-guttermarker-subtle { color: #777; }\n.cm-s-tomorrow-night-bright .CodeMirror-linenumber {color: #424242;}\n.cm-s-tomorrow-night-bright .CodeMirror-cursor {border-left: 1px solid #6A6A6A !important;}\n\n.cm-s-tomorrow-night-bright span.cm-comment {color: #d27b53;}\n.cm-s-tomorrow-night-bright span.cm-atom {color: #a16a94;}\n.cm-s-tomorrow-night-bright span.cm-number {color: #a16a94;}\n\n.cm-s-tomorrow-night-bright span.cm-property, .cm-s-tomorrow-night-bright span.cm-attribute {color: #99cc99;}\n.cm-s-tomorrow-night-bright span.cm-keyword {color: #d54e53;}\n.cm-s-tomorrow-night-bright span.cm-string {color: #e7c547;}\n\n.cm-s-tomorrow-night-bright span.cm-variable {color: #b9ca4a;}\n.cm-s-tomorrow-night-bright span.cm-variable-2 {color: #7aa6da;}\n.cm-s-tomorrow-night-bright span.cm-def {color: #e78c45;}\n.cm-s-tomorrow-night-bright span.cm-bracket {color: #eaeaea;}\n.cm-s-tomorrow-night-bright span.cm-tag {color: #d54e53;}\n.cm-s-tomorrow-night-bright span.cm-link {color: #a16a94;}\n.cm-s-tomorrow-night-bright span.cm-error {background: #d54e53; color: #6A6A6A;}\n\n.cm-s-tomorrow-night-bright .CodeMirror-activeline-background {background: #2a2a2a !important;}\n.cm-s-tomorrow-night-bright .CodeMirror-matchingbracket { text-decoration: underline; color: white !important;}\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/theme/tomorrow-night-eighties.css",
    "content": "/*\n\n    Name:       Tomorrow Night - Eighties\n    Author:     Chris Kempson\n\n    CodeMirror template by Jan T. Sott (https://github.com/idleberg/base16-codemirror)\n    Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16)\n\n*/\n\n.cm-s-tomorrow-night-eighties.CodeMirror {background: #000000; color: #CCCCCC;}\n.cm-s-tomorrow-night-eighties div.CodeMirror-selected {background: #2D2D2D !important;}\n.cm-s-tomorrow-night-eighties.CodeMirror ::selection { background: rgba(45, 45, 45, 0.99); }\n.cm-s-tomorrow-night-eighties.CodeMirror ::-moz-selection { background: rgba(45, 45, 45, 0.99); }\n.cm-s-tomorrow-night-eighties .CodeMirror-gutters {background: #000000; border-right: 0px;}\n.cm-s-tomorrow-night-eighties .CodeMirror-guttermarker { color: #f2777a; }\n.cm-s-tomorrow-night-eighties .CodeMirror-guttermarker-subtle { color: #777; }\n.cm-s-tomorrow-night-eighties .CodeMirror-linenumber {color: #515151;}\n.cm-s-tomorrow-night-eighties .CodeMirror-cursor {border-left: 1px solid #6A6A6A !important;}\n\n.cm-s-tomorrow-night-eighties span.cm-comment {color: #d27b53;}\n.cm-s-tomorrow-night-eighties span.cm-atom {color: #a16a94;}\n.cm-s-tomorrow-night-eighties span.cm-number {color: #a16a94;}\n\n.cm-s-tomorrow-night-eighties span.cm-property, .cm-s-tomorrow-night-eighties span.cm-attribute {color: #99cc99;}\n.cm-s-tomorrow-night-eighties span.cm-keyword {color: #f2777a;}\n.cm-s-tomorrow-night-eighties span.cm-string {color: #ffcc66;}\n\n.cm-s-tomorrow-night-eighties span.cm-variable {color: #99cc99;}\n.cm-s-tomorrow-night-eighties span.cm-variable-2 {color: #6699cc;}\n.cm-s-tomorrow-night-eighties span.cm-def {color: #f99157;}\n.cm-s-tomorrow-night-eighties span.cm-bracket {color: #CCCCCC;}\n.cm-s-tomorrow-night-eighties span.cm-tag {color: #f2777a;}\n.cm-s-tomorrow-night-eighties span.cm-link {color: #a16a94;}\n.cm-s-tomorrow-night-eighties span.cm-error {background: #f2777a; color: #6A6A6A;}\n\n.cm-s-tomorrow-night-eighties .CodeMirror-activeline-background {background: #343600 !important;}\n.cm-s-tomorrow-night-eighties .CodeMirror-matchingbracket { text-decoration: underline; color: white !important;}\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/theme/twilight.css",
    "content": ".cm-s-twilight.CodeMirror { background: #141414; color: #f7f7f7; } /**/\n.cm-s-twilight .CodeMirror-selected { background: #323232 !important; } /**/\n.cm-s-twilight.CodeMirror ::selection { background: rgba(50, 50, 50, 0.99); }\n.cm-s-twilight.CodeMirror ::-moz-selection { background: rgba(50, 50, 50, 0.99); }\n\n.cm-s-twilight .CodeMirror-gutters { background: #222; border-right: 1px solid #aaa; }\n.cm-s-twilight .CodeMirror-guttermarker { color: white; }\n.cm-s-twilight .CodeMirror-guttermarker-subtle { color: #aaa; }\n.cm-s-twilight .CodeMirror-linenumber { color: #aaa; }\n.cm-s-twilight .CodeMirror-cursor { border-left: 1px solid white !important; }\n\n.cm-s-twilight .cm-keyword {  color: #f9ee98; } /**/\n.cm-s-twilight .cm-atom { color: #FC0; }\n.cm-s-twilight .cm-number { color:  #ca7841; } /**/\n.cm-s-twilight .cm-def { color: #8DA6CE; }\n.cm-s-twilight span.cm-variable-2, .cm-s-twilight span.cm-tag { color: #607392; } /**/\n.cm-s-twilight span.cm-variable-3, .cm-s-twilight span.cm-def { color: #607392; } /**/\n.cm-s-twilight .cm-operator { color: #cda869; } /**/\n.cm-s-twilight .cm-comment { color:#777; font-style:italic; font-weight:normal; } /**/\n.cm-s-twilight .cm-string { color:#8f9d6a; font-style:italic; } /**/\n.cm-s-twilight .cm-string-2 { color:#bd6b18 } /*?*/\n.cm-s-twilight .cm-meta { background-color:#141414; color:#f7f7f7; } /*?*/\n.cm-s-twilight .cm-builtin { color: #cda869; } /*?*/\n.cm-s-twilight .cm-tag { color: #997643; } /**/\n.cm-s-twilight .cm-attribute { color: #d6bb6d; } /*?*/\n.cm-s-twilight .cm-header { color: #FF6400; }\n.cm-s-twilight .cm-hr { color: #AEAEAE; }\n.cm-s-twilight .cm-link {   color:#ad9361; font-style:italic; text-decoration:none; } /**/\n.cm-s-twilight .cm-error { border-bottom: 1px solid red; }\n\n.cm-s-twilight .CodeMirror-activeline-background {background: #27282E !important;}\n.cm-s-twilight .CodeMirror-matchingbracket {outline:1px solid grey; color:white !important;}\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/theme/vibrant-ink.css",
    "content": "/* Taken from the popular Visual Studio Vibrant Ink Schema */\n\n.cm-s-vibrant-ink.CodeMirror { background: black; color: white; }\n.cm-s-vibrant-ink .CodeMirror-selected { background: #35493c !important; }\n.cm-s-vibrant-ink.CodeMirror ::selection { background: rgba(53, 73, 60, 0.99); }\n.cm-s-vibrant-ink.CodeMirror ::-moz-selection { background: rgba(53, 73, 60, 0.99); }\n\n.cm-s-vibrant-ink .CodeMirror-gutters { background: #002240; border-right: 1px solid #aaa; }\n.cm-s-vibrant-ink .CodeMirror-guttermarker { color: white; }\n.cm-s-vibrant-ink .CodeMirror-guttermarker-subtle { color: #d0d0d0; }\n.cm-s-vibrant-ink .CodeMirror-linenumber { color: #d0d0d0; }\n.cm-s-vibrant-ink .CodeMirror-cursor { border-left: 1px solid white !important; }\n\n.cm-s-vibrant-ink .cm-keyword {  color: #CC7832; }\n.cm-s-vibrant-ink .cm-atom { color: #FC0; }\n.cm-s-vibrant-ink .cm-number { color:  #FFEE98; }\n.cm-s-vibrant-ink .cm-def { color: #8DA6CE; }\n.cm-s-vibrant-ink span.cm-variable-2, .cm-s-vibrant span.cm-tag { color: #FFC66D }\n.cm-s-vibrant-ink span.cm-variable-3, .cm-s-vibrant span.cm-def { color: #FFC66D }\n.cm-s-vibrant-ink .cm-operator { color: #888; }\n.cm-s-vibrant-ink .cm-comment { color: gray; font-weight: bold; }\n.cm-s-vibrant-ink .cm-string { color:  #A5C25C }\n.cm-s-vibrant-ink .cm-string-2 { color: red }\n.cm-s-vibrant-ink .cm-meta { color: #D8FA3C; }\n.cm-s-vibrant-ink .cm-builtin { color: #8DA6CE; }\n.cm-s-vibrant-ink .cm-tag { color: #8DA6CE; }\n.cm-s-vibrant-ink .cm-attribute { color: #8DA6CE; }\n.cm-s-vibrant-ink .cm-header { color: #FF6400; }\n.cm-s-vibrant-ink .cm-hr { color: #AEAEAE; }\n.cm-s-vibrant-ink .cm-link { color: blue; }\n.cm-s-vibrant-ink .cm-error { border-bottom: 1px solid red; }\n\n.cm-s-vibrant-ink .CodeMirror-activeline-background {background: #27282E !important;}\n.cm-s-vibrant-ink .CodeMirror-matchingbracket {outline:1px solid grey; color:white !important;}\n"
  },
  {
    "path": "static/editor.md/lib/codemirror/theme/xq-dark.css",
    "content": "/*\nCopyright (C) 2011 by MarkLogic Corporation\nAuthor: Mike Brevoort <mike@brevoort.com>\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n*/\n.cm-s-xq-dark.CodeMirror { background: #0a001f; color: #f8f8f8; }\n.cm-s-xq-dark .CodeMirror-selected { background: #27007A !important; }\n.cm-s-xq-dark.CodeMirror ::selection { background: rgba(39, 0, 122, 0.99); }\n.cm-s-xq-dark.CodeMirror ::-moz-selection { background: rgba(39, 0, 122, 0.99); }\n.cm-s-xq-dark .CodeMirror-gutters { background: #0a001f; border-right: 1px solid #aaa; }\n.cm-s-xq-dark .CodeMirror-guttermarker { color: #FFBD40; }\n.cm-s-xq-dark .CodeMirror-guttermarker-subtle { color: #f8f8f8; }\n.cm-s-xq-dark .CodeMirror-linenumber { color: #f8f8f8; }\n.cm-s-xq-dark .CodeMirror-cursor { border-left: 1px solid white !important; }\n\n.cm-s-xq-dark span.cm-keyword {color: #FFBD40;}\n.cm-s-xq-dark span.cm-atom {color: #6C8CD5;}\n.cm-s-xq-dark span.cm-number {color: #164;}\n.cm-s-xq-dark span.cm-def {color: #FFF; text-decoration:underline;}\n.cm-s-xq-dark span.cm-variable {color: #FFF;}\n.cm-s-xq-dark span.cm-variable-2 {color: #EEE;}\n.cm-s-xq-dark span.cm-variable-3 {color: #DDD;}\n.cm-s-xq-dark span.cm-property {}\n.cm-s-xq-dark span.cm-operator {}\n.cm-s-xq-dark span.cm-comment {color: gray;}\n.cm-s-xq-dark span.cm-string {color: #9FEE00;}\n.cm-s-xq-dark span.cm-meta {color: yellow;}\n.cm-s-xq-dark span.cm-qualifier {color: #FFF700;}\n.cm-s-xq-dark span.cm-builtin {color: #30a;}\n.cm-s-xq-dark span.cm-bracket {color: #cc7;}\n.cm-s-xq-dark span.cm-tag {color: #FFBD40;}\n.cm-s-xq-dark span.cm-attribute {color: #FFF700;}\n.cm-s-xq-dark span.cm-error {color: #f00;}\n\n.cm-s-xq-dark .CodeMirror-activeline-background {background: #27282E !important;}\n.cm-s-xq-dark .CodeMirror-matchingbracket {outline:1px solid grey; color:white !important;}"
  },
  {
    "path": "static/editor.md/lib/codemirror/theme/xq-light.css",
    "content": "/*\nCopyright (C) 2011 by MarkLogic Corporation\nAuthor: Mike Brevoort <mike@brevoort.com>\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n*/\n.cm-s-xq-light span.cm-keyword {line-height: 1em; font-weight: bold; color: #5A5CAD; }\n.cm-s-xq-light span.cm-atom {color: #6C8CD5;}\n.cm-s-xq-light span.cm-number {color: #164;}\n.cm-s-xq-light span.cm-def {text-decoration:underline;}\n.cm-s-xq-light span.cm-variable {color: black; }\n.cm-s-xq-light span.cm-variable-2 {color:black;}\n.cm-s-xq-light span.cm-variable-3 {color: black; }\n.cm-s-xq-light span.cm-property {}\n.cm-s-xq-light span.cm-operator {}\n.cm-s-xq-light span.cm-comment {color: #0080FF; font-style: italic;}\n.cm-s-xq-light span.cm-string {color: red;}\n.cm-s-xq-light span.cm-meta {color: yellow;}\n.cm-s-xq-light span.cm-qualifier {color: grey}\n.cm-s-xq-light span.cm-builtin {color: #7EA656;}\n.cm-s-xq-light span.cm-bracket {color: #cc7;}\n.cm-s-xq-light span.cm-tag {color: #3F7F7F;}\n.cm-s-xq-light span.cm-attribute {color: #7F007F;}\n.cm-s-xq-light span.cm-error {color: #f00;}\n\n.cm-s-xq-light .CodeMirror-activeline-background {background: #e8f2ff !important;}\n.cm-s-xq-light .CodeMirror-matchingbracket {outline:1px solid grey;color:black !important;background:yellow;}"
  },
  {
    "path": "static/editor.md/lib/codemirror/theme/zenburn.css",
    "content": "/**\n * \"\n *  Using Zenburn color palette from the Emacs Zenburn Theme\n *  https://github.com/bbatsov/zenburn-emacs/blob/master/zenburn-theme.el\n *\n *  Also using parts of https://github.com/xavi/coderay-lighttable-theme\n * \"\n * From: https://github.com/wisenomad/zenburn-lighttable-theme/blob/master/zenburn.css\n */\n\n.cm-s-zenburn .CodeMirror-gutters { background: #3f3f3f !important; }\n.cm-s-zenburn .CodeMirror-foldgutter-open, .CodeMirror-foldgutter-folded { color: #999; }\n.cm-s-zenburn .CodeMirror-cursor { border-left: 1px solid white !important; }\n.cm-s-zenburn { background-color: #3f3f3f; color: #dcdccc; }\n.cm-s-zenburn span.cm-builtin { color: #dcdccc; font-weight: bold; }\n.cm-s-zenburn span.cm-comment { color: #7f9f7f; }\n.cm-s-zenburn span.cm-keyword { color: #f0dfaf; font-weight: bold; }\n.cm-s-zenburn span.cm-atom { color: #bfebbf; }\n.cm-s-zenburn span.cm-def { color: #dcdccc; }\n.cm-s-zenburn span.cm-variable { color: #dfaf8f; }\n.cm-s-zenburn span.cm-variable-2 { color: #dcdccc; }\n.cm-s-zenburn span.cm-string { color: #cc9393; }\n.cm-s-zenburn span.cm-string-2 { color: #cc9393; }\n.cm-s-zenburn span.cm-number { color: #dcdccc; }\n.cm-s-zenburn span.cm-tag { color: #93e0e3; }\n.cm-s-zenburn span.cm-property { color: #dfaf8f; }\n.cm-s-zenburn span.cm-attribute { color: #dfaf8f; }\n.cm-s-zenburn span.cm-qualifier { color: #7cb8bb; }\n.cm-s-zenburn span.cm-meta { color: #f0dfaf; }\n.cm-s-zenburn span.cm-header { color: #f0efd0; }\n.cm-s-zenburn span.cm-operator { color: #f0efd0; }\n.cm-s-zenburn span.CodeMirror-matchingbracket { box-sizing: border-box; background: transparent; border-bottom: 1px solid; }\n.cm-s-zenburn span.CodeMirror-nonmatchingbracket { border-bottom: 1px solid; background: none; }\n.cm-s-zenburn .CodeMirror-activeline { background: #000000; }\n.cm-s-zenburn .CodeMirror-activeline-background { background: #000000; }\n.cm-s-zenburn .CodeMirror-selected { background: #545454; }\n.cm-s-zenburn .CodeMirror-focused .CodeMirror-selected { background: #4f4f4f; }\n"
  },
  {
    "path": "static/editor.md/lib/highlight/highlight.js",
    "content": "/*! highlight.js v9.9.0 | BSD3 License | git.io/hljslicense */\n!function(e){var t=\"object\"==typeof window&&window||\"object\"==typeof self&&self;\"undefined\"!=typeof exports?e(exports):t&&(t.hljs=e({}),\"function\"==typeof define&&define.amd&&define([],function(){return t.hljs}))}(function(e){function t(e){return e.replace(/[&<>]/gm,function(e){return L[e]})}function r(e){return e.nodeName.toLowerCase()}function a(e,t){var r=e&&e.exec(t);return r&&0===r.index}function n(e){return C.test(e)}function i(e){var t,r,a,i,s=e.className+\" \";if(s+=e.parentNode?e.parentNode.className:\"\",r=E.exec(s))return y(r[1])?r[1]:\"no-highlight\";for(s=s.split(/\\s+/),t=0,a=s.length;a>t;t++)if(i=s[t],n(i)||y(i))return i}function s(e,t){var r,a={};for(r in e)a[r]=e[r];if(t)for(r in t)a[r]=t[r];return a}function c(e){var t=[];return function a(e,n){for(var i=e.firstChild;i;i=i.nextSibling)3===i.nodeType?n+=i.nodeValue.length:1===i.nodeType&&(t.push({event:\"start\",offset:n,node:i}),n=a(i,n),r(i).match(/br|hr|img|input/)||t.push({event:\"stop\",offset:n,node:i}));return n}(e,0),t}function o(e,a,n){function i(){return e.length&&a.length?e[0].offset!==a[0].offset?e[0].offset<a[0].offset?e:a:\"start\"===a[0].event?e:a:e.length?e:a}function s(e){function a(e){return\" \"+e.nodeName+'=\"'+t(e.value)+'\"'}u+=\"<\"+r(e)+w.map.call(e.attributes,a).join(\"\")+\">\"}function c(e){u+=\"</\"+r(e)+\">\"}function o(e){(\"start\"===e.event?s:c)(e.node)}for(var l=0,u=\"\",d=[];e.length||a.length;){var b=i();if(u+=t(n.substring(l,b[0].offset)),l=b[0].offset,b===e){d.reverse().forEach(c);do o(b.splice(0,1)[0]),b=i();while(b===e&&b.length&&b[0].offset===l);d.reverse().forEach(s)}else\"start\"===b[0].event?d.push(b[0].node):d.pop(),o(b.splice(0,1)[0])}return u+t(n.substr(l))}function l(e){function t(e){return e&&e.source||e}function r(r,a){return new RegExp(t(r),\"m\"+(e.cI?\"i\":\"\")+(a?\"g\":\"\"))}function a(n,i){if(!n.compiled){if(n.compiled=!0,n.k=n.k||n.bK,n.k){var c={},o=function(t,r){e.cI&&(r=r.toLowerCase()),r.split(\" \").forEach(function(e){var r=e.split(\"|\");c[r[0]]=[t,r[1]?Number(r[1]):1]})};\"string\"==typeof n.k?o(\"keyword\",n.k):N(n.k).forEach(function(e){o(e,n.k[e])}),n.k=c}n.lR=r(n.l||/\\w+/,!0),i&&(n.bK&&(n.b=\"\\\\b(\"+n.bK.split(\" \").join(\"|\")+\")\\\\b\"),n.b||(n.b=/\\B|\\b/),n.bR=r(n.b),n.e||n.eW||(n.e=/\\B|\\b/),n.e&&(n.eR=r(n.e)),n.tE=t(n.e)||\"\",n.eW&&i.tE&&(n.tE+=(n.e?\"|\":\"\")+i.tE)),n.i&&(n.iR=r(n.i)),null==n.r&&(n.r=1),n.c||(n.c=[]);var l=[];n.c.forEach(function(e){e.v?e.v.forEach(function(t){l.push(s(e,t))}):l.push(\"self\"===e?n:e)}),n.c=l,n.c.forEach(function(e){a(e,n)}),n.starts&&a(n.starts,i);var u=n.c.map(function(e){return e.bK?\"\\\\.?(\"+e.b+\")\\\\.?\":e.b}).concat([n.tE,n.i]).map(t).filter(Boolean);n.t=u.length?r(u.join(\"|\"),!0):{exec:function(){return null}}}}a(e)}function u(e,r,n,i){function s(e,t){var r,n;for(r=0,n=t.c.length;n>r;r++)if(a(t.c[r].bR,e))return t.c[r]}function c(e,t){if(a(e.eR,t)){for(;e.endsParent&&e.parent;)e=e.parent;return e}return e.eW?c(e.parent,t):void 0}function o(e,t){return!n&&a(t.iR,e)}function b(e,t){var r=v.cI?t[0].toLowerCase():t[0];return e.k.hasOwnProperty(r)&&e.k[r]}function p(e,t,r,a){var n=a?\"\":S.classPrefix,i='<span class=\"'+n,s=r?\"\":B;return i+=e+'\">',i+t+s}function m(){var e,r,a,n;if(!N.k)return t(E);for(n=\"\",r=0,N.lR.lastIndex=0,a=N.lR.exec(E);a;)n+=t(E.substring(r,a.index)),e=b(N,a),e?(M+=e[1],n+=p(e[0],t(a[0]))):n+=t(a[0]),r=N.lR.lastIndex,a=N.lR.exec(E);return n+t(E.substr(r))}function f(){var e=\"string\"==typeof N.sL;if(e&&!k[N.sL])return t(E);var r=e?u(N.sL,E,!0,x[N.sL]):d(E,N.sL.length?N.sL:void 0);return N.r>0&&(M+=r.r),e&&(x[N.sL]=r.top),p(r.language,r.value,!1,!0)}function g(){C+=null!=N.sL?f():m(),E=\"\"}function _(e){C+=e.cN?p(e.cN,\"\",!0):\"\",N=Object.create(e,{parent:{value:N}})}function h(e,t){if(E+=e,null==t)return g(),0;var r=s(t,N);if(r)return r.skip?E+=t:(r.eB&&(E+=t),g(),r.rB||r.eB||(E=t)),_(r,t),r.rB?0:t.length;var a=c(N,t);if(a){var n=N;n.skip?E+=t:(n.rE||n.eE||(E+=t),g(),n.eE&&(E=t));do N.cN&&(C+=B),N.skip||(M+=N.r),N=N.parent;while(N!==a.parent);return a.starts&&_(a.starts,\"\"),n.rE?0:t.length}if(o(t,N))throw new Error('Illegal lexeme \"'+t+'\" for mode \"'+(N.cN||\"<unnamed>\")+'\"');return E+=t,t.length||1}var v=y(e);if(!v)throw new Error('Unknown language: \"'+e+'\"');l(v);var w,N=i||v,x={},C=\"\";for(w=N;w!==v;w=w.parent)w.cN&&(C=p(w.cN,\"\",!0)+C);var E=\"\",M=0;try{for(var L,R,A=0;;){if(N.t.lastIndex=A,L=N.t.exec(r),!L)break;R=h(r.substring(A,L.index),L[0]),A=L.index+R}for(h(r.substr(A)),w=N;w.parent;w=w.parent)w.cN&&(C+=B);return{r:M,value:C,language:e,top:N}}catch($){if($.message&&-1!==$.message.indexOf(\"Illegal\"))return{r:0,value:t(r)};throw $}}function d(e,r){r=r||S.languages||N(k);var a={r:0,value:t(e)},n=a;return r.filter(y).forEach(function(t){var r=u(t,e,!1);r.language=t,r.r>n.r&&(n=r),r.r>a.r&&(n=a,a=r)}),n.language&&(a.second_best=n),a}function b(e){return S.tabReplace||S.useBR?e.replace(M,function(e,t){return S.useBR&&\"\\n\"===e?\"<br>\":S.tabReplace?t.replace(/\\t/g,S.tabReplace):void 0}):e}function p(e,t,r){var a=t?x[t]:r,n=[e.trim()];return e.match(/\\bhljs\\b/)||n.push(\"hljs\"),-1===e.indexOf(a)&&n.push(a),n.join(\" \").trim()}function m(e){var t,r,a,s,l,m=i(e);n(m)||(S.useBR?(t=document.createElementNS(\"http://www.w3.org/1999/xhtml\",\"div\"),t.innerHTML=e.innerHTML.replace(/\\n/g,\"\").replace(/<br[ \\/]*>/g,\"\\n\")):t=e,l=t.textContent,a=m?u(m,l,!0):d(l),r=c(t),r.length&&(s=document.createElementNS(\"http://www.w3.org/1999/xhtml\",\"div\"),s.innerHTML=a.value,a.value=o(r,c(s),l)),a.value=b(a.value),e.innerHTML=a.value,e.className=p(e.className,m,a.language),e.result={language:a.language,re:a.r},a.second_best&&(e.second_best={language:a.second_best.language,re:a.second_best.r}))}function f(e){S=s(S,e)}function g(){if(!g.called){g.called=!0;var e=document.querySelectorAll(\"pre code\");w.forEach.call(e,m)}}function _(){addEventListener(\"DOMContentLoaded\",g,!1),addEventListener(\"load\",g,!1)}function h(t,r){var a=k[t]=r(e);a.aliases&&a.aliases.forEach(function(e){x[e]=t})}function v(){return N(k)}function y(e){return e=(e||\"\").toLowerCase(),k[e]||k[x[e]]}var w=[],N=Object.keys,k={},x={},C=/^(no-?highlight|plain|text)$/i,E=/\\blang(?:uage)?-([\\w-]+)\\b/i,M=/((^(<[^>]+>|\\t|)+|(?:\\n)))/gm,B=\"</span>\",S={classPrefix:\"hljs-\",tabReplace:null,useBR:!1,languages:void 0},L={\"&\":\"&amp;\",\"<\":\"&lt;\",\">\":\"&gt;\"};return e.highlight=u,e.highlightAuto=d,e.fixMarkup=b,e.highlightBlock=m,e.configure=f,e.initHighlighting=g,e.initHighlightingOnLoad=_,e.registerLanguage=h,e.listLanguages=v,e.getLanguage=y,e.inherit=s,e.IR=\"[a-zA-Z]\\\\w*\",e.UIR=\"[a-zA-Z_]\\\\w*\",e.NR=\"\\\\b\\\\d+(\\\\.\\\\d+)?\",e.CNR=\"(-?)(\\\\b0[xX][a-fA-F0-9]+|(\\\\b\\\\d+(\\\\.\\\\d*)?|\\\\.\\\\d+)([eE][-+]?\\\\d+)?)\",e.BNR=\"\\\\b(0b[01]+)\",e.RSR=\"!|!=|!==|%|%=|&|&&|&=|\\\\*|\\\\*=|\\\\+|\\\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\\\?|\\\\[|\\\\{|\\\\(|\\\\^|\\\\^=|\\\\||\\\\|=|\\\\|\\\\||~\",e.BE={b:\"\\\\\\\\[\\\\s\\\\S]\",r:0},e.ASM={cN:\"string\",b:\"'\",e:\"'\",i:\"\\\\n\",c:[e.BE]},e.QSM={cN:\"string\",b:'\"',e:'\"',i:\"\\\\n\",c:[e.BE]},e.PWM={b:/\\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|like)\\b/},e.C=function(t,r,a){var n=e.inherit({cN:\"comment\",b:t,e:r,c:[]},a||{});return n.c.push(e.PWM),n.c.push({cN:\"doctag\",b:\"(?:TODO|FIXME|NOTE|BUG|XXX):\",r:0}),n},e.CLCM=e.C(\"//\",\"$\"),e.CBCM=e.C(\"/\\\\*\",\"\\\\*/\"),e.HCM=e.C(\"#\",\"$\"),e.NM={cN:\"number\",b:e.NR,r:0},e.CNM={cN:\"number\",b:e.CNR,r:0},e.BNM={cN:\"number\",b:e.BNR,r:0},e.CSSNM={cN:\"number\",b:e.NR+\"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?\",r:0},e.RM={cN:\"regexp\",b:/\\//,e:/\\/[gimuy]*/,i:/\\n/,c:[e.BE,{b:/\\[/,e:/\\]/,r:0,c:[e.BE]}]},e.TM={cN:\"title\",b:e.IR,r:0},e.UTM={cN:\"title\",b:e.UIR,r:0},e.METHOD_GUARD={b:\"\\\\.\\\\s*\"+e.UIR,r:0},e.registerLanguage(\"apache\",function(e){var t={cN:\"number\",b:\"[\\\\$%]\\\\d+\"};return{aliases:[\"apacheconf\"],cI:!0,c:[e.HCM,{cN:\"section\",b:\"</?\",e:\">\"},{cN:\"attribute\",b:/\\w+/,r:0,k:{nomarkup:\"order deny allow setenv rewriterule rewriteengine rewritecond documentroot sethandler errordocument loadmodule options header listen serverroot servername\"},starts:{e:/$/,r:0,k:{literal:\"on off all\"},c:[{cN:\"meta\",b:\"\\\\s\\\\[\",e:\"\\\\]$\"},{cN:\"variable\",b:\"[\\\\$%]\\\\{\",e:\"\\\\}\",c:[\"self\",t]},t,e.QSM]}}],i:/\\S/}}),e.registerLanguage(\"bash\",function(e){var t={cN:\"variable\",v:[{b:/\\$[\\w\\d#@][\\w\\d_]*/},{b:/\\$\\{(.*?)}/}]},r={cN:\"string\",b:/\"/,e:/\"/,c:[e.BE,t,{cN:\"variable\",b:/\\$\\(/,e:/\\)/,c:[e.BE]}]},a={cN:\"string\",b:/'/,e:/'/};return{aliases:[\"sh\",\"zsh\"],l:/-?[a-z\\._]+/,k:{keyword:\"if then else elif fi for while in do done case esac function\",literal:\"true false\",built_in:\"break cd continue eval exec exit export getopts hash pwd readonly return shift test times trap umask unset alias bind builtin caller command declare echo enable help let local logout mapfile printf read readarray source type typeset ulimit unalias set shopt autoload bg bindkey bye cap chdir clone comparguments compcall compctl compdescribe compfiles compgroups compquote comptags comptry compvalues dirs disable disown echotc echoti emulate fc fg float functions getcap getln history integer jobs kill limit log noglob popd print pushd pushln rehash sched setcap setopt stat suspend ttyctl unfunction unhash unlimit unsetopt vared wait whence where which zcompile zformat zftp zle zmodload zparseopts zprof zpty zregexparse zsocket zstyle ztcp\",_:\"-ne -eq -lt -gt -f -d -e -s -l -a\"},c:[{cN:\"meta\",b:/^#![^\\n]+sh\\s*$/,r:10},{cN:\"function\",b:/\\w[\\w\\d_]*\\s*\\(\\s*\\)\\s*\\{/,rB:!0,c:[e.inherit(e.TM,{b:/\\w[\\w\\d_]*/})],r:0},e.HCM,r,a,t]}}),e.registerLanguage(\"coffeescript\",function(e){var t={keyword:\"in if for while finally new do return else break catch instanceof throw try this switch continue typeof delete debugger super yield import export from as default await then unless until loop of by when and or is isnt not\",literal:\"true false null undefined yes no on off\",built_in:\"npm require console print module global window document\"},r=\"[A-Za-z$_][0-9A-Za-z$_]*\",a={cN:\"subst\",b:/#\\{/,e:/}/,k:t},n=[e.BNM,e.inherit(e.CNM,{starts:{e:\"(\\\\s*/)?\",r:0}}),{cN:\"string\",v:[{b:/'''/,e:/'''/,c:[e.BE]},{b:/'/,e:/'/,c:[e.BE]},{b:/\"\"\"/,e:/\"\"\"/,c:[e.BE,a]},{b:/\"/,e:/\"/,c:[e.BE,a]}]},{cN:\"regexp\",v:[{b:\"///\",e:\"///\",c:[a,e.HCM]},{b:\"//[gim]*\",r:0},{b:/\\/(?![ *])(\\\\\\/|.)*?\\/[gim]*(?=\\W|$)/}]},{b:\"@\"+r},{sL:\"javascript\",eB:!0,eE:!0,v:[{b:\"```\",e:\"```\"},{b:\"`\",e:\"`\"}]}];a.c=n;var i=e.inherit(e.TM,{b:r}),s=\"(\\\\(.*\\\\))?\\\\s*\\\\B[-=]>\",c={cN:\"params\",b:\"\\\\([^\\\\(]\",rB:!0,c:[{b:/\\(/,e:/\\)/,k:t,c:[\"self\"].concat(n)}]};return{aliases:[\"coffee\",\"cson\",\"iced\"],k:t,i:/\\/\\*/,c:n.concat([e.C(\"###\",\"###\"),e.HCM,{cN:\"function\",b:\"^\\\\s*\"+r+\"\\\\s*=\\\\s*\"+s,e:\"[-=]>\",rB:!0,c:[i,c]},{b:/[:\\(,=]\\s*/,r:0,c:[{cN:\"function\",b:s,e:\"[-=]>\",rB:!0,c:[c]}]},{cN:\"class\",bK:\"class\",e:\"$\",i:/[:=\"\\[\\]]/,c:[{bK:\"extends\",eW:!0,i:/[:=\"\\[\\]]/,c:[i]},i]},{b:r+\":\",e:\":\",rB:!0,rE:!0,r:0}])}}),e.registerLanguage(\"cpp\",function(e){var t={cN:\"keyword\",b:\"\\\\b[a-z\\\\d_]*_t\\\\b\"},r={cN:\"string\",v:[{b:'(u8?|U)?L?\"',e:'\"',i:\"\\\\n\",c:[e.BE]},{b:'(u8?|U)?R\"',e:'\"',c:[e.BE]},{b:\"'\\\\\\\\?.\",e:\"'\",i:\".\"}]},a={cN:\"number\",v:[{b:\"\\\\b(0b[01']+)\"},{b:\"\\\\b([\\\\d']+(\\\\.[\\\\d']*)?|\\\\.[\\\\d']+)(u|U|l|L|ul|UL|f|F|b|B)\"},{b:\"(-?)(\\\\b0[xX][a-fA-F0-9']+|(\\\\b[\\\\d']+(\\\\.[\\\\d']*)?|\\\\.[\\\\d']+)([eE][-+]?[\\\\d']+)?)\"}],r:0},n={cN:\"meta\",b:/#\\s*[a-z]+\\b/,e:/$/,k:{\"meta-keyword\":\"if else elif endif define undef warning error line pragma ifdef ifndef include\"},c:[{b:/\\\\\\n/,r:0},e.inherit(r,{cN:\"meta-string\"}),{cN:\"meta-string\",b:\"<\",e:\">\",i:\"\\\\n\"},e.CLCM,e.CBCM]},i=e.IR+\"\\\\s*\\\\(\",s={keyword:\"int float while private char catch import module export virtual operator sizeof dynamic_cast|10 typedef const_cast|10 const struct for static_cast|10 union namespace unsigned long volatile static protected bool template mutable if public friend do goto auto void enum else break extern using class asm case typeid short reinterpret_cast|10 default double register explicit signed typename try this switch continue inline delete alignof constexpr decltype noexcept static_assert thread_local restrict _Bool complex _Complex _Imaginary atomic_bool atomic_char atomic_schar atomic_uchar atomic_short atomic_ushort atomic_int atomic_uint atomic_long atomic_ulong atomic_llong atomic_ullong new throw return\",built_in:\"std string cin cout cerr clog stdin stdout stderr stringstream istringstream ostringstream auto_ptr deque list queue stack vector map set bitset multiset multimap unordered_set unordered_map unordered_multiset unordered_multimap array shared_ptr abort abs acos asin atan2 atan calloc ceil cosh cos exit exp fabs floor fmod fprintf fputs free frexp fscanf isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper isxdigit tolower toupper labs ldexp log10 log malloc realloc memchr memcmp memcpy memset modf pow printf putchar puts scanf sinh sin snprintf sprintf sqrt sscanf strcat strchr strcmp strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr tanh tan vfprintf vprintf vsprintf endl initializer_list unique_ptr\",literal:\"true false nullptr NULL\"},c=[t,e.CLCM,e.CBCM,a,r];return{aliases:[\"c\",\"cc\",\"h\",\"c++\",\"h++\",\"hpp\"],k:s,i:\"</\",c:c.concat([n,{b:\"\\\\b(deque|list|queue|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array)\\\\s*<\",e:\">\",k:s,c:[\"self\",t]},{b:e.IR+\"::\",k:s},{v:[{b:/=/,e:/;/},{b:/\\(/,e:/\\)/},{bK:\"new throw return else\",e:/;/}],k:s,c:c.concat([{b:/\\(/,e:/\\)/,k:s,c:c.concat([\"self\"]),r:0}]),r:0},{cN:\"function\",b:\"(\"+e.IR+\"[\\\\*&\\\\s]+)+\"+i,rB:!0,e:/[{;=]/,eE:!0,k:s,i:/[^\\w\\s\\*&]/,c:[{b:i,rB:!0,c:[e.TM],r:0},{cN:\"params\",b:/\\(/,e:/\\)/,k:s,r:0,c:[e.CLCM,e.CBCM,r,a,t]},e.CLCM,e.CBCM,n]}]),exports:{preprocessor:n,strings:r,k:s}}}),e.registerLanguage(\"cs\",function(e){var t={keyword:\"abstract as base bool break byte case catch char checked const continue decimal default delegate do double else enum event explicit extern finally fixed float for foreach goto if implicit in int interface internal is lock long object operator out override params private protected public readonly ref sbyte sealed short sizeof stackalloc static string struct switch this try typeof uint ulong unchecked unsafe ushort using virtual void volatile while nameof add alias ascending async await by descending dynamic equals from get global group into join let on orderby partial remove select set value var where yield\",literal:\"null false true\"},r={cN:\"string\",b:'@\"',e:'\"',c:[{b:'\"\"'}]},a=e.inherit(r,{i:/\\n/}),n={cN:\"subst\",b:\"{\",e:\"}\",k:t},i=e.inherit(n,{i:/\\n/}),s={cN:\"string\",b:/\\$\"/,e:'\"',i:/\\n/,c:[{b:\"{{\"},{b:\"}}\"},e.BE,i]},c={cN:\"string\",b:/\\$@\"/,e:'\"',c:[{b:\"{{\"},{b:\"}}\"},{b:'\"\"'},n]},o=e.inherit(c,{i:/\\n/,c:[{b:\"{{\"},{b:\"}}\"},{b:'\"\"'},i]});n.c=[c,s,r,e.ASM,e.QSM,e.CNM,e.CBCM],i.c=[o,s,a,e.ASM,e.QSM,e.CNM,e.inherit(e.CBCM,{i:/\\n/})];var l={v:[c,s,r,e.ASM,e.QSM]},u=e.IR+\"(<\"+e.IR+\"(\\\\s*,\\\\s*\"+e.IR+\")*>)?(\\\\[\\\\])?\";return{aliases:[\"csharp\"],k:t,i:/::/,c:[e.C(\"///\",\"$\",{rB:!0,c:[{cN:\"doctag\",v:[{b:\"///\",r:0},{b:\"<!--|-->\"},{b:\"</?\",e:\">\"}]}]}),e.CLCM,e.CBCM,{cN:\"meta\",b:\"#\",e:\"$\",k:{\"meta-keyword\":\"if else elif endif define undef warning error line region endregion pragma checksum\"}},l,e.CNM,{bK:\"class interface\",e:/[{;=]/,i:/[^\\s:]/,c:[e.TM,e.CLCM,e.CBCM]},{bK:\"namespace\",e:/[{;=]/,i:/[^\\s:]/,c:[e.inherit(e.TM,{b:\"[a-zA-Z](\\\\.?\\\\w)*\"}),e.CLCM,e.CBCM]},{bK:\"new return throw await\",r:0},{cN:\"function\",b:\"(\"+u+\"\\\\s+)+\"+e.IR+\"\\\\s*\\\\(\",rB:!0,e:/[{;=]/,eE:!0,k:t,c:[{b:e.IR+\"\\\\s*\\\\(\",rB:!0,c:[e.TM],r:0},{cN:\"params\",b:/\\(/,e:/\\)/,eB:!0,eE:!0,k:t,r:0,c:[l,e.CNM,e.CBCM]},e.CLCM,e.CBCM]}]}}),e.registerLanguage(\"css\",function(e){var t=\"[a-zA-Z-][a-zA-Z0-9_-]*\",r={b:/[A-Z\\_\\.\\-]+\\s*:/,rB:!0,e:\";\",eW:!0,c:[{cN:\"attribute\",b:/\\S/,e:\":\",eE:!0,starts:{eW:!0,eE:!0,c:[{b:/[\\w-]+\\(/,rB:!0,c:[{cN:\"built_in\",b:/[\\w-]+/},{b:/\\(/,e:/\\)/,c:[e.ASM,e.QSM]}]},e.CSSNM,e.QSM,e.ASM,e.CBCM,{cN:\"number\",b:\"#[0-9A-Fa-f]+\"},{cN:\"meta\",b:\"!important\"}]}}]};return{cI:!0,i:/[=\\/|'\\$]/,c:[e.CBCM,{cN:\"selector-id\",b:/#[A-Za-z0-9_-]+/},{cN:\"selector-class\",b:/\\.[A-Za-z0-9_-]+/},{cN:\"selector-attr\",b:/\\[/,e:/\\]/,i:\"$\"},{cN:\"selector-pseudo\",b:/:(:)?[a-zA-Z0-9\\_\\-\\+\\(\\)\"'.]+/},{b:\"@(font-face|page)\",l:\"[a-z-]+\",k:\"font-face page\"},{b:\"@\",e:\"[{;]\",i:/:/,c:[{cN:\"keyword\",b:/\\w+/},{b:/\\s/,eW:!0,eE:!0,r:0,c:[e.ASM,e.QSM,e.CSSNM]}]},{cN:\"selector-tag\",b:t,r:0},{b:\"{\",e:\"}\",i:/\\S/,c:[e.CBCM,r]}]}}),e.registerLanguage(\"diff\",function(e){return{aliases:[\"patch\"],c:[{cN:\"meta\",r:10,v:[{b:/^@@ +\\-\\d+,\\d+ +\\+\\d+,\\d+ +@@$/},{b:/^\\*\\*\\* +\\d+,\\d+ +\\*\\*\\*\\*$/},{b:/^\\-\\-\\- +\\d+,\\d+ +\\-\\-\\-\\-$/}]},{cN:\"comment\",v:[{b:/Index: /,e:/$/},{b:/={3,}/,e:/$/},{b:/^\\-{3}/,e:/$/},{b:/^\\*{3} /,e:/$/},{b:/^\\+{3}/,e:/$/},{b:/\\*{5}/,e:/\\*{5}$/}]},{cN:\"addition\",b:\"^\\\\+\",e:\"$\"},{cN:\"deletion\",b:\"^\\\\-\",e:\"$\"},{cN:\"addition\",b:\"^\\\\!\",e:\"$\"}]}}),e.registerLanguage(\"http\",function(e){var t=\"HTTP/[0-9\\\\.]+\";return{aliases:[\"https\"],i:\"\\\\S\",c:[{b:\"^\"+t,e:\"$\",c:[{cN:\"number\",b:\"\\\\b\\\\d{3}\\\\b\"}]},{b:\"^[A-Z]+ (.*?) \"+t+\"$\",rB:!0,e:\"$\",c:[{cN:\"string\",b:\" \",e:\" \",eB:!0,eE:!0},{b:t},{cN:\"keyword\",b:\"[A-Z]+\"}]},{cN:\"attribute\",b:\"^\\\\w\",e:\": \",eE:!0,i:\"\\\\n|\\\\s|=\",starts:{e:\"$\",r:0}},{b:\"\\\\n\\\\n\",starts:{sL:[],eW:!0}}]}}),e.registerLanguage(\"ini\",function(e){var t={cN:\"string\",c:[e.BE],v:[{b:\"'''\",e:\"'''\",r:10},{b:'\"\"\"',e:'\"\"\"',r:10},{b:'\"',e:'\"'},{b:\"'\",e:\"'\"}]};return{aliases:[\"toml\"],cI:!0,i:/\\S/,c:[e.C(\";\",\"$\"),e.HCM,{cN:\"section\",b:/^\\s*\\[+/,e:/\\]+/},{b:/^[a-z0-9\\[\\]_-]+\\s*=\\s*/,e:\"$\",rB:!0,c:[{cN:\"attr\",b:/[a-z0-9\\[\\]_-]+/},{b:/=/,eW:!0,r:0,c:[{cN:\"literal\",b:/\\bon|off|true|false|yes|no\\b/},{cN:\"variable\",v:[{b:/\\$[\\w\\d\"][\\w\\d_]*/},{b:/\\$\\{(.*?)}/}]},t,{cN:\"number\",b:/([\\+\\-]+)?[\\d]+_[\\d_]+/},e.NM]}]}]}}),e.registerLanguage(\"java\",function(e){var t=\"[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*\",r=t+\"(<\"+t+\"(\\\\s*,\\\\s*\"+t+\")*>)?\",a=\"false synchronized int abstract float private char boolean static null if const for true while long strictfp finally protected import native final void enum else break transient catch instanceof byte super volatile case assert short package default double public try this switch continue throws protected public private module requires exports do\",n=\"\\\\b(0[bB]([01]+[01_]+[01]+|[01]+)|0[xX]([a-fA-F0-9]+[a-fA-F0-9_]+[a-fA-F0-9]+|[a-fA-F0-9]+)|(([\\\\d]+[\\\\d_]+[\\\\d]+|[\\\\d]+)(\\\\.([\\\\d]+[\\\\d_]+[\\\\d]+|[\\\\d]+))?|\\\\.([\\\\d]+[\\\\d_]+[\\\\d]+|[\\\\d]+))([eE][-+]?\\\\d+)?)[lLfF]?\",i={cN:\"number\",b:n,r:0};return{aliases:[\"jsp\"],k:a,i:/<\\/|#/,c:[e.C(\"/\\\\*\\\\*\",\"\\\\*/\",{r:0,c:[{b:/\\w+@/,r:0},{cN:\"doctag\",b:\"@[A-Za-z]+\"}]}),e.CLCM,e.CBCM,e.ASM,e.QSM,{cN:\"class\",bK:\"class interface\",e:/[{;=]/,eE:!0,k:\"class interface\",i:/[:\"\\[\\]]/,c:[{bK:\"extends implements\"},e.UTM]},{bK:\"new throw return else\",r:0},{cN:\"function\",b:\"(\"+r+\"\\\\s+)+\"+e.UIR+\"\\\\s*\\\\(\",rB:!0,e:/[{;=]/,eE:!0,k:a,c:[{b:e.UIR+\"\\\\s*\\\\(\",rB:!0,r:0,c:[e.UTM]},{cN:\"params\",b:/\\(/,e:/\\)/,k:a,r:0,c:[e.ASM,e.QSM,e.CNM,e.CBCM]},e.CLCM,e.CBCM]},i,{cN:\"meta\",b:\"@[A-Za-z]+\"}]}}),e.registerLanguage(\"javascript\",function(e){var t=\"[A-Za-z$_][0-9A-Za-z$_]*\",r={keyword:\"in of if for while finally var new function do return void else break catch instanceof with throw case default try this switch continue typeof delete let yield const export super debugger as async await static import from as\",literal:\"true false null undefined NaN Infinity\",built_in:\"eval isFinite isNaN parseFloat parseInt decodeURI decodeURIComponent encodeURI encodeURIComponent escape unescape Object Function Boolean Error EvalError InternalError RangeError ReferenceError StopIteration SyntaxError TypeError URIError Number Math Date String RegExp Array Float32Array Float64Array Int16Array Int32Array Int8Array Uint16Array Uint32Array Uint8Array Uint8ClampedArray ArrayBuffer DataView JSON Intl arguments require module console window document Symbol Set Map WeakSet WeakMap Proxy Reflect Promise\"},a={cN:\"number\",v:[{b:\"\\\\b(0[bB][01]+)\"},{b:\"\\\\b(0[oO][0-7]+)\"},{b:e.CNR}],r:0},n={cN:\"subst\",b:\"\\\\$\\\\{\",e:\"\\\\}\",k:r,c:[]},i={cN:\"string\",b:\"`\",e:\"`\",c:[e.BE,n]};n.c=[e.ASM,e.QSM,i,a,e.RM];var s=n.c.concat([e.CBCM,e.CLCM]);return{aliases:[\"js\",\"jsx\"],k:r,c:[{cN:\"meta\",r:10,b:/^\\s*['\"]use (strict|asm)['\"]/},{cN:\"meta\",b:/^#!/,e:/$/},e.ASM,e.QSM,i,e.CLCM,e.CBCM,a,{b:/[{,]\\s*/,r:0,c:[{b:t+\"\\\\s*:\",rB:!0,r:0,c:[{cN:\"attr\",b:t,r:0}]}]},{b:\"(\"+e.RSR+\"|\\\\b(case|return|throw)\\\\b)\\\\s*\",k:\"return throw case\",c:[e.CLCM,e.CBCM,e.RM,{cN:\"function\",b:\"(\\\\(.*?\\\\)|\"+t+\")\\\\s*=>\",rB:!0,e:\"\\\\s*=>\",c:[{cN:\"params\",v:[{b:t},{b:/\\(\\s*\\)/},{b:/\\(/,e:/\\)/,eB:!0,eE:!0,k:r,c:s}]}]},{b:/</,e:/(\\/\\w+|\\w+\\/)>/,sL:\"xml\",c:[{b:/<\\w+\\s*\\/>/,skip:!0},{b:/<\\w+/,e:/(\\/\\w+|\\w+\\/)>/,skip:!0,c:[{b:/<\\w+\\s*\\/>/,skip:!0},\"self\"]}]}],r:0},{cN:\"function\",bK:\"function\",e:/\\{/,eE:!0,c:[e.inherit(e.TM,{b:t}),{cN:\"params\",b:/\\(/,e:/\\)/,eB:!0,eE:!0,c:s}],i:/\\[|%/},{b:/\\$[(.]/},e.METHOD_GUARD,{cN:\"class\",bK:\"class\",e:/[{;=]/,eE:!0,i:/[:\"\\[\\]]/,c:[{bK:\"extends\"},e.UTM]},{bK:\"constructor\",e:/\\{/,eE:!0}],i:/#(?!!)/}}),e.registerLanguage(\"json\",function(e){var t={literal:\"true false null\"},r=[e.QSM,e.CNM],a={e:\",\",eW:!0,eE:!0,c:r,k:t},n={b:\"{\",e:\"}\",c:[{cN:\"attr\",b:/\"/,e:/\"/,c:[e.BE],i:\"\\\\n\"},e.inherit(a,{b:/:/})],i:\"\\\\S\"},i={b:\"\\\\[\",e:\"\\\\]\",c:[e.inherit(a)],i:\"\\\\S\"};return r.splice(r.length,0,n,i),{c:r,k:t,i:\"\\\\S\"}}),e.registerLanguage(\"makefile\",function(e){var t={cN:\"variable\",b:/\\$\\(/,e:/\\)/,c:[e.BE]};return{aliases:[\"mk\",\"mak\"],c:[e.HCM,{b:/^\\w+\\s*\\W*=/,rB:!0,r:0,starts:{e:/\\s*\\W*=/,eE:!0,starts:{e:/$/,r:0,c:[t]}}},{cN:\"section\",b:/^[\\w]+:\\s*$/},{cN:\"meta\",b:/^\\.PHONY:/,e:/$/,k:{\"meta-keyword\":\".PHONY\"},l:/[\\.\\w]+/},{b:/^\\t+/,e:/$/,r:0,c:[e.QSM,t]}]}}),e.registerLanguage(\"xml\",function(e){var t=\"[A-Za-z0-9\\\\._:-]+\",r={eW:!0,i:/</,r:0,c:[{cN:\"attr\",b:t,r:0},{b:/=\\s*/,r:0,c:[{cN:\"string\",endsParent:!0,v:[{b:/\"/,e:/\"/},{b:/'/,e:/'/},{b:/[^\\s\"'=<>`]+/}]}]}]};return{aliases:[\"html\",\"xhtml\",\"rss\",\"atom\",\"xjb\",\"xsd\",\"xsl\",\"plist\"],cI:!0,c:[{cN:\"meta\",b:\"<!DOCTYPE\",e:\">\",r:10,c:[{b:\"\\\\[\",e:\"\\\\]\"}]},e.C(\"<!--\",\"-->\",{r:10}),{b:\"<\\\\!\\\\[CDATA\\\\[\",e:\"\\\\]\\\\]>\",r:10},{b:/<\\?(php)?/,e:/\\?>/,sL:\"php\",c:[{b:\"/\\\\*\",e:\"\\\\*/\",skip:!0}]},{cN:\"tag\",b:\"<style(?=\\\\s|>|$)\",e:\">\",k:{name:\"style\"},c:[r],starts:{e:\"</style>\",rE:!0,sL:[\"css\",\"xml\"]}},{cN:\"tag\",b:\"<script(?=\\\\s|>|$)\",e:\">\",k:{name:\"script\"},c:[r],starts:{e:\"</script>\",rE:!0,sL:[\"actionscript\",\"javascript\",\"handlebars\",\"xml\"]}},{cN:\"meta\",v:[{b:/<\\?xml/,e:/\\?>/,r:10},{b:/<\\?\\w+/,e:/\\?>/}]},{cN:\"tag\",b:\"</?\",e:\"/?>\",c:[{cN:\"name\",b:/[^\\/><\\s]+/,r:0},r]}]}}),e.registerLanguage(\"markdown\",function(e){return{aliases:[\"md\",\"mkdown\",\"mkd\"],c:[{cN:\"section\",v:[{b:\"^#{1,6}\",e:\"$\"},{b:\"^.+?\\\\n[=-]{2,}$\"}]},{b:\"<\",e:\">\",sL:\"xml\",r:0},{cN:\"bullet\",b:\"^([*+-]|(\\\\d+\\\\.))\\\\s+\"},{cN:\"strong\",b:\"[*_]{2}.+?[*_]{2}\"},{cN:\"emphasis\",v:[{b:\"\\\\*.+?\\\\*\"},{b:\"_.+?_\",r:0}]},{cN:\"quote\",b:\"^>\\\\s+\",e:\"$\"},{cN:\"code\",v:[{b:\"^```w*s*$\",e:\"^```s*$\"},{b:\"`.+?`\"},{b:\"^( {4}|\t)\",e:\"$\",r:0}]},{b:\"^[-\\\\*]{3,}\",e:\"$\"},{b:\"\\\\[.+?\\\\][\\\\(\\\\[].*?[\\\\)\\\\]]\",rB:!0,c:[{cN:\"string\",b:\"\\\\[\",e:\"\\\\]\",eB:!0,rE:!0,r:0},{cN:\"link\",b:\"\\\\]\\\\(\",e:\"\\\\)\",eB:!0,eE:!0},{cN:\"symbol\",b:\"\\\\]\\\\[\",e:\"\\\\]\",eB:!0,eE:!0}],r:10},{b:/^\\[[^\\n]+\\]:/,rB:!0,c:[{cN:\"symbol\",b:/\\[/,e:/\\]/,eB:!0,eE:!0},{cN:\"link\",b:/:\\s*/,e:/$/,eB:!0}]}]}}),e.registerLanguage(\"nginx\",function(e){var t={cN:\"variable\",v:[{b:/\\$\\d+/},{b:/\\$\\{/,e:/}/},{b:\"[\\\\$\\\\@]\"+e.UIR}]},r={eW:!0,l:\"[a-z/_]+\",k:{literal:\"on off yes no true false none blocked debug info notice warn error crit select break last permanent redirect kqueue rtsig epoll poll /dev/poll\"},r:0,i:\"=>\",c:[e.HCM,{cN:\"string\",c:[e.BE,t],v:[{b:/\"/,e:/\"/},{b:/'/,e:/'/}]},{b:\"([a-z]+):/\",e:\"\\\\s\",eW:!0,eE:!0,c:[t]},{cN:\"regexp\",c:[e.BE,t],v:[{b:\"\\\\s\\\\^\",e:\"\\\\s|{|;\",rE:!0},{b:\"~\\\\*?\\\\s+\",e:\"\\\\s|{|;\",rE:!0},{b:\"\\\\*(\\\\.[a-z\\\\-]+)+\"},{b:\"([a-z\\\\-]+\\\\.)+\\\\*\"}]},{cN:\"number\",b:\"\\\\b\\\\d{1,3}\\\\.\\\\d{1,3}\\\\.\\\\d{1,3}\\\\.\\\\d{1,3}(:\\\\d{1,5})?\\\\b\"},{cN:\"number\",b:\"\\\\b\\\\d+[kKmMgGdshdwy]*\\\\b\",r:0},t]};return{aliases:[\"nginxconf\"],c:[e.HCM,{b:e.UIR+\"\\\\s+{\",rB:!0,e:\"{\",c:[{cN:\"section\",b:e.UIR}],r:0},{b:e.UIR+\"\\\\s\",e:\";|{\",rB:!0,c:[{cN:\"attribute\",b:e.UIR,starts:r}],r:0}],i:\"[^\\\\s\\\\}]\"}}),e.registerLanguage(\"objectivec\",function(e){var t={cN:\"built_in\",b:\"\\\\b(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)\\\\w+\"},r={keyword:\"int float while char export sizeof typedef const struct for union unsigned long volatile static bool mutable if do return goto void enum else break extern asm case short default double register explicit signed typename this switch continue wchar_t inline readonly assign readwrite self @synchronized id typeof nonatomic super unichar IBOutlet IBAction strong weak copy in out inout bycopy byref oneway __strong __weak __block __autoreleasing @private @protected @public @try @property @end @throw @catch @finally @autoreleasepool @synthesize @dynamic @selector @optional @required @encode @package @import @defs @compatibility_alias __bridge __bridge_transfer __bridge_retained __bridge_retain __covariant __contravariant __kindof _Nonnull _Nullable _Null_unspecified __FUNCTION__ __PRETTY_FUNCTION__ __attribute__ getter setter retain unsafe_unretained nonnull nullable null_unspecified null_resettable class instancetype NS_DESIGNATED_INITIALIZER NS_UNAVAILABLE NS_REQUIRES_SUPER NS_RETURNS_INNER_POINTER NS_INLINE NS_AVAILABLE NS_DEPRECATED NS_ENUM NS_OPTIONS NS_SWIFT_UNAVAILABLE NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_END NS_REFINED_FOR_SWIFT NS_SWIFT_NAME NS_SWIFT_NOTHROW NS_DURING NS_HANDLER NS_ENDHANDLER NS_VALUERETURN NS_VOIDRETURN\",literal:\"false true FALSE TRUE nil YES NO NULL\",built_in:\"BOOL dispatch_once_t dispatch_queue_t dispatch_sync dispatch_async dispatch_once\"},a=/[a-zA-Z@][a-zA-Z0-9_]*/,n=\"@interface @class @protocol @implementation\";return{aliases:[\"mm\",\"objc\",\"obj-c\"],k:r,l:a,i:\"</\",c:[t,e.CLCM,e.CBCM,e.CNM,e.QSM,{cN:\"string\",v:[{b:'@\"',e:'\"',i:\"\\\\n\",c:[e.BE]},{b:\"'\",e:\"[^\\\\\\\\]'\",i:\"[^\\\\\\\\][^']\"}]},{cN:\"meta\",b:\"#\",e:\"$\",c:[{cN:\"meta-string\",v:[{b:'\"',e:'\"'},{b:\"<\",e:\">\"}]}]},{cN:\"class\",b:\"(\"+n.split(\" \").join(\"|\")+\")\\\\b\",e:\"({|$)\",eE:!0,k:n,l:a,c:[e.UTM]},{b:\"\\\\.\"+e.UIR,r:0}]}}),e.registerLanguage(\"perl\",function(e){var t=\"getpwent getservent quotemeta msgrcv scalar kill dbmclose undef lc ma syswrite tr send umask sysopen shmwrite vec qx utime local oct semctl localtime readpipe do return format read sprintf dbmopen pop getpgrp not getpwnam rewinddir qqfileno qw endprotoent wait sethostent bless s|0 opendir continue each sleep endgrent shutdown dump chomp connect getsockname die socketpair close flock exists index shmgetsub for endpwent redo lstat msgctl setpgrp abs exit select print ref gethostbyaddr unshift fcntl syscall goto getnetbyaddr join gmtime symlink semget splice x|0 getpeername recv log setsockopt cos last reverse gethostbyname getgrnam study formline endhostent times chop length gethostent getnetent pack getprotoent getservbyname rand mkdir pos chmod y|0 substr endnetent printf next open msgsnd readdir use unlink getsockopt getpriority rindex wantarray hex system getservbyport endservent int chr untie rmdir prototype tell listen fork shmread ucfirst setprotoent else sysseek link getgrgid shmctl waitpid unpack getnetbyname reset chdir grep split require caller lcfirst until warn while values shift telldir getpwuid my getprotobynumber delete and sort uc defined srand accept package seekdir getprotobyname semop our rename seek if q|0 chroot sysread setpwent no crypt getc chown sqrt write setnetent setpriority foreach tie sin msgget map stat getlogin unless elsif truncate exec keys glob tied closedirioctl socket readlink eval xor readline binmode setservent eof ord bind alarm pipe atan2 getgrent exp time push setgrent gt lt or ne m|0 break given say state when\",r={cN:\"subst\",b:\"[$@]\\\\{\",e:\"\\\\}\",k:t},a={b:\"->{\",e:\"}\"},n={v:[{b:/\\$\\d/},{b:/[\\$%@](\\^\\w\\b|#\\w+(::\\w+)*|{\\w+}|\\w+(::\\w*)*)/},{b:/[\\$%@][^\\s\\w{]/,r:0}]},i=[e.BE,r,n],s=[n,e.HCM,e.C(\"^\\\\=\\\\w\",\"\\\\=cut\",{eW:!0}),a,{cN:\"string\",c:i,v:[{b:\"q[qwxr]?\\\\s*\\\\(\",e:\"\\\\)\",r:5},{b:\"q[qwxr]?\\\\s*\\\\[\",e:\"\\\\]\",r:5},{b:\"q[qwxr]?\\\\s*\\\\{\",e:\"\\\\}\",r:5},{b:\"q[qwxr]?\\\\s*\\\\|\",e:\"\\\\|\",r:5},{b:\"q[qwxr]?\\\\s*\\\\<\",e:\"\\\\>\",r:5},{b:\"qw\\\\s+q\",e:\"q\",r:5},{b:\"'\",e:\"'\",c:[e.BE]},{b:'\"',e:'\"'},{b:\"`\",e:\"`\",c:[e.BE]},{b:\"{\\\\w+}\",c:[],r:0},{b:\"-?\\\\w+\\\\s*\\\\=\\\\>\",c:[],r:0}]},{cN:\"number\",b:\"(\\\\b0[0-7_]+)|(\\\\b0x[0-9a-fA-F_]+)|(\\\\b[1-9][0-9_]*(\\\\.[0-9_]+)?)|[0_]\\\\b\",r:0},{b:\"(\\\\/\\\\/|\"+e.RSR+\"|\\\\b(split|return|print|reverse|grep)\\\\b)\\\\s*\",k:\"split return print reverse grep\",r:0,c:[e.HCM,{cN:\"regexp\",b:\"(s|tr|y)/(\\\\\\\\.|[^/])*/(\\\\\\\\.|[^/])*/[a-z]*\",r:10},{cN:\"regexp\",b:\"(m|qr)?/\",e:\"/[a-z]*\",c:[e.BE],r:0}]},{cN:\"function\",bK:\"sub\",e:\"(\\\\s*\\\\(.*?\\\\))?[;{]\",eE:!0,r:5,c:[e.TM]},{b:\"-\\\\w\\\\b\",r:0},{b:\"^__DATA__$\",e:\"^__END__$\",sL:\"mojolicious\",c:[{b:\"^@@.*\",e:\"$\",cN:\"comment\"}]}];return r.c=s,a.c=s,{aliases:[\"pl\",\"pm\"],l:/[\\w\\.]+/,k:t,c:s}}),e.registerLanguage(\"php\",function(e){var t={b:\"\\\\$+[a-zA-Z_-ÿ][a-zA-Z0-9_-ÿ]*\"},r={cN:\"meta\",b:/<\\?(php)?|\\?>/},a={cN:\"string\",c:[e.BE,r],v:[{b:'b\"',e:'\"'},{b:\"b'\",e:\"'\"},e.inherit(e.ASM,{i:null}),e.inherit(e.QSM,{i:null})]},n={v:[e.BNM,e.CNM]};return{aliases:[\"php3\",\"php4\",\"php5\",\"php6\"],cI:!0,k:\"and include_once list abstract global private echo interface as static endswitch array null if endwhile or const for endforeach self var while isset public protected exit foreach throw elseif include __FILE__ empty require_once do xor return parent clone use __CLASS__ __LINE__ else break print eval new catch __METHOD__ case exception default die require __FUNCTION__ enddeclare final try switch continue endfor endif declare unset true false trait goto instanceof insteadof __DIR__ __NAMESPACE__ yield finally\",c:[e.HCM,e.C(\"//\",\"$\",{c:[r]}),e.C(\"/\\\\*\",\"\\\\*/\",{c:[{cN:\"doctag\",b:\"@[A-Za-z]+\"}]}),e.C(\"__halt_compiler.+?;\",!1,{eW:!0,k:\"__halt_compiler\",l:e.UIR}),{cN:\"string\",b:/<<<['\"]?\\w+['\"]?$/,e:/^\\w+;?$/,c:[e.BE,{cN:\"subst\",v:[{b:/\\$\\w+/},{b:/\\{\\$/,e:/\\}/}]}]},r,{cN:\"keyword\",b:/\\$this\\b/},t,{b:/(::|->)+[a-zA-Z_\\x7f-\\xff][a-zA-Z0-9_\\x7f-\\xff]*/},{cN:\"function\",bK:\"function\",e:/[;{]/,eE:!0,i:\"\\\\$|\\\\[|%\",c:[e.UTM,{cN:\"params\",b:\"\\\\(\",e:\"\\\\)\",c:[\"self\",t,e.CBCM,a,n]}]},{cN:\"class\",bK:\"class interface\",e:\"{\",eE:!0,i:/[:\\(\\$\"]/,c:[{bK:\"extends implements\"},e.UTM]},{bK:\"namespace\",e:\";\",i:/[\\.']/,c:[e.UTM]},{bK:\"use\",e:\";\",c:[e.UTM]},{b:\"=>\"},a,n]}}),e.registerLanguage(\"python\",function(e){var t={cN:\"meta\",b:/^(>>>|\\.\\.\\.) /},r={cN:\"string\",c:[e.BE],v:[{b:/(u|b)?r?'''/,e:/'''/,c:[t],r:10},{b:/(u|b)?r?\"\"\"/,e:/\"\"\"/,c:[t],r:10},{b:/(u|r|ur)'/,e:/'/,r:10},{b:/(u|r|ur)\"/,e:/\"/,r:10},{b:/(b|br)'/,e:/'/},{b:/(b|br)\"/,e:/\"/},e.ASM,e.QSM]},a={cN:\"number\",r:0,v:[{b:e.BNR+\"[lLjJ]?\"},{b:\"\\\\b(0o[0-7]+)[lLjJ]?\"},{b:e.CNR+\"[lLjJ]?\"}]},n={cN:\"params\",b:/\\(/,e:/\\)/,c:[\"self\",t,a,r]};return{aliases:[\"py\",\"gyp\"],k:{keyword:\"and elif is global as in if from raise for except finally print import pass return exec else break not with class assert yield try while continue del or def lambda async await nonlocal|10 None True False\",built_in:\"Ellipsis NotImplemented\"},i:/(<\\/|->|\\?)|=>/,c:[t,a,r,e.HCM,{v:[{cN:\"function\",bK:\"def\"},{cN:\"class\",bK:\"class\"}],e:/:/,i:/[${=;\\n,]/,c:[e.UTM,n,{b:/->/,eW:!0,k:\"None\"}]},{cN:\"meta\",b:/^[\\t ]*@/,e:/$/},{b:/\\b(print|exec)\\(/}]}}),e.registerLanguage(\"ruby\",function(e){var t=\"[a-zA-Z_]\\\\w*[!?=]?|[-+~]\\\\@|<<|>>|=~|===?|<=>|[<>]=?|\\\\*\\\\*|[-/+%^&*~`|]|\\\\[\\\\]=?\",r={keyword:\"and then defined module in return redo if BEGIN retry end for self when next until do begin unless END rescue else break undef not super class case require yield alias while ensure elsif or include attr_reader attr_writer attr_accessor\",literal:\"true false nil\"},a={cN:\"doctag\",b:\"@[A-Za-z]+\"},n={b:\"#<\",e:\">\"},i=[e.C(\"#\",\"$\",{c:[a]}),e.C(\"^\\\\=begin\",\"^\\\\=end\",{c:[a],r:10}),e.C(\"^__END__\",\"\\\\n$\")],s={cN:\"subst\",b:\"#\\\\{\",e:\"}\",k:r},c={cN:\"string\",c:[e.BE,s],v:[{b:/'/,e:/'/},{b:/\"/,e:/\"/},{b:/`/,e:/`/},{b:\"%[qQwWx]?\\\\(\",e:\"\\\\)\"},{b:\"%[qQwWx]?\\\\[\",e:\"\\\\]\"},{b:\"%[qQwWx]?{\",e:\"}\"},{b:\"%[qQwWx]?<\",e:\">\"},{b:\"%[qQwWx]?/\",e:\"/\"},{b:\"%[qQwWx]?%\",e:\"%\"},{b:\"%[qQwWx]?-\",e:\"-\"},{b:\"%[qQwWx]?\\\\|\",e:\"\\\\|\"},{b:/\\B\\?(\\\\\\d{1,3}|\\\\x[A-Fa-f0-9]{1,2}|\\\\u[A-Fa-f0-9]{4}|\\\\?\\S)\\b/},{b:/<<(-?)\\w+$/,e:/^\\s*\\w+$/}]},o={cN:\"params\",b:\"\\\\(\",e:\"\\\\)\",endsParent:!0,k:r},l=[c,n,{cN:\"class\",bK:\"class module\",e:\"$|;\",i:/=/,c:[e.inherit(e.TM,{b:\"[A-Za-z_]\\\\w*(::\\\\w+)*(\\\\?|\\\\!)?\"\n}),{b:\"<\\\\s*\",c:[{b:\"(\"+e.IR+\"::)?\"+e.IR}]}].concat(i)},{cN:\"function\",bK:\"def\",e:\"$|;\",c:[e.inherit(e.TM,{b:t}),o].concat(i)},{b:e.IR+\"::\"},{cN:\"symbol\",b:e.UIR+\"(\\\\!|\\\\?)?:\",r:0},{cN:\"symbol\",b:\":(?!\\\\s)\",c:[c,{b:t}],r:0},{cN:\"number\",b:\"(\\\\b0[0-7_]+)|(\\\\b0x[0-9a-fA-F_]+)|(\\\\b[1-9][0-9_]*(\\\\.[0-9_]+)?)|[0_]\\\\b\",r:0},{b:\"(\\\\$\\\\W)|((\\\\$|\\\\@\\\\@?)(\\\\w+))\"},{cN:\"params\",b:/\\|/,e:/\\|/,k:r},{b:\"(\"+e.RSR+\"|unless)\\\\s*\",c:[n,{cN:\"regexp\",c:[e.BE,s],i:/\\n/,v:[{b:\"/\",e:\"/[a-z]*\"},{b:\"%r{\",e:\"}[a-z]*\"},{b:\"%r\\\\(\",e:\"\\\\)[a-z]*\"},{b:\"%r!\",e:\"![a-z]*\"},{b:\"%r\\\\[\",e:\"\\\\][a-z]*\"}]}].concat(i),r:0}].concat(i);s.c=l,o.c=l;var u=\"[>?]>\",d=\"[\\\\w#]+\\\\(\\\\w+\\\\):\\\\d+:\\\\d+>\",b=\"(\\\\w+-)?\\\\d+\\\\.\\\\d+\\\\.\\\\d(p\\\\d+)?[^>]+>\",p=[{b:/^\\s*=>/,starts:{e:\"$\",c:l}},{cN:\"meta\",b:\"^(\"+u+\"|\"+d+\"|\"+b+\")\",starts:{e:\"$\",c:l}}];return{aliases:[\"rb\",\"gemspec\",\"podspec\",\"thor\",\"irb\"],k:r,i:/\\/\\*/,c:i.concat(p).concat(l)}}),e.registerLanguage(\"sql\",function(e){var t=e.C(\"--\",\"$\");return{cI:!0,i:/[<>{}*#]/,c:[{bK:\"begin end start commit rollback savepoint lock alter create drop rename call delete do handler insert load replace select truncate update set show pragma grant merge describe use explain help declare prepare execute deallocate release unlock purge reset change stop analyze cache flush optimize repair kill install uninstall checksum restore check backup revoke comment\",e:/;/,eW:!0,l:/[\\w\\.]+/,k:{keyword:\"abort abs absolute acc acce accep accept access accessed accessible account acos action activate add addtime admin administer advanced advise aes_decrypt aes_encrypt after agent aggregate ali alia alias allocate allow alter always analyze ancillary and any anydata anydataset anyschema anytype apply archive archived archivelog are as asc ascii asin assembly assertion associate asynchronous at atan atn2 attr attri attrib attribu attribut attribute attributes audit authenticated authentication authid authors auto autoallocate autodblink autoextend automatic availability avg backup badfile basicfile before begin beginning benchmark between bfile bfile_base big bigfile bin binary_double binary_float binlog bit_and bit_count bit_length bit_or bit_xor bitmap blob_base block blocksize body both bound buffer_cache buffer_pool build bulk by byte byteordermark bytes cache caching call calling cancel capacity cascade cascaded case cast catalog category ceil ceiling chain change changed char_base char_length character_length characters characterset charindex charset charsetform charsetid check checksum checksum_agg child choose chr chunk class cleanup clear client clob clob_base clone close cluster_id cluster_probability cluster_set clustering coalesce coercibility col collate collation collect colu colum column column_value columns columns_updated comment commit compact compatibility compiled complete composite_limit compound compress compute concat concat_ws concurrent confirm conn connec connect connect_by_iscycle connect_by_isleaf connect_by_root connect_time connection consider consistent constant constraint constraints constructor container content contents context contributors controlfile conv convert convert_tz corr corr_k corr_s corresponding corruption cos cost count count_big counted covar_pop covar_samp cpu_per_call cpu_per_session crc32 create creation critical cross cube cume_dist curdate current current_date current_time current_timestamp current_user cursor curtime customdatum cycle data database databases datafile datafiles datalength date_add date_cache date_format date_sub dateadd datediff datefromparts datename datepart datetime2fromparts day day_to_second dayname dayofmonth dayofweek dayofyear days db_role_change dbtimezone ddl deallocate declare decode decompose decrement decrypt deduplicate def defa defau defaul default defaults deferred defi defin define degrees delayed delegate delete delete_all delimited demand dense_rank depth dequeue des_decrypt des_encrypt des_key_file desc descr descri describ describe descriptor deterministic diagnostics difference dimension direct_load directory disable disable_all disallow disassociate discardfile disconnect diskgroup distinct distinctrow distribute distributed div do document domain dotnet double downgrade drop dumpfile duplicate duration each edition editionable editions element ellipsis else elsif elt empty enable enable_all enclosed encode encoding encrypt end end-exec endian enforced engine engines enqueue enterprise entityescaping eomonth error errors escaped evalname evaluate event eventdata events except exception exceptions exchange exclude excluding execu execut execute exempt exists exit exp expire explain export export_set extended extent external external_1 external_2 externally extract failed failed_login_attempts failover failure far fast feature_set feature_value fetch field fields file file_name_convert filesystem_like_logging final finish first first_value fixed flash_cache flashback floor flush following follows for forall force form forma format found found_rows freelist freelists freepools fresh from from_base64 from_days ftp full function general generated get get_format get_lock getdate getutcdate global global_name globally go goto grant grants greatest group group_concat group_id grouping grouping_id groups gtid_subtract guarantee guard handler hash hashkeys having hea head headi headin heading heap help hex hierarchy high high_priority hosts hour http id ident_current ident_incr ident_seed identified identity idle_time if ifnull ignore iif ilike ilm immediate import in include including increment index indexes indexing indextype indicator indices inet6_aton inet6_ntoa inet_aton inet_ntoa infile initial initialized initially initrans inmemory inner innodb input insert install instance instantiable instr interface interleaved intersect into invalidate invisible is is_free_lock is_ipv4 is_ipv4_compat is_not is_not_null is_used_lock isdate isnull isolation iterate java join json json_exists keep keep_duplicates key keys kill language large last last_day last_insert_id last_value lax lcase lead leading least leaves left len lenght length less level levels library like like2 like4 likec limit lines link list listagg little ln load load_file lob lobs local localtime localtimestamp locate locator lock locked log log10 log2 logfile logfiles logging logical logical_reads_per_call logoff logon logs long loop low low_priority lower lpad lrtrim ltrim main make_set makedate maketime managed management manual map mapping mask master master_pos_wait match matched materialized max maxextents maximize maxinstances maxlen maxlogfiles maxloghistory maxlogmembers maxsize maxtrans md5 measures median medium member memcompress memory merge microsecond mid migration min minextents minimum mining minus minute minvalue missing mod mode model modification modify module monitoring month months mount move movement multiset mutex name name_const names nan national native natural nav nchar nclob nested never new newline next nextval no no_write_to_binlog noarchivelog noaudit nobadfile nocheck nocompress nocopy nocycle nodelay nodiscardfile noentityescaping noguarantee nokeep nologfile nomapping nomaxvalue nominimize nominvalue nomonitoring none noneditionable nonschema noorder nopr nopro noprom nopromp noprompt norely noresetlogs noreverse normal norowdependencies noschemacheck noswitch not nothing notice notrim novalidate now nowait nth_value nullif nulls num numb numbe nvarchar nvarchar2 object ocicoll ocidate ocidatetime ociduration ociinterval ociloblocator ocinumber ociref ocirefcursor ocirowid ocistring ocitype oct octet_length of off offline offset oid oidindex old on online only opaque open operations operator optimal optimize option optionally or oracle oracle_date oradata ord ordaudio orddicom orddoc order ordimage ordinality ordvideo organization orlany orlvary out outer outfile outline output over overflow overriding package pad parallel parallel_enable parameters parent parse partial partition partitions pascal passing password password_grace_time password_lock_time password_reuse_max password_reuse_time password_verify_function patch path patindex pctincrease pctthreshold pctused pctversion percent percent_rank percentile_cont percentile_disc performance period period_add period_diff permanent physical pi pipe pipelined pivot pluggable plugin policy position post_transaction pow power pragma prebuilt precedes preceding precision prediction prediction_cost prediction_details prediction_probability prediction_set prepare present preserve prior priority private private_sga privileges procedural procedure procedure_analyze processlist profiles project prompt protection public publishingservername purge quarter query quick quiesce quota quotename radians raise rand range rank raw read reads readsize rebuild record records recover recovery recursive recycle redo reduced ref reference referenced references referencing refresh regexp_like register regr_avgx regr_avgy regr_count regr_intercept regr_r2 regr_slope regr_sxx regr_sxy reject rekey relational relative relaylog release release_lock relies_on relocate rely rem remainder rename repair repeat replace replicate replication required reset resetlogs resize resource respect restore restricted result result_cache resumable resume retention return returning returns reuse reverse revoke right rlike role roles rollback rolling rollup round row row_count rowdependencies rowid rownum rows rtrim rules safe salt sample save savepoint sb1 sb2 sb4 scan schema schemacheck scn scope scroll sdo_georaster sdo_topo_geometry search sec_to_time second section securefile security seed segment select self sequence sequential serializable server servererror session session_user sessions_per_user set sets settings sha sha1 sha2 share shared shared_pool short show shrink shutdown si_averagecolor si_colorhistogram si_featurelist si_positionalcolor si_stillimage si_texture siblings sid sign sin size size_t sizes skip slave sleep smalldatetimefromparts smallfile snapshot some soname sort soundex source space sparse spfile split sql sql_big_result sql_buffer_result sql_cache sql_calc_found_rows sql_small_result sql_variant_property sqlcode sqldata sqlerror sqlname sqlstate sqrt square standalone standby start starting startup statement static statistics stats_binomial_test stats_crosstab stats_ks_test stats_mode stats_mw_test stats_one_way_anova stats_t_test_ stats_t_test_indep stats_t_test_one stats_t_test_paired stats_wsr_test status std stddev stddev_pop stddev_samp stdev stop storage store stored str str_to_date straight_join strcmp strict string struct stuff style subdate subpartition subpartitions substitutable substr substring subtime subtring_index subtype success sum suspend switch switchoffset switchover sync synchronous synonym sys sys_xmlagg sysasm sysaux sysdate sysdatetimeoffset sysdba sysoper system system_user sysutcdatetime table tables tablespace tan tdo template temporary terminated tertiary_weights test than then thread through tier ties time time_format time_zone timediff timefromparts timeout timestamp timestampadd timestampdiff timezone_abbr timezone_minute timezone_region to to_base64 to_date to_days to_seconds todatetimeoffset trace tracking transaction transactional translate translation treat trigger trigger_nestlevel triggers trim truncate try_cast try_convert try_parse type ub1 ub2 ub4 ucase unarchived unbounded uncompress under undo unhex unicode uniform uninstall union unique unix_timestamp unknown unlimited unlock unpivot unrecoverable unsafe unsigned until untrusted unusable unused update updated upgrade upped upper upsert url urowid usable usage use use_stored_outlines user user_data user_resources users using utc_date utc_timestamp uuid uuid_short validate validate_password_strength validation valist value values var var_samp varcharc vari varia variab variabl variable variables variance varp varraw varrawc varray verify version versions view virtual visible void wait wallet warning warnings week weekday weekofyear wellformed when whene whenev wheneve whenever where while whitespace with within without work wrapped xdb xml xmlagg xmlattributes xmlcast xmlcolattval xmlelement xmlexists xmlforest xmlindex xmlnamespaces xmlpi xmlquery xmlroot xmlschema xmlserialize xmltable xmltype xor year year_to_month years yearweek\",literal:\"true false null\",built_in:\"array bigint binary bit blob boolean char character date dec decimal float int int8 integer interval number numeric real record serial serial8 smallint text varchar varying void\"},c:[{cN:\"string\",b:\"'\",e:\"'\",c:[e.BE,{b:\"''\"}]},{cN:\"string\",b:'\"',e:'\"',c:[e.BE,{b:'\"\"'}]},{cN:\"string\",b:\"`\",e:\"`\",c:[e.BE]},e.CNM,e.CBCM,t]},e.CBCM,t]}}),e});"
  },
  {
    "path": "static/editor.md/lib/highlight/languages/1c.js",
    "content": "/*\nLanguage: 1C\nAuthor: Yuri Ivanov <ivanov@supersoft.ru>\nContributors: Sergey Baranov <segyrn@yandex.ru>\nCategory: enterprise\n*/\n\nfunction(hljs){\n  var IDENT_RE_RU = '[a-zA-Zа-яА-Я][a-zA-Z0-9_а-яА-Я]*';\n  var OneS_KEYWORDS = 'возврат дата для если и или иначе иначеесли исключение конецесли ' +\n    'конецпопытки конецпроцедуры конецфункции конеццикла константа не перейти перем ' +\n    'перечисление по пока попытка прервать продолжить процедура строка тогда фс функция цикл ' +\n    'число экспорт';\n  var OneS_BUILT_IN = 'ansitooem oemtoansi ввестивидсубконто ввестидату ввестизначение ' +\n    'ввестиперечисление ввестипериод ввестиплансчетов ввестистроку ввестичисло вопрос ' +\n    'восстановитьзначение врег выбранныйплансчетов вызватьисключение датагод датамесяц ' +\n    'датачисло добавитьмесяц завершитьработусистемы заголовоксистемы записьжурналарегистрации ' +\n    'запуститьприложение зафиксироватьтранзакцию значениевстроку значениевстрокувнутр ' +\n    'значениевфайл значениеизстроки значениеизстрокивнутр значениеизфайла имякомпьютера ' +\n    'имяпользователя каталогвременныхфайлов каталогиб каталогпользователя каталогпрограммы ' +\n    'кодсимв командасистемы конгода конецпериодаби конецрассчитанногопериодаби ' +\n    'конецстандартногоинтервала конквартала конмесяца коннедели лев лог лог10 макс ' +\n    'максимальноеколичествосубконто мин монопольныйрежим названиеинтерфейса названиенабораправ ' +\n    'назначитьвид назначитьсчет найти найтипомеченныенаудаление найтиссылки началопериодаби ' +\n    'началостандартногоинтервала начатьтранзакцию начгода начквартала начмесяца начнедели ' +\n    'номерднягода номерднянедели номернеделигода нрег обработкаожидания окр описаниеошибки ' +\n    'основнойжурналрасчетов основнойплансчетов основнойязык открытьформу открытьформумодально ' +\n    'отменитьтранзакцию очиститьокносообщений периодстр полноеимяпользователя получитьвремята ' +\n    'получитьдатута получитьдокументта получитьзначенияотбора получитьпозициюта ' +\n    'получитьпустоезначение получитьта прав праводоступа предупреждение префиксавтонумерации ' +\n    'пустаястрока пустоезначение рабочаядаттьпустоезначение рабочаядата разделительстраниц ' +\n    'разделительстрок разм разобратьпозициюдокумента рассчитатьрегистрына ' +\n    'рассчитатьрегистрыпо сигнал симв символтабуляции создатьобъект сокрл сокрлп сокрп ' +\n    'сообщить состояние сохранитьзначение сред статусвозврата стрдлина стрзаменить ' +\n    'стрколичествострок стрполучитьстроку  стрчисловхождений сформироватьпозициюдокумента ' +\n    'счетпокоду текущаядата текущеевремя типзначения типзначениястр удалитьобъекты ' +\n    'установитьтана установитьтапо фиксшаблон формат цел шаблон';\n  var DQUOTE =  {begin: '\"\"'};\n  var STR_START = {\n      className: 'string',\n      begin: '\"', end: '\"|$',\n      contains: [DQUOTE]\n    };\n  var STR_CONT = {\n    className: 'string',\n    begin: '\\\\|', end: '\"|$',\n    contains: [DQUOTE]\n  };\n\n  return {\n    case_insensitive: true,\n    lexemes: IDENT_RE_RU,\n    keywords: {keyword: OneS_KEYWORDS, built_in: OneS_BUILT_IN},\n    contains: [\n      hljs.C_LINE_COMMENT_MODE,\n      hljs.NUMBER_MODE,\n      STR_START, STR_CONT,\n      {\n        className: 'function',\n        begin: '(процедура|функция)', end: '$',\n        lexemes: IDENT_RE_RU,\n        keywords: 'процедура функция',\n        contains: [\n          {\n            begin: 'экспорт', endsWithParent: true,\n            lexemes: IDENT_RE_RU,\n            keywords: 'экспорт',\n            contains: [hljs.C_LINE_COMMENT_MODE]\n          },\n          {\n            className: 'params',\n            begin: '\\\\(', end: '\\\\)',\n            lexemes: IDENT_RE_RU,\n            keywords: 'знач',\n            contains: [STR_START, STR_CONT]\n          },\n          hljs.C_LINE_COMMENT_MODE,\n          hljs.inherit(hljs.TITLE_MODE, {begin: IDENT_RE_RU})\n        ]\n      },\n      {className: 'meta', begin: '#', end: '$'},\n      {className: 'number', begin: '\\'\\\\d{2}\\\\.\\\\d{2}\\\\.(\\\\d{2}|\\\\d{4})\\''} // date\n    ]\n  };\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/languages/abnf.js",
    "content": "/*\nLanguage: Augmented Backus-Naur Form\nAuthor: Alex McKibben <alex@nullscope.net>\n*/\n\nfunction(hljs) {\n    var regexes = {\n        ruleDeclaration: \"^[a-zA-Z][a-zA-Z0-9-]*\",\n        unexpectedChars: \"[!@#$^&',?+~`|:]\"\n    };\n\n    var keywords = [\n        \"ALPHA\",\n        \"BIT\",\n        \"CHAR\",\n        \"CR\",\n        \"CRLF\",\n        \"CTL\",\n        \"DIGIT\",\n        \"DQUOTE\",\n        \"HEXDIG\",\n        \"HTAB\",\n        \"LF\",\n        \"LWSP\",\n        \"OCTET\",\n        \"SP\",\n        \"VCHAR\",\n        \"WSP\"\n    ];\n\n    var commentMode = hljs.COMMENT(\";\", \"$\");\n\n    var terminalBinaryMode = {\n        className: \"symbol\",\n        begin: /%b[0-1]+(-[0-1]+|(\\.[0-1]+)+){0,1}/\n    };\n\n    var terminalDecimalMode = {\n        className: \"symbol\",\n        begin: /%d[0-9]+(-[0-9]+|(\\.[0-9]+)+){0,1}/\n    };\n\n    var terminalHexadecimalMode = {\n        className: \"symbol\",\n        begin: /%x[0-9A-F]+(-[0-9A-F]+|(\\.[0-9A-F]+)+){0,1}/,\n    };\n\n    var caseSensitivityIndicatorMode = {\n        className: \"symbol\",\n        begin: /%[si]/\n    };\n\n    var ruleDeclarationMode = {\n        begin: regexes.ruleDeclaration + '\\\\s*=',\n        returnBegin: true,\n        end: /=/,\n        relevance: 0,\n        contains: [{className: \"attribute\", begin: regexes.ruleDeclaration}]\n    };\n\n    return {\n      illegal: regexes.unexpectedChars,\n      keywords: keywords.join(\" \"),\n      contains: [\n          ruleDeclarationMode,\n          commentMode,\n          terminalBinaryMode,\n          terminalDecimalMode,\n          terminalHexadecimalMode,\n          caseSensitivityIndicatorMode,\n          hljs.QUOTE_STRING_MODE,\n          hljs.NUMBER_MODE\n      ]\n    };\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/languages/accesslog.js",
    "content": "/*\n Language: Access log\n Author: Oleg Efimov <efimovov@gmail.com>\n Description: Apache/Nginx Access Logs\n */\n\nfunction(hljs) {\n  return {\n    contains: [\n      // IP\n      {\n        className: 'number',\n        begin: '\\\\b\\\\d{1,3}\\\\.\\\\d{1,3}\\\\.\\\\d{1,3}\\\\.\\\\d{1,3}(:\\\\d{1,5})?\\\\b'\n      },\n      // Other numbers\n      {\n        className: 'number',\n        begin: '\\\\b\\\\d+\\\\b',\n        relevance: 0\n      },\n      // Requests\n      {\n        className: 'string',\n        begin: '\"(GET|POST|HEAD|PUT|DELETE|CONNECT|OPTIONS|PATCH|TRACE)', end: '\"',\n        keywords: 'GET POST HEAD PUT DELETE CONNECT OPTIONS PATCH TRACE',\n        illegal: '\\\\n',\n        relevance: 10\n      },\n      // Dates\n      {\n        className: 'string',\n        begin: /\\[/, end: /\\]/,\n        illegal: '\\\\n'\n      },\n      // Strings\n      {\n        className: 'string',\n        begin: '\"', end: '\"',\n        illegal: '\\\\n'\n      }\n    ]\n  };\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/languages/actionscript.js",
    "content": "/*\nLanguage: ActionScript\nAuthor: Alexander Myadzel <myadzel@gmail.com>\nCategory: scripting\n*/\n\nfunction(hljs) {\n  var IDENT_RE = '[a-zA-Z_$][a-zA-Z0-9_$]*';\n  var IDENT_FUNC_RETURN_TYPE_RE = '([*]|[a-zA-Z_$][a-zA-Z0-9_$]*)';\n\n  var AS3_REST_ARG_MODE = {\n    className: 'rest_arg',\n    begin: '[.]{3}', end: IDENT_RE,\n    relevance: 10\n  };\n\n  return {\n    aliases: ['as'],\n    keywords: {\n      keyword: 'as break case catch class const continue default delete do dynamic each ' +\n        'else extends final finally for function get if implements import in include ' +\n        'instanceof interface internal is namespace native new override package private ' +\n        'protected public return set static super switch this throw try typeof use var void ' +\n        'while with',\n      literal: 'true false null undefined'\n    },\n    contains: [\n      hljs.APOS_STRING_MODE,\n      hljs.QUOTE_STRING_MODE,\n      hljs.C_LINE_COMMENT_MODE,\n      hljs.C_BLOCK_COMMENT_MODE,\n      hljs.C_NUMBER_MODE,\n      {\n        className: 'class',\n        beginKeywords: 'package', end: '{',\n        contains: [hljs.TITLE_MODE]\n      },\n      {\n        className: 'class',\n        beginKeywords: 'class interface', end: '{', excludeEnd: true,\n        contains: [\n          {\n            beginKeywords: 'extends implements'\n          },\n          hljs.TITLE_MODE\n        ]\n      },\n      {\n        className: 'meta',\n        beginKeywords: 'import include', end: ';',\n        keywords: {'meta-keyword': 'import include'}\n      },\n      {\n        className: 'function',\n        beginKeywords: 'function', end: '[{;]', excludeEnd: true,\n        illegal: '\\\\S',\n        contains: [\n          hljs.TITLE_MODE,\n          {\n            className: 'params',\n            begin: '\\\\(', end: '\\\\)',\n            contains: [\n              hljs.APOS_STRING_MODE,\n              hljs.QUOTE_STRING_MODE,\n              hljs.C_LINE_COMMENT_MODE,\n              hljs.C_BLOCK_COMMENT_MODE,\n              AS3_REST_ARG_MODE\n            ]\n          },\n          {\n            begin: ':\\\\s*' + IDENT_FUNC_RETURN_TYPE_RE\n          }\n        ]\n      },\n      hljs.METHOD_GUARD\n    ],\n    illegal: /#/\n  };\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/languages/ada.js",
    "content": "/*\nLanguage: Ada\nAuthor: Lars Schulna <kartoffelbrei.mit.muskatnuss@gmail.org>\nDescription: Ada is a general-purpose programming language that has great support for saftey critical and real-time applications.\n             It has been developed by the DoD and thus has been used in military and safety-critical applications (like civil aviation).\n             The first version appeared in the 80s, but it's still actively developed today with\n             the newest standard being Ada2012.\n*/\n\n// We try to support full Ada2012\n//\n// We highlight all appearances of types, keywords, literals (string, char, number, bool)\n// and titles (user defined function/procedure/package)\n// CSS classes are set accordingly\n//\n// Languages causing problems for language detection:\n// xml (broken by Foo : Bar type), elm (broken by Foo : Bar type), vbscript-html (broken by body keyword)\n// sql (ada default.txt has a lot of sql keywords)\n\nfunction(hljs) {\n    // Regular expression for Ada numeric literals.\n    // stolen form the VHDL highlighter\n\n    // Decimal literal:\n    var INTEGER_RE = '\\\\d(_|\\\\d)*';\n    var EXPONENT_RE = '[eE][-+]?' + INTEGER_RE;\n    var DECIMAL_LITERAL_RE = INTEGER_RE + '(\\\\.' + INTEGER_RE + ')?' + '(' + EXPONENT_RE + ')?';\n\n    // Based literal:\n    var BASED_INTEGER_RE = '\\\\w+';\n    var BASED_LITERAL_RE = INTEGER_RE + '#' + BASED_INTEGER_RE + '(\\\\.' + BASED_INTEGER_RE + ')?' + '#' + '(' + EXPONENT_RE + ')?';\n\n    var NUMBER_RE = '\\\\b(' + BASED_LITERAL_RE + '|' + DECIMAL_LITERAL_RE + ')';\n\n    // Identifier regex\n    var ID_REGEX = '[A-Za-z](_?[A-Za-z0-9.])*';\n\n    // bad chars, only allowed in literals\n    var BAD_CHARS = '[]{}%#\\'\\\"'\n\n    // Ada doesn't have block comments, only line comments\n    var COMMENTS = hljs.COMMENT('--', '$');\n\n    // variable declarations of the form\n    // Foo : Bar := Baz;\n    // where only Bar will be highlighted\n    var VAR_DECLS = {\n        // TODO: These spaces are not required by the Ada syntax\n        // however, I have yet to see handwritten Ada code where\n        // someone does not put spaces around :\n        begin: '\\\\s+:\\\\s+', end: '\\\\s*(:=|;|\\\\)|=>|$)',\n        // endsWithParent: true,\n        // returnBegin: true,\n        illegal: BAD_CHARS,\n        contains: [\n            {\n                // workaround to avoid highlighting\n                // named loops and declare blocks\n                beginKeywords: 'loop for declare others',\n                endsParent: true,\n            },\n            {\n                // properly highlight all modifiers\n                className: 'keyword',\n                beginKeywords: 'not null constant access function procedure in out aliased exception'\n            },\n            {\n                className: 'type',\n                begin: ID_REGEX,\n                endsParent: true,\n                relevance: 0,\n            }\n        ]\n    };\n\n    return {\n        case_insensitive: true,\n        keywords: {\n            keyword:\n                'abort else new return abs elsif not reverse abstract end ' +\n                'accept entry select access exception of separate aliased exit or some ' +\n                'all others subtype and for out synchronized array function overriding ' +\n                'at tagged generic package task begin goto pragma terminate ' +\n                'body private then if procedure type case in protected constant interface ' +\n                'is raise use declare range delay limited record when delta loop rem while ' +\n                'digits renames with do mod requeue xor',\n            literal:\n                'True False',\n        },\n        contains: [\n            COMMENTS,\n            // strings \"foobar\"\n            {\n                className: 'string',\n                begin: /\"/, end: /\"/,\n                contains: [{begin: /\"\"/, relevance: 0}]\n            },\n            // characters ''\n            {\n                // character literals always contain one char\n                className: 'string',\n                begin: /'.'/\n            },\n            {\n                // number literals\n                className: 'number',\n                begin: NUMBER_RE,\n                relevance: 0\n            },\n            {\n                // Attributes\n                className: 'symbol',\n                begin: \"'\" + ID_REGEX,\n            },\n            {\n                // package definition, maybe inside generic\n                className: 'title',\n                begin: '(\\\\bwith\\\\s+)?(\\\\bprivate\\\\s+)?\\\\bpackage\\\\s+(\\\\bbody\\\\s+)?', end: '(is|$)',\n                keywords: 'package body',\n                excludeBegin: true,\n                excludeEnd: true,\n                illegal: BAD_CHARS\n            },\n            {\n                // function/procedure declaration/definition\n                // maybe inside generic\n                begin: '(\\\\b(with|overriding)\\\\s+)?\\\\b(function|procedure)\\\\s+', end: '(\\\\bis|\\\\bwith|\\\\brenames|\\\\)\\\\s*;)',\n                keywords: 'overriding function procedure with is renames return',\n                // we need to re-match the 'function' keyword, so that\n                // the title mode below matches only exactly once\n                returnBegin: true,\n                contains:\n                [\n                    COMMENTS,\n                    {\n                        // name of the function/procedure\n                        className: 'title',\n                        begin: '(\\\\bwith\\\\s+)?\\\\b(function|procedure)\\\\s+',\n                        end: '(\\\\(|\\\\s+|$)',\n                        excludeBegin: true,\n                        excludeEnd: true,\n                        illegal: BAD_CHARS\n                    },\n                    // 'self'\n                    // // parameter types\n                    VAR_DECLS,\n                    {\n                        // return type\n                        className: 'type',\n                        begin: '\\\\breturn\\\\s+', end: '(\\\\s+|;|$)',\n                        keywords: 'return',\n                        excludeBegin: true,\n                        excludeEnd: true,\n                        // we are done with functions\n                        endsParent: true,\n                        illegal: BAD_CHARS\n\n                    },\n                ]\n            },\n            {\n                // new type declarations\n                // maybe inside generic\n                className: 'type',\n                begin: '\\\\b(sub)?type\\\\s+', end: '\\\\s+',\n                keywords: 'type',\n                excludeBegin: true,\n                illegal: BAD_CHARS\n            },\n\n            // see comment above the definition\n            VAR_DECLS,\n\n            // no markup\n            // relevance boosters for small snippets\n            // {begin: '\\\\s*=>\\\\s*'},\n            // {begin: '\\\\s*:=\\\\s*'},\n            // {begin: '\\\\s+:=\\\\s+'},\n        ]\n    };\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/languages/apache.js",
    "content": "/*\nLanguage: Apache\nAuthor: Ruslan Keba <rukeba@gmail.com>\nContributors: Ivan Sagalaev <maniac@softwaremaniacs.org>\nWebsite: http://rukeba.com/\nDescription: language definition for Apache configuration files (httpd.conf & .htaccess)\nCategory: common, config\n*/\n\nfunction(hljs) {\n  var NUMBER = {className: 'number', begin: '[\\\\$%]\\\\d+'};\n  return {\n    aliases: ['apacheconf'],\n    case_insensitive: true,\n    contains: [\n      hljs.HASH_COMMENT_MODE,\n      {className: 'section', begin: '</?', end: '>'},\n      {\n        className: 'attribute',\n        begin: /\\w+/,\n        relevance: 0,\n        // keywords aren’t needed for highlighting per se, they only boost relevance\n        // for a very generally defined mode (starts with a word, ends with line-end\n        keywords: {\n          nomarkup:\n            'order deny allow setenv rewriterule rewriteengine rewritecond documentroot ' +\n            'sethandler errordocument loadmodule options header listen serverroot ' +\n            'servername'\n        },\n        starts: {\n          end: /$/,\n          relevance: 0,\n          keywords: {\n            literal: 'on off all'\n          },\n          contains: [\n            {\n              className: 'meta',\n              begin: '\\\\s\\\\[', end: '\\\\]$'\n            },\n            {\n              className: 'variable',\n              begin: '[\\\\$%]\\\\{', end: '\\\\}',\n              contains: ['self', NUMBER]\n            },\n            NUMBER,\n            hljs.QUOTE_STRING_MODE\n          ]\n        }\n      }\n    ],\n    illegal: /\\S/\n  };\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/languages/applescript.js",
    "content": "/*\nLanguage: AppleScript\nAuthors: Nathan Grigg <nathan@nathanamy.org>, Dr. Drang <drdrang@gmail.com>\nCategory: scripting\n*/\n\nfunction(hljs) {\n  var STRING = hljs.inherit(hljs.QUOTE_STRING_MODE, {illegal: ''});\n  var PARAMS = {\n    className: 'params',\n    begin: '\\\\(', end: '\\\\)',\n    contains: ['self', hljs.C_NUMBER_MODE, STRING]\n  };\n  var COMMENT_MODE_1 = hljs.COMMENT('--', '$');\n  var COMMENT_MODE_2 = hljs.COMMENT(\n    '\\\\(\\\\*',\n    '\\\\*\\\\)',\n    {\n      contains: ['self', COMMENT_MODE_1] //allow nesting\n    }\n  );\n  var COMMENTS = [\n    COMMENT_MODE_1,\n    COMMENT_MODE_2,\n    hljs.HASH_COMMENT_MODE\n  ];\n\n  return {\n    aliases: ['osascript'],\n    keywords: {\n      keyword:\n        'about above after against and around as at back before beginning ' +\n        'behind below beneath beside between but by considering ' +\n        'contain contains continue copy div does eighth else end equal ' +\n        'equals error every exit fifth first for fourth from front ' +\n        'get given global if ignoring in into is it its last local me ' +\n        'middle mod my ninth not of on onto or over prop property put ref ' +\n        'reference repeat returning script second set seventh since ' +\n        'sixth some tell tenth that the|0 then third through thru ' +\n        'timeout times to transaction try until where while whose with ' +\n        'without',\n      literal:\n        'AppleScript false linefeed return pi quote result space tab true',\n      built_in:\n        'alias application boolean class constant date file integer list ' +\n        'number real record string text ' +\n        'activate beep count delay launch log offset read round ' +\n        'run say summarize write ' +\n        'character characters contents day frontmost id item length ' +\n        'month name paragraph paragraphs rest reverse running time version ' +\n        'weekday word words year'\n    },\n    contains: [\n      STRING,\n      hljs.C_NUMBER_MODE,\n      {\n        className: 'built_in',\n        begin:\n          '\\\\b(clipboard info|the clipboard|info for|list (disks|folder)|' +\n          'mount volume|path to|(close|open for) access|(get|set) eof|' +\n          'current date|do shell script|get volume settings|random number|' +\n          'set volume|system attribute|system info|time to GMT|' +\n          '(load|run|store) script|scripting components|' +\n          'ASCII (character|number)|localized string|' +\n          'choose (application|color|file|file name|' +\n          'folder|from list|remote application|URL)|' +\n          'display (alert|dialog))\\\\b|^\\\\s*return\\\\b'\n      },\n      {\n        className: 'literal',\n        begin:\n          '\\\\b(text item delimiters|current application|missing value)\\\\b'\n      },\n      {\n        className: 'keyword',\n        begin:\n          '\\\\b(apart from|aside from|instead of|out of|greater than|' +\n          \"isn't|(doesn't|does not) (equal|come before|come after|contain)|\" +\n          '(greater|less) than( or equal)?|(starts?|ends|begins?) with|' +\n          'contained by|comes (before|after)|a (ref|reference)|POSIX file|' +\n          'POSIX path|(date|time) string|quoted form)\\\\b'\n      },\n      {\n        beginKeywords: 'on',\n        illegal: '[${=;\\\\n]',\n        contains: [hljs.UNDERSCORE_TITLE_MODE, PARAMS]\n      }\n    ].concat(COMMENTS),\n    illegal: '//|->|=>|\\\\[\\\\['\n  };\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/languages/arduino.js",
    "content": "/*\nLanguage: Arduino\nAuthor: Stefania Mellai <s.mellai@arduino.cc>\nDescription: The Arduino® Language is a superset of C++. This rules are designed to highlight the Arduino® source code. For info about language see http://www.arduino.cc.\nRequires: cpp.js\n*/\n\nfunction(hljs) {\n  var CPP = hljs.getLanguage('cpp').exports;\n\treturn {\n    keywords: {\n      keyword:\n        'boolean byte word string String array ' + CPP.keywords.keyword,\n      built_in:\n        'setup loop while catch for if do goto try switch case else ' +\n        'default break continue return ' +\n        'KeyboardController MouseController SoftwareSerial ' +\n        'EthernetServer EthernetClient LiquidCrystal ' +\n        'RobotControl GSMVoiceCall EthernetUDP EsploraTFT ' +\n        'HttpClient RobotMotor WiFiClient GSMScanner ' +\n        'FileSystem Scheduler GSMServer YunClient YunServer ' +\n        'IPAddress GSMClient GSMModem Keyboard Ethernet ' +\n        'Console GSMBand Esplora Stepper Process ' +\n        'WiFiUDP GSM_SMS Mailbox USBHost Firmata PImage ' +\n        'Client Server GSMPIN FileIO Bridge Serial ' +\n        'EEPROM Stream Mouse Audio Servo File Task ' +\n        'GPRS WiFi Wire TFT GSM SPI SD ' +\n        'runShellCommandAsynchronously analogWriteResolution ' +\n        'retrieveCallingNumber printFirmwareVersion ' +\n        'analogReadResolution sendDigitalPortPair ' +\n        'noListenOnLocalhost readJoystickButton setFirmwareVersion ' +\n        'readJoystickSwitch scrollDisplayRight getVoiceCallStatus ' +\n        'scrollDisplayLeft writeMicroseconds delayMicroseconds ' +\n        'beginTransmission getSignalStrength runAsynchronously ' +\n        'getAsynchronously listenOnLocalhost getCurrentCarrier ' +\n        'readAccelerometer messageAvailable sendDigitalPorts ' +\n        'lineFollowConfig countryNameWrite runShellCommand ' +\n        'readStringUntil rewindDirectory readTemperature ' +\n        'setClockDivider readLightSensor endTransmission ' +\n        'analogReference detachInterrupt countryNameRead ' +\n        'attachInterrupt encryptionType readBytesUntil ' +\n        'robotNameWrite readMicrophone robotNameRead cityNameWrite ' +\n        'userNameWrite readJoystickY readJoystickX mouseReleased ' +\n        'openNextFile scanNetworks noInterrupts digitalWrite ' +\n        'beginSpeaker mousePressed isActionDone mouseDragged ' +\n        'displayLogos noAutoscroll addParameter remoteNumber ' +\n        'getModifiers keyboardRead userNameRead waitContinue ' +\n        'processInput parseCommand printVersion readNetworks ' +\n        'writeMessage blinkVersion cityNameRead readMessage ' +\n        'setDataMode parsePacket isListening setBitOrder ' +\n        'beginPacket isDirectory motorsWrite drawCompass ' +\n        'digitalRead clearScreen serialEvent rightToLeft ' +\n        'setTextSize leftToRight requestFrom keyReleased ' +\n        'compassRead analogWrite interrupts WiFiServer ' +\n        'disconnect playMelody parseFloat autoscroll ' +\n        'getPINUsed setPINUsed setTimeout sendAnalog ' +\n        'readSlider analogRead beginWrite createChar ' +\n        'motorsStop keyPressed tempoWrite readButton ' +\n        'subnetMask debugPrint macAddress writeGreen ' +\n        'randomSeed attachGPRS readString sendString ' +\n        'remotePort releaseAll mouseMoved background ' +\n        'getXChange getYChange answerCall getResult ' +\n        'voiceCall endPacket constrain getSocket writeJSON ' +\n        'getButton available connected findUntil readBytes ' +\n        'exitValue readGreen writeBlue startLoop IPAddress ' +\n        'isPressed sendSysex pauseMode gatewayIP setCursor ' +\n        'getOemKey tuneWrite noDisplay loadImage switchPIN ' +\n        'onRequest onReceive changePIN playFile noBuffer ' +\n        'parseInt overflow checkPIN knobRead beginTFT ' +\n        'bitClear updateIR bitWrite position writeRGB ' +\n        'highByte writeRed setSpeed readBlue noStroke ' +\n        'remoteIP transfer shutdown hangCall beginSMS ' +\n        'endWrite attached maintain noCursor checkReg ' +\n        'checkPUK shiftOut isValid shiftIn pulseIn ' +\n        'connect println localIP pinMode getIMEI ' +\n        'display noBlink process getBand running beginSD ' +\n        'drawBMP lowByte setBand release bitRead prepare ' +\n        'pointTo readRed setMode noFill remove listen ' +\n        'stroke detach attach noTone exists buffer ' +\n        'height bitSet circle config cursor random ' +\n        'IRread setDNS endSMS getKey micros ' +\n        'millis begin print write ready flush width ' +\n        'isPIN blink clear press mkdir rmdir close ' +\n        'point yield image BSSID click delay ' +\n        'read text move peek beep rect line open ' +\n        'seek fill size turn stop home find ' +\n        'step tone sqrt RSSI SSID ' +\n        'end bit tan cos sin pow map abs max ' +\n        'min get run put',\n      literal:\n        'DIGITAL_MESSAGE FIRMATA_STRING ANALOG_MESSAGE ' +\n        'REPORT_DIGITAL REPORT_ANALOG INPUT_PULLUP ' +\n        'SET_PIN_MODE INTERNAL2V56 SYSTEM_RESET LED_BUILTIN ' +\n        'INTERNAL1V1 SYSEX_START INTERNAL EXTERNAL ' +\n        'DEFAULT OUTPUT INPUT HIGH LOW'\n    },\n    contains: [\n      CPP.preprocessor,\n      hljs.C_LINE_COMMENT_MODE,\n      hljs.C_BLOCK_COMMENT_MODE,\n      hljs.APOS_STRING_MODE,\n      hljs.QUOTE_STRING_MODE,\n      hljs.C_NUMBER_MODE\n    ]\n  };\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/languages/armasm.js",
    "content": "/*\nLanguage: ARM Assembly\nAuthor: Dan Panzarella <alsoelp@gmail.com>\nDescription: ARM Assembly including Thumb and Thumb2 instructions\nCategory: assembler\n*/\n\nfunction(hljs) {\n    //local labels: %?[FB]?[AT]?\\d{1,2}\\w+\n  return {\n    case_insensitive: true,\n    aliases: ['arm'],\n    lexemes: '\\\\.?' + hljs.IDENT_RE,\n    keywords: {\n      meta:\n        //GNU preprocs\n        '.2byte .4byte .align .ascii .asciz .balign .byte .code .data .else .end .endif .endm .endr .equ .err .exitm .extern .global .hword .if .ifdef .ifndef .include .irp .long .macro .rept .req .section .set .skip .space .text .word .arm .thumb .code16 .code32 .force_thumb .thumb_func .ltorg '+\n        //ARM directives\n        'ALIAS ALIGN ARM AREA ASSERT ATTR CN CODE CODE16 CODE32 COMMON CP DATA DCB DCD DCDU DCDO DCFD DCFDU DCI DCQ DCQU DCW DCWU DN ELIF ELSE END ENDFUNC ENDIF ENDP ENTRY EQU EXPORT EXPORTAS EXTERN FIELD FILL FUNCTION GBLA GBLL GBLS GET GLOBAL IF IMPORT INCBIN INCLUDE INFO KEEP LCLA LCLL LCLS LTORG MACRO MAP MEND MEXIT NOFP OPT PRESERVE8 PROC QN READONLY RELOC REQUIRE REQUIRE8 RLIST FN ROUT SETA SETL SETS SN SPACE SUBT THUMB THUMBX TTL WHILE WEND ',\n      built_in:\n        'r0 r1 r2 r3 r4 r5 r6 r7 r8 r9 r10 r11 r12 r13 r14 r15 '+ //standard registers\n        'pc lr sp ip sl sb fp '+ //typical regs plus backward compatibility\n        'a1 a2 a3 a4 v1 v2 v3 v4 v5 v6 v7 v8 f0 f1 f2 f3 f4 f5 f6 f7 '+ //more regs and fp\n        'p0 p1 p2 p3 p4 p5 p6 p7 p8 p9 p10 p11 p12 p13 p14 p15 '+ //coprocessor regs\n        'c0 c1 c2 c3 c4 c5 c6 c7 c8 c9 c10 c11 c12 c13 c14 c15 '+ //more coproc\n        'q0 q1 q2 q3 q4 q5 q6 q7 q8 q9 q10 q11 q12 q13 q14 q15 '+ //advanced SIMD NEON regs\n\n        //program status registers\n        'cpsr_c cpsr_x cpsr_s cpsr_f cpsr_cx cpsr_cxs cpsr_xs cpsr_xsf cpsr_sf cpsr_cxsf '+\n        'spsr_c spsr_x spsr_s spsr_f spsr_cx spsr_cxs spsr_xs spsr_xsf spsr_sf spsr_cxsf '+\n\n        //NEON and VFP registers\n        's0 s1 s2 s3 s4 s5 s6 s7 s8 s9 s10 s11 s12 s13 s14 s15 '+\n        's16 s17 s18 s19 s20 s21 s22 s23 s24 s25 s26 s27 s28 s29 s30 s31 '+\n        'd0 d1 d2 d3 d4 d5 d6 d7 d8 d9 d10 d11 d12 d13 d14 d15 '+\n        'd16 d17 d18 d19 d20 d21 d22 d23 d24 d25 d26 d27 d28 d29 d30 d31 ' +\n\n        '{PC} {VAR} {TRUE} {FALSE} {OPT} {CONFIG} {ENDIAN} {CODESIZE} {CPU} {FPU} {ARCHITECTURE} {PCSTOREOFFSET} {ARMASM_VERSION} {INTER} {ROPI} {RWPI} {SWST} {NOSWST} . @'\n    },\n    contains: [\n      {\n        className: 'keyword',\n        begin: '\\\\b('+     //mnemonics\n            'adc|'+\n            '(qd?|sh?|u[qh]?)?add(8|16)?|usada?8|(q|sh?|u[qh]?)?(as|sa)x|'+\n            'and|adrl?|sbc|rs[bc]|asr|b[lx]?|blx|bxj|cbn?z|tb[bh]|bic|'+\n            'bfc|bfi|[su]bfx|bkpt|cdp2?|clz|clrex|cmp|cmn|cpsi[ed]|cps|'+\n            'setend|dbg|dmb|dsb|eor|isb|it[te]{0,3}|lsl|lsr|ror|rrx|'+\n            'ldm(([id][ab])|f[ds])?|ldr((s|ex)?[bhd])?|movt?|mvn|mra|mar|'+\n            'mul|[us]mull|smul[bwt][bt]|smu[as]d|smmul|smmla|'+\n            'mla|umlaal|smlal?([wbt][bt]|d)|mls|smlsl?[ds]|smc|svc|sev|'+\n            'mia([bt]{2}|ph)?|mrr?c2?|mcrr2?|mrs|msr|orr|orn|pkh(tb|bt)|rbit|'+\n            'rev(16|sh)?|sel|[su]sat(16)?|nop|pop|push|rfe([id][ab])?|'+\n            'stm([id][ab])?|str(ex)?[bhd]?|(qd?)?sub|(sh?|q|u[qh]?)?sub(8|16)|'+\n            '[su]xt(a?h|a?b(16)?)|srs([id][ab])?|swpb?|swi|smi|tst|teq|'+\n            'wfe|wfi|yield'+\n        ')'+\n        '(eq|ne|cs|cc|mi|pl|vs|vc|hi|ls|ge|lt|gt|le|al|hs|lo)?'+ //condition codes\n        '[sptrx]?' ,                                             //legal postfixes\n        end: '\\\\s'\n      },\n      hljs.COMMENT('[;@]', '$', {relevance: 0}),\n      hljs.C_BLOCK_COMMENT_MODE,\n      hljs.QUOTE_STRING_MODE,\n      {\n        className: 'string',\n        begin: '\\'',\n        end: '[^\\\\\\\\]\\'',\n        relevance: 0\n      },\n      {\n        className: 'title',\n        begin: '\\\\|', end: '\\\\|',\n        illegal: '\\\\n',\n        relevance: 0\n      },\n      {\n        className: 'number',\n        variants: [\n            {begin: '[#$=]?0x[0-9a-f]+'}, //hex\n            {begin: '[#$=]?0b[01]+'},     //bin\n            {begin: '[#$=]\\\\d+'},        //literal\n            {begin: '\\\\b\\\\d+'}           //bare number\n        ],\n        relevance: 0\n      },\n      {\n        className: 'symbol',\n        variants: [\n            {begin: '^[a-z_\\\\.\\\\$][a-z0-9_\\\\.\\\\$]+'}, //ARM syntax\n            {begin: '^\\\\s*[a-z_\\\\.\\\\$][a-z0-9_\\\\.\\\\$]+:'}, //GNU ARM syntax\n            {begin: '[=#]\\\\w+' }  //label reference\n        ],\n        relevance: 0\n      }\n    ]\n  };\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/languages/asciidoc.js",
    "content": "/*\nLanguage: AsciiDoc\nRequires: xml.js\nAuthor: Dan Allen <dan.j.allen@gmail.com>\nWebsite: http://google.com/profiles/dan.j.allen\nDescription: A semantic, text-based document format that can be exported to HTML, DocBook and other backends.\nCategory: markup\n*/\n\nfunction(hljs) {\n  return {\n    aliases: ['adoc'],\n    contains: [\n      // block comment\n      hljs.COMMENT(\n        '^/{4,}\\\\n',\n        '\\\\n/{4,}$',\n        // can also be done as...\n        //'^/{4,}$',\n        //'^/{4,}$',\n        {\n          relevance: 10\n        }\n      ),\n      // line comment\n      hljs.COMMENT(\n        '^//',\n        '$',\n        {\n          relevance: 0\n        }\n      ),\n      // title\n      {\n        className: 'title',\n        begin: '^\\\\.\\\\w.*$'\n      },\n      // example, admonition & sidebar blocks\n      {\n        begin: '^[=\\\\*]{4,}\\\\n',\n        end: '\\\\n^[=\\\\*]{4,}$',\n        relevance: 10\n      },\n      // headings\n      {\n        className: 'section',\n        relevance: 10,\n        variants: [\n          {begin: '^(={1,5}) .+?( \\\\1)?$'},\n          {begin: '^[^\\\\[\\\\]\\\\n]+?\\\\n[=\\\\-~\\\\^\\\\+]{2,}$'},\n        ]\n      },\n      // document attributes\n      {\n        className: 'meta',\n        begin: '^:.+?:',\n        end: '\\\\s',\n        excludeEnd: true,\n        relevance: 10\n      },\n      // block attributes\n      {\n        className: 'meta',\n        begin: '^\\\\[.+?\\\\]$',\n        relevance: 0\n      },\n      // quoteblocks\n      {\n        className: 'quote',\n        begin: '^_{4,}\\\\n',\n        end: '\\\\n_{4,}$',\n        relevance: 10\n      },\n      // listing and literal blocks\n      {\n        className: 'code',\n        begin: '^[\\\\-\\\\.]{4,}\\\\n',\n        end: '\\\\n[\\\\-\\\\.]{4,}$',\n        relevance: 10\n      },\n      // passthrough blocks\n      {\n        begin: '^\\\\+{4,}\\\\n',\n        end: '\\\\n\\\\+{4,}$',\n        contains: [\n          {\n            begin: '<', end: '>',\n            subLanguage: 'xml',\n            relevance: 0\n          }\n        ],\n        relevance: 10\n      },\n      // lists (can only capture indicators)\n      {\n        className: 'bullet',\n        begin: '^(\\\\*+|\\\\-+|\\\\.+|[^\\\\n]+?::)\\\\s+'\n      },\n      // admonition\n      {\n        className: 'symbol',\n        begin: '^(NOTE|TIP|IMPORTANT|WARNING|CAUTION):\\\\s+',\n        relevance: 10\n      },\n      // inline strong\n      {\n        className: 'strong',\n        // must not follow a word character or be followed by an asterisk or space\n        begin: '\\\\B\\\\*(?![\\\\*\\\\s])',\n        end: '(\\\\n{2}|\\\\*)',\n        // allow escaped asterisk followed by word char\n        contains: [\n          {\n            begin: '\\\\\\\\*\\\\w',\n            relevance: 0\n          }\n        ]\n      },\n      // inline emphasis\n      {\n        className: 'emphasis',\n        // must not follow a word character or be followed by a single quote or space\n        begin: '\\\\B\\'(?![\\'\\\\s])',\n        end: '(\\\\n{2}|\\')',\n        // allow escaped single quote followed by word char\n        contains: [\n          {\n            begin: '\\\\\\\\\\'\\\\w',\n            relevance: 0\n          }\n        ],\n        relevance: 0\n      },\n      // inline emphasis (alt)\n      {\n        className: 'emphasis',\n        // must not follow a word character or be followed by an underline or space\n        begin: '_(?![_\\\\s])',\n        end: '(\\\\n{2}|_)',\n        relevance: 0\n      },\n      // inline smart quotes\n      {\n        className: 'string',\n        variants: [\n          {begin: \"``.+?''\"},\n          {begin: \"`.+?'\"}\n        ]\n      },\n      // inline code snippets (TODO should get same treatment as strong and emphasis)\n      {\n        className: 'code',\n        begin: '(`.+?`|\\\\+.+?\\\\+)',\n        relevance: 0\n      },\n      // indented literal block\n      {\n        className: 'code',\n        begin: '^[ \\\\t]',\n        end: '$',\n        relevance: 0\n      },\n      // horizontal rules\n      {\n        begin: '^\\'{3,}[ \\\\t]*$',\n        relevance: 10\n      },\n      // images and links\n      {\n        begin: '(link:)?(http|https|ftp|file|irc|image:?):\\\\S+\\\\[.*?\\\\]',\n        returnBegin: true,\n        contains: [\n          {\n            begin: '(link|image:?):',\n            relevance: 0\n          },\n          {\n            className: 'link',\n            begin: '\\\\w',\n            end: '[^\\\\[]+',\n            relevance: 0\n          },\n          {\n            className: 'string',\n            begin: '\\\\[',\n            end: '\\\\]',\n            excludeBegin: true,\n            excludeEnd: true,\n            relevance: 0\n          }\n        ],\n        relevance: 10\n      }\n    ]\n  };\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/languages/aspectj.js",
    "content": "/*\nLanguage: AspectJ\nAuthor: Hakan Ozler <ozler.hakan@gmail.com>\nDescription: Syntax Highlighting for the AspectJ Language which is a general-purpose aspect-oriented extension to the Java programming language.\n */\nfunction (hljs) {\n  var KEYWORDS =\n    'false synchronized int abstract float private char boolean static null if const ' +\n    'for true while long throw strictfp finally protected import native final return void ' +\n    'enum else extends implements break transient new catch instanceof byte super volatile case ' +\n    'assert short package default double public try this switch continue throws privileged ' +\n    'aspectOf adviceexecution proceed cflowbelow cflow initialization preinitialization ' +\n    'staticinitialization withincode target within execution getWithinTypeName handler ' +\n    'thisJoinPoint thisJoinPointStaticPart thisEnclosingJoinPointStaticPart declare parents '+\n    'warning error soft precedence thisAspectInstance';\n  var SHORTKEYS = 'get set args call';\n  return {\n    keywords : KEYWORDS,\n    illegal : /<\\/|#/,\n    contains : [\n      hljs.COMMENT(\n        '/\\\\*\\\\*',\n        '\\\\*/',\n        {\n          relevance : 0,\n          contains : [\n            {\n              // eat up @'s in emails to prevent them to be recognized as doctags\n              begin: /\\w+@/, relevance: 0\n            },\n            {\n              className : 'doctag',\n              begin : '@[A-Za-z]+'\n            }\n          ]\n        }\n      ),\n      hljs.C_LINE_COMMENT_MODE,\n      hljs.C_BLOCK_COMMENT_MODE,\n      hljs.APOS_STRING_MODE,\n      hljs.QUOTE_STRING_MODE,\n      {\n        className : 'class',\n        beginKeywords : 'aspect',\n        end : /[{;=]/,\n        excludeEnd : true,\n        illegal : /[:;\"\\[\\]]/,\n        contains : [\n          {\n            beginKeywords : 'extends implements pertypewithin perthis pertarget percflowbelow percflow issingleton'\n          },\n          hljs.UNDERSCORE_TITLE_MODE,\n          {\n            begin : /\\([^\\)]*/,\n            end : /[)]+/,\n            keywords : KEYWORDS + ' ' + SHORTKEYS,\n            excludeEnd : false\n          }\n        ]\n      },\n      {\n        className : 'class',\n        beginKeywords : 'class interface',\n        end : /[{;=]/,\n        excludeEnd : true,\n        relevance: 0,\n        keywords : 'class interface',\n        illegal : /[:\"\\[\\]]/,\n        contains : [\n          {beginKeywords : 'extends implements'},\n          hljs.UNDERSCORE_TITLE_MODE\n        ]\n      },\n      {\n        // AspectJ Constructs\n        beginKeywords : 'pointcut after before around throwing returning',\n        end : /[)]/,\n        excludeEnd : false,\n        illegal : /[\"\\[\\]]/,\n        contains : [\n          {\n            begin : hljs.UNDERSCORE_IDENT_RE + '\\\\s*\\\\(',\n            returnBegin : true,\n            contains : [hljs.UNDERSCORE_TITLE_MODE]\n          }\n        ]\n      },\n      {\n        begin : /[:]/,\n        returnBegin : true,\n        end : /[{;]/,\n        relevance: 0,\n        excludeEnd : false,\n        keywords : KEYWORDS,\n        illegal : /[\"\\[\\]]/,\n        contains : [\n          {\n            begin : hljs.UNDERSCORE_IDENT_RE + '\\\\s*\\\\(',\n            keywords : KEYWORDS + ' ' + SHORTKEYS\n          },\n          hljs.QUOTE_STRING_MODE\n        ]\n      },\n      {\n        // this prevents 'new Name(...), or throw ...' from being recognized as a function definition\n        beginKeywords : 'new throw',\n        relevance : 0\n      },\n      {\n        // the function class is a bit different for AspectJ compared to the Java language\n        className : 'function',\n        begin : /\\w+ +\\w+(\\.)?\\w+\\s*\\([^\\)]*\\)\\s*((throws)[\\w\\s,]+)?[\\{;]/,\n        returnBegin : true,\n        end : /[{;=]/,\n        keywords : KEYWORDS,\n        excludeEnd : true,\n        contains : [\n          {\n            begin : hljs.UNDERSCORE_IDENT_RE + '\\\\s*\\\\(',\n            returnBegin : true,\n            relevance: 0,\n            contains : [hljs.UNDERSCORE_TITLE_MODE]\n          },\n          {\n            className : 'params',\n            begin : /\\(/, end : /\\)/,\n            relevance: 0,\n            keywords : KEYWORDS,\n            contains : [\n              hljs.APOS_STRING_MODE,\n              hljs.QUOTE_STRING_MODE,\n              hljs.C_NUMBER_MODE,\n              hljs.C_BLOCK_COMMENT_MODE\n            ]\n          },\n          hljs.C_LINE_COMMENT_MODE,\n          hljs.C_BLOCK_COMMENT_MODE\n        ]\n      },\n      hljs.C_NUMBER_MODE,\n      {\n        // annotation is also used in this language\n        className : 'meta',\n        begin : '@[A-Za-z]+'\n      }\n    ]\n  };\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/languages/autohotkey.js",
    "content": "/*\nLanguage: AutoHotkey\nAuthor: Seongwon Lee <dlimpid@gmail.com>\nDescription: AutoHotkey language definition\nCategory: scripting\n*/\n\nfunction(hljs) {\n  var BACKTICK_ESCAPE = {\n    begin: /`[\\s\\S]/\n  };\n\n  return {\n    case_insensitive: true,\n    keywords: {\n      keyword: 'Break Continue Else Gosub If Loop Return While',\n      literal: 'A|0 true false NOT AND OR',\n      built_in: 'ComSpec Clipboard ClipboardAll ErrorLevel',\n    },\n    contains: [\n      {\n        className: 'built_in',\n        begin: 'A_[a-zA-Z0-9]+'\n      },\n      BACKTICK_ESCAPE,\n      hljs.inherit(hljs.QUOTE_STRING_MODE, {contains: [BACKTICK_ESCAPE]}),\n      hljs.COMMENT(';', '$', {relevance: 0}),\n      {\n        className: 'number',\n        begin: hljs.NUMBER_RE,\n        relevance: 0\n      },\n      {\n        className: 'variable', // FIXME\n        begin: '%', end: '%',\n        illegal: '\\\\n',\n        contains: [BACKTICK_ESCAPE]\n      },\n      {\n        className: 'symbol',\n        contains: [BACKTICK_ESCAPE],\n        variants: [\n          {begin: '^[^\\\\n\";]+::(?!=)'},\n          {begin: '^[^\\\\n\";]+:(?!=)', relevance: 0} // zero relevance as it catches a lot of things\n                                                    // followed by a single ':' in many languages\n        ]\n      },\n      {\n        // consecutive commas, not for highlighting but just for relevance\n        begin: ',\\\\s*,'\n      }\n    ]\n  }\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/languages/autoit.js",
    "content": "/*\nLanguage: AutoIt\nAuthor: Manh Tuan <junookyo@gmail.com>\nDescription: AutoIt language definition\nCategory: scripting\n*/\n\nfunction(hljs) {\n    var KEYWORDS = 'ByRef Case Const ContinueCase ContinueLoop ' +\n        'Default Dim Do Else ElseIf EndFunc EndIf EndSelect ' +\n        'EndSwitch EndWith Enum Exit ExitLoop For Func ' +\n        'Global If In Local Next ReDim Return Select Static ' +\n        'Step Switch Then To Until Volatile WEnd While With',\n\n        LITERAL = 'True False And Null Not Or',\n\n        BUILT_IN =\n          'Abs ACos AdlibRegister AdlibUnRegister Asc AscW ASin Assign ATan AutoItSetOption AutoItWinGetTitle AutoItWinSetTitle Beep Binary BinaryLen BinaryMid BinaryToString BitAND BitNOT BitOR BitRotate BitShift BitXOR BlockInput Break Call CDTray Ceiling Chr ChrW ClipGet ClipPut ConsoleRead ConsoleWrite ConsoleWriteError ControlClick ControlCommand ControlDisable ControlEnable ControlFocus ControlGetFocus ControlGetHandle ControlGetPos ControlGetText ControlHide ControlListView ControlMove ControlSend ControlSetText ControlShow ControlTreeView Cos Dec DirCopy DirCreate DirGetSize DirMove DirRemove DllCall DllCallAddress DllCallbackFree DllCallbackGetPtr DllCallbackRegister DllClose DllOpen DllStructCreate DllStructGetData DllStructGetPtr DllStructGetSize DllStructSetData DriveGetDrive DriveGetFileSystem DriveGetLabel DriveGetSerial DriveGetType DriveMapAdd DriveMapDel DriveMapGet DriveSetLabel DriveSpaceFree DriveSpaceTotal DriveStatus EnvGet EnvSet EnvUpdate Eval Execute Exp FileChangeDir FileClose FileCopy FileCreateNTFSLink FileCreateShortcut FileDelete FileExists FileFindFirstFile FileFindNextFile FileFlush FileGetAttrib FileGetEncoding FileGetLongName FileGetPos FileGetShortcut FileGetShortName FileGetSize FileGetTime FileGetVersion FileInstall FileMove FileOpen FileOpenDialog FileRead FileReadLine FileReadToArray FileRecycle FileRecycleEmpty FileSaveDialog FileSelectFolder FileSetAttrib FileSetEnd FileSetPos FileSetTime FileWrite FileWriteLine Floor FtpSetProxy FuncName GUICreate GUICtrlCreateAvi GUICtrlCreateButton GUICtrlCreateCheckbox GUICtrlCreateCombo GUICtrlCreateContextMenu GUICtrlCreateDate GUICtrlCreateDummy GUICtrlCreateEdit GUICtrlCreateGraphic GUICtrlCreateGroup GUICtrlCreateIcon GUICtrlCreateInput GUICtrlCreateLabel GUICtrlCreateList GUICtrlCreateListView GUICtrlCreateListViewItem GUICtrlCreateMenu GUICtrlCreateMenuItem GUICtrlCreateMonthCal GUICtrlCreateObj GUICtrlCreatePic GUICtrlCreateProgress GUICtrlCreateRadio GUICtrlCreateSlider GUICtrlCreateTab GUICtrlCreateTabItem GUICtrlCreateTreeView GUICtrlCreateTreeViewItem GUICtrlCreateUpdown GUICtrlDelete GUICtrlGetHandle GUICtrlGetState GUICtrlRead GUICtrlRecvMsg GUICtrlRegisterListViewSort GUICtrlSendMsg GUICtrlSendToDummy GUICtrlSetBkColor GUICtrlSetColor GUICtrlSetCursor GUICtrlSetData GUICtrlSetDefBkColor GUICtrlSetDefColor GUICtrlSetFont GUICtrlSetGraphic GUICtrlSetImage GUICtrlSetLimit GUICtrlSetOnEvent GUICtrlSetPos GUICtrlSetResizing GUICtrlSetState GUICtrlSetStyle GUICtrlSetTip GUIDelete GUIGetCursorInfo GUIGetMsg GUIGetStyle GUIRegisterMsg GUISetAccelerators GUISetBkColor GUISetCoord GUISetCursor GUISetFont GUISetHelp GUISetIcon GUISetOnEvent GUISetState GUISetStyle GUIStartGroup GUISwitch Hex HotKeySet HttpSetProxy HttpSetUserAgent HWnd InetClose InetGet InetGetInfo InetGetSize InetRead IniDelete IniRead IniReadSection IniReadSectionNames IniRenameSection IniWrite IniWriteSection InputBox Int IsAdmin IsArray IsBinary IsBool IsDeclared IsDllStruct IsFloat IsFunc IsHWnd IsInt IsKeyword IsNumber IsObj IsPtr IsString Log MemGetStats Mod MouseClick MouseClickDrag MouseDown MouseGetCursor MouseGetPos MouseMove MouseUp MouseWheel MsgBox Number ObjCreate ObjCreateInterface ObjEvent ObjGet ObjName OnAutoItExitRegister OnAutoItExitUnRegister Ping PixelChecksum PixelGetColor PixelSearch ProcessClose ProcessExists ProcessGetStats ProcessList ProcessSetPriority ProcessWait ProcessWaitClose ProgressOff ProgressOn ProgressSet Ptr Random RegDelete RegEnumKey RegEnumVal RegRead RegWrite Round Run RunAs RunAsWait RunWait Send SendKeepActive SetError SetExtended ShellExecute ShellExecuteWait Shutdown Sin Sleep SoundPlay SoundSetWaveVolume SplashImageOn SplashOff SplashTextOn Sqrt SRandom StatusbarGetText StderrRead StdinWrite StdioClose StdoutRead String StringAddCR StringCompare StringFormat StringFromASCIIArray StringInStr StringIsAlNum StringIsAlpha StringIsASCII StringIsDigit StringIsFloat StringIsInt StringIsLower StringIsSpace StringIsUpper StringIsXDigit StringLeft StringLen StringLower StringMid StringRegExp StringRegExpReplace StringReplace StringReverse StringRight StringSplit StringStripCR StringStripWS StringToASCIIArray StringToBinary StringTrimLeft StringTrimRight StringUpper Tan TCPAccept TCPCloseSocket TCPConnect TCPListen TCPNameToIP TCPRecv TCPSend TCPShutdown, UDPShutdown TCPStartup, UDPStartup TimerDiff TimerInit ToolTip TrayCreateItem TrayCreateMenu TrayGetMsg TrayItemDelete TrayItemGetHandle TrayItemGetState TrayItemGetText TrayItemSetOnEvent TrayItemSetState TrayItemSetText TraySetClick TraySetIcon TraySetOnEvent TraySetPauseIcon TraySetState TraySetToolTip TrayTip UBound UDPBind UDPCloseSocket UDPOpen UDPRecv UDPSend VarGetType WinActivate WinActive WinClose WinExists WinFlash WinGetCaretPos WinGetClassList WinGetClientSize WinGetHandle WinGetPos WinGetProcess WinGetState WinGetText WinGetTitle WinKill WinList WinMenuSelectItem WinMinimizeAll WinMinimizeAllUndo WinMove WinSetOnTop WinSetState WinSetTitle WinSetTrans WinWait',\n\n        COMMENT = {\n            variants: [\n              hljs.COMMENT(';', '$', {relevance: 0}),\n              hljs.COMMENT('#cs', '#ce'),\n              hljs.COMMENT('#comments-start', '#comments-end')\n            ]\n        },\n\n        VARIABLE = {\n            begin: '\\\\$[A-z0-9_]+'\n        },\n\n        STRING = {\n            className: 'string',\n            variants: [{\n                begin: /\"/,\n                end: /\"/,\n                contains: [{\n                    begin: /\"\"/,\n                    relevance: 0\n                }]\n            }, {\n                begin: /'/,\n                end: /'/,\n                contains: [{\n                    begin: /''/,\n                    relevance: 0\n                }]\n            }]\n        },\n\n        NUMBER = {\n            variants: [hljs.BINARY_NUMBER_MODE, hljs.C_NUMBER_MODE]\n        },\n\n        PREPROCESSOR = {\n            className: 'meta',\n            begin: '#',\n            end: '$',\n            keywords: {'meta-keyword': 'comments include include-once NoTrayIcon OnAutoItStartRegister pragma compile RequireAdmin'},\n            contains: [{\n                    begin: /\\\\\\n/,\n                    relevance: 0\n                }, {\n                    beginKeywords: 'include',\n                    keywords: {'meta-keyword': 'include'},\n                    end: '$',\n                    contains: [\n                        STRING, {\n                            className: 'meta-string',\n                            variants: [{\n                                begin: '<',\n                                end: '>'\n                            }, {\n                                begin: /\"/,\n                                end: /\"/,\n                                contains: [{\n                                    begin: /\"\"/,\n                                    relevance: 0\n                                }]\n                            }, {\n                                begin: /'/,\n                                end: /'/,\n                                contains: [{\n                                    begin: /''/,\n                                    relevance: 0\n                                }]\n                            }]\n                        }\n                    ]\n                },\n                STRING,\n                COMMENT\n            ]\n        },\n\n        CONSTANT = {\n            className: 'symbol',\n            // begin: '@',\n            // end: '$',\n            // keywords: 'AppDataCommonDir AppDataDir AutoItExe AutoItPID AutoItVersion AutoItX64 COM_EventObj CommonFilesDir Compiled ComputerName ComSpec CPUArch CR CRLF DesktopCommonDir DesktopDepth DesktopDir DesktopHeight DesktopRefresh DesktopWidth DocumentsCommonDir error exitCode exitMethod extended FavoritesCommonDir FavoritesDir GUI_CtrlHandle GUI_CtrlId GUI_DragFile GUI_DragId GUI_DropId GUI_WinHandle HomeDrive HomePath HomeShare HotKeyPressed HOUR IPAddress1 IPAddress2 IPAddress3 IPAddress4 KBLayout LF LocalAppDataDir LogonDNSDomain LogonDomain LogonServer MDAY MIN MON MSEC MUILang MyDocumentsDir NumParams OSArch OSBuild OSLang OSServicePack OSType OSVersion ProgramFilesDir ProgramsCommonDir ProgramsDir ScriptDir ScriptFullPath ScriptLineNumber ScriptName SEC StartMenuCommonDir StartMenuDir StartupCommonDir StartupDir SW_DISABLE SW_ENABLE SW_HIDE SW_LOCK SW_MAXIMIZE SW_MINIMIZE SW_RESTORE SW_SHOW SW_SHOWDEFAULT SW_SHOWMAXIMIZED SW_SHOWMINIMIZED SW_SHOWMINNOACTIVE SW_SHOWNA SW_SHOWNOACTIVATE SW_SHOWNORMAL SW_UNLOCK SystemDir TAB TempDir TRAY_ID TrayIconFlashing TrayIconVisible UserName UserProfileDir WDAY WindowsDir WorkingDir YDAY YEAR',\n            // relevance: 5\n            begin: '@[A-z0-9_]+'\n        },\n\n        FUNCTION = {\n            className: 'function',\n            beginKeywords: 'Func',\n            end: '$',\n            illegal: '\\\\$|\\\\[|%',\n            contains: [\n                hljs.UNDERSCORE_TITLE_MODE, {\n                    className: 'params',\n                    begin: '\\\\(',\n                    end: '\\\\)',\n                    contains: [\n                        VARIABLE,\n                        STRING,\n                        NUMBER\n                    ]\n                }\n            ]\n        };\n\n    return {\n        case_insensitive: true,\n        illegal: /\\/\\*/,\n        keywords: {\n            keyword: KEYWORDS,\n            built_in: BUILT_IN,\n            literal: LITERAL\n        },\n        contains: [\n            COMMENT,\n            VARIABLE,\n            STRING,\n            NUMBER,\n            PREPROCESSOR,\n            CONSTANT,\n            FUNCTION\n        ]\n    }\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/languages/avrasm.js",
    "content": "/*\nLanguage: AVR Assembler\nAuthor: Vladimir Ermakov <vooon341@gmail.com>\nCategory: assembler\n*/\n\nfunction(hljs) {\n  return {\n    case_insensitive: true,\n    lexemes: '\\\\.?' + hljs.IDENT_RE,\n    keywords: {\n      keyword:\n        /* mnemonic */\n        'adc add adiw and andi asr bclr bld brbc brbs brcc brcs break breq brge brhc brhs ' +\n        'brid brie brlo brlt brmi brne brpl brsh brtc brts brvc brvs bset bst call cbi cbr ' +\n        'clc clh cli cln clr cls clt clv clz com cp cpc cpi cpse dec eicall eijmp elpm eor ' +\n        'fmul fmuls fmulsu icall ijmp in inc jmp ld ldd ldi lds lpm lsl lsr mov movw mul ' +\n        'muls mulsu neg nop or ori out pop push rcall ret reti rjmp rol ror sbc sbr sbrc sbrs ' +\n        'sec seh sbi sbci sbic sbis sbiw sei sen ser ses set sev sez sleep spm st std sts sub ' +\n        'subi swap tst wdr',\n      built_in:\n        /* general purpose registers */\n        'r0 r1 r2 r3 r4 r5 r6 r7 r8 r9 r10 r11 r12 r13 r14 r15 r16 r17 r18 r19 r20 r21 r22 ' +\n        'r23 r24 r25 r26 r27 r28 r29 r30 r31 x|0 xh xl y|0 yh yl z|0 zh zl ' +\n        /* IO Registers (ATMega128) */\n        'ucsr1c udr1 ucsr1a ucsr1b ubrr1l ubrr1h ucsr0c ubrr0h tccr3c tccr3a tccr3b tcnt3h ' +\n        'tcnt3l ocr3ah ocr3al ocr3bh ocr3bl ocr3ch ocr3cl icr3h icr3l etimsk etifr tccr1c ' +\n        'ocr1ch ocr1cl twcr twdr twar twsr twbr osccal xmcra xmcrb eicra spmcsr spmcr portg ' +\n        'ddrg ping portf ddrf sreg sph spl xdiv rampz eicrb eimsk gimsk gicr eifr gifr timsk ' +\n        'tifr mcucr mcucsr tccr0 tcnt0 ocr0 assr tccr1a tccr1b tcnt1h tcnt1l ocr1ah ocr1al ' +\n        'ocr1bh ocr1bl icr1h icr1l tccr2 tcnt2 ocr2 ocdr wdtcr sfior eearh eearl eedr eecr ' +\n        'porta ddra pina portb ddrb pinb portc ddrc pinc portd ddrd pind spdr spsr spcr udr0 ' +\n        'ucsr0a ucsr0b ubrr0l acsr admux adcsr adch adcl porte ddre pine pinf',\n      meta:\n        '.byte .cseg .db .def .device .dseg .dw .endmacro .equ .eseg .exit .include .list ' +\n        '.listmac .macro .nolist .org .set'\n    },\n    contains: [\n      hljs.C_BLOCK_COMMENT_MODE,\n      hljs.COMMENT(\n        ';',\n        '$',\n        {\n          relevance: 0\n        }\n      ),\n      hljs.C_NUMBER_MODE, // 0x..., decimal, float\n      hljs.BINARY_NUMBER_MODE, // 0b...\n      {\n        className: 'number',\n        begin: '\\\\b(\\\\$[a-zA-Z0-9]+|0o[0-7]+)' // $..., 0o...\n      },\n      hljs.QUOTE_STRING_MODE,\n      {\n        className: 'string',\n        begin: '\\'', end: '[^\\\\\\\\]\\'',\n        illegal: '[^\\\\\\\\][^\\']'\n      },\n      {className: 'symbol',  begin: '^[A-Za-z0-9_.$]+:'},\n      {className: 'meta', begin: '#', end: '$'},\n      {  // подстановка в «.macro»\n        className: 'subst',\n        begin: '@[0-9]+'\n      }\n    ]\n  };\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/languages/awk.js",
    "content": "/*\nLanguage: Awk\nAuthor: Matthew Daly <matthewbdaly@gmail.com>\nWebsite: http://matthewdaly.co.uk/\nDescription: language definition for Awk scripts\n*/\n\nfunction(hljs) {\n  var VARIABLE = {\n    className: 'variable',\n    variants: [\n      {begin: /\\$[\\w\\d#@][\\w\\d_]*/},\n      {begin: /\\$\\{(.*?)}/}\n    ]\n  };\n  var KEYWORDS = 'BEGIN END if else while do for in break continue delete next nextfile function func exit|10';\n  var STRING = {\n    className: 'string',\n    contains: [hljs.BACKSLASH_ESCAPE],\n    variants: [\n      {\n        begin: /(u|b)?r?'''/, end: /'''/,\n        relevance: 10\n      },\n      {\n        begin: /(u|b)?r?\"\"\"/, end: /\"\"\"/,\n        relevance: 10\n      },\n      {\n        begin: /(u|r|ur)'/, end: /'/,\n        relevance: 10\n      },\n      {\n        begin: /(u|r|ur)\"/, end: /\"/,\n        relevance: 10\n      },\n      {\n        begin: /(b|br)'/, end: /'/\n      },\n      {\n        begin: /(b|br)\"/, end: /\"/\n      },\n      hljs.APOS_STRING_MODE,\n      hljs.QUOTE_STRING_MODE\n    ]\n  };\n  return {\n\t keywords: {\n\t   keyword: KEYWORDS\n    },\n    contains: [\n      VARIABLE,\n      STRING,\n      hljs.REGEXP_MODE,\n      hljs.HASH_COMMENT_MODE,\n      hljs.NUMBER_MODE\n    ]\n  }\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/languages/axapta.js",
    "content": "/*\nLanguage: Axapta\nAuthor: Dmitri Roudakov <dmitri@roudakov.ru>\nCategory: enterprise\n*/\n\nfunction(hljs) {\n  return {\n    keywords: 'false int abstract private char boolean static null if for true ' +\n      'while long throw finally protected final return void enum else ' +\n      'break new catch byte super case short default double public try this switch ' +\n      'continue reverse firstfast firstonly forupdate nofetch sum avg minof maxof count ' +\n      'order group by asc desc index hint like dispaly edit client server ttsbegin ' +\n      'ttscommit str real date container anytype common div mod',\n    contains: [\n      hljs.C_LINE_COMMENT_MODE,\n      hljs.C_BLOCK_COMMENT_MODE,\n      hljs.APOS_STRING_MODE,\n      hljs.QUOTE_STRING_MODE,\n      hljs.C_NUMBER_MODE,\n      {\n        className: 'meta',\n        begin: '#', end: '$'\n      },\n      {\n        className: 'class',\n        beginKeywords: 'class interface', end: '{', excludeEnd: true,\n        illegal: ':',\n        contains: [\n          {beginKeywords: 'extends implements'},\n          hljs.UNDERSCORE_TITLE_MODE\n        ]\n      }\n    ]\n  };\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/languages/bash.js",
    "content": "/*\nLanguage: Bash\nAuthor: vah <vahtenberg@gmail.com>\nContributrors: Benjamin Pannell <contact@sierrasoftworks.com>\nCategory: common\n*/\n\nfunction(hljs) {\n  var VAR = {\n    className: 'variable',\n    variants: [\n      {begin: /\\$[\\w\\d#@][\\w\\d_]*/},\n      {begin: /\\$\\{(.*?)}/}\n    ]\n  };\n  var QUOTE_STRING = {\n    className: 'string',\n    begin: /\"/, end: /\"/,\n    contains: [\n      hljs.BACKSLASH_ESCAPE,\n      VAR,\n      {\n        className: 'variable',\n        begin: /\\$\\(/, end: /\\)/,\n        contains: [hljs.BACKSLASH_ESCAPE]\n      }\n    ]\n  };\n  var APOS_STRING = {\n    className: 'string',\n    begin: /'/, end: /'/\n  };\n\n  return {\n    aliases: ['sh', 'zsh'],\n    lexemes: /-?[a-z\\._]+/,\n    keywords: {\n      keyword:\n        'if then else elif fi for while in do done case esac function',\n      literal:\n        'true false',\n      built_in:\n        // Shell built-ins\n        // http://www.gnu.org/software/bash/manual/html_node/Shell-Builtin-Commands.html\n        'break cd continue eval exec exit export getopts hash pwd readonly return shift test times ' +\n        'trap umask unset ' +\n        // Bash built-ins\n        'alias bind builtin caller command declare echo enable help let local logout mapfile printf ' +\n        'read readarray source type typeset ulimit unalias ' +\n        // Shell modifiers\n        'set shopt ' +\n        // Zsh built-ins\n        'autoload bg bindkey bye cap chdir clone comparguments compcall compctl compdescribe compfiles ' +\n        'compgroups compquote comptags comptry compvalues dirs disable disown echotc echoti emulate ' +\n        'fc fg float functions getcap getln history integer jobs kill limit log noglob popd print ' +\n        'pushd pushln rehash sched setcap setopt stat suspend ttyctl unfunction unhash unlimit ' +\n        'unsetopt vared wait whence where which zcompile zformat zftp zle zmodload zparseopts zprof ' +\n        'zpty zregexparse zsocket zstyle ztcp',\n      _:\n        '-ne -eq -lt -gt -f -d -e -s -l -a' // relevance booster\n    },\n    contains: [\n      {\n        className: 'meta',\n        begin: /^#![^\\n]+sh\\s*$/,\n        relevance: 10\n      },\n      {\n        className: 'function',\n        begin: /\\w[\\w\\d_]*\\s*\\(\\s*\\)\\s*\\{/,\n        returnBegin: true,\n        contains: [hljs.inherit(hljs.TITLE_MODE, {begin: /\\w[\\w\\d_]*/})],\n        relevance: 0\n      },\n      hljs.HASH_COMMENT_MODE,\n      QUOTE_STRING,\n      APOS_STRING,\n      VAR\n    ]\n  };\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/languages/basic.js",
    "content": "/*\nLanguage: Basic\nAuthor: Raphaël Assénat <raph@raphnet.net>\nDescription: Based on the BASIC reference from the Tandy 1000 guide\n*/\nfunction(hljs) {\n  return {\n    case_insensitive: true,\n    illegal: '^\\.',\n    // Support explicitely typed variables that end with $%! or #.\n    lexemes: '[a-zA-Z][a-zA-Z0-9_\\$\\%\\!\\#]*',\n    keywords: {\n        keyword:\n          'ABS ASC AND ATN AUTO|0 BEEP BLOAD|10 BSAVE|10 CALL CALLS CDBL CHAIN CHDIR CHR$|10 CINT CIRCLE ' +\n          'CLEAR CLOSE CLS COLOR COM COMMON CONT COS CSNG CSRLIN CVD CVI CVS DATA DATE$ ' +\n          'DEFDBL DEFINT DEFSNG DEFSTR DEF|0 SEG USR DELETE DIM DRAW EDIT END ENVIRON ENVIRON$ ' +\n          'EOF EQV ERASE ERDEV ERDEV$ ERL ERR ERROR EXP FIELD FILES FIX FOR|0 FRE GET GOSUB|10 GOTO ' +\n          'HEX$ IF|0 THEN ELSE|0 INKEY$ INP INPUT INPUT# INPUT$ INSTR IMP INT IOCTL IOCTL$ KEY ON ' +\n          'OFF LIST KILL LEFT$ LEN LET LINE LLIST LOAD LOC LOCATE LOF LOG LPRINT USING LSET ' +\n          'MERGE MID$ MKDIR MKD$ MKI$ MKS$ MOD NAME NEW NEXT NOISE NOT OCT$ ON OR PEN PLAY STRIG OPEN OPTION ' +\n          'BASE OUT PAINT PALETTE PCOPY PEEK PMAP POINT POKE POS PRINT PRINT] PSET PRESET ' +\n          'PUT RANDOMIZE READ REM RENUM RESET|0 RESTORE RESUME RETURN|0 RIGHT$ RMDIR RND RSET ' +\n          'RUN SAVE SCREEN SGN SHELL SIN SOUND SPACE$ SPC SQR STEP STICK STOP STR$ STRING$ SWAP ' +\n          'SYSTEM TAB TAN TIME$ TIMER TROFF TRON TO USR VAL VARPTR VARPTR$ VIEW WAIT WHILE ' +\n          'WEND WIDTH WINDOW WRITE XOR'\n    },\n    contains: [\n      hljs.QUOTE_STRING_MODE,\n      hljs.COMMENT('REM', '$', {relevance: 10}),\n      hljs.COMMENT('\\'', '$', {relevance: 0}),\n      {\n        // Match line numbers\n        className: 'symbol',\n        begin: '^[0-9]+\\ ',\n        relevance: 10\n      },\n      {\n        // Match typed numeric constants (1000, 12.34!, 1.2e5, 1.5#, 1.2D2)\n        className: 'number',\n        begin: '\\\\b([0-9]+[0-9edED\\.]*[#\\!]?)',\n        relevance: 0\n      },\n      {\n        // Match hexadecimal numbers (&Hxxxx)\n        className: 'number',\n        begin: '(\\&[hH][0-9a-fA-F]{1,4})'\n      },\n      {\n        // Match octal numbers (&Oxxxxxx)\n        className: 'number',\n        begin: '(\\&[oO][0-7]{1,6})'\n      }\n    ]\n  };\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/languages/bnf.js",
    "content": "/*\nLanguage: Backus–Naur Form\nAuthor: Oleg Efimov <efimovov@gmail.com>\n*/\n\nfunction(hljs){\n  return {\n    contains: [\n      // Attribute\n      {\n        className: 'attribute',\n        begin: /</, end: />/\n      },\n      // Specific\n      {\n        begin: /::=/,\n        starts: {\n          end: /$/,\n          contains: [\n            {\n              begin: /</, end: />/\n            },\n            // Common\n            hljs.C_LINE_COMMENT_MODE,\n            hljs.C_BLOCK_COMMENT_MODE,\n            hljs.APOS_STRING_MODE,\n            hljs.QUOTE_STRING_MODE\n          ]\n        }\n      }\n    ]\n  };\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/languages/brainfuck.js",
    "content": "/*\nLanguage: Brainfuck\nAuthor: Evgeny Stepanischev <imbolk@gmail.com>\n*/\n\nfunction(hljs){\n  var LITERAL = {\n    className: 'literal',\n    begin: '[\\\\+\\\\-]',\n    relevance: 0\n  };\n  return {\n    aliases: ['bf'],\n    contains: [\n      hljs.COMMENT(\n        '[^\\\\[\\\\]\\\\.,\\\\+\\\\-<> \\r\\n]',\n        '[\\\\[\\\\]\\\\.,\\\\+\\\\-<> \\r\\n]',\n        {\n          returnEnd: true,\n          relevance: 0\n        }\n      ),\n      {\n        className: 'title',\n        begin: '[\\\\[\\\\]]',\n        relevance: 0\n      },\n      {\n        className: 'string',\n        begin: '[\\\\.,]',\n        relevance: 0\n      },\n      {\n        // this mode works as the only relevance counter\n        begin: /\\+\\+|\\-\\-/, returnBegin: true,\n        contains: [LITERAL]\n      },\n      LITERAL\n    ]\n  };\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/languages/cal.js",
    "content": "/*\nLanguage: C/AL\nAuthor: Kenneth Fuglsang Christensen <kfuglsang@gmail.com>\nDescription: Provides highlighting of Microsoft Dynamics NAV C/AL code files\n*/\n\nfunction(hljs) {\n  var KEYWORDS =\n    'div mod in and or not xor asserterror begin case do downto else end exit for if of repeat then to ' +\n    'until while with var';\n  var LITERALS = 'false true';\n  var COMMENT_MODES = [\n    hljs.C_LINE_COMMENT_MODE,\n    hljs.COMMENT(\n      /\\{/,\n      /\\}/,\n      {\n        relevance: 0\n      }\n    ),\n    hljs.COMMENT(\n      /\\(\\*/,\n      /\\*\\)/,\n      {\n        relevance: 10\n      }\n    )\n  ];\n  var STRING = {\n    className: 'string',\n    begin: /'/, end: /'/,\n    contains: [{begin: /''/}]\n  };\n  var CHAR_STRING = {\n    className: 'string', begin: /(#\\d+)+/\n  };\n  var DATE = {\n      className: 'number',\n      begin: '\\\\b\\\\d+(\\\\.\\\\d+)?(DT|D|T)',\n      relevance: 0\n  };\n  var DBL_QUOTED_VARIABLE = {\n      className: 'string', // not a string technically but makes sense to be highlighted in the same style\n      begin: '\"',\n      end: '\"'\n  };\n\n  var PROCEDURE = {\n    className: 'function',\n    beginKeywords: 'procedure', end: /[:;]/,\n    keywords: 'procedure|10',\n    contains: [\n      hljs.TITLE_MODE,\n      {\n        className: 'params',\n        begin: /\\(/, end: /\\)/,\n        keywords: KEYWORDS,\n        contains: [STRING, CHAR_STRING]\n      }\n    ].concat(COMMENT_MODES)\n  };\n\n  var OBJECT = {\n    className: 'class',\n    begin: 'OBJECT (Table|Form|Report|Dataport|Codeunit|XMLport|MenuSuite|Page|Query) (\\\\d+) ([^\\\\r\\\\n]+)',\n    returnBegin: true,\n    contains: [\n      hljs.TITLE_MODE,\n        PROCEDURE\n    ]\n  };\n\n  return {\n    case_insensitive: true,\n    keywords: { keyword: KEYWORDS, literal: LITERALS },\n    illegal: /\\/\\*/,\n    contains: [\n      STRING, CHAR_STRING,\n      DATE, DBL_QUOTED_VARIABLE,\n      hljs.NUMBER_MODE,\n      OBJECT,\n      PROCEDURE\n    ]\n  };\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/languages/capnproto.js",
    "content": "/*\nLanguage: Cap’n Proto\nAuthor: Oleg Efimov <efimovov@gmail.com>\nDescription: Cap’n Proto message definition format\nCategory: protocols\n*/\n\nfunction(hljs) {\n  return {\n    aliases: ['capnp'],\n    keywords: {\n      keyword:\n        'struct enum interface union group import using const annotation extends in of on as with from fixed',\n      built_in:\n        'Void Bool Int8 Int16 Int32 Int64 UInt8 UInt16 UInt32 UInt64 Float32 Float64 ' +\n        'Text Data AnyPointer AnyStruct Capability List',\n      literal:\n        'true false'\n    },\n    contains: [\n      hljs.QUOTE_STRING_MODE,\n      hljs.NUMBER_MODE,\n      hljs.HASH_COMMENT_MODE,\n      {\n        className: 'meta',\n        begin: /@0x[\\w\\d]{16};/,\n        illegal: /\\n/\n      },\n      {\n        className: 'symbol',\n        begin: /@\\d+\\b/\n      },\n      {\n        className: 'class',\n        beginKeywords: 'struct enum', end: /\\{/,\n        illegal: /\\n/,\n        contains: [\n          hljs.inherit(hljs.TITLE_MODE, {\n            starts: {endsWithParent: true, excludeEnd: true} // hack: eating everything after the first title\n          })\n        ]\n      },\n      {\n        className: 'class',\n        beginKeywords: 'interface', end: /\\{/,\n        illegal: /\\n/,\n        contains: [\n          hljs.inherit(hljs.TITLE_MODE, {\n            starts: {endsWithParent: true, excludeEnd: true} // hack: eating everything after the first title\n          })\n        ]\n      }\n    ]\n  };\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/languages/ceylon.js",
    "content": "/*\nLanguage: Ceylon\nAuthor: Lucas Werkmeister <mail@lucaswerkmeister.de>\n*/\nfunction(hljs) {\n  // 2.3. Identifiers and keywords\n  var KEYWORDS =\n    'assembly module package import alias class interface object given value ' +\n    'assign void function new of extends satisfies abstracts in out return ' +\n    'break continue throw assert dynamic if else switch case for while try ' +\n    'catch finally then let this outer super is exists nonempty';\n  // 7.4.1 Declaration Modifiers\n  var DECLARATION_MODIFIERS =\n    'shared abstract formal default actual variable late native deprecated' +\n    'final sealed annotation suppressWarnings small';\n  // 7.4.2 Documentation\n  var DOCUMENTATION =\n    'doc by license see throws tagged';\n  var SUBST = {\n    className: 'subst', excludeBegin: true, excludeEnd: true,\n    begin: /``/, end: /``/,\n    keywords: KEYWORDS,\n    relevance: 10\n  };\n  var EXPRESSIONS = [\n    {\n      // verbatim string\n      className: 'string',\n      begin: '\"\"\"',\n      end: '\"\"\"',\n      relevance: 10\n    },\n    {\n      // string literal or template\n      className: 'string',\n      begin: '\"', end: '\"',\n      contains: [SUBST]\n    },\n    {\n      // character literal\n      className: 'string',\n      begin: \"'\",\n      end: \"'\"\n    },\n    {\n      // numeric literal\n      className: 'number',\n      begin: '#[0-9a-fA-F_]+|\\\\$[01_]+|[0-9_]+(?:\\\\.[0-9_](?:[eE][+-]?\\\\d+)?)?[kMGTPmunpf]?',\n      relevance: 0\n    }\n  ];\n  SUBST.contains = EXPRESSIONS;\n\n  return {\n    keywords: {\n      keyword: KEYWORDS + ' ' + DECLARATION_MODIFIERS,\n      meta: DOCUMENTATION\n    },\n    illegal: '\\\\$[^01]|#[^0-9a-fA-F]',\n    contains: [\n      hljs.C_LINE_COMMENT_MODE,\n      hljs.COMMENT('/\\\\*', '\\\\*/', {contains: ['self']}),\n      {\n        // compiler annotation\n        className: 'meta',\n        begin: '@[a-z]\\\\w*(?:\\\\:\\\"[^\\\"]*\\\")?'\n      }\n    ].concat(EXPRESSIONS)\n  };\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/languages/clean.js",
    "content": "/*\nLanguage: Clean\nAuthor: Camil Staps <info@camilstaps.nl>\nCategory: functional\nWebsite: http://clean.cs.ru.nl\n*/\n\nfunction(hljs) {\n  return {\n    aliases: ['clean','icl','dcl'],\n    keywords: {\n      keyword:\n        'if let in with where case of class instance otherwise ' +\n        'implementation definition system module from import qualified as ' +\n        'special code inline foreign export ccall stdcall generic derive ' +\n        'infix infixl infixr',\n      literal:\n        'True False'\n    },\n    contains: [\n\n      hljs.C_LINE_COMMENT_MODE,\n      hljs.C_BLOCK_COMMENT_MODE,\n      hljs.APOS_STRING_MODE,\n      hljs.QUOTE_STRING_MODE,\n      hljs.C_NUMBER_MODE,\n\n      {begin: '->|<-[|:]?|::|#!?|>>=|\\\\{\\\\||\\\\|\\\\}|:==|=:|\\\\.\\\\.|<>|`'} // relevance booster\n    ]\n  };\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/languages/clojure-repl.js",
    "content": "/*\nLanguage: Clojure REPL\nDescription: Clojure REPL sessions\nAuthor: Ivan Sagalaev <maniac@softwaremaniacs.org>\nRequires: clojure.js\nCategory: lisp\n*/\n\nfunction(hljs) {\n  return {\n    contains: [\n      {\n        className: 'meta',\n        begin: /^([\\w.-]+|\\s*#_)=>/,\n        starts: {\n          end: /$/,\n          subLanguage: 'clojure'\n        }\n      }\n    ]\n  }\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/languages/clojure.js",
    "content": "/*\nLanguage: Clojure\nDescription: Clojure syntax (based on lisp.js)\nAuthor: mfornos\nCategory: lisp\n*/\n\nfunction(hljs) {\n  var keywords = {\n    'builtin-name':\n      // Clojure keywords\n      'def defonce cond apply if-not if-let if not not= = < > <= >= == + / * - rem '+\n      'quot neg? pos? delay? symbol? keyword? true? false? integer? empty? coll? list? '+\n      'set? ifn? fn? associative? sequential? sorted? counted? reversible? number? decimal? '+\n      'class? distinct? isa? float? rational? reduced? ratio? odd? even? char? seq? vector? '+\n      'string? map? nil? contains? zero? instance? not-every? not-any? libspec? -> ->> .. . '+\n      'inc compare do dotimes mapcat take remove take-while drop letfn drop-last take-last '+\n      'drop-while while intern condp case reduced cycle split-at split-with repeat replicate '+\n      'iterate range merge zipmap declare line-seq sort comparator sort-by dorun doall nthnext '+\n      'nthrest partition eval doseq await await-for let agent atom send send-off release-pending-sends '+\n      'add-watch mapv filterv remove-watch agent-error restart-agent set-error-handler error-handler '+\n      'set-error-mode! error-mode shutdown-agents quote var fn loop recur throw try monitor-enter '+\n      'monitor-exit defmacro defn defn- macroexpand macroexpand-1 for dosync and or '+\n      'when when-not when-let comp juxt partial sequence memoize constantly complement identity assert '+\n      'peek pop doto proxy defstruct first rest cons defprotocol cast coll deftype defrecord last butlast '+\n      'sigs reify second ffirst fnext nfirst nnext defmulti defmethod meta with-meta ns in-ns create-ns import '+\n      'refer keys select-keys vals key val rseq name namespace promise into transient persistent! conj! '+\n      'assoc! dissoc! pop! disj! use class type num float double short byte boolean bigint biginteger '+\n      'bigdec print-method print-dup throw-if printf format load compile get-in update-in pr pr-on newline '+\n      'flush read slurp read-line subvec with-open memfn time re-find re-groups rand-int rand mod locking '+\n      'assert-valid-fdecl alias resolve ref deref refset swap! reset! set-validator! compare-and-set! alter-meta! '+\n      'reset-meta! commute get-validator alter ref-set ref-history-count ref-min-history ref-max-history ensure sync io! '+\n      'new next conj set! to-array future future-call into-array aset gen-class reduce map filter find empty '+\n      'hash-map hash-set sorted-map sorted-map-by sorted-set sorted-set-by vec vector seq flatten reverse assoc dissoc list '+\n      'disj get union difference intersection extend extend-type extend-protocol int nth delay count concat chunk chunk-buffer '+\n      'chunk-append chunk-first chunk-rest max min dec unchecked-inc-int unchecked-inc unchecked-dec-inc unchecked-dec unchecked-negate '+\n      'unchecked-add-int unchecked-add unchecked-subtract-int unchecked-subtract chunk-next chunk-cons chunked-seq? prn vary-meta '+\n      'lazy-seq spread list* str find-keyword keyword symbol gensym force rationalize'\n   };\n\n  var SYMBOLSTART = 'a-zA-Z_\\\\-!.?+*=<>&#\\'';\n  var SYMBOL_RE = '[' + SYMBOLSTART + '][' + SYMBOLSTART + '0-9/;:]*';\n  var SIMPLE_NUMBER_RE = '[-+]?\\\\d+(\\\\.\\\\d+)?';\n\n  var SYMBOL = {\n    begin: SYMBOL_RE,\n    relevance: 0\n  };\n  var NUMBER = {\n    className: 'number', begin: SIMPLE_NUMBER_RE,\n    relevance: 0\n  };\n  var STRING = hljs.inherit(hljs.QUOTE_STRING_MODE, {illegal: null});\n  var COMMENT = hljs.COMMENT(\n    ';',\n    '$',\n    {\n      relevance: 0\n    }\n  );\n  var LITERAL = {\n    className: 'literal',\n    begin: /\\b(true|false|nil)\\b/\n  };\n  var COLLECTION = {\n    begin: '[\\\\[\\\\{]', end: '[\\\\]\\\\}]'\n  };\n  var HINT = {\n    className: 'comment',\n    begin: '\\\\^' + SYMBOL_RE\n  };\n  var HINT_COL = hljs.COMMENT('\\\\^\\\\{', '\\\\}');\n  var KEY = {\n    className: 'symbol',\n    begin: '[:]{1,2}' + SYMBOL_RE\n  };\n  var LIST = {\n    begin: '\\\\(', end: '\\\\)'\n  };\n  var BODY = {\n    endsWithParent: true,\n    relevance: 0\n  };\n  var NAME = {\n    keywords: keywords,\n    lexemes: SYMBOL_RE,\n    className: 'name', begin: SYMBOL_RE,\n    starts: BODY\n  };\n  var DEFAULT_CONTAINS = [LIST, STRING, HINT, HINT_COL, COMMENT, KEY, COLLECTION, NUMBER, LITERAL, SYMBOL];\n\n  LIST.contains = [hljs.COMMENT('comment', ''), NAME, BODY];\n  BODY.contains = DEFAULT_CONTAINS;\n  COLLECTION.contains = DEFAULT_CONTAINS;\n\n  return {\n    aliases: ['clj'],\n    illegal: /\\S/,\n    contains: [LIST, STRING, HINT, HINT_COL, COMMENT, KEY, COLLECTION, NUMBER, LITERAL]\n  }\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/languages/cmake.js",
    "content": "/*\nLanguage: CMake\nDescription: CMake is an open-source cross-platform system for build automation.\nAuthor: Igor Kalnitsky <igor@kalnitsky.org>\nWebsite: http://kalnitsky.org/\n*/\n\nfunction(hljs) {\n  return {\n    aliases: ['cmake.in'],\n    case_insensitive: true,\n    keywords: {\n      keyword:\n        'add_custom_command add_custom_target add_definitions add_dependencies ' +\n        'add_executable add_library add_subdirectory add_test aux_source_directory ' +\n        'break build_command cmake_minimum_required cmake_policy configure_file ' +\n        'create_test_sourcelist define_property else elseif enable_language enable_testing ' +\n        'endforeach endfunction endif endmacro endwhile execute_process export find_file ' +\n        'find_library find_package find_path find_program fltk_wrap_ui foreach function ' +\n        'get_cmake_property get_directory_property get_filename_component get_property ' +\n        'get_source_file_property get_target_property get_test_property if include ' +\n        'include_directories include_external_msproject include_regular_expression install ' +\n        'link_directories load_cache load_command macro mark_as_advanced message option ' +\n        'output_required_files project qt_wrap_cpp qt_wrap_ui remove_definitions return ' +\n        'separate_arguments set set_directory_properties set_property ' +\n        'set_source_files_properties set_target_properties set_tests_properties site_name ' +\n        'source_group string target_link_libraries try_compile try_run unset variable_watch ' +\n        'while build_name exec_program export_library_dependencies install_files ' +\n        'install_programs install_targets link_libraries make_directory remove subdir_depends ' +\n        'subdirs use_mangled_mesa utility_source variable_requires write_file ' +\n        'qt5_use_modules qt5_use_package qt5_wrap_cpp on off true false and or ' +\n        'equal less greater strless strgreater strequal matches'\n    },\n    contains: [\n      {\n        className: 'variable',\n        begin: '\\\\${', end: '}'\n      },\n      hljs.HASH_COMMENT_MODE,\n      hljs.QUOTE_STRING_MODE,\n      hljs.NUMBER_MODE\n    ]\n  };\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/languages/coffeescript.js",
    "content": "/*\nLanguage: CoffeeScript\nAuthor: Dmytrii Nagirniak <dnagir@gmail.com>\nContributors: Oleg Efimov <efimovov@gmail.com>, Cédric Néhémie <cedric.nehemie@gmail.com>\nDescription: CoffeeScript is a programming language that transcompiles to JavaScript. For info about language see http://coffeescript.org/\nCategory: common, scripting\n*/\n\nfunction(hljs) {\n  var KEYWORDS = {\n    keyword:\n      // JS keywords\n      'in if for while finally new do return else break catch instanceof throw try this ' +\n      'switch continue typeof delete debugger super ' +\n      // Coffee keywords\n      'then unless until loop of by when and or is isnt not',\n    literal:\n      // JS literals\n      'true false null undefined ' +\n      // Coffee literals\n      'yes no on off',\n    built_in:\n      'npm require console print module global window document'\n  };\n  var JS_IDENT_RE = '[A-Za-z$_][0-9A-Za-z$_]*';\n  var SUBST = {\n    className: 'subst',\n    begin: /#\\{/, end: /}/,\n    keywords: KEYWORDS\n  };\n  var EXPRESSIONS = [\n    hljs.BINARY_NUMBER_MODE,\n    hljs.inherit(hljs.C_NUMBER_MODE, {starts: {end: '(\\\\s*/)?', relevance: 0}}), // a number tries to eat the following slash to prevent treating it as a regexp\n    {\n      className: 'string',\n      variants: [\n        {\n          begin: /'''/, end: /'''/,\n          contains: [hljs.BACKSLASH_ESCAPE]\n        },\n        {\n          begin: /'/, end: /'/,\n          contains: [hljs.BACKSLASH_ESCAPE]\n        },\n        {\n          begin: /\"\"\"/, end: /\"\"\"/,\n          contains: [hljs.BACKSLASH_ESCAPE, SUBST]\n        },\n        {\n          begin: /\"/, end: /\"/,\n          contains: [hljs.BACKSLASH_ESCAPE, SUBST]\n        }\n      ]\n    },\n    {\n      className: 'regexp',\n      variants: [\n        {\n          begin: '///', end: '///',\n          contains: [SUBST, hljs.HASH_COMMENT_MODE]\n        },\n        {\n          begin: '//[gim]*',\n          relevance: 0\n        },\n        {\n          // regex can't start with space to parse x / 2 / 3 as two divisions\n          // regex can't start with *, and it supports an \"illegal\" in the main mode\n          begin: /\\/(?![ *])(\\\\\\/|.)*?\\/[gim]*(?=\\W|$)/\n        }\n      ]\n    },\n    {\n      begin: '@' + JS_IDENT_RE // relevance booster\n    },\n    {\n      begin: '`', end: '`',\n      excludeBegin: true, excludeEnd: true,\n      subLanguage: 'javascript'\n    }\n  ];\n  SUBST.contains = EXPRESSIONS;\n\n  var TITLE = hljs.inherit(hljs.TITLE_MODE, {begin: JS_IDENT_RE});\n  var PARAMS_RE = '(\\\\(.*\\\\))?\\\\s*\\\\B[-=]>';\n  var PARAMS = {\n    className: 'params',\n    begin: '\\\\([^\\\\(]', returnBegin: true,\n    /* We need another contained nameless mode to not have every nested\n    pair of parens to be called \"params\" */\n    contains: [{\n      begin: /\\(/, end: /\\)/,\n      keywords: KEYWORDS,\n      contains: ['self'].concat(EXPRESSIONS)\n    }]\n  };\n\n  return {\n    aliases: ['coffee', 'cson', 'iced'],\n    keywords: KEYWORDS,\n    illegal: /\\/\\*/,\n    contains: EXPRESSIONS.concat([\n      hljs.COMMENT('###', '###'),\n      hljs.HASH_COMMENT_MODE,\n      {\n        className: 'function',\n        begin: '^\\\\s*' + JS_IDENT_RE + '\\\\s*=\\\\s*' + PARAMS_RE, end: '[-=]>',\n        returnBegin: true,\n        contains: [TITLE, PARAMS]\n      },\n      {\n        // anonymous function start\n        begin: /[:\\(,=]\\s*/,\n        relevance: 0,\n        contains: [\n          {\n            className: 'function',\n            begin: PARAMS_RE, end: '[-=]>',\n            returnBegin: true,\n            contains: [PARAMS]\n          }\n        ]\n      },\n      {\n        className: 'class',\n        beginKeywords: 'class',\n        end: '$',\n        illegal: /[:=\"\\[\\]]/,\n        contains: [\n          {\n            beginKeywords: 'extends',\n            endsWithParent: true,\n            illegal: /[:=\"\\[\\]]/,\n            contains: [TITLE]\n          },\n          TITLE\n        ]\n      },\n      {\n        begin: JS_IDENT_RE + ':', end: ':',\n        returnBegin: true, returnEnd: true,\n        relevance: 0\n      }\n    ])\n  };\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/languages/coq.js",
    "content": "/*\nLanguage: Coq\nAuthor: Stephan Boyer <stephan@stephanboyer.com>\nCategory: functional\n*/\n\nfunction(hljs) {\n  return {\n    keywords: {\n      keyword:\n        '_ as at cofix else end exists exists2 fix for forall fun if IF in let ' +\n        'match mod Prop return Set then Type using where with ' +\n        'Abort About Add Admit Admitted All Arguments Assumptions Axiom Back BackTo ' +\n        'Backtrack Bind Blacklist Canonical Cd Check Class Classes Close Coercion ' +\n        'Coercions CoFixpoint CoInductive Collection Combined Compute Conjecture ' +\n        'Conjectures Constant constr Constraint Constructors Context Corollary ' +\n        'CreateHintDb Cut Declare Defined Definition Delimit Dependencies Dependent' +\n        'Derive Drop eauto End Equality Eval Example Existential Existentials ' +\n        'Existing Export exporting Extern Extract Extraction Fact Field Fields File ' +\n        'Fixpoint Focus for From Function Functional Generalizable Global Goal Grab ' +\n        'Grammar Graph Guarded Heap Hint HintDb Hints Hypotheses Hypothesis ident ' +\n        'Identity If Immediate Implicit Import Include Inductive Infix Info Initial ' +\n        'Inline Inspect Instance Instances Intro Intros Inversion Inversion_clear ' +\n        'Language Left Lemma Let Libraries Library Load LoadPath Local Locate Ltac ML ' +\n        'Mode Module Modules Monomorphic Morphism Next NoInline Notation Obligation ' +\n        'Obligations Opaque Open Optimize Options Parameter Parameters Parametric ' +\n        'Path Paths pattern Polymorphic Preterm Print Printing Program Projections ' +\n        'Proof Proposition Pwd Qed Quit Rec Record Recursive Redirect Relation Remark ' +\n        'Remove Require Reserved Reset Resolve Restart Rewrite Right Ring Rings Save ' +\n        'Scheme Scope Scopes Script Search SearchAbout SearchHead SearchPattern ' +\n        'SearchRewrite Section Separate Set Setoid Show Solve Sorted Step Strategies ' +\n        'Strategy Structure SubClass Table Tables Tactic Term Test Theorem Time ' +\n        'Timeout Transparent Type Typeclasses Types Undelimit Undo Unfocus Unfocused ' +\n        'Unfold Universe Universes Unset Unshelve using Variable Variables Variant ' +\n        'Verbose Visibility where with',\n      built_in:\n        'abstract absurd admit after apply as assert assumption at auto autorewrite ' +\n        'autounfold before bottom btauto by case case_eq cbn cbv change ' +\n        'classical_left classical_right clear clearbody cofix compare compute ' +\n        'congruence constr_eq constructor contradict contradiction cut cutrewrite ' +\n        'cycle decide decompose dependent destruct destruction dintuition ' +\n        'discriminate discrR do double dtauto eapply eassumption eauto ecase ' +\n        'econstructor edestruct ediscriminate eelim eexact eexists einduction ' +\n        'einjection eleft elim elimtype enough equality erewrite eright ' +\n        'esimplify_eq esplit evar exact exactly_once exfalso exists f_equal fail ' +\n        'field field_simplify field_simplify_eq first firstorder fix fold fourier ' +\n        'functional generalize generalizing gfail give_up has_evar hnf idtac in ' +\n        'induction injection instantiate intro intro_pattern intros intuition ' +\n        'inversion inversion_clear is_evar is_var lapply lazy left lia lra move ' +\n        'native_compute nia nsatz omega once pattern pose progress proof psatz quote ' +\n        'record red refine reflexivity remember rename repeat replace revert ' +\n        'revgoals rewrite rewrite_strat right ring ring_simplify rtauto set ' +\n        'setoid_reflexivity setoid_replace setoid_rewrite setoid_symmetry ' +\n        'setoid_transitivity shelve shelve_unifiable simpl simple simplify_eq solve ' +\n        'specialize split split_Rabs split_Rmult stepl stepr subst sum swap ' +\n        'symmetry tactic tauto time timeout top transitivity trivial try tryif ' +\n        'unfold unify until using vm_compute with'\n    },\n    contains: [\n      hljs.QUOTE_STRING_MODE,\n      hljs.COMMENT('\\\\(\\\\*', '\\\\*\\\\)'),\n      hljs.C_NUMBER_MODE,\n      {\n        className: 'type',\n        excludeBegin: true,\n        begin: '\\\\|\\\\s*',\n        end: '\\\\w+'\n      },\n      {begin: /[-=]>/} // relevance booster\n    ]\n  };\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/languages/cos.js",
    "content": "/*\nLanguage: Caché Object Script\nAuthor: Nikita Savchenko <zitros.lab@gmail.com>\nCategory: enterprise, scripting\n*/\nfunction cos (hljs) {\n\n  var STRINGS = {\n    className: 'string',\n    variants: [\n      {\n        begin: '\"',\n        end: '\"',\n        contains: [{ // escaped\n          begin: \"\\\"\\\"\",\n          relevance: 0\n        }]\n      }\n    ]\n  };\n\n  var NUMBERS = {\n    className: \"number\",\n    begin: \"\\\\b(\\\\d+(\\\\.\\\\d*)?|\\\\.\\\\d+)\",\n    relevance: 0\n  };\n\n  var COS_KEYWORDS =\n    'property parameter class classmethod clientmethod extends as break ' +\n    'catch close continue do d|0 else elseif for goto halt hang h|0 if job ' +\n    'j|0 kill k|0 lock l|0 merge new open quit q|0 read r|0 return set s|0 ' +\n    'tcommit throw trollback try tstart use view while write w|0 xecute x|0 ' +\n    'zkill znspace zn ztrap zwrite zw zzdump zzwrite print zbreak zinsert ' +\n    'zload zprint zremove zsave zzprint mv mvcall mvcrt mvdim mvprint zquit ' +\n    'zsync ascii';\n\n    // registered function - no need in them due to all functions are highlighted,\n    // but I'll just leave this here.\n\n    //\"$bit\", \"$bitcount\",\n    //\"$bitfind\", \"$bitlogic\", \"$case\", \"$char\", \"$classmethod\", \"$classname\",\n    //\"$compile\", \"$data\", \"$decimal\", \"$double\", \"$extract\", \"$factor\",\n    //\"$find\", \"$fnumber\", \"$get\", \"$increment\", \"$inumber\", \"$isobject\",\n    //\"$isvaliddouble\", \"$isvalidnum\", \"$justify\", \"$length\", \"$list\",\n    //\"$listbuild\", \"$listdata\", \"$listfind\", \"$listfromstring\", \"$listget\",\n    //\"$listlength\", \"$listnext\", \"$listsame\", \"$listtostring\", \"$listvalid\",\n    //\"$locate\", \"$match\", \"$method\", \"$name\", \"$nconvert\", \"$next\",\n    //\"$normalize\", \"$now\", \"$number\", \"$order\", \"$parameter\", \"$piece\",\n    //\"$prefetchoff\", \"$prefetchon\", \"$property\", \"$qlength\", \"$qsubscript\",\n    //\"$query\", \"$random\", \"$replace\", \"$reverse\", \"$sconvert\", \"$select\",\n    //\"$sortbegin\", \"$sortend\", \"$stack\", \"$text\", \"$translate\", \"$view\",\n    //\"$wascii\", \"$wchar\", \"$wextract\", \"$wfind\", \"$wiswide\", \"$wlength\",\n    //\"$wreverse\", \"$xecute\", \"$zabs\", \"$zarccos\", \"$zarcsin\", \"$zarctan\",\n    //\"$zcos\", \"$zcot\", \"$zcsc\", \"$zdate\", \"$zdateh\", \"$zdatetime\",\n    //\"$zdatetimeh\", \"$zexp\", \"$zhex\", \"$zln\", \"$zlog\", \"$zpower\", \"$zsec\",\n    //\"$zsin\", \"$zsqr\", \"$ztan\", \"$ztime\", \"$ztimeh\", \"$zboolean\",\n    //\"$zconvert\", \"$zcrc\", \"$zcyc\", \"$zdascii\", \"$zdchar\", \"$zf\",\n    //\"$ziswide\", \"$zlascii\", \"$zlchar\", \"$zname\", \"$zposition\", \"$zqascii\",\n    //\"$zqchar\", \"$zsearch\", \"$zseek\", \"$zstrip\", \"$zwascii\", \"$zwchar\",\n    //\"$zwidth\", \"$zwpack\", \"$zwbpack\", \"$zwunpack\", \"$zwbunpack\", \"$zzenkaku\",\n    //\"$change\", \"$mv\", \"$mvat\", \"$mvfmt\", \"$mvfmts\", \"$mviconv\",\n    //\"$mviconvs\", \"$mvinmat\", \"$mvlover\", \"$mvoconv\", \"$mvoconvs\", \"$mvraise\",\n    //\"$mvtrans\", \"$mvv\", \"$mvname\", \"$zbitand\", \"$zbitcount\", \"$zbitfind\",\n    //\"$zbitget\", \"$zbitlen\", \"$zbitnot\", \"$zbitor\", \"$zbitset\", \"$zbitstr\",\n    //\"$zbitxor\", \"$zincrement\", \"$znext\", \"$zorder\", \"$zprevious\", \"$zsort\",\n    //\"device\", \"$ecode\", \"$estack\", \"$etrap\", \"$halt\", \"$horolog\",\n    //\"$io\", \"$job\", \"$key\", \"$namespace\", \"$principal\", \"$quit\", \"$roles\",\n    //\"$storage\", \"$system\", \"$test\", \"$this\", \"$tlevel\", \"$username\",\n    //\"$x\", \"$y\", \"$za\", \"$zb\", \"$zchild\", \"$zeof\", \"$zeos\", \"$zerror\",\n    //\"$zhorolog\", \"$zio\", \"$zjob\", \"$zmode\", \"$znspace\", \"$zparent\", \"$zpi\",\n    //\"$zpos\", \"$zreference\", \"$zstorage\", \"$ztimestamp\", \"$ztimezone\",\n    //\"$ztrap\", \"$zversion\"\n\n  return {\n    case_insensitive: true,\n    aliases: [\"cos\", \"cls\"],\n    keywords: COS_KEYWORDS,\n    contains: [\n      NUMBERS,\n      STRINGS,\n      hljs.C_LINE_COMMENT_MODE,\n      hljs.C_BLOCK_COMMENT_MODE,\n      {\n        className: \"comment\",\n        begin: /;/, end: \"$\",\n        relevance: 0\n      },\n      { // Functions and user-defined functions: write $ztime(60*60*3), $$myFunc(10), $$^Val(1)\n        className: \"built_in\",\n        begin: /(?:\\$\\$?|\\.\\.)\\^?[a-zA-Z]+/\n      },\n      { // Macro command: quit $$$OK\n        className: \"built_in\",\n        begin: /\\$\\$\\$[a-zA-Z]+/\n      },\n      { // Special (global) variables: write %request.Content; Built-in classes: %Library.Integer\n        className: \"built_in\",\n        begin: /%[a-z]+(?:\\.[a-z]+)*/\n      },\n      { // Global variable: set ^globalName = 12 write ^globalName\n        className: \"symbol\",\n        begin: /\\^%?[a-zA-Z][\\w]*/\n      },\n      { // Some control constructions: do ##class(Package.ClassName).Method(), ##super()\n        className: \"keyword\",\n        begin: /##class|##super|#define|#dim/\n      },\n\n      // sub-languages: are not fully supported by hljs by 11/15/2015\n      // left for the future implementation.\n      {\n        begin: /&sql\\(/,    end: /\\)/,\n        excludeBegin: true, excludeEnd: true,\n        subLanguage: \"sql\"\n      },\n      {\n        begin: /&(js|jscript|javascript)</, end: />/,\n        excludeBegin: true, excludeEnd: true,\n        subLanguage: \"javascript\"\n      },\n      {\n        // this brakes first and last tag, but this is the only way to embed a valid html\n        begin: /&html<\\s*</, end: />\\s*>/,\n        subLanguage: \"xml\"\n      }\n    ]\n  };\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/languages/cpp.js",
    "content": "/*\nLanguage: C++\nAuthor: Ivan Sagalaev <maniac@softwaremaniacs.org>\nContributors: Evgeny Stepanischev <imbolk@gmail.com>, Zaven Muradyan <megalivoithos@gmail.com>, Roel Deckers <admin@codingcat.nl>\nCategory: common, system\n*/\n\nfunction(hljs) {\n  var CPP_PRIMITIVE_TYPES = {\n    className: 'keyword',\n    begin: '\\\\b[a-z\\\\d_]*_t\\\\b'\n  };\n\n  var STRINGS = {\n    className: 'string',\n    variants: [\n      {\n        begin: '(u8?|U)?L?\"', end: '\"',\n        illegal: '\\\\n',\n        contains: [hljs.BACKSLASH_ESCAPE]\n      },\n      {\n        begin: '(u8?|U)?R\"', end: '\"',\n        contains: [hljs.BACKSLASH_ESCAPE]\n      },\n      {\n        begin: '\\'\\\\\\\\?.', end: '\\'',\n        illegal: '.'\n      }\n    ]\n  };\n\n  var NUMBERS = {\n    className: 'number',\n    variants: [\n      { begin: '\\\\b(0b[01\\']+)' },\n      { begin: '\\\\b([\\\\d\\']+(\\\\.[\\\\d\\']*)?|\\\\.[\\\\d\\']+)(u|U|l|L|ul|UL|f|F|b|B)' },\n      { begin: '(-?)(\\\\b0[xX][a-fA-F0-9\\']+|(\\\\b[\\\\d\\']+(\\\\.[\\\\d\\']*)?|\\\\.[\\\\d\\']+)([eE][-+]?[\\\\d\\']+)?)' }\n    ],\n    relevance: 0\n  };\n\n  var PREPROCESSOR =       {\n    className: 'meta',\n    begin: /#\\s*[a-z]+\\b/, end: /$/,\n    keywords: {\n      'meta-keyword':\n        'if else elif endif define undef warning error line ' +\n        'pragma ifdef ifndef include'\n    },\n    contains: [\n      {\n        begin: /\\\\\\n/, relevance: 0\n      },\n      hljs.inherit(STRINGS, {className: 'meta-string'}),\n      {\n        className: 'meta-string',\n        begin: '<', end: '>',\n        illegal: '\\\\n',\n      },\n      hljs.C_LINE_COMMENT_MODE,\n      hljs.C_BLOCK_COMMENT_MODE\n    ]\n  };\n\n  var FUNCTION_TITLE = hljs.IDENT_RE + '\\\\s*\\\\(';\n\n  var CPP_KEYWORDS = {\n    keyword: 'int float while private char catch import module export virtual operator sizeof ' +\n      'dynamic_cast|10 typedef const_cast|10 const struct for static_cast|10 union namespace ' +\n      'unsigned long volatile static protected bool template mutable if public friend ' +\n      'do goto auto void enum else break extern using class asm case typeid ' +\n      'short reinterpret_cast|10 default double register explicit signed typename try this ' +\n      'switch continue inline delete alignof constexpr decltype ' +\n      'noexcept static_assert thread_local restrict _Bool complex _Complex _Imaginary ' +\n      'atomic_bool atomic_char atomic_schar ' +\n      'atomic_uchar atomic_short atomic_ushort atomic_int atomic_uint atomic_long atomic_ulong atomic_llong ' +\n      'atomic_ullong new throw return',\n    built_in: 'std string cin cout cerr clog stdin stdout stderr stringstream istringstream ostringstream ' +\n      'auto_ptr deque list queue stack vector map set bitset multiset multimap unordered_set ' +\n      'unordered_map unordered_multiset unordered_multimap array shared_ptr abort abs acos ' +\n      'asin atan2 atan calloc ceil cosh cos exit exp fabs floor fmod fprintf fputs free frexp ' +\n      'fscanf isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper ' +\n      'isxdigit tolower toupper labs ldexp log10 log malloc realloc memchr memcmp memcpy memset modf pow ' +\n      'printf putchar puts scanf sinh sin snprintf sprintf sqrt sscanf strcat strchr strcmp ' +\n      'strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr tanh tan ' +\n      'vfprintf vprintf vsprintf endl initializer_list unique_ptr',\n    literal: 'true false nullptr NULL'\n  };\n\n  var EXPRESSION_CONTAINS = [\n    CPP_PRIMITIVE_TYPES,\n    hljs.C_LINE_COMMENT_MODE,\n    hljs.C_BLOCK_COMMENT_MODE,\n    NUMBERS,\n    STRINGS\n  ];\n\n  return {\n    aliases: ['c', 'cc', 'h', 'c++', 'h++', 'hpp'],\n    keywords: CPP_KEYWORDS,\n    illegal: '</',\n    contains: EXPRESSION_CONTAINS.concat([\n      PREPROCESSOR,\n      {\n        begin: '\\\\b(deque|list|queue|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array)\\\\s*<', end: '>',\n        keywords: CPP_KEYWORDS,\n        contains: ['self', CPP_PRIMITIVE_TYPES]\n      },\n      {\n        begin: hljs.IDENT_RE + '::',\n        keywords: CPP_KEYWORDS\n      },\n      {\n        // This mode covers expression context where we can't expect a function\n        // definition and shouldn't highlight anything that looks like one:\n        // `return some()`, `else if()`, `(x*sum(1, 2))`\n        variants: [\n          {begin: /=/, end: /;/},\n          {begin: /\\(/, end: /\\)/},\n          {beginKeywords: 'new throw return else', end: /;/}\n        ],\n        keywords: CPP_KEYWORDS,\n        contains: EXPRESSION_CONTAINS.concat([\n          {\n            begin: /\\(/, end: /\\)/,\n            keywords: CPP_KEYWORDS,\n            contains: EXPRESSION_CONTAINS.concat(['self']),\n            relevance: 0\n          }\n        ]),\n        relevance: 0\n      },\n      {\n        className: 'function',\n        begin: '(' + hljs.IDENT_RE + '[\\\\*&\\\\s]+)+' + FUNCTION_TITLE,\n        returnBegin: true, end: /[{;=]/,\n        excludeEnd: true,\n        keywords: CPP_KEYWORDS,\n        illegal: /[^\\w\\s\\*&]/,\n        contains: [\n          {\n            begin: FUNCTION_TITLE, returnBegin: true,\n            contains: [hljs.TITLE_MODE],\n            relevance: 0\n          },\n          {\n            className: 'params',\n            begin: /\\(/, end: /\\)/,\n            keywords: CPP_KEYWORDS,\n            relevance: 0,\n            contains: [\n              hljs.C_LINE_COMMENT_MODE,\n              hljs.C_BLOCK_COMMENT_MODE,\n              STRINGS,\n              NUMBERS,\n              CPP_PRIMITIVE_TYPES\n            ]\n          },\n          hljs.C_LINE_COMMENT_MODE,\n          hljs.C_BLOCK_COMMENT_MODE,\n          PREPROCESSOR\n        ]\n      }\n    ]),\n    exports: {\n      preprocessor: PREPROCESSOR,\n      strings: STRINGS,\n      keywords: CPP_KEYWORDS\n    }\n  };\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/languages/crmsh.js",
    "content": "/*\nLanguage: crmsh\nAuthor: Kristoffer Gronlund <kgronlund@suse.com>\nWebsite: http://crmsh.github.io\nDescription: Syntax Highlighting for the crmsh DSL\nCategory: config\n*/\n\nfunction(hljs) {\n  var RESOURCES = 'primitive rsc_template';\n\n  var COMMANDS = 'group clone ms master location colocation order fencing_topology ' +\n      'rsc_ticket acl_target acl_group user role ' +\n      'tag xml';\n\n  var PROPERTY_SETS = 'property rsc_defaults op_defaults';\n\n  var KEYWORDS = 'params meta operations op rule attributes utilization';\n\n  var OPERATORS = 'read write deny defined not_defined in_range date spec in ' +\n      'ref reference attribute type xpath version and or lt gt tag ' +\n      'lte gte eq ne \\\\';\n\n  var TYPES = 'number string';\n\n  var LITERALS = 'Master Started Slave Stopped start promote demote stop monitor true false';\n\n  return {\n    aliases: ['crm', 'pcmk'],\n    case_insensitive: true,\n    keywords: {\n      keyword: KEYWORDS + ' ' + OPERATORS + ' ' + TYPES,\n      literal: LITERALS\n    },\n    contains: [\n      hljs.HASH_COMMENT_MODE,\n      {\n        beginKeywords: 'node',\n        starts: {\n          end: '\\\\s*([\\\\w_-]+:)?',\n          starts: {\n            className: 'title',\n            end: '\\\\s*[\\\\$\\\\w_][\\\\w_-]*'\n          }\n        }\n      },\n      {\n        beginKeywords: RESOURCES,\n        starts: {\n          className: 'title',\n          end: '\\\\s*[\\\\$\\\\w_][\\\\w_-]*',\n          starts: {\n            end: '\\\\s*@?[\\\\w_][\\\\w_\\\\.:-]*'\n          }\n        }\n      },\n      {\n        begin: '\\\\b(' + COMMANDS.split(' ').join('|') + ')\\\\s+',\n        keywords: COMMANDS,\n        starts: {\n          className: 'title',\n          end: '[\\\\$\\\\w_][\\\\w_-]*'\n        }\n      },\n      {\n        beginKeywords: PROPERTY_SETS,\n        starts: {\n          className: 'title',\n          end: '\\\\s*([\\\\w_-]+:)?'\n        }\n      },\n      hljs.QUOTE_STRING_MODE,\n      {\n        className: 'meta',\n        begin: '(ocf|systemd|service|lsb):[\\\\w_:-]+',\n        relevance: 0\n      },\n      {\n        className: 'number',\n        begin: '\\\\b\\\\d+(\\\\.\\\\d+)?(ms|s|h|m)?',\n        relevance: 0\n      },\n      {\n        className: 'literal',\n        begin: '[-]?(infinity|inf)',\n        relevance: 0\n      },\n      {\n        className: 'attr',\n        begin: /([A-Za-z\\$_\\#][\\w_-]+)=/,\n        relevance: 0\n      },\n      {\n        className: 'tag',\n        begin: '</?',\n        end: '/?>',\n        relevance: 0\n      }\n    ]\n  };\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/languages/crystal.js",
    "content": "/*\nLanguage: Crystal\nAuthor: TSUYUSATO Kitsune <make.just.on@gmail.com>\n*/\n\nfunction(hljs) {\n  var NUM_SUFFIX = '(_[uif](8|16|32|64))?';\n  var CRYSTAL_IDENT_RE = '[a-zA-Z_]\\\\w*[!?=]?';\n  var RE_STARTER = '!=|!==|%|%=|&|&&|&=|\\\\*|\\\\*=|\\\\+|\\\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|' +\n    '>>|>|\\\\[|\\\\{|\\\\(|\\\\^|\\\\^=|\\\\||\\\\|=|\\\\|\\\\||~';\n  var CRYSTAL_METHOD_RE = '[a-zA-Z_]\\\\w*[!?=]?|[-+~]\\\\@|<<|>>|=~|===?|<=>|[<>]=?|\\\\*\\\\*|[-/+%^&*~`|]|\\\\[\\\\][=?]?';\n  var CRYSTAL_KEYWORDS = {\n    keyword:\n      'abstract alias as asm begin break case class def do else elsif end ensure enum extend for fun if ifdef ' +\n      'include instance_sizeof is_a? lib macro module next of out pointerof private protected rescue responds_to? ' +\n      'return require self sizeof struct super then type typeof union unless until when while with yield ' +\n      '__DIR__ __FILE__ __LINE__',\n    literal: 'false nil true'\n  };\n  var SUBST = {\n    className: 'subst',\n    begin: '#{', end: '}',\n    keywords: CRYSTAL_KEYWORDS\n  };\n  var EXPANSION = {\n    className: 'template-variable',\n    variants: [\n      {begin: '\\\\{\\\\{', end: '\\\\}\\\\}'},\n      {begin: '\\\\{%', end: '%\\\\}'}\n    ],\n    keywords: CRYSTAL_KEYWORDS\n  };\n\n  function recursiveParen(begin, end) {\n    var\n    contains = [{begin: begin, end: end}];\n    contains[0].contains = contains;\n    return contains;\n  }\n  var STRING = {\n    className: 'string',\n    contains: [hljs.BACKSLASH_ESCAPE, SUBST],\n    variants: [\n      {begin: /'/, end: /'/},\n      {begin: /\"/, end: /\"/},\n      {begin: /`/, end: /`/},\n      {begin: '%w?\\\\(', end: '\\\\)', contains: recursiveParen('\\\\(', '\\\\)')},\n      {begin: '%w?\\\\[', end: '\\\\]', contains: recursiveParen('\\\\[', '\\\\]')},\n      {begin: '%w?{', end: '}', contains: recursiveParen('{', '}')},\n      {begin: '%w?<', end: '>', contains: recursiveParen('<', '>')},\n      {begin: '%w?/', end: '/'},\n      {begin: '%w?%', end: '%'},\n      {begin: '%w?-', end: '-'},\n      {begin: '%w?\\\\|', end: '\\\\|'},\n    ],\n    relevance: 0,\n  };\n  var REGEXP = {\n    begin: '(' + RE_STARTER + ')\\\\s*',\n    contains: [\n      {\n        className: 'regexp',\n        contains: [hljs.BACKSLASH_ESCAPE, SUBST],\n        variants: [\n          {begin: '//[a-z]*', relevance: 0},\n          {begin: '/', end: '/[a-z]*'},\n          {begin: '%r\\\\(', end: '\\\\)', contains: recursiveParen('\\\\(', '\\\\)')},\n          {begin: '%r\\\\[', end: '\\\\]', contains: recursiveParen('\\\\[', '\\\\]')},\n          {begin: '%r{', end: '}', contains: recursiveParen('{', '}')},\n          {begin: '%r<', end: '>', contains: recursiveParen('<', '>')},\n          {begin: '%r/', end: '/'},\n          {begin: '%r%', end: '%'},\n          {begin: '%r-', end: '-'},\n          {begin: '%r\\\\|', end: '\\\\|'},\n        ]\n      }\n    ],\n    relevance: 0\n  };\n  var REGEXP2 = {\n    className: 'regexp',\n    contains: [hljs.BACKSLASH_ESCAPE, SUBST],\n    variants: [\n      {begin: '%r\\\\(', end: '\\\\)', contains: recursiveParen('\\\\(', '\\\\)')},\n      {begin: '%r\\\\[', end: '\\\\]', contains: recursiveParen('\\\\[', '\\\\]')},\n      {begin: '%r{', end: '}', contains: recursiveParen('{', '}')},\n      {begin: '%r<', end: '>', contains: recursiveParen('<', '>')},\n      {begin: '%r/', end: '/'},\n      {begin: '%r%', end: '%'},\n      {begin: '%r-', end: '-'},\n      {begin: '%r\\\\|', end: '\\\\|'},\n    ],\n    relevance: 0\n  };\n  var ATTRIBUTE = {\n    className: 'meta',\n    begin: '@\\\\[', end: '\\\\]',\n    contains: [\n      hljs.inherit(hljs.QUOTE_STRING_MODE, {className: 'meta-string'})\n    ]\n  };\n  var CRYSTAL_DEFAULT_CONTAINS = [\n    EXPANSION,\n    STRING,\n    REGEXP,\n    REGEXP2,\n    ATTRIBUTE,\n    hljs.HASH_COMMENT_MODE,\n    {\n      className: 'class',\n      beginKeywords: 'class module struct', end: '$|;',\n      illegal: /=/,\n      contains: [\n        hljs.HASH_COMMENT_MODE,\n        hljs.inherit(hljs.TITLE_MODE, {begin: '[A-Za-z_]\\\\w*(::\\\\w+)*(\\\\?|\\\\!)?'}),\n        {begin: '<'} // relevance booster for inheritance\n      ]\n    },\n    {\n      className: 'class',\n      beginKeywords: 'lib enum union', end: '$|;',\n      illegal: /=/,\n      contains: [\n        hljs.HASH_COMMENT_MODE,\n        hljs.inherit(hljs.TITLE_MODE, {begin: '[A-Za-z_]\\\\w*(::\\\\w+)*(\\\\?|\\\\!)?'}),\n      ],\n      relevance: 10\n    },\n    {\n      className: 'function',\n      beginKeywords: 'def', end: /\\B\\b/,\n      contains: [\n        hljs.inherit(hljs.TITLE_MODE, {\n          begin: CRYSTAL_METHOD_RE,\n          endsParent: true\n        })\n      ]\n    },\n    {\n      className: 'function',\n      beginKeywords: 'fun macro', end: /\\B\\b/,\n      contains: [\n        hljs.inherit(hljs.TITLE_MODE, {\n          begin: CRYSTAL_METHOD_RE,\n          endsParent: true\n        })\n      ],\n      relevance: 5\n    },\n    {\n      className: 'symbol',\n      begin: hljs.UNDERSCORE_IDENT_RE + '(\\\\!|\\\\?)?:',\n      relevance: 0\n    },\n    {\n      className: 'symbol',\n      begin: ':',\n      contains: [STRING, {begin: CRYSTAL_METHOD_RE}],\n      relevance: 0\n    },\n    {\n      className: 'number',\n      variants: [\n        { begin: '\\\\b0b([01_]*[01])' + NUM_SUFFIX },\n        { begin: '\\\\b0o([0-7_]*[0-7])' + NUM_SUFFIX },\n        { begin: '\\\\b0x([A-Fa-f0-9_]*[A-Fa-f0-9])' + NUM_SUFFIX },\n        { begin: '\\\\b(([0-9][0-9_]*[0-9]|[0-9])(\\\\.[0-9_]*[0-9])?([eE][+-]?[0-9_]*[0-9])?)' + NUM_SUFFIX}\n      ],\n      relevance: 0\n    }\n  ];\n  SUBST.contains = CRYSTAL_DEFAULT_CONTAINS;\n  EXPANSION.contains = CRYSTAL_DEFAULT_CONTAINS.slice(1); // without EXPANSION\n\n  return {\n    aliases: ['cr'],\n    lexemes: CRYSTAL_IDENT_RE,\n    keywords: CRYSTAL_KEYWORDS,\n    contains: CRYSTAL_DEFAULT_CONTAINS\n  };\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/languages/cs.js",
    "content": "/*\nLanguage: C#\nAuthor: Jason Diamond <jason@diamond.name>\nCategory: common\n*/\n\nfunction(hljs) {\n  var KEYWORDS = {\n    keyword:\n      // Normal keywords.\n      'abstract as base bool break byte case catch char checked const continue decimal ' +\n      'default delegate do double else enum event explicit extern finally fixed float ' +\n      'for foreach goto if implicit in int interface internal is lock long ' +\n      'object operator out override params private protected public readonly ref sbyte ' +\n      'sealed short sizeof stackalloc static string struct switch this try typeof ' +\n      'uint ulong unchecked unsafe ushort using virtual void volatile while ' +\n      'nameof ' +\n      // Contextual keywords.\n      'add alias ascending async await by descending dynamic equals from get global group into join ' +\n      'let on orderby partial remove select set value var where yield',\n    literal:\n      'null false true'\n  };\n\n  var VERBATIM_STRING = {\n    className: 'string',\n    begin: '@\"', end: '\"',\n    contains: [{begin: '\"\"'}]\n  };\n  var VERBATIM_STRING_NO_LF = hljs.inherit(VERBATIM_STRING, {illegal: /\\n/});\n  var SUBST = {\n    className: 'subst',\n    begin: '{', end: '}',\n    keywords: KEYWORDS\n  };\n  var SUBST_NO_LF = hljs.inherit(SUBST, {illegal: /\\n/});\n  var INTERPOLATED_STRING = {\n    className: 'string',\n    begin: /\\$\"/, end: '\"',\n    illegal: /\\n/,\n    contains: [{begin: '{{'}, {begin: '}}'}, hljs.BACKSLASH_ESCAPE, SUBST_NO_LF]\n  };\n  var INTERPOLATED_VERBATIM_STRING = {\n    className: 'string',\n    begin: /\\$@\"/, end: '\"',\n    contains: [{begin: '{{'}, {begin: '}}'}, {begin: '\"\"'}, SUBST]\n  };\n  var INTERPOLATED_VERBATIM_STRING_NO_LF = hljs.inherit(INTERPOLATED_VERBATIM_STRING, {\n    illegal: /\\n/,\n    contains: [{begin: '{{'}, {begin: '}}'}, {begin: '\"\"'}, SUBST_NO_LF]\n  });\n  SUBST.contains = [\n    INTERPOLATED_VERBATIM_STRING,\n    INTERPOLATED_STRING,\n    VERBATIM_STRING,\n    hljs.APOS_STRING_MODE,\n    hljs.QUOTE_STRING_MODE,\n    hljs.C_NUMBER_MODE,\n    hljs.C_BLOCK_COMMENT_MODE\n  ];\n  SUBST_NO_LF.contains = [\n    INTERPOLATED_VERBATIM_STRING_NO_LF,\n    INTERPOLATED_STRING,\n    VERBATIM_STRING_NO_LF,\n    hljs.APOS_STRING_MODE,\n    hljs.QUOTE_STRING_MODE,\n    hljs.C_NUMBER_MODE,\n    hljs.inherit(hljs.C_BLOCK_COMMENT_MODE, {illegal: /\\n/})\n  ];\n  var STRING = {\n    variants: [\n      INTERPOLATED_VERBATIM_STRING,\n      INTERPOLATED_STRING,\n      VERBATIM_STRING,\n      hljs.APOS_STRING_MODE,\n      hljs.QUOTE_STRING_MODE\n    ]\n  };\n\n  var TYPE_IDENT_RE = hljs.IDENT_RE + '(<' + hljs.IDENT_RE + '(\\\\s*,\\\\s*' + hljs.IDENT_RE + ')*>)?(\\\\[\\\\])?';\n  return {\n    aliases: ['csharp'],\n    keywords: KEYWORDS,\n    illegal: /::/,\n    contains: [\n      hljs.COMMENT(\n        '///',\n        '$',\n        {\n          returnBegin: true,\n          contains: [\n            {\n              className: 'doctag',\n              variants: [\n                {\n                  begin: '///', relevance: 0\n                },\n                {\n                  begin: '<!--|-->'\n                },\n                {\n                  begin: '</?', end: '>'\n                }\n              ]\n            }\n          ]\n        }\n      ),\n      hljs.C_LINE_COMMENT_MODE,\n      hljs.C_BLOCK_COMMENT_MODE,\n      {\n        className: 'meta',\n        begin: '#', end: '$',\n        keywords: {'meta-keyword': 'if else elif endif define undef warning error line region endregion pragma checksum'}\n      },\n      STRING,\n      hljs.C_NUMBER_MODE,\n      {\n        beginKeywords: 'class interface', end: /[{;=]/,\n        illegal: /[^\\s:]/,\n        contains: [\n          hljs.TITLE_MODE,\n          hljs.C_LINE_COMMENT_MODE,\n          hljs.C_BLOCK_COMMENT_MODE\n        ]\n      },\n      {\n        beginKeywords: 'namespace', end: /[{;=]/,\n        illegal: /[^\\s:]/,\n        contains: [\n          hljs.inherit(hljs.TITLE_MODE, {begin: '[a-zA-Z](\\\\.?\\\\w)*'}),\n          hljs.C_LINE_COMMENT_MODE,\n          hljs.C_BLOCK_COMMENT_MODE\n        ]\n      },\n      {\n        // Expression keywords prevent 'keyword Name(...)' from being\n        // recognized as a function definition\n        beginKeywords: 'new return throw await',\n        relevance: 0\n      },\n      {\n        className: 'function',\n        begin: '(' + TYPE_IDENT_RE + '\\\\s+)+' + hljs.IDENT_RE + '\\\\s*\\\\(', returnBegin: true, end: /[{;=]/,\n        excludeEnd: true,\n        keywords: KEYWORDS,\n        contains: [\n          {\n            begin: hljs.IDENT_RE + '\\\\s*\\\\(', returnBegin: true,\n            contains: [hljs.TITLE_MODE],\n            relevance: 0\n          },\n          {\n            className: 'params',\n            begin: /\\(/, end: /\\)/,\n            excludeBegin: true,\n            excludeEnd: true,\n            keywords: KEYWORDS,\n            relevance: 0,\n            contains: [\n              STRING,\n              hljs.C_NUMBER_MODE,\n              hljs.C_BLOCK_COMMENT_MODE\n            ]\n          },\n          hljs.C_LINE_COMMENT_MODE,\n          hljs.C_BLOCK_COMMENT_MODE\n        ]\n      }\n    ]\n  };\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/languages/csp.js",
    "content": "/*\nLanguage: CSP\nDescription: Content Security Policy definition highlighting \nAuthor: Taras <oxdef@oxdef.info>\n\nvim: ts=2 sw=2 st=2\n*/\n\nfunction(hljs) {\n  return {\n    case_insensitive: false,\n    lexemes: '[a-zA-Z][a-zA-Z0-9_-]*',\n    keywords: {\n      keyword: 'base-uri child-src connect-src default-src font-src form-action' +\n        ' frame-ancestors frame-src img-src media-src object-src plugin-types' +\n        ' report-uri sandbox script-src style-src', \n    },\n    contains: [\n    {\n      className: 'string',\n      begin: \"'\", end: \"'\"\n    },\n    {\n      className: 'attribute',\n      begin: '^Content', end: ':', excludeEnd: true,\n    },\n    ]\n  };\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/languages/css.js",
    "content": "/*\nLanguage: CSS\nCategory: common, css\n*/\n\nfunction(hljs) {\n  var IDENT_RE = '[a-zA-Z-][a-zA-Z0-9_-]*';\n  var RULE = {\n    begin: /[A-Z\\_\\.\\-]+\\s*:/, returnBegin: true, end: ';', endsWithParent: true,\n    contains: [\n      {\n        className: 'attribute',\n        begin: /\\S/, end: ':', excludeEnd: true,\n        starts: {\n          endsWithParent: true, excludeEnd: true,\n          contains: [\n            {\n              begin: /[\\w-]+\\(/, returnBegin: true,\n              contains: [\n                {\n                  className: 'built_in',\n                  begin: /[\\w-]+/\n                },\n                {\n                  begin: /\\(/, end: /\\)/,\n                  contains: [\n                    hljs.APOS_STRING_MODE,\n                    hljs.QUOTE_STRING_MODE\n                  ]\n                }\n              ]\n            },\n            hljs.CSS_NUMBER_MODE,\n            hljs.QUOTE_STRING_MODE,\n            hljs.APOS_STRING_MODE,\n            hljs.C_BLOCK_COMMENT_MODE,\n            {\n              className: 'number', begin: '#[0-9A-Fa-f]+'\n            },\n            {\n              className: 'meta', begin: '!important'\n            }\n          ]\n        }\n      }\n    ]\n  };\n\n  return {\n    case_insensitive: true,\n    illegal: /[=\\/|'\\$]/,\n    contains: [\n      hljs.C_BLOCK_COMMENT_MODE,\n      {\n        className: 'selector-id', begin: /#[A-Za-z0-9_-]+/\n      },\n      {\n        className: 'selector-class', begin: /\\.[A-Za-z0-9_-]+/\n      },\n      {\n        className: 'selector-attr',\n        begin: /\\[/, end: /\\]/,\n        illegal: '$'\n      },\n      {\n        className: 'selector-pseudo',\n        begin: /:(:)?[a-zA-Z0-9\\_\\-\\+\\(\\)\"'.]+/\n      },\n      {\n        begin: '@(font-face|page)',\n        lexemes: '[a-z-]+',\n        keywords: 'font-face page'\n      },\n      {\n        begin: '@', end: '[{;]', // at_rule eating first \"{\" is a good thing\n                                 // because it doesn’t let it to be parsed as\n                                 // a rule set but instead drops parser into\n                                 // the default mode which is how it should be.\n        illegal: /:/, // break on Less variables @var: ...\n        contains: [\n          {\n            className: 'keyword',\n            begin: /\\w+/\n          },\n          {\n            begin: /\\s/, endsWithParent: true, excludeEnd: true,\n            relevance: 0,\n            contains: [\n              hljs.APOS_STRING_MODE, hljs.QUOTE_STRING_MODE,\n              hljs.CSS_NUMBER_MODE\n            ]\n          }\n        ]\n      },\n      {\n        className: 'selector-tag', begin: IDENT_RE,\n        relevance: 0\n      },\n      {\n        begin: '{', end: '}',\n        illegal: /\\S/,\n        contains: [\n          hljs.C_BLOCK_COMMENT_MODE,\n          RULE,\n        ]\n      }\n    ]\n  };\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/languages/d.js",
    "content": "/*\nLanguage: D\nAuthor: Aleksandar Ruzicic <aleksandar@ruzicic.info>\nDescription: D is a language with C-like syntax and static typing. It pragmatically combines efficiency, control, and modeling power, with safety and programmer productivity.\nVersion: 1.0a\nDate: 2012-04-08\n*/\n\n/**\n * Known issues:\n *\n * - invalid hex string literals will be recognized as a double quoted strings\n *   but 'x' at the beginning of string will not be matched\n *\n * - delimited string literals are not checked for matching end delimiter\n *   (not possible to do with js regexp)\n *\n * - content of token string is colored as a string (i.e. no keyword coloring inside a token string)\n *   also, content of token string is not validated to contain only valid D tokens\n *\n * - special token sequence rule is not strictly following D grammar (anything following #line\n *   up to the end of line is matched as special token sequence)\n */\n\nfunction(hljs) {\n  /**\n   * Language keywords\n   *\n   * @type {Object}\n   */\n  var D_KEYWORDS = {\n    keyword:\n      'abstract alias align asm assert auto body break byte case cast catch class ' +\n      'const continue debug default delete deprecated do else enum export extern final ' +\n      'finally for foreach foreach_reverse|10 goto if immutable import in inout int ' +\n      'interface invariant is lazy macro mixin module new nothrow out override package ' +\n      'pragma private protected public pure ref return scope shared static struct ' +\n      'super switch synchronized template this throw try typedef typeid typeof union ' +\n      'unittest version void volatile while with __FILE__ __LINE__ __gshared|10 ' +\n      '__thread __traits __DATE__ __EOF__ __TIME__ __TIMESTAMP__ __VENDOR__ __VERSION__',\n    built_in:\n      'bool cdouble cent cfloat char creal dchar delegate double dstring float function ' +\n      'idouble ifloat ireal long real short string ubyte ucent uint ulong ushort wchar ' +\n      'wstring',\n    literal:\n      'false null true'\n  };\n\n  /**\n   * Number literal regexps\n   *\n   * @type {String}\n   */\n  var decimal_integer_re = '(0|[1-9][\\\\d_]*)',\n    decimal_integer_nosus_re = '(0|[1-9][\\\\d_]*|\\\\d[\\\\d_]*|[\\\\d_]+?\\\\d)',\n    binary_integer_re = '0[bB][01_]+',\n    hexadecimal_digits_re = '([\\\\da-fA-F][\\\\da-fA-F_]*|_[\\\\da-fA-F][\\\\da-fA-F_]*)',\n    hexadecimal_integer_re = '0[xX]' + hexadecimal_digits_re,\n\n    decimal_exponent_re = '([eE][+-]?' + decimal_integer_nosus_re + ')',\n    decimal_float_re = '(' + decimal_integer_nosus_re + '(\\\\.\\\\d*|' + decimal_exponent_re + ')|' +\n                '\\\\d+\\\\.' + decimal_integer_nosus_re + decimal_integer_nosus_re + '|' +\n                '\\\\.' + decimal_integer_re + decimal_exponent_re + '?' +\n              ')',\n    hexadecimal_float_re = '(0[xX](' +\n                  hexadecimal_digits_re + '\\\\.' + hexadecimal_digits_re + '|'+\n                  '\\\\.?' + hexadecimal_digits_re +\n                 ')[pP][+-]?' + decimal_integer_nosus_re + ')',\n\n    integer_re = '(' +\n      decimal_integer_re + '|' +\n      binary_integer_re  + '|' +\n       hexadecimal_integer_re   +\n    ')',\n\n    float_re = '(' +\n      hexadecimal_float_re + '|' +\n      decimal_float_re  +\n    ')';\n\n  /**\n   * Escape sequence supported in D string and character literals\n   *\n   * @type {String}\n   */\n  var escape_sequence_re = '\\\\\\\\(' +\n              '[\\'\"\\\\?\\\\\\\\abfnrtv]|' +  // common escapes\n              'u[\\\\dA-Fa-f]{4}|' +     // four hex digit unicode codepoint\n              '[0-7]{1,3}|' +       // one to three octal digit ascii char code\n              'x[\\\\dA-Fa-f]{2}|' +    // two hex digit ascii char code\n              'U[\\\\dA-Fa-f]{8}' +      // eight hex digit unicode codepoint\n              ')|' +\n              '&[a-zA-Z\\\\d]{2,};';      // named character entity\n\n  /**\n   * D integer number literals\n   *\n   * @type {Object}\n   */\n  var D_INTEGER_MODE = {\n    className: 'number',\n      begin: '\\\\b' + integer_re + '(L|u|U|Lu|LU|uL|UL)?',\n      relevance: 0\n  };\n\n  /**\n   * [D_FLOAT_MODE description]\n   * @type {Object}\n   */\n  var D_FLOAT_MODE = {\n    className: 'number',\n    begin: '\\\\b(' +\n        float_re + '([fF]|L|i|[fF]i|Li)?|' +\n        integer_re + '(i|[fF]i|Li)' +\n      ')',\n    relevance: 0\n  };\n\n  /**\n   * D character literal\n   *\n   * @type {Object}\n   */\n  var D_CHARACTER_MODE = {\n    className: 'string',\n    begin: '\\'(' + escape_sequence_re + '|.)', end: '\\'',\n    illegal: '.'\n  };\n\n  /**\n   * D string escape sequence\n   *\n   * @type {Object}\n   */\n  var D_ESCAPE_SEQUENCE = {\n    begin: escape_sequence_re,\n    relevance: 0\n  };\n\n  /**\n   * D double quoted string literal\n   *\n   * @type {Object}\n   */\n  var D_STRING_MODE = {\n    className: 'string',\n    begin: '\"',\n    contains: [D_ESCAPE_SEQUENCE],\n    end: '\"[cwd]?'\n  };\n\n  /**\n   * D wysiwyg and delimited string literals\n   *\n   * @type {Object}\n   */\n  var D_WYSIWYG_DELIMITED_STRING_MODE = {\n    className: 'string',\n    begin: '[rq]\"',\n    end: '\"[cwd]?',\n    relevance: 5\n  };\n\n  /**\n   * D alternate wysiwyg string literal\n   *\n   * @type {Object}\n   */\n  var D_ALTERNATE_WYSIWYG_STRING_MODE = {\n    className: 'string',\n    begin: '`',\n    end: '`[cwd]?'\n  };\n\n  /**\n   * D hexadecimal string literal\n   *\n   * @type {Object}\n   */\n  var D_HEX_STRING_MODE = {\n    className: 'string',\n    begin: 'x\"[\\\\da-fA-F\\\\s\\\\n\\\\r]*\"[cwd]?',\n    relevance: 10\n  };\n\n  /**\n   * D delimited string literal\n   *\n   * @type {Object}\n   */\n  var D_TOKEN_STRING_MODE = {\n    className: 'string',\n    begin: 'q\"\\\\{',\n    end: '\\\\}\"'\n  };\n\n  /**\n   * Hashbang support\n   *\n   * @type {Object}\n   */\n  var D_HASHBANG_MODE = {\n    className: 'meta',\n    begin: '^#!',\n    end: '$',\n    relevance: 5\n  };\n\n  /**\n   * D special token sequence\n   *\n   * @type {Object}\n   */\n  var D_SPECIAL_TOKEN_SEQUENCE_MODE = {\n    className: 'meta',\n    begin: '#(line)',\n    end: '$',\n    relevance: 5\n  };\n\n  /**\n   * D attributes\n   *\n   * @type {Object}\n   */\n  var D_ATTRIBUTE_MODE = {\n    className: 'keyword',\n    begin: '@[a-zA-Z_][a-zA-Z_\\\\d]*'\n  };\n\n  /**\n   * D nesting comment\n   *\n   * @type {Object}\n   */\n  var D_NESTING_COMMENT_MODE = hljs.COMMENT(\n    '\\\\/\\\\+',\n    '\\\\+\\\\/',\n    {\n      contains: ['self'],\n      relevance: 10\n    }\n  );\n\n  return {\n    lexemes: hljs.UNDERSCORE_IDENT_RE,\n    keywords: D_KEYWORDS,\n    contains: [\n      hljs.C_LINE_COMMENT_MODE,\n        hljs.C_BLOCK_COMMENT_MODE,\n        D_NESTING_COMMENT_MODE,\n        D_HEX_STRING_MODE,\n        D_STRING_MODE,\n        D_WYSIWYG_DELIMITED_STRING_MODE,\n        D_ALTERNATE_WYSIWYG_STRING_MODE,\n        D_TOKEN_STRING_MODE,\n        D_FLOAT_MODE,\n        D_INTEGER_MODE,\n        D_CHARACTER_MODE,\n        D_HASHBANG_MODE,\n        D_SPECIAL_TOKEN_SEQUENCE_MODE,\n        D_ATTRIBUTE_MODE\n    ]\n  };\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/languages/dart.js",
    "content": "/*\nLanguage: Dart\nRequires: markdown.js\nAuthor: Maxim Dikun <dikmax@gmail.com>\nDescription: Dart is a JavaScript replacement language developed by Google. For more information see http://dartlang.org/\nCategory: scripting\n*/\n\nfunction (hljs) {\n  var SUBST = {\n    className: 'subst',\n    begin: '\\\\$\\\\{', end: '}',\n    keywords: 'true false null this is new super'\n  };\n\n  var STRING = {\n    className: 'string',\n    variants: [\n      {\n        begin: 'r\\'\\'\\'', end: '\\'\\'\\''\n      },\n      {\n        begin: 'r\"\"\"', end: '\"\"\"'\n      },\n      {\n        begin: 'r\\'', end: '\\'',\n        illegal: '\\\\n'\n      },\n      {\n        begin: 'r\"', end: '\"',\n        illegal: '\\\\n'\n      },\n      {\n        begin: '\\'\\'\\'', end: '\\'\\'\\'',\n        contains: [hljs.BACKSLASH_ESCAPE, SUBST]\n      },\n      {\n        begin: '\"\"\"', end: '\"\"\"',\n        contains: [hljs.BACKSLASH_ESCAPE, SUBST]\n      },\n      {\n        begin: '\\'', end: '\\'',\n        illegal: '\\\\n',\n        contains: [hljs.BACKSLASH_ESCAPE, SUBST]\n      },\n      {\n        begin: '\"', end: '\"',\n        illegal: '\\\\n',\n        contains: [hljs.BACKSLASH_ESCAPE, SUBST]\n      }\n    ]\n  };\n  SUBST.contains = [\n    hljs.C_NUMBER_MODE, STRING\n  ];\n\n  var KEYWORDS = {\n    keyword: 'assert async await break case catch class const continue default do else enum extends false final ' +\n      'finally for if in is new null rethrow return super switch sync this throw true try var void while with yield ' +\n      'abstract as dynamic export external factory get implements import library operator part set static typedef',\n    built_in:\n      // dart:core\n      'print Comparable DateTime Duration Function Iterable Iterator List Map Match Null Object Pattern RegExp Set ' +\n      'Stopwatch String StringBuffer StringSink Symbol Type Uri bool double int num ' +\n      // dart:html\n      'document window querySelector querySelectorAll Element ElementList'\n  };\n\n  return {\n    keywords: KEYWORDS,\n    contains: [\n      STRING,\n      hljs.COMMENT(\n        '/\\\\*\\\\*',\n        '\\\\*/',\n        {\n          subLanguage: 'markdown'\n        }\n      ),\n      hljs.COMMENT(\n        '///',\n        '$',\n        {\n          subLanguage: 'markdown'\n        }\n      ),\n      hljs.C_LINE_COMMENT_MODE,\n      hljs.C_BLOCK_COMMENT_MODE,\n      {\n        className: 'class',\n        beginKeywords: 'class interface', end: '{', excludeEnd: true,\n        contains: [\n          {\n            beginKeywords: 'extends implements'\n          },\n          hljs.UNDERSCORE_TITLE_MODE\n        ]\n      },\n      hljs.C_NUMBER_MODE,\n      {\n        className: 'meta', begin: '@[A-Za-z]+'\n      },\n      {\n        begin: '=>' // No markup, just a relevance booster\n      }\n    ]\n  }\n}\n\n"
  },
  {
    "path": "static/editor.md/lib/highlight/languages/delphi.js",
    "content": "/*\nLanguage: Delphi\n*/\n\nfunction(hljs) {\n  var KEYWORDS =\n    'exports register file shl array record property for mod while set ally label uses raise not ' +\n    'stored class safecall var interface or private static exit index inherited to else stdcall ' +\n    'override shr asm far resourcestring finalization packed virtual out and protected library do ' +\n    'xorwrite goto near function end div overload object unit begin string on inline repeat until ' +\n    'destructor write message program with read initialization except default nil if case cdecl in ' +\n    'downto threadvar of try pascal const external constructor type public then implementation ' +\n    'finally published procedure absolute reintroduce operator as is abstract alias assembler ' +\n    'bitpacked break continue cppdecl cvar enumerator experimental platform deprecated ' +\n    'unimplemented dynamic export far16 forward generic helper implements interrupt iochecks ' +\n    'local name nodefault noreturn nostackframe oldfpccall otherwise saveregisters softfloat ' +\n    'specialize strict unaligned varargs ';\n  var COMMENT_MODES = [\n    hljs.C_LINE_COMMENT_MODE,\n    hljs.COMMENT(\n      /\\{/,\n      /\\}/,\n      {\n        relevance: 0\n      }\n    ),\n    hljs.COMMENT(\n      /\\(\\*/,\n      /\\*\\)/,\n      {\n        relevance: 10\n      }\n    )\n  ];\n  var STRING = {\n    className: 'string',\n    begin: /'/, end: /'/,\n    contains: [{begin: /''/}]\n  };\n  var CHAR_STRING = {\n    className: 'string', begin: /(#\\d+)+/\n  };\n  var CLASS = {\n    begin: hljs.IDENT_RE + '\\\\s*=\\\\s*class\\\\s*\\\\(', returnBegin: true,\n    contains: [\n      hljs.TITLE_MODE\n    ]\n  };\n  var FUNCTION = {\n    className: 'function',\n    beginKeywords: 'function constructor destructor procedure', end: /[:;]/,\n    keywords: 'function constructor|10 destructor|10 procedure|10',\n    contains: [\n      hljs.TITLE_MODE,\n      {\n        className: 'params',\n        begin: /\\(/, end: /\\)/,\n        keywords: KEYWORDS,\n        contains: [STRING, CHAR_STRING]\n      }\n    ].concat(COMMENT_MODES)\n  };\n  return {\n    aliases: ['dpr', 'dfm', 'pas', 'pascal', 'freepascal', 'lazarus', 'lpr', 'lfm'],\n    case_insensitive: true,\n    keywords: KEYWORDS,\n    illegal: /\"|\\$[G-Zg-z]|\\/\\*|<\\/|\\|/,\n    contains: [\n      STRING, CHAR_STRING,\n      hljs.NUMBER_MODE,\n      CLASS,\n      FUNCTION\n    ].concat(COMMENT_MODES)\n  };\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/languages/diff.js",
    "content": "/*\nLanguage: Diff\nDescription: Unified and context diff\nAuthor: Vasily Polovnyov <vast@whiteants.net>\nCategory: common\n*/\n\nfunction(hljs) {\n  return {\n    aliases: ['patch'],\n    contains: [\n      {\n        className: 'meta',\n        relevance: 10,\n        variants: [\n          {begin: /^@@ +\\-\\d+,\\d+ +\\+\\d+,\\d+ +@@$/},\n          {begin: /^\\*\\*\\* +\\d+,\\d+ +\\*\\*\\*\\*$/},\n          {begin: /^\\-\\-\\- +\\d+,\\d+ +\\-\\-\\-\\-$/}\n        ]\n      },\n      {\n        className: 'comment',\n        variants: [\n          {begin: /Index: /, end: /$/},\n          {begin: /={3,}/, end: /$/},\n          {begin: /^\\-{3}/, end: /$/},\n          {begin: /^\\*{3} /, end: /$/},\n          {begin: /^\\+{3}/, end: /$/},\n          {begin: /\\*{5}/, end: /\\*{5}$/}\n        ]\n      },\n      {\n        className: 'addition',\n        begin: '^\\\\+', end: '$'\n      },\n      {\n        className: 'deletion',\n        begin: '^\\\\-', end: '$'\n      },\n      {\n        className: 'addition',\n        begin: '^\\\\!', end: '$'\n      }\n    ]\n  };\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/languages/django.js",
    "content": "/*\nLanguage: Django\nRequires: xml.js\nAuthor: Ivan Sagalaev <maniac@softwaremaniacs.org>\nContributors: Ilya Baryshev <baryshev@gmail.com>\nCategory: template\n*/\n\nfunction(hljs) {\n  var FILTER = {\n    begin: /\\|[A-Za-z]+:?/,\n    keywords: {\n      name:\n        'truncatewords removetags linebreaksbr yesno get_digit timesince random striptags ' +\n        'filesizeformat escape linebreaks length_is ljust rjust cut urlize fix_ampersands ' +\n        'title floatformat capfirst pprint divisibleby add make_list unordered_list urlencode ' +\n        'timeuntil urlizetrunc wordcount stringformat linenumbers slice date dictsort ' +\n        'dictsortreversed default_if_none pluralize lower join center default ' +\n        'truncatewords_html upper length phone2numeric wordwrap time addslashes slugify first ' +\n        'escapejs force_escape iriencode last safe safeseq truncatechars localize unlocalize ' +\n        'localtime utc timezone'\n    },\n    contains: [\n      hljs.QUOTE_STRING_MODE,\n      hljs.APOS_STRING_MODE\n    ]\n  };\n\n  return {\n    aliases: ['jinja'],\n    case_insensitive: true,\n    subLanguage: 'xml',\n    contains: [\n      hljs.COMMENT(/\\{%\\s*comment\\s*%}/, /\\{%\\s*endcomment\\s*%}/),\n      hljs.COMMENT(/\\{#/, /#}/),\n      {\n        className: 'template-tag',\n        begin: /\\{%/, end: /%}/,\n        contains: [\n          {\n            className: 'name',\n            begin: /\\w+/,\n            keywords: {\n              name:\n                'comment endcomment load templatetag ifchanged endifchanged if endif firstof for ' +\n                'endfor ifnotequal endifnotequal widthratio extends include spaceless ' +\n                'endspaceless regroup ifequal endifequal ssi now with cycle url filter ' +\n                'endfilter debug block endblock else autoescape endautoescape csrf_token empty elif ' +\n                'endwith static trans blocktrans endblocktrans get_static_prefix get_media_prefix ' +\n                'plural get_current_language language get_available_languages ' +\n                'get_current_language_bidi get_language_info get_language_info_list localize ' +\n                'endlocalize localtime endlocaltime timezone endtimezone get_current_timezone ' +\n                'verbatim'\n            },\n            starts: {\n              endsWithParent: true,\n              keywords: 'in by as',\n              contains: [FILTER],\n              relevance: 0\n            }\n          }\n        ]\n      },\n      {\n        className: 'template-variable',\n        begin: /\\{\\{/, end: /}}/,\n        contains: [FILTER]\n      }\n    ]\n  };\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/languages/dns.js",
    "content": "/*\nLanguage: DNS Zone file\nAuthor: Tim Schumacher <tim@datenknoten.me>\nCategory: config\n*/\n\nfunction(hljs) {\n  return {\n    aliases: ['bind', 'zone'],\n    keywords: {\n      keyword:\n        'IN A AAAA AFSDB APL CAA CDNSKEY CDS CERT CNAME DHCID DLV DNAME DNSKEY DS HIP IPSECKEY KEY KX ' +\n        'LOC MX NAPTR NS NSEC NSEC3 NSEC3PARAM PTR RRSIG RP SIG SOA SRV SSHFP TA TKEY TLSA TSIG TXT'\n    },\n    contains: [\n      hljs.COMMENT(';', '$', {relevance: 0}),\n      {\n        className: 'meta',\n        begin: /^\\$(TTL|GENERATE|INCLUDE|ORIGIN)\\b/\n      },\n      // IPv6\n      {\n        className: 'number',\n        begin: '((([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}))|:)))\\\\b'\n      },\n      // IPv4\n      {\n        className: 'number',\n        begin: '((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\\\b'\n      },\n      hljs.inherit(hljs.NUMBER_MODE, {begin: /\\b\\d+[dhwm]?/})\n    ]\n  };\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/languages/dockerfile.js",
    "content": "/*\nLanguage: Dockerfile\nRequires: bash.js\nAuthor: Alexis Hénaut <alexis@henaut.net>\nDescription: language definition for Dockerfile files\nCategory: config\n*/\n\nfunction(hljs) {\n  return {\n    aliases: ['docker'],\n    case_insensitive: true,\n    keywords: 'from maintainer expose env user onbuild',\n    contains: [\n      hljs.HASH_COMMENT_MODE,\n      hljs.APOS_STRING_MODE,\n      hljs.QUOTE_STRING_MODE,\n      hljs.NUMBER_MODE,\n      {\n        beginKeywords: 'run cmd entrypoint volume add copy workdir label healthcheck',\n        starts: {\n          end: /[^\\\\]\\n/,\n          subLanguage: 'bash'\n        }\n      }\n    ],\n    illegal: '</'\n  }\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/languages/dos.js",
    "content": "/*\nLanguage: DOS .bat\nAuthor: Alexander Makarov <sam@rmcreative.ru>\nContributors: Anton Kochkov <anton.kochkov@gmail.com>\n*/\n\nfunction(hljs) {\n  var COMMENT = hljs.COMMENT(\n    /^\\s*@?rem\\b/, /$/,\n    {\n      relevance: 10\n    }\n  );\n  var LABEL = {\n    className: 'symbol',\n    begin: '^\\\\s*[A-Za-z._?][A-Za-z0-9_$#@~.?]*(:|\\\\s+label)',\n    relevance: 0\n  };\n  return {\n    aliases: ['bat', 'cmd'],\n    case_insensitive: true,\n    illegal: /\\/\\*/,\n    keywords: {\n      keyword:\n        'if else goto for in do call exit not exist errorlevel defined ' +\n        'equ neq lss leq gtr geq',\n      built_in:\n        'prn nul lpt3 lpt2 lpt1 con com4 com3 com2 com1 aux ' +\n        'shift cd dir echo setlocal endlocal set pause copy ' +\n        'append assoc at attrib break cacls cd chcp chdir chkdsk chkntfs cls cmd color ' +\n        'comp compact convert date dir diskcomp diskcopy doskey erase fs ' +\n        'find findstr format ftype graftabl help keyb label md mkdir mode more move path ' +\n        'pause print popd pushd promt rd recover rem rename replace restore rmdir shift' +\n        'sort start subst time title tree type ver verify vol ' +\n        // winutils\n        'ping net ipconfig taskkill xcopy ren del'\n    },\n    contains: [\n      {\n        className: 'variable', begin: /%%[^ ]|%[^ ]+?%|![^ ]+?!/\n      },\n      {\n        className: 'function',\n        begin: LABEL.begin, end: 'goto:eof',\n        contains: [\n          hljs.inherit(hljs.TITLE_MODE, {begin: '([_a-zA-Z]\\\\w*\\\\.)*([_a-zA-Z]\\\\w*:)?[_a-zA-Z]\\\\w*'}),\n          COMMENT\n        ]\n      },\n      {\n        className: 'number', begin: '\\\\b\\\\d+',\n        relevance: 0\n      },\n      COMMENT\n    ]\n  };\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/languages/dsconfig.js",
    "content": "/*\n Language: dsconfig\n Description: dsconfig batch configuration language for LDAP directory servers\n Contributors: Jacob Childress <jacobc@gmail.com>\n Category: enterprise, config\n */\nfunction(hljs) {\n  var QUOTED_PROPERTY = {\n    className: 'string',\n    begin: /\"/, end: /\"/\n  };\n  var APOS_PROPERTY = {\n    className: 'string',\n    begin: /'/, end: /'/\n  };\n  var UNQUOTED_PROPERTY = {\n    className: 'string',\n    begin: '[\\\\w-?]+:\\\\w+', end: '\\\\W',\n    relevance: 0\n  };\n  var VALUELESS_PROPERTY = {\n    className: 'string',\n    begin: '\\\\w+-?\\\\w+', end: '\\\\W',\n    relevance: 0\n  };\n\n  return {\n    keywords: 'dsconfig',\n    contains: [\n      {\n        className: 'keyword',\n        begin: '^dsconfig', end: '\\\\s', excludeEnd: true,\n        relevance: 10\n      },\n      {\n        className: 'built_in',\n        begin: '(list|create|get|set|delete)-(\\\\w+)', end: '\\\\s', excludeEnd: true,\n        illegal: '!@#$%^&*()',\n        relevance: 10\n      },\n      {\n        className: 'built_in',\n        begin: '--(\\\\w+)', end: '\\\\s', excludeEnd: true\n      },\n      QUOTED_PROPERTY,\n      APOS_PROPERTY,\n      UNQUOTED_PROPERTY,\n      VALUELESS_PROPERTY,\n      hljs.HASH_COMMENT_MODE\n    ]\n  };\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/languages/dts.js",
    "content": "/*\nLanguage: Device Tree\nDescription: *.dts files used in the Linux kernel\nAuthor: Martin Braun <martin.braun@ettus.com>, Moritz Fischer <moritz.fischer@ettus.com>\nCategory: config\n*/\n\nfunction(hljs) {\n  var STRINGS = {\n    className: 'string',\n    variants: [\n      hljs.inherit(hljs.QUOTE_STRING_MODE, { begin: '((u8?|U)|L)?\"' }),\n      {\n        begin: '(u8?|U)?R\"', end: '\"',\n        contains: [hljs.BACKSLASH_ESCAPE]\n      },\n      {\n        begin: '\\'\\\\\\\\?.', end: '\\'',\n        illegal: '.'\n      }\n    ]\n  };\n\n  var NUMBERS = {\n    className: 'number',\n    variants: [\n      { begin: '\\\\b(\\\\d+(\\\\.\\\\d*)?|\\\\.\\\\d+)(u|U|l|L|ul|UL|f|F)' },\n      { begin: hljs.C_NUMBER_RE }\n    ],\n    relevance: 0\n  };\n\n  var PREPROCESSOR = {\n    className: 'meta',\n    begin: '#', end: '$',\n    keywords: {'meta-keyword': 'if else elif endif define undef ifdef ifndef'},\n    contains: [\n      {\n        begin: /\\\\\\n/, relevance: 0\n      },\n      {\n        beginKeywords: 'include', end: '$',\n        keywords: {'meta-keyword': 'include'},\n        contains: [\n          hljs.inherit(STRINGS, {className: 'meta-string'}),\n          {\n            className: 'meta-string',\n            begin: '<', end: '>',\n            illegal: '\\\\n'\n          }\n        ]\n      },\n      STRINGS,\n      hljs.C_LINE_COMMENT_MODE,\n      hljs.C_BLOCK_COMMENT_MODE\n    ]\n  };\n\n  var DTS_REFERENCE = {\n    className: 'variable',\n    begin: '\\\\&[a-z\\\\d_]*\\\\b'\n  };\n\n  var DTS_KEYWORD = {\n    className: 'meta-keyword',\n    begin: '/[a-z][a-z\\\\d-]*/'\n  };\n\n  var DTS_LABEL = {\n    className: 'symbol',\n    begin: '^\\\\s*[a-zA-Z_][a-zA-Z\\\\d_]*:'\n  };\n\n  var DTS_CELL_PROPERTY = {\n    className: 'params',\n    begin: '<',\n    end: '>',\n    contains: [\n      NUMBERS,\n      DTS_REFERENCE\n    ]\n  };\n\n  var DTS_NODE = {\n    className: 'class',\n    begin: /[a-zA-Z_][a-zA-Z\\d_@]*\\s{/,\n    end: /[{;=]/,\n    returnBegin: true,\n    excludeEnd: true\n  };\n\n  var DTS_ROOT_NODE = {\n    className: 'class',\n    begin: '/\\\\s*{',\n    end: '};',\n    relevance: 10,\n    contains: [\n      DTS_REFERENCE,\n      DTS_KEYWORD,\n      DTS_LABEL,\n      DTS_NODE,\n      DTS_CELL_PROPERTY,\n      hljs.C_LINE_COMMENT_MODE,\n      hljs.C_BLOCK_COMMENT_MODE,\n      NUMBERS,\n      STRINGS\n    ]\n  };\n\n  return {\n    keywords: \"\",\n    contains: [\n      DTS_ROOT_NODE,\n      DTS_REFERENCE,\n      DTS_KEYWORD,\n      DTS_LABEL,\n      DTS_NODE,\n      DTS_CELL_PROPERTY,\n      hljs.C_LINE_COMMENT_MODE,\n      hljs.C_BLOCK_COMMENT_MODE,\n      NUMBERS,\n      STRINGS,\n      PREPROCESSOR,\n      {\n        begin: hljs.IDENT_RE + '::',\n        keywords: \"\"\n      }\n    ]\n  };\n}\n\n"
  },
  {
    "path": "static/editor.md/lib/highlight/languages/dust.js",
    "content": "/*\nLanguage: Dust\nRequires: xml.js\nAuthor: Michael Allen <michael.allen@benefitfocus.com>\nDescription: Matcher for dust.js templates.\nCategory: template\n*/\n\nfunction(hljs) {\n  var EXPRESSION_KEYWORDS = 'if eq ne lt lte gt gte select default math sep';\n  return {\n    aliases: ['dst'],\n    case_insensitive: true,\n    subLanguage: 'xml',\n    contains: [\n      {\n        className: 'template-tag',\n        begin: /\\{[#\\/]/, end: /\\}/, illegal: /;/,\n        contains: [\n          {\n            className: 'name',\n            begin: /[a-zA-Z\\.-]+/,\n            starts: {\n              endsWithParent: true, relevance: 0,\n              contains: [\n                hljs.QUOTE_STRING_MODE\n              ]\n            }\n          }\n        ]\n      },\n      {\n        className: 'template-variable',\n        begin: /\\{/, end: /\\}/, illegal: /;/,\n        keywords: EXPRESSION_KEYWORDS\n      }\n    ]\n  };\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/languages/ebnf.js",
    "content": "/*\nLanguage: Extended Backus-Naur Form\nAuthor: Alex McKibben <alex@nullscope.net>\n*/\n\nfunction(hljs) {\n    var commentMode = hljs.COMMENT(/\\(\\*/, /\\*\\)/);\n\n    var nonTerminalMode = {\n        className: \"attribute\",\n        begin: /^[ ]*[a-zA-Z][a-zA-Z-]*([\\s-]+[a-zA-Z][a-zA-Z]*)*/\n    };\n\n    var specialSequenceMode = {\n        className: \"meta\",\n        begin: /\\?.*\\?/\n    };\n\n    var ruleBodyMode = {\n        begin: /=/, end: /;/,\n        contains: [\n            commentMode,\n            specialSequenceMode,\n            // terminals\n            hljs.APOS_STRING_MODE, hljs.QUOTE_STRING_MODE\n        ]\n    };\n\n    return {\n        illegal: /\\S/,\n        contains: [\n            commentMode,\n            nonTerminalMode,\n            ruleBodyMode\n        ]\n    };\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/languages/elixir.js",
    "content": "/*\nLanguage: Elixir\nAuthor: Josh Adams <josh@isotope11.com>\nDescription: language definition for Elixir source code files (.ex and .exs).  Based on ruby language support.\nCategory: functional\n*/\n\nfunction(hljs) {\n  var ELIXIR_IDENT_RE = '[a-zA-Z_][a-zA-Z0-9_]*(\\\\!|\\\\?)?';\n  var ELIXIR_METHOD_RE = '[a-zA-Z_]\\\\w*[!?=]?|[-+~]\\\\@|<<|>>|=~|===?|<=>|[<>]=?|\\\\*\\\\*|[-/+%^&*~`|]|\\\\[\\\\]=?';\n  var ELIXIR_KEYWORDS =\n    'and false then defined module in return redo retry end for true self when ' +\n    'next until do begin unless nil break not case cond alias while ensure or ' +\n    'include use alias fn quote';\n  var SUBST = {\n    className: 'subst',\n    begin: '#\\\\{', end: '}',\n    lexemes: ELIXIR_IDENT_RE,\n    keywords: ELIXIR_KEYWORDS\n  };\n  var STRING = {\n    className: 'string',\n    contains: [hljs.BACKSLASH_ESCAPE, SUBST],\n    variants: [\n      {\n        begin: /'/, end: /'/\n      },\n      {\n        begin: /\"/, end: /\"/\n      }\n    ]\n  };\n  var FUNCTION = {\n    className: 'function',\n    beginKeywords: 'def defp defmacro', end: /\\B\\b/, // the mode is ended by the title\n    contains: [\n      hljs.inherit(hljs.TITLE_MODE, {\n        begin: ELIXIR_IDENT_RE,\n        endsParent: true\n      })\n    ]\n  };\n  var CLASS = hljs.inherit(FUNCTION, {\n    className: 'class',\n    beginKeywords: 'defimpl defmodule defprotocol defrecord', end: /\\bdo\\b|$|;/\n  });\n  var ELIXIR_DEFAULT_CONTAINS = [\n    STRING,\n    hljs.HASH_COMMENT_MODE,\n    CLASS,\n    FUNCTION,\n    {\n      className: 'symbol',\n      begin: ':(?!\\\\s)',\n      contains: [STRING, {begin: ELIXIR_METHOD_RE}],\n      relevance: 0\n    },\n    {\n      className: 'symbol',\n      begin: ELIXIR_IDENT_RE + ':',\n      relevance: 0\n    },\n    {\n      className: 'number',\n      begin: '(\\\\b0[0-7_]+)|(\\\\b0x[0-9a-fA-F_]+)|(\\\\b[1-9][0-9_]*(\\\\.[0-9_]+)?)|[0_]\\\\b',\n      relevance: 0\n    },\n    {\n      className: 'variable',\n      begin: '(\\\\$\\\\W)|((\\\\$|\\\\@\\\\@?)(\\\\w+))'\n    },\n    {\n      begin: '->'\n    },\n    { // regexp container\n      begin: '(' + hljs.RE_STARTERS_RE + ')\\\\s*',\n      contains: [\n        hljs.HASH_COMMENT_MODE,\n        {\n          className: 'regexp',\n          illegal: '\\\\n',\n          contains: [hljs.BACKSLASH_ESCAPE, SUBST],\n          variants: [\n            {\n              begin: '/', end: '/[a-z]*'\n            },\n            {\n              begin: '%r\\\\[', end: '\\\\][a-z]*'\n            }\n          ]\n        }\n      ],\n      relevance: 0\n    }\n  ];\n  SUBST.contains = ELIXIR_DEFAULT_CONTAINS;\n\n  return {\n    lexemes: ELIXIR_IDENT_RE,\n    keywords: ELIXIR_KEYWORDS,\n    contains: ELIXIR_DEFAULT_CONTAINS\n  };\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/languages/elm.js",
    "content": "/*\nLanguage: Elm\nAuthor: Janis Voigtlaender <janis.voigtlaender@gmail.com>\nCategory: functional\n*/\n\nfunction(hljs) {\n  var COMMENT = {\n    variants: [\n      hljs.COMMENT('--', '$'),\n      hljs.COMMENT(\n        '{-',\n        '-}',\n        {\n          contains: ['self']\n        }\n      )\n    ]\n  };\n\n  var CONSTRUCTOR = {\n    className: 'type',\n    begin: '\\\\b[A-Z][\\\\w\\']*', // TODO: other constructors (built-in, infix).\n    relevance: 0\n  };\n\n  var LIST = {\n    begin: '\\\\(', end: '\\\\)',\n    illegal: '\"',\n    contains: [\n      {className: 'type', begin: '\\\\b[A-Z][\\\\w]*(\\\\((\\\\.\\\\.|,|\\\\w+)\\\\))?'},\n      COMMENT\n    ]\n  };\n\n  var RECORD = {\n    begin: '{', end: '}',\n    contains: LIST.contains\n  };\n\n  return {\n    keywords:\n      'let in if then else case of where module import exposing ' +\n      'type alias as infix infixl infixr port effect command subscription',\n    contains: [\n\n      // Top-level constructions.\n\n      {\n        beginKeywords: 'port effect module', end: 'exposing',\n        keywords: 'port effect module where command subscription exposing',\n        contains: [LIST, COMMENT],\n        illegal: '\\\\W\\\\.|;'\n      },\n      {\n        begin: 'import', end: '$',\n        keywords: 'import as exposing',\n        contains: [LIST, COMMENT],\n        illegal: '\\\\W\\\\.|;'\n      },\n      {\n        begin: 'type', end: '$',\n        keywords: 'type alias',\n        contains: [CONSTRUCTOR, LIST, RECORD, COMMENT]\n      },\n      {\n        beginKeywords: 'infix infixl infixr', end: '$',\n        contains: [hljs.C_NUMBER_MODE, COMMENT]\n      },\n      {\n        begin: 'port', end: '$',\n        keywords: 'port',\n        contains: [COMMENT]\n      },\n\n      // Literals and names.\n\n      // TODO: characters.\n      hljs.QUOTE_STRING_MODE,\n      hljs.C_NUMBER_MODE,\n      CONSTRUCTOR,\n      hljs.inherit(hljs.TITLE_MODE, {begin: '^[_a-z][\\\\w\\']*'}),\n      COMMENT,\n\n      {begin: '->|<-'} // No markup, relevance booster\n    ]\n  };\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/languages/erb.js",
    "content": "/*\nLanguage: ERB (Embedded Ruby)\nRequires: xml.js, ruby.js\nAuthor: Lucas Mazza <lucastmazza@gmail.com>\nContributors: Kassio Borges <kassioborgesm@gmail.com>\nDescription: \"Bridge\" language defining fragments of Ruby in HTML within <% .. %>\nCategory: template\n*/\n\nfunction(hljs) {\n  return {\n    subLanguage: 'xml',\n    contains: [\n      hljs.COMMENT('<%#', '%>'),\n      {\n        begin: '<%[%=-]?', end: '[%-]?%>',\n        subLanguage: 'ruby',\n        excludeBegin: true,\n        excludeEnd: true\n      }\n    ]\n  };\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/languages/erlang-repl.js",
    "content": "/*\n Language: Erlang REPL\n Author: Sergey Ignatov <sergey@ignatov.spb.su>\nCategory: functional\n */\n\nfunction(hljs) {\n  return {\n    keywords: {\n      built_in:\n        'spawn spawn_link self',\n      keyword:\n        'after and andalso|10 band begin bnot bor bsl bsr bxor case catch cond div end fun if ' +\n        'let not of or orelse|10 query receive rem try when xor'\n    },\n    contains: [\n      {\n        className: 'meta', begin: '^[0-9]+> ',\n        relevance: 10\n      },\n      hljs.COMMENT('%', '$'),\n      {\n        className: 'number',\n        begin: '\\\\b(\\\\d+#[a-fA-F0-9]+|\\\\d+(\\\\.\\\\d+)?([eE][-+]?\\\\d+)?)',\n        relevance: 0\n      },\n      hljs.APOS_STRING_MODE,\n      hljs.QUOTE_STRING_MODE,\n      {\n        begin: '\\\\?(::)?([A-Z]\\\\w*(::)?)+'\n      },\n      {\n        begin: '->'\n      },\n      {\n        begin: 'ok'\n      },\n      {\n        begin: '!'\n      },\n      {\n        begin: '(\\\\b[a-z\\'][a-zA-Z0-9_\\']*:[a-z\\'][a-zA-Z0-9_\\']*)|(\\\\b[a-z\\'][a-zA-Z0-9_\\']*)',\n        relevance: 0\n      },\n      {\n        begin: '[A-Z][a-zA-Z0-9_\\']*',\n        relevance: 0\n      }\n    ]\n  };\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/languages/erlang.js",
    "content": "/*\nLanguage: Erlang\nDescription: Erlang is a general-purpose functional language, with strict evaluation, single assignment, and dynamic typing.\nAuthor: Nikolay Zakharov <nikolay.desh@gmail.com>, Dmitry Kovega <arhibot@gmail.com>\nCategory: functional\n*/\n\nfunction(hljs) {\n  var BASIC_ATOM_RE = '[a-z\\'][a-zA-Z0-9_\\']*';\n  var FUNCTION_NAME_RE = '(' + BASIC_ATOM_RE + ':' + BASIC_ATOM_RE + '|' + BASIC_ATOM_RE + ')';\n  var ERLANG_RESERVED = {\n    keyword:\n      'after and andalso|10 band begin bnot bor bsl bzr bxor case catch cond div end fun if ' +\n      'let not of orelse|10 query receive rem try when xor',\n    literal:\n      'false true'\n  };\n\n  var COMMENT = hljs.COMMENT('%', '$');\n  var NUMBER = {\n    className: 'number',\n    begin: '\\\\b(\\\\d+#[a-fA-F0-9]+|\\\\d+(\\\\.\\\\d+)?([eE][-+]?\\\\d+)?)',\n    relevance: 0\n  };\n  var NAMED_FUN = {\n    begin: 'fun\\\\s+' + BASIC_ATOM_RE + '/\\\\d+'\n  };\n  var FUNCTION_CALL = {\n    begin: FUNCTION_NAME_RE + '\\\\(', end: '\\\\)',\n    returnBegin: true,\n    relevance: 0,\n    contains: [\n      {\n        begin: FUNCTION_NAME_RE, relevance: 0\n      },\n      {\n        begin: '\\\\(', end: '\\\\)', endsWithParent: true,\n        returnEnd: true,\n        relevance: 0\n        // \"contains\" defined later\n      }\n    ]\n  };\n  var TUPLE = {\n    begin: '{', end: '}',\n    relevance: 0\n    // \"contains\" defined later\n  };\n  var VAR1 = {\n    begin: '\\\\b_([A-Z][A-Za-z0-9_]*)?',\n    relevance: 0\n  };\n  var VAR2 = {\n    begin: '[A-Z][a-zA-Z0-9_]*',\n    relevance: 0\n  };\n  var RECORD_ACCESS = {\n    begin: '#' + hljs.UNDERSCORE_IDENT_RE,\n    relevance: 0,\n    returnBegin: true,\n    contains: [\n      {\n        begin: '#' + hljs.UNDERSCORE_IDENT_RE,\n        relevance: 0\n      },\n      {\n        begin: '{', end: '}',\n        relevance: 0\n        // \"contains\" defined later\n      }\n    ]\n  };\n\n  var BLOCK_STATEMENTS = {\n    beginKeywords: 'fun receive if try case', end: 'end',\n    keywords: ERLANG_RESERVED\n  };\n  BLOCK_STATEMENTS.contains = [\n    COMMENT,\n    NAMED_FUN,\n    hljs.inherit(hljs.APOS_STRING_MODE, {className: ''}),\n    BLOCK_STATEMENTS,\n    FUNCTION_CALL,\n    hljs.QUOTE_STRING_MODE,\n    NUMBER,\n    TUPLE,\n    VAR1, VAR2,\n    RECORD_ACCESS\n  ];\n\n  var BASIC_MODES = [\n    COMMENT,\n    NAMED_FUN,\n    BLOCK_STATEMENTS,\n    FUNCTION_CALL,\n    hljs.QUOTE_STRING_MODE,\n    NUMBER,\n    TUPLE,\n    VAR1, VAR2,\n    RECORD_ACCESS\n  ];\n  FUNCTION_CALL.contains[1].contains = BASIC_MODES;\n  TUPLE.contains = BASIC_MODES;\n  RECORD_ACCESS.contains[1].contains = BASIC_MODES;\n\n  var PARAMS = {\n    className: 'params',\n    begin: '\\\\(', end: '\\\\)',\n    contains: BASIC_MODES\n  };\n  return {\n    aliases: ['erl'],\n    keywords: ERLANG_RESERVED,\n    illegal: '(</|\\\\*=|\\\\+=|-=|/\\\\*|\\\\*/|\\\\(\\\\*|\\\\*\\\\))',\n    contains: [\n      {\n        className: 'function',\n        begin: '^' + BASIC_ATOM_RE + '\\\\s*\\\\(', end: '->',\n        returnBegin: true,\n        illegal: '\\\\(|#|//|/\\\\*|\\\\\\\\|:|;',\n        contains: [\n          PARAMS,\n          hljs.inherit(hljs.TITLE_MODE, {begin: BASIC_ATOM_RE})\n        ],\n        starts: {\n          end: ';|\\\\.',\n          keywords: ERLANG_RESERVED,\n          contains: BASIC_MODES\n        }\n      },\n      COMMENT,\n      {\n        begin: '^-', end: '\\\\.',\n        relevance: 0,\n        excludeEnd: true,\n        returnBegin: true,\n        lexemes: '-' + hljs.IDENT_RE,\n        keywords:\n          '-module -record -undef -export -ifdef -ifndef -author -copyright -doc -vsn ' +\n          '-import -include -include_lib -compile -define -else -endif -file -behaviour ' +\n          '-behavior -spec',\n        contains: [PARAMS]\n      },\n      NUMBER,\n      hljs.QUOTE_STRING_MODE,\n      RECORD_ACCESS,\n      VAR1, VAR2,\n      TUPLE,\n      {begin: /\\.$/} // relevance booster\n    ]\n  };\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/languages/excel.js",
    "content": "/*\nLanguage: Excel\nAuthor: Victor Zhou <OiCMudkips@users.noreply.github.com>\nDescription: Excel formulae\n*/\n\nfunction(hljs) {\n  return {\n    aliases: ['xlsx', 'xls'],\n    case_insensitive: true,\n    lexemes: /[a-zA-Z][\\w\\.]*/,\n    // built-in functions imported from https://web.archive.org/web/20160513042710/https://support.office.com/en-us/article/Excel-functions-alphabetical-b3944572-255d-4efb-bb96-c6d90033e188\n    keywords: {\n        built_in: 'ABS ACCRINT ACCRINTM ACOS ACOSH ACOT ACOTH AGGREGATE ADDRESS AMORDEGRC AMORLINC AND ARABIC AREAS ASC ASIN ASINH ATAN ATAN2 ATANH AVEDEV AVERAGE AVERAGEA AVERAGEIF AVERAGEIFS BAHTTEXT BASE BESSELI BESSELJ BESSELK BESSELY BETADIST BETA.DIST BETAINV BETA.INV BIN2DEC BIN2HEX BIN2OCT BINOMDIST BINOM.DIST BINOM.DIST.RANGE BINOM.INV BITAND BITLSHIFT BITOR BITRSHIFT BITXOR CALL CEILING CEILING.MATH CEILING.PRECISE CELL CHAR CHIDIST CHIINV CHITEST CHISQ.DIST CHISQ.DIST.RT CHISQ.INV CHISQ.INV.RT CHISQ.TEST CHOOSE CLEAN CODE COLUMN COLUMNS COMBIN COMBINA COMPLEX CONCAT CONCATENATE CONFIDENCE CONFIDENCE.NORM CONFIDENCE.T CONVERT CORREL COS COSH COT COTH COUNT COUNTA COUNTBLANK COUNTIF COUNTIFS COUPDAYBS COUPDAYS COUPDAYSNC COUPNCD COUPNUM COUPPCD COVAR COVARIANCE.P COVARIANCE.S CRITBINOM CSC CSCH CUBEKPIMEMBER CUBEMEMBER CUBEMEMBERPROPERTY CUBERANKEDMEMBER CUBESET CUBESETCOUNT CUBEVALUE CUMIPMT CUMPRINC DATE DATEDIF DATEVALUE DAVERAGE DAY DAYS DAYS360 DB DBCS DCOUNT DCOUNTA DDB DEC2BIN DEC2HEX DEC2OCT DECIMAL DEGREES DELTA DEVSQ DGET DISC DMAX DMIN DOLLAR DOLLARDE DOLLARFR DPRODUCT DSTDEV DSTDEVP DSUM DURATION DVAR DVARP EDATE EFFECT ENCODEURL EOMONTH ERF ERF.PRECISE ERFC ERFC.PRECISE ERROR.TYPE EUROCONVERT EVEN EXACT EXP EXPON.DIST EXPONDIST FACT FACTDOUBLE FALSE|0 F.DIST FDIST F.DIST.RT FILTERXML FIND FINDB F.INV F.INV.RT FINV FISHER FISHERINV FIXED FLOOR FLOOR.MATH FLOOR.PRECISE FORECAST FORECAST.ETS FORECAST.ETS.CONFINT FORECAST.ETS.SEASONALITY FORECAST.ETS.STAT FORECAST.LINEAR FORMULATEXT FREQUENCY F.TEST FTEST FV FVSCHEDULE GAMMA GAMMA.DIST GAMMADIST GAMMA.INV GAMMAINV GAMMALN GAMMALN.PRECISE GAUSS GCD GEOMEAN GESTEP GETPIVOTDATA GROWTH HARMEAN HEX2BIN HEX2DEC HEX2OCT HLOOKUP HOUR HYPERLINK HYPGEOM.DIST HYPGEOMDIST IF|0 IFERROR IFNA IFS IMABS IMAGINARY IMARGUMENT IMCONJUGATE IMCOS IMCOSH IMCOT IMCSC IMCSCH IMDIV IMEXP IMLN IMLOG10 IMLOG2 IMPOWER IMPRODUCT IMREAL IMSEC IMSECH IMSIN IMSINH IMSQRT IMSUB IMSUM IMTAN INDEX INDIRECT INFO INT INTERCEPT INTRATE IPMT IRR ISBLANK ISERR ISERROR ISEVEN ISFORMULA ISLOGICAL ISNA ISNONTEXT ISNUMBER ISODD ISREF ISTEXT ISO.CEILING ISOWEEKNUM ISPMT JIS KURT LARGE LCM LEFT LEFTB LEN LENB LINEST LN LOG LOG10 LOGEST LOGINV LOGNORM.DIST LOGNORMDIST LOGNORM.INV LOOKUP LOWER MATCH MAX MAXA MAXIFS MDETERM MDURATION MEDIAN MID MIDBs MIN MINIFS MINA MINUTE MINVERSE MIRR MMULT MOD MODE MODE.MULT MODE.SNGL MONTH MROUND MULTINOMIAL MUNIT N NA NEGBINOM.DIST NEGBINOMDIST NETWORKDAYS NETWORKDAYS.INTL NOMINAL NORM.DIST NORMDIST NORMINV NORM.INV NORM.S.DIST NORMSDIST NORM.S.INV NORMSINV NOT NOW NPER NPV NUMBERVALUE OCT2BIN OCT2DEC OCT2HEX ODD ODDFPRICE ODDFYIELD ODDLPRICE ODDLYIELD OFFSET OR PDURATION PEARSON PERCENTILE.EXC PERCENTILE.INC PERCENTILE PERCENTRANK.EXC PERCENTRANK.INC PERCENTRANK PERMUT PERMUTATIONA PHI PHONETIC PI PMT POISSON.DIST POISSON POWER PPMT PRICE PRICEDISC PRICEMAT PROB PRODUCT PROPER PV QUARTILE QUARTILE.EXC QUARTILE.INC QUOTIENT RADIANS RAND RANDBETWEEN RANK.AVG RANK.EQ RANK RATE RECEIVED REGISTER.ID REPLACE REPLACEB REPT RIGHT RIGHTB ROMAN ROUND ROUNDDOWN ROUNDUP ROW ROWS RRI RSQ RTD SEARCH SEARCHB SEC SECH SECOND SERIESSUM SHEET SHEETS SIGN SIN SINH SKEW SKEW.P SLN SLOPE SMALL SQL.REQUEST SQRT SQRTPI STANDARDIZE STDEV STDEV.P STDEV.S STDEVA STDEVP STDEVPA STEYX SUBSTITUTE SUBTOTAL SUM SUMIF SUMIFS SUMPRODUCT SUMSQ SUMX2MY2 SUMX2PY2 SUMXMY2 SWITCH SYD T TAN TANH TBILLEQ TBILLPRICE TBILLYIELD T.DIST T.DIST.2T T.DIST.RT TDIST TEXT TEXTJOIN TIME TIMEVALUE T.INV T.INV.2T TINV TODAY TRANSPOSE TREND TRIM TRIMMEAN TRUE|0 TRUNC T.TEST TTEST TYPE UNICHAR UNICODE UPPER VALUE VAR VAR.P VAR.S VARA VARP VARPA VDB VLOOKUP WEBSERVICE WEEKDAY WEEKNUM WEIBULL WEIBULL.DIST WORKDAY WORKDAY.INTL XIRR XNPV XOR YEAR YEARFRAC YIELD YIELDDISC YIELDMAT Z.TEST ZTEST'\n    },\n    contains: [\n      {\n        /* matches a beginning equal sign found in Excel formula examples */ \n        begin: /^=/,\n        end: /[^=]/, returnEnd: true, illegal: /=/, /* only allow single equal sign at front of line */\n        relevance: 10\n      },\n      /* technically, there can be more than 2 letters in column names, but this prevents conflict with some keywords */\n      {\n        /* matches a reference to a single cell */\n        className: 'symbol',\n        begin: /\\b[A-Z]{1,2}\\d+\\b/,\n        end: /[^\\d]/, excludeEnd: true,\n        relevance: 0\n      },\n      {\n        /* matches a reference to a range of cells */\n        className: 'symbol',\n        begin: /[A-Z]{0,2}\\d*:[A-Z]{0,2}\\d*/,\n        relevance: 0\n      },\n      hljs.BACKSLASH_ESCAPE,\n      hljs.QUOTE_STRING_MODE,\n      {\n        className: 'number',\n        begin: hljs.NUMBER_RE + '(%)?',\n        relevance: 0\n      },\n      /* Excel formula comments are done by putting the comment in a function call to N() */\n      hljs.COMMENT(/\\bN\\(/,/\\)/,\n      {\n        excludeBegin: true,\n        excludeEnd: true,\n        illegal: /\\n/\n      })\n    ]\n  };\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/languages/fix.js",
    "content": "/*\nLanguage: FIX\nAuthor: Brent Bradbury <brent@brentium.com>\n*/\n\nfunction(hljs) {\n  return {\n    contains: [\n    {\n      begin: /[^\\u2401\\u0001]+/,\n      end: /[\\u2401\\u0001]/,\n      excludeEnd: true,\n      returnBegin: true,\n      returnEnd: false,\n      contains: [\n      {\n        begin: /([^\\u2401\\u0001=]+)/,\n        end: /=([^\\u2401\\u0001=]+)/,\n        returnEnd: true,\n        returnBegin: false,\n        className: 'attr'\n      },\n      {\n        begin: /=/,\n        end: /([\\u2401\\u0001])/,\n        excludeEnd: true,\n        excludeBegin: true,\n        className: 'string'\n      }]\n    }],\n    case_insensitive: true\n  };\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/languages/flix.js",
    "content": "/*\n Language: Flix\n Category: functional\n Author: Magnus Madsen <mmadsen@uwaterloo.ca>\n */\n\nfunction (hljs) {\n\n    var CHAR = {\n        className: 'string',\n        begin: /'(.|\\\\[xXuU][a-zA-Z0-9]+)'/\n    };\n\n    var STRING = {\n        className: 'string',\n        variants: [\n            {\n                begin: '\"', end: '\"'\n            }\n        ]\n    };\n\n    var NAME = {\n        className: 'title',\n        begin: /[^0-9\\n\\t \"'(),.`{}\\[\\]:;][^\\n\\t \"'(),.`{}\\[\\]:;]+|[^0-9\\n\\t \"'(),.`{}\\[\\]:;=]/\n    };\n\n    var METHOD = {\n        className: 'function',\n        beginKeywords: 'def',\n        end: /[:={\\[(\\n;]/,\n        excludeEnd: true,\n        contains: [NAME]\n    };\n\n    return {\n        keywords: {\n            literal: 'true false',\n            keyword: 'case class def else enum if impl import in lat rel index let match namespace switch type yield with'\n        },\n        contains: [\n            hljs.C_LINE_COMMENT_MODE,\n            hljs.C_BLOCK_COMMENT_MODE,\n            CHAR,\n            STRING,\n            METHOD,\n            hljs.C_NUMBER_MODE\n        ]\n    };\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/languages/fortran.js",
    "content": "/*\nLanguage: Fortran\nAuthor: Anthony Scemama <scemama@irsamc.ups-tlse.fr>\nCategory: scientific\n*/\n\nfunction(hljs) {\n  var PARAMS = {\n    className: 'params',\n    begin: '\\\\(', end: '\\\\)'\n  };\n\n  var F_KEYWORDS = {\n    literal: '.False. .True.',\n    keyword: 'kind do while private call intrinsic where elsewhere ' +\n      'type endtype endmodule endselect endinterface end enddo endif if forall endforall only contains default return stop then ' +\n      'public subroutine|10 function program .and. .or. .not. .le. .eq. .ge. .gt. .lt. ' +\n      'goto save else use module select case ' +\n      'access blank direct exist file fmt form formatted iostat name named nextrec number opened rec recl sequential status unformatted unit ' +\n      'continue format pause cycle exit ' +\n      'c_null_char c_alert c_backspace c_form_feed flush wait decimal round iomsg ' +\n      'synchronous nopass non_overridable pass protected volatile abstract extends import ' +\n      'non_intrinsic value deferred generic final enumerator class associate bind enum ' +\n      'c_int c_short c_long c_long_long c_signed_char c_size_t c_int8_t c_int16_t c_int32_t c_int64_t c_int_least8_t c_int_least16_t ' +\n      'c_int_least32_t c_int_least64_t c_int_fast8_t c_int_fast16_t c_int_fast32_t c_int_fast64_t c_intmax_t C_intptr_t c_float c_double ' +\n      'c_long_double c_float_complex c_double_complex c_long_double_complex c_bool c_char c_null_ptr c_null_funptr ' +\n      'c_new_line c_carriage_return c_horizontal_tab c_vertical_tab iso_c_binding c_loc c_funloc c_associated  c_f_pointer ' +\n      'c_ptr c_funptr iso_fortran_env character_storage_size error_unit file_storage_size input_unit iostat_end iostat_eor ' +\n      'numeric_storage_size output_unit c_f_procpointer ieee_arithmetic ieee_support_underflow_control ' +\n      'ieee_get_underflow_mode ieee_set_underflow_mode newunit contiguous recursive ' +\n      'pad position action delim readwrite eor advance nml interface procedure namelist include sequence elemental pure ' +\n      'integer real character complex logical dimension allocatable|10 parameter ' +\n      'external implicit|10 none double precision assign intent optional pointer ' +\n      'target in out common equivalence data',\n    built_in: 'alog alog10 amax0 amax1 amin0 amin1 amod cabs ccos cexp clog csin csqrt dabs dacos dasin datan datan2 dcos dcosh ddim dexp dint ' +\n      'dlog dlog10 dmax1 dmin1 dmod dnint dsign dsin dsinh dsqrt dtan dtanh float iabs idim idint idnint ifix isign max0 max1 min0 min1 sngl ' +\n      'algama cdabs cdcos cdexp cdlog cdsin cdsqrt cqabs cqcos cqexp cqlog cqsin cqsqrt dcmplx dconjg derf derfc dfloat dgamma dimag dlgama ' +\n      'iqint qabs qacos qasin qatan qatan2 qcmplx qconjg qcos qcosh qdim qerf qerfc qexp qgamma qimag qlgama qlog qlog10 qmax1 qmin1 qmod ' +\n      'qnint qsign qsin qsinh qsqrt qtan qtanh abs acos aimag aint anint asin atan atan2 char cmplx conjg cos cosh exp ichar index int log ' +\n      'log10 max min nint sign sin sinh sqrt tan tanh print write dim lge lgt lle llt mod nullify allocate deallocate ' +\n      'adjustl adjustr all allocated any associated bit_size btest ceiling count cshift date_and_time digits dot_product ' +\n      'eoshift epsilon exponent floor fraction huge iand ibclr ibits ibset ieor ior ishft ishftc lbound len_trim matmul ' +\n      'maxexponent maxloc maxval merge minexponent minloc minval modulo mvbits nearest pack present product ' +\n      'radix random_number random_seed range repeat reshape rrspacing scale scan selected_int_kind selected_real_kind ' +\n      'set_exponent shape size spacing spread sum system_clock tiny transpose trim ubound unpack verify achar iachar transfer ' +\n      'dble entry dprod cpu_time command_argument_count get_command get_command_argument get_environment_variable is_iostat_end ' +\n      'ieee_arithmetic ieee_support_underflow_control ieee_get_underflow_mode ieee_set_underflow_mode ' +\n      'is_iostat_eor move_alloc new_line selected_char_kind same_type_as extends_type_of'  +\n      'acosh asinh atanh bessel_j0 bessel_j1 bessel_jn bessel_y0 bessel_y1 bessel_yn erf erfc erfc_scaled gamma log_gamma hypot norm2 ' +\n      'atomic_define atomic_ref execute_command_line leadz trailz storage_size merge_bits ' +\n      'bge bgt ble blt dshiftl dshiftr findloc iall iany iparity image_index lcobound ucobound maskl maskr ' +\n      'num_images parity popcnt poppar shifta shiftl shiftr this_image'\n  };\n  return {\n    case_insensitive: true,\n    aliases: ['f90', 'f95'],\n    keywords: F_KEYWORDS,\n    illegal: /\\/\\*/,\n    contains: [\n      hljs.inherit(hljs.APOS_STRING_MODE, {className: 'string', relevance: 0}),\n      hljs.inherit(hljs.QUOTE_STRING_MODE, {className: 'string', relevance: 0}),\n      {\n        className: 'function',\n        beginKeywords: 'subroutine function program',\n        illegal: '[${=\\\\n]',\n        contains: [hljs.UNDERSCORE_TITLE_MODE, PARAMS]\n      },\n      hljs.COMMENT('!', '$', {relevance: 0}),\n      {\n        className: 'number',\n        begin: '(?=\\\\b|\\\\+|\\\\-|\\\\.)(?=\\\\.\\\\d|\\\\d)(?:\\\\d+)?(?:\\\\.?\\\\d*)(?:[de][+-]?\\\\d+)?\\\\b\\\\.?',\n        relevance: 0\n      }\n    ]\n  };\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/languages/fsharp.js",
    "content": "/*\nLanguage: F#\nAuthor: Jonas Follesø <jonas@follesoe.no>\nContributors: Troy Kershaw <hello@troykershaw.com>, Henrik Feldt <henrik@haf.se>\nCategory: functional\n*/\nfunction(hljs) {\n  var TYPEPARAM = {\n    begin: '<', end: '>',\n    contains: [\n      hljs.inherit(hljs.TITLE_MODE, {begin: /'[a-zA-Z0-9_]+/})\n    ]\n  };\n\n  return {\n    aliases: ['fs'],\n    keywords:\n      'abstract and as assert base begin class default delegate do done ' +\n      'downcast downto elif else end exception extern false finally for ' +\n      'fun function global if in inherit inline interface internal lazy let ' +\n      'match member module mutable namespace new null of open or ' +\n      'override private public rec return sig static struct then to ' +\n      'true try type upcast use val void when while with yield',\n    illegal: /\\/\\*/,\n    contains: [\n      {\n        // monad builder keywords (matches before non-bang kws)\n        className: 'keyword',\n        begin: /\\b(yield|return|let|do)!/\n      },\n      {\n        className: 'string',\n        begin: '@\"', end: '\"',\n        contains: [{begin: '\"\"'}]\n      },\n      {\n        className: 'string',\n        begin: '\"\"\"', end: '\"\"\"'\n      },\n      hljs.COMMENT('\\\\(\\\\*', '\\\\*\\\\)'),\n      {\n        className: 'class',\n        beginKeywords: 'type', end: '\\\\(|=|$', excludeEnd: true,\n        contains: [\n          hljs.UNDERSCORE_TITLE_MODE,\n          TYPEPARAM\n        ]\n      },\n      {\n        className: 'meta',\n        begin: '\\\\[<', end: '>\\\\]',\n        relevance: 10\n      },\n      {\n        className: 'symbol',\n        begin: '\\\\B(\\'[A-Za-z])\\\\b',\n        contains: [hljs.BACKSLASH_ESCAPE]\n      },\n      hljs.C_LINE_COMMENT_MODE,\n      hljs.inherit(hljs.QUOTE_STRING_MODE, {illegal: null}),\n      hljs.C_NUMBER_MODE\n    ]\n  };\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/languages/gams.js",
    "content": "\n/*\n Language: GAMS\n Author: Stefan Bechert <stefan.bechert@gmx.net>\n Contributors: Oleg Efimov <efimovov@gmail.com>, Mikko Kouhia <mikko.kouhia@iki.fi>\n Description: The General Algebraic Modeling System language\n Category: scientific\n */\n\nfunction (hljs) {\n  var KEYWORDS = {\n    'keyword':\n      'abort acronym acronyms alias all and assign binary card diag display ' +\n      'else eq file files for free ge gt if integer le loop lt maximizing ' +\n      'minimizing model models ne negative no not option options or ord ' +\n      'positive prod put putpage puttl repeat sameas semicont semiint smax ' +\n      'smin solve sos1 sos2 sum system table then until using while xor yes',\n    'literal': 'eps inf na',\n    'built-in':\n      'abs arccos arcsin arctan arctan2 Beta betaReg binomial ceil centropy ' +\n      'cos cosh cvPower div div0 eDist entropy errorf execSeed exp fact ' +\n      'floor frac gamma gammaReg log logBeta logGamma log10 log2 mapVal max ' +\n      'min mod ncpCM ncpF ncpVUpow ncpVUsin normal pi poly power ' +\n      'randBinomial randLinear randTriangle round rPower sigmoid sign ' +\n      'signPower sin sinh slexp sllog10 slrec sqexp sqlog10 sqr sqrec sqrt ' +\n      'tan tanh trunc uniform uniformInt vcPower bool_and bool_eqv bool_imp ' +\n      'bool_not bool_or bool_xor ifThen rel_eq rel_ge rel_gt rel_le rel_lt ' +\n      'rel_ne gday gdow ghour gleap gmillisec gminute gmonth gsecond gyear ' +\n      'jdate jnow jstart jtime errorLevel execError gamsRelease gamsVersion ' +\n      'handleCollect handleDelete handleStatus handleSubmit heapFree ' +\n      'heapLimit heapSize jobHandle jobKill jobStatus jobTerminate ' +\n      'licenseLevel licenseStatus maxExecError sleep timeClose timeComp ' +\n      'timeElapsed timeExec timeStart'\n  };\n  var PARAMS = {\n    className: 'params',\n    begin: /\\(/, end: /\\)/,\n    excludeBegin: true,\n    excludeEnd: true,\n  };\n  var SYMBOLS = {\n    className: 'symbol',\n    variants: [\n      {begin: /\\=[lgenxc]=/},\n      {begin: /\\$/},\n    ]\n  };\n  var QSTR = { // One-line quoted comment string\n    className: 'comment',\n    variants: [\n      {begin: '\\'', end: '\\''},\n      {begin: '\"', end: '\"'},\n    ],\n    illegal: '\\\\n',\n    contains: [hljs.BACKSLASH_ESCAPE]\n  };\n  var ASSIGNMENT = {\n    begin: '/',\n    end: '/',\n    keywords: KEYWORDS,\n    contains: [\n      QSTR,\n      hljs.C_LINE_COMMENT_MODE,\n      hljs.C_BLOCK_COMMENT_MODE,\n      hljs.QUOTE_STRING_MODE,\n      hljs.APOS_STRING_MODE,\n      hljs.C_NUMBER_MODE,\n    ],\n  };\n  var DESCTEXT = { // Parameter/set/variable description text\n    begin: /[a-z][a-z0-9_]*(\\([a-z0-9_, ]*\\))?[ \\t]+/,\n    excludeBegin: true,\n    end: '$',\n    endsWithParent: true,\n    contains: [\n      QSTR,\n      ASSIGNMENT,\n      {\n        className: 'comment',\n        begin: /([ ]*[a-z0-9&#*=?@>\\\\<:\\-,()$\\[\\]_.{}!+%^]+)+/,\n        relevance: 0\n      },\n    ],\n  };\n\n  return {\n    aliases: ['gms'],\n    case_insensitive: true,\n    keywords: KEYWORDS,\n    contains: [\n      hljs.COMMENT(/^\\$ontext/, /^\\$offtext/),\n      {\n        className: 'meta',\n        begin: '^\\\\$[a-z0-9]+',\n        end: '$',\n        returnBegin: true,\n        contains: [\n          {\n            className: 'meta-keyword',\n            begin: '^\\\\$[a-z0-9]+',\n          }\n        ]\n      },\n      hljs.COMMENT('^\\\\*', '$'),\n      hljs.C_LINE_COMMENT_MODE,\n      hljs.C_BLOCK_COMMENT_MODE,\n      hljs.QUOTE_STRING_MODE,\n      hljs.APOS_STRING_MODE,\n      // Declarations\n      {\n        beginKeywords:\n          'set sets parameter parameters variable variables ' +\n          'scalar scalars equation equations',\n        end: ';',\n        contains: [\n          hljs.COMMENT('^\\\\*', '$'),\n          hljs.C_LINE_COMMENT_MODE,\n          hljs.C_BLOCK_COMMENT_MODE,\n          hljs.QUOTE_STRING_MODE,\n          hljs.APOS_STRING_MODE,\n          ASSIGNMENT,\n          DESCTEXT,\n        ]\n      },\n      { // table environment\n        beginKeywords: 'table',\n        end: ';',\n        returnBegin: true,\n        contains: [\n          { // table header row\n            beginKeywords: 'table',\n            end: '$',\n            contains: [DESCTEXT],\n          },\n          hljs.COMMENT('^\\\\*', '$'),\n          hljs.C_LINE_COMMENT_MODE,\n          hljs.C_BLOCK_COMMENT_MODE,\n          hljs.QUOTE_STRING_MODE,\n          hljs.APOS_STRING_MODE,\n          hljs.C_NUMBER_MODE,\n          // Table does not contain DESCTEXT or ASSIGNMENT\n        ]\n      },\n      // Function definitions\n      {\n        className: 'function',\n        begin: /^[a-z][a-z0-9_,\\-+' ()$]+\\.{2}/,\n        returnBegin: true,\n        contains: [\n              { // Function title\n                className: 'title',\n                begin: /^[a-z][a-z0-9_]+/,\n              },\n              PARAMS,\n              SYMBOLS,\n            ],\n      },\n      hljs.C_NUMBER_MODE,\n      SYMBOLS,\n    ]\n  };\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/languages/gauss.js",
    "content": "/*\nLanguage: GAUSS\nAuthor: Matt Evans <matt@aptech.com>\nCategory: scientific\nDescription: GAUSS Mathematical and Statistical language\n*/\nfunction(hljs) {\n  var KEYWORDS = {\n    keyword: 'and bool break call callexe checkinterrupt clear clearg closeall cls comlog compile ' +\n              'continue create debug declare delete disable dlibrary dllcall do dos ed edit else ' +\n              'elseif enable end endfor endif endp endo errorlog errorlogat expr external fn ' +\n              'for format goto gosub graph if keyword let lib library line load loadarray loadexe ' +\n              'loadf loadk loadm loadp loads loadx local locate loopnextindex lprint lpwidth lshow ' +\n              'matrix msym ndpclex new not open or output outwidth plot plotsym pop prcsn print ' +\n              'printdos proc push retp return rndcon rndmod rndmult rndseed run save saveall screen ' +\n              'scroll setarray show sparse stop string struct system trace trap threadfor ' +\n              'threadendfor threadbegin threadjoin threadstat threadend until use while winprint',\n    built_in: 'abs acf aconcat aeye amax amean AmericanBinomCall AmericanBinomCall_Greeks AmericanBinomCall_ImpVol ' +\n              'AmericanBinomPut AmericanBinomPut_Greeks AmericanBinomPut_ImpVol AmericanBSCall AmericanBSCall_Greeks ' +\n              'AmericanBSCall_ImpVol AmericanBSPut AmericanBSPut_Greeks AmericanBSPut_ImpVol amin amult annotationGetDefaults ' +\n              'annotationSetBkd annotationSetFont annotationSetLineColor annotationSetLineStyle annotationSetLineThickness ' +\n              'annualTradingDays arccos arcsin areshape arrayalloc arrayindex arrayinit arraytomat asciiload asclabel astd ' +\n              'astds asum atan atan2 atranspose axmargin balance band bandchol bandcholsol bandltsol bandrv bandsolpd bar ' +\n              'base10 begwind besselj bessely beta box boxcox cdfBeta cdfBetaInv cdfBinomial cdfBinomialInv cdfBvn cdfBvn2 ' +\n              'cdfBvn2e cdfCauchy cdfCauchyInv cdfChic cdfChii cdfChinc cdfChincInv cdfExp cdfExpInv cdfFc cdfFnc cdfFncInv ' +\n              'cdfGam cdfGenPareto cdfHyperGeo cdfLaplace cdfLaplaceInv cdfLogistic cdfLogisticInv cdfmControlCreate cdfMvn ' +\n              'cdfMvn2e cdfMvnce cdfMvne cdfMvt2e cdfMvtce cdfMvte cdfN cdfN2 cdfNc cdfNegBinomial cdfNegBinomialInv cdfNi ' +\n              'cdfPoisson cdfPoissonInv cdfRayleigh cdfRayleighInv cdfTc cdfTci cdfTnc cdfTvn cdfWeibull cdfWeibullInv cdir ' +\n              'ceil ChangeDir chdir chiBarSquare chol choldn cholsol cholup chrs close code cols colsf combinate combinated ' +\n              'complex con cond conj cons ConScore contour conv convertsatostr convertstrtosa corrm corrms corrvc corrx corrxs ' +\n              'cos cosh counts countwts crossprd crout croutp csrcol csrlin csvReadM csvReadSA cumprodc cumsumc curve cvtos ' +\n              'datacreate datacreatecomplex datalist dataload dataloop dataopen datasave date datestr datestring datestrymd ' +\n              'dayinyr dayofweek dbAddDatabase dbClose dbCommit dbCreateQuery dbExecQuery dbGetConnectOptions dbGetDatabaseName ' +\n              'dbGetDriverName dbGetDrivers dbGetHostName dbGetLastErrorNum dbGetLastErrorText dbGetNumericalPrecPolicy ' +\n              'dbGetPassword dbGetPort dbGetTableHeaders dbGetTables dbGetUserName dbHasFeature dbIsDriverAvailable dbIsOpen ' +\n              'dbIsOpenError dbOpen dbQueryBindValue dbQueryClear dbQueryCols dbQueryExecPrepared dbQueryFetchAllM dbQueryFetchAllSA ' +\n              'dbQueryFetchOneM dbQueryFetchOneSA dbQueryFinish dbQueryGetBoundValue dbQueryGetBoundValues dbQueryGetField ' +\n              'dbQueryGetLastErrorNum dbQueryGetLastErrorText dbQueryGetLastInsertID dbQueryGetLastQuery dbQueryGetPosition ' +\n              'dbQueryIsActive dbQueryIsForwardOnly dbQueryIsNull dbQueryIsSelect dbQueryIsValid dbQueryPrepare dbQueryRows ' +\n              'dbQuerySeek dbQuerySeekFirst dbQuerySeekLast dbQuerySeekNext dbQuerySeekPrevious dbQuerySetForwardOnly ' +\n              'dbRemoveDatabase dbRollback dbSetConnectOptions dbSetDatabaseName dbSetHostName dbSetNumericalPrecPolicy ' +\n              'dbSetPort dbSetUserName dbTransaction DeleteFile delif delrows denseToSp denseToSpRE denToZero design det detl ' +\n              'dfft dffti diag diagrv digamma doswin DOSWinCloseall DOSWinOpen dotfeq dotfeqmt dotfge dotfgemt dotfgt dotfgtmt ' +\n              'dotfle dotflemt dotflt dotfltmt dotfne dotfnemt draw drop dsCreate dstat dstatmt dstatmtControlCreate dtdate dtday ' +\n              'dttime dttodtv dttostr dttoutc dtvnormal dtvtodt dtvtoutc dummy dummybr dummydn eig eigh eighv eigv elapsedTradingDays ' +\n              'endwind envget eof eqSolve eqSolvemt eqSolvemtControlCreate eqSolvemtOutCreate eqSolveset erf erfc erfccplx erfcplx error ' +\n              'etdays ethsec etstr EuropeanBinomCall EuropeanBinomCall_Greeks EuropeanBinomCall_ImpVol EuropeanBinomPut ' +\n              'EuropeanBinomPut_Greeks EuropeanBinomPut_ImpVol EuropeanBSCall EuropeanBSCall_Greeks EuropeanBSCall_ImpVol ' +\n              'EuropeanBSPut EuropeanBSPut_Greeks EuropeanBSPut_ImpVol exctsmpl exec execbg exp extern eye fcheckerr fclearerr feq ' +\n              'feqmt fflush fft ffti fftm fftmi fftn fge fgemt fgets fgetsa fgetsat fgetst fgt fgtmt fileinfo filesa fle flemt ' +\n              'floor flt fltmt fmod fne fnemt fonts fopen formatcv formatnv fputs fputst fseek fstrerror ftell ftocv ftos ftostrC ' +\n              'gamma gammacplx gammaii gausset gdaAppend gdaCreate gdaDStat gdaDStatMat gdaGetIndex gdaGetName gdaGetNames gdaGetOrders ' +\n              'gdaGetType gdaGetTypes gdaGetVarInfo gdaIsCplx gdaLoad gdaPack gdaRead gdaReadByIndex gdaReadSome gdaReadSparse ' +\n              'gdaReadStruct gdaReportVarInfo gdaSave gdaUpdate gdaUpdateAndPack gdaVars gdaWrite gdaWrite32 gdaWriteSome getarray ' +\n              'getdims getf getGAUSShome getmatrix getmatrix4D getname getnamef getNextTradingDay getNextWeekDay getnr getorders ' +\n              'getpath getPreviousTradingDay getPreviousWeekDay getRow getscalar3D getscalar4D getTrRow getwind glm gradcplx gradMT ' +\n              'gradMTm gradMTT gradMTTm gradp graphprt graphset hasimag header headermt hess hessMT hessMTg hessMTgw hessMTm ' +\n              'hessMTmw hessMTT hessMTTg hessMTTgw hessMTTm hessMTw hessp hist histf histp hsec imag indcv indexcat indices indices2 ' +\n              'indicesf indicesfn indnv indsav indx integrate1d integrateControlCreate intgrat2 intgrat3 inthp1 inthp2 inthp3 inthp4 ' +\n              'inthpControlCreate intquad1 intquad2 intquad3 intrleav intrleavsa intrsect intsimp inv invpd invswp iscplx iscplxf ' +\n              'isden isinfnanmiss ismiss key keyav keyw lag lag1 lagn lapEighb lapEighi lapEighvb lapEighvi lapgEig lapgEigh lapgEighv ' +\n              'lapgEigv lapgSchur lapgSvdcst lapgSvds lapgSvdst lapSvdcusv lapSvds lapSvdusv ldlp ldlsol linSolve listwise ln lncdfbvn ' +\n              'lncdfbvn2 lncdfmvn lncdfn lncdfn2 lncdfnc lnfact lngammacplx lnpdfmvn lnpdfmvt lnpdfn lnpdft loadd loadstruct loadwind ' +\n              'loess loessmt loessmtControlCreate log loglog logx logy lower lowmat lowmat1 ltrisol lu lusol machEpsilon make makevars ' +\n              'makewind margin matalloc matinit mattoarray maxbytes maxc maxindc maxv maxvec mbesselei mbesselei0 mbesselei1 mbesseli ' +\n              'mbesseli0 mbesseli1 meanc median mergeby mergevar minc minindc minv miss missex missrv moment momentd movingave ' +\n              'movingaveExpwgt movingaveWgt nextindex nextn nextnevn nextwind ntos null null1 numCombinations ols olsmt olsmtControlCreate ' +\n              'olsqr olsqr2 olsqrmt ones optn optnevn orth outtyp pacf packedToSp packr parse pause pdfCauchy pdfChi pdfExp pdfGenPareto ' +\n              'pdfHyperGeo pdfLaplace pdfLogistic pdfn pdfPoisson pdfRayleigh pdfWeibull pi pinv pinvmt plotAddArrow plotAddBar plotAddBox ' +\n              'plotAddHist plotAddHistF plotAddHistP plotAddPolar plotAddScatter plotAddShape plotAddTextbox plotAddTS plotAddXY plotArea ' +\n              'plotBar plotBox plotClearLayout plotContour plotCustomLayout plotGetDefaults plotHist plotHistF plotHistP plotLayout ' +\n              'plotLogLog plotLogX plotLogY plotOpenWindow plotPolar plotSave plotScatter plotSetAxesPen plotSetBar plotSetBarFill ' +\n              'plotSetBarStacked plotSetBkdColor plotSetFill plotSetGrid plotSetLegend plotSetLineColor plotSetLineStyle plotSetLineSymbol ' +\n              'plotSetLineThickness plotSetNewWindow plotSetTitle plotSetWhichYAxis plotSetXAxisShow plotSetXLabel plotSetXRange ' +\n              'plotSetXTicInterval plotSetXTicLabel plotSetYAxisShow plotSetYLabel plotSetYRange plotSetZAxisShow plotSetZLabel ' +\n              'plotSurface plotTS plotXY polar polychar polyeval polygamma polyint polymake polymat polymroot polymult polyroot ' +\n              'pqgwin previousindex princomp printfm printfmt prodc psi putarray putf putvals pvCreate pvGetIndex pvGetParNames ' +\n              'pvGetParVector pvLength pvList pvPack pvPacki pvPackm pvPackmi pvPacks pvPacksi pvPacksm pvPacksmi pvPutParVector ' +\n              'pvTest pvUnpack QNewton QNewtonmt QNewtonmtControlCreate QNewtonmtOutCreate QNewtonSet QProg QProgmt QProgmtInCreate ' +\n              'qqr qqre qqrep qr qre qrep qrsol qrtsol qtyr qtyre qtyrep quantile quantiled qyr qyre qyrep qz rank rankindx readr ' +\n              'real reclassify reclassifyCuts recode recserar recsercp recserrc rerun rescale reshape rets rev rfft rffti rfftip rfftn ' +\n              'rfftnp rfftp rndBernoulli rndBeta rndBinomial rndCauchy rndChiSquare rndCon rndCreateState rndExp rndGamma rndGeo rndGumbel ' +\n              'rndHyperGeo rndi rndKMbeta rndKMgam rndKMi rndKMn rndKMnb rndKMp rndKMu rndKMvm rndLaplace rndLCbeta rndLCgam rndLCi rndLCn ' +\n              'rndLCnb rndLCp rndLCu rndLCvm rndLogNorm rndMTu rndMVn rndMVt rndn rndnb rndNegBinomial rndp rndPoisson rndRayleigh ' +\n              'rndStateSkip rndu rndvm rndWeibull rndWishart rotater round rows rowsf rref sampleData satostrC saved saveStruct savewind ' +\n              'scale scale3d scalerr scalinfnanmiss scalmiss schtoc schur searchsourcepath seekr select selif seqa seqm setdif setdifsa ' +\n              'setvars setvwrmode setwind shell shiftr sin singleindex sinh sleep solpd sortc sortcc sortd sorthc sorthcc sortind ' +\n              'sortindc sortmc sortr sortrc spBiconjGradSol spChol spConjGradSol spCreate spDenseSubmat spDiagRvMat spEigv spEye spLDL ' +\n              'spline spLU spNumNZE spOnes spreadSheetReadM spreadSheetReadSA spreadSheetWrite spScale spSubmat spToDense spTrTDense ' +\n              'spTScalar spZeros sqpSolve sqpSolveMT sqpSolveMTControlCreate sqpSolveMTlagrangeCreate sqpSolveMToutCreate sqpSolveSet ' +\n              'sqrt statements stdc stdsc stocv stof strcombine strindx strlen strput strrindx strsect strsplit strsplitPad strtodt ' +\n              'strtof strtofcplx strtriml strtrimr strtrunc strtruncl strtruncpad strtruncr submat subscat substute subvec sumc sumr ' +\n              'surface svd svd1 svd2 svdcusv svds svdusv sysstate tab tan tanh tempname threadBegin threadEnd threadEndFor threadFor ' +\n              'threadJoin threadStat time timedt timestr timeutc title tkf2eps tkf2ps tocart todaydt toeplitz token topolar trapchk ' +\n              'trigamma trimr trunc type typecv typef union unionsa uniqindx uniqindxsa unique uniquesa upmat upmat1 upper utctodt ' +\n              'utctodtv utrisol vals varCovMS varCovXS varget vargetl varmall varmares varput varputl vartypef vcm vcms vcx vcxs ' +\n              'vec vech vecr vector vget view viewxyz vlist vnamecv volume vput vread vtypecv wait waitc walkindex where window ' +\n              'writer xlabel xlsGetSheetCount xlsGetSheetSize xlsGetSheetTypes xlsMakeRange xlsReadM xlsReadSA xlsWrite xlsWriteM ' +\n              'xlsWriteSA xpnd xtics xy xyz ylabel ytics zeros zeta zlabel ztics',\n    literal: 'DB_AFTER_LAST_ROW DB_ALL_TABLES DB_BATCH_OPERATIONS DB_BEFORE_FIRST_ROW DB_BLOB DB_EVENT_NOTIFICATIONS ' +\n             'DB_FINISH_QUERY DB_HIGH_PRECISION DB_LAST_INSERT_ID DB_LOW_PRECISION_DOUBLE DB_LOW_PRECISION_INT32 ' +\n             'DB_LOW_PRECISION_INT64 DB_LOW_PRECISION_NUMBERS DB_MULTIPLE_RESULT_SETS DB_NAMED_PLACEHOLDERS ' +\n             'DB_POSITIONAL_PLACEHOLDERS DB_PREPARED_QUERIES DB_QUERY_SIZE DB_SIMPLE_LOCKING DB_SYSTEM_TABLES DB_TABLES ' +\n             'DB_TRANSACTIONS DB_UNICODE DB_VIEWS'\n  };\n\n  var PREPROCESSOR =\n  {\n    className: 'meta',\n    begin: '#', end: '$',\n    keywords: {'meta-keyword': 'define definecs|10 undef ifdef ifndef iflight ifdllcall ifmac ifos2win ifunix else endif lineson linesoff srcfile srcline'},\n    contains: [\n      {\n        begin: /\\\\\\n/, relevance: 0\n      },\n      {\n        beginKeywords: 'include', end: '$',\n        keywords: {'meta-keyword': 'include'},\n        contains: [\n          {\n            className: 'meta-string',\n            begin: '\"', end: '\"',\n            illegal: '\\\\n'\n          }\n        ]\n      },\n      hljs.C_LINE_COMMENT_MODE,\n      hljs.C_BLOCK_COMMENT_MODE\n    ]\n  };\n\n  var FUNCTION_TITLE = hljs.UNDERSCORE_IDENT_RE + '\\\\s*\\\\(?';\n  var PARSE_PARAMS = [\n    {\n      className: 'params',\n      begin: /\\(/, end: /\\)/,\n      keywords: KEYWORDS,\n      relevance: 0,\n      contains: [\n        hljs.C_NUMBER_MODE,\n        hljs.C_LINE_COMMENT_MODE,\n        hljs.C_BLOCK_COMMENT_MODE\n      ]\n    }\n  ];\n\n  return {\n    aliases: ['gss'],\n    case_insensitive: true, // language is case-insensitive\n    keywords: KEYWORDS,\n    illegal: '(\\\\{[%#]|[%#]\\\\})',\n    contains: [\n      hljs.C_NUMBER_MODE,\n      hljs.C_LINE_COMMENT_MODE,\n      hljs.C_BLOCK_COMMENT_MODE,\n      hljs.COMMENT('@', '@'),\n      PREPROCESSOR,\n      {\n        className: 'string',\n        begin: '\"', end: '\"',\n        contains: [hljs.BACKSLASH_ESCAPE]\n      },\n      {\n        className: 'function',\n        beginKeywords: 'proc keyword',\n        end: ';',\n        excludeEnd: true,\n        keywords: KEYWORDS,\n        contains: [\n          {\n            begin: FUNCTION_TITLE, returnBegin: true,\n            contains: [hljs.UNDERSCORE_TITLE_MODE],\n            relevance: 0\n          },\n          hljs.C_NUMBER_MODE,\n          hljs.C_LINE_COMMENT_MODE,\n          hljs.C_BLOCK_COMMENT_MODE,\n          PREPROCESSOR\n        ].concat(PARSE_PARAMS)\n      },\n      {\n        className: 'function',\n        beginKeywords: 'fn',\n        end: ';',\n        excludeEnd: true,\n        keywords: KEYWORDS,\n        contains: [\n          {\n            begin: FUNCTION_TITLE + hljs.IDENT_RE + '\\\\)?\\\\s*\\\\=\\\\s*', returnBegin: true,\n            contains: [hljs.UNDERSCORE_TITLE_MODE],\n            relevance: 0\n          },\n          hljs.C_NUMBER_MODE,\n          hljs.C_LINE_COMMENT_MODE,\n          hljs.C_BLOCK_COMMENT_MODE\n        ].concat(PARSE_PARAMS)\n      },\n      {\n        className: 'function',\n        begin: '\\\\bexternal (proc|keyword|fn)\\\\s+',\n        end: ';',\n        excludeEnd: true,\n        keywords: KEYWORDS,\n        contains: [\n          {\n            begin: FUNCTION_TITLE, returnBegin: true,\n            contains: [hljs.UNDERSCORE_TITLE_MODE],\n            relevance: 0\n          },\n          hljs.C_LINE_COMMENT_MODE,\n          hljs.C_BLOCK_COMMENT_MODE\n        ]\n      },\n      {\n        className: 'function',\n        begin: '\\\\bexternal (matrix|string|array|sparse matrix|struct ' + hljs.IDENT_RE + ')\\\\s+',\n        end: ';',\n        excludeEnd: true,\n        keywords: KEYWORDS,\n        contains: [\n          hljs.C_LINE_COMMENT_MODE,\n          hljs.C_BLOCK_COMMENT_MODE\n        ]\n      }\n    ]\n  };\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/languages/gcode.js",
    "content": "/*\n Language: G-code (ISO 6983)\n Contributors: Adam Joseph Cook <adam.joseph.cook@gmail.com>\n Description: G-code syntax highlighter for Fanuc and other common CNC machine tool controls.\n */\n\nfunction(hljs) {\n    var GCODE_IDENT_RE = '[A-Z_][A-Z0-9_.]*';\n    var GCODE_CLOSE_RE = '\\\\%';\n    var GCODE_KEYWORDS =\n      'IF DO WHILE ENDWHILE CALL ENDIF SUB ENDSUB GOTO REPEAT ENDREPEAT ' +\n      'EQ LT GT NE GE LE OR XOR';\n    var GCODE_START = {\n        className: 'meta',\n        begin: '([O])([0-9]+)'\n    };\n    var GCODE_CODE = [\n        hljs.C_LINE_COMMENT_MODE,\n        hljs.C_BLOCK_COMMENT_MODE,\n        hljs.COMMENT(/\\(/, /\\)/),\n        hljs.inherit(hljs.C_NUMBER_MODE, {begin: '([-+]?([0-9]*\\\\.?[0-9]+\\\\.?))|' + hljs.C_NUMBER_RE}),\n        hljs.inherit(hljs.APOS_STRING_MODE, {illegal: null}),\n        hljs.inherit(hljs.QUOTE_STRING_MODE, {illegal: null}),\n        {\n            className: 'name',\n            begin: '([G])([0-9]+\\\\.?[0-9]?)'\n        },\n        {\n            className: 'name',\n            begin: '([M])([0-9]+\\\\.?[0-9]?)'\n        },\n        {\n            className: 'attr',\n            begin: '(VC|VS|#)',\n            end: '(\\\\d+)'\n        },\n        {\n            className: 'attr',\n            begin: '(VZOFX|VZOFY|VZOFZ)'\n        },\n        {\n            className: 'built_in',\n            begin: '(ATAN|ABS|ACOS|ASIN|SIN|COS|EXP|FIX|FUP|ROUND|LN|TAN)(\\\\[)',\n            end: '([-+]?([0-9]*\\\\.?[0-9]+\\\\.?))(\\\\])'\n        },\n        {\n            className: 'symbol',\n            variants: [\n                {\n                    begin: 'N', end: '\\\\d+',\n                    illegal: '\\\\W'\n                }\n            ]\n        }\n    ];\n\n    return {\n        aliases: ['nc'],\n        // Some implementations (CNC controls) of G-code are interoperable with uppercase and lowercase letters seamlessly.\n        // However, most prefer all uppercase and uppercase is customary.\n        case_insensitive: true,\n        lexemes: GCODE_IDENT_RE,\n        keywords: GCODE_KEYWORDS,\n        contains: [\n            {\n                className: 'meta',\n                begin: GCODE_CLOSE_RE\n            },\n            GCODE_START\n        ].concat(GCODE_CODE)\n    };\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/languages/gherkin.js",
    "content": "/*\n Language: Gherkin\n Author: Sam Pikesley (@pikesley) <sam.pikesley@theodi.org>\n Description: Gherkin (Cucumber etc)\n */\n\nfunction (hljs) {\n  return {\n    aliases: ['feature'],\n    keywords: 'Feature Background Ability Business\\ Need Scenario Scenarios Scenario\\ Outline Scenario\\ Template Examples Given And Then But When',\n    contains: [\n      {\n        className: 'symbol',\n        begin: '\\\\*',\n        relevance: 0\n      },\n      {\n        className: 'meta',\n        begin: '@[^@\\\\s]+'\n      },\n      {\n        begin: '\\\\|', end: '\\\\|\\\\w*$',\n        contains: [\n          {\n            className: 'string',\n            begin: '[^|]+'\n          }\n        ]\n      },\n      {\n        className: 'variable',\n        begin: '<', end: '>'\n      },\n      hljs.HASH_COMMENT_MODE,\n      {\n        className: 'string',\n        begin: '\"\"\"', end: '\"\"\"'\n      },\n      hljs.QUOTE_STRING_MODE\n    ]\n  };\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/languages/glsl.js",
    "content": "/*\nLanguage: GLSL\nDescription: OpenGL Shading Language\nAuthor: Sergey Tikhomirov <sergey@tikhomirov.io>\nCategory: graphics\n*/\n\nfunction(hljs) {\n  return {\n    keywords: {\n      keyword:\n        // Statements\n        'break continue discard do else for if return while switch case default ' +\n        // Qualifiers\n        'attribute binding buffer ccw centroid centroid varying coherent column_major const cw ' +\n        'depth_any depth_greater depth_less depth_unchanged early_fragment_tests equal_spacing ' +\n        'flat fractional_even_spacing fractional_odd_spacing highp in index inout invariant ' +\n        'invocations isolines layout line_strip lines lines_adjacency local_size_x local_size_y ' +\n        'local_size_z location lowp max_vertices mediump noperspective offset origin_upper_left ' +\n        'out packed patch pixel_center_integer point_mode points precise precision quads r11f_g11f_b10f '+\n        'r16 r16_snorm r16f r16i r16ui r32f r32i r32ui r8 r8_snorm r8i r8ui readonly restrict ' +\n        'rg16 rg16_snorm rg16f rg16i rg16ui rg32f rg32i rg32ui rg8 rg8_snorm rg8i rg8ui rgb10_a2 ' +\n        'rgb10_a2ui rgba16 rgba16_snorm rgba16f rgba16i rgba16ui rgba32f rgba32i rgba32ui rgba8 ' +\n        'rgba8_snorm rgba8i rgba8ui row_major sample shared smooth std140 std430 stream triangle_strip ' +\n        'triangles triangles_adjacency uniform varying vertices volatile writeonly',\n      type:\n        'atomic_uint bool bvec2 bvec3 bvec4 dmat2 dmat2x2 dmat2x3 dmat2x4 dmat3 dmat3x2 dmat3x3 ' +\n        'dmat3x4 dmat4 dmat4x2 dmat4x3 dmat4x4 double dvec2 dvec3 dvec4 float iimage1D iimage1DArray ' +\n        'iimage2D iimage2DArray iimage2DMS iimage2DMSArray iimage2DRect iimage3D iimageBuffer' +\n        'iimageCube iimageCubeArray image1D image1DArray image2D image2DArray image2DMS image2DMSArray ' +\n        'image2DRect image3D imageBuffer imageCube imageCubeArray int isampler1D isampler1DArray ' +\n        'isampler2D isampler2DArray isampler2DMS isampler2DMSArray isampler2DRect isampler3D ' +\n        'isamplerBuffer isamplerCube isamplerCubeArray ivec2 ivec3 ivec4 mat2 mat2x2 mat2x3 ' +\n        'mat2x4 mat3 mat3x2 mat3x3 mat3x4 mat4 mat4x2 mat4x3 mat4x4 sampler1D sampler1DArray ' +\n        'sampler1DArrayShadow sampler1DShadow sampler2D sampler2DArray sampler2DArrayShadow ' +\n        'sampler2DMS sampler2DMSArray sampler2DRect sampler2DRectShadow sampler2DShadow sampler3D ' +\n        'samplerBuffer samplerCube samplerCubeArray samplerCubeArrayShadow samplerCubeShadow ' +\n        'image1D uimage1DArray uimage2D uimage2DArray uimage2DMS uimage2DMSArray uimage2DRect ' +\n        'uimage3D uimageBuffer uimageCube uimageCubeArray uint usampler1D usampler1DArray ' +\n        'usampler2D usampler2DArray usampler2DMS usampler2DMSArray usampler2DRect usampler3D ' +\n        'samplerBuffer usamplerCube usamplerCubeArray uvec2 uvec3 uvec4 vec2 vec3 vec4 void',\n      built_in:\n        // Constants\n        'gl_MaxAtomicCounterBindings gl_MaxAtomicCounterBufferSize gl_MaxClipDistances gl_MaxClipPlanes ' +\n        'gl_MaxCombinedAtomicCounterBuffers gl_MaxCombinedAtomicCounters gl_MaxCombinedImageUniforms ' +\n        'gl_MaxCombinedImageUnitsAndFragmentOutputs gl_MaxCombinedTextureImageUnits gl_MaxComputeAtomicCounterBuffers ' +\n        'gl_MaxComputeAtomicCounters gl_MaxComputeImageUniforms gl_MaxComputeTextureImageUnits ' +\n        'gl_MaxComputeUniformComponents gl_MaxComputeWorkGroupCount gl_MaxComputeWorkGroupSize ' +\n        'gl_MaxDrawBuffers gl_MaxFragmentAtomicCounterBuffers gl_MaxFragmentAtomicCounters ' +\n        'gl_MaxFragmentImageUniforms gl_MaxFragmentInputComponents gl_MaxFragmentInputVectors ' +\n        'gl_MaxFragmentUniformComponents gl_MaxFragmentUniformVectors gl_MaxGeometryAtomicCounterBuffers ' +\n        'gl_MaxGeometryAtomicCounters gl_MaxGeometryImageUniforms gl_MaxGeometryInputComponents ' +\n        'gl_MaxGeometryOutputComponents gl_MaxGeometryOutputVertices gl_MaxGeometryTextureImageUnits ' +\n        'gl_MaxGeometryTotalOutputComponents gl_MaxGeometryUniformComponents gl_MaxGeometryVaryingComponents ' +\n        'gl_MaxImageSamples gl_MaxImageUnits gl_MaxLights gl_MaxPatchVertices gl_MaxProgramTexelOffset ' +\n        'gl_MaxTessControlAtomicCounterBuffers gl_MaxTessControlAtomicCounters gl_MaxTessControlImageUniforms ' +\n        'gl_MaxTessControlInputComponents gl_MaxTessControlOutputComponents gl_MaxTessControlTextureImageUnits ' +\n        'gl_MaxTessControlTotalOutputComponents gl_MaxTessControlUniformComponents ' +\n        'gl_MaxTessEvaluationAtomicCounterBuffers gl_MaxTessEvaluationAtomicCounters ' +\n        'gl_MaxTessEvaluationImageUniforms gl_MaxTessEvaluationInputComponents gl_MaxTessEvaluationOutputComponents ' +\n        'gl_MaxTessEvaluationTextureImageUnits gl_MaxTessEvaluationUniformComponents ' +\n        'gl_MaxTessGenLevel gl_MaxTessPatchComponents gl_MaxTextureCoords gl_MaxTextureImageUnits ' +\n        'gl_MaxTextureUnits gl_MaxVaryingComponents gl_MaxVaryingFloats gl_MaxVaryingVectors ' +\n        'gl_MaxVertexAtomicCounterBuffers gl_MaxVertexAtomicCounters gl_MaxVertexAttribs gl_MaxVertexImageUniforms ' +\n        'gl_MaxVertexOutputComponents gl_MaxVertexOutputVectors gl_MaxVertexTextureImageUnits ' +\n        'gl_MaxVertexUniformComponents gl_MaxVertexUniformVectors gl_MaxViewports gl_MinProgramTexelOffset ' +\n        // Variables\n        'gl_BackColor gl_BackLightModelProduct gl_BackLightProduct gl_BackMaterial ' +\n        'gl_BackSecondaryColor gl_ClipDistance gl_ClipPlane gl_ClipVertex gl_Color ' +\n        'gl_DepthRange gl_EyePlaneQ gl_EyePlaneR gl_EyePlaneS gl_EyePlaneT gl_Fog gl_FogCoord ' +\n        'gl_FogFragCoord gl_FragColor gl_FragCoord gl_FragData gl_FragDepth gl_FrontColor ' +\n        'gl_FrontFacing gl_FrontLightModelProduct gl_FrontLightProduct gl_FrontMaterial ' +\n        'gl_FrontSecondaryColor gl_GlobalInvocationID gl_InstanceID gl_InvocationID gl_Layer gl_LightModel ' +\n        'gl_LightSource gl_LocalInvocationID gl_LocalInvocationIndex gl_ModelViewMatrix ' +\n        'gl_ModelViewMatrixInverse gl_ModelViewMatrixInverseTranspose gl_ModelViewMatrixTranspose ' +\n        'gl_ModelViewProjectionMatrix gl_ModelViewProjectionMatrixInverse gl_ModelViewProjectionMatrixInverseTranspose ' +\n        'gl_ModelViewProjectionMatrixTranspose gl_MultiTexCoord0 gl_MultiTexCoord1 gl_MultiTexCoord2 ' +\n        'gl_MultiTexCoord3 gl_MultiTexCoord4 gl_MultiTexCoord5 gl_MultiTexCoord6 gl_MultiTexCoord7 ' +\n        'gl_Normal gl_NormalMatrix gl_NormalScale gl_NumSamples gl_NumWorkGroups gl_ObjectPlaneQ ' +\n        'gl_ObjectPlaneR gl_ObjectPlaneS gl_ObjectPlaneT gl_PatchVerticesIn gl_Point gl_PointCoord ' +\n        'gl_PointSize gl_Position gl_PrimitiveID gl_PrimitiveIDIn gl_ProjectionMatrix gl_ProjectionMatrixInverse ' +\n        'gl_ProjectionMatrixInverseTranspose gl_ProjectionMatrixTranspose gl_SampleID gl_SampleMask ' +\n        'gl_SampleMaskIn gl_SamplePosition gl_SecondaryColor gl_TessCoord gl_TessLevelInner gl_TessLevelOuter ' +\n        'gl_TexCoord gl_TextureEnvColor gl_TextureMatrix gl_TextureMatrixInverse gl_TextureMatrixInverseTranspose ' +\n        'gl_TextureMatrixTranspose gl_Vertex gl_VertexID gl_ViewportIndex gl_WorkGroupID gl_WorkGroupSize gl_in gl_out ' +\n        // Functions\n        'EmitStreamVertex EmitVertex EndPrimitive EndStreamPrimitive abs acos acosh all any asin ' +\n        'asinh atan atanh atomicAdd atomicAnd atomicCompSwap atomicCounter atomicCounterDecrement ' +\n        'atomicCounterIncrement atomicExchange atomicMax atomicMin atomicOr atomicXor barrier ' +\n        'bitCount bitfieldExtract bitfieldInsert bitfieldReverse ceil clamp cos cosh cross ' +\n        'dFdx dFdy degrees determinant distance dot equal exp exp2 faceforward findLSB findMSB ' +\n        'floatBitsToInt floatBitsToUint floor fma fract frexp ftransform fwidth greaterThan ' +\n        'greaterThanEqual groupMemoryBarrier imageAtomicAdd imageAtomicAnd imageAtomicCompSwap ' +\n        'imageAtomicExchange imageAtomicMax imageAtomicMin imageAtomicOr imageAtomicXor imageLoad ' +\n        'imageSize imageStore imulExtended intBitsToFloat interpolateAtCentroid interpolateAtOffset ' +\n        'interpolateAtSample inverse inversesqrt isinf isnan ldexp length lessThan lessThanEqual log ' +\n        'log2 matrixCompMult max memoryBarrier memoryBarrierAtomicCounter memoryBarrierBuffer ' +\n        'memoryBarrierImage memoryBarrierShared min mix mod modf noise1 noise2 noise3 noise4 ' +\n        'normalize not notEqual outerProduct packDouble2x32 packHalf2x16 packSnorm2x16 packSnorm4x8 ' +\n        'packUnorm2x16 packUnorm4x8 pow radians reflect refract round roundEven shadow1D shadow1DLod ' +\n        'shadow1DProj shadow1DProjLod shadow2D shadow2DLod shadow2DProj shadow2DProjLod sign sin sinh ' +\n        'smoothstep sqrt step tan tanh texelFetch texelFetchOffset texture texture1D texture1DLod ' +\n        'texture1DProj texture1DProjLod texture2D texture2DLod texture2DProj texture2DProjLod ' +\n        'texture3D texture3DLod texture3DProj texture3DProjLod textureCube textureCubeLod ' +\n        'textureGather textureGatherOffset textureGatherOffsets textureGrad textureGradOffset ' +\n        'textureLod textureLodOffset textureOffset textureProj textureProjGrad textureProjGradOffset ' +\n        'textureProjLod textureProjLodOffset textureProjOffset textureQueryLevels textureQueryLod ' +\n        'textureSize transpose trunc uaddCarry uintBitsToFloat umulExtended unpackDouble2x32 ' +\n        'unpackHalf2x16 unpackSnorm2x16 unpackSnorm4x8 unpackUnorm2x16 unpackUnorm4x8 usubBorrow',\n      literal: 'true false'\n    },\n    illegal: '\"',\n    contains: [\n      hljs.C_LINE_COMMENT_MODE,\n      hljs.C_BLOCK_COMMENT_MODE,\n      hljs.C_NUMBER_MODE,\n      {\n        className: 'meta',\n        begin: '#', end: '$'\n      }\n    ]\n  };\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/languages/go.js",
    "content": "/*\nLanguage: Go\nAuthor: Stephan Kountso aka StepLg <steplg@gmail.com>\nContributors: Evgeny Stepanischev <imbolk@gmail.com>\nDescription: Google go language (golang). For info about language see http://golang.org/\nCategory: system\n*/\n\nfunction(hljs) {\n  var GO_KEYWORDS = {\n    keyword:\n      'break default func interface select case map struct chan else goto package switch ' +\n      'const fallthrough if range type continue for import return var go defer ' +\n      'bool byte complex64 complex128 float32 float64 int8 int16 int32 int64 string uint8 ' +\n      'uint16 uint32 uint64 int uint uintptr rune',\n    literal:\n       'true false iota nil',\n    built_in:\n      'append cap close complex copy imag len make new panic print println real recover delete'\n  };\n  return {\n    aliases: ['golang'],\n    keywords: GO_KEYWORDS,\n    illegal: '</',\n    contains: [\n      hljs.C_LINE_COMMENT_MODE,\n      hljs.C_BLOCK_COMMENT_MODE,\n      {\n        className: 'string',\n        variants: [\n          hljs.QUOTE_STRING_MODE,\n          {begin: '\\'', end: '[^\\\\\\\\]\\''},\n          {begin: '`', end: '`'},\n        ]\n      },\n      {\n        className: 'number',\n        variants: [\n          {begin: hljs.C_NUMBER_RE + '[dflsi]', relevance: 1},\n          hljs.C_NUMBER_MODE\n        ]\n      },\n      {\n        begin: /:=/ // relevance booster\n      },\n      {\n        className: 'function',\n        beginKeywords: 'func', end: /\\s*\\{/, excludeEnd: true,\n        contains: [\n          hljs.TITLE_MODE,\n          {\n            className: 'params',\n            begin: /\\(/, end: /\\)/,\n            keywords: GO_KEYWORDS,\n            illegal: /[\"']/\n          }\n        ]\n      }\n    ]\n  };\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/languages/golo.js",
    "content": "/*\nLanguage: Golo\nAuthor: Philippe Charriere <ph.charriere@gmail.com>\nDescription: a lightweight dynamic language for the JVM, see http://golo-lang.org/\n*/\n\nfunction(hljs) {\n    return {\n      keywords: {\n        keyword:\n          'println readln print import module function local return let var ' +\n          'while for foreach times in case when match with break continue ' +\n          'augment augmentation each find filter reduce ' +\n          'if then else otherwise try catch finally raise throw orIfNull ' +\n          'DynamicObject|10 DynamicVariable struct Observable map set vector list array',\n        literal:\n          'true false null'\n      },\n      contains: [\n        hljs.HASH_COMMENT_MODE,\n        hljs.QUOTE_STRING_MODE,\n        hljs.C_NUMBER_MODE,\n        {\n          className: 'meta', begin: '@[A-Za-z]+'\n        }\n      ]\n    }\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/languages/gradle.js",
    "content": "/*\nLanguage: Gradle\nAuthor: Damian Mee <mee.damian@gmail.com>\nWebsite: http://meeDamian.com\n*/\n\nfunction(hljs) {\n  return {\n    case_insensitive: true,\n    keywords: {\n      keyword:\n        'task project allprojects subprojects artifacts buildscript configurations ' +\n        'dependencies repositories sourceSets description delete from into include ' +\n        'exclude source classpath destinationDir includes options sourceCompatibility ' +\n        'targetCompatibility group flatDir doLast doFirst flatten todir fromdir ant ' +\n        'def abstract break case catch continue default do else extends final finally ' +\n        'for if implements instanceof native new private protected public return static ' +\n        'switch synchronized throw throws transient try volatile while strictfp package ' +\n        'import false null super this true antlrtask checkstyle codenarc copy boolean ' +\n        'byte char class double float int interface long short void compile runTime ' +\n        'file fileTree abs any append asList asWritable call collect compareTo count ' +\n        'div dump each eachByte eachFile eachLine every find findAll flatten getAt ' +\n        'getErr getIn getOut getText grep immutable inject inspect intersect invokeMethods ' +\n        'isCase join leftShift minus multiply newInputStream newOutputStream newPrintWriter ' +\n        'newReader newWriter next plus pop power previous print println push putAt read ' +\n        'readBytes readLines reverse reverseEach round size sort splitEachLine step subMap ' +\n        'times toInteger toList tokenize upto waitForOrKill withPrintWriter withReader ' +\n        'withStream withWriter withWriterAppend write writeLine'\n    },\n    contains: [\n      hljs.C_LINE_COMMENT_MODE,\n      hljs.C_BLOCK_COMMENT_MODE,\n      hljs.APOS_STRING_MODE,\n      hljs.QUOTE_STRING_MODE,\n      hljs.NUMBER_MODE,\n      hljs.REGEXP_MODE\n\n    ]\n  }\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/languages/groovy.js",
    "content": "/*\n Language: Groovy\n Author: Guillaume Laforge <glaforge@gmail.com>\n Website: http://glaforge.appspot.com\n Description: Groovy programming language implementation inspired from Vsevolod's Java mode\n */\n\nfunction(hljs) {\n    return {\n        keywords: {\n            literal : 'true false null',\n            keyword:\n            'byte short char int long boolean float double void ' +\n            // groovy specific keywords\n            'def as in assert trait ' +\n            // common keywords with Java\n            'super this abstract static volatile transient public private protected synchronized final ' +\n            'class interface enum if else for while switch case break default continue ' +\n            'throw throws try catch finally implements extends new import package return instanceof'\n        },\n\n        contains: [\n            hljs.COMMENT(\n                '/\\\\*\\\\*',\n                '\\\\*/',\n                {\n                    relevance : 0,\n                    contains : [\n                      {\n                          // eat up @'s in emails to prevent them to be recognized as doctags\n                          begin: /\\w+@/, relevance: 0\n                      },\n                      {\n                          className : 'doctag',\n                          begin : '@[A-Za-z]+'\n                      }\n                    ]\n                }\n            ),\n            hljs.C_LINE_COMMENT_MODE,\n            hljs.C_BLOCK_COMMENT_MODE,\n            {\n                className: 'string',\n                begin: '\"\"\"', end: '\"\"\"'\n            },\n            {\n                className: 'string',\n                begin: \"'''\", end: \"'''\"\n            },\n            {\n                className: 'string',\n                begin: \"\\\\$/\", end: \"/\\\\$\",\n                relevance: 10\n            },\n            hljs.APOS_STRING_MODE,\n            {\n                className: 'regexp',\n                begin: /~?\\/[^\\/\\n]+\\//,\n                contains: [\n                    hljs.BACKSLASH_ESCAPE\n                ]\n            },\n            hljs.QUOTE_STRING_MODE,\n            {\n                className: 'meta',\n                begin: \"^#!/usr/bin/env\", end: '$',\n                illegal: '\\n'\n            },\n            hljs.BINARY_NUMBER_MODE,\n            {\n                className: 'class',\n                beginKeywords: 'class interface trait enum', end: '{',\n                illegal: ':',\n                contains: [\n                    {beginKeywords: 'extends implements'},\n                    hljs.UNDERSCORE_TITLE_MODE\n                ]\n            },\n            hljs.C_NUMBER_MODE,\n            {\n                className: 'meta', begin: '@[A-Za-z]+'\n            },\n            {\n                // highlight map keys and named parameters as strings\n                className: 'string', begin: /[^\\?]{0}[A-Za-z0-9_$]+ *:/\n            },\n            {\n                // catch middle element of the ternary operator\n                // to avoid highlight it as a label, named parameter, or map key\n                begin: /\\?/, end: /\\:/\n            },\n            {\n                // highlight labeled statements\n                className: 'symbol', begin: '^\\\\s*[A-Za-z0-9_$]+:',\n                relevance: 0\n            }\n        ],\n        illegal: /#|<\\//\n    }\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/languages/haml.js",
    "content": "/*\nLanguage: Haml\nRequires: ruby.js\nAuthor: Dan Allen <dan.j.allen@gmail.com>\nWebsite: http://google.com/profiles/dan.j.allen\nCategory: template\n*/\n\n// TODO support filter tags like :javascript, support inline HTML\nfunction(hljs) {\n  return {\n    case_insensitive: true,\n    contains: [\n      {\n        className: 'meta',\n        begin: '^!!!( (5|1\\\\.1|Strict|Frameset|Basic|Mobile|RDFa|XML\\\\b.*))?$',\n        relevance: 10\n      },\n      // FIXME these comments should be allowed to span indented lines\n      hljs.COMMENT(\n        '^\\\\s*(!=#|=#|-#|/).*$',\n        false,\n        {\n          relevance: 0\n        }\n      ),\n      {\n        begin: '^\\\\s*(-|=|!=)(?!#)',\n        starts: {\n          end: '\\\\n',\n          subLanguage: 'ruby'\n        }\n      },\n      {\n        className: 'tag',\n        begin: '^\\\\s*%',\n        contains: [\n          {\n            className: 'selector-tag',\n            begin: '\\\\w+'\n          },\n          {\n            className: 'selector-id',\n            begin: '#[\\\\w-]+'\n          },\n          {\n            className: 'selector-class',\n            begin: '\\\\.[\\\\w-]+'\n          },\n          {\n            begin: '{\\\\s*',\n            end: '\\\\s*}',\n            contains: [\n              {\n                begin: ':\\\\w+\\\\s*=>',\n                end: ',\\\\s+',\n                returnBegin: true,\n                endsWithParent: true,\n                contains: [\n                  {\n                    className: 'attr',\n                    begin: ':\\\\w+'\n                  },\n                  hljs.APOS_STRING_MODE,\n                  hljs.QUOTE_STRING_MODE,\n                  {\n                    begin: '\\\\w+',\n                    relevance: 0\n                  }\n                ]\n              }\n            ]\n          },\n          {\n            begin: '\\\\(\\\\s*',\n            end: '\\\\s*\\\\)',\n            excludeEnd: true,\n            contains: [\n              {\n                begin: '\\\\w+\\\\s*=',\n                end: '\\\\s+',\n                returnBegin: true,\n                endsWithParent: true,\n                contains: [\n                  {\n                    className: 'attr',\n                    begin: '\\\\w+',\n                    relevance: 0\n                  },\n                  hljs.APOS_STRING_MODE,\n                  hljs.QUOTE_STRING_MODE,\n                  {\n                    begin: '\\\\w+',\n                    relevance: 0\n                  }\n                ]\n              }\n            ]\n          }\n        ]\n      },\n      {\n        begin: '^\\\\s*[=~]\\\\s*'\n      },\n      {\n        begin: '#{',\n        starts: {\n          end: '}',\n          subLanguage: 'ruby'\n        }\n      }\n    ]\n  };\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/languages/handlebars.js",
    "content": "/*\nLanguage: Handlebars\nRequires: xml.js\nAuthor: Robin Ward <robin.ward@gmail.com>\nDescription: Matcher for Handlebars as well as EmberJS additions.\nCategory: template\n*/\n\nfunction(hljs) {\n  var BUILT_INS = {'builtin-name': 'each in with if else unless bindattr action collection debugger log outlet template unbound view yield'};\n  return {\n    aliases: ['hbs', 'html.hbs', 'html.handlebars'],\n    case_insensitive: true,\n    subLanguage: 'xml',\n    contains: [\n    hljs.COMMENT('{{!(--)?', '(--)?}}'),\n      {\n        className: 'template-tag',\n        begin: /\\{\\{[#\\/]/, end: /\\}\\}/,\n        contains: [\n          {\n            className: 'name',\n            begin: /[a-zA-Z\\.-]+/,\n            keywords: BUILT_INS,\n            starts: {\n              endsWithParent: true, relevance: 0,\n              contains: [\n                hljs.QUOTE_STRING_MODE\n              ]\n            }\n          }\n        ]\n      },\n      {\n        className: 'template-variable',\n        begin: /\\{\\{/, end: /\\}\\}/,\n        keywords: BUILT_INS\n      }\n    ]\n  };\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/languages/haskell.js",
    "content": "/*\nLanguage: Haskell\nAuthor: Jeremy Hull <sourdrums@gmail.com>\nContributors: Zena Treep <zena.treep@gmail.com>\nCategory: functional\n*/\n\nfunction(hljs) {\n  var COMMENT = {\n    variants: [\n      hljs.COMMENT('--', '$'),\n      hljs.COMMENT(\n        '{-',\n        '-}',\n        {\n          contains: ['self']\n        }\n      )\n    ]\n  };\n\n  var PRAGMA = {\n    className: 'meta',\n    begin: '{-#', end: '#-}'\n  };\n\n  var PREPROCESSOR = {\n    className: 'meta',\n    begin: '^#', end: '$'\n  };\n\n  var CONSTRUCTOR = {\n    className: 'type',\n    begin: '\\\\b[A-Z][\\\\w\\']*', // TODO: other constructors (build-in, infix).\n    relevance: 0\n  };\n\n  var LIST = {\n    begin: '\\\\(', end: '\\\\)',\n    illegal: '\"',\n    contains: [\n      PRAGMA,\n      PREPROCESSOR,\n      {className: 'type', begin: '\\\\b[A-Z][\\\\w]*(\\\\((\\\\.\\\\.|,|\\\\w+)\\\\))?'},\n      hljs.inherit(hljs.TITLE_MODE, {begin: '[_a-z][\\\\w\\']*'}),\n      COMMENT\n    ]\n  };\n\n  var RECORD = {\n    begin: '{', end: '}',\n    contains: LIST.contains\n  };\n\n  return {\n    aliases: ['hs'],\n    keywords:\n      'let in if then else case of where do module import hiding ' +\n      'qualified type data newtype deriving class instance as default ' +\n      'infix infixl infixr foreign export ccall stdcall cplusplus ' +\n      'jvm dotnet safe unsafe family forall mdo proc rec',\n    contains: [\n\n      // Top-level constructions.\n\n      {\n        beginKeywords: 'module', end: 'where',\n        keywords: 'module where',\n        contains: [LIST, COMMENT],\n        illegal: '\\\\W\\\\.|;'\n      },\n      {\n        begin: '\\\\bimport\\\\b', end: '$',\n        keywords: 'import qualified as hiding',\n        contains: [LIST, COMMENT],\n        illegal: '\\\\W\\\\.|;'\n      },\n\n      {\n        className: 'class',\n        begin: '^(\\\\s*)?(class|instance)\\\\b', end: 'where',\n        keywords: 'class family instance where',\n        contains: [CONSTRUCTOR, LIST, COMMENT]\n      },\n      {\n        className: 'class',\n        begin: '\\\\b(data|(new)?type)\\\\b', end: '$',\n        keywords: 'data family type newtype deriving',\n        contains: [PRAGMA, CONSTRUCTOR, LIST, RECORD, COMMENT]\n      },\n      {\n        beginKeywords: 'default', end: '$',\n        contains: [CONSTRUCTOR, LIST, COMMENT]\n      },\n      {\n        beginKeywords: 'infix infixl infixr', end: '$',\n        contains: [hljs.C_NUMBER_MODE, COMMENT]\n      },\n      {\n        begin: '\\\\bforeign\\\\b', end: '$',\n        keywords: 'foreign import export ccall stdcall cplusplus jvm ' +\n                  'dotnet safe unsafe',\n        contains: [CONSTRUCTOR, hljs.QUOTE_STRING_MODE, COMMENT]\n      },\n      {\n        className: 'meta',\n        begin: '#!\\\\/usr\\\\/bin\\\\/env\\ runhaskell', end: '$'\n      },\n\n      // \"Whitespaces\".\n\n      PRAGMA,\n      PREPROCESSOR,\n\n      // Literals and names.\n\n      // TODO: characters.\n      hljs.QUOTE_STRING_MODE,\n      hljs.C_NUMBER_MODE,\n      CONSTRUCTOR,\n      hljs.inherit(hljs.TITLE_MODE, {begin: '^[_a-z][\\\\w\\']*'}),\n\n      COMMENT,\n\n      {begin: '->|<-'} // No markup, relevance booster\n    ]\n  };\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/languages/haxe.js",
    "content": "/*\nLanguage: Haxe\nAuthor: Christopher Kaster <ikasoki@gmail.com> (Based on the actionscript.js language file by Alexander Myadzel)\nContributors: Kenton Hamaluik <kentonh@gmail.com>\n*/\n\nfunction(hljs) {\n  var IDENT_RE = '[a-zA-Z_$][a-zA-Z0-9_$]*';\n  var IDENT_FUNC_RETURN_TYPE_RE = '([*]|[a-zA-Z_$][a-zA-Z0-9_$]*)';\n\n  var HAXE_BASIC_TYPES = 'Int Float String Bool Dynamic Void Array ';\n\n  return {\n    aliases: ['hx'],\n    keywords: {\n      keyword: 'break callback case cast catch continue default do dynamic else enum extern ' +\n               'for function here if import in inline never new override package private get set ' +\n               'public return static super switch this throw trace try typedef untyped using var while ' +\n               HAXE_BASIC_TYPES,\n      built_in:\n        'trace this',\n      literal:\n        'true false null _'\n    },\n    contains: [\n      { className: 'string', // interpolate-able strings\n        begin: '\\'', end: '\\'',\n        contains: [\n          hljs.BACKSLASH_ESCAPE,\n          { className: 'subst', // interpolation\n            begin: '\\\\$\\\\{', end: '\\\\}'\n          },\n          { className: 'subst', // interpolation\n            begin: '\\\\$', end: '\\\\W}'\n          }\n        ]\n      },\n      hljs.QUOTE_STRING_MODE,\n      hljs.C_LINE_COMMENT_MODE,\n      hljs.C_BLOCK_COMMENT_MODE,\n      hljs.C_NUMBER_MODE,\n      { className: 'meta', // compiler meta\n        begin: '@:', end: '$'\n      },\n      { className: 'meta', // compiler conditionals\n        begin: '#', end: '$',\n        keywords: {'meta-keyword': 'if else elseif end error'}\n      },\n      { className: 'type', // function types\n        begin: ':[ \\t]*', end: '[^A-Za-z0-9_ \\t\\\\->]',\n        excludeBegin: true, excludeEnd: true,\n        relevance: 0\n      },\n      { className: 'type', // types\n        begin: ':[ \\t]*', end: '\\\\W',\n        excludeBegin: true, excludeEnd: true\n      },\n      { className: 'type', // instantiation\n        begin: 'new *', end: '\\\\W',\n        excludeBegin: true, excludeEnd: true\n      },\n      { className: 'class', // enums\n        beginKeywords: 'enum', end: '\\\\{',\n        contains: [\n          hljs.TITLE_MODE\n        ]\n      },\n      { className: 'class', // abstracts\n        beginKeywords: 'abstract', end: '[\\\\{$]',\n        contains: [\n          { className: 'type',\n            begin: '\\\\(', end: '\\\\)',\n            excludeBegin: true, excludeEnd: true\n          },\n          { className: 'type',\n            begin: 'from +', end: '\\\\W',\n            excludeBegin: true, excludeEnd: true\n          },\n          { className: 'type',\n            begin: 'to +', end: '\\\\W',\n            excludeBegin: true, excludeEnd: true\n          },\n          hljs.TITLE_MODE\n        ],\n        keywords: {\n          keyword: 'abstract from to'\n        }\n      },\n      { className: 'class', // classes\n        begin: '\\\\b(class|interface) +', end: '[\\\\{$]',  excludeEnd: true,\n        keywords: 'class interface',\n        contains: [\n          { className: 'keyword',\n            begin: '\\\\b(extends|implements) +',\n            keywords: 'extends implements',\n            contains: [\n              {\n                className: 'type',\n                begin: hljs.IDENT_RE,\n                relevance: 0\n              }\n            ]\n          },\n          hljs.TITLE_MODE\n        ]\n      },\n      { className: 'function',\n        beginKeywords: 'function', end: '\\\\(', excludeEnd: true,\n        illegal: '\\\\S',\n        contains: [\n          hljs.TITLE_MODE\n        ]\n      }\n    ],\n    illegal: /<\\//\n  };\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/languages/hsp.js",
    "content": "/*\nLanguage: HSP\nAuthor: prince <MC.prince.0203@gmail.com>\nWebsite: http://prince.webcrow.jp/\nCategory: scripting\n*/\n\nfunction(hljs) {\n  return {\n    case_insensitive: true,\n    lexemes: /[\\w\\._]+/,\n    keywords: 'goto gosub return break repeat loop continue wait await dim sdim foreach dimtype dup dupptr end stop newmod delmod mref run exgoto on mcall assert logmes newlab resume yield onexit onerror onkey onclick oncmd exist delete mkdir chdir dirlist bload bsave bcopy memfile if else poke wpoke lpoke getstr chdpm memexpand memcpy memset notesel noteadd notedel noteload notesave randomize noteunsel noteget split strrep setease button chgdisp exec dialog mmload mmplay mmstop mci pset pget syscolor mes print title pos circle cls font sysfont objsize picload color palcolor palette redraw width gsel gcopy gzoom gmode bmpsave hsvcolor getkey listbox chkbox combox input mesbox buffer screen bgscr mouse objsel groll line clrobj boxf objprm objmode stick grect grotate gsquare gradf objimage objskip objenable celload celdiv celput newcom querycom delcom cnvstow comres axobj winobj sendmsg comevent comevarg sarrayconv callfunc cnvwtos comevdisp libptr system hspstat hspver stat cnt err strsize looplev sublev iparam wparam lparam refstr refdval int rnd strlen length length2 length3 length4 vartype gettime peek wpeek lpeek varptr varuse noteinfo instr abs limit getease str strmid strf getpath strtrim sin cos tan atan sqrt double absf expf logf limitf powf geteasef mousex mousey mousew hwnd hinstance hdc ginfo objinfo dirinfo sysinfo thismod __hspver__ __hsp30__ __date__ __time__ __line__ __file__ _debug __hspdef__ and or xor not screen_normal screen_palette screen_hide screen_fixedsize screen_tool screen_frame gmode_gdi gmode_mem gmode_rgb0 gmode_alpha gmode_rgb0alpha gmode_add gmode_sub gmode_pixela ginfo_mx ginfo_my ginfo_act ginfo_sel ginfo_wx1 ginfo_wy1 ginfo_wx2 ginfo_wy2 ginfo_vx ginfo_vy ginfo_sizex ginfo_sizey ginfo_winx ginfo_winy ginfo_mesx ginfo_mesy ginfo_r ginfo_g ginfo_b ginfo_paluse ginfo_dispx ginfo_dispy ginfo_cx ginfo_cy ginfo_intid ginfo_newid ginfo_sx ginfo_sy objinfo_mode objinfo_bmscr objinfo_hwnd notemax notesize dir_cur dir_exe dir_win dir_sys dir_cmdline dir_desktop dir_mydoc dir_tv font_normal font_bold font_italic font_underline font_strikeout font_antialias objmode_normal objmode_guifont objmode_usefont gsquare_grad msgothic msmincho do until while wend for next _break _continue switch case default swbreak swend ddim ldim alloc m_pi rad2deg deg2rad ease_linear ease_quad_in ease_quad_out ease_quad_inout ease_cubic_in ease_cubic_out ease_cubic_inout ease_quartic_in ease_quartic_out ease_quartic_inout ease_bounce_in ease_bounce_out ease_bounce_inout ease_shake_in ease_shake_out ease_shake_inout ease_loop',\n    contains: [\n      hljs.C_LINE_COMMENT_MODE,\n      hljs.C_BLOCK_COMMENT_MODE,\n      hljs.QUOTE_STRING_MODE,\n      hljs.APOS_STRING_MODE,\n\n      {\n        // multi-line string\n        className: 'string',\n        begin: '{\"', end: '\"}',\n        contains: [hljs.BACKSLASH_ESCAPE]\n      },\n\n      hljs.COMMENT(';', '$', {relevance: 0}),\n\n      {\n        // pre-processor\n        className: 'meta',\n        begin: '#', end: '$',\n        keywords: {'meta-keyword': 'addion cfunc cmd cmpopt comfunc const defcfunc deffunc define else endif enum epack func global if ifdef ifndef include modcfunc modfunc modinit modterm module pack packopt regcmd runtime undef usecom uselib'},\n        contains: [\n          hljs.inherit(hljs.QUOTE_STRING_MODE, {className: 'meta-string'}),\n          hljs.NUMBER_MODE,\n          hljs.C_NUMBER_MODE,\n          hljs.C_LINE_COMMENT_MODE,\n          hljs.C_BLOCK_COMMENT_MODE\n        ]\n      },\n\n      {\n        // label\n        className: 'symbol',\n        begin: '^\\\\*(\\\\w+|@)'\n      },\n\n      hljs.NUMBER_MODE,\n      hljs.C_NUMBER_MODE\n    ]\n  };\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/languages/htmlbars.js",
    "content": "/*\nLanguage: HTMLBars\nRequires: xml.js\nAuthor: Michael Johnston <lastobelus@gmail.com>\nDescription: Matcher for HTMLBars\nCategory: template\n*/\n\nfunction(hljs) {\n  var BUILT_INS = 'action collection component concat debugger each each-in else get hash if input link-to loc log mut outlet partial query-params render textarea unbound unless with yield view';\n\n  var ATTR_ASSIGNMENT = {\n    illegal: /\\}\\}/,\n    begin: /[a-zA-Z0-9_]+=/,\n    returnBegin: true,\n    relevance: 0,\n    contains: [\n      {\n        className: 'attr', begin: /[a-zA-Z0-9_]+/\n      }\n    ]\n  };\n\n  var SUB_EXPR = {\n    illegal: /\\}\\}/,\n    begin: /\\)/, end: /\\)/,\n    contains: [\n      {\n        begin: /[a-zA-Z\\.\\-]+/,\n        keywords: {built_in: BUILT_INS},\n        starts: {\n          endsWithParent: true, relevance: 0,\n          contains: [\n            hljs.QUOTE_STRING_MODE,\n          ]\n        }\n      }\n    ]\n  };\n\n  var TAG_INNARDS = {\n    endsWithParent: true, relevance: 0,\n    keywords: {keyword: 'as', built_in: BUILT_INS},\n    contains: [\n      hljs.QUOTE_STRING_MODE,\n      ATTR_ASSIGNMENT,\n      hljs.NUMBER_MODE\n    ]\n  };\n\n  return {\n    case_insensitive: true,\n    subLanguage: 'xml',\n    contains: [\n      hljs.COMMENT('{{!(--)?', '(--)?}}'),\n      {\n        className: 'template-tag',\n        begin: /\\{\\{[#\\/]/, end: /\\}\\}/,\n        contains: [\n          {\n            className: 'name',\n            begin: /[a-zA-Z\\.\\-]+/,\n            keywords: {'builtin-name': BUILT_INS},\n            starts: TAG_INNARDS\n          }\n        ]\n      },\n      {\n        className: 'template-variable',\n        begin: /\\{\\{[a-zA-Z][a-zA-Z\\-]+/, end: /\\}\\}/,\n        keywords: {keyword: 'as', built_in: BUILT_INS},\n        contains: [\n          hljs.QUOTE_STRING_MODE\n        ]\n      }\n    ]\n  };\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/languages/http.js",
    "content": "/*\nLanguage: HTTP\nDescription: HTTP request and response headers with automatic body highlighting\nAuthor: Ivan Sagalaev <maniac@softwaremaniacs.org>\nCategory: common, protocols\n*/\n\nfunction(hljs) {\n  var VERSION = 'HTTP/[0-9\\\\.]+';\n  return {\n    aliases: ['https'],\n    illegal: '\\\\S',\n    contains: [\n      {\n        begin: '^' + VERSION, end: '$',\n        contains: [{className: 'number', begin: '\\\\b\\\\d{3}\\\\b'}]\n      },\n      {\n        begin: '^[A-Z]+ (.*?) ' + VERSION + '$', returnBegin: true, end: '$',\n        contains: [\n          {\n            className: 'string',\n            begin: ' ', end: ' ',\n            excludeBegin: true, excludeEnd: true\n          },\n          {\n            begin: VERSION\n          },\n          {\n            className: 'keyword',\n            begin: '[A-Z]+'\n          }\n        ]\n      },\n      {\n        className: 'attribute',\n        begin: '^\\\\w', end: ': ', excludeEnd: true,\n        illegal: '\\\\n|\\\\s|=',\n        starts: {end: '$', relevance: 0}\n      },\n      {\n        begin: '\\\\n\\\\n',\n        starts: {subLanguage: [], endsWithParent: true}\n      }\n    ]\n  };\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/languages/inform7.js",
    "content": "/*\nLanguage: Inform 7\nAuthor: Bruno Dias <bruno.r.dias@gmail.com>\nDescription: Language definition for Inform 7, a DSL for writing parser interactive fiction.\n*/\n\nfunction(hljs) {\n  var START_BRACKET = '\\\\[';\n  var END_BRACKET = '\\\\]';\n  return {\n    aliases: ['i7'],\n    case_insensitive: true,\n    keywords: {\n      // Some keywords more or less unique to I7, for relevance.\n      keyword:\n        // kind:\n        'thing room person man woman animal container ' +\n        'supporter backdrop door ' +\n        // characteristic:\n        'scenery open closed locked inside gender ' +\n        // verb:\n        'is are say understand ' +\n        // misc keyword:\n        'kind of rule'\n    },\n    contains: [\n      {\n        className: 'string',\n        begin: '\"', end: '\"',\n        relevance: 0,\n        contains: [\n          {\n            className: 'subst',\n            begin: START_BRACKET, end: END_BRACKET\n          }\n        ]\n      },\n      {\n        className: 'section',\n        begin: /^(Volume|Book|Part|Chapter|Section|Table)\\b/,\n        end: '$'\n      },\n      {\n        // Rule definition\n        // This is here for relevance.\n        begin: /^(Check|Carry out|Report|Instead of|To|Rule|When|Before|After)\\b/,\n        end: ':',\n        contains: [\n          {\n            //Rule name\n            begin: '\\\\(This', end: '\\\\)'\n          }\n        ]\n      },\n      {\n        className: 'comment',\n        begin: START_BRACKET, end: END_BRACKET,\n        contains: ['self']\n      }\n    ]\n  };\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/languages/ini.js",
    "content": "/*\nLanguage: Ini\nContributors: Guillaume Gomez <guillaume1.gomez@gmail.com>\nCategory: common, config\n*/\n\nfunction(hljs) {\n  var STRING = {\n    className: \"string\",\n    contains: [hljs.BACKSLASH_ESCAPE],\n    variants: [\n      {\n        begin: \"'''\", end: \"'''\",\n        relevance: 10\n      }, {\n        begin: '\"\"\"', end: '\"\"\"',\n        relevance: 10\n      }, {\n        begin: '\"', end: '\"'\n      }, {\n        begin: \"'\", end: \"'\"\n      }\n    ]\n  };\n  return {\n    aliases: ['toml'],\n    case_insensitive: true,\n    illegal: /\\S/,\n    contains: [\n      hljs.COMMENT(';', '$'),\n      hljs.HASH_COMMENT_MODE,\n      {\n        className: 'section',\n        begin: /^\\s*\\[+/, end: /\\]+/\n      },\n      {\n        begin: /^[a-z0-9\\[\\]_-]+\\s*=\\s*/, end: '$',\n        returnBegin: true,\n        contains: [\n          {\n            className: 'attr',\n            begin: /[a-z0-9\\[\\]_-]+/\n          },\n          {\n            begin: /=/, endsWithParent: true,\n            relevance: 0,\n            contains: [\n              {\n                className: 'literal',\n                begin: /\\bon|off|true|false|yes|no\\b/\n              },\n              {\n                className: 'variable',\n                variants: [\n                  {begin: /\\$[\\w\\d\"][\\w\\d_]*/},\n                  {begin: /\\$\\{(.*?)}/}\n                ]\n              },\n              STRING,\n              {\n                className: 'number',\n                begin: /([\\+\\-]+)?[\\d]+_[\\d_]+/\n              },\n              hljs.NUMBER_MODE\n            ]\n          }\n        ]\n      }\n    ]\n  };\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/languages/irpf90.js",
    "content": "/*\nLanguage: IRPF90\nAuthor: Anthony Scemama <scemama@irsamc.ups-tlse.fr>\nDescription: IRPF90 is an open-source Fortran code generator : http://irpf90.ups-tlse.fr\nCategory: scientific\n*/\n\nfunction(hljs) {\n  var PARAMS = {\n    className: 'params',\n    begin: '\\\\(', end: '\\\\)'\n  };\n\n  var F_KEYWORDS = {\n    literal: '.False. .True.',\n    keyword: 'kind do while private call intrinsic where elsewhere ' +\n      'type endtype endmodule endselect endinterface end enddo endif if forall endforall only contains default return stop then ' +\n      'public subroutine|10 function program .and. .or. .not. .le. .eq. .ge. .gt. .lt. ' +\n      'goto save else use module select case ' +\n      'access blank direct exist file fmt form formatted iostat name named nextrec number opened rec recl sequential status unformatted unit ' +\n      'continue format pause cycle exit ' +\n      'c_null_char c_alert c_backspace c_form_feed flush wait decimal round iomsg ' +\n      'synchronous nopass non_overridable pass protected volatile abstract extends import ' +\n      'non_intrinsic value deferred generic final enumerator class associate bind enum ' +\n      'c_int c_short c_long c_long_long c_signed_char c_size_t c_int8_t c_int16_t c_int32_t c_int64_t c_int_least8_t c_int_least16_t ' +\n      'c_int_least32_t c_int_least64_t c_int_fast8_t c_int_fast16_t c_int_fast32_t c_int_fast64_t c_intmax_t C_intptr_t c_float c_double ' +\n      'c_long_double c_float_complex c_double_complex c_long_double_complex c_bool c_char c_null_ptr c_null_funptr ' +\n      'c_new_line c_carriage_return c_horizontal_tab c_vertical_tab iso_c_binding c_loc c_funloc c_associated  c_f_pointer ' +\n      'c_ptr c_funptr iso_fortran_env character_storage_size error_unit file_storage_size input_unit iostat_end iostat_eor ' +\n      'numeric_storage_size output_unit c_f_procpointer ieee_arithmetic ieee_support_underflow_control ' +\n      'ieee_get_underflow_mode ieee_set_underflow_mode newunit contiguous recursive ' +\n      'pad position action delim readwrite eor advance nml interface procedure namelist include sequence elemental pure ' +\n      'integer real character complex logical dimension allocatable|10 parameter ' +\n      'external implicit|10 none double precision assign intent optional pointer ' +\n      'target in out common equivalence data ' +\n      // IRPF90 special keywords\n      'begin_provider &begin_provider end_provider begin_shell end_shell begin_template end_template subst assert touch ' +\n      'soft_touch provide no_dep free irp_if irp_else irp_endif irp_write irp_read',\n    built_in: 'alog alog10 amax0 amax1 amin0 amin1 amod cabs ccos cexp clog csin csqrt dabs dacos dasin datan datan2 dcos dcosh ddim dexp dint ' +\n      'dlog dlog10 dmax1 dmin1 dmod dnint dsign dsin dsinh dsqrt dtan dtanh float iabs idim idint idnint ifix isign max0 max1 min0 min1 sngl ' +\n      'algama cdabs cdcos cdexp cdlog cdsin cdsqrt cqabs cqcos cqexp cqlog cqsin cqsqrt dcmplx dconjg derf derfc dfloat dgamma dimag dlgama ' +\n      'iqint qabs qacos qasin qatan qatan2 qcmplx qconjg qcos qcosh qdim qerf qerfc qexp qgamma qimag qlgama qlog qlog10 qmax1 qmin1 qmod ' +\n      'qnint qsign qsin qsinh qsqrt qtan qtanh abs acos aimag aint anint asin atan atan2 char cmplx conjg cos cosh exp ichar index int log ' +\n      'log10 max min nint sign sin sinh sqrt tan tanh print write dim lge lgt lle llt mod nullify allocate deallocate ' +\n      'adjustl adjustr all allocated any associated bit_size btest ceiling count cshift date_and_time digits dot_product ' +\n      'eoshift epsilon exponent floor fraction huge iand ibclr ibits ibset ieor ior ishft ishftc lbound len_trim matmul ' +\n      'maxexponent maxloc maxval merge minexponent minloc minval modulo mvbits nearest pack present product ' +\n      'radix random_number random_seed range repeat reshape rrspacing scale scan selected_int_kind selected_real_kind ' +\n      'set_exponent shape size spacing spread sum system_clock tiny transpose trim ubound unpack verify achar iachar transfer ' +\n      'dble entry dprod cpu_time command_argument_count get_command get_command_argument get_environment_variable is_iostat_end ' +\n      'ieee_arithmetic ieee_support_underflow_control ieee_get_underflow_mode ieee_set_underflow_mode ' +\n      'is_iostat_eor move_alloc new_line selected_char_kind same_type_as extends_type_of'  +\n      'acosh asinh atanh bessel_j0 bessel_j1 bessel_jn bessel_y0 bessel_y1 bessel_yn erf erfc erfc_scaled gamma log_gamma hypot norm2 ' +\n      'atomic_define atomic_ref execute_command_line leadz trailz storage_size merge_bits ' +\n      'bge bgt ble blt dshiftl dshiftr findloc iall iany iparity image_index lcobound ucobound maskl maskr ' +\n      'num_images parity popcnt poppar shifta shiftl shiftr this_image ' +\n      // IRPF90 special built_ins\n      'IRP_ALIGN irp_here'\n  };\n  return {\n    case_insensitive: true,\n    keywords: F_KEYWORDS,\n    illegal: /\\/\\*/,\n    contains: [\n      hljs.inherit(hljs.APOS_STRING_MODE, {className: 'string', relevance: 0}),\n      hljs.inherit(hljs.QUOTE_STRING_MODE, {className: 'string', relevance: 0}),\n      {\n        className: 'function',\n        beginKeywords: 'subroutine function program',\n        illegal: '[${=\\\\n]',\n        contains: [hljs.UNDERSCORE_TITLE_MODE, PARAMS]\n      },\n      hljs.COMMENT('!', '$', {relevance: 0}),\n      hljs.COMMENT('begin_doc', 'end_doc', {relevance: 10}),\n      {\n        className: 'number',\n        begin: '(?=\\\\b|\\\\+|\\\\-|\\\\.)(?=\\\\.\\\\d|\\\\d)(?:\\\\d+)?(?:\\\\.?\\\\d*)(?:[de][+-]?\\\\d+)?\\\\b\\\\.?',\n        relevance: 0\n      }\n    ]\n  };\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/languages/java.js",
    "content": "/*\nLanguage: Java\nAuthor: Vsevolod Solovyov <vsevolod.solovyov@gmail.com>\nCategory: common, enterprise\n*/\n\nfunction(hljs) {\n  var JAVA_IDENT_RE = '[\\u00C0-\\u02B8a-zA-Z_$][\\u00C0-\\u02B8a-zA-Z_$0-9]*';\n  var GENERIC_IDENT_RE = JAVA_IDENT_RE + '(<' + JAVA_IDENT_RE + '(\\\\s*,\\\\s*' + JAVA_IDENT_RE + ')*>)?';\n  var KEYWORDS =\n    'false synchronized int abstract float private char boolean static null if const ' +\n    'for true while long strictfp finally protected import native final void ' +\n    'enum else break transient catch instanceof byte super volatile case assert short ' +\n    'package default double public try this switch continue throws protected public private ' +\n    'module requires exports do';\n\n  // https://docs.oracle.com/javase/7/docs/technotes/guides/language/underscores-literals.html\n  var JAVA_NUMBER_RE = '\\\\b' +\n    '(' +\n      '0[bB]([01]+[01_]+[01]+|[01]+)' + // 0b...\n      '|' +\n      '0[xX]([a-fA-F0-9]+[a-fA-F0-9_]+[a-fA-F0-9]+|[a-fA-F0-9]+)' + // 0x...\n      '|' +\n      '(' +\n        '([\\\\d]+[\\\\d_]+[\\\\d]+|[\\\\d]+)(\\\\.([\\\\d]+[\\\\d_]+[\\\\d]+|[\\\\d]+))?' +\n        '|' +\n        '\\\\.([\\\\d]+[\\\\d_]+[\\\\d]+|[\\\\d]+)' +\n      ')' +\n      '([eE][-+]?\\\\d+)?' + // octal, decimal, float\n    ')' +\n    '[lLfF]?';\n  var JAVA_NUMBER_MODE = {\n    className: 'number',\n    begin: JAVA_NUMBER_RE,\n    relevance: 0\n  };\n\n  return {\n    aliases: ['jsp'],\n    keywords: KEYWORDS,\n    illegal: /<\\/|#/,\n    contains: [\n      hljs.COMMENT(\n        '/\\\\*\\\\*',\n        '\\\\*/',\n        {\n          relevance : 0,\n          contains : [\n            {\n              // eat up @'s in emails to prevent them to be recognized as doctags\n              begin: /\\w+@/, relevance: 0\n            },\n            {\n              className : 'doctag',\n              begin : '@[A-Za-z]+'\n            }\n          ]\n        }\n      ),\n      hljs.C_LINE_COMMENT_MODE,\n      hljs.C_BLOCK_COMMENT_MODE,\n      hljs.APOS_STRING_MODE,\n      hljs.QUOTE_STRING_MODE,\n      {\n        className: 'class',\n        beginKeywords: 'class interface', end: /[{;=]/, excludeEnd: true,\n        keywords: 'class interface',\n        illegal: /[:\"\\[\\]]/,\n        contains: [\n          {beginKeywords: 'extends implements'},\n          hljs.UNDERSCORE_TITLE_MODE\n        ]\n      },\n      {\n        // Expression keywords prevent 'keyword Name(...)' from being\n        // recognized as a function definition\n        beginKeywords: 'new throw return else',\n        relevance: 0\n      },\n      {\n        className: 'function',\n        begin: '(' + GENERIC_IDENT_RE + '\\\\s+)+' + hljs.UNDERSCORE_IDENT_RE + '\\\\s*\\\\(', returnBegin: true, end: /[{;=]/,\n        excludeEnd: true,\n        keywords: KEYWORDS,\n        contains: [\n          {\n            begin: hljs.UNDERSCORE_IDENT_RE + '\\\\s*\\\\(', returnBegin: true,\n            relevance: 0,\n            contains: [hljs.UNDERSCORE_TITLE_MODE]\n          },\n          {\n            className: 'params',\n            begin: /\\(/, end: /\\)/,\n            keywords: KEYWORDS,\n            relevance: 0,\n            contains: [\n              hljs.APOS_STRING_MODE,\n              hljs.QUOTE_STRING_MODE,\n              hljs.C_NUMBER_MODE,\n              hljs.C_BLOCK_COMMENT_MODE\n            ]\n          },\n          hljs.C_LINE_COMMENT_MODE,\n          hljs.C_BLOCK_COMMENT_MODE\n        ]\n      },\n      JAVA_NUMBER_MODE,\n      {\n        className: 'meta', begin: '@[A-Za-z]+'\n      }\n    ]\n  };\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/languages/javascript.js",
    "content": "/*\nLanguage: JavaScript\nCategory: common, scripting\n*/\n\nfunction(hljs) {\n  var IDENT_RE = '[A-Za-z$_][0-9A-Za-z$_]*';\n  var KEYWORDS = {\n    keyword:\n      'in of if for while finally var new function do return void else break catch ' +\n      'instanceof with throw case default try this switch continue typeof delete ' +\n      'let yield const export super debugger as async await static ' +\n      // ECMAScript 6 modules import\n      'import from as'\n    ,\n    literal:\n      'true false null undefined NaN Infinity',\n    built_in:\n      'eval isFinite isNaN parseFloat parseInt decodeURI decodeURIComponent ' +\n      'encodeURI encodeURIComponent escape unescape Object Function Boolean Error ' +\n      'EvalError InternalError RangeError ReferenceError StopIteration SyntaxError ' +\n      'TypeError URIError Number Math Date String RegExp Array Float32Array ' +\n      'Float64Array Int16Array Int32Array Int8Array Uint16Array Uint32Array ' +\n      'Uint8Array Uint8ClampedArray ArrayBuffer DataView JSON Intl arguments require ' +\n      'module console window document Symbol Set Map WeakSet WeakMap Proxy Reflect ' +\n      'Promise'\n  };\n  var EXPRESSIONS;\n  var NUMBER = {\n    className: 'number',\n    variants: [\n      { begin: '\\\\b(0[bB][01]+)' },\n      { begin: '\\\\b(0[oO][0-7]+)' },\n      { begin: hljs.C_NUMBER_RE }\n    ],\n    relevance: 0\n  };\n  var SUBST = {\n    className: 'subst',\n    begin: '\\\\$\\\\{', end: '\\\\}',\n    keywords: KEYWORDS,\n    contains: []  // defined later\n  };\n  var TEMPLATE_STRING = {\n    className: 'string',\n    begin: '`', end: '`',\n    contains: [\n      hljs.BACKSLASH_ESCAPE,\n      SUBST\n    ]\n  };\n  SUBST.contains = [\n    hljs.APOS_STRING_MODE,\n    hljs.QUOTE_STRING_MODE,\n    TEMPLATE_STRING,\n    NUMBER,\n    hljs.REGEXP_MODE\n  ]\n  var PARAMS_CONTAINS = SUBST.contains.concat([\n    hljs.C_BLOCK_COMMENT_MODE,\n    hljs.C_LINE_COMMENT_MODE\n  ]);\n\n  return {\n    aliases: ['js', 'jsx'],\n    keywords: KEYWORDS,\n    contains: [\n      {\n        className: 'meta',\n        relevance: 10,\n        begin: /^\\s*['\"]use (strict|asm)['\"]/\n      },\n      {\n        className: 'meta',\n        begin: /^#!/, end: /$/\n      },\n      hljs.APOS_STRING_MODE,\n      hljs.QUOTE_STRING_MODE,\n      TEMPLATE_STRING,\n      hljs.C_LINE_COMMENT_MODE,\n      hljs.C_BLOCK_COMMENT_MODE,\n      NUMBER,\n      { // object attr container\n        begin: /[{,]\\s*/, relevance: 0,\n        contains: [\n          {\n            begin: IDENT_RE + '\\\\s*:', returnBegin: true,\n            relevance: 0,\n            contains: [{className: 'attr', begin: IDENT_RE, relevance: 0}]\n          }\n        ]\n      },\n      { // \"value\" container\n        begin: '(' + hljs.RE_STARTERS_RE + '|\\\\b(case|return|throw)\\\\b)\\\\s*',\n        keywords: 'return throw case',\n        contains: [\n          hljs.C_LINE_COMMENT_MODE,\n          hljs.C_BLOCK_COMMENT_MODE,\n          hljs.REGEXP_MODE,\n          {\n            className: 'function',\n            begin: '(\\\\(.*?\\\\)|' + IDENT_RE + ')\\\\s*=>', returnBegin: true,\n            end: '\\\\s*=>',\n            contains: [\n              {\n                className: 'params',\n                variants: [\n                  {\n                    begin: IDENT_RE\n                  },\n                  {\n                    begin: /\\(\\s*\\)/,\n                  },\n                  {\n                    begin: /\\(/, end: /\\)/,\n                    excludeBegin: true, excludeEnd: true,\n                    keywords: KEYWORDS,\n                    contains: PARAMS_CONTAINS\n                  }\n                ]\n              }\n            ]\n          },\n          { // E4X / JSX\n            begin: /</, end: /(\\/\\w+|\\w+\\/)>/,\n            subLanguage: 'xml',\n            contains: [\n              {begin: /<\\w+\\s*\\/>/, skip: true},\n              {\n                begin: /<\\w+/, end: /(\\/\\w+|\\w+\\/)>/, skip: true,\n                contains: [\n                  {begin: /<\\w+\\s*\\/>/, skip: true},\n                  'self'\n                ]\n              }\n            ]\n          }\n        ],\n        relevance: 0\n      },\n      {\n        className: 'function',\n        beginKeywords: 'function', end: /\\{/, excludeEnd: true,\n        contains: [\n          hljs.inherit(hljs.TITLE_MODE, {begin: IDENT_RE}),\n          {\n            className: 'params',\n            begin: /\\(/, end: /\\)/,\n            excludeBegin: true,\n            excludeEnd: true,\n            contains: PARAMS_CONTAINS\n          }\n        ],\n        illegal: /\\[|%/\n      },\n      {\n        begin: /\\$[(.]/ // relevance booster for a pattern common to JS libs: `$(something)` and `$.something`\n      },\n      hljs.METHOD_GUARD,\n      { // ES6 class\n        className: 'class',\n        beginKeywords: 'class', end: /[{;=]/, excludeEnd: true,\n        illegal: /[:\"\\[\\]]/,\n        contains: [\n          {beginKeywords: 'extends'},\n          hljs.UNDERSCORE_TITLE_MODE\n        ]\n      },\n      {\n        beginKeywords: 'constructor', end: /\\{/, excludeEnd: true\n      }\n    ],\n    illegal: /#(?!!)/\n  };\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/languages/json.js",
    "content": "/*\nLanguage: JSON\nAuthor: Ivan Sagalaev <maniac@softwaremaniacs.org>\nCategory: common, protocols\n*/\n\nfunction(hljs) {\n  var LITERALS = {literal: 'true false null'};\n  var TYPES = [\n    hljs.QUOTE_STRING_MODE,\n    hljs.C_NUMBER_MODE\n  ];\n  var VALUE_CONTAINER = {\n    end: ',', endsWithParent: true, excludeEnd: true,\n    contains: TYPES,\n    keywords: LITERALS\n  };\n  var OBJECT = {\n    begin: '{', end: '}',\n    contains: [\n      {\n        className: 'attr',\n        begin: /\"/, end: /\"/,\n        contains: [hljs.BACKSLASH_ESCAPE],\n        illegal: '\\\\n',\n      },\n      hljs.inherit(VALUE_CONTAINER, {begin: /:/})\n    ],\n    illegal: '\\\\S'\n  };\n  var ARRAY = {\n    begin: '\\\\[', end: '\\\\]',\n    contains: [hljs.inherit(VALUE_CONTAINER)], // inherit is a workaround for a bug that makes shared modes with endsWithParent compile only the ending of one of the parents\n    illegal: '\\\\S'\n  };\n  TYPES.splice(TYPES.length, 0, OBJECT, ARRAY);\n  return {\n    contains: TYPES,\n    keywords: LITERALS,\n    illegal: '\\\\S'\n  };\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/languages/julia.js",
    "content": "/*\nLanguage: Julia\nAuthor: Kenta Sato <bicycle1885@gmail.com>\n*/\n\nfunction(hljs) {\n  // Since there are numerous special names in Julia, it is too much trouble\n  // to maintain them by hand. Hence these names (i.e. keywords, literals and\n  // built-ins) are automatically generated from Julia (v0.3.0 and v0.4.1)\n  // itself through following scripts for each.\n\n  var KEYWORDS = {\n    // # keyword generator\n    // println(\"in\")\n    // for kw in Base.REPLCompletions.complete_keyword(\"\")\n    //     println(kw)\n    // end\n    keyword:\n      'in abstract baremodule begin bitstype break catch ccall const continue do else elseif end export ' +\n      'finally for function global if immutable import importall let local macro module quote return try type ' +\n      'typealias using while',\n\n    // # literal generator\n    // println(\"true\")\n    // println(\"false\")\n    // for name in Base.REPLCompletions.completions(\"\", 0)[1]\n    //     try\n    //         s = symbol(name)\n    //         v = eval(s)\n    //         if !isa(v, Function) &&\n    //            !isa(v, DataType) &&\n    //            !isa(v, IntrinsicFunction) &&\n    //            !issubtype(typeof(v), Tuple) &&\n    //            !isa(v, Union) &&\n    //            !isa(v, Module) &&\n    //            !isa(v, TypeConstructor) &&\n    //            !isa(v, TypeVar) &&\n    //            !isa(v, Colon)\n    //             println(name)\n    //         end\n    //     end\n    // end\n    literal:\n      // v0.3\n      'true false ARGS CPU_CORES C_NULL DL_LOAD_PATH DevNull ENDIAN_BOM ENV I|0 Inf Inf16 Inf32 ' +\n      'InsertionSort JULIA_HOME LOAD_PATH MS_ASYNC MS_INVALIDATE MS_SYNC MergeSort NaN NaN16 NaN32 OS_NAME QuickSort ' +\n      'RTLD_DEEPBIND RTLD_FIRST RTLD_GLOBAL RTLD_LAZY RTLD_LOCAL RTLD_NODELETE RTLD_NOLOAD RTLD_NOW RoundDown ' +\n      'RoundFromZero RoundNearest RoundToZero RoundUp STDERR STDIN STDOUT VERSION WORD_SIZE catalan cglobal e|0 eu|0 ' +\n      'eulergamma golden im nothing pi γ π φ ' +\n      // v0.4 (diff)\n      'Inf64 NaN64 RoundNearestTiesAway RoundNearestTiesUp ',\n\n    // # built_in generator:\n    // for name in Base.REPLCompletions.completions(\"\", 0)[1]\n    //     try\n    //         v = eval(symbol(name))\n    //         if isa(v, DataType) || isa(v, TypeConstructor) || isa(v, TypeVar)\n    //             println(name)\n    //         end\n    //     end\n    // end\n    built_in:\n      // v0.3\n      'ANY ASCIIString AbstractArray AbstractRNG AbstractSparseArray Any ArgumentError Array Associative Base64Pipe ' +\n      'Bidiagonal BigFloat BigInt BitArray BitMatrix BitVector Bool BoundsError Box CFILE Cchar Cdouble Cfloat Char ' +\n      'CharString Cint Clong Clonglong ClusterManager Cmd Coff_t Colon Complex Complex128 Complex32 Complex64 ' +\n      'Condition Cptrdiff_t Cshort Csize_t Cssize_t Cuchar Cuint Culong Culonglong Cushort Cwchar_t DArray DataType ' +\n      'DenseArray Diagonal Dict DimensionMismatch DirectIndexString Display DivideError DomainError EOFError ' +\n      'EachLine Enumerate ErrorException Exception Expr Factorization FileMonitor FileOffset Filter Float16 Float32 ' +\n      'Float64 FloatRange FloatingPoint Function GetfieldNode GotoNode Hermitian IO IOBuffer IOStream IPv4 IPv6 ' +\n      'InexactError Int Int128 Int16 Int32 Int64 Int8 IntSet Integer InterruptException IntrinsicFunction KeyError ' +\n      'LabelNode LambdaStaticData LineNumberNode LoadError LocalProcess MIME MathConst MemoryError MersenneTwister ' +\n      'Method MethodError MethodTable Module NTuple NewvarNode Nothing Number ObjectIdDict OrdinalRange ' +\n      'OverflowError ParseError PollingFileWatcher ProcessExitedException ProcessGroup Ptr QuoteNode Range Range1 ' +\n      'Ranges Rational RawFD Real Regex RegexMatch RemoteRef RepString RevString RopeString RoundingMode Set ' +\n      'SharedArray Signed SparseMatrixCSC StackOverflowError Stat StatStruct StepRange String SubArray SubString ' +\n      'SymTridiagonal Symbol SymbolNode Symmetric SystemError Task TextDisplay Timer TmStruct TopNode Triangular ' +\n      'Tridiagonal Type TypeConstructor TypeError TypeName TypeVar UTF16String UTF32String UTF8String UdpSocket ' +\n      'Uint Uint128 Uint16 Uint32 Uint64 Uint8 UndefRefError UndefVarError UniformScaling UnionType UnitRange ' +\n      'Unsigned Vararg VersionNumber WString WeakKeyDict WeakRef Woodbury Zip ' +\n      // v0.4 (diff)\n      'AbstractChannel AbstractFloat AbstractString AssertionError Base64DecodePipe Base64EncodePipe BufferStream ' +\n      'CapturedException CartesianIndex CartesianRange Channel Cintmax_t CompositeException Cstring Cuintmax_t ' +\n      'Cwstring Date DateTime Dims Enum GenSym GlobalRef HTML InitError InvalidStateException Irrational LinSpace ' +\n      'LowerTriangular NullException Nullable OutOfMemoryError Pair PartialQuickSort Pipe RandomDevice ' +\n      'ReadOnlyMemoryError ReentrantLock Ref RemoteException SegmentationFault SerializationState SimpleVector ' +\n      'TCPSocket Text Tuple UDPSocket UInt UInt128 UInt16 UInt32 UInt64 UInt8 UnicodeError Union UpperTriangular ' +\n      'Val Void WorkerConfig AbstractMatrix AbstractSparseMatrix AbstractSparseVector AbstractVecOrMat AbstractVector ' +\n      'DenseMatrix DenseVecOrMat DenseVector Matrix SharedMatrix SharedVector StridedArray StridedMatrix ' +\n      'StridedVecOrMat StridedVector VecOrMat Vector '\n  };\n\n  // ref: http://julia.readthedocs.org/en/latest/manual/variables/#allowed-variable-names\n  var VARIABLE_NAME_RE = '[A-Za-z_\\\\u00A1-\\\\uFFFF][A-Za-z_0-9\\\\u00A1-\\\\uFFFF]*';\n\n  // placeholder for recursive self-reference\n  var DEFAULT = { lexemes: VARIABLE_NAME_RE, keywords: KEYWORDS, illegal: /<\\// };\n\n  var TYPE_ANNOTATION = {\n    className: 'type',\n    begin: /::/\n  };\n\n  var SUBTYPE = {\n    className: 'type',\n    begin: /<:/\n  };\n\n  // ref: http://julia.readthedocs.org/en/latest/manual/integers-and-floating-point-numbers/\n  var NUMBER = {\n    className: 'number',\n    // supported numeric literals:\n    //  * binary literal (e.g. 0x10)\n    //  * octal literal (e.g. 0o76543210)\n    //  * hexadecimal literal (e.g. 0xfedcba876543210)\n    //  * hexadecimal floating point literal (e.g. 0x1p0, 0x1.2p2)\n    //  * decimal literal (e.g. 9876543210, 100_000_000)\n    //  * floating pointe literal (e.g. 1.2, 1.2f, .2, 1., 1.2e10, 1.2e-10)\n    begin: /(\\b0x[\\d_]*(\\.[\\d_]*)?|0x\\.\\d[\\d_]*)p[-+]?\\d+|\\b0[box][a-fA-F0-9][a-fA-F0-9_]*|(\\b\\d[\\d_]*(\\.[\\d_]*)?|\\.\\d[\\d_]*)([eEfF][-+]?\\d+)?/,\n    relevance: 0\n  };\n\n  var CHAR = {\n    className: 'string',\n    begin: /'(.|\\\\[xXuU][a-zA-Z0-9]+)'/\n  };\n\n  var INTERPOLATION = {\n    className: 'subst',\n    begin: /\\$\\(/, end: /\\)/,\n    keywords: KEYWORDS\n  };\n\n  var INTERPOLATED_VARIABLE = {\n    className: 'variable',\n    begin: '\\\\$' + VARIABLE_NAME_RE\n  };\n\n  // TODO: neatly escape normal code in string literal\n  var STRING = {\n    className: 'string',\n    contains: [hljs.BACKSLASH_ESCAPE, INTERPOLATION, INTERPOLATED_VARIABLE],\n    variants: [\n      { begin: /\\w*\"\"\"/, end: /\"\"\"\\w*/, relevance: 10 },\n      { begin: /\\w*\"/, end: /\"\\w*/ }\n    ]\n  };\n\n  var COMMAND = {\n    className: 'string',\n    contains: [hljs.BACKSLASH_ESCAPE, INTERPOLATION, INTERPOLATED_VARIABLE],\n    begin: '`', end: '`'\n  };\n\n  var MACROCALL = {\n    className: 'meta',\n    begin: '@' + VARIABLE_NAME_RE\n  };\n\n  var COMMENT = {\n    className: 'comment',\n    variants: [\n      { begin: '#=', end: '=#', relevance: 10 },\n      { begin: '#', end: '$' }\n    ]\n  };\n\n  DEFAULT.contains = [\n    NUMBER,\n    CHAR,\n    TYPE_ANNOTATION,\n    SUBTYPE,\n    STRING,\n    COMMAND,\n    MACROCALL,\n    COMMENT,\n    hljs.HASH_COMMENT_MODE\n  ];\n  INTERPOLATION.contains = DEFAULT.contains;\n\n  return DEFAULT;\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/languages/kotlin.js",
    "content": "/*\n Language: Kotlin\n Author: Sergey Mashkov <cy6erGn0m@gmail.com>\n */\n\n\nfunction (hljs) {\n  var KEYWORDS = {\n    keyword:\n      'abstract as val var vararg get set class object open private protected public noinline ' +\n      'crossinline dynamic final enum if else do while for when throw try catch finally ' +\n      'import package is in fun override companion reified inline ' +\n      'interface annotation data sealed internal infix operator out by constructor super ' +\n      // to be deleted soon\n      'trait volatile transient native default',\n    built_in:\n      'Byte Short Char Int Long Boolean Float Double Void Unit Nothing',\n    literal:\n      'true false null'\n  };\n  var KEYWORDS_WITH_LABEL = {\n    className: 'keyword',\n    begin: /\\b(break|continue|return|this)\\b/,\n    starts: {\n      contains: [\n        {\n          className: 'symbol',\n          begin: /@\\w+/\n        }\n      ]\n    }\n  };\n  var LABEL = {\n    className: 'symbol', begin: hljs.UNDERSCORE_IDENT_RE + '@'\n  };\n\n  // for string templates\n  var SUBST = {\n    className: 'subst',\n    variants: [\n      {begin: '\\\\$' + hljs.UNDERSCORE_IDENT_RE},\n      {begin: '\\\\${', end: '}', contains: [hljs.APOS_STRING_MODE, hljs.C_NUMBER_MODE]}\n    ]\n  };\n  var STRING = {\n    className: 'string',\n    variants: [\n      {\n        begin: '\"\"\"', end: '\"\"\"',\n        contains: [SUBST]\n      },\n      // Can't use built-in modes easily, as we want to use STRING in the meta\n      // context as 'meta-string' and there's no syntax to remove explicitly set\n      // classNames in built-in modes.\n      {\n        begin: '\\'', end: '\\'',\n        illegal: /\\n/,\n        contains: [hljs.BACKSLASH_ESCAPE]\n      },\n      {\n        begin: '\"', end: '\"',\n        illegal: /\\n/,\n        contains: [hljs.BACKSLASH_ESCAPE, SUBST]\n      }\n    ]\n  };\n\n  var ANNOTATION_USE_SITE = {\n    className: 'meta', begin: '@(?:file|property|field|get|set|receiver|param|setparam|delegate)\\\\s*:(?:\\\\s*' + hljs.UNDERSCORE_IDENT_RE + ')?'\n  };\n  var ANNOTATION = {\n    className: 'meta', begin: '@' + hljs.UNDERSCORE_IDENT_RE,\n    contains: [\n      {\n        begin: /\\(/, end: /\\)/,\n        contains: [\n          hljs.inherit(STRING, {className: 'meta-string'})\n        ]\n      }\n    ]\n  };\n\n  return {\n    keywords: KEYWORDS,\n    contains : [\n      hljs.COMMENT(\n        '/\\\\*\\\\*',\n        '\\\\*/',\n        {\n          relevance : 0,\n          contains : [{\n            className : 'doctag',\n            begin : '@[A-Za-z]+'\n          }]\n        }\n      ),\n      hljs.C_LINE_COMMENT_MODE,\n      hljs.C_BLOCK_COMMENT_MODE,\n      KEYWORDS_WITH_LABEL,\n      LABEL,\n      ANNOTATION_USE_SITE,\n      ANNOTATION,\n      {\n        className: 'function',\n        beginKeywords: 'fun', end: '[(]|$',\n        returnBegin: true,\n        excludeEnd: true,\n        keywords: KEYWORDS,\n        illegal: /fun\\s+(<.*>)?[^\\s\\(]+(\\s+[^\\s\\(]+)\\s*=/,\n        relevance: 5,\n        contains: [\n          {\n            begin: hljs.UNDERSCORE_IDENT_RE + '\\\\s*\\\\(', returnBegin: true,\n            relevance: 0,\n            contains: [hljs.UNDERSCORE_TITLE_MODE]\n          },\n          {\n            className: 'type',\n            begin: /</, end: />/, keywords: 'reified',\n            relevance: 0\n          },\n          {\n            className: 'params',\n            begin: /\\(/, end: /\\)/,\n            endsParent: true,\n            keywords: KEYWORDS,\n            relevance: 0,\n            contains: [\n              {\n                begin: /:/, end: /[=,\\/]/, endsWithParent: true,\n                contains: [\n                  {className: 'type', begin: hljs.UNDERSCORE_IDENT_RE},\n                  hljs.C_LINE_COMMENT_MODE,\n                  hljs.C_BLOCK_COMMENT_MODE\n                ],\n                relevance: 0\n              },\n              hljs.C_LINE_COMMENT_MODE,\n              hljs.C_BLOCK_COMMENT_MODE,\n              ANNOTATION_USE_SITE,\n              ANNOTATION,\n              STRING,\n              hljs.C_NUMBER_MODE\n            ]\n          },\n          hljs.C_BLOCK_COMMENT_MODE\n        ]\n      },\n      {\n        className: 'class',\n        beginKeywords: 'class interface trait', end: /[:\\{(]|$/, // remove 'trait' when removed from KEYWORDS\n        excludeEnd: true,\n        illegal: 'extends implements',\n        contains: [\n          {beginKeywords: 'public protected internal private constructor'},\n          hljs.UNDERSCORE_TITLE_MODE,\n          {\n            className: 'type',\n            begin: /</, end: />/, excludeBegin: true, excludeEnd: true,\n            relevance: 0\n          },\n          {\n            className: 'type',\n            begin: /[,:]\\s*/, end: /[<\\(,]|$/, excludeBegin: true, returnEnd: true\n          },\n          ANNOTATION_USE_SITE,\n          ANNOTATION\n        ]\n      },\n      STRING,\n      {\n        className: 'meta',\n        begin: \"^#!/usr/bin/env\", end: '$',\n        illegal: '\\n'\n      },\n      hljs.C_NUMBER_MODE\n    ]\n  };\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/languages/lasso.js",
    "content": "/*\nLanguage: Lasso\nAuthor: Eric Knibbe <eric@lassosoft.com>\nDescription: Lasso is a language and server platform for database-driven web applications. This definition handles Lasso 9 syntax and LassoScript for Lasso 8.6 and earlier.\n*/\n\nfunction(hljs) {\n  var LASSO_IDENT_RE = '[a-zA-Z_][\\\\w.]*';\n  var LASSO_ANGLE_RE = '<\\\\?(lasso(script)?|=)';\n  var LASSO_CLOSE_RE = '\\\\]|\\\\?>';\n  var LASSO_KEYWORDS = {\n    literal:\n      'true false none minimal full all void and or not ' +\n      'bw nbw ew new cn ncn lt lte gt gte eq neq rx nrx ft',\n    built_in:\n      'array date decimal duration integer map pair string tag xml null ' +\n      'boolean bytes keyword list locale queue set stack staticarray ' +\n      'local var variable global data self inherited currentcapture givenblock',\n    keyword:\n      'cache database_names database_schemanames database_tablenames ' +\n      'define_tag define_type email_batch encode_set html_comment handle ' +\n      'handle_error header if inline iterate ljax_target link ' +\n      'link_currentaction link_currentgroup link_currentrecord link_detail ' +\n      'link_firstgroup link_firstrecord link_lastgroup link_lastrecord ' +\n      'link_nextgroup link_nextrecord link_prevgroup link_prevrecord log ' +\n      'loop namespace_using output_none portal private protect records ' +\n      'referer referrer repeating resultset rows search_args ' +\n      'search_arguments select sort_args sort_arguments thread_atomic ' +\n      'value_list while abort case else fail_if fail_ifnot fail if_empty ' +\n      'if_false if_null if_true loop_abort loop_continue loop_count params ' +\n      'params_up return return_value run_children soap_definetag ' +\n      'soap_lastrequest soap_lastresponse tag_name ascending average by ' +\n      'define descending do equals frozen group handle_failure import in ' +\n      'into join let match max min on order parent protected provide public ' +\n      'require returnhome skip split_thread sum take thread to trait type ' +\n      'where with yield yieldhome'\n  };\n  var HTML_COMMENT = hljs.COMMENT(\n    '<!--',\n    '-->',\n    {\n      relevance: 0\n    }\n  );\n  var LASSO_NOPROCESS = {\n    className: 'meta',\n    begin: '\\\\[noprocess\\\\]',\n    starts: {\n      end: '\\\\[/noprocess\\\\]',\n      returnEnd: true,\n      contains: [HTML_COMMENT]\n    }\n  };\n  var LASSO_START = {\n    className: 'meta',\n    begin: '\\\\[/noprocess|' + LASSO_ANGLE_RE\n  };\n  var LASSO_DATAMEMBER = {\n    className: 'symbol',\n    begin: '\\'' + LASSO_IDENT_RE + '\\''\n  };\n  var LASSO_CODE = [\n    hljs.C_LINE_COMMENT_MODE,\n    hljs.C_BLOCK_COMMENT_MODE,\n    hljs.inherit(hljs.C_NUMBER_MODE, {begin: hljs.C_NUMBER_RE + '|(-?infinity|NaN)\\\\b'}),\n    hljs.inherit(hljs.APOS_STRING_MODE, {illegal: null}),\n    hljs.inherit(hljs.QUOTE_STRING_MODE, {illegal: null}),\n    {\n      className: 'string',\n      begin: '`', end: '`'\n    },\n    { // variables\n      variants: [\n        {\n          begin: '[#$]' + LASSO_IDENT_RE\n        },\n        {\n          begin: '#', end: '\\\\d+',\n          illegal: '\\\\W'\n        }\n      ]\n    },\n    {\n      className: 'type',\n      begin: '::\\\\s*', end: LASSO_IDENT_RE,\n      illegal: '\\\\W'\n    },\n    {\n      className: 'params',\n      variants: [\n        {\n          begin: '-(?!infinity)' + LASSO_IDENT_RE,\n          relevance: 0\n        },\n        {\n          begin: '(\\\\.\\\\.\\\\.)'\n        }\n      ]\n    },\n    {\n      begin: /(->|\\.)\\s*/,\n      relevance: 0,\n      contains: [LASSO_DATAMEMBER]\n    },\n    {\n      className: 'class',\n      beginKeywords: 'define',\n      returnEnd: true, end: '\\\\(|=>',\n      contains: [\n        hljs.inherit(hljs.TITLE_MODE, {begin: LASSO_IDENT_RE + '(=(?!>))?|[-+*/%](?!>)'})\n      ]\n    }\n  ];\n  return {\n    aliases: ['ls', 'lassoscript'],\n    case_insensitive: true,\n    lexemes: LASSO_IDENT_RE + '|&[lg]t;',\n    keywords: LASSO_KEYWORDS,\n    contains: [\n      {\n        className: 'meta',\n        begin: LASSO_CLOSE_RE,\n        relevance: 0,\n        starts: { // markup\n          end: '\\\\[|' + LASSO_ANGLE_RE,\n          returnEnd: true,\n          relevance: 0,\n          contains: [HTML_COMMENT]\n        }\n      },\n      LASSO_NOPROCESS,\n      LASSO_START,\n      {\n        className: 'meta',\n        begin: '\\\\[no_square_brackets',\n        starts: {\n          end: '\\\\[/no_square_brackets\\\\]', // not implemented in the language\n          lexemes: LASSO_IDENT_RE + '|&[lg]t;',\n          keywords: LASSO_KEYWORDS,\n          contains: [\n            {\n              className: 'meta',\n              begin: LASSO_CLOSE_RE,\n              relevance: 0,\n              starts: {\n                end: '\\\\[noprocess\\\\]|' + LASSO_ANGLE_RE,\n                returnEnd: true,\n                contains: [HTML_COMMENT]\n              }\n            },\n            LASSO_NOPROCESS,\n            LASSO_START\n          ].concat(LASSO_CODE)\n        }\n      },\n      {\n        className: 'meta',\n        begin: '\\\\[',\n        relevance: 0\n      },\n      {\n        className: 'meta',\n        begin: '^#!', end:'lasso9$',\n        relevance: 10\n      }\n    ].concat(LASSO_CODE)\n  };\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/languages/ldif.js",
    "content": "/*\nLanguage: LDIF\nContributors: Jacob Childress <jacobc@gmail.com>\nCategory: enterprise, config\n*/\nfunction(hljs) {\n  return {\n    contains: [\n      {\n        className: 'attribute',\n        begin: '^dn', end: ': ', excludeEnd: true,\n        starts: {end: '$', relevance: 0},\n        relevance: 10\n      },\n      {\n        className: 'attribute',\n        begin: '^\\\\w', end: ': ', excludeEnd: true,\n        starts: {end: '$', relevance: 0}\n      },\n      {\n        className: 'literal',\n        begin: '^-', end: '$'\n      },\n      hljs.HASH_COMMENT_MODE\n    ]\n  };\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/languages/less.js",
    "content": "/*\nLanguage: Less\nAuthor:   Max Mikhailov <seven.phases.max@gmail.com>\nCategory: css\n*/\n\nfunction(hljs) {\n  var IDENT_RE        = '[\\\\w-]+'; // yes, Less identifiers may begin with a digit\n  var INTERP_IDENT_RE = '(' + IDENT_RE + '|@{' + IDENT_RE + '})';\n\n  /* Generic Modes */\n\n  var RULES = [], VALUE = []; // forward def. for recursive modes\n\n  var STRING_MODE = function(c) { return {\n    // Less strings are not multiline (also include '~' for more consistent coloring of \"escaped\" strings)\n    className: 'string', begin: '~?' + c + '.*?' + c\n  };};\n\n  var IDENT_MODE = function(name, begin, relevance) { return {\n    className: name, begin: begin, relevance: relevance\n  };};\n\n  var PARENS_MODE = {\n    // used only to properly balance nested parens inside mixin call, def. arg list\n    begin: '\\\\(', end: '\\\\)', contains: VALUE, relevance: 0\n  };\n\n  // generic Less highlighter (used almost everywhere except selectors):\n  VALUE.push(\n    hljs.C_LINE_COMMENT_MODE,\n    hljs.C_BLOCK_COMMENT_MODE,\n    STRING_MODE(\"'\"),\n    STRING_MODE('\"'),\n    hljs.CSS_NUMBER_MODE, // fixme: it does not include dot for numbers like .5em :(\n    {\n      begin: '(url|data-uri)\\\\(',\n      starts: {className: 'string', end: '[\\\\)\\\\n]', excludeEnd: true}\n    },\n    IDENT_MODE('number', '#[0-9A-Fa-f]+\\\\b'),\n    PARENS_MODE,\n    IDENT_MODE('variable', '@@?' + IDENT_RE, 10),\n    IDENT_MODE('variable', '@{'  + IDENT_RE + '}'),\n    IDENT_MODE('built_in', '~?`[^`]*?`'), // inline javascript (or whatever host language) *multiline* string\n    { // @media features (it’s here to not duplicate things in AT_RULE_MODE with extra PARENS_MODE overriding):\n      className: 'attribute', begin: IDENT_RE + '\\\\s*:', end: ':', returnBegin: true, excludeEnd: true\n    },\n    {\n      className: 'meta',\n      begin: '!important'\n    }\n  );\n\n  var VALUE_WITH_RULESETS = VALUE.concat({\n    begin: '{', end: '}', contains: RULES\n  });\n\n  var MIXIN_GUARD_MODE = {\n    beginKeywords: 'when', endsWithParent: true,\n    contains: [{beginKeywords: 'and not'}].concat(VALUE) // using this form to override VALUE’s 'function' match\n  };\n\n  /* Rule-Level Modes */\n\n  var RULE_MODE = {\n    begin: INTERP_IDENT_RE + '\\\\s*:', returnBegin: true, end: '[;}]',\n    relevance: 0,\n    contains: [\n      {\n        className: 'attribute',\n        begin: INTERP_IDENT_RE, end: ':', excludeEnd: true,\n        starts: {\n          endsWithParent: true, illegal: '[<=$]',\n          relevance: 0,\n          contains: VALUE\n        }\n      }\n    ]\n  };\n\n  var AT_RULE_MODE = {\n    className: 'keyword',\n    begin: '@(import|media|charset|font-face|(-[a-z]+-)?keyframes|supports|document|namespace|page|viewport|host)\\\\b',\n    starts: {end: '[;{}]', returnEnd: true, contains: VALUE, relevance: 0}\n  };\n\n  // variable definitions and calls\n  var VAR_RULE_MODE = {\n    className: 'variable',\n    variants: [\n      // using more strict pattern for higher relevance to increase chances of Less detection.\n      // this is *the only* Less specific statement used in most of the sources, so...\n      // (we’ll still often loose to the css-parser unless there's '//' comment,\n      // simply because 1 variable just can't beat 99 properties :)\n      {begin: '@' + IDENT_RE + '\\\\s*:', relevance: 15},\n      {begin: '@' + IDENT_RE}\n    ],\n    starts: {end: '[;}]', returnEnd: true, contains: VALUE_WITH_RULESETS}\n  };\n\n  var SELECTOR_MODE = {\n    // first parse unambiguous selectors (i.e. those not starting with tag)\n    // then fall into the scary lookahead-discriminator variant.\n    // this mode also handles mixin definitions and calls\n    variants: [{\n      begin: '[\\\\.#:&\\\\[>]', end: '[;{}]'  // mixin calls end with ';'\n      }, {\n      begin: INTERP_IDENT_RE, end: '{'\n    }],\n    returnBegin: true,\n    returnEnd:   true,\n    illegal: '[<=\\'$\"]',\n    relevance: 0,\n    contains: [\n      hljs.C_LINE_COMMENT_MODE,\n      hljs.C_BLOCK_COMMENT_MODE,\n      MIXIN_GUARD_MODE,\n      IDENT_MODE('keyword',  'all\\\\b'),\n      IDENT_MODE('variable', '@{'  + IDENT_RE + '}'),     // otherwise it’s identified as tag\n      IDENT_MODE('selector-tag',  INTERP_IDENT_RE + '%?', 0), // '%' for more consistent coloring of @keyframes \"tags\"\n      IDENT_MODE('selector-id', '#' + INTERP_IDENT_RE),\n      IDENT_MODE('selector-class', '\\\\.' + INTERP_IDENT_RE, 0),\n      IDENT_MODE('selector-tag',  '&', 0),\n      {className: 'selector-attr', begin: '\\\\[', end: '\\\\]'},\n      {className: 'selector-pseudo', begin: /:(:)?[a-zA-Z0-9\\_\\-\\+\\(\\)\"'.]+/},\n      {begin: '\\\\(', end: '\\\\)', contains: VALUE_WITH_RULESETS}, // argument list of parametric mixins\n      {begin: '!important'} // eat !important after mixin call or it will be colored as tag\n    ]\n  };\n\n  RULES.push(\n    hljs.C_LINE_COMMENT_MODE,\n    hljs.C_BLOCK_COMMENT_MODE,\n    AT_RULE_MODE,\n    VAR_RULE_MODE,\n    RULE_MODE,\n    SELECTOR_MODE\n  );\n\n  return {\n    case_insensitive: true,\n    illegal: '[=>\\'/<($\"]',\n    contains: RULES\n  };\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/languages/lisp.js",
    "content": "/*\nLanguage: Lisp\nDescription: Generic lisp syntax\nAuthor: Vasily Polovnyov <vast@whiteants.net>\nCategory: lisp\n*/\n\nfunction(hljs) {\n  var LISP_IDENT_RE = '[a-zA-Z_\\\\-\\\\+\\\\*\\\\/\\\\<\\\\=\\\\>\\\\&\\\\#][a-zA-Z0-9_\\\\-\\\\+\\\\*\\\\/\\\\<\\\\=\\\\>\\\\&\\\\#!]*';\n  var MEC_RE = '\\\\|[^]*?\\\\|';\n  var LISP_SIMPLE_NUMBER_RE = '(\\\\-|\\\\+)?\\\\d+(\\\\.\\\\d+|\\\\/\\\\d+)?((d|e|f|l|s|D|E|F|L|S)(\\\\+|\\\\-)?\\\\d+)?';\n  var SHEBANG = {\n    className: 'meta',\n    begin: '^#!', end: '$'\n  };\n  var LITERAL = {\n    className: 'literal',\n    begin: '\\\\b(t{1}|nil)\\\\b'\n  };\n  var NUMBER = {\n    className: 'number',\n    variants: [\n      {begin: LISP_SIMPLE_NUMBER_RE, relevance: 0},\n      {begin: '#(b|B)[0-1]+(/[0-1]+)?'},\n      {begin: '#(o|O)[0-7]+(/[0-7]+)?'},\n      {begin: '#(x|X)[0-9a-fA-F]+(/[0-9a-fA-F]+)?'},\n      {begin: '#(c|C)\\\\(' + LISP_SIMPLE_NUMBER_RE + ' +' + LISP_SIMPLE_NUMBER_RE, end: '\\\\)'}\n    ]\n  };\n  var STRING = hljs.inherit(hljs.QUOTE_STRING_MODE, {illegal: null});\n  var COMMENT = hljs.COMMENT(\n    ';', '$',\n    {\n      relevance: 0\n    }\n  );\n  var VARIABLE = {\n    begin: '\\\\*', end: '\\\\*'\n  };\n  var KEYWORD = {\n    className: 'symbol',\n    begin: '[:&]' + LISP_IDENT_RE\n  };\n  var IDENT = {\n    begin: LISP_IDENT_RE,\n    relevance: 0\n  };\n  var MEC = {\n    begin: MEC_RE\n  };\n  var QUOTED_LIST = {\n    begin: '\\\\(', end: '\\\\)',\n    contains: ['self', LITERAL, STRING, NUMBER, IDENT]\n  };\n  var QUOTED = {\n    contains: [NUMBER, STRING, VARIABLE, KEYWORD, QUOTED_LIST, IDENT],\n    variants: [\n      {\n        begin: '[\\'`]\\\\(', end: '\\\\)'\n      },\n      {\n        begin: '\\\\(quote ', end: '\\\\)',\n        keywords: {name: 'quote'}\n      },\n      {\n        begin: '\\'' + MEC_RE\n      }\n    ]\n  };\n  var QUOTED_ATOM = {\n    variants: [\n      {begin: '\\'' + LISP_IDENT_RE},\n      {begin: '#\\'' + LISP_IDENT_RE + '(::' + LISP_IDENT_RE + ')*'}\n    ]\n  };\n  var LIST = {\n    begin: '\\\\(\\\\s*', end: '\\\\)'\n  };\n  var BODY = {\n    endsWithParent: true,\n    relevance: 0\n  };\n  LIST.contains = [\n    {\n      className: 'name',\n      variants: [\n        {begin: LISP_IDENT_RE},\n        {begin: MEC_RE}\n      ]\n    },\n    BODY\n  ];\n  BODY.contains = [QUOTED, QUOTED_ATOM, LIST, LITERAL, NUMBER, STRING, COMMENT, VARIABLE, KEYWORD, MEC, IDENT];\n\n  return {\n    illegal: /\\S/,\n    contains: [\n      NUMBER,\n      SHEBANG,\n      LITERAL,\n      STRING,\n      COMMENT,\n      QUOTED,\n      QUOTED_ATOM,\n      LIST,\n      IDENT\n    ]\n  };\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/languages/livecodeserver.js",
    "content": "/*\nLanguage: LiveCode\nAuthor: Ralf Bitter <rabit@revigniter.com>\nDescription: Language definition for LiveCode server accounting for revIgniter (a web application framework) characteristics.\nVersion: 1.0a\nDate: 2013-06-03\nCategory: enterprise\n*/\n\nfunction(hljs) {\n  var VARIABLE = {\n    begin: '\\\\b[gtps][A-Z]+[A-Za-z0-9_\\\\-]*\\\\b|\\\\$_[A-Z]+',\n    relevance: 0\n  };\n  var COMMENT_MODES = [\n    hljs.C_BLOCK_COMMENT_MODE,\n    hljs.HASH_COMMENT_MODE,\n    hljs.COMMENT('--', '$'),\n    hljs.COMMENT('[^:]//', '$')\n  ];\n  var TITLE1 = hljs.inherit(hljs.TITLE_MODE, {\n    variants: [\n      {begin: '\\\\b_*rig[A-Z]+[A-Za-z0-9_\\\\-]*'},\n      {begin: '\\\\b_[a-z0-9\\\\-]+'}\n    ]\n  });\n  var TITLE2 = hljs.inherit(hljs.TITLE_MODE, {begin: '\\\\b([A-Za-z0-9_\\\\-]+)\\\\b'});\n  return {\n    case_insensitive: false,\n    keywords: {\n      keyword:\n        '$_COOKIE $_FILES $_GET $_GET_BINARY $_GET_RAW $_POST $_POST_BINARY $_POST_RAW $_SESSION $_SERVER ' +\n        'codepoint codepoints segment segments codeunit codeunits sentence sentences trueWord trueWords paragraph ' +\n        'after byte bytes english the until http forever descending using line real8 with seventh ' +\n        'for stdout finally element word words fourth before black ninth sixth characters chars stderr ' +\n        'uInt1 uInt1s uInt2 uInt2s stdin string lines relative rel any fifth items from middle mid ' +\n        'at else of catch then third it file milliseconds seconds second secs sec int1 int1s int4 ' +\n        'int4s internet int2 int2s normal text item last long detailed effective uInt4 uInt4s repeat ' +\n        'end repeat URL in try into switch to words https token binfile each tenth as ticks tick ' +\n        'system real4 by dateItems without char character ascending eighth whole dateTime numeric short ' +\n        'first ftp integer abbreviated abbr abbrev private case while if ' +\n        'div mod wrap and or bitAnd bitNot bitOr bitXor among not in a an within ' +\n        'contains ends with begins the keys of keys',\n      literal:\n        'SIX TEN FORMFEED NINE ZERO NONE SPACE FOUR FALSE COLON CRLF PI COMMA ENDOFFILE EOF EIGHT FIVE ' +\n        'QUOTE EMPTY ONE TRUE RETURN CR LINEFEED RIGHT BACKSLASH NULL SEVEN TAB THREE TWO ' +\n        'six ten formfeed nine zero none space four false colon crlf pi comma endoffile eof eight five ' +\n        'quote empty one true return cr linefeed right backslash null seven tab three two ' +\n        'RIVERSION RISTATE FILE_READ_MODE FILE_WRITE_MODE FILE_WRITE_MODE DIR_WRITE_MODE FILE_READ_UMASK ' +\n        'FILE_WRITE_UMASK DIR_READ_UMASK DIR_WRITE_UMASK',\n      built_in:\n        'put abs acos aliasReference annuity arrayDecode arrayEncode asin atan atan2 average avg avgDev base64Decode ' +\n        'base64Encode baseConvert binaryDecode binaryEncode byteOffset byteToNum cachedURL cachedURLs charToNum ' +\n        'cipherNames codepointOffset codepointProperty codepointToNum codeunitOffset commandNames compound compress ' +\n        'constantNames cos date dateFormat decompress directories ' +\n        'diskSpace DNSServers exp exp1 exp2 exp10 extents files flushEvents folders format functionNames geometricMean global ' +\n        'globals hasMemory harmonicMean hostAddress hostAddressToName hostName hostNameToAddress isNumber ISOToMac itemOffset ' +\n        'keys len length libURLErrorData libUrlFormData libURLftpCommand libURLLastHTTPHeaders libURLLastRHHeaders ' +\n        'libUrlMultipartFormAddPart libUrlMultipartFormData libURLVersion lineOffset ln ln1 localNames log log2 log10 ' +\n        'longFilePath lower macToISO matchChunk matchText matrixMultiply max md5Digest median merge millisec ' +\n        'millisecs millisecond milliseconds min monthNames nativeCharToNum normalizeText num number numToByte numToChar ' +\n        'numToCodepoint numToNativeChar offset open openfiles openProcesses openProcessIDs openSockets ' +\n        'paragraphOffset paramCount param params peerAddress pendingMessages platform popStdDev populationStandardDeviation ' +\n        'populationVariance popVariance processID random randomBytes replaceText result revCreateXMLTree revCreateXMLTreeFromFile ' +\n        'revCurrentRecord revCurrentRecordIsFirst revCurrentRecordIsLast revDatabaseColumnCount revDatabaseColumnIsNull ' +\n        'revDatabaseColumnLengths revDatabaseColumnNames revDatabaseColumnNamed revDatabaseColumnNumbered ' +\n        'revDatabaseColumnTypes revDatabaseConnectResult revDatabaseCursors revDatabaseID revDatabaseTableNames ' +\n        'revDatabaseType revDataFromQuery revdb_closeCursor revdb_columnbynumber revdb_columncount revdb_columnisnull ' +\n        'revdb_columnlengths revdb_columnnames revdb_columntypes revdb_commit revdb_connect revdb_connections ' +\n        'revdb_connectionerr revdb_currentrecord revdb_cursorconnection revdb_cursorerr revdb_cursors revdb_dbtype ' +\n        'revdb_disconnect revdb_execute revdb_iseof revdb_isbof revdb_movefirst revdb_movelast revdb_movenext ' +\n        'revdb_moveprev revdb_query revdb_querylist revdb_recordcount revdb_rollback revdb_tablenames ' +\n        'revGetDatabaseDriverPath revNumberOfRecords revOpenDatabase revOpenDatabases revQueryDatabase ' +\n        'revQueryDatabaseBlob revQueryResult revQueryIsAtStart revQueryIsAtEnd revUnixFromMacPath revXMLAttribute ' +\n        'revXMLAttributes revXMLAttributeValues revXMLChildContents revXMLChildNames revXMLCreateTreeFromFileWithNamespaces ' +\n        'revXMLCreateTreeWithNamespaces revXMLDataFromXPathQuery revXMLEvaluateXPath revXMLFirstChild revXMLMatchingNode ' +\n        'revXMLNextSibling revXMLNodeContents revXMLNumberOfChildren revXMLParent revXMLPreviousSibling ' +\n        'revXMLRootNode revXMLRPC_CreateRequest revXMLRPC_Documents revXMLRPC_Error ' +\n        'revXMLRPC_GetHost revXMLRPC_GetMethod revXMLRPC_GetParam revXMLText revXMLRPC_Execute ' +\n        'revXMLRPC_GetParamCount revXMLRPC_GetParamNode revXMLRPC_GetParamType revXMLRPC_GetPath revXMLRPC_GetPort ' +\n        'revXMLRPC_GetProtocol revXMLRPC_GetRequest revXMLRPC_GetResponse revXMLRPC_GetSocket revXMLTree ' +\n        'revXMLTrees revXMLValidateDTD revZipDescribeItem revZipEnumerateItems revZipOpenArchives round sampVariance ' +\n        'sec secs seconds sentenceOffset sha1Digest shell shortFilePath sin specialFolderPath sqrt standardDeviation statRound ' +\n        'stdDev sum sysError systemVersion tan tempName textDecode textEncode tick ticks time to tokenOffset toLower toUpper ' +\n        'transpose truewordOffset trunc uniDecode uniEncode upper URLDecode URLEncode URLStatus uuid value variableNames ' +\n        'variance version waitDepth weekdayNames wordOffset xsltApplyStylesheet xsltApplyStylesheetFromFile xsltLoadStylesheet ' +\n        'xsltLoadStylesheetFromFile add breakpoint cancel clear local variable file word line folder directory URL close socket process ' +\n        'combine constant convert create new alias folder directory decrypt delete variable word line folder ' +\n        'directory URL dispatch divide do encrypt filter get include intersect kill libURLDownloadToFile ' +\n        'libURLFollowHttpRedirects libURLftpUpload libURLftpUploadFile libURLresetAll libUrlSetAuthCallback ' +\n        'libURLSetCustomHTTPHeaders libUrlSetExpect100 libURLSetFTPListCommand libURLSetFTPMode libURLSetFTPStopTime ' +\n        'libURLSetStatusCallback load multiply socket prepare process post seek rel relative read from process rename ' +\n        'replace require resetAll resolve revAddXMLNode revAppendXML revCloseCursor revCloseDatabase revCommitDatabase ' +\n        'revCopyFile revCopyFolder revCopyXMLNode revDeleteFolder revDeleteXMLNode revDeleteAllXMLTrees ' +\n        'revDeleteXMLTree revExecuteSQL revGoURL revInsertXMLNode revMoveFolder revMoveToFirstRecord revMoveToLastRecord ' +\n        'revMoveToNextRecord revMoveToPreviousRecord revMoveToRecord revMoveXMLNode revPutIntoXMLNode revRollBackDatabase ' +\n        'revSetDatabaseDriverPath revSetXMLAttribute revXMLRPC_AddParam revXMLRPC_DeleteAllDocuments revXMLAddDTD ' +\n        'revXMLRPC_Free revXMLRPC_FreeAll revXMLRPC_DeleteDocument revXMLRPC_DeleteParam revXMLRPC_SetHost ' +\n        'revXMLRPC_SetMethod revXMLRPC_SetPort revXMLRPC_SetProtocol revXMLRPC_SetSocket revZipAddItemWithData ' +\n        'revZipAddItemWithFile revZipAddUncompressedItemWithData revZipAddUncompressedItemWithFile revZipCancel ' +\n        'revZipCloseArchive revZipDeleteItem revZipExtractItemToFile revZipExtractItemToVariable revZipSetProgressCallback ' +\n        'revZipRenameItem revZipReplaceItemWithData revZipReplaceItemWithFile revZipOpenArchive send set sort split start stop ' +\n        'subtract union unload wait write'\n    },\n    contains: [\n      VARIABLE,\n      {\n        className: 'keyword',\n        begin: '\\\\bend\\\\sif\\\\b'\n      },\n      {\n        className: 'function',\n        beginKeywords: 'function', end: '$',\n        contains: [\n          VARIABLE,\n          TITLE2,\n          hljs.APOS_STRING_MODE,\n          hljs.QUOTE_STRING_MODE,\n          hljs.BINARY_NUMBER_MODE,\n          hljs.C_NUMBER_MODE,\n          TITLE1\n        ]\n      },\n      {\n        className: 'function',\n        begin: '\\\\bend\\\\s+', end: '$',\n        keywords: 'end',\n        contains: [\n          TITLE2,\n          TITLE1\n        ],\n        relevance: 0\n      },\n      {\n        beginKeywords: 'command on', end: '$',\n        contains: [\n          VARIABLE,\n          TITLE2,\n          hljs.APOS_STRING_MODE,\n          hljs.QUOTE_STRING_MODE,\n          hljs.BINARY_NUMBER_MODE,\n          hljs.C_NUMBER_MODE,\n          TITLE1\n        ]\n      },\n      {\n        className: 'meta',\n        variants: [\n          {\n            begin: '<\\\\?(rev|lc|livecode)',\n            relevance: 10\n          },\n          { begin: '<\\\\?' },\n          { begin: '\\\\?>' }\n        ]\n      },\n      hljs.APOS_STRING_MODE,\n      hljs.QUOTE_STRING_MODE,\n      hljs.BINARY_NUMBER_MODE,\n      hljs.C_NUMBER_MODE,\n      TITLE1\n    ].concat(COMMENT_MODES),\n    illegal: ';$|^\\\\[|^=|&|{'\n  };\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/languages/livescript.js",
    "content": "/*\nLanguage: LiveScript\nAuthor: Taneli Vatanen <taneli.vatanen@gmail.com>\nContributors: Jen Evers-Corvina <jen@sevvie.net>\nOrigin: coffeescript.js\nDescription: LiveScript is a programming language that transcompiles to JavaScript. For info about language see http://livescript.net/\nCategory: scripting\n*/\n\nfunction(hljs) {\n  var KEYWORDS = {\n    keyword:\n      // JS keywords\n      'in if for while finally new do return else break catch instanceof throw try this ' +\n      'switch continue typeof delete debugger case default function var with ' +\n      // LiveScript keywords\n      'then unless until loop of by when and or is isnt not it that otherwise from to til fallthrough super ' +\n      'case default function var void const let enum export import native ' +\n      '__hasProp __extends __slice __bind __indexOf',\n    literal:\n      // JS literals\n      'true false null undefined ' +\n      // LiveScript literals\n      'yes no on off it that void',\n    built_in:\n      'npm require console print module global window document'\n  };\n  var JS_IDENT_RE = '[A-Za-z$_](?:\\-[0-9A-Za-z$_]|[0-9A-Za-z$_])*';\n  var TITLE = hljs.inherit(hljs.TITLE_MODE, {begin: JS_IDENT_RE});\n  var SUBST = {\n    className: 'subst',\n    begin: /#\\{/, end: /}/,\n    keywords: KEYWORDS\n  };\n  var SUBST_SIMPLE = {\n    className: 'subst',\n    begin: /#[A-Za-z$_]/, end: /(?:\\-[0-9A-Za-z$_]|[0-9A-Za-z$_])*/,\n    keywords: KEYWORDS\n  };\n  var EXPRESSIONS = [\n    hljs.BINARY_NUMBER_MODE,\n    {\n      className: 'number',\n      begin: '(\\\\b0[xX][a-fA-F0-9_]+)|(\\\\b\\\\d(\\\\d|_\\\\d)*(\\\\.(\\\\d(\\\\d|_\\\\d)*)?)?(_*[eE]([-+]\\\\d(_\\\\d|\\\\d)*)?)?[_a-z]*)',\n      relevance: 0,\n      starts: {end: '(\\\\s*/)?', relevance: 0} // a number tries to eat the following slash to prevent treating it as a regexp\n    },\n    {\n      className: 'string',\n      variants: [\n        {\n          begin: /'''/, end: /'''/,\n          contains: [hljs.BACKSLASH_ESCAPE]\n        },\n        {\n          begin: /'/, end: /'/,\n          contains: [hljs.BACKSLASH_ESCAPE]\n        },\n        {\n          begin: /\"\"\"/, end: /\"\"\"/,\n          contains: [hljs.BACKSLASH_ESCAPE, SUBST, SUBST_SIMPLE]\n        },\n        {\n          begin: /\"/, end: /\"/,\n          contains: [hljs.BACKSLASH_ESCAPE, SUBST, SUBST_SIMPLE]\n        },\n        {\n          begin: /\\\\/, end: /(\\s|$)/,\n          excludeEnd: true\n        }\n      ]\n    },\n    {\n      className: 'regexp',\n      variants: [\n        {\n          begin: '//', end: '//[gim]*',\n          contains: [SUBST, hljs.HASH_COMMENT_MODE]\n        },\n        {\n          // regex can't start with space to parse x / 2 / 3 as two divisions\n          // regex can't start with *, and it supports an \"illegal\" in the main mode\n          begin: /\\/(?![ *])(\\\\\\/|.)*?\\/[gim]*(?=\\W|$)/\n        }\n      ]\n    },\n    {\n      begin: '@' + JS_IDENT_RE\n    },\n    {\n      begin: '``', end: '``',\n      excludeBegin: true, excludeEnd: true,\n      subLanguage: 'javascript'\n    }\n  ];\n  SUBST.contains = EXPRESSIONS;\n\n  var PARAMS = {\n    className: 'params',\n    begin: '\\\\(', returnBegin: true,\n    /* We need another contained nameless mode to not have every nested\n    pair of parens to be called \"params\" */\n    contains: [\n      {\n        begin: /\\(/, end: /\\)/,\n        keywords: KEYWORDS,\n        contains: ['self'].concat(EXPRESSIONS)\n      }\n    ]\n  };\n\n  return {\n    aliases: ['ls'],\n    keywords: KEYWORDS,\n    illegal: /\\/\\*/,\n    contains: EXPRESSIONS.concat([\n      hljs.COMMENT('\\\\/\\\\*', '\\\\*\\\\/'),\n      hljs.HASH_COMMENT_MODE,\n      {\n        className: 'function',\n        contains: [TITLE, PARAMS],\n        returnBegin: true,\n        variants: [\n          {\n            begin: '(' + JS_IDENT_RE + '\\\\s*(?:=|:=)\\\\s*)?(\\\\(.*\\\\))?\\\\s*\\\\B\\\\->\\\\*?', end: '\\\\->\\\\*?'\n          },\n          {\n            begin: '(' + JS_IDENT_RE + '\\\\s*(?:=|:=)\\\\s*)?!?(\\\\(.*\\\\))?\\\\s*\\\\B[-~]{1,2}>\\\\*?', end: '[-~]{1,2}>\\\\*?'\n          },\n          {\n            begin: '(' + JS_IDENT_RE + '\\\\s*(?:=|:=)\\\\s*)?(\\\\(.*\\\\))?\\\\s*\\\\B!?[-~]{1,2}>\\\\*?', end: '!?[-~]{1,2}>\\\\*?'\n          }\n        ]\n      },\n      {\n        className: 'class',\n        beginKeywords: 'class',\n        end: '$',\n        illegal: /[:=\"\\[\\]]/,\n        contains: [\n          {\n            beginKeywords: 'extends',\n            endsWithParent: true,\n            illegal: /[:=\"\\[\\]]/,\n            contains: [TITLE]\n          },\n          TITLE\n        ]\n      },\n      {\n        begin: JS_IDENT_RE + ':', end: ':',\n        returnBegin: true, returnEnd: true,\n        relevance: 0\n      }\n    ])\n  };\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/languages/lsl.js",
    "content": "/*\nLanguage: Linden Scripting Language\nDescription: The Linden Scripting Language is used in Second Life by Linden Labs.\nAuthor: Builder's Brewery <buildersbrewery@gmail.com>\nCategory: scripting\n*/\n\nfunction(hljs) {\n\n    var LSL_STRING_ESCAPE_CHARS = {\n        className: 'subst',\n        begin: /\\\\[tn\"\\\\]/\n    };\n\n    var LSL_STRINGS = {\n        className: 'string',\n        begin: '\"',\n        end: '\"',\n        contains: [\n            LSL_STRING_ESCAPE_CHARS\n        ]\n    };\n\n    var LSL_NUMBERS = {\n        className: 'number',\n        begin: hljs.C_NUMBER_RE\n    };\n\n    var LSL_CONSTANTS = {\n        className: 'literal',\n        variants: [\n            {\n                begin: '\\\\b(?:PI|TWO_PI|PI_BY_TWO|DEG_TO_RAD|RAD_TO_DEG|SQRT2)\\\\b'\n            },\n            {\n                begin: '\\\\b(?:XP_ERROR_(?:EXPERIENCES_DISABLED|EXPERIENCE_(?:DISABLED|SUSPENDED)|INVALID_(?:EXPERIENCE|PARAMETERS)|KEY_NOT_FOUND|MATURITY_EXCEEDED|NONE|NOT_(?:FOUND|PERMITTED(?:_LAND)?)|NO_EXPERIENCE|QUOTA_EXCEEDED|RETRY_UPDATE|STORAGE_EXCEPTION|STORE_DISABLED|THROTTLED|UNKNOWN_ERROR)|JSON_APPEND|STATUS_(?:PHYSICS|ROTATE_[XYZ]|PHANTOM|SANDBOX|BLOCK_GRAB(?:_OBJECT)?|(?:DIE|RETURN)_AT_EDGE|CAST_SHADOWS|OK|MALFORMED_PARAMS|TYPE_MISMATCH|BOUNDS_ERROR|NOT_(?:FOUND|SUPPORTED)|INTERNAL_ERROR|WHITELIST_FAILED)|AGENT(?:_(?:BY_(?:LEGACY_|USER)NAME|FLYING|ATTACHMENTS|SCRIPTED|MOUSELOOK|SITTING|ON_OBJECT|AWAY|WALKING|IN_AIR|TYPING|CROUCHING|BUSY|ALWAYS_RUN|AUTOPILOT|LIST_(?:PARCEL(?:_OWNER)?|REGION)))?|CAMERA_(?:PITCH|DISTANCE|BEHINDNESS_(?:ANGLE|LAG)|(?:FOCUS|POSITION)(?:_(?:THRESHOLD|LOCKED|LAG))?|FOCUS_OFFSET|ACTIVE)|ANIM_ON|LOOP|REVERSE|PING_PONG|SMOOTH|ROTATE|SCALE|ALL_SIDES|LINK_(?:ROOT|SET|ALL_(?:OTHERS|CHILDREN)|THIS)|ACTIVE|PASS(?:IVE|_(?:ALWAYS|IF_NOT_HANDLED|NEVER))|SCRIPTED|CONTROL_(?:FWD|BACK|(?:ROT_)?(?:LEFT|RIGHT)|UP|DOWN|(?:ML_)?LBUTTON)|PERMISSION_(?:RETURN_OBJECTS|DEBIT|OVERRIDE_ANIMATIONS|SILENT_ESTATE_MANAGEMENT|TAKE_CONTROLS|TRIGGER_ANIMATION|ATTACH|CHANGE_LINKS|(?:CONTROL|TRACK)_CAMERA|TELEPORT)|INVENTORY_(?:TEXTURE|SOUND|OBJECT|SCRIPT|LANDMARK|CLOTHING|NOTECARD|BODYPART|ANIMATION|GESTURE|ALL|NONE)|CHANGED_(?:INVENTORY|COLOR|SHAPE|SCALE|TEXTURE|LINK|ALLOWED_DROP|OWNER|REGION(?:_START)?|TELEPORT|MEDIA)|OBJECT_(?:CLICK_ACTION|HOVER_HEIGHT|LAST_OWNER_ID|(?:PHYSICS|SERVER|STREAMING)_COST|UNKNOWN_DETAIL|CHARACTER_TIME|PHANTOM|PHYSICS|TEMP_ON_REZ|NAME|DESC|POS|PRIM_(?:COUNT|EQUIVALENCE)|RETURN_(?:PARCEL(?:_OWNER)?|REGION)|REZZER_KEY|ROO?T|VELOCITY|OMEGA|OWNER|GROUP|CREATOR|ATTACHED_POINT|RENDER_WEIGHT|(?:BODY_SHAPE|PATHFINDING)_TYPE|(?:RUNNING|TOTAL)_SCRIPT_COUNT|TOTAL_INVENTORY_COUNT|SCRIPT_(?:MEMORY|TIME))|TYPE_(?:INTEGER|FLOAT|STRING|KEY|VECTOR|ROTATION|INVALID)|(?:DEBUG|PUBLIC)_CHANNEL|ATTACH_(?:AVATAR_CENTER|CHEST|HEAD|BACK|PELVIS|MOUTH|CHIN|NECK|NOSE|BELLY|[LR](?:SHOULDER|HAND|FOOT|EAR|EYE|[UL](?:ARM|LEG)|HIP)|(?:LEFT|RIGHT)_PEC|HUD_(?:CENTER_[12]|TOP_(?:RIGHT|CENTER|LEFT)|BOTTOM(?:_(?:RIGHT|LEFT))?)|[LR]HAND_RING1|TAIL_(?:BASE|TIP)|[LR]WING|FACE_(?:JAW|[LR]EAR|[LR]EYE|TOUNGE)|GROIN|HIND_[LR]FOOT)|LAND_(?:LEVEL|RAISE|LOWER|SMOOTH|NOISE|REVERT)|DATA_(?:ONLINE|NAME|BORN|SIM_(?:POS|STATUS|RATING)|PAYINFO)|PAYMENT_INFO_(?:ON_FILE|USED)|REMOTE_DATA_(?:CHANNEL|REQUEST|REPLY)|PSYS_(?:PART_(?:BF_(?:ZERO|ONE(?:_MINUS_(?:DEST_COLOR|SOURCE_(ALPHA|COLOR)))?|DEST_COLOR|SOURCE_(ALPHA|COLOR))|BLEND_FUNC_(DEST|SOURCE)|FLAGS|(?:START|END)_(?:COLOR|ALPHA|SCALE|GLOW)|MAX_AGE|(?:RIBBON|WIND|INTERP_(?:COLOR|SCALE)|BOUNCE|FOLLOW_(?:SRC|VELOCITY)|TARGET_(?:POS|LINEAR)|EMISSIVE)_MASK)|SRC_(?:MAX_AGE|PATTERN|ANGLE_(?:BEGIN|END)|BURST_(?:RATE|PART_COUNT|RADIUS|SPEED_(?:MIN|MAX))|ACCEL|TEXTURE|TARGET_KEY|OMEGA|PATTERN_(?:DROP|EXPLODE|ANGLE(?:_CONE(?:_EMPTY)?)?)))|VEHICLE_(?:REFERENCE_FRAME|TYPE_(?:NONE|SLED|CAR|BOAT|AIRPLANE|BALLOON)|(?:LINEAR|ANGULAR)_(?:FRICTION_TIMESCALE|MOTOR_DIRECTION)|LINEAR_MOTOR_OFFSET|HOVER_(?:HEIGHT|EFFICIENCY|TIMESCALE)|BUOYANCY|(?:LINEAR|ANGULAR)_(?:DEFLECTION_(?:EFFICIENCY|TIMESCALE)|MOTOR_(?:DECAY_)?TIMESCALE)|VERTICAL_ATTRACTION_(?:EFFICIENCY|TIMESCALE)|BANKING_(?:EFFICIENCY|MIX|TIMESCALE)|FLAG_(?:NO_DEFLECTION_UP|LIMIT_(?:ROLL_ONLY|MOTOR_UP)|HOVER_(?:(?:WATER|TERRAIN|UP)_ONLY|GLOBAL_HEIGHT)|MOUSELOOK_(?:STEER|BANK)|CAMERA_DECOUPLED))|PRIM_(?:ALPHA_MODE(?:_(?:BLEND|EMISSIVE|MASK|NONE))?|NORMAL|SPECULAR|TYPE(?:_(?:BOX|CYLINDER|PRISM|SPHERE|TORUS|TUBE|RING|SCULPT))?|HOLE_(?:DEFAULT|CIRCLE|SQUARE|TRIANGLE)|MATERIAL(?:_(?:STONE|METAL|GLASS|WOOD|FLESH|PLASTIC|RUBBER))?|SHINY_(?:NONE|LOW|MEDIUM|HIGH)|BUMP_(?:NONE|BRIGHT|DARK|WOOD|BARK|BRICKS|CHECKER|CONCRETE|TILE|STONE|DISKS|GRAVEL|BLOBS|SIDING|LARGETILE|STUCCO|SUCTION|WEAVE)|TEXGEN_(?:DEFAULT|PLANAR)|SCULPT_(?:TYPE_(?:SPHERE|TORUS|PLANE|CYLINDER|MASK)|FLAG_(?:MIRROR|INVERT))|PHYSICS(?:_(?:SHAPE_(?:CONVEX|NONE|PRIM|TYPE)))?|(?:POS|ROT)_LOCAL|SLICE|TEXT|FLEXIBLE|POINT_LIGHT|TEMP_ON_REZ|PHANTOM|POSITION|SIZE|ROTATION|TEXTURE|NAME|OMEGA|DESC|LINK_TARGET|COLOR|BUMP_SHINY|FULLBRIGHT|TEXGEN|GLOW|MEDIA_(?:ALT_IMAGE_ENABLE|CONTROLS|(?:CURRENT|HOME)_URL|AUTO_(?:LOOP|PLAY|SCALE|ZOOM)|FIRST_CLICK_INTERACT|(?:WIDTH|HEIGHT)_PIXELS|WHITELIST(?:_ENABLE)?|PERMS_(?:INTERACT|CONTROL)|PARAM_MAX|CONTROLS_(?:STANDARD|MINI)|PERM_(?:NONE|OWNER|GROUP|ANYONE)|MAX_(?:URL_LENGTH|WHITELIST_(?:SIZE|COUNT)|(?:WIDTH|HEIGHT)_PIXELS)))|MASK_(?:BASE|OWNER|GROUP|EVERYONE|NEXT)|PERM_(?:TRANSFER|MODIFY|COPY|MOVE|ALL)|PARCEL_(?:MEDIA_COMMAND_(?:STOP|PAUSE|PLAY|LOOP|TEXTURE|URL|TIME|AGENT|UNLOAD|AUTO_ALIGN|TYPE|SIZE|DESC|LOOP_SET)|FLAG_(?:ALLOW_(?:FLY|(?:GROUP_)?SCRIPTS|LANDMARK|TERRAFORM|DAMAGE|CREATE_(?:GROUP_)?OBJECTS)|USE_(?:ACCESS_(?:GROUP|LIST)|BAN_LIST|LAND_PASS_LIST)|LOCAL_SOUND_ONLY|RESTRICT_PUSHOBJECT|ALLOW_(?:GROUP|ALL)_OBJECT_ENTRY)|COUNT_(?:TOTAL|OWNER|GROUP|OTHER|SELECTED|TEMP)|DETAILS_(?:NAME|DESC|OWNER|GROUP|AREA|ID|SEE_AVATARS))|LIST_STAT_(?:MAX|MIN|MEAN|MEDIAN|STD_DEV|SUM(?:_SQUARES)?|NUM_COUNT|GEOMETRIC_MEAN|RANGE)|PAY_(?:HIDE|DEFAULT)|REGION_FLAG_(?:ALLOW_DAMAGE|FIXED_SUN|BLOCK_TERRAFORM|SANDBOX|DISABLE_(?:COLLISIONS|PHYSICS)|BLOCK_FLY|ALLOW_DIRECT_TELEPORT|RESTRICT_PUSHOBJECT)|HTTP_(?:METHOD|MIMETYPE|BODY_(?:MAXLENGTH|TRUNCATED)|CUSTOM_HEADER|PRAGMA_NO_CACHE|VERBOSE_THROTTLE|VERIFY_CERT)|STRING_(?:TRIM(?:_(?:HEAD|TAIL))?)|CLICK_ACTION_(?:NONE|TOUCH|SIT|BUY|PAY|OPEN(?:_MEDIA)?|PLAY|ZOOM)|TOUCH_INVALID_FACE|PROFILE_(?:NONE|SCRIPT_MEMORY)|RC_(?:DATA_FLAGS|DETECT_PHANTOM|GET_(?:LINK_NUM|NORMAL|ROOT_KEY)|MAX_HITS|REJECT_(?:TYPES|AGENTS|(?:NON)?PHYSICAL|LAND))|RCERR_(?:CAST_TIME_EXCEEDED|SIM_PERF_LOW|UNKNOWN)|ESTATE_ACCESS_(?:ALLOWED_(?:AGENT|GROUP)_(?:ADD|REMOVE)|BANNED_AGENT_(?:ADD|REMOVE))|DENSITY|FRICTION|RESTITUTION|GRAVITY_MULTIPLIER|KFM_(?:COMMAND|CMD_(?:PLAY|STOP|PAUSE)|MODE|FORWARD|LOOP|PING_PONG|REVERSE|DATA|ROTATION|TRANSLATION)|ERR_(?:GENERIC|PARCEL_PERMISSIONS|MALFORMED_PARAMS|RUNTIME_PERMISSIONS|THROTTLED)|CHARACTER_(?:CMD_(?:(?:SMOOTH_)?STOP|JUMP)|DESIRED_(?:TURN_)?SPEED|RADIUS|STAY_WITHIN_PARCEL|LENGTH|ORIENTATION|ACCOUNT_FOR_SKIPPED_FRAMES|AVOIDANCE_MODE|TYPE(?:_(?:[ABCD]|NONE))?|MAX_(?:DECEL|TURN_RADIUS|(?:ACCEL|SPEED)))|PURSUIT_(?:OFFSET|FUZZ_FACTOR|GOAL_TOLERANCE|INTERCEPT)|REQUIRE_LINE_OF_SIGHT|FORCE_DIRECT_PATH|VERTICAL|HORIZONTAL|AVOID_(?:CHARACTERS|DYNAMIC_OBSTACLES|NONE)|PU_(?:EVADE_(?:HIDDEN|SPOTTED)|FAILURE_(?:DYNAMIC_PATHFINDING_DISABLED|INVALID_(?:GOAL|START)|NO_(?:NAVMESH|VALID_DESTINATION)|OTHER|TARGET_GONE|(?:PARCEL_)?UNREACHABLE)|(?:GOAL|SLOWDOWN_DISTANCE)_REACHED)|TRAVERSAL_TYPE(?:_(?:FAST|NONE|SLOW))?|CONTENT_TYPE_(?:ATOM|FORM|HTML|JSON|LLSD|RSS|TEXT|XHTML|XML)|GCNP_(?:RADIUS|STATIC)|(?:PATROL|WANDER)_PAUSE_AT_WAYPOINTS|OPT_(?:AVATAR|CHARACTER|EXCLUSION_VOLUME|LEGACY_LINKSET|MATERIAL_VOLUME|OTHER|STATIC_OBSTACLE|WALKABLE)|SIM_STAT_PCT_CHARS_STEPPED)\\\\b'\n            },\n            {\n                begin: '\\\\b(?:FALSE|TRUE)\\\\b'\n            },\n            {\n                begin: '\\\\b(?:ZERO_ROTATION)\\\\b'\n            },\n            {\n                begin: '\\\\b(?:EOF|JSON_(?:ARRAY|DELETE|FALSE|INVALID|NULL|NUMBER|OBJECT|STRING|TRUE)|NULL_KEY|TEXTURE_(?:BLANK|DEFAULT|MEDIA|PLYWOOD|TRANSPARENT)|URL_REQUEST_(?:GRANTED|DENIED))\\\\b'\n            },\n            {\n                begin: '\\\\b(?:ZERO_VECTOR|TOUCH_INVALID_(?:TEXCOORD|VECTOR))\\\\b'\n            }\n        ]\n    };\n\n    var LSL_FUNCTIONS = {\n        className: 'built_in',\n        begin: '\\\\b(?:ll(?:AgentInExperience|(?:Create|DataSize|Delete|KeyCount|Keys|Read|Update)KeyValue|GetExperience(?:Details|ErrorMessage)|ReturnObjectsBy(?:ID|Owner)|Json(?:2List|[GS]etValue|ValueType)|Sin|Cos|Tan|Atan2|Sqrt|Pow|Abs|Fabs|Frand|Floor|Ceil|Round|Vec(?:Mag|Norm|Dist)|Rot(?:Between|2(?:Euler|Fwd|Left|Up))|(?:Euler|Axes)2Rot|Whisper|(?:Region|Owner)?Say|Shout|Listen(?:Control|Remove)?|Sensor(?:Repeat|Remove)?|Detected(?:Name|Key|Owner|Type|Pos|Vel|Grab|Rot|Group|LinkNumber)|Die|Ground|Wind|(?:[GS]et)(?:AnimationOverride|MemoryLimit|PrimMediaParams|ParcelMusicURL|Object(?:Desc|Name)|PhysicsMaterial|Status|Scale|Color|Alpha|Texture|Pos|Rot|Force|Torque)|ResetAnimationOverride|(?:Scale|Offset|Rotate)Texture|(?:Rot)?Target(?:Remove)?|(?:Stop)?MoveToTarget|Apply(?:Rotational)?Impulse|Set(?:KeyframedMotion|ContentType|RegionPos|(?:Angular)?Velocity|Buoyancy|HoverHeight|ForceAndTorque|TimerEvent|ScriptState|Damage|TextureAnim|Sound(?:Queueing|Radius)|Vehicle(?:Type|(?:Float|Vector|Rotation)Param)|(?:Touch|Sit)?Text|Camera(?:Eye|At)Offset|PrimitiveParams|ClickAction|Link(?:Alpha|Color|PrimitiveParams(?:Fast)?|Texture(?:Anim)?|Camera|Media)|RemoteScriptAccessPin|PayPrice|LocalRot)|ScaleByFactor|Get(?:(?:Max|Min)ScaleFactor|ClosestNavPoint|StaticPath|SimStats|Env|PrimitiveParams|Link(?:PrimitiveParams|Number(?:OfSides)?|Key|Name|Media)|HTTPHeader|FreeURLs|Object(?:Details|PermMask|PrimCount)|Parcel(?:MaxPrims|Details|Prim(?:Count|Owners))|Attached(?:List)?|(?:SPMax|Free|Used)Memory|Region(?:Name|TimeDilation|FPS|Corner|AgentCount)|Root(?:Position|Rotation)|UnixTime|(?:Parcel|Region)Flags|(?:Wall|GMT)clock|SimulatorHostname|BoundingBox|GeometricCenter|Creator|NumberOf(?:Prims|NotecardLines|Sides)|Animation(?:List)?|(?:Camera|Local)(?:Pos|Rot)|Vel|Accel|Omega|Time(?:stamp|OfDay)|(?:Object|CenterOf)?Mass|MassMKS|Energy|Owner|(?:Owner)?Key|SunDirection|Texture(?:Offset|Scale|Rot)|Inventory(?:Number|Name|Key|Type|Creator|PermMask)|Permissions(?:Key)?|StartParameter|List(?:Length|EntryType)|Date|Agent(?:Size|Info|Language|List)|LandOwnerAt|NotecardLine|Script(?:Name|State))|(?:Get|Reset|GetAndReset)Time|PlaySound(?:Slave)?|LoopSound(?:Master|Slave)?|(?:Trigger|Stop|Preload)Sound|(?:(?:Get|Delete)Sub|Insert)String|To(?:Upper|Lower)|Give(?:InventoryList|Money)|RezObject|(?:Stop)?LookAt|Sleep|CollisionFilter|(?:Take|Release)Controls|DetachFromAvatar|AttachToAvatar(?:Temp)?|InstantMessage|(?:GetNext)?Email|StopHover|MinEventDelay|RotLookAt|String(?:Length|Trim)|(?:Start|Stop)Animation|TargetOmega|Request(?:Experience)?Permissions|(?:Create|Break)Link|BreakAllLinks|(?:Give|Remove)Inventory|Water|PassTouches|Request(?:Agent|Inventory)Data|TeleportAgent(?:Home|GlobalCoords)?|ModifyLand|CollisionSound|ResetScript|MessageLinked|PushObject|PassCollisions|AxisAngle2Rot|Rot2(?:Axis|Angle)|A(?:cos|sin)|AngleBetween|AllowInventoryDrop|SubStringIndex|List2(?:CSV|Integer|Json|Float|String|Key|Vector|Rot|List(?:Strided)?)|DeleteSubList|List(?:Statistics|Sort|Randomize|(?:Insert|Find|Replace)List)|EdgeOfWorld|AdjustSoundVolume|Key2Name|TriggerSoundLimited|EjectFromLand|(?:CSV|ParseString)2List|OverMyLand|SameGroup|UnSit|Ground(?:Slope|Normal|Contour)|GroundRepel|(?:Set|Remove)VehicleFlags|(?:AvatarOn)?(?:Link)?SitTarget|Script(?:Danger|Profiler)|Dialog|VolumeDetect|ResetOtherScript|RemoteLoadScriptPin|(?:Open|Close)RemoteDataChannel|SendRemoteData|RemoteDataReply|(?:Integer|String)ToBase64|XorBase64|Log(?:10)?|Base64To(?:String|Integer)|ParseStringKeepNulls|RezAtRoot|RequestSimulatorData|ForceMouselook|(?:Load|Release|(?:E|Une)scape)URL|ParcelMedia(?:CommandList|Query)|ModPow|MapDestination|(?:RemoveFrom|AddTo|Reset)Land(?:Pass|Ban)List|(?:Set|Clear)CameraParams|HTTP(?:Request|Response)|TextBox|DetectedTouch(?:UV|Face|Pos|(?:N|Bin)ormal|ST)|(?:MD5|SHA1|DumpList2)String|Request(?:Secure)?URL|Clear(?:Prim|Link)Media|(?:Link)?ParticleSystem|(?:Get|Request)(?:Username|DisplayName)|RegionSayTo|CastRay|GenerateKey|TransferLindenDollars|ManageEstateAccess|(?:Create|Delete)Character|ExecCharacterCmd|Evade|FleeFrom|NavigateTo|PatrolPoints|Pursue|UpdateCharacter|WanderWithin))\\\\b'\n    };\n\n    return {\n        illegal: ':',\n        contains: [\n            LSL_STRINGS,\n            {\n                className: 'comment',\n                variants: [\n                    hljs.COMMENT('//', '$'),\n                    hljs.COMMENT('/\\\\*', '\\\\*/')\n                ]\n            },\n            LSL_NUMBERS,\n            {\n                className: 'section',\n                variants: [\n                    {\n                        begin: '\\\\b(?:state|default)\\\\b'\n                    },\n                    {\n                        begin: '\\\\b(?:state_(?:entry|exit)|touch(?:_(?:start|end))?|(?:land_)?collision(?:_(?:start|end))?|timer|listen|(?:no_)?sensor|control|(?:not_)?at_(?:rot_)?target|money|email|experience_permissions(?:_denied)?|run_time_permissions|changed|attach|dataserver|moving_(?:start|end)|link_message|(?:on|object)_rez|remote_data|http_re(?:sponse|quest)|path_update|transaction_result)\\\\b'\n                    }\n                ]\n            },\n            LSL_FUNCTIONS,\n            LSL_CONSTANTS,\n            {\n                className: 'type',\n                begin: '\\\\b(?:integer|float|string|key|vector|quaternion|rotation|list)\\\\b'\n            }\n        ]\n    };\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/languages/lua.js",
    "content": "/*\nLanguage: Lua\nAuthor: Andrew Fedorov <dmmdrs@mail.ru>\nCategory: scripting\n*/\n\nfunction(hljs) {\n  var OPENING_LONG_BRACKET = '\\\\[=*\\\\[';\n  var CLOSING_LONG_BRACKET = '\\\\]=*\\\\]';\n  var LONG_BRACKETS = {\n    begin: OPENING_LONG_BRACKET, end: CLOSING_LONG_BRACKET,\n    contains: ['self']\n  };\n  var COMMENTS = [\n    hljs.COMMENT('--(?!' + OPENING_LONG_BRACKET + ')', '$'),\n    hljs.COMMENT(\n      '--' + OPENING_LONG_BRACKET,\n      CLOSING_LONG_BRACKET,\n      {\n        contains: [LONG_BRACKETS],\n        relevance: 10\n      }\n    )\n  ];\n  return {\n    lexemes: hljs.UNDERSCORE_IDENT_RE,\n    keywords: {\n      keyword:\n        'and break do else elseif end false for if in local nil not or repeat return then ' +\n        'true until while',\n      built_in:\n        '_G _VERSION assert collectgarbage dofile error getfenv getmetatable ipairs load ' +\n        'loadfile loadstring module next pairs pcall print rawequal rawget rawset require ' +\n        'select setfenv setmetatable tonumber tostring type unpack xpcall coroutine debug ' +\n        'io math os package string table'\n    },\n    contains: COMMENTS.concat([\n      {\n        className: 'function',\n        beginKeywords: 'function', end: '\\\\)',\n        contains: [\n          hljs.inherit(hljs.TITLE_MODE, {begin: '([_a-zA-Z]\\\\w*\\\\.)*([_a-zA-Z]\\\\w*:)?[_a-zA-Z]\\\\w*'}),\n          {\n            className: 'params',\n            begin: '\\\\(', endsWithParent: true,\n            contains: COMMENTS\n          }\n        ].concat(COMMENTS)\n      },\n      hljs.C_NUMBER_MODE,\n      hljs.APOS_STRING_MODE,\n      hljs.QUOTE_STRING_MODE,\n      {\n        className: 'string',\n        begin: OPENING_LONG_BRACKET, end: CLOSING_LONG_BRACKET,\n        contains: [LONG_BRACKETS],\n        relevance: 5\n      }\n    ])\n  };\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/languages/makefile.js",
    "content": "/*\nLanguage: Makefile\nAuthor: Ivan Sagalaev <maniac@softwaremaniacs.org>\nCategory: common\n*/\n\nfunction(hljs) {\n  var VARIABLE = {\n    className: 'variable',\n    begin: /\\$\\(/, end: /\\)/,\n    contains: [hljs.BACKSLASH_ESCAPE]\n  };\n  return {\n    aliases: ['mk', 'mak'],\n    contains: [\n      hljs.HASH_COMMENT_MODE,\n      {\n        begin: /^\\w+\\s*\\W*=/, returnBegin: true,\n        relevance: 0,\n        starts: {\n          end: /\\s*\\W*=/, excludeEnd: true,\n          starts: {\n            end: /$/,\n            relevance: 0,\n            contains: [\n              VARIABLE\n            ]\n          }\n        }\n      },\n      {\n        className: 'section',\n        begin: /^[\\w]+:\\s*$/\n      },\n      {\n        className: 'meta',\n        begin: /^\\.PHONY:/, end: /$/,\n        keywords: {'meta-keyword': '.PHONY'}, lexemes: /[\\.\\w]+/\n      },\n      {\n        begin: /^\\t+/, end: /$/,\n        relevance: 0,\n        contains: [\n          hljs.QUOTE_STRING_MODE,\n          VARIABLE\n        ]\n      }\n    ]\n  };\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/languages/markdown.js",
    "content": "/*\nLanguage: Markdown\nRequires: xml.js\nAuthor: John Crepezzi <john.crepezzi@gmail.com>\nWebsite: http://seejohncode.com/\nCategory: common, markup\n*/\n\nfunction(hljs) {\n  return {\n    aliases: ['md', 'mkdown', 'mkd'],\n    contains: [\n      // highlight headers\n      {\n        className: 'section',\n        variants: [\n          { begin: '^#{1,6}', end: '$' },\n          { begin: '^.+?\\\\n[=-]{2,}$' }\n        ]\n      },\n      // inline html\n      {\n        begin: '<', end: '>',\n        subLanguage: 'xml',\n        relevance: 0\n      },\n      // lists (indicators only)\n      {\n        className: 'bullet',\n        begin: '^([*+-]|(\\\\d+\\\\.))\\\\s+'\n      },\n      // strong segments\n      {\n        className: 'strong',\n        begin: '[*_]{2}.+?[*_]{2}'\n      },\n      // emphasis segments\n      {\n        className: 'emphasis',\n        variants: [\n          { begin: '\\\\*.+?\\\\*' },\n          { begin: '_.+?_'\n          , relevance: 0\n          }\n        ]\n      },\n      // blockquotes\n      {\n        className: 'quote',\n        begin: '^>\\\\s+', end: '$'\n      },\n      // code snippets\n      {\n        className: 'code',\n        variants: [\n          {\n            begin: '^```\\w*\\s*$', end: '^```\\s*$'\n          },\n          {\n            begin: '`.+?`'\n          },\n          {\n            begin: '^( {4}|\\t)', end: '$',\n            relevance: 0\n          }\n        ]\n      },\n      // horizontal rules\n      {\n        begin: '^[-\\\\*]{3,}', end: '$'\n      },\n      // using links - title and link\n      {\n        begin: '\\\\[.+?\\\\][\\\\(\\\\[].*?[\\\\)\\\\]]',\n        returnBegin: true,\n        contains: [\n          {\n            className: 'string',\n            begin: '\\\\[', end: '\\\\]',\n            excludeBegin: true,\n            returnEnd: true,\n            relevance: 0\n          },\n          {\n            className: 'link',\n            begin: '\\\\]\\\\(', end: '\\\\)',\n            excludeBegin: true, excludeEnd: true\n          },\n          {\n            className: 'symbol',\n            begin: '\\\\]\\\\[', end: '\\\\]',\n            excludeBegin: true, excludeEnd: true\n          }\n        ],\n        relevance: 10\n      },\n      {\n        begin: /^\\[[^\\n]+\\]:/,\n        returnBegin: true,\n        contains: [\n          {\n            className: 'symbol',\n            begin: /\\[/, end: /\\]/,\n            excludeBegin: true, excludeEnd: true\n          },\n          {\n            className: 'link',\n            begin: /:\\s*/, end: /$/,\n            excludeBegin: true\n          }\n        ]\n      }\n    ]\n  };\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/languages/mathematica.js",
    "content": "/*\nLanguage: Mathematica\nAuthor: Daniel Kvasnicka <dkvasnicka@vendavo.com>\nCategory: scientific\n*/\n\nfunction(hljs) {\n  return {\n    aliases: ['mma'],\n    lexemes: '(\\\\$|\\\\b)' + hljs.IDENT_RE + '\\\\b',\n    keywords: 'AbelianGroup Abort AbortKernels AbortProtect Above Abs Absolute AbsoluteCorrelation AbsoluteCorrelationFunction AbsoluteCurrentValue AbsoluteDashing AbsoluteFileName AbsoluteOptions AbsolutePointSize AbsoluteThickness AbsoluteTime AbsoluteTiming AccountingForm Accumulate Accuracy AccuracyGoal ActionDelay ActionMenu ActionMenuBox ActionMenuBoxOptions Active ActiveItem ActiveStyle AcyclicGraphQ AddOnHelpPath AddTo AdjacencyGraph AdjacencyList AdjacencyMatrix AdjustmentBox AdjustmentBoxOptions AdjustTimeSeriesForecast AffineTransform After AiryAi AiryAiPrime AiryAiZero AiryBi AiryBiPrime AiryBiZero AlgebraicIntegerQ AlgebraicNumber AlgebraicNumberDenominator AlgebraicNumberNorm AlgebraicNumberPolynomial AlgebraicNumberTrace AlgebraicRules AlgebraicRulesData Algebraics AlgebraicUnitQ Alignment AlignmentMarker AlignmentPoint All AllowedDimensions AllowGroupClose AllowInlineCells AllowKernelInitialization AllowReverseGroupClose AllowScriptLevelChange AlphaChannel AlternatingGroup AlternativeHypothesis Alternatives AmbientLight Analytic AnchoredSearch And AndersonDarlingTest AngerJ AngleBracket AngularGauge Animate AnimationCycleOffset AnimationCycleRepetitions AnimationDirection AnimationDisplayTime AnimationRate AnimationRepetitions AnimationRunning Animator AnimatorBox AnimatorBoxOptions AnimatorElements Annotation Annuity AnnuityDue Antialiasing Antisymmetric Apart ApartSquareFree Appearance AppearanceElements AppellF1 Append AppendTo Apply ArcCos ArcCosh ArcCot ArcCoth ArcCsc ArcCsch ArcSec ArcSech ArcSin ArcSinDistribution ArcSinh ArcTan ArcTanh Arg ArgMax ArgMin ArgumentCountQ ARIMAProcess ArithmeticGeometricMean ARMAProcess ARProcess Array ArrayComponents ArrayDepth ArrayFlatten ArrayPad ArrayPlot ArrayQ ArrayReshape ArrayRules Arrays Arrow Arrow3DBox ArrowBox Arrowheads AspectRatio AspectRatioFixed Assert Assuming Assumptions AstronomicalData Asynchronous AsynchronousTaskObject AsynchronousTasks AtomQ Attributes AugmentedSymmetricPolynomial AutoAction AutoDelete AutoEvaluateEvents AutoGeneratedPackage AutoIndent AutoIndentSpacings AutoItalicWords AutoloadPath AutoMatch Automatic AutomaticImageSize AutoMultiplicationSymbol AutoNumberFormatting AutoOpenNotebooks AutoOpenPalettes AutorunSequencing AutoScaling AutoScroll AutoSpacing AutoStyleOptions AutoStyleWords Axes AxesEdge AxesLabel AxesOrigin AxesStyle Axis ' +\n      'BabyMonsterGroupB Back Background BackgroundTasksSettings Backslash Backsubstitution Backward Band BandpassFilter BandstopFilter BarabasiAlbertGraphDistribution BarChart BarChart3D BarLegend BarlowProschanImportance BarnesG BarOrigin BarSpacing BartlettHannWindow BartlettWindow BaseForm Baseline BaselinePosition BaseStyle BatesDistribution BattleLemarieWavelet Because BeckmannDistribution Beep Before Begin BeginDialogPacket BeginFrontEndInteractionPacket BeginPackage BellB BellY Below BenfordDistribution BeniniDistribution BenktanderGibratDistribution BenktanderWeibullDistribution BernoulliB BernoulliDistribution BernoulliGraphDistribution BernoulliProcess BernsteinBasis BesselFilterModel BesselI BesselJ BesselJZero BesselK BesselY BesselYZero Beta BetaBinomialDistribution BetaDistribution BetaNegativeBinomialDistribution BetaPrimeDistribution BetaRegularized BetweennessCentrality BezierCurve BezierCurve3DBox BezierCurve3DBoxOptions BezierCurveBox BezierCurveBoxOptions BezierFunction BilateralFilter Binarize BinaryFormat BinaryImageQ BinaryRead BinaryReadList BinaryWrite BinCounts BinLists Binomial BinomialDistribution BinomialProcess BinormalDistribution BiorthogonalSplineWavelet BipartiteGraphQ BirnbaumImportance BirnbaumSaundersDistribution BitAnd BitClear BitGet BitLength BitNot BitOr BitSet BitShiftLeft BitShiftRight BitXor Black BlackmanHarrisWindow BlackmanNuttallWindow BlackmanWindow Blank BlankForm BlankNullSequence BlankSequence Blend Block BlockRandom BlomqvistBeta BlomqvistBetaTest Blue Blur BodePlot BohmanWindow Bold Bookmarks Boole BooleanConsecutiveFunction BooleanConvert BooleanCountingFunction BooleanFunction BooleanGraph BooleanMaxterms BooleanMinimize BooleanMinterms Booleans BooleanTable BooleanVariables BorderDimensions BorelTannerDistribution Bottom BottomHatTransform BoundaryStyle Bounds Box BoxBaselineShift BoxData BoxDimensions Boxed Boxes BoxForm BoxFormFormatTypes BoxFrame BoxID BoxMargins BoxMatrix BoxRatios BoxRotation BoxRotationPoint BoxStyle BoxWhiskerChart Bra BracketingBar BraKet BrayCurtisDistance BreadthFirstScan Break Brown BrownForsytheTest BrownianBridgeProcess BrowserCategory BSplineBasis BSplineCurve BSplineCurve3DBox BSplineCurveBox BSplineCurveBoxOptions BSplineFunction BSplineSurface BSplineSurface3DBox BubbleChart BubbleChart3D BubbleScale BubbleSizes BulletGauge BusinessDayQ ButterflyGraph ButterworthFilterModel Button ButtonBar ButtonBox ButtonBoxOptions ButtonCell ButtonContents ButtonData ButtonEvaluator ButtonExpandable ButtonFrame ButtonFunction ButtonMargins ButtonMinHeight ButtonNote ButtonNotebook ButtonSource ButtonStyle ButtonStyleMenuListing Byte ByteCount ByteOrdering ' +\n      'C CachedValue CacheGraphics CalendarData CalendarType CallPacket CanberraDistance Cancel CancelButton CandlestickChart Cap CapForm CapitalDifferentialD CardinalBSplineBasis CarmichaelLambda Cases Cashflow Casoratian Catalan CatalanNumber Catch CauchyDistribution CauchyWindow CayleyGraph CDF CDFDeploy CDFInformation CDFWavelet Ceiling Cell CellAutoOverwrite CellBaseline CellBoundingBox CellBracketOptions CellChangeTimes CellContents CellContext CellDingbat CellDynamicExpression CellEditDuplicate CellElementsBoundingBox CellElementSpacings CellEpilog CellEvaluationDuplicate CellEvaluationFunction CellEventActions CellFrame CellFrameColor CellFrameLabelMargins CellFrameLabels CellFrameMargins CellGroup CellGroupData CellGrouping CellGroupingRules CellHorizontalScrolling CellID CellLabel CellLabelAutoDelete CellLabelMargins CellLabelPositioning CellMargins CellObject CellOpen CellPrint CellProlog Cells CellSize CellStyle CellTags CellularAutomaton CensoredDistribution Censoring Center CenterDot CentralMoment CentralMomentGeneratingFunction CForm ChampernowneNumber ChanVeseBinarize Character CharacterEncoding CharacterEncodingsPath CharacteristicFunction CharacteristicPolynomial CharacterRange Characters ChartBaseStyle ChartElementData ChartElementDataFunction ChartElementFunction ChartElements ChartLabels ChartLayout ChartLegends ChartStyle Chebyshev1FilterModel Chebyshev2FilterModel ChebyshevDistance ChebyshevT ChebyshevU Check CheckAbort CheckAll Checkbox CheckboxBar CheckboxBox CheckboxBoxOptions ChemicalData ChessboardDistance ChiDistribution ChineseRemainder ChiSquareDistribution ChoiceButtons ChoiceDialog CholeskyDecomposition Chop Circle CircleBox CircleDot CircleMinus CirclePlus CircleTimes CirculantGraph CityData Clear ClearAll ClearAttributes ClearSystemCache ClebschGordan ClickPane Clip ClipboardNotebook ClipFill ClippingStyle ClipPlanes ClipRange Clock ClockGauge ClockwiseContourIntegral Close Closed CloseKernels ClosenessCentrality Closing ClosingAutoSave ClosingEvent ClusteringComponents CMYKColor Coarse Coefficient CoefficientArrays CoefficientDomain CoefficientList CoefficientRules CoifletWavelet Collect Colon ColonForm ColorCombine ColorConvert ColorData ColorDataFunction ColorFunction ColorFunctionScaling Colorize ColorNegate ColorOutput ColorProfileData ColorQuantize ColorReplace ColorRules ColorSelectorSettings ColorSeparate ColorSetter ColorSetterBox ColorSetterBoxOptions ColorSlider ColorSpace Column ColumnAlignments ColumnBackgrounds ColumnForm ColumnLines ColumnsEqual ColumnSpacings ColumnWidths CommonDefaultFormatTypes Commonest CommonestFilter CommonUnits CommunityBoundaryStyle CommunityGraphPlot CommunityLabels CommunityRegionStyle CompatibleUnitQ CompilationOptions CompilationTarget Compile Compiled CompiledFunction Complement CompleteGraph CompleteGraphQ CompleteKaryTree CompletionsListPacket Complex Complexes ComplexExpand ComplexInfinity ComplexityFunction ComponentMeasurements ' +\n      'ComponentwiseContextMenu Compose ComposeList ComposeSeries Composition CompoundExpression CompoundPoissonDistribution CompoundPoissonProcess CompoundRenewalProcess Compress CompressedData Condition ConditionalExpression Conditioned Cone ConeBox ConfidenceLevel ConfidenceRange ConfidenceTransform ConfigurationPath Congruent Conjugate ConjugateTranspose Conjunction Connect ConnectedComponents ConnectedGraphQ ConnesWindow ConoverTest ConsoleMessage ConsoleMessagePacket ConsolePrint Constant ConstantArray Constants ConstrainedMax ConstrainedMin ContentPadding ContentsBoundingBox ContentSelectable ContentSize Context ContextMenu Contexts ContextToFilename ContextToFileName Continuation Continue ContinuedFraction ContinuedFractionK ContinuousAction ContinuousMarkovProcess ContinuousTimeModelQ ContinuousWaveletData ContinuousWaveletTransform ContourDetect ContourGraphics ContourIntegral ContourLabels ContourLines ContourPlot ContourPlot3D Contours ContourShading ContourSmoothing ContourStyle ContraharmonicMean Control ControlActive ControlAlignment ControllabilityGramian ControllabilityMatrix ControllableDecomposition ControllableModelQ ControllerDuration ControllerInformation ControllerInformationData ControllerLinking ControllerManipulate ControllerMethod ControllerPath ControllerState ControlPlacement ControlsRendering ControlType Convergents ConversionOptions ConversionRules ConvertToBitmapPacket ConvertToPostScript ConvertToPostScriptPacket Convolve ConwayGroupCo1 ConwayGroupCo2 ConwayGroupCo3 CoordinateChartData CoordinatesToolOptions CoordinateTransform CoordinateTransformData CoprimeQ Coproduct CopulaDistribution Copyable CopyDirectory CopyFile CopyTag CopyToClipboard CornerFilter CornerNeighbors Correlation CorrelationDistance CorrelationFunction CorrelationTest Cos Cosh CoshIntegral CosineDistance CosineWindow CosIntegral Cot Coth Count CounterAssignments CounterBox CounterBoxOptions CounterClockwiseContourIntegral CounterEvaluator CounterFunction CounterIncrements CounterStyle CounterStyleMenuListing CountRoots CountryData Covariance CovarianceEstimatorFunction CovarianceFunction CoxianDistribution CoxIngersollRossProcess CoxModel CoxModelFit CramerVonMisesTest CreateArchive CreateDialog CreateDirectory CreateDocument CreateIntermediateDirectories CreatePalette CreatePalettePacket CreateScheduledTask CreateTemporary CreateWindow CriticalityFailureImportance CriticalitySuccessImportance CriticalSection Cross CrossingDetect CrossMatrix Csc Csch CubeRoot Cubics Cuboid CuboidBox Cumulant CumulantGeneratingFunction Cup CupCap Curl CurlyDoubleQuote CurlyQuote CurrentImage CurrentlySpeakingPacket CurrentValue CurvatureFlowFilter CurveClosed Cyan CycleGraph CycleIndexPolynomial Cycles CyclicGroup Cyclotomic Cylinder CylinderBox CylindricalDecomposition ' +\n      'D DagumDistribution DamerauLevenshteinDistance DampingFactor Darker Dashed Dashing DataCompression DataDistribution DataRange DataReversed Date DateDelimiters DateDifference DateFunction DateList DateListLogPlot DateListPlot DatePattern DatePlus DateRange DateString DateTicksFormat DaubechiesWavelet DavisDistribution DawsonF DayCount DayCountConvention DayMatchQ DayName DayPlus DayRange DayRound DeBruijnGraph Debug DebugTag Decimal DeclareKnownSymbols DeclarePackage Decompose Decrement DedekindEta Default DefaultAxesStyle DefaultBaseStyle DefaultBoxStyle DefaultButton DefaultColor DefaultControlPlacement DefaultDuplicateCellStyle DefaultDuration DefaultElement DefaultFaceGridsStyle DefaultFieldHintStyle DefaultFont DefaultFontProperties DefaultFormatType DefaultFormatTypeForStyle DefaultFrameStyle DefaultFrameTicksStyle DefaultGridLinesStyle DefaultInlineFormatType DefaultInputFormatType DefaultLabelStyle DefaultMenuStyle DefaultNaturalLanguage DefaultNewCellStyle DefaultNewInlineCellStyle DefaultNotebook DefaultOptions DefaultOutputFormatType DefaultStyle DefaultStyleDefinitions DefaultTextFormatType DefaultTextInlineFormatType DefaultTicksStyle DefaultTooltipStyle DefaultValues Defer DefineExternal DefineInputStreamMethod DefineOutputStreamMethod Definition Degree DegreeCentrality DegreeGraphDistribution DegreeLexicographic DegreeReverseLexicographic Deinitialization Del Deletable Delete DeleteBorderComponents DeleteCases DeleteContents DeleteDirectory DeleteDuplicates DeleteFile DeleteSmallComponents DeleteWithContents DeletionWarning Delimiter DelimiterFlashTime DelimiterMatching Delimiters Denominator DensityGraphics DensityHistogram DensityPlot DependentVariables Deploy Deployed Depth DepthFirstScan Derivative DerivativeFilter DescriptorStateSpace DesignMatrix Det DGaussianWavelet DiacriticalPositioning Diagonal DiagonalMatrix Dialog DialogIndent DialogInput DialogLevel DialogNotebook DialogProlog DialogReturn DialogSymbols Diamond DiamondMatrix DiceDissimilarity DictionaryLookup DifferenceDelta DifferenceOrder DifferenceRoot DifferenceRootReduce Differences DifferentialD DifferentialRoot DifferentialRootReduce DifferentiatorFilter DigitBlock DigitBlockMinimum DigitCharacter DigitCount DigitQ DihedralGroup Dilation Dimensions DiracComb DiracDelta DirectedEdge DirectedEdges DirectedGraph DirectedGraphQ DirectedInfinity Direction Directive Directory DirectoryName DirectoryQ DirectoryStack DirichletCharacter DirichletConvolve DirichletDistribution DirichletL DirichletTransform DirichletWindow DisableConsolePrintPacket DiscreteChirpZTransform DiscreteConvolve DiscreteDelta DiscreteHadamardTransform DiscreteIndicator DiscreteLQEstimatorGains DiscreteLQRegulatorGains DiscreteLyapunovSolve DiscreteMarkovProcess DiscretePlot DiscretePlot3D DiscreteRatio DiscreteRiccatiSolve DiscreteShift DiscreteTimeModelQ DiscreteUniformDistribution DiscreteVariables DiscreteWaveletData DiscreteWaveletPacketTransform ' +\n      'DiscreteWaveletTransform Discriminant Disjunction Disk DiskBox DiskMatrix Dispatch DispersionEstimatorFunction Display DisplayAllSteps DisplayEndPacket DisplayFlushImagePacket DisplayForm DisplayFunction DisplayPacket DisplayRules DisplaySetSizePacket DisplayString DisplayTemporary DisplayWith DisplayWithRef DisplayWithVariable DistanceFunction DistanceTransform Distribute Distributed DistributedContexts DistributeDefinitions DistributionChart DistributionDomain DistributionFitTest DistributionParameterAssumptions DistributionParameterQ Dithering Div Divergence Divide DivideBy Dividers Divisible Divisors DivisorSigma DivisorSum DMSList DMSString Do DockedCells DocumentNotebook DominantColors DOSTextFormat Dot DotDashed DotEqual Dotted DoubleBracketingBar DoubleContourIntegral DoubleDownArrow DoubleLeftArrow DoubleLeftRightArrow DoubleLeftTee DoubleLongLeftArrow DoubleLongLeftRightArrow DoubleLongRightArrow DoubleRightArrow DoubleRightTee DoubleUpArrow DoubleUpDownArrow DoubleVerticalBar DoublyInfinite Down DownArrow DownArrowBar DownArrowUpArrow DownLeftRightVector DownLeftTeeVector DownLeftVector DownLeftVectorBar DownRightTeeVector DownRightVector DownRightVectorBar Downsample DownTee DownTeeArrow DownValues DragAndDrop DrawEdges DrawFrontFaces DrawHighlighted Drop DSolve Dt DualLinearProgramming DualSystemsModel DumpGet DumpSave DuplicateFreeQ Dynamic DynamicBox DynamicBoxOptions DynamicEvaluationTimeout DynamicLocation DynamicModule DynamicModuleBox DynamicModuleBoxOptions DynamicModuleParent DynamicModuleValues DynamicName DynamicNamespace DynamicReference DynamicSetting DynamicUpdating DynamicWrapper DynamicWrapperBox DynamicWrapperBoxOptions ' +\n      'E EccentricityCentrality EdgeAdd EdgeBetweennessCentrality EdgeCapacity EdgeCapForm EdgeColor EdgeConnectivity EdgeCost EdgeCount EdgeCoverQ EdgeDashing EdgeDelete EdgeDetect EdgeForm EdgeIndex EdgeJoinForm EdgeLabeling EdgeLabels EdgeLabelStyle EdgeList EdgeOpacity EdgeQ EdgeRenderingFunction EdgeRules EdgeShapeFunction EdgeStyle EdgeThickness EdgeWeight Editable EditButtonSettings EditCellTagsSettings EditDistance EffectiveInterest Eigensystem Eigenvalues EigenvectorCentrality Eigenvectors Element ElementData Eliminate EliminationOrder EllipticE EllipticExp EllipticExpPrime EllipticF EllipticFilterModel EllipticK EllipticLog EllipticNomeQ EllipticPi EllipticReducedHalfPeriods EllipticTheta EllipticThetaPrime EmitSound EmphasizeSyntaxErrors EmpiricalDistribution Empty EmptyGraphQ EnableConsolePrintPacket Enabled Encode End EndAdd EndDialogPacket EndFrontEndInteractionPacket EndOfFile EndOfLine EndOfString EndPackage EngineeringForm Enter EnterExpressionPacket EnterTextPacket Entropy EntropyFilter Environment Epilog Equal EqualColumns EqualRows EqualTilde EquatedTo Equilibrium EquirippleFilterKernel Equivalent Erf Erfc Erfi ErlangB ErlangC ErlangDistribution Erosion ErrorBox ErrorBoxOptions ErrorNorm ErrorPacket ErrorsDialogSettings EstimatedDistribution EstimatedProcess EstimatorGains EstimatorRegulator EuclideanDistance EulerE EulerGamma EulerianGraphQ EulerPhi Evaluatable Evaluate Evaluated EvaluatePacket EvaluationCell EvaluationCompletionAction EvaluationElements EvaluationMode EvaluationMonitor EvaluationNotebook EvaluationObject EvaluationOrder Evaluator EvaluatorNames EvenQ EventData EventEvaluator EventHandler EventHandlerTag EventLabels ExactBlackmanWindow ExactNumberQ ExactRootIsolation ExampleData Except ExcludedForms ExcludePods Exclusions ExclusionsStyle Exists Exit ExitDialog Exp Expand ExpandAll ExpandDenominator ExpandFileName ExpandNumerator Expectation ExpectationE ExpectedValue ExpGammaDistribution ExpIntegralE ExpIntegralEi Exponent ExponentFunction ExponentialDistribution ExponentialFamily ExponentialGeneratingFunction ExponentialMovingAverage ExponentialPowerDistribution ExponentPosition ExponentStep Export ExportAutoReplacements ExportPacket ExportString Expression ExpressionCell ExpressionPacket ExpToTrig ExtendedGCD Extension ExtentElementFunction ExtentMarkers ExtentSize ExternalCall ExternalDataCharacterEncoding Extract ExtractArchive ExtremeValueDistribution ' +\n      'FaceForm FaceGrids FaceGridsStyle Factor FactorComplete Factorial Factorial2 FactorialMoment FactorialMomentGeneratingFunction FactorialPower FactorInteger FactorList FactorSquareFree FactorSquareFreeList FactorTerms FactorTermsList Fail FailureDistribution False FARIMAProcess FEDisableConsolePrintPacket FeedbackSector FeedbackSectorStyle FeedbackType FEEnableConsolePrintPacket Fibonacci FieldHint FieldHintStyle FieldMasked FieldSize File FileBaseName FileByteCount FileDate FileExistsQ FileExtension FileFormat FileHash FileInformation FileName FileNameDepth FileNameDialogSettings FileNameDrop FileNameJoin FileNames FileNameSetter FileNameSplit FileNameTake FilePrint FileType FilledCurve FilledCurveBox Filling FillingStyle FillingTransform FilterRules FinancialBond FinancialData FinancialDerivative FinancialIndicator Find FindArgMax FindArgMin FindClique FindClusters FindCurvePath FindDistributionParameters FindDivisions FindEdgeCover FindEdgeCut FindEulerianCycle FindFaces FindFile FindFit FindGeneratingFunction FindGeoLocation FindGeometricTransform FindGraphCommunities FindGraphIsomorphism FindGraphPartition FindHamiltonianCycle FindIndependentEdgeSet FindIndependentVertexSet FindInstance FindIntegerNullVector FindKClan FindKClique FindKClub FindKPlex FindLibrary FindLinearRecurrence FindList FindMaximum FindMaximumFlow FindMaxValue FindMinimum FindMinimumCostFlow FindMinimumCut FindMinValue FindPermutation FindPostmanTour FindProcessParameters FindRoot FindSequenceFunction FindSettings FindShortestPath FindShortestTour FindThreshold FindVertexCover FindVertexCut Fine FinishDynamic FiniteAbelianGroupCount FiniteGroupCount FiniteGroupData First FirstPassageTimeDistribution FischerGroupFi22 FischerGroupFi23 FischerGroupFi24Prime FisherHypergeometricDistribution FisherRatioTest FisherZDistribution Fit FitAll FittedModel FixedPoint FixedPointList FlashSelection Flat Flatten FlattenAt FlatTopWindow FlipView Floor FlushPrintOutputPacket Fold FoldList Font FontColor FontFamily FontForm FontName FontOpacity FontPostScriptName FontProperties FontReencoding FontSize FontSlant FontSubstitutions FontTracking FontVariations FontWeight For ForAll Format FormatRules FormatType FormatTypeAutoConvert FormatValues FormBox FormBoxOptions FortranForm Forward ForwardBackward Fourier FourierCoefficient FourierCosCoefficient FourierCosSeries FourierCosTransform FourierDCT FourierDCTFilter FourierDCTMatrix FourierDST FourierDSTMatrix FourierMatrix FourierParameters FourierSequenceTransform FourierSeries FourierSinCoefficient FourierSinSeries FourierSinTransform FourierTransform FourierTrigSeries FractionalBrownianMotionProcess FractionalPart FractionBox FractionBoxOptions FractionLine Frame FrameBox FrameBoxOptions Framed FrameInset FrameLabel Frameless FrameMargins FrameStyle FrameTicks FrameTicksStyle FRatioDistribution FrechetDistribution FreeQ FrequencySamplingFilterKernel FresnelC FresnelS Friday FrobeniusNumber FrobeniusSolve ' +\n      'FromCharacterCode FromCoefficientRules FromContinuedFraction FromDate FromDigits FromDMS Front FrontEndDynamicExpression FrontEndEventActions FrontEndExecute FrontEndObject FrontEndResource FrontEndResourceString FrontEndStackSize FrontEndToken FrontEndTokenExecute FrontEndValueCache FrontEndVersion FrontFaceColor FrontFaceOpacity Full FullAxes FullDefinition FullForm FullGraphics FullOptions FullSimplify Function FunctionExpand FunctionInterpolation FunctionSpace FussellVeselyImportance ' +\n      'GaborFilter GaborMatrix GaborWavelet GainMargins GainPhaseMargins Gamma GammaDistribution GammaRegularized GapPenalty Gather GatherBy GaugeFaceElementFunction GaugeFaceStyle GaugeFrameElementFunction GaugeFrameSize GaugeFrameStyle GaugeLabels GaugeMarkers GaugeStyle GaussianFilter GaussianIntegers GaussianMatrix GaussianWindow GCD GegenbauerC General GeneralizedLinearModelFit GenerateConditions GeneratedCell GeneratedParameters GeneratingFunction Generic GenericCylindricalDecomposition GenomeData GenomeLookup GeodesicClosing GeodesicDilation GeodesicErosion GeodesicOpening GeoDestination GeodesyData GeoDirection GeoDistance GeoGridPosition GeometricBrownianMotionProcess GeometricDistribution GeometricMean GeometricMeanFilter GeometricTransformation GeometricTransformation3DBox GeometricTransformation3DBoxOptions GeometricTransformationBox GeometricTransformationBoxOptions GeoPosition GeoPositionENU GeoPositionXYZ GeoProjectionData GestureHandler GestureHandlerTag Get GetBoundingBoxSizePacket GetContext GetEnvironment GetFileName GetFrontEndOptionsDataPacket GetLinebreakInformationPacket GetMenusPacket GetPageBreakInformationPacket Glaisher GlobalClusteringCoefficient GlobalPreferences GlobalSession Glow GoldenRatio GompertzMakehamDistribution GoodmanKruskalGamma GoodmanKruskalGammaTest Goto Grad Gradient GradientFilter GradientOrientationFilter Graph GraphAssortativity GraphCenter GraphComplement GraphData GraphDensity GraphDiameter GraphDifference GraphDisjointUnion ' +\n      'GraphDistance GraphDistanceMatrix GraphElementData GraphEmbedding GraphHighlight GraphHighlightStyle GraphHub Graphics Graphics3D Graphics3DBox Graphics3DBoxOptions GraphicsArray GraphicsBaseline GraphicsBox GraphicsBoxOptions GraphicsColor GraphicsColumn GraphicsComplex GraphicsComplex3DBox GraphicsComplex3DBoxOptions GraphicsComplexBox GraphicsComplexBoxOptions GraphicsContents GraphicsData GraphicsGrid GraphicsGridBox GraphicsGroup GraphicsGroup3DBox GraphicsGroup3DBoxOptions GraphicsGroupBox GraphicsGroupBoxOptions GraphicsGrouping GraphicsHighlightColor GraphicsRow GraphicsSpacing GraphicsStyle GraphIntersection GraphLayout GraphLinkEfficiency GraphPeriphery GraphPlot GraphPlot3D GraphPower GraphPropertyDistribution GraphQ GraphRadius GraphReciprocity GraphRoot GraphStyle GraphUnion Gray GrayLevel GreatCircleDistance Greater GreaterEqual GreaterEqualLess GreaterFullEqual GreaterGreater GreaterLess GreaterSlantEqual GreaterTilde Green Grid GridBaseline GridBox GridBoxAlignment GridBoxBackground GridBoxDividers GridBoxFrame GridBoxItemSize GridBoxItemStyle GridBoxOptions GridBoxSpacings GridCreationSettings GridDefaultElement GridElementStyleOptions GridFrame GridFrameMargins GridGraph GridLines GridLinesStyle GroebnerBasis GroupActionBase GroupCentralizer GroupElementFromWord GroupElementPosition GroupElementQ GroupElements GroupElementToWord GroupGenerators GroupMultiplicationTable GroupOrbits GroupOrder GroupPageBreakWithin GroupSetwiseStabilizer GroupStabilizer GroupStabilizerChain Gudermannian GumbelDistribution ' +\n      'HaarWavelet HadamardMatrix HalfNormalDistribution HamiltonianGraphQ HammingDistance HammingWindow HankelH1 HankelH2 HankelMatrix HannPoissonWindow HannWindow HaradaNortonGroupHN HararyGraph HarmonicMean HarmonicMeanFilter HarmonicNumber Hash HashTable Haversine HazardFunction Head HeadCompose Heads HeavisideLambda HeavisidePi HeavisideTheta HeldGroupHe HeldPart HelpBrowserLookup HelpBrowserNotebook HelpBrowserSettings HermiteDecomposition HermiteH HermitianMatrixQ HessenbergDecomposition Hessian HexadecimalCharacter Hexahedron HexahedronBox HexahedronBoxOptions HiddenSurface HighlightGraph HighlightImage HighpassFilter HigmanSimsGroupHS HilbertFilter HilbertMatrix Histogram Histogram3D HistogramDistribution HistogramList HistogramTransform HistogramTransformInterpolation HitMissTransform HITSCentrality HodgeDual HoeffdingD HoeffdingDTest Hold HoldAll HoldAllComplete HoldComplete HoldFirst HoldForm HoldPattern HoldRest HolidayCalendar HomeDirectory HomePage Horizontal HorizontalForm HorizontalGauge HorizontalScrollPosition HornerForm HotellingTSquareDistribution HoytDistribution HTMLSave Hue HumpDownHump HumpEqual HurwitzLerchPhi HurwitzZeta HyperbolicDistribution HypercubeGraph HyperexponentialDistribution Hyperfactorial Hypergeometric0F1 Hypergeometric0F1Regularized Hypergeometric1F1 Hypergeometric1F1Regularized Hypergeometric2F1 Hypergeometric2F1Regularized HypergeometricDistribution HypergeometricPFQ HypergeometricPFQRegularized HypergeometricU Hyperlink HyperlinkCreationSettings Hyphenation HyphenationOptions HypoexponentialDistribution HypothesisTestData ' +\n      'I Identity IdentityMatrix If IgnoreCase Im Image Image3D Image3DSlices ImageAccumulate ImageAdd ImageAdjust ImageAlign ImageApply ImageAspectRatio ImageAssemble ImageCache ImageCacheValid ImageCapture ImageChannels ImageClip ImageColorSpace ImageCompose ImageConvolve ImageCooccurrence ImageCorners ImageCorrelate ImageCorrespondingPoints ImageCrop ImageData ImageDataPacket ImageDeconvolve ImageDemosaic ImageDifference ImageDimensions ImageDistance ImageEffect ImageFeatureTrack ImageFileApply ImageFileFilter ImageFileScan ImageFilter ImageForestingComponents ImageForwardTransformation ImageHistogram ImageKeypoints ImageLevels ImageLines ImageMargins ImageMarkers ImageMeasurements ImageMultiply ImageOffset ImagePad ImagePadding ImagePartition ImagePeriodogram ImagePerspectiveTransformation ImageQ ImageRangeCache ImageReflect ImageRegion ImageResize ImageResolution ImageRotate ImageRotated ImageScaled ImageScan ImageSize ImageSizeAction ImageSizeCache ImageSizeMultipliers ImageSizeRaw ImageSubtract ImageTake ImageTransformation ImageTrim ImageType ImageValue ImageValuePositions Implies Import ImportAutoReplacements ImportString ImprovementImportance In IncidenceGraph IncidenceList IncidenceMatrix IncludeConstantBasis IncludeFileExtension IncludePods IncludeSingularTerm Increment Indent IndentingNewlineSpacings IndentMaxFraction IndependenceTest IndependentEdgeSetQ IndependentUnit IndependentVertexSetQ Indeterminate IndexCreationOptions Indexed IndexGraph IndexTag Inequality InexactNumberQ InexactNumbers Infinity Infix Information Inherited InheritScope Initialization InitializationCell InitializationCellEvaluation InitializationCellWarning InlineCounterAssignments InlineCounterIncrements InlineRules Inner Inpaint Input InputAliases InputAssumptions InputAutoReplacements InputField InputFieldBox InputFieldBoxOptions InputForm InputGrouping InputNamePacket InputNotebook InputPacket InputSettings InputStream InputString InputStringPacket InputToBoxFormPacket Insert InsertionPointObject InsertResults Inset Inset3DBox Inset3DBoxOptions InsetBox InsetBoxOptions Install InstallService InString Integer IntegerDigits IntegerExponent IntegerLength IntegerPart IntegerPartitions IntegerQ Integers IntegerString Integral Integrate Interactive InteractiveTradingChart Interlaced Interleaving InternallyBalancedDecomposition InterpolatingFunction InterpolatingPolynomial Interpolation InterpolationOrder InterpolationPoints InterpolationPrecision Interpretation InterpretationBox InterpretationBoxOptions InterpretationFunction ' +\n      'InterpretTemplate InterquartileRange Interrupt InterruptSettings Intersection Interval IntervalIntersection IntervalMemberQ IntervalUnion Inverse InverseBetaRegularized InverseCDF InverseChiSquareDistribution InverseContinuousWaveletTransform InverseDistanceTransform InverseEllipticNomeQ InverseErf InverseErfc InverseFourier InverseFourierCosTransform InverseFourierSequenceTransform InverseFourierSinTransform InverseFourierTransform InverseFunction InverseFunctions InverseGammaDistribution InverseGammaRegularized InverseGaussianDistribution InverseGudermannian InverseHaversine InverseJacobiCD InverseJacobiCN InverseJacobiCS InverseJacobiDC InverseJacobiDN InverseJacobiDS InverseJacobiNC InverseJacobiND InverseJacobiNS InverseJacobiSC InverseJacobiSD InverseJacobiSN InverseLaplaceTransform InversePermutation InverseRadon InverseSeries InverseSurvivalFunction InverseWaveletTransform InverseWeierstrassP InverseZTransform Invisible InvisibleApplication InvisibleTimes IrreduciblePolynomialQ IsolatingInterval IsomorphicGraphQ IsotopeData Italic Item ItemBox ItemBoxOptions ItemSize ItemStyle ItoProcess ' +\n      'JaccardDissimilarity JacobiAmplitude Jacobian JacobiCD JacobiCN JacobiCS JacobiDC JacobiDN JacobiDS JacobiNC JacobiND JacobiNS JacobiP JacobiSC JacobiSD JacobiSN JacobiSymbol JacobiZeta JankoGroupJ1 JankoGroupJ2 JankoGroupJ3 JankoGroupJ4 JarqueBeraALMTest JohnsonDistribution Join Joined JoinedCurve JoinedCurveBox JoinForm JordanDecomposition JordanModelDecomposition ' +\n      'K KagiChart KaiserBesselWindow KaiserWindow KalmanEstimator KalmanFilter KarhunenLoeveDecomposition KaryTree KatzCentrality KCoreComponents KDistribution KelvinBei KelvinBer KelvinKei KelvinKer KendallTau KendallTauTest KernelExecute KernelMixtureDistribution KernelObject Kernels Ket Khinchin KirchhoffGraph KirchhoffMatrix KleinInvariantJ KnightTourGraph KnotData KnownUnitQ KolmogorovSmirnovTest KroneckerDelta KroneckerModelDecomposition KroneckerProduct KroneckerSymbol KuiperTest KumaraswamyDistribution Kurtosis KuwaharaFilter ' +\n      'Label Labeled LabeledSlider LabelingFunction LabelStyle LaguerreL LambdaComponents LambertW LanczosWindow LandauDistribution Language LanguageCategory LaplaceDistribution LaplaceTransform Laplacian LaplacianFilter LaplacianGaussianFilter Large Larger Last Latitude LatitudeLongitude LatticeData LatticeReduce Launch LaunchKernels LayeredGraphPlot LayerSizeFunction LayoutInformation LCM LeafCount LeapYearQ LeastSquares LeastSquaresFilterKernel Left LeftArrow LeftArrowBar LeftArrowRightArrow LeftDownTeeVector LeftDownVector LeftDownVectorBar LeftRightArrow LeftRightVector LeftTee LeftTeeArrow LeftTeeVector LeftTriangle LeftTriangleBar LeftTriangleEqual LeftUpDownVector LeftUpTeeVector LeftUpVector LeftUpVectorBar LeftVector LeftVectorBar LegendAppearance Legended LegendFunction LegendLabel LegendLayout LegendMargins LegendMarkers LegendMarkerSize LegendreP LegendreQ LegendreType Length LengthWhile LerchPhi Less LessEqual LessEqualGreater LessFullEqual LessGreater LessLess LessSlantEqual LessTilde LetterCharacter LetterQ Level LeveneTest LeviCivitaTensor LevyDistribution Lexicographic LibraryFunction LibraryFunctionError LibraryFunctionInformation LibraryFunctionLoad LibraryFunctionUnload LibraryLoad LibraryUnload LicenseID LiftingFilterData LiftingWaveletTransform LightBlue LightBrown LightCyan Lighter LightGray LightGreen Lighting LightingAngle LightMagenta LightOrange LightPink LightPurple LightRed LightSources LightYellow Likelihood Limit LimitsPositioning LimitsPositioningTokens LindleyDistribution Line Line3DBox LinearFilter LinearFractionalTransform LinearModelFit LinearOffsetFunction LinearProgramming LinearRecurrence LinearSolve LinearSolveFunction LineBox LineBreak LinebreakAdjustments LineBreakChart LineBreakWithin LineColor LineForm LineGraph LineIndent LineIndentMaxFraction LineIntegralConvolutionPlot LineIntegralConvolutionScale LineLegend LineOpacity LineSpacing LineWrapParts LinkActivate LinkClose LinkConnect LinkConnectedQ LinkCreate LinkError LinkFlush LinkFunction LinkHost LinkInterrupt LinkLaunch LinkMode LinkObject LinkOpen LinkOptions LinkPatterns LinkProtocol LinkRead LinkReadHeld LinkReadyQ Links LinkWrite LinkWriteHeld LiouvilleLambda List Listable ListAnimate ListContourPlot ListContourPlot3D ListConvolve ListCorrelate ListCurvePathPlot ListDeconvolve ListDensityPlot Listen ListFourierSequenceTransform ListInterpolation ListLineIntegralConvolutionPlot ListLinePlot ListLogLinearPlot ListLogLogPlot ListLogPlot ListPicker ListPickerBox ListPickerBoxBackground ListPickerBoxOptions ListPlay ListPlot ListPlot3D ListPointPlot3D ListPolarPlot ListQ ListStreamDensityPlot ListStreamPlot ListSurfacePlot3D ListVectorDensityPlot ListVectorPlot ListVectorPlot3D ListZTransform Literal LiteralSearch LocalClusteringCoefficient LocalizeVariables LocationEquivalenceTest LocationTest Locator LocatorAutoCreate LocatorBox LocatorBoxOptions LocatorCentering LocatorPane LocatorPaneBox LocatorPaneBoxOptions ' +\n      'LocatorRegion Locked Log Log10 Log2 LogBarnesG LogGamma LogGammaDistribution LogicalExpand LogIntegral LogisticDistribution LogitModelFit LogLikelihood LogLinearPlot LogLogisticDistribution LogLogPlot LogMultinormalDistribution LogNormalDistribution LogPlot LogRankTest LogSeriesDistribution LongEqual Longest LongestAscendingSequence LongestCommonSequence LongestCommonSequencePositions LongestCommonSubsequence LongestCommonSubsequencePositions LongestMatch LongForm Longitude LongLeftArrow LongLeftRightArrow LongRightArrow Loopback LoopFreeGraphQ LowerCaseQ LowerLeftArrow LowerRightArrow LowerTriangularize LowpassFilter LQEstimatorGains LQGRegulator LQOutputRegulatorGains LQRegulatorGains LUBackSubstitution LucasL LuccioSamiComponents LUDecomposition LyapunovSolve LyonsGroupLy ' +\n      'MachineID MachineName MachineNumberQ MachinePrecision MacintoshSystemPageSetup Magenta Magnification Magnify MainSolve MaintainDynamicCaches Majority MakeBoxes MakeExpression MakeRules MangoldtLambda ManhattanDistance Manipulate Manipulator MannWhitneyTest MantissaExponent Manual Map MapAll MapAt MapIndexed MAProcess MapThread MarcumQ MardiaCombinedTest MardiaKurtosisTest MardiaSkewnessTest MarginalDistribution MarkovProcessProperties Masking MatchingDissimilarity MatchLocalNameQ MatchLocalNames MatchQ Material MathematicaNotation MathieuC MathieuCharacteristicA MathieuCharacteristicB MathieuCharacteristicExponent MathieuCPrime MathieuGroupM11 MathieuGroupM12 MathieuGroupM22 MathieuGroupM23 MathieuGroupM24 MathieuS MathieuSPrime MathMLForm MathMLText Matrices MatrixExp MatrixForm MatrixFunction MatrixLog MatrixPlot MatrixPower MatrixQ MatrixRank Max MaxBend MaxDetect MaxExtraBandwidths MaxExtraConditions MaxFeatures MaxFilter Maximize MaxIterations MaxMemoryUsed MaxMixtureKernels MaxPlotPoints MaxPoints MaxRecursion MaxStableDistribution MaxStepFraction MaxSteps MaxStepSize MaxValue MaxwellDistribution McLaughlinGroupMcL Mean MeanClusteringCoefficient MeanDegreeConnectivity MeanDeviation MeanFilter MeanGraphDistance MeanNeighborDegree MeanShift MeanShiftFilter Median MedianDeviation MedianFilter Medium MeijerG MeixnerDistribution MemberQ MemoryConstrained MemoryInUse Menu MenuAppearance MenuCommandKey MenuEvaluator MenuItem MenuPacket MenuSortingValue MenuStyle MenuView MergeDifferences Mesh MeshFunctions MeshRange MeshShading MeshStyle Message MessageDialog MessageList MessageName MessageOptions MessagePacket Messages MessagesNotebook MetaCharacters MetaInformation Method MethodOptions MexicanHatWavelet MeyerWavelet Min MinDetect MinFilter MinimalPolynomial MinimalStateSpaceModel Minimize Minors MinRecursion MinSize MinStableDistribution Minus MinusPlus MinValue Missing MissingDataMethod MittagLefflerE MixedRadix MixedRadixQuantity MixtureDistribution Mod Modal Mode Modular ModularLambda Module Modulus MoebiusMu Moment Momentary MomentConvert MomentEvaluate MomentGeneratingFunction Monday Monitor MonomialList MonomialOrder MonsterGroupM MorletWavelet MorphologicalBinarize MorphologicalBranchPoints MorphologicalComponents MorphologicalEulerNumber MorphologicalGraph MorphologicalPerimeter MorphologicalTransform Most MouseAnnotation MouseAppearance MouseAppearanceTag MouseButtons Mouseover MousePointerNote MousePosition MovingAverage MovingMedian MoyalDistribution MultiedgeStyle MultilaunchWarning MultiLetterItalics MultiLetterStyle MultilineFunction Multinomial MultinomialDistribution MultinormalDistribution MultiplicativeOrder Multiplicity Multiselection MultivariateHypergeometricDistribution MultivariatePoissonDistribution MultivariateTDistribution ' +\n      'N NakagamiDistribution NameQ Names NamespaceBox Nand NArgMax NArgMin NBernoulliB NCache NDSolve NDSolveValue Nearest NearestFunction NeedCurrentFrontEndPackagePacket NeedCurrentFrontEndSymbolsPacket NeedlemanWunschSimilarity Needs Negative NegativeBinomialDistribution NegativeMultinomialDistribution NeighborhoodGraph Nest NestedGreaterGreater NestedLessLess NestedScriptRules NestList NestWhile NestWhileList NevilleThetaC NevilleThetaD NevilleThetaN NevilleThetaS NewPrimitiveStyle NExpectation Next NextPrime NHoldAll NHoldFirst NHoldRest NicholsGridLines NicholsPlot NIntegrate NMaximize NMaxValue NMinimize NMinValue NominalVariables NonAssociative NoncentralBetaDistribution NoncentralChiSquareDistribution NoncentralFRatioDistribution NoncentralStudentTDistribution NonCommutativeMultiply NonConstants None NonlinearModelFit NonlocalMeansFilter NonNegative NonPositive Nor NorlundB Norm Normal NormalDistribution NormalGrouping Normalize NormalizedSquaredEuclideanDistance NormalsFunction NormFunction Not NotCongruent NotCupCap NotDoubleVerticalBar Notebook NotebookApply NotebookAutoSave NotebookClose NotebookConvertSettings NotebookCreate NotebookCreateReturnObject NotebookDefault NotebookDelete NotebookDirectory NotebookDynamicExpression NotebookEvaluate NotebookEventActions NotebookFileName NotebookFind NotebookFindReturnObject NotebookGet NotebookGetLayoutInformationPacket NotebookGetMisspellingsPacket NotebookInformation NotebookInterfaceObject NotebookLocate NotebookObject NotebookOpen NotebookOpenReturnObject NotebookPath NotebookPrint NotebookPut NotebookPutReturnObject NotebookRead NotebookResetGeneratedCells Notebooks NotebookSave NotebookSaveAs NotebookSelection NotebookSetupLayoutInformationPacket NotebooksMenu NotebookWrite NotElement NotEqualTilde NotExists NotGreater NotGreaterEqual NotGreaterFullEqual NotGreaterGreater NotGreaterLess NotGreaterSlantEqual NotGreaterTilde NotHumpDownHump NotHumpEqual NotLeftTriangle NotLeftTriangleBar NotLeftTriangleEqual NotLess NotLessEqual NotLessFullEqual NotLessGreater NotLessLess NotLessSlantEqual NotLessTilde NotNestedGreaterGreater NotNestedLessLess NotPrecedes NotPrecedesEqual NotPrecedesSlantEqual NotPrecedesTilde NotReverseElement NotRightTriangle NotRightTriangleBar NotRightTriangleEqual NotSquareSubset NotSquareSubsetEqual NotSquareSuperset NotSquareSupersetEqual NotSubset NotSubsetEqual NotSucceeds NotSucceedsEqual NotSucceedsSlantEqual NotSucceedsTilde NotSuperset NotSupersetEqual NotTilde NotTildeEqual NotTildeFullEqual NotTildeTilde NotVerticalBar NProbability NProduct NProductFactors NRoots NSolve NSum NSumTerms Null NullRecords NullSpace NullWords Number NumberFieldClassNumber NumberFieldDiscriminant NumberFieldFundamentalUnits NumberFieldIntegralBasis NumberFieldNormRepresentatives NumberFieldRegulator NumberFieldRootsOfUnity NumberFieldSignature NumberForm NumberFormat NumberMarks NumberMultiplier NumberPadding NumberPoint NumberQ NumberSeparator ' +\n      'NumberSigns NumberString Numerator NumericFunction NumericQ NuttallWindow NValues NyquistGridLines NyquistPlot ' +\n      'O ObservabilityGramian ObservabilityMatrix ObservableDecomposition ObservableModelQ OddQ Off Offset OLEData On ONanGroupON OneIdentity Opacity Open OpenAppend Opener OpenerBox OpenerBoxOptions OpenerView OpenFunctionInspectorPacket Opening OpenRead OpenSpecialOptions OpenTemporary OpenWrite Operate OperatingSystem OptimumFlowData Optional OptionInspectorSettings OptionQ Options OptionsPacket OptionsPattern OptionValue OptionValueBox OptionValueBoxOptions Or Orange Order OrderDistribution OrderedQ Ordering Orderless OrnsteinUhlenbeckProcess Orthogonalize Out Outer OutputAutoOverwrite OutputControllabilityMatrix OutputControllableModelQ OutputForm OutputFormData OutputGrouping OutputMathEditExpression OutputNamePacket OutputResponse OutputSizeLimit OutputStream Over OverBar OverDot Overflow OverHat Overlaps Overlay OverlayBox OverlayBoxOptions Overscript OverscriptBox OverscriptBoxOptions OverTilde OverVector OwenT OwnValues ' +\n      'PackingMethod PaddedForm Padding PadeApproximant PadLeft PadRight PageBreakAbove PageBreakBelow PageBreakWithin PageFooterLines PageFooters PageHeaderLines PageHeaders PageHeight PageRankCentrality PageWidth PairedBarChart PairedHistogram PairedSmoothHistogram PairedTTest PairedZTest PaletteNotebook PalettePath Pane PaneBox PaneBoxOptions Panel PanelBox PanelBoxOptions Paneled PaneSelector PaneSelectorBox PaneSelectorBoxOptions PaperWidth ParabolicCylinderD ParagraphIndent ParagraphSpacing ParallelArray ParallelCombine ParallelDo ParallelEvaluate Parallelization Parallelize ParallelMap ParallelNeeds ParallelProduct ParallelSubmit ParallelSum ParallelTable ParallelTry Parameter ParameterEstimator ParameterMixtureDistribution ParameterVariables ParametricFunction ParametricNDSolve ParametricNDSolveValue ParametricPlot ParametricPlot3D ParentConnect ParentDirectory ParentForm Parenthesize ParentList ParetoDistribution Part PartialCorrelationFunction PartialD ParticleData Partition PartitionsP PartitionsQ ParzenWindow PascalDistribution PassEventsDown PassEventsUp Paste PasteBoxFormInlineCells PasteButton Path PathGraph PathGraphQ Pattern PatternSequence PatternTest PauliMatrix PaulWavelet Pause PausedTime PDF PearsonChiSquareTest PearsonCorrelationTest PearsonDistribution PerformanceGoal PeriodicInterpolation Periodogram PeriodogramArray PermutationCycles PermutationCyclesQ PermutationGroup PermutationLength PermutationList PermutationListQ PermutationMax PermutationMin PermutationOrder PermutationPower PermutationProduct PermutationReplace Permutations PermutationSupport Permute PeronaMalikFilter Perpendicular PERTDistribution PetersenGraph PhaseMargins Pi Pick PIDData PIDDerivativeFilter PIDFeedforward PIDTune Piecewise PiecewiseExpand PieChart PieChart3D PillaiTrace PillaiTraceTest Pink Pivoting PixelConstrained PixelValue PixelValuePositions Placed Placeholder PlaceholderReplace Plain PlanarGraphQ Play PlayRange Plot Plot3D Plot3Matrix PlotDivision PlotJoined PlotLabel PlotLayout PlotLegends PlotMarkers PlotPoints PlotRange PlotRangeClipping PlotRangePadding PlotRegion PlotStyle Plus PlusMinus Pochhammer PodStates PodWidth Point Point3DBox PointBox PointFigureChart PointForm PointLegend PointSize PoissonConsulDistribution PoissonDistribution PoissonProcess PoissonWindow PolarAxes PolarAxesOrigin PolarGridLines PolarPlot PolarTicks PoleZeroMarkers PolyaAeppliDistribution PolyGamma Polygon Polygon3DBox Polygon3DBoxOptions PolygonBox PolygonBoxOptions PolygonHoleScale PolygonIntersections PolygonScale PolyhedronData PolyLog PolynomialExtendedGCD PolynomialForm PolynomialGCD PolynomialLCM PolynomialMod PolynomialQ PolynomialQuotient PolynomialQuotientRemainder PolynomialReduce PolynomialRemainder Polynomials PopupMenu PopupMenuBox PopupMenuBoxOptions PopupView PopupWindow Position Positive PositiveDefiniteMatrixQ PossibleZeroQ Postfix PostScript Power PowerDistribution PowerExpand PowerMod PowerModList ' +\n      'PowerSpectralDensity PowersRepresentations PowerSymmetricPolynomial Precedence PrecedenceForm Precedes PrecedesEqual PrecedesSlantEqual PrecedesTilde Precision PrecisionGoal PreDecrement PredictionRoot PreemptProtect PreferencesPath Prefix PreIncrement Prepend PrependTo PreserveImageOptions Previous PriceGraphDistribution PrimaryPlaceholder Prime PrimeNu PrimeOmega PrimePi PrimePowerQ PrimeQ Primes PrimeZetaP PrimitiveRoot PrincipalComponents PrincipalValue Print PrintAction PrintForm PrintingCopies PrintingOptions PrintingPageRange PrintingStartingPageNumber PrintingStyleEnvironment PrintPrecision PrintTemporary Prism PrismBox PrismBoxOptions PrivateCellOptions PrivateEvaluationOptions PrivateFontOptions PrivateFrontEndOptions PrivateNotebookOptions PrivatePaths Probability ProbabilityDistribution ProbabilityPlot ProbabilityPr ProbabilityScalePlot ProbitModelFit ProcessEstimator ProcessParameterAssumptions ProcessParameterQ ProcessStateDomain ProcessTimeDomain Product ProductDistribution ProductLog ProgressIndicator ProgressIndicatorBox ProgressIndicatorBoxOptions Projection Prolog PromptForm Properties Property PropertyList PropertyValue Proportion Proportional Protect Protected ProteinData Pruning PseudoInverse Purple Put PutAppend Pyramid PyramidBox PyramidBoxOptions ' +\n      'QBinomial QFactorial QGamma QHypergeometricPFQ QPochhammer QPolyGamma QRDecomposition QuadraticIrrationalQ Quantile QuantilePlot Quantity QuantityForm QuantityMagnitude QuantityQ QuantityUnit Quartics QuartileDeviation Quartiles QuartileSkewness QueueingNetworkProcess QueueingProcess QueueProperties Quiet Quit Quotient QuotientRemainder ' +\n      'RadialityCentrality RadicalBox RadicalBoxOptions RadioButton RadioButtonBar RadioButtonBox RadioButtonBoxOptions Radon RamanujanTau RamanujanTauL RamanujanTauTheta RamanujanTauZ Random RandomChoice RandomComplex RandomFunction RandomGraph RandomImage RandomInteger RandomPermutation RandomPrime RandomReal RandomSample RandomSeed RandomVariate RandomWalkProcess Range RangeFilter RangeSpecification RankedMax RankedMin Raster Raster3D Raster3DBox Raster3DBoxOptions RasterArray RasterBox RasterBoxOptions Rasterize RasterSize Rational RationalFunctions Rationalize Rationals Ratios Raw RawArray RawBoxes RawData RawMedium RayleighDistribution Re Read ReadList ReadProtected Real RealBlockDiagonalForm RealDigits RealExponent Reals Reap Record RecordLists RecordSeparators Rectangle RectangleBox RectangleBoxOptions RectangleChart RectangleChart3D RecurrenceFilter RecurrenceTable RecurringDigitsForm Red Reduce RefBox ReferenceLineStyle ReferenceMarkers ReferenceMarkerStyle Refine ReflectionMatrix ReflectionTransform Refresh RefreshRate RegionBinarize RegionFunction RegionPlot RegionPlot3D RegularExpression Regularization Reinstall Release ReleaseHold ReliabilityDistribution ReliefImage ReliefPlot Remove RemoveAlphaChannel RemoveAsynchronousTask Removed RemoveInputStreamMethod RemoveOutputStreamMethod RemoveProperty RemoveScheduledTask RenameDirectory RenameFile RenderAll RenderingOptions RenewalProcess RenkoChart Repeated RepeatedNull RepeatedString Replace ReplaceAll ReplaceHeldPart ReplaceImageValue ReplaceList ReplacePart ReplacePixelValue ReplaceRepeated Resampling Rescale RescalingTransform ResetDirectory ResetMenusPacket ResetScheduledTask Residue Resolve Rest Resultant ResumePacket Return ReturnExpressionPacket ReturnInputFormPacket ReturnPacket ReturnTextPacket Reverse ReverseBiorthogonalSplineWavelet ReverseElement ReverseEquilibrium ReverseGraph ReverseUpEquilibrium RevolutionAxis RevolutionPlot3D RGBColor RiccatiSolve RiceDistribution RidgeFilter RiemannR RiemannSiegelTheta RiemannSiegelZ Riffle Right RightArrow RightArrowBar RightArrowLeftArrow RightCosetRepresentative RightDownTeeVector RightDownVector RightDownVectorBar RightTee RightTeeArrow RightTeeVector RightTriangle RightTriangleBar RightTriangleEqual RightUpDownVector RightUpTeeVector RightUpVector RightUpVectorBar RightVector RightVectorBar RiskAchievementImportance RiskReductionImportance RogersTanimotoDissimilarity Root RootApproximant RootIntervals RootLocusPlot RootMeanSquare RootOfUnityQ RootReduce Roots RootSum Rotate RotateLabel RotateLeft RotateRight RotationAction RotationBox RotationBoxOptions RotationMatrix RotationTransform Round RoundImplies RoundingRadius Row RowAlignments RowBackgrounds RowBox RowHeights RowLines RowMinHeight RowReduce RowsEqual RowSpacings RSolve RudvalisGroupRu Rule RuleCondition RuleDelayed RuleForm RulerUnits Run RunScheduledTask RunThrough RuntimeAttributes RuntimeOptions RussellRaoDissimilarity ' +\n      'SameQ SameTest SampleDepth SampledSoundFunction SampledSoundList SampleRate SamplingPeriod SARIMAProcess SARMAProcess SatisfiabilityCount SatisfiabilityInstances SatisfiableQ Saturday Save Saveable SaveAutoDelete SaveDefinitions SawtoothWave Scale Scaled ScaleDivisions ScaledMousePosition ScaleOrigin ScalePadding ScaleRanges ScaleRangeStyle ScalingFunctions ScalingMatrix ScalingTransform Scan ScheduledTaskActiveQ ScheduledTaskData ScheduledTaskObject ScheduledTasks SchurDecomposition ScientificForm ScreenRectangle ScreenStyleEnvironment ScriptBaselineShifts ScriptLevel ScriptMinSize ScriptRules ScriptSizeMultipliers Scrollbars ScrollingOptions ScrollPosition Sec Sech SechDistribution SectionGrouping SectorChart SectorChart3D SectorOrigin SectorSpacing SeedRandom Select Selectable SelectComponents SelectedCells SelectedNotebook Selection SelectionAnimate SelectionCell SelectionCellCreateCell SelectionCellDefaultStyle SelectionCellParentStyle SelectionCreateCell SelectionDebuggerTag SelectionDuplicateCell SelectionEvaluate SelectionEvaluateCreateCell SelectionMove SelectionPlaceholder SelectionSetStyle SelectWithContents SelfLoops SelfLoopStyle SemialgebraicComponentInstances SendMail Sequence SequenceAlignment SequenceForm SequenceHold SequenceLimit Series SeriesCoefficient SeriesData SessionTime Set SetAccuracy SetAlphaChannel SetAttributes Setbacks SetBoxFormNamesPacket SetDelayed SetDirectory SetEnvironment SetEvaluationNotebook SetFileDate SetFileLoadingContext SetNotebookStatusLine SetOptions SetOptionsPacket SetPrecision SetProperty SetSelectedNotebook SetSharedFunction SetSharedVariable SetSpeechParametersPacket SetStreamPosition SetSystemOptions Setter SetterBar SetterBox SetterBoxOptions Setting SetValue Shading Shallow ShannonWavelet ShapiroWilkTest Share Sharpen ShearingMatrix ShearingTransform ShenCastanMatrix Short ShortDownArrow Shortest ShortestMatch ShortestPathFunction ShortLeftArrow ShortRightArrow ShortUpArrow Show ShowAutoStyles ShowCellBracket ShowCellLabel ShowCellTags ShowClosedCellArea ShowContents ShowControls ShowCursorTracker ShowGroupOpenCloseIcon ShowGroupOpener ShowInvisibleCharacters ShowPageBreaks ShowPredictiveInterface ShowSelection ShowShortBoxForm ShowSpecialCharacters ShowStringCharacters ShowSyntaxStyles ShrinkingDelay ShrinkWrapBoundingBox SiegelTheta SiegelTukeyTest Sign Signature SignedRankTest SignificanceLevel SignPadding SignTest SimilarityRules SimpleGraph SimpleGraphQ Simplify Sin Sinc SinghMaddalaDistribution SingleEvaluation SingleLetterItalics SingleLetterStyle SingularValueDecomposition SingularValueList SingularValuePlot SingularValues Sinh SinhIntegral SinIntegral SixJSymbol Skeleton SkeletonTransform SkellamDistribution Skewness SkewNormalDistribution Skip SliceDistribution Slider Slider2D Slider2DBox Slider2DBoxOptions SliderBox SliderBoxOptions SlideView Slot SlotSequence Small SmallCircle Smaller SmithDelayCompensator SmithWatermanSimilarity ' +\n      'SmoothDensityHistogram SmoothHistogram SmoothHistogram3D SmoothKernelDistribution SocialMediaData Socket SokalSneathDissimilarity Solve SolveAlways SolveDelayed Sort SortBy Sound SoundAndGraphics SoundNote SoundVolume Sow Space SpaceForm Spacer Spacings Span SpanAdjustments SpanCharacterRounding SpanFromAbove SpanFromBoth SpanFromLeft SpanLineThickness SpanMaxSize SpanMinSize SpanningCharacters SpanSymmetric SparseArray SpatialGraphDistribution Speak SpeakTextPacket SpearmanRankTest SpearmanRho Spectrogram SpectrogramArray Specularity SpellingCorrection SpellingDictionaries SpellingDictionariesPath SpellingOptions SpellingSuggestionsPacket Sphere SphereBox SphericalBesselJ SphericalBesselY SphericalHankelH1 SphericalHankelH2 SphericalHarmonicY SphericalPlot3D SphericalRegion SpheroidalEigenvalue SpheroidalJoiningFactor SpheroidalPS SpheroidalPSPrime SpheroidalQS SpheroidalQSPrime SpheroidalRadialFactor SpheroidalS1 SpheroidalS1Prime SpheroidalS2 SpheroidalS2Prime Splice SplicedDistribution SplineClosed SplineDegree SplineKnots SplineWeights Split SplitBy SpokenString Sqrt SqrtBox SqrtBoxOptions Square SquaredEuclideanDistance SquareFreeQ SquareIntersection SquaresR SquareSubset SquareSubsetEqual SquareSuperset SquareSupersetEqual SquareUnion SquareWave StabilityMargins StabilityMarginsStyle StableDistribution Stack StackBegin StackComplete StackInhibit StandardDeviation StandardDeviationFilter StandardForm Standardize StandbyDistribution Star StarGraph StartAsynchronousTask StartingStepSize StartOfLine StartOfString StartScheduledTask StartupSound StateDimensions StateFeedbackGains StateOutputEstimator StateResponse StateSpaceModel StateSpaceRealization StateSpaceTransform StationaryDistribution StationaryWaveletPacketTransform StationaryWaveletTransform StatusArea StatusCentrality StepMonitor StieltjesGamma StirlingS1 StirlingS2 StopAsynchronousTask StopScheduledTask StrataVariables StratonovichProcess StreamColorFunction StreamColorFunctionScaling StreamDensityPlot StreamPlot StreamPoints StreamPosition Streams StreamScale StreamStyle String StringBreak StringByteCount StringCases StringCount StringDrop StringExpression StringForm StringFormat StringFreeQ StringInsert StringJoin StringLength StringMatchQ StringPosition StringQ StringReplace StringReplaceList StringReplacePart StringReverse StringRotateLeft StringRotateRight StringSkeleton StringSplit StringTake StringToStream StringTrim StripBoxes StripOnInput StripWrapperBoxes StrokeForm StructuralImportance StructuredArray StructuredSelection StruveH StruveL Stub StudentTDistribution Style StyleBox StyleBoxAutoDelete StyleBoxOptions StyleData StyleDefinitions StyleForm StyleKeyMapping StyleMenuListing StyleNameDialogSettings StyleNames StylePrint StyleSheetPath Subfactorial Subgraph SubMinus SubPlus SubresultantPolynomialRemainders ' +\n      'SubresultantPolynomials Subresultants Subscript SubscriptBox SubscriptBoxOptions Subscripted Subset SubsetEqual Subsets SubStar Subsuperscript SubsuperscriptBox SubsuperscriptBoxOptions Subtract SubtractFrom SubValues Succeeds SucceedsEqual SucceedsSlantEqual SucceedsTilde SuchThat Sum SumConvergence Sunday SuperDagger SuperMinus SuperPlus Superscript SuperscriptBox SuperscriptBoxOptions Superset SupersetEqual SuperStar Surd SurdForm SurfaceColor SurfaceGraphics SurvivalDistribution SurvivalFunction SurvivalModel SurvivalModelFit SuspendPacket SuzukiDistribution SuzukiGroupSuz SwatchLegend Switch Symbol SymbolName SymletWavelet Symmetric SymmetricGroup SymmetricMatrixQ SymmetricPolynomial SymmetricReduction Symmetrize SymmetrizedArray SymmetrizedArrayRules SymmetrizedDependentComponents SymmetrizedIndependentComponents SymmetrizedReplacePart SynchronousInitialization SynchronousUpdating Syntax SyntaxForm SyntaxInformation SyntaxLength SyntaxPacket SyntaxQ SystemDialogInput SystemException SystemHelpPath SystemInformation SystemInformationData SystemOpen SystemOptions SystemsModelDelay SystemsModelDelayApproximate SystemsModelDelete SystemsModelDimensions SystemsModelExtract SystemsModelFeedbackConnect SystemsModelLabels SystemsModelOrder SystemsModelParallelConnect SystemsModelSeriesConnect SystemsModelStateFeedbackConnect SystemStub ' +\n      'Tab TabFilling Table TableAlignments TableDepth TableDirections TableForm TableHeadings TableSpacing TableView TableViewBox TabSpacings TabView TabViewBox TabViewBoxOptions TagBox TagBoxNote TagBoxOptions TaggingRules TagSet TagSetDelayed TagStyle TagUnset Take TakeWhile Tally Tan Tanh TargetFunctions TargetUnits TautologyQ TelegraphProcess TemplateBox TemplateBoxOptions TemplateSlotSequence TemporalData Temporary TemporaryVariable TensorContract TensorDimensions TensorExpand TensorProduct TensorQ TensorRank TensorReduce TensorSymmetry TensorTranspose TensorWedge Tetrahedron TetrahedronBox TetrahedronBoxOptions TeXForm TeXSave Text Text3DBox Text3DBoxOptions TextAlignment TextBand TextBoundingBox TextBox TextCell TextClipboardType TextData TextForm TextJustification TextLine TextPacket TextParagraph TextRecognize TextRendering TextStyle Texture TextureCoordinateFunction TextureCoordinateScaling Therefore ThermometerGauge Thick Thickness Thin Thinning ThisLink ThompsonGroupTh Thread ThreeJSymbol Threshold Through Throw Thumbnail Thursday Ticks TicksStyle Tilde TildeEqual TildeFullEqual TildeTilde TimeConstrained TimeConstraint Times TimesBy TimeSeriesForecast TimeSeriesInvertibility TimeUsed TimeValue TimeZone Timing Tiny TitleGrouping TitsGroupT ToBoxes ToCharacterCode ToColor ToContinuousTimeModel ToDate ToDiscreteTimeModel ToeplitzMatrix ToExpression ToFileName Together Toggle ToggleFalse Toggler TogglerBar TogglerBox TogglerBoxOptions ToHeldExpression ToInvertibleTimeSeries TokenWords Tolerance ToLowerCase ToNumberField TooBig Tooltip TooltipBox TooltipBoxOptions TooltipDelay TooltipStyle Top TopHatTransform TopologicalSort ToRadicals ToRules ToString Total TotalHeight TotalVariationFilter TotalWidth TouchscreenAutoZoom TouchscreenControlPlacement ToUpperCase Tr Trace TraceAbove TraceAction TraceBackward TraceDepth TraceDialog TraceForward TraceInternal TraceLevel TraceOff TraceOn TraceOriginal TracePrint TraceScan TrackedSymbols TradingChart TraditionalForm TraditionalFunctionNotation TraditionalNotation TraditionalOrder TransferFunctionCancel TransferFunctionExpand TransferFunctionFactor TransferFunctionModel TransferFunctionPoles TransferFunctionTransform TransferFunctionZeros TransformationFunction TransformationFunctions TransformationMatrix TransformedDistribution TransformedField Translate TranslationTransform TransparentColor Transpose TreeForm TreeGraph TreeGraphQ TreePlot TrendStyle TriangleWave TriangularDistribution Trig TrigExpand TrigFactor TrigFactorList Trigger TrigReduce TrigToExp TrimmedMean True TrueQ TruncatedDistribution TsallisQExponentialDistribution TsallisQGaussianDistribution TTest Tube TubeBezierCurveBox TubeBezierCurveBoxOptions TubeBox TubeBSplineCurveBox TubeBSplineCurveBoxOptions Tuesday TukeyLambdaDistribution TukeyWindow Tuples TuranGraph TuringMachine ' +\n      'Transparent ' +\n      'UnateQ Uncompress Undefined UnderBar Underflow Underlined Underoverscript UnderoverscriptBox UnderoverscriptBoxOptions Underscript UnderscriptBox UnderscriptBoxOptions UndirectedEdge UndirectedGraph UndirectedGraphQ UndocumentedTestFEParserPacket UndocumentedTestGetSelectionPacket Unequal Unevaluated UniformDistribution UniformGraphDistribution UniformSumDistribution Uninstall Union UnionPlus Unique UnitBox UnitConvert UnitDimensions Unitize UnitRootTest UnitSimplify UnitStep UnitTriangle UnitVector Unprotect UnsameQ UnsavedVariables Unset UnsetShared UntrackedVariables Up UpArrow UpArrowBar UpArrowDownArrow Update UpdateDynamicObjects UpdateDynamicObjectsSynchronous UpdateInterval UpDownArrow UpEquilibrium UpperCaseQ UpperLeftArrow UpperRightArrow UpperTriangularize Upsample UpSet UpSetDelayed UpTee UpTeeArrow UpValues URL URLFetch URLFetchAsynchronous URLSave URLSaveAsynchronous UseGraphicsRange Using UsingFrontEnd ' +\n      'V2Get ValidationLength Value ValueBox ValueBoxOptions ValueForm ValueQ ValuesData Variables Variance VarianceEquivalenceTest VarianceEstimatorFunction VarianceGammaDistribution VarianceTest VectorAngle VectorColorFunction VectorColorFunctionScaling VectorDensityPlot VectorGlyphData VectorPlot VectorPlot3D VectorPoints VectorQ Vectors VectorScale VectorStyle Vee Verbatim Verbose VerboseConvertToPostScriptPacket VerifyConvergence VerifySolutions VerifyTestAssumptions Version VersionNumber VertexAdd VertexCapacity VertexColors VertexComponent VertexConnectivity VertexCoordinateRules VertexCoordinates VertexCorrelationSimilarity VertexCosineSimilarity VertexCount VertexCoverQ VertexDataCoordinates VertexDegree VertexDelete VertexDiceSimilarity VertexEccentricity VertexInComponent VertexInDegree VertexIndex VertexJaccardSimilarity VertexLabeling VertexLabels VertexLabelStyle VertexList VertexNormals VertexOutComponent VertexOutDegree VertexQ VertexRenderingFunction VertexReplace VertexShape VertexShapeFunction VertexSize VertexStyle VertexTextureCoordinates VertexWeight Vertical VerticalBar VerticalForm VerticalGauge VerticalSeparator VerticalSlider VerticalTilde ViewAngle ViewCenter ViewMatrix ViewPoint ViewPointSelectorSettings ViewPort ViewRange ViewVector ViewVertical VirtualGroupData Visible VisibleCell VoigtDistribution VonMisesDistribution ' +\n      'WaitAll WaitAsynchronousTask WaitNext WaitUntil WakebyDistribution WalleniusHypergeometricDistribution WaringYuleDistribution WatershedComponents WatsonUSquareTest WattsStrogatzGraphDistribution WaveletBestBasis WaveletFilterCoefficients WaveletImagePlot WaveletListPlot WaveletMapIndexed WaveletMatrixPlot WaveletPhi WaveletPsi WaveletScale WaveletScalogram WaveletThreshold WeaklyConnectedComponents WeaklyConnectedGraphQ WeakStationarity WeatherData WeberE Wedge Wednesday WeibullDistribution WeierstrassHalfPeriods WeierstrassInvariants WeierstrassP WeierstrassPPrime WeierstrassSigma WeierstrassZeta WeightedAdjacencyGraph WeightedAdjacencyMatrix WeightedData WeightedGraphQ Weights WelchWindow WheelGraph WhenEvent Which While White Whitespace WhitespaceCharacter WhittakerM WhittakerW WienerFilter WienerProcess WignerD WignerSemicircleDistribution WilksW WilksWTest WindowClickSelect WindowElements WindowFloating WindowFrame WindowFrameElements WindowMargins WindowMovable WindowOpacity WindowSelected WindowSize WindowStatusArea WindowTitle WindowToolbars WindowWidth With WolframAlpha WolframAlphaDate WolframAlphaQuantity WolframAlphaResult Word WordBoundary WordCharacter WordData WordSearch WordSeparators WorkingPrecision Write WriteString Wronskian ' +\n      'XMLElement XMLObject Xnor Xor ' +\n      'Yellow YuleDissimilarity ' +\n      'ZernikeR ZeroSymmetric ZeroTest ZeroWidthTimes Zeta ZetaZero ZipfDistribution ZTest ZTransform ' +\n      '$Aborted $ActivationGroupID $ActivationKey $ActivationUserRegistered $AddOnsDirectory $AssertFunction $Assumptions $AsynchronousTask $BaseDirectory $BatchInput $BatchOutput $BoxForms $ByteOrdering $Canceled $CharacterEncoding $CharacterEncodings $CommandLine $CompilationTarget $ConditionHold $ConfiguredKernels $Context $ContextPath $ControlActiveSetting $CreationDate $CurrentLink $DateStringFormat $DefaultFont $DefaultFrontEnd $DefaultImagingDevice $DefaultPath $Display $DisplayFunction $DistributedContexts $DynamicEvaluation $Echo $Epilog $ExportFormats $Failed $FinancialDataSource $FormatType $FrontEnd $FrontEndSession $GeoLocation $HistoryLength $HomeDirectory $HTTPCookies $IgnoreEOF $ImagingDevices $ImportFormats $InitialDirectory $Input $InputFileName $InputStreamMethods $Inspector $InstallationDate $InstallationDirectory $InterfaceEnvironment $IterationLimit $KernelCount $KernelID $Language $LaunchDirectory $LibraryPath $LicenseExpirationDate $LicenseID $LicenseProcesses $LicenseServer $LicenseSubprocesses $LicenseType $Line $Linked $LinkSupported $LoadedFiles $MachineAddresses $MachineDomain $MachineDomains $MachineEpsilon $MachineID $MachineName $MachinePrecision $MachineType $MaxExtraPrecision $MaxLicenseProcesses $MaxLicenseSubprocesses $MaxMachineNumber $MaxNumber $MaxPiecewiseCases $MaxPrecision $MaxRootDegree $MessageGroups $MessageList $MessagePrePrint $Messages $MinMachineNumber $MinNumber $MinorReleaseNumber $MinPrecision $ModuleNumber $NetworkLicense $NewMessage $NewSymbol $Notebooks $NumberMarks $Off $OperatingSystem $Output $OutputForms $OutputSizeLimit $OutputStreamMethods $Packages $ParentLink $ParentProcessID $PasswordFile $PatchLevelID $Path $PathnameSeparator $PerformanceGoal $PipeSupported $Post $Pre $PreferencesDirectory $PrePrint $PreRead $PrintForms $PrintLiteral $ProcessID $ProcessorCount $ProcessorType $ProductInformation $ProgramName $RandomState $RecursionLimit $ReleaseNumber $RootDirectory $ScheduledTask $ScriptCommandLine $SessionID $SetParentLink $SharedFunctions $SharedVariables $SoundDisplay $SoundDisplayFunction $SuppressInputFormHeads $SynchronousEvaluation $SyntaxHandler $System $SystemCharacterEncoding $SystemID $SystemWordLength $TemporaryDirectory $TemporaryPrefix $TextStyle $TimedOut $TimeUnit $TimeZone $TopDirectory $TraceOff $TraceOn $TracePattern $TracePostAction $TracePreAction $Urgent $UserAddOnsDirectory $UserBaseDirectory $UserDocumentsDirectory $UserName $Version $VersionNumber',\n    contains: [\n      {\n        className: 'comment',\n        begin: /\\(\\*/, end: /\\*\\)/\n      },\n      hljs.APOS_STRING_MODE,\n      hljs.QUOTE_STRING_MODE,\n      hljs.C_NUMBER_MODE,\n      {\n        begin: /\\{/, end: /\\}/,\n        illegal: /:/\n      }\n    ]\n  };\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/languages/matlab.js",
    "content": "/*\nLanguage: Matlab\nAuthor: Denis Bardadym <bardadymchik@gmail.com>\nContributors: Eugene Nizhibitsky <nizhibitsky@ya.ru>\nCategory: scientific\n*/\n\nfunction(hljs) {\n  var COMMON_CONTAINS = [\n    hljs.C_NUMBER_MODE,\n    {\n      className: 'string',\n      begin: '\\'', end: '\\'',\n      contains: [hljs.BACKSLASH_ESCAPE, {begin: '\\'\\''}]\n    }\n  ];\n  var TRANSPOSE = {\n    relevance: 0,\n    contains: [\n      {\n        begin: /'['\\.]*/\n      }\n    ]\n  };\n\n  return {\n    keywords: {\n      keyword:\n        'break case catch classdef continue else elseif end enumerated events for function ' +\n        'global if methods otherwise parfor persistent properties return spmd switch try while',\n      built_in:\n        'sin sind sinh asin asind asinh cos cosd cosh acos acosd acosh tan tand tanh atan ' +\n        'atand atan2 atanh sec secd sech asec asecd asech csc cscd csch acsc acscd acsch cot ' +\n        'cotd coth acot acotd acoth hypot exp expm1 log log1p log10 log2 pow2 realpow reallog ' +\n        'realsqrt sqrt nthroot nextpow2 abs angle complex conj imag real unwrap isreal ' +\n        'cplxpair fix floor ceil round mod rem sign airy besselj bessely besselh besseli ' +\n        'besselk beta betainc betaln ellipj ellipke erf erfc erfcx erfinv expint gamma ' +\n        'gammainc gammaln psi legendre cross dot factor isprime primes gcd lcm rat rats perms ' +\n        'nchoosek factorial cart2sph cart2pol pol2cart sph2cart hsv2rgb rgb2hsv zeros ones ' +\n        'eye repmat rand randn linspace logspace freqspace meshgrid accumarray size length ' +\n        'ndims numel disp isempty isequal isequalwithequalnans cat reshape diag blkdiag tril ' +\n        'triu fliplr flipud flipdim rot90 find sub2ind ind2sub bsxfun ndgrid permute ipermute ' +\n        'shiftdim circshift squeeze isscalar isvector ans eps realmax realmin pi i inf nan ' +\n        'isnan isinf isfinite j why compan gallery hadamard hankel hilb invhilb magic pascal ' +\n        'rosser toeplitz vander wilkinson'\n    },\n    illegal: '(//|\"|#|/\\\\*|\\\\s+/\\\\w+)',\n    contains: [\n      {\n        className: 'function',\n        beginKeywords: 'function', end: '$',\n        contains: [\n          hljs.UNDERSCORE_TITLE_MODE,\n          {\n            className: 'params',\n            variants: [\n              {begin: '\\\\(', end: '\\\\)'},\n              {begin: '\\\\[', end: '\\\\]'}\n            ]\n          }\n        ]\n      },\n      {\n        begin: /[a-zA-Z_][a-zA-Z_0-9]*'['\\.]*/,\n        returnBegin: true,\n        relevance: 0,\n        contains: [\n          {begin: /[a-zA-Z_][a-zA-Z_0-9]*/, relevance: 0},\n          TRANSPOSE.contains[0]\n        ]\n      },\n      {\n        begin: '\\\\[', end: '\\\\]',\n        contains: COMMON_CONTAINS,\n        relevance: 0,\n        starts: TRANSPOSE\n      },\n      {\n        begin: '\\\\{', end: /}/,\n        contains: COMMON_CONTAINS,\n        relevance: 0,\n        starts: TRANSPOSE\n      },\n      {\n        // transpose operators at the end of a function call\n        begin: /\\)/,\n        relevance: 0,\n        starts: TRANSPOSE\n      },\n      hljs.COMMENT('^\\\\s*\\\\%\\\\{\\\\s*$', '^\\\\s*\\\\%\\\\}\\\\s*$'),\n      hljs.COMMENT('\\\\%', '$')\n    ].concat(COMMON_CONTAINS)\n  };\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/languages/maxima.js",
    "content": "/*\nLanguage: Maxima\nAuthor: Robert Dodier <robert.dodier@gmail.com>\nCategory: scientific\n*/\n\nfunction(hljs) {\n  var KEYWORDS = 'if then else elseif for thru do while unless step in and or not';\n  var LITERALS = 'true false unknown inf minf ind und %e %i %pi %phi %gamma';\n  var BUILTIN_FUNCTIONS =\n        ' abasep abs absint absolute_real_time acos acosh acot acoth acsc acsch activate'\n      + ' addcol add_edge add_edges addmatrices addrow add_vertex add_vertices adjacency_matrix'\n      + ' adjoin adjoint af agd airy airy_ai airy_bi airy_dai airy_dbi algsys alg_type'\n      + ' alias allroots alphacharp alphanumericp amortization %and annuity_fv'\n      + ' annuity_pv antid antidiff AntiDifference append appendfile apply apply1 apply2'\n      + ' applyb1 apropos args arit_amortization arithmetic arithsum array arrayapply'\n      + ' arrayinfo arraymake arraysetapply ascii asec asech asin asinh askinteger'\n      + ' asksign assoc assoc_legendre_p assoc_legendre_q assume assume_external_byte_order'\n      + ' asympa at atan atan2 atanh atensimp atom atvalue augcoefmatrix augmented_lagrangian_method'\n      + ' av average_degree backtrace bars barsplot barsplot_description base64 base64_decode'\n      + ' bashindices batch batchload bc2 bdvac belln benefit_cost bern bernpoly bernstein_approx'\n      + ' bernstein_expand bernstein_poly bessel bessel_i bessel_j bessel_k bessel_simplify'\n      + ' bessel_y beta beta_incomplete beta_incomplete_generalized beta_incomplete_regularized'\n      + ' bezout bfallroots bffac bf_find_root bf_fmin_cobyla bfhzeta bfloat bfloatp'\n      + ' bfpsi bfpsi0 bfzeta biconnected_components bimetric binomial bipartition'\n      + ' block blockmatrixp bode_gain bode_phase bothcoef box boxplot boxplot_description'\n      + ' break bug_report build_info|10 buildq build_sample burn cabs canform canten'\n      + ' cardinality carg cartan cartesian_product catch cauchy_matrix cbffac cdf_bernoulli'\n      + ' cdf_beta cdf_binomial cdf_cauchy cdf_chi2 cdf_continuous_uniform cdf_discrete_uniform'\n      + ' cdf_exp cdf_f cdf_gamma cdf_general_finite_discrete cdf_geometric cdf_gumbel'\n      + ' cdf_hypergeometric cdf_laplace cdf_logistic cdf_lognormal cdf_negative_binomial'\n      + ' cdf_noncentral_chi2 cdf_noncentral_student_t cdf_normal cdf_pareto cdf_poisson'\n      + ' cdf_rank_sum cdf_rayleigh cdf_signed_rank cdf_student_t cdf_weibull cdisplay'\n      + ' ceiling central_moment cequal cequalignore cf cfdisrep cfexpand cgeodesic'\n      + ' cgreaterp cgreaterpignore changename changevar chaosgame charat charfun charfun2'\n      + ' charlist charp charpoly chdir chebyshev_t chebyshev_u checkdiv check_overlaps'\n      + ' chinese cholesky christof chromatic_index chromatic_number cint circulant_graph'\n      + ' clear_edge_weight clear_rules clear_vertex_label clebsch_gordan clebsch_graph'\n      + ' clessp clesspignore close closefile cmetric coeff coefmatrix cograd col collapse'\n      + ' collectterms columnop columnspace columnswap columnvector combination combine'\n      + ' comp2pui compare compfile compile compile_file complement_graph complete_bipartite_graph'\n      + ' complete_graph complex_number_p components compose_functions concan concat'\n      + ' conjugate conmetderiv connected_components connect_vertices cons constant'\n      + ' constantp constituent constvalue cont2part content continuous_freq contortion'\n      + ' contour_plot contract contract_edge contragrad contrib_ode convert coord'\n      + ' copy copy_file copy_graph copylist copymatrix cor cos cosh cot coth cov cov1'\n      + ' covdiff covect covers crc24sum create_graph create_list csc csch csetup cspline'\n      + ' ctaylor ct_coordsys ctransform ctranspose cube_graph cuboctahedron_graph'\n      + ' cunlisp cv cycle_digraph cycle_graph cylindrical days360 dblint deactivate'\n      + ' declare declare_constvalue declare_dimensions declare_fundamental_dimensions'\n      + ' declare_fundamental_units declare_qty declare_translated declare_unit_conversion'\n      + ' declare_units declare_weights decsym defcon define define_alt_display define_variable'\n      + ' defint defmatch defrule defstruct deftaylor degree_sequence del delete deleten'\n      + ' delta demo demoivre denom depends derivdegree derivlist describe desolve'\n      + ' determinant dfloat dgauss_a dgauss_b dgeev dgemm dgeqrf dgesv dgesvd diag'\n      + ' diagmatrix diag_matrix diagmatrixp diameter diff digitcharp dimacs_export'\n      + ' dimacs_import dimension dimensionless dimensions dimensions_as_list direct'\n      + ' directory discrete_freq disjoin disjointp disolate disp dispcon dispform'\n      + ' dispfun dispJordan display disprule dispterms distrib divide divisors divsum'\n      + ' dkummer_m dkummer_u dlange dodecahedron_graph dotproduct dotsimp dpart'\n      + ' draw draw2d draw3d drawdf draw_file draw_graph dscalar echelon edge_coloring'\n      + ' edge_connectivity edges eigens_by_jacobi eigenvalues eigenvectors eighth'\n      + ' einstein eivals eivects elapsed_real_time elapsed_run_time ele2comp ele2polynome'\n      + ' ele2pui elem elementp elevation_grid elim elim_allbut eliminate eliminate_using'\n      + ' ellipse elliptic_e elliptic_ec elliptic_eu elliptic_f elliptic_kc elliptic_pi'\n      + ' ematrix empty_graph emptyp endcons entermatrix entertensor entier equal equalp'\n      + ' equiv_classes erf erfc erf_generalized erfi errcatch error errormsg errors'\n      + ' euler ev eval_string evenp every evolution evolution2d evundiff example exp'\n      + ' expand expandwrt expandwrt_factored expint expintegral_chi expintegral_ci'\n      + ' expintegral_e expintegral_e1 expintegral_ei expintegral_e_simplify expintegral_li'\n      + ' expintegral_shi expintegral_si explicit explose exponentialize express expt'\n      + ' exsec extdiff extract_linear_equations extremal_subset ezgcd %f f90 facsum'\n      + ' factcomb factor factorfacsum factorial factorout factorsum facts fast_central_elements'\n      + ' fast_linsolve fasttimes featurep fernfale fft fib fibtophi fifth filename_merge'\n      + ' file_search file_type fillarray findde find_root find_root_abs find_root_error'\n      + ' find_root_rel first fix flatten flength float floatnump floor flower_snark'\n      + ' flush flush1deriv flushd flushnd flush_output fmin_cobyla forget fortran'\n      + ' fourcos fourexpand fourier fourier_elim fourint fourintcos fourintsin foursimp'\n      + ' foursin fourth fposition frame_bracket freeof freshline fresnel_c fresnel_s'\n      + ' from_adjacency_matrix frucht_graph full_listify fullmap fullmapl fullratsimp'\n      + ' fullratsubst fullsetify funcsolve fundamental_dimensions fundamental_units'\n      + ' fundef funmake funp fv g0 g1 gamma gamma_greek gamma_incomplete gamma_incomplete_generalized'\n      + ' gamma_incomplete_regularized gauss gauss_a gauss_b gaussprob gcd gcdex gcdivide'\n      + ' gcfac gcfactor gd generalized_lambert_w genfact gen_laguerre genmatrix gensym'\n      + ' geo_amortization geo_annuity_fv geo_annuity_pv geomap geometric geometric_mean'\n      + ' geosum get getcurrentdirectory get_edge_weight getenv get_lu_factors get_output_stream_string'\n      + ' get_pixel get_plot_option get_tex_environment get_tex_environment_default'\n      + ' get_vertex_label gfactor gfactorsum ggf girth global_variances gn gnuplot_close'\n      + ' gnuplot_replot gnuplot_reset gnuplot_restart gnuplot_start go Gosper GosperSum'\n      + ' gr2d gr3d gradef gramschmidt graph6_decode graph6_encode graph6_export graph6_import'\n      + ' graph_center graph_charpoly graph_eigenvalues graph_flow graph_order graph_periphery'\n      + ' graph_product graph_size graph_union great_rhombicosidodecahedron_graph great_rhombicuboctahedron_graph'\n      + ' grid_graph grind grobner_basis grotzch_graph hamilton_cycle hamilton_path'\n      + ' hankel hankel_1 hankel_2 harmonic harmonic_mean hav heawood_graph hermite'\n      + ' hessian hgfred hilbertmap hilbert_matrix hipow histogram histogram_description'\n      + ' hodge horner hypergeometric i0 i1 %ibes ic1 ic2 ic_convert ichr1 ichr2 icosahedron_graph'\n      + ' icosidodecahedron_graph icurvature ident identfor identity idiff idim idummy'\n      + ' ieqn %if ifactors iframes ifs igcdex igeodesic_coords ilt image imagpart'\n      + ' imetric implicit implicit_derivative implicit_plot indexed_tensor indices'\n      + ' induced_subgraph inferencep inference_result infix info_display init_atensor'\n      + ' init_ctensor in_neighbors innerproduct inpart inprod inrt integerp integer_partitions'\n      + ' integrate intersect intersection intervalp intopois intosum invariant1 invariant2'\n      + ' inverse_fft inverse_jacobi_cd inverse_jacobi_cn inverse_jacobi_cs inverse_jacobi_dc'\n      + ' inverse_jacobi_dn inverse_jacobi_ds inverse_jacobi_nc inverse_jacobi_nd inverse_jacobi_ns'\n      + ' inverse_jacobi_sc inverse_jacobi_sd inverse_jacobi_sn invert invert_by_adjoint'\n      + ' invert_by_lu inv_mod irr is is_biconnected is_bipartite is_connected is_digraph'\n      + ' is_edge_in_graph is_graph is_graph_or_digraph ishow is_isomorphic isolate'\n      + ' isomorphism is_planar isqrt isreal_p is_sconnected is_tree is_vertex_in_graph'\n      + ' items_inference %j j0 j1 jacobi jacobian jacobi_cd jacobi_cn jacobi_cs jacobi_dc'\n      + ' jacobi_dn jacobi_ds jacobi_nc jacobi_nd jacobi_ns jacobi_p jacobi_sc jacobi_sd'\n      + ' jacobi_sn JF jn join jordan julia julia_set julia_sin %k kdels kdelta kill'\n      + ' killcontext kostka kron_delta kronecker_product kummer_m kummer_u kurtosis'\n      + ' kurtosis_bernoulli kurtosis_beta kurtosis_binomial kurtosis_chi2 kurtosis_continuous_uniform'\n      + ' kurtosis_discrete_uniform kurtosis_exp kurtosis_f kurtosis_gamma kurtosis_general_finite_discrete'\n      + ' kurtosis_geometric kurtosis_gumbel kurtosis_hypergeometric kurtosis_laplace'\n      + ' kurtosis_logistic kurtosis_lognormal kurtosis_negative_binomial kurtosis_noncentral_chi2'\n      + ' kurtosis_noncentral_student_t kurtosis_normal kurtosis_pareto kurtosis_poisson'\n      + ' kurtosis_rayleigh kurtosis_student_t kurtosis_weibull label labels lagrange'\n      + ' laguerre lambda lambert_w laplace laplacian_matrix last lbfgs lc2kdt lcharp'\n      + ' lc_l lcm lc_u ldefint ldisp ldisplay legendre_p legendre_q leinstein length'\n      + ' let letrules letsimp levi_civita lfreeof lgtreillis lhs li liediff limit'\n      + ' Lindstedt linear linearinterpol linear_program linear_regression line_graph'\n      + ' linsolve listarray list_correlations listify list_matrix_entries list_nc_monomials'\n      + ' listoftens listofvars listp lmax lmin load loadfile local locate_matrix_entry'\n      + ' log logcontract log_gamma lopow lorentz_gauge lowercasep lpart lratsubst'\n      + ' lreduce lriemann lsquares_estimates lsquares_estimates_approximate lsquares_estimates_exact'\n      + ' lsquares_mse lsquares_residual_mse lsquares_residuals lsum ltreillis lu_backsub'\n      + ' lucas lu_factor %m macroexpand macroexpand1 make_array makebox makefact makegamma'\n      + ' make_graph make_level_picture makelist makeOrders make_poly_continent make_poly_country'\n      + ' make_polygon make_random_state make_rgb_picture makeset make_string_input_stream'\n      + ' make_string_output_stream make_transform mandelbrot mandelbrot_set map mapatom'\n      + ' maplist matchdeclare matchfix mat_cond mat_fullunblocker mat_function mathml_display'\n      + ' mat_norm matrix matrixmap matrixp matrix_size mattrace mat_trace mat_unblocker'\n      + ' max max_clique max_degree max_flow maximize_lp max_independent_set max_matching'\n      + ' maybe md5sum mean mean_bernoulli mean_beta mean_binomial mean_chi2 mean_continuous_uniform'\n      + ' mean_deviation mean_discrete_uniform mean_exp mean_f mean_gamma mean_general_finite_discrete'\n      + ' mean_geometric mean_gumbel mean_hypergeometric mean_laplace mean_logistic'\n      + ' mean_lognormal mean_negative_binomial mean_noncentral_chi2 mean_noncentral_student_t'\n      + ' mean_normal mean_pareto mean_poisson mean_rayleigh mean_student_t mean_weibull'\n      + ' median median_deviation member mesh metricexpandall mgf1_sha1 min min_degree'\n      + ' min_edge_cut minfactorial minimalPoly minimize_lp minimum_spanning_tree minor'\n      + ' minpack_lsquares minpack_solve min_vertex_cover min_vertex_cut mkdir mnewton'\n      + ' mod mode_declare mode_identity ModeMatrix moebius mon2schur mono monomial_dimensions'\n      + ' multibernstein_poly multi_display_for_texinfo multi_elem multinomial multinomial_coeff'\n      + ' multi_orbit multiplot_mode multi_pui multsym multthru mycielski_graph nary'\n      + ' natural_unit nc_degree ncexpt ncharpoly negative_picture neighbors new newcontext'\n      + ' newdet new_graph newline newton new_variable next_prime nicedummies niceindices'\n      + ' ninth nofix nonarray noncentral_moment nonmetricity nonnegintegerp nonscalarp'\n      + ' nonzeroandfreeof notequal nounify nptetrad npv nroots nterms ntermst'\n      + ' nthroot nullity nullspace num numbered_boundaries numberp number_to_octets'\n      + ' num_distinct_partitions numerval numfactor num_partitions nusum nzeta nzetai'\n      + ' nzetar octets_to_number octets_to_oid odd_girth oddp ode2 ode_check odelin'\n      + ' oid_to_octets op opena opena_binary openr openr_binary openw openw_binary'\n      + ' operatorp opsubst optimize %or orbit orbits ordergreat ordergreatp orderless'\n      + ' orderlessp orthogonal_complement orthopoly_recur orthopoly_weight outermap'\n      + ' out_neighbors outofpois pade parabolic_cylinder_d parametric parametric_surface'\n      + ' parg parGosper parse_string parse_timedate part part2cont partfrac partition'\n      + ' partition_set partpol path_digraph path_graph pathname_directory pathname_name'\n      + ' pathname_type pdf_bernoulli pdf_beta pdf_binomial pdf_cauchy pdf_chi2 pdf_continuous_uniform'\n      + ' pdf_discrete_uniform pdf_exp pdf_f pdf_gamma pdf_general_finite_discrete'\n      + ' pdf_geometric pdf_gumbel pdf_hypergeometric pdf_laplace pdf_logistic pdf_lognormal'\n      + ' pdf_negative_binomial pdf_noncentral_chi2 pdf_noncentral_student_t pdf_normal'\n      + ' pdf_pareto pdf_poisson pdf_rank_sum pdf_rayleigh pdf_signed_rank pdf_student_t'\n      + ' pdf_weibull pearson_skewness permanent permut permutation permutations petersen_graph'\n      + ' petrov pickapart picture_equalp picturep piechart piechart_description planar_embedding'\n      + ' playback plog plot2d plot3d plotdf ploteq plsquares pochhammer points poisdiff'\n      + ' poisexpt poisint poismap poisplus poissimp poissubst poistimes poistrim polar'\n      + ' polarform polartorect polar_to_xy poly_add poly_buchberger poly_buchberger_criterion'\n      + ' poly_colon_ideal poly_content polydecomp poly_depends_p poly_elimination_ideal'\n      + ' poly_exact_divide poly_expand poly_expt poly_gcd polygon poly_grobner poly_grobner_equal'\n      + ' poly_grobner_member poly_grobner_subsetp poly_ideal_intersection poly_ideal_polysaturation'\n      + ' poly_ideal_polysaturation1 poly_ideal_saturation poly_ideal_saturation1 poly_lcm'\n      + ' poly_minimization polymod poly_multiply polynome2ele polynomialp poly_normal_form'\n      + ' poly_normalize poly_normalize_list poly_polysaturation_extension poly_primitive_part'\n      + ' poly_pseudo_divide poly_reduced_grobner poly_reduction poly_saturation_extension'\n      + ' poly_s_polynomial poly_subtract polytocompanion pop postfix potential power_mod'\n      + ' powerseries powerset prefix prev_prime primep primes principal_components'\n      + ' print printf printfile print_graph printpois printprops prodrac product properties'\n      + ' propvars psi psubst ptriangularize pui pui2comp pui2ele pui2polynome pui_direct'\n      + ' puireduc push put pv qput qrange qty quad_control quad_qag quad_qagi quad_qagp'\n      + ' quad_qags quad_qawc quad_qawf quad_qawo quad_qaws quadrilateral quantile'\n      + ' quantile_bernoulli quantile_beta quantile_binomial quantile_cauchy quantile_chi2'\n      + ' quantile_continuous_uniform quantile_discrete_uniform quantile_exp quantile_f'\n      + ' quantile_gamma quantile_general_finite_discrete quantile_geometric quantile_gumbel'\n      + ' quantile_hypergeometric quantile_laplace quantile_logistic quantile_lognormal'\n      + ' quantile_negative_binomial quantile_noncentral_chi2 quantile_noncentral_student_t'\n      + ' quantile_normal quantile_pareto quantile_poisson quantile_rayleigh quantile_student_t'\n      + ' quantile_weibull quartile_skewness quit qunit quotient racah_v racah_w radcan'\n      + ' radius random random_bernoulli random_beta random_binomial random_bipartite_graph'\n      + ' random_cauchy random_chi2 random_continuous_uniform random_digraph random_discrete_uniform'\n      + ' random_exp random_f random_gamma random_general_finite_discrete random_geometric'\n      + ' random_graph random_graph1 random_gumbel random_hypergeometric random_laplace'\n      + ' random_logistic random_lognormal random_negative_binomial random_network'\n      + ' random_noncentral_chi2 random_noncentral_student_t random_normal random_pareto'\n      + ' random_permutation random_poisson random_rayleigh random_regular_graph random_student_t'\n      + ' random_tournament random_tree random_weibull range rank rat ratcoef ratdenom'\n      + ' ratdiff ratdisrep ratexpand ratinterpol rational rationalize ratnumer ratnump'\n      + ' ratp ratsimp ratsubst ratvars ratweight read read_array read_binary_array'\n      + ' read_binary_list read_binary_matrix readbyte readchar read_hashed_array readline'\n      + ' read_list read_matrix read_nested_list readonly read_xpm real_imagpart_to_conjugate'\n      + ' realpart realroots rearray rectangle rectform rectform_log_if_constant recttopolar'\n      + ' rediff reduce_consts reduce_order region region_boundaries region_boundaries_plus'\n      + ' rem remainder remarray rembox remcomps remcon remcoord remfun remfunction'\n      + ' remlet remove remove_constvalue remove_dimensions remove_edge remove_fundamental_dimensions'\n      + ' remove_fundamental_units remove_plot_option remove_vertex rempart remrule'\n      + ' remsym remvalue rename rename_file reset reset_displays residue resolvante'\n      + ' resolvante_alternee1 resolvante_bipartite resolvante_diedrale resolvante_klein'\n      + ' resolvante_klein3 resolvante_produit_sym resolvante_unitaire resolvante_vierer'\n      + ' rest resultant return reveal reverse revert revert2 rgb2level rhs ricci riemann'\n      + ' rinvariant risch rk rmdir rncombine romberg room rootscontract round row'\n      + ' rowop rowswap rreduce run_testsuite %s save saving scalarp scaled_bessel_i'\n      + ' scaled_bessel_i0 scaled_bessel_i1 scalefactors scanmap scatterplot scatterplot_description'\n      + ' scene schur2comp sconcat scopy scsimp scurvature sdowncase sec sech second'\n      + ' sequal sequalignore set_alt_display setdifference set_draw_defaults set_edge_weight'\n      + ' setelmx setequalp setify setp set_partitions set_plot_option set_prompt set_random_state'\n      + ' set_tex_environment set_tex_environment_default setunits setup_autoload set_up_dot_simplifications'\n      + ' set_vertex_label seventh sexplode sf sha1sum sha256sum shortest_path shortest_weighted_path'\n      + ' show showcomps showratvars sierpinskiale sierpinskimap sign signum similaritytransform'\n      + ' simp_inequality simplify_sum simplode simpmetderiv simtran sin sinh sinsert'\n      + ' sinvertcase sixth skewness skewness_bernoulli skewness_beta skewness_binomial'\n      + ' skewness_chi2 skewness_continuous_uniform skewness_discrete_uniform skewness_exp'\n      + ' skewness_f skewness_gamma skewness_general_finite_discrete skewness_geometric'\n      + ' skewness_gumbel skewness_hypergeometric skewness_laplace skewness_logistic'\n      + ' skewness_lognormal skewness_negative_binomial skewness_noncentral_chi2 skewness_noncentral_student_t'\n      + ' skewness_normal skewness_pareto skewness_poisson skewness_rayleigh skewness_student_t'\n      + ' skewness_weibull slength smake small_rhombicosidodecahedron_graph small_rhombicuboctahedron_graph'\n      + ' smax smin smismatch snowmap snub_cube_graph snub_dodecahedron_graph solve'\n      + ' solve_rec solve_rec_rat some somrac sort sparse6_decode sparse6_encode sparse6_export'\n      + ' sparse6_import specint spherical spherical_bessel_j spherical_bessel_y spherical_hankel1'\n      + ' spherical_hankel2 spherical_harmonic spherical_to_xyz splice split sposition'\n      + ' sprint sqfr sqrt sqrtdenest sremove sremovefirst sreverse ssearch ssort sstatus'\n      + ' ssubst ssubstfirst staircase standardize standardize_inverse_trig starplot'\n      + ' starplot_description status std std1 std_bernoulli std_beta std_binomial'\n      + ' std_chi2 std_continuous_uniform std_discrete_uniform std_exp std_f std_gamma'\n      + ' std_general_finite_discrete std_geometric std_gumbel std_hypergeometric std_laplace'\n      + ' std_logistic std_lognormal std_negative_binomial std_noncentral_chi2 std_noncentral_student_t'\n      + ' std_normal std_pareto std_poisson std_rayleigh std_student_t std_weibull'\n      + ' stemplot stirling stirling1 stirling2 strim striml strimr string stringout'\n      + ' stringp strong_components struve_h struve_l sublis sublist sublist_indices'\n      + ' submatrix subsample subset subsetp subst substinpart subst_parallel substpart'\n      + ' substring subvar subvarp sum sumcontract summand_to_rec supcase supcontext'\n      + ' symbolp symmdifference symmetricp system take_channel take_inference tan'\n      + ' tanh taylor taylorinfo taylorp taylor_simplifier taytorat tcl_output tcontract'\n      + ' tellrat tellsimp tellsimpafter tentex tenth test_mean test_means_difference'\n      + ' test_normality test_proportion test_proportions_difference test_rank_sum'\n      + ' test_sign test_signed_rank test_variance test_variance_ratio tex tex1 tex_display'\n      + ' texput %th third throw time timedate timer timer_info tldefint tlimit todd_coxeter'\n      + ' toeplitz tokens to_lisp topological_sort to_poly to_poly_solve totaldisrep'\n      + ' totalfourier totient tpartpol trace tracematrix trace_options transform_sample'\n      + ' translate translate_file transpose treefale tree_reduce treillis treinat'\n      + ' triangle triangularize trigexpand trigrat trigreduce trigsimp trunc truncate'\n      + ' truncated_cube_graph truncated_dodecahedron_graph truncated_icosahedron_graph'\n      + ' truncated_tetrahedron_graph tr_warnings_get tube tutte_graph ueivects uforget'\n      + ' ultraspherical underlying_graph undiff union unique uniteigenvectors unitp'\n      + ' units unit_step unitvector unorder unsum untellrat untimer'\n      + ' untrace uppercasep uricci uriemann uvect vandermonde_matrix var var1 var_bernoulli'\n      + ' var_beta var_binomial var_chi2 var_continuous_uniform var_discrete_uniform'\n      + ' var_exp var_f var_gamma var_general_finite_discrete var_geometric var_gumbel'\n      + ' var_hypergeometric var_laplace var_logistic var_lognormal var_negative_binomial'\n      + ' var_noncentral_chi2 var_noncentral_student_t var_normal var_pareto var_poisson'\n      + ' var_rayleigh var_student_t var_weibull vector vectorpotential vectorsimp'\n      + ' verbify vers vertex_coloring vertex_connectivity vertex_degree vertex_distance'\n      + ' vertex_eccentricity vertex_in_degree vertex_out_degree vertices vertices_to_cycle'\n      + ' vertices_to_path %w weyl wheel_graph wiener_index wigner_3j wigner_6j'\n      + ' wigner_9j with_stdout write_binary_data writebyte write_data writefile wronskian'\n      + ' xreduce xthru %y Zeilberger zeroequiv zerofor zeromatrix zeromatrixp zeta'\n      + ' zgeev zheev zlange zn_add_table zn_carmichael_lambda zn_characteristic_factors'\n      + ' zn_determinant zn_factor_generators zn_invert_by_lu zn_log zn_mult_table'\n      + ' absboxchar activecontexts adapt_depth additive adim aform algebraic'\n      + ' algepsilon algexact aliases allbut all_dotsimp_denoms allocation allsym alphabetic'\n      + ' animation antisymmetric arrays askexp assume_pos assume_pos_pred assumescalar'\n      + ' asymbol atomgrad atrig1 axes axis_3d axis_bottom axis_left axis_right axis_top'\n      + ' azimuth background background_color backsubst berlefact bernstein_explicit'\n      + ' besselexpand beta_args_sum_to_integer beta_expand bftorat bftrunc bindtest'\n      + ' border boundaries_array box boxchar breakup %c capping cauchysum cbrange'\n      + ' cbtics center cflength cframe_flag cnonmet_flag color color_bar color_bar_tics'\n      + ' colorbox columns commutative complex cone context contexts contour contour_levels'\n      + ' cosnpiflag ctaypov ctaypt ctayswitch ctayvar ct_coords ctorsion_flag ctrgsimp'\n      + ' cube current_let_rule_package cylinder data_file_name debugmode decreasing'\n      + ' default_let_rule_package delay dependencies derivabbrev derivsubst detout'\n      + ' diagmetric diff dim dimensions dispflag display2d|10 display_format_internal'\n      + ' distribute_over doallmxops domain domxexpt domxmxops domxnctimes dontfactor'\n      + ' doscmxops doscmxplus dot0nscsimp dot0simp dot1simp dotassoc dotconstrules'\n      + ' dotdistrib dotexptsimp dotident dotscrules draw_graph_program draw_realpart'\n      + ' edge_color edge_coloring edge_partition edge_type edge_width %edispflag'\n      + ' elevation %emode endphi endtheta engineering_format_floats enhanced3d %enumer'\n      + ' epsilon_lp erfflag erf_representation errormsg error_size error_syms error_type'\n      + ' %e_to_numlog eval even evenfun evflag evfun ev_point expandwrt_denom expintexpand'\n      + ' expintrep expon expop exptdispflag exptisolate exptsubst facexpand facsum_combine'\n      + ' factlim factorflag factorial_expand factors_only fb feature features'\n      + ' file_name file_output_append file_search_demo file_search_lisp file_search_maxima|10'\n      + ' file_search_tests file_search_usage file_type_lisp file_type_maxima|10 fill_color'\n      + ' fill_density filled_func fixed_vertices flipflag float2bf font font_size'\n      + ' fortindent fortspaces fpprec fpprintprec functions gamma_expand gammalim'\n      + ' gdet genindex gensumnum GGFCFMAX GGFINFINITY globalsolve gnuplot_command'\n      + ' gnuplot_curve_styles gnuplot_curve_titles gnuplot_default_term_command gnuplot_dumb_term_command'\n      + ' gnuplot_file_args gnuplot_file_name gnuplot_out_file gnuplot_pdf_term_command'\n      + ' gnuplot_pm3d gnuplot_png_term_command gnuplot_postamble gnuplot_preamble'\n      + ' gnuplot_ps_term_command gnuplot_svg_term_command gnuplot_term gnuplot_view_args'\n      + ' Gosper_in_Zeilberger gradefs grid grid2d grind halfangles head_angle head_both'\n      + ' head_length head_type height hypergeometric_representation %iargs ibase'\n      + ' icc1 icc2 icounter idummyx ieqnprint ifb ifc1 ifc2 ifg ifgi ifr iframe_bracket_form'\n      + ' ifri igeowedge_flag ikt1 ikt2 imaginary inchar increasing infeval'\n      + ' infinity inflag infolists inm inmc1 inmc2 intanalysis integer integervalued'\n      + ' integrate_use_rootsof integration_constant integration_constant_counter interpolate_color'\n      + ' intfaclim ip_grid ip_grid_in irrational isolate_wrt_times iterations itr'\n      + ' julia_parameter %k1 %k2 keepfloat key key_pos kinvariant kt label label_alignment'\n      + ' label_orientation labels lassociative lbfgs_ncorrections lbfgs_nfeval_max'\n      + ' leftjust legend letrat let_rule_packages lfg lg lhospitallim limsubst linear'\n      + ' linear_solver linechar linel|10 linenum line_type linewidth line_width linsolve_params'\n      + ' linsolvewarn lispdisp listarith listconstvars listdummyvars lmxchar load_pathname'\n      + ' loadprint logabs logarc logcb logconcoeffp logexpand lognegint logsimp logx'\n      + ' logx_secondary logy logy_secondary logz lriem m1pbranch macroexpansion macros'\n      + ' mainvar manual_demo maperror mapprint matrix_element_add matrix_element_mult'\n      + ' matrix_element_transpose maxapplydepth maxapplyheight maxima_tempdir|10 maxima_userdir|10'\n      + ' maxnegex MAX_ORD maxposex maxpsifracdenom maxpsifracnum maxpsinegint maxpsiposint'\n      + ' maxtayorder mesh_lines_color method mod_big_prime mode_check_errorp'\n      + ' mode_checkp mode_check_warnp mod_test mod_threshold modular_linear_solver'\n      + ' modulus multiplicative multiplicities myoptions nary negdistrib negsumdispflag'\n      + ' newline newtonepsilon newtonmaxiter nextlayerfactor niceindicespref nm nmc'\n      + ' noeval nolabels nonegative_lp noninteger nonscalar noun noundisp nouns np'\n      + ' npi nticks ntrig numer numer_pbranch obase odd oddfun opacity opproperties'\n      + ' opsubst optimprefix optionset orientation origin orthopoly_returns_intervals'\n      + ' outative outchar packagefile palette partswitch pdf_file pfeformat phiresolution'\n      + ' %piargs piece pivot_count_sx pivot_max_sx plot_format plot_options plot_realpart'\n      + ' png_file pochhammer_max_index points pointsize point_size points_joined point_type'\n      + ' poislim poisson poly_coefficient_ring poly_elimination_order polyfactor poly_grobner_algorithm'\n      + ' poly_grobner_debug poly_monomial_order poly_primary_elimination_order poly_return_term_list'\n      + ' poly_secondary_elimination_order poly_top_reduction_only posfun position'\n      + ' powerdisp pred prederror primep_number_of_tests product_use_gamma program'\n      + ' programmode promote_float_to_bigfloat prompt proportional_axes props psexpand'\n      + ' ps_file radexpand radius radsubstflag rassociative ratalgdenom ratchristof'\n      + ' ratdenomdivide rateinstein ratepsilon ratfac rational ratmx ratprint ratriemann'\n      + ' ratsimpexpons ratvarswitch ratweights ratweyl ratwtlvl real realonly redraw'\n      + ' refcheck resolution restart resultant ric riem rmxchar %rnum_list rombergabs'\n      + ' rombergit rombergmin rombergtol rootsconmode rootsepsilon run_viewer same_xy'\n      + ' same_xyz savedef savefactors scalar scalarmatrixp scale scale_lp setcheck'\n      + ' setcheckbreak setval show_edge_color show_edges show_edge_type show_edge_width'\n      + ' show_id show_label showtime show_vertex_color show_vertex_size show_vertex_type'\n      + ' show_vertices show_weight simp simplified_output simplify_products simpproduct'\n      + ' simpsum sinnpiflag solvedecomposes solveexplicit solvefactors solvenullwarn'\n      + ' solveradcan solvetrigwarn space sparse sphere spring_embedding_depth sqrtdispflag'\n      + ' stardisp startphi starttheta stats_numer stringdisp structures style sublis_apply_lambda'\n      + ' subnumsimp sumexpand sumsplitfact surface surface_hide svg_file symmetric'\n      + ' tab taylordepth taylor_logexpand taylor_order_coefficients taylor_truncate_polynomials'\n      + ' tensorkill terminal testsuite_files thetaresolution timer_devalue title tlimswitch'\n      + ' tr track transcompile transform transform_xy translate_fast_arrays transparent'\n      + ' transrun tr_array_as_ref tr_bound_function_applyp tr_file_tty_messagesp tr_float_can_branch_complex'\n      + ' tr_function_call_default trigexpandplus trigexpandtimes triginverses trigsign'\n      + ' trivial_solutions tr_numer tr_optimize_max_loop tr_semicompile tr_state_vars'\n      + ' tr_warn_bad_function_calls tr_warn_fexpr tr_warn_meval tr_warn_mode'\n      + ' tr_warn_undeclared tr_warn_undefined_variable tstep ttyoff tube_extremes'\n      + ' ufg ug %unitexpand unit_vectors uric uriem use_fast_arrays user_preamble'\n      + ' usersetunits values vect_cross verbose vertex_color vertex_coloring vertex_partition'\n      + ' vertex_size vertex_type view warnings weyl width windowname windowtitle wired_surface'\n      + ' wireframe xaxis xaxis_color xaxis_secondary xaxis_type xaxis_width xlabel'\n      + ' xlabel_secondary xlength xrange xrange_secondary xtics xtics_axis xtics_rotate'\n      + ' xtics_rotate_secondary xtics_secondary xtics_secondary_axis xu_grid x_voxel'\n      + ' xy_file xyplane xy_scale yaxis yaxis_color yaxis_secondary yaxis_type yaxis_width'\n      + ' ylabel ylabel_secondary ylength yrange yrange_secondary ytics ytics_axis'\n      + ' ytics_rotate ytics_rotate_secondary ytics_secondary ytics_secondary_axis'\n      + ' yv_grid y_voxel yx_ratio zaxis zaxis_color zaxis_type zaxis_width zeroa zerob'\n      + ' zerobern zeta%pi zlabel zlabel_rotate zlength zmin zn_primroot_limit zn_primroot_pretest';\n  var SYMBOLS = '_ __ %|0 %%|0';\n\n  return {\n    lexemes: '[A-Za-z_%][0-9A-Za-z_%]*',\n    keywords: {\n      keyword: KEYWORDS,\n      literal: LITERALS,\n      built_in: BUILTIN_FUNCTIONS,\n      symbol: SYMBOLS,\n    },\n    contains: [\n      {\n        className: 'comment',\n        begin: '/\\\\*',\n        end: '\\\\*/',\n        contains: ['self']\n      },\n      hljs.QUOTE_STRING_MODE,\n      {\n        className: 'number',\n        relevance: 0,\n        variants: [\n          {\n            // float number w/ exponent\n            // hmm, I wonder if we ought to include other exponent markers?\n            begin: '\\\\b(\\\\d+|\\\\d+\\\\.|\\\\.\\\\d+|\\\\d+\\\\.\\\\d+)[Ee][-+]?\\\\d+\\\\b',\n          },\n          {\n            // bigfloat number\n            begin: '\\\\b(\\\\d+|\\\\d+\\\\.|\\\\.\\\\d+|\\\\d+\\\\.\\\\d+)[Bb][-+]?\\\\d+\\\\b',\n            relevance: 10\n          },\n          {\n            // float number w/out exponent\n            // Doesn't seem to recognize floats which start with '.'\n            begin: '\\\\b(\\\\.\\\\d+|\\\\d+\\\\.\\\\d+)\\\\b',\n          },\n          {\n            // integer in base up to 36\n            // Doesn't seem to recognize integers which end with '.'\n            begin: '\\\\b(\\\\d+|0[0-9A-Za-z]+)\\\\.?\\\\b',\n          }\n        ]\n      }\n    ],\n    illegal: /@/\n  }\n}\n\n"
  },
  {
    "path": "static/editor.md/lib/highlight/languages/mel.js",
    "content": "/*\nLanguage: MEL\nDescription: Maya Embedded Language\nAuthor: Shuen-Huei Guan <drake.guan@gmail.com>\nCategory: graphics\n*/\n\nfunction(hljs) {\n  return {\n    keywords:\n      'int float string vector matrix if else switch case default while do for in break ' +\n      'continue global proc return about abs addAttr addAttributeEditorNodeHelp addDynamic ' +\n      'addNewShelfTab addPP addPanelCategory addPrefixToName advanceToNextDrivenKey ' +\n      'affectedNet affects aimConstraint air alias aliasAttr align alignCtx alignCurve ' +\n      'alignSurface allViewFit ambientLight angle angleBetween animCone animCurveEditor ' +\n      'animDisplay animView annotate appendStringArray applicationName applyAttrPreset ' +\n      'applyTake arcLenDimContext arcLengthDimension arclen arrayMapper art3dPaintCtx ' +\n      'artAttrCtx artAttrPaintVertexCtx artAttrSkinPaintCtx artAttrTool artBuildPaintMenu ' +\n      'artFluidAttrCtx artPuttyCtx artSelectCtx artSetPaintCtx artUserPaintCtx assignCommand ' +\n      'assignInputDevice assignViewportFactories attachCurve attachDeviceAttr attachSurface ' +\n      'attrColorSliderGrp attrCompatibility attrControlGrp attrEnumOptionMenu ' +\n      'attrEnumOptionMenuGrp attrFieldGrp attrFieldSliderGrp attrNavigationControlGrp ' +\n      'attrPresetEditWin attributeExists attributeInfo attributeMenu attributeQuery ' +\n      'autoKeyframe autoPlace bakeClip bakeFluidShading bakePartialHistory bakeResults ' +\n      'bakeSimulation basename basenameEx batchRender bessel bevel bevelPlus binMembership ' +\n      'bindSkin blend2 blendShape blendShapeEditor blendShapePanel blendTwoAttr blindDataType ' +\n      'boneLattice boundary boxDollyCtx boxZoomCtx bufferCurve buildBookmarkMenu ' +\n      'buildKeyframeMenu button buttonManip CBG cacheFile cacheFileCombine cacheFileMerge ' +\n      'cacheFileTrack camera cameraView canCreateManip canvas capitalizeString catch ' +\n      'catchQuiet ceil changeSubdivComponentDisplayLevel changeSubdivRegion channelBox ' +\n      'character characterMap characterOutlineEditor characterize chdir checkBox checkBoxGrp ' +\n      'checkDefaultRenderGlobals choice circle circularFillet clamp clear clearCache clip ' +\n      'clipEditor clipEditorCurrentTimeCtx clipSchedule clipSchedulerOutliner clipTrimBefore ' +\n      'closeCurve closeSurface cluster cmdFileOutput cmdScrollFieldExecuter ' +\n      'cmdScrollFieldReporter cmdShell coarsenSubdivSelectionList collision color ' +\n      'colorAtPoint colorEditor colorIndex colorIndexSliderGrp colorSliderButtonGrp ' +\n      'colorSliderGrp columnLayout commandEcho commandLine commandPort compactHairSystem ' +\n      'componentEditor compositingInterop computePolysetVolume condition cone confirmDialog ' +\n      'connectAttr connectControl connectDynamic connectJoint connectionInfo constrain ' +\n      'constrainValue constructionHistory container containsMultibyte contextInfo control ' +\n      'convertFromOldLayers convertIffToPsd convertLightmap convertSolidTx convertTessellation ' +\n      'convertUnit copyArray copyFlexor copyKey copySkinWeights cos cpButton cpCache ' +\n      'cpClothSet cpCollision cpConstraint cpConvClothToMesh cpForces cpGetSolverAttr cpPanel ' +\n      'cpProperty cpRigidCollisionFilter cpSeam cpSetEdit cpSetSolverAttr cpSolver ' +\n      'cpSolverTypes cpTool cpUpdateClothUVs createDisplayLayer createDrawCtx createEditor ' +\n      'createLayeredPsdFile createMotionField createNewShelf createNode createRenderLayer ' +\n      'createSubdivRegion cross crossProduct ctxAbort ctxCompletion ctxEditMode ctxTraverse ' +\n      'currentCtx currentTime currentTimeCtx currentUnit curve curveAddPtCtx ' +\n      'curveCVCtx curveEPCtx curveEditorCtx curveIntersect curveMoveEPCtx curveOnSurface ' +\n      'curveSketchCtx cutKey cycleCheck cylinder dagPose date defaultLightListCheckBox ' +\n      'defaultNavigation defineDataServer defineVirtualDevice deformer deg_to_rad delete ' +\n      'deleteAttr deleteShadingGroupsAndMaterials deleteShelfTab deleteUI deleteUnusedBrushes ' +\n      'delrandstr detachCurve detachDeviceAttr detachSurface deviceEditor devicePanel dgInfo ' +\n      'dgdirty dgeval dgtimer dimWhen directKeyCtx directionalLight dirmap dirname disable ' +\n      'disconnectAttr disconnectJoint diskCache displacementToPoly displayAffected ' +\n      'displayColor displayCull displayLevelOfDetail displayPref displayRGBColor ' +\n      'displaySmoothness displayStats displayString displaySurface distanceDimContext ' +\n      'distanceDimension doBlur dolly dollyCtx dopeSheetEditor dot dotProduct ' +\n      'doubleProfileBirailSurface drag dragAttrContext draggerContext dropoffLocator ' +\n      'duplicate duplicateCurve duplicateSurface dynCache dynControl dynExport dynExpression ' +\n      'dynGlobals dynPaintEditor dynParticleCtx dynPref dynRelEdPanel dynRelEditor ' +\n      'dynamicLoad editAttrLimits editDisplayLayerGlobals editDisplayLayerMembers ' +\n      'editRenderLayerAdjustment editRenderLayerGlobals editRenderLayerMembers editor ' +\n      'editorTemplate effector emit emitter enableDevice encodeString endString endsWith env ' +\n      'equivalent equivalentTol erf error eval evalDeferred evalEcho event ' +\n      'exactWorldBoundingBox exclusiveLightCheckBox exec executeForEachObject exists exp ' +\n      'expression expressionEditorListen extendCurve extendSurface extrude fcheck fclose feof ' +\n      'fflush fgetline fgetword file fileBrowserDialog fileDialog fileExtension fileInfo ' +\n      'filetest filletCurve filter filterCurve filterExpand filterStudioImport ' +\n      'findAllIntersections findAnimCurves findKeyframe findMenuItem findRelatedSkinCluster ' +\n      'finder firstParentOf fitBspline flexor floatEq floatField floatFieldGrp floatScrollBar ' +\n      'floatSlider floatSlider2 floatSliderButtonGrp floatSliderGrp floor flow fluidCacheInfo ' +\n      'fluidEmitter fluidVoxelInfo flushUndo fmod fontDialog fopen formLayout format fprint ' +\n      'frameLayout fread freeFormFillet frewind fromNativePath fwrite gamma gauss ' +\n      'geometryConstraint getApplicationVersionAsFloat getAttr getClassification ' +\n      'getDefaultBrush getFileList getFluidAttr getInputDeviceRange getMayaPanelTypes ' +\n      'getModifiers getPanel getParticleAttr getPluginResource getenv getpid glRender ' +\n      'glRenderEditor globalStitch gmatch goal gotoBindPose grabColor gradientControl ' +\n      'gradientControlNoAttr graphDollyCtx graphSelectContext graphTrackCtx gravity grid ' +\n      'gridLayout group groupObjectsByName HfAddAttractorToAS HfAssignAS HfBuildEqualMap ' +\n      'HfBuildFurFiles HfBuildFurImages HfCancelAFR HfConnectASToHF HfCreateAttractor ' +\n      'HfDeleteAS HfEditAS HfPerformCreateAS HfRemoveAttractorFromAS HfSelectAttached ' +\n      'HfSelectAttractors HfUnAssignAS hardenPointCurve hardware hardwareRenderPanel ' +\n      'headsUpDisplay headsUpMessage help helpLine hermite hide hilite hitTest hotBox hotkey ' +\n      'hotkeyCheck hsv_to_rgb hudButton hudSlider hudSliderButton hwReflectionMap hwRender ' +\n      'hwRenderLoad hyperGraph hyperPanel hyperShade hypot iconTextButton iconTextCheckBox ' +\n      'iconTextRadioButton iconTextRadioCollection iconTextScrollList iconTextStaticLabel ' +\n      'ikHandle ikHandleCtx ikHandleDisplayScale ikSolver ikSplineHandleCtx ikSystem ' +\n      'ikSystemInfo ikfkDisplayMethod illustratorCurves image imfPlugins inheritTransform ' +\n      'insertJoint insertJointCtx insertKeyCtx insertKnotCurve insertKnotSurface instance ' +\n      'instanceable instancer intField intFieldGrp intScrollBar intSlider intSliderGrp ' +\n      'interToUI internalVar intersect iprEngine isAnimCurve isConnected isDirty isParentOf ' +\n      'isSameObject isTrue isValidObjectName isValidString isValidUiName isolateSelect ' +\n      'itemFilter itemFilterAttr itemFilterRender itemFilterType joint jointCluster jointCtx ' +\n      'jointDisplayScale jointLattice keyTangent keyframe keyframeOutliner ' +\n      'keyframeRegionCurrentTimeCtx keyframeRegionDirectKeyCtx keyframeRegionDollyCtx ' +\n      'keyframeRegionInsertKeyCtx keyframeRegionMoveKeyCtx keyframeRegionScaleKeyCtx ' +\n      'keyframeRegionSelectKeyCtx keyframeRegionSetKeyCtx keyframeRegionTrackCtx ' +\n      'keyframeStats lassoContext lattice latticeDeformKeyCtx launch launchImageEditor ' +\n      'layerButton layeredShaderPort layeredTexturePort layout layoutDialog lightList ' +\n      'lightListEditor lightListPanel lightlink lineIntersection linearPrecision linstep ' +\n      'listAnimatable listAttr listCameras listConnections listDeviceAttachments listHistory ' +\n      'listInputDeviceAxes listInputDeviceButtons listInputDevices listMenuAnnotation ' +\n      'listNodeTypes listPanelCategories listRelatives listSets listTransforms ' +\n      'listUnselected listerEditor loadFluid loadNewShelf loadPlugin ' +\n      'loadPluginLanguageResources loadPrefObjects localizedPanelLabel lockNode loft log ' +\n      'longNameOf lookThru ls lsThroughFilter lsType lsUI Mayatomr mag makeIdentity makeLive ' +\n      'makePaintable makeRoll makeSingleSurface makeTubeOn makebot manipMoveContext ' +\n      'manipMoveLimitsCtx manipOptions manipRotateContext manipRotateLimitsCtx ' +\n      'manipScaleContext manipScaleLimitsCtx marker match max memory menu menuBarLayout ' +\n      'menuEditor menuItem menuItemToShelf menuSet menuSetPref messageLine min minimizeApp ' +\n      'mirrorJoint modelCurrentTimeCtx modelEditor modelPanel mouse movIn movOut move ' +\n      'moveIKtoFK moveKeyCtx moveVertexAlongDirection multiProfileBirailSurface mute ' +\n      'nParticle nameCommand nameField namespace namespaceInfo newPanelItems newton nodeCast ' +\n      'nodeIconButton nodeOutliner nodePreset nodeType noise nonLinear normalConstraint ' +\n      'normalize nurbsBoolean nurbsCopyUVSet nurbsCube nurbsEditUV nurbsPlane nurbsSelect ' +\n      'nurbsSquare nurbsToPoly nurbsToPolygonsPref nurbsToSubdiv nurbsToSubdivPref ' +\n      'nurbsUVSet nurbsViewDirectionVector objExists objectCenter objectLayer objectType ' +\n      'objectTypeUI obsoleteProc oceanNurbsPreviewPlane offsetCurve offsetCurveOnSurface ' +\n      'offsetSurface openGLExtension openMayaPref optionMenu optionMenuGrp optionVar orbit ' +\n      'orbitCtx orientConstraint outlinerEditor outlinerPanel overrideModifier ' +\n      'paintEffectsDisplay pairBlend palettePort paneLayout panel panelConfiguration ' +\n      'panelHistory paramDimContext paramDimension paramLocator parent parentConstraint ' +\n      'particle particleExists particleInstancer particleRenderInfo partition pasteKey ' +\n      'pathAnimation pause pclose percent performanceOptions pfxstrokes pickWalk picture ' +\n      'pixelMove planarSrf plane play playbackOptions playblast plugAttr plugNode pluginInfo ' +\n      'pluginResourceUtil pointConstraint pointCurveConstraint pointLight pointMatrixMult ' +\n      'pointOnCurve pointOnSurface pointPosition poleVectorConstraint polyAppend ' +\n      'polyAppendFacetCtx polyAppendVertex polyAutoProjection polyAverageNormal ' +\n      'polyAverageVertex polyBevel polyBlendColor polyBlindData polyBoolOp polyBridgeEdge ' +\n      'polyCacheMonitor polyCheck polyChipOff polyClipboard polyCloseBorder polyCollapseEdge ' +\n      'polyCollapseFacet polyColorBlindData polyColorDel polyColorPerVertex polyColorSet ' +\n      'polyCompare polyCone polyCopyUV polyCrease polyCreaseCtx polyCreateFacet ' +\n      'polyCreateFacetCtx polyCube polyCut polyCutCtx polyCylinder polyCylindricalProjection ' +\n      'polyDelEdge polyDelFacet polyDelVertex polyDuplicateAndConnect polyDuplicateEdge ' +\n      'polyEditUV polyEditUVShell polyEvaluate polyExtrudeEdge polyExtrudeFacet ' +\n      'polyExtrudeVertex polyFlipEdge polyFlipUV polyForceUV polyGeoSampler polyHelix ' +\n      'polyInfo polyInstallAction polyLayoutUV polyListComponentConversion polyMapCut ' +\n      'polyMapDel polyMapSew polyMapSewMove polyMergeEdge polyMergeEdgeCtx polyMergeFacet ' +\n      'polyMergeFacetCtx polyMergeUV polyMergeVertex polyMirrorFace polyMoveEdge ' +\n      'polyMoveFacet polyMoveFacetUV polyMoveUV polyMoveVertex polyNormal polyNormalPerVertex ' +\n      'polyNormalizeUV polyOptUvs polyOptions polyOutput polyPipe polyPlanarProjection ' +\n      'polyPlane polyPlatonicSolid polyPoke polyPrimitive polyPrism polyProjection ' +\n      'polyPyramid polyQuad polyQueryBlindData polyReduce polySelect polySelectConstraint ' +\n      'polySelectConstraintMonitor polySelectCtx polySelectEditCtx polySeparate ' +\n      'polySetToFaceNormal polySewEdge polyShortestPathCtx polySmooth polySoftEdge ' +\n      'polySphere polySphericalProjection polySplit polySplitCtx polySplitEdge polySplitRing ' +\n      'polySplitVertex polyStraightenUVBorder polySubdivideEdge polySubdivideFacet ' +\n      'polyToSubdiv polyTorus polyTransfer polyTriangulate polyUVSet polyUnite polyWedgeFace ' +\n      'popen popupMenu pose pow preloadRefEd print progressBar progressWindow projFileViewer ' +\n      'projectCurve projectTangent projectionContext projectionManip promptDialog propModCtx ' +\n      'propMove psdChannelOutliner psdEditTextureFile psdExport psdTextureFile putenv pwd ' +\n      'python querySubdiv quit rad_to_deg radial radioButton radioButtonGrp radioCollection ' +\n      'radioMenuItemCollection rampColorPort rand randomizeFollicles randstate rangeControl ' +\n      'readTake rebuildCurve rebuildSurface recordAttr recordDevice redo reference ' +\n      'referenceEdit referenceQuery refineSubdivSelectionList refresh refreshAE ' +\n      'registerPluginResource rehash reloadImage removeJoint removeMultiInstance ' +\n      'removePanelCategory rename renameAttr renameSelectionList renameUI render ' +\n      'renderGlobalsNode renderInfo renderLayerButton renderLayerParent ' +\n      'renderLayerPostProcess renderLayerUnparent renderManip renderPartition ' +\n      'renderQualityNode renderSettings renderThumbnailUpdate renderWindowEditor ' +\n      'renderWindowSelectContext renderer reorder reorderDeformers requires reroot ' +\n      'resampleFluid resetAE resetPfxToPolyCamera resetTool resolutionNode retarget ' +\n      'reverseCurve reverseSurface revolve rgb_to_hsv rigidBody rigidSolver roll rollCtx ' +\n      'rootOf rot rotate rotationInterpolation roundConstantRadius rowColumnLayout rowLayout ' +\n      'runTimeCommand runup sampleImage saveAllShelves saveAttrPreset saveFluid saveImage ' +\n      'saveInitialState saveMenu savePrefObjects savePrefs saveShelf saveToolSettings scale ' +\n      'scaleBrushBrightness scaleComponents scaleConstraint scaleKey scaleKeyCtx sceneEditor ' +\n      'sceneUIReplacement scmh scriptCtx scriptEditorInfo scriptJob scriptNode scriptTable ' +\n      'scriptToShelf scriptedPanel scriptedPanelType scrollField scrollLayout sculpt ' +\n      'searchPathArray seed selLoadSettings select selectContext selectCurveCV selectKey ' +\n      'selectKeyCtx selectKeyframeRegionCtx selectMode selectPref selectPriority selectType ' +\n      'selectedNodes selectionConnection separator setAttr setAttrEnumResource ' +\n      'setAttrMapping setAttrNiceNameResource setConstraintRestPosition ' +\n      'setDefaultShadingGroup setDrivenKeyframe setDynamic setEditCtx setEditor setFluidAttr ' +\n      'setFocus setInfinity setInputDeviceMapping setKeyCtx setKeyPath setKeyframe ' +\n      'setKeyframeBlendshapeTargetWts setMenuMode setNodeNiceNameResource setNodeTypeFlag ' +\n      'setParent setParticleAttr setPfxToPolyCamera setPluginResource setProject ' +\n      'setStampDensity setStartupMessage setState setToolTo setUITemplate setXformManip sets ' +\n      'shadingConnection shadingGeometryRelCtx shadingLightRelCtx shadingNetworkCompare ' +\n      'shadingNode shapeCompare shelfButton shelfLayout shelfTabLayout shellField ' +\n      'shortNameOf showHelp showHidden showManipCtx showSelectionInTitle ' +\n      'showShadingGroupAttrEditor showWindow sign simplify sin singleProfileBirailSurface ' +\n      'size sizeBytes skinCluster skinPercent smoothCurve smoothTangentSurface smoothstep ' +\n      'snap2to2 snapKey snapMode snapTogetherCtx snapshot soft softMod softModCtx sort sound ' +\n      'soundControl source spaceLocator sphere sphrand spotLight spotLightPreviewPort ' +\n      'spreadSheetEditor spring sqrt squareSurface srtContext stackTrace startString ' +\n      'startsWith stitchAndExplodeShell stitchSurface stitchSurfacePoints strcmp ' +\n      'stringArrayCatenate stringArrayContains stringArrayCount stringArrayInsertAtIndex ' +\n      'stringArrayIntersector stringArrayRemove stringArrayRemoveAtIndex ' +\n      'stringArrayRemoveDuplicates stringArrayRemoveExact stringArrayToString ' +\n      'stringToStringArray strip stripPrefixFromName stroke subdAutoProjection ' +\n      'subdCleanTopology subdCollapse subdDuplicateAndConnect subdEditUV ' +\n      'subdListComponentConversion subdMapCut subdMapSewMove subdMatchTopology subdMirror ' +\n      'subdToBlind subdToPoly subdTransferUVsToCache subdiv subdivCrease ' +\n      'subdivDisplaySmoothness substitute substituteAllString substituteGeometry substring ' +\n      'surface surfaceSampler surfaceShaderList swatchDisplayPort switchTable symbolButton ' +\n      'symbolCheckBox sysFile system tabLayout tan tangentConstraint texLatticeDeformContext ' +\n      'texManipContext texMoveContext texMoveUVShellContext texRotateContext texScaleContext ' +\n      'texSelectContext texSelectShortestPathCtx texSmudgeUVContext texWinToolCtx text ' +\n      'textCurves textField textFieldButtonGrp textFieldGrp textManip textScrollList ' +\n      'textToShelf textureDisplacePlane textureHairColor texturePlacementContext ' +\n      'textureWindow threadCount threePointArcCtx timeControl timePort timerX toNativePath ' +\n      'toggle toggleAxis toggleWindowVisibility tokenize tokenizeList tolerance tolower ' +\n      'toolButton toolCollection toolDropped toolHasOptions toolPropertyWindow torus toupper ' +\n      'trace track trackCtx transferAttributes transformCompare transformLimits translator ' +\n      'trim trunc truncateFluidCache truncateHairCache tumble tumbleCtx turbulence ' +\n      'twoPointArcCtx uiRes uiTemplate unassignInputDevice undo undoInfo ungroup uniform unit ' +\n      'unloadPlugin untangleUV untitledFileName untrim upAxis updateAE userCtx uvLink ' +\n      'uvSnapshot validateShelfName vectorize view2dToolCtx viewCamera viewClipPlane ' +\n      'viewFit viewHeadOn viewLookAt viewManip viewPlace viewSet visor volumeAxis vortex ' +\n      'waitCursor warning webBrowser webBrowserPrefs whatIs window windowPref wire ' +\n      'wireContext workspace wrinkle wrinkleContext writeTake xbmLangPathList xform',\n    illegal: '</',\n    contains: [\n      hljs.C_NUMBER_MODE,\n      hljs.APOS_STRING_MODE,\n      hljs.QUOTE_STRING_MODE,\n      {\n        className: 'string',\n        begin: '`', end: '`',\n        contains: [hljs.BACKSLASH_ESCAPE]\n      },\n      { // eats variables\n        begin: '[\\\\$\\\\%\\\\@](\\\\^\\\\w\\\\b|#\\\\w+|[^\\\\s\\\\w{]|{\\\\w+}|\\\\w+)'\n      },\n      hljs.C_LINE_COMMENT_MODE,\n      hljs.C_BLOCK_COMMENT_MODE\n    ]\n  };\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/languages/mercury.js",
    "content": "/*\nLanguage: Mercury\nAuthor: mucaho <mkucko@gmail.com>\nDescription: Mercury is a logic/functional programming language which combines the clarity and expressiveness of declarative programming with advanced static analysis and error detection features.\n*/\n\nfunction(hljs) {\n  var KEYWORDS = {\n    keyword:\n      'module use_module import_module include_module end_module initialise ' +\n      'mutable initialize finalize finalise interface implementation pred ' +\n      'mode func type inst solver any_pred any_func is semidet det nondet ' +\n      'multi erroneous failure cc_nondet cc_multi typeclass instance where ' +\n      'pragma promise external trace atomic or_else require_complete_switch ' +\n      'require_det require_semidet require_multi require_nondet ' +\n      'require_cc_multi require_cc_nondet require_erroneous require_failure',\n    meta:\n      // pragma\n      'inline no_inline type_spec source_file fact_table obsolete memo ' +\n      'loop_check minimal_model terminates does_not_terminate ' +\n      'check_termination promise_equivalent_clauses ' +\n      // preprocessor\n      'foreign_proc foreign_decl foreign_code foreign_type ' +\n      'foreign_import_module foreign_export_enum foreign_export ' +\n      'foreign_enum may_call_mercury will_not_call_mercury thread_safe ' +\n      'not_thread_safe maybe_thread_safe promise_pure promise_semipure ' +\n      'tabled_for_io local untrailed trailed attach_to_io_state ' +\n      'can_pass_as_mercury_type stable will_not_throw_exception ' +\n      'may_modify_trail will_not_modify_trail may_duplicate ' +\n      'may_not_duplicate affects_liveness does_not_affect_liveness ' +\n      'doesnt_affect_liveness no_sharing unknown_sharing sharing',\n    built_in:\n      'some all not if then else true fail false try catch catch_any ' +\n      'semidet_true semidet_false semidet_fail impure_true impure semipure'\n  };\n\n  var COMMENT = hljs.COMMENT('%', '$');\n\n  var NUMCODE = {\n    className: 'number',\n    begin: \"0'.\\\\|0[box][0-9a-fA-F]*\"\n  };\n\n  var ATOM = hljs.inherit(hljs.APOS_STRING_MODE, {relevance: 0});\n  var STRING = hljs.inherit(hljs.QUOTE_STRING_MODE, {relevance: 0});\n  var STRING_FMT = {\n    className: 'subst',\n    begin: '\\\\\\\\[abfnrtv]\\\\|\\\\\\\\x[0-9a-fA-F]*\\\\\\\\\\\\|%[-+# *.0-9]*[dioxXucsfeEgGp]',\n    relevance: 0\n  };\n  STRING.contains.push(STRING_FMT);\n\n  var IMPLICATION = {\n    className: 'built_in',\n    variants: [\n      {begin: '<=>'},\n      {begin: '<=', relevance: 0},\n      {begin: '=>', relevance: 0},\n      {begin: '/\\\\\\\\'},\n      {begin: '\\\\\\\\/'}\n    ]\n  };\n\n  var HEAD_BODY_CONJUNCTION = {\n    className: 'built_in',\n    variants: [\n      {begin: ':-\\\\|-->'},\n      {begin: '=', relevance: 0}\n    ]\n  };\n\n  return {\n    aliases: ['m', 'moo'],\n    keywords: KEYWORDS,\n    contains: [\n      IMPLICATION,\n      HEAD_BODY_CONJUNCTION,\n      COMMENT,\n      hljs.C_BLOCK_COMMENT_MODE,\n      NUMCODE,\n      hljs.NUMBER_MODE,\n      ATOM,\n      STRING,\n      {begin: /:-/} // relevance booster\n    ]\n  };\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/languages/mipsasm.js",
    "content": "/*\nLanguage: MIPS Assembly\nAuthor: Nebuleon Fumika <nebuleon.fumika@gmail.com>\nDescription: MIPS Assembly (up to MIPS32R2)\nCategory: assembler\n*/\n\nfunction(hljs) {\n    //local labels: %?[FB]?[AT]?\\d{1,2}\\w+\n  return {\n    case_insensitive: true,\n    aliases: ['mips'],\n    lexemes: '\\\\.?' + hljs.IDENT_RE,\n    keywords: {\n      meta:\n        //GNU preprocs\n        '.2byte .4byte .align .ascii .asciz .balign .byte .code .data .else .end .endif .endm .endr .equ .err .exitm .extern .global .hword .if .ifdef .ifndef .include .irp .long .macro .rept .req .section .set .skip .space .text .word .ltorg ',\n      built_in:\n        '$0 $1 $2 $3 $4 $5 $6 $7 $8 $9 $10 $11 $12 $13 $14 $15 ' + // integer registers\n        '$16 $17 $18 $19 $20 $21 $22 $23 $24 $25 $26 $27 $28 $29 $30 $31 ' + // integer registers\n        'zero at v0 v1 a0 a1 a2 a3 a4 a5 a6 a7 ' + // integer register aliases\n        't0 t1 t2 t3 t4 t5 t6 t7 t8 t9 s0 s1 s2 s3 s4 s5 s6 s7 s8 ' + // integer register aliases\n        'k0 k1 gp sp fp ra ' + // integer register aliases\n        '$f0 $f1 $f2 $f2 $f4 $f5 $f6 $f7 $f8 $f9 $f10 $f11 $f12 $f13 $f14 $f15 ' + // floating-point registers\n        '$f16 $f17 $f18 $f19 $f20 $f21 $f22 $f23 $f24 $f25 $f26 $f27 $f28 $f29 $f30 $f31 ' + // floating-point registers\n        'Context Random EntryLo0 EntryLo1 Context PageMask Wired EntryHi ' + // Coprocessor 0 registers\n        'HWREna BadVAddr Count Compare SR IntCtl SRSCtl SRSMap Cause EPC PRId ' + // Coprocessor 0 registers\n        'EBase Config Config1 Config2 Config3 LLAddr Debug DEPC DESAVE CacheErr ' + // Coprocessor 0 registers\n        'ECC ErrorEPC TagLo DataLo TagHi DataHi WatchLo WatchHi PerfCtl PerfCnt ' // Coprocessor 0 registers\n    },\n    contains: [\n      {\n        className: 'keyword',\n        begin: '\\\\b('+     //mnemonics\n            // 32-bit integer instructions\n            'addi?u?|andi?|b(al)?|beql?|bgez(al)?l?|bgtzl?|blezl?|bltz(al)?l?|' +\n            'bnel?|cl[oz]|divu?|ext|ins|j(al)?|jalr(\\.hb)?|jr(\\.hb)?|lbu?|lhu?|' +\n            'll|lui|lw[lr]?|maddu?|mfhi|mflo|movn|movz|move|msubu?|mthi|mtlo|mul|' +\n            'multu?|nop|nor|ori?|rotrv?|sb|sc|se[bh]|sh|sllv?|slti?u?|srav?|' +\n            'srlv?|subu?|sw[lr]?|xori?|wsbh|' +\n            // floating-point instructions\n            'abs\\.[sd]|add\\.[sd]|alnv.ps|bc1[ft]l?|' +\n            'c\\.(s?f|un|u?eq|[ou]lt|[ou]le|ngle?|seq|l[et]|ng[et])\\.[sd]|' +\n            '(ceil|floor|round|trunc)\\.[lw]\\.[sd]|cfc1|cvt\\.d\\.[lsw]|' +\n            'cvt\\.l\\.[dsw]|cvt\\.ps\\.s|cvt\\.s\\.[dlw]|cvt\\.s\\.p[lu]|cvt\\.w\\.[dls]|' +\n            'div\\.[ds]|ldx?c1|luxc1|lwx?c1|madd\\.[sd]|mfc1|mov[fntz]?\\.[ds]|' +\n            'msub\\.[sd]|mth?c1|mul\\.[ds]|neg\\.[ds]|nmadd\\.[ds]|nmsub\\.[ds]|' +\n            'p[lu][lu]\\.ps|recip\\.fmt|r?sqrt\\.[ds]|sdx?c1|sub\\.[ds]|suxc1|' +\n            'swx?c1|' +\n            // system control instructions\n            'break|cache|d?eret|[de]i|ehb|mfc0|mtc0|pause|prefx?|rdhwr|' +\n            'rdpgpr|sdbbp|ssnop|synci?|syscall|teqi?|tgei?u?|tlb(p|r|w[ir])|' +\n            'tlti?u?|tnei?|wait|wrpgpr'+\n        ')',\n        end: '\\\\s'\n      },\n      hljs.COMMENT('[;#]', '$'),\n      hljs.C_BLOCK_COMMENT_MODE,\n      hljs.QUOTE_STRING_MODE,\n      {\n        className: 'string',\n        begin: '\\'',\n        end: '[^\\\\\\\\]\\'',\n        relevance: 0\n      },\n      {\n        className: 'title',\n        begin: '\\\\|', end: '\\\\|',\n        illegal: '\\\\n',\n        relevance: 0\n      },\n      {\n        className: 'number',\n        variants: [\n            {begin: '0x[0-9a-f]+'}, //hex\n            {begin: '\\\\b-?\\\\d+'}           //bare number\n        ],\n        relevance: 0\n      },\n      {\n        className: 'symbol',\n        variants: [\n            {begin: '^\\\\s*[a-z_\\\\.\\\\$][a-z0-9_\\\\.\\\\$]+:'}, //GNU MIPS syntax\n            {begin: '^\\\\s*[0-9]+:'}, // numbered local labels\n            {begin: '[0-9]+[bf]' }  // number local label reference (backwards, forwards)\n        ],\n        relevance: 0\n      }\n    ],\n    illegal: '\\/'\n  };\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/languages/mizar.js",
    "content": "/*\nLanguage: Mizar\nAuthor: Kelley van Evert <kelleyvanevert@gmail.com>\nCategory: scientific\n*/\n\nfunction(hljs) {\n  return {\n    keywords:\n      'environ vocabularies notations constructors definitions ' +\n      'registrations theorems schemes requirements begin end definition ' +\n      'registration cluster existence pred func defpred deffunc theorem ' +\n      'proof let take assume then thus hence ex for st holds consider ' +\n      'reconsider such that and in provided of as from be being by means ' +\n      'equals implies iff redefine define now not or attr is mode ' +\n      'suppose per cases set thesis contradiction scheme reserve struct ' +\n      'correctness compatibility coherence symmetry assymetry ' +\n      'reflexivity irreflexivity connectedness uniqueness commutativity ' +\n      'idempotence involutiveness projectivity',\n    contains: [\n      hljs.COMMENT('::', '$')\n    ]\n  };\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/languages/mojolicious.js",
    "content": "/*\nLanguage: Mojolicious\nRequires: xml.js, perl.js\nAuthor: Dotan Dimet <dotan@corky.net>\nDescription: Mojolicious .ep (Embedded Perl) templates\nCategory: template\n*/\nfunction(hljs) {\n  return {\n    subLanguage: 'xml',\n    contains: [\n      {\n        className: 'meta',\n        begin: '^__(END|DATA)__$'\n      },\n    // mojolicious line\n      {\n        begin: \"^\\\\s*%{1,2}={0,2}\", end: '$',\n        subLanguage: 'perl'\n      },\n    // mojolicious block\n      {\n        begin: \"<%{1,2}={0,2}\",\n        end: \"={0,1}%>\",\n        subLanguage: 'perl',\n        excludeBegin: true,\n        excludeEnd: true\n      }\n    ]\n  };\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/languages/monkey.js",
    "content": "/*\nLanguage: Monkey\nAuthor: Arthur Bikmullin <devolonter@gmail.com>\n*/\n\nfunction(hljs) {\n  var NUMBER = {\n    className: 'number', relevance: 0,\n    variants: [\n      {\n        begin: '[$][a-fA-F0-9]+'\n      },\n      hljs.NUMBER_MODE\n    ]\n  };\n\n  return {\n    case_insensitive: true,\n    keywords: {\n      keyword: 'public private property continue exit extern new try catch ' +\n        'eachin not abstract final select case default const local global field ' +\n        'end if then else elseif endif while wend repeat until forever for ' +\n        'to step next return module inline throw import',\n\n      built_in: 'DebugLog DebugStop Error Print ACos ACosr ASin ASinr ATan ATan2 ATan2r ATanr Abs Abs Ceil ' +\n        'Clamp Clamp Cos Cosr Exp Floor Log Max Max Min Min Pow Sgn Sgn Sin Sinr Sqrt Tan Tanr Seed PI HALFPI TWOPI',\n\n      literal: 'true false null and or shl shr mod'\n    },\n    illegal: /\\/\\*/,\n    contains: [\n      hljs.COMMENT('#rem', '#end'),\n      hljs.COMMENT(\n        \"'\",\n        '$',\n        {\n          relevance: 0\n        }\n      ),\n      {\n        className: 'function',\n        beginKeywords: 'function method', end: '[(=:]|$',\n        illegal: /\\n/,\n        contains: [\n          hljs.UNDERSCORE_TITLE_MODE\n        ]\n      },\n      {\n        className: 'class',\n        beginKeywords: 'class interface', end: '$',\n        contains: [\n          {\n            beginKeywords: 'extends implements'\n          },\n          hljs.UNDERSCORE_TITLE_MODE\n        ]\n      },\n      {\n        className: 'built_in',\n        begin: '\\\\b(self|super)\\\\b'\n      },\n      {\n        className: 'meta',\n        begin: '\\\\s*#', end: '$',\n        keywords: {'meta-keyword': 'if else elseif endif end then'}\n      },\n      {\n        className: 'meta',\n        begin: '^\\\\s*strict\\\\b'\n      },\n      {\n        beginKeywords: 'alias', end: '=',\n        contains: [hljs.UNDERSCORE_TITLE_MODE]\n      },\n      hljs.QUOTE_STRING_MODE,\n      NUMBER\n    ]\n  }\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/languages/moonscript.js",
    "content": "/*\nLanguage: MoonScript\nAuthor: Billy Quith <chinbillybilbo@gmail.com>\nDescription: MoonScript is a programming language that transcompiles to Lua. For info about language see http://moonscript.org/\nOrigin: coffeescript.js\nCategory: scripting\n*/\n\nfunction(hljs) {\n  var KEYWORDS = {\n    keyword:\n      // Moonscript keywords\n      'if then not for in while do return else elseif break continue switch and or ' +\n      'unless when class extends super local import export from using',\n    literal:\n      'true false nil',\n    built_in:\n      '_G _VERSION assert collectgarbage dofile error getfenv getmetatable ipairs load ' +\n      'loadfile loadstring module next pairs pcall print rawequal rawget rawset require ' +\n      'select setfenv setmetatable tonumber tostring type unpack xpcall coroutine debug ' +\n      'io math os package string table'\n  };\n  var JS_IDENT_RE = '[A-Za-z$_][0-9A-Za-z$_]*';\n  var SUBST = {\n    className: 'subst',\n    begin: /#\\{/, end: /}/,\n    keywords: KEYWORDS\n  };\n  var EXPRESSIONS = [\n    hljs.inherit(hljs.C_NUMBER_MODE,\n      {starts: {end: '(\\\\s*/)?', relevance: 0}}), // a number tries to eat the following slash to prevent treating it as a regexp\n    {\n      className: 'string',\n      variants: [\n        {\n          begin: /'/, end: /'/,\n          contains: [hljs.BACKSLASH_ESCAPE]\n        },\n        {\n          begin: /\"/, end: /\"/,\n          contains: [hljs.BACKSLASH_ESCAPE, SUBST]\n        }\n      ]\n    },\n    {\n      className: 'built_in',\n      begin: '@__' + hljs.IDENT_RE\n    },\n    {\n      begin: '@' + hljs.IDENT_RE // relevance booster on par with CoffeeScript\n    },\n    {\n      begin: hljs.IDENT_RE + '\\\\\\\\' + hljs.IDENT_RE // inst\\method\n    }\n  ];\n  SUBST.contains = EXPRESSIONS;\n\n  var TITLE = hljs.inherit(hljs.TITLE_MODE, {begin: JS_IDENT_RE});\n  var PARAMS_RE = '(\\\\(.*\\\\))?\\\\s*\\\\B[-=]>';\n  var PARAMS = {\n    className: 'params',\n    begin: '\\\\([^\\\\(]', returnBegin: true,\n    /* We need another contained nameless mode to not have every nested\n    pair of parens to be called \"params\" */\n    contains: [{\n      begin: /\\(/, end: /\\)/,\n      keywords: KEYWORDS,\n      contains: ['self'].concat(EXPRESSIONS)\n    }]\n  };\n\n  return {\n    aliases: ['moon'],\n    keywords: KEYWORDS,\n    illegal: /\\/\\*/,\n    contains: EXPRESSIONS.concat([\n      hljs.COMMENT('--', '$'),\n      {\n        className: 'function',  // function: -> =>\n        begin: '^\\\\s*' + JS_IDENT_RE + '\\\\s*=\\\\s*' + PARAMS_RE, end: '[-=]>',\n        returnBegin: true,\n        contains: [TITLE, PARAMS]\n      },\n      {\n        begin: /[\\(,:=]\\s*/, // anonymous function start\n        relevance: 0,\n        contains: [\n          {\n            className: 'function',\n            begin: PARAMS_RE, end: '[-=]>',\n            returnBegin: true,\n            contains: [PARAMS]\n          }\n        ]\n      },\n      {\n        className: 'class',\n        beginKeywords: 'class',\n        end: '$',\n        illegal: /[:=\"\\[\\]]/,\n        contains: [\n          {\n            beginKeywords: 'extends',\n            endsWithParent: true,\n            illegal: /[:=\"\\[\\]]/,\n            contains: [TITLE]\n          },\n          TITLE\n        ]\n      },\n      {\n        className: 'name',    // table\n        begin: JS_IDENT_RE + ':', end: ':',\n        returnBegin: true, returnEnd: true,\n        relevance: 0\n      }\n    ])\n  };\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/languages/nginx.js",
    "content": "/*\nLanguage: Nginx\nAuthor: Peter Leonov <gojpeg@yandex.ru>\nContributors: Ivan Sagalaev <maniac@softwaremaniacs.org>\nCategory: common, config\n*/\n\nfunction(hljs) {\n  var VAR = {\n    className: 'variable',\n    variants: [\n      {begin: /\\$\\d+/},\n      {begin: /\\$\\{/, end: /}/},\n      {begin: '[\\\\$\\\\@]' + hljs.UNDERSCORE_IDENT_RE}\n    ]\n  };\n  var DEFAULT = {\n    endsWithParent: true,\n    lexemes: '[a-z/_]+',\n    keywords: {\n      literal:\n        'on off yes no true false none blocked debug info notice warn error crit ' +\n        'select break last permanent redirect kqueue rtsig epoll poll /dev/poll'\n    },\n    relevance: 0,\n    illegal: '=>',\n    contains: [\n      hljs.HASH_COMMENT_MODE,\n      {\n        className: 'string',\n        contains: [hljs.BACKSLASH_ESCAPE, VAR],\n        variants: [\n          {begin: /\"/, end: /\"/},\n          {begin: /'/, end: /'/}\n        ]\n      },\n      // this swallows entire URLs to avoid detecting numbers within\n      {\n        begin: '([a-z]+):/', end: '\\\\s', endsWithParent: true, excludeEnd: true,\n        contains: [VAR]\n      },\n      {\n        className: 'regexp',\n        contains: [hljs.BACKSLASH_ESCAPE, VAR],\n        variants: [\n          {begin: \"\\\\s\\\\^\", end: \"\\\\s|{|;\", returnEnd: true},\n          // regexp locations (~, ~*)\n          {begin: \"~\\\\*?\\\\s+\", end: \"\\\\s|{|;\", returnEnd: true},\n          // *.example.com\n          {begin: \"\\\\*(\\\\.[a-z\\\\-]+)+\"},\n          // sub.example.*\n          {begin: \"([a-z\\\\-]+\\\\.)+\\\\*\"}\n        ]\n      },\n      // IP\n      {\n        className: 'number',\n        begin: '\\\\b\\\\d{1,3}\\\\.\\\\d{1,3}\\\\.\\\\d{1,3}\\\\.\\\\d{1,3}(:\\\\d{1,5})?\\\\b'\n      },\n      // units\n      {\n        className: 'number',\n        begin: '\\\\b\\\\d+[kKmMgGdshdwy]*\\\\b',\n        relevance: 0\n      },\n      VAR\n    ]\n  };\n\n  return {\n    aliases: ['nginxconf'],\n    contains: [\n      hljs.HASH_COMMENT_MODE,\n      {\n        begin: hljs.UNDERSCORE_IDENT_RE + '\\\\s+{', returnBegin: true,\n        end: '{',\n        contains: [\n          {\n            className: 'section',\n            begin: hljs.UNDERSCORE_IDENT_RE\n          }\n        ],\n        relevance: 0\n      },\n      {\n        begin: hljs.UNDERSCORE_IDENT_RE + '\\\\s', end: ';|{', returnBegin: true,\n        contains: [\n          {\n            className: 'attribute',\n            begin: hljs.UNDERSCORE_IDENT_RE,\n            starts: DEFAULT\n          }\n        ],\n        relevance: 0\n      }\n    ],\n    illegal: '[^\\\\s\\\\}]'\n  };\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/languages/nimrod.js",
    "content": "/*\nLanguage: Nimrod\n*/\n\nfunction(hljs) {\n  return {\n    aliases: ['nim'],\n    keywords: {\n      keyword:\n        'addr and as asm bind block break case cast const continue converter ' +\n        'discard distinct div do elif else end enum except export finally ' +\n        'for from generic if import in include interface is isnot iterator ' +\n        'let macro method mixin mod nil not notin object of or out proc ptr ' +\n        'raise ref return shl shr static template try tuple type using var ' +\n        'when while with without xor yield',\n      literal:\n        'shared guarded stdin stdout stderr result true false',\n      built_in:\n        'int int8 int16 int32 int64 uint uint8 uint16 uint32 uint64 float ' +\n        'float32 float64 bool char string cstring pointer expr stmt void ' +\n        'auto any range array openarray varargs seq set clong culong cchar ' +\n        'cschar cshort cint csize clonglong cfloat cdouble clongdouble ' +\n        'cuchar cushort cuint culonglong cstringarray semistatic'\n    },\n    contains: [ {\n        className: 'meta', // Actually pragma\n        begin: /{\\./,\n        end: /\\.}/,\n        relevance: 10\n      }, {\n        className: 'string',\n        begin: /[a-zA-Z]\\w*\"/,\n        end: /\"/,\n        contains: [{begin: /\"\"/}]\n      }, {\n        className: 'string',\n        begin: /([a-zA-Z]\\w*)?\"\"\"/,\n        end: /\"\"\"/\n      },\n      hljs.QUOTE_STRING_MODE,\n      {\n        className: 'type',\n        begin: /\\b[A-Z]\\w+\\b/,\n        relevance: 0\n      }, {\n        className: 'number',\n        relevance: 0,\n        variants: [\n          {begin: /\\b(0[xX][0-9a-fA-F][_0-9a-fA-F]*)('?[iIuU](8|16|32|64))?/},\n          {begin: /\\b(0o[0-7][_0-7]*)('?[iIuUfF](8|16|32|64))?/},\n          {begin: /\\b(0(b|B)[01][_01]*)('?[iIuUfF](8|16|32|64))?/},\n          {begin: /\\b(\\d[_\\d]*)('?[iIuUfF](8|16|32|64))?/}\n        ]\n      },\n      hljs.HASH_COMMENT_MODE\n    ]\n  }\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/languages/nix.js",
    "content": "/*\nLanguage: Nix\nAuthor: Domen Kožar <domen@dev.si>\nDescription: Nix functional language. See http://nixos.org/nix\n*/\n\n\nfunction(hljs) {\n  var NIX_KEYWORDS = {\n    keyword:\n      'rec with let in inherit assert if else then',\n    literal:\n      'true false or and null',\n    built_in:\n      'import abort baseNameOf dirOf isNull builtins map removeAttrs throw ' +\n      'toString derivation'\n  };\n  var ANTIQUOTE = {\n    className: 'subst',\n    begin: /\\$\\{/,\n    end: /}/,\n    keywords: NIX_KEYWORDS\n  };\n  var ATTRS = {\n    begin: /[a-zA-Z0-9-_]+(\\s*=)/, returnBegin: true,\n    relevance: 0,\n    contains: [\n      {\n        className: 'attr',\n        begin: /\\S+/\n      }\n    ]\n  };\n  var STRING = {\n    className: 'string',\n    contains: [ANTIQUOTE],\n    variants: [\n      {begin: \"''\", end: \"''\"},\n      {begin: '\"', end: '\"'}\n    ]\n  };\n  var EXPRESSIONS = [\n    hljs.NUMBER_MODE,\n    hljs.HASH_COMMENT_MODE,\n    hljs.C_BLOCK_COMMENT_MODE,\n    STRING,\n    ATTRS\n  ];\n  ANTIQUOTE.contains = EXPRESSIONS;\n  return {\n    aliases: [\"nixos\"],\n    keywords: NIX_KEYWORDS,\n    contains: EXPRESSIONS\n  };\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/languages/nsis.js",
    "content": "/*\nLanguage: NSIS\nDescription: Nullsoft Scriptable Install System\nAuthor: Jan T. Sott <jan.sott@gmail.com>\nWebsite: http://github.com/idleberg\n*/\n\nfunction(hljs) {\n  var CONSTANTS = {\n    className: 'variable',\n    begin: /\\$(ADMINTOOLS|APPDATA|CDBURN_AREA|CMDLINE|COMMONFILES32|COMMONFILES64|COMMONFILES|COOKIES|DESKTOP|DOCUMENTS|EXEDIR|EXEFILE|EXEPATH|FAVORITES|FONTS|HISTORY|HWNDPARENT|INSTDIR|INTERNET_CACHE|LANGUAGE|LOCALAPPDATA|MUSIC|NETHOOD|OUTDIR|PICTURES|PLUGINSDIR|PRINTHOOD|PROFILE|PROGRAMFILES32|PROGRAMFILES64|PROGRAMFILES|QUICKLAUNCH|RECENT|RESOURCES_LOCALIZED|RESOURCES|SENDTO|SMPROGRAMS|SMSTARTUP|STARTMENU|SYSDIR|TEMP|TEMPLATES|VIDEOS|WINDIR)/\n  };\n\n  var DEFINES = {\n    // ${defines}\n    className: 'variable',\n    begin: /\\$+{[\\w\\.:-]+}/\n  };\n\n  var VARIABLES = {\n    // $variables\n    className: 'variable',\n    begin: /\\$+\\w+/,\n    illegal: /\\(\\){}/\n  };\n\n  var LANGUAGES = {\n    // $(language_strings)\n    className: 'variable',\n    begin: /\\$+\\([\\w\\^\\.:-]+\\)/\n  };\n\n  var PARAMETERS = {\n    // command parameters\n    className: 'params',\n    begin: '(ARCHIVE|FILE_ATTRIBUTE_ARCHIVE|FILE_ATTRIBUTE_NORMAL|FILE_ATTRIBUTE_OFFLINE|FILE_ATTRIBUTE_READONLY|FILE_ATTRIBUTE_SYSTEM|FILE_ATTRIBUTE_TEMPORARY|HKCR|HKCU|HKDD|HKEY_CLASSES_ROOT|HKEY_CURRENT_CONFIG|HKEY_CURRENT_USER|HKEY_DYN_DATA|HKEY_LOCAL_MACHINE|HKEY_PERFORMANCE_DATA|HKEY_USERS|HKLM|HKPD|HKU|IDABORT|IDCANCEL|IDIGNORE|IDNO|IDOK|IDRETRY|IDYES|MB_ABORTRETRYIGNORE|MB_DEFBUTTON1|MB_DEFBUTTON2|MB_DEFBUTTON3|MB_DEFBUTTON4|MB_ICONEXCLAMATION|MB_ICONINFORMATION|MB_ICONQUESTION|MB_ICONSTOP|MB_OK|MB_OKCANCEL|MB_RETRYCANCEL|MB_RIGHT|MB_RTLREADING|MB_SETFOREGROUND|MB_TOPMOST|MB_USERICON|MB_YESNO|NORMAL|OFFLINE|READONLY|SHCTX|SHELL_CONTEXT|SYSTEM|TEMPORARY)'\n  };\n\n  var COMPILER = {\n    // !compiler_flags\n    className: 'keyword',\n    begin: /\\!(addincludedir|addplugindir|appendfile|cd|define|delfile|echo|else|endif|error|execute|finalize|getdllversionsystem|ifdef|ifmacrodef|ifmacrondef|ifndef|if|include|insertmacro|macroend|macro|makensis|packhdr|searchparse|searchreplace|tempfile|undef|verbose|warning)/\n  };\n\n  var METACHARS = {\n    // $\\n, $\\r, $\\t, $$\n    className: 'subst',\n    begin: /\\$(\\\\[nrt]|\\$)/\n  };\n\n  var PLUGINS = {\n    // plug::ins\n    className: 'class',\n    begin: /\\w+\\:\\:\\w+/\n  };\n\n    var STRING = {\n      className: 'string',\n      variants: [\n        {\n          begin: '\"', end: '\"'\n        },\n        {\n          begin: '\\'', end: '\\''\n        },\n        {\n          begin: '`', end: '`'\n        }\n      ],\n      illegal: /\\n/,\n      contains: [\n        METACHARS,\n        CONSTANTS,\n        DEFINES,\n        VARIABLES,\n        LANGUAGES\n      ]\n  };\n\n  return {\n    case_insensitive: false,\n    keywords: {\n      keyword:\n      'Abort AddBrandingImage AddSize AllowRootDirInstall AllowSkipFiles AutoCloseWindow BGFont BGGradient BrandingText BringToFront Call CallInstDLL Caption ChangeUI CheckBitmap ClearErrors CompletedText ComponentText CopyFiles CRCCheck CreateDirectory CreateFont CreateShortCut Delete DeleteINISec DeleteINIStr DeleteRegKey DeleteRegValue DetailPrint DetailsButtonText DirText DirVar DirVerify EnableWindow EnumRegKey EnumRegValue Exch Exec ExecShell ExecWait ExpandEnvStrings File FileBufSize FileClose FileErrorText FileOpen FileRead FileReadByte FileReadUTF16LE FileReadWord FileSeek FileWrite FileWriteByte FileWriteUTF16LE FileWriteWord FindClose FindFirst FindNext FindWindow FlushINI FunctionEnd GetCurInstType GetCurrentAddress GetDlgItem GetDLLVersion GetDLLVersionLocal GetErrorLevel GetFileTime GetFileTimeLocal GetFullPathName GetFunctionAddress GetInstDirError GetLabelAddress GetTempFileName Goto HideWindow Icon IfAbort IfErrors IfFileExists IfRebootFlag IfSilent InitPluginsDir InstallButtonText InstallColors InstallDir InstallDirRegKey InstProgressFlags InstType InstTypeGetText InstTypeSetText IntCmp IntCmpU IntFmt IntOp IsWindow LangString LicenseBkColor LicenseData LicenseForceSelection LicenseLangString LicenseText LoadLanguageFile LockWindow LogSet LogText ManifestDPIAware ManifestSupportedOS MessageBox MiscButtonText Name Nop OutFile Page PageCallbacks PageExEnd Pop Push Quit ReadEnvStr ReadINIStr ReadRegDWORD ReadRegStr Reboot RegDLL Rename RequestExecutionLevel ReserveFile Return RMDir SearchPath SectionEnd SectionGetFlags SectionGetInstTypes SectionGetSize SectionGetText SectionGroupEnd SectionIn SectionSetFlags SectionSetInstTypes SectionSetSize SectionSetText SendMessage SetAutoClose SetBrandingImage SetCompress SetCompressor SetCompressorDictSize SetCtlColors SetCurInstType SetDatablockOptimize SetDateSave SetDetailsPrint SetDetailsView SetErrorLevel SetErrors SetFileAttributes SetFont SetOutPath SetOverwrite SetRebootFlag SetRegView SetShellVarContext SetSilent ShowInstDetails ShowUninstDetails ShowWindow SilentInstall SilentUnInstall Sleep SpaceTexts StrCmp StrCmpS StrCpy StrLen SubCaption Unicode UninstallButtonText UninstallCaption UninstallIcon UninstallSubCaption UninstallText UninstPage UnRegDLL Var VIAddVersionKey VIFileVersion VIProductVersion WindowIcon WriteINIStr WriteRegBin WriteRegDWORD WriteRegExpandStr WriteRegStr WriteUninstaller XPStyle',\n      literal:\n      'admin all auto both bottom bzip2 colored components current custom directory false force hide highest ifdiff ifnewer instfiles lastused leave left license listonly lzma nevershow none normal notset off on open print right show silent silentlog smooth textonly top true try un.components un.custom un.directory un.instfiles un.license uninstConfirm user Win10 Win7 Win8 WinVista zlib'\n    },\n    contains: [\n      hljs.HASH_COMMENT_MODE,\n      hljs.C_BLOCK_COMMENT_MODE,\n      hljs.COMMENT(\n        ';',\n        '$',\n        {\n          relevance: 0\n        }\n      ),\n      {\n        className: 'function',\n        beginKeywords: 'Function PageEx Section SectionGroup', end: '$'\n      },\n      STRING,\n      COMPILER,\n      DEFINES,\n      VARIABLES,\n      LANGUAGES,\n      PARAMETERS,\n      PLUGINS,\n      hljs.NUMBER_MODE\n    ]\n  };\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/languages/objectivec.js",
    "content": "/*\nLanguage: Objective-C\nAuthor: Valerii Hiora <valerii.hiora@gmail.com>\nContributors: Angel G. Olloqui <angelgarcia.mail@gmail.com>, Matt Diephouse <matt@diephouse.com>, Andrew Farmer <ahfarmer@gmail.com>, Minh Nguyễn <mxn@1ec5.org>\nCategory: common\n*/\n\nfunction(hljs) {\n  var API_CLASS = {\n    className: 'built_in',\n    begin: '\\\\b(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)\\\\w+',\n  };\n  var OBJC_KEYWORDS = {\n    keyword:\n      'int float while char export sizeof typedef const struct for union ' +\n      'unsigned long volatile static bool mutable if do return goto void ' +\n      'enum else break extern asm case short default double register explicit ' +\n      'signed typename this switch continue wchar_t inline readonly assign ' +\n      'readwrite self @synchronized id typeof ' +\n      'nonatomic super unichar IBOutlet IBAction strong weak copy ' +\n      'in out inout bycopy byref oneway __strong __weak __block __autoreleasing ' +\n      '@private @protected @public @try @property @end @throw @catch @finally ' +\n      '@autoreleasepool @synthesize @dynamic @selector @optional @required ' +\n      '@encode @package @import @defs @compatibility_alias ' +\n      '__bridge __bridge_transfer __bridge_retained __bridge_retain ' +\n      '__covariant __contravariant __kindof ' +\n      '_Nonnull _Nullable _Null_unspecified ' +\n      '__FUNCTION__ __PRETTY_FUNCTION__ __attribute__ ' +\n      'getter setter retain unsafe_unretained ' +\n      'nonnull nullable null_unspecified null_resettable class instancetype ' +\n      'NS_DESIGNATED_INITIALIZER NS_UNAVAILABLE NS_REQUIRES_SUPER ' +\n      'NS_RETURNS_INNER_POINTER NS_INLINE NS_AVAILABLE NS_DEPRECATED ' +\n      'NS_ENUM NS_OPTIONS NS_SWIFT_UNAVAILABLE ' +\n      'NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_END ' +\n      'NS_REFINED_FOR_SWIFT NS_SWIFT_NAME NS_SWIFT_NOTHROW ' +\n      'NS_DURING NS_HANDLER NS_ENDHANDLER NS_VALUERETURN NS_VOIDRETURN',\n    literal:\n      'false true FALSE TRUE nil YES NO NULL',\n    built_in:\n      'BOOL dispatch_once_t dispatch_queue_t dispatch_sync dispatch_async dispatch_once'\n  };\n  var LEXEMES = /[a-zA-Z@][a-zA-Z0-9_]*/;\n  var CLASS_KEYWORDS = '@interface @class @protocol @implementation';\n  return {\n    aliases: ['mm', 'objc', 'obj-c'],\n    keywords: OBJC_KEYWORDS,\n    lexemes: LEXEMES,\n    illegal: '</',\n    contains: [\n      API_CLASS,\n      hljs.C_LINE_COMMENT_MODE,\n      hljs.C_BLOCK_COMMENT_MODE,\n      hljs.C_NUMBER_MODE,\n      hljs.QUOTE_STRING_MODE,\n      {\n        className: 'string',\n        variants: [\n          {\n            begin: '@\"', end: '\"',\n            illegal: '\\\\n',\n            contains: [hljs.BACKSLASH_ESCAPE]\n          },\n          {\n            begin: '\\'', end: '[^\\\\\\\\]\\'',\n            illegal: '[^\\\\\\\\][^\\']'\n          }\n        ]\n      },\n      {\n        className: 'meta',\n        begin: '#',\n        end: '$',\n        contains: [\n          {\n            className: 'meta-string',\n            variants: [\n              { begin: '\\\"', end: '\\\"' },\n              { begin: '<', end: '>' }\n            ]\n          }\n        ]\n      },\n      {\n        className: 'class',\n        begin: '(' + CLASS_KEYWORDS.split(' ').join('|') + ')\\\\b', end: '({|$)', excludeEnd: true,\n        keywords: CLASS_KEYWORDS, lexemes: LEXEMES,\n        contains: [\n          hljs.UNDERSCORE_TITLE_MODE\n        ]\n      },\n      {\n        begin: '\\\\.'+hljs.UNDERSCORE_IDENT_RE,\n        relevance: 0\n      }\n    ]\n  };\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/languages/ocaml.js",
    "content": "/*\nLanguage: OCaml\nAuthor: Mehdi Dogguy <mehdi@dogguy.org>\nContributors: Nicolas Braud-Santoni <nicolas.braud-santoni@ens-cachan.fr>, Mickael Delahaye <mickael.delahaye@gmail.com>\nDescription: OCaml language definition.\nCategory: functional\n*/\nfunction(hljs) {\n  /* missing support for heredoc-like string (OCaml 4.0.2+) */\n  return {\n    aliases: ['ml'],\n    keywords: {\n      keyword:\n        'and as assert asr begin class constraint do done downto else end ' +\n        'exception external for fun function functor if in include ' +\n        'inherit! inherit initializer land lazy let lor lsl lsr lxor match method!|10 method ' +\n        'mod module mutable new object of open! open or private rec sig struct ' +\n        'then to try type val! val virtual when while with ' +\n        /* camlp4 */\n        'parser value',\n      built_in:\n        /* built-in types */\n        'array bool bytes char exn|5 float int int32 int64 list lazy_t|5 nativeint|5 string unit ' +\n        /* (some) types in Pervasives */\n        'in_channel out_channel ref',\n      literal:\n        'true false'\n    },\n    illegal: /\\/\\/|>>/,\n    lexemes: '[a-z_]\\\\w*!?',\n    contains: [\n      {\n        className: 'literal',\n        begin: '\\\\[(\\\\|\\\\|)?\\\\]|\\\\(\\\\)',\n        relevance: 0\n      },\n      hljs.COMMENT(\n        '\\\\(\\\\*',\n        '\\\\*\\\\)',\n        {\n          contains: ['self']\n        }\n      ),\n      { /* type variable */\n        className: 'symbol',\n        begin: '\\'[A-Za-z_](?!\\')[\\\\w\\']*'\n        /* the grammar is ambiguous on how 'a'b should be interpreted but not the compiler */\n      },\n      { /* polymorphic variant */\n        className: 'type',\n        begin: '`[A-Z][\\\\w\\']*'\n      },\n      { /* module or constructor */\n        className: 'type',\n        begin: '\\\\b[A-Z][\\\\w\\']*',\n        relevance: 0\n      },\n      { /* don't color identifiers, but safely catch all identifiers with '*/\n        begin: '[a-z_]\\\\w*\\'[\\\\w\\']*', relevance: 0\n      },\n      hljs.inherit(hljs.APOS_STRING_MODE, {className: 'string', relevance: 0}),\n      hljs.inherit(hljs.QUOTE_STRING_MODE, {illegal: null}),\n      {\n        className: 'number',\n        begin:\n          '\\\\b(0[xX][a-fA-F0-9_]+[Lln]?|' +\n          '0[oO][0-7_]+[Lln]?|' +\n          '0[bB][01_]+[Lln]?|' +\n          '[0-9][0-9_]*([Lln]|(\\\\.[0-9_]*)?([eE][-+]?[0-9_]+)?)?)',\n        relevance: 0\n      },\n      {\n        begin: /[-=]>/ // relevance booster\n      }\n    ]\n  }\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/languages/openscad.js",
    "content": "/*\nLanguage: OpenSCAD\nAuthor: Dan Panzarella <alsoelp@gmail.com>\nDescription: OpenSCAD is a language for the 3D CAD modeling software of the same name.\nCategory: scientific\n*/\n\nfunction(hljs) {\n\tvar SPECIAL_VARS = {\n\t\tclassName: 'keyword',\n\t\tbegin: '\\\\$(f[asn]|t|vp[rtd]|children)'\n\t},\n\tLITERALS = {\n\t\tclassName: 'literal',\n\t\tbegin: 'false|true|PI|undef'\n\t},\n\tNUMBERS = {\n\t\tclassName: 'number',\n\t\tbegin: '\\\\b\\\\d+(\\\\.\\\\d+)?(e-?\\\\d+)?', //adds 1e5, 1e-10\n\t\trelevance: 0\n\t},\n\tSTRING = hljs.inherit(hljs.QUOTE_STRING_MODE,{illegal: null}),\n\tPREPRO = {\n\t\tclassName: 'meta',\n\t\tkeywords: {'meta-keyword': 'include use'},\n\t\tbegin: 'include|use <',\n\t\tend: '>'\n\t},\n\tPARAMS = {\n\t\tclassName: 'params',\n\t\tbegin: '\\\\(', end: '\\\\)',\n\t\tcontains: ['self', NUMBERS, STRING, SPECIAL_VARS, LITERALS]\n\t},\n\tMODIFIERS = {\n\t\tbegin: '[*!#%]',\n\t\trelevance: 0\n\t},\n\tFUNCTIONS = {\n\t\tclassName: 'function',\n\t\tbeginKeywords: 'module function',\n\t\tend: '\\\\=|\\\\{',\n\t\tcontains: [PARAMS, hljs.UNDERSCORE_TITLE_MODE]\n\t};\n\n\treturn {\n\t\taliases: ['scad'],\n\t\tkeywords: {\n\t\t\tkeyword: 'function module include use for intersection_for if else \\\\%',\n\t\t\tliteral: 'false true PI undef',\n\t\t\tbuilt_in: 'circle square polygon text sphere cube cylinder polyhedron translate rotate scale resize mirror multmatrix color offset hull minkowski union difference intersection abs sign sin cos tan acos asin atan atan2 floor round ceil ln log pow sqrt exp rands min max concat lookup str chr search version version_num norm cross parent_module echo import import_dxf dxf_linear_extrude linear_extrude rotate_extrude surface projection render children dxf_cross dxf_dim let assign'\n\t\t},\n\t\tcontains: [\n\t\t\thljs.C_LINE_COMMENT_MODE,\n\t\t\thljs.C_BLOCK_COMMENT_MODE,\n\t\t\tNUMBERS,\n\t\t\tPREPRO,\n\t\t\tSTRING,\n\t\t\tSPECIAL_VARS,\n\t\t\tMODIFIERS,\n\t\t\tFUNCTIONS\n\t\t]\n\t}\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/languages/oxygene.js",
    "content": "/*\nLanguage: Oxygene\nAuthor: Carlo Kok <ck@remobjects.com>\nDescription: Language definition for RemObjects Oxygene (http://www.remobjects.com)\n*/\n\nfunction(hljs) {\n  var OXYGENE_KEYWORDS = 'abstract add and array as asc aspect assembly async begin break block by case class concat const copy constructor continue '+\n    'create default delegate desc distinct div do downto dynamic each else empty end ensure enum equals event except exit extension external false '+\n    'final finalize finalizer finally flags for forward from function future global group has if implementation implements implies in index inherited '+\n    'inline interface into invariants is iterator join locked locking loop matching method mod module namespace nested new nil not notify nullable of '+\n    'old on operator or order out override parallel params partial pinned private procedure property protected public queryable raise read readonly '+\n    'record reintroduce remove repeat require result reverse sealed select self sequence set shl shr skip static step soft take then to true try tuple '+\n    'type union unit unsafe until uses using var virtual raises volatile where while with write xor yield await mapped deprecated stdcall cdecl pascal '+\n    'register safecall overload library platform reference packed strict published autoreleasepool selector strong weak unretained';\n  var CURLY_COMMENT =  hljs.COMMENT(\n    '{',\n    '}',\n    {\n      relevance: 0\n    }\n  );\n  var PAREN_COMMENT = hljs.COMMENT(\n    '\\\\(\\\\*',\n    '\\\\*\\\\)',\n    {\n      relevance: 10\n    }\n  );\n  var STRING = {\n    className: 'string',\n    begin: '\\'', end: '\\'',\n    contains: [{begin: '\\'\\''}]\n  };\n  var CHAR_STRING = {\n    className: 'string', begin: '(#\\\\d+)+'\n  };\n  var FUNCTION = {\n    className: 'function',\n    beginKeywords: 'function constructor destructor procedure method', end: '[:;]',\n    keywords: 'function constructor|10 destructor|10 procedure|10 method|10',\n    contains: [\n      hljs.TITLE_MODE,\n      {\n        className: 'params',\n        begin: '\\\\(', end: '\\\\)',\n        keywords: OXYGENE_KEYWORDS,\n        contains: [STRING, CHAR_STRING]\n      },\n      CURLY_COMMENT, PAREN_COMMENT\n    ]\n  };\n  return {\n    case_insensitive: true,\n    lexemes: /\\.?\\w+/,\n    keywords: OXYGENE_KEYWORDS,\n    illegal: '(\"|\\\\$[G-Zg-z]|\\\\/\\\\*|</|=>|->)',\n    contains: [\n      CURLY_COMMENT, PAREN_COMMENT, hljs.C_LINE_COMMENT_MODE,\n      STRING, CHAR_STRING,\n      hljs.NUMBER_MODE,\n      FUNCTION,\n      {\n        className: 'class',\n        begin: '=\\\\bclass\\\\b', end: 'end;',\n        keywords: OXYGENE_KEYWORDS,\n        contains: [\n          STRING, CHAR_STRING,\n          CURLY_COMMENT, PAREN_COMMENT, hljs.C_LINE_COMMENT_MODE,\n          FUNCTION\n        ]\n      }\n    ]\n  };\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/languages/parser3.js",
    "content": "/*\nLanguage: Parser3\nRequires: xml.js\nAuthor: Oleg Volchkov <oleg@volchkov.net>\nCategory: template\n*/\n\nfunction(hljs) {\n  var CURLY_SUBCOMMENT = hljs.COMMENT(\n    '{',\n    '}',\n    {\n      contains: ['self']\n    }\n  );\n  return {\n    subLanguage: 'xml', relevance: 0,\n    contains: [\n      hljs.COMMENT('^#', '$'),\n      hljs.COMMENT(\n        '\\\\^rem{',\n        '}',\n        {\n          relevance: 10,\n          contains: [\n            CURLY_SUBCOMMENT\n          ]\n        }\n      ),\n      {\n        className: 'meta',\n        begin: '^@(?:BASE|USE|CLASS|OPTIONS)$',\n        relevance: 10\n      },\n      {\n        className: 'title',\n        begin: '@[\\\\w\\\\-]+\\\\[[\\\\w^;\\\\-]*\\\\](?:\\\\[[\\\\w^;\\\\-]*\\\\])?(?:.*)$'\n      },\n      {\n        className: 'variable',\n        begin: '\\\\$\\\\{?[\\\\w\\\\-\\\\.\\\\:]+\\\\}?'\n      },\n      {\n        className: 'keyword',\n        begin: '\\\\^[\\\\w\\\\-\\\\.\\\\:]+'\n      },\n      {\n        className: 'number',\n        begin: '\\\\^#[0-9a-fA-F]+'\n      },\n      hljs.C_NUMBER_MODE\n    ]\n  };\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/languages/perl.js",
    "content": "/*\nLanguage: Perl\nAuthor: Peter Leonov <gojpeg@yandex.ru>\nCategory: common\n*/\n\nfunction(hljs) {\n  var PERL_KEYWORDS = 'getpwent getservent quotemeta msgrcv scalar kill dbmclose undef lc ' +\n    'ma syswrite tr send umask sysopen shmwrite vec qx utime local oct semctl localtime ' +\n    'readpipe do return format read sprintf dbmopen pop getpgrp not getpwnam rewinddir qq' +\n    'fileno qw endprotoent wait sethostent bless s|0 opendir continue each sleep endgrent ' +\n    'shutdown dump chomp connect getsockname die socketpair close flock exists index shmget' +\n    'sub for endpwent redo lstat msgctl setpgrp abs exit select print ref gethostbyaddr ' +\n    'unshift fcntl syscall goto getnetbyaddr join gmtime symlink semget splice x|0 ' +\n    'getpeername recv log setsockopt cos last reverse gethostbyname getgrnam study formline ' +\n    'endhostent times chop length gethostent getnetent pack getprotoent getservbyname rand ' +\n    'mkdir pos chmod y|0 substr endnetent printf next open msgsnd readdir use unlink ' +\n    'getsockopt getpriority rindex wantarray hex system getservbyport endservent int chr ' +\n    'untie rmdir prototype tell listen fork shmread ucfirst setprotoent else sysseek link ' +\n    'getgrgid shmctl waitpid unpack getnetbyname reset chdir grep split require caller ' +\n    'lcfirst until warn while values shift telldir getpwuid my getprotobynumber delete and ' +\n    'sort uc defined srand accept package seekdir getprotobyname semop our rename seek if q|0 ' +\n    'chroot sysread setpwent no crypt getc chown sqrt write setnetent setpriority foreach ' +\n    'tie sin msgget map stat getlogin unless elsif truncate exec keys glob tied closedir' +\n    'ioctl socket readlink eval xor readline binmode setservent eof ord bind alarm pipe ' +\n    'atan2 getgrent exp time push setgrent gt lt or ne m|0 break given say state when';\n  var SUBST = {\n    className: 'subst',\n    begin: '[$@]\\\\{', end: '\\\\}',\n    keywords: PERL_KEYWORDS\n  };\n  var METHOD = {\n    begin: '->{', end: '}'\n    // contains defined later\n  };\n  var VAR = {\n    variants: [\n      {begin: /\\$\\d/},\n      {begin: /[\\$%@](\\^\\w\\b|#\\w+(::\\w+)*|{\\w+}|\\w+(::\\w*)*)/},\n      {begin: /[\\$%@][^\\s\\w{]/, relevance: 0}\n    ]\n  };\n  var STRING_CONTAINS = [hljs.BACKSLASH_ESCAPE, SUBST, VAR];\n  var PERL_DEFAULT_CONTAINS = [\n    VAR,\n    hljs.HASH_COMMENT_MODE,\n    hljs.COMMENT(\n      '^\\\\=\\\\w',\n      '\\\\=cut',\n      {\n        endsWithParent: true\n      }\n    ),\n    METHOD,\n    {\n      className: 'string',\n      contains: STRING_CONTAINS,\n      variants: [\n        {\n          begin: 'q[qwxr]?\\\\s*\\\\(', end: '\\\\)',\n          relevance: 5\n        },\n        {\n          begin: 'q[qwxr]?\\\\s*\\\\[', end: '\\\\]',\n          relevance: 5\n        },\n        {\n          begin: 'q[qwxr]?\\\\s*\\\\{', end: '\\\\}',\n          relevance: 5\n        },\n        {\n          begin: 'q[qwxr]?\\\\s*\\\\|', end: '\\\\|',\n          relevance: 5\n        },\n        {\n          begin: 'q[qwxr]?\\\\s*\\\\<', end: '\\\\>',\n          relevance: 5\n        },\n        {\n          begin: 'qw\\\\s+q', end: 'q',\n          relevance: 5\n        },\n        {\n          begin: '\\'', end: '\\'',\n          contains: [hljs.BACKSLASH_ESCAPE]\n        },\n        {\n          begin: '\"', end: '\"'\n        },\n        {\n          begin: '`', end: '`',\n          contains: [hljs.BACKSLASH_ESCAPE]\n        },\n        {\n          begin: '{\\\\w+}',\n          contains: [],\n          relevance: 0\n        },\n        {\n          begin: '\\-?\\\\w+\\\\s*\\\\=\\\\>',\n          contains: [],\n          relevance: 0\n        }\n      ]\n    },\n    {\n      className: 'number',\n      begin: '(\\\\b0[0-7_]+)|(\\\\b0x[0-9a-fA-F_]+)|(\\\\b[1-9][0-9_]*(\\\\.[0-9_]+)?)|[0_]\\\\b',\n      relevance: 0\n    },\n    { // regexp container\n      begin: '(\\\\/\\\\/|' + hljs.RE_STARTERS_RE + '|\\\\b(split|return|print|reverse|grep)\\\\b)\\\\s*',\n      keywords: 'split return print reverse grep',\n      relevance: 0,\n      contains: [\n        hljs.HASH_COMMENT_MODE,\n        {\n          className: 'regexp',\n          begin: '(s|tr|y)/(\\\\\\\\.|[^/])*/(\\\\\\\\.|[^/])*/[a-z]*',\n          relevance: 10\n        },\n        {\n          className: 'regexp',\n          begin: '(m|qr)?/', end: '/[a-z]*',\n          contains: [hljs.BACKSLASH_ESCAPE],\n          relevance: 0 // allows empty \"//\" which is a common comment delimiter in other languages\n        }\n      ]\n    },\n    {\n      className: 'function',\n      beginKeywords: 'sub', end: '(\\\\s*\\\\(.*?\\\\))?[;{]', excludeEnd: true,\n      relevance: 5,\n      contains: [hljs.TITLE_MODE]\n    },\n    {\n      begin: '-\\\\w\\\\b',\n      relevance: 0\n    },\n    {\n      begin: \"^__DATA__$\",\n      end: \"^__END__$\",\n      subLanguage: 'mojolicious',\n      contains: [\n        {\n            begin: \"^@@.*\",\n            end: \"$\",\n            className: \"comment\"\n        }\n      ]\n    }\n  ];\n  SUBST.contains = PERL_DEFAULT_CONTAINS;\n  METHOD.contains = PERL_DEFAULT_CONTAINS;\n\n  return {\n    aliases: ['pl', 'pm'],\n    lexemes: /[\\w\\.]+/,\n    keywords: PERL_KEYWORDS,\n    contains: PERL_DEFAULT_CONTAINS\n  };\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/languages/pf.js",
    "content": "/*\nLanguage: pf\nCategory: config\nAuthor: Peter Piwowarski <oldlaptop654@aol.com>\nDescription: The pf.conf(5) format as of OpenBSD 5.6\n*/\n\nfunction(hljs) {\n  var MACRO = {\n    className: 'variable',\n    begin: /\\$[\\w\\d#@][\\w\\d_]*/\n  };\n  var TABLE = {\n    className: 'variable',\n    begin: /<(?!\\/)/, end: />/\n  };\n  var QUOTE_STRING = {\n    className: 'string',\n    begin: /\"/, end: /\"/\n  };\n\n  return {\n    aliases: ['pf.conf'],\n    lexemes: /[a-z0-9_<>-]+/,\n    keywords: {\n      built_in: /* block match pass are \"actions\" in pf.conf(5), the rest are\n                 * lexically similar top-level commands.\n                 */\n        'block match pass load anchor|5 antispoof|10 set table',\n      keyword:\n        'in out log quick on rdomain inet inet6 proto from port os to route' +\n        'allow-opts divert-packet divert-reply divert-to flags group icmp-type' +\n        'icmp6-type label once probability recieved-on rtable prio queue' +\n        'tos tag tagged user keep fragment for os drop' +\n        'af-to|10 binat-to|10 nat-to|10 rdr-to|10 bitmask least-stats random round-robin' +\n        'source-hash static-port' +\n        'dup-to reply-to route-to' +\n        'parent bandwidth default min max qlimit' +\n        'block-policy debug fingerprints hostid limit loginterface optimization' +\n        'reassemble ruleset-optimization basic none profile skip state-defaults' +\n        'state-policy timeout' +\n        'const counters persist' +\n        'no modulate synproxy state|5 floating if-bound no-sync pflow|10 sloppy' +\n        'source-track global rule max-src-nodes max-src-states max-src-conn' +\n        'max-src-conn-rate overload flush' +\n        'scrub|5 max-mss min-ttl no-df|10 random-id',\n      literal:\n        'all any no-route self urpf-failed egress|5 unknown'\n    },\n    contains: [\n      hljs.HASH_COMMENT_MODE,\n      hljs.NUMBER_MODE,\n      hljs.QUOTE_STRING_MODE,\n      MACRO,\n      TABLE\n    ]\n  };\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/languages/php.js",
    "content": "/*\nLanguage: PHP\nAuthor: Victor Karamzin <Victor.Karamzin@enterra-inc.com>\nContributors: Evgeny Stepanischev <imbolk@gmail.com>, Ivan Sagalaev <maniac@softwaremaniacs.org>\nCategory: common\n*/\n\nfunction(hljs) {\n  var VARIABLE = {\n    begin: '\\\\$+[a-zA-Z_\\x7f-\\xff][a-zA-Z0-9_\\x7f-\\xff]*'\n  };\n  var PREPROCESSOR = {\n    className: 'meta', begin: /<\\?(php)?|\\?>/\n  };\n  var STRING = {\n    className: 'string',\n    contains: [hljs.BACKSLASH_ESCAPE, PREPROCESSOR],\n    variants: [\n      {\n        begin: 'b\"', end: '\"'\n      },\n      {\n        begin: 'b\\'', end: '\\''\n      },\n      hljs.inherit(hljs.APOS_STRING_MODE, {illegal: null}),\n      hljs.inherit(hljs.QUOTE_STRING_MODE, {illegal: null})\n    ]\n  };\n  var NUMBER = {variants: [hljs.BINARY_NUMBER_MODE, hljs.C_NUMBER_MODE]};\n  return {\n    aliases: ['php3', 'php4', 'php5', 'php6'],\n    case_insensitive: true,\n    keywords:\n      'and include_once list abstract global private echo interface as static endswitch ' +\n      'array null if endwhile or const for endforeach self var while isset public ' +\n      'protected exit foreach throw elseif include __FILE__ empty require_once do xor ' +\n      'return parent clone use __CLASS__ __LINE__ else break print eval new ' +\n      'catch __METHOD__ case exception default die require __FUNCTION__ ' +\n      'enddeclare final try switch continue endfor endif declare unset true false ' +\n      'trait goto instanceof insteadof __DIR__ __NAMESPACE__ ' +\n      'yield finally',\n    contains: [\n      hljs.HASH_COMMENT_MODE,\n      hljs.COMMENT('//', '$', {contains: [PREPROCESSOR]}),\n      hljs.COMMENT(\n        '/\\\\*',\n        '\\\\*/',\n        {\n          contains: [\n            {\n              className: 'doctag',\n              begin: '@[A-Za-z]+'\n            }\n          ]\n        }\n      ),\n      hljs.COMMENT(\n        '__halt_compiler.+?;',\n        false,\n        {\n          endsWithParent: true,\n          keywords: '__halt_compiler',\n          lexemes: hljs.UNDERSCORE_IDENT_RE\n        }\n      ),\n      {\n        className: 'string',\n        begin: /<<<['\"]?\\w+['\"]?$/, end: /^\\w+;?$/,\n        contains: [\n          hljs.BACKSLASH_ESCAPE,\n          {\n            className: 'subst',\n            variants: [\n              {begin: /\\$\\w+/},\n              {begin: /\\{\\$/, end: /\\}/}\n            ]\n          }\n        ]\n      },\n      PREPROCESSOR,\n      {\n        className: 'keyword', begin: /\\$this\\b/\n      },\n      VARIABLE,\n      {\n        // swallow composed identifiers to avoid parsing them as keywords\n        begin: /(::|->)+[a-zA-Z_\\x7f-\\xff][a-zA-Z0-9_\\x7f-\\xff]*/\n      },\n      {\n        className: 'function',\n        beginKeywords: 'function', end: /[;{]/, excludeEnd: true,\n        illegal: '\\\\$|\\\\[|%',\n        contains: [\n          hljs.UNDERSCORE_TITLE_MODE,\n          {\n            className: 'params',\n            begin: '\\\\(', end: '\\\\)',\n            contains: [\n              'self',\n              VARIABLE,\n              hljs.C_BLOCK_COMMENT_MODE,\n              STRING,\n              NUMBER\n            ]\n          }\n        ]\n      },\n      {\n        className: 'class',\n        beginKeywords: 'class interface', end: '{', excludeEnd: true,\n        illegal: /[:\\(\\$\"]/,\n        contains: [\n          {beginKeywords: 'extends implements'},\n          hljs.UNDERSCORE_TITLE_MODE\n        ]\n      },\n      {\n        beginKeywords: 'namespace', end: ';',\n        illegal: /[\\.']/,\n        contains: [hljs.UNDERSCORE_TITLE_MODE]\n      },\n      {\n        beginKeywords: 'use', end: ';',\n        contains: [hljs.UNDERSCORE_TITLE_MODE]\n      },\n      {\n        begin: '=>' // No markup, just a relevance booster\n      },\n      STRING,\n      NUMBER\n    ]\n  };\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/languages/pony.js",
    "content": "/*\nLanguage: Pony\nAuthor: Joe Eli McIlvain <joe.eli.mac@gmail.com>\nDescription: Pony is an open-source, object-oriented, actor-model,\n             capabilities-secure, high performance programming language.\n*/\n\nfunction(hljs) {\n  var KEYWORDS = {\n    keyword:\n      'actor addressof and as be break class compile_error compile_intrinsic' +\n      'consume continue delegate digestof do else elseif embed end error' +\n      'for fun if ifdef in interface is isnt lambda let match new not object' +\n      'or primitive recover repeat return struct then trait try type until ' +\n      'use var where while with xor',\n    meta:\n      'iso val tag trn box ref',\n    literal:\n      'this false true'\n  };\n\n  var TRIPLE_QUOTE_STRING_MODE = {\n    className: 'string',\n    begin: '\"\"\"', end: '\"\"\"',\n    relevance: 10\n  };\n\n  var QUOTE_STRING_MODE = {\n    className: 'string',\n    begin: '\"', end: '\"',\n    contains: [hljs.BACKSLASH_ESCAPE]\n  };\n\n  var SINGLE_QUOTE_CHAR_MODE = {\n    className: 'string',\n    begin: '\\'', end: '\\'',\n    contains: [hljs.BACKSLASH_ESCAPE],\n    relevance: 0\n  };\n\n  var TYPE_NAME = {\n    className: 'type',\n    begin: '\\\\b_?[A-Z][\\\\w]*',\n    relevance: 0\n  };\n\n  var PRIMED_NAME = {\n    begin: hljs.IDENT_RE + '\\'', relevance: 0\n  };\n\n  var CLASS = {\n    className: 'class',\n    beginKeywords: 'class actor', end: '$',\n    contains: [\n      hljs.TITLE_MODE,\n      hljs.C_LINE_COMMENT_MODE\n    ]\n  }\n\n  var FUNCTION = {\n    className: 'function',\n    beginKeywords: 'new fun', end: '=>',\n    contains: [\n      hljs.TITLE_MODE,\n      {\n        begin: /\\(/, end: /\\)/,\n        contains: [\n          TYPE_NAME,\n          PRIMED_NAME,\n          hljs.C_NUMBER_MODE,\n          hljs.C_BLOCK_COMMENT_MODE\n        ]\n      },\n      {\n        begin: /:/, endsWithParent: true,\n        contains: [TYPE_NAME]\n      },\n      hljs.C_LINE_COMMENT_MODE\n    ]\n  }\n\n  return {\n    keywords: KEYWORDS,\n    contains: [\n      CLASS,\n      FUNCTION,\n      TYPE_NAME,\n      TRIPLE_QUOTE_STRING_MODE,\n      QUOTE_STRING_MODE,\n      SINGLE_QUOTE_CHAR_MODE,\n      PRIMED_NAME,\n      hljs.C_NUMBER_MODE,\n      hljs.C_LINE_COMMENT_MODE,\n      hljs.C_BLOCK_COMMENT_MODE\n    ]\n  };\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/languages/powershell.js",
    "content": "/*\nLanguage: PowerShell\nAuthor: David Mohundro <david@mohundro.com>\nContributors: Nicholas Blumhardt <nblumhardt@nblumhardt.com>, Victor Zhou <OiCMudkips@users.noreply.github.com>, Nicolas Le Gall <contact@nlegall.fr>\n*/\n\nfunction(hljs) {\n  var BACKTICK_ESCAPE = {\n    begin: '`[\\\\s\\\\S]',\n    relevance: 0\n  };\n  var VAR = {\n    className: 'variable',\n    variants: [\n      {begin: /\\$[\\w\\d][\\w\\d_:]*/}\n    ]\n  };\n  var LITERAL = {\n    className: 'literal',\n    begin: /\\$(null|true|false)\\b/\n  };\n  var QUOTE_STRING = {\n    className: 'string',\n    variants: [\n      { begin: /\"/, end: /\"/ },\n      { begin: /@\"/, end: /^\"@/ }\n    ],\n    contains: [\n      BACKTICK_ESCAPE,\n      VAR,\n      {\n        className: 'variable',\n        begin: /\\$[A-z]/, end: /[^A-z]/\n      }\n    ]\n  };\n  var APOS_STRING = {\n    className: 'string',\n    variants: [\n      { begin: /'/, end: /'/ },\n      { begin: /@'/, end: /^'@/ }\n    ]\n  };\n\n  var PS_HELPTAGS = {\n    className: 'doctag',\n    variants: [\n      /* no paramater help tags */ \n      { begin: /\\.(synopsis|description|example|inputs|outputs|notes|link|component|role|functionality)/ },\n      /* one parameter help tags */\n      { begin: /\\.(parameter|forwardhelptargetname|forwardhelpcategory|remotehelprunspace|externalhelp)\\s+\\S+/ }\n    ]\n  };\n  var PS_COMMENT = hljs.inherit(\n    hljs.COMMENT(null, null),\n    {\n      variants: [\n        /* single-line comment */\n        { begin: /#/, end: /$/ },\n        /* multi-line comment */\n        { begin: /<#/, end: /#>/ }\n      ],\n      contains: [PS_HELPTAGS]\n    }\n  );\n\n  return {\n    aliases: ['ps'],\n    lexemes: /-?[A-z\\.\\-]+/,\n    case_insensitive: true,\n    keywords: {\n      keyword: 'if else foreach return function do while until elseif begin for trap data dynamicparam end break throw param continue finally in switch exit filter try process catch',\n      built_in: 'Add-Computer Add-Content Add-History Add-JobTrigger Add-Member Add-PSSnapin Add-Type Checkpoint-Computer Clear-Content Clear-EventLog Clear-History Clear-Host Clear-Item Clear-ItemProperty Clear-Variable Compare-Object Complete-Transaction Connect-PSSession Connect-WSMan Convert-Path ConvertFrom-Csv ConvertFrom-Json ConvertFrom-SecureString ConvertFrom-StringData ConvertTo-Csv ConvertTo-Html ConvertTo-Json ConvertTo-SecureString ConvertTo-Xml Copy-Item Copy-ItemProperty Debug-Process Disable-ComputerRestore Disable-JobTrigger Disable-PSBreakpoint Disable-PSRemoting Disable-PSSessionConfiguration Disable-WSManCredSSP Disconnect-PSSession Disconnect-WSMan Disable-ScheduledJob Enable-ComputerRestore Enable-JobTrigger Enable-PSBreakpoint Enable-PSRemoting Enable-PSSessionConfiguration Enable-ScheduledJob Enable-WSManCredSSP Enter-PSSession Exit-PSSession Export-Alias Export-Clixml Export-Console Export-Counter Export-Csv Export-FormatData Export-ModuleMember Export-PSSession ForEach-Object Format-Custom Format-List Format-Table Format-Wide Get-Acl Get-Alias Get-AuthenticodeSignature Get-ChildItem Get-Command Get-ComputerRestorePoint Get-Content Get-ControlPanelItem Get-Counter Get-Credential Get-Culture Get-Date Get-Event Get-EventLog Get-EventSubscriber Get-ExecutionPolicy Get-FormatData Get-Host Get-HotFix Get-Help Get-History Get-IseSnippet Get-Item Get-ItemProperty Get-Job Get-JobTrigger Get-Location Get-Member Get-Module Get-PfxCertificate Get-Process Get-PSBreakpoint Get-PSCallStack Get-PSDrive Get-PSProvider Get-PSSession Get-PSSessionConfiguration Get-PSSnapin Get-Random Get-ScheduledJob Get-ScheduledJobOption Get-Service Get-TraceSource Get-Transaction Get-TypeData Get-UICulture Get-Unique Get-Variable Get-Verb Get-WinEvent Get-WmiObject Get-WSManCredSSP Get-WSManInstance Group-Object Import-Alias Import-Clixml Import-Counter Import-Csv Import-IseSnippet Import-LocalizedData Import-PSSession Import-Module Invoke-AsWorkflow Invoke-Command Invoke-Expression Invoke-History Invoke-Item Invoke-RestMethod Invoke-WebRequest Invoke-WmiMethod Invoke-WSManAction Join-Path Limit-EventLog Measure-Command Measure-Object Move-Item Move-ItemProperty New-Alias New-Event New-EventLog New-IseSnippet New-Item New-ItemProperty New-JobTrigger New-Object New-Module New-ModuleManifest New-PSDrive New-PSSession New-PSSessionConfigurationFile New-PSSessionOption New-PSTransportOption New-PSWorkflowExecutionOption New-PSWorkflowSession New-ScheduledJobOption New-Service New-TimeSpan New-Variable New-WebServiceProxy New-WinEvent New-WSManInstance New-WSManSessionOption Out-Default Out-File Out-GridView Out-Host Out-Null Out-Printer Out-String Pop-Location Push-Location Read-Host Receive-Job Register-EngineEvent Register-ObjectEvent Register-PSSessionConfiguration Register-ScheduledJob Register-WmiEvent Remove-Computer Remove-Event Remove-EventLog Remove-Item Remove-ItemProperty Remove-Job Remove-JobTrigger Remove-Module Remove-PSBreakpoint Remove-PSDrive Remove-PSSession Remove-PSSnapin Remove-TypeData Remove-Variable Remove-WmiObject Remove-WSManInstance Rename-Computer Rename-Item Rename-ItemProperty Reset-ComputerMachinePassword Resolve-Path Restart-Computer Restart-Service Restore-Computer Resume-Job Resume-Service Save-Help Select-Object Select-String Select-Xml Send-MailMessage Set-Acl Set-Alias Set-AuthenticodeSignature Set-Content Set-Date Set-ExecutionPolicy Set-Item Set-ItemProperty Set-JobTrigger Set-Location Set-PSBreakpoint Set-PSDebug Set-PSSessionConfiguration Set-ScheduledJob Set-ScheduledJobOption Set-Service Set-StrictMode Set-TraceSource Set-Variable Set-WmiInstance Set-WSManInstance Set-WSManQuickConfig Show-Command Show-ControlPanelItem Show-EventLog Sort-Object Split-Path Start-Job Start-Process Start-Service Start-Sleep Start-Transaction Start-Transcript Stop-Computer Stop-Job Stop-Process Stop-Service Stop-Transcript Suspend-Job Suspend-Service Tee-Object Test-ComputerSecureChannel Test-Connection Test-ModuleManifest Test-Path Test-PSSessionConfigurationFile Trace-Command Unblock-File Undo-Transaction Unregister-Event Unregister-PSSessionConfiguration Unregister-ScheduledJob Update-FormatData Update-Help Update-List Update-TypeData Use-Transaction Wait-Event Wait-Job Wait-Process Where-Object Write-Debug Write-Error Write-EventLog Write-Host Write-Output Write-Progress Write-Verbose Write-Warning Add-MDTPersistentDrive Disable-MDTMonitorService Enable-MDTMonitorService Get-MDTDeploymentShareStatistics Get-MDTMonitorData Get-MDTOperatingSystemCatalog Get-MDTPersistentDrive Import-MDTApplication Import-MDTDriver Import-MDTOperatingSystem Import-MDTPackage Import-MDTTaskSequence New-MDTDatabase Remove-MDTMonitorData Remove-MDTPersistentDrive Restore-MDTPersistentDrive Set-MDTMonitorData Test-MDTDeploymentShare Test-MDTMonitorData Update-MDTDatabaseSchema Update-MDTDeploymentShare Update-MDTLinkedDS Update-MDTMedia Update-MDTMedia Add-VamtProductKey Export-VamtData Find-VamtManagedMachine Get-VamtConfirmationId Get-VamtProduct Get-VamtProductKey Import-VamtData Initialize-VamtData Install-VamtConfirmationId Install-VamtProductActivation Install-VamtProductKey Update-VamtProduct',\n      nomarkup: '-ne -eq -lt -gt -ge -le -not -like -notlike -match -notmatch -contains -notcontains -in -notin -replace'\n    },\n    contains: [\n      BACKTICK_ESCAPE,\n      hljs.NUMBER_MODE,\n      QUOTE_STRING,\n      APOS_STRING,\n      LITERAL,\n      VAR,\n      PS_COMMENT\n    ]\n  };\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/languages/processing.js",
    "content": "/*\nLanguage: Processing\nAuthor: Erik Paluka <erik.paluka@gmail.com>\nCategory: graphics\n*/\n\nfunction(hljs) {\n  return {\n    keywords: {\n      keyword: 'BufferedReader PVector PFont PImage PGraphics HashMap boolean byte char color ' +\n        'double float int long String Array FloatDict FloatList IntDict IntList JSONArray JSONObject ' +\n        'Object StringDict StringList Table TableRow XML ' +\n        // Java keywords\n        'false synchronized int abstract float private char boolean static null if const ' +\n        'for true while long throw strictfp finally protected import native final return void ' +\n        'enum else break transient new catch instanceof byte super volatile case assert short ' +\n        'package default double public try this switch continue throws protected public private',\n      literal: 'P2D P3D HALF_PI PI QUARTER_PI TAU TWO_PI',\n      title: 'setup draw',\n      built_in: 'displayHeight displayWidth mouseY mouseX mousePressed pmouseX pmouseY key ' +\n        'keyCode pixels focused frameCount frameRate height width ' +\n        'size createGraphics beginDraw createShape loadShape PShape arc ellipse line point ' +\n        'quad rect triangle bezier bezierDetail bezierPoint bezierTangent curve curveDetail curvePoint ' +\n        'curveTangent curveTightness shape shapeMode beginContour beginShape bezierVertex curveVertex ' +\n        'endContour endShape quadraticVertex vertex ellipseMode noSmooth rectMode smooth strokeCap ' +\n        'strokeJoin strokeWeight mouseClicked mouseDragged mouseMoved mousePressed mouseReleased ' +\n        'mouseWheel keyPressed keyPressedkeyReleased keyTyped print println save saveFrame day hour ' +\n        'millis minute month second year background clear colorMode fill noFill noStroke stroke alpha ' +\n        'blue brightness color green hue lerpColor red saturation modelX modelY modelZ screenX screenY ' +\n        'screenZ ambient emissive shininess specular add createImage beginCamera camera endCamera frustum ' +\n        'ortho perspective printCamera printProjection cursor frameRate noCursor exit loop noLoop popStyle ' +\n        'pushStyle redraw binary boolean byte char float hex int str unbinary unhex join match matchAll nf ' +\n        'nfc nfp nfs split splitTokens trim append arrayCopy concat expand reverse shorten sort splice subset ' +\n        'box sphere sphereDetail createInput createReader loadBytes loadJSONArray loadJSONObject loadStrings ' +\n        'loadTable loadXML open parseXML saveTable selectFolder selectInput beginRaw beginRecord createOutput ' +\n        'createWriter endRaw endRecord PrintWritersaveBytes saveJSONArray saveJSONObject saveStream saveStrings ' +\n        'saveXML selectOutput popMatrix printMatrix pushMatrix resetMatrix rotate rotateX rotateY rotateZ scale ' +\n        'shearX shearY translate ambientLight directionalLight lightFalloff lights lightSpecular noLights normal ' +\n        'pointLight spotLight image imageMode loadImage noTint requestImage tint texture textureMode textureWrap ' +\n        'blend copy filter get loadPixels set updatePixels blendMode loadShader PShaderresetShader shader createFont ' +\n        'loadFont text textFont textAlign textLeading textMode textSize textWidth textAscent textDescent abs ceil ' +\n        'constrain dist exp floor lerp log mag map max min norm pow round sq sqrt acos asin atan atan2 cos degrees ' +\n        'radians sin tan noise noiseDetail noiseSeed random randomGaussian randomSeed'\n    },\n    contains: [\n      hljs.C_LINE_COMMENT_MODE,\n      hljs.C_BLOCK_COMMENT_MODE,\n      hljs.APOS_STRING_MODE,\n      hljs.QUOTE_STRING_MODE,\n      hljs.C_NUMBER_MODE\n    ]\n  };\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/languages/profile.js",
    "content": "/*\nLanguage: Python profile\nDescription: Python profiler results\nAuthor: Brian Beck <exogen@gmail.com>\n*/\n\nfunction(hljs) {\n  return {\n    contains: [\n      hljs.C_NUMBER_MODE,\n      {\n        begin: '[a-zA-Z_][\\\\da-zA-Z_]+\\\\.[\\\\da-zA-Z_]{1,3}', end: ':',\n        excludeEnd: true\n      },\n      {\n        begin: '(ncalls|tottime|cumtime)', end: '$',\n        keywords: 'ncalls tottime|10 cumtime|10 filename',\n        relevance: 10\n      },\n      {\n        begin: 'function calls', end: '$',\n        contains: [hljs.C_NUMBER_MODE],\n        relevance: 10\n      },\n      hljs.APOS_STRING_MODE,\n      hljs.QUOTE_STRING_MODE,\n      {\n        className: 'string',\n        begin: '\\\\(', end: '\\\\)$',\n        excludeBegin: true, excludeEnd: true,\n        relevance: 0\n      }\n    ]\n  };\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/languages/prolog.js",
    "content": "/*\nLanguage: Prolog\nDescription: Prolog is a general purpose logic programming language associated with artificial intelligence and computational linguistics.\nAuthor: Raivo Laanemets <raivo@infdot.com>\n*/\n\nfunction(hljs) {\n\n  var ATOM = {\n\n    begin: /[a-z][A-Za-z0-9_]*/,\n    relevance: 0\n  };\n\n  var VAR = {\n\n    className: 'symbol',\n    variants: [\n      {begin: /[A-Z][a-zA-Z0-9_]*/},\n      {begin: /_[A-Za-z0-9_]*/},\n    ],\n    relevance: 0\n  };\n\n  var PARENTED = {\n\n    begin: /\\(/,\n    end: /\\)/,\n    relevance: 0\n  };\n\n  var LIST = {\n\n    begin: /\\[/,\n    end: /\\]/\n  };\n\n  var LINE_COMMENT = {\n\n    className: 'comment',\n    begin: /%/, end: /$/,\n    contains: [hljs.PHRASAL_WORDS_MODE]\n  };\n\n  var BACKTICK_STRING = {\n\n    className: 'string',\n    begin: /`/, end: /`/,\n    contains: [hljs.BACKSLASH_ESCAPE]\n  };\n\n  var CHAR_CODE = {\n\n    className: 'string', // 0'a etc.\n    begin: /0\\'(\\\\\\'|.)/\n  };\n\n  var SPACE_CODE = {\n\n    className: 'string',\n    begin: /0\\'\\\\s/ // 0'\\s\n  };\n\n  var PRED_OP = { // relevance booster\n    begin: /:-/\n  };\n\n  var inner = [\n\n    ATOM,\n    VAR,\n    PARENTED,\n    PRED_OP,\n    LIST,\n    LINE_COMMENT,\n    hljs.C_BLOCK_COMMENT_MODE,\n    hljs.QUOTE_STRING_MODE,\n    hljs.APOS_STRING_MODE,\n    BACKTICK_STRING,\n    CHAR_CODE,\n    SPACE_CODE,\n    hljs.C_NUMBER_MODE\n  ];\n\n  PARENTED.contains = inner;\n  LIST.contains = inner;\n\n  return {\n    contains: inner.concat([\n      {begin: /\\.$/} // relevance booster\n    ])\n  };\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/languages/protobuf.js",
    "content": "/*\nLanguage: Protocol Buffers\nAuthor: Dan Tao <daniel.tao@gmail.com>\nDescription: Protocol buffer message definition format\nCategory: protocols\n*/\n\nfunction(hljs) {\n  return {\n    keywords: {\n      keyword: 'package import option optional required repeated group',\n      built_in: 'double float int32 int64 uint32 uint64 sint32 sint64 ' +\n        'fixed32 fixed64 sfixed32 sfixed64 bool string bytes',\n      literal: 'true false'\n    },\n    contains: [\n      hljs.QUOTE_STRING_MODE,\n      hljs.NUMBER_MODE,\n      hljs.C_LINE_COMMENT_MODE,\n      {\n        className: 'class',\n        beginKeywords: 'message enum service', end: /\\{/,\n        illegal: /\\n/,\n        contains: [\n          hljs.inherit(hljs.TITLE_MODE, {\n            starts: {endsWithParent: true, excludeEnd: true} // hack: eating everything after the first title\n          })\n        ]\n      },\n      {\n        className: 'function',\n        beginKeywords: 'rpc',\n        end: /;/, excludeEnd: true,\n        keywords: 'rpc returns'\n      },\n      {\n        begin: /^\\s*[A-Z_]+/,\n        end: /\\s*=/, excludeEnd: true\n      }\n    ]\n  };\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/languages/puppet.js",
    "content": "/*\nLanguage: Puppet\nAuthor: Jose Molina Colmenero <gaudy41@gmail.com>\nCategory: config\n*/\n\nfunction(hljs) {\n\n  var PUPPET_KEYWORDS = {\n    keyword:\n    /* language keywords */\n      'and case default else elsif false if in import enherits node or true undef unless main settings $string ',\n    literal:\n    /* metaparameters */\n      'alias audit before loglevel noop require subscribe tag ' +\n    /* normal attributes */\n      'owner ensure group mode name|0 changes context force incl lens load_path onlyif provider returns root show_diff type_check ' +\n      'en_address ip_address realname command environment hour monute month monthday special target weekday '+\n      'creates cwd ogoutput refresh refreshonly tries try_sleep umask backup checksum content ctime force ignore ' +\n      'links mtime purge recurse recurselimit replace selinux_ignore_defaults selrange selrole seltype seluser source ' +\n      'souirce_permissions sourceselect validate_cmd validate_replacement allowdupe attribute_membership auth_membership forcelocal gid '+\n      'ia_load_module members system host_aliases ip allowed_trunk_vlans description device_url duplex encapsulation etherchannel ' +\n      'native_vlan speed principals allow_root auth_class auth_type authenticate_user k_of_n mechanisms rule session_owner shared options ' +\n      'device fstype enable hasrestart directory present absent link atboot blockdevice device dump pass remounts poller_tag use ' +\n      'message withpath adminfile allow_virtual allowcdrom category configfiles flavor install_options instance package_settings platform ' +\n      'responsefile status uninstall_options vendor unless_system_user unless_uid binary control flags hasstatus manifest pattern restart running ' +\n      'start stop allowdupe auths expiry gid groups home iterations key_membership keys managehome membership password password_max_age ' +\n      'password_min_age profile_membership profiles project purge_ssh_keys role_membership roles salt shell uid baseurl cost descr enabled ' +\n      'enablegroups exclude failovermethod gpgcheck gpgkey http_caching include includepkgs keepalive metadata_expire metalink mirrorlist ' +\n      'priority protect proxy proxy_password proxy_username repo_gpgcheck s3_enabled skip_if_unavailable sslcacert sslclientcert sslclientkey ' +\n      'sslverify mounted',\n    built_in:\n    /* core facts */\n      'architecture augeasversion blockdevices boardmanufacturer boardproductname boardserialnumber cfkey dhcp_servers ' +\n      'domain ec2_ ec2_userdata facterversion filesystems ldom fqdn gid hardwareisa hardwaremodel hostname id|0 interfaces '+\n      'ipaddress ipaddress_ ipaddress6 ipaddress6_ iphostnumber is_virtual kernel kernelmajversion kernelrelease kernelversion ' +\n      'kernelrelease kernelversion lsbdistcodename lsbdistdescription lsbdistid lsbdistrelease lsbmajdistrelease lsbminordistrelease ' +\n      'lsbrelease macaddress macaddress_ macosx_buildversion macosx_productname macosx_productversion macosx_productverson_major ' +\n      'macosx_productversion_minor manufacturer memoryfree memorysize netmask metmask_ network_ operatingsystem operatingsystemmajrelease '+\n      'operatingsystemrelease osfamily partitions path physicalprocessorcount processor processorcount productname ps puppetversion '+\n      'rubysitedir rubyversion selinux selinux_config_mode selinux_config_policy selinux_current_mode selinux_current_mode selinux_enforced '+\n      'selinux_policyversion serialnumber sp_ sshdsakey sshecdsakey sshrsakey swapencrypted swapfree swapsize timezone type uniqueid uptime '+\n      'uptime_days uptime_hours uptime_seconds uuid virtual vlans xendomains zfs_version zonenae zones zpool_version'\n  };\n\n  var COMMENT = hljs.COMMENT('#', '$');\n\n  var IDENT_RE = '([A-Za-z_]|::)(\\\\w|::)*';\n\n  var TITLE = hljs.inherit(hljs.TITLE_MODE, {begin: IDENT_RE});\n\n  var VARIABLE = {className: 'variable', begin: '\\\\$' + IDENT_RE};\n\n  var STRING = {\n    className: 'string',\n    contains: [hljs.BACKSLASH_ESCAPE, VARIABLE],\n    variants: [\n      {begin: /'/, end: /'/},\n      {begin: /\"/, end: /\"/}\n    ]\n  };\n\n  return {\n    aliases: ['pp'],\n    contains: [\n      COMMENT,\n      VARIABLE,\n      STRING,\n      {\n        beginKeywords: 'class', end: '\\\\{|;',\n        illegal: /=/,\n        contains: [TITLE, COMMENT]\n      },\n      {\n        beginKeywords: 'define', end: /\\{/,\n        contains: [\n          {\n            className: 'section', begin: hljs.IDENT_RE, endsParent: true\n          }\n        ]\n      },\n      {\n        begin: hljs.IDENT_RE + '\\\\s+\\\\{', returnBegin: true,\n        end: /\\S/,\n        contains: [\n          {\n            className: 'keyword',\n            begin: hljs.IDENT_RE\n          },\n          {\n            begin: /\\{/, end: /\\}/,\n            keywords: PUPPET_KEYWORDS,\n            relevance: 0,\n            contains: [\n              STRING,\n              COMMENT,\n              {\n                begin:'[a-zA-Z_]+\\\\s*=>',\n                returnBegin: true, end: '=>',\n                contains: [\n                  {\n                    className: 'attr',\n                    begin: hljs.IDENT_RE,\n                  }\n                ]\n              },\n              {\n                className: 'number',\n                begin: '(\\\\b0[0-7_]+)|(\\\\b0x[0-9a-fA-F_]+)|(\\\\b[1-9][0-9_]*(\\\\.[0-9_]+)?)|[0_]\\\\b',\n                relevance: 0\n              },\n              VARIABLE\n            ]\n          }\n        ],\n        relevance: 0\n      }\n    ]\n  }\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/languages/purebasic.js",
    "content": "/*\nLanguage: PureBASIC\nAuthor: Tristano Ajmone <tajmone@gmail.com>\nDescription: Syntax highlighting for PureBASIC (v.5). No inline ASM highlighting. First release (v.1.0), April 2016.\nCredits: I've taken inspiration from the PureBasic language file for GeSHi, created by Gustavo Julio Fiorenza (GuShH).\n*/\n\n// Base deafult colors in PB IDE: background: #FFFFDF; foreground: #000000;\n\nfunction(hljs) {\n  var STRINGS = { // PB IDE color: #0080FF (Azure Radiance)\n    className: 'string',\n    begin: '(~)?\"', end: '\"',\n    illegal: '\\\\n'\n  };\n  var CONSTANTS = { // PB IDE color: #924B72 (Cannon Pink)\n    //  \"#\" + a letter or underscore + letters, digits or underscores + (optional) \"$\"\n    className: 'symbol',\n    begin: '#[a-zA-Z_]\\\\w*\\\\$?'\n  };\n\n  return {\n    aliases: ['pb', 'pbi'],\n    keywords: // PB IDE color: #006666 (Blue Stone) + Bold\n      // The following keywords list was taken and adapted from GuShH's PureBasic language file for GeSHi...\n      'And As Break CallDebugger Case CompilerCase CompilerDefault CompilerElse CompilerEndIf CompilerEndSelect ' +\n      'CompilerError CompilerIf CompilerSelect Continue Data DataSection EndDataSection Debug DebugLevel ' +\n      'Default Define Dim DisableASM DisableDebugger DisableExplicit Else ElseIf EnableASM ' +\n      'EnableDebugger EnableExplicit End EndEnumeration EndIf EndImport EndInterface EndMacro EndProcedure ' +\n      'EndSelect EndStructure EndStructureUnion EndWith Enumeration Extends FakeReturn For Next ForEach ' +\n      'ForEver Global Gosub Goto If Import ImportC IncludeBinary IncludeFile IncludePath Interface Macro ' +\n      'NewList Not Or ProcedureReturn Protected Prototype ' +\n      'PrototypeC Read ReDim Repeat Until Restore Return Select Shared Static Step Structure StructureUnion ' +\n      'Swap To Wend While With XIncludeFile XOr ' +\n      'Procedure ProcedureC ProcedureCDLL ProcedureDLL Declare DeclareC DeclareCDLL DeclareDLL',\n    contains: [\n      // COMMENTS | PB IDE color: #00AAAA (Persian Green)\n      hljs.COMMENT(';', '$', {relevance: 0}),\n\n      { // PROCEDURES DEFINITIONS\n        className: 'function',\n        begin: '\\\\b(Procedure|Declare)(C|CDLL|DLL)?\\\\b',\n        end: '\\\\(',\n        excludeEnd: true,\n        returnBegin: true,\n        contains: [\n          { // PROCEDURE KEYWORDS | PB IDE color: #006666 (Blue Stone) + Bold\n            className: 'keyword',\n            begin: '(Procedure|Declare)(C|CDLL|DLL)?',\n            excludeEnd: true\n          },\n          { // PROCEDURE RETURN TYPE SETTING | PB IDE color: #000000 (Black)\n            className: 'type',\n            begin: '\\\\.\\\\w*'\n            // end: ' ',\n          },\n          hljs.UNDERSCORE_TITLE_MODE // PROCEDURE NAME | PB IDE color: #006666 (Blue Stone)\n        ]\n      },\n      STRINGS,\n      CONSTANTS\n    ]\n  };\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/languages/python.js",
    "content": "/*\nLanguage: Python\nCategory: common\n*/\n\nfunction(hljs) {\n  var PROMPT = {\n    className: 'meta',  begin: /^(>>>|\\.\\.\\.) /\n  };\n  var STRING = {\n    className: 'string',\n    contains: [hljs.BACKSLASH_ESCAPE],\n    variants: [\n      {\n        begin: /(u|b)?r?'''/, end: /'''/,\n        contains: [PROMPT],\n        relevance: 10\n      },\n      {\n        begin: /(u|b)?r?\"\"\"/, end: /\"\"\"/,\n        contains: [PROMPT],\n        relevance: 10\n      },\n      {\n        begin: /(u|r|ur)'/, end: /'/,\n        relevance: 10\n      },\n      {\n        begin: /(u|r|ur)\"/, end: /\"/,\n        relevance: 10\n      },\n      {\n        begin: /(b|br)'/, end: /'/\n      },\n      {\n        begin: /(b|br)\"/, end: /\"/\n      },\n      hljs.APOS_STRING_MODE,\n      hljs.QUOTE_STRING_MODE\n    ]\n  };\n  var NUMBER = {\n    className: 'number', relevance: 0,\n    variants: [\n      {begin: hljs.BINARY_NUMBER_RE + '[lLjJ]?'},\n      {begin: '\\\\b(0o[0-7]+)[lLjJ]?'},\n      {begin: hljs.C_NUMBER_RE + '[lLjJ]?'}\n    ]\n  };\n  var PARAMS = {\n    className: 'params',\n    begin: /\\(/, end: /\\)/,\n    contains: ['self', PROMPT, NUMBER, STRING]\n  };\n  return {\n    aliases: ['py', 'gyp'],\n    keywords: {\n      keyword:\n        'and elif is global as in if from raise for except finally print import pass return ' +\n        'exec else break not with class assert yield try while continue del or def lambda ' +\n        'async await nonlocal|10 None True False',\n      built_in:\n        'Ellipsis NotImplemented'\n    },\n    illegal: /(<\\/|->|\\?)|=>/,\n    contains: [\n      PROMPT,\n      NUMBER,\n      STRING,\n      hljs.HASH_COMMENT_MODE,\n      {\n        variants: [\n          {className: 'function', beginKeywords: 'def'},\n          {className: 'class', beginKeywords: 'class'}\n        ],\n        end: /:/,\n        illegal: /[${=;\\n,]/,\n        contains: [\n          hljs.UNDERSCORE_TITLE_MODE,\n          PARAMS,\n          {\n            begin: /->/, endsWithParent: true,\n            keywords: 'None'\n          }\n        ]\n      },\n      {\n        className: 'meta',\n        begin: /^[\\t ]*@/, end: /$/\n      },\n      {\n        begin: /\\b(print|exec)\\(/ // don’t highlight keywords-turned-functions in Python 3\n      }\n    ]\n  };\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/languages/q.js",
    "content": "/*\nLanguage: Q\nAuthor: Sergey Vidyuk <svidyuk@gmail.com>\nDescription: K/Q/Kdb+ from Kx Systems\n*/\nfunction(hljs) {\n  var Q_KEYWORDS = {\n  keyword:\n    'do while select delete by update from',\n  literal:\n    '0b 1b',\n  built_in:\n    'neg not null string reciprocal floor ceiling signum mod xbar xlog and or each scan over prior mmu lsq inv md5 ltime gtime count first var dev med cov cor all any rand sums prds mins maxs fills deltas ratios avgs differ prev next rank reverse iasc idesc asc desc msum mcount mavg mdev xrank mmin mmax xprev rotate distinct group where flip type key til get value attr cut set upsert raze union inter except cross sv vs sublist enlist read0 read1 hopen hclose hdel hsym hcount peach system ltrim rtrim trim lower upper ssr view tables views cols xcols keys xkey xcol xasc xdesc fkeys meta lj aj aj0 ij pj asof uj ww wj wj1 fby xgroup ungroup ej save load rsave rload show csv parse eval min max avg wavg wsum sin cos tan sum',\n  type:\n    '`float `double int `timestamp `timespan `datetime `time `boolean `symbol `char `byte `short `long `real `month `date `minute `second `guid'\n  };\n  return {\n  aliases:['k', 'kdb'],\n  keywords: Q_KEYWORDS,\n  lexemes: /(`?)[A-Za-z0-9_]+\\b/,\n  contains: [\n  hljs.C_LINE_COMMENT_MODE,\n    hljs.QUOTE_STRING_MODE,\n    hljs.C_NUMBER_MODE\n     ]\n  };\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/languages/qml.js",
    "content": "/*\nLanguage: QML\nRequires: javascript.js, xml.js\nAuthor: John Foster <jfoster@esri.com>\nDescription: Syntax highlighting for the Qt Quick QML scripting language, based mostly off\n             the JavaScript parser.\nCategory: scripting\n*/\n\nfunction(hljs) {\n  var KEYWORDS = {\n      keyword:\n        'in of on if for while finally var new function do return void else break catch ' +\n        'instanceof with throw case default try this switch continue typeof delete ' +\n        'let yield const export super debugger as async await import',\n      literal:\n        'true false null undefined NaN Infinity',\n      built_in:\n        'eval isFinite isNaN parseFloat parseInt decodeURI decodeURIComponent ' +\n        'encodeURI encodeURIComponent escape unescape Object Function Boolean Error ' +\n        'EvalError InternalError RangeError ReferenceError StopIteration SyntaxError ' +\n        'TypeError URIError Number Math Date String RegExp Array Float32Array ' +\n        'Float64Array Int16Array Int32Array Int8Array Uint16Array Uint32Array ' +\n        'Uint8Array Uint8ClampedArray ArrayBuffer DataView JSON Intl arguments require ' +\n        'module console window document Symbol Set Map WeakSet WeakMap Proxy Reflect ' +\n        'Behavior bool color coordinate date double enumeration font geocircle georectangle ' +\n        'geoshape int list matrix4x4 parent point quaternion real rect ' +\n        'size string url var variant vector2d vector3d vector4d' +\n        'Promise'\n    };\n\n  var QML_IDENT_RE = '[a-zA-Z_][a-zA-Z0-9\\\\._]*';\n\n  // Isolate property statements. Ends at a :, =, ;, ,, a comment or end of line.\n  // Use property class.\n  var PROPERTY = {\n      className: 'keyword',\n      begin: '\\\\bproperty\\\\b',\n      starts: {\n        className: 'string',\n        end: '(:|=|;|,|//|/\\\\*|$)',\n        returnEnd: true\n      }\n  };\n\n  // Isolate signal statements. Ends at a ) a comment or end of line.\n  // Use property class.\n  var SIGNAL = {\n      className: 'keyword',\n      begin: '\\\\bsignal\\\\b',\n      starts: {\n        className: 'string',\n        end: '(\\\\(|:|=|;|,|//|/\\\\*|$)',\n        returnEnd: true\n      }\n  };\n\n  // id: is special in QML. When we see id: we want to mark the id: as attribute and\n  // emphasize the token following.\n  var ID_ID = {\n      className: 'attribute',\n      begin: '\\\\bid\\\\s*:',\n      starts: {\n        className: 'string',\n        end: QML_IDENT_RE,\n        returnEnd: false\n      }\n  };\n\n  // Find QML object attribute. An attribute is a QML identifier followed by :.\n  // Unfortunately it's hard to know where it ends, as it may contain scalars,\n  // objects, object definitions, or javascript. The true end is either when the parent\n  // ends or the next attribute is detected.\n  var QML_ATTRIBUTE = {\n    begin: QML_IDENT_RE + '\\\\s*:',\n    returnBegin: true,\n    contains: [\n      {\n        className: 'attribute',\n        begin: QML_IDENT_RE,\n        end: '\\\\s*:',\n        excludeEnd: true,\n        relevance: 0\n      }\n    ],\n    relevance: 0\n  };\n\n  // Find QML object. A QML object is a QML identifier followed by { and ends at the matching }.\n  // All we really care about is finding IDENT followed by { and just mark up the IDENT and ignore the {.\n  var QML_OBJECT = {\n    begin: QML_IDENT_RE + '\\\\s*{', end: '{',\n    returnBegin: true,\n    relevance: 0,\n    contains: [\n      hljs.inherit(hljs.TITLE_MODE, {begin: QML_IDENT_RE})\n    ]\n  };\n\n  return {\n    aliases: ['qt'],\n    case_insensitive: false,\n    keywords: KEYWORDS,\n    contains: [\n      {\n        className: 'meta',\n        begin: /^\\s*['\"]use (strict|asm)['\"]/\n      },\n      hljs.APOS_STRING_MODE,\n      hljs.QUOTE_STRING_MODE,\n      { // template string\n        className: 'string',\n        begin: '`', end: '`',\n        contains: [\n          hljs.BACKSLASH_ESCAPE,\n          {\n            className: 'subst',\n            begin: '\\\\$\\\\{', end: '\\\\}'\n          }\n        ]\n      },\n      hljs.C_LINE_COMMENT_MODE,\n      hljs.C_BLOCK_COMMENT_MODE,\n      {\n        className: 'number',\n        variants: [\n          { begin: '\\\\b(0[bB][01]+)' },\n          { begin: '\\\\b(0[oO][0-7]+)' },\n          { begin: hljs.C_NUMBER_RE }\n        ],\n        relevance: 0\n      },\n      { // \"value\" container\n        begin: '(' + hljs.RE_STARTERS_RE + '|\\\\b(case|return|throw)\\\\b)\\\\s*',\n        keywords: 'return throw case',\n        contains: [\n          hljs.C_LINE_COMMENT_MODE,\n          hljs.C_BLOCK_COMMENT_MODE,\n          hljs.REGEXP_MODE,\n          { // E4X / JSX\n            begin: /</, end: />\\s*[);\\]]/,\n            relevance: 0,\n            subLanguage: 'xml'\n          }\n        ],\n        relevance: 0\n      },\n      SIGNAL,\n      PROPERTY,\n      {\n        className: 'function',\n        beginKeywords: 'function', end: /\\{/, excludeEnd: true,\n        contains: [\n          hljs.inherit(hljs.TITLE_MODE, {begin: /[A-Za-z$_][0-9A-Za-z$_]*/}),\n          {\n            className: 'params',\n            begin: /\\(/, end: /\\)/,\n            excludeBegin: true,\n            excludeEnd: true,\n            contains: [\n              hljs.C_LINE_COMMENT_MODE,\n              hljs.C_BLOCK_COMMENT_MODE\n            ]\n          }\n        ],\n        illegal: /\\[|%/\n      },\n      {\n        begin: '\\\\.' + hljs.IDENT_RE, relevance: 0 // hack: prevents detection of keywords after dots\n      },\n      ID_ID,\n      QML_ATTRIBUTE,\n      QML_OBJECT\n    ],\n    illegal: /#/\n  };\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/languages/r.js",
    "content": "/*\nLanguage: R\nAuthor: Joe Cheng <joe@rstudio.org>\nCategory: scientific\n*/\n\nfunction(hljs) {\n  var IDENT_RE = '([a-zA-Z]|\\\\.[a-zA-Z.])[a-zA-Z0-9._]*';\n\n  return {\n    contains: [\n      hljs.HASH_COMMENT_MODE,\n      {\n        begin: IDENT_RE,\n        lexemes: IDENT_RE,\n        keywords: {\n          keyword:\n            'function if in break next repeat else for return switch while try tryCatch ' +\n            'stop warning require library attach detach source setMethod setGeneric ' +\n            'setGroupGeneric setClass ...',\n          literal:\n            'NULL NA TRUE FALSE T F Inf NaN NA_integer_|10 NA_real_|10 NA_character_|10 ' +\n            'NA_complex_|10'\n        },\n        relevance: 0\n      },\n      {\n        // hex value\n        className: 'number',\n        begin: \"0[xX][0-9a-fA-F]+[Li]?\\\\b\",\n        relevance: 0\n      },\n      {\n        // explicit integer\n        className: 'number',\n        begin: \"\\\\d+(?:[eE][+\\\\-]?\\\\d*)?L\\\\b\",\n        relevance: 0\n      },\n      {\n        // number with trailing decimal\n        className: 'number',\n        begin: \"\\\\d+\\\\.(?!\\\\d)(?:i\\\\b)?\",\n        relevance: 0\n      },\n      {\n        // number\n        className: 'number',\n        begin: \"\\\\d+(?:\\\\.\\\\d*)?(?:[eE][+\\\\-]?\\\\d*)?i?\\\\b\",\n        relevance: 0\n      },\n      {\n        // number with leading decimal\n        className: 'number',\n        begin: \"\\\\.\\\\d+(?:[eE][+\\\\-]?\\\\d*)?i?\\\\b\",\n        relevance: 0\n      },\n\n      {\n        // escaped identifier\n        begin: '`',\n        end: '`',\n        relevance: 0\n      },\n\n      {\n        className: 'string',\n        contains: [hljs.BACKSLASH_ESCAPE],\n        variants: [\n          {begin: '\"', end: '\"'},\n          {begin: \"'\", end: \"'\"}\n        ]\n      }\n    ]\n  };\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/languages/rib.js",
    "content": "/*\nLanguage: RenderMan RIB\nAuthor: Konstantin Evdokimenko <qewerty@gmail.com>\nContributors: Shuen-Huei Guan <drake.guan@gmail.com>\nCategory: graphics\n*/\n\nfunction(hljs) {\n  return {\n    keywords:\n      'ArchiveRecord AreaLightSource Atmosphere Attribute AttributeBegin AttributeEnd Basis ' +\n      'Begin Blobby Bound Clipping ClippingPlane Color ColorSamples ConcatTransform Cone ' +\n      'CoordinateSystem CoordSysTransform CropWindow Curves Cylinder DepthOfField Detail ' +\n      'DetailRange Disk Displacement Display End ErrorHandler Exposure Exterior Format ' +\n      'FrameAspectRatio FrameBegin FrameEnd GeneralPolygon GeometricApproximation Geometry ' +\n      'Hider Hyperboloid Identity Illuminate Imager Interior LightSource ' +\n      'MakeCubeFaceEnvironment MakeLatLongEnvironment MakeShadow MakeTexture Matte ' +\n      'MotionBegin MotionEnd NuPatch ObjectBegin ObjectEnd ObjectInstance Opacity Option ' +\n      'Orientation Paraboloid Patch PatchMesh Perspective PixelFilter PixelSamples ' +\n      'PixelVariance Points PointsGeneralPolygons PointsPolygons Polygon Procedural Projection ' +\n      'Quantize ReadArchive RelativeDetail ReverseOrientation Rotate Scale ScreenWindow ' +\n      'ShadingInterpolation ShadingRate Shutter Sides Skew SolidBegin SolidEnd Sphere ' +\n      'SubdivisionMesh Surface TextureCoordinates Torus Transform TransformBegin TransformEnd ' +\n      'TransformPoints Translate TrimCurve WorldBegin WorldEnd',\n    illegal: '</',\n    contains: [\n      hljs.HASH_COMMENT_MODE,\n      hljs.C_NUMBER_MODE,\n      hljs.APOS_STRING_MODE,\n      hljs.QUOTE_STRING_MODE\n    ]\n  };\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/languages/roboconf.js",
    "content": "/*\nLanguage: Roboconf\nAuthor: Vincent Zurczak <vzurczak@linagora.com>\nWebsite: http://roboconf.net\nDescription: Syntax highlighting for Roboconf's DSL\nCategory: config\n*/\n\nfunction(hljs) {\n  var IDENTIFIER = '[a-zA-Z-_][^\\\\n{]+\\\\{';\n\n  var PROPERTY = {\n    className: 'attribute',\n    begin: /[a-zA-Z-_]+/, end: /\\s*:/, excludeEnd: true,\n    starts: {\n      end: ';',\n      relevance: 0,\n      contains: [\n        {\n          className: 'variable',\n          begin: /\\.[a-zA-Z-_]+/\n        },\n        {\n          className: 'keyword',\n          begin: /\\(optional\\)/\n        }\n      ]\n    }\n  };\n\n  return {\n    aliases: ['graph', 'instances'],\n    case_insensitive: true,\n    keywords: 'import',\n    contains: [\n      // Facet sections\n      {\n        begin: '^facet ' + IDENTIFIER,\n        end: '}',\n        keywords: 'facet',\n        contains: [\n          PROPERTY,\n          hljs.HASH_COMMENT_MODE\n        ]\n      },\n\n      // Instance sections\n      {\n        begin: '^\\\\s*instance of ' + IDENTIFIER,\n        end: '}',\n        keywords: 'name count channels instance-data instance-state instance of',\n        illegal: /\\S/,\n        contains: [\n          'self',\n          PROPERTY,\n          hljs.HASH_COMMENT_MODE\n        ]\n      },\n\n      // Component sections\n      {\n        begin: '^' + IDENTIFIER,\n        end: '}',\n        contains: [\n          PROPERTY,\n          hljs.HASH_COMMENT_MODE\n        ]\n      },\n\n      // Comments\n      hljs.HASH_COMMENT_MODE\n    ]\n  };\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/languages/rsl.js",
    "content": "/*\nLanguage: RenderMan RSL\nAuthor: Konstantin Evdokimenko <qewerty@gmail.com>\nContributors: Shuen-Huei Guan <drake.guan@gmail.com>\nCategory: graphics\n*/\n\nfunction(hljs) {\n  return {\n    keywords: {\n      keyword:\n        'float color point normal vector matrix while for if do return else break extern continue',\n      built_in:\n        'abs acos ambient area asin atan atmosphere attribute calculatenormal ceil cellnoise ' +\n        'clamp comp concat cos degrees depth Deriv diffuse distance Du Dv environment exp ' +\n        'faceforward filterstep floor format fresnel incident length lightsource log match ' +\n        'max min mod noise normalize ntransform opposite option phong pnoise pow printf ' +\n        'ptlined radians random reflect refract renderinfo round setcomp setxcomp setycomp ' +\n        'setzcomp shadow sign sin smoothstep specular specularbrdf spline sqrt step tan ' +\n        'texture textureinfo trace transform vtransform xcomp ycomp zcomp'\n    },\n    illegal: '</',\n    contains: [\n      hljs.C_LINE_COMMENT_MODE,\n      hljs.C_BLOCK_COMMENT_MODE,\n      hljs.QUOTE_STRING_MODE,\n      hljs.APOS_STRING_MODE,\n      hljs.C_NUMBER_MODE,\n      {\n        className: 'meta',\n        begin: '#', end: '$'\n      },\n      {\n        className: 'class',\n        beginKeywords: 'surface displacement light volume imager', end: '\\\\('\n      },\n      {\n        beginKeywords: 'illuminate illuminance gather', end: '\\\\('\n      }\n    ]\n  };\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/languages/ruby.js",
    "content": "/*\nLanguage: Ruby\nAuthor: Anton Kovalyov <anton@kovalyov.net>\nContributors: Peter Leonov <gojpeg@yandex.ru>, Vasily Polovnyov <vast@whiteants.net>, Loren Segal <lsegal@soen.ca>, Pascal Hurni <phi@ruby-reactive.org>, Cedric Sohrauer <sohrauer@googlemail.com>\nCategory: common\n*/\n\nfunction(hljs) {\n  var RUBY_METHOD_RE = '[a-zA-Z_]\\\\w*[!?=]?|[-+~]\\\\@|<<|>>|=~|===?|<=>|[<>]=?|\\\\*\\\\*|[-/+%^&*~`|]|\\\\[\\\\]=?';\n  var RUBY_KEYWORDS = {\n    keyword:\n      'and then defined module in return redo if BEGIN retry end for self when ' +\n      'next until do begin unless END rescue else break undef not super class case ' +\n      'require yield alias while ensure elsif or include attr_reader attr_writer attr_accessor',\n    literal:\n      'true false nil'\n  };\n  var YARDOCTAG = {\n    className: 'doctag',\n    begin: '@[A-Za-z]+'\n  };\n  var IRB_OBJECT = {\n    begin: '#<', end: '>'\n  };\n  var COMMENT_MODES = [\n    hljs.COMMENT(\n      '#',\n      '$',\n      {\n        contains: [YARDOCTAG]\n      }\n    ),\n    hljs.COMMENT(\n      '^\\\\=begin',\n      '^\\\\=end',\n      {\n        contains: [YARDOCTAG],\n        relevance: 10\n      }\n    ),\n    hljs.COMMENT('^__END__', '\\\\n$')\n  ];\n  var SUBST = {\n    className: 'subst',\n    begin: '#\\\\{', end: '}',\n    keywords: RUBY_KEYWORDS\n  };\n  var STRING = {\n    className: 'string',\n    contains: [hljs.BACKSLASH_ESCAPE, SUBST],\n    variants: [\n      {begin: /'/, end: /'/},\n      {begin: /\"/, end: /\"/},\n      {begin: /`/, end: /`/},\n      {begin: '%[qQwWx]?\\\\(', end: '\\\\)'},\n      {begin: '%[qQwWx]?\\\\[', end: '\\\\]'},\n      {begin: '%[qQwWx]?{', end: '}'},\n      {begin: '%[qQwWx]?<', end: '>'},\n      {begin: '%[qQwWx]?/', end: '/'},\n      {begin: '%[qQwWx]?%', end: '%'},\n      {begin: '%[qQwWx]?-', end: '-'},\n      {begin: '%[qQwWx]?\\\\|', end: '\\\\|'},\n      {\n        // \\B in the beginning suppresses recognition of ?-sequences where ?\n        // is the last character of a preceding identifier, as in: `func?4`\n        begin: /\\B\\?(\\\\\\d{1,3}|\\\\x[A-Fa-f0-9]{1,2}|\\\\u[A-Fa-f0-9]{4}|\\\\?\\S)\\b/\n      },\n      {\n        begin: /<<(-?)\\w+$/, end: /^\\s*\\w+$/,\n      }\n    ]\n  };\n  var PARAMS = {\n    className: 'params',\n    begin: '\\\\(', end: '\\\\)', endsParent: true,\n    keywords: RUBY_KEYWORDS\n  };\n\n  var RUBY_DEFAULT_CONTAINS = [\n    STRING,\n    IRB_OBJECT,\n    {\n      className: 'class',\n      beginKeywords: 'class module', end: '$|;',\n      illegal: /=/,\n      contains: [\n        hljs.inherit(hljs.TITLE_MODE, {begin: '[A-Za-z_]\\\\w*(::\\\\w+)*(\\\\?|\\\\!)?'}),\n        {\n          begin: '<\\\\s*',\n          contains: [{\n            begin: '(' + hljs.IDENT_RE + '::)?' + hljs.IDENT_RE\n          }]\n        }\n      ].concat(COMMENT_MODES)\n    },\n    {\n      className: 'function',\n      beginKeywords: 'def', end: '$|;',\n      contains: [\n        hljs.inherit(hljs.TITLE_MODE, {begin: RUBY_METHOD_RE}),\n        PARAMS\n      ].concat(COMMENT_MODES)\n    },\n    {\n      // swallow namespace qualifiers before symbols\n      begin: hljs.IDENT_RE + '::'\n    },\n    {\n      className: 'symbol',\n      begin: hljs.UNDERSCORE_IDENT_RE + '(\\\\!|\\\\?)?:',\n      relevance: 0\n    },\n    {\n      className: 'symbol',\n      begin: ':(?!\\\\s)',\n      contains: [STRING, {begin: RUBY_METHOD_RE}],\n      relevance: 0\n    },\n    {\n      className: 'number',\n      begin: '(\\\\b0[0-7_]+)|(\\\\b0x[0-9a-fA-F_]+)|(\\\\b[1-9][0-9_]*(\\\\.[0-9_]+)?)|[0_]\\\\b',\n      relevance: 0\n    },\n    {\n      begin: '(\\\\$\\\\W)|((\\\\$|\\\\@\\\\@?)(\\\\w+))' // variables\n    },\n    {\n      className: 'params',\n      begin: /\\|/, end: /\\|/,\n      keywords: RUBY_KEYWORDS\n    },\n    { // regexp container\n      begin: '(' + hljs.RE_STARTERS_RE + ')\\\\s*',\n      contains: [\n        IRB_OBJECT,\n        {\n          className: 'regexp',\n          contains: [hljs.BACKSLASH_ESCAPE, SUBST],\n          illegal: /\\n/,\n          variants: [\n            {begin: '/', end: '/[a-z]*'},\n            {begin: '%r{', end: '}[a-z]*'},\n            {begin: '%r\\\\(', end: '\\\\)[a-z]*'},\n            {begin: '%r!', end: '![a-z]*'},\n            {begin: '%r\\\\[', end: '\\\\][a-z]*'}\n          ]\n        }\n      ].concat(COMMENT_MODES),\n      relevance: 0\n    }\n  ].concat(COMMENT_MODES);\n\n  SUBST.contains = RUBY_DEFAULT_CONTAINS;\n  PARAMS.contains = RUBY_DEFAULT_CONTAINS;\n\n  var SIMPLE_PROMPT = \"[>?]>\";\n  var DEFAULT_PROMPT = \"[\\\\w#]+\\\\(\\\\w+\\\\):\\\\d+:\\\\d+>\";\n  var RVM_PROMPT = \"(\\\\w+-)?\\\\d+\\\\.\\\\d+\\\\.\\\\d(p\\\\d+)?[^>]+>\";\n\n  var IRB_DEFAULT = [\n    {\n      begin: /^\\s*=>/,\n      starts: {\n        end: '$', contains: RUBY_DEFAULT_CONTAINS\n      }\n    },\n    {\n      className: 'meta',\n      begin: '^('+SIMPLE_PROMPT+\"|\"+DEFAULT_PROMPT+'|'+RVM_PROMPT+')',\n      starts: {\n        end: '$', contains: RUBY_DEFAULT_CONTAINS\n      }\n    }\n  ];\n\n  return {\n    aliases: ['rb', 'gemspec', 'podspec', 'thor', 'irb'],\n    keywords: RUBY_KEYWORDS,\n    illegal: /\\/\\*/,\n    contains: COMMENT_MODES.concat(IRB_DEFAULT).concat(RUBY_DEFAULT_CONTAINS)\n  };\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/languages/ruleslanguage.js",
    "content": "/*\nLanguage: Oracle Rules Language\nAuthor: Jason Jacobson <jason.a.jacobson@gmail.com>\nDescription: The Oracle Utilities Rules Language is used to program the Oracle Utilities Applications acquired from LODESTAR Corporation.  The products include Billing Component, LPSS, Pricing Component etc. through version 1.6.1.\nCategory: enterprise\n*/\n\nfunction(hljs) {\n  return {\n    keywords: {\n       keyword: 'BILL_PERIOD BILL_START BILL_STOP RS_EFFECTIVE_START RS_EFFECTIVE_STOP RS_JURIS_CODE RS_OPCO_CODE ' +\n         'INTDADDATTRIBUTE|5 INTDADDVMSG|5 INTDBLOCKOP|5 INTDBLOCKOPNA|5 INTDCLOSE|5 INTDCOUNT|5 ' +\n         'INTDCOUNTSTATUSCODE|5 INTDCREATEMASK|5 INTDCREATEDAYMASK|5 INTDCREATEFACTORMASK|5 ' +\n         'INTDCREATEHANDLE|5 INTDCREATEOVERRIDEDAYMASK|5 INTDCREATEOVERRIDEMASK|5 ' +\n         'INTDCREATESTATUSCODEMASK|5 INTDCREATETOUPERIOD|5 INTDDELETE|5 INTDDIPTEST|5 INTDEXPORT|5 ' +\n         'INTDGETERRORCODE|5 INTDGETERRORMESSAGE|5 INTDISEQUAL|5 INTDJOIN|5 INTDLOAD|5 INTDLOADACTUALCUT|5 ' +\n         'INTDLOADDATES|5 INTDLOADHIST|5 INTDLOADLIST|5 INTDLOADLISTDATES|5 INTDLOADLISTENERGY|5 ' +\n         'INTDLOADLISTHIST|5 INTDLOADRELATEDCHANNEL|5 INTDLOADSP|5 INTDLOADSTAGING|5 INTDLOADUOM|5 ' +\n         'INTDLOADUOMDATES|5 INTDLOADUOMHIST|5 INTDLOADVERSION|5 INTDOPEN|5 INTDREADFIRST|5 INTDREADNEXT|5 ' +\n         'INTDRECCOUNT|5 INTDRELEASE|5 INTDREPLACE|5 INTDROLLAVG|5 INTDROLLPEAK|5 INTDSCALAROP|5 INTDSCALE|5 ' +\n         'INTDSETATTRIBUTE|5 INTDSETDSTPARTICIPANT|5 INTDSETSTRING|5 INTDSETVALUE|5 INTDSETVALUESTATUS|5 ' +\n         'INTDSHIFTSTARTTIME|5 INTDSMOOTH|5 INTDSORT|5 INTDSPIKETEST|5 INTDSUBSET|5 INTDTOU|5 ' +\n         'INTDTOURELEASE|5 INTDTOUVALUE|5 INTDUPDATESTATS|5 INTDVALUE|5 STDEV INTDDELETEEX|5 ' +\n         'INTDLOADEXACTUAL|5 INTDLOADEXCUT|5 INTDLOADEXDATES|5 INTDLOADEX|5 INTDLOADEXRELATEDCHANNEL|5 ' +\n         'INTDSAVEEX|5 MVLOAD|5 MVLOADACCT|5 MVLOADACCTDATES|5 MVLOADACCTHIST|5 MVLOADDATES|5 MVLOADHIST|5 ' +\n         'MVLOADLIST|5 MVLOADLISTDATES|5 MVLOADLISTHIST|5 IF FOR NEXT DONE SELECT END CALL ABORT CLEAR CHANNEL FACTOR LIST NUMBER ' +\n         'OVERRIDE SET WEEK DISTRIBUTIONNODE ELSE WHEN THEN OTHERWISE IENUM CSV INCLUDE LEAVE RIDER SAVE DELETE ' +\n         'NOVALUE SECTION WARN SAVE_UPDATE DETERMINANT LABEL REPORT REVENUE EACH ' +\n         'IN FROM TOTAL CHARGE BLOCK AND OR CSV_FILE RATE_CODE AUXILIARY_DEMAND ' +\n         'UIDACCOUNT RS BILL_PERIOD_SELECT HOURS_PER_MONTH INTD_ERROR_STOP SEASON_SCHEDULE_NAME ' +\n         'ACCOUNTFACTOR ARRAYUPPERBOUND CALLSTOREDPROC GETADOCONNECTION GETCONNECT GETDATASOURCE ' +\n         'GETQUALIFIER GETUSERID HASVALUE LISTCOUNT LISTOP LISTUPDATE LISTVALUE PRORATEFACTOR RSPRORATE ' +\n         'SETBINPATH SETDBMONITOR WQ_OPEN BILLINGHOURS DATE DATEFROMFLOAT DATETIMEFROMSTRING ' +\n         'DATETIMETOSTRING DATETOFLOAT DAY DAYDIFF DAYNAME DBDATETIME HOUR MINUTE MONTH MONTHDIFF ' +\n         'MONTHHOURS MONTHNAME ROUNDDATE SAMEWEEKDAYLASTYEAR SECOND WEEKDAY WEEKDIFF YEAR YEARDAY ' +\n         'YEARSTR COMPSUM HISTCOUNT HISTMAX HISTMIN HISTMINNZ HISTVALUE MAXNRANGE MAXRANGE MINRANGE ' +\n         'COMPIKVA COMPKVA COMPKVARFROMKQKW COMPLF IDATTR FLAG LF2KW LF2KWH MAXKW POWERFACTOR ' +\n         'READING2USAGE AVGSEASON MAXSEASON MONTHLYMERGE SEASONVALUE SUMSEASON ACCTREADDATES ' +\n         'ACCTTABLELOAD CONFIGADD CONFIGGET CREATEOBJECT CREATEREPORT EMAILCLIENT EXPBLKMDMUSAGE ' +\n         'EXPMDMUSAGE EXPORT_USAGE FACTORINEFFECT GETUSERSPECIFIEDSTOP INEFFECT ISHOLIDAY RUNRATE ' +\n         'SAVE_PROFILE SETREPORTTITLE USEREXIT WATFORRUNRATE TO TABLE ACOS ASIN ATAN ATAN2 BITAND CEIL ' +\n         'COS COSECANT COSH COTANGENT DIVQUOT DIVREM EXP FABS FLOOR FMOD FREPM FREXPN LOG LOG10 MAX MAXN ' +\n         'MIN MINNZ MODF POW ROUND ROUND2VALUE ROUNDINT SECANT SIN SINH SQROOT TAN TANH FLOAT2STRING ' +\n         'FLOAT2STRINGNC INSTR LEFT LEN LTRIM MID RIGHT RTRIM STRING STRINGNC TOLOWER TOUPPER TRIM ' +\n         'NUMDAYS READ_DATE STAGING',\n       built_in: 'IDENTIFIER OPTIONS XML_ELEMENT XML_OP XML_ELEMENT_OF DOMDOCCREATE DOMDOCLOADFILE DOMDOCLOADXML ' +\n         'DOMDOCSAVEFILE DOMDOCGETROOT DOMDOCADDPI DOMNODEGETNAME DOMNODEGETTYPE DOMNODEGETVALUE DOMNODEGETCHILDCT ' +\n         'DOMNODEGETFIRSTCHILD DOMNODEGETSIBLING DOMNODECREATECHILDELEMENT DOMNODESETATTRIBUTE ' +\n         'DOMNODEGETCHILDELEMENTCT DOMNODEGETFIRSTCHILDELEMENT DOMNODEGETSIBLINGELEMENT DOMNODEGETATTRIBUTECT ' +\n         'DOMNODEGETATTRIBUTEI DOMNODEGETATTRIBUTEBYNAME DOMNODEGETBYNAME'\n    },\n    contains: [\n      hljs.C_LINE_COMMENT_MODE,\n      hljs.C_BLOCK_COMMENT_MODE,\n      hljs.APOS_STRING_MODE,\n      hljs.QUOTE_STRING_MODE,\n      hljs.C_NUMBER_MODE,\n      {\n        className: 'literal',\n        variants: [\n          {begin: '#\\\\s+[a-zA-Z\\\\ \\\\.]*', relevance: 0}, // looks like #-comment\n          {begin: '#[a-zA-Z\\\\ \\\\.]+'}\n        ]\n      }\n    ]\n  };\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/languages/rust.js",
    "content": "/*\nLanguage: Rust\nAuthor: Andrey Vlasovskikh <andrey.vlasovskikh@gmail.com>\nContributors: Roman Shmatov <romanshmatov@gmail.com>\nCategory: system\n*/\n\nfunction(hljs) {\n  var NUM_SUFFIX = '([uif](8|16|32|64|size))\\?';\n  var KEYWORDS =\n    'alignof as be box break const continue crate do else enum extern ' +\n    'false fn for if impl in let loop match mod mut offsetof once priv ' +\n    'proc pub pure ref return self Self sizeof static struct super trait true ' +\n    'type typeof unsafe unsized use virtual while where yield move default ' +\n    'int i8 i16 i32 i64 isize ' +\n    'uint u8 u32 u64 usize ' +\n    'float f32 f64 ' +\n    'str char bool'\n  var BUILTINS =\n    // prelude\n    'Copy Send Sized Sync Drop Fn FnMut FnOnce drop Box ToOwned Clone ' +\n    'PartialEq PartialOrd Eq Ord AsRef AsMut Into From Default Iterator ' +\n    'Extend IntoIterator DoubleEndedIterator ExactSizeIterator Option ' +\n    'Result SliceConcatExt String ToString Vec ' +\n    // macros\n    'assert! assert_eq! bitflags! bytes! cfg! col! concat! concat_idents! ' +\n    'debug_assert! debug_assert_eq! env! panic! file! format! format_args! ' +\n    'include_bin! include_str! line! local_data_key! module_path! ' +\n    'option_env! print! println! select! stringify! try! unimplemented! ' +\n    'unreachable! vec! write! writeln! macro_rules!';\n  return {\n    aliases: ['rs'],\n    keywords: {\n      keyword:\n        KEYWORDS,\n      literal:\n        'true false Some None Ok Err',\n      built_in:\n        BUILTINS\n    },\n    lexemes: hljs.IDENT_RE + '!?',\n    illegal: '</',\n    contains: [\n      hljs.C_LINE_COMMENT_MODE,\n      hljs.COMMENT('/\\\\*', '\\\\*/', {contains: ['self']}),\n      hljs.inherit(hljs.QUOTE_STRING_MODE, {begin: /b?\"/, illegal: null}),\n      {\n        className: 'string',\n        variants: [\n           { begin: /r(#*)\".*?\"\\1(?!#)/ },\n           { begin: /b?'\\\\?(x\\w{2}|u\\w{4}|U\\w{8}|.)'/ }\n        ]\n      },\n      {\n        className: 'symbol',\n        begin: /'[a-zA-Z_][a-zA-Z0-9_]*/\n      },\n      {\n        className: 'number',\n        variants: [\n          { begin: '\\\\b0b([01_]+)' + NUM_SUFFIX },\n          { begin: '\\\\b0o([0-7_]+)' + NUM_SUFFIX },\n          { begin: '\\\\b0x([A-Fa-f0-9_]+)' + NUM_SUFFIX },\n          { begin: '\\\\b(\\\\d[\\\\d_]*(\\\\.[0-9_]+)?([eE][+-]?[0-9_]+)?)' +\n                   NUM_SUFFIX\n          }\n        ],\n        relevance: 0\n      },\n      {\n        className: 'function',\n        beginKeywords: 'fn', end: '(\\\\(|<)', excludeEnd: true,\n        contains: [hljs.UNDERSCORE_TITLE_MODE]\n      },\n      {\n        className: 'meta',\n        begin: '#\\\\!?\\\\[', end: '\\\\]',\n        contains: [\n          {\n            className: 'meta-string',\n            begin: /\"/, end: /\"/\n          }\n        ]\n      },\n      {\n        className: 'class',\n        beginKeywords: 'type', end: ';',\n        contains: [\n          hljs.inherit(hljs.UNDERSCORE_TITLE_MODE, {endsParent: true})\n        ],\n        illegal: '\\\\S'\n      },\n      {\n        className: 'class',\n        beginKeywords: 'trait enum struct', end: '{',\n        contains: [\n          hljs.inherit(hljs.UNDERSCORE_TITLE_MODE, {endsParent: true})\n        ],\n        illegal: '[\\\\w\\\\d]'\n      },\n      {\n        begin: hljs.IDENT_RE + '::',\n        keywords: {built_in: BUILTINS}\n      },\n      {\n        begin: '->'\n      }\n    ]\n  };\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/languages/scala.js",
    "content": "/*\nLanguage: Scala\nCategory: functional\nAuthor: Jan Berkel <jan.berkel@gmail.com>\nContributors: Erik Osheim <d_m@plastic-idolatry.com>\n*/\n\nfunction(hljs) {\n\n  var ANNOTATION = { className: 'meta', begin: '@[A-Za-z]+' };\n\n  // used in strings for escaping/interpolation/substitution\n  var SUBST = {\n    className: 'subst',\n    variants: [\n      {begin: '\\\\$[A-Za-z0-9_]+'},\n      {begin: '\\\\${', end: '}'}\n    ]\n  };\n\n  var STRING = {\n    className: 'string',\n    variants: [\n      {\n        begin: '\"', end: '\"',\n        illegal: '\\\\n',\n        contains: [hljs.BACKSLASH_ESCAPE]\n      },\n      {\n        begin: '\"\"\"', end: '\"\"\"',\n        relevance: 10\n      },\n      {\n        begin: '[a-z]+\"', end: '\"',\n        illegal: '\\\\n',\n        contains: [hljs.BACKSLASH_ESCAPE, SUBST]\n      },\n      {\n        className: 'string',\n        begin: '[a-z]+\"\"\"', end: '\"\"\"',\n        contains: [SUBST],\n        relevance: 10\n      }\n    ]\n\n  };\n\n  var SYMBOL = {\n    className: 'symbol',\n    begin: '\\'\\\\w[\\\\w\\\\d_]*(?!\\')'\n  };\n\n  var TYPE = {\n    className: 'type',\n    begin: '\\\\b[A-Z][A-Za-z0-9_]*',\n    relevance: 0\n  };\n\n  var NAME = {\n    className: 'title',\n    begin: /[^0-9\\n\\t \"'(),.`{}\\[\\]:;][^\\n\\t \"'(),.`{}\\[\\]:;]+|[^0-9\\n\\t \"'(),.`{}\\[\\]:;=]/,\n    relevance: 0\n  };\n\n  var CLASS = {\n    className: 'class',\n    beginKeywords: 'class object trait type',\n    end: /[:={\\[\\n;]/,\n    excludeEnd: true,\n    contains: [\n      {\n        beginKeywords: 'extends with',\n        relevance: 10\n      },\n      {\n        begin: /\\[/,\n        end: /\\]/,\n        excludeBegin: true,\n        excludeEnd: true,\n        relevance: 0,\n        contains: [TYPE]\n      },\n      {\n        className: 'params',\n        begin: /\\(/,\n        end: /\\)/,\n        excludeBegin: true,\n        excludeEnd: true,\n        relevance: 0,\n        contains: [TYPE]\n      },\n      NAME\n    ]\n  };\n\n  var METHOD = {\n    className: 'function',\n    beginKeywords: 'def',\n    end: /[:={\\[(\\n;]/,\n    excludeEnd: true,\n    contains: [NAME]\n  };\n\n  return {\n    keywords: {\n      literal: 'true false null',\n      keyword: 'type yield lazy override def with val var sealed abstract private trait object if forSome for while throw finally protected extends import final return else break new catch super class case package default try this match continue throws implicit'\n    },\n    contains: [\n      hljs.C_LINE_COMMENT_MODE,\n      hljs.C_BLOCK_COMMENT_MODE,\n      STRING,\n      SYMBOL,\n      TYPE,\n      METHOD,\n      CLASS,\n      hljs.C_NUMBER_MODE,\n      ANNOTATION\n    ]\n  };\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/languages/scheme.js",
    "content": "/*\nLanguage: Scheme\nDescription: Keywords based on http://community.schemewiki.org/?scheme-keywords\nAuthor: JP Verkamp <me@jverkamp.com>\nContributors: Ivan Sagalaev <maniac@softwaremaniacs.org>\nOrigin: clojure.js\nCategory: lisp\n*/\n\nfunction(hljs) {\n  var SCHEME_IDENT_RE = '[^\\\\(\\\\)\\\\[\\\\]\\\\{\\\\}\",\\'`;#|\\\\\\\\\\\\s]+';\n  var SCHEME_SIMPLE_NUMBER_RE = '(\\\\-|\\\\+)?\\\\d+([./]\\\\d+)?';\n  var SCHEME_COMPLEX_NUMBER_RE = SCHEME_SIMPLE_NUMBER_RE + '[+\\\\-]' + SCHEME_SIMPLE_NUMBER_RE + 'i';\n  var BUILTINS = {\n    'builtin-name':\n      'case-lambda call/cc class define-class exit-handler field import ' +\n      'inherit init-field interface let*-values let-values let/ec mixin ' +\n      'opt-lambda override protect provide public rename require ' +\n      'require-for-syntax syntax syntax-case syntax-error unit/sig unless ' +\n      'when with-syntax and begin call-with-current-continuation ' +\n      'call-with-input-file call-with-output-file case cond define ' +\n      'define-syntax delay do dynamic-wind else for-each if lambda let let* ' +\n      'let-syntax letrec letrec-syntax map or syntax-rules \\' * + , ,@ - ... / ' +\n      '; < <= = => > >= ` abs acos angle append apply asin assoc assq assv atan ' +\n      'boolean? caar cadr call-with-input-file call-with-output-file ' +\n      'call-with-values car cdddar cddddr cdr ceiling char->integer ' +\n      'char-alphabetic? char-ci<=? char-ci<? char-ci=? char-ci>=? char-ci>? ' +\n      'char-downcase char-lower-case? char-numeric? char-ready? char-upcase ' +\n      'char-upper-case? char-whitespace? char<=? char<? char=? char>=? char>? ' +\n      'char? close-input-port close-output-port complex? cons cos ' +\n      'current-input-port current-output-port denominator display eof-object? ' +\n      'eq? equal? eqv? eval even? exact->inexact exact? exp expt floor ' +\n      'force gcd imag-part inexact->exact inexact? input-port? integer->char ' +\n      'integer? interaction-environment lcm length list list->string ' +\n      'list->vector list-ref list-tail list? load log magnitude make-polar ' +\n      'make-rectangular make-string make-vector max member memq memv min ' +\n      'modulo negative? newline not null-environment null? number->string ' +\n      'number? numerator odd? open-input-file open-output-file output-port? ' +\n      'pair? peek-char port? positive? procedure? quasiquote quote quotient ' +\n      'rational? rationalize read read-char real-part real? remainder reverse ' +\n      'round scheme-report-environment set! set-car! set-cdr! sin sqrt string ' +\n      'string->list string->number string->symbol string-append string-ci<=? ' +\n      'string-ci<? string-ci=? string-ci>=? string-ci>? string-copy ' +\n      'string-fill! string-length string-ref string-set! string<=? string<? ' +\n      'string=? string>=? string>? string? substring symbol->string symbol? ' +\n      'tan transcript-off transcript-on truncate values vector ' +\n      'vector->list vector-fill! vector-length vector-ref vector-set! ' +\n      'with-input-from-file with-output-to-file write write-char zero?'\n  };\n\n  var SHEBANG = {\n    className: 'meta',\n    begin: '^#!',\n    end: '$'\n  };\n\n  var LITERAL = {\n    className: 'literal',\n    begin: '(#t|#f|#\\\\\\\\' + SCHEME_IDENT_RE + '|#\\\\\\\\.)'\n  };\n\n  var NUMBER = {\n    className: 'number',\n    variants: [\n      { begin: SCHEME_SIMPLE_NUMBER_RE, relevance: 0 },\n      { begin: SCHEME_COMPLEX_NUMBER_RE, relevance: 0 },\n      { begin: '#b[0-1]+(/[0-1]+)?' },\n      { begin: '#o[0-7]+(/[0-7]+)?' },\n      { begin: '#x[0-9a-f]+(/[0-9a-f]+)?' }\n    ]\n  };\n\n  var STRING = hljs.QUOTE_STRING_MODE;\n\n  var REGULAR_EXPRESSION = {\n    className: 'regexp',\n    begin: '#[pr]x\"',\n    end: '[^\\\\\\\\]\"'\n  };\n\n  var COMMENT_MODES = [\n    hljs.COMMENT(\n      ';',\n      '$',\n      {\n        relevance: 0\n      }\n    ),\n    hljs.COMMENT('#\\\\|', '\\\\|#')\n  ];\n\n  var IDENT = {\n    begin: SCHEME_IDENT_RE,\n    relevance: 0\n  };\n\n  var QUOTED_IDENT = {\n    className: 'symbol',\n    begin: '\\'' + SCHEME_IDENT_RE\n  };\n\n  var BODY = {\n    endsWithParent: true,\n    relevance: 0\n  };\n\n  var QUOTED_LIST = {\n    begin: /'/,\n    contains: [\n      {\n        begin: '\\\\(', end: '\\\\)',\n        contains: ['self', LITERAL, STRING, NUMBER, IDENT, QUOTED_IDENT]\n      }\n    ]\n  };\n\n  var NAME = {\n    className: 'name',\n    begin: SCHEME_IDENT_RE,\n    lexemes: SCHEME_IDENT_RE,\n    keywords: BUILTINS\n  };\n\n  var LAMBDA = {\n    begin: /lambda/, endsWithParent: true, returnBegin: true,\n    contains: [\n      NAME,\n      {\n        begin: /\\(/, end: /\\)/, endsParent: true,\n        contains: [IDENT],\n      }\n    ]\n  };\n\n  var LIST = {\n    variants: [\n      { begin: '\\\\(', end: '\\\\)' },\n      { begin: '\\\\[', end: '\\\\]' }\n    ],\n    contains: [LAMBDA, NAME, BODY]\n  };\n\n  BODY.contains = [LITERAL, NUMBER, STRING, IDENT, QUOTED_IDENT, QUOTED_LIST, LIST].concat(COMMENT_MODES);\n\n  return {\n    illegal: /\\S/,\n    contains: [SHEBANG, NUMBER, STRING, QUOTED_IDENT, QUOTED_LIST, LIST].concat(COMMENT_MODES)\n  };\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/languages/scilab.js",
    "content": "/*\nLanguage: Scilab\nAuthor: Sylvestre Ledru <sylvestre.ledru@scilab-enterprises.com>\nOrigin: matlab.js\nDescription: Scilab is a port from Matlab\nCategory: scientific\n*/\n\nfunction(hljs) {\n\n  var COMMON_CONTAINS = [\n    hljs.C_NUMBER_MODE,\n    {\n      className: 'string',\n      begin: '\\'|\\\"', end: '\\'|\\\"',\n      contains: [hljs.BACKSLASH_ESCAPE, {begin: '\\'\\''}]\n    }\n  ];\n\n  return {\n    aliases: ['sci'],\n    lexemes: /%?\\w+/,\n    keywords: {\n      keyword: 'abort break case clear catch continue do elseif else endfunction end for function '+\n        'global if pause return resume select try then while',\n      literal:\n        '%f %F %t %T %pi %eps %inf %nan %e %i %z %s',\n      built_in: // Scilab has more than 2000 functions. Just list the most commons\n       'abs and acos asin atan ceil cd chdir clearglobal cosh cos cumprod deff disp error '+\n       'exec execstr exists exp eye gettext floor fprintf fread fsolve imag isdef isempty '+\n       'isinfisnan isvector lasterror length load linspace list listfiles log10 log2 log '+\n       'max min msprintf mclose mopen ones or pathconvert poly printf prod pwd rand real '+\n       'round sinh sin size gsort sprintf sqrt strcat strcmps tring sum system tanh tan '+\n       'type typename warning zeros matrix'\n    },\n    illegal: '(\"|#|/\\\\*|\\\\s+/\\\\w+)',\n    contains: [\n      {\n        className: 'function',\n        beginKeywords: 'function', end: '$',\n        contains: [\n          hljs.UNDERSCORE_TITLE_MODE,\n          {\n            className: 'params',\n            begin: '\\\\(', end: '\\\\)'\n          }\n        ]\n      },\n      {\n        begin: '[a-zA-Z_][a-zA-Z_0-9]*(\\'+[\\\\.\\']*|[\\\\.\\']+)', end: '',\n        relevance: 0\n      },\n      {\n        begin: '\\\\[', end: '\\\\]\\'*[\\\\.\\']*',\n        relevance: 0,\n        contains: COMMON_CONTAINS\n      },\n      hljs.COMMENT('//', '$')\n    ].concat(COMMON_CONTAINS)\n  };\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/languages/scss.js",
    "content": "/*\nLanguage: SCSS\nAuthor: Kurt Emch <kurt@kurtemch.com>\nCategory: css\n*/\nfunction(hljs) {\n  var IDENT_RE = '[a-zA-Z-][a-zA-Z0-9_-]*';\n  var VARIABLE = {\n    className: 'variable',\n    begin: '(\\\\$' + IDENT_RE + ')\\\\b'\n  };\n  var HEXCOLOR = {\n    className: 'number', begin: '#[0-9A-Fa-f]+'\n  };\n  var DEF_INTERNALS = {\n    className: 'attribute',\n    begin: '[A-Z\\\\_\\\\.\\\\-]+', end: ':',\n    excludeEnd: true,\n    illegal: '[^\\\\s]',\n    starts: {\n      endsWithParent: true, excludeEnd: true,\n      contains: [\n        HEXCOLOR,\n        hljs.CSS_NUMBER_MODE,\n        hljs.QUOTE_STRING_MODE,\n        hljs.APOS_STRING_MODE,\n        hljs.C_BLOCK_COMMENT_MODE,\n        {\n          className: 'meta', begin: '!important'\n        }\n      ]\n    }\n  };\n  return {\n    case_insensitive: true,\n    illegal: '[=/|\\']',\n    contains: [\n      hljs.C_LINE_COMMENT_MODE,\n      hljs.C_BLOCK_COMMENT_MODE,\n      {\n        className: 'selector-id', begin: '\\\\#[A-Za-z0-9_-]+',\n        relevance: 0\n      },\n      {\n        className: 'selector-class', begin: '\\\\.[A-Za-z0-9_-]+',\n        relevance: 0\n      },\n      {\n        className: 'selector-attr', begin: '\\\\[', end: '\\\\]',\n        illegal: '$'\n      },\n      {\n        className: 'selector-tag', // begin: IDENT_RE, end: '[,|\\\\s]'\n        begin: '\\\\b(a|abbr|acronym|address|area|article|aside|audio|b|base|big|blockquote|body|br|button|canvas|caption|cite|code|col|colgroup|command|datalist|dd|del|details|dfn|div|dl|dt|em|embed|fieldset|figcaption|figure|footer|form|frame|frameset|(h[1-6])|head|header|hgroup|hr|html|i|iframe|img|input|ins|kbd|keygen|label|legend|li|link|map|mark|meta|meter|nav|noframes|noscript|object|ol|optgroup|option|output|p|param|pre|progress|q|rp|rt|ruby|samp|script|section|select|small|span|strike|strong|style|sub|sup|table|tbody|td|textarea|tfoot|th|thead|time|title|tr|tt|ul|var|video)\\\\b',\n        relevance: 0\n      },\n      {\n        begin: ':(visited|valid|root|right|required|read-write|read-only|out-range|optional|only-of-type|only-child|nth-of-type|nth-last-of-type|nth-last-child|nth-child|not|link|left|last-of-type|last-child|lang|invalid|indeterminate|in-range|hover|focus|first-of-type|first-line|first-letter|first-child|first|enabled|empty|disabled|default|checked|before|after|active)'\n      },\n      {\n        begin: '::(after|before|choices|first-letter|first-line|repeat-index|repeat-item|selection|value)'\n      },\n      VARIABLE,\n      {\n        className: 'attribute',\n        begin: '\\\\b(z-index|word-wrap|word-spacing|word-break|width|widows|white-space|visibility|vertical-align|unicode-bidi|transition-timing-function|transition-property|transition-duration|transition-delay|transition|transform-style|transform-origin|transform|top|text-underline-position|text-transform|text-shadow|text-rendering|text-overflow|text-indent|text-decoration-style|text-decoration-line|text-decoration-color|text-decoration|text-align-last|text-align|tab-size|table-layout|right|resize|quotes|position|pointer-events|perspective-origin|perspective|page-break-inside|page-break-before|page-break-after|padding-top|padding-right|padding-left|padding-bottom|padding|overflow-y|overflow-x|overflow-wrap|overflow|outline-width|outline-style|outline-offset|outline-color|outline|orphans|order|opacity|object-position|object-fit|normal|none|nav-up|nav-right|nav-left|nav-index|nav-down|min-width|min-height|max-width|max-height|mask|marks|margin-top|margin-right|margin-left|margin-bottom|margin|list-style-type|list-style-position|list-style-image|list-style|line-height|letter-spacing|left|justify-content|initial|inherit|ime-mode|image-orientation|image-resolution|image-rendering|icon|hyphens|height|font-weight|font-variant-ligatures|font-variant|font-style|font-stretch|font-size-adjust|font-size|font-language-override|font-kerning|font-feature-settings|font-family|font|float|flex-wrap|flex-shrink|flex-grow|flex-flow|flex-direction|flex-basis|flex|filter|empty-cells|display|direction|cursor|counter-reset|counter-increment|content|column-width|column-span|column-rule-width|column-rule-style|column-rule-color|column-rule|column-gap|column-fill|column-count|columns|color|clip-path|clip|clear|caption-side|break-inside|break-before|break-after|box-sizing|box-shadow|box-decoration-break|bottom|border-width|border-top-width|border-top-style|border-top-right-radius|border-top-left-radius|border-top-color|border-top|border-style|border-spacing|border-right-width|border-right-style|border-right-color|border-right|border-radius|border-left-width|border-left-style|border-left-color|border-left|border-image-width|border-image-source|border-image-slice|border-image-repeat|border-image-outset|border-image|border-color|border-collapse|border-bottom-width|border-bottom-style|border-bottom-right-radius|border-bottom-left-radius|border-bottom-color|border-bottom|border|background-size|background-repeat|background-position|background-origin|background-image|background-color|background-clip|background-attachment|background-blend-mode|background|backface-visibility|auto|animation-timing-function|animation-play-state|animation-name|animation-iteration-count|animation-fill-mode|animation-duration|animation-direction|animation-delay|animation|align-self|align-items|align-content)\\\\b',\n        illegal: '[^\\\\s]'\n      },\n      {\n        begin: '\\\\b(whitespace|wait|w-resize|visible|vertical-text|vertical-ideographic|uppercase|upper-roman|upper-alpha|underline|transparent|top|thin|thick|text|text-top|text-bottom|tb-rl|table-header-group|table-footer-group|sw-resize|super|strict|static|square|solid|small-caps|separate|se-resize|scroll|s-resize|rtl|row-resize|ridge|right|repeat|repeat-y|repeat-x|relative|progress|pointer|overline|outside|outset|oblique|nowrap|not-allowed|normal|none|nw-resize|no-repeat|no-drop|newspaper|ne-resize|n-resize|move|middle|medium|ltr|lr-tb|lowercase|lower-roman|lower-alpha|loose|list-item|line|line-through|line-edge|lighter|left|keep-all|justify|italic|inter-word|inter-ideograph|inside|inset|inline|inline-block|inherit|inactive|ideograph-space|ideograph-parenthesis|ideograph-numeric|ideograph-alpha|horizontal|hidden|help|hand|groove|fixed|ellipsis|e-resize|double|dotted|distribute|distribute-space|distribute-letter|distribute-all-lines|disc|disabled|default|decimal|dashed|crosshair|collapse|col-resize|circle|char|center|capitalize|break-word|break-all|bottom|both|bolder|bold|block|bidi-override|below|baseline|auto|always|all-scroll|absolute|table|table-cell)\\\\b'\n      },\n      {\n        begin: ':', end: ';',\n        contains: [\n          VARIABLE,\n          HEXCOLOR,\n          hljs.CSS_NUMBER_MODE,\n          hljs.QUOTE_STRING_MODE,\n          hljs.APOS_STRING_MODE,\n          {\n            className: 'meta', begin: '!important'\n          }\n        ]\n      },\n      {\n        begin: '@', end: '[{;]',\n        keywords: 'mixin include extend for if else each while charset import debug media page content font-face namespace warn',\n        contains: [\n          VARIABLE,\n          hljs.QUOTE_STRING_MODE,\n          hljs.APOS_STRING_MODE,\n          HEXCOLOR,\n          hljs.CSS_NUMBER_MODE,\n          {\n            begin: '\\\\s[A-Za-z0-9_.-]+',\n            relevance: 0\n          }\n        ]\n      }\n    ]\n  };\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/languages/smali.js",
    "content": "/*\nLanguage: Smali\nAuthor: Dennis Titze <dennis.titze@gmail.com>\nDescription: Basic Smali highlighting\n*/\n\nfunction(hljs) {\n  var smali_instr_low_prio = ['add', 'and', 'cmp', 'cmpg', 'cmpl', 'const', 'div', 'double', 'float', 'goto', 'if', 'int', 'long', 'move', 'mul', 'neg', 'new', 'nop', 'not', 'or', 'rem', 'return', 'shl', 'shr', 'sput', 'sub', 'throw', 'ushr', 'xor'];\n  var smali_instr_high_prio = ['aget', 'aput', 'array', 'check', 'execute', 'fill', 'filled', 'goto/16', 'goto/32', 'iget', 'instance', 'invoke', 'iput', 'monitor', 'packed', 'sget', 'sparse'];\n  var smali_keywords = ['transient', 'constructor', 'abstract', 'final', 'synthetic', 'public', 'private', 'protected', 'static', 'bridge', 'system'];\n  return {\n    aliases: ['smali'],\n    contains: [\n      {\n        className: 'string',\n        begin: '\"', end: '\"',\n        relevance: 0\n      },\n      hljs.COMMENT(\n        '#',\n        '$',\n        {\n          relevance: 0\n        }\n      ),\n      {\n        className: 'keyword',\n        variants: [\n          {begin: '\\\\s*\\\\.end\\\\s[a-zA-Z0-9]*'},\n          {begin: '^[ ]*\\\\.[a-zA-Z]*', relevance: 0},\n          {begin: '\\\\s:[a-zA-Z_0-9]*', relevance: 0},\n          {begin: '\\\\s(' + smali_keywords.join('|') + ')'}\n        ]\n      },\n      {\n        className: 'built_in',\n        variants : [\n          {\n            begin: '\\\\s('+smali_instr_low_prio.join('|')+')\\\\s'\n          },\n          {\n            begin: '\\\\s('+smali_instr_low_prio.join('|')+')((\\\\-|/)[a-zA-Z0-9]+)+\\\\s',\n            relevance: 10\n          },\n          {\n            begin: '\\\\s('+smali_instr_high_prio.join('|')+')((\\\\-|/)[a-zA-Z0-9]+)*\\\\s',\n            relevance: 10\n          },\n        ]\n      },\n      {\n        className: 'class',\n        begin: 'L[^\\(;:\\n]*;',\n        relevance: 0\n      },\n      {\n        begin: '[vp][0-9]+',\n      }\n    ]\n  };\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/languages/smalltalk.js",
    "content": "/*\nLanguage: Smalltalk\nAuthor: Vladimir Gubarkov <xonixx@gmail.com>\n*/\n\nfunction(hljs) {\n  var VAR_IDENT_RE = '[a-z][a-zA-Z0-9_]*';\n  var CHAR = {\n    className: 'string',\n    begin: '\\\\$.{1}'\n  };\n  var SYMBOL = {\n    className: 'symbol',\n    begin: '#' + hljs.UNDERSCORE_IDENT_RE\n  };\n  return {\n    aliases: ['st'],\n    keywords: 'self super nil true false thisContext', // only 6\n    contains: [\n      hljs.COMMENT('\"', '\"'),\n      hljs.APOS_STRING_MODE,\n      {\n        className: 'type',\n        begin: '\\\\b[A-Z][A-Za-z0-9_]*',\n        relevance: 0\n      },\n      {\n        begin: VAR_IDENT_RE + ':',\n        relevance: 0\n      },\n      hljs.C_NUMBER_MODE,\n      SYMBOL,\n      CHAR,\n      {\n        // This looks more complicated than needed to avoid combinatorial\n        // explosion under V8. It effectively means `| var1 var2 ... |` with\n        // whitespace adjacent to `|` being optional.\n        begin: '\\\\|[ ]*' + VAR_IDENT_RE + '([ ]+' + VAR_IDENT_RE + ')*[ ]*\\\\|',\n        returnBegin: true, end: /\\|/,\n        illegal: /\\S/,\n        contains: [{begin: '(\\\\|[ ]*)?' + VAR_IDENT_RE}]\n      },\n      {\n        begin: '\\\\#\\\\(', end: '\\\\)',\n        contains: [\n          hljs.APOS_STRING_MODE,\n          CHAR,\n          hljs.C_NUMBER_MODE,\n          SYMBOL\n        ]\n      }\n    ]\n  };\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/languages/sml.js",
    "content": "/*\nLanguage: SML\nAuthor: Edwin Dalorzo <edwin@dalorzo.org>\nDescription: SML language definition.\nOrigin: ocaml.js\nCategory: functional\n*/\nfunction(hljs) {\n  return {\n    aliases: ['ml'],\n    keywords: {\n      keyword:\n        /* according to Definition of Standard ML 97  */\n        'abstype and andalso as case datatype do else end eqtype ' +\n        'exception fn fun functor handle if in include infix infixr ' +\n        'let local nonfix of op open orelse raise rec sharing sig ' +\n        'signature struct structure then type val with withtype where while',\n      built_in:\n        /* built-in types according to basis library */\n        'array bool char exn int list option order real ref string substring vector unit word',\n      literal:\n        'true false NONE SOME LESS EQUAL GREATER nil'\n    },\n    illegal: /\\/\\/|>>/,\n    lexemes: '[a-z_]\\\\w*!?',\n    contains: [\n      {\n        className: 'literal',\n        begin: /\\[(\\|\\|)?\\]|\\(\\)/,\n        relevance: 0\n      },\n      hljs.COMMENT(\n        '\\\\(\\\\*',\n        '\\\\*\\\\)',\n        {\n          contains: ['self']\n        }\n      ),\n      { /* type variable */\n        className: 'symbol',\n        begin: '\\'[A-Za-z_](?!\\')[\\\\w\\']*'\n        /* the grammar is ambiguous on how 'a'b should be interpreted but not the compiler */\n      },\n      { /* polymorphic variant */\n        className: 'type',\n        begin: '`[A-Z][\\\\w\\']*'\n      },\n      { /* module or constructor */\n        className: 'type',\n        begin: '\\\\b[A-Z][\\\\w\\']*',\n        relevance: 0\n      },\n      { /* don't color identifiers, but safely catch all identifiers with '*/\n        begin: '[a-z_]\\\\w*\\'[\\\\w\\']*'\n      },\n      hljs.inherit(hljs.APOS_STRING_MODE, {className: 'string', relevance: 0}),\n      hljs.inherit(hljs.QUOTE_STRING_MODE, {illegal: null}),\n      {\n        className: 'number',\n        begin:\n          '\\\\b(0[xX][a-fA-F0-9_]+[Lln]?|' +\n          '0[oO][0-7_]+[Lln]?|' +\n          '0[bB][01_]+[Lln]?|' +\n          '[0-9][0-9_]*([Lln]|(\\\\.[0-9_]*)?([eE][-+]?[0-9_]+)?)?)',\n        relevance: 0\n      },\n      {\n        begin: /[-=]>/ // relevance booster\n      }\n    ]\n  };\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/languages/sqf.js",
    "content": "/*\nLanguage: SQF\nAuthor: Søren Enevoldsen <senevoldsen90@gmail.com>\nDescription: Scripting language for the Arma game series\nRequires: cpp.js\n*/\n\nfunction(hljs) {\n  var CPP = hljs.getLanguage('cpp').exports;\n\n  // In SQF strings, quotes matching the start are escaped by adding a consecutive.\n  // Example of single escaped quotes: \" \"\" \" and  ' '' '.\n  var STRINGS = {\n    className: 'string',\n    variants: [\n      {\n        begin: '\"',\n        end: '\"',\n        contains: [{begin: '\"\"', relevance: 0}]\n      },\n      {\n        begin: '\\'',\n        end: '\\'',\n        contains: [{begin: '\\'\\'', relevance: 0}]\n      }\n    ]\n  };\n\n  return {\n    aliases: ['sqf'],\n    case_insensitive: true,\n    keywords: {\n      keyword:\n        'case catch default do else exit exitWith for forEach from if ' +\n        'switch then throw to try while with',\n      built_in:\n        'or plus abs accTime acos action actionKeys actionKeysImages ' +\n        'actionKeysNames actionKeysNamesArray actionName activateAddons ' +\n        'activatedAddons activateKey addAction addBackpack addBackpackCargo ' +\n        'addBackpackCargoGlobal addBackpackGlobal addCamShake ' +\n        'addCuratorAddons addCuratorCameraArea addCuratorEditableObjects ' +\n        'addCuratorEditingArea addCuratorPoints addEditorObject ' +\n        'addEventHandler addGoggles addGroupIcon addHandgunItem addHeadgear ' +\n        'addItem addItemCargo addItemCargoGlobal addItemPool ' +\n        'addItemToBackpack addItemToUniform addItemToVest addLiveStats ' +\n        'addMagazine addMagazine array addMagazineAmmoCargo ' +\n        'addMagazineCargo addMagazineCargoGlobal addMagazineGlobal ' +\n        'addMagazinePool addMagazines addMagazineTurret addMenu addMenuItem ' +\n        'addMissionEventHandler addMPEventHandler addMusicEventHandler ' +\n        'addPrimaryWeaponItem addPublicVariableEventHandler addRating ' +\n        'addResources addScore addScoreSide addSecondaryWeaponItem ' +\n        'addSwitchableUnit addTeamMember addToRemainsCollector addUniform ' +\n        'addVehicle addVest addWaypoint addWeapon addWeaponCargo ' +\n        'addWeaponCargoGlobal addWeaponGlobal addWeaponPool addWeaponTurret ' +\n        'agent agents AGLToASL aimedAtTarget aimPos airDensityRTD ' +\n        'airportSide AISFinishHeal alive allControls allCurators allDead ' +\n        'allDeadMen allDisplays allGroups allMapMarkers allMines ' +\n        'allMissionObjects allow3DMode allowCrewInImmobile ' +\n        'allowCuratorLogicIgnoreAreas allowDamage allowDammage ' +\n        'allowFileOperations allowFleeing allowGetIn allPlayers allSites ' +\n        'allTurrets allUnits allUnitsUAV allVariables ammo and animate ' +\n        'animateDoor animationPhase animationState append armoryPoints ' +\n        'arrayIntersect asin ASLToAGL ASLToATL assert assignAsCargo ' +\n        'assignAsCargoIndex assignAsCommander assignAsDriver assignAsGunner ' +\n        'assignAsTurret assignCurator assignedCargo assignedCommander ' +\n        'assignedDriver assignedGunner assignedItems assignedTarget ' +\n        'assignedTeam assignedVehicle assignedVehicleRole assignItem ' +\n        'assignTeam assignToAirport atan atan2 atg ATLToASL attachedObject ' +\n        'attachedObjects attachedTo attachObject attachTo attackEnabled ' +\n        'backpack backpackCargo backpackContainer backpackItems ' +\n        'backpackMagazines backpackSpaceFor behaviour benchmark binocular ' +\n        'blufor boundingBox boundingBoxReal boundingCenter breakOut breakTo ' +\n        'briefingName buildingExit buildingPos buttonAction buttonSetAction ' +\n        'cadetMode call callExtension camCommand camCommit ' +\n        'camCommitPrepared camCommitted camConstuctionSetParams camCreate ' +\n        'camDestroy cameraEffect cameraEffectEnableHUD cameraInterest ' +\n        'cameraOn cameraView campaignConfigFile camPreload camPreloaded ' +\n        'camPrepareBank camPrepareDir camPrepareDive camPrepareFocus ' +\n        'camPrepareFov camPrepareFovRange camPreparePos camPrepareRelPos ' +\n        'camPrepareTarget camSetBank camSetDir camSetDive camSetFocus ' +\n        'camSetFov camSetFovRange camSetPos camSetRelPos camSetTarget ' +\n        'camTarget camUseNVG canAdd canAddItemToBackpack ' +\n        'canAddItemToUniform canAddItemToVest cancelSimpleTaskDestination ' +\n        'canFire canMove canSlingLoad canStand canUnloadInCombat captive ' +\n        'captiveNum cbChecked cbSetChecked ceil cheatsEnabled ' +\n        'checkAIFeature civilian className clearAllItemsFromBackpack ' +\n        'clearBackpackCargo clearBackpackCargoGlobal clearGroupIcons ' +\n        'clearItemCargo clearItemCargoGlobal clearItemPool ' +\n        'clearMagazineCargo clearMagazineCargoGlobal clearMagazinePool ' +\n        'clearOverlay clearRadio clearWeaponCargo clearWeaponCargoGlobal ' +\n        'clearWeaponPool closeDialog closeDisplay closeOverlay ' +\n        'collapseObjectTree combatMode commandArtilleryFire commandChat ' +\n        'commander commandFire commandFollow commandFSM commandGetOut ' +\n        'commandingMenu commandMove commandRadio commandStop commandTarget ' +\n        'commandWatch comment commitOverlay compile compileFinal ' +\n        'completedFSM composeText configClasses configFile configHierarchy ' +\n        'configName configProperties configSourceMod configSourceModList ' +\n        'connectTerminalToUAV controlNull controlsGroupCtrl ' +\n        'copyFromClipboard copyToClipboard copyWaypoints cos count ' +\n        'countEnemy countFriendly countSide countType countUnknown ' +\n        'createAgent createCenter createDialog createDiaryLink ' +\n        'createDiaryRecord createDiarySubject createDisplay ' +\n        'createGearDialog createGroup createGuardedPoint createLocation ' +\n        'createMarker createMarkerLocal createMenu createMine ' +\n        'createMissionDisplay createSimpleTask createSite createSoundSource ' +\n        'createTask createTeam createTrigger createUnit createUnit array ' +\n        'createVehicle createVehicle array createVehicleCrew ' +\n        'createVehicleLocal crew ctrlActivate ctrlAddEventHandler ' +\n        'ctrlAutoScrollDelay ctrlAutoScrollRewind ctrlAutoScrollSpeed ' +\n        'ctrlChecked ctrlClassName ctrlCommit ctrlCommitted ctrlCreate ' +\n        'ctrlDelete ctrlEnable ctrlEnabled ctrlFade ctrlHTMLLoaded ctrlIDC ' +\n        'ctrlIDD ctrlMapAnimAdd ctrlMapAnimClear ctrlMapAnimCommit ' +\n        'ctrlMapAnimDone ctrlMapCursor ctrlMapMouseOver ctrlMapScale ' +\n        'ctrlMapScreenToWorld ctrlMapWorldToScreen ctrlModel ' +\n        'ctrlModelDirAndUp ctrlModelScale ctrlParent ctrlPosition ' +\n        'ctrlRemoveAllEventHandlers ctrlRemoveEventHandler ctrlScale ' +\n        'ctrlSetActiveColor ctrlSetAutoScrollDelay ctrlSetAutoScrollRewind ' +\n        'ctrlSetAutoScrollSpeed ctrlSetBackgroundColor ctrlSetChecked ' +\n        'ctrlSetEventHandler ctrlSetFade ctrlSetFocus ctrlSetFont ' +\n        'ctrlSetFontH1 ctrlSetFontH1B ctrlSetFontH2 ctrlSetFontH2B ' +\n        'ctrlSetFontH3 ctrlSetFontH3B ctrlSetFontH4 ctrlSetFontH4B ' +\n        'ctrlSetFontH5 ctrlSetFontH5B ctrlSetFontH6 ctrlSetFontH6B ' +\n        'ctrlSetFontHeight ctrlSetFontHeightH1 ctrlSetFontHeightH2 ' +\n        'ctrlSetFontHeightH3 ctrlSetFontHeightH4 ctrlSetFontHeightH5 ' +\n        'ctrlSetFontHeightH6 ctrlSetFontP ctrlSetFontPB ' +\n        'ctrlSetForegroundColor ctrlSetModel ctrlSetModelDirAndUp ' +\n        'ctrlSetModelScale ctrlSetPosition ctrlSetScale ' +\n        'ctrlSetStructuredText ctrlSetText ctrlSetTextColor ctrlSetTooltip ' +\n        'ctrlSetTooltipColorBox ctrlSetTooltipColorShade ' +\n        'ctrlSetTooltipColorText ctrlShow ctrlShown ctrlText ctrlTextHeight ' +\n        'ctrlType ctrlVisible curatorAddons curatorCamera curatorCameraArea ' +\n        'curatorCameraAreaCeiling curatorCoef curatorEditableObjects ' +\n        'curatorEditingArea curatorEditingAreaType curatorMouseOver ' +\n        'curatorPoints curatorRegisteredObjects curatorSelected ' +\n        'curatorWaypointCost currentChannel currentCommand currentMagazine ' +\n        'currentMagazineDetail currentMagazineDetailTurret ' +\n        'currentMagazineTurret currentMuzzle currentNamespace currentTask ' +\n        'currentTasks currentThrowable currentVisionMode currentWaypoint ' +\n        'currentWeapon currentWeaponMode currentWeaponTurret currentZeroing ' +\n        'cursorTarget customChat customRadio cutFadeOut cutObj cutRsc ' +\n        'cutText damage date dateToNumber daytime deActivateKey ' +\n        'debriefingText debugFSM debugLog deg deleteAt deleteCenter ' +\n        'deleteCollection deleteEditorObject deleteGroup deleteIdentity ' +\n        'deleteLocation deleteMarker deleteMarkerLocal deleteRange ' +\n        'deleteResources deleteSite deleteStatus deleteTeam deleteVehicle ' +\n        'deleteVehicleCrew deleteWaypoint detach detectedMines ' +\n        'diag activeMissionFSMs diag activeSQFScripts diag activeSQSScripts ' +\n        'diag captureFrame diag captureSlowFrame diag fps diag fpsMin ' +\n        'diag frameNo diag log diag logSlowFrame diag tickTime dialog ' +\n        'diarySubjectExists didJIP didJIPOwner difficulty difficultyEnabled ' +\n        'difficultyEnabledRTD direction directSay disableAI ' +\n        'disableCollisionWith disableConversation disableDebriefingStats ' +\n        'disableSerialization disableTIEquipment disableUAVConnectability ' +\n        'disableUserInput displayAddEventHandler displayCtrl displayNull ' +\n        'displayRemoveAllEventHandlers displayRemoveEventHandler ' +\n        'displaySetEventHandler dissolveTeam distance distance2D ' +\n        'distanceSqr distributionRegion doArtilleryFire doFire doFollow ' +\n        'doFSM doGetOut doMove doorPhase doStop doTarget doWatch drawArrow ' +\n        'drawEllipse drawIcon drawIcon3D drawLine drawLine3D drawLink ' +\n        'drawLocation drawRectangle driver drop east echo editObject ' +\n        'editorSetEventHandler effectiveCommander emptyPositions enableAI ' +\n        'enableAIFeature enableAttack enableCamShake enableCaustics ' +\n        'enableCollisionWith enableCopilot enableDebriefingStats ' +\n        'enableDiagLegend enableEndDialog enableEngineArtillery ' +\n        'enableEnvironment enableFatigue enableGunLights enableIRLasers ' +\n        'enableMimics enablePersonTurret enableRadio enableReload ' +\n        'enableRopeAttach enableSatNormalOnDetail enableSaving ' +\n        'enableSentences enableSimulation enableSimulationGlobal ' +\n        'enableTeamSwitch enableUAVConnectability enableUAVWaypoints ' +\n        'endLoadingScreen endMission engineOn enginesIsOnRTD enginesRpmRTD ' +\n        'enginesTorqueRTD entities estimatedEndServerTime estimatedTimeLeft ' +\n        'evalObjectArgument everyBackpack everyContainer exec ' +\n        'execEditorScript execFSM execVM exp expectedDestination ' +\n        'eyeDirection eyePos face faction fadeMusic fadeRadio fadeSound ' +\n        'fadeSpeech failMission fillWeaponsFromPool find findCover ' +\n        'findDisplay findEditorObject findEmptyPosition ' +\n        'findEmptyPositionReady findNearestEnemy finishMissionInit finite ' +\n        'fire fireAtTarget firstBackpack flag flagOwner fleeing floor ' +\n        'flyInHeight fog fogForecast fogParams forceAddUniform forceEnd ' +\n        'forceMap forceRespawn forceSpeed forceWalk forceWeaponFire ' +\n        'forceWeatherChange forEachMember forEachMemberAgent ' +\n        'forEachMemberTeam format formation formationDirection ' +\n        'formationLeader formationMembers formationPosition formationTask ' +\n        'formatText formLeader freeLook fromEditor fuel fullCrew ' +\n        'gearSlotAmmoCount gearSlotData getAllHitPointsDamage getAmmoCargo ' +\n        'getArray getArtilleryAmmo getArtilleryComputerSettings ' +\n        'getArtilleryETA getAssignedCuratorLogic getAssignedCuratorUnit ' +\n        'getBackpackCargo getBleedingRemaining getBurningValue ' +\n        'getCargoIndex getCenterOfMass getClientState getConnectedUAV ' +\n        'getDammage getDescription getDir getDirVisual getDLCs ' +\n        'getEditorCamera getEditorMode getEditorObjectScope ' +\n        'getElevationOffset getFatigue getFriend getFSMVariable ' +\n        'getFuelCargo getGroupIcon getGroupIconParams getGroupIcons ' +\n        'getHideFrom getHit getHitIndex getHitPointDamage getItemCargo ' +\n        'getMagazineCargo getMarkerColor getMarkerPos getMarkerSize ' +\n        'getMarkerType getMass getModelInfo getNumber getObjectArgument ' +\n        'getObjectChildren getObjectDLC getObjectMaterials getObjectProxy ' +\n        'getObjectTextures getObjectType getObjectViewDistance ' +\n        'getOxygenRemaining getPersonUsedDLCs getPlayerChannel getPlayerUID ' +\n        'getPos getPosASL getPosASLVisual getPosASLW getPosATL ' +\n        'getPosATLVisual getPosVisual getPosWorld getRepairCargo ' +\n        'getResolution getShadowDistance getSlingLoad getSpeed ' +\n        'getSuppression getTerrainHeightASL getText getVariable ' +\n        'getWeaponCargo getWPPos glanceAt globalChat globalRadio goggles ' +\n        'goto group groupChat groupFromNetId groupIconSelectable ' +\n        'groupIconsVisible groupId groupOwner groupRadio groupSelectedUnits ' +\n        'groupSelectUnit grpNull gunner gusts halt handgunItems ' +\n        'handgunMagazine handgunWeapon handsHit hasInterface hasWeapon ' +\n        'hcAllGroups hcGroupParams hcLeader hcRemoveAllGroups hcRemoveGroup ' +\n        'hcSelected hcSelectGroup hcSetGroup hcShowBar hcShownBar headgear ' +\n        'hideBody hideObject hideObjectGlobal hint hintC hintCadet ' +\n        'hintSilent hmd hostMission htmlLoad HUDMovementLevels humidity ' +\n        'image importAllGroups importance in incapacitatedState independent ' +\n        'inflame inflamed inGameUISetEventHandler inheritsFrom ' +\n        'initAmbientLife inputAction inRangeOfArtillery insertEditorObject ' +\n        'intersect isAbleToBreathe isAgent isArray isAutoHoverOn ' +\n        'isAutonomous isAutotest isBleeding isBurning isClass ' +\n        'isCollisionLightOn isCopilotEnabled isDedicated isDLCAvailable ' +\n        'isEngineOn isEqualTo isFlashlightOn isFlatEmpty isForcedWalk ' +\n        'isFormationLeader isHidden isInRemainsCollector ' +\n        'isInstructorFigureEnabled isIRLaserOn isKeyActive isKindOf ' +\n        'isLightOn isLocalized isManualFire isMarkedForCollection ' +\n        'isMultiplayer isNil isNull isNumber isObjectHidden isObjectRTD ' +\n        'isOnRoad isPipEnabled isPlayer isRealTime isServer ' +\n        'isShowing3DIcons isSteamMission isStreamFriendlyUIEnabled isText ' +\n        'isTouchingGround isTurnedOut isTutHintsEnabled isUAVConnectable ' +\n        'isUAVConnected isUniformAllowed isWalking isWeaponDeployed ' +\n        'isWeaponRested itemCargo items itemsWithMagazines join joinAs ' +\n        'joinAsSilent joinSilent joinString kbAddDatabase ' +\n        'kbAddDatabaseTargets kbAddTopic kbHasTopic kbReact kbRemoveTopic ' +\n        'kbTell kbWasSaid keyImage keyName knowsAbout land landAt ' +\n        'landResult language laserTarget lbAdd lbClear lbColor lbCurSel ' +\n        'lbData lbDelete lbIsSelected lbPicture lbSelection lbSetColor ' +\n        'lbSetCurSel lbSetData lbSetPicture lbSetPictureColor ' +\n        'lbSetPictureColorDisabled lbSetPictureColorSelected ' +\n        'lbSetSelectColor lbSetSelectColorRight lbSetSelected lbSetTooltip ' +\n        'lbSetValue lbSize lbSort lbSortByValue lbText lbValue leader ' +\n        'leaderboardDeInit leaderboardGetRows leaderboardInit leaveVehicle ' +\n        'libraryCredits libraryDisclaimers lifeState lightAttachObject ' +\n        'lightDetachObject lightIsOn lightnings limitSpeed linearConversion ' +\n        'lineBreak lineIntersects lineIntersectsObjs lineIntersectsSurfaces ' +\n        'lineIntersectsWith linkItem list listObjects ln lnbAddArray ' +\n        'lnbAddColumn lnbAddRow lnbClear lnbColor lnbCurSelRow lnbData ' +\n        'lnbDeleteColumn lnbDeleteRow lnbGetColumnsPosition lnbPicture ' +\n        'lnbSetColor lnbSetColumnsPos lnbSetCurSelRow lnbSetData ' +\n        'lnbSetPicture lnbSetText lnbSetValue lnbSize lnbText lnbValue load ' +\n        'loadAbs loadBackpack loadFile loadGame loadIdentity loadMagazine ' +\n        'loadOverlay loadStatus loadUniform loadVest local localize ' +\n        'locationNull locationPosition lock lockCameraTo lockCargo ' +\n        'lockDriver locked lockedCargo lockedDriver lockedTurret lockTurret ' +\n        'lockWP log logEntities lookAt lookAtPos magazineCargo magazines ' +\n        'magazinesAllTurrets magazinesAmmo magazinesAmmoCargo ' +\n        'magazinesAmmoFull magazinesDetail magazinesDetailBackpack ' +\n        'magazinesDetailUniform magazinesDetailVest magazinesTurret ' +\n        'magazineTurretAmmo mapAnimAdd mapAnimClear mapAnimCommit ' +\n        'mapAnimDone mapCenterOnCamera mapGridPosition ' +\n        'markAsFinishedOnSteam markerAlpha markerBrush markerColor ' +\n        'markerDir markerPos markerShape markerSize markerText markerType ' +\n        'max members min mineActive mineDetectedBy missionConfigFile ' +\n        'missionName missionNamespace missionStart mod modelToWorld ' +\n        'modelToWorldVisual moonIntensity morale move moveInAny moveInCargo ' +\n        'moveInCommander moveInDriver moveInGunner moveInTurret ' +\n        'moveObjectToEnd moveOut moveTime moveTo moveToCompleted ' +\n        'moveToFailed musicVolume name name location nameSound nearEntities ' +\n        'nearestBuilding nearestLocation nearestLocations ' +\n        'nearestLocationWithDubbing nearestObject nearestObjects ' +\n        'nearObjects nearObjectsReady nearRoads nearSupplies nearTargets ' +\n        'needReload netId netObjNull newOverlay nextMenuItemIndex ' +\n        'nextWeatherChange nMenuItems not numberToDate objectCurators ' +\n        'objectFromNetId objectParent objNull objStatus onBriefingGroup ' +\n        'onBriefingNotes onBriefingPlan onBriefingTeamSwitch ' +\n        'onCommandModeChanged onDoubleClick onEachFrame onGroupIconClick ' +\n        'onGroupIconOverEnter onGroupIconOverLeave ' +\n        'onHCGroupSelectionChanged onMapSingleClick onPlayerConnected ' +\n        'onPlayerDisconnected onPreloadFinished onPreloadStarted ' +\n        'onShowNewObject onTeamSwitch openCuratorInterface openMap ' +\n        'openYoutubeVideo opfor or orderGetIn overcast overcastForecast ' +\n        'owner param params parseNumber parseText parsingNamespace ' +\n        'particlesQuality pi pickWeaponPool pitch playableSlotsNumber ' +\n        'playableUnits playAction playActionNow player playerRespawnTime ' +\n        'playerSide playersNumber playGesture playMission playMove ' +\n        'playMoveNow playMusic playScriptedMission playSound playSound3D ' +\n        'position positionCameraToWorld posScreenToWorld posWorldToScreen ' +\n        'ppEffectAdjust ppEffectCommit ppEffectCommitted ppEffectCreate ' +\n        'ppEffectDestroy ppEffectEnable ppEffectForceInNVG precision ' +\n        'preloadCamera preloadObject preloadSound preloadTitleObj ' +\n        'preloadTitleRsc preprocessFile preprocessFileLineNumbers ' +\n        'primaryWeapon primaryWeaponItems primaryWeaponMagazine priority ' +\n        'private processDiaryLink productVersion profileName ' +\n        'profileNamespace profileNameSteam progressLoadingScreen ' +\n        'progressPosition progressSetPosition publicVariable ' +\n        'publicVariableClient publicVariableServer pushBack putWeaponPool ' +\n        'queryItemsPool queryMagazinePool queryWeaponPool rad ' +\n        'radioChannelAdd radioChannelCreate radioChannelRemove ' +\n        'radioChannelSetCallSign radioChannelSetLabel radioVolume rain ' +\n        'rainbow random rank rankId rating rectangular registeredTasks ' +\n        'registerTask reload reloadEnabled remoteControl remoteExec ' +\n        'remoteExecCall removeAction removeAllActions ' +\n        'removeAllAssignedItems removeAllContainers removeAllCuratorAddons ' +\n        'removeAllCuratorCameraAreas removeAllCuratorEditingAreas ' +\n        'removeAllEventHandlers removeAllHandgunItems removeAllItems ' +\n        'removeAllItemsWithMagazines removeAllMissionEventHandlers ' +\n        'removeAllMPEventHandlers removeAllMusicEventHandlers ' +\n        'removeAllPrimaryWeaponItems removeAllWeapons removeBackpack ' +\n        'removeBackpackGlobal removeCuratorAddons removeCuratorCameraArea ' +\n        'removeCuratorEditableObjects removeCuratorEditingArea ' +\n        'removeDrawIcon removeDrawLinks removeEventHandler ' +\n        'removeFromRemainsCollector removeGoggles removeGroupIcon ' +\n        'removeHandgunItem removeHeadgear removeItem removeItemFromBackpack ' +\n        'removeItemFromUniform removeItemFromVest removeItems ' +\n        'removeMagazine removeMagazineGlobal removeMagazines ' +\n        'removeMagazinesTurret removeMagazineTurret removeMenuItem ' +\n        'removeMissionEventHandler removeMPEventHandler ' +\n        'removeMusicEventHandler removePrimaryWeaponItem ' +\n        'removeSecondaryWeaponItem removeSimpleTask removeSwitchableUnit ' +\n        'removeTeamMember removeUniform removeVest removeWeapon ' +\n        'removeWeaponGlobal removeWeaponTurret requiredVersion ' +\n        'resetCamShake resetSubgroupDirection resistance resize resources ' +\n        'respawnVehicle restartEditorCamera reveal revealMine reverse ' +\n        'reversedMouseY roadsConnectedTo roleDescription ' +\n        'ropeAttachedObjects ropeAttachedTo ropeAttachEnabled ropeAttachTo ' +\n        'ropeCreate ropeCut ropeEndPosition ropeLength ropes ropeUnwind ' +\n        'ropeUnwound rotorsForcesRTD rotorsRpmRTD round runInitScript ' +\n        'safeZoneH safeZoneW safeZoneWAbs safeZoneX safeZoneXAbs safeZoneY ' +\n        'saveGame saveIdentity saveJoysticks saveOverlay ' +\n        'saveProfileNamespace saveStatus saveVar savingEnabled say say2D ' +\n        'say3D scopeName score scoreSide screenToWorld scriptDone ' +\n        'scriptName scriptNull scudState secondaryWeapon ' +\n        'secondaryWeaponItems secondaryWeaponMagazine select ' +\n        'selectBestPlaces selectDiarySubject selectedEditorObjects ' +\n        'selectEditorObject selectionPosition selectLeader selectNoPlayer ' +\n        'selectPlayer selectWeapon selectWeaponTurret sendAUMessage ' +\n        'sendSimpleCommand sendTask sendTaskResult sendUDPMessage ' +\n        'serverCommand serverCommandAvailable serverCommandExecutable ' +\n        'serverName serverTime set setAccTime setAirportSide setAmmo ' +\n        'setAmmoCargo setAperture setApertureNew setArmoryPoints ' +\n        'setAttributes setAutonomous setBehaviour setBleedingRemaining ' +\n        'setCameraInterest setCamShakeDefParams setCamShakeParams ' +\n        'setCamUseTi setCaptive setCenterOfMass setCollisionLight ' +\n        'setCombatMode setCompassOscillation setCuratorCameraAreaCeiling ' +\n        'setCuratorCoef setCuratorEditingAreaType setCuratorWaypointCost ' +\n        'setCurrentChannel setCurrentTask setCurrentWaypoint setDamage ' +\n        'setDammage setDate setDebriefingText setDefaultCamera ' +\n        'setDestination setDetailMapBlendPars setDir setDirection ' +\n        'setDrawIcon setDropInterval setEditorMode setEditorObjectScope ' +\n        'setEffectCondition setFace setFaceAnimation setFatigue ' +\n        'setFlagOwner setFlagSide setFlagTexture setFog setFog array ' +\n        'setFormation setFormationTask setFormDir setFriend setFromEditor ' +\n        'setFSMVariable setFuel setFuelCargo setGroupIcon ' +\n        'setGroupIconParams setGroupIconsSelectable setGroupIconsVisible ' +\n        'setGroupId setGroupIdGlobal setGroupOwner setGusts setHideBehind ' +\n        'setHit setHitIndex setHitPointDamage setHorizonParallaxCoef ' +\n        'setHUDMovementLevels setIdentity setImportance setLeader ' +\n        'setLightAmbient setLightAttenuation setLightBrightness ' +\n        'setLightColor setLightDayLight setLightFlareMaxDistance ' +\n        'setLightFlareSize setLightIntensity setLightnings setLightUseFlare ' +\n        'setLocalWindParams setMagazineTurretAmmo setMarkerAlpha ' +\n        'setMarkerAlphaLocal setMarkerBrush setMarkerBrushLocal ' +\n        'setMarkerColor setMarkerColorLocal setMarkerDir setMarkerDirLocal ' +\n        'setMarkerPos setMarkerPosLocal setMarkerShape setMarkerShapeLocal ' +\n        'setMarkerSize setMarkerSizeLocal setMarkerText setMarkerTextLocal ' +\n        'setMarkerType setMarkerTypeLocal setMass setMimic setMousePosition ' +\n        'setMusicEffect setMusicEventHandler setName setNameSound ' +\n        'setObjectArguments setObjectMaterial setObjectProxy ' +\n        'setObjectTexture setObjectTextureGlobal setObjectViewDistance ' +\n        'setOvercast setOwner setOxygenRemaining setParticleCircle ' +\n        'setParticleClass setParticleFire setParticleParams ' +\n        'setParticleRandom setPilotLight setPiPEffect setPitch setPlayable ' +\n        'setPlayerRespawnTime setPos setPosASL setPosASL2 setPosASLW ' +\n        'setPosATL setPosition setPosWorld setRadioMsg setRain setRainbow ' +\n        'setRandomLip setRank setRectangular setRepairCargo ' +\n        'setShadowDistance setSide setSimpleTaskDescription ' +\n        'setSimpleTaskDestination setSimpleTaskTarget setSimulWeatherLayers ' +\n        'setSize setSkill setSkill array setSlingLoad setSoundEffect ' +\n        'setSpeaker setSpeech setSpeedMode setStatValue setSuppression ' +\n        'setSystemOfUnits setTargetAge setTaskResult setTaskState ' +\n        'setTerrainGrid setText setTimeMultiplier setTitleEffect ' +\n        'setTriggerActivation setTriggerArea setTriggerStatements ' +\n        'setTriggerText setTriggerTimeout setTriggerType setType ' +\n        'setUnconscious setUnitAbility setUnitPos setUnitPosWeak ' +\n        'setUnitRank setUnitRecoilCoefficient setUnloadInCombat ' +\n        'setUserActionText setVariable setVectorDir setVectorDirAndUp ' +\n        'setVectorUp setVehicleAmmo setVehicleAmmoDef setVehicleArmor ' +\n        'setVehicleId setVehicleLock setVehiclePosition setVehicleTiPars ' +\n        'setVehicleVarName setVelocity setVelocityTransformation ' +\n        'setViewDistance setVisibleIfTreeCollapsed setWaves ' +\n        'setWaypointBehaviour setWaypointCombatMode ' +\n        'setWaypointCompletionRadius setWaypointDescription ' +\n        'setWaypointFormation setWaypointHousePosition ' +\n        'setWaypointLoiterRadius setWaypointLoiterType setWaypointName ' +\n        'setWaypointPosition setWaypointScript setWaypointSpeed ' +\n        'setWaypointStatements setWaypointTimeout setWaypointType ' +\n        'setWaypointVisible setWeaponReloadingTime setWind setWindDir ' +\n        'setWindForce setWindStr setWPPos show3DIcons showChat ' +\n        'showCinemaBorder showCommandingMenu showCompass showCuratorCompass ' +\n        'showGPS showHUD showLegend showMap shownArtilleryComputer ' +\n        'shownChat shownCompass shownCuratorCompass showNewEditorObject ' +\n        'shownGPS shownHUD shownMap shownPad shownRadio shownUAVFeed ' +\n        'shownWarrant shownWatch showPad showRadio showSubtitles ' +\n        'showUAVFeed showWarrant showWatch showWaypoint side sideChat ' +\n        'sideEnemy sideFriendly sideLogic sideRadio sideUnknown simpleTasks ' +\n        'simulationEnabled simulCloudDensity simulCloudOcclusion ' +\n        'simulInClouds simulWeatherSync sin size sizeOf skill skillFinal ' +\n        'skipTime sleep sliderPosition sliderRange sliderSetPosition ' +\n        'sliderSetRange sliderSetSpeed sliderSpeed slingLoadAssistantShown ' +\n        'soldierMagazines someAmmo sort soundVolume spawn speaker speed ' +\n        'speedMode splitString sqrt squadParams stance startLoadingScreen ' +\n        'step stop stopped str sunOrMoon supportInfo suppressFor ' +\n        'surfaceIsWater surfaceNormal surfaceType swimInDepth ' +\n        'switchableUnits switchAction switchCamera switchGesture ' +\n        'switchLight switchMove synchronizedObjects synchronizedTriggers ' +\n        'synchronizedWaypoints synchronizeObjectsAdd ' +\n        'synchronizeObjectsRemove synchronizeTrigger synchronizeWaypoint ' +\n        'synchronizeWaypoint trigger systemChat systemOfUnits tan ' +\n        'targetKnowledge targetsAggregate targetsQuery taskChildren ' +\n        'taskCompleted taskDescription taskDestination taskHint taskNull ' +\n        'taskParent taskResult taskState teamMember teamMemberNull teamName ' +\n        'teams teamSwitch teamSwitchEnabled teamType terminate ' +\n        'terrainIntersect terrainIntersectASL text text location textLog ' +\n        'textLogFormat tg time timeMultiplier titleCut titleFadeOut ' +\n        'titleObj titleRsc titleText toArray toLower toString toUpper ' +\n        'triggerActivated triggerActivation triggerArea ' +\n        'triggerAttachedVehicle triggerAttachObject triggerAttachVehicle ' +\n        'triggerStatements triggerText triggerTimeout triggerTimeoutCurrent ' +\n        'triggerType turretLocal turretOwner turretUnit tvAdd tvClear ' +\n        'tvCollapse tvCount tvCurSel tvData tvDelete tvExpand tvPicture ' +\n        'tvSetCurSel tvSetData tvSetPicture tvSetPictureColor tvSetTooltip ' +\n        'tvSetValue tvSort tvSortByValue tvText tvValue type typeName ' +\n        'typeOf UAVControl uiNamespace uiSleep unassignCurator unassignItem ' +\n        'unassignTeam unassignVehicle underwater uniform uniformContainer ' +\n        'uniformItems uniformMagazines unitAddons unitBackpack unitPos ' +\n        'unitReady unitRecoilCoefficient units unitsBelowHeight unlinkItem ' +\n        'unlockAchievement unregisterTask updateDrawIcon updateMenuItem ' +\n        'updateObjectTree useAudioTimeForMoves vectorAdd vectorCos ' +\n        'vectorCrossProduct vectorDiff vectorDir vectorDirVisual ' +\n        'vectorDistance vectorDistanceSqr vectorDotProduct vectorFromTo ' +\n        'vectorMagnitude vectorMagnitudeSqr vectorMultiply vectorNormalized ' +\n        'vectorUp vectorUpVisual vehicle vehicleChat vehicleRadio vehicles ' +\n        'vehicleVarName velocity velocityModelSpace verifySignature vest ' +\n        'vestContainer vestItems vestMagazines viewDistance visibleCompass ' +\n        'visibleGPS visibleMap visiblePosition visiblePositionASL ' +\n        'visibleWatch waitUntil waves waypointAttachedObject ' +\n        'waypointAttachedVehicle waypointAttachObject waypointAttachVehicle ' +\n        'waypointBehaviour waypointCombatMode waypointCompletionRadius ' +\n        'waypointDescription waypointFormation waypointHousePosition ' +\n        'waypointLoiterRadius waypointLoiterType waypointName ' +\n        'waypointPosition waypoints waypointScript waypointsEnabledUAV ' +\n        'waypointShow waypointSpeed waypointStatements waypointTimeout ' +\n        'waypointTimeoutCurrent waypointType waypointVisible ' +\n        'weaponAccessories weaponCargo weaponDirection weaponLowered ' +\n        'weapons weaponsItems weaponsItemsCargo weaponState weaponsTurret ' +\n        'weightRTD west WFSideText wind windDir windStr wingsForcesRTD ' +\n        'worldName worldSize worldToModel worldToModelVisual worldToScreen ' +\n        '_forEachIndex _this _x',\n      literal:\n        'true false nil'\n    },\n    contains: [\n      hljs.C_LINE_COMMENT_MODE,\n      hljs.C_BLOCK_COMMENT_MODE,\n      hljs.NUMBER_MODE,\n      STRINGS,\n      CPP.preprocessor\n    ],\n    illegal: /#/\n  };\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/languages/sql.js",
    "content": "/*\n Language: SQL\n Contributors: Nikolay Lisienko <info@neor.ru>, Heiko August <post@auge8472.de>, Travis Odom <travis.a.odom@gmail.com>, Vadimtro <vadimtro@yahoo.com>, Benjamin Auder <benjamin.auder@gmail.com>\n Category: common\n */\n\nfunction(hljs) {\n  var COMMENT_MODE = hljs.COMMENT('--', '$');\n  return {\n    case_insensitive: true,\n    illegal: /[<>{}*#]/,\n    contains: [\n      {\n        beginKeywords:\n          'begin end start commit rollback savepoint lock alter create drop rename call ' +\n          'delete do handler insert load replace select truncate update set show pragma grant ' +\n          'merge describe use explain help declare prepare execute deallocate release ' +\n          'unlock purge reset change stop analyze cache flush optimize repair kill ' +\n          'install uninstall checksum restore check backup revoke comment',\n        end: /;/, endsWithParent: true,\n        lexemes: /[\\w\\.]+/,\n        keywords: {\n          keyword:\n            'abort abs absolute acc acce accep accept access accessed accessible account acos action activate add ' +\n            'addtime admin administer advanced advise aes_decrypt aes_encrypt after agent aggregate ali alia alias ' +\n            'allocate allow alter always analyze ancillary and any anydata anydataset anyschema anytype apply ' +\n            'archive archived archivelog are as asc ascii asin assembly assertion associate asynchronous at atan ' +\n            'atn2 attr attri attrib attribu attribut attribute attributes audit authenticated authentication authid ' +\n            'authors auto autoallocate autodblink autoextend automatic availability avg backup badfile basicfile ' +\n            'before begin beginning benchmark between bfile bfile_base big bigfile bin binary_double binary_float ' +\n            'binlog bit_and bit_count bit_length bit_or bit_xor bitmap blob_base block blocksize body both bound ' +\n            'buffer_cache buffer_pool build bulk by byte byteordermark bytes cache caching call calling cancel ' +\n            'capacity cascade cascaded case cast catalog category ceil ceiling chain change changed char_base ' +\n            'char_length character_length characters characterset charindex charset charsetform charsetid check ' +\n            'checksum checksum_agg child choose chr chunk class cleanup clear client clob clob_base clone close ' +\n            'cluster_id cluster_probability cluster_set clustering coalesce coercibility col collate collation ' +\n            'collect colu colum column column_value columns columns_updated comment commit compact compatibility ' +\n            'compiled complete composite_limit compound compress compute concat concat_ws concurrent confirm conn ' +\n            'connec connect connect_by_iscycle connect_by_isleaf connect_by_root connect_time connection ' +\n            'consider consistent constant constraint constraints constructor container content contents context ' +\n            'contributors controlfile conv convert convert_tz corr corr_k corr_s corresponding corruption cos cost ' +\n            'count count_big counted covar_pop covar_samp cpu_per_call cpu_per_session crc32 create creation ' +\n            'critical cross cube cume_dist curdate current current_date current_time current_timestamp current_user ' +\n            'cursor curtime customdatum cycle data database databases datafile datafiles datalength date_add ' +\n            'date_cache date_format date_sub dateadd datediff datefromparts datename datepart datetime2fromparts ' +\n            'day day_to_second dayname dayofmonth dayofweek dayofyear days db_role_change dbtimezone ddl deallocate ' +\n            'declare decode decompose decrement decrypt deduplicate def defa defau defaul default defaults ' +\n            'deferred defi defin define degrees delayed delegate delete delete_all delimited demand dense_rank ' +\n            'depth dequeue des_decrypt des_encrypt des_key_file desc descr descri describ describe descriptor ' +\n            'deterministic diagnostics difference dimension direct_load directory disable disable_all ' +\n            'disallow disassociate discardfile disconnect diskgroup distinct distinctrow distribute distributed div ' +\n            'do document domain dotnet double downgrade drop dumpfile duplicate duration each edition editionable ' +\n            'editions element ellipsis else elsif elt empty enable enable_all enclosed encode encoding encrypt ' +\n            'end end-exec endian enforced engine engines enqueue enterprise entityescaping eomonth error errors ' +\n            'escaped evalname evaluate event eventdata events except exception exceptions exchange exclude excluding ' +\n            'execu execut execute exempt exists exit exp expire explain export export_set extended extent external ' +\n            'external_1 external_2 externally extract failed failed_login_attempts failover failure far fast ' +\n            'feature_set feature_value fetch field fields file file_name_convert filesystem_like_logging final ' +\n            'finish first first_value fixed flash_cache flashback floor flush following follows for forall force ' +\n            'form forma format found found_rows freelist freelists freepools fresh from from_base64 from_days ' +\n            'ftp full function general generated get get_format get_lock getdate getutcdate global global_name ' +\n            'globally go goto grant grants greatest group group_concat group_id grouping grouping_id groups ' +\n            'gtid_subtract guarantee guard handler hash hashkeys having hea head headi headin heading heap help hex ' +\n            'hierarchy high high_priority hosts hour http id ident_current ident_incr ident_seed identified ' +\n            'identity idle_time if ifnull ignore iif ilike ilm immediate import in include including increment ' +\n            'index indexes indexing indextype indicator indices inet6_aton inet6_ntoa inet_aton inet_ntoa infile ' +\n            'initial initialized initially initrans inmemory inner innodb input insert install instance instantiable ' +\n            'instr interface interleaved intersect into invalidate invisible is is_free_lock is_ipv4 is_ipv4_compat ' +\n            'is_not is_not_null is_used_lock isdate isnull isolation iterate java join json json_exists ' +\n            'keep keep_duplicates key keys kill language large last last_day last_insert_id last_value lax lcase ' +\n            'lead leading least leaves left len lenght length less level levels library like like2 like4 likec limit ' +\n            'lines link list listagg little ln load load_file lob lobs local localtime localtimestamp locate ' +\n            'locator lock locked log log10 log2 logfile logfiles logging logical logical_reads_per_call ' +\n            'logoff logon logs long loop low low_priority lower lpad lrtrim ltrim main make_set makedate maketime ' +\n            'managed management manual map mapping mask master master_pos_wait match matched materialized max ' +\n            'maxextents maximize maxinstances maxlen maxlogfiles maxloghistory maxlogmembers maxsize maxtrans ' +\n            'md5 measures median medium member memcompress memory merge microsecond mid migration min minextents ' +\n            'minimum mining minus minute minvalue missing mod mode model modification modify module monitoring month ' +\n            'months mount move movement multiset mutex name name_const names nan national native natural nav nchar ' +\n            'nclob nested never new newline next nextval no no_write_to_binlog noarchivelog noaudit nobadfile ' +\n            'nocheck nocompress nocopy nocycle nodelay nodiscardfile noentityescaping noguarantee nokeep nologfile ' +\n            'nomapping nomaxvalue nominimize nominvalue nomonitoring none noneditionable nonschema noorder ' +\n            'nopr nopro noprom nopromp noprompt norely noresetlogs noreverse normal norowdependencies noschemacheck ' +\n            'noswitch not nothing notice notrim novalidate now nowait nth_value nullif nulls num numb numbe ' +\n            'nvarchar nvarchar2 object ocicoll ocidate ocidatetime ociduration ociinterval ociloblocator ocinumber ' +\n            'ociref ocirefcursor ocirowid ocistring ocitype oct octet_length of off offline offset oid oidindex old ' +\n            'on online only opaque open operations operator optimal optimize option optionally or oracle oracle_date ' +\n            'oradata ord ordaudio orddicom orddoc order ordimage ordinality ordvideo organization orlany orlvary ' +\n            'out outer outfile outline output over overflow overriding package pad parallel parallel_enable ' +\n            'parameters parent parse partial partition partitions pascal passing password password_grace_time ' +\n            'password_lock_time password_reuse_max password_reuse_time password_verify_function patch path patindex ' +\n            'pctincrease pctthreshold pctused pctversion percent percent_rank percentile_cont percentile_disc ' +\n            'performance period period_add period_diff permanent physical pi pipe pipelined pivot pluggable plugin ' +\n            'policy position post_transaction pow power pragma prebuilt precedes preceding precision prediction ' +\n            'prediction_cost prediction_details prediction_probability prediction_set prepare present preserve ' +\n            'prior priority private private_sga privileges procedural procedure procedure_analyze processlist ' +\n            'profiles project prompt protection public publishingservername purge quarter query quick quiesce quota ' +\n            'quotename radians raise rand range rank raw read reads readsize rebuild record records ' +\n            'recover recovery recursive recycle redo reduced ref reference referenced references referencing refresh ' +\n            'regexp_like register regr_avgx regr_avgy regr_count regr_intercept regr_r2 regr_slope regr_sxx regr_sxy ' +\n            'reject rekey relational relative relaylog release release_lock relies_on relocate rely rem remainder rename ' +\n            'repair repeat replace replicate replication required reset resetlogs resize resource respect restore ' +\n            'restricted result result_cache resumable resume retention return returning returns reuse reverse revoke ' +\n            'right rlike role roles rollback rolling rollup round row row_count rowdependencies rowid rownum rows ' +\n            'rtrim rules safe salt sample save savepoint sb1 sb2 sb4 scan schema schemacheck scn scope scroll ' +\n            'sdo_georaster sdo_topo_geometry search sec_to_time second section securefile security seed segment select ' +\n            'self sequence sequential serializable server servererror session session_user sessions_per_user set ' +\n            'sets settings sha sha1 sha2 share shared shared_pool short show shrink shutdown si_averagecolor ' +\n            'si_colorhistogram si_featurelist si_positionalcolor si_stillimage si_texture siblings sid sign sin ' +\n            'size size_t sizes skip slave sleep smalldatetimefromparts smallfile snapshot some soname sort soundex ' +\n            'source space sparse spfile split sql sql_big_result sql_buffer_result sql_cache sql_calc_found_rows ' +\n            'sql_small_result sql_variant_property sqlcode sqldata sqlerror sqlname sqlstate sqrt square standalone ' +\n            'standby start starting startup statement static statistics stats_binomial_test stats_crosstab ' +\n            'stats_ks_test stats_mode stats_mw_test stats_one_way_anova stats_t_test_ stats_t_test_indep ' +\n            'stats_t_test_one stats_t_test_paired stats_wsr_test status std stddev stddev_pop stddev_samp stdev ' +\n            'stop storage store stored str str_to_date straight_join strcmp strict string struct stuff style subdate ' +\n            'subpartition subpartitions substitutable substr substring subtime subtring_index subtype success sum ' +\n            'suspend switch switchoffset switchover sync synchronous synonym sys sys_xmlagg sysasm sysaux sysdate ' +\n            'sysdatetimeoffset sysdba sysoper system system_user sysutcdatetime table tables tablespace tan tdo ' +\n            'template temporary terminated tertiary_weights test than then thread through tier ties time time_format ' +\n            'time_zone timediff timefromparts timeout timestamp timestampadd timestampdiff timezone_abbr ' +\n            'timezone_minute timezone_region to to_base64 to_date to_days to_seconds todatetimeoffset trace tracking ' +\n            'transaction transactional translate translation treat trigger trigger_nestlevel triggers trim truncate ' +\n            'try_cast try_convert try_parse type ub1 ub2 ub4 ucase unarchived unbounded uncompress ' +\n            'under undo unhex unicode uniform uninstall union unique unix_timestamp unknown unlimited unlock unpivot ' +\n            'unrecoverable unsafe unsigned until untrusted unusable unused update updated upgrade upped upper upsert ' +\n            'url urowid usable usage use use_stored_outlines user user_data user_resources users using utc_date ' +\n            'utc_timestamp uuid uuid_short validate validate_password_strength validation valist value values var ' +\n            'var_samp varcharc vari varia variab variabl variable variables variance varp varraw varrawc varray ' +\n            'verify version versions view virtual visible void wait wallet warning warnings week weekday weekofyear ' +\n            'wellformed when whene whenev wheneve whenever where while whitespace with within without work wrapped ' +\n            'xdb xml xmlagg xmlattributes xmlcast xmlcolattval xmlelement xmlexists xmlforest xmlindex xmlnamespaces ' +\n            'xmlpi xmlquery xmlroot xmlschema xmlserialize xmltable xmltype xor year year_to_month years yearweek',\n          literal:\n            'true false null',\n          built_in:\n            'array bigint binary bit blob boolean char character date dec decimal float int int8 integer interval number ' +\n            'numeric real record serial serial8 smallint text varchar varying void'\n        },\n        contains: [\n          {\n            className: 'string',\n            begin: '\\'', end: '\\'',\n            contains: [hljs.BACKSLASH_ESCAPE, {begin: '\\'\\''}]\n          },\n          {\n            className: 'string',\n            begin: '\"', end: '\"',\n            contains: [hljs.BACKSLASH_ESCAPE, {begin: '\"\"'}]\n          },\n          {\n            className: 'string',\n            begin: '`', end: '`',\n            contains: [hljs.BACKSLASH_ESCAPE]\n          },\n          hljs.C_NUMBER_MODE,\n          hljs.C_BLOCK_COMMENT_MODE,\n          COMMENT_MODE\n        ]\n      },\n      hljs.C_BLOCK_COMMENT_MODE,\n      COMMENT_MODE\n    ]\n  };\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/languages/stan.js",
    "content": "/*\nLanguage: Stan\nAuthor: Brendan Rocks <rocks.brendan@gmail.com>\n Category: scientific\nDescription: The Stan probabilistic programming language (http://mc-stan.org/).\n*/\n\nfunction(hljs) {\n  return {\n    contains: [\n      hljs.HASH_COMMENT_MODE,\n      hljs.C_LINE_COMMENT_MODE,\n      hljs.C_BLOCK_COMMENT_MODE,\n      {\n        begin: hljs.UNDERSCORE_IDENT_RE,\n        lexemes: hljs.UNDERSCORE_IDENT_RE,\n        keywords: {\n          // Stan's keywords\n          name:\n            'for in while repeat until if then else',\n          // Stan's probablity distributions (less beta and gamma, as commonly\n          // used for parameter names). So far, _log and _rng variants are not\n          // included\n          symbol:\n            'bernoulli bernoulli_logit binomial binomial_logit '               +\n            'beta_binomial hypergeometric categorical categorical_logit '      +\n            'ordered_logistic neg_binomial neg_binomial_2 '                    +\n            'neg_binomial_2_log poisson poisson_log multinomial normal '       +\n            'exp_mod_normal skew_normal student_t cauchy double_exponential '  +\n            'logistic gumbel lognormal chi_square inv_chi_square '             +\n            'scaled_inv_chi_square exponential inv_gamma weibull frechet '     +\n            'rayleigh wiener pareto pareto_type_2 von_mises uniform '          +\n            'multi_normal multi_normal_prec multi_normal_cholesky multi_gp '   +\n            'multi_gp_cholesky multi_student_t gaussian_dlm_obs dirichlet '    +\n            'lkj_corr lkj_corr_cholesky wishart inv_wishart',\n          // Stan's data types\n          'selector-tag':\n            'int real vector simplex unit_vector ordered positive_ordered '    +\n            'row_vector matrix cholesky_factor_corr cholesky_factor_cov '      +\n            'corr_matrix cov_matrix',\n          // Stan's model blocks\n          title:\n            'functions model data parameters quantities transformed '          +\n            'generated',\n          literal:\n            'true false'\n        },\n        relevance: 0\n      },\n      // The below is all taken from the R language definition\n      {\n        // hex value\n        className: 'number',\n        begin: \"0[xX][0-9a-fA-F]+[Li]?\\\\b\",\n        relevance: 0\n      },\n      {\n        // hex value\n        className: 'number',\n        begin: \"0[xX][0-9a-fA-F]+[Li]?\\\\b\",\n        relevance: 0\n      },\n      {\n        // explicit integer\n        className: 'number',\n        begin: \"\\\\d+(?:[eE][+\\\\-]?\\\\d*)?L\\\\b\",\n        relevance: 0\n      },\n      {\n        // number with trailing decimal\n        className: 'number',\n        begin: \"\\\\d+\\\\.(?!\\\\d)(?:i\\\\b)?\",\n        relevance: 0\n      },\n      {\n        // number\n        className: 'number',\n        begin: \"\\\\d+(?:\\\\.\\\\d*)?(?:[eE][+\\\\-]?\\\\d*)?i?\\\\b\",\n        relevance: 0\n      },\n      {\n        // number with leading decimal\n        className: 'number',\n        begin: \"\\\\.\\\\d+(?:[eE][+\\\\-]?\\\\d*)?i?\\\\b\",\n        relevance: 0\n      }\n    ]\n  };\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/languages/stata.js",
    "content": "/*\nLanguage: Stata\nAuthor: Brian Quistorff <bquistorff@gmail.com>\nContributors: Drew McDonald <drewmcdo@gmail.com>\nDescription: Syntax highlighting for Stata code. This is a fork and modification of Drew McDonald's file (https://github.com/drewmcdonald/stata-highlighting). I have also included a list of builtin commands from https://bugs.kde.org/show_bug.cgi?id=135646.\nCategory: scientific\n*/\n\nfunction(hljs) {\n  return {\n    aliases: ['do', 'ado'],\n    case_insensitive: true,\n    keywords: 'if else in foreach for forv forva forval forvalu forvalue forvalues by bys bysort xi quietly qui capture about ac ac_7 acprplot acprplot_7 adjust ado adopath adoupdate alpha ameans an ano anov anova anova_estat anova_terms anovadef aorder ap app appe appen append arch arch_dr arch_estat arch_p archlm areg areg_p args arima arima_dr arima_estat arima_p as asmprobit asmprobit_estat asmprobit_lf asmprobit_mfx__dlg asmprobit_p ass asse asser assert avplot avplot_7 avplots avplots_7 bcskew0 bgodfrey binreg bip0_lf biplot bipp_lf bipr_lf bipr_p biprobit bitest bitesti bitowt blogit bmemsize boot bootsamp bootstrap bootstrap_8 boxco_l boxco_p boxcox boxcox_6 boxcox_p bprobit br break brier bro brow brows browse brr brrstat bs bs_7 bsampl_w bsample bsample_7 bsqreg bstat bstat_7 bstat_8 bstrap bstrap_7 ca ca_estat ca_p cabiplot camat canon canon_8 canon_8_p canon_estat canon_p cap caprojection capt captu captur capture cat cc cchart cchart_7 cci cd censobs_table centile cf char chdir checkdlgfiles checkestimationsample checkhlpfiles checksum chelp ci cii cl class classutil clear cli clis clist clo clog clog_lf clog_p clogi clogi_sw clogit clogit_lf clogit_p clogitp clogl_sw cloglog clonevar clslistarray cluster cluster_measures cluster_stop cluster_tree cluster_tree_8 clustermat cmdlog cnr cnre cnreg cnreg_p cnreg_sw cnsreg codebook collaps4 collapse colormult_nb colormult_nw compare compress conf confi confir confirm conren cons const constr constra constrai constrain constraint continue contract copy copyright copysource cor corc corr corr2data corr_anti corr_kmo corr_smc corre correl correla correlat correlate corrgram cou coun count cox cox_p cox_sw coxbase coxhaz coxvar cprplot cprplot_7 crc cret cretu cretur creturn cross cs cscript cscript_log csi ct ct_is ctset ctst_5 ctst_st cttost cumsp cumsp_7 cumul cusum cusum_7 cutil d|0 datasig datasign datasigna datasignat datasignatu datasignatur datasignature datetof db dbeta de dec deco decod decode deff des desc descr descri describ describe destring dfbeta dfgls dfuller di di_g dir dirstats dis discard disp disp_res disp_s displ displa display distinct do doe doed doedi doedit dotplot dotplot_7 dprobit drawnorm drop ds ds_util dstdize duplicates durbina dwstat dydx e|0 ed edi edit egen eivreg emdef en enc enco encod encode eq erase ereg ereg_lf ereg_p ereg_sw ereghet ereghet_glf ereghet_glf_sh ereghet_gp ereghet_ilf ereghet_ilf_sh ereghet_ip eret eretu eretur ereturn err erro error est est_cfexist est_cfname est_clickable est_expand est_hold est_table est_unhold est_unholdok estat estat_default estat_summ estat_vce_only esti estimates etodow etof etomdy ex exi exit expand expandcl fac fact facto factor factor_estat factor_p factor_pca_rotated factor_rotate factormat fcast fcast_compute fcast_graph fdades fdadesc fdadescr fdadescri fdadescrib fdadescribe fdasav fdasave fdause fh_st file open file read file close file filefilter fillin find_hlp_file findfile findit findit_7 fit fl fli flis flist for5_0 form forma format fpredict frac_154 frac_adj frac_chk frac_cox frac_ddp frac_dis frac_dv frac_in frac_mun frac_pp frac_pq frac_pv frac_wgt frac_xo fracgen fracplot fracplot_7 fracpoly fracpred fron_ex fron_hn fron_p fron_tn fron_tn2 frontier ftodate ftoe ftomdy ftowdate g|0 gamhet_glf gamhet_gp gamhet_ilf gamhet_ip gamma gamma_d2 gamma_p gamma_sw gammahet gdi_hexagon gdi_spokes ge gen gene gener genera generat generate genrank genstd genvmean gettoken gl gladder gladder_7 glim_l01 glim_l02 glim_l03 glim_l04 glim_l05 glim_l06 glim_l07 glim_l08 glim_l09 glim_l10 glim_l11 glim_l12 glim_lf glim_mu glim_nw1 glim_nw2 glim_nw3 glim_p glim_v1 glim_v2 glim_v3 glim_v4 glim_v5 glim_v6 glim_v7 glm glm_6 glm_p glm_sw glmpred glo glob globa global glogit glogit_8 glogit_p gmeans gnbre_lf gnbreg gnbreg_5 gnbreg_p gomp_lf gompe_sw gomper_p gompertz gompertzhet gomphet_glf gomphet_glf_sh gomphet_gp gomphet_ilf gomphet_ilf_sh gomphet_ip gphdot gphpen gphprint gprefs gprobi_p gprobit gprobit_8 gr gr7 gr_copy gr_current gr_db gr_describe gr_dir gr_draw gr_draw_replay gr_drop gr_edit gr_editviewopts gr_example gr_example2 gr_export gr_print gr_qscheme gr_query gr_read gr_rename gr_replay gr_save gr_set gr_setscheme gr_table gr_undo gr_use graph graph7 grebar greigen greigen_7 greigen_8 grmeanby grmeanby_7 gs_fileinfo gs_filetype gs_graphinfo gs_stat gsort gwood h|0 hadimvo hareg hausman haver he heck_d2 heckma_p heckman heckp_lf heckpr_p heckprob hel help hereg hetpr_lf hetpr_p hetprob hettest hexdump hilite hist hist_7 histogram hlogit hlu hmeans hotel hotelling hprobit hreg hsearch icd9 icd9_ff icd9p iis impute imtest inbase include inf infi infil infile infix inp inpu input ins insheet insp inspe inspec inspect integ inten intreg intreg_7 intreg_p intrg2_ll intrg_ll intrg_ll2 ipolate iqreg ir irf irf_create irfm iri is_svy is_svysum isid istdize ivprob_1_lf ivprob_lf ivprobit ivprobit_p ivreg ivreg_footnote ivtob_1_lf ivtob_lf ivtobit ivtobit_p jackknife jacknife jknife jknife_6 jknife_8 jkstat joinby kalarma1 kap kap_3 kapmeier kappa kapwgt kdensity kdensity_7 keep ksm ksmirnov ktau kwallis l|0 la lab labe label labelbook ladder levels levelsof leverage lfit lfit_p li lincom line linktest lis list lloghet_glf lloghet_glf_sh lloghet_gp lloghet_ilf lloghet_ilf_sh lloghet_ip llogi_sw llogis_p llogist llogistic llogistichet lnorm_lf lnorm_sw lnorma_p lnormal lnormalhet lnormhet_glf lnormhet_glf_sh lnormhet_gp lnormhet_ilf lnormhet_ilf_sh lnormhet_ip lnskew0 loadingplot loc loca local log logi logis_lf logistic logistic_p logit logit_estat logit_p loglogs logrank loneway lookfor lookup lowess lowess_7 lpredict lrecomp lroc lroc_7 lrtest ls lsens lsens_7 lsens_x lstat ltable ltable_7 ltriang lv lvr2plot lvr2plot_7 m|0 ma mac macr macro makecns man manova manova_estat manova_p manovatest mantel mark markin markout marksample mat mat_capp mat_order mat_put_rr mat_rapp mata mata_clear mata_describe mata_drop mata_matdescribe mata_matsave mata_matuse mata_memory mata_mlib mata_mosave mata_rename mata_which matalabel matcproc matlist matname matr matri matrix matrix_input__dlg matstrik mcc mcci md0_ md1_ md1debug_ md2_ md2debug_ mds mds_estat mds_p mdsconfig mdslong mdsmat mdsshepard mdytoe mdytof me_derd mean means median memory memsize meqparse mer merg merge mfp mfx mhelp mhodds minbound mixed_ll mixed_ll_reparm mkassert mkdir mkmat mkspline ml ml_5 ml_adjs ml_bhhhs ml_c_d ml_check ml_clear ml_cnt ml_debug ml_defd ml_e0 ml_e0_bfgs ml_e0_cycle ml_e0_dfp ml_e0i ml_e1 ml_e1_bfgs ml_e1_bhhh ml_e1_cycle ml_e1_dfp ml_e2 ml_e2_cycle ml_ebfg0 ml_ebfr0 ml_ebfr1 ml_ebh0q ml_ebhh0 ml_ebhr0 ml_ebr0i ml_ecr0i ml_edfp0 ml_edfr0 ml_edfr1 ml_edr0i ml_eds ml_eer0i ml_egr0i ml_elf ml_elf_bfgs ml_elf_bhhh ml_elf_cycle ml_elf_dfp ml_elfi ml_elfs ml_enr0i ml_enrr0 ml_erdu0 ml_erdu0_bfgs ml_erdu0_bhhh ml_erdu0_bhhhq ml_erdu0_cycle ml_erdu0_dfp ml_erdu0_nrbfgs ml_exde ml_footnote ml_geqnr ml_grad0 ml_graph ml_hbhhh ml_hd0 ml_hold ml_init ml_inv ml_log ml_max ml_mlout ml_mlout_8 ml_model ml_nb0 ml_opt ml_p ml_plot ml_query ml_rdgrd ml_repor ml_s_e ml_score ml_searc ml_technique ml_unhold mleval mlf_ mlmatbysum mlmatsum mlog mlogi mlogit mlogit_footnote mlogit_p mlopts mlsum mlvecsum mnl0_ mor more mov move mprobit mprobit_lf mprobit_p mrdu0_ mrdu1_ mvdecode mvencode mvreg mvreg_estat n|0 nbreg nbreg_al nbreg_lf nbreg_p nbreg_sw nestreg net newey newey_7 newey_p news nl nl_7 nl_9 nl_9_p nl_p nl_p_7 nlcom nlcom_p nlexp2 nlexp2_7 nlexp2a nlexp2a_7 nlexp3 nlexp3_7 nlgom3 nlgom3_7 nlgom4 nlgom4_7 nlinit nllog3 nllog3_7 nllog4 nllog4_7 nlog_rd nlogit nlogit_p nlogitgen nlogittree nlpred no nobreak noi nois noisi noisil noisily note notes notes_dlg nptrend numlabel numlist odbc old_ver olo olog ologi ologi_sw ologit ologit_p ologitp on one onew onewa oneway op_colnm op_comp op_diff op_inv op_str opr opro oprob oprob_sw oprobi oprobi_p oprobit oprobitp opts_exclusive order orthog orthpoly ou out outf outfi outfil outfile outs outsh outshe outshee outsheet ovtest pac pac_7 palette parse parse_dissim pause pca pca_8 pca_display pca_estat pca_p pca_rotate pcamat pchart pchart_7 pchi pchi_7 pcorr pctile pentium pergram pergram_7 permute permute_8 personal peto_st pkcollapse pkcross pkequiv pkexamine pkexamine_7 pkshape pksumm pksumm_7 pl plo plot plugin pnorm pnorm_7 poisgof poiss_lf poiss_sw poisso_p poisson poisson_estat post postclose postfile postutil pperron pr prais prais_e prais_e2 prais_p predict predictnl preserve print pro prob probi probit probit_estat probit_p proc_time procoverlay procrustes procrustes_estat procrustes_p profiler prog progr progra program prop proportion prtest prtesti pwcorr pwd q\\\\s qby qbys qchi qchi_7 qladder qladder_7 qnorm qnorm_7 qqplot qqplot_7 qreg qreg_c qreg_p qreg_sw qu quadchk quantile quantile_7 que quer query range ranksum ratio rchart rchart_7 rcof recast reclink recode reg reg3 reg3_p regdw regr regre regre_p2 regres regres_p regress regress_estat regriv_p remap ren rena renam rename renpfix repeat replace report reshape restore ret retu retur return rm rmdir robvar roccomp roccomp_7 roccomp_8 rocf_lf rocfit rocfit_8 rocgold rocplot rocplot_7 roctab roctab_7 rolling rologit rologit_p rot rota rotat rotate rotatemat rreg rreg_p ru run runtest rvfplot rvfplot_7 rvpplot rvpplot_7 sa safesum sample sampsi sav save savedresults saveold sc sca scal scala scalar scatter scm_mine sco scob_lf scob_p scobi_sw scobit scor score scoreplot scoreplot_help scree screeplot screeplot_help sdtest sdtesti se search separate seperate serrbar serrbar_7 serset set set_defaults sfrancia sh she shel shell shewhart shewhart_7 signestimationsample signrank signtest simul simul_7 simulate simulate_8 sktest sleep slogit slogit_d2 slogit_p smooth snapspan so sor sort spearman spikeplot spikeplot_7 spikeplt spline_x split sqreg sqreg_p sret sretu sretur sreturn ssc st st_ct st_hc st_hcd st_hcd_sh st_is st_issys st_note st_promo st_set st_show st_smpl st_subid stack statsby statsby_8 stbase stci stci_7 stcox stcox_estat stcox_fr stcox_fr_ll stcox_p stcox_sw stcoxkm stcoxkm_7 stcstat stcurv stcurve stcurve_7 stdes stem stepwise stereg stfill stgen stir stjoin stmc stmh stphplot stphplot_7 stphtest stphtest_7 stptime strate strate_7 streg streg_sw streset sts sts_7 stset stsplit stsum sttocc sttoct stvary stweib su suest suest_8 sum summ summa summar summari summariz summarize sunflower sureg survcurv survsum svar svar_p svmat svy svy_disp svy_dreg svy_est svy_est_7 svy_estat svy_get svy_gnbreg_p svy_head svy_header svy_heckman_p svy_heckprob_p svy_intreg_p svy_ivreg_p svy_logistic_p svy_logit_p svy_mlogit_p svy_nbreg_p svy_ologit_p svy_oprobit_p svy_poisson_p svy_probit_p svy_regress_p svy_sub svy_sub_7 svy_x svy_x_7 svy_x_p svydes svydes_8 svygen svygnbreg svyheckman svyheckprob svyintreg svyintreg_7 svyintrg svyivreg svylc svylog_p svylogit svymarkout svymarkout_8 svymean svymlog svymlogit svynbreg svyolog svyologit svyoprob svyoprobit svyopts svypois svypois_7 svypoisson svyprobit svyprobt svyprop svyprop_7 svyratio svyreg svyreg_p svyregress svyset svyset_7 svyset_8 svytab svytab_7 svytest svytotal sw sw_8 swcnreg swcox swereg swilk swlogis swlogit swologit swoprbt swpois swprobit swqreg swtobit swweib symmetry symmi symplot symplot_7 syntax sysdescribe sysdir sysuse szroeter ta tab tab1 tab2 tab_or tabd tabdi tabdis tabdisp tabi table tabodds tabodds_7 tabstat tabu tabul tabula tabulat tabulate te tempfile tempname tempvar tes test testnl testparm teststd tetrachoric time_it timer tis tob tobi tobit tobit_p tobit_sw token tokeni tokeniz tokenize tostring total translate translator transmap treat_ll treatr_p treatreg trim trnb_cons trnb_mean trpoiss_d2 trunc_ll truncr_p truncreg tsappend tset tsfill tsline tsline_ex tsreport tsrevar tsrline tsset tssmooth tsunab ttest ttesti tut_chk tut_wait tutorial tw tware_st two twoway twoway__fpfit_serset twoway__function_gen twoway__histogram_gen twoway__ipoint_serset twoway__ipoints_serset twoway__kdensity_gen twoway__lfit_serset twoway__normgen_gen twoway__pci_serset twoway__qfit_serset twoway__scatteri_serset twoway__sunflower_gen twoway_ksm_serset ty typ type typeof u|0 unab unabbrev unabcmd update us use uselabel var var_mkcompanion var_p varbasic varfcast vargranger varirf varirf_add varirf_cgraph varirf_create varirf_ctable varirf_describe varirf_dir varirf_drop varirf_erase varirf_graph varirf_ograph varirf_rename varirf_set varirf_table varlist varlmar varnorm varsoc varstable varstable_w varstable_w2 varwle vce vec vec_fevd vec_mkphi vec_p vec_p_w vecirf_create veclmar veclmar_w vecnorm vecnorm_w vecrank vecstable verinst vers versi versio version view viewsource vif vwls wdatetof webdescribe webseek webuse weib1_lf weib2_lf weib_lf weib_lf0 weibhet_glf weibhet_glf_sh weibhet_glfa weibhet_glfa_sh weibhet_gp weibhet_ilf weibhet_ilf_sh weibhet_ilfa weibhet_ilfa_sh weibhet_ip weibu_sw weibul_p weibull weibull_c weibull_s weibullhet wh whelp whi which whil while wilc_st wilcoxon win wind windo window winexec wntestb wntestb_7 wntestq xchart xchart_7 xcorr xcorr_7 xi xi_6 xmlsav xmlsave xmluse xpose xsh xshe xshel xshell xt_iis xt_tis xtab_p xtabond xtbin_p xtclog xtcloglog xtcloglog_8 xtcloglog_d2 xtcloglog_pa_p xtcloglog_re_p xtcnt_p xtcorr xtdata xtdes xtfront_p xtfrontier xtgee xtgee_elink xtgee_estat xtgee_makeivar xtgee_p xtgee_plink xtgls xtgls_p xthaus xthausman xtht_p xthtaylor xtile xtint_p xtintreg xtintreg_8 xtintreg_d2 xtintreg_p xtivp_1 xtivp_2 xtivreg xtline xtline_ex xtlogit xtlogit_8 xtlogit_d2 xtlogit_fe_p xtlogit_pa_p xtlogit_re_p xtmixed xtmixed_estat xtmixed_p xtnb_fe xtnb_lf xtnbreg xtnbreg_pa_p xtnbreg_refe_p xtpcse xtpcse_p xtpois xtpoisson xtpoisson_d2 xtpoisson_pa_p xtpoisson_refe_p xtpred xtprobit xtprobit_8 xtprobit_d2 xtprobit_re_p xtps_fe xtps_lf xtps_ren xtps_ren_8 xtrar_p xtrc xtrc_p xtrchh xtrefe_p xtreg xtreg_be xtreg_fe xtreg_ml xtreg_pa_p xtreg_re xtregar xtrere_p xtset xtsf_ll xtsf_llti xtsum xttab xttest0 xttobit xttobit_8 xttobit_p xttrans yx yxview__barlike_draw yxview_area_draw yxview_bar_draw yxview_dot_draw yxview_dropline_draw yxview_function_draw yxview_iarrow_draw yxview_ilabels_draw yxview_normal_draw yxview_pcarrow_draw yxview_pcbarrow_draw yxview_pccapsym_draw yxview_pcscatter_draw yxview_pcspike_draw yxview_rarea_draw yxview_rbar_draw yxview_rbarm_draw yxview_rcap_draw yxview_rcapsym_draw yxview_rconnected_draw yxview_rline_draw yxview_rscatter_draw yxview_rspike_draw yxview_spike_draw yxview_sunflower_draw zap_s zinb zinb_llf zinb_plf zip zip_llf zip_p zip_plf zt_ct_5 zt_hc_5 zt_hcd_5 zt_is_5 zt_iss_5 zt_sho_5 zt_smp_5 ztbase_5 ztcox_5 ztdes_5 ztereg_5 ztfill_5 ztgen_5 ztir_5 ztjoin_5 ztnb ztnb_p ztp ztp_p zts_5 ztset_5 ztspli_5 ztsum_5 zttoct_5 ztvary_5 ztweib_5',\n        contains: [\n      {\n        className: 'symbol',\n        begin: /`[a-zA-Z0-9_]+'/\n      },\n      {\n        className: 'variable',\n        begin: /\\$\\{?[a-zA-Z0-9_]+\\}?/\n      },\n      {\n        className: 'string',\n        variants: [\n          {begin: '`\"[^\\r\\n]*?\"\\''},\n          {begin: '\"[^\\r\\n\"]*\"'}\n        ]\n      },\n\n      {\n        className: 'built_in',\n        variants: [\n          {\n            begin: '\\\\b(abs|acos|asin|atan|atan2|atanh|ceil|cloglog|comb|cos|digamma|exp|floor|invcloglog|invlogit|ln|lnfact|lnfactorial|lngamma|log|log10|max|min|mod|reldif|round|sign|sin|sqrt|sum|tan|tanh|trigamma|trunc|betaden|Binomial|binorm|binormal|chi2|chi2tail|dgammapda|dgammapdada|dgammapdadx|dgammapdx|dgammapdxdx|F|Fden|Ftail|gammaden|gammap|ibeta|invbinomial|invchi2|invchi2tail|invF|invFtail|invgammap|invibeta|invnchi2|invnFtail|invnibeta|invnorm|invnormal|invttail|nbetaden|nchi2|nFden|nFtail|nibeta|norm|normal|normalden|normd|npnchi2|tden|ttail|uniform|abbrev|char|index|indexnot|length|lower|ltrim|match|plural|proper|real|regexm|regexr|regexs|reverse|rtrim|string|strlen|strlower|strltrim|strmatch|strofreal|strpos|strproper|strreverse|strrtrim|strtrim|strupper|subinstr|subinword|substr|trim|upper|word|wordcount|_caller|autocode|byteorder|chop|clip|cond|e|epsdouble|epsfloat|group|inlist|inrange|irecode|matrix|maxbyte|maxdouble|maxfloat|maxint|maxlong|mi|minbyte|mindouble|minfloat|minint|minlong|missing|r|recode|replay|return|s|scalar|d|date|day|dow|doy|halfyear|mdy|month|quarter|week|year|d|daily|dofd|dofh|dofm|dofq|dofw|dofy|h|halfyearly|hofd|m|mofd|monthly|q|qofd|quarterly|tin|twithin|w|weekly|wofd|y|yearly|yh|ym|yofd|yq|yw|cholesky|colnumb|colsof|corr|det|diag|diag0cnt|el|get|hadamard|I|inv|invsym|issym|issymmetric|J|matmissing|matuniform|mreldif|nullmat|rownumb|rowsof|sweep|syminv|trace|vec|vecdiag)(?=\\\\(|$)'\n          }\n        ]\n      },\n\n      hljs.COMMENT('^[ \\t]*\\\\*.*$', false),\n      hljs.C_LINE_COMMENT_MODE,\n      hljs.C_BLOCK_COMMENT_MODE\n    ]\n  };\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/languages/step21.js",
    "content": "/*\nLanguage: STEP Part 21\nContributors: Adam Joseph Cook <adam.joseph.cook@gmail.com>\nDescription: Syntax highlighter for STEP Part 21 files (ISO 10303-21).\n*/\n\nfunction(hljs) {\n  var STEP21_IDENT_RE = '[A-Z_][A-Z0-9_.]*';\n  var STEP21_KEYWORDS = {\n    keyword: 'HEADER ENDSEC DATA'\n  };\n  var STEP21_START = {\n    className: 'meta',\n    begin: 'ISO-10303-21;',\n    relevance: 10\n  };\n  var STEP21_CLOSE = {\n    className: 'meta',\n    begin: 'END-ISO-10303-21;',\n    relevance: 10\n  };\n\n  return {\n    aliases: ['p21', 'step', 'stp'],\n    case_insensitive: true, // STEP 21 is case insensitive in theory, in practice all non-comments are capitalized.\n    lexemes: STEP21_IDENT_RE,\n    keywords: STEP21_KEYWORDS,\n    contains: [\n      STEP21_START,\n      STEP21_CLOSE,\n      hljs.C_LINE_COMMENT_MODE,\n      hljs.C_BLOCK_COMMENT_MODE,\n      hljs.COMMENT('/\\\\*\\\\*!', '\\\\*/'),\n      hljs.C_NUMBER_MODE,\n      hljs.inherit(hljs.APOS_STRING_MODE, {illegal: null}),\n      hljs.inherit(hljs.QUOTE_STRING_MODE, {illegal: null}),\n      {\n        className: 'string',\n        begin: \"'\", end: \"'\"\n      },\n      {\n        className: 'symbol',\n        variants: [\n          {\n            begin: '#', end: '\\\\d+',\n            illegal: '\\\\W'\n          }\n        ]\n      }\n    ]\n  };\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/languages/stylus.js",
    "content": "/*\nLanguage: Stylus\nAuthor: Bryant Williams <b.n.williams@gmail.com>\nDescription: Stylus (https://github.com/LearnBoost/stylus/)\nCategory: css\n*/\n\nfunction(hljs) {\n\n  var VARIABLE = {\n    className: 'variable',\n    begin: '\\\\$' + hljs.IDENT_RE\n  };\n\n  var HEX_COLOR = {\n    className: 'number',\n    begin: '#([a-fA-F0-9]{6}|[a-fA-F0-9]{3})'\n  };\n\n  var AT_KEYWORDS = [\n    'charset',\n    'css',\n    'debug',\n    'extend',\n    'font-face',\n    'for',\n    'import',\n    'include',\n    'media',\n    'mixin',\n    'page',\n    'warn',\n    'while'\n  ];\n\n  var PSEUDO_SELECTORS = [\n    'after',\n    'before',\n    'first-letter',\n    'first-line',\n    'active',\n    'first-child',\n    'focus',\n    'hover',\n    'lang',\n    'link',\n    'visited'\n  ];\n\n  var TAGS = [\n    'a',\n    'abbr',\n    'address',\n    'article',\n    'aside',\n    'audio',\n    'b',\n    'blockquote',\n    'body',\n    'button',\n    'canvas',\n    'caption',\n    'cite',\n    'code',\n    'dd',\n    'del',\n    'details',\n    'dfn',\n    'div',\n    'dl',\n    'dt',\n    'em',\n    'fieldset',\n    'figcaption',\n    'figure',\n    'footer',\n    'form',\n    'h1',\n    'h2',\n    'h3',\n    'h4',\n    'h5',\n    'h6',\n    'header',\n    'hgroup',\n    'html',\n    'i',\n    'iframe',\n    'img',\n    'input',\n    'ins',\n    'kbd',\n    'label',\n    'legend',\n    'li',\n    'mark',\n    'menu',\n    'nav',\n    'object',\n    'ol',\n    'p',\n    'q',\n    'quote',\n    'samp',\n    'section',\n    'span',\n    'strong',\n    'summary',\n    'sup',\n    'table',\n    'tbody',\n    'td',\n    'textarea',\n    'tfoot',\n    'th',\n    'thead',\n    'time',\n    'tr',\n    'ul',\n    'var',\n    'video'\n  ];\n\n  var TAG_END = '[\\\\.\\\\s\\\\n\\\\[\\\\:,]';\n\n  var ATTRIBUTES = [\n    'align-content',\n    'align-items',\n    'align-self',\n    'animation',\n    'animation-delay',\n    'animation-direction',\n    'animation-duration',\n    'animation-fill-mode',\n    'animation-iteration-count',\n    'animation-name',\n    'animation-play-state',\n    'animation-timing-function',\n    'auto',\n    'backface-visibility',\n    'background',\n    'background-attachment',\n    'background-clip',\n    'background-color',\n    'background-image',\n    'background-origin',\n    'background-position',\n    'background-repeat',\n    'background-size',\n    'border',\n    'border-bottom',\n    'border-bottom-color',\n    'border-bottom-left-radius',\n    'border-bottom-right-radius',\n    'border-bottom-style',\n    'border-bottom-width',\n    'border-collapse',\n    'border-color',\n    'border-image',\n    'border-image-outset',\n    'border-image-repeat',\n    'border-image-slice',\n    'border-image-source',\n    'border-image-width',\n    'border-left',\n    'border-left-color',\n    'border-left-style',\n    'border-left-width',\n    'border-radius',\n    'border-right',\n    'border-right-color',\n    'border-right-style',\n    'border-right-width',\n    'border-spacing',\n    'border-style',\n    'border-top',\n    'border-top-color',\n    'border-top-left-radius',\n    'border-top-right-radius',\n    'border-top-style',\n    'border-top-width',\n    'border-width',\n    'bottom',\n    'box-decoration-break',\n    'box-shadow',\n    'box-sizing',\n    'break-after',\n    'break-before',\n    'break-inside',\n    'caption-side',\n    'clear',\n    'clip',\n    'clip-path',\n    'color',\n    'column-count',\n    'column-fill',\n    'column-gap',\n    'column-rule',\n    'column-rule-color',\n    'column-rule-style',\n    'column-rule-width',\n    'column-span',\n    'column-width',\n    'columns',\n    'content',\n    'counter-increment',\n    'counter-reset',\n    'cursor',\n    'direction',\n    'display',\n    'empty-cells',\n    'filter',\n    'flex',\n    'flex-basis',\n    'flex-direction',\n    'flex-flow',\n    'flex-grow',\n    'flex-shrink',\n    'flex-wrap',\n    'float',\n    'font',\n    'font-family',\n    'font-feature-settings',\n    'font-kerning',\n    'font-language-override',\n    'font-size',\n    'font-size-adjust',\n    'font-stretch',\n    'font-style',\n    'font-variant',\n    'font-variant-ligatures',\n    'font-weight',\n    'height',\n    'hyphens',\n    'icon',\n    'image-orientation',\n    'image-rendering',\n    'image-resolution',\n    'ime-mode',\n    'inherit',\n    'initial',\n    'justify-content',\n    'left',\n    'letter-spacing',\n    'line-height',\n    'list-style',\n    'list-style-image',\n    'list-style-position',\n    'list-style-type',\n    'margin',\n    'margin-bottom',\n    'margin-left',\n    'margin-right',\n    'margin-top',\n    'marks',\n    'mask',\n    'max-height',\n    'max-width',\n    'min-height',\n    'min-width',\n    'nav-down',\n    'nav-index',\n    'nav-left',\n    'nav-right',\n    'nav-up',\n    'none',\n    'normal',\n    'object-fit',\n    'object-position',\n    'opacity',\n    'order',\n    'orphans',\n    'outline',\n    'outline-color',\n    'outline-offset',\n    'outline-style',\n    'outline-width',\n    'overflow',\n    'overflow-wrap',\n    'overflow-x',\n    'overflow-y',\n    'padding',\n    'padding-bottom',\n    'padding-left',\n    'padding-right',\n    'padding-top',\n    'page-break-after',\n    'page-break-before',\n    'page-break-inside',\n    'perspective',\n    'perspective-origin',\n    'pointer-events',\n    'position',\n    'quotes',\n    'resize',\n    'right',\n    'tab-size',\n    'table-layout',\n    'text-align',\n    'text-align-last',\n    'text-decoration',\n    'text-decoration-color',\n    'text-decoration-line',\n    'text-decoration-style',\n    'text-indent',\n    'text-overflow',\n    'text-rendering',\n    'text-shadow',\n    'text-transform',\n    'text-underline-position',\n    'top',\n    'transform',\n    'transform-origin',\n    'transform-style',\n    'transition',\n    'transition-delay',\n    'transition-duration',\n    'transition-property',\n    'transition-timing-function',\n    'unicode-bidi',\n    'vertical-align',\n    'visibility',\n    'white-space',\n    'widows',\n    'width',\n    'word-break',\n    'word-spacing',\n    'word-wrap',\n    'z-index'\n  ];\n\n  // illegals\n  var ILLEGAL = [\n    '\\\\?',\n    '(\\\\bReturn\\\\b)', // monkey\n    '(\\\\bEnd\\\\b)', // monkey\n    '(\\\\bend\\\\b)', // vbscript\n    '(\\\\bdef\\\\b)', // gradle\n    ';', // a whole lot of languages\n    '#\\\\s', // markdown\n    '\\\\*\\\\s', // markdown\n    '===\\\\s', // markdown\n    '\\\\|',\n    '%', // prolog\n  ];\n\n  return {\n    aliases: ['styl'],\n    case_insensitive: false,\n    keywords: 'if else for in',\n    illegal: '(' + ILLEGAL.join('|') + ')',\n    contains: [\n\n      // strings\n      hljs.QUOTE_STRING_MODE,\n      hljs.APOS_STRING_MODE,\n\n      // comments\n      hljs.C_LINE_COMMENT_MODE,\n      hljs.C_BLOCK_COMMENT_MODE,\n\n      // hex colors\n      HEX_COLOR,\n\n      // class tag\n      {\n        begin: '\\\\.[a-zA-Z][a-zA-Z0-9_-]*' + TAG_END,\n        returnBegin: true,\n        contains: [\n          {className: 'selector-class', begin: '\\\\.[a-zA-Z][a-zA-Z0-9_-]*'}\n        ]\n      },\n\n      // id tag\n      {\n        begin: '\\\\#[a-zA-Z][a-zA-Z0-9_-]*' + TAG_END,\n        returnBegin: true,\n        contains: [\n          {className: 'selector-id', begin: '\\\\#[a-zA-Z][a-zA-Z0-9_-]*'}\n        ]\n      },\n\n      // tags\n      {\n        begin: '\\\\b(' + TAGS.join('|') + ')' + TAG_END,\n        returnBegin: true,\n        contains: [\n          {className: 'selector-tag', begin: '\\\\b[a-zA-Z][a-zA-Z0-9_-]*'}\n        ]\n      },\n\n      // psuedo selectors\n      {\n        begin: '&?:?:\\\\b(' + PSEUDO_SELECTORS.join('|') + ')' + TAG_END\n      },\n\n      // @ keywords\n      {\n        begin: '\\@(' + AT_KEYWORDS.join('|') + ')\\\\b'\n      },\n\n      // variables\n      VARIABLE,\n\n      // dimension\n      hljs.CSS_NUMBER_MODE,\n\n      // number\n      hljs.NUMBER_MODE,\n\n      // functions\n      //  - only from beginning of line + whitespace\n      {\n        className: 'function',\n        begin: '^[a-zA-Z][a-zA-Z0-9_\\-]*\\\\(.*\\\\)',\n        illegal: '[\\\\n]',\n        returnBegin: true,\n        contains: [\n          {className: 'title', begin: '\\\\b[a-zA-Z][a-zA-Z0-9_\\-]*'},\n          {\n            className: 'params',\n            begin: /\\(/,\n            end: /\\)/,\n            contains: [\n              HEX_COLOR,\n              VARIABLE,\n              hljs.APOS_STRING_MODE,\n              hljs.CSS_NUMBER_MODE,\n              hljs.NUMBER_MODE,\n              hljs.QUOTE_STRING_MODE\n            ]\n          }\n        ]\n      },\n\n      // attributes\n      //  - only from beginning of line + whitespace\n      //  - must have whitespace after it\n      {\n        className: 'attribute',\n        begin: '\\\\b(' + ATTRIBUTES.reverse().join('|') + ')\\\\b',\n        starts: {\n          // value container\n          end: /;|$/,\n          contains: [\n            HEX_COLOR,\n            VARIABLE,\n            hljs.APOS_STRING_MODE,\n            hljs.QUOTE_STRING_MODE,\n            hljs.CSS_NUMBER_MODE,\n            hljs.NUMBER_MODE,\n            hljs.C_BLOCK_COMMENT_MODE\n          ],\n          illegal: /\\./,\n          relevance: 0\n        }\n      }\n    ]\n  };\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/languages/subunit.js",
    "content": "/*\nLanguage: SubUnit\nAuthor: Sergey Bronnikov <sergeyb@bronevichok.ru>\nWebsite: https://bronevichok.ru/\n*/\n\nfunction(hljs) {\n  var DETAILS = {\n    className: 'string',\n    begin: '\\\\[\\n(multipart)?', end: '\\\\]\\n'\n  };\n  var TIME = {\n    className: 'string',\n    begin: '\\\\d{4}-\\\\d{2}-\\\\d{2}(\\\\s+)\\\\d{2}:\\\\d{2}:\\\\d{2}\\.\\\\d+Z'\n  };\n  var PROGRESSVALUE = {\n    className: 'string',\n    begin: '(\\\\+|-)\\\\d+'\n  };\n  var KEYWORDS = {\n    className: 'keyword',\n    relevance: 10,\n    variants: [\n      { begin: '^(test|testing|success|successful|failure|error|skip|xfail|uxsuccess)(:?)\\\\s+(test)?' },\n      { begin: '^progress(:?)(\\\\s+)?(pop|push)?' },\n      { begin: '^tags:' },\n      { begin: '^time:' }\n    ],\n  };\n  return {\n    case_insensitive: true,\n    contains: [\n      DETAILS,\n      TIME,\n      PROGRESSVALUE,\n      KEYWORDS\n    ]\n  };\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/languages/swift.js",
    "content": "/*\nLanguage: Swift\nAuthor: Chris Eidhof <chris@eidhof.nl>\nContributors: Nate Cook <natecook@gmail.com>, Alexander Lichter <manniL@gmx.net>\nCategory: system\n*/\n\n\nfunction(hljs) {\n  var SWIFT_KEYWORDS = {\n      keyword: '__COLUMN__ __FILE__ __FUNCTION__ __LINE__ as as! as? associativity ' +\n        'break case catch class continue convenience default defer deinit didSet do ' +\n        'dynamic dynamicType else enum extension fallthrough false final for func ' +\n        'get guard if import in indirect infix init inout internal is lazy left let ' +\n        'mutating nil none nonmutating operator optional override postfix precedence ' +\n        'prefix private protocol Protocol public repeat required rethrows return ' +\n        'right self Self set static struct subscript super switch throw throws true ' +\n        'try try! try? Type typealias unowned var weak where while willSet',\n      literal: 'true false nil',\n      built_in: 'abs advance alignof alignofValue anyGenerator assert assertionFailure ' +\n        'bridgeFromObjectiveC bridgeFromObjectiveCUnconditional bridgeToObjectiveC ' +\n        'bridgeToObjectiveCUnconditional c contains count countElements countLeadingZeros ' +\n        'debugPrint debugPrintln distance dropFirst dropLast dump encodeBitsAsWords ' +\n        'enumerate equal fatalError filter find getBridgedObjectiveCType getVaList ' +\n        'indices insertionSort isBridgedToObjectiveC isBridgedVerbatimToObjectiveC ' +\n        'isUniquelyReferenced isUniquelyReferencedNonObjC join lazy lexicographicalCompare ' +\n        'map max maxElement min minElement numericCast overlaps partition posix ' +\n        'precondition preconditionFailure print println quickSort readLine reduce reflect ' +\n        'reinterpretCast reverse roundUpToAlignment sizeof sizeofValue sort split ' +\n        'startsWith stride strideof strideofValue swap toString transcode ' +\n        'underestimateCount unsafeAddressOf unsafeBitCast unsafeDowncast unsafeUnwrap ' +\n        'unsafeReflect withExtendedLifetime withObjectAtPlusZero withUnsafePointer ' +\n        'withUnsafePointerToObject withUnsafeMutablePointer withUnsafeMutablePointers ' +\n        'withUnsafePointer withUnsafePointers withVaList zip'\n    };\n\n  var TYPE = {\n    className: 'type',\n    begin: '\\\\b[A-Z][\\\\w\\u00C0-\\u02B8\\']*',\n    relevance: 0\n  };\n  var BLOCK_COMMENT = hljs.COMMENT(\n    '/\\\\*',\n    '\\\\*/',\n    {\n      contains: ['self']\n    }\n  );\n  var SUBST = {\n    className: 'subst',\n    begin: /\\\\\\(/, end: '\\\\)',\n    keywords: SWIFT_KEYWORDS,\n    contains: [] // assigned later\n  };\n  var NUMBERS = {\n      className: 'number',\n      begin: '\\\\b([\\\\d_]+(\\\\.[\\\\deE_]+)?|0x[a-fA-F0-9_]+(\\\\.[a-fA-F0-9p_]+)?|0b[01_]+|0o[0-7_]+)\\\\b',\n      relevance: 0\n  };\n  var QUOTE_STRING_MODE = hljs.inherit(hljs.QUOTE_STRING_MODE, {\n    contains: [SUBST, hljs.BACKSLASH_ESCAPE]\n  });\n  SUBST.contains = [NUMBERS];\n\n  return {\n    keywords: SWIFT_KEYWORDS,\n    contains: [\n      QUOTE_STRING_MODE,\n      hljs.C_LINE_COMMENT_MODE,\n      BLOCK_COMMENT,\n      TYPE,\n      NUMBERS,\n      {\n        className: 'function',\n        beginKeywords: 'func', end: '{', excludeEnd: true,\n        contains: [\n          hljs.inherit(hljs.TITLE_MODE, {\n            begin: /[A-Za-z$_][0-9A-Za-z$_]*/\n          }),\n          {\n            begin: /</, end: />/\n          },\n          {\n            className: 'params',\n            begin: /\\(/, end: /\\)/, endsParent: true,\n            keywords: SWIFT_KEYWORDS,\n            contains: [\n              'self',\n              NUMBERS,\n              QUOTE_STRING_MODE,\n              hljs.C_BLOCK_COMMENT_MODE,\n              {begin: ':'} // relevance booster\n            ],\n            illegal: /[\"']/\n          }\n        ],\n        illegal: /\\[|%/\n      },\n      {\n        className: 'class',\n        beginKeywords: 'struct protocol class extension enum',\n        keywords: SWIFT_KEYWORDS,\n        end: '\\\\{',\n        excludeEnd: true,\n        contains: [\n          hljs.inherit(hljs.TITLE_MODE, {begin: /[A-Za-z$_][\\u00C0-\\u02B80-9A-Za-z$_]*/})\n        ]\n      },\n      {\n        className: 'meta', // @attributes\n        begin: '(@warn_unused_result|@exported|@lazy|@noescape|' +\n                  '@NSCopying|@NSManaged|@objc|@convention|@required|' +\n                  '@noreturn|@IBAction|@IBDesignable|@IBInspectable|@IBOutlet|' +\n                  '@infix|@prefix|@postfix|@autoclosure|@testable|@available|' +\n                  '@nonobjc|@NSApplicationMain|@UIApplicationMain)'\n\n      },\n      {\n        beginKeywords: 'import', end: /$/,\n        contains: [hljs.C_LINE_COMMENT_MODE, BLOCK_COMMENT]\n      }\n    ]\n  };\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/languages/taggerscript.js",
    "content": "/*\nLanguage: Tagger Script\nAuthor: Philipp Wolfer <ph.wolfer@gmail.com>\nDescription: Syntax Highlighting for the Tagger Script as used by MusicBrainz Picard.\n */\nfunction(hljs) {\n\n  var COMMENT = {\n    className: 'comment',\n    begin: /\\$noop\\(/,\n    end: /\\)/,\n    contains: [{\n      begin: /\\(/,\n      end: /\\)/,\n      contains: ['self', {\n        begin: /\\\\./\n      }]\n    }],\n    relevance: 10\n  };\n\n  var FUNCTION = {\n    className: 'keyword',\n    begin: /\\$(?!noop)[a-zA-Z][_a-zA-Z0-9]*/,\n    end: /\\(/,\n    excludeEnd: true\n  };\n\n  var VARIABLE = {\n    className: 'variable',\n    begin: /%[_a-zA-Z0-9:]*/,\n    end: '%'\n  };\n\n  var ESCAPE_SEQUENCE = {\n    className: 'symbol',\n    begin: /\\\\./\n  };\n\n  return {\n    contains: [\n      COMMENT,\n      FUNCTION,\n      VARIABLE,\n      ESCAPE_SEQUENCE\n    ]\n  };\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/languages/tap.js",
    "content": "/*\nLanguage: Test Anything Protocol\nRequires: yaml.js\nAuthor: Sergey Bronnikov <sergeyb@bronevichok.ru>\nWebsite: https://bronevichok.ru/\n*/\n\nfunction(hljs) {\n  return {\n    case_insensitive: true,\n    contains: [\n      hljs.HASH_COMMENT_MODE,\n      // version of format and total amount of testcases\n      {\n        className: 'meta',\n        variants: [\n          { begin: '^TAP version (\\\\d+)$' },\n          { begin: '^1\\\\.\\\\.(\\\\d+)$' }\n        ],\n      },\n      // YAML block\n      {\n        begin: '(\\s+)?---$', end: '\\\\.\\\\.\\\\.$',\n        subLanguage: 'yaml',\n        relevance: 0\n      },\n\t  // testcase number\n      {\n        className: 'number',\n        begin: ' (\\\\d+) '\n      },\n\t  // testcase status and description\n      {\n        className: 'symbol',\n        variants: [\n          { begin: '^ok' },\n          { begin: '^not ok' }\n        ],\n      },\n    ]\n  };\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/languages/tcl.js",
    "content": "/*\nLanguage: Tcl\nAuthor: Radek Liska <radekliska@gmail.com>\n*/\n\nfunction(hljs) {\n  return {\n    aliases: ['tk'],\n    keywords: 'after append apply array auto_execok auto_import auto_load auto_mkindex ' +\n      'auto_mkindex_old auto_qualify auto_reset bgerror binary break catch cd chan clock ' +\n      'close concat continue dde dict encoding eof error eval exec exit expr fblocked ' +\n      'fconfigure fcopy file fileevent filename flush for foreach format gets glob global ' +\n      'history http if incr info interp join lappend|10 lassign|10 lindex|10 linsert|10 list ' +\n      'llength|10 load lrange|10 lrepeat|10 lreplace|10 lreverse|10 lsearch|10 lset|10 lsort|10 '+\n      'mathfunc mathop memory msgcat namespace open package parray pid pkg::create pkg_mkIndex '+\n      'platform platform::shell proc puts pwd read refchan regexp registry regsub|10 rename '+\n      'return safe scan seek set socket source split string subst switch tcl_endOfWord '+\n      'tcl_findLibrary tcl_startOfNextWord tcl_startOfPreviousWord tcl_wordBreakAfter '+\n      'tcl_wordBreakBefore tcltest tclvars tell time tm trace unknown unload unset update '+\n      'uplevel upvar variable vwait while',\n    contains: [\n      hljs.COMMENT(';[ \\\\t]*#', '$'),\n      hljs.COMMENT('^[ \\\\t]*#', '$'),\n      {\n        beginKeywords: 'proc',\n        end: '[\\\\{]',\n        excludeEnd: true,\n        contains: [\n          {\n            className: 'title',\n            begin: '[ \\\\t\\\\n\\\\r]+(::)?[a-zA-Z_]((::)?[a-zA-Z0-9_])*',\n            end: '[ \\\\t\\\\n\\\\r]',\n            endsWithParent: true,\n            excludeEnd: true\n          }\n        ]\n      },\n      {\n        excludeEnd: true,\n        variants: [\n          {\n            begin: '\\\\$(\\\\{)?(::)?[a-zA-Z_]((::)?[a-zA-Z0-9_])*\\\\(([a-zA-Z0-9_])*\\\\)',\n            end: '[^a-zA-Z0-9_\\\\}\\\\$]'\n          },\n          {\n            begin: '\\\\$(\\\\{)?(::)?[a-zA-Z_]((::)?[a-zA-Z0-9_])*',\n            end: '(\\\\))?[^a-zA-Z0-9_\\\\}\\\\$]'\n          }\n        ]\n      },\n      {\n        className: 'string',\n        contains: [hljs.BACKSLASH_ESCAPE],\n        variants: [\n          hljs.inherit(hljs.APOS_STRING_MODE, {illegal: null}),\n          hljs.inherit(hljs.QUOTE_STRING_MODE, {illegal: null})\n        ]\n      },\n      {\n        className: 'number',\n        variants: [hljs.BINARY_NUMBER_MODE, hljs.C_NUMBER_MODE]\n      }\n    ]\n  }\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/languages/tex.js",
    "content": "/*\nLanguage: TeX\nAuthor: Vladimir Moskva <vladmos@gmail.com>\nWebsite: http://fulc.ru/\nCategory: markup\n*/\n\nfunction(hljs) {\n  var COMMAND = {\n    className: 'tag',\n    begin: /\\\\/,\n    relevance: 0,\n    contains: [\n      {\n        className: 'name',\n        variants: [\n          {begin: /[a-zA-Zа-яА-я]+[*]?/},\n          {begin: /[^a-zA-Zа-яА-я0-9]/}\n        ],\n        starts: {\n          endsWithParent: true,\n          relevance: 0,\n          contains: [\n            {\n              className: 'string', // because it looks like attributes in HTML tags\n              variants: [\n                {begin: /\\[/, end: /\\]/},\n                {begin: /\\{/, end: /\\}/}\n              ]\n            },\n            {\n              begin: /\\s*=\\s*/, endsWithParent: true,\n              relevance: 0,\n              contains: [\n                {\n                  className: 'number',\n                  begin: /-?\\d*\\.?\\d+(pt|pc|mm|cm|in|dd|cc|ex|em)?/\n                }\n              ]\n            }\n          ]\n        }\n      }\n    ]\n  };\n\n  return {\n    contains: [\n      COMMAND,\n      {\n        className: 'formula',\n        contains: [COMMAND],\n        relevance: 0,\n        variants: [\n          {begin: /\\$\\$/, end: /\\$\\$/},\n          {begin: /\\$/, end: /\\$/}\n        ]\n      },\n      hljs.COMMENT(\n        '%',\n        '$',\n        {\n          relevance: 0\n        }\n      )\n    ]\n  };\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/languages/thrift.js",
    "content": "/*\nLanguage: Thrift\nAuthor: Oleg Efimov <efimovov@gmail.com>\nDescription: Thrift message definition format\nCategory: protocols\n*/\n\nfunction(hljs) {\n  var BUILT_IN_TYPES = 'bool byte i16 i32 i64 double string binary';\n  return {\n    keywords: {\n      keyword:\n        'namespace const typedef struct enum service exception void oneway set list map required optional',\n      built_in:\n        BUILT_IN_TYPES,\n      literal:\n        'true false'\n    },\n    contains: [\n      hljs.QUOTE_STRING_MODE,\n      hljs.NUMBER_MODE,\n      hljs.C_LINE_COMMENT_MODE,\n      hljs.C_BLOCK_COMMENT_MODE,\n      {\n        className: 'class',\n        beginKeywords: 'struct enum service exception', end: /\\{/,\n        illegal: /\\n/,\n        contains: [\n          hljs.inherit(hljs.TITLE_MODE, {\n            starts: {endsWithParent: true, excludeEnd: true} // hack: eating everything after the first title\n          })\n        ]\n      },\n      {\n        begin: '\\\\b(set|list|map)\\\\s*<', end: '>',\n        keywords: BUILT_IN_TYPES,\n        contains: ['self']\n      }\n    ]\n  };\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/languages/tp.js",
    "content": "/*\nLanguage: TP\nAuthor: Jay Strybis <jay.strybis@gmail.com>\nDescription: FANUC TP programming language (TPP).\n*/\n\n\nfunction(hljs) {\n  var TPID = {\n    className: 'number',\n    begin: '[1-9][0-9]*', /* no leading zeros */\n    relevance: 0\n  };\n  var TPLABEL = {\n    className: 'symbol',\n    begin: ':[^\\\\]]+'\n  };\n  var TPDATA = {\n    className: 'built_in',\n    begin: '(AR|P|PAYLOAD|PR|R|SR|RSR|LBL|VR|UALM|MESSAGE|UTOOL|UFRAME|TIMER|\\\n    TIMER_OVERFLOW|JOINT_MAX_SPEED|RESUME_PROG|DIAG_REC)\\\\[', end: '\\\\]',\n    contains: [\n      'self',\n      TPID,\n      TPLABEL\n    ]\n  };\n  var TPIO = {\n    className: 'built_in',\n    begin: '(AI|AO|DI|DO|F|RI|RO|UI|UO|GI|GO|SI|SO)\\\\[', end: '\\\\]',\n    contains: [\n      'self',\n      TPID,\n      hljs.QUOTE_STRING_MODE, /* for pos section at bottom */\n      TPLABEL\n    ]\n  };\n\n  return {\n    keywords: {\n      keyword:\n        'ABORT ACC ADJUST AND AP_LD BREAK CALL CNT COL CONDITION CONFIG DA DB ' +\n        'DIV DETECT ELSE END ENDFOR ERR_NUM ERROR_PROG FINE FOR GP GUARD INC ' +\n        'IF JMP LINEAR_MAX_SPEED LOCK MOD MONITOR OFFSET Offset OR OVERRIDE ' +\n        'PAUSE PREG PTH RT_LD RUN SELECT SKIP Skip TA TB TO TOOL_OFFSET ' +\n        'Tool_Offset UF UT UFRAME_NUM UTOOL_NUM UNLOCK WAIT X Y Z W P R STRLEN ' +\n        'SUBSTR FINDSTR VOFFSET PROG ATTR MN POS',\n      literal:\n        'ON OFF max_speed LPOS JPOS ENABLE DISABLE START STOP RESET'\n    },\n    contains: [\n      TPDATA,\n      TPIO,\n      {\n        className: 'keyword',\n        begin: '/(PROG|ATTR|MN|POS|END)\\\\b'\n      },\n      {\n        /* this is for cases like ,CALL */\n        className: 'keyword',\n        begin: '(CALL|RUN|POINT_LOGIC|LBL)\\\\b'\n      },\n      {\n        /* this is for cases like CNT100 where the default lexemes do not\n         * separate the keyword and the number */\n        className: 'keyword',\n        begin: '\\\\b(ACC|CNT|Skip|Offset|PSPD|RT_LD|AP_LD|Tool_Offset)'\n      },\n      {\n        /* to catch numbers that do not have a word boundary on the left */\n        className: 'number',\n        begin: '\\\\d+(sec|msec|mm/sec|cm/min|inch/min|deg/sec|mm|in|cm)?\\\\b',\n        relevance: 0\n      },\n      hljs.COMMENT('//', '[;$]'),\n      hljs.COMMENT('!', '[;$]'),\n      hljs.COMMENT('--eg:', '$'),\n      hljs.QUOTE_STRING_MODE,\n      {\n        className: 'string',\n        begin: '\\'', end: '\\''\n      },\n      hljs.C_NUMBER_MODE,\n      {\n        className: 'variable',\n        begin: '\\\\$[A-Za-z0-9_]+'\n      }\n    ]\n  };\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/languages/twig.js",
    "content": "/*\nLanguage: Twig\nRequires: xml.js\nAuthor: Luke Holder <lukemh@gmail.com>\nDescription: Twig is a templating language for PHP\nCategory: template\n*/\n\nfunction(hljs) {\n  var PARAMS = {\n    className: 'params',\n    begin: '\\\\(', end: '\\\\)'\n  };\n\n  var FUNCTION_NAMES = 'attribute block constant cycle date dump include ' +\n                  'max min parent random range source template_from_string';\n\n  var FUNCTIONS = {\n    beginKeywords: FUNCTION_NAMES,\n    keywords: {name: FUNCTION_NAMES},\n    relevance: 0,\n    contains: [\n      PARAMS\n    ]\n  };\n\n  var FILTER = {\n    begin: /\\|[A-Za-z_]+:?/,\n    keywords:\n      'abs batch capitalize convert_encoding date date_modify default ' +\n      'escape first format join json_encode keys last length lower ' +\n      'merge nl2br number_format raw replace reverse round slice sort split ' +\n      'striptags title trim upper url_encode',\n    contains: [\n      FUNCTIONS\n    ]\n  };\n\n  var TAGS = 'autoescape block do embed extends filter flush for ' +\n    'if import include macro sandbox set spaceless use verbatim';\n\n  TAGS = TAGS + ' ' + TAGS.split(' ').map(function(t){return 'end' + t}).join(' ');\n\n  return {\n    aliases: ['craftcms'],\n    case_insensitive: true,\n    subLanguage: 'xml',\n    contains: [\n      hljs.COMMENT(/\\{#/, /#}/),\n      {\n        className: 'template-tag',\n        begin: /\\{%/, end: /%}/,\n        contains: [\n          {\n            className: 'name',\n            begin: /\\w+/,\n            keywords: TAGS,\n            starts: {\n              endsWithParent: true,\n              contains: [FILTER, FUNCTIONS],\n              relevance: 0\n            }\n          }\n        ]\n      },\n      {\n        className: 'template-variable',\n        begin: /\\{\\{/, end: /}}/,\n        contains: ['self', FILTER, FUNCTIONS]\n      }\n    ]\n  };\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/languages/typescript.js",
    "content": "/*\nLanguage: TypeScript\nAuthor: Panu Horsmalahti <panu.horsmalahti@iki.fi>\nDescription: TypeScript is a strict superset of JavaScript\nCategory: scripting\n*/\n\nfunction(hljs) {\n  var KEYWORDS = {\n    keyword:\n      'in if for while finally var new function do return void else break catch ' +\n      'instanceof with throw case default try this switch continue typeof delete ' +\n      'let yield const class public private protected get set super ' +\n      'static implements enum export import declare type namespace abstract',\n    literal:\n      'true false null undefined NaN Infinity',\n    built_in:\n      'eval isFinite isNaN parseFloat parseInt decodeURI decodeURIComponent ' +\n      'encodeURI encodeURIComponent escape unescape Object Function Boolean Error ' +\n      'EvalError InternalError RangeError ReferenceError StopIteration SyntaxError ' +\n      'TypeError URIError Number Math Date String RegExp Array Float32Array ' +\n      'Float64Array Int16Array Int32Array Int8Array Uint16Array Uint32Array ' +\n      'Uint8Array Uint8ClampedArray ArrayBuffer DataView JSON Intl arguments require ' +\n      'module console window document any number boolean string void'\n  };\n\n  return {\n    aliases: ['ts'],\n    keywords: KEYWORDS,\n    contains: [\n      {\n        className: 'meta',\n        begin: /^\\s*['\"]use strict['\"]/\n      },\n      hljs.APOS_STRING_MODE,\n      hljs.QUOTE_STRING_MODE,\n      { // template string\n        className: 'string',\n        begin: '`', end: '`',\n        contains: [\n          hljs.BACKSLASH_ESCAPE,\n          {\n            className: 'subst',\n            begin: '\\\\$\\\\{', end: '\\\\}'\n          }\n        ]\n      },\n      hljs.C_LINE_COMMENT_MODE,\n      hljs.C_BLOCK_COMMENT_MODE,\n      {\n        className: 'number',\n        variants: [\n          { begin: '\\\\b(0[bB][01]+)' },\n          { begin: '\\\\b(0[oO][0-7]+)' },\n          { begin: hljs.C_NUMBER_RE }\n        ],\n        relevance: 0\n      },\n      { // \"value\" container\n        begin: '(' + hljs.RE_STARTERS_RE + '|\\\\b(case|return|throw)\\\\b)\\\\s*',\n        keywords: 'return throw case',\n        contains: [\n          hljs.C_LINE_COMMENT_MODE,\n          hljs.C_BLOCK_COMMENT_MODE,\n          hljs.REGEXP_MODE\n        ],\n        relevance: 0\n      },\n      {\n        className: 'function',\n        begin: 'function', end: /[\\{;]/, excludeEnd: true,\n        keywords: KEYWORDS,\n        contains: [\n          'self',\n          hljs.inherit(hljs.TITLE_MODE, {begin: /[A-Za-z$_][0-9A-Za-z$_]*/}),\n          {\n            className: 'params',\n            begin: /\\(/, end: /\\)/,\n            excludeBegin: true,\n            excludeEnd: true,\n            keywords: KEYWORDS,\n            contains: [\n              hljs.C_LINE_COMMENT_MODE,\n              hljs.C_BLOCK_COMMENT_MODE\n            ],\n            illegal: /[\"'\\(]/\n          }\n        ],\n        illegal: /%/,\n        relevance: 0 // () => {} is more typical in TypeScript\n      },\n      {\n        beginKeywords: 'constructor', end: /\\{/, excludeEnd: true\n      },\n      { // prevent references like module.id from being higlighted as module definitions\n        begin: /module\\./,\n        keywords: {built_in: 'module'},\n        relevance: 0\n      },\n      {\n        beginKeywords: 'module', end: /\\{/, excludeEnd: true\n      },\n      {\n        beginKeywords: 'interface', end: /\\{/, excludeEnd: true,\n        keywords: 'interface extends'\n      },\n      {\n        begin: /\\$[(.]/ // relevance booster for a pattern common to JS libs: `$(something)` and `$.something`\n      },\n      {\n        begin: '\\\\.' + hljs.IDENT_RE, relevance: 0 // hack: prevents detection of keywords after dots\n      }\n    ]\n  };\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/languages/vala.js",
    "content": "/*\nLanguage: Vala\nAuthor: Antono Vasiljev <antono.vasiljev@gmail.com>\nDescription: Vala is a new programming language that aims to bring modern programming language features to GNOME developers without imposing any additional runtime requirements and without using a different ABI compared to applications and libraries written in C.\n*/\n\nfunction(hljs) {\n  return {\n    keywords: {\n      keyword:\n        // Value types\n        'char uchar unichar int uint long ulong short ushort int8 int16 int32 int64 uint8 ' +\n        'uint16 uint32 uint64 float double bool struct enum string void ' +\n        // Reference types\n        'weak unowned owned ' +\n        // Modifiers\n        'async signal static abstract interface override virtual delegate ' +\n        // Control Structures\n        'if while do for foreach else switch case break default return try catch ' +\n        // Visibility\n        'public private protected internal ' +\n        // Other\n        'using new this get set const stdout stdin stderr var',\n      built_in:\n        'DBus GLib CCode Gee Object Gtk Posix',\n      literal:\n        'false true null'\n    },\n    contains: [\n      {\n        className: 'class',\n        beginKeywords: 'class interface namespace', end: '{', excludeEnd: true,\n        illegal: '[^,:\\\\n\\\\s\\\\.]',\n        contains: [\n          hljs.UNDERSCORE_TITLE_MODE\n        ]\n      },\n      hljs.C_LINE_COMMENT_MODE,\n      hljs.C_BLOCK_COMMENT_MODE,\n      {\n        className: 'string',\n        begin: '\"\"\"', end: '\"\"\"',\n        relevance: 5\n      },\n      hljs.APOS_STRING_MODE,\n      hljs.QUOTE_STRING_MODE,\n      hljs.C_NUMBER_MODE,\n      {\n        className: 'meta',\n        begin: '^#', end: '$',\n        relevance: 2\n      }\n    ]\n  };\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/languages/vbnet.js",
    "content": "/*\nLanguage: VB.NET\nAuthor: Poren Chiang <ren.chiang@gmail.com>\n*/\n\nfunction(hljs) {\n  return {\n    aliases: ['vb'],\n    case_insensitive: true,\n    keywords: {\n      keyword:\n        'addhandler addressof alias and andalso aggregate ansi as assembly auto binary by byref byval ' + /* a-b */\n        'call case catch class compare const continue custom declare default delegate dim distinct do ' + /* c-d */\n        'each equals else elseif end enum erase error event exit explicit finally for friend from function ' + /* e-f */\n        'get global goto group handles if implements imports in inherits interface into is isfalse isnot istrue ' + /* g-i */\n        'join key let lib like loop me mid mod module mustinherit mustoverride mybase myclass ' + /* j-m */\n        'namespace narrowing new next not notinheritable notoverridable ' + /* n */\n        'of off on operator option optional or order orelse overloads overridable overrides ' + /* o */\n        'paramarray partial preserve private property protected public ' + /* p */\n        'raiseevent readonly redim rem removehandler resume return ' + /* r */\n        'select set shadows shared skip static step stop structure strict sub synclock ' + /* s */\n        'take text then throw to try unicode until using when where while widening with withevents writeonly xor', /* t-x */\n      built_in:\n        'boolean byte cbool cbyte cchar cdate cdec cdbl char cint clng cobj csbyte cshort csng cstr ctype ' +  /* b-c */\n        'date decimal directcast double gettype getxmlnamespace iif integer long object ' + /* d-o */\n        'sbyte short single string trycast typeof uinteger ulong ushort', /* s-u */\n      literal:\n        'true false nothing'\n    },\n    illegal: '//|{|}|endif|gosub|variant|wend', /* reserved deprecated keywords */\n    contains: [\n      hljs.inherit(hljs.QUOTE_STRING_MODE, {contains: [{begin: '\"\"'}]}),\n      hljs.COMMENT(\n        '\\'',\n        '$',\n        {\n          returnBegin: true,\n          contains: [\n            {\n              className: 'doctag',\n              begin: '\\'\\'\\'|<!--|-->',\n              contains: [hljs.PHRASAL_WORDS_MODE]\n            },\n            {\n              className: 'doctag',\n              begin: '</?', end: '>',\n              contains: [hljs.PHRASAL_WORDS_MODE]\n            }\n          ]\n        }\n      ),\n      hljs.C_NUMBER_MODE,\n      {\n        className: 'meta',\n        begin: '#', end: '$',\n        keywords: {'meta-keyword': 'if else elseif end region externalsource'}\n      }\n    ]\n  };\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/languages/vbscript-html.js",
    "content": "/*\nLanguage: VBScript in HTML\nRequires: xml.js, vbscript.js\nAuthor: Ivan Sagalaev <maniac@softwaremaniacs.org>\nDescription: \"Bridge\" language defining fragments of VBScript in HTML within <% .. %>\nCategory: scripting\n*/\n\nfunction(hljs) {\n  return {\n    subLanguage: 'xml',\n    contains: [\n      {\n        begin: '<%', end: '%>',\n        subLanguage: 'vbscript'\n      }\n    ]\n  };\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/languages/vbscript.js",
    "content": "/*\nLanguage: VBScript\nAuthor: Nikita Ledyaev <lenikita@yandex.ru>\nContributors: Michal Gabrukiewicz <mgabru@gmail.com>\nCategory: scripting\n*/\n\nfunction(hljs) {\n  return {\n    aliases: ['vbs'],\n    case_insensitive: true,\n    keywords: {\n      keyword:\n        'call class const dim do loop erase execute executeglobal exit for each next function ' +\n        'if then else on error option explicit new private property let get public randomize ' +\n        'redim rem select case set stop sub while wend with end to elseif is or xor and not ' +\n        'class_initialize class_terminate default preserve in me byval byref step resume goto',\n      built_in:\n        'lcase month vartype instrrev ubound setlocale getobject rgb getref string ' +\n        'weekdayname rnd dateadd monthname now day minute isarray cbool round formatcurrency ' +\n        'conversions csng timevalue second year space abs clng timeserial fixs len asc ' +\n        'isempty maths dateserial atn timer isobject filter weekday datevalue ccur isdate ' +\n        'instr datediff formatdatetime replace isnull right sgn array snumeric log cdbl hex ' +\n        'chr lbound msgbox ucase getlocale cos cdate cbyte rtrim join hour oct typename trim ' +\n        'strcomp int createobject loadpicture tan formatnumber mid scriptenginebuildversion ' +\n        'scriptengine split scriptengineminorversion cint sin datepart ltrim sqr ' +\n        'scriptenginemajorversion time derived eval date formatpercent exp inputbox left ascw ' +\n        'chrw regexp server response request cstr err',\n      literal:\n        'true false null nothing empty'\n    },\n    illegal: '//',\n    contains: [\n      hljs.inherit(hljs.QUOTE_STRING_MODE, {contains: [{begin: '\"\"'}]}),\n      hljs.COMMENT(\n        /'/,\n        /$/,\n        {\n          relevance: 0\n        }\n      ),\n      hljs.C_NUMBER_MODE\n    ]\n  };\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/languages/verilog.js",
    "content": "/*\nLanguage: Verilog\nAuthor: Jon Evans <jon@craftyjon.com>\nContributors: Boone Severson <boone.severson@gmail.com>\nDescription: Verilog is a hardware description language used in electronic design automation to describe digital and mixed-signal systems. This highlighter supports Verilog and SystemVerilog through IEEE 1800-2012.\n*/\n\nfunction(hljs) {\n  var SV_KEYWORDS = {\n    keyword:\n      'accept_on alias always always_comb always_ff always_latch and assert assign ' +\n      'assume automatic before begin bind bins binsof bit break buf|0 bufif0 bufif1 ' +\n      'byte case casex casez cell chandle checker class clocking cmos config const ' +\n      'constraint context continue cover covergroup coverpoint cross deassign default ' +\n      'defparam design disable dist do edge else end endcase endchecker endclass ' +\n      'endclocking endconfig endfunction endgenerate endgroup endinterface endmodule ' +\n      'endpackage endprimitive endprogram endproperty endspecify endsequence endtable ' +\n      'endtask enum event eventually expect export extends extern final first_match for ' +\n      'force foreach forever fork forkjoin function generate|5 genvar global highz0 highz1 ' +\n      'if iff ifnone ignore_bins illegal_bins implements implies import incdir include ' +\n      'initial inout input inside instance int integer interconnect interface intersect ' +\n      'join join_any join_none large let liblist library local localparam logic longint ' +\n      'macromodule matches medium modport module nand negedge nettype new nexttime nmos ' +\n      'nor noshowcancelled not notif0 notif1 or output package packed parameter pmos ' +\n      'posedge primitive priority program property protected pull0 pull1 pulldown pullup ' +\n      'pulsestyle_ondetect pulsestyle_onevent pure rand randc randcase randsequence rcmos ' +\n      'real realtime ref reg reject_on release repeat restrict return rnmos rpmos rtran ' +\n      'rtranif0 rtranif1 s_always s_eventually s_nexttime s_until s_until_with scalared ' +\n      'sequence shortint shortreal showcancelled signed small soft solve specify specparam ' +\n      'static string strong strong0 strong1 struct super supply0 supply1 sync_accept_on ' +\n      'sync_reject_on table tagged task this throughout time timeprecision timeunit tran ' +\n      'tranif0 tranif1 tri tri0 tri1 triand trior trireg type typedef union unique unique0 ' +\n      'unsigned until until_with untyped use uwire var vectored virtual void wait wait_order ' +\n      'wand weak weak0 weak1 while wildcard wire with within wor xnor xor',\n    literal:\n      'null',\n    built_in:\n      '$finish $stop $exit $fatal $error $warning $info $realtime $time $printtimescale ' +\n      '$bitstoreal $bitstoshortreal $itor $signed $cast $bits $stime $timeformat ' +\n      '$realtobits $shortrealtobits $rtoi $unsigned $asserton $assertkill $assertpasson ' +\n      '$assertfailon $assertnonvacuouson $assertoff $assertcontrol $assertpassoff ' +\n      '$assertfailoff $assertvacuousoff $isunbounded $sampled $fell $changed $past_gclk ' +\n      '$fell_gclk $changed_gclk $rising_gclk $steady_gclk $coverage_control ' +\n      '$coverage_get $coverage_save $set_coverage_db_name $rose $stable $past ' +\n      '$rose_gclk $stable_gclk $future_gclk $falling_gclk $changing_gclk $display ' +\n      '$coverage_get_max $coverage_merge $get_coverage $load_coverage_db $typename ' +\n      '$unpacked_dimensions $left $low $increment $clog2 $ln $log10 $exp $sqrt $pow ' +\n      '$floor $ceil $sin $cos $tan $countbits $onehot $isunknown $fatal $warning ' +\n      '$dimensions $right $high $size $asin $acos $atan $atan2 $hypot $sinh $cosh ' +\n      '$tanh $asinh $acosh $atanh $countones $onehot0 $error $info $random ' +\n      '$dist_chi_square $dist_erlang $dist_exponential $dist_normal $dist_poisson ' +\n      '$dist_t $dist_uniform $q_initialize $q_remove $q_exam $async$and$array ' +\n      '$async$nand$array $async$or$array $async$nor$array $sync$and$array ' +\n      '$sync$nand$array $sync$or$array $sync$nor$array $q_add $q_full $psprintf ' +\n      '$async$and$plane $async$nand$plane $async$or$plane $async$nor$plane ' +\n      '$sync$and$plane $sync$nand$plane $sync$or$plane $sync$nor$plane $system ' +\n      '$display $displayb $displayh $displayo $strobe $strobeb $strobeh $strobeo ' +\n      '$write $readmemb $readmemh $writememh $value$plusargs ' +\n      '$dumpvars $dumpon $dumplimit $dumpports $dumpportson $dumpportslimit ' +\n      '$writeb $writeh $writeo $monitor $monitorb $monitorh $monitoro $writememb ' +\n      '$dumpfile $dumpoff $dumpall $dumpflush $dumpportsoff $dumpportsall ' +\n      '$dumpportsflush $fclose $fdisplay $fdisplayb $fdisplayh $fdisplayo ' +\n      '$fstrobe $fstrobeb $fstrobeh $fstrobeo $swrite $swriteb $swriteh ' +\n      '$swriteo $fscanf $fread $fseek $fflush $feof $fopen $fwrite $fwriteb ' +\n      '$fwriteh $fwriteo $fmonitor $fmonitorb $fmonitorh $fmonitoro $sformat ' +\n      '$sformatf $fgetc $ungetc $fgets $sscanf $rewind $ftell $ferror'\n    };\n  return {\n    aliases: ['v', 'sv', 'svh'],\n    case_insensitive: false,\n    keywords: SV_KEYWORDS, lexemes: /[\\w\\$]+/,\n    contains: [\n      hljs.C_BLOCK_COMMENT_MODE,\n      hljs.C_LINE_COMMENT_MODE,\n      hljs.QUOTE_STRING_MODE,\n      {\n        className: 'number',\n        contains: [hljs.BACKSLASH_ESCAPE],\n        variants: [\n          {begin: '\\\\b((\\\\d+\\'(b|h|o|d|B|H|O|D))[0-9xzXZa-fA-F_]+)'},\n          {begin: '\\\\B((\\'(b|h|o|d|B|H|O|D))[0-9xzXZa-fA-F_]+)'},\n          {begin: '\\\\b([0-9_])+', relevance: 0}\n        ]\n      },\n      /* parameters to instances */\n      {\n        className: 'variable',\n        variants: [\n          {begin: '#\\\\((?!parameter).+\\\\)'},\n          {begin: '\\\\.\\\\w+', relevance: 0},\n        ]\n      },\n      {\n        className: 'meta',\n        begin: '`', end: '$',\n        keywords: {'meta-keyword': 'define __FILE__ ' +\n          '__LINE__ begin_keywords celldefine default_nettype define ' +\n          'else elsif end_keywords endcelldefine endif ifdef ifndef ' +\n          'include line nounconnected_drive pragma resetall timescale ' +\n          'unconnected_drive undef undefineall'},\n        relevance: 0\n      }\n    ]\n  }; // return\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/languages/vhdl.js",
    "content": "/*\nLanguage: VHDL\nAuthor: Igor Kalnitsky <igor@kalnitsky.org>\nContributors: Daniel C.K. Kho <daniel.kho@tauhop.com>, Guillaume Savaton <guillaume.savaton@eseo.fr>\nDescription: VHDL is a hardware description language used in electronic design automation to describe digital and mixed-signal systems.\n*/\n\nfunction(hljs) {\n  // Regular expression for VHDL numeric literals.\n\n  // Decimal literal:\n  var INTEGER_RE = '\\\\d(_|\\\\d)*';\n  var EXPONENT_RE = '[eE][-+]?' + INTEGER_RE;\n  var DECIMAL_LITERAL_RE = INTEGER_RE + '(\\\\.' + INTEGER_RE + ')?' + '(' + EXPONENT_RE + ')?';\n  // Based literal:\n  var BASED_INTEGER_RE = '\\\\w+';\n  var BASED_LITERAL_RE = INTEGER_RE + '#' + BASED_INTEGER_RE + '(\\\\.' + BASED_INTEGER_RE + ')?' + '#' + '(' + EXPONENT_RE + ')?';\n\n  var NUMBER_RE = '\\\\b(' + BASED_LITERAL_RE + '|' + DECIMAL_LITERAL_RE + ')';\n\n  return {\n    case_insensitive: true,\n    keywords: {\n      keyword:\n        'abs access after alias all and architecture array assert assume assume_guarantee attribute ' +\n        'begin block body buffer bus case component configuration constant context cover disconnect ' +\n        'downto default else elsif end entity exit fairness file for force function generate ' +\n        'generic group guarded if impure in inertial inout is label library linkage literal ' +\n        'loop map mod nand new next nor not null of on open or others out package port ' +\n        'postponed procedure process property protected pure range record register reject ' +\n        'release rem report restrict restrict_guarantee return rol ror select sequence ' +\n        'severity shared signal sla sll sra srl strong subtype then to transport type ' +\n        'unaffected units until use variable vmode vprop vunit wait when while with xnor xor',\n      built_in:\n        'boolean bit character ' +\n        'integer time delay_length natural positive ' +\n        'string bit_vector file_open_kind file_open_status ' +\n        'std_logic std_logic_vector unsigned signed boolean_vector integer_vector ' +\n        'std_ulogic std_ulogic_vector unresolved_unsigned u_unsigned unresolved_signed u_signed' +\n        'real_vector time_vector',\n      literal:\n        'false true note warning error failure ' +  // severity_level\n        'line text side width'                      // textio\n    },\n    illegal: '{',\n    contains: [\n      hljs.C_BLOCK_COMMENT_MODE,      // VHDL-2008 block commenting.\n      hljs.COMMENT('--', '$'),\n      hljs.QUOTE_STRING_MODE,\n      {\n        className: 'number',\n        begin: NUMBER_RE,\n        relevance: 0\n      },\n      {\n        className: 'string',\n        begin: '\\'(U|X|0|1|Z|W|L|H|-)\\'',\n        contains: [hljs.BACKSLASH_ESCAPE]\n      },\n      {\n        className: 'symbol',\n        begin: '\\'[A-Za-z](_?[A-Za-z0-9])*',\n        contains: [hljs.BACKSLASH_ESCAPE]\n      }\n    ]\n  };\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/languages/vim.js",
    "content": "/*\nLanguage: Vim Script\nAuthor: Jun Yang <yangjvn@126.com>\nDescription: full keyword and built-in from http://vimdoc.sourceforge.net/htmldoc/\nCategory: scripting\n*/\n\nfunction(hljs) {\n  return {\n    lexemes: /[!#@\\w]+/,\n    keywords: {\n      keyword:\n        // express version except: ! & * < = > !! # @ @@\n        'N|0 P|0 X|0 a|0 ab abc abo al am an|0 ar arga argd arge argdo argg argl argu as au aug aun b|0 bN ba bad bd be bel bf bl bm bn bo bp br brea breaka breakd breakl bro bufdo buffers bun bw c|0 cN cNf ca cabc caddb cad caddf cal cat cb cc ccl cd ce cex cf cfir cgetb cgete cg changes chd che checkt cl cla clo cm cmapc cme cn cnew cnf cno cnorea cnoreme co col colo com comc comp con conf cope '+\n        'cp cpf cq cr cs cst cu cuna cunme cw delm deb debugg delc delf dif diffg diffo diffp diffpu diffs diffthis dig di dl dell dj dli do doautoa dp dr ds dsp e|0 ea ec echoe echoh echom echon el elsei em en endfo endf endt endw ene ex exe exi exu f|0 files filet fin fina fini fir fix fo foldc foldd folddoc foldo for fu go gr grepa gu gv ha helpf helpg helpt hi hid his ia iabc if ij il im imapc '+\n        'ime ino inorea inoreme int is isp iu iuna iunme j|0 ju k|0 keepa kee keepj lN lNf l|0 lad laddb laddf la lan lat lb lc lch lcl lcs le lefta let lex lf lfir lgetb lgete lg lgr lgrepa lh ll lla lli lmak lm lmapc lne lnew lnf ln loadk lo loc lockv lol lope lp lpf lr ls lt lu lua luad luaf lv lvimgrepa lw m|0 ma mak map mapc marks mat me menut mes mk mks mksp mkv mkvie mod mz mzf nbc nb nbs new nm nmapc nme nn nnoreme noa no noh norea noreme norm nu nun nunme ol o|0 om omapc ome on ono onoreme opt ou ounme ow p|0 '+\n        'profd prof pro promptr pc ped pe perld po popu pp pre prev ps pt ptN ptf ptj ptl ptn ptp ptr pts pu pw py3 python3 py3d py3f py pyd pyf quita qa rec red redi redr redraws reg res ret retu rew ri rightb rub rubyd rubyf rund ru rv sN san sa sal sav sb sbN sba sbf sbl sbm sbn sbp sbr scrip scripte scs se setf setg setl sf sfir sh sim sig sil sl sla sm smap smapc sme sn sni sno snor snoreme sor '+\n        'so spelld spe spelli spellr spellu spellw sp spr sre st sta startg startr star stopi stj sts sun sunm sunme sus sv sw sy synti sync tN tabN tabc tabdo tabe tabf tabfir tabl tabm tabnew '+\n        'tabn tabo tabp tabr tabs tab ta tags tc tcld tclf te tf th tj tl tm tn to tp tr try ts tu u|0 undoj undol una unh unl unlo unm unme uns up ve verb vert vim vimgrepa vi viu vie vm vmapc vme vne vn vnoreme vs vu vunme windo w|0 wN wa wh wi winc winp wn wp wq wqa ws wu wv x|0 xa xmapc xm xme xn xnoreme xu xunme y|0 z|0 ~ '+\n        // full version\n        'Next Print append abbreviate abclear aboveleft all amenu anoremenu args argadd argdelete argedit argglobal arglocal argument ascii autocmd augroup aunmenu buffer bNext ball badd bdelete behave belowright bfirst blast bmodified bnext botright bprevious brewind break breakadd breakdel breaklist browse bunload '+\n        'bwipeout change cNext cNfile cabbrev cabclear caddbuffer caddexpr caddfile call catch cbuffer cclose center cexpr cfile cfirst cgetbuffer cgetexpr cgetfile chdir checkpath checktime clist clast close cmap cmapclear cmenu cnext cnewer cnfile cnoremap cnoreabbrev cnoremenu copy colder colorscheme command comclear compiler continue confirm copen cprevious cpfile cquit crewind cscope cstag cunmap '+\n        'cunabbrev cunmenu cwindow delete delmarks debug debuggreedy delcommand delfunction diffupdate diffget diffoff diffpatch diffput diffsplit digraphs display deletel djump dlist doautocmd doautoall deletep drop dsearch dsplit edit earlier echo echoerr echohl echomsg else elseif emenu endif endfor '+\n        'endfunction endtry endwhile enew execute exit exusage file filetype find finally finish first fixdel fold foldclose folddoopen folddoclosed foldopen function global goto grep grepadd gui gvim hardcopy help helpfind helpgrep helptags highlight hide history insert iabbrev iabclear ijump ilist imap '+\n        'imapclear imenu inoremap inoreabbrev inoremenu intro isearch isplit iunmap iunabbrev iunmenu join jumps keepalt keepmarks keepjumps lNext lNfile list laddexpr laddbuffer laddfile last language later lbuffer lcd lchdir lclose lcscope left leftabove lexpr lfile lfirst lgetbuffer lgetexpr lgetfile lgrep lgrepadd lhelpgrep llast llist lmake lmap lmapclear lnext lnewer lnfile lnoremap loadkeymap loadview '+\n        'lockmarks lockvar lolder lopen lprevious lpfile lrewind ltag lunmap luado luafile lvimgrep lvimgrepadd lwindow move mark make mapclear match menu menutranslate messages mkexrc mksession mkspell mkvimrc mkview mode mzscheme mzfile nbclose nbkey nbsart next nmap nmapclear nmenu nnoremap '+\n        'nnoremenu noautocmd noremap nohlsearch noreabbrev noremenu normal number nunmap nunmenu oldfiles open omap omapclear omenu only onoremap onoremenu options ounmap ounmenu ownsyntax print profdel profile promptfind promptrepl pclose pedit perl perldo pop popup ppop preserve previous psearch ptag ptNext '+\n        'ptfirst ptjump ptlast ptnext ptprevious ptrewind ptselect put pwd py3do py3file python pydo pyfile quit quitall qall read recover redo redir redraw redrawstatus registers resize retab return rewind right rightbelow ruby rubydo rubyfile rundo runtime rviminfo substitute sNext sandbox sargument sall saveas sbuffer sbNext sball sbfirst sblast sbmodified sbnext sbprevious sbrewind scriptnames scriptencoding '+\n        'scscope set setfiletype setglobal setlocal sfind sfirst shell simalt sign silent sleep slast smagic smapclear smenu snext sniff snomagic snoremap snoremenu sort source spelldump spellgood spellinfo spellrepall spellundo spellwrong split sprevious srewind stop stag startgreplace startreplace '+\n        'startinsert stopinsert stjump stselect sunhide sunmap sunmenu suspend sview swapname syntax syntime syncbind tNext tabNext tabclose tabedit tabfind tabfirst tablast tabmove tabnext tabonly tabprevious tabrewind tag tcl tcldo tclfile tearoff tfirst throw tjump tlast tmenu tnext topleft tprevious '+'trewind tselect tunmenu undo undojoin undolist unabbreviate unhide unlet unlockvar unmap unmenu unsilent update vglobal version verbose vertical vimgrep vimgrepadd visual viusage view vmap vmapclear vmenu vnew '+\n        'vnoremap vnoremenu vsplit vunmap vunmenu write wNext wall while winsize wincmd winpos wnext wprevious wqall wsverb wundo wviminfo xit xall xmapclear xmap xmenu xnoremap xnoremenu xunmap xunmenu yank',\n      built_in: //built in func\n        'synIDtrans atan2 range matcharg did_filetype asin feedkeys xor argv ' +\n        'complete_check add getwinposx getqflist getwinposy screencol ' +\n        'clearmatches empty extend getcmdpos mzeval garbagecollect setreg ' +\n        'ceil sqrt diff_hlID inputsecret get getfperm getpid filewritable ' +\n        'shiftwidth max sinh isdirectory synID system inputrestore winline ' +\n        'atan visualmode inputlist tabpagewinnr round getregtype mapcheck ' +\n        'hasmapto histdel argidx findfile sha256 exists toupper getcmdline ' +\n        'taglist string getmatches bufnr strftime winwidth bufexists ' +\n        'strtrans tabpagebuflist setcmdpos remote_read printf setloclist ' +\n        'getpos getline bufwinnr float2nr len getcmdtype diff_filler luaeval ' +\n        'resolve libcallnr foldclosedend reverse filter has_key bufname ' +\n        'str2float strlen setline getcharmod setbufvar index searchpos ' +\n        'shellescape undofile foldclosed setqflist buflisted strchars str2nr ' +\n        'virtcol floor remove undotree remote_expr winheight gettabwinvar ' +\n        'reltime cursor tabpagenr finddir localtime acos getloclist search ' +\n        'tanh matchend rename gettabvar strdisplaywidth type abs py3eval ' +\n        'setwinvar tolower wildmenumode log10 spellsuggest bufloaded ' +\n        'synconcealed nextnonblank server2client complete settabwinvar ' +\n        'executable input wincol setmatches getftype hlID inputsave ' +\n        'searchpair or screenrow line settabvar histadd deepcopy strpart ' +\n        'remote_peek and eval getftime submatch screenchar winsaveview ' +\n        'matchadd mkdir screenattr getfontname libcall reltimestr getfsize ' +\n        'winnr invert pow getbufline byte2line soundfold repeat fnameescape ' +\n        'tagfiles sin strwidth spellbadword trunc maparg log lispindent ' +\n        'hostname setpos globpath remote_foreground getchar synIDattr ' +\n        'fnamemodify cscope_connection stridx winbufnr indent min ' +\n        'complete_add nr2char searchpairpos inputdialog values matchlist ' +\n        'items hlexists strridx browsedir expand fmod pathshorten line2byte ' +\n        'argc count getwinvar glob foldtextresult getreg foreground cosh ' +\n        'matchdelete has char2nr simplify histget searchdecl iconv ' +\n        'winrestcmd pumvisible writefile foldlevel haslocaldir keys cos ' +\n        'matchstr foldtext histnr tan tempname getcwd byteidx getbufvar ' +\n        'islocked escape eventhandler remote_send serverlist winrestview ' +\n        'synstack pyeval prevnonblank readfile cindent filereadable changenr ' +\n        'exp'\n    },\n    illegal: /;/,\n    contains: [\n      hljs.NUMBER_MODE,\n      hljs.APOS_STRING_MODE,\n\n      /*\n      A double quote can start either a string or a line comment. Strings are\n      ended before the end of a line by another double quote and can contain\n      escaped double-quotes and post-escaped line breaks.\n\n      Also, any double quote at the beginning of a line is a comment but we\n      don't handle that properly at the moment: any double quote inside will\n      turn them into a string. Handling it properly will require a smarter\n      parser.\n      */\n      {\n        className: 'string',\n        begin: /\"(\\\\\"|\\n\\\\|[^\"\\n])*\"/\n      },\n      hljs.COMMENT('\"', '$'),\n\n      {\n        className: 'variable',\n        begin: /[bwtglsav]:[\\w\\d_]*/\n      },\n      {\n        className: 'function',\n        beginKeywords: 'function function!', end: '$',\n        relevance: 0,\n        contains: [\n          hljs.TITLE_MODE,\n          {\n            className: 'params',\n            begin: '\\\\(', end: '\\\\)'\n          }\n        ]\n      },\n      {\n        className: 'symbol',\n        begin: /<[\\w-]+>/\n      }\n    ]\n  };\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/languages/x86asm.js",
    "content": "/*\nLanguage: Intel x86 Assembly\nAuthor: innocenat <innocenat@gmail.com>\nDescription: x86 assembly language using Intel's mnemonic and NASM syntax\nCategory: assembler\n*/\n\nfunction(hljs) {\n  return {\n    case_insensitive: true,\n    lexemes: '[.%]?' + hljs.IDENT_RE,\n    keywords: {\n      keyword:\n        'lock rep repe repz repne repnz xaquire xrelease bnd nobnd ' +\n        'aaa aad aam aas adc add and arpl bb0_reset bb1_reset bound bsf bsr bswap bt btc btr bts call cbw cdq cdqe clc cld cli clts cmc cmp cmpsb cmpsd cmpsq cmpsw cmpxchg cmpxchg486 cmpxchg8b cmpxchg16b cpuid cpu_read cpu_write cqo cwd cwde daa das dec div dmint emms enter equ f2xm1 fabs fadd faddp fbld fbstp fchs fclex fcmovb fcmovbe fcmove fcmovnb fcmovnbe fcmovne fcmovnu fcmovu fcom fcomi fcomip fcomp fcompp fcos fdecstp fdisi fdiv fdivp fdivr fdivrp femms feni ffree ffreep fiadd ficom ficomp fidiv fidivr fild fimul fincstp finit fist fistp fisttp fisub fisubr fld fld1 fldcw fldenv fldl2e fldl2t fldlg2 fldln2 fldpi fldz fmul fmulp fnclex fndisi fneni fninit fnop fnsave fnstcw fnstenv fnstsw fpatan fprem fprem1 fptan frndint frstor fsave fscale fsetpm fsin fsincos fsqrt fst fstcw fstenv fstp fstsw fsub fsubp fsubr fsubrp ftst fucom fucomi fucomip fucomp fucompp fxam fxch fxtract fyl2x fyl2xp1 hlt ibts icebp idiv imul in inc incbin insb insd insw int int01 int1 int03 int3 into invd invpcid invlpg invlpga iret iretd iretq iretw jcxz jecxz jrcxz jmp jmpe lahf lar lds lea leave les lfence lfs lgdt lgs lidt lldt lmsw loadall loadall286 lodsb lodsd lodsq lodsw loop loope loopne loopnz loopz lsl lss ltr mfence monitor mov movd movq movsb movsd movsq movsw movsx movsxd movzx mul mwait neg nop not or out outsb outsd outsw packssdw packsswb packuswb paddb paddd paddsb paddsiw paddsw paddusb paddusw paddw pand pandn pause paveb pavgusb pcmpeqb pcmpeqd pcmpeqw pcmpgtb pcmpgtd pcmpgtw pdistib pf2id pfacc pfadd pfcmpeq pfcmpge pfcmpgt pfmax pfmin pfmul pfrcp pfrcpit1 pfrcpit2 pfrsqit1 pfrsqrt pfsub pfsubr pi2fd pmachriw pmaddwd pmagw pmulhriw pmulhrwa pmulhrwc pmulhw pmullw pmvgezb pmvlzb pmvnzb pmvzb pop popa popad popaw popf popfd popfq popfw por prefetch prefetchw pslld psllq psllw psrad psraw psrld psrlq psrlw psubb psubd psubsb psubsiw psubsw psubusb psubusw psubw punpckhbw punpckhdq punpckhwd punpcklbw punpckldq punpcklwd push pusha pushad pushaw pushf pushfd pushfq pushfw pxor rcl rcr rdshr rdmsr rdpmc rdtsc rdtscp ret retf retn rol ror rdm rsdc rsldt rsm rsts sahf sal salc sar sbb scasb scasd scasq scasw sfence sgdt shl shld shr shrd sidt sldt skinit smi smint smintold smsw stc std sti stosb stosd stosq stosw str sub svdc svldt svts swapgs syscall sysenter sysexit sysret test ud0 ud1 ud2b ud2 ud2a umov verr verw fwait wbinvd wrshr wrmsr xadd xbts xchg xlatb xlat xor cmove cmovz cmovne cmovnz cmova cmovnbe cmovae cmovnb cmovb cmovnae cmovbe cmovna cmovg cmovnle cmovge cmovnl cmovl cmovnge cmovle cmovng cmovc cmovnc cmovo cmovno cmovs cmovns cmovp cmovpe cmovnp cmovpo je jz jne jnz ja jnbe jae jnb jb jnae jbe jna jg jnle jge jnl jl jnge jle jng jc jnc jo jno js jns jpo jnp jpe jp sete setz setne setnz seta setnbe setae setnb setnc setb setnae setcset setbe setna setg setnle setge setnl setl setnge setle setng sets setns seto setno setpe setp setpo setnp addps addss andnps andps cmpeqps cmpeqss cmpleps cmpless cmpltps cmpltss cmpneqps cmpneqss cmpnleps cmpnless cmpnltps cmpnltss cmpordps cmpordss cmpunordps cmpunordss cmpps cmpss comiss cvtpi2ps cvtps2pi cvtsi2ss cvtss2si cvttps2pi cvttss2si divps divss ldmxcsr maxps maxss minps minss movaps movhps movlhps movlps movhlps movmskps movntps movss movups mulps mulss orps rcpps rcpss rsqrtps rsqrtss shufps sqrtps sqrtss stmxcsr subps subss ucomiss unpckhps unpcklps xorps fxrstor fxrstor64 fxsave fxsave64 xgetbv xsetbv xsave xsave64 xsaveopt xsaveopt64 xrstor xrstor64 prefetchnta prefetcht0 prefetcht1 prefetcht2 maskmovq movntq pavgb pavgw pextrw pinsrw pmaxsw pmaxub pminsw pminub pmovmskb pmulhuw psadbw pshufw pf2iw pfnacc pfpnacc pi2fw pswapd maskmovdqu clflush movntdq movnti movntpd movdqa movdqu movdq2q movq2dq paddq pmuludq pshufd pshufhw pshuflw pslldq psrldq psubq punpckhqdq punpcklqdq addpd addsd andnpd andpd cmpeqpd cmpeqsd cmplepd cmplesd cmpltpd cmpltsd cmpneqpd cmpneqsd cmpnlepd cmpnlesd cmpnltpd cmpnltsd cmpordpd cmpordsd cmpunordpd cmpunordsd cmppd comisd cvtdq2pd cvtdq2ps cvtpd2dq cvtpd2pi cvtpd2ps cvtpi2pd cvtps2dq cvtps2pd cvtsd2si cvtsd2ss cvtsi2sd cvtss2sd cvttpd2pi cvttpd2dq cvttps2dq cvttsd2si divpd divsd maxpd maxsd minpd minsd movapd movhpd movlpd movmskpd movupd mulpd mulsd orpd shufpd sqrtpd sqrtsd subpd subsd ucomisd unpckhpd unpcklpd xorpd addsubpd addsubps haddpd haddps hsubpd hsubps lddqu movddup movshdup movsldup clgi stgi vmcall vmclear vmfunc vmlaunch vmload vmmcall vmptrld vmptrst vmread vmresume vmrun vmsave vmwrite vmxoff vmxon invept invvpid pabsb pabsw pabsd palignr phaddw phaddd phaddsw phsubw phsubd phsubsw pmaddubsw pmulhrsw pshufb psignb psignw psignd extrq insertq movntsd movntss lzcnt blendpd blendps blendvpd blendvps dppd dpps extractps insertps movntdqa mpsadbw packusdw pblendvb pblendw pcmpeqq pextrb pextrd pextrq phminposuw pinsrb pinsrd pinsrq pmaxsb pmaxsd pmaxud pmaxuw pminsb pminsd pminud pminuw pmovsxbw pmovsxbd pmovsxbq pmovsxwd pmovsxwq pmovsxdq pmovzxbw pmovzxbd pmovzxbq pmovzxwd pmovzxwq pmovzxdq pmuldq pmulld ptest roundpd roundps roundsd roundss crc32 pcmpestri pcmpestrm pcmpistri pcmpistrm pcmpgtq popcnt getsec pfrcpv pfrsqrtv movbe aesenc aesenclast aesdec aesdeclast aesimc aeskeygenassist vaesenc vaesenclast vaesdec vaesdeclast vaesimc vaeskeygenassist vaddpd vaddps vaddsd vaddss vaddsubpd vaddsubps vandpd vandps vandnpd vandnps vblendpd vblendps vblendvpd vblendvps vbroadcastss vbroadcastsd vbroadcastf128 vcmpeq_ospd vcmpeqpd vcmplt_ospd vcmpltpd vcmple_ospd vcmplepd vcmpunord_qpd vcmpunordpd vcmpneq_uqpd vcmpneqpd vcmpnlt_uspd vcmpnltpd vcmpnle_uspd vcmpnlepd vcmpord_qpd vcmpordpd vcmpeq_uqpd vcmpnge_uspd vcmpngepd vcmpngt_uspd vcmpngtpd vcmpfalse_oqpd vcmpfalsepd vcmpneq_oqpd vcmpge_ospd vcmpgepd vcmpgt_ospd vcmpgtpd vcmptrue_uqpd vcmptruepd vcmplt_oqpd vcmple_oqpd vcmpunord_spd vcmpneq_uspd vcmpnlt_uqpd vcmpnle_uqpd vcmpord_spd vcmpeq_uspd vcmpnge_uqpd vcmpngt_uqpd vcmpfalse_ospd vcmpneq_ospd vcmpge_oqpd vcmpgt_oqpd vcmptrue_uspd vcmppd vcmpeq_osps vcmpeqps vcmplt_osps vcmpltps vcmple_osps vcmpleps vcmpunord_qps vcmpunordps vcmpneq_uqps vcmpneqps vcmpnlt_usps vcmpnltps vcmpnle_usps vcmpnleps vcmpord_qps vcmpordps vcmpeq_uqps vcmpnge_usps vcmpngeps vcmpngt_usps vcmpngtps vcmpfalse_oqps vcmpfalseps vcmpneq_oqps vcmpge_osps vcmpgeps vcmpgt_osps vcmpgtps vcmptrue_uqps vcmptrueps vcmplt_oqps vcmple_oqps vcmpunord_sps vcmpneq_usps vcmpnlt_uqps vcmpnle_uqps vcmpord_sps vcmpeq_usps vcmpnge_uqps vcmpngt_uqps vcmpfalse_osps vcmpneq_osps vcmpge_oqps vcmpgt_oqps vcmptrue_usps vcmpps vcmpeq_ossd vcmpeqsd vcmplt_ossd vcmpltsd vcmple_ossd vcmplesd vcmpunord_qsd vcmpunordsd vcmpneq_uqsd vcmpneqsd vcmpnlt_ussd vcmpnltsd vcmpnle_ussd vcmpnlesd vcmpord_qsd vcmpordsd vcmpeq_uqsd vcmpnge_ussd vcmpngesd vcmpngt_ussd vcmpngtsd vcmpfalse_oqsd vcmpfalsesd vcmpneq_oqsd vcmpge_ossd vcmpgesd vcmpgt_ossd vcmpgtsd vcmptrue_uqsd vcmptruesd vcmplt_oqsd vcmple_oqsd vcmpunord_ssd vcmpneq_ussd vcmpnlt_uqsd vcmpnle_uqsd vcmpord_ssd vcmpeq_ussd vcmpnge_uqsd vcmpngt_uqsd vcmpfalse_ossd vcmpneq_ossd vcmpge_oqsd vcmpgt_oqsd vcmptrue_ussd vcmpsd vcmpeq_osss vcmpeqss vcmplt_osss vcmpltss vcmple_osss vcmpless vcmpunord_qss vcmpunordss vcmpneq_uqss vcmpneqss vcmpnlt_usss vcmpnltss vcmpnle_usss vcmpnless vcmpord_qss vcmpordss vcmpeq_uqss vcmpnge_usss vcmpngess vcmpngt_usss vcmpngtss vcmpfalse_oqss vcmpfalsess vcmpneq_oqss vcmpge_osss vcmpgess vcmpgt_osss vcmpgtss vcmptrue_uqss vcmptruess vcmplt_oqss vcmple_oqss vcmpunord_sss vcmpneq_usss vcmpnlt_uqss vcmpnle_uqss vcmpord_sss vcmpeq_usss vcmpnge_uqss vcmpngt_uqss vcmpfalse_osss vcmpneq_osss vcmpge_oqss vcmpgt_oqss vcmptrue_usss vcmpss vcomisd vcomiss vcvtdq2pd vcvtdq2ps vcvtpd2dq vcvtpd2ps vcvtps2dq vcvtps2pd vcvtsd2si vcvtsd2ss vcvtsi2sd vcvtsi2ss vcvtss2sd vcvtss2si vcvttpd2dq vcvttps2dq vcvttsd2si vcvttss2si vdivpd vdivps vdivsd vdivss vdppd vdpps vextractf128 vextractps vhaddpd vhaddps vhsubpd vhsubps vinsertf128 vinsertps vlddqu vldqqu vldmxcsr vmaskmovdqu vmaskmovps vmaskmovpd vmaxpd vmaxps vmaxsd vmaxss vminpd vminps vminsd vminss vmovapd vmovaps vmovd vmovq vmovddup vmovdqa vmovqqa vmovdqu vmovqqu vmovhlps vmovhpd vmovhps vmovlhps vmovlpd vmovlps vmovmskpd vmovmskps vmovntdq vmovntqq vmovntdqa vmovntpd vmovntps vmovsd vmovshdup vmovsldup vmovss vmovupd vmovups vmpsadbw vmulpd vmulps vmulsd vmulss vorpd vorps vpabsb vpabsw vpabsd vpacksswb vpackssdw vpackuswb vpackusdw vpaddb vpaddw vpaddd vpaddq vpaddsb vpaddsw vpaddusb vpaddusw vpalignr vpand vpandn vpavgb vpavgw vpblendvb vpblendw vpcmpestri vpcmpestrm vpcmpistri vpcmpistrm vpcmpeqb vpcmpeqw vpcmpeqd vpcmpeqq vpcmpgtb vpcmpgtw vpcmpgtd vpcmpgtq vpermilpd vpermilps vperm2f128 vpextrb vpextrw vpextrd vpextrq vphaddw vphaddd vphaddsw vphminposuw vphsubw vphsubd vphsubsw vpinsrb vpinsrw vpinsrd vpinsrq vpmaddwd vpmaddubsw vpmaxsb vpmaxsw vpmaxsd vpmaxub vpmaxuw vpmaxud vpminsb vpminsw vpminsd vpminub vpminuw vpminud vpmovmskb vpmovsxbw vpmovsxbd vpmovsxbq vpmovsxwd vpmovsxwq vpmovsxdq vpmovzxbw vpmovzxbd vpmovzxbq vpmovzxwd vpmovzxwq vpmovzxdq vpmulhuw vpmulhrsw vpmulhw vpmullw vpmulld vpmuludq vpmuldq vpor vpsadbw vpshufb vpshufd vpshufhw vpshuflw vpsignb vpsignw vpsignd vpslldq vpsrldq vpsllw vpslld vpsllq vpsraw vpsrad vpsrlw vpsrld vpsrlq vptest vpsubb vpsubw vpsubd vpsubq vpsubsb vpsubsw vpsubusb vpsubusw vpunpckhbw vpunpckhwd vpunpckhdq vpunpckhqdq vpunpcklbw vpunpcklwd vpunpckldq vpunpcklqdq vpxor vrcpps vrcpss vrsqrtps vrsqrtss vroundpd vroundps vroundsd vroundss vshufpd vshufps vsqrtpd vsqrtps vsqrtsd vsqrtss vstmxcsr vsubpd vsubps vsubsd vsubss vtestps vtestpd vucomisd vucomiss vunpckhpd vunpckhps vunpcklpd vunpcklps vxorpd vxorps vzeroall vzeroupper pclmullqlqdq pclmulhqlqdq pclmullqhqdq pclmulhqhqdq pclmulqdq vpclmullqlqdq vpclmulhqlqdq vpclmullqhqdq vpclmulhqhqdq vpclmulqdq vfmadd132ps vfmadd132pd vfmadd312ps vfmadd312pd vfmadd213ps vfmadd213pd vfmadd123ps vfmadd123pd vfmadd231ps vfmadd231pd vfmadd321ps vfmadd321pd vfmaddsub132ps vfmaddsub132pd vfmaddsub312ps vfmaddsub312pd vfmaddsub213ps vfmaddsub213pd vfmaddsub123ps vfmaddsub123pd vfmaddsub231ps vfmaddsub231pd vfmaddsub321ps vfmaddsub321pd vfmsub132ps vfmsub132pd vfmsub312ps vfmsub312pd vfmsub213ps vfmsub213pd vfmsub123ps vfmsub123pd vfmsub231ps vfmsub231pd vfmsub321ps vfmsub321pd vfmsubadd132ps vfmsubadd132pd vfmsubadd312ps vfmsubadd312pd vfmsubadd213ps vfmsubadd213pd vfmsubadd123ps vfmsubadd123pd vfmsubadd231ps vfmsubadd231pd vfmsubadd321ps vfmsubadd321pd vfnmadd132ps vfnmadd132pd vfnmadd312ps vfnmadd312pd vfnmadd213ps vfnmadd213pd vfnmadd123ps vfnmadd123pd vfnmadd231ps vfnmadd231pd vfnmadd321ps vfnmadd321pd vfnmsub132ps vfnmsub132pd vfnmsub312ps vfnmsub312pd vfnmsub213ps vfnmsub213pd vfnmsub123ps vfnmsub123pd vfnmsub231ps vfnmsub231pd vfnmsub321ps vfnmsub321pd vfmadd132ss vfmadd132sd vfmadd312ss vfmadd312sd vfmadd213ss vfmadd213sd vfmadd123ss vfmadd123sd vfmadd231ss vfmadd231sd vfmadd321ss vfmadd321sd vfmsub132ss vfmsub132sd vfmsub312ss vfmsub312sd vfmsub213ss vfmsub213sd vfmsub123ss vfmsub123sd vfmsub231ss vfmsub231sd vfmsub321ss vfmsub321sd vfnmadd132ss vfnmadd132sd vfnmadd312ss vfnmadd312sd vfnmadd213ss vfnmadd213sd vfnmadd123ss vfnmadd123sd vfnmadd231ss vfnmadd231sd vfnmadd321ss vfnmadd321sd vfnmsub132ss vfnmsub132sd vfnmsub312ss vfnmsub312sd vfnmsub213ss vfnmsub213sd vfnmsub123ss vfnmsub123sd vfnmsub231ss vfnmsub231sd vfnmsub321ss vfnmsub321sd rdfsbase rdgsbase rdrand wrfsbase wrgsbase vcvtph2ps vcvtps2ph adcx adox rdseed clac stac xstore xcryptecb xcryptcbc xcryptctr xcryptcfb xcryptofb montmul xsha1 xsha256 llwpcb slwpcb lwpval lwpins vfmaddpd vfmaddps vfmaddsd vfmaddss vfmaddsubpd vfmaddsubps vfmsubaddpd vfmsubaddps vfmsubpd vfmsubps vfmsubsd vfmsubss vfnmaddpd vfnmaddps vfnmaddsd vfnmaddss vfnmsubpd vfnmsubps vfnmsubsd vfnmsubss vfrczpd vfrczps vfrczsd vfrczss vpcmov vpcomb vpcomd vpcomq vpcomub vpcomud vpcomuq vpcomuw vpcomw vphaddbd vphaddbq vphaddbw vphadddq vphaddubd vphaddubq vphaddubw vphaddudq vphadduwd vphadduwq vphaddwd vphaddwq vphsubbw vphsubdq vphsubwd vpmacsdd vpmacsdqh vpmacsdql vpmacssdd vpmacssdqh vpmacssdql vpmacsswd vpmacssww vpmacswd vpmacsww vpmadcsswd vpmadcswd vpperm vprotb vprotd vprotq vprotw vpshab vpshad vpshaq vpshaw vpshlb vpshld vpshlq vpshlw vbroadcasti128 vpblendd vpbroadcastb vpbroadcastw vpbroadcastd vpbroadcastq vpermd vpermpd vpermps vpermq vperm2i128 vextracti128 vinserti128 vpmaskmovd vpmaskmovq vpsllvd vpsllvq vpsravd vpsrlvd vpsrlvq vgatherdpd vgatherqpd vgatherdps vgatherqps vpgatherdd vpgatherqd vpgatherdq vpgatherqq xabort xbegin xend xtest andn bextr blci blcic blsi blsic blcfill blsfill blcmsk blsmsk blsr blcs bzhi mulx pdep pext rorx sarx shlx shrx tzcnt tzmsk t1mskc valignd valignq vblendmpd vblendmps vbroadcastf32x4 vbroadcastf64x4 vbroadcasti32x4 vbroadcasti64x4 vcompresspd vcompressps vcvtpd2udq vcvtps2udq vcvtsd2usi vcvtss2usi vcvttpd2udq vcvttps2udq vcvttsd2usi vcvttss2usi vcvtudq2pd vcvtudq2ps vcvtusi2sd vcvtusi2ss vexpandpd vexpandps vextractf32x4 vextractf64x4 vextracti32x4 vextracti64x4 vfixupimmpd vfixupimmps vfixupimmsd vfixupimmss vgetexppd vgetexpps vgetexpsd vgetexpss vgetmantpd vgetmantps vgetmantsd vgetmantss vinsertf32x4 vinsertf64x4 vinserti32x4 vinserti64x4 vmovdqa32 vmovdqa64 vmovdqu32 vmovdqu64 vpabsq vpandd vpandnd vpandnq vpandq vpblendmd vpblendmq vpcmpltd vpcmpled vpcmpneqd vpcmpnltd vpcmpnled vpcmpd vpcmpltq vpcmpleq vpcmpneqq vpcmpnltq vpcmpnleq vpcmpq vpcmpequd vpcmpltud vpcmpleud vpcmpnequd vpcmpnltud vpcmpnleud vpcmpud vpcmpequq vpcmpltuq vpcmpleuq vpcmpnequq vpcmpnltuq vpcmpnleuq vpcmpuq vpcompressd vpcompressq vpermi2d vpermi2pd vpermi2ps vpermi2q vpermt2d vpermt2pd vpermt2ps vpermt2q vpexpandd vpexpandq vpmaxsq vpmaxuq vpminsq vpminuq vpmovdb vpmovdw vpmovqb vpmovqd vpmovqw vpmovsdb vpmovsdw vpmovsqb vpmovsqd vpmovsqw vpmovusdb vpmovusdw vpmovusqb vpmovusqd vpmovusqw vpord vporq vprold vprolq vprolvd vprolvq vprord vprorq vprorvd vprorvq vpscatterdd vpscatterdq vpscatterqd vpscatterqq vpsraq vpsravq vpternlogd vpternlogq vptestmd vptestmq vptestnmd vptestnmq vpxord vpxorq vrcp14pd vrcp14ps vrcp14sd vrcp14ss vrndscalepd vrndscaleps vrndscalesd vrndscaless vrsqrt14pd vrsqrt14ps vrsqrt14sd vrsqrt14ss vscalefpd vscalefps vscalefsd vscalefss vscatterdpd vscatterdps vscatterqpd vscatterqps vshuff32x4 vshuff64x2 vshufi32x4 vshufi64x2 kandnw kandw kmovw knotw kortestw korw kshiftlw kshiftrw kunpckbw kxnorw kxorw vpbroadcastmb2q vpbroadcastmw2d vpconflictd vpconflictq vplzcntd vplzcntq vexp2pd vexp2ps vrcp28pd vrcp28ps vrcp28sd vrcp28ss vrsqrt28pd vrsqrt28ps vrsqrt28sd vrsqrt28ss vgatherpf0dpd vgatherpf0dps vgatherpf0qpd vgatherpf0qps vgatherpf1dpd vgatherpf1dps vgatherpf1qpd vgatherpf1qps vscatterpf0dpd vscatterpf0dps vscatterpf0qpd vscatterpf0qps vscatterpf1dpd vscatterpf1dps vscatterpf1qpd vscatterpf1qps prefetchwt1 bndmk bndcl bndcu bndcn bndmov bndldx bndstx sha1rnds4 sha1nexte sha1msg1 sha1msg2 sha256rnds2 sha256msg1 sha256msg2 hint_nop0 hint_nop1 hint_nop2 hint_nop3 hint_nop4 hint_nop5 hint_nop6 hint_nop7 hint_nop8 hint_nop9 hint_nop10 hint_nop11 hint_nop12 hint_nop13 hint_nop14 hint_nop15 hint_nop16 hint_nop17 hint_nop18 hint_nop19 hint_nop20 hint_nop21 hint_nop22 hint_nop23 hint_nop24 hint_nop25 hint_nop26 hint_nop27 hint_nop28 hint_nop29 hint_nop30 hint_nop31 hint_nop32 hint_nop33 hint_nop34 hint_nop35 hint_nop36 hint_nop37 hint_nop38 hint_nop39 hint_nop40 hint_nop41 hint_nop42 hint_nop43 hint_nop44 hint_nop45 hint_nop46 hint_nop47 hint_nop48 hint_nop49 hint_nop50 hint_nop51 hint_nop52 hint_nop53 hint_nop54 hint_nop55 hint_nop56 hint_nop57 hint_nop58 hint_nop59 hint_nop60 hint_nop61 hint_nop62 hint_nop63',\n      built_in:\n        // Instruction pointer\n        'ip eip rip ' +\n        // 8-bit registers\n        'al ah bl bh cl ch dl dh sil dil bpl spl r8b r9b r10b r11b r12b r13b r14b r15b ' +\n        // 16-bit registers\n        'ax bx cx dx si di bp sp r8w r9w r10w r11w r12w r13w r14w r15w ' +\n        // 32-bit registers\n        'eax ebx ecx edx esi edi ebp esp eip r8d r9d r10d r11d r12d r13d r14d r15d ' +\n        // 64-bit registers\n        'rax rbx rcx rdx rsi rdi rbp rsp r8 r9 r10 r11 r12 r13 r14 r15 ' +\n        // Segment registers\n        'cs ds es fs gs ss ' +\n        // Floating point stack registers\n        'st st0 st1 st2 st3 st4 st5 st6 st7 ' +\n        // MMX Registers\n        'mm0 mm1 mm2 mm3 mm4 mm5 mm6 mm7 ' +\n        // SSE registers\n        'xmm0  xmm1  xmm2  xmm3  xmm4  xmm5  xmm6  xmm7  xmm8  xmm9 xmm10  xmm11 xmm12 xmm13 xmm14 xmm15 ' +\n        'xmm16 xmm17 xmm18 xmm19 xmm20 xmm21 xmm22 xmm23 xmm24 xmm25 xmm26 xmm27 xmm28 xmm29 xmm30 xmm31 ' +\n        // AVX registers\n        'ymm0  ymm1  ymm2  ymm3  ymm4  ymm5  ymm6  ymm7  ymm8  ymm9 ymm10  ymm11 ymm12 ymm13 ymm14 ymm15 ' +\n        'ymm16 ymm17 ymm18 ymm19 ymm20 ymm21 ymm22 ymm23 ymm24 ymm25 ymm26 ymm27 ymm28 ymm29 ymm30 ymm31 ' +\n        // AVX-512F registers\n        'zmm0  zmm1  zmm2  zmm3  zmm4  zmm5  zmm6  zmm7  zmm8  zmm9 zmm10  zmm11 zmm12 zmm13 zmm14 zmm15 ' +\n        'zmm16 zmm17 zmm18 zmm19 zmm20 zmm21 zmm22 zmm23 zmm24 zmm25 zmm26 zmm27 zmm28 zmm29 zmm30 zmm31 ' +\n        // AVX-512F mask registers\n        'k0 k1 k2 k3 k4 k5 k6 k7 ' +\n        // Bound (MPX) register\n        'bnd0 bnd1 bnd2 bnd3 ' +\n        // Special register\n        'cr0 cr1 cr2 cr3 cr4 cr8 dr0 dr1 dr2 dr3 dr8 tr3 tr4 tr5 tr6 tr7 ' +\n        // NASM altreg package\n        'r0 r1 r2 r3 r4 r5 r6 r7 r0b r1b r2b r3b r4b r5b r6b r7b ' +\n        'r0w r1w r2w r3w r4w r5w r6w r7w r0d r1d r2d r3d r4d r5d r6d r7d ' +\n        'r0h r1h r2h r3h ' +\n        'r0l r1l r2l r3l r4l r5l r6l r7l r8l r9l r10l r11l r12l r13l r14l r15l ' +\n\n        'db dw dd dq dt ddq do dy dz ' +\n        'resb resw resd resq rest resdq reso resy resz ' +\n        'incbin equ times ' +\n        'byte word dword qword nosplit rel abs seg wrt strict near far a32 ptr',\n\n      meta:\n        '%define %xdefine %+ %undef %defstr %deftok %assign %strcat %strlen %substr %rotate %elif %else %endif ' +\n        '%if %ifmacro %ifctx %ifidn %ifidni %ifid %ifnum %ifstr %iftoken %ifempty %ifenv %error %warning %fatal %rep ' +\n        '%endrep %include %push %pop %repl %pathsearch %depend %use %arg %stacksize %local %line %comment %endcomment ' +\n        '.nolist ' +\n        '__FILE__ __LINE__ __SECT__  __BITS__ __OUTPUT_FORMAT__ __DATE__ __TIME__ __DATE_NUM__ __TIME_NUM__ ' +\n        '__UTC_DATE__ __UTC_TIME__ __UTC_DATE_NUM__ __UTC_TIME_NUM__  __PASS__ struc endstruc istruc at iend ' +\n        'align alignb sectalign daz nodaz up down zero default option assume public ' +\n\n        'bits use16 use32 use64 default section segment absolute extern global common cpu float ' +\n        '__utf16__ __utf16le__ __utf16be__ __utf32__ __utf32le__ __utf32be__ ' +\n        '__float8__ __float16__ __float32__ __float64__ __float80m__ __float80e__ __float128l__ __float128h__ ' +\n        '__Infinity__ __QNaN__ __SNaN__ Inf NaN QNaN SNaN float8 float16 float32 float64 float80m float80e ' +\n        'float128l float128h __FLOAT_DAZ__ __FLOAT_ROUND__ __FLOAT__'\n    },\n    contains: [\n      hljs.COMMENT(\n        ';',\n        '$',\n        {\n          relevance: 0\n        }\n      ),\n      {\n        className: 'number',\n        variants: [\n          // Float number and x87 BCD\n          {\n            begin: '\\\\b(?:([0-9][0-9_]*)?\\\\.[0-9_]*(?:[eE][+-]?[0-9_]+)?|' +\n                   '(0[Xx])?[0-9][0-9_]*\\\\.?[0-9_]*(?:[pP](?:[+-]?[0-9_]+)?)?)\\\\b',\n            relevance: 0\n          },\n\n          // Hex number in $\n          { begin: '\\\\$[0-9][0-9A-Fa-f]*', relevance: 0 },\n\n          // Number in H,D,T,Q,O,B,Y suffix\n          { begin: '\\\\b(?:[0-9A-Fa-f][0-9A-Fa-f_]*[Hh]|[0-9][0-9_]*[DdTt]?|[0-7][0-7_]*[QqOo]|[0-1][0-1_]*[BbYy])\\\\b' },\n\n          // Number in X,D,T,Q,O,B,Y prefix\n          { begin: '\\\\b(?:0[Xx][0-9A-Fa-f_]+|0[DdTt][0-9_]+|0[QqOo][0-7_]+|0[BbYy][0-1_]+)\\\\b'}\n        ]\n      },\n      // Double quote string\n      hljs.QUOTE_STRING_MODE,\n      {\n        className: 'string',\n        variants: [\n          // Single-quoted string\n          { begin: '\\'', end: '[^\\\\\\\\]\\'' },\n          // Backquoted string\n          { begin: '`', end: '[^\\\\\\\\]`' }\n        ],\n        relevance: 0\n      },\n      {\n        className: 'symbol',\n        variants: [\n          // Global label and local label\n          { begin: '^\\\\s*[A-Za-z._?][A-Za-z0-9_$#@~.?]*(:|\\\\s+label)' },\n          // Macro-local label\n          { begin: '^\\\\s*%%[A-Za-z0-9_$#@~.?]*:' }\n        ],\n        relevance: 0\n      },\n      // Macro parameter\n      {\n        className: 'subst',\n        begin: '%[0-9]+',\n        relevance: 0\n      },\n      // Macro parameter\n      {\n        className: 'subst',\n        begin: '%!\\S+',\n        relevance: 0\n      },\n      {\n        className: 'meta',\n        begin: /^\\s*\\.[\\w_-]+/\n      }\n    ]\n  };\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/languages/xl.js",
    "content": "/*\nLanguage: XL\nAuthor: Christophe de Dinechin <christophe@taodyne.com>\nDescription: An extensible programming language, based on parse tree rewriting (http://xlr.sf.net)\n*/\n\nfunction(hljs) {\n  var BUILTIN_MODULES =\n    'ObjectLoader Animate MovieCredits Slides Filters Shading Materials LensFlare Mapping VLCAudioVideo ' +\n    'StereoDecoder PointCloud NetworkAccess RemoteControl RegExp ChromaKey Snowfall NodeJS Speech Charts';\n\n  var XL_KEYWORDS = {\n    keyword:\n      'if then else do while until for loop import with is as where when by data constant ' +\n      'integer real text name boolean symbol infix prefix postfix block tree',\n    literal:\n      'true false nil',\n    built_in:\n      'in mod rem and or xor not abs sign floor ceil sqrt sin cos tan asin ' +\n      'acos atan exp expm1 log log2 log10 log1p pi at text_length text_range ' +\n      'text_find text_replace contains page slide basic_slide title_slide ' +\n      'title subtitle fade_in fade_out fade_at clear_color color line_color ' +\n      'line_width texture_wrap texture_transform texture scale_?x scale_?y ' +\n      'scale_?z? translate_?x translate_?y translate_?z? rotate_?x rotate_?y ' +\n      'rotate_?z? rectangle circle ellipse sphere path line_to move_to ' +\n      'quad_to curve_to theme background contents locally time mouse_?x ' +\n      'mouse_?y mouse_buttons ' +\n      BUILTIN_MODULES\n  };\n\n  var DOUBLE_QUOTE_TEXT = {\n    className: 'string',\n    begin: '\"', end: '\"', illegal: '\\\\n'\n  };\n  var SINGLE_QUOTE_TEXT = {\n    className: 'string',\n    begin: '\\'', end: '\\'', illegal: '\\\\n'\n  };\n  var LONG_TEXT = {\n    className: 'string',\n    begin: '<<', end: '>>'\n  };\n  var BASED_NUMBER = {\n    className: 'number',\n    begin: '[0-9]+#[0-9A-Z_]+(\\\\.[0-9-A-Z_]+)?#?([Ee][+-]?[0-9]+)?'\n  };\n  var IMPORT = {\n    beginKeywords: 'import', end: '$',\n    keywords: XL_KEYWORDS,\n    contains: [DOUBLE_QUOTE_TEXT]\n  };\n  var FUNCTION_DEFINITION = {\n    className: 'function',\n    begin: /[a-z][^\\n]*->/, returnBegin: true, end: /->/,\n    contains: [\n      hljs.inherit(hljs.TITLE_MODE, {starts: {\n        endsWithParent: true,\n        keywords: XL_KEYWORDS\n      }})\n    ]\n  };\n  return {\n    aliases: ['tao'],\n    lexemes: /[a-zA-Z][a-zA-Z0-9_?]*/,\n    keywords: XL_KEYWORDS,\n    contains: [\n    hljs.C_LINE_COMMENT_MODE,\n    hljs.C_BLOCK_COMMENT_MODE,\n    DOUBLE_QUOTE_TEXT,\n    SINGLE_QUOTE_TEXT,\n    LONG_TEXT,\n    FUNCTION_DEFINITION,\n    IMPORT,\n    BASED_NUMBER,\n    hljs.NUMBER_MODE\n    ]\n  };\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/languages/xml.js",
    "content": "/*\nLanguage: HTML, XML\nCategory: common\n*/\n\nfunction(hljs) {\n  var XML_IDENT_RE = '[A-Za-z0-9\\\\._:-]+';\n  var TAG_INTERNALS = {\n    endsWithParent: true,\n    illegal: /</,\n    relevance: 0,\n    contains: [\n      {\n        className: 'attr',\n        begin: XML_IDENT_RE,\n        relevance: 0\n      },\n      {\n        begin: /=\\s*/,\n        relevance: 0,\n        contains: [\n          {\n            className: 'string',\n            endsParent: true,\n            variants: [\n              {begin: /\"/, end: /\"/},\n              {begin: /'/, end: /'/},\n              {begin: /[^\\s\"'=<>`]+/}\n            ]\n          }\n        ]\n      }\n    ]\n  };\n  return {\n    aliases: ['html', 'xhtml', 'rss', 'atom', 'xjb', 'xsd', 'xsl', 'plist'],\n    case_insensitive: true,\n    contains: [\n      {\n        className: 'meta',\n        begin: '<!DOCTYPE', end: '>',\n        relevance: 10,\n        contains: [{begin: '\\\\[', end: '\\\\]'}]\n      },\n      hljs.COMMENT(\n        '<!--',\n        '-->',\n        {\n          relevance: 10\n        }\n      ),\n      {\n        begin: '<\\\\!\\\\[CDATA\\\\[', end: '\\\\]\\\\]>',\n        relevance: 10\n      },\n      {\n        begin: /<\\?(php)?/, end: /\\?>/,\n        subLanguage: 'php',\n        contains: [{begin: '/\\\\*', end: '\\\\*/', skip: true}]\n      },\n      {\n        className: 'tag',\n        /*\n        The lookahead pattern (?=...) ensures that 'begin' only matches\n        '<style' as a single word, followed by a whitespace or an\n        ending braket. The '$' is needed for the lexeme to be recognized\n        by hljs.subMode() that tests lexemes outside the stream.\n        */\n        begin: '<style(?=\\\\s|>|$)', end: '>',\n        keywords: {name: 'style'},\n        contains: [TAG_INTERNALS],\n        starts: {\n          end: '</style>', returnEnd: true,\n          subLanguage: ['css', 'xml']\n        }\n      },\n      {\n        className: 'tag',\n        // See the comment in the <style tag about the lookahead pattern\n        begin: '<script(?=\\\\s|>|$)', end: '>',\n        keywords: {name: 'script'},\n        contains: [TAG_INTERNALS],\n        starts: {\n          end: '\\<\\/script\\>', returnEnd: true,\n          subLanguage: ['actionscript', 'javascript', 'handlebars', 'xml']\n        }\n      },\n      {\n        className: 'meta',\n        variants: [\n          {begin: /<\\?xml/, end: /\\?>/, relevance: 10},\n          {begin: /<\\?\\w+/, end: /\\?>/}\n        ]\n      },\n      {\n        className: 'tag',\n        begin: '</?', end: '/?>',\n        contains: [\n          {\n            className: 'name', begin: /[^\\/><\\s]+/, relevance: 0\n          },\n          TAG_INTERNALS\n        ]\n      }\n    ]\n  };\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/languages/xquery.js",
    "content": "/*\nLanguage: XQuery\nAuthor: Dirk Kirsten <dk@basex.org>\nDescription: Supports XQuery 3.1 including XQuery Update 3, so also XPath (as it is a superset)\nCategory: functional\n*/\n\nfunction(hljs) {\n  var KEYWORDS = 'for let if while then else return where group by xquery encoding version' +\n    'module namespace boundary-space preserve strip default collation base-uri ordering' +\n    'copy-namespaces order declare import schema namespace function option in allowing empty' +\n    'at tumbling window sliding window start when only end when previous next stable ascending' +\n    'descending empty greatest least some every satisfies switch case typeswitch try catch and' +\n    'or to union intersect instance of treat as castable cast map array delete insert into' +\n    'replace value rename copy modify update';\n  var LITERAL = 'false true xs:string xs:integer element item xs:date xs:datetime xs:float xs:double xs:decimal QName xs:anyURI xs:long xs:int xs:short xs:byte attribute';\n  var VAR = {\n    begin: /\\$[a-zA-Z0-9\\-]+/\n  };\n\n  var NUMBER = {\n    className: 'number',\n    begin: '(\\\\b0[0-7_]+)|(\\\\b0x[0-9a-fA-F_]+)|(\\\\b[1-9][0-9_]*(\\\\.[0-9_]+)?)|[0_]\\\\b',\n    relevance: 0\n  };\n\n  var STRING = {\n    className: 'string',\n    variants: [\n      {begin: /\"/, end: /\"/, contains: [{begin: /\"\"/, relevance: 0}]},\n      {begin: /'/, end: /'/, contains: [{begin: /''/, relevance: 0}]}\n    ]\n  };\n\n  var ANNOTATION = {\n    className: 'meta',\n    begin: '%\\\\w+'\n  };\n\n  var COMMENT = {\n    className: 'comment',\n    begin: '\\\\(:', end: ':\\\\)',\n    relevance: 10,\n    contains: [\n      {\n        className: 'doctag', begin: '@\\\\w+'\n      }\n    ]\n  };\n\n  var METHOD = {\n    begin: '{', end: '}'\n  };\n\n  var CONTAINS = [\n    VAR,\n    STRING,\n    NUMBER,\n    COMMENT,\n    ANNOTATION,\n    METHOD\n  ];\n  METHOD.contains = CONTAINS;\n\n\n  return {\n    aliases: ['xpath', 'xq'],\n    case_insensitive: false,\n    lexemes: /[a-zA-Z\\$][a-zA-Z0-9_:\\-]*/,\n    illegal: /(proc)|(abstract)|(extends)|(until)|(#)/,\n    keywords: {\n      keyword: KEYWORDS,\n      literal: LITERAL\n    },\n    contains: CONTAINS\n  };\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/languages/yaml.js",
    "content": "/*\nLanguage: YAML\nAuthor: Stefan Wienert <stwienert@gmail.com>\nRequires: ruby.js\nDescription: YAML (Yet Another Markdown Language)\nCategory: config\n*/\nfunction(hljs) {\n  var LITERALS = {literal: '{ } true false yes no Yes No True False null'};\n\n  var keyPrefix = '^[ \\\\-]*';\n  var keyName =  '[a-zA-Z_][\\\\w\\\\-]*';\n  var KEY = {\n    className: 'attr',\n    variants: [\n      { begin: keyPrefix + keyName + \":\"},\n      { begin: keyPrefix + '\"' + keyName + '\"' + \":\"},\n      { begin: keyPrefix + \"'\" + keyName + \"'\" + \":\"}\n    ]\n  };\n\n  var TEMPLATE_VARIABLES = {\n    className: 'template-variable',\n    variants: [\n      { begin: '\\{\\{', end: '\\}\\}' }, // jinja templates Ansible\n      { begin: '%\\{', end: '\\}' } // Ruby i18n\n    ]\n  };\n  var STRING = {\n    className: 'string',\n    relevance: 0,\n    variants: [\n      {begin: /'/, end: /'/},\n      {begin: /\"/, end: /\"/}\n    ],\n    contains: [\n      hljs.BACKSLASH_ESCAPE,\n      TEMPLATE_VARIABLES\n    ]\n  };\n\n  return {\n    case_insensitive: true,\n    aliases: ['yml', 'YAML', 'yaml'],\n    contains: [\n      KEY,\n      {\n        className: 'meta',\n        begin: '^---\\s*$',\n        relevance: 10\n      },\n      { // multi line string\n        className: 'string',\n        begin: '[\\\\|>] *$',\n        returnEnd: true,\n        contains: STRING.contains,\n        // very simple termination: next hash key\n        end: KEY.variants[0].begin\n      },\n      { // Ruby/Rails erb\n        begin: '<%[%=-]?', end: '[%-]?%>',\n        subLanguage: 'ruby',\n        excludeBegin: true,\n        excludeEnd: true,\n        relevance: 0\n      },\n      { // data type\n        className: 'type',\n        begin: '!!' + hljs.UNDERSCORE_IDENT_RE,\n      },\n      { // fragment id &ref\n        className: 'meta',\n        begin: '&' + hljs.UNDERSCORE_IDENT_RE + '$',\n      },\n      { // fragment reference *ref\n        className: 'meta',\n        begin: '\\\\*' + hljs.UNDERSCORE_IDENT_RE + '$'\n      },\n      { // array listing\n        className: 'bullet',\n        begin: '^ *-',\n        relevance: 0\n      },\n      STRING,\n      hljs.HASH_COMMENT_MODE,\n      hljs.C_NUMBER_MODE\n    ],\n    keywords: LITERALS\n  };\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/languages/zephir.js",
    "content": "/*\n Language: Zephir\n Author: Oleg Efimov <efimovov@gmail.com>\n */\n\nfunction(hljs) {\n  var STRING = {\n    className: 'string',\n    contains: [hljs.BACKSLASH_ESCAPE],\n    variants: [\n      {\n        begin: 'b\"', end: '\"'\n      },\n      {\n        begin: 'b\\'', end: '\\''\n      },\n      hljs.inherit(hljs.APOS_STRING_MODE, {illegal: null}),\n      hljs.inherit(hljs.QUOTE_STRING_MODE, {illegal: null})\n    ]\n  };\n  var NUMBER = {variants: [hljs.BINARY_NUMBER_MODE, hljs.C_NUMBER_MODE]};\n  return {\n    aliases: ['zep'],\n    case_insensitive: true,\n    keywords:\n      'and include_once list abstract global private echo interface as static endswitch ' +\n      'array null if endwhile or const for endforeach self var let while isset public ' +\n      'protected exit foreach throw elseif include __FILE__ empty require_once do xor ' +\n      'return parent clone use __CLASS__ __LINE__ else break print eval new ' +\n      'catch __METHOD__ case exception default die require __FUNCTION__ ' +\n      'enddeclare final try switch continue endfor endif declare unset true false ' +\n      'trait goto instanceof insteadof __DIR__ __NAMESPACE__ ' +\n      'yield finally int uint long ulong char uchar double float bool boolean string' +\n      'likely unlikely',\n    contains: [\n      hljs.C_LINE_COMMENT_MODE,\n      hljs.HASH_COMMENT_MODE,\n      hljs.COMMENT(\n        '/\\\\*',\n        '\\\\*/',\n        {\n          contains: [\n            {\n              className: 'doctag',\n              begin: '@[A-Za-z]+'\n            }\n          ]\n        }\n      ),\n      hljs.COMMENT(\n        '__halt_compiler.+?;',\n        false,\n        {\n          endsWithParent: true,\n          keywords: '__halt_compiler',\n          lexemes: hljs.UNDERSCORE_IDENT_RE\n        }\n      ),\n      {\n        className: 'string',\n        begin: '<<<[\\'\"]?\\\\w+[\\'\"]?$', end: '^\\\\w+;',\n        contains: [hljs.BACKSLASH_ESCAPE]\n      },\n      {\n        // swallow composed identifiers to avoid parsing them as keywords\n        begin: /(::|->)+[a-zA-Z_\\x7f-\\xff][a-zA-Z0-9_\\x7f-\\xff]*/\n      },\n      {\n        className: 'function',\n        beginKeywords: 'function', end: /[;{]/, excludeEnd: true,\n        illegal: '\\\\$|\\\\[|%',\n        contains: [\n          hljs.UNDERSCORE_TITLE_MODE,\n          {\n            className: 'params',\n            begin: '\\\\(', end: '\\\\)',\n            contains: [\n              'self',\n              hljs.C_BLOCK_COMMENT_MODE,\n              STRING,\n              NUMBER\n            ]\n          }\n        ]\n      },\n      {\n        className: 'class',\n        beginKeywords: 'class interface', end: '{', excludeEnd: true,\n        illegal: /[:\\(\\$\"]/,\n        contains: [\n          {beginKeywords: 'extends implements'},\n          hljs.UNDERSCORE_TITLE_MODE\n        ]\n      },\n      {\n        beginKeywords: 'namespace', end: ';',\n        illegal: /[\\.']/,\n        contains: [hljs.UNDERSCORE_TITLE_MODE]\n      },\n      {\n        beginKeywords: 'use', end: ';',\n        contains: [hljs.UNDERSCORE_TITLE_MODE]\n      },\n      {\n        begin: '=>' // No markup, just a relevance booster\n      },\n      STRING,\n      NUMBER\n    ]\n  };\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/styles/agate.css",
    "content": "/*!\n * Agate by Taufik Nurrohman <https://github.com/tovic>\n * ----------------------------------------------------\n *\n * #ade5fc\n * #a2fca2\n * #c6b4f0\n * #d36363\n * #fcc28c\n * #fc9b9b\n * #ffa\n * #fff\n * #333\n * #62c8f3\n * #888\n *\n */\n\n.hljs {\n  display: block;\n  overflow-x: auto;\n  padding: 0.5em;\n  background: #333;\n  color: white;\n}\n\n.hljs-name,\n.hljs-strong {\n  font-weight: bold;\n}\n\n.hljs-code,\n.hljs-emphasis {\n  font-style: italic;\n}\n\n.hljs-tag {\n  color: #62c8f3;\n}\n\n.hljs-variable,\n.hljs-template-variable,\n.hljs-selector-id,\n.hljs-selector-class {\n  color: #ade5fc;\n}\n\n.hljs-string,\n.hljs-bullet {\n  color: #a2fca2;\n}\n\n.hljs-type,\n.hljs-title,\n.hljs-section,\n.hljs-attribute,\n.hljs-quote,\n.hljs-built_in,\n.hljs-builtin-name {\n  color: #ffa;\n}\n\n.hljs-number,\n.hljs-symbol,\n.hljs-bullet {\n  color: #d36363;\n}\n\n.hljs-keyword,\n.hljs-selector-tag,\n.hljs-literal {\n  color: #fcc28c;\n}\n\n.hljs-comment,\n.hljs-deletion,\n.hljs-code {\n  color: #888;\n}\n\n.hljs-regexp,\n.hljs-link {\n  color: #c6b4f0;\n}\n\n.hljs-meta {\n  color: #fc9b9b;\n}\n\n.hljs-deletion {\n  background-color: #fc9b9b;\n  color: #333;\n}\n\n.hljs-addition {\n  background-color: #a2fca2;\n  color: #333;\n}\n\n.hljs a {\n  color: inherit;\n}\n\n.hljs a:focus,\n.hljs a:hover {\n  color: inherit;\n  text-decoration: underline;\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/styles/androidstudio.css",
    "content": "/*\nDate: 24 Fev 2015\nAuthor: Pedro Oliveira <kanytu@gmail . com>\n*/\n\n.hljs {\n  color: #a9b7c6;\n  background: #282b2e;\n  display: block;\n  overflow-x: auto;\n  padding: 0.5em;\n}\n\n.hljs-number,\n.hljs-literal,\n.hljs-symbol,\n.hljs-bullet {\n  color: #6897BB;\n}\n\n.hljs-keyword,\n.hljs-selector-tag,\n.hljs-deletion {\n  color: #cc7832;\n}\n\n.hljs-variable,\n.hljs-template-variable,\n.hljs-link {\n  color: #629755;\n}\n\n.hljs-comment,\n.hljs-quote {\n  color: #808080;\n}\n\n.hljs-meta {\n  color: #bbb529;\n}\n\n.hljs-string,\n.hljs-attribute,\n.hljs-addition {\n  color: #6A8759;\n}\n\n.hljs-section,\n.hljs-title,\n.hljs-type {\n  color: #ffc66d;\n}\n\n.hljs-name,\n.hljs-selector-id,\n.hljs-selector-class {\n  color: #e8bf6a;\n}\n\n.hljs-emphasis {\n  font-style: italic;\n}\n\n.hljs-strong {\n  font-weight: bold;\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/styles/arduino-light.css",
    "content": "/*\n\nArduino® Light Theme - Stefania Mellai <s.mellai@arduino.cc>\n\n*/\n\n.hljs {\n  display: block;\n  overflow-x: auto;\n  padding: 0.5em;\n  background: #FFFFFF;\n}\n\n.hljs,\n.hljs-subst {\n  color: #434f54;\n}\n\n.hljs-keyword,\n.hljs-attribute,\n.hljs-selector-tag,\n.hljs-doctag,\n.hljs-name {\n  color: #00979D;\n}\n\n.hljs-built_in,\n.hljs-literal,\n.hljs-bullet,\n.hljs-code,\n.hljs-addition {\n  color: #D35400;\n}\n\n.hljs-regexp,\n.hljs-symbol,\n.hljs-variable,\n.hljs-template-variable,\n.hljs-link,\n.hljs-selector-attr,\n.hljs-selector-pseudo {\n  color: #00979D;\n}\n\n.hljs-type,\n.hljs-string,\n.hljs-selector-id,\n.hljs-selector-class,\n.hljs-quote,\n.hljs-template-tag,\n.hljs-deletion {\n  color: #005C5F;\n}\n\n.hljs-title,\n.hljs-section {\n  color: #880000;\n  font-weight: bold;\n}\n\n.hljs-comment {\n  color: rgba(149,165,166,.8);\n}\n\n.hljs-meta-keyword {\n  color: #728E00;\n}\n\n.hljs-meta {\n  color: #728E00;\n  color: #434f54;\n}\n\n.hljs-emphasis {\n  font-style: italic;\n}\n\n.hljs-strong {\n  font-weight: bold;\n}\n\n.hljs-function {\n  color: #728E00;\n}\n\n.hljs-number {\n  color: #8A7B52;  \n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/styles/arta.css",
    "content": "/*\nDate: 17.V.2011\nAuthor: pumbur <pumbur@pumbur.net>\n*/\n\n.hljs {\n  display: block;\n  overflow-x: auto;\n  padding: 0.5em;\n  background: #222;\n}\n\n.hljs,\n.hljs-subst {\n  color: #aaa;\n}\n\n.hljs-section {\n  color: #fff;\n}\n\n.hljs-comment,\n.hljs-quote,\n.hljs-meta {\n  color: #444;\n}\n\n.hljs-string,\n.hljs-symbol,\n.hljs-bullet,\n.hljs-regexp {\n  color: #ffcc33;\n}\n\n.hljs-number,\n.hljs-addition {\n  color: #00cc66;\n}\n\n.hljs-built_in,\n.hljs-builtin-name,\n.hljs-literal,\n.hljs-type,\n.hljs-template-variable,\n.hljs-attribute,\n.hljs-link {\n  color: #32aaee;\n}\n\n.hljs-keyword,\n.hljs-selector-tag,\n.hljs-name,\n.hljs-selector-id,\n.hljs-selector-class {\n  color: #6644aa;\n}\n\n.hljs-title,\n.hljs-variable,\n.hljs-deletion,\n.hljs-template-tag {\n  color: #bb1166;\n}\n\n.hljs-section,\n.hljs-doctag,\n.hljs-strong {\n  font-weight: bold;\n}\n\n.hljs-emphasis {\n  font-style: italic;\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/styles/ascetic.css",
    "content": "/*\n\nOriginal style from softwaremaniacs.org (c) Ivan Sagalaev <Maniac@SoftwareManiacs.Org>\n\n*/\n\n.hljs {\n  display: block;\n  overflow-x: auto;\n  padding: 0.5em;\n  background: white;\n  color: black;\n}\n\n.hljs-string,\n.hljs-variable,\n.hljs-template-variable,\n.hljs-symbol,\n.hljs-bullet,\n.hljs-section,\n.hljs-addition,\n.hljs-attribute,\n.hljs-link {\n  color: #888;\n}\n\n.hljs-comment,\n.hljs-quote,\n.hljs-meta,\n.hljs-deletion {\n  color: #ccc;\n}\n\n.hljs-keyword,\n.hljs-selector-tag,\n.hljs-section,\n.hljs-name,\n.hljs-type,\n.hljs-strong {\n  font-weight: bold;\n}\n\n.hljs-emphasis {\n  font-style: italic;\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/styles/atelier-cave-dark.css",
    "content": "/* Base16 Atelier Cave Dark - Theme */\n/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/cave) */\n/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */\n\n/* Atelier-Cave Comment */\n.hljs-comment,\n.hljs-quote {\n  color: #7e7887;\n}\n\n/* Atelier-Cave Red */\n.hljs-variable,\n.hljs-template-variable,\n.hljs-attribute,\n.hljs-regexp,\n.hljs-link,\n.hljs-tag,\n.hljs-name,\n.hljs-selector-id,\n.hljs-selector-class {\n  color: #be4678;\n}\n\n/* Atelier-Cave Orange */\n.hljs-number,\n.hljs-meta,\n.hljs-built_in,\n.hljs-builtin-name,\n.hljs-literal,\n.hljs-type,\n.hljs-params {\n  color: #aa573c;\n}\n\n/* Atelier-Cave Green */\n.hljs-string,\n.hljs-symbol,\n.hljs-bullet {\n  color: #2a9292;\n}\n\n/* Atelier-Cave Blue */\n.hljs-title,\n.hljs-section {\n  color: #576ddb;\n}\n\n/* Atelier-Cave Purple */\n.hljs-keyword,\n.hljs-selector-tag {\n  color: #955ae7;\n}\n\n.hljs-deletion,\n.hljs-addition {\n  color: #19171c;\n  display: inline-block;\n  width: 100%;\n}\n\n.hljs-deletion {\n  background-color: #be4678;\n}\n\n.hljs-addition {\n  background-color: #2a9292;\n}\n\n.hljs {\n  display: block;\n  overflow-x: auto;\n  background: #19171c;\n  color: #8b8792;\n  padding: 0.5em;\n}\n\n.hljs-emphasis {\n  font-style: italic;\n}\n\n.hljs-strong {\n  font-weight: bold;\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/styles/atelier-cave-light.css",
    "content": "/* Base16 Atelier Cave Light - Theme */\n/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/cave) */\n/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */\n\n/* Atelier-Cave Comment */\n.hljs-comment,\n.hljs-quote {\n  color: #655f6d;\n}\n\n/* Atelier-Cave Red */\n.hljs-variable,\n.hljs-template-variable,\n.hljs-attribute,\n.hljs-tag,\n.hljs-name,\n.hljs-regexp,\n.hljs-link,\n.hljs-name,\n.hljs-name,\n.hljs-selector-id,\n.hljs-selector-class {\n  color: #be4678;\n}\n\n/* Atelier-Cave Orange */\n.hljs-number,\n.hljs-meta,\n.hljs-built_in,\n.hljs-builtin-name,\n.hljs-literal,\n.hljs-type,\n.hljs-params {\n  color: #aa573c;\n}\n\n/* Atelier-Cave Green */\n.hljs-string,\n.hljs-symbol,\n.hljs-bullet {\n  color: #2a9292;\n}\n\n/* Atelier-Cave Blue */\n.hljs-title,\n.hljs-section {\n  color: #576ddb;\n}\n\n/* Atelier-Cave Purple */\n.hljs-keyword,\n.hljs-selector-tag {\n  color: #955ae7;\n}\n\n.hljs-deletion,\n.hljs-addition {\n  color: #19171c;\n  display: inline-block;\n  width: 100%;\n}\n\n.hljs-deletion {\n  background-color: #be4678;\n}\n\n.hljs-addition {\n  background-color: #2a9292;\n}\n\n.hljs {\n  display: block;\n  overflow-x: auto;\n  background: #efecf4;\n  color: #585260;\n  padding: 0.5em;\n}\n\n.hljs-emphasis {\n  font-style: italic;\n}\n\n.hljs-strong {\n  font-weight: bold;\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/styles/atelier-dune-dark.css",
    "content": "/* Base16 Atelier Dune Dark - Theme */\n/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/dune) */\n/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */\n\n/* Atelier-Dune Comment */\n.hljs-comment,\n.hljs-quote {\n  color: #999580;\n}\n\n/* Atelier-Dune Red */\n.hljs-variable,\n.hljs-template-variable,\n.hljs-attribute,\n.hljs-tag,\n.hljs-name,\n.hljs-regexp,\n.hljs-link,\n.hljs-name,\n.hljs-selector-id,\n.hljs-selector-class {\n  color: #d73737;\n}\n\n/* Atelier-Dune Orange */\n.hljs-number,\n.hljs-meta,\n.hljs-built_in,\n.hljs-builtin-name,\n.hljs-literal,\n.hljs-type,\n.hljs-params {\n  color: #b65611;\n}\n\n/* Atelier-Dune Green */\n.hljs-string,\n.hljs-symbol,\n.hljs-bullet {\n  color: #60ac39;\n}\n\n/* Atelier-Dune Blue */\n.hljs-title,\n.hljs-section {\n  color: #6684e1;\n}\n\n/* Atelier-Dune Purple */\n.hljs-keyword,\n.hljs-selector-tag {\n  color: #b854d4;\n}\n\n.hljs {\n  display: block;\n  overflow-x: auto;\n  background: #20201d;\n  color: #a6a28c;\n  padding: 0.5em;\n}\n\n.hljs-emphasis {\n  font-style: italic;\n}\n\n.hljs-strong {\n  font-weight: bold;\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/styles/atelier-dune-light.css",
    "content": "/* Base16 Atelier Dune Light - Theme */\n/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/dune) */\n/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */\n\n/* Atelier-Dune Comment */\n.hljs-comment,\n.hljs-quote {\n  color: #7d7a68;\n}\n\n/* Atelier-Dune Red */\n.hljs-variable,\n.hljs-template-variable,\n.hljs-attribute,\n.hljs-tag,\n.hljs-name,\n.hljs-regexp,\n.hljs-link,\n.hljs-name,\n.hljs-selector-id,\n.hljs-selector-class {\n  color: #d73737;\n}\n\n/* Atelier-Dune Orange */\n.hljs-number,\n.hljs-meta,\n.hljs-built_in,\n.hljs-builtin-name,\n.hljs-literal,\n.hljs-type,\n.hljs-params {\n  color: #b65611;\n}\n\n/* Atelier-Dune Green */\n.hljs-string,\n.hljs-symbol,\n.hljs-bullet {\n  color: #60ac39;\n}\n\n/* Atelier-Dune Blue */\n.hljs-title,\n.hljs-section {\n  color: #6684e1;\n}\n\n/* Atelier-Dune Purple */\n.hljs-keyword,\n.hljs-selector-tag {\n  color: #b854d4;\n}\n\n.hljs {\n  display: block;\n  overflow-x: auto;\n  background: #fefbec;\n  color: #6e6b5e;\n  padding: 0.5em;\n}\n\n.hljs-emphasis {\n  font-style: italic;\n}\n\n.hljs-strong {\n  font-weight: bold;\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/styles/atelier-estuary-dark.css",
    "content": "/* Base16 Atelier Estuary Dark - Theme */\n/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/estuary) */\n/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */\n\n/* Atelier-Estuary Comment */\n.hljs-comment,\n.hljs-quote {\n  color: #878573;\n}\n\n/* Atelier-Estuary Red */\n.hljs-variable,\n.hljs-template-variable,\n.hljs-attribute,\n.hljs-tag,\n.hljs-name,\n.hljs-regexp,\n.hljs-link,\n.hljs-name,\n.hljs-selector-id,\n.hljs-selector-class {\n  color: #ba6236;\n}\n\n/* Atelier-Estuary Orange */\n.hljs-number,\n.hljs-meta,\n.hljs-built_in,\n.hljs-builtin-name,\n.hljs-literal,\n.hljs-type,\n.hljs-params {\n  color: #ae7313;\n}\n\n/* Atelier-Estuary Green */\n.hljs-string,\n.hljs-symbol,\n.hljs-bullet {\n  color: #7d9726;\n}\n\n/* Atelier-Estuary Blue */\n.hljs-title,\n.hljs-section {\n  color: #36a166;\n}\n\n/* Atelier-Estuary Purple */\n.hljs-keyword,\n.hljs-selector-tag {\n  color: #5f9182;\n}\n\n.hljs-deletion,\n.hljs-addition {\n  color: #22221b;\n  display: inline-block;\n  width: 100%;\n}\n\n.hljs-deletion {\n  background-color: #ba6236;\n}\n\n.hljs-addition {\n  background-color: #7d9726;\n}\n\n.hljs {\n  display: block;\n  overflow-x: auto;\n  background: #22221b;\n  color: #929181;\n  padding: 0.5em;\n}\n\n.hljs-emphasis {\n  font-style: italic;\n}\n\n.hljs-strong {\n  font-weight: bold;\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/styles/atelier-estuary-light.css",
    "content": "/* Base16 Atelier Estuary Light - Theme */\n/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/estuary) */\n/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */\n\n/* Atelier-Estuary Comment */\n.hljs-comment,\n.hljs-quote {\n  color: #6c6b5a;\n}\n\n/* Atelier-Estuary Red */\n.hljs-variable,\n.hljs-template-variable,\n.hljs-attribute,\n.hljs-tag,\n.hljs-name,\n.hljs-regexp,\n.hljs-link,\n.hljs-name,\n.hljs-selector-id,\n.hljs-selector-class {\n  color: #ba6236;\n}\n\n/* Atelier-Estuary Orange */\n.hljs-number,\n.hljs-meta,\n.hljs-built_in,\n.hljs-builtin-name,\n.hljs-literal,\n.hljs-type,\n.hljs-params {\n  color: #ae7313;\n}\n\n/* Atelier-Estuary Green */\n.hljs-string,\n.hljs-symbol,\n.hljs-bullet {\n  color: #7d9726;\n}\n\n/* Atelier-Estuary Blue */\n.hljs-title,\n.hljs-section {\n  color: #36a166;\n}\n\n/* Atelier-Estuary Purple */\n.hljs-keyword,\n.hljs-selector-tag {\n  color: #5f9182;\n}\n\n.hljs-deletion,\n.hljs-addition {\n  color: #22221b;\n  display: inline-block;\n  width: 100%;\n}\n\n.hljs-deletion {\n  background-color: #ba6236;\n}\n\n.hljs-addition {\n  background-color: #7d9726;\n}\n\n.hljs {\n  display: block;\n  overflow-x: auto;\n  background: #f4f3ec;\n  color: #5f5e4e;\n  padding: 0.5em;\n}\n\n.hljs-emphasis {\n  font-style: italic;\n}\n\n.hljs-strong {\n  font-weight: bold;\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/styles/atelier-forest-dark.css",
    "content": "/* Base16 Atelier Forest Dark - Theme */\n/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/forest) */\n/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */\n\n/* Atelier-Forest Comment */\n.hljs-comment,\n.hljs-quote {\n  color: #9c9491;\n}\n\n/* Atelier-Forest Red */\n.hljs-variable,\n.hljs-template-variable,\n.hljs-attribute,\n.hljs-tag,\n.hljs-name,\n.hljs-regexp,\n.hljs-link,\n.hljs-name,\n.hljs-selector-id,\n.hljs-selector-class {\n  color: #f22c40;\n}\n\n/* Atelier-Forest Orange */\n.hljs-number,\n.hljs-meta,\n.hljs-built_in,\n.hljs-builtin-name,\n.hljs-literal,\n.hljs-type,\n.hljs-params {\n  color: #df5320;\n}\n\n/* Atelier-Forest Green */\n.hljs-string,\n.hljs-symbol,\n.hljs-bullet {\n  color: #7b9726;\n}\n\n/* Atelier-Forest Blue */\n.hljs-title,\n.hljs-section {\n  color: #407ee7;\n}\n\n/* Atelier-Forest Purple */\n.hljs-keyword,\n.hljs-selector-tag {\n  color: #6666ea;\n}\n\n.hljs {\n  display: block;\n  overflow-x: auto;\n  background: #1b1918;\n  color: #a8a19f;\n  padding: 0.5em;\n}\n\n.hljs-emphasis {\n  font-style: italic;\n}\n\n.hljs-strong {\n  font-weight: bold;\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/styles/atelier-forest-light.css",
    "content": "/* Base16 Atelier Forest Light - Theme */\n/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/forest) */\n/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */\n\n/* Atelier-Forest Comment */\n.hljs-comment,\n.hljs-quote {\n  color: #766e6b;\n}\n\n/* Atelier-Forest Red */\n.hljs-variable,\n.hljs-template-variable,\n.hljs-attribute,\n.hljs-tag,\n.hljs-name,\n.hljs-regexp,\n.hljs-link,\n.hljs-name,\n.hljs-selector-id,\n.hljs-selector-class {\n  color: #f22c40;\n}\n\n/* Atelier-Forest Orange */\n.hljs-number,\n.hljs-meta,\n.hljs-built_in,\n.hljs-builtin-name,\n.hljs-literal,\n.hljs-type,\n.hljs-params {\n  color: #df5320;\n}\n\n/* Atelier-Forest Green */\n.hljs-string,\n.hljs-symbol,\n.hljs-bullet {\n  color: #7b9726;\n}\n\n/* Atelier-Forest Blue */\n.hljs-title,\n.hljs-section {\n  color: #407ee7;\n}\n\n/* Atelier-Forest Purple */\n.hljs-keyword,\n.hljs-selector-tag {\n  color: #6666ea;\n}\n\n.hljs {\n  display: block;\n  overflow-x: auto;\n  background: #f1efee;\n  color: #68615e;\n  padding: 0.5em;\n}\n\n.hljs-emphasis {\n  font-style: italic;\n}\n\n.hljs-strong {\n  font-weight: bold;\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/styles/atelier-heath-dark.css",
    "content": "/* Base16 Atelier Heath Dark - Theme */\n/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/heath) */\n/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */\n\n/* Atelier-Heath Comment */\n.hljs-comment,\n.hljs-quote {\n  color: #9e8f9e;\n}\n\n/* Atelier-Heath Red */\n.hljs-variable,\n.hljs-template-variable,\n.hljs-attribute,\n.hljs-tag,\n.hljs-name,\n.hljs-regexp,\n.hljs-link,\n.hljs-name,\n.hljs-selector-id,\n.hljs-selector-class {\n  color: #ca402b;\n}\n\n/* Atelier-Heath Orange */\n.hljs-number,\n.hljs-meta,\n.hljs-built_in,\n.hljs-builtin-name,\n.hljs-literal,\n.hljs-type,\n.hljs-params {\n  color: #a65926;\n}\n\n/* Atelier-Heath Green */\n.hljs-string,\n.hljs-symbol,\n.hljs-bullet {\n  color: #918b3b;\n}\n\n/* Atelier-Heath Blue */\n.hljs-title,\n.hljs-section {\n  color: #516aec;\n}\n\n/* Atelier-Heath Purple */\n.hljs-keyword,\n.hljs-selector-tag {\n  color: #7b59c0;\n}\n\n.hljs {\n  display: block;\n  overflow-x: auto;\n  background: #1b181b;\n  color: #ab9bab;\n  padding: 0.5em;\n}\n\n.hljs-emphasis {\n  font-style: italic;\n}\n\n.hljs-strong {\n  font-weight: bold;\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/styles/atelier-heath-light.css",
    "content": "/* Base16 Atelier Heath Light - Theme */\n/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/heath) */\n/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */\n\n/* Atelier-Heath Comment */\n.hljs-comment,\n.hljs-quote {\n  color: #776977;\n}\n\n/* Atelier-Heath Red */\n.hljs-variable,\n.hljs-template-variable,\n.hljs-attribute,\n.hljs-tag,\n.hljs-name,\n.hljs-regexp,\n.hljs-link,\n.hljs-name,\n.hljs-selector-id,\n.hljs-selector-class {\n  color: #ca402b;\n}\n\n/* Atelier-Heath Orange */\n.hljs-number,\n.hljs-meta,\n.hljs-built_in,\n.hljs-builtin-name,\n.hljs-literal,\n.hljs-type,\n.hljs-params {\n  color: #a65926;\n}\n\n/* Atelier-Heath Green */\n.hljs-string,\n.hljs-symbol,\n.hljs-bullet {\n  color: #918b3b;\n}\n\n/* Atelier-Heath Blue */\n.hljs-title,\n.hljs-section {\n  color: #516aec;\n}\n\n/* Atelier-Heath Purple */\n.hljs-keyword,\n.hljs-selector-tag {\n  color: #7b59c0;\n}\n\n.hljs {\n  display: block;\n  overflow-x: auto;\n  background: #f7f3f7;\n  color: #695d69;\n  padding: 0.5em;\n}\n\n.hljs-emphasis {\n  font-style: italic;\n}\n\n.hljs-strong {\n  font-weight: bold;\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/styles/atelier-lakeside-dark.css",
    "content": "/* Base16 Atelier Lakeside Dark - Theme */\n/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/lakeside) */\n/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */\n\n/* Atelier-Lakeside Comment */\n.hljs-comment,\n.hljs-quote {\n  color: #7195a8;\n}\n\n/* Atelier-Lakeside Red */\n.hljs-variable,\n.hljs-template-variable,\n.hljs-attribute,\n.hljs-tag,\n.hljs-name,\n.hljs-regexp,\n.hljs-link,\n.hljs-name,\n.hljs-selector-id,\n.hljs-selector-class {\n  color: #d22d72;\n}\n\n/* Atelier-Lakeside Orange */\n.hljs-number,\n.hljs-meta,\n.hljs-built_in,\n.hljs-builtin-name,\n.hljs-literal,\n.hljs-type,\n.hljs-params {\n  color: #935c25;\n}\n\n/* Atelier-Lakeside Green */\n.hljs-string,\n.hljs-symbol,\n.hljs-bullet {\n  color: #568c3b;\n}\n\n/* Atelier-Lakeside Blue */\n.hljs-title,\n.hljs-section {\n  color: #257fad;\n}\n\n/* Atelier-Lakeside Purple */\n.hljs-keyword,\n.hljs-selector-tag {\n  color: #6b6bb8;\n}\n\n.hljs {\n  display: block;\n  overflow-x: auto;\n  background: #161b1d;\n  color: #7ea2b4;\n  padding: 0.5em;\n}\n\n.hljs-emphasis {\n  font-style: italic;\n}\n\n.hljs-strong {\n  font-weight: bold;\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/styles/atelier-lakeside-light.css",
    "content": "/* Base16 Atelier Lakeside Light - Theme */\n/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/lakeside) */\n/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */\n\n/* Atelier-Lakeside Comment */\n.hljs-comment,\n.hljs-quote {\n  color: #5a7b8c;\n}\n\n/* Atelier-Lakeside Red */\n.hljs-variable,\n.hljs-template-variable,\n.hljs-attribute,\n.hljs-tag,\n.hljs-name,\n.hljs-regexp,\n.hljs-link,\n.hljs-name,\n.hljs-selector-id,\n.hljs-selector-class {\n  color: #d22d72;\n}\n\n/* Atelier-Lakeside Orange */\n.hljs-number,\n.hljs-meta,\n.hljs-built_in,\n.hljs-builtin-name,\n.hljs-literal,\n.hljs-type,\n.hljs-params {\n  color: #935c25;\n}\n\n/* Atelier-Lakeside Green */\n.hljs-string,\n.hljs-symbol,\n.hljs-bullet {\n  color: #568c3b;\n}\n\n/* Atelier-Lakeside Blue */\n.hljs-title,\n.hljs-section {\n  color: #257fad;\n}\n\n/* Atelier-Lakeside Purple */\n.hljs-keyword,\n.hljs-selector-tag {\n  color: #6b6bb8;\n}\n\n.hljs {\n  display: block;\n  overflow-x: auto;\n  background: #ebf8ff;\n  color: #516d7b;\n  padding: 0.5em;\n}\n\n.hljs-emphasis {\n  font-style: italic;\n}\n\n.hljs-strong {\n  font-weight: bold;\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/styles/atelier-plateau-dark.css",
    "content": "/* Base16 Atelier Plateau Dark - Theme */\n/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/plateau) */\n/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */\n\n/* Atelier-Plateau Comment */\n.hljs-comment,\n.hljs-quote {\n  color: #7e7777;\n}\n\n/* Atelier-Plateau Red */\n.hljs-variable,\n.hljs-template-variable,\n.hljs-attribute,\n.hljs-tag,\n.hljs-name,\n.hljs-regexp,\n.hljs-link,\n.hljs-name,\n.hljs-selector-id,\n.hljs-selector-class {\n  color: #ca4949;\n}\n\n/* Atelier-Plateau Orange */\n.hljs-number,\n.hljs-meta,\n.hljs-built_in,\n.hljs-builtin-name,\n.hljs-literal,\n.hljs-type,\n.hljs-params {\n  color: #b45a3c;\n}\n\n/* Atelier-Plateau Green */\n.hljs-string,\n.hljs-symbol,\n.hljs-bullet {\n  color: #4b8b8b;\n}\n\n/* Atelier-Plateau Blue */\n.hljs-title,\n.hljs-section {\n  color: #7272ca;\n}\n\n/* Atelier-Plateau Purple */\n.hljs-keyword,\n.hljs-selector-tag {\n  color: #8464c4;\n}\n\n.hljs-deletion,\n.hljs-addition {\n  color: #1b1818;\n  display: inline-block;\n  width: 100%;\n}\n\n.hljs-deletion {\n  background-color: #ca4949;\n}\n\n.hljs-addition {\n  background-color: #4b8b8b;\n}\n\n.hljs {\n  display: block;\n  overflow-x: auto;\n  background: #1b1818;\n  color: #8a8585;\n  padding: 0.5em;\n}\n\n.hljs-emphasis {\n  font-style: italic;\n}\n\n.hljs-strong {\n  font-weight: bold;\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/styles/atelier-plateau-light.css",
    "content": "/* Base16 Atelier Plateau Light - Theme */\n/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/plateau) */\n/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */\n\n/* Atelier-Plateau Comment */\n.hljs-comment,\n.hljs-quote {\n  color: #655d5d;\n}\n\n/* Atelier-Plateau Red */\n.hljs-variable,\n.hljs-template-variable,\n.hljs-attribute,\n.hljs-tag,\n.hljs-name,\n.hljs-regexp,\n.hljs-link,\n.hljs-name,\n.hljs-selector-id,\n.hljs-selector-class {\n  color: #ca4949;\n}\n\n/* Atelier-Plateau Orange */\n.hljs-number,\n.hljs-meta,\n.hljs-built_in,\n.hljs-builtin-name,\n.hljs-literal,\n.hljs-type,\n.hljs-params {\n  color: #b45a3c;\n}\n\n/* Atelier-Plateau Green */\n.hljs-string,\n.hljs-symbol,\n.hljs-bullet {\n  color: #4b8b8b;\n}\n\n/* Atelier-Plateau Blue */\n.hljs-title,\n.hljs-section {\n  color: #7272ca;\n}\n\n/* Atelier-Plateau Purple */\n.hljs-keyword,\n.hljs-selector-tag {\n  color: #8464c4;\n}\n\n.hljs-deletion,\n.hljs-addition {\n  color: #1b1818;\n  display: inline-block;\n  width: 100%;\n}\n\n.hljs-deletion {\n  background-color: #ca4949;\n}\n\n.hljs-addition {\n  background-color: #4b8b8b;\n}\n\n.hljs {\n  display: block;\n  overflow-x: auto;\n  background: #f4ecec;\n  color: #585050;\n  padding: 0.5em;\n}\n\n.hljs-emphasis {\n  font-style: italic;\n}\n\n.hljs-strong {\n  font-weight: bold;\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/styles/atelier-savanna-dark.css",
    "content": "/* Base16 Atelier Savanna Dark - Theme */\n/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/savanna) */\n/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */\n\n/* Atelier-Savanna Comment */\n.hljs-comment,\n.hljs-quote {\n  color: #78877d;\n}\n\n/* Atelier-Savanna Red */\n.hljs-variable,\n.hljs-template-variable,\n.hljs-attribute,\n.hljs-tag,\n.hljs-name,\n.hljs-regexp,\n.hljs-link,\n.hljs-name,\n.hljs-selector-id,\n.hljs-selector-class {\n  color: #b16139;\n}\n\n/* Atelier-Savanna Orange */\n.hljs-number,\n.hljs-meta,\n.hljs-built_in,\n.hljs-builtin-name,\n.hljs-literal,\n.hljs-type,\n.hljs-params {\n  color: #9f713c;\n}\n\n/* Atelier-Savanna Green */\n.hljs-string,\n.hljs-symbol,\n.hljs-bullet {\n  color: #489963;\n}\n\n/* Atelier-Savanna Blue */\n.hljs-title,\n.hljs-section {\n  color: #478c90;\n}\n\n/* Atelier-Savanna Purple */\n.hljs-keyword,\n.hljs-selector-tag {\n  color: #55859b;\n}\n\n.hljs-deletion,\n.hljs-addition {\n  color: #171c19;\n  display: inline-block;\n  width: 100%;\n}\n\n.hljs-deletion {\n  background-color: #b16139;\n}\n\n.hljs-addition {\n  background-color: #489963;\n}\n\n.hljs {\n  display: block;\n  overflow-x: auto;\n  background: #171c19;\n  color: #87928a;\n  padding: 0.5em;\n}\n\n.hljs-emphasis {\n  font-style: italic;\n}\n\n.hljs-strong {\n  font-weight: bold;\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/styles/atelier-savanna-light.css",
    "content": "/* Base16 Atelier Savanna Light - Theme */\n/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/savanna) */\n/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */\n\n/* Atelier-Savanna Comment */\n.hljs-comment,\n.hljs-quote {\n  color: #5f6d64;\n}\n\n/* Atelier-Savanna Red */\n.hljs-variable,\n.hljs-template-variable,\n.hljs-attribute,\n.hljs-tag,\n.hljs-name,\n.hljs-regexp,\n.hljs-link,\n.hljs-name,\n.hljs-selector-id,\n.hljs-selector-class {\n  color: #b16139;\n}\n\n/* Atelier-Savanna Orange */\n.hljs-number,\n.hljs-meta,\n.hljs-built_in,\n.hljs-builtin-name,\n.hljs-literal,\n.hljs-type,\n.hljs-params {\n  color: #9f713c;\n}\n\n/* Atelier-Savanna Green */\n.hljs-string,\n.hljs-symbol,\n.hljs-bullet {\n  color: #489963;\n}\n\n/* Atelier-Savanna Blue */\n.hljs-title,\n.hljs-section {\n  color: #478c90;\n}\n\n/* Atelier-Savanna Purple */\n.hljs-keyword,\n.hljs-selector-tag {\n  color: #55859b;\n}\n\n.hljs-deletion,\n.hljs-addition {\n  color: #171c19;\n  display: inline-block;\n  width: 100%;\n}\n\n.hljs-deletion {\n  background-color: #b16139;\n}\n\n.hljs-addition {\n  background-color: #489963;\n}\n\n.hljs {\n  display: block;\n  overflow-x: auto;\n  background: #ecf4ee;\n  color: #526057;\n  padding: 0.5em;\n}\n\n.hljs-emphasis {\n  font-style: italic;\n}\n\n.hljs-strong {\n  font-weight: bold;\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/styles/atelier-seaside-dark.css",
    "content": "/* Base16 Atelier Seaside Dark - Theme */\n/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/seaside) */\n/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */\n\n/* Atelier-Seaside Comment */\n.hljs-comment,\n.hljs-quote {\n  color: #809980;\n}\n\n/* Atelier-Seaside Red */\n.hljs-variable,\n.hljs-template-variable,\n.hljs-attribute,\n.hljs-tag,\n.hljs-name,\n.hljs-regexp,\n.hljs-link,\n.hljs-name,\n.hljs-selector-id,\n.hljs-selector-class {\n  color: #e6193c;\n}\n\n/* Atelier-Seaside Orange */\n.hljs-number,\n.hljs-meta,\n.hljs-built_in,\n.hljs-builtin-name,\n.hljs-literal,\n.hljs-type,\n.hljs-params {\n  color: #87711d;\n}\n\n/* Atelier-Seaside Green */\n.hljs-string,\n.hljs-symbol,\n.hljs-bullet {\n  color: #29a329;\n}\n\n/* Atelier-Seaside Blue */\n.hljs-title,\n.hljs-section {\n  color: #3d62f5;\n}\n\n/* Atelier-Seaside Purple */\n.hljs-keyword,\n.hljs-selector-tag {\n  color: #ad2bee;\n}\n\n.hljs {\n  display: block;\n  overflow-x: auto;\n  background: #131513;\n  color: #8ca68c;\n  padding: 0.5em;\n}\n\n.hljs-emphasis {\n  font-style: italic;\n}\n\n.hljs-strong {\n  font-weight: bold;\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/styles/atelier-seaside-light.css",
    "content": "/* Base16 Atelier Seaside Light - Theme */\n/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/seaside) */\n/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */\n\n/* Atelier-Seaside Comment */\n.hljs-comment,\n.hljs-quote {\n  color: #687d68;\n}\n\n/* Atelier-Seaside Red */\n.hljs-variable,\n.hljs-template-variable,\n.hljs-attribute,\n.hljs-tag,\n.hljs-name,\n.hljs-regexp,\n.hljs-link,\n.hljs-name,\n.hljs-selector-id,\n.hljs-selector-class {\n  color: #e6193c;\n}\n\n/* Atelier-Seaside Orange */\n.hljs-number,\n.hljs-meta,\n.hljs-built_in,\n.hljs-builtin-name,\n.hljs-literal,\n.hljs-type,\n.hljs-params {\n  color: #87711d;\n}\n\n/* Atelier-Seaside Green */\n.hljs-string,\n.hljs-symbol,\n.hljs-bullet {\n  color: #29a329;\n}\n\n/* Atelier-Seaside Blue */\n.hljs-title,\n.hljs-section {\n  color: #3d62f5;\n}\n\n/* Atelier-Seaside Purple */\n.hljs-keyword,\n.hljs-selector-tag {\n  color: #ad2bee;\n}\n\n.hljs {\n  display: block;\n  overflow-x: auto;\n  background: #f4fbf4;\n  color: #5e6e5e;\n  padding: 0.5em;\n}\n\n.hljs-emphasis {\n  font-style: italic;\n}\n\n.hljs-strong {\n  font-weight: bold;\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/styles/atelier-sulphurpool-dark.css",
    "content": "/* Base16 Atelier Sulphurpool Dark - Theme */\n/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/sulphurpool) */\n/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */\n\n/* Atelier-Sulphurpool Comment */\n.hljs-comment,\n.hljs-quote {\n  color: #898ea4;\n}\n\n/* Atelier-Sulphurpool Red */\n.hljs-variable,\n.hljs-template-variable,\n.hljs-attribute,\n.hljs-tag,\n.hljs-name,\n.hljs-regexp,\n.hljs-link,\n.hljs-name,\n.hljs-selector-id,\n.hljs-selector-class {\n  color: #c94922;\n}\n\n/* Atelier-Sulphurpool Orange */\n.hljs-number,\n.hljs-meta,\n.hljs-built_in,\n.hljs-builtin-name,\n.hljs-literal,\n.hljs-type,\n.hljs-params {\n  color: #c76b29;\n}\n\n/* Atelier-Sulphurpool Green */\n.hljs-string,\n.hljs-symbol,\n.hljs-bullet {\n  color: #ac9739;\n}\n\n/* Atelier-Sulphurpool Blue */\n.hljs-title,\n.hljs-section {\n  color: #3d8fd1;\n}\n\n/* Atelier-Sulphurpool Purple */\n.hljs-keyword,\n.hljs-selector-tag {\n  color: #6679cc;\n}\n\n.hljs {\n  display: block;\n  overflow-x: auto;\n  background: #202746;\n  color: #979db4;\n  padding: 0.5em;\n}\n\n.hljs-emphasis {\n  font-style: italic;\n}\n\n.hljs-strong {\n  font-weight: bold;\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/styles/atelier-sulphurpool-light.css",
    "content": "/* Base16 Atelier Sulphurpool Light - Theme */\n/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/sulphurpool) */\n/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */\n\n/* Atelier-Sulphurpool Comment */\n.hljs-comment,\n.hljs-quote {\n  color: #6b7394;\n}\n\n/* Atelier-Sulphurpool Red */\n.hljs-variable,\n.hljs-template-variable,\n.hljs-attribute,\n.hljs-tag,\n.hljs-name,\n.hljs-regexp,\n.hljs-link,\n.hljs-name,\n.hljs-selector-id,\n.hljs-selector-class {\n  color: #c94922;\n}\n\n/* Atelier-Sulphurpool Orange */\n.hljs-number,\n.hljs-meta,\n.hljs-built_in,\n.hljs-builtin-name,\n.hljs-literal,\n.hljs-type,\n.hljs-params {\n  color: #c76b29;\n}\n\n/* Atelier-Sulphurpool Green */\n.hljs-string,\n.hljs-symbol,\n.hljs-bullet {\n  color: #ac9739;\n}\n\n/* Atelier-Sulphurpool Blue */\n.hljs-title,\n.hljs-section {\n  color: #3d8fd1;\n}\n\n/* Atelier-Sulphurpool Purple */\n.hljs-keyword,\n.hljs-selector-tag {\n  color: #6679cc;\n}\n\n.hljs {\n  display: block;\n  overflow-x: auto;\n  background: #f5f7ff;\n  color: #5e6687;\n  padding: 0.5em;\n}\n\n.hljs-emphasis {\n  font-style: italic;\n}\n\n.hljs-strong {\n  font-weight: bold;\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/styles/atom-one-dark.css",
    "content": "/*\n\nAtom One Dark by Daniel Gamage\nOriginal One Dark Syntax theme from https://github.com/atom/one-dark-syntax\n\nbase:    #282c34\nmono-1:  #abb2bf\nmono-2:  #818896\nmono-3:  #5c6370\nhue-1:   #56b6c2\nhue-2:   #61aeee\nhue-3:   #c678dd\nhue-4:   #98c379\nhue-5:   #e06c75\nhue-5-2: #be5046\nhue-6:   #d19a66\nhue-6-2: #e6c07b\n\n*/\n\n.hljs {\n  display: block;\n  overflow-x: auto;\n  padding: 0.5em;\n  color: #abb2bf;\n  background: #282c34;\n}\n\n.hljs-comment,\n.hljs-quote {\n  color: #5c6370;\n  font-style: italic;\n}\n\n.hljs-doctag,\n.hljs-keyword,\n.hljs-formula {\n  color: #c678dd;\n}\n\n.hljs-section,\n.hljs-name,\n.hljs-selector-tag,\n.hljs-deletion,\n.hljs-subst {\n  color: #e06c75;\n}\n\n.hljs-literal {\n  color: #56b6c2;\n}\n\n.hljs-string,\n.hljs-regexp,\n.hljs-addition,\n.hljs-attribute,\n.hljs-meta-string {\n  color: #98c379;\n}\n\n.hljs-built_in,\n.hljs-class .hljs-title {\n  color: #e6c07b;\n}\n\n.hljs-attr,\n.hljs-variable,\n.hljs-template-variable,\n.hljs-type,\n.hljs-selector-class,\n.hljs-selector-attr,\n.hljs-selector-pseudo,\n.hljs-number {\n  color: #d19a66;\n}\n\n.hljs-symbol,\n.hljs-bullet,\n.hljs-link,\n.hljs-meta,\n.hljs-selector-id,\n.hljs-title {\n  color: #61aeee;\n}\n\n.hljs-emphasis {\n  font-style: italic;\n}\n\n.hljs-strong {\n  font-weight: bold;\n}\n\n.hljs-link {\n  text-decoration: underline;\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/styles/atom-one-light.css",
    "content": "/*\n\nAtom One Light by Daniel Gamage\nOriginal One Light Syntax theme from https://github.com/atom/one-light-syntax\n\nbase:    #fafafa\nmono-1:  #383a42\nmono-2:  #686b77\nmono-3:  #a0a1a7\nhue-1:   #0184bb\nhue-2:   #4078f2\nhue-3:   #a626a4\nhue-4:   #50a14f\nhue-5:   #e45649\nhue-5-2: #c91243\nhue-6:   #986801\nhue-6-2: #c18401\n\n*/\n\n.hljs {\n  display: block;\n  overflow-x: auto;\n  padding: 0.5em;\n  color: #383a42;\n  background: #fafafa;\n}\n\n.hljs-comment,\n.hljs-quote {\n  color: #a0a1a7;\n  font-style: italic;\n}\n\n.hljs-doctag,\n.hljs-keyword,\n.hljs-formula {\n  color: #a626a4;\n}\n\n.hljs-section,\n.hljs-name,\n.hljs-selector-tag,\n.hljs-deletion,\n.hljs-subst {\n  color: #e45649;\n}\n\n.hljs-literal {\n  color: #0184bb;\n}\n\n.hljs-string,\n.hljs-regexp,\n.hljs-addition,\n.hljs-attribute,\n.hljs-meta-string {\n  color: #50a14f;\n}\n\n.hljs-built_in,\n.hljs-class .hljs-title {\n  color: #c18401;\n}\n\n.hljs-attr,\n.hljs-variable,\n.hljs-template-variable,\n.hljs-type,\n.hljs-selector-class,\n.hljs-selector-attr,\n.hljs-selector-pseudo,\n.hljs-number {\n  color: #986801;\n}\n\n.hljs-symbol,\n.hljs-bullet,\n.hljs-link,\n.hljs-meta,\n.hljs-selector-id,\n.hljs-title {\n  color: #4078f2;\n}\n\n.hljs-emphasis {\n  font-style: italic;\n}\n\n.hljs-strong {\n  font-weight: bold;\n}\n\n.hljs-link {\n  text-decoration: underline;\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/styles/brown-paper.css",
    "content": "/*\n\nBrown Paper style from goldblog.com.ua (c) Zaripov Yura <yur4ik7@ukr.net>\n\n*/\n\n.hljs {\n  display: block;\n  overflow-x: auto;\n  padding: 0.5em;\n  background:#b7a68e url(./brown-papersq.png);\n}\n\n.hljs-keyword,\n.hljs-selector-tag,\n.hljs-literal {\n  color:#005599;\n  font-weight:bold;\n}\n\n.hljs,\n.hljs-subst {\n  color: #363c69;\n}\n\n.hljs-string,\n.hljs-title,\n.hljs-section,\n.hljs-type,\n.hljs-attribute,\n.hljs-symbol,\n.hljs-bullet,\n.hljs-built_in,\n.hljs-addition,\n.hljs-variable,\n.hljs-template-tag,\n.hljs-template-variable,\n.hljs-link,\n.hljs-name {\n  color: #2c009f;\n}\n\n.hljs-comment,\n.hljs-quote,\n.hljs-meta,\n.hljs-deletion {\n  color: #802022;\n}\n\n.hljs-keyword,\n.hljs-selector-tag,\n.hljs-literal,\n.hljs-doctag,\n.hljs-title,\n.hljs-section,\n.hljs-type,\n.hljs-name,\n.hljs-strong {\n  font-weight: bold;\n}\n\n.hljs-emphasis {\n  font-style: italic;\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/styles/codepen-embed.css",
    "content": "/*\n  codepen.io Embed Theme\n  Author: Justin Perry <http://github.com/ourmaninamsterdam>\n  Original theme - https://github.com/chriskempson/tomorrow-theme\n*/\n\n.hljs {\n  display: block;\n  overflow-x: auto;\n  padding: 0.5em;\n  background: #222;\n  color: #fff;\n}\n\n.hljs-comment,\n.hljs-quote {\n  color: #777;\n}\n\n.hljs-variable,\n.hljs-template-variable,\n.hljs-tag,\n.hljs-regexp,\n.hljs-meta,\n.hljs-number,\n.hljs-built_in,\n.hljs-builtin-name,\n.hljs-literal,\n.hljs-params,\n.hljs-symbol,\n.hljs-bullet,\n.hljs-link,\n.hljs-deletion {\n  color: #ab875d;\n}\n\n.hljs-section,\n.hljs-title,\n.hljs-name,\n.hljs-selector-id,\n.hljs-selector-class,\n.hljs-type,\n.hljs-attribute {\n  color: #9b869b;\n}\n\n.hljs-string,\n.hljs-keyword,\n.hljs-selector-tag,\n.hljs-addition {\n  color: #8f9c6c;\n}\n\n.hljs-emphasis {\n  font-style: italic;\n}\n\n.hljs-strong {\n  font-weight: bold;\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/styles/color-brewer.css",
    "content": "/*\n\nColorbrewer theme\nOriginal: https://github.com/mbostock/colorbrewer-theme (c) Mike Bostock <mike@ocks.org>\nPorted by Fabrício Tavares de Oliveira\n\n*/\n\n.hljs {\n  display: block;\n  overflow-x: auto;\n  padding: 0.5em;\n  background: #fff;\n}\n\n.hljs,\n.hljs-subst {\n  color: #000;\n}\n\n.hljs-string,\n.hljs-meta,\n.hljs-symbol,\n.hljs-template-tag,\n.hljs-template-variable,\n.hljs-addition {\n  color: #756bb1;\n}\n\n.hljs-comment,\n.hljs-quote {\n  color: #636363;\n}\n\n.hljs-number,\n.hljs-regexp,\n.hljs-literal,\n.hljs-bullet,\n.hljs-link {\n  color: #31a354;\n}\n\n.hljs-deletion,\n.hljs-variable {\n  color: #88f;\n}\n\n\n\n.hljs-keyword,\n.hljs-selector-tag,\n.hljs-title,\n.hljs-section,\n.hljs-built_in,\n.hljs-doctag,\n.hljs-type,\n.hljs-tag,\n.hljs-name,\n.hljs-selector-id,\n.hljs-selector-class,\n.hljs-strong {\n  color: #3182bd;\n}\n\n.hljs-emphasis {\n  font-style: italic;\n}\n\n.hljs-attribute {\n  color: #e6550d;\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/styles/darcula.css",
    "content": "/*\n\nDarcula color scheme from the JetBrains family of IDEs\n\n*/\n\n\n.hljs {\n  display: block;\n  overflow-x: auto;\n  padding: 0.5em;\n  background: #2b2b2b;\n}\n\n.hljs {\n  color: #bababa;\n}\n\n.hljs-strong,\n.hljs-emphasis {\n  color: #a8a8a2;\n}\n\n.hljs-bullet,\n.hljs-quote,\n.hljs-link,\n.hljs-number,\n.hljs-regexp,\n.hljs-literal {\n  color: #6896ba;\n}\n\n.hljs-code,\n.hljs-selector-class {\n  color: #a6e22e;\n}\n\n.hljs-emphasis {\n  font-style: italic;\n}\n\n.hljs-keyword,\n.hljs-selector-tag,\n.hljs-section,\n.hljs-attribute,\n.hljs-name,\n.hljs-variable {\n  color: #cb7832;\n}\n\n.hljs-params {\n  color: #b9b9b9;\n}\n\n.hljs-string {\n  color: #6a8759;\n}\n\n.hljs-subst,\n.hljs-type,\n.hljs-built_in,\n.hljs-builtin-name,\n.hljs-symbol,\n.hljs-selector-id,\n.hljs-selector-attr,\n.hljs-selector-pseudo,\n.hljs-template-tag,\n.hljs-template-variable,\n.hljs-addition {\n  color: #e0c46c;\n}\n\n.hljs-comment,\n.hljs-deletion,\n.hljs-meta {\n  color: #7f7f7f;\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/styles/dark.css",
    "content": "/*\n\nDark style from softwaremaniacs.org (c) Ivan Sagalaev <Maniac@SoftwareManiacs.Org>\n\n*/\n\n.hljs {\n  display: block;\n  overflow-x: auto;\n  padding: 0.5em;\n  background: #444;\n}\n\n.hljs-keyword,\n.hljs-selector-tag,\n.hljs-literal,\n.hljs-section,\n.hljs-link {\n  color: white;\n}\n\n.hljs,\n.hljs-subst {\n  color: #ddd;\n}\n\n.hljs-string,\n.hljs-title,\n.hljs-name,\n.hljs-type,\n.hljs-attribute,\n.hljs-symbol,\n.hljs-bullet,\n.hljs-built_in,\n.hljs-addition,\n.hljs-variable,\n.hljs-template-tag,\n.hljs-template-variable {\n  color: #d88;\n}\n\n.hljs-comment,\n.hljs-quote,\n.hljs-deletion,\n.hljs-meta {\n  color: #777;\n}\n\n.hljs-keyword,\n.hljs-selector-tag,\n.hljs-literal,\n.hljs-title,\n.hljs-section,\n.hljs-doctag,\n.hljs-type,\n.hljs-name,\n.hljs-strong {\n  font-weight: bold;\n}\n\n.hljs-emphasis {\n  font-style: italic;\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/styles/darkula.css",
    "content": "/*\n  Deprecated due to a typo in the name and left here for compatibility purpose only.\n  Please use darcula.css instead.\n*/\n\n@import url('darcula.css');\n"
  },
  {
    "path": "static/editor.md/lib/highlight/styles/default.css",
    "content": "/*\n\nOriginal highlight.js style (c) Ivan Sagalaev <maniac@softwaremaniacs.org>\n\n*/\n\n.hljs {\n  display: block;\n  overflow-x: auto;\n  padding: 0.5em;\n  background: #F0F0F0;\n}\n\n\n/* Base color: saturation 0; */\n\n.hljs,\n.hljs-subst {\n  color: #444;\n}\n\n.hljs-comment {\n  color: #888888;\n}\n\n.hljs-keyword,\n.hljs-attribute,\n.hljs-selector-tag,\n.hljs-meta-keyword,\n.hljs-doctag,\n.hljs-name {\n  font-weight: bold;\n}\n\n\n/* User color: hue: 0 */\n\n.hljs-type,\n.hljs-string,\n.hljs-number,\n.hljs-selector-id,\n.hljs-selector-class,\n.hljs-quote,\n.hljs-template-tag,\n.hljs-deletion {\n  color: #880000;\n}\n\n.hljs-title,\n.hljs-section {\n  color: #880000;\n  font-weight: bold;\n}\n\n.hljs-regexp,\n.hljs-symbol,\n.hljs-variable,\n.hljs-template-variable,\n.hljs-link,\n.hljs-selector-attr,\n.hljs-selector-pseudo {\n  color: #BC6060;\n}\n\n\n/* Language color: hue: 90; */\n\n.hljs-literal {\n  color: #78A960;\n}\n\n.hljs-built_in,\n.hljs-bullet,\n.hljs-code,\n.hljs-addition {\n  color: #397300;\n}\n\n\n/* Meta color: hue: 200 */\n\n.hljs-meta {\n  color: #1f7199;\n}\n\n.hljs-meta-string {\n  color: #4d99bf;\n}\n\n\n/* Misc effects */\n\n.hljs-emphasis {\n  font-style: italic;\n}\n\n.hljs-strong {\n  font-weight: bold;\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/styles/docco.css",
    "content": "/*\nDocco style used in http://jashkenas.github.com/docco/ converted by Simon Madine (@thingsinjars)\n*/\n\n.hljs {\n  display: block;\n  overflow-x: auto;\n  padding: 0.5em;\n  color: #000;\n  background: #f8f8ff;\n}\n\n.hljs-comment,\n.hljs-quote {\n  color: #408080;\n  font-style: italic;\n}\n\n.hljs-keyword,\n.hljs-selector-tag,\n.hljs-literal,\n.hljs-subst {\n  color: #954121;\n}\n\n.hljs-number {\n  color: #40a070;\n}\n\n.hljs-string,\n.hljs-doctag {\n  color: #219161;\n}\n\n.hljs-selector-id,\n.hljs-selector-class,\n.hljs-section,\n.hljs-type {\n  color: #19469d;\n}\n\n.hljs-params {\n  color: #00f;\n}\n\n.hljs-title {\n  color: #458;\n  font-weight: bold;\n}\n\n.hljs-tag,\n.hljs-name,\n.hljs-attribute {\n  color: #000080;\n  font-weight: normal;\n}\n\n.hljs-variable,\n.hljs-template-variable {\n  color: #008080;\n}\n\n.hljs-regexp,\n.hljs-link {\n  color: #b68;\n}\n\n.hljs-symbol,\n.hljs-bullet {\n  color: #990073;\n}\n\n.hljs-built_in,\n.hljs-builtin-name {\n  color: #0086b3;\n}\n\n.hljs-meta {\n  color: #999;\n  font-weight: bold;\n}\n\n.hljs-deletion {\n  background: #fdd;\n}\n\n.hljs-addition {\n  background: #dfd;\n}\n\n.hljs-emphasis {\n  font-style: italic;\n}\n\n.hljs-strong {\n  font-weight: bold;\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/styles/dracula.css",
    "content": "/*\n\nDracula Theme v1.2.0\n\nhttps://github.com/zenorocha/dracula-theme\n\nCopyright 2015, All rights reserved\n\nCode licensed under the MIT license\nhttp://zenorocha.mit-license.org\n\n@author Éverton Ribeiro <nuxlli@gmail.com>\n@author Zeno Rocha <hi@zenorocha.com>\n\n*/\n\n.hljs {\n  display: block;\n  overflow-x: auto;\n  padding: 0.5em;\n  background: #282a36;\n}\n\n.hljs-keyword,\n.hljs-selector-tag,\n.hljs-literal,\n.hljs-section,\n.hljs-link {\n  color: #8be9fd;\n}\n\n.hljs-function .hljs-keyword {\n  color: #ff79c6;\n}\n\n.hljs,\n.hljs-subst {\n  color: #f8f8f2;\n}\n\n.hljs-string,\n.hljs-title,\n.hljs-name,\n.hljs-type,\n.hljs-attribute,\n.hljs-symbol,\n.hljs-bullet,\n.hljs-addition,\n.hljs-variable,\n.hljs-template-tag,\n.hljs-template-variable {\n  color: #f1fa8c;\n}\n\n.hljs-comment,\n.hljs-quote,\n.hljs-deletion,\n.hljs-meta {\n  color: #6272a4;\n}\n\n.hljs-keyword,\n.hljs-selector-tag,\n.hljs-literal,\n.hljs-title,\n.hljs-section,\n.hljs-doctag,\n.hljs-type,\n.hljs-name,\n.hljs-strong {\n  font-weight: bold;\n}\n\n.hljs-emphasis {\n  font-style: italic;\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/styles/far.css",
    "content": "/*\n\nFAR Style (c) MajestiC <majestic2k@gmail.com>\n\n*/\n\n.hljs {\n  display: block;\n  overflow-x: auto;\n  padding: 0.5em;\n  background: #000080;\n}\n\n.hljs,\n.hljs-subst {\n  color: #0ff;\n}\n\n.hljs-string,\n.hljs-attribute,\n.hljs-symbol,\n.hljs-bullet,\n.hljs-built_in,\n.hljs-builtin-name,\n.hljs-template-tag,\n.hljs-template-variable,\n.hljs-addition {\n  color: #ff0;\n}\n\n.hljs-keyword,\n.hljs-selector-tag,\n.hljs-section,\n.hljs-type,\n.hljs-name,\n.hljs-selector-id,\n.hljs-selector-class,\n.hljs-variable {\n  color: #fff;\n}\n\n.hljs-comment,\n.hljs-quote,\n.hljs-doctag,\n.hljs-deletion {\n  color: #888;\n}\n\n.hljs-number,\n.hljs-regexp,\n.hljs-literal,\n.hljs-link {\n  color: #0f0;\n}\n\n.hljs-meta {\n  color: #008080;\n}\n\n.hljs-keyword,\n.hljs-selector-tag,\n.hljs-title,\n.hljs-section,\n.hljs-name,\n.hljs-strong {\n  font-weight: bold;\n}\n\n.hljs-emphasis {\n  font-style: italic;\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/styles/foundation.css",
    "content": "/*\nDescription: Foundation 4 docs style for highlight.js\nAuthor: Dan Allen <dan.j.allen@gmail.com>\nWebsite: http://foundation.zurb.com/docs/\nVersion: 1.0\nDate: 2013-04-02\n*/\n\n.hljs {\n  display: block;\n  overflow-x: auto;\n  padding: 0.5em;\n  background: #eee; color: black;\n}\n\n.hljs-link,\n.hljs-emphasis,\n.hljs-attribute,\n.hljs-addition {\n  color: #070;\n}\n\n.hljs-emphasis {\n  font-style: italic;\n}\n\n.hljs-strong,\n.hljs-string,\n.hljs-deletion {\n  color: #d14;\n}\n\n.hljs-strong {\n  font-weight: bold;\n}\n\n.hljs-quote,\n.hljs-comment {\n  color: #998;\n  font-style: italic;\n}\n\n.hljs-section,\n.hljs-title {\n  color: #900;\n}\n\n.hljs-class .hljs-title,\n.hljs-type {\n  color: #458;\n}\n\n.hljs-variable,\n.hljs-template-variable {\n  color: #336699;\n}\n\n.hljs-bullet {\n  color: #997700;\n}\n\n.hljs-meta {\n  color: #3344bb;\n}\n\n.hljs-code,\n.hljs-number,\n.hljs-literal,\n.hljs-keyword,\n.hljs-selector-tag {\n  color: #099;\n}\n\n.hljs-regexp {\n  background-color: #fff0ff;\n  color: #880088;\n}\n\n.hljs-symbol {\n  color: #990073;\n}\n\n.hljs-tag,\n.hljs-name,\n.hljs-selector-id,\n.hljs-selector-class {\n  color: #007700;\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/styles/github-gist.css",
    "content": "/**\n * GitHub Gist Theme\n * Author : Louis Barranqueiro - https://github.com/LouisBarranqueiro\n */\n\n.hljs {\n  display: block;\n  background: white;\n  padding: 0.5em;\n  color: #333333;\n  overflow-x: auto;\n}\n\n.hljs-comment,\n.hljs-meta {\n  color: #969896;\n}\n\n.hljs-string,\n.hljs-variable,\n.hljs-template-variable,\n.hljs-strong,\n.hljs-emphasis,\n.hljs-quote {\n  color: #df5000;\n}\n\n.hljs-keyword,\n.hljs-selector-tag,\n.hljs-type {\n  color: #a71d5d;\n}\n\n.hljs-literal,\n.hljs-symbol,\n.hljs-bullet,\n.hljs-attribute {\n  color: #0086b3;\n}\n\n.hljs-section,\n.hljs-name {\n  color: #63a35c;\n}\n\n.hljs-tag {\n  color: #333333;\n}\n\n.hljs-title,\n.hljs-attr,\n.hljs-selector-id,\n.hljs-selector-class,\n.hljs-selector-attr,\n.hljs-selector-pseudo {\n  color: #795da3;\n}\n\n.hljs-addition {\n  color: #55a532;\n  background-color: #eaffea;\n}\n\n.hljs-deletion {\n  color: #bd2c00;\n  background-color: #ffecec;\n}\n\n.hljs-link {\n  text-decoration: underline;\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/styles/github.css",
    "content": "/*\n\ngithub.com style (c) Vasily Polovnyov <vast@whiteants.net>\n\n*/\n\n.hljs {\n  display: block;\n  overflow-x: auto;\n  padding: 0.5em;\n  color: #333;\n  background: #f8f8f8;\n}\n\n.hljs-comment,\n.hljs-quote {\n  color: #998;\n  font-style: italic;\n}\n\n.hljs-keyword,\n.hljs-selector-tag,\n.hljs-subst {\n  color: #333;\n  font-weight: bold;\n}\n\n.hljs-number,\n.hljs-literal,\n.hljs-variable,\n.hljs-template-variable,\n.hljs-tag .hljs-attr {\n  color: #008080;\n}\n\n.hljs-string,\n.hljs-doctag {\n  color: #d14;\n}\n\n.hljs-title,\n.hljs-section,\n.hljs-selector-id {\n  color: #900;\n  font-weight: bold;\n}\n\n.hljs-subst {\n  font-weight: normal;\n}\n\n.hljs-type,\n.hljs-class .hljs-title {\n  color: #458;\n  font-weight: bold;\n}\n\n.hljs-tag,\n.hljs-name,\n.hljs-attribute {\n  color: #000080;\n  font-weight: normal;\n}\n\n.hljs-regexp,\n.hljs-link {\n  color: #009926;\n}\n\n.hljs-symbol,\n.hljs-bullet {\n  color: #990073;\n}\n\n.hljs-built_in,\n.hljs-builtin-name {\n  color: #0086b3;\n}\n\n.hljs-meta {\n  color: #999;\n  font-weight: bold;\n}\n\n.hljs-deletion {\n  background: #fdd;\n}\n\n.hljs-addition {\n  background: #dfd;\n}\n\n.hljs-emphasis {\n  font-style: italic;\n}\n\n.hljs-strong {\n  font-weight: bold;\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/styles/googlecode.css",
    "content": "/*\n\nGoogle Code style (c) Aahan Krish <geekpanth3r@gmail.com>\n\n*/\n\n.hljs {\n  display: block;\n  overflow-x: auto;\n  padding: 0.5em;\n  background: white;\n  color: black;\n}\n\n.hljs-comment,\n.hljs-quote {\n  color: #800;\n}\n\n.hljs-keyword,\n.hljs-selector-tag,\n.hljs-section,\n.hljs-title,\n.hljs-name {\n  color: #008;\n}\n\n.hljs-variable,\n.hljs-template-variable {\n  color: #660;\n}\n\n.hljs-string,\n.hljs-selector-attr,\n.hljs-selector-pseudo,\n.hljs-regexp {\n  color: #080;\n}\n\n.hljs-literal,\n.hljs-symbol,\n.hljs-bullet,\n.hljs-meta,\n.hljs-number,\n.hljs-link {\n  color: #066;\n}\n\n.hljs-title,\n.hljs-doctag,\n.hljs-type,\n.hljs-attr,\n.hljs-built_in,\n.hljs-builtin-name,\n.hljs-params {\n  color: #606;\n}\n\n.hljs-attribute,\n.hljs-subst {\n  color: #000;\n}\n\n.hljs-formula {\n  background-color: #eee;\n  font-style: italic;\n}\n\n.hljs-selector-id,\n.hljs-selector-class {\n  color: #9B703F\n}\n\n.hljs-addition {\n  background-color: #baeeba;\n}\n\n.hljs-deletion {\n  background-color: #ffc8bd;\n}\n\n.hljs-doctag,\n.hljs-strong {\n  font-weight: bold;\n}\n\n.hljs-emphasis {\n  font-style: italic;\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/styles/grayscale.css",
    "content": "/*\n\ngrayscale style (c) MY Sun <simonmysun@gmail.com>\n\n*/\n\n.hljs {\n  display: block;\n  overflow-x: auto;\n  padding: 0.5em;\n  color: #333;\n  background: #fff;\n}\n\n.hljs-comment,\n.hljs-quote {\n  color: #777;\n  font-style: italic;\n}\n\n.hljs-keyword,\n.hljs-selector-tag,\n.hljs-subst {\n  color: #333;\n  font-weight: bold;\n}\n\n.hljs-number,\n.hljs-literal {\n  color: #777;\n}\n\n.hljs-string,\n.hljs-doctag,\n.hljs-formula {\n  color: #333;\n  background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAYAAACp8Z5+AAAAJ0lEQVQIW2O8e/fufwYGBgZBQUEQxcCIIfDu3Tuwivfv30NUoAsAALHpFMMLqZlPAAAAAElFTkSuQmCC) repeat;\n}\n\n.hljs-title,\n.hljs-section,\n.hljs-selector-id {\n  color: #000;\n  font-weight: bold;\n}\n\n.hljs-subst {\n  font-weight: normal;\n}\n\n.hljs-class .hljs-title,\n.hljs-type,\n.hljs-name {\n  color: #333;\n  font-weight: bold;\n}\n\n.hljs-tag {\n  color: #333;\n}\n\n.hljs-regexp {\n    color: #333;\n    background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAICAYAAADA+m62AAAAPUlEQVQYV2NkQAN37979r6yszIgujiIAU4RNMVwhuiQ6H6wQl3XI4oy4FMHcCJPHcDS6J2A2EqUQpJhohQDexSef15DBCwAAAABJRU5ErkJggg==) repeat;\n}\n\n.hljs-symbol,\n.hljs-bullet,\n.hljs-link {\n  color: #000;\n  background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAKElEQVQIW2NkQAO7d+/+z4gsBhJwdXVlhAvCBECKwIIwAbhKZBUwBQA6hBpm5efZsgAAAABJRU5ErkJggg==) repeat;\n}\n\n.hljs-built_in,\n.hljs-builtin-name {\n  color: #000;\n  text-decoration: underline;\n}\n\n.hljs-meta {\n  color: #999;\n  font-weight: bold;\n}\n\n.hljs-deletion {\n  color: #fff;\n  background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAADCAYAAABS3WWCAAAAE0lEQVQIW2MMDQ39zzhz5kwIAQAyxweWgUHd1AAAAABJRU5ErkJggg==) repeat;\n}\n\n.hljs-addition {\n  color: #000;\n  background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJCAYAAADgkQYQAAAALUlEQVQYV2N89+7dfwYk8P79ewZBQUFkIQZGOiu6e/cuiptQHAPl0NtNxAQBAM97Oejj3Dg7AAAAAElFTkSuQmCC) repeat;\n}\n\n.hljs-emphasis {\n  font-style: italic;\n}\n\n.hljs-strong {\n  font-weight: bold;\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/styles/gruvbox-dark.css",
    "content": "/*\n\nGruvbox style (dark) (c) Pavel Pertsev (original style at https://github.com/morhetz/gruvbox)\n\n*/\n\n.hljs {\n  display: block;\n  overflow-x: auto;\n  padding: 0.5em;\n  background: #282828;\n}\n\n.hljs,\n.hljs-subst {\n  color: #ebdbb2;\n}\n\n/* Gruvbox Red */\n.hljs-deletion,\n.hljs-formula,\n.hljs-keyword,\n.hljs-link,\n.hljs-selector-tag {\n  color: #fb4934;\n}\n\n/* Gruvbox Blue */\n.hljs-built_in,\n.hljs-emphasis,\n.hljs-name,\n.hljs-quote,\n.hljs-strong,\n.hljs-title,\n.hljs-variable {\n  color: #83a598;\n}\n\n/* Gruvbox Yellow */\n.hljs-attr,\n.hljs-params,\n.hljs-template-tag,\n.hljs-type {\n  color: #fabd2f;\n}\n\n/* Gruvbox Purple */\n.hljs-builtin-name,\n.hljs-doctag,\n.hljs-literal,\n.hljs-number {\n  color: #8f3f71;\n}\n\n/* Gruvbox Orange */\n.hljs-code,\n.hljs-meta,\n.hljs-regexp,\n.hljs-selector-id,\n.hljs-template-variable {\n  color: #fe8019;\n}\n\n/* Gruvbox Green */\n.hljs-addition,\n.hljs-meta-string,\n.hljs-section,\n.hljs-selector-attr,\n.hljs-selector-class,\n.hljs-string,\n.hljs-symbol {\n  color: #b8bb26;\n}\n\n/* Gruvbox Aqua */\n.hljs-attribute,\n.hljs-bullet,\n.hljs-class,\n.hljs-function,\n.hljs-function .hljs-keyword,\n.hljs-meta-keyword,\n.hljs-selector-pseudo,\n.hljs-tag {\n  color: #8ec07c;\n}\n\n/* Gruvbox Gray */\n.hljs-comment {\n  color: #928374;\n}\n\n/* Gruvbox Purple */\n.hljs-link_label,\n.hljs-literal,\n.hljs-number {\n  color: #d3869b;\n}\n\n.hljs-comment,\n.hljs-emphasis {\n  font-style: italic;\n}\n\n.hljs-section,\n.hljs-strong,\n.hljs-tag {\n  font-weight: bold;\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/styles/gruvbox-light.css",
    "content": "/*\n\nGruvbox style (light) (c) Pavel Pertsev (original style at https://github.com/morhetz/gruvbox)\n\n*/\n\n.hljs {\n  display: block;\n  overflow-x: auto;\n  padding: 0.5em;\n  background: #fbf1c7;\n}\n\n.hljs,\n.hljs-subst {\n  color: #3c3836;\n}\n\n/* Gruvbox Red */\n.hljs-deletion,\n.hljs-formula,\n.hljs-keyword,\n.hljs-link,\n.hljs-selector-tag {\n  color: #9d0006;\n}\n\n/* Gruvbox Blue */\n.hljs-built_in,\n.hljs-emphasis,\n.hljs-name,\n.hljs-quote,\n.hljs-strong,\n.hljs-title,\n.hljs-variable {\n  color: #076678;\n}\n\n/* Gruvbox Yellow */\n.hljs-attr,\n.hljs-params,\n.hljs-template-tag,\n.hljs-type {\n  color: #b57614;\n}\n\n/* Gruvbox Purple */\n.hljs-builtin-name,\n.hljs-doctag,\n.hljs-literal,\n.hljs-number {\n  color: #8f3f71;\n}\n\n/* Gruvbox Orange */\n.hljs-code,\n.hljs-meta,\n.hljs-regexp,\n.hljs-selector-id,\n.hljs-template-variable {\n  color: #af3a03;\n}\n\n/* Gruvbox Green */\n.hljs-addition,\n.hljs-meta-string,\n.hljs-section,\n.hljs-selector-attr,\n.hljs-selector-class,\n.hljs-string,\n.hljs-symbol {\n  color: #79740e;\n}\n\n/* Gruvbox Aqua */\n.hljs-attribute,\n.hljs-bullet,\n.hljs-class,\n.hljs-function,\n.hljs-function .hljs-keyword,\n.hljs-meta-keyword,\n.hljs-selector-pseudo,\n.hljs-tag {\n  color: #427b58;\n}\n\n/* Gruvbox Gray */\n.hljs-comment {\n  color: #928374;\n}\n\n/* Gruvbox Purple */\n.hljs-link_label,\n.hljs-literal,\n.hljs-number {\n  color: #8f3f71;\n}\n\n.hljs-comment,\n.hljs-emphasis {\n  font-style: italic;\n}\n\n.hljs-section,\n.hljs-strong,\n.hljs-tag {\n  font-weight: bold;\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/styles/hopscotch.css",
    "content": "/*\n * Hopscotch\n * by Jan T. Sott\n * https://github.com/idleberg/Hopscotch\n *\n * This work is licensed under the Creative Commons CC0 1.0 Universal License\n */\n\n/* Comment */\n.hljs-comment,\n.hljs-quote {\n  color: #989498;\n}\n\n/* Red */\n.hljs-variable,\n.hljs-template-variable,\n.hljs-attribute,\n.hljs-tag,\n.hljs-name,\n.hljs-selector-id,\n.hljs-selector-class,\n.hljs-regexp,\n.hljs-link,\n.hljs-deletion {\n  color: #dd464c;\n}\n\n/* Orange */\n.hljs-number,\n.hljs-built_in,\n.hljs-builtin-name,\n.hljs-literal,\n.hljs-type,\n.hljs-params {\n  color: #fd8b19;\n}\n\n/* Yellow */\n.hljs-class .hljs-title {\n  color: #fdcc59;\n}\n\n/* Green */\n.hljs-string,\n.hljs-symbol,\n.hljs-bullet,\n.hljs-addition {\n  color: #8fc13e;\n}\n\n/* Aqua */\n.hljs-meta {\n  color: #149b93;\n}\n\n/* Blue */\n.hljs-function,\n.hljs-section,\n.hljs-title {\n  color: #1290bf;\n}\n\n/* Purple */\n.hljs-keyword,\n.hljs-selector-tag {\n  color: #c85e7c;\n}\n\n.hljs {\n  display: block;\n  background: #322931;\n  color: #b9b5b8;\n  padding: 0.5em;\n}\n\n.hljs-emphasis {\n  font-style: italic;\n}\n\n.hljs-strong {\n  font-weight: bold;\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/styles/hybrid.css",
    "content": "/*\n\nvim-hybrid theme by w0ng (https://github.com/w0ng/vim-hybrid)\n\n*/\n\n/*background color*/\n.hljs {\n  display: block;\n  overflow-x: auto;\n  padding: 0.5em;\n  background: #1d1f21;\n}\n\n/*selection color*/\n.hljs::selection,\n.hljs span::selection {\n  background: #373b41;\n}\n\n.hljs::-moz-selection,\n.hljs span::-moz-selection {\n  background: #373b41;\n}\n\n/*foreground color*/\n.hljs {\n  color: #c5c8c6;\n}\n\n/*color: fg_yellow*/\n.hljs-title,\n.hljs-name {\n  color: #f0c674;\n}\n\n/*color: fg_comment*/\n.hljs-comment,\n.hljs-meta,\n.hljs-meta .hljs-keyword {\n  color: #707880;\n}\n\n/*color: fg_red*/\n.hljs-number,\n.hljs-symbol,\n.hljs-literal,\n.hljs-deletion,\n.hljs-link {\n color: #cc6666\n}\n\n/*color: fg_green*/\n.hljs-string,\n.hljs-doctag,\n.hljs-addition,\n.hljs-regexp,\n.hljs-selector-attr,\n.hljs-selector-pseudo {\n  color: #b5bd68;\n}\n\n/*color: fg_purple*/\n.hljs-attribute,\n.hljs-code,\n.hljs-selector-id {\n color: #b294bb;\n}\n\n/*color: fg_blue*/\n.hljs-keyword,\n.hljs-selector-tag,\n.hljs-bullet,\n.hljs-tag {\n color: #81a2be;\n}\n\n/*color: fg_aqua*/\n.hljs-subst,\n.hljs-variable,\n.hljs-template-tag,\n.hljs-template-variable {\n  color: #8abeb7;\n}\n\n/*color: fg_orange*/\n.hljs-type,\n.hljs-built_in,\n.hljs-builtin-name,\n.hljs-quote,\n.hljs-section,\n.hljs-selector-class {\n  color: #de935f;\n}\n\n.hljs-emphasis {\n  font-style: italic;\n}\n\n.hljs-strong {\n  font-weight: bold;\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/styles/idea.css",
    "content": "/*\n\nIntellij Idea-like styling (c) Vasily Polovnyov <vast@whiteants.net>\n\n*/\n\n.hljs {\n  display: block;\n  overflow-x: auto;\n  padding: 0.5em;\n  color: #000;\n  background: #fff;\n}\n\n.hljs-subst,\n.hljs-title {\n  font-weight: normal;\n  color: #000;\n}\n\n.hljs-comment,\n.hljs-quote {\n  color: #808080;\n  font-style: italic;\n}\n\n.hljs-meta {\n  color: #808000;\n}\n\n.hljs-tag {\n  background: #efefef;\n}\n\n.hljs-section,\n.hljs-name,\n.hljs-literal,\n.hljs-keyword,\n.hljs-selector-tag,\n.hljs-type,\n.hljs-selector-id,\n.hljs-selector-class {\n  font-weight: bold;\n  color: #000080;\n}\n\n.hljs-attribute,\n.hljs-number,\n.hljs-regexp,\n.hljs-link {\n  font-weight: bold;\n  color: #0000ff;\n}\n\n.hljs-number,\n.hljs-regexp,\n.hljs-link {\n  font-weight: normal;\n}\n\n.hljs-string {\n  color: #008000;\n  font-weight: bold;\n}\n\n.hljs-symbol,\n.hljs-bullet,\n.hljs-formula {\n  color: #000;\n  background: #d0eded;\n  font-style: italic;\n}\n\n.hljs-doctag {\n  text-decoration: underline;\n}\n\n.hljs-variable,\n.hljs-template-variable {\n  color: #660e7a;\n}\n\n.hljs-addition {\n  background: #baeeba;\n}\n\n.hljs-deletion {\n  background: #ffc8bd;\n}\n\n.hljs-emphasis {\n  font-style: italic;\n}\n\n.hljs-strong {\n  font-weight: bold;\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/styles/ir-black.css",
    "content": "/*\n  IR_Black style (c) Vasily Mikhailitchenko <vaskas@programica.ru>\n*/\n\n.hljs {\n  display: block;\n  overflow-x: auto;\n  padding: 0.5em;\n  background: #000;\n  color: #f8f8f8;\n}\n\n.hljs-comment,\n.hljs-quote,\n.hljs-meta {\n  color: #7c7c7c;\n}\n\n.hljs-keyword,\n.hljs-selector-tag,\n.hljs-tag,\n.hljs-name {\n  color: #96cbfe;\n}\n\n.hljs-attribute,\n.hljs-selector-id {\n  color: #ffffb6;\n}\n\n.hljs-string,\n.hljs-selector-attr,\n.hljs-selector-pseudo,\n.hljs-addition {\n  color: #a8ff60;\n}\n\n.hljs-subst {\n  color: #daefa3;\n}\n\n.hljs-regexp,\n.hljs-link {\n  color: #e9c062;\n}\n\n.hljs-title,\n.hljs-section,\n.hljs-type,\n.hljs-doctag {\n  color: #ffffb6;\n}\n\n.hljs-symbol,\n.hljs-bullet,\n.hljs-variable,\n.hljs-template-variable,\n.hljs-literal {\n  color: #c6c5fe;\n}\n\n.hljs-number,\n.hljs-deletion {\n  color:#ff73fd;\n}\n\n.hljs-emphasis {\n  font-style: italic;\n}\n\n.hljs-strong {\n  font-weight: bold;\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/styles/kimbie.dark.css",
    "content": "/*\n    Name:     Kimbie (dark)\n    Author:   Jan T. Sott\n    License:  Creative Commons Attribution-ShareAlike 4.0 Unported License\n    URL:      https://github.com/idleberg/Kimbie-highlight.js\n*/\n\n/* Kimbie Comment */\n.hljs-comment,\n.hljs-quote {\n  color: #d6baad;\n}\n\n/* Kimbie Red */\n.hljs-variable,\n.hljs-template-variable,\n.hljs-tag,\n.hljs-name,\n.hljs-selector-id,\n.hljs-selector-class,\n.hljs-regexp,\n.hljs-meta {\n  color: #dc3958;\n}\n\n/* Kimbie Orange */\n.hljs-number,\n.hljs-built_in,\n.hljs-builtin-name,\n.hljs-literal,\n.hljs-type,\n.hljs-params,\n.hljs-deletion,\n.hljs-link {\n  color: #f79a32;\n}\n\n/* Kimbie Yellow */\n.hljs-title,\n.hljs-section,\n.hljs-attribute {\n  color: #f06431;\n}\n\n/* Kimbie Green */\n.hljs-string,\n.hljs-symbol,\n.hljs-bullet,\n.hljs-addition {\n  color: #889b4a;\n}\n\n/* Kimbie Purple */\n.hljs-keyword,\n.hljs-selector-tag,\n.hljs-function {\n  color: #98676a;\n}\n\n.hljs {\n  display: block;\n  overflow-x: auto;\n  background: #221a0f;\n  color: #d3af86;\n  padding: 0.5em;\n}\n\n.hljs-emphasis {\n  font-style: italic;\n}\n\n.hljs-strong {\n  font-weight: bold;\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/styles/kimbie.light.css",
    "content": "/*\n    Name:     Kimbie (light)\n    Author:   Jan T. Sott\n    License:  Creative Commons Attribution-ShareAlike 4.0 Unported License\n    URL:      https://github.com/idleberg/Kimbie-highlight.js\n*/\n\n/* Kimbie Comment */\n.hljs-comment,\n.hljs-quote {\n  color: #a57a4c;\n}\n\n/* Kimbie Red */\n.hljs-variable,\n.hljs-template-variable,\n.hljs-tag,\n.hljs-name,\n.hljs-selector-id,\n.hljs-selector-class,\n.hljs-regexp,\n.hljs-meta {\n  color: #dc3958;\n}\n\n/* Kimbie Orange */\n.hljs-number,\n.hljs-built_in,\n.hljs-builtin-name,\n.hljs-literal,\n.hljs-type,\n.hljs-params,\n.hljs-deletion,\n.hljs-link {\n  color: #f79a32;\n}\n\n/* Kimbie Yellow */\n.hljs-title,\n.hljs-section,\n.hljs-attribute {\n  color: #f06431;\n}\n\n/* Kimbie Green */\n.hljs-string,\n.hljs-symbol,\n.hljs-bullet,\n.hljs-addition {\n  color: #889b4a;\n}\n\n/* Kimbie Purple */\n.hljs-keyword,\n.hljs-selector-tag,\n.hljs-function {\n  color: #98676a;\n}\n\n.hljs {\n  display: block;\n  overflow-x: auto;\n  background: #fbebd4;\n  color: #84613d;\n  padding: 0.5em;\n}\n\n.hljs-emphasis {\n  font-style: italic;\n}\n\n.hljs-strong {\n  font-weight: bold;\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/styles/magula.css",
    "content": "/*\nDescription: Magula style for highligh.js\nAuthor: Ruslan Keba <rukeba@gmail.com>\nWebsite: http://rukeba.com/\nVersion: 1.0\nDate: 2009-01-03\nMusic: Aphex Twin / Xtal\n*/\n\n.hljs {\n  display: block;\n  overflow-x: auto;\n  padding: 0.5em;\n  background-color: #f4f4f4;\n}\n\n.hljs,\n.hljs-subst {\n  color: black;\n}\n\n.hljs-string,\n.hljs-title,\n.hljs-symbol,\n.hljs-bullet,\n.hljs-attribute,\n.hljs-addition,\n.hljs-variable,\n.hljs-template-tag,\n.hljs-template-variable {\n  color: #050;\n}\n\n.hljs-comment,\n.hljs-quote {\n  color: #777;\n}\n\n.hljs-number,\n.hljs-regexp,\n.hljs-literal,\n.hljs-type,\n.hljs-link {\n  color: #800;\n}\n\n.hljs-deletion,\n.hljs-meta {\n  color: #00e;\n}\n\n.hljs-keyword,\n.hljs-selector-tag,\n.hljs-doctag,\n.hljs-title,\n.hljs-section,\n.hljs-built_in,\n.hljs-tag,\n.hljs-name {\n  font-weight: bold;\n  color: navy;\n}\n\n.hljs-emphasis {\n  font-style: italic;\n}\n\n.hljs-strong {\n  font-weight: bold;\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/styles/mono-blue.css",
    "content": "/*\n  Five-color theme from a single blue hue.\n*/\n.hljs {\n  display: block;\n  overflow-x: auto;\n  padding: 0.5em;\n  background: #eaeef3;\n}\n\n.hljs {\n  color: #00193a;\n}\n\n.hljs-keyword,\n.hljs-selector-tag,\n.hljs-title,\n.hljs-section,\n.hljs-doctag,\n.hljs-name,\n.hljs-strong {\n  font-weight: bold;\n}\n\n.hljs-comment {\n  color: #738191;\n}\n\n.hljs-string,\n.hljs-title,\n.hljs-section,\n.hljs-built_in,\n.hljs-literal,\n.hljs-type,\n.hljs-addition,\n.hljs-tag,\n.hljs-quote,\n.hljs-name,\n.hljs-selector-id,\n.hljs-selector-class {\n  color: #0048ab;\n}\n\n.hljs-meta,\n.hljs-subst,\n.hljs-symbol,\n.hljs-regexp,\n.hljs-attribute,\n.hljs-deletion,\n.hljs-variable,\n.hljs-template-variable,\n.hljs-link,\n.hljs-bullet {\n  color: #4c81c9;\n}\n\n.hljs-emphasis {\n  font-style: italic;\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/styles/monokai-sublime.css",
    "content": "/*\n\nMonokai Sublime style. Derived from Monokai by noformnocontent http://nn.mit-license.org/\n\n*/\n\n.hljs {\n  display: block;\n  overflow-x: auto;\n  padding: 0.5em;\n  background: #23241f;\n}\n\n.hljs,\n.hljs-tag,\n.hljs-subst {\n  color: #f8f8f2;\n}\n\n.hljs-strong,\n.hljs-emphasis {\n  color: #a8a8a2;\n}\n\n.hljs-bullet,\n.hljs-quote,\n.hljs-number,\n.hljs-regexp,\n.hljs-literal,\n.hljs-link {\n  color: #ae81ff;\n}\n\n.hljs-code,\n.hljs-title,\n.hljs-section,\n.hljs-selector-class {\n  color: #a6e22e;\n}\n\n.hljs-strong {\n  font-weight: bold;\n}\n\n.hljs-emphasis {\n  font-style: italic;\n}\n\n.hljs-keyword,\n.hljs-selector-tag,\n.hljs-name,\n.hljs-attr {\n  color: #f92672;\n}\n\n.hljs-symbol,\n.hljs-attribute {\n  color: #66d9ef;\n}\n\n.hljs-params,\n.hljs-class .hljs-title {\n  color: #f8f8f2;\n}\n\n.hljs-string,\n.hljs-type,\n.hljs-built_in,\n.hljs-builtin-name,\n.hljs-selector-id,\n.hljs-selector-attr,\n.hljs-selector-pseudo,\n.hljs-addition,\n.hljs-variable,\n.hljs-template-variable {\n  color: #e6db74;\n}\n\n.hljs-comment,\n.hljs-deletion,\n.hljs-meta {\n  color: #75715e;\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/styles/monokai.css",
    "content": "/*\nMonokai style - ported by Luigi Maselli - http://grigio.org\n*/\n\n.hljs {\n  display: block;\n  overflow-x: auto;\n  padding: 0.5em;\n  background: #272822; color: #ddd;\n}\n\n.hljs-tag,\n.hljs-keyword,\n.hljs-selector-tag,\n.hljs-literal,\n.hljs-strong,\n.hljs-name {\n  color: #f92672;\n}\n\n.hljs-code {\n  color: #66d9ef;\n}\n\n.hljs-class .hljs-title {\n  color: white;\n}\n\n.hljs-attribute,\n.hljs-symbol,\n.hljs-regexp,\n.hljs-link {\n  color: #bf79db;\n}\n\n.hljs-string,\n.hljs-bullet,\n.hljs-subst,\n.hljs-title,\n.hljs-section,\n.hljs-emphasis,\n.hljs-type,\n.hljs-built_in,\n.hljs-builtin-name,\n.hljs-selector-attr,\n.hljs-selector-pseudo,\n.hljs-addition,\n.hljs-variable,\n.hljs-template-tag,\n.hljs-template-variable {\n  color: #a6e22e;\n}\n\n.hljs-comment,\n.hljs-quote,\n.hljs-deletion,\n.hljs-meta {\n  color: #75715e;\n}\n\n.hljs-keyword,\n.hljs-selector-tag,\n.hljs-literal,\n.hljs-doctag,\n.hljs-title,\n.hljs-section,\n.hljs-type,\n.hljs-selector-id {\n  font-weight: bold;\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/styles/obsidian.css",
    "content": "/**\n * Obsidian style\n * ported by Alexander Marenin (http://github.com/ioncreature)\n */\n\n.hljs {\n  display: block;\n  overflow-x: auto;\n  padding: 0.5em;\n  background: #282b2e;\n}\n\n.hljs-keyword,\n.hljs-selector-tag,\n.hljs-literal,\n.hljs-selector-id {\n  color: #93c763;\n}\n\n.hljs-number {\n  color: #ffcd22;\n}\n\n.hljs {\n  color: #e0e2e4;\n}\n\n.hljs-attribute {\n  color: #668bb0;\n}\n\n.hljs-code,\n.hljs-class .hljs-title,\n.hljs-section {\n  color: white;\n}\n\n.hljs-regexp,\n.hljs-link {\n  color: #d39745;\n}\n\n.hljs-meta {\n  color: #557182;\n}\n\n.hljs-tag,\n.hljs-name,\n.hljs-bullet,\n.hljs-subst,\n.hljs-emphasis,\n.hljs-type,\n.hljs-built_in,\n.hljs-selector-attr,\n.hljs-selector-pseudo,\n.hljs-addition,\n.hljs-variable,\n.hljs-template-tag,\n.hljs-template-variable {\n  color: #8cbbad;\n}\n\n.hljs-string,\n.hljs-symbol {\n  color: #ec7600;\n}\n\n.hljs-comment,\n.hljs-quote,\n.hljs-deletion {\n  color: #818e96;\n}\n\n.hljs-selector-class {\n  color: #A082BD\n}\n\n.hljs-keyword,\n.hljs-selector-tag,\n.hljs-literal,\n.hljs-doctag,\n.hljs-title,\n.hljs-section,\n.hljs-type,\n.hljs-name,\n.hljs-strong {\n  font-weight: bold;\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/styles/ocean.css",
    "content": "/* Ocean Dark Theme */\n/* https://github.com/gavsiu */\n/* Original theme - https://github.com/chriskempson/base16 */\n\n/* Ocean Comment */\n.hljs-comment,\n.hljs-quote {\n  color: #65737e;\n}\n\n/* Ocean Red */\n.hljs-variable,\n.hljs-template-variable,\n.hljs-tag,\n.hljs-name,\n.hljs-selector-id,\n.hljs-selector-class,\n.hljs-regexp,\n.hljs-deletion {\n  color: #bf616a;\n}\n\n/* Ocean Orange */\n.hljs-number,\n.hljs-built_in,\n.hljs-builtin-name,\n.hljs-literal,\n.hljs-type,\n.hljs-params,\n.hljs-meta,\n.hljs-link {\n  color: #d08770;\n}\n\n/* Ocean Yellow */\n.hljs-attribute {\n  color: #ebcb8b;\n}\n\n/* Ocean Green */\n.hljs-string,\n.hljs-symbol,\n.hljs-bullet,\n.hljs-addition {\n  color: #a3be8c;\n}\n\n/* Ocean Blue */\n.hljs-title,\n.hljs-section {\n  color: #8fa1b3;\n}\n\n/* Ocean Purple */\n.hljs-keyword,\n.hljs-selector-tag {\n  color: #b48ead;\n}\n\n.hljs {\n  display: block;\n  overflow-x: auto;\n  background: #2b303b;\n  color: #c0c5ce;\n  padding: 0.5em;\n}\n\n.hljs-emphasis {\n  font-style: italic;\n}\n\n.hljs-strong {\n  font-weight: bold;\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/styles/paraiso-dark.css",
    "content": "/*\n    Paraíso (dark)\n    Created by Jan T. Sott (http://github.com/idleberg)\n    Inspired by the art of Rubens LP (http://www.rubenslp.com.br)\n*/\n\n/* Paraíso Comment */\n.hljs-comment,\n.hljs-quote {\n  color: #8d8687;\n}\n\n/* Paraíso Red */\n.hljs-variable,\n.hljs-template-variable,\n.hljs-tag,\n.hljs-name,\n.hljs-selector-id,\n.hljs-selector-class,\n.hljs-regexp,\n.hljs-link,\n.hljs-meta {\n  color: #ef6155;\n}\n\n/* Paraíso Orange */\n.hljs-number,\n.hljs-built_in,\n.hljs-builtin-name,\n.hljs-literal,\n.hljs-type,\n.hljs-params,\n.hljs-deletion {\n  color: #f99b15;\n}\n\n/* Paraíso Yellow */\n.hljs-title,\n.hljs-section,\n.hljs-attribute {\n  color: #fec418;\n}\n\n/* Paraíso Green */\n.hljs-string,\n.hljs-symbol,\n.hljs-bullet,\n.hljs-addition {\n  color: #48b685;\n}\n\n/* Paraíso Purple */\n.hljs-keyword,\n.hljs-selector-tag {\n  color: #815ba4;\n}\n\n.hljs {\n  display: block;\n  overflow-x: auto;\n  background: #2f1e2e;\n  color: #a39e9b;\n  padding: 0.5em;\n}\n\n.hljs-emphasis {\n  font-style: italic;\n}\n\n.hljs-strong {\n  font-weight: bold;\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/styles/paraiso-light.css",
    "content": "/*\n    Paraíso (light)\n    Created by Jan T. Sott (http://github.com/idleberg)\n    Inspired by the art of Rubens LP (http://www.rubenslp.com.br)\n*/\n\n/* Paraíso Comment */\n.hljs-comment,\n.hljs-quote {\n  color: #776e71;\n}\n\n/* Paraíso Red */\n.hljs-variable,\n.hljs-template-variable,\n.hljs-tag,\n.hljs-name,\n.hljs-selector-id,\n.hljs-selector-class,\n.hljs-regexp,\n.hljs-link,\n.hljs-meta {\n  color: #ef6155;\n}\n\n/* Paraíso Orange */\n.hljs-number,\n.hljs-built_in,\n.hljs-builtin-name,\n.hljs-literal,\n.hljs-type,\n.hljs-params,\n.hljs-deletion {\n  color: #f99b15;\n}\n\n/* Paraíso Yellow */\n.hljs-title,\n.hljs-section,\n.hljs-attribute {\n  color: #fec418;\n}\n\n/* Paraíso Green */\n.hljs-string,\n.hljs-symbol,\n.hljs-bullet,\n.hljs-addition {\n  color: #48b685;\n}\n\n/* Paraíso Purple */\n.hljs-keyword,\n.hljs-selector-tag {\n  color: #815ba4;\n}\n\n.hljs {\n  display: block;\n  overflow-x: auto;\n  background: #e7e9db;\n  color: #4f424c;\n  padding: 0.5em;\n}\n\n.hljs-emphasis {\n  font-style: italic;\n}\n\n.hljs-strong {\n  font-weight: bold;\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/styles/pojoaque.css",
    "content": "/*\n\nPojoaque Style by Jason Tate\nhttp://web-cms-designs.com/ftopict-10-pojoaque-style-for-highlight-js-code-highlighter.html\nBased on Solarized Style from http://ethanschoonover.com/solarized\n\n*/\n\n.hljs {\n  display: block;\n  overflow-x: auto;\n  padding: 0.5em;\n  color: #dccf8f;\n  background: url(./pojoaque.jpg) repeat scroll left top #181914;\n}\n\n.hljs-comment,\n.hljs-quote {\n  color: #586e75;\n  font-style: italic;\n}\n\n.hljs-keyword,\n.hljs-selector-tag,\n.hljs-literal,\n.hljs-addition {\n  color: #b64926;\n}\n\n.hljs-number,\n.hljs-string,\n.hljs-doctag,\n.hljs-regexp {\n  color: #468966;\n}\n\n.hljs-title,\n.hljs-section,\n.hljs-built_in,\n.hljs-name {\n  color: #ffb03b;\n}\n\n.hljs-variable,\n.hljs-template-variable,\n.hljs-class .hljs-title,\n.hljs-type,\n.hljs-tag {\n  color: #b58900;\n}\n\n.hljs-attribute {\n  color: #b89859;\n}\n\n.hljs-symbol,\n.hljs-bullet,\n.hljs-link,\n.hljs-subst,\n.hljs-meta {\n  color: #cb4b16;\n}\n\n.hljs-deletion {\n  color: #dc322f;\n}\n\n.hljs-selector-id,\n.hljs-selector-class {\n  color: #d3a60c;\n}\n\n.hljs-formula {\n  background: #073642;\n}\n\n.hljs-emphasis {\n  font-style: italic;\n}\n\n.hljs-strong {\n  font-weight: bold;\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/styles/purebasic.css",
    "content": "/*\n\nPureBASIC native IDE style ( version 1.0 - April 2016 )\n\nby Tristano Ajmone <tajmone@gmail.com>\n\nPublic Domain\n\nNOTE_1:\tPureBASIC code syntax highlighting only applies the following classes:\n\t\t\t.hljs-comment\n\t\t\t.hljs-function\n\t\t\t.hljs-keywords\n\t\t\t.hljs-string\n\t\t\t.hljs-symbol\n\n\t\tOther classes are added here for the benefit of styling other languages with the look and feel of PureBASIC native IDE style.\n\t\tIf you need to customize a stylesheet for PureBASIC only, remove all non-relevant classes -- PureBASIC-related classes are followed by\n\t\ta \"--- used for PureBASIC ... ---\" comment on same line.\n\nNOTE_2:\tColor names provided in comments were derived using \"Name that Color\" online tool:\n\t\t\thttp://chir.ag/projects/name-that-color\n*/\n\n.hljs { /* Common set of rules required by highlight.js (don'r remove!) */\n\tdisplay: block;\n\toverflow-x: auto;\n\tpadding: 0.5em;\n\tbackground: #FFFFDF; /* Half and Half (approx.) */\n/* --- Uncomment to add PureBASIC native IDE styled font!\n\tfont-family: Consolas;\n*/\n}\n\n.hljs, /* --- used for PureBASIC base color --- */\n.hljs-type,  /* --- used for PureBASIC Procedures return type --- */\n.hljs-function, /* --- used for wrapping PureBASIC Procedures definitions --- */\n.hljs-name,\n.hljs-number,\n.hljs-attr,\n.hljs-params,\n.hljs-subst {\n\tcolor: #000000; /* Black */\n}\n\n.hljs-comment, /* --- used for PureBASIC Comments --- */\n.hljs-regexp,\n.hljs-section,\n.hljs-selector-pseudo,\n.hljs-addition {\n\tcolor: #00AAAA; /* Persian Green (approx.) */\n}\n\n.hljs-title, /* --- used for PureBASIC Procedures Names --- */\n.hljs-tag,\n.hljs-variable,\n.hljs-code  {\n\tcolor: #006666; /* Blue Stone (approx.) */\n}\n\n.hljs-keyword, /* --- used for PureBASIC Keywords --- */\n.hljs-class,\n.hljs-meta-keyword,\n.hljs-selector-class,\n.hljs-built_in,\n.hljs-builtin-name {\n\tcolor: #006666; /* Blue Stone (approx.) */\n\tfont-weight: bold;\n}\n\n.hljs-string, /* --- used for PureBASIC Strings --- */\n.hljs-selector-attr {\n\tcolor: #0080FF; /* Azure Radiance (approx.) */\n}\n\n.hljs-symbol, /* --- used for PureBASIC Constants --- */\n.hljs-link,\n.hljs-deletion,\n.hljs-attribute {\n\tcolor: #924B72; /* Cannon Pink (approx.) */\n}\n\n.hljs-meta,\n.hljs-literal,\n.hljs-selector-id {\n\tcolor: #924B72; /* Cannon Pink (approx.) */\n\tfont-weight: bold;\n}\n\n.hljs-strong,\n.hljs-name {\n\tfont-weight: bold;\n}\n\n.hljs-emphasis {\n\tfont-style: italic;\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/styles/qtcreator_dark.css",
    "content": "/*\n\nQt Creator dark color scheme\n\n*/\n\n\n.hljs {\n  display: block;\n  overflow-x: auto;\n  padding: 0.5em;\n  background: #000000;\n}\n\n.hljs,\n.hljs-subst,\n.hljs-tag,\n.hljs-title {\n  color: #aaaaaa;\n}\n\n.hljs-strong,\n.hljs-emphasis {\n  color: #a8a8a2;\n}\n\n.hljs-bullet,\n.hljs-quote,\n.hljs-number,\n.hljs-regexp,\n.hljs-literal {\n  color: #ff55ff;\n}\n\n.hljs-code\n.hljs-selector-class {\n  color: #aaaaff;\n}\n\n.hljs-emphasis,\n.hljs-stronge,\n.hljs-type {\n  font-style: italic;\n}\n\n.hljs-keyword,\n.hljs-selector-tag,\n.hljs-function,\n.hljs-section,\n.hljs-symbol,\n.hljs-name {\n  color: #ffff55;\n}\n\n.hljs-attribute {\n  color: #ff5555;\n}\n\n.hljs-variable,\n.hljs-params,\n.hljs-class .hljs-title {\n  color: #8888ff;\n}\n\n.hljs-string,\n.hljs-selector-id,\n.hljs-selector-attr,\n.hljs-selector-pseudo,\n.hljs-type,\n.hljs-built_in,\n.hljs-builtin-name,\n.hljs-template-tag,\n.hljs-template-variable,\n.hljs-addition,\n.hljs-link {\n  color: #ff55ff;\n}\n\n.hljs-comment,\n.hljs-meta,\n.hljs-deletion {\n  color: #55ffff;\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/styles/qtcreator_light.css",
    "content": "/*\n\nQt Creator light color scheme\n\n*/\n\n\n.hljs {\n  display: block;\n  overflow-x: auto;\n  padding: 0.5em;\n  background: #ffffff;\n}\n\n.hljs,\n.hljs-subst,\n.hljs-tag,\n.hljs-title {\n  color: #000000;\n}\n\n.hljs-strong,\n.hljs-emphasis {\n  color: #000000;\n}\n\n.hljs-bullet,\n.hljs-quote,\n.hljs-number,\n.hljs-regexp,\n.hljs-literal {\n  color: #000080;\n}\n\n.hljs-code\n.hljs-selector-class {\n  color: #800080;\n}\n\n.hljs-emphasis,\n.hljs-stronge,\n.hljs-type {\n  font-style: italic;\n}\n\n.hljs-keyword,\n.hljs-selector-tag,\n.hljs-function,\n.hljs-section,\n.hljs-symbol,\n.hljs-name {\n  color: #808000;\n}\n\n.hljs-attribute {\n  color: #800000;\n}\n\n.hljs-variable,\n.hljs-params,\n.hljs-class .hljs-title {\n  color: #0055AF;\n}\n\n.hljs-string,\n.hljs-selector-id,\n.hljs-selector-attr,\n.hljs-selector-pseudo,\n.hljs-type,\n.hljs-built_in,\n.hljs-builtin-name,\n.hljs-template-tag,\n.hljs-template-variable,\n.hljs-addition,\n.hljs-link {\n  color: #008000;\n}\n\n.hljs-comment,\n.hljs-meta,\n.hljs-deletion {\n  color: #008000;\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/styles/railscasts.css",
    "content": "/*\n\nRailscasts-like style (c) Visoft, Inc. (Damien White)\n\n*/\n\n.hljs {\n  display: block;\n  overflow-x: auto;\n  padding: 0.5em;\n  background: #232323;\n  color: #e6e1dc;\n}\n\n.hljs-comment,\n.hljs-quote {\n  color: #bc9458;\n  font-style: italic;\n}\n\n.hljs-keyword,\n.hljs-selector-tag {\n  color: #c26230;\n}\n\n.hljs-string,\n.hljs-number,\n.hljs-regexp,\n.hljs-variable,\n.hljs-template-variable {\n  color: #a5c261;\n}\n\n.hljs-subst {\n  color: #519f50;\n}\n\n.hljs-tag,\n.hljs-name {\n  color: #e8bf6a;\n}\n\n.hljs-type {\n  color: #da4939;\n}\n\n\n.hljs-symbol,\n.hljs-bullet,\n.hljs-built_in,\n.hljs-builtin-name,\n.hljs-attr,\n.hljs-link {\n  color: #6d9cbe;\n}\n\n.hljs-params {\n  color: #d0d0ff;\n}\n\n.hljs-attribute {\n  color: #cda869;\n}\n\n.hljs-meta {\n  color: #9b859d;\n}\n\n.hljs-title,\n.hljs-section {\n  color: #ffc66d;\n}\n\n.hljs-addition {\n  background-color: #144212;\n  color: #e6e1dc;\n  display: inline-block;\n  width: 100%;\n}\n\n.hljs-deletion {\n  background-color: #600;\n  color: #e6e1dc;\n  display: inline-block;\n  width: 100%;\n}\n\n.hljs-selector-class {\n  color: #9b703f;\n}\n\n.hljs-selector-id {\n  color: #8b98ab;\n}\n\n.hljs-emphasis {\n  font-style: italic;\n}\n\n.hljs-strong {\n  font-weight: bold;\n}\n\n.hljs-link {\n  text-decoration: underline;\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/styles/rainbow.css",
    "content": "/*\n\nStyle with support for rainbow parens\n\n*/\n\n.hljs {\n  display: block;\n  overflow-x: auto;\n  padding: 0.5em;\n  background: #474949;\n  color: #d1d9e1;\n}\n\n\n.hljs-comment,\n.hljs-quote {\n  color: #969896;\n  font-style: italic;\n}\n\n.hljs-keyword,\n.hljs-selector-tag,\n.hljs-literal,\n.hljs-type,\n.hljs-addition {\n  color: #cc99cc;\n}\n\n.hljs-number,\n.hljs-selector-attr,\n.hljs-selector-pseudo {\n  color: #f99157;\n}\n\n.hljs-string,\n.hljs-doctag,\n.hljs-regexp {\n  color: #8abeb7;\n}\n\n.hljs-title,\n.hljs-name,\n.hljs-section,\n.hljs-built_in {\n  color: #b5bd68;\n}\n\n.hljs-variable,\n.hljs-template-variable,\n.hljs-selector-id,\n.hljs-class .hljs-title {\n   color: #ffcc66;\n}\n\n.hljs-section,\n.hljs-name,\n.hljs-strong {\n  font-weight: bold;\n}\n\n.hljs-symbol,\n.hljs-bullet,\n.hljs-subst,\n.hljs-meta,\n.hljs-link {\n  color: #f99157;\n}\n\n.hljs-deletion {\n  color: #dc322f;\n}\n\n.hljs-formula {\n  background: #eee8d5;\n}\n\n.hljs-attr,\n.hljs-attribute {\n  color: #81a2be;\n}\n\n.hljs-emphasis {\n  font-style: italic;\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/styles/school-book.css",
    "content": "/*\n\nSchool Book style from goldblog.com.ua (c) Zaripov Yura <yur4ik7@ukr.net>\n\n*/\n\n.hljs {\n  display: block;\n  overflow-x: auto;\n  padding: 15px 0.5em 0.5em 30px;\n  font-size: 11px;\n  line-height:16px;\n}\n\npre{\n  background:#f6f6ae url(./school-book.png);\n  border-top: solid 2px #d2e8b9;\n  border-bottom: solid 1px #d2e8b9;\n}\n\n.hljs-keyword,\n.hljs-selector-tag,\n.hljs-literal {\n  color:#005599;\n  font-weight:bold;\n}\n\n.hljs,\n.hljs-subst {\n  color: #3e5915;\n}\n\n.hljs-string,\n.hljs-title,\n.hljs-section,\n.hljs-type,\n.hljs-symbol,\n.hljs-bullet,\n.hljs-attribute,\n.hljs-built_in,\n.hljs-builtin-name,\n.hljs-addition,\n.hljs-variable,\n.hljs-template-tag,\n.hljs-template-variable,\n.hljs-link {\n  color: #2c009f;\n}\n\n.hljs-comment,\n.hljs-quote,\n.hljs-deletion,\n.hljs-meta {\n  color: #e60415;\n}\n\n.hljs-keyword,\n.hljs-selector-tag,\n.hljs-literal,\n.hljs-doctag,\n.hljs-title,\n.hljs-section,\n.hljs-type,\n.hljs-name,\n.hljs-selector-id,\n.hljs-strong {\n  font-weight: bold;\n}\n\n.hljs-emphasis {\n  font-style: italic;\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/styles/solarized-dark.css",
    "content": "/*\n\nOrginal Style from ethanschoonover.com/solarized (c) Jeremy Hull <sourdrums@gmail.com>\n\n*/\n\n.hljs {\n  display: block;\n  overflow-x: auto;\n  padding: 0.5em;\n  background: #002b36;\n  color: #839496;\n}\n\n.hljs-comment,\n.hljs-quote {\n  color: #586e75;\n}\n\n/* Solarized Green */\n.hljs-keyword,\n.hljs-selector-tag,\n.hljs-addition {\n  color: #859900;\n}\n\n/* Solarized Cyan */\n.hljs-number,\n.hljs-string,\n.hljs-meta .hljs-meta-string,\n.hljs-literal,\n.hljs-doctag,\n.hljs-regexp {\n  color: #2aa198;\n}\n\n/* Solarized Blue */\n.hljs-title,\n.hljs-section,\n.hljs-name,\n.hljs-selector-id,\n.hljs-selector-class {\n  color: #268bd2;\n}\n\n/* Solarized Yellow */\n.hljs-attribute,\n.hljs-attr,\n.hljs-variable,\n.hljs-template-variable,\n.hljs-class .hljs-title,\n.hljs-type {\n  color: #b58900;\n}\n\n/* Solarized Orange */\n.hljs-symbol,\n.hljs-bullet,\n.hljs-subst,\n.hljs-meta,\n.hljs-meta .hljs-keyword,\n.hljs-selector-attr,\n.hljs-selector-pseudo,\n.hljs-link {\n  color: #cb4b16;\n}\n\n/* Solarized Red */\n.hljs-built_in,\n.hljs-deletion {\n  color: #dc322f;\n}\n\n.hljs-formula {\n  background: #073642;\n}\n\n.hljs-emphasis {\n  font-style: italic;\n}\n\n.hljs-strong {\n  font-weight: bold;\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/styles/solarized-light.css",
    "content": "/*\n\nOrginal Style from ethanschoonover.com/solarized (c) Jeremy Hull <sourdrums@gmail.com>\n\n*/\n\n.hljs {\n  display: block;\n  overflow-x: auto;\n  padding: 0.5em;\n  background: #fdf6e3;\n  color: #657b83;\n}\n\n.hljs-comment,\n.hljs-quote {\n  color: #93a1a1;\n}\n\n/* Solarized Green */\n.hljs-keyword,\n.hljs-selector-tag,\n.hljs-addition {\n  color: #859900;\n}\n\n/* Solarized Cyan */\n.hljs-number,\n.hljs-string,\n.hljs-meta .hljs-meta-string,\n.hljs-literal,\n.hljs-doctag,\n.hljs-regexp {\n  color: #2aa198;\n}\n\n/* Solarized Blue */\n.hljs-title,\n.hljs-section,\n.hljs-name,\n.hljs-selector-id,\n.hljs-selector-class {\n  color: #268bd2;\n}\n\n/* Solarized Yellow */\n.hljs-attribute,\n.hljs-attr,\n.hljs-variable,\n.hljs-template-variable,\n.hljs-class .hljs-title,\n.hljs-type {\n  color: #b58900;\n}\n\n/* Solarized Orange */\n.hljs-symbol,\n.hljs-bullet,\n.hljs-subst,\n.hljs-meta,\n.hljs-meta .hljs-keyword,\n.hljs-selector-attr,\n.hljs-selector-pseudo,\n.hljs-link {\n  color: #cb4b16;\n}\n\n/* Solarized Red */\n.hljs-built_in,\n.hljs-deletion {\n  color: #dc322f;\n}\n\n.hljs-formula {\n  background: #eee8d5;\n}\n\n.hljs-emphasis {\n  font-style: italic;\n}\n\n.hljs-strong {\n  font-weight: bold;\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/styles/sunburst.css",
    "content": "/*\n\nSunburst-like style (c) Vasily Polovnyov <vast@whiteants.net>\n\n*/\n\n.hljs {\n  display: block;\n  overflow-x: auto;\n  padding: 0.5em;\n  background: #000;\n  color: #f8f8f8;\n}\n\n.hljs-comment,\n.hljs-quote {\n  color: #aeaeae;\n  font-style: italic;\n}\n\n.hljs-keyword,\n.hljs-selector-tag,\n.hljs-type {\n  color: #e28964;\n}\n\n.hljs-string {\n  color: #65b042;\n}\n\n.hljs-subst {\n  color: #daefa3;\n}\n\n.hljs-regexp,\n.hljs-link {\n  color: #e9c062;\n}\n\n.hljs-title,\n.hljs-section,\n.hljs-tag,\n.hljs-name {\n  color: #89bdff;\n}\n\n.hljs-class .hljs-title,\n.hljs-doctag {\n  text-decoration: underline;\n}\n\n.hljs-symbol,\n.hljs-bullet,\n.hljs-number {\n  color: #3387cc;\n}\n\n.hljs-params,\n.hljs-variable,\n.hljs-template-variable {\n  color: #3e87e3;\n}\n\n.hljs-attribute {\n  color: #cda869;\n}\n\n.hljs-meta {\n  color: #8996a8;\n}\n\n.hljs-formula {\n  background-color: #0e2231;\n  color: #f8f8f8;\n  font-style: italic;\n}\n\n.hljs-addition {\n  background-color: #253b22;\n  color: #f8f8f8;\n}\n\n.hljs-deletion {\n  background-color: #420e09;\n  color: #f8f8f8;\n}\n\n.hljs-selector-class {\n  color: #9b703f;\n}\n\n.hljs-selector-id {\n  color: #8b98ab;\n}\n\n.hljs-emphasis {\n  font-style: italic;\n}\n\n.hljs-strong {\n  font-weight: bold;\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/styles/tomorrow-night-blue.css",
    "content": "/* Tomorrow Night Blue Theme */\n/* http://jmblog.github.com/color-themes-for-google-code-highlightjs */\n/* Original theme - https://github.com/chriskempson/tomorrow-theme */\n/* http://jmblog.github.com/color-themes-for-google-code-highlightjs */\n\n/* Tomorrow Comment */\n.hljs-comment,\n.hljs-quote {\n  color: #7285b7;\n}\n\n/* Tomorrow Red */\n.hljs-variable,\n.hljs-template-variable,\n.hljs-tag,\n.hljs-name,\n.hljs-selector-id,\n.hljs-selector-class,\n.hljs-regexp,\n.hljs-deletion {\n  color: #ff9da4;\n}\n\n/* Tomorrow Orange */\n.hljs-number,\n.hljs-built_in,\n.hljs-builtin-name,\n.hljs-literal,\n.hljs-type,\n.hljs-params,\n.hljs-meta,\n.hljs-link {\n  color: #ffc58f;\n}\n\n/* Tomorrow Yellow */\n.hljs-attribute {\n  color: #ffeead;\n}\n\n/* Tomorrow Green */\n.hljs-string,\n.hljs-symbol,\n.hljs-bullet,\n.hljs-addition {\n  color: #d1f1a9;\n}\n\n/* Tomorrow Blue */\n.hljs-title,\n.hljs-section {\n  color: #bbdaff;\n}\n\n/* Tomorrow Purple */\n.hljs-keyword,\n.hljs-selector-tag {\n  color: #ebbbff;\n}\n\n.hljs {\n  display: block;\n  overflow-x: auto;\n  background: #002451;\n  color: white;\n  padding: 0.5em;\n}\n\n.hljs-emphasis {\n  font-style: italic;\n}\n\n.hljs-strong {\n  font-weight: bold;\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/styles/tomorrow-night-bright.css",
    "content": "/* Tomorrow Night Bright Theme */\n/* Original theme - https://github.com/chriskempson/tomorrow-theme */\n/* http://jmblog.github.com/color-themes-for-google-code-highlightjs */\n\n/* Tomorrow Comment */\n.hljs-comment,\n.hljs-quote {\n  color: #969896;\n}\n\n/* Tomorrow Red */\n.hljs-variable,\n.hljs-template-variable,\n.hljs-tag,\n.hljs-name,\n.hljs-selector-id,\n.hljs-selector-class,\n.hljs-regexp,\n.hljs-deletion {\n  color: #d54e53;\n}\n\n/* Tomorrow Orange */\n.hljs-number,\n.hljs-built_in,\n.hljs-builtin-name,\n.hljs-literal,\n.hljs-type,\n.hljs-params,\n.hljs-meta,\n.hljs-link {\n  color: #e78c45;\n}\n\n/* Tomorrow Yellow */\n.hljs-attribute {\n  color: #e7c547;\n}\n\n/* Tomorrow Green */\n.hljs-string,\n.hljs-symbol,\n.hljs-bullet,\n.hljs-addition {\n  color: #b9ca4a;\n}\n\n/* Tomorrow Blue */\n.hljs-title,\n.hljs-section {\n  color: #7aa6da;\n}\n\n/* Tomorrow Purple */\n.hljs-keyword,\n.hljs-selector-tag {\n  color: #c397d8;\n}\n\n.hljs {\n  display: block;\n  overflow-x: auto;\n  background: black;\n  color: #eaeaea;\n  padding: 0.5em;\n}\n\n.hljs-emphasis {\n  font-style: italic;\n}\n\n.hljs-strong {\n  font-weight: bold;\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/styles/tomorrow-night-eighties.css",
    "content": "/* Tomorrow Night Eighties Theme */\n/* Original theme - https://github.com/chriskempson/tomorrow-theme */\n/* http://jmblog.github.com/color-themes-for-google-code-highlightjs */\n\n/* Tomorrow Comment */\n.hljs-comment,\n.hljs-quote {\n  color: #999999;\n}\n\n/* Tomorrow Red */\n.hljs-variable,\n.hljs-template-variable,\n.hljs-tag,\n.hljs-name,\n.hljs-selector-id,\n.hljs-selector-class,\n.hljs-regexp,\n.hljs-deletion {\n  color: #f2777a;\n}\n\n/* Tomorrow Orange */\n.hljs-number,\n.hljs-built_in,\n.hljs-builtin-name,\n.hljs-literal,\n.hljs-type,\n.hljs-params,\n.hljs-meta,\n.hljs-link {\n  color: #f99157;\n}\n\n/* Tomorrow Yellow */\n.hljs-attribute {\n  color: #ffcc66;\n}\n\n/* Tomorrow Green */\n.hljs-string,\n.hljs-symbol,\n.hljs-bullet,\n.hljs-addition {\n  color: #99cc99;\n}\n\n/* Tomorrow Blue */\n.hljs-title,\n.hljs-section {\n  color: #6699cc;\n}\n\n/* Tomorrow Purple */\n.hljs-keyword,\n.hljs-selector-tag {\n  color: #cc99cc;\n}\n\n.hljs {\n  display: block;\n  overflow-x: auto;\n  background: #2d2d2d;\n  color: #cccccc;\n  padding: 0.5em;\n}\n\n.hljs-emphasis {\n  font-style: italic;\n}\n\n.hljs-strong {\n  font-weight: bold;\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/styles/tomorrow-night.css",
    "content": "/* Tomorrow Night Theme */\n/* http://jmblog.github.com/color-themes-for-google-code-highlightjs */\n/* Original theme - https://github.com/chriskempson/tomorrow-theme */\n/* http://jmblog.github.com/color-themes-for-google-code-highlightjs */\n\n/* Tomorrow Comment */\n.hljs-comment,\n.hljs-quote {\n  color: #969896;\n}\n\n/* Tomorrow Red */\n.hljs-variable,\n.hljs-template-variable,\n.hljs-tag,\n.hljs-name,\n.hljs-selector-id,\n.hljs-selector-class,\n.hljs-regexp,\n.hljs-deletion {\n  color: #cc6666;\n}\n\n/* Tomorrow Orange */\n.hljs-number,\n.hljs-built_in,\n.hljs-builtin-name,\n.hljs-literal,\n.hljs-type,\n.hljs-params,\n.hljs-meta,\n.hljs-link {\n  color: #de935f;\n}\n\n/* Tomorrow Yellow */\n.hljs-attribute {\n  color: #f0c674;\n}\n\n/* Tomorrow Green */\n.hljs-string,\n.hljs-symbol,\n.hljs-bullet,\n.hljs-addition {\n  color: #b5bd68;\n}\n\n/* Tomorrow Blue */\n.hljs-title,\n.hljs-section {\n  color: #81a2be;\n}\n\n/* Tomorrow Purple */\n.hljs-keyword,\n.hljs-selector-tag {\n  color: #b294bb;\n}\n\n.hljs {\n  display: block;\n  overflow-x: auto;\n  background: #1d1f21;\n  color: #c5c8c6;\n  padding: 0.5em;\n}\n\n.hljs-emphasis {\n  font-style: italic;\n}\n\n.hljs-strong {\n  font-weight: bold;\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/styles/tomorrow.css",
    "content": "/* http://jmblog.github.com/color-themes-for-google-code-highlightjs */\n\n/* Tomorrow Comment */\n.hljs-comment,\n.hljs-quote {\n  color: #8e908c;\n}\n\n/* Tomorrow Red */\n.hljs-variable,\n.hljs-template-variable,\n.hljs-tag,\n.hljs-name,\n.hljs-selector-id,\n.hljs-selector-class,\n.hljs-regexp,\n.hljs-deletion {\n  color: #c82829;\n}\n\n/* Tomorrow Orange */\n.hljs-number,\n.hljs-built_in,\n.hljs-builtin-name,\n.hljs-literal,\n.hljs-type,\n.hljs-params,\n.hljs-meta,\n.hljs-link {\n  color: #f5871f;\n}\n\n/* Tomorrow Yellow */\n.hljs-attribute {\n  color: #eab700;\n}\n\n/* Tomorrow Green */\n.hljs-string,\n.hljs-symbol,\n.hljs-bullet,\n.hljs-addition {\n  color: #718c00;\n}\n\n/* Tomorrow Blue */\n.hljs-title,\n.hljs-section {\n  color: #4271ae;\n}\n\n/* Tomorrow Purple */\n.hljs-keyword,\n.hljs-selector-tag {\n  color: #8959a8;\n}\n\n.hljs {\n  display: block;\n  overflow-x: auto;\n  background: white;\n  color: #4d4d4c;\n  padding: 0.5em;\n}\n\n.hljs-emphasis {\n  font-style: italic;\n}\n\n.hljs-strong {\n  font-weight: bold;\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/styles/vs.css",
    "content": "/*\n\nVisual Studio-like style based on original C# coloring by Jason Diamond <jason@diamond.name>\n\n*/\n.hljs {\n  display: block;\n  overflow-x: auto;\n  padding: 0.5em;\n  background: white;\n  color: black;\n}\n\n.hljs-comment,\n.hljs-quote,\n.hljs-variable {\n  color: #008000;\n}\n\n.hljs-keyword,\n.hljs-selector-tag,\n.hljs-built_in,\n.hljs-name,\n.hljs-tag {\n  color: #00f;\n}\n\n.hljs-string,\n.hljs-title,\n.hljs-section,\n.hljs-attribute,\n.hljs-literal,\n.hljs-template-tag,\n.hljs-template-variable,\n.hljs-type,\n.hljs-addition {\n  color: #a31515;\n}\n\n.hljs-deletion,\n.hljs-selector-attr,\n.hljs-selector-pseudo,\n.hljs-meta {\n  color: #2b91af;\n}\n\n.hljs-doctag {\n  color: #808080;\n}\n\n.hljs-attr {\n  color: #f00;\n}\n\n.hljs-symbol,\n.hljs-bullet,\n.hljs-link {\n  color: #00b0e8;\n}\n\n\n.hljs-emphasis {\n  font-style: italic;\n}\n\n.hljs-strong {\n  font-weight: bold;\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/styles/xcode.css",
    "content": "/*\n\nXCode style (c) Angel Garcia <angelgarcia.mail@gmail.com>\n\n*/\n\n.hljs {\n  display: block;\n  overflow-x: auto;\n  padding: 0.5em;\n  background: #fff;\n  color: black;\n}\n\n.hljs-comment,\n.hljs-quote {\n  color: #006a00;\n}\n\n.hljs-keyword,\n.hljs-selector-tag,\n.hljs-literal {\n  color: #aa0d91;\n}\n\n.hljs-name {\n  color: #008;\n}\n\n.hljs-variable,\n.hljs-template-variable {\n  color: #660;\n}\n\n.hljs-string {\n  color: #c41a16;\n}\n\n.hljs-regexp,\n.hljs-link {\n  color: #080;\n}\n\n.hljs-title,\n.hljs-tag,\n.hljs-symbol,\n.hljs-bullet,\n.hljs-number,\n.hljs-meta {\n  color: #1c00cf;\n}\n\n.hljs-section,\n.hljs-class .hljs-title,\n.hljs-type,\n.hljs-attr,\n.hljs-built_in,\n.hljs-builtin-name,\n.hljs-params {\n  color: #5c2699;\n}\n\n.hljs-attribute,\n.hljs-subst {\n  color: #000;\n}\n\n.hljs-formula {\n  background-color: #eee;\n  font-style: italic;\n}\n\n.hljs-addition {\n  background-color: #baeeba;\n}\n\n.hljs-deletion {\n  background-color: #ffc8bd;\n}\n\n.hljs-selector-id,\n.hljs-selector-class {\n  color: #9b703f;\n}\n\n.hljs-doctag,\n.hljs-strong {\n  font-weight: bold;\n}\n\n.hljs-emphasis {\n  font-style: italic;\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/styles/xt256.css",
    "content": "\n/*\n  xt256.css\n\n  Contact: initbar [at] protonmail [dot] ch\n         : github.com/initbar\n*/\n\n.hljs {\n  display: block;\n  overflow-x: auto;\n  color: #eaeaea;\n  background: #000;\n  padding: 0.5;\n}\n\n.hljs-subst {\n  color: #eaeaea;\n}\n\n.hljs-emphasis {\n  font-style: italic;\n}\n\n.hljs-strong {\n  font-weight: bold;\n}\n\n.hljs-builtin-name,\n.hljs-type {\n  color: #eaeaea;\n}\n\n.hljs-params {\n  color: #da0000;\n}\n\n.hljs-literal,\n.hljs-number,\n.hljs-name {\n  color: #ff0000;\n  font-weight: bolder;\n}\n\n.hljs-comment {\n  color: #969896;\n}\n\n.hljs-selector-id,\n.hljs-quote {\n  color: #00ffff;\n}\n\n.hljs-template-variable,\n.hljs-variable,\n.hljs-title {\n  color: #00ffff;\n  font-weight: bold;\n}\n\n.hljs-selector-class,\n.hljs-keyword,\n.hljs-symbol {\n  color: #fff000;\n}\n\n.hljs-string,\n.hljs-bullet {\n  color: #00ff00;\n}\n\n.hljs-tag,\n.hljs-section {\n  color: #000fff;\n}\n\n.hljs-selector-tag {\n  color: #000fff;\n  font-weight: bold;\n}\n\n.hljs-attribute,\n.hljs-built_in,\n.hljs-regexp,\n.hljs-link {\n  color: #ff00ff;\n}\n\n.hljs-meta {\n  color: #fff;\n  font-weight: bolder;\n}\n"
  },
  {
    "path": "static/editor.md/lib/highlight/styles/zenburn.css",
    "content": "/*\n\nZenburn style from voldmar.ru (c) Vladimir Epifanov <voldmar@voldmar.ru>\nbased on dark.css by Ivan Sagalaev\n\n*/\n\n.hljs {\n  display: block;\n  overflow-x: auto;\n  padding: 0.5em;\n  background: #3f3f3f;\n  color: #dcdcdc;\n}\n\n.hljs-keyword,\n.hljs-selector-tag,\n.hljs-tag {\n  color: #e3ceab;\n}\n\n.hljs-template-tag {\n  color: #dcdcdc;\n}\n\n.hljs-number {\n  color: #8cd0d3;\n}\n\n.hljs-variable,\n.hljs-template-variable,\n.hljs-attribute {\n  color: #efdcbc;\n}\n\n.hljs-literal {\n  color: #efefaf;\n}\n\n.hljs-subst {\n  color: #8f8f8f;\n}\n\n.hljs-title,\n.hljs-name,\n.hljs-selector-id,\n.hljs-selector-class,\n.hljs-section,\n.hljs-type {\n  color: #efef8f;\n}\n\n.hljs-symbol,\n.hljs-bullet,\n.hljs-link {\n  color: #dca3a3;\n}\n\n.hljs-deletion,\n.hljs-string,\n.hljs-built_in,\n.hljs-builtin-name {\n  color: #cc9393;\n}\n\n.hljs-addition,\n.hljs-comment,\n.hljs-quote,\n.hljs-meta {\n  color: #7f9f7f;\n}\n\n\n.hljs-emphasis {\n  font-style: italic;\n}\n\n.hljs-strong {\n  font-weight: bold;\n}\n"
  },
  {
    "path": "static/editor.md/lib/marked.js",
    "content": "/**\n * marked - a markdown parser\n * Copyright (c) 2011-2014, Christopher Jeffrey. (MIT Licensed)\n * https://github.com/markedjs/marked\n */\n\n;(function(root) {\n'use strict';\n\n/**\n * Block-Level Grammar\n */\n\nvar block = {\n  newline: /^\\n+/,\n  code: /^( {4}[^\\n]+\\n*)+/,\n  fences: noop,\n  hr: /^ {0,3}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)/,\n  heading: /^ *(#{1,6}) *([^\\n]+?) *(?:#+ *)?(?:\\n+|$)/,\n  nptable: noop,\n  blockquote: /^( {0,3}> ?(paragraph|[^\\n]*)(?:\\n|$))+/,\n  list: /^( *)(bull) [\\s\\S]+?(?:hr|def|\\n{2,}(?! )(?!\\1bull )\\n*|\\s*$)/,\n  html: '^ {0,3}(?:' // optional indentation\n    + '<(script|pre|style)[\\\\s>][\\\\s\\\\S]*?(?:</\\\\1>[^\\\\n]*\\\\n+|$)' // (1)\n    + '|comment[^\\\\n]*(\\\\n+|$)' // (2)\n    + '|<\\\\?[\\\\s\\\\S]*?\\\\?>\\\\n*' // (3)\n    + '|<![A-Z][\\\\s\\\\S]*?>\\\\n*' // (4)\n    + '|<!\\\\[CDATA\\\\[[\\\\s\\\\S]*?\\\\]\\\\]>\\\\n*' // (5)\n    + '|</?(tag)(?: +|\\\\n|/?>)[\\\\s\\\\S]*?(?:\\\\n{2,}|$)' // (6)\n    + '|<(?!script|pre|style)([a-z][\\\\w-]*)(?:attribute)*? */?>(?=\\\\h*\\\\n)[\\\\s\\\\S]*?(?:\\\\n{2,}|$)' // (7) open tag\n    + '|</(?!script|pre|style)[a-z][\\\\w-]*\\\\s*>(?=\\\\h*\\\\n)[\\\\s\\\\S]*?(?:\\\\n{2,}|$)' // (7) closing tag\n    + ')',\n  def: /^ {0,3}\\[(label)\\]: *\\n? *<?([^\\s>]+)>?(?:(?: +\\n? *| *\\n *)(title))? *(?:\\n+|$)/,\n  table: noop,\n  lheading: /^([^\\n]+)\\n *(=|-){2,} *(?:\\n+|$)/,\n  paragraph: /^([^\\n]+(?:\\n(?!hr|heading|lheading| {0,3}>|<\\/?(?:tag)(?: +|\\n|\\/?>)|<(?:script|pre|style|!--))[^\\n]+)*)/,\n  text: /^[^\\n]+/\n};\n\nblock._label = /(?!\\s*\\])(?:\\\\[\\[\\]]|[^\\[\\]])+/;\nblock._title = /(?:\"(?:\\\\\"?|[^\"\\\\])*\"|'[^'\\n]*(?:\\n[^'\\n]+)*\\n?'|\\([^()]*\\))/;\nblock.def = edit(block.def)\n  .replace('label', block._label)\n  .replace('title', block._title)\n  .getRegex();\n\nblock.bullet = /(?:[*+-]|\\d+\\.)/;\nblock.item = /^( *)(bull) [^\\n]*(?:\\n(?!\\1bull )[^\\n]*)*/;\nblock.item = edit(block.item, 'gm')\n  .replace(/bull/g, block.bullet)\n  .getRegex();\n\nblock.list = edit(block.list)\n  .replace(/bull/g, block.bullet)\n  .replace('hr', '\\\\n+(?=\\\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\\\* *){3,})(?:\\\\n+|$))')\n  .replace('def', '\\\\n+(?=' + block.def.source + ')')\n  .getRegex();\n\nblock._tag = 'address|article|aside|base|basefont|blockquote|body|caption'\n  + '|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption'\n  + '|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe'\n  + '|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option'\n  + '|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr'\n  + '|track|ul';\nblock._comment = /<!--(?!-?>)[\\s\\S]*?-->/;\nblock.html = edit(block.html, 'i')\n  .replace('comment', block._comment)\n  .replace('tag', block._tag)\n  .replace('attribute', / +[a-zA-Z:_][\\w.:-]*(?: *= *\"[^\"\\n]*\"| *= *'[^'\\n]*'| *= *[^\\s\"'=<>`]+)?/)\n  .getRegex();\n\nblock.paragraph = edit(block.paragraph)\n  .replace('hr', block.hr)\n  .replace('heading', block.heading)\n  .replace('lheading', block.lheading)\n  .replace('tag', block._tag) // pars can be interrupted by type (6) html blocks\n  .getRegex();\n\nblock.blockquote = edit(block.blockquote)\n  .replace('paragraph', block.paragraph)\n  .getRegex();\n\n/**\n * Normal Block Grammar\n */\n\nblock.normal = merge({}, block);\n\n/**\n * GFM Block Grammar\n */\n\nblock.gfm = merge({}, block.normal, {\n  fences: /^ *(`{3,}|~{3,})[ \\.]*(\\S+)? *\\n([\\s\\S]*?)\\n? *\\1 *(?:\\n+|$)/,\n  paragraph: /^/,\n  heading: /^ *(#{1,6}) +([^\\n]+?) *#* *(?:\\n+|$)/\n});\n\nblock.gfm.paragraph = edit(block.paragraph)\n  .replace('(?!', '(?!'\n    + block.gfm.fences.source.replace('\\\\1', '\\\\2') + '|'\n    + block.list.source.replace('\\\\1', '\\\\3') + '|')\n  .getRegex();\n\n/**\n * GFM + Tables Block Grammar\n */\n\nblock.tables = merge({}, block.gfm, {\n  nptable: /^ *([^|\\n ].*\\|.*)\\n *([-:]+ *\\|[-| :]*)(?:\\n((?:.*[^>\\n ].*(?:\\n|$))*)\\n*|$)/,\n  table: /^ *\\|(.+)\\n *\\|?( *[-:]+[-| :]*)(?:\\n((?: *[^>\\n ].*(?:\\n|$))*)\\n*|$)/\n});\n\n/**\n * Pedantic grammar\n */\n\nblock.pedantic = merge({}, block.normal, {\n  html: edit(\n    '^ *(?:comment *(?:\\\\n|\\\\s*$)'\n    + '|<(tag)[\\\\s\\\\S]+?</\\\\1> *(?:\\\\n{2,}|\\\\s*$)' // closed tag\n    + '|<tag(?:\"[^\"]*\"|\\'[^\\']*\\'|\\\\s[^\\'\"/>\\\\s]*)*?/?> *(?:\\\\n{2,}|\\\\s*$))')\n    .replace('comment', block._comment)\n    .replace(/tag/g, '(?!(?:'\n      + 'a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub'\n      + '|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)'\n      + '\\\\b)\\\\w+(?!:|[^\\\\w\\\\s@]*@)\\\\b')\n    .getRegex(),\n  def: /^ *\\[([^\\]]+)\\]: *<?([^\\s>]+)>?(?: +([\"(][^\\n]+[\")]))? *(?:\\n+|$)/\n});\n\n/**\n * Block Lexer\n */\n\nfunction Lexer(options) {\n  this.tokens = [];\n  this.tokens.links = Object.create(null);\n  this.options = options || marked.defaults;\n  this.rules = block.normal;\n\n  if (this.options.pedantic) {\n    this.rules = block.pedantic;\n  } else if (this.options.gfm) {\n    if (this.options.tables) {\n      this.rules = block.tables;\n    } else {\n      this.rules = block.gfm;\n    }\n  }\n}\n\n/**\n * Expose Block Rules\n */\n\nLexer.rules = block;\n\n/**\n * Static Lex Method\n */\n\nLexer.lex = function(src, options) {\n  var lexer = new Lexer(options);\n  return lexer.lex(src);\n};\n\n/**\n * Preprocessing\n */\n\nLexer.prototype.lex = function(src) {\n  src = src\n    .replace(/\\r\\n|\\r/g, '\\n')\n    .replace(/\\t/g, '    ')\n    .replace(/\\u00a0/g, ' ')\n    .replace(/\\u2424/g, '\\n');\n\n  return this.token(src, true);\n};\n\n/**\n * Lexing\n */\n\nLexer.prototype.token = function(src, top) {\n  src = src.replace(/^ +$/gm, '');\n  var next,\n      loose,\n      cap,\n      bull,\n      b,\n      item,\n      listStart,\n      listItems,\n      t,\n      space,\n      i,\n      tag,\n      l,\n      isordered,\n      istask,\n      ischecked;\n\n  while (src) {\n    // newline\n    if (cap = this.rules.newline.exec(src)) {\n      src = src.substring(cap[0].length);\n      if (cap[0].length > 1) {\n        this.tokens.push({\n          type: 'space'\n        });\n      }\n    }\n\n    // code\n    if (cap = this.rules.code.exec(src)) {\n      src = src.substring(cap[0].length);\n      cap = cap[0].replace(/^ {4}/gm, '');\n      this.tokens.push({\n        type: 'code',\n        text: !this.options.pedantic\n          ? rtrim(cap, '\\n')\n          : cap\n      });\n      continue;\n    }\n\n    // fences (gfm)\n    if (cap = this.rules.fences.exec(src)) {\n      src = src.substring(cap[0].length);\n      this.tokens.push({\n        type: 'code',\n        lang: cap[2],\n        text: cap[3] || ''\n      });\n      continue;\n    }\n\n    // heading\n    if (cap = this.rules.heading.exec(src)) {\n      src = src.substring(cap[0].length);\n      this.tokens.push({\n        type: 'heading',\n        depth: cap[1].length,\n        text: cap[2]\n      });\n      continue;\n    }\n\n    // table no leading pipe (gfm)\n    if (top && (cap = this.rules.nptable.exec(src))) {\n      item = {\n        type: 'table',\n        header: splitCells(cap[1].replace(/^ *| *\\| *$/g, '')),\n        align: cap[2].replace(/^ *|\\| *$/g, '').split(/ *\\| */),\n        cells: cap[3] ? cap[3].replace(/\\n$/, '').split('\\n') : []\n      };\n\n      if (item.header.length === item.align.length) {\n        src = src.substring(cap[0].length);\n\n        for (i = 0; i < item.align.length; i++) {\n          if (/^ *-+: *$/.test(item.align[i])) {\n            item.align[i] = 'right';\n          } else if (/^ *:-+: *$/.test(item.align[i])) {\n            item.align[i] = 'center';\n          } else if (/^ *:-+ *$/.test(item.align[i])) {\n            item.align[i] = 'left';\n          } else {\n            item.align[i] = null;\n          }\n        }\n\n        for (i = 0; i < item.cells.length; i++) {\n          item.cells[i] = splitCells(item.cells[i], item.header.length);\n        }\n\n        this.tokens.push(item);\n\n        continue;\n      }\n    }\n\n    // hr\n    if (cap = this.rules.hr.exec(src)) {\n      src = src.substring(cap[0].length);\n      this.tokens.push({\n        type: 'hr'\n      });\n      continue;\n    }\n\n    // blockquote\n    if (cap = this.rules.blockquote.exec(src)) {\n      src = src.substring(cap[0].length);\n\n      this.tokens.push({\n        type: 'blockquote_start'\n      });\n\n      cap = cap[0].replace(/^ *> ?/gm, '');\n\n      // Pass `top` to keep the current\n      // \"toplevel\" state. This is exactly\n      // how markdown.pl works.\n      this.token(cap, top);\n\n      this.tokens.push({\n        type: 'blockquote_end'\n      });\n\n      continue;\n    }\n\n    // list\n    if (cap = this.rules.list.exec(src)) {\n      src = src.substring(cap[0].length);\n      bull = cap[2];\n      isordered = bull.length > 1;\n\n      listStart = {\n        type: 'list_start',\n        ordered: isordered,\n        start: isordered ? +bull : '',\n        loose: false\n      };\n\n      this.tokens.push(listStart);\n\n      // Get each top-level item.\n      cap = cap[0].match(this.rules.item);\n\n      listItems = [];\n      next = false;\n      l = cap.length;\n      i = 0;\n\n      for (; i < l; i++) {\n        item = cap[i];\n\n        // Remove the list item's bullet\n        // so it is seen as the next token.\n        space = item.length;\n        item = item.replace(/^ *([*+-]|\\d+\\.) +/, '');\n\n        // Outdent whatever the\n        // list item contains. Hacky.\n        if (~item.indexOf('\\n ')) {\n          space -= item.length;\n          item = !this.options.pedantic\n            ? item.replace(new RegExp('^ {1,' + space + '}', 'gm'), '')\n            : item.replace(/^ {1,4}/gm, '');\n        }\n\n        // Determine whether the next list item belongs here.\n        // Backpedal if it does not belong in this list.\n        if (this.options.smartLists && i !== l - 1) {\n          b = block.bullet.exec(cap[i + 1])[0];\n          if (bull !== b && !(bull.length > 1 && b.length > 1)) {\n            src = cap.slice(i + 1).join('\\n') + src;\n            i = l - 1;\n          }\n        }\n\n        // Determine whether item is loose or not.\n        // Use: /(^|\\n)(?! )[^\\n]+\\n\\n(?!\\s*$)/\n        // for discount behavior.\n        loose = next || /\\n\\n(?!\\s*$)/.test(item);\n        if (i !== l - 1) {\n          next = item.charAt(item.length - 1) === '\\n';\n          if (!loose) loose = next;\n        }\n\n        if (loose) {\n          listStart.loose = true;\n        }\n\n        // Check for task list items\n        istask = /^\\[[ xX]\\] /.test(item);\n        ischecked = undefined;\n        if (istask) {\n          ischecked = item[1] !== ' ';\n          item = item.replace(/^\\[[ xX]\\] +/, '');\n        }\n\n        t = {\n          type: 'list_item_start',\n          task: istask,\n          checked: ischecked,\n          loose: loose\n        };\n\n        listItems.push(t);\n        this.tokens.push(t);\n\n        // Recurse.\n        this.token(item, false);\n\n        this.tokens.push({\n          type: 'list_item_end'\n        });\n      }\n\n      if (listStart.loose) {\n        l = listItems.length;\n        i = 0;\n        for (; i < l; i++) {\n          listItems[i].loose = true;\n        }\n      }\n\n      this.tokens.push({\n        type: 'list_end'\n      });\n\n      continue;\n    }\n\n    // html\n    if (cap = this.rules.html.exec(src)) {\n      src = src.substring(cap[0].length);\n      this.tokens.push({\n        type: this.options.sanitize\n          ? 'paragraph'\n          : 'html',\n        pre: !this.options.sanitizer\n          && (cap[1] === 'pre' || cap[1] === 'script' || cap[1] === 'style'),\n        text: cap[0]\n      });\n      continue;\n    }\n\n    // def\n    if (top && (cap = this.rules.def.exec(src))) {\n      src = src.substring(cap[0].length);\n      if (cap[3]) cap[3] = cap[3].substring(1, cap[3].length - 1);\n      tag = cap[1].toLowerCase().replace(/\\s+/g, ' ');\n      if (!this.tokens.links[tag]) {\n        this.tokens.links[tag] = {\n          href: cap[2],\n          title: cap[3]\n        };\n      }\n      continue;\n    }\n\n    // table (gfm)\n    if (top && (cap = this.rules.table.exec(src))) {\n      item = {\n        type: 'table',\n        header: splitCells(cap[1].replace(/^ *| *\\| *$/g, '')),\n        align: cap[2].replace(/^ *|\\| *$/g, '').split(/ *\\| */),\n        cells: cap[3] ? cap[3].replace(/(?: *\\| *)?\\n$/, '').split('\\n') : []\n      };\n\n      if (item.header.length === item.align.length) {\n        src = src.substring(cap[0].length);\n\n        for (i = 0; i < item.align.length; i++) {\n          if (/^ *-+: *$/.test(item.align[i])) {\n            item.align[i] = 'right';\n          } else if (/^ *:-+: *$/.test(item.align[i])) {\n            item.align[i] = 'center';\n          } else if (/^ *:-+ *$/.test(item.align[i])) {\n            item.align[i] = 'left';\n          } else {\n            item.align[i] = null;\n          }\n        }\n\n        for (i = 0; i < item.cells.length; i++) {\n          item.cells[i] = splitCells(\n            item.cells[i].replace(/^ *\\| *| *\\| *$/g, ''),\n            item.header.length);\n        }\n\n        this.tokens.push(item);\n\n        continue;\n      }\n    }\n\n    // lheading\n    if (cap = this.rules.lheading.exec(src)) {\n      src = src.substring(cap[0].length);\n      this.tokens.push({\n        type: 'heading',\n        depth: cap[2] === '=' ? 1 : 2,\n        text: cap[1]\n      });\n      continue;\n    }\n\n    // top-level paragraph\n    if (top && (cap = this.rules.paragraph.exec(src))) {\n      src = src.substring(cap[0].length);\n      this.tokens.push({\n        type: 'paragraph',\n        text: cap[1].charAt(cap[1].length - 1) === '\\n'\n          ? cap[1].slice(0, -1)\n          : cap[1]\n      });\n      continue;\n    }\n\n    // text\n    if (cap = this.rules.text.exec(src)) {\n      // Top-level should never reach here.\n      src = src.substring(cap[0].length);\n      this.tokens.push({\n        type: 'text',\n        text: cap[0]\n      });\n      continue;\n    }\n\n    if (src) {\n      throw new Error('Infinite loop on byte: ' + src.charCodeAt(0));\n    }\n  }\n\n  return this.tokens;\n};\n\n/**\n * Inline-Level Grammar\n */\n\nvar inline = {\n  escape: /^\\\\([!\"#$%&'()*+,\\-./:;<=>?@\\[\\]\\\\^_`{|}~])/,\n  autolink: /^<(scheme:[^\\s\\x00-\\x1f<>]*|email)>/,\n  url: noop,\n  tag: '^comment'\n    + '|^</[a-zA-Z][\\\\w:-]*\\\\s*>' // self-closing tag\n    + '|^<[a-zA-Z][\\\\w-]*(?:attribute)*?\\\\s*/?>' // open tag\n    + '|^<\\\\?[\\\\s\\\\S]*?\\\\?>' // processing instruction, e.g. <?php ?>\n    + '|^<![a-zA-Z]+\\\\s[\\\\s\\\\S]*?>' // declaration, e.g. <!DOCTYPE html>\n    + '|^<!\\\\[CDATA\\\\[[\\\\s\\\\S]*?\\\\]\\\\]>', // CDATA section\n  link: /^!?\\[(label)\\]\\(href(?:\\s+(title))?\\s*\\)/,\n  reflink: /^!?\\[(label)\\]\\[(?!\\s*\\])((?:\\\\[\\[\\]]?|[^\\[\\]\\\\])+)\\]/,\n  nolink: /^!?\\[(?!\\s*\\])((?:\\[[^\\[\\]]*\\]|\\\\[\\[\\]]|[^\\[\\]])*)\\](?:\\[\\])?/,\n  strong: /^__([^\\s])__(?!_)|^\\*\\*([^\\s])\\*\\*(?!\\*)|^__([^\\s][\\s\\S]*?[^\\s])__(?!_)|^\\*\\*([^\\s][\\s\\S]*?[^\\s])\\*\\*(?!\\*)/,\n  em: /^_([^\\s_])_(?!_)|^\\*([^\\s*\"<\\[])\\*(?!\\*)|^_([^\\s][\\s\\S]*?[^\\s_])_(?!_)|^_([^\\s_][\\s\\S]*?[^\\s])_(?!_)|^\\*([^\\s\"<\\[][\\s\\S]*?[^\\s*])\\*(?!\\*)|^\\*([^\\s*\"<\\[][\\s\\S]*?[^\\s])\\*(?!\\*)/,\n  code: /^(`+)\\s*([\\s\\S]*?[^`]?)\\s*\\1(?!`)/,\n  br: /^( {2,}|\\\\)\\n(?!\\s*$)/,\n  del: noop,\n  text: /^[\\s\\S]+?(?=[\\\\<!\\[`*]|\\b_| {2,}\\n|$)/\n};\n\ninline._escapes = /\\\\([!\"#$%&'()*+,\\-./:;<=>?@\\[\\]\\\\^_`{|}~])/g;\n\ninline._scheme = /[a-zA-Z][a-zA-Z0-9+.-]{1,31}/;\ninline._email = /[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/;\ninline.autolink = edit(inline.autolink)\n  .replace('scheme', inline._scheme)\n  .replace('email', inline._email)\n  .getRegex();\n\ninline._attribute = /\\s+[a-zA-Z:_][\\w.:-]*(?:\\s*=\\s*\"[^\"]*\"|\\s*=\\s*'[^']*'|\\s*=\\s*[^\\s\"'=<>`]+)?/;\n\ninline.tag = edit(inline.tag)\n  .replace('comment', block._comment)\n  .replace('attribute', inline._attribute)\n  .getRegex();\n\ninline._label = /(?:\\[[^\\[\\]]*\\]|\\\\[\\[\\]]?|`[^`]*`|[^\\[\\]\\\\])*?/;\ninline._href = /\\s*(<(?:\\\\[<>]?|[^\\s<>\\\\])*>|(?:\\\\[()]?|\\([^\\s\\x00-\\x1f\\\\]*\\)|[^\\s\\x00-\\x1f()\\\\])*?)/;\ninline._title = /\"(?:\\\\\"?|[^\"\\\\])*\"|'(?:\\\\'?|[^'\\\\])*'|\\((?:\\\\\\)?|[^)\\\\])*\\)/;\n\ninline.link = edit(inline.link)\n  .replace('label', inline._label)\n  .replace('href', inline._href)\n  .replace('title', inline._title)\n  .getRegex();\n\ninline.reflink = edit(inline.reflink)\n  .replace('label', inline._label)\n  .getRegex();\n\n/**\n * Normal Inline Grammar\n */\n\ninline.normal = merge({}, inline);\n\n/**\n * Pedantic Inline Grammar\n */\n\ninline.pedantic = merge({}, inline.normal, {\n  strong: /^__(?=\\S)([\\s\\S]*?\\S)__(?!_)|^\\*\\*(?=\\S)([\\s\\S]*?\\S)\\*\\*(?!\\*)/,\n  em: /^_(?=\\S)([\\s\\S]*?\\S)_(?!_)|^\\*(?=\\S)([\\s\\S]*?\\S)\\*(?!\\*)/,\n  link: edit(/^!?\\[(label)\\]\\((.*?)\\)/)\n    .replace('label', inline._label)\n    .getRegex(),\n  reflink: edit(/^!?\\[(label)\\]\\s*\\[([^\\]]*)\\]/)\n    .replace('label', inline._label)\n    .getRegex()\n});\n\n/**\n * GFM Inline Grammar\n */\n\ninline.gfm = merge({}, inline.normal, {\n  escape: edit(inline.escape).replace('])', '~|])').getRegex(),\n  url: edit(/^((?:ftp|https?):\\/\\/|www\\.)(?:[a-zA-Z0-9\\-]+\\.?)+[^\\s<]*|^email/)\n    .replace('email', inline._email)\n    .getRegex(),\n  _backpedal: /(?:[^?!.,:;*_~()&]+|\\([^)]*\\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,\n  del: /^~+(?=\\S)([\\s\\S]*?\\S)~+/,\n  text: edit(inline.text)\n    .replace(']|', '~]|')\n    .replace('|', '|https?://|ftp://|www\\\\.|[a-zA-Z0-9.!#$%&\\'*+/=?^_`{\\\\|}~-]+@|')\n    .getRegex()\n});\n\n/**\n * GFM + Line Breaks Inline Grammar\n */\n\ninline.breaks = merge({}, inline.gfm, {\n  br: edit(inline.br).replace('{2,}', '*').getRegex(),\n  text: edit(inline.gfm.text).replace('{2,}', '*').getRegex()\n});\n\n/**\n * Inline Lexer & Compiler\n */\n\nfunction InlineLexer(links, options) {\n  this.options = options || marked.defaults;\n  this.links = links;\n  this.rules = inline.normal;\n  this.renderer = this.options.renderer || new Renderer();\n  this.renderer.options = this.options;\n\n  if (!this.links) {\n    throw new Error('Tokens array requires a `links` property.');\n  }\n\n  if (this.options.pedantic) {\n    this.rules = inline.pedantic;\n  } else if (this.options.gfm) {\n    if (this.options.breaks) {\n      this.rules = inline.breaks;\n    } else {\n      this.rules = inline.gfm;\n    }\n  }\n}\n\n/**\n * Expose Inline Rules\n */\n\nInlineLexer.rules = inline;\n\n/**\n * Static Lexing/Compiling Method\n */\n\nInlineLexer.output = function(src, links, options) {\n  var inline = new InlineLexer(links, options);\n  return inline.output(src);\n};\n\n/**\n * Lexing/Compiling\n */\n\nInlineLexer.prototype.output = function(src) {\n  var out = '',\n      link,\n      text,\n      href,\n      title,\n      cap,\n      prevCapZero;\n\n  while (src) {\n    // escape\n    if (cap = this.rules.escape.exec(src)) {\n      src = src.substring(cap[0].length);\n      out += cap[1];\n      continue;\n    }\n\n    // autolink\n    if (cap = this.rules.autolink.exec(src)) {\n      src = src.substring(cap[0].length);\n      if (cap[2] === '@') {\n        text = escape(this.mangle(cap[1]));\n        href = 'mailto:' + text;\n      } else {\n        text = escape(cap[1]);\n        href = text;\n      }\n      out += this.renderer.link(href, null, text);\n      continue;\n    }\n\n    // url (gfm)\n    if (!this.inLink && (cap = this.rules.url.exec(src))) {\n      do {\n        prevCapZero = cap[0];\n        cap[0] = this.rules._backpedal.exec(cap[0])[0];\n      } while (prevCapZero !== cap[0]);\n      src = src.substring(cap[0].length);\n      if (cap[2] === '@') {\n        text = escape(cap[0]);\n        href = 'mailto:' + text;\n      } else {\n        text = escape(cap[0]);\n        if (cap[1] === 'www.') {\n          href = 'http://' + text;\n        } else {\n          href = text;\n        }\n      }\n      out += this.renderer.link(href, null, text);\n      continue;\n    }\n\n    // tag\n    if (cap = this.rules.tag.exec(src)) {\n      if (!this.inLink && /^<a /i.test(cap[0])) {\n        this.inLink = true;\n      } else if (this.inLink && /^<\\/a>/i.test(cap[0])) {\n        this.inLink = false;\n      }\n      src = src.substring(cap[0].length);\n      out += this.options.sanitize\n        ? this.options.sanitizer\n          ? this.options.sanitizer(cap[0])\n          : escape(cap[0])\n        : cap[0]\n      continue;\n    }\n\n    // link\n    if (cap = this.rules.link.exec(src)) {\n      src = src.substring(cap[0].length);\n      this.inLink = true;\n      href = cap[2];\n      if (this.options.pedantic) {\n        link = /^([^'\"]*[^\\s])\\s+(['\"])(.*)\\2/.exec(href);\n\n        if (link) {\n          href = link[1];\n          title = link[3];\n        } else {\n          title = '';\n        }\n      } else {\n        title = cap[3] ? cap[3].slice(1, -1) : '';\n      }\n      href = href.trim().replace(/^<([\\s\\S]*)>$/, '$1');\n      out += this.outputLink(cap, {\n        href: InlineLexer.escapes(href),\n        title: InlineLexer.escapes(title)\n      });\n      this.inLink = false;\n      continue;\n    }\n\n    // reflink, nolink\n    if ((cap = this.rules.reflink.exec(src))\n        || (cap = this.rules.nolink.exec(src))) {\n      src = src.substring(cap[0].length);\n      link = (cap[2] || cap[1]).replace(/\\s+/g, ' ');\n      link = this.links[link.toLowerCase()];\n      if (!link || !link.href) {\n        out += cap[0].charAt(0);\n        src = cap[0].substring(1) + src;\n        continue;\n      }\n      this.inLink = true;\n      out += this.outputLink(cap, link);\n      this.inLink = false;\n      continue;\n    }\n\n    // strong\n    if (cap = this.rules.strong.exec(src)) {\n      src = src.substring(cap[0].length);\n      out += this.renderer.strong(this.output(cap[4] || cap[3] || cap[2] || cap[1]));\n      continue;\n    }\n\n    // em\n    if (cap = this.rules.em.exec(src)) {\n      src = src.substring(cap[0].length);\n      out += this.renderer.em(this.output(cap[6] || cap[5] || cap[4] || cap[3] || cap[2] || cap[1]));\n      continue;\n    }\n\n    // code\n    if (cap = this.rules.code.exec(src)) {\n      src = src.substring(cap[0].length);\n      out += this.renderer.codespan(escape(cap[2].trim(), true));\n      continue;\n    }\n\n    // br\n    if (cap = this.rules.br.exec(src)) {\n      src = src.substring(cap[0].length);\n      out += this.renderer.br();\n      continue;\n    }\n\n    // del (gfm)\n    if (cap = this.rules.del.exec(src)) {\n      src = src.substring(cap[0].length);\n      out += this.renderer.del(this.output(cap[1]));\n      continue;\n    }\n\n    // text\n    if (cap = this.rules.text.exec(src)) {\n      src = src.substring(cap[0].length);\n      out += this.renderer.text(escape(this.smartypants(cap[0])));\n      continue;\n    }\n\n    if (src) {\n      throw new Error('Infinite loop on byte: ' + src.charCodeAt(0));\n    }\n  }\n\n  return out;\n};\n\nInlineLexer.escapes = function(text) {\n  return text ? text.replace(InlineLexer.rules._escapes, '$1') : text;\n}\n\n/**\n * Compile Link\n */\n\nInlineLexer.prototype.outputLink = function(cap, link) {\n  var href = link.href,\n      title = link.title ? escape(link.title) : null;\n\n  return cap[0].charAt(0) !== '!'\n    ? this.renderer.link(href, title, this.output(cap[1]))\n    : this.renderer.image(href, title, escape(cap[1]));\n};\n\n/**\n * Smartypants Transformations\n */\n\nInlineLexer.prototype.smartypants = function(text) {\n  if (!this.options.smartypants) return text;\n  return text\n    // em-dashes\n    .replace(/---/g, '\\u2014')\n    // en-dashes\n    .replace(/--/g, '\\u2013')\n    // opening singles\n    .replace(/(^|[-\\u2014/(\\[{\"\\s])'/g, '$1\\u2018')\n    // closing singles & apostrophes\n    .replace(/'/g, '\\u2019')\n    // opening doubles\n    .replace(/(^|[-\\u2014/(\\[{\\u2018\\s])\"/g, '$1\\u201c')\n    // closing doubles\n    .replace(/\"/g, '\\u201d')\n    // ellipses\n    .replace(/\\.{3}/g, '\\u2026');\n};\n\n/**\n * Mangle Links\n */\n\nInlineLexer.prototype.mangle = function(text) {\n  if (!this.options.mangle) return text;\n  var out = '',\n      l = text.length,\n      i = 0,\n      ch;\n\n  for (; i < l; i++) {\n    ch = text.charCodeAt(i);\n    if (Math.random() > 0.5) {\n      ch = 'x' + ch.toString(16);\n    }\n    out += '&#' + ch + ';';\n  }\n\n  return out;\n};\n\n/**\n * Renderer\n */\n\nfunction Renderer(options) {\n  this.options = options || marked.defaults;\n}\n\nRenderer.prototype.code = function(code, lang, escaped) {\n  if (this.options.highlight) {\n    var out = this.options.highlight(code, lang);\n    if (out != null && out !== code) {\n      escaped = true;\n      code = out;\n    }\n  }\n\n  if (!lang) {\n    return '<pre><code>'\n      + (escaped ? code : escape(code, true))\n      + '</code></pre>';\n  }\n\n  return '<pre><code class=\"'\n    + this.options.langPrefix\n    + escape(lang, true)\n    + '\">'\n    + (escaped ? code : escape(code, true))\n    + '</code></pre>\\n';\n};\n\nRenderer.prototype.blockquote = function(quote) {\n  return '<blockquote>\\n' + quote + '</blockquote>\\n';\n};\n\nRenderer.prototype.html = function(html) {\n  return html;\n};\n\nRenderer.prototype.heading = function(text, level, raw) {\n  if (this.options.headerIds) {\n    return '<h'\n      + level\n      + ' id=\"'\n      + this.options.headerPrefix\n      + raw.toLowerCase().replace(/[^\\w]+/g, '-')\n      + '\">'\n      + text\n      + '</h'\n      + level\n      + '>\\n';\n  }\n  // ignore IDs\n  return '<h' + level + '>' + text + '</h' + level + '>\\n';\n};\n\nRenderer.prototype.hr = function() {\n  return this.options.xhtml ? '<hr/>\\n' : '<hr>\\n';\n};\n\nRenderer.prototype.list = function(body, ordered, start) {\n  var type = ordered ? 'ol' : 'ul',\n      startatt = (ordered && start !== 1) ? (' start=\"' + start + '\"') : '';\n  return '<' + type + startatt + '>\\n' + body + '</' + type + '>\\n';\n};\n\nRenderer.prototype.listitem = function(text) {\n  return '<li>' + text + '</li>\\n';\n};\n\nRenderer.prototype.checkbox = function(checked) {\n  return '<input '\n    + (checked ? 'checked=\"\" ' : '')\n    + 'disabled=\"\" type=\"checkbox\"'\n    + (this.options.xhtml ? ' /' : '')\n    + '> ';\n}\n\nRenderer.prototype.paragraph = function(text) {\n  return '<p class=\"line\">' + text + '</p>\\n';\n};\n\nRenderer.prototype.table = function(header, body) {\n  if (body) body = '<tbody>' + body + '</tbody>';\n\n  return '<table>\\n'\n    + '<thead>\\n'\n    + header\n    + '</thead>\\n'\n    + body\n    + '</table>\\n';\n};\n\nRenderer.prototype.tablerow = function(content) {\n  return '<tr>\\n' + content + '</tr>\\n';\n};\n\nRenderer.prototype.tablecell = function(content, flags) {\n  var type = flags.header ? 'th' : 'td';\n  var tag = flags.align\n    ? '<' + type + ' align=\"' + flags.align + '\">'\n    : '<' + type + '>';\n  return tag + content + '</' + type + '>\\n';\n};\n\n// span level renderer\nRenderer.prototype.strong = function(text) {\n  return '<strong>' + text + '</strong>';\n};\n\nRenderer.prototype.em = function(text) {\n  return '<em>' + text + '</em>';\n};\n\nRenderer.prototype.codespan = function(text) {\n  return '<code>' + text + '</code>';\n};\n\nRenderer.prototype.br = function() {\n  return this.options.xhtml ? '<br/>' : '<br>';\n};\n\nRenderer.prototype.del = function(text) {\n  return '<del>' + text + '</del>';\n};\n\nRenderer.prototype.link = function(href, title, text) {\n  if (this.options.sanitize) {\n    try {\n      var prot = decodeURIComponent(unescape(href))\n        .replace(/[^\\w:]/g, '')\n        .toLowerCase();\n    } catch (e) {\n      return text;\n    }\n    if (prot.indexOf('javascript:') === 0 || prot.indexOf('vbscript:') === 0 || prot.indexOf('data:') === 0) {\n      return text;\n    }\n  }\n  if (this.options.baseUrl && !originIndependentUrl.test(href)) {\n    href = resolveUrl(this.options.baseUrl, href);\n  }\n  try {\n    href = encodeURI(href).replace(/%25/g, '%');\n  } catch (e) {\n    return text;\n  }\n  var out = '<a href=\"' + escape(href) + '\"';\n  if (title) {\n    out += ' title=\"' + title + '\"';\n  }\n  out += '>' + text + '</a>';\n  return out;\n};\n\nRenderer.prototype.image = function(href, title, text) {\n  if (this.options.baseUrl && !originIndependentUrl.test(href)) {\n    href = resolveUrl(this.options.baseUrl, href);\n  }\n  var out = '<img src=\"' + href + '\" alt=\"' + text + '\"';\n  if (title) {\n    out += ' title=\"' + title + '\"';\n  }\n  out += this.options.xhtml ? '/>' : '>';\n  return out;\n};\n\nRenderer.prototype.text = function(text) {\n  return text;\n};\n\n/**\n * TextRenderer\n * returns only the textual part of the token\n */\n\nfunction TextRenderer() {}\n\n// no need for block level renderers\n\nTextRenderer.prototype.strong =\nTextRenderer.prototype.em =\nTextRenderer.prototype.codespan =\nTextRenderer.prototype.del =\nTextRenderer.prototype.text = function (text) {\n  return text;\n}\n\nTextRenderer.prototype.link =\nTextRenderer.prototype.image = function(href, title, text) {\n  return '' + text;\n}\n\nTextRenderer.prototype.br = function() {\n  return '';\n}\n\n/**\n * Parsing & Compiling\n */\n\nfunction Parser(options) {\n  this.tokens = [];\n  this.token = null;\n  this.options = options || marked.defaults;\n  this.options.renderer = this.options.renderer || new Renderer();\n  this.renderer = this.options.renderer;\n  this.renderer.options = this.options;\n}\n\n/**\n * Static Parse Method\n */\n\nParser.parse = function(src, options) {\n  var parser = new Parser(options);\n  return parser.parse(src);\n};\n\n/**\n * Parse Loop\n */\n\nParser.prototype.parse = function(src) {\n  this.inline = new InlineLexer(src.links, this.options);\n  // use an InlineLexer with a TextRenderer to extract pure text\n  this.inlineText = new InlineLexer(\n    src.links,\n    merge({}, this.options, {renderer: new TextRenderer()})\n  );\n  this.tokens = src.reverse();\n\n  var out = '';\n  while (this.next()) {\n    out += this.tok();\n  }\n\n  return out;\n};\n\n/**\n * Next Token\n */\n\nParser.prototype.next = function() {\n  return this.token = this.tokens.pop();\n};\n\n/**\n * Preview Next Token\n */\n\nParser.prototype.peek = function() {\n  return this.tokens[this.tokens.length - 1] || 0;\n};\n\n/**\n * Parse Text Tokens\n */\n\nParser.prototype.parseText = function() {\n  var body = this.token.text;\n\n  while (this.peek().type === 'text') {\n    body += '\\n' + this.next().text;\n  }\n\n  return this.inline.output(body);\n};\n\n/**\n * Parse Current Token\n */\n\nParser.prototype.tok = function() {\n  switch (this.token.type) {\n    case 'space': {\n      return '';\n    }\n    case 'hr': {\n      return this.renderer.hr();\n    }\n    case 'heading': {\n      return this.renderer.heading(\n        this.inline.output(this.token.text),\n        this.token.depth,\n        unescape(this.inlineText.output(this.token.text)));\n    }\n    case 'code': {\n      return this.renderer.code(this.token.text,\n        this.token.lang,\n        this.token.escaped);\n    }\n    case 'table': {\n      var header = '',\n          body = '',\n          i,\n          row,\n          cell,\n          j;\n\n      // header\n      cell = '';\n      for (i = 0; i < this.token.header.length; i++) {\n        cell += this.renderer.tablecell(\n          this.inline.output(this.token.header[i]),\n          { header: true, align: this.token.align[i] }\n        );\n      }\n      header += this.renderer.tablerow(cell);\n\n      for (i = 0; i < this.token.cells.length; i++) {\n        row = this.token.cells[i];\n\n        cell = '';\n        for (j = 0; j < row.length; j++) {\n          cell += this.renderer.tablecell(\n            this.inline.output(row[j]),\n            { header: false, align: this.token.align[j] }\n          );\n        }\n\n        body += this.renderer.tablerow(cell);\n      }\n      return this.renderer.table(header, body);\n    }\n    case 'blockquote_start': {\n      body = '';\n\n      while (this.next().type !== 'blockquote_end') {\n        body += this.tok();\n      }\n\n      return this.renderer.blockquote(body);\n    }\n    case 'list_start': {\n      body = '';\n      var ordered = this.token.ordered,\n          start = this.token.start;\n\n      while (this.next().type !== 'list_end') {\n        body += this.tok();\n      }\n\n      return this.renderer.list(body, ordered, start);\n    }\n    case 'list_item_start': {\n      body = '';\n      var loose = this.token.loose;\n\n      if (this.token.task) {\n        body += this.renderer.checkbox(this.token.checked);\n      }\n\n      while (this.next().type !== 'list_item_end') {\n        body += !loose && this.token.type === 'text'\n          ? this.parseText()\n          : this.tok();\n      }\n\n      return this.renderer.listitem(body);\n    }\n    case 'html': {\n      // TODO parse inline content if parameter markdown=1\n      return this.renderer.html(this.token.text);\n    }\n    case 'paragraph': {\n      return this.renderer.paragraph(this.inline.output(this.token.text));\n    }\n    case 'text': {\n      return this.renderer.paragraph(this.parseText());\n    }\n  }\n};\n\n/**\n * Helpers\n */\n\nfunction escape(html, encode) {\n  return html\n    .replace(!encode ? /&(?!#?\\w+;)/g : /&/g, '&amp;')\n    .replace(/</g, '&lt;')\n    .replace(/>/g, '&gt;')\n    .replace(/\"/g, '&quot;')\n    .replace(/'/g, '&#39;');\n}\n\nfunction unescape(html) {\n  // explicitly match decimal, hex, and named HTML entities\n  return html.replace(/&(#(?:\\d+)|(?:#x[0-9A-Fa-f]+)|(?:\\w+));?/ig, function(_, n) {\n    n = n.toLowerCase();\n    if (n === 'colon') return ':';\n    if (n.charAt(0) === '#') {\n      return n.charAt(1) === 'x'\n        ? String.fromCharCode(parseInt(n.substring(2), 16))\n        : String.fromCharCode(+n.substring(1));\n    }\n    return '';\n  });\n}\n\nfunction edit(regex, opt) {\n  regex = regex.source || regex;\n  opt = opt || '';\n  return {\n    replace: function(name, val) {\n      val = val.source || val;\n      val = val.replace(/(^|[^\\[])\\^/g, '$1');\n      regex = regex.replace(name, val);\n      return this;\n    },\n    getRegex: function() {\n      return new RegExp(regex, opt);\n    }\n  };\n}\n\nfunction resolveUrl(base, href) {\n  if (!baseUrls[' ' + base]) {\n    // we can ignore everything in base after the last slash of its path component,\n    // but we might need to add _that_\n    // https://tools.ietf.org/html/rfc3986#section-3\n    if (/^[^:]+:\\/*[^/]*$/.test(base)) {\n      baseUrls[' ' + base] = base + '/';\n    } else {\n      baseUrls[' ' + base] = rtrim(base, '/', true);\n    }\n  }\n  base = baseUrls[' ' + base];\n\n  if (href.slice(0, 2) === '//') {\n    return base.replace(/:[\\s\\S]*/, ':') + href;\n  } else if (href.charAt(0) === '/') {\n    return base.replace(/(:\\/*[^/]*)[\\s\\S]*/, '$1') + href;\n  } else {\n    return base + href;\n  }\n}\nvar baseUrls = {};\nvar originIndependentUrl = /^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;\n\nfunction noop() {}\nnoop.exec = noop;\n\nfunction merge(obj) {\n  var i = 1,\n      target,\n      key;\n\n  for (; i < arguments.length; i++) {\n    target = arguments[i];\n    for (key in target) {\n      if (Object.prototype.hasOwnProperty.call(target, key)) {\n        obj[key] = target[key];\n      }\n    }\n  }\n\n  return obj;\n}\n\nfunction splitCells(tableRow, count) {\n  // ensure that every cell-delimiting pipe has a space\n  // before it to distinguish it from an escaped pipe\n  var row = tableRow.replace(/\\|/g, function (match, offset, str) {\n        var escaped = false,\n            curr = offset;\n        while (--curr >= 0 && str[curr] === '\\\\') escaped = !escaped;\n        if (escaped) {\n          // odd number of slashes means | is escaped\n          // so we leave it alone\n          return '|';\n        } else {\n          // add space before unescaped |\n          return ' |';\n        }\n      }),\n      cells = row.split(/ \\|/),\n      i = 0;\n\n  if (cells.length > count) {\n    cells.splice(count);\n  } else {\n    while (cells.length < count) cells.push('');\n  }\n\n  for (; i < cells.length; i++) {\n    // leading or trailing whitespace is ignored per the gfm spec\n    cells[i] = cells[i].trim().replace(/\\\\\\|/g, '|');\n  }\n  return cells;\n}\n\n// Remove trailing 'c's. Equivalent to str.replace(/c*$/, '').\n// /c*$/ is vulnerable to REDOS.\n// invert: Remove suffix of non-c chars instead. Default falsey.\nfunction rtrim(str, c, invert) {\n  if (str.length === 0) {\n    return '';\n  }\n\n  // Length of suffix matching the invert condition.\n  var suffLen = 0;\n\n  // Step left until we fail to match the invert condition.\n  while (suffLen < str.length) {\n    var currChar = str.charAt(str.length - suffLen - 1);\n    if (currChar === c && !invert) {\n      suffLen++;\n    } else if (currChar !== c && invert) {\n      suffLen++;\n    } else {\n      break;\n    }\n  }\n\n  return str.substr(0, str.length - suffLen);\n}\n\n/**\n * Marked\n */\n\nfunction marked(src, opt, callback) {\n  // throw error in case of non string input\n  if (typeof src === 'undefined' || src === null) {\n    throw new Error('marked(): input parameter is undefined or null');\n  }\n  if (typeof src !== 'string') {\n    throw new Error('marked(): input parameter is of type '\n      + Object.prototype.toString.call(src) + ', string expected');\n  }\n\n  if (callback || typeof opt === 'function') {\n    if (!callback) {\n      callback = opt;\n      opt = null;\n    }\n\n    opt = merge({}, marked.defaults, opt || {});\n\n    var highlight = opt.highlight,\n        tokens,\n        pending,\n        i = 0;\n\n    try {\n      tokens = Lexer.lex(src, opt)\n    } catch (e) {\n      return callback(e);\n    }\n\n    pending = tokens.length;\n\n    var done = function(err) {\n      if (err) {\n        opt.highlight = highlight;\n        return callback(err);\n      }\n\n      var out;\n\n      try {\n        out = Parser.parse(tokens, opt);\n      } catch (e) {\n        err = e;\n      }\n\n      opt.highlight = highlight;\n\n      return err\n        ? callback(err)\n        : callback(null, out);\n    };\n\n    if (!highlight || highlight.length < 3) {\n      return done();\n    }\n\n    delete opt.highlight;\n\n    if (!pending) return done();\n\n    for (; i < tokens.length; i++) {\n      (function(token) {\n        if (token.type !== 'code') {\n          return --pending || done();\n        }\n        return highlight(token.text, token.lang, function(err, code) {\n          if (err) return done(err);\n          if (code == null || code === token.text) {\n            return --pending || done();\n          }\n          token.text = code;\n          token.escaped = true;\n          --pending || done();\n        });\n      })(tokens[i]);\n    }\n\n    return;\n  }\n  try {\n    if (opt) opt = merge({}, marked.defaults, opt);\n    return Parser.parse(Lexer.lex(src, opt), opt);\n  } catch (e) {\n    e.message += '\\nPlease report this to https://github.com/markedjs/marked.';\n    if ((opt || marked.defaults).silent) {\n      return '<p>An error occurred:</p><pre>'\n        + escape(e.message + '', true)\n        + '</pre>';\n    }\n    throw e;\n  }\n}\n\n/**\n * Options\n */\n\nmarked.options =\nmarked.setOptions = function(opt) {\n  merge(marked.defaults, opt);\n  return marked;\n};\n\nmarked.getDefaults = function () {\n  return {\n    baseUrl: null,\n    breaks: false,\n    gfm: true,\n    headerIds: true,\n    headerPrefix: '',\n    highlight: null,\n    langPrefix: 'language-',\n    mangle: true,\n    pedantic: false,\n    renderer: new Renderer(),\n    sanitize: false,\n    sanitizer: null,\n    silent: false,\n    smartLists: false,\n    smartypants: false,\n    tables: true,\n    xhtml: false\n  };\n}\n\nmarked.defaults = marked.getDefaults();\n\n/**\n * Expose\n */\n\nmarked.Parser = Parser;\nmarked.parser = Parser.parse;\n\nmarked.Renderer = Renderer;\nmarked.TextRenderer = TextRenderer;\n\nmarked.Lexer = Lexer;\nmarked.lexer = Lexer.lex;\n\nmarked.InlineLexer = InlineLexer;\nmarked.inlineLexer = InlineLexer.output;\n\nmarked.parse = marked;\n\nif (typeof module !== 'undefined' && typeof exports === 'object') {\n  module.exports = marked;\n} else if (typeof define === 'function' && define.amd) {\n  define(function() { return marked; });\n} else {\n  root.marked = marked;\n}\n})(this || (typeof window !== 'undefined' ? window : global));\n"
  },
  {
    "path": "static/editor.md/lib/mermaid/mermaid.js",
    "content": "(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"mermaid\"] = factory();\n\telse\n\t\troot[\"mermaid\"] = factory();\n})(typeof self !== \"undefined\" ? self : this, function() {\nreturn /******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId]) {\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/ \t\t}\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\ti: moduleId,\n/******/ \t\t\tl: false,\n/******/ \t\t\texports: {}\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.l = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// define getter function for harmony exports\n/******/ \t__webpack_require__.d = function(exports, name, getter) {\n/******/ \t\tif(!__webpack_require__.o(exports, name)) {\n/******/ \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n/******/ \t\t}\n/******/ \t};\n/******/\n/******/ \t// define __esModule on exports\n/******/ \t__webpack_require__.r = function(exports) {\n/******/ \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n/******/ \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n/******/ \t\t}\n/******/ \t\tObject.defineProperty(exports, '__esModule', { value: true });\n/******/ \t};\n/******/\n/******/ \t// create a fake namespace object\n/******/ \t// mode & 1: value is a module id, require it\n/******/ \t// mode & 2: merge all properties of value into the ns\n/******/ \t// mode & 4: return value when already ns object\n/******/ \t// mode & 8|1: behave like require\n/******/ \t__webpack_require__.t = function(value, mode) {\n/******/ \t\tif(mode & 1) value = __webpack_require__(value);\n/******/ \t\tif(mode & 8) return value;\n/******/ \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n/******/ \t\tvar ns = Object.create(null);\n/******/ \t\t__webpack_require__.r(ns);\n/******/ \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n/******/ \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n/******/ \t\treturn ns;\n/******/ \t};\n/******/\n/******/ \t// getDefaultExport function for compatibility with non-harmony modules\n/******/ \t__webpack_require__.n = function(module) {\n/******/ \t\tvar getter = module && module.__esModule ?\n/******/ \t\t\tfunction getDefault() { return module['default']; } :\n/******/ \t\t\tfunction getModuleExports() { return module; };\n/******/ \t\t__webpack_require__.d(getter, 'a', getter);\n/******/ \t\treturn getter;\n/******/ \t};\n/******/\n/******/ \t// Object.prototype.hasOwnProperty.call\n/******/ \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(__webpack_require__.s = \"./src/mermaid.js\");\n/******/ })\n/************************************************************************/\n/******/ ({\n\n/***/ \"./node_modules/@braintree/sanitize-url/index.js\":\n/*!*******************************************************!*\\\n  !*** ./node_modules/@braintree/sanitize-url/index.js ***!\n  \\*******************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar invalidPrototcolRegex = /^(%20|\\s)*(javascript|data)/im;\nvar ctrlCharactersRegex = /[^\\x20-\\x7E]/gmi;\nvar urlSchemeRegex = /^([^:]+):/gm;\nvar relativeFirstCharacters = ['.', '/']\n\nfunction isRelativeUrl(url) {\n  return relativeFirstCharacters.indexOf(url[0]) > -1;\n}\n\nfunction sanitizeUrl(url) {\n  if (!url) {\n    return 'about:blank';\n  }\n\n  var urlScheme, urlSchemeParseResults;\n  var sanitizedUrl = url.replace(ctrlCharactersRegex, '').trim();\n\n  if (isRelativeUrl(sanitizedUrl)) {\n    return sanitizedUrl;\n  }\n\n  urlSchemeParseResults = sanitizedUrl.match(urlSchemeRegex);\n\n  if (!urlSchemeParseResults) {\n    return 'about:blank';\n  }\n\n  urlScheme = urlSchemeParseResults[0];\n\n  if (invalidPrototcolRegex.test(urlScheme)) {\n    return 'about:blank';\n  }\n\n  return sanitizedUrl;\n}\n\nmodule.exports = {\n  sanitizeUrl: sanitizeUrl\n};\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-array/src/array.js\":\n/*!********************************************!*\\\n  !*** ./node_modules/d3-array/src/array.js ***!\n  \\********************************************/\n/*! exports provided: slice, map */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"slice\", function() { return slice; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"map\", function() { return map; });\nvar array = Array.prototype;\n\nvar slice = array.slice;\nvar map = array.map;\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-array/src/ascending.js\":\n/*!************************************************!*\\\n  !*** ./node_modules/d3-array/src/ascending.js ***!\n  \\************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(a, b) {\n  return a < b ? -1 : a > b ? 1 : a >= b ? 0 : NaN;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-array/src/bisect.js\":\n/*!*********************************************!*\\\n  !*** ./node_modules/d3-array/src/bisect.js ***!\n  \\*********************************************/\n/*! exports provided: bisectRight, bisectLeft, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"bisectRight\", function() { return bisectRight; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"bisectLeft\", function() { return bisectLeft; });\n/* harmony import */ var _ascending__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ascending */ \"./node_modules/d3-array/src/ascending.js\");\n/* harmony import */ var _bisector__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./bisector */ \"./node_modules/d3-array/src/bisector.js\");\n\n\n\nvar ascendingBisect = Object(_bisector__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(_ascending__WEBPACK_IMPORTED_MODULE_0__[\"default\"]);\nvar bisectRight = ascendingBisect.right;\nvar bisectLeft = ascendingBisect.left;\n/* harmony default export */ __webpack_exports__[\"default\"] = (bisectRight);\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-array/src/bisector.js\":\n/*!***********************************************!*\\\n  !*** ./node_modules/d3-array/src/bisector.js ***!\n  \\***********************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _ascending__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ascending */ \"./node_modules/d3-array/src/ascending.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(compare) {\n  if (compare.length === 1) compare = ascendingComparator(compare);\n  return {\n    left: function(a, x, lo, hi) {\n      if (lo == null) lo = 0;\n      if (hi == null) hi = a.length;\n      while (lo < hi) {\n        var mid = lo + hi >>> 1;\n        if (compare(a[mid], x) < 0) lo = mid + 1;\n        else hi = mid;\n      }\n      return lo;\n    },\n    right: function(a, x, lo, hi) {\n      if (lo == null) lo = 0;\n      if (hi == null) hi = a.length;\n      while (lo < hi) {\n        var mid = lo + hi >>> 1;\n        if (compare(a[mid], x) > 0) hi = mid;\n        else lo = mid + 1;\n      }\n      return lo;\n    }\n  };\n});\n\nfunction ascendingComparator(f) {\n  return function(d, x) {\n    return Object(_ascending__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(f(d), x);\n  };\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-array/src/constant.js\":\n/*!***********************************************!*\\\n  !*** ./node_modules/d3-array/src/constant.js ***!\n  \\***********************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(x) {\n  return function() {\n    return x;\n  };\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-array/src/cross.js\":\n/*!********************************************!*\\\n  !*** ./node_modules/d3-array/src/cross.js ***!\n  \\********************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _pairs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./pairs */ \"./node_modules/d3-array/src/pairs.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(values0, values1, reduce) {\n  var n0 = values0.length,\n      n1 = values1.length,\n      values = new Array(n0 * n1),\n      i0,\n      i1,\n      i,\n      value0;\n\n  if (reduce == null) reduce = _pairs__WEBPACK_IMPORTED_MODULE_0__[\"pair\"];\n\n  for (i0 = i = 0; i0 < n0; ++i0) {\n    for (value0 = values0[i0], i1 = 0; i1 < n1; ++i1, ++i) {\n      values[i] = reduce(value0, values1[i1]);\n    }\n  }\n\n  return values;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-array/src/descending.js\":\n/*!*************************************************!*\\\n  !*** ./node_modules/d3-array/src/descending.js ***!\n  \\*************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(a, b) {\n  return b < a ? -1 : b > a ? 1 : b >= a ? 0 : NaN;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-array/src/deviation.js\":\n/*!************************************************!*\\\n  !*** ./node_modules/d3-array/src/deviation.js ***!\n  \\************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _variance__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./variance */ \"./node_modules/d3-array/src/variance.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(array, f) {\n  var v = Object(_variance__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(array, f);\n  return v ? Math.sqrt(v) : v;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-array/src/extent.js\":\n/*!*********************************************!*\\\n  !*** ./node_modules/d3-array/src/extent.js ***!\n  \\*********************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(values, valueof) {\n  var n = values.length,\n      i = -1,\n      value,\n      min,\n      max;\n\n  if (valueof == null) {\n    while (++i < n) { // Find the first comparable value.\n      if ((value = values[i]) != null && value >= value) {\n        min = max = value;\n        while (++i < n) { // Compare the remaining values.\n          if ((value = values[i]) != null) {\n            if (min > value) min = value;\n            if (max < value) max = value;\n          }\n        }\n      }\n    }\n  }\n\n  else {\n    while (++i < n) { // Find the first comparable value.\n      if ((value = valueof(values[i], i, values)) != null && value >= value) {\n        min = max = value;\n        while (++i < n) { // Compare the remaining values.\n          if ((value = valueof(values[i], i, values)) != null) {\n            if (min > value) min = value;\n            if (max < value) max = value;\n          }\n        }\n      }\n    }\n  }\n\n  return [min, max];\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-array/src/histogram.js\":\n/*!************************************************!*\\\n  !*** ./node_modules/d3-array/src/histogram.js ***!\n  \\************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./array */ \"./node_modules/d3-array/src/array.js\");\n/* harmony import */ var _bisect__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./bisect */ \"./node_modules/d3-array/src/bisect.js\");\n/* harmony import */ var _constant__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./constant */ \"./node_modules/d3-array/src/constant.js\");\n/* harmony import */ var _extent__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./extent */ \"./node_modules/d3-array/src/extent.js\");\n/* harmony import */ var _identity__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./identity */ \"./node_modules/d3-array/src/identity.js\");\n/* harmony import */ var _range__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./range */ \"./node_modules/d3-array/src/range.js\");\n/* harmony import */ var _ticks__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./ticks */ \"./node_modules/d3-array/src/ticks.js\");\n/* harmony import */ var _threshold_sturges__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./threshold/sturges */ \"./node_modules/d3-array/src/threshold/sturges.js\");\n\n\n\n\n\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  var value = _identity__WEBPACK_IMPORTED_MODULE_4__[\"default\"],\n      domain = _extent__WEBPACK_IMPORTED_MODULE_3__[\"default\"],\n      threshold = _threshold_sturges__WEBPACK_IMPORTED_MODULE_7__[\"default\"];\n\n  function histogram(data) {\n    var i,\n        n = data.length,\n        x,\n        values = new Array(n);\n\n    for (i = 0; i < n; ++i) {\n      values[i] = value(data[i], i, data);\n    }\n\n    var xz = domain(values),\n        x0 = xz[0],\n        x1 = xz[1],\n        tz = threshold(values, x0, x1);\n\n    // Convert number of thresholds into uniform thresholds.\n    if (!Array.isArray(tz)) {\n      tz = Object(_ticks__WEBPACK_IMPORTED_MODULE_6__[\"tickStep\"])(x0, x1, tz);\n      tz = Object(_range__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(Math.ceil(x0 / tz) * tz, x1, tz); // exclusive\n    }\n\n    // Remove any thresholds outside the domain.\n    var m = tz.length;\n    while (tz[0] <= x0) tz.shift(), --m;\n    while (tz[m - 1] > x1) tz.pop(), --m;\n\n    var bins = new Array(m + 1),\n        bin;\n\n    // Initialize bins.\n    for (i = 0; i <= m; ++i) {\n      bin = bins[i] = [];\n      bin.x0 = i > 0 ? tz[i - 1] : x0;\n      bin.x1 = i < m ? tz[i] : x1;\n    }\n\n    // Assign data to bins by value, ignoring any outside the domain.\n    for (i = 0; i < n; ++i) {\n      x = values[i];\n      if (x0 <= x && x <= x1) {\n        bins[Object(_bisect__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(tz, x, 0, m)].push(data[i]);\n      }\n    }\n\n    return bins;\n  }\n\n  histogram.value = function(_) {\n    return arguments.length ? (value = typeof _ === \"function\" ? _ : Object(_constant__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(_), histogram) : value;\n  };\n\n  histogram.domain = function(_) {\n    return arguments.length ? (domain = typeof _ === \"function\" ? _ : Object(_constant__WEBPACK_IMPORTED_MODULE_2__[\"default\"])([_[0], _[1]]), histogram) : domain;\n  };\n\n  histogram.thresholds = function(_) {\n    return arguments.length ? (threshold = typeof _ === \"function\" ? _ : Array.isArray(_) ? Object(_constant__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(_array__WEBPACK_IMPORTED_MODULE_0__[\"slice\"].call(_)) : Object(_constant__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(_), histogram) : threshold;\n  };\n\n  return histogram;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-array/src/identity.js\":\n/*!***********************************************!*\\\n  !*** ./node_modules/d3-array/src/identity.js ***!\n  \\***********************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(x) {\n  return x;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-array/src/index.js\":\n/*!********************************************!*\\\n  !*** ./node_modules/d3-array/src/index.js ***!\n  \\********************************************/\n/*! exports provided: bisect, bisectRight, bisectLeft, ascending, bisector, cross, descending, deviation, extent, histogram, thresholdFreedmanDiaconis, thresholdScott, thresholdSturges, max, mean, median, merge, min, pairs, permute, quantile, range, scan, shuffle, sum, ticks, tickIncrement, tickStep, transpose, variance, zip */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _bisect__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./bisect */ \"./node_modules/d3-array/src/bisect.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"bisect\", function() { return _bisect__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"bisectRight\", function() { return _bisect__WEBPACK_IMPORTED_MODULE_0__[\"bisectRight\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"bisectLeft\", function() { return _bisect__WEBPACK_IMPORTED_MODULE_0__[\"bisectLeft\"]; });\n\n/* harmony import */ var _ascending__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./ascending */ \"./node_modules/d3-array/src/ascending.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"ascending\", function() { return _ascending__WEBPACK_IMPORTED_MODULE_1__[\"default\"]; });\n\n/* harmony import */ var _bisector__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./bisector */ \"./node_modules/d3-array/src/bisector.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"bisector\", function() { return _bisector__WEBPACK_IMPORTED_MODULE_2__[\"default\"]; });\n\n/* harmony import */ var _cross__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./cross */ \"./node_modules/d3-array/src/cross.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"cross\", function() { return _cross__WEBPACK_IMPORTED_MODULE_3__[\"default\"]; });\n\n/* harmony import */ var _descending__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./descending */ \"./node_modules/d3-array/src/descending.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"descending\", function() { return _descending__WEBPACK_IMPORTED_MODULE_4__[\"default\"]; });\n\n/* harmony import */ var _deviation__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./deviation */ \"./node_modules/d3-array/src/deviation.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"deviation\", function() { return _deviation__WEBPACK_IMPORTED_MODULE_5__[\"default\"]; });\n\n/* harmony import */ var _extent__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./extent */ \"./node_modules/d3-array/src/extent.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"extent\", function() { return _extent__WEBPACK_IMPORTED_MODULE_6__[\"default\"]; });\n\n/* harmony import */ var _histogram__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./histogram */ \"./node_modules/d3-array/src/histogram.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"histogram\", function() { return _histogram__WEBPACK_IMPORTED_MODULE_7__[\"default\"]; });\n\n/* harmony import */ var _threshold_freedmanDiaconis__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./threshold/freedmanDiaconis */ \"./node_modules/d3-array/src/threshold/freedmanDiaconis.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"thresholdFreedmanDiaconis\", function() { return _threshold_freedmanDiaconis__WEBPACK_IMPORTED_MODULE_8__[\"default\"]; });\n\n/* harmony import */ var _threshold_scott__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./threshold/scott */ \"./node_modules/d3-array/src/threshold/scott.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"thresholdScott\", function() { return _threshold_scott__WEBPACK_IMPORTED_MODULE_9__[\"default\"]; });\n\n/* harmony import */ var _threshold_sturges__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./threshold/sturges */ \"./node_modules/d3-array/src/threshold/sturges.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"thresholdSturges\", function() { return _threshold_sturges__WEBPACK_IMPORTED_MODULE_10__[\"default\"]; });\n\n/* harmony import */ var _max__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./max */ \"./node_modules/d3-array/src/max.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"max\", function() { return _max__WEBPACK_IMPORTED_MODULE_11__[\"default\"]; });\n\n/* harmony import */ var _mean__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./mean */ \"./node_modules/d3-array/src/mean.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"mean\", function() { return _mean__WEBPACK_IMPORTED_MODULE_12__[\"default\"]; });\n\n/* harmony import */ var _median__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./median */ \"./node_modules/d3-array/src/median.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"median\", function() { return _median__WEBPACK_IMPORTED_MODULE_13__[\"default\"]; });\n\n/* harmony import */ var _merge__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./merge */ \"./node_modules/d3-array/src/merge.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"merge\", function() { return _merge__WEBPACK_IMPORTED_MODULE_14__[\"default\"]; });\n\n/* harmony import */ var _min__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./min */ \"./node_modules/d3-array/src/min.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"min\", function() { return _min__WEBPACK_IMPORTED_MODULE_15__[\"default\"]; });\n\n/* harmony import */ var _pairs__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./pairs */ \"./node_modules/d3-array/src/pairs.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"pairs\", function() { return _pairs__WEBPACK_IMPORTED_MODULE_16__[\"default\"]; });\n\n/* harmony import */ var _permute__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./permute */ \"./node_modules/d3-array/src/permute.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"permute\", function() { return _permute__WEBPACK_IMPORTED_MODULE_17__[\"default\"]; });\n\n/* harmony import */ var _quantile__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./quantile */ \"./node_modules/d3-array/src/quantile.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"quantile\", function() { return _quantile__WEBPACK_IMPORTED_MODULE_18__[\"default\"]; });\n\n/* harmony import */ var _range__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./range */ \"./node_modules/d3-array/src/range.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"range\", function() { return _range__WEBPACK_IMPORTED_MODULE_19__[\"default\"]; });\n\n/* harmony import */ var _scan__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./scan */ \"./node_modules/d3-array/src/scan.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"scan\", function() { return _scan__WEBPACK_IMPORTED_MODULE_20__[\"default\"]; });\n\n/* harmony import */ var _shuffle__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./shuffle */ \"./node_modules/d3-array/src/shuffle.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"shuffle\", function() { return _shuffle__WEBPACK_IMPORTED_MODULE_21__[\"default\"]; });\n\n/* harmony import */ var _sum__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./sum */ \"./node_modules/d3-array/src/sum.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"sum\", function() { return _sum__WEBPACK_IMPORTED_MODULE_22__[\"default\"]; });\n\n/* harmony import */ var _ticks__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./ticks */ \"./node_modules/d3-array/src/ticks.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"ticks\", function() { return _ticks__WEBPACK_IMPORTED_MODULE_23__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"tickIncrement\", function() { return _ticks__WEBPACK_IMPORTED_MODULE_23__[\"tickIncrement\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"tickStep\", function() { return _ticks__WEBPACK_IMPORTED_MODULE_23__[\"tickStep\"]; });\n\n/* harmony import */ var _transpose__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ./transpose */ \"./node_modules/d3-array/src/transpose.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"transpose\", function() { return _transpose__WEBPACK_IMPORTED_MODULE_24__[\"default\"]; });\n\n/* harmony import */ var _variance__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ./variance */ \"./node_modules/d3-array/src/variance.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"variance\", function() { return _variance__WEBPACK_IMPORTED_MODULE_25__[\"default\"]; });\n\n/* harmony import */ var _zip__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ./zip */ \"./node_modules/d3-array/src/zip.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"zip\", function() { return _zip__WEBPACK_IMPORTED_MODULE_26__[\"default\"]; });\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-array/src/max.js\":\n/*!******************************************!*\\\n  !*** ./node_modules/d3-array/src/max.js ***!\n  \\******************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(values, valueof) {\n  var n = values.length,\n      i = -1,\n      value,\n      max;\n\n  if (valueof == null) {\n    while (++i < n) { // Find the first comparable value.\n      if ((value = values[i]) != null && value >= value) {\n        max = value;\n        while (++i < n) { // Compare the remaining values.\n          if ((value = values[i]) != null && value > max) {\n            max = value;\n          }\n        }\n      }\n    }\n  }\n\n  else {\n    while (++i < n) { // Find the first comparable value.\n      if ((value = valueof(values[i], i, values)) != null && value >= value) {\n        max = value;\n        while (++i < n) { // Compare the remaining values.\n          if ((value = valueof(values[i], i, values)) != null && value > max) {\n            max = value;\n          }\n        }\n      }\n    }\n  }\n\n  return max;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-array/src/mean.js\":\n/*!*******************************************!*\\\n  !*** ./node_modules/d3-array/src/mean.js ***!\n  \\*******************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _number__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./number */ \"./node_modules/d3-array/src/number.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(values, valueof) {\n  var n = values.length,\n      m = n,\n      i = -1,\n      value,\n      sum = 0;\n\n  if (valueof == null) {\n    while (++i < n) {\n      if (!isNaN(value = Object(_number__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(values[i]))) sum += value;\n      else --m;\n    }\n  }\n\n  else {\n    while (++i < n) {\n      if (!isNaN(value = Object(_number__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(valueof(values[i], i, values)))) sum += value;\n      else --m;\n    }\n  }\n\n  if (m) return sum / m;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-array/src/median.js\":\n/*!*********************************************!*\\\n  !*** ./node_modules/d3-array/src/median.js ***!\n  \\*********************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _ascending__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ascending */ \"./node_modules/d3-array/src/ascending.js\");\n/* harmony import */ var _number__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./number */ \"./node_modules/d3-array/src/number.js\");\n/* harmony import */ var _quantile__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./quantile */ \"./node_modules/d3-array/src/quantile.js\");\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(values, valueof) {\n  var n = values.length,\n      i = -1,\n      value,\n      numbers = [];\n\n  if (valueof == null) {\n    while (++i < n) {\n      if (!isNaN(value = Object(_number__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(values[i]))) {\n        numbers.push(value);\n      }\n    }\n  }\n\n  else {\n    while (++i < n) {\n      if (!isNaN(value = Object(_number__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(valueof(values[i], i, values)))) {\n        numbers.push(value);\n      }\n    }\n  }\n\n  return Object(_quantile__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(numbers.sort(_ascending__WEBPACK_IMPORTED_MODULE_0__[\"default\"]), 0.5);\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-array/src/merge.js\":\n/*!********************************************!*\\\n  !*** ./node_modules/d3-array/src/merge.js ***!\n  \\********************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(arrays) {\n  var n = arrays.length,\n      m,\n      i = -1,\n      j = 0,\n      merged,\n      array;\n\n  while (++i < n) j += arrays[i].length;\n  merged = new Array(j);\n\n  while (--n >= 0) {\n    array = arrays[n];\n    m = array.length;\n    while (--m >= 0) {\n      merged[--j] = array[m];\n    }\n  }\n\n  return merged;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-array/src/min.js\":\n/*!******************************************!*\\\n  !*** ./node_modules/d3-array/src/min.js ***!\n  \\******************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(values, valueof) {\n  var n = values.length,\n      i = -1,\n      value,\n      min;\n\n  if (valueof == null) {\n    while (++i < n) { // Find the first comparable value.\n      if ((value = values[i]) != null && value >= value) {\n        min = value;\n        while (++i < n) { // Compare the remaining values.\n          if ((value = values[i]) != null && min > value) {\n            min = value;\n          }\n        }\n      }\n    }\n  }\n\n  else {\n    while (++i < n) { // Find the first comparable value.\n      if ((value = valueof(values[i], i, values)) != null && value >= value) {\n        min = value;\n        while (++i < n) { // Compare the remaining values.\n          if ((value = valueof(values[i], i, values)) != null && min > value) {\n            min = value;\n          }\n        }\n      }\n    }\n  }\n\n  return min;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-array/src/number.js\":\n/*!*********************************************!*\\\n  !*** ./node_modules/d3-array/src/number.js ***!\n  \\*********************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(x) {\n  return x === null ? NaN : +x;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-array/src/pairs.js\":\n/*!********************************************!*\\\n  !*** ./node_modules/d3-array/src/pairs.js ***!\n  \\********************************************/\n/*! exports provided: default, pair */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"pair\", function() { return pair; });\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(array, f) {\n  if (f == null) f = pair;\n  var i = 0, n = array.length - 1, p = array[0], pairs = new Array(n < 0 ? 0 : n);\n  while (i < n) pairs[i] = f(p, p = array[++i]);\n  return pairs;\n});\n\nfunction pair(a, b) {\n  return [a, b];\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-array/src/permute.js\":\n/*!**********************************************!*\\\n  !*** ./node_modules/d3-array/src/permute.js ***!\n  \\**********************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(array, indexes) {\n  var i = indexes.length, permutes = new Array(i);\n  while (i--) permutes[i] = array[indexes[i]];\n  return permutes;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-array/src/quantile.js\":\n/*!***********************************************!*\\\n  !*** ./node_modules/d3-array/src/quantile.js ***!\n  \\***********************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _number__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./number */ \"./node_modules/d3-array/src/number.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(values, p, valueof) {\n  if (valueof == null) valueof = _number__WEBPACK_IMPORTED_MODULE_0__[\"default\"];\n  if (!(n = values.length)) return;\n  if ((p = +p) <= 0 || n < 2) return +valueof(values[0], 0, values);\n  if (p >= 1) return +valueof(values[n - 1], n - 1, values);\n  var n,\n      i = (n - 1) * p,\n      i0 = Math.floor(i),\n      value0 = +valueof(values[i0], i0, values),\n      value1 = +valueof(values[i0 + 1], i0 + 1, values);\n  return value0 + (value1 - value0) * (i - i0);\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-array/src/range.js\":\n/*!********************************************!*\\\n  !*** ./node_modules/d3-array/src/range.js ***!\n  \\********************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(start, stop, step) {\n  start = +start, stop = +stop, step = (n = arguments.length) < 2 ? (stop = start, start = 0, 1) : n < 3 ? 1 : +step;\n\n  var i = -1,\n      n = Math.max(0, Math.ceil((stop - start) / step)) | 0,\n      range = new Array(n);\n\n  while (++i < n) {\n    range[i] = start + i * step;\n  }\n\n  return range;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-array/src/scan.js\":\n/*!*******************************************!*\\\n  !*** ./node_modules/d3-array/src/scan.js ***!\n  \\*******************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _ascending__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ascending */ \"./node_modules/d3-array/src/ascending.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(values, compare) {\n  if (!(n = values.length)) return;\n  var n,\n      i = 0,\n      j = 0,\n      xi,\n      xj = values[j];\n\n  if (compare == null) compare = _ascending__WEBPACK_IMPORTED_MODULE_0__[\"default\"];\n\n  while (++i < n) {\n    if (compare(xi = values[i], xj) < 0 || compare(xj, xj) !== 0) {\n      xj = xi, j = i;\n    }\n  }\n\n  if (compare(xj, xj) === 0) return j;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-array/src/shuffle.js\":\n/*!**********************************************!*\\\n  !*** ./node_modules/d3-array/src/shuffle.js ***!\n  \\**********************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(array, i0, i1) {\n  var m = (i1 == null ? array.length : i1) - (i0 = i0 == null ? 0 : +i0),\n      t,\n      i;\n\n  while (m) {\n    i = Math.random() * m-- | 0;\n    t = array[m + i0];\n    array[m + i0] = array[i + i0];\n    array[i + i0] = t;\n  }\n\n  return array;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-array/src/sum.js\":\n/*!******************************************!*\\\n  !*** ./node_modules/d3-array/src/sum.js ***!\n  \\******************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(values, valueof) {\n  var n = values.length,\n      i = -1,\n      value,\n      sum = 0;\n\n  if (valueof == null) {\n    while (++i < n) {\n      if (value = +values[i]) sum += value; // Note: zero and null are equivalent.\n    }\n  }\n\n  else {\n    while (++i < n) {\n      if (value = +valueof(values[i], i, values)) sum += value;\n    }\n  }\n\n  return sum;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-array/src/threshold/freedmanDiaconis.js\":\n/*!*****************************************************************!*\\\n  !*** ./node_modules/d3-array/src/threshold/freedmanDiaconis.js ***!\n  \\*****************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../array */ \"./node_modules/d3-array/src/array.js\");\n/* harmony import */ var _ascending__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ascending */ \"./node_modules/d3-array/src/ascending.js\");\n/* harmony import */ var _number__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../number */ \"./node_modules/d3-array/src/number.js\");\n/* harmony import */ var _quantile__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../quantile */ \"./node_modules/d3-array/src/quantile.js\");\n\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(values, min, max) {\n  values = _array__WEBPACK_IMPORTED_MODULE_0__[\"map\"].call(values, _number__WEBPACK_IMPORTED_MODULE_2__[\"default\"]).sort(_ascending__WEBPACK_IMPORTED_MODULE_1__[\"default\"]);\n  return Math.ceil((max - min) / (2 * (Object(_quantile__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(values, 0.75) - Object(_quantile__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(values, 0.25)) * Math.pow(values.length, -1 / 3)));\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-array/src/threshold/scott.js\":\n/*!******************************************************!*\\\n  !*** ./node_modules/d3-array/src/threshold/scott.js ***!\n  \\******************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _deviation__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../deviation */ \"./node_modules/d3-array/src/deviation.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(values, min, max) {\n  return Math.ceil((max - min) / (3.5 * Object(_deviation__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(values) * Math.pow(values.length, -1 / 3)));\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-array/src/threshold/sturges.js\":\n/*!********************************************************!*\\\n  !*** ./node_modules/d3-array/src/threshold/sturges.js ***!\n  \\********************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(values) {\n  return Math.ceil(Math.log(values.length) / Math.LN2) + 1;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-array/src/ticks.js\":\n/*!********************************************!*\\\n  !*** ./node_modules/d3-array/src/ticks.js ***!\n  \\********************************************/\n/*! exports provided: default, tickIncrement, tickStep */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"tickIncrement\", function() { return tickIncrement; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"tickStep\", function() { return tickStep; });\nvar e10 = Math.sqrt(50),\n    e5 = Math.sqrt(10),\n    e2 = Math.sqrt(2);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(start, stop, count) {\n  var reverse,\n      i = -1,\n      n,\n      ticks,\n      step;\n\n  stop = +stop, start = +start, count = +count;\n  if (start === stop && count > 0) return [start];\n  if (reverse = stop < start) n = start, start = stop, stop = n;\n  if ((step = tickIncrement(start, stop, count)) === 0 || !isFinite(step)) return [];\n\n  if (step > 0) {\n    start = Math.ceil(start / step);\n    stop = Math.floor(stop / step);\n    ticks = new Array(n = Math.ceil(stop - start + 1));\n    while (++i < n) ticks[i] = (start + i) * step;\n  } else {\n    start = Math.floor(start * step);\n    stop = Math.ceil(stop * step);\n    ticks = new Array(n = Math.ceil(start - stop + 1));\n    while (++i < n) ticks[i] = (start - i) / step;\n  }\n\n  if (reverse) ticks.reverse();\n\n  return ticks;\n});\n\nfunction tickIncrement(start, stop, count) {\n  var step = (stop - start) / Math.max(0, count),\n      power = Math.floor(Math.log(step) / Math.LN10),\n      error = step / Math.pow(10, power);\n  return power >= 0\n      ? (error >= e10 ? 10 : error >= e5 ? 5 : error >= e2 ? 2 : 1) * Math.pow(10, power)\n      : -Math.pow(10, -power) / (error >= e10 ? 10 : error >= e5 ? 5 : error >= e2 ? 2 : 1);\n}\n\nfunction tickStep(start, stop, count) {\n  var step0 = Math.abs(stop - start) / Math.max(0, count),\n      step1 = Math.pow(10, Math.floor(Math.log(step0) / Math.LN10)),\n      error = step0 / step1;\n  if (error >= e10) step1 *= 10;\n  else if (error >= e5) step1 *= 5;\n  else if (error >= e2) step1 *= 2;\n  return stop < start ? -step1 : step1;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-array/src/transpose.js\":\n/*!************************************************!*\\\n  !*** ./node_modules/d3-array/src/transpose.js ***!\n  \\************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _min__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./min */ \"./node_modules/d3-array/src/min.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(matrix) {\n  if (!(n = matrix.length)) return [];\n  for (var i = -1, m = Object(_min__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(matrix, length), transpose = new Array(m); ++i < m;) {\n    for (var j = -1, n, row = transpose[i] = new Array(n); ++j < n;) {\n      row[j] = matrix[j][i];\n    }\n  }\n  return transpose;\n});\n\nfunction length(d) {\n  return d.length;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-array/src/variance.js\":\n/*!***********************************************!*\\\n  !*** ./node_modules/d3-array/src/variance.js ***!\n  \\***********************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _number__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./number */ \"./node_modules/d3-array/src/number.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(values, valueof) {\n  var n = values.length,\n      m = 0,\n      i = -1,\n      mean = 0,\n      value,\n      delta,\n      sum = 0;\n\n  if (valueof == null) {\n    while (++i < n) {\n      if (!isNaN(value = Object(_number__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(values[i]))) {\n        delta = value - mean;\n        mean += delta / ++m;\n        sum += delta * (value - mean);\n      }\n    }\n  }\n\n  else {\n    while (++i < n) {\n      if (!isNaN(value = Object(_number__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(valueof(values[i], i, values)))) {\n        delta = value - mean;\n        mean += delta / ++m;\n        sum += delta * (value - mean);\n      }\n    }\n  }\n\n  if (m > 1) return sum / (m - 1);\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-array/src/zip.js\":\n/*!******************************************!*\\\n  !*** ./node_modules/d3-array/src/zip.js ***!\n  \\******************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _transpose__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./transpose */ \"./node_modules/d3-array/src/transpose.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  return Object(_transpose__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(arguments);\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-axis/src/axis.js\":\n/*!******************************************!*\\\n  !*** ./node_modules/d3-axis/src/axis.js ***!\n  \\******************************************/\n/*! exports provided: axisTop, axisRight, axisBottom, axisLeft */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"axisTop\", function() { return axisTop; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"axisRight\", function() { return axisRight; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"axisBottom\", function() { return axisBottom; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"axisLeft\", function() { return axisLeft; });\n/* harmony import */ var _identity_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./identity.js */ \"./node_modules/d3-axis/src/identity.js\");\n\n\nvar top = 1,\n    right = 2,\n    bottom = 3,\n    left = 4,\n    epsilon = 1e-6;\n\nfunction translateX(x) {\n  return \"translate(\" + x + \",0)\";\n}\n\nfunction translateY(y) {\n  return \"translate(0,\" + y + \")\";\n}\n\nfunction number(scale) {\n  return d => +scale(d);\n}\n\nfunction center(scale, offset) {\n  offset = Math.max(0, scale.bandwidth() - offset * 2) / 2;\n  if (scale.round()) offset = Math.round(offset);\n  return d => +scale(d) + offset;\n}\n\nfunction entering() {\n  return !this.__axis;\n}\n\nfunction axis(orient, scale) {\n  var tickArguments = [],\n      tickValues = null,\n      tickFormat = null,\n      tickSizeInner = 6,\n      tickSizeOuter = 6,\n      tickPadding = 3,\n      offset = typeof window !== \"undefined\" && window.devicePixelRatio > 1 ? 0 : 0.5,\n      k = orient === top || orient === left ? -1 : 1,\n      x = orient === left || orient === right ? \"x\" : \"y\",\n      transform = orient === top || orient === bottom ? translateX : translateY;\n\n  function axis(context) {\n    var values = tickValues == null ? (scale.ticks ? scale.ticks.apply(scale, tickArguments) : scale.domain()) : tickValues,\n        format = tickFormat == null ? (scale.tickFormat ? scale.tickFormat.apply(scale, tickArguments) : _identity_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]) : tickFormat,\n        spacing = Math.max(tickSizeInner, 0) + tickPadding,\n        range = scale.range(),\n        range0 = +range[0] + offset,\n        range1 = +range[range.length - 1] + offset,\n        position = (scale.bandwidth ? center : number)(scale.copy(), offset),\n        selection = context.selection ? context.selection() : context,\n        path = selection.selectAll(\".domain\").data([null]),\n        tick = selection.selectAll(\".tick\").data(values, scale).order(),\n        tickExit = tick.exit(),\n        tickEnter = tick.enter().append(\"g\").attr(\"class\", \"tick\"),\n        line = tick.select(\"line\"),\n        text = tick.select(\"text\");\n\n    path = path.merge(path.enter().insert(\"path\", \".tick\")\n        .attr(\"class\", \"domain\")\n        .attr(\"stroke\", \"currentColor\"));\n\n    tick = tick.merge(tickEnter);\n\n    line = line.merge(tickEnter.append(\"line\")\n        .attr(\"stroke\", \"currentColor\")\n        .attr(x + \"2\", k * tickSizeInner));\n\n    text = text.merge(tickEnter.append(\"text\")\n        .attr(\"fill\", \"currentColor\")\n        .attr(x, k * spacing)\n        .attr(\"dy\", orient === top ? \"0em\" : orient === bottom ? \"0.71em\" : \"0.32em\"));\n\n    if (context !== selection) {\n      path = path.transition(context);\n      tick = tick.transition(context);\n      line = line.transition(context);\n      text = text.transition(context);\n\n      tickExit = tickExit.transition(context)\n          .attr(\"opacity\", epsilon)\n          .attr(\"transform\", function(d) { return isFinite(d = position(d)) ? transform(d + offset) : this.getAttribute(\"transform\"); });\n\n      tickEnter\n          .attr(\"opacity\", epsilon)\n          .attr(\"transform\", function(d) { var p = this.parentNode.__axis; return transform((p && isFinite(p = p(d)) ? p : position(d)) + offset); });\n    }\n\n    tickExit.remove();\n\n    path\n        .attr(\"d\", orient === left || orient === right\n            ? (tickSizeOuter ? \"M\" + k * tickSizeOuter + \",\" + range0 + \"H\" + offset + \"V\" + range1 + \"H\" + k * tickSizeOuter : \"M\" + offset + \",\" + range0 + \"V\" + range1)\n            : (tickSizeOuter ? \"M\" + range0 + \",\" + k * tickSizeOuter + \"V\" + offset + \"H\" + range1 + \"V\" + k * tickSizeOuter : \"M\" + range0 + \",\" + offset + \"H\" + range1));\n\n    tick\n        .attr(\"opacity\", 1)\n        .attr(\"transform\", function(d) { return transform(position(d) + offset); });\n\n    line\n        .attr(x + \"2\", k * tickSizeInner);\n\n    text\n        .attr(x, k * spacing)\n        .text(format);\n\n    selection.filter(entering)\n        .attr(\"fill\", \"none\")\n        .attr(\"font-size\", 10)\n        .attr(\"font-family\", \"sans-serif\")\n        .attr(\"text-anchor\", orient === right ? \"start\" : orient === left ? \"end\" : \"middle\");\n\n    selection\n        .each(function() { this.__axis = position; });\n  }\n\n  axis.scale = function(_) {\n    return arguments.length ? (scale = _, axis) : scale;\n  };\n\n  axis.ticks = function() {\n    return tickArguments = Array.from(arguments), axis;\n  };\n\n  axis.tickArguments = function(_) {\n    return arguments.length ? (tickArguments = _ == null ? [] : Array.from(_), axis) : tickArguments.slice();\n  };\n\n  axis.tickValues = function(_) {\n    return arguments.length ? (tickValues = _ == null ? null : Array.from(_), axis) : tickValues && tickValues.slice();\n  };\n\n  axis.tickFormat = function(_) {\n    return arguments.length ? (tickFormat = _, axis) : tickFormat;\n  };\n\n  axis.tickSize = function(_) {\n    return arguments.length ? (tickSizeInner = tickSizeOuter = +_, axis) : tickSizeInner;\n  };\n\n  axis.tickSizeInner = function(_) {\n    return arguments.length ? (tickSizeInner = +_, axis) : tickSizeInner;\n  };\n\n  axis.tickSizeOuter = function(_) {\n    return arguments.length ? (tickSizeOuter = +_, axis) : tickSizeOuter;\n  };\n\n  axis.tickPadding = function(_) {\n    return arguments.length ? (tickPadding = +_, axis) : tickPadding;\n  };\n\n  axis.offset = function(_) {\n    return arguments.length ? (offset = +_, axis) : offset;\n  };\n\n  return axis;\n}\n\nfunction axisTop(scale) {\n  return axis(top, scale);\n}\n\nfunction axisRight(scale) {\n  return axis(right, scale);\n}\n\nfunction axisBottom(scale) {\n  return axis(bottom, scale);\n}\n\nfunction axisLeft(scale) {\n  return axis(left, scale);\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-axis/src/identity.js\":\n/*!**********************************************!*\\\n  !*** ./node_modules/d3-axis/src/identity.js ***!\n  \\**********************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(x) {\n  return x;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-axis/src/index.js\":\n/*!*******************************************!*\\\n  !*** ./node_modules/d3-axis/src/index.js ***!\n  \\*******************************************/\n/*! exports provided: axisTop, axisRight, axisBottom, axisLeft */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _axis_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./axis.js */ \"./node_modules/d3-axis/src/axis.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"axisTop\", function() { return _axis_js__WEBPACK_IMPORTED_MODULE_0__[\"axisTop\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"axisRight\", function() { return _axis_js__WEBPACK_IMPORTED_MODULE_0__[\"axisRight\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"axisBottom\", function() { return _axis_js__WEBPACK_IMPORTED_MODULE_0__[\"axisBottom\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"axisLeft\", function() { return _axis_js__WEBPACK_IMPORTED_MODULE_0__[\"axisLeft\"]; });\n\n\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-brush/node_modules/d3-color/src/color.js\":\n/*!******************************************************************!*\\\n  !*** ./node_modules/d3-brush/node_modules/d3-color/src/color.js ***!\n  \\******************************************************************/\n/*! exports provided: Color, darker, brighter, default, rgbConvert, rgb, Rgb, hslConvert, hsl */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Color\", function() { return Color; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"darker\", function() { return darker; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"brighter\", function() { return brighter; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return color; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"rgbConvert\", function() { return rgbConvert; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"rgb\", function() { return rgb; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Rgb\", function() { return Rgb; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"hslConvert\", function() { return hslConvert; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"hsl\", function() { return hsl; });\n/* harmony import */ var _define_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./define.js */ \"./node_modules/d3-brush/node_modules/d3-color/src/define.js\");\n\n\nfunction Color() {}\n\nvar darker = 0.7;\nvar brighter = 1 / darker;\n\nvar reI = \"\\\\s*([+-]?\\\\d+)\\\\s*\",\n    reN = \"\\\\s*([+-]?\\\\d*\\\\.?\\\\d+(?:[eE][+-]?\\\\d+)?)\\\\s*\",\n    reP = \"\\\\s*([+-]?\\\\d*\\\\.?\\\\d+(?:[eE][+-]?\\\\d+)?)%\\\\s*\",\n    reHex = /^#([0-9a-f]{3,8})$/,\n    reRgbInteger = new RegExp(\"^rgb\\\\(\" + [reI, reI, reI] + \"\\\\)$\"),\n    reRgbPercent = new RegExp(\"^rgb\\\\(\" + [reP, reP, reP] + \"\\\\)$\"),\n    reRgbaInteger = new RegExp(\"^rgba\\\\(\" + [reI, reI, reI, reN] + \"\\\\)$\"),\n    reRgbaPercent = new RegExp(\"^rgba\\\\(\" + [reP, reP, reP, reN] + \"\\\\)$\"),\n    reHslPercent = new RegExp(\"^hsl\\\\(\" + [reN, reP, reP] + \"\\\\)$\"),\n    reHslaPercent = new RegExp(\"^hsla\\\\(\" + [reN, reP, reP, reN] + \"\\\\)$\");\n\nvar named = {\n  aliceblue: 0xf0f8ff,\n  antiquewhite: 0xfaebd7,\n  aqua: 0x00ffff,\n  aquamarine: 0x7fffd4,\n  azure: 0xf0ffff,\n  beige: 0xf5f5dc,\n  bisque: 0xffe4c4,\n  black: 0x000000,\n  blanchedalmond: 0xffebcd,\n  blue: 0x0000ff,\n  blueviolet: 0x8a2be2,\n  brown: 0xa52a2a,\n  burlywood: 0xdeb887,\n  cadetblue: 0x5f9ea0,\n  chartreuse: 0x7fff00,\n  chocolate: 0xd2691e,\n  coral: 0xff7f50,\n  cornflowerblue: 0x6495ed,\n  cornsilk: 0xfff8dc,\n  crimson: 0xdc143c,\n  cyan: 0x00ffff,\n  darkblue: 0x00008b,\n  darkcyan: 0x008b8b,\n  darkgoldenrod: 0xb8860b,\n  darkgray: 0xa9a9a9,\n  darkgreen: 0x006400,\n  darkgrey: 0xa9a9a9,\n  darkkhaki: 0xbdb76b,\n  darkmagenta: 0x8b008b,\n  darkolivegreen: 0x556b2f,\n  darkorange: 0xff8c00,\n  darkorchid: 0x9932cc,\n  darkred: 0x8b0000,\n  darksalmon: 0xe9967a,\n  darkseagreen: 0x8fbc8f,\n  darkslateblue: 0x483d8b,\n  darkslategray: 0x2f4f4f,\n  darkslategrey: 0x2f4f4f,\n  darkturquoise: 0x00ced1,\n  darkviolet: 0x9400d3,\n  deeppink: 0xff1493,\n  deepskyblue: 0x00bfff,\n  dimgray: 0x696969,\n  dimgrey: 0x696969,\n  dodgerblue: 0x1e90ff,\n  firebrick: 0xb22222,\n  floralwhite: 0xfffaf0,\n  forestgreen: 0x228b22,\n  fuchsia: 0xff00ff,\n  gainsboro: 0xdcdcdc,\n  ghostwhite: 0xf8f8ff,\n  gold: 0xffd700,\n  goldenrod: 0xdaa520,\n  gray: 0x808080,\n  green: 0x008000,\n  greenyellow: 0xadff2f,\n  grey: 0x808080,\n  honeydew: 0xf0fff0,\n  hotpink: 0xff69b4,\n  indianred: 0xcd5c5c,\n  indigo: 0x4b0082,\n  ivory: 0xfffff0,\n  khaki: 0xf0e68c,\n  lavender: 0xe6e6fa,\n  lavenderblush: 0xfff0f5,\n  lawngreen: 0x7cfc00,\n  lemonchiffon: 0xfffacd,\n  lightblue: 0xadd8e6,\n  lightcoral: 0xf08080,\n  lightcyan: 0xe0ffff,\n  lightgoldenrodyellow: 0xfafad2,\n  lightgray: 0xd3d3d3,\n  lightgreen: 0x90ee90,\n  lightgrey: 0xd3d3d3,\n  lightpink: 0xffb6c1,\n  lightsalmon: 0xffa07a,\n  lightseagreen: 0x20b2aa,\n  lightskyblue: 0x87cefa,\n  lightslategray: 0x778899,\n  lightslategrey: 0x778899,\n  lightsteelblue: 0xb0c4de,\n  lightyellow: 0xffffe0,\n  lime: 0x00ff00,\n  limegreen: 0x32cd32,\n  linen: 0xfaf0e6,\n  magenta: 0xff00ff,\n  maroon: 0x800000,\n  mediumaquamarine: 0x66cdaa,\n  mediumblue: 0x0000cd,\n  mediumorchid: 0xba55d3,\n  mediumpurple: 0x9370db,\n  mediumseagreen: 0x3cb371,\n  mediumslateblue: 0x7b68ee,\n  mediumspringgreen: 0x00fa9a,\n  mediumturquoise: 0x48d1cc,\n  mediumvioletred: 0xc71585,\n  midnightblue: 0x191970,\n  mintcream: 0xf5fffa,\n  mistyrose: 0xffe4e1,\n  moccasin: 0xffe4b5,\n  navajowhite: 0xffdead,\n  navy: 0x000080,\n  oldlace: 0xfdf5e6,\n  olive: 0x808000,\n  olivedrab: 0x6b8e23,\n  orange: 0xffa500,\n  orangered: 0xff4500,\n  orchid: 0xda70d6,\n  palegoldenrod: 0xeee8aa,\n  palegreen: 0x98fb98,\n  paleturquoise: 0xafeeee,\n  palevioletred: 0xdb7093,\n  papayawhip: 0xffefd5,\n  peachpuff: 0xffdab9,\n  peru: 0xcd853f,\n  pink: 0xffc0cb,\n  plum: 0xdda0dd,\n  powderblue: 0xb0e0e6,\n  purple: 0x800080,\n  rebeccapurple: 0x663399,\n  red: 0xff0000,\n  rosybrown: 0xbc8f8f,\n  royalblue: 0x4169e1,\n  saddlebrown: 0x8b4513,\n  salmon: 0xfa8072,\n  sandybrown: 0xf4a460,\n  seagreen: 0x2e8b57,\n  seashell: 0xfff5ee,\n  sienna: 0xa0522d,\n  silver: 0xc0c0c0,\n  skyblue: 0x87ceeb,\n  slateblue: 0x6a5acd,\n  slategray: 0x708090,\n  slategrey: 0x708090,\n  snow: 0xfffafa,\n  springgreen: 0x00ff7f,\n  steelblue: 0x4682b4,\n  tan: 0xd2b48c,\n  teal: 0x008080,\n  thistle: 0xd8bfd8,\n  tomato: 0xff6347,\n  turquoise: 0x40e0d0,\n  violet: 0xee82ee,\n  wheat: 0xf5deb3,\n  white: 0xffffff,\n  whitesmoke: 0xf5f5f5,\n  yellow: 0xffff00,\n  yellowgreen: 0x9acd32\n};\n\nObject(_define_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(Color, color, {\n  copy: function(channels) {\n    return Object.assign(new this.constructor, this, channels);\n  },\n  displayable: function() {\n    return this.rgb().displayable();\n  },\n  hex: color_formatHex, // Deprecated! Use color.formatHex.\n  formatHex: color_formatHex,\n  formatHsl: color_formatHsl,\n  formatRgb: color_formatRgb,\n  toString: color_formatRgb\n});\n\nfunction color_formatHex() {\n  return this.rgb().formatHex();\n}\n\nfunction color_formatHsl() {\n  return hslConvert(this).formatHsl();\n}\n\nfunction color_formatRgb() {\n  return this.rgb().formatRgb();\n}\n\nfunction color(format) {\n  var m, l;\n  format = (format + \"\").trim().toLowerCase();\n  return (m = reHex.exec(format)) ? (l = m[1].length, m = parseInt(m[1], 16), l === 6 ? rgbn(m) // #ff0000\n      : l === 3 ? new Rgb((m >> 8 & 0xf) | (m >> 4 & 0xf0), (m >> 4 & 0xf) | (m & 0xf0), ((m & 0xf) << 4) | (m & 0xf), 1) // #f00\n      : l === 8 ? rgba(m >> 24 & 0xff, m >> 16 & 0xff, m >> 8 & 0xff, (m & 0xff) / 0xff) // #ff000000\n      : l === 4 ? rgba((m >> 12 & 0xf) | (m >> 8 & 0xf0), (m >> 8 & 0xf) | (m >> 4 & 0xf0), (m >> 4 & 0xf) | (m & 0xf0), (((m & 0xf) << 4) | (m & 0xf)) / 0xff) // #f000\n      : null) // invalid hex\n      : (m = reRgbInteger.exec(format)) ? new Rgb(m[1], m[2], m[3], 1) // rgb(255, 0, 0)\n      : (m = reRgbPercent.exec(format)) ? new Rgb(m[1] * 255 / 100, m[2] * 255 / 100, m[3] * 255 / 100, 1) // rgb(100%, 0%, 0%)\n      : (m = reRgbaInteger.exec(format)) ? rgba(m[1], m[2], m[3], m[4]) // rgba(255, 0, 0, 1)\n      : (m = reRgbaPercent.exec(format)) ? rgba(m[1] * 255 / 100, m[2] * 255 / 100, m[3] * 255 / 100, m[4]) // rgb(100%, 0%, 0%, 1)\n      : (m = reHslPercent.exec(format)) ? hsla(m[1], m[2] / 100, m[3] / 100, 1) // hsl(120, 50%, 50%)\n      : (m = reHslaPercent.exec(format)) ? hsla(m[1], m[2] / 100, m[3] / 100, m[4]) // hsla(120, 50%, 50%, 1)\n      : named.hasOwnProperty(format) ? rgbn(named[format]) // eslint-disable-line no-prototype-builtins\n      : format === \"transparent\" ? new Rgb(NaN, NaN, NaN, 0)\n      : null;\n}\n\nfunction rgbn(n) {\n  return new Rgb(n >> 16 & 0xff, n >> 8 & 0xff, n & 0xff, 1);\n}\n\nfunction rgba(r, g, b, a) {\n  if (a <= 0) r = g = b = NaN;\n  return new Rgb(r, g, b, a);\n}\n\nfunction rgbConvert(o) {\n  if (!(o instanceof Color)) o = color(o);\n  if (!o) return new Rgb;\n  o = o.rgb();\n  return new Rgb(o.r, o.g, o.b, o.opacity);\n}\n\nfunction rgb(r, g, b, opacity) {\n  return arguments.length === 1 ? rgbConvert(r) : new Rgb(r, g, b, opacity == null ? 1 : opacity);\n}\n\nfunction Rgb(r, g, b, opacity) {\n  this.r = +r;\n  this.g = +g;\n  this.b = +b;\n  this.opacity = +opacity;\n}\n\nObject(_define_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(Rgb, rgb, Object(_define_js__WEBPACK_IMPORTED_MODULE_0__[\"extend\"])(Color, {\n  brighter: function(k) {\n    k = k == null ? brighter : Math.pow(brighter, k);\n    return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity);\n  },\n  darker: function(k) {\n    k = k == null ? darker : Math.pow(darker, k);\n    return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity);\n  },\n  rgb: function() {\n    return this;\n  },\n  displayable: function() {\n    return (-0.5 <= this.r && this.r < 255.5)\n        && (-0.5 <= this.g && this.g < 255.5)\n        && (-0.5 <= this.b && this.b < 255.5)\n        && (0 <= this.opacity && this.opacity <= 1);\n  },\n  hex: rgb_formatHex, // Deprecated! Use color.formatHex.\n  formatHex: rgb_formatHex,\n  formatRgb: rgb_formatRgb,\n  toString: rgb_formatRgb\n}));\n\nfunction rgb_formatHex() {\n  return \"#\" + hex(this.r) + hex(this.g) + hex(this.b);\n}\n\nfunction rgb_formatRgb() {\n  var a = this.opacity; a = isNaN(a) ? 1 : Math.max(0, Math.min(1, a));\n  return (a === 1 ? \"rgb(\" : \"rgba(\")\n      + Math.max(0, Math.min(255, Math.round(this.r) || 0)) + \", \"\n      + Math.max(0, Math.min(255, Math.round(this.g) || 0)) + \", \"\n      + Math.max(0, Math.min(255, Math.round(this.b) || 0))\n      + (a === 1 ? \")\" : \", \" + a + \")\");\n}\n\nfunction hex(value) {\n  value = Math.max(0, Math.min(255, Math.round(value) || 0));\n  return (value < 16 ? \"0\" : \"\") + value.toString(16);\n}\n\nfunction hsla(h, s, l, a) {\n  if (a <= 0) h = s = l = NaN;\n  else if (l <= 0 || l >= 1) h = s = NaN;\n  else if (s <= 0) h = NaN;\n  return new Hsl(h, s, l, a);\n}\n\nfunction hslConvert(o) {\n  if (o instanceof Hsl) return new Hsl(o.h, o.s, o.l, o.opacity);\n  if (!(o instanceof Color)) o = color(o);\n  if (!o) return new Hsl;\n  if (o instanceof Hsl) return o;\n  o = o.rgb();\n  var r = o.r / 255,\n      g = o.g / 255,\n      b = o.b / 255,\n      min = Math.min(r, g, b),\n      max = Math.max(r, g, b),\n      h = NaN,\n      s = max - min,\n      l = (max + min) / 2;\n  if (s) {\n    if (r === max) h = (g - b) / s + (g < b) * 6;\n    else if (g === max) h = (b - r) / s + 2;\n    else h = (r - g) / s + 4;\n    s /= l < 0.5 ? max + min : 2 - max - min;\n    h *= 60;\n  } else {\n    s = l > 0 && l < 1 ? 0 : h;\n  }\n  return new Hsl(h, s, l, o.opacity);\n}\n\nfunction hsl(h, s, l, opacity) {\n  return arguments.length === 1 ? hslConvert(h) : new Hsl(h, s, l, opacity == null ? 1 : opacity);\n}\n\nfunction Hsl(h, s, l, opacity) {\n  this.h = +h;\n  this.s = +s;\n  this.l = +l;\n  this.opacity = +opacity;\n}\n\nObject(_define_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(Hsl, hsl, Object(_define_js__WEBPACK_IMPORTED_MODULE_0__[\"extend\"])(Color, {\n  brighter: function(k) {\n    k = k == null ? brighter : Math.pow(brighter, k);\n    return new Hsl(this.h, this.s, this.l * k, this.opacity);\n  },\n  darker: function(k) {\n    k = k == null ? darker : Math.pow(darker, k);\n    return new Hsl(this.h, this.s, this.l * k, this.opacity);\n  },\n  rgb: function() {\n    var h = this.h % 360 + (this.h < 0) * 360,\n        s = isNaN(h) || isNaN(this.s) ? 0 : this.s,\n        l = this.l,\n        m2 = l + (l < 0.5 ? l : 1 - l) * s,\n        m1 = 2 * l - m2;\n    return new Rgb(\n      hsl2rgb(h >= 240 ? h - 240 : h + 120, m1, m2),\n      hsl2rgb(h, m1, m2),\n      hsl2rgb(h < 120 ? h + 240 : h - 120, m1, m2),\n      this.opacity\n    );\n  },\n  displayable: function() {\n    return (0 <= this.s && this.s <= 1 || isNaN(this.s))\n        && (0 <= this.l && this.l <= 1)\n        && (0 <= this.opacity && this.opacity <= 1);\n  },\n  formatHsl: function() {\n    var a = this.opacity; a = isNaN(a) ? 1 : Math.max(0, Math.min(1, a));\n    return (a === 1 ? \"hsl(\" : \"hsla(\")\n        + (this.h || 0) + \", \"\n        + (this.s || 0) * 100 + \"%, \"\n        + (this.l || 0) * 100 + \"%\"\n        + (a === 1 ? \")\" : \", \" + a + \")\");\n  }\n}));\n\n/* From FvD 13.37, CSS Color Module Level 3 */\nfunction hsl2rgb(h, m1, m2) {\n  return (h < 60 ? m1 + (m2 - m1) * h / 60\n      : h < 180 ? m2\n      : h < 240 ? m1 + (m2 - m1) * (240 - h) / 60\n      : m1) * 255;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-brush/node_modules/d3-color/src/cubehelix.js\":\n/*!**********************************************************************!*\\\n  !*** ./node_modules/d3-brush/node_modules/d3-color/src/cubehelix.js ***!\n  \\**********************************************************************/\n/*! exports provided: default, Cubehelix */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return cubehelix; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Cubehelix\", function() { return Cubehelix; });\n/* harmony import */ var _define_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./define.js */ \"./node_modules/d3-brush/node_modules/d3-color/src/define.js\");\n/* harmony import */ var _color_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./color.js */ \"./node_modules/d3-brush/node_modules/d3-color/src/color.js\");\n/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./math.js */ \"./node_modules/d3-brush/node_modules/d3-color/src/math.js\");\n\n\n\n\nvar A = -0.14861,\n    B = +1.78277,\n    C = -0.29227,\n    D = -0.90649,\n    E = +1.97294,\n    ED = E * D,\n    EB = E * B,\n    BC_DA = B * C - D * A;\n\nfunction cubehelixConvert(o) {\n  if (o instanceof Cubehelix) return new Cubehelix(o.h, o.s, o.l, o.opacity);\n  if (!(o instanceof _color_js__WEBPACK_IMPORTED_MODULE_1__[\"Rgb\"])) o = Object(_color_js__WEBPACK_IMPORTED_MODULE_1__[\"rgbConvert\"])(o);\n  var r = o.r / 255,\n      g = o.g / 255,\n      b = o.b / 255,\n      l = (BC_DA * b + ED * r - EB * g) / (BC_DA + ED - EB),\n      bl = b - l,\n      k = (E * (g - l) - C * bl) / D,\n      s = Math.sqrt(k * k + bl * bl) / (E * l * (1 - l)), // NaN if l=0 or l=1\n      h = s ? Math.atan2(k, bl) * _math_js__WEBPACK_IMPORTED_MODULE_2__[\"degrees\"] - 120 : NaN;\n  return new Cubehelix(h < 0 ? h + 360 : h, s, l, o.opacity);\n}\n\nfunction cubehelix(h, s, l, opacity) {\n  return arguments.length === 1 ? cubehelixConvert(h) : new Cubehelix(h, s, l, opacity == null ? 1 : opacity);\n}\n\nfunction Cubehelix(h, s, l, opacity) {\n  this.h = +h;\n  this.s = +s;\n  this.l = +l;\n  this.opacity = +opacity;\n}\n\nObject(_define_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(Cubehelix, cubehelix, Object(_define_js__WEBPACK_IMPORTED_MODULE_0__[\"extend\"])(_color_js__WEBPACK_IMPORTED_MODULE_1__[\"Color\"], {\n  brighter: function(k) {\n    k = k == null ? _color_js__WEBPACK_IMPORTED_MODULE_1__[\"brighter\"] : Math.pow(_color_js__WEBPACK_IMPORTED_MODULE_1__[\"brighter\"], k);\n    return new Cubehelix(this.h, this.s, this.l * k, this.opacity);\n  },\n  darker: function(k) {\n    k = k == null ? _color_js__WEBPACK_IMPORTED_MODULE_1__[\"darker\"] : Math.pow(_color_js__WEBPACK_IMPORTED_MODULE_1__[\"darker\"], k);\n    return new Cubehelix(this.h, this.s, this.l * k, this.opacity);\n  },\n  rgb: function() {\n    var h = isNaN(this.h) ? 0 : (this.h + 120) * _math_js__WEBPACK_IMPORTED_MODULE_2__[\"radians\"],\n        l = +this.l,\n        a = isNaN(this.s) ? 0 : this.s * l * (1 - l),\n        cosh = Math.cos(h),\n        sinh = Math.sin(h);\n    return new _color_js__WEBPACK_IMPORTED_MODULE_1__[\"Rgb\"](\n      255 * (l + a * (A * cosh + B * sinh)),\n      255 * (l + a * (C * cosh + D * sinh)),\n      255 * (l + a * (E * cosh)),\n      this.opacity\n    );\n  }\n}));\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-brush/node_modules/d3-color/src/define.js\":\n/*!*******************************************************************!*\\\n  !*** ./node_modules/d3-brush/node_modules/d3-color/src/define.js ***!\n  \\*******************************************************************/\n/*! exports provided: default, extend */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"extend\", function() { return extend; });\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(constructor, factory, prototype) {\n  constructor.prototype = factory.prototype = prototype;\n  prototype.constructor = constructor;\n});\n\nfunction extend(parent, definition) {\n  var prototype = Object.create(parent.prototype);\n  for (var key in definition) prototype[key] = definition[key];\n  return prototype;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-brush/node_modules/d3-color/src/index.js\":\n/*!******************************************************************!*\\\n  !*** ./node_modules/d3-brush/node_modules/d3-color/src/index.js ***!\n  \\******************************************************************/\n/*! exports provided: color, rgb, hsl, lab, hcl, lch, gray, cubehelix */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _color_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./color.js */ \"./node_modules/d3-brush/node_modules/d3-color/src/color.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"color\", function() { return _color_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"rgb\", function() { return _color_js__WEBPACK_IMPORTED_MODULE_0__[\"rgb\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"hsl\", function() { return _color_js__WEBPACK_IMPORTED_MODULE_0__[\"hsl\"]; });\n\n/* harmony import */ var _lab_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./lab.js */ \"./node_modules/d3-brush/node_modules/d3-color/src/lab.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"lab\", function() { return _lab_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"hcl\", function() { return _lab_js__WEBPACK_IMPORTED_MODULE_1__[\"hcl\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"lch\", function() { return _lab_js__WEBPACK_IMPORTED_MODULE_1__[\"lch\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"gray\", function() { return _lab_js__WEBPACK_IMPORTED_MODULE_1__[\"gray\"]; });\n\n/* harmony import */ var _cubehelix_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./cubehelix.js */ \"./node_modules/d3-brush/node_modules/d3-color/src/cubehelix.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"cubehelix\", function() { return _cubehelix_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"]; });\n\n\n\n\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-brush/node_modules/d3-color/src/lab.js\":\n/*!****************************************************************!*\\\n  !*** ./node_modules/d3-brush/node_modules/d3-color/src/lab.js ***!\n  \\****************************************************************/\n/*! exports provided: gray, default, Lab, lch, hcl, Hcl */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"gray\", function() { return gray; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return lab; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Lab\", function() { return Lab; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"lch\", function() { return lch; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"hcl\", function() { return hcl; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Hcl\", function() { return Hcl; });\n/* harmony import */ var _define_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./define.js */ \"./node_modules/d3-brush/node_modules/d3-color/src/define.js\");\n/* harmony import */ var _color_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./color.js */ \"./node_modules/d3-brush/node_modules/d3-color/src/color.js\");\n/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./math.js */ \"./node_modules/d3-brush/node_modules/d3-color/src/math.js\");\n\n\n\n\n// https://observablehq.com/@mbostock/lab-and-rgb\nconst K = 18,\n    Xn = 0.96422,\n    Yn = 1,\n    Zn = 0.82521,\n    t0 = 4 / 29,\n    t1 = 6 / 29,\n    t2 = 3 * t1 * t1,\n    t3 = t1 * t1 * t1;\n\nfunction labConvert(o) {\n  if (o instanceof Lab) return new Lab(o.l, o.a, o.b, o.opacity);\n  if (o instanceof Hcl) return hcl2lab(o);\n  if (!(o instanceof _color_js__WEBPACK_IMPORTED_MODULE_1__[\"Rgb\"])) o = Object(_color_js__WEBPACK_IMPORTED_MODULE_1__[\"rgbConvert\"])(o);\n  var r = rgb2lrgb(o.r),\n      g = rgb2lrgb(o.g),\n      b = rgb2lrgb(o.b),\n      y = xyz2lab((0.2225045 * r + 0.7168786 * g + 0.0606169 * b) / Yn), x, z;\n  if (r === g && g === b) x = z = y; else {\n    x = xyz2lab((0.4360747 * r + 0.3850649 * g + 0.1430804 * b) / Xn);\n    z = xyz2lab((0.0139322 * r + 0.0971045 * g + 0.7141733 * b) / Zn);\n  }\n  return new Lab(116 * y - 16, 500 * (x - y), 200 * (y - z), o.opacity);\n}\n\nfunction gray(l, opacity) {\n  return new Lab(l, 0, 0, opacity == null ? 1 : opacity);\n}\n\nfunction lab(l, a, b, opacity) {\n  return arguments.length === 1 ? labConvert(l) : new Lab(l, a, b, opacity == null ? 1 : opacity);\n}\n\nfunction Lab(l, a, b, opacity) {\n  this.l = +l;\n  this.a = +a;\n  this.b = +b;\n  this.opacity = +opacity;\n}\n\nObject(_define_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(Lab, lab, Object(_define_js__WEBPACK_IMPORTED_MODULE_0__[\"extend\"])(_color_js__WEBPACK_IMPORTED_MODULE_1__[\"Color\"], {\n  brighter: function(k) {\n    return new Lab(this.l + K * (k == null ? 1 : k), this.a, this.b, this.opacity);\n  },\n  darker: function(k) {\n    return new Lab(this.l - K * (k == null ? 1 : k), this.a, this.b, this.opacity);\n  },\n  rgb: function() {\n    var y = (this.l + 16) / 116,\n        x = isNaN(this.a) ? y : y + this.a / 500,\n        z = isNaN(this.b) ? y : y - this.b / 200;\n    x = Xn * lab2xyz(x);\n    y = Yn * lab2xyz(y);\n    z = Zn * lab2xyz(z);\n    return new _color_js__WEBPACK_IMPORTED_MODULE_1__[\"Rgb\"](\n      lrgb2rgb( 3.1338561 * x - 1.6168667 * y - 0.4906146 * z),\n      lrgb2rgb(-0.9787684 * x + 1.9161415 * y + 0.0334540 * z),\n      lrgb2rgb( 0.0719453 * x - 0.2289914 * y + 1.4052427 * z),\n      this.opacity\n    );\n  }\n}));\n\nfunction xyz2lab(t) {\n  return t > t3 ? Math.pow(t, 1 / 3) : t / t2 + t0;\n}\n\nfunction lab2xyz(t) {\n  return t > t1 ? t * t * t : t2 * (t - t0);\n}\n\nfunction lrgb2rgb(x) {\n  return 255 * (x <= 0.0031308 ? 12.92 * x : 1.055 * Math.pow(x, 1 / 2.4) - 0.055);\n}\n\nfunction rgb2lrgb(x) {\n  return (x /= 255) <= 0.04045 ? x / 12.92 : Math.pow((x + 0.055) / 1.055, 2.4);\n}\n\nfunction hclConvert(o) {\n  if (o instanceof Hcl) return new Hcl(o.h, o.c, o.l, o.opacity);\n  if (!(o instanceof Lab)) o = labConvert(o);\n  if (o.a === 0 && o.b === 0) return new Hcl(NaN, 0 < o.l && o.l < 100 ? 0 : NaN, o.l, o.opacity);\n  var h = Math.atan2(o.b, o.a) * _math_js__WEBPACK_IMPORTED_MODULE_2__[\"degrees\"];\n  return new Hcl(h < 0 ? h + 360 : h, Math.sqrt(o.a * o.a + o.b * o.b), o.l, o.opacity);\n}\n\nfunction lch(l, c, h, opacity) {\n  return arguments.length === 1 ? hclConvert(l) : new Hcl(h, c, l, opacity == null ? 1 : opacity);\n}\n\nfunction hcl(h, c, l, opacity) {\n  return arguments.length === 1 ? hclConvert(h) : new Hcl(h, c, l, opacity == null ? 1 : opacity);\n}\n\nfunction Hcl(h, c, l, opacity) {\n  this.h = +h;\n  this.c = +c;\n  this.l = +l;\n  this.opacity = +opacity;\n}\n\nfunction hcl2lab(o) {\n  if (isNaN(o.h)) return new Lab(o.l, 0, 0, o.opacity);\n  var h = o.h * _math_js__WEBPACK_IMPORTED_MODULE_2__[\"radians\"];\n  return new Lab(o.l, Math.cos(h) * o.c, Math.sin(h) * o.c, o.opacity);\n}\n\nObject(_define_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(Hcl, hcl, Object(_define_js__WEBPACK_IMPORTED_MODULE_0__[\"extend\"])(_color_js__WEBPACK_IMPORTED_MODULE_1__[\"Color\"], {\n  brighter: function(k) {\n    return new Hcl(this.h, this.c, this.l + K * (k == null ? 1 : k), this.opacity);\n  },\n  darker: function(k) {\n    return new Hcl(this.h, this.c, this.l - K * (k == null ? 1 : k), this.opacity);\n  },\n  rgb: function() {\n    return hcl2lab(this).rgb();\n  }\n}));\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-brush/node_modules/d3-color/src/math.js\":\n/*!*****************************************************************!*\\\n  !*** ./node_modules/d3-brush/node_modules/d3-color/src/math.js ***!\n  \\*****************************************************************/\n/*! exports provided: radians, degrees */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"radians\", function() { return radians; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"degrees\", function() { return degrees; });\nconst radians = Math.PI / 180;\nconst degrees = 180 / Math.PI;\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-brush/node_modules/d3-dispatch/src/dispatch.js\":\n/*!************************************************************************!*\\\n  !*** ./node_modules/d3-brush/node_modules/d3-dispatch/src/dispatch.js ***!\n  \\************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\nvar noop = {value: () => {}};\n\nfunction dispatch() {\n  for (var i = 0, n = arguments.length, _ = {}, t; i < n; ++i) {\n    if (!(t = arguments[i] + \"\") || (t in _) || /[\\s.]/.test(t)) throw new Error(\"illegal type: \" + t);\n    _[t] = [];\n  }\n  return new Dispatch(_);\n}\n\nfunction Dispatch(_) {\n  this._ = _;\n}\n\nfunction parseTypenames(typenames, types) {\n  return typenames.trim().split(/^|\\s+/).map(function(t) {\n    var name = \"\", i = t.indexOf(\".\");\n    if (i >= 0) name = t.slice(i + 1), t = t.slice(0, i);\n    if (t && !types.hasOwnProperty(t)) throw new Error(\"unknown type: \" + t);\n    return {type: t, name: name};\n  });\n}\n\nDispatch.prototype = dispatch.prototype = {\n  constructor: Dispatch,\n  on: function(typename, callback) {\n    var _ = this._,\n        T = parseTypenames(typename + \"\", _),\n        t,\n        i = -1,\n        n = T.length;\n\n    // If no callback was specified, return the callback of the given type and name.\n    if (arguments.length < 2) {\n      while (++i < n) if ((t = (typename = T[i]).type) && (t = get(_[t], typename.name))) return t;\n      return;\n    }\n\n    // If a type was specified, set the callback for the given type and name.\n    // Otherwise, if a null callback was specified, remove callbacks of the given name.\n    if (callback != null && typeof callback !== \"function\") throw new Error(\"invalid callback: \" + callback);\n    while (++i < n) {\n      if (t = (typename = T[i]).type) _[t] = set(_[t], typename.name, callback);\n      else if (callback == null) for (t in _) _[t] = set(_[t], typename.name, null);\n    }\n\n    return this;\n  },\n  copy: function() {\n    var copy = {}, _ = this._;\n    for (var t in _) copy[t] = _[t].slice();\n    return new Dispatch(copy);\n  },\n  call: function(type, that) {\n    if ((n = arguments.length - 2) > 0) for (var args = new Array(n), i = 0, n, t; i < n; ++i) args[i] = arguments[i + 2];\n    if (!this._.hasOwnProperty(type)) throw new Error(\"unknown type: \" + type);\n    for (t = this._[type], i = 0, n = t.length; i < n; ++i) t[i].value.apply(that, args);\n  },\n  apply: function(type, that, args) {\n    if (!this._.hasOwnProperty(type)) throw new Error(\"unknown type: \" + type);\n    for (var t = this._[type], i = 0, n = t.length; i < n; ++i) t[i].value.apply(that, args);\n  }\n};\n\nfunction get(type, name) {\n  for (var i = 0, n = type.length, c; i < n; ++i) {\n    if ((c = type[i]).name === name) {\n      return c.value;\n    }\n  }\n}\n\nfunction set(type, name, callback) {\n  for (var i = 0, n = type.length; i < n; ++i) {\n    if (type[i].name === name) {\n      type[i] = noop, type = type.slice(0, i).concat(type.slice(i + 1));\n      break;\n    }\n  }\n  if (callback != null) type.push({name: name, value: callback});\n  return type;\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (dispatch);\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-brush/node_modules/d3-dispatch/src/index.js\":\n/*!*********************************************************************!*\\\n  !*** ./node_modules/d3-brush/node_modules/d3-dispatch/src/index.js ***!\n  \\*********************************************************************/\n/*! exports provided: dispatch */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _dispatch_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./dispatch.js */ \"./node_modules/d3-brush/node_modules/d3-dispatch/src/dispatch.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"dispatch\", function() { return _dispatch_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-brush/node_modules/d3-drag/src/constant.js\":\n/*!********************************************************************!*\\\n  !*** ./node_modules/d3-brush/node_modules/d3-drag/src/constant.js ***!\n  \\********************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (x => () => x);\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-brush/node_modules/d3-drag/src/drag.js\":\n/*!****************************************************************!*\\\n  !*** ./node_modules/d3-brush/node_modules/d3-drag/src/drag.js ***!\n  \\****************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var d3_dispatch__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-dispatch */ \"./node_modules/d3-brush/node_modules/d3-dispatch/src/index.js\");\n/* harmony import */ var d3_selection__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! d3-selection */ \"./node_modules/d3-brush/node_modules/d3-selection/src/index.js\");\n/* harmony import */ var _nodrag_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./nodrag.js */ \"./node_modules/d3-brush/node_modules/d3-drag/src/nodrag.js\");\n/* harmony import */ var _noevent_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./noevent.js */ \"./node_modules/d3-brush/node_modules/d3-drag/src/noevent.js\");\n/* harmony import */ var _constant_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./constant.js */ \"./node_modules/d3-brush/node_modules/d3-drag/src/constant.js\");\n/* harmony import */ var _event_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./event.js */ \"./node_modules/d3-brush/node_modules/d3-drag/src/event.js\");\n\n\n\n\n\n\n\n// Ignore right-click, since that should open the context menu.\nfunction defaultFilter(event) {\n  return !event.ctrlKey && !event.button;\n}\n\nfunction defaultContainer() {\n  return this.parentNode;\n}\n\nfunction defaultSubject(event, d) {\n  return d == null ? {x: event.x, y: event.y} : d;\n}\n\nfunction defaultTouchable() {\n  return navigator.maxTouchPoints || (\"ontouchstart\" in this);\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  var filter = defaultFilter,\n      container = defaultContainer,\n      subject = defaultSubject,\n      touchable = defaultTouchable,\n      gestures = {},\n      listeners = Object(d3_dispatch__WEBPACK_IMPORTED_MODULE_0__[\"dispatch\"])(\"start\", \"drag\", \"end\"),\n      active = 0,\n      mousedownx,\n      mousedowny,\n      mousemoving,\n      touchending,\n      clickDistance2 = 0;\n\n  function drag(selection) {\n    selection\n        .on(\"mousedown.drag\", mousedowned)\n      .filter(touchable)\n        .on(\"touchstart.drag\", touchstarted)\n        .on(\"touchmove.drag\", touchmoved, _noevent_js__WEBPACK_IMPORTED_MODULE_3__[\"nonpassive\"])\n        .on(\"touchend.drag touchcancel.drag\", touchended)\n        .style(\"touch-action\", \"none\")\n        .style(\"-webkit-tap-highlight-color\", \"rgba(0,0,0,0)\");\n  }\n\n  function mousedowned(event, d) {\n    if (touchending || !filter.call(this, event, d)) return;\n    var gesture = beforestart(this, container.call(this, event, d), event, d, \"mouse\");\n    if (!gesture) return;\n    Object(d3_selection__WEBPACK_IMPORTED_MODULE_1__[\"select\"])(event.view)\n      .on(\"mousemove.drag\", mousemoved, _noevent_js__WEBPACK_IMPORTED_MODULE_3__[\"nonpassivecapture\"])\n      .on(\"mouseup.drag\", mouseupped, _noevent_js__WEBPACK_IMPORTED_MODULE_3__[\"nonpassivecapture\"]);\n    Object(_nodrag_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(event.view);\n    Object(_noevent_js__WEBPACK_IMPORTED_MODULE_3__[\"nopropagation\"])(event);\n    mousemoving = false;\n    mousedownx = event.clientX;\n    mousedowny = event.clientY;\n    gesture(\"start\", event);\n  }\n\n  function mousemoved(event) {\n    Object(_noevent_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(event);\n    if (!mousemoving) {\n      var dx = event.clientX - mousedownx, dy = event.clientY - mousedowny;\n      mousemoving = dx * dx + dy * dy > clickDistance2;\n    }\n    gestures.mouse(\"drag\", event);\n  }\n\n  function mouseupped(event) {\n    Object(d3_selection__WEBPACK_IMPORTED_MODULE_1__[\"select\"])(event.view).on(\"mousemove.drag mouseup.drag\", null);\n    Object(_nodrag_js__WEBPACK_IMPORTED_MODULE_2__[\"yesdrag\"])(event.view, mousemoving);\n    Object(_noevent_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(event);\n    gestures.mouse(\"end\", event);\n  }\n\n  function touchstarted(event, d) {\n    if (!filter.call(this, event, d)) return;\n    var touches = event.changedTouches,\n        c = container.call(this, event, d),\n        n = touches.length, i, gesture;\n\n    for (i = 0; i < n; ++i) {\n      if (gesture = beforestart(this, c, event, d, touches[i].identifier, touches[i])) {\n        Object(_noevent_js__WEBPACK_IMPORTED_MODULE_3__[\"nopropagation\"])(event);\n        gesture(\"start\", event, touches[i]);\n      }\n    }\n  }\n\n  function touchmoved(event) {\n    var touches = event.changedTouches,\n        n = touches.length, i, gesture;\n\n    for (i = 0; i < n; ++i) {\n      if (gesture = gestures[touches[i].identifier]) {\n        Object(_noevent_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(event);\n        gesture(\"drag\", event, touches[i]);\n      }\n    }\n  }\n\n  function touchended(event) {\n    var touches = event.changedTouches,\n        n = touches.length, i, gesture;\n\n    if (touchending) clearTimeout(touchending);\n    touchending = setTimeout(function() { touchending = null; }, 500); // Ghost clicks are delayed!\n    for (i = 0; i < n; ++i) {\n      if (gesture = gestures[touches[i].identifier]) {\n        Object(_noevent_js__WEBPACK_IMPORTED_MODULE_3__[\"nopropagation\"])(event);\n        gesture(\"end\", event, touches[i]);\n      }\n    }\n  }\n\n  function beforestart(that, container, event, d, identifier, touch) {\n    var dispatch = listeners.copy(),\n        p = Object(d3_selection__WEBPACK_IMPORTED_MODULE_1__[\"pointer\"])(touch || event, container), dx, dy,\n        s;\n\n    if ((s = subject.call(that, new _event_js__WEBPACK_IMPORTED_MODULE_5__[\"default\"](\"beforestart\", {\n        sourceEvent: event,\n        target: drag,\n        identifier,\n        active,\n        x: p[0],\n        y: p[1],\n        dx: 0,\n        dy: 0,\n        dispatch\n      }), d)) == null) return;\n\n    dx = s.x - p[0] || 0;\n    dy = s.y - p[1] || 0;\n\n    return function gesture(type, event, touch) {\n      var p0 = p, n;\n      switch (type) {\n        case \"start\": gestures[identifier] = gesture, n = active++; break;\n        case \"end\": delete gestures[identifier], --active; // falls through\n        case \"drag\": p = Object(d3_selection__WEBPACK_IMPORTED_MODULE_1__[\"pointer\"])(touch || event, container), n = active; break;\n      }\n      dispatch.call(\n        type,\n        that,\n        new _event_js__WEBPACK_IMPORTED_MODULE_5__[\"default\"](type, {\n          sourceEvent: event,\n          subject: s,\n          target: drag,\n          identifier,\n          active: n,\n          x: p[0] + dx,\n          y: p[1] + dy,\n          dx: p[0] - p0[0],\n          dy: p[1] - p0[1],\n          dispatch\n        }),\n        d\n      );\n    };\n  }\n\n  drag.filter = function(_) {\n    return arguments.length ? (filter = typeof _ === \"function\" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(!!_), drag) : filter;\n  };\n\n  drag.container = function(_) {\n    return arguments.length ? (container = typeof _ === \"function\" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(_), drag) : container;\n  };\n\n  drag.subject = function(_) {\n    return arguments.length ? (subject = typeof _ === \"function\" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(_), drag) : subject;\n  };\n\n  drag.touchable = function(_) {\n    return arguments.length ? (touchable = typeof _ === \"function\" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(!!_), drag) : touchable;\n  };\n\n  drag.on = function() {\n    var value = listeners.on.apply(listeners, arguments);\n    return value === listeners ? drag : value;\n  };\n\n  drag.clickDistance = function(_) {\n    return arguments.length ? (clickDistance2 = (_ = +_) * _, drag) : Math.sqrt(clickDistance2);\n  };\n\n  return drag;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-brush/node_modules/d3-drag/src/event.js\":\n/*!*****************************************************************!*\\\n  !*** ./node_modules/d3-brush/node_modules/d3-drag/src/event.js ***!\n  \\*****************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return DragEvent; });\nfunction DragEvent(type, {\n  sourceEvent,\n  subject,\n  target,\n  identifier,\n  active,\n  x, y, dx, dy,\n  dispatch\n}) {\n  Object.defineProperties(this, {\n    type: {value: type, enumerable: true, configurable: true},\n    sourceEvent: {value: sourceEvent, enumerable: true, configurable: true},\n    subject: {value: subject, enumerable: true, configurable: true},\n    target: {value: target, enumerable: true, configurable: true},\n    identifier: {value: identifier, enumerable: true, configurable: true},\n    active: {value: active, enumerable: true, configurable: true},\n    x: {value: x, enumerable: true, configurable: true},\n    y: {value: y, enumerable: true, configurable: true},\n    dx: {value: dx, enumerable: true, configurable: true},\n    dy: {value: dy, enumerable: true, configurable: true},\n    _: {value: dispatch}\n  });\n}\n\nDragEvent.prototype.on = function() {\n  var value = this._.on.apply(this._, arguments);\n  return value === this._ ? this : value;\n};\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-brush/node_modules/d3-drag/src/index.js\":\n/*!*****************************************************************!*\\\n  !*** ./node_modules/d3-brush/node_modules/d3-drag/src/index.js ***!\n  \\*****************************************************************/\n/*! exports provided: drag, dragDisable, dragEnable */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _drag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./drag.js */ \"./node_modules/d3-brush/node_modules/d3-drag/src/drag.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"drag\", function() { return _drag_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n/* harmony import */ var _nodrag_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./nodrag.js */ \"./node_modules/d3-brush/node_modules/d3-drag/src/nodrag.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"dragDisable\", function() { return _nodrag_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"dragEnable\", function() { return _nodrag_js__WEBPACK_IMPORTED_MODULE_1__[\"yesdrag\"]; });\n\n\n\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-brush/node_modules/d3-drag/src/nodrag.js\":\n/*!******************************************************************!*\\\n  !*** ./node_modules/d3-brush/node_modules/d3-drag/src/nodrag.js ***!\n  \\******************************************************************/\n/*! exports provided: default, yesdrag */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"yesdrag\", function() { return yesdrag; });\n/* harmony import */ var d3_selection__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-selection */ \"./node_modules/d3-brush/node_modules/d3-selection/src/index.js\");\n/* harmony import */ var _noevent_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./noevent.js */ \"./node_modules/d3-brush/node_modules/d3-drag/src/noevent.js\");\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(view) {\n  var root = view.document.documentElement,\n      selection = Object(d3_selection__WEBPACK_IMPORTED_MODULE_0__[\"select\"])(view).on(\"dragstart.drag\", _noevent_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"], _noevent_js__WEBPACK_IMPORTED_MODULE_1__[\"nonpassivecapture\"]);\n  if (\"onselectstart\" in root) {\n    selection.on(\"selectstart.drag\", _noevent_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"], _noevent_js__WEBPACK_IMPORTED_MODULE_1__[\"nonpassivecapture\"]);\n  } else {\n    root.__noselect = root.style.MozUserSelect;\n    root.style.MozUserSelect = \"none\";\n  }\n});\n\nfunction yesdrag(view, noclick) {\n  var root = view.document.documentElement,\n      selection = Object(d3_selection__WEBPACK_IMPORTED_MODULE_0__[\"select\"])(view).on(\"dragstart.drag\", null);\n  if (noclick) {\n    selection.on(\"click.drag\", _noevent_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"], _noevent_js__WEBPACK_IMPORTED_MODULE_1__[\"nonpassivecapture\"]);\n    setTimeout(function() { selection.on(\"click.drag\", null); }, 0);\n  }\n  if (\"onselectstart\" in root) {\n    selection.on(\"selectstart.drag\", null);\n  } else {\n    root.style.MozUserSelect = root.__noselect;\n    delete root.__noselect;\n  }\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-brush/node_modules/d3-drag/src/noevent.js\":\n/*!*******************************************************************!*\\\n  !*** ./node_modules/d3-brush/node_modules/d3-drag/src/noevent.js ***!\n  \\*******************************************************************/\n/*! exports provided: nonpassive, nonpassivecapture, nopropagation, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"nonpassive\", function() { return nonpassive; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"nonpassivecapture\", function() { return nonpassivecapture; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"nopropagation\", function() { return nopropagation; });\n// These are typically used in conjunction with noevent to ensure that we can\n// preventDefault on the event.\nconst nonpassive = {passive: false};\nconst nonpassivecapture = {capture: true, passive: false};\n\nfunction nopropagation(event) {\n  event.stopImmediatePropagation();\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(event) {\n  event.preventDefault();\n  event.stopImmediatePropagation();\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-brush/node_modules/d3-ease/src/back.js\":\n/*!****************************************************************!*\\\n  !*** ./node_modules/d3-brush/node_modules/d3-ease/src/back.js ***!\n  \\****************************************************************/\n/*! exports provided: backIn, backOut, backInOut */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"backIn\", function() { return backIn; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"backOut\", function() { return backOut; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"backInOut\", function() { return backInOut; });\nvar overshoot = 1.70158;\n\nvar backIn = (function custom(s) {\n  s = +s;\n\n  function backIn(t) {\n    return (t = +t) * t * (s * (t - 1) + t);\n  }\n\n  backIn.overshoot = custom;\n\n  return backIn;\n})(overshoot);\n\nvar backOut = (function custom(s) {\n  s = +s;\n\n  function backOut(t) {\n    return --t * t * ((t + 1) * s + t) + 1;\n  }\n\n  backOut.overshoot = custom;\n\n  return backOut;\n})(overshoot);\n\nvar backInOut = (function custom(s) {\n  s = +s;\n\n  function backInOut(t) {\n    return ((t *= 2) < 1 ? t * t * ((s + 1) * t - s) : (t -= 2) * t * ((s + 1) * t + s) + 2) / 2;\n  }\n\n  backInOut.overshoot = custom;\n\n  return backInOut;\n})(overshoot);\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-brush/node_modules/d3-ease/src/bounce.js\":\n/*!******************************************************************!*\\\n  !*** ./node_modules/d3-brush/node_modules/d3-ease/src/bounce.js ***!\n  \\******************************************************************/\n/*! exports provided: bounceIn, bounceOut, bounceInOut */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"bounceIn\", function() { return bounceIn; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"bounceOut\", function() { return bounceOut; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"bounceInOut\", function() { return bounceInOut; });\nvar b1 = 4 / 11,\n    b2 = 6 / 11,\n    b3 = 8 / 11,\n    b4 = 3 / 4,\n    b5 = 9 / 11,\n    b6 = 10 / 11,\n    b7 = 15 / 16,\n    b8 = 21 / 22,\n    b9 = 63 / 64,\n    b0 = 1 / b1 / b1;\n\nfunction bounceIn(t) {\n  return 1 - bounceOut(1 - t);\n}\n\nfunction bounceOut(t) {\n  return (t = +t) < b1 ? b0 * t * t : t < b3 ? b0 * (t -= b2) * t + b4 : t < b6 ? b0 * (t -= b5) * t + b7 : b0 * (t -= b8) * t + b9;\n}\n\nfunction bounceInOut(t) {\n  return ((t *= 2) <= 1 ? 1 - bounceOut(1 - t) : bounceOut(t - 1) + 1) / 2;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-brush/node_modules/d3-ease/src/circle.js\":\n/*!******************************************************************!*\\\n  !*** ./node_modules/d3-brush/node_modules/d3-ease/src/circle.js ***!\n  \\******************************************************************/\n/*! exports provided: circleIn, circleOut, circleInOut */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"circleIn\", function() { return circleIn; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"circleOut\", function() { return circleOut; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"circleInOut\", function() { return circleInOut; });\nfunction circleIn(t) {\n  return 1 - Math.sqrt(1 - t * t);\n}\n\nfunction circleOut(t) {\n  return Math.sqrt(1 - --t * t);\n}\n\nfunction circleInOut(t) {\n  return ((t *= 2) <= 1 ? 1 - Math.sqrt(1 - t * t) : Math.sqrt(1 - (t -= 2) * t) + 1) / 2;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-brush/node_modules/d3-ease/src/cubic.js\":\n/*!*****************************************************************!*\\\n  !*** ./node_modules/d3-brush/node_modules/d3-ease/src/cubic.js ***!\n  \\*****************************************************************/\n/*! exports provided: cubicIn, cubicOut, cubicInOut */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"cubicIn\", function() { return cubicIn; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"cubicOut\", function() { return cubicOut; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"cubicInOut\", function() { return cubicInOut; });\nfunction cubicIn(t) {\n  return t * t * t;\n}\n\nfunction cubicOut(t) {\n  return --t * t * t + 1;\n}\n\nfunction cubicInOut(t) {\n  return ((t *= 2) <= 1 ? t * t * t : (t -= 2) * t * t + 2) / 2;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-brush/node_modules/d3-ease/src/elastic.js\":\n/*!*******************************************************************!*\\\n  !*** ./node_modules/d3-brush/node_modules/d3-ease/src/elastic.js ***!\n  \\*******************************************************************/\n/*! exports provided: elasticIn, elasticOut, elasticInOut */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"elasticIn\", function() { return elasticIn; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"elasticOut\", function() { return elasticOut; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"elasticInOut\", function() { return elasticInOut; });\n/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./math.js */ \"./node_modules/d3-brush/node_modules/d3-ease/src/math.js\");\n\n\nvar tau = 2 * Math.PI,\n    amplitude = 1,\n    period = 0.3;\n\nvar elasticIn = (function custom(a, p) {\n  var s = Math.asin(1 / (a = Math.max(1, a))) * (p /= tau);\n\n  function elasticIn(t) {\n    return a * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"tpmt\"])(-(--t)) * Math.sin((s - t) / p);\n  }\n\n  elasticIn.amplitude = function(a) { return custom(a, p * tau); };\n  elasticIn.period = function(p) { return custom(a, p); };\n\n  return elasticIn;\n})(amplitude, period);\n\nvar elasticOut = (function custom(a, p) {\n  var s = Math.asin(1 / (a = Math.max(1, a))) * (p /= tau);\n\n  function elasticOut(t) {\n    return 1 - a * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"tpmt\"])(t = +t) * Math.sin((t + s) / p);\n  }\n\n  elasticOut.amplitude = function(a) { return custom(a, p * tau); };\n  elasticOut.period = function(p) { return custom(a, p); };\n\n  return elasticOut;\n})(amplitude, period);\n\nvar elasticInOut = (function custom(a, p) {\n  var s = Math.asin(1 / (a = Math.max(1, a))) * (p /= tau);\n\n  function elasticInOut(t) {\n    return ((t = t * 2 - 1) < 0\n        ? a * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"tpmt\"])(-t) * Math.sin((s - t) / p)\n        : 2 - a * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"tpmt\"])(t) * Math.sin((s + t) / p)) / 2;\n  }\n\n  elasticInOut.amplitude = function(a) { return custom(a, p * tau); };\n  elasticInOut.period = function(p) { return custom(a, p); };\n\n  return elasticInOut;\n})(amplitude, period);\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-brush/node_modules/d3-ease/src/exp.js\":\n/*!***************************************************************!*\\\n  !*** ./node_modules/d3-brush/node_modules/d3-ease/src/exp.js ***!\n  \\***************************************************************/\n/*! exports provided: expIn, expOut, expInOut */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"expIn\", function() { return expIn; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"expOut\", function() { return expOut; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"expInOut\", function() { return expInOut; });\n/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./math.js */ \"./node_modules/d3-brush/node_modules/d3-ease/src/math.js\");\n\n\nfunction expIn(t) {\n  return Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"tpmt\"])(1 - +t);\n}\n\nfunction expOut(t) {\n  return 1 - Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"tpmt\"])(t);\n}\n\nfunction expInOut(t) {\n  return ((t *= 2) <= 1 ? Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"tpmt\"])(1 - t) : 2 - Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"tpmt\"])(t - 1)) / 2;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-brush/node_modules/d3-ease/src/index.js\":\n/*!*****************************************************************!*\\\n  !*** ./node_modules/d3-brush/node_modules/d3-ease/src/index.js ***!\n  \\*****************************************************************/\n/*! exports provided: easeLinear, easeQuad, easeQuadIn, easeQuadOut, easeQuadInOut, easeCubic, easeCubicIn, easeCubicOut, easeCubicInOut, easePoly, easePolyIn, easePolyOut, easePolyInOut, easeSin, easeSinIn, easeSinOut, easeSinInOut, easeExp, easeExpIn, easeExpOut, easeExpInOut, easeCircle, easeCircleIn, easeCircleOut, easeCircleInOut, easeBounce, easeBounceIn, easeBounceOut, easeBounceInOut, easeBack, easeBackIn, easeBackOut, easeBackInOut, easeElastic, easeElasticIn, easeElasticOut, easeElasticInOut */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _linear_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./linear.js */ \"./node_modules/d3-brush/node_modules/d3-ease/src/linear.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeLinear\", function() { return _linear_js__WEBPACK_IMPORTED_MODULE_0__[\"linear\"]; });\n\n/* harmony import */ var _quad_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./quad.js */ \"./node_modules/d3-brush/node_modules/d3-ease/src/quad.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeQuad\", function() { return _quad_js__WEBPACK_IMPORTED_MODULE_1__[\"quadInOut\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeQuadIn\", function() { return _quad_js__WEBPACK_IMPORTED_MODULE_1__[\"quadIn\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeQuadOut\", function() { return _quad_js__WEBPACK_IMPORTED_MODULE_1__[\"quadOut\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeQuadInOut\", function() { return _quad_js__WEBPACK_IMPORTED_MODULE_1__[\"quadInOut\"]; });\n\n/* harmony import */ var _cubic_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./cubic.js */ \"./node_modules/d3-brush/node_modules/d3-ease/src/cubic.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeCubic\", function() { return _cubic_js__WEBPACK_IMPORTED_MODULE_2__[\"cubicInOut\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeCubicIn\", function() { return _cubic_js__WEBPACK_IMPORTED_MODULE_2__[\"cubicIn\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeCubicOut\", function() { return _cubic_js__WEBPACK_IMPORTED_MODULE_2__[\"cubicOut\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeCubicInOut\", function() { return _cubic_js__WEBPACK_IMPORTED_MODULE_2__[\"cubicInOut\"]; });\n\n/* harmony import */ var _poly_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./poly.js */ \"./node_modules/d3-brush/node_modules/d3-ease/src/poly.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easePoly\", function() { return _poly_js__WEBPACK_IMPORTED_MODULE_3__[\"polyInOut\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easePolyIn\", function() { return _poly_js__WEBPACK_IMPORTED_MODULE_3__[\"polyIn\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easePolyOut\", function() { return _poly_js__WEBPACK_IMPORTED_MODULE_3__[\"polyOut\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easePolyInOut\", function() { return _poly_js__WEBPACK_IMPORTED_MODULE_3__[\"polyInOut\"]; });\n\n/* harmony import */ var _sin_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./sin.js */ \"./node_modules/d3-brush/node_modules/d3-ease/src/sin.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeSin\", function() { return _sin_js__WEBPACK_IMPORTED_MODULE_4__[\"sinInOut\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeSinIn\", function() { return _sin_js__WEBPACK_IMPORTED_MODULE_4__[\"sinIn\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeSinOut\", function() { return _sin_js__WEBPACK_IMPORTED_MODULE_4__[\"sinOut\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeSinInOut\", function() { return _sin_js__WEBPACK_IMPORTED_MODULE_4__[\"sinInOut\"]; });\n\n/* harmony import */ var _exp_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./exp.js */ \"./node_modules/d3-brush/node_modules/d3-ease/src/exp.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeExp\", function() { return _exp_js__WEBPACK_IMPORTED_MODULE_5__[\"expInOut\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeExpIn\", function() { return _exp_js__WEBPACK_IMPORTED_MODULE_5__[\"expIn\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeExpOut\", function() { return _exp_js__WEBPACK_IMPORTED_MODULE_5__[\"expOut\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeExpInOut\", function() { return _exp_js__WEBPACK_IMPORTED_MODULE_5__[\"expInOut\"]; });\n\n/* harmony import */ var _circle_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./circle.js */ \"./node_modules/d3-brush/node_modules/d3-ease/src/circle.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeCircle\", function() { return _circle_js__WEBPACK_IMPORTED_MODULE_6__[\"circleInOut\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeCircleIn\", function() { return _circle_js__WEBPACK_IMPORTED_MODULE_6__[\"circleIn\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeCircleOut\", function() { return _circle_js__WEBPACK_IMPORTED_MODULE_6__[\"circleOut\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeCircleInOut\", function() { return _circle_js__WEBPACK_IMPORTED_MODULE_6__[\"circleInOut\"]; });\n\n/* harmony import */ var _bounce_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./bounce.js */ \"./node_modules/d3-brush/node_modules/d3-ease/src/bounce.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeBounce\", function() { return _bounce_js__WEBPACK_IMPORTED_MODULE_7__[\"bounceOut\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeBounceIn\", function() { return _bounce_js__WEBPACK_IMPORTED_MODULE_7__[\"bounceIn\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeBounceOut\", function() { return _bounce_js__WEBPACK_IMPORTED_MODULE_7__[\"bounceOut\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeBounceInOut\", function() { return _bounce_js__WEBPACK_IMPORTED_MODULE_7__[\"bounceInOut\"]; });\n\n/* harmony import */ var _back_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./back.js */ \"./node_modules/d3-brush/node_modules/d3-ease/src/back.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeBack\", function() { return _back_js__WEBPACK_IMPORTED_MODULE_8__[\"backInOut\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeBackIn\", function() { return _back_js__WEBPACK_IMPORTED_MODULE_8__[\"backIn\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeBackOut\", function() { return _back_js__WEBPACK_IMPORTED_MODULE_8__[\"backOut\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeBackInOut\", function() { return _back_js__WEBPACK_IMPORTED_MODULE_8__[\"backInOut\"]; });\n\n/* harmony import */ var _elastic_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./elastic.js */ \"./node_modules/d3-brush/node_modules/d3-ease/src/elastic.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeElastic\", function() { return _elastic_js__WEBPACK_IMPORTED_MODULE_9__[\"elasticOut\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeElasticIn\", function() { return _elastic_js__WEBPACK_IMPORTED_MODULE_9__[\"elasticIn\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeElasticOut\", function() { return _elastic_js__WEBPACK_IMPORTED_MODULE_9__[\"elasticOut\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeElasticInOut\", function() { return _elastic_js__WEBPACK_IMPORTED_MODULE_9__[\"elasticInOut\"]; });\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-brush/node_modules/d3-ease/src/linear.js\":\n/*!******************************************************************!*\\\n  !*** ./node_modules/d3-brush/node_modules/d3-ease/src/linear.js ***!\n  \\******************************************************************/\n/*! exports provided: linear */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"linear\", function() { return linear; });\nconst linear = t => +t;\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-brush/node_modules/d3-ease/src/math.js\":\n/*!****************************************************************!*\\\n  !*** ./node_modules/d3-brush/node_modules/d3-ease/src/math.js ***!\n  \\****************************************************************/\n/*! exports provided: tpmt */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"tpmt\", function() { return tpmt; });\n// tpmt is two power minus ten times t scaled to [0,1]\nfunction tpmt(x) {\n  return (Math.pow(2, -10 * x) - 0.0009765625) * 1.0009775171065494;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-brush/node_modules/d3-ease/src/poly.js\":\n/*!****************************************************************!*\\\n  !*** ./node_modules/d3-brush/node_modules/d3-ease/src/poly.js ***!\n  \\****************************************************************/\n/*! exports provided: polyIn, polyOut, polyInOut */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"polyIn\", function() { return polyIn; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"polyOut\", function() { return polyOut; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"polyInOut\", function() { return polyInOut; });\nvar exponent = 3;\n\nvar polyIn = (function custom(e) {\n  e = +e;\n\n  function polyIn(t) {\n    return Math.pow(t, e);\n  }\n\n  polyIn.exponent = custom;\n\n  return polyIn;\n})(exponent);\n\nvar polyOut = (function custom(e) {\n  e = +e;\n\n  function polyOut(t) {\n    return 1 - Math.pow(1 - t, e);\n  }\n\n  polyOut.exponent = custom;\n\n  return polyOut;\n})(exponent);\n\nvar polyInOut = (function custom(e) {\n  e = +e;\n\n  function polyInOut(t) {\n    return ((t *= 2) <= 1 ? Math.pow(t, e) : 2 - Math.pow(2 - t, e)) / 2;\n  }\n\n  polyInOut.exponent = custom;\n\n  return polyInOut;\n})(exponent);\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-brush/node_modules/d3-ease/src/quad.js\":\n/*!****************************************************************!*\\\n  !*** ./node_modules/d3-brush/node_modules/d3-ease/src/quad.js ***!\n  \\****************************************************************/\n/*! exports provided: quadIn, quadOut, quadInOut */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"quadIn\", function() { return quadIn; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"quadOut\", function() { return quadOut; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"quadInOut\", function() { return quadInOut; });\nfunction quadIn(t) {\n  return t * t;\n}\n\nfunction quadOut(t) {\n  return t * (2 - t);\n}\n\nfunction quadInOut(t) {\n  return ((t *= 2) <= 1 ? t * t : --t * (2 - t) + 1) / 2;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-brush/node_modules/d3-ease/src/sin.js\":\n/*!***************************************************************!*\\\n  !*** ./node_modules/d3-brush/node_modules/d3-ease/src/sin.js ***!\n  \\***************************************************************/\n/*! exports provided: sinIn, sinOut, sinInOut */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"sinIn\", function() { return sinIn; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"sinOut\", function() { return sinOut; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"sinInOut\", function() { return sinInOut; });\nvar pi = Math.PI,\n    halfPi = pi / 2;\n\nfunction sinIn(t) {\n  return (+t === 1) ? 1 : 1 - Math.cos(t * halfPi);\n}\n\nfunction sinOut(t) {\n  return Math.sin(t * halfPi);\n}\n\nfunction sinInOut(t) {\n  return (1 - Math.cos(pi * t)) / 2;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-brush/node_modules/d3-interpolate/src/array.js\":\n/*!************************************************************************!*\\\n  !*** ./node_modules/d3-brush/node_modules/d3-interpolate/src/array.js ***!\n  \\************************************************************************/\n/*! exports provided: default, genericArray */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"genericArray\", function() { return genericArray; });\n/* harmony import */ var _value_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./value.js */ \"./node_modules/d3-brush/node_modules/d3-interpolate/src/value.js\");\n/* harmony import */ var _numberArray_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./numberArray.js */ \"./node_modules/d3-brush/node_modules/d3-interpolate/src/numberArray.js\");\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(a, b) {\n  return (Object(_numberArray_js__WEBPACK_IMPORTED_MODULE_1__[\"isNumberArray\"])(b) ? _numberArray_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"] : genericArray)(a, b);\n});\n\nfunction genericArray(a, b) {\n  var nb = b ? b.length : 0,\n      na = a ? Math.min(nb, a.length) : 0,\n      x = new Array(na),\n      c = new Array(nb),\n      i;\n\n  for (i = 0; i < na; ++i) x[i] = Object(_value_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(a[i], b[i]);\n  for (; i < nb; ++i) c[i] = b[i];\n\n  return function(t) {\n    for (i = 0; i < na; ++i) c[i] = x[i](t);\n    return c;\n  };\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-brush/node_modules/d3-interpolate/src/basis.js\":\n/*!************************************************************************!*\\\n  !*** ./node_modules/d3-brush/node_modules/d3-interpolate/src/basis.js ***!\n  \\************************************************************************/\n/*! exports provided: basis, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"basis\", function() { return basis; });\nfunction basis(t1, v0, v1, v2, v3) {\n  var t2 = t1 * t1, t3 = t2 * t1;\n  return ((1 - 3 * t1 + 3 * t2 - t3) * v0\n      + (4 - 6 * t2 + 3 * t3) * v1\n      + (1 + 3 * t1 + 3 * t2 - 3 * t3) * v2\n      + t3 * v3) / 6;\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(values) {\n  var n = values.length - 1;\n  return function(t) {\n    var i = t <= 0 ? (t = 0) : t >= 1 ? (t = 1, n - 1) : Math.floor(t * n),\n        v1 = values[i],\n        v2 = values[i + 1],\n        v0 = i > 0 ? values[i - 1] : 2 * v1 - v2,\n        v3 = i < n - 1 ? values[i + 2] : 2 * v2 - v1;\n    return basis((t - i / n) * n, v0, v1, v2, v3);\n  };\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-brush/node_modules/d3-interpolate/src/basisClosed.js\":\n/*!******************************************************************************!*\\\n  !*** ./node_modules/d3-brush/node_modules/d3-interpolate/src/basisClosed.js ***!\n  \\******************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _basis_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./basis.js */ \"./node_modules/d3-brush/node_modules/d3-interpolate/src/basis.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(values) {\n  var n = values.length;\n  return function(t) {\n    var i = Math.floor(((t %= 1) < 0 ? ++t : t) * n),\n        v0 = values[(i + n - 1) % n],\n        v1 = values[i % n],\n        v2 = values[(i + 1) % n],\n        v3 = values[(i + 2) % n];\n    return Object(_basis_js__WEBPACK_IMPORTED_MODULE_0__[\"basis\"])((t - i / n) * n, v0, v1, v2, v3);\n  };\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-brush/node_modules/d3-interpolate/src/color.js\":\n/*!************************************************************************!*\\\n  !*** ./node_modules/d3-brush/node_modules/d3-interpolate/src/color.js ***!\n  \\************************************************************************/\n/*! exports provided: hue, gamma, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"hue\", function() { return hue; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"gamma\", function() { return gamma; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return nogamma; });\n/* harmony import */ var _constant_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./constant.js */ \"./node_modules/d3-brush/node_modules/d3-interpolate/src/constant.js\");\n\n\nfunction linear(a, d) {\n  return function(t) {\n    return a + t * d;\n  };\n}\n\nfunction exponential(a, b, y) {\n  return a = Math.pow(a, y), b = Math.pow(b, y) - a, y = 1 / y, function(t) {\n    return Math.pow(a + t * b, y);\n  };\n}\n\nfunction hue(a, b) {\n  var d = b - a;\n  return d ? linear(a, d > 180 || d < -180 ? d - 360 * Math.round(d / 360) : d) : Object(_constant_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(isNaN(a) ? b : a);\n}\n\nfunction gamma(y) {\n  return (y = +y) === 1 ? nogamma : function(a, b) {\n    return b - a ? exponential(a, b, y) : Object(_constant_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(isNaN(a) ? b : a);\n  };\n}\n\nfunction nogamma(a, b) {\n  var d = b - a;\n  return d ? linear(a, d) : Object(_constant_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(isNaN(a) ? b : a);\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-brush/node_modules/d3-interpolate/src/constant.js\":\n/*!***************************************************************************!*\\\n  !*** ./node_modules/d3-brush/node_modules/d3-interpolate/src/constant.js ***!\n  \\***************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (x => () => x);\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-brush/node_modules/d3-interpolate/src/cubehelix.js\":\n/*!****************************************************************************!*\\\n  !*** ./node_modules/d3-brush/node_modules/d3-interpolate/src/cubehelix.js ***!\n  \\****************************************************************************/\n/*! exports provided: default, cubehelixLong */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"cubehelixLong\", function() { return cubehelixLong; });\n/* harmony import */ var d3_color__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-color */ \"./node_modules/d3-brush/node_modules/d3-color/src/index.js\");\n/* harmony import */ var _color_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./color.js */ \"./node_modules/d3-brush/node_modules/d3-interpolate/src/color.js\");\n\n\n\nfunction cubehelix(hue) {\n  return (function cubehelixGamma(y) {\n    y = +y;\n\n    function cubehelix(start, end) {\n      var h = hue((start = Object(d3_color__WEBPACK_IMPORTED_MODULE_0__[\"cubehelix\"])(start)).h, (end = Object(d3_color__WEBPACK_IMPORTED_MODULE_0__[\"cubehelix\"])(end)).h),\n          s = Object(_color_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(start.s, end.s),\n          l = Object(_color_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(start.l, end.l),\n          opacity = Object(_color_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(start.opacity, end.opacity);\n      return function(t) {\n        start.h = h(t);\n        start.s = s(t);\n        start.l = l(Math.pow(t, y));\n        start.opacity = opacity(t);\n        return start + \"\";\n      };\n    }\n\n    cubehelix.gamma = cubehelixGamma;\n\n    return cubehelix;\n  })(1);\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (cubehelix(_color_js__WEBPACK_IMPORTED_MODULE_1__[\"hue\"]));\nvar cubehelixLong = cubehelix(_color_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"]);\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-brush/node_modules/d3-interpolate/src/date.js\":\n/*!***********************************************************************!*\\\n  !*** ./node_modules/d3-brush/node_modules/d3-interpolate/src/date.js ***!\n  \\***********************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(a, b) {\n  var d = new Date;\n  return a = +a, b = +b, function(t) {\n    return d.setTime(a * (1 - t) + b * t), d;\n  };\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-brush/node_modules/d3-interpolate/src/discrete.js\":\n/*!***************************************************************************!*\\\n  !*** ./node_modules/d3-brush/node_modules/d3-interpolate/src/discrete.js ***!\n  \\***************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(range) {\n  var n = range.length;\n  return function(t) {\n    return range[Math.max(0, Math.min(n - 1, Math.floor(t * n)))];\n  };\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-brush/node_modules/d3-interpolate/src/hcl.js\":\n/*!**********************************************************************!*\\\n  !*** ./node_modules/d3-brush/node_modules/d3-interpolate/src/hcl.js ***!\n  \\**********************************************************************/\n/*! exports provided: default, hclLong */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"hclLong\", function() { return hclLong; });\n/* harmony import */ var d3_color__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-color */ \"./node_modules/d3-brush/node_modules/d3-color/src/index.js\");\n/* harmony import */ var _color_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./color.js */ \"./node_modules/d3-brush/node_modules/d3-interpolate/src/color.js\");\n\n\n\nfunction hcl(hue) {\n  return function(start, end) {\n    var h = hue((start = Object(d3_color__WEBPACK_IMPORTED_MODULE_0__[\"hcl\"])(start)).h, (end = Object(d3_color__WEBPACK_IMPORTED_MODULE_0__[\"hcl\"])(end)).h),\n        c = Object(_color_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(start.c, end.c),\n        l = Object(_color_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(start.l, end.l),\n        opacity = Object(_color_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(start.opacity, end.opacity);\n    return function(t) {\n      start.h = h(t);\n      start.c = c(t);\n      start.l = l(t);\n      start.opacity = opacity(t);\n      return start + \"\";\n    };\n  }\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (hcl(_color_js__WEBPACK_IMPORTED_MODULE_1__[\"hue\"]));\nvar hclLong = hcl(_color_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"]);\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-brush/node_modules/d3-interpolate/src/hsl.js\":\n/*!**********************************************************************!*\\\n  !*** ./node_modules/d3-brush/node_modules/d3-interpolate/src/hsl.js ***!\n  \\**********************************************************************/\n/*! exports provided: default, hslLong */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"hslLong\", function() { return hslLong; });\n/* harmony import */ var d3_color__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-color */ \"./node_modules/d3-brush/node_modules/d3-color/src/index.js\");\n/* harmony import */ var _color_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./color.js */ \"./node_modules/d3-brush/node_modules/d3-interpolate/src/color.js\");\n\n\n\nfunction hsl(hue) {\n  return function(start, end) {\n    var h = hue((start = Object(d3_color__WEBPACK_IMPORTED_MODULE_0__[\"hsl\"])(start)).h, (end = Object(d3_color__WEBPACK_IMPORTED_MODULE_0__[\"hsl\"])(end)).h),\n        s = Object(_color_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(start.s, end.s),\n        l = Object(_color_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(start.l, end.l),\n        opacity = Object(_color_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(start.opacity, end.opacity);\n    return function(t) {\n      start.h = h(t);\n      start.s = s(t);\n      start.l = l(t);\n      start.opacity = opacity(t);\n      return start + \"\";\n    };\n  }\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (hsl(_color_js__WEBPACK_IMPORTED_MODULE_1__[\"hue\"]));\nvar hslLong = hsl(_color_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"]);\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-brush/node_modules/d3-interpolate/src/hue.js\":\n/*!**********************************************************************!*\\\n  !*** ./node_modules/d3-brush/node_modules/d3-interpolate/src/hue.js ***!\n  \\**********************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _color_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./color.js */ \"./node_modules/d3-brush/node_modules/d3-interpolate/src/color.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(a, b) {\n  var i = Object(_color_js__WEBPACK_IMPORTED_MODULE_0__[\"hue\"])(+a, +b);\n  return function(t) {\n    var x = i(t);\n    return x - 360 * Math.floor(x / 360);\n  };\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-brush/node_modules/d3-interpolate/src/index.js\":\n/*!************************************************************************!*\\\n  !*** ./node_modules/d3-brush/node_modules/d3-interpolate/src/index.js ***!\n  \\************************************************************************/\n/*! exports provided: interpolate, interpolateArray, interpolateBasis, interpolateBasisClosed, interpolateDate, interpolateDiscrete, interpolateHue, interpolateNumber, interpolateNumberArray, interpolateObject, interpolateRound, interpolateString, interpolateTransformCss, interpolateTransformSvg, interpolateZoom, interpolateRgb, interpolateRgbBasis, interpolateRgbBasisClosed, interpolateHsl, interpolateHslLong, interpolateLab, interpolateHcl, interpolateHclLong, interpolateCubehelix, interpolateCubehelixLong, piecewise, quantize */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _value_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./value.js */ \"./node_modules/d3-brush/node_modules/d3-interpolate/src/value.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolate\", function() { return _value_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n/* harmony import */ var _array_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./array.js */ \"./node_modules/d3-brush/node_modules/d3-interpolate/src/array.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateArray\", function() { return _array_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"]; });\n\n/* harmony import */ var _basis_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./basis.js */ \"./node_modules/d3-brush/node_modules/d3-interpolate/src/basis.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateBasis\", function() { return _basis_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"]; });\n\n/* harmony import */ var _basisClosed_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./basisClosed.js */ \"./node_modules/d3-brush/node_modules/d3-interpolate/src/basisClosed.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateBasisClosed\", function() { return _basisClosed_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"]; });\n\n/* harmony import */ var _date_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./date.js */ \"./node_modules/d3-brush/node_modules/d3-interpolate/src/date.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateDate\", function() { return _date_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"]; });\n\n/* harmony import */ var _discrete_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./discrete.js */ \"./node_modules/d3-brush/node_modules/d3-interpolate/src/discrete.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateDiscrete\", function() { return _discrete_js__WEBPACK_IMPORTED_MODULE_5__[\"default\"]; });\n\n/* harmony import */ var _hue_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./hue.js */ \"./node_modules/d3-brush/node_modules/d3-interpolate/src/hue.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateHue\", function() { return _hue_js__WEBPACK_IMPORTED_MODULE_6__[\"default\"]; });\n\n/* harmony import */ var _number_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./number.js */ \"./node_modules/d3-brush/node_modules/d3-interpolate/src/number.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateNumber\", function() { return _number_js__WEBPACK_IMPORTED_MODULE_7__[\"default\"]; });\n\n/* harmony import */ var _numberArray_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./numberArray.js */ \"./node_modules/d3-brush/node_modules/d3-interpolate/src/numberArray.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateNumberArray\", function() { return _numberArray_js__WEBPACK_IMPORTED_MODULE_8__[\"default\"]; });\n\n/* harmony import */ var _object_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./object.js */ \"./node_modules/d3-brush/node_modules/d3-interpolate/src/object.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateObject\", function() { return _object_js__WEBPACK_IMPORTED_MODULE_9__[\"default\"]; });\n\n/* harmony import */ var _round_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./round.js */ \"./node_modules/d3-brush/node_modules/d3-interpolate/src/round.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateRound\", function() { return _round_js__WEBPACK_IMPORTED_MODULE_10__[\"default\"]; });\n\n/* harmony import */ var _string_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./string.js */ \"./node_modules/d3-brush/node_modules/d3-interpolate/src/string.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateString\", function() { return _string_js__WEBPACK_IMPORTED_MODULE_11__[\"default\"]; });\n\n/* harmony import */ var _transform_index_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./transform/index.js */ \"./node_modules/d3-brush/node_modules/d3-interpolate/src/transform/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateTransformCss\", function() { return _transform_index_js__WEBPACK_IMPORTED_MODULE_12__[\"interpolateTransformCss\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateTransformSvg\", function() { return _transform_index_js__WEBPACK_IMPORTED_MODULE_12__[\"interpolateTransformSvg\"]; });\n\n/* harmony import */ var _zoom_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./zoom.js */ \"./node_modules/d3-brush/node_modules/d3-interpolate/src/zoom.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateZoom\", function() { return _zoom_js__WEBPACK_IMPORTED_MODULE_13__[\"default\"]; });\n\n/* harmony import */ var _rgb_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./rgb.js */ \"./node_modules/d3-brush/node_modules/d3-interpolate/src/rgb.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateRgb\", function() { return _rgb_js__WEBPACK_IMPORTED_MODULE_14__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateRgbBasis\", function() { return _rgb_js__WEBPACK_IMPORTED_MODULE_14__[\"rgbBasis\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateRgbBasisClosed\", function() { return _rgb_js__WEBPACK_IMPORTED_MODULE_14__[\"rgbBasisClosed\"]; });\n\n/* harmony import */ var _hsl_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./hsl.js */ \"./node_modules/d3-brush/node_modules/d3-interpolate/src/hsl.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateHsl\", function() { return _hsl_js__WEBPACK_IMPORTED_MODULE_15__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateHslLong\", function() { return _hsl_js__WEBPACK_IMPORTED_MODULE_15__[\"hslLong\"]; });\n\n/* harmony import */ var _lab_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./lab.js */ \"./node_modules/d3-brush/node_modules/d3-interpolate/src/lab.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateLab\", function() { return _lab_js__WEBPACK_IMPORTED_MODULE_16__[\"default\"]; });\n\n/* harmony import */ var _hcl_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./hcl.js */ \"./node_modules/d3-brush/node_modules/d3-interpolate/src/hcl.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateHcl\", function() { return _hcl_js__WEBPACK_IMPORTED_MODULE_17__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateHclLong\", function() { return _hcl_js__WEBPACK_IMPORTED_MODULE_17__[\"hclLong\"]; });\n\n/* harmony import */ var _cubehelix_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./cubehelix.js */ \"./node_modules/d3-brush/node_modules/d3-interpolate/src/cubehelix.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateCubehelix\", function() { return _cubehelix_js__WEBPACK_IMPORTED_MODULE_18__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateCubehelixLong\", function() { return _cubehelix_js__WEBPACK_IMPORTED_MODULE_18__[\"cubehelixLong\"]; });\n\n/* harmony import */ var _piecewise_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./piecewise.js */ \"./node_modules/d3-brush/node_modules/d3-interpolate/src/piecewise.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"piecewise\", function() { return _piecewise_js__WEBPACK_IMPORTED_MODULE_19__[\"default\"]; });\n\n/* harmony import */ var _quantize_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./quantize.js */ \"./node_modules/d3-brush/node_modules/d3-interpolate/src/quantize.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"quantize\", function() { return _quantize_js__WEBPACK_IMPORTED_MODULE_20__[\"default\"]; });\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-brush/node_modules/d3-interpolate/src/lab.js\":\n/*!**********************************************************************!*\\\n  !*** ./node_modules/d3-brush/node_modules/d3-interpolate/src/lab.js ***!\n  \\**********************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return lab; });\n/* harmony import */ var d3_color__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-color */ \"./node_modules/d3-brush/node_modules/d3-color/src/index.js\");\n/* harmony import */ var _color_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./color.js */ \"./node_modules/d3-brush/node_modules/d3-interpolate/src/color.js\");\n\n\n\nfunction lab(start, end) {\n  var l = Object(_color_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])((start = Object(d3_color__WEBPACK_IMPORTED_MODULE_0__[\"lab\"])(start)).l, (end = Object(d3_color__WEBPACK_IMPORTED_MODULE_0__[\"lab\"])(end)).l),\n      a = Object(_color_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(start.a, end.a),\n      b = Object(_color_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(start.b, end.b),\n      opacity = Object(_color_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(start.opacity, end.opacity);\n  return function(t) {\n    start.l = l(t);\n    start.a = a(t);\n    start.b = b(t);\n    start.opacity = opacity(t);\n    return start + \"\";\n  };\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-brush/node_modules/d3-interpolate/src/number.js\":\n/*!*************************************************************************!*\\\n  !*** ./node_modules/d3-brush/node_modules/d3-interpolate/src/number.js ***!\n  \\*************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(a, b) {\n  return a = +a, b = +b, function(t) {\n    return a * (1 - t) + b * t;\n  };\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-brush/node_modules/d3-interpolate/src/numberArray.js\":\n/*!******************************************************************************!*\\\n  !*** ./node_modules/d3-brush/node_modules/d3-interpolate/src/numberArray.js ***!\n  \\******************************************************************************/\n/*! exports provided: default, isNumberArray */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"isNumberArray\", function() { return isNumberArray; });\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(a, b) {\n  if (!b) b = [];\n  var n = a ? Math.min(b.length, a.length) : 0,\n      c = b.slice(),\n      i;\n  return function(t) {\n    for (i = 0; i < n; ++i) c[i] = a[i] * (1 - t) + b[i] * t;\n    return c;\n  };\n});\n\nfunction isNumberArray(x) {\n  return ArrayBuffer.isView(x) && !(x instanceof DataView);\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-brush/node_modules/d3-interpolate/src/object.js\":\n/*!*************************************************************************!*\\\n  !*** ./node_modules/d3-brush/node_modules/d3-interpolate/src/object.js ***!\n  \\*************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _value_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./value.js */ \"./node_modules/d3-brush/node_modules/d3-interpolate/src/value.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(a, b) {\n  var i = {},\n      c = {},\n      k;\n\n  if (a === null || typeof a !== \"object\") a = {};\n  if (b === null || typeof b !== \"object\") b = {};\n\n  for (k in b) {\n    if (k in a) {\n      i[k] = Object(_value_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(a[k], b[k]);\n    } else {\n      c[k] = b[k];\n    }\n  }\n\n  return function(t) {\n    for (k in i) c[k] = i[k](t);\n    return c;\n  };\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-brush/node_modules/d3-interpolate/src/piecewise.js\":\n/*!****************************************************************************!*\\\n  !*** ./node_modules/d3-brush/node_modules/d3-interpolate/src/piecewise.js ***!\n  \\****************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return piecewise; });\n/* harmony import */ var _value_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./value.js */ \"./node_modules/d3-brush/node_modules/d3-interpolate/src/value.js\");\n\n\nfunction piecewise(interpolate, values) {\n  if (values === undefined) values = interpolate, interpolate = _value_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"];\n  var i = 0, n = values.length - 1, v = values[0], I = new Array(n < 0 ? 0 : n);\n  while (i < n) I[i] = interpolate(v, v = values[++i]);\n  return function(t) {\n    var i = Math.max(0, Math.min(n - 1, Math.floor(t *= n)));\n    return I[i](t - i);\n  };\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-brush/node_modules/d3-interpolate/src/quantize.js\":\n/*!***************************************************************************!*\\\n  !*** ./node_modules/d3-brush/node_modules/d3-interpolate/src/quantize.js ***!\n  \\***************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(interpolator, n) {\n  var samples = new Array(n);\n  for (var i = 0; i < n; ++i) samples[i] = interpolator(i / (n - 1));\n  return samples;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-brush/node_modules/d3-interpolate/src/rgb.js\":\n/*!**********************************************************************!*\\\n  !*** ./node_modules/d3-brush/node_modules/d3-interpolate/src/rgb.js ***!\n  \\**********************************************************************/\n/*! exports provided: default, rgbBasis, rgbBasisClosed */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"rgbBasis\", function() { return rgbBasis; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"rgbBasisClosed\", function() { return rgbBasisClosed; });\n/* harmony import */ var d3_color__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-color */ \"./node_modules/d3-brush/node_modules/d3-color/src/index.js\");\n/* harmony import */ var _basis_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./basis.js */ \"./node_modules/d3-brush/node_modules/d3-interpolate/src/basis.js\");\n/* harmony import */ var _basisClosed_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./basisClosed.js */ \"./node_modules/d3-brush/node_modules/d3-interpolate/src/basisClosed.js\");\n/* harmony import */ var _color_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./color.js */ \"./node_modules/d3-brush/node_modules/d3-interpolate/src/color.js\");\n\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ((function rgbGamma(y) {\n  var color = Object(_color_js__WEBPACK_IMPORTED_MODULE_3__[\"gamma\"])(y);\n\n  function rgb(start, end) {\n    var r = color((start = Object(d3_color__WEBPACK_IMPORTED_MODULE_0__[\"rgb\"])(start)).r, (end = Object(d3_color__WEBPACK_IMPORTED_MODULE_0__[\"rgb\"])(end)).r),\n        g = color(start.g, end.g),\n        b = color(start.b, end.b),\n        opacity = Object(_color_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(start.opacity, end.opacity);\n    return function(t) {\n      start.r = r(t);\n      start.g = g(t);\n      start.b = b(t);\n      start.opacity = opacity(t);\n      return start + \"\";\n    };\n  }\n\n  rgb.gamma = rgbGamma;\n\n  return rgb;\n})(1));\n\nfunction rgbSpline(spline) {\n  return function(colors) {\n    var n = colors.length,\n        r = new Array(n),\n        g = new Array(n),\n        b = new Array(n),\n        i, color;\n    for (i = 0; i < n; ++i) {\n      color = Object(d3_color__WEBPACK_IMPORTED_MODULE_0__[\"rgb\"])(colors[i]);\n      r[i] = color.r || 0;\n      g[i] = color.g || 0;\n      b[i] = color.b || 0;\n    }\n    r = spline(r);\n    g = spline(g);\n    b = spline(b);\n    color.opacity = 1;\n    return function(t) {\n      color.r = r(t);\n      color.g = g(t);\n      color.b = b(t);\n      return color + \"\";\n    };\n  };\n}\n\nvar rgbBasis = rgbSpline(_basis_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"]);\nvar rgbBasisClosed = rgbSpline(_basisClosed_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"]);\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-brush/node_modules/d3-interpolate/src/round.js\":\n/*!************************************************************************!*\\\n  !*** ./node_modules/d3-brush/node_modules/d3-interpolate/src/round.js ***!\n  \\************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(a, b) {\n  return a = +a, b = +b, function(t) {\n    return Math.round(a * (1 - t) + b * t);\n  };\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-brush/node_modules/d3-interpolate/src/string.js\":\n/*!*************************************************************************!*\\\n  !*** ./node_modules/d3-brush/node_modules/d3-interpolate/src/string.js ***!\n  \\*************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _number_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./number.js */ \"./node_modules/d3-brush/node_modules/d3-interpolate/src/number.js\");\n\n\nvar reA = /[-+]?(?:\\d+\\.?\\d*|\\.?\\d+)(?:[eE][-+]?\\d+)?/g,\n    reB = new RegExp(reA.source, \"g\");\n\nfunction zero(b) {\n  return function() {\n    return b;\n  };\n}\n\nfunction one(b) {\n  return function(t) {\n    return b(t) + \"\";\n  };\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(a, b) {\n  var bi = reA.lastIndex = reB.lastIndex = 0, // scan index for next number in b\n      am, // current match in a\n      bm, // current match in b\n      bs, // string preceding current number in b, if any\n      i = -1, // index in s\n      s = [], // string constants and placeholders\n      q = []; // number interpolators\n\n  // Coerce inputs to strings.\n  a = a + \"\", b = b + \"\";\n\n  // Interpolate pairs of numbers in a & b.\n  while ((am = reA.exec(a))\n      && (bm = reB.exec(b))) {\n    if ((bs = bm.index) > bi) { // a string precedes the next number in b\n      bs = b.slice(bi, bs);\n      if (s[i]) s[i] += bs; // coalesce with previous string\n      else s[++i] = bs;\n    }\n    if ((am = am[0]) === (bm = bm[0])) { // numbers in a & b match\n      if (s[i]) s[i] += bm; // coalesce with previous string\n      else s[++i] = bm;\n    } else { // interpolate non-matching numbers\n      s[++i] = null;\n      q.push({i: i, x: Object(_number_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(am, bm)});\n    }\n    bi = reB.lastIndex;\n  }\n\n  // Add remains of b.\n  if (bi < b.length) {\n    bs = b.slice(bi);\n    if (s[i]) s[i] += bs; // coalesce with previous string\n    else s[++i] = bs;\n  }\n\n  // Special optimization for only a single match.\n  // Otherwise, interpolate each of the numbers and rejoin the string.\n  return s.length < 2 ? (q[0]\n      ? one(q[0].x)\n      : zero(b))\n      : (b = q.length, function(t) {\n          for (var i = 0, o; i < b; ++i) s[(o = q[i]).i] = o.x(t);\n          return s.join(\"\");\n        });\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-brush/node_modules/d3-interpolate/src/transform/decompose.js\":\n/*!**************************************************************************************!*\\\n  !*** ./node_modules/d3-brush/node_modules/d3-interpolate/src/transform/decompose.js ***!\n  \\**************************************************************************************/\n/*! exports provided: identity, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"identity\", function() { return identity; });\nvar degrees = 180 / Math.PI;\n\nvar identity = {\n  translateX: 0,\n  translateY: 0,\n  rotate: 0,\n  skewX: 0,\n  scaleX: 1,\n  scaleY: 1\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(a, b, c, d, e, f) {\n  var scaleX, scaleY, skewX;\n  if (scaleX = Math.sqrt(a * a + b * b)) a /= scaleX, b /= scaleX;\n  if (skewX = a * c + b * d) c -= a * skewX, d -= b * skewX;\n  if (scaleY = Math.sqrt(c * c + d * d)) c /= scaleY, d /= scaleY, skewX /= scaleY;\n  if (a * d < b * c) a = -a, b = -b, skewX = -skewX, scaleX = -scaleX;\n  return {\n    translateX: e,\n    translateY: f,\n    rotate: Math.atan2(b, a) * degrees,\n    skewX: Math.atan(skewX) * degrees,\n    scaleX: scaleX,\n    scaleY: scaleY\n  };\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-brush/node_modules/d3-interpolate/src/transform/index.js\":\n/*!**********************************************************************************!*\\\n  !*** ./node_modules/d3-brush/node_modules/d3-interpolate/src/transform/index.js ***!\n  \\**********************************************************************************/\n/*! exports provided: interpolateTransformCss, interpolateTransformSvg */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"interpolateTransformCss\", function() { return interpolateTransformCss; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"interpolateTransformSvg\", function() { return interpolateTransformSvg; });\n/* harmony import */ var _number_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../number.js */ \"./node_modules/d3-brush/node_modules/d3-interpolate/src/number.js\");\n/* harmony import */ var _parse_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./parse.js */ \"./node_modules/d3-brush/node_modules/d3-interpolate/src/transform/parse.js\");\n\n\n\nfunction interpolateTransform(parse, pxComma, pxParen, degParen) {\n\n  function pop(s) {\n    return s.length ? s.pop() + \" \" : \"\";\n  }\n\n  function translate(xa, ya, xb, yb, s, q) {\n    if (xa !== xb || ya !== yb) {\n      var i = s.push(\"translate(\", null, pxComma, null, pxParen);\n      q.push({i: i - 4, x: Object(_number_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(xa, xb)}, {i: i - 2, x: Object(_number_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(ya, yb)});\n    } else if (xb || yb) {\n      s.push(\"translate(\" + xb + pxComma + yb + pxParen);\n    }\n  }\n\n  function rotate(a, b, s, q) {\n    if (a !== b) {\n      if (a - b > 180) b += 360; else if (b - a > 180) a += 360; // shortest path\n      q.push({i: s.push(pop(s) + \"rotate(\", null, degParen) - 2, x: Object(_number_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(a, b)});\n    } else if (b) {\n      s.push(pop(s) + \"rotate(\" + b + degParen);\n    }\n  }\n\n  function skewX(a, b, s, q) {\n    if (a !== b) {\n      q.push({i: s.push(pop(s) + \"skewX(\", null, degParen) - 2, x: Object(_number_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(a, b)});\n    } else if (b) {\n      s.push(pop(s) + \"skewX(\" + b + degParen);\n    }\n  }\n\n  function scale(xa, ya, xb, yb, s, q) {\n    if (xa !== xb || ya !== yb) {\n      var i = s.push(pop(s) + \"scale(\", null, \",\", null, \")\");\n      q.push({i: i - 4, x: Object(_number_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(xa, xb)}, {i: i - 2, x: Object(_number_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(ya, yb)});\n    } else if (xb !== 1 || yb !== 1) {\n      s.push(pop(s) + \"scale(\" + xb + \",\" + yb + \")\");\n    }\n  }\n\n  return function(a, b) {\n    var s = [], // string constants and placeholders\n        q = []; // number interpolators\n    a = parse(a), b = parse(b);\n    translate(a.translateX, a.translateY, b.translateX, b.translateY, s, q);\n    rotate(a.rotate, b.rotate, s, q);\n    skewX(a.skewX, b.skewX, s, q);\n    scale(a.scaleX, a.scaleY, b.scaleX, b.scaleY, s, q);\n    a = b = null; // gc\n    return function(t) {\n      var i = -1, n = q.length, o;\n      while (++i < n) s[(o = q[i]).i] = o.x(t);\n      return s.join(\"\");\n    };\n  };\n}\n\nvar interpolateTransformCss = interpolateTransform(_parse_js__WEBPACK_IMPORTED_MODULE_1__[\"parseCss\"], \"px, \", \"px)\", \"deg)\");\nvar interpolateTransformSvg = interpolateTransform(_parse_js__WEBPACK_IMPORTED_MODULE_1__[\"parseSvg\"], \", \", \")\", \")\");\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-brush/node_modules/d3-interpolate/src/transform/parse.js\":\n/*!**********************************************************************************!*\\\n  !*** ./node_modules/d3-brush/node_modules/d3-interpolate/src/transform/parse.js ***!\n  \\**********************************************************************************/\n/*! exports provided: parseCss, parseSvg */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"parseCss\", function() { return parseCss; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"parseSvg\", function() { return parseSvg; });\n/* harmony import */ var _decompose_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./decompose.js */ \"./node_modules/d3-brush/node_modules/d3-interpolate/src/transform/decompose.js\");\n\n\nvar svgNode;\n\n/* eslint-disable no-undef */\nfunction parseCss(value) {\n  const m = new (typeof DOMMatrix === \"function\" ? DOMMatrix : WebKitCSSMatrix)(value + \"\");\n  return m.isIdentity ? _decompose_js__WEBPACK_IMPORTED_MODULE_0__[\"identity\"] : Object(_decompose_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(m.a, m.b, m.c, m.d, m.e, m.f);\n}\n\nfunction parseSvg(value) {\n  if (value == null) return _decompose_js__WEBPACK_IMPORTED_MODULE_0__[\"identity\"];\n  if (!svgNode) svgNode = document.createElementNS(\"http://www.w3.org/2000/svg\", \"g\");\n  svgNode.setAttribute(\"transform\", value);\n  if (!(value = svgNode.transform.baseVal.consolidate())) return _decompose_js__WEBPACK_IMPORTED_MODULE_0__[\"identity\"];\n  value = value.matrix;\n  return Object(_decompose_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(value.a, value.b, value.c, value.d, value.e, value.f);\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-brush/node_modules/d3-interpolate/src/value.js\":\n/*!************************************************************************!*\\\n  !*** ./node_modules/d3-brush/node_modules/d3-interpolate/src/value.js ***!\n  \\************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var d3_color__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-color */ \"./node_modules/d3-brush/node_modules/d3-color/src/index.js\");\n/* harmony import */ var _rgb_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./rgb.js */ \"./node_modules/d3-brush/node_modules/d3-interpolate/src/rgb.js\");\n/* harmony import */ var _array_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./array.js */ \"./node_modules/d3-brush/node_modules/d3-interpolate/src/array.js\");\n/* harmony import */ var _date_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./date.js */ \"./node_modules/d3-brush/node_modules/d3-interpolate/src/date.js\");\n/* harmony import */ var _number_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./number.js */ \"./node_modules/d3-brush/node_modules/d3-interpolate/src/number.js\");\n/* harmony import */ var _object_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./object.js */ \"./node_modules/d3-brush/node_modules/d3-interpolate/src/object.js\");\n/* harmony import */ var _string_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./string.js */ \"./node_modules/d3-brush/node_modules/d3-interpolate/src/string.js\");\n/* harmony import */ var _constant_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./constant.js */ \"./node_modules/d3-brush/node_modules/d3-interpolate/src/constant.js\");\n/* harmony import */ var _numberArray_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./numberArray.js */ \"./node_modules/d3-brush/node_modules/d3-interpolate/src/numberArray.js\");\n\n\n\n\n\n\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(a, b) {\n  var t = typeof b, c;\n  return b == null || t === \"boolean\" ? Object(_constant_js__WEBPACK_IMPORTED_MODULE_7__[\"default\"])(b)\n      : (t === \"number\" ? _number_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"]\n      : t === \"string\" ? ((c = Object(d3_color__WEBPACK_IMPORTED_MODULE_0__[\"color\"])(b)) ? (b = c, _rgb_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"]) : _string_js__WEBPACK_IMPORTED_MODULE_6__[\"default\"])\n      : b instanceof d3_color__WEBPACK_IMPORTED_MODULE_0__[\"color\"] ? _rgb_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"]\n      : b instanceof Date ? _date_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"]\n      : Object(_numberArray_js__WEBPACK_IMPORTED_MODULE_8__[\"isNumberArray\"])(b) ? _numberArray_js__WEBPACK_IMPORTED_MODULE_8__[\"default\"]\n      : Array.isArray(b) ? _array_js__WEBPACK_IMPORTED_MODULE_2__[\"genericArray\"]\n      : typeof b.valueOf !== \"function\" && typeof b.toString !== \"function\" || isNaN(b) ? _object_js__WEBPACK_IMPORTED_MODULE_5__[\"default\"]\n      : _number_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(a, b);\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-brush/node_modules/d3-interpolate/src/zoom.js\":\n/*!***********************************************************************!*\\\n  !*** ./node_modules/d3-brush/node_modules/d3-interpolate/src/zoom.js ***!\n  \\***********************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\nvar epsilon2 = 1e-12;\n\nfunction cosh(x) {\n  return ((x = Math.exp(x)) + 1 / x) / 2;\n}\n\nfunction sinh(x) {\n  return ((x = Math.exp(x)) - 1 / x) / 2;\n}\n\nfunction tanh(x) {\n  return ((x = Math.exp(2 * x)) - 1) / (x + 1);\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ((function zoomRho(rho, rho2, rho4) {\n\n  // p0 = [ux0, uy0, w0]\n  // p1 = [ux1, uy1, w1]\n  function zoom(p0, p1) {\n    var ux0 = p0[0], uy0 = p0[1], w0 = p0[2],\n        ux1 = p1[0], uy1 = p1[1], w1 = p1[2],\n        dx = ux1 - ux0,\n        dy = uy1 - uy0,\n        d2 = dx * dx + dy * dy,\n        i,\n        S;\n\n    // Special case for u0 ≅ u1.\n    if (d2 < epsilon2) {\n      S = Math.log(w1 / w0) / rho;\n      i = function(t) {\n        return [\n          ux0 + t * dx,\n          uy0 + t * dy,\n          w0 * Math.exp(rho * t * S)\n        ];\n      }\n    }\n\n    // General case.\n    else {\n      var d1 = Math.sqrt(d2),\n          b0 = (w1 * w1 - w0 * w0 + rho4 * d2) / (2 * w0 * rho2 * d1),\n          b1 = (w1 * w1 - w0 * w0 - rho4 * d2) / (2 * w1 * rho2 * d1),\n          r0 = Math.log(Math.sqrt(b0 * b0 + 1) - b0),\n          r1 = Math.log(Math.sqrt(b1 * b1 + 1) - b1);\n      S = (r1 - r0) / rho;\n      i = function(t) {\n        var s = t * S,\n            coshr0 = cosh(r0),\n            u = w0 / (rho2 * d1) * (coshr0 * tanh(rho * s + r0) - sinh(r0));\n        return [\n          ux0 + u * dx,\n          uy0 + u * dy,\n          w0 * coshr0 / cosh(rho * s + r0)\n        ];\n      }\n    }\n\n    i.duration = S * 1000 * rho / Math.SQRT2;\n\n    return i;\n  }\n\n  zoom.rho = function(_) {\n    var _1 = Math.max(1e-3, +_), _2 = _1 * _1, _4 = _2 * _2;\n    return zoomRho(_1, _2, _4);\n  };\n\n  return zoom;\n})(Math.SQRT2, 2, 4));\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-brush/node_modules/d3-selection/src/array.js\":\n/*!**********************************************************************!*\\\n  !*** ./node_modules/d3-brush/node_modules/d3-selection/src/array.js ***!\n  \\**********************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return array; });\n// Given something array like (or null), returns something that is strictly an\n// array. This is used to ensure that array-like objects passed to d3.selectAll\n// or selection.selectAll are converted into proper arrays when creating a\n// selection; we don’t ever want to create a selection backed by a live\n// HTMLCollection or NodeList. However, note that selection.selectAll will use a\n// static NodeList as a group, since it safely derived from querySelectorAll.\nfunction array(x) {\n  return x == null ? [] : Array.isArray(x) ? x : Array.from(x);\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-brush/node_modules/d3-selection/src/constant.js\":\n/*!*************************************************************************!*\\\n  !*** ./node_modules/d3-brush/node_modules/d3-selection/src/constant.js ***!\n  \\*************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(x) {\n  return function() {\n    return x;\n  };\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-brush/node_modules/d3-selection/src/create.js\":\n/*!***********************************************************************!*\\\n  !*** ./node_modules/d3-brush/node_modules/d3-selection/src/create.js ***!\n  \\***********************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _creator_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./creator.js */ \"./node_modules/d3-brush/node_modules/d3-selection/src/creator.js\");\n/* harmony import */ var _select_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./select.js */ \"./node_modules/d3-brush/node_modules/d3-selection/src/select.js\");\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(name) {\n  return Object(_select_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(Object(_creator_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(name).call(document.documentElement));\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-brush/node_modules/d3-selection/src/creator.js\":\n/*!************************************************************************!*\\\n  !*** ./node_modules/d3-brush/node_modules/d3-selection/src/creator.js ***!\n  \\************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _namespace_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./namespace.js */ \"./node_modules/d3-brush/node_modules/d3-selection/src/namespace.js\");\n/* harmony import */ var _namespaces_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./namespaces.js */ \"./node_modules/d3-brush/node_modules/d3-selection/src/namespaces.js\");\n\n\n\nfunction creatorInherit(name) {\n  return function() {\n    var document = this.ownerDocument,\n        uri = this.namespaceURI;\n    return uri === _namespaces_js__WEBPACK_IMPORTED_MODULE_1__[\"xhtml\"] && document.documentElement.namespaceURI === _namespaces_js__WEBPACK_IMPORTED_MODULE_1__[\"xhtml\"]\n        ? document.createElement(name)\n        : document.createElementNS(uri, name);\n  };\n}\n\nfunction creatorFixed(fullname) {\n  return function() {\n    return this.ownerDocument.createElementNS(fullname.space, fullname.local);\n  };\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(name) {\n  var fullname = Object(_namespace_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(name);\n  return (fullname.local\n      ? creatorFixed\n      : creatorInherit)(fullname);\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-brush/node_modules/d3-selection/src/index.js\":\n/*!**********************************************************************!*\\\n  !*** ./node_modules/d3-brush/node_modules/d3-selection/src/index.js ***!\n  \\**********************************************************************/\n/*! exports provided: create, creator, local, matcher, namespace, namespaces, pointer, pointers, select, selectAll, selection, selector, selectorAll, style, window */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _create_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./create.js */ \"./node_modules/d3-brush/node_modules/d3-selection/src/create.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"create\", function() { return _create_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n/* harmony import */ var _creator_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./creator.js */ \"./node_modules/d3-brush/node_modules/d3-selection/src/creator.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"creator\", function() { return _creator_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"]; });\n\n/* harmony import */ var _local_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./local.js */ \"./node_modules/d3-brush/node_modules/d3-selection/src/local.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"local\", function() { return _local_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"]; });\n\n/* harmony import */ var _matcher_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./matcher.js */ \"./node_modules/d3-brush/node_modules/d3-selection/src/matcher.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"matcher\", function() { return _matcher_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"]; });\n\n/* harmony import */ var _namespace_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./namespace.js */ \"./node_modules/d3-brush/node_modules/d3-selection/src/namespace.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"namespace\", function() { return _namespace_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"]; });\n\n/* harmony import */ var _namespaces_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./namespaces.js */ \"./node_modules/d3-brush/node_modules/d3-selection/src/namespaces.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"namespaces\", function() { return _namespaces_js__WEBPACK_IMPORTED_MODULE_5__[\"default\"]; });\n\n/* harmony import */ var _pointer_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./pointer.js */ \"./node_modules/d3-brush/node_modules/d3-selection/src/pointer.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"pointer\", function() { return _pointer_js__WEBPACK_IMPORTED_MODULE_6__[\"default\"]; });\n\n/* harmony import */ var _pointers_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./pointers.js */ \"./node_modules/d3-brush/node_modules/d3-selection/src/pointers.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"pointers\", function() { return _pointers_js__WEBPACK_IMPORTED_MODULE_7__[\"default\"]; });\n\n/* harmony import */ var _select_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./select.js */ \"./node_modules/d3-brush/node_modules/d3-selection/src/select.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"select\", function() { return _select_js__WEBPACK_IMPORTED_MODULE_8__[\"default\"]; });\n\n/* harmony import */ var _selectAll_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./selectAll.js */ \"./node_modules/d3-brush/node_modules/d3-selection/src/selectAll.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"selectAll\", function() { return _selectAll_js__WEBPACK_IMPORTED_MODULE_9__[\"default\"]; });\n\n/* harmony import */ var _selection_index_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./selection/index.js */ \"./node_modules/d3-brush/node_modules/d3-selection/src/selection/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"selection\", function() { return _selection_index_js__WEBPACK_IMPORTED_MODULE_10__[\"default\"]; });\n\n/* harmony import */ var _selector_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./selector.js */ \"./node_modules/d3-brush/node_modules/d3-selection/src/selector.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"selector\", function() { return _selector_js__WEBPACK_IMPORTED_MODULE_11__[\"default\"]; });\n\n/* harmony import */ var _selectorAll_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./selectorAll.js */ \"./node_modules/d3-brush/node_modules/d3-selection/src/selectorAll.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"selectorAll\", function() { return _selectorAll_js__WEBPACK_IMPORTED_MODULE_12__[\"default\"]; });\n\n/* harmony import */ var _selection_style_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./selection/style.js */ \"./node_modules/d3-brush/node_modules/d3-selection/src/selection/style.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"style\", function() { return _selection_style_js__WEBPACK_IMPORTED_MODULE_13__[\"styleValue\"]; });\n\n/* harmony import */ var _window_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./window.js */ \"./node_modules/d3-brush/node_modules/d3-selection/src/window.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"window\", function() { return _window_js__WEBPACK_IMPORTED_MODULE_14__[\"default\"]; });\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-brush/node_modules/d3-selection/src/local.js\":\n/*!**********************************************************************!*\\\n  !*** ./node_modules/d3-brush/node_modules/d3-selection/src/local.js ***!\n  \\**********************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return local; });\nvar nextId = 0;\n\nfunction local() {\n  return new Local;\n}\n\nfunction Local() {\n  this._ = \"@\" + (++nextId).toString(36);\n}\n\nLocal.prototype = local.prototype = {\n  constructor: Local,\n  get: function(node) {\n    var id = this._;\n    while (!(id in node)) if (!(node = node.parentNode)) return;\n    return node[id];\n  },\n  set: function(node, value) {\n    return node[this._] = value;\n  },\n  remove: function(node) {\n    return this._ in node && delete node[this._];\n  },\n  toString: function() {\n    return this._;\n  }\n};\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-brush/node_modules/d3-selection/src/matcher.js\":\n/*!************************************************************************!*\\\n  !*** ./node_modules/d3-brush/node_modules/d3-selection/src/matcher.js ***!\n  \\************************************************************************/\n/*! exports provided: default, childMatcher */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"childMatcher\", function() { return childMatcher; });\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(selector) {\n  return function() {\n    return this.matches(selector);\n  };\n});\n\nfunction childMatcher(selector) {\n  return function(node) {\n    return node.matches(selector);\n  };\n}\n\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-brush/node_modules/d3-selection/src/namespace.js\":\n/*!**************************************************************************!*\\\n  !*** ./node_modules/d3-brush/node_modules/d3-selection/src/namespace.js ***!\n  \\**************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _namespaces_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./namespaces.js */ \"./node_modules/d3-brush/node_modules/d3-selection/src/namespaces.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(name) {\n  var prefix = name += \"\", i = prefix.indexOf(\":\");\n  if (i >= 0 && (prefix = name.slice(0, i)) !== \"xmlns\") name = name.slice(i + 1);\n  return _namespaces_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].hasOwnProperty(prefix) ? {space: _namespaces_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"][prefix], local: name} : name; // eslint-disable-line no-prototype-builtins\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-brush/node_modules/d3-selection/src/namespaces.js\":\n/*!***************************************************************************!*\\\n  !*** ./node_modules/d3-brush/node_modules/d3-selection/src/namespaces.js ***!\n  \\***************************************************************************/\n/*! exports provided: xhtml, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"xhtml\", function() { return xhtml; });\nvar xhtml = \"http://www.w3.org/1999/xhtml\";\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n  svg: \"http://www.w3.org/2000/svg\",\n  xhtml: xhtml,\n  xlink: \"http://www.w3.org/1999/xlink\",\n  xml: \"http://www.w3.org/XML/1998/namespace\",\n  xmlns: \"http://www.w3.org/2000/xmlns/\"\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-brush/node_modules/d3-selection/src/pointer.js\":\n/*!************************************************************************!*\\\n  !*** ./node_modules/d3-brush/node_modules/d3-selection/src/pointer.js ***!\n  \\************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _sourceEvent_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./sourceEvent.js */ \"./node_modules/d3-brush/node_modules/d3-selection/src/sourceEvent.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(event, node) {\n  event = Object(_sourceEvent_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(event);\n  if (node === undefined) node = event.currentTarget;\n  if (node) {\n    var svg = node.ownerSVGElement || node;\n    if (svg.createSVGPoint) {\n      var point = svg.createSVGPoint();\n      point.x = event.clientX, point.y = event.clientY;\n      point = point.matrixTransform(node.getScreenCTM().inverse());\n      return [point.x, point.y];\n    }\n    if (node.getBoundingClientRect) {\n      var rect = node.getBoundingClientRect();\n      return [event.clientX - rect.left - node.clientLeft, event.clientY - rect.top - node.clientTop];\n    }\n  }\n  return [event.pageX, event.pageY];\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-brush/node_modules/d3-selection/src/pointers.js\":\n/*!*************************************************************************!*\\\n  !*** ./node_modules/d3-brush/node_modules/d3-selection/src/pointers.js ***!\n  \\*************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _pointer_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./pointer.js */ \"./node_modules/d3-brush/node_modules/d3-selection/src/pointer.js\");\n/* harmony import */ var _sourceEvent_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./sourceEvent.js */ \"./node_modules/d3-brush/node_modules/d3-selection/src/sourceEvent.js\");\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(events, node) {\n  if (events.target) { // i.e., instanceof Event, not TouchList or iterable\n    events = Object(_sourceEvent_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(events);\n    if (node === undefined) node = events.currentTarget;\n    events = events.touches || [events];\n  }\n  return Array.from(events, event => Object(_pointer_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(event, node));\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-brush/node_modules/d3-selection/src/select.js\":\n/*!***********************************************************************!*\\\n  !*** ./node_modules/d3-brush/node_modules/d3-selection/src/select.js ***!\n  \\***********************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _selection_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./selection/index.js */ \"./node_modules/d3-brush/node_modules/d3-selection/src/selection/index.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(selector) {\n  return typeof selector === \"string\"\n      ? new _selection_index_js__WEBPACK_IMPORTED_MODULE_0__[\"Selection\"]([[document.querySelector(selector)]], [document.documentElement])\n      : new _selection_index_js__WEBPACK_IMPORTED_MODULE_0__[\"Selection\"]([[selector]], _selection_index_js__WEBPACK_IMPORTED_MODULE_0__[\"root\"]);\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-brush/node_modules/d3-selection/src/selectAll.js\":\n/*!**************************************************************************!*\\\n  !*** ./node_modules/d3-brush/node_modules/d3-selection/src/selectAll.js ***!\n  \\**************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _array_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./array.js */ \"./node_modules/d3-brush/node_modules/d3-selection/src/array.js\");\n/* harmony import */ var _selection_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./selection/index.js */ \"./node_modules/d3-brush/node_modules/d3-selection/src/selection/index.js\");\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(selector) {\n  return typeof selector === \"string\"\n      ? new _selection_index_js__WEBPACK_IMPORTED_MODULE_1__[\"Selection\"]([document.querySelectorAll(selector)], [document.documentElement])\n      : new _selection_index_js__WEBPACK_IMPORTED_MODULE_1__[\"Selection\"]([Object(_array_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(selector)], _selection_index_js__WEBPACK_IMPORTED_MODULE_1__[\"root\"]);\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-brush/node_modules/d3-selection/src/selection/append.js\":\n/*!*********************************************************************************!*\\\n  !*** ./node_modules/d3-brush/node_modules/d3-selection/src/selection/append.js ***!\n  \\*********************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _creator_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../creator.js */ \"./node_modules/d3-brush/node_modules/d3-selection/src/creator.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(name) {\n  var create = typeof name === \"function\" ? name : Object(_creator_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(name);\n  return this.select(function() {\n    return this.appendChild(create.apply(this, arguments));\n  });\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-brush/node_modules/d3-selection/src/selection/attr.js\":\n/*!*******************************************************************************!*\\\n  !*** ./node_modules/d3-brush/node_modules/d3-selection/src/selection/attr.js ***!\n  \\*******************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _namespace_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../namespace.js */ \"./node_modules/d3-brush/node_modules/d3-selection/src/namespace.js\");\n\n\nfunction attrRemove(name) {\n  return function() {\n    this.removeAttribute(name);\n  };\n}\n\nfunction attrRemoveNS(fullname) {\n  return function() {\n    this.removeAttributeNS(fullname.space, fullname.local);\n  };\n}\n\nfunction attrConstant(name, value) {\n  return function() {\n    this.setAttribute(name, value);\n  };\n}\n\nfunction attrConstantNS(fullname, value) {\n  return function() {\n    this.setAttributeNS(fullname.space, fullname.local, value);\n  };\n}\n\nfunction attrFunction(name, value) {\n  return function() {\n    var v = value.apply(this, arguments);\n    if (v == null) this.removeAttribute(name);\n    else this.setAttribute(name, v);\n  };\n}\n\nfunction attrFunctionNS(fullname, value) {\n  return function() {\n    var v = value.apply(this, arguments);\n    if (v == null) this.removeAttributeNS(fullname.space, fullname.local);\n    else this.setAttributeNS(fullname.space, fullname.local, v);\n  };\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(name, value) {\n  var fullname = Object(_namespace_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(name);\n\n  if (arguments.length < 2) {\n    var node = this.node();\n    return fullname.local\n        ? node.getAttributeNS(fullname.space, fullname.local)\n        : node.getAttribute(fullname);\n  }\n\n  return this.each((value == null\n      ? (fullname.local ? attrRemoveNS : attrRemove) : (typeof value === \"function\"\n      ? (fullname.local ? attrFunctionNS : attrFunction)\n      : (fullname.local ? attrConstantNS : attrConstant)))(fullname, value));\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-brush/node_modules/d3-selection/src/selection/call.js\":\n/*!*******************************************************************************!*\\\n  !*** ./node_modules/d3-brush/node_modules/d3-selection/src/selection/call.js ***!\n  \\*******************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  var callback = arguments[0];\n  arguments[0] = this;\n  callback.apply(null, arguments);\n  return this;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-brush/node_modules/d3-selection/src/selection/classed.js\":\n/*!**********************************************************************************!*\\\n  !*** ./node_modules/d3-brush/node_modules/d3-selection/src/selection/classed.js ***!\n  \\**********************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\nfunction classArray(string) {\n  return string.trim().split(/^|\\s+/);\n}\n\nfunction classList(node) {\n  return node.classList || new ClassList(node);\n}\n\nfunction ClassList(node) {\n  this._node = node;\n  this._names = classArray(node.getAttribute(\"class\") || \"\");\n}\n\nClassList.prototype = {\n  add: function(name) {\n    var i = this._names.indexOf(name);\n    if (i < 0) {\n      this._names.push(name);\n      this._node.setAttribute(\"class\", this._names.join(\" \"));\n    }\n  },\n  remove: function(name) {\n    var i = this._names.indexOf(name);\n    if (i >= 0) {\n      this._names.splice(i, 1);\n      this._node.setAttribute(\"class\", this._names.join(\" \"));\n    }\n  },\n  contains: function(name) {\n    return this._names.indexOf(name) >= 0;\n  }\n};\n\nfunction classedAdd(node, names) {\n  var list = classList(node), i = -1, n = names.length;\n  while (++i < n) list.add(names[i]);\n}\n\nfunction classedRemove(node, names) {\n  var list = classList(node), i = -1, n = names.length;\n  while (++i < n) list.remove(names[i]);\n}\n\nfunction classedTrue(names) {\n  return function() {\n    classedAdd(this, names);\n  };\n}\n\nfunction classedFalse(names) {\n  return function() {\n    classedRemove(this, names);\n  };\n}\n\nfunction classedFunction(names, value) {\n  return function() {\n    (value.apply(this, arguments) ? classedAdd : classedRemove)(this, names);\n  };\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(name, value) {\n  var names = classArray(name + \"\");\n\n  if (arguments.length < 2) {\n    var list = classList(this.node()), i = -1, n = names.length;\n    while (++i < n) if (!list.contains(names[i])) return false;\n    return true;\n  }\n\n  return this.each((typeof value === \"function\"\n      ? classedFunction : value\n      ? classedTrue\n      : classedFalse)(names, value));\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-brush/node_modules/d3-selection/src/selection/clone.js\":\n/*!********************************************************************************!*\\\n  !*** ./node_modules/d3-brush/node_modules/d3-selection/src/selection/clone.js ***!\n  \\********************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\nfunction selection_cloneShallow() {\n  var clone = this.cloneNode(false), parent = this.parentNode;\n  return parent ? parent.insertBefore(clone, this.nextSibling) : clone;\n}\n\nfunction selection_cloneDeep() {\n  var clone = this.cloneNode(true), parent = this.parentNode;\n  return parent ? parent.insertBefore(clone, this.nextSibling) : clone;\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(deep) {\n  return this.select(deep ? selection_cloneDeep : selection_cloneShallow);\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-brush/node_modules/d3-selection/src/selection/data.js\":\n/*!*******************************************************************************!*\\\n  !*** ./node_modules/d3-brush/node_modules/d3-selection/src/selection/data.js ***!\n  \\*******************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./index.js */ \"./node_modules/d3-brush/node_modules/d3-selection/src/selection/index.js\");\n/* harmony import */ var _enter_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./enter.js */ \"./node_modules/d3-brush/node_modules/d3-selection/src/selection/enter.js\");\n/* harmony import */ var _constant_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../constant.js */ \"./node_modules/d3-brush/node_modules/d3-selection/src/constant.js\");\n\n\n\n\nfunction bindIndex(parent, group, enter, update, exit, data) {\n  var i = 0,\n      node,\n      groupLength = group.length,\n      dataLength = data.length;\n\n  // Put any non-null nodes that fit into update.\n  // Put any null nodes into enter.\n  // Put any remaining data into enter.\n  for (; i < dataLength; ++i) {\n    if (node = group[i]) {\n      node.__data__ = data[i];\n      update[i] = node;\n    } else {\n      enter[i] = new _enter_js__WEBPACK_IMPORTED_MODULE_1__[\"EnterNode\"](parent, data[i]);\n    }\n  }\n\n  // Put any non-null nodes that don’t fit into exit.\n  for (; i < groupLength; ++i) {\n    if (node = group[i]) {\n      exit[i] = node;\n    }\n  }\n}\n\nfunction bindKey(parent, group, enter, update, exit, data, key) {\n  var i,\n      node,\n      nodeByKeyValue = new Map,\n      groupLength = group.length,\n      dataLength = data.length,\n      keyValues = new Array(groupLength),\n      keyValue;\n\n  // Compute the key for each node.\n  // If multiple nodes have the same key, the duplicates are added to exit.\n  for (i = 0; i < groupLength; ++i) {\n    if (node = group[i]) {\n      keyValues[i] = keyValue = key.call(node, node.__data__, i, group) + \"\";\n      if (nodeByKeyValue.has(keyValue)) {\n        exit[i] = node;\n      } else {\n        nodeByKeyValue.set(keyValue, node);\n      }\n    }\n  }\n\n  // Compute the key for each datum.\n  // If there a node associated with this key, join and add it to update.\n  // If there is not (or the key is a duplicate), add it to enter.\n  for (i = 0; i < dataLength; ++i) {\n    keyValue = key.call(parent, data[i], i, data) + \"\";\n    if (node = nodeByKeyValue.get(keyValue)) {\n      update[i] = node;\n      node.__data__ = data[i];\n      nodeByKeyValue.delete(keyValue);\n    } else {\n      enter[i] = new _enter_js__WEBPACK_IMPORTED_MODULE_1__[\"EnterNode\"](parent, data[i]);\n    }\n  }\n\n  // Add any remaining nodes that were not bound to data to exit.\n  for (i = 0; i < groupLength; ++i) {\n    if ((node = group[i]) && (nodeByKeyValue.get(keyValues[i]) === node)) {\n      exit[i] = node;\n    }\n  }\n}\n\nfunction datum(node) {\n  return node.__data__;\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(value, key) {\n  if (!arguments.length) return Array.from(this, datum);\n\n  var bind = key ? bindKey : bindIndex,\n      parents = this._parents,\n      groups = this._groups;\n\n  if (typeof value !== \"function\") value = Object(_constant_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(value);\n\n  for (var m = groups.length, update = new Array(m), enter = new Array(m), exit = new Array(m), j = 0; j < m; ++j) {\n    var parent = parents[j],\n        group = groups[j],\n        groupLength = group.length,\n        data = arraylike(value.call(parent, parent && parent.__data__, j, parents)),\n        dataLength = data.length,\n        enterGroup = enter[j] = new Array(dataLength),\n        updateGroup = update[j] = new Array(dataLength),\n        exitGroup = exit[j] = new Array(groupLength);\n\n    bind(parent, group, enterGroup, updateGroup, exitGroup, data, key);\n\n    // Now connect the enter nodes to their following update node, such that\n    // appendChild can insert the materialized enter node before this node,\n    // rather than at the end of the parent node.\n    for (var i0 = 0, i1 = 0, previous, next; i0 < dataLength; ++i0) {\n      if (previous = enterGroup[i0]) {\n        if (i0 >= i1) i1 = i0 + 1;\n        while (!(next = updateGroup[i1]) && ++i1 < dataLength);\n        previous._next = next || null;\n      }\n    }\n  }\n\n  update = new _index_js__WEBPACK_IMPORTED_MODULE_0__[\"Selection\"](update, parents);\n  update._enter = enter;\n  update._exit = exit;\n  return update;\n});\n\n// Given some data, this returns an array-like view of it: an object that\n// exposes a length property and allows numeric indexing. Note that unlike\n// selectAll, this isn’t worried about “live” collections because the resulting\n// array will only be used briefly while data is being bound. (It is possible to\n// cause the data to change while iterating by using a key function, but please\n// don’t; we’d rather avoid a gratuitous copy.)\nfunction arraylike(data) {\n  return typeof data === \"object\" && \"length\" in data\n    ? data // Array, TypedArray, NodeList, array-like\n    : Array.from(data); // Map, Set, iterable, string, or anything else\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-brush/node_modules/d3-selection/src/selection/datum.js\":\n/*!********************************************************************************!*\\\n  !*** ./node_modules/d3-brush/node_modules/d3-selection/src/selection/datum.js ***!\n  \\********************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(value) {\n  return arguments.length\n      ? this.property(\"__data__\", value)\n      : this.node().__data__;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-brush/node_modules/d3-selection/src/selection/dispatch.js\":\n/*!***********************************************************************************!*\\\n  !*** ./node_modules/d3-brush/node_modules/d3-selection/src/selection/dispatch.js ***!\n  \\***********************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _window_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../window.js */ \"./node_modules/d3-brush/node_modules/d3-selection/src/window.js\");\n\n\nfunction dispatchEvent(node, type, params) {\n  var window = Object(_window_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(node),\n      event = window.CustomEvent;\n\n  if (typeof event === \"function\") {\n    event = new event(type, params);\n  } else {\n    event = window.document.createEvent(\"Event\");\n    if (params) event.initEvent(type, params.bubbles, params.cancelable), event.detail = params.detail;\n    else event.initEvent(type, false, false);\n  }\n\n  node.dispatchEvent(event);\n}\n\nfunction dispatchConstant(type, params) {\n  return function() {\n    return dispatchEvent(this, type, params);\n  };\n}\n\nfunction dispatchFunction(type, params) {\n  return function() {\n    return dispatchEvent(this, type, params.apply(this, arguments));\n  };\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(type, params) {\n  return this.each((typeof params === \"function\"\n      ? dispatchFunction\n      : dispatchConstant)(type, params));\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-brush/node_modules/d3-selection/src/selection/each.js\":\n/*!*******************************************************************************!*\\\n  !*** ./node_modules/d3-brush/node_modules/d3-selection/src/selection/each.js ***!\n  \\*******************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(callback) {\n\n  for (var groups = this._groups, j = 0, m = groups.length; j < m; ++j) {\n    for (var group = groups[j], i = 0, n = group.length, node; i < n; ++i) {\n      if (node = group[i]) callback.call(node, node.__data__, i, group);\n    }\n  }\n\n  return this;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-brush/node_modules/d3-selection/src/selection/empty.js\":\n/*!********************************************************************************!*\\\n  !*** ./node_modules/d3-brush/node_modules/d3-selection/src/selection/empty.js ***!\n  \\********************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  return !this.node();\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-brush/node_modules/d3-selection/src/selection/enter.js\":\n/*!********************************************************************************!*\\\n  !*** ./node_modules/d3-brush/node_modules/d3-selection/src/selection/enter.js ***!\n  \\********************************************************************************/\n/*! exports provided: default, EnterNode */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"EnterNode\", function() { return EnterNode; });\n/* harmony import */ var _sparse_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./sparse.js */ \"./node_modules/d3-brush/node_modules/d3-selection/src/selection/sparse.js\");\n/* harmony import */ var _index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./index.js */ \"./node_modules/d3-brush/node_modules/d3-selection/src/selection/index.js\");\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  return new _index_js__WEBPACK_IMPORTED_MODULE_1__[\"Selection\"](this._enter || this._groups.map(_sparse_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]), this._parents);\n});\n\nfunction EnterNode(parent, datum) {\n  this.ownerDocument = parent.ownerDocument;\n  this.namespaceURI = parent.namespaceURI;\n  this._next = null;\n  this._parent = parent;\n  this.__data__ = datum;\n}\n\nEnterNode.prototype = {\n  constructor: EnterNode,\n  appendChild: function(child) { return this._parent.insertBefore(child, this._next); },\n  insertBefore: function(child, next) { return this._parent.insertBefore(child, next); },\n  querySelector: function(selector) { return this._parent.querySelector(selector); },\n  querySelectorAll: function(selector) { return this._parent.querySelectorAll(selector); }\n};\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-brush/node_modules/d3-selection/src/selection/exit.js\":\n/*!*******************************************************************************!*\\\n  !*** ./node_modules/d3-brush/node_modules/d3-selection/src/selection/exit.js ***!\n  \\*******************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _sparse_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./sparse.js */ \"./node_modules/d3-brush/node_modules/d3-selection/src/selection/sparse.js\");\n/* harmony import */ var _index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./index.js */ \"./node_modules/d3-brush/node_modules/d3-selection/src/selection/index.js\");\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  return new _index_js__WEBPACK_IMPORTED_MODULE_1__[\"Selection\"](this._exit || this._groups.map(_sparse_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]), this._parents);\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-brush/node_modules/d3-selection/src/selection/filter.js\":\n/*!*********************************************************************************!*\\\n  !*** ./node_modules/d3-brush/node_modules/d3-selection/src/selection/filter.js ***!\n  \\*********************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./index.js */ \"./node_modules/d3-brush/node_modules/d3-selection/src/selection/index.js\");\n/* harmony import */ var _matcher_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../matcher.js */ \"./node_modules/d3-brush/node_modules/d3-selection/src/matcher.js\");\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(match) {\n  if (typeof match !== \"function\") match = Object(_matcher_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(match);\n\n  for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {\n    for (var group = groups[j], n = group.length, subgroup = subgroups[j] = [], node, i = 0; i < n; ++i) {\n      if ((node = group[i]) && match.call(node, node.__data__, i, group)) {\n        subgroup.push(node);\n      }\n    }\n  }\n\n  return new _index_js__WEBPACK_IMPORTED_MODULE_0__[\"Selection\"](subgroups, this._parents);\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-brush/node_modules/d3-selection/src/selection/html.js\":\n/*!*******************************************************************************!*\\\n  !*** ./node_modules/d3-brush/node_modules/d3-selection/src/selection/html.js ***!\n  \\*******************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\nfunction htmlRemove() {\n  this.innerHTML = \"\";\n}\n\nfunction htmlConstant(value) {\n  return function() {\n    this.innerHTML = value;\n  };\n}\n\nfunction htmlFunction(value) {\n  return function() {\n    var v = value.apply(this, arguments);\n    this.innerHTML = v == null ? \"\" : v;\n  };\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(value) {\n  return arguments.length\n      ? this.each(value == null\n          ? htmlRemove : (typeof value === \"function\"\n          ? htmlFunction\n          : htmlConstant)(value))\n      : this.node().innerHTML;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-brush/node_modules/d3-selection/src/selection/index.js\":\n/*!********************************************************************************!*\\\n  !*** ./node_modules/d3-brush/node_modules/d3-selection/src/selection/index.js ***!\n  \\********************************************************************************/\n/*! exports provided: root, Selection, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"root\", function() { return root; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Selection\", function() { return Selection; });\n/* harmony import */ var _select_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./select.js */ \"./node_modules/d3-brush/node_modules/d3-selection/src/selection/select.js\");\n/* harmony import */ var _selectAll_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./selectAll.js */ \"./node_modules/d3-brush/node_modules/d3-selection/src/selection/selectAll.js\");\n/* harmony import */ var _selectChild_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./selectChild.js */ \"./node_modules/d3-brush/node_modules/d3-selection/src/selection/selectChild.js\");\n/* harmony import */ var _selectChildren_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./selectChildren.js */ \"./node_modules/d3-brush/node_modules/d3-selection/src/selection/selectChildren.js\");\n/* harmony import */ var _filter_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./filter.js */ \"./node_modules/d3-brush/node_modules/d3-selection/src/selection/filter.js\");\n/* harmony import */ var _data_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./data.js */ \"./node_modules/d3-brush/node_modules/d3-selection/src/selection/data.js\");\n/* harmony import */ var _enter_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./enter.js */ \"./node_modules/d3-brush/node_modules/d3-selection/src/selection/enter.js\");\n/* harmony import */ var _exit_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./exit.js */ \"./node_modules/d3-brush/node_modules/d3-selection/src/selection/exit.js\");\n/* harmony import */ var _join_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./join.js */ \"./node_modules/d3-brush/node_modules/d3-selection/src/selection/join.js\");\n/* harmony import */ var _merge_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./merge.js */ \"./node_modules/d3-brush/node_modules/d3-selection/src/selection/merge.js\");\n/* harmony import */ var _order_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./order.js */ \"./node_modules/d3-brush/node_modules/d3-selection/src/selection/order.js\");\n/* harmony import */ var _sort_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./sort.js */ \"./node_modules/d3-brush/node_modules/d3-selection/src/selection/sort.js\");\n/* harmony import */ var _call_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./call.js */ \"./node_modules/d3-brush/node_modules/d3-selection/src/selection/call.js\");\n/* harmony import */ var _nodes_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./nodes.js */ \"./node_modules/d3-brush/node_modules/d3-selection/src/selection/nodes.js\");\n/* harmony import */ var _node_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./node.js */ \"./node_modules/d3-brush/node_modules/d3-selection/src/selection/node.js\");\n/* harmony import */ var _size_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./size.js */ \"./node_modules/d3-brush/node_modules/d3-selection/src/selection/size.js\");\n/* harmony import */ var _empty_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./empty.js */ \"./node_modules/d3-brush/node_modules/d3-selection/src/selection/empty.js\");\n/* harmony import */ var _each_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./each.js */ \"./node_modules/d3-brush/node_modules/d3-selection/src/selection/each.js\");\n/* harmony import */ var _attr_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./attr.js */ \"./node_modules/d3-brush/node_modules/d3-selection/src/selection/attr.js\");\n/* harmony import */ var _style_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./style.js */ \"./node_modules/d3-brush/node_modules/d3-selection/src/selection/style.js\");\n/* harmony import */ var _property_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./property.js */ \"./node_modules/d3-brush/node_modules/d3-selection/src/selection/property.js\");\n/* harmony import */ var _classed_js__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./classed.js */ \"./node_modules/d3-brush/node_modules/d3-selection/src/selection/classed.js\");\n/* harmony import */ var _text_js__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./text.js */ \"./node_modules/d3-brush/node_modules/d3-selection/src/selection/text.js\");\n/* harmony import */ var _html_js__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./html.js */ \"./node_modules/d3-brush/node_modules/d3-selection/src/selection/html.js\");\n/* harmony import */ var _raise_js__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ./raise.js */ \"./node_modules/d3-brush/node_modules/d3-selection/src/selection/raise.js\");\n/* harmony import */ var _lower_js__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ./lower.js */ \"./node_modules/d3-brush/node_modules/d3-selection/src/selection/lower.js\");\n/* harmony import */ var _append_js__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ./append.js */ \"./node_modules/d3-brush/node_modules/d3-selection/src/selection/append.js\");\n/* harmony import */ var _insert_js__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ./insert.js */ \"./node_modules/d3-brush/node_modules/d3-selection/src/selection/insert.js\");\n/* harmony import */ var _remove_js__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ./remove.js */ \"./node_modules/d3-brush/node_modules/d3-selection/src/selection/remove.js\");\n/* harmony import */ var _clone_js__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ./clone.js */ \"./node_modules/d3-brush/node_modules/d3-selection/src/selection/clone.js\");\n/* harmony import */ var _datum_js__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ./datum.js */ \"./node_modules/d3-brush/node_modules/d3-selection/src/selection/datum.js\");\n/* harmony import */ var _on_js__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ./on.js */ \"./node_modules/d3-brush/node_modules/d3-selection/src/selection/on.js\");\n/* harmony import */ var _dispatch_js__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ./dispatch.js */ \"./node_modules/d3-brush/node_modules/d3-selection/src/selection/dispatch.js\");\n/* harmony import */ var _iterator_js__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! ./iterator.js */ \"./node_modules/d3-brush/node_modules/d3-selection/src/selection/iterator.js\");\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nvar root = [null];\n\nfunction Selection(groups, parents) {\n  this._groups = groups;\n  this._parents = parents;\n}\n\nfunction selection() {\n  return new Selection([[document.documentElement]], root);\n}\n\nfunction selection_selection() {\n  return this;\n}\n\nSelection.prototype = selection.prototype = {\n  constructor: Selection,\n  select: _select_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"],\n  selectAll: _selectAll_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"],\n  selectChild: _selectChild_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"],\n  selectChildren: _selectChildren_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"],\n  filter: _filter_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"],\n  data: _data_js__WEBPACK_IMPORTED_MODULE_5__[\"default\"],\n  enter: _enter_js__WEBPACK_IMPORTED_MODULE_6__[\"default\"],\n  exit: _exit_js__WEBPACK_IMPORTED_MODULE_7__[\"default\"],\n  join: _join_js__WEBPACK_IMPORTED_MODULE_8__[\"default\"],\n  merge: _merge_js__WEBPACK_IMPORTED_MODULE_9__[\"default\"],\n  selection: selection_selection,\n  order: _order_js__WEBPACK_IMPORTED_MODULE_10__[\"default\"],\n  sort: _sort_js__WEBPACK_IMPORTED_MODULE_11__[\"default\"],\n  call: _call_js__WEBPACK_IMPORTED_MODULE_12__[\"default\"],\n  nodes: _nodes_js__WEBPACK_IMPORTED_MODULE_13__[\"default\"],\n  node: _node_js__WEBPACK_IMPORTED_MODULE_14__[\"default\"],\n  size: _size_js__WEBPACK_IMPORTED_MODULE_15__[\"default\"],\n  empty: _empty_js__WEBPACK_IMPORTED_MODULE_16__[\"default\"],\n  each: _each_js__WEBPACK_IMPORTED_MODULE_17__[\"default\"],\n  attr: _attr_js__WEBPACK_IMPORTED_MODULE_18__[\"default\"],\n  style: _style_js__WEBPACK_IMPORTED_MODULE_19__[\"default\"],\n  property: _property_js__WEBPACK_IMPORTED_MODULE_20__[\"default\"],\n  classed: _classed_js__WEBPACK_IMPORTED_MODULE_21__[\"default\"],\n  text: _text_js__WEBPACK_IMPORTED_MODULE_22__[\"default\"],\n  html: _html_js__WEBPACK_IMPORTED_MODULE_23__[\"default\"],\n  raise: _raise_js__WEBPACK_IMPORTED_MODULE_24__[\"default\"],\n  lower: _lower_js__WEBPACK_IMPORTED_MODULE_25__[\"default\"],\n  append: _append_js__WEBPACK_IMPORTED_MODULE_26__[\"default\"],\n  insert: _insert_js__WEBPACK_IMPORTED_MODULE_27__[\"default\"],\n  remove: _remove_js__WEBPACK_IMPORTED_MODULE_28__[\"default\"],\n  clone: _clone_js__WEBPACK_IMPORTED_MODULE_29__[\"default\"],\n  datum: _datum_js__WEBPACK_IMPORTED_MODULE_30__[\"default\"],\n  on: _on_js__WEBPACK_IMPORTED_MODULE_31__[\"default\"],\n  dispatch: _dispatch_js__WEBPACK_IMPORTED_MODULE_32__[\"default\"],\n  [Symbol.iterator]: _iterator_js__WEBPACK_IMPORTED_MODULE_33__[\"default\"]\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (selection);\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-brush/node_modules/d3-selection/src/selection/insert.js\":\n/*!*********************************************************************************!*\\\n  !*** ./node_modules/d3-brush/node_modules/d3-selection/src/selection/insert.js ***!\n  \\*********************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _creator_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../creator.js */ \"./node_modules/d3-brush/node_modules/d3-selection/src/creator.js\");\n/* harmony import */ var _selector_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../selector.js */ \"./node_modules/d3-brush/node_modules/d3-selection/src/selector.js\");\n\n\n\nfunction constantNull() {\n  return null;\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(name, before) {\n  var create = typeof name === \"function\" ? name : Object(_creator_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(name),\n      select = before == null ? constantNull : typeof before === \"function\" ? before : Object(_selector_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(before);\n  return this.select(function() {\n    return this.insertBefore(create.apply(this, arguments), select.apply(this, arguments) || null);\n  });\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-brush/node_modules/d3-selection/src/selection/iterator.js\":\n/*!***********************************************************************************!*\\\n  !*** ./node_modules/d3-brush/node_modules/d3-selection/src/selection/iterator.js ***!\n  \\***********************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function*() {\n  for (var groups = this._groups, j = 0, m = groups.length; j < m; ++j) {\n    for (var group = groups[j], i = 0, n = group.length, node; i < n; ++i) {\n      if (node = group[i]) yield node;\n    }\n  }\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-brush/node_modules/d3-selection/src/selection/join.js\":\n/*!*******************************************************************************!*\\\n  !*** ./node_modules/d3-brush/node_modules/d3-selection/src/selection/join.js ***!\n  \\*******************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(onenter, onupdate, onexit) {\n  var enter = this.enter(), update = this, exit = this.exit();\n  if (typeof onenter === \"function\") {\n    enter = onenter(enter);\n    if (enter) enter = enter.selection();\n  } else {\n    enter = enter.append(onenter + \"\");\n  }\n  if (onupdate != null) {\n    update = onupdate(update);\n    if (update) update = update.selection();\n  }\n  if (onexit == null) exit.remove(); else onexit(exit);\n  return enter && update ? enter.merge(update).order() : update;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-brush/node_modules/d3-selection/src/selection/lower.js\":\n/*!********************************************************************************!*\\\n  !*** ./node_modules/d3-brush/node_modules/d3-selection/src/selection/lower.js ***!\n  \\********************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\nfunction lower() {\n  if (this.previousSibling) this.parentNode.insertBefore(this, this.parentNode.firstChild);\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  return this.each(lower);\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-brush/node_modules/d3-selection/src/selection/merge.js\":\n/*!********************************************************************************!*\\\n  !*** ./node_modules/d3-brush/node_modules/d3-selection/src/selection/merge.js ***!\n  \\********************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./index.js */ \"./node_modules/d3-brush/node_modules/d3-selection/src/selection/index.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(context) {\n  var selection = context.selection ? context.selection() : context;\n\n  for (var groups0 = this._groups, groups1 = selection._groups, m0 = groups0.length, m1 = groups1.length, m = Math.min(m0, m1), merges = new Array(m0), j = 0; j < m; ++j) {\n    for (var group0 = groups0[j], group1 = groups1[j], n = group0.length, merge = merges[j] = new Array(n), node, i = 0; i < n; ++i) {\n      if (node = group0[i] || group1[i]) {\n        merge[i] = node;\n      }\n    }\n  }\n\n  for (; j < m0; ++j) {\n    merges[j] = groups0[j];\n  }\n\n  return new _index_js__WEBPACK_IMPORTED_MODULE_0__[\"Selection\"](merges, this._parents);\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-brush/node_modules/d3-selection/src/selection/node.js\":\n/*!*******************************************************************************!*\\\n  !*** ./node_modules/d3-brush/node_modules/d3-selection/src/selection/node.js ***!\n  \\*******************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n\n  for (var groups = this._groups, j = 0, m = groups.length; j < m; ++j) {\n    for (var group = groups[j], i = 0, n = group.length; i < n; ++i) {\n      var node = group[i];\n      if (node) return node;\n    }\n  }\n\n  return null;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-brush/node_modules/d3-selection/src/selection/nodes.js\":\n/*!********************************************************************************!*\\\n  !*** ./node_modules/d3-brush/node_modules/d3-selection/src/selection/nodes.js ***!\n  \\********************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  return Array.from(this);\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-brush/node_modules/d3-selection/src/selection/on.js\":\n/*!*****************************************************************************!*\\\n  !*** ./node_modules/d3-brush/node_modules/d3-selection/src/selection/on.js ***!\n  \\*****************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\nfunction contextListener(listener) {\n  return function(event) {\n    listener.call(this, event, this.__data__);\n  };\n}\n\nfunction parseTypenames(typenames) {\n  return typenames.trim().split(/^|\\s+/).map(function(t) {\n    var name = \"\", i = t.indexOf(\".\");\n    if (i >= 0) name = t.slice(i + 1), t = t.slice(0, i);\n    return {type: t, name: name};\n  });\n}\n\nfunction onRemove(typename) {\n  return function() {\n    var on = this.__on;\n    if (!on) return;\n    for (var j = 0, i = -1, m = on.length, o; j < m; ++j) {\n      if (o = on[j], (!typename.type || o.type === typename.type) && o.name === typename.name) {\n        this.removeEventListener(o.type, o.listener, o.options);\n      } else {\n        on[++i] = o;\n      }\n    }\n    if (++i) on.length = i;\n    else delete this.__on;\n  };\n}\n\nfunction onAdd(typename, value, options) {\n  return function() {\n    var on = this.__on, o, listener = contextListener(value);\n    if (on) for (var j = 0, m = on.length; j < m; ++j) {\n      if ((o = on[j]).type === typename.type && o.name === typename.name) {\n        this.removeEventListener(o.type, o.listener, o.options);\n        this.addEventListener(o.type, o.listener = listener, o.options = options);\n        o.value = value;\n        return;\n      }\n    }\n    this.addEventListener(typename.type, listener, options);\n    o = {type: typename.type, name: typename.name, value: value, listener: listener, options: options};\n    if (!on) this.__on = [o];\n    else on.push(o);\n  };\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(typename, value, options) {\n  var typenames = parseTypenames(typename + \"\"), i, n = typenames.length, t;\n\n  if (arguments.length < 2) {\n    var on = this.node().__on;\n    if (on) for (var j = 0, m = on.length, o; j < m; ++j) {\n      for (i = 0, o = on[j]; i < n; ++i) {\n        if ((t = typenames[i]).type === o.type && t.name === o.name) {\n          return o.value;\n        }\n      }\n    }\n    return;\n  }\n\n  on = value ? onAdd : onRemove;\n  for (i = 0; i < n; ++i) this.each(on(typenames[i], value, options));\n  return this;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-brush/node_modules/d3-selection/src/selection/order.js\":\n/*!********************************************************************************!*\\\n  !*** ./node_modules/d3-brush/node_modules/d3-selection/src/selection/order.js ***!\n  \\********************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n\n  for (var groups = this._groups, j = -1, m = groups.length; ++j < m;) {\n    for (var group = groups[j], i = group.length - 1, next = group[i], node; --i >= 0;) {\n      if (node = group[i]) {\n        if (next && node.compareDocumentPosition(next) ^ 4) next.parentNode.insertBefore(node, next);\n        next = node;\n      }\n    }\n  }\n\n  return this;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-brush/node_modules/d3-selection/src/selection/property.js\":\n/*!***********************************************************************************!*\\\n  !*** ./node_modules/d3-brush/node_modules/d3-selection/src/selection/property.js ***!\n  \\***********************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\nfunction propertyRemove(name) {\n  return function() {\n    delete this[name];\n  };\n}\n\nfunction propertyConstant(name, value) {\n  return function() {\n    this[name] = value;\n  };\n}\n\nfunction propertyFunction(name, value) {\n  return function() {\n    var v = value.apply(this, arguments);\n    if (v == null) delete this[name];\n    else this[name] = v;\n  };\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(name, value) {\n  return arguments.length > 1\n      ? this.each((value == null\n          ? propertyRemove : typeof value === \"function\"\n          ? propertyFunction\n          : propertyConstant)(name, value))\n      : this.node()[name];\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-brush/node_modules/d3-selection/src/selection/raise.js\":\n/*!********************************************************************************!*\\\n  !*** ./node_modules/d3-brush/node_modules/d3-selection/src/selection/raise.js ***!\n  \\********************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\nfunction raise() {\n  if (this.nextSibling) this.parentNode.appendChild(this);\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  return this.each(raise);\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-brush/node_modules/d3-selection/src/selection/remove.js\":\n/*!*********************************************************************************!*\\\n  !*** ./node_modules/d3-brush/node_modules/d3-selection/src/selection/remove.js ***!\n  \\*********************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\nfunction remove() {\n  var parent = this.parentNode;\n  if (parent) parent.removeChild(this);\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  return this.each(remove);\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-brush/node_modules/d3-selection/src/selection/select.js\":\n/*!*********************************************************************************!*\\\n  !*** ./node_modules/d3-brush/node_modules/d3-selection/src/selection/select.js ***!\n  \\*********************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./index.js */ \"./node_modules/d3-brush/node_modules/d3-selection/src/selection/index.js\");\n/* harmony import */ var _selector_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../selector.js */ \"./node_modules/d3-brush/node_modules/d3-selection/src/selector.js\");\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(select) {\n  if (typeof select !== \"function\") select = Object(_selector_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(select);\n\n  for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {\n    for (var group = groups[j], n = group.length, subgroup = subgroups[j] = new Array(n), node, subnode, i = 0; i < n; ++i) {\n      if ((node = group[i]) && (subnode = select.call(node, node.__data__, i, group))) {\n        if (\"__data__\" in node) subnode.__data__ = node.__data__;\n        subgroup[i] = subnode;\n      }\n    }\n  }\n\n  return new _index_js__WEBPACK_IMPORTED_MODULE_0__[\"Selection\"](subgroups, this._parents);\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-brush/node_modules/d3-selection/src/selection/selectAll.js\":\n/*!************************************************************************************!*\\\n  !*** ./node_modules/d3-brush/node_modules/d3-selection/src/selection/selectAll.js ***!\n  \\************************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./index.js */ \"./node_modules/d3-brush/node_modules/d3-selection/src/selection/index.js\");\n/* harmony import */ var _array_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../array.js */ \"./node_modules/d3-brush/node_modules/d3-selection/src/array.js\");\n/* harmony import */ var _selectorAll_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../selectorAll.js */ \"./node_modules/d3-brush/node_modules/d3-selection/src/selectorAll.js\");\n\n\n\n\nfunction arrayAll(select) {\n  return function() {\n    return Object(_array_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(select.apply(this, arguments));\n  };\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(select) {\n  if (typeof select === \"function\") select = arrayAll(select);\n  else select = Object(_selectorAll_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(select);\n\n  for (var groups = this._groups, m = groups.length, subgroups = [], parents = [], j = 0; j < m; ++j) {\n    for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) {\n      if (node = group[i]) {\n        subgroups.push(select.call(node, node.__data__, i, group));\n        parents.push(node);\n      }\n    }\n  }\n\n  return new _index_js__WEBPACK_IMPORTED_MODULE_0__[\"Selection\"](subgroups, parents);\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-brush/node_modules/d3-selection/src/selection/selectChild.js\":\n/*!**************************************************************************************!*\\\n  !*** ./node_modules/d3-brush/node_modules/d3-selection/src/selection/selectChild.js ***!\n  \\**************************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _matcher_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../matcher.js */ \"./node_modules/d3-brush/node_modules/d3-selection/src/matcher.js\");\n\n\nvar find = Array.prototype.find;\n\nfunction childFind(match) {\n  return function() {\n    return find.call(this.children, match);\n  };\n}\n\nfunction childFirst() {\n  return this.firstElementChild;\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(match) {\n  return this.select(match == null ? childFirst\n      : childFind(typeof match === \"function\" ? match : Object(_matcher_js__WEBPACK_IMPORTED_MODULE_0__[\"childMatcher\"])(match)));\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-brush/node_modules/d3-selection/src/selection/selectChildren.js\":\n/*!*****************************************************************************************!*\\\n  !*** ./node_modules/d3-brush/node_modules/d3-selection/src/selection/selectChildren.js ***!\n  \\*****************************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _matcher_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../matcher.js */ \"./node_modules/d3-brush/node_modules/d3-selection/src/matcher.js\");\n\n\nvar filter = Array.prototype.filter;\n\nfunction children() {\n  return Array.from(this.children);\n}\n\nfunction childrenFilter(match) {\n  return function() {\n    return filter.call(this.children, match);\n  };\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(match) {\n  return this.selectAll(match == null ? children\n      : childrenFilter(typeof match === \"function\" ? match : Object(_matcher_js__WEBPACK_IMPORTED_MODULE_0__[\"childMatcher\"])(match)));\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-brush/node_modules/d3-selection/src/selection/size.js\":\n/*!*******************************************************************************!*\\\n  !*** ./node_modules/d3-brush/node_modules/d3-selection/src/selection/size.js ***!\n  \\*******************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  let size = 0;\n  for (const node of this) ++size; // eslint-disable-line no-unused-vars\n  return size;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-brush/node_modules/d3-selection/src/selection/sort.js\":\n/*!*******************************************************************************!*\\\n  !*** ./node_modules/d3-brush/node_modules/d3-selection/src/selection/sort.js ***!\n  \\*******************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./index.js */ \"./node_modules/d3-brush/node_modules/d3-selection/src/selection/index.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(compare) {\n  if (!compare) compare = ascending;\n\n  function compareNode(a, b) {\n    return a && b ? compare(a.__data__, b.__data__) : !a - !b;\n  }\n\n  for (var groups = this._groups, m = groups.length, sortgroups = new Array(m), j = 0; j < m; ++j) {\n    for (var group = groups[j], n = group.length, sortgroup = sortgroups[j] = new Array(n), node, i = 0; i < n; ++i) {\n      if (node = group[i]) {\n        sortgroup[i] = node;\n      }\n    }\n    sortgroup.sort(compareNode);\n  }\n\n  return new _index_js__WEBPACK_IMPORTED_MODULE_0__[\"Selection\"](sortgroups, this._parents).order();\n});\n\nfunction ascending(a, b) {\n  return a < b ? -1 : a > b ? 1 : a >= b ? 0 : NaN;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-brush/node_modules/d3-selection/src/selection/sparse.js\":\n/*!*********************************************************************************!*\\\n  !*** ./node_modules/d3-brush/node_modules/d3-selection/src/selection/sparse.js ***!\n  \\*********************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(update) {\n  return new Array(update.length);\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-brush/node_modules/d3-selection/src/selection/style.js\":\n/*!********************************************************************************!*\\\n  !*** ./node_modules/d3-brush/node_modules/d3-selection/src/selection/style.js ***!\n  \\********************************************************************************/\n/*! exports provided: default, styleValue */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"styleValue\", function() { return styleValue; });\n/* harmony import */ var _window_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../window.js */ \"./node_modules/d3-brush/node_modules/d3-selection/src/window.js\");\n\n\nfunction styleRemove(name) {\n  return function() {\n    this.style.removeProperty(name);\n  };\n}\n\nfunction styleConstant(name, value, priority) {\n  return function() {\n    this.style.setProperty(name, value, priority);\n  };\n}\n\nfunction styleFunction(name, value, priority) {\n  return function() {\n    var v = value.apply(this, arguments);\n    if (v == null) this.style.removeProperty(name);\n    else this.style.setProperty(name, v, priority);\n  };\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(name, value, priority) {\n  return arguments.length > 1\n      ? this.each((value == null\n            ? styleRemove : typeof value === \"function\"\n            ? styleFunction\n            : styleConstant)(name, value, priority == null ? \"\" : priority))\n      : styleValue(this.node(), name);\n});\n\nfunction styleValue(node, name) {\n  return node.style.getPropertyValue(name)\n      || Object(_window_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(node).getComputedStyle(node, null).getPropertyValue(name);\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-brush/node_modules/d3-selection/src/selection/text.js\":\n/*!*******************************************************************************!*\\\n  !*** ./node_modules/d3-brush/node_modules/d3-selection/src/selection/text.js ***!\n  \\*******************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\nfunction textRemove() {\n  this.textContent = \"\";\n}\n\nfunction textConstant(value) {\n  return function() {\n    this.textContent = value;\n  };\n}\n\nfunction textFunction(value) {\n  return function() {\n    var v = value.apply(this, arguments);\n    this.textContent = v == null ? \"\" : v;\n  };\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(value) {\n  return arguments.length\n      ? this.each(value == null\n          ? textRemove : (typeof value === \"function\"\n          ? textFunction\n          : textConstant)(value))\n      : this.node().textContent;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-brush/node_modules/d3-selection/src/selector.js\":\n/*!*************************************************************************!*\\\n  !*** ./node_modules/d3-brush/node_modules/d3-selection/src/selector.js ***!\n  \\*************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\nfunction none() {}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(selector) {\n  return selector == null ? none : function() {\n    return this.querySelector(selector);\n  };\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-brush/node_modules/d3-selection/src/selectorAll.js\":\n/*!****************************************************************************!*\\\n  !*** ./node_modules/d3-brush/node_modules/d3-selection/src/selectorAll.js ***!\n  \\****************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\nfunction empty() {\n  return [];\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(selector) {\n  return selector == null ? empty : function() {\n    return this.querySelectorAll(selector);\n  };\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-brush/node_modules/d3-selection/src/sourceEvent.js\":\n/*!****************************************************************************!*\\\n  !*** ./node_modules/d3-brush/node_modules/d3-selection/src/sourceEvent.js ***!\n  \\****************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(event) {\n  let sourceEvent;\n  while (sourceEvent = event.sourceEvent) event = sourceEvent;\n  return event;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-brush/node_modules/d3-selection/src/window.js\":\n/*!***********************************************************************!*\\\n  !*** ./node_modules/d3-brush/node_modules/d3-selection/src/window.js ***!\n  \\***********************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(node) {\n  return (node.ownerDocument && node.ownerDocument.defaultView) // node is a Node\n      || (node.document && node) // node is a Window\n      || node.defaultView; // node is a Document\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-brush/node_modules/d3-timer/src/index.js\":\n/*!******************************************************************!*\\\n  !*** ./node_modules/d3-brush/node_modules/d3-timer/src/index.js ***!\n  \\******************************************************************/\n/*! exports provided: now, timer, timerFlush, timeout, interval */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _timer_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./timer.js */ \"./node_modules/d3-brush/node_modules/d3-timer/src/timer.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"now\", function() { return _timer_js__WEBPACK_IMPORTED_MODULE_0__[\"now\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timer\", function() { return _timer_js__WEBPACK_IMPORTED_MODULE_0__[\"timer\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timerFlush\", function() { return _timer_js__WEBPACK_IMPORTED_MODULE_0__[\"timerFlush\"]; });\n\n/* harmony import */ var _timeout_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./timeout.js */ \"./node_modules/d3-brush/node_modules/d3-timer/src/timeout.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeout\", function() { return _timeout_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"]; });\n\n/* harmony import */ var _interval_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./interval.js */ \"./node_modules/d3-brush/node_modules/d3-timer/src/interval.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interval\", function() { return _interval_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"]; });\n\n\n\n\n\n\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-brush/node_modules/d3-timer/src/interval.js\":\n/*!*********************************************************************!*\\\n  !*** ./node_modules/d3-brush/node_modules/d3-timer/src/interval.js ***!\n  \\*********************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _timer_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./timer.js */ \"./node_modules/d3-brush/node_modules/d3-timer/src/timer.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(callback, delay, time) {\n  var t = new _timer_js__WEBPACK_IMPORTED_MODULE_0__[\"Timer\"], total = delay;\n  if (delay == null) return t.restart(callback, delay, time), t;\n  t._restart = t.restart;\n  t.restart = function(callback, delay, time) {\n    delay = +delay, time = time == null ? Object(_timer_js__WEBPACK_IMPORTED_MODULE_0__[\"now\"])() : +time;\n    t._restart(function tick(elapsed) {\n      elapsed += total;\n      t._restart(tick, total += delay, time);\n      callback(elapsed);\n    }, delay, time);\n  }\n  t.restart(callback, delay, time);\n  return t;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-brush/node_modules/d3-timer/src/timeout.js\":\n/*!********************************************************************!*\\\n  !*** ./node_modules/d3-brush/node_modules/d3-timer/src/timeout.js ***!\n  \\********************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _timer_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./timer.js */ \"./node_modules/d3-brush/node_modules/d3-timer/src/timer.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(callback, delay, time) {\n  var t = new _timer_js__WEBPACK_IMPORTED_MODULE_0__[\"Timer\"];\n  delay = delay == null ? 0 : +delay;\n  t.restart(elapsed => {\n    t.stop();\n    callback(elapsed + delay);\n  }, delay, time);\n  return t;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-brush/node_modules/d3-timer/src/timer.js\":\n/*!******************************************************************!*\\\n  !*** ./node_modules/d3-brush/node_modules/d3-timer/src/timer.js ***!\n  \\******************************************************************/\n/*! exports provided: now, Timer, timer, timerFlush */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"now\", function() { return now; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Timer\", function() { return Timer; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"timer\", function() { return timer; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"timerFlush\", function() { return timerFlush; });\nvar frame = 0, // is an animation frame pending?\n    timeout = 0, // is a timeout pending?\n    interval = 0, // are any timers active?\n    pokeDelay = 1000, // how frequently we check for clock skew\n    taskHead,\n    taskTail,\n    clockLast = 0,\n    clockNow = 0,\n    clockSkew = 0,\n    clock = typeof performance === \"object\" && performance.now ? performance : Date,\n    setFrame = typeof window === \"object\" && window.requestAnimationFrame ? window.requestAnimationFrame.bind(window) : function(f) { setTimeout(f, 17); };\n\nfunction now() {\n  return clockNow || (setFrame(clearNow), clockNow = clock.now() + clockSkew);\n}\n\nfunction clearNow() {\n  clockNow = 0;\n}\n\nfunction Timer() {\n  this._call =\n  this._time =\n  this._next = null;\n}\n\nTimer.prototype = timer.prototype = {\n  constructor: Timer,\n  restart: function(callback, delay, time) {\n    if (typeof callback !== \"function\") throw new TypeError(\"callback is not a function\");\n    time = (time == null ? now() : +time) + (delay == null ? 0 : +delay);\n    if (!this._next && taskTail !== this) {\n      if (taskTail) taskTail._next = this;\n      else taskHead = this;\n      taskTail = this;\n    }\n    this._call = callback;\n    this._time = time;\n    sleep();\n  },\n  stop: function() {\n    if (this._call) {\n      this._call = null;\n      this._time = Infinity;\n      sleep();\n    }\n  }\n};\n\nfunction timer(callback, delay, time) {\n  var t = new Timer;\n  t.restart(callback, delay, time);\n  return t;\n}\n\nfunction timerFlush() {\n  now(); // Get the current time, if not already set.\n  ++frame; // Pretend we’ve set an alarm, if we haven’t already.\n  var t = taskHead, e;\n  while (t) {\n    if ((e = clockNow - t._time) >= 0) t._call.call(undefined, e);\n    t = t._next;\n  }\n  --frame;\n}\n\nfunction wake() {\n  clockNow = (clockLast = clock.now()) + clockSkew;\n  frame = timeout = 0;\n  try {\n    timerFlush();\n  } finally {\n    frame = 0;\n    nap();\n    clockNow = 0;\n  }\n}\n\nfunction poke() {\n  var now = clock.now(), delay = now - clockLast;\n  if (delay > pokeDelay) clockSkew -= delay, clockLast = now;\n}\n\nfunction nap() {\n  var t0, t1 = taskHead, t2, time = Infinity;\n  while (t1) {\n    if (t1._call) {\n      if (time > t1._time) time = t1._time;\n      t0 = t1, t1 = t1._next;\n    } else {\n      t2 = t1._next, t1._next = null;\n      t1 = t0 ? t0._next = t2 : taskHead = t2;\n    }\n  }\n  taskTail = t0;\n  sleep(time);\n}\n\nfunction sleep(time) {\n  if (frame) return; // Soonest alarm already set, or will be.\n  if (timeout) timeout = clearTimeout(timeout);\n  var delay = time - clockNow; // Strictly less than if we recomputed clockNow.\n  if (delay > 24) {\n    if (time < Infinity) timeout = setTimeout(wake, time - clock.now() - clockSkew);\n    if (interval) interval = clearInterval(interval);\n  } else {\n    if (!interval) clockLast = clock.now(), interval = setInterval(poke, pokeDelay);\n    frame = 1, setFrame(wake);\n  }\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-brush/node_modules/d3-transition/src/active.js\":\n/*!************************************************************************!*\\\n  !*** ./node_modules/d3-brush/node_modules/d3-transition/src/active.js ***!\n  \\************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _transition_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./transition/index.js */ \"./node_modules/d3-brush/node_modules/d3-transition/src/transition/index.js\");\n/* harmony import */ var _transition_schedule_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./transition/schedule.js */ \"./node_modules/d3-brush/node_modules/d3-transition/src/transition/schedule.js\");\n\n\n\nvar root = [null];\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(node, name) {\n  var schedules = node.__transition,\n      schedule,\n      i;\n\n  if (schedules) {\n    name = name == null ? null : name + \"\";\n    for (i in schedules) {\n      if ((schedule = schedules[i]).state > _transition_schedule_js__WEBPACK_IMPORTED_MODULE_1__[\"SCHEDULED\"] && schedule.name === name) {\n        return new _transition_index_js__WEBPACK_IMPORTED_MODULE_0__[\"Transition\"]([[node]], root, name, +i);\n      }\n    }\n  }\n\n  return null;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-brush/node_modules/d3-transition/src/index.js\":\n/*!***********************************************************************!*\\\n  !*** ./node_modules/d3-brush/node_modules/d3-transition/src/index.js ***!\n  \\***********************************************************************/\n/*! exports provided: transition, active, interrupt */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _selection_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./selection/index.js */ \"./node_modules/d3-brush/node_modules/d3-transition/src/selection/index.js\");\n/* harmony import */ var _transition_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./transition/index.js */ \"./node_modules/d3-brush/node_modules/d3-transition/src/transition/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"transition\", function() { return _transition_index_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"]; });\n\n/* harmony import */ var _active_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./active.js */ \"./node_modules/d3-brush/node_modules/d3-transition/src/active.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"active\", function() { return _active_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"]; });\n\n/* harmony import */ var _interrupt_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./interrupt.js */ \"./node_modules/d3-brush/node_modules/d3-transition/src/interrupt.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interrupt\", function() { return _interrupt_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"]; });\n\n\n\n\n\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-brush/node_modules/d3-transition/src/interrupt.js\":\n/*!***************************************************************************!*\\\n  !*** ./node_modules/d3-brush/node_modules/d3-transition/src/interrupt.js ***!\n  \\***************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _transition_schedule_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./transition/schedule.js */ \"./node_modules/d3-brush/node_modules/d3-transition/src/transition/schedule.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(node, name) {\n  var schedules = node.__transition,\n      schedule,\n      active,\n      empty = true,\n      i;\n\n  if (!schedules) return;\n\n  name = name == null ? null : name + \"\";\n\n  for (i in schedules) {\n    if ((schedule = schedules[i]).name !== name) { empty = false; continue; }\n    active = schedule.state > _transition_schedule_js__WEBPACK_IMPORTED_MODULE_0__[\"STARTING\"] && schedule.state < _transition_schedule_js__WEBPACK_IMPORTED_MODULE_0__[\"ENDING\"];\n    schedule.state = _transition_schedule_js__WEBPACK_IMPORTED_MODULE_0__[\"ENDED\"];\n    schedule.timer.stop();\n    schedule.on.call(active ? \"interrupt\" : \"cancel\", node, node.__data__, schedule.index, schedule.group);\n    delete schedules[i];\n  }\n\n  if (empty) delete node.__transition;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-brush/node_modules/d3-transition/src/selection/index.js\":\n/*!*********************************************************************************!*\\\n  !*** ./node_modules/d3-brush/node_modules/d3-transition/src/selection/index.js ***!\n  \\*********************************************************************************/\n/*! no exports provided */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var d3_selection__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-selection */ \"./node_modules/d3-brush/node_modules/d3-selection/src/index.js\");\n/* harmony import */ var _interrupt_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./interrupt.js */ \"./node_modules/d3-brush/node_modules/d3-transition/src/selection/interrupt.js\");\n/* harmony import */ var _transition_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./transition.js */ \"./node_modules/d3-brush/node_modules/d3-transition/src/selection/transition.js\");\n\n\n\n\nd3_selection__WEBPACK_IMPORTED_MODULE_0__[\"selection\"].prototype.interrupt = _interrupt_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"];\nd3_selection__WEBPACK_IMPORTED_MODULE_0__[\"selection\"].prototype.transition = _transition_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"];\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-brush/node_modules/d3-transition/src/selection/interrupt.js\":\n/*!*************************************************************************************!*\\\n  !*** ./node_modules/d3-brush/node_modules/d3-transition/src/selection/interrupt.js ***!\n  \\*************************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _interrupt_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../interrupt.js */ \"./node_modules/d3-brush/node_modules/d3-transition/src/interrupt.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(name) {\n  return this.each(function() {\n    Object(_interrupt_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(this, name);\n  });\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-brush/node_modules/d3-transition/src/selection/transition.js\":\n/*!**************************************************************************************!*\\\n  !*** ./node_modules/d3-brush/node_modules/d3-transition/src/selection/transition.js ***!\n  \\**************************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _transition_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../transition/index.js */ \"./node_modules/d3-brush/node_modules/d3-transition/src/transition/index.js\");\n/* harmony import */ var _transition_schedule_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../transition/schedule.js */ \"./node_modules/d3-brush/node_modules/d3-transition/src/transition/schedule.js\");\n/* harmony import */ var d3_ease__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! d3-ease */ \"./node_modules/d3-brush/node_modules/d3-ease/src/index.js\");\n/* harmony import */ var d3_timer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! d3-timer */ \"./node_modules/d3-brush/node_modules/d3-timer/src/index.js\");\n\n\n\n\n\nvar defaultTiming = {\n  time: null, // Set on use.\n  delay: 0,\n  duration: 250,\n  ease: d3_ease__WEBPACK_IMPORTED_MODULE_2__[\"easeCubicInOut\"]\n};\n\nfunction inherit(node, id) {\n  var timing;\n  while (!(timing = node.__transition) || !(timing = timing[id])) {\n    if (!(node = node.parentNode)) {\n      throw new Error(`transition ${id} not found`);\n    }\n  }\n  return timing;\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(name) {\n  var id,\n      timing;\n\n  if (name instanceof _transition_index_js__WEBPACK_IMPORTED_MODULE_0__[\"Transition\"]) {\n    id = name._id, name = name._name;\n  } else {\n    id = Object(_transition_index_js__WEBPACK_IMPORTED_MODULE_0__[\"newId\"])(), (timing = defaultTiming).time = Object(d3_timer__WEBPACK_IMPORTED_MODULE_3__[\"now\"])(), name = name == null ? null : name + \"\";\n  }\n\n  for (var groups = this._groups, m = groups.length, j = 0; j < m; ++j) {\n    for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) {\n      if (node = group[i]) {\n        Object(_transition_schedule_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(node, name, id, i, group, timing || inherit(node, id));\n      }\n    }\n  }\n\n  return new _transition_index_js__WEBPACK_IMPORTED_MODULE_0__[\"Transition\"](groups, this._parents, name, id);\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-brush/node_modules/d3-transition/src/transition/attr.js\":\n/*!*********************************************************************************!*\\\n  !*** ./node_modules/d3-brush/node_modules/d3-transition/src/transition/attr.js ***!\n  \\*********************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var d3_interpolate__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-interpolate */ \"./node_modules/d3-brush/node_modules/d3-interpolate/src/index.js\");\n/* harmony import */ var d3_selection__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! d3-selection */ \"./node_modules/d3-brush/node_modules/d3-selection/src/index.js\");\n/* harmony import */ var _tween_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./tween.js */ \"./node_modules/d3-brush/node_modules/d3-transition/src/transition/tween.js\");\n/* harmony import */ var _interpolate_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./interpolate.js */ \"./node_modules/d3-brush/node_modules/d3-transition/src/transition/interpolate.js\");\n\n\n\n\n\nfunction attrRemove(name) {\n  return function() {\n    this.removeAttribute(name);\n  };\n}\n\nfunction attrRemoveNS(fullname) {\n  return function() {\n    this.removeAttributeNS(fullname.space, fullname.local);\n  };\n}\n\nfunction attrConstant(name, interpolate, value1) {\n  var string00,\n      string1 = value1 + \"\",\n      interpolate0;\n  return function() {\n    var string0 = this.getAttribute(name);\n    return string0 === string1 ? null\n        : string0 === string00 ? interpolate0\n        : interpolate0 = interpolate(string00 = string0, value1);\n  };\n}\n\nfunction attrConstantNS(fullname, interpolate, value1) {\n  var string00,\n      string1 = value1 + \"\",\n      interpolate0;\n  return function() {\n    var string0 = this.getAttributeNS(fullname.space, fullname.local);\n    return string0 === string1 ? null\n        : string0 === string00 ? interpolate0\n        : interpolate0 = interpolate(string00 = string0, value1);\n  };\n}\n\nfunction attrFunction(name, interpolate, value) {\n  var string00,\n      string10,\n      interpolate0;\n  return function() {\n    var string0, value1 = value(this), string1;\n    if (value1 == null) return void this.removeAttribute(name);\n    string0 = this.getAttribute(name);\n    string1 = value1 + \"\";\n    return string0 === string1 ? null\n        : string0 === string00 && string1 === string10 ? interpolate0\n        : (string10 = string1, interpolate0 = interpolate(string00 = string0, value1));\n  };\n}\n\nfunction attrFunctionNS(fullname, interpolate, value) {\n  var string00,\n      string10,\n      interpolate0;\n  return function() {\n    var string0, value1 = value(this), string1;\n    if (value1 == null) return void this.removeAttributeNS(fullname.space, fullname.local);\n    string0 = this.getAttributeNS(fullname.space, fullname.local);\n    string1 = value1 + \"\";\n    return string0 === string1 ? null\n        : string0 === string00 && string1 === string10 ? interpolate0\n        : (string10 = string1, interpolate0 = interpolate(string00 = string0, value1));\n  };\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(name, value) {\n  var fullname = Object(d3_selection__WEBPACK_IMPORTED_MODULE_1__[\"namespace\"])(name), i = fullname === \"transform\" ? d3_interpolate__WEBPACK_IMPORTED_MODULE_0__[\"interpolateTransformSvg\"] : _interpolate_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"];\n  return this.attrTween(name, typeof value === \"function\"\n      ? (fullname.local ? attrFunctionNS : attrFunction)(fullname, i, Object(_tween_js__WEBPACK_IMPORTED_MODULE_2__[\"tweenValue\"])(this, \"attr.\" + name, value))\n      : value == null ? (fullname.local ? attrRemoveNS : attrRemove)(fullname)\n      : (fullname.local ? attrConstantNS : attrConstant)(fullname, i, value));\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-brush/node_modules/d3-transition/src/transition/attrTween.js\":\n/*!**************************************************************************************!*\\\n  !*** ./node_modules/d3-brush/node_modules/d3-transition/src/transition/attrTween.js ***!\n  \\**************************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var d3_selection__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-selection */ \"./node_modules/d3-brush/node_modules/d3-selection/src/index.js\");\n\n\nfunction attrInterpolate(name, i) {\n  return function(t) {\n    this.setAttribute(name, i.call(this, t));\n  };\n}\n\nfunction attrInterpolateNS(fullname, i) {\n  return function(t) {\n    this.setAttributeNS(fullname.space, fullname.local, i.call(this, t));\n  };\n}\n\nfunction attrTweenNS(fullname, value) {\n  var t0, i0;\n  function tween() {\n    var i = value.apply(this, arguments);\n    if (i !== i0) t0 = (i0 = i) && attrInterpolateNS(fullname, i);\n    return t0;\n  }\n  tween._value = value;\n  return tween;\n}\n\nfunction attrTween(name, value) {\n  var t0, i0;\n  function tween() {\n    var i = value.apply(this, arguments);\n    if (i !== i0) t0 = (i0 = i) && attrInterpolate(name, i);\n    return t0;\n  }\n  tween._value = value;\n  return tween;\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(name, value) {\n  var key = \"attr.\" + name;\n  if (arguments.length < 2) return (key = this.tween(key)) && key._value;\n  if (value == null) return this.tween(key, null);\n  if (typeof value !== \"function\") throw new Error;\n  var fullname = Object(d3_selection__WEBPACK_IMPORTED_MODULE_0__[\"namespace\"])(name);\n  return this.tween(key, (fullname.local ? attrTweenNS : attrTween)(fullname, value));\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-brush/node_modules/d3-transition/src/transition/delay.js\":\n/*!**********************************************************************************!*\\\n  !*** ./node_modules/d3-brush/node_modules/d3-transition/src/transition/delay.js ***!\n  \\**********************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _schedule_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./schedule.js */ \"./node_modules/d3-brush/node_modules/d3-transition/src/transition/schedule.js\");\n\n\nfunction delayFunction(id, value) {\n  return function() {\n    Object(_schedule_js__WEBPACK_IMPORTED_MODULE_0__[\"init\"])(this, id).delay = +value.apply(this, arguments);\n  };\n}\n\nfunction delayConstant(id, value) {\n  return value = +value, function() {\n    Object(_schedule_js__WEBPACK_IMPORTED_MODULE_0__[\"init\"])(this, id).delay = value;\n  };\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(value) {\n  var id = this._id;\n\n  return arguments.length\n      ? this.each((typeof value === \"function\"\n          ? delayFunction\n          : delayConstant)(id, value))\n      : Object(_schedule_js__WEBPACK_IMPORTED_MODULE_0__[\"get\"])(this.node(), id).delay;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-brush/node_modules/d3-transition/src/transition/duration.js\":\n/*!*************************************************************************************!*\\\n  !*** ./node_modules/d3-brush/node_modules/d3-transition/src/transition/duration.js ***!\n  \\*************************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _schedule_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./schedule.js */ \"./node_modules/d3-brush/node_modules/d3-transition/src/transition/schedule.js\");\n\n\nfunction durationFunction(id, value) {\n  return function() {\n    Object(_schedule_js__WEBPACK_IMPORTED_MODULE_0__[\"set\"])(this, id).duration = +value.apply(this, arguments);\n  };\n}\n\nfunction durationConstant(id, value) {\n  return value = +value, function() {\n    Object(_schedule_js__WEBPACK_IMPORTED_MODULE_0__[\"set\"])(this, id).duration = value;\n  };\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(value) {\n  var id = this._id;\n\n  return arguments.length\n      ? this.each((typeof value === \"function\"\n          ? durationFunction\n          : durationConstant)(id, value))\n      : Object(_schedule_js__WEBPACK_IMPORTED_MODULE_0__[\"get\"])(this.node(), id).duration;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-brush/node_modules/d3-transition/src/transition/ease.js\":\n/*!*********************************************************************************!*\\\n  !*** ./node_modules/d3-brush/node_modules/d3-transition/src/transition/ease.js ***!\n  \\*********************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _schedule_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./schedule.js */ \"./node_modules/d3-brush/node_modules/d3-transition/src/transition/schedule.js\");\n\n\nfunction easeConstant(id, value) {\n  if (typeof value !== \"function\") throw new Error;\n  return function() {\n    Object(_schedule_js__WEBPACK_IMPORTED_MODULE_0__[\"set\"])(this, id).ease = value;\n  };\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(value) {\n  var id = this._id;\n\n  return arguments.length\n      ? this.each(easeConstant(id, value))\n      : Object(_schedule_js__WEBPACK_IMPORTED_MODULE_0__[\"get\"])(this.node(), id).ease;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-brush/node_modules/d3-transition/src/transition/easeVarying.js\":\n/*!****************************************************************************************!*\\\n  !*** ./node_modules/d3-brush/node_modules/d3-transition/src/transition/easeVarying.js ***!\n  \\****************************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _schedule_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./schedule.js */ \"./node_modules/d3-brush/node_modules/d3-transition/src/transition/schedule.js\");\n\n\nfunction easeVarying(id, value) {\n  return function() {\n    var v = value.apply(this, arguments);\n    if (typeof v !== \"function\") throw new Error;\n    Object(_schedule_js__WEBPACK_IMPORTED_MODULE_0__[\"set\"])(this, id).ease = v;\n  };\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(value) {\n  if (typeof value !== \"function\") throw new Error;\n  return this.each(easeVarying(this._id, value));\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-brush/node_modules/d3-transition/src/transition/end.js\":\n/*!********************************************************************************!*\\\n  !*** ./node_modules/d3-brush/node_modules/d3-transition/src/transition/end.js ***!\n  \\********************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _schedule_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./schedule.js */ \"./node_modules/d3-brush/node_modules/d3-transition/src/transition/schedule.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  var on0, on1, that = this, id = that._id, size = that.size();\n  return new Promise(function(resolve, reject) {\n    var cancel = {value: reject},\n        end = {value: function() { if (--size === 0) resolve(); }};\n\n    that.each(function() {\n      var schedule = Object(_schedule_js__WEBPACK_IMPORTED_MODULE_0__[\"set\"])(this, id),\n          on = schedule.on;\n\n      // If this node shared a dispatch with the previous node,\n      // just assign the updated shared dispatch and we’re done!\n      // Otherwise, copy-on-write.\n      if (on !== on0) {\n        on1 = (on0 = on).copy();\n        on1._.cancel.push(cancel);\n        on1._.interrupt.push(cancel);\n        on1._.end.push(end);\n      }\n\n      schedule.on = on1;\n    });\n\n    // The selection was empty, resolve end immediately\n    if (size === 0) resolve();\n  });\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-brush/node_modules/d3-transition/src/transition/filter.js\":\n/*!***********************************************************************************!*\\\n  !*** ./node_modules/d3-brush/node_modules/d3-transition/src/transition/filter.js ***!\n  \\***********************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var d3_selection__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-selection */ \"./node_modules/d3-brush/node_modules/d3-selection/src/index.js\");\n/* harmony import */ var _index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./index.js */ \"./node_modules/d3-brush/node_modules/d3-transition/src/transition/index.js\");\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(match) {\n  if (typeof match !== \"function\") match = Object(d3_selection__WEBPACK_IMPORTED_MODULE_0__[\"matcher\"])(match);\n\n  for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {\n    for (var group = groups[j], n = group.length, subgroup = subgroups[j] = [], node, i = 0; i < n; ++i) {\n      if ((node = group[i]) && match.call(node, node.__data__, i, group)) {\n        subgroup.push(node);\n      }\n    }\n  }\n\n  return new _index_js__WEBPACK_IMPORTED_MODULE_1__[\"Transition\"](subgroups, this._parents, this._name, this._id);\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-brush/node_modules/d3-transition/src/transition/index.js\":\n/*!**********************************************************************************!*\\\n  !*** ./node_modules/d3-brush/node_modules/d3-transition/src/transition/index.js ***!\n  \\**********************************************************************************/\n/*! exports provided: Transition, default, newId */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Transition\", function() { return Transition; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return transition; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"newId\", function() { return newId; });\n/* harmony import */ var d3_selection__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-selection */ \"./node_modules/d3-brush/node_modules/d3-selection/src/index.js\");\n/* harmony import */ var _attr_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./attr.js */ \"./node_modules/d3-brush/node_modules/d3-transition/src/transition/attr.js\");\n/* harmony import */ var _attrTween_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./attrTween.js */ \"./node_modules/d3-brush/node_modules/d3-transition/src/transition/attrTween.js\");\n/* harmony import */ var _delay_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./delay.js */ \"./node_modules/d3-brush/node_modules/d3-transition/src/transition/delay.js\");\n/* harmony import */ var _duration_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./duration.js */ \"./node_modules/d3-brush/node_modules/d3-transition/src/transition/duration.js\");\n/* harmony import */ var _ease_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./ease.js */ \"./node_modules/d3-brush/node_modules/d3-transition/src/transition/ease.js\");\n/* harmony import */ var _easeVarying_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./easeVarying.js */ \"./node_modules/d3-brush/node_modules/d3-transition/src/transition/easeVarying.js\");\n/* harmony import */ var _filter_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./filter.js */ \"./node_modules/d3-brush/node_modules/d3-transition/src/transition/filter.js\");\n/* harmony import */ var _merge_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./merge.js */ \"./node_modules/d3-brush/node_modules/d3-transition/src/transition/merge.js\");\n/* harmony import */ var _on_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./on.js */ \"./node_modules/d3-brush/node_modules/d3-transition/src/transition/on.js\");\n/* harmony import */ var _remove_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./remove.js */ \"./node_modules/d3-brush/node_modules/d3-transition/src/transition/remove.js\");\n/* harmony import */ var _select_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./select.js */ \"./node_modules/d3-brush/node_modules/d3-transition/src/transition/select.js\");\n/* harmony import */ var _selectAll_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./selectAll.js */ \"./node_modules/d3-brush/node_modules/d3-transition/src/transition/selectAll.js\");\n/* harmony import */ var _selection_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./selection.js */ \"./node_modules/d3-brush/node_modules/d3-transition/src/transition/selection.js\");\n/* harmony import */ var _style_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./style.js */ \"./node_modules/d3-brush/node_modules/d3-transition/src/transition/style.js\");\n/* harmony import */ var _styleTween_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./styleTween.js */ \"./node_modules/d3-brush/node_modules/d3-transition/src/transition/styleTween.js\");\n/* harmony import */ var _text_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./text.js */ \"./node_modules/d3-brush/node_modules/d3-transition/src/transition/text.js\");\n/* harmony import */ var _textTween_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./textTween.js */ \"./node_modules/d3-brush/node_modules/d3-transition/src/transition/textTween.js\");\n/* harmony import */ var _transition_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./transition.js */ \"./node_modules/d3-brush/node_modules/d3-transition/src/transition/transition.js\");\n/* harmony import */ var _tween_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./tween.js */ \"./node_modules/d3-brush/node_modules/d3-transition/src/transition/tween.js\");\n/* harmony import */ var _end_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./end.js */ \"./node_modules/d3-brush/node_modules/d3-transition/src/transition/end.js\");\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nvar id = 0;\n\nfunction Transition(groups, parents, name, id) {\n  this._groups = groups;\n  this._parents = parents;\n  this._name = name;\n  this._id = id;\n}\n\nfunction transition(name) {\n  return Object(d3_selection__WEBPACK_IMPORTED_MODULE_0__[\"selection\"])().transition(name);\n}\n\nfunction newId() {\n  return ++id;\n}\n\nvar selection_prototype = d3_selection__WEBPACK_IMPORTED_MODULE_0__[\"selection\"].prototype;\n\nTransition.prototype = transition.prototype = {\n  constructor: Transition,\n  select: _select_js__WEBPACK_IMPORTED_MODULE_11__[\"default\"],\n  selectAll: _selectAll_js__WEBPACK_IMPORTED_MODULE_12__[\"default\"],\n  selectChild: selection_prototype.selectChild,\n  selectChildren: selection_prototype.selectChildren,\n  filter: _filter_js__WEBPACK_IMPORTED_MODULE_7__[\"default\"],\n  merge: _merge_js__WEBPACK_IMPORTED_MODULE_8__[\"default\"],\n  selection: _selection_js__WEBPACK_IMPORTED_MODULE_13__[\"default\"],\n  transition: _transition_js__WEBPACK_IMPORTED_MODULE_18__[\"default\"],\n  call: selection_prototype.call,\n  nodes: selection_prototype.nodes,\n  node: selection_prototype.node,\n  size: selection_prototype.size,\n  empty: selection_prototype.empty,\n  each: selection_prototype.each,\n  on: _on_js__WEBPACK_IMPORTED_MODULE_9__[\"default\"],\n  attr: _attr_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"],\n  attrTween: _attrTween_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"],\n  style: _style_js__WEBPACK_IMPORTED_MODULE_14__[\"default\"],\n  styleTween: _styleTween_js__WEBPACK_IMPORTED_MODULE_15__[\"default\"],\n  text: _text_js__WEBPACK_IMPORTED_MODULE_16__[\"default\"],\n  textTween: _textTween_js__WEBPACK_IMPORTED_MODULE_17__[\"default\"],\n  remove: _remove_js__WEBPACK_IMPORTED_MODULE_10__[\"default\"],\n  tween: _tween_js__WEBPACK_IMPORTED_MODULE_19__[\"default\"],\n  delay: _delay_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"],\n  duration: _duration_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"],\n  ease: _ease_js__WEBPACK_IMPORTED_MODULE_5__[\"default\"],\n  easeVarying: _easeVarying_js__WEBPACK_IMPORTED_MODULE_6__[\"default\"],\n  end: _end_js__WEBPACK_IMPORTED_MODULE_20__[\"default\"],\n  [Symbol.iterator]: selection_prototype[Symbol.iterator]\n};\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-brush/node_modules/d3-transition/src/transition/interpolate.js\":\n/*!****************************************************************************************!*\\\n  !*** ./node_modules/d3-brush/node_modules/d3-transition/src/transition/interpolate.js ***!\n  \\****************************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var d3_color__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-color */ \"./node_modules/d3-brush/node_modules/d3-color/src/index.js\");\n/* harmony import */ var d3_interpolate__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! d3-interpolate */ \"./node_modules/d3-brush/node_modules/d3-interpolate/src/index.js\");\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(a, b) {\n  var c;\n  return (typeof b === \"number\" ? d3_interpolate__WEBPACK_IMPORTED_MODULE_1__[\"interpolateNumber\"]\n      : b instanceof d3_color__WEBPACK_IMPORTED_MODULE_0__[\"color\"] ? d3_interpolate__WEBPACK_IMPORTED_MODULE_1__[\"interpolateRgb\"]\n      : (c = Object(d3_color__WEBPACK_IMPORTED_MODULE_0__[\"color\"])(b)) ? (b = c, d3_interpolate__WEBPACK_IMPORTED_MODULE_1__[\"interpolateRgb\"])\n      : d3_interpolate__WEBPACK_IMPORTED_MODULE_1__[\"interpolateString\"])(a, b);\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-brush/node_modules/d3-transition/src/transition/merge.js\":\n/*!**********************************************************************************!*\\\n  !*** ./node_modules/d3-brush/node_modules/d3-transition/src/transition/merge.js ***!\n  \\**********************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./index.js */ \"./node_modules/d3-brush/node_modules/d3-transition/src/transition/index.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(transition) {\n  if (transition._id !== this._id) throw new Error;\n\n  for (var groups0 = this._groups, groups1 = transition._groups, m0 = groups0.length, m1 = groups1.length, m = Math.min(m0, m1), merges = new Array(m0), j = 0; j < m; ++j) {\n    for (var group0 = groups0[j], group1 = groups1[j], n = group0.length, merge = merges[j] = new Array(n), node, i = 0; i < n; ++i) {\n      if (node = group0[i] || group1[i]) {\n        merge[i] = node;\n      }\n    }\n  }\n\n  for (; j < m0; ++j) {\n    merges[j] = groups0[j];\n  }\n\n  return new _index_js__WEBPACK_IMPORTED_MODULE_0__[\"Transition\"](merges, this._parents, this._name, this._id);\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-brush/node_modules/d3-transition/src/transition/on.js\":\n/*!*******************************************************************************!*\\\n  !*** ./node_modules/d3-brush/node_modules/d3-transition/src/transition/on.js ***!\n  \\*******************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _schedule_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./schedule.js */ \"./node_modules/d3-brush/node_modules/d3-transition/src/transition/schedule.js\");\n\n\nfunction start(name) {\n  return (name + \"\").trim().split(/^|\\s+/).every(function(t) {\n    var i = t.indexOf(\".\");\n    if (i >= 0) t = t.slice(0, i);\n    return !t || t === \"start\";\n  });\n}\n\nfunction onFunction(id, name, listener) {\n  var on0, on1, sit = start(name) ? _schedule_js__WEBPACK_IMPORTED_MODULE_0__[\"init\"] : _schedule_js__WEBPACK_IMPORTED_MODULE_0__[\"set\"];\n  return function() {\n    var schedule = sit(this, id),\n        on = schedule.on;\n\n    // If this node shared a dispatch with the previous node,\n    // just assign the updated shared dispatch and we’re done!\n    // Otherwise, copy-on-write.\n    if (on !== on0) (on1 = (on0 = on).copy()).on(name, listener);\n\n    schedule.on = on1;\n  };\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(name, listener) {\n  var id = this._id;\n\n  return arguments.length < 2\n      ? Object(_schedule_js__WEBPACK_IMPORTED_MODULE_0__[\"get\"])(this.node(), id).on.on(name)\n      : this.each(onFunction(id, name, listener));\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-brush/node_modules/d3-transition/src/transition/remove.js\":\n/*!***********************************************************************************!*\\\n  !*** ./node_modules/d3-brush/node_modules/d3-transition/src/transition/remove.js ***!\n  \\***********************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\nfunction removeFunction(id) {\n  return function() {\n    var parent = this.parentNode;\n    for (var i in this.__transition) if (+i !== id) return;\n    if (parent) parent.removeChild(this);\n  };\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  return this.on(\"end.remove\", removeFunction(this._id));\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-brush/node_modules/d3-transition/src/transition/schedule.js\":\n/*!*************************************************************************************!*\\\n  !*** ./node_modules/d3-brush/node_modules/d3-transition/src/transition/schedule.js ***!\n  \\*************************************************************************************/\n/*! exports provided: CREATED, SCHEDULED, STARTING, STARTED, RUNNING, ENDING, ENDED, default, init, set, get */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"CREATED\", function() { return CREATED; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"SCHEDULED\", function() { return SCHEDULED; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"STARTING\", function() { return STARTING; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"STARTED\", function() { return STARTED; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"RUNNING\", function() { return RUNNING; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"ENDING\", function() { return ENDING; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"ENDED\", function() { return ENDED; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"init\", function() { return init; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"set\", function() { return set; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"get\", function() { return get; });\n/* harmony import */ var d3_dispatch__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-dispatch */ \"./node_modules/d3-brush/node_modules/d3-dispatch/src/index.js\");\n/* harmony import */ var d3_timer__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! d3-timer */ \"./node_modules/d3-brush/node_modules/d3-timer/src/index.js\");\n\n\n\nvar emptyOn = Object(d3_dispatch__WEBPACK_IMPORTED_MODULE_0__[\"dispatch\"])(\"start\", \"end\", \"cancel\", \"interrupt\");\nvar emptyTween = [];\n\nvar CREATED = 0;\nvar SCHEDULED = 1;\nvar STARTING = 2;\nvar STARTED = 3;\nvar RUNNING = 4;\nvar ENDING = 5;\nvar ENDED = 6;\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(node, name, id, index, group, timing) {\n  var schedules = node.__transition;\n  if (!schedules) node.__transition = {};\n  else if (id in schedules) return;\n  create(node, id, {\n    name: name,\n    index: index, // For context during callback.\n    group: group, // For context during callback.\n    on: emptyOn,\n    tween: emptyTween,\n    time: timing.time,\n    delay: timing.delay,\n    duration: timing.duration,\n    ease: timing.ease,\n    timer: null,\n    state: CREATED\n  });\n});\n\nfunction init(node, id) {\n  var schedule = get(node, id);\n  if (schedule.state > CREATED) throw new Error(\"too late; already scheduled\");\n  return schedule;\n}\n\nfunction set(node, id) {\n  var schedule = get(node, id);\n  if (schedule.state > STARTED) throw new Error(\"too late; already running\");\n  return schedule;\n}\n\nfunction get(node, id) {\n  var schedule = node.__transition;\n  if (!schedule || !(schedule = schedule[id])) throw new Error(\"transition not found\");\n  return schedule;\n}\n\nfunction create(node, id, self) {\n  var schedules = node.__transition,\n      tween;\n\n  // Initialize the self timer when the transition is created.\n  // Note the actual delay is not known until the first callback!\n  schedules[id] = self;\n  self.timer = Object(d3_timer__WEBPACK_IMPORTED_MODULE_1__[\"timer\"])(schedule, 0, self.time);\n\n  function schedule(elapsed) {\n    self.state = SCHEDULED;\n    self.timer.restart(start, self.delay, self.time);\n\n    // If the elapsed delay is less than our first sleep, start immediately.\n    if (self.delay <= elapsed) start(elapsed - self.delay);\n  }\n\n  function start(elapsed) {\n    var i, j, n, o;\n\n    // If the state is not SCHEDULED, then we previously errored on start.\n    if (self.state !== SCHEDULED) return stop();\n\n    for (i in schedules) {\n      o = schedules[i];\n      if (o.name !== self.name) continue;\n\n      // While this element already has a starting transition during this frame,\n      // defer starting an interrupting transition until that transition has a\n      // chance to tick (and possibly end); see d3/d3-transition#54!\n      if (o.state === STARTED) return Object(d3_timer__WEBPACK_IMPORTED_MODULE_1__[\"timeout\"])(start);\n\n      // Interrupt the active transition, if any.\n      if (o.state === RUNNING) {\n        o.state = ENDED;\n        o.timer.stop();\n        o.on.call(\"interrupt\", node, node.__data__, o.index, o.group);\n        delete schedules[i];\n      }\n\n      // Cancel any pre-empted transitions.\n      else if (+i < id) {\n        o.state = ENDED;\n        o.timer.stop();\n        o.on.call(\"cancel\", node, node.__data__, o.index, o.group);\n        delete schedules[i];\n      }\n    }\n\n    // Defer the first tick to end of the current frame; see d3/d3#1576.\n    // Note the transition may be canceled after start and before the first tick!\n    // Note this must be scheduled before the start event; see d3/d3-transition#16!\n    // Assuming this is successful, subsequent callbacks go straight to tick.\n    Object(d3_timer__WEBPACK_IMPORTED_MODULE_1__[\"timeout\"])(function() {\n      if (self.state === STARTED) {\n        self.state = RUNNING;\n        self.timer.restart(tick, self.delay, self.time);\n        tick(elapsed);\n      }\n    });\n\n    // Dispatch the start event.\n    // Note this must be done before the tween are initialized.\n    self.state = STARTING;\n    self.on.call(\"start\", node, node.__data__, self.index, self.group);\n    if (self.state !== STARTING) return; // interrupted\n    self.state = STARTED;\n\n    // Initialize the tween, deleting null tween.\n    tween = new Array(n = self.tween.length);\n    for (i = 0, j = -1; i < n; ++i) {\n      if (o = self.tween[i].value.call(node, node.__data__, self.index, self.group)) {\n        tween[++j] = o;\n      }\n    }\n    tween.length = j + 1;\n  }\n\n  function tick(elapsed) {\n    var t = elapsed < self.duration ? self.ease.call(null, elapsed / self.duration) : (self.timer.restart(stop), self.state = ENDING, 1),\n        i = -1,\n        n = tween.length;\n\n    while (++i < n) {\n      tween[i].call(node, t);\n    }\n\n    // Dispatch the end event.\n    if (self.state === ENDING) {\n      self.on.call(\"end\", node, node.__data__, self.index, self.group);\n      stop();\n    }\n  }\n\n  function stop() {\n    self.state = ENDED;\n    self.timer.stop();\n    delete schedules[id];\n    for (var i in schedules) return; // eslint-disable-line no-unused-vars\n    delete node.__transition;\n  }\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-brush/node_modules/d3-transition/src/transition/select.js\":\n/*!***********************************************************************************!*\\\n  !*** ./node_modules/d3-brush/node_modules/d3-transition/src/transition/select.js ***!\n  \\***********************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var d3_selection__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-selection */ \"./node_modules/d3-brush/node_modules/d3-selection/src/index.js\");\n/* harmony import */ var _index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./index.js */ \"./node_modules/d3-brush/node_modules/d3-transition/src/transition/index.js\");\n/* harmony import */ var _schedule_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./schedule.js */ \"./node_modules/d3-brush/node_modules/d3-transition/src/transition/schedule.js\");\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(select) {\n  var name = this._name,\n      id = this._id;\n\n  if (typeof select !== \"function\") select = Object(d3_selection__WEBPACK_IMPORTED_MODULE_0__[\"selector\"])(select);\n\n  for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {\n    for (var group = groups[j], n = group.length, subgroup = subgroups[j] = new Array(n), node, subnode, i = 0; i < n; ++i) {\n      if ((node = group[i]) && (subnode = select.call(node, node.__data__, i, group))) {\n        if (\"__data__\" in node) subnode.__data__ = node.__data__;\n        subgroup[i] = subnode;\n        Object(_schedule_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(subgroup[i], name, id, i, subgroup, Object(_schedule_js__WEBPACK_IMPORTED_MODULE_2__[\"get\"])(node, id));\n      }\n    }\n  }\n\n  return new _index_js__WEBPACK_IMPORTED_MODULE_1__[\"Transition\"](subgroups, this._parents, name, id);\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-brush/node_modules/d3-transition/src/transition/selectAll.js\":\n/*!**************************************************************************************!*\\\n  !*** ./node_modules/d3-brush/node_modules/d3-transition/src/transition/selectAll.js ***!\n  \\**************************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var d3_selection__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-selection */ \"./node_modules/d3-brush/node_modules/d3-selection/src/index.js\");\n/* harmony import */ var _index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./index.js */ \"./node_modules/d3-brush/node_modules/d3-transition/src/transition/index.js\");\n/* harmony import */ var _schedule_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./schedule.js */ \"./node_modules/d3-brush/node_modules/d3-transition/src/transition/schedule.js\");\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(select) {\n  var name = this._name,\n      id = this._id;\n\n  if (typeof select !== \"function\") select = Object(d3_selection__WEBPACK_IMPORTED_MODULE_0__[\"selectorAll\"])(select);\n\n  for (var groups = this._groups, m = groups.length, subgroups = [], parents = [], j = 0; j < m; ++j) {\n    for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) {\n      if (node = group[i]) {\n        for (var children = select.call(node, node.__data__, i, group), child, inherit = Object(_schedule_js__WEBPACK_IMPORTED_MODULE_2__[\"get\"])(node, id), k = 0, l = children.length; k < l; ++k) {\n          if (child = children[k]) {\n            Object(_schedule_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(child, name, id, k, children, inherit);\n          }\n        }\n        subgroups.push(children);\n        parents.push(node);\n      }\n    }\n  }\n\n  return new _index_js__WEBPACK_IMPORTED_MODULE_1__[\"Transition\"](subgroups, parents, name, id);\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-brush/node_modules/d3-transition/src/transition/selection.js\":\n/*!**************************************************************************************!*\\\n  !*** ./node_modules/d3-brush/node_modules/d3-transition/src/transition/selection.js ***!\n  \\**************************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var d3_selection__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-selection */ \"./node_modules/d3-brush/node_modules/d3-selection/src/index.js\");\n\n\nvar Selection = d3_selection__WEBPACK_IMPORTED_MODULE_0__[\"selection\"].prototype.constructor;\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  return new Selection(this._groups, this._parents);\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-brush/node_modules/d3-transition/src/transition/style.js\":\n/*!**********************************************************************************!*\\\n  !*** ./node_modules/d3-brush/node_modules/d3-transition/src/transition/style.js ***!\n  \\**********************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var d3_interpolate__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-interpolate */ \"./node_modules/d3-brush/node_modules/d3-interpolate/src/index.js\");\n/* harmony import */ var d3_selection__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! d3-selection */ \"./node_modules/d3-brush/node_modules/d3-selection/src/index.js\");\n/* harmony import */ var _schedule_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./schedule.js */ \"./node_modules/d3-brush/node_modules/d3-transition/src/transition/schedule.js\");\n/* harmony import */ var _tween_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./tween.js */ \"./node_modules/d3-brush/node_modules/d3-transition/src/transition/tween.js\");\n/* harmony import */ var _interpolate_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./interpolate.js */ \"./node_modules/d3-brush/node_modules/d3-transition/src/transition/interpolate.js\");\n\n\n\n\n\n\nfunction styleNull(name, interpolate) {\n  var string00,\n      string10,\n      interpolate0;\n  return function() {\n    var string0 = Object(d3_selection__WEBPACK_IMPORTED_MODULE_1__[\"style\"])(this, name),\n        string1 = (this.style.removeProperty(name), Object(d3_selection__WEBPACK_IMPORTED_MODULE_1__[\"style\"])(this, name));\n    return string0 === string1 ? null\n        : string0 === string00 && string1 === string10 ? interpolate0\n        : interpolate0 = interpolate(string00 = string0, string10 = string1);\n  };\n}\n\nfunction styleRemove(name) {\n  return function() {\n    this.style.removeProperty(name);\n  };\n}\n\nfunction styleConstant(name, interpolate, value1) {\n  var string00,\n      string1 = value1 + \"\",\n      interpolate0;\n  return function() {\n    var string0 = Object(d3_selection__WEBPACK_IMPORTED_MODULE_1__[\"style\"])(this, name);\n    return string0 === string1 ? null\n        : string0 === string00 ? interpolate0\n        : interpolate0 = interpolate(string00 = string0, value1);\n  };\n}\n\nfunction styleFunction(name, interpolate, value) {\n  var string00,\n      string10,\n      interpolate0;\n  return function() {\n    var string0 = Object(d3_selection__WEBPACK_IMPORTED_MODULE_1__[\"style\"])(this, name),\n        value1 = value(this),\n        string1 = value1 + \"\";\n    if (value1 == null) string1 = value1 = (this.style.removeProperty(name), Object(d3_selection__WEBPACK_IMPORTED_MODULE_1__[\"style\"])(this, name));\n    return string0 === string1 ? null\n        : string0 === string00 && string1 === string10 ? interpolate0\n        : (string10 = string1, interpolate0 = interpolate(string00 = string0, value1));\n  };\n}\n\nfunction styleMaybeRemove(id, name) {\n  var on0, on1, listener0, key = \"style.\" + name, event = \"end.\" + key, remove;\n  return function() {\n    var schedule = Object(_schedule_js__WEBPACK_IMPORTED_MODULE_2__[\"set\"])(this, id),\n        on = schedule.on,\n        listener = schedule.value[key] == null ? remove || (remove = styleRemove(name)) : undefined;\n\n    // If this node shared a dispatch with the previous node,\n    // just assign the updated shared dispatch and we’re done!\n    // Otherwise, copy-on-write.\n    if (on !== on0 || listener0 !== listener) (on1 = (on0 = on).copy()).on(event, listener0 = listener);\n\n    schedule.on = on1;\n  };\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(name, value, priority) {\n  var i = (name += \"\") === \"transform\" ? d3_interpolate__WEBPACK_IMPORTED_MODULE_0__[\"interpolateTransformCss\"] : _interpolate_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"];\n  return value == null ? this\n      .styleTween(name, styleNull(name, i))\n      .on(\"end.style.\" + name, styleRemove(name))\n    : typeof value === \"function\" ? this\n      .styleTween(name, styleFunction(name, i, Object(_tween_js__WEBPACK_IMPORTED_MODULE_3__[\"tweenValue\"])(this, \"style.\" + name, value)))\n      .each(styleMaybeRemove(this._id, name))\n    : this\n      .styleTween(name, styleConstant(name, i, value), priority)\n      .on(\"end.style.\" + name, null);\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-brush/node_modules/d3-transition/src/transition/styleTween.js\":\n/*!***************************************************************************************!*\\\n  !*** ./node_modules/d3-brush/node_modules/d3-transition/src/transition/styleTween.js ***!\n  \\***************************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\nfunction styleInterpolate(name, i, priority) {\n  return function(t) {\n    this.style.setProperty(name, i.call(this, t), priority);\n  };\n}\n\nfunction styleTween(name, value, priority) {\n  var t, i0;\n  function tween() {\n    var i = value.apply(this, arguments);\n    if (i !== i0) t = (i0 = i) && styleInterpolate(name, i, priority);\n    return t;\n  }\n  tween._value = value;\n  return tween;\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(name, value, priority) {\n  var key = \"style.\" + (name += \"\");\n  if (arguments.length < 2) return (key = this.tween(key)) && key._value;\n  if (value == null) return this.tween(key, null);\n  if (typeof value !== \"function\") throw new Error;\n  return this.tween(key, styleTween(name, value, priority == null ? \"\" : priority));\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-brush/node_modules/d3-transition/src/transition/text.js\":\n/*!*********************************************************************************!*\\\n  !*** ./node_modules/d3-brush/node_modules/d3-transition/src/transition/text.js ***!\n  \\*********************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _tween_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./tween.js */ \"./node_modules/d3-brush/node_modules/d3-transition/src/transition/tween.js\");\n\n\nfunction textConstant(value) {\n  return function() {\n    this.textContent = value;\n  };\n}\n\nfunction textFunction(value) {\n  return function() {\n    var value1 = value(this);\n    this.textContent = value1 == null ? \"\" : value1;\n  };\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(value) {\n  return this.tween(\"text\", typeof value === \"function\"\n      ? textFunction(Object(_tween_js__WEBPACK_IMPORTED_MODULE_0__[\"tweenValue\"])(this, \"text\", value))\n      : textConstant(value == null ? \"\" : value + \"\"));\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-brush/node_modules/d3-transition/src/transition/textTween.js\":\n/*!**************************************************************************************!*\\\n  !*** ./node_modules/d3-brush/node_modules/d3-transition/src/transition/textTween.js ***!\n  \\**************************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\nfunction textInterpolate(i) {\n  return function(t) {\n    this.textContent = i.call(this, t);\n  };\n}\n\nfunction textTween(value) {\n  var t0, i0;\n  function tween() {\n    var i = value.apply(this, arguments);\n    if (i !== i0) t0 = (i0 = i) && textInterpolate(i);\n    return t0;\n  }\n  tween._value = value;\n  return tween;\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(value) {\n  var key = \"text\";\n  if (arguments.length < 1) return (key = this.tween(key)) && key._value;\n  if (value == null) return this.tween(key, null);\n  if (typeof value !== \"function\") throw new Error;\n  return this.tween(key, textTween(value));\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-brush/node_modules/d3-transition/src/transition/transition.js\":\n/*!***************************************************************************************!*\\\n  !*** ./node_modules/d3-brush/node_modules/d3-transition/src/transition/transition.js ***!\n  \\***************************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./index.js */ \"./node_modules/d3-brush/node_modules/d3-transition/src/transition/index.js\");\n/* harmony import */ var _schedule_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./schedule.js */ \"./node_modules/d3-brush/node_modules/d3-transition/src/transition/schedule.js\");\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  var name = this._name,\n      id0 = this._id,\n      id1 = Object(_index_js__WEBPACK_IMPORTED_MODULE_0__[\"newId\"])();\n\n  for (var groups = this._groups, m = groups.length, j = 0; j < m; ++j) {\n    for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) {\n      if (node = group[i]) {\n        var inherit = Object(_schedule_js__WEBPACK_IMPORTED_MODULE_1__[\"get\"])(node, id0);\n        Object(_schedule_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(node, name, id1, i, group, {\n          time: inherit.time + inherit.delay + inherit.duration,\n          delay: 0,\n          duration: inherit.duration,\n          ease: inherit.ease\n        });\n      }\n    }\n  }\n\n  return new _index_js__WEBPACK_IMPORTED_MODULE_0__[\"Transition\"](groups, this._parents, name, id1);\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-brush/node_modules/d3-transition/src/transition/tween.js\":\n/*!**********************************************************************************!*\\\n  !*** ./node_modules/d3-brush/node_modules/d3-transition/src/transition/tween.js ***!\n  \\**********************************************************************************/\n/*! exports provided: default, tweenValue */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"tweenValue\", function() { return tweenValue; });\n/* harmony import */ var _schedule_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./schedule.js */ \"./node_modules/d3-brush/node_modules/d3-transition/src/transition/schedule.js\");\n\n\nfunction tweenRemove(id, name) {\n  var tween0, tween1;\n  return function() {\n    var schedule = Object(_schedule_js__WEBPACK_IMPORTED_MODULE_0__[\"set\"])(this, id),\n        tween = schedule.tween;\n\n    // If this node shared tween with the previous node,\n    // just assign the updated shared tween and we’re done!\n    // Otherwise, copy-on-write.\n    if (tween !== tween0) {\n      tween1 = tween0 = tween;\n      for (var i = 0, n = tween1.length; i < n; ++i) {\n        if (tween1[i].name === name) {\n          tween1 = tween1.slice();\n          tween1.splice(i, 1);\n          break;\n        }\n      }\n    }\n\n    schedule.tween = tween1;\n  };\n}\n\nfunction tweenFunction(id, name, value) {\n  var tween0, tween1;\n  if (typeof value !== \"function\") throw new Error;\n  return function() {\n    var schedule = Object(_schedule_js__WEBPACK_IMPORTED_MODULE_0__[\"set\"])(this, id),\n        tween = schedule.tween;\n\n    // If this node shared tween with the previous node,\n    // just assign the updated shared tween and we’re done!\n    // Otherwise, copy-on-write.\n    if (tween !== tween0) {\n      tween1 = (tween0 = tween).slice();\n      for (var t = {name: name, value: value}, i = 0, n = tween1.length; i < n; ++i) {\n        if (tween1[i].name === name) {\n          tween1[i] = t;\n          break;\n        }\n      }\n      if (i === n) tween1.push(t);\n    }\n\n    schedule.tween = tween1;\n  };\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(name, value) {\n  var id = this._id;\n\n  name += \"\";\n\n  if (arguments.length < 2) {\n    var tween = Object(_schedule_js__WEBPACK_IMPORTED_MODULE_0__[\"get\"])(this.node(), id).tween;\n    for (var i = 0, n = tween.length, t; i < n; ++i) {\n      if ((t = tween[i]).name === name) {\n        return t.value;\n      }\n    }\n    return null;\n  }\n\n  return this.each((value == null ? tweenRemove : tweenFunction)(id, name, value));\n});\n\nfunction tweenValue(transition, name, value) {\n  var id = transition._id;\n\n  transition.each(function() {\n    var schedule = Object(_schedule_js__WEBPACK_IMPORTED_MODULE_0__[\"set\"])(this, id);\n    (schedule.value || (schedule.value = {}))[name] = value.apply(this, arguments);\n  });\n\n  return function(node) {\n    return Object(_schedule_js__WEBPACK_IMPORTED_MODULE_0__[\"get\"])(node, id).value[name];\n  };\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-brush/src/brush.js\":\n/*!********************************************!*\\\n  !*** ./node_modules/d3-brush/src/brush.js ***!\n  \\********************************************/\n/*! exports provided: brushSelection, brushX, brushY, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"brushSelection\", function() { return brushSelection; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"brushX\", function() { return brushX; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"brushY\", function() { return brushY; });\n/* harmony import */ var d3_dispatch__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-dispatch */ \"./node_modules/d3-brush/node_modules/d3-dispatch/src/index.js\");\n/* harmony import */ var d3_drag__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! d3-drag */ \"./node_modules/d3-brush/node_modules/d3-drag/src/index.js\");\n/* harmony import */ var d3_interpolate__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! d3-interpolate */ \"./node_modules/d3-brush/node_modules/d3-interpolate/src/index.js\");\n/* harmony import */ var d3_selection__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! d3-selection */ \"./node_modules/d3-brush/node_modules/d3-selection/src/index.js\");\n/* harmony import */ var d3_transition__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! d3-transition */ \"./node_modules/d3-brush/node_modules/d3-transition/src/index.js\");\n/* harmony import */ var _constant_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./constant.js */ \"./node_modules/d3-brush/src/constant.js\");\n/* harmony import */ var _event_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./event.js */ \"./node_modules/d3-brush/src/event.js\");\n/* harmony import */ var _noevent_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./noevent.js */ \"./node_modules/d3-brush/src/noevent.js\");\n\n\n\n\n\n\n\n\n\nvar MODE_DRAG = {name: \"drag\"},\n    MODE_SPACE = {name: \"space\"},\n    MODE_HANDLE = {name: \"handle\"},\n    MODE_CENTER = {name: \"center\"};\n\nconst {abs, max, min} = Math;\n\nfunction number1(e) {\n  return [+e[0], +e[1]];\n}\n\nfunction number2(e) {\n  return [number1(e[0]), number1(e[1])];\n}\n\nvar X = {\n  name: \"x\",\n  handles: [\"w\", \"e\"].map(type),\n  input: function(x, e) { return x == null ? null : [[+x[0], e[0][1]], [+x[1], e[1][1]]]; },\n  output: function(xy) { return xy && [xy[0][0], xy[1][0]]; }\n};\n\nvar Y = {\n  name: \"y\",\n  handles: [\"n\", \"s\"].map(type),\n  input: function(y, e) { return y == null ? null : [[e[0][0], +y[0]], [e[1][0], +y[1]]]; },\n  output: function(xy) { return xy && [xy[0][1], xy[1][1]]; }\n};\n\nvar XY = {\n  name: \"xy\",\n  handles: [\"n\", \"w\", \"e\", \"s\", \"nw\", \"ne\", \"sw\", \"se\"].map(type),\n  input: function(xy) { return xy == null ? null : number2(xy); },\n  output: function(xy) { return xy; }\n};\n\nvar cursors = {\n  overlay: \"crosshair\",\n  selection: \"move\",\n  n: \"ns-resize\",\n  e: \"ew-resize\",\n  s: \"ns-resize\",\n  w: \"ew-resize\",\n  nw: \"nwse-resize\",\n  ne: \"nesw-resize\",\n  se: \"nwse-resize\",\n  sw: \"nesw-resize\"\n};\n\nvar flipX = {\n  e: \"w\",\n  w: \"e\",\n  nw: \"ne\",\n  ne: \"nw\",\n  se: \"sw\",\n  sw: \"se\"\n};\n\nvar flipY = {\n  n: \"s\",\n  s: \"n\",\n  nw: \"sw\",\n  ne: \"se\",\n  se: \"ne\",\n  sw: \"nw\"\n};\n\nvar signsX = {\n  overlay: +1,\n  selection: +1,\n  n: null,\n  e: +1,\n  s: null,\n  w: -1,\n  nw: -1,\n  ne: +1,\n  se: +1,\n  sw: -1\n};\n\nvar signsY = {\n  overlay: +1,\n  selection: +1,\n  n: -1,\n  e: null,\n  s: +1,\n  w: null,\n  nw: -1,\n  ne: -1,\n  se: +1,\n  sw: +1\n};\n\nfunction type(t) {\n  return {type: t};\n}\n\n// Ignore right-click, since that should open the context menu.\nfunction defaultFilter(event) {\n  return !event.ctrlKey && !event.button;\n}\n\nfunction defaultExtent() {\n  var svg = this.ownerSVGElement || this;\n  if (svg.hasAttribute(\"viewBox\")) {\n    svg = svg.viewBox.baseVal;\n    return [[svg.x, svg.y], [svg.x + svg.width, svg.y + svg.height]];\n  }\n  return [[0, 0], [svg.width.baseVal.value, svg.height.baseVal.value]];\n}\n\nfunction defaultTouchable() {\n  return navigator.maxTouchPoints || (\"ontouchstart\" in this);\n}\n\n// Like d3.local, but with the name “__brush” rather than auto-generated.\nfunction local(node) {\n  while (!node.__brush) if (!(node = node.parentNode)) return;\n  return node.__brush;\n}\n\nfunction empty(extent) {\n  return extent[0][0] === extent[1][0]\n      || extent[0][1] === extent[1][1];\n}\n\nfunction brushSelection(node) {\n  var state = node.__brush;\n  return state ? state.dim.output(state.selection) : null;\n}\n\nfunction brushX() {\n  return brush(X);\n}\n\nfunction brushY() {\n  return brush(Y);\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  return brush(XY);\n});\n\nfunction brush(dim) {\n  var extent = defaultExtent,\n      filter = defaultFilter,\n      touchable = defaultTouchable,\n      keys = true,\n      listeners = Object(d3_dispatch__WEBPACK_IMPORTED_MODULE_0__[\"dispatch\"])(\"start\", \"brush\", \"end\"),\n      handleSize = 6,\n      touchending;\n\n  function brush(group) {\n    var overlay = group\n        .property(\"__brush\", initialize)\n      .selectAll(\".overlay\")\n      .data([type(\"overlay\")]);\n\n    overlay.enter().append(\"rect\")\n        .attr(\"class\", \"overlay\")\n        .attr(\"pointer-events\", \"all\")\n        .attr(\"cursor\", cursors.overlay)\n      .merge(overlay)\n        .each(function() {\n          var extent = local(this).extent;\n          Object(d3_selection__WEBPACK_IMPORTED_MODULE_3__[\"select\"])(this)\n              .attr(\"x\", extent[0][0])\n              .attr(\"y\", extent[0][1])\n              .attr(\"width\", extent[1][0] - extent[0][0])\n              .attr(\"height\", extent[1][1] - extent[0][1]);\n        });\n\n    group.selectAll(\".selection\")\n      .data([type(\"selection\")])\n      .enter().append(\"rect\")\n        .attr(\"class\", \"selection\")\n        .attr(\"cursor\", cursors.selection)\n        .attr(\"fill\", \"#777\")\n        .attr(\"fill-opacity\", 0.3)\n        .attr(\"stroke\", \"#fff\")\n        .attr(\"shape-rendering\", \"crispEdges\");\n\n    var handle = group.selectAll(\".handle\")\n      .data(dim.handles, function(d) { return d.type; });\n\n    handle.exit().remove();\n\n    handle.enter().append(\"rect\")\n        .attr(\"class\", function(d) { return \"handle handle--\" + d.type; })\n        .attr(\"cursor\", function(d) { return cursors[d.type]; });\n\n    group\n        .each(redraw)\n        .attr(\"fill\", \"none\")\n        .attr(\"pointer-events\", \"all\")\n        .on(\"mousedown.brush\", started)\n      .filter(touchable)\n        .on(\"touchstart.brush\", started)\n        .on(\"touchmove.brush\", touchmoved)\n        .on(\"touchend.brush touchcancel.brush\", touchended)\n        .style(\"touch-action\", \"none\")\n        .style(\"-webkit-tap-highlight-color\", \"rgba(0,0,0,0)\");\n  }\n\n  brush.move = function(group, selection, event) {\n    if (group.tween) {\n      group\n          .on(\"start.brush\", function(event) { emitter(this, arguments).beforestart().start(event); })\n          .on(\"interrupt.brush end.brush\", function(event) { emitter(this, arguments).end(event); })\n          .tween(\"brush\", function() {\n            var that = this,\n                state = that.__brush,\n                emit = emitter(that, arguments),\n                selection0 = state.selection,\n                selection1 = dim.input(typeof selection === \"function\" ? selection.apply(this, arguments) : selection, state.extent),\n                i = Object(d3_interpolate__WEBPACK_IMPORTED_MODULE_2__[\"interpolate\"])(selection0, selection1);\n\n            function tween(t) {\n              state.selection = t === 1 && selection1 === null ? null : i(t);\n              redraw.call(that);\n              emit.brush();\n            }\n\n            return selection0 !== null && selection1 !== null ? tween : tween(1);\n          });\n    } else {\n      group\n          .each(function() {\n            var that = this,\n                args = arguments,\n                state = that.__brush,\n                selection1 = dim.input(typeof selection === \"function\" ? selection.apply(that, args) : selection, state.extent),\n                emit = emitter(that, args).beforestart();\n\n            Object(d3_transition__WEBPACK_IMPORTED_MODULE_4__[\"interrupt\"])(that);\n            state.selection = selection1 === null ? null : selection1;\n            redraw.call(that);\n            emit.start(event).brush(event).end(event);\n          });\n    }\n  };\n\n  brush.clear = function(group, event) {\n    brush.move(group, null, event);\n  };\n\n  function redraw() {\n    var group = Object(d3_selection__WEBPACK_IMPORTED_MODULE_3__[\"select\"])(this),\n        selection = local(this).selection;\n\n    if (selection) {\n      group.selectAll(\".selection\")\n          .style(\"display\", null)\n          .attr(\"x\", selection[0][0])\n          .attr(\"y\", selection[0][1])\n          .attr(\"width\", selection[1][0] - selection[0][0])\n          .attr(\"height\", selection[1][1] - selection[0][1]);\n\n      group.selectAll(\".handle\")\n          .style(\"display\", null)\n          .attr(\"x\", function(d) { return d.type[d.type.length - 1] === \"e\" ? selection[1][0] - handleSize / 2 : selection[0][0] - handleSize / 2; })\n          .attr(\"y\", function(d) { return d.type[0] === \"s\" ? selection[1][1] - handleSize / 2 : selection[0][1] - handleSize / 2; })\n          .attr(\"width\", function(d) { return d.type === \"n\" || d.type === \"s\" ? selection[1][0] - selection[0][0] + handleSize : handleSize; })\n          .attr(\"height\", function(d) { return d.type === \"e\" || d.type === \"w\" ? selection[1][1] - selection[0][1] + handleSize : handleSize; });\n    }\n\n    else {\n      group.selectAll(\".selection,.handle\")\n          .style(\"display\", \"none\")\n          .attr(\"x\", null)\n          .attr(\"y\", null)\n          .attr(\"width\", null)\n          .attr(\"height\", null);\n    }\n  }\n\n  function emitter(that, args, clean) {\n    var emit = that.__brush.emitter;\n    return emit && (!clean || !emit.clean) ? emit : new Emitter(that, args, clean);\n  }\n\n  function Emitter(that, args, clean) {\n    this.that = that;\n    this.args = args;\n    this.state = that.__brush;\n    this.active = 0;\n    this.clean = clean;\n  }\n\n  Emitter.prototype = {\n    beforestart: function() {\n      if (++this.active === 1) this.state.emitter = this, this.starting = true;\n      return this;\n    },\n    start: function(event, mode) {\n      if (this.starting) this.starting = false, this.emit(\"start\", event, mode);\n      else this.emit(\"brush\", event);\n      return this;\n    },\n    brush: function(event, mode) {\n      this.emit(\"brush\", event, mode);\n      return this;\n    },\n    end: function(event, mode) {\n      if (--this.active === 0) delete this.state.emitter, this.emit(\"end\", event, mode);\n      return this;\n    },\n    emit: function(type, event, mode) {\n      var d = Object(d3_selection__WEBPACK_IMPORTED_MODULE_3__[\"select\"])(this.that).datum();\n      listeners.call(\n        type,\n        this.that,\n        new _event_js__WEBPACK_IMPORTED_MODULE_6__[\"default\"](type, {\n          sourceEvent: event,\n          target: brush,\n          selection: dim.output(this.state.selection),\n          mode,\n          dispatch: listeners\n        }),\n        d\n      );\n    }\n  };\n\n  function started(event) {\n    if (touchending && !event.touches) return;\n    if (!filter.apply(this, arguments)) return;\n\n    var that = this,\n        type = event.target.__data__.type,\n        mode = (keys && event.metaKey ? type = \"overlay\" : type) === \"selection\" ? MODE_DRAG : (keys && event.altKey ? MODE_CENTER : MODE_HANDLE),\n        signX = dim === Y ? null : signsX[type],\n        signY = dim === X ? null : signsY[type],\n        state = local(that),\n        extent = state.extent,\n        selection = state.selection,\n        W = extent[0][0], w0, w1,\n        N = extent[0][1], n0, n1,\n        E = extent[1][0], e0, e1,\n        S = extent[1][1], s0, s1,\n        dx = 0,\n        dy = 0,\n        moving,\n        shifting = signX && signY && keys && event.shiftKey,\n        lockX,\n        lockY,\n        points = Array.from(event.touches || [event], t => {\n          const i = t.identifier;\n          t = Object(d3_selection__WEBPACK_IMPORTED_MODULE_3__[\"pointer\"])(t, that);\n          t.point0 = t.slice();\n          t.identifier = i;\n          return t;\n        });\n\n    Object(d3_transition__WEBPACK_IMPORTED_MODULE_4__[\"interrupt\"])(that);\n    var emit = emitter(that, arguments, true).beforestart();\n\n    if (type === \"overlay\") {\n      if (selection) moving = true;\n      const pts = [points[0], points[1] || points[0]];\n      state.selection = selection = [[\n          w0 = dim === Y ? W : min(pts[0][0], pts[1][0]),\n          n0 = dim === X ? N : min(pts[0][1], pts[1][1])\n        ], [\n          e0 = dim === Y ? E : max(pts[0][0], pts[1][0]),\n          s0 = dim === X ? S : max(pts[0][1], pts[1][1])\n        ]];\n      if (points.length > 1) move(event);\n    } else {\n      w0 = selection[0][0];\n      n0 = selection[0][1];\n      e0 = selection[1][0];\n      s0 = selection[1][1];\n    }\n\n    w1 = w0;\n    n1 = n0;\n    e1 = e0;\n    s1 = s0;\n\n    var group = Object(d3_selection__WEBPACK_IMPORTED_MODULE_3__[\"select\"])(that)\n        .attr(\"pointer-events\", \"none\");\n\n    var overlay = group.selectAll(\".overlay\")\n        .attr(\"cursor\", cursors[type]);\n\n    if (event.touches) {\n      emit.moved = moved;\n      emit.ended = ended;\n    } else {\n      var view = Object(d3_selection__WEBPACK_IMPORTED_MODULE_3__[\"select\"])(event.view)\n          .on(\"mousemove.brush\", moved, true)\n          .on(\"mouseup.brush\", ended, true);\n      if (keys) view\n          .on(\"keydown.brush\", keydowned, true)\n          .on(\"keyup.brush\", keyupped, true)\n\n      Object(d3_drag__WEBPACK_IMPORTED_MODULE_1__[\"dragDisable\"])(event.view);\n    }\n\n    redraw.call(that);\n    emit.start(event, mode.name);\n\n    function moved(event) {\n      for (const p of event.changedTouches || [event]) {\n        for (const d of points)\n          if (d.identifier === p.identifier) d.cur = Object(d3_selection__WEBPACK_IMPORTED_MODULE_3__[\"pointer\"])(p, that);\n      }\n      if (shifting && !lockX && !lockY && points.length === 1) {\n        const point = points[0];\n        if (abs(point.cur[0] - point[0]) > abs(point.cur[1] - point[1]))\n          lockY = true;\n        else\n          lockX = true;\n      }\n      for (const point of points)\n        if (point.cur) point[0] = point.cur[0], point[1] = point.cur[1];\n      moving = true;\n      Object(_noevent_js__WEBPACK_IMPORTED_MODULE_7__[\"default\"])(event);\n      move(event);\n    }\n\n    function move(event) {\n      const point = points[0], point0 = point.point0;\n      var t;\n\n      dx = point[0] - point0[0];\n      dy = point[1] - point0[1];\n\n      switch (mode) {\n        case MODE_SPACE:\n        case MODE_DRAG: {\n          if (signX) dx = max(W - w0, min(E - e0, dx)), w1 = w0 + dx, e1 = e0 + dx;\n          if (signY) dy = max(N - n0, min(S - s0, dy)), n1 = n0 + dy, s1 = s0 + dy;\n          break;\n        }\n        case MODE_HANDLE: {\n          if (points[1]) {\n            if (signX) w1 = max(W, min(E, points[0][0])), e1 = max(W, min(E, points[1][0])), signX = 1;\n            if (signY) n1 = max(N, min(S, points[0][1])), s1 = max(N, min(S, points[1][1])), signY = 1;\n          } else {\n            if (signX < 0) dx = max(W - w0, min(E - w0, dx)), w1 = w0 + dx, e1 = e0;\n            else if (signX > 0) dx = max(W - e0, min(E - e0, dx)), w1 = w0, e1 = e0 + dx;\n            if (signY < 0) dy = max(N - n0, min(S - n0, dy)), n1 = n0 + dy, s1 = s0;\n            else if (signY > 0) dy = max(N - s0, min(S - s0, dy)), n1 = n0, s1 = s0 + dy;\n          }\n          break;\n        }\n        case MODE_CENTER: {\n          if (signX) w1 = max(W, min(E, w0 - dx * signX)), e1 = max(W, min(E, e0 + dx * signX));\n          if (signY) n1 = max(N, min(S, n0 - dy * signY)), s1 = max(N, min(S, s0 + dy * signY));\n          break;\n        }\n      }\n\n      if (e1 < w1) {\n        signX *= -1;\n        t = w0, w0 = e0, e0 = t;\n        t = w1, w1 = e1, e1 = t;\n        if (type in flipX) overlay.attr(\"cursor\", cursors[type = flipX[type]]);\n      }\n\n      if (s1 < n1) {\n        signY *= -1;\n        t = n0, n0 = s0, s0 = t;\n        t = n1, n1 = s1, s1 = t;\n        if (type in flipY) overlay.attr(\"cursor\", cursors[type = flipY[type]]);\n      }\n\n      if (state.selection) selection = state.selection; // May be set by brush.move!\n      if (lockX) w1 = selection[0][0], e1 = selection[1][0];\n      if (lockY) n1 = selection[0][1], s1 = selection[1][1];\n\n      if (selection[0][0] !== w1\n          || selection[0][1] !== n1\n          || selection[1][0] !== e1\n          || selection[1][1] !== s1) {\n        state.selection = [[w1, n1], [e1, s1]];\n        redraw.call(that);\n        emit.brush(event, mode.name);\n      }\n    }\n\n    function ended(event) {\n      Object(_noevent_js__WEBPACK_IMPORTED_MODULE_7__[\"nopropagation\"])(event);\n      if (event.touches) {\n        if (event.touches.length) return;\n        if (touchending) clearTimeout(touchending);\n        touchending = setTimeout(function() { touchending = null; }, 500); // Ghost clicks are delayed!\n      } else {\n        Object(d3_drag__WEBPACK_IMPORTED_MODULE_1__[\"dragEnable\"])(event.view, moving);\n        view.on(\"keydown.brush keyup.brush mousemove.brush mouseup.brush\", null);\n      }\n      group.attr(\"pointer-events\", \"all\");\n      overlay.attr(\"cursor\", cursors.overlay);\n      if (state.selection) selection = state.selection; // May be set by brush.move (on start)!\n      if (empty(selection)) state.selection = null, redraw.call(that);\n      emit.end(event, mode.name);\n    }\n\n    function keydowned(event) {\n      switch (event.keyCode) {\n        case 16: { // SHIFT\n          shifting = signX && signY;\n          break;\n        }\n        case 18: { // ALT\n          if (mode === MODE_HANDLE) {\n            if (signX) e0 = e1 - dx * signX, w0 = w1 + dx * signX;\n            if (signY) s0 = s1 - dy * signY, n0 = n1 + dy * signY;\n            mode = MODE_CENTER;\n            move(event);\n          }\n          break;\n        }\n        case 32: { // SPACE; takes priority over ALT\n          if (mode === MODE_HANDLE || mode === MODE_CENTER) {\n            if (signX < 0) e0 = e1 - dx; else if (signX > 0) w0 = w1 - dx;\n            if (signY < 0) s0 = s1 - dy; else if (signY > 0) n0 = n1 - dy;\n            mode = MODE_SPACE;\n            overlay.attr(\"cursor\", cursors.selection);\n            move(event);\n          }\n          break;\n        }\n        default: return;\n      }\n      Object(_noevent_js__WEBPACK_IMPORTED_MODULE_7__[\"default\"])(event);\n    }\n\n    function keyupped(event) {\n      switch (event.keyCode) {\n        case 16: { // SHIFT\n          if (shifting) {\n            lockX = lockY = shifting = false;\n            move(event);\n          }\n          break;\n        }\n        case 18: { // ALT\n          if (mode === MODE_CENTER) {\n            if (signX < 0) e0 = e1; else if (signX > 0) w0 = w1;\n            if (signY < 0) s0 = s1; else if (signY > 0) n0 = n1;\n            mode = MODE_HANDLE;\n            move(event);\n          }\n          break;\n        }\n        case 32: { // SPACE\n          if (mode === MODE_SPACE) {\n            if (event.altKey) {\n              if (signX) e0 = e1 - dx * signX, w0 = w1 + dx * signX;\n              if (signY) s0 = s1 - dy * signY, n0 = n1 + dy * signY;\n              mode = MODE_CENTER;\n            } else {\n              if (signX < 0) e0 = e1; else if (signX > 0) w0 = w1;\n              if (signY < 0) s0 = s1; else if (signY > 0) n0 = n1;\n              mode = MODE_HANDLE;\n            }\n            overlay.attr(\"cursor\", cursors[type]);\n            move(event);\n          }\n          break;\n        }\n        default: return;\n      }\n      Object(_noevent_js__WEBPACK_IMPORTED_MODULE_7__[\"default\"])(event);\n    }\n  }\n\n  function touchmoved(event) {\n    emitter(this, arguments).moved(event);\n  }\n\n  function touchended(event) {\n    emitter(this, arguments).ended(event);\n  }\n\n  function initialize() {\n    var state = this.__brush || {selection: null};\n    state.extent = number2(extent.apply(this, arguments));\n    state.dim = dim;\n    return state;\n  }\n\n  brush.extent = function(_) {\n    return arguments.length ? (extent = typeof _ === \"function\" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(number2(_)), brush) : extent;\n  };\n\n  brush.filter = function(_) {\n    return arguments.length ? (filter = typeof _ === \"function\" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(!!_), brush) : filter;\n  };\n\n  brush.touchable = function(_) {\n    return arguments.length ? (touchable = typeof _ === \"function\" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(!!_), brush) : touchable;\n  };\n\n  brush.handleSize = function(_) {\n    return arguments.length ? (handleSize = +_, brush) : handleSize;\n  };\n\n  brush.keyModifiers = function(_) {\n    return arguments.length ? (keys = !!_, brush) : keys;\n  };\n\n  brush.on = function() {\n    var value = listeners.on.apply(listeners, arguments);\n    return value === listeners ? brush : value;\n  };\n\n  return brush;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-brush/src/constant.js\":\n/*!***********************************************!*\\\n  !*** ./node_modules/d3-brush/src/constant.js ***!\n  \\***********************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (x => () => x);\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-brush/src/event.js\":\n/*!********************************************!*\\\n  !*** ./node_modules/d3-brush/src/event.js ***!\n  \\********************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return BrushEvent; });\nfunction BrushEvent(type, {\n  sourceEvent,\n  target,\n  selection,\n  mode,\n  dispatch\n}) {\n  Object.defineProperties(this, {\n    type: {value: type, enumerable: true, configurable: true},\n    sourceEvent: {value: sourceEvent, enumerable: true, configurable: true},\n    target: {value: target, enumerable: true, configurable: true},\n    selection: {value: selection, enumerable: true, configurable: true},\n    mode: {value: mode, enumerable: true, configurable: true},\n    _: {value: dispatch}\n  });\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-brush/src/index.js\":\n/*!********************************************!*\\\n  !*** ./node_modules/d3-brush/src/index.js ***!\n  \\********************************************/\n/*! exports provided: brush, brushX, brushY, brushSelection */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _brush_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./brush.js */ \"./node_modules/d3-brush/src/brush.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"brush\", function() { return _brush_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"brushX\", function() { return _brush_js__WEBPACK_IMPORTED_MODULE_0__[\"brushX\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"brushY\", function() { return _brush_js__WEBPACK_IMPORTED_MODULE_0__[\"brushY\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"brushSelection\", function() { return _brush_js__WEBPACK_IMPORTED_MODULE_0__[\"brushSelection\"]; });\n\n\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-brush/src/noevent.js\":\n/*!**********************************************!*\\\n  !*** ./node_modules/d3-brush/src/noevent.js ***!\n  \\**********************************************/\n/*! exports provided: nopropagation, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"nopropagation\", function() { return nopropagation; });\nfunction nopropagation(event) {\n  event.stopImmediatePropagation();\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(event) {\n  event.preventDefault();\n  event.stopImmediatePropagation();\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-chord/node_modules/d3-path/src/index.js\":\n/*!*****************************************************************!*\\\n  !*** ./node_modules/d3-chord/node_modules/d3-path/src/index.js ***!\n  \\*****************************************************************/\n/*! exports provided: path */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _path_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./path.js */ \"./node_modules/d3-chord/node_modules/d3-path/src/path.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"path\", function() { return _path_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-chord/node_modules/d3-path/src/path.js\":\n/*!****************************************************************!*\\\n  !*** ./node_modules/d3-chord/node_modules/d3-path/src/path.js ***!\n  \\****************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\nconst pi = Math.PI,\n    tau = 2 * pi,\n    epsilon = 1e-6,\n    tauEpsilon = tau - epsilon;\n\nfunction Path() {\n  this._x0 = this._y0 = // start of current subpath\n  this._x1 = this._y1 = null; // end of current subpath\n  this._ = \"\";\n}\n\nfunction path() {\n  return new Path;\n}\n\nPath.prototype = path.prototype = {\n  constructor: Path,\n  moveTo: function(x, y) {\n    this._ += \"M\" + (this._x0 = this._x1 = +x) + \",\" + (this._y0 = this._y1 = +y);\n  },\n  closePath: function() {\n    if (this._x1 !== null) {\n      this._x1 = this._x0, this._y1 = this._y0;\n      this._ += \"Z\";\n    }\n  },\n  lineTo: function(x, y) {\n    this._ += \"L\" + (this._x1 = +x) + \",\" + (this._y1 = +y);\n  },\n  quadraticCurveTo: function(x1, y1, x, y) {\n    this._ += \"Q\" + (+x1) + \",\" + (+y1) + \",\" + (this._x1 = +x) + \",\" + (this._y1 = +y);\n  },\n  bezierCurveTo: function(x1, y1, x2, y2, x, y) {\n    this._ += \"C\" + (+x1) + \",\" + (+y1) + \",\" + (+x2) + \",\" + (+y2) + \",\" + (this._x1 = +x) + \",\" + (this._y1 = +y);\n  },\n  arcTo: function(x1, y1, x2, y2, r) {\n    x1 = +x1, y1 = +y1, x2 = +x2, y2 = +y2, r = +r;\n    var x0 = this._x1,\n        y0 = this._y1,\n        x21 = x2 - x1,\n        y21 = y2 - y1,\n        x01 = x0 - x1,\n        y01 = y0 - y1,\n        l01_2 = x01 * x01 + y01 * y01;\n\n    // Is the radius negative? Error.\n    if (r < 0) throw new Error(\"negative radius: \" + r);\n\n    // Is this path empty? Move to (x1,y1).\n    if (this._x1 === null) {\n      this._ += \"M\" + (this._x1 = x1) + \",\" + (this._y1 = y1);\n    }\n\n    // Or, is (x1,y1) coincident with (x0,y0)? Do nothing.\n    else if (!(l01_2 > epsilon));\n\n    // Or, are (x0,y0), (x1,y1) and (x2,y2) collinear?\n    // Equivalently, is (x1,y1) coincident with (x2,y2)?\n    // Or, is the radius zero? Line to (x1,y1).\n    else if (!(Math.abs(y01 * x21 - y21 * x01) > epsilon) || !r) {\n      this._ += \"L\" + (this._x1 = x1) + \",\" + (this._y1 = y1);\n    }\n\n    // Otherwise, draw an arc!\n    else {\n      var x20 = x2 - x0,\n          y20 = y2 - y0,\n          l21_2 = x21 * x21 + y21 * y21,\n          l20_2 = x20 * x20 + y20 * y20,\n          l21 = Math.sqrt(l21_2),\n          l01 = Math.sqrt(l01_2),\n          l = r * Math.tan((pi - Math.acos((l21_2 + l01_2 - l20_2) / (2 * l21 * l01))) / 2),\n          t01 = l / l01,\n          t21 = l / l21;\n\n      // If the start tangent is not coincident with (x0,y0), line to.\n      if (Math.abs(t01 - 1) > epsilon) {\n        this._ += \"L\" + (x1 + t01 * x01) + \",\" + (y1 + t01 * y01);\n      }\n\n      this._ += \"A\" + r + \",\" + r + \",0,0,\" + (+(y01 * x20 > x01 * y20)) + \",\" + (this._x1 = x1 + t21 * x21) + \",\" + (this._y1 = y1 + t21 * y21);\n    }\n  },\n  arc: function(x, y, r, a0, a1, ccw) {\n    x = +x, y = +y, r = +r, ccw = !!ccw;\n    var dx = r * Math.cos(a0),\n        dy = r * Math.sin(a0),\n        x0 = x + dx,\n        y0 = y + dy,\n        cw = 1 ^ ccw,\n        da = ccw ? a0 - a1 : a1 - a0;\n\n    // Is the radius negative? Error.\n    if (r < 0) throw new Error(\"negative radius: \" + r);\n\n    // Is this path empty? Move to (x0,y0).\n    if (this._x1 === null) {\n      this._ += \"M\" + x0 + \",\" + y0;\n    }\n\n    // Or, is (x0,y0) not coincident with the previous point? Line to (x0,y0).\n    else if (Math.abs(this._x1 - x0) > epsilon || Math.abs(this._y1 - y0) > epsilon) {\n      this._ += \"L\" + x0 + \",\" + y0;\n    }\n\n    // Is this arc empty? We’re done.\n    if (!r) return;\n\n    // Does the angle go the wrong way? Flip the direction.\n    if (da < 0) da = da % tau + tau;\n\n    // Is this a complete circle? Draw two arcs to complete the circle.\n    if (da > tauEpsilon) {\n      this._ += \"A\" + r + \",\" + r + \",0,1,\" + cw + \",\" + (x - dx) + \",\" + (y - dy) + \"A\" + r + \",\" + r + \",0,1,\" + cw + \",\" + (this._x1 = x0) + \",\" + (this._y1 = y0);\n    }\n\n    // Is this arc non-empty? Draw an arc!\n    else if (da > epsilon) {\n      this._ += \"A\" + r + \",\" + r + \",0,\" + (+(da >= pi)) + \",\" + cw + \",\" + (this._x1 = x + r * Math.cos(a1)) + \",\" + (this._y1 = y + r * Math.sin(a1));\n    }\n  },\n  rect: function(x, y, w, h) {\n    this._ += \"M\" + (this._x0 = this._x1 = +x) + \",\" + (this._y0 = this._y1 = +y) + \"h\" + (+w) + \"v\" + (+h) + \"h\" + (-w) + \"Z\";\n  },\n  toString: function() {\n    return this._;\n  }\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (path);\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-chord/src/array.js\":\n/*!********************************************!*\\\n  !*** ./node_modules/d3-chord/src/array.js ***!\n  \\********************************************/\n/*! exports provided: slice */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"slice\", function() { return slice; });\nvar slice = Array.prototype.slice;\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-chord/src/chord.js\":\n/*!********************************************!*\\\n  !*** ./node_modules/d3-chord/src/chord.js ***!\n  \\********************************************/\n/*! exports provided: default, chordTranspose, chordDirected */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"chordTranspose\", function() { return chordTranspose; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"chordDirected\", function() { return chordDirected; });\n/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./math.js */ \"./node_modules/d3-chord/src/math.js\");\n\n\nfunction range(i, j) {\n  return Array.from({length: j - i}, (_, k) => i + k);\n}\n\nfunction compareValue(compare) {\n  return function(a, b) {\n    return compare(\n      a.source.value + a.target.value,\n      b.source.value + b.target.value\n    );\n  };\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  return chord(false, false);\n});\n\nfunction chordTranspose() {\n  return chord(false, true);\n}\n\nfunction chordDirected() {\n  return chord(true, false);\n}\n\nfunction chord(directed, transpose) {\n  var padAngle = 0,\n      sortGroups = null,\n      sortSubgroups = null,\n      sortChords = null;\n\n  function chord(matrix) {\n    var n = matrix.length,\n        groupSums = new Array(n),\n        groupIndex = range(0, n),\n        chords = new Array(n * n),\n        groups = new Array(n),\n        k = 0, dx;\n\n    matrix = Float64Array.from({length: n * n}, transpose\n        ? (_, i) => matrix[i % n][i / n | 0]\n        : (_, i) => matrix[i / n | 0][i % n]);\n\n    // Compute the scaling factor from value to angle in [0, 2pi].\n    for (let i = 0; i < n; ++i) {\n      let x = 0;\n      for (let j = 0; j < n; ++j) x += matrix[i * n + j] + directed * matrix[j * n + i];\n      k += groupSums[i] = x;\n    }\n    k = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"max\"])(0, _math_js__WEBPACK_IMPORTED_MODULE_0__[\"tau\"] - padAngle * n) / k;\n    dx = k ? padAngle : _math_js__WEBPACK_IMPORTED_MODULE_0__[\"tau\"] / n;\n\n    // Compute the angles for each group and constituent chord.\n    {\n      let x = 0;\n      if (sortGroups) groupIndex.sort((a, b) => sortGroups(groupSums[a], groupSums[b]));\n      for (const i of groupIndex) {\n        const x0 = x;\n        if (directed) {\n          const subgroupIndex = range(~n + 1, n).filter(j => j < 0 ? matrix[~j * n + i] : matrix[i * n + j]);\n          if (sortSubgroups) subgroupIndex.sort((a, b) => sortSubgroups(a < 0 ? -matrix[~a * n + i] : matrix[i * n + a], b < 0 ? -matrix[~b * n + i] : matrix[i * n + b]));\n          for (const j of subgroupIndex) {\n            if (j < 0) {\n              const chord = chords[~j * n + i] || (chords[~j * n + i] = {source: null, target: null});\n              chord.target = {index: i, startAngle: x, endAngle: x += matrix[~j * n + i] * k, value: matrix[~j * n + i]};\n            } else {\n              const chord = chords[i * n + j] || (chords[i * n + j] = {source: null, target: null});\n              chord.source = {index: i, startAngle: x, endAngle: x += matrix[i * n + j] * k, value: matrix[i * n + j]};\n            }\n          }\n          groups[i] = {index: i, startAngle: x0, endAngle: x, value: groupSums[i]};\n        } else {\n          const subgroupIndex = range(0, n).filter(j => matrix[i * n + j] || matrix[j * n + i]);\n          if (sortSubgroups) subgroupIndex.sort((a, b) => sortSubgroups(matrix[i * n + a], matrix[i * n + b]));\n          for (const j of subgroupIndex) {\n            let chord;\n            if (i < j) {\n              chord = chords[i * n + j] || (chords[i * n + j] = {source: null, target: null});\n              chord.source = {index: i, startAngle: x, endAngle: x += matrix[i * n + j] * k, value: matrix[i * n + j]};\n            } else {\n              chord = chords[j * n + i] || (chords[j * n + i] = {source: null, target: null});\n              chord.target = {index: i, startAngle: x, endAngle: x += matrix[i * n + j] * k, value: matrix[i * n + j]};\n              if (i === j) chord.source = chord.target;\n            }\n            if (chord.source && chord.target && chord.source.value < chord.target.value) {\n              const source = chord.source;\n              chord.source = chord.target;\n              chord.target = source;\n            }\n          }\n          groups[i] = {index: i, startAngle: x0, endAngle: x, value: groupSums[i]};\n        }\n        x += dx;\n      }\n    }\n\n    // Remove empty chords.\n    chords = Object.values(chords);\n    chords.groups = groups;\n    return sortChords ? chords.sort(sortChords) : chords;\n  }\n\n  chord.padAngle = function(_) {\n    return arguments.length ? (padAngle = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"max\"])(0, _), chord) : padAngle;\n  };\n\n  chord.sortGroups = function(_) {\n    return arguments.length ? (sortGroups = _, chord) : sortGroups;\n  };\n\n  chord.sortSubgroups = function(_) {\n    return arguments.length ? (sortSubgroups = _, chord) : sortSubgroups;\n  };\n\n  chord.sortChords = function(_) {\n    return arguments.length ? (_ == null ? sortChords = null : (sortChords = compareValue(_))._ = _, chord) : sortChords && sortChords._;\n  };\n\n  return chord;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-chord/src/constant.js\":\n/*!***********************************************!*\\\n  !*** ./node_modules/d3-chord/src/constant.js ***!\n  \\***********************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(x) {\n  return function() {\n    return x;\n  };\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-chord/src/index.js\":\n/*!********************************************!*\\\n  !*** ./node_modules/d3-chord/src/index.js ***!\n  \\********************************************/\n/*! exports provided: chord, chordTranspose, chordDirected, ribbon, ribbonArrow */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _chord_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./chord.js */ \"./node_modules/d3-chord/src/chord.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"chord\", function() { return _chord_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"chordTranspose\", function() { return _chord_js__WEBPACK_IMPORTED_MODULE_0__[\"chordTranspose\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"chordDirected\", function() { return _chord_js__WEBPACK_IMPORTED_MODULE_0__[\"chordDirected\"]; });\n\n/* harmony import */ var _ribbon_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./ribbon.js */ \"./node_modules/d3-chord/src/ribbon.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"ribbon\", function() { return _ribbon_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"ribbonArrow\", function() { return _ribbon_js__WEBPACK_IMPORTED_MODULE_1__[\"ribbonArrow\"]; });\n\n\n\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-chord/src/math.js\":\n/*!*******************************************!*\\\n  !*** ./node_modules/d3-chord/src/math.js ***!\n  \\*******************************************/\n/*! exports provided: abs, cos, sin, pi, halfPi, tau, max, epsilon */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"abs\", function() { return abs; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"cos\", function() { return cos; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"sin\", function() { return sin; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"pi\", function() { return pi; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"halfPi\", function() { return halfPi; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"tau\", function() { return tau; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"max\", function() { return max; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"epsilon\", function() { return epsilon; });\nvar abs = Math.abs;\nvar cos = Math.cos;\nvar sin = Math.sin;\nvar pi = Math.PI;\nvar halfPi = pi / 2;\nvar tau = pi * 2;\nvar max = Math.max;\nvar epsilon = 1e-12;\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-chord/src/ribbon.js\":\n/*!*********************************************!*\\\n  !*** ./node_modules/d3-chord/src/ribbon.js ***!\n  \\*********************************************/\n/*! exports provided: default, ribbonArrow */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"ribbonArrow\", function() { return ribbonArrow; });\n/* harmony import */ var d3_path__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-path */ \"./node_modules/d3-chord/node_modules/d3-path/src/index.js\");\n/* harmony import */ var _array_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./array.js */ \"./node_modules/d3-chord/src/array.js\");\n/* harmony import */ var _constant_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./constant.js */ \"./node_modules/d3-chord/src/constant.js\");\n/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./math.js */ \"./node_modules/d3-chord/src/math.js\");\n\n\n\n\n\nfunction defaultSource(d) {\n  return d.source;\n}\n\nfunction defaultTarget(d) {\n  return d.target;\n}\n\nfunction defaultRadius(d) {\n  return d.radius;\n}\n\nfunction defaultStartAngle(d) {\n  return d.startAngle;\n}\n\nfunction defaultEndAngle(d) {\n  return d.endAngle;\n}\n\nfunction defaultPadAngle() {\n  return 0;\n}\n\nfunction defaultArrowheadRadius() {\n  return 10;\n}\n\nfunction ribbon(headRadius) {\n  var source = defaultSource,\n      target = defaultTarget,\n      sourceRadius = defaultRadius,\n      targetRadius = defaultRadius,\n      startAngle = defaultStartAngle,\n      endAngle = defaultEndAngle,\n      padAngle = defaultPadAngle,\n      context = null;\n\n  function ribbon() {\n    var buffer,\n        s = source.apply(this, arguments),\n        t = target.apply(this, arguments),\n        ap = padAngle.apply(this, arguments) / 2,\n        argv = _array_js__WEBPACK_IMPORTED_MODULE_1__[\"slice\"].call(arguments),\n        sr = +sourceRadius.apply(this, (argv[0] = s, argv)),\n        sa0 = startAngle.apply(this, argv) - _math_js__WEBPACK_IMPORTED_MODULE_3__[\"halfPi\"],\n        sa1 = endAngle.apply(this, argv) - _math_js__WEBPACK_IMPORTED_MODULE_3__[\"halfPi\"],\n        tr = +targetRadius.apply(this, (argv[0] = t, argv)),\n        ta0 = startAngle.apply(this, argv) - _math_js__WEBPACK_IMPORTED_MODULE_3__[\"halfPi\"],\n        ta1 = endAngle.apply(this, argv) - _math_js__WEBPACK_IMPORTED_MODULE_3__[\"halfPi\"];\n\n    if (!context) context = buffer = Object(d3_path__WEBPACK_IMPORTED_MODULE_0__[\"path\"])();\n\n    if (ap > _math_js__WEBPACK_IMPORTED_MODULE_3__[\"epsilon\"]) {\n      if (Object(_math_js__WEBPACK_IMPORTED_MODULE_3__[\"abs\"])(sa1 - sa0) > ap * 2 + _math_js__WEBPACK_IMPORTED_MODULE_3__[\"epsilon\"]) sa1 > sa0 ? (sa0 += ap, sa1 -= ap) : (sa0 -= ap, sa1 += ap);\n      else sa0 = sa1 = (sa0 + sa1) / 2;\n      if (Object(_math_js__WEBPACK_IMPORTED_MODULE_3__[\"abs\"])(ta1 - ta0) > ap * 2 + _math_js__WEBPACK_IMPORTED_MODULE_3__[\"epsilon\"]) ta1 > ta0 ? (ta0 += ap, ta1 -= ap) : (ta0 -= ap, ta1 += ap);\n      else ta0 = ta1 = (ta0 + ta1) / 2;\n    }\n\n    context.moveTo(sr * Object(_math_js__WEBPACK_IMPORTED_MODULE_3__[\"cos\"])(sa0), sr * Object(_math_js__WEBPACK_IMPORTED_MODULE_3__[\"sin\"])(sa0));\n    context.arc(0, 0, sr, sa0, sa1);\n    if (sa0 !== ta0 || sa1 !== ta1) {\n      if (headRadius) {\n        var hr = +headRadius.apply(this, arguments), tr2 = tr - hr, ta2 = (ta0 + ta1) / 2;\n        context.quadraticCurveTo(0, 0, tr2 * Object(_math_js__WEBPACK_IMPORTED_MODULE_3__[\"cos\"])(ta0), tr2 * Object(_math_js__WEBPACK_IMPORTED_MODULE_3__[\"sin\"])(ta0));\n        context.lineTo(tr * Object(_math_js__WEBPACK_IMPORTED_MODULE_3__[\"cos\"])(ta2), tr * Object(_math_js__WEBPACK_IMPORTED_MODULE_3__[\"sin\"])(ta2));\n        context.lineTo(tr2 * Object(_math_js__WEBPACK_IMPORTED_MODULE_3__[\"cos\"])(ta1), tr2 * Object(_math_js__WEBPACK_IMPORTED_MODULE_3__[\"sin\"])(ta1));\n      } else {\n        context.quadraticCurveTo(0, 0, tr * Object(_math_js__WEBPACK_IMPORTED_MODULE_3__[\"cos\"])(ta0), tr * Object(_math_js__WEBPACK_IMPORTED_MODULE_3__[\"sin\"])(ta0));\n        context.arc(0, 0, tr, ta0, ta1);\n      }\n    }\n    context.quadraticCurveTo(0, 0, sr * Object(_math_js__WEBPACK_IMPORTED_MODULE_3__[\"cos\"])(sa0), sr * Object(_math_js__WEBPACK_IMPORTED_MODULE_3__[\"sin\"])(sa0));\n    context.closePath();\n\n    if (buffer) return context = null, buffer + \"\" || null;\n  }\n\n  if (headRadius) ribbon.headRadius = function(_) {\n    return arguments.length ? (headRadius = typeof _ === \"function\" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(+_), ribbon) : headRadius;\n  };\n\n  ribbon.radius = function(_) {\n    return arguments.length ? (sourceRadius = targetRadius = typeof _ === \"function\" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(+_), ribbon) : sourceRadius;\n  };\n\n  ribbon.sourceRadius = function(_) {\n    return arguments.length ? (sourceRadius = typeof _ === \"function\" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(+_), ribbon) : sourceRadius;\n  };\n\n  ribbon.targetRadius = function(_) {\n    return arguments.length ? (targetRadius = typeof _ === \"function\" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(+_), ribbon) : targetRadius;\n  };\n\n  ribbon.startAngle = function(_) {\n    return arguments.length ? (startAngle = typeof _ === \"function\" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(+_), ribbon) : startAngle;\n  };\n\n  ribbon.endAngle = function(_) {\n    return arguments.length ? (endAngle = typeof _ === \"function\" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(+_), ribbon) : endAngle;\n  };\n\n  ribbon.padAngle = function(_) {\n    return arguments.length ? (padAngle = typeof _ === \"function\" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(+_), ribbon) : padAngle;\n  };\n\n  ribbon.source = function(_) {\n    return arguments.length ? (source = _, ribbon) : source;\n  };\n\n  ribbon.target = function(_) {\n    return arguments.length ? (target = _, ribbon) : target;\n  };\n\n  ribbon.context = function(_) {\n    return arguments.length ? ((context = _ == null ? null : _), ribbon) : context;\n  };\n\n  return ribbon;\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  return ribbon();\n});\n\nfunction ribbonArrow() {\n  return ribbon(defaultArrowheadRadius);\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-collection/src/entries.js\":\n/*!***************************************************!*\\\n  !*** ./node_modules/d3-collection/src/entries.js ***!\n  \\***************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(map) {\n  var entries = [];\n  for (var key in map) entries.push({key: key, value: map[key]});\n  return entries;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-collection/src/index.js\":\n/*!*************************************************!*\\\n  !*** ./node_modules/d3-collection/src/index.js ***!\n  \\*************************************************/\n/*! exports provided: nest, set, map, keys, values, entries */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _nest__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./nest */ \"./node_modules/d3-collection/src/nest.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"nest\", function() { return _nest__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n/* harmony import */ var _set__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./set */ \"./node_modules/d3-collection/src/set.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"set\", function() { return _set__WEBPACK_IMPORTED_MODULE_1__[\"default\"]; });\n\n/* harmony import */ var _map__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./map */ \"./node_modules/d3-collection/src/map.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"map\", function() { return _map__WEBPACK_IMPORTED_MODULE_2__[\"default\"]; });\n\n/* harmony import */ var _keys__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./keys */ \"./node_modules/d3-collection/src/keys.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"keys\", function() { return _keys__WEBPACK_IMPORTED_MODULE_3__[\"default\"]; });\n\n/* harmony import */ var _values__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./values */ \"./node_modules/d3-collection/src/values.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"values\", function() { return _values__WEBPACK_IMPORTED_MODULE_4__[\"default\"]; });\n\n/* harmony import */ var _entries__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./entries */ \"./node_modules/d3-collection/src/entries.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"entries\", function() { return _entries__WEBPACK_IMPORTED_MODULE_5__[\"default\"]; });\n\n\n\n\n\n\n\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-collection/src/keys.js\":\n/*!************************************************!*\\\n  !*** ./node_modules/d3-collection/src/keys.js ***!\n  \\************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(map) {\n  var keys = [];\n  for (var key in map) keys.push(key);\n  return keys;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-collection/src/map.js\":\n/*!***********************************************!*\\\n  !*** ./node_modules/d3-collection/src/map.js ***!\n  \\***********************************************/\n/*! exports provided: prefix, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"prefix\", function() { return prefix; });\nvar prefix = \"$\";\n\nfunction Map() {}\n\nMap.prototype = map.prototype = {\n  constructor: Map,\n  has: function(key) {\n    return (prefix + key) in this;\n  },\n  get: function(key) {\n    return this[prefix + key];\n  },\n  set: function(key, value) {\n    this[prefix + key] = value;\n    return this;\n  },\n  remove: function(key) {\n    var property = prefix + key;\n    return property in this && delete this[property];\n  },\n  clear: function() {\n    for (var property in this) if (property[0] === prefix) delete this[property];\n  },\n  keys: function() {\n    var keys = [];\n    for (var property in this) if (property[0] === prefix) keys.push(property.slice(1));\n    return keys;\n  },\n  values: function() {\n    var values = [];\n    for (var property in this) if (property[0] === prefix) values.push(this[property]);\n    return values;\n  },\n  entries: function() {\n    var entries = [];\n    for (var property in this) if (property[0] === prefix) entries.push({key: property.slice(1), value: this[property]});\n    return entries;\n  },\n  size: function() {\n    var size = 0;\n    for (var property in this) if (property[0] === prefix) ++size;\n    return size;\n  },\n  empty: function() {\n    for (var property in this) if (property[0] === prefix) return false;\n    return true;\n  },\n  each: function(f) {\n    for (var property in this) if (property[0] === prefix) f(this[property], property.slice(1), this);\n  }\n};\n\nfunction map(object, f) {\n  var map = new Map;\n\n  // Copy constructor.\n  if (object instanceof Map) object.each(function(value, key) { map.set(key, value); });\n\n  // Index array by numeric index or specified key function.\n  else if (Array.isArray(object)) {\n    var i = -1,\n        n = object.length,\n        o;\n\n    if (f == null) while (++i < n) map.set(i, object[i]);\n    else while (++i < n) map.set(f(o = object[i], i, object), o);\n  }\n\n  // Convert object to map.\n  else if (object) for (var key in object) map.set(key, object[key]);\n\n  return map;\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (map);\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-collection/src/nest.js\":\n/*!************************************************!*\\\n  !*** ./node_modules/d3-collection/src/nest.js ***!\n  \\************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _map__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./map */ \"./node_modules/d3-collection/src/map.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  var keys = [],\n      sortKeys = [],\n      sortValues,\n      rollup,\n      nest;\n\n  function apply(array, depth, createResult, setResult) {\n    if (depth >= keys.length) {\n      if (sortValues != null) array.sort(sortValues);\n      return rollup != null ? rollup(array) : array;\n    }\n\n    var i = -1,\n        n = array.length,\n        key = keys[depth++],\n        keyValue,\n        value,\n        valuesByKey = Object(_map__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(),\n        values,\n        result = createResult();\n\n    while (++i < n) {\n      if (values = valuesByKey.get(keyValue = key(value = array[i]) + \"\")) {\n        values.push(value);\n      } else {\n        valuesByKey.set(keyValue, [value]);\n      }\n    }\n\n    valuesByKey.each(function(values, key) {\n      setResult(result, key, apply(values, depth, createResult, setResult));\n    });\n\n    return result;\n  }\n\n  function entries(map, depth) {\n    if (++depth > keys.length) return map;\n    var array, sortKey = sortKeys[depth - 1];\n    if (rollup != null && depth >= keys.length) array = map.entries();\n    else array = [], map.each(function(v, k) { array.push({key: k, values: entries(v, depth)}); });\n    return sortKey != null ? array.sort(function(a, b) { return sortKey(a.key, b.key); }) : array;\n  }\n\n  return nest = {\n    object: function(array) { return apply(array, 0, createObject, setObject); },\n    map: function(array) { return apply(array, 0, createMap, setMap); },\n    entries: function(array) { return entries(apply(array, 0, createMap, setMap), 0); },\n    key: function(d) { keys.push(d); return nest; },\n    sortKeys: function(order) { sortKeys[keys.length - 1] = order; return nest; },\n    sortValues: function(order) { sortValues = order; return nest; },\n    rollup: function(f) { rollup = f; return nest; }\n  };\n});\n\nfunction createObject() {\n  return {};\n}\n\nfunction setObject(object, key, value) {\n  object[key] = value;\n}\n\nfunction createMap() {\n  return Object(_map__WEBPACK_IMPORTED_MODULE_0__[\"default\"])();\n}\n\nfunction setMap(map, key, value) {\n  map.set(key, value);\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-collection/src/set.js\":\n/*!***********************************************!*\\\n  !*** ./node_modules/d3-collection/src/set.js ***!\n  \\***********************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _map__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./map */ \"./node_modules/d3-collection/src/map.js\");\n\n\nfunction Set() {}\n\nvar proto = _map__WEBPACK_IMPORTED_MODULE_0__[\"default\"].prototype;\n\nSet.prototype = set.prototype = {\n  constructor: Set,\n  has: proto.has,\n  add: function(value) {\n    value += \"\";\n    this[_map__WEBPACK_IMPORTED_MODULE_0__[\"prefix\"] + value] = value;\n    return this;\n  },\n  remove: proto.remove,\n  clear: proto.clear,\n  values: proto.keys,\n  size: proto.size,\n  empty: proto.empty,\n  each: proto.each\n};\n\nfunction set(object, f) {\n  var set = new Set;\n\n  // Copy constructor.\n  if (object instanceof Set) object.each(function(value) { set.add(value); });\n\n  // Otherwise, assume it’s an array.\n  else if (object) {\n    var i = -1, n = object.length;\n    if (f == null) while (++i < n) set.add(object[i]);\n    else while (++i < n) set.add(f(object[i], i, object));\n  }\n\n  return set;\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (set);\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-collection/src/values.js\":\n/*!**************************************************!*\\\n  !*** ./node_modules/d3-collection/src/values.js ***!\n  \\**************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(map) {\n  var values = [];\n  for (var key in map) values.push(map[key]);\n  return values;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-color/src/color.js\":\n/*!********************************************!*\\\n  !*** ./node_modules/d3-color/src/color.js ***!\n  \\********************************************/\n/*! exports provided: Color, darker, brighter, default, rgbConvert, rgb, Rgb, hslConvert, hsl */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Color\", function() { return Color; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"darker\", function() { return darker; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"brighter\", function() { return brighter; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return color; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"rgbConvert\", function() { return rgbConvert; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"rgb\", function() { return rgb; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Rgb\", function() { return Rgb; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"hslConvert\", function() { return hslConvert; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"hsl\", function() { return hsl; });\n/* harmony import */ var _define_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./define.js */ \"./node_modules/d3-color/src/define.js\");\n\n\nfunction Color() {}\n\nvar darker = 0.7;\nvar brighter = 1 / darker;\n\nvar reI = \"\\\\s*([+-]?\\\\d+)\\\\s*\",\n    reN = \"\\\\s*([+-]?\\\\d*\\\\.?\\\\d+(?:[eE][+-]?\\\\d+)?)\\\\s*\",\n    reP = \"\\\\s*([+-]?\\\\d*\\\\.?\\\\d+(?:[eE][+-]?\\\\d+)?)%\\\\s*\",\n    reHex = /^#([0-9a-f]{3,8})$/,\n    reRgbInteger = new RegExp(\"^rgb\\\\(\" + [reI, reI, reI] + \"\\\\)$\"),\n    reRgbPercent = new RegExp(\"^rgb\\\\(\" + [reP, reP, reP] + \"\\\\)$\"),\n    reRgbaInteger = new RegExp(\"^rgba\\\\(\" + [reI, reI, reI, reN] + \"\\\\)$\"),\n    reRgbaPercent = new RegExp(\"^rgba\\\\(\" + [reP, reP, reP, reN] + \"\\\\)$\"),\n    reHslPercent = new RegExp(\"^hsl\\\\(\" + [reN, reP, reP] + \"\\\\)$\"),\n    reHslaPercent = new RegExp(\"^hsla\\\\(\" + [reN, reP, reP, reN] + \"\\\\)$\");\n\nvar named = {\n  aliceblue: 0xf0f8ff,\n  antiquewhite: 0xfaebd7,\n  aqua: 0x00ffff,\n  aquamarine: 0x7fffd4,\n  azure: 0xf0ffff,\n  beige: 0xf5f5dc,\n  bisque: 0xffe4c4,\n  black: 0x000000,\n  blanchedalmond: 0xffebcd,\n  blue: 0x0000ff,\n  blueviolet: 0x8a2be2,\n  brown: 0xa52a2a,\n  burlywood: 0xdeb887,\n  cadetblue: 0x5f9ea0,\n  chartreuse: 0x7fff00,\n  chocolate: 0xd2691e,\n  coral: 0xff7f50,\n  cornflowerblue: 0x6495ed,\n  cornsilk: 0xfff8dc,\n  crimson: 0xdc143c,\n  cyan: 0x00ffff,\n  darkblue: 0x00008b,\n  darkcyan: 0x008b8b,\n  darkgoldenrod: 0xb8860b,\n  darkgray: 0xa9a9a9,\n  darkgreen: 0x006400,\n  darkgrey: 0xa9a9a9,\n  darkkhaki: 0xbdb76b,\n  darkmagenta: 0x8b008b,\n  darkolivegreen: 0x556b2f,\n  darkorange: 0xff8c00,\n  darkorchid: 0x9932cc,\n  darkred: 0x8b0000,\n  darksalmon: 0xe9967a,\n  darkseagreen: 0x8fbc8f,\n  darkslateblue: 0x483d8b,\n  darkslategray: 0x2f4f4f,\n  darkslategrey: 0x2f4f4f,\n  darkturquoise: 0x00ced1,\n  darkviolet: 0x9400d3,\n  deeppink: 0xff1493,\n  deepskyblue: 0x00bfff,\n  dimgray: 0x696969,\n  dimgrey: 0x696969,\n  dodgerblue: 0x1e90ff,\n  firebrick: 0xb22222,\n  floralwhite: 0xfffaf0,\n  forestgreen: 0x228b22,\n  fuchsia: 0xff00ff,\n  gainsboro: 0xdcdcdc,\n  ghostwhite: 0xf8f8ff,\n  gold: 0xffd700,\n  goldenrod: 0xdaa520,\n  gray: 0x808080,\n  green: 0x008000,\n  greenyellow: 0xadff2f,\n  grey: 0x808080,\n  honeydew: 0xf0fff0,\n  hotpink: 0xff69b4,\n  indianred: 0xcd5c5c,\n  indigo: 0x4b0082,\n  ivory: 0xfffff0,\n  khaki: 0xf0e68c,\n  lavender: 0xe6e6fa,\n  lavenderblush: 0xfff0f5,\n  lawngreen: 0x7cfc00,\n  lemonchiffon: 0xfffacd,\n  lightblue: 0xadd8e6,\n  lightcoral: 0xf08080,\n  lightcyan: 0xe0ffff,\n  lightgoldenrodyellow: 0xfafad2,\n  lightgray: 0xd3d3d3,\n  lightgreen: 0x90ee90,\n  lightgrey: 0xd3d3d3,\n  lightpink: 0xffb6c1,\n  lightsalmon: 0xffa07a,\n  lightseagreen: 0x20b2aa,\n  lightskyblue: 0x87cefa,\n  lightslategray: 0x778899,\n  lightslategrey: 0x778899,\n  lightsteelblue: 0xb0c4de,\n  lightyellow: 0xffffe0,\n  lime: 0x00ff00,\n  limegreen: 0x32cd32,\n  linen: 0xfaf0e6,\n  magenta: 0xff00ff,\n  maroon: 0x800000,\n  mediumaquamarine: 0x66cdaa,\n  mediumblue: 0x0000cd,\n  mediumorchid: 0xba55d3,\n  mediumpurple: 0x9370db,\n  mediumseagreen: 0x3cb371,\n  mediumslateblue: 0x7b68ee,\n  mediumspringgreen: 0x00fa9a,\n  mediumturquoise: 0x48d1cc,\n  mediumvioletred: 0xc71585,\n  midnightblue: 0x191970,\n  mintcream: 0xf5fffa,\n  mistyrose: 0xffe4e1,\n  moccasin: 0xffe4b5,\n  navajowhite: 0xffdead,\n  navy: 0x000080,\n  oldlace: 0xfdf5e6,\n  olive: 0x808000,\n  olivedrab: 0x6b8e23,\n  orange: 0xffa500,\n  orangered: 0xff4500,\n  orchid: 0xda70d6,\n  palegoldenrod: 0xeee8aa,\n  palegreen: 0x98fb98,\n  paleturquoise: 0xafeeee,\n  palevioletred: 0xdb7093,\n  papayawhip: 0xffefd5,\n  peachpuff: 0xffdab9,\n  peru: 0xcd853f,\n  pink: 0xffc0cb,\n  plum: 0xdda0dd,\n  powderblue: 0xb0e0e6,\n  purple: 0x800080,\n  rebeccapurple: 0x663399,\n  red: 0xff0000,\n  rosybrown: 0xbc8f8f,\n  royalblue: 0x4169e1,\n  saddlebrown: 0x8b4513,\n  salmon: 0xfa8072,\n  sandybrown: 0xf4a460,\n  seagreen: 0x2e8b57,\n  seashell: 0xfff5ee,\n  sienna: 0xa0522d,\n  silver: 0xc0c0c0,\n  skyblue: 0x87ceeb,\n  slateblue: 0x6a5acd,\n  slategray: 0x708090,\n  slategrey: 0x708090,\n  snow: 0xfffafa,\n  springgreen: 0x00ff7f,\n  steelblue: 0x4682b4,\n  tan: 0xd2b48c,\n  teal: 0x008080,\n  thistle: 0xd8bfd8,\n  tomato: 0xff6347,\n  turquoise: 0x40e0d0,\n  violet: 0xee82ee,\n  wheat: 0xf5deb3,\n  white: 0xffffff,\n  whitesmoke: 0xf5f5f5,\n  yellow: 0xffff00,\n  yellowgreen: 0x9acd32\n};\n\nObject(_define_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(Color, color, {\n  copy: function(channels) {\n    return Object.assign(new this.constructor, this, channels);\n  },\n  displayable: function() {\n    return this.rgb().displayable();\n  },\n  hex: color_formatHex, // Deprecated! Use color.formatHex.\n  formatHex: color_formatHex,\n  formatHsl: color_formatHsl,\n  formatRgb: color_formatRgb,\n  toString: color_formatRgb\n});\n\nfunction color_formatHex() {\n  return this.rgb().formatHex();\n}\n\nfunction color_formatHsl() {\n  return hslConvert(this).formatHsl();\n}\n\nfunction color_formatRgb() {\n  return this.rgb().formatRgb();\n}\n\nfunction color(format) {\n  var m, l;\n  format = (format + \"\").trim().toLowerCase();\n  return (m = reHex.exec(format)) ? (l = m[1].length, m = parseInt(m[1], 16), l === 6 ? rgbn(m) // #ff0000\n      : l === 3 ? new Rgb((m >> 8 & 0xf) | (m >> 4 & 0xf0), (m >> 4 & 0xf) | (m & 0xf0), ((m & 0xf) << 4) | (m & 0xf), 1) // #f00\n      : l === 8 ? rgba(m >> 24 & 0xff, m >> 16 & 0xff, m >> 8 & 0xff, (m & 0xff) / 0xff) // #ff000000\n      : l === 4 ? rgba((m >> 12 & 0xf) | (m >> 8 & 0xf0), (m >> 8 & 0xf) | (m >> 4 & 0xf0), (m >> 4 & 0xf) | (m & 0xf0), (((m & 0xf) << 4) | (m & 0xf)) / 0xff) // #f000\n      : null) // invalid hex\n      : (m = reRgbInteger.exec(format)) ? new Rgb(m[1], m[2], m[3], 1) // rgb(255, 0, 0)\n      : (m = reRgbPercent.exec(format)) ? new Rgb(m[1] * 255 / 100, m[2] * 255 / 100, m[3] * 255 / 100, 1) // rgb(100%, 0%, 0%)\n      : (m = reRgbaInteger.exec(format)) ? rgba(m[1], m[2], m[3], m[4]) // rgba(255, 0, 0, 1)\n      : (m = reRgbaPercent.exec(format)) ? rgba(m[1] * 255 / 100, m[2] * 255 / 100, m[3] * 255 / 100, m[4]) // rgb(100%, 0%, 0%, 1)\n      : (m = reHslPercent.exec(format)) ? hsla(m[1], m[2] / 100, m[3] / 100, 1) // hsl(120, 50%, 50%)\n      : (m = reHslaPercent.exec(format)) ? hsla(m[1], m[2] / 100, m[3] / 100, m[4]) // hsla(120, 50%, 50%, 1)\n      : named.hasOwnProperty(format) ? rgbn(named[format]) // eslint-disable-line no-prototype-builtins\n      : format === \"transparent\" ? new Rgb(NaN, NaN, NaN, 0)\n      : null;\n}\n\nfunction rgbn(n) {\n  return new Rgb(n >> 16 & 0xff, n >> 8 & 0xff, n & 0xff, 1);\n}\n\nfunction rgba(r, g, b, a) {\n  if (a <= 0) r = g = b = NaN;\n  return new Rgb(r, g, b, a);\n}\n\nfunction rgbConvert(o) {\n  if (!(o instanceof Color)) o = color(o);\n  if (!o) return new Rgb;\n  o = o.rgb();\n  return new Rgb(o.r, o.g, o.b, o.opacity);\n}\n\nfunction rgb(r, g, b, opacity) {\n  return arguments.length === 1 ? rgbConvert(r) : new Rgb(r, g, b, opacity == null ? 1 : opacity);\n}\n\nfunction Rgb(r, g, b, opacity) {\n  this.r = +r;\n  this.g = +g;\n  this.b = +b;\n  this.opacity = +opacity;\n}\n\nObject(_define_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(Rgb, rgb, Object(_define_js__WEBPACK_IMPORTED_MODULE_0__[\"extend\"])(Color, {\n  brighter: function(k) {\n    k = k == null ? brighter : Math.pow(brighter, k);\n    return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity);\n  },\n  darker: function(k) {\n    k = k == null ? darker : Math.pow(darker, k);\n    return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity);\n  },\n  rgb: function() {\n    return this;\n  },\n  displayable: function() {\n    return (-0.5 <= this.r && this.r < 255.5)\n        && (-0.5 <= this.g && this.g < 255.5)\n        && (-0.5 <= this.b && this.b < 255.5)\n        && (0 <= this.opacity && this.opacity <= 1);\n  },\n  hex: rgb_formatHex, // Deprecated! Use color.formatHex.\n  formatHex: rgb_formatHex,\n  formatRgb: rgb_formatRgb,\n  toString: rgb_formatRgb\n}));\n\nfunction rgb_formatHex() {\n  return \"#\" + hex(this.r) + hex(this.g) + hex(this.b);\n}\n\nfunction rgb_formatRgb() {\n  var a = this.opacity; a = isNaN(a) ? 1 : Math.max(0, Math.min(1, a));\n  return (a === 1 ? \"rgb(\" : \"rgba(\")\n      + Math.max(0, Math.min(255, Math.round(this.r) || 0)) + \", \"\n      + Math.max(0, Math.min(255, Math.round(this.g) || 0)) + \", \"\n      + Math.max(0, Math.min(255, Math.round(this.b) || 0))\n      + (a === 1 ? \")\" : \", \" + a + \")\");\n}\n\nfunction hex(value) {\n  value = Math.max(0, Math.min(255, Math.round(value) || 0));\n  return (value < 16 ? \"0\" : \"\") + value.toString(16);\n}\n\nfunction hsla(h, s, l, a) {\n  if (a <= 0) h = s = l = NaN;\n  else if (l <= 0 || l >= 1) h = s = NaN;\n  else if (s <= 0) h = NaN;\n  return new Hsl(h, s, l, a);\n}\n\nfunction hslConvert(o) {\n  if (o instanceof Hsl) return new Hsl(o.h, o.s, o.l, o.opacity);\n  if (!(o instanceof Color)) o = color(o);\n  if (!o) return new Hsl;\n  if (o instanceof Hsl) return o;\n  o = o.rgb();\n  var r = o.r / 255,\n      g = o.g / 255,\n      b = o.b / 255,\n      min = Math.min(r, g, b),\n      max = Math.max(r, g, b),\n      h = NaN,\n      s = max - min,\n      l = (max + min) / 2;\n  if (s) {\n    if (r === max) h = (g - b) / s + (g < b) * 6;\n    else if (g === max) h = (b - r) / s + 2;\n    else h = (r - g) / s + 4;\n    s /= l < 0.5 ? max + min : 2 - max - min;\n    h *= 60;\n  } else {\n    s = l > 0 && l < 1 ? 0 : h;\n  }\n  return new Hsl(h, s, l, o.opacity);\n}\n\nfunction hsl(h, s, l, opacity) {\n  return arguments.length === 1 ? hslConvert(h) : new Hsl(h, s, l, opacity == null ? 1 : opacity);\n}\n\nfunction Hsl(h, s, l, opacity) {\n  this.h = +h;\n  this.s = +s;\n  this.l = +l;\n  this.opacity = +opacity;\n}\n\nObject(_define_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(Hsl, hsl, Object(_define_js__WEBPACK_IMPORTED_MODULE_0__[\"extend\"])(Color, {\n  brighter: function(k) {\n    k = k == null ? brighter : Math.pow(brighter, k);\n    return new Hsl(this.h, this.s, this.l * k, this.opacity);\n  },\n  darker: function(k) {\n    k = k == null ? darker : Math.pow(darker, k);\n    return new Hsl(this.h, this.s, this.l * k, this.opacity);\n  },\n  rgb: function() {\n    var h = this.h % 360 + (this.h < 0) * 360,\n        s = isNaN(h) || isNaN(this.s) ? 0 : this.s,\n        l = this.l,\n        m2 = l + (l < 0.5 ? l : 1 - l) * s,\n        m1 = 2 * l - m2;\n    return new Rgb(\n      hsl2rgb(h >= 240 ? h - 240 : h + 120, m1, m2),\n      hsl2rgb(h, m1, m2),\n      hsl2rgb(h < 120 ? h + 240 : h - 120, m1, m2),\n      this.opacity\n    );\n  },\n  displayable: function() {\n    return (0 <= this.s && this.s <= 1 || isNaN(this.s))\n        && (0 <= this.l && this.l <= 1)\n        && (0 <= this.opacity && this.opacity <= 1);\n  },\n  formatHsl: function() {\n    var a = this.opacity; a = isNaN(a) ? 1 : Math.max(0, Math.min(1, a));\n    return (a === 1 ? \"hsl(\" : \"hsla(\")\n        + (this.h || 0) + \", \"\n        + (this.s || 0) * 100 + \"%, \"\n        + (this.l || 0) * 100 + \"%\"\n        + (a === 1 ? \")\" : \", \" + a + \")\");\n  }\n}));\n\n/* From FvD 13.37, CSS Color Module Level 3 */\nfunction hsl2rgb(h, m1, m2) {\n  return (h < 60 ? m1 + (m2 - m1) * h / 60\n      : h < 180 ? m2\n      : h < 240 ? m1 + (m2 - m1) * (240 - h) / 60\n      : m1) * 255;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-color/src/cubehelix.js\":\n/*!************************************************!*\\\n  !*** ./node_modules/d3-color/src/cubehelix.js ***!\n  \\************************************************/\n/*! exports provided: default, Cubehelix */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return cubehelix; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Cubehelix\", function() { return Cubehelix; });\n/* harmony import */ var _define_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./define.js */ \"./node_modules/d3-color/src/define.js\");\n/* harmony import */ var _color_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./color.js */ \"./node_modules/d3-color/src/color.js\");\n/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./math.js */ \"./node_modules/d3-color/src/math.js\");\n\n\n\n\nvar A = -0.14861,\n    B = +1.78277,\n    C = -0.29227,\n    D = -0.90649,\n    E = +1.97294,\n    ED = E * D,\n    EB = E * B,\n    BC_DA = B * C - D * A;\n\nfunction cubehelixConvert(o) {\n  if (o instanceof Cubehelix) return new Cubehelix(o.h, o.s, o.l, o.opacity);\n  if (!(o instanceof _color_js__WEBPACK_IMPORTED_MODULE_1__[\"Rgb\"])) o = Object(_color_js__WEBPACK_IMPORTED_MODULE_1__[\"rgbConvert\"])(o);\n  var r = o.r / 255,\n      g = o.g / 255,\n      b = o.b / 255,\n      l = (BC_DA * b + ED * r - EB * g) / (BC_DA + ED - EB),\n      bl = b - l,\n      k = (E * (g - l) - C * bl) / D,\n      s = Math.sqrt(k * k + bl * bl) / (E * l * (1 - l)), // NaN if l=0 or l=1\n      h = s ? Math.atan2(k, bl) * _math_js__WEBPACK_IMPORTED_MODULE_2__[\"rad2deg\"] - 120 : NaN;\n  return new Cubehelix(h < 0 ? h + 360 : h, s, l, o.opacity);\n}\n\nfunction cubehelix(h, s, l, opacity) {\n  return arguments.length === 1 ? cubehelixConvert(h) : new Cubehelix(h, s, l, opacity == null ? 1 : opacity);\n}\n\nfunction Cubehelix(h, s, l, opacity) {\n  this.h = +h;\n  this.s = +s;\n  this.l = +l;\n  this.opacity = +opacity;\n}\n\nObject(_define_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(Cubehelix, cubehelix, Object(_define_js__WEBPACK_IMPORTED_MODULE_0__[\"extend\"])(_color_js__WEBPACK_IMPORTED_MODULE_1__[\"Color\"], {\n  brighter: function(k) {\n    k = k == null ? _color_js__WEBPACK_IMPORTED_MODULE_1__[\"brighter\"] : Math.pow(_color_js__WEBPACK_IMPORTED_MODULE_1__[\"brighter\"], k);\n    return new Cubehelix(this.h, this.s, this.l * k, this.opacity);\n  },\n  darker: function(k) {\n    k = k == null ? _color_js__WEBPACK_IMPORTED_MODULE_1__[\"darker\"] : Math.pow(_color_js__WEBPACK_IMPORTED_MODULE_1__[\"darker\"], k);\n    return new Cubehelix(this.h, this.s, this.l * k, this.opacity);\n  },\n  rgb: function() {\n    var h = isNaN(this.h) ? 0 : (this.h + 120) * _math_js__WEBPACK_IMPORTED_MODULE_2__[\"deg2rad\"],\n        l = +this.l,\n        a = isNaN(this.s) ? 0 : this.s * l * (1 - l),\n        cosh = Math.cos(h),\n        sinh = Math.sin(h);\n    return new _color_js__WEBPACK_IMPORTED_MODULE_1__[\"Rgb\"](\n      255 * (l + a * (A * cosh + B * sinh)),\n      255 * (l + a * (C * cosh + D * sinh)),\n      255 * (l + a * (E * cosh)),\n      this.opacity\n    );\n  }\n}));\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-color/src/define.js\":\n/*!*********************************************!*\\\n  !*** ./node_modules/d3-color/src/define.js ***!\n  \\*********************************************/\n/*! exports provided: default, extend */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"extend\", function() { return extend; });\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(constructor, factory, prototype) {\n  constructor.prototype = factory.prototype = prototype;\n  prototype.constructor = constructor;\n});\n\nfunction extend(parent, definition) {\n  var prototype = Object.create(parent.prototype);\n  for (var key in definition) prototype[key] = definition[key];\n  return prototype;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-color/src/index.js\":\n/*!********************************************!*\\\n  !*** ./node_modules/d3-color/src/index.js ***!\n  \\********************************************/\n/*! exports provided: color, rgb, hsl, lab, hcl, lch, gray, cubehelix */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _color_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./color.js */ \"./node_modules/d3-color/src/color.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"color\", function() { return _color_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"rgb\", function() { return _color_js__WEBPACK_IMPORTED_MODULE_0__[\"rgb\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"hsl\", function() { return _color_js__WEBPACK_IMPORTED_MODULE_0__[\"hsl\"]; });\n\n/* harmony import */ var _lab_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./lab.js */ \"./node_modules/d3-color/src/lab.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"lab\", function() { return _lab_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"hcl\", function() { return _lab_js__WEBPACK_IMPORTED_MODULE_1__[\"hcl\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"lch\", function() { return _lab_js__WEBPACK_IMPORTED_MODULE_1__[\"lch\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"gray\", function() { return _lab_js__WEBPACK_IMPORTED_MODULE_1__[\"gray\"]; });\n\n/* harmony import */ var _cubehelix_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./cubehelix.js */ \"./node_modules/d3-color/src/cubehelix.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"cubehelix\", function() { return _cubehelix_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"]; });\n\n\n\n\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-color/src/lab.js\":\n/*!******************************************!*\\\n  !*** ./node_modules/d3-color/src/lab.js ***!\n  \\******************************************/\n/*! exports provided: gray, default, Lab, lch, hcl, Hcl */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"gray\", function() { return gray; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return lab; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Lab\", function() { return Lab; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"lch\", function() { return lch; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"hcl\", function() { return hcl; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Hcl\", function() { return Hcl; });\n/* harmony import */ var _define_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./define.js */ \"./node_modules/d3-color/src/define.js\");\n/* harmony import */ var _color_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./color.js */ \"./node_modules/d3-color/src/color.js\");\n/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./math.js */ \"./node_modules/d3-color/src/math.js\");\n\n\n\n\n// https://observablehq.com/@mbostock/lab-and-rgb\nvar K = 18,\n    Xn = 0.96422,\n    Yn = 1,\n    Zn = 0.82521,\n    t0 = 4 / 29,\n    t1 = 6 / 29,\n    t2 = 3 * t1 * t1,\n    t3 = t1 * t1 * t1;\n\nfunction labConvert(o) {\n  if (o instanceof Lab) return new Lab(o.l, o.a, o.b, o.opacity);\n  if (o instanceof Hcl) return hcl2lab(o);\n  if (!(o instanceof _color_js__WEBPACK_IMPORTED_MODULE_1__[\"Rgb\"])) o = Object(_color_js__WEBPACK_IMPORTED_MODULE_1__[\"rgbConvert\"])(o);\n  var r = rgb2lrgb(o.r),\n      g = rgb2lrgb(o.g),\n      b = rgb2lrgb(o.b),\n      y = xyz2lab((0.2225045 * r + 0.7168786 * g + 0.0606169 * b) / Yn), x, z;\n  if (r === g && g === b) x = z = y; else {\n    x = xyz2lab((0.4360747 * r + 0.3850649 * g + 0.1430804 * b) / Xn);\n    z = xyz2lab((0.0139322 * r + 0.0971045 * g + 0.7141733 * b) / Zn);\n  }\n  return new Lab(116 * y - 16, 500 * (x - y), 200 * (y - z), o.opacity);\n}\n\nfunction gray(l, opacity) {\n  return new Lab(l, 0, 0, opacity == null ? 1 : opacity);\n}\n\nfunction lab(l, a, b, opacity) {\n  return arguments.length === 1 ? labConvert(l) : new Lab(l, a, b, opacity == null ? 1 : opacity);\n}\n\nfunction Lab(l, a, b, opacity) {\n  this.l = +l;\n  this.a = +a;\n  this.b = +b;\n  this.opacity = +opacity;\n}\n\nObject(_define_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(Lab, lab, Object(_define_js__WEBPACK_IMPORTED_MODULE_0__[\"extend\"])(_color_js__WEBPACK_IMPORTED_MODULE_1__[\"Color\"], {\n  brighter: function(k) {\n    return new Lab(this.l + K * (k == null ? 1 : k), this.a, this.b, this.opacity);\n  },\n  darker: function(k) {\n    return new Lab(this.l - K * (k == null ? 1 : k), this.a, this.b, this.opacity);\n  },\n  rgb: function() {\n    var y = (this.l + 16) / 116,\n        x = isNaN(this.a) ? y : y + this.a / 500,\n        z = isNaN(this.b) ? y : y - this.b / 200;\n    x = Xn * lab2xyz(x);\n    y = Yn * lab2xyz(y);\n    z = Zn * lab2xyz(z);\n    return new _color_js__WEBPACK_IMPORTED_MODULE_1__[\"Rgb\"](\n      lrgb2rgb( 3.1338561 * x - 1.6168667 * y - 0.4906146 * z),\n      lrgb2rgb(-0.9787684 * x + 1.9161415 * y + 0.0334540 * z),\n      lrgb2rgb( 0.0719453 * x - 0.2289914 * y + 1.4052427 * z),\n      this.opacity\n    );\n  }\n}));\n\nfunction xyz2lab(t) {\n  return t > t3 ? Math.pow(t, 1 / 3) : t / t2 + t0;\n}\n\nfunction lab2xyz(t) {\n  return t > t1 ? t * t * t : t2 * (t - t0);\n}\n\nfunction lrgb2rgb(x) {\n  return 255 * (x <= 0.0031308 ? 12.92 * x : 1.055 * Math.pow(x, 1 / 2.4) - 0.055);\n}\n\nfunction rgb2lrgb(x) {\n  return (x /= 255) <= 0.04045 ? x / 12.92 : Math.pow((x + 0.055) / 1.055, 2.4);\n}\n\nfunction hclConvert(o) {\n  if (o instanceof Hcl) return new Hcl(o.h, o.c, o.l, o.opacity);\n  if (!(o instanceof Lab)) o = labConvert(o);\n  if (o.a === 0 && o.b === 0) return new Hcl(NaN, 0 < o.l && o.l < 100 ? 0 : NaN, o.l, o.opacity);\n  var h = Math.atan2(o.b, o.a) * _math_js__WEBPACK_IMPORTED_MODULE_2__[\"rad2deg\"];\n  return new Hcl(h < 0 ? h + 360 : h, Math.sqrt(o.a * o.a + o.b * o.b), o.l, o.opacity);\n}\n\nfunction lch(l, c, h, opacity) {\n  return arguments.length === 1 ? hclConvert(l) : new Hcl(h, c, l, opacity == null ? 1 : opacity);\n}\n\nfunction hcl(h, c, l, opacity) {\n  return arguments.length === 1 ? hclConvert(h) : new Hcl(h, c, l, opacity == null ? 1 : opacity);\n}\n\nfunction Hcl(h, c, l, opacity) {\n  this.h = +h;\n  this.c = +c;\n  this.l = +l;\n  this.opacity = +opacity;\n}\n\nfunction hcl2lab(o) {\n  if (isNaN(o.h)) return new Lab(o.l, 0, 0, o.opacity);\n  var h = o.h * _math_js__WEBPACK_IMPORTED_MODULE_2__[\"deg2rad\"];\n  return new Lab(o.l, Math.cos(h) * o.c, Math.sin(h) * o.c, o.opacity);\n}\n\nObject(_define_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(Hcl, hcl, Object(_define_js__WEBPACK_IMPORTED_MODULE_0__[\"extend\"])(_color_js__WEBPACK_IMPORTED_MODULE_1__[\"Color\"], {\n  brighter: function(k) {\n    return new Hcl(this.h, this.c, this.l + K * (k == null ? 1 : k), this.opacity);\n  },\n  darker: function(k) {\n    return new Hcl(this.h, this.c, this.l - K * (k == null ? 1 : k), this.opacity);\n  },\n  rgb: function() {\n    return hcl2lab(this).rgb();\n  }\n}));\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-color/src/math.js\":\n/*!*******************************************!*\\\n  !*** ./node_modules/d3-color/src/math.js ***!\n  \\*******************************************/\n/*! exports provided: deg2rad, rad2deg */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"deg2rad\", function() { return deg2rad; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"rad2deg\", function() { return rad2deg; });\nvar deg2rad = Math.PI / 180;\nvar rad2deg = 180 / Math.PI;\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-contour/node_modules/d3-array/src/array.js\":\n/*!********************************************************************!*\\\n  !*** ./node_modules/d3-contour/node_modules/d3-array/src/array.js ***!\n  \\********************************************************************/\n/*! exports provided: slice, map */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"slice\", function() { return slice; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"map\", function() { return map; });\nvar array = Array.prototype;\n\nvar slice = array.slice;\nvar map = array.map;\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-contour/node_modules/d3-array/src/ascending.js\":\n/*!************************************************************************!*\\\n  !*** ./node_modules/d3-contour/node_modules/d3-array/src/ascending.js ***!\n  \\************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(a, b) {\n  return a == null || b == null ? NaN\n    : a < b ? -1\n    : a > b ? 1\n    : a >= b ? 0\n    : NaN;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-contour/node_modules/d3-array/src/bin.js\":\n/*!******************************************************************!*\\\n  !*** ./node_modules/d3-contour/node_modules/d3-array/src/bin.js ***!\n  \\******************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _array_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./array.js */ \"./node_modules/d3-contour/node_modules/d3-array/src/array.js\");\n/* harmony import */ var _bisect_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./bisect.js */ \"./node_modules/d3-contour/node_modules/d3-array/src/bisect.js\");\n/* harmony import */ var _constant_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./constant.js */ \"./node_modules/d3-contour/node_modules/d3-array/src/constant.js\");\n/* harmony import */ var _extent_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./extent.js */ \"./node_modules/d3-contour/node_modules/d3-array/src/extent.js\");\n/* harmony import */ var _identity_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./identity.js */ \"./node_modules/d3-contour/node_modules/d3-array/src/identity.js\");\n/* harmony import */ var _nice_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./nice.js */ \"./node_modules/d3-contour/node_modules/d3-array/src/nice.js\");\n/* harmony import */ var _ticks_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./ticks.js */ \"./node_modules/d3-contour/node_modules/d3-array/src/ticks.js\");\n/* harmony import */ var _threshold_sturges_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./threshold/sturges.js */ \"./node_modules/d3-contour/node_modules/d3-array/src/threshold/sturges.js\");\n\n\n\n\n\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  var value = _identity_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"],\n      domain = _extent_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"],\n      threshold = _threshold_sturges_js__WEBPACK_IMPORTED_MODULE_7__[\"default\"];\n\n  function histogram(data) {\n    if (!Array.isArray(data)) data = Array.from(data);\n\n    var i,\n        n = data.length,\n        x,\n        values = new Array(n);\n\n    for (i = 0; i < n; ++i) {\n      values[i] = value(data[i], i, data);\n    }\n\n    var xz = domain(values),\n        x0 = xz[0],\n        x1 = xz[1],\n        tz = threshold(values, x0, x1);\n\n    // Convert number of thresholds into uniform thresholds, and nice the\n    // default domain accordingly.\n    if (!Array.isArray(tz)) {\n      const max = x1, tn = +tz;\n      if (domain === _extent_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"]) [x0, x1] = Object(_nice_js__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(x0, x1, tn);\n      tz = Object(_ticks_js__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(x0, x1, tn);\n\n      // If the last threshold is coincident with the domain’s upper bound, the\n      // last bin will be zero-width. If the default domain is used, and this\n      // last threshold is coincident with the maximum input value, we can\n      // extend the niced upper bound by one tick to ensure uniform bin widths;\n      // otherwise, we simply remove the last threshold. Note that we don’t\n      // coerce values or the domain to numbers, and thus must be careful to\n      // compare order (>=) rather than strict equality (===)!\n      if (tz[tz.length - 1] >= x1) {\n        if (max >= x1 && domain === _extent_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"]) {\n          const step = Object(_ticks_js__WEBPACK_IMPORTED_MODULE_6__[\"tickIncrement\"])(x0, x1, tn);\n          if (isFinite(step)) {\n            if (step > 0) {\n              x1 = (Math.floor(x1 / step) + 1) * step;\n            } else if (step < 0) {\n              x1 = (Math.ceil(x1 * -step) + 1) / -step;\n            }\n          }\n        } else {\n          tz.pop();\n        }\n      }\n    }\n\n    // Remove any thresholds outside the domain.\n    var m = tz.length;\n    while (tz[0] <= x0) tz.shift(), --m;\n    while (tz[m - 1] > x1) tz.pop(), --m;\n\n    var bins = new Array(m + 1),\n        bin;\n\n    // Initialize bins.\n    for (i = 0; i <= m; ++i) {\n      bin = bins[i] = [];\n      bin.x0 = i > 0 ? tz[i - 1] : x0;\n      bin.x1 = i < m ? tz[i] : x1;\n    }\n\n    // Assign data to bins by value, ignoring any outside the domain.\n    for (i = 0; i < n; ++i) {\n      x = values[i];\n      if (x != null && x0 <= x && x <= x1) {\n        bins[Object(_bisect_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(tz, x, 0, m)].push(data[i]);\n      }\n    }\n\n    return bins;\n  }\n\n  histogram.value = function(_) {\n    return arguments.length ? (value = typeof _ === \"function\" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(_), histogram) : value;\n  };\n\n  histogram.domain = function(_) {\n    return arguments.length ? (domain = typeof _ === \"function\" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])([_[0], _[1]]), histogram) : domain;\n  };\n\n  histogram.thresholds = function(_) {\n    return arguments.length ? (threshold = typeof _ === \"function\" ? _ : Array.isArray(_) ? Object(_constant_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(_array_js__WEBPACK_IMPORTED_MODULE_0__[\"slice\"].call(_)) : Object(_constant_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(_), histogram) : threshold;\n  };\n\n  return histogram;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-contour/node_modules/d3-array/src/bisect.js\":\n/*!*********************************************************************!*\\\n  !*** ./node_modules/d3-contour/node_modules/d3-array/src/bisect.js ***!\n  \\*********************************************************************/\n/*! exports provided: bisectRight, bisectLeft, bisectCenter, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"bisectRight\", function() { return bisectRight; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"bisectLeft\", function() { return bisectLeft; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"bisectCenter\", function() { return bisectCenter; });\n/* harmony import */ var _ascending_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ascending.js */ \"./node_modules/d3-contour/node_modules/d3-array/src/ascending.js\");\n/* harmony import */ var _bisector_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./bisector.js */ \"./node_modules/d3-contour/node_modules/d3-array/src/bisector.js\");\n/* harmony import */ var _number_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./number.js */ \"./node_modules/d3-contour/node_modules/d3-array/src/number.js\");\n\n\n\n\nconst ascendingBisect = Object(_bisector_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(_ascending_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]);\nconst bisectRight = ascendingBisect.right;\nconst bisectLeft = ascendingBisect.left;\nconst bisectCenter = Object(_bisector_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(_number_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"]).center;\n/* harmony default export */ __webpack_exports__[\"default\"] = (bisectRight);\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-contour/node_modules/d3-array/src/bisector.js\":\n/*!***********************************************************************!*\\\n  !*** ./node_modules/d3-contour/node_modules/d3-array/src/bisector.js ***!\n  \\***********************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _ascending_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ascending.js */ \"./node_modules/d3-contour/node_modules/d3-array/src/ascending.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(f) {\n  let delta = f;\n  let compare = f;\n\n  if (f.length === 1) {\n    delta = (d, x) => f(d) - x;\n    compare = ascendingComparator(f);\n  }\n\n  function left(a, x, lo, hi) {\n    if (lo == null) lo = 0;\n    if (hi == null) hi = a.length;\n    while (lo < hi) {\n      const mid = (lo + hi) >>> 1;\n      if (compare(a[mid], x) < 0) lo = mid + 1;\n      else hi = mid;\n    }\n    return lo;\n  }\n\n  function right(a, x, lo, hi) {\n    if (lo == null) lo = 0;\n    if (hi == null) hi = a.length;\n    while (lo < hi) {\n      const mid = (lo + hi) >>> 1;\n      if (compare(a[mid], x) > 0) hi = mid;\n      else lo = mid + 1;\n    }\n    return lo;\n  }\n\n  function center(a, x, lo, hi) {\n    if (lo == null) lo = 0;\n    if (hi == null) hi = a.length;\n    const i = left(a, x, lo, hi - 1);\n    return i > lo && delta(a[i - 1], x) > -delta(a[i], x) ? i - 1 : i;\n  }\n\n  return {left, center, right};\n});\n\nfunction ascendingComparator(f) {\n  return (d, x) => Object(_ascending_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(f(d), x);\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-contour/node_modules/d3-array/src/constant.js\":\n/*!***********************************************************************!*\\\n  !*** ./node_modules/d3-contour/node_modules/d3-array/src/constant.js ***!\n  \\***********************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(x) {\n  return function() {\n    return x;\n  };\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-contour/node_modules/d3-array/src/count.js\":\n/*!********************************************************************!*\\\n  !*** ./node_modules/d3-contour/node_modules/d3-array/src/count.js ***!\n  \\********************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return count; });\nfunction count(values, valueof) {\n  let count = 0;\n  if (valueof === undefined) {\n    for (let value of values) {\n      if (value != null && (value = +value) >= value) {\n        ++count;\n      }\n    }\n  } else {\n    let index = -1;\n    for (let value of values) {\n      if ((value = valueof(value, ++index, values)) != null && (value = +value) >= value) {\n        ++count;\n      }\n    }\n  }\n  return count;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-contour/node_modules/d3-array/src/cross.js\":\n/*!********************************************************************!*\\\n  !*** ./node_modules/d3-contour/node_modules/d3-array/src/cross.js ***!\n  \\********************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return cross; });\nfunction length(array) {\n  return array.length | 0;\n}\n\nfunction empty(length) {\n  return !(length > 0);\n}\n\nfunction arrayify(values) {\n  return typeof values !== \"object\" || \"length\" in values ? values : Array.from(values);\n}\n\nfunction reducer(reduce) {\n  return values => reduce(...values);\n}\n\nfunction cross(...values) {\n  const reduce = typeof values[values.length - 1] === \"function\" && reducer(values.pop());\n  values = values.map(arrayify);\n  const lengths = values.map(length);\n  const j = values.length - 1;\n  const index = new Array(j + 1).fill(0);\n  const product = [];\n  if (j < 0 || lengths.some(empty)) return product;\n  while (true) {\n    product.push(index.map((j, i) => values[i][j]));\n    let i = j;\n    while (++index[i] === lengths[i]) {\n      if (i === 0) return reduce ? product.map(reduce) : product;\n      index[i--] = 0;\n    }\n  }\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-contour/node_modules/d3-array/src/cumsum.js\":\n/*!*********************************************************************!*\\\n  !*** ./node_modules/d3-contour/node_modules/d3-array/src/cumsum.js ***!\n  \\*********************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return cumsum; });\nfunction cumsum(values, valueof) {\n  var sum = 0, index = 0;\n  return Float64Array.from(values, valueof === undefined\n    ? v => (sum += +v || 0)\n    : v => (sum += +valueof(v, index++, values) || 0));\n}\n\n/***/ }),\n\n/***/ \"./node_modules/d3-contour/node_modules/d3-array/src/descending.js\":\n/*!*************************************************************************!*\\\n  !*** ./node_modules/d3-contour/node_modules/d3-array/src/descending.js ***!\n  \\*************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(a, b) {\n  return a == null || b == null ? NaN\n    : b < a ? -1\n    : b > a ? 1\n    : b >= a ? 0\n    : NaN;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-contour/node_modules/d3-array/src/deviation.js\":\n/*!************************************************************************!*\\\n  !*** ./node_modules/d3-contour/node_modules/d3-array/src/deviation.js ***!\n  \\************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return deviation; });\n/* harmony import */ var _variance_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./variance.js */ \"./node_modules/d3-contour/node_modules/d3-array/src/variance.js\");\n\n\nfunction deviation(values, valueof) {\n  const v = Object(_variance_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(values, valueof);\n  return v ? Math.sqrt(v) : v;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-contour/node_modules/d3-array/src/difference.js\":\n/*!*************************************************************************!*\\\n  !*** ./node_modules/d3-contour/node_modules/d3-array/src/difference.js ***!\n  \\*************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return difference; });\nfunction difference(values, ...others) {\n  values = new Set(values);\n  for (const other of others) {\n    for (const value of other) {\n      values.delete(value);\n    }\n  }\n  return values;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-contour/node_modules/d3-array/src/disjoint.js\":\n/*!***********************************************************************!*\\\n  !*** ./node_modules/d3-contour/node_modules/d3-array/src/disjoint.js ***!\n  \\***********************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return disjoint; });\nfunction disjoint(values, other) {\n  const iterator = other[Symbol.iterator](), set = new Set();\n  for (const v of values) {\n    if (set.has(v)) return false;\n    let value, done;\n    while (({value, done} = iterator.next())) {\n      if (done) break;\n      if (Object.is(v, value)) return false;\n      set.add(value);\n    }\n  }\n  return true;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-contour/node_modules/d3-array/src/every.js\":\n/*!********************************************************************!*\\\n  !*** ./node_modules/d3-contour/node_modules/d3-array/src/every.js ***!\n  \\********************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return every; });\nfunction every(values, test) {\n  if (typeof test !== \"function\") throw new TypeError(\"test is not a function\");\n  let index = -1;\n  for (const value of values) {\n    if (!test(value, ++index, values)) {\n      return false;\n    }\n  }\n  return true;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-contour/node_modules/d3-array/src/extent.js\":\n/*!*********************************************************************!*\\\n  !*** ./node_modules/d3-contour/node_modules/d3-array/src/extent.js ***!\n  \\*********************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(values, valueof) {\n  let min;\n  let max;\n  if (valueof === undefined) {\n    for (const value of values) {\n      if (value != null) {\n        if (min === undefined) {\n          if (value >= value) min = max = value;\n        } else {\n          if (min > value) min = value;\n          if (max < value) max = value;\n        }\n      }\n    }\n  } else {\n    let index = -1;\n    for (let value of values) {\n      if ((value = valueof(value, ++index, values)) != null) {\n        if (min === undefined) {\n          if (value >= value) min = max = value;\n        } else {\n          if (min > value) min = value;\n          if (max < value) max = value;\n        }\n      }\n    }\n  }\n  return [min, max];\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-contour/node_modules/d3-array/src/filter.js\":\n/*!*********************************************************************!*\\\n  !*** ./node_modules/d3-contour/node_modules/d3-array/src/filter.js ***!\n  \\*********************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return filter; });\nfunction filter(values, test) {\n  if (typeof test !== \"function\") throw new TypeError(\"test is not a function\");\n  const array = [];\n  let index = -1;\n  for (const value of values) {\n    if (test(value, ++index, values)) {\n      array.push(value);\n    }\n  }\n  return array;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-contour/node_modules/d3-array/src/fsum.js\":\n/*!*******************************************************************!*\\\n  !*** ./node_modules/d3-contour/node_modules/d3-array/src/fsum.js ***!\n  \\*******************************************************************/\n/*! exports provided: Adder, fsum, fcumsum */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Adder\", function() { return Adder; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"fsum\", function() { return fsum; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"fcumsum\", function() { return fcumsum; });\n// https://github.com/python/cpython/blob/a74eea238f5baba15797e2e8b570d153bc8690a7/Modules/mathmodule.c#L1423\nclass Adder {\n  constructor() {\n    this._partials = new Float64Array(32);\n    this._n = 0;\n  }\n  add(x) {\n    const p = this._partials;\n    let i = 0;\n    for (let j = 0; j < this._n && j < 32; j++) {\n      const y = p[j],\n        hi = x + y,\n        lo = Math.abs(x) < Math.abs(y) ? x - (hi - y) : y - (hi - x);\n      if (lo) p[i++] = lo;\n      x = hi;\n    }\n    p[i] = x;\n    this._n = i + 1;\n    return this;\n  }\n  valueOf() {\n    const p = this._partials;\n    let n = this._n, x, y, lo, hi = 0;\n    if (n > 0) {\n      hi = p[--n];\n      while (n > 0) {\n        x = hi;\n        y = p[--n];\n        hi = x + y;\n        lo = y - (hi - x);\n        if (lo) break;\n      }\n      if (n > 0 && ((lo < 0 && p[n - 1] < 0) || (lo > 0 && p[n - 1] > 0))) {\n        y = lo * 2;\n        x = hi + y;\n        if (y == x - hi) hi = x;\n      }\n    }\n    return hi;\n  }\n}\n\nfunction fsum(values, valueof) {\n  const adder = new Adder();\n  if (valueof === undefined) {\n    for (let value of values) {\n      if (value = +value) {\n        adder.add(value);\n      }\n    }\n  } else {\n    let index = -1;\n    for (let value of values) {\n      if (value = +valueof(value, ++index, values)) {\n        adder.add(value);\n      }\n    }\n  }\n  return +adder;\n}\n\nfunction fcumsum(values, valueof) {\n  const adder = new Adder();\n  let index = -1;\n  return Float64Array.from(values, valueof === undefined\n      ? v => adder.add(+v || 0)\n      : v => adder.add(+valueof(v, ++index, values) || 0)\n  );\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-contour/node_modules/d3-array/src/greatest.js\":\n/*!***********************************************************************!*\\\n  !*** ./node_modules/d3-contour/node_modules/d3-array/src/greatest.js ***!\n  \\***********************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return greatest; });\n/* harmony import */ var _ascending_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ascending.js */ \"./node_modules/d3-contour/node_modules/d3-array/src/ascending.js\");\n\n\nfunction greatest(values, compare = _ascending_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]) {\n  let max;\n  let defined = false;\n  if (compare.length === 1) {\n    let maxValue;\n    for (const element of values) {\n      const value = compare(element);\n      if (defined\n          ? Object(_ascending_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(value, maxValue) > 0\n          : Object(_ascending_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(value, value) === 0) {\n        max = element;\n        maxValue = value;\n        defined = true;\n      }\n    }\n  } else {\n    for (const value of values) {\n      if (defined\n          ? compare(value, max) > 0\n          : compare(value, value) === 0) {\n        max = value;\n        defined = true;\n      }\n    }\n  }\n  return max;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-contour/node_modules/d3-array/src/greatestIndex.js\":\n/*!****************************************************************************!*\\\n  !*** ./node_modules/d3-contour/node_modules/d3-array/src/greatestIndex.js ***!\n  \\****************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return greatestIndex; });\n/* harmony import */ var _ascending_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ascending.js */ \"./node_modules/d3-contour/node_modules/d3-array/src/ascending.js\");\n/* harmony import */ var _maxIndex_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./maxIndex.js */ \"./node_modules/d3-contour/node_modules/d3-array/src/maxIndex.js\");\n\n\n\nfunction greatestIndex(values, compare = _ascending_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]) {\n  if (compare.length === 1) return Object(_maxIndex_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(values, compare);\n  let maxValue;\n  let max = -1;\n  let index = -1;\n  for (const value of values) {\n    ++index;\n    if (max < 0\n        ? compare(value, value) === 0\n        : compare(value, maxValue) > 0) {\n      maxValue = value;\n      max = index;\n    }\n  }\n  return max;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-contour/node_modules/d3-array/src/group.js\":\n/*!********************************************************************!*\\\n  !*** ./node_modules/d3-contour/node_modules/d3-array/src/group.js ***!\n  \\********************************************************************/\n/*! exports provided: default, groups, flatGroup, flatRollup, rollup, rollups, index, indexes */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return group; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"groups\", function() { return groups; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"flatGroup\", function() { return flatGroup; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"flatRollup\", function() { return flatRollup; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"rollup\", function() { return rollup; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"rollups\", function() { return rollups; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"index\", function() { return index; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"indexes\", function() { return indexes; });\n/* harmony import */ var internmap__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! internmap */ \"./node_modules/internmap/src/index.js\");\n/* harmony import */ var _identity_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./identity.js */ \"./node_modules/d3-contour/node_modules/d3-array/src/identity.js\");\n\n\n\nfunction group(values, ...keys) {\n  return nest(values, _identity_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"], _identity_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"], keys);\n}\n\nfunction groups(values, ...keys) {\n  return nest(values, Array.from, _identity_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"], keys);\n}\n\nfunction flatten(groups, keys) {\n  for (let i = 1, n = keys.length; i < n; ++i) {\n    groups = groups.flatMap(g => g.pop().map(([key, value]) => [...g, key, value]));\n  }\n  return groups;\n}\n\nfunction flatGroup(values, ...keys) {\n  return flatten(groups(values, ...keys), keys);\n}\n\nfunction flatRollup(values, reduce, ...keys) {\n  return flatten(rollups(values, reduce, ...keys), keys);\n}\n\nfunction rollup(values, reduce, ...keys) {\n  return nest(values, _identity_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"], reduce, keys);\n}\n\nfunction rollups(values, reduce, ...keys) {\n  return nest(values, Array.from, reduce, keys);\n}\n\nfunction index(values, ...keys) {\n  return nest(values, _identity_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"], unique, keys);\n}\n\nfunction indexes(values, ...keys) {\n  return nest(values, Array.from, unique, keys);\n}\n\nfunction unique(values) {\n  if (values.length !== 1) throw new Error(\"duplicate key\");\n  return values[0];\n}\n\nfunction nest(values, map, reduce, keys) {\n  return (function regroup(values, i) {\n    if (i >= keys.length) return reduce(values);\n    const groups = new internmap__WEBPACK_IMPORTED_MODULE_0__[\"InternMap\"]();\n    const keyof = keys[i++];\n    let index = -1;\n    for (const value of values) {\n      const key = keyof(value, ++index, values);\n      const group = groups.get(key);\n      if (group) group.push(value);\n      else groups.set(key, [value]);\n    }\n    for (const [key, values] of groups) {\n      groups.set(key, regroup(values, i));\n    }\n    return map(groups);\n  })(values, 0);\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-contour/node_modules/d3-array/src/groupSort.js\":\n/*!************************************************************************!*\\\n  !*** ./node_modules/d3-contour/node_modules/d3-array/src/groupSort.js ***!\n  \\************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return groupSort; });\n/* harmony import */ var _ascending_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ascending.js */ \"./node_modules/d3-contour/node_modules/d3-array/src/ascending.js\");\n/* harmony import */ var _group_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./group.js */ \"./node_modules/d3-contour/node_modules/d3-array/src/group.js\");\n/* harmony import */ var _sort_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./sort.js */ \"./node_modules/d3-contour/node_modules/d3-array/src/sort.js\");\n\n\n\n\nfunction groupSort(values, reduce, key) {\n  return (reduce.length === 1\n    ? Object(_sort_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(Object(_group_js__WEBPACK_IMPORTED_MODULE_1__[\"rollup\"])(values, reduce, key), (([ak, av], [bk, bv]) => Object(_ascending_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(av, bv) || Object(_ascending_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(ak, bk)))\n    : Object(_sort_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(Object(_group_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(values, key), (([ak, av], [bk, bv]) => reduce(av, bv) || Object(_ascending_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(ak, bk))))\n    .map(([key]) => key);\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-contour/node_modules/d3-array/src/identity.js\":\n/*!***********************************************************************!*\\\n  !*** ./node_modules/d3-contour/node_modules/d3-array/src/identity.js ***!\n  \\***********************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(x) {\n  return x;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-contour/node_modules/d3-array/src/index.js\":\n/*!********************************************************************!*\\\n  !*** ./node_modules/d3-contour/node_modules/d3-array/src/index.js ***!\n  \\********************************************************************/\n/*! exports provided: bisect, bisectRight, bisectLeft, bisectCenter, ascending, bisector, count, cross, cumsum, descending, deviation, extent, Adder, fsum, fcumsum, group, flatGroup, flatRollup, groups, index, indexes, rollup, rollups, groupSort, bin, histogram, thresholdFreedmanDiaconis, thresholdScott, thresholdSturges, max, maxIndex, mean, median, merge, min, minIndex, mode, nice, pairs, permute, quantile, quantileSorted, quickselect, range, least, leastIndex, greatest, greatestIndex, scan, shuffle, shuffler, sum, ticks, tickIncrement, tickStep, transpose, variance, zip, every, some, filter, map, reduce, reverse, sort, difference, disjoint, intersection, subset, superset, union, InternMap, InternSet */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _bisect_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./bisect.js */ \"./node_modules/d3-contour/node_modules/d3-array/src/bisect.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"bisect\", function() { return _bisect_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"bisectRight\", function() { return _bisect_js__WEBPACK_IMPORTED_MODULE_0__[\"bisectRight\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"bisectLeft\", function() { return _bisect_js__WEBPACK_IMPORTED_MODULE_0__[\"bisectLeft\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"bisectCenter\", function() { return _bisect_js__WEBPACK_IMPORTED_MODULE_0__[\"bisectCenter\"]; });\n\n/* harmony import */ var _ascending_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./ascending.js */ \"./node_modules/d3-contour/node_modules/d3-array/src/ascending.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"ascending\", function() { return _ascending_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"]; });\n\n/* harmony import */ var _bisector_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./bisector.js */ \"./node_modules/d3-contour/node_modules/d3-array/src/bisector.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"bisector\", function() { return _bisector_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"]; });\n\n/* harmony import */ var _count_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./count.js */ \"./node_modules/d3-contour/node_modules/d3-array/src/count.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"count\", function() { return _count_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"]; });\n\n/* harmony import */ var _cross_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./cross.js */ \"./node_modules/d3-contour/node_modules/d3-array/src/cross.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"cross\", function() { return _cross_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"]; });\n\n/* harmony import */ var _cumsum_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./cumsum.js */ \"./node_modules/d3-contour/node_modules/d3-array/src/cumsum.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"cumsum\", function() { return _cumsum_js__WEBPACK_IMPORTED_MODULE_5__[\"default\"]; });\n\n/* harmony import */ var _descending_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./descending.js */ \"./node_modules/d3-contour/node_modules/d3-array/src/descending.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"descending\", function() { return _descending_js__WEBPACK_IMPORTED_MODULE_6__[\"default\"]; });\n\n/* harmony import */ var _deviation_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./deviation.js */ \"./node_modules/d3-contour/node_modules/d3-array/src/deviation.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"deviation\", function() { return _deviation_js__WEBPACK_IMPORTED_MODULE_7__[\"default\"]; });\n\n/* harmony import */ var _extent_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./extent.js */ \"./node_modules/d3-contour/node_modules/d3-array/src/extent.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"extent\", function() { return _extent_js__WEBPACK_IMPORTED_MODULE_8__[\"default\"]; });\n\n/* harmony import */ var _fsum_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./fsum.js */ \"./node_modules/d3-contour/node_modules/d3-array/src/fsum.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"Adder\", function() { return _fsum_js__WEBPACK_IMPORTED_MODULE_9__[\"Adder\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"fsum\", function() { return _fsum_js__WEBPACK_IMPORTED_MODULE_9__[\"fsum\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"fcumsum\", function() { return _fsum_js__WEBPACK_IMPORTED_MODULE_9__[\"fcumsum\"]; });\n\n/* harmony import */ var _group_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./group.js */ \"./node_modules/d3-contour/node_modules/d3-array/src/group.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"group\", function() { return _group_js__WEBPACK_IMPORTED_MODULE_10__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"flatGroup\", function() { return _group_js__WEBPACK_IMPORTED_MODULE_10__[\"flatGroup\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"flatRollup\", function() { return _group_js__WEBPACK_IMPORTED_MODULE_10__[\"flatRollup\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"groups\", function() { return _group_js__WEBPACK_IMPORTED_MODULE_10__[\"groups\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"index\", function() { return _group_js__WEBPACK_IMPORTED_MODULE_10__[\"index\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"indexes\", function() { return _group_js__WEBPACK_IMPORTED_MODULE_10__[\"indexes\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"rollup\", function() { return _group_js__WEBPACK_IMPORTED_MODULE_10__[\"rollup\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"rollups\", function() { return _group_js__WEBPACK_IMPORTED_MODULE_10__[\"rollups\"]; });\n\n/* harmony import */ var _groupSort_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./groupSort.js */ \"./node_modules/d3-contour/node_modules/d3-array/src/groupSort.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"groupSort\", function() { return _groupSort_js__WEBPACK_IMPORTED_MODULE_11__[\"default\"]; });\n\n/* harmony import */ var _bin_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./bin.js */ \"./node_modules/d3-contour/node_modules/d3-array/src/bin.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"bin\", function() { return _bin_js__WEBPACK_IMPORTED_MODULE_12__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"histogram\", function() { return _bin_js__WEBPACK_IMPORTED_MODULE_12__[\"default\"]; });\n\n/* harmony import */ var _threshold_freedmanDiaconis_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./threshold/freedmanDiaconis.js */ \"./node_modules/d3-contour/node_modules/d3-array/src/threshold/freedmanDiaconis.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"thresholdFreedmanDiaconis\", function() { return _threshold_freedmanDiaconis_js__WEBPACK_IMPORTED_MODULE_13__[\"default\"]; });\n\n/* harmony import */ var _threshold_scott_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./threshold/scott.js */ \"./node_modules/d3-contour/node_modules/d3-array/src/threshold/scott.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"thresholdScott\", function() { return _threshold_scott_js__WEBPACK_IMPORTED_MODULE_14__[\"default\"]; });\n\n/* harmony import */ var _threshold_sturges_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./threshold/sturges.js */ \"./node_modules/d3-contour/node_modules/d3-array/src/threshold/sturges.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"thresholdSturges\", function() { return _threshold_sturges_js__WEBPACK_IMPORTED_MODULE_15__[\"default\"]; });\n\n/* harmony import */ var _max_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./max.js */ \"./node_modules/d3-contour/node_modules/d3-array/src/max.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"max\", function() { return _max_js__WEBPACK_IMPORTED_MODULE_16__[\"default\"]; });\n\n/* harmony import */ var _maxIndex_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./maxIndex.js */ \"./node_modules/d3-contour/node_modules/d3-array/src/maxIndex.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"maxIndex\", function() { return _maxIndex_js__WEBPACK_IMPORTED_MODULE_17__[\"default\"]; });\n\n/* harmony import */ var _mean_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./mean.js */ \"./node_modules/d3-contour/node_modules/d3-array/src/mean.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"mean\", function() { return _mean_js__WEBPACK_IMPORTED_MODULE_18__[\"default\"]; });\n\n/* harmony import */ var _median_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./median.js */ \"./node_modules/d3-contour/node_modules/d3-array/src/median.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"median\", function() { return _median_js__WEBPACK_IMPORTED_MODULE_19__[\"default\"]; });\n\n/* harmony import */ var _merge_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./merge.js */ \"./node_modules/d3-contour/node_modules/d3-array/src/merge.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"merge\", function() { return _merge_js__WEBPACK_IMPORTED_MODULE_20__[\"default\"]; });\n\n/* harmony import */ var _min_js__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./min.js */ \"./node_modules/d3-contour/node_modules/d3-array/src/min.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"min\", function() { return _min_js__WEBPACK_IMPORTED_MODULE_21__[\"default\"]; });\n\n/* harmony import */ var _minIndex_js__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./minIndex.js */ \"./node_modules/d3-contour/node_modules/d3-array/src/minIndex.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"minIndex\", function() { return _minIndex_js__WEBPACK_IMPORTED_MODULE_22__[\"default\"]; });\n\n/* harmony import */ var _mode_js__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./mode.js */ \"./node_modules/d3-contour/node_modules/d3-array/src/mode.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"mode\", function() { return _mode_js__WEBPACK_IMPORTED_MODULE_23__[\"default\"]; });\n\n/* harmony import */ var _nice_js__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ./nice.js */ \"./node_modules/d3-contour/node_modules/d3-array/src/nice.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"nice\", function() { return _nice_js__WEBPACK_IMPORTED_MODULE_24__[\"default\"]; });\n\n/* harmony import */ var _pairs_js__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ./pairs.js */ \"./node_modules/d3-contour/node_modules/d3-array/src/pairs.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"pairs\", function() { return _pairs_js__WEBPACK_IMPORTED_MODULE_25__[\"default\"]; });\n\n/* harmony import */ var _permute_js__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ./permute.js */ \"./node_modules/d3-contour/node_modules/d3-array/src/permute.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"permute\", function() { return _permute_js__WEBPACK_IMPORTED_MODULE_26__[\"default\"]; });\n\n/* harmony import */ var _quantile_js__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ./quantile.js */ \"./node_modules/d3-contour/node_modules/d3-array/src/quantile.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"quantile\", function() { return _quantile_js__WEBPACK_IMPORTED_MODULE_27__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"quantileSorted\", function() { return _quantile_js__WEBPACK_IMPORTED_MODULE_27__[\"quantileSorted\"]; });\n\n/* harmony import */ var _quickselect_js__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ./quickselect.js */ \"./node_modules/d3-contour/node_modules/d3-array/src/quickselect.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"quickselect\", function() { return _quickselect_js__WEBPACK_IMPORTED_MODULE_28__[\"default\"]; });\n\n/* harmony import */ var _range_js__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ./range.js */ \"./node_modules/d3-contour/node_modules/d3-array/src/range.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"range\", function() { return _range_js__WEBPACK_IMPORTED_MODULE_29__[\"default\"]; });\n\n/* harmony import */ var _least_js__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ./least.js */ \"./node_modules/d3-contour/node_modules/d3-array/src/least.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"least\", function() { return _least_js__WEBPACK_IMPORTED_MODULE_30__[\"default\"]; });\n\n/* harmony import */ var _leastIndex_js__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ./leastIndex.js */ \"./node_modules/d3-contour/node_modules/d3-array/src/leastIndex.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"leastIndex\", function() { return _leastIndex_js__WEBPACK_IMPORTED_MODULE_31__[\"default\"]; });\n\n/* harmony import */ var _greatest_js__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ./greatest.js */ \"./node_modules/d3-contour/node_modules/d3-array/src/greatest.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"greatest\", function() { return _greatest_js__WEBPACK_IMPORTED_MODULE_32__[\"default\"]; });\n\n/* harmony import */ var _greatestIndex_js__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! ./greatestIndex.js */ \"./node_modules/d3-contour/node_modules/d3-array/src/greatestIndex.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"greatestIndex\", function() { return _greatestIndex_js__WEBPACK_IMPORTED_MODULE_33__[\"default\"]; });\n\n/* harmony import */ var _scan_js__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! ./scan.js */ \"./node_modules/d3-contour/node_modules/d3-array/src/scan.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"scan\", function() { return _scan_js__WEBPACK_IMPORTED_MODULE_34__[\"default\"]; });\n\n/* harmony import */ var _shuffle_js__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(/*! ./shuffle.js */ \"./node_modules/d3-contour/node_modules/d3-array/src/shuffle.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"shuffle\", function() { return _shuffle_js__WEBPACK_IMPORTED_MODULE_35__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"shuffler\", function() { return _shuffle_js__WEBPACK_IMPORTED_MODULE_35__[\"shuffler\"]; });\n\n/* harmony import */ var _sum_js__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(/*! ./sum.js */ \"./node_modules/d3-contour/node_modules/d3-array/src/sum.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"sum\", function() { return _sum_js__WEBPACK_IMPORTED_MODULE_36__[\"default\"]; });\n\n/* harmony import */ var _ticks_js__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(/*! ./ticks.js */ \"./node_modules/d3-contour/node_modules/d3-array/src/ticks.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"ticks\", function() { return _ticks_js__WEBPACK_IMPORTED_MODULE_37__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"tickIncrement\", function() { return _ticks_js__WEBPACK_IMPORTED_MODULE_37__[\"tickIncrement\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"tickStep\", function() { return _ticks_js__WEBPACK_IMPORTED_MODULE_37__[\"tickStep\"]; });\n\n/* harmony import */ var _transpose_js__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(/*! ./transpose.js */ \"./node_modules/d3-contour/node_modules/d3-array/src/transpose.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"transpose\", function() { return _transpose_js__WEBPACK_IMPORTED_MODULE_38__[\"default\"]; });\n\n/* harmony import */ var _variance_js__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__(/*! ./variance.js */ \"./node_modules/d3-contour/node_modules/d3-array/src/variance.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"variance\", function() { return _variance_js__WEBPACK_IMPORTED_MODULE_39__[\"default\"]; });\n\n/* harmony import */ var _zip_js__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__(/*! ./zip.js */ \"./node_modules/d3-contour/node_modules/d3-array/src/zip.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"zip\", function() { return _zip_js__WEBPACK_IMPORTED_MODULE_40__[\"default\"]; });\n\n/* harmony import */ var _every_js__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__(/*! ./every.js */ \"./node_modules/d3-contour/node_modules/d3-array/src/every.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"every\", function() { return _every_js__WEBPACK_IMPORTED_MODULE_41__[\"default\"]; });\n\n/* harmony import */ var _some_js__WEBPACK_IMPORTED_MODULE_42__ = __webpack_require__(/*! ./some.js */ \"./node_modules/d3-contour/node_modules/d3-array/src/some.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"some\", function() { return _some_js__WEBPACK_IMPORTED_MODULE_42__[\"default\"]; });\n\n/* harmony import */ var _filter_js__WEBPACK_IMPORTED_MODULE_43__ = __webpack_require__(/*! ./filter.js */ \"./node_modules/d3-contour/node_modules/d3-array/src/filter.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"filter\", function() { return _filter_js__WEBPACK_IMPORTED_MODULE_43__[\"default\"]; });\n\n/* harmony import */ var _map_js__WEBPACK_IMPORTED_MODULE_44__ = __webpack_require__(/*! ./map.js */ \"./node_modules/d3-contour/node_modules/d3-array/src/map.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"map\", function() { return _map_js__WEBPACK_IMPORTED_MODULE_44__[\"default\"]; });\n\n/* harmony import */ var _reduce_js__WEBPACK_IMPORTED_MODULE_45__ = __webpack_require__(/*! ./reduce.js */ \"./node_modules/d3-contour/node_modules/d3-array/src/reduce.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"reduce\", function() { return _reduce_js__WEBPACK_IMPORTED_MODULE_45__[\"default\"]; });\n\n/* harmony import */ var _reverse_js__WEBPACK_IMPORTED_MODULE_46__ = __webpack_require__(/*! ./reverse.js */ \"./node_modules/d3-contour/node_modules/d3-array/src/reverse.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"reverse\", function() { return _reverse_js__WEBPACK_IMPORTED_MODULE_46__[\"default\"]; });\n\n/* harmony import */ var _sort_js__WEBPACK_IMPORTED_MODULE_47__ = __webpack_require__(/*! ./sort.js */ \"./node_modules/d3-contour/node_modules/d3-array/src/sort.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"sort\", function() { return _sort_js__WEBPACK_IMPORTED_MODULE_47__[\"default\"]; });\n\n/* harmony import */ var _difference_js__WEBPACK_IMPORTED_MODULE_48__ = __webpack_require__(/*! ./difference.js */ \"./node_modules/d3-contour/node_modules/d3-array/src/difference.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"difference\", function() { return _difference_js__WEBPACK_IMPORTED_MODULE_48__[\"default\"]; });\n\n/* harmony import */ var _disjoint_js__WEBPACK_IMPORTED_MODULE_49__ = __webpack_require__(/*! ./disjoint.js */ \"./node_modules/d3-contour/node_modules/d3-array/src/disjoint.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"disjoint\", function() { return _disjoint_js__WEBPACK_IMPORTED_MODULE_49__[\"default\"]; });\n\n/* harmony import */ var _intersection_js__WEBPACK_IMPORTED_MODULE_50__ = __webpack_require__(/*! ./intersection.js */ \"./node_modules/d3-contour/node_modules/d3-array/src/intersection.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"intersection\", function() { return _intersection_js__WEBPACK_IMPORTED_MODULE_50__[\"default\"]; });\n\n/* harmony import */ var _subset_js__WEBPACK_IMPORTED_MODULE_51__ = __webpack_require__(/*! ./subset.js */ \"./node_modules/d3-contour/node_modules/d3-array/src/subset.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"subset\", function() { return _subset_js__WEBPACK_IMPORTED_MODULE_51__[\"default\"]; });\n\n/* harmony import */ var _superset_js__WEBPACK_IMPORTED_MODULE_52__ = __webpack_require__(/*! ./superset.js */ \"./node_modules/d3-contour/node_modules/d3-array/src/superset.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"superset\", function() { return _superset_js__WEBPACK_IMPORTED_MODULE_52__[\"default\"]; });\n\n/* harmony import */ var _union_js__WEBPACK_IMPORTED_MODULE_53__ = __webpack_require__(/*! ./union.js */ \"./node_modules/d3-contour/node_modules/d3-array/src/union.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"union\", function() { return _union_js__WEBPACK_IMPORTED_MODULE_53__[\"default\"]; });\n\n/* harmony import */ var internmap__WEBPACK_IMPORTED_MODULE_54__ = __webpack_require__(/*! internmap */ \"./node_modules/internmap/src/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"InternMap\", function() { return internmap__WEBPACK_IMPORTED_MODULE_54__[\"InternMap\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"InternSet\", function() { return internmap__WEBPACK_IMPORTED_MODULE_54__[\"InternSet\"]; });\n\n\n\n\n\n\n\n\n\n\n\n\n\n // Deprecated; use bin.\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n // Deprecated; use leastIndex.\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-contour/node_modules/d3-array/src/intersection.js\":\n/*!***************************************************************************!*\\\n  !*** ./node_modules/d3-contour/node_modules/d3-array/src/intersection.js ***!\n  \\***************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return intersection; });\n/* harmony import */ var _set_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./set.js */ \"./node_modules/d3-contour/node_modules/d3-array/src/set.js\");\n\n\nfunction intersection(values, ...others) {\n  values = new Set(values);\n  others = others.map(_set_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]);\n  out: for (const value of values) {\n    for (const other of others) {\n      if (!other.has(value)) {\n        values.delete(value);\n        continue out;\n      }\n    }\n  }\n  return values;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-contour/node_modules/d3-array/src/least.js\":\n/*!********************************************************************!*\\\n  !*** ./node_modules/d3-contour/node_modules/d3-array/src/least.js ***!\n  \\********************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return least; });\n/* harmony import */ var _ascending_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ascending.js */ \"./node_modules/d3-contour/node_modules/d3-array/src/ascending.js\");\n\n\nfunction least(values, compare = _ascending_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]) {\n  let min;\n  let defined = false;\n  if (compare.length === 1) {\n    let minValue;\n    for (const element of values) {\n      const value = compare(element);\n      if (defined\n          ? Object(_ascending_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(value, minValue) < 0\n          : Object(_ascending_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(value, value) === 0) {\n        min = element;\n        minValue = value;\n        defined = true;\n      }\n    }\n  } else {\n    for (const value of values) {\n      if (defined\n          ? compare(value, min) < 0\n          : compare(value, value) === 0) {\n        min = value;\n        defined = true;\n      }\n    }\n  }\n  return min;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-contour/node_modules/d3-array/src/leastIndex.js\":\n/*!*************************************************************************!*\\\n  !*** ./node_modules/d3-contour/node_modules/d3-array/src/leastIndex.js ***!\n  \\*************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return leastIndex; });\n/* harmony import */ var _ascending_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ascending.js */ \"./node_modules/d3-contour/node_modules/d3-array/src/ascending.js\");\n/* harmony import */ var _minIndex_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./minIndex.js */ \"./node_modules/d3-contour/node_modules/d3-array/src/minIndex.js\");\n\n\n\nfunction leastIndex(values, compare = _ascending_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]) {\n  if (compare.length === 1) return Object(_minIndex_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(values, compare);\n  let minValue;\n  let min = -1;\n  let index = -1;\n  for (const value of values) {\n    ++index;\n    if (min < 0\n        ? compare(value, value) === 0\n        : compare(value, minValue) < 0) {\n      minValue = value;\n      min = index;\n    }\n  }\n  return min;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-contour/node_modules/d3-array/src/map.js\":\n/*!******************************************************************!*\\\n  !*** ./node_modules/d3-contour/node_modules/d3-array/src/map.js ***!\n  \\******************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return map; });\nfunction map(values, mapper) {\n  if (typeof values[Symbol.iterator] !== \"function\") throw new TypeError(\"values is not iterable\");\n  if (typeof mapper !== \"function\") throw new TypeError(\"mapper is not a function\");\n  return Array.from(values, (value, index) => mapper(value, index, values));\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-contour/node_modules/d3-array/src/max.js\":\n/*!******************************************************************!*\\\n  !*** ./node_modules/d3-contour/node_modules/d3-array/src/max.js ***!\n  \\******************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return max; });\nfunction max(values, valueof) {\n  let max;\n  if (valueof === undefined) {\n    for (const value of values) {\n      if (value != null\n          && (max < value || (max === undefined && value >= value))) {\n        max = value;\n      }\n    }\n  } else {\n    let index = -1;\n    for (let value of values) {\n      if ((value = valueof(value, ++index, values)) != null\n          && (max < value || (max === undefined && value >= value))) {\n        max = value;\n      }\n    }\n  }\n  return max;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-contour/node_modules/d3-array/src/maxIndex.js\":\n/*!***********************************************************************!*\\\n  !*** ./node_modules/d3-contour/node_modules/d3-array/src/maxIndex.js ***!\n  \\***********************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return maxIndex; });\nfunction maxIndex(values, valueof) {\n  let max;\n  let maxIndex = -1;\n  let index = -1;\n  if (valueof === undefined) {\n    for (const value of values) {\n      ++index;\n      if (value != null\n          && (max < value || (max === undefined && value >= value))) {\n        max = value, maxIndex = index;\n      }\n    }\n  } else {\n    for (let value of values) {\n      if ((value = valueof(value, ++index, values)) != null\n          && (max < value || (max === undefined && value >= value))) {\n        max = value, maxIndex = index;\n      }\n    }\n  }\n  return maxIndex;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-contour/node_modules/d3-array/src/mean.js\":\n/*!*******************************************************************!*\\\n  !*** ./node_modules/d3-contour/node_modules/d3-array/src/mean.js ***!\n  \\*******************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return mean; });\nfunction mean(values, valueof) {\n  let count = 0;\n  let sum = 0;\n  if (valueof === undefined) {\n    for (let value of values) {\n      if (value != null && (value = +value) >= value) {\n        ++count, sum += value;\n      }\n    }\n  } else {\n    let index = -1;\n    for (let value of values) {\n      if ((value = valueof(value, ++index, values)) != null && (value = +value) >= value) {\n        ++count, sum += value;\n      }\n    }\n  }\n  if (count) return sum / count;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-contour/node_modules/d3-array/src/median.js\":\n/*!*********************************************************************!*\\\n  !*** ./node_modules/d3-contour/node_modules/d3-array/src/median.js ***!\n  \\*********************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _quantile_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./quantile.js */ \"./node_modules/d3-contour/node_modules/d3-array/src/quantile.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(values, valueof) {\n  return Object(_quantile_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(values, 0.5, valueof);\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-contour/node_modules/d3-array/src/merge.js\":\n/*!********************************************************************!*\\\n  !*** ./node_modules/d3-contour/node_modules/d3-array/src/merge.js ***!\n  \\********************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return merge; });\nfunction* flatten(arrays) {\n  for (const array of arrays) {\n    yield* array;\n  }\n}\n\nfunction merge(arrays) {\n  return Array.from(flatten(arrays));\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-contour/node_modules/d3-array/src/min.js\":\n/*!******************************************************************!*\\\n  !*** ./node_modules/d3-contour/node_modules/d3-array/src/min.js ***!\n  \\******************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return min; });\nfunction min(values, valueof) {\n  let min;\n  if (valueof === undefined) {\n    for (const value of values) {\n      if (value != null\n          && (min > value || (min === undefined && value >= value))) {\n        min = value;\n      }\n    }\n  } else {\n    let index = -1;\n    for (let value of values) {\n      if ((value = valueof(value, ++index, values)) != null\n          && (min > value || (min === undefined && value >= value))) {\n        min = value;\n      }\n    }\n  }\n  return min;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-contour/node_modules/d3-array/src/minIndex.js\":\n/*!***********************************************************************!*\\\n  !*** ./node_modules/d3-contour/node_modules/d3-array/src/minIndex.js ***!\n  \\***********************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return minIndex; });\nfunction minIndex(values, valueof) {\n  let min;\n  let minIndex = -1;\n  let index = -1;\n  if (valueof === undefined) {\n    for (const value of values) {\n      ++index;\n      if (value != null\n          && (min > value || (min === undefined && value >= value))) {\n        min = value, minIndex = index;\n      }\n    }\n  } else {\n    for (let value of values) {\n      if ((value = valueof(value, ++index, values)) != null\n          && (min > value || (min === undefined && value >= value))) {\n        min = value, minIndex = index;\n      }\n    }\n  }\n  return minIndex;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-contour/node_modules/d3-array/src/mode.js\":\n/*!*******************************************************************!*\\\n  !*** ./node_modules/d3-contour/node_modules/d3-array/src/mode.js ***!\n  \\*******************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var internmap__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! internmap */ \"./node_modules/internmap/src/index.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(values, valueof) {\n  const counts = new internmap__WEBPACK_IMPORTED_MODULE_0__[\"InternMap\"]();\n  if (valueof === undefined) {\n    for (let value of values) {\n      if (value != null && value >= value) {\n        counts.set(value, (counts.get(value) || 0) + 1);\n      }\n    }\n  } else {\n    let index = -1;\n    for (let value of values) {\n      if ((value = valueof(value, ++index, values)) != null && value >= value) {\n        counts.set(value, (counts.get(value) || 0) + 1);\n      }\n    }\n  }\n  let modeValue;\n  let modeCount = 0;\n  for (const [value, count] of counts) {\n    if (count > modeCount) {\n      modeCount = count;\n      modeValue = value;\n    }\n  }\n  return modeValue;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-contour/node_modules/d3-array/src/nice.js\":\n/*!*******************************************************************!*\\\n  !*** ./node_modules/d3-contour/node_modules/d3-array/src/nice.js ***!\n  \\*******************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return nice; });\n/* harmony import */ var _ticks_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ticks.js */ \"./node_modules/d3-contour/node_modules/d3-array/src/ticks.js\");\n\n\nfunction nice(start, stop, count) {\n  let prestep;\n  while (true) {\n    const step = Object(_ticks_js__WEBPACK_IMPORTED_MODULE_0__[\"tickIncrement\"])(start, stop, count);\n    if (step === prestep || step === 0 || !isFinite(step)) {\n      return [start, stop];\n    } else if (step > 0) {\n      start = Math.floor(start / step) * step;\n      stop = Math.ceil(stop / step) * step;\n    } else if (step < 0) {\n      start = Math.ceil(start * step) / step;\n      stop = Math.floor(stop * step) / step;\n    }\n    prestep = step;\n  }\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-contour/node_modules/d3-array/src/number.js\":\n/*!*********************************************************************!*\\\n  !*** ./node_modules/d3-contour/node_modules/d3-array/src/number.js ***!\n  \\*********************************************************************/\n/*! exports provided: default, numbers */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"numbers\", function() { return numbers; });\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(x) {\n  return x === null ? NaN : +x;\n});\n\nfunction* numbers(values, valueof) {\n  if (valueof === undefined) {\n    for (let value of values) {\n      if (value != null && (value = +value) >= value) {\n        yield value;\n      }\n    }\n  } else {\n    let index = -1;\n    for (let value of values) {\n      if ((value = valueof(value, ++index, values)) != null && (value = +value) >= value) {\n        yield value;\n      }\n    }\n  }\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-contour/node_modules/d3-array/src/pairs.js\":\n/*!********************************************************************!*\\\n  !*** ./node_modules/d3-contour/node_modules/d3-array/src/pairs.js ***!\n  \\********************************************************************/\n/*! exports provided: default, pair */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return pairs; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"pair\", function() { return pair; });\nfunction pairs(values, pairof = pair) {\n  const pairs = [];\n  let previous;\n  let first = false;\n  for (const value of values) {\n    if (first) pairs.push(pairof(previous, value));\n    previous = value;\n    first = true;\n  }\n  return pairs;\n}\n\nfunction pair(a, b) {\n  return [a, b];\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-contour/node_modules/d3-array/src/permute.js\":\n/*!**********************************************************************!*\\\n  !*** ./node_modules/d3-contour/node_modules/d3-array/src/permute.js ***!\n  \\**********************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(source, keys) {\n  return Array.from(keys, key => source[key]);\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-contour/node_modules/d3-array/src/quantile.js\":\n/*!***********************************************************************!*\\\n  !*** ./node_modules/d3-contour/node_modules/d3-array/src/quantile.js ***!\n  \\***********************************************************************/\n/*! exports provided: default, quantileSorted */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return quantile; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"quantileSorted\", function() { return quantileSorted; });\n/* harmony import */ var _max_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./max.js */ \"./node_modules/d3-contour/node_modules/d3-array/src/max.js\");\n/* harmony import */ var _min_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./min.js */ \"./node_modules/d3-contour/node_modules/d3-array/src/min.js\");\n/* harmony import */ var _quickselect_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./quickselect.js */ \"./node_modules/d3-contour/node_modules/d3-array/src/quickselect.js\");\n/* harmony import */ var _number_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./number.js */ \"./node_modules/d3-contour/node_modules/d3-array/src/number.js\");\n\n\n\n\n\nfunction quantile(values, p, valueof) {\n  values = Float64Array.from(Object(_number_js__WEBPACK_IMPORTED_MODULE_3__[\"numbers\"])(values, valueof));\n  if (!(n = values.length)) return;\n  if ((p = +p) <= 0 || n < 2) return Object(_min_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(values);\n  if (p >= 1) return Object(_max_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(values);\n  var n,\n      i = (n - 1) * p,\n      i0 = Math.floor(i),\n      value0 = Object(_max_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(Object(_quickselect_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(values, i0).subarray(0, i0 + 1)),\n      value1 = Object(_min_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(values.subarray(i0 + 1));\n  return value0 + (value1 - value0) * (i - i0);\n}\n\nfunction quantileSorted(values, p, valueof = _number_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"]) {\n  if (!(n = values.length)) return;\n  if ((p = +p) <= 0 || n < 2) return +valueof(values[0], 0, values);\n  if (p >= 1) return +valueof(values[n - 1], n - 1, values);\n  var n,\n      i = (n - 1) * p,\n      i0 = Math.floor(i),\n      value0 = +valueof(values[i0], i0, values),\n      value1 = +valueof(values[i0 + 1], i0 + 1, values);\n  return value0 + (value1 - value0) * (i - i0);\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-contour/node_modules/d3-array/src/quickselect.js\":\n/*!**************************************************************************!*\\\n  !*** ./node_modules/d3-contour/node_modules/d3-array/src/quickselect.js ***!\n  \\**************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return quickselect; });\n/* harmony import */ var _ascending_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ascending.js */ \"./node_modules/d3-contour/node_modules/d3-array/src/ascending.js\");\n\n\n// Based on https://github.com/mourner/quickselect\n// ISC license, Copyright 2018 Vladimir Agafonkin.\nfunction quickselect(array, k, left = 0, right = array.length - 1, compare = _ascending_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]) {\n  while (right > left) {\n    if (right - left > 600) {\n      const n = right - left + 1;\n      const m = k - left + 1;\n      const z = Math.log(n);\n      const s = 0.5 * Math.exp(2 * z / 3);\n      const sd = 0.5 * Math.sqrt(z * s * (n - s) / n) * (m - n / 2 < 0 ? -1 : 1);\n      const newLeft = Math.max(left, Math.floor(k - m * s / n + sd));\n      const newRight = Math.min(right, Math.floor(k + (n - m) * s / n + sd));\n      quickselect(array, k, newLeft, newRight, compare);\n    }\n\n    const t = array[k];\n    let i = left;\n    let j = right;\n\n    swap(array, left, k);\n    if (compare(array[right], t) > 0) swap(array, left, right);\n\n    while (i < j) {\n      swap(array, i, j), ++i, --j;\n      while (compare(array[i], t) < 0) ++i;\n      while (compare(array[j], t) > 0) --j;\n    }\n\n    if (compare(array[left], t) === 0) swap(array, left, j);\n    else ++j, swap(array, j, right);\n\n    if (j <= k) left = j + 1;\n    if (k <= j) right = j - 1;\n  }\n  return array;\n}\n\nfunction swap(array, i, j) {\n  const t = array[i];\n  array[i] = array[j];\n  array[j] = t;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-contour/node_modules/d3-array/src/range.js\":\n/*!********************************************************************!*\\\n  !*** ./node_modules/d3-contour/node_modules/d3-array/src/range.js ***!\n  \\********************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(start, stop, step) {\n  start = +start, stop = +stop, step = (n = arguments.length) < 2 ? (stop = start, start = 0, 1) : n < 3 ? 1 : +step;\n\n  var i = -1,\n      n = Math.max(0, Math.ceil((stop - start) / step)) | 0,\n      range = new Array(n);\n\n  while (++i < n) {\n    range[i] = start + i * step;\n  }\n\n  return range;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-contour/node_modules/d3-array/src/reduce.js\":\n/*!*********************************************************************!*\\\n  !*** ./node_modules/d3-contour/node_modules/d3-array/src/reduce.js ***!\n  \\*********************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return reduce; });\nfunction reduce(values, reducer, value) {\n  if (typeof reducer !== \"function\") throw new TypeError(\"reducer is not a function\");\n  const iterator = values[Symbol.iterator]();\n  let done, next, index = -1;\n  if (arguments.length < 3) {\n    ({done, value} = iterator.next());\n    if (done) return;\n    ++index;\n  }\n  while (({done, value: next} = iterator.next()), !done) {\n    value = reducer(value, next, ++index, values);\n  }\n  return value;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-contour/node_modules/d3-array/src/reverse.js\":\n/*!**********************************************************************!*\\\n  !*** ./node_modules/d3-contour/node_modules/d3-array/src/reverse.js ***!\n  \\**********************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return reverse; });\nfunction reverse(values) {\n  if (typeof values[Symbol.iterator] !== \"function\") throw new TypeError(\"values is not iterable\");\n  return Array.from(values).reverse();\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-contour/node_modules/d3-array/src/scan.js\":\n/*!*******************************************************************!*\\\n  !*** ./node_modules/d3-contour/node_modules/d3-array/src/scan.js ***!\n  \\*******************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return scan; });\n/* harmony import */ var _leastIndex_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./leastIndex.js */ \"./node_modules/d3-contour/node_modules/d3-array/src/leastIndex.js\");\n\n\nfunction scan(values, compare) {\n  const index = Object(_leastIndex_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(values, compare);\n  return index < 0 ? undefined : index;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-contour/node_modules/d3-array/src/set.js\":\n/*!******************************************************************!*\\\n  !*** ./node_modules/d3-contour/node_modules/d3-array/src/set.js ***!\n  \\******************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return set; });\nfunction set(values) {\n  return values instanceof Set ? values : new Set(values);\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-contour/node_modules/d3-array/src/shuffle.js\":\n/*!**********************************************************************!*\\\n  !*** ./node_modules/d3-contour/node_modules/d3-array/src/shuffle.js ***!\n  \\**********************************************************************/\n/*! exports provided: default, shuffler */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"shuffler\", function() { return shuffler; });\n/* harmony default export */ __webpack_exports__[\"default\"] = (shuffler(Math.random));\n\nfunction shuffler(random) {\n  return function shuffle(array, i0 = 0, i1 = array.length) {\n    let m = i1 - (i0 = +i0);\n    while (m) {\n      const i = random() * m-- | 0, t = array[m + i0];\n      array[m + i0] = array[i + i0];\n      array[i + i0] = t;\n    }\n    return array;\n  };\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-contour/node_modules/d3-array/src/some.js\":\n/*!*******************************************************************!*\\\n  !*** ./node_modules/d3-contour/node_modules/d3-array/src/some.js ***!\n  \\*******************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return some; });\nfunction some(values, test) {\n  if (typeof test !== \"function\") throw new TypeError(\"test is not a function\");\n  let index = -1;\n  for (const value of values) {\n    if (test(value, ++index, values)) {\n      return true;\n    }\n  }\n  return false;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-contour/node_modules/d3-array/src/sort.js\":\n/*!*******************************************************************!*\\\n  !*** ./node_modules/d3-contour/node_modules/d3-array/src/sort.js ***!\n  \\*******************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return sort; });\n/* harmony import */ var _ascending_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ascending.js */ \"./node_modules/d3-contour/node_modules/d3-array/src/ascending.js\");\n/* harmony import */ var _permute_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./permute.js */ \"./node_modules/d3-contour/node_modules/d3-array/src/permute.js\");\n\n\n\nfunction sort(values, ...F) {\n  if (typeof values[Symbol.iterator] !== \"function\") throw new TypeError(\"values is not iterable\");\n  values = Array.from(values);\n  let [f = _ascending_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]] = F;\n  if (f.length === 1 || F.length > 1) {\n    const index = Uint32Array.from(values, (d, i) => i);\n    if (F.length > 1) {\n      F = F.map(f => values.map(f));\n      index.sort((i, j) => {\n        for (const f of F) {\n          const c = Object(_ascending_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(f[i], f[j]);\n          if (c) return c;\n        }\n      });\n    } else {\n      f = values.map(f);\n      index.sort((i, j) => Object(_ascending_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(f[i], f[j]));\n    }\n    return Object(_permute_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(values, index);\n  }\n  return values.sort(f);\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-contour/node_modules/d3-array/src/subset.js\":\n/*!*********************************************************************!*\\\n  !*** ./node_modules/d3-contour/node_modules/d3-array/src/subset.js ***!\n  \\*********************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return subset; });\n/* harmony import */ var _superset_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./superset.js */ \"./node_modules/d3-contour/node_modules/d3-array/src/superset.js\");\n\n\nfunction subset(values, other) {\n  return Object(_superset_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(other, values);\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-contour/node_modules/d3-array/src/sum.js\":\n/*!******************************************************************!*\\\n  !*** ./node_modules/d3-contour/node_modules/d3-array/src/sum.js ***!\n  \\******************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return sum; });\nfunction sum(values, valueof) {\n  let sum = 0;\n  if (valueof === undefined) {\n    for (let value of values) {\n      if (value = +value) {\n        sum += value;\n      }\n    }\n  } else {\n    let index = -1;\n    for (let value of values) {\n      if (value = +valueof(value, ++index, values)) {\n        sum += value;\n      }\n    }\n  }\n  return sum;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-contour/node_modules/d3-array/src/superset.js\":\n/*!***********************************************************************!*\\\n  !*** ./node_modules/d3-contour/node_modules/d3-array/src/superset.js ***!\n  \\***********************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return superset; });\nfunction superset(values, other) {\n  const iterator = values[Symbol.iterator](), set = new Set();\n  for (const o of other) {\n    if (set.has(o)) continue;\n    let value, done;\n    while (({value, done} = iterator.next())) {\n      if (done) return false;\n      set.add(value);\n      if (Object.is(o, value)) break;\n    }\n  }\n  return true;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-contour/node_modules/d3-array/src/threshold/freedmanDiaconis.js\":\n/*!*****************************************************************************************!*\\\n  !*** ./node_modules/d3-contour/node_modules/d3-array/src/threshold/freedmanDiaconis.js ***!\n  \\*****************************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _count_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../count.js */ \"./node_modules/d3-contour/node_modules/d3-array/src/count.js\");\n/* harmony import */ var _quantile_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../quantile.js */ \"./node_modules/d3-contour/node_modules/d3-array/src/quantile.js\");\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(values, min, max) {\n  return Math.ceil((max - min) / (2 * (Object(_quantile_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(values, 0.75) - Object(_quantile_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(values, 0.25)) * Math.pow(Object(_count_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(values), -1 / 3)));\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-contour/node_modules/d3-array/src/threshold/scott.js\":\n/*!******************************************************************************!*\\\n  !*** ./node_modules/d3-contour/node_modules/d3-array/src/threshold/scott.js ***!\n  \\******************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _count_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../count.js */ \"./node_modules/d3-contour/node_modules/d3-array/src/count.js\");\n/* harmony import */ var _deviation_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../deviation.js */ \"./node_modules/d3-contour/node_modules/d3-array/src/deviation.js\");\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(values, min, max) {\n  return Math.ceil((max - min) / (3.5 * Object(_deviation_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(values) * Math.pow(Object(_count_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(values), -1 / 3)));\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-contour/node_modules/d3-array/src/threshold/sturges.js\":\n/*!********************************************************************************!*\\\n  !*** ./node_modules/d3-contour/node_modules/d3-array/src/threshold/sturges.js ***!\n  \\********************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _count_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../count.js */ \"./node_modules/d3-contour/node_modules/d3-array/src/count.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(values) {\n  return Math.ceil(Math.log(Object(_count_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(values)) / Math.LN2) + 1;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-contour/node_modules/d3-array/src/ticks.js\":\n/*!********************************************************************!*\\\n  !*** ./node_modules/d3-contour/node_modules/d3-array/src/ticks.js ***!\n  \\********************************************************************/\n/*! exports provided: default, tickIncrement, tickStep */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"tickIncrement\", function() { return tickIncrement; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"tickStep\", function() { return tickStep; });\nvar e10 = Math.sqrt(50),\n    e5 = Math.sqrt(10),\n    e2 = Math.sqrt(2);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(start, stop, count) {\n  var reverse,\n      i = -1,\n      n,\n      ticks,\n      step;\n\n  stop = +stop, start = +start, count = +count;\n  if (start === stop && count > 0) return [start];\n  if (reverse = stop < start) n = start, start = stop, stop = n;\n  if ((step = tickIncrement(start, stop, count)) === 0 || !isFinite(step)) return [];\n\n  if (step > 0) {\n    let r0 = Math.round(start / step), r1 = Math.round(stop / step);\n    if (r0 * step < start) ++r0;\n    if (r1 * step > stop) --r1;\n    ticks = new Array(n = r1 - r0 + 1);\n    while (++i < n) ticks[i] = (r0 + i) * step;\n  } else {\n    step = -step;\n    let r0 = Math.round(start * step), r1 = Math.round(stop * step);\n    if (r0 / step < start) ++r0;\n    if (r1 / step > stop) --r1;\n    ticks = new Array(n = r1 - r0 + 1);\n    while (++i < n) ticks[i] = (r0 + i) / step;\n  }\n\n  if (reverse) ticks.reverse();\n\n  return ticks;\n});\n\nfunction tickIncrement(start, stop, count) {\n  var step = (stop - start) / Math.max(0, count),\n      power = Math.floor(Math.log(step) / Math.LN10),\n      error = step / Math.pow(10, power);\n  return power >= 0\n      ? (error >= e10 ? 10 : error >= e5 ? 5 : error >= e2 ? 2 : 1) * Math.pow(10, power)\n      : -Math.pow(10, -power) / (error >= e10 ? 10 : error >= e5 ? 5 : error >= e2 ? 2 : 1);\n}\n\nfunction tickStep(start, stop, count) {\n  var step0 = Math.abs(stop - start) / Math.max(0, count),\n      step1 = Math.pow(10, Math.floor(Math.log(step0) / Math.LN10)),\n      error = step0 / step1;\n  if (error >= e10) step1 *= 10;\n  else if (error >= e5) step1 *= 5;\n  else if (error >= e2) step1 *= 2;\n  return stop < start ? -step1 : step1;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-contour/node_modules/d3-array/src/transpose.js\":\n/*!************************************************************************!*\\\n  !*** ./node_modules/d3-contour/node_modules/d3-array/src/transpose.js ***!\n  \\************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _min_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./min.js */ \"./node_modules/d3-contour/node_modules/d3-array/src/min.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(matrix) {\n  if (!(n = matrix.length)) return [];\n  for (var i = -1, m = Object(_min_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(matrix, length), transpose = new Array(m); ++i < m;) {\n    for (var j = -1, n, row = transpose[i] = new Array(n); ++j < n;) {\n      row[j] = matrix[j][i];\n    }\n  }\n  return transpose;\n});\n\nfunction length(d) {\n  return d.length;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-contour/node_modules/d3-array/src/union.js\":\n/*!********************************************************************!*\\\n  !*** ./node_modules/d3-contour/node_modules/d3-array/src/union.js ***!\n  \\********************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return union; });\nfunction union(...others) {\n  const set = new Set();\n  for (const other of others) {\n    for (const o of other) {\n      set.add(o);\n    }\n  }\n  return set;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-contour/node_modules/d3-array/src/variance.js\":\n/*!***********************************************************************!*\\\n  !*** ./node_modules/d3-contour/node_modules/d3-array/src/variance.js ***!\n  \\***********************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return variance; });\nfunction variance(values, valueof) {\n  let count = 0;\n  let delta;\n  let mean = 0;\n  let sum = 0;\n  if (valueof === undefined) {\n    for (let value of values) {\n      if (value != null && (value = +value) >= value) {\n        delta = value - mean;\n        mean += delta / ++count;\n        sum += delta * (value - mean);\n      }\n    }\n  } else {\n    let index = -1;\n    for (let value of values) {\n      if ((value = valueof(value, ++index, values)) != null && (value = +value) >= value) {\n        delta = value - mean;\n        mean += delta / ++count;\n        sum += delta * (value - mean);\n      }\n    }\n  }\n  if (count > 1) return sum / (count - 1);\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-contour/node_modules/d3-array/src/zip.js\":\n/*!******************************************************************!*\\\n  !*** ./node_modules/d3-contour/node_modules/d3-array/src/zip.js ***!\n  \\******************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _transpose_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./transpose.js */ \"./node_modules/d3-contour/node_modules/d3-array/src/transpose.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  return Object(_transpose_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(arguments);\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-contour/src/area.js\":\n/*!*********************************************!*\\\n  !*** ./node_modules/d3-contour/src/area.js ***!\n  \\*********************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(ring) {\n  var i = 0, n = ring.length, area = ring[n - 1][1] * ring[0][0] - ring[n - 1][0] * ring[0][1];\n  while (++i < n) area += ring[i - 1][1] * ring[i][0] - ring[i - 1][0] * ring[i][1];\n  return area;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-contour/src/array.js\":\n/*!**********************************************!*\\\n  !*** ./node_modules/d3-contour/src/array.js ***!\n  \\**********************************************/\n/*! exports provided: slice */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"slice\", function() { return slice; });\nvar array = Array.prototype;\n\nvar slice = array.slice;\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-contour/src/ascending.js\":\n/*!**************************************************!*\\\n  !*** ./node_modules/d3-contour/src/ascending.js ***!\n  \\**************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(a, b) {\n  return a - b;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-contour/src/blur.js\":\n/*!*********************************************!*\\\n  !*** ./node_modules/d3-contour/src/blur.js ***!\n  \\*********************************************/\n/*! exports provided: blurX, blurY */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"blurX\", function() { return blurX; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"blurY\", function() { return blurY; });\n// TODO Optimize edge cases.\n// TODO Optimize index calculation.\n// TODO Optimize arguments.\nfunction blurX(source, target, r) {\n  var n = source.width,\n      m = source.height,\n      w = (r << 1) + 1;\n  for (var j = 0; j < m; ++j) {\n    for (var i = 0, sr = 0; i < n + r; ++i) {\n      if (i < n) {\n        sr += source.data[i + j * n];\n      }\n      if (i >= r) {\n        if (i >= w) {\n          sr -= source.data[i - w + j * n];\n        }\n        target.data[i - r + j * n] = sr / Math.min(i + 1, n - 1 + w - i, w);\n      }\n    }\n  }\n}\n\n// TODO Optimize edge cases.\n// TODO Optimize index calculation.\n// TODO Optimize arguments.\nfunction blurY(source, target, r) {\n  var n = source.width,\n      m = source.height,\n      w = (r << 1) + 1;\n  for (var i = 0; i < n; ++i) {\n    for (var j = 0, sr = 0; j < m + r; ++j) {\n      if (j < m) {\n        sr += source.data[i + j * n];\n      }\n      if (j >= r) {\n        if (j >= w) {\n          sr -= source.data[i + (j - w) * n];\n        }\n        target.data[i + (j - r) * n] = sr / Math.min(j + 1, m - 1 + w - j, w);\n      }\n    }\n  }\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-contour/src/constant.js\":\n/*!*************************************************!*\\\n  !*** ./node_modules/d3-contour/src/constant.js ***!\n  \\*************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (x => () => x);\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-contour/src/contains.js\":\n/*!*************************************************!*\\\n  !*** ./node_modules/d3-contour/src/contains.js ***!\n  \\*************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(ring, hole) {\n  var i = -1, n = hole.length, c;\n  while (++i < n) if (c = ringContains(ring, hole[i])) return c;\n  return 0;\n});\n\nfunction ringContains(ring, point) {\n  var x = point[0], y = point[1], contains = -1;\n  for (var i = 0, n = ring.length, j = n - 1; i < n; j = i++) {\n    var pi = ring[i], xi = pi[0], yi = pi[1], pj = ring[j], xj = pj[0], yj = pj[1];\n    if (segmentContains(pi, pj, point)) return 0;\n    if (((yi > y) !== (yj > y)) && ((x < (xj - xi) * (y - yi) / (yj - yi) + xi))) contains = -contains;\n  }\n  return contains;\n}\n\nfunction segmentContains(a, b, c) {\n  var i; return collinear(a, b, c) && within(a[i = +(a[0] === b[0])], c[i], b[i]);\n}\n\nfunction collinear(a, b, c) {\n  return (b[0] - a[0]) * (c[1] - a[1]) === (c[0] - a[0]) * (b[1] - a[1]);\n}\n\nfunction within(p, q, r) {\n  return p <= q && q <= r || r <= q && q <= p;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-contour/src/contours.js\":\n/*!*************************************************!*\\\n  !*** ./node_modules/d3-contour/src/contours.js ***!\n  \\*************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var d3_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-array */ \"./node_modules/d3-contour/node_modules/d3-array/src/index.js\");\n/* harmony import */ var _array_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./array.js */ \"./node_modules/d3-contour/src/array.js\");\n/* harmony import */ var _ascending_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./ascending.js */ \"./node_modules/d3-contour/src/ascending.js\");\n/* harmony import */ var _area_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./area.js */ \"./node_modules/d3-contour/src/area.js\");\n/* harmony import */ var _constant_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./constant.js */ \"./node_modules/d3-contour/src/constant.js\");\n/* harmony import */ var _contains_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./contains.js */ \"./node_modules/d3-contour/src/contains.js\");\n/* harmony import */ var _noop_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./noop.js */ \"./node_modules/d3-contour/src/noop.js\");\n\n\n\n\n\n\n\n\nvar cases = [\n  [],\n  [[[1.0, 1.5], [0.5, 1.0]]],\n  [[[1.5, 1.0], [1.0, 1.5]]],\n  [[[1.5, 1.0], [0.5, 1.0]]],\n  [[[1.0, 0.5], [1.5, 1.0]]],\n  [[[1.0, 1.5], [0.5, 1.0]], [[1.0, 0.5], [1.5, 1.0]]],\n  [[[1.0, 0.5], [1.0, 1.5]]],\n  [[[1.0, 0.5], [0.5, 1.0]]],\n  [[[0.5, 1.0], [1.0, 0.5]]],\n  [[[1.0, 1.5], [1.0, 0.5]]],\n  [[[0.5, 1.0], [1.0, 0.5]], [[1.5, 1.0], [1.0, 1.5]]],\n  [[[1.5, 1.0], [1.0, 0.5]]],\n  [[[0.5, 1.0], [1.5, 1.0]]],\n  [[[1.0, 1.5], [1.5, 1.0]]],\n  [[[0.5, 1.0], [1.0, 1.5]]],\n  []\n];\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  var dx = 1,\n      dy = 1,\n      threshold = d3_array__WEBPACK_IMPORTED_MODULE_0__[\"thresholdSturges\"],\n      smooth = smoothLinear;\n\n  function contours(values) {\n    var tz = threshold(values);\n\n    // Convert number of thresholds into uniform thresholds.\n    if (!Array.isArray(tz)) {\n      const e = Object(d3_array__WEBPACK_IMPORTED_MODULE_0__[\"extent\"])(values), ts = Object(d3_array__WEBPACK_IMPORTED_MODULE_0__[\"tickStep\"])(e[0], e[1], tz);\n      tz = Object(d3_array__WEBPACK_IMPORTED_MODULE_0__[\"ticks\"])(Math.floor(e[0] / ts) * ts, Math.floor(e[1] / ts - 1) * ts, tz);\n    } else {\n      tz = tz.slice().sort(_ascending_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"]);\n    }\n\n    return tz.map(value => contour(values, value));\n  }\n\n  // Accumulate, smooth contour rings, assign holes to exterior rings.\n  // Based on https://github.com/mbostock/shapefile/blob/v0.6.2/shp/polygon.js\n  function contour(values, value) {\n    var polygons = [],\n        holes = [];\n\n    isorings(values, value, function(ring) {\n      smooth(ring, values, value);\n      if (Object(_area_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(ring) > 0) polygons.push([ring]);\n      else holes.push(ring);\n    });\n\n    holes.forEach(function(hole) {\n      for (var i = 0, n = polygons.length, polygon; i < n; ++i) {\n        if (Object(_contains_js__WEBPACK_IMPORTED_MODULE_5__[\"default\"])((polygon = polygons[i])[0], hole) !== -1) {\n          polygon.push(hole);\n          return;\n        }\n      }\n    });\n\n    return {\n      type: \"MultiPolygon\",\n      value: value,\n      coordinates: polygons\n    };\n  }\n\n  // Marching squares with isolines stitched into rings.\n  // Based on https://github.com/topojson/topojson-client/blob/v3.0.0/src/stitch.js\n  function isorings(values, value, callback) {\n    var fragmentByStart = new Array,\n        fragmentByEnd = new Array,\n        x, y, t0, t1, t2, t3;\n\n    // Special case for the first row (y = -1, t2 = t3 = 0).\n    x = y = -1;\n    t1 = values[0] >= value;\n    cases[t1 << 1].forEach(stitch);\n    while (++x < dx - 1) {\n      t0 = t1, t1 = values[x + 1] >= value;\n      cases[t0 | t1 << 1].forEach(stitch);\n    }\n    cases[t1 << 0].forEach(stitch);\n\n    // General case for the intermediate rows.\n    while (++y < dy - 1) {\n      x = -1;\n      t1 = values[y * dx + dx] >= value;\n      t2 = values[y * dx] >= value;\n      cases[t1 << 1 | t2 << 2].forEach(stitch);\n      while (++x < dx - 1) {\n        t0 = t1, t1 = values[y * dx + dx + x + 1] >= value;\n        t3 = t2, t2 = values[y * dx + x + 1] >= value;\n        cases[t0 | t1 << 1 | t2 << 2 | t3 << 3].forEach(stitch);\n      }\n      cases[t1 | t2 << 3].forEach(stitch);\n    }\n\n    // Special case for the last row (y = dy - 1, t0 = t1 = 0).\n    x = -1;\n    t2 = values[y * dx] >= value;\n    cases[t2 << 2].forEach(stitch);\n    while (++x < dx - 1) {\n      t3 = t2, t2 = values[y * dx + x + 1] >= value;\n      cases[t2 << 2 | t3 << 3].forEach(stitch);\n    }\n    cases[t2 << 3].forEach(stitch);\n\n    function stitch(line) {\n      var start = [line[0][0] + x, line[0][1] + y],\n          end = [line[1][0] + x, line[1][1] + y],\n          startIndex = index(start),\n          endIndex = index(end),\n          f, g;\n      if (f = fragmentByEnd[startIndex]) {\n        if (g = fragmentByStart[endIndex]) {\n          delete fragmentByEnd[f.end];\n          delete fragmentByStart[g.start];\n          if (f === g) {\n            f.ring.push(end);\n            callback(f.ring);\n          } else {\n            fragmentByStart[f.start] = fragmentByEnd[g.end] = {start: f.start, end: g.end, ring: f.ring.concat(g.ring)};\n          }\n        } else {\n          delete fragmentByEnd[f.end];\n          f.ring.push(end);\n          fragmentByEnd[f.end = endIndex] = f;\n        }\n      } else if (f = fragmentByStart[endIndex]) {\n        if (g = fragmentByEnd[startIndex]) {\n          delete fragmentByStart[f.start];\n          delete fragmentByEnd[g.end];\n          if (f === g) {\n            f.ring.push(end);\n            callback(f.ring);\n          } else {\n            fragmentByStart[g.start] = fragmentByEnd[f.end] = {start: g.start, end: f.end, ring: g.ring.concat(f.ring)};\n          }\n        } else {\n          delete fragmentByStart[f.start];\n          f.ring.unshift(start);\n          fragmentByStart[f.start = startIndex] = f;\n        }\n      } else {\n        fragmentByStart[startIndex] = fragmentByEnd[endIndex] = {start: startIndex, end: endIndex, ring: [start, end]};\n      }\n    }\n  }\n\n  function index(point) {\n    return point[0] * 2 + point[1] * (dx + 1) * 4;\n  }\n\n  function smoothLinear(ring, values, value) {\n    ring.forEach(function(point) {\n      var x = point[0],\n          y = point[1],\n          xt = x | 0,\n          yt = y | 0,\n          v0,\n          v1 = values[yt * dx + xt];\n      if (x > 0 && x < dx && xt === x) {\n        v0 = values[yt * dx + xt - 1];\n        point[0] = x + (value - v0) / (v1 - v0) - 0.5;\n      }\n      if (y > 0 && y < dy && yt === y) {\n        v0 = values[(yt - 1) * dx + xt];\n        point[1] = y + (value - v0) / (v1 - v0) - 0.5;\n      }\n    });\n  }\n\n  contours.contour = contour;\n\n  contours.size = function(_) {\n    if (!arguments.length) return [dx, dy];\n    var _0 = Math.floor(_[0]), _1 = Math.floor(_[1]);\n    if (!(_0 >= 0 && _1 >= 0)) throw new Error(\"invalid size\");\n    return dx = _0, dy = _1, contours;\n  };\n\n  contours.thresholds = function(_) {\n    return arguments.length ? (threshold = typeof _ === \"function\" ? _ : Array.isArray(_) ? Object(_constant_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(_array_js__WEBPACK_IMPORTED_MODULE_1__[\"slice\"].call(_)) : Object(_constant_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(_), contours) : threshold;\n  };\n\n  contours.smooth = function(_) {\n    return arguments.length ? (smooth = _ ? smoothLinear : _noop_js__WEBPACK_IMPORTED_MODULE_6__[\"default\"], contours) : smooth === smoothLinear;\n  };\n\n  return contours;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-contour/src/density.js\":\n/*!************************************************!*\\\n  !*** ./node_modules/d3-contour/src/density.js ***!\n  \\************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var d3_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-array */ \"./node_modules/d3-contour/node_modules/d3-array/src/index.js\");\n/* harmony import */ var _array_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./array.js */ \"./node_modules/d3-contour/src/array.js\");\n/* harmony import */ var _blur_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./blur.js */ \"./node_modules/d3-contour/src/blur.js\");\n/* harmony import */ var _constant_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./constant.js */ \"./node_modules/d3-contour/src/constant.js\");\n/* harmony import */ var _contours_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./contours.js */ \"./node_modules/d3-contour/src/contours.js\");\n\n\n\n\n\n\nfunction defaultX(d) {\n  return d[0];\n}\n\nfunction defaultY(d) {\n  return d[1];\n}\n\nfunction defaultWeight() {\n  return 1;\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  var x = defaultX,\n      y = defaultY,\n      weight = defaultWeight,\n      dx = 960,\n      dy = 500,\n      r = 20, // blur radius\n      k = 2, // log2(grid cell size)\n      o = r * 3, // grid offset, to pad for blur\n      n = (dx + o * 2) >> k, // grid width\n      m = (dy + o * 2) >> k, // grid height\n      threshold = Object(_constant_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(20);\n\n  function density(data) {\n    var values0 = new Float32Array(n * m),\n        values1 = new Float32Array(n * m),\n        pow2k = Math.pow(2, -k);\n\n    data.forEach(function(d, i, data) {\n      var xi = (x(d, i, data) + o) * pow2k,\n          yi = (y(d, i, data) + o) * pow2k,\n          wi = +weight(d, i, data);\n      if (xi >= 0 && xi < n && yi >= 0 && yi < m) {\n        var x0 = Math.floor(xi),\n            y0 = Math.floor(yi),\n            xt = xi - x0 - 0.5,\n            yt = yi - y0 - 0.5;\n        values0[x0 + y0 * n] += (1 - xt) * (1 - yt) * wi;\n        values0[x0 + 1 + y0 * n] += xt * (1 - yt) * wi;\n        values0[x0 + 1 + (y0 + 1) * n] += xt * yt * wi;\n        values0[x0 + (y0 + 1) * n] += (1 - xt) * yt * wi;\n      }\n    });\n\n    // TODO Optimize.\n    Object(_blur_js__WEBPACK_IMPORTED_MODULE_2__[\"blurX\"])({width: n, height: m, data: values0}, {width: n, height: m, data: values1}, r >> k);\n    Object(_blur_js__WEBPACK_IMPORTED_MODULE_2__[\"blurY\"])({width: n, height: m, data: values1}, {width: n, height: m, data: values0}, r >> k);\n    Object(_blur_js__WEBPACK_IMPORTED_MODULE_2__[\"blurX\"])({width: n, height: m, data: values0}, {width: n, height: m, data: values1}, r >> k);\n    Object(_blur_js__WEBPACK_IMPORTED_MODULE_2__[\"blurY\"])({width: n, height: m, data: values1}, {width: n, height: m, data: values0}, r >> k);\n    Object(_blur_js__WEBPACK_IMPORTED_MODULE_2__[\"blurX\"])({width: n, height: m, data: values0}, {width: n, height: m, data: values1}, r >> k);\n    Object(_blur_js__WEBPACK_IMPORTED_MODULE_2__[\"blurY\"])({width: n, height: m, data: values1}, {width: n, height: m, data: values0}, r >> k);\n\n    var tz = threshold(values0);\n\n    // Convert number of thresholds into uniform thresholds.\n    if (!Array.isArray(tz)) {\n      var stop = Object(d3_array__WEBPACK_IMPORTED_MODULE_0__[\"max\"])(values0);\n      tz = Object(d3_array__WEBPACK_IMPORTED_MODULE_0__[\"tickStep\"])(0, stop, tz);\n      tz = Object(d3_array__WEBPACK_IMPORTED_MODULE_0__[\"range\"])(0, Math.floor(stop / tz) * tz, tz);\n      tz.shift();\n    }\n\n    return Object(_contours_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"])()\n        .thresholds(tz)\n        .size([n, m])\n      (values0)\n        .map(transform);\n  }\n\n  function transform(geometry) {\n    geometry.value *= Math.pow(2, -2 * k); // Density in points per square pixel.\n    geometry.coordinates.forEach(transformPolygon);\n    return geometry;\n  }\n\n  function transformPolygon(coordinates) {\n    coordinates.forEach(transformRing);\n  }\n\n  function transformRing(coordinates) {\n    coordinates.forEach(transformPoint);\n  }\n\n  // TODO Optimize.\n  function transformPoint(coordinates) {\n    coordinates[0] = coordinates[0] * Math.pow(2, k) - o;\n    coordinates[1] = coordinates[1] * Math.pow(2, k) - o;\n  }\n\n  function resize() {\n    o = r * 3;\n    n = (dx + o * 2) >> k;\n    m = (dy + o * 2) >> k;\n    return density;\n  }\n\n  density.x = function(_) {\n    return arguments.length ? (x = typeof _ === \"function\" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(+_), density) : x;\n  };\n\n  density.y = function(_) {\n    return arguments.length ? (y = typeof _ === \"function\" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(+_), density) : y;\n  };\n\n  density.weight = function(_) {\n    return arguments.length ? (weight = typeof _ === \"function\" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(+_), density) : weight;\n  };\n\n  density.size = function(_) {\n    if (!arguments.length) return [dx, dy];\n    var _0 = +_[0], _1 = +_[1];\n    if (!(_0 >= 0 && _1 >= 0)) throw new Error(\"invalid size\");\n    return dx = _0, dy = _1, resize();\n  };\n\n  density.cellSize = function(_) {\n    if (!arguments.length) return 1 << k;\n    if (!((_ = +_) >= 1)) throw new Error(\"invalid cell size\");\n    return k = Math.floor(Math.log(_) / Math.LN2), resize();\n  };\n\n  density.thresholds = function(_) {\n    return arguments.length ? (threshold = typeof _ === \"function\" ? _ : Array.isArray(_) ? Object(_constant_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(_array_js__WEBPACK_IMPORTED_MODULE_1__[\"slice\"].call(_)) : Object(_constant_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(_), density) : threshold;\n  };\n\n  density.bandwidth = function(_) {\n    if (!arguments.length) return Math.sqrt(r * (r + 1));\n    if (!((_ = +_) >= 0)) throw new Error(\"invalid bandwidth\");\n    return r = Math.round((Math.sqrt(4 * _ * _ + 1) - 1) / 2), resize();\n  };\n\n  return density;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-contour/src/index.js\":\n/*!**********************************************!*\\\n  !*** ./node_modules/d3-contour/src/index.js ***!\n  \\**********************************************/\n/*! exports provided: contours, contourDensity */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _contours_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./contours.js */ \"./node_modules/d3-contour/src/contours.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"contours\", function() { return _contours_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n/* harmony import */ var _density_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./density.js */ \"./node_modules/d3-contour/src/density.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"contourDensity\", function() { return _density_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"]; });\n\n\n\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-contour/src/noop.js\":\n/*!*********************************************!*\\\n  !*** ./node_modules/d3-contour/src/noop.js ***!\n  \\*********************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-delaunay/src/delaunay.js\":\n/*!**************************************************!*\\\n  !*** ./node_modules/d3-delaunay/src/delaunay.js ***!\n  \\**************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return Delaunay; });\n/* harmony import */ var delaunator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! delaunator */ \"./node_modules/delaunator/index.js\");\n/* harmony import */ var _path_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./path.js */ \"./node_modules/d3-delaunay/src/path.js\");\n/* harmony import */ var _polygon_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./polygon.js */ \"./node_modules/d3-delaunay/src/polygon.js\");\n/* harmony import */ var _voronoi_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./voronoi.js */ \"./node_modules/d3-delaunay/src/voronoi.js\");\n\n\n\n\n\nconst tau = 2 * Math.PI, pow = Math.pow;\n\nfunction pointX(p) {\n  return p[0];\n}\n\nfunction pointY(p) {\n  return p[1];\n}\n\n// A triangulation is collinear if all its triangles have a non-null area\nfunction collinear(d) {\n  const {triangles, coords} = d;\n  for (let i = 0; i < triangles.length; i += 3) {\n    const a = 2 * triangles[i],\n          b = 2 * triangles[i + 1],\n          c = 2 * triangles[i + 2],\n          cross = (coords[c] - coords[a]) * (coords[b + 1] - coords[a + 1])\n                - (coords[b] - coords[a]) * (coords[c + 1] - coords[a + 1]);\n    if (cross > 1e-10) return false;\n  }\n  return true;\n}\n\nfunction jitter(x, y, r) {\n  return [x + Math.sin(x + y) * r, y + Math.cos(x - y) * r];\n}\n\nclass Delaunay {\n  static from(points, fx = pointX, fy = pointY, that) {\n    return new Delaunay(\"length\" in points\n        ? flatArray(points, fx, fy, that)\n        : Float64Array.from(flatIterable(points, fx, fy, that)));\n  }\n  constructor(points) {\n    this._delaunator = new delaunator__WEBPACK_IMPORTED_MODULE_0__[\"default\"](points);\n    this.inedges = new Int32Array(points.length / 2);\n    this._hullIndex = new Int32Array(points.length / 2);\n    this.points = this._delaunator.coords;\n    this._init();\n  }\n  update() {\n    this._delaunator.update();\n    this._init();\n    return this;\n  }\n  _init() {\n    const d = this._delaunator, points = this.points;\n\n    // check for collinear\n    if (d.hull && d.hull.length > 2 && collinear(d)) {\n      this.collinear = Int32Array.from({length: points.length/2}, (_,i) => i)\n        .sort((i, j) => points[2 * i] - points[2 * j] || points[2 * i + 1] - points[2 * j + 1]); // for exact neighbors\n      const e = this.collinear[0], f = this.collinear[this.collinear.length - 1],\n        bounds = [ points[2 * e], points[2 * e + 1], points[2 * f], points[2 * f + 1] ],\n        r = 1e-8 * Math.hypot(bounds[3] - bounds[1], bounds[2] - bounds[0]);\n      for (let i = 0, n = points.length / 2; i < n; ++i) {\n        const p = jitter(points[2 * i], points[2 * i + 1], r);\n        points[2 * i] = p[0];\n        points[2 * i + 1] = p[1];\n      }\n      this._delaunator = new delaunator__WEBPACK_IMPORTED_MODULE_0__[\"default\"](points);\n    } else {\n      delete this.collinear;\n    }\n\n    const halfedges = this.halfedges = this._delaunator.halfedges;\n    const hull = this.hull = this._delaunator.hull;\n    const triangles = this.triangles = this._delaunator.triangles;\n    const inedges = this.inedges.fill(-1);\n    const hullIndex = this._hullIndex.fill(-1);\n\n    // Compute an index from each point to an (arbitrary) incoming halfedge\n    // Used to give the first neighbor of each point; for this reason,\n    // on the hull we give priority to exterior halfedges\n    for (let e = 0, n = halfedges.length; e < n; ++e) {\n      const p = triangles[e % 3 === 2 ? e - 2 : e + 1];\n      if (halfedges[e] === -1 || inedges[p] === -1) inedges[p] = e;\n    }\n    for (let i = 0, n = hull.length; i < n; ++i) {\n      hullIndex[hull[i]] = i;\n    }\n\n    // degenerate case: 1 or 2 (distinct) points\n    if (hull.length <= 2 && hull.length > 0) {\n      this.triangles = new Int32Array(3).fill(-1);\n      this.halfedges = new Int32Array(3).fill(-1);\n      this.triangles[0] = hull[0];\n      inedges[hull[0]] = 1;\n      if (hull.length === 2) {\n        inedges[hull[1]] = 0;\n        this.triangles[1] = hull[1];\n        this.triangles[2] = hull[1];\n      }\n    }\n  }\n  voronoi(bounds) {\n    return new _voronoi_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"](this, bounds);\n  }\n  *neighbors(i) {\n    const {inedges, hull, _hullIndex, halfedges, triangles, collinear} = this;\n\n    // degenerate case with several collinear points\n    if (collinear) {\n      const l = collinear.indexOf(i);\n      if (l > 0) yield collinear[l - 1];\n      if (l < collinear.length - 1) yield collinear[l + 1];\n      return;\n    }\n\n    const e0 = inedges[i];\n    if (e0 === -1) return; // coincident point\n    let e = e0, p0 = -1;\n    do {\n      yield p0 = triangles[e];\n      e = e % 3 === 2 ? e - 2 : e + 1;\n      if (triangles[e] !== i) return; // bad triangulation\n      e = halfedges[e];\n      if (e === -1) {\n        const p = hull[(_hullIndex[i] + 1) % hull.length];\n        if (p !== p0) yield p;\n        return;\n      }\n    } while (e !== e0);\n  }\n  find(x, y, i = 0) {\n    if ((x = +x, x !== x) || (y = +y, y !== y)) return -1;\n    const i0 = i;\n    let c;\n    while ((c = this._step(i, x, y)) >= 0 && c !== i && c !== i0) i = c;\n    return c;\n  }\n  _step(i, x, y) {\n    const {inedges, hull, _hullIndex, halfedges, triangles, points} = this;\n    if (inedges[i] === -1 || !points.length) return (i + 1) % (points.length >> 1);\n    let c = i;\n    let dc = pow(x - points[i * 2], 2) + pow(y - points[i * 2 + 1], 2);\n    const e0 = inedges[i];\n    let e = e0;\n    do {\n      let t = triangles[e];\n      const dt = pow(x - points[t * 2], 2) + pow(y - points[t * 2 + 1], 2);\n      if (dt < dc) dc = dt, c = t;\n      e = e % 3 === 2 ? e - 2 : e + 1;\n      if (triangles[e] !== i) break; // bad triangulation\n      e = halfedges[e];\n      if (e === -1) {\n        e = hull[(_hullIndex[i] + 1) % hull.length];\n        if (e !== t) {\n          if (pow(x - points[e * 2], 2) + pow(y - points[e * 2 + 1], 2) < dc) return e;\n        }\n        break;\n      }\n    } while (e !== e0);\n    return c;\n  }\n  render(context) {\n    const buffer = context == null ? context = new _path_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"] : undefined;\n    const {points, halfedges, triangles} = this;\n    for (let i = 0, n = halfedges.length; i < n; ++i) {\n      const j = halfedges[i];\n      if (j < i) continue;\n      const ti = triangles[i] * 2;\n      const tj = triangles[j] * 2;\n      context.moveTo(points[ti], points[ti + 1]);\n      context.lineTo(points[tj], points[tj + 1]);\n    }\n    this.renderHull(context);\n    return buffer && buffer.value();\n  }\n  renderPoints(context, r) {\n    if (r === undefined && (!context || typeof context.moveTo !== \"function\")) r = context, context = null;\n    r = r == undefined ? 2 : +r;\n    const buffer = context == null ? context = new _path_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"] : undefined;\n    const {points} = this;\n    for (let i = 0, n = points.length; i < n; i += 2) {\n      const x = points[i], y = points[i + 1];\n      context.moveTo(x + r, y);\n      context.arc(x, y, r, 0, tau);\n    }\n    return buffer && buffer.value();\n  }\n  renderHull(context) {\n    const buffer = context == null ? context = new _path_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"] : undefined;\n    const {hull, points} = this;\n    const h = hull[0] * 2, n = hull.length;\n    context.moveTo(points[h], points[h + 1]);\n    for (let i = 1; i < n; ++i) {\n      const h = 2 * hull[i];\n      context.lineTo(points[h], points[h + 1]);\n    }\n    context.closePath();\n    return buffer && buffer.value();\n  }\n  hullPolygon() {\n    const polygon = new _polygon_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"];\n    this.renderHull(polygon);\n    return polygon.value();\n  }\n  renderTriangle(i, context) {\n    const buffer = context == null ? context = new _path_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"] : undefined;\n    const {points, triangles} = this;\n    const t0 = triangles[i *= 3] * 2;\n    const t1 = triangles[i + 1] * 2;\n    const t2 = triangles[i + 2] * 2;\n    context.moveTo(points[t0], points[t0 + 1]);\n    context.lineTo(points[t1], points[t1 + 1]);\n    context.lineTo(points[t2], points[t2 + 1]);\n    context.closePath();\n    return buffer && buffer.value();\n  }\n  *trianglePolygons() {\n    const {triangles} = this;\n    for (let i = 0, n = triangles.length / 3; i < n; ++i) {\n      yield this.trianglePolygon(i);\n    }\n  }\n  trianglePolygon(i) {\n    const polygon = new _polygon_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"];\n    this.renderTriangle(i, polygon);\n    return polygon.value();\n  }\n}\n\nfunction flatArray(points, fx, fy, that) {\n  const n = points.length;\n  const array = new Float64Array(n * 2);\n  for (let i = 0; i < n; ++i) {\n    const p = points[i];\n    array[i * 2] = fx.call(that, p, i, points);\n    array[i * 2 + 1] = fy.call(that, p, i, points);\n  }\n  return array;\n}\n\nfunction* flatIterable(points, fx, fy, that) {\n  let i = 0;\n  for (const p of points) {\n    yield fx.call(that, p, i, points);\n    yield fy.call(that, p, i, points);\n    ++i;\n  }\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-delaunay/src/index.js\":\n/*!***********************************************!*\\\n  !*** ./node_modules/d3-delaunay/src/index.js ***!\n  \\***********************************************/\n/*! exports provided: Delaunay, Voronoi */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _delaunay_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./delaunay.js */ \"./node_modules/d3-delaunay/src/delaunay.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"Delaunay\", function() { return _delaunay_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n/* harmony import */ var _voronoi_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./voronoi.js */ \"./node_modules/d3-delaunay/src/voronoi.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"Voronoi\", function() { return _voronoi_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"]; });\n\n\n\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-delaunay/src/path.js\":\n/*!**********************************************!*\\\n  !*** ./node_modules/d3-delaunay/src/path.js ***!\n  \\**********************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return Path; });\nconst epsilon = 1e-6;\n\nclass Path {\n  constructor() {\n    this._x0 = this._y0 = // start of current subpath\n    this._x1 = this._y1 = null; // end of current subpath\n    this._ = \"\";\n  }\n  moveTo(x, y) {\n    this._ += `M${this._x0 = this._x1 = +x},${this._y0 = this._y1 = +y}`;\n  }\n  closePath() {\n    if (this._x1 !== null) {\n      this._x1 = this._x0, this._y1 = this._y0;\n      this._ += \"Z\";\n    }\n  }\n  lineTo(x, y) {\n    this._ += `L${this._x1 = +x},${this._y1 = +y}`;\n  }\n  arc(x, y, r) {\n    x = +x, y = +y, r = +r;\n    const x0 = x + r;\n    const y0 = y;\n    if (r < 0) throw new Error(\"negative radius\");\n    if (this._x1 === null) this._ += `M${x0},${y0}`;\n    else if (Math.abs(this._x1 - x0) > epsilon || Math.abs(this._y1 - y0) > epsilon) this._ += \"L\" + x0 + \",\" + y0;\n    if (!r) return;\n    this._ += `A${r},${r},0,1,1,${x - r},${y}A${r},${r},0,1,1,${this._x1 = x0},${this._y1 = y0}`;\n  }\n  rect(x, y, w, h) {\n    this._ += `M${this._x0 = this._x1 = +x},${this._y0 = this._y1 = +y}h${+w}v${+h}h${-w}Z`;\n  }\n  value() {\n    return this._ || null;\n  }\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-delaunay/src/polygon.js\":\n/*!*************************************************!*\\\n  !*** ./node_modules/d3-delaunay/src/polygon.js ***!\n  \\*************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return Polygon; });\nclass Polygon {\n  constructor() {\n    this._ = [];\n  }\n  moveTo(x, y) {\n    this._.push([x, y]);\n  }\n  closePath() {\n    this._.push(this._[0].slice());\n  }\n  lineTo(x, y) {\n    this._.push([x, y]);\n  }\n  value() {\n    return this._.length ? this._ : null;\n  }\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-delaunay/src/voronoi.js\":\n/*!*************************************************!*\\\n  !*** ./node_modules/d3-delaunay/src/voronoi.js ***!\n  \\*************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return Voronoi; });\n/* harmony import */ var _path_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./path.js */ \"./node_modules/d3-delaunay/src/path.js\");\n/* harmony import */ var _polygon_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./polygon.js */ \"./node_modules/d3-delaunay/src/polygon.js\");\n\n\n\nclass Voronoi {\n  constructor(delaunay, [xmin, ymin, xmax, ymax] = [0, 0, 960, 500]) {\n    if (!((xmax = +xmax) >= (xmin = +xmin)) || !((ymax = +ymax) >= (ymin = +ymin))) throw new Error(\"invalid bounds\");\n    this.delaunay = delaunay;\n    this._circumcenters = new Float64Array(delaunay.points.length * 2);\n    this.vectors = new Float64Array(delaunay.points.length * 2);\n    this.xmax = xmax, this.xmin = xmin;\n    this.ymax = ymax, this.ymin = ymin;\n    this._init();\n  }\n  update() {\n    this.delaunay.update();\n    this._init();\n    return this;\n  }\n  _init() {\n    const {delaunay: {points, hull, triangles}, vectors} = this;\n\n    // Compute circumcenters.\n    const circumcenters = this.circumcenters = this._circumcenters.subarray(0, triangles.length / 3 * 2);\n    for (let i = 0, j = 0, n = triangles.length, x, y; i < n; i += 3, j += 2) {\n      const t1 = triangles[i] * 2;\n      const t2 = triangles[i + 1] * 2;\n      const t3 = triangles[i + 2] * 2;\n      const x1 = points[t1];\n      const y1 = points[t1 + 1];\n      const x2 = points[t2];\n      const y2 = points[t2 + 1];\n      const x3 = points[t3];\n      const y3 = points[t3 + 1];\n\n      const dx = x2 - x1;\n      const dy = y2 - y1;\n      const ex = x3 - x1;\n      const ey = y3 - y1;\n      const ab = (dx * ey - dy * ex) * 2;\n\n      if (Math.abs(ab) < 1e-9) {\n        // degenerate case (collinear diagram)\n        // almost equal points (degenerate triangle)\n        // the circumcenter is at the infinity, in a\n        // direction that is:\n        // 1. orthogonal to the halfedge.\n        let a = 1e9;\n        // 2. points away from the center; since the list of triangles starts\n        // in the center, the first point of the first triangle\n        // will be our reference\n        const r = triangles[0] * 2;\n        a *= Math.sign((points[r] - x1) * ey - (points[r + 1] - y1) * ex);\n        x = (x1 + x3) / 2 - a * ey;\n        y = (y1 + y3) / 2 + a * ex;\n      } else {\n        const d = 1 / ab;\n        const bl = dx * dx + dy * dy;\n        const cl = ex * ex + ey * ey;\n        x = x1 + (ey * bl - dy * cl) * d;\n        y = y1 + (dx * cl - ex * bl) * d;\n      }\n      circumcenters[j] = x;\n      circumcenters[j + 1] = y;\n    }\n\n    // Compute exterior cell rays.\n    let h = hull[hull.length - 1];\n    let p0, p1 = h * 4;\n    let x0, x1 = points[2 * h];\n    let y0, y1 = points[2 * h + 1];\n    vectors.fill(0);\n    for (let i = 0; i < hull.length; ++i) {\n      h = hull[i];\n      p0 = p1, x0 = x1, y0 = y1;\n      p1 = h * 4, x1 = points[2 * h], y1 = points[2 * h + 1];\n      vectors[p0 + 2] = vectors[p1] = y0 - y1;\n      vectors[p0 + 3] = vectors[p1 + 1] = x1 - x0;\n    }\n  }\n  render(context) {\n    const buffer = context == null ? context = new _path_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"] : undefined;\n    const {delaunay: {halfedges, inedges, hull}, circumcenters, vectors} = this;\n    if (hull.length <= 1) return null;\n    for (let i = 0, n = halfedges.length; i < n; ++i) {\n      const j = halfedges[i];\n      if (j < i) continue;\n      const ti = Math.floor(i / 3) * 2;\n      const tj = Math.floor(j / 3) * 2;\n      const xi = circumcenters[ti];\n      const yi = circumcenters[ti + 1];\n      const xj = circumcenters[tj];\n      const yj = circumcenters[tj + 1];\n      this._renderSegment(xi, yi, xj, yj, context);\n    }\n    let h0, h1 = hull[hull.length - 1];\n    for (let i = 0; i < hull.length; ++i) {\n      h0 = h1, h1 = hull[i];\n      const t = Math.floor(inedges[h1] / 3) * 2;\n      const x = circumcenters[t];\n      const y = circumcenters[t + 1];\n      const v = h0 * 4;\n      const p = this._project(x, y, vectors[v + 2], vectors[v + 3]);\n      if (p) this._renderSegment(x, y, p[0], p[1], context);\n    }\n    return buffer && buffer.value();\n  }\n  renderBounds(context) {\n    const buffer = context == null ? context = new _path_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"] : undefined;\n    context.rect(this.xmin, this.ymin, this.xmax - this.xmin, this.ymax - this.ymin);\n    return buffer && buffer.value();\n  }\n  renderCell(i, context) {\n    const buffer = context == null ? context = new _path_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"] : undefined;\n    const points = this._clip(i);\n    if (points === null || !points.length) return;\n    context.moveTo(points[0], points[1]);\n    let n = points.length;\n    while (points[0] === points[n-2] && points[1] === points[n-1] && n > 1) n -= 2;\n    for (let i = 2; i < n; i += 2) {\n      if (points[i] !== points[i-2] || points[i+1] !== points[i-1])\n        context.lineTo(points[i], points[i + 1]);\n    }\n    context.closePath();\n    return buffer && buffer.value();\n  }\n  *cellPolygons() {\n    const {delaunay: {points}} = this;\n    for (let i = 0, n = points.length / 2; i < n; ++i) {\n      const cell = this.cellPolygon(i);\n      if (cell) cell.index = i, yield cell;\n    }\n  }\n  cellPolygon(i) {\n    const polygon = new _polygon_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"];\n    this.renderCell(i, polygon);\n    return polygon.value();\n  }\n  _renderSegment(x0, y0, x1, y1, context) {\n    let S;\n    const c0 = this._regioncode(x0, y0);\n    const c1 = this._regioncode(x1, y1);\n    if (c0 === 0 && c1 === 0) {\n      context.moveTo(x0, y0);\n      context.lineTo(x1, y1);\n    } else if (S = this._clipSegment(x0, y0, x1, y1, c0, c1)) {\n      context.moveTo(S[0], S[1]);\n      context.lineTo(S[2], S[3]);\n    }\n  }\n  contains(i, x, y) {\n    if ((x = +x, x !== x) || (y = +y, y !== y)) return false;\n    return this.delaunay._step(i, x, y) === i;\n  }\n  *neighbors(i) {\n    const ci = this._clip(i);\n    if (ci) for (const j of this.delaunay.neighbors(i)) {\n      const cj = this._clip(j);\n      // find the common edge\n      if (cj) loop: for (let ai = 0, li = ci.length; ai < li; ai += 2) {\n        for (let aj = 0, lj = cj.length; aj < lj; aj += 2) {\n          if (ci[ai] == cj[aj]\n          && ci[ai + 1] == cj[aj + 1]\n          && ci[(ai + 2) % li] == cj[(aj + lj - 2) % lj]\n          && ci[(ai + 3) % li] == cj[(aj + lj - 1) % lj]\n          ) {\n            yield j;\n            break loop;\n          }\n        }\n      }\n    }\n  }\n  _cell(i) {\n    const {circumcenters, delaunay: {inedges, halfedges, triangles}} = this;\n    const e0 = inedges[i];\n    if (e0 === -1) return null; // coincident point\n    const points = [];\n    let e = e0;\n    do {\n      const t = Math.floor(e / 3);\n      points.push(circumcenters[t * 2], circumcenters[t * 2 + 1]);\n      e = e % 3 === 2 ? e - 2 : e + 1;\n      if (triangles[e] !== i) break; // bad triangulation\n      e = halfedges[e];\n    } while (e !== e0 && e !== -1);\n    return points;\n  }\n  _clip(i) {\n    // degenerate case (1 valid point: return the box)\n    if (i === 0 && this.delaunay.hull.length === 1) {\n      return [this.xmax, this.ymin, this.xmax, this.ymax, this.xmin, this.ymax, this.xmin, this.ymin];\n    }\n    const points = this._cell(i);\n    if (points === null) return null;\n    const {vectors: V} = this;\n    const v = i * 4;\n    return V[v] || V[v + 1]\n        ? this._clipInfinite(i, points, V[v], V[v + 1], V[v + 2], V[v + 3])\n        : this._clipFinite(i, points);\n  }\n  _clipFinite(i, points) {\n    const n = points.length;\n    let P = null;\n    let x0, y0, x1 = points[n - 2], y1 = points[n - 1];\n    let c0, c1 = this._regioncode(x1, y1);\n    let e0, e1 = 0;\n    for (let j = 0; j < n; j += 2) {\n      x0 = x1, y0 = y1, x1 = points[j], y1 = points[j + 1];\n      c0 = c1, c1 = this._regioncode(x1, y1);\n      if (c0 === 0 && c1 === 0) {\n        e0 = e1, e1 = 0;\n        if (P) P.push(x1, y1);\n        else P = [x1, y1];\n      } else {\n        let S, sx0, sy0, sx1, sy1;\n        if (c0 === 0) {\n          if ((S = this._clipSegment(x0, y0, x1, y1, c0, c1)) === null) continue;\n          [sx0, sy0, sx1, sy1] = S;\n        } else {\n          if ((S = this._clipSegment(x1, y1, x0, y0, c1, c0)) === null) continue;\n          [sx1, sy1, sx0, sy0] = S;\n          e0 = e1, e1 = this._edgecode(sx0, sy0);\n          if (e0 && e1) this._edge(i, e0, e1, P, P.length);\n          if (P) P.push(sx0, sy0);\n          else P = [sx0, sy0];\n        }\n        e0 = e1, e1 = this._edgecode(sx1, sy1);\n        if (e0 && e1) this._edge(i, e0, e1, P, P.length);\n        if (P) P.push(sx1, sy1);\n        else P = [sx1, sy1];\n      }\n    }\n    if (P) {\n      e0 = e1, e1 = this._edgecode(P[0], P[1]);\n      if (e0 && e1) this._edge(i, e0, e1, P, P.length);\n    } else if (this.contains(i, (this.xmin + this.xmax) / 2, (this.ymin + this.ymax) / 2)) {\n      return [this.xmax, this.ymin, this.xmax, this.ymax, this.xmin, this.ymax, this.xmin, this.ymin];\n    }\n    return P;\n  }\n  _clipSegment(x0, y0, x1, y1, c0, c1) {\n    while (true) {\n      if (c0 === 0 && c1 === 0) return [x0, y0, x1, y1];\n      if (c0 & c1) return null;\n      let x, y, c = c0 || c1;\n      if (c & 0b1000) x = x0 + (x1 - x0) * (this.ymax - y0) / (y1 - y0), y = this.ymax;\n      else if (c & 0b0100) x = x0 + (x1 - x0) * (this.ymin - y0) / (y1 - y0), y = this.ymin;\n      else if (c & 0b0010) y = y0 + (y1 - y0) * (this.xmax - x0) / (x1 - x0), x = this.xmax;\n      else y = y0 + (y1 - y0) * (this.xmin - x0) / (x1 - x0), x = this.xmin;\n      if (c0) x0 = x, y0 = y, c0 = this._regioncode(x0, y0);\n      else x1 = x, y1 = y, c1 = this._regioncode(x1, y1);\n    }\n  }\n  _clipInfinite(i, points, vx0, vy0, vxn, vyn) {\n    let P = Array.from(points), p;\n    if (p = this._project(P[0], P[1], vx0, vy0)) P.unshift(p[0], p[1]);\n    if (p = this._project(P[P.length - 2], P[P.length - 1], vxn, vyn)) P.push(p[0], p[1]);\n    if (P = this._clipFinite(i, P)) {\n      for (let j = 0, n = P.length, c0, c1 = this._edgecode(P[n - 2], P[n - 1]); j < n; j += 2) {\n        c0 = c1, c1 = this._edgecode(P[j], P[j + 1]);\n        if (c0 && c1) j = this._edge(i, c0, c1, P, j), n = P.length;\n      }\n    } else if (this.contains(i, (this.xmin + this.xmax) / 2, (this.ymin + this.ymax) / 2)) {\n      P = [this.xmin, this.ymin, this.xmax, this.ymin, this.xmax, this.ymax, this.xmin, this.ymax];\n    }\n    return P;\n  }\n  _edge(i, e0, e1, P, j) {\n    while (e0 !== e1) {\n      let x, y;\n      switch (e0) {\n        case 0b0101: e0 = 0b0100; continue; // top-left\n        case 0b0100: e0 = 0b0110, x = this.xmax, y = this.ymin; break; // top\n        case 0b0110: e0 = 0b0010; continue; // top-right\n        case 0b0010: e0 = 0b1010, x = this.xmax, y = this.ymax; break; // right\n        case 0b1010: e0 = 0b1000; continue; // bottom-right\n        case 0b1000: e0 = 0b1001, x = this.xmin, y = this.ymax; break; // bottom\n        case 0b1001: e0 = 0b0001; continue; // bottom-left\n        case 0b0001: e0 = 0b0101, x = this.xmin, y = this.ymin; break; // left\n      }\n      // Note: this implicitly checks for out of bounds: if P[j] or P[j+1] are\n      // undefined, the conditional statement will be executed.\n      if ((P[j] !== x || P[j + 1] !== y) && this.contains(i, x, y)) {\n        P.splice(j, 0, x, y), j += 2;\n      }\n    }\n    if (P.length > 4) {\n      for (let i = 0; i < P.length; i+= 2) {\n        const j = (i + 2) % P.length, k = (i + 4) % P.length;\n        if (P[i] === P[j] && P[j] === P[k]\n        || P[i + 1] === P[j + 1] && P[j + 1] === P[k + 1])\n          P.splice(j, 2), i -= 2;\n      }\n    }\n    return j;\n  }\n  _project(x0, y0, vx, vy) {\n    let t = Infinity, c, x, y;\n    if (vy < 0) { // top\n      if (y0 <= this.ymin) return null;\n      if ((c = (this.ymin - y0) / vy) < t) y = this.ymin, x = x0 + (t = c) * vx;\n    } else if (vy > 0) { // bottom\n      if (y0 >= this.ymax) return null;\n      if ((c = (this.ymax - y0) / vy) < t) y = this.ymax, x = x0 + (t = c) * vx;\n    }\n    if (vx > 0) { // right\n      if (x0 >= this.xmax) return null;\n      if ((c = (this.xmax - x0) / vx) < t) x = this.xmax, y = y0 + (t = c) * vy;\n    } else if (vx < 0) { // left\n      if (x0 <= this.xmin) return null;\n      if ((c = (this.xmin - x0) / vx) < t) x = this.xmin, y = y0 + (t = c) * vy;\n    }\n    return [x, y];\n  }\n  _edgecode(x, y) {\n    return (x === this.xmin ? 0b0001\n        : x === this.xmax ? 0b0010 : 0b0000)\n        | (y === this.ymin ? 0b0100\n        : y === this.ymax ? 0b1000 : 0b0000);\n  }\n  _regioncode(x, y) {\n    return (x < this.xmin ? 0b0001\n        : x > this.xmax ? 0b0010 : 0b0000)\n        | (y < this.ymin ? 0b0100\n        : y > this.ymax ? 0b1000 : 0b0000);\n  }\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-dispatch/src/dispatch.js\":\n/*!**************************************************!*\\\n  !*** ./node_modules/d3-dispatch/src/dispatch.js ***!\n  \\**************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\nvar noop = {value: function() {}};\n\nfunction dispatch() {\n  for (var i = 0, n = arguments.length, _ = {}, t; i < n; ++i) {\n    if (!(t = arguments[i] + \"\") || (t in _) || /[\\s.]/.test(t)) throw new Error(\"illegal type: \" + t);\n    _[t] = [];\n  }\n  return new Dispatch(_);\n}\n\nfunction Dispatch(_) {\n  this._ = _;\n}\n\nfunction parseTypenames(typenames, types) {\n  return typenames.trim().split(/^|\\s+/).map(function(t) {\n    var name = \"\", i = t.indexOf(\".\");\n    if (i >= 0) name = t.slice(i + 1), t = t.slice(0, i);\n    if (t && !types.hasOwnProperty(t)) throw new Error(\"unknown type: \" + t);\n    return {type: t, name: name};\n  });\n}\n\nDispatch.prototype = dispatch.prototype = {\n  constructor: Dispatch,\n  on: function(typename, callback) {\n    var _ = this._,\n        T = parseTypenames(typename + \"\", _),\n        t,\n        i = -1,\n        n = T.length;\n\n    // If no callback was specified, return the callback of the given type and name.\n    if (arguments.length < 2) {\n      while (++i < n) if ((t = (typename = T[i]).type) && (t = get(_[t], typename.name))) return t;\n      return;\n    }\n\n    // If a type was specified, set the callback for the given type and name.\n    // Otherwise, if a null callback was specified, remove callbacks of the given name.\n    if (callback != null && typeof callback !== \"function\") throw new Error(\"invalid callback: \" + callback);\n    while (++i < n) {\n      if (t = (typename = T[i]).type) _[t] = set(_[t], typename.name, callback);\n      else if (callback == null) for (t in _) _[t] = set(_[t], typename.name, null);\n    }\n\n    return this;\n  },\n  copy: function() {\n    var copy = {}, _ = this._;\n    for (var t in _) copy[t] = _[t].slice();\n    return new Dispatch(copy);\n  },\n  call: function(type, that) {\n    if ((n = arguments.length - 2) > 0) for (var args = new Array(n), i = 0, n, t; i < n; ++i) args[i] = arguments[i + 2];\n    if (!this._.hasOwnProperty(type)) throw new Error(\"unknown type: \" + type);\n    for (t = this._[type], i = 0, n = t.length; i < n; ++i) t[i].value.apply(that, args);\n  },\n  apply: function(type, that, args) {\n    if (!this._.hasOwnProperty(type)) throw new Error(\"unknown type: \" + type);\n    for (var t = this._[type], i = 0, n = t.length; i < n; ++i) t[i].value.apply(that, args);\n  }\n};\n\nfunction get(type, name) {\n  for (var i = 0, n = type.length, c; i < n; ++i) {\n    if ((c = type[i]).name === name) {\n      return c.value;\n    }\n  }\n}\n\nfunction set(type, name, callback) {\n  for (var i = 0, n = type.length; i < n; ++i) {\n    if (type[i].name === name) {\n      type[i] = noop, type = type.slice(0, i).concat(type.slice(i + 1));\n      break;\n    }\n  }\n  if (callback != null) type.push({name: name, value: callback});\n  return type;\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (dispatch);\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-dispatch/src/index.js\":\n/*!***********************************************!*\\\n  !*** ./node_modules/d3-dispatch/src/index.js ***!\n  \\***********************************************/\n/*! exports provided: dispatch */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _dispatch_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./dispatch.js */ \"./node_modules/d3-dispatch/src/dispatch.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"dispatch\", function() { return _dispatch_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-drag/src/constant.js\":\n/*!**********************************************!*\\\n  !*** ./node_modules/d3-drag/src/constant.js ***!\n  \\**********************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(x) {\n  return function() {\n    return x;\n  };\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-drag/src/drag.js\":\n/*!******************************************!*\\\n  !*** ./node_modules/d3-drag/src/drag.js ***!\n  \\******************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var d3_dispatch__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-dispatch */ \"./node_modules/d3-dispatch/src/index.js\");\n/* harmony import */ var d3_selection__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! d3-selection */ \"./node_modules/d3-selection/src/index.js\");\n/* harmony import */ var _nodrag_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./nodrag.js */ \"./node_modules/d3-drag/src/nodrag.js\");\n/* harmony import */ var _noevent_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./noevent.js */ \"./node_modules/d3-drag/src/noevent.js\");\n/* harmony import */ var _constant_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./constant.js */ \"./node_modules/d3-drag/src/constant.js\");\n/* harmony import */ var _event_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./event.js */ \"./node_modules/d3-drag/src/event.js\");\n\n\n\n\n\n\n\n// Ignore right-click, since that should open the context menu.\nfunction defaultFilter() {\n  return !d3_selection__WEBPACK_IMPORTED_MODULE_1__[\"event\"].ctrlKey && !d3_selection__WEBPACK_IMPORTED_MODULE_1__[\"event\"].button;\n}\n\nfunction defaultContainer() {\n  return this.parentNode;\n}\n\nfunction defaultSubject(d) {\n  return d == null ? {x: d3_selection__WEBPACK_IMPORTED_MODULE_1__[\"event\"].x, y: d3_selection__WEBPACK_IMPORTED_MODULE_1__[\"event\"].y} : d;\n}\n\nfunction defaultTouchable() {\n  return navigator.maxTouchPoints || (\"ontouchstart\" in this);\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  var filter = defaultFilter,\n      container = defaultContainer,\n      subject = defaultSubject,\n      touchable = defaultTouchable,\n      gestures = {},\n      listeners = Object(d3_dispatch__WEBPACK_IMPORTED_MODULE_0__[\"dispatch\"])(\"start\", \"drag\", \"end\"),\n      active = 0,\n      mousedownx,\n      mousedowny,\n      mousemoving,\n      touchending,\n      clickDistance2 = 0;\n\n  function drag(selection) {\n    selection\n        .on(\"mousedown.drag\", mousedowned)\n      .filter(touchable)\n        .on(\"touchstart.drag\", touchstarted)\n        .on(\"touchmove.drag\", touchmoved)\n        .on(\"touchend.drag touchcancel.drag\", touchended)\n        .style(\"touch-action\", \"none\")\n        .style(\"-webkit-tap-highlight-color\", \"rgba(0,0,0,0)\");\n  }\n\n  function mousedowned() {\n    if (touchending || !filter.apply(this, arguments)) return;\n    var gesture = beforestart(\"mouse\", container.apply(this, arguments), d3_selection__WEBPACK_IMPORTED_MODULE_1__[\"mouse\"], this, arguments);\n    if (!gesture) return;\n    Object(d3_selection__WEBPACK_IMPORTED_MODULE_1__[\"select\"])(d3_selection__WEBPACK_IMPORTED_MODULE_1__[\"event\"].view).on(\"mousemove.drag\", mousemoved, true).on(\"mouseup.drag\", mouseupped, true);\n    Object(_nodrag_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(d3_selection__WEBPACK_IMPORTED_MODULE_1__[\"event\"].view);\n    Object(_noevent_js__WEBPACK_IMPORTED_MODULE_3__[\"nopropagation\"])();\n    mousemoving = false;\n    mousedownx = d3_selection__WEBPACK_IMPORTED_MODULE_1__[\"event\"].clientX;\n    mousedowny = d3_selection__WEBPACK_IMPORTED_MODULE_1__[\"event\"].clientY;\n    gesture(\"start\");\n  }\n\n  function mousemoved() {\n    Object(_noevent_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"])();\n    if (!mousemoving) {\n      var dx = d3_selection__WEBPACK_IMPORTED_MODULE_1__[\"event\"].clientX - mousedownx, dy = d3_selection__WEBPACK_IMPORTED_MODULE_1__[\"event\"].clientY - mousedowny;\n      mousemoving = dx * dx + dy * dy > clickDistance2;\n    }\n    gestures.mouse(\"drag\");\n  }\n\n  function mouseupped() {\n    Object(d3_selection__WEBPACK_IMPORTED_MODULE_1__[\"select\"])(d3_selection__WEBPACK_IMPORTED_MODULE_1__[\"event\"].view).on(\"mousemove.drag mouseup.drag\", null);\n    Object(_nodrag_js__WEBPACK_IMPORTED_MODULE_2__[\"yesdrag\"])(d3_selection__WEBPACK_IMPORTED_MODULE_1__[\"event\"].view, mousemoving);\n    Object(_noevent_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"])();\n    gestures.mouse(\"end\");\n  }\n\n  function touchstarted() {\n    if (!filter.apply(this, arguments)) return;\n    var touches = d3_selection__WEBPACK_IMPORTED_MODULE_1__[\"event\"].changedTouches,\n        c = container.apply(this, arguments),\n        n = touches.length, i, gesture;\n\n    for (i = 0; i < n; ++i) {\n      if (gesture = beforestart(touches[i].identifier, c, d3_selection__WEBPACK_IMPORTED_MODULE_1__[\"touch\"], this, arguments)) {\n        Object(_noevent_js__WEBPACK_IMPORTED_MODULE_3__[\"nopropagation\"])();\n        gesture(\"start\");\n      }\n    }\n  }\n\n  function touchmoved() {\n    var touches = d3_selection__WEBPACK_IMPORTED_MODULE_1__[\"event\"].changedTouches,\n        n = touches.length, i, gesture;\n\n    for (i = 0; i < n; ++i) {\n      if (gesture = gestures[touches[i].identifier]) {\n        Object(_noevent_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"])();\n        gesture(\"drag\");\n      }\n    }\n  }\n\n  function touchended() {\n    var touches = d3_selection__WEBPACK_IMPORTED_MODULE_1__[\"event\"].changedTouches,\n        n = touches.length, i, gesture;\n\n    if (touchending) clearTimeout(touchending);\n    touchending = setTimeout(function() { touchending = null; }, 500); // Ghost clicks are delayed!\n    for (i = 0; i < n; ++i) {\n      if (gesture = gestures[touches[i].identifier]) {\n        Object(_noevent_js__WEBPACK_IMPORTED_MODULE_3__[\"nopropagation\"])();\n        gesture(\"end\");\n      }\n    }\n  }\n\n  function beforestart(id, container, point, that, args) {\n    var p = point(container, id), s, dx, dy,\n        sublisteners = listeners.copy();\n\n    if (!Object(d3_selection__WEBPACK_IMPORTED_MODULE_1__[\"customEvent\"])(new _event_js__WEBPACK_IMPORTED_MODULE_5__[\"default\"](drag, \"beforestart\", s, id, active, p[0], p[1], 0, 0, sublisteners), function() {\n      if ((d3_selection__WEBPACK_IMPORTED_MODULE_1__[\"event\"].subject = s = subject.apply(that, args)) == null) return false;\n      dx = s.x - p[0] || 0;\n      dy = s.y - p[1] || 0;\n      return true;\n    })) return;\n\n    return function gesture(type) {\n      var p0 = p, n;\n      switch (type) {\n        case \"start\": gestures[id] = gesture, n = active++; break;\n        case \"end\": delete gestures[id], --active; // nobreak\n        case \"drag\": p = point(container, id), n = active; break;\n      }\n      Object(d3_selection__WEBPACK_IMPORTED_MODULE_1__[\"customEvent\"])(new _event_js__WEBPACK_IMPORTED_MODULE_5__[\"default\"](drag, type, s, id, n, p[0] + dx, p[1] + dy, p[0] - p0[0], p[1] - p0[1], sublisteners), sublisteners.apply, sublisteners, [type, that, args]);\n    };\n  }\n\n  drag.filter = function(_) {\n    return arguments.length ? (filter = typeof _ === \"function\" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(!!_), drag) : filter;\n  };\n\n  drag.container = function(_) {\n    return arguments.length ? (container = typeof _ === \"function\" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(_), drag) : container;\n  };\n\n  drag.subject = function(_) {\n    return arguments.length ? (subject = typeof _ === \"function\" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(_), drag) : subject;\n  };\n\n  drag.touchable = function(_) {\n    return arguments.length ? (touchable = typeof _ === \"function\" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(!!_), drag) : touchable;\n  };\n\n  drag.on = function() {\n    var value = listeners.on.apply(listeners, arguments);\n    return value === listeners ? drag : value;\n  };\n\n  drag.clickDistance = function(_) {\n    return arguments.length ? (clickDistance2 = (_ = +_) * _, drag) : Math.sqrt(clickDistance2);\n  };\n\n  return drag;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-drag/src/event.js\":\n/*!*******************************************!*\\\n  !*** ./node_modules/d3-drag/src/event.js ***!\n  \\*******************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return DragEvent; });\nfunction DragEvent(target, type, subject, id, active, x, y, dx, dy, dispatch) {\n  this.target = target;\n  this.type = type;\n  this.subject = subject;\n  this.identifier = id;\n  this.active = active;\n  this.x = x;\n  this.y = y;\n  this.dx = dx;\n  this.dy = dy;\n  this._ = dispatch;\n}\n\nDragEvent.prototype.on = function() {\n  var value = this._.on.apply(this._, arguments);\n  return value === this._ ? this : value;\n};\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-drag/src/index.js\":\n/*!*******************************************!*\\\n  !*** ./node_modules/d3-drag/src/index.js ***!\n  \\*******************************************/\n/*! exports provided: drag, dragDisable, dragEnable */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _drag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./drag.js */ \"./node_modules/d3-drag/src/drag.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"drag\", function() { return _drag_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n/* harmony import */ var _nodrag_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./nodrag.js */ \"./node_modules/d3-drag/src/nodrag.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"dragDisable\", function() { return _nodrag_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"dragEnable\", function() { return _nodrag_js__WEBPACK_IMPORTED_MODULE_1__[\"yesdrag\"]; });\n\n\n\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-drag/src/nodrag.js\":\n/*!********************************************!*\\\n  !*** ./node_modules/d3-drag/src/nodrag.js ***!\n  \\********************************************/\n/*! exports provided: default, yesdrag */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"yesdrag\", function() { return yesdrag; });\n/* harmony import */ var d3_selection__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-selection */ \"./node_modules/d3-selection/src/index.js\");\n/* harmony import */ var _noevent_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./noevent.js */ \"./node_modules/d3-drag/src/noevent.js\");\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(view) {\n  var root = view.document.documentElement,\n      selection = Object(d3_selection__WEBPACK_IMPORTED_MODULE_0__[\"select\"])(view).on(\"dragstart.drag\", _noevent_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"], true);\n  if (\"onselectstart\" in root) {\n    selection.on(\"selectstart.drag\", _noevent_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"], true);\n  } else {\n    root.__noselect = root.style.MozUserSelect;\n    root.style.MozUserSelect = \"none\";\n  }\n});\n\nfunction yesdrag(view, noclick) {\n  var root = view.document.documentElement,\n      selection = Object(d3_selection__WEBPACK_IMPORTED_MODULE_0__[\"select\"])(view).on(\"dragstart.drag\", null);\n  if (noclick) {\n    selection.on(\"click.drag\", _noevent_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"], true);\n    setTimeout(function() { selection.on(\"click.drag\", null); }, 0);\n  }\n  if (\"onselectstart\" in root) {\n    selection.on(\"selectstart.drag\", null);\n  } else {\n    root.style.MozUserSelect = root.__noselect;\n    delete root.__noselect;\n  }\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-drag/src/noevent.js\":\n/*!*********************************************!*\\\n  !*** ./node_modules/d3-drag/src/noevent.js ***!\n  \\*********************************************/\n/*! exports provided: nopropagation, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"nopropagation\", function() { return nopropagation; });\n/* harmony import */ var d3_selection__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-selection */ \"./node_modules/d3-selection/src/index.js\");\n\n\nfunction nopropagation() {\n  d3_selection__WEBPACK_IMPORTED_MODULE_0__[\"event\"].stopImmediatePropagation();\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  d3_selection__WEBPACK_IMPORTED_MODULE_0__[\"event\"].preventDefault();\n  d3_selection__WEBPACK_IMPORTED_MODULE_0__[\"event\"].stopImmediatePropagation();\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-dsv/src/autoType.js\":\n/*!*********************************************!*\\\n  !*** ./node_modules/d3-dsv/src/autoType.js ***!\n  \\*********************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return autoType; });\nfunction autoType(object) {\n  for (var key in object) {\n    var value = object[key].trim(), number, m;\n    if (!value) value = null;\n    else if (value === \"true\") value = true;\n    else if (value === \"false\") value = false;\n    else if (value === \"NaN\") value = NaN;\n    else if (!isNaN(number = +value)) value = number;\n    else if (m = value.match(/^([-+]\\d{2})?\\d{4}(-\\d{2}(-\\d{2})?)?(T\\d{2}:\\d{2}(:\\d{2}(\\.\\d{3})?)?(Z|[-+]\\d{2}:\\d{2})?)?$/)) {\n      if (fixtz && !!m[4] && !m[7]) value = value.replace(/-/g, \"/\").replace(/T/, \" \");\n      value = new Date(value);\n    }\n    else continue;\n    object[key] = value;\n  }\n  return object;\n}\n\n// https://github.com/d3/d3-dsv/issues/45\nvar fixtz = new Date(\"2019-01-01T00:00\").getHours() || new Date(\"2019-07-01T00:00\").getHours();\n\n/***/ }),\n\n/***/ \"./node_modules/d3-dsv/src/csv.js\":\n/*!****************************************!*\\\n  !*** ./node_modules/d3-dsv/src/csv.js ***!\n  \\****************************************/\n/*! exports provided: csvParse, csvParseRows, csvFormat, csvFormatBody, csvFormatRows, csvFormatRow, csvFormatValue */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"csvParse\", function() { return csvParse; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"csvParseRows\", function() { return csvParseRows; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"csvFormat\", function() { return csvFormat; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"csvFormatBody\", function() { return csvFormatBody; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"csvFormatRows\", function() { return csvFormatRows; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"csvFormatRow\", function() { return csvFormatRow; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"csvFormatValue\", function() { return csvFormatValue; });\n/* harmony import */ var _dsv_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./dsv.js */ \"./node_modules/d3-dsv/src/dsv.js\");\n\n\nvar csv = Object(_dsv_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(\",\");\n\nvar csvParse = csv.parse;\nvar csvParseRows = csv.parseRows;\nvar csvFormat = csv.format;\nvar csvFormatBody = csv.formatBody;\nvar csvFormatRows = csv.formatRows;\nvar csvFormatRow = csv.formatRow;\nvar csvFormatValue = csv.formatValue;\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-dsv/src/dsv.js\":\n/*!****************************************!*\\\n  !*** ./node_modules/d3-dsv/src/dsv.js ***!\n  \\****************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\nvar EOL = {},\n    EOF = {},\n    QUOTE = 34,\n    NEWLINE = 10,\n    RETURN = 13;\n\nfunction objectConverter(columns) {\n  return new Function(\"d\", \"return {\" + columns.map(function(name, i) {\n    return JSON.stringify(name) + \": d[\" + i + \"] || \\\"\\\"\";\n  }).join(\",\") + \"}\");\n}\n\nfunction customConverter(columns, f) {\n  var object = objectConverter(columns);\n  return function(row, i) {\n    return f(object(row), i, columns);\n  };\n}\n\n// Compute unique columns in order of discovery.\nfunction inferColumns(rows) {\n  var columnSet = Object.create(null),\n      columns = [];\n\n  rows.forEach(function(row) {\n    for (var column in row) {\n      if (!(column in columnSet)) {\n        columns.push(columnSet[column] = column);\n      }\n    }\n  });\n\n  return columns;\n}\n\nfunction pad(value, width) {\n  var s = value + \"\", length = s.length;\n  return length < width ? new Array(width - length + 1).join(0) + s : s;\n}\n\nfunction formatYear(year) {\n  return year < 0 ? \"-\" + pad(-year, 6)\n    : year > 9999 ? \"+\" + pad(year, 6)\n    : pad(year, 4);\n}\n\nfunction formatDate(date) {\n  var hours = date.getUTCHours(),\n      minutes = date.getUTCMinutes(),\n      seconds = date.getUTCSeconds(),\n      milliseconds = date.getUTCMilliseconds();\n  return isNaN(date) ? \"Invalid Date\"\n      : formatYear(date.getUTCFullYear(), 4) + \"-\" + pad(date.getUTCMonth() + 1, 2) + \"-\" + pad(date.getUTCDate(), 2)\n      + (milliseconds ? \"T\" + pad(hours, 2) + \":\" + pad(minutes, 2) + \":\" + pad(seconds, 2) + \".\" + pad(milliseconds, 3) + \"Z\"\n      : seconds ? \"T\" + pad(hours, 2) + \":\" + pad(minutes, 2) + \":\" + pad(seconds, 2) + \"Z\"\n      : minutes || hours ? \"T\" + pad(hours, 2) + \":\" + pad(minutes, 2) + \"Z\"\n      : \"\");\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(delimiter) {\n  var reFormat = new RegExp(\"[\\\"\" + delimiter + \"\\n\\r]\"),\n      DELIMITER = delimiter.charCodeAt(0);\n\n  function parse(text, f) {\n    var convert, columns, rows = parseRows(text, function(row, i) {\n      if (convert) return convert(row, i - 1);\n      columns = row, convert = f ? customConverter(row, f) : objectConverter(row);\n    });\n    rows.columns = columns || [];\n    return rows;\n  }\n\n  function parseRows(text, f) {\n    var rows = [], // output rows\n        N = text.length,\n        I = 0, // current character index\n        n = 0, // current line number\n        t, // current token\n        eof = N <= 0, // current token followed by EOF?\n        eol = false; // current token followed by EOL?\n\n    // Strip the trailing newline.\n    if (text.charCodeAt(N - 1) === NEWLINE) --N;\n    if (text.charCodeAt(N - 1) === RETURN) --N;\n\n    function token() {\n      if (eof) return EOF;\n      if (eol) return eol = false, EOL;\n\n      // Unescape quotes.\n      var i, j = I, c;\n      if (text.charCodeAt(j) === QUOTE) {\n        while (I++ < N && text.charCodeAt(I) !== QUOTE || text.charCodeAt(++I) === QUOTE);\n        if ((i = I) >= N) eof = true;\n        else if ((c = text.charCodeAt(I++)) === NEWLINE) eol = true;\n        else if (c === RETURN) { eol = true; if (text.charCodeAt(I) === NEWLINE) ++I; }\n        return text.slice(j + 1, i - 1).replace(/\"\"/g, \"\\\"\");\n      }\n\n      // Find next delimiter or newline.\n      while (I < N) {\n        if ((c = text.charCodeAt(i = I++)) === NEWLINE) eol = true;\n        else if (c === RETURN) { eol = true; if (text.charCodeAt(I) === NEWLINE) ++I; }\n        else if (c !== DELIMITER) continue;\n        return text.slice(j, i);\n      }\n\n      // Return last token before EOF.\n      return eof = true, text.slice(j, N);\n    }\n\n    while ((t = token()) !== EOF) {\n      var row = [];\n      while (t !== EOL && t !== EOF) row.push(t), t = token();\n      if (f && (row = f(row, n++)) == null) continue;\n      rows.push(row);\n    }\n\n    return rows;\n  }\n\n  function preformatBody(rows, columns) {\n    return rows.map(function(row) {\n      return columns.map(function(column) {\n        return formatValue(row[column]);\n      }).join(delimiter);\n    });\n  }\n\n  function format(rows, columns) {\n    if (columns == null) columns = inferColumns(rows);\n    return [columns.map(formatValue).join(delimiter)].concat(preformatBody(rows, columns)).join(\"\\n\");\n  }\n\n  function formatBody(rows, columns) {\n    if (columns == null) columns = inferColumns(rows);\n    return preformatBody(rows, columns).join(\"\\n\");\n  }\n\n  function formatRows(rows) {\n    return rows.map(formatRow).join(\"\\n\");\n  }\n\n  function formatRow(row) {\n    return row.map(formatValue).join(delimiter);\n  }\n\n  function formatValue(value) {\n    return value == null ? \"\"\n        : value instanceof Date ? formatDate(value)\n        : reFormat.test(value += \"\") ? \"\\\"\" + value.replace(/\"/g, \"\\\"\\\"\") + \"\\\"\"\n        : value;\n  }\n\n  return {\n    parse: parse,\n    parseRows: parseRows,\n    format: format,\n    formatBody: formatBody,\n    formatRows: formatRows,\n    formatRow: formatRow,\n    formatValue: formatValue\n  };\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-dsv/src/index.js\":\n/*!******************************************!*\\\n  !*** ./node_modules/d3-dsv/src/index.js ***!\n  \\******************************************/\n/*! exports provided: dsvFormat, csvParse, csvParseRows, csvFormat, csvFormatBody, csvFormatRows, csvFormatRow, csvFormatValue, tsvParse, tsvParseRows, tsvFormat, tsvFormatBody, tsvFormatRows, tsvFormatRow, tsvFormatValue, autoType */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _dsv_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./dsv.js */ \"./node_modules/d3-dsv/src/dsv.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"dsvFormat\", function() { return _dsv_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n/* harmony import */ var _csv_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./csv.js */ \"./node_modules/d3-dsv/src/csv.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"csvParse\", function() { return _csv_js__WEBPACK_IMPORTED_MODULE_1__[\"csvParse\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"csvParseRows\", function() { return _csv_js__WEBPACK_IMPORTED_MODULE_1__[\"csvParseRows\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"csvFormat\", function() { return _csv_js__WEBPACK_IMPORTED_MODULE_1__[\"csvFormat\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"csvFormatBody\", function() { return _csv_js__WEBPACK_IMPORTED_MODULE_1__[\"csvFormatBody\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"csvFormatRows\", function() { return _csv_js__WEBPACK_IMPORTED_MODULE_1__[\"csvFormatRows\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"csvFormatRow\", function() { return _csv_js__WEBPACK_IMPORTED_MODULE_1__[\"csvFormatRow\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"csvFormatValue\", function() { return _csv_js__WEBPACK_IMPORTED_MODULE_1__[\"csvFormatValue\"]; });\n\n/* harmony import */ var _tsv_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./tsv.js */ \"./node_modules/d3-dsv/src/tsv.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"tsvParse\", function() { return _tsv_js__WEBPACK_IMPORTED_MODULE_2__[\"tsvParse\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"tsvParseRows\", function() { return _tsv_js__WEBPACK_IMPORTED_MODULE_2__[\"tsvParseRows\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"tsvFormat\", function() { return _tsv_js__WEBPACK_IMPORTED_MODULE_2__[\"tsvFormat\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"tsvFormatBody\", function() { return _tsv_js__WEBPACK_IMPORTED_MODULE_2__[\"tsvFormatBody\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"tsvFormatRows\", function() { return _tsv_js__WEBPACK_IMPORTED_MODULE_2__[\"tsvFormatRows\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"tsvFormatRow\", function() { return _tsv_js__WEBPACK_IMPORTED_MODULE_2__[\"tsvFormatRow\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"tsvFormatValue\", function() { return _tsv_js__WEBPACK_IMPORTED_MODULE_2__[\"tsvFormatValue\"]; });\n\n/* harmony import */ var _autoType_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./autoType.js */ \"./node_modules/d3-dsv/src/autoType.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"autoType\", function() { return _autoType_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"]; });\n\n\n\n\n\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-dsv/src/tsv.js\":\n/*!****************************************!*\\\n  !*** ./node_modules/d3-dsv/src/tsv.js ***!\n  \\****************************************/\n/*! exports provided: tsvParse, tsvParseRows, tsvFormat, tsvFormatBody, tsvFormatRows, tsvFormatRow, tsvFormatValue */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"tsvParse\", function() { return tsvParse; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"tsvParseRows\", function() { return tsvParseRows; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"tsvFormat\", function() { return tsvFormat; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"tsvFormatBody\", function() { return tsvFormatBody; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"tsvFormatRows\", function() { return tsvFormatRows; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"tsvFormatRow\", function() { return tsvFormatRow; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"tsvFormatValue\", function() { return tsvFormatValue; });\n/* harmony import */ var _dsv_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./dsv.js */ \"./node_modules/d3-dsv/src/dsv.js\");\n\n\nvar tsv = Object(_dsv_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(\"\\t\");\n\nvar tsvParse = tsv.parse;\nvar tsvParseRows = tsv.parseRows;\nvar tsvFormat = tsv.format;\nvar tsvFormatBody = tsv.formatBody;\nvar tsvFormatRows = tsv.formatRows;\nvar tsvFormatRow = tsv.formatRow;\nvar tsvFormatValue = tsv.formatValue;\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-ease/src/back.js\":\n/*!******************************************!*\\\n  !*** ./node_modules/d3-ease/src/back.js ***!\n  \\******************************************/\n/*! exports provided: backIn, backOut, backInOut */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"backIn\", function() { return backIn; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"backOut\", function() { return backOut; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"backInOut\", function() { return backInOut; });\nvar overshoot = 1.70158;\n\nvar backIn = (function custom(s) {\n  s = +s;\n\n  function backIn(t) {\n    return (t = +t) * t * (s * (t - 1) + t);\n  }\n\n  backIn.overshoot = custom;\n\n  return backIn;\n})(overshoot);\n\nvar backOut = (function custom(s) {\n  s = +s;\n\n  function backOut(t) {\n    return --t * t * ((t + 1) * s + t) + 1;\n  }\n\n  backOut.overshoot = custom;\n\n  return backOut;\n})(overshoot);\n\nvar backInOut = (function custom(s) {\n  s = +s;\n\n  function backInOut(t) {\n    return ((t *= 2) < 1 ? t * t * ((s + 1) * t - s) : (t -= 2) * t * ((s + 1) * t + s) + 2) / 2;\n  }\n\n  backInOut.overshoot = custom;\n\n  return backInOut;\n})(overshoot);\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-ease/src/bounce.js\":\n/*!********************************************!*\\\n  !*** ./node_modules/d3-ease/src/bounce.js ***!\n  \\********************************************/\n/*! exports provided: bounceIn, bounceOut, bounceInOut */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"bounceIn\", function() { return bounceIn; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"bounceOut\", function() { return bounceOut; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"bounceInOut\", function() { return bounceInOut; });\nvar b1 = 4 / 11,\n    b2 = 6 / 11,\n    b3 = 8 / 11,\n    b4 = 3 / 4,\n    b5 = 9 / 11,\n    b6 = 10 / 11,\n    b7 = 15 / 16,\n    b8 = 21 / 22,\n    b9 = 63 / 64,\n    b0 = 1 / b1 / b1;\n\nfunction bounceIn(t) {\n  return 1 - bounceOut(1 - t);\n}\n\nfunction bounceOut(t) {\n  return (t = +t) < b1 ? b0 * t * t : t < b3 ? b0 * (t -= b2) * t + b4 : t < b6 ? b0 * (t -= b5) * t + b7 : b0 * (t -= b8) * t + b9;\n}\n\nfunction bounceInOut(t) {\n  return ((t *= 2) <= 1 ? 1 - bounceOut(1 - t) : bounceOut(t - 1) + 1) / 2;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-ease/src/circle.js\":\n/*!********************************************!*\\\n  !*** ./node_modules/d3-ease/src/circle.js ***!\n  \\********************************************/\n/*! exports provided: circleIn, circleOut, circleInOut */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"circleIn\", function() { return circleIn; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"circleOut\", function() { return circleOut; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"circleInOut\", function() { return circleInOut; });\nfunction circleIn(t) {\n  return 1 - Math.sqrt(1 - t * t);\n}\n\nfunction circleOut(t) {\n  return Math.sqrt(1 - --t * t);\n}\n\nfunction circleInOut(t) {\n  return ((t *= 2) <= 1 ? 1 - Math.sqrt(1 - t * t) : Math.sqrt(1 - (t -= 2) * t) + 1) / 2;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-ease/src/cubic.js\":\n/*!*******************************************!*\\\n  !*** ./node_modules/d3-ease/src/cubic.js ***!\n  \\*******************************************/\n/*! exports provided: cubicIn, cubicOut, cubicInOut */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"cubicIn\", function() { return cubicIn; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"cubicOut\", function() { return cubicOut; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"cubicInOut\", function() { return cubicInOut; });\nfunction cubicIn(t) {\n  return t * t * t;\n}\n\nfunction cubicOut(t) {\n  return --t * t * t + 1;\n}\n\nfunction cubicInOut(t) {\n  return ((t *= 2) <= 1 ? t * t * t : (t -= 2) * t * t + 2) / 2;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-ease/src/elastic.js\":\n/*!*********************************************!*\\\n  !*** ./node_modules/d3-ease/src/elastic.js ***!\n  \\*********************************************/\n/*! exports provided: elasticIn, elasticOut, elasticInOut */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"elasticIn\", function() { return elasticIn; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"elasticOut\", function() { return elasticOut; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"elasticInOut\", function() { return elasticInOut; });\n/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./math.js */ \"./node_modules/d3-ease/src/math.js\");\n\n\nvar tau = 2 * Math.PI,\n    amplitude = 1,\n    period = 0.3;\n\nvar elasticIn = (function custom(a, p) {\n  var s = Math.asin(1 / (a = Math.max(1, a))) * (p /= tau);\n\n  function elasticIn(t) {\n    return a * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"tpmt\"])(-(--t)) * Math.sin((s - t) / p);\n  }\n\n  elasticIn.amplitude = function(a) { return custom(a, p * tau); };\n  elasticIn.period = function(p) { return custom(a, p); };\n\n  return elasticIn;\n})(amplitude, period);\n\nvar elasticOut = (function custom(a, p) {\n  var s = Math.asin(1 / (a = Math.max(1, a))) * (p /= tau);\n\n  function elasticOut(t) {\n    return 1 - a * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"tpmt\"])(t = +t) * Math.sin((t + s) / p);\n  }\n\n  elasticOut.amplitude = function(a) { return custom(a, p * tau); };\n  elasticOut.period = function(p) { return custom(a, p); };\n\n  return elasticOut;\n})(amplitude, period);\n\nvar elasticInOut = (function custom(a, p) {\n  var s = Math.asin(1 / (a = Math.max(1, a))) * (p /= tau);\n\n  function elasticInOut(t) {\n    return ((t = t * 2 - 1) < 0\n        ? a * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"tpmt\"])(-t) * Math.sin((s - t) / p)\n        : 2 - a * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"tpmt\"])(t) * Math.sin((s + t) / p)) / 2;\n  }\n\n  elasticInOut.amplitude = function(a) { return custom(a, p * tau); };\n  elasticInOut.period = function(p) { return custom(a, p); };\n\n  return elasticInOut;\n})(amplitude, period);\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-ease/src/exp.js\":\n/*!*****************************************!*\\\n  !*** ./node_modules/d3-ease/src/exp.js ***!\n  \\*****************************************/\n/*! exports provided: expIn, expOut, expInOut */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"expIn\", function() { return expIn; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"expOut\", function() { return expOut; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"expInOut\", function() { return expInOut; });\n/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./math.js */ \"./node_modules/d3-ease/src/math.js\");\n\n\nfunction expIn(t) {\n  return Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"tpmt\"])(1 - +t);\n}\n\nfunction expOut(t) {\n  return 1 - Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"tpmt\"])(t);\n}\n\nfunction expInOut(t) {\n  return ((t *= 2) <= 1 ? Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"tpmt\"])(1 - t) : 2 - Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"tpmt\"])(t - 1)) / 2;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-ease/src/index.js\":\n/*!*******************************************!*\\\n  !*** ./node_modules/d3-ease/src/index.js ***!\n  \\*******************************************/\n/*! exports provided: easeLinear, easeQuad, easeQuadIn, easeQuadOut, easeQuadInOut, easeCubic, easeCubicIn, easeCubicOut, easeCubicInOut, easePoly, easePolyIn, easePolyOut, easePolyInOut, easeSin, easeSinIn, easeSinOut, easeSinInOut, easeExp, easeExpIn, easeExpOut, easeExpInOut, easeCircle, easeCircleIn, easeCircleOut, easeCircleInOut, easeBounce, easeBounceIn, easeBounceOut, easeBounceInOut, easeBack, easeBackIn, easeBackOut, easeBackInOut, easeElastic, easeElasticIn, easeElasticOut, easeElasticInOut */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _linear_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./linear.js */ \"./node_modules/d3-ease/src/linear.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeLinear\", function() { return _linear_js__WEBPACK_IMPORTED_MODULE_0__[\"linear\"]; });\n\n/* harmony import */ var _quad_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./quad.js */ \"./node_modules/d3-ease/src/quad.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeQuad\", function() { return _quad_js__WEBPACK_IMPORTED_MODULE_1__[\"quadInOut\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeQuadIn\", function() { return _quad_js__WEBPACK_IMPORTED_MODULE_1__[\"quadIn\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeQuadOut\", function() { return _quad_js__WEBPACK_IMPORTED_MODULE_1__[\"quadOut\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeQuadInOut\", function() { return _quad_js__WEBPACK_IMPORTED_MODULE_1__[\"quadInOut\"]; });\n\n/* harmony import */ var _cubic_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./cubic.js */ \"./node_modules/d3-ease/src/cubic.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeCubic\", function() { return _cubic_js__WEBPACK_IMPORTED_MODULE_2__[\"cubicInOut\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeCubicIn\", function() { return _cubic_js__WEBPACK_IMPORTED_MODULE_2__[\"cubicIn\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeCubicOut\", function() { return _cubic_js__WEBPACK_IMPORTED_MODULE_2__[\"cubicOut\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeCubicInOut\", function() { return _cubic_js__WEBPACK_IMPORTED_MODULE_2__[\"cubicInOut\"]; });\n\n/* harmony import */ var _poly_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./poly.js */ \"./node_modules/d3-ease/src/poly.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easePoly\", function() { return _poly_js__WEBPACK_IMPORTED_MODULE_3__[\"polyInOut\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easePolyIn\", function() { return _poly_js__WEBPACK_IMPORTED_MODULE_3__[\"polyIn\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easePolyOut\", function() { return _poly_js__WEBPACK_IMPORTED_MODULE_3__[\"polyOut\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easePolyInOut\", function() { return _poly_js__WEBPACK_IMPORTED_MODULE_3__[\"polyInOut\"]; });\n\n/* harmony import */ var _sin_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./sin.js */ \"./node_modules/d3-ease/src/sin.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeSin\", function() { return _sin_js__WEBPACK_IMPORTED_MODULE_4__[\"sinInOut\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeSinIn\", function() { return _sin_js__WEBPACK_IMPORTED_MODULE_4__[\"sinIn\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeSinOut\", function() { return _sin_js__WEBPACK_IMPORTED_MODULE_4__[\"sinOut\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeSinInOut\", function() { return _sin_js__WEBPACK_IMPORTED_MODULE_4__[\"sinInOut\"]; });\n\n/* harmony import */ var _exp_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./exp.js */ \"./node_modules/d3-ease/src/exp.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeExp\", function() { return _exp_js__WEBPACK_IMPORTED_MODULE_5__[\"expInOut\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeExpIn\", function() { return _exp_js__WEBPACK_IMPORTED_MODULE_5__[\"expIn\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeExpOut\", function() { return _exp_js__WEBPACK_IMPORTED_MODULE_5__[\"expOut\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeExpInOut\", function() { return _exp_js__WEBPACK_IMPORTED_MODULE_5__[\"expInOut\"]; });\n\n/* harmony import */ var _circle_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./circle.js */ \"./node_modules/d3-ease/src/circle.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeCircle\", function() { return _circle_js__WEBPACK_IMPORTED_MODULE_6__[\"circleInOut\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeCircleIn\", function() { return _circle_js__WEBPACK_IMPORTED_MODULE_6__[\"circleIn\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeCircleOut\", function() { return _circle_js__WEBPACK_IMPORTED_MODULE_6__[\"circleOut\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeCircleInOut\", function() { return _circle_js__WEBPACK_IMPORTED_MODULE_6__[\"circleInOut\"]; });\n\n/* harmony import */ var _bounce_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./bounce.js */ \"./node_modules/d3-ease/src/bounce.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeBounce\", function() { return _bounce_js__WEBPACK_IMPORTED_MODULE_7__[\"bounceOut\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeBounceIn\", function() { return _bounce_js__WEBPACK_IMPORTED_MODULE_7__[\"bounceIn\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeBounceOut\", function() { return _bounce_js__WEBPACK_IMPORTED_MODULE_7__[\"bounceOut\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeBounceInOut\", function() { return _bounce_js__WEBPACK_IMPORTED_MODULE_7__[\"bounceInOut\"]; });\n\n/* harmony import */ var _back_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./back.js */ \"./node_modules/d3-ease/src/back.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeBack\", function() { return _back_js__WEBPACK_IMPORTED_MODULE_8__[\"backInOut\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeBackIn\", function() { return _back_js__WEBPACK_IMPORTED_MODULE_8__[\"backIn\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeBackOut\", function() { return _back_js__WEBPACK_IMPORTED_MODULE_8__[\"backOut\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeBackInOut\", function() { return _back_js__WEBPACK_IMPORTED_MODULE_8__[\"backInOut\"]; });\n\n/* harmony import */ var _elastic_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./elastic.js */ \"./node_modules/d3-ease/src/elastic.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeElastic\", function() { return _elastic_js__WEBPACK_IMPORTED_MODULE_9__[\"elasticOut\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeElasticIn\", function() { return _elastic_js__WEBPACK_IMPORTED_MODULE_9__[\"elasticIn\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeElasticOut\", function() { return _elastic_js__WEBPACK_IMPORTED_MODULE_9__[\"elasticOut\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeElasticInOut\", function() { return _elastic_js__WEBPACK_IMPORTED_MODULE_9__[\"elasticInOut\"]; });\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-ease/src/linear.js\":\n/*!********************************************!*\\\n  !*** ./node_modules/d3-ease/src/linear.js ***!\n  \\********************************************/\n/*! exports provided: linear */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"linear\", function() { return linear; });\nfunction linear(t) {\n  return +t;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-ease/src/math.js\":\n/*!******************************************!*\\\n  !*** ./node_modules/d3-ease/src/math.js ***!\n  \\******************************************/\n/*! exports provided: tpmt */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"tpmt\", function() { return tpmt; });\n// tpmt is two power minus ten times t scaled to [0,1]\nfunction tpmt(x) {\n  return (Math.pow(2, -10 * x) - 0.0009765625) * 1.0009775171065494;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-ease/src/poly.js\":\n/*!******************************************!*\\\n  !*** ./node_modules/d3-ease/src/poly.js ***!\n  \\******************************************/\n/*! exports provided: polyIn, polyOut, polyInOut */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"polyIn\", function() { return polyIn; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"polyOut\", function() { return polyOut; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"polyInOut\", function() { return polyInOut; });\nvar exponent = 3;\n\nvar polyIn = (function custom(e) {\n  e = +e;\n\n  function polyIn(t) {\n    return Math.pow(t, e);\n  }\n\n  polyIn.exponent = custom;\n\n  return polyIn;\n})(exponent);\n\nvar polyOut = (function custom(e) {\n  e = +e;\n\n  function polyOut(t) {\n    return 1 - Math.pow(1 - t, e);\n  }\n\n  polyOut.exponent = custom;\n\n  return polyOut;\n})(exponent);\n\nvar polyInOut = (function custom(e) {\n  e = +e;\n\n  function polyInOut(t) {\n    return ((t *= 2) <= 1 ? Math.pow(t, e) : 2 - Math.pow(2 - t, e)) / 2;\n  }\n\n  polyInOut.exponent = custom;\n\n  return polyInOut;\n})(exponent);\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-ease/src/quad.js\":\n/*!******************************************!*\\\n  !*** ./node_modules/d3-ease/src/quad.js ***!\n  \\******************************************/\n/*! exports provided: quadIn, quadOut, quadInOut */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"quadIn\", function() { return quadIn; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"quadOut\", function() { return quadOut; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"quadInOut\", function() { return quadInOut; });\nfunction quadIn(t) {\n  return t * t;\n}\n\nfunction quadOut(t) {\n  return t * (2 - t);\n}\n\nfunction quadInOut(t) {\n  return ((t *= 2) <= 1 ? t * t : --t * (2 - t) + 1) / 2;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-ease/src/sin.js\":\n/*!*****************************************!*\\\n  !*** ./node_modules/d3-ease/src/sin.js ***!\n  \\*****************************************/\n/*! exports provided: sinIn, sinOut, sinInOut */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"sinIn\", function() { return sinIn; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"sinOut\", function() { return sinOut; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"sinInOut\", function() { return sinInOut; });\nvar pi = Math.PI,\n    halfPi = pi / 2;\n\nfunction sinIn(t) {\n  return (+t === 1) ? 1 : 1 - Math.cos(t * halfPi);\n}\n\nfunction sinOut(t) {\n  return Math.sin(t * halfPi);\n}\n\nfunction sinInOut(t) {\n  return (1 - Math.cos(pi * t)) / 2;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-fetch/node_modules/d3-dsv/src/autoType.js\":\n/*!*******************************************************************!*\\\n  !*** ./node_modules/d3-fetch/node_modules/d3-dsv/src/autoType.js ***!\n  \\*******************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return autoType; });\nfunction autoType(object) {\n  for (var key in object) {\n    var value = object[key].trim(), number, m;\n    if (!value) value = null;\n    else if (value === \"true\") value = true;\n    else if (value === \"false\") value = false;\n    else if (value === \"NaN\") value = NaN;\n    else if (!isNaN(number = +value)) value = number;\n    else if (m = value.match(/^([-+]\\d{2})?\\d{4}(-\\d{2}(-\\d{2})?)?(T\\d{2}:\\d{2}(:\\d{2}(\\.\\d{3})?)?(Z|[-+]\\d{2}:\\d{2})?)?$/)) {\n      if (fixtz && !!m[4] && !m[7]) value = value.replace(/-/g, \"/\").replace(/T/, \" \");\n      value = new Date(value);\n    }\n    else continue;\n    object[key] = value;\n  }\n  return object;\n}\n\n// https://github.com/d3/d3-dsv/issues/45\nconst fixtz = new Date(\"2019-01-01T00:00\").getHours() || new Date(\"2019-07-01T00:00\").getHours();\n\n/***/ }),\n\n/***/ \"./node_modules/d3-fetch/node_modules/d3-dsv/src/csv.js\":\n/*!**************************************************************!*\\\n  !*** ./node_modules/d3-fetch/node_modules/d3-dsv/src/csv.js ***!\n  \\**************************************************************/\n/*! exports provided: csvParse, csvParseRows, csvFormat, csvFormatBody, csvFormatRows, csvFormatRow, csvFormatValue */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"csvParse\", function() { return csvParse; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"csvParseRows\", function() { return csvParseRows; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"csvFormat\", function() { return csvFormat; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"csvFormatBody\", function() { return csvFormatBody; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"csvFormatRows\", function() { return csvFormatRows; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"csvFormatRow\", function() { return csvFormatRow; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"csvFormatValue\", function() { return csvFormatValue; });\n/* harmony import */ var _dsv_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./dsv.js */ \"./node_modules/d3-fetch/node_modules/d3-dsv/src/dsv.js\");\n\n\nvar csv = Object(_dsv_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(\",\");\n\nvar csvParse = csv.parse;\nvar csvParseRows = csv.parseRows;\nvar csvFormat = csv.format;\nvar csvFormatBody = csv.formatBody;\nvar csvFormatRows = csv.formatRows;\nvar csvFormatRow = csv.formatRow;\nvar csvFormatValue = csv.formatValue;\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-fetch/node_modules/d3-dsv/src/dsv.js\":\n/*!**************************************************************!*\\\n  !*** ./node_modules/d3-fetch/node_modules/d3-dsv/src/dsv.js ***!\n  \\**************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\nvar EOL = {},\n    EOF = {},\n    QUOTE = 34,\n    NEWLINE = 10,\n    RETURN = 13;\n\nfunction objectConverter(columns) {\n  return new Function(\"d\", \"return {\" + columns.map(function(name, i) {\n    return JSON.stringify(name) + \": d[\" + i + \"] || \\\"\\\"\";\n  }).join(\",\") + \"}\");\n}\n\nfunction customConverter(columns, f) {\n  var object = objectConverter(columns);\n  return function(row, i) {\n    return f(object(row), i, columns);\n  };\n}\n\n// Compute unique columns in order of discovery.\nfunction inferColumns(rows) {\n  var columnSet = Object.create(null),\n      columns = [];\n\n  rows.forEach(function(row) {\n    for (var column in row) {\n      if (!(column in columnSet)) {\n        columns.push(columnSet[column] = column);\n      }\n    }\n  });\n\n  return columns;\n}\n\nfunction pad(value, width) {\n  var s = value + \"\", length = s.length;\n  return length < width ? new Array(width - length + 1).join(0) + s : s;\n}\n\nfunction formatYear(year) {\n  return year < 0 ? \"-\" + pad(-year, 6)\n    : year > 9999 ? \"+\" + pad(year, 6)\n    : pad(year, 4);\n}\n\nfunction formatDate(date) {\n  var hours = date.getUTCHours(),\n      minutes = date.getUTCMinutes(),\n      seconds = date.getUTCSeconds(),\n      milliseconds = date.getUTCMilliseconds();\n  return isNaN(date) ? \"Invalid Date\"\n      : formatYear(date.getUTCFullYear(), 4) + \"-\" + pad(date.getUTCMonth() + 1, 2) + \"-\" + pad(date.getUTCDate(), 2)\n      + (milliseconds ? \"T\" + pad(hours, 2) + \":\" + pad(minutes, 2) + \":\" + pad(seconds, 2) + \".\" + pad(milliseconds, 3) + \"Z\"\n      : seconds ? \"T\" + pad(hours, 2) + \":\" + pad(minutes, 2) + \":\" + pad(seconds, 2) + \"Z\"\n      : minutes || hours ? \"T\" + pad(hours, 2) + \":\" + pad(minutes, 2) + \"Z\"\n      : \"\");\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(delimiter) {\n  var reFormat = new RegExp(\"[\\\"\" + delimiter + \"\\n\\r]\"),\n      DELIMITER = delimiter.charCodeAt(0);\n\n  function parse(text, f) {\n    var convert, columns, rows = parseRows(text, function(row, i) {\n      if (convert) return convert(row, i - 1);\n      columns = row, convert = f ? customConverter(row, f) : objectConverter(row);\n    });\n    rows.columns = columns || [];\n    return rows;\n  }\n\n  function parseRows(text, f) {\n    var rows = [], // output rows\n        N = text.length,\n        I = 0, // current character index\n        n = 0, // current line number\n        t, // current token\n        eof = N <= 0, // current token followed by EOF?\n        eol = false; // current token followed by EOL?\n\n    // Strip the trailing newline.\n    if (text.charCodeAt(N - 1) === NEWLINE) --N;\n    if (text.charCodeAt(N - 1) === RETURN) --N;\n\n    function token() {\n      if (eof) return EOF;\n      if (eol) return eol = false, EOL;\n\n      // Unescape quotes.\n      var i, j = I, c;\n      if (text.charCodeAt(j) === QUOTE) {\n        while (I++ < N && text.charCodeAt(I) !== QUOTE || text.charCodeAt(++I) === QUOTE);\n        if ((i = I) >= N) eof = true;\n        else if ((c = text.charCodeAt(I++)) === NEWLINE) eol = true;\n        else if (c === RETURN) { eol = true; if (text.charCodeAt(I) === NEWLINE) ++I; }\n        return text.slice(j + 1, i - 1).replace(/\"\"/g, \"\\\"\");\n      }\n\n      // Find next delimiter or newline.\n      while (I < N) {\n        if ((c = text.charCodeAt(i = I++)) === NEWLINE) eol = true;\n        else if (c === RETURN) { eol = true; if (text.charCodeAt(I) === NEWLINE) ++I; }\n        else if (c !== DELIMITER) continue;\n        return text.slice(j, i);\n      }\n\n      // Return last token before EOF.\n      return eof = true, text.slice(j, N);\n    }\n\n    while ((t = token()) !== EOF) {\n      var row = [];\n      while (t !== EOL && t !== EOF) row.push(t), t = token();\n      if (f && (row = f(row, n++)) == null) continue;\n      rows.push(row);\n    }\n\n    return rows;\n  }\n\n  function preformatBody(rows, columns) {\n    return rows.map(function(row) {\n      return columns.map(function(column) {\n        return formatValue(row[column]);\n      }).join(delimiter);\n    });\n  }\n\n  function format(rows, columns) {\n    if (columns == null) columns = inferColumns(rows);\n    return [columns.map(formatValue).join(delimiter)].concat(preformatBody(rows, columns)).join(\"\\n\");\n  }\n\n  function formatBody(rows, columns) {\n    if (columns == null) columns = inferColumns(rows);\n    return preformatBody(rows, columns).join(\"\\n\");\n  }\n\n  function formatRows(rows) {\n    return rows.map(formatRow).join(\"\\n\");\n  }\n\n  function formatRow(row) {\n    return row.map(formatValue).join(delimiter);\n  }\n\n  function formatValue(value) {\n    return value == null ? \"\"\n        : value instanceof Date ? formatDate(value)\n        : reFormat.test(value += \"\") ? \"\\\"\" + value.replace(/\"/g, \"\\\"\\\"\") + \"\\\"\"\n        : value;\n  }\n\n  return {\n    parse: parse,\n    parseRows: parseRows,\n    format: format,\n    formatBody: formatBody,\n    formatRows: formatRows,\n    formatRow: formatRow,\n    formatValue: formatValue\n  };\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-fetch/node_modules/d3-dsv/src/index.js\":\n/*!****************************************************************!*\\\n  !*** ./node_modules/d3-fetch/node_modules/d3-dsv/src/index.js ***!\n  \\****************************************************************/\n/*! exports provided: dsvFormat, csvParse, csvParseRows, csvFormat, csvFormatBody, csvFormatRows, csvFormatRow, csvFormatValue, tsvParse, tsvParseRows, tsvFormat, tsvFormatBody, tsvFormatRows, tsvFormatRow, tsvFormatValue, autoType */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _dsv_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./dsv.js */ \"./node_modules/d3-fetch/node_modules/d3-dsv/src/dsv.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"dsvFormat\", function() { return _dsv_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n/* harmony import */ var _csv_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./csv.js */ \"./node_modules/d3-fetch/node_modules/d3-dsv/src/csv.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"csvParse\", function() { return _csv_js__WEBPACK_IMPORTED_MODULE_1__[\"csvParse\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"csvParseRows\", function() { return _csv_js__WEBPACK_IMPORTED_MODULE_1__[\"csvParseRows\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"csvFormat\", function() { return _csv_js__WEBPACK_IMPORTED_MODULE_1__[\"csvFormat\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"csvFormatBody\", function() { return _csv_js__WEBPACK_IMPORTED_MODULE_1__[\"csvFormatBody\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"csvFormatRows\", function() { return _csv_js__WEBPACK_IMPORTED_MODULE_1__[\"csvFormatRows\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"csvFormatRow\", function() { return _csv_js__WEBPACK_IMPORTED_MODULE_1__[\"csvFormatRow\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"csvFormatValue\", function() { return _csv_js__WEBPACK_IMPORTED_MODULE_1__[\"csvFormatValue\"]; });\n\n/* harmony import */ var _tsv_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./tsv.js */ \"./node_modules/d3-fetch/node_modules/d3-dsv/src/tsv.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"tsvParse\", function() { return _tsv_js__WEBPACK_IMPORTED_MODULE_2__[\"tsvParse\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"tsvParseRows\", function() { return _tsv_js__WEBPACK_IMPORTED_MODULE_2__[\"tsvParseRows\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"tsvFormat\", function() { return _tsv_js__WEBPACK_IMPORTED_MODULE_2__[\"tsvFormat\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"tsvFormatBody\", function() { return _tsv_js__WEBPACK_IMPORTED_MODULE_2__[\"tsvFormatBody\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"tsvFormatRows\", function() { return _tsv_js__WEBPACK_IMPORTED_MODULE_2__[\"tsvFormatRows\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"tsvFormatRow\", function() { return _tsv_js__WEBPACK_IMPORTED_MODULE_2__[\"tsvFormatRow\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"tsvFormatValue\", function() { return _tsv_js__WEBPACK_IMPORTED_MODULE_2__[\"tsvFormatValue\"]; });\n\n/* harmony import */ var _autoType_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./autoType.js */ \"./node_modules/d3-fetch/node_modules/d3-dsv/src/autoType.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"autoType\", function() { return _autoType_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"]; });\n\n\n\n\n\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-fetch/node_modules/d3-dsv/src/tsv.js\":\n/*!**************************************************************!*\\\n  !*** ./node_modules/d3-fetch/node_modules/d3-dsv/src/tsv.js ***!\n  \\**************************************************************/\n/*! exports provided: tsvParse, tsvParseRows, tsvFormat, tsvFormatBody, tsvFormatRows, tsvFormatRow, tsvFormatValue */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"tsvParse\", function() { return tsvParse; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"tsvParseRows\", function() { return tsvParseRows; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"tsvFormat\", function() { return tsvFormat; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"tsvFormatBody\", function() { return tsvFormatBody; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"tsvFormatRows\", function() { return tsvFormatRows; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"tsvFormatRow\", function() { return tsvFormatRow; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"tsvFormatValue\", function() { return tsvFormatValue; });\n/* harmony import */ var _dsv_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./dsv.js */ \"./node_modules/d3-fetch/node_modules/d3-dsv/src/dsv.js\");\n\n\nvar tsv = Object(_dsv_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(\"\\t\");\n\nvar tsvParse = tsv.parse;\nvar tsvParseRows = tsv.parseRows;\nvar tsvFormat = tsv.format;\nvar tsvFormatBody = tsv.formatBody;\nvar tsvFormatRows = tsv.formatRows;\nvar tsvFormatRow = tsv.formatRow;\nvar tsvFormatValue = tsv.formatValue;\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-fetch/src/blob.js\":\n/*!*******************************************!*\\\n  !*** ./node_modules/d3-fetch/src/blob.js ***!\n  \\*******************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\nfunction responseBlob(response) {\n  if (!response.ok) throw new Error(response.status + \" \" + response.statusText);\n  return response.blob();\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(input, init) {\n  return fetch(input, init).then(responseBlob);\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-fetch/src/buffer.js\":\n/*!*********************************************!*\\\n  !*** ./node_modules/d3-fetch/src/buffer.js ***!\n  \\*********************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\nfunction responseArrayBuffer(response) {\n  if (!response.ok) throw new Error(response.status + \" \" + response.statusText);\n  return response.arrayBuffer();\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(input, init) {\n  return fetch(input, init).then(responseArrayBuffer);\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-fetch/src/dsv.js\":\n/*!******************************************!*\\\n  !*** ./node_modules/d3-fetch/src/dsv.js ***!\n  \\******************************************/\n/*! exports provided: default, csv, tsv */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return dsv; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"csv\", function() { return csv; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"tsv\", function() { return tsv; });\n/* harmony import */ var d3_dsv__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-dsv */ \"./node_modules/d3-fetch/node_modules/d3-dsv/src/index.js\");\n/* harmony import */ var _text_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./text.js */ \"./node_modules/d3-fetch/src/text.js\");\n\n\n\nfunction dsvParse(parse) {\n  return function(input, init, row) {\n    if (arguments.length === 2 && typeof init === \"function\") row = init, init = undefined;\n    return Object(_text_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(input, init).then(function(response) {\n      return parse(response, row);\n    });\n  };\n}\n\nfunction dsv(delimiter, input, init, row) {\n  if (arguments.length === 3 && typeof init === \"function\") row = init, init = undefined;\n  var format = Object(d3_dsv__WEBPACK_IMPORTED_MODULE_0__[\"dsvFormat\"])(delimiter);\n  return Object(_text_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(input, init).then(function(response) {\n    return format.parse(response, row);\n  });\n}\n\nvar csv = dsvParse(d3_dsv__WEBPACK_IMPORTED_MODULE_0__[\"csvParse\"]);\nvar tsv = dsvParse(d3_dsv__WEBPACK_IMPORTED_MODULE_0__[\"tsvParse\"]);\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-fetch/src/image.js\":\n/*!********************************************!*\\\n  !*** ./node_modules/d3-fetch/src/image.js ***!\n  \\********************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(input, init) {\n  return new Promise(function(resolve, reject) {\n    var image = new Image;\n    for (var key in init) image[key] = init[key];\n    image.onerror = reject;\n    image.onload = function() { resolve(image); };\n    image.src = input;\n  });\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-fetch/src/index.js\":\n/*!********************************************!*\\\n  !*** ./node_modules/d3-fetch/src/index.js ***!\n  \\********************************************/\n/*! exports provided: blob, buffer, dsv, csv, tsv, image, json, text, xml, html, svg */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _blob_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./blob.js */ \"./node_modules/d3-fetch/src/blob.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"blob\", function() { return _blob_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n/* harmony import */ var _buffer_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./buffer.js */ \"./node_modules/d3-fetch/src/buffer.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"buffer\", function() { return _buffer_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"]; });\n\n/* harmony import */ var _dsv_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./dsv.js */ \"./node_modules/d3-fetch/src/dsv.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"dsv\", function() { return _dsv_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"csv\", function() { return _dsv_js__WEBPACK_IMPORTED_MODULE_2__[\"csv\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"tsv\", function() { return _dsv_js__WEBPACK_IMPORTED_MODULE_2__[\"tsv\"]; });\n\n/* harmony import */ var _image_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./image.js */ \"./node_modules/d3-fetch/src/image.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"image\", function() { return _image_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"]; });\n\n/* harmony import */ var _json_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./json.js */ \"./node_modules/d3-fetch/src/json.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"json\", function() { return _json_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"]; });\n\n/* harmony import */ var _text_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./text.js */ \"./node_modules/d3-fetch/src/text.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"text\", function() { return _text_js__WEBPACK_IMPORTED_MODULE_5__[\"default\"]; });\n\n/* harmony import */ var _xml_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./xml.js */ \"./node_modules/d3-fetch/src/xml.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"xml\", function() { return _xml_js__WEBPACK_IMPORTED_MODULE_6__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"html\", function() { return _xml_js__WEBPACK_IMPORTED_MODULE_6__[\"html\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"svg\", function() { return _xml_js__WEBPACK_IMPORTED_MODULE_6__[\"svg\"]; });\n\n\n\n\n\n\n\n\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-fetch/src/json.js\":\n/*!*******************************************!*\\\n  !*** ./node_modules/d3-fetch/src/json.js ***!\n  \\*******************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\nfunction responseJson(response) {\n  if (!response.ok) throw new Error(response.status + \" \" + response.statusText);\n  if (response.status === 204 || response.status === 205) return;\n  return response.json();\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(input, init) {\n  return fetch(input, init).then(responseJson);\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-fetch/src/text.js\":\n/*!*******************************************!*\\\n  !*** ./node_modules/d3-fetch/src/text.js ***!\n  \\*******************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\nfunction responseText(response) {\n  if (!response.ok) throw new Error(response.status + \" \" + response.statusText);\n  return response.text();\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(input, init) {\n  return fetch(input, init).then(responseText);\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-fetch/src/xml.js\":\n/*!******************************************!*\\\n  !*** ./node_modules/d3-fetch/src/xml.js ***!\n  \\******************************************/\n/*! exports provided: default, html, svg */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"html\", function() { return html; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"svg\", function() { return svg; });\n/* harmony import */ var _text_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./text.js */ \"./node_modules/d3-fetch/src/text.js\");\n\n\nfunction parser(type) {\n  return (input, init) => Object(_text_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(input, init)\n    .then(text => (new DOMParser).parseFromString(text, type));\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (parser(\"application/xml\"));\n\nvar html = parser(\"text/html\");\n\nvar svg = parser(\"image/svg+xml\");\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-force/node_modules/d3-dispatch/src/dispatch.js\":\n/*!************************************************************************!*\\\n  !*** ./node_modules/d3-force/node_modules/d3-dispatch/src/dispatch.js ***!\n  \\************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\nvar noop = {value: () => {}};\n\nfunction dispatch() {\n  for (var i = 0, n = arguments.length, _ = {}, t; i < n; ++i) {\n    if (!(t = arguments[i] + \"\") || (t in _) || /[\\s.]/.test(t)) throw new Error(\"illegal type: \" + t);\n    _[t] = [];\n  }\n  return new Dispatch(_);\n}\n\nfunction Dispatch(_) {\n  this._ = _;\n}\n\nfunction parseTypenames(typenames, types) {\n  return typenames.trim().split(/^|\\s+/).map(function(t) {\n    var name = \"\", i = t.indexOf(\".\");\n    if (i >= 0) name = t.slice(i + 1), t = t.slice(0, i);\n    if (t && !types.hasOwnProperty(t)) throw new Error(\"unknown type: \" + t);\n    return {type: t, name: name};\n  });\n}\n\nDispatch.prototype = dispatch.prototype = {\n  constructor: Dispatch,\n  on: function(typename, callback) {\n    var _ = this._,\n        T = parseTypenames(typename + \"\", _),\n        t,\n        i = -1,\n        n = T.length;\n\n    // If no callback was specified, return the callback of the given type and name.\n    if (arguments.length < 2) {\n      while (++i < n) if ((t = (typename = T[i]).type) && (t = get(_[t], typename.name))) return t;\n      return;\n    }\n\n    // If a type was specified, set the callback for the given type and name.\n    // Otherwise, if a null callback was specified, remove callbacks of the given name.\n    if (callback != null && typeof callback !== \"function\") throw new Error(\"invalid callback: \" + callback);\n    while (++i < n) {\n      if (t = (typename = T[i]).type) _[t] = set(_[t], typename.name, callback);\n      else if (callback == null) for (t in _) _[t] = set(_[t], typename.name, null);\n    }\n\n    return this;\n  },\n  copy: function() {\n    var copy = {}, _ = this._;\n    for (var t in _) copy[t] = _[t].slice();\n    return new Dispatch(copy);\n  },\n  call: function(type, that) {\n    if ((n = arguments.length - 2) > 0) for (var args = new Array(n), i = 0, n, t; i < n; ++i) args[i] = arguments[i + 2];\n    if (!this._.hasOwnProperty(type)) throw new Error(\"unknown type: \" + type);\n    for (t = this._[type], i = 0, n = t.length; i < n; ++i) t[i].value.apply(that, args);\n  },\n  apply: function(type, that, args) {\n    if (!this._.hasOwnProperty(type)) throw new Error(\"unknown type: \" + type);\n    for (var t = this._[type], i = 0, n = t.length; i < n; ++i) t[i].value.apply(that, args);\n  }\n};\n\nfunction get(type, name) {\n  for (var i = 0, n = type.length, c; i < n; ++i) {\n    if ((c = type[i]).name === name) {\n      return c.value;\n    }\n  }\n}\n\nfunction set(type, name, callback) {\n  for (var i = 0, n = type.length; i < n; ++i) {\n    if (type[i].name === name) {\n      type[i] = noop, type = type.slice(0, i).concat(type.slice(i + 1));\n      break;\n    }\n  }\n  if (callback != null) type.push({name: name, value: callback});\n  return type;\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (dispatch);\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-force/node_modules/d3-dispatch/src/index.js\":\n/*!*********************************************************************!*\\\n  !*** ./node_modules/d3-force/node_modules/d3-dispatch/src/index.js ***!\n  \\*********************************************************************/\n/*! exports provided: dispatch */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _dispatch_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./dispatch.js */ \"./node_modules/d3-force/node_modules/d3-dispatch/src/dispatch.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"dispatch\", function() { return _dispatch_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-force/node_modules/d3-quadtree/src/add.js\":\n/*!*******************************************************************!*\\\n  !*** ./node_modules/d3-force/node_modules/d3-quadtree/src/add.js ***!\n  \\*******************************************************************/\n/*! exports provided: default, addAll */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"addAll\", function() { return addAll; });\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(d) {\n  const x = +this._x.call(null, d),\n      y = +this._y.call(null, d);\n  return add(this.cover(x, y), x, y, d);\n});\n\nfunction add(tree, x, y, d) {\n  if (isNaN(x) || isNaN(y)) return tree; // ignore invalid points\n\n  var parent,\n      node = tree._root,\n      leaf = {data: d},\n      x0 = tree._x0,\n      y0 = tree._y0,\n      x1 = tree._x1,\n      y1 = tree._y1,\n      xm,\n      ym,\n      xp,\n      yp,\n      right,\n      bottom,\n      i,\n      j;\n\n  // If the tree is empty, initialize the root as a leaf.\n  if (!node) return tree._root = leaf, tree;\n\n  // Find the existing leaf for the new point, or add it.\n  while (node.length) {\n    if (right = x >= (xm = (x0 + x1) / 2)) x0 = xm; else x1 = xm;\n    if (bottom = y >= (ym = (y0 + y1) / 2)) y0 = ym; else y1 = ym;\n    if (parent = node, !(node = node[i = bottom << 1 | right])) return parent[i] = leaf, tree;\n  }\n\n  // Is the new point is exactly coincident with the existing point?\n  xp = +tree._x.call(null, node.data);\n  yp = +tree._y.call(null, node.data);\n  if (x === xp && y === yp) return leaf.next = node, parent ? parent[i] = leaf : tree._root = leaf, tree;\n\n  // Otherwise, split the leaf node until the old and new point are separated.\n  do {\n    parent = parent ? parent[i] = new Array(4) : tree._root = new Array(4);\n    if (right = x >= (xm = (x0 + x1) / 2)) x0 = xm; else x1 = xm;\n    if (bottom = y >= (ym = (y0 + y1) / 2)) y0 = ym; else y1 = ym;\n  } while ((i = bottom << 1 | right) === (j = (yp >= ym) << 1 | (xp >= xm)));\n  return parent[j] = node, parent[i] = leaf, tree;\n}\n\nfunction addAll(data) {\n  var d, i, n = data.length,\n      x,\n      y,\n      xz = new Array(n),\n      yz = new Array(n),\n      x0 = Infinity,\n      y0 = Infinity,\n      x1 = -Infinity,\n      y1 = -Infinity;\n\n  // Compute the points and their extent.\n  for (i = 0; i < n; ++i) {\n    if (isNaN(x = +this._x.call(null, d = data[i])) || isNaN(y = +this._y.call(null, d))) continue;\n    xz[i] = x;\n    yz[i] = y;\n    if (x < x0) x0 = x;\n    if (x > x1) x1 = x;\n    if (y < y0) y0 = y;\n    if (y > y1) y1 = y;\n  }\n\n  // If there were no (valid) points, abort.\n  if (x0 > x1 || y0 > y1) return this;\n\n  // Expand the tree to cover the new points.\n  this.cover(x0, y0).cover(x1, y1);\n\n  // Add the new points.\n  for (i = 0; i < n; ++i) {\n    add(this, xz[i], yz[i], data[i]);\n  }\n\n  return this;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-force/node_modules/d3-quadtree/src/cover.js\":\n/*!*********************************************************************!*\\\n  !*** ./node_modules/d3-force/node_modules/d3-quadtree/src/cover.js ***!\n  \\*********************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(x, y) {\n  if (isNaN(x = +x) || isNaN(y = +y)) return this; // ignore invalid points\n\n  var x0 = this._x0,\n      y0 = this._y0,\n      x1 = this._x1,\n      y1 = this._y1;\n\n  // If the quadtree has no extent, initialize them.\n  // Integer extent are necessary so that if we later double the extent,\n  // the existing quadrant boundaries don’t change due to floating point error!\n  if (isNaN(x0)) {\n    x1 = (x0 = Math.floor(x)) + 1;\n    y1 = (y0 = Math.floor(y)) + 1;\n  }\n\n  // Otherwise, double repeatedly to cover.\n  else {\n    var z = x1 - x0 || 1,\n        node = this._root,\n        parent,\n        i;\n\n    while (x0 > x || x >= x1 || y0 > y || y >= y1) {\n      i = (y < y0) << 1 | (x < x0);\n      parent = new Array(4), parent[i] = node, node = parent, z *= 2;\n      switch (i) {\n        case 0: x1 = x0 + z, y1 = y0 + z; break;\n        case 1: x0 = x1 - z, y1 = y0 + z; break;\n        case 2: x1 = x0 + z, y0 = y1 - z; break;\n        case 3: x0 = x1 - z, y0 = y1 - z; break;\n      }\n    }\n\n    if (this._root && this._root.length) this._root = node;\n  }\n\n  this._x0 = x0;\n  this._y0 = y0;\n  this._x1 = x1;\n  this._y1 = y1;\n  return this;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-force/node_modules/d3-quadtree/src/data.js\":\n/*!********************************************************************!*\\\n  !*** ./node_modules/d3-force/node_modules/d3-quadtree/src/data.js ***!\n  \\********************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  var data = [];\n  this.visit(function(node) {\n    if (!node.length) do data.push(node.data); while (node = node.next)\n  });\n  return data;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-force/node_modules/d3-quadtree/src/extent.js\":\n/*!**********************************************************************!*\\\n  !*** ./node_modules/d3-force/node_modules/d3-quadtree/src/extent.js ***!\n  \\**********************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(_) {\n  return arguments.length\n      ? this.cover(+_[0][0], +_[0][1]).cover(+_[1][0], +_[1][1])\n      : isNaN(this._x0) ? undefined : [[this._x0, this._y0], [this._x1, this._y1]];\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-force/node_modules/d3-quadtree/src/find.js\":\n/*!********************************************************************!*\\\n  !*** ./node_modules/d3-force/node_modules/d3-quadtree/src/find.js ***!\n  \\********************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _quad_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./quad.js */ \"./node_modules/d3-force/node_modules/d3-quadtree/src/quad.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(x, y, radius) {\n  var data,\n      x0 = this._x0,\n      y0 = this._y0,\n      x1,\n      y1,\n      x2,\n      y2,\n      x3 = this._x1,\n      y3 = this._y1,\n      quads = [],\n      node = this._root,\n      q,\n      i;\n\n  if (node) quads.push(new _quad_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"](node, x0, y0, x3, y3));\n  if (radius == null) radius = Infinity;\n  else {\n    x0 = x - radius, y0 = y - radius;\n    x3 = x + radius, y3 = y + radius;\n    radius *= radius;\n  }\n\n  while (q = quads.pop()) {\n\n    // Stop searching if this quadrant can’t contain a closer node.\n    if (!(node = q.node)\n        || (x1 = q.x0) > x3\n        || (y1 = q.y0) > y3\n        || (x2 = q.x1) < x0\n        || (y2 = q.y1) < y0) continue;\n\n    // Bisect the current quadrant.\n    if (node.length) {\n      var xm = (x1 + x2) / 2,\n          ym = (y1 + y2) / 2;\n\n      quads.push(\n        new _quad_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"](node[3], xm, ym, x2, y2),\n        new _quad_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"](node[2], x1, ym, xm, y2),\n        new _quad_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"](node[1], xm, y1, x2, ym),\n        new _quad_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"](node[0], x1, y1, xm, ym)\n      );\n\n      // Visit the closest quadrant first.\n      if (i = (y >= ym) << 1 | (x >= xm)) {\n        q = quads[quads.length - 1];\n        quads[quads.length - 1] = quads[quads.length - 1 - i];\n        quads[quads.length - 1 - i] = q;\n      }\n    }\n\n    // Visit this point. (Visiting coincident points isn’t necessary!)\n    else {\n      var dx = x - +this._x.call(null, node.data),\n          dy = y - +this._y.call(null, node.data),\n          d2 = dx * dx + dy * dy;\n      if (d2 < radius) {\n        var d = Math.sqrt(radius = d2);\n        x0 = x - d, y0 = y - d;\n        x3 = x + d, y3 = y + d;\n        data = node.data;\n      }\n    }\n  }\n\n  return data;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-force/node_modules/d3-quadtree/src/index.js\":\n/*!*********************************************************************!*\\\n  !*** ./node_modules/d3-force/node_modules/d3-quadtree/src/index.js ***!\n  \\*********************************************************************/\n/*! exports provided: quadtree */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _quadtree_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./quadtree.js */ \"./node_modules/d3-force/node_modules/d3-quadtree/src/quadtree.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"quadtree\", function() { return _quadtree_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-force/node_modules/d3-quadtree/src/quad.js\":\n/*!********************************************************************!*\\\n  !*** ./node_modules/d3-force/node_modules/d3-quadtree/src/quad.js ***!\n  \\********************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(node, x0, y0, x1, y1) {\n  this.node = node;\n  this.x0 = x0;\n  this.y0 = y0;\n  this.x1 = x1;\n  this.y1 = y1;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-force/node_modules/d3-quadtree/src/quadtree.js\":\n/*!************************************************************************!*\\\n  !*** ./node_modules/d3-force/node_modules/d3-quadtree/src/quadtree.js ***!\n  \\************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return quadtree; });\n/* harmony import */ var _add_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./add.js */ \"./node_modules/d3-force/node_modules/d3-quadtree/src/add.js\");\n/* harmony import */ var _cover_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./cover.js */ \"./node_modules/d3-force/node_modules/d3-quadtree/src/cover.js\");\n/* harmony import */ var _data_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./data.js */ \"./node_modules/d3-force/node_modules/d3-quadtree/src/data.js\");\n/* harmony import */ var _extent_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./extent.js */ \"./node_modules/d3-force/node_modules/d3-quadtree/src/extent.js\");\n/* harmony import */ var _find_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./find.js */ \"./node_modules/d3-force/node_modules/d3-quadtree/src/find.js\");\n/* harmony import */ var _remove_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./remove.js */ \"./node_modules/d3-force/node_modules/d3-quadtree/src/remove.js\");\n/* harmony import */ var _root_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./root.js */ \"./node_modules/d3-force/node_modules/d3-quadtree/src/root.js\");\n/* harmony import */ var _size_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./size.js */ \"./node_modules/d3-force/node_modules/d3-quadtree/src/size.js\");\n/* harmony import */ var _visit_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./visit.js */ \"./node_modules/d3-force/node_modules/d3-quadtree/src/visit.js\");\n/* harmony import */ var _visitAfter_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./visitAfter.js */ \"./node_modules/d3-force/node_modules/d3-quadtree/src/visitAfter.js\");\n/* harmony import */ var _x_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./x.js */ \"./node_modules/d3-force/node_modules/d3-quadtree/src/x.js\");\n/* harmony import */ var _y_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./y.js */ \"./node_modules/d3-force/node_modules/d3-quadtree/src/y.js\");\n\n\n\n\n\n\n\n\n\n\n\n\n\nfunction quadtree(nodes, x, y) {\n  var tree = new Quadtree(x == null ? _x_js__WEBPACK_IMPORTED_MODULE_10__[\"defaultX\"] : x, y == null ? _y_js__WEBPACK_IMPORTED_MODULE_11__[\"defaultY\"] : y, NaN, NaN, NaN, NaN);\n  return nodes == null ? tree : tree.addAll(nodes);\n}\n\nfunction Quadtree(x, y, x0, y0, x1, y1) {\n  this._x = x;\n  this._y = y;\n  this._x0 = x0;\n  this._y0 = y0;\n  this._x1 = x1;\n  this._y1 = y1;\n  this._root = undefined;\n}\n\nfunction leaf_copy(leaf) {\n  var copy = {data: leaf.data}, next = copy;\n  while (leaf = leaf.next) next = next.next = {data: leaf.data};\n  return copy;\n}\n\nvar treeProto = quadtree.prototype = Quadtree.prototype;\n\ntreeProto.copy = function() {\n  var copy = new Quadtree(this._x, this._y, this._x0, this._y0, this._x1, this._y1),\n      node = this._root,\n      nodes,\n      child;\n\n  if (!node) return copy;\n\n  if (!node.length) return copy._root = leaf_copy(node), copy;\n\n  nodes = [{source: node, target: copy._root = new Array(4)}];\n  while (node = nodes.pop()) {\n    for (var i = 0; i < 4; ++i) {\n      if (child = node.source[i]) {\n        if (child.length) nodes.push({source: child, target: node.target[i] = new Array(4)});\n        else node.target[i] = leaf_copy(child);\n      }\n    }\n  }\n\n  return copy;\n};\n\ntreeProto.add = _add_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"];\ntreeProto.addAll = _add_js__WEBPACK_IMPORTED_MODULE_0__[\"addAll\"];\ntreeProto.cover = _cover_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"];\ntreeProto.data = _data_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"];\ntreeProto.extent = _extent_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"];\ntreeProto.find = _find_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"];\ntreeProto.remove = _remove_js__WEBPACK_IMPORTED_MODULE_5__[\"default\"];\ntreeProto.removeAll = _remove_js__WEBPACK_IMPORTED_MODULE_5__[\"removeAll\"];\ntreeProto.root = _root_js__WEBPACK_IMPORTED_MODULE_6__[\"default\"];\ntreeProto.size = _size_js__WEBPACK_IMPORTED_MODULE_7__[\"default\"];\ntreeProto.visit = _visit_js__WEBPACK_IMPORTED_MODULE_8__[\"default\"];\ntreeProto.visitAfter = _visitAfter_js__WEBPACK_IMPORTED_MODULE_9__[\"default\"];\ntreeProto.x = _x_js__WEBPACK_IMPORTED_MODULE_10__[\"default\"];\ntreeProto.y = _y_js__WEBPACK_IMPORTED_MODULE_11__[\"default\"];\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-force/node_modules/d3-quadtree/src/remove.js\":\n/*!**********************************************************************!*\\\n  !*** ./node_modules/d3-force/node_modules/d3-quadtree/src/remove.js ***!\n  \\**********************************************************************/\n/*! exports provided: default, removeAll */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"removeAll\", function() { return removeAll; });\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(d) {\n  if (isNaN(x = +this._x.call(null, d)) || isNaN(y = +this._y.call(null, d))) return this; // ignore invalid points\n\n  var parent,\n      node = this._root,\n      retainer,\n      previous,\n      next,\n      x0 = this._x0,\n      y0 = this._y0,\n      x1 = this._x1,\n      y1 = this._y1,\n      x,\n      y,\n      xm,\n      ym,\n      right,\n      bottom,\n      i,\n      j;\n\n  // If the tree is empty, initialize the root as a leaf.\n  if (!node) return this;\n\n  // Find the leaf node for the point.\n  // While descending, also retain the deepest parent with a non-removed sibling.\n  if (node.length) while (true) {\n    if (right = x >= (xm = (x0 + x1) / 2)) x0 = xm; else x1 = xm;\n    if (bottom = y >= (ym = (y0 + y1) / 2)) y0 = ym; else y1 = ym;\n    if (!(parent = node, node = node[i = bottom << 1 | right])) return this;\n    if (!node.length) break;\n    if (parent[(i + 1) & 3] || parent[(i + 2) & 3] || parent[(i + 3) & 3]) retainer = parent, j = i;\n  }\n\n  // Find the point to remove.\n  while (node.data !== d) if (!(previous = node, node = node.next)) return this;\n  if (next = node.next) delete node.next;\n\n  // If there are multiple coincident points, remove just the point.\n  if (previous) return (next ? previous.next = next : delete previous.next), this;\n\n  // If this is the root point, remove it.\n  if (!parent) return this._root = next, this;\n\n  // Remove this leaf.\n  next ? parent[i] = next : delete parent[i];\n\n  // If the parent now contains exactly one leaf, collapse superfluous parents.\n  if ((node = parent[0] || parent[1] || parent[2] || parent[3])\n      && node === (parent[3] || parent[2] || parent[1] || parent[0])\n      && !node.length) {\n    if (retainer) retainer[j] = node;\n    else this._root = node;\n  }\n\n  return this;\n});\n\nfunction removeAll(data) {\n  for (var i = 0, n = data.length; i < n; ++i) this.remove(data[i]);\n  return this;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-force/node_modules/d3-quadtree/src/root.js\":\n/*!********************************************************************!*\\\n  !*** ./node_modules/d3-force/node_modules/d3-quadtree/src/root.js ***!\n  \\********************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  return this._root;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-force/node_modules/d3-quadtree/src/size.js\":\n/*!********************************************************************!*\\\n  !*** ./node_modules/d3-force/node_modules/d3-quadtree/src/size.js ***!\n  \\********************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  var size = 0;\n  this.visit(function(node) {\n    if (!node.length) do ++size; while (node = node.next)\n  });\n  return size;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-force/node_modules/d3-quadtree/src/visit.js\":\n/*!*********************************************************************!*\\\n  !*** ./node_modules/d3-force/node_modules/d3-quadtree/src/visit.js ***!\n  \\*********************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _quad_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./quad.js */ \"./node_modules/d3-force/node_modules/d3-quadtree/src/quad.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(callback) {\n  var quads = [], q, node = this._root, child, x0, y0, x1, y1;\n  if (node) quads.push(new _quad_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"](node, this._x0, this._y0, this._x1, this._y1));\n  while (q = quads.pop()) {\n    if (!callback(node = q.node, x0 = q.x0, y0 = q.y0, x1 = q.x1, y1 = q.y1) && node.length) {\n      var xm = (x0 + x1) / 2, ym = (y0 + y1) / 2;\n      if (child = node[3]) quads.push(new _quad_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"](child, xm, ym, x1, y1));\n      if (child = node[2]) quads.push(new _quad_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"](child, x0, ym, xm, y1));\n      if (child = node[1]) quads.push(new _quad_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"](child, xm, y0, x1, ym));\n      if (child = node[0]) quads.push(new _quad_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"](child, x0, y0, xm, ym));\n    }\n  }\n  return this;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-force/node_modules/d3-quadtree/src/visitAfter.js\":\n/*!**************************************************************************!*\\\n  !*** ./node_modules/d3-force/node_modules/d3-quadtree/src/visitAfter.js ***!\n  \\**************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _quad_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./quad.js */ \"./node_modules/d3-force/node_modules/d3-quadtree/src/quad.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(callback) {\n  var quads = [], next = [], q;\n  if (this._root) quads.push(new _quad_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"](this._root, this._x0, this._y0, this._x1, this._y1));\n  while (q = quads.pop()) {\n    var node = q.node;\n    if (node.length) {\n      var child, x0 = q.x0, y0 = q.y0, x1 = q.x1, y1 = q.y1, xm = (x0 + x1) / 2, ym = (y0 + y1) / 2;\n      if (child = node[0]) quads.push(new _quad_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"](child, x0, y0, xm, ym));\n      if (child = node[1]) quads.push(new _quad_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"](child, xm, y0, x1, ym));\n      if (child = node[2]) quads.push(new _quad_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"](child, x0, ym, xm, y1));\n      if (child = node[3]) quads.push(new _quad_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"](child, xm, ym, x1, y1));\n    }\n    next.push(q);\n  }\n  while (q = next.pop()) {\n    callback(q.node, q.x0, q.y0, q.x1, q.y1);\n  }\n  return this;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-force/node_modules/d3-quadtree/src/x.js\":\n/*!*****************************************************************!*\\\n  !*** ./node_modules/d3-force/node_modules/d3-quadtree/src/x.js ***!\n  \\*****************************************************************/\n/*! exports provided: defaultX, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"defaultX\", function() { return defaultX; });\nfunction defaultX(d) {\n  return d[0];\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(_) {\n  return arguments.length ? (this._x = _, this) : this._x;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-force/node_modules/d3-quadtree/src/y.js\":\n/*!*****************************************************************!*\\\n  !*** ./node_modules/d3-force/node_modules/d3-quadtree/src/y.js ***!\n  \\*****************************************************************/\n/*! exports provided: defaultY, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"defaultY\", function() { return defaultY; });\nfunction defaultY(d) {\n  return d[1];\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(_) {\n  return arguments.length ? (this._y = _, this) : this._y;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-force/node_modules/d3-timer/src/index.js\":\n/*!******************************************************************!*\\\n  !*** ./node_modules/d3-force/node_modules/d3-timer/src/index.js ***!\n  \\******************************************************************/\n/*! exports provided: now, timer, timerFlush, timeout, interval */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _timer_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./timer.js */ \"./node_modules/d3-force/node_modules/d3-timer/src/timer.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"now\", function() { return _timer_js__WEBPACK_IMPORTED_MODULE_0__[\"now\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timer\", function() { return _timer_js__WEBPACK_IMPORTED_MODULE_0__[\"timer\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timerFlush\", function() { return _timer_js__WEBPACK_IMPORTED_MODULE_0__[\"timerFlush\"]; });\n\n/* harmony import */ var _timeout_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./timeout.js */ \"./node_modules/d3-force/node_modules/d3-timer/src/timeout.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeout\", function() { return _timeout_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"]; });\n\n/* harmony import */ var _interval_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./interval.js */ \"./node_modules/d3-force/node_modules/d3-timer/src/interval.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interval\", function() { return _interval_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"]; });\n\n\n\n\n\n\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-force/node_modules/d3-timer/src/interval.js\":\n/*!*********************************************************************!*\\\n  !*** ./node_modules/d3-force/node_modules/d3-timer/src/interval.js ***!\n  \\*********************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _timer_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./timer.js */ \"./node_modules/d3-force/node_modules/d3-timer/src/timer.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(callback, delay, time) {\n  var t = new _timer_js__WEBPACK_IMPORTED_MODULE_0__[\"Timer\"], total = delay;\n  if (delay == null) return t.restart(callback, delay, time), t;\n  t._restart = t.restart;\n  t.restart = function(callback, delay, time) {\n    delay = +delay, time = time == null ? Object(_timer_js__WEBPACK_IMPORTED_MODULE_0__[\"now\"])() : +time;\n    t._restart(function tick(elapsed) {\n      elapsed += total;\n      t._restart(tick, total += delay, time);\n      callback(elapsed);\n    }, delay, time);\n  }\n  t.restart(callback, delay, time);\n  return t;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-force/node_modules/d3-timer/src/timeout.js\":\n/*!********************************************************************!*\\\n  !*** ./node_modules/d3-force/node_modules/d3-timer/src/timeout.js ***!\n  \\********************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _timer_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./timer.js */ \"./node_modules/d3-force/node_modules/d3-timer/src/timer.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(callback, delay, time) {\n  var t = new _timer_js__WEBPACK_IMPORTED_MODULE_0__[\"Timer\"];\n  delay = delay == null ? 0 : +delay;\n  t.restart(elapsed => {\n    t.stop();\n    callback(elapsed + delay);\n  }, delay, time);\n  return t;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-force/node_modules/d3-timer/src/timer.js\":\n/*!******************************************************************!*\\\n  !*** ./node_modules/d3-force/node_modules/d3-timer/src/timer.js ***!\n  \\******************************************************************/\n/*! exports provided: now, Timer, timer, timerFlush */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"now\", function() { return now; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Timer\", function() { return Timer; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"timer\", function() { return timer; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"timerFlush\", function() { return timerFlush; });\nvar frame = 0, // is an animation frame pending?\n    timeout = 0, // is a timeout pending?\n    interval = 0, // are any timers active?\n    pokeDelay = 1000, // how frequently we check for clock skew\n    taskHead,\n    taskTail,\n    clockLast = 0,\n    clockNow = 0,\n    clockSkew = 0,\n    clock = typeof performance === \"object\" && performance.now ? performance : Date,\n    setFrame = typeof window === \"object\" && window.requestAnimationFrame ? window.requestAnimationFrame.bind(window) : function(f) { setTimeout(f, 17); };\n\nfunction now() {\n  return clockNow || (setFrame(clearNow), clockNow = clock.now() + clockSkew);\n}\n\nfunction clearNow() {\n  clockNow = 0;\n}\n\nfunction Timer() {\n  this._call =\n  this._time =\n  this._next = null;\n}\n\nTimer.prototype = timer.prototype = {\n  constructor: Timer,\n  restart: function(callback, delay, time) {\n    if (typeof callback !== \"function\") throw new TypeError(\"callback is not a function\");\n    time = (time == null ? now() : +time) + (delay == null ? 0 : +delay);\n    if (!this._next && taskTail !== this) {\n      if (taskTail) taskTail._next = this;\n      else taskHead = this;\n      taskTail = this;\n    }\n    this._call = callback;\n    this._time = time;\n    sleep();\n  },\n  stop: function() {\n    if (this._call) {\n      this._call = null;\n      this._time = Infinity;\n      sleep();\n    }\n  }\n};\n\nfunction timer(callback, delay, time) {\n  var t = new Timer;\n  t.restart(callback, delay, time);\n  return t;\n}\n\nfunction timerFlush() {\n  now(); // Get the current time, if not already set.\n  ++frame; // Pretend we’ve set an alarm, if we haven’t already.\n  var t = taskHead, e;\n  while (t) {\n    if ((e = clockNow - t._time) >= 0) t._call.call(undefined, e);\n    t = t._next;\n  }\n  --frame;\n}\n\nfunction wake() {\n  clockNow = (clockLast = clock.now()) + clockSkew;\n  frame = timeout = 0;\n  try {\n    timerFlush();\n  } finally {\n    frame = 0;\n    nap();\n    clockNow = 0;\n  }\n}\n\nfunction poke() {\n  var now = clock.now(), delay = now - clockLast;\n  if (delay > pokeDelay) clockSkew -= delay, clockLast = now;\n}\n\nfunction nap() {\n  var t0, t1 = taskHead, t2, time = Infinity;\n  while (t1) {\n    if (t1._call) {\n      if (time > t1._time) time = t1._time;\n      t0 = t1, t1 = t1._next;\n    } else {\n      t2 = t1._next, t1._next = null;\n      t1 = t0 ? t0._next = t2 : taskHead = t2;\n    }\n  }\n  taskTail = t0;\n  sleep(time);\n}\n\nfunction sleep(time) {\n  if (frame) return; // Soonest alarm already set, or will be.\n  if (timeout) timeout = clearTimeout(timeout);\n  var delay = time - clockNow; // Strictly less than if we recomputed clockNow.\n  if (delay > 24) {\n    if (time < Infinity) timeout = setTimeout(wake, time - clock.now() - clockSkew);\n    if (interval) interval = clearInterval(interval);\n  } else {\n    if (!interval) clockLast = clock.now(), interval = setInterval(poke, pokeDelay);\n    frame = 1, setFrame(wake);\n  }\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-force/src/center.js\":\n/*!*********************************************!*\\\n  !*** ./node_modules/d3-force/src/center.js ***!\n  \\*********************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(x, y) {\n  var nodes, strength = 1;\n\n  if (x == null) x = 0;\n  if (y == null) y = 0;\n\n  function force() {\n    var i,\n        n = nodes.length,\n        node,\n        sx = 0,\n        sy = 0;\n\n    for (i = 0; i < n; ++i) {\n      node = nodes[i], sx += node.x, sy += node.y;\n    }\n\n    for (sx = (sx / n - x) * strength, sy = (sy / n - y) * strength, i = 0; i < n; ++i) {\n      node = nodes[i], node.x -= sx, node.y -= sy;\n    }\n  }\n\n  force.initialize = function(_) {\n    nodes = _;\n  };\n\n  force.x = function(_) {\n    return arguments.length ? (x = +_, force) : x;\n  };\n\n  force.y = function(_) {\n    return arguments.length ? (y = +_, force) : y;\n  };\n\n  force.strength = function(_) {\n    return arguments.length ? (strength = +_, force) : strength;\n  };\n\n  return force;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-force/src/collide.js\":\n/*!**********************************************!*\\\n  !*** ./node_modules/d3-force/src/collide.js ***!\n  \\**********************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var d3_quadtree__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-quadtree */ \"./node_modules/d3-force/node_modules/d3-quadtree/src/index.js\");\n/* harmony import */ var _constant_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./constant.js */ \"./node_modules/d3-force/src/constant.js\");\n/* harmony import */ var _jiggle_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./jiggle.js */ \"./node_modules/d3-force/src/jiggle.js\");\n\n\n\n\nfunction x(d) {\n  return d.x + d.vx;\n}\n\nfunction y(d) {\n  return d.y + d.vy;\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(radius) {\n  var nodes,\n      radii,\n      random,\n      strength = 1,\n      iterations = 1;\n\n  if (typeof radius !== \"function\") radius = Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(radius == null ? 1 : +radius);\n\n  function force() {\n    var i, n = nodes.length,\n        tree,\n        node,\n        xi,\n        yi,\n        ri,\n        ri2;\n\n    for (var k = 0; k < iterations; ++k) {\n      tree = Object(d3_quadtree__WEBPACK_IMPORTED_MODULE_0__[\"quadtree\"])(nodes, x, y).visitAfter(prepare);\n      for (i = 0; i < n; ++i) {\n        node = nodes[i];\n        ri = radii[node.index], ri2 = ri * ri;\n        xi = node.x + node.vx;\n        yi = node.y + node.vy;\n        tree.visit(apply);\n      }\n    }\n\n    function apply(quad, x0, y0, x1, y1) {\n      var data = quad.data, rj = quad.r, r = ri + rj;\n      if (data) {\n        if (data.index > node.index) {\n          var x = xi - data.x - data.vx,\n              y = yi - data.y - data.vy,\n              l = x * x + y * y;\n          if (l < r * r) {\n            if (x === 0) x = Object(_jiggle_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(random), l += x * x;\n            if (y === 0) y = Object(_jiggle_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(random), l += y * y;\n            l = (r - (l = Math.sqrt(l))) / l * strength;\n            node.vx += (x *= l) * (r = (rj *= rj) / (ri2 + rj));\n            node.vy += (y *= l) * r;\n            data.vx -= x * (r = 1 - r);\n            data.vy -= y * r;\n          }\n        }\n        return;\n      }\n      return x0 > xi + r || x1 < xi - r || y0 > yi + r || y1 < yi - r;\n    }\n  }\n\n  function prepare(quad) {\n    if (quad.data) return quad.r = radii[quad.data.index];\n    for (var i = quad.r = 0; i < 4; ++i) {\n      if (quad[i] && quad[i].r > quad.r) {\n        quad.r = quad[i].r;\n      }\n    }\n  }\n\n  function initialize() {\n    if (!nodes) return;\n    var i, n = nodes.length, node;\n    radii = new Array(n);\n    for (i = 0; i < n; ++i) node = nodes[i], radii[node.index] = +radius(node, i, nodes);\n  }\n\n  force.initialize = function(_nodes, _random) {\n    nodes = _nodes;\n    random = _random;\n    initialize();\n  };\n\n  force.iterations = function(_) {\n    return arguments.length ? (iterations = +_, force) : iterations;\n  };\n\n  force.strength = function(_) {\n    return arguments.length ? (strength = +_, force) : strength;\n  };\n\n  force.radius = function(_) {\n    return arguments.length ? (radius = typeof _ === \"function\" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(+_), initialize(), force) : radius;\n  };\n\n  return force;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-force/src/constant.js\":\n/*!***********************************************!*\\\n  !*** ./node_modules/d3-force/src/constant.js ***!\n  \\***********************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(x) {\n  return function() {\n    return x;\n  };\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-force/src/index.js\":\n/*!********************************************!*\\\n  !*** ./node_modules/d3-force/src/index.js ***!\n  \\********************************************/\n/*! exports provided: forceCenter, forceCollide, forceLink, forceManyBody, forceRadial, forceSimulation, forceX, forceY */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _center_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./center.js */ \"./node_modules/d3-force/src/center.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"forceCenter\", function() { return _center_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n/* harmony import */ var _collide_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./collide.js */ \"./node_modules/d3-force/src/collide.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"forceCollide\", function() { return _collide_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"]; });\n\n/* harmony import */ var _link_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./link.js */ \"./node_modules/d3-force/src/link.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"forceLink\", function() { return _link_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"]; });\n\n/* harmony import */ var _manyBody_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./manyBody.js */ \"./node_modules/d3-force/src/manyBody.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"forceManyBody\", function() { return _manyBody_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"]; });\n\n/* harmony import */ var _radial_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./radial.js */ \"./node_modules/d3-force/src/radial.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"forceRadial\", function() { return _radial_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"]; });\n\n/* harmony import */ var _simulation_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./simulation.js */ \"./node_modules/d3-force/src/simulation.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"forceSimulation\", function() { return _simulation_js__WEBPACK_IMPORTED_MODULE_5__[\"default\"]; });\n\n/* harmony import */ var _x_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./x.js */ \"./node_modules/d3-force/src/x.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"forceX\", function() { return _x_js__WEBPACK_IMPORTED_MODULE_6__[\"default\"]; });\n\n/* harmony import */ var _y_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./y.js */ \"./node_modules/d3-force/src/y.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"forceY\", function() { return _y_js__WEBPACK_IMPORTED_MODULE_7__[\"default\"]; });\n\n\n\n\n\n\n\n\n\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-force/src/jiggle.js\":\n/*!*********************************************!*\\\n  !*** ./node_modules/d3-force/src/jiggle.js ***!\n  \\*********************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(random) {\n  return (random() - 0.5) * 1e-6;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-force/src/lcg.js\":\n/*!******************************************!*\\\n  !*** ./node_modules/d3-force/src/lcg.js ***!\n  \\******************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n// https://en.wikipedia.org/wiki/Linear_congruential_generator#Parameters_in_common_use\nconst a = 1664525;\nconst c = 1013904223;\nconst m = 4294967296; // 2^32\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  let s = 1;\n  return () => (s = (a * s + c) % m) / m;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-force/src/link.js\":\n/*!*******************************************!*\\\n  !*** ./node_modules/d3-force/src/link.js ***!\n  \\*******************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _constant_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./constant.js */ \"./node_modules/d3-force/src/constant.js\");\n/* harmony import */ var _jiggle_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./jiggle.js */ \"./node_modules/d3-force/src/jiggle.js\");\n\n\n\nfunction index(d) {\n  return d.index;\n}\n\nfunction find(nodeById, nodeId) {\n  var node = nodeById.get(nodeId);\n  if (!node) throw new Error(\"node not found: \" + nodeId);\n  return node;\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(links) {\n  var id = index,\n      strength = defaultStrength,\n      strengths,\n      distance = Object(_constant_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(30),\n      distances,\n      nodes,\n      count,\n      bias,\n      random,\n      iterations = 1;\n\n  if (links == null) links = [];\n\n  function defaultStrength(link) {\n    return 1 / Math.min(count[link.source.index], count[link.target.index]);\n  }\n\n  function force(alpha) {\n    for (var k = 0, n = links.length; k < iterations; ++k) {\n      for (var i = 0, link, source, target, x, y, l, b; i < n; ++i) {\n        link = links[i], source = link.source, target = link.target;\n        x = target.x + target.vx - source.x - source.vx || Object(_jiggle_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(random);\n        y = target.y + target.vy - source.y - source.vy || Object(_jiggle_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(random);\n        l = Math.sqrt(x * x + y * y);\n        l = (l - distances[i]) / l * alpha * strengths[i];\n        x *= l, y *= l;\n        target.vx -= x * (b = bias[i]);\n        target.vy -= y * b;\n        source.vx += x * (b = 1 - b);\n        source.vy += y * b;\n      }\n    }\n  }\n\n  function initialize() {\n    if (!nodes) return;\n\n    var i,\n        n = nodes.length,\n        m = links.length,\n        nodeById = new Map(nodes.map((d, i) => [id(d, i, nodes), d])),\n        link;\n\n    for (i = 0, count = new Array(n); i < m; ++i) {\n      link = links[i], link.index = i;\n      if (typeof link.source !== \"object\") link.source = find(nodeById, link.source);\n      if (typeof link.target !== \"object\") link.target = find(nodeById, link.target);\n      count[link.source.index] = (count[link.source.index] || 0) + 1;\n      count[link.target.index] = (count[link.target.index] || 0) + 1;\n    }\n\n    for (i = 0, bias = new Array(m); i < m; ++i) {\n      link = links[i], bias[i] = count[link.source.index] / (count[link.source.index] + count[link.target.index]);\n    }\n\n    strengths = new Array(m), initializeStrength();\n    distances = new Array(m), initializeDistance();\n  }\n\n  function initializeStrength() {\n    if (!nodes) return;\n\n    for (var i = 0, n = links.length; i < n; ++i) {\n      strengths[i] = +strength(links[i], i, links);\n    }\n  }\n\n  function initializeDistance() {\n    if (!nodes) return;\n\n    for (var i = 0, n = links.length; i < n; ++i) {\n      distances[i] = +distance(links[i], i, links);\n    }\n  }\n\n  force.initialize = function(_nodes, _random) {\n    nodes = _nodes;\n    random = _random;\n    initialize();\n  };\n\n  force.links = function(_) {\n    return arguments.length ? (links = _, initialize(), force) : links;\n  };\n\n  force.id = function(_) {\n    return arguments.length ? (id = _, force) : id;\n  };\n\n  force.iterations = function(_) {\n    return arguments.length ? (iterations = +_, force) : iterations;\n  };\n\n  force.strength = function(_) {\n    return arguments.length ? (strength = typeof _ === \"function\" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(+_), initializeStrength(), force) : strength;\n  };\n\n  force.distance = function(_) {\n    return arguments.length ? (distance = typeof _ === \"function\" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(+_), initializeDistance(), force) : distance;\n  };\n\n  return force;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-force/src/manyBody.js\":\n/*!***********************************************!*\\\n  !*** ./node_modules/d3-force/src/manyBody.js ***!\n  \\***********************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var d3_quadtree__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-quadtree */ \"./node_modules/d3-force/node_modules/d3-quadtree/src/index.js\");\n/* harmony import */ var _constant_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./constant.js */ \"./node_modules/d3-force/src/constant.js\");\n/* harmony import */ var _jiggle_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./jiggle.js */ \"./node_modules/d3-force/src/jiggle.js\");\n/* harmony import */ var _simulation_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./simulation.js */ \"./node_modules/d3-force/src/simulation.js\");\n\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  var nodes,\n      node,\n      random,\n      alpha,\n      strength = Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(-30),\n      strengths,\n      distanceMin2 = 1,\n      distanceMax2 = Infinity,\n      theta2 = 0.81;\n\n  function force(_) {\n    var i, n = nodes.length, tree = Object(d3_quadtree__WEBPACK_IMPORTED_MODULE_0__[\"quadtree\"])(nodes, _simulation_js__WEBPACK_IMPORTED_MODULE_3__[\"x\"], _simulation_js__WEBPACK_IMPORTED_MODULE_3__[\"y\"]).visitAfter(accumulate);\n    for (alpha = _, i = 0; i < n; ++i) node = nodes[i], tree.visit(apply);\n  }\n\n  function initialize() {\n    if (!nodes) return;\n    var i, n = nodes.length, node;\n    strengths = new Array(n);\n    for (i = 0; i < n; ++i) node = nodes[i], strengths[node.index] = +strength(node, i, nodes);\n  }\n\n  function accumulate(quad) {\n    var strength = 0, q, c, weight = 0, x, y, i;\n\n    // For internal nodes, accumulate forces from child quadrants.\n    if (quad.length) {\n      for (x = y = i = 0; i < 4; ++i) {\n        if ((q = quad[i]) && (c = Math.abs(q.value))) {\n          strength += q.value, weight += c, x += c * q.x, y += c * q.y;\n        }\n      }\n      quad.x = x / weight;\n      quad.y = y / weight;\n    }\n\n    // For leaf nodes, accumulate forces from coincident quadrants.\n    else {\n      q = quad;\n      q.x = q.data.x;\n      q.y = q.data.y;\n      do strength += strengths[q.data.index];\n      while (q = q.next);\n    }\n\n    quad.value = strength;\n  }\n\n  function apply(quad, x1, _, x2) {\n    if (!quad.value) return true;\n\n    var x = quad.x - node.x,\n        y = quad.y - node.y,\n        w = x2 - x1,\n        l = x * x + y * y;\n\n    // Apply the Barnes-Hut approximation if possible.\n    // Limit forces for very close nodes; randomize direction if coincident.\n    if (w * w / theta2 < l) {\n      if (l < distanceMax2) {\n        if (x === 0) x = Object(_jiggle_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(random), l += x * x;\n        if (y === 0) y = Object(_jiggle_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(random), l += y * y;\n        if (l < distanceMin2) l = Math.sqrt(distanceMin2 * l);\n        node.vx += x * quad.value * alpha / l;\n        node.vy += y * quad.value * alpha / l;\n      }\n      return true;\n    }\n\n    // Otherwise, process points directly.\n    else if (quad.length || l >= distanceMax2) return;\n\n    // Limit forces for very close nodes; randomize direction if coincident.\n    if (quad.data !== node || quad.next) {\n      if (x === 0) x = Object(_jiggle_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(random), l += x * x;\n      if (y === 0) y = Object(_jiggle_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(random), l += y * y;\n      if (l < distanceMin2) l = Math.sqrt(distanceMin2 * l);\n    }\n\n    do if (quad.data !== node) {\n      w = strengths[quad.data.index] * alpha / l;\n      node.vx += x * w;\n      node.vy += y * w;\n    } while (quad = quad.next);\n  }\n\n  force.initialize = function(_nodes, _random) {\n    nodes = _nodes;\n    random = _random;\n    initialize();\n  };\n\n  force.strength = function(_) {\n    return arguments.length ? (strength = typeof _ === \"function\" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(+_), initialize(), force) : strength;\n  };\n\n  force.distanceMin = function(_) {\n    return arguments.length ? (distanceMin2 = _ * _, force) : Math.sqrt(distanceMin2);\n  };\n\n  force.distanceMax = function(_) {\n    return arguments.length ? (distanceMax2 = _ * _, force) : Math.sqrt(distanceMax2);\n  };\n\n  force.theta = function(_) {\n    return arguments.length ? (theta2 = _ * _, force) : Math.sqrt(theta2);\n  };\n\n  return force;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-force/src/radial.js\":\n/*!*********************************************!*\\\n  !*** ./node_modules/d3-force/src/radial.js ***!\n  \\*********************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _constant_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./constant.js */ \"./node_modules/d3-force/src/constant.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(radius, x, y) {\n  var nodes,\n      strength = Object(_constant_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(0.1),\n      strengths,\n      radiuses;\n\n  if (typeof radius !== \"function\") radius = Object(_constant_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(+radius);\n  if (x == null) x = 0;\n  if (y == null) y = 0;\n\n  function force(alpha) {\n    for (var i = 0, n = nodes.length; i < n; ++i) {\n      var node = nodes[i],\n          dx = node.x - x || 1e-6,\n          dy = node.y - y || 1e-6,\n          r = Math.sqrt(dx * dx + dy * dy),\n          k = (radiuses[i] - r) * strengths[i] * alpha / r;\n      node.vx += dx * k;\n      node.vy += dy * k;\n    }\n  }\n\n  function initialize() {\n    if (!nodes) return;\n    var i, n = nodes.length;\n    strengths = new Array(n);\n    radiuses = new Array(n);\n    for (i = 0; i < n; ++i) {\n      radiuses[i] = +radius(nodes[i], i, nodes);\n      strengths[i] = isNaN(radiuses[i]) ? 0 : +strength(nodes[i], i, nodes);\n    }\n  }\n\n  force.initialize = function(_) {\n    nodes = _, initialize();\n  };\n\n  force.strength = function(_) {\n    return arguments.length ? (strength = typeof _ === \"function\" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(+_), initialize(), force) : strength;\n  };\n\n  force.radius = function(_) {\n    return arguments.length ? (radius = typeof _ === \"function\" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(+_), initialize(), force) : radius;\n  };\n\n  force.x = function(_) {\n    return arguments.length ? (x = +_, force) : x;\n  };\n\n  force.y = function(_) {\n    return arguments.length ? (y = +_, force) : y;\n  };\n\n  return force;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-force/src/simulation.js\":\n/*!*************************************************!*\\\n  !*** ./node_modules/d3-force/src/simulation.js ***!\n  \\*************************************************/\n/*! exports provided: x, y, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"x\", function() { return x; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"y\", function() { return y; });\n/* harmony import */ var d3_dispatch__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-dispatch */ \"./node_modules/d3-force/node_modules/d3-dispatch/src/index.js\");\n/* harmony import */ var d3_timer__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! d3-timer */ \"./node_modules/d3-force/node_modules/d3-timer/src/index.js\");\n/* harmony import */ var _lcg_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./lcg.js */ \"./node_modules/d3-force/src/lcg.js\");\n\n\n\n\nfunction x(d) {\n  return d.x;\n}\n\nfunction y(d) {\n  return d.y;\n}\n\nvar initialRadius = 10,\n    initialAngle = Math.PI * (3 - Math.sqrt(5));\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(nodes) {\n  var simulation,\n      alpha = 1,\n      alphaMin = 0.001,\n      alphaDecay = 1 - Math.pow(alphaMin, 1 / 300),\n      alphaTarget = 0,\n      velocityDecay = 0.6,\n      forces = new Map(),\n      stepper = Object(d3_timer__WEBPACK_IMPORTED_MODULE_1__[\"timer\"])(step),\n      event = Object(d3_dispatch__WEBPACK_IMPORTED_MODULE_0__[\"dispatch\"])(\"tick\", \"end\"),\n      random = Object(_lcg_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])();\n\n  if (nodes == null) nodes = [];\n\n  function step() {\n    tick();\n    event.call(\"tick\", simulation);\n    if (alpha < alphaMin) {\n      stepper.stop();\n      event.call(\"end\", simulation);\n    }\n  }\n\n  function tick(iterations) {\n    var i, n = nodes.length, node;\n\n    if (iterations === undefined) iterations = 1;\n\n    for (var k = 0; k < iterations; ++k) {\n      alpha += (alphaTarget - alpha) * alphaDecay;\n\n      forces.forEach(function(force) {\n        force(alpha);\n      });\n\n      for (i = 0; i < n; ++i) {\n        node = nodes[i];\n        if (node.fx == null) node.x += node.vx *= velocityDecay;\n        else node.x = node.fx, node.vx = 0;\n        if (node.fy == null) node.y += node.vy *= velocityDecay;\n        else node.y = node.fy, node.vy = 0;\n      }\n    }\n\n    return simulation;\n  }\n\n  function initializeNodes() {\n    for (var i = 0, n = nodes.length, node; i < n; ++i) {\n      node = nodes[i], node.index = i;\n      if (node.fx != null) node.x = node.fx;\n      if (node.fy != null) node.y = node.fy;\n      if (isNaN(node.x) || isNaN(node.y)) {\n        var radius = initialRadius * Math.sqrt(0.5 + i), angle = i * initialAngle;\n        node.x = radius * Math.cos(angle);\n        node.y = radius * Math.sin(angle);\n      }\n      if (isNaN(node.vx) || isNaN(node.vy)) {\n        node.vx = node.vy = 0;\n      }\n    }\n  }\n\n  function initializeForce(force) {\n    if (force.initialize) force.initialize(nodes, random);\n    return force;\n  }\n\n  initializeNodes();\n\n  return simulation = {\n    tick: tick,\n\n    restart: function() {\n      return stepper.restart(step), simulation;\n    },\n\n    stop: function() {\n      return stepper.stop(), simulation;\n    },\n\n    nodes: function(_) {\n      return arguments.length ? (nodes = _, initializeNodes(), forces.forEach(initializeForce), simulation) : nodes;\n    },\n\n    alpha: function(_) {\n      return arguments.length ? (alpha = +_, simulation) : alpha;\n    },\n\n    alphaMin: function(_) {\n      return arguments.length ? (alphaMin = +_, simulation) : alphaMin;\n    },\n\n    alphaDecay: function(_) {\n      return arguments.length ? (alphaDecay = +_, simulation) : +alphaDecay;\n    },\n\n    alphaTarget: function(_) {\n      return arguments.length ? (alphaTarget = +_, simulation) : alphaTarget;\n    },\n\n    velocityDecay: function(_) {\n      return arguments.length ? (velocityDecay = 1 - _, simulation) : 1 - velocityDecay;\n    },\n\n    randomSource: function(_) {\n      return arguments.length ? (random = _, forces.forEach(initializeForce), simulation) : random;\n    },\n\n    force: function(name, _) {\n      return arguments.length > 1 ? ((_ == null ? forces.delete(name) : forces.set(name, initializeForce(_))), simulation) : forces.get(name);\n    },\n\n    find: function(x, y, radius) {\n      var i = 0,\n          n = nodes.length,\n          dx,\n          dy,\n          d2,\n          node,\n          closest;\n\n      if (radius == null) radius = Infinity;\n      else radius *= radius;\n\n      for (i = 0; i < n; ++i) {\n        node = nodes[i];\n        dx = x - node.x;\n        dy = y - node.y;\n        d2 = dx * dx + dy * dy;\n        if (d2 < radius) closest = node, radius = d2;\n      }\n\n      return closest;\n    },\n\n    on: function(name, _) {\n      return arguments.length > 1 ? (event.on(name, _), simulation) : event.on(name);\n    }\n  };\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-force/src/x.js\":\n/*!****************************************!*\\\n  !*** ./node_modules/d3-force/src/x.js ***!\n  \\****************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _constant_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./constant.js */ \"./node_modules/d3-force/src/constant.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(x) {\n  var strength = Object(_constant_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(0.1),\n      nodes,\n      strengths,\n      xz;\n\n  if (typeof x !== \"function\") x = Object(_constant_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(x == null ? 0 : +x);\n\n  function force(alpha) {\n    for (var i = 0, n = nodes.length, node; i < n; ++i) {\n      node = nodes[i], node.vx += (xz[i] - node.x) * strengths[i] * alpha;\n    }\n  }\n\n  function initialize() {\n    if (!nodes) return;\n    var i, n = nodes.length;\n    strengths = new Array(n);\n    xz = new Array(n);\n    for (i = 0; i < n; ++i) {\n      strengths[i] = isNaN(xz[i] = +x(nodes[i], i, nodes)) ? 0 : +strength(nodes[i], i, nodes);\n    }\n  }\n\n  force.initialize = function(_) {\n    nodes = _;\n    initialize();\n  };\n\n  force.strength = function(_) {\n    return arguments.length ? (strength = typeof _ === \"function\" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(+_), initialize(), force) : strength;\n  };\n\n  force.x = function(_) {\n    return arguments.length ? (x = typeof _ === \"function\" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(+_), initialize(), force) : x;\n  };\n\n  return force;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-force/src/y.js\":\n/*!****************************************!*\\\n  !*** ./node_modules/d3-force/src/y.js ***!\n  \\****************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _constant_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./constant.js */ \"./node_modules/d3-force/src/constant.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(y) {\n  var strength = Object(_constant_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(0.1),\n      nodes,\n      strengths,\n      yz;\n\n  if (typeof y !== \"function\") y = Object(_constant_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(y == null ? 0 : +y);\n\n  function force(alpha) {\n    for (var i = 0, n = nodes.length, node; i < n; ++i) {\n      node = nodes[i], node.vy += (yz[i] - node.y) * strengths[i] * alpha;\n    }\n  }\n\n  function initialize() {\n    if (!nodes) return;\n    var i, n = nodes.length;\n    strengths = new Array(n);\n    yz = new Array(n);\n    for (i = 0; i < n; ++i) {\n      strengths[i] = isNaN(yz[i] = +y(nodes[i], i, nodes)) ? 0 : +strength(nodes[i], i, nodes);\n    }\n  }\n\n  force.initialize = function(_) {\n    nodes = _;\n    initialize();\n  };\n\n  force.strength = function(_) {\n    return arguments.length ? (strength = typeof _ === \"function\" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(+_), initialize(), force) : strength;\n  };\n\n  force.y = function(_) {\n    return arguments.length ? (y = typeof _ === \"function\" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(+_), initialize(), force) : y;\n  };\n\n  return force;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-format/src/defaultLocale.js\":\n/*!*****************************************************!*\\\n  !*** ./node_modules/d3-format/src/defaultLocale.js ***!\n  \\*****************************************************/\n/*! exports provided: format, formatPrefix, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"format\", function() { return format; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"formatPrefix\", function() { return formatPrefix; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return defaultLocale; });\n/* harmony import */ var _locale_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./locale.js */ \"./node_modules/d3-format/src/locale.js\");\n\n\nvar locale;\nvar format;\nvar formatPrefix;\n\ndefaultLocale({\n  decimal: \".\",\n  thousands: \",\",\n  grouping: [3],\n  currency: [\"$\", \"\"],\n  minus: \"-\"\n});\n\nfunction defaultLocale(definition) {\n  locale = Object(_locale_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(definition);\n  format = locale.format;\n  formatPrefix = locale.formatPrefix;\n  return locale;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-format/src/exponent.js\":\n/*!************************************************!*\\\n  !*** ./node_modules/d3-format/src/exponent.js ***!\n  \\************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _formatDecimal_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./formatDecimal.js */ \"./node_modules/d3-format/src/formatDecimal.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(x) {\n  return x = Object(_formatDecimal_js__WEBPACK_IMPORTED_MODULE_0__[\"formatDecimalParts\"])(Math.abs(x)), x ? x[1] : NaN;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-format/src/formatDecimal.js\":\n/*!*****************************************************!*\\\n  !*** ./node_modules/d3-format/src/formatDecimal.js ***!\n  \\*****************************************************/\n/*! exports provided: default, formatDecimalParts */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"formatDecimalParts\", function() { return formatDecimalParts; });\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(x) {\n  return Math.abs(x = Math.round(x)) >= 1e21\n      ? x.toLocaleString(\"en\").replace(/,/g, \"\")\n      : x.toString(10);\n});\n\n// Computes the decimal coefficient and exponent of the specified number x with\n// significant digits p, where x is positive and p is in [1, 21] or undefined.\n// For example, formatDecimalParts(1.23) returns [\"123\", 0].\nfunction formatDecimalParts(x, p) {\n  if ((i = (x = p ? x.toExponential(p - 1) : x.toExponential()).indexOf(\"e\")) < 0) return null; // NaN, ±Infinity\n  var i, coefficient = x.slice(0, i);\n\n  // The string returned by toExponential either has the form \\d\\.\\d+e[-+]\\d+\n  // (e.g., 1.2e+3) or the form \\de[-+]\\d+ (e.g., 1e+3).\n  return [\n    coefficient.length > 1 ? coefficient[0] + coefficient.slice(2) : coefficient,\n    +x.slice(i + 1)\n  ];\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-format/src/formatGroup.js\":\n/*!***************************************************!*\\\n  !*** ./node_modules/d3-format/src/formatGroup.js ***!\n  \\***************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(grouping, thousands) {\n  return function(value, width) {\n    var i = value.length,\n        t = [],\n        j = 0,\n        g = grouping[0],\n        length = 0;\n\n    while (i > 0 && g > 0) {\n      if (length + g + 1 > width) g = Math.max(1, width - length);\n      t.push(value.substring(i -= g, i + g));\n      if ((length += g + 1) > width) break;\n      g = grouping[j = (j + 1) % grouping.length];\n    }\n\n    return t.reverse().join(thousands);\n  };\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-format/src/formatNumerals.js\":\n/*!******************************************************!*\\\n  !*** ./node_modules/d3-format/src/formatNumerals.js ***!\n  \\******************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(numerals) {\n  return function(value) {\n    return value.replace(/[0-9]/g, function(i) {\n      return numerals[+i];\n    });\n  };\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-format/src/formatPrefixAuto.js\":\n/*!********************************************************!*\\\n  !*** ./node_modules/d3-format/src/formatPrefixAuto.js ***!\n  \\********************************************************/\n/*! exports provided: prefixExponent, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"prefixExponent\", function() { return prefixExponent; });\n/* harmony import */ var _formatDecimal_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./formatDecimal.js */ \"./node_modules/d3-format/src/formatDecimal.js\");\n\n\nvar prefixExponent;\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(x, p) {\n  var d = Object(_formatDecimal_js__WEBPACK_IMPORTED_MODULE_0__[\"formatDecimalParts\"])(x, p);\n  if (!d) return x + \"\";\n  var coefficient = d[0],\n      exponent = d[1],\n      i = exponent - (prefixExponent = Math.max(-8, Math.min(8, Math.floor(exponent / 3))) * 3) + 1,\n      n = coefficient.length;\n  return i === n ? coefficient\n      : i > n ? coefficient + new Array(i - n + 1).join(\"0\")\n      : i > 0 ? coefficient.slice(0, i) + \".\" + coefficient.slice(i)\n      : \"0.\" + new Array(1 - i).join(\"0\") + Object(_formatDecimal_js__WEBPACK_IMPORTED_MODULE_0__[\"formatDecimalParts\"])(x, Math.max(0, p + i - 1))[0]; // less than 1y!\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-format/src/formatRounded.js\":\n/*!*****************************************************!*\\\n  !*** ./node_modules/d3-format/src/formatRounded.js ***!\n  \\*****************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _formatDecimal_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./formatDecimal.js */ \"./node_modules/d3-format/src/formatDecimal.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(x, p) {\n  var d = Object(_formatDecimal_js__WEBPACK_IMPORTED_MODULE_0__[\"formatDecimalParts\"])(x, p);\n  if (!d) return x + \"\";\n  var coefficient = d[0],\n      exponent = d[1];\n  return exponent < 0 ? \"0.\" + new Array(-exponent).join(\"0\") + coefficient\n      : coefficient.length > exponent + 1 ? coefficient.slice(0, exponent + 1) + \".\" + coefficient.slice(exponent + 1)\n      : coefficient + new Array(exponent - coefficient.length + 2).join(\"0\");\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-format/src/formatSpecifier.js\":\n/*!*******************************************************!*\\\n  !*** ./node_modules/d3-format/src/formatSpecifier.js ***!\n  \\*******************************************************/\n/*! exports provided: default, FormatSpecifier */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return formatSpecifier; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"FormatSpecifier\", function() { return FormatSpecifier; });\n// [[fill]align][sign][symbol][0][width][,][.precision][~][type]\nvar re = /^(?:(.)?([<>=^]))?([+\\-( ])?([$#])?(0)?(\\d+)?(,)?(\\.\\d+)?(~)?([a-z%])?$/i;\n\nfunction formatSpecifier(specifier) {\n  if (!(match = re.exec(specifier))) throw new Error(\"invalid format: \" + specifier);\n  var match;\n  return new FormatSpecifier({\n    fill: match[1],\n    align: match[2],\n    sign: match[3],\n    symbol: match[4],\n    zero: match[5],\n    width: match[6],\n    comma: match[7],\n    precision: match[8] && match[8].slice(1),\n    trim: match[9],\n    type: match[10]\n  });\n}\n\nformatSpecifier.prototype = FormatSpecifier.prototype; // instanceof\n\nfunction FormatSpecifier(specifier) {\n  this.fill = specifier.fill === undefined ? \" \" : specifier.fill + \"\";\n  this.align = specifier.align === undefined ? \">\" : specifier.align + \"\";\n  this.sign = specifier.sign === undefined ? \"-\" : specifier.sign + \"\";\n  this.symbol = specifier.symbol === undefined ? \"\" : specifier.symbol + \"\";\n  this.zero = !!specifier.zero;\n  this.width = specifier.width === undefined ? undefined : +specifier.width;\n  this.comma = !!specifier.comma;\n  this.precision = specifier.precision === undefined ? undefined : +specifier.precision;\n  this.trim = !!specifier.trim;\n  this.type = specifier.type === undefined ? \"\" : specifier.type + \"\";\n}\n\nFormatSpecifier.prototype.toString = function() {\n  return this.fill\n      + this.align\n      + this.sign\n      + this.symbol\n      + (this.zero ? \"0\" : \"\")\n      + (this.width === undefined ? \"\" : Math.max(1, this.width | 0))\n      + (this.comma ? \",\" : \"\")\n      + (this.precision === undefined ? \"\" : \".\" + Math.max(0, this.precision | 0))\n      + (this.trim ? \"~\" : \"\")\n      + this.type;\n};\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-format/src/formatTrim.js\":\n/*!**************************************************!*\\\n  !*** ./node_modules/d3-format/src/formatTrim.js ***!\n  \\**************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n// Trims insignificant zeros, e.g., replaces 1.2000k with 1.2k.\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(s) {\n  out: for (var n = s.length, i = 1, i0 = -1, i1; i < n; ++i) {\n    switch (s[i]) {\n      case \".\": i0 = i1 = i; break;\n      case \"0\": if (i0 === 0) i0 = i; i1 = i; break;\n      default: if (!+s[i]) break out; if (i0 > 0) i0 = 0; break;\n    }\n  }\n  return i0 > 0 ? s.slice(0, i0) + s.slice(i1 + 1) : s;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-format/src/formatTypes.js\":\n/*!***************************************************!*\\\n  !*** ./node_modules/d3-format/src/formatTypes.js ***!\n  \\***************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _formatDecimal_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./formatDecimal.js */ \"./node_modules/d3-format/src/formatDecimal.js\");\n/* harmony import */ var _formatPrefixAuto_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./formatPrefixAuto.js */ \"./node_modules/d3-format/src/formatPrefixAuto.js\");\n/* harmony import */ var _formatRounded_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./formatRounded.js */ \"./node_modules/d3-format/src/formatRounded.js\");\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n  \"%\": function(x, p) { return (x * 100).toFixed(p); },\n  \"b\": function(x) { return Math.round(x).toString(2); },\n  \"c\": function(x) { return x + \"\"; },\n  \"d\": _formatDecimal_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"],\n  \"e\": function(x, p) { return x.toExponential(p); },\n  \"f\": function(x, p) { return x.toFixed(p); },\n  \"g\": function(x, p) { return x.toPrecision(p); },\n  \"o\": function(x) { return Math.round(x).toString(8); },\n  \"p\": function(x, p) { return Object(_formatRounded_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(x * 100, p); },\n  \"r\": _formatRounded_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"],\n  \"s\": _formatPrefixAuto_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"],\n  \"X\": function(x) { return Math.round(x).toString(16).toUpperCase(); },\n  \"x\": function(x) { return Math.round(x).toString(16); }\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-format/src/identity.js\":\n/*!************************************************!*\\\n  !*** ./node_modules/d3-format/src/identity.js ***!\n  \\************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(x) {\n  return x;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-format/src/index.js\":\n/*!*********************************************!*\\\n  !*** ./node_modules/d3-format/src/index.js ***!\n  \\*********************************************/\n/*! exports provided: formatDefaultLocale, format, formatPrefix, formatLocale, formatSpecifier, FormatSpecifier, precisionFixed, precisionPrefix, precisionRound */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _defaultLocale_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./defaultLocale.js */ \"./node_modules/d3-format/src/defaultLocale.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"formatDefaultLocale\", function() { return _defaultLocale_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"format\", function() { return _defaultLocale_js__WEBPACK_IMPORTED_MODULE_0__[\"format\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"formatPrefix\", function() { return _defaultLocale_js__WEBPACK_IMPORTED_MODULE_0__[\"formatPrefix\"]; });\n\n/* harmony import */ var _locale_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./locale.js */ \"./node_modules/d3-format/src/locale.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"formatLocale\", function() { return _locale_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"]; });\n\n/* harmony import */ var _formatSpecifier_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./formatSpecifier.js */ \"./node_modules/d3-format/src/formatSpecifier.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"formatSpecifier\", function() { return _formatSpecifier_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"FormatSpecifier\", function() { return _formatSpecifier_js__WEBPACK_IMPORTED_MODULE_2__[\"FormatSpecifier\"]; });\n\n/* harmony import */ var _precisionFixed_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./precisionFixed.js */ \"./node_modules/d3-format/src/precisionFixed.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"precisionFixed\", function() { return _precisionFixed_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"]; });\n\n/* harmony import */ var _precisionPrefix_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./precisionPrefix.js */ \"./node_modules/d3-format/src/precisionPrefix.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"precisionPrefix\", function() { return _precisionPrefix_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"]; });\n\n/* harmony import */ var _precisionRound_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./precisionRound.js */ \"./node_modules/d3-format/src/precisionRound.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"precisionRound\", function() { return _precisionRound_js__WEBPACK_IMPORTED_MODULE_5__[\"default\"]; });\n\n\n\n\n\n\n\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-format/src/locale.js\":\n/*!**********************************************!*\\\n  !*** ./node_modules/d3-format/src/locale.js ***!\n  \\**********************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _exponent_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./exponent.js */ \"./node_modules/d3-format/src/exponent.js\");\n/* harmony import */ var _formatGroup_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./formatGroup.js */ \"./node_modules/d3-format/src/formatGroup.js\");\n/* harmony import */ var _formatNumerals_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./formatNumerals.js */ \"./node_modules/d3-format/src/formatNumerals.js\");\n/* harmony import */ var _formatSpecifier_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./formatSpecifier.js */ \"./node_modules/d3-format/src/formatSpecifier.js\");\n/* harmony import */ var _formatTrim_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./formatTrim.js */ \"./node_modules/d3-format/src/formatTrim.js\");\n/* harmony import */ var _formatTypes_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./formatTypes.js */ \"./node_modules/d3-format/src/formatTypes.js\");\n/* harmony import */ var _formatPrefixAuto_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./formatPrefixAuto.js */ \"./node_modules/d3-format/src/formatPrefixAuto.js\");\n/* harmony import */ var _identity_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./identity.js */ \"./node_modules/d3-format/src/identity.js\");\n\n\n\n\n\n\n\n\n\nvar map = Array.prototype.map,\n    prefixes = [\"y\",\"z\",\"a\",\"f\",\"p\",\"n\",\"µ\",\"m\",\"\",\"k\",\"M\",\"G\",\"T\",\"P\",\"E\",\"Z\",\"Y\"];\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(locale) {\n  var group = locale.grouping === undefined || locale.thousands === undefined ? _identity_js__WEBPACK_IMPORTED_MODULE_7__[\"default\"] : Object(_formatGroup_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(map.call(locale.grouping, Number), locale.thousands + \"\"),\n      currencyPrefix = locale.currency === undefined ? \"\" : locale.currency[0] + \"\",\n      currencySuffix = locale.currency === undefined ? \"\" : locale.currency[1] + \"\",\n      decimal = locale.decimal === undefined ? \".\" : locale.decimal + \"\",\n      numerals = locale.numerals === undefined ? _identity_js__WEBPACK_IMPORTED_MODULE_7__[\"default\"] : Object(_formatNumerals_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(map.call(locale.numerals, String)),\n      percent = locale.percent === undefined ? \"%\" : locale.percent + \"\",\n      minus = locale.minus === undefined ? \"-\" : locale.minus + \"\",\n      nan = locale.nan === undefined ? \"NaN\" : locale.nan + \"\";\n\n  function newFormat(specifier) {\n    specifier = Object(_formatSpecifier_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(specifier);\n\n    var fill = specifier.fill,\n        align = specifier.align,\n        sign = specifier.sign,\n        symbol = specifier.symbol,\n        zero = specifier.zero,\n        width = specifier.width,\n        comma = specifier.comma,\n        precision = specifier.precision,\n        trim = specifier.trim,\n        type = specifier.type;\n\n    // The \"n\" type is an alias for \",g\".\n    if (type === \"n\") comma = true, type = \"g\";\n\n    // The \"\" type, and any invalid type, is an alias for \".12~g\".\n    else if (!_formatTypes_js__WEBPACK_IMPORTED_MODULE_5__[\"default\"][type]) precision === undefined && (precision = 12), trim = true, type = \"g\";\n\n    // If zero fill is specified, padding goes after sign and before digits.\n    if (zero || (fill === \"0\" && align === \"=\")) zero = true, fill = \"0\", align = \"=\";\n\n    // Compute the prefix and suffix.\n    // For SI-prefix, the suffix is lazily computed.\n    var prefix = symbol === \"$\" ? currencyPrefix : symbol === \"#\" && /[boxX]/.test(type) ? \"0\" + type.toLowerCase() : \"\",\n        suffix = symbol === \"$\" ? currencySuffix : /[%p]/.test(type) ? percent : \"\";\n\n    // What format function should we use?\n    // Is this an integer type?\n    // Can this type generate exponential notation?\n    var formatType = _formatTypes_js__WEBPACK_IMPORTED_MODULE_5__[\"default\"][type],\n        maybeSuffix = /[defgprs%]/.test(type);\n\n    // Set the default precision if not specified,\n    // or clamp the specified precision to the supported range.\n    // For significant precision, it must be in [1, 21].\n    // For fixed precision, it must be in [0, 20].\n    precision = precision === undefined ? 6\n        : /[gprs]/.test(type) ? Math.max(1, Math.min(21, precision))\n        : Math.max(0, Math.min(20, precision));\n\n    function format(value) {\n      var valuePrefix = prefix,\n          valueSuffix = suffix,\n          i, n, c;\n\n      if (type === \"c\") {\n        valueSuffix = formatType(value) + valueSuffix;\n        value = \"\";\n      } else {\n        value = +value;\n\n        // Determine the sign. -0 is not less than 0, but 1 / -0 is!\n        var valueNegative = value < 0 || 1 / value < 0;\n\n        // Perform the initial formatting.\n        value = isNaN(value) ? nan : formatType(Math.abs(value), precision);\n\n        // Trim insignificant zeros.\n        if (trim) value = Object(_formatTrim_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(value);\n\n        // If a negative value rounds to zero after formatting, and no explicit positive sign is requested, hide the sign.\n        if (valueNegative && +value === 0 && sign !== \"+\") valueNegative = false;\n\n        // Compute the prefix and suffix.\n        valuePrefix = (valueNegative ? (sign === \"(\" ? sign : minus) : sign === \"-\" || sign === \"(\" ? \"\" : sign) + valuePrefix;\n        valueSuffix = (type === \"s\" ? prefixes[8 + _formatPrefixAuto_js__WEBPACK_IMPORTED_MODULE_6__[\"prefixExponent\"] / 3] : \"\") + valueSuffix + (valueNegative && sign === \"(\" ? \")\" : \"\");\n\n        // Break the formatted value into the integer “value” part that can be\n        // grouped, and fractional or exponential “suffix” part that is not.\n        if (maybeSuffix) {\n          i = -1, n = value.length;\n          while (++i < n) {\n            if (c = value.charCodeAt(i), 48 > c || c > 57) {\n              valueSuffix = (c === 46 ? decimal + value.slice(i + 1) : value.slice(i)) + valueSuffix;\n              value = value.slice(0, i);\n              break;\n            }\n          }\n        }\n      }\n\n      // If the fill character is not \"0\", grouping is applied before padding.\n      if (comma && !zero) value = group(value, Infinity);\n\n      // Compute the padding.\n      var length = valuePrefix.length + value.length + valueSuffix.length,\n          padding = length < width ? new Array(width - length + 1).join(fill) : \"\";\n\n      // If the fill character is \"0\", grouping is applied after padding.\n      if (comma && zero) value = group(padding + value, padding.length ? width - valueSuffix.length : Infinity), padding = \"\";\n\n      // Reconstruct the final output based on the desired alignment.\n      switch (align) {\n        case \"<\": value = valuePrefix + value + valueSuffix + padding; break;\n        case \"=\": value = valuePrefix + padding + value + valueSuffix; break;\n        case \"^\": value = padding.slice(0, length = padding.length >> 1) + valuePrefix + value + valueSuffix + padding.slice(length); break;\n        default: value = padding + valuePrefix + value + valueSuffix; break;\n      }\n\n      return numerals(value);\n    }\n\n    format.toString = function() {\n      return specifier + \"\";\n    };\n\n    return format;\n  }\n\n  function formatPrefix(specifier, value) {\n    var f = newFormat((specifier = Object(_formatSpecifier_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(specifier), specifier.type = \"f\", specifier)),\n        e = Math.max(-8, Math.min(8, Math.floor(Object(_exponent_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(value) / 3))) * 3,\n        k = Math.pow(10, -e),\n        prefix = prefixes[8 + e / 3];\n    return function(value) {\n      return f(k * value) + prefix;\n    };\n  }\n\n  return {\n    format: newFormat,\n    formatPrefix: formatPrefix\n  };\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-format/src/precisionFixed.js\":\n/*!******************************************************!*\\\n  !*** ./node_modules/d3-format/src/precisionFixed.js ***!\n  \\******************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _exponent_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./exponent.js */ \"./node_modules/d3-format/src/exponent.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(step) {\n  return Math.max(0, -Object(_exponent_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(Math.abs(step)));\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-format/src/precisionPrefix.js\":\n/*!*******************************************************!*\\\n  !*** ./node_modules/d3-format/src/precisionPrefix.js ***!\n  \\*******************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _exponent_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./exponent.js */ \"./node_modules/d3-format/src/exponent.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(step, value) {\n  return Math.max(0, Math.max(-8, Math.min(8, Math.floor(Object(_exponent_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(value) / 3))) * 3 - Object(_exponent_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(Math.abs(step)));\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-format/src/precisionRound.js\":\n/*!******************************************************!*\\\n  !*** ./node_modules/d3-format/src/precisionRound.js ***!\n  \\******************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _exponent_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./exponent.js */ \"./node_modules/d3-format/src/exponent.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(step, max) {\n  step = Math.abs(step), max = Math.abs(max) - step;\n  return Math.max(0, Object(_exponent_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(max) - Object(_exponent_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(step)) + 1;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-geo/node_modules/d3-array/src/array.js\":\n/*!****************************************************************!*\\\n  !*** ./node_modules/d3-geo/node_modules/d3-array/src/array.js ***!\n  \\****************************************************************/\n/*! exports provided: slice, map */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"slice\", function() { return slice; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"map\", function() { return map; });\nvar array = Array.prototype;\n\nvar slice = array.slice;\nvar map = array.map;\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-geo/node_modules/d3-array/src/ascending.js\":\n/*!********************************************************************!*\\\n  !*** ./node_modules/d3-geo/node_modules/d3-array/src/ascending.js ***!\n  \\********************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(a, b) {\n  return a == null || b == null ? NaN\n    : a < b ? -1\n    : a > b ? 1\n    : a >= b ? 0\n    : NaN;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-geo/node_modules/d3-array/src/bin.js\":\n/*!**************************************************************!*\\\n  !*** ./node_modules/d3-geo/node_modules/d3-array/src/bin.js ***!\n  \\**************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _array_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./array.js */ \"./node_modules/d3-geo/node_modules/d3-array/src/array.js\");\n/* harmony import */ var _bisect_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./bisect.js */ \"./node_modules/d3-geo/node_modules/d3-array/src/bisect.js\");\n/* harmony import */ var _constant_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./constant.js */ \"./node_modules/d3-geo/node_modules/d3-array/src/constant.js\");\n/* harmony import */ var _extent_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./extent.js */ \"./node_modules/d3-geo/node_modules/d3-array/src/extent.js\");\n/* harmony import */ var _identity_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./identity.js */ \"./node_modules/d3-geo/node_modules/d3-array/src/identity.js\");\n/* harmony import */ var _nice_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./nice.js */ \"./node_modules/d3-geo/node_modules/d3-array/src/nice.js\");\n/* harmony import */ var _ticks_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./ticks.js */ \"./node_modules/d3-geo/node_modules/d3-array/src/ticks.js\");\n/* harmony import */ var _threshold_sturges_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./threshold/sturges.js */ \"./node_modules/d3-geo/node_modules/d3-array/src/threshold/sturges.js\");\n\n\n\n\n\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  var value = _identity_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"],\n      domain = _extent_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"],\n      threshold = _threshold_sturges_js__WEBPACK_IMPORTED_MODULE_7__[\"default\"];\n\n  function histogram(data) {\n    if (!Array.isArray(data)) data = Array.from(data);\n\n    var i,\n        n = data.length,\n        x,\n        values = new Array(n);\n\n    for (i = 0; i < n; ++i) {\n      values[i] = value(data[i], i, data);\n    }\n\n    var xz = domain(values),\n        x0 = xz[0],\n        x1 = xz[1],\n        tz = threshold(values, x0, x1);\n\n    // Convert number of thresholds into uniform thresholds, and nice the\n    // default domain accordingly.\n    if (!Array.isArray(tz)) {\n      const max = x1, tn = +tz;\n      if (domain === _extent_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"]) [x0, x1] = Object(_nice_js__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(x0, x1, tn);\n      tz = Object(_ticks_js__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(x0, x1, tn);\n\n      // If the last threshold is coincident with the domain’s upper bound, the\n      // last bin will be zero-width. If the default domain is used, and this\n      // last threshold is coincident with the maximum input value, we can\n      // extend the niced upper bound by one tick to ensure uniform bin widths;\n      // otherwise, we simply remove the last threshold. Note that we don’t\n      // coerce values or the domain to numbers, and thus must be careful to\n      // compare order (>=) rather than strict equality (===)!\n      if (tz[tz.length - 1] >= x1) {\n        if (max >= x1 && domain === _extent_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"]) {\n          const step = Object(_ticks_js__WEBPACK_IMPORTED_MODULE_6__[\"tickIncrement\"])(x0, x1, tn);\n          if (isFinite(step)) {\n            if (step > 0) {\n              x1 = (Math.floor(x1 / step) + 1) * step;\n            } else if (step < 0) {\n              x1 = (Math.ceil(x1 * -step) + 1) / -step;\n            }\n          }\n        } else {\n          tz.pop();\n        }\n      }\n    }\n\n    // Remove any thresholds outside the domain.\n    var m = tz.length;\n    while (tz[0] <= x0) tz.shift(), --m;\n    while (tz[m - 1] > x1) tz.pop(), --m;\n\n    var bins = new Array(m + 1),\n        bin;\n\n    // Initialize bins.\n    for (i = 0; i <= m; ++i) {\n      bin = bins[i] = [];\n      bin.x0 = i > 0 ? tz[i - 1] : x0;\n      bin.x1 = i < m ? tz[i] : x1;\n    }\n\n    // Assign data to bins by value, ignoring any outside the domain.\n    for (i = 0; i < n; ++i) {\n      x = values[i];\n      if (x != null && x0 <= x && x <= x1) {\n        bins[Object(_bisect_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(tz, x, 0, m)].push(data[i]);\n      }\n    }\n\n    return bins;\n  }\n\n  histogram.value = function(_) {\n    return arguments.length ? (value = typeof _ === \"function\" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(_), histogram) : value;\n  };\n\n  histogram.domain = function(_) {\n    return arguments.length ? (domain = typeof _ === \"function\" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])([_[0], _[1]]), histogram) : domain;\n  };\n\n  histogram.thresholds = function(_) {\n    return arguments.length ? (threshold = typeof _ === \"function\" ? _ : Array.isArray(_) ? Object(_constant_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(_array_js__WEBPACK_IMPORTED_MODULE_0__[\"slice\"].call(_)) : Object(_constant_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(_), histogram) : threshold;\n  };\n\n  return histogram;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-geo/node_modules/d3-array/src/bisect.js\":\n/*!*****************************************************************!*\\\n  !*** ./node_modules/d3-geo/node_modules/d3-array/src/bisect.js ***!\n  \\*****************************************************************/\n/*! exports provided: bisectRight, bisectLeft, bisectCenter, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"bisectRight\", function() { return bisectRight; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"bisectLeft\", function() { return bisectLeft; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"bisectCenter\", function() { return bisectCenter; });\n/* harmony import */ var _ascending_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ascending.js */ \"./node_modules/d3-geo/node_modules/d3-array/src/ascending.js\");\n/* harmony import */ var _bisector_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./bisector.js */ \"./node_modules/d3-geo/node_modules/d3-array/src/bisector.js\");\n/* harmony import */ var _number_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./number.js */ \"./node_modules/d3-geo/node_modules/d3-array/src/number.js\");\n\n\n\n\nconst ascendingBisect = Object(_bisector_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(_ascending_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]);\nconst bisectRight = ascendingBisect.right;\nconst bisectLeft = ascendingBisect.left;\nconst bisectCenter = Object(_bisector_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(_number_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"]).center;\n/* harmony default export */ __webpack_exports__[\"default\"] = (bisectRight);\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-geo/node_modules/d3-array/src/bisector.js\":\n/*!*******************************************************************!*\\\n  !*** ./node_modules/d3-geo/node_modules/d3-array/src/bisector.js ***!\n  \\*******************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _ascending_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ascending.js */ \"./node_modules/d3-geo/node_modules/d3-array/src/ascending.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(f) {\n  let delta = f;\n  let compare = f;\n\n  if (f.length === 1) {\n    delta = (d, x) => f(d) - x;\n    compare = ascendingComparator(f);\n  }\n\n  function left(a, x, lo, hi) {\n    if (lo == null) lo = 0;\n    if (hi == null) hi = a.length;\n    while (lo < hi) {\n      const mid = (lo + hi) >>> 1;\n      if (compare(a[mid], x) < 0) lo = mid + 1;\n      else hi = mid;\n    }\n    return lo;\n  }\n\n  function right(a, x, lo, hi) {\n    if (lo == null) lo = 0;\n    if (hi == null) hi = a.length;\n    while (lo < hi) {\n      const mid = (lo + hi) >>> 1;\n      if (compare(a[mid], x) > 0) hi = mid;\n      else lo = mid + 1;\n    }\n    return lo;\n  }\n\n  function center(a, x, lo, hi) {\n    if (lo == null) lo = 0;\n    if (hi == null) hi = a.length;\n    const i = left(a, x, lo, hi - 1);\n    return i > lo && delta(a[i - 1], x) > -delta(a[i], x) ? i - 1 : i;\n  }\n\n  return {left, center, right};\n});\n\nfunction ascendingComparator(f) {\n  return (d, x) => Object(_ascending_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(f(d), x);\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-geo/node_modules/d3-array/src/constant.js\":\n/*!*******************************************************************!*\\\n  !*** ./node_modules/d3-geo/node_modules/d3-array/src/constant.js ***!\n  \\*******************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(x) {\n  return function() {\n    return x;\n  };\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-geo/node_modules/d3-array/src/count.js\":\n/*!****************************************************************!*\\\n  !*** ./node_modules/d3-geo/node_modules/d3-array/src/count.js ***!\n  \\****************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return count; });\nfunction count(values, valueof) {\n  let count = 0;\n  if (valueof === undefined) {\n    for (let value of values) {\n      if (value != null && (value = +value) >= value) {\n        ++count;\n      }\n    }\n  } else {\n    let index = -1;\n    for (let value of values) {\n      if ((value = valueof(value, ++index, values)) != null && (value = +value) >= value) {\n        ++count;\n      }\n    }\n  }\n  return count;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-geo/node_modules/d3-array/src/cross.js\":\n/*!****************************************************************!*\\\n  !*** ./node_modules/d3-geo/node_modules/d3-array/src/cross.js ***!\n  \\****************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return cross; });\nfunction length(array) {\n  return array.length | 0;\n}\n\nfunction empty(length) {\n  return !(length > 0);\n}\n\nfunction arrayify(values) {\n  return typeof values !== \"object\" || \"length\" in values ? values : Array.from(values);\n}\n\nfunction reducer(reduce) {\n  return values => reduce(...values);\n}\n\nfunction cross(...values) {\n  const reduce = typeof values[values.length - 1] === \"function\" && reducer(values.pop());\n  values = values.map(arrayify);\n  const lengths = values.map(length);\n  const j = values.length - 1;\n  const index = new Array(j + 1).fill(0);\n  const product = [];\n  if (j < 0 || lengths.some(empty)) return product;\n  while (true) {\n    product.push(index.map((j, i) => values[i][j]));\n    let i = j;\n    while (++index[i] === lengths[i]) {\n      if (i === 0) return reduce ? product.map(reduce) : product;\n      index[i--] = 0;\n    }\n  }\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-geo/node_modules/d3-array/src/cumsum.js\":\n/*!*****************************************************************!*\\\n  !*** ./node_modules/d3-geo/node_modules/d3-array/src/cumsum.js ***!\n  \\*****************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return cumsum; });\nfunction cumsum(values, valueof) {\n  var sum = 0, index = 0;\n  return Float64Array.from(values, valueof === undefined\n    ? v => (sum += +v || 0)\n    : v => (sum += +valueof(v, index++, values) || 0));\n}\n\n/***/ }),\n\n/***/ \"./node_modules/d3-geo/node_modules/d3-array/src/descending.js\":\n/*!*********************************************************************!*\\\n  !*** ./node_modules/d3-geo/node_modules/d3-array/src/descending.js ***!\n  \\*********************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(a, b) {\n  return a == null || b == null ? NaN\n    : b < a ? -1\n    : b > a ? 1\n    : b >= a ? 0\n    : NaN;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-geo/node_modules/d3-array/src/deviation.js\":\n/*!********************************************************************!*\\\n  !*** ./node_modules/d3-geo/node_modules/d3-array/src/deviation.js ***!\n  \\********************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return deviation; });\n/* harmony import */ var _variance_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./variance.js */ \"./node_modules/d3-geo/node_modules/d3-array/src/variance.js\");\n\n\nfunction deviation(values, valueof) {\n  const v = Object(_variance_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(values, valueof);\n  return v ? Math.sqrt(v) : v;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-geo/node_modules/d3-array/src/difference.js\":\n/*!*********************************************************************!*\\\n  !*** ./node_modules/d3-geo/node_modules/d3-array/src/difference.js ***!\n  \\*********************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return difference; });\nfunction difference(values, ...others) {\n  values = new Set(values);\n  for (const other of others) {\n    for (const value of other) {\n      values.delete(value);\n    }\n  }\n  return values;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-geo/node_modules/d3-array/src/disjoint.js\":\n/*!*******************************************************************!*\\\n  !*** ./node_modules/d3-geo/node_modules/d3-array/src/disjoint.js ***!\n  \\*******************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return disjoint; });\nfunction disjoint(values, other) {\n  const iterator = other[Symbol.iterator](), set = new Set();\n  for (const v of values) {\n    if (set.has(v)) return false;\n    let value, done;\n    while (({value, done} = iterator.next())) {\n      if (done) break;\n      if (Object.is(v, value)) return false;\n      set.add(value);\n    }\n  }\n  return true;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-geo/node_modules/d3-array/src/every.js\":\n/*!****************************************************************!*\\\n  !*** ./node_modules/d3-geo/node_modules/d3-array/src/every.js ***!\n  \\****************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return every; });\nfunction every(values, test) {\n  if (typeof test !== \"function\") throw new TypeError(\"test is not a function\");\n  let index = -1;\n  for (const value of values) {\n    if (!test(value, ++index, values)) {\n      return false;\n    }\n  }\n  return true;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-geo/node_modules/d3-array/src/extent.js\":\n/*!*****************************************************************!*\\\n  !*** ./node_modules/d3-geo/node_modules/d3-array/src/extent.js ***!\n  \\*****************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(values, valueof) {\n  let min;\n  let max;\n  if (valueof === undefined) {\n    for (const value of values) {\n      if (value != null) {\n        if (min === undefined) {\n          if (value >= value) min = max = value;\n        } else {\n          if (min > value) min = value;\n          if (max < value) max = value;\n        }\n      }\n    }\n  } else {\n    let index = -1;\n    for (let value of values) {\n      if ((value = valueof(value, ++index, values)) != null) {\n        if (min === undefined) {\n          if (value >= value) min = max = value;\n        } else {\n          if (min > value) min = value;\n          if (max < value) max = value;\n        }\n      }\n    }\n  }\n  return [min, max];\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-geo/node_modules/d3-array/src/filter.js\":\n/*!*****************************************************************!*\\\n  !*** ./node_modules/d3-geo/node_modules/d3-array/src/filter.js ***!\n  \\*****************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return filter; });\nfunction filter(values, test) {\n  if (typeof test !== \"function\") throw new TypeError(\"test is not a function\");\n  const array = [];\n  let index = -1;\n  for (const value of values) {\n    if (test(value, ++index, values)) {\n      array.push(value);\n    }\n  }\n  return array;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-geo/node_modules/d3-array/src/fsum.js\":\n/*!***************************************************************!*\\\n  !*** ./node_modules/d3-geo/node_modules/d3-array/src/fsum.js ***!\n  \\***************************************************************/\n/*! exports provided: Adder, fsum, fcumsum */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Adder\", function() { return Adder; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"fsum\", function() { return fsum; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"fcumsum\", function() { return fcumsum; });\n// https://github.com/python/cpython/blob/a74eea238f5baba15797e2e8b570d153bc8690a7/Modules/mathmodule.c#L1423\nclass Adder {\n  constructor() {\n    this._partials = new Float64Array(32);\n    this._n = 0;\n  }\n  add(x) {\n    const p = this._partials;\n    let i = 0;\n    for (let j = 0; j < this._n && j < 32; j++) {\n      const y = p[j],\n        hi = x + y,\n        lo = Math.abs(x) < Math.abs(y) ? x - (hi - y) : y - (hi - x);\n      if (lo) p[i++] = lo;\n      x = hi;\n    }\n    p[i] = x;\n    this._n = i + 1;\n    return this;\n  }\n  valueOf() {\n    const p = this._partials;\n    let n = this._n, x, y, lo, hi = 0;\n    if (n > 0) {\n      hi = p[--n];\n      while (n > 0) {\n        x = hi;\n        y = p[--n];\n        hi = x + y;\n        lo = y - (hi - x);\n        if (lo) break;\n      }\n      if (n > 0 && ((lo < 0 && p[n - 1] < 0) || (lo > 0 && p[n - 1] > 0))) {\n        y = lo * 2;\n        x = hi + y;\n        if (y == x - hi) hi = x;\n      }\n    }\n    return hi;\n  }\n}\n\nfunction fsum(values, valueof) {\n  const adder = new Adder();\n  if (valueof === undefined) {\n    for (let value of values) {\n      if (value = +value) {\n        adder.add(value);\n      }\n    }\n  } else {\n    let index = -1;\n    for (let value of values) {\n      if (value = +valueof(value, ++index, values)) {\n        adder.add(value);\n      }\n    }\n  }\n  return +adder;\n}\n\nfunction fcumsum(values, valueof) {\n  const adder = new Adder();\n  let index = -1;\n  return Float64Array.from(values, valueof === undefined\n      ? v => adder.add(+v || 0)\n      : v => adder.add(+valueof(v, ++index, values) || 0)\n  );\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-geo/node_modules/d3-array/src/greatest.js\":\n/*!*******************************************************************!*\\\n  !*** ./node_modules/d3-geo/node_modules/d3-array/src/greatest.js ***!\n  \\*******************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return greatest; });\n/* harmony import */ var _ascending_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ascending.js */ \"./node_modules/d3-geo/node_modules/d3-array/src/ascending.js\");\n\n\nfunction greatest(values, compare = _ascending_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]) {\n  let max;\n  let defined = false;\n  if (compare.length === 1) {\n    let maxValue;\n    for (const element of values) {\n      const value = compare(element);\n      if (defined\n          ? Object(_ascending_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(value, maxValue) > 0\n          : Object(_ascending_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(value, value) === 0) {\n        max = element;\n        maxValue = value;\n        defined = true;\n      }\n    }\n  } else {\n    for (const value of values) {\n      if (defined\n          ? compare(value, max) > 0\n          : compare(value, value) === 0) {\n        max = value;\n        defined = true;\n      }\n    }\n  }\n  return max;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-geo/node_modules/d3-array/src/greatestIndex.js\":\n/*!************************************************************************!*\\\n  !*** ./node_modules/d3-geo/node_modules/d3-array/src/greatestIndex.js ***!\n  \\************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return greatestIndex; });\n/* harmony import */ var _ascending_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ascending.js */ \"./node_modules/d3-geo/node_modules/d3-array/src/ascending.js\");\n/* harmony import */ var _maxIndex_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./maxIndex.js */ \"./node_modules/d3-geo/node_modules/d3-array/src/maxIndex.js\");\n\n\n\nfunction greatestIndex(values, compare = _ascending_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]) {\n  if (compare.length === 1) return Object(_maxIndex_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(values, compare);\n  let maxValue;\n  let max = -1;\n  let index = -1;\n  for (const value of values) {\n    ++index;\n    if (max < 0\n        ? compare(value, value) === 0\n        : compare(value, maxValue) > 0) {\n      maxValue = value;\n      max = index;\n    }\n  }\n  return max;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-geo/node_modules/d3-array/src/group.js\":\n/*!****************************************************************!*\\\n  !*** ./node_modules/d3-geo/node_modules/d3-array/src/group.js ***!\n  \\****************************************************************/\n/*! exports provided: default, groups, flatGroup, flatRollup, rollup, rollups, index, indexes */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return group; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"groups\", function() { return groups; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"flatGroup\", function() { return flatGroup; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"flatRollup\", function() { return flatRollup; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"rollup\", function() { return rollup; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"rollups\", function() { return rollups; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"index\", function() { return index; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"indexes\", function() { return indexes; });\n/* harmony import */ var internmap__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! internmap */ \"./node_modules/internmap/src/index.js\");\n/* harmony import */ var _identity_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./identity.js */ \"./node_modules/d3-geo/node_modules/d3-array/src/identity.js\");\n\n\n\nfunction group(values, ...keys) {\n  return nest(values, _identity_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"], _identity_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"], keys);\n}\n\nfunction groups(values, ...keys) {\n  return nest(values, Array.from, _identity_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"], keys);\n}\n\nfunction flatten(groups, keys) {\n  for (let i = 1, n = keys.length; i < n; ++i) {\n    groups = groups.flatMap(g => g.pop().map(([key, value]) => [...g, key, value]));\n  }\n  return groups;\n}\n\nfunction flatGroup(values, ...keys) {\n  return flatten(groups(values, ...keys), keys);\n}\n\nfunction flatRollup(values, reduce, ...keys) {\n  return flatten(rollups(values, reduce, ...keys), keys);\n}\n\nfunction rollup(values, reduce, ...keys) {\n  return nest(values, _identity_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"], reduce, keys);\n}\n\nfunction rollups(values, reduce, ...keys) {\n  return nest(values, Array.from, reduce, keys);\n}\n\nfunction index(values, ...keys) {\n  return nest(values, _identity_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"], unique, keys);\n}\n\nfunction indexes(values, ...keys) {\n  return nest(values, Array.from, unique, keys);\n}\n\nfunction unique(values) {\n  if (values.length !== 1) throw new Error(\"duplicate key\");\n  return values[0];\n}\n\nfunction nest(values, map, reduce, keys) {\n  return (function regroup(values, i) {\n    if (i >= keys.length) return reduce(values);\n    const groups = new internmap__WEBPACK_IMPORTED_MODULE_0__[\"InternMap\"]();\n    const keyof = keys[i++];\n    let index = -1;\n    for (const value of values) {\n      const key = keyof(value, ++index, values);\n      const group = groups.get(key);\n      if (group) group.push(value);\n      else groups.set(key, [value]);\n    }\n    for (const [key, values] of groups) {\n      groups.set(key, regroup(values, i));\n    }\n    return map(groups);\n  })(values, 0);\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-geo/node_modules/d3-array/src/groupSort.js\":\n/*!********************************************************************!*\\\n  !*** ./node_modules/d3-geo/node_modules/d3-array/src/groupSort.js ***!\n  \\********************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return groupSort; });\n/* harmony import */ var _ascending_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ascending.js */ \"./node_modules/d3-geo/node_modules/d3-array/src/ascending.js\");\n/* harmony import */ var _group_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./group.js */ \"./node_modules/d3-geo/node_modules/d3-array/src/group.js\");\n/* harmony import */ var _sort_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./sort.js */ \"./node_modules/d3-geo/node_modules/d3-array/src/sort.js\");\n\n\n\n\nfunction groupSort(values, reduce, key) {\n  return (reduce.length === 1\n    ? Object(_sort_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(Object(_group_js__WEBPACK_IMPORTED_MODULE_1__[\"rollup\"])(values, reduce, key), (([ak, av], [bk, bv]) => Object(_ascending_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(av, bv) || Object(_ascending_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(ak, bk)))\n    : Object(_sort_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(Object(_group_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(values, key), (([ak, av], [bk, bv]) => reduce(av, bv) || Object(_ascending_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(ak, bk))))\n    .map(([key]) => key);\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-geo/node_modules/d3-array/src/identity.js\":\n/*!*******************************************************************!*\\\n  !*** ./node_modules/d3-geo/node_modules/d3-array/src/identity.js ***!\n  \\*******************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(x) {\n  return x;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-geo/node_modules/d3-array/src/index.js\":\n/*!****************************************************************!*\\\n  !*** ./node_modules/d3-geo/node_modules/d3-array/src/index.js ***!\n  \\****************************************************************/\n/*! exports provided: bisect, bisectRight, bisectLeft, bisectCenter, ascending, bisector, count, cross, cumsum, descending, deviation, extent, Adder, fsum, fcumsum, group, flatGroup, flatRollup, groups, index, indexes, rollup, rollups, groupSort, bin, histogram, thresholdFreedmanDiaconis, thresholdScott, thresholdSturges, max, maxIndex, mean, median, merge, min, minIndex, mode, nice, pairs, permute, quantile, quantileSorted, quickselect, range, least, leastIndex, greatest, greatestIndex, scan, shuffle, shuffler, sum, ticks, tickIncrement, tickStep, transpose, variance, zip, every, some, filter, map, reduce, reverse, sort, difference, disjoint, intersection, subset, superset, union, InternMap, InternSet */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _bisect_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./bisect.js */ \"./node_modules/d3-geo/node_modules/d3-array/src/bisect.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"bisect\", function() { return _bisect_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"bisectRight\", function() { return _bisect_js__WEBPACK_IMPORTED_MODULE_0__[\"bisectRight\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"bisectLeft\", function() { return _bisect_js__WEBPACK_IMPORTED_MODULE_0__[\"bisectLeft\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"bisectCenter\", function() { return _bisect_js__WEBPACK_IMPORTED_MODULE_0__[\"bisectCenter\"]; });\n\n/* harmony import */ var _ascending_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./ascending.js */ \"./node_modules/d3-geo/node_modules/d3-array/src/ascending.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"ascending\", function() { return _ascending_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"]; });\n\n/* harmony import */ var _bisector_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./bisector.js */ \"./node_modules/d3-geo/node_modules/d3-array/src/bisector.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"bisector\", function() { return _bisector_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"]; });\n\n/* harmony import */ var _count_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./count.js */ \"./node_modules/d3-geo/node_modules/d3-array/src/count.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"count\", function() { return _count_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"]; });\n\n/* harmony import */ var _cross_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./cross.js */ \"./node_modules/d3-geo/node_modules/d3-array/src/cross.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"cross\", function() { return _cross_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"]; });\n\n/* harmony import */ var _cumsum_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./cumsum.js */ \"./node_modules/d3-geo/node_modules/d3-array/src/cumsum.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"cumsum\", function() { return _cumsum_js__WEBPACK_IMPORTED_MODULE_5__[\"default\"]; });\n\n/* harmony import */ var _descending_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./descending.js */ \"./node_modules/d3-geo/node_modules/d3-array/src/descending.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"descending\", function() { return _descending_js__WEBPACK_IMPORTED_MODULE_6__[\"default\"]; });\n\n/* harmony import */ var _deviation_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./deviation.js */ \"./node_modules/d3-geo/node_modules/d3-array/src/deviation.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"deviation\", function() { return _deviation_js__WEBPACK_IMPORTED_MODULE_7__[\"default\"]; });\n\n/* harmony import */ var _extent_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./extent.js */ \"./node_modules/d3-geo/node_modules/d3-array/src/extent.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"extent\", function() { return _extent_js__WEBPACK_IMPORTED_MODULE_8__[\"default\"]; });\n\n/* harmony import */ var _fsum_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./fsum.js */ \"./node_modules/d3-geo/node_modules/d3-array/src/fsum.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"Adder\", function() { return _fsum_js__WEBPACK_IMPORTED_MODULE_9__[\"Adder\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"fsum\", function() { return _fsum_js__WEBPACK_IMPORTED_MODULE_9__[\"fsum\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"fcumsum\", function() { return _fsum_js__WEBPACK_IMPORTED_MODULE_9__[\"fcumsum\"]; });\n\n/* harmony import */ var _group_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./group.js */ \"./node_modules/d3-geo/node_modules/d3-array/src/group.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"group\", function() { return _group_js__WEBPACK_IMPORTED_MODULE_10__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"flatGroup\", function() { return _group_js__WEBPACK_IMPORTED_MODULE_10__[\"flatGroup\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"flatRollup\", function() { return _group_js__WEBPACK_IMPORTED_MODULE_10__[\"flatRollup\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"groups\", function() { return _group_js__WEBPACK_IMPORTED_MODULE_10__[\"groups\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"index\", function() { return _group_js__WEBPACK_IMPORTED_MODULE_10__[\"index\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"indexes\", function() { return _group_js__WEBPACK_IMPORTED_MODULE_10__[\"indexes\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"rollup\", function() { return _group_js__WEBPACK_IMPORTED_MODULE_10__[\"rollup\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"rollups\", function() { return _group_js__WEBPACK_IMPORTED_MODULE_10__[\"rollups\"]; });\n\n/* harmony import */ var _groupSort_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./groupSort.js */ \"./node_modules/d3-geo/node_modules/d3-array/src/groupSort.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"groupSort\", function() { return _groupSort_js__WEBPACK_IMPORTED_MODULE_11__[\"default\"]; });\n\n/* harmony import */ var _bin_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./bin.js */ \"./node_modules/d3-geo/node_modules/d3-array/src/bin.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"bin\", function() { return _bin_js__WEBPACK_IMPORTED_MODULE_12__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"histogram\", function() { return _bin_js__WEBPACK_IMPORTED_MODULE_12__[\"default\"]; });\n\n/* harmony import */ var _threshold_freedmanDiaconis_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./threshold/freedmanDiaconis.js */ \"./node_modules/d3-geo/node_modules/d3-array/src/threshold/freedmanDiaconis.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"thresholdFreedmanDiaconis\", function() { return _threshold_freedmanDiaconis_js__WEBPACK_IMPORTED_MODULE_13__[\"default\"]; });\n\n/* harmony import */ var _threshold_scott_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./threshold/scott.js */ \"./node_modules/d3-geo/node_modules/d3-array/src/threshold/scott.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"thresholdScott\", function() { return _threshold_scott_js__WEBPACK_IMPORTED_MODULE_14__[\"default\"]; });\n\n/* harmony import */ var _threshold_sturges_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./threshold/sturges.js */ \"./node_modules/d3-geo/node_modules/d3-array/src/threshold/sturges.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"thresholdSturges\", function() { return _threshold_sturges_js__WEBPACK_IMPORTED_MODULE_15__[\"default\"]; });\n\n/* harmony import */ var _max_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./max.js */ \"./node_modules/d3-geo/node_modules/d3-array/src/max.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"max\", function() { return _max_js__WEBPACK_IMPORTED_MODULE_16__[\"default\"]; });\n\n/* harmony import */ var _maxIndex_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./maxIndex.js */ \"./node_modules/d3-geo/node_modules/d3-array/src/maxIndex.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"maxIndex\", function() { return _maxIndex_js__WEBPACK_IMPORTED_MODULE_17__[\"default\"]; });\n\n/* harmony import */ var _mean_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./mean.js */ \"./node_modules/d3-geo/node_modules/d3-array/src/mean.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"mean\", function() { return _mean_js__WEBPACK_IMPORTED_MODULE_18__[\"default\"]; });\n\n/* harmony import */ var _median_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./median.js */ \"./node_modules/d3-geo/node_modules/d3-array/src/median.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"median\", function() { return _median_js__WEBPACK_IMPORTED_MODULE_19__[\"default\"]; });\n\n/* harmony import */ var _merge_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./merge.js */ \"./node_modules/d3-geo/node_modules/d3-array/src/merge.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"merge\", function() { return _merge_js__WEBPACK_IMPORTED_MODULE_20__[\"default\"]; });\n\n/* harmony import */ var _min_js__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./min.js */ \"./node_modules/d3-geo/node_modules/d3-array/src/min.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"min\", function() { return _min_js__WEBPACK_IMPORTED_MODULE_21__[\"default\"]; });\n\n/* harmony import */ var _minIndex_js__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./minIndex.js */ \"./node_modules/d3-geo/node_modules/d3-array/src/minIndex.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"minIndex\", function() { return _minIndex_js__WEBPACK_IMPORTED_MODULE_22__[\"default\"]; });\n\n/* harmony import */ var _mode_js__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./mode.js */ \"./node_modules/d3-geo/node_modules/d3-array/src/mode.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"mode\", function() { return _mode_js__WEBPACK_IMPORTED_MODULE_23__[\"default\"]; });\n\n/* harmony import */ var _nice_js__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ./nice.js */ \"./node_modules/d3-geo/node_modules/d3-array/src/nice.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"nice\", function() { return _nice_js__WEBPACK_IMPORTED_MODULE_24__[\"default\"]; });\n\n/* harmony import */ var _pairs_js__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ./pairs.js */ \"./node_modules/d3-geo/node_modules/d3-array/src/pairs.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"pairs\", function() { return _pairs_js__WEBPACK_IMPORTED_MODULE_25__[\"default\"]; });\n\n/* harmony import */ var _permute_js__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ./permute.js */ \"./node_modules/d3-geo/node_modules/d3-array/src/permute.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"permute\", function() { return _permute_js__WEBPACK_IMPORTED_MODULE_26__[\"default\"]; });\n\n/* harmony import */ var _quantile_js__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ./quantile.js */ \"./node_modules/d3-geo/node_modules/d3-array/src/quantile.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"quantile\", function() { return _quantile_js__WEBPACK_IMPORTED_MODULE_27__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"quantileSorted\", function() { return _quantile_js__WEBPACK_IMPORTED_MODULE_27__[\"quantileSorted\"]; });\n\n/* harmony import */ var _quickselect_js__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ./quickselect.js */ \"./node_modules/d3-geo/node_modules/d3-array/src/quickselect.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"quickselect\", function() { return _quickselect_js__WEBPACK_IMPORTED_MODULE_28__[\"default\"]; });\n\n/* harmony import */ var _range_js__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ./range.js */ \"./node_modules/d3-geo/node_modules/d3-array/src/range.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"range\", function() { return _range_js__WEBPACK_IMPORTED_MODULE_29__[\"default\"]; });\n\n/* harmony import */ var _least_js__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ./least.js */ \"./node_modules/d3-geo/node_modules/d3-array/src/least.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"least\", function() { return _least_js__WEBPACK_IMPORTED_MODULE_30__[\"default\"]; });\n\n/* harmony import */ var _leastIndex_js__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ./leastIndex.js */ \"./node_modules/d3-geo/node_modules/d3-array/src/leastIndex.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"leastIndex\", function() { return _leastIndex_js__WEBPACK_IMPORTED_MODULE_31__[\"default\"]; });\n\n/* harmony import */ var _greatest_js__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ./greatest.js */ \"./node_modules/d3-geo/node_modules/d3-array/src/greatest.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"greatest\", function() { return _greatest_js__WEBPACK_IMPORTED_MODULE_32__[\"default\"]; });\n\n/* harmony import */ var _greatestIndex_js__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! ./greatestIndex.js */ \"./node_modules/d3-geo/node_modules/d3-array/src/greatestIndex.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"greatestIndex\", function() { return _greatestIndex_js__WEBPACK_IMPORTED_MODULE_33__[\"default\"]; });\n\n/* harmony import */ var _scan_js__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! ./scan.js */ \"./node_modules/d3-geo/node_modules/d3-array/src/scan.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"scan\", function() { return _scan_js__WEBPACK_IMPORTED_MODULE_34__[\"default\"]; });\n\n/* harmony import */ var _shuffle_js__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(/*! ./shuffle.js */ \"./node_modules/d3-geo/node_modules/d3-array/src/shuffle.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"shuffle\", function() { return _shuffle_js__WEBPACK_IMPORTED_MODULE_35__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"shuffler\", function() { return _shuffle_js__WEBPACK_IMPORTED_MODULE_35__[\"shuffler\"]; });\n\n/* harmony import */ var _sum_js__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(/*! ./sum.js */ \"./node_modules/d3-geo/node_modules/d3-array/src/sum.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"sum\", function() { return _sum_js__WEBPACK_IMPORTED_MODULE_36__[\"default\"]; });\n\n/* harmony import */ var _ticks_js__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(/*! ./ticks.js */ \"./node_modules/d3-geo/node_modules/d3-array/src/ticks.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"ticks\", function() { return _ticks_js__WEBPACK_IMPORTED_MODULE_37__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"tickIncrement\", function() { return _ticks_js__WEBPACK_IMPORTED_MODULE_37__[\"tickIncrement\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"tickStep\", function() { return _ticks_js__WEBPACK_IMPORTED_MODULE_37__[\"tickStep\"]; });\n\n/* harmony import */ var _transpose_js__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(/*! ./transpose.js */ \"./node_modules/d3-geo/node_modules/d3-array/src/transpose.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"transpose\", function() { return _transpose_js__WEBPACK_IMPORTED_MODULE_38__[\"default\"]; });\n\n/* harmony import */ var _variance_js__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__(/*! ./variance.js */ \"./node_modules/d3-geo/node_modules/d3-array/src/variance.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"variance\", function() { return _variance_js__WEBPACK_IMPORTED_MODULE_39__[\"default\"]; });\n\n/* harmony import */ var _zip_js__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__(/*! ./zip.js */ \"./node_modules/d3-geo/node_modules/d3-array/src/zip.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"zip\", function() { return _zip_js__WEBPACK_IMPORTED_MODULE_40__[\"default\"]; });\n\n/* harmony import */ var _every_js__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__(/*! ./every.js */ \"./node_modules/d3-geo/node_modules/d3-array/src/every.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"every\", function() { return _every_js__WEBPACK_IMPORTED_MODULE_41__[\"default\"]; });\n\n/* harmony import */ var _some_js__WEBPACK_IMPORTED_MODULE_42__ = __webpack_require__(/*! ./some.js */ \"./node_modules/d3-geo/node_modules/d3-array/src/some.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"some\", function() { return _some_js__WEBPACK_IMPORTED_MODULE_42__[\"default\"]; });\n\n/* harmony import */ var _filter_js__WEBPACK_IMPORTED_MODULE_43__ = __webpack_require__(/*! ./filter.js */ \"./node_modules/d3-geo/node_modules/d3-array/src/filter.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"filter\", function() { return _filter_js__WEBPACK_IMPORTED_MODULE_43__[\"default\"]; });\n\n/* harmony import */ var _map_js__WEBPACK_IMPORTED_MODULE_44__ = __webpack_require__(/*! ./map.js */ \"./node_modules/d3-geo/node_modules/d3-array/src/map.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"map\", function() { return _map_js__WEBPACK_IMPORTED_MODULE_44__[\"default\"]; });\n\n/* harmony import */ var _reduce_js__WEBPACK_IMPORTED_MODULE_45__ = __webpack_require__(/*! ./reduce.js */ \"./node_modules/d3-geo/node_modules/d3-array/src/reduce.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"reduce\", function() { return _reduce_js__WEBPACK_IMPORTED_MODULE_45__[\"default\"]; });\n\n/* harmony import */ var _reverse_js__WEBPACK_IMPORTED_MODULE_46__ = __webpack_require__(/*! ./reverse.js */ \"./node_modules/d3-geo/node_modules/d3-array/src/reverse.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"reverse\", function() { return _reverse_js__WEBPACK_IMPORTED_MODULE_46__[\"default\"]; });\n\n/* harmony import */ var _sort_js__WEBPACK_IMPORTED_MODULE_47__ = __webpack_require__(/*! ./sort.js */ \"./node_modules/d3-geo/node_modules/d3-array/src/sort.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"sort\", function() { return _sort_js__WEBPACK_IMPORTED_MODULE_47__[\"default\"]; });\n\n/* harmony import */ var _difference_js__WEBPACK_IMPORTED_MODULE_48__ = __webpack_require__(/*! ./difference.js */ \"./node_modules/d3-geo/node_modules/d3-array/src/difference.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"difference\", function() { return _difference_js__WEBPACK_IMPORTED_MODULE_48__[\"default\"]; });\n\n/* harmony import */ var _disjoint_js__WEBPACK_IMPORTED_MODULE_49__ = __webpack_require__(/*! ./disjoint.js */ \"./node_modules/d3-geo/node_modules/d3-array/src/disjoint.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"disjoint\", function() { return _disjoint_js__WEBPACK_IMPORTED_MODULE_49__[\"default\"]; });\n\n/* harmony import */ var _intersection_js__WEBPACK_IMPORTED_MODULE_50__ = __webpack_require__(/*! ./intersection.js */ \"./node_modules/d3-geo/node_modules/d3-array/src/intersection.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"intersection\", function() { return _intersection_js__WEBPACK_IMPORTED_MODULE_50__[\"default\"]; });\n\n/* harmony import */ var _subset_js__WEBPACK_IMPORTED_MODULE_51__ = __webpack_require__(/*! ./subset.js */ \"./node_modules/d3-geo/node_modules/d3-array/src/subset.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"subset\", function() { return _subset_js__WEBPACK_IMPORTED_MODULE_51__[\"default\"]; });\n\n/* harmony import */ var _superset_js__WEBPACK_IMPORTED_MODULE_52__ = __webpack_require__(/*! ./superset.js */ \"./node_modules/d3-geo/node_modules/d3-array/src/superset.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"superset\", function() { return _superset_js__WEBPACK_IMPORTED_MODULE_52__[\"default\"]; });\n\n/* harmony import */ var _union_js__WEBPACK_IMPORTED_MODULE_53__ = __webpack_require__(/*! ./union.js */ \"./node_modules/d3-geo/node_modules/d3-array/src/union.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"union\", function() { return _union_js__WEBPACK_IMPORTED_MODULE_53__[\"default\"]; });\n\n/* harmony import */ var internmap__WEBPACK_IMPORTED_MODULE_54__ = __webpack_require__(/*! internmap */ \"./node_modules/internmap/src/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"InternMap\", function() { return internmap__WEBPACK_IMPORTED_MODULE_54__[\"InternMap\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"InternSet\", function() { return internmap__WEBPACK_IMPORTED_MODULE_54__[\"InternSet\"]; });\n\n\n\n\n\n\n\n\n\n\n\n\n\n // Deprecated; use bin.\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n // Deprecated; use leastIndex.\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-geo/node_modules/d3-array/src/intersection.js\":\n/*!***********************************************************************!*\\\n  !*** ./node_modules/d3-geo/node_modules/d3-array/src/intersection.js ***!\n  \\***********************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return intersection; });\n/* harmony import */ var _set_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./set.js */ \"./node_modules/d3-geo/node_modules/d3-array/src/set.js\");\n\n\nfunction intersection(values, ...others) {\n  values = new Set(values);\n  others = others.map(_set_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]);\n  out: for (const value of values) {\n    for (const other of others) {\n      if (!other.has(value)) {\n        values.delete(value);\n        continue out;\n      }\n    }\n  }\n  return values;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-geo/node_modules/d3-array/src/least.js\":\n/*!****************************************************************!*\\\n  !*** ./node_modules/d3-geo/node_modules/d3-array/src/least.js ***!\n  \\****************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return least; });\n/* harmony import */ var _ascending_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ascending.js */ \"./node_modules/d3-geo/node_modules/d3-array/src/ascending.js\");\n\n\nfunction least(values, compare = _ascending_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]) {\n  let min;\n  let defined = false;\n  if (compare.length === 1) {\n    let minValue;\n    for (const element of values) {\n      const value = compare(element);\n      if (defined\n          ? Object(_ascending_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(value, minValue) < 0\n          : Object(_ascending_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(value, value) === 0) {\n        min = element;\n        minValue = value;\n        defined = true;\n      }\n    }\n  } else {\n    for (const value of values) {\n      if (defined\n          ? compare(value, min) < 0\n          : compare(value, value) === 0) {\n        min = value;\n        defined = true;\n      }\n    }\n  }\n  return min;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-geo/node_modules/d3-array/src/leastIndex.js\":\n/*!*********************************************************************!*\\\n  !*** ./node_modules/d3-geo/node_modules/d3-array/src/leastIndex.js ***!\n  \\*********************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return leastIndex; });\n/* harmony import */ var _ascending_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ascending.js */ \"./node_modules/d3-geo/node_modules/d3-array/src/ascending.js\");\n/* harmony import */ var _minIndex_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./minIndex.js */ \"./node_modules/d3-geo/node_modules/d3-array/src/minIndex.js\");\n\n\n\nfunction leastIndex(values, compare = _ascending_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]) {\n  if (compare.length === 1) return Object(_minIndex_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(values, compare);\n  let minValue;\n  let min = -1;\n  let index = -1;\n  for (const value of values) {\n    ++index;\n    if (min < 0\n        ? compare(value, value) === 0\n        : compare(value, minValue) < 0) {\n      minValue = value;\n      min = index;\n    }\n  }\n  return min;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-geo/node_modules/d3-array/src/map.js\":\n/*!**************************************************************!*\\\n  !*** ./node_modules/d3-geo/node_modules/d3-array/src/map.js ***!\n  \\**************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return map; });\nfunction map(values, mapper) {\n  if (typeof values[Symbol.iterator] !== \"function\") throw new TypeError(\"values is not iterable\");\n  if (typeof mapper !== \"function\") throw new TypeError(\"mapper is not a function\");\n  return Array.from(values, (value, index) => mapper(value, index, values));\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-geo/node_modules/d3-array/src/max.js\":\n/*!**************************************************************!*\\\n  !*** ./node_modules/d3-geo/node_modules/d3-array/src/max.js ***!\n  \\**************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return max; });\nfunction max(values, valueof) {\n  let max;\n  if (valueof === undefined) {\n    for (const value of values) {\n      if (value != null\n          && (max < value || (max === undefined && value >= value))) {\n        max = value;\n      }\n    }\n  } else {\n    let index = -1;\n    for (let value of values) {\n      if ((value = valueof(value, ++index, values)) != null\n          && (max < value || (max === undefined && value >= value))) {\n        max = value;\n      }\n    }\n  }\n  return max;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-geo/node_modules/d3-array/src/maxIndex.js\":\n/*!*******************************************************************!*\\\n  !*** ./node_modules/d3-geo/node_modules/d3-array/src/maxIndex.js ***!\n  \\*******************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return maxIndex; });\nfunction maxIndex(values, valueof) {\n  let max;\n  let maxIndex = -1;\n  let index = -1;\n  if (valueof === undefined) {\n    for (const value of values) {\n      ++index;\n      if (value != null\n          && (max < value || (max === undefined && value >= value))) {\n        max = value, maxIndex = index;\n      }\n    }\n  } else {\n    for (let value of values) {\n      if ((value = valueof(value, ++index, values)) != null\n          && (max < value || (max === undefined && value >= value))) {\n        max = value, maxIndex = index;\n      }\n    }\n  }\n  return maxIndex;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-geo/node_modules/d3-array/src/mean.js\":\n/*!***************************************************************!*\\\n  !*** ./node_modules/d3-geo/node_modules/d3-array/src/mean.js ***!\n  \\***************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return mean; });\nfunction mean(values, valueof) {\n  let count = 0;\n  let sum = 0;\n  if (valueof === undefined) {\n    for (let value of values) {\n      if (value != null && (value = +value) >= value) {\n        ++count, sum += value;\n      }\n    }\n  } else {\n    let index = -1;\n    for (let value of values) {\n      if ((value = valueof(value, ++index, values)) != null && (value = +value) >= value) {\n        ++count, sum += value;\n      }\n    }\n  }\n  if (count) return sum / count;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-geo/node_modules/d3-array/src/median.js\":\n/*!*****************************************************************!*\\\n  !*** ./node_modules/d3-geo/node_modules/d3-array/src/median.js ***!\n  \\*****************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _quantile_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./quantile.js */ \"./node_modules/d3-geo/node_modules/d3-array/src/quantile.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(values, valueof) {\n  return Object(_quantile_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(values, 0.5, valueof);\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-geo/node_modules/d3-array/src/merge.js\":\n/*!****************************************************************!*\\\n  !*** ./node_modules/d3-geo/node_modules/d3-array/src/merge.js ***!\n  \\****************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return merge; });\nfunction* flatten(arrays) {\n  for (const array of arrays) {\n    yield* array;\n  }\n}\n\nfunction merge(arrays) {\n  return Array.from(flatten(arrays));\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-geo/node_modules/d3-array/src/min.js\":\n/*!**************************************************************!*\\\n  !*** ./node_modules/d3-geo/node_modules/d3-array/src/min.js ***!\n  \\**************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return min; });\nfunction min(values, valueof) {\n  let min;\n  if (valueof === undefined) {\n    for (const value of values) {\n      if (value != null\n          && (min > value || (min === undefined && value >= value))) {\n        min = value;\n      }\n    }\n  } else {\n    let index = -1;\n    for (let value of values) {\n      if ((value = valueof(value, ++index, values)) != null\n          && (min > value || (min === undefined && value >= value))) {\n        min = value;\n      }\n    }\n  }\n  return min;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-geo/node_modules/d3-array/src/minIndex.js\":\n/*!*******************************************************************!*\\\n  !*** ./node_modules/d3-geo/node_modules/d3-array/src/minIndex.js ***!\n  \\*******************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return minIndex; });\nfunction minIndex(values, valueof) {\n  let min;\n  let minIndex = -1;\n  let index = -1;\n  if (valueof === undefined) {\n    for (const value of values) {\n      ++index;\n      if (value != null\n          && (min > value || (min === undefined && value >= value))) {\n        min = value, minIndex = index;\n      }\n    }\n  } else {\n    for (let value of values) {\n      if ((value = valueof(value, ++index, values)) != null\n          && (min > value || (min === undefined && value >= value))) {\n        min = value, minIndex = index;\n      }\n    }\n  }\n  return minIndex;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-geo/node_modules/d3-array/src/mode.js\":\n/*!***************************************************************!*\\\n  !*** ./node_modules/d3-geo/node_modules/d3-array/src/mode.js ***!\n  \\***************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var internmap__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! internmap */ \"./node_modules/internmap/src/index.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(values, valueof) {\n  const counts = new internmap__WEBPACK_IMPORTED_MODULE_0__[\"InternMap\"]();\n  if (valueof === undefined) {\n    for (let value of values) {\n      if (value != null && value >= value) {\n        counts.set(value, (counts.get(value) || 0) + 1);\n      }\n    }\n  } else {\n    let index = -1;\n    for (let value of values) {\n      if ((value = valueof(value, ++index, values)) != null && value >= value) {\n        counts.set(value, (counts.get(value) || 0) + 1);\n      }\n    }\n  }\n  let modeValue;\n  let modeCount = 0;\n  for (const [value, count] of counts) {\n    if (count > modeCount) {\n      modeCount = count;\n      modeValue = value;\n    }\n  }\n  return modeValue;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-geo/node_modules/d3-array/src/nice.js\":\n/*!***************************************************************!*\\\n  !*** ./node_modules/d3-geo/node_modules/d3-array/src/nice.js ***!\n  \\***************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return nice; });\n/* harmony import */ var _ticks_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ticks.js */ \"./node_modules/d3-geo/node_modules/d3-array/src/ticks.js\");\n\n\nfunction nice(start, stop, count) {\n  let prestep;\n  while (true) {\n    const step = Object(_ticks_js__WEBPACK_IMPORTED_MODULE_0__[\"tickIncrement\"])(start, stop, count);\n    if (step === prestep || step === 0 || !isFinite(step)) {\n      return [start, stop];\n    } else if (step > 0) {\n      start = Math.floor(start / step) * step;\n      stop = Math.ceil(stop / step) * step;\n    } else if (step < 0) {\n      start = Math.ceil(start * step) / step;\n      stop = Math.floor(stop * step) / step;\n    }\n    prestep = step;\n  }\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-geo/node_modules/d3-array/src/number.js\":\n/*!*****************************************************************!*\\\n  !*** ./node_modules/d3-geo/node_modules/d3-array/src/number.js ***!\n  \\*****************************************************************/\n/*! exports provided: default, numbers */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"numbers\", function() { return numbers; });\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(x) {\n  return x === null ? NaN : +x;\n});\n\nfunction* numbers(values, valueof) {\n  if (valueof === undefined) {\n    for (let value of values) {\n      if (value != null && (value = +value) >= value) {\n        yield value;\n      }\n    }\n  } else {\n    let index = -1;\n    for (let value of values) {\n      if ((value = valueof(value, ++index, values)) != null && (value = +value) >= value) {\n        yield value;\n      }\n    }\n  }\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-geo/node_modules/d3-array/src/pairs.js\":\n/*!****************************************************************!*\\\n  !*** ./node_modules/d3-geo/node_modules/d3-array/src/pairs.js ***!\n  \\****************************************************************/\n/*! exports provided: default, pair */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return pairs; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"pair\", function() { return pair; });\nfunction pairs(values, pairof = pair) {\n  const pairs = [];\n  let previous;\n  let first = false;\n  for (const value of values) {\n    if (first) pairs.push(pairof(previous, value));\n    previous = value;\n    first = true;\n  }\n  return pairs;\n}\n\nfunction pair(a, b) {\n  return [a, b];\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-geo/node_modules/d3-array/src/permute.js\":\n/*!******************************************************************!*\\\n  !*** ./node_modules/d3-geo/node_modules/d3-array/src/permute.js ***!\n  \\******************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(source, keys) {\n  return Array.from(keys, key => source[key]);\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-geo/node_modules/d3-array/src/quantile.js\":\n/*!*******************************************************************!*\\\n  !*** ./node_modules/d3-geo/node_modules/d3-array/src/quantile.js ***!\n  \\*******************************************************************/\n/*! exports provided: default, quantileSorted */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return quantile; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"quantileSorted\", function() { return quantileSorted; });\n/* harmony import */ var _max_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./max.js */ \"./node_modules/d3-geo/node_modules/d3-array/src/max.js\");\n/* harmony import */ var _min_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./min.js */ \"./node_modules/d3-geo/node_modules/d3-array/src/min.js\");\n/* harmony import */ var _quickselect_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./quickselect.js */ \"./node_modules/d3-geo/node_modules/d3-array/src/quickselect.js\");\n/* harmony import */ var _number_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./number.js */ \"./node_modules/d3-geo/node_modules/d3-array/src/number.js\");\n\n\n\n\n\nfunction quantile(values, p, valueof) {\n  values = Float64Array.from(Object(_number_js__WEBPACK_IMPORTED_MODULE_3__[\"numbers\"])(values, valueof));\n  if (!(n = values.length)) return;\n  if ((p = +p) <= 0 || n < 2) return Object(_min_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(values);\n  if (p >= 1) return Object(_max_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(values);\n  var n,\n      i = (n - 1) * p,\n      i0 = Math.floor(i),\n      value0 = Object(_max_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(Object(_quickselect_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(values, i0).subarray(0, i0 + 1)),\n      value1 = Object(_min_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(values.subarray(i0 + 1));\n  return value0 + (value1 - value0) * (i - i0);\n}\n\nfunction quantileSorted(values, p, valueof = _number_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"]) {\n  if (!(n = values.length)) return;\n  if ((p = +p) <= 0 || n < 2) return +valueof(values[0], 0, values);\n  if (p >= 1) return +valueof(values[n - 1], n - 1, values);\n  var n,\n      i = (n - 1) * p,\n      i0 = Math.floor(i),\n      value0 = +valueof(values[i0], i0, values),\n      value1 = +valueof(values[i0 + 1], i0 + 1, values);\n  return value0 + (value1 - value0) * (i - i0);\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-geo/node_modules/d3-array/src/quickselect.js\":\n/*!**********************************************************************!*\\\n  !*** ./node_modules/d3-geo/node_modules/d3-array/src/quickselect.js ***!\n  \\**********************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return quickselect; });\n/* harmony import */ var _ascending_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ascending.js */ \"./node_modules/d3-geo/node_modules/d3-array/src/ascending.js\");\n\n\n// Based on https://github.com/mourner/quickselect\n// ISC license, Copyright 2018 Vladimir Agafonkin.\nfunction quickselect(array, k, left = 0, right = array.length - 1, compare = _ascending_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]) {\n  while (right > left) {\n    if (right - left > 600) {\n      const n = right - left + 1;\n      const m = k - left + 1;\n      const z = Math.log(n);\n      const s = 0.5 * Math.exp(2 * z / 3);\n      const sd = 0.5 * Math.sqrt(z * s * (n - s) / n) * (m - n / 2 < 0 ? -1 : 1);\n      const newLeft = Math.max(left, Math.floor(k - m * s / n + sd));\n      const newRight = Math.min(right, Math.floor(k + (n - m) * s / n + sd));\n      quickselect(array, k, newLeft, newRight, compare);\n    }\n\n    const t = array[k];\n    let i = left;\n    let j = right;\n\n    swap(array, left, k);\n    if (compare(array[right], t) > 0) swap(array, left, right);\n\n    while (i < j) {\n      swap(array, i, j), ++i, --j;\n      while (compare(array[i], t) < 0) ++i;\n      while (compare(array[j], t) > 0) --j;\n    }\n\n    if (compare(array[left], t) === 0) swap(array, left, j);\n    else ++j, swap(array, j, right);\n\n    if (j <= k) left = j + 1;\n    if (k <= j) right = j - 1;\n  }\n  return array;\n}\n\nfunction swap(array, i, j) {\n  const t = array[i];\n  array[i] = array[j];\n  array[j] = t;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-geo/node_modules/d3-array/src/range.js\":\n/*!****************************************************************!*\\\n  !*** ./node_modules/d3-geo/node_modules/d3-array/src/range.js ***!\n  \\****************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(start, stop, step) {\n  start = +start, stop = +stop, step = (n = arguments.length) < 2 ? (stop = start, start = 0, 1) : n < 3 ? 1 : +step;\n\n  var i = -1,\n      n = Math.max(0, Math.ceil((stop - start) / step)) | 0,\n      range = new Array(n);\n\n  while (++i < n) {\n    range[i] = start + i * step;\n  }\n\n  return range;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-geo/node_modules/d3-array/src/reduce.js\":\n/*!*****************************************************************!*\\\n  !*** ./node_modules/d3-geo/node_modules/d3-array/src/reduce.js ***!\n  \\*****************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return reduce; });\nfunction reduce(values, reducer, value) {\n  if (typeof reducer !== \"function\") throw new TypeError(\"reducer is not a function\");\n  const iterator = values[Symbol.iterator]();\n  let done, next, index = -1;\n  if (arguments.length < 3) {\n    ({done, value} = iterator.next());\n    if (done) return;\n    ++index;\n  }\n  while (({done, value: next} = iterator.next()), !done) {\n    value = reducer(value, next, ++index, values);\n  }\n  return value;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-geo/node_modules/d3-array/src/reverse.js\":\n/*!******************************************************************!*\\\n  !*** ./node_modules/d3-geo/node_modules/d3-array/src/reverse.js ***!\n  \\******************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return reverse; });\nfunction reverse(values) {\n  if (typeof values[Symbol.iterator] !== \"function\") throw new TypeError(\"values is not iterable\");\n  return Array.from(values).reverse();\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-geo/node_modules/d3-array/src/scan.js\":\n/*!***************************************************************!*\\\n  !*** ./node_modules/d3-geo/node_modules/d3-array/src/scan.js ***!\n  \\***************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return scan; });\n/* harmony import */ var _leastIndex_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./leastIndex.js */ \"./node_modules/d3-geo/node_modules/d3-array/src/leastIndex.js\");\n\n\nfunction scan(values, compare) {\n  const index = Object(_leastIndex_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(values, compare);\n  return index < 0 ? undefined : index;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-geo/node_modules/d3-array/src/set.js\":\n/*!**************************************************************!*\\\n  !*** ./node_modules/d3-geo/node_modules/d3-array/src/set.js ***!\n  \\**************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return set; });\nfunction set(values) {\n  return values instanceof Set ? values : new Set(values);\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-geo/node_modules/d3-array/src/shuffle.js\":\n/*!******************************************************************!*\\\n  !*** ./node_modules/d3-geo/node_modules/d3-array/src/shuffle.js ***!\n  \\******************************************************************/\n/*! exports provided: default, shuffler */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"shuffler\", function() { return shuffler; });\n/* harmony default export */ __webpack_exports__[\"default\"] = (shuffler(Math.random));\n\nfunction shuffler(random) {\n  return function shuffle(array, i0 = 0, i1 = array.length) {\n    let m = i1 - (i0 = +i0);\n    while (m) {\n      const i = random() * m-- | 0, t = array[m + i0];\n      array[m + i0] = array[i + i0];\n      array[i + i0] = t;\n    }\n    return array;\n  };\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-geo/node_modules/d3-array/src/some.js\":\n/*!***************************************************************!*\\\n  !*** ./node_modules/d3-geo/node_modules/d3-array/src/some.js ***!\n  \\***************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return some; });\nfunction some(values, test) {\n  if (typeof test !== \"function\") throw new TypeError(\"test is not a function\");\n  let index = -1;\n  for (const value of values) {\n    if (test(value, ++index, values)) {\n      return true;\n    }\n  }\n  return false;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-geo/node_modules/d3-array/src/sort.js\":\n/*!***************************************************************!*\\\n  !*** ./node_modules/d3-geo/node_modules/d3-array/src/sort.js ***!\n  \\***************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return sort; });\n/* harmony import */ var _ascending_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ascending.js */ \"./node_modules/d3-geo/node_modules/d3-array/src/ascending.js\");\n/* harmony import */ var _permute_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./permute.js */ \"./node_modules/d3-geo/node_modules/d3-array/src/permute.js\");\n\n\n\nfunction sort(values, ...F) {\n  if (typeof values[Symbol.iterator] !== \"function\") throw new TypeError(\"values is not iterable\");\n  values = Array.from(values);\n  let [f = _ascending_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]] = F;\n  if (f.length === 1 || F.length > 1) {\n    const index = Uint32Array.from(values, (d, i) => i);\n    if (F.length > 1) {\n      F = F.map(f => values.map(f));\n      index.sort((i, j) => {\n        for (const f of F) {\n          const c = Object(_ascending_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(f[i], f[j]);\n          if (c) return c;\n        }\n      });\n    } else {\n      f = values.map(f);\n      index.sort((i, j) => Object(_ascending_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(f[i], f[j]));\n    }\n    return Object(_permute_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(values, index);\n  }\n  return values.sort(f);\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-geo/node_modules/d3-array/src/subset.js\":\n/*!*****************************************************************!*\\\n  !*** ./node_modules/d3-geo/node_modules/d3-array/src/subset.js ***!\n  \\*****************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return subset; });\n/* harmony import */ var _superset_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./superset.js */ \"./node_modules/d3-geo/node_modules/d3-array/src/superset.js\");\n\n\nfunction subset(values, other) {\n  return Object(_superset_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(other, values);\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-geo/node_modules/d3-array/src/sum.js\":\n/*!**************************************************************!*\\\n  !*** ./node_modules/d3-geo/node_modules/d3-array/src/sum.js ***!\n  \\**************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return sum; });\nfunction sum(values, valueof) {\n  let sum = 0;\n  if (valueof === undefined) {\n    for (let value of values) {\n      if (value = +value) {\n        sum += value;\n      }\n    }\n  } else {\n    let index = -1;\n    for (let value of values) {\n      if (value = +valueof(value, ++index, values)) {\n        sum += value;\n      }\n    }\n  }\n  return sum;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-geo/node_modules/d3-array/src/superset.js\":\n/*!*******************************************************************!*\\\n  !*** ./node_modules/d3-geo/node_modules/d3-array/src/superset.js ***!\n  \\*******************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return superset; });\nfunction superset(values, other) {\n  const iterator = values[Symbol.iterator](), set = new Set();\n  for (const o of other) {\n    if (set.has(o)) continue;\n    let value, done;\n    while (({value, done} = iterator.next())) {\n      if (done) return false;\n      set.add(value);\n      if (Object.is(o, value)) break;\n    }\n  }\n  return true;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-geo/node_modules/d3-array/src/threshold/freedmanDiaconis.js\":\n/*!*************************************************************************************!*\\\n  !*** ./node_modules/d3-geo/node_modules/d3-array/src/threshold/freedmanDiaconis.js ***!\n  \\*************************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _count_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../count.js */ \"./node_modules/d3-geo/node_modules/d3-array/src/count.js\");\n/* harmony import */ var _quantile_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../quantile.js */ \"./node_modules/d3-geo/node_modules/d3-array/src/quantile.js\");\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(values, min, max) {\n  return Math.ceil((max - min) / (2 * (Object(_quantile_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(values, 0.75) - Object(_quantile_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(values, 0.25)) * Math.pow(Object(_count_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(values), -1 / 3)));\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-geo/node_modules/d3-array/src/threshold/scott.js\":\n/*!**************************************************************************!*\\\n  !*** ./node_modules/d3-geo/node_modules/d3-array/src/threshold/scott.js ***!\n  \\**************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _count_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../count.js */ \"./node_modules/d3-geo/node_modules/d3-array/src/count.js\");\n/* harmony import */ var _deviation_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../deviation.js */ \"./node_modules/d3-geo/node_modules/d3-array/src/deviation.js\");\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(values, min, max) {\n  return Math.ceil((max - min) / (3.5 * Object(_deviation_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(values) * Math.pow(Object(_count_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(values), -1 / 3)));\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-geo/node_modules/d3-array/src/threshold/sturges.js\":\n/*!****************************************************************************!*\\\n  !*** ./node_modules/d3-geo/node_modules/d3-array/src/threshold/sturges.js ***!\n  \\****************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _count_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../count.js */ \"./node_modules/d3-geo/node_modules/d3-array/src/count.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(values) {\n  return Math.ceil(Math.log(Object(_count_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(values)) / Math.LN2) + 1;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-geo/node_modules/d3-array/src/ticks.js\":\n/*!****************************************************************!*\\\n  !*** ./node_modules/d3-geo/node_modules/d3-array/src/ticks.js ***!\n  \\****************************************************************/\n/*! exports provided: default, tickIncrement, tickStep */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"tickIncrement\", function() { return tickIncrement; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"tickStep\", function() { return tickStep; });\nvar e10 = Math.sqrt(50),\n    e5 = Math.sqrt(10),\n    e2 = Math.sqrt(2);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(start, stop, count) {\n  var reverse,\n      i = -1,\n      n,\n      ticks,\n      step;\n\n  stop = +stop, start = +start, count = +count;\n  if (start === stop && count > 0) return [start];\n  if (reverse = stop < start) n = start, start = stop, stop = n;\n  if ((step = tickIncrement(start, stop, count)) === 0 || !isFinite(step)) return [];\n\n  if (step > 0) {\n    let r0 = Math.round(start / step), r1 = Math.round(stop / step);\n    if (r0 * step < start) ++r0;\n    if (r1 * step > stop) --r1;\n    ticks = new Array(n = r1 - r0 + 1);\n    while (++i < n) ticks[i] = (r0 + i) * step;\n  } else {\n    step = -step;\n    let r0 = Math.round(start * step), r1 = Math.round(stop * step);\n    if (r0 / step < start) ++r0;\n    if (r1 / step > stop) --r1;\n    ticks = new Array(n = r1 - r0 + 1);\n    while (++i < n) ticks[i] = (r0 + i) / step;\n  }\n\n  if (reverse) ticks.reverse();\n\n  return ticks;\n});\n\nfunction tickIncrement(start, stop, count) {\n  var step = (stop - start) / Math.max(0, count),\n      power = Math.floor(Math.log(step) / Math.LN10),\n      error = step / Math.pow(10, power);\n  return power >= 0\n      ? (error >= e10 ? 10 : error >= e5 ? 5 : error >= e2 ? 2 : 1) * Math.pow(10, power)\n      : -Math.pow(10, -power) / (error >= e10 ? 10 : error >= e5 ? 5 : error >= e2 ? 2 : 1);\n}\n\nfunction tickStep(start, stop, count) {\n  var step0 = Math.abs(stop - start) / Math.max(0, count),\n      step1 = Math.pow(10, Math.floor(Math.log(step0) / Math.LN10)),\n      error = step0 / step1;\n  if (error >= e10) step1 *= 10;\n  else if (error >= e5) step1 *= 5;\n  else if (error >= e2) step1 *= 2;\n  return stop < start ? -step1 : step1;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-geo/node_modules/d3-array/src/transpose.js\":\n/*!********************************************************************!*\\\n  !*** ./node_modules/d3-geo/node_modules/d3-array/src/transpose.js ***!\n  \\********************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _min_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./min.js */ \"./node_modules/d3-geo/node_modules/d3-array/src/min.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(matrix) {\n  if (!(n = matrix.length)) return [];\n  for (var i = -1, m = Object(_min_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(matrix, length), transpose = new Array(m); ++i < m;) {\n    for (var j = -1, n, row = transpose[i] = new Array(n); ++j < n;) {\n      row[j] = matrix[j][i];\n    }\n  }\n  return transpose;\n});\n\nfunction length(d) {\n  return d.length;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-geo/node_modules/d3-array/src/union.js\":\n/*!****************************************************************!*\\\n  !*** ./node_modules/d3-geo/node_modules/d3-array/src/union.js ***!\n  \\****************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return union; });\nfunction union(...others) {\n  const set = new Set();\n  for (const other of others) {\n    for (const o of other) {\n      set.add(o);\n    }\n  }\n  return set;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-geo/node_modules/d3-array/src/variance.js\":\n/*!*******************************************************************!*\\\n  !*** ./node_modules/d3-geo/node_modules/d3-array/src/variance.js ***!\n  \\*******************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return variance; });\nfunction variance(values, valueof) {\n  let count = 0;\n  let delta;\n  let mean = 0;\n  let sum = 0;\n  if (valueof === undefined) {\n    for (let value of values) {\n      if (value != null && (value = +value) >= value) {\n        delta = value - mean;\n        mean += delta / ++count;\n        sum += delta * (value - mean);\n      }\n    }\n  } else {\n    let index = -1;\n    for (let value of values) {\n      if ((value = valueof(value, ++index, values)) != null && (value = +value) >= value) {\n        delta = value - mean;\n        mean += delta / ++count;\n        sum += delta * (value - mean);\n      }\n    }\n  }\n  if (count > 1) return sum / (count - 1);\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-geo/node_modules/d3-array/src/zip.js\":\n/*!**************************************************************!*\\\n  !*** ./node_modules/d3-geo/node_modules/d3-array/src/zip.js ***!\n  \\**************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _transpose_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./transpose.js */ \"./node_modules/d3-geo/node_modules/d3-array/src/transpose.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  return Object(_transpose_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(arguments);\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-geo/src/area.js\":\n/*!*****************************************!*\\\n  !*** ./node_modules/d3-geo/src/area.js ***!\n  \\*****************************************/\n/*! exports provided: areaRingSum, areaStream, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"areaRingSum\", function() { return areaRingSum; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"areaStream\", function() { return areaStream; });\n/* harmony import */ var d3_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-array */ \"./node_modules/d3-geo/node_modules/d3-array/src/index.js\");\n/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./math.js */ \"./node_modules/d3-geo/src/math.js\");\n/* harmony import */ var _noop_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./noop.js */ \"./node_modules/d3-geo/src/noop.js\");\n/* harmony import */ var _stream_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./stream.js */ \"./node_modules/d3-geo/src/stream.js\");\n\n\n\n\n\nvar areaRingSum = new d3_array__WEBPACK_IMPORTED_MODULE_0__[\"Adder\"]();\n\n// hello?\n\nvar areaSum = new d3_array__WEBPACK_IMPORTED_MODULE_0__[\"Adder\"](),\n    lambda00,\n    phi00,\n    lambda0,\n    cosPhi0,\n    sinPhi0;\n\nvar areaStream = {\n  point: _noop_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"],\n  lineStart: _noop_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"],\n  lineEnd: _noop_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"],\n  polygonStart: function() {\n    areaRingSum = new d3_array__WEBPACK_IMPORTED_MODULE_0__[\"Adder\"]();\n    areaStream.lineStart = areaRingStart;\n    areaStream.lineEnd = areaRingEnd;\n  },\n  polygonEnd: function() {\n    var areaRing = +areaRingSum;\n    areaSum.add(areaRing < 0 ? _math_js__WEBPACK_IMPORTED_MODULE_1__[\"tau\"] + areaRing : areaRing);\n    this.lineStart = this.lineEnd = this.point = _noop_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"];\n  },\n  sphere: function() {\n    areaSum.add(_math_js__WEBPACK_IMPORTED_MODULE_1__[\"tau\"]);\n  }\n};\n\nfunction areaRingStart() {\n  areaStream.point = areaPointFirst;\n}\n\nfunction areaRingEnd() {\n  areaPoint(lambda00, phi00);\n}\n\nfunction areaPointFirst(lambda, phi) {\n  areaStream.point = areaPoint;\n  lambda00 = lambda, phi00 = phi;\n  lambda *= _math_js__WEBPACK_IMPORTED_MODULE_1__[\"radians\"], phi *= _math_js__WEBPACK_IMPORTED_MODULE_1__[\"radians\"];\n  lambda0 = lambda, cosPhi0 = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__[\"cos\"])(phi = phi / 2 + _math_js__WEBPACK_IMPORTED_MODULE_1__[\"quarterPi\"]), sinPhi0 = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__[\"sin\"])(phi);\n}\n\nfunction areaPoint(lambda, phi) {\n  lambda *= _math_js__WEBPACK_IMPORTED_MODULE_1__[\"radians\"], phi *= _math_js__WEBPACK_IMPORTED_MODULE_1__[\"radians\"];\n  phi = phi / 2 + _math_js__WEBPACK_IMPORTED_MODULE_1__[\"quarterPi\"]; // half the angular distance from south pole\n\n  // Spherical excess E for a spherical triangle with vertices: south pole,\n  // previous point, current point.  Uses a formula derived from Cagnoli’s\n  // theorem.  See Todhunter, Spherical Trig. (1871), Sec. 103, Eq. (2).\n  var dLambda = lambda - lambda0,\n      sdLambda = dLambda >= 0 ? 1 : -1,\n      adLambda = sdLambda * dLambda,\n      cosPhi = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__[\"cos\"])(phi),\n      sinPhi = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__[\"sin\"])(phi),\n      k = sinPhi0 * sinPhi,\n      u = cosPhi0 * cosPhi + k * Object(_math_js__WEBPACK_IMPORTED_MODULE_1__[\"cos\"])(adLambda),\n      v = k * sdLambda * Object(_math_js__WEBPACK_IMPORTED_MODULE_1__[\"sin\"])(adLambda);\n  areaRingSum.add(Object(_math_js__WEBPACK_IMPORTED_MODULE_1__[\"atan2\"])(v, u));\n\n  // Advance the previous points.\n  lambda0 = lambda, cosPhi0 = cosPhi, sinPhi0 = sinPhi;\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(object) {\n  areaSum = new d3_array__WEBPACK_IMPORTED_MODULE_0__[\"Adder\"]();\n  Object(_stream_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(object, areaStream);\n  return areaSum * 2;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-geo/src/bounds.js\":\n/*!*******************************************!*\\\n  !*** ./node_modules/d3-geo/src/bounds.js ***!\n  \\*******************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var d3_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-array */ \"./node_modules/d3-geo/node_modules/d3-array/src/index.js\");\n/* harmony import */ var _area_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./area.js */ \"./node_modules/d3-geo/src/area.js\");\n/* harmony import */ var _cartesian_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./cartesian.js */ \"./node_modules/d3-geo/src/cartesian.js\");\n/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./math.js */ \"./node_modules/d3-geo/src/math.js\");\n/* harmony import */ var _stream_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./stream.js */ \"./node_modules/d3-geo/src/stream.js\");\n\n\n\n\n\n\nvar lambda0, phi0, lambda1, phi1, // bounds\n    lambda2, // previous lambda-coordinate\n    lambda00, phi00, // first point\n    p0, // previous 3D point\n    deltaSum,\n    ranges,\n    range;\n\nvar boundsStream = {\n  point: boundsPoint,\n  lineStart: boundsLineStart,\n  lineEnd: boundsLineEnd,\n  polygonStart: function() {\n    boundsStream.point = boundsRingPoint;\n    boundsStream.lineStart = boundsRingStart;\n    boundsStream.lineEnd = boundsRingEnd;\n    deltaSum = new d3_array__WEBPACK_IMPORTED_MODULE_0__[\"Adder\"]();\n    _area_js__WEBPACK_IMPORTED_MODULE_1__[\"areaStream\"].polygonStart();\n  },\n  polygonEnd: function() {\n    _area_js__WEBPACK_IMPORTED_MODULE_1__[\"areaStream\"].polygonEnd();\n    boundsStream.point = boundsPoint;\n    boundsStream.lineStart = boundsLineStart;\n    boundsStream.lineEnd = boundsLineEnd;\n    if (_area_js__WEBPACK_IMPORTED_MODULE_1__[\"areaRingSum\"] < 0) lambda0 = -(lambda1 = 180), phi0 = -(phi1 = 90);\n    else if (deltaSum > _math_js__WEBPACK_IMPORTED_MODULE_3__[\"epsilon\"]) phi1 = 90;\n    else if (deltaSum < -_math_js__WEBPACK_IMPORTED_MODULE_3__[\"epsilon\"]) phi0 = -90;\n    range[0] = lambda0, range[1] = lambda1;\n  },\n  sphere: function() {\n    lambda0 = -(lambda1 = 180), phi0 = -(phi1 = 90);\n  }\n};\n\nfunction boundsPoint(lambda, phi) {\n  ranges.push(range = [lambda0 = lambda, lambda1 = lambda]);\n  if (phi < phi0) phi0 = phi;\n  if (phi > phi1) phi1 = phi;\n}\n\nfunction linePoint(lambda, phi) {\n  var p = Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_2__[\"cartesian\"])([lambda * _math_js__WEBPACK_IMPORTED_MODULE_3__[\"radians\"], phi * _math_js__WEBPACK_IMPORTED_MODULE_3__[\"radians\"]]);\n  if (p0) {\n    var normal = Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_2__[\"cartesianCross\"])(p0, p),\n        equatorial = [normal[1], -normal[0], 0],\n        inflection = Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_2__[\"cartesianCross\"])(equatorial, normal);\n    Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_2__[\"cartesianNormalizeInPlace\"])(inflection);\n    inflection = Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_2__[\"spherical\"])(inflection);\n    var delta = lambda - lambda2,\n        sign = delta > 0 ? 1 : -1,\n        lambdai = inflection[0] * _math_js__WEBPACK_IMPORTED_MODULE_3__[\"degrees\"] * sign,\n        phii,\n        antimeridian = Object(_math_js__WEBPACK_IMPORTED_MODULE_3__[\"abs\"])(delta) > 180;\n    if (antimeridian ^ (sign * lambda2 < lambdai && lambdai < sign * lambda)) {\n      phii = inflection[1] * _math_js__WEBPACK_IMPORTED_MODULE_3__[\"degrees\"];\n      if (phii > phi1) phi1 = phii;\n    } else if (lambdai = (lambdai + 360) % 360 - 180, antimeridian ^ (sign * lambda2 < lambdai && lambdai < sign * lambda)) {\n      phii = -inflection[1] * _math_js__WEBPACK_IMPORTED_MODULE_3__[\"degrees\"];\n      if (phii < phi0) phi0 = phii;\n    } else {\n      if (phi < phi0) phi0 = phi;\n      if (phi > phi1) phi1 = phi;\n    }\n    if (antimeridian) {\n      if (lambda < lambda2) {\n        if (angle(lambda0, lambda) > angle(lambda0, lambda1)) lambda1 = lambda;\n      } else {\n        if (angle(lambda, lambda1) > angle(lambda0, lambda1)) lambda0 = lambda;\n      }\n    } else {\n      if (lambda1 >= lambda0) {\n        if (lambda < lambda0) lambda0 = lambda;\n        if (lambda > lambda1) lambda1 = lambda;\n      } else {\n        if (lambda > lambda2) {\n          if (angle(lambda0, lambda) > angle(lambda0, lambda1)) lambda1 = lambda;\n        } else {\n          if (angle(lambda, lambda1) > angle(lambda0, lambda1)) lambda0 = lambda;\n        }\n      }\n    }\n  } else {\n    ranges.push(range = [lambda0 = lambda, lambda1 = lambda]);\n  }\n  if (phi < phi0) phi0 = phi;\n  if (phi > phi1) phi1 = phi;\n  p0 = p, lambda2 = lambda;\n}\n\nfunction boundsLineStart() {\n  boundsStream.point = linePoint;\n}\n\nfunction boundsLineEnd() {\n  range[0] = lambda0, range[1] = lambda1;\n  boundsStream.point = boundsPoint;\n  p0 = null;\n}\n\nfunction boundsRingPoint(lambda, phi) {\n  if (p0) {\n    var delta = lambda - lambda2;\n    deltaSum.add(Object(_math_js__WEBPACK_IMPORTED_MODULE_3__[\"abs\"])(delta) > 180 ? delta + (delta > 0 ? 360 : -360) : delta);\n  } else {\n    lambda00 = lambda, phi00 = phi;\n  }\n  _area_js__WEBPACK_IMPORTED_MODULE_1__[\"areaStream\"].point(lambda, phi);\n  linePoint(lambda, phi);\n}\n\nfunction boundsRingStart() {\n  _area_js__WEBPACK_IMPORTED_MODULE_1__[\"areaStream\"].lineStart();\n}\n\nfunction boundsRingEnd() {\n  boundsRingPoint(lambda00, phi00);\n  _area_js__WEBPACK_IMPORTED_MODULE_1__[\"areaStream\"].lineEnd();\n  if (Object(_math_js__WEBPACK_IMPORTED_MODULE_3__[\"abs\"])(deltaSum) > _math_js__WEBPACK_IMPORTED_MODULE_3__[\"epsilon\"]) lambda0 = -(lambda1 = 180);\n  range[0] = lambda0, range[1] = lambda1;\n  p0 = null;\n}\n\n// Finds the left-right distance between two longitudes.\n// This is almost the same as (lambda1 - lambda0 + 360°) % 360°, except that we want\n// the distance between ±180° to be 360°.\nfunction angle(lambda0, lambda1) {\n  return (lambda1 -= lambda0) < 0 ? lambda1 + 360 : lambda1;\n}\n\nfunction rangeCompare(a, b) {\n  return a[0] - b[0];\n}\n\nfunction rangeContains(range, x) {\n  return range[0] <= range[1] ? range[0] <= x && x <= range[1] : x < range[0] || range[1] < x;\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(feature) {\n  var i, n, a, b, merged, deltaMax, delta;\n\n  phi1 = lambda1 = -(lambda0 = phi0 = Infinity);\n  ranges = [];\n  Object(_stream_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(feature, boundsStream);\n\n  // First, sort ranges by their minimum longitudes.\n  if (n = ranges.length) {\n    ranges.sort(rangeCompare);\n\n    // Then, merge any ranges that overlap.\n    for (i = 1, a = ranges[0], merged = [a]; i < n; ++i) {\n      b = ranges[i];\n      if (rangeContains(a, b[0]) || rangeContains(a, b[1])) {\n        if (angle(a[0], b[1]) > angle(a[0], a[1])) a[1] = b[1];\n        if (angle(b[0], a[1]) > angle(a[0], a[1])) a[0] = b[0];\n      } else {\n        merged.push(a = b);\n      }\n    }\n\n    // Finally, find the largest gap between the merged ranges.\n    // The final bounding box will be the inverse of this gap.\n    for (deltaMax = -Infinity, n = merged.length - 1, i = 0, a = merged[n]; i <= n; a = b, ++i) {\n      b = merged[i];\n      if ((delta = angle(a[1], b[0])) > deltaMax) deltaMax = delta, lambda0 = b[0], lambda1 = a[1];\n    }\n  }\n\n  ranges = range = null;\n\n  return lambda0 === Infinity || phi0 === Infinity\n      ? [[NaN, NaN], [NaN, NaN]]\n      : [[lambda0, phi0], [lambda1, phi1]];\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-geo/src/cartesian.js\":\n/*!**********************************************!*\\\n  !*** ./node_modules/d3-geo/src/cartesian.js ***!\n  \\**********************************************/\n/*! exports provided: spherical, cartesian, cartesianDot, cartesianCross, cartesianAddInPlace, cartesianScale, cartesianNormalizeInPlace */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"spherical\", function() { return spherical; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"cartesian\", function() { return cartesian; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"cartesianDot\", function() { return cartesianDot; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"cartesianCross\", function() { return cartesianCross; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"cartesianAddInPlace\", function() { return cartesianAddInPlace; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"cartesianScale\", function() { return cartesianScale; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"cartesianNormalizeInPlace\", function() { return cartesianNormalizeInPlace; });\n/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./math.js */ \"./node_modules/d3-geo/src/math.js\");\n\n\nfunction spherical(cartesian) {\n  return [Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"atan2\"])(cartesian[1], cartesian[0]), Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"asin\"])(cartesian[2])];\n}\n\nfunction cartesian(spherical) {\n  var lambda = spherical[0], phi = spherical[1], cosPhi = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"cos\"])(phi);\n  return [cosPhi * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"cos\"])(lambda), cosPhi * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"sin\"])(lambda), Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"sin\"])(phi)];\n}\n\nfunction cartesianDot(a, b) {\n  return a[0] * b[0] + a[1] * b[1] + a[2] * b[2];\n}\n\nfunction cartesianCross(a, b) {\n  return [a[1] * b[2] - a[2] * b[1], a[2] * b[0] - a[0] * b[2], a[0] * b[1] - a[1] * b[0]];\n}\n\n// TODO return a\nfunction cartesianAddInPlace(a, b) {\n  a[0] += b[0], a[1] += b[1], a[2] += b[2];\n}\n\nfunction cartesianScale(vector, k) {\n  return [vector[0] * k, vector[1] * k, vector[2] * k];\n}\n\n// TODO return d\nfunction cartesianNormalizeInPlace(d) {\n  var l = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"sqrt\"])(d[0] * d[0] + d[1] * d[1] + d[2] * d[2]);\n  d[0] /= l, d[1] /= l, d[2] /= l;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-geo/src/centroid.js\":\n/*!*********************************************!*\\\n  !*** ./node_modules/d3-geo/src/centroid.js ***!\n  \\*********************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var d3_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-array */ \"./node_modules/d3-geo/node_modules/d3-array/src/index.js\");\n/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./math.js */ \"./node_modules/d3-geo/src/math.js\");\n/* harmony import */ var _noop_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./noop.js */ \"./node_modules/d3-geo/src/noop.js\");\n/* harmony import */ var _stream_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./stream.js */ \"./node_modules/d3-geo/src/stream.js\");\n\n\n\n\n\nvar W0, W1,\n    X0, Y0, Z0,\n    X1, Y1, Z1,\n    X2, Y2, Z2,\n    lambda00, phi00, // first point\n    x0, y0, z0; // previous point\n\nvar centroidStream = {\n  sphere: _noop_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"],\n  point: centroidPoint,\n  lineStart: centroidLineStart,\n  lineEnd: centroidLineEnd,\n  polygonStart: function() {\n    centroidStream.lineStart = centroidRingStart;\n    centroidStream.lineEnd = centroidRingEnd;\n  },\n  polygonEnd: function() {\n    centroidStream.lineStart = centroidLineStart;\n    centroidStream.lineEnd = centroidLineEnd;\n  }\n};\n\n// Arithmetic mean of Cartesian vectors.\nfunction centroidPoint(lambda, phi) {\n  lambda *= _math_js__WEBPACK_IMPORTED_MODULE_1__[\"radians\"], phi *= _math_js__WEBPACK_IMPORTED_MODULE_1__[\"radians\"];\n  var cosPhi = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__[\"cos\"])(phi);\n  centroidPointCartesian(cosPhi * Object(_math_js__WEBPACK_IMPORTED_MODULE_1__[\"cos\"])(lambda), cosPhi * Object(_math_js__WEBPACK_IMPORTED_MODULE_1__[\"sin\"])(lambda), Object(_math_js__WEBPACK_IMPORTED_MODULE_1__[\"sin\"])(phi));\n}\n\nfunction centroidPointCartesian(x, y, z) {\n  ++W0;\n  X0 += (x - X0) / W0;\n  Y0 += (y - Y0) / W0;\n  Z0 += (z - Z0) / W0;\n}\n\nfunction centroidLineStart() {\n  centroidStream.point = centroidLinePointFirst;\n}\n\nfunction centroidLinePointFirst(lambda, phi) {\n  lambda *= _math_js__WEBPACK_IMPORTED_MODULE_1__[\"radians\"], phi *= _math_js__WEBPACK_IMPORTED_MODULE_1__[\"radians\"];\n  var cosPhi = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__[\"cos\"])(phi);\n  x0 = cosPhi * Object(_math_js__WEBPACK_IMPORTED_MODULE_1__[\"cos\"])(lambda);\n  y0 = cosPhi * Object(_math_js__WEBPACK_IMPORTED_MODULE_1__[\"sin\"])(lambda);\n  z0 = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__[\"sin\"])(phi);\n  centroidStream.point = centroidLinePoint;\n  centroidPointCartesian(x0, y0, z0);\n}\n\nfunction centroidLinePoint(lambda, phi) {\n  lambda *= _math_js__WEBPACK_IMPORTED_MODULE_1__[\"radians\"], phi *= _math_js__WEBPACK_IMPORTED_MODULE_1__[\"radians\"];\n  var cosPhi = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__[\"cos\"])(phi),\n      x = cosPhi * Object(_math_js__WEBPACK_IMPORTED_MODULE_1__[\"cos\"])(lambda),\n      y = cosPhi * Object(_math_js__WEBPACK_IMPORTED_MODULE_1__[\"sin\"])(lambda),\n      z = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__[\"sin\"])(phi),\n      w = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__[\"atan2\"])(Object(_math_js__WEBPACK_IMPORTED_MODULE_1__[\"sqrt\"])((w = y0 * z - z0 * y) * w + (w = z0 * x - x0 * z) * w + (w = x0 * y - y0 * x) * w), x0 * x + y0 * y + z0 * z);\n  W1 += w;\n  X1 += w * (x0 + (x0 = x));\n  Y1 += w * (y0 + (y0 = y));\n  Z1 += w * (z0 + (z0 = z));\n  centroidPointCartesian(x0, y0, z0);\n}\n\nfunction centroidLineEnd() {\n  centroidStream.point = centroidPoint;\n}\n\n// See J. E. Brock, The Inertia Tensor for a Spherical Triangle,\n// J. Applied Mechanics 42, 239 (1975).\nfunction centroidRingStart() {\n  centroidStream.point = centroidRingPointFirst;\n}\n\nfunction centroidRingEnd() {\n  centroidRingPoint(lambda00, phi00);\n  centroidStream.point = centroidPoint;\n}\n\nfunction centroidRingPointFirst(lambda, phi) {\n  lambda00 = lambda, phi00 = phi;\n  lambda *= _math_js__WEBPACK_IMPORTED_MODULE_1__[\"radians\"], phi *= _math_js__WEBPACK_IMPORTED_MODULE_1__[\"radians\"];\n  centroidStream.point = centroidRingPoint;\n  var cosPhi = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__[\"cos\"])(phi);\n  x0 = cosPhi * Object(_math_js__WEBPACK_IMPORTED_MODULE_1__[\"cos\"])(lambda);\n  y0 = cosPhi * Object(_math_js__WEBPACK_IMPORTED_MODULE_1__[\"sin\"])(lambda);\n  z0 = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__[\"sin\"])(phi);\n  centroidPointCartesian(x0, y0, z0);\n}\n\nfunction centroidRingPoint(lambda, phi) {\n  lambda *= _math_js__WEBPACK_IMPORTED_MODULE_1__[\"radians\"], phi *= _math_js__WEBPACK_IMPORTED_MODULE_1__[\"radians\"];\n  var cosPhi = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__[\"cos\"])(phi),\n      x = cosPhi * Object(_math_js__WEBPACK_IMPORTED_MODULE_1__[\"cos\"])(lambda),\n      y = cosPhi * Object(_math_js__WEBPACK_IMPORTED_MODULE_1__[\"sin\"])(lambda),\n      z = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__[\"sin\"])(phi),\n      cx = y0 * z - z0 * y,\n      cy = z0 * x - x0 * z,\n      cz = x0 * y - y0 * x,\n      m = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__[\"hypot\"])(cx, cy, cz),\n      w = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__[\"asin\"])(m), // line weight = angle\n      v = m && -w / m; // area weight multiplier\n  X2.add(v * cx);\n  Y2.add(v * cy);\n  Z2.add(v * cz);\n  W1 += w;\n  X1 += w * (x0 + (x0 = x));\n  Y1 += w * (y0 + (y0 = y));\n  Z1 += w * (z0 + (z0 = z));\n  centroidPointCartesian(x0, y0, z0);\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(object) {\n  W0 = W1 =\n  X0 = Y0 = Z0 =\n  X1 = Y1 = Z1 = 0;\n  X2 = new d3_array__WEBPACK_IMPORTED_MODULE_0__[\"Adder\"]();\n  Y2 = new d3_array__WEBPACK_IMPORTED_MODULE_0__[\"Adder\"]();\n  Z2 = new d3_array__WEBPACK_IMPORTED_MODULE_0__[\"Adder\"]();\n  Object(_stream_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(object, centroidStream);\n\n  var x = +X2,\n      y = +Y2,\n      z = +Z2,\n      m = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__[\"hypot\"])(x, y, z);\n\n  // If the area-weighted ccentroid is undefined, fall back to length-weighted ccentroid.\n  if (m < _math_js__WEBPACK_IMPORTED_MODULE_1__[\"epsilon2\"]) {\n    x = X1, y = Y1, z = Z1;\n    // If the feature has zero length, fall back to arithmetic mean of point vectors.\n    if (W1 < _math_js__WEBPACK_IMPORTED_MODULE_1__[\"epsilon\"]) x = X0, y = Y0, z = Z0;\n    m = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__[\"hypot\"])(x, y, z);\n    // If the feature still has an undefined ccentroid, then return.\n    if (m < _math_js__WEBPACK_IMPORTED_MODULE_1__[\"epsilon2\"]) return [NaN, NaN];\n  }\n\n  return [Object(_math_js__WEBPACK_IMPORTED_MODULE_1__[\"atan2\"])(y, x) * _math_js__WEBPACK_IMPORTED_MODULE_1__[\"degrees\"], Object(_math_js__WEBPACK_IMPORTED_MODULE_1__[\"asin\"])(z / m) * _math_js__WEBPACK_IMPORTED_MODULE_1__[\"degrees\"]];\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-geo/src/circle.js\":\n/*!*******************************************!*\\\n  !*** ./node_modules/d3-geo/src/circle.js ***!\n  \\*******************************************/\n/*! exports provided: circleStream, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"circleStream\", function() { return circleStream; });\n/* harmony import */ var _cartesian_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./cartesian.js */ \"./node_modules/d3-geo/src/cartesian.js\");\n/* harmony import */ var _constant_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./constant.js */ \"./node_modules/d3-geo/src/constant.js\");\n/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./math.js */ \"./node_modules/d3-geo/src/math.js\");\n/* harmony import */ var _rotation_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./rotation.js */ \"./node_modules/d3-geo/src/rotation.js\");\n\n\n\n\n\n// Generates a circle centered at [0°, 0°], with a given radius and precision.\nfunction circleStream(stream, radius, delta, direction, t0, t1) {\n  if (!delta) return;\n  var cosRadius = Object(_math_js__WEBPACK_IMPORTED_MODULE_2__[\"cos\"])(radius),\n      sinRadius = Object(_math_js__WEBPACK_IMPORTED_MODULE_2__[\"sin\"])(radius),\n      step = direction * delta;\n  if (t0 == null) {\n    t0 = radius + direction * _math_js__WEBPACK_IMPORTED_MODULE_2__[\"tau\"];\n    t1 = radius - step / 2;\n  } else {\n    t0 = circleRadius(cosRadius, t0);\n    t1 = circleRadius(cosRadius, t1);\n    if (direction > 0 ? t0 < t1 : t0 > t1) t0 += direction * _math_js__WEBPACK_IMPORTED_MODULE_2__[\"tau\"];\n  }\n  for (var point, t = t0; direction > 0 ? t > t1 : t < t1; t -= step) {\n    point = Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_0__[\"spherical\"])([cosRadius, -sinRadius * Object(_math_js__WEBPACK_IMPORTED_MODULE_2__[\"cos\"])(t), -sinRadius * Object(_math_js__WEBPACK_IMPORTED_MODULE_2__[\"sin\"])(t)]);\n    stream.point(point[0], point[1]);\n  }\n}\n\n// Returns the signed angle of a cartesian point relative to [cosRadius, 0, 0].\nfunction circleRadius(cosRadius, point) {\n  point = Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_0__[\"cartesian\"])(point), point[0] -= cosRadius;\n  Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_0__[\"cartesianNormalizeInPlace\"])(point);\n  var radius = Object(_math_js__WEBPACK_IMPORTED_MODULE_2__[\"acos\"])(-point[1]);\n  return ((-point[2] < 0 ? -radius : radius) + _math_js__WEBPACK_IMPORTED_MODULE_2__[\"tau\"] - _math_js__WEBPACK_IMPORTED_MODULE_2__[\"epsilon\"]) % _math_js__WEBPACK_IMPORTED_MODULE_2__[\"tau\"];\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  var center = Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])([0, 0]),\n      radius = Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(90),\n      precision = Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(6),\n      ring,\n      rotate,\n      stream = {point: point};\n\n  function point(x, y) {\n    ring.push(x = rotate(x, y));\n    x[0] *= _math_js__WEBPACK_IMPORTED_MODULE_2__[\"degrees\"], x[1] *= _math_js__WEBPACK_IMPORTED_MODULE_2__[\"degrees\"];\n  }\n\n  function circle() {\n    var c = center.apply(this, arguments),\n        r = radius.apply(this, arguments) * _math_js__WEBPACK_IMPORTED_MODULE_2__[\"radians\"],\n        p = precision.apply(this, arguments) * _math_js__WEBPACK_IMPORTED_MODULE_2__[\"radians\"];\n    ring = [];\n    rotate = Object(_rotation_js__WEBPACK_IMPORTED_MODULE_3__[\"rotateRadians\"])(-c[0] * _math_js__WEBPACK_IMPORTED_MODULE_2__[\"radians\"], -c[1] * _math_js__WEBPACK_IMPORTED_MODULE_2__[\"radians\"], 0).invert;\n    circleStream(stream, r, p, 1);\n    c = {type: \"Polygon\", coordinates: [ring]};\n    ring = rotate = null;\n    return c;\n  }\n\n  circle.center = function(_) {\n    return arguments.length ? (center = typeof _ === \"function\" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])([+_[0], +_[1]]), circle) : center;\n  };\n\n  circle.radius = function(_) {\n    return arguments.length ? (radius = typeof _ === \"function\" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(+_), circle) : radius;\n  };\n\n  circle.precision = function(_) {\n    return arguments.length ? (precision = typeof _ === \"function\" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(+_), circle) : precision;\n  };\n\n  return circle;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-geo/src/clip/antimeridian.js\":\n/*!******************************************************!*\\\n  !*** ./node_modules/d3-geo/src/clip/antimeridian.js ***!\n  \\******************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./index.js */ \"./node_modules/d3-geo/src/clip/index.js\");\n/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../math.js */ \"./node_modules/d3-geo/src/math.js\");\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_index_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(\n  function() { return true; },\n  clipAntimeridianLine,\n  clipAntimeridianInterpolate,\n  [-_math_js__WEBPACK_IMPORTED_MODULE_1__[\"pi\"], -_math_js__WEBPACK_IMPORTED_MODULE_1__[\"halfPi\"]]\n));\n\n// Takes a line and cuts into visible segments. Return values: 0 - there were\n// intersections or the line was empty; 1 - no intersections; 2 - there were\n// intersections, and the first and last segments should be rejoined.\nfunction clipAntimeridianLine(stream) {\n  var lambda0 = NaN,\n      phi0 = NaN,\n      sign0 = NaN,\n      clean; // no intersections\n\n  return {\n    lineStart: function() {\n      stream.lineStart();\n      clean = 1;\n    },\n    point: function(lambda1, phi1) {\n      var sign1 = lambda1 > 0 ? _math_js__WEBPACK_IMPORTED_MODULE_1__[\"pi\"] : -_math_js__WEBPACK_IMPORTED_MODULE_1__[\"pi\"],\n          delta = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__[\"abs\"])(lambda1 - lambda0);\n      if (Object(_math_js__WEBPACK_IMPORTED_MODULE_1__[\"abs\"])(delta - _math_js__WEBPACK_IMPORTED_MODULE_1__[\"pi\"]) < _math_js__WEBPACK_IMPORTED_MODULE_1__[\"epsilon\"]) { // line crosses a pole\n        stream.point(lambda0, phi0 = (phi0 + phi1) / 2 > 0 ? _math_js__WEBPACK_IMPORTED_MODULE_1__[\"halfPi\"] : -_math_js__WEBPACK_IMPORTED_MODULE_1__[\"halfPi\"]);\n        stream.point(sign0, phi0);\n        stream.lineEnd();\n        stream.lineStart();\n        stream.point(sign1, phi0);\n        stream.point(lambda1, phi0);\n        clean = 0;\n      } else if (sign0 !== sign1 && delta >= _math_js__WEBPACK_IMPORTED_MODULE_1__[\"pi\"]) { // line crosses antimeridian\n        if (Object(_math_js__WEBPACK_IMPORTED_MODULE_1__[\"abs\"])(lambda0 - sign0) < _math_js__WEBPACK_IMPORTED_MODULE_1__[\"epsilon\"]) lambda0 -= sign0 * _math_js__WEBPACK_IMPORTED_MODULE_1__[\"epsilon\"]; // handle degeneracies\n        if (Object(_math_js__WEBPACK_IMPORTED_MODULE_1__[\"abs\"])(lambda1 - sign1) < _math_js__WEBPACK_IMPORTED_MODULE_1__[\"epsilon\"]) lambda1 -= sign1 * _math_js__WEBPACK_IMPORTED_MODULE_1__[\"epsilon\"];\n        phi0 = clipAntimeridianIntersect(lambda0, phi0, lambda1, phi1);\n        stream.point(sign0, phi0);\n        stream.lineEnd();\n        stream.lineStart();\n        stream.point(sign1, phi0);\n        clean = 0;\n      }\n      stream.point(lambda0 = lambda1, phi0 = phi1);\n      sign0 = sign1;\n    },\n    lineEnd: function() {\n      stream.lineEnd();\n      lambda0 = phi0 = NaN;\n    },\n    clean: function() {\n      return 2 - clean; // if intersections, rejoin first and last segments\n    }\n  };\n}\n\nfunction clipAntimeridianIntersect(lambda0, phi0, lambda1, phi1) {\n  var cosPhi0,\n      cosPhi1,\n      sinLambda0Lambda1 = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__[\"sin\"])(lambda0 - lambda1);\n  return Object(_math_js__WEBPACK_IMPORTED_MODULE_1__[\"abs\"])(sinLambda0Lambda1) > _math_js__WEBPACK_IMPORTED_MODULE_1__[\"epsilon\"]\n      ? Object(_math_js__WEBPACK_IMPORTED_MODULE_1__[\"atan\"])((Object(_math_js__WEBPACK_IMPORTED_MODULE_1__[\"sin\"])(phi0) * (cosPhi1 = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__[\"cos\"])(phi1)) * Object(_math_js__WEBPACK_IMPORTED_MODULE_1__[\"sin\"])(lambda1)\n          - Object(_math_js__WEBPACK_IMPORTED_MODULE_1__[\"sin\"])(phi1) * (cosPhi0 = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__[\"cos\"])(phi0)) * Object(_math_js__WEBPACK_IMPORTED_MODULE_1__[\"sin\"])(lambda0))\n          / (cosPhi0 * cosPhi1 * sinLambda0Lambda1))\n      : (phi0 + phi1) / 2;\n}\n\nfunction clipAntimeridianInterpolate(from, to, direction, stream) {\n  var phi;\n  if (from == null) {\n    phi = direction * _math_js__WEBPACK_IMPORTED_MODULE_1__[\"halfPi\"];\n    stream.point(-_math_js__WEBPACK_IMPORTED_MODULE_1__[\"pi\"], phi);\n    stream.point(0, phi);\n    stream.point(_math_js__WEBPACK_IMPORTED_MODULE_1__[\"pi\"], phi);\n    stream.point(_math_js__WEBPACK_IMPORTED_MODULE_1__[\"pi\"], 0);\n    stream.point(_math_js__WEBPACK_IMPORTED_MODULE_1__[\"pi\"], -phi);\n    stream.point(0, -phi);\n    stream.point(-_math_js__WEBPACK_IMPORTED_MODULE_1__[\"pi\"], -phi);\n    stream.point(-_math_js__WEBPACK_IMPORTED_MODULE_1__[\"pi\"], 0);\n    stream.point(-_math_js__WEBPACK_IMPORTED_MODULE_1__[\"pi\"], phi);\n  } else if (Object(_math_js__WEBPACK_IMPORTED_MODULE_1__[\"abs\"])(from[0] - to[0]) > _math_js__WEBPACK_IMPORTED_MODULE_1__[\"epsilon\"]) {\n    var lambda = from[0] < to[0] ? _math_js__WEBPACK_IMPORTED_MODULE_1__[\"pi\"] : -_math_js__WEBPACK_IMPORTED_MODULE_1__[\"pi\"];\n    phi = direction * lambda / 2;\n    stream.point(-lambda, phi);\n    stream.point(0, phi);\n    stream.point(lambda, phi);\n  } else {\n    stream.point(to[0], to[1]);\n  }\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-geo/src/clip/buffer.js\":\n/*!************************************************!*\\\n  !*** ./node_modules/d3-geo/src/clip/buffer.js ***!\n  \\************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _noop_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../noop.js */ \"./node_modules/d3-geo/src/noop.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  var lines = [],\n      line;\n  return {\n    point: function(x, y, m) {\n      line.push([x, y, m]);\n    },\n    lineStart: function() {\n      lines.push(line = []);\n    },\n    lineEnd: _noop_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"],\n    rejoin: function() {\n      if (lines.length > 1) lines.push(lines.pop().concat(lines.shift()));\n    },\n    result: function() {\n      var result = lines;\n      lines = [];\n      line = null;\n      return result;\n    }\n  };\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-geo/src/clip/circle.js\":\n/*!************************************************!*\\\n  !*** ./node_modules/d3-geo/src/clip/circle.js ***!\n  \\************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _cartesian_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../cartesian.js */ \"./node_modules/d3-geo/src/cartesian.js\");\n/* harmony import */ var _circle_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../circle.js */ \"./node_modules/d3-geo/src/circle.js\");\n/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../math.js */ \"./node_modules/d3-geo/src/math.js\");\n/* harmony import */ var _pointEqual_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../pointEqual.js */ \"./node_modules/d3-geo/src/pointEqual.js\");\n/* harmony import */ var _index_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./index.js */ \"./node_modules/d3-geo/src/clip/index.js\");\n\n\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(radius) {\n  var cr = Object(_math_js__WEBPACK_IMPORTED_MODULE_2__[\"cos\"])(radius),\n      delta = 6 * _math_js__WEBPACK_IMPORTED_MODULE_2__[\"radians\"],\n      smallRadius = cr > 0,\n      notHemisphere = Object(_math_js__WEBPACK_IMPORTED_MODULE_2__[\"abs\"])(cr) > _math_js__WEBPACK_IMPORTED_MODULE_2__[\"epsilon\"]; // TODO optimise for this common case\n\n  function interpolate(from, to, direction, stream) {\n    Object(_circle_js__WEBPACK_IMPORTED_MODULE_1__[\"circleStream\"])(stream, radius, delta, direction, from, to);\n  }\n\n  function visible(lambda, phi) {\n    return Object(_math_js__WEBPACK_IMPORTED_MODULE_2__[\"cos\"])(lambda) * Object(_math_js__WEBPACK_IMPORTED_MODULE_2__[\"cos\"])(phi) > cr;\n  }\n\n  // Takes a line and cuts into visible segments. Return values used for polygon\n  // clipping: 0 - there were intersections or the line was empty; 1 - no\n  // intersections 2 - there were intersections, and the first and last segments\n  // should be rejoined.\n  function clipLine(stream) {\n    var point0, // previous point\n        c0, // code for previous point\n        v0, // visibility of previous point\n        v00, // visibility of first point\n        clean; // no intersections\n    return {\n      lineStart: function() {\n        v00 = v0 = false;\n        clean = 1;\n      },\n      point: function(lambda, phi) {\n        var point1 = [lambda, phi],\n            point2,\n            v = visible(lambda, phi),\n            c = smallRadius\n              ? v ? 0 : code(lambda, phi)\n              : v ? code(lambda + (lambda < 0 ? _math_js__WEBPACK_IMPORTED_MODULE_2__[\"pi\"] : -_math_js__WEBPACK_IMPORTED_MODULE_2__[\"pi\"]), phi) : 0;\n        if (!point0 && (v00 = v0 = v)) stream.lineStart();\n        if (v !== v0) {\n          point2 = intersect(point0, point1);\n          if (!point2 || Object(_pointEqual_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(point0, point2) || Object(_pointEqual_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(point1, point2))\n            point1[2] = 1;\n        }\n        if (v !== v0) {\n          clean = 0;\n          if (v) {\n            // outside going in\n            stream.lineStart();\n            point2 = intersect(point1, point0);\n            stream.point(point2[0], point2[1]);\n          } else {\n            // inside going out\n            point2 = intersect(point0, point1);\n            stream.point(point2[0], point2[1], 2);\n            stream.lineEnd();\n          }\n          point0 = point2;\n        } else if (notHemisphere && point0 && smallRadius ^ v) {\n          var t;\n          // If the codes for two points are different, or are both zero,\n          // and there this segment intersects with the small circle.\n          if (!(c & c0) && (t = intersect(point1, point0, true))) {\n            clean = 0;\n            if (smallRadius) {\n              stream.lineStart();\n              stream.point(t[0][0], t[0][1]);\n              stream.point(t[1][0], t[1][1]);\n              stream.lineEnd();\n            } else {\n              stream.point(t[1][0], t[1][1]);\n              stream.lineEnd();\n              stream.lineStart();\n              stream.point(t[0][0], t[0][1], 3);\n            }\n          }\n        }\n        if (v && (!point0 || !Object(_pointEqual_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(point0, point1))) {\n          stream.point(point1[0], point1[1]);\n        }\n        point0 = point1, v0 = v, c0 = c;\n      },\n      lineEnd: function() {\n        if (v0) stream.lineEnd();\n        point0 = null;\n      },\n      // Rejoin first and last segments if there were intersections and the first\n      // and last points were visible.\n      clean: function() {\n        return clean | ((v00 && v0) << 1);\n      }\n    };\n  }\n\n  // Intersects the great circle between a and b with the clip circle.\n  function intersect(a, b, two) {\n    var pa = Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_0__[\"cartesian\"])(a),\n        pb = Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_0__[\"cartesian\"])(b);\n\n    // We have two planes, n1.p = d1 and n2.p = d2.\n    // Find intersection line p(t) = c1 n1 + c2 n2 + t (n1 ⨯ n2).\n    var n1 = [1, 0, 0], // normal\n        n2 = Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_0__[\"cartesianCross\"])(pa, pb),\n        n2n2 = Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_0__[\"cartesianDot\"])(n2, n2),\n        n1n2 = n2[0], // cartesianDot(n1, n2),\n        determinant = n2n2 - n1n2 * n1n2;\n\n    // Two polar points.\n    if (!determinant) return !two && a;\n\n    var c1 =  cr * n2n2 / determinant,\n        c2 = -cr * n1n2 / determinant,\n        n1xn2 = Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_0__[\"cartesianCross\"])(n1, n2),\n        A = Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_0__[\"cartesianScale\"])(n1, c1),\n        B = Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_0__[\"cartesianScale\"])(n2, c2);\n    Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_0__[\"cartesianAddInPlace\"])(A, B);\n\n    // Solve |p(t)|^2 = 1.\n    var u = n1xn2,\n        w = Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_0__[\"cartesianDot\"])(A, u),\n        uu = Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_0__[\"cartesianDot\"])(u, u),\n        t2 = w * w - uu * (Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_0__[\"cartesianDot\"])(A, A) - 1);\n\n    if (t2 < 0) return;\n\n    var t = Object(_math_js__WEBPACK_IMPORTED_MODULE_2__[\"sqrt\"])(t2),\n        q = Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_0__[\"cartesianScale\"])(u, (-w - t) / uu);\n    Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_0__[\"cartesianAddInPlace\"])(q, A);\n    q = Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_0__[\"spherical\"])(q);\n\n    if (!two) return q;\n\n    // Two intersection points.\n    var lambda0 = a[0],\n        lambda1 = b[0],\n        phi0 = a[1],\n        phi1 = b[1],\n        z;\n\n    if (lambda1 < lambda0) z = lambda0, lambda0 = lambda1, lambda1 = z;\n\n    var delta = lambda1 - lambda0,\n        polar = Object(_math_js__WEBPACK_IMPORTED_MODULE_2__[\"abs\"])(delta - _math_js__WEBPACK_IMPORTED_MODULE_2__[\"pi\"]) < _math_js__WEBPACK_IMPORTED_MODULE_2__[\"epsilon\"],\n        meridian = polar || delta < _math_js__WEBPACK_IMPORTED_MODULE_2__[\"epsilon\"];\n\n    if (!polar && phi1 < phi0) z = phi0, phi0 = phi1, phi1 = z;\n\n    // Check that the first point is between a and b.\n    if (meridian\n        ? polar\n          ? phi0 + phi1 > 0 ^ q[1] < (Object(_math_js__WEBPACK_IMPORTED_MODULE_2__[\"abs\"])(q[0] - lambda0) < _math_js__WEBPACK_IMPORTED_MODULE_2__[\"epsilon\"] ? phi0 : phi1)\n          : phi0 <= q[1] && q[1] <= phi1\n        : delta > _math_js__WEBPACK_IMPORTED_MODULE_2__[\"pi\"] ^ (lambda0 <= q[0] && q[0] <= lambda1)) {\n      var q1 = Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_0__[\"cartesianScale\"])(u, (-w + t) / uu);\n      Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_0__[\"cartesianAddInPlace\"])(q1, A);\n      return [q, Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_0__[\"spherical\"])(q1)];\n    }\n  }\n\n  // Generates a 4-bit vector representing the location of a point relative to\n  // the small circle's bounding box.\n  function code(lambda, phi) {\n    var r = smallRadius ? radius : _math_js__WEBPACK_IMPORTED_MODULE_2__[\"pi\"] - radius,\n        code = 0;\n    if (lambda < -r) code |= 1; // left\n    else if (lambda > r) code |= 2; // right\n    if (phi < -r) code |= 4; // below\n    else if (phi > r) code |= 8; // above\n    return code;\n  }\n\n  return Object(_index_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(visible, clipLine, interpolate, smallRadius ? [0, -radius] : [-_math_js__WEBPACK_IMPORTED_MODULE_2__[\"pi\"], radius - _math_js__WEBPACK_IMPORTED_MODULE_2__[\"pi\"]]);\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-geo/src/clip/extent.js\":\n/*!************************************************!*\\\n  !*** ./node_modules/d3-geo/src/clip/extent.js ***!\n  \\************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _rectangle_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./rectangle.js */ \"./node_modules/d3-geo/src/clip/rectangle.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  var x0 = 0,\n      y0 = 0,\n      x1 = 960,\n      y1 = 500,\n      cache,\n      cacheStream,\n      clip;\n\n  return clip = {\n    stream: function(stream) {\n      return cache && cacheStream === stream ? cache : cache = Object(_rectangle_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(x0, y0, x1, y1)(cacheStream = stream);\n    },\n    extent: function(_) {\n      return arguments.length ? (x0 = +_[0][0], y0 = +_[0][1], x1 = +_[1][0], y1 = +_[1][1], cache = cacheStream = null, clip) : [[x0, y0], [x1, y1]];\n    }\n  };\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-geo/src/clip/index.js\":\n/*!***********************************************!*\\\n  !*** ./node_modules/d3-geo/src/clip/index.js ***!\n  \\***********************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _buffer_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./buffer.js */ \"./node_modules/d3-geo/src/clip/buffer.js\");\n/* harmony import */ var _rejoin_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./rejoin.js */ \"./node_modules/d3-geo/src/clip/rejoin.js\");\n/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../math.js */ \"./node_modules/d3-geo/src/math.js\");\n/* harmony import */ var _polygonContains_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../polygonContains.js */ \"./node_modules/d3-geo/src/polygonContains.js\");\n/* harmony import */ var d3_array__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! d3-array */ \"./node_modules/d3-geo/node_modules/d3-array/src/index.js\");\n\n\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(pointVisible, clipLine, interpolate, start) {\n  return function(sink) {\n    var line = clipLine(sink),\n        ringBuffer = Object(_buffer_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(),\n        ringSink = clipLine(ringBuffer),\n        polygonStarted = false,\n        polygon,\n        segments,\n        ring;\n\n    var clip = {\n      point: point,\n      lineStart: lineStart,\n      lineEnd: lineEnd,\n      polygonStart: function() {\n        clip.point = pointRing;\n        clip.lineStart = ringStart;\n        clip.lineEnd = ringEnd;\n        segments = [];\n        polygon = [];\n      },\n      polygonEnd: function() {\n        clip.point = point;\n        clip.lineStart = lineStart;\n        clip.lineEnd = lineEnd;\n        segments = Object(d3_array__WEBPACK_IMPORTED_MODULE_4__[\"merge\"])(segments);\n        var startInside = Object(_polygonContains_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(polygon, start);\n        if (segments.length) {\n          if (!polygonStarted) sink.polygonStart(), polygonStarted = true;\n          Object(_rejoin_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(segments, compareIntersection, startInside, interpolate, sink);\n        } else if (startInside) {\n          if (!polygonStarted) sink.polygonStart(), polygonStarted = true;\n          sink.lineStart();\n          interpolate(null, null, 1, sink);\n          sink.lineEnd();\n        }\n        if (polygonStarted) sink.polygonEnd(), polygonStarted = false;\n        segments = polygon = null;\n      },\n      sphere: function() {\n        sink.polygonStart();\n        sink.lineStart();\n        interpolate(null, null, 1, sink);\n        sink.lineEnd();\n        sink.polygonEnd();\n      }\n    };\n\n    function point(lambda, phi) {\n      if (pointVisible(lambda, phi)) sink.point(lambda, phi);\n    }\n\n    function pointLine(lambda, phi) {\n      line.point(lambda, phi);\n    }\n\n    function lineStart() {\n      clip.point = pointLine;\n      line.lineStart();\n    }\n\n    function lineEnd() {\n      clip.point = point;\n      line.lineEnd();\n    }\n\n    function pointRing(lambda, phi) {\n      ring.push([lambda, phi]);\n      ringSink.point(lambda, phi);\n    }\n\n    function ringStart() {\n      ringSink.lineStart();\n      ring = [];\n    }\n\n    function ringEnd() {\n      pointRing(ring[0][0], ring[0][1]);\n      ringSink.lineEnd();\n\n      var clean = ringSink.clean(),\n          ringSegments = ringBuffer.result(),\n          i, n = ringSegments.length, m,\n          segment,\n          point;\n\n      ring.pop();\n      polygon.push(ring);\n      ring = null;\n\n      if (!n) return;\n\n      // No intersections.\n      if (clean & 1) {\n        segment = ringSegments[0];\n        if ((m = segment.length - 1) > 0) {\n          if (!polygonStarted) sink.polygonStart(), polygonStarted = true;\n          sink.lineStart();\n          for (i = 0; i < m; ++i) sink.point((point = segment[i])[0], point[1]);\n          sink.lineEnd();\n        }\n        return;\n      }\n\n      // Rejoin connected segments.\n      // TODO reuse ringBuffer.rejoin()?\n      if (n > 1 && clean & 2) ringSegments.push(ringSegments.pop().concat(ringSegments.shift()));\n\n      segments.push(ringSegments.filter(validSegment));\n    }\n\n    return clip;\n  };\n});\n\nfunction validSegment(segment) {\n  return segment.length > 1;\n}\n\n// Intersections are sorted along the clip edge. For both antimeridian cutting\n// and circle clipping, the same comparison is used.\nfunction compareIntersection(a, b) {\n  return ((a = a.x)[0] < 0 ? a[1] - _math_js__WEBPACK_IMPORTED_MODULE_2__[\"halfPi\"] - _math_js__WEBPACK_IMPORTED_MODULE_2__[\"epsilon\"] : _math_js__WEBPACK_IMPORTED_MODULE_2__[\"halfPi\"] - a[1])\n       - ((b = b.x)[0] < 0 ? b[1] - _math_js__WEBPACK_IMPORTED_MODULE_2__[\"halfPi\"] - _math_js__WEBPACK_IMPORTED_MODULE_2__[\"epsilon\"] : _math_js__WEBPACK_IMPORTED_MODULE_2__[\"halfPi\"] - b[1]);\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-geo/src/clip/line.js\":\n/*!**********************************************!*\\\n  !*** ./node_modules/d3-geo/src/clip/line.js ***!\n  \\**********************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(a, b, x0, y0, x1, y1) {\n  var ax = a[0],\n      ay = a[1],\n      bx = b[0],\n      by = b[1],\n      t0 = 0,\n      t1 = 1,\n      dx = bx - ax,\n      dy = by - ay,\n      r;\n\n  r = x0 - ax;\n  if (!dx && r > 0) return;\n  r /= dx;\n  if (dx < 0) {\n    if (r < t0) return;\n    if (r < t1) t1 = r;\n  } else if (dx > 0) {\n    if (r > t1) return;\n    if (r > t0) t0 = r;\n  }\n\n  r = x1 - ax;\n  if (!dx && r < 0) return;\n  r /= dx;\n  if (dx < 0) {\n    if (r > t1) return;\n    if (r > t0) t0 = r;\n  } else if (dx > 0) {\n    if (r < t0) return;\n    if (r < t1) t1 = r;\n  }\n\n  r = y0 - ay;\n  if (!dy && r > 0) return;\n  r /= dy;\n  if (dy < 0) {\n    if (r < t0) return;\n    if (r < t1) t1 = r;\n  } else if (dy > 0) {\n    if (r > t1) return;\n    if (r > t0) t0 = r;\n  }\n\n  r = y1 - ay;\n  if (!dy && r < 0) return;\n  r /= dy;\n  if (dy < 0) {\n    if (r > t1) return;\n    if (r > t0) t0 = r;\n  } else if (dy > 0) {\n    if (r < t0) return;\n    if (r < t1) t1 = r;\n  }\n\n  if (t0 > 0) a[0] = ax + t0 * dx, a[1] = ay + t0 * dy;\n  if (t1 < 1) b[0] = ax + t1 * dx, b[1] = ay + t1 * dy;\n  return true;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-geo/src/clip/rectangle.js\":\n/*!***************************************************!*\\\n  !*** ./node_modules/d3-geo/src/clip/rectangle.js ***!\n  \\***************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return clipRectangle; });\n/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../math.js */ \"./node_modules/d3-geo/src/math.js\");\n/* harmony import */ var _buffer_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./buffer.js */ \"./node_modules/d3-geo/src/clip/buffer.js\");\n/* harmony import */ var _line_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./line.js */ \"./node_modules/d3-geo/src/clip/line.js\");\n/* harmony import */ var _rejoin_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./rejoin.js */ \"./node_modules/d3-geo/src/clip/rejoin.js\");\n/* harmony import */ var d3_array__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! d3-array */ \"./node_modules/d3-geo/node_modules/d3-array/src/index.js\");\n\n\n\n\n\n\nvar clipMax = 1e9, clipMin = -clipMax;\n\n// TODO Use d3-polygon’s polygonContains here for the ring check?\n// TODO Eliminate duplicate buffering in clipBuffer and polygon.push?\n\nfunction clipRectangle(x0, y0, x1, y1) {\n\n  function visible(x, y) {\n    return x0 <= x && x <= x1 && y0 <= y && y <= y1;\n  }\n\n  function interpolate(from, to, direction, stream) {\n    var a = 0, a1 = 0;\n    if (from == null\n        || (a = corner(from, direction)) !== (a1 = corner(to, direction))\n        || comparePoint(from, to) < 0 ^ direction > 0) {\n      do stream.point(a === 0 || a === 3 ? x0 : x1, a > 1 ? y1 : y0);\n      while ((a = (a + direction + 4) % 4) !== a1);\n    } else {\n      stream.point(to[0], to[1]);\n    }\n  }\n\n  function corner(p, direction) {\n    return Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"abs\"])(p[0] - x0) < _math_js__WEBPACK_IMPORTED_MODULE_0__[\"epsilon\"] ? direction > 0 ? 0 : 3\n        : Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"abs\"])(p[0] - x1) < _math_js__WEBPACK_IMPORTED_MODULE_0__[\"epsilon\"] ? direction > 0 ? 2 : 1\n        : Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"abs\"])(p[1] - y0) < _math_js__WEBPACK_IMPORTED_MODULE_0__[\"epsilon\"] ? direction > 0 ? 1 : 0\n        : direction > 0 ? 3 : 2; // abs(p[1] - y1) < epsilon\n  }\n\n  function compareIntersection(a, b) {\n    return comparePoint(a.x, b.x);\n  }\n\n  function comparePoint(a, b) {\n    var ca = corner(a, 1),\n        cb = corner(b, 1);\n    return ca !== cb ? ca - cb\n        : ca === 0 ? b[1] - a[1]\n        : ca === 1 ? a[0] - b[0]\n        : ca === 2 ? a[1] - b[1]\n        : b[0] - a[0];\n  }\n\n  return function(stream) {\n    var activeStream = stream,\n        bufferStream = Object(_buffer_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(),\n        segments,\n        polygon,\n        ring,\n        x__, y__, v__, // first point\n        x_, y_, v_, // previous point\n        first,\n        clean;\n\n    var clipStream = {\n      point: point,\n      lineStart: lineStart,\n      lineEnd: lineEnd,\n      polygonStart: polygonStart,\n      polygonEnd: polygonEnd\n    };\n\n    function point(x, y) {\n      if (visible(x, y)) activeStream.point(x, y);\n    }\n\n    function polygonInside() {\n      var winding = 0;\n\n      for (var i = 0, n = polygon.length; i < n; ++i) {\n        for (var ring = polygon[i], j = 1, m = ring.length, point = ring[0], a0, a1, b0 = point[0], b1 = point[1]; j < m; ++j) {\n          a0 = b0, a1 = b1, point = ring[j], b0 = point[0], b1 = point[1];\n          if (a1 <= y1) { if (b1 > y1 && (b0 - a0) * (y1 - a1) > (b1 - a1) * (x0 - a0)) ++winding; }\n          else { if (b1 <= y1 && (b0 - a0) * (y1 - a1) < (b1 - a1) * (x0 - a0)) --winding; }\n        }\n      }\n\n      return winding;\n    }\n\n    // Buffer geometry within a polygon and then clip it en masse.\n    function polygonStart() {\n      activeStream = bufferStream, segments = [], polygon = [], clean = true;\n    }\n\n    function polygonEnd() {\n      var startInside = polygonInside(),\n          cleanInside = clean && startInside,\n          visible = (segments = Object(d3_array__WEBPACK_IMPORTED_MODULE_4__[\"merge\"])(segments)).length;\n      if (cleanInside || visible) {\n        stream.polygonStart();\n        if (cleanInside) {\n          stream.lineStart();\n          interpolate(null, null, 1, stream);\n          stream.lineEnd();\n        }\n        if (visible) {\n          Object(_rejoin_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(segments, compareIntersection, startInside, interpolate, stream);\n        }\n        stream.polygonEnd();\n      }\n      activeStream = stream, segments = polygon = ring = null;\n    }\n\n    function lineStart() {\n      clipStream.point = linePoint;\n      if (polygon) polygon.push(ring = []);\n      first = true;\n      v_ = false;\n      x_ = y_ = NaN;\n    }\n\n    // TODO rather than special-case polygons, simply handle them separately.\n    // Ideally, coincident intersection points should be jittered to avoid\n    // clipping issues.\n    function lineEnd() {\n      if (segments) {\n        linePoint(x__, y__);\n        if (v__ && v_) bufferStream.rejoin();\n        segments.push(bufferStream.result());\n      }\n      clipStream.point = point;\n      if (v_) activeStream.lineEnd();\n    }\n\n    function linePoint(x, y) {\n      var v = visible(x, y);\n      if (polygon) ring.push([x, y]);\n      if (first) {\n        x__ = x, y__ = y, v__ = v;\n        first = false;\n        if (v) {\n          activeStream.lineStart();\n          activeStream.point(x, y);\n        }\n      } else {\n        if (v && v_) activeStream.point(x, y);\n        else {\n          var a = [x_ = Math.max(clipMin, Math.min(clipMax, x_)), y_ = Math.max(clipMin, Math.min(clipMax, y_))],\n              b = [x = Math.max(clipMin, Math.min(clipMax, x)), y = Math.max(clipMin, Math.min(clipMax, y))];\n          if (Object(_line_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(a, b, x0, y0, x1, y1)) {\n            if (!v_) {\n              activeStream.lineStart();\n              activeStream.point(a[0], a[1]);\n            }\n            activeStream.point(b[0], b[1]);\n            if (!v) activeStream.lineEnd();\n            clean = false;\n          } else if (v) {\n            activeStream.lineStart();\n            activeStream.point(x, y);\n            clean = false;\n          }\n        }\n      }\n      x_ = x, y_ = y, v_ = v;\n    }\n\n    return clipStream;\n  };\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-geo/src/clip/rejoin.js\":\n/*!************************************************!*\\\n  !*** ./node_modules/d3-geo/src/clip/rejoin.js ***!\n  \\************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _pointEqual_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../pointEqual.js */ \"./node_modules/d3-geo/src/pointEqual.js\");\n/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../math.js */ \"./node_modules/d3-geo/src/math.js\");\n\n\n\nfunction Intersection(point, points, other, entry) {\n  this.x = point;\n  this.z = points;\n  this.o = other; // another intersection\n  this.e = entry; // is an entry?\n  this.v = false; // visited\n  this.n = this.p = null; // next & previous\n}\n\n// A generalized polygon clipping algorithm: given a polygon that has been cut\n// into its visible line segments, and rejoins the segments by interpolating\n// along the clip edge.\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(segments, compareIntersection, startInside, interpolate, stream) {\n  var subject = [],\n      clip = [],\n      i,\n      n;\n\n  segments.forEach(function(segment) {\n    if ((n = segment.length - 1) <= 0) return;\n    var n, p0 = segment[0], p1 = segment[n], x;\n\n    if (Object(_pointEqual_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(p0, p1)) {\n      if (!p0[2] && !p1[2]) {\n        stream.lineStart();\n        for (i = 0; i < n; ++i) stream.point((p0 = segment[i])[0], p0[1]);\n        stream.lineEnd();\n        return;\n      }\n      // handle degenerate cases by moving the point\n      p1[0] += 2 * _math_js__WEBPACK_IMPORTED_MODULE_1__[\"epsilon\"];\n    }\n\n    subject.push(x = new Intersection(p0, segment, null, true));\n    clip.push(x.o = new Intersection(p0, null, x, false));\n    subject.push(x = new Intersection(p1, segment, null, false));\n    clip.push(x.o = new Intersection(p1, null, x, true));\n  });\n\n  if (!subject.length) return;\n\n  clip.sort(compareIntersection);\n  link(subject);\n  link(clip);\n\n  for (i = 0, n = clip.length; i < n; ++i) {\n    clip[i].e = startInside = !startInside;\n  }\n\n  var start = subject[0],\n      points,\n      point;\n\n  while (1) {\n    // Find first unvisited intersection.\n    var current = start,\n        isSubject = true;\n    while (current.v) if ((current = current.n) === start) return;\n    points = current.z;\n    stream.lineStart();\n    do {\n      current.v = current.o.v = true;\n      if (current.e) {\n        if (isSubject) {\n          for (i = 0, n = points.length; i < n; ++i) stream.point((point = points[i])[0], point[1]);\n        } else {\n          interpolate(current.x, current.n.x, 1, stream);\n        }\n        current = current.n;\n      } else {\n        if (isSubject) {\n          points = current.p.z;\n          for (i = points.length - 1; i >= 0; --i) stream.point((point = points[i])[0], point[1]);\n        } else {\n          interpolate(current.x, current.p.x, -1, stream);\n        }\n        current = current.p;\n      }\n      current = current.o;\n      points = current.z;\n      isSubject = !isSubject;\n    } while (!current.v);\n    stream.lineEnd();\n  }\n});\n\nfunction link(array) {\n  if (!(n = array.length)) return;\n  var n,\n      i = 0,\n      a = array[0],\n      b;\n  while (++i < n) {\n    a.n = b = array[i];\n    b.p = a;\n    a = b;\n  }\n  a.n = b = array[0];\n  b.p = a;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-geo/src/compose.js\":\n/*!********************************************!*\\\n  !*** ./node_modules/d3-geo/src/compose.js ***!\n  \\********************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(a, b) {\n\n  function compose(x, y) {\n    return x = a(x, y), b(x[0], x[1]);\n  }\n\n  if (a.invert && b.invert) compose.invert = function(x, y) {\n    return x = b.invert(x, y), x && a.invert(x[0], x[1]);\n  };\n\n  return compose;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-geo/src/constant.js\":\n/*!*********************************************!*\\\n  !*** ./node_modules/d3-geo/src/constant.js ***!\n  \\*********************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(x) {\n  return function() {\n    return x;\n  };\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-geo/src/contains.js\":\n/*!*********************************************!*\\\n  !*** ./node_modules/d3-geo/src/contains.js ***!\n  \\*********************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _polygonContains_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./polygonContains.js */ \"./node_modules/d3-geo/src/polygonContains.js\");\n/* harmony import */ var _distance_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./distance.js */ \"./node_modules/d3-geo/src/distance.js\");\n/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./math.js */ \"./node_modules/d3-geo/src/math.js\");\n\n\n\n\nvar containsObjectType = {\n  Feature: function(object, point) {\n    return containsGeometry(object.geometry, point);\n  },\n  FeatureCollection: function(object, point) {\n    var features = object.features, i = -1, n = features.length;\n    while (++i < n) if (containsGeometry(features[i].geometry, point)) return true;\n    return false;\n  }\n};\n\nvar containsGeometryType = {\n  Sphere: function() {\n    return true;\n  },\n  Point: function(object, point) {\n    return containsPoint(object.coordinates, point);\n  },\n  MultiPoint: function(object, point) {\n    var coordinates = object.coordinates, i = -1, n = coordinates.length;\n    while (++i < n) if (containsPoint(coordinates[i], point)) return true;\n    return false;\n  },\n  LineString: function(object, point) {\n    return containsLine(object.coordinates, point);\n  },\n  MultiLineString: function(object, point) {\n    var coordinates = object.coordinates, i = -1, n = coordinates.length;\n    while (++i < n) if (containsLine(coordinates[i], point)) return true;\n    return false;\n  },\n  Polygon: function(object, point) {\n    return containsPolygon(object.coordinates, point);\n  },\n  MultiPolygon: function(object, point) {\n    var coordinates = object.coordinates, i = -1, n = coordinates.length;\n    while (++i < n) if (containsPolygon(coordinates[i], point)) return true;\n    return false;\n  },\n  GeometryCollection: function(object, point) {\n    var geometries = object.geometries, i = -1, n = geometries.length;\n    while (++i < n) if (containsGeometry(geometries[i], point)) return true;\n    return false;\n  }\n};\n\nfunction containsGeometry(geometry, point) {\n  return geometry && containsGeometryType.hasOwnProperty(geometry.type)\n      ? containsGeometryType[geometry.type](geometry, point)\n      : false;\n}\n\nfunction containsPoint(coordinates, point) {\n  return Object(_distance_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(coordinates, point) === 0;\n}\n\nfunction containsLine(coordinates, point) {\n  var ao, bo, ab;\n  for (var i = 0, n = coordinates.length; i < n; i++) {\n    bo = Object(_distance_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(coordinates[i], point);\n    if (bo === 0) return true;\n    if (i > 0) {\n      ab = Object(_distance_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(coordinates[i], coordinates[i - 1]);\n      if (\n        ab > 0 &&\n        ao <= ab &&\n        bo <= ab &&\n        (ao + bo - ab) * (1 - Math.pow((ao - bo) / ab, 2)) < _math_js__WEBPACK_IMPORTED_MODULE_2__[\"epsilon2\"] * ab\n      )\n        return true;\n    }\n    ao = bo;\n  }\n  return false;\n}\n\nfunction containsPolygon(coordinates, point) {\n  return !!Object(_polygonContains_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(coordinates.map(ringRadians), pointRadians(point));\n}\n\nfunction ringRadians(ring) {\n  return ring = ring.map(pointRadians), ring.pop(), ring;\n}\n\nfunction pointRadians(point) {\n  return [point[0] * _math_js__WEBPACK_IMPORTED_MODULE_2__[\"radians\"], point[1] * _math_js__WEBPACK_IMPORTED_MODULE_2__[\"radians\"]];\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(object, point) {\n  return (object && containsObjectType.hasOwnProperty(object.type)\n      ? containsObjectType[object.type]\n      : containsGeometry)(object, point);\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-geo/src/distance.js\":\n/*!*********************************************!*\\\n  !*** ./node_modules/d3-geo/src/distance.js ***!\n  \\*********************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _length_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./length.js */ \"./node_modules/d3-geo/src/length.js\");\n\n\nvar coordinates = [null, null],\n    object = {type: \"LineString\", coordinates: coordinates};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(a, b) {\n  coordinates[0] = a;\n  coordinates[1] = b;\n  return Object(_length_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(object);\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-geo/src/graticule.js\":\n/*!**********************************************!*\\\n  !*** ./node_modules/d3-geo/src/graticule.js ***!\n  \\**********************************************/\n/*! exports provided: default, graticule10 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return graticule; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"graticule10\", function() { return graticule10; });\n/* harmony import */ var d3_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-array */ \"./node_modules/d3-geo/node_modules/d3-array/src/index.js\");\n/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./math.js */ \"./node_modules/d3-geo/src/math.js\");\n\n\n\nfunction graticuleX(y0, y1, dy) {\n  var y = Object(d3_array__WEBPACK_IMPORTED_MODULE_0__[\"range\"])(y0, y1 - _math_js__WEBPACK_IMPORTED_MODULE_1__[\"epsilon\"], dy).concat(y1);\n  return function(x) { return y.map(function(y) { return [x, y]; }); };\n}\n\nfunction graticuleY(x0, x1, dx) {\n  var x = Object(d3_array__WEBPACK_IMPORTED_MODULE_0__[\"range\"])(x0, x1 - _math_js__WEBPACK_IMPORTED_MODULE_1__[\"epsilon\"], dx).concat(x1);\n  return function(y) { return x.map(function(x) { return [x, y]; }); };\n}\n\nfunction graticule() {\n  var x1, x0, X1, X0,\n      y1, y0, Y1, Y0,\n      dx = 10, dy = dx, DX = 90, DY = 360,\n      x, y, X, Y,\n      precision = 2.5;\n\n  function graticule() {\n    return {type: \"MultiLineString\", coordinates: lines()};\n  }\n\n  function lines() {\n    return Object(d3_array__WEBPACK_IMPORTED_MODULE_0__[\"range\"])(Object(_math_js__WEBPACK_IMPORTED_MODULE_1__[\"ceil\"])(X0 / DX) * DX, X1, DX).map(X)\n        .concat(Object(d3_array__WEBPACK_IMPORTED_MODULE_0__[\"range\"])(Object(_math_js__WEBPACK_IMPORTED_MODULE_1__[\"ceil\"])(Y0 / DY) * DY, Y1, DY).map(Y))\n        .concat(Object(d3_array__WEBPACK_IMPORTED_MODULE_0__[\"range\"])(Object(_math_js__WEBPACK_IMPORTED_MODULE_1__[\"ceil\"])(x0 / dx) * dx, x1, dx).filter(function(x) { return Object(_math_js__WEBPACK_IMPORTED_MODULE_1__[\"abs\"])(x % DX) > _math_js__WEBPACK_IMPORTED_MODULE_1__[\"epsilon\"]; }).map(x))\n        .concat(Object(d3_array__WEBPACK_IMPORTED_MODULE_0__[\"range\"])(Object(_math_js__WEBPACK_IMPORTED_MODULE_1__[\"ceil\"])(y0 / dy) * dy, y1, dy).filter(function(y) { return Object(_math_js__WEBPACK_IMPORTED_MODULE_1__[\"abs\"])(y % DY) > _math_js__WEBPACK_IMPORTED_MODULE_1__[\"epsilon\"]; }).map(y));\n  }\n\n  graticule.lines = function() {\n    return lines().map(function(coordinates) { return {type: \"LineString\", coordinates: coordinates}; });\n  };\n\n  graticule.outline = function() {\n    return {\n      type: \"Polygon\",\n      coordinates: [\n        X(X0).concat(\n        Y(Y1).slice(1),\n        X(X1).reverse().slice(1),\n        Y(Y0).reverse().slice(1))\n      ]\n    };\n  };\n\n  graticule.extent = function(_) {\n    if (!arguments.length) return graticule.extentMinor();\n    return graticule.extentMajor(_).extentMinor(_);\n  };\n\n  graticule.extentMajor = function(_) {\n    if (!arguments.length) return [[X0, Y0], [X1, Y1]];\n    X0 = +_[0][0], X1 = +_[1][0];\n    Y0 = +_[0][1], Y1 = +_[1][1];\n    if (X0 > X1) _ = X0, X0 = X1, X1 = _;\n    if (Y0 > Y1) _ = Y0, Y0 = Y1, Y1 = _;\n    return graticule.precision(precision);\n  };\n\n  graticule.extentMinor = function(_) {\n    if (!arguments.length) return [[x0, y0], [x1, y1]];\n    x0 = +_[0][0], x1 = +_[1][0];\n    y0 = +_[0][1], y1 = +_[1][1];\n    if (x0 > x1) _ = x0, x0 = x1, x1 = _;\n    if (y0 > y1) _ = y0, y0 = y1, y1 = _;\n    return graticule.precision(precision);\n  };\n\n  graticule.step = function(_) {\n    if (!arguments.length) return graticule.stepMinor();\n    return graticule.stepMajor(_).stepMinor(_);\n  };\n\n  graticule.stepMajor = function(_) {\n    if (!arguments.length) return [DX, DY];\n    DX = +_[0], DY = +_[1];\n    return graticule;\n  };\n\n  graticule.stepMinor = function(_) {\n    if (!arguments.length) return [dx, dy];\n    dx = +_[0], dy = +_[1];\n    return graticule;\n  };\n\n  graticule.precision = function(_) {\n    if (!arguments.length) return precision;\n    precision = +_;\n    x = graticuleX(y0, y1, 90);\n    y = graticuleY(x0, x1, precision);\n    X = graticuleX(Y0, Y1, 90);\n    Y = graticuleY(X0, X1, precision);\n    return graticule;\n  };\n\n  return graticule\n      .extentMajor([[-180, -90 + _math_js__WEBPACK_IMPORTED_MODULE_1__[\"epsilon\"]], [180, 90 - _math_js__WEBPACK_IMPORTED_MODULE_1__[\"epsilon\"]]])\n      .extentMinor([[-180, -80 - _math_js__WEBPACK_IMPORTED_MODULE_1__[\"epsilon\"]], [180, 80 + _math_js__WEBPACK_IMPORTED_MODULE_1__[\"epsilon\"]]]);\n}\n\nfunction graticule10() {\n  return graticule()();\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-geo/src/identity.js\":\n/*!*********************************************!*\\\n  !*** ./node_modules/d3-geo/src/identity.js ***!\n  \\*********************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (x => x);\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-geo/src/index.js\":\n/*!******************************************!*\\\n  !*** ./node_modules/d3-geo/src/index.js ***!\n  \\******************************************/\n/*! exports provided: geoArea, geoBounds, geoCentroid, geoCircle, geoClipAntimeridian, geoClipCircle, geoClipExtent, geoClipRectangle, geoContains, geoDistance, geoGraticule, geoGraticule10, geoInterpolate, geoLength, geoPath, geoAlbers, geoAlbersUsa, geoAzimuthalEqualArea, geoAzimuthalEqualAreaRaw, geoAzimuthalEquidistant, geoAzimuthalEquidistantRaw, geoConicConformal, geoConicConformalRaw, geoConicEqualArea, geoConicEqualAreaRaw, geoConicEquidistant, geoConicEquidistantRaw, geoEqualEarth, geoEqualEarthRaw, geoEquirectangular, geoEquirectangularRaw, geoGnomonic, geoGnomonicRaw, geoIdentity, geoProjection, geoProjectionMutator, geoMercator, geoMercatorRaw, geoNaturalEarth1, geoNaturalEarth1Raw, geoOrthographic, geoOrthographicRaw, geoStereographic, geoStereographicRaw, geoTransverseMercator, geoTransverseMercatorRaw, geoRotation, geoStream, geoTransform */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _area_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./area.js */ \"./node_modules/d3-geo/src/area.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoArea\", function() { return _area_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n/* harmony import */ var _bounds_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./bounds.js */ \"./node_modules/d3-geo/src/bounds.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoBounds\", function() { return _bounds_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"]; });\n\n/* harmony import */ var _centroid_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./centroid.js */ \"./node_modules/d3-geo/src/centroid.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoCentroid\", function() { return _centroid_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"]; });\n\n/* harmony import */ var _circle_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./circle.js */ \"./node_modules/d3-geo/src/circle.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoCircle\", function() { return _circle_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"]; });\n\n/* harmony import */ var _clip_antimeridian_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./clip/antimeridian.js */ \"./node_modules/d3-geo/src/clip/antimeridian.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoClipAntimeridian\", function() { return _clip_antimeridian_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"]; });\n\n/* harmony import */ var _clip_circle_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./clip/circle.js */ \"./node_modules/d3-geo/src/clip/circle.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoClipCircle\", function() { return _clip_circle_js__WEBPACK_IMPORTED_MODULE_5__[\"default\"]; });\n\n/* harmony import */ var _clip_extent_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./clip/extent.js */ \"./node_modules/d3-geo/src/clip/extent.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoClipExtent\", function() { return _clip_extent_js__WEBPACK_IMPORTED_MODULE_6__[\"default\"]; });\n\n/* harmony import */ var _clip_rectangle_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./clip/rectangle.js */ \"./node_modules/d3-geo/src/clip/rectangle.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoClipRectangle\", function() { return _clip_rectangle_js__WEBPACK_IMPORTED_MODULE_7__[\"default\"]; });\n\n/* harmony import */ var _contains_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./contains.js */ \"./node_modules/d3-geo/src/contains.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoContains\", function() { return _contains_js__WEBPACK_IMPORTED_MODULE_8__[\"default\"]; });\n\n/* harmony import */ var _distance_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./distance.js */ \"./node_modules/d3-geo/src/distance.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoDistance\", function() { return _distance_js__WEBPACK_IMPORTED_MODULE_9__[\"default\"]; });\n\n/* harmony import */ var _graticule_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./graticule.js */ \"./node_modules/d3-geo/src/graticule.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoGraticule\", function() { return _graticule_js__WEBPACK_IMPORTED_MODULE_10__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoGraticule10\", function() { return _graticule_js__WEBPACK_IMPORTED_MODULE_10__[\"graticule10\"]; });\n\n/* harmony import */ var _interpolate_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./interpolate.js */ \"./node_modules/d3-geo/src/interpolate.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoInterpolate\", function() { return _interpolate_js__WEBPACK_IMPORTED_MODULE_11__[\"default\"]; });\n\n/* harmony import */ var _length_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./length.js */ \"./node_modules/d3-geo/src/length.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoLength\", function() { return _length_js__WEBPACK_IMPORTED_MODULE_12__[\"default\"]; });\n\n/* harmony import */ var _path_index_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./path/index.js */ \"./node_modules/d3-geo/src/path/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoPath\", function() { return _path_index_js__WEBPACK_IMPORTED_MODULE_13__[\"default\"]; });\n\n/* harmony import */ var _projection_albers_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./projection/albers.js */ \"./node_modules/d3-geo/src/projection/albers.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoAlbers\", function() { return _projection_albers_js__WEBPACK_IMPORTED_MODULE_14__[\"default\"]; });\n\n/* harmony import */ var _projection_albersUsa_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./projection/albersUsa.js */ \"./node_modules/d3-geo/src/projection/albersUsa.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoAlbersUsa\", function() { return _projection_albersUsa_js__WEBPACK_IMPORTED_MODULE_15__[\"default\"]; });\n\n/* harmony import */ var _projection_azimuthalEqualArea_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./projection/azimuthalEqualArea.js */ \"./node_modules/d3-geo/src/projection/azimuthalEqualArea.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoAzimuthalEqualArea\", function() { return _projection_azimuthalEqualArea_js__WEBPACK_IMPORTED_MODULE_16__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoAzimuthalEqualAreaRaw\", function() { return _projection_azimuthalEqualArea_js__WEBPACK_IMPORTED_MODULE_16__[\"azimuthalEqualAreaRaw\"]; });\n\n/* harmony import */ var _projection_azimuthalEquidistant_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./projection/azimuthalEquidistant.js */ \"./node_modules/d3-geo/src/projection/azimuthalEquidistant.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoAzimuthalEquidistant\", function() { return _projection_azimuthalEquidistant_js__WEBPACK_IMPORTED_MODULE_17__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoAzimuthalEquidistantRaw\", function() { return _projection_azimuthalEquidistant_js__WEBPACK_IMPORTED_MODULE_17__[\"azimuthalEquidistantRaw\"]; });\n\n/* harmony import */ var _projection_conicConformal_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./projection/conicConformal.js */ \"./node_modules/d3-geo/src/projection/conicConformal.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoConicConformal\", function() { return _projection_conicConformal_js__WEBPACK_IMPORTED_MODULE_18__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoConicConformalRaw\", function() { return _projection_conicConformal_js__WEBPACK_IMPORTED_MODULE_18__[\"conicConformalRaw\"]; });\n\n/* harmony import */ var _projection_conicEqualArea_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./projection/conicEqualArea.js */ \"./node_modules/d3-geo/src/projection/conicEqualArea.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoConicEqualArea\", function() { return _projection_conicEqualArea_js__WEBPACK_IMPORTED_MODULE_19__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoConicEqualAreaRaw\", function() { return _projection_conicEqualArea_js__WEBPACK_IMPORTED_MODULE_19__[\"conicEqualAreaRaw\"]; });\n\n/* harmony import */ var _projection_conicEquidistant_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./projection/conicEquidistant.js */ \"./node_modules/d3-geo/src/projection/conicEquidistant.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoConicEquidistant\", function() { return _projection_conicEquidistant_js__WEBPACK_IMPORTED_MODULE_20__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoConicEquidistantRaw\", function() { return _projection_conicEquidistant_js__WEBPACK_IMPORTED_MODULE_20__[\"conicEquidistantRaw\"]; });\n\n/* harmony import */ var _projection_equalEarth_js__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./projection/equalEarth.js */ \"./node_modules/d3-geo/src/projection/equalEarth.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoEqualEarth\", function() { return _projection_equalEarth_js__WEBPACK_IMPORTED_MODULE_21__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoEqualEarthRaw\", function() { return _projection_equalEarth_js__WEBPACK_IMPORTED_MODULE_21__[\"equalEarthRaw\"]; });\n\n/* harmony import */ var _projection_equirectangular_js__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./projection/equirectangular.js */ \"./node_modules/d3-geo/src/projection/equirectangular.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoEquirectangular\", function() { return _projection_equirectangular_js__WEBPACK_IMPORTED_MODULE_22__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoEquirectangularRaw\", function() { return _projection_equirectangular_js__WEBPACK_IMPORTED_MODULE_22__[\"equirectangularRaw\"]; });\n\n/* harmony import */ var _projection_gnomonic_js__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./projection/gnomonic.js */ \"./node_modules/d3-geo/src/projection/gnomonic.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoGnomonic\", function() { return _projection_gnomonic_js__WEBPACK_IMPORTED_MODULE_23__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoGnomonicRaw\", function() { return _projection_gnomonic_js__WEBPACK_IMPORTED_MODULE_23__[\"gnomonicRaw\"]; });\n\n/* harmony import */ var _projection_identity_js__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ./projection/identity.js */ \"./node_modules/d3-geo/src/projection/identity.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoIdentity\", function() { return _projection_identity_js__WEBPACK_IMPORTED_MODULE_24__[\"default\"]; });\n\n/* harmony import */ var _projection_index_js__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ./projection/index.js */ \"./node_modules/d3-geo/src/projection/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoProjection\", function() { return _projection_index_js__WEBPACK_IMPORTED_MODULE_25__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoProjectionMutator\", function() { return _projection_index_js__WEBPACK_IMPORTED_MODULE_25__[\"projectionMutator\"]; });\n\n/* harmony import */ var _projection_mercator_js__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ./projection/mercator.js */ \"./node_modules/d3-geo/src/projection/mercator.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoMercator\", function() { return _projection_mercator_js__WEBPACK_IMPORTED_MODULE_26__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoMercatorRaw\", function() { return _projection_mercator_js__WEBPACK_IMPORTED_MODULE_26__[\"mercatorRaw\"]; });\n\n/* harmony import */ var _projection_naturalEarth1_js__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ./projection/naturalEarth1.js */ \"./node_modules/d3-geo/src/projection/naturalEarth1.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoNaturalEarth1\", function() { return _projection_naturalEarth1_js__WEBPACK_IMPORTED_MODULE_27__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoNaturalEarth1Raw\", function() { return _projection_naturalEarth1_js__WEBPACK_IMPORTED_MODULE_27__[\"naturalEarth1Raw\"]; });\n\n/* harmony import */ var _projection_orthographic_js__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ./projection/orthographic.js */ \"./node_modules/d3-geo/src/projection/orthographic.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoOrthographic\", function() { return _projection_orthographic_js__WEBPACK_IMPORTED_MODULE_28__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoOrthographicRaw\", function() { return _projection_orthographic_js__WEBPACK_IMPORTED_MODULE_28__[\"orthographicRaw\"]; });\n\n/* harmony import */ var _projection_stereographic_js__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ./projection/stereographic.js */ \"./node_modules/d3-geo/src/projection/stereographic.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoStereographic\", function() { return _projection_stereographic_js__WEBPACK_IMPORTED_MODULE_29__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoStereographicRaw\", function() { return _projection_stereographic_js__WEBPACK_IMPORTED_MODULE_29__[\"stereographicRaw\"]; });\n\n/* harmony import */ var _projection_transverseMercator_js__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ./projection/transverseMercator.js */ \"./node_modules/d3-geo/src/projection/transverseMercator.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoTransverseMercator\", function() { return _projection_transverseMercator_js__WEBPACK_IMPORTED_MODULE_30__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoTransverseMercatorRaw\", function() { return _projection_transverseMercator_js__WEBPACK_IMPORTED_MODULE_30__[\"transverseMercatorRaw\"]; });\n\n/* harmony import */ var _rotation_js__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ./rotation.js */ \"./node_modules/d3-geo/src/rotation.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoRotation\", function() { return _rotation_js__WEBPACK_IMPORTED_MODULE_31__[\"default\"]; });\n\n/* harmony import */ var _stream_js__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ./stream.js */ \"./node_modules/d3-geo/src/stream.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoStream\", function() { return _stream_js__WEBPACK_IMPORTED_MODULE_32__[\"default\"]; });\n\n/* harmony import */ var _transform_js__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! ./transform.js */ \"./node_modules/d3-geo/src/transform.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoTransform\", function() { return _transform_js__WEBPACK_IMPORTED_MODULE_33__[\"default\"]; });\n\n\n\n\n\n\n\n // DEPRECATED! Use d3.geoIdentity().clipExtent(…).\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-geo/src/interpolate.js\":\n/*!************************************************!*\\\n  !*** ./node_modules/d3-geo/src/interpolate.js ***!\n  \\************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./math.js */ \"./node_modules/d3-geo/src/math.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(a, b) {\n  var x0 = a[0] * _math_js__WEBPACK_IMPORTED_MODULE_0__[\"radians\"],\n      y0 = a[1] * _math_js__WEBPACK_IMPORTED_MODULE_0__[\"radians\"],\n      x1 = b[0] * _math_js__WEBPACK_IMPORTED_MODULE_0__[\"radians\"],\n      y1 = b[1] * _math_js__WEBPACK_IMPORTED_MODULE_0__[\"radians\"],\n      cy0 = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"cos\"])(y0),\n      sy0 = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"sin\"])(y0),\n      cy1 = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"cos\"])(y1),\n      sy1 = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"sin\"])(y1),\n      kx0 = cy0 * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"cos\"])(x0),\n      ky0 = cy0 * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"sin\"])(x0),\n      kx1 = cy1 * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"cos\"])(x1),\n      ky1 = cy1 * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"sin\"])(x1),\n      d = 2 * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"asin\"])(Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"sqrt\"])(Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"haversin\"])(y1 - y0) + cy0 * cy1 * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"haversin\"])(x1 - x0))),\n      k = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"sin\"])(d);\n\n  var interpolate = d ? function(t) {\n    var B = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"sin\"])(t *= d) / k,\n        A = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"sin\"])(d - t) / k,\n        x = A * kx0 + B * kx1,\n        y = A * ky0 + B * ky1,\n        z = A * sy0 + B * sy1;\n    return [\n      Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"atan2\"])(y, x) * _math_js__WEBPACK_IMPORTED_MODULE_0__[\"degrees\"],\n      Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"atan2\"])(z, Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"sqrt\"])(x * x + y * y)) * _math_js__WEBPACK_IMPORTED_MODULE_0__[\"degrees\"]\n    ];\n  } : function() {\n    return [x0 * _math_js__WEBPACK_IMPORTED_MODULE_0__[\"degrees\"], y0 * _math_js__WEBPACK_IMPORTED_MODULE_0__[\"degrees\"]];\n  };\n\n  interpolate.distance = d;\n\n  return interpolate;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-geo/src/length.js\":\n/*!*******************************************!*\\\n  !*** ./node_modules/d3-geo/src/length.js ***!\n  \\*******************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var d3_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-array */ \"./node_modules/d3-geo/node_modules/d3-array/src/index.js\");\n/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./math.js */ \"./node_modules/d3-geo/src/math.js\");\n/* harmony import */ var _noop_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./noop.js */ \"./node_modules/d3-geo/src/noop.js\");\n/* harmony import */ var _stream_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./stream.js */ \"./node_modules/d3-geo/src/stream.js\");\n\n\n\n\n\nvar lengthSum,\n    lambda0,\n    sinPhi0,\n    cosPhi0;\n\nvar lengthStream = {\n  sphere: _noop_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"],\n  point: _noop_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"],\n  lineStart: lengthLineStart,\n  lineEnd: _noop_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"],\n  polygonStart: _noop_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"],\n  polygonEnd: _noop_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"]\n};\n\nfunction lengthLineStart() {\n  lengthStream.point = lengthPointFirst;\n  lengthStream.lineEnd = lengthLineEnd;\n}\n\nfunction lengthLineEnd() {\n  lengthStream.point = lengthStream.lineEnd = _noop_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"];\n}\n\nfunction lengthPointFirst(lambda, phi) {\n  lambda *= _math_js__WEBPACK_IMPORTED_MODULE_1__[\"radians\"], phi *= _math_js__WEBPACK_IMPORTED_MODULE_1__[\"radians\"];\n  lambda0 = lambda, sinPhi0 = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__[\"sin\"])(phi), cosPhi0 = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__[\"cos\"])(phi);\n  lengthStream.point = lengthPoint;\n}\n\nfunction lengthPoint(lambda, phi) {\n  lambda *= _math_js__WEBPACK_IMPORTED_MODULE_1__[\"radians\"], phi *= _math_js__WEBPACK_IMPORTED_MODULE_1__[\"radians\"];\n  var sinPhi = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__[\"sin\"])(phi),\n      cosPhi = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__[\"cos\"])(phi),\n      delta = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__[\"abs\"])(lambda - lambda0),\n      cosDelta = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__[\"cos\"])(delta),\n      sinDelta = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__[\"sin\"])(delta),\n      x = cosPhi * sinDelta,\n      y = cosPhi0 * sinPhi - sinPhi0 * cosPhi * cosDelta,\n      z = sinPhi0 * sinPhi + cosPhi0 * cosPhi * cosDelta;\n  lengthSum.add(Object(_math_js__WEBPACK_IMPORTED_MODULE_1__[\"atan2\"])(Object(_math_js__WEBPACK_IMPORTED_MODULE_1__[\"sqrt\"])(x * x + y * y), z));\n  lambda0 = lambda, sinPhi0 = sinPhi, cosPhi0 = cosPhi;\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(object) {\n  lengthSum = new d3_array__WEBPACK_IMPORTED_MODULE_0__[\"Adder\"]();\n  Object(_stream_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(object, lengthStream);\n  return +lengthSum;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-geo/src/math.js\":\n/*!*****************************************!*\\\n  !*** ./node_modules/d3-geo/src/math.js ***!\n  \\*****************************************/\n/*! exports provided: epsilon, epsilon2, pi, halfPi, quarterPi, tau, degrees, radians, abs, atan, atan2, cos, ceil, exp, floor, hypot, log, pow, sin, sign, sqrt, tan, acos, asin, haversin */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"epsilon\", function() { return epsilon; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"epsilon2\", function() { return epsilon2; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"pi\", function() { return pi; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"halfPi\", function() { return halfPi; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"quarterPi\", function() { return quarterPi; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"tau\", function() { return tau; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"degrees\", function() { return degrees; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"radians\", function() { return radians; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"abs\", function() { return abs; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"atan\", function() { return atan; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"atan2\", function() { return atan2; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"cos\", function() { return cos; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"ceil\", function() { return ceil; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"exp\", function() { return exp; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"floor\", function() { return floor; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"hypot\", function() { return hypot; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"log\", function() { return log; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"pow\", function() { return pow; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"sin\", function() { return sin; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"sign\", function() { return sign; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"sqrt\", function() { return sqrt; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"tan\", function() { return tan; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"acos\", function() { return acos; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"asin\", function() { return asin; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"haversin\", function() { return haversin; });\nvar epsilon = 1e-6;\nvar epsilon2 = 1e-12;\nvar pi = Math.PI;\nvar halfPi = pi / 2;\nvar quarterPi = pi / 4;\nvar tau = pi * 2;\n\nvar degrees = 180 / pi;\nvar radians = pi / 180;\n\nvar abs = Math.abs;\nvar atan = Math.atan;\nvar atan2 = Math.atan2;\nvar cos = Math.cos;\nvar ceil = Math.ceil;\nvar exp = Math.exp;\nvar floor = Math.floor;\nvar hypot = Math.hypot;\nvar log = Math.log;\nvar pow = Math.pow;\nvar sin = Math.sin;\nvar sign = Math.sign || function(x) { return x > 0 ? 1 : x < 0 ? -1 : 0; };\nvar sqrt = Math.sqrt;\nvar tan = Math.tan;\n\nfunction acos(x) {\n  return x > 1 ? 0 : x < -1 ? pi : Math.acos(x);\n}\n\nfunction asin(x) {\n  return x > 1 ? halfPi : x < -1 ? -halfPi : Math.asin(x);\n}\n\nfunction haversin(x) {\n  return (x = sin(x / 2)) * x;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-geo/src/noop.js\":\n/*!*****************************************!*\\\n  !*** ./node_modules/d3-geo/src/noop.js ***!\n  \\*****************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return noop; });\nfunction noop() {}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-geo/src/path/area.js\":\n/*!**********************************************!*\\\n  !*** ./node_modules/d3-geo/src/path/area.js ***!\n  \\**********************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var d3_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-array */ \"./node_modules/d3-geo/node_modules/d3-array/src/index.js\");\n/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../math.js */ \"./node_modules/d3-geo/src/math.js\");\n/* harmony import */ var _noop_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../noop.js */ \"./node_modules/d3-geo/src/noop.js\");\n\n\n\n\nvar areaSum = new d3_array__WEBPACK_IMPORTED_MODULE_0__[\"Adder\"](),\n    areaRingSum = new d3_array__WEBPACK_IMPORTED_MODULE_0__[\"Adder\"](),\n    x00,\n    y00,\n    x0,\n    y0;\n\nvar areaStream = {\n  point: _noop_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"],\n  lineStart: _noop_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"],\n  lineEnd: _noop_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"],\n  polygonStart: function() {\n    areaStream.lineStart = areaRingStart;\n    areaStream.lineEnd = areaRingEnd;\n  },\n  polygonEnd: function() {\n    areaStream.lineStart = areaStream.lineEnd = areaStream.point = _noop_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"];\n    areaSum.add(Object(_math_js__WEBPACK_IMPORTED_MODULE_1__[\"abs\"])(areaRingSum));\n    areaRingSum = new d3_array__WEBPACK_IMPORTED_MODULE_0__[\"Adder\"]();\n  },\n  result: function() {\n    var area = areaSum / 2;\n    areaSum = new d3_array__WEBPACK_IMPORTED_MODULE_0__[\"Adder\"]();\n    return area;\n  }\n};\n\nfunction areaRingStart() {\n  areaStream.point = areaPointFirst;\n}\n\nfunction areaPointFirst(x, y) {\n  areaStream.point = areaPoint;\n  x00 = x0 = x, y00 = y0 = y;\n}\n\nfunction areaPoint(x, y) {\n  areaRingSum.add(y0 * x - x0 * y);\n  x0 = x, y0 = y;\n}\n\nfunction areaRingEnd() {\n  areaPoint(x00, y00);\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (areaStream);\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-geo/src/path/bounds.js\":\n/*!************************************************!*\\\n  !*** ./node_modules/d3-geo/src/path/bounds.js ***!\n  \\************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _noop_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../noop.js */ \"./node_modules/d3-geo/src/noop.js\");\n\n\nvar x0 = Infinity,\n    y0 = x0,\n    x1 = -x0,\n    y1 = x1;\n\nvar boundsStream = {\n  point: boundsPoint,\n  lineStart: _noop_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"],\n  lineEnd: _noop_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"],\n  polygonStart: _noop_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"],\n  polygonEnd: _noop_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"],\n  result: function() {\n    var bounds = [[x0, y0], [x1, y1]];\n    x1 = y1 = -(y0 = x0 = Infinity);\n    return bounds;\n  }\n};\n\nfunction boundsPoint(x, y) {\n  if (x < x0) x0 = x;\n  if (x > x1) x1 = x;\n  if (y < y0) y0 = y;\n  if (y > y1) y1 = y;\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (boundsStream);\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-geo/src/path/centroid.js\":\n/*!**************************************************!*\\\n  !*** ./node_modules/d3-geo/src/path/centroid.js ***!\n  \\**************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../math.js */ \"./node_modules/d3-geo/src/math.js\");\n\n\n// TODO Enforce positive area for exterior, negative area for interior?\n\nvar X0 = 0,\n    Y0 = 0,\n    Z0 = 0,\n    X1 = 0,\n    Y1 = 0,\n    Z1 = 0,\n    X2 = 0,\n    Y2 = 0,\n    Z2 = 0,\n    x00,\n    y00,\n    x0,\n    y0;\n\nvar centroidStream = {\n  point: centroidPoint,\n  lineStart: centroidLineStart,\n  lineEnd: centroidLineEnd,\n  polygonStart: function() {\n    centroidStream.lineStart = centroidRingStart;\n    centroidStream.lineEnd = centroidRingEnd;\n  },\n  polygonEnd: function() {\n    centroidStream.point = centroidPoint;\n    centroidStream.lineStart = centroidLineStart;\n    centroidStream.lineEnd = centroidLineEnd;\n  },\n  result: function() {\n    var centroid = Z2 ? [X2 / Z2, Y2 / Z2]\n        : Z1 ? [X1 / Z1, Y1 / Z1]\n        : Z0 ? [X0 / Z0, Y0 / Z0]\n        : [NaN, NaN];\n    X0 = Y0 = Z0 =\n    X1 = Y1 = Z1 =\n    X2 = Y2 = Z2 = 0;\n    return centroid;\n  }\n};\n\nfunction centroidPoint(x, y) {\n  X0 += x;\n  Y0 += y;\n  ++Z0;\n}\n\nfunction centroidLineStart() {\n  centroidStream.point = centroidPointFirstLine;\n}\n\nfunction centroidPointFirstLine(x, y) {\n  centroidStream.point = centroidPointLine;\n  centroidPoint(x0 = x, y0 = y);\n}\n\nfunction centroidPointLine(x, y) {\n  var dx = x - x0, dy = y - y0, z = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"sqrt\"])(dx * dx + dy * dy);\n  X1 += z * (x0 + x) / 2;\n  Y1 += z * (y0 + y) / 2;\n  Z1 += z;\n  centroidPoint(x0 = x, y0 = y);\n}\n\nfunction centroidLineEnd() {\n  centroidStream.point = centroidPoint;\n}\n\nfunction centroidRingStart() {\n  centroidStream.point = centroidPointFirstRing;\n}\n\nfunction centroidRingEnd() {\n  centroidPointRing(x00, y00);\n}\n\nfunction centroidPointFirstRing(x, y) {\n  centroidStream.point = centroidPointRing;\n  centroidPoint(x00 = x0 = x, y00 = y0 = y);\n}\n\nfunction centroidPointRing(x, y) {\n  var dx = x - x0,\n      dy = y - y0,\n      z = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"sqrt\"])(dx * dx + dy * dy);\n\n  X1 += z * (x0 + x) / 2;\n  Y1 += z * (y0 + y) / 2;\n  Z1 += z;\n\n  z = y0 * x - x0 * y;\n  X2 += z * (x0 + x);\n  Y2 += z * (y0 + y);\n  Z2 += z * 3;\n  centroidPoint(x0 = x, y0 = y);\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (centroidStream);\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-geo/src/path/context.js\":\n/*!*************************************************!*\\\n  !*** ./node_modules/d3-geo/src/path/context.js ***!\n  \\*************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return PathContext; });\n/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../math.js */ \"./node_modules/d3-geo/src/math.js\");\n/* harmony import */ var _noop_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../noop.js */ \"./node_modules/d3-geo/src/noop.js\");\n\n\n\nfunction PathContext(context) {\n  this._context = context;\n}\n\nPathContext.prototype = {\n  _radius: 4.5,\n  pointRadius: function(_) {\n    return this._radius = _, this;\n  },\n  polygonStart: function() {\n    this._line = 0;\n  },\n  polygonEnd: function() {\n    this._line = NaN;\n  },\n  lineStart: function() {\n    this._point = 0;\n  },\n  lineEnd: function() {\n    if (this._line === 0) this._context.closePath();\n    this._point = NaN;\n  },\n  point: function(x, y) {\n    switch (this._point) {\n      case 0: {\n        this._context.moveTo(x, y);\n        this._point = 1;\n        break;\n      }\n      case 1: {\n        this._context.lineTo(x, y);\n        break;\n      }\n      default: {\n        this._context.moveTo(x + this._radius, y);\n        this._context.arc(x, y, this._radius, 0, _math_js__WEBPACK_IMPORTED_MODULE_0__[\"tau\"]);\n        break;\n      }\n    }\n  },\n  result: _noop_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"]\n};\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-geo/src/path/index.js\":\n/*!***********************************************!*\\\n  !*** ./node_modules/d3-geo/src/path/index.js ***!\n  \\***********************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _identity_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../identity.js */ \"./node_modules/d3-geo/src/identity.js\");\n/* harmony import */ var _stream_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../stream.js */ \"./node_modules/d3-geo/src/stream.js\");\n/* harmony import */ var _area_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./area.js */ \"./node_modules/d3-geo/src/path/area.js\");\n/* harmony import */ var _bounds_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./bounds.js */ \"./node_modules/d3-geo/src/path/bounds.js\");\n/* harmony import */ var _centroid_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./centroid.js */ \"./node_modules/d3-geo/src/path/centroid.js\");\n/* harmony import */ var _context_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./context.js */ \"./node_modules/d3-geo/src/path/context.js\");\n/* harmony import */ var _measure_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./measure.js */ \"./node_modules/d3-geo/src/path/measure.js\");\n/* harmony import */ var _string_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./string.js */ \"./node_modules/d3-geo/src/path/string.js\");\n\n\n\n\n\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(projection, context) {\n  var pointRadius = 4.5,\n      projectionStream,\n      contextStream;\n\n  function path(object) {\n    if (object) {\n      if (typeof pointRadius === \"function\") contextStream.pointRadius(+pointRadius.apply(this, arguments));\n      Object(_stream_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(object, projectionStream(contextStream));\n    }\n    return contextStream.result();\n  }\n\n  path.area = function(object) {\n    Object(_stream_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(object, projectionStream(_area_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"]));\n    return _area_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"].result();\n  };\n\n  path.measure = function(object) {\n    Object(_stream_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(object, projectionStream(_measure_js__WEBPACK_IMPORTED_MODULE_6__[\"default\"]));\n    return _measure_js__WEBPACK_IMPORTED_MODULE_6__[\"default\"].result();\n  };\n\n  path.bounds = function(object) {\n    Object(_stream_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(object, projectionStream(_bounds_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"]));\n    return _bounds_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"].result();\n  };\n\n  path.centroid = function(object) {\n    Object(_stream_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(object, projectionStream(_centroid_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"]));\n    return _centroid_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"].result();\n  };\n\n  path.projection = function(_) {\n    return arguments.length ? (projectionStream = _ == null ? (projection = null, _identity_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]) : (projection = _).stream, path) : projection;\n  };\n\n  path.context = function(_) {\n    if (!arguments.length) return context;\n    contextStream = _ == null ? (context = null, new _string_js__WEBPACK_IMPORTED_MODULE_7__[\"default\"]) : new _context_js__WEBPACK_IMPORTED_MODULE_5__[\"default\"](context = _);\n    if (typeof pointRadius !== \"function\") contextStream.pointRadius(pointRadius);\n    return path;\n  };\n\n  path.pointRadius = function(_) {\n    if (!arguments.length) return pointRadius;\n    pointRadius = typeof _ === \"function\" ? _ : (contextStream.pointRadius(+_), +_);\n    return path;\n  };\n\n  return path.projection(projection).context(context);\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-geo/src/path/measure.js\":\n/*!*************************************************!*\\\n  !*** ./node_modules/d3-geo/src/path/measure.js ***!\n  \\*************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var d3_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-array */ \"./node_modules/d3-geo/node_modules/d3-array/src/index.js\");\n/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../math.js */ \"./node_modules/d3-geo/src/math.js\");\n/* harmony import */ var _noop_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../noop.js */ \"./node_modules/d3-geo/src/noop.js\");\n\n\n\n\nvar lengthSum = new d3_array__WEBPACK_IMPORTED_MODULE_0__[\"Adder\"](),\n    lengthRing,\n    x00,\n    y00,\n    x0,\n    y0;\n\nvar lengthStream = {\n  point: _noop_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"],\n  lineStart: function() {\n    lengthStream.point = lengthPointFirst;\n  },\n  lineEnd: function() {\n    if (lengthRing) lengthPoint(x00, y00);\n    lengthStream.point = _noop_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"];\n  },\n  polygonStart: function() {\n    lengthRing = true;\n  },\n  polygonEnd: function() {\n    lengthRing = null;\n  },\n  result: function() {\n    var length = +lengthSum;\n    lengthSum = new d3_array__WEBPACK_IMPORTED_MODULE_0__[\"Adder\"]();\n    return length;\n  }\n};\n\nfunction lengthPointFirst(x, y) {\n  lengthStream.point = lengthPoint;\n  x00 = x0 = x, y00 = y0 = y;\n}\n\nfunction lengthPoint(x, y) {\n  x0 -= x, y0 -= y;\n  lengthSum.add(Object(_math_js__WEBPACK_IMPORTED_MODULE_1__[\"sqrt\"])(x0 * x0 + y0 * y0));\n  x0 = x, y0 = y;\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (lengthStream);\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-geo/src/path/string.js\":\n/*!************************************************!*\\\n  !*** ./node_modules/d3-geo/src/path/string.js ***!\n  \\************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return PathString; });\nfunction PathString() {\n  this._string = [];\n}\n\nPathString.prototype = {\n  _radius: 4.5,\n  _circle: circle(4.5),\n  pointRadius: function(_) {\n    if ((_ = +_) !== this._radius) this._radius = _, this._circle = null;\n    return this;\n  },\n  polygonStart: function() {\n    this._line = 0;\n  },\n  polygonEnd: function() {\n    this._line = NaN;\n  },\n  lineStart: function() {\n    this._point = 0;\n  },\n  lineEnd: function() {\n    if (this._line === 0) this._string.push(\"Z\");\n    this._point = NaN;\n  },\n  point: function(x, y) {\n    switch (this._point) {\n      case 0: {\n        this._string.push(\"M\", x, \",\", y);\n        this._point = 1;\n        break;\n      }\n      case 1: {\n        this._string.push(\"L\", x, \",\", y);\n        break;\n      }\n      default: {\n        if (this._circle == null) this._circle = circle(this._radius);\n        this._string.push(\"M\", x, \",\", y, this._circle);\n        break;\n      }\n    }\n  },\n  result: function() {\n    if (this._string.length) {\n      var result = this._string.join(\"\");\n      this._string = [];\n      return result;\n    } else {\n      return null;\n    }\n  }\n};\n\nfunction circle(radius) {\n  return \"m0,\" + radius\n      + \"a\" + radius + \",\" + radius + \" 0 1,1 0,\" + -2 * radius\n      + \"a\" + radius + \",\" + radius + \" 0 1,1 0,\" + 2 * radius\n      + \"z\";\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-geo/src/pointEqual.js\":\n/*!***********************************************!*\\\n  !*** ./node_modules/d3-geo/src/pointEqual.js ***!\n  \\***********************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./math.js */ \"./node_modules/d3-geo/src/math.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(a, b) {\n  return Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"abs\"])(a[0] - b[0]) < _math_js__WEBPACK_IMPORTED_MODULE_0__[\"epsilon\"] && Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"abs\"])(a[1] - b[1]) < _math_js__WEBPACK_IMPORTED_MODULE_0__[\"epsilon\"];\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-geo/src/polygonContains.js\":\n/*!****************************************************!*\\\n  !*** ./node_modules/d3-geo/src/polygonContains.js ***!\n  \\****************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var d3_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-array */ \"./node_modules/d3-geo/node_modules/d3-array/src/index.js\");\n/* harmony import */ var _cartesian_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./cartesian.js */ \"./node_modules/d3-geo/src/cartesian.js\");\n/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./math.js */ \"./node_modules/d3-geo/src/math.js\");\n\n\n\n\nfunction longitude(point) {\n  return Object(_math_js__WEBPACK_IMPORTED_MODULE_2__[\"abs\"])(point[0]) <= _math_js__WEBPACK_IMPORTED_MODULE_2__[\"pi\"] ? point[0] : Object(_math_js__WEBPACK_IMPORTED_MODULE_2__[\"sign\"])(point[0]) * ((Object(_math_js__WEBPACK_IMPORTED_MODULE_2__[\"abs\"])(point[0]) + _math_js__WEBPACK_IMPORTED_MODULE_2__[\"pi\"]) % _math_js__WEBPACK_IMPORTED_MODULE_2__[\"tau\"] - _math_js__WEBPACK_IMPORTED_MODULE_2__[\"pi\"]);\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(polygon, point) {\n  var lambda = longitude(point),\n      phi = point[1],\n      sinPhi = Object(_math_js__WEBPACK_IMPORTED_MODULE_2__[\"sin\"])(phi),\n      normal = [Object(_math_js__WEBPACK_IMPORTED_MODULE_2__[\"sin\"])(lambda), -Object(_math_js__WEBPACK_IMPORTED_MODULE_2__[\"cos\"])(lambda), 0],\n      angle = 0,\n      winding = 0;\n\n  var sum = new d3_array__WEBPACK_IMPORTED_MODULE_0__[\"Adder\"]();\n\n  if (sinPhi === 1) phi = _math_js__WEBPACK_IMPORTED_MODULE_2__[\"halfPi\"] + _math_js__WEBPACK_IMPORTED_MODULE_2__[\"epsilon\"];\n  else if (sinPhi === -1) phi = -_math_js__WEBPACK_IMPORTED_MODULE_2__[\"halfPi\"] - _math_js__WEBPACK_IMPORTED_MODULE_2__[\"epsilon\"];\n\n  for (var i = 0, n = polygon.length; i < n; ++i) {\n    if (!(m = (ring = polygon[i]).length)) continue;\n    var ring,\n        m,\n        point0 = ring[m - 1],\n        lambda0 = longitude(point0),\n        phi0 = point0[1] / 2 + _math_js__WEBPACK_IMPORTED_MODULE_2__[\"quarterPi\"],\n        sinPhi0 = Object(_math_js__WEBPACK_IMPORTED_MODULE_2__[\"sin\"])(phi0),\n        cosPhi0 = Object(_math_js__WEBPACK_IMPORTED_MODULE_2__[\"cos\"])(phi0);\n\n    for (var j = 0; j < m; ++j, lambda0 = lambda1, sinPhi0 = sinPhi1, cosPhi0 = cosPhi1, point0 = point1) {\n      var point1 = ring[j],\n          lambda1 = longitude(point1),\n          phi1 = point1[1] / 2 + _math_js__WEBPACK_IMPORTED_MODULE_2__[\"quarterPi\"],\n          sinPhi1 = Object(_math_js__WEBPACK_IMPORTED_MODULE_2__[\"sin\"])(phi1),\n          cosPhi1 = Object(_math_js__WEBPACK_IMPORTED_MODULE_2__[\"cos\"])(phi1),\n          delta = lambda1 - lambda0,\n          sign = delta >= 0 ? 1 : -1,\n          absDelta = sign * delta,\n          antimeridian = absDelta > _math_js__WEBPACK_IMPORTED_MODULE_2__[\"pi\"],\n          k = sinPhi0 * sinPhi1;\n\n      sum.add(Object(_math_js__WEBPACK_IMPORTED_MODULE_2__[\"atan2\"])(k * sign * Object(_math_js__WEBPACK_IMPORTED_MODULE_2__[\"sin\"])(absDelta), cosPhi0 * cosPhi1 + k * Object(_math_js__WEBPACK_IMPORTED_MODULE_2__[\"cos\"])(absDelta)));\n      angle += antimeridian ? delta + sign * _math_js__WEBPACK_IMPORTED_MODULE_2__[\"tau\"] : delta;\n\n      // Are the longitudes either side of the point’s meridian (lambda),\n      // and are the latitudes smaller than the parallel (phi)?\n      if (antimeridian ^ lambda0 >= lambda ^ lambda1 >= lambda) {\n        var arc = Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_1__[\"cartesianCross\"])(Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_1__[\"cartesian\"])(point0), Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_1__[\"cartesian\"])(point1));\n        Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_1__[\"cartesianNormalizeInPlace\"])(arc);\n        var intersection = Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_1__[\"cartesianCross\"])(normal, arc);\n        Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_1__[\"cartesianNormalizeInPlace\"])(intersection);\n        var phiArc = (antimeridian ^ delta >= 0 ? -1 : 1) * Object(_math_js__WEBPACK_IMPORTED_MODULE_2__[\"asin\"])(intersection[2]);\n        if (phi > phiArc || phi === phiArc && (arc[0] || arc[1])) {\n          winding += antimeridian ^ delta >= 0 ? 1 : -1;\n        }\n      }\n    }\n  }\n\n  // First, determine whether the South pole is inside or outside:\n  //\n  // It is inside if:\n  // * the polygon winds around it in a clockwise direction.\n  // * the polygon does not (cumulatively) wind around it, but has a negative\n  //   (counter-clockwise) area.\n  //\n  // Second, count the (signed) number of times a segment crosses a lambda\n  // from the point to the South pole.  If it is zero, then the point is the\n  // same side as the South pole.\n\n  return (angle < -_math_js__WEBPACK_IMPORTED_MODULE_2__[\"epsilon\"] || angle < _math_js__WEBPACK_IMPORTED_MODULE_2__[\"epsilon\"] && sum < -_math_js__WEBPACK_IMPORTED_MODULE_2__[\"epsilon2\"]) ^ (winding & 1);\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-geo/src/projection/albers.js\":\n/*!******************************************************!*\\\n  !*** ./node_modules/d3-geo/src/projection/albers.js ***!\n  \\******************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _conicEqualArea_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./conicEqualArea.js */ \"./node_modules/d3-geo/src/projection/conicEqualArea.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  return Object(_conicEqualArea_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])()\n      .parallels([29.5, 45.5])\n      .scale(1070)\n      .translate([480, 250])\n      .rotate([96, 0])\n      .center([-0.6, 38.7]);\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-geo/src/projection/albersUsa.js\":\n/*!*********************************************************!*\\\n  !*** ./node_modules/d3-geo/src/projection/albersUsa.js ***!\n  \\*********************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../math.js */ \"./node_modules/d3-geo/src/math.js\");\n/* harmony import */ var _albers_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./albers.js */ \"./node_modules/d3-geo/src/projection/albers.js\");\n/* harmony import */ var _conicEqualArea_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./conicEqualArea.js */ \"./node_modules/d3-geo/src/projection/conicEqualArea.js\");\n/* harmony import */ var _fit_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./fit.js */ \"./node_modules/d3-geo/src/projection/fit.js\");\n\n\n\n\n\n// The projections must have mutually exclusive clip regions on the sphere,\n// as this will avoid emitting interleaving lines and polygons.\nfunction multiplex(streams) {\n  var n = streams.length;\n  return {\n    point: function(x, y) { var i = -1; while (++i < n) streams[i].point(x, y); },\n    sphere: function() { var i = -1; while (++i < n) streams[i].sphere(); },\n    lineStart: function() { var i = -1; while (++i < n) streams[i].lineStart(); },\n    lineEnd: function() { var i = -1; while (++i < n) streams[i].lineEnd(); },\n    polygonStart: function() { var i = -1; while (++i < n) streams[i].polygonStart(); },\n    polygonEnd: function() { var i = -1; while (++i < n) streams[i].polygonEnd(); }\n  };\n}\n\n// A composite projection for the United States, configured by default for\n// 960×500. The projection also works quite well at 960×600 if you change the\n// scale to 1285 and adjust the translate accordingly. The set of standard\n// parallels for each region comes from USGS, which is published here:\n// http://egsc.usgs.gov/isb/pubs/MapProjections/projections.html#albers\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  var cache,\n      cacheStream,\n      lower48 = Object(_albers_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(), lower48Point,\n      alaska = Object(_conicEqualArea_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])().rotate([154, 0]).center([-2, 58.5]).parallels([55, 65]), alaskaPoint, // EPSG:3338\n      hawaii = Object(_conicEqualArea_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])().rotate([157, 0]).center([-3, 19.9]).parallels([8, 18]), hawaiiPoint, // ESRI:102007\n      point, pointStream = {point: function(x, y) { point = [x, y]; }};\n\n  function albersUsa(coordinates) {\n    var x = coordinates[0], y = coordinates[1];\n    return point = null,\n        (lower48Point.point(x, y), point)\n        || (alaskaPoint.point(x, y), point)\n        || (hawaiiPoint.point(x, y), point);\n  }\n\n  albersUsa.invert = function(coordinates) {\n    var k = lower48.scale(),\n        t = lower48.translate(),\n        x = (coordinates[0] - t[0]) / k,\n        y = (coordinates[1] - t[1]) / k;\n    return (y >= 0.120 && y < 0.234 && x >= -0.425 && x < -0.214 ? alaska\n        : y >= 0.166 && y < 0.234 && x >= -0.214 && x < -0.115 ? hawaii\n        : lower48).invert(coordinates);\n  };\n\n  albersUsa.stream = function(stream) {\n    return cache && cacheStream === stream ? cache : cache = multiplex([lower48.stream(cacheStream = stream), alaska.stream(stream), hawaii.stream(stream)]);\n  };\n\n  albersUsa.precision = function(_) {\n    if (!arguments.length) return lower48.precision();\n    lower48.precision(_), alaska.precision(_), hawaii.precision(_);\n    return reset();\n  };\n\n  albersUsa.scale = function(_) {\n    if (!arguments.length) return lower48.scale();\n    lower48.scale(_), alaska.scale(_ * 0.35), hawaii.scale(_);\n    return albersUsa.translate(lower48.translate());\n  };\n\n  albersUsa.translate = function(_) {\n    if (!arguments.length) return lower48.translate();\n    var k = lower48.scale(), x = +_[0], y = +_[1];\n\n    lower48Point = lower48\n        .translate(_)\n        .clipExtent([[x - 0.455 * k, y - 0.238 * k], [x + 0.455 * k, y + 0.238 * k]])\n        .stream(pointStream);\n\n    alaskaPoint = alaska\n        .translate([x - 0.307 * k, y + 0.201 * k])\n        .clipExtent([[x - 0.425 * k + _math_js__WEBPACK_IMPORTED_MODULE_0__[\"epsilon\"], y + 0.120 * k + _math_js__WEBPACK_IMPORTED_MODULE_0__[\"epsilon\"]], [x - 0.214 * k - _math_js__WEBPACK_IMPORTED_MODULE_0__[\"epsilon\"], y + 0.234 * k - _math_js__WEBPACK_IMPORTED_MODULE_0__[\"epsilon\"]]])\n        .stream(pointStream);\n\n    hawaiiPoint = hawaii\n        .translate([x - 0.205 * k, y + 0.212 * k])\n        .clipExtent([[x - 0.214 * k + _math_js__WEBPACK_IMPORTED_MODULE_0__[\"epsilon\"], y + 0.166 * k + _math_js__WEBPACK_IMPORTED_MODULE_0__[\"epsilon\"]], [x - 0.115 * k - _math_js__WEBPACK_IMPORTED_MODULE_0__[\"epsilon\"], y + 0.234 * k - _math_js__WEBPACK_IMPORTED_MODULE_0__[\"epsilon\"]]])\n        .stream(pointStream);\n\n    return reset();\n  };\n\n  albersUsa.fitExtent = function(extent, object) {\n    return Object(_fit_js__WEBPACK_IMPORTED_MODULE_3__[\"fitExtent\"])(albersUsa, extent, object);\n  };\n\n  albersUsa.fitSize = function(size, object) {\n    return Object(_fit_js__WEBPACK_IMPORTED_MODULE_3__[\"fitSize\"])(albersUsa, size, object);\n  };\n\n  albersUsa.fitWidth = function(width, object) {\n    return Object(_fit_js__WEBPACK_IMPORTED_MODULE_3__[\"fitWidth\"])(albersUsa, width, object);\n  };\n\n  albersUsa.fitHeight = function(height, object) {\n    return Object(_fit_js__WEBPACK_IMPORTED_MODULE_3__[\"fitHeight\"])(albersUsa, height, object);\n  };\n\n  function reset() {\n    cache = cacheStream = null;\n    return albersUsa;\n  }\n\n  return albersUsa.scale(1070);\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-geo/src/projection/azimuthal.js\":\n/*!*********************************************************!*\\\n  !*** ./node_modules/d3-geo/src/projection/azimuthal.js ***!\n  \\*********************************************************/\n/*! exports provided: azimuthalRaw, azimuthalInvert */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"azimuthalRaw\", function() { return azimuthalRaw; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"azimuthalInvert\", function() { return azimuthalInvert; });\n/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../math.js */ \"./node_modules/d3-geo/src/math.js\");\n\n\nfunction azimuthalRaw(scale) {\n  return function(x, y) {\n    var cx = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"cos\"])(x),\n        cy = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"cos\"])(y),\n        k = scale(cx * cy);\n        if (k === Infinity) return [2, 0];\n    return [\n      k * cy * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"sin\"])(x),\n      k * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"sin\"])(y)\n    ];\n  }\n}\n\nfunction azimuthalInvert(angle) {\n  return function(x, y) {\n    var z = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"sqrt\"])(x * x + y * y),\n        c = angle(z),\n        sc = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"sin\"])(c),\n        cc = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"cos\"])(c);\n    return [\n      Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"atan2\"])(x * sc, z * cc),\n      Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"asin\"])(z && y * sc / z)\n    ];\n  }\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-geo/src/projection/azimuthalEqualArea.js\":\n/*!******************************************************************!*\\\n  !*** ./node_modules/d3-geo/src/projection/azimuthalEqualArea.js ***!\n  \\******************************************************************/\n/*! exports provided: azimuthalEqualAreaRaw, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"azimuthalEqualAreaRaw\", function() { return azimuthalEqualAreaRaw; });\n/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../math.js */ \"./node_modules/d3-geo/src/math.js\");\n/* harmony import */ var _azimuthal_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./azimuthal.js */ \"./node_modules/d3-geo/src/projection/azimuthal.js\");\n/* harmony import */ var _index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./index.js */ \"./node_modules/d3-geo/src/projection/index.js\");\n\n\n\n\nvar azimuthalEqualAreaRaw = Object(_azimuthal_js__WEBPACK_IMPORTED_MODULE_1__[\"azimuthalRaw\"])(function(cxcy) {\n  return Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"sqrt\"])(2 / (1 + cxcy));\n});\n\nazimuthalEqualAreaRaw.invert = Object(_azimuthal_js__WEBPACK_IMPORTED_MODULE_1__[\"azimuthalInvert\"])(function(z) {\n  return 2 * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"asin\"])(z / 2);\n});\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  return Object(_index_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(azimuthalEqualAreaRaw)\n      .scale(124.75)\n      .clipAngle(180 - 1e-3);\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-geo/src/projection/azimuthalEquidistant.js\":\n/*!********************************************************************!*\\\n  !*** ./node_modules/d3-geo/src/projection/azimuthalEquidistant.js ***!\n  \\********************************************************************/\n/*! exports provided: azimuthalEquidistantRaw, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"azimuthalEquidistantRaw\", function() { return azimuthalEquidistantRaw; });\n/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../math.js */ \"./node_modules/d3-geo/src/math.js\");\n/* harmony import */ var _azimuthal_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./azimuthal.js */ \"./node_modules/d3-geo/src/projection/azimuthal.js\");\n/* harmony import */ var _index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./index.js */ \"./node_modules/d3-geo/src/projection/index.js\");\n\n\n\n\nvar azimuthalEquidistantRaw = Object(_azimuthal_js__WEBPACK_IMPORTED_MODULE_1__[\"azimuthalRaw\"])(function(c) {\n  return (c = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"acos\"])(c)) && c / Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"sin\"])(c);\n});\n\nazimuthalEquidistantRaw.invert = Object(_azimuthal_js__WEBPACK_IMPORTED_MODULE_1__[\"azimuthalInvert\"])(function(z) {\n  return z;\n});\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  return Object(_index_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(azimuthalEquidistantRaw)\n      .scale(79.4188)\n      .clipAngle(180 - 1e-3);\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-geo/src/projection/conic.js\":\n/*!*****************************************************!*\\\n  !*** ./node_modules/d3-geo/src/projection/conic.js ***!\n  \\*****************************************************/\n/*! exports provided: conicProjection */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"conicProjection\", function() { return conicProjection; });\n/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../math.js */ \"./node_modules/d3-geo/src/math.js\");\n/* harmony import */ var _index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./index.js */ \"./node_modules/d3-geo/src/projection/index.js\");\n\n\n\nfunction conicProjection(projectAt) {\n  var phi0 = 0,\n      phi1 = _math_js__WEBPACK_IMPORTED_MODULE_0__[\"pi\"] / 3,\n      m = Object(_index_js__WEBPACK_IMPORTED_MODULE_1__[\"projectionMutator\"])(projectAt),\n      p = m(phi0, phi1);\n\n  p.parallels = function(_) {\n    return arguments.length ? m(phi0 = _[0] * _math_js__WEBPACK_IMPORTED_MODULE_0__[\"radians\"], phi1 = _[1] * _math_js__WEBPACK_IMPORTED_MODULE_0__[\"radians\"]) : [phi0 * _math_js__WEBPACK_IMPORTED_MODULE_0__[\"degrees\"], phi1 * _math_js__WEBPACK_IMPORTED_MODULE_0__[\"degrees\"]];\n  };\n\n  return p;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-geo/src/projection/conicConformal.js\":\n/*!**************************************************************!*\\\n  !*** ./node_modules/d3-geo/src/projection/conicConformal.js ***!\n  \\**************************************************************/\n/*! exports provided: conicConformalRaw, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"conicConformalRaw\", function() { return conicConformalRaw; });\n/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../math.js */ \"./node_modules/d3-geo/src/math.js\");\n/* harmony import */ var _conic_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./conic.js */ \"./node_modules/d3-geo/src/projection/conic.js\");\n/* harmony import */ var _mercator_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./mercator.js */ \"./node_modules/d3-geo/src/projection/mercator.js\");\n\n\n\n\nfunction tany(y) {\n  return Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"tan\"])((_math_js__WEBPACK_IMPORTED_MODULE_0__[\"halfPi\"] + y) / 2);\n}\n\nfunction conicConformalRaw(y0, y1) {\n  var cy0 = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"cos\"])(y0),\n      n = y0 === y1 ? Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"sin\"])(y0) : Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"log\"])(cy0 / Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"cos\"])(y1)) / Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"log\"])(tany(y1) / tany(y0)),\n      f = cy0 * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"pow\"])(tany(y0), n) / n;\n\n  if (!n) return _mercator_js__WEBPACK_IMPORTED_MODULE_2__[\"mercatorRaw\"];\n\n  function project(x, y) {\n    if (f > 0) { if (y < -_math_js__WEBPACK_IMPORTED_MODULE_0__[\"halfPi\"] + _math_js__WEBPACK_IMPORTED_MODULE_0__[\"epsilon\"]) y = -_math_js__WEBPACK_IMPORTED_MODULE_0__[\"halfPi\"] + _math_js__WEBPACK_IMPORTED_MODULE_0__[\"epsilon\"]; }\n    else { if (y > _math_js__WEBPACK_IMPORTED_MODULE_0__[\"halfPi\"] - _math_js__WEBPACK_IMPORTED_MODULE_0__[\"epsilon\"]) y = _math_js__WEBPACK_IMPORTED_MODULE_0__[\"halfPi\"] - _math_js__WEBPACK_IMPORTED_MODULE_0__[\"epsilon\"]; }\n    var r = f / Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"pow\"])(tany(y), n);\n    return [r * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"sin\"])(n * x), f - r * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"cos\"])(n * x)];\n  }\n\n  project.invert = function(x, y) {\n    var fy = f - y, r = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"sign\"])(n) * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"sqrt\"])(x * x + fy * fy),\n      l = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"atan2\"])(x, Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"abs\"])(fy)) * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"sign\"])(fy);\n    if (fy * n < 0)\n      l -= _math_js__WEBPACK_IMPORTED_MODULE_0__[\"pi\"] * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"sign\"])(x) * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"sign\"])(fy);\n    return [l / n, 2 * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"atan\"])(Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"pow\"])(f / r, 1 / n)) - _math_js__WEBPACK_IMPORTED_MODULE_0__[\"halfPi\"]];\n  };\n\n  return project;\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  return Object(_conic_js__WEBPACK_IMPORTED_MODULE_1__[\"conicProjection\"])(conicConformalRaw)\n      .scale(109.5)\n      .parallels([30, 30]);\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-geo/src/projection/conicEqualArea.js\":\n/*!**************************************************************!*\\\n  !*** ./node_modules/d3-geo/src/projection/conicEqualArea.js ***!\n  \\**************************************************************/\n/*! exports provided: conicEqualAreaRaw, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"conicEqualAreaRaw\", function() { return conicEqualAreaRaw; });\n/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../math.js */ \"./node_modules/d3-geo/src/math.js\");\n/* harmony import */ var _conic_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./conic.js */ \"./node_modules/d3-geo/src/projection/conic.js\");\n/* harmony import */ var _cylindricalEqualArea_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./cylindricalEqualArea.js */ \"./node_modules/d3-geo/src/projection/cylindricalEqualArea.js\");\n\n\n\n\nfunction conicEqualAreaRaw(y0, y1) {\n  var sy0 = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"sin\"])(y0), n = (sy0 + Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"sin\"])(y1)) / 2;\n\n  // Are the parallels symmetrical around the Equator?\n  if (Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"abs\"])(n) < _math_js__WEBPACK_IMPORTED_MODULE_0__[\"epsilon\"]) return Object(_cylindricalEqualArea_js__WEBPACK_IMPORTED_MODULE_2__[\"cylindricalEqualAreaRaw\"])(y0);\n\n  var c = 1 + sy0 * (2 * n - sy0), r0 = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"sqrt\"])(c) / n;\n\n  function project(x, y) {\n    var r = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"sqrt\"])(c - 2 * n * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"sin\"])(y)) / n;\n    return [r * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"sin\"])(x *= n), r0 - r * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"cos\"])(x)];\n  }\n\n  project.invert = function(x, y) {\n    var r0y = r0 - y,\n        l = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"atan2\"])(x, Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"abs\"])(r0y)) * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"sign\"])(r0y);\n    if (r0y * n < 0)\n      l -= _math_js__WEBPACK_IMPORTED_MODULE_0__[\"pi\"] * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"sign\"])(x) * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"sign\"])(r0y);\n    return [l / n, Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"asin\"])((c - (x * x + r0y * r0y) * n * n) / (2 * n))];\n  };\n\n  return project;\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  return Object(_conic_js__WEBPACK_IMPORTED_MODULE_1__[\"conicProjection\"])(conicEqualAreaRaw)\n      .scale(155.424)\n      .center([0, 33.6442]);\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-geo/src/projection/conicEquidistant.js\":\n/*!****************************************************************!*\\\n  !*** ./node_modules/d3-geo/src/projection/conicEquidistant.js ***!\n  \\****************************************************************/\n/*! exports provided: conicEquidistantRaw, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"conicEquidistantRaw\", function() { return conicEquidistantRaw; });\n/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../math.js */ \"./node_modules/d3-geo/src/math.js\");\n/* harmony import */ var _conic_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./conic.js */ \"./node_modules/d3-geo/src/projection/conic.js\");\n/* harmony import */ var _equirectangular_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./equirectangular.js */ \"./node_modules/d3-geo/src/projection/equirectangular.js\");\n\n\n\n\nfunction conicEquidistantRaw(y0, y1) {\n  var cy0 = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"cos\"])(y0),\n      n = y0 === y1 ? Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"sin\"])(y0) : (cy0 - Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"cos\"])(y1)) / (y1 - y0),\n      g = cy0 / n + y0;\n\n  if (Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"abs\"])(n) < _math_js__WEBPACK_IMPORTED_MODULE_0__[\"epsilon\"]) return _equirectangular_js__WEBPACK_IMPORTED_MODULE_2__[\"equirectangularRaw\"];\n\n  function project(x, y) {\n    var gy = g - y, nx = n * x;\n    return [gy * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"sin\"])(nx), g - gy * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"cos\"])(nx)];\n  }\n\n  project.invert = function(x, y) {\n    var gy = g - y,\n        l = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"atan2\"])(x, Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"abs\"])(gy)) * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"sign\"])(gy);\n    if (gy * n < 0)\n      l -= _math_js__WEBPACK_IMPORTED_MODULE_0__[\"pi\"] * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"sign\"])(x) * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"sign\"])(gy);\n    return [l / n, g - Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"sign\"])(n) * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"sqrt\"])(x * x + gy * gy)];\n  };\n\n  return project;\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  return Object(_conic_js__WEBPACK_IMPORTED_MODULE_1__[\"conicProjection\"])(conicEquidistantRaw)\n      .scale(131.154)\n      .center([0, 13.9389]);\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-geo/src/projection/cylindricalEqualArea.js\":\n/*!********************************************************************!*\\\n  !*** ./node_modules/d3-geo/src/projection/cylindricalEqualArea.js ***!\n  \\********************************************************************/\n/*! exports provided: cylindricalEqualAreaRaw */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"cylindricalEqualAreaRaw\", function() { return cylindricalEqualAreaRaw; });\n/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../math.js */ \"./node_modules/d3-geo/src/math.js\");\n\n\nfunction cylindricalEqualAreaRaw(phi0) {\n  var cosPhi0 = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"cos\"])(phi0);\n\n  function forward(lambda, phi) {\n    return [lambda * cosPhi0, Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"sin\"])(phi) / cosPhi0];\n  }\n\n  forward.invert = function(x, y) {\n    return [x / cosPhi0, Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"asin\"])(y * cosPhi0)];\n  };\n\n  return forward;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-geo/src/projection/equalEarth.js\":\n/*!**********************************************************!*\\\n  !*** ./node_modules/d3-geo/src/projection/equalEarth.js ***!\n  \\**********************************************************/\n/*! exports provided: equalEarthRaw, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"equalEarthRaw\", function() { return equalEarthRaw; });\n/* harmony import */ var _index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./index.js */ \"./node_modules/d3-geo/src/projection/index.js\");\n/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../math.js */ \"./node_modules/d3-geo/src/math.js\");\n\n\n\nvar A1 = 1.340264,\n    A2 = -0.081106,\n    A3 = 0.000893,\n    A4 = 0.003796,\n    M = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__[\"sqrt\"])(3) / 2,\n    iterations = 12;\n\nfunction equalEarthRaw(lambda, phi) {\n  var l = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__[\"asin\"])(M * Object(_math_js__WEBPACK_IMPORTED_MODULE_1__[\"sin\"])(phi)), l2 = l * l, l6 = l2 * l2 * l2;\n  return [\n    lambda * Object(_math_js__WEBPACK_IMPORTED_MODULE_1__[\"cos\"])(l) / (M * (A1 + 3 * A2 * l2 + l6 * (7 * A3 + 9 * A4 * l2))),\n    l * (A1 + A2 * l2 + l6 * (A3 + A4 * l2))\n  ];\n}\n\nequalEarthRaw.invert = function(x, y) {\n  var l = y, l2 = l * l, l6 = l2 * l2 * l2;\n  for (var i = 0, delta, fy, fpy; i < iterations; ++i) {\n    fy = l * (A1 + A2 * l2 + l6 * (A3 + A4 * l2)) - y;\n    fpy = A1 + 3 * A2 * l2 + l6 * (7 * A3 + 9 * A4 * l2);\n    l -= delta = fy / fpy, l2 = l * l, l6 = l2 * l2 * l2;\n    if (Object(_math_js__WEBPACK_IMPORTED_MODULE_1__[\"abs\"])(delta) < _math_js__WEBPACK_IMPORTED_MODULE_1__[\"epsilon2\"]) break;\n  }\n  return [\n    M * x * (A1 + 3 * A2 * l2 + l6 * (7 * A3 + 9 * A4 * l2)) / Object(_math_js__WEBPACK_IMPORTED_MODULE_1__[\"cos\"])(l),\n    Object(_math_js__WEBPACK_IMPORTED_MODULE_1__[\"asin\"])(Object(_math_js__WEBPACK_IMPORTED_MODULE_1__[\"sin\"])(l) / M)\n  ];\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  return Object(_index_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(equalEarthRaw)\n      .scale(177.158);\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-geo/src/projection/equirectangular.js\":\n/*!***************************************************************!*\\\n  !*** ./node_modules/d3-geo/src/projection/equirectangular.js ***!\n  \\***************************************************************/\n/*! exports provided: equirectangularRaw, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"equirectangularRaw\", function() { return equirectangularRaw; });\n/* harmony import */ var _index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./index.js */ \"./node_modules/d3-geo/src/projection/index.js\");\n\n\nfunction equirectangularRaw(lambda, phi) {\n  return [lambda, phi];\n}\n\nequirectangularRaw.invert = equirectangularRaw;\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  return Object(_index_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(equirectangularRaw)\n      .scale(152.63);\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-geo/src/projection/fit.js\":\n/*!***************************************************!*\\\n  !*** ./node_modules/d3-geo/src/projection/fit.js ***!\n  \\***************************************************/\n/*! exports provided: fitExtent, fitSize, fitWidth, fitHeight */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"fitExtent\", function() { return fitExtent; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"fitSize\", function() { return fitSize; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"fitWidth\", function() { return fitWidth; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"fitHeight\", function() { return fitHeight; });\n/* harmony import */ var _stream_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../stream.js */ \"./node_modules/d3-geo/src/stream.js\");\n/* harmony import */ var _path_bounds_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../path/bounds.js */ \"./node_modules/d3-geo/src/path/bounds.js\");\n\n\n\nfunction fit(projection, fitBounds, object) {\n  var clip = projection.clipExtent && projection.clipExtent();\n  projection.scale(150).translate([0, 0]);\n  if (clip != null) projection.clipExtent(null);\n  Object(_stream_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(object, projection.stream(_path_bounds_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"]));\n  fitBounds(_path_bounds_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"].result());\n  if (clip != null) projection.clipExtent(clip);\n  return projection;\n}\n\nfunction fitExtent(projection, extent, object) {\n  return fit(projection, function(b) {\n    var w = extent[1][0] - extent[0][0],\n        h = extent[1][1] - extent[0][1],\n        k = Math.min(w / (b[1][0] - b[0][0]), h / (b[1][1] - b[0][1])),\n        x = +extent[0][0] + (w - k * (b[1][0] + b[0][0])) / 2,\n        y = +extent[0][1] + (h - k * (b[1][1] + b[0][1])) / 2;\n    projection.scale(150 * k).translate([x, y]);\n  }, object);\n}\n\nfunction fitSize(projection, size, object) {\n  return fitExtent(projection, [[0, 0], size], object);\n}\n\nfunction fitWidth(projection, width, object) {\n  return fit(projection, function(b) {\n    var w = +width,\n        k = w / (b[1][0] - b[0][0]),\n        x = (w - k * (b[1][0] + b[0][0])) / 2,\n        y = -k * b[0][1];\n    projection.scale(150 * k).translate([x, y]);\n  }, object);\n}\n\nfunction fitHeight(projection, height, object) {\n  return fit(projection, function(b) {\n    var h = +height,\n        k = h / (b[1][1] - b[0][1]),\n        x = -k * b[0][0],\n        y = (h - k * (b[1][1] + b[0][1])) / 2;\n    projection.scale(150 * k).translate([x, y]);\n  }, object);\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-geo/src/projection/gnomonic.js\":\n/*!********************************************************!*\\\n  !*** ./node_modules/d3-geo/src/projection/gnomonic.js ***!\n  \\********************************************************/\n/*! exports provided: gnomonicRaw, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"gnomonicRaw\", function() { return gnomonicRaw; });\n/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../math.js */ \"./node_modules/d3-geo/src/math.js\");\n/* harmony import */ var _azimuthal_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./azimuthal.js */ \"./node_modules/d3-geo/src/projection/azimuthal.js\");\n/* harmony import */ var _index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./index.js */ \"./node_modules/d3-geo/src/projection/index.js\");\n\n\n\n\nfunction gnomonicRaw(x, y) {\n  var cy = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"cos\"])(y), k = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"cos\"])(x) * cy;\n  return [cy * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"sin\"])(x) / k, Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"sin\"])(y) / k];\n}\n\ngnomonicRaw.invert = Object(_azimuthal_js__WEBPACK_IMPORTED_MODULE_1__[\"azimuthalInvert\"])(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"atan\"]);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  return Object(_index_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(gnomonicRaw)\n      .scale(144.049)\n      .clipAngle(60);\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-geo/src/projection/identity.js\":\n/*!********************************************************!*\\\n  !*** ./node_modules/d3-geo/src/projection/identity.js ***!\n  \\********************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _clip_rectangle_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../clip/rectangle.js */ \"./node_modules/d3-geo/src/clip/rectangle.js\");\n/* harmony import */ var _identity_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../identity.js */ \"./node_modules/d3-geo/src/identity.js\");\n/* harmony import */ var _transform_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../transform.js */ \"./node_modules/d3-geo/src/transform.js\");\n/* harmony import */ var _fit_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./fit.js */ \"./node_modules/d3-geo/src/projection/fit.js\");\n/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../math.js */ \"./node_modules/d3-geo/src/math.js\");\n\n\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  var k = 1, tx = 0, ty = 0, sx = 1, sy = 1, // scale, translate and reflect\n      alpha = 0, ca, sa, // angle\n      x0 = null, y0, x1, y1, // clip extent\n      kx = 1, ky = 1,\n      transform = Object(_transform_js__WEBPACK_IMPORTED_MODULE_2__[\"transformer\"])({\n        point: function(x, y) {\n          var p = projection([x, y])\n          this.stream.point(p[0], p[1]);\n        }\n      }),\n      postclip = _identity_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"],\n      cache,\n      cacheStream;\n\n  function reset() {\n    kx = k * sx;\n    ky = k * sy;\n    cache = cacheStream = null;\n    return projection;\n  }\n\n  function projection (p) {\n    var x = p[0] * kx, y = p[1] * ky;\n    if (alpha) {\n      var t = y * ca - x * sa;\n      x = x * ca + y * sa;\n      y = t;\n    }    \n    return [x + tx, y + ty];\n  }\n  projection.invert = function(p) {\n    var x = p[0] - tx, y = p[1] - ty;\n    if (alpha) {\n      var t = y * ca + x * sa;\n      x = x * ca - y * sa;\n      y = t;\n    }\n    return [x / kx, y / ky];\n  };\n  projection.stream = function(stream) {\n    return cache && cacheStream === stream ? cache : cache = transform(postclip(cacheStream = stream));\n  };\n  projection.postclip = function(_) {\n    return arguments.length ? (postclip = _, x0 = y0 = x1 = y1 = null, reset()) : postclip;\n  };\n  projection.clipExtent = function(_) {\n    return arguments.length ? (postclip = _ == null ? (x0 = y0 = x1 = y1 = null, _identity_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"]) : Object(_clip_rectangle_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(x0 = +_[0][0], y0 = +_[0][1], x1 = +_[1][0], y1 = +_[1][1]), reset()) : x0 == null ? null : [[x0, y0], [x1, y1]];\n  };\n  projection.scale = function(_) {\n    return arguments.length ? (k = +_, reset()) : k;\n  };\n  projection.translate = function(_) {\n    return arguments.length ? (tx = +_[0], ty = +_[1], reset()) : [tx, ty];\n  }\n  projection.angle = function(_) {\n    return arguments.length ? (alpha = _ % 360 * _math_js__WEBPACK_IMPORTED_MODULE_4__[\"radians\"], sa = Object(_math_js__WEBPACK_IMPORTED_MODULE_4__[\"sin\"])(alpha), ca = Object(_math_js__WEBPACK_IMPORTED_MODULE_4__[\"cos\"])(alpha), reset()) : alpha * _math_js__WEBPACK_IMPORTED_MODULE_4__[\"degrees\"];\n  };\n  projection.reflectX = function(_) {\n    return arguments.length ? (sx = _ ? -1 : 1, reset()) : sx < 0;\n  };\n  projection.reflectY = function(_) {\n    return arguments.length ? (sy = _ ? -1 : 1, reset()) : sy < 0;\n  };\n  projection.fitExtent = function(extent, object) {\n    return Object(_fit_js__WEBPACK_IMPORTED_MODULE_3__[\"fitExtent\"])(projection, extent, object);\n  };\n  projection.fitSize = function(size, object) {\n    return Object(_fit_js__WEBPACK_IMPORTED_MODULE_3__[\"fitSize\"])(projection, size, object);\n  };\n  projection.fitWidth = function(width, object) {\n    return Object(_fit_js__WEBPACK_IMPORTED_MODULE_3__[\"fitWidth\"])(projection, width, object);\n  };\n  projection.fitHeight = function(height, object) {\n    return Object(_fit_js__WEBPACK_IMPORTED_MODULE_3__[\"fitHeight\"])(projection, height, object);\n  };\n\n  return projection;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-geo/src/projection/index.js\":\n/*!*****************************************************!*\\\n  !*** ./node_modules/d3-geo/src/projection/index.js ***!\n  \\*****************************************************/\n/*! exports provided: default, projectionMutator */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return projection; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"projectionMutator\", function() { return projectionMutator; });\n/* harmony import */ var _clip_antimeridian_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../clip/antimeridian.js */ \"./node_modules/d3-geo/src/clip/antimeridian.js\");\n/* harmony import */ var _clip_circle_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../clip/circle.js */ \"./node_modules/d3-geo/src/clip/circle.js\");\n/* harmony import */ var _clip_rectangle_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../clip/rectangle.js */ \"./node_modules/d3-geo/src/clip/rectangle.js\");\n/* harmony import */ var _compose_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../compose.js */ \"./node_modules/d3-geo/src/compose.js\");\n/* harmony import */ var _identity_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../identity.js */ \"./node_modules/d3-geo/src/identity.js\");\n/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../math.js */ \"./node_modules/d3-geo/src/math.js\");\n/* harmony import */ var _rotation_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../rotation.js */ \"./node_modules/d3-geo/src/rotation.js\");\n/* harmony import */ var _transform_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../transform.js */ \"./node_modules/d3-geo/src/transform.js\");\n/* harmony import */ var _fit_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./fit.js */ \"./node_modules/d3-geo/src/projection/fit.js\");\n/* harmony import */ var _resample_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./resample.js */ \"./node_modules/d3-geo/src/projection/resample.js\");\n\n\n\n\n\n\n\n\n\n\n\nvar transformRadians = Object(_transform_js__WEBPACK_IMPORTED_MODULE_7__[\"transformer\"])({\n  point: function(x, y) {\n    this.stream.point(x * _math_js__WEBPACK_IMPORTED_MODULE_5__[\"radians\"], y * _math_js__WEBPACK_IMPORTED_MODULE_5__[\"radians\"]);\n  }\n});\n\nfunction transformRotate(rotate) {\n  return Object(_transform_js__WEBPACK_IMPORTED_MODULE_7__[\"transformer\"])({\n    point: function(x, y) {\n      var r = rotate(x, y);\n      return this.stream.point(r[0], r[1]);\n    }\n  });\n}\n\nfunction scaleTranslate(k, dx, dy, sx, sy) {\n  function transform(x, y) {\n    x *= sx; y *= sy;\n    return [dx + k * x, dy - k * y];\n  }\n  transform.invert = function(x, y) {\n    return [(x - dx) / k * sx, (dy - y) / k * sy];\n  };\n  return transform;\n}\n\nfunction scaleTranslateRotate(k, dx, dy, sx, sy, alpha) {\n  if (!alpha) return scaleTranslate(k, dx, dy, sx, sy);\n  var cosAlpha = Object(_math_js__WEBPACK_IMPORTED_MODULE_5__[\"cos\"])(alpha),\n      sinAlpha = Object(_math_js__WEBPACK_IMPORTED_MODULE_5__[\"sin\"])(alpha),\n      a = cosAlpha * k,\n      b = sinAlpha * k,\n      ai = cosAlpha / k,\n      bi = sinAlpha / k,\n      ci = (sinAlpha * dy - cosAlpha * dx) / k,\n      fi = (sinAlpha * dx + cosAlpha * dy) / k;\n  function transform(x, y) {\n    x *= sx; y *= sy;\n    return [a * x - b * y + dx, dy - b * x - a * y];\n  }\n  transform.invert = function(x, y) {\n    return [sx * (ai * x - bi * y + ci), sy * (fi - bi * x - ai * y)];\n  };\n  return transform;\n}\n\nfunction projection(project) {\n  return projectionMutator(function() { return project; })();\n}\n\nfunction projectionMutator(projectAt) {\n  var project,\n      k = 150, // scale\n      x = 480, y = 250, // translate\n      lambda = 0, phi = 0, // center\n      deltaLambda = 0, deltaPhi = 0, deltaGamma = 0, rotate, // pre-rotate\n      alpha = 0, // post-rotate angle\n      sx = 1, // reflectX\n      sy = 1, // reflectX\n      theta = null, preclip = _clip_antimeridian_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"], // pre-clip angle\n      x0 = null, y0, x1, y1, postclip = _identity_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"], // post-clip extent\n      delta2 = 0.5, // precision\n      projectResample,\n      projectTransform,\n      projectRotateTransform,\n      cache,\n      cacheStream;\n\n  function projection(point) {\n    return projectRotateTransform(point[0] * _math_js__WEBPACK_IMPORTED_MODULE_5__[\"radians\"], point[1] * _math_js__WEBPACK_IMPORTED_MODULE_5__[\"radians\"]);\n  }\n\n  function invert(point) {\n    point = projectRotateTransform.invert(point[0], point[1]);\n    return point && [point[0] * _math_js__WEBPACK_IMPORTED_MODULE_5__[\"degrees\"], point[1] * _math_js__WEBPACK_IMPORTED_MODULE_5__[\"degrees\"]];\n  }\n\n  projection.stream = function(stream) {\n    return cache && cacheStream === stream ? cache : cache = transformRadians(transformRotate(rotate)(preclip(projectResample(postclip(cacheStream = stream)))));\n  };\n\n  projection.preclip = function(_) {\n    return arguments.length ? (preclip = _, theta = undefined, reset()) : preclip;\n  };\n\n  projection.postclip = function(_) {\n    return arguments.length ? (postclip = _, x0 = y0 = x1 = y1 = null, reset()) : postclip;\n  };\n\n  projection.clipAngle = function(_) {\n    return arguments.length ? (preclip = +_ ? Object(_clip_circle_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(theta = _ * _math_js__WEBPACK_IMPORTED_MODULE_5__[\"radians\"]) : (theta = null, _clip_antimeridian_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]), reset()) : theta * _math_js__WEBPACK_IMPORTED_MODULE_5__[\"degrees\"];\n  };\n\n  projection.clipExtent = function(_) {\n    return arguments.length ? (postclip = _ == null ? (x0 = y0 = x1 = y1 = null, _identity_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"]) : Object(_clip_rectangle_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(x0 = +_[0][0], y0 = +_[0][1], x1 = +_[1][0], y1 = +_[1][1]), reset()) : x0 == null ? null : [[x0, y0], [x1, y1]];\n  };\n\n  projection.scale = function(_) {\n    return arguments.length ? (k = +_, recenter()) : k;\n  };\n\n  projection.translate = function(_) {\n    return arguments.length ? (x = +_[0], y = +_[1], recenter()) : [x, y];\n  };\n\n  projection.center = function(_) {\n    return arguments.length ? (lambda = _[0] % 360 * _math_js__WEBPACK_IMPORTED_MODULE_5__[\"radians\"], phi = _[1] % 360 * _math_js__WEBPACK_IMPORTED_MODULE_5__[\"radians\"], recenter()) : [lambda * _math_js__WEBPACK_IMPORTED_MODULE_5__[\"degrees\"], phi * _math_js__WEBPACK_IMPORTED_MODULE_5__[\"degrees\"]];\n  };\n\n  projection.rotate = function(_) {\n    return arguments.length ? (deltaLambda = _[0] % 360 * _math_js__WEBPACK_IMPORTED_MODULE_5__[\"radians\"], deltaPhi = _[1] % 360 * _math_js__WEBPACK_IMPORTED_MODULE_5__[\"radians\"], deltaGamma = _.length > 2 ? _[2] % 360 * _math_js__WEBPACK_IMPORTED_MODULE_5__[\"radians\"] : 0, recenter()) : [deltaLambda * _math_js__WEBPACK_IMPORTED_MODULE_5__[\"degrees\"], deltaPhi * _math_js__WEBPACK_IMPORTED_MODULE_5__[\"degrees\"], deltaGamma * _math_js__WEBPACK_IMPORTED_MODULE_5__[\"degrees\"]];\n  };\n\n  projection.angle = function(_) {\n    return arguments.length ? (alpha = _ % 360 * _math_js__WEBPACK_IMPORTED_MODULE_5__[\"radians\"], recenter()) : alpha * _math_js__WEBPACK_IMPORTED_MODULE_5__[\"degrees\"];\n  };\n\n  projection.reflectX = function(_) {\n    return arguments.length ? (sx = _ ? -1 : 1, recenter()) : sx < 0;\n  };\n\n  projection.reflectY = function(_) {\n    return arguments.length ? (sy = _ ? -1 : 1, recenter()) : sy < 0;\n  };\n\n  projection.precision = function(_) {\n    return arguments.length ? (projectResample = Object(_resample_js__WEBPACK_IMPORTED_MODULE_9__[\"default\"])(projectTransform, delta2 = _ * _), reset()) : Object(_math_js__WEBPACK_IMPORTED_MODULE_5__[\"sqrt\"])(delta2);\n  };\n\n  projection.fitExtent = function(extent, object) {\n    return Object(_fit_js__WEBPACK_IMPORTED_MODULE_8__[\"fitExtent\"])(projection, extent, object);\n  };\n\n  projection.fitSize = function(size, object) {\n    return Object(_fit_js__WEBPACK_IMPORTED_MODULE_8__[\"fitSize\"])(projection, size, object);\n  };\n\n  projection.fitWidth = function(width, object) {\n    return Object(_fit_js__WEBPACK_IMPORTED_MODULE_8__[\"fitWidth\"])(projection, width, object);\n  };\n\n  projection.fitHeight = function(height, object) {\n    return Object(_fit_js__WEBPACK_IMPORTED_MODULE_8__[\"fitHeight\"])(projection, height, object);\n  };\n\n  function recenter() {\n    var center = scaleTranslateRotate(k, 0, 0, sx, sy, alpha).apply(null, project(lambda, phi)),\n        transform = scaleTranslateRotate(k, x - center[0], y - center[1], sx, sy, alpha);\n    rotate = Object(_rotation_js__WEBPACK_IMPORTED_MODULE_6__[\"rotateRadians\"])(deltaLambda, deltaPhi, deltaGamma);\n    projectTransform = Object(_compose_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(project, transform);\n    projectRotateTransform = Object(_compose_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(rotate, projectTransform);\n    projectResample = Object(_resample_js__WEBPACK_IMPORTED_MODULE_9__[\"default\"])(projectTransform, delta2);\n    return reset();\n  }\n\n  function reset() {\n    cache = cacheStream = null;\n    return projection;\n  }\n\n  return function() {\n    project = projectAt.apply(this, arguments);\n    projection.invert = project.invert && invert;\n    return recenter();\n  };\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-geo/src/projection/mercator.js\":\n/*!********************************************************!*\\\n  !*** ./node_modules/d3-geo/src/projection/mercator.js ***!\n  \\********************************************************/\n/*! exports provided: mercatorRaw, default, mercatorProjection */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"mercatorRaw\", function() { return mercatorRaw; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"mercatorProjection\", function() { return mercatorProjection; });\n/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../math.js */ \"./node_modules/d3-geo/src/math.js\");\n/* harmony import */ var _rotation_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../rotation.js */ \"./node_modules/d3-geo/src/rotation.js\");\n/* harmony import */ var _index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./index.js */ \"./node_modules/d3-geo/src/projection/index.js\");\n\n\n\n\nfunction mercatorRaw(lambda, phi) {\n  return [lambda, Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"log\"])(Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"tan\"])((_math_js__WEBPACK_IMPORTED_MODULE_0__[\"halfPi\"] + phi) / 2))];\n}\n\nmercatorRaw.invert = function(x, y) {\n  return [x, 2 * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"atan\"])(Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"exp\"])(y)) - _math_js__WEBPACK_IMPORTED_MODULE_0__[\"halfPi\"]];\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  return mercatorProjection(mercatorRaw)\n      .scale(961 / _math_js__WEBPACK_IMPORTED_MODULE_0__[\"tau\"]);\n});\n\nfunction mercatorProjection(project) {\n  var m = Object(_index_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(project),\n      center = m.center,\n      scale = m.scale,\n      translate = m.translate,\n      clipExtent = m.clipExtent,\n      x0 = null, y0, x1, y1; // clip extent\n\n  m.scale = function(_) {\n    return arguments.length ? (scale(_), reclip()) : scale();\n  };\n\n  m.translate = function(_) {\n    return arguments.length ? (translate(_), reclip()) : translate();\n  };\n\n  m.center = function(_) {\n    return arguments.length ? (center(_), reclip()) : center();\n  };\n\n  m.clipExtent = function(_) {\n    return arguments.length ? ((_ == null ? x0 = y0 = x1 = y1 = null : (x0 = +_[0][0], y0 = +_[0][1], x1 = +_[1][0], y1 = +_[1][1])), reclip()) : x0 == null ? null : [[x0, y0], [x1, y1]];\n  };\n\n  function reclip() {\n    var k = _math_js__WEBPACK_IMPORTED_MODULE_0__[\"pi\"] * scale(),\n        t = m(Object(_rotation_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(m.rotate()).invert([0, 0]));\n    return clipExtent(x0 == null\n        ? [[t[0] - k, t[1] - k], [t[0] + k, t[1] + k]] : project === mercatorRaw\n        ? [[Math.max(t[0] - k, x0), y0], [Math.min(t[0] + k, x1), y1]]\n        : [[x0, Math.max(t[1] - k, y0)], [x1, Math.min(t[1] + k, y1)]]);\n  }\n\n  return reclip();\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-geo/src/projection/naturalEarth1.js\":\n/*!*************************************************************!*\\\n  !*** ./node_modules/d3-geo/src/projection/naturalEarth1.js ***!\n  \\*************************************************************/\n/*! exports provided: naturalEarth1Raw, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"naturalEarth1Raw\", function() { return naturalEarth1Raw; });\n/* harmony import */ var _index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./index.js */ \"./node_modules/d3-geo/src/projection/index.js\");\n/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../math.js */ \"./node_modules/d3-geo/src/math.js\");\n\n\n\nfunction naturalEarth1Raw(lambda, phi) {\n  var phi2 = phi * phi, phi4 = phi2 * phi2;\n  return [\n    lambda * (0.8707 - 0.131979 * phi2 + phi4 * (-0.013791 + phi4 * (0.003971 * phi2 - 0.001529 * phi4))),\n    phi * (1.007226 + phi2 * (0.015085 + phi4 * (-0.044475 + 0.028874 * phi2 - 0.005916 * phi4)))\n  ];\n}\n\nnaturalEarth1Raw.invert = function(x, y) {\n  var phi = y, i = 25, delta;\n  do {\n    var phi2 = phi * phi, phi4 = phi2 * phi2;\n    phi -= delta = (phi * (1.007226 + phi2 * (0.015085 + phi4 * (-0.044475 + 0.028874 * phi2 - 0.005916 * phi4))) - y) /\n        (1.007226 + phi2 * (0.015085 * 3 + phi4 * (-0.044475 * 7 + 0.028874 * 9 * phi2 - 0.005916 * 11 * phi4)));\n  } while (Object(_math_js__WEBPACK_IMPORTED_MODULE_1__[\"abs\"])(delta) > _math_js__WEBPACK_IMPORTED_MODULE_1__[\"epsilon\"] && --i > 0);\n  return [\n    x / (0.8707 + (phi2 = phi * phi) * (-0.131979 + phi2 * (-0.013791 + phi2 * phi2 * phi2 * (0.003971 - 0.001529 * phi2)))),\n    phi\n  ];\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  return Object(_index_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(naturalEarth1Raw)\n      .scale(175.295);\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-geo/src/projection/orthographic.js\":\n/*!************************************************************!*\\\n  !*** ./node_modules/d3-geo/src/projection/orthographic.js ***!\n  \\************************************************************/\n/*! exports provided: orthographicRaw, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"orthographicRaw\", function() { return orthographicRaw; });\n/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../math.js */ \"./node_modules/d3-geo/src/math.js\");\n/* harmony import */ var _azimuthal_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./azimuthal.js */ \"./node_modules/d3-geo/src/projection/azimuthal.js\");\n/* harmony import */ var _index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./index.js */ \"./node_modules/d3-geo/src/projection/index.js\");\n\n\n\n\nfunction orthographicRaw(x, y) {\n  return [Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"cos\"])(y) * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"sin\"])(x), Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"sin\"])(y)];\n}\n\northographicRaw.invert = Object(_azimuthal_js__WEBPACK_IMPORTED_MODULE_1__[\"azimuthalInvert\"])(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"asin\"]);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  return Object(_index_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(orthographicRaw)\n      .scale(249.5)\n      .clipAngle(90 + _math_js__WEBPACK_IMPORTED_MODULE_0__[\"epsilon\"]);\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-geo/src/projection/resample.js\":\n/*!********************************************************!*\\\n  !*** ./node_modules/d3-geo/src/projection/resample.js ***!\n  \\********************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _cartesian_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../cartesian.js */ \"./node_modules/d3-geo/src/cartesian.js\");\n/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../math.js */ \"./node_modules/d3-geo/src/math.js\");\n/* harmony import */ var _transform_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../transform.js */ \"./node_modules/d3-geo/src/transform.js\");\n\n\n\n\nvar maxDepth = 16, // maximum depth of subdivision\n    cosMinDistance = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__[\"cos\"])(30 * _math_js__WEBPACK_IMPORTED_MODULE_1__[\"radians\"]); // cos(minimum angular distance)\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(project, delta2) {\n  return +delta2 ? resample(project, delta2) : resampleNone(project);\n});\n\nfunction resampleNone(project) {\n  return Object(_transform_js__WEBPACK_IMPORTED_MODULE_2__[\"transformer\"])({\n    point: function(x, y) {\n      x = project(x, y);\n      this.stream.point(x[0], x[1]);\n    }\n  });\n}\n\nfunction resample(project, delta2) {\n\n  function resampleLineTo(x0, y0, lambda0, a0, b0, c0, x1, y1, lambda1, a1, b1, c1, depth, stream) {\n    var dx = x1 - x0,\n        dy = y1 - y0,\n        d2 = dx * dx + dy * dy;\n    if (d2 > 4 * delta2 && depth--) {\n      var a = a0 + a1,\n          b = b0 + b1,\n          c = c0 + c1,\n          m = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__[\"sqrt\"])(a * a + b * b + c * c),\n          phi2 = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__[\"asin\"])(c /= m),\n          lambda2 = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__[\"abs\"])(Object(_math_js__WEBPACK_IMPORTED_MODULE_1__[\"abs\"])(c) - 1) < _math_js__WEBPACK_IMPORTED_MODULE_1__[\"epsilon\"] || Object(_math_js__WEBPACK_IMPORTED_MODULE_1__[\"abs\"])(lambda0 - lambda1) < _math_js__WEBPACK_IMPORTED_MODULE_1__[\"epsilon\"] ? (lambda0 + lambda1) / 2 : Object(_math_js__WEBPACK_IMPORTED_MODULE_1__[\"atan2\"])(b, a),\n          p = project(lambda2, phi2),\n          x2 = p[0],\n          y2 = p[1],\n          dx2 = x2 - x0,\n          dy2 = y2 - y0,\n          dz = dy * dx2 - dx * dy2;\n      if (dz * dz / d2 > delta2 // perpendicular projected distance\n          || Object(_math_js__WEBPACK_IMPORTED_MODULE_1__[\"abs\"])((dx * dx2 + dy * dy2) / d2 - 0.5) > 0.3 // midpoint close to an end\n          || a0 * a1 + b0 * b1 + c0 * c1 < cosMinDistance) { // angular distance\n        resampleLineTo(x0, y0, lambda0, a0, b0, c0, x2, y2, lambda2, a /= m, b /= m, c, depth, stream);\n        stream.point(x2, y2);\n        resampleLineTo(x2, y2, lambda2, a, b, c, x1, y1, lambda1, a1, b1, c1, depth, stream);\n      }\n    }\n  }\n  return function(stream) {\n    var lambda00, x00, y00, a00, b00, c00, // first point\n        lambda0, x0, y0, a0, b0, c0; // previous point\n\n    var resampleStream = {\n      point: point,\n      lineStart: lineStart,\n      lineEnd: lineEnd,\n      polygonStart: function() { stream.polygonStart(); resampleStream.lineStart = ringStart; },\n      polygonEnd: function() { stream.polygonEnd(); resampleStream.lineStart = lineStart; }\n    };\n\n    function point(x, y) {\n      x = project(x, y);\n      stream.point(x[0], x[1]);\n    }\n\n    function lineStart() {\n      x0 = NaN;\n      resampleStream.point = linePoint;\n      stream.lineStart();\n    }\n\n    function linePoint(lambda, phi) {\n      var c = Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_0__[\"cartesian\"])([lambda, phi]), p = project(lambda, phi);\n      resampleLineTo(x0, y0, lambda0, a0, b0, c0, x0 = p[0], y0 = p[1], lambda0 = lambda, a0 = c[0], b0 = c[1], c0 = c[2], maxDepth, stream);\n      stream.point(x0, y0);\n    }\n\n    function lineEnd() {\n      resampleStream.point = point;\n      stream.lineEnd();\n    }\n\n    function ringStart() {\n      lineStart();\n      resampleStream.point = ringPoint;\n      resampleStream.lineEnd = ringEnd;\n    }\n\n    function ringPoint(lambda, phi) {\n      linePoint(lambda00 = lambda, phi), x00 = x0, y00 = y0, a00 = a0, b00 = b0, c00 = c0;\n      resampleStream.point = linePoint;\n    }\n\n    function ringEnd() {\n      resampleLineTo(x0, y0, lambda0, a0, b0, c0, x00, y00, lambda00, a00, b00, c00, maxDepth, stream);\n      resampleStream.lineEnd = lineEnd;\n      lineEnd();\n    }\n\n    return resampleStream;\n  };\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-geo/src/projection/stereographic.js\":\n/*!*************************************************************!*\\\n  !*** ./node_modules/d3-geo/src/projection/stereographic.js ***!\n  \\*************************************************************/\n/*! exports provided: stereographicRaw, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"stereographicRaw\", function() { return stereographicRaw; });\n/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../math.js */ \"./node_modules/d3-geo/src/math.js\");\n/* harmony import */ var _azimuthal_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./azimuthal.js */ \"./node_modules/d3-geo/src/projection/azimuthal.js\");\n/* harmony import */ var _index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./index.js */ \"./node_modules/d3-geo/src/projection/index.js\");\n\n\n\n\nfunction stereographicRaw(x, y) {\n  var cy = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"cos\"])(y), k = 1 + Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"cos\"])(x) * cy;\n  return [cy * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"sin\"])(x) / k, Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"sin\"])(y) / k];\n}\n\nstereographicRaw.invert = Object(_azimuthal_js__WEBPACK_IMPORTED_MODULE_1__[\"azimuthalInvert\"])(function(z) {\n  return 2 * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"atan\"])(z);\n});\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  return Object(_index_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(stereographicRaw)\n      .scale(250)\n      .clipAngle(142);\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-geo/src/projection/transverseMercator.js\":\n/*!******************************************************************!*\\\n  !*** ./node_modules/d3-geo/src/projection/transverseMercator.js ***!\n  \\******************************************************************/\n/*! exports provided: transverseMercatorRaw, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"transverseMercatorRaw\", function() { return transverseMercatorRaw; });\n/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../math.js */ \"./node_modules/d3-geo/src/math.js\");\n/* harmony import */ var _mercator_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./mercator.js */ \"./node_modules/d3-geo/src/projection/mercator.js\");\n\n\n\nfunction transverseMercatorRaw(lambda, phi) {\n  return [Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"log\"])(Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"tan\"])((_math_js__WEBPACK_IMPORTED_MODULE_0__[\"halfPi\"] + phi) / 2)), -lambda];\n}\n\ntransverseMercatorRaw.invert = function(x, y) {\n  return [-y, 2 * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"atan\"])(Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"exp\"])(x)) - _math_js__WEBPACK_IMPORTED_MODULE_0__[\"halfPi\"]];\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  var m = Object(_mercator_js__WEBPACK_IMPORTED_MODULE_1__[\"mercatorProjection\"])(transverseMercatorRaw),\n      center = m.center,\n      rotate = m.rotate;\n\n  m.center = function(_) {\n    return arguments.length ? center([-_[1], _[0]]) : (_ = center(), [_[1], -_[0]]);\n  };\n\n  m.rotate = function(_) {\n    return arguments.length ? rotate([_[0], _[1], _.length > 2 ? _[2] + 90 : 90]) : (_ = rotate(), [_[0], _[1], _[2] - 90]);\n  };\n\n  return rotate([0, 0, 90])\n      .scale(159.155);\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-geo/src/rotation.js\":\n/*!*********************************************!*\\\n  !*** ./node_modules/d3-geo/src/rotation.js ***!\n  \\*********************************************/\n/*! exports provided: rotateRadians, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"rotateRadians\", function() { return rotateRadians; });\n/* harmony import */ var _compose_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./compose.js */ \"./node_modules/d3-geo/src/compose.js\");\n/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./math.js */ \"./node_modules/d3-geo/src/math.js\");\n\n\n\nfunction rotationIdentity(lambda, phi) {\n  return [Object(_math_js__WEBPACK_IMPORTED_MODULE_1__[\"abs\"])(lambda) > _math_js__WEBPACK_IMPORTED_MODULE_1__[\"pi\"] ? lambda + Math.round(-lambda / _math_js__WEBPACK_IMPORTED_MODULE_1__[\"tau\"]) * _math_js__WEBPACK_IMPORTED_MODULE_1__[\"tau\"] : lambda, phi];\n}\n\nrotationIdentity.invert = rotationIdentity;\n\nfunction rotateRadians(deltaLambda, deltaPhi, deltaGamma) {\n  return (deltaLambda %= _math_js__WEBPACK_IMPORTED_MODULE_1__[\"tau\"]) ? (deltaPhi || deltaGamma ? Object(_compose_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(rotationLambda(deltaLambda), rotationPhiGamma(deltaPhi, deltaGamma))\n    : rotationLambda(deltaLambda))\n    : (deltaPhi || deltaGamma ? rotationPhiGamma(deltaPhi, deltaGamma)\n    : rotationIdentity);\n}\n\nfunction forwardRotationLambda(deltaLambda) {\n  return function(lambda, phi) {\n    return lambda += deltaLambda, [lambda > _math_js__WEBPACK_IMPORTED_MODULE_1__[\"pi\"] ? lambda - _math_js__WEBPACK_IMPORTED_MODULE_1__[\"tau\"] : lambda < -_math_js__WEBPACK_IMPORTED_MODULE_1__[\"pi\"] ? lambda + _math_js__WEBPACK_IMPORTED_MODULE_1__[\"tau\"] : lambda, phi];\n  };\n}\n\nfunction rotationLambda(deltaLambda) {\n  var rotation = forwardRotationLambda(deltaLambda);\n  rotation.invert = forwardRotationLambda(-deltaLambda);\n  return rotation;\n}\n\nfunction rotationPhiGamma(deltaPhi, deltaGamma) {\n  var cosDeltaPhi = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__[\"cos\"])(deltaPhi),\n      sinDeltaPhi = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__[\"sin\"])(deltaPhi),\n      cosDeltaGamma = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__[\"cos\"])(deltaGamma),\n      sinDeltaGamma = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__[\"sin\"])(deltaGamma);\n\n  function rotation(lambda, phi) {\n    var cosPhi = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__[\"cos\"])(phi),\n        x = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__[\"cos\"])(lambda) * cosPhi,\n        y = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__[\"sin\"])(lambda) * cosPhi,\n        z = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__[\"sin\"])(phi),\n        k = z * cosDeltaPhi + x * sinDeltaPhi;\n    return [\n      Object(_math_js__WEBPACK_IMPORTED_MODULE_1__[\"atan2\"])(y * cosDeltaGamma - k * sinDeltaGamma, x * cosDeltaPhi - z * sinDeltaPhi),\n      Object(_math_js__WEBPACK_IMPORTED_MODULE_1__[\"asin\"])(k * cosDeltaGamma + y * sinDeltaGamma)\n    ];\n  }\n\n  rotation.invert = function(lambda, phi) {\n    var cosPhi = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__[\"cos\"])(phi),\n        x = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__[\"cos\"])(lambda) * cosPhi,\n        y = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__[\"sin\"])(lambda) * cosPhi,\n        z = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__[\"sin\"])(phi),\n        k = z * cosDeltaGamma - y * sinDeltaGamma;\n    return [\n      Object(_math_js__WEBPACK_IMPORTED_MODULE_1__[\"atan2\"])(y * cosDeltaGamma + z * sinDeltaGamma, x * cosDeltaPhi + k * sinDeltaPhi),\n      Object(_math_js__WEBPACK_IMPORTED_MODULE_1__[\"asin\"])(k * cosDeltaPhi - x * sinDeltaPhi)\n    ];\n  };\n\n  return rotation;\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(rotate) {\n  rotate = rotateRadians(rotate[0] * _math_js__WEBPACK_IMPORTED_MODULE_1__[\"radians\"], rotate[1] * _math_js__WEBPACK_IMPORTED_MODULE_1__[\"radians\"], rotate.length > 2 ? rotate[2] * _math_js__WEBPACK_IMPORTED_MODULE_1__[\"radians\"] : 0);\n\n  function forward(coordinates) {\n    coordinates = rotate(coordinates[0] * _math_js__WEBPACK_IMPORTED_MODULE_1__[\"radians\"], coordinates[1] * _math_js__WEBPACK_IMPORTED_MODULE_1__[\"radians\"]);\n    return coordinates[0] *= _math_js__WEBPACK_IMPORTED_MODULE_1__[\"degrees\"], coordinates[1] *= _math_js__WEBPACK_IMPORTED_MODULE_1__[\"degrees\"], coordinates;\n  }\n\n  forward.invert = function(coordinates) {\n    coordinates = rotate.invert(coordinates[0] * _math_js__WEBPACK_IMPORTED_MODULE_1__[\"radians\"], coordinates[1] * _math_js__WEBPACK_IMPORTED_MODULE_1__[\"radians\"]);\n    return coordinates[0] *= _math_js__WEBPACK_IMPORTED_MODULE_1__[\"degrees\"], coordinates[1] *= _math_js__WEBPACK_IMPORTED_MODULE_1__[\"degrees\"], coordinates;\n  };\n\n  return forward;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-geo/src/stream.js\":\n/*!*******************************************!*\\\n  !*** ./node_modules/d3-geo/src/stream.js ***!\n  \\*******************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\nfunction streamGeometry(geometry, stream) {\n  if (geometry && streamGeometryType.hasOwnProperty(geometry.type)) {\n    streamGeometryType[geometry.type](geometry, stream);\n  }\n}\n\nvar streamObjectType = {\n  Feature: function(object, stream) {\n    streamGeometry(object.geometry, stream);\n  },\n  FeatureCollection: function(object, stream) {\n    var features = object.features, i = -1, n = features.length;\n    while (++i < n) streamGeometry(features[i].geometry, stream);\n  }\n};\n\nvar streamGeometryType = {\n  Sphere: function(object, stream) {\n    stream.sphere();\n  },\n  Point: function(object, stream) {\n    object = object.coordinates;\n    stream.point(object[0], object[1], object[2]);\n  },\n  MultiPoint: function(object, stream) {\n    var coordinates = object.coordinates, i = -1, n = coordinates.length;\n    while (++i < n) object = coordinates[i], stream.point(object[0], object[1], object[2]);\n  },\n  LineString: function(object, stream) {\n    streamLine(object.coordinates, stream, 0);\n  },\n  MultiLineString: function(object, stream) {\n    var coordinates = object.coordinates, i = -1, n = coordinates.length;\n    while (++i < n) streamLine(coordinates[i], stream, 0);\n  },\n  Polygon: function(object, stream) {\n    streamPolygon(object.coordinates, stream);\n  },\n  MultiPolygon: function(object, stream) {\n    var coordinates = object.coordinates, i = -1, n = coordinates.length;\n    while (++i < n) streamPolygon(coordinates[i], stream);\n  },\n  GeometryCollection: function(object, stream) {\n    var geometries = object.geometries, i = -1, n = geometries.length;\n    while (++i < n) streamGeometry(geometries[i], stream);\n  }\n};\n\nfunction streamLine(coordinates, stream, closed) {\n  var i = -1, n = coordinates.length - closed, coordinate;\n  stream.lineStart();\n  while (++i < n) coordinate = coordinates[i], stream.point(coordinate[0], coordinate[1], coordinate[2]);\n  stream.lineEnd();\n}\n\nfunction streamPolygon(coordinates, stream) {\n  var i = -1, n = coordinates.length;\n  stream.polygonStart();\n  while (++i < n) streamLine(coordinates[i], stream, 1);\n  stream.polygonEnd();\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(object, stream) {\n  if (object && streamObjectType.hasOwnProperty(object.type)) {\n    streamObjectType[object.type](object, stream);\n  } else {\n    streamGeometry(object, stream);\n  }\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-geo/src/transform.js\":\n/*!**********************************************!*\\\n  !*** ./node_modules/d3-geo/src/transform.js ***!\n  \\**********************************************/\n/*! exports provided: default, transformer */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"transformer\", function() { return transformer; });\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(methods) {\n  return {\n    stream: transformer(methods)\n  };\n});\n\nfunction transformer(methods) {\n  return function(stream) {\n    var s = new TransformStream;\n    for (var key in methods) s[key] = methods[key];\n    s.stream = stream;\n    return s;\n  };\n}\n\nfunction TransformStream() {}\n\nTransformStream.prototype = {\n  constructor: TransformStream,\n  point: function(x, y) { this.stream.point(x, y); },\n  sphere: function() { this.stream.sphere(); },\n  lineStart: function() { this.stream.lineStart(); },\n  lineEnd: function() { this.stream.lineEnd(); },\n  polygonStart: function() { this.stream.polygonStart(); },\n  polygonEnd: function() { this.stream.polygonEnd(); }\n};\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-hierarchy/src/accessors.js\":\n/*!****************************************************!*\\\n  !*** ./node_modules/d3-hierarchy/src/accessors.js ***!\n  \\****************************************************/\n/*! exports provided: optional, required */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"optional\", function() { return optional; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"required\", function() { return required; });\nfunction optional(f) {\n  return f == null ? null : required(f);\n}\n\nfunction required(f) {\n  if (typeof f !== \"function\") throw new Error;\n  return f;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-hierarchy/src/array.js\":\n/*!************************************************!*\\\n  !*** ./node_modules/d3-hierarchy/src/array.js ***!\n  \\************************************************/\n/*! exports provided: default, shuffle */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"shuffle\", function() { return shuffle; });\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(x) {\n  return typeof x === \"object\" && \"length\" in x\n    ? x // Array, TypedArray, NodeList, array-like\n    : Array.from(x); // Map, Set, iterable, string, or anything else\n});\n\nfunction shuffle(array) {\n  var m = array.length,\n      t,\n      i;\n\n  while (m) {\n    i = Math.random() * m-- | 0;\n    t = array[m];\n    array[m] = array[i];\n    array[i] = t;\n  }\n\n  return array;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-hierarchy/src/cluster.js\":\n/*!**************************************************!*\\\n  !*** ./node_modules/d3-hierarchy/src/cluster.js ***!\n  \\**************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\nfunction defaultSeparation(a, b) {\n  return a.parent === b.parent ? 1 : 2;\n}\n\nfunction meanX(children) {\n  return children.reduce(meanXReduce, 0) / children.length;\n}\n\nfunction meanXReduce(x, c) {\n  return x + c.x;\n}\n\nfunction maxY(children) {\n  return 1 + children.reduce(maxYReduce, 0);\n}\n\nfunction maxYReduce(y, c) {\n  return Math.max(y, c.y);\n}\n\nfunction leafLeft(node) {\n  var children;\n  while (children = node.children) node = children[0];\n  return node;\n}\n\nfunction leafRight(node) {\n  var children;\n  while (children = node.children) node = children[children.length - 1];\n  return node;\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  var separation = defaultSeparation,\n      dx = 1,\n      dy = 1,\n      nodeSize = false;\n\n  function cluster(root) {\n    var previousNode,\n        x = 0;\n\n    // First walk, computing the initial x & y values.\n    root.eachAfter(function(node) {\n      var children = node.children;\n      if (children) {\n        node.x = meanX(children);\n        node.y = maxY(children);\n      } else {\n        node.x = previousNode ? x += separation(node, previousNode) : 0;\n        node.y = 0;\n        previousNode = node;\n      }\n    });\n\n    var left = leafLeft(root),\n        right = leafRight(root),\n        x0 = left.x - separation(left, right) / 2,\n        x1 = right.x + separation(right, left) / 2;\n\n    // Second walk, normalizing x & y to the desired size.\n    return root.eachAfter(nodeSize ? function(node) {\n      node.x = (node.x - root.x) * dx;\n      node.y = (root.y - node.y) * dy;\n    } : function(node) {\n      node.x = (node.x - x0) / (x1 - x0) * dx;\n      node.y = (1 - (root.y ? node.y / root.y : 1)) * dy;\n    });\n  }\n\n  cluster.separation = function(x) {\n    return arguments.length ? (separation = x, cluster) : separation;\n  };\n\n  cluster.size = function(x) {\n    return arguments.length ? (nodeSize = false, dx = +x[0], dy = +x[1], cluster) : (nodeSize ? null : [dx, dy]);\n  };\n\n  cluster.nodeSize = function(x) {\n    return arguments.length ? (nodeSize = true, dx = +x[0], dy = +x[1], cluster) : (nodeSize ? [dx, dy] : null);\n  };\n\n  return cluster;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-hierarchy/src/constant.js\":\n/*!***************************************************!*\\\n  !*** ./node_modules/d3-hierarchy/src/constant.js ***!\n  \\***************************************************/\n/*! exports provided: constantZero, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"constantZero\", function() { return constantZero; });\nfunction constantZero() {\n  return 0;\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(x) {\n  return function() {\n    return x;\n  };\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-hierarchy/src/hierarchy/ancestors.js\":\n/*!**************************************************************!*\\\n  !*** ./node_modules/d3-hierarchy/src/hierarchy/ancestors.js ***!\n  \\**************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  var node = this, nodes = [node];\n  while (node = node.parent) {\n    nodes.push(node);\n  }\n  return nodes;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-hierarchy/src/hierarchy/count.js\":\n/*!**********************************************************!*\\\n  !*** ./node_modules/d3-hierarchy/src/hierarchy/count.js ***!\n  \\**********************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\nfunction count(node) {\n  var sum = 0,\n      children = node.children,\n      i = children && children.length;\n  if (!i) sum = 1;\n  else while (--i >= 0) sum += children[i].value;\n  node.value = sum;\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  return this.eachAfter(count);\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-hierarchy/src/hierarchy/descendants.js\":\n/*!****************************************************************!*\\\n  !*** ./node_modules/d3-hierarchy/src/hierarchy/descendants.js ***!\n  \\****************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  return Array.from(this);\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-hierarchy/src/hierarchy/each.js\":\n/*!*********************************************************!*\\\n  !*** ./node_modules/d3-hierarchy/src/hierarchy/each.js ***!\n  \\*********************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(callback, that) {\n  let index = -1;\n  for (const node of this) {\n    callback.call(that, node, ++index, this);\n  }\n  return this;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-hierarchy/src/hierarchy/eachAfter.js\":\n/*!**************************************************************!*\\\n  !*** ./node_modules/d3-hierarchy/src/hierarchy/eachAfter.js ***!\n  \\**************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(callback, that) {\n  var node = this, nodes = [node], next = [], children, i, n, index = -1;\n  while (node = nodes.pop()) {\n    next.push(node);\n    if (children = node.children) {\n      for (i = 0, n = children.length; i < n; ++i) {\n        nodes.push(children[i]);\n      }\n    }\n  }\n  while (node = next.pop()) {\n    callback.call(that, node, ++index, this);\n  }\n  return this;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-hierarchy/src/hierarchy/eachBefore.js\":\n/*!***************************************************************!*\\\n  !*** ./node_modules/d3-hierarchy/src/hierarchy/eachBefore.js ***!\n  \\***************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(callback, that) {\n  var node = this, nodes = [node], children, i, index = -1;\n  while (node = nodes.pop()) {\n    callback.call(that, node, ++index, this);\n    if (children = node.children) {\n      for (i = children.length - 1; i >= 0; --i) {\n        nodes.push(children[i]);\n      }\n    }\n  }\n  return this;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-hierarchy/src/hierarchy/find.js\":\n/*!*********************************************************!*\\\n  !*** ./node_modules/d3-hierarchy/src/hierarchy/find.js ***!\n  \\*********************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(callback, that) {\n  let index = -1;\n  for (const node of this) {\n    if (callback.call(that, node, ++index, this)) {\n      return node;\n    }\n  }\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-hierarchy/src/hierarchy/index.js\":\n/*!**********************************************************!*\\\n  !*** ./node_modules/d3-hierarchy/src/hierarchy/index.js ***!\n  \\**********************************************************/\n/*! exports provided: default, computeHeight, Node */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return hierarchy; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"computeHeight\", function() { return computeHeight; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Node\", function() { return Node; });\n/* harmony import */ var _count_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./count.js */ \"./node_modules/d3-hierarchy/src/hierarchy/count.js\");\n/* harmony import */ var _each_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./each.js */ \"./node_modules/d3-hierarchy/src/hierarchy/each.js\");\n/* harmony import */ var _eachBefore_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./eachBefore.js */ \"./node_modules/d3-hierarchy/src/hierarchy/eachBefore.js\");\n/* harmony import */ var _eachAfter_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./eachAfter.js */ \"./node_modules/d3-hierarchy/src/hierarchy/eachAfter.js\");\n/* harmony import */ var _find_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./find.js */ \"./node_modules/d3-hierarchy/src/hierarchy/find.js\");\n/* harmony import */ var _sum_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./sum.js */ \"./node_modules/d3-hierarchy/src/hierarchy/sum.js\");\n/* harmony import */ var _sort_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./sort.js */ \"./node_modules/d3-hierarchy/src/hierarchy/sort.js\");\n/* harmony import */ var _path_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./path.js */ \"./node_modules/d3-hierarchy/src/hierarchy/path.js\");\n/* harmony import */ var _ancestors_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./ancestors.js */ \"./node_modules/d3-hierarchy/src/hierarchy/ancestors.js\");\n/* harmony import */ var _descendants_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./descendants.js */ \"./node_modules/d3-hierarchy/src/hierarchy/descendants.js\");\n/* harmony import */ var _leaves_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./leaves.js */ \"./node_modules/d3-hierarchy/src/hierarchy/leaves.js\");\n/* harmony import */ var _links_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./links.js */ \"./node_modules/d3-hierarchy/src/hierarchy/links.js\");\n/* harmony import */ var _iterator_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./iterator.js */ \"./node_modules/d3-hierarchy/src/hierarchy/iterator.js\");\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nfunction hierarchy(data, children) {\n  if (data instanceof Map) {\n    data = [undefined, data];\n    if (children === undefined) children = mapChildren;\n  } else if (children === undefined) {\n    children = objectChildren;\n  }\n\n  var root = new Node(data),\n      node,\n      nodes = [root],\n      child,\n      childs,\n      i,\n      n;\n\n  while (node = nodes.pop()) {\n    if ((childs = children(node.data)) && (n = (childs = Array.from(childs)).length)) {\n      node.children = childs;\n      for (i = n - 1; i >= 0; --i) {\n        nodes.push(child = childs[i] = new Node(childs[i]));\n        child.parent = node;\n        child.depth = node.depth + 1;\n      }\n    }\n  }\n\n  return root.eachBefore(computeHeight);\n}\n\nfunction node_copy() {\n  return hierarchy(this).eachBefore(copyData);\n}\n\nfunction objectChildren(d) {\n  return d.children;\n}\n\nfunction mapChildren(d) {\n  return Array.isArray(d) ? d[1] : null;\n}\n\nfunction copyData(node) {\n  if (node.data.value !== undefined) node.value = node.data.value;\n  node.data = node.data.data;\n}\n\nfunction computeHeight(node) {\n  var height = 0;\n  do node.height = height;\n  while ((node = node.parent) && (node.height < ++height));\n}\n\nfunction Node(data) {\n  this.data = data;\n  this.depth =\n  this.height = 0;\n  this.parent = null;\n}\n\nNode.prototype = hierarchy.prototype = {\n  constructor: Node,\n  count: _count_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"],\n  each: _each_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"],\n  eachAfter: _eachAfter_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"],\n  eachBefore: _eachBefore_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"],\n  find: _find_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"],\n  sum: _sum_js__WEBPACK_IMPORTED_MODULE_5__[\"default\"],\n  sort: _sort_js__WEBPACK_IMPORTED_MODULE_6__[\"default\"],\n  path: _path_js__WEBPACK_IMPORTED_MODULE_7__[\"default\"],\n  ancestors: _ancestors_js__WEBPACK_IMPORTED_MODULE_8__[\"default\"],\n  descendants: _descendants_js__WEBPACK_IMPORTED_MODULE_9__[\"default\"],\n  leaves: _leaves_js__WEBPACK_IMPORTED_MODULE_10__[\"default\"],\n  links: _links_js__WEBPACK_IMPORTED_MODULE_11__[\"default\"],\n  copy: node_copy,\n  [Symbol.iterator]: _iterator_js__WEBPACK_IMPORTED_MODULE_12__[\"default\"]\n};\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-hierarchy/src/hierarchy/iterator.js\":\n/*!*************************************************************!*\\\n  !*** ./node_modules/d3-hierarchy/src/hierarchy/iterator.js ***!\n  \\*************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function*() {\n  var node = this, current, next = [node], children, i, n;\n  do {\n    current = next.reverse(), next = [];\n    while (node = current.pop()) {\n      yield node;\n      if (children = node.children) {\n        for (i = 0, n = children.length; i < n; ++i) {\n          next.push(children[i]);\n        }\n      }\n    }\n  } while (next.length);\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-hierarchy/src/hierarchy/leaves.js\":\n/*!***********************************************************!*\\\n  !*** ./node_modules/d3-hierarchy/src/hierarchy/leaves.js ***!\n  \\***********************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  var leaves = [];\n  this.eachBefore(function(node) {\n    if (!node.children) {\n      leaves.push(node);\n    }\n  });\n  return leaves;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-hierarchy/src/hierarchy/links.js\":\n/*!**********************************************************!*\\\n  !*** ./node_modules/d3-hierarchy/src/hierarchy/links.js ***!\n  \\**********************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  var root = this, links = [];\n  root.each(function(node) {\n    if (node !== root) { // Don’t include the root’s parent, if any.\n      links.push({source: node.parent, target: node});\n    }\n  });\n  return links;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-hierarchy/src/hierarchy/path.js\":\n/*!*********************************************************!*\\\n  !*** ./node_modules/d3-hierarchy/src/hierarchy/path.js ***!\n  \\*********************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(end) {\n  var start = this,\n      ancestor = leastCommonAncestor(start, end),\n      nodes = [start];\n  while (start !== ancestor) {\n    start = start.parent;\n    nodes.push(start);\n  }\n  var k = nodes.length;\n  while (end !== ancestor) {\n    nodes.splice(k, 0, end);\n    end = end.parent;\n  }\n  return nodes;\n});\n\nfunction leastCommonAncestor(a, b) {\n  if (a === b) return a;\n  var aNodes = a.ancestors(),\n      bNodes = b.ancestors(),\n      c = null;\n  a = aNodes.pop();\n  b = bNodes.pop();\n  while (a === b) {\n    c = a;\n    a = aNodes.pop();\n    b = bNodes.pop();\n  }\n  return c;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-hierarchy/src/hierarchy/sort.js\":\n/*!*********************************************************!*\\\n  !*** ./node_modules/d3-hierarchy/src/hierarchy/sort.js ***!\n  \\*********************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(compare) {\n  return this.eachBefore(function(node) {\n    if (node.children) {\n      node.children.sort(compare);\n    }\n  });\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-hierarchy/src/hierarchy/sum.js\":\n/*!********************************************************!*\\\n  !*** ./node_modules/d3-hierarchy/src/hierarchy/sum.js ***!\n  \\********************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(value) {\n  return this.eachAfter(function(node) {\n    var sum = +value(node.data) || 0,\n        children = node.children,\n        i = children && children.length;\n    while (--i >= 0) sum += children[i].value;\n    node.value = sum;\n  });\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-hierarchy/src/index.js\":\n/*!************************************************!*\\\n  !*** ./node_modules/d3-hierarchy/src/index.js ***!\n  \\************************************************/\n/*! exports provided: cluster, hierarchy, Node, pack, packSiblings, packEnclose, partition, stratify, tree, treemap, treemapBinary, treemapDice, treemapSlice, treemapSliceDice, treemapSquarify, treemapResquarify */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _cluster_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./cluster.js */ \"./node_modules/d3-hierarchy/src/cluster.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"cluster\", function() { return _cluster_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n/* harmony import */ var _hierarchy_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./hierarchy/index.js */ \"./node_modules/d3-hierarchy/src/hierarchy/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"hierarchy\", function() { return _hierarchy_index_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"Node\", function() { return _hierarchy_index_js__WEBPACK_IMPORTED_MODULE_1__[\"Node\"]; });\n\n/* harmony import */ var _pack_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./pack/index.js */ \"./node_modules/d3-hierarchy/src/pack/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"pack\", function() { return _pack_index_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"]; });\n\n/* harmony import */ var _pack_siblings_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./pack/siblings.js */ \"./node_modules/d3-hierarchy/src/pack/siblings.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"packSiblings\", function() { return _pack_siblings_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"]; });\n\n/* harmony import */ var _pack_enclose_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./pack/enclose.js */ \"./node_modules/d3-hierarchy/src/pack/enclose.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"packEnclose\", function() { return _pack_enclose_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"]; });\n\n/* harmony import */ var _partition_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./partition.js */ \"./node_modules/d3-hierarchy/src/partition.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"partition\", function() { return _partition_js__WEBPACK_IMPORTED_MODULE_5__[\"default\"]; });\n\n/* harmony import */ var _stratify_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./stratify.js */ \"./node_modules/d3-hierarchy/src/stratify.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"stratify\", function() { return _stratify_js__WEBPACK_IMPORTED_MODULE_6__[\"default\"]; });\n\n/* harmony import */ var _tree_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./tree.js */ \"./node_modules/d3-hierarchy/src/tree.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"tree\", function() { return _tree_js__WEBPACK_IMPORTED_MODULE_7__[\"default\"]; });\n\n/* harmony import */ var _treemap_index_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./treemap/index.js */ \"./node_modules/d3-hierarchy/src/treemap/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"treemap\", function() { return _treemap_index_js__WEBPACK_IMPORTED_MODULE_8__[\"default\"]; });\n\n/* harmony import */ var _treemap_binary_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./treemap/binary.js */ \"./node_modules/d3-hierarchy/src/treemap/binary.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"treemapBinary\", function() { return _treemap_binary_js__WEBPACK_IMPORTED_MODULE_9__[\"default\"]; });\n\n/* harmony import */ var _treemap_dice_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./treemap/dice.js */ \"./node_modules/d3-hierarchy/src/treemap/dice.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"treemapDice\", function() { return _treemap_dice_js__WEBPACK_IMPORTED_MODULE_10__[\"default\"]; });\n\n/* harmony import */ var _treemap_slice_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./treemap/slice.js */ \"./node_modules/d3-hierarchy/src/treemap/slice.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"treemapSlice\", function() { return _treemap_slice_js__WEBPACK_IMPORTED_MODULE_11__[\"default\"]; });\n\n/* harmony import */ var _treemap_sliceDice_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./treemap/sliceDice.js */ \"./node_modules/d3-hierarchy/src/treemap/sliceDice.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"treemapSliceDice\", function() { return _treemap_sliceDice_js__WEBPACK_IMPORTED_MODULE_12__[\"default\"]; });\n\n/* harmony import */ var _treemap_squarify_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./treemap/squarify.js */ \"./node_modules/d3-hierarchy/src/treemap/squarify.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"treemapSquarify\", function() { return _treemap_squarify_js__WEBPACK_IMPORTED_MODULE_13__[\"default\"]; });\n\n/* harmony import */ var _treemap_resquarify_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./treemap/resquarify.js */ \"./node_modules/d3-hierarchy/src/treemap/resquarify.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"treemapResquarify\", function() { return _treemap_resquarify_js__WEBPACK_IMPORTED_MODULE_14__[\"default\"]; });\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-hierarchy/src/pack/enclose.js\":\n/*!*******************************************************!*\\\n  !*** ./node_modules/d3-hierarchy/src/pack/enclose.js ***!\n  \\*******************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _array_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../array.js */ \"./node_modules/d3-hierarchy/src/array.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(circles) {\n  var i = 0, n = (circles = Object(_array_js__WEBPACK_IMPORTED_MODULE_0__[\"shuffle\"])(Array.from(circles))).length, B = [], p, e;\n\n  while (i < n) {\n    p = circles[i];\n    if (e && enclosesWeak(e, p)) ++i;\n    else e = encloseBasis(B = extendBasis(B, p)), i = 0;\n  }\n\n  return e;\n});\n\nfunction extendBasis(B, p) {\n  var i, j;\n\n  if (enclosesWeakAll(p, B)) return [p];\n\n  // If we get here then B must have at least one element.\n  for (i = 0; i < B.length; ++i) {\n    if (enclosesNot(p, B[i])\n        && enclosesWeakAll(encloseBasis2(B[i], p), B)) {\n      return [B[i], p];\n    }\n  }\n\n  // If we get here then B must have at least two elements.\n  for (i = 0; i < B.length - 1; ++i) {\n    for (j = i + 1; j < B.length; ++j) {\n      if (enclosesNot(encloseBasis2(B[i], B[j]), p)\n          && enclosesNot(encloseBasis2(B[i], p), B[j])\n          && enclosesNot(encloseBasis2(B[j], p), B[i])\n          && enclosesWeakAll(encloseBasis3(B[i], B[j], p), B)) {\n        return [B[i], B[j], p];\n      }\n    }\n  }\n\n  // If we get here then something is very wrong.\n  throw new Error;\n}\n\nfunction enclosesNot(a, b) {\n  var dr = a.r - b.r, dx = b.x - a.x, dy = b.y - a.y;\n  return dr < 0 || dr * dr < dx * dx + dy * dy;\n}\n\nfunction enclosesWeak(a, b) {\n  var dr = a.r - b.r + Math.max(a.r, b.r, 1) * 1e-9, dx = b.x - a.x, dy = b.y - a.y;\n  return dr > 0 && dr * dr > dx * dx + dy * dy;\n}\n\nfunction enclosesWeakAll(a, B) {\n  for (var i = 0; i < B.length; ++i) {\n    if (!enclosesWeak(a, B[i])) {\n      return false;\n    }\n  }\n  return true;\n}\n\nfunction encloseBasis(B) {\n  switch (B.length) {\n    case 1: return encloseBasis1(B[0]);\n    case 2: return encloseBasis2(B[0], B[1]);\n    case 3: return encloseBasis3(B[0], B[1], B[2]);\n  }\n}\n\nfunction encloseBasis1(a) {\n  return {\n    x: a.x,\n    y: a.y,\n    r: a.r\n  };\n}\n\nfunction encloseBasis2(a, b) {\n  var x1 = a.x, y1 = a.y, r1 = a.r,\n      x2 = b.x, y2 = b.y, r2 = b.r,\n      x21 = x2 - x1, y21 = y2 - y1, r21 = r2 - r1,\n      l = Math.sqrt(x21 * x21 + y21 * y21);\n  return {\n    x: (x1 + x2 + x21 / l * r21) / 2,\n    y: (y1 + y2 + y21 / l * r21) / 2,\n    r: (l + r1 + r2) / 2\n  };\n}\n\nfunction encloseBasis3(a, b, c) {\n  var x1 = a.x, y1 = a.y, r1 = a.r,\n      x2 = b.x, y2 = b.y, r2 = b.r,\n      x3 = c.x, y3 = c.y, r3 = c.r,\n      a2 = x1 - x2,\n      a3 = x1 - x3,\n      b2 = y1 - y2,\n      b3 = y1 - y3,\n      c2 = r2 - r1,\n      c3 = r3 - r1,\n      d1 = x1 * x1 + y1 * y1 - r1 * r1,\n      d2 = d1 - x2 * x2 - y2 * y2 + r2 * r2,\n      d3 = d1 - x3 * x3 - y3 * y3 + r3 * r3,\n      ab = a3 * b2 - a2 * b3,\n      xa = (b2 * d3 - b3 * d2) / (ab * 2) - x1,\n      xb = (b3 * c2 - b2 * c3) / ab,\n      ya = (a3 * d2 - a2 * d3) / (ab * 2) - y1,\n      yb = (a2 * c3 - a3 * c2) / ab,\n      A = xb * xb + yb * yb - 1,\n      B = 2 * (r1 + xa * xb + ya * yb),\n      C = xa * xa + ya * ya - r1 * r1,\n      r = -(A ? (B + Math.sqrt(B * B - 4 * A * C)) / (2 * A) : C / B);\n  return {\n    x: x1 + xa + xb * r,\n    y: y1 + ya + yb * r,\n    r: r\n  };\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-hierarchy/src/pack/index.js\":\n/*!*****************************************************!*\\\n  !*** ./node_modules/d3-hierarchy/src/pack/index.js ***!\n  \\*****************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _siblings_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./siblings.js */ \"./node_modules/d3-hierarchy/src/pack/siblings.js\");\n/* harmony import */ var _accessors_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../accessors.js */ \"./node_modules/d3-hierarchy/src/accessors.js\");\n/* harmony import */ var _constant_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../constant.js */ \"./node_modules/d3-hierarchy/src/constant.js\");\n\n\n\n\nfunction defaultRadius(d) {\n  return Math.sqrt(d.value);\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  var radius = null,\n      dx = 1,\n      dy = 1,\n      padding = _constant_js__WEBPACK_IMPORTED_MODULE_2__[\"constantZero\"];\n\n  function pack(root) {\n    root.x = dx / 2, root.y = dy / 2;\n    if (radius) {\n      root.eachBefore(radiusLeaf(radius))\n          .eachAfter(packChildren(padding, 0.5))\n          .eachBefore(translateChild(1));\n    } else {\n      root.eachBefore(radiusLeaf(defaultRadius))\n          .eachAfter(packChildren(_constant_js__WEBPACK_IMPORTED_MODULE_2__[\"constantZero\"], 1))\n          .eachAfter(packChildren(padding, root.r / Math.min(dx, dy)))\n          .eachBefore(translateChild(Math.min(dx, dy) / (2 * root.r)));\n    }\n    return root;\n  }\n\n  pack.radius = function(x) {\n    return arguments.length ? (radius = Object(_accessors_js__WEBPACK_IMPORTED_MODULE_1__[\"optional\"])(x), pack) : radius;\n  };\n\n  pack.size = function(x) {\n    return arguments.length ? (dx = +x[0], dy = +x[1], pack) : [dx, dy];\n  };\n\n  pack.padding = function(x) {\n    return arguments.length ? (padding = typeof x === \"function\" ? x : Object(_constant_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(+x), pack) : padding;\n  };\n\n  return pack;\n});\n\nfunction radiusLeaf(radius) {\n  return function(node) {\n    if (!node.children) {\n      node.r = Math.max(0, +radius(node) || 0);\n    }\n  };\n}\n\nfunction packChildren(padding, k) {\n  return function(node) {\n    if (children = node.children) {\n      var children,\n          i,\n          n = children.length,\n          r = padding(node) * k || 0,\n          e;\n\n      if (r) for (i = 0; i < n; ++i) children[i].r += r;\n      e = Object(_siblings_js__WEBPACK_IMPORTED_MODULE_0__[\"packEnclose\"])(children);\n      if (r) for (i = 0; i < n; ++i) children[i].r -= r;\n      node.r = e + r;\n    }\n  };\n}\n\nfunction translateChild(k) {\n  return function(node) {\n    var parent = node.parent;\n    node.r *= k;\n    if (parent) {\n      node.x = parent.x + k * node.x;\n      node.y = parent.y + k * node.y;\n    }\n  };\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-hierarchy/src/pack/siblings.js\":\n/*!********************************************************!*\\\n  !*** ./node_modules/d3-hierarchy/src/pack/siblings.js ***!\n  \\********************************************************/\n/*! exports provided: packEnclose, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"packEnclose\", function() { return packEnclose; });\n/* harmony import */ var _array_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../array.js */ \"./node_modules/d3-hierarchy/src/array.js\");\n/* harmony import */ var _enclose_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./enclose.js */ \"./node_modules/d3-hierarchy/src/pack/enclose.js\");\n\n\n\nfunction place(b, a, c) {\n  var dx = b.x - a.x, x, a2,\n      dy = b.y - a.y, y, b2,\n      d2 = dx * dx + dy * dy;\n  if (d2) {\n    a2 = a.r + c.r, a2 *= a2;\n    b2 = b.r + c.r, b2 *= b2;\n    if (a2 > b2) {\n      x = (d2 + b2 - a2) / (2 * d2);\n      y = Math.sqrt(Math.max(0, b2 / d2 - x * x));\n      c.x = b.x - x * dx - y * dy;\n      c.y = b.y - x * dy + y * dx;\n    } else {\n      x = (d2 + a2 - b2) / (2 * d2);\n      y = Math.sqrt(Math.max(0, a2 / d2 - x * x));\n      c.x = a.x + x * dx - y * dy;\n      c.y = a.y + x * dy + y * dx;\n    }\n  } else {\n    c.x = a.x + c.r;\n    c.y = a.y;\n  }\n}\n\nfunction intersects(a, b) {\n  var dr = a.r + b.r - 1e-6, dx = b.x - a.x, dy = b.y - a.y;\n  return dr > 0 && dr * dr > dx * dx + dy * dy;\n}\n\nfunction score(node) {\n  var a = node._,\n      b = node.next._,\n      ab = a.r + b.r,\n      dx = (a.x * b.r + b.x * a.r) / ab,\n      dy = (a.y * b.r + b.y * a.r) / ab;\n  return dx * dx + dy * dy;\n}\n\nfunction Node(circle) {\n  this._ = circle;\n  this.next = null;\n  this.previous = null;\n}\n\nfunction packEnclose(circles) {\n  if (!(n = (circles = Object(_array_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(circles)).length)) return 0;\n\n  var a, b, c, n, aa, ca, i, j, k, sj, sk;\n\n  // Place the first circle.\n  a = circles[0], a.x = 0, a.y = 0;\n  if (!(n > 1)) return a.r;\n\n  // Place the second circle.\n  b = circles[1], a.x = -b.r, b.x = a.r, b.y = 0;\n  if (!(n > 2)) return a.r + b.r;\n\n  // Place the third circle.\n  place(b, a, c = circles[2]);\n\n  // Initialize the front-chain using the first three circles a, b and c.\n  a = new Node(a), b = new Node(b), c = new Node(c);\n  a.next = c.previous = b;\n  b.next = a.previous = c;\n  c.next = b.previous = a;\n\n  // Attempt to place each remaining circle…\n  pack: for (i = 3; i < n; ++i) {\n    place(a._, b._, c = circles[i]), c = new Node(c);\n\n    // Find the closest intersecting circle on the front-chain, if any.\n    // “Closeness” is determined by linear distance along the front-chain.\n    // “Ahead” or “behind” is likewise determined by linear distance.\n    j = b.next, k = a.previous, sj = b._.r, sk = a._.r;\n    do {\n      if (sj <= sk) {\n        if (intersects(j._, c._)) {\n          b = j, a.next = b, b.previous = a, --i;\n          continue pack;\n        }\n        sj += j._.r, j = j.next;\n      } else {\n        if (intersects(k._, c._)) {\n          a = k, a.next = b, b.previous = a, --i;\n          continue pack;\n        }\n        sk += k._.r, k = k.previous;\n      }\n    } while (j !== k.next);\n\n    // Success! Insert the new circle c between a and b.\n    c.previous = a, c.next = b, a.next = b.previous = b = c;\n\n    // Compute the new closest circle pair to the centroid.\n    aa = score(a);\n    while ((c = c.next) !== b) {\n      if ((ca = score(c)) < aa) {\n        a = c, aa = ca;\n      }\n    }\n    b = a.next;\n  }\n\n  // Compute the enclosing circle of the front chain.\n  a = [b._], c = b; while ((c = c.next) !== b) a.push(c._); c = Object(_enclose_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(a);\n\n  // Translate the circles to put the enclosing circle around the origin.\n  for (i = 0; i < n; ++i) a = circles[i], a.x -= c.x, a.y -= c.y;\n\n  return c.r;\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(circles) {\n  packEnclose(circles);\n  return circles;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-hierarchy/src/partition.js\":\n/*!****************************************************!*\\\n  !*** ./node_modules/d3-hierarchy/src/partition.js ***!\n  \\****************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _treemap_round_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./treemap/round.js */ \"./node_modules/d3-hierarchy/src/treemap/round.js\");\n/* harmony import */ var _treemap_dice_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./treemap/dice.js */ \"./node_modules/d3-hierarchy/src/treemap/dice.js\");\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  var dx = 1,\n      dy = 1,\n      padding = 0,\n      round = false;\n\n  function partition(root) {\n    var n = root.height + 1;\n    root.x0 =\n    root.y0 = padding;\n    root.x1 = dx;\n    root.y1 = dy / n;\n    root.eachBefore(positionNode(dy, n));\n    if (round) root.eachBefore(_treemap_round_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]);\n    return root;\n  }\n\n  function positionNode(dy, n) {\n    return function(node) {\n      if (node.children) {\n        Object(_treemap_dice_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(node, node.x0, dy * (node.depth + 1) / n, node.x1, dy * (node.depth + 2) / n);\n      }\n      var x0 = node.x0,\n          y0 = node.y0,\n          x1 = node.x1 - padding,\n          y1 = node.y1 - padding;\n      if (x1 < x0) x0 = x1 = (x0 + x1) / 2;\n      if (y1 < y0) y0 = y1 = (y0 + y1) / 2;\n      node.x0 = x0;\n      node.y0 = y0;\n      node.x1 = x1;\n      node.y1 = y1;\n    };\n  }\n\n  partition.round = function(x) {\n    return arguments.length ? (round = !!x, partition) : round;\n  };\n\n  partition.size = function(x) {\n    return arguments.length ? (dx = +x[0], dy = +x[1], partition) : [dx, dy];\n  };\n\n  partition.padding = function(x) {\n    return arguments.length ? (padding = +x, partition) : padding;\n  };\n\n  return partition;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-hierarchy/src/stratify.js\":\n/*!***************************************************!*\\\n  !*** ./node_modules/d3-hierarchy/src/stratify.js ***!\n  \\***************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _accessors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./accessors.js */ \"./node_modules/d3-hierarchy/src/accessors.js\");\n/* harmony import */ var _hierarchy_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./hierarchy/index.js */ \"./node_modules/d3-hierarchy/src/hierarchy/index.js\");\n\n\n\nvar preroot = {depth: -1},\n    ambiguous = {};\n\nfunction defaultId(d) {\n  return d.id;\n}\n\nfunction defaultParentId(d) {\n  return d.parentId;\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  var id = defaultId,\n      parentId = defaultParentId;\n\n  function stratify(data) {\n    var nodes = Array.from(data),\n        n = nodes.length,\n        d,\n        i,\n        root,\n        parent,\n        node,\n        nodeId,\n        nodeKey,\n        nodeByKey = new Map;\n\n    for (i = 0; i < n; ++i) {\n      d = nodes[i], node = nodes[i] = new _hierarchy_index_js__WEBPACK_IMPORTED_MODULE_1__[\"Node\"](d);\n      if ((nodeId = id(d, i, data)) != null && (nodeId += \"\")) {\n        nodeKey = node.id = nodeId;\n        nodeByKey.set(nodeKey, nodeByKey.has(nodeKey) ? ambiguous : node);\n      }\n      if ((nodeId = parentId(d, i, data)) != null && (nodeId += \"\")) {\n        node.parent = nodeId;\n      }\n    }\n\n    for (i = 0; i < n; ++i) {\n      node = nodes[i];\n      if (nodeId = node.parent) {\n        parent = nodeByKey.get(nodeId);\n        if (!parent) throw new Error(\"missing: \" + nodeId);\n        if (parent === ambiguous) throw new Error(\"ambiguous: \" + nodeId);\n        if (parent.children) parent.children.push(node);\n        else parent.children = [node];\n        node.parent = parent;\n      } else {\n        if (root) throw new Error(\"multiple roots\");\n        root = node;\n      }\n    }\n\n    if (!root) throw new Error(\"no root\");\n    root.parent = preroot;\n    root.eachBefore(function(node) { node.depth = node.parent.depth + 1; --n; }).eachBefore(_hierarchy_index_js__WEBPACK_IMPORTED_MODULE_1__[\"computeHeight\"]);\n    root.parent = null;\n    if (n > 0) throw new Error(\"cycle\");\n\n    return root;\n  }\n\n  stratify.id = function(x) {\n    return arguments.length ? (id = Object(_accessors_js__WEBPACK_IMPORTED_MODULE_0__[\"required\"])(x), stratify) : id;\n  };\n\n  stratify.parentId = function(x) {\n    return arguments.length ? (parentId = Object(_accessors_js__WEBPACK_IMPORTED_MODULE_0__[\"required\"])(x), stratify) : parentId;\n  };\n\n  return stratify;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-hierarchy/src/tree.js\":\n/*!***********************************************!*\\\n  !*** ./node_modules/d3-hierarchy/src/tree.js ***!\n  \\***********************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _hierarchy_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./hierarchy/index.js */ \"./node_modules/d3-hierarchy/src/hierarchy/index.js\");\n\n\nfunction defaultSeparation(a, b) {\n  return a.parent === b.parent ? 1 : 2;\n}\n\n// function radialSeparation(a, b) {\n//   return (a.parent === b.parent ? 1 : 2) / a.depth;\n// }\n\n// This function is used to traverse the left contour of a subtree (or\n// subforest). It returns the successor of v on this contour. This successor is\n// either given by the leftmost child of v or by the thread of v. The function\n// returns null if and only if v is on the highest level of its subtree.\nfunction nextLeft(v) {\n  var children = v.children;\n  return children ? children[0] : v.t;\n}\n\n// This function works analogously to nextLeft.\nfunction nextRight(v) {\n  var children = v.children;\n  return children ? children[children.length - 1] : v.t;\n}\n\n// Shifts the current subtree rooted at w+. This is done by increasing\n// prelim(w+) and mod(w+) by shift.\nfunction moveSubtree(wm, wp, shift) {\n  var change = shift / (wp.i - wm.i);\n  wp.c -= change;\n  wp.s += shift;\n  wm.c += change;\n  wp.z += shift;\n  wp.m += shift;\n}\n\n// All other shifts, applied to the smaller subtrees between w- and w+, are\n// performed by this function. To prepare the shifts, we have to adjust\n// change(w+), shift(w+), and change(w-).\nfunction executeShifts(v) {\n  var shift = 0,\n      change = 0,\n      children = v.children,\n      i = children.length,\n      w;\n  while (--i >= 0) {\n    w = children[i];\n    w.z += shift;\n    w.m += shift;\n    shift += w.s + (change += w.c);\n  }\n}\n\n// If vi-’s ancestor is a sibling of v, returns vi-’s ancestor. Otherwise,\n// returns the specified (default) ancestor.\nfunction nextAncestor(vim, v, ancestor) {\n  return vim.a.parent === v.parent ? vim.a : ancestor;\n}\n\nfunction TreeNode(node, i) {\n  this._ = node;\n  this.parent = null;\n  this.children = null;\n  this.A = null; // default ancestor\n  this.a = this; // ancestor\n  this.z = 0; // prelim\n  this.m = 0; // mod\n  this.c = 0; // change\n  this.s = 0; // shift\n  this.t = null; // thread\n  this.i = i; // number\n}\n\nTreeNode.prototype = Object.create(_hierarchy_index_js__WEBPACK_IMPORTED_MODULE_0__[\"Node\"].prototype);\n\nfunction treeRoot(root) {\n  var tree = new TreeNode(root, 0),\n      node,\n      nodes = [tree],\n      child,\n      children,\n      i,\n      n;\n\n  while (node = nodes.pop()) {\n    if (children = node._.children) {\n      node.children = new Array(n = children.length);\n      for (i = n - 1; i >= 0; --i) {\n        nodes.push(child = node.children[i] = new TreeNode(children[i], i));\n        child.parent = node;\n      }\n    }\n  }\n\n  (tree.parent = new TreeNode(null, 0)).children = [tree];\n  return tree;\n}\n\n// Node-link tree diagram using the Reingold-Tilford \"tidy\" algorithm\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  var separation = defaultSeparation,\n      dx = 1,\n      dy = 1,\n      nodeSize = null;\n\n  function tree(root) {\n    var t = treeRoot(root);\n\n    // Compute the layout using Buchheim et al.’s algorithm.\n    t.eachAfter(firstWalk), t.parent.m = -t.z;\n    t.eachBefore(secondWalk);\n\n    // If a fixed node size is specified, scale x and y.\n    if (nodeSize) root.eachBefore(sizeNode);\n\n    // If a fixed tree size is specified, scale x and y based on the extent.\n    // Compute the left-most, right-most, and depth-most nodes for extents.\n    else {\n      var left = root,\n          right = root,\n          bottom = root;\n      root.eachBefore(function(node) {\n        if (node.x < left.x) left = node;\n        if (node.x > right.x) right = node;\n        if (node.depth > bottom.depth) bottom = node;\n      });\n      var s = left === right ? 1 : separation(left, right) / 2,\n          tx = s - left.x,\n          kx = dx / (right.x + s + tx),\n          ky = dy / (bottom.depth || 1);\n      root.eachBefore(function(node) {\n        node.x = (node.x + tx) * kx;\n        node.y = node.depth * ky;\n      });\n    }\n\n    return root;\n  }\n\n  // Computes a preliminary x-coordinate for v. Before that, FIRST WALK is\n  // applied recursively to the children of v, as well as the function\n  // APPORTION. After spacing out the children by calling EXECUTE SHIFTS, the\n  // node v is placed to the midpoint of its outermost children.\n  function firstWalk(v) {\n    var children = v.children,\n        siblings = v.parent.children,\n        w = v.i ? siblings[v.i - 1] : null;\n    if (children) {\n      executeShifts(v);\n      var midpoint = (children[0].z + children[children.length - 1].z) / 2;\n      if (w) {\n        v.z = w.z + separation(v._, w._);\n        v.m = v.z - midpoint;\n      } else {\n        v.z = midpoint;\n      }\n    } else if (w) {\n      v.z = w.z + separation(v._, w._);\n    }\n    v.parent.A = apportion(v, w, v.parent.A || siblings[0]);\n  }\n\n  // Computes all real x-coordinates by summing up the modifiers recursively.\n  function secondWalk(v) {\n    v._.x = v.z + v.parent.m;\n    v.m += v.parent.m;\n  }\n\n  // The core of the algorithm. Here, a new subtree is combined with the\n  // previous subtrees. Threads are used to traverse the inside and outside\n  // contours of the left and right subtree up to the highest common level. The\n  // vertices used for the traversals are vi+, vi-, vo-, and vo+, where the\n  // superscript o means outside and i means inside, the subscript - means left\n  // subtree and + means right subtree. For summing up the modifiers along the\n  // contour, we use respective variables si+, si-, so-, and so+. Whenever two\n  // nodes of the inside contours conflict, we compute the left one of the\n  // greatest uncommon ancestors using the function ANCESTOR and call MOVE\n  // SUBTREE to shift the subtree and prepare the shifts of smaller subtrees.\n  // Finally, we add a new thread (if necessary).\n  function apportion(v, w, ancestor) {\n    if (w) {\n      var vip = v,\n          vop = v,\n          vim = w,\n          vom = vip.parent.children[0],\n          sip = vip.m,\n          sop = vop.m,\n          sim = vim.m,\n          som = vom.m,\n          shift;\n      while (vim = nextRight(vim), vip = nextLeft(vip), vim && vip) {\n        vom = nextLeft(vom);\n        vop = nextRight(vop);\n        vop.a = v;\n        shift = vim.z + sim - vip.z - sip + separation(vim._, vip._);\n        if (shift > 0) {\n          moveSubtree(nextAncestor(vim, v, ancestor), v, shift);\n          sip += shift;\n          sop += shift;\n        }\n        sim += vim.m;\n        sip += vip.m;\n        som += vom.m;\n        sop += vop.m;\n      }\n      if (vim && !nextRight(vop)) {\n        vop.t = vim;\n        vop.m += sim - sop;\n      }\n      if (vip && !nextLeft(vom)) {\n        vom.t = vip;\n        vom.m += sip - som;\n        ancestor = v;\n      }\n    }\n    return ancestor;\n  }\n\n  function sizeNode(node) {\n    node.x *= dx;\n    node.y = node.depth * dy;\n  }\n\n  tree.separation = function(x) {\n    return arguments.length ? (separation = x, tree) : separation;\n  };\n\n  tree.size = function(x) {\n    return arguments.length ? (nodeSize = false, dx = +x[0], dy = +x[1], tree) : (nodeSize ? null : [dx, dy]);\n  };\n\n  tree.nodeSize = function(x) {\n    return arguments.length ? (nodeSize = true, dx = +x[0], dy = +x[1], tree) : (nodeSize ? [dx, dy] : null);\n  };\n\n  return tree;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-hierarchy/src/treemap/binary.js\":\n/*!*********************************************************!*\\\n  !*** ./node_modules/d3-hierarchy/src/treemap/binary.js ***!\n  \\*********************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(parent, x0, y0, x1, y1) {\n  var nodes = parent.children,\n      i, n = nodes.length,\n      sum, sums = new Array(n + 1);\n\n  for (sums[0] = sum = i = 0; i < n; ++i) {\n    sums[i + 1] = sum += nodes[i].value;\n  }\n\n  partition(0, n, parent.value, x0, y0, x1, y1);\n\n  function partition(i, j, value, x0, y0, x1, y1) {\n    if (i >= j - 1) {\n      var node = nodes[i];\n      node.x0 = x0, node.y0 = y0;\n      node.x1 = x1, node.y1 = y1;\n      return;\n    }\n\n    var valueOffset = sums[i],\n        valueTarget = (value / 2) + valueOffset,\n        k = i + 1,\n        hi = j - 1;\n\n    while (k < hi) {\n      var mid = k + hi >>> 1;\n      if (sums[mid] < valueTarget) k = mid + 1;\n      else hi = mid;\n    }\n\n    if ((valueTarget - sums[k - 1]) < (sums[k] - valueTarget) && i + 1 < k) --k;\n\n    var valueLeft = sums[k] - valueOffset,\n        valueRight = value - valueLeft;\n\n    if ((x1 - x0) > (y1 - y0)) {\n      var xk = value ? (x0 * valueRight + x1 * valueLeft) / value : x1;\n      partition(i, k, valueLeft, x0, y0, xk, y1);\n      partition(k, j, valueRight, xk, y0, x1, y1);\n    } else {\n      var yk = value ? (y0 * valueRight + y1 * valueLeft) / value : y1;\n      partition(i, k, valueLeft, x0, y0, x1, yk);\n      partition(k, j, valueRight, x0, yk, x1, y1);\n    }\n  }\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-hierarchy/src/treemap/dice.js\":\n/*!*******************************************************!*\\\n  !*** ./node_modules/d3-hierarchy/src/treemap/dice.js ***!\n  \\*******************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(parent, x0, y0, x1, y1) {\n  var nodes = parent.children,\n      node,\n      i = -1,\n      n = nodes.length,\n      k = parent.value && (x1 - x0) / parent.value;\n\n  while (++i < n) {\n    node = nodes[i], node.y0 = y0, node.y1 = y1;\n    node.x0 = x0, node.x1 = x0 += node.value * k;\n  }\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-hierarchy/src/treemap/index.js\":\n/*!********************************************************!*\\\n  !*** ./node_modules/d3-hierarchy/src/treemap/index.js ***!\n  \\********************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _round_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./round.js */ \"./node_modules/d3-hierarchy/src/treemap/round.js\");\n/* harmony import */ var _squarify_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./squarify.js */ \"./node_modules/d3-hierarchy/src/treemap/squarify.js\");\n/* harmony import */ var _accessors_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../accessors.js */ \"./node_modules/d3-hierarchy/src/accessors.js\");\n/* harmony import */ var _constant_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../constant.js */ \"./node_modules/d3-hierarchy/src/constant.js\");\n\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  var tile = _squarify_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"],\n      round = false,\n      dx = 1,\n      dy = 1,\n      paddingStack = [0],\n      paddingInner = _constant_js__WEBPACK_IMPORTED_MODULE_3__[\"constantZero\"],\n      paddingTop = _constant_js__WEBPACK_IMPORTED_MODULE_3__[\"constantZero\"],\n      paddingRight = _constant_js__WEBPACK_IMPORTED_MODULE_3__[\"constantZero\"],\n      paddingBottom = _constant_js__WEBPACK_IMPORTED_MODULE_3__[\"constantZero\"],\n      paddingLeft = _constant_js__WEBPACK_IMPORTED_MODULE_3__[\"constantZero\"];\n\n  function treemap(root) {\n    root.x0 =\n    root.y0 = 0;\n    root.x1 = dx;\n    root.y1 = dy;\n    root.eachBefore(positionNode);\n    paddingStack = [0];\n    if (round) root.eachBefore(_round_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]);\n    return root;\n  }\n\n  function positionNode(node) {\n    var p = paddingStack[node.depth],\n        x0 = node.x0 + p,\n        y0 = node.y0 + p,\n        x1 = node.x1 - p,\n        y1 = node.y1 - p;\n    if (x1 < x0) x0 = x1 = (x0 + x1) / 2;\n    if (y1 < y0) y0 = y1 = (y0 + y1) / 2;\n    node.x0 = x0;\n    node.y0 = y0;\n    node.x1 = x1;\n    node.y1 = y1;\n    if (node.children) {\n      p = paddingStack[node.depth + 1] = paddingInner(node) / 2;\n      x0 += paddingLeft(node) - p;\n      y0 += paddingTop(node) - p;\n      x1 -= paddingRight(node) - p;\n      y1 -= paddingBottom(node) - p;\n      if (x1 < x0) x0 = x1 = (x0 + x1) / 2;\n      if (y1 < y0) y0 = y1 = (y0 + y1) / 2;\n      tile(node, x0, y0, x1, y1);\n    }\n  }\n\n  treemap.round = function(x) {\n    return arguments.length ? (round = !!x, treemap) : round;\n  };\n\n  treemap.size = function(x) {\n    return arguments.length ? (dx = +x[0], dy = +x[1], treemap) : [dx, dy];\n  };\n\n  treemap.tile = function(x) {\n    return arguments.length ? (tile = Object(_accessors_js__WEBPACK_IMPORTED_MODULE_2__[\"required\"])(x), treemap) : tile;\n  };\n\n  treemap.padding = function(x) {\n    return arguments.length ? treemap.paddingInner(x).paddingOuter(x) : treemap.paddingInner();\n  };\n\n  treemap.paddingInner = function(x) {\n    return arguments.length ? (paddingInner = typeof x === \"function\" ? x : Object(_constant_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(+x), treemap) : paddingInner;\n  };\n\n  treemap.paddingOuter = function(x) {\n    return arguments.length ? treemap.paddingTop(x).paddingRight(x).paddingBottom(x).paddingLeft(x) : treemap.paddingTop();\n  };\n\n  treemap.paddingTop = function(x) {\n    return arguments.length ? (paddingTop = typeof x === \"function\" ? x : Object(_constant_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(+x), treemap) : paddingTop;\n  };\n\n  treemap.paddingRight = function(x) {\n    return arguments.length ? (paddingRight = typeof x === \"function\" ? x : Object(_constant_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(+x), treemap) : paddingRight;\n  };\n\n  treemap.paddingBottom = function(x) {\n    return arguments.length ? (paddingBottom = typeof x === \"function\" ? x : Object(_constant_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(+x), treemap) : paddingBottom;\n  };\n\n  treemap.paddingLeft = function(x) {\n    return arguments.length ? (paddingLeft = typeof x === \"function\" ? x : Object(_constant_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(+x), treemap) : paddingLeft;\n  };\n\n  return treemap;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-hierarchy/src/treemap/resquarify.js\":\n/*!*************************************************************!*\\\n  !*** ./node_modules/d3-hierarchy/src/treemap/resquarify.js ***!\n  \\*************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _dice_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./dice.js */ \"./node_modules/d3-hierarchy/src/treemap/dice.js\");\n/* harmony import */ var _slice_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./slice.js */ \"./node_modules/d3-hierarchy/src/treemap/slice.js\");\n/* harmony import */ var _squarify_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./squarify.js */ \"./node_modules/d3-hierarchy/src/treemap/squarify.js\");\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ((function custom(ratio) {\n\n  function resquarify(parent, x0, y0, x1, y1) {\n    if ((rows = parent._squarify) && (rows.ratio === ratio)) {\n      var rows,\n          row,\n          nodes,\n          i,\n          j = -1,\n          n,\n          m = rows.length,\n          value = parent.value;\n\n      while (++j < m) {\n        row = rows[j], nodes = row.children;\n        for (i = row.value = 0, n = nodes.length; i < n; ++i) row.value += nodes[i].value;\n        if (row.dice) Object(_dice_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(row, x0, y0, x1, value ? y0 += (y1 - y0) * row.value / value : y1);\n        else Object(_slice_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(row, x0, y0, value ? x0 += (x1 - x0) * row.value / value : x1, y1);\n        value -= row.value;\n      }\n    } else {\n      parent._squarify = rows = Object(_squarify_js__WEBPACK_IMPORTED_MODULE_2__[\"squarifyRatio\"])(ratio, parent, x0, y0, x1, y1);\n      rows.ratio = ratio;\n    }\n  }\n\n  resquarify.ratio = function(x) {\n    return custom((x = +x) > 1 ? x : 1);\n  };\n\n  return resquarify;\n})(_squarify_js__WEBPACK_IMPORTED_MODULE_2__[\"phi\"]));\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-hierarchy/src/treemap/round.js\":\n/*!********************************************************!*\\\n  !*** ./node_modules/d3-hierarchy/src/treemap/round.js ***!\n  \\********************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(node) {\n  node.x0 = Math.round(node.x0);\n  node.y0 = Math.round(node.y0);\n  node.x1 = Math.round(node.x1);\n  node.y1 = Math.round(node.y1);\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-hierarchy/src/treemap/slice.js\":\n/*!********************************************************!*\\\n  !*** ./node_modules/d3-hierarchy/src/treemap/slice.js ***!\n  \\********************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(parent, x0, y0, x1, y1) {\n  var nodes = parent.children,\n      node,\n      i = -1,\n      n = nodes.length,\n      k = parent.value && (y1 - y0) / parent.value;\n\n  while (++i < n) {\n    node = nodes[i], node.x0 = x0, node.x1 = x1;\n    node.y0 = y0, node.y1 = y0 += node.value * k;\n  }\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-hierarchy/src/treemap/sliceDice.js\":\n/*!************************************************************!*\\\n  !*** ./node_modules/d3-hierarchy/src/treemap/sliceDice.js ***!\n  \\************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _dice_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./dice.js */ \"./node_modules/d3-hierarchy/src/treemap/dice.js\");\n/* harmony import */ var _slice_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./slice.js */ \"./node_modules/d3-hierarchy/src/treemap/slice.js\");\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(parent, x0, y0, x1, y1) {\n  (parent.depth & 1 ? _slice_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"] : _dice_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(parent, x0, y0, x1, y1);\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-hierarchy/src/treemap/squarify.js\":\n/*!***********************************************************!*\\\n  !*** ./node_modules/d3-hierarchy/src/treemap/squarify.js ***!\n  \\***********************************************************/\n/*! exports provided: phi, squarifyRatio, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"phi\", function() { return phi; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"squarifyRatio\", function() { return squarifyRatio; });\n/* harmony import */ var _dice_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./dice.js */ \"./node_modules/d3-hierarchy/src/treemap/dice.js\");\n/* harmony import */ var _slice_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./slice.js */ \"./node_modules/d3-hierarchy/src/treemap/slice.js\");\n\n\n\nvar phi = (1 + Math.sqrt(5)) / 2;\n\nfunction squarifyRatio(ratio, parent, x0, y0, x1, y1) {\n  var rows = [],\n      nodes = parent.children,\n      row,\n      nodeValue,\n      i0 = 0,\n      i1 = 0,\n      n = nodes.length,\n      dx, dy,\n      value = parent.value,\n      sumValue,\n      minValue,\n      maxValue,\n      newRatio,\n      minRatio,\n      alpha,\n      beta;\n\n  while (i0 < n) {\n    dx = x1 - x0, dy = y1 - y0;\n\n    // Find the next non-empty node.\n    do sumValue = nodes[i1++].value; while (!sumValue && i1 < n);\n    minValue = maxValue = sumValue;\n    alpha = Math.max(dy / dx, dx / dy) / (value * ratio);\n    beta = sumValue * sumValue * alpha;\n    minRatio = Math.max(maxValue / beta, beta / minValue);\n\n    // Keep adding nodes while the aspect ratio maintains or improves.\n    for (; i1 < n; ++i1) {\n      sumValue += nodeValue = nodes[i1].value;\n      if (nodeValue < minValue) minValue = nodeValue;\n      if (nodeValue > maxValue) maxValue = nodeValue;\n      beta = sumValue * sumValue * alpha;\n      newRatio = Math.max(maxValue / beta, beta / minValue);\n      if (newRatio > minRatio) { sumValue -= nodeValue; break; }\n      minRatio = newRatio;\n    }\n\n    // Position and record the row orientation.\n    rows.push(row = {value: sumValue, dice: dx < dy, children: nodes.slice(i0, i1)});\n    if (row.dice) Object(_dice_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(row, x0, y0, x1, value ? y0 += dy * sumValue / value : y1);\n    else Object(_slice_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(row, x0, y0, value ? x0 += dx * sumValue / value : x1, y1);\n    value -= sumValue, i0 = i1;\n  }\n\n  return rows;\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ((function custom(ratio) {\n\n  function squarify(parent, x0, y0, x1, y1) {\n    squarifyRatio(ratio, parent, x0, y0, x1, y1);\n  }\n\n  squarify.ratio = function(x) {\n    return custom((x = +x) > 1 ? x : 1);\n  };\n\n  return squarify;\n})(phi));\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-interpolate/src/array.js\":\n/*!**************************************************!*\\\n  !*** ./node_modules/d3-interpolate/src/array.js ***!\n  \\**************************************************/\n/*! exports provided: default, genericArray */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"genericArray\", function() { return genericArray; });\n/* harmony import */ var _value_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./value.js */ \"./node_modules/d3-interpolate/src/value.js\");\n/* harmony import */ var _numberArray_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./numberArray.js */ \"./node_modules/d3-interpolate/src/numberArray.js\");\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(a, b) {\n  return (Object(_numberArray_js__WEBPACK_IMPORTED_MODULE_1__[\"isNumberArray\"])(b) ? _numberArray_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"] : genericArray)(a, b);\n});\n\nfunction genericArray(a, b) {\n  var nb = b ? b.length : 0,\n      na = a ? Math.min(nb, a.length) : 0,\n      x = new Array(na),\n      c = new Array(nb),\n      i;\n\n  for (i = 0; i < na; ++i) x[i] = Object(_value_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(a[i], b[i]);\n  for (; i < nb; ++i) c[i] = b[i];\n\n  return function(t) {\n    for (i = 0; i < na; ++i) c[i] = x[i](t);\n    return c;\n  };\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-interpolate/src/basis.js\":\n/*!**************************************************!*\\\n  !*** ./node_modules/d3-interpolate/src/basis.js ***!\n  \\**************************************************/\n/*! exports provided: basis, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"basis\", function() { return basis; });\nfunction basis(t1, v0, v1, v2, v3) {\n  var t2 = t1 * t1, t3 = t2 * t1;\n  return ((1 - 3 * t1 + 3 * t2 - t3) * v0\n      + (4 - 6 * t2 + 3 * t3) * v1\n      + (1 + 3 * t1 + 3 * t2 - 3 * t3) * v2\n      + t3 * v3) / 6;\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(values) {\n  var n = values.length - 1;\n  return function(t) {\n    var i = t <= 0 ? (t = 0) : t >= 1 ? (t = 1, n - 1) : Math.floor(t * n),\n        v1 = values[i],\n        v2 = values[i + 1],\n        v0 = i > 0 ? values[i - 1] : 2 * v1 - v2,\n        v3 = i < n - 1 ? values[i + 2] : 2 * v2 - v1;\n    return basis((t - i / n) * n, v0, v1, v2, v3);\n  };\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-interpolate/src/basisClosed.js\":\n/*!********************************************************!*\\\n  !*** ./node_modules/d3-interpolate/src/basisClosed.js ***!\n  \\********************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _basis_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./basis.js */ \"./node_modules/d3-interpolate/src/basis.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(values) {\n  var n = values.length;\n  return function(t) {\n    var i = Math.floor(((t %= 1) < 0 ? ++t : t) * n),\n        v0 = values[(i + n - 1) % n],\n        v1 = values[i % n],\n        v2 = values[(i + 1) % n],\n        v3 = values[(i + 2) % n];\n    return Object(_basis_js__WEBPACK_IMPORTED_MODULE_0__[\"basis\"])((t - i / n) * n, v0, v1, v2, v3);\n  };\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-interpolate/src/color.js\":\n/*!**************************************************!*\\\n  !*** ./node_modules/d3-interpolate/src/color.js ***!\n  \\**************************************************/\n/*! exports provided: hue, gamma, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"hue\", function() { return hue; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"gamma\", function() { return gamma; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return nogamma; });\n/* harmony import */ var _constant_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./constant.js */ \"./node_modules/d3-interpolate/src/constant.js\");\n\n\nfunction linear(a, d) {\n  return function(t) {\n    return a + t * d;\n  };\n}\n\nfunction exponential(a, b, y) {\n  return a = Math.pow(a, y), b = Math.pow(b, y) - a, y = 1 / y, function(t) {\n    return Math.pow(a + t * b, y);\n  };\n}\n\nfunction hue(a, b) {\n  var d = b - a;\n  return d ? linear(a, d > 180 || d < -180 ? d - 360 * Math.round(d / 360) : d) : Object(_constant_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(isNaN(a) ? b : a);\n}\n\nfunction gamma(y) {\n  return (y = +y) === 1 ? nogamma : function(a, b) {\n    return b - a ? exponential(a, b, y) : Object(_constant_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(isNaN(a) ? b : a);\n  };\n}\n\nfunction nogamma(a, b) {\n  var d = b - a;\n  return d ? linear(a, d) : Object(_constant_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(isNaN(a) ? b : a);\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-interpolate/src/constant.js\":\n/*!*****************************************************!*\\\n  !*** ./node_modules/d3-interpolate/src/constant.js ***!\n  \\*****************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(x) {\n  return function() {\n    return x;\n  };\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-interpolate/src/cubehelix.js\":\n/*!******************************************************!*\\\n  !*** ./node_modules/d3-interpolate/src/cubehelix.js ***!\n  \\******************************************************/\n/*! exports provided: default, cubehelixLong */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"cubehelixLong\", function() { return cubehelixLong; });\n/* harmony import */ var d3_color__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-color */ \"./node_modules/d3-color/src/index.js\");\n/* harmony import */ var _color_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./color.js */ \"./node_modules/d3-interpolate/src/color.js\");\n\n\n\nfunction cubehelix(hue) {\n  return (function cubehelixGamma(y) {\n    y = +y;\n\n    function cubehelix(start, end) {\n      var h = hue((start = Object(d3_color__WEBPACK_IMPORTED_MODULE_0__[\"cubehelix\"])(start)).h, (end = Object(d3_color__WEBPACK_IMPORTED_MODULE_0__[\"cubehelix\"])(end)).h),\n          s = Object(_color_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(start.s, end.s),\n          l = Object(_color_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(start.l, end.l),\n          opacity = Object(_color_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(start.opacity, end.opacity);\n      return function(t) {\n        start.h = h(t);\n        start.s = s(t);\n        start.l = l(Math.pow(t, y));\n        start.opacity = opacity(t);\n        return start + \"\";\n      };\n    }\n\n    cubehelix.gamma = cubehelixGamma;\n\n    return cubehelix;\n  })(1);\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (cubehelix(_color_js__WEBPACK_IMPORTED_MODULE_1__[\"hue\"]));\nvar cubehelixLong = cubehelix(_color_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"]);\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-interpolate/src/date.js\":\n/*!*************************************************!*\\\n  !*** ./node_modules/d3-interpolate/src/date.js ***!\n  \\*************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(a, b) {\n  var d = new Date;\n  return a = +a, b = +b, function(t) {\n    return d.setTime(a * (1 - t) + b * t), d;\n  };\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-interpolate/src/discrete.js\":\n/*!*****************************************************!*\\\n  !*** ./node_modules/d3-interpolate/src/discrete.js ***!\n  \\*****************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(range) {\n  var n = range.length;\n  return function(t) {\n    return range[Math.max(0, Math.min(n - 1, Math.floor(t * n)))];\n  };\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-interpolate/src/hcl.js\":\n/*!************************************************!*\\\n  !*** ./node_modules/d3-interpolate/src/hcl.js ***!\n  \\************************************************/\n/*! exports provided: default, hclLong */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"hclLong\", function() { return hclLong; });\n/* harmony import */ var d3_color__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-color */ \"./node_modules/d3-color/src/index.js\");\n/* harmony import */ var _color_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./color.js */ \"./node_modules/d3-interpolate/src/color.js\");\n\n\n\nfunction hcl(hue) {\n  return function(start, end) {\n    var h = hue((start = Object(d3_color__WEBPACK_IMPORTED_MODULE_0__[\"hcl\"])(start)).h, (end = Object(d3_color__WEBPACK_IMPORTED_MODULE_0__[\"hcl\"])(end)).h),\n        c = Object(_color_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(start.c, end.c),\n        l = Object(_color_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(start.l, end.l),\n        opacity = Object(_color_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(start.opacity, end.opacity);\n    return function(t) {\n      start.h = h(t);\n      start.c = c(t);\n      start.l = l(t);\n      start.opacity = opacity(t);\n      return start + \"\";\n    };\n  }\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (hcl(_color_js__WEBPACK_IMPORTED_MODULE_1__[\"hue\"]));\nvar hclLong = hcl(_color_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"]);\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-interpolate/src/hsl.js\":\n/*!************************************************!*\\\n  !*** ./node_modules/d3-interpolate/src/hsl.js ***!\n  \\************************************************/\n/*! exports provided: default, hslLong */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"hslLong\", function() { return hslLong; });\n/* harmony import */ var d3_color__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-color */ \"./node_modules/d3-color/src/index.js\");\n/* harmony import */ var _color_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./color.js */ \"./node_modules/d3-interpolate/src/color.js\");\n\n\n\nfunction hsl(hue) {\n  return function(start, end) {\n    var h = hue((start = Object(d3_color__WEBPACK_IMPORTED_MODULE_0__[\"hsl\"])(start)).h, (end = Object(d3_color__WEBPACK_IMPORTED_MODULE_0__[\"hsl\"])(end)).h),\n        s = Object(_color_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(start.s, end.s),\n        l = Object(_color_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(start.l, end.l),\n        opacity = Object(_color_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(start.opacity, end.opacity);\n    return function(t) {\n      start.h = h(t);\n      start.s = s(t);\n      start.l = l(t);\n      start.opacity = opacity(t);\n      return start + \"\";\n    };\n  }\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (hsl(_color_js__WEBPACK_IMPORTED_MODULE_1__[\"hue\"]));\nvar hslLong = hsl(_color_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"]);\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-interpolate/src/hue.js\":\n/*!************************************************!*\\\n  !*** ./node_modules/d3-interpolate/src/hue.js ***!\n  \\************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _color_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./color.js */ \"./node_modules/d3-interpolate/src/color.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(a, b) {\n  var i = Object(_color_js__WEBPACK_IMPORTED_MODULE_0__[\"hue\"])(+a, +b);\n  return function(t) {\n    var x = i(t);\n    return x - 360 * Math.floor(x / 360);\n  };\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-interpolate/src/index.js\":\n/*!**************************************************!*\\\n  !*** ./node_modules/d3-interpolate/src/index.js ***!\n  \\**************************************************/\n/*! exports provided: interpolate, interpolateArray, interpolateBasis, interpolateBasisClosed, interpolateDate, interpolateDiscrete, interpolateHue, interpolateNumber, interpolateNumberArray, interpolateObject, interpolateRound, interpolateString, interpolateTransformCss, interpolateTransformSvg, interpolateZoom, interpolateRgb, interpolateRgbBasis, interpolateRgbBasisClosed, interpolateHsl, interpolateHslLong, interpolateLab, interpolateHcl, interpolateHclLong, interpolateCubehelix, interpolateCubehelixLong, piecewise, quantize */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _value_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./value.js */ \"./node_modules/d3-interpolate/src/value.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolate\", function() { return _value_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n/* harmony import */ var _array_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./array.js */ \"./node_modules/d3-interpolate/src/array.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateArray\", function() { return _array_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"]; });\n\n/* harmony import */ var _basis_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./basis.js */ \"./node_modules/d3-interpolate/src/basis.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateBasis\", function() { return _basis_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"]; });\n\n/* harmony import */ var _basisClosed_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./basisClosed.js */ \"./node_modules/d3-interpolate/src/basisClosed.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateBasisClosed\", function() { return _basisClosed_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"]; });\n\n/* harmony import */ var _date_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./date.js */ \"./node_modules/d3-interpolate/src/date.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateDate\", function() { return _date_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"]; });\n\n/* harmony import */ var _discrete_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./discrete.js */ \"./node_modules/d3-interpolate/src/discrete.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateDiscrete\", function() { return _discrete_js__WEBPACK_IMPORTED_MODULE_5__[\"default\"]; });\n\n/* harmony import */ var _hue_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./hue.js */ \"./node_modules/d3-interpolate/src/hue.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateHue\", function() { return _hue_js__WEBPACK_IMPORTED_MODULE_6__[\"default\"]; });\n\n/* harmony import */ var _number_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./number.js */ \"./node_modules/d3-interpolate/src/number.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateNumber\", function() { return _number_js__WEBPACK_IMPORTED_MODULE_7__[\"default\"]; });\n\n/* harmony import */ var _numberArray_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./numberArray.js */ \"./node_modules/d3-interpolate/src/numberArray.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateNumberArray\", function() { return _numberArray_js__WEBPACK_IMPORTED_MODULE_8__[\"default\"]; });\n\n/* harmony import */ var _object_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./object.js */ \"./node_modules/d3-interpolate/src/object.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateObject\", function() { return _object_js__WEBPACK_IMPORTED_MODULE_9__[\"default\"]; });\n\n/* harmony import */ var _round_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./round.js */ \"./node_modules/d3-interpolate/src/round.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateRound\", function() { return _round_js__WEBPACK_IMPORTED_MODULE_10__[\"default\"]; });\n\n/* harmony import */ var _string_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./string.js */ \"./node_modules/d3-interpolate/src/string.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateString\", function() { return _string_js__WEBPACK_IMPORTED_MODULE_11__[\"default\"]; });\n\n/* harmony import */ var _transform_index_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./transform/index.js */ \"./node_modules/d3-interpolate/src/transform/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateTransformCss\", function() { return _transform_index_js__WEBPACK_IMPORTED_MODULE_12__[\"interpolateTransformCss\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateTransformSvg\", function() { return _transform_index_js__WEBPACK_IMPORTED_MODULE_12__[\"interpolateTransformSvg\"]; });\n\n/* harmony import */ var _zoom_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./zoom.js */ \"./node_modules/d3-interpolate/src/zoom.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateZoom\", function() { return _zoom_js__WEBPACK_IMPORTED_MODULE_13__[\"default\"]; });\n\n/* harmony import */ var _rgb_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./rgb.js */ \"./node_modules/d3-interpolate/src/rgb.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateRgb\", function() { return _rgb_js__WEBPACK_IMPORTED_MODULE_14__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateRgbBasis\", function() { return _rgb_js__WEBPACK_IMPORTED_MODULE_14__[\"rgbBasis\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateRgbBasisClosed\", function() { return _rgb_js__WEBPACK_IMPORTED_MODULE_14__[\"rgbBasisClosed\"]; });\n\n/* harmony import */ var _hsl_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./hsl.js */ \"./node_modules/d3-interpolate/src/hsl.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateHsl\", function() { return _hsl_js__WEBPACK_IMPORTED_MODULE_15__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateHslLong\", function() { return _hsl_js__WEBPACK_IMPORTED_MODULE_15__[\"hslLong\"]; });\n\n/* harmony import */ var _lab_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./lab.js */ \"./node_modules/d3-interpolate/src/lab.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateLab\", function() { return _lab_js__WEBPACK_IMPORTED_MODULE_16__[\"default\"]; });\n\n/* harmony import */ var _hcl_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./hcl.js */ \"./node_modules/d3-interpolate/src/hcl.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateHcl\", function() { return _hcl_js__WEBPACK_IMPORTED_MODULE_17__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateHclLong\", function() { return _hcl_js__WEBPACK_IMPORTED_MODULE_17__[\"hclLong\"]; });\n\n/* harmony import */ var _cubehelix_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./cubehelix.js */ \"./node_modules/d3-interpolate/src/cubehelix.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateCubehelix\", function() { return _cubehelix_js__WEBPACK_IMPORTED_MODULE_18__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateCubehelixLong\", function() { return _cubehelix_js__WEBPACK_IMPORTED_MODULE_18__[\"cubehelixLong\"]; });\n\n/* harmony import */ var _piecewise_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./piecewise.js */ \"./node_modules/d3-interpolate/src/piecewise.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"piecewise\", function() { return _piecewise_js__WEBPACK_IMPORTED_MODULE_19__[\"default\"]; });\n\n/* harmony import */ var _quantize_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./quantize.js */ \"./node_modules/d3-interpolate/src/quantize.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"quantize\", function() { return _quantize_js__WEBPACK_IMPORTED_MODULE_20__[\"default\"]; });\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-interpolate/src/lab.js\":\n/*!************************************************!*\\\n  !*** ./node_modules/d3-interpolate/src/lab.js ***!\n  \\************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return lab; });\n/* harmony import */ var d3_color__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-color */ \"./node_modules/d3-color/src/index.js\");\n/* harmony import */ var _color_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./color.js */ \"./node_modules/d3-interpolate/src/color.js\");\n\n\n\nfunction lab(start, end) {\n  var l = Object(_color_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])((start = Object(d3_color__WEBPACK_IMPORTED_MODULE_0__[\"lab\"])(start)).l, (end = Object(d3_color__WEBPACK_IMPORTED_MODULE_0__[\"lab\"])(end)).l),\n      a = Object(_color_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(start.a, end.a),\n      b = Object(_color_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(start.b, end.b),\n      opacity = Object(_color_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(start.opacity, end.opacity);\n  return function(t) {\n    start.l = l(t);\n    start.a = a(t);\n    start.b = b(t);\n    start.opacity = opacity(t);\n    return start + \"\";\n  };\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-interpolate/src/number.js\":\n/*!***************************************************!*\\\n  !*** ./node_modules/d3-interpolate/src/number.js ***!\n  \\***************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(a, b) {\n  return a = +a, b = +b, function(t) {\n    return a * (1 - t) + b * t;\n  };\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-interpolate/src/numberArray.js\":\n/*!********************************************************!*\\\n  !*** ./node_modules/d3-interpolate/src/numberArray.js ***!\n  \\********************************************************/\n/*! exports provided: default, isNumberArray */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"isNumberArray\", function() { return isNumberArray; });\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(a, b) {\n  if (!b) b = [];\n  var n = a ? Math.min(b.length, a.length) : 0,\n      c = b.slice(),\n      i;\n  return function(t) {\n    for (i = 0; i < n; ++i) c[i] = a[i] * (1 - t) + b[i] * t;\n    return c;\n  };\n});\n\nfunction isNumberArray(x) {\n  return ArrayBuffer.isView(x) && !(x instanceof DataView);\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-interpolate/src/object.js\":\n/*!***************************************************!*\\\n  !*** ./node_modules/d3-interpolate/src/object.js ***!\n  \\***************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _value_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./value.js */ \"./node_modules/d3-interpolate/src/value.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(a, b) {\n  var i = {},\n      c = {},\n      k;\n\n  if (a === null || typeof a !== \"object\") a = {};\n  if (b === null || typeof b !== \"object\") b = {};\n\n  for (k in b) {\n    if (k in a) {\n      i[k] = Object(_value_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(a[k], b[k]);\n    } else {\n      c[k] = b[k];\n    }\n  }\n\n  return function(t) {\n    for (k in i) c[k] = i[k](t);\n    return c;\n  };\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-interpolate/src/piecewise.js\":\n/*!******************************************************!*\\\n  !*** ./node_modules/d3-interpolate/src/piecewise.js ***!\n  \\******************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return piecewise; });\nfunction piecewise(interpolate, values) {\n  var i = 0, n = values.length - 1, v = values[0], I = new Array(n < 0 ? 0 : n);\n  while (i < n) I[i] = interpolate(v, v = values[++i]);\n  return function(t) {\n    var i = Math.max(0, Math.min(n - 1, Math.floor(t *= n)));\n    return I[i](t - i);\n  };\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-interpolate/src/quantize.js\":\n/*!*****************************************************!*\\\n  !*** ./node_modules/d3-interpolate/src/quantize.js ***!\n  \\*****************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(interpolator, n) {\n  var samples = new Array(n);\n  for (var i = 0; i < n; ++i) samples[i] = interpolator(i / (n - 1));\n  return samples;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-interpolate/src/rgb.js\":\n/*!************************************************!*\\\n  !*** ./node_modules/d3-interpolate/src/rgb.js ***!\n  \\************************************************/\n/*! exports provided: default, rgbBasis, rgbBasisClosed */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"rgbBasis\", function() { return rgbBasis; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"rgbBasisClosed\", function() { return rgbBasisClosed; });\n/* harmony import */ var d3_color__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-color */ \"./node_modules/d3-color/src/index.js\");\n/* harmony import */ var _basis_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./basis.js */ \"./node_modules/d3-interpolate/src/basis.js\");\n/* harmony import */ var _basisClosed_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./basisClosed.js */ \"./node_modules/d3-interpolate/src/basisClosed.js\");\n/* harmony import */ var _color_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./color.js */ \"./node_modules/d3-interpolate/src/color.js\");\n\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ((function rgbGamma(y) {\n  var color = Object(_color_js__WEBPACK_IMPORTED_MODULE_3__[\"gamma\"])(y);\n\n  function rgb(start, end) {\n    var r = color((start = Object(d3_color__WEBPACK_IMPORTED_MODULE_0__[\"rgb\"])(start)).r, (end = Object(d3_color__WEBPACK_IMPORTED_MODULE_0__[\"rgb\"])(end)).r),\n        g = color(start.g, end.g),\n        b = color(start.b, end.b),\n        opacity = Object(_color_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(start.opacity, end.opacity);\n    return function(t) {\n      start.r = r(t);\n      start.g = g(t);\n      start.b = b(t);\n      start.opacity = opacity(t);\n      return start + \"\";\n    };\n  }\n\n  rgb.gamma = rgbGamma;\n\n  return rgb;\n})(1));\n\nfunction rgbSpline(spline) {\n  return function(colors) {\n    var n = colors.length,\n        r = new Array(n),\n        g = new Array(n),\n        b = new Array(n),\n        i, color;\n    for (i = 0; i < n; ++i) {\n      color = Object(d3_color__WEBPACK_IMPORTED_MODULE_0__[\"rgb\"])(colors[i]);\n      r[i] = color.r || 0;\n      g[i] = color.g || 0;\n      b[i] = color.b || 0;\n    }\n    r = spline(r);\n    g = spline(g);\n    b = spline(b);\n    color.opacity = 1;\n    return function(t) {\n      color.r = r(t);\n      color.g = g(t);\n      color.b = b(t);\n      return color + \"\";\n    };\n  };\n}\n\nvar rgbBasis = rgbSpline(_basis_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"]);\nvar rgbBasisClosed = rgbSpline(_basisClosed_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"]);\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-interpolate/src/round.js\":\n/*!**************************************************!*\\\n  !*** ./node_modules/d3-interpolate/src/round.js ***!\n  \\**************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(a, b) {\n  return a = +a, b = +b, function(t) {\n    return Math.round(a * (1 - t) + b * t);\n  };\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-interpolate/src/string.js\":\n/*!***************************************************!*\\\n  !*** ./node_modules/d3-interpolate/src/string.js ***!\n  \\***************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _number_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./number.js */ \"./node_modules/d3-interpolate/src/number.js\");\n\n\nvar reA = /[-+]?(?:\\d+\\.?\\d*|\\.?\\d+)(?:[eE][-+]?\\d+)?/g,\n    reB = new RegExp(reA.source, \"g\");\n\nfunction zero(b) {\n  return function() {\n    return b;\n  };\n}\n\nfunction one(b) {\n  return function(t) {\n    return b(t) + \"\";\n  };\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(a, b) {\n  var bi = reA.lastIndex = reB.lastIndex = 0, // scan index for next number in b\n      am, // current match in a\n      bm, // current match in b\n      bs, // string preceding current number in b, if any\n      i = -1, // index in s\n      s = [], // string constants and placeholders\n      q = []; // number interpolators\n\n  // Coerce inputs to strings.\n  a = a + \"\", b = b + \"\";\n\n  // Interpolate pairs of numbers in a & b.\n  while ((am = reA.exec(a))\n      && (bm = reB.exec(b))) {\n    if ((bs = bm.index) > bi) { // a string precedes the next number in b\n      bs = b.slice(bi, bs);\n      if (s[i]) s[i] += bs; // coalesce with previous string\n      else s[++i] = bs;\n    }\n    if ((am = am[0]) === (bm = bm[0])) { // numbers in a & b match\n      if (s[i]) s[i] += bm; // coalesce with previous string\n      else s[++i] = bm;\n    } else { // interpolate non-matching numbers\n      s[++i] = null;\n      q.push({i: i, x: Object(_number_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(am, bm)});\n    }\n    bi = reB.lastIndex;\n  }\n\n  // Add remains of b.\n  if (bi < b.length) {\n    bs = b.slice(bi);\n    if (s[i]) s[i] += bs; // coalesce with previous string\n    else s[++i] = bs;\n  }\n\n  // Special optimization for only a single match.\n  // Otherwise, interpolate each of the numbers and rejoin the string.\n  return s.length < 2 ? (q[0]\n      ? one(q[0].x)\n      : zero(b))\n      : (b = q.length, function(t) {\n          for (var i = 0, o; i < b; ++i) s[(o = q[i]).i] = o.x(t);\n          return s.join(\"\");\n        });\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-interpolate/src/transform/decompose.js\":\n/*!****************************************************************!*\\\n  !*** ./node_modules/d3-interpolate/src/transform/decompose.js ***!\n  \\****************************************************************/\n/*! exports provided: identity, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"identity\", function() { return identity; });\nvar degrees = 180 / Math.PI;\n\nvar identity = {\n  translateX: 0,\n  translateY: 0,\n  rotate: 0,\n  skewX: 0,\n  scaleX: 1,\n  scaleY: 1\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(a, b, c, d, e, f) {\n  var scaleX, scaleY, skewX;\n  if (scaleX = Math.sqrt(a * a + b * b)) a /= scaleX, b /= scaleX;\n  if (skewX = a * c + b * d) c -= a * skewX, d -= b * skewX;\n  if (scaleY = Math.sqrt(c * c + d * d)) c /= scaleY, d /= scaleY, skewX /= scaleY;\n  if (a * d < b * c) a = -a, b = -b, skewX = -skewX, scaleX = -scaleX;\n  return {\n    translateX: e,\n    translateY: f,\n    rotate: Math.atan2(b, a) * degrees,\n    skewX: Math.atan(skewX) * degrees,\n    scaleX: scaleX,\n    scaleY: scaleY\n  };\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-interpolate/src/transform/index.js\":\n/*!************************************************************!*\\\n  !*** ./node_modules/d3-interpolate/src/transform/index.js ***!\n  \\************************************************************/\n/*! exports provided: interpolateTransformCss, interpolateTransformSvg */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"interpolateTransformCss\", function() { return interpolateTransformCss; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"interpolateTransformSvg\", function() { return interpolateTransformSvg; });\n/* harmony import */ var _number_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../number.js */ \"./node_modules/d3-interpolate/src/number.js\");\n/* harmony import */ var _parse_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./parse.js */ \"./node_modules/d3-interpolate/src/transform/parse.js\");\n\n\n\nfunction interpolateTransform(parse, pxComma, pxParen, degParen) {\n\n  function pop(s) {\n    return s.length ? s.pop() + \" \" : \"\";\n  }\n\n  function translate(xa, ya, xb, yb, s, q) {\n    if (xa !== xb || ya !== yb) {\n      var i = s.push(\"translate(\", null, pxComma, null, pxParen);\n      q.push({i: i - 4, x: Object(_number_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(xa, xb)}, {i: i - 2, x: Object(_number_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(ya, yb)});\n    } else if (xb || yb) {\n      s.push(\"translate(\" + xb + pxComma + yb + pxParen);\n    }\n  }\n\n  function rotate(a, b, s, q) {\n    if (a !== b) {\n      if (a - b > 180) b += 360; else if (b - a > 180) a += 360; // shortest path\n      q.push({i: s.push(pop(s) + \"rotate(\", null, degParen) - 2, x: Object(_number_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(a, b)});\n    } else if (b) {\n      s.push(pop(s) + \"rotate(\" + b + degParen);\n    }\n  }\n\n  function skewX(a, b, s, q) {\n    if (a !== b) {\n      q.push({i: s.push(pop(s) + \"skewX(\", null, degParen) - 2, x: Object(_number_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(a, b)});\n    } else if (b) {\n      s.push(pop(s) + \"skewX(\" + b + degParen);\n    }\n  }\n\n  function scale(xa, ya, xb, yb, s, q) {\n    if (xa !== xb || ya !== yb) {\n      var i = s.push(pop(s) + \"scale(\", null, \",\", null, \")\");\n      q.push({i: i - 4, x: Object(_number_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(xa, xb)}, {i: i - 2, x: Object(_number_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(ya, yb)});\n    } else if (xb !== 1 || yb !== 1) {\n      s.push(pop(s) + \"scale(\" + xb + \",\" + yb + \")\");\n    }\n  }\n\n  return function(a, b) {\n    var s = [], // string constants and placeholders\n        q = []; // number interpolators\n    a = parse(a), b = parse(b);\n    translate(a.translateX, a.translateY, b.translateX, b.translateY, s, q);\n    rotate(a.rotate, b.rotate, s, q);\n    skewX(a.skewX, b.skewX, s, q);\n    scale(a.scaleX, a.scaleY, b.scaleX, b.scaleY, s, q);\n    a = b = null; // gc\n    return function(t) {\n      var i = -1, n = q.length, o;\n      while (++i < n) s[(o = q[i]).i] = o.x(t);\n      return s.join(\"\");\n    };\n  };\n}\n\nvar interpolateTransformCss = interpolateTransform(_parse_js__WEBPACK_IMPORTED_MODULE_1__[\"parseCss\"], \"px, \", \"px)\", \"deg)\");\nvar interpolateTransformSvg = interpolateTransform(_parse_js__WEBPACK_IMPORTED_MODULE_1__[\"parseSvg\"], \", \", \")\", \")\");\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-interpolate/src/transform/parse.js\":\n/*!************************************************************!*\\\n  !*** ./node_modules/d3-interpolate/src/transform/parse.js ***!\n  \\************************************************************/\n/*! exports provided: parseCss, parseSvg */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"parseCss\", function() { return parseCss; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"parseSvg\", function() { return parseSvg; });\n/* harmony import */ var _decompose_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./decompose.js */ \"./node_modules/d3-interpolate/src/transform/decompose.js\");\n\n\nvar cssNode,\n    cssRoot,\n    cssView,\n    svgNode;\n\nfunction parseCss(value) {\n  if (value === \"none\") return _decompose_js__WEBPACK_IMPORTED_MODULE_0__[\"identity\"];\n  if (!cssNode) cssNode = document.createElement(\"DIV\"), cssRoot = document.documentElement, cssView = document.defaultView;\n  cssNode.style.transform = value;\n  value = cssView.getComputedStyle(cssRoot.appendChild(cssNode), null).getPropertyValue(\"transform\");\n  cssRoot.removeChild(cssNode);\n  value = value.slice(7, -1).split(\",\");\n  return Object(_decompose_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(+value[0], +value[1], +value[2], +value[3], +value[4], +value[5]);\n}\n\nfunction parseSvg(value) {\n  if (value == null) return _decompose_js__WEBPACK_IMPORTED_MODULE_0__[\"identity\"];\n  if (!svgNode) svgNode = document.createElementNS(\"http://www.w3.org/2000/svg\", \"g\");\n  svgNode.setAttribute(\"transform\", value);\n  if (!(value = svgNode.transform.baseVal.consolidate())) return _decompose_js__WEBPACK_IMPORTED_MODULE_0__[\"identity\"];\n  value = value.matrix;\n  return Object(_decompose_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(value.a, value.b, value.c, value.d, value.e, value.f);\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-interpolate/src/value.js\":\n/*!**************************************************!*\\\n  !*** ./node_modules/d3-interpolate/src/value.js ***!\n  \\**************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var d3_color__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-color */ \"./node_modules/d3-color/src/index.js\");\n/* harmony import */ var _rgb_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./rgb.js */ \"./node_modules/d3-interpolate/src/rgb.js\");\n/* harmony import */ var _array_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./array.js */ \"./node_modules/d3-interpolate/src/array.js\");\n/* harmony import */ var _date_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./date.js */ \"./node_modules/d3-interpolate/src/date.js\");\n/* harmony import */ var _number_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./number.js */ \"./node_modules/d3-interpolate/src/number.js\");\n/* harmony import */ var _object_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./object.js */ \"./node_modules/d3-interpolate/src/object.js\");\n/* harmony import */ var _string_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./string.js */ \"./node_modules/d3-interpolate/src/string.js\");\n/* harmony import */ var _constant_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./constant.js */ \"./node_modules/d3-interpolate/src/constant.js\");\n/* harmony import */ var _numberArray_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./numberArray.js */ \"./node_modules/d3-interpolate/src/numberArray.js\");\n\n\n\n\n\n\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(a, b) {\n  var t = typeof b, c;\n  return b == null || t === \"boolean\" ? Object(_constant_js__WEBPACK_IMPORTED_MODULE_7__[\"default\"])(b)\n      : (t === \"number\" ? _number_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"]\n      : t === \"string\" ? ((c = Object(d3_color__WEBPACK_IMPORTED_MODULE_0__[\"color\"])(b)) ? (b = c, _rgb_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"]) : _string_js__WEBPACK_IMPORTED_MODULE_6__[\"default\"])\n      : b instanceof d3_color__WEBPACK_IMPORTED_MODULE_0__[\"color\"] ? _rgb_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"]\n      : b instanceof Date ? _date_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"]\n      : Object(_numberArray_js__WEBPACK_IMPORTED_MODULE_8__[\"isNumberArray\"])(b) ? _numberArray_js__WEBPACK_IMPORTED_MODULE_8__[\"default\"]\n      : Array.isArray(b) ? _array_js__WEBPACK_IMPORTED_MODULE_2__[\"genericArray\"]\n      : typeof b.valueOf !== \"function\" && typeof b.toString !== \"function\" || isNaN(b) ? _object_js__WEBPACK_IMPORTED_MODULE_5__[\"default\"]\n      : _number_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(a, b);\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-interpolate/src/zoom.js\":\n/*!*************************************************!*\\\n  !*** ./node_modules/d3-interpolate/src/zoom.js ***!\n  \\*************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\nvar rho = Math.SQRT2,\n    rho2 = 2,\n    rho4 = 4,\n    epsilon2 = 1e-12;\n\nfunction cosh(x) {\n  return ((x = Math.exp(x)) + 1 / x) / 2;\n}\n\nfunction sinh(x) {\n  return ((x = Math.exp(x)) - 1 / x) / 2;\n}\n\nfunction tanh(x) {\n  return ((x = Math.exp(2 * x)) - 1) / (x + 1);\n}\n\n// p0 = [ux0, uy0, w0]\n// p1 = [ux1, uy1, w1]\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(p0, p1) {\n  var ux0 = p0[0], uy0 = p0[1], w0 = p0[2],\n      ux1 = p1[0], uy1 = p1[1], w1 = p1[2],\n      dx = ux1 - ux0,\n      dy = uy1 - uy0,\n      d2 = dx * dx + dy * dy,\n      i,\n      S;\n\n  // Special case for u0 ≅ u1.\n  if (d2 < epsilon2) {\n    S = Math.log(w1 / w0) / rho;\n    i = function(t) {\n      return [\n        ux0 + t * dx,\n        uy0 + t * dy,\n        w0 * Math.exp(rho * t * S)\n      ];\n    }\n  }\n\n  // General case.\n  else {\n    var d1 = Math.sqrt(d2),\n        b0 = (w1 * w1 - w0 * w0 + rho4 * d2) / (2 * w0 * rho2 * d1),\n        b1 = (w1 * w1 - w0 * w0 - rho4 * d2) / (2 * w1 * rho2 * d1),\n        r0 = Math.log(Math.sqrt(b0 * b0 + 1) - b0),\n        r1 = Math.log(Math.sqrt(b1 * b1 + 1) - b1);\n    S = (r1 - r0) / rho;\n    i = function(t) {\n      var s = t * S,\n          coshr0 = cosh(r0),\n          u = w0 / (rho2 * d1) * (coshr0 * tanh(rho * s + r0) - sinh(r0));\n      return [\n        ux0 + u * dx,\n        uy0 + u * dy,\n        w0 * coshr0 / cosh(rho * s + r0)\n      ];\n    }\n  }\n\n  i.duration = S * 1000;\n\n  return i;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-path/src/index.js\":\n/*!*******************************************!*\\\n  !*** ./node_modules/d3-path/src/index.js ***!\n  \\*******************************************/\n/*! exports provided: path */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _path_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./path.js */ \"./node_modules/d3-path/src/path.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"path\", function() { return _path_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-path/src/path.js\":\n/*!******************************************!*\\\n  !*** ./node_modules/d3-path/src/path.js ***!\n  \\******************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\nvar pi = Math.PI,\n    tau = 2 * pi,\n    epsilon = 1e-6,\n    tauEpsilon = tau - epsilon;\n\nfunction Path() {\n  this._x0 = this._y0 = // start of current subpath\n  this._x1 = this._y1 = null; // end of current subpath\n  this._ = \"\";\n}\n\nfunction path() {\n  return new Path;\n}\n\nPath.prototype = path.prototype = {\n  constructor: Path,\n  moveTo: function(x, y) {\n    this._ += \"M\" + (this._x0 = this._x1 = +x) + \",\" + (this._y0 = this._y1 = +y);\n  },\n  closePath: function() {\n    if (this._x1 !== null) {\n      this._x1 = this._x0, this._y1 = this._y0;\n      this._ += \"Z\";\n    }\n  },\n  lineTo: function(x, y) {\n    this._ += \"L\" + (this._x1 = +x) + \",\" + (this._y1 = +y);\n  },\n  quadraticCurveTo: function(x1, y1, x, y) {\n    this._ += \"Q\" + (+x1) + \",\" + (+y1) + \",\" + (this._x1 = +x) + \",\" + (this._y1 = +y);\n  },\n  bezierCurveTo: function(x1, y1, x2, y2, x, y) {\n    this._ += \"C\" + (+x1) + \",\" + (+y1) + \",\" + (+x2) + \",\" + (+y2) + \",\" + (this._x1 = +x) + \",\" + (this._y1 = +y);\n  },\n  arcTo: function(x1, y1, x2, y2, r) {\n    x1 = +x1, y1 = +y1, x2 = +x2, y2 = +y2, r = +r;\n    var x0 = this._x1,\n        y0 = this._y1,\n        x21 = x2 - x1,\n        y21 = y2 - y1,\n        x01 = x0 - x1,\n        y01 = y0 - y1,\n        l01_2 = x01 * x01 + y01 * y01;\n\n    // Is the radius negative? Error.\n    if (r < 0) throw new Error(\"negative radius: \" + r);\n\n    // Is this path empty? Move to (x1,y1).\n    if (this._x1 === null) {\n      this._ += \"M\" + (this._x1 = x1) + \",\" + (this._y1 = y1);\n    }\n\n    // Or, is (x1,y1) coincident with (x0,y0)? Do nothing.\n    else if (!(l01_2 > epsilon));\n\n    // Or, are (x0,y0), (x1,y1) and (x2,y2) collinear?\n    // Equivalently, is (x1,y1) coincident with (x2,y2)?\n    // Or, is the radius zero? Line to (x1,y1).\n    else if (!(Math.abs(y01 * x21 - y21 * x01) > epsilon) || !r) {\n      this._ += \"L\" + (this._x1 = x1) + \",\" + (this._y1 = y1);\n    }\n\n    // Otherwise, draw an arc!\n    else {\n      var x20 = x2 - x0,\n          y20 = y2 - y0,\n          l21_2 = x21 * x21 + y21 * y21,\n          l20_2 = x20 * x20 + y20 * y20,\n          l21 = Math.sqrt(l21_2),\n          l01 = Math.sqrt(l01_2),\n          l = r * Math.tan((pi - Math.acos((l21_2 + l01_2 - l20_2) / (2 * l21 * l01))) / 2),\n          t01 = l / l01,\n          t21 = l / l21;\n\n      // If the start tangent is not coincident with (x0,y0), line to.\n      if (Math.abs(t01 - 1) > epsilon) {\n        this._ += \"L\" + (x1 + t01 * x01) + \",\" + (y1 + t01 * y01);\n      }\n\n      this._ += \"A\" + r + \",\" + r + \",0,0,\" + (+(y01 * x20 > x01 * y20)) + \",\" + (this._x1 = x1 + t21 * x21) + \",\" + (this._y1 = y1 + t21 * y21);\n    }\n  },\n  arc: function(x, y, r, a0, a1, ccw) {\n    x = +x, y = +y, r = +r, ccw = !!ccw;\n    var dx = r * Math.cos(a0),\n        dy = r * Math.sin(a0),\n        x0 = x + dx,\n        y0 = y + dy,\n        cw = 1 ^ ccw,\n        da = ccw ? a0 - a1 : a1 - a0;\n\n    // Is the radius negative? Error.\n    if (r < 0) throw new Error(\"negative radius: \" + r);\n\n    // Is this path empty? Move to (x0,y0).\n    if (this._x1 === null) {\n      this._ += \"M\" + x0 + \",\" + y0;\n    }\n\n    // Or, is (x0,y0) not coincident with the previous point? Line to (x0,y0).\n    else if (Math.abs(this._x1 - x0) > epsilon || Math.abs(this._y1 - y0) > epsilon) {\n      this._ += \"L\" + x0 + \",\" + y0;\n    }\n\n    // Is this arc empty? We’re done.\n    if (!r) return;\n\n    // Does the angle go the wrong way? Flip the direction.\n    if (da < 0) da = da % tau + tau;\n\n    // Is this a complete circle? Draw two arcs to complete the circle.\n    if (da > tauEpsilon) {\n      this._ += \"A\" + r + \",\" + r + \",0,1,\" + cw + \",\" + (x - dx) + \",\" + (y - dy) + \"A\" + r + \",\" + r + \",0,1,\" + cw + \",\" + (this._x1 = x0) + \",\" + (this._y1 = y0);\n    }\n\n    // Is this arc non-empty? Draw an arc!\n    else if (da > epsilon) {\n      this._ += \"A\" + r + \",\" + r + \",0,\" + (+(da >= pi)) + \",\" + cw + \",\" + (this._x1 = x + r * Math.cos(a1)) + \",\" + (this._y1 = y + r * Math.sin(a1));\n    }\n  },\n  rect: function(x, y, w, h) {\n    this._ += \"M\" + (this._x0 = this._x1 = +x) + \",\" + (this._y0 = this._y1 = +y) + \"h\" + (+w) + \"v\" + (+h) + \"h\" + (-w) + \"Z\";\n  },\n  toString: function() {\n    return this._;\n  }\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (path);\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-polygon/src/area.js\":\n/*!*********************************************!*\\\n  !*** ./node_modules/d3-polygon/src/area.js ***!\n  \\*********************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(polygon) {\n  var i = -1,\n      n = polygon.length,\n      a,\n      b = polygon[n - 1],\n      area = 0;\n\n  while (++i < n) {\n    a = b;\n    b = polygon[i];\n    area += a[1] * b[0] - a[0] * b[1];\n  }\n\n  return area / 2;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-polygon/src/centroid.js\":\n/*!*************************************************!*\\\n  !*** ./node_modules/d3-polygon/src/centroid.js ***!\n  \\*************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(polygon) {\n  var i = -1,\n      n = polygon.length,\n      x = 0,\n      y = 0,\n      a,\n      b = polygon[n - 1],\n      c,\n      k = 0;\n\n  while (++i < n) {\n    a = b;\n    b = polygon[i];\n    k += c = a[0] * b[1] - b[0] * a[1];\n    x += (a[0] + b[0]) * c;\n    y += (a[1] + b[1]) * c;\n  }\n\n  return k *= 3, [x / k, y / k];\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-polygon/src/contains.js\":\n/*!*************************************************!*\\\n  !*** ./node_modules/d3-polygon/src/contains.js ***!\n  \\*************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(polygon, point) {\n  var n = polygon.length,\n      p = polygon[n - 1],\n      x = point[0], y = point[1],\n      x0 = p[0], y0 = p[1],\n      x1, y1,\n      inside = false;\n\n  for (var i = 0; i < n; ++i) {\n    p = polygon[i], x1 = p[0], y1 = p[1];\n    if (((y1 > y) !== (y0 > y)) && (x < (x0 - x1) * (y - y1) / (y0 - y1) + x1)) inside = !inside;\n    x0 = x1, y0 = y1;\n  }\n\n  return inside;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-polygon/src/cross.js\":\n/*!**********************************************!*\\\n  !*** ./node_modules/d3-polygon/src/cross.js ***!\n  \\**********************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n// Returns the 2D cross product of AB and AC vectors, i.e., the z-component of\n// the 3D cross product in a quadrant I Cartesian coordinate system (+x is\n// right, +y is up). Returns a positive value if ABC is counter-clockwise,\n// negative if clockwise, and zero if the points are collinear.\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(a, b, c) {\n  return (b[0] - a[0]) * (c[1] - a[1]) - (b[1] - a[1]) * (c[0] - a[0]);\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-polygon/src/hull.js\":\n/*!*********************************************!*\\\n  !*** ./node_modules/d3-polygon/src/hull.js ***!\n  \\*********************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _cross_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./cross.js */ \"./node_modules/d3-polygon/src/cross.js\");\n\n\nfunction lexicographicOrder(a, b) {\n  return a[0] - b[0] || a[1] - b[1];\n}\n\n// Computes the upper convex hull per the monotone chain algorithm.\n// Assumes points.length >= 3, is sorted by x, unique in y.\n// Returns an array of indices into points in left-to-right order.\nfunction computeUpperHullIndexes(points) {\n  const n = points.length,\n      indexes = [0, 1];\n  let size = 2, i;\n\n  for (i = 2; i < n; ++i) {\n    while (size > 1 && Object(_cross_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(points[indexes[size - 2]], points[indexes[size - 1]], points[i]) <= 0) --size;\n    indexes[size++] = i;\n  }\n\n  return indexes.slice(0, size); // remove popped points\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(points) {\n  if ((n = points.length) < 3) return null;\n\n  var i,\n      n,\n      sortedPoints = new Array(n),\n      flippedPoints = new Array(n);\n\n  for (i = 0; i < n; ++i) sortedPoints[i] = [+points[i][0], +points[i][1], i];\n  sortedPoints.sort(lexicographicOrder);\n  for (i = 0; i < n; ++i) flippedPoints[i] = [sortedPoints[i][0], -sortedPoints[i][1]];\n\n  var upperIndexes = computeUpperHullIndexes(sortedPoints),\n      lowerIndexes = computeUpperHullIndexes(flippedPoints);\n\n  // Construct the hull polygon, removing possible duplicate endpoints.\n  var skipLeft = lowerIndexes[0] === upperIndexes[0],\n      skipRight = lowerIndexes[lowerIndexes.length - 1] === upperIndexes[upperIndexes.length - 1],\n      hull = [];\n\n  // Add upper hull in right-to-l order.\n  // Then add lower hull in left-to-right order.\n  for (i = upperIndexes.length - 1; i >= 0; --i) hull.push(points[sortedPoints[upperIndexes[i]][2]]);\n  for (i = +skipLeft; i < lowerIndexes.length - skipRight; ++i) hull.push(points[sortedPoints[lowerIndexes[i]][2]]);\n\n  return hull;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-polygon/src/index.js\":\n/*!**********************************************!*\\\n  !*** ./node_modules/d3-polygon/src/index.js ***!\n  \\**********************************************/\n/*! exports provided: polygonArea, polygonCentroid, polygonHull, polygonContains, polygonLength */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _area_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./area.js */ \"./node_modules/d3-polygon/src/area.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"polygonArea\", function() { return _area_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n/* harmony import */ var _centroid_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./centroid.js */ \"./node_modules/d3-polygon/src/centroid.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"polygonCentroid\", function() { return _centroid_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"]; });\n\n/* harmony import */ var _hull_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./hull.js */ \"./node_modules/d3-polygon/src/hull.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"polygonHull\", function() { return _hull_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"]; });\n\n/* harmony import */ var _contains_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./contains.js */ \"./node_modules/d3-polygon/src/contains.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"polygonContains\", function() { return _contains_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"]; });\n\n/* harmony import */ var _length_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./length.js */ \"./node_modules/d3-polygon/src/length.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"polygonLength\", function() { return _length_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"]; });\n\n\n\n\n\n\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-polygon/src/length.js\":\n/*!***********************************************!*\\\n  !*** ./node_modules/d3-polygon/src/length.js ***!\n  \\***********************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(polygon) {\n  var i = -1,\n      n = polygon.length,\n      b = polygon[n - 1],\n      xa,\n      ya,\n      xb = b[0],\n      yb = b[1],\n      perimeter = 0;\n\n  while (++i < n) {\n    xa = xb;\n    ya = yb;\n    b = polygon[i];\n    xb = b[0];\n    yb = b[1];\n    xa -= xb;\n    ya -= yb;\n    perimeter += Math.hypot(xa, ya);\n  }\n\n  return perimeter;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-quadtree/src/add.js\":\n/*!*********************************************!*\\\n  !*** ./node_modules/d3-quadtree/src/add.js ***!\n  \\*********************************************/\n/*! exports provided: default, addAll */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"addAll\", function() { return addAll; });\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(d) {\n  var x = +this._x.call(null, d),\n      y = +this._y.call(null, d);\n  return add(this.cover(x, y), x, y, d);\n});\n\nfunction add(tree, x, y, d) {\n  if (isNaN(x) || isNaN(y)) return tree; // ignore invalid points\n\n  var parent,\n      node = tree._root,\n      leaf = {data: d},\n      x0 = tree._x0,\n      y0 = tree._y0,\n      x1 = tree._x1,\n      y1 = tree._y1,\n      xm,\n      ym,\n      xp,\n      yp,\n      right,\n      bottom,\n      i,\n      j;\n\n  // If the tree is empty, initialize the root as a leaf.\n  if (!node) return tree._root = leaf, tree;\n\n  // Find the existing leaf for the new point, or add it.\n  while (node.length) {\n    if (right = x >= (xm = (x0 + x1) / 2)) x0 = xm; else x1 = xm;\n    if (bottom = y >= (ym = (y0 + y1) / 2)) y0 = ym; else y1 = ym;\n    if (parent = node, !(node = node[i = bottom << 1 | right])) return parent[i] = leaf, tree;\n  }\n\n  // Is the new point is exactly coincident with the existing point?\n  xp = +tree._x.call(null, node.data);\n  yp = +tree._y.call(null, node.data);\n  if (x === xp && y === yp) return leaf.next = node, parent ? parent[i] = leaf : tree._root = leaf, tree;\n\n  // Otherwise, split the leaf node until the old and new point are separated.\n  do {\n    parent = parent ? parent[i] = new Array(4) : tree._root = new Array(4);\n    if (right = x >= (xm = (x0 + x1) / 2)) x0 = xm; else x1 = xm;\n    if (bottom = y >= (ym = (y0 + y1) / 2)) y0 = ym; else y1 = ym;\n  } while ((i = bottom << 1 | right) === (j = (yp >= ym) << 1 | (xp >= xm)));\n  return parent[j] = node, parent[i] = leaf, tree;\n}\n\nfunction addAll(data) {\n  var d, i, n = data.length,\n      x,\n      y,\n      xz = new Array(n),\n      yz = new Array(n),\n      x0 = Infinity,\n      y0 = Infinity,\n      x1 = -Infinity,\n      y1 = -Infinity;\n\n  // Compute the points and their extent.\n  for (i = 0; i < n; ++i) {\n    if (isNaN(x = +this._x.call(null, d = data[i])) || isNaN(y = +this._y.call(null, d))) continue;\n    xz[i] = x;\n    yz[i] = y;\n    if (x < x0) x0 = x;\n    if (x > x1) x1 = x;\n    if (y < y0) y0 = y;\n    if (y > y1) y1 = y;\n  }\n\n  // If there were no (valid) points, abort.\n  if (x0 > x1 || y0 > y1) return this;\n\n  // Expand the tree to cover the new points.\n  this.cover(x0, y0).cover(x1, y1);\n\n  // Add the new points.\n  for (i = 0; i < n; ++i) {\n    add(this, xz[i], yz[i], data[i]);\n  }\n\n  return this;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-quadtree/src/cover.js\":\n/*!***********************************************!*\\\n  !*** ./node_modules/d3-quadtree/src/cover.js ***!\n  \\***********************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(x, y) {\n  if (isNaN(x = +x) || isNaN(y = +y)) return this; // ignore invalid points\n\n  var x0 = this._x0,\n      y0 = this._y0,\n      x1 = this._x1,\n      y1 = this._y1;\n\n  // If the quadtree has no extent, initialize them.\n  // Integer extent are necessary so that if we later double the extent,\n  // the existing quadrant boundaries don’t change due to floating point error!\n  if (isNaN(x0)) {\n    x1 = (x0 = Math.floor(x)) + 1;\n    y1 = (y0 = Math.floor(y)) + 1;\n  }\n\n  // Otherwise, double repeatedly to cover.\n  else {\n    var z = x1 - x0,\n        node = this._root,\n        parent,\n        i;\n\n    while (x0 > x || x >= x1 || y0 > y || y >= y1) {\n      i = (y < y0) << 1 | (x < x0);\n      parent = new Array(4), parent[i] = node, node = parent, z *= 2;\n      switch (i) {\n        case 0: x1 = x0 + z, y1 = y0 + z; break;\n        case 1: x0 = x1 - z, y1 = y0 + z; break;\n        case 2: x1 = x0 + z, y0 = y1 - z; break;\n        case 3: x0 = x1 - z, y0 = y1 - z; break;\n      }\n    }\n\n    if (this._root && this._root.length) this._root = node;\n  }\n\n  this._x0 = x0;\n  this._y0 = y0;\n  this._x1 = x1;\n  this._y1 = y1;\n  return this;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-quadtree/src/data.js\":\n/*!**********************************************!*\\\n  !*** ./node_modules/d3-quadtree/src/data.js ***!\n  \\**********************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  var data = [];\n  this.visit(function(node) {\n    if (!node.length) do data.push(node.data); while (node = node.next)\n  });\n  return data;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-quadtree/src/extent.js\":\n/*!************************************************!*\\\n  !*** ./node_modules/d3-quadtree/src/extent.js ***!\n  \\************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(_) {\n  return arguments.length\n      ? this.cover(+_[0][0], +_[0][1]).cover(+_[1][0], +_[1][1])\n      : isNaN(this._x0) ? undefined : [[this._x0, this._y0], [this._x1, this._y1]];\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-quadtree/src/find.js\":\n/*!**********************************************!*\\\n  !*** ./node_modules/d3-quadtree/src/find.js ***!\n  \\**********************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _quad_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./quad.js */ \"./node_modules/d3-quadtree/src/quad.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(x, y, radius) {\n  var data,\n      x0 = this._x0,\n      y0 = this._y0,\n      x1,\n      y1,\n      x2,\n      y2,\n      x3 = this._x1,\n      y3 = this._y1,\n      quads = [],\n      node = this._root,\n      q,\n      i;\n\n  if (node) quads.push(new _quad_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"](node, x0, y0, x3, y3));\n  if (radius == null) radius = Infinity;\n  else {\n    x0 = x - radius, y0 = y - radius;\n    x3 = x + radius, y3 = y + radius;\n    radius *= radius;\n  }\n\n  while (q = quads.pop()) {\n\n    // Stop searching if this quadrant can’t contain a closer node.\n    if (!(node = q.node)\n        || (x1 = q.x0) > x3\n        || (y1 = q.y0) > y3\n        || (x2 = q.x1) < x0\n        || (y2 = q.y1) < y0) continue;\n\n    // Bisect the current quadrant.\n    if (node.length) {\n      var xm = (x1 + x2) / 2,\n          ym = (y1 + y2) / 2;\n\n      quads.push(\n        new _quad_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"](node[3], xm, ym, x2, y2),\n        new _quad_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"](node[2], x1, ym, xm, y2),\n        new _quad_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"](node[1], xm, y1, x2, ym),\n        new _quad_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"](node[0], x1, y1, xm, ym)\n      );\n\n      // Visit the closest quadrant first.\n      if (i = (y >= ym) << 1 | (x >= xm)) {\n        q = quads[quads.length - 1];\n        quads[quads.length - 1] = quads[quads.length - 1 - i];\n        quads[quads.length - 1 - i] = q;\n      }\n    }\n\n    // Visit this point. (Visiting coincident points isn’t necessary!)\n    else {\n      var dx = x - +this._x.call(null, node.data),\n          dy = y - +this._y.call(null, node.data),\n          d2 = dx * dx + dy * dy;\n      if (d2 < radius) {\n        var d = Math.sqrt(radius = d2);\n        x0 = x - d, y0 = y - d;\n        x3 = x + d, y3 = y + d;\n        data = node.data;\n      }\n    }\n  }\n\n  return data;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-quadtree/src/index.js\":\n/*!***********************************************!*\\\n  !*** ./node_modules/d3-quadtree/src/index.js ***!\n  \\***********************************************/\n/*! exports provided: quadtree */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _quadtree_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./quadtree.js */ \"./node_modules/d3-quadtree/src/quadtree.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"quadtree\", function() { return _quadtree_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-quadtree/src/quad.js\":\n/*!**********************************************!*\\\n  !*** ./node_modules/d3-quadtree/src/quad.js ***!\n  \\**********************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(node, x0, y0, x1, y1) {\n  this.node = node;\n  this.x0 = x0;\n  this.y0 = y0;\n  this.x1 = x1;\n  this.y1 = y1;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-quadtree/src/quadtree.js\":\n/*!**************************************************!*\\\n  !*** ./node_modules/d3-quadtree/src/quadtree.js ***!\n  \\**************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return quadtree; });\n/* harmony import */ var _add_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./add.js */ \"./node_modules/d3-quadtree/src/add.js\");\n/* harmony import */ var _cover_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./cover.js */ \"./node_modules/d3-quadtree/src/cover.js\");\n/* harmony import */ var _data_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./data.js */ \"./node_modules/d3-quadtree/src/data.js\");\n/* harmony import */ var _extent_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./extent.js */ \"./node_modules/d3-quadtree/src/extent.js\");\n/* harmony import */ var _find_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./find.js */ \"./node_modules/d3-quadtree/src/find.js\");\n/* harmony import */ var _remove_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./remove.js */ \"./node_modules/d3-quadtree/src/remove.js\");\n/* harmony import */ var _root_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./root.js */ \"./node_modules/d3-quadtree/src/root.js\");\n/* harmony import */ var _size_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./size.js */ \"./node_modules/d3-quadtree/src/size.js\");\n/* harmony import */ var _visit_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./visit.js */ \"./node_modules/d3-quadtree/src/visit.js\");\n/* harmony import */ var _visitAfter_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./visitAfter.js */ \"./node_modules/d3-quadtree/src/visitAfter.js\");\n/* harmony import */ var _x_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./x.js */ \"./node_modules/d3-quadtree/src/x.js\");\n/* harmony import */ var _y_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./y.js */ \"./node_modules/d3-quadtree/src/y.js\");\n\n\n\n\n\n\n\n\n\n\n\n\n\nfunction quadtree(nodes, x, y) {\n  var tree = new Quadtree(x == null ? _x_js__WEBPACK_IMPORTED_MODULE_10__[\"defaultX\"] : x, y == null ? _y_js__WEBPACK_IMPORTED_MODULE_11__[\"defaultY\"] : y, NaN, NaN, NaN, NaN);\n  return nodes == null ? tree : tree.addAll(nodes);\n}\n\nfunction Quadtree(x, y, x0, y0, x1, y1) {\n  this._x = x;\n  this._y = y;\n  this._x0 = x0;\n  this._y0 = y0;\n  this._x1 = x1;\n  this._y1 = y1;\n  this._root = undefined;\n}\n\nfunction leaf_copy(leaf) {\n  var copy = {data: leaf.data}, next = copy;\n  while (leaf = leaf.next) next = next.next = {data: leaf.data};\n  return copy;\n}\n\nvar treeProto = quadtree.prototype = Quadtree.prototype;\n\ntreeProto.copy = function() {\n  var copy = new Quadtree(this._x, this._y, this._x0, this._y0, this._x1, this._y1),\n      node = this._root,\n      nodes,\n      child;\n\n  if (!node) return copy;\n\n  if (!node.length) return copy._root = leaf_copy(node), copy;\n\n  nodes = [{source: node, target: copy._root = new Array(4)}];\n  while (node = nodes.pop()) {\n    for (var i = 0; i < 4; ++i) {\n      if (child = node.source[i]) {\n        if (child.length) nodes.push({source: child, target: node.target[i] = new Array(4)});\n        else node.target[i] = leaf_copy(child);\n      }\n    }\n  }\n\n  return copy;\n};\n\ntreeProto.add = _add_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"];\ntreeProto.addAll = _add_js__WEBPACK_IMPORTED_MODULE_0__[\"addAll\"];\ntreeProto.cover = _cover_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"];\ntreeProto.data = _data_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"];\ntreeProto.extent = _extent_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"];\ntreeProto.find = _find_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"];\ntreeProto.remove = _remove_js__WEBPACK_IMPORTED_MODULE_5__[\"default\"];\ntreeProto.removeAll = _remove_js__WEBPACK_IMPORTED_MODULE_5__[\"removeAll\"];\ntreeProto.root = _root_js__WEBPACK_IMPORTED_MODULE_6__[\"default\"];\ntreeProto.size = _size_js__WEBPACK_IMPORTED_MODULE_7__[\"default\"];\ntreeProto.visit = _visit_js__WEBPACK_IMPORTED_MODULE_8__[\"default\"];\ntreeProto.visitAfter = _visitAfter_js__WEBPACK_IMPORTED_MODULE_9__[\"default\"];\ntreeProto.x = _x_js__WEBPACK_IMPORTED_MODULE_10__[\"default\"];\ntreeProto.y = _y_js__WEBPACK_IMPORTED_MODULE_11__[\"default\"];\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-quadtree/src/remove.js\":\n/*!************************************************!*\\\n  !*** ./node_modules/d3-quadtree/src/remove.js ***!\n  \\************************************************/\n/*! exports provided: default, removeAll */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"removeAll\", function() { return removeAll; });\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(d) {\n  if (isNaN(x = +this._x.call(null, d)) || isNaN(y = +this._y.call(null, d))) return this; // ignore invalid points\n\n  var parent,\n      node = this._root,\n      retainer,\n      previous,\n      next,\n      x0 = this._x0,\n      y0 = this._y0,\n      x1 = this._x1,\n      y1 = this._y1,\n      x,\n      y,\n      xm,\n      ym,\n      right,\n      bottom,\n      i,\n      j;\n\n  // If the tree is empty, initialize the root as a leaf.\n  if (!node) return this;\n\n  // Find the leaf node for the point.\n  // While descending, also retain the deepest parent with a non-removed sibling.\n  if (node.length) while (true) {\n    if (right = x >= (xm = (x0 + x1) / 2)) x0 = xm; else x1 = xm;\n    if (bottom = y >= (ym = (y0 + y1) / 2)) y0 = ym; else y1 = ym;\n    if (!(parent = node, node = node[i = bottom << 1 | right])) return this;\n    if (!node.length) break;\n    if (parent[(i + 1) & 3] || parent[(i + 2) & 3] || parent[(i + 3) & 3]) retainer = parent, j = i;\n  }\n\n  // Find the point to remove.\n  while (node.data !== d) if (!(previous = node, node = node.next)) return this;\n  if (next = node.next) delete node.next;\n\n  // If there are multiple coincident points, remove just the point.\n  if (previous) return (next ? previous.next = next : delete previous.next), this;\n\n  // If this is the root point, remove it.\n  if (!parent) return this._root = next, this;\n\n  // Remove this leaf.\n  next ? parent[i] = next : delete parent[i];\n\n  // If the parent now contains exactly one leaf, collapse superfluous parents.\n  if ((node = parent[0] || parent[1] || parent[2] || parent[3])\n      && node === (parent[3] || parent[2] || parent[1] || parent[0])\n      && !node.length) {\n    if (retainer) retainer[j] = node;\n    else this._root = node;\n  }\n\n  return this;\n});\n\nfunction removeAll(data) {\n  for (var i = 0, n = data.length; i < n; ++i) this.remove(data[i]);\n  return this;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-quadtree/src/root.js\":\n/*!**********************************************!*\\\n  !*** ./node_modules/d3-quadtree/src/root.js ***!\n  \\**********************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  return this._root;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-quadtree/src/size.js\":\n/*!**********************************************!*\\\n  !*** ./node_modules/d3-quadtree/src/size.js ***!\n  \\**********************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  var size = 0;\n  this.visit(function(node) {\n    if (!node.length) do ++size; while (node = node.next)\n  });\n  return size;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-quadtree/src/visit.js\":\n/*!***********************************************!*\\\n  !*** ./node_modules/d3-quadtree/src/visit.js ***!\n  \\***********************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _quad_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./quad.js */ \"./node_modules/d3-quadtree/src/quad.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(callback) {\n  var quads = [], q, node = this._root, child, x0, y0, x1, y1;\n  if (node) quads.push(new _quad_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"](node, this._x0, this._y0, this._x1, this._y1));\n  while (q = quads.pop()) {\n    if (!callback(node = q.node, x0 = q.x0, y0 = q.y0, x1 = q.x1, y1 = q.y1) && node.length) {\n      var xm = (x0 + x1) / 2, ym = (y0 + y1) / 2;\n      if (child = node[3]) quads.push(new _quad_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"](child, xm, ym, x1, y1));\n      if (child = node[2]) quads.push(new _quad_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"](child, x0, ym, xm, y1));\n      if (child = node[1]) quads.push(new _quad_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"](child, xm, y0, x1, ym));\n      if (child = node[0]) quads.push(new _quad_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"](child, x0, y0, xm, ym));\n    }\n  }\n  return this;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-quadtree/src/visitAfter.js\":\n/*!****************************************************!*\\\n  !*** ./node_modules/d3-quadtree/src/visitAfter.js ***!\n  \\****************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _quad_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./quad.js */ \"./node_modules/d3-quadtree/src/quad.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(callback) {\n  var quads = [], next = [], q;\n  if (this._root) quads.push(new _quad_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"](this._root, this._x0, this._y0, this._x1, this._y1));\n  while (q = quads.pop()) {\n    var node = q.node;\n    if (node.length) {\n      var child, x0 = q.x0, y0 = q.y0, x1 = q.x1, y1 = q.y1, xm = (x0 + x1) / 2, ym = (y0 + y1) / 2;\n      if (child = node[0]) quads.push(new _quad_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"](child, x0, y0, xm, ym));\n      if (child = node[1]) quads.push(new _quad_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"](child, xm, y0, x1, ym));\n      if (child = node[2]) quads.push(new _quad_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"](child, x0, ym, xm, y1));\n      if (child = node[3]) quads.push(new _quad_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"](child, xm, ym, x1, y1));\n    }\n    next.push(q);\n  }\n  while (q = next.pop()) {\n    callback(q.node, q.x0, q.y0, q.x1, q.y1);\n  }\n  return this;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-quadtree/src/x.js\":\n/*!*******************************************!*\\\n  !*** ./node_modules/d3-quadtree/src/x.js ***!\n  \\*******************************************/\n/*! exports provided: defaultX, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"defaultX\", function() { return defaultX; });\nfunction defaultX(d) {\n  return d[0];\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(_) {\n  return arguments.length ? (this._x = _, this) : this._x;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-quadtree/src/y.js\":\n/*!*******************************************!*\\\n  !*** ./node_modules/d3-quadtree/src/y.js ***!\n  \\*******************************************/\n/*! exports provided: defaultY, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"defaultY\", function() { return defaultY; });\nfunction defaultY(d) {\n  return d[1];\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(_) {\n  return arguments.length ? (this._y = _, this) : this._y;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-random/src/bates.js\":\n/*!*********************************************!*\\\n  !*** ./node_modules/d3-random/src/bates.js ***!\n  \\*********************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _defaultSource_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./defaultSource.js */ \"./node_modules/d3-random/src/defaultSource.js\");\n/* harmony import */ var _irwinHall_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./irwinHall.js */ \"./node_modules/d3-random/src/irwinHall.js\");\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ((function sourceRandomBates(source) {\n  var I = _irwinHall_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"].source(source);\n\n  function randomBates(n) {\n    // use limiting distribution at n === 0\n    if ((n = +n) === 0) return source;\n    var randomIrwinHall = I(n);\n    return function() {\n      return randomIrwinHall() / n;\n    };\n  }\n\n  randomBates.source = sourceRandomBates;\n\n  return randomBates;\n})(_defaultSource_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]));\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-random/src/bernoulli.js\":\n/*!*************************************************!*\\\n  !*** ./node_modules/d3-random/src/bernoulli.js ***!\n  \\*************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _defaultSource_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./defaultSource.js */ \"./node_modules/d3-random/src/defaultSource.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ((function sourceRandomBernoulli(source) {\n  function randomBernoulli(p) {\n    if ((p = +p) < 0 || p > 1) throw new RangeError(\"invalid p\");\n    return function() {\n      return Math.floor(source() + p);\n    };\n  }\n\n  randomBernoulli.source = sourceRandomBernoulli;\n\n  return randomBernoulli;\n})(_defaultSource_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]));\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-random/src/beta.js\":\n/*!********************************************!*\\\n  !*** ./node_modules/d3-random/src/beta.js ***!\n  \\********************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _defaultSource_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./defaultSource.js */ \"./node_modules/d3-random/src/defaultSource.js\");\n/* harmony import */ var _gamma_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./gamma.js */ \"./node_modules/d3-random/src/gamma.js\");\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ((function sourceRandomBeta(source) {\n  var G = _gamma_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"].source(source);\n\n  function randomBeta(alpha, beta) {\n    var X = G(alpha),\n        Y = G(beta);\n    return function() {\n      var x = X();\n      return x === 0 ? 0 : x / (x + Y());\n    };\n  }\n\n  randomBeta.source = sourceRandomBeta;\n\n  return randomBeta;\n})(_defaultSource_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]));\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-random/src/binomial.js\":\n/*!************************************************!*\\\n  !*** ./node_modules/d3-random/src/binomial.js ***!\n  \\************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _defaultSource_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./defaultSource.js */ \"./node_modules/d3-random/src/defaultSource.js\");\n/* harmony import */ var _beta_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./beta.js */ \"./node_modules/d3-random/src/beta.js\");\n/* harmony import */ var _geometric_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./geometric.js */ \"./node_modules/d3-random/src/geometric.js\");\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ((function sourceRandomBinomial(source) {\n  var G = _geometric_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"].source(source),\n      B = _beta_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"].source(source);\n\n  function randomBinomial(n, p) {\n    n = +n;\n    if ((p = +p) >= 1) return () => n;\n    if (p <= 0) return () => 0;\n    return function() {\n      var acc = 0, nn = n, pp = p;\n      while (nn * pp > 16 && nn * (1 - pp) > 16) {\n        var i = Math.floor((nn + 1) * pp),\n            y = B(i, nn - i + 1)();\n        if (y <= pp) {\n          acc += i;\n          nn -= i;\n          pp = (pp - y) / (1 - y);\n        } else {\n          nn = i - 1;\n          pp /= y;\n        }\n      }\n      var sign = pp < 0.5,\n          pFinal = sign ? pp : 1 - pp,\n          g = G(pFinal);\n      for (var s = g(), k = 0; s <= nn; ++k) s += g();\n      return acc + (sign ? k : nn - k);\n    };\n  }\n\n  randomBinomial.source = sourceRandomBinomial;\n\n  return randomBinomial;\n})(_defaultSource_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]));\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-random/src/cauchy.js\":\n/*!**********************************************!*\\\n  !*** ./node_modules/d3-random/src/cauchy.js ***!\n  \\**********************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _defaultSource_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./defaultSource.js */ \"./node_modules/d3-random/src/defaultSource.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ((function sourceRandomCauchy(source) {\n  function randomCauchy(a, b) {\n    a = a == null ? 0 : +a;\n    b = b == null ? 1 : +b;\n    return function() {\n      return a + b * Math.tan(Math.PI * source());\n    };\n  }\n\n  randomCauchy.source = sourceRandomCauchy;\n\n  return randomCauchy;\n})(_defaultSource_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]));\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-random/src/defaultSource.js\":\n/*!*****************************************************!*\\\n  !*** ./node_modules/d3-random/src/defaultSource.js ***!\n  \\*****************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (Math.random);\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-random/src/exponential.js\":\n/*!***************************************************!*\\\n  !*** ./node_modules/d3-random/src/exponential.js ***!\n  \\***************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _defaultSource_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./defaultSource.js */ \"./node_modules/d3-random/src/defaultSource.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ((function sourceRandomExponential(source) {\n  function randomExponential(lambda) {\n    return function() {\n      return -Math.log1p(-source()) / lambda;\n    };\n  }\n\n  randomExponential.source = sourceRandomExponential;\n\n  return randomExponential;\n})(_defaultSource_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]));\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-random/src/gamma.js\":\n/*!*********************************************!*\\\n  !*** ./node_modules/d3-random/src/gamma.js ***!\n  \\*********************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _defaultSource_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./defaultSource.js */ \"./node_modules/d3-random/src/defaultSource.js\");\n/* harmony import */ var _normal_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./normal.js */ \"./node_modules/d3-random/src/normal.js\");\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ((function sourceRandomGamma(source) {\n  var randomNormal = _normal_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"].source(source)();\n\n  function randomGamma(k, theta) {\n    if ((k = +k) < 0) throw new RangeError(\"invalid k\");\n    // degenerate distribution if k === 0\n    if (k === 0) return () => 0;\n    theta = theta == null ? 1 : +theta;\n    // exponential distribution if k === 1\n    if (k === 1) return () => -Math.log1p(-source()) * theta;\n\n    var d = (k < 1 ? k + 1 : k) - 1 / 3,\n        c = 1 / (3 * Math.sqrt(d)),\n        multiplier = k < 1 ? () => Math.pow(source(), 1 / k) : () => 1;\n    return function() {\n      do {\n        do {\n          var x = randomNormal(),\n              v = 1 + c * x;\n        } while (v <= 0);\n        v *= v * v;\n        var u = 1 - source();\n      } while (u >= 1 - 0.0331 * x * x * x * x && Math.log(u) >= 0.5 * x * x + d * (1 - v + Math.log(v)));\n      return d * v * multiplier() * theta;\n    };\n  }\n\n  randomGamma.source = sourceRandomGamma;\n\n  return randomGamma;\n})(_defaultSource_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]));\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-random/src/geometric.js\":\n/*!*************************************************!*\\\n  !*** ./node_modules/d3-random/src/geometric.js ***!\n  \\*************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _defaultSource_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./defaultSource.js */ \"./node_modules/d3-random/src/defaultSource.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ((function sourceRandomGeometric(source) {\n  function randomGeometric(p) {\n    if ((p = +p) < 0 || p > 1) throw new RangeError(\"invalid p\");\n    if (p === 0) return () => Infinity;\n    if (p === 1) return () => 1;\n    p = Math.log1p(-p);\n    return function() {\n      return 1 + Math.floor(Math.log1p(-source()) / p);\n    };\n  }\n\n  randomGeometric.source = sourceRandomGeometric;\n\n  return randomGeometric;\n})(_defaultSource_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]));\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-random/src/index.js\":\n/*!*********************************************!*\\\n  !*** ./node_modules/d3-random/src/index.js ***!\n  \\*********************************************/\n/*! exports provided: randomUniform, randomInt, randomNormal, randomLogNormal, randomBates, randomIrwinHall, randomExponential, randomPareto, randomBernoulli, randomGeometric, randomBinomial, randomGamma, randomBeta, randomWeibull, randomCauchy, randomLogistic, randomPoisson, randomLcg */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _uniform_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./uniform.js */ \"./node_modules/d3-random/src/uniform.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"randomUniform\", function() { return _uniform_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n/* harmony import */ var _int_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./int.js */ \"./node_modules/d3-random/src/int.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"randomInt\", function() { return _int_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"]; });\n\n/* harmony import */ var _normal_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./normal.js */ \"./node_modules/d3-random/src/normal.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"randomNormal\", function() { return _normal_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"]; });\n\n/* harmony import */ var _logNormal_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./logNormal.js */ \"./node_modules/d3-random/src/logNormal.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"randomLogNormal\", function() { return _logNormal_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"]; });\n\n/* harmony import */ var _bates_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./bates.js */ \"./node_modules/d3-random/src/bates.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"randomBates\", function() { return _bates_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"]; });\n\n/* harmony import */ var _irwinHall_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./irwinHall.js */ \"./node_modules/d3-random/src/irwinHall.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"randomIrwinHall\", function() { return _irwinHall_js__WEBPACK_IMPORTED_MODULE_5__[\"default\"]; });\n\n/* harmony import */ var _exponential_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./exponential.js */ \"./node_modules/d3-random/src/exponential.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"randomExponential\", function() { return _exponential_js__WEBPACK_IMPORTED_MODULE_6__[\"default\"]; });\n\n/* harmony import */ var _pareto_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./pareto.js */ \"./node_modules/d3-random/src/pareto.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"randomPareto\", function() { return _pareto_js__WEBPACK_IMPORTED_MODULE_7__[\"default\"]; });\n\n/* harmony import */ var _bernoulli_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./bernoulli.js */ \"./node_modules/d3-random/src/bernoulli.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"randomBernoulli\", function() { return _bernoulli_js__WEBPACK_IMPORTED_MODULE_8__[\"default\"]; });\n\n/* harmony import */ var _geometric_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./geometric.js */ \"./node_modules/d3-random/src/geometric.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"randomGeometric\", function() { return _geometric_js__WEBPACK_IMPORTED_MODULE_9__[\"default\"]; });\n\n/* harmony import */ var _binomial_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./binomial.js */ \"./node_modules/d3-random/src/binomial.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"randomBinomial\", function() { return _binomial_js__WEBPACK_IMPORTED_MODULE_10__[\"default\"]; });\n\n/* harmony import */ var _gamma_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./gamma.js */ \"./node_modules/d3-random/src/gamma.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"randomGamma\", function() { return _gamma_js__WEBPACK_IMPORTED_MODULE_11__[\"default\"]; });\n\n/* harmony import */ var _beta_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./beta.js */ \"./node_modules/d3-random/src/beta.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"randomBeta\", function() { return _beta_js__WEBPACK_IMPORTED_MODULE_12__[\"default\"]; });\n\n/* harmony import */ var _weibull_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./weibull.js */ \"./node_modules/d3-random/src/weibull.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"randomWeibull\", function() { return _weibull_js__WEBPACK_IMPORTED_MODULE_13__[\"default\"]; });\n\n/* harmony import */ var _cauchy_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./cauchy.js */ \"./node_modules/d3-random/src/cauchy.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"randomCauchy\", function() { return _cauchy_js__WEBPACK_IMPORTED_MODULE_14__[\"default\"]; });\n\n/* harmony import */ var _logistic_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./logistic.js */ \"./node_modules/d3-random/src/logistic.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"randomLogistic\", function() { return _logistic_js__WEBPACK_IMPORTED_MODULE_15__[\"default\"]; });\n\n/* harmony import */ var _poisson_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./poisson.js */ \"./node_modules/d3-random/src/poisson.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"randomPoisson\", function() { return _poisson_js__WEBPACK_IMPORTED_MODULE_16__[\"default\"]; });\n\n/* harmony import */ var _lcg_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./lcg.js */ \"./node_modules/d3-random/src/lcg.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"randomLcg\", function() { return _lcg_js__WEBPACK_IMPORTED_MODULE_17__[\"default\"]; });\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-random/src/int.js\":\n/*!*******************************************!*\\\n  !*** ./node_modules/d3-random/src/int.js ***!\n  \\*******************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _defaultSource_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./defaultSource.js */ \"./node_modules/d3-random/src/defaultSource.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ((function sourceRandomInt(source) {\n  function randomInt(min, max) {\n    if (arguments.length < 2) max = min, min = 0;\n    min = Math.floor(min);\n    max = Math.floor(max) - min;\n    return function() {\n      return Math.floor(source() * max + min);\n    };\n  }\n\n  randomInt.source = sourceRandomInt;\n\n  return randomInt;\n})(_defaultSource_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]));\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-random/src/irwinHall.js\":\n/*!*************************************************!*\\\n  !*** ./node_modules/d3-random/src/irwinHall.js ***!\n  \\*************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _defaultSource_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./defaultSource.js */ \"./node_modules/d3-random/src/defaultSource.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ((function sourceRandomIrwinHall(source) {\n  function randomIrwinHall(n) {\n    if ((n = +n) <= 0) return () => 0;\n    return function() {\n      for (var sum = 0, i = n; i > 1; --i) sum += source();\n      return sum + i * source();\n    };\n  }\n\n  randomIrwinHall.source = sourceRandomIrwinHall;\n\n  return randomIrwinHall;\n})(_defaultSource_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]));\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-random/src/lcg.js\":\n/*!*******************************************!*\\\n  !*** ./node_modules/d3-random/src/lcg.js ***!\n  \\*******************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return lcg; });\n// https://en.wikipedia.org/wiki/Linear_congruential_generator#Parameters_in_common_use\nconst mul = 0x19660D;\nconst inc = 0x3C6EF35F;\nconst eps = 1 / 0x100000000;\n\nfunction lcg(seed = Math.random()) {\n  let state = (0 <= seed && seed < 1 ? seed / eps : Math.abs(seed)) | 0;\n  return () => (state = mul * state + inc | 0, eps * (state >>> 0));\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-random/src/logNormal.js\":\n/*!*************************************************!*\\\n  !*** ./node_modules/d3-random/src/logNormal.js ***!\n  \\*************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _defaultSource_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./defaultSource.js */ \"./node_modules/d3-random/src/defaultSource.js\");\n/* harmony import */ var _normal_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./normal.js */ \"./node_modules/d3-random/src/normal.js\");\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ((function sourceRandomLogNormal(source) {\n  var N = _normal_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"].source(source);\n\n  function randomLogNormal() {\n    var randomNormal = N.apply(this, arguments);\n    return function() {\n      return Math.exp(randomNormal());\n    };\n  }\n\n  randomLogNormal.source = sourceRandomLogNormal;\n\n  return randomLogNormal;\n})(_defaultSource_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]));\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-random/src/logistic.js\":\n/*!************************************************!*\\\n  !*** ./node_modules/d3-random/src/logistic.js ***!\n  \\************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _defaultSource_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./defaultSource.js */ \"./node_modules/d3-random/src/defaultSource.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ((function sourceRandomLogistic(source) {\n  function randomLogistic(a, b) {\n    a = a == null ? 0 : +a;\n    b = b == null ? 1 : +b;\n    return function() {\n      var u = source();\n      return a + b * Math.log(u / (1 - u));\n    };\n  }\n\n  randomLogistic.source = sourceRandomLogistic;\n\n  return randomLogistic;\n})(_defaultSource_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]));\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-random/src/normal.js\":\n/*!**********************************************!*\\\n  !*** ./node_modules/d3-random/src/normal.js ***!\n  \\**********************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _defaultSource_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./defaultSource.js */ \"./node_modules/d3-random/src/defaultSource.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ((function sourceRandomNormal(source) {\n  function randomNormal(mu, sigma) {\n    var x, r;\n    mu = mu == null ? 0 : +mu;\n    sigma = sigma == null ? 1 : +sigma;\n    return function() {\n      var y;\n\n      // If available, use the second previously-generated uniform random.\n      if (x != null) y = x, x = null;\n\n      // Otherwise, generate a new x and y.\n      else do {\n        x = source() * 2 - 1;\n        y = source() * 2 - 1;\n        r = x * x + y * y;\n      } while (!r || r > 1);\n\n      return mu + sigma * y * Math.sqrt(-2 * Math.log(r) / r);\n    };\n  }\n\n  randomNormal.source = sourceRandomNormal;\n\n  return randomNormal;\n})(_defaultSource_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]));\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-random/src/pareto.js\":\n/*!**********************************************!*\\\n  !*** ./node_modules/d3-random/src/pareto.js ***!\n  \\**********************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _defaultSource_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./defaultSource.js */ \"./node_modules/d3-random/src/defaultSource.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ((function sourceRandomPareto(source) {\n  function randomPareto(alpha) {\n    if ((alpha = +alpha) < 0) throw new RangeError(\"invalid alpha\");\n    alpha = 1 / -alpha;\n    return function() {\n      return Math.pow(1 - source(), alpha);\n    };\n  }\n\n  randomPareto.source = sourceRandomPareto;\n\n  return randomPareto;\n})(_defaultSource_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]));\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-random/src/poisson.js\":\n/*!***********************************************!*\\\n  !*** ./node_modules/d3-random/src/poisson.js ***!\n  \\***********************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _defaultSource_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./defaultSource.js */ \"./node_modules/d3-random/src/defaultSource.js\");\n/* harmony import */ var _binomial_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./binomial.js */ \"./node_modules/d3-random/src/binomial.js\");\n/* harmony import */ var _gamma_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./gamma.js */ \"./node_modules/d3-random/src/gamma.js\");\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ((function sourceRandomPoisson(source) {\n  var G = _gamma_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"].source(source),\n      B = _binomial_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"].source(source);\n\n  function randomPoisson(lambda) {\n    return function() {\n      var acc = 0, l = lambda;\n      while (l > 16) {\n        var n = Math.floor(0.875 * l),\n            t = G(n)();\n        if (t > l) return acc + B(n - 1, l / t)();\n        acc += n;\n        l -= t;\n      }\n      for (var s = -Math.log1p(-source()), k = 0; s <= l; ++k) s -= Math.log1p(-source());\n      return acc + k;\n    };\n  }\n\n  randomPoisson.source = sourceRandomPoisson;\n\n  return randomPoisson;\n})(_defaultSource_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]));\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-random/src/uniform.js\":\n/*!***********************************************!*\\\n  !*** ./node_modules/d3-random/src/uniform.js ***!\n  \\***********************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _defaultSource_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./defaultSource.js */ \"./node_modules/d3-random/src/defaultSource.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ((function sourceRandomUniform(source) {\n  function randomUniform(min, max) {\n    min = min == null ? 0 : +min;\n    max = max == null ? 1 : +max;\n    if (arguments.length === 1) max = min, min = 0;\n    else max -= min;\n    return function() {\n      return source() * max + min;\n    };\n  }\n\n  randomUniform.source = sourceRandomUniform;\n\n  return randomUniform;\n})(_defaultSource_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]));\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-random/src/weibull.js\":\n/*!***********************************************!*\\\n  !*** ./node_modules/d3-random/src/weibull.js ***!\n  \\***********************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _defaultSource_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./defaultSource.js */ \"./node_modules/d3-random/src/defaultSource.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ((function sourceRandomWeibull(source) {\n  function randomWeibull(k, a, b) {\n    var outerFunc;\n    if ((k = +k) === 0) {\n      outerFunc = x => -Math.log(x);\n    } else {\n      k = 1 / k;\n      outerFunc = x => Math.pow(x, k);\n    }\n    a = a == null ? 0 : +a;\n    b = b == null ? 1 : +b;\n    return function() {\n      return a + b * outerFunc(-Math.log1p(-source()));\n    };\n  }\n\n  randomWeibull.source = sourceRandomWeibull;\n\n  return randomWeibull;\n})(_defaultSource_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]));\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale-chromatic/node_modules/d3-color/src/color.js\":\n/*!****************************************************************************!*\\\n  !*** ./node_modules/d3-scale-chromatic/node_modules/d3-color/src/color.js ***!\n  \\****************************************************************************/\n/*! exports provided: Color, darker, brighter, default, rgbConvert, rgb, Rgb, hslConvert, hsl */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Color\", function() { return Color; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"darker\", function() { return darker; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"brighter\", function() { return brighter; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return color; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"rgbConvert\", function() { return rgbConvert; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"rgb\", function() { return rgb; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Rgb\", function() { return Rgb; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"hslConvert\", function() { return hslConvert; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"hsl\", function() { return hsl; });\n/* harmony import */ var _define_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./define.js */ \"./node_modules/d3-scale-chromatic/node_modules/d3-color/src/define.js\");\n\n\nfunction Color() {}\n\nvar darker = 0.7;\nvar brighter = 1 / darker;\n\nvar reI = \"\\\\s*([+-]?\\\\d+)\\\\s*\",\n    reN = \"\\\\s*([+-]?\\\\d*\\\\.?\\\\d+(?:[eE][+-]?\\\\d+)?)\\\\s*\",\n    reP = \"\\\\s*([+-]?\\\\d*\\\\.?\\\\d+(?:[eE][+-]?\\\\d+)?)%\\\\s*\",\n    reHex = /^#([0-9a-f]{3,8})$/,\n    reRgbInteger = new RegExp(\"^rgb\\\\(\" + [reI, reI, reI] + \"\\\\)$\"),\n    reRgbPercent = new RegExp(\"^rgb\\\\(\" + [reP, reP, reP] + \"\\\\)$\"),\n    reRgbaInteger = new RegExp(\"^rgba\\\\(\" + [reI, reI, reI, reN] + \"\\\\)$\"),\n    reRgbaPercent = new RegExp(\"^rgba\\\\(\" + [reP, reP, reP, reN] + \"\\\\)$\"),\n    reHslPercent = new RegExp(\"^hsl\\\\(\" + [reN, reP, reP] + \"\\\\)$\"),\n    reHslaPercent = new RegExp(\"^hsla\\\\(\" + [reN, reP, reP, reN] + \"\\\\)$\");\n\nvar named = {\n  aliceblue: 0xf0f8ff,\n  antiquewhite: 0xfaebd7,\n  aqua: 0x00ffff,\n  aquamarine: 0x7fffd4,\n  azure: 0xf0ffff,\n  beige: 0xf5f5dc,\n  bisque: 0xffe4c4,\n  black: 0x000000,\n  blanchedalmond: 0xffebcd,\n  blue: 0x0000ff,\n  blueviolet: 0x8a2be2,\n  brown: 0xa52a2a,\n  burlywood: 0xdeb887,\n  cadetblue: 0x5f9ea0,\n  chartreuse: 0x7fff00,\n  chocolate: 0xd2691e,\n  coral: 0xff7f50,\n  cornflowerblue: 0x6495ed,\n  cornsilk: 0xfff8dc,\n  crimson: 0xdc143c,\n  cyan: 0x00ffff,\n  darkblue: 0x00008b,\n  darkcyan: 0x008b8b,\n  darkgoldenrod: 0xb8860b,\n  darkgray: 0xa9a9a9,\n  darkgreen: 0x006400,\n  darkgrey: 0xa9a9a9,\n  darkkhaki: 0xbdb76b,\n  darkmagenta: 0x8b008b,\n  darkolivegreen: 0x556b2f,\n  darkorange: 0xff8c00,\n  darkorchid: 0x9932cc,\n  darkred: 0x8b0000,\n  darksalmon: 0xe9967a,\n  darkseagreen: 0x8fbc8f,\n  darkslateblue: 0x483d8b,\n  darkslategray: 0x2f4f4f,\n  darkslategrey: 0x2f4f4f,\n  darkturquoise: 0x00ced1,\n  darkviolet: 0x9400d3,\n  deeppink: 0xff1493,\n  deepskyblue: 0x00bfff,\n  dimgray: 0x696969,\n  dimgrey: 0x696969,\n  dodgerblue: 0x1e90ff,\n  firebrick: 0xb22222,\n  floralwhite: 0xfffaf0,\n  forestgreen: 0x228b22,\n  fuchsia: 0xff00ff,\n  gainsboro: 0xdcdcdc,\n  ghostwhite: 0xf8f8ff,\n  gold: 0xffd700,\n  goldenrod: 0xdaa520,\n  gray: 0x808080,\n  green: 0x008000,\n  greenyellow: 0xadff2f,\n  grey: 0x808080,\n  honeydew: 0xf0fff0,\n  hotpink: 0xff69b4,\n  indianred: 0xcd5c5c,\n  indigo: 0x4b0082,\n  ivory: 0xfffff0,\n  khaki: 0xf0e68c,\n  lavender: 0xe6e6fa,\n  lavenderblush: 0xfff0f5,\n  lawngreen: 0x7cfc00,\n  lemonchiffon: 0xfffacd,\n  lightblue: 0xadd8e6,\n  lightcoral: 0xf08080,\n  lightcyan: 0xe0ffff,\n  lightgoldenrodyellow: 0xfafad2,\n  lightgray: 0xd3d3d3,\n  lightgreen: 0x90ee90,\n  lightgrey: 0xd3d3d3,\n  lightpink: 0xffb6c1,\n  lightsalmon: 0xffa07a,\n  lightseagreen: 0x20b2aa,\n  lightskyblue: 0x87cefa,\n  lightslategray: 0x778899,\n  lightslategrey: 0x778899,\n  lightsteelblue: 0xb0c4de,\n  lightyellow: 0xffffe0,\n  lime: 0x00ff00,\n  limegreen: 0x32cd32,\n  linen: 0xfaf0e6,\n  magenta: 0xff00ff,\n  maroon: 0x800000,\n  mediumaquamarine: 0x66cdaa,\n  mediumblue: 0x0000cd,\n  mediumorchid: 0xba55d3,\n  mediumpurple: 0x9370db,\n  mediumseagreen: 0x3cb371,\n  mediumslateblue: 0x7b68ee,\n  mediumspringgreen: 0x00fa9a,\n  mediumturquoise: 0x48d1cc,\n  mediumvioletred: 0xc71585,\n  midnightblue: 0x191970,\n  mintcream: 0xf5fffa,\n  mistyrose: 0xffe4e1,\n  moccasin: 0xffe4b5,\n  navajowhite: 0xffdead,\n  navy: 0x000080,\n  oldlace: 0xfdf5e6,\n  olive: 0x808000,\n  olivedrab: 0x6b8e23,\n  orange: 0xffa500,\n  orangered: 0xff4500,\n  orchid: 0xda70d6,\n  palegoldenrod: 0xeee8aa,\n  palegreen: 0x98fb98,\n  paleturquoise: 0xafeeee,\n  palevioletred: 0xdb7093,\n  papayawhip: 0xffefd5,\n  peachpuff: 0xffdab9,\n  peru: 0xcd853f,\n  pink: 0xffc0cb,\n  plum: 0xdda0dd,\n  powderblue: 0xb0e0e6,\n  purple: 0x800080,\n  rebeccapurple: 0x663399,\n  red: 0xff0000,\n  rosybrown: 0xbc8f8f,\n  royalblue: 0x4169e1,\n  saddlebrown: 0x8b4513,\n  salmon: 0xfa8072,\n  sandybrown: 0xf4a460,\n  seagreen: 0x2e8b57,\n  seashell: 0xfff5ee,\n  sienna: 0xa0522d,\n  silver: 0xc0c0c0,\n  skyblue: 0x87ceeb,\n  slateblue: 0x6a5acd,\n  slategray: 0x708090,\n  slategrey: 0x708090,\n  snow: 0xfffafa,\n  springgreen: 0x00ff7f,\n  steelblue: 0x4682b4,\n  tan: 0xd2b48c,\n  teal: 0x008080,\n  thistle: 0xd8bfd8,\n  tomato: 0xff6347,\n  turquoise: 0x40e0d0,\n  violet: 0xee82ee,\n  wheat: 0xf5deb3,\n  white: 0xffffff,\n  whitesmoke: 0xf5f5f5,\n  yellow: 0xffff00,\n  yellowgreen: 0x9acd32\n};\n\nObject(_define_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(Color, color, {\n  copy: function(channels) {\n    return Object.assign(new this.constructor, this, channels);\n  },\n  displayable: function() {\n    return this.rgb().displayable();\n  },\n  hex: color_formatHex, // Deprecated! Use color.formatHex.\n  formatHex: color_formatHex,\n  formatHsl: color_formatHsl,\n  formatRgb: color_formatRgb,\n  toString: color_formatRgb\n});\n\nfunction color_formatHex() {\n  return this.rgb().formatHex();\n}\n\nfunction color_formatHsl() {\n  return hslConvert(this).formatHsl();\n}\n\nfunction color_formatRgb() {\n  return this.rgb().formatRgb();\n}\n\nfunction color(format) {\n  var m, l;\n  format = (format + \"\").trim().toLowerCase();\n  return (m = reHex.exec(format)) ? (l = m[1].length, m = parseInt(m[1], 16), l === 6 ? rgbn(m) // #ff0000\n      : l === 3 ? new Rgb((m >> 8 & 0xf) | (m >> 4 & 0xf0), (m >> 4 & 0xf) | (m & 0xf0), ((m & 0xf) << 4) | (m & 0xf), 1) // #f00\n      : l === 8 ? rgba(m >> 24 & 0xff, m >> 16 & 0xff, m >> 8 & 0xff, (m & 0xff) / 0xff) // #ff000000\n      : l === 4 ? rgba((m >> 12 & 0xf) | (m >> 8 & 0xf0), (m >> 8 & 0xf) | (m >> 4 & 0xf0), (m >> 4 & 0xf) | (m & 0xf0), (((m & 0xf) << 4) | (m & 0xf)) / 0xff) // #f000\n      : null) // invalid hex\n      : (m = reRgbInteger.exec(format)) ? new Rgb(m[1], m[2], m[3], 1) // rgb(255, 0, 0)\n      : (m = reRgbPercent.exec(format)) ? new Rgb(m[1] * 255 / 100, m[2] * 255 / 100, m[3] * 255 / 100, 1) // rgb(100%, 0%, 0%)\n      : (m = reRgbaInteger.exec(format)) ? rgba(m[1], m[2], m[3], m[4]) // rgba(255, 0, 0, 1)\n      : (m = reRgbaPercent.exec(format)) ? rgba(m[1] * 255 / 100, m[2] * 255 / 100, m[3] * 255 / 100, m[4]) // rgb(100%, 0%, 0%, 1)\n      : (m = reHslPercent.exec(format)) ? hsla(m[1], m[2] / 100, m[3] / 100, 1) // hsl(120, 50%, 50%)\n      : (m = reHslaPercent.exec(format)) ? hsla(m[1], m[2] / 100, m[3] / 100, m[4]) // hsla(120, 50%, 50%, 1)\n      : named.hasOwnProperty(format) ? rgbn(named[format]) // eslint-disable-line no-prototype-builtins\n      : format === \"transparent\" ? new Rgb(NaN, NaN, NaN, 0)\n      : null;\n}\n\nfunction rgbn(n) {\n  return new Rgb(n >> 16 & 0xff, n >> 8 & 0xff, n & 0xff, 1);\n}\n\nfunction rgba(r, g, b, a) {\n  if (a <= 0) r = g = b = NaN;\n  return new Rgb(r, g, b, a);\n}\n\nfunction rgbConvert(o) {\n  if (!(o instanceof Color)) o = color(o);\n  if (!o) return new Rgb;\n  o = o.rgb();\n  return new Rgb(o.r, o.g, o.b, o.opacity);\n}\n\nfunction rgb(r, g, b, opacity) {\n  return arguments.length === 1 ? rgbConvert(r) : new Rgb(r, g, b, opacity == null ? 1 : opacity);\n}\n\nfunction Rgb(r, g, b, opacity) {\n  this.r = +r;\n  this.g = +g;\n  this.b = +b;\n  this.opacity = +opacity;\n}\n\nObject(_define_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(Rgb, rgb, Object(_define_js__WEBPACK_IMPORTED_MODULE_0__[\"extend\"])(Color, {\n  brighter: function(k) {\n    k = k == null ? brighter : Math.pow(brighter, k);\n    return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity);\n  },\n  darker: function(k) {\n    k = k == null ? darker : Math.pow(darker, k);\n    return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity);\n  },\n  rgb: function() {\n    return this;\n  },\n  displayable: function() {\n    return (-0.5 <= this.r && this.r < 255.5)\n        && (-0.5 <= this.g && this.g < 255.5)\n        && (-0.5 <= this.b && this.b < 255.5)\n        && (0 <= this.opacity && this.opacity <= 1);\n  },\n  hex: rgb_formatHex, // Deprecated! Use color.formatHex.\n  formatHex: rgb_formatHex,\n  formatRgb: rgb_formatRgb,\n  toString: rgb_formatRgb\n}));\n\nfunction rgb_formatHex() {\n  return \"#\" + hex(this.r) + hex(this.g) + hex(this.b);\n}\n\nfunction rgb_formatRgb() {\n  var a = this.opacity; a = isNaN(a) ? 1 : Math.max(0, Math.min(1, a));\n  return (a === 1 ? \"rgb(\" : \"rgba(\")\n      + Math.max(0, Math.min(255, Math.round(this.r) || 0)) + \", \"\n      + Math.max(0, Math.min(255, Math.round(this.g) || 0)) + \", \"\n      + Math.max(0, Math.min(255, Math.round(this.b) || 0))\n      + (a === 1 ? \")\" : \", \" + a + \")\");\n}\n\nfunction hex(value) {\n  value = Math.max(0, Math.min(255, Math.round(value) || 0));\n  return (value < 16 ? \"0\" : \"\") + value.toString(16);\n}\n\nfunction hsla(h, s, l, a) {\n  if (a <= 0) h = s = l = NaN;\n  else if (l <= 0 || l >= 1) h = s = NaN;\n  else if (s <= 0) h = NaN;\n  return new Hsl(h, s, l, a);\n}\n\nfunction hslConvert(o) {\n  if (o instanceof Hsl) return new Hsl(o.h, o.s, o.l, o.opacity);\n  if (!(o instanceof Color)) o = color(o);\n  if (!o) return new Hsl;\n  if (o instanceof Hsl) return o;\n  o = o.rgb();\n  var r = o.r / 255,\n      g = o.g / 255,\n      b = o.b / 255,\n      min = Math.min(r, g, b),\n      max = Math.max(r, g, b),\n      h = NaN,\n      s = max - min,\n      l = (max + min) / 2;\n  if (s) {\n    if (r === max) h = (g - b) / s + (g < b) * 6;\n    else if (g === max) h = (b - r) / s + 2;\n    else h = (r - g) / s + 4;\n    s /= l < 0.5 ? max + min : 2 - max - min;\n    h *= 60;\n  } else {\n    s = l > 0 && l < 1 ? 0 : h;\n  }\n  return new Hsl(h, s, l, o.opacity);\n}\n\nfunction hsl(h, s, l, opacity) {\n  return arguments.length === 1 ? hslConvert(h) : new Hsl(h, s, l, opacity == null ? 1 : opacity);\n}\n\nfunction Hsl(h, s, l, opacity) {\n  this.h = +h;\n  this.s = +s;\n  this.l = +l;\n  this.opacity = +opacity;\n}\n\nObject(_define_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(Hsl, hsl, Object(_define_js__WEBPACK_IMPORTED_MODULE_0__[\"extend\"])(Color, {\n  brighter: function(k) {\n    k = k == null ? brighter : Math.pow(brighter, k);\n    return new Hsl(this.h, this.s, this.l * k, this.opacity);\n  },\n  darker: function(k) {\n    k = k == null ? darker : Math.pow(darker, k);\n    return new Hsl(this.h, this.s, this.l * k, this.opacity);\n  },\n  rgb: function() {\n    var h = this.h % 360 + (this.h < 0) * 360,\n        s = isNaN(h) || isNaN(this.s) ? 0 : this.s,\n        l = this.l,\n        m2 = l + (l < 0.5 ? l : 1 - l) * s,\n        m1 = 2 * l - m2;\n    return new Rgb(\n      hsl2rgb(h >= 240 ? h - 240 : h + 120, m1, m2),\n      hsl2rgb(h, m1, m2),\n      hsl2rgb(h < 120 ? h + 240 : h - 120, m1, m2),\n      this.opacity\n    );\n  },\n  displayable: function() {\n    return (0 <= this.s && this.s <= 1 || isNaN(this.s))\n        && (0 <= this.l && this.l <= 1)\n        && (0 <= this.opacity && this.opacity <= 1);\n  },\n  formatHsl: function() {\n    var a = this.opacity; a = isNaN(a) ? 1 : Math.max(0, Math.min(1, a));\n    return (a === 1 ? \"hsl(\" : \"hsla(\")\n        + (this.h || 0) + \", \"\n        + (this.s || 0) * 100 + \"%, \"\n        + (this.l || 0) * 100 + \"%\"\n        + (a === 1 ? \")\" : \", \" + a + \")\");\n  }\n}));\n\n/* From FvD 13.37, CSS Color Module Level 3 */\nfunction hsl2rgb(h, m1, m2) {\n  return (h < 60 ? m1 + (m2 - m1) * h / 60\n      : h < 180 ? m2\n      : h < 240 ? m1 + (m2 - m1) * (240 - h) / 60\n      : m1) * 255;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale-chromatic/node_modules/d3-color/src/cubehelix.js\":\n/*!********************************************************************************!*\\\n  !*** ./node_modules/d3-scale-chromatic/node_modules/d3-color/src/cubehelix.js ***!\n  \\********************************************************************************/\n/*! exports provided: default, Cubehelix */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return cubehelix; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Cubehelix\", function() { return Cubehelix; });\n/* harmony import */ var _define_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./define.js */ \"./node_modules/d3-scale-chromatic/node_modules/d3-color/src/define.js\");\n/* harmony import */ var _color_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./color.js */ \"./node_modules/d3-scale-chromatic/node_modules/d3-color/src/color.js\");\n/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./math.js */ \"./node_modules/d3-scale-chromatic/node_modules/d3-color/src/math.js\");\n\n\n\n\nvar A = -0.14861,\n    B = +1.78277,\n    C = -0.29227,\n    D = -0.90649,\n    E = +1.97294,\n    ED = E * D,\n    EB = E * B,\n    BC_DA = B * C - D * A;\n\nfunction cubehelixConvert(o) {\n  if (o instanceof Cubehelix) return new Cubehelix(o.h, o.s, o.l, o.opacity);\n  if (!(o instanceof _color_js__WEBPACK_IMPORTED_MODULE_1__[\"Rgb\"])) o = Object(_color_js__WEBPACK_IMPORTED_MODULE_1__[\"rgbConvert\"])(o);\n  var r = o.r / 255,\n      g = o.g / 255,\n      b = o.b / 255,\n      l = (BC_DA * b + ED * r - EB * g) / (BC_DA + ED - EB),\n      bl = b - l,\n      k = (E * (g - l) - C * bl) / D,\n      s = Math.sqrt(k * k + bl * bl) / (E * l * (1 - l)), // NaN if l=0 or l=1\n      h = s ? Math.atan2(k, bl) * _math_js__WEBPACK_IMPORTED_MODULE_2__[\"degrees\"] - 120 : NaN;\n  return new Cubehelix(h < 0 ? h + 360 : h, s, l, o.opacity);\n}\n\nfunction cubehelix(h, s, l, opacity) {\n  return arguments.length === 1 ? cubehelixConvert(h) : new Cubehelix(h, s, l, opacity == null ? 1 : opacity);\n}\n\nfunction Cubehelix(h, s, l, opacity) {\n  this.h = +h;\n  this.s = +s;\n  this.l = +l;\n  this.opacity = +opacity;\n}\n\nObject(_define_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(Cubehelix, cubehelix, Object(_define_js__WEBPACK_IMPORTED_MODULE_0__[\"extend\"])(_color_js__WEBPACK_IMPORTED_MODULE_1__[\"Color\"], {\n  brighter: function(k) {\n    k = k == null ? _color_js__WEBPACK_IMPORTED_MODULE_1__[\"brighter\"] : Math.pow(_color_js__WEBPACK_IMPORTED_MODULE_1__[\"brighter\"], k);\n    return new Cubehelix(this.h, this.s, this.l * k, this.opacity);\n  },\n  darker: function(k) {\n    k = k == null ? _color_js__WEBPACK_IMPORTED_MODULE_1__[\"darker\"] : Math.pow(_color_js__WEBPACK_IMPORTED_MODULE_1__[\"darker\"], k);\n    return new Cubehelix(this.h, this.s, this.l * k, this.opacity);\n  },\n  rgb: function() {\n    var h = isNaN(this.h) ? 0 : (this.h + 120) * _math_js__WEBPACK_IMPORTED_MODULE_2__[\"radians\"],\n        l = +this.l,\n        a = isNaN(this.s) ? 0 : this.s * l * (1 - l),\n        cosh = Math.cos(h),\n        sinh = Math.sin(h);\n    return new _color_js__WEBPACK_IMPORTED_MODULE_1__[\"Rgb\"](\n      255 * (l + a * (A * cosh + B * sinh)),\n      255 * (l + a * (C * cosh + D * sinh)),\n      255 * (l + a * (E * cosh)),\n      this.opacity\n    );\n  }\n}));\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale-chromatic/node_modules/d3-color/src/define.js\":\n/*!*****************************************************************************!*\\\n  !*** ./node_modules/d3-scale-chromatic/node_modules/d3-color/src/define.js ***!\n  \\*****************************************************************************/\n/*! exports provided: default, extend */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"extend\", function() { return extend; });\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(constructor, factory, prototype) {\n  constructor.prototype = factory.prototype = prototype;\n  prototype.constructor = constructor;\n});\n\nfunction extend(parent, definition) {\n  var prototype = Object.create(parent.prototype);\n  for (var key in definition) prototype[key] = definition[key];\n  return prototype;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale-chromatic/node_modules/d3-color/src/index.js\":\n/*!****************************************************************************!*\\\n  !*** ./node_modules/d3-scale-chromatic/node_modules/d3-color/src/index.js ***!\n  \\****************************************************************************/\n/*! exports provided: color, rgb, hsl, lab, hcl, lch, gray, cubehelix */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _color_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./color.js */ \"./node_modules/d3-scale-chromatic/node_modules/d3-color/src/color.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"color\", function() { return _color_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"rgb\", function() { return _color_js__WEBPACK_IMPORTED_MODULE_0__[\"rgb\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"hsl\", function() { return _color_js__WEBPACK_IMPORTED_MODULE_0__[\"hsl\"]; });\n\n/* harmony import */ var _lab_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./lab.js */ \"./node_modules/d3-scale-chromatic/node_modules/d3-color/src/lab.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"lab\", function() { return _lab_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"hcl\", function() { return _lab_js__WEBPACK_IMPORTED_MODULE_1__[\"hcl\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"lch\", function() { return _lab_js__WEBPACK_IMPORTED_MODULE_1__[\"lch\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"gray\", function() { return _lab_js__WEBPACK_IMPORTED_MODULE_1__[\"gray\"]; });\n\n/* harmony import */ var _cubehelix_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./cubehelix.js */ \"./node_modules/d3-scale-chromatic/node_modules/d3-color/src/cubehelix.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"cubehelix\", function() { return _cubehelix_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"]; });\n\n\n\n\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale-chromatic/node_modules/d3-color/src/lab.js\":\n/*!**************************************************************************!*\\\n  !*** ./node_modules/d3-scale-chromatic/node_modules/d3-color/src/lab.js ***!\n  \\**************************************************************************/\n/*! exports provided: gray, default, Lab, lch, hcl, Hcl */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"gray\", function() { return gray; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return lab; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Lab\", function() { return Lab; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"lch\", function() { return lch; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"hcl\", function() { return hcl; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Hcl\", function() { return Hcl; });\n/* harmony import */ var _define_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./define.js */ \"./node_modules/d3-scale-chromatic/node_modules/d3-color/src/define.js\");\n/* harmony import */ var _color_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./color.js */ \"./node_modules/d3-scale-chromatic/node_modules/d3-color/src/color.js\");\n/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./math.js */ \"./node_modules/d3-scale-chromatic/node_modules/d3-color/src/math.js\");\n\n\n\n\n// https://observablehq.com/@mbostock/lab-and-rgb\nconst K = 18,\n    Xn = 0.96422,\n    Yn = 1,\n    Zn = 0.82521,\n    t0 = 4 / 29,\n    t1 = 6 / 29,\n    t2 = 3 * t1 * t1,\n    t3 = t1 * t1 * t1;\n\nfunction labConvert(o) {\n  if (o instanceof Lab) return new Lab(o.l, o.a, o.b, o.opacity);\n  if (o instanceof Hcl) return hcl2lab(o);\n  if (!(o instanceof _color_js__WEBPACK_IMPORTED_MODULE_1__[\"Rgb\"])) o = Object(_color_js__WEBPACK_IMPORTED_MODULE_1__[\"rgbConvert\"])(o);\n  var r = rgb2lrgb(o.r),\n      g = rgb2lrgb(o.g),\n      b = rgb2lrgb(o.b),\n      y = xyz2lab((0.2225045 * r + 0.7168786 * g + 0.0606169 * b) / Yn), x, z;\n  if (r === g && g === b) x = z = y; else {\n    x = xyz2lab((0.4360747 * r + 0.3850649 * g + 0.1430804 * b) / Xn);\n    z = xyz2lab((0.0139322 * r + 0.0971045 * g + 0.7141733 * b) / Zn);\n  }\n  return new Lab(116 * y - 16, 500 * (x - y), 200 * (y - z), o.opacity);\n}\n\nfunction gray(l, opacity) {\n  return new Lab(l, 0, 0, opacity == null ? 1 : opacity);\n}\n\nfunction lab(l, a, b, opacity) {\n  return arguments.length === 1 ? labConvert(l) : new Lab(l, a, b, opacity == null ? 1 : opacity);\n}\n\nfunction Lab(l, a, b, opacity) {\n  this.l = +l;\n  this.a = +a;\n  this.b = +b;\n  this.opacity = +opacity;\n}\n\nObject(_define_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(Lab, lab, Object(_define_js__WEBPACK_IMPORTED_MODULE_0__[\"extend\"])(_color_js__WEBPACK_IMPORTED_MODULE_1__[\"Color\"], {\n  brighter: function(k) {\n    return new Lab(this.l + K * (k == null ? 1 : k), this.a, this.b, this.opacity);\n  },\n  darker: function(k) {\n    return new Lab(this.l - K * (k == null ? 1 : k), this.a, this.b, this.opacity);\n  },\n  rgb: function() {\n    var y = (this.l + 16) / 116,\n        x = isNaN(this.a) ? y : y + this.a / 500,\n        z = isNaN(this.b) ? y : y - this.b / 200;\n    x = Xn * lab2xyz(x);\n    y = Yn * lab2xyz(y);\n    z = Zn * lab2xyz(z);\n    return new _color_js__WEBPACK_IMPORTED_MODULE_1__[\"Rgb\"](\n      lrgb2rgb( 3.1338561 * x - 1.6168667 * y - 0.4906146 * z),\n      lrgb2rgb(-0.9787684 * x + 1.9161415 * y + 0.0334540 * z),\n      lrgb2rgb( 0.0719453 * x - 0.2289914 * y + 1.4052427 * z),\n      this.opacity\n    );\n  }\n}));\n\nfunction xyz2lab(t) {\n  return t > t3 ? Math.pow(t, 1 / 3) : t / t2 + t0;\n}\n\nfunction lab2xyz(t) {\n  return t > t1 ? t * t * t : t2 * (t - t0);\n}\n\nfunction lrgb2rgb(x) {\n  return 255 * (x <= 0.0031308 ? 12.92 * x : 1.055 * Math.pow(x, 1 / 2.4) - 0.055);\n}\n\nfunction rgb2lrgb(x) {\n  return (x /= 255) <= 0.04045 ? x / 12.92 : Math.pow((x + 0.055) / 1.055, 2.4);\n}\n\nfunction hclConvert(o) {\n  if (o instanceof Hcl) return new Hcl(o.h, o.c, o.l, o.opacity);\n  if (!(o instanceof Lab)) o = labConvert(o);\n  if (o.a === 0 && o.b === 0) return new Hcl(NaN, 0 < o.l && o.l < 100 ? 0 : NaN, o.l, o.opacity);\n  var h = Math.atan2(o.b, o.a) * _math_js__WEBPACK_IMPORTED_MODULE_2__[\"degrees\"];\n  return new Hcl(h < 0 ? h + 360 : h, Math.sqrt(o.a * o.a + o.b * o.b), o.l, o.opacity);\n}\n\nfunction lch(l, c, h, opacity) {\n  return arguments.length === 1 ? hclConvert(l) : new Hcl(h, c, l, opacity == null ? 1 : opacity);\n}\n\nfunction hcl(h, c, l, opacity) {\n  return arguments.length === 1 ? hclConvert(h) : new Hcl(h, c, l, opacity == null ? 1 : opacity);\n}\n\nfunction Hcl(h, c, l, opacity) {\n  this.h = +h;\n  this.c = +c;\n  this.l = +l;\n  this.opacity = +opacity;\n}\n\nfunction hcl2lab(o) {\n  if (isNaN(o.h)) return new Lab(o.l, 0, 0, o.opacity);\n  var h = o.h * _math_js__WEBPACK_IMPORTED_MODULE_2__[\"radians\"];\n  return new Lab(o.l, Math.cos(h) * o.c, Math.sin(h) * o.c, o.opacity);\n}\n\nObject(_define_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(Hcl, hcl, Object(_define_js__WEBPACK_IMPORTED_MODULE_0__[\"extend\"])(_color_js__WEBPACK_IMPORTED_MODULE_1__[\"Color\"], {\n  brighter: function(k) {\n    return new Hcl(this.h, this.c, this.l + K * (k == null ? 1 : k), this.opacity);\n  },\n  darker: function(k) {\n    return new Hcl(this.h, this.c, this.l - K * (k == null ? 1 : k), this.opacity);\n  },\n  rgb: function() {\n    return hcl2lab(this).rgb();\n  }\n}));\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale-chromatic/node_modules/d3-color/src/math.js\":\n/*!***************************************************************************!*\\\n  !*** ./node_modules/d3-scale-chromatic/node_modules/d3-color/src/math.js ***!\n  \\***************************************************************************/\n/*! exports provided: radians, degrees */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"radians\", function() { return radians; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"degrees\", function() { return degrees; });\nconst radians = Math.PI / 180;\nconst degrees = 180 / Math.PI;\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale-chromatic/node_modules/d3-interpolate/src/array.js\":\n/*!**********************************************************************************!*\\\n  !*** ./node_modules/d3-scale-chromatic/node_modules/d3-interpolate/src/array.js ***!\n  \\**********************************************************************************/\n/*! exports provided: default, genericArray */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"genericArray\", function() { return genericArray; });\n/* harmony import */ var _value_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./value.js */ \"./node_modules/d3-scale-chromatic/node_modules/d3-interpolate/src/value.js\");\n/* harmony import */ var _numberArray_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./numberArray.js */ \"./node_modules/d3-scale-chromatic/node_modules/d3-interpolate/src/numberArray.js\");\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(a, b) {\n  return (Object(_numberArray_js__WEBPACK_IMPORTED_MODULE_1__[\"isNumberArray\"])(b) ? _numberArray_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"] : genericArray)(a, b);\n});\n\nfunction genericArray(a, b) {\n  var nb = b ? b.length : 0,\n      na = a ? Math.min(nb, a.length) : 0,\n      x = new Array(na),\n      c = new Array(nb),\n      i;\n\n  for (i = 0; i < na; ++i) x[i] = Object(_value_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(a[i], b[i]);\n  for (; i < nb; ++i) c[i] = b[i];\n\n  return function(t) {\n    for (i = 0; i < na; ++i) c[i] = x[i](t);\n    return c;\n  };\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale-chromatic/node_modules/d3-interpolate/src/basis.js\":\n/*!**********************************************************************************!*\\\n  !*** ./node_modules/d3-scale-chromatic/node_modules/d3-interpolate/src/basis.js ***!\n  \\**********************************************************************************/\n/*! exports provided: basis, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"basis\", function() { return basis; });\nfunction basis(t1, v0, v1, v2, v3) {\n  var t2 = t1 * t1, t3 = t2 * t1;\n  return ((1 - 3 * t1 + 3 * t2 - t3) * v0\n      + (4 - 6 * t2 + 3 * t3) * v1\n      + (1 + 3 * t1 + 3 * t2 - 3 * t3) * v2\n      + t3 * v3) / 6;\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(values) {\n  var n = values.length - 1;\n  return function(t) {\n    var i = t <= 0 ? (t = 0) : t >= 1 ? (t = 1, n - 1) : Math.floor(t * n),\n        v1 = values[i],\n        v2 = values[i + 1],\n        v0 = i > 0 ? values[i - 1] : 2 * v1 - v2,\n        v3 = i < n - 1 ? values[i + 2] : 2 * v2 - v1;\n    return basis((t - i / n) * n, v0, v1, v2, v3);\n  };\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale-chromatic/node_modules/d3-interpolate/src/basisClosed.js\":\n/*!****************************************************************************************!*\\\n  !*** ./node_modules/d3-scale-chromatic/node_modules/d3-interpolate/src/basisClosed.js ***!\n  \\****************************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _basis_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./basis.js */ \"./node_modules/d3-scale-chromatic/node_modules/d3-interpolate/src/basis.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(values) {\n  var n = values.length;\n  return function(t) {\n    var i = Math.floor(((t %= 1) < 0 ? ++t : t) * n),\n        v0 = values[(i + n - 1) % n],\n        v1 = values[i % n],\n        v2 = values[(i + 1) % n],\n        v3 = values[(i + 2) % n];\n    return Object(_basis_js__WEBPACK_IMPORTED_MODULE_0__[\"basis\"])((t - i / n) * n, v0, v1, v2, v3);\n  };\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale-chromatic/node_modules/d3-interpolate/src/color.js\":\n/*!**********************************************************************************!*\\\n  !*** ./node_modules/d3-scale-chromatic/node_modules/d3-interpolate/src/color.js ***!\n  \\**********************************************************************************/\n/*! exports provided: hue, gamma, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"hue\", function() { return hue; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"gamma\", function() { return gamma; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return nogamma; });\n/* harmony import */ var _constant_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./constant.js */ \"./node_modules/d3-scale-chromatic/node_modules/d3-interpolate/src/constant.js\");\n\n\nfunction linear(a, d) {\n  return function(t) {\n    return a + t * d;\n  };\n}\n\nfunction exponential(a, b, y) {\n  return a = Math.pow(a, y), b = Math.pow(b, y) - a, y = 1 / y, function(t) {\n    return Math.pow(a + t * b, y);\n  };\n}\n\nfunction hue(a, b) {\n  var d = b - a;\n  return d ? linear(a, d > 180 || d < -180 ? d - 360 * Math.round(d / 360) : d) : Object(_constant_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(isNaN(a) ? b : a);\n}\n\nfunction gamma(y) {\n  return (y = +y) === 1 ? nogamma : function(a, b) {\n    return b - a ? exponential(a, b, y) : Object(_constant_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(isNaN(a) ? b : a);\n  };\n}\n\nfunction nogamma(a, b) {\n  var d = b - a;\n  return d ? linear(a, d) : Object(_constant_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(isNaN(a) ? b : a);\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale-chromatic/node_modules/d3-interpolate/src/constant.js\":\n/*!*************************************************************************************!*\\\n  !*** ./node_modules/d3-scale-chromatic/node_modules/d3-interpolate/src/constant.js ***!\n  \\*************************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (x => () => x);\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale-chromatic/node_modules/d3-interpolate/src/cubehelix.js\":\n/*!**************************************************************************************!*\\\n  !*** ./node_modules/d3-scale-chromatic/node_modules/d3-interpolate/src/cubehelix.js ***!\n  \\**************************************************************************************/\n/*! exports provided: default, cubehelixLong */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"cubehelixLong\", function() { return cubehelixLong; });\n/* harmony import */ var d3_color__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-color */ \"./node_modules/d3-scale-chromatic/node_modules/d3-color/src/index.js\");\n/* harmony import */ var _color_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./color.js */ \"./node_modules/d3-scale-chromatic/node_modules/d3-interpolate/src/color.js\");\n\n\n\nfunction cubehelix(hue) {\n  return (function cubehelixGamma(y) {\n    y = +y;\n\n    function cubehelix(start, end) {\n      var h = hue((start = Object(d3_color__WEBPACK_IMPORTED_MODULE_0__[\"cubehelix\"])(start)).h, (end = Object(d3_color__WEBPACK_IMPORTED_MODULE_0__[\"cubehelix\"])(end)).h),\n          s = Object(_color_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(start.s, end.s),\n          l = Object(_color_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(start.l, end.l),\n          opacity = Object(_color_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(start.opacity, end.opacity);\n      return function(t) {\n        start.h = h(t);\n        start.s = s(t);\n        start.l = l(Math.pow(t, y));\n        start.opacity = opacity(t);\n        return start + \"\";\n      };\n    }\n\n    cubehelix.gamma = cubehelixGamma;\n\n    return cubehelix;\n  })(1);\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (cubehelix(_color_js__WEBPACK_IMPORTED_MODULE_1__[\"hue\"]));\nvar cubehelixLong = cubehelix(_color_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"]);\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale-chromatic/node_modules/d3-interpolate/src/date.js\":\n/*!*********************************************************************************!*\\\n  !*** ./node_modules/d3-scale-chromatic/node_modules/d3-interpolate/src/date.js ***!\n  \\*********************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(a, b) {\n  var d = new Date;\n  return a = +a, b = +b, function(t) {\n    return d.setTime(a * (1 - t) + b * t), d;\n  };\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale-chromatic/node_modules/d3-interpolate/src/discrete.js\":\n/*!*************************************************************************************!*\\\n  !*** ./node_modules/d3-scale-chromatic/node_modules/d3-interpolate/src/discrete.js ***!\n  \\*************************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(range) {\n  var n = range.length;\n  return function(t) {\n    return range[Math.max(0, Math.min(n - 1, Math.floor(t * n)))];\n  };\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale-chromatic/node_modules/d3-interpolate/src/hcl.js\":\n/*!********************************************************************************!*\\\n  !*** ./node_modules/d3-scale-chromatic/node_modules/d3-interpolate/src/hcl.js ***!\n  \\********************************************************************************/\n/*! exports provided: default, hclLong */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"hclLong\", function() { return hclLong; });\n/* harmony import */ var d3_color__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-color */ \"./node_modules/d3-scale-chromatic/node_modules/d3-color/src/index.js\");\n/* harmony import */ var _color_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./color.js */ \"./node_modules/d3-scale-chromatic/node_modules/d3-interpolate/src/color.js\");\n\n\n\nfunction hcl(hue) {\n  return function(start, end) {\n    var h = hue((start = Object(d3_color__WEBPACK_IMPORTED_MODULE_0__[\"hcl\"])(start)).h, (end = Object(d3_color__WEBPACK_IMPORTED_MODULE_0__[\"hcl\"])(end)).h),\n        c = Object(_color_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(start.c, end.c),\n        l = Object(_color_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(start.l, end.l),\n        opacity = Object(_color_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(start.opacity, end.opacity);\n    return function(t) {\n      start.h = h(t);\n      start.c = c(t);\n      start.l = l(t);\n      start.opacity = opacity(t);\n      return start + \"\";\n    };\n  }\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (hcl(_color_js__WEBPACK_IMPORTED_MODULE_1__[\"hue\"]));\nvar hclLong = hcl(_color_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"]);\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale-chromatic/node_modules/d3-interpolate/src/hsl.js\":\n/*!********************************************************************************!*\\\n  !*** ./node_modules/d3-scale-chromatic/node_modules/d3-interpolate/src/hsl.js ***!\n  \\********************************************************************************/\n/*! exports provided: default, hslLong */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"hslLong\", function() { return hslLong; });\n/* harmony import */ var d3_color__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-color */ \"./node_modules/d3-scale-chromatic/node_modules/d3-color/src/index.js\");\n/* harmony import */ var _color_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./color.js */ \"./node_modules/d3-scale-chromatic/node_modules/d3-interpolate/src/color.js\");\n\n\n\nfunction hsl(hue) {\n  return function(start, end) {\n    var h = hue((start = Object(d3_color__WEBPACK_IMPORTED_MODULE_0__[\"hsl\"])(start)).h, (end = Object(d3_color__WEBPACK_IMPORTED_MODULE_0__[\"hsl\"])(end)).h),\n        s = Object(_color_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(start.s, end.s),\n        l = Object(_color_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(start.l, end.l),\n        opacity = Object(_color_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(start.opacity, end.opacity);\n    return function(t) {\n      start.h = h(t);\n      start.s = s(t);\n      start.l = l(t);\n      start.opacity = opacity(t);\n      return start + \"\";\n    };\n  }\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (hsl(_color_js__WEBPACK_IMPORTED_MODULE_1__[\"hue\"]));\nvar hslLong = hsl(_color_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"]);\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale-chromatic/node_modules/d3-interpolate/src/hue.js\":\n/*!********************************************************************************!*\\\n  !*** ./node_modules/d3-scale-chromatic/node_modules/d3-interpolate/src/hue.js ***!\n  \\********************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _color_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./color.js */ \"./node_modules/d3-scale-chromatic/node_modules/d3-interpolate/src/color.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(a, b) {\n  var i = Object(_color_js__WEBPACK_IMPORTED_MODULE_0__[\"hue\"])(+a, +b);\n  return function(t) {\n    var x = i(t);\n    return x - 360 * Math.floor(x / 360);\n  };\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale-chromatic/node_modules/d3-interpolate/src/index.js\":\n/*!**********************************************************************************!*\\\n  !*** ./node_modules/d3-scale-chromatic/node_modules/d3-interpolate/src/index.js ***!\n  \\**********************************************************************************/\n/*! exports provided: interpolate, interpolateArray, interpolateBasis, interpolateBasisClosed, interpolateDate, interpolateDiscrete, interpolateHue, interpolateNumber, interpolateNumberArray, interpolateObject, interpolateRound, interpolateString, interpolateTransformCss, interpolateTransformSvg, interpolateZoom, interpolateRgb, interpolateRgbBasis, interpolateRgbBasisClosed, interpolateHsl, interpolateHslLong, interpolateLab, interpolateHcl, interpolateHclLong, interpolateCubehelix, interpolateCubehelixLong, piecewise, quantize */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _value_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./value.js */ \"./node_modules/d3-scale-chromatic/node_modules/d3-interpolate/src/value.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolate\", function() { return _value_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n/* harmony import */ var _array_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./array.js */ \"./node_modules/d3-scale-chromatic/node_modules/d3-interpolate/src/array.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateArray\", function() { return _array_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"]; });\n\n/* harmony import */ var _basis_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./basis.js */ \"./node_modules/d3-scale-chromatic/node_modules/d3-interpolate/src/basis.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateBasis\", function() { return _basis_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"]; });\n\n/* harmony import */ var _basisClosed_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./basisClosed.js */ \"./node_modules/d3-scale-chromatic/node_modules/d3-interpolate/src/basisClosed.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateBasisClosed\", function() { return _basisClosed_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"]; });\n\n/* harmony import */ var _date_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./date.js */ \"./node_modules/d3-scale-chromatic/node_modules/d3-interpolate/src/date.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateDate\", function() { return _date_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"]; });\n\n/* harmony import */ var _discrete_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./discrete.js */ \"./node_modules/d3-scale-chromatic/node_modules/d3-interpolate/src/discrete.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateDiscrete\", function() { return _discrete_js__WEBPACK_IMPORTED_MODULE_5__[\"default\"]; });\n\n/* harmony import */ var _hue_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./hue.js */ \"./node_modules/d3-scale-chromatic/node_modules/d3-interpolate/src/hue.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateHue\", function() { return _hue_js__WEBPACK_IMPORTED_MODULE_6__[\"default\"]; });\n\n/* harmony import */ var _number_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./number.js */ \"./node_modules/d3-scale-chromatic/node_modules/d3-interpolate/src/number.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateNumber\", function() { return _number_js__WEBPACK_IMPORTED_MODULE_7__[\"default\"]; });\n\n/* harmony import */ var _numberArray_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./numberArray.js */ \"./node_modules/d3-scale-chromatic/node_modules/d3-interpolate/src/numberArray.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateNumberArray\", function() { return _numberArray_js__WEBPACK_IMPORTED_MODULE_8__[\"default\"]; });\n\n/* harmony import */ var _object_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./object.js */ \"./node_modules/d3-scale-chromatic/node_modules/d3-interpolate/src/object.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateObject\", function() { return _object_js__WEBPACK_IMPORTED_MODULE_9__[\"default\"]; });\n\n/* harmony import */ var _round_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./round.js */ \"./node_modules/d3-scale-chromatic/node_modules/d3-interpolate/src/round.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateRound\", function() { return _round_js__WEBPACK_IMPORTED_MODULE_10__[\"default\"]; });\n\n/* harmony import */ var _string_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./string.js */ \"./node_modules/d3-scale-chromatic/node_modules/d3-interpolate/src/string.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateString\", function() { return _string_js__WEBPACK_IMPORTED_MODULE_11__[\"default\"]; });\n\n/* harmony import */ var _transform_index_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./transform/index.js */ \"./node_modules/d3-scale-chromatic/node_modules/d3-interpolate/src/transform/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateTransformCss\", function() { return _transform_index_js__WEBPACK_IMPORTED_MODULE_12__[\"interpolateTransformCss\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateTransformSvg\", function() { return _transform_index_js__WEBPACK_IMPORTED_MODULE_12__[\"interpolateTransformSvg\"]; });\n\n/* harmony import */ var _zoom_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./zoom.js */ \"./node_modules/d3-scale-chromatic/node_modules/d3-interpolate/src/zoom.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateZoom\", function() { return _zoom_js__WEBPACK_IMPORTED_MODULE_13__[\"default\"]; });\n\n/* harmony import */ var _rgb_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./rgb.js */ \"./node_modules/d3-scale-chromatic/node_modules/d3-interpolate/src/rgb.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateRgb\", function() { return _rgb_js__WEBPACK_IMPORTED_MODULE_14__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateRgbBasis\", function() { return _rgb_js__WEBPACK_IMPORTED_MODULE_14__[\"rgbBasis\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateRgbBasisClosed\", function() { return _rgb_js__WEBPACK_IMPORTED_MODULE_14__[\"rgbBasisClosed\"]; });\n\n/* harmony import */ var _hsl_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./hsl.js */ \"./node_modules/d3-scale-chromatic/node_modules/d3-interpolate/src/hsl.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateHsl\", function() { return _hsl_js__WEBPACK_IMPORTED_MODULE_15__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateHslLong\", function() { return _hsl_js__WEBPACK_IMPORTED_MODULE_15__[\"hslLong\"]; });\n\n/* harmony import */ var _lab_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./lab.js */ \"./node_modules/d3-scale-chromatic/node_modules/d3-interpolate/src/lab.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateLab\", function() { return _lab_js__WEBPACK_IMPORTED_MODULE_16__[\"default\"]; });\n\n/* harmony import */ var _hcl_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./hcl.js */ \"./node_modules/d3-scale-chromatic/node_modules/d3-interpolate/src/hcl.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateHcl\", function() { return _hcl_js__WEBPACK_IMPORTED_MODULE_17__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateHclLong\", function() { return _hcl_js__WEBPACK_IMPORTED_MODULE_17__[\"hclLong\"]; });\n\n/* harmony import */ var _cubehelix_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./cubehelix.js */ \"./node_modules/d3-scale-chromatic/node_modules/d3-interpolate/src/cubehelix.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateCubehelix\", function() { return _cubehelix_js__WEBPACK_IMPORTED_MODULE_18__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateCubehelixLong\", function() { return _cubehelix_js__WEBPACK_IMPORTED_MODULE_18__[\"cubehelixLong\"]; });\n\n/* harmony import */ var _piecewise_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./piecewise.js */ \"./node_modules/d3-scale-chromatic/node_modules/d3-interpolate/src/piecewise.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"piecewise\", function() { return _piecewise_js__WEBPACK_IMPORTED_MODULE_19__[\"default\"]; });\n\n/* harmony import */ var _quantize_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./quantize.js */ \"./node_modules/d3-scale-chromatic/node_modules/d3-interpolate/src/quantize.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"quantize\", function() { return _quantize_js__WEBPACK_IMPORTED_MODULE_20__[\"default\"]; });\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale-chromatic/node_modules/d3-interpolate/src/lab.js\":\n/*!********************************************************************************!*\\\n  !*** ./node_modules/d3-scale-chromatic/node_modules/d3-interpolate/src/lab.js ***!\n  \\********************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return lab; });\n/* harmony import */ var d3_color__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-color */ \"./node_modules/d3-scale-chromatic/node_modules/d3-color/src/index.js\");\n/* harmony import */ var _color_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./color.js */ \"./node_modules/d3-scale-chromatic/node_modules/d3-interpolate/src/color.js\");\n\n\n\nfunction lab(start, end) {\n  var l = Object(_color_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])((start = Object(d3_color__WEBPACK_IMPORTED_MODULE_0__[\"lab\"])(start)).l, (end = Object(d3_color__WEBPACK_IMPORTED_MODULE_0__[\"lab\"])(end)).l),\n      a = Object(_color_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(start.a, end.a),\n      b = Object(_color_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(start.b, end.b),\n      opacity = Object(_color_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(start.opacity, end.opacity);\n  return function(t) {\n    start.l = l(t);\n    start.a = a(t);\n    start.b = b(t);\n    start.opacity = opacity(t);\n    return start + \"\";\n  };\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale-chromatic/node_modules/d3-interpolate/src/number.js\":\n/*!***********************************************************************************!*\\\n  !*** ./node_modules/d3-scale-chromatic/node_modules/d3-interpolate/src/number.js ***!\n  \\***********************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(a, b) {\n  return a = +a, b = +b, function(t) {\n    return a * (1 - t) + b * t;\n  };\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale-chromatic/node_modules/d3-interpolate/src/numberArray.js\":\n/*!****************************************************************************************!*\\\n  !*** ./node_modules/d3-scale-chromatic/node_modules/d3-interpolate/src/numberArray.js ***!\n  \\****************************************************************************************/\n/*! exports provided: default, isNumberArray */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"isNumberArray\", function() { return isNumberArray; });\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(a, b) {\n  if (!b) b = [];\n  var n = a ? Math.min(b.length, a.length) : 0,\n      c = b.slice(),\n      i;\n  return function(t) {\n    for (i = 0; i < n; ++i) c[i] = a[i] * (1 - t) + b[i] * t;\n    return c;\n  };\n});\n\nfunction isNumberArray(x) {\n  return ArrayBuffer.isView(x) && !(x instanceof DataView);\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale-chromatic/node_modules/d3-interpolate/src/object.js\":\n/*!***********************************************************************************!*\\\n  !*** ./node_modules/d3-scale-chromatic/node_modules/d3-interpolate/src/object.js ***!\n  \\***********************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _value_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./value.js */ \"./node_modules/d3-scale-chromatic/node_modules/d3-interpolate/src/value.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(a, b) {\n  var i = {},\n      c = {},\n      k;\n\n  if (a === null || typeof a !== \"object\") a = {};\n  if (b === null || typeof b !== \"object\") b = {};\n\n  for (k in b) {\n    if (k in a) {\n      i[k] = Object(_value_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(a[k], b[k]);\n    } else {\n      c[k] = b[k];\n    }\n  }\n\n  return function(t) {\n    for (k in i) c[k] = i[k](t);\n    return c;\n  };\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale-chromatic/node_modules/d3-interpolate/src/piecewise.js\":\n/*!**************************************************************************************!*\\\n  !*** ./node_modules/d3-scale-chromatic/node_modules/d3-interpolate/src/piecewise.js ***!\n  \\**************************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return piecewise; });\n/* harmony import */ var _value_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./value.js */ \"./node_modules/d3-scale-chromatic/node_modules/d3-interpolate/src/value.js\");\n\n\nfunction piecewise(interpolate, values) {\n  if (values === undefined) values = interpolate, interpolate = _value_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"];\n  var i = 0, n = values.length - 1, v = values[0], I = new Array(n < 0 ? 0 : n);\n  while (i < n) I[i] = interpolate(v, v = values[++i]);\n  return function(t) {\n    var i = Math.max(0, Math.min(n - 1, Math.floor(t *= n)));\n    return I[i](t - i);\n  };\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale-chromatic/node_modules/d3-interpolate/src/quantize.js\":\n/*!*************************************************************************************!*\\\n  !*** ./node_modules/d3-scale-chromatic/node_modules/d3-interpolate/src/quantize.js ***!\n  \\*************************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(interpolator, n) {\n  var samples = new Array(n);\n  for (var i = 0; i < n; ++i) samples[i] = interpolator(i / (n - 1));\n  return samples;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale-chromatic/node_modules/d3-interpolate/src/rgb.js\":\n/*!********************************************************************************!*\\\n  !*** ./node_modules/d3-scale-chromatic/node_modules/d3-interpolate/src/rgb.js ***!\n  \\********************************************************************************/\n/*! exports provided: default, rgbBasis, rgbBasisClosed */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"rgbBasis\", function() { return rgbBasis; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"rgbBasisClosed\", function() { return rgbBasisClosed; });\n/* harmony import */ var d3_color__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-color */ \"./node_modules/d3-scale-chromatic/node_modules/d3-color/src/index.js\");\n/* harmony import */ var _basis_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./basis.js */ \"./node_modules/d3-scale-chromatic/node_modules/d3-interpolate/src/basis.js\");\n/* harmony import */ var _basisClosed_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./basisClosed.js */ \"./node_modules/d3-scale-chromatic/node_modules/d3-interpolate/src/basisClosed.js\");\n/* harmony import */ var _color_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./color.js */ \"./node_modules/d3-scale-chromatic/node_modules/d3-interpolate/src/color.js\");\n\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ((function rgbGamma(y) {\n  var color = Object(_color_js__WEBPACK_IMPORTED_MODULE_3__[\"gamma\"])(y);\n\n  function rgb(start, end) {\n    var r = color((start = Object(d3_color__WEBPACK_IMPORTED_MODULE_0__[\"rgb\"])(start)).r, (end = Object(d3_color__WEBPACK_IMPORTED_MODULE_0__[\"rgb\"])(end)).r),\n        g = color(start.g, end.g),\n        b = color(start.b, end.b),\n        opacity = Object(_color_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(start.opacity, end.opacity);\n    return function(t) {\n      start.r = r(t);\n      start.g = g(t);\n      start.b = b(t);\n      start.opacity = opacity(t);\n      return start + \"\";\n    };\n  }\n\n  rgb.gamma = rgbGamma;\n\n  return rgb;\n})(1));\n\nfunction rgbSpline(spline) {\n  return function(colors) {\n    var n = colors.length,\n        r = new Array(n),\n        g = new Array(n),\n        b = new Array(n),\n        i, color;\n    for (i = 0; i < n; ++i) {\n      color = Object(d3_color__WEBPACK_IMPORTED_MODULE_0__[\"rgb\"])(colors[i]);\n      r[i] = color.r || 0;\n      g[i] = color.g || 0;\n      b[i] = color.b || 0;\n    }\n    r = spline(r);\n    g = spline(g);\n    b = spline(b);\n    color.opacity = 1;\n    return function(t) {\n      color.r = r(t);\n      color.g = g(t);\n      color.b = b(t);\n      return color + \"\";\n    };\n  };\n}\n\nvar rgbBasis = rgbSpline(_basis_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"]);\nvar rgbBasisClosed = rgbSpline(_basisClosed_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"]);\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale-chromatic/node_modules/d3-interpolate/src/round.js\":\n/*!**********************************************************************************!*\\\n  !*** ./node_modules/d3-scale-chromatic/node_modules/d3-interpolate/src/round.js ***!\n  \\**********************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(a, b) {\n  return a = +a, b = +b, function(t) {\n    return Math.round(a * (1 - t) + b * t);\n  };\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale-chromatic/node_modules/d3-interpolate/src/string.js\":\n/*!***********************************************************************************!*\\\n  !*** ./node_modules/d3-scale-chromatic/node_modules/d3-interpolate/src/string.js ***!\n  \\***********************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _number_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./number.js */ \"./node_modules/d3-scale-chromatic/node_modules/d3-interpolate/src/number.js\");\n\n\nvar reA = /[-+]?(?:\\d+\\.?\\d*|\\.?\\d+)(?:[eE][-+]?\\d+)?/g,\n    reB = new RegExp(reA.source, \"g\");\n\nfunction zero(b) {\n  return function() {\n    return b;\n  };\n}\n\nfunction one(b) {\n  return function(t) {\n    return b(t) + \"\";\n  };\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(a, b) {\n  var bi = reA.lastIndex = reB.lastIndex = 0, // scan index for next number in b\n      am, // current match in a\n      bm, // current match in b\n      bs, // string preceding current number in b, if any\n      i = -1, // index in s\n      s = [], // string constants and placeholders\n      q = []; // number interpolators\n\n  // Coerce inputs to strings.\n  a = a + \"\", b = b + \"\";\n\n  // Interpolate pairs of numbers in a & b.\n  while ((am = reA.exec(a))\n      && (bm = reB.exec(b))) {\n    if ((bs = bm.index) > bi) { // a string precedes the next number in b\n      bs = b.slice(bi, bs);\n      if (s[i]) s[i] += bs; // coalesce with previous string\n      else s[++i] = bs;\n    }\n    if ((am = am[0]) === (bm = bm[0])) { // numbers in a & b match\n      if (s[i]) s[i] += bm; // coalesce with previous string\n      else s[++i] = bm;\n    } else { // interpolate non-matching numbers\n      s[++i] = null;\n      q.push({i: i, x: Object(_number_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(am, bm)});\n    }\n    bi = reB.lastIndex;\n  }\n\n  // Add remains of b.\n  if (bi < b.length) {\n    bs = b.slice(bi);\n    if (s[i]) s[i] += bs; // coalesce with previous string\n    else s[++i] = bs;\n  }\n\n  // Special optimization for only a single match.\n  // Otherwise, interpolate each of the numbers and rejoin the string.\n  return s.length < 2 ? (q[0]\n      ? one(q[0].x)\n      : zero(b))\n      : (b = q.length, function(t) {\n          for (var i = 0, o; i < b; ++i) s[(o = q[i]).i] = o.x(t);\n          return s.join(\"\");\n        });\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale-chromatic/node_modules/d3-interpolate/src/transform/decompose.js\":\n/*!************************************************************************************************!*\\\n  !*** ./node_modules/d3-scale-chromatic/node_modules/d3-interpolate/src/transform/decompose.js ***!\n  \\************************************************************************************************/\n/*! exports provided: identity, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"identity\", function() { return identity; });\nvar degrees = 180 / Math.PI;\n\nvar identity = {\n  translateX: 0,\n  translateY: 0,\n  rotate: 0,\n  skewX: 0,\n  scaleX: 1,\n  scaleY: 1\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(a, b, c, d, e, f) {\n  var scaleX, scaleY, skewX;\n  if (scaleX = Math.sqrt(a * a + b * b)) a /= scaleX, b /= scaleX;\n  if (skewX = a * c + b * d) c -= a * skewX, d -= b * skewX;\n  if (scaleY = Math.sqrt(c * c + d * d)) c /= scaleY, d /= scaleY, skewX /= scaleY;\n  if (a * d < b * c) a = -a, b = -b, skewX = -skewX, scaleX = -scaleX;\n  return {\n    translateX: e,\n    translateY: f,\n    rotate: Math.atan2(b, a) * degrees,\n    skewX: Math.atan(skewX) * degrees,\n    scaleX: scaleX,\n    scaleY: scaleY\n  };\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale-chromatic/node_modules/d3-interpolate/src/transform/index.js\":\n/*!********************************************************************************************!*\\\n  !*** ./node_modules/d3-scale-chromatic/node_modules/d3-interpolate/src/transform/index.js ***!\n  \\********************************************************************************************/\n/*! exports provided: interpolateTransformCss, interpolateTransformSvg */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"interpolateTransformCss\", function() { return interpolateTransformCss; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"interpolateTransformSvg\", function() { return interpolateTransformSvg; });\n/* harmony import */ var _number_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../number.js */ \"./node_modules/d3-scale-chromatic/node_modules/d3-interpolate/src/number.js\");\n/* harmony import */ var _parse_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./parse.js */ \"./node_modules/d3-scale-chromatic/node_modules/d3-interpolate/src/transform/parse.js\");\n\n\n\nfunction interpolateTransform(parse, pxComma, pxParen, degParen) {\n\n  function pop(s) {\n    return s.length ? s.pop() + \" \" : \"\";\n  }\n\n  function translate(xa, ya, xb, yb, s, q) {\n    if (xa !== xb || ya !== yb) {\n      var i = s.push(\"translate(\", null, pxComma, null, pxParen);\n      q.push({i: i - 4, x: Object(_number_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(xa, xb)}, {i: i - 2, x: Object(_number_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(ya, yb)});\n    } else if (xb || yb) {\n      s.push(\"translate(\" + xb + pxComma + yb + pxParen);\n    }\n  }\n\n  function rotate(a, b, s, q) {\n    if (a !== b) {\n      if (a - b > 180) b += 360; else if (b - a > 180) a += 360; // shortest path\n      q.push({i: s.push(pop(s) + \"rotate(\", null, degParen) - 2, x: Object(_number_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(a, b)});\n    } else if (b) {\n      s.push(pop(s) + \"rotate(\" + b + degParen);\n    }\n  }\n\n  function skewX(a, b, s, q) {\n    if (a !== b) {\n      q.push({i: s.push(pop(s) + \"skewX(\", null, degParen) - 2, x: Object(_number_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(a, b)});\n    } else if (b) {\n      s.push(pop(s) + \"skewX(\" + b + degParen);\n    }\n  }\n\n  function scale(xa, ya, xb, yb, s, q) {\n    if (xa !== xb || ya !== yb) {\n      var i = s.push(pop(s) + \"scale(\", null, \",\", null, \")\");\n      q.push({i: i - 4, x: Object(_number_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(xa, xb)}, {i: i - 2, x: Object(_number_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(ya, yb)});\n    } else if (xb !== 1 || yb !== 1) {\n      s.push(pop(s) + \"scale(\" + xb + \",\" + yb + \")\");\n    }\n  }\n\n  return function(a, b) {\n    var s = [], // string constants and placeholders\n        q = []; // number interpolators\n    a = parse(a), b = parse(b);\n    translate(a.translateX, a.translateY, b.translateX, b.translateY, s, q);\n    rotate(a.rotate, b.rotate, s, q);\n    skewX(a.skewX, b.skewX, s, q);\n    scale(a.scaleX, a.scaleY, b.scaleX, b.scaleY, s, q);\n    a = b = null; // gc\n    return function(t) {\n      var i = -1, n = q.length, o;\n      while (++i < n) s[(o = q[i]).i] = o.x(t);\n      return s.join(\"\");\n    };\n  };\n}\n\nvar interpolateTransformCss = interpolateTransform(_parse_js__WEBPACK_IMPORTED_MODULE_1__[\"parseCss\"], \"px, \", \"px)\", \"deg)\");\nvar interpolateTransformSvg = interpolateTransform(_parse_js__WEBPACK_IMPORTED_MODULE_1__[\"parseSvg\"], \", \", \")\", \")\");\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale-chromatic/node_modules/d3-interpolate/src/transform/parse.js\":\n/*!********************************************************************************************!*\\\n  !*** ./node_modules/d3-scale-chromatic/node_modules/d3-interpolate/src/transform/parse.js ***!\n  \\********************************************************************************************/\n/*! exports provided: parseCss, parseSvg */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"parseCss\", function() { return parseCss; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"parseSvg\", function() { return parseSvg; });\n/* harmony import */ var _decompose_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./decompose.js */ \"./node_modules/d3-scale-chromatic/node_modules/d3-interpolate/src/transform/decompose.js\");\n\n\nvar svgNode;\n\n/* eslint-disable no-undef */\nfunction parseCss(value) {\n  const m = new (typeof DOMMatrix === \"function\" ? DOMMatrix : WebKitCSSMatrix)(value + \"\");\n  return m.isIdentity ? _decompose_js__WEBPACK_IMPORTED_MODULE_0__[\"identity\"] : Object(_decompose_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(m.a, m.b, m.c, m.d, m.e, m.f);\n}\n\nfunction parseSvg(value) {\n  if (value == null) return _decompose_js__WEBPACK_IMPORTED_MODULE_0__[\"identity\"];\n  if (!svgNode) svgNode = document.createElementNS(\"http://www.w3.org/2000/svg\", \"g\");\n  svgNode.setAttribute(\"transform\", value);\n  if (!(value = svgNode.transform.baseVal.consolidate())) return _decompose_js__WEBPACK_IMPORTED_MODULE_0__[\"identity\"];\n  value = value.matrix;\n  return Object(_decompose_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(value.a, value.b, value.c, value.d, value.e, value.f);\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale-chromatic/node_modules/d3-interpolate/src/value.js\":\n/*!**********************************************************************************!*\\\n  !*** ./node_modules/d3-scale-chromatic/node_modules/d3-interpolate/src/value.js ***!\n  \\**********************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var d3_color__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-color */ \"./node_modules/d3-scale-chromatic/node_modules/d3-color/src/index.js\");\n/* harmony import */ var _rgb_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./rgb.js */ \"./node_modules/d3-scale-chromatic/node_modules/d3-interpolate/src/rgb.js\");\n/* harmony import */ var _array_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./array.js */ \"./node_modules/d3-scale-chromatic/node_modules/d3-interpolate/src/array.js\");\n/* harmony import */ var _date_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./date.js */ \"./node_modules/d3-scale-chromatic/node_modules/d3-interpolate/src/date.js\");\n/* harmony import */ var _number_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./number.js */ \"./node_modules/d3-scale-chromatic/node_modules/d3-interpolate/src/number.js\");\n/* harmony import */ var _object_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./object.js */ \"./node_modules/d3-scale-chromatic/node_modules/d3-interpolate/src/object.js\");\n/* harmony import */ var _string_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./string.js */ \"./node_modules/d3-scale-chromatic/node_modules/d3-interpolate/src/string.js\");\n/* harmony import */ var _constant_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./constant.js */ \"./node_modules/d3-scale-chromatic/node_modules/d3-interpolate/src/constant.js\");\n/* harmony import */ var _numberArray_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./numberArray.js */ \"./node_modules/d3-scale-chromatic/node_modules/d3-interpolate/src/numberArray.js\");\n\n\n\n\n\n\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(a, b) {\n  var t = typeof b, c;\n  return b == null || t === \"boolean\" ? Object(_constant_js__WEBPACK_IMPORTED_MODULE_7__[\"default\"])(b)\n      : (t === \"number\" ? _number_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"]\n      : t === \"string\" ? ((c = Object(d3_color__WEBPACK_IMPORTED_MODULE_0__[\"color\"])(b)) ? (b = c, _rgb_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"]) : _string_js__WEBPACK_IMPORTED_MODULE_6__[\"default\"])\n      : b instanceof d3_color__WEBPACK_IMPORTED_MODULE_0__[\"color\"] ? _rgb_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"]\n      : b instanceof Date ? _date_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"]\n      : Object(_numberArray_js__WEBPACK_IMPORTED_MODULE_8__[\"isNumberArray\"])(b) ? _numberArray_js__WEBPACK_IMPORTED_MODULE_8__[\"default\"]\n      : Array.isArray(b) ? _array_js__WEBPACK_IMPORTED_MODULE_2__[\"genericArray\"]\n      : typeof b.valueOf !== \"function\" && typeof b.toString !== \"function\" || isNaN(b) ? _object_js__WEBPACK_IMPORTED_MODULE_5__[\"default\"]\n      : _number_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(a, b);\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale-chromatic/node_modules/d3-interpolate/src/zoom.js\":\n/*!*********************************************************************************!*\\\n  !*** ./node_modules/d3-scale-chromatic/node_modules/d3-interpolate/src/zoom.js ***!\n  \\*********************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\nvar epsilon2 = 1e-12;\n\nfunction cosh(x) {\n  return ((x = Math.exp(x)) + 1 / x) / 2;\n}\n\nfunction sinh(x) {\n  return ((x = Math.exp(x)) - 1 / x) / 2;\n}\n\nfunction tanh(x) {\n  return ((x = Math.exp(2 * x)) - 1) / (x + 1);\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ((function zoomRho(rho, rho2, rho4) {\n\n  // p0 = [ux0, uy0, w0]\n  // p1 = [ux1, uy1, w1]\n  function zoom(p0, p1) {\n    var ux0 = p0[0], uy0 = p0[1], w0 = p0[2],\n        ux1 = p1[0], uy1 = p1[1], w1 = p1[2],\n        dx = ux1 - ux0,\n        dy = uy1 - uy0,\n        d2 = dx * dx + dy * dy,\n        i,\n        S;\n\n    // Special case for u0 ≅ u1.\n    if (d2 < epsilon2) {\n      S = Math.log(w1 / w0) / rho;\n      i = function(t) {\n        return [\n          ux0 + t * dx,\n          uy0 + t * dy,\n          w0 * Math.exp(rho * t * S)\n        ];\n      }\n    }\n\n    // General case.\n    else {\n      var d1 = Math.sqrt(d2),\n          b0 = (w1 * w1 - w0 * w0 + rho4 * d2) / (2 * w0 * rho2 * d1),\n          b1 = (w1 * w1 - w0 * w0 - rho4 * d2) / (2 * w1 * rho2 * d1),\n          r0 = Math.log(Math.sqrt(b0 * b0 + 1) - b0),\n          r1 = Math.log(Math.sqrt(b1 * b1 + 1) - b1);\n      S = (r1 - r0) / rho;\n      i = function(t) {\n        var s = t * S,\n            coshr0 = cosh(r0),\n            u = w0 / (rho2 * d1) * (coshr0 * tanh(rho * s + r0) - sinh(r0));\n        return [\n          ux0 + u * dx,\n          uy0 + u * dy,\n          w0 * coshr0 / cosh(rho * s + r0)\n        ];\n      }\n    }\n\n    i.duration = S * 1000 * rho / Math.SQRT2;\n\n    return i;\n  }\n\n  zoom.rho = function(_) {\n    var _1 = Math.max(1e-3, +_), _2 = _1 * _1, _4 = _2 * _2;\n    return zoomRho(_1, _2, _4);\n  };\n\n  return zoom;\n})(Math.SQRT2, 2, 4));\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale-chromatic/src/categorical/Accent.js\":\n/*!*******************************************************************!*\\\n  !*** ./node_modules/d3-scale-chromatic/src/categorical/Accent.js ***!\n  \\*******************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ \"./node_modules/d3-scale-chromatic/src/colors.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_colors_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(\"7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666\"));\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale-chromatic/src/categorical/Dark2.js\":\n/*!******************************************************************!*\\\n  !*** ./node_modules/d3-scale-chromatic/src/categorical/Dark2.js ***!\n  \\******************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ \"./node_modules/d3-scale-chromatic/src/colors.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_colors_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(\"1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666\"));\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale-chromatic/src/categorical/Paired.js\":\n/*!*******************************************************************!*\\\n  !*** ./node_modules/d3-scale-chromatic/src/categorical/Paired.js ***!\n  \\*******************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ \"./node_modules/d3-scale-chromatic/src/colors.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_colors_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(\"a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928\"));\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale-chromatic/src/categorical/Pastel1.js\":\n/*!********************************************************************!*\\\n  !*** ./node_modules/d3-scale-chromatic/src/categorical/Pastel1.js ***!\n  \\********************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ \"./node_modules/d3-scale-chromatic/src/colors.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_colors_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(\"fbb4aeb3cde3ccebc5decbe4fed9a6ffffcce5d8bdfddaecf2f2f2\"));\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale-chromatic/src/categorical/Pastel2.js\":\n/*!********************************************************************!*\\\n  !*** ./node_modules/d3-scale-chromatic/src/categorical/Pastel2.js ***!\n  \\********************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ \"./node_modules/d3-scale-chromatic/src/colors.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_colors_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(\"b3e2cdfdcdaccbd5e8f4cae4e6f5c9fff2aef1e2cccccccc\"));\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale-chromatic/src/categorical/Set1.js\":\n/*!*****************************************************************!*\\\n  !*** ./node_modules/d3-scale-chromatic/src/categorical/Set1.js ***!\n  \\*****************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ \"./node_modules/d3-scale-chromatic/src/colors.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_colors_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(\"e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999\"));\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale-chromatic/src/categorical/Set2.js\":\n/*!*****************************************************************!*\\\n  !*** ./node_modules/d3-scale-chromatic/src/categorical/Set2.js ***!\n  \\*****************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ \"./node_modules/d3-scale-chromatic/src/colors.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_colors_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(\"66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3\"));\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale-chromatic/src/categorical/Set3.js\":\n/*!*****************************************************************!*\\\n  !*** ./node_modules/d3-scale-chromatic/src/categorical/Set3.js ***!\n  \\*****************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ \"./node_modules/d3-scale-chromatic/src/colors.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_colors_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(\"8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f\"));\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale-chromatic/src/categorical/Tableau10.js\":\n/*!**********************************************************************!*\\\n  !*** ./node_modules/d3-scale-chromatic/src/categorical/Tableau10.js ***!\n  \\**********************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ \"./node_modules/d3-scale-chromatic/src/colors.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_colors_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(\"4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab\"));\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale-chromatic/src/categorical/category10.js\":\n/*!***********************************************************************!*\\\n  !*** ./node_modules/d3-scale-chromatic/src/categorical/category10.js ***!\n  \\***********************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ \"./node_modules/d3-scale-chromatic/src/colors.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_colors_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(\"1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf\"));\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale-chromatic/src/colors.js\":\n/*!*******************************************************!*\\\n  !*** ./node_modules/d3-scale-chromatic/src/colors.js ***!\n  \\*******************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(specifier) {\n  var n = specifier.length / 6 | 0, colors = new Array(n), i = 0;\n  while (i < n) colors[i] = \"#\" + specifier.slice(i * 6, ++i * 6);\n  return colors;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale-chromatic/src/diverging/BrBG.js\":\n/*!***************************************************************!*\\\n  !*** ./node_modules/d3-scale-chromatic/src/diverging/BrBG.js ***!\n  \\***************************************************************/\n/*! exports provided: scheme, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"scheme\", function() { return scheme; });\n/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ \"./node_modules/d3-scale-chromatic/src/colors.js\");\n/* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ \"./node_modules/d3-scale-chromatic/src/ramp.js\");\n\n\n\nvar scheme = new Array(3).concat(\n  \"d8b365f5f5f55ab4ac\",\n  \"a6611adfc27d80cdc1018571\",\n  \"a6611adfc27df5f5f580cdc1018571\",\n  \"8c510ad8b365f6e8c3c7eae55ab4ac01665e\",\n  \"8c510ad8b365f6e8c3f5f5f5c7eae55ab4ac01665e\",\n  \"8c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e\",\n  \"8c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e\",\n  \"5430058c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e003c30\",\n  \"5430058c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e003c30\"\n).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(scheme));\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale-chromatic/src/diverging/PRGn.js\":\n/*!***************************************************************!*\\\n  !*** ./node_modules/d3-scale-chromatic/src/diverging/PRGn.js ***!\n  \\***************************************************************/\n/*! exports provided: scheme, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"scheme\", function() { return scheme; });\n/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ \"./node_modules/d3-scale-chromatic/src/colors.js\");\n/* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ \"./node_modules/d3-scale-chromatic/src/ramp.js\");\n\n\n\nvar scheme = new Array(3).concat(\n  \"af8dc3f7f7f77fbf7b\",\n  \"7b3294c2a5cfa6dba0008837\",\n  \"7b3294c2a5cff7f7f7a6dba0008837\",\n  \"762a83af8dc3e7d4e8d9f0d37fbf7b1b7837\",\n  \"762a83af8dc3e7d4e8f7f7f7d9f0d37fbf7b1b7837\",\n  \"762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b7837\",\n  \"762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b7837\",\n  \"40004b762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b783700441b\",\n  \"40004b762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b783700441b\"\n).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(scheme));\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale-chromatic/src/diverging/PiYG.js\":\n/*!***************************************************************!*\\\n  !*** ./node_modules/d3-scale-chromatic/src/diverging/PiYG.js ***!\n  \\***************************************************************/\n/*! exports provided: scheme, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"scheme\", function() { return scheme; });\n/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ \"./node_modules/d3-scale-chromatic/src/colors.js\");\n/* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ \"./node_modules/d3-scale-chromatic/src/ramp.js\");\n\n\n\nvar scheme = new Array(3).concat(\n  \"e9a3c9f7f7f7a1d76a\",\n  \"d01c8bf1b6dab8e1864dac26\",\n  \"d01c8bf1b6daf7f7f7b8e1864dac26\",\n  \"c51b7de9a3c9fde0efe6f5d0a1d76a4d9221\",\n  \"c51b7de9a3c9fde0eff7f7f7e6f5d0a1d76a4d9221\",\n  \"c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221\",\n  \"c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221\",\n  \"8e0152c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221276419\",\n  \"8e0152c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221276419\"\n).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(scheme));\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale-chromatic/src/diverging/PuOr.js\":\n/*!***************************************************************!*\\\n  !*** ./node_modules/d3-scale-chromatic/src/diverging/PuOr.js ***!\n  \\***************************************************************/\n/*! exports provided: scheme, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"scheme\", function() { return scheme; });\n/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ \"./node_modules/d3-scale-chromatic/src/colors.js\");\n/* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ \"./node_modules/d3-scale-chromatic/src/ramp.js\");\n\n\n\nvar scheme = new Array(3).concat(\n  \"998ec3f7f7f7f1a340\",\n  \"5e3c99b2abd2fdb863e66101\",\n  \"5e3c99b2abd2f7f7f7fdb863e66101\",\n  \"542788998ec3d8daebfee0b6f1a340b35806\",\n  \"542788998ec3d8daebf7f7f7fee0b6f1a340b35806\",\n  \"5427888073acb2abd2d8daebfee0b6fdb863e08214b35806\",\n  \"5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b35806\",\n  \"2d004b5427888073acb2abd2d8daebfee0b6fdb863e08214b358067f3b08\",\n  \"2d004b5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b358067f3b08\"\n).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(scheme));\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale-chromatic/src/diverging/RdBu.js\":\n/*!***************************************************************!*\\\n  !*** ./node_modules/d3-scale-chromatic/src/diverging/RdBu.js ***!\n  \\***************************************************************/\n/*! exports provided: scheme, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"scheme\", function() { return scheme; });\n/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ \"./node_modules/d3-scale-chromatic/src/colors.js\");\n/* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ \"./node_modules/d3-scale-chromatic/src/ramp.js\");\n\n\n\nvar scheme = new Array(3).concat(\n  \"ef8a62f7f7f767a9cf\",\n  \"ca0020f4a58292c5de0571b0\",\n  \"ca0020f4a582f7f7f792c5de0571b0\",\n  \"b2182bef8a62fddbc7d1e5f067a9cf2166ac\",\n  \"b2182bef8a62fddbc7f7f7f7d1e5f067a9cf2166ac\",\n  \"b2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac\",\n  \"b2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac\",\n  \"67001fb2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac053061\",\n  \"67001fb2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac053061\"\n).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(scheme));\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale-chromatic/src/diverging/RdGy.js\":\n/*!***************************************************************!*\\\n  !*** ./node_modules/d3-scale-chromatic/src/diverging/RdGy.js ***!\n  \\***************************************************************/\n/*! exports provided: scheme, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"scheme\", function() { return scheme; });\n/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ \"./node_modules/d3-scale-chromatic/src/colors.js\");\n/* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ \"./node_modules/d3-scale-chromatic/src/ramp.js\");\n\n\n\nvar scheme = new Array(3).concat(\n  \"ef8a62ffffff999999\",\n  \"ca0020f4a582bababa404040\",\n  \"ca0020f4a582ffffffbababa404040\",\n  \"b2182bef8a62fddbc7e0e0e09999994d4d4d\",\n  \"b2182bef8a62fddbc7ffffffe0e0e09999994d4d4d\",\n  \"b2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d\",\n  \"b2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d\",\n  \"67001fb2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d1a1a1a\",\n  \"67001fb2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d1a1a1a\"\n).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(scheme));\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale-chromatic/src/diverging/RdYlBu.js\":\n/*!*****************************************************************!*\\\n  !*** ./node_modules/d3-scale-chromatic/src/diverging/RdYlBu.js ***!\n  \\*****************************************************************/\n/*! exports provided: scheme, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"scheme\", function() { return scheme; });\n/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ \"./node_modules/d3-scale-chromatic/src/colors.js\");\n/* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ \"./node_modules/d3-scale-chromatic/src/ramp.js\");\n\n\n\nvar scheme = new Array(3).concat(\n  \"fc8d59ffffbf91bfdb\",\n  \"d7191cfdae61abd9e92c7bb6\",\n  \"d7191cfdae61ffffbfabd9e92c7bb6\",\n  \"d73027fc8d59fee090e0f3f891bfdb4575b4\",\n  \"d73027fc8d59fee090ffffbfe0f3f891bfdb4575b4\",\n  \"d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4\",\n  \"d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4\",\n  \"a50026d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4313695\",\n  \"a50026d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4313695\"\n).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(scheme));\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale-chromatic/src/diverging/RdYlGn.js\":\n/*!*****************************************************************!*\\\n  !*** ./node_modules/d3-scale-chromatic/src/diverging/RdYlGn.js ***!\n  \\*****************************************************************/\n/*! exports provided: scheme, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"scheme\", function() { return scheme; });\n/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ \"./node_modules/d3-scale-chromatic/src/colors.js\");\n/* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ \"./node_modules/d3-scale-chromatic/src/ramp.js\");\n\n\n\nvar scheme = new Array(3).concat(\n  \"fc8d59ffffbf91cf60\",\n  \"d7191cfdae61a6d96a1a9641\",\n  \"d7191cfdae61ffffbfa6d96a1a9641\",\n  \"d73027fc8d59fee08bd9ef8b91cf601a9850\",\n  \"d73027fc8d59fee08bffffbfd9ef8b91cf601a9850\",\n  \"d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850\",\n  \"d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850\",\n  \"a50026d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850006837\",\n  \"a50026d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850006837\"\n).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(scheme));\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale-chromatic/src/diverging/Spectral.js\":\n/*!*******************************************************************!*\\\n  !*** ./node_modules/d3-scale-chromatic/src/diverging/Spectral.js ***!\n  \\*******************************************************************/\n/*! exports provided: scheme, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"scheme\", function() { return scheme; });\n/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ \"./node_modules/d3-scale-chromatic/src/colors.js\");\n/* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ \"./node_modules/d3-scale-chromatic/src/ramp.js\");\n\n\n\nvar scheme = new Array(3).concat(\n  \"fc8d59ffffbf99d594\",\n  \"d7191cfdae61abdda42b83ba\",\n  \"d7191cfdae61ffffbfabdda42b83ba\",\n  \"d53e4ffc8d59fee08be6f59899d5943288bd\",\n  \"d53e4ffc8d59fee08bffffbfe6f59899d5943288bd\",\n  \"d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd\",\n  \"d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd\",\n  \"9e0142d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd5e4fa2\",\n  \"9e0142d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd5e4fa2\"\n).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(scheme));\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale-chromatic/src/index.js\":\n/*!******************************************************!*\\\n  !*** ./node_modules/d3-scale-chromatic/src/index.js ***!\n  \\******************************************************/\n/*! exports provided: schemeCategory10, schemeAccent, schemeDark2, schemePaired, schemePastel1, schemePastel2, schemeSet1, schemeSet2, schemeSet3, schemeTableau10, interpolateBrBG, schemeBrBG, interpolatePRGn, schemePRGn, interpolatePiYG, schemePiYG, interpolatePuOr, schemePuOr, interpolateRdBu, schemeRdBu, interpolateRdGy, schemeRdGy, interpolateRdYlBu, schemeRdYlBu, interpolateRdYlGn, schemeRdYlGn, interpolateSpectral, schemeSpectral, interpolateBuGn, schemeBuGn, interpolateBuPu, schemeBuPu, interpolateGnBu, schemeGnBu, interpolateOrRd, schemeOrRd, interpolatePuBuGn, schemePuBuGn, interpolatePuBu, schemePuBu, interpolatePuRd, schemePuRd, interpolateRdPu, schemeRdPu, interpolateYlGnBu, schemeYlGnBu, interpolateYlGn, schemeYlGn, interpolateYlOrBr, schemeYlOrBr, interpolateYlOrRd, schemeYlOrRd, interpolateBlues, schemeBlues, interpolateGreens, schemeGreens, interpolateGreys, schemeGreys, interpolatePurples, schemePurples, interpolateReds, schemeReds, interpolateOranges, schemeOranges, interpolateCividis, interpolateCubehelixDefault, interpolateRainbow, interpolateWarm, interpolateCool, interpolateSinebow, interpolateTurbo, interpolateViridis, interpolateMagma, interpolateInferno, interpolatePlasma */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _categorical_category10_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./categorical/category10.js */ \"./node_modules/d3-scale-chromatic/src/categorical/category10.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"schemeCategory10\", function() { return _categorical_category10_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n/* harmony import */ var _categorical_Accent_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./categorical/Accent.js */ \"./node_modules/d3-scale-chromatic/src/categorical/Accent.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"schemeAccent\", function() { return _categorical_Accent_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"]; });\n\n/* harmony import */ var _categorical_Dark2_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./categorical/Dark2.js */ \"./node_modules/d3-scale-chromatic/src/categorical/Dark2.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"schemeDark2\", function() { return _categorical_Dark2_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"]; });\n\n/* harmony import */ var _categorical_Paired_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./categorical/Paired.js */ \"./node_modules/d3-scale-chromatic/src/categorical/Paired.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"schemePaired\", function() { return _categorical_Paired_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"]; });\n\n/* harmony import */ var _categorical_Pastel1_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./categorical/Pastel1.js */ \"./node_modules/d3-scale-chromatic/src/categorical/Pastel1.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"schemePastel1\", function() { return _categorical_Pastel1_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"]; });\n\n/* harmony import */ var _categorical_Pastel2_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./categorical/Pastel2.js */ \"./node_modules/d3-scale-chromatic/src/categorical/Pastel2.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"schemePastel2\", function() { return _categorical_Pastel2_js__WEBPACK_IMPORTED_MODULE_5__[\"default\"]; });\n\n/* harmony import */ var _categorical_Set1_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./categorical/Set1.js */ \"./node_modules/d3-scale-chromatic/src/categorical/Set1.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"schemeSet1\", function() { return _categorical_Set1_js__WEBPACK_IMPORTED_MODULE_6__[\"default\"]; });\n\n/* harmony import */ var _categorical_Set2_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./categorical/Set2.js */ \"./node_modules/d3-scale-chromatic/src/categorical/Set2.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"schemeSet2\", function() { return _categorical_Set2_js__WEBPACK_IMPORTED_MODULE_7__[\"default\"]; });\n\n/* harmony import */ var _categorical_Set3_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./categorical/Set3.js */ \"./node_modules/d3-scale-chromatic/src/categorical/Set3.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"schemeSet3\", function() { return _categorical_Set3_js__WEBPACK_IMPORTED_MODULE_8__[\"default\"]; });\n\n/* harmony import */ var _categorical_Tableau10_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./categorical/Tableau10.js */ \"./node_modules/d3-scale-chromatic/src/categorical/Tableau10.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"schemeTableau10\", function() { return _categorical_Tableau10_js__WEBPACK_IMPORTED_MODULE_9__[\"default\"]; });\n\n/* harmony import */ var _diverging_BrBG_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./diverging/BrBG.js */ \"./node_modules/d3-scale-chromatic/src/diverging/BrBG.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateBrBG\", function() { return _diverging_BrBG_js__WEBPACK_IMPORTED_MODULE_10__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"schemeBrBG\", function() { return _diverging_BrBG_js__WEBPACK_IMPORTED_MODULE_10__[\"scheme\"]; });\n\n/* harmony import */ var _diverging_PRGn_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./diverging/PRGn.js */ \"./node_modules/d3-scale-chromatic/src/diverging/PRGn.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolatePRGn\", function() { return _diverging_PRGn_js__WEBPACK_IMPORTED_MODULE_11__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"schemePRGn\", function() { return _diverging_PRGn_js__WEBPACK_IMPORTED_MODULE_11__[\"scheme\"]; });\n\n/* harmony import */ var _diverging_PiYG_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./diverging/PiYG.js */ \"./node_modules/d3-scale-chromatic/src/diverging/PiYG.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolatePiYG\", function() { return _diverging_PiYG_js__WEBPACK_IMPORTED_MODULE_12__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"schemePiYG\", function() { return _diverging_PiYG_js__WEBPACK_IMPORTED_MODULE_12__[\"scheme\"]; });\n\n/* harmony import */ var _diverging_PuOr_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./diverging/PuOr.js */ \"./node_modules/d3-scale-chromatic/src/diverging/PuOr.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolatePuOr\", function() { return _diverging_PuOr_js__WEBPACK_IMPORTED_MODULE_13__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"schemePuOr\", function() { return _diverging_PuOr_js__WEBPACK_IMPORTED_MODULE_13__[\"scheme\"]; });\n\n/* harmony import */ var _diverging_RdBu_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./diverging/RdBu.js */ \"./node_modules/d3-scale-chromatic/src/diverging/RdBu.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateRdBu\", function() { return _diverging_RdBu_js__WEBPACK_IMPORTED_MODULE_14__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"schemeRdBu\", function() { return _diverging_RdBu_js__WEBPACK_IMPORTED_MODULE_14__[\"scheme\"]; });\n\n/* harmony import */ var _diverging_RdGy_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./diverging/RdGy.js */ \"./node_modules/d3-scale-chromatic/src/diverging/RdGy.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateRdGy\", function() { return _diverging_RdGy_js__WEBPACK_IMPORTED_MODULE_15__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"schemeRdGy\", function() { return _diverging_RdGy_js__WEBPACK_IMPORTED_MODULE_15__[\"scheme\"]; });\n\n/* harmony import */ var _diverging_RdYlBu_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./diverging/RdYlBu.js */ \"./node_modules/d3-scale-chromatic/src/diverging/RdYlBu.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateRdYlBu\", function() { return _diverging_RdYlBu_js__WEBPACK_IMPORTED_MODULE_16__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"schemeRdYlBu\", function() { return _diverging_RdYlBu_js__WEBPACK_IMPORTED_MODULE_16__[\"scheme\"]; });\n\n/* harmony import */ var _diverging_RdYlGn_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./diverging/RdYlGn.js */ \"./node_modules/d3-scale-chromatic/src/diverging/RdYlGn.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateRdYlGn\", function() { return _diverging_RdYlGn_js__WEBPACK_IMPORTED_MODULE_17__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"schemeRdYlGn\", function() { return _diverging_RdYlGn_js__WEBPACK_IMPORTED_MODULE_17__[\"scheme\"]; });\n\n/* harmony import */ var _diverging_Spectral_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./diverging/Spectral.js */ \"./node_modules/d3-scale-chromatic/src/diverging/Spectral.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateSpectral\", function() { return _diverging_Spectral_js__WEBPACK_IMPORTED_MODULE_18__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"schemeSpectral\", function() { return _diverging_Spectral_js__WEBPACK_IMPORTED_MODULE_18__[\"scheme\"]; });\n\n/* harmony import */ var _sequential_multi_BuGn_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./sequential-multi/BuGn.js */ \"./node_modules/d3-scale-chromatic/src/sequential-multi/BuGn.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateBuGn\", function() { return _sequential_multi_BuGn_js__WEBPACK_IMPORTED_MODULE_19__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"schemeBuGn\", function() { return _sequential_multi_BuGn_js__WEBPACK_IMPORTED_MODULE_19__[\"scheme\"]; });\n\n/* harmony import */ var _sequential_multi_BuPu_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./sequential-multi/BuPu.js */ \"./node_modules/d3-scale-chromatic/src/sequential-multi/BuPu.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateBuPu\", function() { return _sequential_multi_BuPu_js__WEBPACK_IMPORTED_MODULE_20__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"schemeBuPu\", function() { return _sequential_multi_BuPu_js__WEBPACK_IMPORTED_MODULE_20__[\"scheme\"]; });\n\n/* harmony import */ var _sequential_multi_GnBu_js__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./sequential-multi/GnBu.js */ \"./node_modules/d3-scale-chromatic/src/sequential-multi/GnBu.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateGnBu\", function() { return _sequential_multi_GnBu_js__WEBPACK_IMPORTED_MODULE_21__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"schemeGnBu\", function() { return _sequential_multi_GnBu_js__WEBPACK_IMPORTED_MODULE_21__[\"scheme\"]; });\n\n/* harmony import */ var _sequential_multi_OrRd_js__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./sequential-multi/OrRd.js */ \"./node_modules/d3-scale-chromatic/src/sequential-multi/OrRd.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateOrRd\", function() { return _sequential_multi_OrRd_js__WEBPACK_IMPORTED_MODULE_22__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"schemeOrRd\", function() { return _sequential_multi_OrRd_js__WEBPACK_IMPORTED_MODULE_22__[\"scheme\"]; });\n\n/* harmony import */ var _sequential_multi_PuBuGn_js__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./sequential-multi/PuBuGn.js */ \"./node_modules/d3-scale-chromatic/src/sequential-multi/PuBuGn.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolatePuBuGn\", function() { return _sequential_multi_PuBuGn_js__WEBPACK_IMPORTED_MODULE_23__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"schemePuBuGn\", function() { return _sequential_multi_PuBuGn_js__WEBPACK_IMPORTED_MODULE_23__[\"scheme\"]; });\n\n/* harmony import */ var _sequential_multi_PuBu_js__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ./sequential-multi/PuBu.js */ \"./node_modules/d3-scale-chromatic/src/sequential-multi/PuBu.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolatePuBu\", function() { return _sequential_multi_PuBu_js__WEBPACK_IMPORTED_MODULE_24__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"schemePuBu\", function() { return _sequential_multi_PuBu_js__WEBPACK_IMPORTED_MODULE_24__[\"scheme\"]; });\n\n/* harmony import */ var _sequential_multi_PuRd_js__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ./sequential-multi/PuRd.js */ \"./node_modules/d3-scale-chromatic/src/sequential-multi/PuRd.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolatePuRd\", function() { return _sequential_multi_PuRd_js__WEBPACK_IMPORTED_MODULE_25__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"schemePuRd\", function() { return _sequential_multi_PuRd_js__WEBPACK_IMPORTED_MODULE_25__[\"scheme\"]; });\n\n/* harmony import */ var _sequential_multi_RdPu_js__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ./sequential-multi/RdPu.js */ \"./node_modules/d3-scale-chromatic/src/sequential-multi/RdPu.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateRdPu\", function() { return _sequential_multi_RdPu_js__WEBPACK_IMPORTED_MODULE_26__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"schemeRdPu\", function() { return _sequential_multi_RdPu_js__WEBPACK_IMPORTED_MODULE_26__[\"scheme\"]; });\n\n/* harmony import */ var _sequential_multi_YlGnBu_js__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ./sequential-multi/YlGnBu.js */ \"./node_modules/d3-scale-chromatic/src/sequential-multi/YlGnBu.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateYlGnBu\", function() { return _sequential_multi_YlGnBu_js__WEBPACK_IMPORTED_MODULE_27__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"schemeYlGnBu\", function() { return _sequential_multi_YlGnBu_js__WEBPACK_IMPORTED_MODULE_27__[\"scheme\"]; });\n\n/* harmony import */ var _sequential_multi_YlGn_js__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ./sequential-multi/YlGn.js */ \"./node_modules/d3-scale-chromatic/src/sequential-multi/YlGn.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateYlGn\", function() { return _sequential_multi_YlGn_js__WEBPACK_IMPORTED_MODULE_28__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"schemeYlGn\", function() { return _sequential_multi_YlGn_js__WEBPACK_IMPORTED_MODULE_28__[\"scheme\"]; });\n\n/* harmony import */ var _sequential_multi_YlOrBr_js__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ./sequential-multi/YlOrBr.js */ \"./node_modules/d3-scale-chromatic/src/sequential-multi/YlOrBr.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateYlOrBr\", function() { return _sequential_multi_YlOrBr_js__WEBPACK_IMPORTED_MODULE_29__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"schemeYlOrBr\", function() { return _sequential_multi_YlOrBr_js__WEBPACK_IMPORTED_MODULE_29__[\"scheme\"]; });\n\n/* harmony import */ var _sequential_multi_YlOrRd_js__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ./sequential-multi/YlOrRd.js */ \"./node_modules/d3-scale-chromatic/src/sequential-multi/YlOrRd.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateYlOrRd\", function() { return _sequential_multi_YlOrRd_js__WEBPACK_IMPORTED_MODULE_30__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"schemeYlOrRd\", function() { return _sequential_multi_YlOrRd_js__WEBPACK_IMPORTED_MODULE_30__[\"scheme\"]; });\n\n/* harmony import */ var _sequential_single_Blues_js__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ./sequential-single/Blues.js */ \"./node_modules/d3-scale-chromatic/src/sequential-single/Blues.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateBlues\", function() { return _sequential_single_Blues_js__WEBPACK_IMPORTED_MODULE_31__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"schemeBlues\", function() { return _sequential_single_Blues_js__WEBPACK_IMPORTED_MODULE_31__[\"scheme\"]; });\n\n/* harmony import */ var _sequential_single_Greens_js__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ./sequential-single/Greens.js */ \"./node_modules/d3-scale-chromatic/src/sequential-single/Greens.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateGreens\", function() { return _sequential_single_Greens_js__WEBPACK_IMPORTED_MODULE_32__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"schemeGreens\", function() { return _sequential_single_Greens_js__WEBPACK_IMPORTED_MODULE_32__[\"scheme\"]; });\n\n/* harmony import */ var _sequential_single_Greys_js__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! ./sequential-single/Greys.js */ \"./node_modules/d3-scale-chromatic/src/sequential-single/Greys.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateGreys\", function() { return _sequential_single_Greys_js__WEBPACK_IMPORTED_MODULE_33__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"schemeGreys\", function() { return _sequential_single_Greys_js__WEBPACK_IMPORTED_MODULE_33__[\"scheme\"]; });\n\n/* harmony import */ var _sequential_single_Purples_js__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! ./sequential-single/Purples.js */ \"./node_modules/d3-scale-chromatic/src/sequential-single/Purples.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolatePurples\", function() { return _sequential_single_Purples_js__WEBPACK_IMPORTED_MODULE_34__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"schemePurples\", function() { return _sequential_single_Purples_js__WEBPACK_IMPORTED_MODULE_34__[\"scheme\"]; });\n\n/* harmony import */ var _sequential_single_Reds_js__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(/*! ./sequential-single/Reds.js */ \"./node_modules/d3-scale-chromatic/src/sequential-single/Reds.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateReds\", function() { return _sequential_single_Reds_js__WEBPACK_IMPORTED_MODULE_35__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"schemeReds\", function() { return _sequential_single_Reds_js__WEBPACK_IMPORTED_MODULE_35__[\"scheme\"]; });\n\n/* harmony import */ var _sequential_single_Oranges_js__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(/*! ./sequential-single/Oranges.js */ \"./node_modules/d3-scale-chromatic/src/sequential-single/Oranges.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateOranges\", function() { return _sequential_single_Oranges_js__WEBPACK_IMPORTED_MODULE_36__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"schemeOranges\", function() { return _sequential_single_Oranges_js__WEBPACK_IMPORTED_MODULE_36__[\"scheme\"]; });\n\n/* harmony import */ var _sequential_multi_cividis_js__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(/*! ./sequential-multi/cividis.js */ \"./node_modules/d3-scale-chromatic/src/sequential-multi/cividis.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateCividis\", function() { return _sequential_multi_cividis_js__WEBPACK_IMPORTED_MODULE_37__[\"default\"]; });\n\n/* harmony import */ var _sequential_multi_cubehelix_js__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(/*! ./sequential-multi/cubehelix.js */ \"./node_modules/d3-scale-chromatic/src/sequential-multi/cubehelix.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateCubehelixDefault\", function() { return _sequential_multi_cubehelix_js__WEBPACK_IMPORTED_MODULE_38__[\"default\"]; });\n\n/* harmony import */ var _sequential_multi_rainbow_js__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__(/*! ./sequential-multi/rainbow.js */ \"./node_modules/d3-scale-chromatic/src/sequential-multi/rainbow.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateRainbow\", function() { return _sequential_multi_rainbow_js__WEBPACK_IMPORTED_MODULE_39__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateWarm\", function() { return _sequential_multi_rainbow_js__WEBPACK_IMPORTED_MODULE_39__[\"warm\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateCool\", function() { return _sequential_multi_rainbow_js__WEBPACK_IMPORTED_MODULE_39__[\"cool\"]; });\n\n/* harmony import */ var _sequential_multi_sinebow_js__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__(/*! ./sequential-multi/sinebow.js */ \"./node_modules/d3-scale-chromatic/src/sequential-multi/sinebow.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateSinebow\", function() { return _sequential_multi_sinebow_js__WEBPACK_IMPORTED_MODULE_40__[\"default\"]; });\n\n/* harmony import */ var _sequential_multi_turbo_js__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__(/*! ./sequential-multi/turbo.js */ \"./node_modules/d3-scale-chromatic/src/sequential-multi/turbo.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateTurbo\", function() { return _sequential_multi_turbo_js__WEBPACK_IMPORTED_MODULE_41__[\"default\"]; });\n\n/* harmony import */ var _sequential_multi_viridis_js__WEBPACK_IMPORTED_MODULE_42__ = __webpack_require__(/*! ./sequential-multi/viridis.js */ \"./node_modules/d3-scale-chromatic/src/sequential-multi/viridis.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateViridis\", function() { return _sequential_multi_viridis_js__WEBPACK_IMPORTED_MODULE_42__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateMagma\", function() { return _sequential_multi_viridis_js__WEBPACK_IMPORTED_MODULE_42__[\"magma\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateInferno\", function() { return _sequential_multi_viridis_js__WEBPACK_IMPORTED_MODULE_42__[\"inferno\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolatePlasma\", function() { return _sequential_multi_viridis_js__WEBPACK_IMPORTED_MODULE_42__[\"plasma\"]; });\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale-chromatic/src/ramp.js\":\n/*!*****************************************************!*\\\n  !*** ./node_modules/d3-scale-chromatic/src/ramp.js ***!\n  \\*****************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var d3_interpolate__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-interpolate */ \"./node_modules/d3-scale-chromatic/node_modules/d3-interpolate/src/index.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (scheme => Object(d3_interpolate__WEBPACK_IMPORTED_MODULE_0__[\"interpolateRgbBasis\"])(scheme[scheme.length - 1]));\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale-chromatic/src/sequential-multi/BuGn.js\":\n/*!**********************************************************************!*\\\n  !*** ./node_modules/d3-scale-chromatic/src/sequential-multi/BuGn.js ***!\n  \\**********************************************************************/\n/*! exports provided: scheme, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"scheme\", function() { return scheme; });\n/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ \"./node_modules/d3-scale-chromatic/src/colors.js\");\n/* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ \"./node_modules/d3-scale-chromatic/src/ramp.js\");\n\n\n\nvar scheme = new Array(3).concat(\n  \"e5f5f999d8c92ca25f\",\n  \"edf8fbb2e2e266c2a4238b45\",\n  \"edf8fbb2e2e266c2a42ca25f006d2c\",\n  \"edf8fbccece699d8c966c2a42ca25f006d2c\",\n  \"edf8fbccece699d8c966c2a441ae76238b45005824\",\n  \"f7fcfde5f5f9ccece699d8c966c2a441ae76238b45005824\",\n  \"f7fcfde5f5f9ccece699d8c966c2a441ae76238b45006d2c00441b\"\n).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(scheme));\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale-chromatic/src/sequential-multi/BuPu.js\":\n/*!**********************************************************************!*\\\n  !*** ./node_modules/d3-scale-chromatic/src/sequential-multi/BuPu.js ***!\n  \\**********************************************************************/\n/*! exports provided: scheme, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"scheme\", function() { return scheme; });\n/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ \"./node_modules/d3-scale-chromatic/src/colors.js\");\n/* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ \"./node_modules/d3-scale-chromatic/src/ramp.js\");\n\n\n\nvar scheme = new Array(3).concat(\n  \"e0ecf49ebcda8856a7\",\n  \"edf8fbb3cde38c96c688419d\",\n  \"edf8fbb3cde38c96c68856a7810f7c\",\n  \"edf8fbbfd3e69ebcda8c96c68856a7810f7c\",\n  \"edf8fbbfd3e69ebcda8c96c68c6bb188419d6e016b\",\n  \"f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d6e016b\",\n  \"f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d810f7c4d004b\"\n).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(scheme));\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale-chromatic/src/sequential-multi/GnBu.js\":\n/*!**********************************************************************!*\\\n  !*** ./node_modules/d3-scale-chromatic/src/sequential-multi/GnBu.js ***!\n  \\**********************************************************************/\n/*! exports provided: scheme, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"scheme\", function() { return scheme; });\n/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ \"./node_modules/d3-scale-chromatic/src/colors.js\");\n/* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ \"./node_modules/d3-scale-chromatic/src/ramp.js\");\n\n\n\nvar scheme = new Array(3).concat(\n  \"e0f3dba8ddb543a2ca\",\n  \"f0f9e8bae4bc7bccc42b8cbe\",\n  \"f0f9e8bae4bc7bccc443a2ca0868ac\",\n  \"f0f9e8ccebc5a8ddb57bccc443a2ca0868ac\",\n  \"f0f9e8ccebc5a8ddb57bccc44eb3d32b8cbe08589e\",\n  \"f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe08589e\",\n  \"f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe0868ac084081\"\n).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(scheme));\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale-chromatic/src/sequential-multi/OrRd.js\":\n/*!**********************************************************************!*\\\n  !*** ./node_modules/d3-scale-chromatic/src/sequential-multi/OrRd.js ***!\n  \\**********************************************************************/\n/*! exports provided: scheme, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"scheme\", function() { return scheme; });\n/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ \"./node_modules/d3-scale-chromatic/src/colors.js\");\n/* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ \"./node_modules/d3-scale-chromatic/src/ramp.js\");\n\n\n\nvar scheme = new Array(3).concat(\n  \"fee8c8fdbb84e34a33\",\n  \"fef0d9fdcc8afc8d59d7301f\",\n  \"fef0d9fdcc8afc8d59e34a33b30000\",\n  \"fef0d9fdd49efdbb84fc8d59e34a33b30000\",\n  \"fef0d9fdd49efdbb84fc8d59ef6548d7301f990000\",\n  \"fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000\",\n  \"fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000\"\n).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(scheme));\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale-chromatic/src/sequential-multi/PuBu.js\":\n/*!**********************************************************************!*\\\n  !*** ./node_modules/d3-scale-chromatic/src/sequential-multi/PuBu.js ***!\n  \\**********************************************************************/\n/*! exports provided: scheme, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"scheme\", function() { return scheme; });\n/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ \"./node_modules/d3-scale-chromatic/src/colors.js\");\n/* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ \"./node_modules/d3-scale-chromatic/src/ramp.js\");\n\n\n\nvar scheme = new Array(3).concat(\n  \"ece7f2a6bddb2b8cbe\",\n  \"f1eef6bdc9e174a9cf0570b0\",\n  \"f1eef6bdc9e174a9cf2b8cbe045a8d\",\n  \"f1eef6d0d1e6a6bddb74a9cf2b8cbe045a8d\",\n  \"f1eef6d0d1e6a6bddb74a9cf3690c00570b0034e7b\",\n  \"fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0034e7b\",\n  \"fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0045a8d023858\"\n).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(scheme));\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale-chromatic/src/sequential-multi/PuBuGn.js\":\n/*!************************************************************************!*\\\n  !*** ./node_modules/d3-scale-chromatic/src/sequential-multi/PuBuGn.js ***!\n  \\************************************************************************/\n/*! exports provided: scheme, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"scheme\", function() { return scheme; });\n/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ \"./node_modules/d3-scale-chromatic/src/colors.js\");\n/* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ \"./node_modules/d3-scale-chromatic/src/ramp.js\");\n\n\n\nvar scheme = new Array(3).concat(\n  \"ece2f0a6bddb1c9099\",\n  \"f6eff7bdc9e167a9cf02818a\",\n  \"f6eff7bdc9e167a9cf1c9099016c59\",\n  \"f6eff7d0d1e6a6bddb67a9cf1c9099016c59\",\n  \"f6eff7d0d1e6a6bddb67a9cf3690c002818a016450\",\n  \"fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016450\",\n  \"fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016c59014636\"\n).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(scheme));\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale-chromatic/src/sequential-multi/PuRd.js\":\n/*!**********************************************************************!*\\\n  !*** ./node_modules/d3-scale-chromatic/src/sequential-multi/PuRd.js ***!\n  \\**********************************************************************/\n/*! exports provided: scheme, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"scheme\", function() { return scheme; });\n/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ \"./node_modules/d3-scale-chromatic/src/colors.js\");\n/* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ \"./node_modules/d3-scale-chromatic/src/ramp.js\");\n\n\n\nvar scheme = new Array(3).concat(\n  \"e7e1efc994c7dd1c77\",\n  \"f1eef6d7b5d8df65b0ce1256\",\n  \"f1eef6d7b5d8df65b0dd1c77980043\",\n  \"f1eef6d4b9dac994c7df65b0dd1c77980043\",\n  \"f1eef6d4b9dac994c7df65b0e7298ace125691003f\",\n  \"f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125691003f\",\n  \"f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125698004367001f\"\n).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(scheme));\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale-chromatic/src/sequential-multi/RdPu.js\":\n/*!**********************************************************************!*\\\n  !*** ./node_modules/d3-scale-chromatic/src/sequential-multi/RdPu.js ***!\n  \\**********************************************************************/\n/*! exports provided: scheme, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"scheme\", function() { return scheme; });\n/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ \"./node_modules/d3-scale-chromatic/src/colors.js\");\n/* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ \"./node_modules/d3-scale-chromatic/src/ramp.js\");\n\n\n\nvar scheme = new Array(3).concat(\n  \"fde0ddfa9fb5c51b8a\",\n  \"feebe2fbb4b9f768a1ae017e\",\n  \"feebe2fbb4b9f768a1c51b8a7a0177\",\n  \"feebe2fcc5c0fa9fb5f768a1c51b8a7a0177\",\n  \"feebe2fcc5c0fa9fb5f768a1dd3497ae017e7a0177\",\n  \"fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a0177\",\n  \"fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a017749006a\"\n).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(scheme));\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale-chromatic/src/sequential-multi/YlGn.js\":\n/*!**********************************************************************!*\\\n  !*** ./node_modules/d3-scale-chromatic/src/sequential-multi/YlGn.js ***!\n  \\**********************************************************************/\n/*! exports provided: scheme, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"scheme\", function() { return scheme; });\n/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ \"./node_modules/d3-scale-chromatic/src/colors.js\");\n/* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ \"./node_modules/d3-scale-chromatic/src/ramp.js\");\n\n\n\nvar scheme = new Array(3).concat(\n  \"f7fcb9addd8e31a354\",\n  \"ffffccc2e69978c679238443\",\n  \"ffffccc2e69978c67931a354006837\",\n  \"ffffccd9f0a3addd8e78c67931a354006837\",\n  \"ffffccd9f0a3addd8e78c67941ab5d238443005a32\",\n  \"ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443005a32\",\n  \"ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443006837004529\"\n).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(scheme));\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale-chromatic/src/sequential-multi/YlGnBu.js\":\n/*!************************************************************************!*\\\n  !*** ./node_modules/d3-scale-chromatic/src/sequential-multi/YlGnBu.js ***!\n  \\************************************************************************/\n/*! exports provided: scheme, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"scheme\", function() { return scheme; });\n/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ \"./node_modules/d3-scale-chromatic/src/colors.js\");\n/* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ \"./node_modules/d3-scale-chromatic/src/ramp.js\");\n\n\n\nvar scheme = new Array(3).concat(\n  \"edf8b17fcdbb2c7fb8\",\n  \"ffffcca1dab441b6c4225ea8\",\n  \"ffffcca1dab441b6c42c7fb8253494\",\n  \"ffffccc7e9b47fcdbb41b6c42c7fb8253494\",\n  \"ffffccc7e9b47fcdbb41b6c41d91c0225ea80c2c84\",\n  \"ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea80c2c84\",\n  \"ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea8253494081d58\"\n).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(scheme));\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale-chromatic/src/sequential-multi/YlOrBr.js\":\n/*!************************************************************************!*\\\n  !*** ./node_modules/d3-scale-chromatic/src/sequential-multi/YlOrBr.js ***!\n  \\************************************************************************/\n/*! exports provided: scheme, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"scheme\", function() { return scheme; });\n/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ \"./node_modules/d3-scale-chromatic/src/colors.js\");\n/* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ \"./node_modules/d3-scale-chromatic/src/ramp.js\");\n\n\n\nvar scheme = new Array(3).concat(\n  \"fff7bcfec44fd95f0e\",\n  \"ffffd4fed98efe9929cc4c02\",\n  \"ffffd4fed98efe9929d95f0e993404\",\n  \"ffffd4fee391fec44ffe9929d95f0e993404\",\n  \"ffffd4fee391fec44ffe9929ec7014cc4c028c2d04\",\n  \"ffffe5fff7bcfee391fec44ffe9929ec7014cc4c028c2d04\",\n  \"ffffe5fff7bcfee391fec44ffe9929ec7014cc4c02993404662506\"\n).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(scheme));\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale-chromatic/src/sequential-multi/YlOrRd.js\":\n/*!************************************************************************!*\\\n  !*** ./node_modules/d3-scale-chromatic/src/sequential-multi/YlOrRd.js ***!\n  \\************************************************************************/\n/*! exports provided: scheme, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"scheme\", function() { return scheme; });\n/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ \"./node_modules/d3-scale-chromatic/src/colors.js\");\n/* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ \"./node_modules/d3-scale-chromatic/src/ramp.js\");\n\n\n\nvar scheme = new Array(3).concat(\n  \"ffeda0feb24cf03b20\",\n  \"ffffb2fecc5cfd8d3ce31a1c\",\n  \"ffffb2fecc5cfd8d3cf03b20bd0026\",\n  \"ffffb2fed976feb24cfd8d3cf03b20bd0026\",\n  \"ffffb2fed976feb24cfd8d3cfc4e2ae31a1cb10026\",\n  \"ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cb10026\",\n  \"ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cbd0026800026\"\n).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(scheme));\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale-chromatic/src/sequential-multi/cividis.js\":\n/*!*************************************************************************!*\\\n  !*** ./node_modules/d3-scale-chromatic/src/sequential-multi/cividis.js ***!\n  \\*************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(t) {\n  t = Math.max(0, Math.min(1, t));\n  return \"rgb(\"\n      + Math.max(0, Math.min(255, Math.round(-4.54 - t * (35.34 - t * (2381.73 - t * (6402.7 - t * (7024.72 - t * 2710.57))))))) + \", \"\n      + Math.max(0, Math.min(255, Math.round(32.49 + t * (170.73 + t * (52.82 - t * (131.46 - t * (176.58 - t * 67.37))))))) + \", \"\n      + Math.max(0, Math.min(255, Math.round(81.24 + t * (442.36 - t * (2482.43 - t * (6167.24 - t * (6614.94 - t * 2475.67)))))))\n      + \")\";\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale-chromatic/src/sequential-multi/cubehelix.js\":\n/*!***************************************************************************!*\\\n  !*** ./node_modules/d3-scale-chromatic/src/sequential-multi/cubehelix.js ***!\n  \\***************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var d3_color__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-color */ \"./node_modules/d3-scale-chromatic/node_modules/d3-color/src/index.js\");\n/* harmony import */ var d3_interpolate__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! d3-interpolate */ \"./node_modules/d3-scale-chromatic/node_modules/d3-interpolate/src/index.js\");\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(d3_interpolate__WEBPACK_IMPORTED_MODULE_1__[\"interpolateCubehelixLong\"])(Object(d3_color__WEBPACK_IMPORTED_MODULE_0__[\"cubehelix\"])(300, 0.5, 0.0), Object(d3_color__WEBPACK_IMPORTED_MODULE_0__[\"cubehelix\"])(-240, 0.5, 1.0)));\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale-chromatic/src/sequential-multi/rainbow.js\":\n/*!*************************************************************************!*\\\n  !*** ./node_modules/d3-scale-chromatic/src/sequential-multi/rainbow.js ***!\n  \\*************************************************************************/\n/*! exports provided: warm, cool, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"warm\", function() { return warm; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"cool\", function() { return cool; });\n/* harmony import */ var d3_color__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-color */ \"./node_modules/d3-scale-chromatic/node_modules/d3-color/src/index.js\");\n/* harmony import */ var d3_interpolate__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! d3-interpolate */ \"./node_modules/d3-scale-chromatic/node_modules/d3-interpolate/src/index.js\");\n\n\n\nvar warm = Object(d3_interpolate__WEBPACK_IMPORTED_MODULE_1__[\"interpolateCubehelixLong\"])(Object(d3_color__WEBPACK_IMPORTED_MODULE_0__[\"cubehelix\"])(-100, 0.75, 0.35), Object(d3_color__WEBPACK_IMPORTED_MODULE_0__[\"cubehelix\"])(80, 1.50, 0.8));\n\nvar cool = Object(d3_interpolate__WEBPACK_IMPORTED_MODULE_1__[\"interpolateCubehelixLong\"])(Object(d3_color__WEBPACK_IMPORTED_MODULE_0__[\"cubehelix\"])(260, 0.75, 0.35), Object(d3_color__WEBPACK_IMPORTED_MODULE_0__[\"cubehelix\"])(80, 1.50, 0.8));\n\nvar c = Object(d3_color__WEBPACK_IMPORTED_MODULE_0__[\"cubehelix\"])();\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(t) {\n  if (t < 0 || t > 1) t -= Math.floor(t);\n  var ts = Math.abs(t - 0.5);\n  c.h = 360 * t - 100;\n  c.s = 1.5 - 1.5 * ts;\n  c.l = 0.8 - 0.9 * ts;\n  return c + \"\";\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale-chromatic/src/sequential-multi/sinebow.js\":\n/*!*************************************************************************!*\\\n  !*** ./node_modules/d3-scale-chromatic/src/sequential-multi/sinebow.js ***!\n  \\*************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var d3_color__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-color */ \"./node_modules/d3-scale-chromatic/node_modules/d3-color/src/index.js\");\n\n\nvar c = Object(d3_color__WEBPACK_IMPORTED_MODULE_0__[\"rgb\"])(),\n    pi_1_3 = Math.PI / 3,\n    pi_2_3 = Math.PI * 2 / 3;\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(t) {\n  var x;\n  t = (0.5 - t) * Math.PI;\n  c.r = 255 * (x = Math.sin(t)) * x;\n  c.g = 255 * (x = Math.sin(t + pi_1_3)) * x;\n  c.b = 255 * (x = Math.sin(t + pi_2_3)) * x;\n  return c + \"\";\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale-chromatic/src/sequential-multi/turbo.js\":\n/*!***********************************************************************!*\\\n  !*** ./node_modules/d3-scale-chromatic/src/sequential-multi/turbo.js ***!\n  \\***********************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(t) {\n  t = Math.max(0, Math.min(1, t));\n  return \"rgb(\"\n      + Math.max(0, Math.min(255, Math.round(34.61 + t * (1172.33 - t * (10793.56 - t * (33300.12 - t * (38394.49 - t * 14825.05))))))) + \", \"\n      + Math.max(0, Math.min(255, Math.round(23.31 + t * (557.33 + t * (1225.33 - t * (3574.96 - t * (1073.77 + t * 707.56))))))) + \", \"\n      + Math.max(0, Math.min(255, Math.round(27.2 + t * (3211.1 - t * (15327.97 - t * (27814 - t * (22569.18 - t * 6838.66)))))))\n      + \")\";\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale-chromatic/src/sequential-multi/viridis.js\":\n/*!*************************************************************************!*\\\n  !*** ./node_modules/d3-scale-chromatic/src/sequential-multi/viridis.js ***!\n  \\*************************************************************************/\n/*! exports provided: default, magma, inferno, plasma */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"magma\", function() { return magma; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"inferno\", function() { return inferno; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"plasma\", function() { return plasma; });\n/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ \"./node_modules/d3-scale-chromatic/src/colors.js\");\n\n\nfunction ramp(range) {\n  var n = range.length;\n  return function(t) {\n    return range[Math.max(0, Math.min(n - 1, Math.floor(t * n)))];\n  };\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (ramp(Object(_colors_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(\"44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725\")));\n\nvar magma = ramp(Object(_colors_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(\"00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf\"));\n\nvar inferno = ramp(Object(_colors_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(\"00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4\"));\n\nvar plasma = ramp(Object(_colors_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(\"0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921\"));\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale-chromatic/src/sequential-single/Blues.js\":\n/*!************************************************************************!*\\\n  !*** ./node_modules/d3-scale-chromatic/src/sequential-single/Blues.js ***!\n  \\************************************************************************/\n/*! exports provided: scheme, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"scheme\", function() { return scheme; });\n/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ \"./node_modules/d3-scale-chromatic/src/colors.js\");\n/* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ \"./node_modules/d3-scale-chromatic/src/ramp.js\");\n\n\n\nvar scheme = new Array(3).concat(\n  \"deebf79ecae13182bd\",\n  \"eff3ffbdd7e76baed62171b5\",\n  \"eff3ffbdd7e76baed63182bd08519c\",\n  \"eff3ffc6dbef9ecae16baed63182bd08519c\",\n  \"eff3ffc6dbef9ecae16baed64292c62171b5084594\",\n  \"f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594\",\n  \"f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b\"\n).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(scheme));\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale-chromatic/src/sequential-single/Greens.js\":\n/*!*************************************************************************!*\\\n  !*** ./node_modules/d3-scale-chromatic/src/sequential-single/Greens.js ***!\n  \\*************************************************************************/\n/*! exports provided: scheme, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"scheme\", function() { return scheme; });\n/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ \"./node_modules/d3-scale-chromatic/src/colors.js\");\n/* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ \"./node_modules/d3-scale-chromatic/src/ramp.js\");\n\n\n\nvar scheme = new Array(3).concat(\n  \"e5f5e0a1d99b31a354\",\n  \"edf8e9bae4b374c476238b45\",\n  \"edf8e9bae4b374c47631a354006d2c\",\n  \"edf8e9c7e9c0a1d99b74c47631a354006d2c\",\n  \"edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32\",\n  \"f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32\",\n  \"f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b\"\n).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(scheme));\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale-chromatic/src/sequential-single/Greys.js\":\n/*!************************************************************************!*\\\n  !*** ./node_modules/d3-scale-chromatic/src/sequential-single/Greys.js ***!\n  \\************************************************************************/\n/*! exports provided: scheme, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"scheme\", function() { return scheme; });\n/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ \"./node_modules/d3-scale-chromatic/src/colors.js\");\n/* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ \"./node_modules/d3-scale-chromatic/src/ramp.js\");\n\n\n\nvar scheme = new Array(3).concat(\n  \"f0f0f0bdbdbd636363\",\n  \"f7f7f7cccccc969696525252\",\n  \"f7f7f7cccccc969696636363252525\",\n  \"f7f7f7d9d9d9bdbdbd969696636363252525\",\n  \"f7f7f7d9d9d9bdbdbd969696737373525252252525\",\n  \"fffffff0f0f0d9d9d9bdbdbd969696737373525252252525\",\n  \"fffffff0f0f0d9d9d9bdbdbd969696737373525252252525000000\"\n).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(scheme));\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale-chromatic/src/sequential-single/Oranges.js\":\n/*!**************************************************************************!*\\\n  !*** ./node_modules/d3-scale-chromatic/src/sequential-single/Oranges.js ***!\n  \\**************************************************************************/\n/*! exports provided: scheme, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"scheme\", function() { return scheme; });\n/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ \"./node_modules/d3-scale-chromatic/src/colors.js\");\n/* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ \"./node_modules/d3-scale-chromatic/src/ramp.js\");\n\n\n\nvar scheme = new Array(3).concat(\n  \"fee6cefdae6be6550d\",\n  \"feeddefdbe85fd8d3cd94701\",\n  \"feeddefdbe85fd8d3ce6550da63603\",\n  \"feeddefdd0a2fdae6bfd8d3ce6550da63603\",\n  \"feeddefdd0a2fdae6bfd8d3cf16913d948018c2d04\",\n  \"fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d948018c2d04\",\n  \"fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d94801a636037f2704\"\n).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(scheme));\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale-chromatic/src/sequential-single/Purples.js\":\n/*!**************************************************************************!*\\\n  !*** ./node_modules/d3-scale-chromatic/src/sequential-single/Purples.js ***!\n  \\**************************************************************************/\n/*! exports provided: scheme, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"scheme\", function() { return scheme; });\n/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ \"./node_modules/d3-scale-chromatic/src/colors.js\");\n/* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ \"./node_modules/d3-scale-chromatic/src/ramp.js\");\n\n\n\nvar scheme = new Array(3).concat(\n  \"efedf5bcbddc756bb1\",\n  \"f2f0f7cbc9e29e9ac86a51a3\",\n  \"f2f0f7cbc9e29e9ac8756bb154278f\",\n  \"f2f0f7dadaebbcbddc9e9ac8756bb154278f\",\n  \"f2f0f7dadaebbcbddc9e9ac8807dba6a51a34a1486\",\n  \"fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a34a1486\",\n  \"fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a354278f3f007d\"\n).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(scheme));\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale-chromatic/src/sequential-single/Reds.js\":\n/*!***********************************************************************!*\\\n  !*** ./node_modules/d3-scale-chromatic/src/sequential-single/Reds.js ***!\n  \\***********************************************************************/\n/*! exports provided: scheme, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"scheme\", function() { return scheme; });\n/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ \"./node_modules/d3-scale-chromatic/src/colors.js\");\n/* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ \"./node_modules/d3-scale-chromatic/src/ramp.js\");\n\n\n\nvar scheme = new Array(3).concat(\n  \"fee0d2fc9272de2d26\",\n  \"fee5d9fcae91fb6a4acb181d\",\n  \"fee5d9fcae91fb6a4ade2d26a50f15\",\n  \"fee5d9fcbba1fc9272fb6a4ade2d26a50f15\",\n  \"fee5d9fcbba1fc9272fb6a4aef3b2ccb181d99000d\",\n  \"fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181d99000d\",\n  \"fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181da50f1567000d\"\n).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(scheme));\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale/node_modules/d3-array/src/array.js\":\n/*!******************************************************************!*\\\n  !*** ./node_modules/d3-scale/node_modules/d3-array/src/array.js ***!\n  \\******************************************************************/\n/*! exports provided: slice, map */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"slice\", function() { return slice; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"map\", function() { return map; });\nvar array = Array.prototype;\n\nvar slice = array.slice;\nvar map = array.map;\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale/node_modules/d3-array/src/ascending.js\":\n/*!**********************************************************************!*\\\n  !*** ./node_modules/d3-scale/node_modules/d3-array/src/ascending.js ***!\n  \\**********************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(a, b) {\n  return a == null || b == null ? NaN\n    : a < b ? -1\n    : a > b ? 1\n    : a >= b ? 0\n    : NaN;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale/node_modules/d3-array/src/bin.js\":\n/*!****************************************************************!*\\\n  !*** ./node_modules/d3-scale/node_modules/d3-array/src/bin.js ***!\n  \\****************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _array_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./array.js */ \"./node_modules/d3-scale/node_modules/d3-array/src/array.js\");\n/* harmony import */ var _bisect_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./bisect.js */ \"./node_modules/d3-scale/node_modules/d3-array/src/bisect.js\");\n/* harmony import */ var _constant_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./constant.js */ \"./node_modules/d3-scale/node_modules/d3-array/src/constant.js\");\n/* harmony import */ var _extent_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./extent.js */ \"./node_modules/d3-scale/node_modules/d3-array/src/extent.js\");\n/* harmony import */ var _identity_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./identity.js */ \"./node_modules/d3-scale/node_modules/d3-array/src/identity.js\");\n/* harmony import */ var _nice_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./nice.js */ \"./node_modules/d3-scale/node_modules/d3-array/src/nice.js\");\n/* harmony import */ var _ticks_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./ticks.js */ \"./node_modules/d3-scale/node_modules/d3-array/src/ticks.js\");\n/* harmony import */ var _threshold_sturges_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./threshold/sturges.js */ \"./node_modules/d3-scale/node_modules/d3-array/src/threshold/sturges.js\");\n\n\n\n\n\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  var value = _identity_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"],\n      domain = _extent_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"],\n      threshold = _threshold_sturges_js__WEBPACK_IMPORTED_MODULE_7__[\"default\"];\n\n  function histogram(data) {\n    if (!Array.isArray(data)) data = Array.from(data);\n\n    var i,\n        n = data.length,\n        x,\n        values = new Array(n);\n\n    for (i = 0; i < n; ++i) {\n      values[i] = value(data[i], i, data);\n    }\n\n    var xz = domain(values),\n        x0 = xz[0],\n        x1 = xz[1],\n        tz = threshold(values, x0, x1);\n\n    // Convert number of thresholds into uniform thresholds, and nice the\n    // default domain accordingly.\n    if (!Array.isArray(tz)) {\n      const max = x1, tn = +tz;\n      if (domain === _extent_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"]) [x0, x1] = Object(_nice_js__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(x0, x1, tn);\n      tz = Object(_ticks_js__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(x0, x1, tn);\n\n      // If the last threshold is coincident with the domain’s upper bound, the\n      // last bin will be zero-width. If the default domain is used, and this\n      // last threshold is coincident with the maximum input value, we can\n      // extend the niced upper bound by one tick to ensure uniform bin widths;\n      // otherwise, we simply remove the last threshold. Note that we don’t\n      // coerce values or the domain to numbers, and thus must be careful to\n      // compare order (>=) rather than strict equality (===)!\n      if (tz[tz.length - 1] >= x1) {\n        if (max >= x1 && domain === _extent_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"]) {\n          const step = Object(_ticks_js__WEBPACK_IMPORTED_MODULE_6__[\"tickIncrement\"])(x0, x1, tn);\n          if (isFinite(step)) {\n            if (step > 0) {\n              x1 = (Math.floor(x1 / step) + 1) * step;\n            } else if (step < 0) {\n              x1 = (Math.ceil(x1 * -step) + 1) / -step;\n            }\n          }\n        } else {\n          tz.pop();\n        }\n      }\n    }\n\n    // Remove any thresholds outside the domain.\n    var m = tz.length;\n    while (tz[0] <= x0) tz.shift(), --m;\n    while (tz[m - 1] > x1) tz.pop(), --m;\n\n    var bins = new Array(m + 1),\n        bin;\n\n    // Initialize bins.\n    for (i = 0; i <= m; ++i) {\n      bin = bins[i] = [];\n      bin.x0 = i > 0 ? tz[i - 1] : x0;\n      bin.x1 = i < m ? tz[i] : x1;\n    }\n\n    // Assign data to bins by value, ignoring any outside the domain.\n    for (i = 0; i < n; ++i) {\n      x = values[i];\n      if (x != null && x0 <= x && x <= x1) {\n        bins[Object(_bisect_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(tz, x, 0, m)].push(data[i]);\n      }\n    }\n\n    return bins;\n  }\n\n  histogram.value = function(_) {\n    return arguments.length ? (value = typeof _ === \"function\" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(_), histogram) : value;\n  };\n\n  histogram.domain = function(_) {\n    return arguments.length ? (domain = typeof _ === \"function\" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])([_[0], _[1]]), histogram) : domain;\n  };\n\n  histogram.thresholds = function(_) {\n    return arguments.length ? (threshold = typeof _ === \"function\" ? _ : Array.isArray(_) ? Object(_constant_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(_array_js__WEBPACK_IMPORTED_MODULE_0__[\"slice\"].call(_)) : Object(_constant_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(_), histogram) : threshold;\n  };\n\n  return histogram;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale/node_modules/d3-array/src/bisect.js\":\n/*!*******************************************************************!*\\\n  !*** ./node_modules/d3-scale/node_modules/d3-array/src/bisect.js ***!\n  \\*******************************************************************/\n/*! exports provided: bisectRight, bisectLeft, bisectCenter, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"bisectRight\", function() { return bisectRight; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"bisectLeft\", function() { return bisectLeft; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"bisectCenter\", function() { return bisectCenter; });\n/* harmony import */ var _ascending_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ascending.js */ \"./node_modules/d3-scale/node_modules/d3-array/src/ascending.js\");\n/* harmony import */ var _bisector_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./bisector.js */ \"./node_modules/d3-scale/node_modules/d3-array/src/bisector.js\");\n/* harmony import */ var _number_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./number.js */ \"./node_modules/d3-scale/node_modules/d3-array/src/number.js\");\n\n\n\n\nconst ascendingBisect = Object(_bisector_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(_ascending_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]);\nconst bisectRight = ascendingBisect.right;\nconst bisectLeft = ascendingBisect.left;\nconst bisectCenter = Object(_bisector_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(_number_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"]).center;\n/* harmony default export */ __webpack_exports__[\"default\"] = (bisectRight);\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale/node_modules/d3-array/src/bisector.js\":\n/*!*********************************************************************!*\\\n  !*** ./node_modules/d3-scale/node_modules/d3-array/src/bisector.js ***!\n  \\*********************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _ascending_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ascending.js */ \"./node_modules/d3-scale/node_modules/d3-array/src/ascending.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(f) {\n  let delta = f;\n  let compare = f;\n\n  if (f.length === 1) {\n    delta = (d, x) => f(d) - x;\n    compare = ascendingComparator(f);\n  }\n\n  function left(a, x, lo, hi) {\n    if (lo == null) lo = 0;\n    if (hi == null) hi = a.length;\n    while (lo < hi) {\n      const mid = (lo + hi) >>> 1;\n      if (compare(a[mid], x) < 0) lo = mid + 1;\n      else hi = mid;\n    }\n    return lo;\n  }\n\n  function right(a, x, lo, hi) {\n    if (lo == null) lo = 0;\n    if (hi == null) hi = a.length;\n    while (lo < hi) {\n      const mid = (lo + hi) >>> 1;\n      if (compare(a[mid], x) > 0) hi = mid;\n      else lo = mid + 1;\n    }\n    return lo;\n  }\n\n  function center(a, x, lo, hi) {\n    if (lo == null) lo = 0;\n    if (hi == null) hi = a.length;\n    const i = left(a, x, lo, hi - 1);\n    return i > lo && delta(a[i - 1], x) > -delta(a[i], x) ? i - 1 : i;\n  }\n\n  return {left, center, right};\n});\n\nfunction ascendingComparator(f) {\n  return (d, x) => Object(_ascending_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(f(d), x);\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale/node_modules/d3-array/src/constant.js\":\n/*!*********************************************************************!*\\\n  !*** ./node_modules/d3-scale/node_modules/d3-array/src/constant.js ***!\n  \\*********************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(x) {\n  return function() {\n    return x;\n  };\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale/node_modules/d3-array/src/count.js\":\n/*!******************************************************************!*\\\n  !*** ./node_modules/d3-scale/node_modules/d3-array/src/count.js ***!\n  \\******************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return count; });\nfunction count(values, valueof) {\n  let count = 0;\n  if (valueof === undefined) {\n    for (let value of values) {\n      if (value != null && (value = +value) >= value) {\n        ++count;\n      }\n    }\n  } else {\n    let index = -1;\n    for (let value of values) {\n      if ((value = valueof(value, ++index, values)) != null && (value = +value) >= value) {\n        ++count;\n      }\n    }\n  }\n  return count;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale/node_modules/d3-array/src/cross.js\":\n/*!******************************************************************!*\\\n  !*** ./node_modules/d3-scale/node_modules/d3-array/src/cross.js ***!\n  \\******************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return cross; });\nfunction length(array) {\n  return array.length | 0;\n}\n\nfunction empty(length) {\n  return !(length > 0);\n}\n\nfunction arrayify(values) {\n  return typeof values !== \"object\" || \"length\" in values ? values : Array.from(values);\n}\n\nfunction reducer(reduce) {\n  return values => reduce(...values);\n}\n\nfunction cross(...values) {\n  const reduce = typeof values[values.length - 1] === \"function\" && reducer(values.pop());\n  values = values.map(arrayify);\n  const lengths = values.map(length);\n  const j = values.length - 1;\n  const index = new Array(j + 1).fill(0);\n  const product = [];\n  if (j < 0 || lengths.some(empty)) return product;\n  while (true) {\n    product.push(index.map((j, i) => values[i][j]));\n    let i = j;\n    while (++index[i] === lengths[i]) {\n      if (i === 0) return reduce ? product.map(reduce) : product;\n      index[i--] = 0;\n    }\n  }\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale/node_modules/d3-array/src/cumsum.js\":\n/*!*******************************************************************!*\\\n  !*** ./node_modules/d3-scale/node_modules/d3-array/src/cumsum.js ***!\n  \\*******************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return cumsum; });\nfunction cumsum(values, valueof) {\n  var sum = 0, index = 0;\n  return Float64Array.from(values, valueof === undefined\n    ? v => (sum += +v || 0)\n    : v => (sum += +valueof(v, index++, values) || 0));\n}\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale/node_modules/d3-array/src/descending.js\":\n/*!***********************************************************************!*\\\n  !*** ./node_modules/d3-scale/node_modules/d3-array/src/descending.js ***!\n  \\***********************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(a, b) {\n  return a == null || b == null ? NaN\n    : b < a ? -1\n    : b > a ? 1\n    : b >= a ? 0\n    : NaN;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale/node_modules/d3-array/src/deviation.js\":\n/*!**********************************************************************!*\\\n  !*** ./node_modules/d3-scale/node_modules/d3-array/src/deviation.js ***!\n  \\**********************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return deviation; });\n/* harmony import */ var _variance_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./variance.js */ \"./node_modules/d3-scale/node_modules/d3-array/src/variance.js\");\n\n\nfunction deviation(values, valueof) {\n  const v = Object(_variance_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(values, valueof);\n  return v ? Math.sqrt(v) : v;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale/node_modules/d3-array/src/difference.js\":\n/*!***********************************************************************!*\\\n  !*** ./node_modules/d3-scale/node_modules/d3-array/src/difference.js ***!\n  \\***********************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return difference; });\nfunction difference(values, ...others) {\n  values = new Set(values);\n  for (const other of others) {\n    for (const value of other) {\n      values.delete(value);\n    }\n  }\n  return values;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale/node_modules/d3-array/src/disjoint.js\":\n/*!*********************************************************************!*\\\n  !*** ./node_modules/d3-scale/node_modules/d3-array/src/disjoint.js ***!\n  \\*********************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return disjoint; });\nfunction disjoint(values, other) {\n  const iterator = other[Symbol.iterator](), set = new Set();\n  for (const v of values) {\n    if (set.has(v)) return false;\n    let value, done;\n    while (({value, done} = iterator.next())) {\n      if (done) break;\n      if (Object.is(v, value)) return false;\n      set.add(value);\n    }\n  }\n  return true;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale/node_modules/d3-array/src/every.js\":\n/*!******************************************************************!*\\\n  !*** ./node_modules/d3-scale/node_modules/d3-array/src/every.js ***!\n  \\******************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return every; });\nfunction every(values, test) {\n  if (typeof test !== \"function\") throw new TypeError(\"test is not a function\");\n  let index = -1;\n  for (const value of values) {\n    if (!test(value, ++index, values)) {\n      return false;\n    }\n  }\n  return true;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale/node_modules/d3-array/src/extent.js\":\n/*!*******************************************************************!*\\\n  !*** ./node_modules/d3-scale/node_modules/d3-array/src/extent.js ***!\n  \\*******************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(values, valueof) {\n  let min;\n  let max;\n  if (valueof === undefined) {\n    for (const value of values) {\n      if (value != null) {\n        if (min === undefined) {\n          if (value >= value) min = max = value;\n        } else {\n          if (min > value) min = value;\n          if (max < value) max = value;\n        }\n      }\n    }\n  } else {\n    let index = -1;\n    for (let value of values) {\n      if ((value = valueof(value, ++index, values)) != null) {\n        if (min === undefined) {\n          if (value >= value) min = max = value;\n        } else {\n          if (min > value) min = value;\n          if (max < value) max = value;\n        }\n      }\n    }\n  }\n  return [min, max];\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale/node_modules/d3-array/src/filter.js\":\n/*!*******************************************************************!*\\\n  !*** ./node_modules/d3-scale/node_modules/d3-array/src/filter.js ***!\n  \\*******************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return filter; });\nfunction filter(values, test) {\n  if (typeof test !== \"function\") throw new TypeError(\"test is not a function\");\n  const array = [];\n  let index = -1;\n  for (const value of values) {\n    if (test(value, ++index, values)) {\n      array.push(value);\n    }\n  }\n  return array;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale/node_modules/d3-array/src/fsum.js\":\n/*!*****************************************************************!*\\\n  !*** ./node_modules/d3-scale/node_modules/d3-array/src/fsum.js ***!\n  \\*****************************************************************/\n/*! exports provided: Adder, fsum, fcumsum */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Adder\", function() { return Adder; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"fsum\", function() { return fsum; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"fcumsum\", function() { return fcumsum; });\n// https://github.com/python/cpython/blob/a74eea238f5baba15797e2e8b570d153bc8690a7/Modules/mathmodule.c#L1423\nclass Adder {\n  constructor() {\n    this._partials = new Float64Array(32);\n    this._n = 0;\n  }\n  add(x) {\n    const p = this._partials;\n    let i = 0;\n    for (let j = 0; j < this._n && j < 32; j++) {\n      const y = p[j],\n        hi = x + y,\n        lo = Math.abs(x) < Math.abs(y) ? x - (hi - y) : y - (hi - x);\n      if (lo) p[i++] = lo;\n      x = hi;\n    }\n    p[i] = x;\n    this._n = i + 1;\n    return this;\n  }\n  valueOf() {\n    const p = this._partials;\n    let n = this._n, x, y, lo, hi = 0;\n    if (n > 0) {\n      hi = p[--n];\n      while (n > 0) {\n        x = hi;\n        y = p[--n];\n        hi = x + y;\n        lo = y - (hi - x);\n        if (lo) break;\n      }\n      if (n > 0 && ((lo < 0 && p[n - 1] < 0) || (lo > 0 && p[n - 1] > 0))) {\n        y = lo * 2;\n        x = hi + y;\n        if (y == x - hi) hi = x;\n      }\n    }\n    return hi;\n  }\n}\n\nfunction fsum(values, valueof) {\n  const adder = new Adder();\n  if (valueof === undefined) {\n    for (let value of values) {\n      if (value = +value) {\n        adder.add(value);\n      }\n    }\n  } else {\n    let index = -1;\n    for (let value of values) {\n      if (value = +valueof(value, ++index, values)) {\n        adder.add(value);\n      }\n    }\n  }\n  return +adder;\n}\n\nfunction fcumsum(values, valueof) {\n  const adder = new Adder();\n  let index = -1;\n  return Float64Array.from(values, valueof === undefined\n      ? v => adder.add(+v || 0)\n      : v => adder.add(+valueof(v, ++index, values) || 0)\n  );\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale/node_modules/d3-array/src/greatest.js\":\n/*!*********************************************************************!*\\\n  !*** ./node_modules/d3-scale/node_modules/d3-array/src/greatest.js ***!\n  \\*********************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return greatest; });\n/* harmony import */ var _ascending_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ascending.js */ \"./node_modules/d3-scale/node_modules/d3-array/src/ascending.js\");\n\n\nfunction greatest(values, compare = _ascending_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]) {\n  let max;\n  let defined = false;\n  if (compare.length === 1) {\n    let maxValue;\n    for (const element of values) {\n      const value = compare(element);\n      if (defined\n          ? Object(_ascending_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(value, maxValue) > 0\n          : Object(_ascending_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(value, value) === 0) {\n        max = element;\n        maxValue = value;\n        defined = true;\n      }\n    }\n  } else {\n    for (const value of values) {\n      if (defined\n          ? compare(value, max) > 0\n          : compare(value, value) === 0) {\n        max = value;\n        defined = true;\n      }\n    }\n  }\n  return max;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale/node_modules/d3-array/src/greatestIndex.js\":\n/*!**************************************************************************!*\\\n  !*** ./node_modules/d3-scale/node_modules/d3-array/src/greatestIndex.js ***!\n  \\**************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return greatestIndex; });\n/* harmony import */ var _ascending_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ascending.js */ \"./node_modules/d3-scale/node_modules/d3-array/src/ascending.js\");\n/* harmony import */ var _maxIndex_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./maxIndex.js */ \"./node_modules/d3-scale/node_modules/d3-array/src/maxIndex.js\");\n\n\n\nfunction greatestIndex(values, compare = _ascending_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]) {\n  if (compare.length === 1) return Object(_maxIndex_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(values, compare);\n  let maxValue;\n  let max = -1;\n  let index = -1;\n  for (const value of values) {\n    ++index;\n    if (max < 0\n        ? compare(value, value) === 0\n        : compare(value, maxValue) > 0) {\n      maxValue = value;\n      max = index;\n    }\n  }\n  return max;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale/node_modules/d3-array/src/group.js\":\n/*!******************************************************************!*\\\n  !*** ./node_modules/d3-scale/node_modules/d3-array/src/group.js ***!\n  \\******************************************************************/\n/*! exports provided: default, groups, flatGroup, flatRollup, rollup, rollups, index, indexes */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return group; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"groups\", function() { return groups; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"flatGroup\", function() { return flatGroup; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"flatRollup\", function() { return flatRollup; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"rollup\", function() { return rollup; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"rollups\", function() { return rollups; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"index\", function() { return index; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"indexes\", function() { return indexes; });\n/* harmony import */ var internmap__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! internmap */ \"./node_modules/internmap/src/index.js\");\n/* harmony import */ var _identity_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./identity.js */ \"./node_modules/d3-scale/node_modules/d3-array/src/identity.js\");\n\n\n\nfunction group(values, ...keys) {\n  return nest(values, _identity_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"], _identity_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"], keys);\n}\n\nfunction groups(values, ...keys) {\n  return nest(values, Array.from, _identity_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"], keys);\n}\n\nfunction flatten(groups, keys) {\n  for (let i = 1, n = keys.length; i < n; ++i) {\n    groups = groups.flatMap(g => g.pop().map(([key, value]) => [...g, key, value]));\n  }\n  return groups;\n}\n\nfunction flatGroup(values, ...keys) {\n  return flatten(groups(values, ...keys), keys);\n}\n\nfunction flatRollup(values, reduce, ...keys) {\n  return flatten(rollups(values, reduce, ...keys), keys);\n}\n\nfunction rollup(values, reduce, ...keys) {\n  return nest(values, _identity_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"], reduce, keys);\n}\n\nfunction rollups(values, reduce, ...keys) {\n  return nest(values, Array.from, reduce, keys);\n}\n\nfunction index(values, ...keys) {\n  return nest(values, _identity_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"], unique, keys);\n}\n\nfunction indexes(values, ...keys) {\n  return nest(values, Array.from, unique, keys);\n}\n\nfunction unique(values) {\n  if (values.length !== 1) throw new Error(\"duplicate key\");\n  return values[0];\n}\n\nfunction nest(values, map, reduce, keys) {\n  return (function regroup(values, i) {\n    if (i >= keys.length) return reduce(values);\n    const groups = new internmap__WEBPACK_IMPORTED_MODULE_0__[\"InternMap\"]();\n    const keyof = keys[i++];\n    let index = -1;\n    for (const value of values) {\n      const key = keyof(value, ++index, values);\n      const group = groups.get(key);\n      if (group) group.push(value);\n      else groups.set(key, [value]);\n    }\n    for (const [key, values] of groups) {\n      groups.set(key, regroup(values, i));\n    }\n    return map(groups);\n  })(values, 0);\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale/node_modules/d3-array/src/groupSort.js\":\n/*!**********************************************************************!*\\\n  !*** ./node_modules/d3-scale/node_modules/d3-array/src/groupSort.js ***!\n  \\**********************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return groupSort; });\n/* harmony import */ var _ascending_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ascending.js */ \"./node_modules/d3-scale/node_modules/d3-array/src/ascending.js\");\n/* harmony import */ var _group_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./group.js */ \"./node_modules/d3-scale/node_modules/d3-array/src/group.js\");\n/* harmony import */ var _sort_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./sort.js */ \"./node_modules/d3-scale/node_modules/d3-array/src/sort.js\");\n\n\n\n\nfunction groupSort(values, reduce, key) {\n  return (reduce.length === 1\n    ? Object(_sort_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(Object(_group_js__WEBPACK_IMPORTED_MODULE_1__[\"rollup\"])(values, reduce, key), (([ak, av], [bk, bv]) => Object(_ascending_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(av, bv) || Object(_ascending_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(ak, bk)))\n    : Object(_sort_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(Object(_group_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(values, key), (([ak, av], [bk, bv]) => reduce(av, bv) || Object(_ascending_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(ak, bk))))\n    .map(([key]) => key);\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale/node_modules/d3-array/src/identity.js\":\n/*!*********************************************************************!*\\\n  !*** ./node_modules/d3-scale/node_modules/d3-array/src/identity.js ***!\n  \\*********************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(x) {\n  return x;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale/node_modules/d3-array/src/index.js\":\n/*!******************************************************************!*\\\n  !*** ./node_modules/d3-scale/node_modules/d3-array/src/index.js ***!\n  \\******************************************************************/\n/*! exports provided: bisect, bisectRight, bisectLeft, bisectCenter, ascending, bisector, count, cross, cumsum, descending, deviation, extent, Adder, fsum, fcumsum, group, flatGroup, flatRollup, groups, index, indexes, rollup, rollups, groupSort, bin, histogram, thresholdFreedmanDiaconis, thresholdScott, thresholdSturges, max, maxIndex, mean, median, merge, min, minIndex, mode, nice, pairs, permute, quantile, quantileSorted, quickselect, range, least, leastIndex, greatest, greatestIndex, scan, shuffle, shuffler, sum, ticks, tickIncrement, tickStep, transpose, variance, zip, every, some, filter, map, reduce, reverse, sort, difference, disjoint, intersection, subset, superset, union, InternMap, InternSet */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _bisect_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./bisect.js */ \"./node_modules/d3-scale/node_modules/d3-array/src/bisect.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"bisect\", function() { return _bisect_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"bisectRight\", function() { return _bisect_js__WEBPACK_IMPORTED_MODULE_0__[\"bisectRight\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"bisectLeft\", function() { return _bisect_js__WEBPACK_IMPORTED_MODULE_0__[\"bisectLeft\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"bisectCenter\", function() { return _bisect_js__WEBPACK_IMPORTED_MODULE_0__[\"bisectCenter\"]; });\n\n/* harmony import */ var _ascending_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./ascending.js */ \"./node_modules/d3-scale/node_modules/d3-array/src/ascending.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"ascending\", function() { return _ascending_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"]; });\n\n/* harmony import */ var _bisector_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./bisector.js */ \"./node_modules/d3-scale/node_modules/d3-array/src/bisector.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"bisector\", function() { return _bisector_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"]; });\n\n/* harmony import */ var _count_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./count.js */ \"./node_modules/d3-scale/node_modules/d3-array/src/count.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"count\", function() { return _count_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"]; });\n\n/* harmony import */ var _cross_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./cross.js */ \"./node_modules/d3-scale/node_modules/d3-array/src/cross.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"cross\", function() { return _cross_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"]; });\n\n/* harmony import */ var _cumsum_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./cumsum.js */ \"./node_modules/d3-scale/node_modules/d3-array/src/cumsum.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"cumsum\", function() { return _cumsum_js__WEBPACK_IMPORTED_MODULE_5__[\"default\"]; });\n\n/* harmony import */ var _descending_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./descending.js */ \"./node_modules/d3-scale/node_modules/d3-array/src/descending.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"descending\", function() { return _descending_js__WEBPACK_IMPORTED_MODULE_6__[\"default\"]; });\n\n/* harmony import */ var _deviation_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./deviation.js */ \"./node_modules/d3-scale/node_modules/d3-array/src/deviation.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"deviation\", function() { return _deviation_js__WEBPACK_IMPORTED_MODULE_7__[\"default\"]; });\n\n/* harmony import */ var _extent_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./extent.js */ \"./node_modules/d3-scale/node_modules/d3-array/src/extent.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"extent\", function() { return _extent_js__WEBPACK_IMPORTED_MODULE_8__[\"default\"]; });\n\n/* harmony import */ var _fsum_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./fsum.js */ \"./node_modules/d3-scale/node_modules/d3-array/src/fsum.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"Adder\", function() { return _fsum_js__WEBPACK_IMPORTED_MODULE_9__[\"Adder\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"fsum\", function() { return _fsum_js__WEBPACK_IMPORTED_MODULE_9__[\"fsum\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"fcumsum\", function() { return _fsum_js__WEBPACK_IMPORTED_MODULE_9__[\"fcumsum\"]; });\n\n/* harmony import */ var _group_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./group.js */ \"./node_modules/d3-scale/node_modules/d3-array/src/group.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"group\", function() { return _group_js__WEBPACK_IMPORTED_MODULE_10__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"flatGroup\", function() { return _group_js__WEBPACK_IMPORTED_MODULE_10__[\"flatGroup\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"flatRollup\", function() { return _group_js__WEBPACK_IMPORTED_MODULE_10__[\"flatRollup\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"groups\", function() { return _group_js__WEBPACK_IMPORTED_MODULE_10__[\"groups\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"index\", function() { return _group_js__WEBPACK_IMPORTED_MODULE_10__[\"index\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"indexes\", function() { return _group_js__WEBPACK_IMPORTED_MODULE_10__[\"indexes\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"rollup\", function() { return _group_js__WEBPACK_IMPORTED_MODULE_10__[\"rollup\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"rollups\", function() { return _group_js__WEBPACK_IMPORTED_MODULE_10__[\"rollups\"]; });\n\n/* harmony import */ var _groupSort_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./groupSort.js */ \"./node_modules/d3-scale/node_modules/d3-array/src/groupSort.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"groupSort\", function() { return _groupSort_js__WEBPACK_IMPORTED_MODULE_11__[\"default\"]; });\n\n/* harmony import */ var _bin_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./bin.js */ \"./node_modules/d3-scale/node_modules/d3-array/src/bin.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"bin\", function() { return _bin_js__WEBPACK_IMPORTED_MODULE_12__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"histogram\", function() { return _bin_js__WEBPACK_IMPORTED_MODULE_12__[\"default\"]; });\n\n/* harmony import */ var _threshold_freedmanDiaconis_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./threshold/freedmanDiaconis.js */ \"./node_modules/d3-scale/node_modules/d3-array/src/threshold/freedmanDiaconis.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"thresholdFreedmanDiaconis\", function() { return _threshold_freedmanDiaconis_js__WEBPACK_IMPORTED_MODULE_13__[\"default\"]; });\n\n/* harmony import */ var _threshold_scott_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./threshold/scott.js */ \"./node_modules/d3-scale/node_modules/d3-array/src/threshold/scott.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"thresholdScott\", function() { return _threshold_scott_js__WEBPACK_IMPORTED_MODULE_14__[\"default\"]; });\n\n/* harmony import */ var _threshold_sturges_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./threshold/sturges.js */ \"./node_modules/d3-scale/node_modules/d3-array/src/threshold/sturges.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"thresholdSturges\", function() { return _threshold_sturges_js__WEBPACK_IMPORTED_MODULE_15__[\"default\"]; });\n\n/* harmony import */ var _max_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./max.js */ \"./node_modules/d3-scale/node_modules/d3-array/src/max.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"max\", function() { return _max_js__WEBPACK_IMPORTED_MODULE_16__[\"default\"]; });\n\n/* harmony import */ var _maxIndex_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./maxIndex.js */ \"./node_modules/d3-scale/node_modules/d3-array/src/maxIndex.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"maxIndex\", function() { return _maxIndex_js__WEBPACK_IMPORTED_MODULE_17__[\"default\"]; });\n\n/* harmony import */ var _mean_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./mean.js */ \"./node_modules/d3-scale/node_modules/d3-array/src/mean.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"mean\", function() { return _mean_js__WEBPACK_IMPORTED_MODULE_18__[\"default\"]; });\n\n/* harmony import */ var _median_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./median.js */ \"./node_modules/d3-scale/node_modules/d3-array/src/median.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"median\", function() { return _median_js__WEBPACK_IMPORTED_MODULE_19__[\"default\"]; });\n\n/* harmony import */ var _merge_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./merge.js */ \"./node_modules/d3-scale/node_modules/d3-array/src/merge.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"merge\", function() { return _merge_js__WEBPACK_IMPORTED_MODULE_20__[\"default\"]; });\n\n/* harmony import */ var _min_js__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./min.js */ \"./node_modules/d3-scale/node_modules/d3-array/src/min.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"min\", function() { return _min_js__WEBPACK_IMPORTED_MODULE_21__[\"default\"]; });\n\n/* harmony import */ var _minIndex_js__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./minIndex.js */ \"./node_modules/d3-scale/node_modules/d3-array/src/minIndex.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"minIndex\", function() { return _minIndex_js__WEBPACK_IMPORTED_MODULE_22__[\"default\"]; });\n\n/* harmony import */ var _mode_js__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./mode.js */ \"./node_modules/d3-scale/node_modules/d3-array/src/mode.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"mode\", function() { return _mode_js__WEBPACK_IMPORTED_MODULE_23__[\"default\"]; });\n\n/* harmony import */ var _nice_js__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ./nice.js */ \"./node_modules/d3-scale/node_modules/d3-array/src/nice.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"nice\", function() { return _nice_js__WEBPACK_IMPORTED_MODULE_24__[\"default\"]; });\n\n/* harmony import */ var _pairs_js__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ./pairs.js */ \"./node_modules/d3-scale/node_modules/d3-array/src/pairs.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"pairs\", function() { return _pairs_js__WEBPACK_IMPORTED_MODULE_25__[\"default\"]; });\n\n/* harmony import */ var _permute_js__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ./permute.js */ \"./node_modules/d3-scale/node_modules/d3-array/src/permute.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"permute\", function() { return _permute_js__WEBPACK_IMPORTED_MODULE_26__[\"default\"]; });\n\n/* harmony import */ var _quantile_js__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ./quantile.js */ \"./node_modules/d3-scale/node_modules/d3-array/src/quantile.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"quantile\", function() { return _quantile_js__WEBPACK_IMPORTED_MODULE_27__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"quantileSorted\", function() { return _quantile_js__WEBPACK_IMPORTED_MODULE_27__[\"quantileSorted\"]; });\n\n/* harmony import */ var _quickselect_js__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ./quickselect.js */ \"./node_modules/d3-scale/node_modules/d3-array/src/quickselect.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"quickselect\", function() { return _quickselect_js__WEBPACK_IMPORTED_MODULE_28__[\"default\"]; });\n\n/* harmony import */ var _range_js__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ./range.js */ \"./node_modules/d3-scale/node_modules/d3-array/src/range.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"range\", function() { return _range_js__WEBPACK_IMPORTED_MODULE_29__[\"default\"]; });\n\n/* harmony import */ var _least_js__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ./least.js */ \"./node_modules/d3-scale/node_modules/d3-array/src/least.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"least\", function() { return _least_js__WEBPACK_IMPORTED_MODULE_30__[\"default\"]; });\n\n/* harmony import */ var _leastIndex_js__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ./leastIndex.js */ \"./node_modules/d3-scale/node_modules/d3-array/src/leastIndex.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"leastIndex\", function() { return _leastIndex_js__WEBPACK_IMPORTED_MODULE_31__[\"default\"]; });\n\n/* harmony import */ var _greatest_js__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ./greatest.js */ \"./node_modules/d3-scale/node_modules/d3-array/src/greatest.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"greatest\", function() { return _greatest_js__WEBPACK_IMPORTED_MODULE_32__[\"default\"]; });\n\n/* harmony import */ var _greatestIndex_js__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! ./greatestIndex.js */ \"./node_modules/d3-scale/node_modules/d3-array/src/greatestIndex.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"greatestIndex\", function() { return _greatestIndex_js__WEBPACK_IMPORTED_MODULE_33__[\"default\"]; });\n\n/* harmony import */ var _scan_js__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! ./scan.js */ \"./node_modules/d3-scale/node_modules/d3-array/src/scan.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"scan\", function() { return _scan_js__WEBPACK_IMPORTED_MODULE_34__[\"default\"]; });\n\n/* harmony import */ var _shuffle_js__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(/*! ./shuffle.js */ \"./node_modules/d3-scale/node_modules/d3-array/src/shuffle.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"shuffle\", function() { return _shuffle_js__WEBPACK_IMPORTED_MODULE_35__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"shuffler\", function() { return _shuffle_js__WEBPACK_IMPORTED_MODULE_35__[\"shuffler\"]; });\n\n/* harmony import */ var _sum_js__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(/*! ./sum.js */ \"./node_modules/d3-scale/node_modules/d3-array/src/sum.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"sum\", function() { return _sum_js__WEBPACK_IMPORTED_MODULE_36__[\"default\"]; });\n\n/* harmony import */ var _ticks_js__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(/*! ./ticks.js */ \"./node_modules/d3-scale/node_modules/d3-array/src/ticks.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"ticks\", function() { return _ticks_js__WEBPACK_IMPORTED_MODULE_37__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"tickIncrement\", function() { return _ticks_js__WEBPACK_IMPORTED_MODULE_37__[\"tickIncrement\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"tickStep\", function() { return _ticks_js__WEBPACK_IMPORTED_MODULE_37__[\"tickStep\"]; });\n\n/* harmony import */ var _transpose_js__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(/*! ./transpose.js */ \"./node_modules/d3-scale/node_modules/d3-array/src/transpose.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"transpose\", function() { return _transpose_js__WEBPACK_IMPORTED_MODULE_38__[\"default\"]; });\n\n/* harmony import */ var _variance_js__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__(/*! ./variance.js */ \"./node_modules/d3-scale/node_modules/d3-array/src/variance.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"variance\", function() { return _variance_js__WEBPACK_IMPORTED_MODULE_39__[\"default\"]; });\n\n/* harmony import */ var _zip_js__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__(/*! ./zip.js */ \"./node_modules/d3-scale/node_modules/d3-array/src/zip.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"zip\", function() { return _zip_js__WEBPACK_IMPORTED_MODULE_40__[\"default\"]; });\n\n/* harmony import */ var _every_js__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__(/*! ./every.js */ \"./node_modules/d3-scale/node_modules/d3-array/src/every.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"every\", function() { return _every_js__WEBPACK_IMPORTED_MODULE_41__[\"default\"]; });\n\n/* harmony import */ var _some_js__WEBPACK_IMPORTED_MODULE_42__ = __webpack_require__(/*! ./some.js */ \"./node_modules/d3-scale/node_modules/d3-array/src/some.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"some\", function() { return _some_js__WEBPACK_IMPORTED_MODULE_42__[\"default\"]; });\n\n/* harmony import */ var _filter_js__WEBPACK_IMPORTED_MODULE_43__ = __webpack_require__(/*! ./filter.js */ \"./node_modules/d3-scale/node_modules/d3-array/src/filter.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"filter\", function() { return _filter_js__WEBPACK_IMPORTED_MODULE_43__[\"default\"]; });\n\n/* harmony import */ var _map_js__WEBPACK_IMPORTED_MODULE_44__ = __webpack_require__(/*! ./map.js */ \"./node_modules/d3-scale/node_modules/d3-array/src/map.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"map\", function() { return _map_js__WEBPACK_IMPORTED_MODULE_44__[\"default\"]; });\n\n/* harmony import */ var _reduce_js__WEBPACK_IMPORTED_MODULE_45__ = __webpack_require__(/*! ./reduce.js */ \"./node_modules/d3-scale/node_modules/d3-array/src/reduce.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"reduce\", function() { return _reduce_js__WEBPACK_IMPORTED_MODULE_45__[\"default\"]; });\n\n/* harmony import */ var _reverse_js__WEBPACK_IMPORTED_MODULE_46__ = __webpack_require__(/*! ./reverse.js */ \"./node_modules/d3-scale/node_modules/d3-array/src/reverse.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"reverse\", function() { return _reverse_js__WEBPACK_IMPORTED_MODULE_46__[\"default\"]; });\n\n/* harmony import */ var _sort_js__WEBPACK_IMPORTED_MODULE_47__ = __webpack_require__(/*! ./sort.js */ \"./node_modules/d3-scale/node_modules/d3-array/src/sort.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"sort\", function() { return _sort_js__WEBPACK_IMPORTED_MODULE_47__[\"default\"]; });\n\n/* harmony import */ var _difference_js__WEBPACK_IMPORTED_MODULE_48__ = __webpack_require__(/*! ./difference.js */ \"./node_modules/d3-scale/node_modules/d3-array/src/difference.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"difference\", function() { return _difference_js__WEBPACK_IMPORTED_MODULE_48__[\"default\"]; });\n\n/* harmony import */ var _disjoint_js__WEBPACK_IMPORTED_MODULE_49__ = __webpack_require__(/*! ./disjoint.js */ \"./node_modules/d3-scale/node_modules/d3-array/src/disjoint.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"disjoint\", function() { return _disjoint_js__WEBPACK_IMPORTED_MODULE_49__[\"default\"]; });\n\n/* harmony import */ var _intersection_js__WEBPACK_IMPORTED_MODULE_50__ = __webpack_require__(/*! ./intersection.js */ \"./node_modules/d3-scale/node_modules/d3-array/src/intersection.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"intersection\", function() { return _intersection_js__WEBPACK_IMPORTED_MODULE_50__[\"default\"]; });\n\n/* harmony import */ var _subset_js__WEBPACK_IMPORTED_MODULE_51__ = __webpack_require__(/*! ./subset.js */ \"./node_modules/d3-scale/node_modules/d3-array/src/subset.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"subset\", function() { return _subset_js__WEBPACK_IMPORTED_MODULE_51__[\"default\"]; });\n\n/* harmony import */ var _superset_js__WEBPACK_IMPORTED_MODULE_52__ = __webpack_require__(/*! ./superset.js */ \"./node_modules/d3-scale/node_modules/d3-array/src/superset.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"superset\", function() { return _superset_js__WEBPACK_IMPORTED_MODULE_52__[\"default\"]; });\n\n/* harmony import */ var _union_js__WEBPACK_IMPORTED_MODULE_53__ = __webpack_require__(/*! ./union.js */ \"./node_modules/d3-scale/node_modules/d3-array/src/union.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"union\", function() { return _union_js__WEBPACK_IMPORTED_MODULE_53__[\"default\"]; });\n\n/* harmony import */ var internmap__WEBPACK_IMPORTED_MODULE_54__ = __webpack_require__(/*! internmap */ \"./node_modules/internmap/src/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"InternMap\", function() { return internmap__WEBPACK_IMPORTED_MODULE_54__[\"InternMap\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"InternSet\", function() { return internmap__WEBPACK_IMPORTED_MODULE_54__[\"InternSet\"]; });\n\n\n\n\n\n\n\n\n\n\n\n\n\n // Deprecated; use bin.\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n // Deprecated; use leastIndex.\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale/node_modules/d3-array/src/intersection.js\":\n/*!*************************************************************************!*\\\n  !*** ./node_modules/d3-scale/node_modules/d3-array/src/intersection.js ***!\n  \\*************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return intersection; });\n/* harmony import */ var _set_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./set.js */ \"./node_modules/d3-scale/node_modules/d3-array/src/set.js\");\n\n\nfunction intersection(values, ...others) {\n  values = new Set(values);\n  others = others.map(_set_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]);\n  out: for (const value of values) {\n    for (const other of others) {\n      if (!other.has(value)) {\n        values.delete(value);\n        continue out;\n      }\n    }\n  }\n  return values;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale/node_modules/d3-array/src/least.js\":\n/*!******************************************************************!*\\\n  !*** ./node_modules/d3-scale/node_modules/d3-array/src/least.js ***!\n  \\******************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return least; });\n/* harmony import */ var _ascending_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ascending.js */ \"./node_modules/d3-scale/node_modules/d3-array/src/ascending.js\");\n\n\nfunction least(values, compare = _ascending_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]) {\n  let min;\n  let defined = false;\n  if (compare.length === 1) {\n    let minValue;\n    for (const element of values) {\n      const value = compare(element);\n      if (defined\n          ? Object(_ascending_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(value, minValue) < 0\n          : Object(_ascending_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(value, value) === 0) {\n        min = element;\n        minValue = value;\n        defined = true;\n      }\n    }\n  } else {\n    for (const value of values) {\n      if (defined\n          ? compare(value, min) < 0\n          : compare(value, value) === 0) {\n        min = value;\n        defined = true;\n      }\n    }\n  }\n  return min;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale/node_modules/d3-array/src/leastIndex.js\":\n/*!***********************************************************************!*\\\n  !*** ./node_modules/d3-scale/node_modules/d3-array/src/leastIndex.js ***!\n  \\***********************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return leastIndex; });\n/* harmony import */ var _ascending_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ascending.js */ \"./node_modules/d3-scale/node_modules/d3-array/src/ascending.js\");\n/* harmony import */ var _minIndex_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./minIndex.js */ \"./node_modules/d3-scale/node_modules/d3-array/src/minIndex.js\");\n\n\n\nfunction leastIndex(values, compare = _ascending_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]) {\n  if (compare.length === 1) return Object(_minIndex_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(values, compare);\n  let minValue;\n  let min = -1;\n  let index = -1;\n  for (const value of values) {\n    ++index;\n    if (min < 0\n        ? compare(value, value) === 0\n        : compare(value, minValue) < 0) {\n      minValue = value;\n      min = index;\n    }\n  }\n  return min;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale/node_modules/d3-array/src/map.js\":\n/*!****************************************************************!*\\\n  !*** ./node_modules/d3-scale/node_modules/d3-array/src/map.js ***!\n  \\****************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return map; });\nfunction map(values, mapper) {\n  if (typeof values[Symbol.iterator] !== \"function\") throw new TypeError(\"values is not iterable\");\n  if (typeof mapper !== \"function\") throw new TypeError(\"mapper is not a function\");\n  return Array.from(values, (value, index) => mapper(value, index, values));\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale/node_modules/d3-array/src/max.js\":\n/*!****************************************************************!*\\\n  !*** ./node_modules/d3-scale/node_modules/d3-array/src/max.js ***!\n  \\****************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return max; });\nfunction max(values, valueof) {\n  let max;\n  if (valueof === undefined) {\n    for (const value of values) {\n      if (value != null\n          && (max < value || (max === undefined && value >= value))) {\n        max = value;\n      }\n    }\n  } else {\n    let index = -1;\n    for (let value of values) {\n      if ((value = valueof(value, ++index, values)) != null\n          && (max < value || (max === undefined && value >= value))) {\n        max = value;\n      }\n    }\n  }\n  return max;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale/node_modules/d3-array/src/maxIndex.js\":\n/*!*********************************************************************!*\\\n  !*** ./node_modules/d3-scale/node_modules/d3-array/src/maxIndex.js ***!\n  \\*********************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return maxIndex; });\nfunction maxIndex(values, valueof) {\n  let max;\n  let maxIndex = -1;\n  let index = -1;\n  if (valueof === undefined) {\n    for (const value of values) {\n      ++index;\n      if (value != null\n          && (max < value || (max === undefined && value >= value))) {\n        max = value, maxIndex = index;\n      }\n    }\n  } else {\n    for (let value of values) {\n      if ((value = valueof(value, ++index, values)) != null\n          && (max < value || (max === undefined && value >= value))) {\n        max = value, maxIndex = index;\n      }\n    }\n  }\n  return maxIndex;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale/node_modules/d3-array/src/mean.js\":\n/*!*****************************************************************!*\\\n  !*** ./node_modules/d3-scale/node_modules/d3-array/src/mean.js ***!\n  \\*****************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return mean; });\nfunction mean(values, valueof) {\n  let count = 0;\n  let sum = 0;\n  if (valueof === undefined) {\n    for (let value of values) {\n      if (value != null && (value = +value) >= value) {\n        ++count, sum += value;\n      }\n    }\n  } else {\n    let index = -1;\n    for (let value of values) {\n      if ((value = valueof(value, ++index, values)) != null && (value = +value) >= value) {\n        ++count, sum += value;\n      }\n    }\n  }\n  if (count) return sum / count;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale/node_modules/d3-array/src/median.js\":\n/*!*******************************************************************!*\\\n  !*** ./node_modules/d3-scale/node_modules/d3-array/src/median.js ***!\n  \\*******************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _quantile_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./quantile.js */ \"./node_modules/d3-scale/node_modules/d3-array/src/quantile.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(values, valueof) {\n  return Object(_quantile_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(values, 0.5, valueof);\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale/node_modules/d3-array/src/merge.js\":\n/*!******************************************************************!*\\\n  !*** ./node_modules/d3-scale/node_modules/d3-array/src/merge.js ***!\n  \\******************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return merge; });\nfunction* flatten(arrays) {\n  for (const array of arrays) {\n    yield* array;\n  }\n}\n\nfunction merge(arrays) {\n  return Array.from(flatten(arrays));\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale/node_modules/d3-array/src/min.js\":\n/*!****************************************************************!*\\\n  !*** ./node_modules/d3-scale/node_modules/d3-array/src/min.js ***!\n  \\****************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return min; });\nfunction min(values, valueof) {\n  let min;\n  if (valueof === undefined) {\n    for (const value of values) {\n      if (value != null\n          && (min > value || (min === undefined && value >= value))) {\n        min = value;\n      }\n    }\n  } else {\n    let index = -1;\n    for (let value of values) {\n      if ((value = valueof(value, ++index, values)) != null\n          && (min > value || (min === undefined && value >= value))) {\n        min = value;\n      }\n    }\n  }\n  return min;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale/node_modules/d3-array/src/minIndex.js\":\n/*!*********************************************************************!*\\\n  !*** ./node_modules/d3-scale/node_modules/d3-array/src/minIndex.js ***!\n  \\*********************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return minIndex; });\nfunction minIndex(values, valueof) {\n  let min;\n  let minIndex = -1;\n  let index = -1;\n  if (valueof === undefined) {\n    for (const value of values) {\n      ++index;\n      if (value != null\n          && (min > value || (min === undefined && value >= value))) {\n        min = value, minIndex = index;\n      }\n    }\n  } else {\n    for (let value of values) {\n      if ((value = valueof(value, ++index, values)) != null\n          && (min > value || (min === undefined && value >= value))) {\n        min = value, minIndex = index;\n      }\n    }\n  }\n  return minIndex;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale/node_modules/d3-array/src/mode.js\":\n/*!*****************************************************************!*\\\n  !*** ./node_modules/d3-scale/node_modules/d3-array/src/mode.js ***!\n  \\*****************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var internmap__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! internmap */ \"./node_modules/internmap/src/index.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(values, valueof) {\n  const counts = new internmap__WEBPACK_IMPORTED_MODULE_0__[\"InternMap\"]();\n  if (valueof === undefined) {\n    for (let value of values) {\n      if (value != null && value >= value) {\n        counts.set(value, (counts.get(value) || 0) + 1);\n      }\n    }\n  } else {\n    let index = -1;\n    for (let value of values) {\n      if ((value = valueof(value, ++index, values)) != null && value >= value) {\n        counts.set(value, (counts.get(value) || 0) + 1);\n      }\n    }\n  }\n  let modeValue;\n  let modeCount = 0;\n  for (const [value, count] of counts) {\n    if (count > modeCount) {\n      modeCount = count;\n      modeValue = value;\n    }\n  }\n  return modeValue;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale/node_modules/d3-array/src/nice.js\":\n/*!*****************************************************************!*\\\n  !*** ./node_modules/d3-scale/node_modules/d3-array/src/nice.js ***!\n  \\*****************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return nice; });\n/* harmony import */ var _ticks_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ticks.js */ \"./node_modules/d3-scale/node_modules/d3-array/src/ticks.js\");\n\n\nfunction nice(start, stop, count) {\n  let prestep;\n  while (true) {\n    const step = Object(_ticks_js__WEBPACK_IMPORTED_MODULE_0__[\"tickIncrement\"])(start, stop, count);\n    if (step === prestep || step === 0 || !isFinite(step)) {\n      return [start, stop];\n    } else if (step > 0) {\n      start = Math.floor(start / step) * step;\n      stop = Math.ceil(stop / step) * step;\n    } else if (step < 0) {\n      start = Math.ceil(start * step) / step;\n      stop = Math.floor(stop * step) / step;\n    }\n    prestep = step;\n  }\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale/node_modules/d3-array/src/number.js\":\n/*!*******************************************************************!*\\\n  !*** ./node_modules/d3-scale/node_modules/d3-array/src/number.js ***!\n  \\*******************************************************************/\n/*! exports provided: default, numbers */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"numbers\", function() { return numbers; });\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(x) {\n  return x === null ? NaN : +x;\n});\n\nfunction* numbers(values, valueof) {\n  if (valueof === undefined) {\n    for (let value of values) {\n      if (value != null && (value = +value) >= value) {\n        yield value;\n      }\n    }\n  } else {\n    let index = -1;\n    for (let value of values) {\n      if ((value = valueof(value, ++index, values)) != null && (value = +value) >= value) {\n        yield value;\n      }\n    }\n  }\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale/node_modules/d3-array/src/pairs.js\":\n/*!******************************************************************!*\\\n  !*** ./node_modules/d3-scale/node_modules/d3-array/src/pairs.js ***!\n  \\******************************************************************/\n/*! exports provided: default, pair */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return pairs; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"pair\", function() { return pair; });\nfunction pairs(values, pairof = pair) {\n  const pairs = [];\n  let previous;\n  let first = false;\n  for (const value of values) {\n    if (first) pairs.push(pairof(previous, value));\n    previous = value;\n    first = true;\n  }\n  return pairs;\n}\n\nfunction pair(a, b) {\n  return [a, b];\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale/node_modules/d3-array/src/permute.js\":\n/*!********************************************************************!*\\\n  !*** ./node_modules/d3-scale/node_modules/d3-array/src/permute.js ***!\n  \\********************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(source, keys) {\n  return Array.from(keys, key => source[key]);\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale/node_modules/d3-array/src/quantile.js\":\n/*!*********************************************************************!*\\\n  !*** ./node_modules/d3-scale/node_modules/d3-array/src/quantile.js ***!\n  \\*********************************************************************/\n/*! exports provided: default, quantileSorted */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return quantile; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"quantileSorted\", function() { return quantileSorted; });\n/* harmony import */ var _max_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./max.js */ \"./node_modules/d3-scale/node_modules/d3-array/src/max.js\");\n/* harmony import */ var _min_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./min.js */ \"./node_modules/d3-scale/node_modules/d3-array/src/min.js\");\n/* harmony import */ var _quickselect_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./quickselect.js */ \"./node_modules/d3-scale/node_modules/d3-array/src/quickselect.js\");\n/* harmony import */ var _number_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./number.js */ \"./node_modules/d3-scale/node_modules/d3-array/src/number.js\");\n\n\n\n\n\nfunction quantile(values, p, valueof) {\n  values = Float64Array.from(Object(_number_js__WEBPACK_IMPORTED_MODULE_3__[\"numbers\"])(values, valueof));\n  if (!(n = values.length)) return;\n  if ((p = +p) <= 0 || n < 2) return Object(_min_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(values);\n  if (p >= 1) return Object(_max_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(values);\n  var n,\n      i = (n - 1) * p,\n      i0 = Math.floor(i),\n      value0 = Object(_max_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(Object(_quickselect_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(values, i0).subarray(0, i0 + 1)),\n      value1 = Object(_min_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(values.subarray(i0 + 1));\n  return value0 + (value1 - value0) * (i - i0);\n}\n\nfunction quantileSorted(values, p, valueof = _number_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"]) {\n  if (!(n = values.length)) return;\n  if ((p = +p) <= 0 || n < 2) return +valueof(values[0], 0, values);\n  if (p >= 1) return +valueof(values[n - 1], n - 1, values);\n  var n,\n      i = (n - 1) * p,\n      i0 = Math.floor(i),\n      value0 = +valueof(values[i0], i0, values),\n      value1 = +valueof(values[i0 + 1], i0 + 1, values);\n  return value0 + (value1 - value0) * (i - i0);\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale/node_modules/d3-array/src/quickselect.js\":\n/*!************************************************************************!*\\\n  !*** ./node_modules/d3-scale/node_modules/d3-array/src/quickselect.js ***!\n  \\************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return quickselect; });\n/* harmony import */ var _ascending_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ascending.js */ \"./node_modules/d3-scale/node_modules/d3-array/src/ascending.js\");\n\n\n// Based on https://github.com/mourner/quickselect\n// ISC license, Copyright 2018 Vladimir Agafonkin.\nfunction quickselect(array, k, left = 0, right = array.length - 1, compare = _ascending_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]) {\n  while (right > left) {\n    if (right - left > 600) {\n      const n = right - left + 1;\n      const m = k - left + 1;\n      const z = Math.log(n);\n      const s = 0.5 * Math.exp(2 * z / 3);\n      const sd = 0.5 * Math.sqrt(z * s * (n - s) / n) * (m - n / 2 < 0 ? -1 : 1);\n      const newLeft = Math.max(left, Math.floor(k - m * s / n + sd));\n      const newRight = Math.min(right, Math.floor(k + (n - m) * s / n + sd));\n      quickselect(array, k, newLeft, newRight, compare);\n    }\n\n    const t = array[k];\n    let i = left;\n    let j = right;\n\n    swap(array, left, k);\n    if (compare(array[right], t) > 0) swap(array, left, right);\n\n    while (i < j) {\n      swap(array, i, j), ++i, --j;\n      while (compare(array[i], t) < 0) ++i;\n      while (compare(array[j], t) > 0) --j;\n    }\n\n    if (compare(array[left], t) === 0) swap(array, left, j);\n    else ++j, swap(array, j, right);\n\n    if (j <= k) left = j + 1;\n    if (k <= j) right = j - 1;\n  }\n  return array;\n}\n\nfunction swap(array, i, j) {\n  const t = array[i];\n  array[i] = array[j];\n  array[j] = t;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale/node_modules/d3-array/src/range.js\":\n/*!******************************************************************!*\\\n  !*** ./node_modules/d3-scale/node_modules/d3-array/src/range.js ***!\n  \\******************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(start, stop, step) {\n  start = +start, stop = +stop, step = (n = arguments.length) < 2 ? (stop = start, start = 0, 1) : n < 3 ? 1 : +step;\n\n  var i = -1,\n      n = Math.max(0, Math.ceil((stop - start) / step)) | 0,\n      range = new Array(n);\n\n  while (++i < n) {\n    range[i] = start + i * step;\n  }\n\n  return range;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale/node_modules/d3-array/src/reduce.js\":\n/*!*******************************************************************!*\\\n  !*** ./node_modules/d3-scale/node_modules/d3-array/src/reduce.js ***!\n  \\*******************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return reduce; });\nfunction reduce(values, reducer, value) {\n  if (typeof reducer !== \"function\") throw new TypeError(\"reducer is not a function\");\n  const iterator = values[Symbol.iterator]();\n  let done, next, index = -1;\n  if (arguments.length < 3) {\n    ({done, value} = iterator.next());\n    if (done) return;\n    ++index;\n  }\n  while (({done, value: next} = iterator.next()), !done) {\n    value = reducer(value, next, ++index, values);\n  }\n  return value;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale/node_modules/d3-array/src/reverse.js\":\n/*!********************************************************************!*\\\n  !*** ./node_modules/d3-scale/node_modules/d3-array/src/reverse.js ***!\n  \\********************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return reverse; });\nfunction reverse(values) {\n  if (typeof values[Symbol.iterator] !== \"function\") throw new TypeError(\"values is not iterable\");\n  return Array.from(values).reverse();\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale/node_modules/d3-array/src/scan.js\":\n/*!*****************************************************************!*\\\n  !*** ./node_modules/d3-scale/node_modules/d3-array/src/scan.js ***!\n  \\*****************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return scan; });\n/* harmony import */ var _leastIndex_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./leastIndex.js */ \"./node_modules/d3-scale/node_modules/d3-array/src/leastIndex.js\");\n\n\nfunction scan(values, compare) {\n  const index = Object(_leastIndex_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(values, compare);\n  return index < 0 ? undefined : index;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale/node_modules/d3-array/src/set.js\":\n/*!****************************************************************!*\\\n  !*** ./node_modules/d3-scale/node_modules/d3-array/src/set.js ***!\n  \\****************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return set; });\nfunction set(values) {\n  return values instanceof Set ? values : new Set(values);\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale/node_modules/d3-array/src/shuffle.js\":\n/*!********************************************************************!*\\\n  !*** ./node_modules/d3-scale/node_modules/d3-array/src/shuffle.js ***!\n  \\********************************************************************/\n/*! exports provided: default, shuffler */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"shuffler\", function() { return shuffler; });\n/* harmony default export */ __webpack_exports__[\"default\"] = (shuffler(Math.random));\n\nfunction shuffler(random) {\n  return function shuffle(array, i0 = 0, i1 = array.length) {\n    let m = i1 - (i0 = +i0);\n    while (m) {\n      const i = random() * m-- | 0, t = array[m + i0];\n      array[m + i0] = array[i + i0];\n      array[i + i0] = t;\n    }\n    return array;\n  };\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale/node_modules/d3-array/src/some.js\":\n/*!*****************************************************************!*\\\n  !*** ./node_modules/d3-scale/node_modules/d3-array/src/some.js ***!\n  \\*****************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return some; });\nfunction some(values, test) {\n  if (typeof test !== \"function\") throw new TypeError(\"test is not a function\");\n  let index = -1;\n  for (const value of values) {\n    if (test(value, ++index, values)) {\n      return true;\n    }\n  }\n  return false;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale/node_modules/d3-array/src/sort.js\":\n/*!*****************************************************************!*\\\n  !*** ./node_modules/d3-scale/node_modules/d3-array/src/sort.js ***!\n  \\*****************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return sort; });\n/* harmony import */ var _ascending_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ascending.js */ \"./node_modules/d3-scale/node_modules/d3-array/src/ascending.js\");\n/* harmony import */ var _permute_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./permute.js */ \"./node_modules/d3-scale/node_modules/d3-array/src/permute.js\");\n\n\n\nfunction sort(values, ...F) {\n  if (typeof values[Symbol.iterator] !== \"function\") throw new TypeError(\"values is not iterable\");\n  values = Array.from(values);\n  let [f = _ascending_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]] = F;\n  if (f.length === 1 || F.length > 1) {\n    const index = Uint32Array.from(values, (d, i) => i);\n    if (F.length > 1) {\n      F = F.map(f => values.map(f));\n      index.sort((i, j) => {\n        for (const f of F) {\n          const c = Object(_ascending_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(f[i], f[j]);\n          if (c) return c;\n        }\n      });\n    } else {\n      f = values.map(f);\n      index.sort((i, j) => Object(_ascending_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(f[i], f[j]));\n    }\n    return Object(_permute_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(values, index);\n  }\n  return values.sort(f);\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale/node_modules/d3-array/src/subset.js\":\n/*!*******************************************************************!*\\\n  !*** ./node_modules/d3-scale/node_modules/d3-array/src/subset.js ***!\n  \\*******************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return subset; });\n/* harmony import */ var _superset_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./superset.js */ \"./node_modules/d3-scale/node_modules/d3-array/src/superset.js\");\n\n\nfunction subset(values, other) {\n  return Object(_superset_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(other, values);\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale/node_modules/d3-array/src/sum.js\":\n/*!****************************************************************!*\\\n  !*** ./node_modules/d3-scale/node_modules/d3-array/src/sum.js ***!\n  \\****************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return sum; });\nfunction sum(values, valueof) {\n  let sum = 0;\n  if (valueof === undefined) {\n    for (let value of values) {\n      if (value = +value) {\n        sum += value;\n      }\n    }\n  } else {\n    let index = -1;\n    for (let value of values) {\n      if (value = +valueof(value, ++index, values)) {\n        sum += value;\n      }\n    }\n  }\n  return sum;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale/node_modules/d3-array/src/superset.js\":\n/*!*********************************************************************!*\\\n  !*** ./node_modules/d3-scale/node_modules/d3-array/src/superset.js ***!\n  \\*********************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return superset; });\nfunction superset(values, other) {\n  const iterator = values[Symbol.iterator](), set = new Set();\n  for (const o of other) {\n    if (set.has(o)) continue;\n    let value, done;\n    while (({value, done} = iterator.next())) {\n      if (done) return false;\n      set.add(value);\n      if (Object.is(o, value)) break;\n    }\n  }\n  return true;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale/node_modules/d3-array/src/threshold/freedmanDiaconis.js\":\n/*!***************************************************************************************!*\\\n  !*** ./node_modules/d3-scale/node_modules/d3-array/src/threshold/freedmanDiaconis.js ***!\n  \\***************************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _count_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../count.js */ \"./node_modules/d3-scale/node_modules/d3-array/src/count.js\");\n/* harmony import */ var _quantile_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../quantile.js */ \"./node_modules/d3-scale/node_modules/d3-array/src/quantile.js\");\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(values, min, max) {\n  return Math.ceil((max - min) / (2 * (Object(_quantile_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(values, 0.75) - Object(_quantile_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(values, 0.25)) * Math.pow(Object(_count_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(values), -1 / 3)));\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale/node_modules/d3-array/src/threshold/scott.js\":\n/*!****************************************************************************!*\\\n  !*** ./node_modules/d3-scale/node_modules/d3-array/src/threshold/scott.js ***!\n  \\****************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _count_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../count.js */ \"./node_modules/d3-scale/node_modules/d3-array/src/count.js\");\n/* harmony import */ var _deviation_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../deviation.js */ \"./node_modules/d3-scale/node_modules/d3-array/src/deviation.js\");\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(values, min, max) {\n  return Math.ceil((max - min) / (3.5 * Object(_deviation_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(values) * Math.pow(Object(_count_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(values), -1 / 3)));\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale/node_modules/d3-array/src/threshold/sturges.js\":\n/*!******************************************************************************!*\\\n  !*** ./node_modules/d3-scale/node_modules/d3-array/src/threshold/sturges.js ***!\n  \\******************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _count_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../count.js */ \"./node_modules/d3-scale/node_modules/d3-array/src/count.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(values) {\n  return Math.ceil(Math.log(Object(_count_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(values)) / Math.LN2) + 1;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale/node_modules/d3-array/src/ticks.js\":\n/*!******************************************************************!*\\\n  !*** ./node_modules/d3-scale/node_modules/d3-array/src/ticks.js ***!\n  \\******************************************************************/\n/*! exports provided: default, tickIncrement, tickStep */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"tickIncrement\", function() { return tickIncrement; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"tickStep\", function() { return tickStep; });\nvar e10 = Math.sqrt(50),\n    e5 = Math.sqrt(10),\n    e2 = Math.sqrt(2);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(start, stop, count) {\n  var reverse,\n      i = -1,\n      n,\n      ticks,\n      step;\n\n  stop = +stop, start = +start, count = +count;\n  if (start === stop && count > 0) return [start];\n  if (reverse = stop < start) n = start, start = stop, stop = n;\n  if ((step = tickIncrement(start, stop, count)) === 0 || !isFinite(step)) return [];\n\n  if (step > 0) {\n    let r0 = Math.round(start / step), r1 = Math.round(stop / step);\n    if (r0 * step < start) ++r0;\n    if (r1 * step > stop) --r1;\n    ticks = new Array(n = r1 - r0 + 1);\n    while (++i < n) ticks[i] = (r0 + i) * step;\n  } else {\n    step = -step;\n    let r0 = Math.round(start * step), r1 = Math.round(stop * step);\n    if (r0 / step < start) ++r0;\n    if (r1 / step > stop) --r1;\n    ticks = new Array(n = r1 - r0 + 1);\n    while (++i < n) ticks[i] = (r0 + i) / step;\n  }\n\n  if (reverse) ticks.reverse();\n\n  return ticks;\n});\n\nfunction tickIncrement(start, stop, count) {\n  var step = (stop - start) / Math.max(0, count),\n      power = Math.floor(Math.log(step) / Math.LN10),\n      error = step / Math.pow(10, power);\n  return power >= 0\n      ? (error >= e10 ? 10 : error >= e5 ? 5 : error >= e2 ? 2 : 1) * Math.pow(10, power)\n      : -Math.pow(10, -power) / (error >= e10 ? 10 : error >= e5 ? 5 : error >= e2 ? 2 : 1);\n}\n\nfunction tickStep(start, stop, count) {\n  var step0 = Math.abs(stop - start) / Math.max(0, count),\n      step1 = Math.pow(10, Math.floor(Math.log(step0) / Math.LN10)),\n      error = step0 / step1;\n  if (error >= e10) step1 *= 10;\n  else if (error >= e5) step1 *= 5;\n  else if (error >= e2) step1 *= 2;\n  return stop < start ? -step1 : step1;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale/node_modules/d3-array/src/transpose.js\":\n/*!**********************************************************************!*\\\n  !*** ./node_modules/d3-scale/node_modules/d3-array/src/transpose.js ***!\n  \\**********************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _min_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./min.js */ \"./node_modules/d3-scale/node_modules/d3-array/src/min.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(matrix) {\n  if (!(n = matrix.length)) return [];\n  for (var i = -1, m = Object(_min_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(matrix, length), transpose = new Array(m); ++i < m;) {\n    for (var j = -1, n, row = transpose[i] = new Array(n); ++j < n;) {\n      row[j] = matrix[j][i];\n    }\n  }\n  return transpose;\n});\n\nfunction length(d) {\n  return d.length;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale/node_modules/d3-array/src/union.js\":\n/*!******************************************************************!*\\\n  !*** ./node_modules/d3-scale/node_modules/d3-array/src/union.js ***!\n  \\******************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return union; });\nfunction union(...others) {\n  const set = new Set();\n  for (const other of others) {\n    for (const o of other) {\n      set.add(o);\n    }\n  }\n  return set;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale/node_modules/d3-array/src/variance.js\":\n/*!*********************************************************************!*\\\n  !*** ./node_modules/d3-scale/node_modules/d3-array/src/variance.js ***!\n  \\*********************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return variance; });\nfunction variance(values, valueof) {\n  let count = 0;\n  let delta;\n  let mean = 0;\n  let sum = 0;\n  if (valueof === undefined) {\n    for (let value of values) {\n      if (value != null && (value = +value) >= value) {\n        delta = value - mean;\n        mean += delta / ++count;\n        sum += delta * (value - mean);\n      }\n    }\n  } else {\n    let index = -1;\n    for (let value of values) {\n      if ((value = valueof(value, ++index, values)) != null && (value = +value) >= value) {\n        delta = value - mean;\n        mean += delta / ++count;\n        sum += delta * (value - mean);\n      }\n    }\n  }\n  if (count > 1) return sum / (count - 1);\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale/node_modules/d3-array/src/zip.js\":\n/*!****************************************************************!*\\\n  !*** ./node_modules/d3-scale/node_modules/d3-array/src/zip.js ***!\n  \\****************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _transpose_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./transpose.js */ \"./node_modules/d3-scale/node_modules/d3-array/src/transpose.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  return Object(_transpose_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(arguments);\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale/node_modules/d3-color/src/color.js\":\n/*!******************************************************************!*\\\n  !*** ./node_modules/d3-scale/node_modules/d3-color/src/color.js ***!\n  \\******************************************************************/\n/*! exports provided: Color, darker, brighter, default, rgbConvert, rgb, Rgb, hslConvert, hsl */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Color\", function() { return Color; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"darker\", function() { return darker; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"brighter\", function() { return brighter; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return color; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"rgbConvert\", function() { return rgbConvert; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"rgb\", function() { return rgb; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Rgb\", function() { return Rgb; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"hslConvert\", function() { return hslConvert; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"hsl\", function() { return hsl; });\n/* harmony import */ var _define_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./define.js */ \"./node_modules/d3-scale/node_modules/d3-color/src/define.js\");\n\n\nfunction Color() {}\n\nvar darker = 0.7;\nvar brighter = 1 / darker;\n\nvar reI = \"\\\\s*([+-]?\\\\d+)\\\\s*\",\n    reN = \"\\\\s*([+-]?\\\\d*\\\\.?\\\\d+(?:[eE][+-]?\\\\d+)?)\\\\s*\",\n    reP = \"\\\\s*([+-]?\\\\d*\\\\.?\\\\d+(?:[eE][+-]?\\\\d+)?)%\\\\s*\",\n    reHex = /^#([0-9a-f]{3,8})$/,\n    reRgbInteger = new RegExp(\"^rgb\\\\(\" + [reI, reI, reI] + \"\\\\)$\"),\n    reRgbPercent = new RegExp(\"^rgb\\\\(\" + [reP, reP, reP] + \"\\\\)$\"),\n    reRgbaInteger = new RegExp(\"^rgba\\\\(\" + [reI, reI, reI, reN] + \"\\\\)$\"),\n    reRgbaPercent = new RegExp(\"^rgba\\\\(\" + [reP, reP, reP, reN] + \"\\\\)$\"),\n    reHslPercent = new RegExp(\"^hsl\\\\(\" + [reN, reP, reP] + \"\\\\)$\"),\n    reHslaPercent = new RegExp(\"^hsla\\\\(\" + [reN, reP, reP, reN] + \"\\\\)$\");\n\nvar named = {\n  aliceblue: 0xf0f8ff,\n  antiquewhite: 0xfaebd7,\n  aqua: 0x00ffff,\n  aquamarine: 0x7fffd4,\n  azure: 0xf0ffff,\n  beige: 0xf5f5dc,\n  bisque: 0xffe4c4,\n  black: 0x000000,\n  blanchedalmond: 0xffebcd,\n  blue: 0x0000ff,\n  blueviolet: 0x8a2be2,\n  brown: 0xa52a2a,\n  burlywood: 0xdeb887,\n  cadetblue: 0x5f9ea0,\n  chartreuse: 0x7fff00,\n  chocolate: 0xd2691e,\n  coral: 0xff7f50,\n  cornflowerblue: 0x6495ed,\n  cornsilk: 0xfff8dc,\n  crimson: 0xdc143c,\n  cyan: 0x00ffff,\n  darkblue: 0x00008b,\n  darkcyan: 0x008b8b,\n  darkgoldenrod: 0xb8860b,\n  darkgray: 0xa9a9a9,\n  darkgreen: 0x006400,\n  darkgrey: 0xa9a9a9,\n  darkkhaki: 0xbdb76b,\n  darkmagenta: 0x8b008b,\n  darkolivegreen: 0x556b2f,\n  darkorange: 0xff8c00,\n  darkorchid: 0x9932cc,\n  darkred: 0x8b0000,\n  darksalmon: 0xe9967a,\n  darkseagreen: 0x8fbc8f,\n  darkslateblue: 0x483d8b,\n  darkslategray: 0x2f4f4f,\n  darkslategrey: 0x2f4f4f,\n  darkturquoise: 0x00ced1,\n  darkviolet: 0x9400d3,\n  deeppink: 0xff1493,\n  deepskyblue: 0x00bfff,\n  dimgray: 0x696969,\n  dimgrey: 0x696969,\n  dodgerblue: 0x1e90ff,\n  firebrick: 0xb22222,\n  floralwhite: 0xfffaf0,\n  forestgreen: 0x228b22,\n  fuchsia: 0xff00ff,\n  gainsboro: 0xdcdcdc,\n  ghostwhite: 0xf8f8ff,\n  gold: 0xffd700,\n  goldenrod: 0xdaa520,\n  gray: 0x808080,\n  green: 0x008000,\n  greenyellow: 0xadff2f,\n  grey: 0x808080,\n  honeydew: 0xf0fff0,\n  hotpink: 0xff69b4,\n  indianred: 0xcd5c5c,\n  indigo: 0x4b0082,\n  ivory: 0xfffff0,\n  khaki: 0xf0e68c,\n  lavender: 0xe6e6fa,\n  lavenderblush: 0xfff0f5,\n  lawngreen: 0x7cfc00,\n  lemonchiffon: 0xfffacd,\n  lightblue: 0xadd8e6,\n  lightcoral: 0xf08080,\n  lightcyan: 0xe0ffff,\n  lightgoldenrodyellow: 0xfafad2,\n  lightgray: 0xd3d3d3,\n  lightgreen: 0x90ee90,\n  lightgrey: 0xd3d3d3,\n  lightpink: 0xffb6c1,\n  lightsalmon: 0xffa07a,\n  lightseagreen: 0x20b2aa,\n  lightskyblue: 0x87cefa,\n  lightslategray: 0x778899,\n  lightslategrey: 0x778899,\n  lightsteelblue: 0xb0c4de,\n  lightyellow: 0xffffe0,\n  lime: 0x00ff00,\n  limegreen: 0x32cd32,\n  linen: 0xfaf0e6,\n  magenta: 0xff00ff,\n  maroon: 0x800000,\n  mediumaquamarine: 0x66cdaa,\n  mediumblue: 0x0000cd,\n  mediumorchid: 0xba55d3,\n  mediumpurple: 0x9370db,\n  mediumseagreen: 0x3cb371,\n  mediumslateblue: 0x7b68ee,\n  mediumspringgreen: 0x00fa9a,\n  mediumturquoise: 0x48d1cc,\n  mediumvioletred: 0xc71585,\n  midnightblue: 0x191970,\n  mintcream: 0xf5fffa,\n  mistyrose: 0xffe4e1,\n  moccasin: 0xffe4b5,\n  navajowhite: 0xffdead,\n  navy: 0x000080,\n  oldlace: 0xfdf5e6,\n  olive: 0x808000,\n  olivedrab: 0x6b8e23,\n  orange: 0xffa500,\n  orangered: 0xff4500,\n  orchid: 0xda70d6,\n  palegoldenrod: 0xeee8aa,\n  palegreen: 0x98fb98,\n  paleturquoise: 0xafeeee,\n  palevioletred: 0xdb7093,\n  papayawhip: 0xffefd5,\n  peachpuff: 0xffdab9,\n  peru: 0xcd853f,\n  pink: 0xffc0cb,\n  plum: 0xdda0dd,\n  powderblue: 0xb0e0e6,\n  purple: 0x800080,\n  rebeccapurple: 0x663399,\n  red: 0xff0000,\n  rosybrown: 0xbc8f8f,\n  royalblue: 0x4169e1,\n  saddlebrown: 0x8b4513,\n  salmon: 0xfa8072,\n  sandybrown: 0xf4a460,\n  seagreen: 0x2e8b57,\n  seashell: 0xfff5ee,\n  sienna: 0xa0522d,\n  silver: 0xc0c0c0,\n  skyblue: 0x87ceeb,\n  slateblue: 0x6a5acd,\n  slategray: 0x708090,\n  slategrey: 0x708090,\n  snow: 0xfffafa,\n  springgreen: 0x00ff7f,\n  steelblue: 0x4682b4,\n  tan: 0xd2b48c,\n  teal: 0x008080,\n  thistle: 0xd8bfd8,\n  tomato: 0xff6347,\n  turquoise: 0x40e0d0,\n  violet: 0xee82ee,\n  wheat: 0xf5deb3,\n  white: 0xffffff,\n  whitesmoke: 0xf5f5f5,\n  yellow: 0xffff00,\n  yellowgreen: 0x9acd32\n};\n\nObject(_define_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(Color, color, {\n  copy: function(channels) {\n    return Object.assign(new this.constructor, this, channels);\n  },\n  displayable: function() {\n    return this.rgb().displayable();\n  },\n  hex: color_formatHex, // Deprecated! Use color.formatHex.\n  formatHex: color_formatHex,\n  formatHsl: color_formatHsl,\n  formatRgb: color_formatRgb,\n  toString: color_formatRgb\n});\n\nfunction color_formatHex() {\n  return this.rgb().formatHex();\n}\n\nfunction color_formatHsl() {\n  return hslConvert(this).formatHsl();\n}\n\nfunction color_formatRgb() {\n  return this.rgb().formatRgb();\n}\n\nfunction color(format) {\n  var m, l;\n  format = (format + \"\").trim().toLowerCase();\n  return (m = reHex.exec(format)) ? (l = m[1].length, m = parseInt(m[1], 16), l === 6 ? rgbn(m) // #ff0000\n      : l === 3 ? new Rgb((m >> 8 & 0xf) | (m >> 4 & 0xf0), (m >> 4 & 0xf) | (m & 0xf0), ((m & 0xf) << 4) | (m & 0xf), 1) // #f00\n      : l === 8 ? rgba(m >> 24 & 0xff, m >> 16 & 0xff, m >> 8 & 0xff, (m & 0xff) / 0xff) // #ff000000\n      : l === 4 ? rgba((m >> 12 & 0xf) | (m >> 8 & 0xf0), (m >> 8 & 0xf) | (m >> 4 & 0xf0), (m >> 4 & 0xf) | (m & 0xf0), (((m & 0xf) << 4) | (m & 0xf)) / 0xff) // #f000\n      : null) // invalid hex\n      : (m = reRgbInteger.exec(format)) ? new Rgb(m[1], m[2], m[3], 1) // rgb(255, 0, 0)\n      : (m = reRgbPercent.exec(format)) ? new Rgb(m[1] * 255 / 100, m[2] * 255 / 100, m[3] * 255 / 100, 1) // rgb(100%, 0%, 0%)\n      : (m = reRgbaInteger.exec(format)) ? rgba(m[1], m[2], m[3], m[4]) // rgba(255, 0, 0, 1)\n      : (m = reRgbaPercent.exec(format)) ? rgba(m[1] * 255 / 100, m[2] * 255 / 100, m[3] * 255 / 100, m[4]) // rgb(100%, 0%, 0%, 1)\n      : (m = reHslPercent.exec(format)) ? hsla(m[1], m[2] / 100, m[3] / 100, 1) // hsl(120, 50%, 50%)\n      : (m = reHslaPercent.exec(format)) ? hsla(m[1], m[2] / 100, m[3] / 100, m[4]) // hsla(120, 50%, 50%, 1)\n      : named.hasOwnProperty(format) ? rgbn(named[format]) // eslint-disable-line no-prototype-builtins\n      : format === \"transparent\" ? new Rgb(NaN, NaN, NaN, 0)\n      : null;\n}\n\nfunction rgbn(n) {\n  return new Rgb(n >> 16 & 0xff, n >> 8 & 0xff, n & 0xff, 1);\n}\n\nfunction rgba(r, g, b, a) {\n  if (a <= 0) r = g = b = NaN;\n  return new Rgb(r, g, b, a);\n}\n\nfunction rgbConvert(o) {\n  if (!(o instanceof Color)) o = color(o);\n  if (!o) return new Rgb;\n  o = o.rgb();\n  return new Rgb(o.r, o.g, o.b, o.opacity);\n}\n\nfunction rgb(r, g, b, opacity) {\n  return arguments.length === 1 ? rgbConvert(r) : new Rgb(r, g, b, opacity == null ? 1 : opacity);\n}\n\nfunction Rgb(r, g, b, opacity) {\n  this.r = +r;\n  this.g = +g;\n  this.b = +b;\n  this.opacity = +opacity;\n}\n\nObject(_define_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(Rgb, rgb, Object(_define_js__WEBPACK_IMPORTED_MODULE_0__[\"extend\"])(Color, {\n  brighter: function(k) {\n    k = k == null ? brighter : Math.pow(brighter, k);\n    return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity);\n  },\n  darker: function(k) {\n    k = k == null ? darker : Math.pow(darker, k);\n    return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity);\n  },\n  rgb: function() {\n    return this;\n  },\n  displayable: function() {\n    return (-0.5 <= this.r && this.r < 255.5)\n        && (-0.5 <= this.g && this.g < 255.5)\n        && (-0.5 <= this.b && this.b < 255.5)\n        && (0 <= this.opacity && this.opacity <= 1);\n  },\n  hex: rgb_formatHex, // Deprecated! Use color.formatHex.\n  formatHex: rgb_formatHex,\n  formatRgb: rgb_formatRgb,\n  toString: rgb_formatRgb\n}));\n\nfunction rgb_formatHex() {\n  return \"#\" + hex(this.r) + hex(this.g) + hex(this.b);\n}\n\nfunction rgb_formatRgb() {\n  var a = this.opacity; a = isNaN(a) ? 1 : Math.max(0, Math.min(1, a));\n  return (a === 1 ? \"rgb(\" : \"rgba(\")\n      + Math.max(0, Math.min(255, Math.round(this.r) || 0)) + \", \"\n      + Math.max(0, Math.min(255, Math.round(this.g) || 0)) + \", \"\n      + Math.max(0, Math.min(255, Math.round(this.b) || 0))\n      + (a === 1 ? \")\" : \", \" + a + \")\");\n}\n\nfunction hex(value) {\n  value = Math.max(0, Math.min(255, Math.round(value) || 0));\n  return (value < 16 ? \"0\" : \"\") + value.toString(16);\n}\n\nfunction hsla(h, s, l, a) {\n  if (a <= 0) h = s = l = NaN;\n  else if (l <= 0 || l >= 1) h = s = NaN;\n  else if (s <= 0) h = NaN;\n  return new Hsl(h, s, l, a);\n}\n\nfunction hslConvert(o) {\n  if (o instanceof Hsl) return new Hsl(o.h, o.s, o.l, o.opacity);\n  if (!(o instanceof Color)) o = color(o);\n  if (!o) return new Hsl;\n  if (o instanceof Hsl) return o;\n  o = o.rgb();\n  var r = o.r / 255,\n      g = o.g / 255,\n      b = o.b / 255,\n      min = Math.min(r, g, b),\n      max = Math.max(r, g, b),\n      h = NaN,\n      s = max - min,\n      l = (max + min) / 2;\n  if (s) {\n    if (r === max) h = (g - b) / s + (g < b) * 6;\n    else if (g === max) h = (b - r) / s + 2;\n    else h = (r - g) / s + 4;\n    s /= l < 0.5 ? max + min : 2 - max - min;\n    h *= 60;\n  } else {\n    s = l > 0 && l < 1 ? 0 : h;\n  }\n  return new Hsl(h, s, l, o.opacity);\n}\n\nfunction hsl(h, s, l, opacity) {\n  return arguments.length === 1 ? hslConvert(h) : new Hsl(h, s, l, opacity == null ? 1 : opacity);\n}\n\nfunction Hsl(h, s, l, opacity) {\n  this.h = +h;\n  this.s = +s;\n  this.l = +l;\n  this.opacity = +opacity;\n}\n\nObject(_define_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(Hsl, hsl, Object(_define_js__WEBPACK_IMPORTED_MODULE_0__[\"extend\"])(Color, {\n  brighter: function(k) {\n    k = k == null ? brighter : Math.pow(brighter, k);\n    return new Hsl(this.h, this.s, this.l * k, this.opacity);\n  },\n  darker: function(k) {\n    k = k == null ? darker : Math.pow(darker, k);\n    return new Hsl(this.h, this.s, this.l * k, this.opacity);\n  },\n  rgb: function() {\n    var h = this.h % 360 + (this.h < 0) * 360,\n        s = isNaN(h) || isNaN(this.s) ? 0 : this.s,\n        l = this.l,\n        m2 = l + (l < 0.5 ? l : 1 - l) * s,\n        m1 = 2 * l - m2;\n    return new Rgb(\n      hsl2rgb(h >= 240 ? h - 240 : h + 120, m1, m2),\n      hsl2rgb(h, m1, m2),\n      hsl2rgb(h < 120 ? h + 240 : h - 120, m1, m2),\n      this.opacity\n    );\n  },\n  displayable: function() {\n    return (0 <= this.s && this.s <= 1 || isNaN(this.s))\n        && (0 <= this.l && this.l <= 1)\n        && (0 <= this.opacity && this.opacity <= 1);\n  },\n  formatHsl: function() {\n    var a = this.opacity; a = isNaN(a) ? 1 : Math.max(0, Math.min(1, a));\n    return (a === 1 ? \"hsl(\" : \"hsla(\")\n        + (this.h || 0) + \", \"\n        + (this.s || 0) * 100 + \"%, \"\n        + (this.l || 0) * 100 + \"%\"\n        + (a === 1 ? \")\" : \", \" + a + \")\");\n  }\n}));\n\n/* From FvD 13.37, CSS Color Module Level 3 */\nfunction hsl2rgb(h, m1, m2) {\n  return (h < 60 ? m1 + (m2 - m1) * h / 60\n      : h < 180 ? m2\n      : h < 240 ? m1 + (m2 - m1) * (240 - h) / 60\n      : m1) * 255;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale/node_modules/d3-color/src/cubehelix.js\":\n/*!**********************************************************************!*\\\n  !*** ./node_modules/d3-scale/node_modules/d3-color/src/cubehelix.js ***!\n  \\**********************************************************************/\n/*! exports provided: default, Cubehelix */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return cubehelix; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Cubehelix\", function() { return Cubehelix; });\n/* harmony import */ var _define_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./define.js */ \"./node_modules/d3-scale/node_modules/d3-color/src/define.js\");\n/* harmony import */ var _color_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./color.js */ \"./node_modules/d3-scale/node_modules/d3-color/src/color.js\");\n/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./math.js */ \"./node_modules/d3-scale/node_modules/d3-color/src/math.js\");\n\n\n\n\nvar A = -0.14861,\n    B = +1.78277,\n    C = -0.29227,\n    D = -0.90649,\n    E = +1.97294,\n    ED = E * D,\n    EB = E * B,\n    BC_DA = B * C - D * A;\n\nfunction cubehelixConvert(o) {\n  if (o instanceof Cubehelix) return new Cubehelix(o.h, o.s, o.l, o.opacity);\n  if (!(o instanceof _color_js__WEBPACK_IMPORTED_MODULE_1__[\"Rgb\"])) o = Object(_color_js__WEBPACK_IMPORTED_MODULE_1__[\"rgbConvert\"])(o);\n  var r = o.r / 255,\n      g = o.g / 255,\n      b = o.b / 255,\n      l = (BC_DA * b + ED * r - EB * g) / (BC_DA + ED - EB),\n      bl = b - l,\n      k = (E * (g - l) - C * bl) / D,\n      s = Math.sqrt(k * k + bl * bl) / (E * l * (1 - l)), // NaN if l=0 or l=1\n      h = s ? Math.atan2(k, bl) * _math_js__WEBPACK_IMPORTED_MODULE_2__[\"degrees\"] - 120 : NaN;\n  return new Cubehelix(h < 0 ? h + 360 : h, s, l, o.opacity);\n}\n\nfunction cubehelix(h, s, l, opacity) {\n  return arguments.length === 1 ? cubehelixConvert(h) : new Cubehelix(h, s, l, opacity == null ? 1 : opacity);\n}\n\nfunction Cubehelix(h, s, l, opacity) {\n  this.h = +h;\n  this.s = +s;\n  this.l = +l;\n  this.opacity = +opacity;\n}\n\nObject(_define_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(Cubehelix, cubehelix, Object(_define_js__WEBPACK_IMPORTED_MODULE_0__[\"extend\"])(_color_js__WEBPACK_IMPORTED_MODULE_1__[\"Color\"], {\n  brighter: function(k) {\n    k = k == null ? _color_js__WEBPACK_IMPORTED_MODULE_1__[\"brighter\"] : Math.pow(_color_js__WEBPACK_IMPORTED_MODULE_1__[\"brighter\"], k);\n    return new Cubehelix(this.h, this.s, this.l * k, this.opacity);\n  },\n  darker: function(k) {\n    k = k == null ? _color_js__WEBPACK_IMPORTED_MODULE_1__[\"darker\"] : Math.pow(_color_js__WEBPACK_IMPORTED_MODULE_1__[\"darker\"], k);\n    return new Cubehelix(this.h, this.s, this.l * k, this.opacity);\n  },\n  rgb: function() {\n    var h = isNaN(this.h) ? 0 : (this.h + 120) * _math_js__WEBPACK_IMPORTED_MODULE_2__[\"radians\"],\n        l = +this.l,\n        a = isNaN(this.s) ? 0 : this.s * l * (1 - l),\n        cosh = Math.cos(h),\n        sinh = Math.sin(h);\n    return new _color_js__WEBPACK_IMPORTED_MODULE_1__[\"Rgb\"](\n      255 * (l + a * (A * cosh + B * sinh)),\n      255 * (l + a * (C * cosh + D * sinh)),\n      255 * (l + a * (E * cosh)),\n      this.opacity\n    );\n  }\n}));\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale/node_modules/d3-color/src/define.js\":\n/*!*******************************************************************!*\\\n  !*** ./node_modules/d3-scale/node_modules/d3-color/src/define.js ***!\n  \\*******************************************************************/\n/*! exports provided: default, extend */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"extend\", function() { return extend; });\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(constructor, factory, prototype) {\n  constructor.prototype = factory.prototype = prototype;\n  prototype.constructor = constructor;\n});\n\nfunction extend(parent, definition) {\n  var prototype = Object.create(parent.prototype);\n  for (var key in definition) prototype[key] = definition[key];\n  return prototype;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale/node_modules/d3-color/src/index.js\":\n/*!******************************************************************!*\\\n  !*** ./node_modules/d3-scale/node_modules/d3-color/src/index.js ***!\n  \\******************************************************************/\n/*! exports provided: color, rgb, hsl, lab, hcl, lch, gray, cubehelix */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _color_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./color.js */ \"./node_modules/d3-scale/node_modules/d3-color/src/color.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"color\", function() { return _color_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"rgb\", function() { return _color_js__WEBPACK_IMPORTED_MODULE_0__[\"rgb\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"hsl\", function() { return _color_js__WEBPACK_IMPORTED_MODULE_0__[\"hsl\"]; });\n\n/* harmony import */ var _lab_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./lab.js */ \"./node_modules/d3-scale/node_modules/d3-color/src/lab.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"lab\", function() { return _lab_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"hcl\", function() { return _lab_js__WEBPACK_IMPORTED_MODULE_1__[\"hcl\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"lch\", function() { return _lab_js__WEBPACK_IMPORTED_MODULE_1__[\"lch\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"gray\", function() { return _lab_js__WEBPACK_IMPORTED_MODULE_1__[\"gray\"]; });\n\n/* harmony import */ var _cubehelix_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./cubehelix.js */ \"./node_modules/d3-scale/node_modules/d3-color/src/cubehelix.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"cubehelix\", function() { return _cubehelix_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"]; });\n\n\n\n\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale/node_modules/d3-color/src/lab.js\":\n/*!****************************************************************!*\\\n  !*** ./node_modules/d3-scale/node_modules/d3-color/src/lab.js ***!\n  \\****************************************************************/\n/*! exports provided: gray, default, Lab, lch, hcl, Hcl */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"gray\", function() { return gray; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return lab; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Lab\", function() { return Lab; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"lch\", function() { return lch; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"hcl\", function() { return hcl; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Hcl\", function() { return Hcl; });\n/* harmony import */ var _define_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./define.js */ \"./node_modules/d3-scale/node_modules/d3-color/src/define.js\");\n/* harmony import */ var _color_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./color.js */ \"./node_modules/d3-scale/node_modules/d3-color/src/color.js\");\n/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./math.js */ \"./node_modules/d3-scale/node_modules/d3-color/src/math.js\");\n\n\n\n\n// https://observablehq.com/@mbostock/lab-and-rgb\nconst K = 18,\n    Xn = 0.96422,\n    Yn = 1,\n    Zn = 0.82521,\n    t0 = 4 / 29,\n    t1 = 6 / 29,\n    t2 = 3 * t1 * t1,\n    t3 = t1 * t1 * t1;\n\nfunction labConvert(o) {\n  if (o instanceof Lab) return new Lab(o.l, o.a, o.b, o.opacity);\n  if (o instanceof Hcl) return hcl2lab(o);\n  if (!(o instanceof _color_js__WEBPACK_IMPORTED_MODULE_1__[\"Rgb\"])) o = Object(_color_js__WEBPACK_IMPORTED_MODULE_1__[\"rgbConvert\"])(o);\n  var r = rgb2lrgb(o.r),\n      g = rgb2lrgb(o.g),\n      b = rgb2lrgb(o.b),\n      y = xyz2lab((0.2225045 * r + 0.7168786 * g + 0.0606169 * b) / Yn), x, z;\n  if (r === g && g === b) x = z = y; else {\n    x = xyz2lab((0.4360747 * r + 0.3850649 * g + 0.1430804 * b) / Xn);\n    z = xyz2lab((0.0139322 * r + 0.0971045 * g + 0.7141733 * b) / Zn);\n  }\n  return new Lab(116 * y - 16, 500 * (x - y), 200 * (y - z), o.opacity);\n}\n\nfunction gray(l, opacity) {\n  return new Lab(l, 0, 0, opacity == null ? 1 : opacity);\n}\n\nfunction lab(l, a, b, opacity) {\n  return arguments.length === 1 ? labConvert(l) : new Lab(l, a, b, opacity == null ? 1 : opacity);\n}\n\nfunction Lab(l, a, b, opacity) {\n  this.l = +l;\n  this.a = +a;\n  this.b = +b;\n  this.opacity = +opacity;\n}\n\nObject(_define_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(Lab, lab, Object(_define_js__WEBPACK_IMPORTED_MODULE_0__[\"extend\"])(_color_js__WEBPACK_IMPORTED_MODULE_1__[\"Color\"], {\n  brighter: function(k) {\n    return new Lab(this.l + K * (k == null ? 1 : k), this.a, this.b, this.opacity);\n  },\n  darker: function(k) {\n    return new Lab(this.l - K * (k == null ? 1 : k), this.a, this.b, this.opacity);\n  },\n  rgb: function() {\n    var y = (this.l + 16) / 116,\n        x = isNaN(this.a) ? y : y + this.a / 500,\n        z = isNaN(this.b) ? y : y - this.b / 200;\n    x = Xn * lab2xyz(x);\n    y = Yn * lab2xyz(y);\n    z = Zn * lab2xyz(z);\n    return new _color_js__WEBPACK_IMPORTED_MODULE_1__[\"Rgb\"](\n      lrgb2rgb( 3.1338561 * x - 1.6168667 * y - 0.4906146 * z),\n      lrgb2rgb(-0.9787684 * x + 1.9161415 * y + 0.0334540 * z),\n      lrgb2rgb( 0.0719453 * x - 0.2289914 * y + 1.4052427 * z),\n      this.opacity\n    );\n  }\n}));\n\nfunction xyz2lab(t) {\n  return t > t3 ? Math.pow(t, 1 / 3) : t / t2 + t0;\n}\n\nfunction lab2xyz(t) {\n  return t > t1 ? t * t * t : t2 * (t - t0);\n}\n\nfunction lrgb2rgb(x) {\n  return 255 * (x <= 0.0031308 ? 12.92 * x : 1.055 * Math.pow(x, 1 / 2.4) - 0.055);\n}\n\nfunction rgb2lrgb(x) {\n  return (x /= 255) <= 0.04045 ? x / 12.92 : Math.pow((x + 0.055) / 1.055, 2.4);\n}\n\nfunction hclConvert(o) {\n  if (o instanceof Hcl) return new Hcl(o.h, o.c, o.l, o.opacity);\n  if (!(o instanceof Lab)) o = labConvert(o);\n  if (o.a === 0 && o.b === 0) return new Hcl(NaN, 0 < o.l && o.l < 100 ? 0 : NaN, o.l, o.opacity);\n  var h = Math.atan2(o.b, o.a) * _math_js__WEBPACK_IMPORTED_MODULE_2__[\"degrees\"];\n  return new Hcl(h < 0 ? h + 360 : h, Math.sqrt(o.a * o.a + o.b * o.b), o.l, o.opacity);\n}\n\nfunction lch(l, c, h, opacity) {\n  return arguments.length === 1 ? hclConvert(l) : new Hcl(h, c, l, opacity == null ? 1 : opacity);\n}\n\nfunction hcl(h, c, l, opacity) {\n  return arguments.length === 1 ? hclConvert(h) : new Hcl(h, c, l, opacity == null ? 1 : opacity);\n}\n\nfunction Hcl(h, c, l, opacity) {\n  this.h = +h;\n  this.c = +c;\n  this.l = +l;\n  this.opacity = +opacity;\n}\n\nfunction hcl2lab(o) {\n  if (isNaN(o.h)) return new Lab(o.l, 0, 0, o.opacity);\n  var h = o.h * _math_js__WEBPACK_IMPORTED_MODULE_2__[\"radians\"];\n  return new Lab(o.l, Math.cos(h) * o.c, Math.sin(h) * o.c, o.opacity);\n}\n\nObject(_define_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(Hcl, hcl, Object(_define_js__WEBPACK_IMPORTED_MODULE_0__[\"extend\"])(_color_js__WEBPACK_IMPORTED_MODULE_1__[\"Color\"], {\n  brighter: function(k) {\n    return new Hcl(this.h, this.c, this.l + K * (k == null ? 1 : k), this.opacity);\n  },\n  darker: function(k) {\n    return new Hcl(this.h, this.c, this.l - K * (k == null ? 1 : k), this.opacity);\n  },\n  rgb: function() {\n    return hcl2lab(this).rgb();\n  }\n}));\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale/node_modules/d3-color/src/math.js\":\n/*!*****************************************************************!*\\\n  !*** ./node_modules/d3-scale/node_modules/d3-color/src/math.js ***!\n  \\*****************************************************************/\n/*! exports provided: radians, degrees */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"radians\", function() { return radians; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"degrees\", function() { return degrees; });\nconst radians = Math.PI / 180;\nconst degrees = 180 / Math.PI;\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale/node_modules/d3-format/src/defaultLocale.js\":\n/*!***************************************************************************!*\\\n  !*** ./node_modules/d3-scale/node_modules/d3-format/src/defaultLocale.js ***!\n  \\***************************************************************************/\n/*! exports provided: format, formatPrefix, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"format\", function() { return format; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"formatPrefix\", function() { return formatPrefix; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return defaultLocale; });\n/* harmony import */ var _locale_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./locale.js */ \"./node_modules/d3-scale/node_modules/d3-format/src/locale.js\");\n\n\nvar locale;\nvar format;\nvar formatPrefix;\n\ndefaultLocale({\n  thousands: \",\",\n  grouping: [3],\n  currency: [\"$\", \"\"]\n});\n\nfunction defaultLocale(definition) {\n  locale = Object(_locale_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(definition);\n  format = locale.format;\n  formatPrefix = locale.formatPrefix;\n  return locale;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale/node_modules/d3-format/src/exponent.js\":\n/*!**********************************************************************!*\\\n  !*** ./node_modules/d3-scale/node_modules/d3-format/src/exponent.js ***!\n  \\**********************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _formatDecimal_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./formatDecimal.js */ \"./node_modules/d3-scale/node_modules/d3-format/src/formatDecimal.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(x) {\n  return x = Object(_formatDecimal_js__WEBPACK_IMPORTED_MODULE_0__[\"formatDecimalParts\"])(Math.abs(x)), x ? x[1] : NaN;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale/node_modules/d3-format/src/formatDecimal.js\":\n/*!***************************************************************************!*\\\n  !*** ./node_modules/d3-scale/node_modules/d3-format/src/formatDecimal.js ***!\n  \\***************************************************************************/\n/*! exports provided: default, formatDecimalParts */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"formatDecimalParts\", function() { return formatDecimalParts; });\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(x) {\n  return Math.abs(x = Math.round(x)) >= 1e21\n      ? x.toLocaleString(\"en\").replace(/,/g, \"\")\n      : x.toString(10);\n});\n\n// Computes the decimal coefficient and exponent of the specified number x with\n// significant digits p, where x is positive and p is in [1, 21] or undefined.\n// For example, formatDecimalParts(1.23) returns [\"123\", 0].\nfunction formatDecimalParts(x, p) {\n  if ((i = (x = p ? x.toExponential(p - 1) : x.toExponential()).indexOf(\"e\")) < 0) return null; // NaN, ±Infinity\n  var i, coefficient = x.slice(0, i);\n\n  // The string returned by toExponential either has the form \\d\\.\\d+e[-+]\\d+\n  // (e.g., 1.2e+3) or the form \\de[-+]\\d+ (e.g., 1e+3).\n  return [\n    coefficient.length > 1 ? coefficient[0] + coefficient.slice(2) : coefficient,\n    +x.slice(i + 1)\n  ];\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale/node_modules/d3-format/src/formatGroup.js\":\n/*!*************************************************************************!*\\\n  !*** ./node_modules/d3-scale/node_modules/d3-format/src/formatGroup.js ***!\n  \\*************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(grouping, thousands) {\n  return function(value, width) {\n    var i = value.length,\n        t = [],\n        j = 0,\n        g = grouping[0],\n        length = 0;\n\n    while (i > 0 && g > 0) {\n      if (length + g + 1 > width) g = Math.max(1, width - length);\n      t.push(value.substring(i -= g, i + g));\n      if ((length += g + 1) > width) break;\n      g = grouping[j = (j + 1) % grouping.length];\n    }\n\n    return t.reverse().join(thousands);\n  };\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale/node_modules/d3-format/src/formatNumerals.js\":\n/*!****************************************************************************!*\\\n  !*** ./node_modules/d3-scale/node_modules/d3-format/src/formatNumerals.js ***!\n  \\****************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(numerals) {\n  return function(value) {\n    return value.replace(/[0-9]/g, function(i) {\n      return numerals[+i];\n    });\n  };\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale/node_modules/d3-format/src/formatPrefixAuto.js\":\n/*!******************************************************************************!*\\\n  !*** ./node_modules/d3-scale/node_modules/d3-format/src/formatPrefixAuto.js ***!\n  \\******************************************************************************/\n/*! exports provided: prefixExponent, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"prefixExponent\", function() { return prefixExponent; });\n/* harmony import */ var _formatDecimal_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./formatDecimal.js */ \"./node_modules/d3-scale/node_modules/d3-format/src/formatDecimal.js\");\n\n\nvar prefixExponent;\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(x, p) {\n  var d = Object(_formatDecimal_js__WEBPACK_IMPORTED_MODULE_0__[\"formatDecimalParts\"])(x, p);\n  if (!d) return x + \"\";\n  var coefficient = d[0],\n      exponent = d[1],\n      i = exponent - (prefixExponent = Math.max(-8, Math.min(8, Math.floor(exponent / 3))) * 3) + 1,\n      n = coefficient.length;\n  return i === n ? coefficient\n      : i > n ? coefficient + new Array(i - n + 1).join(\"0\")\n      : i > 0 ? coefficient.slice(0, i) + \".\" + coefficient.slice(i)\n      : \"0.\" + new Array(1 - i).join(\"0\") + Object(_formatDecimal_js__WEBPACK_IMPORTED_MODULE_0__[\"formatDecimalParts\"])(x, Math.max(0, p + i - 1))[0]; // less than 1y!\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale/node_modules/d3-format/src/formatRounded.js\":\n/*!***************************************************************************!*\\\n  !*** ./node_modules/d3-scale/node_modules/d3-format/src/formatRounded.js ***!\n  \\***************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _formatDecimal_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./formatDecimal.js */ \"./node_modules/d3-scale/node_modules/d3-format/src/formatDecimal.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(x, p) {\n  var d = Object(_formatDecimal_js__WEBPACK_IMPORTED_MODULE_0__[\"formatDecimalParts\"])(x, p);\n  if (!d) return x + \"\";\n  var coefficient = d[0],\n      exponent = d[1];\n  return exponent < 0 ? \"0.\" + new Array(-exponent).join(\"0\") + coefficient\n      : coefficient.length > exponent + 1 ? coefficient.slice(0, exponent + 1) + \".\" + coefficient.slice(exponent + 1)\n      : coefficient + new Array(exponent - coefficient.length + 2).join(\"0\");\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale/node_modules/d3-format/src/formatSpecifier.js\":\n/*!*****************************************************************************!*\\\n  !*** ./node_modules/d3-scale/node_modules/d3-format/src/formatSpecifier.js ***!\n  \\*****************************************************************************/\n/*! exports provided: default, FormatSpecifier */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return formatSpecifier; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"FormatSpecifier\", function() { return FormatSpecifier; });\n// [[fill]align][sign][symbol][0][width][,][.precision][~][type]\nvar re = /^(?:(.)?([<>=^]))?([+\\-( ])?([$#])?(0)?(\\d+)?(,)?(\\.\\d+)?(~)?([a-z%])?$/i;\n\nfunction formatSpecifier(specifier) {\n  if (!(match = re.exec(specifier))) throw new Error(\"invalid format: \" + specifier);\n  var match;\n  return new FormatSpecifier({\n    fill: match[1],\n    align: match[2],\n    sign: match[3],\n    symbol: match[4],\n    zero: match[5],\n    width: match[6],\n    comma: match[7],\n    precision: match[8] && match[8].slice(1),\n    trim: match[9],\n    type: match[10]\n  });\n}\n\nformatSpecifier.prototype = FormatSpecifier.prototype; // instanceof\n\nfunction FormatSpecifier(specifier) {\n  this.fill = specifier.fill === undefined ? \" \" : specifier.fill + \"\";\n  this.align = specifier.align === undefined ? \">\" : specifier.align + \"\";\n  this.sign = specifier.sign === undefined ? \"-\" : specifier.sign + \"\";\n  this.symbol = specifier.symbol === undefined ? \"\" : specifier.symbol + \"\";\n  this.zero = !!specifier.zero;\n  this.width = specifier.width === undefined ? undefined : +specifier.width;\n  this.comma = !!specifier.comma;\n  this.precision = specifier.precision === undefined ? undefined : +specifier.precision;\n  this.trim = !!specifier.trim;\n  this.type = specifier.type === undefined ? \"\" : specifier.type + \"\";\n}\n\nFormatSpecifier.prototype.toString = function() {\n  return this.fill\n      + this.align\n      + this.sign\n      + this.symbol\n      + (this.zero ? \"0\" : \"\")\n      + (this.width === undefined ? \"\" : Math.max(1, this.width | 0))\n      + (this.comma ? \",\" : \"\")\n      + (this.precision === undefined ? \"\" : \".\" + Math.max(0, this.precision | 0))\n      + (this.trim ? \"~\" : \"\")\n      + this.type;\n};\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale/node_modules/d3-format/src/formatTrim.js\":\n/*!************************************************************************!*\\\n  !*** ./node_modules/d3-scale/node_modules/d3-format/src/formatTrim.js ***!\n  \\************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n// Trims insignificant zeros, e.g., replaces 1.2000k with 1.2k.\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(s) {\n  out: for (var n = s.length, i = 1, i0 = -1, i1; i < n; ++i) {\n    switch (s[i]) {\n      case \".\": i0 = i1 = i; break;\n      case \"0\": if (i0 === 0) i0 = i; i1 = i; break;\n      default: if (!+s[i]) break out; if (i0 > 0) i0 = 0; break;\n    }\n  }\n  return i0 > 0 ? s.slice(0, i0) + s.slice(i1 + 1) : s;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale/node_modules/d3-format/src/formatTypes.js\":\n/*!*************************************************************************!*\\\n  !*** ./node_modules/d3-scale/node_modules/d3-format/src/formatTypes.js ***!\n  \\*************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _formatDecimal_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./formatDecimal.js */ \"./node_modules/d3-scale/node_modules/d3-format/src/formatDecimal.js\");\n/* harmony import */ var _formatPrefixAuto_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./formatPrefixAuto.js */ \"./node_modules/d3-scale/node_modules/d3-format/src/formatPrefixAuto.js\");\n/* harmony import */ var _formatRounded_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./formatRounded.js */ \"./node_modules/d3-scale/node_modules/d3-format/src/formatRounded.js\");\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n  \"%\": (x, p) => (x * 100).toFixed(p),\n  \"b\": (x) => Math.round(x).toString(2),\n  \"c\": (x) => x + \"\",\n  \"d\": _formatDecimal_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"],\n  \"e\": (x, p) => x.toExponential(p),\n  \"f\": (x, p) => x.toFixed(p),\n  \"g\": (x, p) => x.toPrecision(p),\n  \"o\": (x) => Math.round(x).toString(8),\n  \"p\": (x, p) => Object(_formatRounded_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(x * 100, p),\n  \"r\": _formatRounded_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"],\n  \"s\": _formatPrefixAuto_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"],\n  \"X\": (x) => Math.round(x).toString(16).toUpperCase(),\n  \"x\": (x) => Math.round(x).toString(16)\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale/node_modules/d3-format/src/identity.js\":\n/*!**********************************************************************!*\\\n  !*** ./node_modules/d3-scale/node_modules/d3-format/src/identity.js ***!\n  \\**********************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(x) {\n  return x;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale/node_modules/d3-format/src/index.js\":\n/*!*******************************************************************!*\\\n  !*** ./node_modules/d3-scale/node_modules/d3-format/src/index.js ***!\n  \\*******************************************************************/\n/*! exports provided: formatDefaultLocale, format, formatPrefix, formatLocale, formatSpecifier, FormatSpecifier, precisionFixed, precisionPrefix, precisionRound */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _defaultLocale_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./defaultLocale.js */ \"./node_modules/d3-scale/node_modules/d3-format/src/defaultLocale.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"formatDefaultLocale\", function() { return _defaultLocale_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"format\", function() { return _defaultLocale_js__WEBPACK_IMPORTED_MODULE_0__[\"format\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"formatPrefix\", function() { return _defaultLocale_js__WEBPACK_IMPORTED_MODULE_0__[\"formatPrefix\"]; });\n\n/* harmony import */ var _locale_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./locale.js */ \"./node_modules/d3-scale/node_modules/d3-format/src/locale.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"formatLocale\", function() { return _locale_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"]; });\n\n/* harmony import */ var _formatSpecifier_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./formatSpecifier.js */ \"./node_modules/d3-scale/node_modules/d3-format/src/formatSpecifier.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"formatSpecifier\", function() { return _formatSpecifier_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"FormatSpecifier\", function() { return _formatSpecifier_js__WEBPACK_IMPORTED_MODULE_2__[\"FormatSpecifier\"]; });\n\n/* harmony import */ var _precisionFixed_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./precisionFixed.js */ \"./node_modules/d3-scale/node_modules/d3-format/src/precisionFixed.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"precisionFixed\", function() { return _precisionFixed_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"]; });\n\n/* harmony import */ var _precisionPrefix_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./precisionPrefix.js */ \"./node_modules/d3-scale/node_modules/d3-format/src/precisionPrefix.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"precisionPrefix\", function() { return _precisionPrefix_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"]; });\n\n/* harmony import */ var _precisionRound_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./precisionRound.js */ \"./node_modules/d3-scale/node_modules/d3-format/src/precisionRound.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"precisionRound\", function() { return _precisionRound_js__WEBPACK_IMPORTED_MODULE_5__[\"default\"]; });\n\n\n\n\n\n\n\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale/node_modules/d3-format/src/locale.js\":\n/*!********************************************************************!*\\\n  !*** ./node_modules/d3-scale/node_modules/d3-format/src/locale.js ***!\n  \\********************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _exponent_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./exponent.js */ \"./node_modules/d3-scale/node_modules/d3-format/src/exponent.js\");\n/* harmony import */ var _formatGroup_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./formatGroup.js */ \"./node_modules/d3-scale/node_modules/d3-format/src/formatGroup.js\");\n/* harmony import */ var _formatNumerals_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./formatNumerals.js */ \"./node_modules/d3-scale/node_modules/d3-format/src/formatNumerals.js\");\n/* harmony import */ var _formatSpecifier_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./formatSpecifier.js */ \"./node_modules/d3-scale/node_modules/d3-format/src/formatSpecifier.js\");\n/* harmony import */ var _formatTrim_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./formatTrim.js */ \"./node_modules/d3-scale/node_modules/d3-format/src/formatTrim.js\");\n/* harmony import */ var _formatTypes_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./formatTypes.js */ \"./node_modules/d3-scale/node_modules/d3-format/src/formatTypes.js\");\n/* harmony import */ var _formatPrefixAuto_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./formatPrefixAuto.js */ \"./node_modules/d3-scale/node_modules/d3-format/src/formatPrefixAuto.js\");\n/* harmony import */ var _identity_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./identity.js */ \"./node_modules/d3-scale/node_modules/d3-format/src/identity.js\");\n\n\n\n\n\n\n\n\n\nvar map = Array.prototype.map,\n    prefixes = [\"y\",\"z\",\"a\",\"f\",\"p\",\"n\",\"µ\",\"m\",\"\",\"k\",\"M\",\"G\",\"T\",\"P\",\"E\",\"Z\",\"Y\"];\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(locale) {\n  var group = locale.grouping === undefined || locale.thousands === undefined ? _identity_js__WEBPACK_IMPORTED_MODULE_7__[\"default\"] : Object(_formatGroup_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(map.call(locale.grouping, Number), locale.thousands + \"\"),\n      currencyPrefix = locale.currency === undefined ? \"\" : locale.currency[0] + \"\",\n      currencySuffix = locale.currency === undefined ? \"\" : locale.currency[1] + \"\",\n      decimal = locale.decimal === undefined ? \".\" : locale.decimal + \"\",\n      numerals = locale.numerals === undefined ? _identity_js__WEBPACK_IMPORTED_MODULE_7__[\"default\"] : Object(_formatNumerals_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(map.call(locale.numerals, String)),\n      percent = locale.percent === undefined ? \"%\" : locale.percent + \"\",\n      minus = locale.minus === undefined ? \"−\" : locale.minus + \"\",\n      nan = locale.nan === undefined ? \"NaN\" : locale.nan + \"\";\n\n  function newFormat(specifier) {\n    specifier = Object(_formatSpecifier_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(specifier);\n\n    var fill = specifier.fill,\n        align = specifier.align,\n        sign = specifier.sign,\n        symbol = specifier.symbol,\n        zero = specifier.zero,\n        width = specifier.width,\n        comma = specifier.comma,\n        precision = specifier.precision,\n        trim = specifier.trim,\n        type = specifier.type;\n\n    // The \"n\" type is an alias for \",g\".\n    if (type === \"n\") comma = true, type = \"g\";\n\n    // The \"\" type, and any invalid type, is an alias for \".12~g\".\n    else if (!_formatTypes_js__WEBPACK_IMPORTED_MODULE_5__[\"default\"][type]) precision === undefined && (precision = 12), trim = true, type = \"g\";\n\n    // If zero fill is specified, padding goes after sign and before digits.\n    if (zero || (fill === \"0\" && align === \"=\")) zero = true, fill = \"0\", align = \"=\";\n\n    // Compute the prefix and suffix.\n    // For SI-prefix, the suffix is lazily computed.\n    var prefix = symbol === \"$\" ? currencyPrefix : symbol === \"#\" && /[boxX]/.test(type) ? \"0\" + type.toLowerCase() : \"\",\n        suffix = symbol === \"$\" ? currencySuffix : /[%p]/.test(type) ? percent : \"\";\n\n    // What format function should we use?\n    // Is this an integer type?\n    // Can this type generate exponential notation?\n    var formatType = _formatTypes_js__WEBPACK_IMPORTED_MODULE_5__[\"default\"][type],\n        maybeSuffix = /[defgprs%]/.test(type);\n\n    // Set the default precision if not specified,\n    // or clamp the specified precision to the supported range.\n    // For significant precision, it must be in [1, 21].\n    // For fixed precision, it must be in [0, 20].\n    precision = precision === undefined ? 6\n        : /[gprs]/.test(type) ? Math.max(1, Math.min(21, precision))\n        : Math.max(0, Math.min(20, precision));\n\n    function format(value) {\n      var valuePrefix = prefix,\n          valueSuffix = suffix,\n          i, n, c;\n\n      if (type === \"c\") {\n        valueSuffix = formatType(value) + valueSuffix;\n        value = \"\";\n      } else {\n        value = +value;\n\n        // Determine the sign. -0 is not less than 0, but 1 / -0 is!\n        var valueNegative = value < 0 || 1 / value < 0;\n\n        // Perform the initial formatting.\n        value = isNaN(value) ? nan : formatType(Math.abs(value), precision);\n\n        // Trim insignificant zeros.\n        if (trim) value = Object(_formatTrim_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(value);\n\n        // If a negative value rounds to zero after formatting, and no explicit positive sign is requested, hide the sign.\n        if (valueNegative && +value === 0 && sign !== \"+\") valueNegative = false;\n\n        // Compute the prefix and suffix.\n        valuePrefix = (valueNegative ? (sign === \"(\" ? sign : minus) : sign === \"-\" || sign === \"(\" ? \"\" : sign) + valuePrefix;\n        valueSuffix = (type === \"s\" ? prefixes[8 + _formatPrefixAuto_js__WEBPACK_IMPORTED_MODULE_6__[\"prefixExponent\"] / 3] : \"\") + valueSuffix + (valueNegative && sign === \"(\" ? \")\" : \"\");\n\n        // Break the formatted value into the integer “value” part that can be\n        // grouped, and fractional or exponential “suffix” part that is not.\n        if (maybeSuffix) {\n          i = -1, n = value.length;\n          while (++i < n) {\n            if (c = value.charCodeAt(i), 48 > c || c > 57) {\n              valueSuffix = (c === 46 ? decimal + value.slice(i + 1) : value.slice(i)) + valueSuffix;\n              value = value.slice(0, i);\n              break;\n            }\n          }\n        }\n      }\n\n      // If the fill character is not \"0\", grouping is applied before padding.\n      if (comma && !zero) value = group(value, Infinity);\n\n      // Compute the padding.\n      var length = valuePrefix.length + value.length + valueSuffix.length,\n          padding = length < width ? new Array(width - length + 1).join(fill) : \"\";\n\n      // If the fill character is \"0\", grouping is applied after padding.\n      if (comma && zero) value = group(padding + value, padding.length ? width - valueSuffix.length : Infinity), padding = \"\";\n\n      // Reconstruct the final output based on the desired alignment.\n      switch (align) {\n        case \"<\": value = valuePrefix + value + valueSuffix + padding; break;\n        case \"=\": value = valuePrefix + padding + value + valueSuffix; break;\n        case \"^\": value = padding.slice(0, length = padding.length >> 1) + valuePrefix + value + valueSuffix + padding.slice(length); break;\n        default: value = padding + valuePrefix + value + valueSuffix; break;\n      }\n\n      return numerals(value);\n    }\n\n    format.toString = function() {\n      return specifier + \"\";\n    };\n\n    return format;\n  }\n\n  function formatPrefix(specifier, value) {\n    var f = newFormat((specifier = Object(_formatSpecifier_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(specifier), specifier.type = \"f\", specifier)),\n        e = Math.max(-8, Math.min(8, Math.floor(Object(_exponent_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(value) / 3))) * 3,\n        k = Math.pow(10, -e),\n        prefix = prefixes[8 + e / 3];\n    return function(value) {\n      return f(k * value) + prefix;\n    };\n  }\n\n  return {\n    format: newFormat,\n    formatPrefix: formatPrefix\n  };\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale/node_modules/d3-format/src/precisionFixed.js\":\n/*!****************************************************************************!*\\\n  !*** ./node_modules/d3-scale/node_modules/d3-format/src/precisionFixed.js ***!\n  \\****************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _exponent_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./exponent.js */ \"./node_modules/d3-scale/node_modules/d3-format/src/exponent.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(step) {\n  return Math.max(0, -Object(_exponent_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(Math.abs(step)));\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale/node_modules/d3-format/src/precisionPrefix.js\":\n/*!*****************************************************************************!*\\\n  !*** ./node_modules/d3-scale/node_modules/d3-format/src/precisionPrefix.js ***!\n  \\*****************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _exponent_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./exponent.js */ \"./node_modules/d3-scale/node_modules/d3-format/src/exponent.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(step, value) {\n  return Math.max(0, Math.max(-8, Math.min(8, Math.floor(Object(_exponent_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(value) / 3))) * 3 - Object(_exponent_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(Math.abs(step)));\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale/node_modules/d3-format/src/precisionRound.js\":\n/*!****************************************************************************!*\\\n  !*** ./node_modules/d3-scale/node_modules/d3-format/src/precisionRound.js ***!\n  \\****************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _exponent_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./exponent.js */ \"./node_modules/d3-scale/node_modules/d3-format/src/exponent.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(step, max) {\n  step = Math.abs(step), max = Math.abs(max) - step;\n  return Math.max(0, Object(_exponent_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(max) - Object(_exponent_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(step)) + 1;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale/node_modules/d3-interpolate/src/array.js\":\n/*!************************************************************************!*\\\n  !*** ./node_modules/d3-scale/node_modules/d3-interpolate/src/array.js ***!\n  \\************************************************************************/\n/*! exports provided: default, genericArray */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"genericArray\", function() { return genericArray; });\n/* harmony import */ var _value_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./value.js */ \"./node_modules/d3-scale/node_modules/d3-interpolate/src/value.js\");\n/* harmony import */ var _numberArray_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./numberArray.js */ \"./node_modules/d3-scale/node_modules/d3-interpolate/src/numberArray.js\");\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(a, b) {\n  return (Object(_numberArray_js__WEBPACK_IMPORTED_MODULE_1__[\"isNumberArray\"])(b) ? _numberArray_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"] : genericArray)(a, b);\n});\n\nfunction genericArray(a, b) {\n  var nb = b ? b.length : 0,\n      na = a ? Math.min(nb, a.length) : 0,\n      x = new Array(na),\n      c = new Array(nb),\n      i;\n\n  for (i = 0; i < na; ++i) x[i] = Object(_value_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(a[i], b[i]);\n  for (; i < nb; ++i) c[i] = b[i];\n\n  return function(t) {\n    for (i = 0; i < na; ++i) c[i] = x[i](t);\n    return c;\n  };\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale/node_modules/d3-interpolate/src/basis.js\":\n/*!************************************************************************!*\\\n  !*** ./node_modules/d3-scale/node_modules/d3-interpolate/src/basis.js ***!\n  \\************************************************************************/\n/*! exports provided: basis, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"basis\", function() { return basis; });\nfunction basis(t1, v0, v1, v2, v3) {\n  var t2 = t1 * t1, t3 = t2 * t1;\n  return ((1 - 3 * t1 + 3 * t2 - t3) * v0\n      + (4 - 6 * t2 + 3 * t3) * v1\n      + (1 + 3 * t1 + 3 * t2 - 3 * t3) * v2\n      + t3 * v3) / 6;\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(values) {\n  var n = values.length - 1;\n  return function(t) {\n    var i = t <= 0 ? (t = 0) : t >= 1 ? (t = 1, n - 1) : Math.floor(t * n),\n        v1 = values[i],\n        v2 = values[i + 1],\n        v0 = i > 0 ? values[i - 1] : 2 * v1 - v2,\n        v3 = i < n - 1 ? values[i + 2] : 2 * v2 - v1;\n    return basis((t - i / n) * n, v0, v1, v2, v3);\n  };\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale/node_modules/d3-interpolate/src/basisClosed.js\":\n/*!******************************************************************************!*\\\n  !*** ./node_modules/d3-scale/node_modules/d3-interpolate/src/basisClosed.js ***!\n  \\******************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _basis_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./basis.js */ \"./node_modules/d3-scale/node_modules/d3-interpolate/src/basis.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(values) {\n  var n = values.length;\n  return function(t) {\n    var i = Math.floor(((t %= 1) < 0 ? ++t : t) * n),\n        v0 = values[(i + n - 1) % n],\n        v1 = values[i % n],\n        v2 = values[(i + 1) % n],\n        v3 = values[(i + 2) % n];\n    return Object(_basis_js__WEBPACK_IMPORTED_MODULE_0__[\"basis\"])((t - i / n) * n, v0, v1, v2, v3);\n  };\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale/node_modules/d3-interpolate/src/color.js\":\n/*!************************************************************************!*\\\n  !*** ./node_modules/d3-scale/node_modules/d3-interpolate/src/color.js ***!\n  \\************************************************************************/\n/*! exports provided: hue, gamma, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"hue\", function() { return hue; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"gamma\", function() { return gamma; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return nogamma; });\n/* harmony import */ var _constant_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./constant.js */ \"./node_modules/d3-scale/node_modules/d3-interpolate/src/constant.js\");\n\n\nfunction linear(a, d) {\n  return function(t) {\n    return a + t * d;\n  };\n}\n\nfunction exponential(a, b, y) {\n  return a = Math.pow(a, y), b = Math.pow(b, y) - a, y = 1 / y, function(t) {\n    return Math.pow(a + t * b, y);\n  };\n}\n\nfunction hue(a, b) {\n  var d = b - a;\n  return d ? linear(a, d > 180 || d < -180 ? d - 360 * Math.round(d / 360) : d) : Object(_constant_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(isNaN(a) ? b : a);\n}\n\nfunction gamma(y) {\n  return (y = +y) === 1 ? nogamma : function(a, b) {\n    return b - a ? exponential(a, b, y) : Object(_constant_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(isNaN(a) ? b : a);\n  };\n}\n\nfunction nogamma(a, b) {\n  var d = b - a;\n  return d ? linear(a, d) : Object(_constant_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(isNaN(a) ? b : a);\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale/node_modules/d3-interpolate/src/constant.js\":\n/*!***************************************************************************!*\\\n  !*** ./node_modules/d3-scale/node_modules/d3-interpolate/src/constant.js ***!\n  \\***************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (x => () => x);\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale/node_modules/d3-interpolate/src/cubehelix.js\":\n/*!****************************************************************************!*\\\n  !*** ./node_modules/d3-scale/node_modules/d3-interpolate/src/cubehelix.js ***!\n  \\****************************************************************************/\n/*! exports provided: default, cubehelixLong */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"cubehelixLong\", function() { return cubehelixLong; });\n/* harmony import */ var d3_color__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-color */ \"./node_modules/d3-scale/node_modules/d3-color/src/index.js\");\n/* harmony import */ var _color_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./color.js */ \"./node_modules/d3-scale/node_modules/d3-interpolate/src/color.js\");\n\n\n\nfunction cubehelix(hue) {\n  return (function cubehelixGamma(y) {\n    y = +y;\n\n    function cubehelix(start, end) {\n      var h = hue((start = Object(d3_color__WEBPACK_IMPORTED_MODULE_0__[\"cubehelix\"])(start)).h, (end = Object(d3_color__WEBPACK_IMPORTED_MODULE_0__[\"cubehelix\"])(end)).h),\n          s = Object(_color_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(start.s, end.s),\n          l = Object(_color_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(start.l, end.l),\n          opacity = Object(_color_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(start.opacity, end.opacity);\n      return function(t) {\n        start.h = h(t);\n        start.s = s(t);\n        start.l = l(Math.pow(t, y));\n        start.opacity = opacity(t);\n        return start + \"\";\n      };\n    }\n\n    cubehelix.gamma = cubehelixGamma;\n\n    return cubehelix;\n  })(1);\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (cubehelix(_color_js__WEBPACK_IMPORTED_MODULE_1__[\"hue\"]));\nvar cubehelixLong = cubehelix(_color_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"]);\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale/node_modules/d3-interpolate/src/date.js\":\n/*!***********************************************************************!*\\\n  !*** ./node_modules/d3-scale/node_modules/d3-interpolate/src/date.js ***!\n  \\***********************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(a, b) {\n  var d = new Date;\n  return a = +a, b = +b, function(t) {\n    return d.setTime(a * (1 - t) + b * t), d;\n  };\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale/node_modules/d3-interpolate/src/discrete.js\":\n/*!***************************************************************************!*\\\n  !*** ./node_modules/d3-scale/node_modules/d3-interpolate/src/discrete.js ***!\n  \\***************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(range) {\n  var n = range.length;\n  return function(t) {\n    return range[Math.max(0, Math.min(n - 1, Math.floor(t * n)))];\n  };\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale/node_modules/d3-interpolate/src/hcl.js\":\n/*!**********************************************************************!*\\\n  !*** ./node_modules/d3-scale/node_modules/d3-interpolate/src/hcl.js ***!\n  \\**********************************************************************/\n/*! exports provided: default, hclLong */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"hclLong\", function() { return hclLong; });\n/* harmony import */ var d3_color__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-color */ \"./node_modules/d3-scale/node_modules/d3-color/src/index.js\");\n/* harmony import */ var _color_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./color.js */ \"./node_modules/d3-scale/node_modules/d3-interpolate/src/color.js\");\n\n\n\nfunction hcl(hue) {\n  return function(start, end) {\n    var h = hue((start = Object(d3_color__WEBPACK_IMPORTED_MODULE_0__[\"hcl\"])(start)).h, (end = Object(d3_color__WEBPACK_IMPORTED_MODULE_0__[\"hcl\"])(end)).h),\n        c = Object(_color_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(start.c, end.c),\n        l = Object(_color_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(start.l, end.l),\n        opacity = Object(_color_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(start.opacity, end.opacity);\n    return function(t) {\n      start.h = h(t);\n      start.c = c(t);\n      start.l = l(t);\n      start.opacity = opacity(t);\n      return start + \"\";\n    };\n  }\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (hcl(_color_js__WEBPACK_IMPORTED_MODULE_1__[\"hue\"]));\nvar hclLong = hcl(_color_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"]);\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale/node_modules/d3-interpolate/src/hsl.js\":\n/*!**********************************************************************!*\\\n  !*** ./node_modules/d3-scale/node_modules/d3-interpolate/src/hsl.js ***!\n  \\**********************************************************************/\n/*! exports provided: default, hslLong */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"hslLong\", function() { return hslLong; });\n/* harmony import */ var d3_color__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-color */ \"./node_modules/d3-scale/node_modules/d3-color/src/index.js\");\n/* harmony import */ var _color_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./color.js */ \"./node_modules/d3-scale/node_modules/d3-interpolate/src/color.js\");\n\n\n\nfunction hsl(hue) {\n  return function(start, end) {\n    var h = hue((start = Object(d3_color__WEBPACK_IMPORTED_MODULE_0__[\"hsl\"])(start)).h, (end = Object(d3_color__WEBPACK_IMPORTED_MODULE_0__[\"hsl\"])(end)).h),\n        s = Object(_color_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(start.s, end.s),\n        l = Object(_color_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(start.l, end.l),\n        opacity = Object(_color_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(start.opacity, end.opacity);\n    return function(t) {\n      start.h = h(t);\n      start.s = s(t);\n      start.l = l(t);\n      start.opacity = opacity(t);\n      return start + \"\";\n    };\n  }\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (hsl(_color_js__WEBPACK_IMPORTED_MODULE_1__[\"hue\"]));\nvar hslLong = hsl(_color_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"]);\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale/node_modules/d3-interpolate/src/hue.js\":\n/*!**********************************************************************!*\\\n  !*** ./node_modules/d3-scale/node_modules/d3-interpolate/src/hue.js ***!\n  \\**********************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _color_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./color.js */ \"./node_modules/d3-scale/node_modules/d3-interpolate/src/color.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(a, b) {\n  var i = Object(_color_js__WEBPACK_IMPORTED_MODULE_0__[\"hue\"])(+a, +b);\n  return function(t) {\n    var x = i(t);\n    return x - 360 * Math.floor(x / 360);\n  };\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale/node_modules/d3-interpolate/src/index.js\":\n/*!************************************************************************!*\\\n  !*** ./node_modules/d3-scale/node_modules/d3-interpolate/src/index.js ***!\n  \\************************************************************************/\n/*! exports provided: interpolate, interpolateArray, interpolateBasis, interpolateBasisClosed, interpolateDate, interpolateDiscrete, interpolateHue, interpolateNumber, interpolateNumberArray, interpolateObject, interpolateRound, interpolateString, interpolateTransformCss, interpolateTransformSvg, interpolateZoom, interpolateRgb, interpolateRgbBasis, interpolateRgbBasisClosed, interpolateHsl, interpolateHslLong, interpolateLab, interpolateHcl, interpolateHclLong, interpolateCubehelix, interpolateCubehelixLong, piecewise, quantize */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _value_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./value.js */ \"./node_modules/d3-scale/node_modules/d3-interpolate/src/value.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolate\", function() { return _value_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n/* harmony import */ var _array_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./array.js */ \"./node_modules/d3-scale/node_modules/d3-interpolate/src/array.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateArray\", function() { return _array_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"]; });\n\n/* harmony import */ var _basis_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./basis.js */ \"./node_modules/d3-scale/node_modules/d3-interpolate/src/basis.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateBasis\", function() { return _basis_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"]; });\n\n/* harmony import */ var _basisClosed_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./basisClosed.js */ \"./node_modules/d3-scale/node_modules/d3-interpolate/src/basisClosed.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateBasisClosed\", function() { return _basisClosed_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"]; });\n\n/* harmony import */ var _date_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./date.js */ \"./node_modules/d3-scale/node_modules/d3-interpolate/src/date.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateDate\", function() { return _date_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"]; });\n\n/* harmony import */ var _discrete_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./discrete.js */ \"./node_modules/d3-scale/node_modules/d3-interpolate/src/discrete.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateDiscrete\", function() { return _discrete_js__WEBPACK_IMPORTED_MODULE_5__[\"default\"]; });\n\n/* harmony import */ var _hue_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./hue.js */ \"./node_modules/d3-scale/node_modules/d3-interpolate/src/hue.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateHue\", function() { return _hue_js__WEBPACK_IMPORTED_MODULE_6__[\"default\"]; });\n\n/* harmony import */ var _number_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./number.js */ \"./node_modules/d3-scale/node_modules/d3-interpolate/src/number.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateNumber\", function() { return _number_js__WEBPACK_IMPORTED_MODULE_7__[\"default\"]; });\n\n/* harmony import */ var _numberArray_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./numberArray.js */ \"./node_modules/d3-scale/node_modules/d3-interpolate/src/numberArray.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateNumberArray\", function() { return _numberArray_js__WEBPACK_IMPORTED_MODULE_8__[\"default\"]; });\n\n/* harmony import */ var _object_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./object.js */ \"./node_modules/d3-scale/node_modules/d3-interpolate/src/object.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateObject\", function() { return _object_js__WEBPACK_IMPORTED_MODULE_9__[\"default\"]; });\n\n/* harmony import */ var _round_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./round.js */ \"./node_modules/d3-scale/node_modules/d3-interpolate/src/round.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateRound\", function() { return _round_js__WEBPACK_IMPORTED_MODULE_10__[\"default\"]; });\n\n/* harmony import */ var _string_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./string.js */ \"./node_modules/d3-scale/node_modules/d3-interpolate/src/string.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateString\", function() { return _string_js__WEBPACK_IMPORTED_MODULE_11__[\"default\"]; });\n\n/* harmony import */ var _transform_index_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./transform/index.js */ \"./node_modules/d3-scale/node_modules/d3-interpolate/src/transform/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateTransformCss\", function() { return _transform_index_js__WEBPACK_IMPORTED_MODULE_12__[\"interpolateTransformCss\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateTransformSvg\", function() { return _transform_index_js__WEBPACK_IMPORTED_MODULE_12__[\"interpolateTransformSvg\"]; });\n\n/* harmony import */ var _zoom_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./zoom.js */ \"./node_modules/d3-scale/node_modules/d3-interpolate/src/zoom.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateZoom\", function() { return _zoom_js__WEBPACK_IMPORTED_MODULE_13__[\"default\"]; });\n\n/* harmony import */ var _rgb_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./rgb.js */ \"./node_modules/d3-scale/node_modules/d3-interpolate/src/rgb.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateRgb\", function() { return _rgb_js__WEBPACK_IMPORTED_MODULE_14__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateRgbBasis\", function() { return _rgb_js__WEBPACK_IMPORTED_MODULE_14__[\"rgbBasis\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateRgbBasisClosed\", function() { return _rgb_js__WEBPACK_IMPORTED_MODULE_14__[\"rgbBasisClosed\"]; });\n\n/* harmony import */ var _hsl_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./hsl.js */ \"./node_modules/d3-scale/node_modules/d3-interpolate/src/hsl.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateHsl\", function() { return _hsl_js__WEBPACK_IMPORTED_MODULE_15__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateHslLong\", function() { return _hsl_js__WEBPACK_IMPORTED_MODULE_15__[\"hslLong\"]; });\n\n/* harmony import */ var _lab_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./lab.js */ \"./node_modules/d3-scale/node_modules/d3-interpolate/src/lab.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateLab\", function() { return _lab_js__WEBPACK_IMPORTED_MODULE_16__[\"default\"]; });\n\n/* harmony import */ var _hcl_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./hcl.js */ \"./node_modules/d3-scale/node_modules/d3-interpolate/src/hcl.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateHcl\", function() { return _hcl_js__WEBPACK_IMPORTED_MODULE_17__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateHclLong\", function() { return _hcl_js__WEBPACK_IMPORTED_MODULE_17__[\"hclLong\"]; });\n\n/* harmony import */ var _cubehelix_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./cubehelix.js */ \"./node_modules/d3-scale/node_modules/d3-interpolate/src/cubehelix.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateCubehelix\", function() { return _cubehelix_js__WEBPACK_IMPORTED_MODULE_18__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateCubehelixLong\", function() { return _cubehelix_js__WEBPACK_IMPORTED_MODULE_18__[\"cubehelixLong\"]; });\n\n/* harmony import */ var _piecewise_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./piecewise.js */ \"./node_modules/d3-scale/node_modules/d3-interpolate/src/piecewise.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"piecewise\", function() { return _piecewise_js__WEBPACK_IMPORTED_MODULE_19__[\"default\"]; });\n\n/* harmony import */ var _quantize_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./quantize.js */ \"./node_modules/d3-scale/node_modules/d3-interpolate/src/quantize.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"quantize\", function() { return _quantize_js__WEBPACK_IMPORTED_MODULE_20__[\"default\"]; });\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale/node_modules/d3-interpolate/src/lab.js\":\n/*!**********************************************************************!*\\\n  !*** ./node_modules/d3-scale/node_modules/d3-interpolate/src/lab.js ***!\n  \\**********************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return lab; });\n/* harmony import */ var d3_color__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-color */ \"./node_modules/d3-scale/node_modules/d3-color/src/index.js\");\n/* harmony import */ var _color_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./color.js */ \"./node_modules/d3-scale/node_modules/d3-interpolate/src/color.js\");\n\n\n\nfunction lab(start, end) {\n  var l = Object(_color_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])((start = Object(d3_color__WEBPACK_IMPORTED_MODULE_0__[\"lab\"])(start)).l, (end = Object(d3_color__WEBPACK_IMPORTED_MODULE_0__[\"lab\"])(end)).l),\n      a = Object(_color_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(start.a, end.a),\n      b = Object(_color_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(start.b, end.b),\n      opacity = Object(_color_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(start.opacity, end.opacity);\n  return function(t) {\n    start.l = l(t);\n    start.a = a(t);\n    start.b = b(t);\n    start.opacity = opacity(t);\n    return start + \"\";\n  };\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale/node_modules/d3-interpolate/src/number.js\":\n/*!*************************************************************************!*\\\n  !*** ./node_modules/d3-scale/node_modules/d3-interpolate/src/number.js ***!\n  \\*************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(a, b) {\n  return a = +a, b = +b, function(t) {\n    return a * (1 - t) + b * t;\n  };\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale/node_modules/d3-interpolate/src/numberArray.js\":\n/*!******************************************************************************!*\\\n  !*** ./node_modules/d3-scale/node_modules/d3-interpolate/src/numberArray.js ***!\n  \\******************************************************************************/\n/*! exports provided: default, isNumberArray */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"isNumberArray\", function() { return isNumberArray; });\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(a, b) {\n  if (!b) b = [];\n  var n = a ? Math.min(b.length, a.length) : 0,\n      c = b.slice(),\n      i;\n  return function(t) {\n    for (i = 0; i < n; ++i) c[i] = a[i] * (1 - t) + b[i] * t;\n    return c;\n  };\n});\n\nfunction isNumberArray(x) {\n  return ArrayBuffer.isView(x) && !(x instanceof DataView);\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale/node_modules/d3-interpolate/src/object.js\":\n/*!*************************************************************************!*\\\n  !*** ./node_modules/d3-scale/node_modules/d3-interpolate/src/object.js ***!\n  \\*************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _value_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./value.js */ \"./node_modules/d3-scale/node_modules/d3-interpolate/src/value.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(a, b) {\n  var i = {},\n      c = {},\n      k;\n\n  if (a === null || typeof a !== \"object\") a = {};\n  if (b === null || typeof b !== \"object\") b = {};\n\n  for (k in b) {\n    if (k in a) {\n      i[k] = Object(_value_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(a[k], b[k]);\n    } else {\n      c[k] = b[k];\n    }\n  }\n\n  return function(t) {\n    for (k in i) c[k] = i[k](t);\n    return c;\n  };\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale/node_modules/d3-interpolate/src/piecewise.js\":\n/*!****************************************************************************!*\\\n  !*** ./node_modules/d3-scale/node_modules/d3-interpolate/src/piecewise.js ***!\n  \\****************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return piecewise; });\n/* harmony import */ var _value_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./value.js */ \"./node_modules/d3-scale/node_modules/d3-interpolate/src/value.js\");\n\n\nfunction piecewise(interpolate, values) {\n  if (values === undefined) values = interpolate, interpolate = _value_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"];\n  var i = 0, n = values.length - 1, v = values[0], I = new Array(n < 0 ? 0 : n);\n  while (i < n) I[i] = interpolate(v, v = values[++i]);\n  return function(t) {\n    var i = Math.max(0, Math.min(n - 1, Math.floor(t *= n)));\n    return I[i](t - i);\n  };\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale/node_modules/d3-interpolate/src/quantize.js\":\n/*!***************************************************************************!*\\\n  !*** ./node_modules/d3-scale/node_modules/d3-interpolate/src/quantize.js ***!\n  \\***************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(interpolator, n) {\n  var samples = new Array(n);\n  for (var i = 0; i < n; ++i) samples[i] = interpolator(i / (n - 1));\n  return samples;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale/node_modules/d3-interpolate/src/rgb.js\":\n/*!**********************************************************************!*\\\n  !*** ./node_modules/d3-scale/node_modules/d3-interpolate/src/rgb.js ***!\n  \\**********************************************************************/\n/*! exports provided: default, rgbBasis, rgbBasisClosed */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"rgbBasis\", function() { return rgbBasis; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"rgbBasisClosed\", function() { return rgbBasisClosed; });\n/* harmony import */ var d3_color__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-color */ \"./node_modules/d3-scale/node_modules/d3-color/src/index.js\");\n/* harmony import */ var _basis_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./basis.js */ \"./node_modules/d3-scale/node_modules/d3-interpolate/src/basis.js\");\n/* harmony import */ var _basisClosed_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./basisClosed.js */ \"./node_modules/d3-scale/node_modules/d3-interpolate/src/basisClosed.js\");\n/* harmony import */ var _color_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./color.js */ \"./node_modules/d3-scale/node_modules/d3-interpolate/src/color.js\");\n\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ((function rgbGamma(y) {\n  var color = Object(_color_js__WEBPACK_IMPORTED_MODULE_3__[\"gamma\"])(y);\n\n  function rgb(start, end) {\n    var r = color((start = Object(d3_color__WEBPACK_IMPORTED_MODULE_0__[\"rgb\"])(start)).r, (end = Object(d3_color__WEBPACK_IMPORTED_MODULE_0__[\"rgb\"])(end)).r),\n        g = color(start.g, end.g),\n        b = color(start.b, end.b),\n        opacity = Object(_color_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(start.opacity, end.opacity);\n    return function(t) {\n      start.r = r(t);\n      start.g = g(t);\n      start.b = b(t);\n      start.opacity = opacity(t);\n      return start + \"\";\n    };\n  }\n\n  rgb.gamma = rgbGamma;\n\n  return rgb;\n})(1));\n\nfunction rgbSpline(spline) {\n  return function(colors) {\n    var n = colors.length,\n        r = new Array(n),\n        g = new Array(n),\n        b = new Array(n),\n        i, color;\n    for (i = 0; i < n; ++i) {\n      color = Object(d3_color__WEBPACK_IMPORTED_MODULE_0__[\"rgb\"])(colors[i]);\n      r[i] = color.r || 0;\n      g[i] = color.g || 0;\n      b[i] = color.b || 0;\n    }\n    r = spline(r);\n    g = spline(g);\n    b = spline(b);\n    color.opacity = 1;\n    return function(t) {\n      color.r = r(t);\n      color.g = g(t);\n      color.b = b(t);\n      return color + \"\";\n    };\n  };\n}\n\nvar rgbBasis = rgbSpline(_basis_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"]);\nvar rgbBasisClosed = rgbSpline(_basisClosed_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"]);\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale/node_modules/d3-interpolate/src/round.js\":\n/*!************************************************************************!*\\\n  !*** ./node_modules/d3-scale/node_modules/d3-interpolate/src/round.js ***!\n  \\************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(a, b) {\n  return a = +a, b = +b, function(t) {\n    return Math.round(a * (1 - t) + b * t);\n  };\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale/node_modules/d3-interpolate/src/string.js\":\n/*!*************************************************************************!*\\\n  !*** ./node_modules/d3-scale/node_modules/d3-interpolate/src/string.js ***!\n  \\*************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _number_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./number.js */ \"./node_modules/d3-scale/node_modules/d3-interpolate/src/number.js\");\n\n\nvar reA = /[-+]?(?:\\d+\\.?\\d*|\\.?\\d+)(?:[eE][-+]?\\d+)?/g,\n    reB = new RegExp(reA.source, \"g\");\n\nfunction zero(b) {\n  return function() {\n    return b;\n  };\n}\n\nfunction one(b) {\n  return function(t) {\n    return b(t) + \"\";\n  };\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(a, b) {\n  var bi = reA.lastIndex = reB.lastIndex = 0, // scan index for next number in b\n      am, // current match in a\n      bm, // current match in b\n      bs, // string preceding current number in b, if any\n      i = -1, // index in s\n      s = [], // string constants and placeholders\n      q = []; // number interpolators\n\n  // Coerce inputs to strings.\n  a = a + \"\", b = b + \"\";\n\n  // Interpolate pairs of numbers in a & b.\n  while ((am = reA.exec(a))\n      && (bm = reB.exec(b))) {\n    if ((bs = bm.index) > bi) { // a string precedes the next number in b\n      bs = b.slice(bi, bs);\n      if (s[i]) s[i] += bs; // coalesce with previous string\n      else s[++i] = bs;\n    }\n    if ((am = am[0]) === (bm = bm[0])) { // numbers in a & b match\n      if (s[i]) s[i] += bm; // coalesce with previous string\n      else s[++i] = bm;\n    } else { // interpolate non-matching numbers\n      s[++i] = null;\n      q.push({i: i, x: Object(_number_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(am, bm)});\n    }\n    bi = reB.lastIndex;\n  }\n\n  // Add remains of b.\n  if (bi < b.length) {\n    bs = b.slice(bi);\n    if (s[i]) s[i] += bs; // coalesce with previous string\n    else s[++i] = bs;\n  }\n\n  // Special optimization for only a single match.\n  // Otherwise, interpolate each of the numbers and rejoin the string.\n  return s.length < 2 ? (q[0]\n      ? one(q[0].x)\n      : zero(b))\n      : (b = q.length, function(t) {\n          for (var i = 0, o; i < b; ++i) s[(o = q[i]).i] = o.x(t);\n          return s.join(\"\");\n        });\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale/node_modules/d3-interpolate/src/transform/decompose.js\":\n/*!**************************************************************************************!*\\\n  !*** ./node_modules/d3-scale/node_modules/d3-interpolate/src/transform/decompose.js ***!\n  \\**************************************************************************************/\n/*! exports provided: identity, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"identity\", function() { return identity; });\nvar degrees = 180 / Math.PI;\n\nvar identity = {\n  translateX: 0,\n  translateY: 0,\n  rotate: 0,\n  skewX: 0,\n  scaleX: 1,\n  scaleY: 1\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(a, b, c, d, e, f) {\n  var scaleX, scaleY, skewX;\n  if (scaleX = Math.sqrt(a * a + b * b)) a /= scaleX, b /= scaleX;\n  if (skewX = a * c + b * d) c -= a * skewX, d -= b * skewX;\n  if (scaleY = Math.sqrt(c * c + d * d)) c /= scaleY, d /= scaleY, skewX /= scaleY;\n  if (a * d < b * c) a = -a, b = -b, skewX = -skewX, scaleX = -scaleX;\n  return {\n    translateX: e,\n    translateY: f,\n    rotate: Math.atan2(b, a) * degrees,\n    skewX: Math.atan(skewX) * degrees,\n    scaleX: scaleX,\n    scaleY: scaleY\n  };\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale/node_modules/d3-interpolate/src/transform/index.js\":\n/*!**********************************************************************************!*\\\n  !*** ./node_modules/d3-scale/node_modules/d3-interpolate/src/transform/index.js ***!\n  \\**********************************************************************************/\n/*! exports provided: interpolateTransformCss, interpolateTransformSvg */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"interpolateTransformCss\", function() { return interpolateTransformCss; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"interpolateTransformSvg\", function() { return interpolateTransformSvg; });\n/* harmony import */ var _number_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../number.js */ \"./node_modules/d3-scale/node_modules/d3-interpolate/src/number.js\");\n/* harmony import */ var _parse_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./parse.js */ \"./node_modules/d3-scale/node_modules/d3-interpolate/src/transform/parse.js\");\n\n\n\nfunction interpolateTransform(parse, pxComma, pxParen, degParen) {\n\n  function pop(s) {\n    return s.length ? s.pop() + \" \" : \"\";\n  }\n\n  function translate(xa, ya, xb, yb, s, q) {\n    if (xa !== xb || ya !== yb) {\n      var i = s.push(\"translate(\", null, pxComma, null, pxParen);\n      q.push({i: i - 4, x: Object(_number_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(xa, xb)}, {i: i - 2, x: Object(_number_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(ya, yb)});\n    } else if (xb || yb) {\n      s.push(\"translate(\" + xb + pxComma + yb + pxParen);\n    }\n  }\n\n  function rotate(a, b, s, q) {\n    if (a !== b) {\n      if (a - b > 180) b += 360; else if (b - a > 180) a += 360; // shortest path\n      q.push({i: s.push(pop(s) + \"rotate(\", null, degParen) - 2, x: Object(_number_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(a, b)});\n    } else if (b) {\n      s.push(pop(s) + \"rotate(\" + b + degParen);\n    }\n  }\n\n  function skewX(a, b, s, q) {\n    if (a !== b) {\n      q.push({i: s.push(pop(s) + \"skewX(\", null, degParen) - 2, x: Object(_number_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(a, b)});\n    } else if (b) {\n      s.push(pop(s) + \"skewX(\" + b + degParen);\n    }\n  }\n\n  function scale(xa, ya, xb, yb, s, q) {\n    if (xa !== xb || ya !== yb) {\n      var i = s.push(pop(s) + \"scale(\", null, \",\", null, \")\");\n      q.push({i: i - 4, x: Object(_number_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(xa, xb)}, {i: i - 2, x: Object(_number_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(ya, yb)});\n    } else if (xb !== 1 || yb !== 1) {\n      s.push(pop(s) + \"scale(\" + xb + \",\" + yb + \")\");\n    }\n  }\n\n  return function(a, b) {\n    var s = [], // string constants and placeholders\n        q = []; // number interpolators\n    a = parse(a), b = parse(b);\n    translate(a.translateX, a.translateY, b.translateX, b.translateY, s, q);\n    rotate(a.rotate, b.rotate, s, q);\n    skewX(a.skewX, b.skewX, s, q);\n    scale(a.scaleX, a.scaleY, b.scaleX, b.scaleY, s, q);\n    a = b = null; // gc\n    return function(t) {\n      var i = -1, n = q.length, o;\n      while (++i < n) s[(o = q[i]).i] = o.x(t);\n      return s.join(\"\");\n    };\n  };\n}\n\nvar interpolateTransformCss = interpolateTransform(_parse_js__WEBPACK_IMPORTED_MODULE_1__[\"parseCss\"], \"px, \", \"px)\", \"deg)\");\nvar interpolateTransformSvg = interpolateTransform(_parse_js__WEBPACK_IMPORTED_MODULE_1__[\"parseSvg\"], \", \", \")\", \")\");\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale/node_modules/d3-interpolate/src/transform/parse.js\":\n/*!**********************************************************************************!*\\\n  !*** ./node_modules/d3-scale/node_modules/d3-interpolate/src/transform/parse.js ***!\n  \\**********************************************************************************/\n/*! exports provided: parseCss, parseSvg */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"parseCss\", function() { return parseCss; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"parseSvg\", function() { return parseSvg; });\n/* harmony import */ var _decompose_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./decompose.js */ \"./node_modules/d3-scale/node_modules/d3-interpolate/src/transform/decompose.js\");\n\n\nvar svgNode;\n\n/* eslint-disable no-undef */\nfunction parseCss(value) {\n  const m = new (typeof DOMMatrix === \"function\" ? DOMMatrix : WebKitCSSMatrix)(value + \"\");\n  return m.isIdentity ? _decompose_js__WEBPACK_IMPORTED_MODULE_0__[\"identity\"] : Object(_decompose_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(m.a, m.b, m.c, m.d, m.e, m.f);\n}\n\nfunction parseSvg(value) {\n  if (value == null) return _decompose_js__WEBPACK_IMPORTED_MODULE_0__[\"identity\"];\n  if (!svgNode) svgNode = document.createElementNS(\"http://www.w3.org/2000/svg\", \"g\");\n  svgNode.setAttribute(\"transform\", value);\n  if (!(value = svgNode.transform.baseVal.consolidate())) return _decompose_js__WEBPACK_IMPORTED_MODULE_0__[\"identity\"];\n  value = value.matrix;\n  return Object(_decompose_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(value.a, value.b, value.c, value.d, value.e, value.f);\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale/node_modules/d3-interpolate/src/value.js\":\n/*!************************************************************************!*\\\n  !*** ./node_modules/d3-scale/node_modules/d3-interpolate/src/value.js ***!\n  \\************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var d3_color__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-color */ \"./node_modules/d3-scale/node_modules/d3-color/src/index.js\");\n/* harmony import */ var _rgb_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./rgb.js */ \"./node_modules/d3-scale/node_modules/d3-interpolate/src/rgb.js\");\n/* harmony import */ var _array_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./array.js */ \"./node_modules/d3-scale/node_modules/d3-interpolate/src/array.js\");\n/* harmony import */ var _date_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./date.js */ \"./node_modules/d3-scale/node_modules/d3-interpolate/src/date.js\");\n/* harmony import */ var _number_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./number.js */ \"./node_modules/d3-scale/node_modules/d3-interpolate/src/number.js\");\n/* harmony import */ var _object_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./object.js */ \"./node_modules/d3-scale/node_modules/d3-interpolate/src/object.js\");\n/* harmony import */ var _string_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./string.js */ \"./node_modules/d3-scale/node_modules/d3-interpolate/src/string.js\");\n/* harmony import */ var _constant_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./constant.js */ \"./node_modules/d3-scale/node_modules/d3-interpolate/src/constant.js\");\n/* harmony import */ var _numberArray_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./numberArray.js */ \"./node_modules/d3-scale/node_modules/d3-interpolate/src/numberArray.js\");\n\n\n\n\n\n\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(a, b) {\n  var t = typeof b, c;\n  return b == null || t === \"boolean\" ? Object(_constant_js__WEBPACK_IMPORTED_MODULE_7__[\"default\"])(b)\n      : (t === \"number\" ? _number_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"]\n      : t === \"string\" ? ((c = Object(d3_color__WEBPACK_IMPORTED_MODULE_0__[\"color\"])(b)) ? (b = c, _rgb_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"]) : _string_js__WEBPACK_IMPORTED_MODULE_6__[\"default\"])\n      : b instanceof d3_color__WEBPACK_IMPORTED_MODULE_0__[\"color\"] ? _rgb_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"]\n      : b instanceof Date ? _date_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"]\n      : Object(_numberArray_js__WEBPACK_IMPORTED_MODULE_8__[\"isNumberArray\"])(b) ? _numberArray_js__WEBPACK_IMPORTED_MODULE_8__[\"default\"]\n      : Array.isArray(b) ? _array_js__WEBPACK_IMPORTED_MODULE_2__[\"genericArray\"]\n      : typeof b.valueOf !== \"function\" && typeof b.toString !== \"function\" || isNaN(b) ? _object_js__WEBPACK_IMPORTED_MODULE_5__[\"default\"]\n      : _number_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(a, b);\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale/node_modules/d3-interpolate/src/zoom.js\":\n/*!***********************************************************************!*\\\n  !*** ./node_modules/d3-scale/node_modules/d3-interpolate/src/zoom.js ***!\n  \\***********************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\nvar epsilon2 = 1e-12;\n\nfunction cosh(x) {\n  return ((x = Math.exp(x)) + 1 / x) / 2;\n}\n\nfunction sinh(x) {\n  return ((x = Math.exp(x)) - 1 / x) / 2;\n}\n\nfunction tanh(x) {\n  return ((x = Math.exp(2 * x)) - 1) / (x + 1);\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ((function zoomRho(rho, rho2, rho4) {\n\n  // p0 = [ux0, uy0, w0]\n  // p1 = [ux1, uy1, w1]\n  function zoom(p0, p1) {\n    var ux0 = p0[0], uy0 = p0[1], w0 = p0[2],\n        ux1 = p1[0], uy1 = p1[1], w1 = p1[2],\n        dx = ux1 - ux0,\n        dy = uy1 - uy0,\n        d2 = dx * dx + dy * dy,\n        i,\n        S;\n\n    // Special case for u0 ≅ u1.\n    if (d2 < epsilon2) {\n      S = Math.log(w1 / w0) / rho;\n      i = function(t) {\n        return [\n          ux0 + t * dx,\n          uy0 + t * dy,\n          w0 * Math.exp(rho * t * S)\n        ];\n      }\n    }\n\n    // General case.\n    else {\n      var d1 = Math.sqrt(d2),\n          b0 = (w1 * w1 - w0 * w0 + rho4 * d2) / (2 * w0 * rho2 * d1),\n          b1 = (w1 * w1 - w0 * w0 - rho4 * d2) / (2 * w1 * rho2 * d1),\n          r0 = Math.log(Math.sqrt(b0 * b0 + 1) - b0),\n          r1 = Math.log(Math.sqrt(b1 * b1 + 1) - b1);\n      S = (r1 - r0) / rho;\n      i = function(t) {\n        var s = t * S,\n            coshr0 = cosh(r0),\n            u = w0 / (rho2 * d1) * (coshr0 * tanh(rho * s + r0) - sinh(r0));\n        return [\n          ux0 + u * dx,\n          uy0 + u * dy,\n          w0 * coshr0 / cosh(rho * s + r0)\n        ];\n      }\n    }\n\n    i.duration = S * 1000 * rho / Math.SQRT2;\n\n    return i;\n  }\n\n  zoom.rho = function(_) {\n    var _1 = Math.max(1e-3, +_), _2 = _1 * _1, _4 = _2 * _2;\n    return zoomRho(_1, _2, _4);\n  };\n\n  return zoom;\n})(Math.SQRT2, 2, 4));\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale/node_modules/d3-time-format/src/defaultLocale.js\":\n/*!********************************************************************************!*\\\n  !*** ./node_modules/d3-scale/node_modules/d3-time-format/src/defaultLocale.js ***!\n  \\********************************************************************************/\n/*! exports provided: timeFormat, timeParse, utcFormat, utcParse, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"timeFormat\", function() { return timeFormat; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"timeParse\", function() { return timeParse; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"utcFormat\", function() { return utcFormat; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"utcParse\", function() { return utcParse; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return defaultLocale; });\n/* harmony import */ var _locale_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./locale.js */ \"./node_modules/d3-scale/node_modules/d3-time-format/src/locale.js\");\n\n\nvar locale;\nvar timeFormat;\nvar timeParse;\nvar utcFormat;\nvar utcParse;\n\ndefaultLocale({\n  dateTime: \"%x, %X\",\n  date: \"%-m/%-d/%Y\",\n  time: \"%-I:%M:%S %p\",\n  periods: [\"AM\", \"PM\"],\n  days: [\"Sunday\", \"Monday\", \"Tuesday\", \"Wednesday\", \"Thursday\", \"Friday\", \"Saturday\"],\n  shortDays: [\"Sun\", \"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\"],\n  months: [\"January\", \"February\", \"March\", \"April\", \"May\", \"June\", \"July\", \"August\", \"September\", \"October\", \"November\", \"December\"],\n  shortMonths: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\"]\n});\n\nfunction defaultLocale(definition) {\n  locale = Object(_locale_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(definition);\n  timeFormat = locale.format;\n  timeParse = locale.parse;\n  utcFormat = locale.utcFormat;\n  utcParse = locale.utcParse;\n  return locale;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale/node_modules/d3-time-format/src/index.js\":\n/*!************************************************************************!*\\\n  !*** ./node_modules/d3-scale/node_modules/d3-time-format/src/index.js ***!\n  \\************************************************************************/\n/*! exports provided: timeFormatDefaultLocale, timeFormat, timeParse, utcFormat, utcParse, timeFormatLocale, isoFormat, isoParse */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _defaultLocale_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./defaultLocale.js */ \"./node_modules/d3-scale/node_modules/d3-time-format/src/defaultLocale.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeFormatDefaultLocale\", function() { return _defaultLocale_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeFormat\", function() { return _defaultLocale_js__WEBPACK_IMPORTED_MODULE_0__[\"timeFormat\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeParse\", function() { return _defaultLocale_js__WEBPACK_IMPORTED_MODULE_0__[\"timeParse\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcFormat\", function() { return _defaultLocale_js__WEBPACK_IMPORTED_MODULE_0__[\"utcFormat\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcParse\", function() { return _defaultLocale_js__WEBPACK_IMPORTED_MODULE_0__[\"utcParse\"]; });\n\n/* harmony import */ var _locale_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./locale.js */ \"./node_modules/d3-scale/node_modules/d3-time-format/src/locale.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeFormatLocale\", function() { return _locale_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"]; });\n\n/* harmony import */ var _isoFormat_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./isoFormat.js */ \"./node_modules/d3-scale/node_modules/d3-time-format/src/isoFormat.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"isoFormat\", function() { return _isoFormat_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"]; });\n\n/* harmony import */ var _isoParse_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./isoParse.js */ \"./node_modules/d3-scale/node_modules/d3-time-format/src/isoParse.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"isoParse\", function() { return _isoParse_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"]; });\n\n\n\n\n\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale/node_modules/d3-time-format/src/isoFormat.js\":\n/*!****************************************************************************!*\\\n  !*** ./node_modules/d3-scale/node_modules/d3-time-format/src/isoFormat.js ***!\n  \\****************************************************************************/\n/*! exports provided: isoSpecifier, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"isoSpecifier\", function() { return isoSpecifier; });\n/* harmony import */ var _defaultLocale_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./defaultLocale.js */ \"./node_modules/d3-scale/node_modules/d3-time-format/src/defaultLocale.js\");\n\n\nvar isoSpecifier = \"%Y-%m-%dT%H:%M:%S.%LZ\";\n\nfunction formatIsoNative(date) {\n  return date.toISOString();\n}\n\nvar formatIso = Date.prototype.toISOString\n    ? formatIsoNative\n    : Object(_defaultLocale_js__WEBPACK_IMPORTED_MODULE_0__[\"utcFormat\"])(isoSpecifier);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (formatIso);\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale/node_modules/d3-time-format/src/isoParse.js\":\n/*!***************************************************************************!*\\\n  !*** ./node_modules/d3-scale/node_modules/d3-time-format/src/isoParse.js ***!\n  \\***************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _isoFormat_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./isoFormat.js */ \"./node_modules/d3-scale/node_modules/d3-time-format/src/isoFormat.js\");\n/* harmony import */ var _defaultLocale_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./defaultLocale.js */ \"./node_modules/d3-scale/node_modules/d3-time-format/src/defaultLocale.js\");\n\n\n\nfunction parseIsoNative(string) {\n  var date = new Date(string);\n  return isNaN(date) ? null : date;\n}\n\nvar parseIso = +new Date(\"2000-01-01T00:00:00.000Z\")\n    ? parseIsoNative\n    : Object(_defaultLocale_js__WEBPACK_IMPORTED_MODULE_1__[\"utcParse\"])(_isoFormat_js__WEBPACK_IMPORTED_MODULE_0__[\"isoSpecifier\"]);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (parseIso);\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale/node_modules/d3-time-format/src/locale.js\":\n/*!*************************************************************************!*\\\n  !*** ./node_modules/d3-scale/node_modules/d3-time-format/src/locale.js ***!\n  \\*************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return formatLocale; });\n/* harmony import */ var d3_time__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-time */ \"./node_modules/d3-scale/node_modules/d3-time/src/index.js\");\n\n\nfunction localDate(d) {\n  if (0 <= d.y && d.y < 100) {\n    var date = new Date(-1, d.m, d.d, d.H, d.M, d.S, d.L);\n    date.setFullYear(d.y);\n    return date;\n  }\n  return new Date(d.y, d.m, d.d, d.H, d.M, d.S, d.L);\n}\n\nfunction utcDate(d) {\n  if (0 <= d.y && d.y < 100) {\n    var date = new Date(Date.UTC(-1, d.m, d.d, d.H, d.M, d.S, d.L));\n    date.setUTCFullYear(d.y);\n    return date;\n  }\n  return new Date(Date.UTC(d.y, d.m, d.d, d.H, d.M, d.S, d.L));\n}\n\nfunction newDate(y, m, d) {\n  return {y: y, m: m, d: d, H: 0, M: 0, S: 0, L: 0};\n}\n\nfunction formatLocale(locale) {\n  var locale_dateTime = locale.dateTime,\n      locale_date = locale.date,\n      locale_time = locale.time,\n      locale_periods = locale.periods,\n      locale_weekdays = locale.days,\n      locale_shortWeekdays = locale.shortDays,\n      locale_months = locale.months,\n      locale_shortMonths = locale.shortMonths;\n\n  var periodRe = formatRe(locale_periods),\n      periodLookup = formatLookup(locale_periods),\n      weekdayRe = formatRe(locale_weekdays),\n      weekdayLookup = formatLookup(locale_weekdays),\n      shortWeekdayRe = formatRe(locale_shortWeekdays),\n      shortWeekdayLookup = formatLookup(locale_shortWeekdays),\n      monthRe = formatRe(locale_months),\n      monthLookup = formatLookup(locale_months),\n      shortMonthRe = formatRe(locale_shortMonths),\n      shortMonthLookup = formatLookup(locale_shortMonths);\n\n  var formats = {\n    \"a\": formatShortWeekday,\n    \"A\": formatWeekday,\n    \"b\": formatShortMonth,\n    \"B\": formatMonth,\n    \"c\": null,\n    \"d\": formatDayOfMonth,\n    \"e\": formatDayOfMonth,\n    \"f\": formatMicroseconds,\n    \"g\": formatYearISO,\n    \"G\": formatFullYearISO,\n    \"H\": formatHour24,\n    \"I\": formatHour12,\n    \"j\": formatDayOfYear,\n    \"L\": formatMilliseconds,\n    \"m\": formatMonthNumber,\n    \"M\": formatMinutes,\n    \"p\": formatPeriod,\n    \"q\": formatQuarter,\n    \"Q\": formatUnixTimestamp,\n    \"s\": formatUnixTimestampSeconds,\n    \"S\": formatSeconds,\n    \"u\": formatWeekdayNumberMonday,\n    \"U\": formatWeekNumberSunday,\n    \"V\": formatWeekNumberISO,\n    \"w\": formatWeekdayNumberSunday,\n    \"W\": formatWeekNumberMonday,\n    \"x\": null,\n    \"X\": null,\n    \"y\": formatYear,\n    \"Y\": formatFullYear,\n    \"Z\": formatZone,\n    \"%\": formatLiteralPercent\n  };\n\n  var utcFormats = {\n    \"a\": formatUTCShortWeekday,\n    \"A\": formatUTCWeekday,\n    \"b\": formatUTCShortMonth,\n    \"B\": formatUTCMonth,\n    \"c\": null,\n    \"d\": formatUTCDayOfMonth,\n    \"e\": formatUTCDayOfMonth,\n    \"f\": formatUTCMicroseconds,\n    \"g\": formatUTCYearISO,\n    \"G\": formatUTCFullYearISO,\n    \"H\": formatUTCHour24,\n    \"I\": formatUTCHour12,\n    \"j\": formatUTCDayOfYear,\n    \"L\": formatUTCMilliseconds,\n    \"m\": formatUTCMonthNumber,\n    \"M\": formatUTCMinutes,\n    \"p\": formatUTCPeriod,\n    \"q\": formatUTCQuarter,\n    \"Q\": formatUnixTimestamp,\n    \"s\": formatUnixTimestampSeconds,\n    \"S\": formatUTCSeconds,\n    \"u\": formatUTCWeekdayNumberMonday,\n    \"U\": formatUTCWeekNumberSunday,\n    \"V\": formatUTCWeekNumberISO,\n    \"w\": formatUTCWeekdayNumberSunday,\n    \"W\": formatUTCWeekNumberMonday,\n    \"x\": null,\n    \"X\": null,\n    \"y\": formatUTCYear,\n    \"Y\": formatUTCFullYear,\n    \"Z\": formatUTCZone,\n    \"%\": formatLiteralPercent\n  };\n\n  var parses = {\n    \"a\": parseShortWeekday,\n    \"A\": parseWeekday,\n    \"b\": parseShortMonth,\n    \"B\": parseMonth,\n    \"c\": parseLocaleDateTime,\n    \"d\": parseDayOfMonth,\n    \"e\": parseDayOfMonth,\n    \"f\": parseMicroseconds,\n    \"g\": parseYear,\n    \"G\": parseFullYear,\n    \"H\": parseHour24,\n    \"I\": parseHour24,\n    \"j\": parseDayOfYear,\n    \"L\": parseMilliseconds,\n    \"m\": parseMonthNumber,\n    \"M\": parseMinutes,\n    \"p\": parsePeriod,\n    \"q\": parseQuarter,\n    \"Q\": parseUnixTimestamp,\n    \"s\": parseUnixTimestampSeconds,\n    \"S\": parseSeconds,\n    \"u\": parseWeekdayNumberMonday,\n    \"U\": parseWeekNumberSunday,\n    \"V\": parseWeekNumberISO,\n    \"w\": parseWeekdayNumberSunday,\n    \"W\": parseWeekNumberMonday,\n    \"x\": parseLocaleDate,\n    \"X\": parseLocaleTime,\n    \"y\": parseYear,\n    \"Y\": parseFullYear,\n    \"Z\": parseZone,\n    \"%\": parseLiteralPercent\n  };\n\n  // These recursive directive definitions must be deferred.\n  formats.x = newFormat(locale_date, formats);\n  formats.X = newFormat(locale_time, formats);\n  formats.c = newFormat(locale_dateTime, formats);\n  utcFormats.x = newFormat(locale_date, utcFormats);\n  utcFormats.X = newFormat(locale_time, utcFormats);\n  utcFormats.c = newFormat(locale_dateTime, utcFormats);\n\n  function newFormat(specifier, formats) {\n    return function(date) {\n      var string = [],\n          i = -1,\n          j = 0,\n          n = specifier.length,\n          c,\n          pad,\n          format;\n\n      if (!(date instanceof Date)) date = new Date(+date);\n\n      while (++i < n) {\n        if (specifier.charCodeAt(i) === 37) {\n          string.push(specifier.slice(j, i));\n          if ((pad = pads[c = specifier.charAt(++i)]) != null) c = specifier.charAt(++i);\n          else pad = c === \"e\" ? \" \" : \"0\";\n          if (format = formats[c]) c = format(date, pad);\n          string.push(c);\n          j = i + 1;\n        }\n      }\n\n      string.push(specifier.slice(j, i));\n      return string.join(\"\");\n    };\n  }\n\n  function newParse(specifier, Z) {\n    return function(string) {\n      var d = newDate(1900, undefined, 1),\n          i = parseSpecifier(d, specifier, string += \"\", 0),\n          week, day;\n      if (i != string.length) return null;\n\n      // If a UNIX timestamp is specified, return it.\n      if (\"Q\" in d) return new Date(d.Q);\n      if (\"s\" in d) return new Date(d.s * 1000 + (\"L\" in d ? d.L : 0));\n\n      // If this is utcParse, never use the local timezone.\n      if (Z && !(\"Z\" in d)) d.Z = 0;\n\n      // The am-pm flag is 0 for AM, and 1 for PM.\n      if (\"p\" in d) d.H = d.H % 12 + d.p * 12;\n\n      // If the month was not specified, inherit from the quarter.\n      if (d.m === undefined) d.m = \"q\" in d ? d.q : 0;\n\n      // Convert day-of-week and week-of-year to day-of-year.\n      if (\"V\" in d) {\n        if (d.V < 1 || d.V > 53) return null;\n        if (!(\"w\" in d)) d.w = 1;\n        if (\"Z\" in d) {\n          week = utcDate(newDate(d.y, 0, 1)), day = week.getUTCDay();\n          week = day > 4 || day === 0 ? d3_time__WEBPACK_IMPORTED_MODULE_0__[\"utcMonday\"].ceil(week) : Object(d3_time__WEBPACK_IMPORTED_MODULE_0__[\"utcMonday\"])(week);\n          week = d3_time__WEBPACK_IMPORTED_MODULE_0__[\"utcDay\"].offset(week, (d.V - 1) * 7);\n          d.y = week.getUTCFullYear();\n          d.m = week.getUTCMonth();\n          d.d = week.getUTCDate() + (d.w + 6) % 7;\n        } else {\n          week = localDate(newDate(d.y, 0, 1)), day = week.getDay();\n          week = day > 4 || day === 0 ? d3_time__WEBPACK_IMPORTED_MODULE_0__[\"timeMonday\"].ceil(week) : Object(d3_time__WEBPACK_IMPORTED_MODULE_0__[\"timeMonday\"])(week);\n          week = d3_time__WEBPACK_IMPORTED_MODULE_0__[\"timeDay\"].offset(week, (d.V - 1) * 7);\n          d.y = week.getFullYear();\n          d.m = week.getMonth();\n          d.d = week.getDate() + (d.w + 6) % 7;\n        }\n      } else if (\"W\" in d || \"U\" in d) {\n        if (!(\"w\" in d)) d.w = \"u\" in d ? d.u % 7 : \"W\" in d ? 1 : 0;\n        day = \"Z\" in d ? utcDate(newDate(d.y, 0, 1)).getUTCDay() : localDate(newDate(d.y, 0, 1)).getDay();\n        d.m = 0;\n        d.d = \"W\" in d ? (d.w + 6) % 7 + d.W * 7 - (day + 5) % 7 : d.w + d.U * 7 - (day + 6) % 7;\n      }\n\n      // If a time zone is specified, all fields are interpreted as UTC and then\n      // offset according to the specified time zone.\n      if (\"Z\" in d) {\n        d.H += d.Z / 100 | 0;\n        d.M += d.Z % 100;\n        return utcDate(d);\n      }\n\n      // Otherwise, all fields are in local time.\n      return localDate(d);\n    };\n  }\n\n  function parseSpecifier(d, specifier, string, j) {\n    var i = 0,\n        n = specifier.length,\n        m = string.length,\n        c,\n        parse;\n\n    while (i < n) {\n      if (j >= m) return -1;\n      c = specifier.charCodeAt(i++);\n      if (c === 37) {\n        c = specifier.charAt(i++);\n        parse = parses[c in pads ? specifier.charAt(i++) : c];\n        if (!parse || ((j = parse(d, string, j)) < 0)) return -1;\n      } else if (c != string.charCodeAt(j++)) {\n        return -1;\n      }\n    }\n\n    return j;\n  }\n\n  function parsePeriod(d, string, i) {\n    var n = periodRe.exec(string.slice(i));\n    return n ? (d.p = periodLookup.get(n[0].toLowerCase()), i + n[0].length) : -1;\n  }\n\n  function parseShortWeekday(d, string, i) {\n    var n = shortWeekdayRe.exec(string.slice(i));\n    return n ? (d.w = shortWeekdayLookup.get(n[0].toLowerCase()), i + n[0].length) : -1;\n  }\n\n  function parseWeekday(d, string, i) {\n    var n = weekdayRe.exec(string.slice(i));\n    return n ? (d.w = weekdayLookup.get(n[0].toLowerCase()), i + n[0].length) : -1;\n  }\n\n  function parseShortMonth(d, string, i) {\n    var n = shortMonthRe.exec(string.slice(i));\n    return n ? (d.m = shortMonthLookup.get(n[0].toLowerCase()), i + n[0].length) : -1;\n  }\n\n  function parseMonth(d, string, i) {\n    var n = monthRe.exec(string.slice(i));\n    return n ? (d.m = monthLookup.get(n[0].toLowerCase()), i + n[0].length) : -1;\n  }\n\n  function parseLocaleDateTime(d, string, i) {\n    return parseSpecifier(d, locale_dateTime, string, i);\n  }\n\n  function parseLocaleDate(d, string, i) {\n    return parseSpecifier(d, locale_date, string, i);\n  }\n\n  function parseLocaleTime(d, string, i) {\n    return parseSpecifier(d, locale_time, string, i);\n  }\n\n  function formatShortWeekday(d) {\n    return locale_shortWeekdays[d.getDay()];\n  }\n\n  function formatWeekday(d) {\n    return locale_weekdays[d.getDay()];\n  }\n\n  function formatShortMonth(d) {\n    return locale_shortMonths[d.getMonth()];\n  }\n\n  function formatMonth(d) {\n    return locale_months[d.getMonth()];\n  }\n\n  function formatPeriod(d) {\n    return locale_periods[+(d.getHours() >= 12)];\n  }\n\n  function formatQuarter(d) {\n    return 1 + ~~(d.getMonth() / 3);\n  }\n\n  function formatUTCShortWeekday(d) {\n    return locale_shortWeekdays[d.getUTCDay()];\n  }\n\n  function formatUTCWeekday(d) {\n    return locale_weekdays[d.getUTCDay()];\n  }\n\n  function formatUTCShortMonth(d) {\n    return locale_shortMonths[d.getUTCMonth()];\n  }\n\n  function formatUTCMonth(d) {\n    return locale_months[d.getUTCMonth()];\n  }\n\n  function formatUTCPeriod(d) {\n    return locale_periods[+(d.getUTCHours() >= 12)];\n  }\n\n  function formatUTCQuarter(d) {\n    return 1 + ~~(d.getUTCMonth() / 3);\n  }\n\n  return {\n    format: function(specifier) {\n      var f = newFormat(specifier += \"\", formats);\n      f.toString = function() { return specifier; };\n      return f;\n    },\n    parse: function(specifier) {\n      var p = newParse(specifier += \"\", false);\n      p.toString = function() { return specifier; };\n      return p;\n    },\n    utcFormat: function(specifier) {\n      var f = newFormat(specifier += \"\", utcFormats);\n      f.toString = function() { return specifier; };\n      return f;\n    },\n    utcParse: function(specifier) {\n      var p = newParse(specifier += \"\", true);\n      p.toString = function() { return specifier; };\n      return p;\n    }\n  };\n}\n\nvar pads = {\"-\": \"\", \"_\": \" \", \"0\": \"0\"},\n    numberRe = /^\\s*\\d+/, // note: ignores next directive\n    percentRe = /^%/,\n    requoteRe = /[\\\\^$*+?|[\\]().{}]/g;\n\nfunction pad(value, fill, width) {\n  var sign = value < 0 ? \"-\" : \"\",\n      string = (sign ? -value : value) + \"\",\n      length = string.length;\n  return sign + (length < width ? new Array(width - length + 1).join(fill) + string : string);\n}\n\nfunction requote(s) {\n  return s.replace(requoteRe, \"\\\\$&\");\n}\n\nfunction formatRe(names) {\n  return new RegExp(\"^(?:\" + names.map(requote).join(\"|\") + \")\", \"i\");\n}\n\nfunction formatLookup(names) {\n  return new Map(names.map((name, i) => [name.toLowerCase(), i]));\n}\n\nfunction parseWeekdayNumberSunday(d, string, i) {\n  var n = numberRe.exec(string.slice(i, i + 1));\n  return n ? (d.w = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseWeekdayNumberMonday(d, string, i) {\n  var n = numberRe.exec(string.slice(i, i + 1));\n  return n ? (d.u = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseWeekNumberSunday(d, string, i) {\n  var n = numberRe.exec(string.slice(i, i + 2));\n  return n ? (d.U = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseWeekNumberISO(d, string, i) {\n  var n = numberRe.exec(string.slice(i, i + 2));\n  return n ? (d.V = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseWeekNumberMonday(d, string, i) {\n  var n = numberRe.exec(string.slice(i, i + 2));\n  return n ? (d.W = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseFullYear(d, string, i) {\n  var n = numberRe.exec(string.slice(i, i + 4));\n  return n ? (d.y = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseYear(d, string, i) {\n  var n = numberRe.exec(string.slice(i, i + 2));\n  return n ? (d.y = +n[0] + (+n[0] > 68 ? 1900 : 2000), i + n[0].length) : -1;\n}\n\nfunction parseZone(d, string, i) {\n  var n = /^(Z)|([+-]\\d\\d)(?::?(\\d\\d))?/.exec(string.slice(i, i + 6));\n  return n ? (d.Z = n[1] ? 0 : -(n[2] + (n[3] || \"00\")), i + n[0].length) : -1;\n}\n\nfunction parseQuarter(d, string, i) {\n  var n = numberRe.exec(string.slice(i, i + 1));\n  return n ? (d.q = n[0] * 3 - 3, i + n[0].length) : -1;\n}\n\nfunction parseMonthNumber(d, string, i) {\n  var n = numberRe.exec(string.slice(i, i + 2));\n  return n ? (d.m = n[0] - 1, i + n[0].length) : -1;\n}\n\nfunction parseDayOfMonth(d, string, i) {\n  var n = numberRe.exec(string.slice(i, i + 2));\n  return n ? (d.d = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseDayOfYear(d, string, i) {\n  var n = numberRe.exec(string.slice(i, i + 3));\n  return n ? (d.m = 0, d.d = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseHour24(d, string, i) {\n  var n = numberRe.exec(string.slice(i, i + 2));\n  return n ? (d.H = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseMinutes(d, string, i) {\n  var n = numberRe.exec(string.slice(i, i + 2));\n  return n ? (d.M = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseSeconds(d, string, i) {\n  var n = numberRe.exec(string.slice(i, i + 2));\n  return n ? (d.S = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseMilliseconds(d, string, i) {\n  var n = numberRe.exec(string.slice(i, i + 3));\n  return n ? (d.L = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseMicroseconds(d, string, i) {\n  var n = numberRe.exec(string.slice(i, i + 6));\n  return n ? (d.L = Math.floor(n[0] / 1000), i + n[0].length) : -1;\n}\n\nfunction parseLiteralPercent(d, string, i) {\n  var n = percentRe.exec(string.slice(i, i + 1));\n  return n ? i + n[0].length : -1;\n}\n\nfunction parseUnixTimestamp(d, string, i) {\n  var n = numberRe.exec(string.slice(i));\n  return n ? (d.Q = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseUnixTimestampSeconds(d, string, i) {\n  var n = numberRe.exec(string.slice(i));\n  return n ? (d.s = +n[0], i + n[0].length) : -1;\n}\n\nfunction formatDayOfMonth(d, p) {\n  return pad(d.getDate(), p, 2);\n}\n\nfunction formatHour24(d, p) {\n  return pad(d.getHours(), p, 2);\n}\n\nfunction formatHour12(d, p) {\n  return pad(d.getHours() % 12 || 12, p, 2);\n}\n\nfunction formatDayOfYear(d, p) {\n  return pad(1 + d3_time__WEBPACK_IMPORTED_MODULE_0__[\"timeDay\"].count(Object(d3_time__WEBPACK_IMPORTED_MODULE_0__[\"timeYear\"])(d), d), p, 3);\n}\n\nfunction formatMilliseconds(d, p) {\n  return pad(d.getMilliseconds(), p, 3);\n}\n\nfunction formatMicroseconds(d, p) {\n  return formatMilliseconds(d, p) + \"000\";\n}\n\nfunction formatMonthNumber(d, p) {\n  return pad(d.getMonth() + 1, p, 2);\n}\n\nfunction formatMinutes(d, p) {\n  return pad(d.getMinutes(), p, 2);\n}\n\nfunction formatSeconds(d, p) {\n  return pad(d.getSeconds(), p, 2);\n}\n\nfunction formatWeekdayNumberMonday(d) {\n  var day = d.getDay();\n  return day === 0 ? 7 : day;\n}\n\nfunction formatWeekNumberSunday(d, p) {\n  return pad(d3_time__WEBPACK_IMPORTED_MODULE_0__[\"timeSunday\"].count(Object(d3_time__WEBPACK_IMPORTED_MODULE_0__[\"timeYear\"])(d) - 1, d), p, 2);\n}\n\nfunction dISO(d) {\n  var day = d.getDay();\n  return (day >= 4 || day === 0) ? Object(d3_time__WEBPACK_IMPORTED_MODULE_0__[\"timeThursday\"])(d) : d3_time__WEBPACK_IMPORTED_MODULE_0__[\"timeThursday\"].ceil(d);\n}\n\nfunction formatWeekNumberISO(d, p) {\n  d = dISO(d);\n  return pad(d3_time__WEBPACK_IMPORTED_MODULE_0__[\"timeThursday\"].count(Object(d3_time__WEBPACK_IMPORTED_MODULE_0__[\"timeYear\"])(d), d) + (Object(d3_time__WEBPACK_IMPORTED_MODULE_0__[\"timeYear\"])(d).getDay() === 4), p, 2);\n}\n\nfunction formatWeekdayNumberSunday(d) {\n  return d.getDay();\n}\n\nfunction formatWeekNumberMonday(d, p) {\n  return pad(d3_time__WEBPACK_IMPORTED_MODULE_0__[\"timeMonday\"].count(Object(d3_time__WEBPACK_IMPORTED_MODULE_0__[\"timeYear\"])(d) - 1, d), p, 2);\n}\n\nfunction formatYear(d, p) {\n  return pad(d.getFullYear() % 100, p, 2);\n}\n\nfunction formatYearISO(d, p) {\n  d = dISO(d);\n  return pad(d.getFullYear() % 100, p, 2);\n}\n\nfunction formatFullYear(d, p) {\n  return pad(d.getFullYear() % 10000, p, 4);\n}\n\nfunction formatFullYearISO(d, p) {\n  var day = d.getDay();\n  d = (day >= 4 || day === 0) ? Object(d3_time__WEBPACK_IMPORTED_MODULE_0__[\"timeThursday\"])(d) : d3_time__WEBPACK_IMPORTED_MODULE_0__[\"timeThursday\"].ceil(d);\n  return pad(d.getFullYear() % 10000, p, 4);\n}\n\nfunction formatZone(d) {\n  var z = d.getTimezoneOffset();\n  return (z > 0 ? \"-\" : (z *= -1, \"+\"))\n      + pad(z / 60 | 0, \"0\", 2)\n      + pad(z % 60, \"0\", 2);\n}\n\nfunction formatUTCDayOfMonth(d, p) {\n  return pad(d.getUTCDate(), p, 2);\n}\n\nfunction formatUTCHour24(d, p) {\n  return pad(d.getUTCHours(), p, 2);\n}\n\nfunction formatUTCHour12(d, p) {\n  return pad(d.getUTCHours() % 12 || 12, p, 2);\n}\n\nfunction formatUTCDayOfYear(d, p) {\n  return pad(1 + d3_time__WEBPACK_IMPORTED_MODULE_0__[\"utcDay\"].count(Object(d3_time__WEBPACK_IMPORTED_MODULE_0__[\"utcYear\"])(d), d), p, 3);\n}\n\nfunction formatUTCMilliseconds(d, p) {\n  return pad(d.getUTCMilliseconds(), p, 3);\n}\n\nfunction formatUTCMicroseconds(d, p) {\n  return formatUTCMilliseconds(d, p) + \"000\";\n}\n\nfunction formatUTCMonthNumber(d, p) {\n  return pad(d.getUTCMonth() + 1, p, 2);\n}\n\nfunction formatUTCMinutes(d, p) {\n  return pad(d.getUTCMinutes(), p, 2);\n}\n\nfunction formatUTCSeconds(d, p) {\n  return pad(d.getUTCSeconds(), p, 2);\n}\n\nfunction formatUTCWeekdayNumberMonday(d) {\n  var dow = d.getUTCDay();\n  return dow === 0 ? 7 : dow;\n}\n\nfunction formatUTCWeekNumberSunday(d, p) {\n  return pad(d3_time__WEBPACK_IMPORTED_MODULE_0__[\"utcSunday\"].count(Object(d3_time__WEBPACK_IMPORTED_MODULE_0__[\"utcYear\"])(d) - 1, d), p, 2);\n}\n\nfunction UTCdISO(d) {\n  var day = d.getUTCDay();\n  return (day >= 4 || day === 0) ? Object(d3_time__WEBPACK_IMPORTED_MODULE_0__[\"utcThursday\"])(d) : d3_time__WEBPACK_IMPORTED_MODULE_0__[\"utcThursday\"].ceil(d);\n}\n\nfunction formatUTCWeekNumberISO(d, p) {\n  d = UTCdISO(d);\n  return pad(d3_time__WEBPACK_IMPORTED_MODULE_0__[\"utcThursday\"].count(Object(d3_time__WEBPACK_IMPORTED_MODULE_0__[\"utcYear\"])(d), d) + (Object(d3_time__WEBPACK_IMPORTED_MODULE_0__[\"utcYear\"])(d).getUTCDay() === 4), p, 2);\n}\n\nfunction formatUTCWeekdayNumberSunday(d) {\n  return d.getUTCDay();\n}\n\nfunction formatUTCWeekNumberMonday(d, p) {\n  return pad(d3_time__WEBPACK_IMPORTED_MODULE_0__[\"utcMonday\"].count(Object(d3_time__WEBPACK_IMPORTED_MODULE_0__[\"utcYear\"])(d) - 1, d), p, 2);\n}\n\nfunction formatUTCYear(d, p) {\n  return pad(d.getUTCFullYear() % 100, p, 2);\n}\n\nfunction formatUTCYearISO(d, p) {\n  d = UTCdISO(d);\n  return pad(d.getUTCFullYear() % 100, p, 2);\n}\n\nfunction formatUTCFullYear(d, p) {\n  return pad(d.getUTCFullYear() % 10000, p, 4);\n}\n\nfunction formatUTCFullYearISO(d, p) {\n  var day = d.getUTCDay();\n  d = (day >= 4 || day === 0) ? Object(d3_time__WEBPACK_IMPORTED_MODULE_0__[\"utcThursday\"])(d) : d3_time__WEBPACK_IMPORTED_MODULE_0__[\"utcThursday\"].ceil(d);\n  return pad(d.getUTCFullYear() % 10000, p, 4);\n}\n\nfunction formatUTCZone() {\n  return \"+0000\";\n}\n\nfunction formatLiteralPercent() {\n  return \"%\";\n}\n\nfunction formatUnixTimestamp(d) {\n  return +d;\n}\n\nfunction formatUnixTimestampSeconds(d) {\n  return Math.floor(+d / 1000);\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale/node_modules/d3-time/src/day.js\":\n/*!***************************************************************!*\\\n  !*** ./node_modules/d3-scale/node_modules/d3-time/src/day.js ***!\n  \\***************************************************************/\n/*! exports provided: default, days */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"days\", function() { return days; });\n/* harmony import */ var _interval_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./interval.js */ \"./node_modules/d3-scale/node_modules/d3-time/src/interval.js\");\n/* harmony import */ var _duration_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./duration.js */ \"./node_modules/d3-scale/node_modules/d3-time/src/duration.js\");\n\n\n\nvar day = Object(_interval_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(\n  date => date.setHours(0, 0, 0, 0),\n  (date, step) => date.setDate(date.getDate() + step),\n  (start, end) => (end - start - (end.getTimezoneOffset() - start.getTimezoneOffset()) * _duration_js__WEBPACK_IMPORTED_MODULE_1__[\"durationMinute\"]) / _duration_js__WEBPACK_IMPORTED_MODULE_1__[\"durationDay\"],\n  date => date.getDate() - 1\n);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (day);\nvar days = day.range;\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale/node_modules/d3-time/src/duration.js\":\n/*!********************************************************************!*\\\n  !*** ./node_modules/d3-scale/node_modules/d3-time/src/duration.js ***!\n  \\********************************************************************/\n/*! exports provided: durationSecond, durationMinute, durationHour, durationDay, durationWeek, durationMonth, durationYear */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"durationSecond\", function() { return durationSecond; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"durationMinute\", function() { return durationMinute; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"durationHour\", function() { return durationHour; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"durationDay\", function() { return durationDay; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"durationWeek\", function() { return durationWeek; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"durationMonth\", function() { return durationMonth; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"durationYear\", function() { return durationYear; });\nconst durationSecond = 1000;\nconst durationMinute = durationSecond * 60;\nconst durationHour = durationMinute * 60;\nconst durationDay = durationHour * 24;\nconst durationWeek = durationDay * 7;\nconst durationMonth = durationDay * 30;\nconst durationYear = durationDay * 365;\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale/node_modules/d3-time/src/hour.js\":\n/*!****************************************************************!*\\\n  !*** ./node_modules/d3-scale/node_modules/d3-time/src/hour.js ***!\n  \\****************************************************************/\n/*! exports provided: default, hours */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"hours\", function() { return hours; });\n/* harmony import */ var _interval_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./interval.js */ \"./node_modules/d3-scale/node_modules/d3-time/src/interval.js\");\n/* harmony import */ var _duration_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./duration.js */ \"./node_modules/d3-scale/node_modules/d3-time/src/duration.js\");\n\n\n\nvar hour = Object(_interval_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function(date) {\n  date.setTime(date - date.getMilliseconds() - date.getSeconds() * _duration_js__WEBPACK_IMPORTED_MODULE_1__[\"durationSecond\"] - date.getMinutes() * _duration_js__WEBPACK_IMPORTED_MODULE_1__[\"durationMinute\"]);\n}, function(date, step) {\n  date.setTime(+date + step * _duration_js__WEBPACK_IMPORTED_MODULE_1__[\"durationHour\"]);\n}, function(start, end) {\n  return (end - start) / _duration_js__WEBPACK_IMPORTED_MODULE_1__[\"durationHour\"];\n}, function(date) {\n  return date.getHours();\n});\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (hour);\nvar hours = hour.range;\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale/node_modules/d3-time/src/index.js\":\n/*!*****************************************************************!*\\\n  !*** ./node_modules/d3-scale/node_modules/d3-time/src/index.js ***!\n  \\*****************************************************************/\n/*! exports provided: timeInterval, timeMillisecond, timeMilliseconds, utcMillisecond, utcMilliseconds, timeSecond, timeSeconds, utcSecond, utcSeconds, timeMinute, timeMinutes, timeHour, timeHours, timeDay, timeDays, timeWeek, timeWeeks, timeSunday, timeSundays, timeMonday, timeMondays, timeTuesday, timeTuesdays, timeWednesday, timeWednesdays, timeThursday, timeThursdays, timeFriday, timeFridays, timeSaturday, timeSaturdays, timeMonth, timeMonths, timeYear, timeYears, utcMinute, utcMinutes, utcHour, utcHours, utcDay, utcDays, utcWeek, utcWeeks, utcSunday, utcSundays, utcMonday, utcMondays, utcTuesday, utcTuesdays, utcWednesday, utcWednesdays, utcThursday, utcThursdays, utcFriday, utcFridays, utcSaturday, utcSaturdays, utcMonth, utcMonths, utcYear, utcYears, utcTicks, utcTickInterval, timeTicks, timeTickInterval */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _interval_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./interval.js */ \"./node_modules/d3-scale/node_modules/d3-time/src/interval.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeInterval\", function() { return _interval_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n/* harmony import */ var _millisecond_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./millisecond.js */ \"./node_modules/d3-scale/node_modules/d3-time/src/millisecond.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeMillisecond\", function() { return _millisecond_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeMilliseconds\", function() { return _millisecond_js__WEBPACK_IMPORTED_MODULE_1__[\"milliseconds\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcMillisecond\", function() { return _millisecond_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcMilliseconds\", function() { return _millisecond_js__WEBPACK_IMPORTED_MODULE_1__[\"milliseconds\"]; });\n\n/* harmony import */ var _second_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./second.js */ \"./node_modules/d3-scale/node_modules/d3-time/src/second.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeSecond\", function() { return _second_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeSeconds\", function() { return _second_js__WEBPACK_IMPORTED_MODULE_2__[\"seconds\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcSecond\", function() { return _second_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcSeconds\", function() { return _second_js__WEBPACK_IMPORTED_MODULE_2__[\"seconds\"]; });\n\n/* harmony import */ var _minute_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./minute.js */ \"./node_modules/d3-scale/node_modules/d3-time/src/minute.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeMinute\", function() { return _minute_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeMinutes\", function() { return _minute_js__WEBPACK_IMPORTED_MODULE_3__[\"minutes\"]; });\n\n/* harmony import */ var _hour_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./hour.js */ \"./node_modules/d3-scale/node_modules/d3-time/src/hour.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeHour\", function() { return _hour_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeHours\", function() { return _hour_js__WEBPACK_IMPORTED_MODULE_4__[\"hours\"]; });\n\n/* harmony import */ var _day_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./day.js */ \"./node_modules/d3-scale/node_modules/d3-time/src/day.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeDay\", function() { return _day_js__WEBPACK_IMPORTED_MODULE_5__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeDays\", function() { return _day_js__WEBPACK_IMPORTED_MODULE_5__[\"days\"]; });\n\n/* harmony import */ var _week_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./week.js */ \"./node_modules/d3-scale/node_modules/d3-time/src/week.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeWeek\", function() { return _week_js__WEBPACK_IMPORTED_MODULE_6__[\"sunday\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeWeeks\", function() { return _week_js__WEBPACK_IMPORTED_MODULE_6__[\"sundays\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeSunday\", function() { return _week_js__WEBPACK_IMPORTED_MODULE_6__[\"sunday\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeSundays\", function() { return _week_js__WEBPACK_IMPORTED_MODULE_6__[\"sundays\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeMonday\", function() { return _week_js__WEBPACK_IMPORTED_MODULE_6__[\"monday\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeMondays\", function() { return _week_js__WEBPACK_IMPORTED_MODULE_6__[\"mondays\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeTuesday\", function() { return _week_js__WEBPACK_IMPORTED_MODULE_6__[\"tuesday\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeTuesdays\", function() { return _week_js__WEBPACK_IMPORTED_MODULE_6__[\"tuesdays\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeWednesday\", function() { return _week_js__WEBPACK_IMPORTED_MODULE_6__[\"wednesday\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeWednesdays\", function() { return _week_js__WEBPACK_IMPORTED_MODULE_6__[\"wednesdays\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeThursday\", function() { return _week_js__WEBPACK_IMPORTED_MODULE_6__[\"thursday\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeThursdays\", function() { return _week_js__WEBPACK_IMPORTED_MODULE_6__[\"thursdays\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeFriday\", function() { return _week_js__WEBPACK_IMPORTED_MODULE_6__[\"friday\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeFridays\", function() { return _week_js__WEBPACK_IMPORTED_MODULE_6__[\"fridays\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeSaturday\", function() { return _week_js__WEBPACK_IMPORTED_MODULE_6__[\"saturday\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeSaturdays\", function() { return _week_js__WEBPACK_IMPORTED_MODULE_6__[\"saturdays\"]; });\n\n/* harmony import */ var _month_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./month.js */ \"./node_modules/d3-scale/node_modules/d3-time/src/month.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeMonth\", function() { return _month_js__WEBPACK_IMPORTED_MODULE_7__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeMonths\", function() { return _month_js__WEBPACK_IMPORTED_MODULE_7__[\"months\"]; });\n\n/* harmony import */ var _year_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./year.js */ \"./node_modules/d3-scale/node_modules/d3-time/src/year.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeYear\", function() { return _year_js__WEBPACK_IMPORTED_MODULE_8__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeYears\", function() { return _year_js__WEBPACK_IMPORTED_MODULE_8__[\"years\"]; });\n\n/* harmony import */ var _utcMinute_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./utcMinute.js */ \"./node_modules/d3-scale/node_modules/d3-time/src/utcMinute.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcMinute\", function() { return _utcMinute_js__WEBPACK_IMPORTED_MODULE_9__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcMinutes\", function() { return _utcMinute_js__WEBPACK_IMPORTED_MODULE_9__[\"utcMinutes\"]; });\n\n/* harmony import */ var _utcHour_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./utcHour.js */ \"./node_modules/d3-scale/node_modules/d3-time/src/utcHour.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcHour\", function() { return _utcHour_js__WEBPACK_IMPORTED_MODULE_10__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcHours\", function() { return _utcHour_js__WEBPACK_IMPORTED_MODULE_10__[\"utcHours\"]; });\n\n/* harmony import */ var _utcDay_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./utcDay.js */ \"./node_modules/d3-scale/node_modules/d3-time/src/utcDay.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcDay\", function() { return _utcDay_js__WEBPACK_IMPORTED_MODULE_11__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcDays\", function() { return _utcDay_js__WEBPACK_IMPORTED_MODULE_11__[\"utcDays\"]; });\n\n/* harmony import */ var _utcWeek_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./utcWeek.js */ \"./node_modules/d3-scale/node_modules/d3-time/src/utcWeek.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcWeek\", function() { return _utcWeek_js__WEBPACK_IMPORTED_MODULE_12__[\"utcSunday\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcWeeks\", function() { return _utcWeek_js__WEBPACK_IMPORTED_MODULE_12__[\"utcSundays\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcSunday\", function() { return _utcWeek_js__WEBPACK_IMPORTED_MODULE_12__[\"utcSunday\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcSundays\", function() { return _utcWeek_js__WEBPACK_IMPORTED_MODULE_12__[\"utcSundays\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcMonday\", function() { return _utcWeek_js__WEBPACK_IMPORTED_MODULE_12__[\"utcMonday\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcMondays\", function() { return _utcWeek_js__WEBPACK_IMPORTED_MODULE_12__[\"utcMondays\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcTuesday\", function() { return _utcWeek_js__WEBPACK_IMPORTED_MODULE_12__[\"utcTuesday\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcTuesdays\", function() { return _utcWeek_js__WEBPACK_IMPORTED_MODULE_12__[\"utcTuesdays\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcWednesday\", function() { return _utcWeek_js__WEBPACK_IMPORTED_MODULE_12__[\"utcWednesday\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcWednesdays\", function() { return _utcWeek_js__WEBPACK_IMPORTED_MODULE_12__[\"utcWednesdays\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcThursday\", function() { return _utcWeek_js__WEBPACK_IMPORTED_MODULE_12__[\"utcThursday\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcThursdays\", function() { return _utcWeek_js__WEBPACK_IMPORTED_MODULE_12__[\"utcThursdays\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcFriday\", function() { return _utcWeek_js__WEBPACK_IMPORTED_MODULE_12__[\"utcFriday\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcFridays\", function() { return _utcWeek_js__WEBPACK_IMPORTED_MODULE_12__[\"utcFridays\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcSaturday\", function() { return _utcWeek_js__WEBPACK_IMPORTED_MODULE_12__[\"utcSaturday\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcSaturdays\", function() { return _utcWeek_js__WEBPACK_IMPORTED_MODULE_12__[\"utcSaturdays\"]; });\n\n/* harmony import */ var _utcMonth_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./utcMonth.js */ \"./node_modules/d3-scale/node_modules/d3-time/src/utcMonth.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcMonth\", function() { return _utcMonth_js__WEBPACK_IMPORTED_MODULE_13__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcMonths\", function() { return _utcMonth_js__WEBPACK_IMPORTED_MODULE_13__[\"utcMonths\"]; });\n\n/* harmony import */ var _utcYear_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./utcYear.js */ \"./node_modules/d3-scale/node_modules/d3-time/src/utcYear.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcYear\", function() { return _utcYear_js__WEBPACK_IMPORTED_MODULE_14__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcYears\", function() { return _utcYear_js__WEBPACK_IMPORTED_MODULE_14__[\"utcYears\"]; });\n\n/* harmony import */ var _ticks_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./ticks.js */ \"./node_modules/d3-scale/node_modules/d3-time/src/ticks.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcTicks\", function() { return _ticks_js__WEBPACK_IMPORTED_MODULE_15__[\"utcTicks\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcTickInterval\", function() { return _ticks_js__WEBPACK_IMPORTED_MODULE_15__[\"utcTickInterval\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeTicks\", function() { return _ticks_js__WEBPACK_IMPORTED_MODULE_15__[\"timeTicks\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeTickInterval\", function() { return _ticks_js__WEBPACK_IMPORTED_MODULE_15__[\"timeTickInterval\"]; });\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale/node_modules/d3-time/src/interval.js\":\n/*!********************************************************************!*\\\n  !*** ./node_modules/d3-scale/node_modules/d3-time/src/interval.js ***!\n  \\********************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return newInterval; });\nvar t0 = new Date,\n    t1 = new Date;\n\nfunction newInterval(floori, offseti, count, field) {\n\n  function interval(date) {\n    return floori(date = arguments.length === 0 ? new Date : new Date(+date)), date;\n  }\n\n  interval.floor = function(date) {\n    return floori(date = new Date(+date)), date;\n  };\n\n  interval.ceil = function(date) {\n    return floori(date = new Date(date - 1)), offseti(date, 1), floori(date), date;\n  };\n\n  interval.round = function(date) {\n    var d0 = interval(date),\n        d1 = interval.ceil(date);\n    return date - d0 < d1 - date ? d0 : d1;\n  };\n\n  interval.offset = function(date, step) {\n    return offseti(date = new Date(+date), step == null ? 1 : Math.floor(step)), date;\n  };\n\n  interval.range = function(start, stop, step) {\n    var range = [], previous;\n    start = interval.ceil(start);\n    step = step == null ? 1 : Math.floor(step);\n    if (!(start < stop) || !(step > 0)) return range; // also handles Invalid Date\n    do range.push(previous = new Date(+start)), offseti(start, step), floori(start);\n    while (previous < start && start < stop);\n    return range;\n  };\n\n  interval.filter = function(test) {\n    return newInterval(function(date) {\n      if (date >= date) while (floori(date), !test(date)) date.setTime(date - 1);\n    }, function(date, step) {\n      if (date >= date) {\n        if (step < 0) while (++step <= 0) {\n          while (offseti(date, -1), !test(date)) {} // eslint-disable-line no-empty\n        } else while (--step >= 0) {\n          while (offseti(date, +1), !test(date)) {} // eslint-disable-line no-empty\n        }\n      }\n    });\n  };\n\n  if (count) {\n    interval.count = function(start, end) {\n      t0.setTime(+start), t1.setTime(+end);\n      floori(t0), floori(t1);\n      return Math.floor(count(t0, t1));\n    };\n\n    interval.every = function(step) {\n      step = Math.floor(step);\n      return !isFinite(step) || !(step > 0) ? null\n          : !(step > 1) ? interval\n          : interval.filter(field\n              ? function(d) { return field(d) % step === 0; }\n              : function(d) { return interval.count(0, d) % step === 0; });\n    };\n  }\n\n  return interval;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale/node_modules/d3-time/src/millisecond.js\":\n/*!***********************************************************************!*\\\n  !*** ./node_modules/d3-scale/node_modules/d3-time/src/millisecond.js ***!\n  \\***********************************************************************/\n/*! exports provided: default, milliseconds */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"milliseconds\", function() { return milliseconds; });\n/* harmony import */ var _interval_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./interval.js */ \"./node_modules/d3-scale/node_modules/d3-time/src/interval.js\");\n\n\nvar millisecond = Object(_interval_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function() {\n  // noop\n}, function(date, step) {\n  date.setTime(+date + step);\n}, function(start, end) {\n  return end - start;\n});\n\n// An optimized implementation for this simple case.\nmillisecond.every = function(k) {\n  k = Math.floor(k);\n  if (!isFinite(k) || !(k > 0)) return null;\n  if (!(k > 1)) return millisecond;\n  return Object(_interval_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function(date) {\n    date.setTime(Math.floor(date / k) * k);\n  }, function(date, step) {\n    date.setTime(+date + step * k);\n  }, function(start, end) {\n    return (end - start) / k;\n  });\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (millisecond);\nvar milliseconds = millisecond.range;\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale/node_modules/d3-time/src/minute.js\":\n/*!******************************************************************!*\\\n  !*** ./node_modules/d3-scale/node_modules/d3-time/src/minute.js ***!\n  \\******************************************************************/\n/*! exports provided: default, minutes */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"minutes\", function() { return minutes; });\n/* harmony import */ var _interval_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./interval.js */ \"./node_modules/d3-scale/node_modules/d3-time/src/interval.js\");\n/* harmony import */ var _duration_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./duration.js */ \"./node_modules/d3-scale/node_modules/d3-time/src/duration.js\");\n\n\n\nvar minute = Object(_interval_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function(date) {\n  date.setTime(date - date.getMilliseconds() - date.getSeconds() * _duration_js__WEBPACK_IMPORTED_MODULE_1__[\"durationSecond\"]);\n}, function(date, step) {\n  date.setTime(+date + step * _duration_js__WEBPACK_IMPORTED_MODULE_1__[\"durationMinute\"]);\n}, function(start, end) {\n  return (end - start) / _duration_js__WEBPACK_IMPORTED_MODULE_1__[\"durationMinute\"];\n}, function(date) {\n  return date.getMinutes();\n});\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (minute);\nvar minutes = minute.range;\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale/node_modules/d3-time/src/month.js\":\n/*!*****************************************************************!*\\\n  !*** ./node_modules/d3-scale/node_modules/d3-time/src/month.js ***!\n  \\*****************************************************************/\n/*! exports provided: default, months */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"months\", function() { return months; });\n/* harmony import */ var _interval_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./interval.js */ \"./node_modules/d3-scale/node_modules/d3-time/src/interval.js\");\n\n\nvar month = Object(_interval_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function(date) {\n  date.setDate(1);\n  date.setHours(0, 0, 0, 0);\n}, function(date, step) {\n  date.setMonth(date.getMonth() + step);\n}, function(start, end) {\n  return end.getMonth() - start.getMonth() + (end.getFullYear() - start.getFullYear()) * 12;\n}, function(date) {\n  return date.getMonth();\n});\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (month);\nvar months = month.range;\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale/node_modules/d3-time/src/second.js\":\n/*!******************************************************************!*\\\n  !*** ./node_modules/d3-scale/node_modules/d3-time/src/second.js ***!\n  \\******************************************************************/\n/*! exports provided: default, seconds */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"seconds\", function() { return seconds; });\n/* harmony import */ var _interval_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./interval.js */ \"./node_modules/d3-scale/node_modules/d3-time/src/interval.js\");\n/* harmony import */ var _duration_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./duration.js */ \"./node_modules/d3-scale/node_modules/d3-time/src/duration.js\");\n\n\n\nvar second = Object(_interval_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function(date) {\n  date.setTime(date - date.getMilliseconds());\n}, function(date, step) {\n  date.setTime(+date + step * _duration_js__WEBPACK_IMPORTED_MODULE_1__[\"durationSecond\"]);\n}, function(start, end) {\n  return (end - start) / _duration_js__WEBPACK_IMPORTED_MODULE_1__[\"durationSecond\"];\n}, function(date) {\n  return date.getUTCSeconds();\n});\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (second);\nvar seconds = second.range;\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale/node_modules/d3-time/src/ticks.js\":\n/*!*****************************************************************!*\\\n  !*** ./node_modules/d3-scale/node_modules/d3-time/src/ticks.js ***!\n  \\*****************************************************************/\n/*! exports provided: utcTicks, utcTickInterval, timeTicks, timeTickInterval */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"utcTicks\", function() { return utcTicks; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"utcTickInterval\", function() { return utcTickInterval; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"timeTicks\", function() { return timeTicks; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"timeTickInterval\", function() { return timeTickInterval; });\n/* harmony import */ var d3_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-array */ \"./node_modules/d3-scale/node_modules/d3-array/src/index.js\");\n/* harmony import */ var _duration_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./duration.js */ \"./node_modules/d3-scale/node_modules/d3-time/src/duration.js\");\n/* harmony import */ var _millisecond_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./millisecond.js */ \"./node_modules/d3-scale/node_modules/d3-time/src/millisecond.js\");\n/* harmony import */ var _second_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./second.js */ \"./node_modules/d3-scale/node_modules/d3-time/src/second.js\");\n/* harmony import */ var _minute_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./minute.js */ \"./node_modules/d3-scale/node_modules/d3-time/src/minute.js\");\n/* harmony import */ var _hour_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./hour.js */ \"./node_modules/d3-scale/node_modules/d3-time/src/hour.js\");\n/* harmony import */ var _day_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./day.js */ \"./node_modules/d3-scale/node_modules/d3-time/src/day.js\");\n/* harmony import */ var _week_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./week.js */ \"./node_modules/d3-scale/node_modules/d3-time/src/week.js\");\n/* harmony import */ var _month_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./month.js */ \"./node_modules/d3-scale/node_modules/d3-time/src/month.js\");\n/* harmony import */ var _year_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./year.js */ \"./node_modules/d3-scale/node_modules/d3-time/src/year.js\");\n/* harmony import */ var _utcMinute_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./utcMinute.js */ \"./node_modules/d3-scale/node_modules/d3-time/src/utcMinute.js\");\n/* harmony import */ var _utcHour_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./utcHour.js */ \"./node_modules/d3-scale/node_modules/d3-time/src/utcHour.js\");\n/* harmony import */ var _utcDay_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./utcDay.js */ \"./node_modules/d3-scale/node_modules/d3-time/src/utcDay.js\");\n/* harmony import */ var _utcWeek_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./utcWeek.js */ \"./node_modules/d3-scale/node_modules/d3-time/src/utcWeek.js\");\n/* harmony import */ var _utcMonth_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./utcMonth.js */ \"./node_modules/d3-scale/node_modules/d3-time/src/utcMonth.js\");\n/* harmony import */ var _utcYear_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./utcYear.js */ \"./node_modules/d3-scale/node_modules/d3-time/src/utcYear.js\");\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nfunction ticker(year, month, week, day, hour, minute) {\n\n  const tickIntervals = [\n    [_second_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"],  1,      _duration_js__WEBPACK_IMPORTED_MODULE_1__[\"durationSecond\"]],\n    [_second_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"],  5,  5 * _duration_js__WEBPACK_IMPORTED_MODULE_1__[\"durationSecond\"]],\n    [_second_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"], 15, 15 * _duration_js__WEBPACK_IMPORTED_MODULE_1__[\"durationSecond\"]],\n    [_second_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"], 30, 30 * _duration_js__WEBPACK_IMPORTED_MODULE_1__[\"durationSecond\"]],\n    [minute,  1,      _duration_js__WEBPACK_IMPORTED_MODULE_1__[\"durationMinute\"]],\n    [minute,  5,  5 * _duration_js__WEBPACK_IMPORTED_MODULE_1__[\"durationMinute\"]],\n    [minute, 15, 15 * _duration_js__WEBPACK_IMPORTED_MODULE_1__[\"durationMinute\"]],\n    [minute, 30, 30 * _duration_js__WEBPACK_IMPORTED_MODULE_1__[\"durationMinute\"]],\n    [  hour,  1,      _duration_js__WEBPACK_IMPORTED_MODULE_1__[\"durationHour\"]  ],\n    [  hour,  3,  3 * _duration_js__WEBPACK_IMPORTED_MODULE_1__[\"durationHour\"]  ],\n    [  hour,  6,  6 * _duration_js__WEBPACK_IMPORTED_MODULE_1__[\"durationHour\"]  ],\n    [  hour, 12, 12 * _duration_js__WEBPACK_IMPORTED_MODULE_1__[\"durationHour\"]  ],\n    [   day,  1,      _duration_js__WEBPACK_IMPORTED_MODULE_1__[\"durationDay\"]   ],\n    [   day,  2,  2 * _duration_js__WEBPACK_IMPORTED_MODULE_1__[\"durationDay\"]   ],\n    [  week,  1,      _duration_js__WEBPACK_IMPORTED_MODULE_1__[\"durationWeek\"]  ],\n    [ month,  1,      _duration_js__WEBPACK_IMPORTED_MODULE_1__[\"durationMonth\"] ],\n    [ month,  3,  3 * _duration_js__WEBPACK_IMPORTED_MODULE_1__[\"durationMonth\"] ],\n    [  year,  1,      _duration_js__WEBPACK_IMPORTED_MODULE_1__[\"durationYear\"]  ]\n  ];\n\n  function ticks(start, stop, count) {\n    const reverse = stop < start;\n    if (reverse) [start, stop] = [stop, start];\n    const interval = count && typeof count.range === \"function\" ? count : tickInterval(start, stop, count);\n    const ticks = interval ? interval.range(start, +stop + 1) : []; // inclusive stop\n    return reverse ? ticks.reverse() : ticks;\n  }\n\n  function tickInterval(start, stop, count) {\n    const target = Math.abs(stop - start) / count;\n    const i = Object(d3_array__WEBPACK_IMPORTED_MODULE_0__[\"bisector\"])(([,, step]) => step).right(tickIntervals, target);\n    if (i === tickIntervals.length) return year.every(Object(d3_array__WEBPACK_IMPORTED_MODULE_0__[\"tickStep\"])(start / _duration_js__WEBPACK_IMPORTED_MODULE_1__[\"durationYear\"], stop / _duration_js__WEBPACK_IMPORTED_MODULE_1__[\"durationYear\"], count));\n    if (i === 0) return _millisecond_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"].every(Math.max(Object(d3_array__WEBPACK_IMPORTED_MODULE_0__[\"tickStep\"])(start, stop, count), 1));\n    const [t, step] = tickIntervals[target / tickIntervals[i - 1][2] < tickIntervals[i][2] / target ? i - 1 : i];\n    return t.every(step);\n  }\n\n  return [ticks, tickInterval];\n}\n\nconst [utcTicks, utcTickInterval] = ticker(_utcYear_js__WEBPACK_IMPORTED_MODULE_15__[\"default\"], _utcMonth_js__WEBPACK_IMPORTED_MODULE_14__[\"default\"], _utcWeek_js__WEBPACK_IMPORTED_MODULE_13__[\"utcSunday\"], _utcDay_js__WEBPACK_IMPORTED_MODULE_12__[\"default\"], _utcHour_js__WEBPACK_IMPORTED_MODULE_11__[\"default\"], _utcMinute_js__WEBPACK_IMPORTED_MODULE_10__[\"default\"]);\nconst [timeTicks, timeTickInterval] = ticker(_year_js__WEBPACK_IMPORTED_MODULE_9__[\"default\"], _month_js__WEBPACK_IMPORTED_MODULE_8__[\"default\"], _week_js__WEBPACK_IMPORTED_MODULE_7__[\"sunday\"], _day_js__WEBPACK_IMPORTED_MODULE_6__[\"default\"], _hour_js__WEBPACK_IMPORTED_MODULE_5__[\"default\"], _minute_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"]);\n\n\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale/node_modules/d3-time/src/utcDay.js\":\n/*!******************************************************************!*\\\n  !*** ./node_modules/d3-scale/node_modules/d3-time/src/utcDay.js ***!\n  \\******************************************************************/\n/*! exports provided: default, utcDays */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"utcDays\", function() { return utcDays; });\n/* harmony import */ var _interval_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./interval.js */ \"./node_modules/d3-scale/node_modules/d3-time/src/interval.js\");\n/* harmony import */ var _duration_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./duration.js */ \"./node_modules/d3-scale/node_modules/d3-time/src/duration.js\");\n\n\n\nvar utcDay = Object(_interval_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function(date) {\n  date.setUTCHours(0, 0, 0, 0);\n}, function(date, step) {\n  date.setUTCDate(date.getUTCDate() + step);\n}, function(start, end) {\n  return (end - start) / _duration_js__WEBPACK_IMPORTED_MODULE_1__[\"durationDay\"];\n}, function(date) {\n  return date.getUTCDate() - 1;\n});\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (utcDay);\nvar utcDays = utcDay.range;\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale/node_modules/d3-time/src/utcHour.js\":\n/*!*******************************************************************!*\\\n  !*** ./node_modules/d3-scale/node_modules/d3-time/src/utcHour.js ***!\n  \\*******************************************************************/\n/*! exports provided: default, utcHours */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"utcHours\", function() { return utcHours; });\n/* harmony import */ var _interval_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./interval.js */ \"./node_modules/d3-scale/node_modules/d3-time/src/interval.js\");\n/* harmony import */ var _duration_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./duration.js */ \"./node_modules/d3-scale/node_modules/d3-time/src/duration.js\");\n\n\n\nvar utcHour = Object(_interval_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function(date) {\n  date.setUTCMinutes(0, 0, 0);\n}, function(date, step) {\n  date.setTime(+date + step * _duration_js__WEBPACK_IMPORTED_MODULE_1__[\"durationHour\"]);\n}, function(start, end) {\n  return (end - start) / _duration_js__WEBPACK_IMPORTED_MODULE_1__[\"durationHour\"];\n}, function(date) {\n  return date.getUTCHours();\n});\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (utcHour);\nvar utcHours = utcHour.range;\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale/node_modules/d3-time/src/utcMinute.js\":\n/*!*********************************************************************!*\\\n  !*** ./node_modules/d3-scale/node_modules/d3-time/src/utcMinute.js ***!\n  \\*********************************************************************/\n/*! exports provided: default, utcMinutes */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"utcMinutes\", function() { return utcMinutes; });\n/* harmony import */ var _interval_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./interval.js */ \"./node_modules/d3-scale/node_modules/d3-time/src/interval.js\");\n/* harmony import */ var _duration_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./duration.js */ \"./node_modules/d3-scale/node_modules/d3-time/src/duration.js\");\n\n\n\nvar utcMinute = Object(_interval_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function(date) {\n  date.setUTCSeconds(0, 0);\n}, function(date, step) {\n  date.setTime(+date + step * _duration_js__WEBPACK_IMPORTED_MODULE_1__[\"durationMinute\"]);\n}, function(start, end) {\n  return (end - start) / _duration_js__WEBPACK_IMPORTED_MODULE_1__[\"durationMinute\"];\n}, function(date) {\n  return date.getUTCMinutes();\n});\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (utcMinute);\nvar utcMinutes = utcMinute.range;\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale/node_modules/d3-time/src/utcMonth.js\":\n/*!********************************************************************!*\\\n  !*** ./node_modules/d3-scale/node_modules/d3-time/src/utcMonth.js ***!\n  \\********************************************************************/\n/*! exports provided: default, utcMonths */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"utcMonths\", function() { return utcMonths; });\n/* harmony import */ var _interval_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./interval.js */ \"./node_modules/d3-scale/node_modules/d3-time/src/interval.js\");\n\n\nvar utcMonth = Object(_interval_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function(date) {\n  date.setUTCDate(1);\n  date.setUTCHours(0, 0, 0, 0);\n}, function(date, step) {\n  date.setUTCMonth(date.getUTCMonth() + step);\n}, function(start, end) {\n  return end.getUTCMonth() - start.getUTCMonth() + (end.getUTCFullYear() - start.getUTCFullYear()) * 12;\n}, function(date) {\n  return date.getUTCMonth();\n});\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (utcMonth);\nvar utcMonths = utcMonth.range;\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale/node_modules/d3-time/src/utcWeek.js\":\n/*!*******************************************************************!*\\\n  !*** ./node_modules/d3-scale/node_modules/d3-time/src/utcWeek.js ***!\n  \\*******************************************************************/\n/*! exports provided: utcSunday, utcMonday, utcTuesday, utcWednesday, utcThursday, utcFriday, utcSaturday, utcSundays, utcMondays, utcTuesdays, utcWednesdays, utcThursdays, utcFridays, utcSaturdays */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"utcSunday\", function() { return utcSunday; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"utcMonday\", function() { return utcMonday; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"utcTuesday\", function() { return utcTuesday; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"utcWednesday\", function() { return utcWednesday; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"utcThursday\", function() { return utcThursday; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"utcFriday\", function() { return utcFriday; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"utcSaturday\", function() { return utcSaturday; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"utcSundays\", function() { return utcSundays; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"utcMondays\", function() { return utcMondays; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"utcTuesdays\", function() { return utcTuesdays; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"utcWednesdays\", function() { return utcWednesdays; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"utcThursdays\", function() { return utcThursdays; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"utcFridays\", function() { return utcFridays; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"utcSaturdays\", function() { return utcSaturdays; });\n/* harmony import */ var _interval_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./interval.js */ \"./node_modules/d3-scale/node_modules/d3-time/src/interval.js\");\n/* harmony import */ var _duration_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./duration.js */ \"./node_modules/d3-scale/node_modules/d3-time/src/duration.js\");\n\n\n\nfunction utcWeekday(i) {\n  return Object(_interval_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function(date) {\n    date.setUTCDate(date.getUTCDate() - (date.getUTCDay() + 7 - i) % 7);\n    date.setUTCHours(0, 0, 0, 0);\n  }, function(date, step) {\n    date.setUTCDate(date.getUTCDate() + step * 7);\n  }, function(start, end) {\n    return (end - start) / _duration_js__WEBPACK_IMPORTED_MODULE_1__[\"durationWeek\"];\n  });\n}\n\nvar utcSunday = utcWeekday(0);\nvar utcMonday = utcWeekday(1);\nvar utcTuesday = utcWeekday(2);\nvar utcWednesday = utcWeekday(3);\nvar utcThursday = utcWeekday(4);\nvar utcFriday = utcWeekday(5);\nvar utcSaturday = utcWeekday(6);\n\nvar utcSundays = utcSunday.range;\nvar utcMondays = utcMonday.range;\nvar utcTuesdays = utcTuesday.range;\nvar utcWednesdays = utcWednesday.range;\nvar utcThursdays = utcThursday.range;\nvar utcFridays = utcFriday.range;\nvar utcSaturdays = utcSaturday.range;\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale/node_modules/d3-time/src/utcYear.js\":\n/*!*******************************************************************!*\\\n  !*** ./node_modules/d3-scale/node_modules/d3-time/src/utcYear.js ***!\n  \\*******************************************************************/\n/*! exports provided: default, utcYears */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"utcYears\", function() { return utcYears; });\n/* harmony import */ var _interval_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./interval.js */ \"./node_modules/d3-scale/node_modules/d3-time/src/interval.js\");\n\n\nvar utcYear = Object(_interval_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function(date) {\n  date.setUTCMonth(0, 1);\n  date.setUTCHours(0, 0, 0, 0);\n}, function(date, step) {\n  date.setUTCFullYear(date.getUTCFullYear() + step);\n}, function(start, end) {\n  return end.getUTCFullYear() - start.getUTCFullYear();\n}, function(date) {\n  return date.getUTCFullYear();\n});\n\n// An optimized implementation for this simple case.\nutcYear.every = function(k) {\n  return !isFinite(k = Math.floor(k)) || !(k > 0) ? null : Object(_interval_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function(date) {\n    date.setUTCFullYear(Math.floor(date.getUTCFullYear() / k) * k);\n    date.setUTCMonth(0, 1);\n    date.setUTCHours(0, 0, 0, 0);\n  }, function(date, step) {\n    date.setUTCFullYear(date.getUTCFullYear() + step * k);\n  });\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (utcYear);\nvar utcYears = utcYear.range;\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale/node_modules/d3-time/src/week.js\":\n/*!****************************************************************!*\\\n  !*** ./node_modules/d3-scale/node_modules/d3-time/src/week.js ***!\n  \\****************************************************************/\n/*! exports provided: sunday, monday, tuesday, wednesday, thursday, friday, saturday, sundays, mondays, tuesdays, wednesdays, thursdays, fridays, saturdays */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"sunday\", function() { return sunday; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"monday\", function() { return monday; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"tuesday\", function() { return tuesday; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"wednesday\", function() { return wednesday; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"thursday\", function() { return thursday; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"friday\", function() { return friday; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"saturday\", function() { return saturday; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"sundays\", function() { return sundays; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"mondays\", function() { return mondays; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"tuesdays\", function() { return tuesdays; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"wednesdays\", function() { return wednesdays; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"thursdays\", function() { return thursdays; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"fridays\", function() { return fridays; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"saturdays\", function() { return saturdays; });\n/* harmony import */ var _interval_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./interval.js */ \"./node_modules/d3-scale/node_modules/d3-time/src/interval.js\");\n/* harmony import */ var _duration_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./duration.js */ \"./node_modules/d3-scale/node_modules/d3-time/src/duration.js\");\n\n\n\nfunction weekday(i) {\n  return Object(_interval_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function(date) {\n    date.setDate(date.getDate() - (date.getDay() + 7 - i) % 7);\n    date.setHours(0, 0, 0, 0);\n  }, function(date, step) {\n    date.setDate(date.getDate() + step * 7);\n  }, function(start, end) {\n    return (end - start - (end.getTimezoneOffset() - start.getTimezoneOffset()) * _duration_js__WEBPACK_IMPORTED_MODULE_1__[\"durationMinute\"]) / _duration_js__WEBPACK_IMPORTED_MODULE_1__[\"durationWeek\"];\n  });\n}\n\nvar sunday = weekday(0);\nvar monday = weekday(1);\nvar tuesday = weekday(2);\nvar wednesday = weekday(3);\nvar thursday = weekday(4);\nvar friday = weekday(5);\nvar saturday = weekday(6);\n\nvar sundays = sunday.range;\nvar mondays = monday.range;\nvar tuesdays = tuesday.range;\nvar wednesdays = wednesday.range;\nvar thursdays = thursday.range;\nvar fridays = friday.range;\nvar saturdays = saturday.range;\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale/node_modules/d3-time/src/year.js\":\n/*!****************************************************************!*\\\n  !*** ./node_modules/d3-scale/node_modules/d3-time/src/year.js ***!\n  \\****************************************************************/\n/*! exports provided: default, years */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"years\", function() { return years; });\n/* harmony import */ var _interval_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./interval.js */ \"./node_modules/d3-scale/node_modules/d3-time/src/interval.js\");\n\n\nvar year = Object(_interval_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function(date) {\n  date.setMonth(0, 1);\n  date.setHours(0, 0, 0, 0);\n}, function(date, step) {\n  date.setFullYear(date.getFullYear() + step);\n}, function(start, end) {\n  return end.getFullYear() - start.getFullYear();\n}, function(date) {\n  return date.getFullYear();\n});\n\n// An optimized implementation for this simple case.\nyear.every = function(k) {\n  return !isFinite(k = Math.floor(k)) || !(k > 0) ? null : Object(_interval_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function(date) {\n    date.setFullYear(Math.floor(date.getFullYear() / k) * k);\n    date.setMonth(0, 1);\n    date.setHours(0, 0, 0, 0);\n  }, function(date, step) {\n    date.setFullYear(date.getFullYear() + step * k);\n  });\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (year);\nvar years = year.range;\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale/src/band.js\":\n/*!*******************************************!*\\\n  !*** ./node_modules/d3-scale/src/band.js ***!\n  \\*******************************************/\n/*! exports provided: default, point */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return band; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"point\", function() { return point; });\n/* harmony import */ var d3_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-array */ \"./node_modules/d3-scale/node_modules/d3-array/src/index.js\");\n/* harmony import */ var _init_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./init.js */ \"./node_modules/d3-scale/src/init.js\");\n/* harmony import */ var _ordinal_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./ordinal.js */ \"./node_modules/d3-scale/src/ordinal.js\");\n\n\n\n\nfunction band() {\n  var scale = Object(_ordinal_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])().unknown(undefined),\n      domain = scale.domain,\n      ordinalRange = scale.range,\n      r0 = 0,\n      r1 = 1,\n      step,\n      bandwidth,\n      round = false,\n      paddingInner = 0,\n      paddingOuter = 0,\n      align = 0.5;\n\n  delete scale.unknown;\n\n  function rescale() {\n    var n = domain().length,\n        reverse = r1 < r0,\n        start = reverse ? r1 : r0,\n        stop = reverse ? r0 : r1;\n    step = (stop - start) / Math.max(1, n - paddingInner + paddingOuter * 2);\n    if (round) step = Math.floor(step);\n    start += (stop - start - step * (n - paddingInner)) * align;\n    bandwidth = step * (1 - paddingInner);\n    if (round) start = Math.round(start), bandwidth = Math.round(bandwidth);\n    var values = Object(d3_array__WEBPACK_IMPORTED_MODULE_0__[\"range\"])(n).map(function(i) { return start + step * i; });\n    return ordinalRange(reverse ? values.reverse() : values);\n  }\n\n  scale.domain = function(_) {\n    return arguments.length ? (domain(_), rescale()) : domain();\n  };\n\n  scale.range = function(_) {\n    return arguments.length ? ([r0, r1] = _, r0 = +r0, r1 = +r1, rescale()) : [r0, r1];\n  };\n\n  scale.rangeRound = function(_) {\n    return [r0, r1] = _, r0 = +r0, r1 = +r1, round = true, rescale();\n  };\n\n  scale.bandwidth = function() {\n    return bandwidth;\n  };\n\n  scale.step = function() {\n    return step;\n  };\n\n  scale.round = function(_) {\n    return arguments.length ? (round = !!_, rescale()) : round;\n  };\n\n  scale.padding = function(_) {\n    return arguments.length ? (paddingInner = Math.min(1, paddingOuter = +_), rescale()) : paddingInner;\n  };\n\n  scale.paddingInner = function(_) {\n    return arguments.length ? (paddingInner = Math.min(1, _), rescale()) : paddingInner;\n  };\n\n  scale.paddingOuter = function(_) {\n    return arguments.length ? (paddingOuter = +_, rescale()) : paddingOuter;\n  };\n\n  scale.align = function(_) {\n    return arguments.length ? (align = Math.max(0, Math.min(1, _)), rescale()) : align;\n  };\n\n  scale.copy = function() {\n    return band(domain(), [r0, r1])\n        .round(round)\n        .paddingInner(paddingInner)\n        .paddingOuter(paddingOuter)\n        .align(align);\n  };\n\n  return _init_js__WEBPACK_IMPORTED_MODULE_1__[\"initRange\"].apply(rescale(), arguments);\n}\n\nfunction pointish(scale) {\n  var copy = scale.copy;\n\n  scale.padding = scale.paddingOuter;\n  delete scale.paddingInner;\n  delete scale.paddingOuter;\n\n  scale.copy = function() {\n    return pointish(copy());\n  };\n\n  return scale;\n}\n\nfunction point() {\n  return pointish(band.apply(null, arguments).paddingInner(1));\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale/src/constant.js\":\n/*!***********************************************!*\\\n  !*** ./node_modules/d3-scale/src/constant.js ***!\n  \\***********************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return constants; });\nfunction constants(x) {\n  return function() {\n    return x;\n  };\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale/src/continuous.js\":\n/*!*************************************************!*\\\n  !*** ./node_modules/d3-scale/src/continuous.js ***!\n  \\*************************************************/\n/*! exports provided: identity, copy, transformer, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"identity\", function() { return identity; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"copy\", function() { return copy; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"transformer\", function() { return transformer; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return continuous; });\n/* harmony import */ var d3_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-array */ \"./node_modules/d3-scale/node_modules/d3-array/src/index.js\");\n/* harmony import */ var d3_interpolate__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! d3-interpolate */ \"./node_modules/d3-scale/node_modules/d3-interpolate/src/index.js\");\n/* harmony import */ var _constant_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./constant.js */ \"./node_modules/d3-scale/src/constant.js\");\n/* harmony import */ var _number_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./number.js */ \"./node_modules/d3-scale/src/number.js\");\n\n\n\n\n\nvar unit = [0, 1];\n\nfunction identity(x) {\n  return x;\n}\n\nfunction normalize(a, b) {\n  return (b -= (a = +a))\n      ? function(x) { return (x - a) / b; }\n      : Object(_constant_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(isNaN(b) ? NaN : 0.5);\n}\n\nfunction clamper(a, b) {\n  var t;\n  if (a > b) t = a, a = b, b = t;\n  return function(x) { return Math.max(a, Math.min(b, x)); };\n}\n\n// normalize(a, b)(x) takes a domain value x in [a,b] and returns the corresponding parameter t in [0,1].\n// interpolate(a, b)(t) takes a parameter t in [0,1] and returns the corresponding range value x in [a,b].\nfunction bimap(domain, range, interpolate) {\n  var d0 = domain[0], d1 = domain[1], r0 = range[0], r1 = range[1];\n  if (d1 < d0) d0 = normalize(d1, d0), r0 = interpolate(r1, r0);\n  else d0 = normalize(d0, d1), r0 = interpolate(r0, r1);\n  return function(x) { return r0(d0(x)); };\n}\n\nfunction polymap(domain, range, interpolate) {\n  var j = Math.min(domain.length, range.length) - 1,\n      d = new Array(j),\n      r = new Array(j),\n      i = -1;\n\n  // Reverse descending domains.\n  if (domain[j] < domain[0]) {\n    domain = domain.slice().reverse();\n    range = range.slice().reverse();\n  }\n\n  while (++i < j) {\n    d[i] = normalize(domain[i], domain[i + 1]);\n    r[i] = interpolate(range[i], range[i + 1]);\n  }\n\n  return function(x) {\n    var i = Object(d3_array__WEBPACK_IMPORTED_MODULE_0__[\"bisect\"])(domain, x, 1, j) - 1;\n    return r[i](d[i](x));\n  };\n}\n\nfunction copy(source, target) {\n  return target\n      .domain(source.domain())\n      .range(source.range())\n      .interpolate(source.interpolate())\n      .clamp(source.clamp())\n      .unknown(source.unknown());\n}\n\nfunction transformer() {\n  var domain = unit,\n      range = unit,\n      interpolate = d3_interpolate__WEBPACK_IMPORTED_MODULE_1__[\"interpolate\"],\n      transform,\n      untransform,\n      unknown,\n      clamp = identity,\n      piecewise,\n      output,\n      input;\n\n  function rescale() {\n    var n = Math.min(domain.length, range.length);\n    if (clamp !== identity) clamp = clamper(domain[0], domain[n - 1]);\n    piecewise = n > 2 ? polymap : bimap;\n    output = input = null;\n    return scale;\n  }\n\n  function scale(x) {\n    return x == null || isNaN(x = +x) ? unknown : (output || (output = piecewise(domain.map(transform), range, interpolate)))(transform(clamp(x)));\n  }\n\n  scale.invert = function(y) {\n    return clamp(untransform((input || (input = piecewise(range, domain.map(transform), d3_interpolate__WEBPACK_IMPORTED_MODULE_1__[\"interpolateNumber\"])))(y)));\n  };\n\n  scale.domain = function(_) {\n    return arguments.length ? (domain = Array.from(_, _number_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"]), rescale()) : domain.slice();\n  };\n\n  scale.range = function(_) {\n    return arguments.length ? (range = Array.from(_), rescale()) : range.slice();\n  };\n\n  scale.rangeRound = function(_) {\n    return range = Array.from(_), interpolate = d3_interpolate__WEBPACK_IMPORTED_MODULE_1__[\"interpolateRound\"], rescale();\n  };\n\n  scale.clamp = function(_) {\n    return arguments.length ? (clamp = _ ? true : identity, rescale()) : clamp !== identity;\n  };\n\n  scale.interpolate = function(_) {\n    return arguments.length ? (interpolate = _, rescale()) : interpolate;\n  };\n\n  scale.unknown = function(_) {\n    return arguments.length ? (unknown = _, scale) : unknown;\n  };\n\n  return function(t, u) {\n    transform = t, untransform = u;\n    return rescale();\n  };\n}\n\nfunction continuous() {\n  return transformer()(identity, identity);\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale/src/diverging.js\":\n/*!************************************************!*\\\n  !*** ./node_modules/d3-scale/src/diverging.js ***!\n  \\************************************************/\n/*! exports provided: default, divergingLog, divergingSymlog, divergingPow, divergingSqrt */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return diverging; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"divergingLog\", function() { return divergingLog; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"divergingSymlog\", function() { return divergingSymlog; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"divergingPow\", function() { return divergingPow; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"divergingSqrt\", function() { return divergingSqrt; });\n/* harmony import */ var d3_interpolate__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-interpolate */ \"./node_modules/d3-scale/node_modules/d3-interpolate/src/index.js\");\n/* harmony import */ var _continuous_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./continuous.js */ \"./node_modules/d3-scale/src/continuous.js\");\n/* harmony import */ var _init_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./init.js */ \"./node_modules/d3-scale/src/init.js\");\n/* harmony import */ var _linear_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./linear.js */ \"./node_modules/d3-scale/src/linear.js\");\n/* harmony import */ var _log_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./log.js */ \"./node_modules/d3-scale/src/log.js\");\n/* harmony import */ var _sequential_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./sequential.js */ \"./node_modules/d3-scale/src/sequential.js\");\n/* harmony import */ var _symlog_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./symlog.js */ \"./node_modules/d3-scale/src/symlog.js\");\n/* harmony import */ var _pow_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./pow.js */ \"./node_modules/d3-scale/src/pow.js\");\n\n\n\n\n\n\n\n\n\nfunction transformer() {\n  var x0 = 0,\n      x1 = 0.5,\n      x2 = 1,\n      s = 1,\n      t0,\n      t1,\n      t2,\n      k10,\n      k21,\n      interpolator = _continuous_js__WEBPACK_IMPORTED_MODULE_1__[\"identity\"],\n      transform,\n      clamp = false,\n      unknown;\n\n  function scale(x) {\n    return isNaN(x = +x) ? unknown : (x = 0.5 + ((x = +transform(x)) - t1) * (s * x < s * t1 ? k10 : k21), interpolator(clamp ? Math.max(0, Math.min(1, x)) : x));\n  }\n\n  scale.domain = function(_) {\n    return arguments.length ? ([x0, x1, x2] = _, t0 = transform(x0 = +x0), t1 = transform(x1 = +x1), t2 = transform(x2 = +x2), k10 = t0 === t1 ? 0 : 0.5 / (t1 - t0), k21 = t1 === t2 ? 0 : 0.5 / (t2 - t1), s = t1 < t0 ? -1 : 1, scale) : [x0, x1, x2];\n  };\n\n  scale.clamp = function(_) {\n    return arguments.length ? (clamp = !!_, scale) : clamp;\n  };\n\n  scale.interpolator = function(_) {\n    return arguments.length ? (interpolator = _, scale) : interpolator;\n  };\n\n  function range(interpolate) {\n    return function(_) {\n      var r0, r1, r2;\n      return arguments.length ? ([r0, r1, r2] = _, interpolator = Object(d3_interpolate__WEBPACK_IMPORTED_MODULE_0__[\"piecewise\"])(interpolate, [r0, r1, r2]), scale) : [interpolator(0), interpolator(0.5), interpolator(1)];\n    };\n  }\n\n  scale.range = range(d3_interpolate__WEBPACK_IMPORTED_MODULE_0__[\"interpolate\"]);\n\n  scale.rangeRound = range(d3_interpolate__WEBPACK_IMPORTED_MODULE_0__[\"interpolateRound\"]);\n\n  scale.unknown = function(_) {\n    return arguments.length ? (unknown = _, scale) : unknown;\n  };\n\n  return function(t) {\n    transform = t, t0 = t(x0), t1 = t(x1), t2 = t(x2), k10 = t0 === t1 ? 0 : 0.5 / (t1 - t0), k21 = t1 === t2 ? 0 : 0.5 / (t2 - t1), s = t1 < t0 ? -1 : 1;\n    return scale;\n  };\n}\n\nfunction diverging() {\n  var scale = Object(_linear_js__WEBPACK_IMPORTED_MODULE_3__[\"linearish\"])(transformer()(_continuous_js__WEBPACK_IMPORTED_MODULE_1__[\"identity\"]));\n\n  scale.copy = function() {\n    return Object(_sequential_js__WEBPACK_IMPORTED_MODULE_5__[\"copy\"])(scale, diverging());\n  };\n\n  return _init_js__WEBPACK_IMPORTED_MODULE_2__[\"initInterpolator\"].apply(scale, arguments);\n}\n\nfunction divergingLog() {\n  var scale = Object(_log_js__WEBPACK_IMPORTED_MODULE_4__[\"loggish\"])(transformer()).domain([0.1, 1, 10]);\n\n  scale.copy = function() {\n    return Object(_sequential_js__WEBPACK_IMPORTED_MODULE_5__[\"copy\"])(scale, divergingLog()).base(scale.base());\n  };\n\n  return _init_js__WEBPACK_IMPORTED_MODULE_2__[\"initInterpolator\"].apply(scale, arguments);\n}\n\nfunction divergingSymlog() {\n  var scale = Object(_symlog_js__WEBPACK_IMPORTED_MODULE_6__[\"symlogish\"])(transformer());\n\n  scale.copy = function() {\n    return Object(_sequential_js__WEBPACK_IMPORTED_MODULE_5__[\"copy\"])(scale, divergingSymlog()).constant(scale.constant());\n  };\n\n  return _init_js__WEBPACK_IMPORTED_MODULE_2__[\"initInterpolator\"].apply(scale, arguments);\n}\n\nfunction divergingPow() {\n  var scale = Object(_pow_js__WEBPACK_IMPORTED_MODULE_7__[\"powish\"])(transformer());\n\n  scale.copy = function() {\n    return Object(_sequential_js__WEBPACK_IMPORTED_MODULE_5__[\"copy\"])(scale, divergingPow()).exponent(scale.exponent());\n  };\n\n  return _init_js__WEBPACK_IMPORTED_MODULE_2__[\"initInterpolator\"].apply(scale, arguments);\n}\n\nfunction divergingSqrt() {\n  return divergingPow.apply(null, arguments).exponent(0.5);\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale/src/identity.js\":\n/*!***********************************************!*\\\n  !*** ./node_modules/d3-scale/src/identity.js ***!\n  \\***********************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return identity; });\n/* harmony import */ var _linear_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./linear.js */ \"./node_modules/d3-scale/src/linear.js\");\n/* harmony import */ var _number_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./number.js */ \"./node_modules/d3-scale/src/number.js\");\n\n\n\nfunction identity(domain) {\n  var unknown;\n\n  function scale(x) {\n    return x == null || isNaN(x = +x) ? unknown : x;\n  }\n\n  scale.invert = scale;\n\n  scale.domain = scale.range = function(_) {\n    return arguments.length ? (domain = Array.from(_, _number_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"]), scale) : domain.slice();\n  };\n\n  scale.unknown = function(_) {\n    return arguments.length ? (unknown = _, scale) : unknown;\n  };\n\n  scale.copy = function() {\n    return identity(domain).unknown(unknown);\n  };\n\n  domain = arguments.length ? Array.from(domain, _number_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"]) : [0, 1];\n\n  return Object(_linear_js__WEBPACK_IMPORTED_MODULE_0__[\"linearish\"])(scale);\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale/src/index.js\":\n/*!********************************************!*\\\n  !*** ./node_modules/d3-scale/src/index.js ***!\n  \\********************************************/\n/*! exports provided: scaleBand, scalePoint, scaleIdentity, scaleLinear, scaleLog, scaleSymlog, scaleOrdinal, scaleImplicit, scalePow, scaleSqrt, scaleRadial, scaleQuantile, scaleQuantize, scaleThreshold, scaleTime, scaleUtc, scaleSequential, scaleSequentialLog, scaleSequentialPow, scaleSequentialSqrt, scaleSequentialSymlog, scaleSequentialQuantile, scaleDiverging, scaleDivergingLog, scaleDivergingPow, scaleDivergingSqrt, scaleDivergingSymlog, tickFormat */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _band_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./band.js */ \"./node_modules/d3-scale/src/band.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"scaleBand\", function() { return _band_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"scalePoint\", function() { return _band_js__WEBPACK_IMPORTED_MODULE_0__[\"point\"]; });\n\n/* harmony import */ var _identity_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./identity.js */ \"./node_modules/d3-scale/src/identity.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"scaleIdentity\", function() { return _identity_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"]; });\n\n/* harmony import */ var _linear_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./linear.js */ \"./node_modules/d3-scale/src/linear.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"scaleLinear\", function() { return _linear_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"]; });\n\n/* harmony import */ var _log_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./log.js */ \"./node_modules/d3-scale/src/log.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"scaleLog\", function() { return _log_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"]; });\n\n/* harmony import */ var _symlog_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./symlog.js */ \"./node_modules/d3-scale/src/symlog.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"scaleSymlog\", function() { return _symlog_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"]; });\n\n/* harmony import */ var _ordinal_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./ordinal.js */ \"./node_modules/d3-scale/src/ordinal.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"scaleOrdinal\", function() { return _ordinal_js__WEBPACK_IMPORTED_MODULE_5__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"scaleImplicit\", function() { return _ordinal_js__WEBPACK_IMPORTED_MODULE_5__[\"implicit\"]; });\n\n/* harmony import */ var _pow_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./pow.js */ \"./node_modules/d3-scale/src/pow.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"scalePow\", function() { return _pow_js__WEBPACK_IMPORTED_MODULE_6__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"scaleSqrt\", function() { return _pow_js__WEBPACK_IMPORTED_MODULE_6__[\"sqrt\"]; });\n\n/* harmony import */ var _radial_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./radial.js */ \"./node_modules/d3-scale/src/radial.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"scaleRadial\", function() { return _radial_js__WEBPACK_IMPORTED_MODULE_7__[\"default\"]; });\n\n/* harmony import */ var _quantile_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./quantile.js */ \"./node_modules/d3-scale/src/quantile.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"scaleQuantile\", function() { return _quantile_js__WEBPACK_IMPORTED_MODULE_8__[\"default\"]; });\n\n/* harmony import */ var _quantize_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./quantize.js */ \"./node_modules/d3-scale/src/quantize.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"scaleQuantize\", function() { return _quantize_js__WEBPACK_IMPORTED_MODULE_9__[\"default\"]; });\n\n/* harmony import */ var _threshold_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./threshold.js */ \"./node_modules/d3-scale/src/threshold.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"scaleThreshold\", function() { return _threshold_js__WEBPACK_IMPORTED_MODULE_10__[\"default\"]; });\n\n/* harmony import */ var _time_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./time.js */ \"./node_modules/d3-scale/src/time.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"scaleTime\", function() { return _time_js__WEBPACK_IMPORTED_MODULE_11__[\"default\"]; });\n\n/* harmony import */ var _utcTime_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./utcTime.js */ \"./node_modules/d3-scale/src/utcTime.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"scaleUtc\", function() { return _utcTime_js__WEBPACK_IMPORTED_MODULE_12__[\"default\"]; });\n\n/* harmony import */ var _sequential_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./sequential.js */ \"./node_modules/d3-scale/src/sequential.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"scaleSequential\", function() { return _sequential_js__WEBPACK_IMPORTED_MODULE_13__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"scaleSequentialLog\", function() { return _sequential_js__WEBPACK_IMPORTED_MODULE_13__[\"sequentialLog\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"scaleSequentialPow\", function() { return _sequential_js__WEBPACK_IMPORTED_MODULE_13__[\"sequentialPow\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"scaleSequentialSqrt\", function() { return _sequential_js__WEBPACK_IMPORTED_MODULE_13__[\"sequentialSqrt\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"scaleSequentialSymlog\", function() { return _sequential_js__WEBPACK_IMPORTED_MODULE_13__[\"sequentialSymlog\"]; });\n\n/* harmony import */ var _sequentialQuantile_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./sequentialQuantile.js */ \"./node_modules/d3-scale/src/sequentialQuantile.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"scaleSequentialQuantile\", function() { return _sequentialQuantile_js__WEBPACK_IMPORTED_MODULE_14__[\"default\"]; });\n\n/* harmony import */ var _diverging_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./diverging.js */ \"./node_modules/d3-scale/src/diverging.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"scaleDiverging\", function() { return _diverging_js__WEBPACK_IMPORTED_MODULE_15__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"scaleDivergingLog\", function() { return _diverging_js__WEBPACK_IMPORTED_MODULE_15__[\"divergingLog\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"scaleDivergingPow\", function() { return _diverging_js__WEBPACK_IMPORTED_MODULE_15__[\"divergingPow\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"scaleDivergingSqrt\", function() { return _diverging_js__WEBPACK_IMPORTED_MODULE_15__[\"divergingSqrt\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"scaleDivergingSymlog\", function() { return _diverging_js__WEBPACK_IMPORTED_MODULE_15__[\"divergingSymlog\"]; });\n\n/* harmony import */ var _tickFormat_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./tickFormat.js */ \"./node_modules/d3-scale/src/tickFormat.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"tickFormat\", function() { return _tickFormat_js__WEBPACK_IMPORTED_MODULE_16__[\"default\"]; });\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale/src/init.js\":\n/*!*******************************************!*\\\n  !*** ./node_modules/d3-scale/src/init.js ***!\n  \\*******************************************/\n/*! exports provided: initRange, initInterpolator */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"initRange\", function() { return initRange; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"initInterpolator\", function() { return initInterpolator; });\nfunction initRange(domain, range) {\n  switch (arguments.length) {\n    case 0: break;\n    case 1: this.range(domain); break;\n    default: this.range(range).domain(domain); break;\n  }\n  return this;\n}\n\nfunction initInterpolator(domain, interpolator) {\n  switch (arguments.length) {\n    case 0: break;\n    case 1: {\n      if (typeof domain === \"function\") this.interpolator(domain);\n      else this.range(domain);\n      break;\n    }\n    default: {\n      this.domain(domain);\n      if (typeof interpolator === \"function\") this.interpolator(interpolator);\n      else this.range(interpolator);\n      break;\n    }\n  }\n  return this;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale/src/linear.js\":\n/*!*********************************************!*\\\n  !*** ./node_modules/d3-scale/src/linear.js ***!\n  \\*********************************************/\n/*! exports provided: linearish, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"linearish\", function() { return linearish; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return linear; });\n/* harmony import */ var d3_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-array */ \"./node_modules/d3-scale/node_modules/d3-array/src/index.js\");\n/* harmony import */ var _continuous_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./continuous.js */ \"./node_modules/d3-scale/src/continuous.js\");\n/* harmony import */ var _init_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./init.js */ \"./node_modules/d3-scale/src/init.js\");\n/* harmony import */ var _tickFormat_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./tickFormat.js */ \"./node_modules/d3-scale/src/tickFormat.js\");\n\n\n\n\n\nfunction linearish(scale) {\n  var domain = scale.domain;\n\n  scale.ticks = function(count) {\n    var d = domain();\n    return Object(d3_array__WEBPACK_IMPORTED_MODULE_0__[\"ticks\"])(d[0], d[d.length - 1], count == null ? 10 : count);\n  };\n\n  scale.tickFormat = function(count, specifier) {\n    var d = domain();\n    return Object(_tickFormat_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(d[0], d[d.length - 1], count == null ? 10 : count, specifier);\n  };\n\n  scale.nice = function(count) {\n    if (count == null) count = 10;\n\n    var d = domain();\n    var i0 = 0;\n    var i1 = d.length - 1;\n    var start = d[i0];\n    var stop = d[i1];\n    var prestep;\n    var step;\n    var maxIter = 10;\n\n    if (stop < start) {\n      step = start, start = stop, stop = step;\n      step = i0, i0 = i1, i1 = step;\n    }\n    \n    while (maxIter-- > 0) {\n      step = Object(d3_array__WEBPACK_IMPORTED_MODULE_0__[\"tickIncrement\"])(start, stop, count);\n      if (step === prestep) {\n        d[i0] = start\n        d[i1] = stop\n        return domain(d);\n      } else if (step > 0) {\n        start = Math.floor(start / step) * step;\n        stop = Math.ceil(stop / step) * step;\n      } else if (step < 0) {\n        start = Math.ceil(start * step) / step;\n        stop = Math.floor(stop * step) / step;\n      } else {\n        break;\n      }\n      prestep = step;\n    }\n\n    return scale;\n  };\n\n  return scale;\n}\n\nfunction linear() {\n  var scale = Object(_continuous_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])();\n\n  scale.copy = function() {\n    return Object(_continuous_js__WEBPACK_IMPORTED_MODULE_1__[\"copy\"])(scale, linear());\n  };\n\n  _init_js__WEBPACK_IMPORTED_MODULE_2__[\"initRange\"].apply(scale, arguments);\n\n  return linearish(scale);\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale/src/log.js\":\n/*!******************************************!*\\\n  !*** ./node_modules/d3-scale/src/log.js ***!\n  \\******************************************/\n/*! exports provided: loggish, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"loggish\", function() { return loggish; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return log; });\n/* harmony import */ var d3_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-array */ \"./node_modules/d3-scale/node_modules/d3-array/src/index.js\");\n/* harmony import */ var d3_format__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! d3-format */ \"./node_modules/d3-scale/node_modules/d3-format/src/index.js\");\n/* harmony import */ var _nice_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./nice.js */ \"./node_modules/d3-scale/src/nice.js\");\n/* harmony import */ var _continuous_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./continuous.js */ \"./node_modules/d3-scale/src/continuous.js\");\n/* harmony import */ var _init_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./init.js */ \"./node_modules/d3-scale/src/init.js\");\n\n\n\n\n\n\nfunction transformLog(x) {\n  return Math.log(x);\n}\n\nfunction transformExp(x) {\n  return Math.exp(x);\n}\n\nfunction transformLogn(x) {\n  return -Math.log(-x);\n}\n\nfunction transformExpn(x) {\n  return -Math.exp(-x);\n}\n\nfunction pow10(x) {\n  return isFinite(x) ? +(\"1e\" + x) : x < 0 ? 0 : x;\n}\n\nfunction powp(base) {\n  return base === 10 ? pow10\n      : base === Math.E ? Math.exp\n      : function(x) { return Math.pow(base, x); };\n}\n\nfunction logp(base) {\n  return base === Math.E ? Math.log\n      : base === 10 && Math.log10\n      || base === 2 && Math.log2\n      || (base = Math.log(base), function(x) { return Math.log(x) / base; });\n}\n\nfunction reflect(f) {\n  return function(x) {\n    return -f(-x);\n  };\n}\n\nfunction loggish(transform) {\n  var scale = transform(transformLog, transformExp),\n      domain = scale.domain,\n      base = 10,\n      logs,\n      pows;\n\n  function rescale() {\n    logs = logp(base), pows = powp(base);\n    if (domain()[0] < 0) {\n      logs = reflect(logs), pows = reflect(pows);\n      transform(transformLogn, transformExpn);\n    } else {\n      transform(transformLog, transformExp);\n    }\n    return scale;\n  }\n\n  scale.base = function(_) {\n    return arguments.length ? (base = +_, rescale()) : base;\n  };\n\n  scale.domain = function(_) {\n    return arguments.length ? (domain(_), rescale()) : domain();\n  };\n\n  scale.ticks = function(count) {\n    var d = domain(),\n        u = d[0],\n        v = d[d.length - 1],\n        r;\n\n    if (r = v < u) i = u, u = v, v = i;\n\n    var i = logs(u),\n        j = logs(v),\n        p,\n        k,\n        t,\n        n = count == null ? 10 : +count,\n        z = [];\n\n    if (!(base % 1) && j - i < n) {\n      i = Math.floor(i), j = Math.ceil(j);\n      if (u > 0) for (; i <= j; ++i) {\n        for (k = 1, p = pows(i); k < base; ++k) {\n          t = p * k;\n          if (t < u) continue;\n          if (t > v) break;\n          z.push(t);\n        }\n      } else for (; i <= j; ++i) {\n        for (k = base - 1, p = pows(i); k >= 1; --k) {\n          t = p * k;\n          if (t < u) continue;\n          if (t > v) break;\n          z.push(t);\n        }\n      }\n      if (z.length * 2 < n) z = Object(d3_array__WEBPACK_IMPORTED_MODULE_0__[\"ticks\"])(u, v, n);\n    } else {\n      z = Object(d3_array__WEBPACK_IMPORTED_MODULE_0__[\"ticks\"])(i, j, Math.min(j - i, n)).map(pows);\n    }\n\n    return r ? z.reverse() : z;\n  };\n\n  scale.tickFormat = function(count, specifier) {\n    if (specifier == null) specifier = base === 10 ? \".0e\" : \",\";\n    if (typeof specifier !== \"function\") specifier = Object(d3_format__WEBPACK_IMPORTED_MODULE_1__[\"format\"])(specifier);\n    if (count === Infinity) return specifier;\n    if (count == null) count = 10;\n    var k = Math.max(1, base * count / scale.ticks().length); // TODO fast estimate?\n    return function(d) {\n      var i = d / pows(Math.round(logs(d)));\n      if (i * base < base - 0.5) i *= base;\n      return i <= k ? specifier(d) : \"\";\n    };\n  };\n\n  scale.nice = function() {\n    return domain(Object(_nice_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(domain(), {\n      floor: function(x) { return pows(Math.floor(logs(x))); },\n      ceil: function(x) { return pows(Math.ceil(logs(x))); }\n    }));\n  };\n\n  return scale;\n}\n\nfunction log() {\n  var scale = loggish(Object(_continuous_js__WEBPACK_IMPORTED_MODULE_3__[\"transformer\"])()).domain([1, 10]);\n\n  scale.copy = function() {\n    return Object(_continuous_js__WEBPACK_IMPORTED_MODULE_3__[\"copy\"])(scale, log()).base(scale.base());\n  };\n\n  _init_js__WEBPACK_IMPORTED_MODULE_4__[\"initRange\"].apply(scale, arguments);\n\n  return scale;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale/src/nice.js\":\n/*!*******************************************!*\\\n  !*** ./node_modules/d3-scale/src/nice.js ***!\n  \\*******************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return nice; });\nfunction nice(domain, interval) {\n  domain = domain.slice();\n\n  var i0 = 0,\n      i1 = domain.length - 1,\n      x0 = domain[i0],\n      x1 = domain[i1],\n      t;\n\n  if (x1 < x0) {\n    t = i0, i0 = i1, i1 = t;\n    t = x0, x0 = x1, x1 = t;\n  }\n\n  domain[i0] = interval.floor(x0);\n  domain[i1] = interval.ceil(x1);\n  return domain;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale/src/number.js\":\n/*!*********************************************!*\\\n  !*** ./node_modules/d3-scale/src/number.js ***!\n  \\*********************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return number; });\nfunction number(x) {\n  return +x;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale/src/ordinal.js\":\n/*!**********************************************!*\\\n  !*** ./node_modules/d3-scale/src/ordinal.js ***!\n  \\**********************************************/\n/*! exports provided: implicit, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"implicit\", function() { return implicit; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return ordinal; });\n/* harmony import */ var d3_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-array */ \"./node_modules/d3-scale/node_modules/d3-array/src/index.js\");\n/* harmony import */ var _init_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./init.js */ \"./node_modules/d3-scale/src/init.js\");\n\n\n\nconst implicit = Symbol(\"implicit\");\n\nfunction ordinal() {\n  var index = new d3_array__WEBPACK_IMPORTED_MODULE_0__[\"InternMap\"](),\n      domain = [],\n      range = [],\n      unknown = implicit;\n\n  function scale(d) {\n    let i = index.get(d);\n    if (i === undefined) {\n      if (unknown !== implicit) return unknown;\n      index.set(d, i = domain.push(d) - 1);\n    }\n    return range[i % range.length];\n  }\n\n  scale.domain = function(_) {\n    if (!arguments.length) return domain.slice();\n    domain = [], index = new d3_array__WEBPACK_IMPORTED_MODULE_0__[\"InternMap\"]();\n    for (const value of _) {\n      if (index.has(value)) continue;\n      index.set(value, domain.push(value) - 1);\n    }\n    return scale;\n  };\n\n  scale.range = function(_) {\n    return arguments.length ? (range = Array.from(_), scale) : range.slice();\n  };\n\n  scale.unknown = function(_) {\n    return arguments.length ? (unknown = _, scale) : unknown;\n  };\n\n  scale.copy = function() {\n    return ordinal(domain, range).unknown(unknown);\n  };\n\n  _init_js__WEBPACK_IMPORTED_MODULE_1__[\"initRange\"].apply(scale, arguments);\n\n  return scale;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale/src/pow.js\":\n/*!******************************************!*\\\n  !*** ./node_modules/d3-scale/src/pow.js ***!\n  \\******************************************/\n/*! exports provided: powish, default, sqrt */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"powish\", function() { return powish; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return pow; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"sqrt\", function() { return sqrt; });\n/* harmony import */ var _linear_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./linear.js */ \"./node_modules/d3-scale/src/linear.js\");\n/* harmony import */ var _continuous_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./continuous.js */ \"./node_modules/d3-scale/src/continuous.js\");\n/* harmony import */ var _init_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./init.js */ \"./node_modules/d3-scale/src/init.js\");\n\n\n\n\nfunction transformPow(exponent) {\n  return function(x) {\n    return x < 0 ? -Math.pow(-x, exponent) : Math.pow(x, exponent);\n  };\n}\n\nfunction transformSqrt(x) {\n  return x < 0 ? -Math.sqrt(-x) : Math.sqrt(x);\n}\n\nfunction transformSquare(x) {\n  return x < 0 ? -x * x : x * x;\n}\n\nfunction powish(transform) {\n  var scale = transform(_continuous_js__WEBPACK_IMPORTED_MODULE_1__[\"identity\"], _continuous_js__WEBPACK_IMPORTED_MODULE_1__[\"identity\"]),\n      exponent = 1;\n\n  function rescale() {\n    return exponent === 1 ? transform(_continuous_js__WEBPACK_IMPORTED_MODULE_1__[\"identity\"], _continuous_js__WEBPACK_IMPORTED_MODULE_1__[\"identity\"])\n        : exponent === 0.5 ? transform(transformSqrt, transformSquare)\n        : transform(transformPow(exponent), transformPow(1 / exponent));\n  }\n\n  scale.exponent = function(_) {\n    return arguments.length ? (exponent = +_, rescale()) : exponent;\n  };\n\n  return Object(_linear_js__WEBPACK_IMPORTED_MODULE_0__[\"linearish\"])(scale);\n}\n\nfunction pow() {\n  var scale = powish(Object(_continuous_js__WEBPACK_IMPORTED_MODULE_1__[\"transformer\"])());\n\n  scale.copy = function() {\n    return Object(_continuous_js__WEBPACK_IMPORTED_MODULE_1__[\"copy\"])(scale, pow()).exponent(scale.exponent());\n  };\n\n  _init_js__WEBPACK_IMPORTED_MODULE_2__[\"initRange\"].apply(scale, arguments);\n\n  return scale;\n}\n\nfunction sqrt() {\n  return pow.apply(null, arguments).exponent(0.5);\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale/src/quantile.js\":\n/*!***********************************************!*\\\n  !*** ./node_modules/d3-scale/src/quantile.js ***!\n  \\***********************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return quantile; });\n/* harmony import */ var d3_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-array */ \"./node_modules/d3-scale/node_modules/d3-array/src/index.js\");\n/* harmony import */ var _init_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./init.js */ \"./node_modules/d3-scale/src/init.js\");\n\n\n\nfunction quantile() {\n  var domain = [],\n      range = [],\n      thresholds = [],\n      unknown;\n\n  function rescale() {\n    var i = 0, n = Math.max(1, range.length);\n    thresholds = new Array(n - 1);\n    while (++i < n) thresholds[i - 1] = Object(d3_array__WEBPACK_IMPORTED_MODULE_0__[\"quantileSorted\"])(domain, i / n);\n    return scale;\n  }\n\n  function scale(x) {\n    return x == null || isNaN(x = +x) ? unknown : range[Object(d3_array__WEBPACK_IMPORTED_MODULE_0__[\"bisect\"])(thresholds, x)];\n  }\n\n  scale.invertExtent = function(y) {\n    var i = range.indexOf(y);\n    return i < 0 ? [NaN, NaN] : [\n      i > 0 ? thresholds[i - 1] : domain[0],\n      i < thresholds.length ? thresholds[i] : domain[domain.length - 1]\n    ];\n  };\n\n  scale.domain = function(_) {\n    if (!arguments.length) return domain.slice();\n    domain = [];\n    for (let d of _) if (d != null && !isNaN(d = +d)) domain.push(d);\n    domain.sort(d3_array__WEBPACK_IMPORTED_MODULE_0__[\"ascending\"]);\n    return rescale();\n  };\n\n  scale.range = function(_) {\n    return arguments.length ? (range = Array.from(_), rescale()) : range.slice();\n  };\n\n  scale.unknown = function(_) {\n    return arguments.length ? (unknown = _, scale) : unknown;\n  };\n\n  scale.quantiles = function() {\n    return thresholds.slice();\n  };\n\n  scale.copy = function() {\n    return quantile()\n        .domain(domain)\n        .range(range)\n        .unknown(unknown);\n  };\n\n  return _init_js__WEBPACK_IMPORTED_MODULE_1__[\"initRange\"].apply(scale, arguments);\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale/src/quantize.js\":\n/*!***********************************************!*\\\n  !*** ./node_modules/d3-scale/src/quantize.js ***!\n  \\***********************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return quantize; });\n/* harmony import */ var d3_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-array */ \"./node_modules/d3-scale/node_modules/d3-array/src/index.js\");\n/* harmony import */ var _linear_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./linear.js */ \"./node_modules/d3-scale/src/linear.js\");\n/* harmony import */ var _init_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./init.js */ \"./node_modules/d3-scale/src/init.js\");\n\n\n\n\nfunction quantize() {\n  var x0 = 0,\n      x1 = 1,\n      n = 1,\n      domain = [0.5],\n      range = [0, 1],\n      unknown;\n\n  function scale(x) {\n    return x != null && x <= x ? range[Object(d3_array__WEBPACK_IMPORTED_MODULE_0__[\"bisect\"])(domain, x, 0, n)] : unknown;\n  }\n\n  function rescale() {\n    var i = -1;\n    domain = new Array(n);\n    while (++i < n) domain[i] = ((i + 1) * x1 - (i - n) * x0) / (n + 1);\n    return scale;\n  }\n\n  scale.domain = function(_) {\n    return arguments.length ? ([x0, x1] = _, x0 = +x0, x1 = +x1, rescale()) : [x0, x1];\n  };\n\n  scale.range = function(_) {\n    return arguments.length ? (n = (range = Array.from(_)).length - 1, rescale()) : range.slice();\n  };\n\n  scale.invertExtent = function(y) {\n    var i = range.indexOf(y);\n    return i < 0 ? [NaN, NaN]\n        : i < 1 ? [x0, domain[0]]\n        : i >= n ? [domain[n - 1], x1]\n        : [domain[i - 1], domain[i]];\n  };\n\n  scale.unknown = function(_) {\n    return arguments.length ? (unknown = _, scale) : scale;\n  };\n\n  scale.thresholds = function() {\n    return domain.slice();\n  };\n\n  scale.copy = function() {\n    return quantize()\n        .domain([x0, x1])\n        .range(range)\n        .unknown(unknown);\n  };\n\n  return _init_js__WEBPACK_IMPORTED_MODULE_2__[\"initRange\"].apply(Object(_linear_js__WEBPACK_IMPORTED_MODULE_1__[\"linearish\"])(scale), arguments);\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale/src/radial.js\":\n/*!*********************************************!*\\\n  !*** ./node_modules/d3-scale/src/radial.js ***!\n  \\*********************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return radial; });\n/* harmony import */ var _continuous_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./continuous.js */ \"./node_modules/d3-scale/src/continuous.js\");\n/* harmony import */ var _init_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./init.js */ \"./node_modules/d3-scale/src/init.js\");\n/* harmony import */ var _linear_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./linear.js */ \"./node_modules/d3-scale/src/linear.js\");\n/* harmony import */ var _number_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./number.js */ \"./node_modules/d3-scale/src/number.js\");\n\n\n\n\n\nfunction square(x) {\n  return Math.sign(x) * x * x;\n}\n\nfunction unsquare(x) {\n  return Math.sign(x) * Math.sqrt(Math.abs(x));\n}\n\nfunction radial() {\n  var squared = Object(_continuous_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(),\n      range = [0, 1],\n      round = false,\n      unknown;\n\n  function scale(x) {\n    var y = unsquare(squared(x));\n    return isNaN(y) ? unknown : round ? Math.round(y) : y;\n  }\n\n  scale.invert = function(y) {\n    return squared.invert(square(y));\n  };\n\n  scale.domain = function(_) {\n    return arguments.length ? (squared.domain(_), scale) : squared.domain();\n  };\n\n  scale.range = function(_) {\n    return arguments.length ? (squared.range((range = Array.from(_, _number_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"])).map(square)), scale) : range.slice();\n  };\n\n  scale.rangeRound = function(_) {\n    return scale.range(_).round(true);\n  };\n\n  scale.round = function(_) {\n    return arguments.length ? (round = !!_, scale) : round;\n  };\n\n  scale.clamp = function(_) {\n    return arguments.length ? (squared.clamp(_), scale) : squared.clamp();\n  };\n\n  scale.unknown = function(_) {\n    return arguments.length ? (unknown = _, scale) : unknown;\n  };\n\n  scale.copy = function() {\n    return radial(squared.domain(), range)\n        .round(round)\n        .clamp(squared.clamp())\n        .unknown(unknown);\n  };\n\n  _init_js__WEBPACK_IMPORTED_MODULE_1__[\"initRange\"].apply(scale, arguments);\n\n  return Object(_linear_js__WEBPACK_IMPORTED_MODULE_2__[\"linearish\"])(scale);\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale/src/sequential.js\":\n/*!*************************************************!*\\\n  !*** ./node_modules/d3-scale/src/sequential.js ***!\n  \\*************************************************/\n/*! exports provided: copy, default, sequentialLog, sequentialSymlog, sequentialPow, sequentialSqrt */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"copy\", function() { return copy; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return sequential; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"sequentialLog\", function() { return sequentialLog; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"sequentialSymlog\", function() { return sequentialSymlog; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"sequentialPow\", function() { return sequentialPow; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"sequentialSqrt\", function() { return sequentialSqrt; });\n/* harmony import */ var d3_interpolate__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-interpolate */ \"./node_modules/d3-scale/node_modules/d3-interpolate/src/index.js\");\n/* harmony import */ var _continuous_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./continuous.js */ \"./node_modules/d3-scale/src/continuous.js\");\n/* harmony import */ var _init_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./init.js */ \"./node_modules/d3-scale/src/init.js\");\n/* harmony import */ var _linear_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./linear.js */ \"./node_modules/d3-scale/src/linear.js\");\n/* harmony import */ var _log_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./log.js */ \"./node_modules/d3-scale/src/log.js\");\n/* harmony import */ var _symlog_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./symlog.js */ \"./node_modules/d3-scale/src/symlog.js\");\n/* harmony import */ var _pow_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./pow.js */ \"./node_modules/d3-scale/src/pow.js\");\n\n\n\n\n\n\n\n\nfunction transformer() {\n  var x0 = 0,\n      x1 = 1,\n      t0,\n      t1,\n      k10,\n      transform,\n      interpolator = _continuous_js__WEBPACK_IMPORTED_MODULE_1__[\"identity\"],\n      clamp = false,\n      unknown;\n\n  function scale(x) {\n    return x == null || isNaN(x = +x) ? unknown : interpolator(k10 === 0 ? 0.5 : (x = (transform(x) - t0) * k10, clamp ? Math.max(0, Math.min(1, x)) : x));\n  }\n\n  scale.domain = function(_) {\n    return arguments.length ? ([x0, x1] = _, t0 = transform(x0 = +x0), t1 = transform(x1 = +x1), k10 = t0 === t1 ? 0 : 1 / (t1 - t0), scale) : [x0, x1];\n  };\n\n  scale.clamp = function(_) {\n    return arguments.length ? (clamp = !!_, scale) : clamp;\n  };\n\n  scale.interpolator = function(_) {\n    return arguments.length ? (interpolator = _, scale) : interpolator;\n  };\n\n  function range(interpolate) {\n    return function(_) {\n      var r0, r1;\n      return arguments.length ? ([r0, r1] = _, interpolator = interpolate(r0, r1), scale) : [interpolator(0), interpolator(1)];\n    };\n  }\n\n  scale.range = range(d3_interpolate__WEBPACK_IMPORTED_MODULE_0__[\"interpolate\"]);\n\n  scale.rangeRound = range(d3_interpolate__WEBPACK_IMPORTED_MODULE_0__[\"interpolateRound\"]);\n\n  scale.unknown = function(_) {\n    return arguments.length ? (unknown = _, scale) : unknown;\n  };\n\n  return function(t) {\n    transform = t, t0 = t(x0), t1 = t(x1), k10 = t0 === t1 ? 0 : 1 / (t1 - t0);\n    return scale;\n  };\n}\n\nfunction copy(source, target) {\n  return target\n      .domain(source.domain())\n      .interpolator(source.interpolator())\n      .clamp(source.clamp())\n      .unknown(source.unknown());\n}\n\nfunction sequential() {\n  var scale = Object(_linear_js__WEBPACK_IMPORTED_MODULE_3__[\"linearish\"])(transformer()(_continuous_js__WEBPACK_IMPORTED_MODULE_1__[\"identity\"]));\n\n  scale.copy = function() {\n    return copy(scale, sequential());\n  };\n\n  return _init_js__WEBPACK_IMPORTED_MODULE_2__[\"initInterpolator\"].apply(scale, arguments);\n}\n\nfunction sequentialLog() {\n  var scale = Object(_log_js__WEBPACK_IMPORTED_MODULE_4__[\"loggish\"])(transformer()).domain([1, 10]);\n\n  scale.copy = function() {\n    return copy(scale, sequentialLog()).base(scale.base());\n  };\n\n  return _init_js__WEBPACK_IMPORTED_MODULE_2__[\"initInterpolator\"].apply(scale, arguments);\n}\n\nfunction sequentialSymlog() {\n  var scale = Object(_symlog_js__WEBPACK_IMPORTED_MODULE_5__[\"symlogish\"])(transformer());\n\n  scale.copy = function() {\n    return copy(scale, sequentialSymlog()).constant(scale.constant());\n  };\n\n  return _init_js__WEBPACK_IMPORTED_MODULE_2__[\"initInterpolator\"].apply(scale, arguments);\n}\n\nfunction sequentialPow() {\n  var scale = Object(_pow_js__WEBPACK_IMPORTED_MODULE_6__[\"powish\"])(transformer());\n\n  scale.copy = function() {\n    return copy(scale, sequentialPow()).exponent(scale.exponent());\n  };\n\n  return _init_js__WEBPACK_IMPORTED_MODULE_2__[\"initInterpolator\"].apply(scale, arguments);\n}\n\nfunction sequentialSqrt() {\n  return sequentialPow.apply(null, arguments).exponent(0.5);\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale/src/sequentialQuantile.js\":\n/*!*********************************************************!*\\\n  !*** ./node_modules/d3-scale/src/sequentialQuantile.js ***!\n  \\*********************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return sequentialQuantile; });\n/* harmony import */ var d3_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-array */ \"./node_modules/d3-scale/node_modules/d3-array/src/index.js\");\n/* harmony import */ var _continuous_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./continuous.js */ \"./node_modules/d3-scale/src/continuous.js\");\n/* harmony import */ var _init_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./init.js */ \"./node_modules/d3-scale/src/init.js\");\n\n\n\n\nfunction sequentialQuantile() {\n  var domain = [],\n      interpolator = _continuous_js__WEBPACK_IMPORTED_MODULE_1__[\"identity\"];\n\n  function scale(x) {\n    if (x != null && !isNaN(x = +x)) return interpolator((Object(d3_array__WEBPACK_IMPORTED_MODULE_0__[\"bisect\"])(domain, x, 1) - 1) / (domain.length - 1));\n  }\n\n  scale.domain = function(_) {\n    if (!arguments.length) return domain.slice();\n    domain = [];\n    for (let d of _) if (d != null && !isNaN(d = +d)) domain.push(d);\n    domain.sort(d3_array__WEBPACK_IMPORTED_MODULE_0__[\"ascending\"]);\n    return scale;\n  };\n\n  scale.interpolator = function(_) {\n    return arguments.length ? (interpolator = _, scale) : interpolator;\n  };\n\n  scale.range = function() {\n    return domain.map((d, i) => interpolator(i / (domain.length - 1)));\n  };\n\n  scale.quantiles = function(n) {\n    return Array.from({length: n + 1}, (_, i) => Object(d3_array__WEBPACK_IMPORTED_MODULE_0__[\"quantile\"])(domain, i / n));\n  };\n\n  scale.copy = function() {\n    return sequentialQuantile(interpolator).domain(domain);\n  };\n\n  return _init_js__WEBPACK_IMPORTED_MODULE_2__[\"initInterpolator\"].apply(scale, arguments);\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale/src/symlog.js\":\n/*!*********************************************!*\\\n  !*** ./node_modules/d3-scale/src/symlog.js ***!\n  \\*********************************************/\n/*! exports provided: symlogish, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"symlogish\", function() { return symlogish; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return symlog; });\n/* harmony import */ var _linear_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./linear.js */ \"./node_modules/d3-scale/src/linear.js\");\n/* harmony import */ var _continuous_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./continuous.js */ \"./node_modules/d3-scale/src/continuous.js\");\n/* harmony import */ var _init_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./init.js */ \"./node_modules/d3-scale/src/init.js\");\n\n\n\n\nfunction transformSymlog(c) {\n  return function(x) {\n    return Math.sign(x) * Math.log1p(Math.abs(x / c));\n  };\n}\n\nfunction transformSymexp(c) {\n  return function(x) {\n    return Math.sign(x) * Math.expm1(Math.abs(x)) * c;\n  };\n}\n\nfunction symlogish(transform) {\n  var c = 1, scale = transform(transformSymlog(c), transformSymexp(c));\n\n  scale.constant = function(_) {\n    return arguments.length ? transform(transformSymlog(c = +_), transformSymexp(c)) : c;\n  };\n\n  return Object(_linear_js__WEBPACK_IMPORTED_MODULE_0__[\"linearish\"])(scale);\n}\n\nfunction symlog() {\n  var scale = symlogish(Object(_continuous_js__WEBPACK_IMPORTED_MODULE_1__[\"transformer\"])());\n\n  scale.copy = function() {\n    return Object(_continuous_js__WEBPACK_IMPORTED_MODULE_1__[\"copy\"])(scale, symlog()).constant(scale.constant());\n  };\n\n  return _init_js__WEBPACK_IMPORTED_MODULE_2__[\"initRange\"].apply(scale, arguments);\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale/src/threshold.js\":\n/*!************************************************!*\\\n  !*** ./node_modules/d3-scale/src/threshold.js ***!\n  \\************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return threshold; });\n/* harmony import */ var d3_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-array */ \"./node_modules/d3-scale/node_modules/d3-array/src/index.js\");\n/* harmony import */ var _init_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./init.js */ \"./node_modules/d3-scale/src/init.js\");\n\n\n\nfunction threshold() {\n  var domain = [0.5],\n      range = [0, 1],\n      unknown,\n      n = 1;\n\n  function scale(x) {\n    return x != null && x <= x ? range[Object(d3_array__WEBPACK_IMPORTED_MODULE_0__[\"bisect\"])(domain, x, 0, n)] : unknown;\n  }\n\n  scale.domain = function(_) {\n    return arguments.length ? (domain = Array.from(_), n = Math.min(domain.length, range.length - 1), scale) : domain.slice();\n  };\n\n  scale.range = function(_) {\n    return arguments.length ? (range = Array.from(_), n = Math.min(domain.length, range.length - 1), scale) : range.slice();\n  };\n\n  scale.invertExtent = function(y) {\n    var i = range.indexOf(y);\n    return [domain[i - 1], domain[i]];\n  };\n\n  scale.unknown = function(_) {\n    return arguments.length ? (unknown = _, scale) : unknown;\n  };\n\n  scale.copy = function() {\n    return threshold()\n        .domain(domain)\n        .range(range)\n        .unknown(unknown);\n  };\n\n  return _init_js__WEBPACK_IMPORTED_MODULE_1__[\"initRange\"].apply(scale, arguments);\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale/src/tickFormat.js\":\n/*!*************************************************!*\\\n  !*** ./node_modules/d3-scale/src/tickFormat.js ***!\n  \\*************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return tickFormat; });\n/* harmony import */ var d3_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-array */ \"./node_modules/d3-scale/node_modules/d3-array/src/index.js\");\n/* harmony import */ var d3_format__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! d3-format */ \"./node_modules/d3-scale/node_modules/d3-format/src/index.js\");\n\n\n\nfunction tickFormat(start, stop, count, specifier) {\n  var step = Object(d3_array__WEBPACK_IMPORTED_MODULE_0__[\"tickStep\"])(start, stop, count),\n      precision;\n  specifier = Object(d3_format__WEBPACK_IMPORTED_MODULE_1__[\"formatSpecifier\"])(specifier == null ? \",f\" : specifier);\n  switch (specifier.type) {\n    case \"s\": {\n      var value = Math.max(Math.abs(start), Math.abs(stop));\n      if (specifier.precision == null && !isNaN(precision = Object(d3_format__WEBPACK_IMPORTED_MODULE_1__[\"precisionPrefix\"])(step, value))) specifier.precision = precision;\n      return Object(d3_format__WEBPACK_IMPORTED_MODULE_1__[\"formatPrefix\"])(specifier, value);\n    }\n    case \"\":\n    case \"e\":\n    case \"g\":\n    case \"p\":\n    case \"r\": {\n      if (specifier.precision == null && !isNaN(precision = Object(d3_format__WEBPACK_IMPORTED_MODULE_1__[\"precisionRound\"])(step, Math.max(Math.abs(start), Math.abs(stop))))) specifier.precision = precision - (specifier.type === \"e\");\n      break;\n    }\n    case \"f\":\n    case \"%\": {\n      if (specifier.precision == null && !isNaN(precision = Object(d3_format__WEBPACK_IMPORTED_MODULE_1__[\"precisionFixed\"])(step))) specifier.precision = precision - (specifier.type === \"%\") * 2;\n      break;\n    }\n  }\n  return Object(d3_format__WEBPACK_IMPORTED_MODULE_1__[\"format\"])(specifier);\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale/src/time.js\":\n/*!*******************************************!*\\\n  !*** ./node_modules/d3-scale/src/time.js ***!\n  \\*******************************************/\n/*! exports provided: calendar, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"calendar\", function() { return calendar; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return time; });\n/* harmony import */ var d3_time__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-time */ \"./node_modules/d3-scale/node_modules/d3-time/src/index.js\");\n/* harmony import */ var d3_time_format__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! d3-time-format */ \"./node_modules/d3-scale/node_modules/d3-time-format/src/index.js\");\n/* harmony import */ var _continuous_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./continuous.js */ \"./node_modules/d3-scale/src/continuous.js\");\n/* harmony import */ var _init_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./init.js */ \"./node_modules/d3-scale/src/init.js\");\n/* harmony import */ var _nice_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./nice.js */ \"./node_modules/d3-scale/src/nice.js\");\n\n\n\n\n\n\nfunction date(t) {\n  return new Date(t);\n}\n\nfunction number(t) {\n  return t instanceof Date ? +t : +new Date(+t);\n}\n\nfunction calendar(ticks, tickInterval, year, month, week, day, hour, minute, second, format) {\n  var scale = Object(_continuous_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(),\n      invert = scale.invert,\n      domain = scale.domain;\n\n  var formatMillisecond = format(\".%L\"),\n      formatSecond = format(\":%S\"),\n      formatMinute = format(\"%I:%M\"),\n      formatHour = format(\"%I %p\"),\n      formatDay = format(\"%a %d\"),\n      formatWeek = format(\"%b %d\"),\n      formatMonth = format(\"%B\"),\n      formatYear = format(\"%Y\");\n\n  function tickFormat(date) {\n    return (second(date) < date ? formatMillisecond\n        : minute(date) < date ? formatSecond\n        : hour(date) < date ? formatMinute\n        : day(date) < date ? formatHour\n        : month(date) < date ? (week(date) < date ? formatDay : formatWeek)\n        : year(date) < date ? formatMonth\n        : formatYear)(date);\n  }\n\n  scale.invert = function(y) {\n    return new Date(invert(y));\n  };\n\n  scale.domain = function(_) {\n    return arguments.length ? domain(Array.from(_, number)) : domain().map(date);\n  };\n\n  scale.ticks = function(interval) {\n    var d = domain();\n    return ticks(d[0], d[d.length - 1], interval == null ? 10 : interval);\n  };\n\n  scale.tickFormat = function(count, specifier) {\n    return specifier == null ? tickFormat : format(specifier);\n  };\n\n  scale.nice = function(interval) {\n    var d = domain();\n    if (!interval || typeof interval.range !== \"function\") interval = tickInterval(d[0], d[d.length - 1], interval == null ? 10 : interval);\n    return interval ? domain(Object(_nice_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(d, interval)) : scale;\n  };\n\n  scale.copy = function() {\n    return Object(_continuous_js__WEBPACK_IMPORTED_MODULE_2__[\"copy\"])(scale, calendar(ticks, tickInterval, year, month, week, day, hour, minute, second, format));\n  };\n\n  return scale;\n}\n\nfunction time() {\n  return _init_js__WEBPACK_IMPORTED_MODULE_3__[\"initRange\"].apply(calendar(d3_time__WEBPACK_IMPORTED_MODULE_0__[\"timeTicks\"], d3_time__WEBPACK_IMPORTED_MODULE_0__[\"timeTickInterval\"], d3_time__WEBPACK_IMPORTED_MODULE_0__[\"timeYear\"], d3_time__WEBPACK_IMPORTED_MODULE_0__[\"timeMonth\"], d3_time__WEBPACK_IMPORTED_MODULE_0__[\"timeWeek\"], d3_time__WEBPACK_IMPORTED_MODULE_0__[\"timeDay\"], d3_time__WEBPACK_IMPORTED_MODULE_0__[\"timeHour\"], d3_time__WEBPACK_IMPORTED_MODULE_0__[\"timeMinute\"], d3_time__WEBPACK_IMPORTED_MODULE_0__[\"timeSecond\"], d3_time_format__WEBPACK_IMPORTED_MODULE_1__[\"timeFormat\"]).domain([new Date(2000, 0, 1), new Date(2000, 0, 2)]), arguments);\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-scale/src/utcTime.js\":\n/*!**********************************************!*\\\n  !*** ./node_modules/d3-scale/src/utcTime.js ***!\n  \\**********************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return utcTime; });\n/* harmony import */ var d3_time__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-time */ \"./node_modules/d3-scale/node_modules/d3-time/src/index.js\");\n/* harmony import */ var d3_time_format__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! d3-time-format */ \"./node_modules/d3-scale/node_modules/d3-time-format/src/index.js\");\n/* harmony import */ var _time_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./time.js */ \"./node_modules/d3-scale/src/time.js\");\n/* harmony import */ var _init_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./init.js */ \"./node_modules/d3-scale/src/init.js\");\n\n\n\n\n\nfunction utcTime() {\n  return _init_js__WEBPACK_IMPORTED_MODULE_3__[\"initRange\"].apply(Object(_time_js__WEBPACK_IMPORTED_MODULE_2__[\"calendar\"])(d3_time__WEBPACK_IMPORTED_MODULE_0__[\"utcTicks\"], d3_time__WEBPACK_IMPORTED_MODULE_0__[\"utcTickInterval\"], d3_time__WEBPACK_IMPORTED_MODULE_0__[\"utcYear\"], d3_time__WEBPACK_IMPORTED_MODULE_0__[\"utcMonth\"], d3_time__WEBPACK_IMPORTED_MODULE_0__[\"utcWeek\"], d3_time__WEBPACK_IMPORTED_MODULE_0__[\"utcDay\"], d3_time__WEBPACK_IMPORTED_MODULE_0__[\"utcHour\"], d3_time__WEBPACK_IMPORTED_MODULE_0__[\"utcMinute\"], d3_time__WEBPACK_IMPORTED_MODULE_0__[\"utcSecond\"], d3_time_format__WEBPACK_IMPORTED_MODULE_1__[\"utcFormat\"]).domain([Date.UTC(2000, 0, 1), Date.UTC(2000, 0, 2)]), arguments);\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-selection/src/constant.js\":\n/*!***************************************************!*\\\n  !*** ./node_modules/d3-selection/src/constant.js ***!\n  \\***************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(x) {\n  return function() {\n    return x;\n  };\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-selection/src/create.js\":\n/*!*************************************************!*\\\n  !*** ./node_modules/d3-selection/src/create.js ***!\n  \\*************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _creator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./creator */ \"./node_modules/d3-selection/src/creator.js\");\n/* harmony import */ var _select__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./select */ \"./node_modules/d3-selection/src/select.js\");\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(name) {\n  return Object(_select__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(Object(_creator__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(name).call(document.documentElement));\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-selection/src/creator.js\":\n/*!**************************************************!*\\\n  !*** ./node_modules/d3-selection/src/creator.js ***!\n  \\**************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _namespace__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./namespace */ \"./node_modules/d3-selection/src/namespace.js\");\n/* harmony import */ var _namespaces__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./namespaces */ \"./node_modules/d3-selection/src/namespaces.js\");\n\n\n\nfunction creatorInherit(name) {\n  return function() {\n    var document = this.ownerDocument,\n        uri = this.namespaceURI;\n    return uri === _namespaces__WEBPACK_IMPORTED_MODULE_1__[\"xhtml\"] && document.documentElement.namespaceURI === _namespaces__WEBPACK_IMPORTED_MODULE_1__[\"xhtml\"]\n        ? document.createElement(name)\n        : document.createElementNS(uri, name);\n  };\n}\n\nfunction creatorFixed(fullname) {\n  return function() {\n    return this.ownerDocument.createElementNS(fullname.space, fullname.local);\n  };\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(name) {\n  var fullname = Object(_namespace__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(name);\n  return (fullname.local\n      ? creatorFixed\n      : creatorInherit)(fullname);\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-selection/src/index.js\":\n/*!************************************************!*\\\n  !*** ./node_modules/d3-selection/src/index.js ***!\n  \\************************************************/\n/*! exports provided: create, creator, local, matcher, mouse, namespace, namespaces, clientPoint, select, selectAll, selection, selector, selectorAll, style, touch, touches, window, event, customEvent */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _create__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./create */ \"./node_modules/d3-selection/src/create.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"create\", function() { return _create__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n/* harmony import */ var _creator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./creator */ \"./node_modules/d3-selection/src/creator.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"creator\", function() { return _creator__WEBPACK_IMPORTED_MODULE_1__[\"default\"]; });\n\n/* harmony import */ var _local__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./local */ \"./node_modules/d3-selection/src/local.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"local\", function() { return _local__WEBPACK_IMPORTED_MODULE_2__[\"default\"]; });\n\n/* harmony import */ var _matcher__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./matcher */ \"./node_modules/d3-selection/src/matcher.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"matcher\", function() { return _matcher__WEBPACK_IMPORTED_MODULE_3__[\"default\"]; });\n\n/* harmony import */ var _mouse__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./mouse */ \"./node_modules/d3-selection/src/mouse.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"mouse\", function() { return _mouse__WEBPACK_IMPORTED_MODULE_4__[\"default\"]; });\n\n/* harmony import */ var _namespace__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./namespace */ \"./node_modules/d3-selection/src/namespace.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"namespace\", function() { return _namespace__WEBPACK_IMPORTED_MODULE_5__[\"default\"]; });\n\n/* harmony import */ var _namespaces__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./namespaces */ \"./node_modules/d3-selection/src/namespaces.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"namespaces\", function() { return _namespaces__WEBPACK_IMPORTED_MODULE_6__[\"default\"]; });\n\n/* harmony import */ var _point__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./point */ \"./node_modules/d3-selection/src/point.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"clientPoint\", function() { return _point__WEBPACK_IMPORTED_MODULE_7__[\"default\"]; });\n\n/* harmony import */ var _select__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./select */ \"./node_modules/d3-selection/src/select.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"select\", function() { return _select__WEBPACK_IMPORTED_MODULE_8__[\"default\"]; });\n\n/* harmony import */ var _selectAll__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./selectAll */ \"./node_modules/d3-selection/src/selectAll.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"selectAll\", function() { return _selectAll__WEBPACK_IMPORTED_MODULE_9__[\"default\"]; });\n\n/* harmony import */ var _selection_index__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./selection/index */ \"./node_modules/d3-selection/src/selection/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"selection\", function() { return _selection_index__WEBPACK_IMPORTED_MODULE_10__[\"default\"]; });\n\n/* harmony import */ var _selector__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./selector */ \"./node_modules/d3-selection/src/selector.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"selector\", function() { return _selector__WEBPACK_IMPORTED_MODULE_11__[\"default\"]; });\n\n/* harmony import */ var _selectorAll__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./selectorAll */ \"./node_modules/d3-selection/src/selectorAll.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"selectorAll\", function() { return _selectorAll__WEBPACK_IMPORTED_MODULE_12__[\"default\"]; });\n\n/* harmony import */ var _selection_style__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./selection/style */ \"./node_modules/d3-selection/src/selection/style.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"style\", function() { return _selection_style__WEBPACK_IMPORTED_MODULE_13__[\"styleValue\"]; });\n\n/* harmony import */ var _touch__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./touch */ \"./node_modules/d3-selection/src/touch.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"touch\", function() { return _touch__WEBPACK_IMPORTED_MODULE_14__[\"default\"]; });\n\n/* harmony import */ var _touches__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./touches */ \"./node_modules/d3-selection/src/touches.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"touches\", function() { return _touches__WEBPACK_IMPORTED_MODULE_15__[\"default\"]; });\n\n/* harmony import */ var _window__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./window */ \"./node_modules/d3-selection/src/window.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"window\", function() { return _window__WEBPACK_IMPORTED_MODULE_16__[\"default\"]; });\n\n/* harmony import */ var _selection_on__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./selection/on */ \"./node_modules/d3-selection/src/selection/on.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"event\", function() { return _selection_on__WEBPACK_IMPORTED_MODULE_17__[\"event\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"customEvent\", function() { return _selection_on__WEBPACK_IMPORTED_MODULE_17__[\"customEvent\"]; });\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-selection/src/local.js\":\n/*!************************************************!*\\\n  !*** ./node_modules/d3-selection/src/local.js ***!\n  \\************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return local; });\nvar nextId = 0;\n\nfunction local() {\n  return new Local;\n}\n\nfunction Local() {\n  this._ = \"@\" + (++nextId).toString(36);\n}\n\nLocal.prototype = local.prototype = {\n  constructor: Local,\n  get: function(node) {\n    var id = this._;\n    while (!(id in node)) if (!(node = node.parentNode)) return;\n    return node[id];\n  },\n  set: function(node, value) {\n    return node[this._] = value;\n  },\n  remove: function(node) {\n    return this._ in node && delete node[this._];\n  },\n  toString: function() {\n    return this._;\n  }\n};\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-selection/src/matcher.js\":\n/*!**************************************************!*\\\n  !*** ./node_modules/d3-selection/src/matcher.js ***!\n  \\**************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(selector) {\n  return function() {\n    return this.matches(selector);\n  };\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-selection/src/mouse.js\":\n/*!************************************************!*\\\n  !*** ./node_modules/d3-selection/src/mouse.js ***!\n  \\************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _sourceEvent__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./sourceEvent */ \"./node_modules/d3-selection/src/sourceEvent.js\");\n/* harmony import */ var _point__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./point */ \"./node_modules/d3-selection/src/point.js\");\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(node) {\n  var event = Object(_sourceEvent__WEBPACK_IMPORTED_MODULE_0__[\"default\"])();\n  if (event.changedTouches) event = event.changedTouches[0];\n  return Object(_point__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(node, event);\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-selection/src/namespace.js\":\n/*!****************************************************!*\\\n  !*** ./node_modules/d3-selection/src/namespace.js ***!\n  \\****************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _namespaces__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./namespaces */ \"./node_modules/d3-selection/src/namespaces.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(name) {\n  var prefix = name += \"\", i = prefix.indexOf(\":\");\n  if (i >= 0 && (prefix = name.slice(0, i)) !== \"xmlns\") name = name.slice(i + 1);\n  return _namespaces__WEBPACK_IMPORTED_MODULE_0__[\"default\"].hasOwnProperty(prefix) ? {space: _namespaces__WEBPACK_IMPORTED_MODULE_0__[\"default\"][prefix], local: name} : name;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-selection/src/namespaces.js\":\n/*!*****************************************************!*\\\n  !*** ./node_modules/d3-selection/src/namespaces.js ***!\n  \\*****************************************************/\n/*! exports provided: xhtml, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"xhtml\", function() { return xhtml; });\nvar xhtml = \"http://www.w3.org/1999/xhtml\";\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n  svg: \"http://www.w3.org/2000/svg\",\n  xhtml: xhtml,\n  xlink: \"http://www.w3.org/1999/xlink\",\n  xml: \"http://www.w3.org/XML/1998/namespace\",\n  xmlns: \"http://www.w3.org/2000/xmlns/\"\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-selection/src/point.js\":\n/*!************************************************!*\\\n  !*** ./node_modules/d3-selection/src/point.js ***!\n  \\************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(node, event) {\n  var svg = node.ownerSVGElement || node;\n\n  if (svg.createSVGPoint) {\n    var point = svg.createSVGPoint();\n    point.x = event.clientX, point.y = event.clientY;\n    point = point.matrixTransform(node.getScreenCTM().inverse());\n    return [point.x, point.y];\n  }\n\n  var rect = node.getBoundingClientRect();\n  return [event.clientX - rect.left - node.clientLeft, event.clientY - rect.top - node.clientTop];\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-selection/src/select.js\":\n/*!*************************************************!*\\\n  !*** ./node_modules/d3-selection/src/select.js ***!\n  \\*************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _selection_index__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./selection/index */ \"./node_modules/d3-selection/src/selection/index.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(selector) {\n  return typeof selector === \"string\"\n      ? new _selection_index__WEBPACK_IMPORTED_MODULE_0__[\"Selection\"]([[document.querySelector(selector)]], [document.documentElement])\n      : new _selection_index__WEBPACK_IMPORTED_MODULE_0__[\"Selection\"]([[selector]], _selection_index__WEBPACK_IMPORTED_MODULE_0__[\"root\"]);\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-selection/src/selectAll.js\":\n/*!****************************************************!*\\\n  !*** ./node_modules/d3-selection/src/selectAll.js ***!\n  \\****************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _selection_index__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./selection/index */ \"./node_modules/d3-selection/src/selection/index.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(selector) {\n  return typeof selector === \"string\"\n      ? new _selection_index__WEBPACK_IMPORTED_MODULE_0__[\"Selection\"]([document.querySelectorAll(selector)], [document.documentElement])\n      : new _selection_index__WEBPACK_IMPORTED_MODULE_0__[\"Selection\"]([selector == null ? [] : selector], _selection_index__WEBPACK_IMPORTED_MODULE_0__[\"root\"]);\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-selection/src/selection/append.js\":\n/*!***********************************************************!*\\\n  !*** ./node_modules/d3-selection/src/selection/append.js ***!\n  \\***********************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _creator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../creator */ \"./node_modules/d3-selection/src/creator.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(name) {\n  var create = typeof name === \"function\" ? name : Object(_creator__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(name);\n  return this.select(function() {\n    return this.appendChild(create.apply(this, arguments));\n  });\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-selection/src/selection/attr.js\":\n/*!*********************************************************!*\\\n  !*** ./node_modules/d3-selection/src/selection/attr.js ***!\n  \\*********************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _namespace__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../namespace */ \"./node_modules/d3-selection/src/namespace.js\");\n\n\nfunction attrRemove(name) {\n  return function() {\n    this.removeAttribute(name);\n  };\n}\n\nfunction attrRemoveNS(fullname) {\n  return function() {\n    this.removeAttributeNS(fullname.space, fullname.local);\n  };\n}\n\nfunction attrConstant(name, value) {\n  return function() {\n    this.setAttribute(name, value);\n  };\n}\n\nfunction attrConstantNS(fullname, value) {\n  return function() {\n    this.setAttributeNS(fullname.space, fullname.local, value);\n  };\n}\n\nfunction attrFunction(name, value) {\n  return function() {\n    var v = value.apply(this, arguments);\n    if (v == null) this.removeAttribute(name);\n    else this.setAttribute(name, v);\n  };\n}\n\nfunction attrFunctionNS(fullname, value) {\n  return function() {\n    var v = value.apply(this, arguments);\n    if (v == null) this.removeAttributeNS(fullname.space, fullname.local);\n    else this.setAttributeNS(fullname.space, fullname.local, v);\n  };\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(name, value) {\n  var fullname = Object(_namespace__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(name);\n\n  if (arguments.length < 2) {\n    var node = this.node();\n    return fullname.local\n        ? node.getAttributeNS(fullname.space, fullname.local)\n        : node.getAttribute(fullname);\n  }\n\n  return this.each((value == null\n      ? (fullname.local ? attrRemoveNS : attrRemove) : (typeof value === \"function\"\n      ? (fullname.local ? attrFunctionNS : attrFunction)\n      : (fullname.local ? attrConstantNS : attrConstant)))(fullname, value));\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-selection/src/selection/call.js\":\n/*!*********************************************************!*\\\n  !*** ./node_modules/d3-selection/src/selection/call.js ***!\n  \\*********************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  var callback = arguments[0];\n  arguments[0] = this;\n  callback.apply(null, arguments);\n  return this;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-selection/src/selection/classed.js\":\n/*!************************************************************!*\\\n  !*** ./node_modules/d3-selection/src/selection/classed.js ***!\n  \\************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\nfunction classArray(string) {\n  return string.trim().split(/^|\\s+/);\n}\n\nfunction classList(node) {\n  return node.classList || new ClassList(node);\n}\n\nfunction ClassList(node) {\n  this._node = node;\n  this._names = classArray(node.getAttribute(\"class\") || \"\");\n}\n\nClassList.prototype = {\n  add: function(name) {\n    var i = this._names.indexOf(name);\n    if (i < 0) {\n      this._names.push(name);\n      this._node.setAttribute(\"class\", this._names.join(\" \"));\n    }\n  },\n  remove: function(name) {\n    var i = this._names.indexOf(name);\n    if (i >= 0) {\n      this._names.splice(i, 1);\n      this._node.setAttribute(\"class\", this._names.join(\" \"));\n    }\n  },\n  contains: function(name) {\n    return this._names.indexOf(name) >= 0;\n  }\n};\n\nfunction classedAdd(node, names) {\n  var list = classList(node), i = -1, n = names.length;\n  while (++i < n) list.add(names[i]);\n}\n\nfunction classedRemove(node, names) {\n  var list = classList(node), i = -1, n = names.length;\n  while (++i < n) list.remove(names[i]);\n}\n\nfunction classedTrue(names) {\n  return function() {\n    classedAdd(this, names);\n  };\n}\n\nfunction classedFalse(names) {\n  return function() {\n    classedRemove(this, names);\n  };\n}\n\nfunction classedFunction(names, value) {\n  return function() {\n    (value.apply(this, arguments) ? classedAdd : classedRemove)(this, names);\n  };\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(name, value) {\n  var names = classArray(name + \"\");\n\n  if (arguments.length < 2) {\n    var list = classList(this.node()), i = -1, n = names.length;\n    while (++i < n) if (!list.contains(names[i])) return false;\n    return true;\n  }\n\n  return this.each((typeof value === \"function\"\n      ? classedFunction : value\n      ? classedTrue\n      : classedFalse)(names, value));\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-selection/src/selection/clone.js\":\n/*!**********************************************************!*\\\n  !*** ./node_modules/d3-selection/src/selection/clone.js ***!\n  \\**********************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\nfunction selection_cloneShallow() {\n  var clone = this.cloneNode(false), parent = this.parentNode;\n  return parent ? parent.insertBefore(clone, this.nextSibling) : clone;\n}\n\nfunction selection_cloneDeep() {\n  var clone = this.cloneNode(true), parent = this.parentNode;\n  return parent ? parent.insertBefore(clone, this.nextSibling) : clone;\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(deep) {\n  return this.select(deep ? selection_cloneDeep : selection_cloneShallow);\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-selection/src/selection/data.js\":\n/*!*********************************************************!*\\\n  !*** ./node_modules/d3-selection/src/selection/data.js ***!\n  \\*********************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _index__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./index */ \"./node_modules/d3-selection/src/selection/index.js\");\n/* harmony import */ var _enter__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./enter */ \"./node_modules/d3-selection/src/selection/enter.js\");\n/* harmony import */ var _constant__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../constant */ \"./node_modules/d3-selection/src/constant.js\");\n\n\n\n\nvar keyPrefix = \"$\"; // Protect against keys like “__proto__”.\n\nfunction bindIndex(parent, group, enter, update, exit, data) {\n  var i = 0,\n      node,\n      groupLength = group.length,\n      dataLength = data.length;\n\n  // Put any non-null nodes that fit into update.\n  // Put any null nodes into enter.\n  // Put any remaining data into enter.\n  for (; i < dataLength; ++i) {\n    if (node = group[i]) {\n      node.__data__ = data[i];\n      update[i] = node;\n    } else {\n      enter[i] = new _enter__WEBPACK_IMPORTED_MODULE_1__[\"EnterNode\"](parent, data[i]);\n    }\n  }\n\n  // Put any non-null nodes that don’t fit into exit.\n  for (; i < groupLength; ++i) {\n    if (node = group[i]) {\n      exit[i] = node;\n    }\n  }\n}\n\nfunction bindKey(parent, group, enter, update, exit, data, key) {\n  var i,\n      node,\n      nodeByKeyValue = {},\n      groupLength = group.length,\n      dataLength = data.length,\n      keyValues = new Array(groupLength),\n      keyValue;\n\n  // Compute the key for each node.\n  // If multiple nodes have the same key, the duplicates are added to exit.\n  for (i = 0; i < groupLength; ++i) {\n    if (node = group[i]) {\n      keyValues[i] = keyValue = keyPrefix + key.call(node, node.__data__, i, group);\n      if (keyValue in nodeByKeyValue) {\n        exit[i] = node;\n      } else {\n        nodeByKeyValue[keyValue] = node;\n      }\n    }\n  }\n\n  // Compute the key for each datum.\n  // If there a node associated with this key, join and add it to update.\n  // If there is not (or the key is a duplicate), add it to enter.\n  for (i = 0; i < dataLength; ++i) {\n    keyValue = keyPrefix + key.call(parent, data[i], i, data);\n    if (node = nodeByKeyValue[keyValue]) {\n      update[i] = node;\n      node.__data__ = data[i];\n      nodeByKeyValue[keyValue] = null;\n    } else {\n      enter[i] = new _enter__WEBPACK_IMPORTED_MODULE_1__[\"EnterNode\"](parent, data[i]);\n    }\n  }\n\n  // Add any remaining nodes that were not bound to data to exit.\n  for (i = 0; i < groupLength; ++i) {\n    if ((node = group[i]) && (nodeByKeyValue[keyValues[i]] === node)) {\n      exit[i] = node;\n    }\n  }\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(value, key) {\n  if (!value) {\n    data = new Array(this.size()), j = -1;\n    this.each(function(d) { data[++j] = d; });\n    return data;\n  }\n\n  var bind = key ? bindKey : bindIndex,\n      parents = this._parents,\n      groups = this._groups;\n\n  if (typeof value !== \"function\") value = Object(_constant__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(value);\n\n  for (var m = groups.length, update = new Array(m), enter = new Array(m), exit = new Array(m), j = 0; j < m; ++j) {\n    var parent = parents[j],\n        group = groups[j],\n        groupLength = group.length,\n        data = value.call(parent, parent && parent.__data__, j, parents),\n        dataLength = data.length,\n        enterGroup = enter[j] = new Array(dataLength),\n        updateGroup = update[j] = new Array(dataLength),\n        exitGroup = exit[j] = new Array(groupLength);\n\n    bind(parent, group, enterGroup, updateGroup, exitGroup, data, key);\n\n    // Now connect the enter nodes to their following update node, such that\n    // appendChild can insert the materialized enter node before this node,\n    // rather than at the end of the parent node.\n    for (var i0 = 0, i1 = 0, previous, next; i0 < dataLength; ++i0) {\n      if (previous = enterGroup[i0]) {\n        if (i0 >= i1) i1 = i0 + 1;\n        while (!(next = updateGroup[i1]) && ++i1 < dataLength);\n        previous._next = next || null;\n      }\n    }\n  }\n\n  update = new _index__WEBPACK_IMPORTED_MODULE_0__[\"Selection\"](update, parents);\n  update._enter = enter;\n  update._exit = exit;\n  return update;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-selection/src/selection/datum.js\":\n/*!**********************************************************!*\\\n  !*** ./node_modules/d3-selection/src/selection/datum.js ***!\n  \\**********************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(value) {\n  return arguments.length\n      ? this.property(\"__data__\", value)\n      : this.node().__data__;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-selection/src/selection/dispatch.js\":\n/*!*************************************************************!*\\\n  !*** ./node_modules/d3-selection/src/selection/dispatch.js ***!\n  \\*************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _window__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../window */ \"./node_modules/d3-selection/src/window.js\");\n\n\nfunction dispatchEvent(node, type, params) {\n  var window = Object(_window__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(node),\n      event = window.CustomEvent;\n\n  if (typeof event === \"function\") {\n    event = new event(type, params);\n  } else {\n    event = window.document.createEvent(\"Event\");\n    if (params) event.initEvent(type, params.bubbles, params.cancelable), event.detail = params.detail;\n    else event.initEvent(type, false, false);\n  }\n\n  node.dispatchEvent(event);\n}\n\nfunction dispatchConstant(type, params) {\n  return function() {\n    return dispatchEvent(this, type, params);\n  };\n}\n\nfunction dispatchFunction(type, params) {\n  return function() {\n    return dispatchEvent(this, type, params.apply(this, arguments));\n  };\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(type, params) {\n  return this.each((typeof params === \"function\"\n      ? dispatchFunction\n      : dispatchConstant)(type, params));\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-selection/src/selection/each.js\":\n/*!*********************************************************!*\\\n  !*** ./node_modules/d3-selection/src/selection/each.js ***!\n  \\*********************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(callback) {\n\n  for (var groups = this._groups, j = 0, m = groups.length; j < m; ++j) {\n    for (var group = groups[j], i = 0, n = group.length, node; i < n; ++i) {\n      if (node = group[i]) callback.call(node, node.__data__, i, group);\n    }\n  }\n\n  return this;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-selection/src/selection/empty.js\":\n/*!**********************************************************!*\\\n  !*** ./node_modules/d3-selection/src/selection/empty.js ***!\n  \\**********************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  return !this.node();\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-selection/src/selection/enter.js\":\n/*!**********************************************************!*\\\n  !*** ./node_modules/d3-selection/src/selection/enter.js ***!\n  \\**********************************************************/\n/*! exports provided: default, EnterNode */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"EnterNode\", function() { return EnterNode; });\n/* harmony import */ var _sparse__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./sparse */ \"./node_modules/d3-selection/src/selection/sparse.js\");\n/* harmony import */ var _index__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./index */ \"./node_modules/d3-selection/src/selection/index.js\");\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  return new _index__WEBPACK_IMPORTED_MODULE_1__[\"Selection\"](this._enter || this._groups.map(_sparse__WEBPACK_IMPORTED_MODULE_0__[\"default\"]), this._parents);\n});\n\nfunction EnterNode(parent, datum) {\n  this.ownerDocument = parent.ownerDocument;\n  this.namespaceURI = parent.namespaceURI;\n  this._next = null;\n  this._parent = parent;\n  this.__data__ = datum;\n}\n\nEnterNode.prototype = {\n  constructor: EnterNode,\n  appendChild: function(child) { return this._parent.insertBefore(child, this._next); },\n  insertBefore: function(child, next) { return this._parent.insertBefore(child, next); },\n  querySelector: function(selector) { return this._parent.querySelector(selector); },\n  querySelectorAll: function(selector) { return this._parent.querySelectorAll(selector); }\n};\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-selection/src/selection/exit.js\":\n/*!*********************************************************!*\\\n  !*** ./node_modules/d3-selection/src/selection/exit.js ***!\n  \\*********************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _sparse__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./sparse */ \"./node_modules/d3-selection/src/selection/sparse.js\");\n/* harmony import */ var _index__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./index */ \"./node_modules/d3-selection/src/selection/index.js\");\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  return new _index__WEBPACK_IMPORTED_MODULE_1__[\"Selection\"](this._exit || this._groups.map(_sparse__WEBPACK_IMPORTED_MODULE_0__[\"default\"]), this._parents);\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-selection/src/selection/filter.js\":\n/*!***********************************************************!*\\\n  !*** ./node_modules/d3-selection/src/selection/filter.js ***!\n  \\***********************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _index__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./index */ \"./node_modules/d3-selection/src/selection/index.js\");\n/* harmony import */ var _matcher__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../matcher */ \"./node_modules/d3-selection/src/matcher.js\");\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(match) {\n  if (typeof match !== \"function\") match = Object(_matcher__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(match);\n\n  for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {\n    for (var group = groups[j], n = group.length, subgroup = subgroups[j] = [], node, i = 0; i < n; ++i) {\n      if ((node = group[i]) && match.call(node, node.__data__, i, group)) {\n        subgroup.push(node);\n      }\n    }\n  }\n\n  return new _index__WEBPACK_IMPORTED_MODULE_0__[\"Selection\"](subgroups, this._parents);\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-selection/src/selection/html.js\":\n/*!*********************************************************!*\\\n  !*** ./node_modules/d3-selection/src/selection/html.js ***!\n  \\*********************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\nfunction htmlRemove() {\n  this.innerHTML = \"\";\n}\n\nfunction htmlConstant(value) {\n  return function() {\n    this.innerHTML = value;\n  };\n}\n\nfunction htmlFunction(value) {\n  return function() {\n    var v = value.apply(this, arguments);\n    this.innerHTML = v == null ? \"\" : v;\n  };\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(value) {\n  return arguments.length\n      ? this.each(value == null\n          ? htmlRemove : (typeof value === \"function\"\n          ? htmlFunction\n          : htmlConstant)(value))\n      : this.node().innerHTML;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-selection/src/selection/index.js\":\n/*!**********************************************************!*\\\n  !*** ./node_modules/d3-selection/src/selection/index.js ***!\n  \\**********************************************************/\n/*! exports provided: root, Selection, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"root\", function() { return root; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Selection\", function() { return Selection; });\n/* harmony import */ var _select__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./select */ \"./node_modules/d3-selection/src/selection/select.js\");\n/* harmony import */ var _selectAll__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./selectAll */ \"./node_modules/d3-selection/src/selection/selectAll.js\");\n/* harmony import */ var _filter__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./filter */ \"./node_modules/d3-selection/src/selection/filter.js\");\n/* harmony import */ var _data__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./data */ \"./node_modules/d3-selection/src/selection/data.js\");\n/* harmony import */ var _enter__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./enter */ \"./node_modules/d3-selection/src/selection/enter.js\");\n/* harmony import */ var _exit__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./exit */ \"./node_modules/d3-selection/src/selection/exit.js\");\n/* harmony import */ var _join__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./join */ \"./node_modules/d3-selection/src/selection/join.js\");\n/* harmony import */ var _merge__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./merge */ \"./node_modules/d3-selection/src/selection/merge.js\");\n/* harmony import */ var _order__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./order */ \"./node_modules/d3-selection/src/selection/order.js\");\n/* harmony import */ var _sort__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./sort */ \"./node_modules/d3-selection/src/selection/sort.js\");\n/* harmony import */ var _call__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./call */ \"./node_modules/d3-selection/src/selection/call.js\");\n/* harmony import */ var _nodes__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./nodes */ \"./node_modules/d3-selection/src/selection/nodes.js\");\n/* harmony import */ var _node__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./node */ \"./node_modules/d3-selection/src/selection/node.js\");\n/* harmony import */ var _size__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./size */ \"./node_modules/d3-selection/src/selection/size.js\");\n/* harmony import */ var _empty__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./empty */ \"./node_modules/d3-selection/src/selection/empty.js\");\n/* harmony import */ var _each__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./each */ \"./node_modules/d3-selection/src/selection/each.js\");\n/* harmony import */ var _attr__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./attr */ \"./node_modules/d3-selection/src/selection/attr.js\");\n/* harmony import */ var _style__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./style */ \"./node_modules/d3-selection/src/selection/style.js\");\n/* harmony import */ var _property__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./property */ \"./node_modules/d3-selection/src/selection/property.js\");\n/* harmony import */ var _classed__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./classed */ \"./node_modules/d3-selection/src/selection/classed.js\");\n/* harmony import */ var _text__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./text */ \"./node_modules/d3-selection/src/selection/text.js\");\n/* harmony import */ var _html__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./html */ \"./node_modules/d3-selection/src/selection/html.js\");\n/* harmony import */ var _raise__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./raise */ \"./node_modules/d3-selection/src/selection/raise.js\");\n/* harmony import */ var _lower__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./lower */ \"./node_modules/d3-selection/src/selection/lower.js\");\n/* harmony import */ var _append__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ./append */ \"./node_modules/d3-selection/src/selection/append.js\");\n/* harmony import */ var _insert__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ./insert */ \"./node_modules/d3-selection/src/selection/insert.js\");\n/* harmony import */ var _remove__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ./remove */ \"./node_modules/d3-selection/src/selection/remove.js\");\n/* harmony import */ var _clone__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ./clone */ \"./node_modules/d3-selection/src/selection/clone.js\");\n/* harmony import */ var _datum__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ./datum */ \"./node_modules/d3-selection/src/selection/datum.js\");\n/* harmony import */ var _on__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ./on */ \"./node_modules/d3-selection/src/selection/on.js\");\n/* harmony import */ var _dispatch__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ./dispatch */ \"./node_modules/d3-selection/src/selection/dispatch.js\");\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nvar root = [null];\n\nfunction Selection(groups, parents) {\n  this._groups = groups;\n  this._parents = parents;\n}\n\nfunction selection() {\n  return new Selection([[document.documentElement]], root);\n}\n\nSelection.prototype = selection.prototype = {\n  constructor: Selection,\n  select: _select__WEBPACK_IMPORTED_MODULE_0__[\"default\"],\n  selectAll: _selectAll__WEBPACK_IMPORTED_MODULE_1__[\"default\"],\n  filter: _filter__WEBPACK_IMPORTED_MODULE_2__[\"default\"],\n  data: _data__WEBPACK_IMPORTED_MODULE_3__[\"default\"],\n  enter: _enter__WEBPACK_IMPORTED_MODULE_4__[\"default\"],\n  exit: _exit__WEBPACK_IMPORTED_MODULE_5__[\"default\"],\n  join: _join__WEBPACK_IMPORTED_MODULE_6__[\"default\"],\n  merge: _merge__WEBPACK_IMPORTED_MODULE_7__[\"default\"],\n  order: _order__WEBPACK_IMPORTED_MODULE_8__[\"default\"],\n  sort: _sort__WEBPACK_IMPORTED_MODULE_9__[\"default\"],\n  call: _call__WEBPACK_IMPORTED_MODULE_10__[\"default\"],\n  nodes: _nodes__WEBPACK_IMPORTED_MODULE_11__[\"default\"],\n  node: _node__WEBPACK_IMPORTED_MODULE_12__[\"default\"],\n  size: _size__WEBPACK_IMPORTED_MODULE_13__[\"default\"],\n  empty: _empty__WEBPACK_IMPORTED_MODULE_14__[\"default\"],\n  each: _each__WEBPACK_IMPORTED_MODULE_15__[\"default\"],\n  attr: _attr__WEBPACK_IMPORTED_MODULE_16__[\"default\"],\n  style: _style__WEBPACK_IMPORTED_MODULE_17__[\"default\"],\n  property: _property__WEBPACK_IMPORTED_MODULE_18__[\"default\"],\n  classed: _classed__WEBPACK_IMPORTED_MODULE_19__[\"default\"],\n  text: _text__WEBPACK_IMPORTED_MODULE_20__[\"default\"],\n  html: _html__WEBPACK_IMPORTED_MODULE_21__[\"default\"],\n  raise: _raise__WEBPACK_IMPORTED_MODULE_22__[\"default\"],\n  lower: _lower__WEBPACK_IMPORTED_MODULE_23__[\"default\"],\n  append: _append__WEBPACK_IMPORTED_MODULE_24__[\"default\"],\n  insert: _insert__WEBPACK_IMPORTED_MODULE_25__[\"default\"],\n  remove: _remove__WEBPACK_IMPORTED_MODULE_26__[\"default\"],\n  clone: _clone__WEBPACK_IMPORTED_MODULE_27__[\"default\"],\n  datum: _datum__WEBPACK_IMPORTED_MODULE_28__[\"default\"],\n  on: _on__WEBPACK_IMPORTED_MODULE_29__[\"default\"],\n  dispatch: _dispatch__WEBPACK_IMPORTED_MODULE_30__[\"default\"]\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (selection);\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-selection/src/selection/insert.js\":\n/*!***********************************************************!*\\\n  !*** ./node_modules/d3-selection/src/selection/insert.js ***!\n  \\***********************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _creator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../creator */ \"./node_modules/d3-selection/src/creator.js\");\n/* harmony import */ var _selector__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../selector */ \"./node_modules/d3-selection/src/selector.js\");\n\n\n\nfunction constantNull() {\n  return null;\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(name, before) {\n  var create = typeof name === \"function\" ? name : Object(_creator__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(name),\n      select = before == null ? constantNull : typeof before === \"function\" ? before : Object(_selector__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(before);\n  return this.select(function() {\n    return this.insertBefore(create.apply(this, arguments), select.apply(this, arguments) || null);\n  });\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-selection/src/selection/join.js\":\n/*!*********************************************************!*\\\n  !*** ./node_modules/d3-selection/src/selection/join.js ***!\n  \\*********************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(onenter, onupdate, onexit) {\n  var enter = this.enter(), update = this, exit = this.exit();\n  enter = typeof onenter === \"function\" ? onenter(enter) : enter.append(onenter + \"\");\n  if (onupdate != null) update = onupdate(update);\n  if (onexit == null) exit.remove(); else onexit(exit);\n  return enter && update ? enter.merge(update).order() : update;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-selection/src/selection/lower.js\":\n/*!**********************************************************!*\\\n  !*** ./node_modules/d3-selection/src/selection/lower.js ***!\n  \\**********************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\nfunction lower() {\n  if (this.previousSibling) this.parentNode.insertBefore(this, this.parentNode.firstChild);\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  return this.each(lower);\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-selection/src/selection/merge.js\":\n/*!**********************************************************!*\\\n  !*** ./node_modules/d3-selection/src/selection/merge.js ***!\n  \\**********************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _index__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./index */ \"./node_modules/d3-selection/src/selection/index.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(selection) {\n\n  for (var groups0 = this._groups, groups1 = selection._groups, m0 = groups0.length, m1 = groups1.length, m = Math.min(m0, m1), merges = new Array(m0), j = 0; j < m; ++j) {\n    for (var group0 = groups0[j], group1 = groups1[j], n = group0.length, merge = merges[j] = new Array(n), node, i = 0; i < n; ++i) {\n      if (node = group0[i] || group1[i]) {\n        merge[i] = node;\n      }\n    }\n  }\n\n  for (; j < m0; ++j) {\n    merges[j] = groups0[j];\n  }\n\n  return new _index__WEBPACK_IMPORTED_MODULE_0__[\"Selection\"](merges, this._parents);\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-selection/src/selection/node.js\":\n/*!*********************************************************!*\\\n  !*** ./node_modules/d3-selection/src/selection/node.js ***!\n  \\*********************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n\n  for (var groups = this._groups, j = 0, m = groups.length; j < m; ++j) {\n    for (var group = groups[j], i = 0, n = group.length; i < n; ++i) {\n      var node = group[i];\n      if (node) return node;\n    }\n  }\n\n  return null;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-selection/src/selection/nodes.js\":\n/*!**********************************************************!*\\\n  !*** ./node_modules/d3-selection/src/selection/nodes.js ***!\n  \\**********************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  var nodes = new Array(this.size()), i = -1;\n  this.each(function() { nodes[++i] = this; });\n  return nodes;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-selection/src/selection/on.js\":\n/*!*******************************************************!*\\\n  !*** ./node_modules/d3-selection/src/selection/on.js ***!\n  \\*******************************************************/\n/*! exports provided: event, default, customEvent */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"event\", function() { return event; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"customEvent\", function() { return customEvent; });\nvar filterEvents = {};\n\nvar event = null;\n\nif (typeof document !== \"undefined\") {\n  var element = document.documentElement;\n  if (!(\"onmouseenter\" in element)) {\n    filterEvents = {mouseenter: \"mouseover\", mouseleave: \"mouseout\"};\n  }\n}\n\nfunction filterContextListener(listener, index, group) {\n  listener = contextListener(listener, index, group);\n  return function(event) {\n    var related = event.relatedTarget;\n    if (!related || (related !== this && !(related.compareDocumentPosition(this) & 8))) {\n      listener.call(this, event);\n    }\n  };\n}\n\nfunction contextListener(listener, index, group) {\n  return function(event1) {\n    var event0 = event; // Events can be reentrant (e.g., focus).\n    event = event1;\n    try {\n      listener.call(this, this.__data__, index, group);\n    } finally {\n      event = event0;\n    }\n  };\n}\n\nfunction parseTypenames(typenames) {\n  return typenames.trim().split(/^|\\s+/).map(function(t) {\n    var name = \"\", i = t.indexOf(\".\");\n    if (i >= 0) name = t.slice(i + 1), t = t.slice(0, i);\n    return {type: t, name: name};\n  });\n}\n\nfunction onRemove(typename) {\n  return function() {\n    var on = this.__on;\n    if (!on) return;\n    for (var j = 0, i = -1, m = on.length, o; j < m; ++j) {\n      if (o = on[j], (!typename.type || o.type === typename.type) && o.name === typename.name) {\n        this.removeEventListener(o.type, o.listener, o.capture);\n      } else {\n        on[++i] = o;\n      }\n    }\n    if (++i) on.length = i;\n    else delete this.__on;\n  };\n}\n\nfunction onAdd(typename, value, capture) {\n  var wrap = filterEvents.hasOwnProperty(typename.type) ? filterContextListener : contextListener;\n  return function(d, i, group) {\n    var on = this.__on, o, listener = wrap(value, i, group);\n    if (on) for (var j = 0, m = on.length; j < m; ++j) {\n      if ((o = on[j]).type === typename.type && o.name === typename.name) {\n        this.removeEventListener(o.type, o.listener, o.capture);\n        this.addEventListener(o.type, o.listener = listener, o.capture = capture);\n        o.value = value;\n        return;\n      }\n    }\n    this.addEventListener(typename.type, listener, capture);\n    o = {type: typename.type, name: typename.name, value: value, listener: listener, capture: capture};\n    if (!on) this.__on = [o];\n    else on.push(o);\n  };\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(typename, value, capture) {\n  var typenames = parseTypenames(typename + \"\"), i, n = typenames.length, t;\n\n  if (arguments.length < 2) {\n    var on = this.node().__on;\n    if (on) for (var j = 0, m = on.length, o; j < m; ++j) {\n      for (i = 0, o = on[j]; i < n; ++i) {\n        if ((t = typenames[i]).type === o.type && t.name === o.name) {\n          return o.value;\n        }\n      }\n    }\n    return;\n  }\n\n  on = value ? onAdd : onRemove;\n  if (capture == null) capture = false;\n  for (i = 0; i < n; ++i) this.each(on(typenames[i], value, capture));\n  return this;\n});\n\nfunction customEvent(event1, listener, that, args) {\n  var event0 = event;\n  event1.sourceEvent = event;\n  event = event1;\n  try {\n    return listener.apply(that, args);\n  } finally {\n    event = event0;\n  }\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-selection/src/selection/order.js\":\n/*!**********************************************************!*\\\n  !*** ./node_modules/d3-selection/src/selection/order.js ***!\n  \\**********************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n\n  for (var groups = this._groups, j = -1, m = groups.length; ++j < m;) {\n    for (var group = groups[j], i = group.length - 1, next = group[i], node; --i >= 0;) {\n      if (node = group[i]) {\n        if (next && node.compareDocumentPosition(next) ^ 4) next.parentNode.insertBefore(node, next);\n        next = node;\n      }\n    }\n  }\n\n  return this;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-selection/src/selection/property.js\":\n/*!*************************************************************!*\\\n  !*** ./node_modules/d3-selection/src/selection/property.js ***!\n  \\*************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\nfunction propertyRemove(name) {\n  return function() {\n    delete this[name];\n  };\n}\n\nfunction propertyConstant(name, value) {\n  return function() {\n    this[name] = value;\n  };\n}\n\nfunction propertyFunction(name, value) {\n  return function() {\n    var v = value.apply(this, arguments);\n    if (v == null) delete this[name];\n    else this[name] = v;\n  };\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(name, value) {\n  return arguments.length > 1\n      ? this.each((value == null\n          ? propertyRemove : typeof value === \"function\"\n          ? propertyFunction\n          : propertyConstant)(name, value))\n      : this.node()[name];\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-selection/src/selection/raise.js\":\n/*!**********************************************************!*\\\n  !*** ./node_modules/d3-selection/src/selection/raise.js ***!\n  \\**********************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\nfunction raise() {\n  if (this.nextSibling) this.parentNode.appendChild(this);\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  return this.each(raise);\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-selection/src/selection/remove.js\":\n/*!***********************************************************!*\\\n  !*** ./node_modules/d3-selection/src/selection/remove.js ***!\n  \\***********************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\nfunction remove() {\n  var parent = this.parentNode;\n  if (parent) parent.removeChild(this);\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  return this.each(remove);\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-selection/src/selection/select.js\":\n/*!***********************************************************!*\\\n  !*** ./node_modules/d3-selection/src/selection/select.js ***!\n  \\***********************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _index__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./index */ \"./node_modules/d3-selection/src/selection/index.js\");\n/* harmony import */ var _selector__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../selector */ \"./node_modules/d3-selection/src/selector.js\");\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(select) {\n  if (typeof select !== \"function\") select = Object(_selector__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(select);\n\n  for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {\n    for (var group = groups[j], n = group.length, subgroup = subgroups[j] = new Array(n), node, subnode, i = 0; i < n; ++i) {\n      if ((node = group[i]) && (subnode = select.call(node, node.__data__, i, group))) {\n        if (\"__data__\" in node) subnode.__data__ = node.__data__;\n        subgroup[i] = subnode;\n      }\n    }\n  }\n\n  return new _index__WEBPACK_IMPORTED_MODULE_0__[\"Selection\"](subgroups, this._parents);\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-selection/src/selection/selectAll.js\":\n/*!**************************************************************!*\\\n  !*** ./node_modules/d3-selection/src/selection/selectAll.js ***!\n  \\**************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _index__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./index */ \"./node_modules/d3-selection/src/selection/index.js\");\n/* harmony import */ var _selectorAll__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../selectorAll */ \"./node_modules/d3-selection/src/selectorAll.js\");\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(select) {\n  if (typeof select !== \"function\") select = Object(_selectorAll__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(select);\n\n  for (var groups = this._groups, m = groups.length, subgroups = [], parents = [], j = 0; j < m; ++j) {\n    for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) {\n      if (node = group[i]) {\n        subgroups.push(select.call(node, node.__data__, i, group));\n        parents.push(node);\n      }\n    }\n  }\n\n  return new _index__WEBPACK_IMPORTED_MODULE_0__[\"Selection\"](subgroups, parents);\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-selection/src/selection/size.js\":\n/*!*********************************************************!*\\\n  !*** ./node_modules/d3-selection/src/selection/size.js ***!\n  \\*********************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  var size = 0;\n  this.each(function() { ++size; });\n  return size;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-selection/src/selection/sort.js\":\n/*!*********************************************************!*\\\n  !*** ./node_modules/d3-selection/src/selection/sort.js ***!\n  \\*********************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _index__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./index */ \"./node_modules/d3-selection/src/selection/index.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(compare) {\n  if (!compare) compare = ascending;\n\n  function compareNode(a, b) {\n    return a && b ? compare(a.__data__, b.__data__) : !a - !b;\n  }\n\n  for (var groups = this._groups, m = groups.length, sortgroups = new Array(m), j = 0; j < m; ++j) {\n    for (var group = groups[j], n = group.length, sortgroup = sortgroups[j] = new Array(n), node, i = 0; i < n; ++i) {\n      if (node = group[i]) {\n        sortgroup[i] = node;\n      }\n    }\n    sortgroup.sort(compareNode);\n  }\n\n  return new _index__WEBPACK_IMPORTED_MODULE_0__[\"Selection\"](sortgroups, this._parents).order();\n});\n\nfunction ascending(a, b) {\n  return a < b ? -1 : a > b ? 1 : a >= b ? 0 : NaN;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-selection/src/selection/sparse.js\":\n/*!***********************************************************!*\\\n  !*** ./node_modules/d3-selection/src/selection/sparse.js ***!\n  \\***********************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(update) {\n  return new Array(update.length);\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-selection/src/selection/style.js\":\n/*!**********************************************************!*\\\n  !*** ./node_modules/d3-selection/src/selection/style.js ***!\n  \\**********************************************************/\n/*! exports provided: default, styleValue */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"styleValue\", function() { return styleValue; });\n/* harmony import */ var _window__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../window */ \"./node_modules/d3-selection/src/window.js\");\n\n\nfunction styleRemove(name) {\n  return function() {\n    this.style.removeProperty(name);\n  };\n}\n\nfunction styleConstant(name, value, priority) {\n  return function() {\n    this.style.setProperty(name, value, priority);\n  };\n}\n\nfunction styleFunction(name, value, priority) {\n  return function() {\n    var v = value.apply(this, arguments);\n    if (v == null) this.style.removeProperty(name);\n    else this.style.setProperty(name, v, priority);\n  };\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(name, value, priority) {\n  return arguments.length > 1\n      ? this.each((value == null\n            ? styleRemove : typeof value === \"function\"\n            ? styleFunction\n            : styleConstant)(name, value, priority == null ? \"\" : priority))\n      : styleValue(this.node(), name);\n});\n\nfunction styleValue(node, name) {\n  return node.style.getPropertyValue(name)\n      || Object(_window__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(node).getComputedStyle(node, null).getPropertyValue(name);\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-selection/src/selection/text.js\":\n/*!*********************************************************!*\\\n  !*** ./node_modules/d3-selection/src/selection/text.js ***!\n  \\*********************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\nfunction textRemove() {\n  this.textContent = \"\";\n}\n\nfunction textConstant(value) {\n  return function() {\n    this.textContent = value;\n  };\n}\n\nfunction textFunction(value) {\n  return function() {\n    var v = value.apply(this, arguments);\n    this.textContent = v == null ? \"\" : v;\n  };\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(value) {\n  return arguments.length\n      ? this.each(value == null\n          ? textRemove : (typeof value === \"function\"\n          ? textFunction\n          : textConstant)(value))\n      : this.node().textContent;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-selection/src/selector.js\":\n/*!***************************************************!*\\\n  !*** ./node_modules/d3-selection/src/selector.js ***!\n  \\***************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\nfunction none() {}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(selector) {\n  return selector == null ? none : function() {\n    return this.querySelector(selector);\n  };\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-selection/src/selectorAll.js\":\n/*!******************************************************!*\\\n  !*** ./node_modules/d3-selection/src/selectorAll.js ***!\n  \\******************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\nfunction empty() {\n  return [];\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(selector) {\n  return selector == null ? empty : function() {\n    return this.querySelectorAll(selector);\n  };\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-selection/src/sourceEvent.js\":\n/*!******************************************************!*\\\n  !*** ./node_modules/d3-selection/src/sourceEvent.js ***!\n  \\******************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _selection_on__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./selection/on */ \"./node_modules/d3-selection/src/selection/on.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  var current = _selection_on__WEBPACK_IMPORTED_MODULE_0__[\"event\"], source;\n  while (source = current.sourceEvent) current = source;\n  return current;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-selection/src/touch.js\":\n/*!************************************************!*\\\n  !*** ./node_modules/d3-selection/src/touch.js ***!\n  \\************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _sourceEvent__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./sourceEvent */ \"./node_modules/d3-selection/src/sourceEvent.js\");\n/* harmony import */ var _point__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./point */ \"./node_modules/d3-selection/src/point.js\");\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(node, touches, identifier) {\n  if (arguments.length < 3) identifier = touches, touches = Object(_sourceEvent__WEBPACK_IMPORTED_MODULE_0__[\"default\"])().changedTouches;\n\n  for (var i = 0, n = touches ? touches.length : 0, touch; i < n; ++i) {\n    if ((touch = touches[i]).identifier === identifier) {\n      return Object(_point__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(node, touch);\n    }\n  }\n\n  return null;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-selection/src/touches.js\":\n/*!**************************************************!*\\\n  !*** ./node_modules/d3-selection/src/touches.js ***!\n  \\**************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _sourceEvent__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./sourceEvent */ \"./node_modules/d3-selection/src/sourceEvent.js\");\n/* harmony import */ var _point__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./point */ \"./node_modules/d3-selection/src/point.js\");\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(node, touches) {\n  if (touches == null) touches = Object(_sourceEvent__WEBPACK_IMPORTED_MODULE_0__[\"default\"])().touches;\n\n  for (var i = 0, n = touches ? touches.length : 0, points = new Array(n); i < n; ++i) {\n    points[i] = Object(_point__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(node, touches[i]);\n  }\n\n  return points;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-selection/src/window.js\":\n/*!*************************************************!*\\\n  !*** ./node_modules/d3-selection/src/window.js ***!\n  \\*************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(node) {\n  return (node.ownerDocument && node.ownerDocument.defaultView) // node is a Node\n      || (node.document && node) // node is a Window\n      || node.defaultView; // node is a Document\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-shape/node_modules/d3-path/src/index.js\":\n/*!*****************************************************************!*\\\n  !*** ./node_modules/d3-shape/node_modules/d3-path/src/index.js ***!\n  \\*****************************************************************/\n/*! exports provided: path */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _path_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./path.js */ \"./node_modules/d3-shape/node_modules/d3-path/src/path.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"path\", function() { return _path_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-shape/node_modules/d3-path/src/path.js\":\n/*!****************************************************************!*\\\n  !*** ./node_modules/d3-shape/node_modules/d3-path/src/path.js ***!\n  \\****************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\nconst pi = Math.PI,\n    tau = 2 * pi,\n    epsilon = 1e-6,\n    tauEpsilon = tau - epsilon;\n\nfunction Path() {\n  this._x0 = this._y0 = // start of current subpath\n  this._x1 = this._y1 = null; // end of current subpath\n  this._ = \"\";\n}\n\nfunction path() {\n  return new Path;\n}\n\nPath.prototype = path.prototype = {\n  constructor: Path,\n  moveTo: function(x, y) {\n    this._ += \"M\" + (this._x0 = this._x1 = +x) + \",\" + (this._y0 = this._y1 = +y);\n  },\n  closePath: function() {\n    if (this._x1 !== null) {\n      this._x1 = this._x0, this._y1 = this._y0;\n      this._ += \"Z\";\n    }\n  },\n  lineTo: function(x, y) {\n    this._ += \"L\" + (this._x1 = +x) + \",\" + (this._y1 = +y);\n  },\n  quadraticCurveTo: function(x1, y1, x, y) {\n    this._ += \"Q\" + (+x1) + \",\" + (+y1) + \",\" + (this._x1 = +x) + \",\" + (this._y1 = +y);\n  },\n  bezierCurveTo: function(x1, y1, x2, y2, x, y) {\n    this._ += \"C\" + (+x1) + \",\" + (+y1) + \",\" + (+x2) + \",\" + (+y2) + \",\" + (this._x1 = +x) + \",\" + (this._y1 = +y);\n  },\n  arcTo: function(x1, y1, x2, y2, r) {\n    x1 = +x1, y1 = +y1, x2 = +x2, y2 = +y2, r = +r;\n    var x0 = this._x1,\n        y0 = this._y1,\n        x21 = x2 - x1,\n        y21 = y2 - y1,\n        x01 = x0 - x1,\n        y01 = y0 - y1,\n        l01_2 = x01 * x01 + y01 * y01;\n\n    // Is the radius negative? Error.\n    if (r < 0) throw new Error(\"negative radius: \" + r);\n\n    // Is this path empty? Move to (x1,y1).\n    if (this._x1 === null) {\n      this._ += \"M\" + (this._x1 = x1) + \",\" + (this._y1 = y1);\n    }\n\n    // Or, is (x1,y1) coincident with (x0,y0)? Do nothing.\n    else if (!(l01_2 > epsilon));\n\n    // Or, are (x0,y0), (x1,y1) and (x2,y2) collinear?\n    // Equivalently, is (x1,y1) coincident with (x2,y2)?\n    // Or, is the radius zero? Line to (x1,y1).\n    else if (!(Math.abs(y01 * x21 - y21 * x01) > epsilon) || !r) {\n      this._ += \"L\" + (this._x1 = x1) + \",\" + (this._y1 = y1);\n    }\n\n    // Otherwise, draw an arc!\n    else {\n      var x20 = x2 - x0,\n          y20 = y2 - y0,\n          l21_2 = x21 * x21 + y21 * y21,\n          l20_2 = x20 * x20 + y20 * y20,\n          l21 = Math.sqrt(l21_2),\n          l01 = Math.sqrt(l01_2),\n          l = r * Math.tan((pi - Math.acos((l21_2 + l01_2 - l20_2) / (2 * l21 * l01))) / 2),\n          t01 = l / l01,\n          t21 = l / l21;\n\n      // If the start tangent is not coincident with (x0,y0), line to.\n      if (Math.abs(t01 - 1) > epsilon) {\n        this._ += \"L\" + (x1 + t01 * x01) + \",\" + (y1 + t01 * y01);\n      }\n\n      this._ += \"A\" + r + \",\" + r + \",0,0,\" + (+(y01 * x20 > x01 * y20)) + \",\" + (this._x1 = x1 + t21 * x21) + \",\" + (this._y1 = y1 + t21 * y21);\n    }\n  },\n  arc: function(x, y, r, a0, a1, ccw) {\n    x = +x, y = +y, r = +r, ccw = !!ccw;\n    var dx = r * Math.cos(a0),\n        dy = r * Math.sin(a0),\n        x0 = x + dx,\n        y0 = y + dy,\n        cw = 1 ^ ccw,\n        da = ccw ? a0 - a1 : a1 - a0;\n\n    // Is the radius negative? Error.\n    if (r < 0) throw new Error(\"negative radius: \" + r);\n\n    // Is this path empty? Move to (x0,y0).\n    if (this._x1 === null) {\n      this._ += \"M\" + x0 + \",\" + y0;\n    }\n\n    // Or, is (x0,y0) not coincident with the previous point? Line to (x0,y0).\n    else if (Math.abs(this._x1 - x0) > epsilon || Math.abs(this._y1 - y0) > epsilon) {\n      this._ += \"L\" + x0 + \",\" + y0;\n    }\n\n    // Is this arc empty? We’re done.\n    if (!r) return;\n\n    // Does the angle go the wrong way? Flip the direction.\n    if (da < 0) da = da % tau + tau;\n\n    // Is this a complete circle? Draw two arcs to complete the circle.\n    if (da > tauEpsilon) {\n      this._ += \"A\" + r + \",\" + r + \",0,1,\" + cw + \",\" + (x - dx) + \",\" + (y - dy) + \"A\" + r + \",\" + r + \",0,1,\" + cw + \",\" + (this._x1 = x0) + \",\" + (this._y1 = y0);\n    }\n\n    // Is this arc non-empty? Draw an arc!\n    else if (da > epsilon) {\n      this._ += \"A\" + r + \",\" + r + \",0,\" + (+(da >= pi)) + \",\" + cw + \",\" + (this._x1 = x + r * Math.cos(a1)) + \",\" + (this._y1 = y + r * Math.sin(a1));\n    }\n  },\n  rect: function(x, y, w, h) {\n    this._ += \"M\" + (this._x0 = this._x1 = +x) + \",\" + (this._y0 = this._y1 = +y) + \"h\" + (+w) + \"v\" + (+h) + \"h\" + (-w) + \"Z\";\n  },\n  toString: function() {\n    return this._;\n  }\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (path);\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-shape/src/arc.js\":\n/*!******************************************!*\\\n  !*** ./node_modules/d3-shape/src/arc.js ***!\n  \\******************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var d3_path__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-path */ \"./node_modules/d3-shape/node_modules/d3-path/src/index.js\");\n/* harmony import */ var _constant_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./constant.js */ \"./node_modules/d3-shape/src/constant.js\");\n/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./math.js */ \"./node_modules/d3-shape/src/math.js\");\n\n\n\n\nfunction arcInnerRadius(d) {\n  return d.innerRadius;\n}\n\nfunction arcOuterRadius(d) {\n  return d.outerRadius;\n}\n\nfunction arcStartAngle(d) {\n  return d.startAngle;\n}\n\nfunction arcEndAngle(d) {\n  return d.endAngle;\n}\n\nfunction arcPadAngle(d) {\n  return d && d.padAngle; // Note: optional!\n}\n\nfunction intersect(x0, y0, x1, y1, x2, y2, x3, y3) {\n  var x10 = x1 - x0, y10 = y1 - y0,\n      x32 = x3 - x2, y32 = y3 - y2,\n      t = y32 * x10 - x32 * y10;\n  if (t * t < _math_js__WEBPACK_IMPORTED_MODULE_2__[\"epsilon\"]) return;\n  t = (x32 * (y0 - y2) - y32 * (x0 - x2)) / t;\n  return [x0 + t * x10, y0 + t * y10];\n}\n\n// Compute perpendicular offset line of length rc.\n// http://mathworld.wolfram.com/Circle-LineIntersection.html\nfunction cornerTangents(x0, y0, x1, y1, r1, rc, cw) {\n  var x01 = x0 - x1,\n      y01 = y0 - y1,\n      lo = (cw ? rc : -rc) / Object(_math_js__WEBPACK_IMPORTED_MODULE_2__[\"sqrt\"])(x01 * x01 + y01 * y01),\n      ox = lo * y01,\n      oy = -lo * x01,\n      x11 = x0 + ox,\n      y11 = y0 + oy,\n      x10 = x1 + ox,\n      y10 = y1 + oy,\n      x00 = (x11 + x10) / 2,\n      y00 = (y11 + y10) / 2,\n      dx = x10 - x11,\n      dy = y10 - y11,\n      d2 = dx * dx + dy * dy,\n      r = r1 - rc,\n      D = x11 * y10 - x10 * y11,\n      d = (dy < 0 ? -1 : 1) * Object(_math_js__WEBPACK_IMPORTED_MODULE_2__[\"sqrt\"])(Object(_math_js__WEBPACK_IMPORTED_MODULE_2__[\"max\"])(0, r * r * d2 - D * D)),\n      cx0 = (D * dy - dx * d) / d2,\n      cy0 = (-D * dx - dy * d) / d2,\n      cx1 = (D * dy + dx * d) / d2,\n      cy1 = (-D * dx + dy * d) / d2,\n      dx0 = cx0 - x00,\n      dy0 = cy0 - y00,\n      dx1 = cx1 - x00,\n      dy1 = cy1 - y00;\n\n  // Pick the closer of the two intersection points.\n  // TODO Is there a faster way to determine which intersection to use?\n  if (dx0 * dx0 + dy0 * dy0 > dx1 * dx1 + dy1 * dy1) cx0 = cx1, cy0 = cy1;\n\n  return {\n    cx: cx0,\n    cy: cy0,\n    x01: -ox,\n    y01: -oy,\n    x11: cx0 * (r1 / r - 1),\n    y11: cy0 * (r1 / r - 1)\n  };\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  var innerRadius = arcInnerRadius,\n      outerRadius = arcOuterRadius,\n      cornerRadius = Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(0),\n      padRadius = null,\n      startAngle = arcStartAngle,\n      endAngle = arcEndAngle,\n      padAngle = arcPadAngle,\n      context = null;\n\n  function arc() {\n    var buffer,\n        r,\n        r0 = +innerRadius.apply(this, arguments),\n        r1 = +outerRadius.apply(this, arguments),\n        a0 = startAngle.apply(this, arguments) - _math_js__WEBPACK_IMPORTED_MODULE_2__[\"halfPi\"],\n        a1 = endAngle.apply(this, arguments) - _math_js__WEBPACK_IMPORTED_MODULE_2__[\"halfPi\"],\n        da = Object(_math_js__WEBPACK_IMPORTED_MODULE_2__[\"abs\"])(a1 - a0),\n        cw = a1 > a0;\n\n    if (!context) context = buffer = Object(d3_path__WEBPACK_IMPORTED_MODULE_0__[\"path\"])();\n\n    // Ensure that the outer radius is always larger than the inner radius.\n    if (r1 < r0) r = r1, r1 = r0, r0 = r;\n\n    // Is it a point?\n    if (!(r1 > _math_js__WEBPACK_IMPORTED_MODULE_2__[\"epsilon\"])) context.moveTo(0, 0);\n\n    // Or is it a circle or annulus?\n    else if (da > _math_js__WEBPACK_IMPORTED_MODULE_2__[\"tau\"] - _math_js__WEBPACK_IMPORTED_MODULE_2__[\"epsilon\"]) {\n      context.moveTo(r1 * Object(_math_js__WEBPACK_IMPORTED_MODULE_2__[\"cos\"])(a0), r1 * Object(_math_js__WEBPACK_IMPORTED_MODULE_2__[\"sin\"])(a0));\n      context.arc(0, 0, r1, a0, a1, !cw);\n      if (r0 > _math_js__WEBPACK_IMPORTED_MODULE_2__[\"epsilon\"]) {\n        context.moveTo(r0 * Object(_math_js__WEBPACK_IMPORTED_MODULE_2__[\"cos\"])(a1), r0 * Object(_math_js__WEBPACK_IMPORTED_MODULE_2__[\"sin\"])(a1));\n        context.arc(0, 0, r0, a1, a0, cw);\n      }\n    }\n\n    // Or is it a circular or annular sector?\n    else {\n      var a01 = a0,\n          a11 = a1,\n          a00 = a0,\n          a10 = a1,\n          da0 = da,\n          da1 = da,\n          ap = padAngle.apply(this, arguments) / 2,\n          rp = (ap > _math_js__WEBPACK_IMPORTED_MODULE_2__[\"epsilon\"]) && (padRadius ? +padRadius.apply(this, arguments) : Object(_math_js__WEBPACK_IMPORTED_MODULE_2__[\"sqrt\"])(r0 * r0 + r1 * r1)),\n          rc = Object(_math_js__WEBPACK_IMPORTED_MODULE_2__[\"min\"])(Object(_math_js__WEBPACK_IMPORTED_MODULE_2__[\"abs\"])(r1 - r0) / 2, +cornerRadius.apply(this, arguments)),\n          rc0 = rc,\n          rc1 = rc,\n          t0,\n          t1;\n\n      // Apply padding? Note that since r1 ≥ r0, da1 ≥ da0.\n      if (rp > _math_js__WEBPACK_IMPORTED_MODULE_2__[\"epsilon\"]) {\n        var p0 = Object(_math_js__WEBPACK_IMPORTED_MODULE_2__[\"asin\"])(rp / r0 * Object(_math_js__WEBPACK_IMPORTED_MODULE_2__[\"sin\"])(ap)),\n            p1 = Object(_math_js__WEBPACK_IMPORTED_MODULE_2__[\"asin\"])(rp / r1 * Object(_math_js__WEBPACK_IMPORTED_MODULE_2__[\"sin\"])(ap));\n        if ((da0 -= p0 * 2) > _math_js__WEBPACK_IMPORTED_MODULE_2__[\"epsilon\"]) p0 *= (cw ? 1 : -1), a00 += p0, a10 -= p0;\n        else da0 = 0, a00 = a10 = (a0 + a1) / 2;\n        if ((da1 -= p1 * 2) > _math_js__WEBPACK_IMPORTED_MODULE_2__[\"epsilon\"]) p1 *= (cw ? 1 : -1), a01 += p1, a11 -= p1;\n        else da1 = 0, a01 = a11 = (a0 + a1) / 2;\n      }\n\n      var x01 = r1 * Object(_math_js__WEBPACK_IMPORTED_MODULE_2__[\"cos\"])(a01),\n          y01 = r1 * Object(_math_js__WEBPACK_IMPORTED_MODULE_2__[\"sin\"])(a01),\n          x10 = r0 * Object(_math_js__WEBPACK_IMPORTED_MODULE_2__[\"cos\"])(a10),\n          y10 = r0 * Object(_math_js__WEBPACK_IMPORTED_MODULE_2__[\"sin\"])(a10);\n\n      // Apply rounded corners?\n      if (rc > _math_js__WEBPACK_IMPORTED_MODULE_2__[\"epsilon\"]) {\n        var x11 = r1 * Object(_math_js__WEBPACK_IMPORTED_MODULE_2__[\"cos\"])(a11),\n            y11 = r1 * Object(_math_js__WEBPACK_IMPORTED_MODULE_2__[\"sin\"])(a11),\n            x00 = r0 * Object(_math_js__WEBPACK_IMPORTED_MODULE_2__[\"cos\"])(a00),\n            y00 = r0 * Object(_math_js__WEBPACK_IMPORTED_MODULE_2__[\"sin\"])(a00),\n            oc;\n\n        // Restrict the corner radius according to the sector angle.\n        if (da < _math_js__WEBPACK_IMPORTED_MODULE_2__[\"pi\"] && (oc = intersect(x01, y01, x00, y00, x11, y11, x10, y10))) {\n          var ax = x01 - oc[0],\n              ay = y01 - oc[1],\n              bx = x11 - oc[0],\n              by = y11 - oc[1],\n              kc = 1 / Object(_math_js__WEBPACK_IMPORTED_MODULE_2__[\"sin\"])(Object(_math_js__WEBPACK_IMPORTED_MODULE_2__[\"acos\"])((ax * bx + ay * by) / (Object(_math_js__WEBPACK_IMPORTED_MODULE_2__[\"sqrt\"])(ax * ax + ay * ay) * Object(_math_js__WEBPACK_IMPORTED_MODULE_2__[\"sqrt\"])(bx * bx + by * by))) / 2),\n              lc = Object(_math_js__WEBPACK_IMPORTED_MODULE_2__[\"sqrt\"])(oc[0] * oc[0] + oc[1] * oc[1]);\n          rc0 = Object(_math_js__WEBPACK_IMPORTED_MODULE_2__[\"min\"])(rc, (r0 - lc) / (kc - 1));\n          rc1 = Object(_math_js__WEBPACK_IMPORTED_MODULE_2__[\"min\"])(rc, (r1 - lc) / (kc + 1));\n        }\n      }\n\n      // Is the sector collapsed to a line?\n      if (!(da1 > _math_js__WEBPACK_IMPORTED_MODULE_2__[\"epsilon\"])) context.moveTo(x01, y01);\n\n      // Does the sector’s outer ring have rounded corners?\n      else if (rc1 > _math_js__WEBPACK_IMPORTED_MODULE_2__[\"epsilon\"]) {\n        t0 = cornerTangents(x00, y00, x01, y01, r1, rc1, cw);\n        t1 = cornerTangents(x11, y11, x10, y10, r1, rc1, cw);\n\n        context.moveTo(t0.cx + t0.x01, t0.cy + t0.y01);\n\n        // Have the corners merged?\n        if (rc1 < rc) context.arc(t0.cx, t0.cy, rc1, Object(_math_js__WEBPACK_IMPORTED_MODULE_2__[\"atan2\"])(t0.y01, t0.x01), Object(_math_js__WEBPACK_IMPORTED_MODULE_2__[\"atan2\"])(t1.y01, t1.x01), !cw);\n\n        // Otherwise, draw the two corners and the ring.\n        else {\n          context.arc(t0.cx, t0.cy, rc1, Object(_math_js__WEBPACK_IMPORTED_MODULE_2__[\"atan2\"])(t0.y01, t0.x01), Object(_math_js__WEBPACK_IMPORTED_MODULE_2__[\"atan2\"])(t0.y11, t0.x11), !cw);\n          context.arc(0, 0, r1, Object(_math_js__WEBPACK_IMPORTED_MODULE_2__[\"atan2\"])(t0.cy + t0.y11, t0.cx + t0.x11), Object(_math_js__WEBPACK_IMPORTED_MODULE_2__[\"atan2\"])(t1.cy + t1.y11, t1.cx + t1.x11), !cw);\n          context.arc(t1.cx, t1.cy, rc1, Object(_math_js__WEBPACK_IMPORTED_MODULE_2__[\"atan2\"])(t1.y11, t1.x11), Object(_math_js__WEBPACK_IMPORTED_MODULE_2__[\"atan2\"])(t1.y01, t1.x01), !cw);\n        }\n      }\n\n      // Or is the outer ring just a circular arc?\n      else context.moveTo(x01, y01), context.arc(0, 0, r1, a01, a11, !cw);\n\n      // Is there no inner ring, and it’s a circular sector?\n      // Or perhaps it’s an annular sector collapsed due to padding?\n      if (!(r0 > _math_js__WEBPACK_IMPORTED_MODULE_2__[\"epsilon\"]) || !(da0 > _math_js__WEBPACK_IMPORTED_MODULE_2__[\"epsilon\"])) context.lineTo(x10, y10);\n\n      // Does the sector’s inner ring (or point) have rounded corners?\n      else if (rc0 > _math_js__WEBPACK_IMPORTED_MODULE_2__[\"epsilon\"]) {\n        t0 = cornerTangents(x10, y10, x11, y11, r0, -rc0, cw);\n        t1 = cornerTangents(x01, y01, x00, y00, r0, -rc0, cw);\n\n        context.lineTo(t0.cx + t0.x01, t0.cy + t0.y01);\n\n        // Have the corners merged?\n        if (rc0 < rc) context.arc(t0.cx, t0.cy, rc0, Object(_math_js__WEBPACK_IMPORTED_MODULE_2__[\"atan2\"])(t0.y01, t0.x01), Object(_math_js__WEBPACK_IMPORTED_MODULE_2__[\"atan2\"])(t1.y01, t1.x01), !cw);\n\n        // Otherwise, draw the two corners and the ring.\n        else {\n          context.arc(t0.cx, t0.cy, rc0, Object(_math_js__WEBPACK_IMPORTED_MODULE_2__[\"atan2\"])(t0.y01, t0.x01), Object(_math_js__WEBPACK_IMPORTED_MODULE_2__[\"atan2\"])(t0.y11, t0.x11), !cw);\n          context.arc(0, 0, r0, Object(_math_js__WEBPACK_IMPORTED_MODULE_2__[\"atan2\"])(t0.cy + t0.y11, t0.cx + t0.x11), Object(_math_js__WEBPACK_IMPORTED_MODULE_2__[\"atan2\"])(t1.cy + t1.y11, t1.cx + t1.x11), cw);\n          context.arc(t1.cx, t1.cy, rc0, Object(_math_js__WEBPACK_IMPORTED_MODULE_2__[\"atan2\"])(t1.y11, t1.x11), Object(_math_js__WEBPACK_IMPORTED_MODULE_2__[\"atan2\"])(t1.y01, t1.x01), !cw);\n        }\n      }\n\n      // Or is the inner ring just a circular arc?\n      else context.arc(0, 0, r0, a10, a00, cw);\n    }\n\n    context.closePath();\n\n    if (buffer) return context = null, buffer + \"\" || null;\n  }\n\n  arc.centroid = function() {\n    var r = (+innerRadius.apply(this, arguments) + +outerRadius.apply(this, arguments)) / 2,\n        a = (+startAngle.apply(this, arguments) + +endAngle.apply(this, arguments)) / 2 - _math_js__WEBPACK_IMPORTED_MODULE_2__[\"pi\"] / 2;\n    return [Object(_math_js__WEBPACK_IMPORTED_MODULE_2__[\"cos\"])(a) * r, Object(_math_js__WEBPACK_IMPORTED_MODULE_2__[\"sin\"])(a) * r];\n  };\n\n  arc.innerRadius = function(_) {\n    return arguments.length ? (innerRadius = typeof _ === \"function\" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(+_), arc) : innerRadius;\n  };\n\n  arc.outerRadius = function(_) {\n    return arguments.length ? (outerRadius = typeof _ === \"function\" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(+_), arc) : outerRadius;\n  };\n\n  arc.cornerRadius = function(_) {\n    return arguments.length ? (cornerRadius = typeof _ === \"function\" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(+_), arc) : cornerRadius;\n  };\n\n  arc.padRadius = function(_) {\n    return arguments.length ? (padRadius = _ == null ? null : typeof _ === \"function\" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(+_), arc) : padRadius;\n  };\n\n  arc.startAngle = function(_) {\n    return arguments.length ? (startAngle = typeof _ === \"function\" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(+_), arc) : startAngle;\n  };\n\n  arc.endAngle = function(_) {\n    return arguments.length ? (endAngle = typeof _ === \"function\" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(+_), arc) : endAngle;\n  };\n\n  arc.padAngle = function(_) {\n    return arguments.length ? (padAngle = typeof _ === \"function\" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(+_), arc) : padAngle;\n  };\n\n  arc.context = function(_) {\n    return arguments.length ? ((context = _ == null ? null : _), arc) : context;\n  };\n\n  return arc;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-shape/src/area.js\":\n/*!*******************************************!*\\\n  !*** ./node_modules/d3-shape/src/area.js ***!\n  \\*******************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var d3_path__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-path */ \"./node_modules/d3-shape/node_modules/d3-path/src/index.js\");\n/* harmony import */ var _array_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./array.js */ \"./node_modules/d3-shape/src/array.js\");\n/* harmony import */ var _constant_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./constant.js */ \"./node_modules/d3-shape/src/constant.js\");\n/* harmony import */ var _curve_linear_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./curve/linear.js */ \"./node_modules/d3-shape/src/curve/linear.js\");\n/* harmony import */ var _line_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./line.js */ \"./node_modules/d3-shape/src/line.js\");\n/* harmony import */ var _point_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./point.js */ \"./node_modules/d3-shape/src/point.js\");\n\n\n\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(x0, y0, y1) {\n  var x1 = null,\n      defined = Object(_constant_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(true),\n      context = null,\n      curve = _curve_linear_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"],\n      output = null;\n\n  x0 = typeof x0 === \"function\" ? x0 : (x0 === undefined) ? _point_js__WEBPACK_IMPORTED_MODULE_5__[\"x\"] : Object(_constant_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(+x0);\n  y0 = typeof y0 === \"function\" ? y0 : (y0 === undefined) ? Object(_constant_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(0) : Object(_constant_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(+y0);\n  y1 = typeof y1 === \"function\" ? y1 : (y1 === undefined) ? _point_js__WEBPACK_IMPORTED_MODULE_5__[\"y\"] : Object(_constant_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(+y1);\n\n  function area(data) {\n    var i,\n        j,\n        k,\n        n = (data = Object(_array_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(data)).length,\n        d,\n        defined0 = false,\n        buffer,\n        x0z = new Array(n),\n        y0z = new Array(n);\n\n    if (context == null) output = curve(buffer = Object(d3_path__WEBPACK_IMPORTED_MODULE_0__[\"path\"])());\n\n    for (i = 0; i <= n; ++i) {\n      if (!(i < n && defined(d = data[i], i, data)) === defined0) {\n        if (defined0 = !defined0) {\n          j = i;\n          output.areaStart();\n          output.lineStart();\n        } else {\n          output.lineEnd();\n          output.lineStart();\n          for (k = i - 1; k >= j; --k) {\n            output.point(x0z[k], y0z[k]);\n          }\n          output.lineEnd();\n          output.areaEnd();\n        }\n      }\n      if (defined0) {\n        x0z[i] = +x0(d, i, data), y0z[i] = +y0(d, i, data);\n        output.point(x1 ? +x1(d, i, data) : x0z[i], y1 ? +y1(d, i, data) : y0z[i]);\n      }\n    }\n\n    if (buffer) return output = null, buffer + \"\" || null;\n  }\n\n  function arealine() {\n    return Object(_line_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"])().defined(defined).curve(curve).context(context);\n  }\n\n  area.x = function(_) {\n    return arguments.length ? (x0 = typeof _ === \"function\" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(+_), x1 = null, area) : x0;\n  };\n\n  area.x0 = function(_) {\n    return arguments.length ? (x0 = typeof _ === \"function\" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(+_), area) : x0;\n  };\n\n  area.x1 = function(_) {\n    return arguments.length ? (x1 = _ == null ? null : typeof _ === \"function\" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(+_), area) : x1;\n  };\n\n  area.y = function(_) {\n    return arguments.length ? (y0 = typeof _ === \"function\" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(+_), y1 = null, area) : y0;\n  };\n\n  area.y0 = function(_) {\n    return arguments.length ? (y0 = typeof _ === \"function\" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(+_), area) : y0;\n  };\n\n  area.y1 = function(_) {\n    return arguments.length ? (y1 = _ == null ? null : typeof _ === \"function\" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(+_), area) : y1;\n  };\n\n  area.lineX0 =\n  area.lineY0 = function() {\n    return arealine().x(x0).y(y0);\n  };\n\n  area.lineY1 = function() {\n    return arealine().x(x0).y(y1);\n  };\n\n  area.lineX1 = function() {\n    return arealine().x(x1).y(y0);\n  };\n\n  area.defined = function(_) {\n    return arguments.length ? (defined = typeof _ === \"function\" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(!!_), area) : defined;\n  };\n\n  area.curve = function(_) {\n    return arguments.length ? (curve = _, context != null && (output = curve(context)), area) : curve;\n  };\n\n  area.context = function(_) {\n    return arguments.length ? (_ == null ? context = output = null : output = curve(context = _), area) : context;\n  };\n\n  return area;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-shape/src/areaRadial.js\":\n/*!*************************************************!*\\\n  !*** ./node_modules/d3-shape/src/areaRadial.js ***!\n  \\*************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _curve_radial_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./curve/radial.js */ \"./node_modules/d3-shape/src/curve/radial.js\");\n/* harmony import */ var _area_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./area.js */ \"./node_modules/d3-shape/src/area.js\");\n/* harmony import */ var _lineRadial_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./lineRadial.js */ \"./node_modules/d3-shape/src/lineRadial.js\");\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  var a = Object(_area_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])().curve(_curve_radial_js__WEBPACK_IMPORTED_MODULE_0__[\"curveRadialLinear\"]),\n      c = a.curve,\n      x0 = a.lineX0,\n      x1 = a.lineX1,\n      y0 = a.lineY0,\n      y1 = a.lineY1;\n\n  a.angle = a.x, delete a.x;\n  a.startAngle = a.x0, delete a.x0;\n  a.endAngle = a.x1, delete a.x1;\n  a.radius = a.y, delete a.y;\n  a.innerRadius = a.y0, delete a.y0;\n  a.outerRadius = a.y1, delete a.y1;\n  a.lineStartAngle = function() { return Object(_lineRadial_js__WEBPACK_IMPORTED_MODULE_2__[\"lineRadial\"])(x0()); }, delete a.lineX0;\n  a.lineEndAngle = function() { return Object(_lineRadial_js__WEBPACK_IMPORTED_MODULE_2__[\"lineRadial\"])(x1()); }, delete a.lineX1;\n  a.lineInnerRadius = function() { return Object(_lineRadial_js__WEBPACK_IMPORTED_MODULE_2__[\"lineRadial\"])(y0()); }, delete a.lineY0;\n  a.lineOuterRadius = function() { return Object(_lineRadial_js__WEBPACK_IMPORTED_MODULE_2__[\"lineRadial\"])(y1()); }, delete a.lineY1;\n\n  a.curve = function(_) {\n    return arguments.length ? c(Object(_curve_radial_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(_)) : c()._curve;\n  };\n\n  return a;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-shape/src/array.js\":\n/*!********************************************!*\\\n  !*** ./node_modules/d3-shape/src/array.js ***!\n  \\********************************************/\n/*! exports provided: slice, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"slice\", function() { return slice; });\nvar slice = Array.prototype.slice;\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(x) {\n  return typeof x === \"object\" && \"length\" in x\n    ? x // Array, TypedArray, NodeList, array-like\n    : Array.from(x); // Map, Set, iterable, string, or anything else\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-shape/src/constant.js\":\n/*!***********************************************!*\\\n  !*** ./node_modules/d3-shape/src/constant.js ***!\n  \\***********************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(x) {\n  return function constant() {\n    return x;\n  };\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-shape/src/curve/basis.js\":\n/*!**************************************************!*\\\n  !*** ./node_modules/d3-shape/src/curve/basis.js ***!\n  \\**************************************************/\n/*! exports provided: point, Basis, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"point\", function() { return point; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Basis\", function() { return Basis; });\nfunction point(that, x, y) {\n  that._context.bezierCurveTo(\n    (2 * that._x0 + that._x1) / 3,\n    (2 * that._y0 + that._y1) / 3,\n    (that._x0 + 2 * that._x1) / 3,\n    (that._y0 + 2 * that._y1) / 3,\n    (that._x0 + 4 * that._x1 + x) / 6,\n    (that._y0 + 4 * that._y1 + y) / 6\n  );\n}\n\nfunction Basis(context) {\n  this._context = context;\n}\n\nBasis.prototype = {\n  areaStart: function() {\n    this._line = 0;\n  },\n  areaEnd: function() {\n    this._line = NaN;\n  },\n  lineStart: function() {\n    this._x0 = this._x1 =\n    this._y0 = this._y1 = NaN;\n    this._point = 0;\n  },\n  lineEnd: function() {\n    switch (this._point) {\n      case 3: point(this, this._x1, this._y1); // falls through\n      case 2: this._context.lineTo(this._x1, this._y1); break;\n    }\n    if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath();\n    this._line = 1 - this._line;\n  },\n  point: function(x, y) {\n    x = +x, y = +y;\n    switch (this._point) {\n      case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break;\n      case 1: this._point = 2; break;\n      case 2: this._point = 3; this._context.lineTo((5 * this._x0 + this._x1) / 6, (5 * this._y0 + this._y1) / 6); // falls through\n      default: point(this, x, y); break;\n    }\n    this._x0 = this._x1, this._x1 = x;\n    this._y0 = this._y1, this._y1 = y;\n  }\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(context) {\n  return new Basis(context);\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-shape/src/curve/basisClosed.js\":\n/*!********************************************************!*\\\n  !*** ./node_modules/d3-shape/src/curve/basisClosed.js ***!\n  \\********************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _noop_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../noop.js */ \"./node_modules/d3-shape/src/noop.js\");\n/* harmony import */ var _basis_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./basis.js */ \"./node_modules/d3-shape/src/curve/basis.js\");\n\n\n\nfunction BasisClosed(context) {\n  this._context = context;\n}\n\nBasisClosed.prototype = {\n  areaStart: _noop_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"],\n  areaEnd: _noop_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"],\n  lineStart: function() {\n    this._x0 = this._x1 = this._x2 = this._x3 = this._x4 =\n    this._y0 = this._y1 = this._y2 = this._y3 = this._y4 = NaN;\n    this._point = 0;\n  },\n  lineEnd: function() {\n    switch (this._point) {\n      case 1: {\n        this._context.moveTo(this._x2, this._y2);\n        this._context.closePath();\n        break;\n      }\n      case 2: {\n        this._context.moveTo((this._x2 + 2 * this._x3) / 3, (this._y2 + 2 * this._y3) / 3);\n        this._context.lineTo((this._x3 + 2 * this._x2) / 3, (this._y3 + 2 * this._y2) / 3);\n        this._context.closePath();\n        break;\n      }\n      case 3: {\n        this.point(this._x2, this._y2);\n        this.point(this._x3, this._y3);\n        this.point(this._x4, this._y4);\n        break;\n      }\n    }\n  },\n  point: function(x, y) {\n    x = +x, y = +y;\n    switch (this._point) {\n      case 0: this._point = 1; this._x2 = x, this._y2 = y; break;\n      case 1: this._point = 2; this._x3 = x, this._y3 = y; break;\n      case 2: this._point = 3; this._x4 = x, this._y4 = y; this._context.moveTo((this._x0 + 4 * this._x1 + x) / 6, (this._y0 + 4 * this._y1 + y) / 6); break;\n      default: Object(_basis_js__WEBPACK_IMPORTED_MODULE_1__[\"point\"])(this, x, y); break;\n    }\n    this._x0 = this._x1, this._x1 = x;\n    this._y0 = this._y1, this._y1 = y;\n  }\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(context) {\n  return new BasisClosed(context);\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-shape/src/curve/basisOpen.js\":\n/*!******************************************************!*\\\n  !*** ./node_modules/d3-shape/src/curve/basisOpen.js ***!\n  \\******************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _basis_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./basis.js */ \"./node_modules/d3-shape/src/curve/basis.js\");\n\n\nfunction BasisOpen(context) {\n  this._context = context;\n}\n\nBasisOpen.prototype = {\n  areaStart: function() {\n    this._line = 0;\n  },\n  areaEnd: function() {\n    this._line = NaN;\n  },\n  lineStart: function() {\n    this._x0 = this._x1 =\n    this._y0 = this._y1 = NaN;\n    this._point = 0;\n  },\n  lineEnd: function() {\n    if (this._line || (this._line !== 0 && this._point === 3)) this._context.closePath();\n    this._line = 1 - this._line;\n  },\n  point: function(x, y) {\n    x = +x, y = +y;\n    switch (this._point) {\n      case 0: this._point = 1; break;\n      case 1: this._point = 2; break;\n      case 2: this._point = 3; var x0 = (this._x0 + 4 * this._x1 + x) / 6, y0 = (this._y0 + 4 * this._y1 + y) / 6; this._line ? this._context.lineTo(x0, y0) : this._context.moveTo(x0, y0); break;\n      case 3: this._point = 4; // falls through\n      default: Object(_basis_js__WEBPACK_IMPORTED_MODULE_0__[\"point\"])(this, x, y); break;\n    }\n    this._x0 = this._x1, this._x1 = x;\n    this._y0 = this._y1, this._y1 = y;\n  }\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(context) {\n  return new BasisOpen(context);\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-shape/src/curve/bump.js\":\n/*!*************************************************!*\\\n  !*** ./node_modules/d3-shape/src/curve/bump.js ***!\n  \\*************************************************/\n/*! exports provided: bumpX, bumpY */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"bumpX\", function() { return bumpX; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"bumpY\", function() { return bumpY; });\nclass Bump {\n  constructor(context, x) {\n    this._context = context;\n    this._x = x;\n  }\n  areaStart() {\n    this._line = 0;\n  }\n  areaEnd() {\n    this._line = NaN;\n  }\n  lineStart() {\n    this._point = 0;\n  }\n  lineEnd() {\n    if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath();\n    this._line = 1 - this._line;\n  }\n  point(x, y) {\n    x = +x, y = +y;\n    switch (this._point) {\n      case 0: {\n        this._point = 1;\n        if (this._line) this._context.lineTo(x, y);\n        else this._context.moveTo(x, y);\n        break;\n      }\n      case 1: this._point = 2; // falls through\n      default: {\n        if (this._x) this._context.bezierCurveTo(this._x0 = (this._x0 + x) / 2, this._y0, this._x0, y, x, y);\n        else this._context.bezierCurveTo(this._x0, this._y0 = (this._y0 + y) / 2, x, this._y0, x, y);\n        break;\n      }\n    }\n    this._x0 = x, this._y0 = y;\n  }\n}\n\nfunction bumpX(context) {\n  return new Bump(context, true);\n}\n\nfunction bumpY(context) {\n  return new Bump(context, false);\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-shape/src/curve/bundle.js\":\n/*!***************************************************!*\\\n  !*** ./node_modules/d3-shape/src/curve/bundle.js ***!\n  \\***************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _basis_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./basis.js */ \"./node_modules/d3-shape/src/curve/basis.js\");\n\n\nfunction Bundle(context, beta) {\n  this._basis = new _basis_js__WEBPACK_IMPORTED_MODULE_0__[\"Basis\"](context);\n  this._beta = beta;\n}\n\nBundle.prototype = {\n  lineStart: function() {\n    this._x = [];\n    this._y = [];\n    this._basis.lineStart();\n  },\n  lineEnd: function() {\n    var x = this._x,\n        y = this._y,\n        j = x.length - 1;\n\n    if (j > 0) {\n      var x0 = x[0],\n          y0 = y[0],\n          dx = x[j] - x0,\n          dy = y[j] - y0,\n          i = -1,\n          t;\n\n      while (++i <= j) {\n        t = i / j;\n        this._basis.point(\n          this._beta * x[i] + (1 - this._beta) * (x0 + t * dx),\n          this._beta * y[i] + (1 - this._beta) * (y0 + t * dy)\n        );\n      }\n    }\n\n    this._x = this._y = null;\n    this._basis.lineEnd();\n  },\n  point: function(x, y) {\n    this._x.push(+x);\n    this._y.push(+y);\n  }\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ((function custom(beta) {\n\n  function bundle(context) {\n    return beta === 1 ? new _basis_js__WEBPACK_IMPORTED_MODULE_0__[\"Basis\"](context) : new Bundle(context, beta);\n  }\n\n  bundle.beta = function(beta) {\n    return custom(+beta);\n  };\n\n  return bundle;\n})(0.85));\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-shape/src/curve/cardinal.js\":\n/*!*****************************************************!*\\\n  !*** ./node_modules/d3-shape/src/curve/cardinal.js ***!\n  \\*****************************************************/\n/*! exports provided: point, Cardinal, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"point\", function() { return point; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Cardinal\", function() { return Cardinal; });\nfunction point(that, x, y) {\n  that._context.bezierCurveTo(\n    that._x1 + that._k * (that._x2 - that._x0),\n    that._y1 + that._k * (that._y2 - that._y0),\n    that._x2 + that._k * (that._x1 - x),\n    that._y2 + that._k * (that._y1 - y),\n    that._x2,\n    that._y2\n  );\n}\n\nfunction Cardinal(context, tension) {\n  this._context = context;\n  this._k = (1 - tension) / 6;\n}\n\nCardinal.prototype = {\n  areaStart: function() {\n    this._line = 0;\n  },\n  areaEnd: function() {\n    this._line = NaN;\n  },\n  lineStart: function() {\n    this._x0 = this._x1 = this._x2 =\n    this._y0 = this._y1 = this._y2 = NaN;\n    this._point = 0;\n  },\n  lineEnd: function() {\n    switch (this._point) {\n      case 2: this._context.lineTo(this._x2, this._y2); break;\n      case 3: point(this, this._x1, this._y1); break;\n    }\n    if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath();\n    this._line = 1 - this._line;\n  },\n  point: function(x, y) {\n    x = +x, y = +y;\n    switch (this._point) {\n      case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break;\n      case 1: this._point = 2; this._x1 = x, this._y1 = y; break;\n      case 2: this._point = 3; // falls through\n      default: point(this, x, y); break;\n    }\n    this._x0 = this._x1, this._x1 = this._x2, this._x2 = x;\n    this._y0 = this._y1, this._y1 = this._y2, this._y2 = y;\n  }\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ((function custom(tension) {\n\n  function cardinal(context) {\n    return new Cardinal(context, tension);\n  }\n\n  cardinal.tension = function(tension) {\n    return custom(+tension);\n  };\n\n  return cardinal;\n})(0));\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-shape/src/curve/cardinalClosed.js\":\n/*!***********************************************************!*\\\n  !*** ./node_modules/d3-shape/src/curve/cardinalClosed.js ***!\n  \\***********************************************************/\n/*! exports provided: CardinalClosed, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"CardinalClosed\", function() { return CardinalClosed; });\n/* harmony import */ var _noop_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../noop.js */ \"./node_modules/d3-shape/src/noop.js\");\n/* harmony import */ var _cardinal_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./cardinal.js */ \"./node_modules/d3-shape/src/curve/cardinal.js\");\n\n\n\nfunction CardinalClosed(context, tension) {\n  this._context = context;\n  this._k = (1 - tension) / 6;\n}\n\nCardinalClosed.prototype = {\n  areaStart: _noop_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"],\n  areaEnd: _noop_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"],\n  lineStart: function() {\n    this._x0 = this._x1 = this._x2 = this._x3 = this._x4 = this._x5 =\n    this._y0 = this._y1 = this._y2 = this._y3 = this._y4 = this._y5 = NaN;\n    this._point = 0;\n  },\n  lineEnd: function() {\n    switch (this._point) {\n      case 1: {\n        this._context.moveTo(this._x3, this._y3);\n        this._context.closePath();\n        break;\n      }\n      case 2: {\n        this._context.lineTo(this._x3, this._y3);\n        this._context.closePath();\n        break;\n      }\n      case 3: {\n        this.point(this._x3, this._y3);\n        this.point(this._x4, this._y4);\n        this.point(this._x5, this._y5);\n        break;\n      }\n    }\n  },\n  point: function(x, y) {\n    x = +x, y = +y;\n    switch (this._point) {\n      case 0: this._point = 1; this._x3 = x, this._y3 = y; break;\n      case 1: this._point = 2; this._context.moveTo(this._x4 = x, this._y4 = y); break;\n      case 2: this._point = 3; this._x5 = x, this._y5 = y; break;\n      default: Object(_cardinal_js__WEBPACK_IMPORTED_MODULE_1__[\"point\"])(this, x, y); break;\n    }\n    this._x0 = this._x1, this._x1 = this._x2, this._x2 = x;\n    this._y0 = this._y1, this._y1 = this._y2, this._y2 = y;\n  }\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ((function custom(tension) {\n\n  function cardinal(context) {\n    return new CardinalClosed(context, tension);\n  }\n\n  cardinal.tension = function(tension) {\n    return custom(+tension);\n  };\n\n  return cardinal;\n})(0));\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-shape/src/curve/cardinalOpen.js\":\n/*!*********************************************************!*\\\n  !*** ./node_modules/d3-shape/src/curve/cardinalOpen.js ***!\n  \\*********************************************************/\n/*! exports provided: CardinalOpen, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"CardinalOpen\", function() { return CardinalOpen; });\n/* harmony import */ var _cardinal_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./cardinal.js */ \"./node_modules/d3-shape/src/curve/cardinal.js\");\n\n\nfunction CardinalOpen(context, tension) {\n  this._context = context;\n  this._k = (1 - tension) / 6;\n}\n\nCardinalOpen.prototype = {\n  areaStart: function() {\n    this._line = 0;\n  },\n  areaEnd: function() {\n    this._line = NaN;\n  },\n  lineStart: function() {\n    this._x0 = this._x1 = this._x2 =\n    this._y0 = this._y1 = this._y2 = NaN;\n    this._point = 0;\n  },\n  lineEnd: function() {\n    if (this._line || (this._line !== 0 && this._point === 3)) this._context.closePath();\n    this._line = 1 - this._line;\n  },\n  point: function(x, y) {\n    x = +x, y = +y;\n    switch (this._point) {\n      case 0: this._point = 1; break;\n      case 1: this._point = 2; break;\n      case 2: this._point = 3; this._line ? this._context.lineTo(this._x2, this._y2) : this._context.moveTo(this._x2, this._y2); break;\n      case 3: this._point = 4; // falls through\n      default: Object(_cardinal_js__WEBPACK_IMPORTED_MODULE_0__[\"point\"])(this, x, y); break;\n    }\n    this._x0 = this._x1, this._x1 = this._x2, this._x2 = x;\n    this._y0 = this._y1, this._y1 = this._y2, this._y2 = y;\n  }\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ((function custom(tension) {\n\n  function cardinal(context) {\n    return new CardinalOpen(context, tension);\n  }\n\n  cardinal.tension = function(tension) {\n    return custom(+tension);\n  };\n\n  return cardinal;\n})(0));\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-shape/src/curve/catmullRom.js\":\n/*!*******************************************************!*\\\n  !*** ./node_modules/d3-shape/src/curve/catmullRom.js ***!\n  \\*******************************************************/\n/*! exports provided: point, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"point\", function() { return point; });\n/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../math.js */ \"./node_modules/d3-shape/src/math.js\");\n/* harmony import */ var _cardinal_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./cardinal.js */ \"./node_modules/d3-shape/src/curve/cardinal.js\");\n\n\n\nfunction point(that, x, y) {\n  var x1 = that._x1,\n      y1 = that._y1,\n      x2 = that._x2,\n      y2 = that._y2;\n\n  if (that._l01_a > _math_js__WEBPACK_IMPORTED_MODULE_0__[\"epsilon\"]) {\n    var a = 2 * that._l01_2a + 3 * that._l01_a * that._l12_a + that._l12_2a,\n        n = 3 * that._l01_a * (that._l01_a + that._l12_a);\n    x1 = (x1 * a - that._x0 * that._l12_2a + that._x2 * that._l01_2a) / n;\n    y1 = (y1 * a - that._y0 * that._l12_2a + that._y2 * that._l01_2a) / n;\n  }\n\n  if (that._l23_a > _math_js__WEBPACK_IMPORTED_MODULE_0__[\"epsilon\"]) {\n    var b = 2 * that._l23_2a + 3 * that._l23_a * that._l12_a + that._l12_2a,\n        m = 3 * that._l23_a * (that._l23_a + that._l12_a);\n    x2 = (x2 * b + that._x1 * that._l23_2a - x * that._l12_2a) / m;\n    y2 = (y2 * b + that._y1 * that._l23_2a - y * that._l12_2a) / m;\n  }\n\n  that._context.bezierCurveTo(x1, y1, x2, y2, that._x2, that._y2);\n}\n\nfunction CatmullRom(context, alpha) {\n  this._context = context;\n  this._alpha = alpha;\n}\n\nCatmullRom.prototype = {\n  areaStart: function() {\n    this._line = 0;\n  },\n  areaEnd: function() {\n    this._line = NaN;\n  },\n  lineStart: function() {\n    this._x0 = this._x1 = this._x2 =\n    this._y0 = this._y1 = this._y2 = NaN;\n    this._l01_a = this._l12_a = this._l23_a =\n    this._l01_2a = this._l12_2a = this._l23_2a =\n    this._point = 0;\n  },\n  lineEnd: function() {\n    switch (this._point) {\n      case 2: this._context.lineTo(this._x2, this._y2); break;\n      case 3: this.point(this._x2, this._y2); break;\n    }\n    if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath();\n    this._line = 1 - this._line;\n  },\n  point: function(x, y) {\n    x = +x, y = +y;\n\n    if (this._point) {\n      var x23 = this._x2 - x,\n          y23 = this._y2 - y;\n      this._l23_a = Math.sqrt(this._l23_2a = Math.pow(x23 * x23 + y23 * y23, this._alpha));\n    }\n\n    switch (this._point) {\n      case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break;\n      case 1: this._point = 2; break;\n      case 2: this._point = 3; // falls through\n      default: point(this, x, y); break;\n    }\n\n    this._l01_a = this._l12_a, this._l12_a = this._l23_a;\n    this._l01_2a = this._l12_2a, this._l12_2a = this._l23_2a;\n    this._x0 = this._x1, this._x1 = this._x2, this._x2 = x;\n    this._y0 = this._y1, this._y1 = this._y2, this._y2 = y;\n  }\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ((function custom(alpha) {\n\n  function catmullRom(context) {\n    return alpha ? new CatmullRom(context, alpha) : new _cardinal_js__WEBPACK_IMPORTED_MODULE_1__[\"Cardinal\"](context, 0);\n  }\n\n  catmullRom.alpha = function(alpha) {\n    return custom(+alpha);\n  };\n\n  return catmullRom;\n})(0.5));\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-shape/src/curve/catmullRomClosed.js\":\n/*!*************************************************************!*\\\n  !*** ./node_modules/d3-shape/src/curve/catmullRomClosed.js ***!\n  \\*************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _cardinalClosed_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./cardinalClosed.js */ \"./node_modules/d3-shape/src/curve/cardinalClosed.js\");\n/* harmony import */ var _noop_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../noop.js */ \"./node_modules/d3-shape/src/noop.js\");\n/* harmony import */ var _catmullRom_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./catmullRom.js */ \"./node_modules/d3-shape/src/curve/catmullRom.js\");\n\n\n\n\nfunction CatmullRomClosed(context, alpha) {\n  this._context = context;\n  this._alpha = alpha;\n}\n\nCatmullRomClosed.prototype = {\n  areaStart: _noop_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"],\n  areaEnd: _noop_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"],\n  lineStart: function() {\n    this._x0 = this._x1 = this._x2 = this._x3 = this._x4 = this._x5 =\n    this._y0 = this._y1 = this._y2 = this._y3 = this._y4 = this._y5 = NaN;\n    this._l01_a = this._l12_a = this._l23_a =\n    this._l01_2a = this._l12_2a = this._l23_2a =\n    this._point = 0;\n  },\n  lineEnd: function() {\n    switch (this._point) {\n      case 1: {\n        this._context.moveTo(this._x3, this._y3);\n        this._context.closePath();\n        break;\n      }\n      case 2: {\n        this._context.lineTo(this._x3, this._y3);\n        this._context.closePath();\n        break;\n      }\n      case 3: {\n        this.point(this._x3, this._y3);\n        this.point(this._x4, this._y4);\n        this.point(this._x5, this._y5);\n        break;\n      }\n    }\n  },\n  point: function(x, y) {\n    x = +x, y = +y;\n\n    if (this._point) {\n      var x23 = this._x2 - x,\n          y23 = this._y2 - y;\n      this._l23_a = Math.sqrt(this._l23_2a = Math.pow(x23 * x23 + y23 * y23, this._alpha));\n    }\n\n    switch (this._point) {\n      case 0: this._point = 1; this._x3 = x, this._y3 = y; break;\n      case 1: this._point = 2; this._context.moveTo(this._x4 = x, this._y4 = y); break;\n      case 2: this._point = 3; this._x5 = x, this._y5 = y; break;\n      default: Object(_catmullRom_js__WEBPACK_IMPORTED_MODULE_2__[\"point\"])(this, x, y); break;\n    }\n\n    this._l01_a = this._l12_a, this._l12_a = this._l23_a;\n    this._l01_2a = this._l12_2a, this._l12_2a = this._l23_2a;\n    this._x0 = this._x1, this._x1 = this._x2, this._x2 = x;\n    this._y0 = this._y1, this._y1 = this._y2, this._y2 = y;\n  }\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ((function custom(alpha) {\n\n  function catmullRom(context) {\n    return alpha ? new CatmullRomClosed(context, alpha) : new _cardinalClosed_js__WEBPACK_IMPORTED_MODULE_0__[\"CardinalClosed\"](context, 0);\n  }\n\n  catmullRom.alpha = function(alpha) {\n    return custom(+alpha);\n  };\n\n  return catmullRom;\n})(0.5));\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-shape/src/curve/catmullRomOpen.js\":\n/*!***********************************************************!*\\\n  !*** ./node_modules/d3-shape/src/curve/catmullRomOpen.js ***!\n  \\***********************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _cardinalOpen_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./cardinalOpen.js */ \"./node_modules/d3-shape/src/curve/cardinalOpen.js\");\n/* harmony import */ var _catmullRom_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./catmullRom.js */ \"./node_modules/d3-shape/src/curve/catmullRom.js\");\n\n\n\nfunction CatmullRomOpen(context, alpha) {\n  this._context = context;\n  this._alpha = alpha;\n}\n\nCatmullRomOpen.prototype = {\n  areaStart: function() {\n    this._line = 0;\n  },\n  areaEnd: function() {\n    this._line = NaN;\n  },\n  lineStart: function() {\n    this._x0 = this._x1 = this._x2 =\n    this._y0 = this._y1 = this._y2 = NaN;\n    this._l01_a = this._l12_a = this._l23_a =\n    this._l01_2a = this._l12_2a = this._l23_2a =\n    this._point = 0;\n  },\n  lineEnd: function() {\n    if (this._line || (this._line !== 0 && this._point === 3)) this._context.closePath();\n    this._line = 1 - this._line;\n  },\n  point: function(x, y) {\n    x = +x, y = +y;\n\n    if (this._point) {\n      var x23 = this._x2 - x,\n          y23 = this._y2 - y;\n      this._l23_a = Math.sqrt(this._l23_2a = Math.pow(x23 * x23 + y23 * y23, this._alpha));\n    }\n\n    switch (this._point) {\n      case 0: this._point = 1; break;\n      case 1: this._point = 2; break;\n      case 2: this._point = 3; this._line ? this._context.lineTo(this._x2, this._y2) : this._context.moveTo(this._x2, this._y2); break;\n      case 3: this._point = 4; // falls through\n      default: Object(_catmullRom_js__WEBPACK_IMPORTED_MODULE_1__[\"point\"])(this, x, y); break;\n    }\n\n    this._l01_a = this._l12_a, this._l12_a = this._l23_a;\n    this._l01_2a = this._l12_2a, this._l12_2a = this._l23_2a;\n    this._x0 = this._x1, this._x1 = this._x2, this._x2 = x;\n    this._y0 = this._y1, this._y1 = this._y2, this._y2 = y;\n  }\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ((function custom(alpha) {\n\n  function catmullRom(context) {\n    return alpha ? new CatmullRomOpen(context, alpha) : new _cardinalOpen_js__WEBPACK_IMPORTED_MODULE_0__[\"CardinalOpen\"](context, 0);\n  }\n\n  catmullRom.alpha = function(alpha) {\n    return custom(+alpha);\n  };\n\n  return catmullRom;\n})(0.5));\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-shape/src/curve/linear.js\":\n/*!***************************************************!*\\\n  !*** ./node_modules/d3-shape/src/curve/linear.js ***!\n  \\***************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\nfunction Linear(context) {\n  this._context = context;\n}\n\nLinear.prototype = {\n  areaStart: function() {\n    this._line = 0;\n  },\n  areaEnd: function() {\n    this._line = NaN;\n  },\n  lineStart: function() {\n    this._point = 0;\n  },\n  lineEnd: function() {\n    if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath();\n    this._line = 1 - this._line;\n  },\n  point: function(x, y) {\n    x = +x, y = +y;\n    switch (this._point) {\n      case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break;\n      case 1: this._point = 2; // falls through\n      default: this._context.lineTo(x, y); break;\n    }\n  }\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(context) {\n  return new Linear(context);\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-shape/src/curve/linearClosed.js\":\n/*!*********************************************************!*\\\n  !*** ./node_modules/d3-shape/src/curve/linearClosed.js ***!\n  \\*********************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _noop_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../noop.js */ \"./node_modules/d3-shape/src/noop.js\");\n\n\nfunction LinearClosed(context) {\n  this._context = context;\n}\n\nLinearClosed.prototype = {\n  areaStart: _noop_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"],\n  areaEnd: _noop_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"],\n  lineStart: function() {\n    this._point = 0;\n  },\n  lineEnd: function() {\n    if (this._point) this._context.closePath();\n  },\n  point: function(x, y) {\n    x = +x, y = +y;\n    if (this._point) this._context.lineTo(x, y);\n    else this._point = 1, this._context.moveTo(x, y);\n  }\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(context) {\n  return new LinearClosed(context);\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-shape/src/curve/monotone.js\":\n/*!*****************************************************!*\\\n  !*** ./node_modules/d3-shape/src/curve/monotone.js ***!\n  \\*****************************************************/\n/*! exports provided: monotoneX, monotoneY */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"monotoneX\", function() { return monotoneX; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"monotoneY\", function() { return monotoneY; });\nfunction sign(x) {\n  return x < 0 ? -1 : 1;\n}\n\n// Calculate the slopes of the tangents (Hermite-type interpolation) based on\n// the following paper: Steffen, M. 1990. A Simple Method for Monotonic\n// Interpolation in One Dimension. Astronomy and Astrophysics, Vol. 239, NO.\n// NOV(II), P. 443, 1990.\nfunction slope3(that, x2, y2) {\n  var h0 = that._x1 - that._x0,\n      h1 = x2 - that._x1,\n      s0 = (that._y1 - that._y0) / (h0 || h1 < 0 && -0),\n      s1 = (y2 - that._y1) / (h1 || h0 < 0 && -0),\n      p = (s0 * h1 + s1 * h0) / (h0 + h1);\n  return (sign(s0) + sign(s1)) * Math.min(Math.abs(s0), Math.abs(s1), 0.5 * Math.abs(p)) || 0;\n}\n\n// Calculate a one-sided slope.\nfunction slope2(that, t) {\n  var h = that._x1 - that._x0;\n  return h ? (3 * (that._y1 - that._y0) / h - t) / 2 : t;\n}\n\n// According to https://en.wikipedia.org/wiki/Cubic_Hermite_spline#Representations\n// \"you can express cubic Hermite interpolation in terms of cubic Bézier curves\n// with respect to the four values p0, p0 + m0 / 3, p1 - m1 / 3, p1\".\nfunction point(that, t0, t1) {\n  var x0 = that._x0,\n      y0 = that._y0,\n      x1 = that._x1,\n      y1 = that._y1,\n      dx = (x1 - x0) / 3;\n  that._context.bezierCurveTo(x0 + dx, y0 + dx * t0, x1 - dx, y1 - dx * t1, x1, y1);\n}\n\nfunction MonotoneX(context) {\n  this._context = context;\n}\n\nMonotoneX.prototype = {\n  areaStart: function() {\n    this._line = 0;\n  },\n  areaEnd: function() {\n    this._line = NaN;\n  },\n  lineStart: function() {\n    this._x0 = this._x1 =\n    this._y0 = this._y1 =\n    this._t0 = NaN;\n    this._point = 0;\n  },\n  lineEnd: function() {\n    switch (this._point) {\n      case 2: this._context.lineTo(this._x1, this._y1); break;\n      case 3: point(this, this._t0, slope2(this, this._t0)); break;\n    }\n    if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath();\n    this._line = 1 - this._line;\n  },\n  point: function(x, y) {\n    var t1 = NaN;\n\n    x = +x, y = +y;\n    if (x === this._x1 && y === this._y1) return; // Ignore coincident points.\n    switch (this._point) {\n      case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break;\n      case 1: this._point = 2; break;\n      case 2: this._point = 3; point(this, slope2(this, t1 = slope3(this, x, y)), t1); break;\n      default: point(this, this._t0, t1 = slope3(this, x, y)); break;\n    }\n\n    this._x0 = this._x1, this._x1 = x;\n    this._y0 = this._y1, this._y1 = y;\n    this._t0 = t1;\n  }\n}\n\nfunction MonotoneY(context) {\n  this._context = new ReflectContext(context);\n}\n\n(MonotoneY.prototype = Object.create(MonotoneX.prototype)).point = function(x, y) {\n  MonotoneX.prototype.point.call(this, y, x);\n};\n\nfunction ReflectContext(context) {\n  this._context = context;\n}\n\nReflectContext.prototype = {\n  moveTo: function(x, y) { this._context.moveTo(y, x); },\n  closePath: function() { this._context.closePath(); },\n  lineTo: function(x, y) { this._context.lineTo(y, x); },\n  bezierCurveTo: function(x1, y1, x2, y2, x, y) { this._context.bezierCurveTo(y1, x1, y2, x2, y, x); }\n};\n\nfunction monotoneX(context) {\n  return new MonotoneX(context);\n}\n\nfunction monotoneY(context) {\n  return new MonotoneY(context);\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-shape/src/curve/natural.js\":\n/*!****************************************************!*\\\n  !*** ./node_modules/d3-shape/src/curve/natural.js ***!\n  \\****************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\nfunction Natural(context) {\n  this._context = context;\n}\n\nNatural.prototype = {\n  areaStart: function() {\n    this._line = 0;\n  },\n  areaEnd: function() {\n    this._line = NaN;\n  },\n  lineStart: function() {\n    this._x = [];\n    this._y = [];\n  },\n  lineEnd: function() {\n    var x = this._x,\n        y = this._y,\n        n = x.length;\n\n    if (n) {\n      this._line ? this._context.lineTo(x[0], y[0]) : this._context.moveTo(x[0], y[0]);\n      if (n === 2) {\n        this._context.lineTo(x[1], y[1]);\n      } else {\n        var px = controlPoints(x),\n            py = controlPoints(y);\n        for (var i0 = 0, i1 = 1; i1 < n; ++i0, ++i1) {\n          this._context.bezierCurveTo(px[0][i0], py[0][i0], px[1][i0], py[1][i0], x[i1], y[i1]);\n        }\n      }\n    }\n\n    if (this._line || (this._line !== 0 && n === 1)) this._context.closePath();\n    this._line = 1 - this._line;\n    this._x = this._y = null;\n  },\n  point: function(x, y) {\n    this._x.push(+x);\n    this._y.push(+y);\n  }\n};\n\n// See https://www.particleincell.com/2012/bezier-splines/ for derivation.\nfunction controlPoints(x) {\n  var i,\n      n = x.length - 1,\n      m,\n      a = new Array(n),\n      b = new Array(n),\n      r = new Array(n);\n  a[0] = 0, b[0] = 2, r[0] = x[0] + 2 * x[1];\n  for (i = 1; i < n - 1; ++i) a[i] = 1, b[i] = 4, r[i] = 4 * x[i] + 2 * x[i + 1];\n  a[n - 1] = 2, b[n - 1] = 7, r[n - 1] = 8 * x[n - 1] + x[n];\n  for (i = 1; i < n; ++i) m = a[i] / b[i - 1], b[i] -= m, r[i] -= m * r[i - 1];\n  a[n - 1] = r[n - 1] / b[n - 1];\n  for (i = n - 2; i >= 0; --i) a[i] = (r[i] - a[i + 1]) / b[i];\n  b[n - 1] = (x[n] + a[n - 1]) / 2;\n  for (i = 0; i < n - 1; ++i) b[i] = 2 * x[i + 1] - a[i + 1];\n  return [a, b];\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(context) {\n  return new Natural(context);\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-shape/src/curve/radial.js\":\n/*!***************************************************!*\\\n  !*** ./node_modules/d3-shape/src/curve/radial.js ***!\n  \\***************************************************/\n/*! exports provided: curveRadialLinear, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"curveRadialLinear\", function() { return curveRadialLinear; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return curveRadial; });\n/* harmony import */ var _linear_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./linear.js */ \"./node_modules/d3-shape/src/curve/linear.js\");\n\n\nvar curveRadialLinear = curveRadial(_linear_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]);\n\nfunction Radial(curve) {\n  this._curve = curve;\n}\n\nRadial.prototype = {\n  areaStart: function() {\n    this._curve.areaStart();\n  },\n  areaEnd: function() {\n    this._curve.areaEnd();\n  },\n  lineStart: function() {\n    this._curve.lineStart();\n  },\n  lineEnd: function() {\n    this._curve.lineEnd();\n  },\n  point: function(a, r) {\n    this._curve.point(r * Math.sin(a), r * -Math.cos(a));\n  }\n};\n\nfunction curveRadial(curve) {\n\n  function radial(context) {\n    return new Radial(curve(context));\n  }\n\n  radial._curve = curve;\n\n  return radial;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-shape/src/curve/step.js\":\n/*!*************************************************!*\\\n  !*** ./node_modules/d3-shape/src/curve/step.js ***!\n  \\*************************************************/\n/*! exports provided: default, stepBefore, stepAfter */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"stepBefore\", function() { return stepBefore; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"stepAfter\", function() { return stepAfter; });\nfunction Step(context, t) {\n  this._context = context;\n  this._t = t;\n}\n\nStep.prototype = {\n  areaStart: function() {\n    this._line = 0;\n  },\n  areaEnd: function() {\n    this._line = NaN;\n  },\n  lineStart: function() {\n    this._x = this._y = NaN;\n    this._point = 0;\n  },\n  lineEnd: function() {\n    if (0 < this._t && this._t < 1 && this._point === 2) this._context.lineTo(this._x, this._y);\n    if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath();\n    if (this._line >= 0) this._t = 1 - this._t, this._line = 1 - this._line;\n  },\n  point: function(x, y) {\n    x = +x, y = +y;\n    switch (this._point) {\n      case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break;\n      case 1: this._point = 2; // falls through\n      default: {\n        if (this._t <= 0) {\n          this._context.lineTo(this._x, y);\n          this._context.lineTo(x, y);\n        } else {\n          var x1 = this._x * (1 - this._t) + x * this._t;\n          this._context.lineTo(x1, this._y);\n          this._context.lineTo(x1, y);\n        }\n        break;\n      }\n    }\n    this._x = x, this._y = y;\n  }\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(context) {\n  return new Step(context, 0.5);\n});\n\nfunction stepBefore(context) {\n  return new Step(context, 0);\n}\n\nfunction stepAfter(context) {\n  return new Step(context, 1);\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-shape/src/descending.js\":\n/*!*************************************************!*\\\n  !*** ./node_modules/d3-shape/src/descending.js ***!\n  \\*************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(a, b) {\n  return b < a ? -1 : b > a ? 1 : b >= a ? 0 : NaN;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-shape/src/identity.js\":\n/*!***********************************************!*\\\n  !*** ./node_modules/d3-shape/src/identity.js ***!\n  \\***********************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(d) {\n  return d;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-shape/src/index.js\":\n/*!********************************************!*\\\n  !*** ./node_modules/d3-shape/src/index.js ***!\n  \\********************************************/\n/*! exports provided: arc, area, line, pie, areaRadial, radialArea, lineRadial, radialLine, pointRadial, linkHorizontal, linkVertical, linkRadial, symbol, symbols, symbolCircle, symbolCross, symbolDiamond, symbolSquare, symbolStar, symbolTriangle, symbolWye, curveBasisClosed, curveBasisOpen, curveBasis, curveBumpX, curveBumpY, curveBundle, curveCardinalClosed, curveCardinalOpen, curveCardinal, curveCatmullRomClosed, curveCatmullRomOpen, curveCatmullRom, curveLinearClosed, curveLinear, curveMonotoneX, curveMonotoneY, curveNatural, curveStep, curveStepAfter, curveStepBefore, stack, stackOffsetExpand, stackOffsetDiverging, stackOffsetNone, stackOffsetSilhouette, stackOffsetWiggle, stackOrderAppearance, stackOrderAscending, stackOrderDescending, stackOrderInsideOut, stackOrderNone, stackOrderReverse */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _arc_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./arc.js */ \"./node_modules/d3-shape/src/arc.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"arc\", function() { return _arc_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n/* harmony import */ var _area_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./area.js */ \"./node_modules/d3-shape/src/area.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"area\", function() { return _area_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"]; });\n\n/* harmony import */ var _line_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./line.js */ \"./node_modules/d3-shape/src/line.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"line\", function() { return _line_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"]; });\n\n/* harmony import */ var _pie_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./pie.js */ \"./node_modules/d3-shape/src/pie.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"pie\", function() { return _pie_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"]; });\n\n/* harmony import */ var _areaRadial_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./areaRadial.js */ \"./node_modules/d3-shape/src/areaRadial.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"areaRadial\", function() { return _areaRadial_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"radialArea\", function() { return _areaRadial_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"]; });\n\n/* harmony import */ var _lineRadial_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./lineRadial.js */ \"./node_modules/d3-shape/src/lineRadial.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"lineRadial\", function() { return _lineRadial_js__WEBPACK_IMPORTED_MODULE_5__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"radialLine\", function() { return _lineRadial_js__WEBPACK_IMPORTED_MODULE_5__[\"default\"]; });\n\n/* harmony import */ var _pointRadial_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./pointRadial.js */ \"./node_modules/d3-shape/src/pointRadial.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"pointRadial\", function() { return _pointRadial_js__WEBPACK_IMPORTED_MODULE_6__[\"default\"]; });\n\n/* harmony import */ var _link_index_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./link/index.js */ \"./node_modules/d3-shape/src/link/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"linkHorizontal\", function() { return _link_index_js__WEBPACK_IMPORTED_MODULE_7__[\"linkHorizontal\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"linkVertical\", function() { return _link_index_js__WEBPACK_IMPORTED_MODULE_7__[\"linkVertical\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"linkRadial\", function() { return _link_index_js__WEBPACK_IMPORTED_MODULE_7__[\"linkRadial\"]; });\n\n/* harmony import */ var _symbol_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./symbol.js */ \"./node_modules/d3-shape/src/symbol.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"symbol\", function() { return _symbol_js__WEBPACK_IMPORTED_MODULE_8__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"symbols\", function() { return _symbol_js__WEBPACK_IMPORTED_MODULE_8__[\"symbols\"]; });\n\n/* harmony import */ var _symbol_circle_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./symbol/circle.js */ \"./node_modules/d3-shape/src/symbol/circle.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"symbolCircle\", function() { return _symbol_circle_js__WEBPACK_IMPORTED_MODULE_9__[\"default\"]; });\n\n/* harmony import */ var _symbol_cross_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./symbol/cross.js */ \"./node_modules/d3-shape/src/symbol/cross.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"symbolCross\", function() { return _symbol_cross_js__WEBPACK_IMPORTED_MODULE_10__[\"default\"]; });\n\n/* harmony import */ var _symbol_diamond_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./symbol/diamond.js */ \"./node_modules/d3-shape/src/symbol/diamond.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"symbolDiamond\", function() { return _symbol_diamond_js__WEBPACK_IMPORTED_MODULE_11__[\"default\"]; });\n\n/* harmony import */ var _symbol_square_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./symbol/square.js */ \"./node_modules/d3-shape/src/symbol/square.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"symbolSquare\", function() { return _symbol_square_js__WEBPACK_IMPORTED_MODULE_12__[\"default\"]; });\n\n/* harmony import */ var _symbol_star_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./symbol/star.js */ \"./node_modules/d3-shape/src/symbol/star.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"symbolStar\", function() { return _symbol_star_js__WEBPACK_IMPORTED_MODULE_13__[\"default\"]; });\n\n/* harmony import */ var _symbol_triangle_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./symbol/triangle.js */ \"./node_modules/d3-shape/src/symbol/triangle.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"symbolTriangle\", function() { return _symbol_triangle_js__WEBPACK_IMPORTED_MODULE_14__[\"default\"]; });\n\n/* harmony import */ var _symbol_wye_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./symbol/wye.js */ \"./node_modules/d3-shape/src/symbol/wye.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"symbolWye\", function() { return _symbol_wye_js__WEBPACK_IMPORTED_MODULE_15__[\"default\"]; });\n\n/* harmony import */ var _curve_basisClosed_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./curve/basisClosed.js */ \"./node_modules/d3-shape/src/curve/basisClosed.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"curveBasisClosed\", function() { return _curve_basisClosed_js__WEBPACK_IMPORTED_MODULE_16__[\"default\"]; });\n\n/* harmony import */ var _curve_basisOpen_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./curve/basisOpen.js */ \"./node_modules/d3-shape/src/curve/basisOpen.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"curveBasisOpen\", function() { return _curve_basisOpen_js__WEBPACK_IMPORTED_MODULE_17__[\"default\"]; });\n\n/* harmony import */ var _curve_basis_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./curve/basis.js */ \"./node_modules/d3-shape/src/curve/basis.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"curveBasis\", function() { return _curve_basis_js__WEBPACK_IMPORTED_MODULE_18__[\"default\"]; });\n\n/* harmony import */ var _curve_bump_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./curve/bump.js */ \"./node_modules/d3-shape/src/curve/bump.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"curveBumpX\", function() { return _curve_bump_js__WEBPACK_IMPORTED_MODULE_19__[\"bumpX\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"curveBumpY\", function() { return _curve_bump_js__WEBPACK_IMPORTED_MODULE_19__[\"bumpY\"]; });\n\n/* harmony import */ var _curve_bundle_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./curve/bundle.js */ \"./node_modules/d3-shape/src/curve/bundle.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"curveBundle\", function() { return _curve_bundle_js__WEBPACK_IMPORTED_MODULE_20__[\"default\"]; });\n\n/* harmony import */ var _curve_cardinalClosed_js__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./curve/cardinalClosed.js */ \"./node_modules/d3-shape/src/curve/cardinalClosed.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"curveCardinalClosed\", function() { return _curve_cardinalClosed_js__WEBPACK_IMPORTED_MODULE_21__[\"default\"]; });\n\n/* harmony import */ var _curve_cardinalOpen_js__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./curve/cardinalOpen.js */ \"./node_modules/d3-shape/src/curve/cardinalOpen.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"curveCardinalOpen\", function() { return _curve_cardinalOpen_js__WEBPACK_IMPORTED_MODULE_22__[\"default\"]; });\n\n/* harmony import */ var _curve_cardinal_js__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./curve/cardinal.js */ \"./node_modules/d3-shape/src/curve/cardinal.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"curveCardinal\", function() { return _curve_cardinal_js__WEBPACK_IMPORTED_MODULE_23__[\"default\"]; });\n\n/* harmony import */ var _curve_catmullRomClosed_js__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ./curve/catmullRomClosed.js */ \"./node_modules/d3-shape/src/curve/catmullRomClosed.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"curveCatmullRomClosed\", function() { return _curve_catmullRomClosed_js__WEBPACK_IMPORTED_MODULE_24__[\"default\"]; });\n\n/* harmony import */ var _curve_catmullRomOpen_js__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ./curve/catmullRomOpen.js */ \"./node_modules/d3-shape/src/curve/catmullRomOpen.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"curveCatmullRomOpen\", function() { return _curve_catmullRomOpen_js__WEBPACK_IMPORTED_MODULE_25__[\"default\"]; });\n\n/* harmony import */ var _curve_catmullRom_js__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ./curve/catmullRom.js */ \"./node_modules/d3-shape/src/curve/catmullRom.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"curveCatmullRom\", function() { return _curve_catmullRom_js__WEBPACK_IMPORTED_MODULE_26__[\"default\"]; });\n\n/* harmony import */ var _curve_linearClosed_js__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ./curve/linearClosed.js */ \"./node_modules/d3-shape/src/curve/linearClosed.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"curveLinearClosed\", function() { return _curve_linearClosed_js__WEBPACK_IMPORTED_MODULE_27__[\"default\"]; });\n\n/* harmony import */ var _curve_linear_js__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ./curve/linear.js */ \"./node_modules/d3-shape/src/curve/linear.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"curveLinear\", function() { return _curve_linear_js__WEBPACK_IMPORTED_MODULE_28__[\"default\"]; });\n\n/* harmony import */ var _curve_monotone_js__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ./curve/monotone.js */ \"./node_modules/d3-shape/src/curve/monotone.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"curveMonotoneX\", function() { return _curve_monotone_js__WEBPACK_IMPORTED_MODULE_29__[\"monotoneX\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"curveMonotoneY\", function() { return _curve_monotone_js__WEBPACK_IMPORTED_MODULE_29__[\"monotoneY\"]; });\n\n/* harmony import */ var _curve_natural_js__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ./curve/natural.js */ \"./node_modules/d3-shape/src/curve/natural.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"curveNatural\", function() { return _curve_natural_js__WEBPACK_IMPORTED_MODULE_30__[\"default\"]; });\n\n/* harmony import */ var _curve_step_js__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ./curve/step.js */ \"./node_modules/d3-shape/src/curve/step.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"curveStep\", function() { return _curve_step_js__WEBPACK_IMPORTED_MODULE_31__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"curveStepAfter\", function() { return _curve_step_js__WEBPACK_IMPORTED_MODULE_31__[\"stepAfter\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"curveStepBefore\", function() { return _curve_step_js__WEBPACK_IMPORTED_MODULE_31__[\"stepBefore\"]; });\n\n/* harmony import */ var _stack_js__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ./stack.js */ \"./node_modules/d3-shape/src/stack.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"stack\", function() { return _stack_js__WEBPACK_IMPORTED_MODULE_32__[\"default\"]; });\n\n/* harmony import */ var _offset_expand_js__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! ./offset/expand.js */ \"./node_modules/d3-shape/src/offset/expand.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"stackOffsetExpand\", function() { return _offset_expand_js__WEBPACK_IMPORTED_MODULE_33__[\"default\"]; });\n\n/* harmony import */ var _offset_diverging_js__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! ./offset/diverging.js */ \"./node_modules/d3-shape/src/offset/diverging.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"stackOffsetDiverging\", function() { return _offset_diverging_js__WEBPACK_IMPORTED_MODULE_34__[\"default\"]; });\n\n/* harmony import */ var _offset_none_js__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(/*! ./offset/none.js */ \"./node_modules/d3-shape/src/offset/none.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"stackOffsetNone\", function() { return _offset_none_js__WEBPACK_IMPORTED_MODULE_35__[\"default\"]; });\n\n/* harmony import */ var _offset_silhouette_js__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(/*! ./offset/silhouette.js */ \"./node_modules/d3-shape/src/offset/silhouette.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"stackOffsetSilhouette\", function() { return _offset_silhouette_js__WEBPACK_IMPORTED_MODULE_36__[\"default\"]; });\n\n/* harmony import */ var _offset_wiggle_js__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(/*! ./offset/wiggle.js */ \"./node_modules/d3-shape/src/offset/wiggle.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"stackOffsetWiggle\", function() { return _offset_wiggle_js__WEBPACK_IMPORTED_MODULE_37__[\"default\"]; });\n\n/* harmony import */ var _order_appearance_js__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(/*! ./order/appearance.js */ \"./node_modules/d3-shape/src/order/appearance.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"stackOrderAppearance\", function() { return _order_appearance_js__WEBPACK_IMPORTED_MODULE_38__[\"default\"]; });\n\n/* harmony import */ var _order_ascending_js__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__(/*! ./order/ascending.js */ \"./node_modules/d3-shape/src/order/ascending.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"stackOrderAscending\", function() { return _order_ascending_js__WEBPACK_IMPORTED_MODULE_39__[\"default\"]; });\n\n/* harmony import */ var _order_descending_js__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__(/*! ./order/descending.js */ \"./node_modules/d3-shape/src/order/descending.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"stackOrderDescending\", function() { return _order_descending_js__WEBPACK_IMPORTED_MODULE_40__[\"default\"]; });\n\n/* harmony import */ var _order_insideOut_js__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__(/*! ./order/insideOut.js */ \"./node_modules/d3-shape/src/order/insideOut.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"stackOrderInsideOut\", function() { return _order_insideOut_js__WEBPACK_IMPORTED_MODULE_41__[\"default\"]; });\n\n/* harmony import */ var _order_none_js__WEBPACK_IMPORTED_MODULE_42__ = __webpack_require__(/*! ./order/none.js */ \"./node_modules/d3-shape/src/order/none.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"stackOrderNone\", function() { return _order_none_js__WEBPACK_IMPORTED_MODULE_42__[\"default\"]; });\n\n/* harmony import */ var _order_reverse_js__WEBPACK_IMPORTED_MODULE_43__ = __webpack_require__(/*! ./order/reverse.js */ \"./node_modules/d3-shape/src/order/reverse.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"stackOrderReverse\", function() { return _order_reverse_js__WEBPACK_IMPORTED_MODULE_43__[\"default\"]; });\n\n\n\n\n\n // Note: radialArea is deprecated!\n // Note: radialLine is deprecated!\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-shape/src/line.js\":\n/*!*******************************************!*\\\n  !*** ./node_modules/d3-shape/src/line.js ***!\n  \\*******************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var d3_path__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-path */ \"./node_modules/d3-shape/node_modules/d3-path/src/index.js\");\n/* harmony import */ var _array_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./array.js */ \"./node_modules/d3-shape/src/array.js\");\n/* harmony import */ var _constant_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./constant.js */ \"./node_modules/d3-shape/src/constant.js\");\n/* harmony import */ var _curve_linear_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./curve/linear.js */ \"./node_modules/d3-shape/src/curve/linear.js\");\n/* harmony import */ var _point_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./point.js */ \"./node_modules/d3-shape/src/point.js\");\n\n\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(x, y) {\n  var defined = Object(_constant_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(true),\n      context = null,\n      curve = _curve_linear_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"],\n      output = null;\n\n  x = typeof x === \"function\" ? x : (x === undefined) ? _point_js__WEBPACK_IMPORTED_MODULE_4__[\"x\"] : Object(_constant_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(x);\n  y = typeof y === \"function\" ? y : (y === undefined) ? _point_js__WEBPACK_IMPORTED_MODULE_4__[\"y\"] : Object(_constant_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(y);\n\n  function line(data) {\n    var i,\n        n = (data = Object(_array_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(data)).length,\n        d,\n        defined0 = false,\n        buffer;\n\n    if (context == null) output = curve(buffer = Object(d3_path__WEBPACK_IMPORTED_MODULE_0__[\"path\"])());\n\n    for (i = 0; i <= n; ++i) {\n      if (!(i < n && defined(d = data[i], i, data)) === defined0) {\n        if (defined0 = !defined0) output.lineStart();\n        else output.lineEnd();\n      }\n      if (defined0) output.point(+x(d, i, data), +y(d, i, data));\n    }\n\n    if (buffer) return output = null, buffer + \"\" || null;\n  }\n\n  line.x = function(_) {\n    return arguments.length ? (x = typeof _ === \"function\" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(+_), line) : x;\n  };\n\n  line.y = function(_) {\n    return arguments.length ? (y = typeof _ === \"function\" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(+_), line) : y;\n  };\n\n  line.defined = function(_) {\n    return arguments.length ? (defined = typeof _ === \"function\" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(!!_), line) : defined;\n  };\n\n  line.curve = function(_) {\n    return arguments.length ? (curve = _, context != null && (output = curve(context)), line) : curve;\n  };\n\n  line.context = function(_) {\n    return arguments.length ? (_ == null ? context = output = null : output = curve(context = _), line) : context;\n  };\n\n  return line;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-shape/src/lineRadial.js\":\n/*!*************************************************!*\\\n  !*** ./node_modules/d3-shape/src/lineRadial.js ***!\n  \\*************************************************/\n/*! exports provided: lineRadial, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"lineRadial\", function() { return lineRadial; });\n/* harmony import */ var _curve_radial_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./curve/radial.js */ \"./node_modules/d3-shape/src/curve/radial.js\");\n/* harmony import */ var _line_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./line.js */ \"./node_modules/d3-shape/src/line.js\");\n\n\n\nfunction lineRadial(l) {\n  var c = l.curve;\n\n  l.angle = l.x, delete l.x;\n  l.radius = l.y, delete l.y;\n\n  l.curve = function(_) {\n    return arguments.length ? c(Object(_curve_radial_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(_)) : c()._curve;\n  };\n\n  return l;\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  return lineRadial(Object(_line_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])().curve(_curve_radial_js__WEBPACK_IMPORTED_MODULE_0__[\"curveRadialLinear\"]));\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-shape/src/link/index.js\":\n/*!*************************************************!*\\\n  !*** ./node_modules/d3-shape/src/link/index.js ***!\n  \\*************************************************/\n/*! exports provided: linkHorizontal, linkVertical, linkRadial */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"linkHorizontal\", function() { return linkHorizontal; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"linkVertical\", function() { return linkVertical; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"linkRadial\", function() { return linkRadial; });\n/* harmony import */ var d3_path__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-path */ \"./node_modules/d3-shape/node_modules/d3-path/src/index.js\");\n/* harmony import */ var _array_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../array.js */ \"./node_modules/d3-shape/src/array.js\");\n/* harmony import */ var _constant_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../constant.js */ \"./node_modules/d3-shape/src/constant.js\");\n/* harmony import */ var _point_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../point.js */ \"./node_modules/d3-shape/src/point.js\");\n/* harmony import */ var _pointRadial_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../pointRadial.js */ \"./node_modules/d3-shape/src/pointRadial.js\");\n\n\n\n\n\n\nfunction linkSource(d) {\n  return d.source;\n}\n\nfunction linkTarget(d) {\n  return d.target;\n}\n\nfunction link(curve) {\n  var source = linkSource,\n      target = linkTarget,\n      x = _point_js__WEBPACK_IMPORTED_MODULE_3__[\"x\"],\n      y = _point_js__WEBPACK_IMPORTED_MODULE_3__[\"y\"],\n      context = null;\n\n  function link() {\n    var buffer, argv = _array_js__WEBPACK_IMPORTED_MODULE_1__[\"slice\"].call(arguments), s = source.apply(this, argv), t = target.apply(this, argv);\n    if (!context) context = buffer = Object(d3_path__WEBPACK_IMPORTED_MODULE_0__[\"path\"])();\n    curve(context, +x.apply(this, (argv[0] = s, argv)), +y.apply(this, argv), +x.apply(this, (argv[0] = t, argv)), +y.apply(this, argv));\n    if (buffer) return context = null, buffer + \"\" || null;\n  }\n\n  link.source = function(_) {\n    return arguments.length ? (source = _, link) : source;\n  };\n\n  link.target = function(_) {\n    return arguments.length ? (target = _, link) : target;\n  };\n\n  link.x = function(_) {\n    return arguments.length ? (x = typeof _ === \"function\" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(+_), link) : x;\n  };\n\n  link.y = function(_) {\n    return arguments.length ? (y = typeof _ === \"function\" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(+_), link) : y;\n  };\n\n  link.context = function(_) {\n    return arguments.length ? ((context = _ == null ? null : _), link) : context;\n  };\n\n  return link;\n}\n\nfunction curveHorizontal(context, x0, y0, x1, y1) {\n  context.moveTo(x0, y0);\n  context.bezierCurveTo(x0 = (x0 + x1) / 2, y0, x0, y1, x1, y1);\n}\n\nfunction curveVertical(context, x0, y0, x1, y1) {\n  context.moveTo(x0, y0);\n  context.bezierCurveTo(x0, y0 = (y0 + y1) / 2, x1, y0, x1, y1);\n}\n\nfunction curveRadial(context, x0, y0, x1, y1) {\n  var p0 = Object(_pointRadial_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(x0, y0),\n      p1 = Object(_pointRadial_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(x0, y0 = (y0 + y1) / 2),\n      p2 = Object(_pointRadial_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(x1, y0),\n      p3 = Object(_pointRadial_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(x1, y1);\n  context.moveTo(p0[0], p0[1]);\n  context.bezierCurveTo(p1[0], p1[1], p2[0], p2[1], p3[0], p3[1]);\n}\n\nfunction linkHorizontal() {\n  return link(curveHorizontal);\n}\n\nfunction linkVertical() {\n  return link(curveVertical);\n}\n\nfunction linkRadial() {\n  var l = link(curveRadial);\n  l.angle = l.x, delete l.x;\n  l.radius = l.y, delete l.y;\n  return l;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-shape/src/math.js\":\n/*!*******************************************!*\\\n  !*** ./node_modules/d3-shape/src/math.js ***!\n  \\*******************************************/\n/*! exports provided: abs, atan2, cos, max, min, sin, sqrt, epsilon, pi, halfPi, tau, acos, asin */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"abs\", function() { return abs; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"atan2\", function() { return atan2; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"cos\", function() { return cos; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"max\", function() { return max; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"min\", function() { return min; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"sin\", function() { return sin; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"sqrt\", function() { return sqrt; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"epsilon\", function() { return epsilon; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"pi\", function() { return pi; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"halfPi\", function() { return halfPi; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"tau\", function() { return tau; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"acos\", function() { return acos; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"asin\", function() { return asin; });\nvar abs = Math.abs;\nvar atan2 = Math.atan2;\nvar cos = Math.cos;\nvar max = Math.max;\nvar min = Math.min;\nvar sin = Math.sin;\nvar sqrt = Math.sqrt;\n\nvar epsilon = 1e-12;\nvar pi = Math.PI;\nvar halfPi = pi / 2;\nvar tau = 2 * pi;\n\nfunction acos(x) {\n  return x > 1 ? 0 : x < -1 ? pi : Math.acos(x);\n}\n\nfunction asin(x) {\n  return x >= 1 ? halfPi : x <= -1 ? -halfPi : Math.asin(x);\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-shape/src/noop.js\":\n/*!*******************************************!*\\\n  !*** ./node_modules/d3-shape/src/noop.js ***!\n  \\*******************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-shape/src/offset/diverging.js\":\n/*!*******************************************************!*\\\n  !*** ./node_modules/d3-shape/src/offset/diverging.js ***!\n  \\*******************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(series, order) {\n  if (!((n = series.length) > 0)) return;\n  for (var i, j = 0, d, dy, yp, yn, n, m = series[order[0]].length; j < m; ++j) {\n    for (yp = yn = 0, i = 0; i < n; ++i) {\n      if ((dy = (d = series[order[i]][j])[1] - d[0]) > 0) {\n        d[0] = yp, d[1] = yp += dy;\n      } else if (dy < 0) {\n        d[1] = yn, d[0] = yn += dy;\n      } else {\n        d[0] = 0, d[1] = dy;\n      }\n    }\n  }\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-shape/src/offset/expand.js\":\n/*!****************************************************!*\\\n  !*** ./node_modules/d3-shape/src/offset/expand.js ***!\n  \\****************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _none_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./none.js */ \"./node_modules/d3-shape/src/offset/none.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(series, order) {\n  if (!((n = series.length) > 0)) return;\n  for (var i, n, j = 0, m = series[0].length, y; j < m; ++j) {\n    for (y = i = 0; i < n; ++i) y += series[i][j][1] || 0;\n    if (y) for (i = 0; i < n; ++i) series[i][j][1] /= y;\n  }\n  Object(_none_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(series, order);\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-shape/src/offset/none.js\":\n/*!**************************************************!*\\\n  !*** ./node_modules/d3-shape/src/offset/none.js ***!\n  \\**************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(series, order) {\n  if (!((n = series.length) > 1)) return;\n  for (var i = 1, j, s0, s1 = series[order[0]], n, m = s1.length; i < n; ++i) {\n    s0 = s1, s1 = series[order[i]];\n    for (j = 0; j < m; ++j) {\n      s1[j][1] += s1[j][0] = isNaN(s0[j][1]) ? s0[j][0] : s0[j][1];\n    }\n  }\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-shape/src/offset/silhouette.js\":\n/*!********************************************************!*\\\n  !*** ./node_modules/d3-shape/src/offset/silhouette.js ***!\n  \\********************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _none_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./none.js */ \"./node_modules/d3-shape/src/offset/none.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(series, order) {\n  if (!((n = series.length) > 0)) return;\n  for (var j = 0, s0 = series[order[0]], n, m = s0.length; j < m; ++j) {\n    for (var i = 0, y = 0; i < n; ++i) y += series[i][j][1] || 0;\n    s0[j][1] += s0[j][0] = -y / 2;\n  }\n  Object(_none_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(series, order);\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-shape/src/offset/wiggle.js\":\n/*!****************************************************!*\\\n  !*** ./node_modules/d3-shape/src/offset/wiggle.js ***!\n  \\****************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _none_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./none.js */ \"./node_modules/d3-shape/src/offset/none.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(series, order) {\n  if (!((n = series.length) > 0) || !((m = (s0 = series[order[0]]).length) > 0)) return;\n  for (var y = 0, j = 1, s0, m, n; j < m; ++j) {\n    for (var i = 0, s1 = 0, s2 = 0; i < n; ++i) {\n      var si = series[order[i]],\n          sij0 = si[j][1] || 0,\n          sij1 = si[j - 1][1] || 0,\n          s3 = (sij0 - sij1) / 2;\n      for (var k = 0; k < i; ++k) {\n        var sk = series[order[k]],\n            skj0 = sk[j][1] || 0,\n            skj1 = sk[j - 1][1] || 0;\n        s3 += skj0 - skj1;\n      }\n      s1 += sij0, s2 += s3 * sij0;\n    }\n    s0[j - 1][1] += s0[j - 1][0] = y;\n    if (s1) y -= s2 / s1;\n  }\n  s0[j - 1][1] += s0[j - 1][0] = y;\n  Object(_none_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(series, order);\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-shape/src/order/appearance.js\":\n/*!*******************************************************!*\\\n  !*** ./node_modules/d3-shape/src/order/appearance.js ***!\n  \\*******************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _none_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./none.js */ \"./node_modules/d3-shape/src/order/none.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(series) {\n  var peaks = series.map(peak);\n  return Object(_none_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(series).sort(function(a, b) { return peaks[a] - peaks[b]; });\n});\n\nfunction peak(series) {\n  var i = -1, j = 0, n = series.length, vi, vj = -Infinity;\n  while (++i < n) if ((vi = +series[i][1]) > vj) vj = vi, j = i;\n  return j;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-shape/src/order/ascending.js\":\n/*!******************************************************!*\\\n  !*** ./node_modules/d3-shape/src/order/ascending.js ***!\n  \\******************************************************/\n/*! exports provided: default, sum */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"sum\", function() { return sum; });\n/* harmony import */ var _none_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./none.js */ \"./node_modules/d3-shape/src/order/none.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(series) {\n  var sums = series.map(sum);\n  return Object(_none_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(series).sort(function(a, b) { return sums[a] - sums[b]; });\n});\n\nfunction sum(series) {\n  var s = 0, i = -1, n = series.length, v;\n  while (++i < n) if (v = +series[i][1]) s += v;\n  return s;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-shape/src/order/descending.js\":\n/*!*******************************************************!*\\\n  !*** ./node_modules/d3-shape/src/order/descending.js ***!\n  \\*******************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _ascending_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ascending.js */ \"./node_modules/d3-shape/src/order/ascending.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(series) {\n  return Object(_ascending_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(series).reverse();\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-shape/src/order/insideOut.js\":\n/*!******************************************************!*\\\n  !*** ./node_modules/d3-shape/src/order/insideOut.js ***!\n  \\******************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _appearance_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./appearance.js */ \"./node_modules/d3-shape/src/order/appearance.js\");\n/* harmony import */ var _ascending_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./ascending.js */ \"./node_modules/d3-shape/src/order/ascending.js\");\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(series) {\n  var n = series.length,\n      i,\n      j,\n      sums = series.map(_ascending_js__WEBPACK_IMPORTED_MODULE_1__[\"sum\"]),\n      order = Object(_appearance_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(series),\n      top = 0,\n      bottom = 0,\n      tops = [],\n      bottoms = [];\n\n  for (i = 0; i < n; ++i) {\n    j = order[i];\n    if (top < bottom) {\n      top += sums[j];\n      tops.push(j);\n    } else {\n      bottom += sums[j];\n      bottoms.push(j);\n    }\n  }\n\n  return bottoms.reverse().concat(tops);\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-shape/src/order/none.js\":\n/*!*************************************************!*\\\n  !*** ./node_modules/d3-shape/src/order/none.js ***!\n  \\*************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(series) {\n  var n = series.length, o = new Array(n);\n  while (--n >= 0) o[n] = n;\n  return o;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-shape/src/order/reverse.js\":\n/*!****************************************************!*\\\n  !*** ./node_modules/d3-shape/src/order/reverse.js ***!\n  \\****************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _none_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./none.js */ \"./node_modules/d3-shape/src/order/none.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(series) {\n  return Object(_none_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(series).reverse();\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-shape/src/pie.js\":\n/*!******************************************!*\\\n  !*** ./node_modules/d3-shape/src/pie.js ***!\n  \\******************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _array_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./array.js */ \"./node_modules/d3-shape/src/array.js\");\n/* harmony import */ var _constant_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./constant.js */ \"./node_modules/d3-shape/src/constant.js\");\n/* harmony import */ var _descending_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./descending.js */ \"./node_modules/d3-shape/src/descending.js\");\n/* harmony import */ var _identity_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./identity.js */ \"./node_modules/d3-shape/src/identity.js\");\n/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./math.js */ \"./node_modules/d3-shape/src/math.js\");\n\n\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  var value = _identity_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"],\n      sortValues = _descending_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"],\n      sort = null,\n      startAngle = Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(0),\n      endAngle = Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(_math_js__WEBPACK_IMPORTED_MODULE_4__[\"tau\"]),\n      padAngle = Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(0);\n\n  function pie(data) {\n    var i,\n        n = (data = Object(_array_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(data)).length,\n        j,\n        k,\n        sum = 0,\n        index = new Array(n),\n        arcs = new Array(n),\n        a0 = +startAngle.apply(this, arguments),\n        da = Math.min(_math_js__WEBPACK_IMPORTED_MODULE_4__[\"tau\"], Math.max(-_math_js__WEBPACK_IMPORTED_MODULE_4__[\"tau\"], endAngle.apply(this, arguments) - a0)),\n        a1,\n        p = Math.min(Math.abs(da) / n, padAngle.apply(this, arguments)),\n        pa = p * (da < 0 ? -1 : 1),\n        v;\n\n    for (i = 0; i < n; ++i) {\n      if ((v = arcs[index[i] = i] = +value(data[i], i, data)) > 0) {\n        sum += v;\n      }\n    }\n\n    // Optionally sort the arcs by previously-computed values or by data.\n    if (sortValues != null) index.sort(function(i, j) { return sortValues(arcs[i], arcs[j]); });\n    else if (sort != null) index.sort(function(i, j) { return sort(data[i], data[j]); });\n\n    // Compute the arcs! They are stored in the original data's order.\n    for (i = 0, k = sum ? (da - n * pa) / sum : 0; i < n; ++i, a0 = a1) {\n      j = index[i], v = arcs[j], a1 = a0 + (v > 0 ? v * k : 0) + pa, arcs[j] = {\n        data: data[j],\n        index: i,\n        value: v,\n        startAngle: a0,\n        endAngle: a1,\n        padAngle: p\n      };\n    }\n\n    return arcs;\n  }\n\n  pie.value = function(_) {\n    return arguments.length ? (value = typeof _ === \"function\" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(+_), pie) : value;\n  };\n\n  pie.sortValues = function(_) {\n    return arguments.length ? (sortValues = _, sort = null, pie) : sortValues;\n  };\n\n  pie.sort = function(_) {\n    return arguments.length ? (sort = _, sortValues = null, pie) : sort;\n  };\n\n  pie.startAngle = function(_) {\n    return arguments.length ? (startAngle = typeof _ === \"function\" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(+_), pie) : startAngle;\n  };\n\n  pie.endAngle = function(_) {\n    return arguments.length ? (endAngle = typeof _ === \"function\" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(+_), pie) : endAngle;\n  };\n\n  pie.padAngle = function(_) {\n    return arguments.length ? (padAngle = typeof _ === \"function\" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(+_), pie) : padAngle;\n  };\n\n  return pie;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-shape/src/point.js\":\n/*!********************************************!*\\\n  !*** ./node_modules/d3-shape/src/point.js ***!\n  \\********************************************/\n/*! exports provided: x, y */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"x\", function() { return x; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"y\", function() { return y; });\nfunction x(p) {\n  return p[0];\n}\n\nfunction y(p) {\n  return p[1];\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-shape/src/pointRadial.js\":\n/*!**************************************************!*\\\n  !*** ./node_modules/d3-shape/src/pointRadial.js ***!\n  \\**************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(x, y) {\n  return [(y = +y) * Math.cos(x -= Math.PI / 2), y * Math.sin(x)];\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-shape/src/stack.js\":\n/*!********************************************!*\\\n  !*** ./node_modules/d3-shape/src/stack.js ***!\n  \\********************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _array_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./array.js */ \"./node_modules/d3-shape/src/array.js\");\n/* harmony import */ var _constant_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./constant.js */ \"./node_modules/d3-shape/src/constant.js\");\n/* harmony import */ var _offset_none_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./offset/none.js */ \"./node_modules/d3-shape/src/offset/none.js\");\n/* harmony import */ var _order_none_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./order/none.js */ \"./node_modules/d3-shape/src/order/none.js\");\n\n\n\n\n\nfunction stackValue(d, key) {\n  return d[key];\n}\n\nfunction stackSeries(key) {\n  const series = [];\n  series.key = key;\n  return series;\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  var keys = Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])([]),\n      order = _order_none_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"],\n      offset = _offset_none_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"],\n      value = stackValue;\n\n  function stack(data) {\n    var sz = Array.from(keys.apply(this, arguments), stackSeries),\n        i, n = sz.length, j = -1,\n        oz;\n\n    for (const d of data) {\n      for (i = 0, ++j; i < n; ++i) {\n        (sz[i][j] = [0, +value(d, sz[i].key, j, data)]).data = d;\n      }\n    }\n\n    for (i = 0, oz = Object(_array_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(order(sz)); i < n; ++i) {\n      sz[oz[i]].index = i;\n    }\n\n    offset(sz, oz);\n    return sz;\n  }\n\n  stack.keys = function(_) {\n    return arguments.length ? (keys = typeof _ === \"function\" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(Array.from(_)), stack) : keys;\n  };\n\n  stack.value = function(_) {\n    return arguments.length ? (value = typeof _ === \"function\" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(+_), stack) : value;\n  };\n\n  stack.order = function(_) {\n    return arguments.length ? (order = _ == null ? _order_none_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"] : typeof _ === \"function\" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(Array.from(_)), stack) : order;\n  };\n\n  stack.offset = function(_) {\n    return arguments.length ? (offset = _ == null ? _offset_none_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"] : _, stack) : offset;\n  };\n\n  return stack;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-shape/src/symbol.js\":\n/*!*********************************************!*\\\n  !*** ./node_modules/d3-shape/src/symbol.js ***!\n  \\*********************************************/\n/*! exports provided: symbols, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"symbols\", function() { return symbols; });\n/* harmony import */ var d3_path__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-path */ \"./node_modules/d3-shape/node_modules/d3-path/src/index.js\");\n/* harmony import */ var _symbol_circle_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./symbol/circle.js */ \"./node_modules/d3-shape/src/symbol/circle.js\");\n/* harmony import */ var _symbol_cross_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./symbol/cross.js */ \"./node_modules/d3-shape/src/symbol/cross.js\");\n/* harmony import */ var _symbol_diamond_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./symbol/diamond.js */ \"./node_modules/d3-shape/src/symbol/diamond.js\");\n/* harmony import */ var _symbol_star_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./symbol/star.js */ \"./node_modules/d3-shape/src/symbol/star.js\");\n/* harmony import */ var _symbol_square_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./symbol/square.js */ \"./node_modules/d3-shape/src/symbol/square.js\");\n/* harmony import */ var _symbol_triangle_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./symbol/triangle.js */ \"./node_modules/d3-shape/src/symbol/triangle.js\");\n/* harmony import */ var _symbol_wye_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./symbol/wye.js */ \"./node_modules/d3-shape/src/symbol/wye.js\");\n/* harmony import */ var _constant_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./constant.js */ \"./node_modules/d3-shape/src/constant.js\");\n\n\n\n\n\n\n\n\n\n\nvar symbols = [\n  _symbol_circle_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"],\n  _symbol_cross_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"],\n  _symbol_diamond_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"],\n  _symbol_square_js__WEBPACK_IMPORTED_MODULE_5__[\"default\"],\n  _symbol_star_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"],\n  _symbol_triangle_js__WEBPACK_IMPORTED_MODULE_6__[\"default\"],\n  _symbol_wye_js__WEBPACK_IMPORTED_MODULE_7__[\"default\"]\n];\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(type, size) {\n  var context = null;\n  type = typeof type === \"function\" ? type : Object(_constant_js__WEBPACK_IMPORTED_MODULE_8__[\"default\"])(type || _symbol_circle_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"]);\n  size = typeof size === \"function\" ? size : Object(_constant_js__WEBPACK_IMPORTED_MODULE_8__[\"default\"])(size === undefined ? 64 : +size);\n\n  function symbol() {\n    var buffer;\n    if (!context) context = buffer = Object(d3_path__WEBPACK_IMPORTED_MODULE_0__[\"path\"])();\n    type.apply(this, arguments).draw(context, +size.apply(this, arguments));\n    if (buffer) return context = null, buffer + \"\" || null;\n  }\n\n  symbol.type = function(_) {\n    return arguments.length ? (type = typeof _ === \"function\" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_8__[\"default\"])(_), symbol) : type;\n  };\n\n  symbol.size = function(_) {\n    return arguments.length ? (size = typeof _ === \"function\" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_8__[\"default\"])(+_), symbol) : size;\n  };\n\n  symbol.context = function(_) {\n    return arguments.length ? (context = _ == null ? null : _, symbol) : context;\n  };\n\n  return symbol;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-shape/src/symbol/circle.js\":\n/*!****************************************************!*\\\n  !*** ./node_modules/d3-shape/src/symbol/circle.js ***!\n  \\****************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../math.js */ \"./node_modules/d3-shape/src/math.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n  draw: function(context, size) {\n    var r = Math.sqrt(size / _math_js__WEBPACK_IMPORTED_MODULE_0__[\"pi\"]);\n    context.moveTo(r, 0);\n    context.arc(0, 0, r, 0, _math_js__WEBPACK_IMPORTED_MODULE_0__[\"tau\"]);\n  }\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-shape/src/symbol/cross.js\":\n/*!***************************************************!*\\\n  !*** ./node_modules/d3-shape/src/symbol/cross.js ***!\n  \\***************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n  draw: function(context, size) {\n    var r = Math.sqrt(size / 5) / 2;\n    context.moveTo(-3 * r, -r);\n    context.lineTo(-r, -r);\n    context.lineTo(-r, -3 * r);\n    context.lineTo(r, -3 * r);\n    context.lineTo(r, -r);\n    context.lineTo(3 * r, -r);\n    context.lineTo(3 * r, r);\n    context.lineTo(r, r);\n    context.lineTo(r, 3 * r);\n    context.lineTo(-r, 3 * r);\n    context.lineTo(-r, r);\n    context.lineTo(-3 * r, r);\n    context.closePath();\n  }\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-shape/src/symbol/diamond.js\":\n/*!*****************************************************!*\\\n  !*** ./node_modules/d3-shape/src/symbol/diamond.js ***!\n  \\*****************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\nvar tan30 = Math.sqrt(1 / 3),\n    tan30_2 = tan30 * 2;\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n  draw: function(context, size) {\n    var y = Math.sqrt(size / tan30_2),\n        x = y * tan30;\n    context.moveTo(0, -y);\n    context.lineTo(x, 0);\n    context.lineTo(0, y);\n    context.lineTo(-x, 0);\n    context.closePath();\n  }\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-shape/src/symbol/square.js\":\n/*!****************************************************!*\\\n  !*** ./node_modules/d3-shape/src/symbol/square.js ***!\n  \\****************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n  draw: function(context, size) {\n    var w = Math.sqrt(size),\n        x = -w / 2;\n    context.rect(x, x, w, w);\n  }\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-shape/src/symbol/star.js\":\n/*!**************************************************!*\\\n  !*** ./node_modules/d3-shape/src/symbol/star.js ***!\n  \\**************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../math.js */ \"./node_modules/d3-shape/src/math.js\");\n\n\nvar ka = 0.89081309152928522810,\n    kr = Math.sin(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"pi\"] / 10) / Math.sin(7 * _math_js__WEBPACK_IMPORTED_MODULE_0__[\"pi\"] / 10),\n    kx = Math.sin(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"tau\"] / 10) * kr,\n    ky = -Math.cos(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"tau\"] / 10) * kr;\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n  draw: function(context, size) {\n    var r = Math.sqrt(size * ka),\n        x = kx * r,\n        y = ky * r;\n    context.moveTo(0, -r);\n    context.lineTo(x, y);\n    for (var i = 1; i < 5; ++i) {\n      var a = _math_js__WEBPACK_IMPORTED_MODULE_0__[\"tau\"] * i / 5,\n          c = Math.cos(a),\n          s = Math.sin(a);\n      context.lineTo(s * r, -c * r);\n      context.lineTo(c * x - s * y, s * x + c * y);\n    }\n    context.closePath();\n  }\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-shape/src/symbol/triangle.js\":\n/*!******************************************************!*\\\n  !*** ./node_modules/d3-shape/src/symbol/triangle.js ***!\n  \\******************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\nvar sqrt3 = Math.sqrt(3);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n  draw: function(context, size) {\n    var y = -Math.sqrt(size / (sqrt3 * 3));\n    context.moveTo(0, y * 2);\n    context.lineTo(-sqrt3 * y, -y);\n    context.lineTo(sqrt3 * y, -y);\n    context.closePath();\n  }\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-shape/src/symbol/wye.js\":\n/*!*************************************************!*\\\n  !*** ./node_modules/d3-shape/src/symbol/wye.js ***!\n  \\*************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\nvar c = -0.5,\n    s = Math.sqrt(3) / 2,\n    k = 1 / Math.sqrt(12),\n    a = (k / 2 + 1) * 3;\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n  draw: function(context, size) {\n    var r = Math.sqrt(size / a),\n        x0 = r / 2,\n        y0 = r * k,\n        x1 = x0,\n        y1 = r * k + r,\n        x2 = -x1,\n        y2 = y1;\n    context.moveTo(x0, y0);\n    context.lineTo(x1, y1);\n    context.lineTo(x2, y2);\n    context.lineTo(c * x0 - s * y0, s * x0 + c * y0);\n    context.lineTo(c * x1 - s * y1, s * x1 + c * y1);\n    context.lineTo(c * x2 - s * y2, s * x2 + c * y2);\n    context.lineTo(c * x0 + s * y0, c * y0 - s * x0);\n    context.lineTo(c * x1 + s * y1, c * y1 - s * x1);\n    context.lineTo(c * x2 + s * y2, c * y2 - s * x2);\n    context.closePath();\n  }\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-time-format/src/defaultLocale.js\":\n/*!**********************************************************!*\\\n  !*** ./node_modules/d3-time-format/src/defaultLocale.js ***!\n  \\**********************************************************/\n/*! exports provided: timeFormat, timeParse, utcFormat, utcParse, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"timeFormat\", function() { return timeFormat; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"timeParse\", function() { return timeParse; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"utcFormat\", function() { return utcFormat; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"utcParse\", function() { return utcParse; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return defaultLocale; });\n/* harmony import */ var _locale_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./locale.js */ \"./node_modules/d3-time-format/src/locale.js\");\n\n\nvar locale;\nvar timeFormat;\nvar timeParse;\nvar utcFormat;\nvar utcParse;\n\ndefaultLocale({\n  dateTime: \"%x, %X\",\n  date: \"%-m/%-d/%Y\",\n  time: \"%-I:%M:%S %p\",\n  periods: [\"AM\", \"PM\"],\n  days: [\"Sunday\", \"Monday\", \"Tuesday\", \"Wednesday\", \"Thursday\", \"Friday\", \"Saturday\"],\n  shortDays: [\"Sun\", \"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\"],\n  months: [\"January\", \"February\", \"March\", \"April\", \"May\", \"June\", \"July\", \"August\", \"September\", \"October\", \"November\", \"December\"],\n  shortMonths: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\"]\n});\n\nfunction defaultLocale(definition) {\n  locale = Object(_locale_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(definition);\n  timeFormat = locale.format;\n  timeParse = locale.parse;\n  utcFormat = locale.utcFormat;\n  utcParse = locale.utcParse;\n  return locale;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-time-format/src/index.js\":\n/*!**************************************************!*\\\n  !*** ./node_modules/d3-time-format/src/index.js ***!\n  \\**************************************************/\n/*! exports provided: timeFormatDefaultLocale, timeFormat, timeParse, utcFormat, utcParse, timeFormatLocale, isoFormat, isoParse */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _defaultLocale_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./defaultLocale.js */ \"./node_modules/d3-time-format/src/defaultLocale.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeFormatDefaultLocale\", function() { return _defaultLocale_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeFormat\", function() { return _defaultLocale_js__WEBPACK_IMPORTED_MODULE_0__[\"timeFormat\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeParse\", function() { return _defaultLocale_js__WEBPACK_IMPORTED_MODULE_0__[\"timeParse\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcFormat\", function() { return _defaultLocale_js__WEBPACK_IMPORTED_MODULE_0__[\"utcFormat\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcParse\", function() { return _defaultLocale_js__WEBPACK_IMPORTED_MODULE_0__[\"utcParse\"]; });\n\n/* harmony import */ var _locale_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./locale.js */ \"./node_modules/d3-time-format/src/locale.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeFormatLocale\", function() { return _locale_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"]; });\n\n/* harmony import */ var _isoFormat_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./isoFormat.js */ \"./node_modules/d3-time-format/src/isoFormat.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"isoFormat\", function() { return _isoFormat_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"]; });\n\n/* harmony import */ var _isoParse_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./isoParse.js */ \"./node_modules/d3-time-format/src/isoParse.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"isoParse\", function() { return _isoParse_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"]; });\n\n\n\n\n\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-time-format/src/isoFormat.js\":\n/*!******************************************************!*\\\n  !*** ./node_modules/d3-time-format/src/isoFormat.js ***!\n  \\******************************************************/\n/*! exports provided: isoSpecifier, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"isoSpecifier\", function() { return isoSpecifier; });\n/* harmony import */ var _defaultLocale_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./defaultLocale.js */ \"./node_modules/d3-time-format/src/defaultLocale.js\");\n\n\nvar isoSpecifier = \"%Y-%m-%dT%H:%M:%S.%LZ\";\n\nfunction formatIsoNative(date) {\n  return date.toISOString();\n}\n\nvar formatIso = Date.prototype.toISOString\n    ? formatIsoNative\n    : Object(_defaultLocale_js__WEBPACK_IMPORTED_MODULE_0__[\"utcFormat\"])(isoSpecifier);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (formatIso);\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-time-format/src/isoParse.js\":\n/*!*****************************************************!*\\\n  !*** ./node_modules/d3-time-format/src/isoParse.js ***!\n  \\*****************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _isoFormat_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./isoFormat.js */ \"./node_modules/d3-time-format/src/isoFormat.js\");\n/* harmony import */ var _defaultLocale_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./defaultLocale.js */ \"./node_modules/d3-time-format/src/defaultLocale.js\");\n\n\n\nfunction parseIsoNative(string) {\n  var date = new Date(string);\n  return isNaN(date) ? null : date;\n}\n\nvar parseIso = +new Date(\"2000-01-01T00:00:00.000Z\")\n    ? parseIsoNative\n    : Object(_defaultLocale_js__WEBPACK_IMPORTED_MODULE_1__[\"utcParse\"])(_isoFormat_js__WEBPACK_IMPORTED_MODULE_0__[\"isoSpecifier\"]);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (parseIso);\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-time-format/src/locale.js\":\n/*!***************************************************!*\\\n  !*** ./node_modules/d3-time-format/src/locale.js ***!\n  \\***************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return formatLocale; });\n/* harmony import */ var d3_time__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-time */ \"./node_modules/d3-time/src/index.js\");\n\n\nfunction localDate(d) {\n  if (0 <= d.y && d.y < 100) {\n    var date = new Date(-1, d.m, d.d, d.H, d.M, d.S, d.L);\n    date.setFullYear(d.y);\n    return date;\n  }\n  return new Date(d.y, d.m, d.d, d.H, d.M, d.S, d.L);\n}\n\nfunction utcDate(d) {\n  if (0 <= d.y && d.y < 100) {\n    var date = new Date(Date.UTC(-1, d.m, d.d, d.H, d.M, d.S, d.L));\n    date.setUTCFullYear(d.y);\n    return date;\n  }\n  return new Date(Date.UTC(d.y, d.m, d.d, d.H, d.M, d.S, d.L));\n}\n\nfunction newDate(y, m, d) {\n  return {y: y, m: m, d: d, H: 0, M: 0, S: 0, L: 0};\n}\n\nfunction formatLocale(locale) {\n  var locale_dateTime = locale.dateTime,\n      locale_date = locale.date,\n      locale_time = locale.time,\n      locale_periods = locale.periods,\n      locale_weekdays = locale.days,\n      locale_shortWeekdays = locale.shortDays,\n      locale_months = locale.months,\n      locale_shortMonths = locale.shortMonths;\n\n  var periodRe = formatRe(locale_periods),\n      periodLookup = formatLookup(locale_periods),\n      weekdayRe = formatRe(locale_weekdays),\n      weekdayLookup = formatLookup(locale_weekdays),\n      shortWeekdayRe = formatRe(locale_shortWeekdays),\n      shortWeekdayLookup = formatLookup(locale_shortWeekdays),\n      monthRe = formatRe(locale_months),\n      monthLookup = formatLookup(locale_months),\n      shortMonthRe = formatRe(locale_shortMonths),\n      shortMonthLookup = formatLookup(locale_shortMonths);\n\n  var formats = {\n    \"a\": formatShortWeekday,\n    \"A\": formatWeekday,\n    \"b\": formatShortMonth,\n    \"B\": formatMonth,\n    \"c\": null,\n    \"d\": formatDayOfMonth,\n    \"e\": formatDayOfMonth,\n    \"f\": formatMicroseconds,\n    \"g\": formatYearISO,\n    \"G\": formatFullYearISO,\n    \"H\": formatHour24,\n    \"I\": formatHour12,\n    \"j\": formatDayOfYear,\n    \"L\": formatMilliseconds,\n    \"m\": formatMonthNumber,\n    \"M\": formatMinutes,\n    \"p\": formatPeriod,\n    \"q\": formatQuarter,\n    \"Q\": formatUnixTimestamp,\n    \"s\": formatUnixTimestampSeconds,\n    \"S\": formatSeconds,\n    \"u\": formatWeekdayNumberMonday,\n    \"U\": formatWeekNumberSunday,\n    \"V\": formatWeekNumberISO,\n    \"w\": formatWeekdayNumberSunday,\n    \"W\": formatWeekNumberMonday,\n    \"x\": null,\n    \"X\": null,\n    \"y\": formatYear,\n    \"Y\": formatFullYear,\n    \"Z\": formatZone,\n    \"%\": formatLiteralPercent\n  };\n\n  var utcFormats = {\n    \"a\": formatUTCShortWeekday,\n    \"A\": formatUTCWeekday,\n    \"b\": formatUTCShortMonth,\n    \"B\": formatUTCMonth,\n    \"c\": null,\n    \"d\": formatUTCDayOfMonth,\n    \"e\": formatUTCDayOfMonth,\n    \"f\": formatUTCMicroseconds,\n    \"g\": formatUTCYearISO,\n    \"G\": formatUTCFullYearISO,\n    \"H\": formatUTCHour24,\n    \"I\": formatUTCHour12,\n    \"j\": formatUTCDayOfYear,\n    \"L\": formatUTCMilliseconds,\n    \"m\": formatUTCMonthNumber,\n    \"M\": formatUTCMinutes,\n    \"p\": formatUTCPeriod,\n    \"q\": formatUTCQuarter,\n    \"Q\": formatUnixTimestamp,\n    \"s\": formatUnixTimestampSeconds,\n    \"S\": formatUTCSeconds,\n    \"u\": formatUTCWeekdayNumberMonday,\n    \"U\": formatUTCWeekNumberSunday,\n    \"V\": formatUTCWeekNumberISO,\n    \"w\": formatUTCWeekdayNumberSunday,\n    \"W\": formatUTCWeekNumberMonday,\n    \"x\": null,\n    \"X\": null,\n    \"y\": formatUTCYear,\n    \"Y\": formatUTCFullYear,\n    \"Z\": formatUTCZone,\n    \"%\": formatLiteralPercent\n  };\n\n  var parses = {\n    \"a\": parseShortWeekday,\n    \"A\": parseWeekday,\n    \"b\": parseShortMonth,\n    \"B\": parseMonth,\n    \"c\": parseLocaleDateTime,\n    \"d\": parseDayOfMonth,\n    \"e\": parseDayOfMonth,\n    \"f\": parseMicroseconds,\n    \"g\": parseYear,\n    \"G\": parseFullYear,\n    \"H\": parseHour24,\n    \"I\": parseHour24,\n    \"j\": parseDayOfYear,\n    \"L\": parseMilliseconds,\n    \"m\": parseMonthNumber,\n    \"M\": parseMinutes,\n    \"p\": parsePeriod,\n    \"q\": parseQuarter,\n    \"Q\": parseUnixTimestamp,\n    \"s\": parseUnixTimestampSeconds,\n    \"S\": parseSeconds,\n    \"u\": parseWeekdayNumberMonday,\n    \"U\": parseWeekNumberSunday,\n    \"V\": parseWeekNumberISO,\n    \"w\": parseWeekdayNumberSunday,\n    \"W\": parseWeekNumberMonday,\n    \"x\": parseLocaleDate,\n    \"X\": parseLocaleTime,\n    \"y\": parseYear,\n    \"Y\": parseFullYear,\n    \"Z\": parseZone,\n    \"%\": parseLiteralPercent\n  };\n\n  // These recursive directive definitions must be deferred.\n  formats.x = newFormat(locale_date, formats);\n  formats.X = newFormat(locale_time, formats);\n  formats.c = newFormat(locale_dateTime, formats);\n  utcFormats.x = newFormat(locale_date, utcFormats);\n  utcFormats.X = newFormat(locale_time, utcFormats);\n  utcFormats.c = newFormat(locale_dateTime, utcFormats);\n\n  function newFormat(specifier, formats) {\n    return function(date) {\n      var string = [],\n          i = -1,\n          j = 0,\n          n = specifier.length,\n          c,\n          pad,\n          format;\n\n      if (!(date instanceof Date)) date = new Date(+date);\n\n      while (++i < n) {\n        if (specifier.charCodeAt(i) === 37) {\n          string.push(specifier.slice(j, i));\n          if ((pad = pads[c = specifier.charAt(++i)]) != null) c = specifier.charAt(++i);\n          else pad = c === \"e\" ? \" \" : \"0\";\n          if (format = formats[c]) c = format(date, pad);\n          string.push(c);\n          j = i + 1;\n        }\n      }\n\n      string.push(specifier.slice(j, i));\n      return string.join(\"\");\n    };\n  }\n\n  function newParse(specifier, Z) {\n    return function(string) {\n      var d = newDate(1900, undefined, 1),\n          i = parseSpecifier(d, specifier, string += \"\", 0),\n          week, day;\n      if (i != string.length) return null;\n\n      // If a UNIX timestamp is specified, return it.\n      if (\"Q\" in d) return new Date(d.Q);\n      if (\"s\" in d) return new Date(d.s * 1000 + (\"L\" in d ? d.L : 0));\n\n      // If this is utcParse, never use the local timezone.\n      if (Z && !(\"Z\" in d)) d.Z = 0;\n\n      // The am-pm flag is 0 for AM, and 1 for PM.\n      if (\"p\" in d) d.H = d.H % 12 + d.p * 12;\n\n      // If the month was not specified, inherit from the quarter.\n      if (d.m === undefined) d.m = \"q\" in d ? d.q : 0;\n\n      // Convert day-of-week and week-of-year to day-of-year.\n      if (\"V\" in d) {\n        if (d.V < 1 || d.V > 53) return null;\n        if (!(\"w\" in d)) d.w = 1;\n        if (\"Z\" in d) {\n          week = utcDate(newDate(d.y, 0, 1)), day = week.getUTCDay();\n          week = day > 4 || day === 0 ? d3_time__WEBPACK_IMPORTED_MODULE_0__[\"utcMonday\"].ceil(week) : Object(d3_time__WEBPACK_IMPORTED_MODULE_0__[\"utcMonday\"])(week);\n          week = d3_time__WEBPACK_IMPORTED_MODULE_0__[\"utcDay\"].offset(week, (d.V - 1) * 7);\n          d.y = week.getUTCFullYear();\n          d.m = week.getUTCMonth();\n          d.d = week.getUTCDate() + (d.w + 6) % 7;\n        } else {\n          week = localDate(newDate(d.y, 0, 1)), day = week.getDay();\n          week = day > 4 || day === 0 ? d3_time__WEBPACK_IMPORTED_MODULE_0__[\"timeMonday\"].ceil(week) : Object(d3_time__WEBPACK_IMPORTED_MODULE_0__[\"timeMonday\"])(week);\n          week = d3_time__WEBPACK_IMPORTED_MODULE_0__[\"timeDay\"].offset(week, (d.V - 1) * 7);\n          d.y = week.getFullYear();\n          d.m = week.getMonth();\n          d.d = week.getDate() + (d.w + 6) % 7;\n        }\n      } else if (\"W\" in d || \"U\" in d) {\n        if (!(\"w\" in d)) d.w = \"u\" in d ? d.u % 7 : \"W\" in d ? 1 : 0;\n        day = \"Z\" in d ? utcDate(newDate(d.y, 0, 1)).getUTCDay() : localDate(newDate(d.y, 0, 1)).getDay();\n        d.m = 0;\n        d.d = \"W\" in d ? (d.w + 6) % 7 + d.W * 7 - (day + 5) % 7 : d.w + d.U * 7 - (day + 6) % 7;\n      }\n\n      // If a time zone is specified, all fields are interpreted as UTC and then\n      // offset according to the specified time zone.\n      if (\"Z\" in d) {\n        d.H += d.Z / 100 | 0;\n        d.M += d.Z % 100;\n        return utcDate(d);\n      }\n\n      // Otherwise, all fields are in local time.\n      return localDate(d);\n    };\n  }\n\n  function parseSpecifier(d, specifier, string, j) {\n    var i = 0,\n        n = specifier.length,\n        m = string.length,\n        c,\n        parse;\n\n    while (i < n) {\n      if (j >= m) return -1;\n      c = specifier.charCodeAt(i++);\n      if (c === 37) {\n        c = specifier.charAt(i++);\n        parse = parses[c in pads ? specifier.charAt(i++) : c];\n        if (!parse || ((j = parse(d, string, j)) < 0)) return -1;\n      } else if (c != string.charCodeAt(j++)) {\n        return -1;\n      }\n    }\n\n    return j;\n  }\n\n  function parsePeriod(d, string, i) {\n    var n = periodRe.exec(string.slice(i));\n    return n ? (d.p = periodLookup[n[0].toLowerCase()], i + n[0].length) : -1;\n  }\n\n  function parseShortWeekday(d, string, i) {\n    var n = shortWeekdayRe.exec(string.slice(i));\n    return n ? (d.w = shortWeekdayLookup[n[0].toLowerCase()], i + n[0].length) : -1;\n  }\n\n  function parseWeekday(d, string, i) {\n    var n = weekdayRe.exec(string.slice(i));\n    return n ? (d.w = weekdayLookup[n[0].toLowerCase()], i + n[0].length) : -1;\n  }\n\n  function parseShortMonth(d, string, i) {\n    var n = shortMonthRe.exec(string.slice(i));\n    return n ? (d.m = shortMonthLookup[n[0].toLowerCase()], i + n[0].length) : -1;\n  }\n\n  function parseMonth(d, string, i) {\n    var n = monthRe.exec(string.slice(i));\n    return n ? (d.m = monthLookup[n[0].toLowerCase()], i + n[0].length) : -1;\n  }\n\n  function parseLocaleDateTime(d, string, i) {\n    return parseSpecifier(d, locale_dateTime, string, i);\n  }\n\n  function parseLocaleDate(d, string, i) {\n    return parseSpecifier(d, locale_date, string, i);\n  }\n\n  function parseLocaleTime(d, string, i) {\n    return parseSpecifier(d, locale_time, string, i);\n  }\n\n  function formatShortWeekday(d) {\n    return locale_shortWeekdays[d.getDay()];\n  }\n\n  function formatWeekday(d) {\n    return locale_weekdays[d.getDay()];\n  }\n\n  function formatShortMonth(d) {\n    return locale_shortMonths[d.getMonth()];\n  }\n\n  function formatMonth(d) {\n    return locale_months[d.getMonth()];\n  }\n\n  function formatPeriod(d) {\n    return locale_periods[+(d.getHours() >= 12)];\n  }\n\n  function formatQuarter(d) {\n    return 1 + ~~(d.getMonth() / 3);\n  }\n\n  function formatUTCShortWeekday(d) {\n    return locale_shortWeekdays[d.getUTCDay()];\n  }\n\n  function formatUTCWeekday(d) {\n    return locale_weekdays[d.getUTCDay()];\n  }\n\n  function formatUTCShortMonth(d) {\n    return locale_shortMonths[d.getUTCMonth()];\n  }\n\n  function formatUTCMonth(d) {\n    return locale_months[d.getUTCMonth()];\n  }\n\n  function formatUTCPeriod(d) {\n    return locale_periods[+(d.getUTCHours() >= 12)];\n  }\n\n  function formatUTCQuarter(d) {\n    return 1 + ~~(d.getUTCMonth() / 3);\n  }\n\n  return {\n    format: function(specifier) {\n      var f = newFormat(specifier += \"\", formats);\n      f.toString = function() { return specifier; };\n      return f;\n    },\n    parse: function(specifier) {\n      var p = newParse(specifier += \"\", false);\n      p.toString = function() { return specifier; };\n      return p;\n    },\n    utcFormat: function(specifier) {\n      var f = newFormat(specifier += \"\", utcFormats);\n      f.toString = function() { return specifier; };\n      return f;\n    },\n    utcParse: function(specifier) {\n      var p = newParse(specifier += \"\", true);\n      p.toString = function() { return specifier; };\n      return p;\n    }\n  };\n}\n\nvar pads = {\"-\": \"\", \"_\": \" \", \"0\": \"0\"},\n    numberRe = /^\\s*\\d+/, // note: ignores next directive\n    percentRe = /^%/,\n    requoteRe = /[\\\\^$*+?|[\\]().{}]/g;\n\nfunction pad(value, fill, width) {\n  var sign = value < 0 ? \"-\" : \"\",\n      string = (sign ? -value : value) + \"\",\n      length = string.length;\n  return sign + (length < width ? new Array(width - length + 1).join(fill) + string : string);\n}\n\nfunction requote(s) {\n  return s.replace(requoteRe, \"\\\\$&\");\n}\n\nfunction formatRe(names) {\n  return new RegExp(\"^(?:\" + names.map(requote).join(\"|\") + \")\", \"i\");\n}\n\nfunction formatLookup(names) {\n  var map = {}, i = -1, n = names.length;\n  while (++i < n) map[names[i].toLowerCase()] = i;\n  return map;\n}\n\nfunction parseWeekdayNumberSunday(d, string, i) {\n  var n = numberRe.exec(string.slice(i, i + 1));\n  return n ? (d.w = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseWeekdayNumberMonday(d, string, i) {\n  var n = numberRe.exec(string.slice(i, i + 1));\n  return n ? (d.u = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseWeekNumberSunday(d, string, i) {\n  var n = numberRe.exec(string.slice(i, i + 2));\n  return n ? (d.U = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseWeekNumberISO(d, string, i) {\n  var n = numberRe.exec(string.slice(i, i + 2));\n  return n ? (d.V = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseWeekNumberMonday(d, string, i) {\n  var n = numberRe.exec(string.slice(i, i + 2));\n  return n ? (d.W = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseFullYear(d, string, i) {\n  var n = numberRe.exec(string.slice(i, i + 4));\n  return n ? (d.y = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseYear(d, string, i) {\n  var n = numberRe.exec(string.slice(i, i + 2));\n  return n ? (d.y = +n[0] + (+n[0] > 68 ? 1900 : 2000), i + n[0].length) : -1;\n}\n\nfunction parseZone(d, string, i) {\n  var n = /^(Z)|([+-]\\d\\d)(?::?(\\d\\d))?/.exec(string.slice(i, i + 6));\n  return n ? (d.Z = n[1] ? 0 : -(n[2] + (n[3] || \"00\")), i + n[0].length) : -1;\n}\n\nfunction parseQuarter(d, string, i) {\n  var n = numberRe.exec(string.slice(i, i + 1));\n  return n ? (d.q = n[0] * 3 - 3, i + n[0].length) : -1;\n}\n\nfunction parseMonthNumber(d, string, i) {\n  var n = numberRe.exec(string.slice(i, i + 2));\n  return n ? (d.m = n[0] - 1, i + n[0].length) : -1;\n}\n\nfunction parseDayOfMonth(d, string, i) {\n  var n = numberRe.exec(string.slice(i, i + 2));\n  return n ? (d.d = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseDayOfYear(d, string, i) {\n  var n = numberRe.exec(string.slice(i, i + 3));\n  return n ? (d.m = 0, d.d = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseHour24(d, string, i) {\n  var n = numberRe.exec(string.slice(i, i + 2));\n  return n ? (d.H = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseMinutes(d, string, i) {\n  var n = numberRe.exec(string.slice(i, i + 2));\n  return n ? (d.M = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseSeconds(d, string, i) {\n  var n = numberRe.exec(string.slice(i, i + 2));\n  return n ? (d.S = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseMilliseconds(d, string, i) {\n  var n = numberRe.exec(string.slice(i, i + 3));\n  return n ? (d.L = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseMicroseconds(d, string, i) {\n  var n = numberRe.exec(string.slice(i, i + 6));\n  return n ? (d.L = Math.floor(n[0] / 1000), i + n[0].length) : -1;\n}\n\nfunction parseLiteralPercent(d, string, i) {\n  var n = percentRe.exec(string.slice(i, i + 1));\n  return n ? i + n[0].length : -1;\n}\n\nfunction parseUnixTimestamp(d, string, i) {\n  var n = numberRe.exec(string.slice(i));\n  return n ? (d.Q = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseUnixTimestampSeconds(d, string, i) {\n  var n = numberRe.exec(string.slice(i));\n  return n ? (d.s = +n[0], i + n[0].length) : -1;\n}\n\nfunction formatDayOfMonth(d, p) {\n  return pad(d.getDate(), p, 2);\n}\n\nfunction formatHour24(d, p) {\n  return pad(d.getHours(), p, 2);\n}\n\nfunction formatHour12(d, p) {\n  return pad(d.getHours() % 12 || 12, p, 2);\n}\n\nfunction formatDayOfYear(d, p) {\n  return pad(1 + d3_time__WEBPACK_IMPORTED_MODULE_0__[\"timeDay\"].count(Object(d3_time__WEBPACK_IMPORTED_MODULE_0__[\"timeYear\"])(d), d), p, 3);\n}\n\nfunction formatMilliseconds(d, p) {\n  return pad(d.getMilliseconds(), p, 3);\n}\n\nfunction formatMicroseconds(d, p) {\n  return formatMilliseconds(d, p) + \"000\";\n}\n\nfunction formatMonthNumber(d, p) {\n  return pad(d.getMonth() + 1, p, 2);\n}\n\nfunction formatMinutes(d, p) {\n  return pad(d.getMinutes(), p, 2);\n}\n\nfunction formatSeconds(d, p) {\n  return pad(d.getSeconds(), p, 2);\n}\n\nfunction formatWeekdayNumberMonday(d) {\n  var day = d.getDay();\n  return day === 0 ? 7 : day;\n}\n\nfunction formatWeekNumberSunday(d, p) {\n  return pad(d3_time__WEBPACK_IMPORTED_MODULE_0__[\"timeSunday\"].count(Object(d3_time__WEBPACK_IMPORTED_MODULE_0__[\"timeYear\"])(d) - 1, d), p, 2);\n}\n\nfunction dISO(d) {\n  var day = d.getDay();\n  return (day >= 4 || day === 0) ? Object(d3_time__WEBPACK_IMPORTED_MODULE_0__[\"timeThursday\"])(d) : d3_time__WEBPACK_IMPORTED_MODULE_0__[\"timeThursday\"].ceil(d);\n}\n\nfunction formatWeekNumberISO(d, p) {\n  d = dISO(d);\n  return pad(d3_time__WEBPACK_IMPORTED_MODULE_0__[\"timeThursday\"].count(Object(d3_time__WEBPACK_IMPORTED_MODULE_0__[\"timeYear\"])(d), d) + (Object(d3_time__WEBPACK_IMPORTED_MODULE_0__[\"timeYear\"])(d).getDay() === 4), p, 2);\n}\n\nfunction formatWeekdayNumberSunday(d) {\n  return d.getDay();\n}\n\nfunction formatWeekNumberMonday(d, p) {\n  return pad(d3_time__WEBPACK_IMPORTED_MODULE_0__[\"timeMonday\"].count(Object(d3_time__WEBPACK_IMPORTED_MODULE_0__[\"timeYear\"])(d) - 1, d), p, 2);\n}\n\nfunction formatYear(d, p) {\n  return pad(d.getFullYear() % 100, p, 2);\n}\n\nfunction formatYearISO(d, p) {\n  d = dISO(d);\n  return pad(d.getFullYear() % 100, p, 2);\n}\n\nfunction formatFullYear(d, p) {\n  return pad(d.getFullYear() % 10000, p, 4);\n}\n\nfunction formatFullYearISO(d, p) {\n  var day = d.getDay();\n  d = (day >= 4 || day === 0) ? Object(d3_time__WEBPACK_IMPORTED_MODULE_0__[\"timeThursday\"])(d) : d3_time__WEBPACK_IMPORTED_MODULE_0__[\"timeThursday\"].ceil(d);\n  return pad(d.getFullYear() % 10000, p, 4);\n}\n\nfunction formatZone(d) {\n  var z = d.getTimezoneOffset();\n  return (z > 0 ? \"-\" : (z *= -1, \"+\"))\n      + pad(z / 60 | 0, \"0\", 2)\n      + pad(z % 60, \"0\", 2);\n}\n\nfunction formatUTCDayOfMonth(d, p) {\n  return pad(d.getUTCDate(), p, 2);\n}\n\nfunction formatUTCHour24(d, p) {\n  return pad(d.getUTCHours(), p, 2);\n}\n\nfunction formatUTCHour12(d, p) {\n  return pad(d.getUTCHours() % 12 || 12, p, 2);\n}\n\nfunction formatUTCDayOfYear(d, p) {\n  return pad(1 + d3_time__WEBPACK_IMPORTED_MODULE_0__[\"utcDay\"].count(Object(d3_time__WEBPACK_IMPORTED_MODULE_0__[\"utcYear\"])(d), d), p, 3);\n}\n\nfunction formatUTCMilliseconds(d, p) {\n  return pad(d.getUTCMilliseconds(), p, 3);\n}\n\nfunction formatUTCMicroseconds(d, p) {\n  return formatUTCMilliseconds(d, p) + \"000\";\n}\n\nfunction formatUTCMonthNumber(d, p) {\n  return pad(d.getUTCMonth() + 1, p, 2);\n}\n\nfunction formatUTCMinutes(d, p) {\n  return pad(d.getUTCMinutes(), p, 2);\n}\n\nfunction formatUTCSeconds(d, p) {\n  return pad(d.getUTCSeconds(), p, 2);\n}\n\nfunction formatUTCWeekdayNumberMonday(d) {\n  var dow = d.getUTCDay();\n  return dow === 0 ? 7 : dow;\n}\n\nfunction formatUTCWeekNumberSunday(d, p) {\n  return pad(d3_time__WEBPACK_IMPORTED_MODULE_0__[\"utcSunday\"].count(Object(d3_time__WEBPACK_IMPORTED_MODULE_0__[\"utcYear\"])(d) - 1, d), p, 2);\n}\n\nfunction UTCdISO(d) {\n  var day = d.getUTCDay();\n  return (day >= 4 || day === 0) ? Object(d3_time__WEBPACK_IMPORTED_MODULE_0__[\"utcThursday\"])(d) : d3_time__WEBPACK_IMPORTED_MODULE_0__[\"utcThursday\"].ceil(d);\n}\n\nfunction formatUTCWeekNumberISO(d, p) {\n  d = UTCdISO(d);\n  return pad(d3_time__WEBPACK_IMPORTED_MODULE_0__[\"utcThursday\"].count(Object(d3_time__WEBPACK_IMPORTED_MODULE_0__[\"utcYear\"])(d), d) + (Object(d3_time__WEBPACK_IMPORTED_MODULE_0__[\"utcYear\"])(d).getUTCDay() === 4), p, 2);\n}\n\nfunction formatUTCWeekdayNumberSunday(d) {\n  return d.getUTCDay();\n}\n\nfunction formatUTCWeekNumberMonday(d, p) {\n  return pad(d3_time__WEBPACK_IMPORTED_MODULE_0__[\"utcMonday\"].count(Object(d3_time__WEBPACK_IMPORTED_MODULE_0__[\"utcYear\"])(d) - 1, d), p, 2);\n}\n\nfunction formatUTCYear(d, p) {\n  return pad(d.getUTCFullYear() % 100, p, 2);\n}\n\nfunction formatUTCYearISO(d, p) {\n  d = UTCdISO(d);\n  return pad(d.getUTCFullYear() % 100, p, 2);\n}\n\nfunction formatUTCFullYear(d, p) {\n  return pad(d.getUTCFullYear() % 10000, p, 4);\n}\n\nfunction formatUTCFullYearISO(d, p) {\n  var day = d.getUTCDay();\n  d = (day >= 4 || day === 0) ? Object(d3_time__WEBPACK_IMPORTED_MODULE_0__[\"utcThursday\"])(d) : d3_time__WEBPACK_IMPORTED_MODULE_0__[\"utcThursday\"].ceil(d);\n  return pad(d.getUTCFullYear() % 10000, p, 4);\n}\n\nfunction formatUTCZone() {\n  return \"+0000\";\n}\n\nfunction formatLiteralPercent() {\n  return \"%\";\n}\n\nfunction formatUnixTimestamp(d) {\n  return +d;\n}\n\nfunction formatUnixTimestampSeconds(d) {\n  return Math.floor(+d / 1000);\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-time/src/day.js\":\n/*!*****************************************!*\\\n  !*** ./node_modules/d3-time/src/day.js ***!\n  \\*****************************************/\n/*! exports provided: default, days */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"days\", function() { return days; });\n/* harmony import */ var _interval_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./interval.js */ \"./node_modules/d3-time/src/interval.js\");\n/* harmony import */ var _duration_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./duration.js */ \"./node_modules/d3-time/src/duration.js\");\n\n\n\nvar day = Object(_interval_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function(date) {\n  date.setHours(0, 0, 0, 0);\n}, function(date, step) {\n  date.setDate(date.getDate() + step);\n}, function(start, end) {\n  return (end - start - (end.getTimezoneOffset() - start.getTimezoneOffset()) * _duration_js__WEBPACK_IMPORTED_MODULE_1__[\"durationMinute\"]) / _duration_js__WEBPACK_IMPORTED_MODULE_1__[\"durationDay\"];\n}, function(date) {\n  return date.getDate() - 1;\n});\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (day);\nvar days = day.range;\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-time/src/duration.js\":\n/*!**********************************************!*\\\n  !*** ./node_modules/d3-time/src/duration.js ***!\n  \\**********************************************/\n/*! exports provided: durationSecond, durationMinute, durationHour, durationDay, durationWeek */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"durationSecond\", function() { return durationSecond; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"durationMinute\", function() { return durationMinute; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"durationHour\", function() { return durationHour; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"durationDay\", function() { return durationDay; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"durationWeek\", function() { return durationWeek; });\nvar durationSecond = 1e3;\nvar durationMinute = 6e4;\nvar durationHour = 36e5;\nvar durationDay = 864e5;\nvar durationWeek = 6048e5;\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-time/src/hour.js\":\n/*!******************************************!*\\\n  !*** ./node_modules/d3-time/src/hour.js ***!\n  \\******************************************/\n/*! exports provided: default, hours */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"hours\", function() { return hours; });\n/* harmony import */ var _interval_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./interval.js */ \"./node_modules/d3-time/src/interval.js\");\n/* harmony import */ var _duration_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./duration.js */ \"./node_modules/d3-time/src/duration.js\");\n\n\n\nvar hour = Object(_interval_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function(date) {\n  date.setTime(date - date.getMilliseconds() - date.getSeconds() * _duration_js__WEBPACK_IMPORTED_MODULE_1__[\"durationSecond\"] - date.getMinutes() * _duration_js__WEBPACK_IMPORTED_MODULE_1__[\"durationMinute\"]);\n}, function(date, step) {\n  date.setTime(+date + step * _duration_js__WEBPACK_IMPORTED_MODULE_1__[\"durationHour\"]);\n}, function(start, end) {\n  return (end - start) / _duration_js__WEBPACK_IMPORTED_MODULE_1__[\"durationHour\"];\n}, function(date) {\n  return date.getHours();\n});\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (hour);\nvar hours = hour.range;\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-time/src/index.js\":\n/*!*******************************************!*\\\n  !*** ./node_modules/d3-time/src/index.js ***!\n  \\*******************************************/\n/*! exports provided: timeInterval, timeMillisecond, timeMilliseconds, utcMillisecond, utcMilliseconds, timeSecond, timeSeconds, utcSecond, utcSeconds, timeMinute, timeMinutes, timeHour, timeHours, timeDay, timeDays, timeWeek, timeWeeks, timeSunday, timeSundays, timeMonday, timeMondays, timeTuesday, timeTuesdays, timeWednesday, timeWednesdays, timeThursday, timeThursdays, timeFriday, timeFridays, timeSaturday, timeSaturdays, timeMonth, timeMonths, timeYear, timeYears, utcMinute, utcMinutes, utcHour, utcHours, utcDay, utcDays, utcWeek, utcWeeks, utcSunday, utcSundays, utcMonday, utcMondays, utcTuesday, utcTuesdays, utcWednesday, utcWednesdays, utcThursday, utcThursdays, utcFriday, utcFridays, utcSaturday, utcSaturdays, utcMonth, utcMonths, utcYear, utcYears */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _interval_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./interval.js */ \"./node_modules/d3-time/src/interval.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeInterval\", function() { return _interval_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n/* harmony import */ var _millisecond_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./millisecond.js */ \"./node_modules/d3-time/src/millisecond.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeMillisecond\", function() { return _millisecond_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeMilliseconds\", function() { return _millisecond_js__WEBPACK_IMPORTED_MODULE_1__[\"milliseconds\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcMillisecond\", function() { return _millisecond_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcMilliseconds\", function() { return _millisecond_js__WEBPACK_IMPORTED_MODULE_1__[\"milliseconds\"]; });\n\n/* harmony import */ var _second_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./second.js */ \"./node_modules/d3-time/src/second.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeSecond\", function() { return _second_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeSeconds\", function() { return _second_js__WEBPACK_IMPORTED_MODULE_2__[\"seconds\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcSecond\", function() { return _second_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcSeconds\", function() { return _second_js__WEBPACK_IMPORTED_MODULE_2__[\"seconds\"]; });\n\n/* harmony import */ var _minute_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./minute.js */ \"./node_modules/d3-time/src/minute.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeMinute\", function() { return _minute_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeMinutes\", function() { return _minute_js__WEBPACK_IMPORTED_MODULE_3__[\"minutes\"]; });\n\n/* harmony import */ var _hour_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./hour.js */ \"./node_modules/d3-time/src/hour.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeHour\", function() { return _hour_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeHours\", function() { return _hour_js__WEBPACK_IMPORTED_MODULE_4__[\"hours\"]; });\n\n/* harmony import */ var _day_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./day.js */ \"./node_modules/d3-time/src/day.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeDay\", function() { return _day_js__WEBPACK_IMPORTED_MODULE_5__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeDays\", function() { return _day_js__WEBPACK_IMPORTED_MODULE_5__[\"days\"]; });\n\n/* harmony import */ var _week_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./week.js */ \"./node_modules/d3-time/src/week.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeWeek\", function() { return _week_js__WEBPACK_IMPORTED_MODULE_6__[\"sunday\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeWeeks\", function() { return _week_js__WEBPACK_IMPORTED_MODULE_6__[\"sundays\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeSunday\", function() { return _week_js__WEBPACK_IMPORTED_MODULE_6__[\"sunday\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeSundays\", function() { return _week_js__WEBPACK_IMPORTED_MODULE_6__[\"sundays\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeMonday\", function() { return _week_js__WEBPACK_IMPORTED_MODULE_6__[\"monday\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeMondays\", function() { return _week_js__WEBPACK_IMPORTED_MODULE_6__[\"mondays\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeTuesday\", function() { return _week_js__WEBPACK_IMPORTED_MODULE_6__[\"tuesday\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeTuesdays\", function() { return _week_js__WEBPACK_IMPORTED_MODULE_6__[\"tuesdays\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeWednesday\", function() { return _week_js__WEBPACK_IMPORTED_MODULE_6__[\"wednesday\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeWednesdays\", function() { return _week_js__WEBPACK_IMPORTED_MODULE_6__[\"wednesdays\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeThursday\", function() { return _week_js__WEBPACK_IMPORTED_MODULE_6__[\"thursday\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeThursdays\", function() { return _week_js__WEBPACK_IMPORTED_MODULE_6__[\"thursdays\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeFriday\", function() { return _week_js__WEBPACK_IMPORTED_MODULE_6__[\"friday\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeFridays\", function() { return _week_js__WEBPACK_IMPORTED_MODULE_6__[\"fridays\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeSaturday\", function() { return _week_js__WEBPACK_IMPORTED_MODULE_6__[\"saturday\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeSaturdays\", function() { return _week_js__WEBPACK_IMPORTED_MODULE_6__[\"saturdays\"]; });\n\n/* harmony import */ var _month_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./month.js */ \"./node_modules/d3-time/src/month.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeMonth\", function() { return _month_js__WEBPACK_IMPORTED_MODULE_7__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeMonths\", function() { return _month_js__WEBPACK_IMPORTED_MODULE_7__[\"months\"]; });\n\n/* harmony import */ var _year_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./year.js */ \"./node_modules/d3-time/src/year.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeYear\", function() { return _year_js__WEBPACK_IMPORTED_MODULE_8__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeYears\", function() { return _year_js__WEBPACK_IMPORTED_MODULE_8__[\"years\"]; });\n\n/* harmony import */ var _utcMinute_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./utcMinute.js */ \"./node_modules/d3-time/src/utcMinute.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcMinute\", function() { return _utcMinute_js__WEBPACK_IMPORTED_MODULE_9__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcMinutes\", function() { return _utcMinute_js__WEBPACK_IMPORTED_MODULE_9__[\"utcMinutes\"]; });\n\n/* harmony import */ var _utcHour_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./utcHour.js */ \"./node_modules/d3-time/src/utcHour.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcHour\", function() { return _utcHour_js__WEBPACK_IMPORTED_MODULE_10__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcHours\", function() { return _utcHour_js__WEBPACK_IMPORTED_MODULE_10__[\"utcHours\"]; });\n\n/* harmony import */ var _utcDay_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./utcDay.js */ \"./node_modules/d3-time/src/utcDay.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcDay\", function() { return _utcDay_js__WEBPACK_IMPORTED_MODULE_11__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcDays\", function() { return _utcDay_js__WEBPACK_IMPORTED_MODULE_11__[\"utcDays\"]; });\n\n/* harmony import */ var _utcWeek_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./utcWeek.js */ \"./node_modules/d3-time/src/utcWeek.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcWeek\", function() { return _utcWeek_js__WEBPACK_IMPORTED_MODULE_12__[\"utcSunday\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcWeeks\", function() { return _utcWeek_js__WEBPACK_IMPORTED_MODULE_12__[\"utcSundays\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcSunday\", function() { return _utcWeek_js__WEBPACK_IMPORTED_MODULE_12__[\"utcSunday\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcSundays\", function() { return _utcWeek_js__WEBPACK_IMPORTED_MODULE_12__[\"utcSundays\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcMonday\", function() { return _utcWeek_js__WEBPACK_IMPORTED_MODULE_12__[\"utcMonday\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcMondays\", function() { return _utcWeek_js__WEBPACK_IMPORTED_MODULE_12__[\"utcMondays\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcTuesday\", function() { return _utcWeek_js__WEBPACK_IMPORTED_MODULE_12__[\"utcTuesday\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcTuesdays\", function() { return _utcWeek_js__WEBPACK_IMPORTED_MODULE_12__[\"utcTuesdays\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcWednesday\", function() { return _utcWeek_js__WEBPACK_IMPORTED_MODULE_12__[\"utcWednesday\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcWednesdays\", function() { return _utcWeek_js__WEBPACK_IMPORTED_MODULE_12__[\"utcWednesdays\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcThursday\", function() { return _utcWeek_js__WEBPACK_IMPORTED_MODULE_12__[\"utcThursday\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcThursdays\", function() { return _utcWeek_js__WEBPACK_IMPORTED_MODULE_12__[\"utcThursdays\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcFriday\", function() { return _utcWeek_js__WEBPACK_IMPORTED_MODULE_12__[\"utcFriday\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcFridays\", function() { return _utcWeek_js__WEBPACK_IMPORTED_MODULE_12__[\"utcFridays\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcSaturday\", function() { return _utcWeek_js__WEBPACK_IMPORTED_MODULE_12__[\"utcSaturday\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcSaturdays\", function() { return _utcWeek_js__WEBPACK_IMPORTED_MODULE_12__[\"utcSaturdays\"]; });\n\n/* harmony import */ var _utcMonth_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./utcMonth.js */ \"./node_modules/d3-time/src/utcMonth.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcMonth\", function() { return _utcMonth_js__WEBPACK_IMPORTED_MODULE_13__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcMonths\", function() { return _utcMonth_js__WEBPACK_IMPORTED_MODULE_13__[\"utcMonths\"]; });\n\n/* harmony import */ var _utcYear_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./utcYear.js */ \"./node_modules/d3-time/src/utcYear.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcYear\", function() { return _utcYear_js__WEBPACK_IMPORTED_MODULE_14__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcYears\", function() { return _utcYear_js__WEBPACK_IMPORTED_MODULE_14__[\"utcYears\"]; });\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-time/src/interval.js\":\n/*!**********************************************!*\\\n  !*** ./node_modules/d3-time/src/interval.js ***!\n  \\**********************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return newInterval; });\nvar t0 = new Date,\n    t1 = new Date;\n\nfunction newInterval(floori, offseti, count, field) {\n\n  function interval(date) {\n    return floori(date = arguments.length === 0 ? new Date : new Date(+date)), date;\n  }\n\n  interval.floor = function(date) {\n    return floori(date = new Date(+date)), date;\n  };\n\n  interval.ceil = function(date) {\n    return floori(date = new Date(date - 1)), offseti(date, 1), floori(date), date;\n  };\n\n  interval.round = function(date) {\n    var d0 = interval(date),\n        d1 = interval.ceil(date);\n    return date - d0 < d1 - date ? d0 : d1;\n  };\n\n  interval.offset = function(date, step) {\n    return offseti(date = new Date(+date), step == null ? 1 : Math.floor(step)), date;\n  };\n\n  interval.range = function(start, stop, step) {\n    var range = [], previous;\n    start = interval.ceil(start);\n    step = step == null ? 1 : Math.floor(step);\n    if (!(start < stop) || !(step > 0)) return range; // also handles Invalid Date\n    do range.push(previous = new Date(+start)), offseti(start, step), floori(start);\n    while (previous < start && start < stop);\n    return range;\n  };\n\n  interval.filter = function(test) {\n    return newInterval(function(date) {\n      if (date >= date) while (floori(date), !test(date)) date.setTime(date - 1);\n    }, function(date, step) {\n      if (date >= date) {\n        if (step < 0) while (++step <= 0) {\n          while (offseti(date, -1), !test(date)) {} // eslint-disable-line no-empty\n        } else while (--step >= 0) {\n          while (offseti(date, +1), !test(date)) {} // eslint-disable-line no-empty\n        }\n      }\n    });\n  };\n\n  if (count) {\n    interval.count = function(start, end) {\n      t0.setTime(+start), t1.setTime(+end);\n      floori(t0), floori(t1);\n      return Math.floor(count(t0, t1));\n    };\n\n    interval.every = function(step) {\n      step = Math.floor(step);\n      return !isFinite(step) || !(step > 0) ? null\n          : !(step > 1) ? interval\n          : interval.filter(field\n              ? function(d) { return field(d) % step === 0; }\n              : function(d) { return interval.count(0, d) % step === 0; });\n    };\n  }\n\n  return interval;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-time/src/millisecond.js\":\n/*!*************************************************!*\\\n  !*** ./node_modules/d3-time/src/millisecond.js ***!\n  \\*************************************************/\n/*! exports provided: default, milliseconds */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"milliseconds\", function() { return milliseconds; });\n/* harmony import */ var _interval_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./interval.js */ \"./node_modules/d3-time/src/interval.js\");\n\n\nvar millisecond = Object(_interval_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function() {\n  // noop\n}, function(date, step) {\n  date.setTime(+date + step);\n}, function(start, end) {\n  return end - start;\n});\n\n// An optimized implementation for this simple case.\nmillisecond.every = function(k) {\n  k = Math.floor(k);\n  if (!isFinite(k) || !(k > 0)) return null;\n  if (!(k > 1)) return millisecond;\n  return Object(_interval_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function(date) {\n    date.setTime(Math.floor(date / k) * k);\n  }, function(date, step) {\n    date.setTime(+date + step * k);\n  }, function(start, end) {\n    return (end - start) / k;\n  });\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (millisecond);\nvar milliseconds = millisecond.range;\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-time/src/minute.js\":\n/*!********************************************!*\\\n  !*** ./node_modules/d3-time/src/minute.js ***!\n  \\********************************************/\n/*! exports provided: default, minutes */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"minutes\", function() { return minutes; });\n/* harmony import */ var _interval_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./interval.js */ \"./node_modules/d3-time/src/interval.js\");\n/* harmony import */ var _duration_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./duration.js */ \"./node_modules/d3-time/src/duration.js\");\n\n\n\nvar minute = Object(_interval_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function(date) {\n  date.setTime(date - date.getMilliseconds() - date.getSeconds() * _duration_js__WEBPACK_IMPORTED_MODULE_1__[\"durationSecond\"]);\n}, function(date, step) {\n  date.setTime(+date + step * _duration_js__WEBPACK_IMPORTED_MODULE_1__[\"durationMinute\"]);\n}, function(start, end) {\n  return (end - start) / _duration_js__WEBPACK_IMPORTED_MODULE_1__[\"durationMinute\"];\n}, function(date) {\n  return date.getMinutes();\n});\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (minute);\nvar minutes = minute.range;\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-time/src/month.js\":\n/*!*******************************************!*\\\n  !*** ./node_modules/d3-time/src/month.js ***!\n  \\*******************************************/\n/*! exports provided: default, months */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"months\", function() { return months; });\n/* harmony import */ var _interval_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./interval.js */ \"./node_modules/d3-time/src/interval.js\");\n\n\nvar month = Object(_interval_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function(date) {\n  date.setDate(1);\n  date.setHours(0, 0, 0, 0);\n}, function(date, step) {\n  date.setMonth(date.getMonth() + step);\n}, function(start, end) {\n  return end.getMonth() - start.getMonth() + (end.getFullYear() - start.getFullYear()) * 12;\n}, function(date) {\n  return date.getMonth();\n});\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (month);\nvar months = month.range;\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-time/src/second.js\":\n/*!********************************************!*\\\n  !*** ./node_modules/d3-time/src/second.js ***!\n  \\********************************************/\n/*! exports provided: default, seconds */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"seconds\", function() { return seconds; });\n/* harmony import */ var _interval_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./interval.js */ \"./node_modules/d3-time/src/interval.js\");\n/* harmony import */ var _duration_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./duration.js */ \"./node_modules/d3-time/src/duration.js\");\n\n\n\nvar second = Object(_interval_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function(date) {\n  date.setTime(date - date.getMilliseconds());\n}, function(date, step) {\n  date.setTime(+date + step * _duration_js__WEBPACK_IMPORTED_MODULE_1__[\"durationSecond\"]);\n}, function(start, end) {\n  return (end - start) / _duration_js__WEBPACK_IMPORTED_MODULE_1__[\"durationSecond\"];\n}, function(date) {\n  return date.getUTCSeconds();\n});\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (second);\nvar seconds = second.range;\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-time/src/utcDay.js\":\n/*!********************************************!*\\\n  !*** ./node_modules/d3-time/src/utcDay.js ***!\n  \\********************************************/\n/*! exports provided: default, utcDays */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"utcDays\", function() { return utcDays; });\n/* harmony import */ var _interval_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./interval.js */ \"./node_modules/d3-time/src/interval.js\");\n/* harmony import */ var _duration_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./duration.js */ \"./node_modules/d3-time/src/duration.js\");\n\n\n\nvar utcDay = Object(_interval_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function(date) {\n  date.setUTCHours(0, 0, 0, 0);\n}, function(date, step) {\n  date.setUTCDate(date.getUTCDate() + step);\n}, function(start, end) {\n  return (end - start) / _duration_js__WEBPACK_IMPORTED_MODULE_1__[\"durationDay\"];\n}, function(date) {\n  return date.getUTCDate() - 1;\n});\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (utcDay);\nvar utcDays = utcDay.range;\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-time/src/utcHour.js\":\n/*!*********************************************!*\\\n  !*** ./node_modules/d3-time/src/utcHour.js ***!\n  \\*********************************************/\n/*! exports provided: default, utcHours */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"utcHours\", function() { return utcHours; });\n/* harmony import */ var _interval_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./interval.js */ \"./node_modules/d3-time/src/interval.js\");\n/* harmony import */ var _duration_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./duration.js */ \"./node_modules/d3-time/src/duration.js\");\n\n\n\nvar utcHour = Object(_interval_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function(date) {\n  date.setUTCMinutes(0, 0, 0);\n}, function(date, step) {\n  date.setTime(+date + step * _duration_js__WEBPACK_IMPORTED_MODULE_1__[\"durationHour\"]);\n}, function(start, end) {\n  return (end - start) / _duration_js__WEBPACK_IMPORTED_MODULE_1__[\"durationHour\"];\n}, function(date) {\n  return date.getUTCHours();\n});\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (utcHour);\nvar utcHours = utcHour.range;\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-time/src/utcMinute.js\":\n/*!***********************************************!*\\\n  !*** ./node_modules/d3-time/src/utcMinute.js ***!\n  \\***********************************************/\n/*! exports provided: default, utcMinutes */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"utcMinutes\", function() { return utcMinutes; });\n/* harmony import */ var _interval_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./interval.js */ \"./node_modules/d3-time/src/interval.js\");\n/* harmony import */ var _duration_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./duration.js */ \"./node_modules/d3-time/src/duration.js\");\n\n\n\nvar utcMinute = Object(_interval_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function(date) {\n  date.setUTCSeconds(0, 0);\n}, function(date, step) {\n  date.setTime(+date + step * _duration_js__WEBPACK_IMPORTED_MODULE_1__[\"durationMinute\"]);\n}, function(start, end) {\n  return (end - start) / _duration_js__WEBPACK_IMPORTED_MODULE_1__[\"durationMinute\"];\n}, function(date) {\n  return date.getUTCMinutes();\n});\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (utcMinute);\nvar utcMinutes = utcMinute.range;\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-time/src/utcMonth.js\":\n/*!**********************************************!*\\\n  !*** ./node_modules/d3-time/src/utcMonth.js ***!\n  \\**********************************************/\n/*! exports provided: default, utcMonths */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"utcMonths\", function() { return utcMonths; });\n/* harmony import */ var _interval_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./interval.js */ \"./node_modules/d3-time/src/interval.js\");\n\n\nvar utcMonth = Object(_interval_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function(date) {\n  date.setUTCDate(1);\n  date.setUTCHours(0, 0, 0, 0);\n}, function(date, step) {\n  date.setUTCMonth(date.getUTCMonth() + step);\n}, function(start, end) {\n  return end.getUTCMonth() - start.getUTCMonth() + (end.getUTCFullYear() - start.getUTCFullYear()) * 12;\n}, function(date) {\n  return date.getUTCMonth();\n});\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (utcMonth);\nvar utcMonths = utcMonth.range;\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-time/src/utcWeek.js\":\n/*!*********************************************!*\\\n  !*** ./node_modules/d3-time/src/utcWeek.js ***!\n  \\*********************************************/\n/*! exports provided: utcSunday, utcMonday, utcTuesday, utcWednesday, utcThursday, utcFriday, utcSaturday, utcSundays, utcMondays, utcTuesdays, utcWednesdays, utcThursdays, utcFridays, utcSaturdays */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"utcSunday\", function() { return utcSunday; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"utcMonday\", function() { return utcMonday; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"utcTuesday\", function() { return utcTuesday; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"utcWednesday\", function() { return utcWednesday; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"utcThursday\", function() { return utcThursday; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"utcFriday\", function() { return utcFriday; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"utcSaturday\", function() { return utcSaturday; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"utcSundays\", function() { return utcSundays; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"utcMondays\", function() { return utcMondays; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"utcTuesdays\", function() { return utcTuesdays; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"utcWednesdays\", function() { return utcWednesdays; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"utcThursdays\", function() { return utcThursdays; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"utcFridays\", function() { return utcFridays; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"utcSaturdays\", function() { return utcSaturdays; });\n/* harmony import */ var _interval_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./interval.js */ \"./node_modules/d3-time/src/interval.js\");\n/* harmony import */ var _duration_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./duration.js */ \"./node_modules/d3-time/src/duration.js\");\n\n\n\nfunction utcWeekday(i) {\n  return Object(_interval_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function(date) {\n    date.setUTCDate(date.getUTCDate() - (date.getUTCDay() + 7 - i) % 7);\n    date.setUTCHours(0, 0, 0, 0);\n  }, function(date, step) {\n    date.setUTCDate(date.getUTCDate() + step * 7);\n  }, function(start, end) {\n    return (end - start) / _duration_js__WEBPACK_IMPORTED_MODULE_1__[\"durationWeek\"];\n  });\n}\n\nvar utcSunday = utcWeekday(0);\nvar utcMonday = utcWeekday(1);\nvar utcTuesday = utcWeekday(2);\nvar utcWednesday = utcWeekday(3);\nvar utcThursday = utcWeekday(4);\nvar utcFriday = utcWeekday(5);\nvar utcSaturday = utcWeekday(6);\n\nvar utcSundays = utcSunday.range;\nvar utcMondays = utcMonday.range;\nvar utcTuesdays = utcTuesday.range;\nvar utcWednesdays = utcWednesday.range;\nvar utcThursdays = utcThursday.range;\nvar utcFridays = utcFriday.range;\nvar utcSaturdays = utcSaturday.range;\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-time/src/utcYear.js\":\n/*!*********************************************!*\\\n  !*** ./node_modules/d3-time/src/utcYear.js ***!\n  \\*********************************************/\n/*! exports provided: default, utcYears */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"utcYears\", function() { return utcYears; });\n/* harmony import */ var _interval_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./interval.js */ \"./node_modules/d3-time/src/interval.js\");\n\n\nvar utcYear = Object(_interval_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function(date) {\n  date.setUTCMonth(0, 1);\n  date.setUTCHours(0, 0, 0, 0);\n}, function(date, step) {\n  date.setUTCFullYear(date.getUTCFullYear() + step);\n}, function(start, end) {\n  return end.getUTCFullYear() - start.getUTCFullYear();\n}, function(date) {\n  return date.getUTCFullYear();\n});\n\n// An optimized implementation for this simple case.\nutcYear.every = function(k) {\n  return !isFinite(k = Math.floor(k)) || !(k > 0) ? null : Object(_interval_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function(date) {\n    date.setUTCFullYear(Math.floor(date.getUTCFullYear() / k) * k);\n    date.setUTCMonth(0, 1);\n    date.setUTCHours(0, 0, 0, 0);\n  }, function(date, step) {\n    date.setUTCFullYear(date.getUTCFullYear() + step * k);\n  });\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (utcYear);\nvar utcYears = utcYear.range;\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-time/src/week.js\":\n/*!******************************************!*\\\n  !*** ./node_modules/d3-time/src/week.js ***!\n  \\******************************************/\n/*! exports provided: sunday, monday, tuesday, wednesday, thursday, friday, saturday, sundays, mondays, tuesdays, wednesdays, thursdays, fridays, saturdays */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"sunday\", function() { return sunday; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"monday\", function() { return monday; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"tuesday\", function() { return tuesday; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"wednesday\", function() { return wednesday; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"thursday\", function() { return thursday; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"friday\", function() { return friday; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"saturday\", function() { return saturday; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"sundays\", function() { return sundays; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"mondays\", function() { return mondays; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"tuesdays\", function() { return tuesdays; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"wednesdays\", function() { return wednesdays; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"thursdays\", function() { return thursdays; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"fridays\", function() { return fridays; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"saturdays\", function() { return saturdays; });\n/* harmony import */ var _interval_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./interval.js */ \"./node_modules/d3-time/src/interval.js\");\n/* harmony import */ var _duration_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./duration.js */ \"./node_modules/d3-time/src/duration.js\");\n\n\n\nfunction weekday(i) {\n  return Object(_interval_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function(date) {\n    date.setDate(date.getDate() - (date.getDay() + 7 - i) % 7);\n    date.setHours(0, 0, 0, 0);\n  }, function(date, step) {\n    date.setDate(date.getDate() + step * 7);\n  }, function(start, end) {\n    return (end - start - (end.getTimezoneOffset() - start.getTimezoneOffset()) * _duration_js__WEBPACK_IMPORTED_MODULE_1__[\"durationMinute\"]) / _duration_js__WEBPACK_IMPORTED_MODULE_1__[\"durationWeek\"];\n  });\n}\n\nvar sunday = weekday(0);\nvar monday = weekday(1);\nvar tuesday = weekday(2);\nvar wednesday = weekday(3);\nvar thursday = weekday(4);\nvar friday = weekday(5);\nvar saturday = weekday(6);\n\nvar sundays = sunday.range;\nvar mondays = monday.range;\nvar tuesdays = tuesday.range;\nvar wednesdays = wednesday.range;\nvar thursdays = thursday.range;\nvar fridays = friday.range;\nvar saturdays = saturday.range;\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-time/src/year.js\":\n/*!******************************************!*\\\n  !*** ./node_modules/d3-time/src/year.js ***!\n  \\******************************************/\n/*! exports provided: default, years */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"years\", function() { return years; });\n/* harmony import */ var _interval_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./interval.js */ \"./node_modules/d3-time/src/interval.js\");\n\n\nvar year = Object(_interval_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function(date) {\n  date.setMonth(0, 1);\n  date.setHours(0, 0, 0, 0);\n}, function(date, step) {\n  date.setFullYear(date.getFullYear() + step);\n}, function(start, end) {\n  return end.getFullYear() - start.getFullYear();\n}, function(date) {\n  return date.getFullYear();\n});\n\n// An optimized implementation for this simple case.\nyear.every = function(k) {\n  return !isFinite(k = Math.floor(k)) || !(k > 0) ? null : Object(_interval_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function(date) {\n    date.setFullYear(Math.floor(date.getFullYear() / k) * k);\n    date.setMonth(0, 1);\n    date.setHours(0, 0, 0, 0);\n  }, function(date, step) {\n    date.setFullYear(date.getFullYear() + step * k);\n  });\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (year);\nvar years = year.range;\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-timer/src/index.js\":\n/*!********************************************!*\\\n  !*** ./node_modules/d3-timer/src/index.js ***!\n  \\********************************************/\n/*! exports provided: now, timer, timerFlush, timeout, interval */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _timer_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./timer.js */ \"./node_modules/d3-timer/src/timer.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"now\", function() { return _timer_js__WEBPACK_IMPORTED_MODULE_0__[\"now\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timer\", function() { return _timer_js__WEBPACK_IMPORTED_MODULE_0__[\"timer\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timerFlush\", function() { return _timer_js__WEBPACK_IMPORTED_MODULE_0__[\"timerFlush\"]; });\n\n/* harmony import */ var _timeout_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./timeout.js */ \"./node_modules/d3-timer/src/timeout.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeout\", function() { return _timeout_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"]; });\n\n/* harmony import */ var _interval_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./interval.js */ \"./node_modules/d3-timer/src/interval.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interval\", function() { return _interval_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"]; });\n\n\n\n\n\n\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-timer/src/interval.js\":\n/*!***********************************************!*\\\n  !*** ./node_modules/d3-timer/src/interval.js ***!\n  \\***********************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _timer_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./timer.js */ \"./node_modules/d3-timer/src/timer.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(callback, delay, time) {\n  var t = new _timer_js__WEBPACK_IMPORTED_MODULE_0__[\"Timer\"], total = delay;\n  if (delay == null) return t.restart(callback, delay, time), t;\n  delay = +delay, time = time == null ? Object(_timer_js__WEBPACK_IMPORTED_MODULE_0__[\"now\"])() : +time;\n  t.restart(function tick(elapsed) {\n    elapsed += total;\n    t.restart(tick, total += delay, time);\n    callback(elapsed);\n  }, delay, time);\n  return t;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-timer/src/timeout.js\":\n/*!**********************************************!*\\\n  !*** ./node_modules/d3-timer/src/timeout.js ***!\n  \\**********************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _timer_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./timer.js */ \"./node_modules/d3-timer/src/timer.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(callback, delay, time) {\n  var t = new _timer_js__WEBPACK_IMPORTED_MODULE_0__[\"Timer\"];\n  delay = delay == null ? 0 : +delay;\n  t.restart(function(elapsed) {\n    t.stop();\n    callback(elapsed + delay);\n  }, delay, time);\n  return t;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-timer/src/timer.js\":\n/*!********************************************!*\\\n  !*** ./node_modules/d3-timer/src/timer.js ***!\n  \\********************************************/\n/*! exports provided: now, Timer, timer, timerFlush */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"now\", function() { return now; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Timer\", function() { return Timer; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"timer\", function() { return timer; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"timerFlush\", function() { return timerFlush; });\nvar frame = 0, // is an animation frame pending?\n    timeout = 0, // is a timeout pending?\n    interval = 0, // are any timers active?\n    pokeDelay = 1000, // how frequently we check for clock skew\n    taskHead,\n    taskTail,\n    clockLast = 0,\n    clockNow = 0,\n    clockSkew = 0,\n    clock = typeof performance === \"object\" && performance.now ? performance : Date,\n    setFrame = typeof window === \"object\" && window.requestAnimationFrame ? window.requestAnimationFrame.bind(window) : function(f) { setTimeout(f, 17); };\n\nfunction now() {\n  return clockNow || (setFrame(clearNow), clockNow = clock.now() + clockSkew);\n}\n\nfunction clearNow() {\n  clockNow = 0;\n}\n\nfunction Timer() {\n  this._call =\n  this._time =\n  this._next = null;\n}\n\nTimer.prototype = timer.prototype = {\n  constructor: Timer,\n  restart: function(callback, delay, time) {\n    if (typeof callback !== \"function\") throw new TypeError(\"callback is not a function\");\n    time = (time == null ? now() : +time) + (delay == null ? 0 : +delay);\n    if (!this._next && taskTail !== this) {\n      if (taskTail) taskTail._next = this;\n      else taskHead = this;\n      taskTail = this;\n    }\n    this._call = callback;\n    this._time = time;\n    sleep();\n  },\n  stop: function() {\n    if (this._call) {\n      this._call = null;\n      this._time = Infinity;\n      sleep();\n    }\n  }\n};\n\nfunction timer(callback, delay, time) {\n  var t = new Timer;\n  t.restart(callback, delay, time);\n  return t;\n}\n\nfunction timerFlush() {\n  now(); // Get the current time, if not already set.\n  ++frame; // Pretend we’ve set an alarm, if we haven’t already.\n  var t = taskHead, e;\n  while (t) {\n    if ((e = clockNow - t._time) >= 0) t._call.call(null, e);\n    t = t._next;\n  }\n  --frame;\n}\n\nfunction wake() {\n  clockNow = (clockLast = clock.now()) + clockSkew;\n  frame = timeout = 0;\n  try {\n    timerFlush();\n  } finally {\n    frame = 0;\n    nap();\n    clockNow = 0;\n  }\n}\n\nfunction poke() {\n  var now = clock.now(), delay = now - clockLast;\n  if (delay > pokeDelay) clockSkew -= delay, clockLast = now;\n}\n\nfunction nap() {\n  var t0, t1 = taskHead, t2, time = Infinity;\n  while (t1) {\n    if (t1._call) {\n      if (time > t1._time) time = t1._time;\n      t0 = t1, t1 = t1._next;\n    } else {\n      t2 = t1._next, t1._next = null;\n      t1 = t0 ? t0._next = t2 : taskHead = t2;\n    }\n  }\n  taskTail = t0;\n  sleep(time);\n}\n\nfunction sleep(time) {\n  if (frame) return; // Soonest alarm already set, or will be.\n  if (timeout) timeout = clearTimeout(timeout);\n  var delay = time - clockNow; // Strictly less than if we recomputed clockNow.\n  if (delay > 24) {\n    if (time < Infinity) timeout = setTimeout(wake, time - clock.now() - clockSkew);\n    if (interval) interval = clearInterval(interval);\n  } else {\n    if (!interval) clockLast = clock.now(), interval = setInterval(poke, pokeDelay);\n    frame = 1, setFrame(wake);\n  }\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-transition/src/active.js\":\n/*!**************************************************!*\\\n  !*** ./node_modules/d3-transition/src/active.js ***!\n  \\**************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _transition_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./transition/index.js */ \"./node_modules/d3-transition/src/transition/index.js\");\n/* harmony import */ var _transition_schedule_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./transition/schedule.js */ \"./node_modules/d3-transition/src/transition/schedule.js\");\n\n\n\nvar root = [null];\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(node, name) {\n  var schedules = node.__transition,\n      schedule,\n      i;\n\n  if (schedules) {\n    name = name == null ? null : name + \"\";\n    for (i in schedules) {\n      if ((schedule = schedules[i]).state > _transition_schedule_js__WEBPACK_IMPORTED_MODULE_1__[\"SCHEDULED\"] && schedule.name === name) {\n        return new _transition_index_js__WEBPACK_IMPORTED_MODULE_0__[\"Transition\"]([[node]], root, name, +i);\n      }\n    }\n  }\n\n  return null;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-transition/src/index.js\":\n/*!*************************************************!*\\\n  !*** ./node_modules/d3-transition/src/index.js ***!\n  \\*************************************************/\n/*! exports provided: transition, active, interrupt */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _selection_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./selection/index.js */ \"./node_modules/d3-transition/src/selection/index.js\");\n/* harmony import */ var _transition_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./transition/index.js */ \"./node_modules/d3-transition/src/transition/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"transition\", function() { return _transition_index_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"]; });\n\n/* harmony import */ var _active_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./active.js */ \"./node_modules/d3-transition/src/active.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"active\", function() { return _active_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"]; });\n\n/* harmony import */ var _interrupt_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./interrupt.js */ \"./node_modules/d3-transition/src/interrupt.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interrupt\", function() { return _interrupt_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"]; });\n\n\n\n\n\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-transition/src/interrupt.js\":\n/*!*****************************************************!*\\\n  !*** ./node_modules/d3-transition/src/interrupt.js ***!\n  \\*****************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _transition_schedule_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./transition/schedule.js */ \"./node_modules/d3-transition/src/transition/schedule.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(node, name) {\n  var schedules = node.__transition,\n      schedule,\n      active,\n      empty = true,\n      i;\n\n  if (!schedules) return;\n\n  name = name == null ? null : name + \"\";\n\n  for (i in schedules) {\n    if ((schedule = schedules[i]).name !== name) { empty = false; continue; }\n    active = schedule.state > _transition_schedule_js__WEBPACK_IMPORTED_MODULE_0__[\"STARTING\"] && schedule.state < _transition_schedule_js__WEBPACK_IMPORTED_MODULE_0__[\"ENDING\"];\n    schedule.state = _transition_schedule_js__WEBPACK_IMPORTED_MODULE_0__[\"ENDED\"];\n    schedule.timer.stop();\n    schedule.on.call(active ? \"interrupt\" : \"cancel\", node, node.__data__, schedule.index, schedule.group);\n    delete schedules[i];\n  }\n\n  if (empty) delete node.__transition;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-transition/src/selection/index.js\":\n/*!***********************************************************!*\\\n  !*** ./node_modules/d3-transition/src/selection/index.js ***!\n  \\***********************************************************/\n/*! no exports provided */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var d3_selection__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-selection */ \"./node_modules/d3-selection/src/index.js\");\n/* harmony import */ var _interrupt_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./interrupt.js */ \"./node_modules/d3-transition/src/selection/interrupt.js\");\n/* harmony import */ var _transition_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./transition.js */ \"./node_modules/d3-transition/src/selection/transition.js\");\n\n\n\n\nd3_selection__WEBPACK_IMPORTED_MODULE_0__[\"selection\"].prototype.interrupt = _interrupt_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"];\nd3_selection__WEBPACK_IMPORTED_MODULE_0__[\"selection\"].prototype.transition = _transition_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"];\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-transition/src/selection/interrupt.js\":\n/*!***************************************************************!*\\\n  !*** ./node_modules/d3-transition/src/selection/interrupt.js ***!\n  \\***************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _interrupt_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../interrupt.js */ \"./node_modules/d3-transition/src/interrupt.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(name) {\n  return this.each(function() {\n    Object(_interrupt_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(this, name);\n  });\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-transition/src/selection/transition.js\":\n/*!****************************************************************!*\\\n  !*** ./node_modules/d3-transition/src/selection/transition.js ***!\n  \\****************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _transition_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../transition/index.js */ \"./node_modules/d3-transition/src/transition/index.js\");\n/* harmony import */ var _transition_schedule_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../transition/schedule.js */ \"./node_modules/d3-transition/src/transition/schedule.js\");\n/* harmony import */ var d3_ease__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! d3-ease */ \"./node_modules/d3-ease/src/index.js\");\n/* harmony import */ var d3_timer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! d3-timer */ \"./node_modules/d3-timer/src/index.js\");\n\n\n\n\n\nvar defaultTiming = {\n  time: null, // Set on use.\n  delay: 0,\n  duration: 250,\n  ease: d3_ease__WEBPACK_IMPORTED_MODULE_2__[\"easeCubicInOut\"]\n};\n\nfunction inherit(node, id) {\n  var timing;\n  while (!(timing = node.__transition) || !(timing = timing[id])) {\n    if (!(node = node.parentNode)) {\n      return defaultTiming.time = Object(d3_timer__WEBPACK_IMPORTED_MODULE_3__[\"now\"])(), defaultTiming;\n    }\n  }\n  return timing;\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(name) {\n  var id,\n      timing;\n\n  if (name instanceof _transition_index_js__WEBPACK_IMPORTED_MODULE_0__[\"Transition\"]) {\n    id = name._id, name = name._name;\n  } else {\n    id = Object(_transition_index_js__WEBPACK_IMPORTED_MODULE_0__[\"newId\"])(), (timing = defaultTiming).time = Object(d3_timer__WEBPACK_IMPORTED_MODULE_3__[\"now\"])(), name = name == null ? null : name + \"\";\n  }\n\n  for (var groups = this._groups, m = groups.length, j = 0; j < m; ++j) {\n    for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) {\n      if (node = group[i]) {\n        Object(_transition_schedule_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(node, name, id, i, group, timing || inherit(node, id));\n      }\n    }\n  }\n\n  return new _transition_index_js__WEBPACK_IMPORTED_MODULE_0__[\"Transition\"](groups, this._parents, name, id);\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-transition/src/transition/attr.js\":\n/*!***********************************************************!*\\\n  !*** ./node_modules/d3-transition/src/transition/attr.js ***!\n  \\***********************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var d3_interpolate__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-interpolate */ \"./node_modules/d3-interpolate/src/index.js\");\n/* harmony import */ var d3_selection__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! d3-selection */ \"./node_modules/d3-selection/src/index.js\");\n/* harmony import */ var _tween_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./tween.js */ \"./node_modules/d3-transition/src/transition/tween.js\");\n/* harmony import */ var _interpolate_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./interpolate.js */ \"./node_modules/d3-transition/src/transition/interpolate.js\");\n\n\n\n\n\nfunction attrRemove(name) {\n  return function() {\n    this.removeAttribute(name);\n  };\n}\n\nfunction attrRemoveNS(fullname) {\n  return function() {\n    this.removeAttributeNS(fullname.space, fullname.local);\n  };\n}\n\nfunction attrConstant(name, interpolate, value1) {\n  var string00,\n      string1 = value1 + \"\",\n      interpolate0;\n  return function() {\n    var string0 = this.getAttribute(name);\n    return string0 === string1 ? null\n        : string0 === string00 ? interpolate0\n        : interpolate0 = interpolate(string00 = string0, value1);\n  };\n}\n\nfunction attrConstantNS(fullname, interpolate, value1) {\n  var string00,\n      string1 = value1 + \"\",\n      interpolate0;\n  return function() {\n    var string0 = this.getAttributeNS(fullname.space, fullname.local);\n    return string0 === string1 ? null\n        : string0 === string00 ? interpolate0\n        : interpolate0 = interpolate(string00 = string0, value1);\n  };\n}\n\nfunction attrFunction(name, interpolate, value) {\n  var string00,\n      string10,\n      interpolate0;\n  return function() {\n    var string0, value1 = value(this), string1;\n    if (value1 == null) return void this.removeAttribute(name);\n    string0 = this.getAttribute(name);\n    string1 = value1 + \"\";\n    return string0 === string1 ? null\n        : string0 === string00 && string1 === string10 ? interpolate0\n        : (string10 = string1, interpolate0 = interpolate(string00 = string0, value1));\n  };\n}\n\nfunction attrFunctionNS(fullname, interpolate, value) {\n  var string00,\n      string10,\n      interpolate0;\n  return function() {\n    var string0, value1 = value(this), string1;\n    if (value1 == null) return void this.removeAttributeNS(fullname.space, fullname.local);\n    string0 = this.getAttributeNS(fullname.space, fullname.local);\n    string1 = value1 + \"\";\n    return string0 === string1 ? null\n        : string0 === string00 && string1 === string10 ? interpolate0\n        : (string10 = string1, interpolate0 = interpolate(string00 = string0, value1));\n  };\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(name, value) {\n  var fullname = Object(d3_selection__WEBPACK_IMPORTED_MODULE_1__[\"namespace\"])(name), i = fullname === \"transform\" ? d3_interpolate__WEBPACK_IMPORTED_MODULE_0__[\"interpolateTransformSvg\"] : _interpolate_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"];\n  return this.attrTween(name, typeof value === \"function\"\n      ? (fullname.local ? attrFunctionNS : attrFunction)(fullname, i, Object(_tween_js__WEBPACK_IMPORTED_MODULE_2__[\"tweenValue\"])(this, \"attr.\" + name, value))\n      : value == null ? (fullname.local ? attrRemoveNS : attrRemove)(fullname)\n      : (fullname.local ? attrConstantNS : attrConstant)(fullname, i, value));\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-transition/src/transition/attrTween.js\":\n/*!****************************************************************!*\\\n  !*** ./node_modules/d3-transition/src/transition/attrTween.js ***!\n  \\****************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var d3_selection__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-selection */ \"./node_modules/d3-selection/src/index.js\");\n\n\nfunction attrInterpolate(name, i) {\n  return function(t) {\n    this.setAttribute(name, i.call(this, t));\n  };\n}\n\nfunction attrInterpolateNS(fullname, i) {\n  return function(t) {\n    this.setAttributeNS(fullname.space, fullname.local, i.call(this, t));\n  };\n}\n\nfunction attrTweenNS(fullname, value) {\n  var t0, i0;\n  function tween() {\n    var i = value.apply(this, arguments);\n    if (i !== i0) t0 = (i0 = i) && attrInterpolateNS(fullname, i);\n    return t0;\n  }\n  tween._value = value;\n  return tween;\n}\n\nfunction attrTween(name, value) {\n  var t0, i0;\n  function tween() {\n    var i = value.apply(this, arguments);\n    if (i !== i0) t0 = (i0 = i) && attrInterpolate(name, i);\n    return t0;\n  }\n  tween._value = value;\n  return tween;\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(name, value) {\n  var key = \"attr.\" + name;\n  if (arguments.length < 2) return (key = this.tween(key)) && key._value;\n  if (value == null) return this.tween(key, null);\n  if (typeof value !== \"function\") throw new Error;\n  var fullname = Object(d3_selection__WEBPACK_IMPORTED_MODULE_0__[\"namespace\"])(name);\n  return this.tween(key, (fullname.local ? attrTweenNS : attrTween)(fullname, value));\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-transition/src/transition/delay.js\":\n/*!************************************************************!*\\\n  !*** ./node_modules/d3-transition/src/transition/delay.js ***!\n  \\************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _schedule_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./schedule.js */ \"./node_modules/d3-transition/src/transition/schedule.js\");\n\n\nfunction delayFunction(id, value) {\n  return function() {\n    Object(_schedule_js__WEBPACK_IMPORTED_MODULE_0__[\"init\"])(this, id).delay = +value.apply(this, arguments);\n  };\n}\n\nfunction delayConstant(id, value) {\n  return value = +value, function() {\n    Object(_schedule_js__WEBPACK_IMPORTED_MODULE_0__[\"init\"])(this, id).delay = value;\n  };\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(value) {\n  var id = this._id;\n\n  return arguments.length\n      ? this.each((typeof value === \"function\"\n          ? delayFunction\n          : delayConstant)(id, value))\n      : Object(_schedule_js__WEBPACK_IMPORTED_MODULE_0__[\"get\"])(this.node(), id).delay;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-transition/src/transition/duration.js\":\n/*!***************************************************************!*\\\n  !*** ./node_modules/d3-transition/src/transition/duration.js ***!\n  \\***************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _schedule_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./schedule.js */ \"./node_modules/d3-transition/src/transition/schedule.js\");\n\n\nfunction durationFunction(id, value) {\n  return function() {\n    Object(_schedule_js__WEBPACK_IMPORTED_MODULE_0__[\"set\"])(this, id).duration = +value.apply(this, arguments);\n  };\n}\n\nfunction durationConstant(id, value) {\n  return value = +value, function() {\n    Object(_schedule_js__WEBPACK_IMPORTED_MODULE_0__[\"set\"])(this, id).duration = value;\n  };\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(value) {\n  var id = this._id;\n\n  return arguments.length\n      ? this.each((typeof value === \"function\"\n          ? durationFunction\n          : durationConstant)(id, value))\n      : Object(_schedule_js__WEBPACK_IMPORTED_MODULE_0__[\"get\"])(this.node(), id).duration;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-transition/src/transition/ease.js\":\n/*!***********************************************************!*\\\n  !*** ./node_modules/d3-transition/src/transition/ease.js ***!\n  \\***********************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _schedule_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./schedule.js */ \"./node_modules/d3-transition/src/transition/schedule.js\");\n\n\nfunction easeConstant(id, value) {\n  if (typeof value !== \"function\") throw new Error;\n  return function() {\n    Object(_schedule_js__WEBPACK_IMPORTED_MODULE_0__[\"set\"])(this, id).ease = value;\n  };\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(value) {\n  var id = this._id;\n\n  return arguments.length\n      ? this.each(easeConstant(id, value))\n      : Object(_schedule_js__WEBPACK_IMPORTED_MODULE_0__[\"get\"])(this.node(), id).ease;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-transition/src/transition/end.js\":\n/*!**********************************************************!*\\\n  !*** ./node_modules/d3-transition/src/transition/end.js ***!\n  \\**********************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _schedule_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./schedule.js */ \"./node_modules/d3-transition/src/transition/schedule.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  var on0, on1, that = this, id = that._id, size = that.size();\n  return new Promise(function(resolve, reject) {\n    var cancel = {value: reject},\n        end = {value: function() { if (--size === 0) resolve(); }};\n\n    that.each(function() {\n      var schedule = Object(_schedule_js__WEBPACK_IMPORTED_MODULE_0__[\"set\"])(this, id),\n          on = schedule.on;\n\n      // If this node shared a dispatch with the previous node,\n      // just assign the updated shared dispatch and we’re done!\n      // Otherwise, copy-on-write.\n      if (on !== on0) {\n        on1 = (on0 = on).copy();\n        on1._.cancel.push(cancel);\n        on1._.interrupt.push(cancel);\n        on1._.end.push(end);\n      }\n\n      schedule.on = on1;\n    });\n  });\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-transition/src/transition/filter.js\":\n/*!*************************************************************!*\\\n  !*** ./node_modules/d3-transition/src/transition/filter.js ***!\n  \\*************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var d3_selection__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-selection */ \"./node_modules/d3-selection/src/index.js\");\n/* harmony import */ var _index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./index.js */ \"./node_modules/d3-transition/src/transition/index.js\");\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(match) {\n  if (typeof match !== \"function\") match = Object(d3_selection__WEBPACK_IMPORTED_MODULE_0__[\"matcher\"])(match);\n\n  for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {\n    for (var group = groups[j], n = group.length, subgroup = subgroups[j] = [], node, i = 0; i < n; ++i) {\n      if ((node = group[i]) && match.call(node, node.__data__, i, group)) {\n        subgroup.push(node);\n      }\n    }\n  }\n\n  return new _index_js__WEBPACK_IMPORTED_MODULE_1__[\"Transition\"](subgroups, this._parents, this._name, this._id);\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-transition/src/transition/index.js\":\n/*!************************************************************!*\\\n  !*** ./node_modules/d3-transition/src/transition/index.js ***!\n  \\************************************************************/\n/*! exports provided: Transition, default, newId */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Transition\", function() { return Transition; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return transition; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"newId\", function() { return newId; });\n/* harmony import */ var d3_selection__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-selection */ \"./node_modules/d3-selection/src/index.js\");\n/* harmony import */ var _attr_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./attr.js */ \"./node_modules/d3-transition/src/transition/attr.js\");\n/* harmony import */ var _attrTween_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./attrTween.js */ \"./node_modules/d3-transition/src/transition/attrTween.js\");\n/* harmony import */ var _delay_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./delay.js */ \"./node_modules/d3-transition/src/transition/delay.js\");\n/* harmony import */ var _duration_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./duration.js */ \"./node_modules/d3-transition/src/transition/duration.js\");\n/* harmony import */ var _ease_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./ease.js */ \"./node_modules/d3-transition/src/transition/ease.js\");\n/* harmony import */ var _filter_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./filter.js */ \"./node_modules/d3-transition/src/transition/filter.js\");\n/* harmony import */ var _merge_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./merge.js */ \"./node_modules/d3-transition/src/transition/merge.js\");\n/* harmony import */ var _on_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./on.js */ \"./node_modules/d3-transition/src/transition/on.js\");\n/* harmony import */ var _remove_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./remove.js */ \"./node_modules/d3-transition/src/transition/remove.js\");\n/* harmony import */ var _select_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./select.js */ \"./node_modules/d3-transition/src/transition/select.js\");\n/* harmony import */ var _selectAll_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./selectAll.js */ \"./node_modules/d3-transition/src/transition/selectAll.js\");\n/* harmony import */ var _selection_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./selection.js */ \"./node_modules/d3-transition/src/transition/selection.js\");\n/* harmony import */ var _style_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./style.js */ \"./node_modules/d3-transition/src/transition/style.js\");\n/* harmony import */ var _styleTween_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./styleTween.js */ \"./node_modules/d3-transition/src/transition/styleTween.js\");\n/* harmony import */ var _text_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./text.js */ \"./node_modules/d3-transition/src/transition/text.js\");\n/* harmony import */ var _textTween_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./textTween.js */ \"./node_modules/d3-transition/src/transition/textTween.js\");\n/* harmony import */ var _transition_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./transition.js */ \"./node_modules/d3-transition/src/transition/transition.js\");\n/* harmony import */ var _tween_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./tween.js */ \"./node_modules/d3-transition/src/transition/tween.js\");\n/* harmony import */ var _end_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./end.js */ \"./node_modules/d3-transition/src/transition/end.js\");\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nvar id = 0;\n\nfunction Transition(groups, parents, name, id) {\n  this._groups = groups;\n  this._parents = parents;\n  this._name = name;\n  this._id = id;\n}\n\nfunction transition(name) {\n  return Object(d3_selection__WEBPACK_IMPORTED_MODULE_0__[\"selection\"])().transition(name);\n}\n\nfunction newId() {\n  return ++id;\n}\n\nvar selection_prototype = d3_selection__WEBPACK_IMPORTED_MODULE_0__[\"selection\"].prototype;\n\nTransition.prototype = transition.prototype = {\n  constructor: Transition,\n  select: _select_js__WEBPACK_IMPORTED_MODULE_10__[\"default\"],\n  selectAll: _selectAll_js__WEBPACK_IMPORTED_MODULE_11__[\"default\"],\n  filter: _filter_js__WEBPACK_IMPORTED_MODULE_6__[\"default\"],\n  merge: _merge_js__WEBPACK_IMPORTED_MODULE_7__[\"default\"],\n  selection: _selection_js__WEBPACK_IMPORTED_MODULE_12__[\"default\"],\n  transition: _transition_js__WEBPACK_IMPORTED_MODULE_17__[\"default\"],\n  call: selection_prototype.call,\n  nodes: selection_prototype.nodes,\n  node: selection_prototype.node,\n  size: selection_prototype.size,\n  empty: selection_prototype.empty,\n  each: selection_prototype.each,\n  on: _on_js__WEBPACK_IMPORTED_MODULE_8__[\"default\"],\n  attr: _attr_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"],\n  attrTween: _attrTween_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"],\n  style: _style_js__WEBPACK_IMPORTED_MODULE_13__[\"default\"],\n  styleTween: _styleTween_js__WEBPACK_IMPORTED_MODULE_14__[\"default\"],\n  text: _text_js__WEBPACK_IMPORTED_MODULE_15__[\"default\"],\n  textTween: _textTween_js__WEBPACK_IMPORTED_MODULE_16__[\"default\"],\n  remove: _remove_js__WEBPACK_IMPORTED_MODULE_9__[\"default\"],\n  tween: _tween_js__WEBPACK_IMPORTED_MODULE_18__[\"default\"],\n  delay: _delay_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"],\n  duration: _duration_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"],\n  ease: _ease_js__WEBPACK_IMPORTED_MODULE_5__[\"default\"],\n  end: _end_js__WEBPACK_IMPORTED_MODULE_19__[\"default\"]\n};\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-transition/src/transition/interpolate.js\":\n/*!******************************************************************!*\\\n  !*** ./node_modules/d3-transition/src/transition/interpolate.js ***!\n  \\******************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var d3_color__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-color */ \"./node_modules/d3-color/src/index.js\");\n/* harmony import */ var d3_interpolate__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! d3-interpolate */ \"./node_modules/d3-interpolate/src/index.js\");\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(a, b) {\n  var c;\n  return (typeof b === \"number\" ? d3_interpolate__WEBPACK_IMPORTED_MODULE_1__[\"interpolateNumber\"]\n      : b instanceof d3_color__WEBPACK_IMPORTED_MODULE_0__[\"color\"] ? d3_interpolate__WEBPACK_IMPORTED_MODULE_1__[\"interpolateRgb\"]\n      : (c = Object(d3_color__WEBPACK_IMPORTED_MODULE_0__[\"color\"])(b)) ? (b = c, d3_interpolate__WEBPACK_IMPORTED_MODULE_1__[\"interpolateRgb\"])\n      : d3_interpolate__WEBPACK_IMPORTED_MODULE_1__[\"interpolateString\"])(a, b);\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-transition/src/transition/merge.js\":\n/*!************************************************************!*\\\n  !*** ./node_modules/d3-transition/src/transition/merge.js ***!\n  \\************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./index.js */ \"./node_modules/d3-transition/src/transition/index.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(transition) {\n  if (transition._id !== this._id) throw new Error;\n\n  for (var groups0 = this._groups, groups1 = transition._groups, m0 = groups0.length, m1 = groups1.length, m = Math.min(m0, m1), merges = new Array(m0), j = 0; j < m; ++j) {\n    for (var group0 = groups0[j], group1 = groups1[j], n = group0.length, merge = merges[j] = new Array(n), node, i = 0; i < n; ++i) {\n      if (node = group0[i] || group1[i]) {\n        merge[i] = node;\n      }\n    }\n  }\n\n  for (; j < m0; ++j) {\n    merges[j] = groups0[j];\n  }\n\n  return new _index_js__WEBPACK_IMPORTED_MODULE_0__[\"Transition\"](merges, this._parents, this._name, this._id);\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-transition/src/transition/on.js\":\n/*!*********************************************************!*\\\n  !*** ./node_modules/d3-transition/src/transition/on.js ***!\n  \\*********************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _schedule_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./schedule.js */ \"./node_modules/d3-transition/src/transition/schedule.js\");\n\n\nfunction start(name) {\n  return (name + \"\").trim().split(/^|\\s+/).every(function(t) {\n    var i = t.indexOf(\".\");\n    if (i >= 0) t = t.slice(0, i);\n    return !t || t === \"start\";\n  });\n}\n\nfunction onFunction(id, name, listener) {\n  var on0, on1, sit = start(name) ? _schedule_js__WEBPACK_IMPORTED_MODULE_0__[\"init\"] : _schedule_js__WEBPACK_IMPORTED_MODULE_0__[\"set\"];\n  return function() {\n    var schedule = sit(this, id),\n        on = schedule.on;\n\n    // If this node shared a dispatch with the previous node,\n    // just assign the updated shared dispatch and we’re done!\n    // Otherwise, copy-on-write.\n    if (on !== on0) (on1 = (on0 = on).copy()).on(name, listener);\n\n    schedule.on = on1;\n  };\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(name, listener) {\n  var id = this._id;\n\n  return arguments.length < 2\n      ? Object(_schedule_js__WEBPACK_IMPORTED_MODULE_0__[\"get\"])(this.node(), id).on.on(name)\n      : this.each(onFunction(id, name, listener));\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-transition/src/transition/remove.js\":\n/*!*************************************************************!*\\\n  !*** ./node_modules/d3-transition/src/transition/remove.js ***!\n  \\*************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\nfunction removeFunction(id) {\n  return function() {\n    var parent = this.parentNode;\n    for (var i in this.__transition) if (+i !== id) return;\n    if (parent) parent.removeChild(this);\n  };\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  return this.on(\"end.remove\", removeFunction(this._id));\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-transition/src/transition/schedule.js\":\n/*!***************************************************************!*\\\n  !*** ./node_modules/d3-transition/src/transition/schedule.js ***!\n  \\***************************************************************/\n/*! exports provided: CREATED, SCHEDULED, STARTING, STARTED, RUNNING, ENDING, ENDED, default, init, set, get */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"CREATED\", function() { return CREATED; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"SCHEDULED\", function() { return SCHEDULED; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"STARTING\", function() { return STARTING; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"STARTED\", function() { return STARTED; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"RUNNING\", function() { return RUNNING; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"ENDING\", function() { return ENDING; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"ENDED\", function() { return ENDED; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"init\", function() { return init; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"set\", function() { return set; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"get\", function() { return get; });\n/* harmony import */ var d3_dispatch__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-dispatch */ \"./node_modules/d3-dispatch/src/index.js\");\n/* harmony import */ var d3_timer__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! d3-timer */ \"./node_modules/d3-timer/src/index.js\");\n\n\n\nvar emptyOn = Object(d3_dispatch__WEBPACK_IMPORTED_MODULE_0__[\"dispatch\"])(\"start\", \"end\", \"cancel\", \"interrupt\");\nvar emptyTween = [];\n\nvar CREATED = 0;\nvar SCHEDULED = 1;\nvar STARTING = 2;\nvar STARTED = 3;\nvar RUNNING = 4;\nvar ENDING = 5;\nvar ENDED = 6;\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(node, name, id, index, group, timing) {\n  var schedules = node.__transition;\n  if (!schedules) node.__transition = {};\n  else if (id in schedules) return;\n  create(node, id, {\n    name: name,\n    index: index, // For context during callback.\n    group: group, // For context during callback.\n    on: emptyOn,\n    tween: emptyTween,\n    time: timing.time,\n    delay: timing.delay,\n    duration: timing.duration,\n    ease: timing.ease,\n    timer: null,\n    state: CREATED\n  });\n});\n\nfunction init(node, id) {\n  var schedule = get(node, id);\n  if (schedule.state > CREATED) throw new Error(\"too late; already scheduled\");\n  return schedule;\n}\n\nfunction set(node, id) {\n  var schedule = get(node, id);\n  if (schedule.state > STARTED) throw new Error(\"too late; already running\");\n  return schedule;\n}\n\nfunction get(node, id) {\n  var schedule = node.__transition;\n  if (!schedule || !(schedule = schedule[id])) throw new Error(\"transition not found\");\n  return schedule;\n}\n\nfunction create(node, id, self) {\n  var schedules = node.__transition,\n      tween;\n\n  // Initialize the self timer when the transition is created.\n  // Note the actual delay is not known until the first callback!\n  schedules[id] = self;\n  self.timer = Object(d3_timer__WEBPACK_IMPORTED_MODULE_1__[\"timer\"])(schedule, 0, self.time);\n\n  function schedule(elapsed) {\n    self.state = SCHEDULED;\n    self.timer.restart(start, self.delay, self.time);\n\n    // If the elapsed delay is less than our first sleep, start immediately.\n    if (self.delay <= elapsed) start(elapsed - self.delay);\n  }\n\n  function start(elapsed) {\n    var i, j, n, o;\n\n    // If the state is not SCHEDULED, then we previously errored on start.\n    if (self.state !== SCHEDULED) return stop();\n\n    for (i in schedules) {\n      o = schedules[i];\n      if (o.name !== self.name) continue;\n\n      // While this element already has a starting transition during this frame,\n      // defer starting an interrupting transition until that transition has a\n      // chance to tick (and possibly end); see d3/d3-transition#54!\n      if (o.state === STARTED) return Object(d3_timer__WEBPACK_IMPORTED_MODULE_1__[\"timeout\"])(start);\n\n      // Interrupt the active transition, if any.\n      if (o.state === RUNNING) {\n        o.state = ENDED;\n        o.timer.stop();\n        o.on.call(\"interrupt\", node, node.__data__, o.index, o.group);\n        delete schedules[i];\n      }\n\n      // Cancel any pre-empted transitions.\n      else if (+i < id) {\n        o.state = ENDED;\n        o.timer.stop();\n        o.on.call(\"cancel\", node, node.__data__, o.index, o.group);\n        delete schedules[i];\n      }\n    }\n\n    // Defer the first tick to end of the current frame; see d3/d3#1576.\n    // Note the transition may be canceled after start and before the first tick!\n    // Note this must be scheduled before the start event; see d3/d3-transition#16!\n    // Assuming this is successful, subsequent callbacks go straight to tick.\n    Object(d3_timer__WEBPACK_IMPORTED_MODULE_1__[\"timeout\"])(function() {\n      if (self.state === STARTED) {\n        self.state = RUNNING;\n        self.timer.restart(tick, self.delay, self.time);\n        tick(elapsed);\n      }\n    });\n\n    // Dispatch the start event.\n    // Note this must be done before the tween are initialized.\n    self.state = STARTING;\n    self.on.call(\"start\", node, node.__data__, self.index, self.group);\n    if (self.state !== STARTING) return; // interrupted\n    self.state = STARTED;\n\n    // Initialize the tween, deleting null tween.\n    tween = new Array(n = self.tween.length);\n    for (i = 0, j = -1; i < n; ++i) {\n      if (o = self.tween[i].value.call(node, node.__data__, self.index, self.group)) {\n        tween[++j] = o;\n      }\n    }\n    tween.length = j + 1;\n  }\n\n  function tick(elapsed) {\n    var t = elapsed < self.duration ? self.ease.call(null, elapsed / self.duration) : (self.timer.restart(stop), self.state = ENDING, 1),\n        i = -1,\n        n = tween.length;\n\n    while (++i < n) {\n      tween[i].call(node, t);\n    }\n\n    // Dispatch the end event.\n    if (self.state === ENDING) {\n      self.on.call(\"end\", node, node.__data__, self.index, self.group);\n      stop();\n    }\n  }\n\n  function stop() {\n    self.state = ENDED;\n    self.timer.stop();\n    delete schedules[id];\n    for (var i in schedules) return; // eslint-disable-line no-unused-vars\n    delete node.__transition;\n  }\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-transition/src/transition/select.js\":\n/*!*************************************************************!*\\\n  !*** ./node_modules/d3-transition/src/transition/select.js ***!\n  \\*************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var d3_selection__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-selection */ \"./node_modules/d3-selection/src/index.js\");\n/* harmony import */ var _index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./index.js */ \"./node_modules/d3-transition/src/transition/index.js\");\n/* harmony import */ var _schedule_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./schedule.js */ \"./node_modules/d3-transition/src/transition/schedule.js\");\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(select) {\n  var name = this._name,\n      id = this._id;\n\n  if (typeof select !== \"function\") select = Object(d3_selection__WEBPACK_IMPORTED_MODULE_0__[\"selector\"])(select);\n\n  for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {\n    for (var group = groups[j], n = group.length, subgroup = subgroups[j] = new Array(n), node, subnode, i = 0; i < n; ++i) {\n      if ((node = group[i]) && (subnode = select.call(node, node.__data__, i, group))) {\n        if (\"__data__\" in node) subnode.__data__ = node.__data__;\n        subgroup[i] = subnode;\n        Object(_schedule_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(subgroup[i], name, id, i, subgroup, Object(_schedule_js__WEBPACK_IMPORTED_MODULE_2__[\"get\"])(node, id));\n      }\n    }\n  }\n\n  return new _index_js__WEBPACK_IMPORTED_MODULE_1__[\"Transition\"](subgroups, this._parents, name, id);\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-transition/src/transition/selectAll.js\":\n/*!****************************************************************!*\\\n  !*** ./node_modules/d3-transition/src/transition/selectAll.js ***!\n  \\****************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var d3_selection__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-selection */ \"./node_modules/d3-selection/src/index.js\");\n/* harmony import */ var _index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./index.js */ \"./node_modules/d3-transition/src/transition/index.js\");\n/* harmony import */ var _schedule_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./schedule.js */ \"./node_modules/d3-transition/src/transition/schedule.js\");\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(select) {\n  var name = this._name,\n      id = this._id;\n\n  if (typeof select !== \"function\") select = Object(d3_selection__WEBPACK_IMPORTED_MODULE_0__[\"selectorAll\"])(select);\n\n  for (var groups = this._groups, m = groups.length, subgroups = [], parents = [], j = 0; j < m; ++j) {\n    for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) {\n      if (node = group[i]) {\n        for (var children = select.call(node, node.__data__, i, group), child, inherit = Object(_schedule_js__WEBPACK_IMPORTED_MODULE_2__[\"get\"])(node, id), k = 0, l = children.length; k < l; ++k) {\n          if (child = children[k]) {\n            Object(_schedule_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(child, name, id, k, children, inherit);\n          }\n        }\n        subgroups.push(children);\n        parents.push(node);\n      }\n    }\n  }\n\n  return new _index_js__WEBPACK_IMPORTED_MODULE_1__[\"Transition\"](subgroups, parents, name, id);\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-transition/src/transition/selection.js\":\n/*!****************************************************************!*\\\n  !*** ./node_modules/d3-transition/src/transition/selection.js ***!\n  \\****************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var d3_selection__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-selection */ \"./node_modules/d3-selection/src/index.js\");\n\n\nvar Selection = d3_selection__WEBPACK_IMPORTED_MODULE_0__[\"selection\"].prototype.constructor;\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  return new Selection(this._groups, this._parents);\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-transition/src/transition/style.js\":\n/*!************************************************************!*\\\n  !*** ./node_modules/d3-transition/src/transition/style.js ***!\n  \\************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var d3_interpolate__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-interpolate */ \"./node_modules/d3-interpolate/src/index.js\");\n/* harmony import */ var d3_selection__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! d3-selection */ \"./node_modules/d3-selection/src/index.js\");\n/* harmony import */ var _schedule_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./schedule.js */ \"./node_modules/d3-transition/src/transition/schedule.js\");\n/* harmony import */ var _tween_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./tween.js */ \"./node_modules/d3-transition/src/transition/tween.js\");\n/* harmony import */ var _interpolate_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./interpolate.js */ \"./node_modules/d3-transition/src/transition/interpolate.js\");\n\n\n\n\n\n\nfunction styleNull(name, interpolate) {\n  var string00,\n      string10,\n      interpolate0;\n  return function() {\n    var string0 = Object(d3_selection__WEBPACK_IMPORTED_MODULE_1__[\"style\"])(this, name),\n        string1 = (this.style.removeProperty(name), Object(d3_selection__WEBPACK_IMPORTED_MODULE_1__[\"style\"])(this, name));\n    return string0 === string1 ? null\n        : string0 === string00 && string1 === string10 ? interpolate0\n        : interpolate0 = interpolate(string00 = string0, string10 = string1);\n  };\n}\n\nfunction styleRemove(name) {\n  return function() {\n    this.style.removeProperty(name);\n  };\n}\n\nfunction styleConstant(name, interpolate, value1) {\n  var string00,\n      string1 = value1 + \"\",\n      interpolate0;\n  return function() {\n    var string0 = Object(d3_selection__WEBPACK_IMPORTED_MODULE_1__[\"style\"])(this, name);\n    return string0 === string1 ? null\n        : string0 === string00 ? interpolate0\n        : interpolate0 = interpolate(string00 = string0, value1);\n  };\n}\n\nfunction styleFunction(name, interpolate, value) {\n  var string00,\n      string10,\n      interpolate0;\n  return function() {\n    var string0 = Object(d3_selection__WEBPACK_IMPORTED_MODULE_1__[\"style\"])(this, name),\n        value1 = value(this),\n        string1 = value1 + \"\";\n    if (value1 == null) string1 = value1 = (this.style.removeProperty(name), Object(d3_selection__WEBPACK_IMPORTED_MODULE_1__[\"style\"])(this, name));\n    return string0 === string1 ? null\n        : string0 === string00 && string1 === string10 ? interpolate0\n        : (string10 = string1, interpolate0 = interpolate(string00 = string0, value1));\n  };\n}\n\nfunction styleMaybeRemove(id, name) {\n  var on0, on1, listener0, key = \"style.\" + name, event = \"end.\" + key, remove;\n  return function() {\n    var schedule = Object(_schedule_js__WEBPACK_IMPORTED_MODULE_2__[\"set\"])(this, id),\n        on = schedule.on,\n        listener = schedule.value[key] == null ? remove || (remove = styleRemove(name)) : undefined;\n\n    // If this node shared a dispatch with the previous node,\n    // just assign the updated shared dispatch and we’re done!\n    // Otherwise, copy-on-write.\n    if (on !== on0 || listener0 !== listener) (on1 = (on0 = on).copy()).on(event, listener0 = listener);\n\n    schedule.on = on1;\n  };\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(name, value, priority) {\n  var i = (name += \"\") === \"transform\" ? d3_interpolate__WEBPACK_IMPORTED_MODULE_0__[\"interpolateTransformCss\"] : _interpolate_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"];\n  return value == null ? this\n      .styleTween(name, styleNull(name, i))\n      .on(\"end.style.\" + name, styleRemove(name))\n    : typeof value === \"function\" ? this\n      .styleTween(name, styleFunction(name, i, Object(_tween_js__WEBPACK_IMPORTED_MODULE_3__[\"tweenValue\"])(this, \"style.\" + name, value)))\n      .each(styleMaybeRemove(this._id, name))\n    : this\n      .styleTween(name, styleConstant(name, i, value), priority)\n      .on(\"end.style.\" + name, null);\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-transition/src/transition/styleTween.js\":\n/*!*****************************************************************!*\\\n  !*** ./node_modules/d3-transition/src/transition/styleTween.js ***!\n  \\*****************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\nfunction styleInterpolate(name, i, priority) {\n  return function(t) {\n    this.style.setProperty(name, i.call(this, t), priority);\n  };\n}\n\nfunction styleTween(name, value, priority) {\n  var t, i0;\n  function tween() {\n    var i = value.apply(this, arguments);\n    if (i !== i0) t = (i0 = i) && styleInterpolate(name, i, priority);\n    return t;\n  }\n  tween._value = value;\n  return tween;\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(name, value, priority) {\n  var key = \"style.\" + (name += \"\");\n  if (arguments.length < 2) return (key = this.tween(key)) && key._value;\n  if (value == null) return this.tween(key, null);\n  if (typeof value !== \"function\") throw new Error;\n  return this.tween(key, styleTween(name, value, priority == null ? \"\" : priority));\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-transition/src/transition/text.js\":\n/*!***********************************************************!*\\\n  !*** ./node_modules/d3-transition/src/transition/text.js ***!\n  \\***********************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _tween_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./tween.js */ \"./node_modules/d3-transition/src/transition/tween.js\");\n\n\nfunction textConstant(value) {\n  return function() {\n    this.textContent = value;\n  };\n}\n\nfunction textFunction(value) {\n  return function() {\n    var value1 = value(this);\n    this.textContent = value1 == null ? \"\" : value1;\n  };\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(value) {\n  return this.tween(\"text\", typeof value === \"function\"\n      ? textFunction(Object(_tween_js__WEBPACK_IMPORTED_MODULE_0__[\"tweenValue\"])(this, \"text\", value))\n      : textConstant(value == null ? \"\" : value + \"\"));\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-transition/src/transition/textTween.js\":\n/*!****************************************************************!*\\\n  !*** ./node_modules/d3-transition/src/transition/textTween.js ***!\n  \\****************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\nfunction textInterpolate(i) {\n  return function(t) {\n    this.textContent = i.call(this, t);\n  };\n}\n\nfunction textTween(value) {\n  var t0, i0;\n  function tween() {\n    var i = value.apply(this, arguments);\n    if (i !== i0) t0 = (i0 = i) && textInterpolate(i);\n    return t0;\n  }\n  tween._value = value;\n  return tween;\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(value) {\n  var key = \"text\";\n  if (arguments.length < 1) return (key = this.tween(key)) && key._value;\n  if (value == null) return this.tween(key, null);\n  if (typeof value !== \"function\") throw new Error;\n  return this.tween(key, textTween(value));\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-transition/src/transition/transition.js\":\n/*!*****************************************************************!*\\\n  !*** ./node_modules/d3-transition/src/transition/transition.js ***!\n  \\*****************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./index.js */ \"./node_modules/d3-transition/src/transition/index.js\");\n/* harmony import */ var _schedule_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./schedule.js */ \"./node_modules/d3-transition/src/transition/schedule.js\");\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  var name = this._name,\n      id0 = this._id,\n      id1 = Object(_index_js__WEBPACK_IMPORTED_MODULE_0__[\"newId\"])();\n\n  for (var groups = this._groups, m = groups.length, j = 0; j < m; ++j) {\n    for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) {\n      if (node = group[i]) {\n        var inherit = Object(_schedule_js__WEBPACK_IMPORTED_MODULE_1__[\"get\"])(node, id0);\n        Object(_schedule_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(node, name, id1, i, group, {\n          time: inherit.time + inherit.delay + inherit.duration,\n          delay: 0,\n          duration: inherit.duration,\n          ease: inherit.ease\n        });\n      }\n    }\n  }\n\n  return new _index_js__WEBPACK_IMPORTED_MODULE_0__[\"Transition\"](groups, this._parents, name, id1);\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-transition/src/transition/tween.js\":\n/*!************************************************************!*\\\n  !*** ./node_modules/d3-transition/src/transition/tween.js ***!\n  \\************************************************************/\n/*! exports provided: default, tweenValue */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"tweenValue\", function() { return tweenValue; });\n/* harmony import */ var _schedule_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./schedule.js */ \"./node_modules/d3-transition/src/transition/schedule.js\");\n\n\nfunction tweenRemove(id, name) {\n  var tween0, tween1;\n  return function() {\n    var schedule = Object(_schedule_js__WEBPACK_IMPORTED_MODULE_0__[\"set\"])(this, id),\n        tween = schedule.tween;\n\n    // If this node shared tween with the previous node,\n    // just assign the updated shared tween and we’re done!\n    // Otherwise, copy-on-write.\n    if (tween !== tween0) {\n      tween1 = tween0 = tween;\n      for (var i = 0, n = tween1.length; i < n; ++i) {\n        if (tween1[i].name === name) {\n          tween1 = tween1.slice();\n          tween1.splice(i, 1);\n          break;\n        }\n      }\n    }\n\n    schedule.tween = tween1;\n  };\n}\n\nfunction tweenFunction(id, name, value) {\n  var tween0, tween1;\n  if (typeof value !== \"function\") throw new Error;\n  return function() {\n    var schedule = Object(_schedule_js__WEBPACK_IMPORTED_MODULE_0__[\"set\"])(this, id),\n        tween = schedule.tween;\n\n    // If this node shared tween with the previous node,\n    // just assign the updated shared tween and we’re done!\n    // Otherwise, copy-on-write.\n    if (tween !== tween0) {\n      tween1 = (tween0 = tween).slice();\n      for (var t = {name: name, value: value}, i = 0, n = tween1.length; i < n; ++i) {\n        if (tween1[i].name === name) {\n          tween1[i] = t;\n          break;\n        }\n      }\n      if (i === n) tween1.push(t);\n    }\n\n    schedule.tween = tween1;\n  };\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(name, value) {\n  var id = this._id;\n\n  name += \"\";\n\n  if (arguments.length < 2) {\n    var tween = Object(_schedule_js__WEBPACK_IMPORTED_MODULE_0__[\"get\"])(this.node(), id).tween;\n    for (var i = 0, n = tween.length, t; i < n; ++i) {\n      if ((t = tween[i]).name === name) {\n        return t.value;\n      }\n    }\n    return null;\n  }\n\n  return this.each((value == null ? tweenRemove : tweenFunction)(id, name, value));\n});\n\nfunction tweenValue(transition, name, value) {\n  var id = transition._id;\n\n  transition.each(function() {\n    var schedule = Object(_schedule_js__WEBPACK_IMPORTED_MODULE_0__[\"set\"])(this, id);\n    (schedule.value || (schedule.value = {}))[name] = value.apply(this, arguments);\n  });\n\n  return function(node) {\n    return Object(_schedule_js__WEBPACK_IMPORTED_MODULE_0__[\"get\"])(node, id).value[name];\n  };\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-voronoi/src/Beach.js\":\n/*!**********************************************!*\\\n  !*** ./node_modules/d3-voronoi/src/Beach.js ***!\n  \\**********************************************/\n/*! exports provided: removeBeach, addBeach */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"removeBeach\", function() { return removeBeach; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"addBeach\", function() { return addBeach; });\n/* harmony import */ var _RedBlackTree__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./RedBlackTree */ \"./node_modules/d3-voronoi/src/RedBlackTree.js\");\n/* harmony import */ var _Cell__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Cell */ \"./node_modules/d3-voronoi/src/Cell.js\");\n/* harmony import */ var _Circle__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Circle */ \"./node_modules/d3-voronoi/src/Circle.js\");\n/* harmony import */ var _Edge__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./Edge */ \"./node_modules/d3-voronoi/src/Edge.js\");\n/* harmony import */ var _Diagram__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./Diagram */ \"./node_modules/d3-voronoi/src/Diagram.js\");\n\n\n\n\n\n\nvar beachPool = [];\n\nfunction Beach() {\n  Object(_RedBlackTree__WEBPACK_IMPORTED_MODULE_0__[\"RedBlackNode\"])(this);\n  this.edge =\n  this.site =\n  this.circle = null;\n}\n\nfunction createBeach(site) {\n  var beach = beachPool.pop() || new Beach;\n  beach.site = site;\n  return beach;\n}\n\nfunction detachBeach(beach) {\n  Object(_Circle__WEBPACK_IMPORTED_MODULE_2__[\"detachCircle\"])(beach);\n  _Diagram__WEBPACK_IMPORTED_MODULE_4__[\"beaches\"].remove(beach);\n  beachPool.push(beach);\n  Object(_RedBlackTree__WEBPACK_IMPORTED_MODULE_0__[\"RedBlackNode\"])(beach);\n}\n\nfunction removeBeach(beach) {\n  var circle = beach.circle,\n      x = circle.x,\n      y = circle.cy,\n      vertex = [x, y],\n      previous = beach.P,\n      next = beach.N,\n      disappearing = [beach];\n\n  detachBeach(beach);\n\n  var lArc = previous;\n  while (lArc.circle\n      && Math.abs(x - lArc.circle.x) < _Diagram__WEBPACK_IMPORTED_MODULE_4__[\"epsilon\"]\n      && Math.abs(y - lArc.circle.cy) < _Diagram__WEBPACK_IMPORTED_MODULE_4__[\"epsilon\"]) {\n    previous = lArc.P;\n    disappearing.unshift(lArc);\n    detachBeach(lArc);\n    lArc = previous;\n  }\n\n  disappearing.unshift(lArc);\n  Object(_Circle__WEBPACK_IMPORTED_MODULE_2__[\"detachCircle\"])(lArc);\n\n  var rArc = next;\n  while (rArc.circle\n      && Math.abs(x - rArc.circle.x) < _Diagram__WEBPACK_IMPORTED_MODULE_4__[\"epsilon\"]\n      && Math.abs(y - rArc.circle.cy) < _Diagram__WEBPACK_IMPORTED_MODULE_4__[\"epsilon\"]) {\n    next = rArc.N;\n    disappearing.push(rArc);\n    detachBeach(rArc);\n    rArc = next;\n  }\n\n  disappearing.push(rArc);\n  Object(_Circle__WEBPACK_IMPORTED_MODULE_2__[\"detachCircle\"])(rArc);\n\n  var nArcs = disappearing.length,\n      iArc;\n  for (iArc = 1; iArc < nArcs; ++iArc) {\n    rArc = disappearing[iArc];\n    lArc = disappearing[iArc - 1];\n    Object(_Edge__WEBPACK_IMPORTED_MODULE_3__[\"setEdgeEnd\"])(rArc.edge, lArc.site, rArc.site, vertex);\n  }\n\n  lArc = disappearing[0];\n  rArc = disappearing[nArcs - 1];\n  rArc.edge = Object(_Edge__WEBPACK_IMPORTED_MODULE_3__[\"createEdge\"])(lArc.site, rArc.site, null, vertex);\n\n  Object(_Circle__WEBPACK_IMPORTED_MODULE_2__[\"attachCircle\"])(lArc);\n  Object(_Circle__WEBPACK_IMPORTED_MODULE_2__[\"attachCircle\"])(rArc);\n}\n\nfunction addBeach(site) {\n  var x = site[0],\n      directrix = site[1],\n      lArc,\n      rArc,\n      dxl,\n      dxr,\n      node = _Diagram__WEBPACK_IMPORTED_MODULE_4__[\"beaches\"]._;\n\n  while (node) {\n    dxl = leftBreakPoint(node, directrix) - x;\n    if (dxl > _Diagram__WEBPACK_IMPORTED_MODULE_4__[\"epsilon\"]) node = node.L; else {\n      dxr = x - rightBreakPoint(node, directrix);\n      if (dxr > _Diagram__WEBPACK_IMPORTED_MODULE_4__[\"epsilon\"]) {\n        if (!node.R) {\n          lArc = node;\n          break;\n        }\n        node = node.R;\n      } else {\n        if (dxl > -_Diagram__WEBPACK_IMPORTED_MODULE_4__[\"epsilon\"]) {\n          lArc = node.P;\n          rArc = node;\n        } else if (dxr > -_Diagram__WEBPACK_IMPORTED_MODULE_4__[\"epsilon\"]) {\n          lArc = node;\n          rArc = node.N;\n        } else {\n          lArc = rArc = node;\n        }\n        break;\n      }\n    }\n  }\n\n  Object(_Cell__WEBPACK_IMPORTED_MODULE_1__[\"createCell\"])(site);\n  var newArc = createBeach(site);\n  _Diagram__WEBPACK_IMPORTED_MODULE_4__[\"beaches\"].insert(lArc, newArc);\n\n  if (!lArc && !rArc) return;\n\n  if (lArc === rArc) {\n    Object(_Circle__WEBPACK_IMPORTED_MODULE_2__[\"detachCircle\"])(lArc);\n    rArc = createBeach(lArc.site);\n    _Diagram__WEBPACK_IMPORTED_MODULE_4__[\"beaches\"].insert(newArc, rArc);\n    newArc.edge = rArc.edge = Object(_Edge__WEBPACK_IMPORTED_MODULE_3__[\"createEdge\"])(lArc.site, newArc.site);\n    Object(_Circle__WEBPACK_IMPORTED_MODULE_2__[\"attachCircle\"])(lArc);\n    Object(_Circle__WEBPACK_IMPORTED_MODULE_2__[\"attachCircle\"])(rArc);\n    return;\n  }\n\n  if (!rArc) { // && lArc\n    newArc.edge = Object(_Edge__WEBPACK_IMPORTED_MODULE_3__[\"createEdge\"])(lArc.site, newArc.site);\n    return;\n  }\n\n  // else lArc !== rArc\n  Object(_Circle__WEBPACK_IMPORTED_MODULE_2__[\"detachCircle\"])(lArc);\n  Object(_Circle__WEBPACK_IMPORTED_MODULE_2__[\"detachCircle\"])(rArc);\n\n  var lSite = lArc.site,\n      ax = lSite[0],\n      ay = lSite[1],\n      bx = site[0] - ax,\n      by = site[1] - ay,\n      rSite = rArc.site,\n      cx = rSite[0] - ax,\n      cy = rSite[1] - ay,\n      d = 2 * (bx * cy - by * cx),\n      hb = bx * bx + by * by,\n      hc = cx * cx + cy * cy,\n      vertex = [(cy * hb - by * hc) / d + ax, (bx * hc - cx * hb) / d + ay];\n\n  Object(_Edge__WEBPACK_IMPORTED_MODULE_3__[\"setEdgeEnd\"])(rArc.edge, lSite, rSite, vertex);\n  newArc.edge = Object(_Edge__WEBPACK_IMPORTED_MODULE_3__[\"createEdge\"])(lSite, site, null, vertex);\n  rArc.edge = Object(_Edge__WEBPACK_IMPORTED_MODULE_3__[\"createEdge\"])(site, rSite, null, vertex);\n  Object(_Circle__WEBPACK_IMPORTED_MODULE_2__[\"attachCircle\"])(lArc);\n  Object(_Circle__WEBPACK_IMPORTED_MODULE_2__[\"attachCircle\"])(rArc);\n}\n\nfunction leftBreakPoint(arc, directrix) {\n  var site = arc.site,\n      rfocx = site[0],\n      rfocy = site[1],\n      pby2 = rfocy - directrix;\n\n  if (!pby2) return rfocx;\n\n  var lArc = arc.P;\n  if (!lArc) return -Infinity;\n\n  site = lArc.site;\n  var lfocx = site[0],\n      lfocy = site[1],\n      plby2 = lfocy - directrix;\n\n  if (!plby2) return lfocx;\n\n  var hl = lfocx - rfocx,\n      aby2 = 1 / pby2 - 1 / plby2,\n      b = hl / plby2;\n\n  if (aby2) return (-b + Math.sqrt(b * b - 2 * aby2 * (hl * hl / (-2 * plby2) - lfocy + plby2 / 2 + rfocy - pby2 / 2))) / aby2 + rfocx;\n\n  return (rfocx + lfocx) / 2;\n}\n\nfunction rightBreakPoint(arc, directrix) {\n  var rArc = arc.N;\n  if (rArc) return leftBreakPoint(rArc, directrix);\n  var site = arc.site;\n  return site[1] === directrix ? site[0] : Infinity;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-voronoi/src/Cell.js\":\n/*!*********************************************!*\\\n  !*** ./node_modules/d3-voronoi/src/Cell.js ***!\n  \\*********************************************/\n/*! exports provided: createCell, cellHalfedgeStart, cellHalfedgeEnd, sortCellHalfedges, clipCells */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"createCell\", function() { return createCell; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"cellHalfedgeStart\", function() { return cellHalfedgeStart; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"cellHalfedgeEnd\", function() { return cellHalfedgeEnd; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"sortCellHalfedges\", function() { return sortCellHalfedges; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"clipCells\", function() { return clipCells; });\n/* harmony import */ var _Edge__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Edge */ \"./node_modules/d3-voronoi/src/Edge.js\");\n/* harmony import */ var _Diagram__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Diagram */ \"./node_modules/d3-voronoi/src/Diagram.js\");\n\n\n\nfunction createCell(site) {\n  return _Diagram__WEBPACK_IMPORTED_MODULE_1__[\"cells\"][site.index] = {\n    site: site,\n    halfedges: []\n  };\n}\n\nfunction cellHalfedgeAngle(cell, edge) {\n  var site = cell.site,\n      va = edge.left,\n      vb = edge.right;\n  if (site === vb) vb = va, va = site;\n  if (vb) return Math.atan2(vb[1] - va[1], vb[0] - va[0]);\n  if (site === va) va = edge[1], vb = edge[0];\n  else va = edge[0], vb = edge[1];\n  return Math.atan2(va[0] - vb[0], vb[1] - va[1]);\n}\n\nfunction cellHalfedgeStart(cell, edge) {\n  return edge[+(edge.left !== cell.site)];\n}\n\nfunction cellHalfedgeEnd(cell, edge) {\n  return edge[+(edge.left === cell.site)];\n}\n\nfunction sortCellHalfedges() {\n  for (var i = 0, n = _Diagram__WEBPACK_IMPORTED_MODULE_1__[\"cells\"].length, cell, halfedges, j, m; i < n; ++i) {\n    if ((cell = _Diagram__WEBPACK_IMPORTED_MODULE_1__[\"cells\"][i]) && (m = (halfedges = cell.halfedges).length)) {\n      var index = new Array(m),\n          array = new Array(m);\n      for (j = 0; j < m; ++j) index[j] = j, array[j] = cellHalfedgeAngle(cell, _Diagram__WEBPACK_IMPORTED_MODULE_1__[\"edges\"][halfedges[j]]);\n      index.sort(function(i, j) { return array[j] - array[i]; });\n      for (j = 0; j < m; ++j) array[j] = halfedges[index[j]];\n      for (j = 0; j < m; ++j) halfedges[j] = array[j];\n    }\n  }\n}\n\nfunction clipCells(x0, y0, x1, y1) {\n  var nCells = _Diagram__WEBPACK_IMPORTED_MODULE_1__[\"cells\"].length,\n      iCell,\n      cell,\n      site,\n      iHalfedge,\n      halfedges,\n      nHalfedges,\n      start,\n      startX,\n      startY,\n      end,\n      endX,\n      endY,\n      cover = true;\n\n  for (iCell = 0; iCell < nCells; ++iCell) {\n    if (cell = _Diagram__WEBPACK_IMPORTED_MODULE_1__[\"cells\"][iCell]) {\n      site = cell.site;\n      halfedges = cell.halfedges;\n      iHalfedge = halfedges.length;\n\n      // Remove any dangling clipped edges.\n      while (iHalfedge--) {\n        if (!_Diagram__WEBPACK_IMPORTED_MODULE_1__[\"edges\"][halfedges[iHalfedge]]) {\n          halfedges.splice(iHalfedge, 1);\n        }\n      }\n\n      // Insert any border edges as necessary.\n      iHalfedge = 0, nHalfedges = halfedges.length;\n      while (iHalfedge < nHalfedges) {\n        end = cellHalfedgeEnd(cell, _Diagram__WEBPACK_IMPORTED_MODULE_1__[\"edges\"][halfedges[iHalfedge]]), endX = end[0], endY = end[1];\n        start = cellHalfedgeStart(cell, _Diagram__WEBPACK_IMPORTED_MODULE_1__[\"edges\"][halfedges[++iHalfedge % nHalfedges]]), startX = start[0], startY = start[1];\n        if (Math.abs(endX - startX) > _Diagram__WEBPACK_IMPORTED_MODULE_1__[\"epsilon\"] || Math.abs(endY - startY) > _Diagram__WEBPACK_IMPORTED_MODULE_1__[\"epsilon\"]) {\n          halfedges.splice(iHalfedge, 0, _Diagram__WEBPACK_IMPORTED_MODULE_1__[\"edges\"].push(Object(_Edge__WEBPACK_IMPORTED_MODULE_0__[\"createBorderEdge\"])(site, end,\n              Math.abs(endX - x0) < _Diagram__WEBPACK_IMPORTED_MODULE_1__[\"epsilon\"] && y1 - endY > _Diagram__WEBPACK_IMPORTED_MODULE_1__[\"epsilon\"] ? [x0, Math.abs(startX - x0) < _Diagram__WEBPACK_IMPORTED_MODULE_1__[\"epsilon\"] ? startY : y1]\n              : Math.abs(endY - y1) < _Diagram__WEBPACK_IMPORTED_MODULE_1__[\"epsilon\"] && x1 - endX > _Diagram__WEBPACK_IMPORTED_MODULE_1__[\"epsilon\"] ? [Math.abs(startY - y1) < _Diagram__WEBPACK_IMPORTED_MODULE_1__[\"epsilon\"] ? startX : x1, y1]\n              : Math.abs(endX - x1) < _Diagram__WEBPACK_IMPORTED_MODULE_1__[\"epsilon\"] && endY - y0 > _Diagram__WEBPACK_IMPORTED_MODULE_1__[\"epsilon\"] ? [x1, Math.abs(startX - x1) < _Diagram__WEBPACK_IMPORTED_MODULE_1__[\"epsilon\"] ? startY : y0]\n              : Math.abs(endY - y0) < _Diagram__WEBPACK_IMPORTED_MODULE_1__[\"epsilon\"] && endX - x0 > _Diagram__WEBPACK_IMPORTED_MODULE_1__[\"epsilon\"] ? [Math.abs(startY - y0) < _Diagram__WEBPACK_IMPORTED_MODULE_1__[\"epsilon\"] ? startX : x0, y0]\n              : null)) - 1);\n          ++nHalfedges;\n        }\n      }\n\n      if (nHalfedges) cover = false;\n    }\n  }\n\n  // If there weren’t any edges, have the closest site cover the extent.\n  // It doesn’t matter which corner of the extent we measure!\n  if (cover) {\n    var dx, dy, d2, dc = Infinity;\n\n    for (iCell = 0, cover = null; iCell < nCells; ++iCell) {\n      if (cell = _Diagram__WEBPACK_IMPORTED_MODULE_1__[\"cells\"][iCell]) {\n        site = cell.site;\n        dx = site[0] - x0;\n        dy = site[1] - y0;\n        d2 = dx * dx + dy * dy;\n        if (d2 < dc) dc = d2, cover = cell;\n      }\n    }\n\n    if (cover) {\n      var v00 = [x0, y0], v01 = [x0, y1], v11 = [x1, y1], v10 = [x1, y0];\n      cover.halfedges.push(\n        _Diagram__WEBPACK_IMPORTED_MODULE_1__[\"edges\"].push(Object(_Edge__WEBPACK_IMPORTED_MODULE_0__[\"createBorderEdge\"])(site = cover.site, v00, v01)) - 1,\n        _Diagram__WEBPACK_IMPORTED_MODULE_1__[\"edges\"].push(Object(_Edge__WEBPACK_IMPORTED_MODULE_0__[\"createBorderEdge\"])(site, v01, v11)) - 1,\n        _Diagram__WEBPACK_IMPORTED_MODULE_1__[\"edges\"].push(Object(_Edge__WEBPACK_IMPORTED_MODULE_0__[\"createBorderEdge\"])(site, v11, v10)) - 1,\n        _Diagram__WEBPACK_IMPORTED_MODULE_1__[\"edges\"].push(Object(_Edge__WEBPACK_IMPORTED_MODULE_0__[\"createBorderEdge\"])(site, v10, v00)) - 1\n      );\n    }\n  }\n\n  // Lastly delete any cells with no edges; these were entirely clipped.\n  for (iCell = 0; iCell < nCells; ++iCell) {\n    if (cell = _Diagram__WEBPACK_IMPORTED_MODULE_1__[\"cells\"][iCell]) {\n      if (!cell.halfedges.length) {\n        delete _Diagram__WEBPACK_IMPORTED_MODULE_1__[\"cells\"][iCell];\n      }\n    }\n  }\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-voronoi/src/Circle.js\":\n/*!***********************************************!*\\\n  !*** ./node_modules/d3-voronoi/src/Circle.js ***!\n  \\***********************************************/\n/*! exports provided: firstCircle, attachCircle, detachCircle */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"firstCircle\", function() { return firstCircle; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"attachCircle\", function() { return attachCircle; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"detachCircle\", function() { return detachCircle; });\n/* harmony import */ var _RedBlackTree__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./RedBlackTree */ \"./node_modules/d3-voronoi/src/RedBlackTree.js\");\n/* harmony import */ var _Diagram__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Diagram */ \"./node_modules/d3-voronoi/src/Diagram.js\");\n\n\n\nvar circlePool = [];\n\nvar firstCircle;\n\nfunction Circle() {\n  Object(_RedBlackTree__WEBPACK_IMPORTED_MODULE_0__[\"RedBlackNode\"])(this);\n  this.x =\n  this.y =\n  this.arc =\n  this.site =\n  this.cy = null;\n}\n\nfunction attachCircle(arc) {\n  var lArc = arc.P,\n      rArc = arc.N;\n\n  if (!lArc || !rArc) return;\n\n  var lSite = lArc.site,\n      cSite = arc.site,\n      rSite = rArc.site;\n\n  if (lSite === rSite) return;\n\n  var bx = cSite[0],\n      by = cSite[1],\n      ax = lSite[0] - bx,\n      ay = lSite[1] - by,\n      cx = rSite[0] - bx,\n      cy = rSite[1] - by;\n\n  var d = 2 * (ax * cy - ay * cx);\n  if (d >= -_Diagram__WEBPACK_IMPORTED_MODULE_1__[\"epsilon2\"]) return;\n\n  var ha = ax * ax + ay * ay,\n      hc = cx * cx + cy * cy,\n      x = (cy * ha - ay * hc) / d,\n      y = (ax * hc - cx * ha) / d;\n\n  var circle = circlePool.pop() || new Circle;\n  circle.arc = arc;\n  circle.site = cSite;\n  circle.x = x + bx;\n  circle.y = (circle.cy = y + by) + Math.sqrt(x * x + y * y); // y bottom\n\n  arc.circle = circle;\n\n  var before = null,\n      node = _Diagram__WEBPACK_IMPORTED_MODULE_1__[\"circles\"]._;\n\n  while (node) {\n    if (circle.y < node.y || (circle.y === node.y && circle.x <= node.x)) {\n      if (node.L) node = node.L;\n      else { before = node.P; break; }\n    } else {\n      if (node.R) node = node.R;\n      else { before = node; break; }\n    }\n  }\n\n  _Diagram__WEBPACK_IMPORTED_MODULE_1__[\"circles\"].insert(before, circle);\n  if (!before) firstCircle = circle;\n}\n\nfunction detachCircle(arc) {\n  var circle = arc.circle;\n  if (circle) {\n    if (!circle.P) firstCircle = circle.N;\n    _Diagram__WEBPACK_IMPORTED_MODULE_1__[\"circles\"].remove(circle);\n    circlePool.push(circle);\n    Object(_RedBlackTree__WEBPACK_IMPORTED_MODULE_0__[\"RedBlackNode\"])(circle);\n    arc.circle = null;\n  }\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-voronoi/src/Diagram.js\":\n/*!************************************************!*\\\n  !*** ./node_modules/d3-voronoi/src/Diagram.js ***!\n  \\************************************************/\n/*! exports provided: epsilon, epsilon2, beaches, cells, circles, edges, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"epsilon\", function() { return epsilon; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"epsilon2\", function() { return epsilon2; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"beaches\", function() { return beaches; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"cells\", function() { return cells; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"circles\", function() { return circles; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"edges\", function() { return edges; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return Diagram; });\n/* harmony import */ var _Beach__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Beach */ \"./node_modules/d3-voronoi/src/Beach.js\");\n/* harmony import */ var _Cell__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Cell */ \"./node_modules/d3-voronoi/src/Cell.js\");\n/* harmony import */ var _Circle__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Circle */ \"./node_modules/d3-voronoi/src/Circle.js\");\n/* harmony import */ var _Edge__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./Edge */ \"./node_modules/d3-voronoi/src/Edge.js\");\n/* harmony import */ var _RedBlackTree__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./RedBlackTree */ \"./node_modules/d3-voronoi/src/RedBlackTree.js\");\n\n\n\n\n\n\nvar epsilon = 1e-6;\nvar epsilon2 = 1e-12;\nvar beaches;\nvar cells;\nvar circles;\nvar edges;\n\nfunction triangleArea(a, b, c) {\n  return (a[0] - c[0]) * (b[1] - a[1]) - (a[0] - b[0]) * (c[1] - a[1]);\n}\n\nfunction lexicographic(a, b) {\n  return b[1] - a[1]\n      || b[0] - a[0];\n}\n\nfunction Diagram(sites, extent) {\n  var site = sites.sort(lexicographic).pop(),\n      x,\n      y,\n      circle;\n\n  edges = [];\n  cells = new Array(sites.length);\n  beaches = new _RedBlackTree__WEBPACK_IMPORTED_MODULE_4__[\"default\"];\n  circles = new _RedBlackTree__WEBPACK_IMPORTED_MODULE_4__[\"default\"];\n\n  while (true) {\n    circle = _Circle__WEBPACK_IMPORTED_MODULE_2__[\"firstCircle\"];\n    if (site && (!circle || site[1] < circle.y || (site[1] === circle.y && site[0] < circle.x))) {\n      if (site[0] !== x || site[1] !== y) {\n        Object(_Beach__WEBPACK_IMPORTED_MODULE_0__[\"addBeach\"])(site);\n        x = site[0], y = site[1];\n      }\n      site = sites.pop();\n    } else if (circle) {\n      Object(_Beach__WEBPACK_IMPORTED_MODULE_0__[\"removeBeach\"])(circle.arc);\n    } else {\n      break;\n    }\n  }\n\n  Object(_Cell__WEBPACK_IMPORTED_MODULE_1__[\"sortCellHalfedges\"])();\n\n  if (extent) {\n    var x0 = +extent[0][0],\n        y0 = +extent[0][1],\n        x1 = +extent[1][0],\n        y1 = +extent[1][1];\n    Object(_Edge__WEBPACK_IMPORTED_MODULE_3__[\"clipEdges\"])(x0, y0, x1, y1);\n    Object(_Cell__WEBPACK_IMPORTED_MODULE_1__[\"clipCells\"])(x0, y0, x1, y1);\n  }\n\n  this.edges = edges;\n  this.cells = cells;\n\n  beaches =\n  circles =\n  edges =\n  cells = null;\n}\n\nDiagram.prototype = {\n  constructor: Diagram,\n\n  polygons: function() {\n    var edges = this.edges;\n\n    return this.cells.map(function(cell) {\n      var polygon = cell.halfedges.map(function(i) { return Object(_Cell__WEBPACK_IMPORTED_MODULE_1__[\"cellHalfedgeStart\"])(cell, edges[i]); });\n      polygon.data = cell.site.data;\n      return polygon;\n    });\n  },\n\n  triangles: function() {\n    var triangles = [],\n        edges = this.edges;\n\n    this.cells.forEach(function(cell, i) {\n      if (!(m = (halfedges = cell.halfedges).length)) return;\n      var site = cell.site,\n          halfedges,\n          j = -1,\n          m,\n          s0,\n          e1 = edges[halfedges[m - 1]],\n          s1 = e1.left === site ? e1.right : e1.left;\n\n      while (++j < m) {\n        s0 = s1;\n        e1 = edges[halfedges[j]];\n        s1 = e1.left === site ? e1.right : e1.left;\n        if (s0 && s1 && i < s0.index && i < s1.index && triangleArea(site, s0, s1) < 0) {\n          triangles.push([site.data, s0.data, s1.data]);\n        }\n      }\n    });\n\n    return triangles;\n  },\n\n  links: function() {\n    return this.edges.filter(function(edge) {\n      return edge.right;\n    }).map(function(edge) {\n      return {\n        source: edge.left.data,\n        target: edge.right.data\n      };\n    });\n  },\n\n  find: function(x, y, radius) {\n    var that = this, i0, i1 = that._found || 0, n = that.cells.length, cell;\n\n    // Use the previously-found cell, or start with an arbitrary one.\n    while (!(cell = that.cells[i1])) if (++i1 >= n) return null;\n    var dx = x - cell.site[0], dy = y - cell.site[1], d2 = dx * dx + dy * dy;\n\n    // Traverse the half-edges to find a closer cell, if any.\n    do {\n      cell = that.cells[i0 = i1], i1 = null;\n      cell.halfedges.forEach(function(e) {\n        var edge = that.edges[e], v = edge.left;\n        if ((v === cell.site || !v) && !(v = edge.right)) return;\n        var vx = x - v[0], vy = y - v[1], v2 = vx * vx + vy * vy;\n        if (v2 < d2) d2 = v2, i1 = v.index;\n      });\n    } while (i1 !== null);\n\n    that._found = i0;\n\n    return radius == null || d2 <= radius * radius ? cell.site : null;\n  }\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-voronoi/src/Edge.js\":\n/*!*********************************************!*\\\n  !*** ./node_modules/d3-voronoi/src/Edge.js ***!\n  \\*********************************************/\n/*! exports provided: createEdge, createBorderEdge, setEdgeEnd, clipEdges */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"createEdge\", function() { return createEdge; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"createBorderEdge\", function() { return createBorderEdge; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"setEdgeEnd\", function() { return setEdgeEnd; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"clipEdges\", function() { return clipEdges; });\n/* harmony import */ var _Diagram__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Diagram */ \"./node_modules/d3-voronoi/src/Diagram.js\");\n\n\nfunction createEdge(left, right, v0, v1) {\n  var edge = [null, null],\n      index = _Diagram__WEBPACK_IMPORTED_MODULE_0__[\"edges\"].push(edge) - 1;\n  edge.left = left;\n  edge.right = right;\n  if (v0) setEdgeEnd(edge, left, right, v0);\n  if (v1) setEdgeEnd(edge, right, left, v1);\n  _Diagram__WEBPACK_IMPORTED_MODULE_0__[\"cells\"][left.index].halfedges.push(index);\n  _Diagram__WEBPACK_IMPORTED_MODULE_0__[\"cells\"][right.index].halfedges.push(index);\n  return edge;\n}\n\nfunction createBorderEdge(left, v0, v1) {\n  var edge = [v0, v1];\n  edge.left = left;\n  return edge;\n}\n\nfunction setEdgeEnd(edge, left, right, vertex) {\n  if (!edge[0] && !edge[1]) {\n    edge[0] = vertex;\n    edge.left = left;\n    edge.right = right;\n  } else if (edge.left === right) {\n    edge[1] = vertex;\n  } else {\n    edge[0] = vertex;\n  }\n}\n\n// Liang–Barsky line clipping.\nfunction clipEdge(edge, x0, y0, x1, y1) {\n  var a = edge[0],\n      b = edge[1],\n      ax = a[0],\n      ay = a[1],\n      bx = b[0],\n      by = b[1],\n      t0 = 0,\n      t1 = 1,\n      dx = bx - ax,\n      dy = by - ay,\n      r;\n\n  r = x0 - ax;\n  if (!dx && r > 0) return;\n  r /= dx;\n  if (dx < 0) {\n    if (r < t0) return;\n    if (r < t1) t1 = r;\n  } else if (dx > 0) {\n    if (r > t1) return;\n    if (r > t0) t0 = r;\n  }\n\n  r = x1 - ax;\n  if (!dx && r < 0) return;\n  r /= dx;\n  if (dx < 0) {\n    if (r > t1) return;\n    if (r > t0) t0 = r;\n  } else if (dx > 0) {\n    if (r < t0) return;\n    if (r < t1) t1 = r;\n  }\n\n  r = y0 - ay;\n  if (!dy && r > 0) return;\n  r /= dy;\n  if (dy < 0) {\n    if (r < t0) return;\n    if (r < t1) t1 = r;\n  } else if (dy > 0) {\n    if (r > t1) return;\n    if (r > t0) t0 = r;\n  }\n\n  r = y1 - ay;\n  if (!dy && r < 0) return;\n  r /= dy;\n  if (dy < 0) {\n    if (r > t1) return;\n    if (r > t0) t0 = r;\n  } else if (dy > 0) {\n    if (r < t0) return;\n    if (r < t1) t1 = r;\n  }\n\n  if (!(t0 > 0) && !(t1 < 1)) return true; // TODO Better check?\n\n  if (t0 > 0) edge[0] = [ax + t0 * dx, ay + t0 * dy];\n  if (t1 < 1) edge[1] = [ax + t1 * dx, ay + t1 * dy];\n  return true;\n}\n\nfunction connectEdge(edge, x0, y0, x1, y1) {\n  var v1 = edge[1];\n  if (v1) return true;\n\n  var v0 = edge[0],\n      left = edge.left,\n      right = edge.right,\n      lx = left[0],\n      ly = left[1],\n      rx = right[0],\n      ry = right[1],\n      fx = (lx + rx) / 2,\n      fy = (ly + ry) / 2,\n      fm,\n      fb;\n\n  if (ry === ly) {\n    if (fx < x0 || fx >= x1) return;\n    if (lx > rx) {\n      if (!v0) v0 = [fx, y0];\n      else if (v0[1] >= y1) return;\n      v1 = [fx, y1];\n    } else {\n      if (!v0) v0 = [fx, y1];\n      else if (v0[1] < y0) return;\n      v1 = [fx, y0];\n    }\n  } else {\n    fm = (lx - rx) / (ry - ly);\n    fb = fy - fm * fx;\n    if (fm < -1 || fm > 1) {\n      if (lx > rx) {\n        if (!v0) v0 = [(y0 - fb) / fm, y0];\n        else if (v0[1] >= y1) return;\n        v1 = [(y1 - fb) / fm, y1];\n      } else {\n        if (!v0) v0 = [(y1 - fb) / fm, y1];\n        else if (v0[1] < y0) return;\n        v1 = [(y0 - fb) / fm, y0];\n      }\n    } else {\n      if (ly < ry) {\n        if (!v0) v0 = [x0, fm * x0 + fb];\n        else if (v0[0] >= x1) return;\n        v1 = [x1, fm * x1 + fb];\n      } else {\n        if (!v0) v0 = [x1, fm * x1 + fb];\n        else if (v0[0] < x0) return;\n        v1 = [x0, fm * x0 + fb];\n      }\n    }\n  }\n\n  edge[0] = v0;\n  edge[1] = v1;\n  return true;\n}\n\nfunction clipEdges(x0, y0, x1, y1) {\n  var i = _Diagram__WEBPACK_IMPORTED_MODULE_0__[\"edges\"].length,\n      edge;\n\n  while (i--) {\n    if (!connectEdge(edge = _Diagram__WEBPACK_IMPORTED_MODULE_0__[\"edges\"][i], x0, y0, x1, y1)\n        || !clipEdge(edge, x0, y0, x1, y1)\n        || !(Math.abs(edge[0][0] - edge[1][0]) > _Diagram__WEBPACK_IMPORTED_MODULE_0__[\"epsilon\"]\n            || Math.abs(edge[0][1] - edge[1][1]) > _Diagram__WEBPACK_IMPORTED_MODULE_0__[\"epsilon\"])) {\n      delete _Diagram__WEBPACK_IMPORTED_MODULE_0__[\"edges\"][i];\n    }\n  }\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-voronoi/src/RedBlackTree.js\":\n/*!*****************************************************!*\\\n  !*** ./node_modules/d3-voronoi/src/RedBlackTree.js ***!\n  \\*****************************************************/\n/*! exports provided: RedBlackNode, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"RedBlackNode\", function() { return RedBlackNode; });\nfunction RedBlackTree() {\n  this._ = null; // root node\n}\n\nfunction RedBlackNode(node) {\n  node.U = // parent node\n  node.C = // color - true for red, false for black\n  node.L = // left node\n  node.R = // right node\n  node.P = // previous node\n  node.N = null; // next node\n}\n\nRedBlackTree.prototype = {\n  constructor: RedBlackTree,\n\n  insert: function(after, node) {\n    var parent, grandpa, uncle;\n\n    if (after) {\n      node.P = after;\n      node.N = after.N;\n      if (after.N) after.N.P = node;\n      after.N = node;\n      if (after.R) {\n        after = after.R;\n        while (after.L) after = after.L;\n        after.L = node;\n      } else {\n        after.R = node;\n      }\n      parent = after;\n    } else if (this._) {\n      after = RedBlackFirst(this._);\n      node.P = null;\n      node.N = after;\n      after.P = after.L = node;\n      parent = after;\n    } else {\n      node.P = node.N = null;\n      this._ = node;\n      parent = null;\n    }\n    node.L = node.R = null;\n    node.U = parent;\n    node.C = true;\n\n    after = node;\n    while (parent && parent.C) {\n      grandpa = parent.U;\n      if (parent === grandpa.L) {\n        uncle = grandpa.R;\n        if (uncle && uncle.C) {\n          parent.C = uncle.C = false;\n          grandpa.C = true;\n          after = grandpa;\n        } else {\n          if (after === parent.R) {\n            RedBlackRotateLeft(this, parent);\n            after = parent;\n            parent = after.U;\n          }\n          parent.C = false;\n          grandpa.C = true;\n          RedBlackRotateRight(this, grandpa);\n        }\n      } else {\n        uncle = grandpa.L;\n        if (uncle && uncle.C) {\n          parent.C = uncle.C = false;\n          grandpa.C = true;\n          after = grandpa;\n        } else {\n          if (after === parent.L) {\n            RedBlackRotateRight(this, parent);\n            after = parent;\n            parent = after.U;\n          }\n          parent.C = false;\n          grandpa.C = true;\n          RedBlackRotateLeft(this, grandpa);\n        }\n      }\n      parent = after.U;\n    }\n    this._.C = false;\n  },\n\n  remove: function(node) {\n    if (node.N) node.N.P = node.P;\n    if (node.P) node.P.N = node.N;\n    node.N = node.P = null;\n\n    var parent = node.U,\n        sibling,\n        left = node.L,\n        right = node.R,\n        next,\n        red;\n\n    if (!left) next = right;\n    else if (!right) next = left;\n    else next = RedBlackFirst(right);\n\n    if (parent) {\n      if (parent.L === node) parent.L = next;\n      else parent.R = next;\n    } else {\n      this._ = next;\n    }\n\n    if (left && right) {\n      red = next.C;\n      next.C = node.C;\n      next.L = left;\n      left.U = next;\n      if (next !== right) {\n        parent = next.U;\n        next.U = node.U;\n        node = next.R;\n        parent.L = node;\n        next.R = right;\n        right.U = next;\n      } else {\n        next.U = parent;\n        parent = next;\n        node = next.R;\n      }\n    } else {\n      red = node.C;\n      node = next;\n    }\n\n    if (node) node.U = parent;\n    if (red) return;\n    if (node && node.C) { node.C = false; return; }\n\n    do {\n      if (node === this._) break;\n      if (node === parent.L) {\n        sibling = parent.R;\n        if (sibling.C) {\n          sibling.C = false;\n          parent.C = true;\n          RedBlackRotateLeft(this, parent);\n          sibling = parent.R;\n        }\n        if ((sibling.L && sibling.L.C)\n            || (sibling.R && sibling.R.C)) {\n          if (!sibling.R || !sibling.R.C) {\n            sibling.L.C = false;\n            sibling.C = true;\n            RedBlackRotateRight(this, sibling);\n            sibling = parent.R;\n          }\n          sibling.C = parent.C;\n          parent.C = sibling.R.C = false;\n          RedBlackRotateLeft(this, parent);\n          node = this._;\n          break;\n        }\n      } else {\n        sibling = parent.L;\n        if (sibling.C) {\n          sibling.C = false;\n          parent.C = true;\n          RedBlackRotateRight(this, parent);\n          sibling = parent.L;\n        }\n        if ((sibling.L && sibling.L.C)\n          || (sibling.R && sibling.R.C)) {\n          if (!sibling.L || !sibling.L.C) {\n            sibling.R.C = false;\n            sibling.C = true;\n            RedBlackRotateLeft(this, sibling);\n            sibling = parent.L;\n          }\n          sibling.C = parent.C;\n          parent.C = sibling.L.C = false;\n          RedBlackRotateRight(this, parent);\n          node = this._;\n          break;\n        }\n      }\n      sibling.C = true;\n      node = parent;\n      parent = parent.U;\n    } while (!node.C);\n\n    if (node) node.C = false;\n  }\n};\n\nfunction RedBlackRotateLeft(tree, node) {\n  var p = node,\n      q = node.R,\n      parent = p.U;\n\n  if (parent) {\n    if (parent.L === p) parent.L = q;\n    else parent.R = q;\n  } else {\n    tree._ = q;\n  }\n\n  q.U = parent;\n  p.U = q;\n  p.R = q.L;\n  if (p.R) p.R.U = p;\n  q.L = p;\n}\n\nfunction RedBlackRotateRight(tree, node) {\n  var p = node,\n      q = node.L,\n      parent = p.U;\n\n  if (parent) {\n    if (parent.L === p) parent.L = q;\n    else parent.R = q;\n  } else {\n    tree._ = q;\n  }\n\n  q.U = parent;\n  p.U = q;\n  p.L = q.R;\n  if (p.L) p.L.U = p;\n  q.R = p;\n}\n\nfunction RedBlackFirst(node) {\n  while (node.L) node = node.L;\n  return node;\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (RedBlackTree);\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-voronoi/src/constant.js\":\n/*!*************************************************!*\\\n  !*** ./node_modules/d3-voronoi/src/constant.js ***!\n  \\*************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(x) {\n  return function() {\n    return x;\n  };\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-voronoi/src/index.js\":\n/*!**********************************************!*\\\n  !*** ./node_modules/d3-voronoi/src/index.js ***!\n  \\**********************************************/\n/*! exports provided: voronoi */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _voronoi__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./voronoi */ \"./node_modules/d3-voronoi/src/voronoi.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"voronoi\", function() { return _voronoi__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-voronoi/src/point.js\":\n/*!**********************************************!*\\\n  !*** ./node_modules/d3-voronoi/src/point.js ***!\n  \\**********************************************/\n/*! exports provided: x, y */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"x\", function() { return x; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"y\", function() { return y; });\nfunction x(d) {\n  return d[0];\n}\n\nfunction y(d) {\n  return d[1];\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-voronoi/src/voronoi.js\":\n/*!************************************************!*\\\n  !*** ./node_modules/d3-voronoi/src/voronoi.js ***!\n  \\************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _constant__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./constant */ \"./node_modules/d3-voronoi/src/constant.js\");\n/* harmony import */ var _point__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./point */ \"./node_modules/d3-voronoi/src/point.js\");\n/* harmony import */ var _Diagram__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Diagram */ \"./node_modules/d3-voronoi/src/Diagram.js\");\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  var x = _point__WEBPACK_IMPORTED_MODULE_1__[\"x\"],\n      y = _point__WEBPACK_IMPORTED_MODULE_1__[\"y\"],\n      extent = null;\n\n  function voronoi(data) {\n    return new _Diagram__WEBPACK_IMPORTED_MODULE_2__[\"default\"](data.map(function(d, i) {\n      var s = [Math.round(x(d, i, data) / _Diagram__WEBPACK_IMPORTED_MODULE_2__[\"epsilon\"]) * _Diagram__WEBPACK_IMPORTED_MODULE_2__[\"epsilon\"], Math.round(y(d, i, data) / _Diagram__WEBPACK_IMPORTED_MODULE_2__[\"epsilon\"]) * _Diagram__WEBPACK_IMPORTED_MODULE_2__[\"epsilon\"]];\n      s.index = i;\n      s.data = d;\n      return s;\n    }), extent);\n  }\n\n  voronoi.polygons = function(data) {\n    return voronoi(data).polygons();\n  };\n\n  voronoi.links = function(data) {\n    return voronoi(data).links();\n  };\n\n  voronoi.triangles = function(data) {\n    return voronoi(data).triangles();\n  };\n\n  voronoi.x = function(_) {\n    return arguments.length ? (x = typeof _ === \"function\" ? _ : Object(_constant__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(+_), voronoi) : x;\n  };\n\n  voronoi.y = function(_) {\n    return arguments.length ? (y = typeof _ === \"function\" ? _ : Object(_constant__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(+_), voronoi) : y;\n  };\n\n  voronoi.extent = function(_) {\n    return arguments.length ? (extent = _ == null ? null : [[+_[0][0], +_[0][1]], [+_[1][0], +_[1][1]]], voronoi) : extent && [[extent[0][0], extent[0][1]], [extent[1][0], extent[1][1]]];\n  };\n\n  voronoi.size = function(_) {\n    return arguments.length ? (extent = _ == null ? null : [[0, 0], [+_[0], +_[1]]], voronoi) : extent && [extent[1][0] - extent[0][0], extent[1][1] - extent[0][1]];\n  };\n\n  return voronoi;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-zoom/node_modules/d3-color/src/color.js\":\n/*!*****************************************************************!*\\\n  !*** ./node_modules/d3-zoom/node_modules/d3-color/src/color.js ***!\n  \\*****************************************************************/\n/*! exports provided: Color, darker, brighter, default, rgbConvert, rgb, Rgb, hslConvert, hsl */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Color\", function() { return Color; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"darker\", function() { return darker; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"brighter\", function() { return brighter; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return color; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"rgbConvert\", function() { return rgbConvert; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"rgb\", function() { return rgb; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Rgb\", function() { return Rgb; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"hslConvert\", function() { return hslConvert; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"hsl\", function() { return hsl; });\n/* harmony import */ var _define_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./define.js */ \"./node_modules/d3-zoom/node_modules/d3-color/src/define.js\");\n\n\nfunction Color() {}\n\nvar darker = 0.7;\nvar brighter = 1 / darker;\n\nvar reI = \"\\\\s*([+-]?\\\\d+)\\\\s*\",\n    reN = \"\\\\s*([+-]?\\\\d*\\\\.?\\\\d+(?:[eE][+-]?\\\\d+)?)\\\\s*\",\n    reP = \"\\\\s*([+-]?\\\\d*\\\\.?\\\\d+(?:[eE][+-]?\\\\d+)?)%\\\\s*\",\n    reHex = /^#([0-9a-f]{3,8})$/,\n    reRgbInteger = new RegExp(\"^rgb\\\\(\" + [reI, reI, reI] + \"\\\\)$\"),\n    reRgbPercent = new RegExp(\"^rgb\\\\(\" + [reP, reP, reP] + \"\\\\)$\"),\n    reRgbaInteger = new RegExp(\"^rgba\\\\(\" + [reI, reI, reI, reN] + \"\\\\)$\"),\n    reRgbaPercent = new RegExp(\"^rgba\\\\(\" + [reP, reP, reP, reN] + \"\\\\)$\"),\n    reHslPercent = new RegExp(\"^hsl\\\\(\" + [reN, reP, reP] + \"\\\\)$\"),\n    reHslaPercent = new RegExp(\"^hsla\\\\(\" + [reN, reP, reP, reN] + \"\\\\)$\");\n\nvar named = {\n  aliceblue: 0xf0f8ff,\n  antiquewhite: 0xfaebd7,\n  aqua: 0x00ffff,\n  aquamarine: 0x7fffd4,\n  azure: 0xf0ffff,\n  beige: 0xf5f5dc,\n  bisque: 0xffe4c4,\n  black: 0x000000,\n  blanchedalmond: 0xffebcd,\n  blue: 0x0000ff,\n  blueviolet: 0x8a2be2,\n  brown: 0xa52a2a,\n  burlywood: 0xdeb887,\n  cadetblue: 0x5f9ea0,\n  chartreuse: 0x7fff00,\n  chocolate: 0xd2691e,\n  coral: 0xff7f50,\n  cornflowerblue: 0x6495ed,\n  cornsilk: 0xfff8dc,\n  crimson: 0xdc143c,\n  cyan: 0x00ffff,\n  darkblue: 0x00008b,\n  darkcyan: 0x008b8b,\n  darkgoldenrod: 0xb8860b,\n  darkgray: 0xa9a9a9,\n  darkgreen: 0x006400,\n  darkgrey: 0xa9a9a9,\n  darkkhaki: 0xbdb76b,\n  darkmagenta: 0x8b008b,\n  darkolivegreen: 0x556b2f,\n  darkorange: 0xff8c00,\n  darkorchid: 0x9932cc,\n  darkred: 0x8b0000,\n  darksalmon: 0xe9967a,\n  darkseagreen: 0x8fbc8f,\n  darkslateblue: 0x483d8b,\n  darkslategray: 0x2f4f4f,\n  darkslategrey: 0x2f4f4f,\n  darkturquoise: 0x00ced1,\n  darkviolet: 0x9400d3,\n  deeppink: 0xff1493,\n  deepskyblue: 0x00bfff,\n  dimgray: 0x696969,\n  dimgrey: 0x696969,\n  dodgerblue: 0x1e90ff,\n  firebrick: 0xb22222,\n  floralwhite: 0xfffaf0,\n  forestgreen: 0x228b22,\n  fuchsia: 0xff00ff,\n  gainsboro: 0xdcdcdc,\n  ghostwhite: 0xf8f8ff,\n  gold: 0xffd700,\n  goldenrod: 0xdaa520,\n  gray: 0x808080,\n  green: 0x008000,\n  greenyellow: 0xadff2f,\n  grey: 0x808080,\n  honeydew: 0xf0fff0,\n  hotpink: 0xff69b4,\n  indianred: 0xcd5c5c,\n  indigo: 0x4b0082,\n  ivory: 0xfffff0,\n  khaki: 0xf0e68c,\n  lavender: 0xe6e6fa,\n  lavenderblush: 0xfff0f5,\n  lawngreen: 0x7cfc00,\n  lemonchiffon: 0xfffacd,\n  lightblue: 0xadd8e6,\n  lightcoral: 0xf08080,\n  lightcyan: 0xe0ffff,\n  lightgoldenrodyellow: 0xfafad2,\n  lightgray: 0xd3d3d3,\n  lightgreen: 0x90ee90,\n  lightgrey: 0xd3d3d3,\n  lightpink: 0xffb6c1,\n  lightsalmon: 0xffa07a,\n  lightseagreen: 0x20b2aa,\n  lightskyblue: 0x87cefa,\n  lightslategray: 0x778899,\n  lightslategrey: 0x778899,\n  lightsteelblue: 0xb0c4de,\n  lightyellow: 0xffffe0,\n  lime: 0x00ff00,\n  limegreen: 0x32cd32,\n  linen: 0xfaf0e6,\n  magenta: 0xff00ff,\n  maroon: 0x800000,\n  mediumaquamarine: 0x66cdaa,\n  mediumblue: 0x0000cd,\n  mediumorchid: 0xba55d3,\n  mediumpurple: 0x9370db,\n  mediumseagreen: 0x3cb371,\n  mediumslateblue: 0x7b68ee,\n  mediumspringgreen: 0x00fa9a,\n  mediumturquoise: 0x48d1cc,\n  mediumvioletred: 0xc71585,\n  midnightblue: 0x191970,\n  mintcream: 0xf5fffa,\n  mistyrose: 0xffe4e1,\n  moccasin: 0xffe4b5,\n  navajowhite: 0xffdead,\n  navy: 0x000080,\n  oldlace: 0xfdf5e6,\n  olive: 0x808000,\n  olivedrab: 0x6b8e23,\n  orange: 0xffa500,\n  orangered: 0xff4500,\n  orchid: 0xda70d6,\n  palegoldenrod: 0xeee8aa,\n  palegreen: 0x98fb98,\n  paleturquoise: 0xafeeee,\n  palevioletred: 0xdb7093,\n  papayawhip: 0xffefd5,\n  peachpuff: 0xffdab9,\n  peru: 0xcd853f,\n  pink: 0xffc0cb,\n  plum: 0xdda0dd,\n  powderblue: 0xb0e0e6,\n  purple: 0x800080,\n  rebeccapurple: 0x663399,\n  red: 0xff0000,\n  rosybrown: 0xbc8f8f,\n  royalblue: 0x4169e1,\n  saddlebrown: 0x8b4513,\n  salmon: 0xfa8072,\n  sandybrown: 0xf4a460,\n  seagreen: 0x2e8b57,\n  seashell: 0xfff5ee,\n  sienna: 0xa0522d,\n  silver: 0xc0c0c0,\n  skyblue: 0x87ceeb,\n  slateblue: 0x6a5acd,\n  slategray: 0x708090,\n  slategrey: 0x708090,\n  snow: 0xfffafa,\n  springgreen: 0x00ff7f,\n  steelblue: 0x4682b4,\n  tan: 0xd2b48c,\n  teal: 0x008080,\n  thistle: 0xd8bfd8,\n  tomato: 0xff6347,\n  turquoise: 0x40e0d0,\n  violet: 0xee82ee,\n  wheat: 0xf5deb3,\n  white: 0xffffff,\n  whitesmoke: 0xf5f5f5,\n  yellow: 0xffff00,\n  yellowgreen: 0x9acd32\n};\n\nObject(_define_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(Color, color, {\n  copy: function(channels) {\n    return Object.assign(new this.constructor, this, channels);\n  },\n  displayable: function() {\n    return this.rgb().displayable();\n  },\n  hex: color_formatHex, // Deprecated! Use color.formatHex.\n  formatHex: color_formatHex,\n  formatHsl: color_formatHsl,\n  formatRgb: color_formatRgb,\n  toString: color_formatRgb\n});\n\nfunction color_formatHex() {\n  return this.rgb().formatHex();\n}\n\nfunction color_formatHsl() {\n  return hslConvert(this).formatHsl();\n}\n\nfunction color_formatRgb() {\n  return this.rgb().formatRgb();\n}\n\nfunction color(format) {\n  var m, l;\n  format = (format + \"\").trim().toLowerCase();\n  return (m = reHex.exec(format)) ? (l = m[1].length, m = parseInt(m[1], 16), l === 6 ? rgbn(m) // #ff0000\n      : l === 3 ? new Rgb((m >> 8 & 0xf) | (m >> 4 & 0xf0), (m >> 4 & 0xf) | (m & 0xf0), ((m & 0xf) << 4) | (m & 0xf), 1) // #f00\n      : l === 8 ? rgba(m >> 24 & 0xff, m >> 16 & 0xff, m >> 8 & 0xff, (m & 0xff) / 0xff) // #ff000000\n      : l === 4 ? rgba((m >> 12 & 0xf) | (m >> 8 & 0xf0), (m >> 8 & 0xf) | (m >> 4 & 0xf0), (m >> 4 & 0xf) | (m & 0xf0), (((m & 0xf) << 4) | (m & 0xf)) / 0xff) // #f000\n      : null) // invalid hex\n      : (m = reRgbInteger.exec(format)) ? new Rgb(m[1], m[2], m[3], 1) // rgb(255, 0, 0)\n      : (m = reRgbPercent.exec(format)) ? new Rgb(m[1] * 255 / 100, m[2] * 255 / 100, m[3] * 255 / 100, 1) // rgb(100%, 0%, 0%)\n      : (m = reRgbaInteger.exec(format)) ? rgba(m[1], m[2], m[3], m[4]) // rgba(255, 0, 0, 1)\n      : (m = reRgbaPercent.exec(format)) ? rgba(m[1] * 255 / 100, m[2] * 255 / 100, m[3] * 255 / 100, m[4]) // rgb(100%, 0%, 0%, 1)\n      : (m = reHslPercent.exec(format)) ? hsla(m[1], m[2] / 100, m[3] / 100, 1) // hsl(120, 50%, 50%)\n      : (m = reHslaPercent.exec(format)) ? hsla(m[1], m[2] / 100, m[3] / 100, m[4]) // hsla(120, 50%, 50%, 1)\n      : named.hasOwnProperty(format) ? rgbn(named[format]) // eslint-disable-line no-prototype-builtins\n      : format === \"transparent\" ? new Rgb(NaN, NaN, NaN, 0)\n      : null;\n}\n\nfunction rgbn(n) {\n  return new Rgb(n >> 16 & 0xff, n >> 8 & 0xff, n & 0xff, 1);\n}\n\nfunction rgba(r, g, b, a) {\n  if (a <= 0) r = g = b = NaN;\n  return new Rgb(r, g, b, a);\n}\n\nfunction rgbConvert(o) {\n  if (!(o instanceof Color)) o = color(o);\n  if (!o) return new Rgb;\n  o = o.rgb();\n  return new Rgb(o.r, o.g, o.b, o.opacity);\n}\n\nfunction rgb(r, g, b, opacity) {\n  return arguments.length === 1 ? rgbConvert(r) : new Rgb(r, g, b, opacity == null ? 1 : opacity);\n}\n\nfunction Rgb(r, g, b, opacity) {\n  this.r = +r;\n  this.g = +g;\n  this.b = +b;\n  this.opacity = +opacity;\n}\n\nObject(_define_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(Rgb, rgb, Object(_define_js__WEBPACK_IMPORTED_MODULE_0__[\"extend\"])(Color, {\n  brighter: function(k) {\n    k = k == null ? brighter : Math.pow(brighter, k);\n    return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity);\n  },\n  darker: function(k) {\n    k = k == null ? darker : Math.pow(darker, k);\n    return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity);\n  },\n  rgb: function() {\n    return this;\n  },\n  displayable: function() {\n    return (-0.5 <= this.r && this.r < 255.5)\n        && (-0.5 <= this.g && this.g < 255.5)\n        && (-0.5 <= this.b && this.b < 255.5)\n        && (0 <= this.opacity && this.opacity <= 1);\n  },\n  hex: rgb_formatHex, // Deprecated! Use color.formatHex.\n  formatHex: rgb_formatHex,\n  formatRgb: rgb_formatRgb,\n  toString: rgb_formatRgb\n}));\n\nfunction rgb_formatHex() {\n  return \"#\" + hex(this.r) + hex(this.g) + hex(this.b);\n}\n\nfunction rgb_formatRgb() {\n  var a = this.opacity; a = isNaN(a) ? 1 : Math.max(0, Math.min(1, a));\n  return (a === 1 ? \"rgb(\" : \"rgba(\")\n      + Math.max(0, Math.min(255, Math.round(this.r) || 0)) + \", \"\n      + Math.max(0, Math.min(255, Math.round(this.g) || 0)) + \", \"\n      + Math.max(0, Math.min(255, Math.round(this.b) || 0))\n      + (a === 1 ? \")\" : \", \" + a + \")\");\n}\n\nfunction hex(value) {\n  value = Math.max(0, Math.min(255, Math.round(value) || 0));\n  return (value < 16 ? \"0\" : \"\") + value.toString(16);\n}\n\nfunction hsla(h, s, l, a) {\n  if (a <= 0) h = s = l = NaN;\n  else if (l <= 0 || l >= 1) h = s = NaN;\n  else if (s <= 0) h = NaN;\n  return new Hsl(h, s, l, a);\n}\n\nfunction hslConvert(o) {\n  if (o instanceof Hsl) return new Hsl(o.h, o.s, o.l, o.opacity);\n  if (!(o instanceof Color)) o = color(o);\n  if (!o) return new Hsl;\n  if (o instanceof Hsl) return o;\n  o = o.rgb();\n  var r = o.r / 255,\n      g = o.g / 255,\n      b = o.b / 255,\n      min = Math.min(r, g, b),\n      max = Math.max(r, g, b),\n      h = NaN,\n      s = max - min,\n      l = (max + min) / 2;\n  if (s) {\n    if (r === max) h = (g - b) / s + (g < b) * 6;\n    else if (g === max) h = (b - r) / s + 2;\n    else h = (r - g) / s + 4;\n    s /= l < 0.5 ? max + min : 2 - max - min;\n    h *= 60;\n  } else {\n    s = l > 0 && l < 1 ? 0 : h;\n  }\n  return new Hsl(h, s, l, o.opacity);\n}\n\nfunction hsl(h, s, l, opacity) {\n  return arguments.length === 1 ? hslConvert(h) : new Hsl(h, s, l, opacity == null ? 1 : opacity);\n}\n\nfunction Hsl(h, s, l, opacity) {\n  this.h = +h;\n  this.s = +s;\n  this.l = +l;\n  this.opacity = +opacity;\n}\n\nObject(_define_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(Hsl, hsl, Object(_define_js__WEBPACK_IMPORTED_MODULE_0__[\"extend\"])(Color, {\n  brighter: function(k) {\n    k = k == null ? brighter : Math.pow(brighter, k);\n    return new Hsl(this.h, this.s, this.l * k, this.opacity);\n  },\n  darker: function(k) {\n    k = k == null ? darker : Math.pow(darker, k);\n    return new Hsl(this.h, this.s, this.l * k, this.opacity);\n  },\n  rgb: function() {\n    var h = this.h % 360 + (this.h < 0) * 360,\n        s = isNaN(h) || isNaN(this.s) ? 0 : this.s,\n        l = this.l,\n        m2 = l + (l < 0.5 ? l : 1 - l) * s,\n        m1 = 2 * l - m2;\n    return new Rgb(\n      hsl2rgb(h >= 240 ? h - 240 : h + 120, m1, m2),\n      hsl2rgb(h, m1, m2),\n      hsl2rgb(h < 120 ? h + 240 : h - 120, m1, m2),\n      this.opacity\n    );\n  },\n  displayable: function() {\n    return (0 <= this.s && this.s <= 1 || isNaN(this.s))\n        && (0 <= this.l && this.l <= 1)\n        && (0 <= this.opacity && this.opacity <= 1);\n  },\n  formatHsl: function() {\n    var a = this.opacity; a = isNaN(a) ? 1 : Math.max(0, Math.min(1, a));\n    return (a === 1 ? \"hsl(\" : \"hsla(\")\n        + (this.h || 0) + \", \"\n        + (this.s || 0) * 100 + \"%, \"\n        + (this.l || 0) * 100 + \"%\"\n        + (a === 1 ? \")\" : \", \" + a + \")\");\n  }\n}));\n\n/* From FvD 13.37, CSS Color Module Level 3 */\nfunction hsl2rgb(h, m1, m2) {\n  return (h < 60 ? m1 + (m2 - m1) * h / 60\n      : h < 180 ? m2\n      : h < 240 ? m1 + (m2 - m1) * (240 - h) / 60\n      : m1) * 255;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-zoom/node_modules/d3-color/src/cubehelix.js\":\n/*!*********************************************************************!*\\\n  !*** ./node_modules/d3-zoom/node_modules/d3-color/src/cubehelix.js ***!\n  \\*********************************************************************/\n/*! exports provided: default, Cubehelix */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return cubehelix; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Cubehelix\", function() { return Cubehelix; });\n/* harmony import */ var _define_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./define.js */ \"./node_modules/d3-zoom/node_modules/d3-color/src/define.js\");\n/* harmony import */ var _color_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./color.js */ \"./node_modules/d3-zoom/node_modules/d3-color/src/color.js\");\n/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./math.js */ \"./node_modules/d3-zoom/node_modules/d3-color/src/math.js\");\n\n\n\n\nvar A = -0.14861,\n    B = +1.78277,\n    C = -0.29227,\n    D = -0.90649,\n    E = +1.97294,\n    ED = E * D,\n    EB = E * B,\n    BC_DA = B * C - D * A;\n\nfunction cubehelixConvert(o) {\n  if (o instanceof Cubehelix) return new Cubehelix(o.h, o.s, o.l, o.opacity);\n  if (!(o instanceof _color_js__WEBPACK_IMPORTED_MODULE_1__[\"Rgb\"])) o = Object(_color_js__WEBPACK_IMPORTED_MODULE_1__[\"rgbConvert\"])(o);\n  var r = o.r / 255,\n      g = o.g / 255,\n      b = o.b / 255,\n      l = (BC_DA * b + ED * r - EB * g) / (BC_DA + ED - EB),\n      bl = b - l,\n      k = (E * (g - l) - C * bl) / D,\n      s = Math.sqrt(k * k + bl * bl) / (E * l * (1 - l)), // NaN if l=0 or l=1\n      h = s ? Math.atan2(k, bl) * _math_js__WEBPACK_IMPORTED_MODULE_2__[\"degrees\"] - 120 : NaN;\n  return new Cubehelix(h < 0 ? h + 360 : h, s, l, o.opacity);\n}\n\nfunction cubehelix(h, s, l, opacity) {\n  return arguments.length === 1 ? cubehelixConvert(h) : new Cubehelix(h, s, l, opacity == null ? 1 : opacity);\n}\n\nfunction Cubehelix(h, s, l, opacity) {\n  this.h = +h;\n  this.s = +s;\n  this.l = +l;\n  this.opacity = +opacity;\n}\n\nObject(_define_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(Cubehelix, cubehelix, Object(_define_js__WEBPACK_IMPORTED_MODULE_0__[\"extend\"])(_color_js__WEBPACK_IMPORTED_MODULE_1__[\"Color\"], {\n  brighter: function(k) {\n    k = k == null ? _color_js__WEBPACK_IMPORTED_MODULE_1__[\"brighter\"] : Math.pow(_color_js__WEBPACK_IMPORTED_MODULE_1__[\"brighter\"], k);\n    return new Cubehelix(this.h, this.s, this.l * k, this.opacity);\n  },\n  darker: function(k) {\n    k = k == null ? _color_js__WEBPACK_IMPORTED_MODULE_1__[\"darker\"] : Math.pow(_color_js__WEBPACK_IMPORTED_MODULE_1__[\"darker\"], k);\n    return new Cubehelix(this.h, this.s, this.l * k, this.opacity);\n  },\n  rgb: function() {\n    var h = isNaN(this.h) ? 0 : (this.h + 120) * _math_js__WEBPACK_IMPORTED_MODULE_2__[\"radians\"],\n        l = +this.l,\n        a = isNaN(this.s) ? 0 : this.s * l * (1 - l),\n        cosh = Math.cos(h),\n        sinh = Math.sin(h);\n    return new _color_js__WEBPACK_IMPORTED_MODULE_1__[\"Rgb\"](\n      255 * (l + a * (A * cosh + B * sinh)),\n      255 * (l + a * (C * cosh + D * sinh)),\n      255 * (l + a * (E * cosh)),\n      this.opacity\n    );\n  }\n}));\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-zoom/node_modules/d3-color/src/define.js\":\n/*!******************************************************************!*\\\n  !*** ./node_modules/d3-zoom/node_modules/d3-color/src/define.js ***!\n  \\******************************************************************/\n/*! exports provided: default, extend */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"extend\", function() { return extend; });\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(constructor, factory, prototype) {\n  constructor.prototype = factory.prototype = prototype;\n  prototype.constructor = constructor;\n});\n\nfunction extend(parent, definition) {\n  var prototype = Object.create(parent.prototype);\n  for (var key in definition) prototype[key] = definition[key];\n  return prototype;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-zoom/node_modules/d3-color/src/index.js\":\n/*!*****************************************************************!*\\\n  !*** ./node_modules/d3-zoom/node_modules/d3-color/src/index.js ***!\n  \\*****************************************************************/\n/*! exports provided: color, rgb, hsl, lab, hcl, lch, gray, cubehelix */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _color_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./color.js */ \"./node_modules/d3-zoom/node_modules/d3-color/src/color.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"color\", function() { return _color_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"rgb\", function() { return _color_js__WEBPACK_IMPORTED_MODULE_0__[\"rgb\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"hsl\", function() { return _color_js__WEBPACK_IMPORTED_MODULE_0__[\"hsl\"]; });\n\n/* harmony import */ var _lab_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./lab.js */ \"./node_modules/d3-zoom/node_modules/d3-color/src/lab.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"lab\", function() { return _lab_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"hcl\", function() { return _lab_js__WEBPACK_IMPORTED_MODULE_1__[\"hcl\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"lch\", function() { return _lab_js__WEBPACK_IMPORTED_MODULE_1__[\"lch\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"gray\", function() { return _lab_js__WEBPACK_IMPORTED_MODULE_1__[\"gray\"]; });\n\n/* harmony import */ var _cubehelix_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./cubehelix.js */ \"./node_modules/d3-zoom/node_modules/d3-color/src/cubehelix.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"cubehelix\", function() { return _cubehelix_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"]; });\n\n\n\n\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-zoom/node_modules/d3-color/src/lab.js\":\n/*!***************************************************************!*\\\n  !*** ./node_modules/d3-zoom/node_modules/d3-color/src/lab.js ***!\n  \\***************************************************************/\n/*! exports provided: gray, default, Lab, lch, hcl, Hcl */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"gray\", function() { return gray; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return lab; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Lab\", function() { return Lab; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"lch\", function() { return lch; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"hcl\", function() { return hcl; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Hcl\", function() { return Hcl; });\n/* harmony import */ var _define_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./define.js */ \"./node_modules/d3-zoom/node_modules/d3-color/src/define.js\");\n/* harmony import */ var _color_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./color.js */ \"./node_modules/d3-zoom/node_modules/d3-color/src/color.js\");\n/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./math.js */ \"./node_modules/d3-zoom/node_modules/d3-color/src/math.js\");\n\n\n\n\n// https://observablehq.com/@mbostock/lab-and-rgb\nconst K = 18,\n    Xn = 0.96422,\n    Yn = 1,\n    Zn = 0.82521,\n    t0 = 4 / 29,\n    t1 = 6 / 29,\n    t2 = 3 * t1 * t1,\n    t3 = t1 * t1 * t1;\n\nfunction labConvert(o) {\n  if (o instanceof Lab) return new Lab(o.l, o.a, o.b, o.opacity);\n  if (o instanceof Hcl) return hcl2lab(o);\n  if (!(o instanceof _color_js__WEBPACK_IMPORTED_MODULE_1__[\"Rgb\"])) o = Object(_color_js__WEBPACK_IMPORTED_MODULE_1__[\"rgbConvert\"])(o);\n  var r = rgb2lrgb(o.r),\n      g = rgb2lrgb(o.g),\n      b = rgb2lrgb(o.b),\n      y = xyz2lab((0.2225045 * r + 0.7168786 * g + 0.0606169 * b) / Yn), x, z;\n  if (r === g && g === b) x = z = y; else {\n    x = xyz2lab((0.4360747 * r + 0.3850649 * g + 0.1430804 * b) / Xn);\n    z = xyz2lab((0.0139322 * r + 0.0971045 * g + 0.7141733 * b) / Zn);\n  }\n  return new Lab(116 * y - 16, 500 * (x - y), 200 * (y - z), o.opacity);\n}\n\nfunction gray(l, opacity) {\n  return new Lab(l, 0, 0, opacity == null ? 1 : opacity);\n}\n\nfunction lab(l, a, b, opacity) {\n  return arguments.length === 1 ? labConvert(l) : new Lab(l, a, b, opacity == null ? 1 : opacity);\n}\n\nfunction Lab(l, a, b, opacity) {\n  this.l = +l;\n  this.a = +a;\n  this.b = +b;\n  this.opacity = +opacity;\n}\n\nObject(_define_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(Lab, lab, Object(_define_js__WEBPACK_IMPORTED_MODULE_0__[\"extend\"])(_color_js__WEBPACK_IMPORTED_MODULE_1__[\"Color\"], {\n  brighter: function(k) {\n    return new Lab(this.l + K * (k == null ? 1 : k), this.a, this.b, this.opacity);\n  },\n  darker: function(k) {\n    return new Lab(this.l - K * (k == null ? 1 : k), this.a, this.b, this.opacity);\n  },\n  rgb: function() {\n    var y = (this.l + 16) / 116,\n        x = isNaN(this.a) ? y : y + this.a / 500,\n        z = isNaN(this.b) ? y : y - this.b / 200;\n    x = Xn * lab2xyz(x);\n    y = Yn * lab2xyz(y);\n    z = Zn * lab2xyz(z);\n    return new _color_js__WEBPACK_IMPORTED_MODULE_1__[\"Rgb\"](\n      lrgb2rgb( 3.1338561 * x - 1.6168667 * y - 0.4906146 * z),\n      lrgb2rgb(-0.9787684 * x + 1.9161415 * y + 0.0334540 * z),\n      lrgb2rgb( 0.0719453 * x - 0.2289914 * y + 1.4052427 * z),\n      this.opacity\n    );\n  }\n}));\n\nfunction xyz2lab(t) {\n  return t > t3 ? Math.pow(t, 1 / 3) : t / t2 + t0;\n}\n\nfunction lab2xyz(t) {\n  return t > t1 ? t * t * t : t2 * (t - t0);\n}\n\nfunction lrgb2rgb(x) {\n  return 255 * (x <= 0.0031308 ? 12.92 * x : 1.055 * Math.pow(x, 1 / 2.4) - 0.055);\n}\n\nfunction rgb2lrgb(x) {\n  return (x /= 255) <= 0.04045 ? x / 12.92 : Math.pow((x + 0.055) / 1.055, 2.4);\n}\n\nfunction hclConvert(o) {\n  if (o instanceof Hcl) return new Hcl(o.h, o.c, o.l, o.opacity);\n  if (!(o instanceof Lab)) o = labConvert(o);\n  if (o.a === 0 && o.b === 0) return new Hcl(NaN, 0 < o.l && o.l < 100 ? 0 : NaN, o.l, o.opacity);\n  var h = Math.atan2(o.b, o.a) * _math_js__WEBPACK_IMPORTED_MODULE_2__[\"degrees\"];\n  return new Hcl(h < 0 ? h + 360 : h, Math.sqrt(o.a * o.a + o.b * o.b), o.l, o.opacity);\n}\n\nfunction lch(l, c, h, opacity) {\n  return arguments.length === 1 ? hclConvert(l) : new Hcl(h, c, l, opacity == null ? 1 : opacity);\n}\n\nfunction hcl(h, c, l, opacity) {\n  return arguments.length === 1 ? hclConvert(h) : new Hcl(h, c, l, opacity == null ? 1 : opacity);\n}\n\nfunction Hcl(h, c, l, opacity) {\n  this.h = +h;\n  this.c = +c;\n  this.l = +l;\n  this.opacity = +opacity;\n}\n\nfunction hcl2lab(o) {\n  if (isNaN(o.h)) return new Lab(o.l, 0, 0, o.opacity);\n  var h = o.h * _math_js__WEBPACK_IMPORTED_MODULE_2__[\"radians\"];\n  return new Lab(o.l, Math.cos(h) * o.c, Math.sin(h) * o.c, o.opacity);\n}\n\nObject(_define_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(Hcl, hcl, Object(_define_js__WEBPACK_IMPORTED_MODULE_0__[\"extend\"])(_color_js__WEBPACK_IMPORTED_MODULE_1__[\"Color\"], {\n  brighter: function(k) {\n    return new Hcl(this.h, this.c, this.l + K * (k == null ? 1 : k), this.opacity);\n  },\n  darker: function(k) {\n    return new Hcl(this.h, this.c, this.l - K * (k == null ? 1 : k), this.opacity);\n  },\n  rgb: function() {\n    return hcl2lab(this).rgb();\n  }\n}));\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-zoom/node_modules/d3-color/src/math.js\":\n/*!****************************************************************!*\\\n  !*** ./node_modules/d3-zoom/node_modules/d3-color/src/math.js ***!\n  \\****************************************************************/\n/*! exports provided: radians, degrees */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"radians\", function() { return radians; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"degrees\", function() { return degrees; });\nconst radians = Math.PI / 180;\nconst degrees = 180 / Math.PI;\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-zoom/node_modules/d3-dispatch/src/dispatch.js\":\n/*!***********************************************************************!*\\\n  !*** ./node_modules/d3-zoom/node_modules/d3-dispatch/src/dispatch.js ***!\n  \\***********************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\nvar noop = {value: () => {}};\n\nfunction dispatch() {\n  for (var i = 0, n = arguments.length, _ = {}, t; i < n; ++i) {\n    if (!(t = arguments[i] + \"\") || (t in _) || /[\\s.]/.test(t)) throw new Error(\"illegal type: \" + t);\n    _[t] = [];\n  }\n  return new Dispatch(_);\n}\n\nfunction Dispatch(_) {\n  this._ = _;\n}\n\nfunction parseTypenames(typenames, types) {\n  return typenames.trim().split(/^|\\s+/).map(function(t) {\n    var name = \"\", i = t.indexOf(\".\");\n    if (i >= 0) name = t.slice(i + 1), t = t.slice(0, i);\n    if (t && !types.hasOwnProperty(t)) throw new Error(\"unknown type: \" + t);\n    return {type: t, name: name};\n  });\n}\n\nDispatch.prototype = dispatch.prototype = {\n  constructor: Dispatch,\n  on: function(typename, callback) {\n    var _ = this._,\n        T = parseTypenames(typename + \"\", _),\n        t,\n        i = -1,\n        n = T.length;\n\n    // If no callback was specified, return the callback of the given type and name.\n    if (arguments.length < 2) {\n      while (++i < n) if ((t = (typename = T[i]).type) && (t = get(_[t], typename.name))) return t;\n      return;\n    }\n\n    // If a type was specified, set the callback for the given type and name.\n    // Otherwise, if a null callback was specified, remove callbacks of the given name.\n    if (callback != null && typeof callback !== \"function\") throw new Error(\"invalid callback: \" + callback);\n    while (++i < n) {\n      if (t = (typename = T[i]).type) _[t] = set(_[t], typename.name, callback);\n      else if (callback == null) for (t in _) _[t] = set(_[t], typename.name, null);\n    }\n\n    return this;\n  },\n  copy: function() {\n    var copy = {}, _ = this._;\n    for (var t in _) copy[t] = _[t].slice();\n    return new Dispatch(copy);\n  },\n  call: function(type, that) {\n    if ((n = arguments.length - 2) > 0) for (var args = new Array(n), i = 0, n, t; i < n; ++i) args[i] = arguments[i + 2];\n    if (!this._.hasOwnProperty(type)) throw new Error(\"unknown type: \" + type);\n    for (t = this._[type], i = 0, n = t.length; i < n; ++i) t[i].value.apply(that, args);\n  },\n  apply: function(type, that, args) {\n    if (!this._.hasOwnProperty(type)) throw new Error(\"unknown type: \" + type);\n    for (var t = this._[type], i = 0, n = t.length; i < n; ++i) t[i].value.apply(that, args);\n  }\n};\n\nfunction get(type, name) {\n  for (var i = 0, n = type.length, c; i < n; ++i) {\n    if ((c = type[i]).name === name) {\n      return c.value;\n    }\n  }\n}\n\nfunction set(type, name, callback) {\n  for (var i = 0, n = type.length; i < n; ++i) {\n    if (type[i].name === name) {\n      type[i] = noop, type = type.slice(0, i).concat(type.slice(i + 1));\n      break;\n    }\n  }\n  if (callback != null) type.push({name: name, value: callback});\n  return type;\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (dispatch);\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-zoom/node_modules/d3-dispatch/src/index.js\":\n/*!********************************************************************!*\\\n  !*** ./node_modules/d3-zoom/node_modules/d3-dispatch/src/index.js ***!\n  \\********************************************************************/\n/*! exports provided: dispatch */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _dispatch_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./dispatch.js */ \"./node_modules/d3-zoom/node_modules/d3-dispatch/src/dispatch.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"dispatch\", function() { return _dispatch_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-zoom/node_modules/d3-drag/src/constant.js\":\n/*!*******************************************************************!*\\\n  !*** ./node_modules/d3-zoom/node_modules/d3-drag/src/constant.js ***!\n  \\*******************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (x => () => x);\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-zoom/node_modules/d3-drag/src/drag.js\":\n/*!***************************************************************!*\\\n  !*** ./node_modules/d3-zoom/node_modules/d3-drag/src/drag.js ***!\n  \\***************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var d3_dispatch__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-dispatch */ \"./node_modules/d3-zoom/node_modules/d3-dispatch/src/index.js\");\n/* harmony import */ var d3_selection__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! d3-selection */ \"./node_modules/d3-zoom/node_modules/d3-selection/src/index.js\");\n/* harmony import */ var _nodrag_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./nodrag.js */ \"./node_modules/d3-zoom/node_modules/d3-drag/src/nodrag.js\");\n/* harmony import */ var _noevent_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./noevent.js */ \"./node_modules/d3-zoom/node_modules/d3-drag/src/noevent.js\");\n/* harmony import */ var _constant_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./constant.js */ \"./node_modules/d3-zoom/node_modules/d3-drag/src/constant.js\");\n/* harmony import */ var _event_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./event.js */ \"./node_modules/d3-zoom/node_modules/d3-drag/src/event.js\");\n\n\n\n\n\n\n\n// Ignore right-click, since that should open the context menu.\nfunction defaultFilter(event) {\n  return !event.ctrlKey && !event.button;\n}\n\nfunction defaultContainer() {\n  return this.parentNode;\n}\n\nfunction defaultSubject(event, d) {\n  return d == null ? {x: event.x, y: event.y} : d;\n}\n\nfunction defaultTouchable() {\n  return navigator.maxTouchPoints || (\"ontouchstart\" in this);\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  var filter = defaultFilter,\n      container = defaultContainer,\n      subject = defaultSubject,\n      touchable = defaultTouchable,\n      gestures = {},\n      listeners = Object(d3_dispatch__WEBPACK_IMPORTED_MODULE_0__[\"dispatch\"])(\"start\", \"drag\", \"end\"),\n      active = 0,\n      mousedownx,\n      mousedowny,\n      mousemoving,\n      touchending,\n      clickDistance2 = 0;\n\n  function drag(selection) {\n    selection\n        .on(\"mousedown.drag\", mousedowned)\n      .filter(touchable)\n        .on(\"touchstart.drag\", touchstarted)\n        .on(\"touchmove.drag\", touchmoved, _noevent_js__WEBPACK_IMPORTED_MODULE_3__[\"nonpassive\"])\n        .on(\"touchend.drag touchcancel.drag\", touchended)\n        .style(\"touch-action\", \"none\")\n        .style(\"-webkit-tap-highlight-color\", \"rgba(0,0,0,0)\");\n  }\n\n  function mousedowned(event, d) {\n    if (touchending || !filter.call(this, event, d)) return;\n    var gesture = beforestart(this, container.call(this, event, d), event, d, \"mouse\");\n    if (!gesture) return;\n    Object(d3_selection__WEBPACK_IMPORTED_MODULE_1__[\"select\"])(event.view)\n      .on(\"mousemove.drag\", mousemoved, _noevent_js__WEBPACK_IMPORTED_MODULE_3__[\"nonpassivecapture\"])\n      .on(\"mouseup.drag\", mouseupped, _noevent_js__WEBPACK_IMPORTED_MODULE_3__[\"nonpassivecapture\"]);\n    Object(_nodrag_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(event.view);\n    Object(_noevent_js__WEBPACK_IMPORTED_MODULE_3__[\"nopropagation\"])(event);\n    mousemoving = false;\n    mousedownx = event.clientX;\n    mousedowny = event.clientY;\n    gesture(\"start\", event);\n  }\n\n  function mousemoved(event) {\n    Object(_noevent_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(event);\n    if (!mousemoving) {\n      var dx = event.clientX - mousedownx, dy = event.clientY - mousedowny;\n      mousemoving = dx * dx + dy * dy > clickDistance2;\n    }\n    gestures.mouse(\"drag\", event);\n  }\n\n  function mouseupped(event) {\n    Object(d3_selection__WEBPACK_IMPORTED_MODULE_1__[\"select\"])(event.view).on(\"mousemove.drag mouseup.drag\", null);\n    Object(_nodrag_js__WEBPACK_IMPORTED_MODULE_2__[\"yesdrag\"])(event.view, mousemoving);\n    Object(_noevent_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(event);\n    gestures.mouse(\"end\", event);\n  }\n\n  function touchstarted(event, d) {\n    if (!filter.call(this, event, d)) return;\n    var touches = event.changedTouches,\n        c = container.call(this, event, d),\n        n = touches.length, i, gesture;\n\n    for (i = 0; i < n; ++i) {\n      if (gesture = beforestart(this, c, event, d, touches[i].identifier, touches[i])) {\n        Object(_noevent_js__WEBPACK_IMPORTED_MODULE_3__[\"nopropagation\"])(event);\n        gesture(\"start\", event, touches[i]);\n      }\n    }\n  }\n\n  function touchmoved(event) {\n    var touches = event.changedTouches,\n        n = touches.length, i, gesture;\n\n    for (i = 0; i < n; ++i) {\n      if (gesture = gestures[touches[i].identifier]) {\n        Object(_noevent_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(event);\n        gesture(\"drag\", event, touches[i]);\n      }\n    }\n  }\n\n  function touchended(event) {\n    var touches = event.changedTouches,\n        n = touches.length, i, gesture;\n\n    if (touchending) clearTimeout(touchending);\n    touchending = setTimeout(function() { touchending = null; }, 500); // Ghost clicks are delayed!\n    for (i = 0; i < n; ++i) {\n      if (gesture = gestures[touches[i].identifier]) {\n        Object(_noevent_js__WEBPACK_IMPORTED_MODULE_3__[\"nopropagation\"])(event);\n        gesture(\"end\", event, touches[i]);\n      }\n    }\n  }\n\n  function beforestart(that, container, event, d, identifier, touch) {\n    var dispatch = listeners.copy(),\n        p = Object(d3_selection__WEBPACK_IMPORTED_MODULE_1__[\"pointer\"])(touch || event, container), dx, dy,\n        s;\n\n    if ((s = subject.call(that, new _event_js__WEBPACK_IMPORTED_MODULE_5__[\"default\"](\"beforestart\", {\n        sourceEvent: event,\n        target: drag,\n        identifier,\n        active,\n        x: p[0],\n        y: p[1],\n        dx: 0,\n        dy: 0,\n        dispatch\n      }), d)) == null) return;\n\n    dx = s.x - p[0] || 0;\n    dy = s.y - p[1] || 0;\n\n    return function gesture(type, event, touch) {\n      var p0 = p, n;\n      switch (type) {\n        case \"start\": gestures[identifier] = gesture, n = active++; break;\n        case \"end\": delete gestures[identifier], --active; // falls through\n        case \"drag\": p = Object(d3_selection__WEBPACK_IMPORTED_MODULE_1__[\"pointer\"])(touch || event, container), n = active; break;\n      }\n      dispatch.call(\n        type,\n        that,\n        new _event_js__WEBPACK_IMPORTED_MODULE_5__[\"default\"](type, {\n          sourceEvent: event,\n          subject: s,\n          target: drag,\n          identifier,\n          active: n,\n          x: p[0] + dx,\n          y: p[1] + dy,\n          dx: p[0] - p0[0],\n          dy: p[1] - p0[1],\n          dispatch\n        }),\n        d\n      );\n    };\n  }\n\n  drag.filter = function(_) {\n    return arguments.length ? (filter = typeof _ === \"function\" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(!!_), drag) : filter;\n  };\n\n  drag.container = function(_) {\n    return arguments.length ? (container = typeof _ === \"function\" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(_), drag) : container;\n  };\n\n  drag.subject = function(_) {\n    return arguments.length ? (subject = typeof _ === \"function\" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(_), drag) : subject;\n  };\n\n  drag.touchable = function(_) {\n    return arguments.length ? (touchable = typeof _ === \"function\" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(!!_), drag) : touchable;\n  };\n\n  drag.on = function() {\n    var value = listeners.on.apply(listeners, arguments);\n    return value === listeners ? drag : value;\n  };\n\n  drag.clickDistance = function(_) {\n    return arguments.length ? (clickDistance2 = (_ = +_) * _, drag) : Math.sqrt(clickDistance2);\n  };\n\n  return drag;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-zoom/node_modules/d3-drag/src/event.js\":\n/*!****************************************************************!*\\\n  !*** ./node_modules/d3-zoom/node_modules/d3-drag/src/event.js ***!\n  \\****************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return DragEvent; });\nfunction DragEvent(type, {\n  sourceEvent,\n  subject,\n  target,\n  identifier,\n  active,\n  x, y, dx, dy,\n  dispatch\n}) {\n  Object.defineProperties(this, {\n    type: {value: type, enumerable: true, configurable: true},\n    sourceEvent: {value: sourceEvent, enumerable: true, configurable: true},\n    subject: {value: subject, enumerable: true, configurable: true},\n    target: {value: target, enumerable: true, configurable: true},\n    identifier: {value: identifier, enumerable: true, configurable: true},\n    active: {value: active, enumerable: true, configurable: true},\n    x: {value: x, enumerable: true, configurable: true},\n    y: {value: y, enumerable: true, configurable: true},\n    dx: {value: dx, enumerable: true, configurable: true},\n    dy: {value: dy, enumerable: true, configurable: true},\n    _: {value: dispatch}\n  });\n}\n\nDragEvent.prototype.on = function() {\n  var value = this._.on.apply(this._, arguments);\n  return value === this._ ? this : value;\n};\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-zoom/node_modules/d3-drag/src/index.js\":\n/*!****************************************************************!*\\\n  !*** ./node_modules/d3-zoom/node_modules/d3-drag/src/index.js ***!\n  \\****************************************************************/\n/*! exports provided: drag, dragDisable, dragEnable */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _drag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./drag.js */ \"./node_modules/d3-zoom/node_modules/d3-drag/src/drag.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"drag\", function() { return _drag_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n/* harmony import */ var _nodrag_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./nodrag.js */ \"./node_modules/d3-zoom/node_modules/d3-drag/src/nodrag.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"dragDisable\", function() { return _nodrag_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"dragEnable\", function() { return _nodrag_js__WEBPACK_IMPORTED_MODULE_1__[\"yesdrag\"]; });\n\n\n\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-zoom/node_modules/d3-drag/src/nodrag.js\":\n/*!*****************************************************************!*\\\n  !*** ./node_modules/d3-zoom/node_modules/d3-drag/src/nodrag.js ***!\n  \\*****************************************************************/\n/*! exports provided: default, yesdrag */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"yesdrag\", function() { return yesdrag; });\n/* harmony import */ var d3_selection__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-selection */ \"./node_modules/d3-zoom/node_modules/d3-selection/src/index.js\");\n/* harmony import */ var _noevent_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./noevent.js */ \"./node_modules/d3-zoom/node_modules/d3-drag/src/noevent.js\");\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(view) {\n  var root = view.document.documentElement,\n      selection = Object(d3_selection__WEBPACK_IMPORTED_MODULE_0__[\"select\"])(view).on(\"dragstart.drag\", _noevent_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"], _noevent_js__WEBPACK_IMPORTED_MODULE_1__[\"nonpassivecapture\"]);\n  if (\"onselectstart\" in root) {\n    selection.on(\"selectstart.drag\", _noevent_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"], _noevent_js__WEBPACK_IMPORTED_MODULE_1__[\"nonpassivecapture\"]);\n  } else {\n    root.__noselect = root.style.MozUserSelect;\n    root.style.MozUserSelect = \"none\";\n  }\n});\n\nfunction yesdrag(view, noclick) {\n  var root = view.document.documentElement,\n      selection = Object(d3_selection__WEBPACK_IMPORTED_MODULE_0__[\"select\"])(view).on(\"dragstart.drag\", null);\n  if (noclick) {\n    selection.on(\"click.drag\", _noevent_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"], _noevent_js__WEBPACK_IMPORTED_MODULE_1__[\"nonpassivecapture\"]);\n    setTimeout(function() { selection.on(\"click.drag\", null); }, 0);\n  }\n  if (\"onselectstart\" in root) {\n    selection.on(\"selectstart.drag\", null);\n  } else {\n    root.style.MozUserSelect = root.__noselect;\n    delete root.__noselect;\n  }\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-zoom/node_modules/d3-drag/src/noevent.js\":\n/*!******************************************************************!*\\\n  !*** ./node_modules/d3-zoom/node_modules/d3-drag/src/noevent.js ***!\n  \\******************************************************************/\n/*! exports provided: nonpassive, nonpassivecapture, nopropagation, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"nonpassive\", function() { return nonpassive; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"nonpassivecapture\", function() { return nonpassivecapture; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"nopropagation\", function() { return nopropagation; });\n// These are typically used in conjunction with noevent to ensure that we can\n// preventDefault on the event.\nconst nonpassive = {passive: false};\nconst nonpassivecapture = {capture: true, passive: false};\n\nfunction nopropagation(event) {\n  event.stopImmediatePropagation();\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(event) {\n  event.preventDefault();\n  event.stopImmediatePropagation();\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-zoom/node_modules/d3-ease/src/back.js\":\n/*!***************************************************************!*\\\n  !*** ./node_modules/d3-zoom/node_modules/d3-ease/src/back.js ***!\n  \\***************************************************************/\n/*! exports provided: backIn, backOut, backInOut */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"backIn\", function() { return backIn; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"backOut\", function() { return backOut; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"backInOut\", function() { return backInOut; });\nvar overshoot = 1.70158;\n\nvar backIn = (function custom(s) {\n  s = +s;\n\n  function backIn(t) {\n    return (t = +t) * t * (s * (t - 1) + t);\n  }\n\n  backIn.overshoot = custom;\n\n  return backIn;\n})(overshoot);\n\nvar backOut = (function custom(s) {\n  s = +s;\n\n  function backOut(t) {\n    return --t * t * ((t + 1) * s + t) + 1;\n  }\n\n  backOut.overshoot = custom;\n\n  return backOut;\n})(overshoot);\n\nvar backInOut = (function custom(s) {\n  s = +s;\n\n  function backInOut(t) {\n    return ((t *= 2) < 1 ? t * t * ((s + 1) * t - s) : (t -= 2) * t * ((s + 1) * t + s) + 2) / 2;\n  }\n\n  backInOut.overshoot = custom;\n\n  return backInOut;\n})(overshoot);\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-zoom/node_modules/d3-ease/src/bounce.js\":\n/*!*****************************************************************!*\\\n  !*** ./node_modules/d3-zoom/node_modules/d3-ease/src/bounce.js ***!\n  \\*****************************************************************/\n/*! exports provided: bounceIn, bounceOut, bounceInOut */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"bounceIn\", function() { return bounceIn; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"bounceOut\", function() { return bounceOut; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"bounceInOut\", function() { return bounceInOut; });\nvar b1 = 4 / 11,\n    b2 = 6 / 11,\n    b3 = 8 / 11,\n    b4 = 3 / 4,\n    b5 = 9 / 11,\n    b6 = 10 / 11,\n    b7 = 15 / 16,\n    b8 = 21 / 22,\n    b9 = 63 / 64,\n    b0 = 1 / b1 / b1;\n\nfunction bounceIn(t) {\n  return 1 - bounceOut(1 - t);\n}\n\nfunction bounceOut(t) {\n  return (t = +t) < b1 ? b0 * t * t : t < b3 ? b0 * (t -= b2) * t + b4 : t < b6 ? b0 * (t -= b5) * t + b7 : b0 * (t -= b8) * t + b9;\n}\n\nfunction bounceInOut(t) {\n  return ((t *= 2) <= 1 ? 1 - bounceOut(1 - t) : bounceOut(t - 1) + 1) / 2;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-zoom/node_modules/d3-ease/src/circle.js\":\n/*!*****************************************************************!*\\\n  !*** ./node_modules/d3-zoom/node_modules/d3-ease/src/circle.js ***!\n  \\*****************************************************************/\n/*! exports provided: circleIn, circleOut, circleInOut */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"circleIn\", function() { return circleIn; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"circleOut\", function() { return circleOut; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"circleInOut\", function() { return circleInOut; });\nfunction circleIn(t) {\n  return 1 - Math.sqrt(1 - t * t);\n}\n\nfunction circleOut(t) {\n  return Math.sqrt(1 - --t * t);\n}\n\nfunction circleInOut(t) {\n  return ((t *= 2) <= 1 ? 1 - Math.sqrt(1 - t * t) : Math.sqrt(1 - (t -= 2) * t) + 1) / 2;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-zoom/node_modules/d3-ease/src/cubic.js\":\n/*!****************************************************************!*\\\n  !*** ./node_modules/d3-zoom/node_modules/d3-ease/src/cubic.js ***!\n  \\****************************************************************/\n/*! exports provided: cubicIn, cubicOut, cubicInOut */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"cubicIn\", function() { return cubicIn; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"cubicOut\", function() { return cubicOut; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"cubicInOut\", function() { return cubicInOut; });\nfunction cubicIn(t) {\n  return t * t * t;\n}\n\nfunction cubicOut(t) {\n  return --t * t * t + 1;\n}\n\nfunction cubicInOut(t) {\n  return ((t *= 2) <= 1 ? t * t * t : (t -= 2) * t * t + 2) / 2;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-zoom/node_modules/d3-ease/src/elastic.js\":\n/*!******************************************************************!*\\\n  !*** ./node_modules/d3-zoom/node_modules/d3-ease/src/elastic.js ***!\n  \\******************************************************************/\n/*! exports provided: elasticIn, elasticOut, elasticInOut */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"elasticIn\", function() { return elasticIn; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"elasticOut\", function() { return elasticOut; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"elasticInOut\", function() { return elasticInOut; });\n/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./math.js */ \"./node_modules/d3-zoom/node_modules/d3-ease/src/math.js\");\n\n\nvar tau = 2 * Math.PI,\n    amplitude = 1,\n    period = 0.3;\n\nvar elasticIn = (function custom(a, p) {\n  var s = Math.asin(1 / (a = Math.max(1, a))) * (p /= tau);\n\n  function elasticIn(t) {\n    return a * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"tpmt\"])(-(--t)) * Math.sin((s - t) / p);\n  }\n\n  elasticIn.amplitude = function(a) { return custom(a, p * tau); };\n  elasticIn.period = function(p) { return custom(a, p); };\n\n  return elasticIn;\n})(amplitude, period);\n\nvar elasticOut = (function custom(a, p) {\n  var s = Math.asin(1 / (a = Math.max(1, a))) * (p /= tau);\n\n  function elasticOut(t) {\n    return 1 - a * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"tpmt\"])(t = +t) * Math.sin((t + s) / p);\n  }\n\n  elasticOut.amplitude = function(a) { return custom(a, p * tau); };\n  elasticOut.period = function(p) { return custom(a, p); };\n\n  return elasticOut;\n})(amplitude, period);\n\nvar elasticInOut = (function custom(a, p) {\n  var s = Math.asin(1 / (a = Math.max(1, a))) * (p /= tau);\n\n  function elasticInOut(t) {\n    return ((t = t * 2 - 1) < 0\n        ? a * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"tpmt\"])(-t) * Math.sin((s - t) / p)\n        : 2 - a * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"tpmt\"])(t) * Math.sin((s + t) / p)) / 2;\n  }\n\n  elasticInOut.amplitude = function(a) { return custom(a, p * tau); };\n  elasticInOut.period = function(p) { return custom(a, p); };\n\n  return elasticInOut;\n})(amplitude, period);\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-zoom/node_modules/d3-ease/src/exp.js\":\n/*!**************************************************************!*\\\n  !*** ./node_modules/d3-zoom/node_modules/d3-ease/src/exp.js ***!\n  \\**************************************************************/\n/*! exports provided: expIn, expOut, expInOut */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"expIn\", function() { return expIn; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"expOut\", function() { return expOut; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"expInOut\", function() { return expInOut; });\n/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./math.js */ \"./node_modules/d3-zoom/node_modules/d3-ease/src/math.js\");\n\n\nfunction expIn(t) {\n  return Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"tpmt\"])(1 - +t);\n}\n\nfunction expOut(t) {\n  return 1 - Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"tpmt\"])(t);\n}\n\nfunction expInOut(t) {\n  return ((t *= 2) <= 1 ? Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"tpmt\"])(1 - t) : 2 - Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"tpmt\"])(t - 1)) / 2;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-zoom/node_modules/d3-ease/src/index.js\":\n/*!****************************************************************!*\\\n  !*** ./node_modules/d3-zoom/node_modules/d3-ease/src/index.js ***!\n  \\****************************************************************/\n/*! exports provided: easeLinear, easeQuad, easeQuadIn, easeQuadOut, easeQuadInOut, easeCubic, easeCubicIn, easeCubicOut, easeCubicInOut, easePoly, easePolyIn, easePolyOut, easePolyInOut, easeSin, easeSinIn, easeSinOut, easeSinInOut, easeExp, easeExpIn, easeExpOut, easeExpInOut, easeCircle, easeCircleIn, easeCircleOut, easeCircleInOut, easeBounce, easeBounceIn, easeBounceOut, easeBounceInOut, easeBack, easeBackIn, easeBackOut, easeBackInOut, easeElastic, easeElasticIn, easeElasticOut, easeElasticInOut */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _linear_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./linear.js */ \"./node_modules/d3-zoom/node_modules/d3-ease/src/linear.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeLinear\", function() { return _linear_js__WEBPACK_IMPORTED_MODULE_0__[\"linear\"]; });\n\n/* harmony import */ var _quad_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./quad.js */ \"./node_modules/d3-zoom/node_modules/d3-ease/src/quad.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeQuad\", function() { return _quad_js__WEBPACK_IMPORTED_MODULE_1__[\"quadInOut\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeQuadIn\", function() { return _quad_js__WEBPACK_IMPORTED_MODULE_1__[\"quadIn\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeQuadOut\", function() { return _quad_js__WEBPACK_IMPORTED_MODULE_1__[\"quadOut\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeQuadInOut\", function() { return _quad_js__WEBPACK_IMPORTED_MODULE_1__[\"quadInOut\"]; });\n\n/* harmony import */ var _cubic_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./cubic.js */ \"./node_modules/d3-zoom/node_modules/d3-ease/src/cubic.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeCubic\", function() { return _cubic_js__WEBPACK_IMPORTED_MODULE_2__[\"cubicInOut\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeCubicIn\", function() { return _cubic_js__WEBPACK_IMPORTED_MODULE_2__[\"cubicIn\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeCubicOut\", function() { return _cubic_js__WEBPACK_IMPORTED_MODULE_2__[\"cubicOut\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeCubicInOut\", function() { return _cubic_js__WEBPACK_IMPORTED_MODULE_2__[\"cubicInOut\"]; });\n\n/* harmony import */ var _poly_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./poly.js */ \"./node_modules/d3-zoom/node_modules/d3-ease/src/poly.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easePoly\", function() { return _poly_js__WEBPACK_IMPORTED_MODULE_3__[\"polyInOut\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easePolyIn\", function() { return _poly_js__WEBPACK_IMPORTED_MODULE_3__[\"polyIn\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easePolyOut\", function() { return _poly_js__WEBPACK_IMPORTED_MODULE_3__[\"polyOut\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easePolyInOut\", function() { return _poly_js__WEBPACK_IMPORTED_MODULE_3__[\"polyInOut\"]; });\n\n/* harmony import */ var _sin_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./sin.js */ \"./node_modules/d3-zoom/node_modules/d3-ease/src/sin.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeSin\", function() { return _sin_js__WEBPACK_IMPORTED_MODULE_4__[\"sinInOut\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeSinIn\", function() { return _sin_js__WEBPACK_IMPORTED_MODULE_4__[\"sinIn\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeSinOut\", function() { return _sin_js__WEBPACK_IMPORTED_MODULE_4__[\"sinOut\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeSinInOut\", function() { return _sin_js__WEBPACK_IMPORTED_MODULE_4__[\"sinInOut\"]; });\n\n/* harmony import */ var _exp_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./exp.js */ \"./node_modules/d3-zoom/node_modules/d3-ease/src/exp.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeExp\", function() { return _exp_js__WEBPACK_IMPORTED_MODULE_5__[\"expInOut\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeExpIn\", function() { return _exp_js__WEBPACK_IMPORTED_MODULE_5__[\"expIn\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeExpOut\", function() { return _exp_js__WEBPACK_IMPORTED_MODULE_5__[\"expOut\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeExpInOut\", function() { return _exp_js__WEBPACK_IMPORTED_MODULE_5__[\"expInOut\"]; });\n\n/* harmony import */ var _circle_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./circle.js */ \"./node_modules/d3-zoom/node_modules/d3-ease/src/circle.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeCircle\", function() { return _circle_js__WEBPACK_IMPORTED_MODULE_6__[\"circleInOut\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeCircleIn\", function() { return _circle_js__WEBPACK_IMPORTED_MODULE_6__[\"circleIn\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeCircleOut\", function() { return _circle_js__WEBPACK_IMPORTED_MODULE_6__[\"circleOut\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeCircleInOut\", function() { return _circle_js__WEBPACK_IMPORTED_MODULE_6__[\"circleInOut\"]; });\n\n/* harmony import */ var _bounce_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./bounce.js */ \"./node_modules/d3-zoom/node_modules/d3-ease/src/bounce.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeBounce\", function() { return _bounce_js__WEBPACK_IMPORTED_MODULE_7__[\"bounceOut\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeBounceIn\", function() { return _bounce_js__WEBPACK_IMPORTED_MODULE_7__[\"bounceIn\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeBounceOut\", function() { return _bounce_js__WEBPACK_IMPORTED_MODULE_7__[\"bounceOut\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeBounceInOut\", function() { return _bounce_js__WEBPACK_IMPORTED_MODULE_7__[\"bounceInOut\"]; });\n\n/* harmony import */ var _back_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./back.js */ \"./node_modules/d3-zoom/node_modules/d3-ease/src/back.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeBack\", function() { return _back_js__WEBPACK_IMPORTED_MODULE_8__[\"backInOut\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeBackIn\", function() { return _back_js__WEBPACK_IMPORTED_MODULE_8__[\"backIn\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeBackOut\", function() { return _back_js__WEBPACK_IMPORTED_MODULE_8__[\"backOut\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeBackInOut\", function() { return _back_js__WEBPACK_IMPORTED_MODULE_8__[\"backInOut\"]; });\n\n/* harmony import */ var _elastic_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./elastic.js */ \"./node_modules/d3-zoom/node_modules/d3-ease/src/elastic.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeElastic\", function() { return _elastic_js__WEBPACK_IMPORTED_MODULE_9__[\"elasticOut\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeElasticIn\", function() { return _elastic_js__WEBPACK_IMPORTED_MODULE_9__[\"elasticIn\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeElasticOut\", function() { return _elastic_js__WEBPACK_IMPORTED_MODULE_9__[\"elasticOut\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeElasticInOut\", function() { return _elastic_js__WEBPACK_IMPORTED_MODULE_9__[\"elasticInOut\"]; });\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-zoom/node_modules/d3-ease/src/linear.js\":\n/*!*****************************************************************!*\\\n  !*** ./node_modules/d3-zoom/node_modules/d3-ease/src/linear.js ***!\n  \\*****************************************************************/\n/*! exports provided: linear */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"linear\", function() { return linear; });\nconst linear = t => +t;\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-zoom/node_modules/d3-ease/src/math.js\":\n/*!***************************************************************!*\\\n  !*** ./node_modules/d3-zoom/node_modules/d3-ease/src/math.js ***!\n  \\***************************************************************/\n/*! exports provided: tpmt */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"tpmt\", function() { return tpmt; });\n// tpmt is two power minus ten times t scaled to [0,1]\nfunction tpmt(x) {\n  return (Math.pow(2, -10 * x) - 0.0009765625) * 1.0009775171065494;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-zoom/node_modules/d3-ease/src/poly.js\":\n/*!***************************************************************!*\\\n  !*** ./node_modules/d3-zoom/node_modules/d3-ease/src/poly.js ***!\n  \\***************************************************************/\n/*! exports provided: polyIn, polyOut, polyInOut */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"polyIn\", function() { return polyIn; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"polyOut\", function() { return polyOut; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"polyInOut\", function() { return polyInOut; });\nvar exponent = 3;\n\nvar polyIn = (function custom(e) {\n  e = +e;\n\n  function polyIn(t) {\n    return Math.pow(t, e);\n  }\n\n  polyIn.exponent = custom;\n\n  return polyIn;\n})(exponent);\n\nvar polyOut = (function custom(e) {\n  e = +e;\n\n  function polyOut(t) {\n    return 1 - Math.pow(1 - t, e);\n  }\n\n  polyOut.exponent = custom;\n\n  return polyOut;\n})(exponent);\n\nvar polyInOut = (function custom(e) {\n  e = +e;\n\n  function polyInOut(t) {\n    return ((t *= 2) <= 1 ? Math.pow(t, e) : 2 - Math.pow(2 - t, e)) / 2;\n  }\n\n  polyInOut.exponent = custom;\n\n  return polyInOut;\n})(exponent);\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-zoom/node_modules/d3-ease/src/quad.js\":\n/*!***************************************************************!*\\\n  !*** ./node_modules/d3-zoom/node_modules/d3-ease/src/quad.js ***!\n  \\***************************************************************/\n/*! exports provided: quadIn, quadOut, quadInOut */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"quadIn\", function() { return quadIn; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"quadOut\", function() { return quadOut; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"quadInOut\", function() { return quadInOut; });\nfunction quadIn(t) {\n  return t * t;\n}\n\nfunction quadOut(t) {\n  return t * (2 - t);\n}\n\nfunction quadInOut(t) {\n  return ((t *= 2) <= 1 ? t * t : --t * (2 - t) + 1) / 2;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-zoom/node_modules/d3-ease/src/sin.js\":\n/*!**************************************************************!*\\\n  !*** ./node_modules/d3-zoom/node_modules/d3-ease/src/sin.js ***!\n  \\**************************************************************/\n/*! exports provided: sinIn, sinOut, sinInOut */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"sinIn\", function() { return sinIn; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"sinOut\", function() { return sinOut; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"sinInOut\", function() { return sinInOut; });\nvar pi = Math.PI,\n    halfPi = pi / 2;\n\nfunction sinIn(t) {\n  return (+t === 1) ? 1 : 1 - Math.cos(t * halfPi);\n}\n\nfunction sinOut(t) {\n  return Math.sin(t * halfPi);\n}\n\nfunction sinInOut(t) {\n  return (1 - Math.cos(pi * t)) / 2;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-zoom/node_modules/d3-interpolate/src/array.js\":\n/*!***********************************************************************!*\\\n  !*** ./node_modules/d3-zoom/node_modules/d3-interpolate/src/array.js ***!\n  \\***********************************************************************/\n/*! exports provided: default, genericArray */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"genericArray\", function() { return genericArray; });\n/* harmony import */ var _value_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./value.js */ \"./node_modules/d3-zoom/node_modules/d3-interpolate/src/value.js\");\n/* harmony import */ var _numberArray_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./numberArray.js */ \"./node_modules/d3-zoom/node_modules/d3-interpolate/src/numberArray.js\");\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(a, b) {\n  return (Object(_numberArray_js__WEBPACK_IMPORTED_MODULE_1__[\"isNumberArray\"])(b) ? _numberArray_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"] : genericArray)(a, b);\n});\n\nfunction genericArray(a, b) {\n  var nb = b ? b.length : 0,\n      na = a ? Math.min(nb, a.length) : 0,\n      x = new Array(na),\n      c = new Array(nb),\n      i;\n\n  for (i = 0; i < na; ++i) x[i] = Object(_value_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(a[i], b[i]);\n  for (; i < nb; ++i) c[i] = b[i];\n\n  return function(t) {\n    for (i = 0; i < na; ++i) c[i] = x[i](t);\n    return c;\n  };\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-zoom/node_modules/d3-interpolate/src/basis.js\":\n/*!***********************************************************************!*\\\n  !*** ./node_modules/d3-zoom/node_modules/d3-interpolate/src/basis.js ***!\n  \\***********************************************************************/\n/*! exports provided: basis, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"basis\", function() { return basis; });\nfunction basis(t1, v0, v1, v2, v3) {\n  var t2 = t1 * t1, t3 = t2 * t1;\n  return ((1 - 3 * t1 + 3 * t2 - t3) * v0\n      + (4 - 6 * t2 + 3 * t3) * v1\n      + (1 + 3 * t1 + 3 * t2 - 3 * t3) * v2\n      + t3 * v3) / 6;\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(values) {\n  var n = values.length - 1;\n  return function(t) {\n    var i = t <= 0 ? (t = 0) : t >= 1 ? (t = 1, n - 1) : Math.floor(t * n),\n        v1 = values[i],\n        v2 = values[i + 1],\n        v0 = i > 0 ? values[i - 1] : 2 * v1 - v2,\n        v3 = i < n - 1 ? values[i + 2] : 2 * v2 - v1;\n    return basis((t - i / n) * n, v0, v1, v2, v3);\n  };\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-zoom/node_modules/d3-interpolate/src/basisClosed.js\":\n/*!*****************************************************************************!*\\\n  !*** ./node_modules/d3-zoom/node_modules/d3-interpolate/src/basisClosed.js ***!\n  \\*****************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _basis_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./basis.js */ \"./node_modules/d3-zoom/node_modules/d3-interpolate/src/basis.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(values) {\n  var n = values.length;\n  return function(t) {\n    var i = Math.floor(((t %= 1) < 0 ? ++t : t) * n),\n        v0 = values[(i + n - 1) % n],\n        v1 = values[i % n],\n        v2 = values[(i + 1) % n],\n        v3 = values[(i + 2) % n];\n    return Object(_basis_js__WEBPACK_IMPORTED_MODULE_0__[\"basis\"])((t - i / n) * n, v0, v1, v2, v3);\n  };\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-zoom/node_modules/d3-interpolate/src/color.js\":\n/*!***********************************************************************!*\\\n  !*** ./node_modules/d3-zoom/node_modules/d3-interpolate/src/color.js ***!\n  \\***********************************************************************/\n/*! exports provided: hue, gamma, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"hue\", function() { return hue; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"gamma\", function() { return gamma; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return nogamma; });\n/* harmony import */ var _constant_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./constant.js */ \"./node_modules/d3-zoom/node_modules/d3-interpolate/src/constant.js\");\n\n\nfunction linear(a, d) {\n  return function(t) {\n    return a + t * d;\n  };\n}\n\nfunction exponential(a, b, y) {\n  return a = Math.pow(a, y), b = Math.pow(b, y) - a, y = 1 / y, function(t) {\n    return Math.pow(a + t * b, y);\n  };\n}\n\nfunction hue(a, b) {\n  var d = b - a;\n  return d ? linear(a, d > 180 || d < -180 ? d - 360 * Math.round(d / 360) : d) : Object(_constant_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(isNaN(a) ? b : a);\n}\n\nfunction gamma(y) {\n  return (y = +y) === 1 ? nogamma : function(a, b) {\n    return b - a ? exponential(a, b, y) : Object(_constant_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(isNaN(a) ? b : a);\n  };\n}\n\nfunction nogamma(a, b) {\n  var d = b - a;\n  return d ? linear(a, d) : Object(_constant_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(isNaN(a) ? b : a);\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-zoom/node_modules/d3-interpolate/src/constant.js\":\n/*!**************************************************************************!*\\\n  !*** ./node_modules/d3-zoom/node_modules/d3-interpolate/src/constant.js ***!\n  \\**************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (x => () => x);\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-zoom/node_modules/d3-interpolate/src/cubehelix.js\":\n/*!***************************************************************************!*\\\n  !*** ./node_modules/d3-zoom/node_modules/d3-interpolate/src/cubehelix.js ***!\n  \\***************************************************************************/\n/*! exports provided: default, cubehelixLong */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"cubehelixLong\", function() { return cubehelixLong; });\n/* harmony import */ var d3_color__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-color */ \"./node_modules/d3-zoom/node_modules/d3-color/src/index.js\");\n/* harmony import */ var _color_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./color.js */ \"./node_modules/d3-zoom/node_modules/d3-interpolate/src/color.js\");\n\n\n\nfunction cubehelix(hue) {\n  return (function cubehelixGamma(y) {\n    y = +y;\n\n    function cubehelix(start, end) {\n      var h = hue((start = Object(d3_color__WEBPACK_IMPORTED_MODULE_0__[\"cubehelix\"])(start)).h, (end = Object(d3_color__WEBPACK_IMPORTED_MODULE_0__[\"cubehelix\"])(end)).h),\n          s = Object(_color_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(start.s, end.s),\n          l = Object(_color_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(start.l, end.l),\n          opacity = Object(_color_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(start.opacity, end.opacity);\n      return function(t) {\n        start.h = h(t);\n        start.s = s(t);\n        start.l = l(Math.pow(t, y));\n        start.opacity = opacity(t);\n        return start + \"\";\n      };\n    }\n\n    cubehelix.gamma = cubehelixGamma;\n\n    return cubehelix;\n  })(1);\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (cubehelix(_color_js__WEBPACK_IMPORTED_MODULE_1__[\"hue\"]));\nvar cubehelixLong = cubehelix(_color_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"]);\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-zoom/node_modules/d3-interpolate/src/date.js\":\n/*!**********************************************************************!*\\\n  !*** ./node_modules/d3-zoom/node_modules/d3-interpolate/src/date.js ***!\n  \\**********************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(a, b) {\n  var d = new Date;\n  return a = +a, b = +b, function(t) {\n    return d.setTime(a * (1 - t) + b * t), d;\n  };\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-zoom/node_modules/d3-interpolate/src/discrete.js\":\n/*!**************************************************************************!*\\\n  !*** ./node_modules/d3-zoom/node_modules/d3-interpolate/src/discrete.js ***!\n  \\**************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(range) {\n  var n = range.length;\n  return function(t) {\n    return range[Math.max(0, Math.min(n - 1, Math.floor(t * n)))];\n  };\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-zoom/node_modules/d3-interpolate/src/hcl.js\":\n/*!*********************************************************************!*\\\n  !*** ./node_modules/d3-zoom/node_modules/d3-interpolate/src/hcl.js ***!\n  \\*********************************************************************/\n/*! exports provided: default, hclLong */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"hclLong\", function() { return hclLong; });\n/* harmony import */ var d3_color__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-color */ \"./node_modules/d3-zoom/node_modules/d3-color/src/index.js\");\n/* harmony import */ var _color_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./color.js */ \"./node_modules/d3-zoom/node_modules/d3-interpolate/src/color.js\");\n\n\n\nfunction hcl(hue) {\n  return function(start, end) {\n    var h = hue((start = Object(d3_color__WEBPACK_IMPORTED_MODULE_0__[\"hcl\"])(start)).h, (end = Object(d3_color__WEBPACK_IMPORTED_MODULE_0__[\"hcl\"])(end)).h),\n        c = Object(_color_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(start.c, end.c),\n        l = Object(_color_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(start.l, end.l),\n        opacity = Object(_color_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(start.opacity, end.opacity);\n    return function(t) {\n      start.h = h(t);\n      start.c = c(t);\n      start.l = l(t);\n      start.opacity = opacity(t);\n      return start + \"\";\n    };\n  }\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (hcl(_color_js__WEBPACK_IMPORTED_MODULE_1__[\"hue\"]));\nvar hclLong = hcl(_color_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"]);\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-zoom/node_modules/d3-interpolate/src/hsl.js\":\n/*!*********************************************************************!*\\\n  !*** ./node_modules/d3-zoom/node_modules/d3-interpolate/src/hsl.js ***!\n  \\*********************************************************************/\n/*! exports provided: default, hslLong */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"hslLong\", function() { return hslLong; });\n/* harmony import */ var d3_color__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-color */ \"./node_modules/d3-zoom/node_modules/d3-color/src/index.js\");\n/* harmony import */ var _color_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./color.js */ \"./node_modules/d3-zoom/node_modules/d3-interpolate/src/color.js\");\n\n\n\nfunction hsl(hue) {\n  return function(start, end) {\n    var h = hue((start = Object(d3_color__WEBPACK_IMPORTED_MODULE_0__[\"hsl\"])(start)).h, (end = Object(d3_color__WEBPACK_IMPORTED_MODULE_0__[\"hsl\"])(end)).h),\n        s = Object(_color_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(start.s, end.s),\n        l = Object(_color_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(start.l, end.l),\n        opacity = Object(_color_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(start.opacity, end.opacity);\n    return function(t) {\n      start.h = h(t);\n      start.s = s(t);\n      start.l = l(t);\n      start.opacity = opacity(t);\n      return start + \"\";\n    };\n  }\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (hsl(_color_js__WEBPACK_IMPORTED_MODULE_1__[\"hue\"]));\nvar hslLong = hsl(_color_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"]);\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-zoom/node_modules/d3-interpolate/src/hue.js\":\n/*!*********************************************************************!*\\\n  !*** ./node_modules/d3-zoom/node_modules/d3-interpolate/src/hue.js ***!\n  \\*********************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _color_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./color.js */ \"./node_modules/d3-zoom/node_modules/d3-interpolate/src/color.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(a, b) {\n  var i = Object(_color_js__WEBPACK_IMPORTED_MODULE_0__[\"hue\"])(+a, +b);\n  return function(t) {\n    var x = i(t);\n    return x - 360 * Math.floor(x / 360);\n  };\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-zoom/node_modules/d3-interpolate/src/index.js\":\n/*!***********************************************************************!*\\\n  !*** ./node_modules/d3-zoom/node_modules/d3-interpolate/src/index.js ***!\n  \\***********************************************************************/\n/*! exports provided: interpolate, interpolateArray, interpolateBasis, interpolateBasisClosed, interpolateDate, interpolateDiscrete, interpolateHue, interpolateNumber, interpolateNumberArray, interpolateObject, interpolateRound, interpolateString, interpolateTransformCss, interpolateTransformSvg, interpolateZoom, interpolateRgb, interpolateRgbBasis, interpolateRgbBasisClosed, interpolateHsl, interpolateHslLong, interpolateLab, interpolateHcl, interpolateHclLong, interpolateCubehelix, interpolateCubehelixLong, piecewise, quantize */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _value_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./value.js */ \"./node_modules/d3-zoom/node_modules/d3-interpolate/src/value.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolate\", function() { return _value_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n/* harmony import */ var _array_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./array.js */ \"./node_modules/d3-zoom/node_modules/d3-interpolate/src/array.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateArray\", function() { return _array_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"]; });\n\n/* harmony import */ var _basis_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./basis.js */ \"./node_modules/d3-zoom/node_modules/d3-interpolate/src/basis.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateBasis\", function() { return _basis_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"]; });\n\n/* harmony import */ var _basisClosed_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./basisClosed.js */ \"./node_modules/d3-zoom/node_modules/d3-interpolate/src/basisClosed.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateBasisClosed\", function() { return _basisClosed_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"]; });\n\n/* harmony import */ var _date_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./date.js */ \"./node_modules/d3-zoom/node_modules/d3-interpolate/src/date.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateDate\", function() { return _date_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"]; });\n\n/* harmony import */ var _discrete_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./discrete.js */ \"./node_modules/d3-zoom/node_modules/d3-interpolate/src/discrete.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateDiscrete\", function() { return _discrete_js__WEBPACK_IMPORTED_MODULE_5__[\"default\"]; });\n\n/* harmony import */ var _hue_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./hue.js */ \"./node_modules/d3-zoom/node_modules/d3-interpolate/src/hue.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateHue\", function() { return _hue_js__WEBPACK_IMPORTED_MODULE_6__[\"default\"]; });\n\n/* harmony import */ var _number_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./number.js */ \"./node_modules/d3-zoom/node_modules/d3-interpolate/src/number.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateNumber\", function() { return _number_js__WEBPACK_IMPORTED_MODULE_7__[\"default\"]; });\n\n/* harmony import */ var _numberArray_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./numberArray.js */ \"./node_modules/d3-zoom/node_modules/d3-interpolate/src/numberArray.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateNumberArray\", function() { return _numberArray_js__WEBPACK_IMPORTED_MODULE_8__[\"default\"]; });\n\n/* harmony import */ var _object_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./object.js */ \"./node_modules/d3-zoom/node_modules/d3-interpolate/src/object.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateObject\", function() { return _object_js__WEBPACK_IMPORTED_MODULE_9__[\"default\"]; });\n\n/* harmony import */ var _round_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./round.js */ \"./node_modules/d3-zoom/node_modules/d3-interpolate/src/round.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateRound\", function() { return _round_js__WEBPACK_IMPORTED_MODULE_10__[\"default\"]; });\n\n/* harmony import */ var _string_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./string.js */ \"./node_modules/d3-zoom/node_modules/d3-interpolate/src/string.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateString\", function() { return _string_js__WEBPACK_IMPORTED_MODULE_11__[\"default\"]; });\n\n/* harmony import */ var _transform_index_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./transform/index.js */ \"./node_modules/d3-zoom/node_modules/d3-interpolate/src/transform/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateTransformCss\", function() { return _transform_index_js__WEBPACK_IMPORTED_MODULE_12__[\"interpolateTransformCss\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateTransformSvg\", function() { return _transform_index_js__WEBPACK_IMPORTED_MODULE_12__[\"interpolateTransformSvg\"]; });\n\n/* harmony import */ var _zoom_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./zoom.js */ \"./node_modules/d3-zoom/node_modules/d3-interpolate/src/zoom.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateZoom\", function() { return _zoom_js__WEBPACK_IMPORTED_MODULE_13__[\"default\"]; });\n\n/* harmony import */ var _rgb_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./rgb.js */ \"./node_modules/d3-zoom/node_modules/d3-interpolate/src/rgb.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateRgb\", function() { return _rgb_js__WEBPACK_IMPORTED_MODULE_14__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateRgbBasis\", function() { return _rgb_js__WEBPACK_IMPORTED_MODULE_14__[\"rgbBasis\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateRgbBasisClosed\", function() { return _rgb_js__WEBPACK_IMPORTED_MODULE_14__[\"rgbBasisClosed\"]; });\n\n/* harmony import */ var _hsl_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./hsl.js */ \"./node_modules/d3-zoom/node_modules/d3-interpolate/src/hsl.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateHsl\", function() { return _hsl_js__WEBPACK_IMPORTED_MODULE_15__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateHslLong\", function() { return _hsl_js__WEBPACK_IMPORTED_MODULE_15__[\"hslLong\"]; });\n\n/* harmony import */ var _lab_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./lab.js */ \"./node_modules/d3-zoom/node_modules/d3-interpolate/src/lab.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateLab\", function() { return _lab_js__WEBPACK_IMPORTED_MODULE_16__[\"default\"]; });\n\n/* harmony import */ var _hcl_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./hcl.js */ \"./node_modules/d3-zoom/node_modules/d3-interpolate/src/hcl.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateHcl\", function() { return _hcl_js__WEBPACK_IMPORTED_MODULE_17__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateHclLong\", function() { return _hcl_js__WEBPACK_IMPORTED_MODULE_17__[\"hclLong\"]; });\n\n/* harmony import */ var _cubehelix_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./cubehelix.js */ \"./node_modules/d3-zoom/node_modules/d3-interpolate/src/cubehelix.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateCubehelix\", function() { return _cubehelix_js__WEBPACK_IMPORTED_MODULE_18__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateCubehelixLong\", function() { return _cubehelix_js__WEBPACK_IMPORTED_MODULE_18__[\"cubehelixLong\"]; });\n\n/* harmony import */ var _piecewise_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./piecewise.js */ \"./node_modules/d3-zoom/node_modules/d3-interpolate/src/piecewise.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"piecewise\", function() { return _piecewise_js__WEBPACK_IMPORTED_MODULE_19__[\"default\"]; });\n\n/* harmony import */ var _quantize_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./quantize.js */ \"./node_modules/d3-zoom/node_modules/d3-interpolate/src/quantize.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"quantize\", function() { return _quantize_js__WEBPACK_IMPORTED_MODULE_20__[\"default\"]; });\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-zoom/node_modules/d3-interpolate/src/lab.js\":\n/*!*********************************************************************!*\\\n  !*** ./node_modules/d3-zoom/node_modules/d3-interpolate/src/lab.js ***!\n  \\*********************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return lab; });\n/* harmony import */ var d3_color__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-color */ \"./node_modules/d3-zoom/node_modules/d3-color/src/index.js\");\n/* harmony import */ var _color_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./color.js */ \"./node_modules/d3-zoom/node_modules/d3-interpolate/src/color.js\");\n\n\n\nfunction lab(start, end) {\n  var l = Object(_color_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])((start = Object(d3_color__WEBPACK_IMPORTED_MODULE_0__[\"lab\"])(start)).l, (end = Object(d3_color__WEBPACK_IMPORTED_MODULE_0__[\"lab\"])(end)).l),\n      a = Object(_color_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(start.a, end.a),\n      b = Object(_color_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(start.b, end.b),\n      opacity = Object(_color_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(start.opacity, end.opacity);\n  return function(t) {\n    start.l = l(t);\n    start.a = a(t);\n    start.b = b(t);\n    start.opacity = opacity(t);\n    return start + \"\";\n  };\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-zoom/node_modules/d3-interpolate/src/number.js\":\n/*!************************************************************************!*\\\n  !*** ./node_modules/d3-zoom/node_modules/d3-interpolate/src/number.js ***!\n  \\************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(a, b) {\n  return a = +a, b = +b, function(t) {\n    return a * (1 - t) + b * t;\n  };\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-zoom/node_modules/d3-interpolate/src/numberArray.js\":\n/*!*****************************************************************************!*\\\n  !*** ./node_modules/d3-zoom/node_modules/d3-interpolate/src/numberArray.js ***!\n  \\*****************************************************************************/\n/*! exports provided: default, isNumberArray */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"isNumberArray\", function() { return isNumberArray; });\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(a, b) {\n  if (!b) b = [];\n  var n = a ? Math.min(b.length, a.length) : 0,\n      c = b.slice(),\n      i;\n  return function(t) {\n    for (i = 0; i < n; ++i) c[i] = a[i] * (1 - t) + b[i] * t;\n    return c;\n  };\n});\n\nfunction isNumberArray(x) {\n  return ArrayBuffer.isView(x) && !(x instanceof DataView);\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-zoom/node_modules/d3-interpolate/src/object.js\":\n/*!************************************************************************!*\\\n  !*** ./node_modules/d3-zoom/node_modules/d3-interpolate/src/object.js ***!\n  \\************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _value_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./value.js */ \"./node_modules/d3-zoom/node_modules/d3-interpolate/src/value.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(a, b) {\n  var i = {},\n      c = {},\n      k;\n\n  if (a === null || typeof a !== \"object\") a = {};\n  if (b === null || typeof b !== \"object\") b = {};\n\n  for (k in b) {\n    if (k in a) {\n      i[k] = Object(_value_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(a[k], b[k]);\n    } else {\n      c[k] = b[k];\n    }\n  }\n\n  return function(t) {\n    for (k in i) c[k] = i[k](t);\n    return c;\n  };\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-zoom/node_modules/d3-interpolate/src/piecewise.js\":\n/*!***************************************************************************!*\\\n  !*** ./node_modules/d3-zoom/node_modules/d3-interpolate/src/piecewise.js ***!\n  \\***************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return piecewise; });\n/* harmony import */ var _value_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./value.js */ \"./node_modules/d3-zoom/node_modules/d3-interpolate/src/value.js\");\n\n\nfunction piecewise(interpolate, values) {\n  if (values === undefined) values = interpolate, interpolate = _value_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"];\n  var i = 0, n = values.length - 1, v = values[0], I = new Array(n < 0 ? 0 : n);\n  while (i < n) I[i] = interpolate(v, v = values[++i]);\n  return function(t) {\n    var i = Math.max(0, Math.min(n - 1, Math.floor(t *= n)));\n    return I[i](t - i);\n  };\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-zoom/node_modules/d3-interpolate/src/quantize.js\":\n/*!**************************************************************************!*\\\n  !*** ./node_modules/d3-zoom/node_modules/d3-interpolate/src/quantize.js ***!\n  \\**************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(interpolator, n) {\n  var samples = new Array(n);\n  for (var i = 0; i < n; ++i) samples[i] = interpolator(i / (n - 1));\n  return samples;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-zoom/node_modules/d3-interpolate/src/rgb.js\":\n/*!*********************************************************************!*\\\n  !*** ./node_modules/d3-zoom/node_modules/d3-interpolate/src/rgb.js ***!\n  \\*********************************************************************/\n/*! exports provided: default, rgbBasis, rgbBasisClosed */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"rgbBasis\", function() { return rgbBasis; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"rgbBasisClosed\", function() { return rgbBasisClosed; });\n/* harmony import */ var d3_color__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-color */ \"./node_modules/d3-zoom/node_modules/d3-color/src/index.js\");\n/* harmony import */ var _basis_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./basis.js */ \"./node_modules/d3-zoom/node_modules/d3-interpolate/src/basis.js\");\n/* harmony import */ var _basisClosed_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./basisClosed.js */ \"./node_modules/d3-zoom/node_modules/d3-interpolate/src/basisClosed.js\");\n/* harmony import */ var _color_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./color.js */ \"./node_modules/d3-zoom/node_modules/d3-interpolate/src/color.js\");\n\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ((function rgbGamma(y) {\n  var color = Object(_color_js__WEBPACK_IMPORTED_MODULE_3__[\"gamma\"])(y);\n\n  function rgb(start, end) {\n    var r = color((start = Object(d3_color__WEBPACK_IMPORTED_MODULE_0__[\"rgb\"])(start)).r, (end = Object(d3_color__WEBPACK_IMPORTED_MODULE_0__[\"rgb\"])(end)).r),\n        g = color(start.g, end.g),\n        b = color(start.b, end.b),\n        opacity = Object(_color_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(start.opacity, end.opacity);\n    return function(t) {\n      start.r = r(t);\n      start.g = g(t);\n      start.b = b(t);\n      start.opacity = opacity(t);\n      return start + \"\";\n    };\n  }\n\n  rgb.gamma = rgbGamma;\n\n  return rgb;\n})(1));\n\nfunction rgbSpline(spline) {\n  return function(colors) {\n    var n = colors.length,\n        r = new Array(n),\n        g = new Array(n),\n        b = new Array(n),\n        i, color;\n    for (i = 0; i < n; ++i) {\n      color = Object(d3_color__WEBPACK_IMPORTED_MODULE_0__[\"rgb\"])(colors[i]);\n      r[i] = color.r || 0;\n      g[i] = color.g || 0;\n      b[i] = color.b || 0;\n    }\n    r = spline(r);\n    g = spline(g);\n    b = spline(b);\n    color.opacity = 1;\n    return function(t) {\n      color.r = r(t);\n      color.g = g(t);\n      color.b = b(t);\n      return color + \"\";\n    };\n  };\n}\n\nvar rgbBasis = rgbSpline(_basis_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"]);\nvar rgbBasisClosed = rgbSpline(_basisClosed_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"]);\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-zoom/node_modules/d3-interpolate/src/round.js\":\n/*!***********************************************************************!*\\\n  !*** ./node_modules/d3-zoom/node_modules/d3-interpolate/src/round.js ***!\n  \\***********************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(a, b) {\n  return a = +a, b = +b, function(t) {\n    return Math.round(a * (1 - t) + b * t);\n  };\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-zoom/node_modules/d3-interpolate/src/string.js\":\n/*!************************************************************************!*\\\n  !*** ./node_modules/d3-zoom/node_modules/d3-interpolate/src/string.js ***!\n  \\************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _number_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./number.js */ \"./node_modules/d3-zoom/node_modules/d3-interpolate/src/number.js\");\n\n\nvar reA = /[-+]?(?:\\d+\\.?\\d*|\\.?\\d+)(?:[eE][-+]?\\d+)?/g,\n    reB = new RegExp(reA.source, \"g\");\n\nfunction zero(b) {\n  return function() {\n    return b;\n  };\n}\n\nfunction one(b) {\n  return function(t) {\n    return b(t) + \"\";\n  };\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(a, b) {\n  var bi = reA.lastIndex = reB.lastIndex = 0, // scan index for next number in b\n      am, // current match in a\n      bm, // current match in b\n      bs, // string preceding current number in b, if any\n      i = -1, // index in s\n      s = [], // string constants and placeholders\n      q = []; // number interpolators\n\n  // Coerce inputs to strings.\n  a = a + \"\", b = b + \"\";\n\n  // Interpolate pairs of numbers in a & b.\n  while ((am = reA.exec(a))\n      && (bm = reB.exec(b))) {\n    if ((bs = bm.index) > bi) { // a string precedes the next number in b\n      bs = b.slice(bi, bs);\n      if (s[i]) s[i] += bs; // coalesce with previous string\n      else s[++i] = bs;\n    }\n    if ((am = am[0]) === (bm = bm[0])) { // numbers in a & b match\n      if (s[i]) s[i] += bm; // coalesce with previous string\n      else s[++i] = bm;\n    } else { // interpolate non-matching numbers\n      s[++i] = null;\n      q.push({i: i, x: Object(_number_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(am, bm)});\n    }\n    bi = reB.lastIndex;\n  }\n\n  // Add remains of b.\n  if (bi < b.length) {\n    bs = b.slice(bi);\n    if (s[i]) s[i] += bs; // coalesce with previous string\n    else s[++i] = bs;\n  }\n\n  // Special optimization for only a single match.\n  // Otherwise, interpolate each of the numbers and rejoin the string.\n  return s.length < 2 ? (q[0]\n      ? one(q[0].x)\n      : zero(b))\n      : (b = q.length, function(t) {\n          for (var i = 0, o; i < b; ++i) s[(o = q[i]).i] = o.x(t);\n          return s.join(\"\");\n        });\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-zoom/node_modules/d3-interpolate/src/transform/decompose.js\":\n/*!*************************************************************************************!*\\\n  !*** ./node_modules/d3-zoom/node_modules/d3-interpolate/src/transform/decompose.js ***!\n  \\*************************************************************************************/\n/*! exports provided: identity, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"identity\", function() { return identity; });\nvar degrees = 180 / Math.PI;\n\nvar identity = {\n  translateX: 0,\n  translateY: 0,\n  rotate: 0,\n  skewX: 0,\n  scaleX: 1,\n  scaleY: 1\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(a, b, c, d, e, f) {\n  var scaleX, scaleY, skewX;\n  if (scaleX = Math.sqrt(a * a + b * b)) a /= scaleX, b /= scaleX;\n  if (skewX = a * c + b * d) c -= a * skewX, d -= b * skewX;\n  if (scaleY = Math.sqrt(c * c + d * d)) c /= scaleY, d /= scaleY, skewX /= scaleY;\n  if (a * d < b * c) a = -a, b = -b, skewX = -skewX, scaleX = -scaleX;\n  return {\n    translateX: e,\n    translateY: f,\n    rotate: Math.atan2(b, a) * degrees,\n    skewX: Math.atan(skewX) * degrees,\n    scaleX: scaleX,\n    scaleY: scaleY\n  };\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-zoom/node_modules/d3-interpolate/src/transform/index.js\":\n/*!*********************************************************************************!*\\\n  !*** ./node_modules/d3-zoom/node_modules/d3-interpolate/src/transform/index.js ***!\n  \\*********************************************************************************/\n/*! exports provided: interpolateTransformCss, interpolateTransformSvg */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"interpolateTransformCss\", function() { return interpolateTransformCss; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"interpolateTransformSvg\", function() { return interpolateTransformSvg; });\n/* harmony import */ var _number_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../number.js */ \"./node_modules/d3-zoom/node_modules/d3-interpolate/src/number.js\");\n/* harmony import */ var _parse_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./parse.js */ \"./node_modules/d3-zoom/node_modules/d3-interpolate/src/transform/parse.js\");\n\n\n\nfunction interpolateTransform(parse, pxComma, pxParen, degParen) {\n\n  function pop(s) {\n    return s.length ? s.pop() + \" \" : \"\";\n  }\n\n  function translate(xa, ya, xb, yb, s, q) {\n    if (xa !== xb || ya !== yb) {\n      var i = s.push(\"translate(\", null, pxComma, null, pxParen);\n      q.push({i: i - 4, x: Object(_number_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(xa, xb)}, {i: i - 2, x: Object(_number_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(ya, yb)});\n    } else if (xb || yb) {\n      s.push(\"translate(\" + xb + pxComma + yb + pxParen);\n    }\n  }\n\n  function rotate(a, b, s, q) {\n    if (a !== b) {\n      if (a - b > 180) b += 360; else if (b - a > 180) a += 360; // shortest path\n      q.push({i: s.push(pop(s) + \"rotate(\", null, degParen) - 2, x: Object(_number_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(a, b)});\n    } else if (b) {\n      s.push(pop(s) + \"rotate(\" + b + degParen);\n    }\n  }\n\n  function skewX(a, b, s, q) {\n    if (a !== b) {\n      q.push({i: s.push(pop(s) + \"skewX(\", null, degParen) - 2, x: Object(_number_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(a, b)});\n    } else if (b) {\n      s.push(pop(s) + \"skewX(\" + b + degParen);\n    }\n  }\n\n  function scale(xa, ya, xb, yb, s, q) {\n    if (xa !== xb || ya !== yb) {\n      var i = s.push(pop(s) + \"scale(\", null, \",\", null, \")\");\n      q.push({i: i - 4, x: Object(_number_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(xa, xb)}, {i: i - 2, x: Object(_number_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(ya, yb)});\n    } else if (xb !== 1 || yb !== 1) {\n      s.push(pop(s) + \"scale(\" + xb + \",\" + yb + \")\");\n    }\n  }\n\n  return function(a, b) {\n    var s = [], // string constants and placeholders\n        q = []; // number interpolators\n    a = parse(a), b = parse(b);\n    translate(a.translateX, a.translateY, b.translateX, b.translateY, s, q);\n    rotate(a.rotate, b.rotate, s, q);\n    skewX(a.skewX, b.skewX, s, q);\n    scale(a.scaleX, a.scaleY, b.scaleX, b.scaleY, s, q);\n    a = b = null; // gc\n    return function(t) {\n      var i = -1, n = q.length, o;\n      while (++i < n) s[(o = q[i]).i] = o.x(t);\n      return s.join(\"\");\n    };\n  };\n}\n\nvar interpolateTransformCss = interpolateTransform(_parse_js__WEBPACK_IMPORTED_MODULE_1__[\"parseCss\"], \"px, \", \"px)\", \"deg)\");\nvar interpolateTransformSvg = interpolateTransform(_parse_js__WEBPACK_IMPORTED_MODULE_1__[\"parseSvg\"], \", \", \")\", \")\");\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-zoom/node_modules/d3-interpolate/src/transform/parse.js\":\n/*!*********************************************************************************!*\\\n  !*** ./node_modules/d3-zoom/node_modules/d3-interpolate/src/transform/parse.js ***!\n  \\*********************************************************************************/\n/*! exports provided: parseCss, parseSvg */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"parseCss\", function() { return parseCss; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"parseSvg\", function() { return parseSvg; });\n/* harmony import */ var _decompose_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./decompose.js */ \"./node_modules/d3-zoom/node_modules/d3-interpolate/src/transform/decompose.js\");\n\n\nvar svgNode;\n\n/* eslint-disable no-undef */\nfunction parseCss(value) {\n  const m = new (typeof DOMMatrix === \"function\" ? DOMMatrix : WebKitCSSMatrix)(value + \"\");\n  return m.isIdentity ? _decompose_js__WEBPACK_IMPORTED_MODULE_0__[\"identity\"] : Object(_decompose_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(m.a, m.b, m.c, m.d, m.e, m.f);\n}\n\nfunction parseSvg(value) {\n  if (value == null) return _decompose_js__WEBPACK_IMPORTED_MODULE_0__[\"identity\"];\n  if (!svgNode) svgNode = document.createElementNS(\"http://www.w3.org/2000/svg\", \"g\");\n  svgNode.setAttribute(\"transform\", value);\n  if (!(value = svgNode.transform.baseVal.consolidate())) return _decompose_js__WEBPACK_IMPORTED_MODULE_0__[\"identity\"];\n  value = value.matrix;\n  return Object(_decompose_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(value.a, value.b, value.c, value.d, value.e, value.f);\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-zoom/node_modules/d3-interpolate/src/value.js\":\n/*!***********************************************************************!*\\\n  !*** ./node_modules/d3-zoom/node_modules/d3-interpolate/src/value.js ***!\n  \\***********************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var d3_color__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-color */ \"./node_modules/d3-zoom/node_modules/d3-color/src/index.js\");\n/* harmony import */ var _rgb_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./rgb.js */ \"./node_modules/d3-zoom/node_modules/d3-interpolate/src/rgb.js\");\n/* harmony import */ var _array_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./array.js */ \"./node_modules/d3-zoom/node_modules/d3-interpolate/src/array.js\");\n/* harmony import */ var _date_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./date.js */ \"./node_modules/d3-zoom/node_modules/d3-interpolate/src/date.js\");\n/* harmony import */ var _number_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./number.js */ \"./node_modules/d3-zoom/node_modules/d3-interpolate/src/number.js\");\n/* harmony import */ var _object_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./object.js */ \"./node_modules/d3-zoom/node_modules/d3-interpolate/src/object.js\");\n/* harmony import */ var _string_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./string.js */ \"./node_modules/d3-zoom/node_modules/d3-interpolate/src/string.js\");\n/* harmony import */ var _constant_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./constant.js */ \"./node_modules/d3-zoom/node_modules/d3-interpolate/src/constant.js\");\n/* harmony import */ var _numberArray_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./numberArray.js */ \"./node_modules/d3-zoom/node_modules/d3-interpolate/src/numberArray.js\");\n\n\n\n\n\n\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(a, b) {\n  var t = typeof b, c;\n  return b == null || t === \"boolean\" ? Object(_constant_js__WEBPACK_IMPORTED_MODULE_7__[\"default\"])(b)\n      : (t === \"number\" ? _number_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"]\n      : t === \"string\" ? ((c = Object(d3_color__WEBPACK_IMPORTED_MODULE_0__[\"color\"])(b)) ? (b = c, _rgb_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"]) : _string_js__WEBPACK_IMPORTED_MODULE_6__[\"default\"])\n      : b instanceof d3_color__WEBPACK_IMPORTED_MODULE_0__[\"color\"] ? _rgb_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"]\n      : b instanceof Date ? _date_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"]\n      : Object(_numberArray_js__WEBPACK_IMPORTED_MODULE_8__[\"isNumberArray\"])(b) ? _numberArray_js__WEBPACK_IMPORTED_MODULE_8__[\"default\"]\n      : Array.isArray(b) ? _array_js__WEBPACK_IMPORTED_MODULE_2__[\"genericArray\"]\n      : typeof b.valueOf !== \"function\" && typeof b.toString !== \"function\" || isNaN(b) ? _object_js__WEBPACK_IMPORTED_MODULE_5__[\"default\"]\n      : _number_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(a, b);\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-zoom/node_modules/d3-interpolate/src/zoom.js\":\n/*!**********************************************************************!*\\\n  !*** ./node_modules/d3-zoom/node_modules/d3-interpolate/src/zoom.js ***!\n  \\**********************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\nvar epsilon2 = 1e-12;\n\nfunction cosh(x) {\n  return ((x = Math.exp(x)) + 1 / x) / 2;\n}\n\nfunction sinh(x) {\n  return ((x = Math.exp(x)) - 1 / x) / 2;\n}\n\nfunction tanh(x) {\n  return ((x = Math.exp(2 * x)) - 1) / (x + 1);\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ((function zoomRho(rho, rho2, rho4) {\n\n  // p0 = [ux0, uy0, w0]\n  // p1 = [ux1, uy1, w1]\n  function zoom(p0, p1) {\n    var ux0 = p0[0], uy0 = p0[1], w0 = p0[2],\n        ux1 = p1[0], uy1 = p1[1], w1 = p1[2],\n        dx = ux1 - ux0,\n        dy = uy1 - uy0,\n        d2 = dx * dx + dy * dy,\n        i,\n        S;\n\n    // Special case for u0 ≅ u1.\n    if (d2 < epsilon2) {\n      S = Math.log(w1 / w0) / rho;\n      i = function(t) {\n        return [\n          ux0 + t * dx,\n          uy0 + t * dy,\n          w0 * Math.exp(rho * t * S)\n        ];\n      }\n    }\n\n    // General case.\n    else {\n      var d1 = Math.sqrt(d2),\n          b0 = (w1 * w1 - w0 * w0 + rho4 * d2) / (2 * w0 * rho2 * d1),\n          b1 = (w1 * w1 - w0 * w0 - rho4 * d2) / (2 * w1 * rho2 * d1),\n          r0 = Math.log(Math.sqrt(b0 * b0 + 1) - b0),\n          r1 = Math.log(Math.sqrt(b1 * b1 + 1) - b1);\n      S = (r1 - r0) / rho;\n      i = function(t) {\n        var s = t * S,\n            coshr0 = cosh(r0),\n            u = w0 / (rho2 * d1) * (coshr0 * tanh(rho * s + r0) - sinh(r0));\n        return [\n          ux0 + u * dx,\n          uy0 + u * dy,\n          w0 * coshr0 / cosh(rho * s + r0)\n        ];\n      }\n    }\n\n    i.duration = S * 1000 * rho / Math.SQRT2;\n\n    return i;\n  }\n\n  zoom.rho = function(_) {\n    var _1 = Math.max(1e-3, +_), _2 = _1 * _1, _4 = _2 * _2;\n    return zoomRho(_1, _2, _4);\n  };\n\n  return zoom;\n})(Math.SQRT2, 2, 4));\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-zoom/node_modules/d3-selection/src/array.js\":\n/*!*********************************************************************!*\\\n  !*** ./node_modules/d3-zoom/node_modules/d3-selection/src/array.js ***!\n  \\*********************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return array; });\n// Given something array like (or null), returns something that is strictly an\n// array. This is used to ensure that array-like objects passed to d3.selectAll\n// or selection.selectAll are converted into proper arrays when creating a\n// selection; we don’t ever want to create a selection backed by a live\n// HTMLCollection or NodeList. However, note that selection.selectAll will use a\n// static NodeList as a group, since it safely derived from querySelectorAll.\nfunction array(x) {\n  return x == null ? [] : Array.isArray(x) ? x : Array.from(x);\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-zoom/node_modules/d3-selection/src/constant.js\":\n/*!************************************************************************!*\\\n  !*** ./node_modules/d3-zoom/node_modules/d3-selection/src/constant.js ***!\n  \\************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(x) {\n  return function() {\n    return x;\n  };\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-zoom/node_modules/d3-selection/src/create.js\":\n/*!**********************************************************************!*\\\n  !*** ./node_modules/d3-zoom/node_modules/d3-selection/src/create.js ***!\n  \\**********************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _creator_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./creator.js */ \"./node_modules/d3-zoom/node_modules/d3-selection/src/creator.js\");\n/* harmony import */ var _select_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./select.js */ \"./node_modules/d3-zoom/node_modules/d3-selection/src/select.js\");\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(name) {\n  return Object(_select_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(Object(_creator_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(name).call(document.documentElement));\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-zoom/node_modules/d3-selection/src/creator.js\":\n/*!***********************************************************************!*\\\n  !*** ./node_modules/d3-zoom/node_modules/d3-selection/src/creator.js ***!\n  \\***********************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _namespace_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./namespace.js */ \"./node_modules/d3-zoom/node_modules/d3-selection/src/namespace.js\");\n/* harmony import */ var _namespaces_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./namespaces.js */ \"./node_modules/d3-zoom/node_modules/d3-selection/src/namespaces.js\");\n\n\n\nfunction creatorInherit(name) {\n  return function() {\n    var document = this.ownerDocument,\n        uri = this.namespaceURI;\n    return uri === _namespaces_js__WEBPACK_IMPORTED_MODULE_1__[\"xhtml\"] && document.documentElement.namespaceURI === _namespaces_js__WEBPACK_IMPORTED_MODULE_1__[\"xhtml\"]\n        ? document.createElement(name)\n        : document.createElementNS(uri, name);\n  };\n}\n\nfunction creatorFixed(fullname) {\n  return function() {\n    return this.ownerDocument.createElementNS(fullname.space, fullname.local);\n  };\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(name) {\n  var fullname = Object(_namespace_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(name);\n  return (fullname.local\n      ? creatorFixed\n      : creatorInherit)(fullname);\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-zoom/node_modules/d3-selection/src/index.js\":\n/*!*********************************************************************!*\\\n  !*** ./node_modules/d3-zoom/node_modules/d3-selection/src/index.js ***!\n  \\*********************************************************************/\n/*! exports provided: create, creator, local, matcher, namespace, namespaces, pointer, pointers, select, selectAll, selection, selector, selectorAll, style, window */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _create_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./create.js */ \"./node_modules/d3-zoom/node_modules/d3-selection/src/create.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"create\", function() { return _create_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n/* harmony import */ var _creator_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./creator.js */ \"./node_modules/d3-zoom/node_modules/d3-selection/src/creator.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"creator\", function() { return _creator_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"]; });\n\n/* harmony import */ var _local_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./local.js */ \"./node_modules/d3-zoom/node_modules/d3-selection/src/local.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"local\", function() { return _local_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"]; });\n\n/* harmony import */ var _matcher_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./matcher.js */ \"./node_modules/d3-zoom/node_modules/d3-selection/src/matcher.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"matcher\", function() { return _matcher_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"]; });\n\n/* harmony import */ var _namespace_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./namespace.js */ \"./node_modules/d3-zoom/node_modules/d3-selection/src/namespace.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"namespace\", function() { return _namespace_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"]; });\n\n/* harmony import */ var _namespaces_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./namespaces.js */ \"./node_modules/d3-zoom/node_modules/d3-selection/src/namespaces.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"namespaces\", function() { return _namespaces_js__WEBPACK_IMPORTED_MODULE_5__[\"default\"]; });\n\n/* harmony import */ var _pointer_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./pointer.js */ \"./node_modules/d3-zoom/node_modules/d3-selection/src/pointer.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"pointer\", function() { return _pointer_js__WEBPACK_IMPORTED_MODULE_6__[\"default\"]; });\n\n/* harmony import */ var _pointers_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./pointers.js */ \"./node_modules/d3-zoom/node_modules/d3-selection/src/pointers.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"pointers\", function() { return _pointers_js__WEBPACK_IMPORTED_MODULE_7__[\"default\"]; });\n\n/* harmony import */ var _select_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./select.js */ \"./node_modules/d3-zoom/node_modules/d3-selection/src/select.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"select\", function() { return _select_js__WEBPACK_IMPORTED_MODULE_8__[\"default\"]; });\n\n/* harmony import */ var _selectAll_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./selectAll.js */ \"./node_modules/d3-zoom/node_modules/d3-selection/src/selectAll.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"selectAll\", function() { return _selectAll_js__WEBPACK_IMPORTED_MODULE_9__[\"default\"]; });\n\n/* harmony import */ var _selection_index_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./selection/index.js */ \"./node_modules/d3-zoom/node_modules/d3-selection/src/selection/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"selection\", function() { return _selection_index_js__WEBPACK_IMPORTED_MODULE_10__[\"default\"]; });\n\n/* harmony import */ var _selector_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./selector.js */ \"./node_modules/d3-zoom/node_modules/d3-selection/src/selector.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"selector\", function() { return _selector_js__WEBPACK_IMPORTED_MODULE_11__[\"default\"]; });\n\n/* harmony import */ var _selectorAll_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./selectorAll.js */ \"./node_modules/d3-zoom/node_modules/d3-selection/src/selectorAll.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"selectorAll\", function() { return _selectorAll_js__WEBPACK_IMPORTED_MODULE_12__[\"default\"]; });\n\n/* harmony import */ var _selection_style_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./selection/style.js */ \"./node_modules/d3-zoom/node_modules/d3-selection/src/selection/style.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"style\", function() { return _selection_style_js__WEBPACK_IMPORTED_MODULE_13__[\"styleValue\"]; });\n\n/* harmony import */ var _window_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./window.js */ \"./node_modules/d3-zoom/node_modules/d3-selection/src/window.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"window\", function() { return _window_js__WEBPACK_IMPORTED_MODULE_14__[\"default\"]; });\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-zoom/node_modules/d3-selection/src/local.js\":\n/*!*********************************************************************!*\\\n  !*** ./node_modules/d3-zoom/node_modules/d3-selection/src/local.js ***!\n  \\*********************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return local; });\nvar nextId = 0;\n\nfunction local() {\n  return new Local;\n}\n\nfunction Local() {\n  this._ = \"@\" + (++nextId).toString(36);\n}\n\nLocal.prototype = local.prototype = {\n  constructor: Local,\n  get: function(node) {\n    var id = this._;\n    while (!(id in node)) if (!(node = node.parentNode)) return;\n    return node[id];\n  },\n  set: function(node, value) {\n    return node[this._] = value;\n  },\n  remove: function(node) {\n    return this._ in node && delete node[this._];\n  },\n  toString: function() {\n    return this._;\n  }\n};\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-zoom/node_modules/d3-selection/src/matcher.js\":\n/*!***********************************************************************!*\\\n  !*** ./node_modules/d3-zoom/node_modules/d3-selection/src/matcher.js ***!\n  \\***********************************************************************/\n/*! exports provided: default, childMatcher */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"childMatcher\", function() { return childMatcher; });\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(selector) {\n  return function() {\n    return this.matches(selector);\n  };\n});\n\nfunction childMatcher(selector) {\n  return function(node) {\n    return node.matches(selector);\n  };\n}\n\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-zoom/node_modules/d3-selection/src/namespace.js\":\n/*!*************************************************************************!*\\\n  !*** ./node_modules/d3-zoom/node_modules/d3-selection/src/namespace.js ***!\n  \\*************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _namespaces_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./namespaces.js */ \"./node_modules/d3-zoom/node_modules/d3-selection/src/namespaces.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(name) {\n  var prefix = name += \"\", i = prefix.indexOf(\":\");\n  if (i >= 0 && (prefix = name.slice(0, i)) !== \"xmlns\") name = name.slice(i + 1);\n  return _namespaces_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].hasOwnProperty(prefix) ? {space: _namespaces_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"][prefix], local: name} : name; // eslint-disable-line no-prototype-builtins\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-zoom/node_modules/d3-selection/src/namespaces.js\":\n/*!**************************************************************************!*\\\n  !*** ./node_modules/d3-zoom/node_modules/d3-selection/src/namespaces.js ***!\n  \\**************************************************************************/\n/*! exports provided: xhtml, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"xhtml\", function() { return xhtml; });\nvar xhtml = \"http://www.w3.org/1999/xhtml\";\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n  svg: \"http://www.w3.org/2000/svg\",\n  xhtml: xhtml,\n  xlink: \"http://www.w3.org/1999/xlink\",\n  xml: \"http://www.w3.org/XML/1998/namespace\",\n  xmlns: \"http://www.w3.org/2000/xmlns/\"\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-zoom/node_modules/d3-selection/src/pointer.js\":\n/*!***********************************************************************!*\\\n  !*** ./node_modules/d3-zoom/node_modules/d3-selection/src/pointer.js ***!\n  \\***********************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _sourceEvent_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./sourceEvent.js */ \"./node_modules/d3-zoom/node_modules/d3-selection/src/sourceEvent.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(event, node) {\n  event = Object(_sourceEvent_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(event);\n  if (node === undefined) node = event.currentTarget;\n  if (node) {\n    var svg = node.ownerSVGElement || node;\n    if (svg.createSVGPoint) {\n      var point = svg.createSVGPoint();\n      point.x = event.clientX, point.y = event.clientY;\n      point = point.matrixTransform(node.getScreenCTM().inverse());\n      return [point.x, point.y];\n    }\n    if (node.getBoundingClientRect) {\n      var rect = node.getBoundingClientRect();\n      return [event.clientX - rect.left - node.clientLeft, event.clientY - rect.top - node.clientTop];\n    }\n  }\n  return [event.pageX, event.pageY];\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-zoom/node_modules/d3-selection/src/pointers.js\":\n/*!************************************************************************!*\\\n  !*** ./node_modules/d3-zoom/node_modules/d3-selection/src/pointers.js ***!\n  \\************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _pointer_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./pointer.js */ \"./node_modules/d3-zoom/node_modules/d3-selection/src/pointer.js\");\n/* harmony import */ var _sourceEvent_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./sourceEvent.js */ \"./node_modules/d3-zoom/node_modules/d3-selection/src/sourceEvent.js\");\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(events, node) {\n  if (events.target) { // i.e., instanceof Event, not TouchList or iterable\n    events = Object(_sourceEvent_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(events);\n    if (node === undefined) node = events.currentTarget;\n    events = events.touches || [events];\n  }\n  return Array.from(events, event => Object(_pointer_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(event, node));\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-zoom/node_modules/d3-selection/src/select.js\":\n/*!**********************************************************************!*\\\n  !*** ./node_modules/d3-zoom/node_modules/d3-selection/src/select.js ***!\n  \\**********************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _selection_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./selection/index.js */ \"./node_modules/d3-zoom/node_modules/d3-selection/src/selection/index.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(selector) {\n  return typeof selector === \"string\"\n      ? new _selection_index_js__WEBPACK_IMPORTED_MODULE_0__[\"Selection\"]([[document.querySelector(selector)]], [document.documentElement])\n      : new _selection_index_js__WEBPACK_IMPORTED_MODULE_0__[\"Selection\"]([[selector]], _selection_index_js__WEBPACK_IMPORTED_MODULE_0__[\"root\"]);\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-zoom/node_modules/d3-selection/src/selectAll.js\":\n/*!*************************************************************************!*\\\n  !*** ./node_modules/d3-zoom/node_modules/d3-selection/src/selectAll.js ***!\n  \\*************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _array_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./array.js */ \"./node_modules/d3-zoom/node_modules/d3-selection/src/array.js\");\n/* harmony import */ var _selection_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./selection/index.js */ \"./node_modules/d3-zoom/node_modules/d3-selection/src/selection/index.js\");\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(selector) {\n  return typeof selector === \"string\"\n      ? new _selection_index_js__WEBPACK_IMPORTED_MODULE_1__[\"Selection\"]([document.querySelectorAll(selector)], [document.documentElement])\n      : new _selection_index_js__WEBPACK_IMPORTED_MODULE_1__[\"Selection\"]([Object(_array_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(selector)], _selection_index_js__WEBPACK_IMPORTED_MODULE_1__[\"root\"]);\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-zoom/node_modules/d3-selection/src/selection/append.js\":\n/*!********************************************************************************!*\\\n  !*** ./node_modules/d3-zoom/node_modules/d3-selection/src/selection/append.js ***!\n  \\********************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _creator_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../creator.js */ \"./node_modules/d3-zoom/node_modules/d3-selection/src/creator.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(name) {\n  var create = typeof name === \"function\" ? name : Object(_creator_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(name);\n  return this.select(function() {\n    return this.appendChild(create.apply(this, arguments));\n  });\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-zoom/node_modules/d3-selection/src/selection/attr.js\":\n/*!******************************************************************************!*\\\n  !*** ./node_modules/d3-zoom/node_modules/d3-selection/src/selection/attr.js ***!\n  \\******************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _namespace_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../namespace.js */ \"./node_modules/d3-zoom/node_modules/d3-selection/src/namespace.js\");\n\n\nfunction attrRemove(name) {\n  return function() {\n    this.removeAttribute(name);\n  };\n}\n\nfunction attrRemoveNS(fullname) {\n  return function() {\n    this.removeAttributeNS(fullname.space, fullname.local);\n  };\n}\n\nfunction attrConstant(name, value) {\n  return function() {\n    this.setAttribute(name, value);\n  };\n}\n\nfunction attrConstantNS(fullname, value) {\n  return function() {\n    this.setAttributeNS(fullname.space, fullname.local, value);\n  };\n}\n\nfunction attrFunction(name, value) {\n  return function() {\n    var v = value.apply(this, arguments);\n    if (v == null) this.removeAttribute(name);\n    else this.setAttribute(name, v);\n  };\n}\n\nfunction attrFunctionNS(fullname, value) {\n  return function() {\n    var v = value.apply(this, arguments);\n    if (v == null) this.removeAttributeNS(fullname.space, fullname.local);\n    else this.setAttributeNS(fullname.space, fullname.local, v);\n  };\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(name, value) {\n  var fullname = Object(_namespace_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(name);\n\n  if (arguments.length < 2) {\n    var node = this.node();\n    return fullname.local\n        ? node.getAttributeNS(fullname.space, fullname.local)\n        : node.getAttribute(fullname);\n  }\n\n  return this.each((value == null\n      ? (fullname.local ? attrRemoveNS : attrRemove) : (typeof value === \"function\"\n      ? (fullname.local ? attrFunctionNS : attrFunction)\n      : (fullname.local ? attrConstantNS : attrConstant)))(fullname, value));\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-zoom/node_modules/d3-selection/src/selection/call.js\":\n/*!******************************************************************************!*\\\n  !*** ./node_modules/d3-zoom/node_modules/d3-selection/src/selection/call.js ***!\n  \\******************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  var callback = arguments[0];\n  arguments[0] = this;\n  callback.apply(null, arguments);\n  return this;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-zoom/node_modules/d3-selection/src/selection/classed.js\":\n/*!*********************************************************************************!*\\\n  !*** ./node_modules/d3-zoom/node_modules/d3-selection/src/selection/classed.js ***!\n  \\*********************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\nfunction classArray(string) {\n  return string.trim().split(/^|\\s+/);\n}\n\nfunction classList(node) {\n  return node.classList || new ClassList(node);\n}\n\nfunction ClassList(node) {\n  this._node = node;\n  this._names = classArray(node.getAttribute(\"class\") || \"\");\n}\n\nClassList.prototype = {\n  add: function(name) {\n    var i = this._names.indexOf(name);\n    if (i < 0) {\n      this._names.push(name);\n      this._node.setAttribute(\"class\", this._names.join(\" \"));\n    }\n  },\n  remove: function(name) {\n    var i = this._names.indexOf(name);\n    if (i >= 0) {\n      this._names.splice(i, 1);\n      this._node.setAttribute(\"class\", this._names.join(\" \"));\n    }\n  },\n  contains: function(name) {\n    return this._names.indexOf(name) >= 0;\n  }\n};\n\nfunction classedAdd(node, names) {\n  var list = classList(node), i = -1, n = names.length;\n  while (++i < n) list.add(names[i]);\n}\n\nfunction classedRemove(node, names) {\n  var list = classList(node), i = -1, n = names.length;\n  while (++i < n) list.remove(names[i]);\n}\n\nfunction classedTrue(names) {\n  return function() {\n    classedAdd(this, names);\n  };\n}\n\nfunction classedFalse(names) {\n  return function() {\n    classedRemove(this, names);\n  };\n}\n\nfunction classedFunction(names, value) {\n  return function() {\n    (value.apply(this, arguments) ? classedAdd : classedRemove)(this, names);\n  };\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(name, value) {\n  var names = classArray(name + \"\");\n\n  if (arguments.length < 2) {\n    var list = classList(this.node()), i = -1, n = names.length;\n    while (++i < n) if (!list.contains(names[i])) return false;\n    return true;\n  }\n\n  return this.each((typeof value === \"function\"\n      ? classedFunction : value\n      ? classedTrue\n      : classedFalse)(names, value));\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-zoom/node_modules/d3-selection/src/selection/clone.js\":\n/*!*******************************************************************************!*\\\n  !*** ./node_modules/d3-zoom/node_modules/d3-selection/src/selection/clone.js ***!\n  \\*******************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\nfunction selection_cloneShallow() {\n  var clone = this.cloneNode(false), parent = this.parentNode;\n  return parent ? parent.insertBefore(clone, this.nextSibling) : clone;\n}\n\nfunction selection_cloneDeep() {\n  var clone = this.cloneNode(true), parent = this.parentNode;\n  return parent ? parent.insertBefore(clone, this.nextSibling) : clone;\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(deep) {\n  return this.select(deep ? selection_cloneDeep : selection_cloneShallow);\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-zoom/node_modules/d3-selection/src/selection/data.js\":\n/*!******************************************************************************!*\\\n  !*** ./node_modules/d3-zoom/node_modules/d3-selection/src/selection/data.js ***!\n  \\******************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./index.js */ \"./node_modules/d3-zoom/node_modules/d3-selection/src/selection/index.js\");\n/* harmony import */ var _enter_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./enter.js */ \"./node_modules/d3-zoom/node_modules/d3-selection/src/selection/enter.js\");\n/* harmony import */ var _constant_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../constant.js */ \"./node_modules/d3-zoom/node_modules/d3-selection/src/constant.js\");\n\n\n\n\nfunction bindIndex(parent, group, enter, update, exit, data) {\n  var i = 0,\n      node,\n      groupLength = group.length,\n      dataLength = data.length;\n\n  // Put any non-null nodes that fit into update.\n  // Put any null nodes into enter.\n  // Put any remaining data into enter.\n  for (; i < dataLength; ++i) {\n    if (node = group[i]) {\n      node.__data__ = data[i];\n      update[i] = node;\n    } else {\n      enter[i] = new _enter_js__WEBPACK_IMPORTED_MODULE_1__[\"EnterNode\"](parent, data[i]);\n    }\n  }\n\n  // Put any non-null nodes that don’t fit into exit.\n  for (; i < groupLength; ++i) {\n    if (node = group[i]) {\n      exit[i] = node;\n    }\n  }\n}\n\nfunction bindKey(parent, group, enter, update, exit, data, key) {\n  var i,\n      node,\n      nodeByKeyValue = new Map,\n      groupLength = group.length,\n      dataLength = data.length,\n      keyValues = new Array(groupLength),\n      keyValue;\n\n  // Compute the key for each node.\n  // If multiple nodes have the same key, the duplicates are added to exit.\n  for (i = 0; i < groupLength; ++i) {\n    if (node = group[i]) {\n      keyValues[i] = keyValue = key.call(node, node.__data__, i, group) + \"\";\n      if (nodeByKeyValue.has(keyValue)) {\n        exit[i] = node;\n      } else {\n        nodeByKeyValue.set(keyValue, node);\n      }\n    }\n  }\n\n  // Compute the key for each datum.\n  // If there a node associated with this key, join and add it to update.\n  // If there is not (or the key is a duplicate), add it to enter.\n  for (i = 0; i < dataLength; ++i) {\n    keyValue = key.call(parent, data[i], i, data) + \"\";\n    if (node = nodeByKeyValue.get(keyValue)) {\n      update[i] = node;\n      node.__data__ = data[i];\n      nodeByKeyValue.delete(keyValue);\n    } else {\n      enter[i] = new _enter_js__WEBPACK_IMPORTED_MODULE_1__[\"EnterNode\"](parent, data[i]);\n    }\n  }\n\n  // Add any remaining nodes that were not bound to data to exit.\n  for (i = 0; i < groupLength; ++i) {\n    if ((node = group[i]) && (nodeByKeyValue.get(keyValues[i]) === node)) {\n      exit[i] = node;\n    }\n  }\n}\n\nfunction datum(node) {\n  return node.__data__;\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(value, key) {\n  if (!arguments.length) return Array.from(this, datum);\n\n  var bind = key ? bindKey : bindIndex,\n      parents = this._parents,\n      groups = this._groups;\n\n  if (typeof value !== \"function\") value = Object(_constant_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(value);\n\n  for (var m = groups.length, update = new Array(m), enter = new Array(m), exit = new Array(m), j = 0; j < m; ++j) {\n    var parent = parents[j],\n        group = groups[j],\n        groupLength = group.length,\n        data = arraylike(value.call(parent, parent && parent.__data__, j, parents)),\n        dataLength = data.length,\n        enterGroup = enter[j] = new Array(dataLength),\n        updateGroup = update[j] = new Array(dataLength),\n        exitGroup = exit[j] = new Array(groupLength);\n\n    bind(parent, group, enterGroup, updateGroup, exitGroup, data, key);\n\n    // Now connect the enter nodes to their following update node, such that\n    // appendChild can insert the materialized enter node before this node,\n    // rather than at the end of the parent node.\n    for (var i0 = 0, i1 = 0, previous, next; i0 < dataLength; ++i0) {\n      if (previous = enterGroup[i0]) {\n        if (i0 >= i1) i1 = i0 + 1;\n        while (!(next = updateGroup[i1]) && ++i1 < dataLength);\n        previous._next = next || null;\n      }\n    }\n  }\n\n  update = new _index_js__WEBPACK_IMPORTED_MODULE_0__[\"Selection\"](update, parents);\n  update._enter = enter;\n  update._exit = exit;\n  return update;\n});\n\n// Given some data, this returns an array-like view of it: an object that\n// exposes a length property and allows numeric indexing. Note that unlike\n// selectAll, this isn’t worried about “live” collections because the resulting\n// array will only be used briefly while data is being bound. (It is possible to\n// cause the data to change while iterating by using a key function, but please\n// don’t; we’d rather avoid a gratuitous copy.)\nfunction arraylike(data) {\n  return typeof data === \"object\" && \"length\" in data\n    ? data // Array, TypedArray, NodeList, array-like\n    : Array.from(data); // Map, Set, iterable, string, or anything else\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-zoom/node_modules/d3-selection/src/selection/datum.js\":\n/*!*******************************************************************************!*\\\n  !*** ./node_modules/d3-zoom/node_modules/d3-selection/src/selection/datum.js ***!\n  \\*******************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(value) {\n  return arguments.length\n      ? this.property(\"__data__\", value)\n      : this.node().__data__;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-zoom/node_modules/d3-selection/src/selection/dispatch.js\":\n/*!**********************************************************************************!*\\\n  !*** ./node_modules/d3-zoom/node_modules/d3-selection/src/selection/dispatch.js ***!\n  \\**********************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _window_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../window.js */ \"./node_modules/d3-zoom/node_modules/d3-selection/src/window.js\");\n\n\nfunction dispatchEvent(node, type, params) {\n  var window = Object(_window_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(node),\n      event = window.CustomEvent;\n\n  if (typeof event === \"function\") {\n    event = new event(type, params);\n  } else {\n    event = window.document.createEvent(\"Event\");\n    if (params) event.initEvent(type, params.bubbles, params.cancelable), event.detail = params.detail;\n    else event.initEvent(type, false, false);\n  }\n\n  node.dispatchEvent(event);\n}\n\nfunction dispatchConstant(type, params) {\n  return function() {\n    return dispatchEvent(this, type, params);\n  };\n}\n\nfunction dispatchFunction(type, params) {\n  return function() {\n    return dispatchEvent(this, type, params.apply(this, arguments));\n  };\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(type, params) {\n  return this.each((typeof params === \"function\"\n      ? dispatchFunction\n      : dispatchConstant)(type, params));\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-zoom/node_modules/d3-selection/src/selection/each.js\":\n/*!******************************************************************************!*\\\n  !*** ./node_modules/d3-zoom/node_modules/d3-selection/src/selection/each.js ***!\n  \\******************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(callback) {\n\n  for (var groups = this._groups, j = 0, m = groups.length; j < m; ++j) {\n    for (var group = groups[j], i = 0, n = group.length, node; i < n; ++i) {\n      if (node = group[i]) callback.call(node, node.__data__, i, group);\n    }\n  }\n\n  return this;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-zoom/node_modules/d3-selection/src/selection/empty.js\":\n/*!*******************************************************************************!*\\\n  !*** ./node_modules/d3-zoom/node_modules/d3-selection/src/selection/empty.js ***!\n  \\*******************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  return !this.node();\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-zoom/node_modules/d3-selection/src/selection/enter.js\":\n/*!*******************************************************************************!*\\\n  !*** ./node_modules/d3-zoom/node_modules/d3-selection/src/selection/enter.js ***!\n  \\*******************************************************************************/\n/*! exports provided: default, EnterNode */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"EnterNode\", function() { return EnterNode; });\n/* harmony import */ var _sparse_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./sparse.js */ \"./node_modules/d3-zoom/node_modules/d3-selection/src/selection/sparse.js\");\n/* harmony import */ var _index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./index.js */ \"./node_modules/d3-zoom/node_modules/d3-selection/src/selection/index.js\");\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  return new _index_js__WEBPACK_IMPORTED_MODULE_1__[\"Selection\"](this._enter || this._groups.map(_sparse_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]), this._parents);\n});\n\nfunction EnterNode(parent, datum) {\n  this.ownerDocument = parent.ownerDocument;\n  this.namespaceURI = parent.namespaceURI;\n  this._next = null;\n  this._parent = parent;\n  this.__data__ = datum;\n}\n\nEnterNode.prototype = {\n  constructor: EnterNode,\n  appendChild: function(child) { return this._parent.insertBefore(child, this._next); },\n  insertBefore: function(child, next) { return this._parent.insertBefore(child, next); },\n  querySelector: function(selector) { return this._parent.querySelector(selector); },\n  querySelectorAll: function(selector) { return this._parent.querySelectorAll(selector); }\n};\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-zoom/node_modules/d3-selection/src/selection/exit.js\":\n/*!******************************************************************************!*\\\n  !*** ./node_modules/d3-zoom/node_modules/d3-selection/src/selection/exit.js ***!\n  \\******************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _sparse_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./sparse.js */ \"./node_modules/d3-zoom/node_modules/d3-selection/src/selection/sparse.js\");\n/* harmony import */ var _index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./index.js */ \"./node_modules/d3-zoom/node_modules/d3-selection/src/selection/index.js\");\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  return new _index_js__WEBPACK_IMPORTED_MODULE_1__[\"Selection\"](this._exit || this._groups.map(_sparse_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]), this._parents);\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-zoom/node_modules/d3-selection/src/selection/filter.js\":\n/*!********************************************************************************!*\\\n  !*** ./node_modules/d3-zoom/node_modules/d3-selection/src/selection/filter.js ***!\n  \\********************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./index.js */ \"./node_modules/d3-zoom/node_modules/d3-selection/src/selection/index.js\");\n/* harmony import */ var _matcher_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../matcher.js */ \"./node_modules/d3-zoom/node_modules/d3-selection/src/matcher.js\");\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(match) {\n  if (typeof match !== \"function\") match = Object(_matcher_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(match);\n\n  for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {\n    for (var group = groups[j], n = group.length, subgroup = subgroups[j] = [], node, i = 0; i < n; ++i) {\n      if ((node = group[i]) && match.call(node, node.__data__, i, group)) {\n        subgroup.push(node);\n      }\n    }\n  }\n\n  return new _index_js__WEBPACK_IMPORTED_MODULE_0__[\"Selection\"](subgroups, this._parents);\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-zoom/node_modules/d3-selection/src/selection/html.js\":\n/*!******************************************************************************!*\\\n  !*** ./node_modules/d3-zoom/node_modules/d3-selection/src/selection/html.js ***!\n  \\******************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\nfunction htmlRemove() {\n  this.innerHTML = \"\";\n}\n\nfunction htmlConstant(value) {\n  return function() {\n    this.innerHTML = value;\n  };\n}\n\nfunction htmlFunction(value) {\n  return function() {\n    var v = value.apply(this, arguments);\n    this.innerHTML = v == null ? \"\" : v;\n  };\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(value) {\n  return arguments.length\n      ? this.each(value == null\n          ? htmlRemove : (typeof value === \"function\"\n          ? htmlFunction\n          : htmlConstant)(value))\n      : this.node().innerHTML;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-zoom/node_modules/d3-selection/src/selection/index.js\":\n/*!*******************************************************************************!*\\\n  !*** ./node_modules/d3-zoom/node_modules/d3-selection/src/selection/index.js ***!\n  \\*******************************************************************************/\n/*! exports provided: root, Selection, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"root\", function() { return root; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Selection\", function() { return Selection; });\n/* harmony import */ var _select_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./select.js */ \"./node_modules/d3-zoom/node_modules/d3-selection/src/selection/select.js\");\n/* harmony import */ var _selectAll_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./selectAll.js */ \"./node_modules/d3-zoom/node_modules/d3-selection/src/selection/selectAll.js\");\n/* harmony import */ var _selectChild_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./selectChild.js */ \"./node_modules/d3-zoom/node_modules/d3-selection/src/selection/selectChild.js\");\n/* harmony import */ var _selectChildren_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./selectChildren.js */ \"./node_modules/d3-zoom/node_modules/d3-selection/src/selection/selectChildren.js\");\n/* harmony import */ var _filter_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./filter.js */ \"./node_modules/d3-zoom/node_modules/d3-selection/src/selection/filter.js\");\n/* harmony import */ var _data_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./data.js */ \"./node_modules/d3-zoom/node_modules/d3-selection/src/selection/data.js\");\n/* harmony import */ var _enter_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./enter.js */ \"./node_modules/d3-zoom/node_modules/d3-selection/src/selection/enter.js\");\n/* harmony import */ var _exit_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./exit.js */ \"./node_modules/d3-zoom/node_modules/d3-selection/src/selection/exit.js\");\n/* harmony import */ var _join_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./join.js */ \"./node_modules/d3-zoom/node_modules/d3-selection/src/selection/join.js\");\n/* harmony import */ var _merge_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./merge.js */ \"./node_modules/d3-zoom/node_modules/d3-selection/src/selection/merge.js\");\n/* harmony import */ var _order_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./order.js */ \"./node_modules/d3-zoom/node_modules/d3-selection/src/selection/order.js\");\n/* harmony import */ var _sort_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./sort.js */ \"./node_modules/d3-zoom/node_modules/d3-selection/src/selection/sort.js\");\n/* harmony import */ var _call_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./call.js */ \"./node_modules/d3-zoom/node_modules/d3-selection/src/selection/call.js\");\n/* harmony import */ var _nodes_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./nodes.js */ \"./node_modules/d3-zoom/node_modules/d3-selection/src/selection/nodes.js\");\n/* harmony import */ var _node_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./node.js */ \"./node_modules/d3-zoom/node_modules/d3-selection/src/selection/node.js\");\n/* harmony import */ var _size_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./size.js */ \"./node_modules/d3-zoom/node_modules/d3-selection/src/selection/size.js\");\n/* harmony import */ var _empty_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./empty.js */ \"./node_modules/d3-zoom/node_modules/d3-selection/src/selection/empty.js\");\n/* harmony import */ var _each_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./each.js */ \"./node_modules/d3-zoom/node_modules/d3-selection/src/selection/each.js\");\n/* harmony import */ var _attr_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./attr.js */ \"./node_modules/d3-zoom/node_modules/d3-selection/src/selection/attr.js\");\n/* harmony import */ var _style_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./style.js */ \"./node_modules/d3-zoom/node_modules/d3-selection/src/selection/style.js\");\n/* harmony import */ var _property_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./property.js */ \"./node_modules/d3-zoom/node_modules/d3-selection/src/selection/property.js\");\n/* harmony import */ var _classed_js__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./classed.js */ \"./node_modules/d3-zoom/node_modules/d3-selection/src/selection/classed.js\");\n/* harmony import */ var _text_js__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./text.js */ \"./node_modules/d3-zoom/node_modules/d3-selection/src/selection/text.js\");\n/* harmony import */ var _html_js__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./html.js */ \"./node_modules/d3-zoom/node_modules/d3-selection/src/selection/html.js\");\n/* harmony import */ var _raise_js__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ./raise.js */ \"./node_modules/d3-zoom/node_modules/d3-selection/src/selection/raise.js\");\n/* harmony import */ var _lower_js__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ./lower.js */ \"./node_modules/d3-zoom/node_modules/d3-selection/src/selection/lower.js\");\n/* harmony import */ var _append_js__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ./append.js */ \"./node_modules/d3-zoom/node_modules/d3-selection/src/selection/append.js\");\n/* harmony import */ var _insert_js__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ./insert.js */ \"./node_modules/d3-zoom/node_modules/d3-selection/src/selection/insert.js\");\n/* harmony import */ var _remove_js__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ./remove.js */ \"./node_modules/d3-zoom/node_modules/d3-selection/src/selection/remove.js\");\n/* harmony import */ var _clone_js__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ./clone.js */ \"./node_modules/d3-zoom/node_modules/d3-selection/src/selection/clone.js\");\n/* harmony import */ var _datum_js__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ./datum.js */ \"./node_modules/d3-zoom/node_modules/d3-selection/src/selection/datum.js\");\n/* harmony import */ var _on_js__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ./on.js */ \"./node_modules/d3-zoom/node_modules/d3-selection/src/selection/on.js\");\n/* harmony import */ var _dispatch_js__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ./dispatch.js */ \"./node_modules/d3-zoom/node_modules/d3-selection/src/selection/dispatch.js\");\n/* harmony import */ var _iterator_js__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! ./iterator.js */ \"./node_modules/d3-zoom/node_modules/d3-selection/src/selection/iterator.js\");\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nvar root = [null];\n\nfunction Selection(groups, parents) {\n  this._groups = groups;\n  this._parents = parents;\n}\n\nfunction selection() {\n  return new Selection([[document.documentElement]], root);\n}\n\nfunction selection_selection() {\n  return this;\n}\n\nSelection.prototype = selection.prototype = {\n  constructor: Selection,\n  select: _select_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"],\n  selectAll: _selectAll_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"],\n  selectChild: _selectChild_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"],\n  selectChildren: _selectChildren_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"],\n  filter: _filter_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"],\n  data: _data_js__WEBPACK_IMPORTED_MODULE_5__[\"default\"],\n  enter: _enter_js__WEBPACK_IMPORTED_MODULE_6__[\"default\"],\n  exit: _exit_js__WEBPACK_IMPORTED_MODULE_7__[\"default\"],\n  join: _join_js__WEBPACK_IMPORTED_MODULE_8__[\"default\"],\n  merge: _merge_js__WEBPACK_IMPORTED_MODULE_9__[\"default\"],\n  selection: selection_selection,\n  order: _order_js__WEBPACK_IMPORTED_MODULE_10__[\"default\"],\n  sort: _sort_js__WEBPACK_IMPORTED_MODULE_11__[\"default\"],\n  call: _call_js__WEBPACK_IMPORTED_MODULE_12__[\"default\"],\n  nodes: _nodes_js__WEBPACK_IMPORTED_MODULE_13__[\"default\"],\n  node: _node_js__WEBPACK_IMPORTED_MODULE_14__[\"default\"],\n  size: _size_js__WEBPACK_IMPORTED_MODULE_15__[\"default\"],\n  empty: _empty_js__WEBPACK_IMPORTED_MODULE_16__[\"default\"],\n  each: _each_js__WEBPACK_IMPORTED_MODULE_17__[\"default\"],\n  attr: _attr_js__WEBPACK_IMPORTED_MODULE_18__[\"default\"],\n  style: _style_js__WEBPACK_IMPORTED_MODULE_19__[\"default\"],\n  property: _property_js__WEBPACK_IMPORTED_MODULE_20__[\"default\"],\n  classed: _classed_js__WEBPACK_IMPORTED_MODULE_21__[\"default\"],\n  text: _text_js__WEBPACK_IMPORTED_MODULE_22__[\"default\"],\n  html: _html_js__WEBPACK_IMPORTED_MODULE_23__[\"default\"],\n  raise: _raise_js__WEBPACK_IMPORTED_MODULE_24__[\"default\"],\n  lower: _lower_js__WEBPACK_IMPORTED_MODULE_25__[\"default\"],\n  append: _append_js__WEBPACK_IMPORTED_MODULE_26__[\"default\"],\n  insert: _insert_js__WEBPACK_IMPORTED_MODULE_27__[\"default\"],\n  remove: _remove_js__WEBPACK_IMPORTED_MODULE_28__[\"default\"],\n  clone: _clone_js__WEBPACK_IMPORTED_MODULE_29__[\"default\"],\n  datum: _datum_js__WEBPACK_IMPORTED_MODULE_30__[\"default\"],\n  on: _on_js__WEBPACK_IMPORTED_MODULE_31__[\"default\"],\n  dispatch: _dispatch_js__WEBPACK_IMPORTED_MODULE_32__[\"default\"],\n  [Symbol.iterator]: _iterator_js__WEBPACK_IMPORTED_MODULE_33__[\"default\"]\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (selection);\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-zoom/node_modules/d3-selection/src/selection/insert.js\":\n/*!********************************************************************************!*\\\n  !*** ./node_modules/d3-zoom/node_modules/d3-selection/src/selection/insert.js ***!\n  \\********************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _creator_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../creator.js */ \"./node_modules/d3-zoom/node_modules/d3-selection/src/creator.js\");\n/* harmony import */ var _selector_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../selector.js */ \"./node_modules/d3-zoom/node_modules/d3-selection/src/selector.js\");\n\n\n\nfunction constantNull() {\n  return null;\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(name, before) {\n  var create = typeof name === \"function\" ? name : Object(_creator_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(name),\n      select = before == null ? constantNull : typeof before === \"function\" ? before : Object(_selector_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(before);\n  return this.select(function() {\n    return this.insertBefore(create.apply(this, arguments), select.apply(this, arguments) || null);\n  });\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-zoom/node_modules/d3-selection/src/selection/iterator.js\":\n/*!**********************************************************************************!*\\\n  !*** ./node_modules/d3-zoom/node_modules/d3-selection/src/selection/iterator.js ***!\n  \\**********************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function*() {\n  for (var groups = this._groups, j = 0, m = groups.length; j < m; ++j) {\n    for (var group = groups[j], i = 0, n = group.length, node; i < n; ++i) {\n      if (node = group[i]) yield node;\n    }\n  }\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-zoom/node_modules/d3-selection/src/selection/join.js\":\n/*!******************************************************************************!*\\\n  !*** ./node_modules/d3-zoom/node_modules/d3-selection/src/selection/join.js ***!\n  \\******************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(onenter, onupdate, onexit) {\n  var enter = this.enter(), update = this, exit = this.exit();\n  if (typeof onenter === \"function\") {\n    enter = onenter(enter);\n    if (enter) enter = enter.selection();\n  } else {\n    enter = enter.append(onenter + \"\");\n  }\n  if (onupdate != null) {\n    update = onupdate(update);\n    if (update) update = update.selection();\n  }\n  if (onexit == null) exit.remove(); else onexit(exit);\n  return enter && update ? enter.merge(update).order() : update;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-zoom/node_modules/d3-selection/src/selection/lower.js\":\n/*!*******************************************************************************!*\\\n  !*** ./node_modules/d3-zoom/node_modules/d3-selection/src/selection/lower.js ***!\n  \\*******************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\nfunction lower() {\n  if (this.previousSibling) this.parentNode.insertBefore(this, this.parentNode.firstChild);\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  return this.each(lower);\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-zoom/node_modules/d3-selection/src/selection/merge.js\":\n/*!*******************************************************************************!*\\\n  !*** ./node_modules/d3-zoom/node_modules/d3-selection/src/selection/merge.js ***!\n  \\*******************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./index.js */ \"./node_modules/d3-zoom/node_modules/d3-selection/src/selection/index.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(context) {\n  var selection = context.selection ? context.selection() : context;\n\n  for (var groups0 = this._groups, groups1 = selection._groups, m0 = groups0.length, m1 = groups1.length, m = Math.min(m0, m1), merges = new Array(m0), j = 0; j < m; ++j) {\n    for (var group0 = groups0[j], group1 = groups1[j], n = group0.length, merge = merges[j] = new Array(n), node, i = 0; i < n; ++i) {\n      if (node = group0[i] || group1[i]) {\n        merge[i] = node;\n      }\n    }\n  }\n\n  for (; j < m0; ++j) {\n    merges[j] = groups0[j];\n  }\n\n  return new _index_js__WEBPACK_IMPORTED_MODULE_0__[\"Selection\"](merges, this._parents);\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-zoom/node_modules/d3-selection/src/selection/node.js\":\n/*!******************************************************************************!*\\\n  !*** ./node_modules/d3-zoom/node_modules/d3-selection/src/selection/node.js ***!\n  \\******************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n\n  for (var groups = this._groups, j = 0, m = groups.length; j < m; ++j) {\n    for (var group = groups[j], i = 0, n = group.length; i < n; ++i) {\n      var node = group[i];\n      if (node) return node;\n    }\n  }\n\n  return null;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-zoom/node_modules/d3-selection/src/selection/nodes.js\":\n/*!*******************************************************************************!*\\\n  !*** ./node_modules/d3-zoom/node_modules/d3-selection/src/selection/nodes.js ***!\n  \\*******************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  return Array.from(this);\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-zoom/node_modules/d3-selection/src/selection/on.js\":\n/*!****************************************************************************!*\\\n  !*** ./node_modules/d3-zoom/node_modules/d3-selection/src/selection/on.js ***!\n  \\****************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\nfunction contextListener(listener) {\n  return function(event) {\n    listener.call(this, event, this.__data__);\n  };\n}\n\nfunction parseTypenames(typenames) {\n  return typenames.trim().split(/^|\\s+/).map(function(t) {\n    var name = \"\", i = t.indexOf(\".\");\n    if (i >= 0) name = t.slice(i + 1), t = t.slice(0, i);\n    return {type: t, name: name};\n  });\n}\n\nfunction onRemove(typename) {\n  return function() {\n    var on = this.__on;\n    if (!on) return;\n    for (var j = 0, i = -1, m = on.length, o; j < m; ++j) {\n      if (o = on[j], (!typename.type || o.type === typename.type) && o.name === typename.name) {\n        this.removeEventListener(o.type, o.listener, o.options);\n      } else {\n        on[++i] = o;\n      }\n    }\n    if (++i) on.length = i;\n    else delete this.__on;\n  };\n}\n\nfunction onAdd(typename, value, options) {\n  return function() {\n    var on = this.__on, o, listener = contextListener(value);\n    if (on) for (var j = 0, m = on.length; j < m; ++j) {\n      if ((o = on[j]).type === typename.type && o.name === typename.name) {\n        this.removeEventListener(o.type, o.listener, o.options);\n        this.addEventListener(o.type, o.listener = listener, o.options = options);\n        o.value = value;\n        return;\n      }\n    }\n    this.addEventListener(typename.type, listener, options);\n    o = {type: typename.type, name: typename.name, value: value, listener: listener, options: options};\n    if (!on) this.__on = [o];\n    else on.push(o);\n  };\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(typename, value, options) {\n  var typenames = parseTypenames(typename + \"\"), i, n = typenames.length, t;\n\n  if (arguments.length < 2) {\n    var on = this.node().__on;\n    if (on) for (var j = 0, m = on.length, o; j < m; ++j) {\n      for (i = 0, o = on[j]; i < n; ++i) {\n        if ((t = typenames[i]).type === o.type && t.name === o.name) {\n          return o.value;\n        }\n      }\n    }\n    return;\n  }\n\n  on = value ? onAdd : onRemove;\n  for (i = 0; i < n; ++i) this.each(on(typenames[i], value, options));\n  return this;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-zoom/node_modules/d3-selection/src/selection/order.js\":\n/*!*******************************************************************************!*\\\n  !*** ./node_modules/d3-zoom/node_modules/d3-selection/src/selection/order.js ***!\n  \\*******************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n\n  for (var groups = this._groups, j = -1, m = groups.length; ++j < m;) {\n    for (var group = groups[j], i = group.length - 1, next = group[i], node; --i >= 0;) {\n      if (node = group[i]) {\n        if (next && node.compareDocumentPosition(next) ^ 4) next.parentNode.insertBefore(node, next);\n        next = node;\n      }\n    }\n  }\n\n  return this;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-zoom/node_modules/d3-selection/src/selection/property.js\":\n/*!**********************************************************************************!*\\\n  !*** ./node_modules/d3-zoom/node_modules/d3-selection/src/selection/property.js ***!\n  \\**********************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\nfunction propertyRemove(name) {\n  return function() {\n    delete this[name];\n  };\n}\n\nfunction propertyConstant(name, value) {\n  return function() {\n    this[name] = value;\n  };\n}\n\nfunction propertyFunction(name, value) {\n  return function() {\n    var v = value.apply(this, arguments);\n    if (v == null) delete this[name];\n    else this[name] = v;\n  };\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(name, value) {\n  return arguments.length > 1\n      ? this.each((value == null\n          ? propertyRemove : typeof value === \"function\"\n          ? propertyFunction\n          : propertyConstant)(name, value))\n      : this.node()[name];\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-zoom/node_modules/d3-selection/src/selection/raise.js\":\n/*!*******************************************************************************!*\\\n  !*** ./node_modules/d3-zoom/node_modules/d3-selection/src/selection/raise.js ***!\n  \\*******************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\nfunction raise() {\n  if (this.nextSibling) this.parentNode.appendChild(this);\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  return this.each(raise);\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-zoom/node_modules/d3-selection/src/selection/remove.js\":\n/*!********************************************************************************!*\\\n  !*** ./node_modules/d3-zoom/node_modules/d3-selection/src/selection/remove.js ***!\n  \\********************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\nfunction remove() {\n  var parent = this.parentNode;\n  if (parent) parent.removeChild(this);\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  return this.each(remove);\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-zoom/node_modules/d3-selection/src/selection/select.js\":\n/*!********************************************************************************!*\\\n  !*** ./node_modules/d3-zoom/node_modules/d3-selection/src/selection/select.js ***!\n  \\********************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./index.js */ \"./node_modules/d3-zoom/node_modules/d3-selection/src/selection/index.js\");\n/* harmony import */ var _selector_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../selector.js */ \"./node_modules/d3-zoom/node_modules/d3-selection/src/selector.js\");\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(select) {\n  if (typeof select !== \"function\") select = Object(_selector_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(select);\n\n  for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {\n    for (var group = groups[j], n = group.length, subgroup = subgroups[j] = new Array(n), node, subnode, i = 0; i < n; ++i) {\n      if ((node = group[i]) && (subnode = select.call(node, node.__data__, i, group))) {\n        if (\"__data__\" in node) subnode.__data__ = node.__data__;\n        subgroup[i] = subnode;\n      }\n    }\n  }\n\n  return new _index_js__WEBPACK_IMPORTED_MODULE_0__[\"Selection\"](subgroups, this._parents);\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-zoom/node_modules/d3-selection/src/selection/selectAll.js\":\n/*!***********************************************************************************!*\\\n  !*** ./node_modules/d3-zoom/node_modules/d3-selection/src/selection/selectAll.js ***!\n  \\***********************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./index.js */ \"./node_modules/d3-zoom/node_modules/d3-selection/src/selection/index.js\");\n/* harmony import */ var _array_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../array.js */ \"./node_modules/d3-zoom/node_modules/d3-selection/src/array.js\");\n/* harmony import */ var _selectorAll_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../selectorAll.js */ \"./node_modules/d3-zoom/node_modules/d3-selection/src/selectorAll.js\");\n\n\n\n\nfunction arrayAll(select) {\n  return function() {\n    return Object(_array_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(select.apply(this, arguments));\n  };\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(select) {\n  if (typeof select === \"function\") select = arrayAll(select);\n  else select = Object(_selectorAll_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(select);\n\n  for (var groups = this._groups, m = groups.length, subgroups = [], parents = [], j = 0; j < m; ++j) {\n    for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) {\n      if (node = group[i]) {\n        subgroups.push(select.call(node, node.__data__, i, group));\n        parents.push(node);\n      }\n    }\n  }\n\n  return new _index_js__WEBPACK_IMPORTED_MODULE_0__[\"Selection\"](subgroups, parents);\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-zoom/node_modules/d3-selection/src/selection/selectChild.js\":\n/*!*************************************************************************************!*\\\n  !*** ./node_modules/d3-zoom/node_modules/d3-selection/src/selection/selectChild.js ***!\n  \\*************************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _matcher_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../matcher.js */ \"./node_modules/d3-zoom/node_modules/d3-selection/src/matcher.js\");\n\n\nvar find = Array.prototype.find;\n\nfunction childFind(match) {\n  return function() {\n    return find.call(this.children, match);\n  };\n}\n\nfunction childFirst() {\n  return this.firstElementChild;\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(match) {\n  return this.select(match == null ? childFirst\n      : childFind(typeof match === \"function\" ? match : Object(_matcher_js__WEBPACK_IMPORTED_MODULE_0__[\"childMatcher\"])(match)));\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-zoom/node_modules/d3-selection/src/selection/selectChildren.js\":\n/*!****************************************************************************************!*\\\n  !*** ./node_modules/d3-zoom/node_modules/d3-selection/src/selection/selectChildren.js ***!\n  \\****************************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _matcher_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../matcher.js */ \"./node_modules/d3-zoom/node_modules/d3-selection/src/matcher.js\");\n\n\nvar filter = Array.prototype.filter;\n\nfunction children() {\n  return Array.from(this.children);\n}\n\nfunction childrenFilter(match) {\n  return function() {\n    return filter.call(this.children, match);\n  };\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(match) {\n  return this.selectAll(match == null ? children\n      : childrenFilter(typeof match === \"function\" ? match : Object(_matcher_js__WEBPACK_IMPORTED_MODULE_0__[\"childMatcher\"])(match)));\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-zoom/node_modules/d3-selection/src/selection/size.js\":\n/*!******************************************************************************!*\\\n  !*** ./node_modules/d3-zoom/node_modules/d3-selection/src/selection/size.js ***!\n  \\******************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  let size = 0;\n  for (const node of this) ++size; // eslint-disable-line no-unused-vars\n  return size;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-zoom/node_modules/d3-selection/src/selection/sort.js\":\n/*!******************************************************************************!*\\\n  !*** ./node_modules/d3-zoom/node_modules/d3-selection/src/selection/sort.js ***!\n  \\******************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./index.js */ \"./node_modules/d3-zoom/node_modules/d3-selection/src/selection/index.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(compare) {\n  if (!compare) compare = ascending;\n\n  function compareNode(a, b) {\n    return a && b ? compare(a.__data__, b.__data__) : !a - !b;\n  }\n\n  for (var groups = this._groups, m = groups.length, sortgroups = new Array(m), j = 0; j < m; ++j) {\n    for (var group = groups[j], n = group.length, sortgroup = sortgroups[j] = new Array(n), node, i = 0; i < n; ++i) {\n      if (node = group[i]) {\n        sortgroup[i] = node;\n      }\n    }\n    sortgroup.sort(compareNode);\n  }\n\n  return new _index_js__WEBPACK_IMPORTED_MODULE_0__[\"Selection\"](sortgroups, this._parents).order();\n});\n\nfunction ascending(a, b) {\n  return a < b ? -1 : a > b ? 1 : a >= b ? 0 : NaN;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-zoom/node_modules/d3-selection/src/selection/sparse.js\":\n/*!********************************************************************************!*\\\n  !*** ./node_modules/d3-zoom/node_modules/d3-selection/src/selection/sparse.js ***!\n  \\********************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(update) {\n  return new Array(update.length);\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-zoom/node_modules/d3-selection/src/selection/style.js\":\n/*!*******************************************************************************!*\\\n  !*** ./node_modules/d3-zoom/node_modules/d3-selection/src/selection/style.js ***!\n  \\*******************************************************************************/\n/*! exports provided: default, styleValue */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"styleValue\", function() { return styleValue; });\n/* harmony import */ var _window_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../window.js */ \"./node_modules/d3-zoom/node_modules/d3-selection/src/window.js\");\n\n\nfunction styleRemove(name) {\n  return function() {\n    this.style.removeProperty(name);\n  };\n}\n\nfunction styleConstant(name, value, priority) {\n  return function() {\n    this.style.setProperty(name, value, priority);\n  };\n}\n\nfunction styleFunction(name, value, priority) {\n  return function() {\n    var v = value.apply(this, arguments);\n    if (v == null) this.style.removeProperty(name);\n    else this.style.setProperty(name, v, priority);\n  };\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(name, value, priority) {\n  return arguments.length > 1\n      ? this.each((value == null\n            ? styleRemove : typeof value === \"function\"\n            ? styleFunction\n            : styleConstant)(name, value, priority == null ? \"\" : priority))\n      : styleValue(this.node(), name);\n});\n\nfunction styleValue(node, name) {\n  return node.style.getPropertyValue(name)\n      || Object(_window_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(node).getComputedStyle(node, null).getPropertyValue(name);\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-zoom/node_modules/d3-selection/src/selection/text.js\":\n/*!******************************************************************************!*\\\n  !*** ./node_modules/d3-zoom/node_modules/d3-selection/src/selection/text.js ***!\n  \\******************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\nfunction textRemove() {\n  this.textContent = \"\";\n}\n\nfunction textConstant(value) {\n  return function() {\n    this.textContent = value;\n  };\n}\n\nfunction textFunction(value) {\n  return function() {\n    var v = value.apply(this, arguments);\n    this.textContent = v == null ? \"\" : v;\n  };\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(value) {\n  return arguments.length\n      ? this.each(value == null\n          ? textRemove : (typeof value === \"function\"\n          ? textFunction\n          : textConstant)(value))\n      : this.node().textContent;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-zoom/node_modules/d3-selection/src/selector.js\":\n/*!************************************************************************!*\\\n  !*** ./node_modules/d3-zoom/node_modules/d3-selection/src/selector.js ***!\n  \\************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\nfunction none() {}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(selector) {\n  return selector == null ? none : function() {\n    return this.querySelector(selector);\n  };\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-zoom/node_modules/d3-selection/src/selectorAll.js\":\n/*!***************************************************************************!*\\\n  !*** ./node_modules/d3-zoom/node_modules/d3-selection/src/selectorAll.js ***!\n  \\***************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\nfunction empty() {\n  return [];\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(selector) {\n  return selector == null ? empty : function() {\n    return this.querySelectorAll(selector);\n  };\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-zoom/node_modules/d3-selection/src/sourceEvent.js\":\n/*!***************************************************************************!*\\\n  !*** ./node_modules/d3-zoom/node_modules/d3-selection/src/sourceEvent.js ***!\n  \\***************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(event) {\n  let sourceEvent;\n  while (sourceEvent = event.sourceEvent) event = sourceEvent;\n  return event;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-zoom/node_modules/d3-selection/src/window.js\":\n/*!**********************************************************************!*\\\n  !*** ./node_modules/d3-zoom/node_modules/d3-selection/src/window.js ***!\n  \\**********************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(node) {\n  return (node.ownerDocument && node.ownerDocument.defaultView) // node is a Node\n      || (node.document && node) // node is a Window\n      || node.defaultView; // node is a Document\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-zoom/node_modules/d3-timer/src/index.js\":\n/*!*****************************************************************!*\\\n  !*** ./node_modules/d3-zoom/node_modules/d3-timer/src/index.js ***!\n  \\*****************************************************************/\n/*! exports provided: now, timer, timerFlush, timeout, interval */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _timer_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./timer.js */ \"./node_modules/d3-zoom/node_modules/d3-timer/src/timer.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"now\", function() { return _timer_js__WEBPACK_IMPORTED_MODULE_0__[\"now\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timer\", function() { return _timer_js__WEBPACK_IMPORTED_MODULE_0__[\"timer\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timerFlush\", function() { return _timer_js__WEBPACK_IMPORTED_MODULE_0__[\"timerFlush\"]; });\n\n/* harmony import */ var _timeout_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./timeout.js */ \"./node_modules/d3-zoom/node_modules/d3-timer/src/timeout.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeout\", function() { return _timeout_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"]; });\n\n/* harmony import */ var _interval_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./interval.js */ \"./node_modules/d3-zoom/node_modules/d3-timer/src/interval.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interval\", function() { return _interval_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"]; });\n\n\n\n\n\n\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-zoom/node_modules/d3-timer/src/interval.js\":\n/*!********************************************************************!*\\\n  !*** ./node_modules/d3-zoom/node_modules/d3-timer/src/interval.js ***!\n  \\********************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _timer_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./timer.js */ \"./node_modules/d3-zoom/node_modules/d3-timer/src/timer.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(callback, delay, time) {\n  var t = new _timer_js__WEBPACK_IMPORTED_MODULE_0__[\"Timer\"], total = delay;\n  if (delay == null) return t.restart(callback, delay, time), t;\n  t._restart = t.restart;\n  t.restart = function(callback, delay, time) {\n    delay = +delay, time = time == null ? Object(_timer_js__WEBPACK_IMPORTED_MODULE_0__[\"now\"])() : +time;\n    t._restart(function tick(elapsed) {\n      elapsed += total;\n      t._restart(tick, total += delay, time);\n      callback(elapsed);\n    }, delay, time);\n  }\n  t.restart(callback, delay, time);\n  return t;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-zoom/node_modules/d3-timer/src/timeout.js\":\n/*!*******************************************************************!*\\\n  !*** ./node_modules/d3-zoom/node_modules/d3-timer/src/timeout.js ***!\n  \\*******************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _timer_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./timer.js */ \"./node_modules/d3-zoom/node_modules/d3-timer/src/timer.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(callback, delay, time) {\n  var t = new _timer_js__WEBPACK_IMPORTED_MODULE_0__[\"Timer\"];\n  delay = delay == null ? 0 : +delay;\n  t.restart(elapsed => {\n    t.stop();\n    callback(elapsed + delay);\n  }, delay, time);\n  return t;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-zoom/node_modules/d3-timer/src/timer.js\":\n/*!*****************************************************************!*\\\n  !*** ./node_modules/d3-zoom/node_modules/d3-timer/src/timer.js ***!\n  \\*****************************************************************/\n/*! exports provided: now, Timer, timer, timerFlush */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"now\", function() { return now; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Timer\", function() { return Timer; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"timer\", function() { return timer; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"timerFlush\", function() { return timerFlush; });\nvar frame = 0, // is an animation frame pending?\n    timeout = 0, // is a timeout pending?\n    interval = 0, // are any timers active?\n    pokeDelay = 1000, // how frequently we check for clock skew\n    taskHead,\n    taskTail,\n    clockLast = 0,\n    clockNow = 0,\n    clockSkew = 0,\n    clock = typeof performance === \"object\" && performance.now ? performance : Date,\n    setFrame = typeof window === \"object\" && window.requestAnimationFrame ? window.requestAnimationFrame.bind(window) : function(f) { setTimeout(f, 17); };\n\nfunction now() {\n  return clockNow || (setFrame(clearNow), clockNow = clock.now() + clockSkew);\n}\n\nfunction clearNow() {\n  clockNow = 0;\n}\n\nfunction Timer() {\n  this._call =\n  this._time =\n  this._next = null;\n}\n\nTimer.prototype = timer.prototype = {\n  constructor: Timer,\n  restart: function(callback, delay, time) {\n    if (typeof callback !== \"function\") throw new TypeError(\"callback is not a function\");\n    time = (time == null ? now() : +time) + (delay == null ? 0 : +delay);\n    if (!this._next && taskTail !== this) {\n      if (taskTail) taskTail._next = this;\n      else taskHead = this;\n      taskTail = this;\n    }\n    this._call = callback;\n    this._time = time;\n    sleep();\n  },\n  stop: function() {\n    if (this._call) {\n      this._call = null;\n      this._time = Infinity;\n      sleep();\n    }\n  }\n};\n\nfunction timer(callback, delay, time) {\n  var t = new Timer;\n  t.restart(callback, delay, time);\n  return t;\n}\n\nfunction timerFlush() {\n  now(); // Get the current time, if not already set.\n  ++frame; // Pretend we’ve set an alarm, if we haven’t already.\n  var t = taskHead, e;\n  while (t) {\n    if ((e = clockNow - t._time) >= 0) t._call.call(undefined, e);\n    t = t._next;\n  }\n  --frame;\n}\n\nfunction wake() {\n  clockNow = (clockLast = clock.now()) + clockSkew;\n  frame = timeout = 0;\n  try {\n    timerFlush();\n  } finally {\n    frame = 0;\n    nap();\n    clockNow = 0;\n  }\n}\n\nfunction poke() {\n  var now = clock.now(), delay = now - clockLast;\n  if (delay > pokeDelay) clockSkew -= delay, clockLast = now;\n}\n\nfunction nap() {\n  var t0, t1 = taskHead, t2, time = Infinity;\n  while (t1) {\n    if (t1._call) {\n      if (time > t1._time) time = t1._time;\n      t0 = t1, t1 = t1._next;\n    } else {\n      t2 = t1._next, t1._next = null;\n      t1 = t0 ? t0._next = t2 : taskHead = t2;\n    }\n  }\n  taskTail = t0;\n  sleep(time);\n}\n\nfunction sleep(time) {\n  if (frame) return; // Soonest alarm already set, or will be.\n  if (timeout) timeout = clearTimeout(timeout);\n  var delay = time - clockNow; // Strictly less than if we recomputed clockNow.\n  if (delay > 24) {\n    if (time < Infinity) timeout = setTimeout(wake, time - clock.now() - clockSkew);\n    if (interval) interval = clearInterval(interval);\n  } else {\n    if (!interval) clockLast = clock.now(), interval = setInterval(poke, pokeDelay);\n    frame = 1, setFrame(wake);\n  }\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-zoom/node_modules/d3-transition/src/active.js\":\n/*!***********************************************************************!*\\\n  !*** ./node_modules/d3-zoom/node_modules/d3-transition/src/active.js ***!\n  \\***********************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _transition_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./transition/index.js */ \"./node_modules/d3-zoom/node_modules/d3-transition/src/transition/index.js\");\n/* harmony import */ var _transition_schedule_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./transition/schedule.js */ \"./node_modules/d3-zoom/node_modules/d3-transition/src/transition/schedule.js\");\n\n\n\nvar root = [null];\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(node, name) {\n  var schedules = node.__transition,\n      schedule,\n      i;\n\n  if (schedules) {\n    name = name == null ? null : name + \"\";\n    for (i in schedules) {\n      if ((schedule = schedules[i]).state > _transition_schedule_js__WEBPACK_IMPORTED_MODULE_1__[\"SCHEDULED\"] && schedule.name === name) {\n        return new _transition_index_js__WEBPACK_IMPORTED_MODULE_0__[\"Transition\"]([[node]], root, name, +i);\n      }\n    }\n  }\n\n  return null;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-zoom/node_modules/d3-transition/src/index.js\":\n/*!**********************************************************************!*\\\n  !*** ./node_modules/d3-zoom/node_modules/d3-transition/src/index.js ***!\n  \\**********************************************************************/\n/*! exports provided: transition, active, interrupt */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _selection_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./selection/index.js */ \"./node_modules/d3-zoom/node_modules/d3-transition/src/selection/index.js\");\n/* harmony import */ var _transition_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./transition/index.js */ \"./node_modules/d3-zoom/node_modules/d3-transition/src/transition/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"transition\", function() { return _transition_index_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"]; });\n\n/* harmony import */ var _active_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./active.js */ \"./node_modules/d3-zoom/node_modules/d3-transition/src/active.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"active\", function() { return _active_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"]; });\n\n/* harmony import */ var _interrupt_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./interrupt.js */ \"./node_modules/d3-zoom/node_modules/d3-transition/src/interrupt.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interrupt\", function() { return _interrupt_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"]; });\n\n\n\n\n\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-zoom/node_modules/d3-transition/src/interrupt.js\":\n/*!**************************************************************************!*\\\n  !*** ./node_modules/d3-zoom/node_modules/d3-transition/src/interrupt.js ***!\n  \\**************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _transition_schedule_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./transition/schedule.js */ \"./node_modules/d3-zoom/node_modules/d3-transition/src/transition/schedule.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(node, name) {\n  var schedules = node.__transition,\n      schedule,\n      active,\n      empty = true,\n      i;\n\n  if (!schedules) return;\n\n  name = name == null ? null : name + \"\";\n\n  for (i in schedules) {\n    if ((schedule = schedules[i]).name !== name) { empty = false; continue; }\n    active = schedule.state > _transition_schedule_js__WEBPACK_IMPORTED_MODULE_0__[\"STARTING\"] && schedule.state < _transition_schedule_js__WEBPACK_IMPORTED_MODULE_0__[\"ENDING\"];\n    schedule.state = _transition_schedule_js__WEBPACK_IMPORTED_MODULE_0__[\"ENDED\"];\n    schedule.timer.stop();\n    schedule.on.call(active ? \"interrupt\" : \"cancel\", node, node.__data__, schedule.index, schedule.group);\n    delete schedules[i];\n  }\n\n  if (empty) delete node.__transition;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-zoom/node_modules/d3-transition/src/selection/index.js\":\n/*!********************************************************************************!*\\\n  !*** ./node_modules/d3-zoom/node_modules/d3-transition/src/selection/index.js ***!\n  \\********************************************************************************/\n/*! no exports provided */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var d3_selection__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-selection */ \"./node_modules/d3-zoom/node_modules/d3-selection/src/index.js\");\n/* harmony import */ var _interrupt_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./interrupt.js */ \"./node_modules/d3-zoom/node_modules/d3-transition/src/selection/interrupt.js\");\n/* harmony import */ var _transition_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./transition.js */ \"./node_modules/d3-zoom/node_modules/d3-transition/src/selection/transition.js\");\n\n\n\n\nd3_selection__WEBPACK_IMPORTED_MODULE_0__[\"selection\"].prototype.interrupt = _interrupt_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"];\nd3_selection__WEBPACK_IMPORTED_MODULE_0__[\"selection\"].prototype.transition = _transition_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"];\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-zoom/node_modules/d3-transition/src/selection/interrupt.js\":\n/*!************************************************************************************!*\\\n  !*** ./node_modules/d3-zoom/node_modules/d3-transition/src/selection/interrupt.js ***!\n  \\************************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _interrupt_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../interrupt.js */ \"./node_modules/d3-zoom/node_modules/d3-transition/src/interrupt.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(name) {\n  return this.each(function() {\n    Object(_interrupt_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(this, name);\n  });\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-zoom/node_modules/d3-transition/src/selection/transition.js\":\n/*!*************************************************************************************!*\\\n  !*** ./node_modules/d3-zoom/node_modules/d3-transition/src/selection/transition.js ***!\n  \\*************************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _transition_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../transition/index.js */ \"./node_modules/d3-zoom/node_modules/d3-transition/src/transition/index.js\");\n/* harmony import */ var _transition_schedule_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../transition/schedule.js */ \"./node_modules/d3-zoom/node_modules/d3-transition/src/transition/schedule.js\");\n/* harmony import */ var d3_ease__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! d3-ease */ \"./node_modules/d3-zoom/node_modules/d3-ease/src/index.js\");\n/* harmony import */ var d3_timer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! d3-timer */ \"./node_modules/d3-zoom/node_modules/d3-timer/src/index.js\");\n\n\n\n\n\nvar defaultTiming = {\n  time: null, // Set on use.\n  delay: 0,\n  duration: 250,\n  ease: d3_ease__WEBPACK_IMPORTED_MODULE_2__[\"easeCubicInOut\"]\n};\n\nfunction inherit(node, id) {\n  var timing;\n  while (!(timing = node.__transition) || !(timing = timing[id])) {\n    if (!(node = node.parentNode)) {\n      throw new Error(`transition ${id} not found`);\n    }\n  }\n  return timing;\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(name) {\n  var id,\n      timing;\n\n  if (name instanceof _transition_index_js__WEBPACK_IMPORTED_MODULE_0__[\"Transition\"]) {\n    id = name._id, name = name._name;\n  } else {\n    id = Object(_transition_index_js__WEBPACK_IMPORTED_MODULE_0__[\"newId\"])(), (timing = defaultTiming).time = Object(d3_timer__WEBPACK_IMPORTED_MODULE_3__[\"now\"])(), name = name == null ? null : name + \"\";\n  }\n\n  for (var groups = this._groups, m = groups.length, j = 0; j < m; ++j) {\n    for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) {\n      if (node = group[i]) {\n        Object(_transition_schedule_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(node, name, id, i, group, timing || inherit(node, id));\n      }\n    }\n  }\n\n  return new _transition_index_js__WEBPACK_IMPORTED_MODULE_0__[\"Transition\"](groups, this._parents, name, id);\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-zoom/node_modules/d3-transition/src/transition/attr.js\":\n/*!********************************************************************************!*\\\n  !*** ./node_modules/d3-zoom/node_modules/d3-transition/src/transition/attr.js ***!\n  \\********************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var d3_interpolate__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-interpolate */ \"./node_modules/d3-zoom/node_modules/d3-interpolate/src/index.js\");\n/* harmony import */ var d3_selection__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! d3-selection */ \"./node_modules/d3-zoom/node_modules/d3-selection/src/index.js\");\n/* harmony import */ var _tween_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./tween.js */ \"./node_modules/d3-zoom/node_modules/d3-transition/src/transition/tween.js\");\n/* harmony import */ var _interpolate_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./interpolate.js */ \"./node_modules/d3-zoom/node_modules/d3-transition/src/transition/interpolate.js\");\n\n\n\n\n\nfunction attrRemove(name) {\n  return function() {\n    this.removeAttribute(name);\n  };\n}\n\nfunction attrRemoveNS(fullname) {\n  return function() {\n    this.removeAttributeNS(fullname.space, fullname.local);\n  };\n}\n\nfunction attrConstant(name, interpolate, value1) {\n  var string00,\n      string1 = value1 + \"\",\n      interpolate0;\n  return function() {\n    var string0 = this.getAttribute(name);\n    return string0 === string1 ? null\n        : string0 === string00 ? interpolate0\n        : interpolate0 = interpolate(string00 = string0, value1);\n  };\n}\n\nfunction attrConstantNS(fullname, interpolate, value1) {\n  var string00,\n      string1 = value1 + \"\",\n      interpolate0;\n  return function() {\n    var string0 = this.getAttributeNS(fullname.space, fullname.local);\n    return string0 === string1 ? null\n        : string0 === string00 ? interpolate0\n        : interpolate0 = interpolate(string00 = string0, value1);\n  };\n}\n\nfunction attrFunction(name, interpolate, value) {\n  var string00,\n      string10,\n      interpolate0;\n  return function() {\n    var string0, value1 = value(this), string1;\n    if (value1 == null) return void this.removeAttribute(name);\n    string0 = this.getAttribute(name);\n    string1 = value1 + \"\";\n    return string0 === string1 ? null\n        : string0 === string00 && string1 === string10 ? interpolate0\n        : (string10 = string1, interpolate0 = interpolate(string00 = string0, value1));\n  };\n}\n\nfunction attrFunctionNS(fullname, interpolate, value) {\n  var string00,\n      string10,\n      interpolate0;\n  return function() {\n    var string0, value1 = value(this), string1;\n    if (value1 == null) return void this.removeAttributeNS(fullname.space, fullname.local);\n    string0 = this.getAttributeNS(fullname.space, fullname.local);\n    string1 = value1 + \"\";\n    return string0 === string1 ? null\n        : string0 === string00 && string1 === string10 ? interpolate0\n        : (string10 = string1, interpolate0 = interpolate(string00 = string0, value1));\n  };\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(name, value) {\n  var fullname = Object(d3_selection__WEBPACK_IMPORTED_MODULE_1__[\"namespace\"])(name), i = fullname === \"transform\" ? d3_interpolate__WEBPACK_IMPORTED_MODULE_0__[\"interpolateTransformSvg\"] : _interpolate_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"];\n  return this.attrTween(name, typeof value === \"function\"\n      ? (fullname.local ? attrFunctionNS : attrFunction)(fullname, i, Object(_tween_js__WEBPACK_IMPORTED_MODULE_2__[\"tweenValue\"])(this, \"attr.\" + name, value))\n      : value == null ? (fullname.local ? attrRemoveNS : attrRemove)(fullname)\n      : (fullname.local ? attrConstantNS : attrConstant)(fullname, i, value));\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-zoom/node_modules/d3-transition/src/transition/attrTween.js\":\n/*!*************************************************************************************!*\\\n  !*** ./node_modules/d3-zoom/node_modules/d3-transition/src/transition/attrTween.js ***!\n  \\*************************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var d3_selection__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-selection */ \"./node_modules/d3-zoom/node_modules/d3-selection/src/index.js\");\n\n\nfunction attrInterpolate(name, i) {\n  return function(t) {\n    this.setAttribute(name, i.call(this, t));\n  };\n}\n\nfunction attrInterpolateNS(fullname, i) {\n  return function(t) {\n    this.setAttributeNS(fullname.space, fullname.local, i.call(this, t));\n  };\n}\n\nfunction attrTweenNS(fullname, value) {\n  var t0, i0;\n  function tween() {\n    var i = value.apply(this, arguments);\n    if (i !== i0) t0 = (i0 = i) && attrInterpolateNS(fullname, i);\n    return t0;\n  }\n  tween._value = value;\n  return tween;\n}\n\nfunction attrTween(name, value) {\n  var t0, i0;\n  function tween() {\n    var i = value.apply(this, arguments);\n    if (i !== i0) t0 = (i0 = i) && attrInterpolate(name, i);\n    return t0;\n  }\n  tween._value = value;\n  return tween;\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(name, value) {\n  var key = \"attr.\" + name;\n  if (arguments.length < 2) return (key = this.tween(key)) && key._value;\n  if (value == null) return this.tween(key, null);\n  if (typeof value !== \"function\") throw new Error;\n  var fullname = Object(d3_selection__WEBPACK_IMPORTED_MODULE_0__[\"namespace\"])(name);\n  return this.tween(key, (fullname.local ? attrTweenNS : attrTween)(fullname, value));\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-zoom/node_modules/d3-transition/src/transition/delay.js\":\n/*!*********************************************************************************!*\\\n  !*** ./node_modules/d3-zoom/node_modules/d3-transition/src/transition/delay.js ***!\n  \\*********************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _schedule_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./schedule.js */ \"./node_modules/d3-zoom/node_modules/d3-transition/src/transition/schedule.js\");\n\n\nfunction delayFunction(id, value) {\n  return function() {\n    Object(_schedule_js__WEBPACK_IMPORTED_MODULE_0__[\"init\"])(this, id).delay = +value.apply(this, arguments);\n  };\n}\n\nfunction delayConstant(id, value) {\n  return value = +value, function() {\n    Object(_schedule_js__WEBPACK_IMPORTED_MODULE_0__[\"init\"])(this, id).delay = value;\n  };\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(value) {\n  var id = this._id;\n\n  return arguments.length\n      ? this.each((typeof value === \"function\"\n          ? delayFunction\n          : delayConstant)(id, value))\n      : Object(_schedule_js__WEBPACK_IMPORTED_MODULE_0__[\"get\"])(this.node(), id).delay;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-zoom/node_modules/d3-transition/src/transition/duration.js\":\n/*!************************************************************************************!*\\\n  !*** ./node_modules/d3-zoom/node_modules/d3-transition/src/transition/duration.js ***!\n  \\************************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _schedule_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./schedule.js */ \"./node_modules/d3-zoom/node_modules/d3-transition/src/transition/schedule.js\");\n\n\nfunction durationFunction(id, value) {\n  return function() {\n    Object(_schedule_js__WEBPACK_IMPORTED_MODULE_0__[\"set\"])(this, id).duration = +value.apply(this, arguments);\n  };\n}\n\nfunction durationConstant(id, value) {\n  return value = +value, function() {\n    Object(_schedule_js__WEBPACK_IMPORTED_MODULE_0__[\"set\"])(this, id).duration = value;\n  };\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(value) {\n  var id = this._id;\n\n  return arguments.length\n      ? this.each((typeof value === \"function\"\n          ? durationFunction\n          : durationConstant)(id, value))\n      : Object(_schedule_js__WEBPACK_IMPORTED_MODULE_0__[\"get\"])(this.node(), id).duration;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-zoom/node_modules/d3-transition/src/transition/ease.js\":\n/*!********************************************************************************!*\\\n  !*** ./node_modules/d3-zoom/node_modules/d3-transition/src/transition/ease.js ***!\n  \\********************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _schedule_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./schedule.js */ \"./node_modules/d3-zoom/node_modules/d3-transition/src/transition/schedule.js\");\n\n\nfunction easeConstant(id, value) {\n  if (typeof value !== \"function\") throw new Error;\n  return function() {\n    Object(_schedule_js__WEBPACK_IMPORTED_MODULE_0__[\"set\"])(this, id).ease = value;\n  };\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(value) {\n  var id = this._id;\n\n  return arguments.length\n      ? this.each(easeConstant(id, value))\n      : Object(_schedule_js__WEBPACK_IMPORTED_MODULE_0__[\"get\"])(this.node(), id).ease;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-zoom/node_modules/d3-transition/src/transition/easeVarying.js\":\n/*!***************************************************************************************!*\\\n  !*** ./node_modules/d3-zoom/node_modules/d3-transition/src/transition/easeVarying.js ***!\n  \\***************************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _schedule_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./schedule.js */ \"./node_modules/d3-zoom/node_modules/d3-transition/src/transition/schedule.js\");\n\n\nfunction easeVarying(id, value) {\n  return function() {\n    var v = value.apply(this, arguments);\n    if (typeof v !== \"function\") throw new Error;\n    Object(_schedule_js__WEBPACK_IMPORTED_MODULE_0__[\"set\"])(this, id).ease = v;\n  };\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(value) {\n  if (typeof value !== \"function\") throw new Error;\n  return this.each(easeVarying(this._id, value));\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-zoom/node_modules/d3-transition/src/transition/end.js\":\n/*!*******************************************************************************!*\\\n  !*** ./node_modules/d3-zoom/node_modules/d3-transition/src/transition/end.js ***!\n  \\*******************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _schedule_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./schedule.js */ \"./node_modules/d3-zoom/node_modules/d3-transition/src/transition/schedule.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  var on0, on1, that = this, id = that._id, size = that.size();\n  return new Promise(function(resolve, reject) {\n    var cancel = {value: reject},\n        end = {value: function() { if (--size === 0) resolve(); }};\n\n    that.each(function() {\n      var schedule = Object(_schedule_js__WEBPACK_IMPORTED_MODULE_0__[\"set\"])(this, id),\n          on = schedule.on;\n\n      // If this node shared a dispatch with the previous node,\n      // just assign the updated shared dispatch and we’re done!\n      // Otherwise, copy-on-write.\n      if (on !== on0) {\n        on1 = (on0 = on).copy();\n        on1._.cancel.push(cancel);\n        on1._.interrupt.push(cancel);\n        on1._.end.push(end);\n      }\n\n      schedule.on = on1;\n    });\n\n    // The selection was empty, resolve end immediately\n    if (size === 0) resolve();\n  });\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-zoom/node_modules/d3-transition/src/transition/filter.js\":\n/*!**********************************************************************************!*\\\n  !*** ./node_modules/d3-zoom/node_modules/d3-transition/src/transition/filter.js ***!\n  \\**********************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var d3_selection__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-selection */ \"./node_modules/d3-zoom/node_modules/d3-selection/src/index.js\");\n/* harmony import */ var _index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./index.js */ \"./node_modules/d3-zoom/node_modules/d3-transition/src/transition/index.js\");\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(match) {\n  if (typeof match !== \"function\") match = Object(d3_selection__WEBPACK_IMPORTED_MODULE_0__[\"matcher\"])(match);\n\n  for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {\n    for (var group = groups[j], n = group.length, subgroup = subgroups[j] = [], node, i = 0; i < n; ++i) {\n      if ((node = group[i]) && match.call(node, node.__data__, i, group)) {\n        subgroup.push(node);\n      }\n    }\n  }\n\n  return new _index_js__WEBPACK_IMPORTED_MODULE_1__[\"Transition\"](subgroups, this._parents, this._name, this._id);\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-zoom/node_modules/d3-transition/src/transition/index.js\":\n/*!*********************************************************************************!*\\\n  !*** ./node_modules/d3-zoom/node_modules/d3-transition/src/transition/index.js ***!\n  \\*********************************************************************************/\n/*! exports provided: Transition, default, newId */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Transition\", function() { return Transition; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return transition; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"newId\", function() { return newId; });\n/* harmony import */ var d3_selection__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-selection */ \"./node_modules/d3-zoom/node_modules/d3-selection/src/index.js\");\n/* harmony import */ var _attr_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./attr.js */ \"./node_modules/d3-zoom/node_modules/d3-transition/src/transition/attr.js\");\n/* harmony import */ var _attrTween_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./attrTween.js */ \"./node_modules/d3-zoom/node_modules/d3-transition/src/transition/attrTween.js\");\n/* harmony import */ var _delay_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./delay.js */ \"./node_modules/d3-zoom/node_modules/d3-transition/src/transition/delay.js\");\n/* harmony import */ var _duration_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./duration.js */ \"./node_modules/d3-zoom/node_modules/d3-transition/src/transition/duration.js\");\n/* harmony import */ var _ease_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./ease.js */ \"./node_modules/d3-zoom/node_modules/d3-transition/src/transition/ease.js\");\n/* harmony import */ var _easeVarying_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./easeVarying.js */ \"./node_modules/d3-zoom/node_modules/d3-transition/src/transition/easeVarying.js\");\n/* harmony import */ var _filter_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./filter.js */ \"./node_modules/d3-zoom/node_modules/d3-transition/src/transition/filter.js\");\n/* harmony import */ var _merge_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./merge.js */ \"./node_modules/d3-zoom/node_modules/d3-transition/src/transition/merge.js\");\n/* harmony import */ var _on_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./on.js */ \"./node_modules/d3-zoom/node_modules/d3-transition/src/transition/on.js\");\n/* harmony import */ var _remove_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./remove.js */ \"./node_modules/d3-zoom/node_modules/d3-transition/src/transition/remove.js\");\n/* harmony import */ var _select_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./select.js */ \"./node_modules/d3-zoom/node_modules/d3-transition/src/transition/select.js\");\n/* harmony import */ var _selectAll_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./selectAll.js */ \"./node_modules/d3-zoom/node_modules/d3-transition/src/transition/selectAll.js\");\n/* harmony import */ var _selection_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./selection.js */ \"./node_modules/d3-zoom/node_modules/d3-transition/src/transition/selection.js\");\n/* harmony import */ var _style_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./style.js */ \"./node_modules/d3-zoom/node_modules/d3-transition/src/transition/style.js\");\n/* harmony import */ var _styleTween_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./styleTween.js */ \"./node_modules/d3-zoom/node_modules/d3-transition/src/transition/styleTween.js\");\n/* harmony import */ var _text_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./text.js */ \"./node_modules/d3-zoom/node_modules/d3-transition/src/transition/text.js\");\n/* harmony import */ var _textTween_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./textTween.js */ \"./node_modules/d3-zoom/node_modules/d3-transition/src/transition/textTween.js\");\n/* harmony import */ var _transition_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./transition.js */ \"./node_modules/d3-zoom/node_modules/d3-transition/src/transition/transition.js\");\n/* harmony import */ var _tween_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./tween.js */ \"./node_modules/d3-zoom/node_modules/d3-transition/src/transition/tween.js\");\n/* harmony import */ var _end_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./end.js */ \"./node_modules/d3-zoom/node_modules/d3-transition/src/transition/end.js\");\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nvar id = 0;\n\nfunction Transition(groups, parents, name, id) {\n  this._groups = groups;\n  this._parents = parents;\n  this._name = name;\n  this._id = id;\n}\n\nfunction transition(name) {\n  return Object(d3_selection__WEBPACK_IMPORTED_MODULE_0__[\"selection\"])().transition(name);\n}\n\nfunction newId() {\n  return ++id;\n}\n\nvar selection_prototype = d3_selection__WEBPACK_IMPORTED_MODULE_0__[\"selection\"].prototype;\n\nTransition.prototype = transition.prototype = {\n  constructor: Transition,\n  select: _select_js__WEBPACK_IMPORTED_MODULE_11__[\"default\"],\n  selectAll: _selectAll_js__WEBPACK_IMPORTED_MODULE_12__[\"default\"],\n  selectChild: selection_prototype.selectChild,\n  selectChildren: selection_prototype.selectChildren,\n  filter: _filter_js__WEBPACK_IMPORTED_MODULE_7__[\"default\"],\n  merge: _merge_js__WEBPACK_IMPORTED_MODULE_8__[\"default\"],\n  selection: _selection_js__WEBPACK_IMPORTED_MODULE_13__[\"default\"],\n  transition: _transition_js__WEBPACK_IMPORTED_MODULE_18__[\"default\"],\n  call: selection_prototype.call,\n  nodes: selection_prototype.nodes,\n  node: selection_prototype.node,\n  size: selection_prototype.size,\n  empty: selection_prototype.empty,\n  each: selection_prototype.each,\n  on: _on_js__WEBPACK_IMPORTED_MODULE_9__[\"default\"],\n  attr: _attr_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"],\n  attrTween: _attrTween_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"],\n  style: _style_js__WEBPACK_IMPORTED_MODULE_14__[\"default\"],\n  styleTween: _styleTween_js__WEBPACK_IMPORTED_MODULE_15__[\"default\"],\n  text: _text_js__WEBPACK_IMPORTED_MODULE_16__[\"default\"],\n  textTween: _textTween_js__WEBPACK_IMPORTED_MODULE_17__[\"default\"],\n  remove: _remove_js__WEBPACK_IMPORTED_MODULE_10__[\"default\"],\n  tween: _tween_js__WEBPACK_IMPORTED_MODULE_19__[\"default\"],\n  delay: _delay_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"],\n  duration: _duration_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"],\n  ease: _ease_js__WEBPACK_IMPORTED_MODULE_5__[\"default\"],\n  easeVarying: _easeVarying_js__WEBPACK_IMPORTED_MODULE_6__[\"default\"],\n  end: _end_js__WEBPACK_IMPORTED_MODULE_20__[\"default\"],\n  [Symbol.iterator]: selection_prototype[Symbol.iterator]\n};\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-zoom/node_modules/d3-transition/src/transition/interpolate.js\":\n/*!***************************************************************************************!*\\\n  !*** ./node_modules/d3-zoom/node_modules/d3-transition/src/transition/interpolate.js ***!\n  \\***************************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var d3_color__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-color */ \"./node_modules/d3-zoom/node_modules/d3-color/src/index.js\");\n/* harmony import */ var d3_interpolate__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! d3-interpolate */ \"./node_modules/d3-zoom/node_modules/d3-interpolate/src/index.js\");\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(a, b) {\n  var c;\n  return (typeof b === \"number\" ? d3_interpolate__WEBPACK_IMPORTED_MODULE_1__[\"interpolateNumber\"]\n      : b instanceof d3_color__WEBPACK_IMPORTED_MODULE_0__[\"color\"] ? d3_interpolate__WEBPACK_IMPORTED_MODULE_1__[\"interpolateRgb\"]\n      : (c = Object(d3_color__WEBPACK_IMPORTED_MODULE_0__[\"color\"])(b)) ? (b = c, d3_interpolate__WEBPACK_IMPORTED_MODULE_1__[\"interpolateRgb\"])\n      : d3_interpolate__WEBPACK_IMPORTED_MODULE_1__[\"interpolateString\"])(a, b);\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-zoom/node_modules/d3-transition/src/transition/merge.js\":\n/*!*********************************************************************************!*\\\n  !*** ./node_modules/d3-zoom/node_modules/d3-transition/src/transition/merge.js ***!\n  \\*********************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./index.js */ \"./node_modules/d3-zoom/node_modules/d3-transition/src/transition/index.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(transition) {\n  if (transition._id !== this._id) throw new Error;\n\n  for (var groups0 = this._groups, groups1 = transition._groups, m0 = groups0.length, m1 = groups1.length, m = Math.min(m0, m1), merges = new Array(m0), j = 0; j < m; ++j) {\n    for (var group0 = groups0[j], group1 = groups1[j], n = group0.length, merge = merges[j] = new Array(n), node, i = 0; i < n; ++i) {\n      if (node = group0[i] || group1[i]) {\n        merge[i] = node;\n      }\n    }\n  }\n\n  for (; j < m0; ++j) {\n    merges[j] = groups0[j];\n  }\n\n  return new _index_js__WEBPACK_IMPORTED_MODULE_0__[\"Transition\"](merges, this._parents, this._name, this._id);\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-zoom/node_modules/d3-transition/src/transition/on.js\":\n/*!******************************************************************************!*\\\n  !*** ./node_modules/d3-zoom/node_modules/d3-transition/src/transition/on.js ***!\n  \\******************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _schedule_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./schedule.js */ \"./node_modules/d3-zoom/node_modules/d3-transition/src/transition/schedule.js\");\n\n\nfunction start(name) {\n  return (name + \"\").trim().split(/^|\\s+/).every(function(t) {\n    var i = t.indexOf(\".\");\n    if (i >= 0) t = t.slice(0, i);\n    return !t || t === \"start\";\n  });\n}\n\nfunction onFunction(id, name, listener) {\n  var on0, on1, sit = start(name) ? _schedule_js__WEBPACK_IMPORTED_MODULE_0__[\"init\"] : _schedule_js__WEBPACK_IMPORTED_MODULE_0__[\"set\"];\n  return function() {\n    var schedule = sit(this, id),\n        on = schedule.on;\n\n    // If this node shared a dispatch with the previous node,\n    // just assign the updated shared dispatch and we’re done!\n    // Otherwise, copy-on-write.\n    if (on !== on0) (on1 = (on0 = on).copy()).on(name, listener);\n\n    schedule.on = on1;\n  };\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(name, listener) {\n  var id = this._id;\n\n  return arguments.length < 2\n      ? Object(_schedule_js__WEBPACK_IMPORTED_MODULE_0__[\"get\"])(this.node(), id).on.on(name)\n      : this.each(onFunction(id, name, listener));\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-zoom/node_modules/d3-transition/src/transition/remove.js\":\n/*!**********************************************************************************!*\\\n  !*** ./node_modules/d3-zoom/node_modules/d3-transition/src/transition/remove.js ***!\n  \\**********************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\nfunction removeFunction(id) {\n  return function() {\n    var parent = this.parentNode;\n    for (var i in this.__transition) if (+i !== id) return;\n    if (parent) parent.removeChild(this);\n  };\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  return this.on(\"end.remove\", removeFunction(this._id));\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-zoom/node_modules/d3-transition/src/transition/schedule.js\":\n/*!************************************************************************************!*\\\n  !*** ./node_modules/d3-zoom/node_modules/d3-transition/src/transition/schedule.js ***!\n  \\************************************************************************************/\n/*! exports provided: CREATED, SCHEDULED, STARTING, STARTED, RUNNING, ENDING, ENDED, default, init, set, get */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"CREATED\", function() { return CREATED; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"SCHEDULED\", function() { return SCHEDULED; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"STARTING\", function() { return STARTING; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"STARTED\", function() { return STARTED; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"RUNNING\", function() { return RUNNING; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"ENDING\", function() { return ENDING; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"ENDED\", function() { return ENDED; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"init\", function() { return init; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"set\", function() { return set; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"get\", function() { return get; });\n/* harmony import */ var d3_dispatch__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-dispatch */ \"./node_modules/d3-zoom/node_modules/d3-dispatch/src/index.js\");\n/* harmony import */ var d3_timer__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! d3-timer */ \"./node_modules/d3-zoom/node_modules/d3-timer/src/index.js\");\n\n\n\nvar emptyOn = Object(d3_dispatch__WEBPACK_IMPORTED_MODULE_0__[\"dispatch\"])(\"start\", \"end\", \"cancel\", \"interrupt\");\nvar emptyTween = [];\n\nvar CREATED = 0;\nvar SCHEDULED = 1;\nvar STARTING = 2;\nvar STARTED = 3;\nvar RUNNING = 4;\nvar ENDING = 5;\nvar ENDED = 6;\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(node, name, id, index, group, timing) {\n  var schedules = node.__transition;\n  if (!schedules) node.__transition = {};\n  else if (id in schedules) return;\n  create(node, id, {\n    name: name,\n    index: index, // For context during callback.\n    group: group, // For context during callback.\n    on: emptyOn,\n    tween: emptyTween,\n    time: timing.time,\n    delay: timing.delay,\n    duration: timing.duration,\n    ease: timing.ease,\n    timer: null,\n    state: CREATED\n  });\n});\n\nfunction init(node, id) {\n  var schedule = get(node, id);\n  if (schedule.state > CREATED) throw new Error(\"too late; already scheduled\");\n  return schedule;\n}\n\nfunction set(node, id) {\n  var schedule = get(node, id);\n  if (schedule.state > STARTED) throw new Error(\"too late; already running\");\n  return schedule;\n}\n\nfunction get(node, id) {\n  var schedule = node.__transition;\n  if (!schedule || !(schedule = schedule[id])) throw new Error(\"transition not found\");\n  return schedule;\n}\n\nfunction create(node, id, self) {\n  var schedules = node.__transition,\n      tween;\n\n  // Initialize the self timer when the transition is created.\n  // Note the actual delay is not known until the first callback!\n  schedules[id] = self;\n  self.timer = Object(d3_timer__WEBPACK_IMPORTED_MODULE_1__[\"timer\"])(schedule, 0, self.time);\n\n  function schedule(elapsed) {\n    self.state = SCHEDULED;\n    self.timer.restart(start, self.delay, self.time);\n\n    // If the elapsed delay is less than our first sleep, start immediately.\n    if (self.delay <= elapsed) start(elapsed - self.delay);\n  }\n\n  function start(elapsed) {\n    var i, j, n, o;\n\n    // If the state is not SCHEDULED, then we previously errored on start.\n    if (self.state !== SCHEDULED) return stop();\n\n    for (i in schedules) {\n      o = schedules[i];\n      if (o.name !== self.name) continue;\n\n      // While this element already has a starting transition during this frame,\n      // defer starting an interrupting transition until that transition has a\n      // chance to tick (and possibly end); see d3/d3-transition#54!\n      if (o.state === STARTED) return Object(d3_timer__WEBPACK_IMPORTED_MODULE_1__[\"timeout\"])(start);\n\n      // Interrupt the active transition, if any.\n      if (o.state === RUNNING) {\n        o.state = ENDED;\n        o.timer.stop();\n        o.on.call(\"interrupt\", node, node.__data__, o.index, o.group);\n        delete schedules[i];\n      }\n\n      // Cancel any pre-empted transitions.\n      else if (+i < id) {\n        o.state = ENDED;\n        o.timer.stop();\n        o.on.call(\"cancel\", node, node.__data__, o.index, o.group);\n        delete schedules[i];\n      }\n    }\n\n    // Defer the first tick to end of the current frame; see d3/d3#1576.\n    // Note the transition may be canceled after start and before the first tick!\n    // Note this must be scheduled before the start event; see d3/d3-transition#16!\n    // Assuming this is successful, subsequent callbacks go straight to tick.\n    Object(d3_timer__WEBPACK_IMPORTED_MODULE_1__[\"timeout\"])(function() {\n      if (self.state === STARTED) {\n        self.state = RUNNING;\n        self.timer.restart(tick, self.delay, self.time);\n        tick(elapsed);\n      }\n    });\n\n    // Dispatch the start event.\n    // Note this must be done before the tween are initialized.\n    self.state = STARTING;\n    self.on.call(\"start\", node, node.__data__, self.index, self.group);\n    if (self.state !== STARTING) return; // interrupted\n    self.state = STARTED;\n\n    // Initialize the tween, deleting null tween.\n    tween = new Array(n = self.tween.length);\n    for (i = 0, j = -1; i < n; ++i) {\n      if (o = self.tween[i].value.call(node, node.__data__, self.index, self.group)) {\n        tween[++j] = o;\n      }\n    }\n    tween.length = j + 1;\n  }\n\n  function tick(elapsed) {\n    var t = elapsed < self.duration ? self.ease.call(null, elapsed / self.duration) : (self.timer.restart(stop), self.state = ENDING, 1),\n        i = -1,\n        n = tween.length;\n\n    while (++i < n) {\n      tween[i].call(node, t);\n    }\n\n    // Dispatch the end event.\n    if (self.state === ENDING) {\n      self.on.call(\"end\", node, node.__data__, self.index, self.group);\n      stop();\n    }\n  }\n\n  function stop() {\n    self.state = ENDED;\n    self.timer.stop();\n    delete schedules[id];\n    for (var i in schedules) return; // eslint-disable-line no-unused-vars\n    delete node.__transition;\n  }\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-zoom/node_modules/d3-transition/src/transition/select.js\":\n/*!**********************************************************************************!*\\\n  !*** ./node_modules/d3-zoom/node_modules/d3-transition/src/transition/select.js ***!\n  \\**********************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var d3_selection__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-selection */ \"./node_modules/d3-zoom/node_modules/d3-selection/src/index.js\");\n/* harmony import */ var _index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./index.js */ \"./node_modules/d3-zoom/node_modules/d3-transition/src/transition/index.js\");\n/* harmony import */ var _schedule_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./schedule.js */ \"./node_modules/d3-zoom/node_modules/d3-transition/src/transition/schedule.js\");\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(select) {\n  var name = this._name,\n      id = this._id;\n\n  if (typeof select !== \"function\") select = Object(d3_selection__WEBPACK_IMPORTED_MODULE_0__[\"selector\"])(select);\n\n  for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {\n    for (var group = groups[j], n = group.length, subgroup = subgroups[j] = new Array(n), node, subnode, i = 0; i < n; ++i) {\n      if ((node = group[i]) && (subnode = select.call(node, node.__data__, i, group))) {\n        if (\"__data__\" in node) subnode.__data__ = node.__data__;\n        subgroup[i] = subnode;\n        Object(_schedule_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(subgroup[i], name, id, i, subgroup, Object(_schedule_js__WEBPACK_IMPORTED_MODULE_2__[\"get\"])(node, id));\n      }\n    }\n  }\n\n  return new _index_js__WEBPACK_IMPORTED_MODULE_1__[\"Transition\"](subgroups, this._parents, name, id);\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-zoom/node_modules/d3-transition/src/transition/selectAll.js\":\n/*!*************************************************************************************!*\\\n  !*** ./node_modules/d3-zoom/node_modules/d3-transition/src/transition/selectAll.js ***!\n  \\*************************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var d3_selection__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-selection */ \"./node_modules/d3-zoom/node_modules/d3-selection/src/index.js\");\n/* harmony import */ var _index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./index.js */ \"./node_modules/d3-zoom/node_modules/d3-transition/src/transition/index.js\");\n/* harmony import */ var _schedule_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./schedule.js */ \"./node_modules/d3-zoom/node_modules/d3-transition/src/transition/schedule.js\");\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(select) {\n  var name = this._name,\n      id = this._id;\n\n  if (typeof select !== \"function\") select = Object(d3_selection__WEBPACK_IMPORTED_MODULE_0__[\"selectorAll\"])(select);\n\n  for (var groups = this._groups, m = groups.length, subgroups = [], parents = [], j = 0; j < m; ++j) {\n    for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) {\n      if (node = group[i]) {\n        for (var children = select.call(node, node.__data__, i, group), child, inherit = Object(_schedule_js__WEBPACK_IMPORTED_MODULE_2__[\"get\"])(node, id), k = 0, l = children.length; k < l; ++k) {\n          if (child = children[k]) {\n            Object(_schedule_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(child, name, id, k, children, inherit);\n          }\n        }\n        subgroups.push(children);\n        parents.push(node);\n      }\n    }\n  }\n\n  return new _index_js__WEBPACK_IMPORTED_MODULE_1__[\"Transition\"](subgroups, parents, name, id);\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-zoom/node_modules/d3-transition/src/transition/selection.js\":\n/*!*************************************************************************************!*\\\n  !*** ./node_modules/d3-zoom/node_modules/d3-transition/src/transition/selection.js ***!\n  \\*************************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var d3_selection__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-selection */ \"./node_modules/d3-zoom/node_modules/d3-selection/src/index.js\");\n\n\nvar Selection = d3_selection__WEBPACK_IMPORTED_MODULE_0__[\"selection\"].prototype.constructor;\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  return new Selection(this._groups, this._parents);\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-zoom/node_modules/d3-transition/src/transition/style.js\":\n/*!*********************************************************************************!*\\\n  !*** ./node_modules/d3-zoom/node_modules/d3-transition/src/transition/style.js ***!\n  \\*********************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var d3_interpolate__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-interpolate */ \"./node_modules/d3-zoom/node_modules/d3-interpolate/src/index.js\");\n/* harmony import */ var d3_selection__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! d3-selection */ \"./node_modules/d3-zoom/node_modules/d3-selection/src/index.js\");\n/* harmony import */ var _schedule_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./schedule.js */ \"./node_modules/d3-zoom/node_modules/d3-transition/src/transition/schedule.js\");\n/* harmony import */ var _tween_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./tween.js */ \"./node_modules/d3-zoom/node_modules/d3-transition/src/transition/tween.js\");\n/* harmony import */ var _interpolate_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./interpolate.js */ \"./node_modules/d3-zoom/node_modules/d3-transition/src/transition/interpolate.js\");\n\n\n\n\n\n\nfunction styleNull(name, interpolate) {\n  var string00,\n      string10,\n      interpolate0;\n  return function() {\n    var string0 = Object(d3_selection__WEBPACK_IMPORTED_MODULE_1__[\"style\"])(this, name),\n        string1 = (this.style.removeProperty(name), Object(d3_selection__WEBPACK_IMPORTED_MODULE_1__[\"style\"])(this, name));\n    return string0 === string1 ? null\n        : string0 === string00 && string1 === string10 ? interpolate0\n        : interpolate0 = interpolate(string00 = string0, string10 = string1);\n  };\n}\n\nfunction styleRemove(name) {\n  return function() {\n    this.style.removeProperty(name);\n  };\n}\n\nfunction styleConstant(name, interpolate, value1) {\n  var string00,\n      string1 = value1 + \"\",\n      interpolate0;\n  return function() {\n    var string0 = Object(d3_selection__WEBPACK_IMPORTED_MODULE_1__[\"style\"])(this, name);\n    return string0 === string1 ? null\n        : string0 === string00 ? interpolate0\n        : interpolate0 = interpolate(string00 = string0, value1);\n  };\n}\n\nfunction styleFunction(name, interpolate, value) {\n  var string00,\n      string10,\n      interpolate0;\n  return function() {\n    var string0 = Object(d3_selection__WEBPACK_IMPORTED_MODULE_1__[\"style\"])(this, name),\n        value1 = value(this),\n        string1 = value1 + \"\";\n    if (value1 == null) string1 = value1 = (this.style.removeProperty(name), Object(d3_selection__WEBPACK_IMPORTED_MODULE_1__[\"style\"])(this, name));\n    return string0 === string1 ? null\n        : string0 === string00 && string1 === string10 ? interpolate0\n        : (string10 = string1, interpolate0 = interpolate(string00 = string0, value1));\n  };\n}\n\nfunction styleMaybeRemove(id, name) {\n  var on0, on1, listener0, key = \"style.\" + name, event = \"end.\" + key, remove;\n  return function() {\n    var schedule = Object(_schedule_js__WEBPACK_IMPORTED_MODULE_2__[\"set\"])(this, id),\n        on = schedule.on,\n        listener = schedule.value[key] == null ? remove || (remove = styleRemove(name)) : undefined;\n\n    // If this node shared a dispatch with the previous node,\n    // just assign the updated shared dispatch and we’re done!\n    // Otherwise, copy-on-write.\n    if (on !== on0 || listener0 !== listener) (on1 = (on0 = on).copy()).on(event, listener0 = listener);\n\n    schedule.on = on1;\n  };\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(name, value, priority) {\n  var i = (name += \"\") === \"transform\" ? d3_interpolate__WEBPACK_IMPORTED_MODULE_0__[\"interpolateTransformCss\"] : _interpolate_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"];\n  return value == null ? this\n      .styleTween(name, styleNull(name, i))\n      .on(\"end.style.\" + name, styleRemove(name))\n    : typeof value === \"function\" ? this\n      .styleTween(name, styleFunction(name, i, Object(_tween_js__WEBPACK_IMPORTED_MODULE_3__[\"tweenValue\"])(this, \"style.\" + name, value)))\n      .each(styleMaybeRemove(this._id, name))\n    : this\n      .styleTween(name, styleConstant(name, i, value), priority)\n      .on(\"end.style.\" + name, null);\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-zoom/node_modules/d3-transition/src/transition/styleTween.js\":\n/*!**************************************************************************************!*\\\n  !*** ./node_modules/d3-zoom/node_modules/d3-transition/src/transition/styleTween.js ***!\n  \\**************************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\nfunction styleInterpolate(name, i, priority) {\n  return function(t) {\n    this.style.setProperty(name, i.call(this, t), priority);\n  };\n}\n\nfunction styleTween(name, value, priority) {\n  var t, i0;\n  function tween() {\n    var i = value.apply(this, arguments);\n    if (i !== i0) t = (i0 = i) && styleInterpolate(name, i, priority);\n    return t;\n  }\n  tween._value = value;\n  return tween;\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(name, value, priority) {\n  var key = \"style.\" + (name += \"\");\n  if (arguments.length < 2) return (key = this.tween(key)) && key._value;\n  if (value == null) return this.tween(key, null);\n  if (typeof value !== \"function\") throw new Error;\n  return this.tween(key, styleTween(name, value, priority == null ? \"\" : priority));\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-zoom/node_modules/d3-transition/src/transition/text.js\":\n/*!********************************************************************************!*\\\n  !*** ./node_modules/d3-zoom/node_modules/d3-transition/src/transition/text.js ***!\n  \\********************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _tween_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./tween.js */ \"./node_modules/d3-zoom/node_modules/d3-transition/src/transition/tween.js\");\n\n\nfunction textConstant(value) {\n  return function() {\n    this.textContent = value;\n  };\n}\n\nfunction textFunction(value) {\n  return function() {\n    var value1 = value(this);\n    this.textContent = value1 == null ? \"\" : value1;\n  };\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(value) {\n  return this.tween(\"text\", typeof value === \"function\"\n      ? textFunction(Object(_tween_js__WEBPACK_IMPORTED_MODULE_0__[\"tweenValue\"])(this, \"text\", value))\n      : textConstant(value == null ? \"\" : value + \"\"));\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-zoom/node_modules/d3-transition/src/transition/textTween.js\":\n/*!*************************************************************************************!*\\\n  !*** ./node_modules/d3-zoom/node_modules/d3-transition/src/transition/textTween.js ***!\n  \\*************************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\nfunction textInterpolate(i) {\n  return function(t) {\n    this.textContent = i.call(this, t);\n  };\n}\n\nfunction textTween(value) {\n  var t0, i0;\n  function tween() {\n    var i = value.apply(this, arguments);\n    if (i !== i0) t0 = (i0 = i) && textInterpolate(i);\n    return t0;\n  }\n  tween._value = value;\n  return tween;\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(value) {\n  var key = \"text\";\n  if (arguments.length < 1) return (key = this.tween(key)) && key._value;\n  if (value == null) return this.tween(key, null);\n  if (typeof value !== \"function\") throw new Error;\n  return this.tween(key, textTween(value));\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-zoom/node_modules/d3-transition/src/transition/transition.js\":\n/*!**************************************************************************************!*\\\n  !*** ./node_modules/d3-zoom/node_modules/d3-transition/src/transition/transition.js ***!\n  \\**************************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./index.js */ \"./node_modules/d3-zoom/node_modules/d3-transition/src/transition/index.js\");\n/* harmony import */ var _schedule_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./schedule.js */ \"./node_modules/d3-zoom/node_modules/d3-transition/src/transition/schedule.js\");\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  var name = this._name,\n      id0 = this._id,\n      id1 = Object(_index_js__WEBPACK_IMPORTED_MODULE_0__[\"newId\"])();\n\n  for (var groups = this._groups, m = groups.length, j = 0; j < m; ++j) {\n    for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) {\n      if (node = group[i]) {\n        var inherit = Object(_schedule_js__WEBPACK_IMPORTED_MODULE_1__[\"get\"])(node, id0);\n        Object(_schedule_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(node, name, id1, i, group, {\n          time: inherit.time + inherit.delay + inherit.duration,\n          delay: 0,\n          duration: inherit.duration,\n          ease: inherit.ease\n        });\n      }\n    }\n  }\n\n  return new _index_js__WEBPACK_IMPORTED_MODULE_0__[\"Transition\"](groups, this._parents, name, id1);\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-zoom/node_modules/d3-transition/src/transition/tween.js\":\n/*!*********************************************************************************!*\\\n  !*** ./node_modules/d3-zoom/node_modules/d3-transition/src/transition/tween.js ***!\n  \\*********************************************************************************/\n/*! exports provided: default, tweenValue */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"tweenValue\", function() { return tweenValue; });\n/* harmony import */ var _schedule_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./schedule.js */ \"./node_modules/d3-zoom/node_modules/d3-transition/src/transition/schedule.js\");\n\n\nfunction tweenRemove(id, name) {\n  var tween0, tween1;\n  return function() {\n    var schedule = Object(_schedule_js__WEBPACK_IMPORTED_MODULE_0__[\"set\"])(this, id),\n        tween = schedule.tween;\n\n    // If this node shared tween with the previous node,\n    // just assign the updated shared tween and we’re done!\n    // Otherwise, copy-on-write.\n    if (tween !== tween0) {\n      tween1 = tween0 = tween;\n      for (var i = 0, n = tween1.length; i < n; ++i) {\n        if (tween1[i].name === name) {\n          tween1 = tween1.slice();\n          tween1.splice(i, 1);\n          break;\n        }\n      }\n    }\n\n    schedule.tween = tween1;\n  };\n}\n\nfunction tweenFunction(id, name, value) {\n  var tween0, tween1;\n  if (typeof value !== \"function\") throw new Error;\n  return function() {\n    var schedule = Object(_schedule_js__WEBPACK_IMPORTED_MODULE_0__[\"set\"])(this, id),\n        tween = schedule.tween;\n\n    // If this node shared tween with the previous node,\n    // just assign the updated shared tween and we’re done!\n    // Otherwise, copy-on-write.\n    if (tween !== tween0) {\n      tween1 = (tween0 = tween).slice();\n      for (var t = {name: name, value: value}, i = 0, n = tween1.length; i < n; ++i) {\n        if (tween1[i].name === name) {\n          tween1[i] = t;\n          break;\n        }\n      }\n      if (i === n) tween1.push(t);\n    }\n\n    schedule.tween = tween1;\n  };\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(name, value) {\n  var id = this._id;\n\n  name += \"\";\n\n  if (arguments.length < 2) {\n    var tween = Object(_schedule_js__WEBPACK_IMPORTED_MODULE_0__[\"get\"])(this.node(), id).tween;\n    for (var i = 0, n = tween.length, t; i < n; ++i) {\n      if ((t = tween[i]).name === name) {\n        return t.value;\n      }\n    }\n    return null;\n  }\n\n  return this.each((value == null ? tweenRemove : tweenFunction)(id, name, value));\n});\n\nfunction tweenValue(transition, name, value) {\n  var id = transition._id;\n\n  transition.each(function() {\n    var schedule = Object(_schedule_js__WEBPACK_IMPORTED_MODULE_0__[\"set\"])(this, id);\n    (schedule.value || (schedule.value = {}))[name] = value.apply(this, arguments);\n  });\n\n  return function(node) {\n    return Object(_schedule_js__WEBPACK_IMPORTED_MODULE_0__[\"get\"])(node, id).value[name];\n  };\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-zoom/src/constant.js\":\n/*!**********************************************!*\\\n  !*** ./node_modules/d3-zoom/src/constant.js ***!\n  \\**********************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (x => () => x);\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-zoom/src/event.js\":\n/*!*******************************************!*\\\n  !*** ./node_modules/d3-zoom/src/event.js ***!\n  \\*******************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return ZoomEvent; });\nfunction ZoomEvent(type, {\n  sourceEvent,\n  target,\n  transform,\n  dispatch\n}) {\n  Object.defineProperties(this, {\n    type: {value: type, enumerable: true, configurable: true},\n    sourceEvent: {value: sourceEvent, enumerable: true, configurable: true},\n    target: {value: target, enumerable: true, configurable: true},\n    transform: {value: transform, enumerable: true, configurable: true},\n    _: {value: dispatch}\n  });\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-zoom/src/index.js\":\n/*!*******************************************!*\\\n  !*** ./node_modules/d3-zoom/src/index.js ***!\n  \\*******************************************/\n/*! exports provided: zoom, zoomTransform, zoomIdentity, ZoomTransform */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _zoom_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./zoom.js */ \"./node_modules/d3-zoom/src/zoom.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"zoom\", function() { return _zoom_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n/* harmony import */ var _transform_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./transform.js */ \"./node_modules/d3-zoom/src/transform.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"zoomTransform\", function() { return _transform_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"zoomIdentity\", function() { return _transform_js__WEBPACK_IMPORTED_MODULE_1__[\"identity\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"ZoomTransform\", function() { return _transform_js__WEBPACK_IMPORTED_MODULE_1__[\"Transform\"]; });\n\n\n\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-zoom/src/noevent.js\":\n/*!*********************************************!*\\\n  !*** ./node_modules/d3-zoom/src/noevent.js ***!\n  \\*********************************************/\n/*! exports provided: nopropagation, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"nopropagation\", function() { return nopropagation; });\nfunction nopropagation(event) {\n  event.stopImmediatePropagation();\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(event) {\n  event.preventDefault();\n  event.stopImmediatePropagation();\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-zoom/src/transform.js\":\n/*!***********************************************!*\\\n  !*** ./node_modules/d3-zoom/src/transform.js ***!\n  \\***********************************************/\n/*! exports provided: Transform, identity, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Transform\", function() { return Transform; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"identity\", function() { return identity; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return transform; });\nfunction Transform(k, x, y) {\n  this.k = k;\n  this.x = x;\n  this.y = y;\n}\n\nTransform.prototype = {\n  constructor: Transform,\n  scale: function(k) {\n    return k === 1 ? this : new Transform(this.k * k, this.x, this.y);\n  },\n  translate: function(x, y) {\n    return x === 0 & y === 0 ? this : new Transform(this.k, this.x + this.k * x, this.y + this.k * y);\n  },\n  apply: function(point) {\n    return [point[0] * this.k + this.x, point[1] * this.k + this.y];\n  },\n  applyX: function(x) {\n    return x * this.k + this.x;\n  },\n  applyY: function(y) {\n    return y * this.k + this.y;\n  },\n  invert: function(location) {\n    return [(location[0] - this.x) / this.k, (location[1] - this.y) / this.k];\n  },\n  invertX: function(x) {\n    return (x - this.x) / this.k;\n  },\n  invertY: function(y) {\n    return (y - this.y) / this.k;\n  },\n  rescaleX: function(x) {\n    return x.copy().domain(x.range().map(this.invertX, this).map(x.invert, x));\n  },\n  rescaleY: function(y) {\n    return y.copy().domain(y.range().map(this.invertY, this).map(y.invert, y));\n  },\n  toString: function() {\n    return \"translate(\" + this.x + \",\" + this.y + \") scale(\" + this.k + \")\";\n  }\n};\n\nvar identity = new Transform(1, 0, 0);\n\ntransform.prototype = Transform.prototype;\n\nfunction transform(node) {\n  while (!node.__zoom) if (!(node = node.parentNode)) return identity;\n  return node.__zoom;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3-zoom/src/zoom.js\":\n/*!******************************************!*\\\n  !*** ./node_modules/d3-zoom/src/zoom.js ***!\n  \\******************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var d3_dispatch__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-dispatch */ \"./node_modules/d3-zoom/node_modules/d3-dispatch/src/index.js\");\n/* harmony import */ var d3_drag__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! d3-drag */ \"./node_modules/d3-zoom/node_modules/d3-drag/src/index.js\");\n/* harmony import */ var d3_interpolate__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! d3-interpolate */ \"./node_modules/d3-zoom/node_modules/d3-interpolate/src/index.js\");\n/* harmony import */ var d3_selection__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! d3-selection */ \"./node_modules/d3-zoom/node_modules/d3-selection/src/index.js\");\n/* harmony import */ var d3_transition__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! d3-transition */ \"./node_modules/d3-zoom/node_modules/d3-transition/src/index.js\");\n/* harmony import */ var _constant_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./constant.js */ \"./node_modules/d3-zoom/src/constant.js\");\n/* harmony import */ var _event_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./event.js */ \"./node_modules/d3-zoom/src/event.js\");\n/* harmony import */ var _transform_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./transform.js */ \"./node_modules/d3-zoom/src/transform.js\");\n/* harmony import */ var _noevent_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./noevent.js */ \"./node_modules/d3-zoom/src/noevent.js\");\n\n\n\n\n\n\n\n\n\n\n// Ignore right-click, since that should open the context menu.\n// except for pinch-to-zoom, which is sent as a wheel+ctrlKey event\nfunction defaultFilter(event) {\n  return (!event.ctrlKey || event.type === 'wheel') && !event.button;\n}\n\nfunction defaultExtent() {\n  var e = this;\n  if (e instanceof SVGElement) {\n    e = e.ownerSVGElement || e;\n    if (e.hasAttribute(\"viewBox\")) {\n      e = e.viewBox.baseVal;\n      return [[e.x, e.y], [e.x + e.width, e.y + e.height]];\n    }\n    return [[0, 0], [e.width.baseVal.value, e.height.baseVal.value]];\n  }\n  return [[0, 0], [e.clientWidth, e.clientHeight]];\n}\n\nfunction defaultTransform() {\n  return this.__zoom || _transform_js__WEBPACK_IMPORTED_MODULE_7__[\"identity\"];\n}\n\nfunction defaultWheelDelta(event) {\n  return -event.deltaY * (event.deltaMode === 1 ? 0.05 : event.deltaMode ? 1 : 0.002) * (event.ctrlKey ? 10 : 1);\n}\n\nfunction defaultTouchable() {\n  return navigator.maxTouchPoints || (\"ontouchstart\" in this);\n}\n\nfunction defaultConstrain(transform, extent, translateExtent) {\n  var dx0 = transform.invertX(extent[0][0]) - translateExtent[0][0],\n      dx1 = transform.invertX(extent[1][0]) - translateExtent[1][0],\n      dy0 = transform.invertY(extent[0][1]) - translateExtent[0][1],\n      dy1 = transform.invertY(extent[1][1]) - translateExtent[1][1];\n  return transform.translate(\n    dx1 > dx0 ? (dx0 + dx1) / 2 : Math.min(0, dx0) || Math.max(0, dx1),\n    dy1 > dy0 ? (dy0 + dy1) / 2 : Math.min(0, dy0) || Math.max(0, dy1)\n  );\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  var filter = defaultFilter,\n      extent = defaultExtent,\n      constrain = defaultConstrain,\n      wheelDelta = defaultWheelDelta,\n      touchable = defaultTouchable,\n      scaleExtent = [0, Infinity],\n      translateExtent = [[-Infinity, -Infinity], [Infinity, Infinity]],\n      duration = 250,\n      interpolate = d3_interpolate__WEBPACK_IMPORTED_MODULE_2__[\"interpolateZoom\"],\n      listeners = Object(d3_dispatch__WEBPACK_IMPORTED_MODULE_0__[\"dispatch\"])(\"start\", \"zoom\", \"end\"),\n      touchstarting,\n      touchfirst,\n      touchending,\n      touchDelay = 500,\n      wheelDelay = 150,\n      clickDistance2 = 0,\n      tapDistance = 10;\n\n  function zoom(selection) {\n    selection\n        .property(\"__zoom\", defaultTransform)\n        .on(\"wheel.zoom\", wheeled, {passive: false})\n        .on(\"mousedown.zoom\", mousedowned)\n        .on(\"dblclick.zoom\", dblclicked)\n      .filter(touchable)\n        .on(\"touchstart.zoom\", touchstarted)\n        .on(\"touchmove.zoom\", touchmoved)\n        .on(\"touchend.zoom touchcancel.zoom\", touchended)\n        .style(\"-webkit-tap-highlight-color\", \"rgba(0,0,0,0)\");\n  }\n\n  zoom.transform = function(collection, transform, point, event) {\n    var selection = collection.selection ? collection.selection() : collection;\n    selection.property(\"__zoom\", defaultTransform);\n    if (collection !== selection) {\n      schedule(collection, transform, point, event);\n    } else {\n      selection.interrupt().each(function() {\n        gesture(this, arguments)\n          .event(event)\n          .start()\n          .zoom(null, typeof transform === \"function\" ? transform.apply(this, arguments) : transform)\n          .end();\n      });\n    }\n  };\n\n  zoom.scaleBy = function(selection, k, p, event) {\n    zoom.scaleTo(selection, function() {\n      var k0 = this.__zoom.k,\n          k1 = typeof k === \"function\" ? k.apply(this, arguments) : k;\n      return k0 * k1;\n    }, p, event);\n  };\n\n  zoom.scaleTo = function(selection, k, p, event) {\n    zoom.transform(selection, function() {\n      var e = extent.apply(this, arguments),\n          t0 = this.__zoom,\n          p0 = p == null ? centroid(e) : typeof p === \"function\" ? p.apply(this, arguments) : p,\n          p1 = t0.invert(p0),\n          k1 = typeof k === \"function\" ? k.apply(this, arguments) : k;\n      return constrain(translate(scale(t0, k1), p0, p1), e, translateExtent);\n    }, p, event);\n  };\n\n  zoom.translateBy = function(selection, x, y, event) {\n    zoom.transform(selection, function() {\n      return constrain(this.__zoom.translate(\n        typeof x === \"function\" ? x.apply(this, arguments) : x,\n        typeof y === \"function\" ? y.apply(this, arguments) : y\n      ), extent.apply(this, arguments), translateExtent);\n    }, null, event);\n  };\n\n  zoom.translateTo = function(selection, x, y, p, event) {\n    zoom.transform(selection, function() {\n      var e = extent.apply(this, arguments),\n          t = this.__zoom,\n          p0 = p == null ? centroid(e) : typeof p === \"function\" ? p.apply(this, arguments) : p;\n      return constrain(_transform_js__WEBPACK_IMPORTED_MODULE_7__[\"identity\"].translate(p0[0], p0[1]).scale(t.k).translate(\n        typeof x === \"function\" ? -x.apply(this, arguments) : -x,\n        typeof y === \"function\" ? -y.apply(this, arguments) : -y\n      ), e, translateExtent);\n    }, p, event);\n  };\n\n  function scale(transform, k) {\n    k = Math.max(scaleExtent[0], Math.min(scaleExtent[1], k));\n    return k === transform.k ? transform : new _transform_js__WEBPACK_IMPORTED_MODULE_7__[\"Transform\"](k, transform.x, transform.y);\n  }\n\n  function translate(transform, p0, p1) {\n    var x = p0[0] - p1[0] * transform.k, y = p0[1] - p1[1] * transform.k;\n    return x === transform.x && y === transform.y ? transform : new _transform_js__WEBPACK_IMPORTED_MODULE_7__[\"Transform\"](transform.k, x, y);\n  }\n\n  function centroid(extent) {\n    return [(+extent[0][0] + +extent[1][0]) / 2, (+extent[0][1] + +extent[1][1]) / 2];\n  }\n\n  function schedule(transition, transform, point, event) {\n    transition\n        .on(\"start.zoom\", function() { gesture(this, arguments).event(event).start(); })\n        .on(\"interrupt.zoom end.zoom\", function() { gesture(this, arguments).event(event).end(); })\n        .tween(\"zoom\", function() {\n          var that = this,\n              args = arguments,\n              g = gesture(that, args).event(event),\n              e = extent.apply(that, args),\n              p = point == null ? centroid(e) : typeof point === \"function\" ? point.apply(that, args) : point,\n              w = Math.max(e[1][0] - e[0][0], e[1][1] - e[0][1]),\n              a = that.__zoom,\n              b = typeof transform === \"function\" ? transform.apply(that, args) : transform,\n              i = interpolate(a.invert(p).concat(w / a.k), b.invert(p).concat(w / b.k));\n          return function(t) {\n            if (t === 1) t = b; // Avoid rounding error on end.\n            else { var l = i(t), k = w / l[2]; t = new _transform_js__WEBPACK_IMPORTED_MODULE_7__[\"Transform\"](k, p[0] - l[0] * k, p[1] - l[1] * k); }\n            g.zoom(null, t);\n          };\n        });\n  }\n\n  function gesture(that, args, clean) {\n    return (!clean && that.__zooming) || new Gesture(that, args);\n  }\n\n  function Gesture(that, args) {\n    this.that = that;\n    this.args = args;\n    this.active = 0;\n    this.sourceEvent = null;\n    this.extent = extent.apply(that, args);\n    this.taps = 0;\n  }\n\n  Gesture.prototype = {\n    event: function(event) {\n      if (event) this.sourceEvent = event;\n      return this;\n    },\n    start: function() {\n      if (++this.active === 1) {\n        this.that.__zooming = this;\n        this.emit(\"start\");\n      }\n      return this;\n    },\n    zoom: function(key, transform) {\n      if (this.mouse && key !== \"mouse\") this.mouse[1] = transform.invert(this.mouse[0]);\n      if (this.touch0 && key !== \"touch\") this.touch0[1] = transform.invert(this.touch0[0]);\n      if (this.touch1 && key !== \"touch\") this.touch1[1] = transform.invert(this.touch1[0]);\n      this.that.__zoom = transform;\n      this.emit(\"zoom\");\n      return this;\n    },\n    end: function() {\n      if (--this.active === 0) {\n        delete this.that.__zooming;\n        this.emit(\"end\");\n      }\n      return this;\n    },\n    emit: function(type) {\n      var d = Object(d3_selection__WEBPACK_IMPORTED_MODULE_3__[\"select\"])(this.that).datum();\n      listeners.call(\n        type,\n        this.that,\n        new _event_js__WEBPACK_IMPORTED_MODULE_6__[\"default\"](type, {\n          sourceEvent: this.sourceEvent,\n          target: zoom,\n          type,\n          transform: this.that.__zoom,\n          dispatch: listeners\n        }),\n        d\n      );\n    }\n  };\n\n  function wheeled(event, ...args) {\n    if (!filter.apply(this, arguments)) return;\n    var g = gesture(this, args).event(event),\n        t = this.__zoom,\n        k = Math.max(scaleExtent[0], Math.min(scaleExtent[1], t.k * Math.pow(2, wheelDelta.apply(this, arguments)))),\n        p = Object(d3_selection__WEBPACK_IMPORTED_MODULE_3__[\"pointer\"])(event);\n\n    // If the mouse is in the same location as before, reuse it.\n    // If there were recent wheel events, reset the wheel idle timeout.\n    if (g.wheel) {\n      if (g.mouse[0][0] !== p[0] || g.mouse[0][1] !== p[1]) {\n        g.mouse[1] = t.invert(g.mouse[0] = p);\n      }\n      clearTimeout(g.wheel);\n    }\n\n    // If this wheel event won’t trigger a transform change, ignore it.\n    else if (t.k === k) return;\n\n    // Otherwise, capture the mouse point and location at the start.\n    else {\n      g.mouse = [p, t.invert(p)];\n      Object(d3_transition__WEBPACK_IMPORTED_MODULE_4__[\"interrupt\"])(this);\n      g.start();\n    }\n\n    Object(_noevent_js__WEBPACK_IMPORTED_MODULE_8__[\"default\"])(event);\n    g.wheel = setTimeout(wheelidled, wheelDelay);\n    g.zoom(\"mouse\", constrain(translate(scale(t, k), g.mouse[0], g.mouse[1]), g.extent, translateExtent));\n\n    function wheelidled() {\n      g.wheel = null;\n      g.end();\n    }\n  }\n\n  function mousedowned(event, ...args) {\n    if (touchending || !filter.apply(this, arguments)) return;\n    var currentTarget = event.currentTarget,\n        g = gesture(this, args, true).event(event),\n        v = Object(d3_selection__WEBPACK_IMPORTED_MODULE_3__[\"select\"])(event.view).on(\"mousemove.zoom\", mousemoved, true).on(\"mouseup.zoom\", mouseupped, true),\n        p = Object(d3_selection__WEBPACK_IMPORTED_MODULE_3__[\"pointer\"])(event, currentTarget),\n        x0 = event.clientX,\n        y0 = event.clientY;\n\n    Object(d3_drag__WEBPACK_IMPORTED_MODULE_1__[\"dragDisable\"])(event.view);\n    Object(_noevent_js__WEBPACK_IMPORTED_MODULE_8__[\"nopropagation\"])(event);\n    g.mouse = [p, this.__zoom.invert(p)];\n    Object(d3_transition__WEBPACK_IMPORTED_MODULE_4__[\"interrupt\"])(this);\n    g.start();\n\n    function mousemoved(event) {\n      Object(_noevent_js__WEBPACK_IMPORTED_MODULE_8__[\"default\"])(event);\n      if (!g.moved) {\n        var dx = event.clientX - x0, dy = event.clientY - y0;\n        g.moved = dx * dx + dy * dy > clickDistance2;\n      }\n      g.event(event)\n       .zoom(\"mouse\", constrain(translate(g.that.__zoom, g.mouse[0] = Object(d3_selection__WEBPACK_IMPORTED_MODULE_3__[\"pointer\"])(event, currentTarget), g.mouse[1]), g.extent, translateExtent));\n    }\n\n    function mouseupped(event) {\n      v.on(\"mousemove.zoom mouseup.zoom\", null);\n      Object(d3_drag__WEBPACK_IMPORTED_MODULE_1__[\"dragEnable\"])(event.view, g.moved);\n      Object(_noevent_js__WEBPACK_IMPORTED_MODULE_8__[\"default\"])(event);\n      g.event(event).end();\n    }\n  }\n\n  function dblclicked(event, ...args) {\n    if (!filter.apply(this, arguments)) return;\n    var t0 = this.__zoom,\n        p0 = Object(d3_selection__WEBPACK_IMPORTED_MODULE_3__[\"pointer\"])(event.changedTouches ? event.changedTouches[0] : event, this),\n        p1 = t0.invert(p0),\n        k1 = t0.k * (event.shiftKey ? 0.5 : 2),\n        t1 = constrain(translate(scale(t0, k1), p0, p1), extent.apply(this, args), translateExtent);\n\n    Object(_noevent_js__WEBPACK_IMPORTED_MODULE_8__[\"default\"])(event);\n    if (duration > 0) Object(d3_selection__WEBPACK_IMPORTED_MODULE_3__[\"select\"])(this).transition().duration(duration).call(schedule, t1, p0, event);\n    else Object(d3_selection__WEBPACK_IMPORTED_MODULE_3__[\"select\"])(this).call(zoom.transform, t1, p0, event);\n  }\n\n  function touchstarted(event, ...args) {\n    if (!filter.apply(this, arguments)) return;\n    var touches = event.touches,\n        n = touches.length,\n        g = gesture(this, args, event.changedTouches.length === n).event(event),\n        started, i, t, p;\n\n    Object(_noevent_js__WEBPACK_IMPORTED_MODULE_8__[\"nopropagation\"])(event);\n    for (i = 0; i < n; ++i) {\n      t = touches[i], p = Object(d3_selection__WEBPACK_IMPORTED_MODULE_3__[\"pointer\"])(t, this);\n      p = [p, this.__zoom.invert(p), t.identifier];\n      if (!g.touch0) g.touch0 = p, started = true, g.taps = 1 + !!touchstarting;\n      else if (!g.touch1 && g.touch0[2] !== p[2]) g.touch1 = p, g.taps = 0;\n    }\n\n    if (touchstarting) touchstarting = clearTimeout(touchstarting);\n\n    if (started) {\n      if (g.taps < 2) touchfirst = p[0], touchstarting = setTimeout(function() { touchstarting = null; }, touchDelay);\n      Object(d3_transition__WEBPACK_IMPORTED_MODULE_4__[\"interrupt\"])(this);\n      g.start();\n    }\n  }\n\n  function touchmoved(event, ...args) {\n    if (!this.__zooming) return;\n    var g = gesture(this, args).event(event),\n        touches = event.changedTouches,\n        n = touches.length, i, t, p, l;\n\n    Object(_noevent_js__WEBPACK_IMPORTED_MODULE_8__[\"default\"])(event);\n    for (i = 0; i < n; ++i) {\n      t = touches[i], p = Object(d3_selection__WEBPACK_IMPORTED_MODULE_3__[\"pointer\"])(t, this);\n      if (g.touch0 && g.touch0[2] === t.identifier) g.touch0[0] = p;\n      else if (g.touch1 && g.touch1[2] === t.identifier) g.touch1[0] = p;\n    }\n    t = g.that.__zoom;\n    if (g.touch1) {\n      var p0 = g.touch0[0], l0 = g.touch0[1],\n          p1 = g.touch1[0], l1 = g.touch1[1],\n          dp = (dp = p1[0] - p0[0]) * dp + (dp = p1[1] - p0[1]) * dp,\n          dl = (dl = l1[0] - l0[0]) * dl + (dl = l1[1] - l0[1]) * dl;\n      t = scale(t, Math.sqrt(dp / dl));\n      p = [(p0[0] + p1[0]) / 2, (p0[1] + p1[1]) / 2];\n      l = [(l0[0] + l1[0]) / 2, (l0[1] + l1[1]) / 2];\n    }\n    else if (g.touch0) p = g.touch0[0], l = g.touch0[1];\n    else return;\n\n    g.zoom(\"touch\", constrain(translate(t, p, l), g.extent, translateExtent));\n  }\n\n  function touchended(event, ...args) {\n    if (!this.__zooming) return;\n    var g = gesture(this, args).event(event),\n        touches = event.changedTouches,\n        n = touches.length, i, t;\n\n    Object(_noevent_js__WEBPACK_IMPORTED_MODULE_8__[\"nopropagation\"])(event);\n    if (touchending) clearTimeout(touchending);\n    touchending = setTimeout(function() { touchending = null; }, touchDelay);\n    for (i = 0; i < n; ++i) {\n      t = touches[i];\n      if (g.touch0 && g.touch0[2] === t.identifier) delete g.touch0;\n      else if (g.touch1 && g.touch1[2] === t.identifier) delete g.touch1;\n    }\n    if (g.touch1 && !g.touch0) g.touch0 = g.touch1, delete g.touch1;\n    if (g.touch0) g.touch0[1] = this.__zoom.invert(g.touch0[0]);\n    else {\n      g.end();\n      // If this was a dbltap, reroute to the (optional) dblclick.zoom handler.\n      if (g.taps === 2) {\n        t = Object(d3_selection__WEBPACK_IMPORTED_MODULE_3__[\"pointer\"])(t, this);\n        if (Math.hypot(touchfirst[0] - t[0], touchfirst[1] - t[1]) < tapDistance) {\n          var p = Object(d3_selection__WEBPACK_IMPORTED_MODULE_3__[\"select\"])(this).on(\"dblclick.zoom\");\n          if (p) p.apply(this, arguments);\n        }\n      }\n    }\n  }\n\n  zoom.wheelDelta = function(_) {\n    return arguments.length ? (wheelDelta = typeof _ === \"function\" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(+_), zoom) : wheelDelta;\n  };\n\n  zoom.filter = function(_) {\n    return arguments.length ? (filter = typeof _ === \"function\" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(!!_), zoom) : filter;\n  };\n\n  zoom.touchable = function(_) {\n    return arguments.length ? (touchable = typeof _ === \"function\" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(!!_), zoom) : touchable;\n  };\n\n  zoom.extent = function(_) {\n    return arguments.length ? (extent = typeof _ === \"function\" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_5__[\"default\"])([[+_[0][0], +_[0][1]], [+_[1][0], +_[1][1]]]), zoom) : extent;\n  };\n\n  zoom.scaleExtent = function(_) {\n    return arguments.length ? (scaleExtent[0] = +_[0], scaleExtent[1] = +_[1], zoom) : [scaleExtent[0], scaleExtent[1]];\n  };\n\n  zoom.translateExtent = function(_) {\n    return arguments.length ? (translateExtent[0][0] = +_[0][0], translateExtent[1][0] = +_[1][0], translateExtent[0][1] = +_[0][1], translateExtent[1][1] = +_[1][1], zoom) : [[translateExtent[0][0], translateExtent[0][1]], [translateExtent[1][0], translateExtent[1][1]]];\n  };\n\n  zoom.constrain = function(_) {\n    return arguments.length ? (constrain = _, zoom) : constrain;\n  };\n\n  zoom.duration = function(_) {\n    return arguments.length ? (duration = +_, zoom) : duration;\n  };\n\n  zoom.interpolate = function(_) {\n    return arguments.length ? (interpolate = _, zoom) : interpolate;\n  };\n\n  zoom.on = function() {\n    var value = listeners.on.apply(listeners, arguments);\n    return value === listeners ? zoom : value;\n  };\n\n  zoom.clickDistance = function(_) {\n    return arguments.length ? (clickDistance2 = (_ = +_) * _, zoom) : Math.sqrt(clickDistance2);\n  };\n\n  zoom.tapDistance = function(_) {\n    return arguments.length ? (tapDistance = +_, zoom) : tapDistance;\n  };\n\n  return zoom;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-array/src/array.js\":\n/*!************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-array/src/array.js ***!\n  \\************************************************************/\n/*! exports provided: slice, map */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"slice\", function() { return slice; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"map\", function() { return map; });\nvar array = Array.prototype;\n\nvar slice = array.slice;\nvar map = array.map;\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-array/src/ascending.js\":\n/*!****************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-array/src/ascending.js ***!\n  \\****************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(a, b) {\n  return a == null || b == null ? NaN\n    : a < b ? -1\n    : a > b ? 1\n    : a >= b ? 0\n    : NaN;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-array/src/bin.js\":\n/*!**********************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-array/src/bin.js ***!\n  \\**********************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _array_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./array.js */ \"./node_modules/d3/node_modules/d3-array/src/array.js\");\n/* harmony import */ var _bisect_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./bisect.js */ \"./node_modules/d3/node_modules/d3-array/src/bisect.js\");\n/* harmony import */ var _constant_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./constant.js */ \"./node_modules/d3/node_modules/d3-array/src/constant.js\");\n/* harmony import */ var _extent_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./extent.js */ \"./node_modules/d3/node_modules/d3-array/src/extent.js\");\n/* harmony import */ var _identity_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./identity.js */ \"./node_modules/d3/node_modules/d3-array/src/identity.js\");\n/* harmony import */ var _nice_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./nice.js */ \"./node_modules/d3/node_modules/d3-array/src/nice.js\");\n/* harmony import */ var _ticks_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./ticks.js */ \"./node_modules/d3/node_modules/d3-array/src/ticks.js\");\n/* harmony import */ var _threshold_sturges_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./threshold/sturges.js */ \"./node_modules/d3/node_modules/d3-array/src/threshold/sturges.js\");\n\n\n\n\n\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  var value = _identity_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"],\n      domain = _extent_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"],\n      threshold = _threshold_sturges_js__WEBPACK_IMPORTED_MODULE_7__[\"default\"];\n\n  function histogram(data) {\n    if (!Array.isArray(data)) data = Array.from(data);\n\n    var i,\n        n = data.length,\n        x,\n        values = new Array(n);\n\n    for (i = 0; i < n; ++i) {\n      values[i] = value(data[i], i, data);\n    }\n\n    var xz = domain(values),\n        x0 = xz[0],\n        x1 = xz[1],\n        tz = threshold(values, x0, x1);\n\n    // Convert number of thresholds into uniform thresholds, and nice the\n    // default domain accordingly.\n    if (!Array.isArray(tz)) {\n      const max = x1, tn = +tz;\n      if (domain === _extent_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"]) [x0, x1] = Object(_nice_js__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(x0, x1, tn);\n      tz = Object(_ticks_js__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(x0, x1, tn);\n\n      // If the last threshold is coincident with the domain’s upper bound, the\n      // last bin will be zero-width. If the default domain is used, and this\n      // last threshold is coincident with the maximum input value, we can\n      // extend the niced upper bound by one tick to ensure uniform bin widths;\n      // otherwise, we simply remove the last threshold. Note that we don’t\n      // coerce values or the domain to numbers, and thus must be careful to\n      // compare order (>=) rather than strict equality (===)!\n      if (tz[tz.length - 1] >= x1) {\n        if (max >= x1 && domain === _extent_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"]) {\n          const step = Object(_ticks_js__WEBPACK_IMPORTED_MODULE_6__[\"tickIncrement\"])(x0, x1, tn);\n          if (isFinite(step)) {\n            if (step > 0) {\n              x1 = (Math.floor(x1 / step) + 1) * step;\n            } else if (step < 0) {\n              x1 = (Math.ceil(x1 * -step) + 1) / -step;\n            }\n          }\n        } else {\n          tz.pop();\n        }\n      }\n    }\n\n    // Remove any thresholds outside the domain.\n    var m = tz.length;\n    while (tz[0] <= x0) tz.shift(), --m;\n    while (tz[m - 1] > x1) tz.pop(), --m;\n\n    var bins = new Array(m + 1),\n        bin;\n\n    // Initialize bins.\n    for (i = 0; i <= m; ++i) {\n      bin = bins[i] = [];\n      bin.x0 = i > 0 ? tz[i - 1] : x0;\n      bin.x1 = i < m ? tz[i] : x1;\n    }\n\n    // Assign data to bins by value, ignoring any outside the domain.\n    for (i = 0; i < n; ++i) {\n      x = values[i];\n      if (x != null && x0 <= x && x <= x1) {\n        bins[Object(_bisect_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(tz, x, 0, m)].push(data[i]);\n      }\n    }\n\n    return bins;\n  }\n\n  histogram.value = function(_) {\n    return arguments.length ? (value = typeof _ === \"function\" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(_), histogram) : value;\n  };\n\n  histogram.domain = function(_) {\n    return arguments.length ? (domain = typeof _ === \"function\" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])([_[0], _[1]]), histogram) : domain;\n  };\n\n  histogram.thresholds = function(_) {\n    return arguments.length ? (threshold = typeof _ === \"function\" ? _ : Array.isArray(_) ? Object(_constant_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(_array_js__WEBPACK_IMPORTED_MODULE_0__[\"slice\"].call(_)) : Object(_constant_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(_), histogram) : threshold;\n  };\n\n  return histogram;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-array/src/bisect.js\":\n/*!*************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-array/src/bisect.js ***!\n  \\*************************************************************/\n/*! exports provided: bisectRight, bisectLeft, bisectCenter, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"bisectRight\", function() { return bisectRight; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"bisectLeft\", function() { return bisectLeft; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"bisectCenter\", function() { return bisectCenter; });\n/* harmony import */ var _ascending_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ascending.js */ \"./node_modules/d3/node_modules/d3-array/src/ascending.js\");\n/* harmony import */ var _bisector_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./bisector.js */ \"./node_modules/d3/node_modules/d3-array/src/bisector.js\");\n/* harmony import */ var _number_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./number.js */ \"./node_modules/d3/node_modules/d3-array/src/number.js\");\n\n\n\n\nconst ascendingBisect = Object(_bisector_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(_ascending_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]);\nconst bisectRight = ascendingBisect.right;\nconst bisectLeft = ascendingBisect.left;\nconst bisectCenter = Object(_bisector_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(_number_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"]).center;\n/* harmony default export */ __webpack_exports__[\"default\"] = (bisectRight);\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-array/src/bisector.js\":\n/*!***************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-array/src/bisector.js ***!\n  \\***************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _ascending_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ascending.js */ \"./node_modules/d3/node_modules/d3-array/src/ascending.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(f) {\n  let delta = f;\n  let compare = f;\n\n  if (f.length === 1) {\n    delta = (d, x) => f(d) - x;\n    compare = ascendingComparator(f);\n  }\n\n  function left(a, x, lo, hi) {\n    if (lo == null) lo = 0;\n    if (hi == null) hi = a.length;\n    while (lo < hi) {\n      const mid = (lo + hi) >>> 1;\n      if (compare(a[mid], x) < 0) lo = mid + 1;\n      else hi = mid;\n    }\n    return lo;\n  }\n\n  function right(a, x, lo, hi) {\n    if (lo == null) lo = 0;\n    if (hi == null) hi = a.length;\n    while (lo < hi) {\n      const mid = (lo + hi) >>> 1;\n      if (compare(a[mid], x) > 0) hi = mid;\n      else lo = mid + 1;\n    }\n    return lo;\n  }\n\n  function center(a, x, lo, hi) {\n    if (lo == null) lo = 0;\n    if (hi == null) hi = a.length;\n    const i = left(a, x, lo, hi - 1);\n    return i > lo && delta(a[i - 1], x) > -delta(a[i], x) ? i - 1 : i;\n  }\n\n  return {left, center, right};\n});\n\nfunction ascendingComparator(f) {\n  return (d, x) => Object(_ascending_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(f(d), x);\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-array/src/constant.js\":\n/*!***************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-array/src/constant.js ***!\n  \\***************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(x) {\n  return function() {\n    return x;\n  };\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-array/src/count.js\":\n/*!************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-array/src/count.js ***!\n  \\************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return count; });\nfunction count(values, valueof) {\n  let count = 0;\n  if (valueof === undefined) {\n    for (let value of values) {\n      if (value != null && (value = +value) >= value) {\n        ++count;\n      }\n    }\n  } else {\n    let index = -1;\n    for (let value of values) {\n      if ((value = valueof(value, ++index, values)) != null && (value = +value) >= value) {\n        ++count;\n      }\n    }\n  }\n  return count;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-array/src/cross.js\":\n/*!************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-array/src/cross.js ***!\n  \\************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return cross; });\nfunction length(array) {\n  return array.length | 0;\n}\n\nfunction empty(length) {\n  return !(length > 0);\n}\n\nfunction arrayify(values) {\n  return typeof values !== \"object\" || \"length\" in values ? values : Array.from(values);\n}\n\nfunction reducer(reduce) {\n  return values => reduce(...values);\n}\n\nfunction cross(...values) {\n  const reduce = typeof values[values.length - 1] === \"function\" && reducer(values.pop());\n  values = values.map(arrayify);\n  const lengths = values.map(length);\n  const j = values.length - 1;\n  const index = new Array(j + 1).fill(0);\n  const product = [];\n  if (j < 0 || lengths.some(empty)) return product;\n  while (true) {\n    product.push(index.map((j, i) => values[i][j]));\n    let i = j;\n    while (++index[i] === lengths[i]) {\n      if (i === 0) return reduce ? product.map(reduce) : product;\n      index[i--] = 0;\n    }\n  }\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-array/src/cumsum.js\":\n/*!*************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-array/src/cumsum.js ***!\n  \\*************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return cumsum; });\nfunction cumsum(values, valueof) {\n  var sum = 0, index = 0;\n  return Float64Array.from(values, valueof === undefined\n    ? v => (sum += +v || 0)\n    : v => (sum += +valueof(v, index++, values) || 0));\n}\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-array/src/descending.js\":\n/*!*****************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-array/src/descending.js ***!\n  \\*****************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(a, b) {\n  return a == null || b == null ? NaN\n    : b < a ? -1\n    : b > a ? 1\n    : b >= a ? 0\n    : NaN;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-array/src/deviation.js\":\n/*!****************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-array/src/deviation.js ***!\n  \\****************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return deviation; });\n/* harmony import */ var _variance_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./variance.js */ \"./node_modules/d3/node_modules/d3-array/src/variance.js\");\n\n\nfunction deviation(values, valueof) {\n  const v = Object(_variance_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(values, valueof);\n  return v ? Math.sqrt(v) : v;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-array/src/difference.js\":\n/*!*****************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-array/src/difference.js ***!\n  \\*****************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return difference; });\nfunction difference(values, ...others) {\n  values = new Set(values);\n  for (const other of others) {\n    for (const value of other) {\n      values.delete(value);\n    }\n  }\n  return values;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-array/src/disjoint.js\":\n/*!***************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-array/src/disjoint.js ***!\n  \\***************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return disjoint; });\nfunction disjoint(values, other) {\n  const iterator = other[Symbol.iterator](), set = new Set();\n  for (const v of values) {\n    if (set.has(v)) return false;\n    let value, done;\n    while (({value, done} = iterator.next())) {\n      if (done) break;\n      if (Object.is(v, value)) return false;\n      set.add(value);\n    }\n  }\n  return true;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-array/src/every.js\":\n/*!************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-array/src/every.js ***!\n  \\************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return every; });\nfunction every(values, test) {\n  if (typeof test !== \"function\") throw new TypeError(\"test is not a function\");\n  let index = -1;\n  for (const value of values) {\n    if (!test(value, ++index, values)) {\n      return false;\n    }\n  }\n  return true;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-array/src/extent.js\":\n/*!*************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-array/src/extent.js ***!\n  \\*************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(values, valueof) {\n  let min;\n  let max;\n  if (valueof === undefined) {\n    for (const value of values) {\n      if (value != null) {\n        if (min === undefined) {\n          if (value >= value) min = max = value;\n        } else {\n          if (min > value) min = value;\n          if (max < value) max = value;\n        }\n      }\n    }\n  } else {\n    let index = -1;\n    for (let value of values) {\n      if ((value = valueof(value, ++index, values)) != null) {\n        if (min === undefined) {\n          if (value >= value) min = max = value;\n        } else {\n          if (min > value) min = value;\n          if (max < value) max = value;\n        }\n      }\n    }\n  }\n  return [min, max];\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-array/src/filter.js\":\n/*!*************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-array/src/filter.js ***!\n  \\*************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return filter; });\nfunction filter(values, test) {\n  if (typeof test !== \"function\") throw new TypeError(\"test is not a function\");\n  const array = [];\n  let index = -1;\n  for (const value of values) {\n    if (test(value, ++index, values)) {\n      array.push(value);\n    }\n  }\n  return array;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-array/src/fsum.js\":\n/*!***********************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-array/src/fsum.js ***!\n  \\***********************************************************/\n/*! exports provided: Adder, fsum, fcumsum */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Adder\", function() { return Adder; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"fsum\", function() { return fsum; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"fcumsum\", function() { return fcumsum; });\n// https://github.com/python/cpython/blob/a74eea238f5baba15797e2e8b570d153bc8690a7/Modules/mathmodule.c#L1423\nclass Adder {\n  constructor() {\n    this._partials = new Float64Array(32);\n    this._n = 0;\n  }\n  add(x) {\n    const p = this._partials;\n    let i = 0;\n    for (let j = 0; j < this._n && j < 32; j++) {\n      const y = p[j],\n        hi = x + y,\n        lo = Math.abs(x) < Math.abs(y) ? x - (hi - y) : y - (hi - x);\n      if (lo) p[i++] = lo;\n      x = hi;\n    }\n    p[i] = x;\n    this._n = i + 1;\n    return this;\n  }\n  valueOf() {\n    const p = this._partials;\n    let n = this._n, x, y, lo, hi = 0;\n    if (n > 0) {\n      hi = p[--n];\n      while (n > 0) {\n        x = hi;\n        y = p[--n];\n        hi = x + y;\n        lo = y - (hi - x);\n        if (lo) break;\n      }\n      if (n > 0 && ((lo < 0 && p[n - 1] < 0) || (lo > 0 && p[n - 1] > 0))) {\n        y = lo * 2;\n        x = hi + y;\n        if (y == x - hi) hi = x;\n      }\n    }\n    return hi;\n  }\n}\n\nfunction fsum(values, valueof) {\n  const adder = new Adder();\n  if (valueof === undefined) {\n    for (let value of values) {\n      if (value = +value) {\n        adder.add(value);\n      }\n    }\n  } else {\n    let index = -1;\n    for (let value of values) {\n      if (value = +valueof(value, ++index, values)) {\n        adder.add(value);\n      }\n    }\n  }\n  return +adder;\n}\n\nfunction fcumsum(values, valueof) {\n  const adder = new Adder();\n  let index = -1;\n  return Float64Array.from(values, valueof === undefined\n      ? v => adder.add(+v || 0)\n      : v => adder.add(+valueof(v, ++index, values) || 0)\n  );\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-array/src/greatest.js\":\n/*!***************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-array/src/greatest.js ***!\n  \\***************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return greatest; });\n/* harmony import */ var _ascending_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ascending.js */ \"./node_modules/d3/node_modules/d3-array/src/ascending.js\");\n\n\nfunction greatest(values, compare = _ascending_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]) {\n  let max;\n  let defined = false;\n  if (compare.length === 1) {\n    let maxValue;\n    for (const element of values) {\n      const value = compare(element);\n      if (defined\n          ? Object(_ascending_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(value, maxValue) > 0\n          : Object(_ascending_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(value, value) === 0) {\n        max = element;\n        maxValue = value;\n        defined = true;\n      }\n    }\n  } else {\n    for (const value of values) {\n      if (defined\n          ? compare(value, max) > 0\n          : compare(value, value) === 0) {\n        max = value;\n        defined = true;\n      }\n    }\n  }\n  return max;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-array/src/greatestIndex.js\":\n/*!********************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-array/src/greatestIndex.js ***!\n  \\********************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return greatestIndex; });\n/* harmony import */ var _ascending_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ascending.js */ \"./node_modules/d3/node_modules/d3-array/src/ascending.js\");\n/* harmony import */ var _maxIndex_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./maxIndex.js */ \"./node_modules/d3/node_modules/d3-array/src/maxIndex.js\");\n\n\n\nfunction greatestIndex(values, compare = _ascending_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]) {\n  if (compare.length === 1) return Object(_maxIndex_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(values, compare);\n  let maxValue;\n  let max = -1;\n  let index = -1;\n  for (const value of values) {\n    ++index;\n    if (max < 0\n        ? compare(value, value) === 0\n        : compare(value, maxValue) > 0) {\n      maxValue = value;\n      max = index;\n    }\n  }\n  return max;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-array/src/group.js\":\n/*!************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-array/src/group.js ***!\n  \\************************************************************/\n/*! exports provided: default, groups, flatGroup, flatRollup, rollup, rollups, index, indexes */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return group; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"groups\", function() { return groups; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"flatGroup\", function() { return flatGroup; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"flatRollup\", function() { return flatRollup; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"rollup\", function() { return rollup; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"rollups\", function() { return rollups; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"index\", function() { return index; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"indexes\", function() { return indexes; });\n/* harmony import */ var internmap__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! internmap */ \"./node_modules/internmap/src/index.js\");\n/* harmony import */ var _identity_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./identity.js */ \"./node_modules/d3/node_modules/d3-array/src/identity.js\");\n\n\n\nfunction group(values, ...keys) {\n  return nest(values, _identity_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"], _identity_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"], keys);\n}\n\nfunction groups(values, ...keys) {\n  return nest(values, Array.from, _identity_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"], keys);\n}\n\nfunction flatten(groups, keys) {\n  for (let i = 1, n = keys.length; i < n; ++i) {\n    groups = groups.flatMap(g => g.pop().map(([key, value]) => [...g, key, value]));\n  }\n  return groups;\n}\n\nfunction flatGroup(values, ...keys) {\n  return flatten(groups(values, ...keys), keys);\n}\n\nfunction flatRollup(values, reduce, ...keys) {\n  return flatten(rollups(values, reduce, ...keys), keys);\n}\n\nfunction rollup(values, reduce, ...keys) {\n  return nest(values, _identity_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"], reduce, keys);\n}\n\nfunction rollups(values, reduce, ...keys) {\n  return nest(values, Array.from, reduce, keys);\n}\n\nfunction index(values, ...keys) {\n  return nest(values, _identity_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"], unique, keys);\n}\n\nfunction indexes(values, ...keys) {\n  return nest(values, Array.from, unique, keys);\n}\n\nfunction unique(values) {\n  if (values.length !== 1) throw new Error(\"duplicate key\");\n  return values[0];\n}\n\nfunction nest(values, map, reduce, keys) {\n  return (function regroup(values, i) {\n    if (i >= keys.length) return reduce(values);\n    const groups = new internmap__WEBPACK_IMPORTED_MODULE_0__[\"InternMap\"]();\n    const keyof = keys[i++];\n    let index = -1;\n    for (const value of values) {\n      const key = keyof(value, ++index, values);\n      const group = groups.get(key);\n      if (group) group.push(value);\n      else groups.set(key, [value]);\n    }\n    for (const [key, values] of groups) {\n      groups.set(key, regroup(values, i));\n    }\n    return map(groups);\n  })(values, 0);\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-array/src/groupSort.js\":\n/*!****************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-array/src/groupSort.js ***!\n  \\****************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return groupSort; });\n/* harmony import */ var _ascending_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ascending.js */ \"./node_modules/d3/node_modules/d3-array/src/ascending.js\");\n/* harmony import */ var _group_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./group.js */ \"./node_modules/d3/node_modules/d3-array/src/group.js\");\n/* harmony import */ var _sort_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./sort.js */ \"./node_modules/d3/node_modules/d3-array/src/sort.js\");\n\n\n\n\nfunction groupSort(values, reduce, key) {\n  return (reduce.length === 1\n    ? Object(_sort_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(Object(_group_js__WEBPACK_IMPORTED_MODULE_1__[\"rollup\"])(values, reduce, key), (([ak, av], [bk, bv]) => Object(_ascending_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(av, bv) || Object(_ascending_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(ak, bk)))\n    : Object(_sort_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(Object(_group_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(values, key), (([ak, av], [bk, bv]) => reduce(av, bv) || Object(_ascending_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(ak, bk))))\n    .map(([key]) => key);\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-array/src/identity.js\":\n/*!***************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-array/src/identity.js ***!\n  \\***************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(x) {\n  return x;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-array/src/index.js\":\n/*!************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-array/src/index.js ***!\n  \\************************************************************/\n/*! exports provided: bisect, bisectRight, bisectLeft, bisectCenter, ascending, bisector, count, cross, cumsum, descending, deviation, extent, Adder, fsum, fcumsum, group, flatGroup, flatRollup, groups, index, indexes, rollup, rollups, groupSort, bin, histogram, thresholdFreedmanDiaconis, thresholdScott, thresholdSturges, max, maxIndex, mean, median, merge, min, minIndex, mode, nice, pairs, permute, quantile, quantileSorted, quickselect, range, least, leastIndex, greatest, greatestIndex, scan, shuffle, shuffler, sum, ticks, tickIncrement, tickStep, transpose, variance, zip, every, some, filter, map, reduce, reverse, sort, difference, disjoint, intersection, subset, superset, union, InternMap, InternSet */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _bisect_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./bisect.js */ \"./node_modules/d3/node_modules/d3-array/src/bisect.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"bisect\", function() { return _bisect_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"bisectRight\", function() { return _bisect_js__WEBPACK_IMPORTED_MODULE_0__[\"bisectRight\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"bisectLeft\", function() { return _bisect_js__WEBPACK_IMPORTED_MODULE_0__[\"bisectLeft\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"bisectCenter\", function() { return _bisect_js__WEBPACK_IMPORTED_MODULE_0__[\"bisectCenter\"]; });\n\n/* harmony import */ var _ascending_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./ascending.js */ \"./node_modules/d3/node_modules/d3-array/src/ascending.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"ascending\", function() { return _ascending_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"]; });\n\n/* harmony import */ var _bisector_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./bisector.js */ \"./node_modules/d3/node_modules/d3-array/src/bisector.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"bisector\", function() { return _bisector_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"]; });\n\n/* harmony import */ var _count_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./count.js */ \"./node_modules/d3/node_modules/d3-array/src/count.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"count\", function() { return _count_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"]; });\n\n/* harmony import */ var _cross_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./cross.js */ \"./node_modules/d3/node_modules/d3-array/src/cross.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"cross\", function() { return _cross_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"]; });\n\n/* harmony import */ var _cumsum_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./cumsum.js */ \"./node_modules/d3/node_modules/d3-array/src/cumsum.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"cumsum\", function() { return _cumsum_js__WEBPACK_IMPORTED_MODULE_5__[\"default\"]; });\n\n/* harmony import */ var _descending_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./descending.js */ \"./node_modules/d3/node_modules/d3-array/src/descending.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"descending\", function() { return _descending_js__WEBPACK_IMPORTED_MODULE_6__[\"default\"]; });\n\n/* harmony import */ var _deviation_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./deviation.js */ \"./node_modules/d3/node_modules/d3-array/src/deviation.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"deviation\", function() { return _deviation_js__WEBPACK_IMPORTED_MODULE_7__[\"default\"]; });\n\n/* harmony import */ var _extent_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./extent.js */ \"./node_modules/d3/node_modules/d3-array/src/extent.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"extent\", function() { return _extent_js__WEBPACK_IMPORTED_MODULE_8__[\"default\"]; });\n\n/* harmony import */ var _fsum_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./fsum.js */ \"./node_modules/d3/node_modules/d3-array/src/fsum.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"Adder\", function() { return _fsum_js__WEBPACK_IMPORTED_MODULE_9__[\"Adder\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"fsum\", function() { return _fsum_js__WEBPACK_IMPORTED_MODULE_9__[\"fsum\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"fcumsum\", function() { return _fsum_js__WEBPACK_IMPORTED_MODULE_9__[\"fcumsum\"]; });\n\n/* harmony import */ var _group_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./group.js */ \"./node_modules/d3/node_modules/d3-array/src/group.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"group\", function() { return _group_js__WEBPACK_IMPORTED_MODULE_10__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"flatGroup\", function() { return _group_js__WEBPACK_IMPORTED_MODULE_10__[\"flatGroup\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"flatRollup\", function() { return _group_js__WEBPACK_IMPORTED_MODULE_10__[\"flatRollup\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"groups\", function() { return _group_js__WEBPACK_IMPORTED_MODULE_10__[\"groups\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"index\", function() { return _group_js__WEBPACK_IMPORTED_MODULE_10__[\"index\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"indexes\", function() { return _group_js__WEBPACK_IMPORTED_MODULE_10__[\"indexes\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"rollup\", function() { return _group_js__WEBPACK_IMPORTED_MODULE_10__[\"rollup\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"rollups\", function() { return _group_js__WEBPACK_IMPORTED_MODULE_10__[\"rollups\"]; });\n\n/* harmony import */ var _groupSort_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./groupSort.js */ \"./node_modules/d3/node_modules/d3-array/src/groupSort.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"groupSort\", function() { return _groupSort_js__WEBPACK_IMPORTED_MODULE_11__[\"default\"]; });\n\n/* harmony import */ var _bin_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./bin.js */ \"./node_modules/d3/node_modules/d3-array/src/bin.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"bin\", function() { return _bin_js__WEBPACK_IMPORTED_MODULE_12__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"histogram\", function() { return _bin_js__WEBPACK_IMPORTED_MODULE_12__[\"default\"]; });\n\n/* harmony import */ var _threshold_freedmanDiaconis_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./threshold/freedmanDiaconis.js */ \"./node_modules/d3/node_modules/d3-array/src/threshold/freedmanDiaconis.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"thresholdFreedmanDiaconis\", function() { return _threshold_freedmanDiaconis_js__WEBPACK_IMPORTED_MODULE_13__[\"default\"]; });\n\n/* harmony import */ var _threshold_scott_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./threshold/scott.js */ \"./node_modules/d3/node_modules/d3-array/src/threshold/scott.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"thresholdScott\", function() { return _threshold_scott_js__WEBPACK_IMPORTED_MODULE_14__[\"default\"]; });\n\n/* harmony import */ var _threshold_sturges_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./threshold/sturges.js */ \"./node_modules/d3/node_modules/d3-array/src/threshold/sturges.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"thresholdSturges\", function() { return _threshold_sturges_js__WEBPACK_IMPORTED_MODULE_15__[\"default\"]; });\n\n/* harmony import */ var _max_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./max.js */ \"./node_modules/d3/node_modules/d3-array/src/max.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"max\", function() { return _max_js__WEBPACK_IMPORTED_MODULE_16__[\"default\"]; });\n\n/* harmony import */ var _maxIndex_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./maxIndex.js */ \"./node_modules/d3/node_modules/d3-array/src/maxIndex.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"maxIndex\", function() { return _maxIndex_js__WEBPACK_IMPORTED_MODULE_17__[\"default\"]; });\n\n/* harmony import */ var _mean_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./mean.js */ \"./node_modules/d3/node_modules/d3-array/src/mean.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"mean\", function() { return _mean_js__WEBPACK_IMPORTED_MODULE_18__[\"default\"]; });\n\n/* harmony import */ var _median_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./median.js */ \"./node_modules/d3/node_modules/d3-array/src/median.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"median\", function() { return _median_js__WEBPACK_IMPORTED_MODULE_19__[\"default\"]; });\n\n/* harmony import */ var _merge_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./merge.js */ \"./node_modules/d3/node_modules/d3-array/src/merge.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"merge\", function() { return _merge_js__WEBPACK_IMPORTED_MODULE_20__[\"default\"]; });\n\n/* harmony import */ var _min_js__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./min.js */ \"./node_modules/d3/node_modules/d3-array/src/min.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"min\", function() { return _min_js__WEBPACK_IMPORTED_MODULE_21__[\"default\"]; });\n\n/* harmony import */ var _minIndex_js__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./minIndex.js */ \"./node_modules/d3/node_modules/d3-array/src/minIndex.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"minIndex\", function() { return _minIndex_js__WEBPACK_IMPORTED_MODULE_22__[\"default\"]; });\n\n/* harmony import */ var _mode_js__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./mode.js */ \"./node_modules/d3/node_modules/d3-array/src/mode.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"mode\", function() { return _mode_js__WEBPACK_IMPORTED_MODULE_23__[\"default\"]; });\n\n/* harmony import */ var _nice_js__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ./nice.js */ \"./node_modules/d3/node_modules/d3-array/src/nice.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"nice\", function() { return _nice_js__WEBPACK_IMPORTED_MODULE_24__[\"default\"]; });\n\n/* harmony import */ var _pairs_js__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ./pairs.js */ \"./node_modules/d3/node_modules/d3-array/src/pairs.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"pairs\", function() { return _pairs_js__WEBPACK_IMPORTED_MODULE_25__[\"default\"]; });\n\n/* harmony import */ var _permute_js__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ./permute.js */ \"./node_modules/d3/node_modules/d3-array/src/permute.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"permute\", function() { return _permute_js__WEBPACK_IMPORTED_MODULE_26__[\"default\"]; });\n\n/* harmony import */ var _quantile_js__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ./quantile.js */ \"./node_modules/d3/node_modules/d3-array/src/quantile.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"quantile\", function() { return _quantile_js__WEBPACK_IMPORTED_MODULE_27__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"quantileSorted\", function() { return _quantile_js__WEBPACK_IMPORTED_MODULE_27__[\"quantileSorted\"]; });\n\n/* harmony import */ var _quickselect_js__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ./quickselect.js */ \"./node_modules/d3/node_modules/d3-array/src/quickselect.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"quickselect\", function() { return _quickselect_js__WEBPACK_IMPORTED_MODULE_28__[\"default\"]; });\n\n/* harmony import */ var _range_js__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ./range.js */ \"./node_modules/d3/node_modules/d3-array/src/range.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"range\", function() { return _range_js__WEBPACK_IMPORTED_MODULE_29__[\"default\"]; });\n\n/* harmony import */ var _least_js__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ./least.js */ \"./node_modules/d3/node_modules/d3-array/src/least.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"least\", function() { return _least_js__WEBPACK_IMPORTED_MODULE_30__[\"default\"]; });\n\n/* harmony import */ var _leastIndex_js__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ./leastIndex.js */ \"./node_modules/d3/node_modules/d3-array/src/leastIndex.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"leastIndex\", function() { return _leastIndex_js__WEBPACK_IMPORTED_MODULE_31__[\"default\"]; });\n\n/* harmony import */ var _greatest_js__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ./greatest.js */ \"./node_modules/d3/node_modules/d3-array/src/greatest.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"greatest\", function() { return _greatest_js__WEBPACK_IMPORTED_MODULE_32__[\"default\"]; });\n\n/* harmony import */ var _greatestIndex_js__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! ./greatestIndex.js */ \"./node_modules/d3/node_modules/d3-array/src/greatestIndex.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"greatestIndex\", function() { return _greatestIndex_js__WEBPACK_IMPORTED_MODULE_33__[\"default\"]; });\n\n/* harmony import */ var _scan_js__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! ./scan.js */ \"./node_modules/d3/node_modules/d3-array/src/scan.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"scan\", function() { return _scan_js__WEBPACK_IMPORTED_MODULE_34__[\"default\"]; });\n\n/* harmony import */ var _shuffle_js__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(/*! ./shuffle.js */ \"./node_modules/d3/node_modules/d3-array/src/shuffle.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"shuffle\", function() { return _shuffle_js__WEBPACK_IMPORTED_MODULE_35__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"shuffler\", function() { return _shuffle_js__WEBPACK_IMPORTED_MODULE_35__[\"shuffler\"]; });\n\n/* harmony import */ var _sum_js__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(/*! ./sum.js */ \"./node_modules/d3/node_modules/d3-array/src/sum.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"sum\", function() { return _sum_js__WEBPACK_IMPORTED_MODULE_36__[\"default\"]; });\n\n/* harmony import */ var _ticks_js__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(/*! ./ticks.js */ \"./node_modules/d3/node_modules/d3-array/src/ticks.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"ticks\", function() { return _ticks_js__WEBPACK_IMPORTED_MODULE_37__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"tickIncrement\", function() { return _ticks_js__WEBPACK_IMPORTED_MODULE_37__[\"tickIncrement\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"tickStep\", function() { return _ticks_js__WEBPACK_IMPORTED_MODULE_37__[\"tickStep\"]; });\n\n/* harmony import */ var _transpose_js__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(/*! ./transpose.js */ \"./node_modules/d3/node_modules/d3-array/src/transpose.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"transpose\", function() { return _transpose_js__WEBPACK_IMPORTED_MODULE_38__[\"default\"]; });\n\n/* harmony import */ var _variance_js__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__(/*! ./variance.js */ \"./node_modules/d3/node_modules/d3-array/src/variance.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"variance\", function() { return _variance_js__WEBPACK_IMPORTED_MODULE_39__[\"default\"]; });\n\n/* harmony import */ var _zip_js__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__(/*! ./zip.js */ \"./node_modules/d3/node_modules/d3-array/src/zip.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"zip\", function() { return _zip_js__WEBPACK_IMPORTED_MODULE_40__[\"default\"]; });\n\n/* harmony import */ var _every_js__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__(/*! ./every.js */ \"./node_modules/d3/node_modules/d3-array/src/every.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"every\", function() { return _every_js__WEBPACK_IMPORTED_MODULE_41__[\"default\"]; });\n\n/* harmony import */ var _some_js__WEBPACK_IMPORTED_MODULE_42__ = __webpack_require__(/*! ./some.js */ \"./node_modules/d3/node_modules/d3-array/src/some.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"some\", function() { return _some_js__WEBPACK_IMPORTED_MODULE_42__[\"default\"]; });\n\n/* harmony import */ var _filter_js__WEBPACK_IMPORTED_MODULE_43__ = __webpack_require__(/*! ./filter.js */ \"./node_modules/d3/node_modules/d3-array/src/filter.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"filter\", function() { return _filter_js__WEBPACK_IMPORTED_MODULE_43__[\"default\"]; });\n\n/* harmony import */ var _map_js__WEBPACK_IMPORTED_MODULE_44__ = __webpack_require__(/*! ./map.js */ \"./node_modules/d3/node_modules/d3-array/src/map.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"map\", function() { return _map_js__WEBPACK_IMPORTED_MODULE_44__[\"default\"]; });\n\n/* harmony import */ var _reduce_js__WEBPACK_IMPORTED_MODULE_45__ = __webpack_require__(/*! ./reduce.js */ \"./node_modules/d3/node_modules/d3-array/src/reduce.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"reduce\", function() { return _reduce_js__WEBPACK_IMPORTED_MODULE_45__[\"default\"]; });\n\n/* harmony import */ var _reverse_js__WEBPACK_IMPORTED_MODULE_46__ = __webpack_require__(/*! ./reverse.js */ \"./node_modules/d3/node_modules/d3-array/src/reverse.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"reverse\", function() { return _reverse_js__WEBPACK_IMPORTED_MODULE_46__[\"default\"]; });\n\n/* harmony import */ var _sort_js__WEBPACK_IMPORTED_MODULE_47__ = __webpack_require__(/*! ./sort.js */ \"./node_modules/d3/node_modules/d3-array/src/sort.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"sort\", function() { return _sort_js__WEBPACK_IMPORTED_MODULE_47__[\"default\"]; });\n\n/* harmony import */ var _difference_js__WEBPACK_IMPORTED_MODULE_48__ = __webpack_require__(/*! ./difference.js */ \"./node_modules/d3/node_modules/d3-array/src/difference.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"difference\", function() { return _difference_js__WEBPACK_IMPORTED_MODULE_48__[\"default\"]; });\n\n/* harmony import */ var _disjoint_js__WEBPACK_IMPORTED_MODULE_49__ = __webpack_require__(/*! ./disjoint.js */ \"./node_modules/d3/node_modules/d3-array/src/disjoint.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"disjoint\", function() { return _disjoint_js__WEBPACK_IMPORTED_MODULE_49__[\"default\"]; });\n\n/* harmony import */ var _intersection_js__WEBPACK_IMPORTED_MODULE_50__ = __webpack_require__(/*! ./intersection.js */ \"./node_modules/d3/node_modules/d3-array/src/intersection.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"intersection\", function() { return _intersection_js__WEBPACK_IMPORTED_MODULE_50__[\"default\"]; });\n\n/* harmony import */ var _subset_js__WEBPACK_IMPORTED_MODULE_51__ = __webpack_require__(/*! ./subset.js */ \"./node_modules/d3/node_modules/d3-array/src/subset.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"subset\", function() { return _subset_js__WEBPACK_IMPORTED_MODULE_51__[\"default\"]; });\n\n/* harmony import */ var _superset_js__WEBPACK_IMPORTED_MODULE_52__ = __webpack_require__(/*! ./superset.js */ \"./node_modules/d3/node_modules/d3-array/src/superset.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"superset\", function() { return _superset_js__WEBPACK_IMPORTED_MODULE_52__[\"default\"]; });\n\n/* harmony import */ var _union_js__WEBPACK_IMPORTED_MODULE_53__ = __webpack_require__(/*! ./union.js */ \"./node_modules/d3/node_modules/d3-array/src/union.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"union\", function() { return _union_js__WEBPACK_IMPORTED_MODULE_53__[\"default\"]; });\n\n/* harmony import */ var internmap__WEBPACK_IMPORTED_MODULE_54__ = __webpack_require__(/*! internmap */ \"./node_modules/internmap/src/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"InternMap\", function() { return internmap__WEBPACK_IMPORTED_MODULE_54__[\"InternMap\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"InternSet\", function() { return internmap__WEBPACK_IMPORTED_MODULE_54__[\"InternSet\"]; });\n\n\n\n\n\n\n\n\n\n\n\n\n\n // Deprecated; use bin.\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n // Deprecated; use leastIndex.\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-array/src/intersection.js\":\n/*!*******************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-array/src/intersection.js ***!\n  \\*******************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return intersection; });\n/* harmony import */ var _set_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./set.js */ \"./node_modules/d3/node_modules/d3-array/src/set.js\");\n\n\nfunction intersection(values, ...others) {\n  values = new Set(values);\n  others = others.map(_set_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]);\n  out: for (const value of values) {\n    for (const other of others) {\n      if (!other.has(value)) {\n        values.delete(value);\n        continue out;\n      }\n    }\n  }\n  return values;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-array/src/least.js\":\n/*!************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-array/src/least.js ***!\n  \\************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return least; });\n/* harmony import */ var _ascending_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ascending.js */ \"./node_modules/d3/node_modules/d3-array/src/ascending.js\");\n\n\nfunction least(values, compare = _ascending_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]) {\n  let min;\n  let defined = false;\n  if (compare.length === 1) {\n    let minValue;\n    for (const element of values) {\n      const value = compare(element);\n      if (defined\n          ? Object(_ascending_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(value, minValue) < 0\n          : Object(_ascending_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(value, value) === 0) {\n        min = element;\n        minValue = value;\n        defined = true;\n      }\n    }\n  } else {\n    for (const value of values) {\n      if (defined\n          ? compare(value, min) < 0\n          : compare(value, value) === 0) {\n        min = value;\n        defined = true;\n      }\n    }\n  }\n  return min;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-array/src/leastIndex.js\":\n/*!*****************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-array/src/leastIndex.js ***!\n  \\*****************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return leastIndex; });\n/* harmony import */ var _ascending_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ascending.js */ \"./node_modules/d3/node_modules/d3-array/src/ascending.js\");\n/* harmony import */ var _minIndex_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./minIndex.js */ \"./node_modules/d3/node_modules/d3-array/src/minIndex.js\");\n\n\n\nfunction leastIndex(values, compare = _ascending_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]) {\n  if (compare.length === 1) return Object(_minIndex_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(values, compare);\n  let minValue;\n  let min = -1;\n  let index = -1;\n  for (const value of values) {\n    ++index;\n    if (min < 0\n        ? compare(value, value) === 0\n        : compare(value, minValue) < 0) {\n      minValue = value;\n      min = index;\n    }\n  }\n  return min;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-array/src/map.js\":\n/*!**********************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-array/src/map.js ***!\n  \\**********************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return map; });\nfunction map(values, mapper) {\n  if (typeof values[Symbol.iterator] !== \"function\") throw new TypeError(\"values is not iterable\");\n  if (typeof mapper !== \"function\") throw new TypeError(\"mapper is not a function\");\n  return Array.from(values, (value, index) => mapper(value, index, values));\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-array/src/max.js\":\n/*!**********************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-array/src/max.js ***!\n  \\**********************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return max; });\nfunction max(values, valueof) {\n  let max;\n  if (valueof === undefined) {\n    for (const value of values) {\n      if (value != null\n          && (max < value || (max === undefined && value >= value))) {\n        max = value;\n      }\n    }\n  } else {\n    let index = -1;\n    for (let value of values) {\n      if ((value = valueof(value, ++index, values)) != null\n          && (max < value || (max === undefined && value >= value))) {\n        max = value;\n      }\n    }\n  }\n  return max;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-array/src/maxIndex.js\":\n/*!***************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-array/src/maxIndex.js ***!\n  \\***************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return maxIndex; });\nfunction maxIndex(values, valueof) {\n  let max;\n  let maxIndex = -1;\n  let index = -1;\n  if (valueof === undefined) {\n    for (const value of values) {\n      ++index;\n      if (value != null\n          && (max < value || (max === undefined && value >= value))) {\n        max = value, maxIndex = index;\n      }\n    }\n  } else {\n    for (let value of values) {\n      if ((value = valueof(value, ++index, values)) != null\n          && (max < value || (max === undefined && value >= value))) {\n        max = value, maxIndex = index;\n      }\n    }\n  }\n  return maxIndex;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-array/src/mean.js\":\n/*!***********************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-array/src/mean.js ***!\n  \\***********************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return mean; });\nfunction mean(values, valueof) {\n  let count = 0;\n  let sum = 0;\n  if (valueof === undefined) {\n    for (let value of values) {\n      if (value != null && (value = +value) >= value) {\n        ++count, sum += value;\n      }\n    }\n  } else {\n    let index = -1;\n    for (let value of values) {\n      if ((value = valueof(value, ++index, values)) != null && (value = +value) >= value) {\n        ++count, sum += value;\n      }\n    }\n  }\n  if (count) return sum / count;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-array/src/median.js\":\n/*!*************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-array/src/median.js ***!\n  \\*************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _quantile_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./quantile.js */ \"./node_modules/d3/node_modules/d3-array/src/quantile.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(values, valueof) {\n  return Object(_quantile_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(values, 0.5, valueof);\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-array/src/merge.js\":\n/*!************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-array/src/merge.js ***!\n  \\************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return merge; });\nfunction* flatten(arrays) {\n  for (const array of arrays) {\n    yield* array;\n  }\n}\n\nfunction merge(arrays) {\n  return Array.from(flatten(arrays));\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-array/src/min.js\":\n/*!**********************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-array/src/min.js ***!\n  \\**********************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return min; });\nfunction min(values, valueof) {\n  let min;\n  if (valueof === undefined) {\n    for (const value of values) {\n      if (value != null\n          && (min > value || (min === undefined && value >= value))) {\n        min = value;\n      }\n    }\n  } else {\n    let index = -1;\n    for (let value of values) {\n      if ((value = valueof(value, ++index, values)) != null\n          && (min > value || (min === undefined && value >= value))) {\n        min = value;\n      }\n    }\n  }\n  return min;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-array/src/minIndex.js\":\n/*!***************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-array/src/minIndex.js ***!\n  \\***************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return minIndex; });\nfunction minIndex(values, valueof) {\n  let min;\n  let minIndex = -1;\n  let index = -1;\n  if (valueof === undefined) {\n    for (const value of values) {\n      ++index;\n      if (value != null\n          && (min > value || (min === undefined && value >= value))) {\n        min = value, minIndex = index;\n      }\n    }\n  } else {\n    for (let value of values) {\n      if ((value = valueof(value, ++index, values)) != null\n          && (min > value || (min === undefined && value >= value))) {\n        min = value, minIndex = index;\n      }\n    }\n  }\n  return minIndex;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-array/src/mode.js\":\n/*!***********************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-array/src/mode.js ***!\n  \\***********************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var internmap__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! internmap */ \"./node_modules/internmap/src/index.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(values, valueof) {\n  const counts = new internmap__WEBPACK_IMPORTED_MODULE_0__[\"InternMap\"]();\n  if (valueof === undefined) {\n    for (let value of values) {\n      if (value != null && value >= value) {\n        counts.set(value, (counts.get(value) || 0) + 1);\n      }\n    }\n  } else {\n    let index = -1;\n    for (let value of values) {\n      if ((value = valueof(value, ++index, values)) != null && value >= value) {\n        counts.set(value, (counts.get(value) || 0) + 1);\n      }\n    }\n  }\n  let modeValue;\n  let modeCount = 0;\n  for (const [value, count] of counts) {\n    if (count > modeCount) {\n      modeCount = count;\n      modeValue = value;\n    }\n  }\n  return modeValue;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-array/src/nice.js\":\n/*!***********************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-array/src/nice.js ***!\n  \\***********************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return nice; });\n/* harmony import */ var _ticks_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ticks.js */ \"./node_modules/d3/node_modules/d3-array/src/ticks.js\");\n\n\nfunction nice(start, stop, count) {\n  let prestep;\n  while (true) {\n    const step = Object(_ticks_js__WEBPACK_IMPORTED_MODULE_0__[\"tickIncrement\"])(start, stop, count);\n    if (step === prestep || step === 0 || !isFinite(step)) {\n      return [start, stop];\n    } else if (step > 0) {\n      start = Math.floor(start / step) * step;\n      stop = Math.ceil(stop / step) * step;\n    } else if (step < 0) {\n      start = Math.ceil(start * step) / step;\n      stop = Math.floor(stop * step) / step;\n    }\n    prestep = step;\n  }\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-array/src/number.js\":\n/*!*************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-array/src/number.js ***!\n  \\*************************************************************/\n/*! exports provided: default, numbers */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"numbers\", function() { return numbers; });\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(x) {\n  return x === null ? NaN : +x;\n});\n\nfunction* numbers(values, valueof) {\n  if (valueof === undefined) {\n    for (let value of values) {\n      if (value != null && (value = +value) >= value) {\n        yield value;\n      }\n    }\n  } else {\n    let index = -1;\n    for (let value of values) {\n      if ((value = valueof(value, ++index, values)) != null && (value = +value) >= value) {\n        yield value;\n      }\n    }\n  }\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-array/src/pairs.js\":\n/*!************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-array/src/pairs.js ***!\n  \\************************************************************/\n/*! exports provided: default, pair */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return pairs; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"pair\", function() { return pair; });\nfunction pairs(values, pairof = pair) {\n  const pairs = [];\n  let previous;\n  let first = false;\n  for (const value of values) {\n    if (first) pairs.push(pairof(previous, value));\n    previous = value;\n    first = true;\n  }\n  return pairs;\n}\n\nfunction pair(a, b) {\n  return [a, b];\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-array/src/permute.js\":\n/*!**************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-array/src/permute.js ***!\n  \\**************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(source, keys) {\n  return Array.from(keys, key => source[key]);\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-array/src/quantile.js\":\n/*!***************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-array/src/quantile.js ***!\n  \\***************************************************************/\n/*! exports provided: default, quantileSorted */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return quantile; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"quantileSorted\", function() { return quantileSorted; });\n/* harmony import */ var _max_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./max.js */ \"./node_modules/d3/node_modules/d3-array/src/max.js\");\n/* harmony import */ var _min_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./min.js */ \"./node_modules/d3/node_modules/d3-array/src/min.js\");\n/* harmony import */ var _quickselect_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./quickselect.js */ \"./node_modules/d3/node_modules/d3-array/src/quickselect.js\");\n/* harmony import */ var _number_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./number.js */ \"./node_modules/d3/node_modules/d3-array/src/number.js\");\n\n\n\n\n\nfunction quantile(values, p, valueof) {\n  values = Float64Array.from(Object(_number_js__WEBPACK_IMPORTED_MODULE_3__[\"numbers\"])(values, valueof));\n  if (!(n = values.length)) return;\n  if ((p = +p) <= 0 || n < 2) return Object(_min_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(values);\n  if (p >= 1) return Object(_max_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(values);\n  var n,\n      i = (n - 1) * p,\n      i0 = Math.floor(i),\n      value0 = Object(_max_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(Object(_quickselect_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(values, i0).subarray(0, i0 + 1)),\n      value1 = Object(_min_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(values.subarray(i0 + 1));\n  return value0 + (value1 - value0) * (i - i0);\n}\n\nfunction quantileSorted(values, p, valueof = _number_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"]) {\n  if (!(n = values.length)) return;\n  if ((p = +p) <= 0 || n < 2) return +valueof(values[0], 0, values);\n  if (p >= 1) return +valueof(values[n - 1], n - 1, values);\n  var n,\n      i = (n - 1) * p,\n      i0 = Math.floor(i),\n      value0 = +valueof(values[i0], i0, values),\n      value1 = +valueof(values[i0 + 1], i0 + 1, values);\n  return value0 + (value1 - value0) * (i - i0);\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-array/src/quickselect.js\":\n/*!******************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-array/src/quickselect.js ***!\n  \\******************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return quickselect; });\n/* harmony import */ var _ascending_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ascending.js */ \"./node_modules/d3/node_modules/d3-array/src/ascending.js\");\n\n\n// Based on https://github.com/mourner/quickselect\n// ISC license, Copyright 2018 Vladimir Agafonkin.\nfunction quickselect(array, k, left = 0, right = array.length - 1, compare = _ascending_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]) {\n  while (right > left) {\n    if (right - left > 600) {\n      const n = right - left + 1;\n      const m = k - left + 1;\n      const z = Math.log(n);\n      const s = 0.5 * Math.exp(2 * z / 3);\n      const sd = 0.5 * Math.sqrt(z * s * (n - s) / n) * (m - n / 2 < 0 ? -1 : 1);\n      const newLeft = Math.max(left, Math.floor(k - m * s / n + sd));\n      const newRight = Math.min(right, Math.floor(k + (n - m) * s / n + sd));\n      quickselect(array, k, newLeft, newRight, compare);\n    }\n\n    const t = array[k];\n    let i = left;\n    let j = right;\n\n    swap(array, left, k);\n    if (compare(array[right], t) > 0) swap(array, left, right);\n\n    while (i < j) {\n      swap(array, i, j), ++i, --j;\n      while (compare(array[i], t) < 0) ++i;\n      while (compare(array[j], t) > 0) --j;\n    }\n\n    if (compare(array[left], t) === 0) swap(array, left, j);\n    else ++j, swap(array, j, right);\n\n    if (j <= k) left = j + 1;\n    if (k <= j) right = j - 1;\n  }\n  return array;\n}\n\nfunction swap(array, i, j) {\n  const t = array[i];\n  array[i] = array[j];\n  array[j] = t;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-array/src/range.js\":\n/*!************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-array/src/range.js ***!\n  \\************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(start, stop, step) {\n  start = +start, stop = +stop, step = (n = arguments.length) < 2 ? (stop = start, start = 0, 1) : n < 3 ? 1 : +step;\n\n  var i = -1,\n      n = Math.max(0, Math.ceil((stop - start) / step)) | 0,\n      range = new Array(n);\n\n  while (++i < n) {\n    range[i] = start + i * step;\n  }\n\n  return range;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-array/src/reduce.js\":\n/*!*************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-array/src/reduce.js ***!\n  \\*************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return reduce; });\nfunction reduce(values, reducer, value) {\n  if (typeof reducer !== \"function\") throw new TypeError(\"reducer is not a function\");\n  const iterator = values[Symbol.iterator]();\n  let done, next, index = -1;\n  if (arguments.length < 3) {\n    ({done, value} = iterator.next());\n    if (done) return;\n    ++index;\n  }\n  while (({done, value: next} = iterator.next()), !done) {\n    value = reducer(value, next, ++index, values);\n  }\n  return value;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-array/src/reverse.js\":\n/*!**************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-array/src/reverse.js ***!\n  \\**************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return reverse; });\nfunction reverse(values) {\n  if (typeof values[Symbol.iterator] !== \"function\") throw new TypeError(\"values is not iterable\");\n  return Array.from(values).reverse();\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-array/src/scan.js\":\n/*!***********************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-array/src/scan.js ***!\n  \\***********************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return scan; });\n/* harmony import */ var _leastIndex_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./leastIndex.js */ \"./node_modules/d3/node_modules/d3-array/src/leastIndex.js\");\n\n\nfunction scan(values, compare) {\n  const index = Object(_leastIndex_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(values, compare);\n  return index < 0 ? undefined : index;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-array/src/set.js\":\n/*!**********************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-array/src/set.js ***!\n  \\**********************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return set; });\nfunction set(values) {\n  return values instanceof Set ? values : new Set(values);\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-array/src/shuffle.js\":\n/*!**************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-array/src/shuffle.js ***!\n  \\**************************************************************/\n/*! exports provided: default, shuffler */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"shuffler\", function() { return shuffler; });\n/* harmony default export */ __webpack_exports__[\"default\"] = (shuffler(Math.random));\n\nfunction shuffler(random) {\n  return function shuffle(array, i0 = 0, i1 = array.length) {\n    let m = i1 - (i0 = +i0);\n    while (m) {\n      const i = random() * m-- | 0, t = array[m + i0];\n      array[m + i0] = array[i + i0];\n      array[i + i0] = t;\n    }\n    return array;\n  };\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-array/src/some.js\":\n/*!***********************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-array/src/some.js ***!\n  \\***********************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return some; });\nfunction some(values, test) {\n  if (typeof test !== \"function\") throw new TypeError(\"test is not a function\");\n  let index = -1;\n  for (const value of values) {\n    if (test(value, ++index, values)) {\n      return true;\n    }\n  }\n  return false;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-array/src/sort.js\":\n/*!***********************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-array/src/sort.js ***!\n  \\***********************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return sort; });\n/* harmony import */ var _ascending_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ascending.js */ \"./node_modules/d3/node_modules/d3-array/src/ascending.js\");\n/* harmony import */ var _permute_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./permute.js */ \"./node_modules/d3/node_modules/d3-array/src/permute.js\");\n\n\n\nfunction sort(values, ...F) {\n  if (typeof values[Symbol.iterator] !== \"function\") throw new TypeError(\"values is not iterable\");\n  values = Array.from(values);\n  let [f = _ascending_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]] = F;\n  if (f.length === 1 || F.length > 1) {\n    const index = Uint32Array.from(values, (d, i) => i);\n    if (F.length > 1) {\n      F = F.map(f => values.map(f));\n      index.sort((i, j) => {\n        for (const f of F) {\n          const c = Object(_ascending_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(f[i], f[j]);\n          if (c) return c;\n        }\n      });\n    } else {\n      f = values.map(f);\n      index.sort((i, j) => Object(_ascending_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(f[i], f[j]));\n    }\n    return Object(_permute_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(values, index);\n  }\n  return values.sort(f);\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-array/src/subset.js\":\n/*!*************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-array/src/subset.js ***!\n  \\*************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return subset; });\n/* harmony import */ var _superset_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./superset.js */ \"./node_modules/d3/node_modules/d3-array/src/superset.js\");\n\n\nfunction subset(values, other) {\n  return Object(_superset_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(other, values);\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-array/src/sum.js\":\n/*!**********************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-array/src/sum.js ***!\n  \\**********************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return sum; });\nfunction sum(values, valueof) {\n  let sum = 0;\n  if (valueof === undefined) {\n    for (let value of values) {\n      if (value = +value) {\n        sum += value;\n      }\n    }\n  } else {\n    let index = -1;\n    for (let value of values) {\n      if (value = +valueof(value, ++index, values)) {\n        sum += value;\n      }\n    }\n  }\n  return sum;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-array/src/superset.js\":\n/*!***************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-array/src/superset.js ***!\n  \\***************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return superset; });\nfunction superset(values, other) {\n  const iterator = values[Symbol.iterator](), set = new Set();\n  for (const o of other) {\n    if (set.has(o)) continue;\n    let value, done;\n    while (({value, done} = iterator.next())) {\n      if (done) return false;\n      set.add(value);\n      if (Object.is(o, value)) break;\n    }\n  }\n  return true;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-array/src/threshold/freedmanDiaconis.js\":\n/*!*********************************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-array/src/threshold/freedmanDiaconis.js ***!\n  \\*********************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _count_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../count.js */ \"./node_modules/d3/node_modules/d3-array/src/count.js\");\n/* harmony import */ var _quantile_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../quantile.js */ \"./node_modules/d3/node_modules/d3-array/src/quantile.js\");\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(values, min, max) {\n  return Math.ceil((max - min) / (2 * (Object(_quantile_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(values, 0.75) - Object(_quantile_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(values, 0.25)) * Math.pow(Object(_count_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(values), -1 / 3)));\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-array/src/threshold/scott.js\":\n/*!**********************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-array/src/threshold/scott.js ***!\n  \\**********************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _count_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../count.js */ \"./node_modules/d3/node_modules/d3-array/src/count.js\");\n/* harmony import */ var _deviation_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../deviation.js */ \"./node_modules/d3/node_modules/d3-array/src/deviation.js\");\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(values, min, max) {\n  return Math.ceil((max - min) / (3.5 * Object(_deviation_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(values) * Math.pow(Object(_count_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(values), -1 / 3)));\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-array/src/threshold/sturges.js\":\n/*!************************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-array/src/threshold/sturges.js ***!\n  \\************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _count_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../count.js */ \"./node_modules/d3/node_modules/d3-array/src/count.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(values) {\n  return Math.ceil(Math.log(Object(_count_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(values)) / Math.LN2) + 1;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-array/src/ticks.js\":\n/*!************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-array/src/ticks.js ***!\n  \\************************************************************/\n/*! exports provided: default, tickIncrement, tickStep */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"tickIncrement\", function() { return tickIncrement; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"tickStep\", function() { return tickStep; });\nvar e10 = Math.sqrt(50),\n    e5 = Math.sqrt(10),\n    e2 = Math.sqrt(2);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(start, stop, count) {\n  var reverse,\n      i = -1,\n      n,\n      ticks,\n      step;\n\n  stop = +stop, start = +start, count = +count;\n  if (start === stop && count > 0) return [start];\n  if (reverse = stop < start) n = start, start = stop, stop = n;\n  if ((step = tickIncrement(start, stop, count)) === 0 || !isFinite(step)) return [];\n\n  if (step > 0) {\n    let r0 = Math.round(start / step), r1 = Math.round(stop / step);\n    if (r0 * step < start) ++r0;\n    if (r1 * step > stop) --r1;\n    ticks = new Array(n = r1 - r0 + 1);\n    while (++i < n) ticks[i] = (r0 + i) * step;\n  } else {\n    step = -step;\n    let r0 = Math.round(start * step), r1 = Math.round(stop * step);\n    if (r0 / step < start) ++r0;\n    if (r1 / step > stop) --r1;\n    ticks = new Array(n = r1 - r0 + 1);\n    while (++i < n) ticks[i] = (r0 + i) / step;\n  }\n\n  if (reverse) ticks.reverse();\n\n  return ticks;\n});\n\nfunction tickIncrement(start, stop, count) {\n  var step = (stop - start) / Math.max(0, count),\n      power = Math.floor(Math.log(step) / Math.LN10),\n      error = step / Math.pow(10, power);\n  return power >= 0\n      ? (error >= e10 ? 10 : error >= e5 ? 5 : error >= e2 ? 2 : 1) * Math.pow(10, power)\n      : -Math.pow(10, -power) / (error >= e10 ? 10 : error >= e5 ? 5 : error >= e2 ? 2 : 1);\n}\n\nfunction tickStep(start, stop, count) {\n  var step0 = Math.abs(stop - start) / Math.max(0, count),\n      step1 = Math.pow(10, Math.floor(Math.log(step0) / Math.LN10)),\n      error = step0 / step1;\n  if (error >= e10) step1 *= 10;\n  else if (error >= e5) step1 *= 5;\n  else if (error >= e2) step1 *= 2;\n  return stop < start ? -step1 : step1;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-array/src/transpose.js\":\n/*!****************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-array/src/transpose.js ***!\n  \\****************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _min_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./min.js */ \"./node_modules/d3/node_modules/d3-array/src/min.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(matrix) {\n  if (!(n = matrix.length)) return [];\n  for (var i = -1, m = Object(_min_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(matrix, length), transpose = new Array(m); ++i < m;) {\n    for (var j = -1, n, row = transpose[i] = new Array(n); ++j < n;) {\n      row[j] = matrix[j][i];\n    }\n  }\n  return transpose;\n});\n\nfunction length(d) {\n  return d.length;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-array/src/union.js\":\n/*!************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-array/src/union.js ***!\n  \\************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return union; });\nfunction union(...others) {\n  const set = new Set();\n  for (const other of others) {\n    for (const o of other) {\n      set.add(o);\n    }\n  }\n  return set;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-array/src/variance.js\":\n/*!***************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-array/src/variance.js ***!\n  \\***************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return variance; });\nfunction variance(values, valueof) {\n  let count = 0;\n  let delta;\n  let mean = 0;\n  let sum = 0;\n  if (valueof === undefined) {\n    for (let value of values) {\n      if (value != null && (value = +value) >= value) {\n        delta = value - mean;\n        mean += delta / ++count;\n        sum += delta * (value - mean);\n      }\n    }\n  } else {\n    let index = -1;\n    for (let value of values) {\n      if ((value = valueof(value, ++index, values)) != null && (value = +value) >= value) {\n        delta = value - mean;\n        mean += delta / ++count;\n        sum += delta * (value - mean);\n      }\n    }\n  }\n  if (count > 1) return sum / (count - 1);\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-array/src/zip.js\":\n/*!**********************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-array/src/zip.js ***!\n  \\**********************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _transpose_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./transpose.js */ \"./node_modules/d3/node_modules/d3-array/src/transpose.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  return Object(_transpose_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(arguments);\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-color/src/color.js\":\n/*!************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-color/src/color.js ***!\n  \\************************************************************/\n/*! exports provided: Color, darker, brighter, default, rgbConvert, rgb, Rgb, hslConvert, hsl */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Color\", function() { return Color; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"darker\", function() { return darker; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"brighter\", function() { return brighter; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return color; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"rgbConvert\", function() { return rgbConvert; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"rgb\", function() { return rgb; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Rgb\", function() { return Rgb; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"hslConvert\", function() { return hslConvert; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"hsl\", function() { return hsl; });\n/* harmony import */ var _define_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./define.js */ \"./node_modules/d3/node_modules/d3-color/src/define.js\");\n\n\nfunction Color() {}\n\nvar darker = 0.7;\nvar brighter = 1 / darker;\n\nvar reI = \"\\\\s*([+-]?\\\\d+)\\\\s*\",\n    reN = \"\\\\s*([+-]?\\\\d*\\\\.?\\\\d+(?:[eE][+-]?\\\\d+)?)\\\\s*\",\n    reP = \"\\\\s*([+-]?\\\\d*\\\\.?\\\\d+(?:[eE][+-]?\\\\d+)?)%\\\\s*\",\n    reHex = /^#([0-9a-f]{3,8})$/,\n    reRgbInteger = new RegExp(\"^rgb\\\\(\" + [reI, reI, reI] + \"\\\\)$\"),\n    reRgbPercent = new RegExp(\"^rgb\\\\(\" + [reP, reP, reP] + \"\\\\)$\"),\n    reRgbaInteger = new RegExp(\"^rgba\\\\(\" + [reI, reI, reI, reN] + \"\\\\)$\"),\n    reRgbaPercent = new RegExp(\"^rgba\\\\(\" + [reP, reP, reP, reN] + \"\\\\)$\"),\n    reHslPercent = new RegExp(\"^hsl\\\\(\" + [reN, reP, reP] + \"\\\\)$\"),\n    reHslaPercent = new RegExp(\"^hsla\\\\(\" + [reN, reP, reP, reN] + \"\\\\)$\");\n\nvar named = {\n  aliceblue: 0xf0f8ff,\n  antiquewhite: 0xfaebd7,\n  aqua: 0x00ffff,\n  aquamarine: 0x7fffd4,\n  azure: 0xf0ffff,\n  beige: 0xf5f5dc,\n  bisque: 0xffe4c4,\n  black: 0x000000,\n  blanchedalmond: 0xffebcd,\n  blue: 0x0000ff,\n  blueviolet: 0x8a2be2,\n  brown: 0xa52a2a,\n  burlywood: 0xdeb887,\n  cadetblue: 0x5f9ea0,\n  chartreuse: 0x7fff00,\n  chocolate: 0xd2691e,\n  coral: 0xff7f50,\n  cornflowerblue: 0x6495ed,\n  cornsilk: 0xfff8dc,\n  crimson: 0xdc143c,\n  cyan: 0x00ffff,\n  darkblue: 0x00008b,\n  darkcyan: 0x008b8b,\n  darkgoldenrod: 0xb8860b,\n  darkgray: 0xa9a9a9,\n  darkgreen: 0x006400,\n  darkgrey: 0xa9a9a9,\n  darkkhaki: 0xbdb76b,\n  darkmagenta: 0x8b008b,\n  darkolivegreen: 0x556b2f,\n  darkorange: 0xff8c00,\n  darkorchid: 0x9932cc,\n  darkred: 0x8b0000,\n  darksalmon: 0xe9967a,\n  darkseagreen: 0x8fbc8f,\n  darkslateblue: 0x483d8b,\n  darkslategray: 0x2f4f4f,\n  darkslategrey: 0x2f4f4f,\n  darkturquoise: 0x00ced1,\n  darkviolet: 0x9400d3,\n  deeppink: 0xff1493,\n  deepskyblue: 0x00bfff,\n  dimgray: 0x696969,\n  dimgrey: 0x696969,\n  dodgerblue: 0x1e90ff,\n  firebrick: 0xb22222,\n  floralwhite: 0xfffaf0,\n  forestgreen: 0x228b22,\n  fuchsia: 0xff00ff,\n  gainsboro: 0xdcdcdc,\n  ghostwhite: 0xf8f8ff,\n  gold: 0xffd700,\n  goldenrod: 0xdaa520,\n  gray: 0x808080,\n  green: 0x008000,\n  greenyellow: 0xadff2f,\n  grey: 0x808080,\n  honeydew: 0xf0fff0,\n  hotpink: 0xff69b4,\n  indianred: 0xcd5c5c,\n  indigo: 0x4b0082,\n  ivory: 0xfffff0,\n  khaki: 0xf0e68c,\n  lavender: 0xe6e6fa,\n  lavenderblush: 0xfff0f5,\n  lawngreen: 0x7cfc00,\n  lemonchiffon: 0xfffacd,\n  lightblue: 0xadd8e6,\n  lightcoral: 0xf08080,\n  lightcyan: 0xe0ffff,\n  lightgoldenrodyellow: 0xfafad2,\n  lightgray: 0xd3d3d3,\n  lightgreen: 0x90ee90,\n  lightgrey: 0xd3d3d3,\n  lightpink: 0xffb6c1,\n  lightsalmon: 0xffa07a,\n  lightseagreen: 0x20b2aa,\n  lightskyblue: 0x87cefa,\n  lightslategray: 0x778899,\n  lightslategrey: 0x778899,\n  lightsteelblue: 0xb0c4de,\n  lightyellow: 0xffffe0,\n  lime: 0x00ff00,\n  limegreen: 0x32cd32,\n  linen: 0xfaf0e6,\n  magenta: 0xff00ff,\n  maroon: 0x800000,\n  mediumaquamarine: 0x66cdaa,\n  mediumblue: 0x0000cd,\n  mediumorchid: 0xba55d3,\n  mediumpurple: 0x9370db,\n  mediumseagreen: 0x3cb371,\n  mediumslateblue: 0x7b68ee,\n  mediumspringgreen: 0x00fa9a,\n  mediumturquoise: 0x48d1cc,\n  mediumvioletred: 0xc71585,\n  midnightblue: 0x191970,\n  mintcream: 0xf5fffa,\n  mistyrose: 0xffe4e1,\n  moccasin: 0xffe4b5,\n  navajowhite: 0xffdead,\n  navy: 0x000080,\n  oldlace: 0xfdf5e6,\n  olive: 0x808000,\n  olivedrab: 0x6b8e23,\n  orange: 0xffa500,\n  orangered: 0xff4500,\n  orchid: 0xda70d6,\n  palegoldenrod: 0xeee8aa,\n  palegreen: 0x98fb98,\n  paleturquoise: 0xafeeee,\n  palevioletred: 0xdb7093,\n  papayawhip: 0xffefd5,\n  peachpuff: 0xffdab9,\n  peru: 0xcd853f,\n  pink: 0xffc0cb,\n  plum: 0xdda0dd,\n  powderblue: 0xb0e0e6,\n  purple: 0x800080,\n  rebeccapurple: 0x663399,\n  red: 0xff0000,\n  rosybrown: 0xbc8f8f,\n  royalblue: 0x4169e1,\n  saddlebrown: 0x8b4513,\n  salmon: 0xfa8072,\n  sandybrown: 0xf4a460,\n  seagreen: 0x2e8b57,\n  seashell: 0xfff5ee,\n  sienna: 0xa0522d,\n  silver: 0xc0c0c0,\n  skyblue: 0x87ceeb,\n  slateblue: 0x6a5acd,\n  slategray: 0x708090,\n  slategrey: 0x708090,\n  snow: 0xfffafa,\n  springgreen: 0x00ff7f,\n  steelblue: 0x4682b4,\n  tan: 0xd2b48c,\n  teal: 0x008080,\n  thistle: 0xd8bfd8,\n  tomato: 0xff6347,\n  turquoise: 0x40e0d0,\n  violet: 0xee82ee,\n  wheat: 0xf5deb3,\n  white: 0xffffff,\n  whitesmoke: 0xf5f5f5,\n  yellow: 0xffff00,\n  yellowgreen: 0x9acd32\n};\n\nObject(_define_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(Color, color, {\n  copy: function(channels) {\n    return Object.assign(new this.constructor, this, channels);\n  },\n  displayable: function() {\n    return this.rgb().displayable();\n  },\n  hex: color_formatHex, // Deprecated! Use color.formatHex.\n  formatHex: color_formatHex,\n  formatHsl: color_formatHsl,\n  formatRgb: color_formatRgb,\n  toString: color_formatRgb\n});\n\nfunction color_formatHex() {\n  return this.rgb().formatHex();\n}\n\nfunction color_formatHsl() {\n  return hslConvert(this).formatHsl();\n}\n\nfunction color_formatRgb() {\n  return this.rgb().formatRgb();\n}\n\nfunction color(format) {\n  var m, l;\n  format = (format + \"\").trim().toLowerCase();\n  return (m = reHex.exec(format)) ? (l = m[1].length, m = parseInt(m[1], 16), l === 6 ? rgbn(m) // #ff0000\n      : l === 3 ? new Rgb((m >> 8 & 0xf) | (m >> 4 & 0xf0), (m >> 4 & 0xf) | (m & 0xf0), ((m & 0xf) << 4) | (m & 0xf), 1) // #f00\n      : l === 8 ? rgba(m >> 24 & 0xff, m >> 16 & 0xff, m >> 8 & 0xff, (m & 0xff) / 0xff) // #ff000000\n      : l === 4 ? rgba((m >> 12 & 0xf) | (m >> 8 & 0xf0), (m >> 8 & 0xf) | (m >> 4 & 0xf0), (m >> 4 & 0xf) | (m & 0xf0), (((m & 0xf) << 4) | (m & 0xf)) / 0xff) // #f000\n      : null) // invalid hex\n      : (m = reRgbInteger.exec(format)) ? new Rgb(m[1], m[2], m[3], 1) // rgb(255, 0, 0)\n      : (m = reRgbPercent.exec(format)) ? new Rgb(m[1] * 255 / 100, m[2] * 255 / 100, m[3] * 255 / 100, 1) // rgb(100%, 0%, 0%)\n      : (m = reRgbaInteger.exec(format)) ? rgba(m[1], m[2], m[3], m[4]) // rgba(255, 0, 0, 1)\n      : (m = reRgbaPercent.exec(format)) ? rgba(m[1] * 255 / 100, m[2] * 255 / 100, m[3] * 255 / 100, m[4]) // rgb(100%, 0%, 0%, 1)\n      : (m = reHslPercent.exec(format)) ? hsla(m[1], m[2] / 100, m[3] / 100, 1) // hsl(120, 50%, 50%)\n      : (m = reHslaPercent.exec(format)) ? hsla(m[1], m[2] / 100, m[3] / 100, m[4]) // hsla(120, 50%, 50%, 1)\n      : named.hasOwnProperty(format) ? rgbn(named[format]) // eslint-disable-line no-prototype-builtins\n      : format === \"transparent\" ? new Rgb(NaN, NaN, NaN, 0)\n      : null;\n}\n\nfunction rgbn(n) {\n  return new Rgb(n >> 16 & 0xff, n >> 8 & 0xff, n & 0xff, 1);\n}\n\nfunction rgba(r, g, b, a) {\n  if (a <= 0) r = g = b = NaN;\n  return new Rgb(r, g, b, a);\n}\n\nfunction rgbConvert(o) {\n  if (!(o instanceof Color)) o = color(o);\n  if (!o) return new Rgb;\n  o = o.rgb();\n  return new Rgb(o.r, o.g, o.b, o.opacity);\n}\n\nfunction rgb(r, g, b, opacity) {\n  return arguments.length === 1 ? rgbConvert(r) : new Rgb(r, g, b, opacity == null ? 1 : opacity);\n}\n\nfunction Rgb(r, g, b, opacity) {\n  this.r = +r;\n  this.g = +g;\n  this.b = +b;\n  this.opacity = +opacity;\n}\n\nObject(_define_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(Rgb, rgb, Object(_define_js__WEBPACK_IMPORTED_MODULE_0__[\"extend\"])(Color, {\n  brighter: function(k) {\n    k = k == null ? brighter : Math.pow(brighter, k);\n    return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity);\n  },\n  darker: function(k) {\n    k = k == null ? darker : Math.pow(darker, k);\n    return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity);\n  },\n  rgb: function() {\n    return this;\n  },\n  displayable: function() {\n    return (-0.5 <= this.r && this.r < 255.5)\n        && (-0.5 <= this.g && this.g < 255.5)\n        && (-0.5 <= this.b && this.b < 255.5)\n        && (0 <= this.opacity && this.opacity <= 1);\n  },\n  hex: rgb_formatHex, // Deprecated! Use color.formatHex.\n  formatHex: rgb_formatHex,\n  formatRgb: rgb_formatRgb,\n  toString: rgb_formatRgb\n}));\n\nfunction rgb_formatHex() {\n  return \"#\" + hex(this.r) + hex(this.g) + hex(this.b);\n}\n\nfunction rgb_formatRgb() {\n  var a = this.opacity; a = isNaN(a) ? 1 : Math.max(0, Math.min(1, a));\n  return (a === 1 ? \"rgb(\" : \"rgba(\")\n      + Math.max(0, Math.min(255, Math.round(this.r) || 0)) + \", \"\n      + Math.max(0, Math.min(255, Math.round(this.g) || 0)) + \", \"\n      + Math.max(0, Math.min(255, Math.round(this.b) || 0))\n      + (a === 1 ? \")\" : \", \" + a + \")\");\n}\n\nfunction hex(value) {\n  value = Math.max(0, Math.min(255, Math.round(value) || 0));\n  return (value < 16 ? \"0\" : \"\") + value.toString(16);\n}\n\nfunction hsla(h, s, l, a) {\n  if (a <= 0) h = s = l = NaN;\n  else if (l <= 0 || l >= 1) h = s = NaN;\n  else if (s <= 0) h = NaN;\n  return new Hsl(h, s, l, a);\n}\n\nfunction hslConvert(o) {\n  if (o instanceof Hsl) return new Hsl(o.h, o.s, o.l, o.opacity);\n  if (!(o instanceof Color)) o = color(o);\n  if (!o) return new Hsl;\n  if (o instanceof Hsl) return o;\n  o = o.rgb();\n  var r = o.r / 255,\n      g = o.g / 255,\n      b = o.b / 255,\n      min = Math.min(r, g, b),\n      max = Math.max(r, g, b),\n      h = NaN,\n      s = max - min,\n      l = (max + min) / 2;\n  if (s) {\n    if (r === max) h = (g - b) / s + (g < b) * 6;\n    else if (g === max) h = (b - r) / s + 2;\n    else h = (r - g) / s + 4;\n    s /= l < 0.5 ? max + min : 2 - max - min;\n    h *= 60;\n  } else {\n    s = l > 0 && l < 1 ? 0 : h;\n  }\n  return new Hsl(h, s, l, o.opacity);\n}\n\nfunction hsl(h, s, l, opacity) {\n  return arguments.length === 1 ? hslConvert(h) : new Hsl(h, s, l, opacity == null ? 1 : opacity);\n}\n\nfunction Hsl(h, s, l, opacity) {\n  this.h = +h;\n  this.s = +s;\n  this.l = +l;\n  this.opacity = +opacity;\n}\n\nObject(_define_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(Hsl, hsl, Object(_define_js__WEBPACK_IMPORTED_MODULE_0__[\"extend\"])(Color, {\n  brighter: function(k) {\n    k = k == null ? brighter : Math.pow(brighter, k);\n    return new Hsl(this.h, this.s, this.l * k, this.opacity);\n  },\n  darker: function(k) {\n    k = k == null ? darker : Math.pow(darker, k);\n    return new Hsl(this.h, this.s, this.l * k, this.opacity);\n  },\n  rgb: function() {\n    var h = this.h % 360 + (this.h < 0) * 360,\n        s = isNaN(h) || isNaN(this.s) ? 0 : this.s,\n        l = this.l,\n        m2 = l + (l < 0.5 ? l : 1 - l) * s,\n        m1 = 2 * l - m2;\n    return new Rgb(\n      hsl2rgb(h >= 240 ? h - 240 : h + 120, m1, m2),\n      hsl2rgb(h, m1, m2),\n      hsl2rgb(h < 120 ? h + 240 : h - 120, m1, m2),\n      this.opacity\n    );\n  },\n  displayable: function() {\n    return (0 <= this.s && this.s <= 1 || isNaN(this.s))\n        && (0 <= this.l && this.l <= 1)\n        && (0 <= this.opacity && this.opacity <= 1);\n  },\n  formatHsl: function() {\n    var a = this.opacity; a = isNaN(a) ? 1 : Math.max(0, Math.min(1, a));\n    return (a === 1 ? \"hsl(\" : \"hsla(\")\n        + (this.h || 0) + \", \"\n        + (this.s || 0) * 100 + \"%, \"\n        + (this.l || 0) * 100 + \"%\"\n        + (a === 1 ? \")\" : \", \" + a + \")\");\n  }\n}));\n\n/* From FvD 13.37, CSS Color Module Level 3 */\nfunction hsl2rgb(h, m1, m2) {\n  return (h < 60 ? m1 + (m2 - m1) * h / 60\n      : h < 180 ? m2\n      : h < 240 ? m1 + (m2 - m1) * (240 - h) / 60\n      : m1) * 255;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-color/src/cubehelix.js\":\n/*!****************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-color/src/cubehelix.js ***!\n  \\****************************************************************/\n/*! exports provided: default, Cubehelix */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return cubehelix; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Cubehelix\", function() { return Cubehelix; });\n/* harmony import */ var _define_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./define.js */ \"./node_modules/d3/node_modules/d3-color/src/define.js\");\n/* harmony import */ var _color_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./color.js */ \"./node_modules/d3/node_modules/d3-color/src/color.js\");\n/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./math.js */ \"./node_modules/d3/node_modules/d3-color/src/math.js\");\n\n\n\n\nvar A = -0.14861,\n    B = +1.78277,\n    C = -0.29227,\n    D = -0.90649,\n    E = +1.97294,\n    ED = E * D,\n    EB = E * B,\n    BC_DA = B * C - D * A;\n\nfunction cubehelixConvert(o) {\n  if (o instanceof Cubehelix) return new Cubehelix(o.h, o.s, o.l, o.opacity);\n  if (!(o instanceof _color_js__WEBPACK_IMPORTED_MODULE_1__[\"Rgb\"])) o = Object(_color_js__WEBPACK_IMPORTED_MODULE_1__[\"rgbConvert\"])(o);\n  var r = o.r / 255,\n      g = o.g / 255,\n      b = o.b / 255,\n      l = (BC_DA * b + ED * r - EB * g) / (BC_DA + ED - EB),\n      bl = b - l,\n      k = (E * (g - l) - C * bl) / D,\n      s = Math.sqrt(k * k + bl * bl) / (E * l * (1 - l)), // NaN if l=0 or l=1\n      h = s ? Math.atan2(k, bl) * _math_js__WEBPACK_IMPORTED_MODULE_2__[\"degrees\"] - 120 : NaN;\n  return new Cubehelix(h < 0 ? h + 360 : h, s, l, o.opacity);\n}\n\nfunction cubehelix(h, s, l, opacity) {\n  return arguments.length === 1 ? cubehelixConvert(h) : new Cubehelix(h, s, l, opacity == null ? 1 : opacity);\n}\n\nfunction Cubehelix(h, s, l, opacity) {\n  this.h = +h;\n  this.s = +s;\n  this.l = +l;\n  this.opacity = +opacity;\n}\n\nObject(_define_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(Cubehelix, cubehelix, Object(_define_js__WEBPACK_IMPORTED_MODULE_0__[\"extend\"])(_color_js__WEBPACK_IMPORTED_MODULE_1__[\"Color\"], {\n  brighter: function(k) {\n    k = k == null ? _color_js__WEBPACK_IMPORTED_MODULE_1__[\"brighter\"] : Math.pow(_color_js__WEBPACK_IMPORTED_MODULE_1__[\"brighter\"], k);\n    return new Cubehelix(this.h, this.s, this.l * k, this.opacity);\n  },\n  darker: function(k) {\n    k = k == null ? _color_js__WEBPACK_IMPORTED_MODULE_1__[\"darker\"] : Math.pow(_color_js__WEBPACK_IMPORTED_MODULE_1__[\"darker\"], k);\n    return new Cubehelix(this.h, this.s, this.l * k, this.opacity);\n  },\n  rgb: function() {\n    var h = isNaN(this.h) ? 0 : (this.h + 120) * _math_js__WEBPACK_IMPORTED_MODULE_2__[\"radians\"],\n        l = +this.l,\n        a = isNaN(this.s) ? 0 : this.s * l * (1 - l),\n        cosh = Math.cos(h),\n        sinh = Math.sin(h);\n    return new _color_js__WEBPACK_IMPORTED_MODULE_1__[\"Rgb\"](\n      255 * (l + a * (A * cosh + B * sinh)),\n      255 * (l + a * (C * cosh + D * sinh)),\n      255 * (l + a * (E * cosh)),\n      this.opacity\n    );\n  }\n}));\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-color/src/define.js\":\n/*!*************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-color/src/define.js ***!\n  \\*************************************************************/\n/*! exports provided: default, extend */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"extend\", function() { return extend; });\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(constructor, factory, prototype) {\n  constructor.prototype = factory.prototype = prototype;\n  prototype.constructor = constructor;\n});\n\nfunction extend(parent, definition) {\n  var prototype = Object.create(parent.prototype);\n  for (var key in definition) prototype[key] = definition[key];\n  return prototype;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-color/src/index.js\":\n/*!************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-color/src/index.js ***!\n  \\************************************************************/\n/*! exports provided: color, rgb, hsl, lab, hcl, lch, gray, cubehelix */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _color_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./color.js */ \"./node_modules/d3/node_modules/d3-color/src/color.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"color\", function() { return _color_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"rgb\", function() { return _color_js__WEBPACK_IMPORTED_MODULE_0__[\"rgb\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"hsl\", function() { return _color_js__WEBPACK_IMPORTED_MODULE_0__[\"hsl\"]; });\n\n/* harmony import */ var _lab_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./lab.js */ \"./node_modules/d3/node_modules/d3-color/src/lab.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"lab\", function() { return _lab_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"hcl\", function() { return _lab_js__WEBPACK_IMPORTED_MODULE_1__[\"hcl\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"lch\", function() { return _lab_js__WEBPACK_IMPORTED_MODULE_1__[\"lch\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"gray\", function() { return _lab_js__WEBPACK_IMPORTED_MODULE_1__[\"gray\"]; });\n\n/* harmony import */ var _cubehelix_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./cubehelix.js */ \"./node_modules/d3/node_modules/d3-color/src/cubehelix.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"cubehelix\", function() { return _cubehelix_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"]; });\n\n\n\n\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-color/src/lab.js\":\n/*!**********************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-color/src/lab.js ***!\n  \\**********************************************************/\n/*! exports provided: gray, default, Lab, lch, hcl, Hcl */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"gray\", function() { return gray; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return lab; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Lab\", function() { return Lab; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"lch\", function() { return lch; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"hcl\", function() { return hcl; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Hcl\", function() { return Hcl; });\n/* harmony import */ var _define_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./define.js */ \"./node_modules/d3/node_modules/d3-color/src/define.js\");\n/* harmony import */ var _color_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./color.js */ \"./node_modules/d3/node_modules/d3-color/src/color.js\");\n/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./math.js */ \"./node_modules/d3/node_modules/d3-color/src/math.js\");\n\n\n\n\n// https://observablehq.com/@mbostock/lab-and-rgb\nconst K = 18,\n    Xn = 0.96422,\n    Yn = 1,\n    Zn = 0.82521,\n    t0 = 4 / 29,\n    t1 = 6 / 29,\n    t2 = 3 * t1 * t1,\n    t3 = t1 * t1 * t1;\n\nfunction labConvert(o) {\n  if (o instanceof Lab) return new Lab(o.l, o.a, o.b, o.opacity);\n  if (o instanceof Hcl) return hcl2lab(o);\n  if (!(o instanceof _color_js__WEBPACK_IMPORTED_MODULE_1__[\"Rgb\"])) o = Object(_color_js__WEBPACK_IMPORTED_MODULE_1__[\"rgbConvert\"])(o);\n  var r = rgb2lrgb(o.r),\n      g = rgb2lrgb(o.g),\n      b = rgb2lrgb(o.b),\n      y = xyz2lab((0.2225045 * r + 0.7168786 * g + 0.0606169 * b) / Yn), x, z;\n  if (r === g && g === b) x = z = y; else {\n    x = xyz2lab((0.4360747 * r + 0.3850649 * g + 0.1430804 * b) / Xn);\n    z = xyz2lab((0.0139322 * r + 0.0971045 * g + 0.7141733 * b) / Zn);\n  }\n  return new Lab(116 * y - 16, 500 * (x - y), 200 * (y - z), o.opacity);\n}\n\nfunction gray(l, opacity) {\n  return new Lab(l, 0, 0, opacity == null ? 1 : opacity);\n}\n\nfunction lab(l, a, b, opacity) {\n  return arguments.length === 1 ? labConvert(l) : new Lab(l, a, b, opacity == null ? 1 : opacity);\n}\n\nfunction Lab(l, a, b, opacity) {\n  this.l = +l;\n  this.a = +a;\n  this.b = +b;\n  this.opacity = +opacity;\n}\n\nObject(_define_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(Lab, lab, Object(_define_js__WEBPACK_IMPORTED_MODULE_0__[\"extend\"])(_color_js__WEBPACK_IMPORTED_MODULE_1__[\"Color\"], {\n  brighter: function(k) {\n    return new Lab(this.l + K * (k == null ? 1 : k), this.a, this.b, this.opacity);\n  },\n  darker: function(k) {\n    return new Lab(this.l - K * (k == null ? 1 : k), this.a, this.b, this.opacity);\n  },\n  rgb: function() {\n    var y = (this.l + 16) / 116,\n        x = isNaN(this.a) ? y : y + this.a / 500,\n        z = isNaN(this.b) ? y : y - this.b / 200;\n    x = Xn * lab2xyz(x);\n    y = Yn * lab2xyz(y);\n    z = Zn * lab2xyz(z);\n    return new _color_js__WEBPACK_IMPORTED_MODULE_1__[\"Rgb\"](\n      lrgb2rgb( 3.1338561 * x - 1.6168667 * y - 0.4906146 * z),\n      lrgb2rgb(-0.9787684 * x + 1.9161415 * y + 0.0334540 * z),\n      lrgb2rgb( 0.0719453 * x - 0.2289914 * y + 1.4052427 * z),\n      this.opacity\n    );\n  }\n}));\n\nfunction xyz2lab(t) {\n  return t > t3 ? Math.pow(t, 1 / 3) : t / t2 + t0;\n}\n\nfunction lab2xyz(t) {\n  return t > t1 ? t * t * t : t2 * (t - t0);\n}\n\nfunction lrgb2rgb(x) {\n  return 255 * (x <= 0.0031308 ? 12.92 * x : 1.055 * Math.pow(x, 1 / 2.4) - 0.055);\n}\n\nfunction rgb2lrgb(x) {\n  return (x /= 255) <= 0.04045 ? x / 12.92 : Math.pow((x + 0.055) / 1.055, 2.4);\n}\n\nfunction hclConvert(o) {\n  if (o instanceof Hcl) return new Hcl(o.h, o.c, o.l, o.opacity);\n  if (!(o instanceof Lab)) o = labConvert(o);\n  if (o.a === 0 && o.b === 0) return new Hcl(NaN, 0 < o.l && o.l < 100 ? 0 : NaN, o.l, o.opacity);\n  var h = Math.atan2(o.b, o.a) * _math_js__WEBPACK_IMPORTED_MODULE_2__[\"degrees\"];\n  return new Hcl(h < 0 ? h + 360 : h, Math.sqrt(o.a * o.a + o.b * o.b), o.l, o.opacity);\n}\n\nfunction lch(l, c, h, opacity) {\n  return arguments.length === 1 ? hclConvert(l) : new Hcl(h, c, l, opacity == null ? 1 : opacity);\n}\n\nfunction hcl(h, c, l, opacity) {\n  return arguments.length === 1 ? hclConvert(h) : new Hcl(h, c, l, opacity == null ? 1 : opacity);\n}\n\nfunction Hcl(h, c, l, opacity) {\n  this.h = +h;\n  this.c = +c;\n  this.l = +l;\n  this.opacity = +opacity;\n}\n\nfunction hcl2lab(o) {\n  if (isNaN(o.h)) return new Lab(o.l, 0, 0, o.opacity);\n  var h = o.h * _math_js__WEBPACK_IMPORTED_MODULE_2__[\"radians\"];\n  return new Lab(o.l, Math.cos(h) * o.c, Math.sin(h) * o.c, o.opacity);\n}\n\nObject(_define_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(Hcl, hcl, Object(_define_js__WEBPACK_IMPORTED_MODULE_0__[\"extend\"])(_color_js__WEBPACK_IMPORTED_MODULE_1__[\"Color\"], {\n  brighter: function(k) {\n    return new Hcl(this.h, this.c, this.l + K * (k == null ? 1 : k), this.opacity);\n  },\n  darker: function(k) {\n    return new Hcl(this.h, this.c, this.l - K * (k == null ? 1 : k), this.opacity);\n  },\n  rgb: function() {\n    return hcl2lab(this).rgb();\n  }\n}));\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-color/src/math.js\":\n/*!***********************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-color/src/math.js ***!\n  \\***********************************************************/\n/*! exports provided: radians, degrees */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"radians\", function() { return radians; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"degrees\", function() { return degrees; });\nconst radians = Math.PI / 180;\nconst degrees = 180 / Math.PI;\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-dispatch/src/dispatch.js\":\n/*!******************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-dispatch/src/dispatch.js ***!\n  \\******************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\nvar noop = {value: () => {}};\n\nfunction dispatch() {\n  for (var i = 0, n = arguments.length, _ = {}, t; i < n; ++i) {\n    if (!(t = arguments[i] + \"\") || (t in _) || /[\\s.]/.test(t)) throw new Error(\"illegal type: \" + t);\n    _[t] = [];\n  }\n  return new Dispatch(_);\n}\n\nfunction Dispatch(_) {\n  this._ = _;\n}\n\nfunction parseTypenames(typenames, types) {\n  return typenames.trim().split(/^|\\s+/).map(function(t) {\n    var name = \"\", i = t.indexOf(\".\");\n    if (i >= 0) name = t.slice(i + 1), t = t.slice(0, i);\n    if (t && !types.hasOwnProperty(t)) throw new Error(\"unknown type: \" + t);\n    return {type: t, name: name};\n  });\n}\n\nDispatch.prototype = dispatch.prototype = {\n  constructor: Dispatch,\n  on: function(typename, callback) {\n    var _ = this._,\n        T = parseTypenames(typename + \"\", _),\n        t,\n        i = -1,\n        n = T.length;\n\n    // If no callback was specified, return the callback of the given type and name.\n    if (arguments.length < 2) {\n      while (++i < n) if ((t = (typename = T[i]).type) && (t = get(_[t], typename.name))) return t;\n      return;\n    }\n\n    // If a type was specified, set the callback for the given type and name.\n    // Otherwise, if a null callback was specified, remove callbacks of the given name.\n    if (callback != null && typeof callback !== \"function\") throw new Error(\"invalid callback: \" + callback);\n    while (++i < n) {\n      if (t = (typename = T[i]).type) _[t] = set(_[t], typename.name, callback);\n      else if (callback == null) for (t in _) _[t] = set(_[t], typename.name, null);\n    }\n\n    return this;\n  },\n  copy: function() {\n    var copy = {}, _ = this._;\n    for (var t in _) copy[t] = _[t].slice();\n    return new Dispatch(copy);\n  },\n  call: function(type, that) {\n    if ((n = arguments.length - 2) > 0) for (var args = new Array(n), i = 0, n, t; i < n; ++i) args[i] = arguments[i + 2];\n    if (!this._.hasOwnProperty(type)) throw new Error(\"unknown type: \" + type);\n    for (t = this._[type], i = 0, n = t.length; i < n; ++i) t[i].value.apply(that, args);\n  },\n  apply: function(type, that, args) {\n    if (!this._.hasOwnProperty(type)) throw new Error(\"unknown type: \" + type);\n    for (var t = this._[type], i = 0, n = t.length; i < n; ++i) t[i].value.apply(that, args);\n  }\n};\n\nfunction get(type, name) {\n  for (var i = 0, n = type.length, c; i < n; ++i) {\n    if ((c = type[i]).name === name) {\n      return c.value;\n    }\n  }\n}\n\nfunction set(type, name, callback) {\n  for (var i = 0, n = type.length; i < n; ++i) {\n    if (type[i].name === name) {\n      type[i] = noop, type = type.slice(0, i).concat(type.slice(i + 1));\n      break;\n    }\n  }\n  if (callback != null) type.push({name: name, value: callback});\n  return type;\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (dispatch);\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-dispatch/src/index.js\":\n/*!***************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-dispatch/src/index.js ***!\n  \\***************************************************************/\n/*! exports provided: dispatch */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _dispatch_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./dispatch.js */ \"./node_modules/d3/node_modules/d3-dispatch/src/dispatch.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"dispatch\", function() { return _dispatch_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-drag/src/constant.js\":\n/*!**************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-drag/src/constant.js ***!\n  \\**************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (x => () => x);\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-drag/src/drag.js\":\n/*!**********************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-drag/src/drag.js ***!\n  \\**********************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var d3_dispatch__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-dispatch */ \"./node_modules/d3/node_modules/d3-dispatch/src/index.js\");\n/* harmony import */ var d3_selection__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! d3-selection */ \"./node_modules/d3/node_modules/d3-selection/src/index.js\");\n/* harmony import */ var _nodrag_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./nodrag.js */ \"./node_modules/d3/node_modules/d3-drag/src/nodrag.js\");\n/* harmony import */ var _noevent_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./noevent.js */ \"./node_modules/d3/node_modules/d3-drag/src/noevent.js\");\n/* harmony import */ var _constant_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./constant.js */ \"./node_modules/d3/node_modules/d3-drag/src/constant.js\");\n/* harmony import */ var _event_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./event.js */ \"./node_modules/d3/node_modules/d3-drag/src/event.js\");\n\n\n\n\n\n\n\n// Ignore right-click, since that should open the context menu.\nfunction defaultFilter(event) {\n  return !event.ctrlKey && !event.button;\n}\n\nfunction defaultContainer() {\n  return this.parentNode;\n}\n\nfunction defaultSubject(event, d) {\n  return d == null ? {x: event.x, y: event.y} : d;\n}\n\nfunction defaultTouchable() {\n  return navigator.maxTouchPoints || (\"ontouchstart\" in this);\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  var filter = defaultFilter,\n      container = defaultContainer,\n      subject = defaultSubject,\n      touchable = defaultTouchable,\n      gestures = {},\n      listeners = Object(d3_dispatch__WEBPACK_IMPORTED_MODULE_0__[\"dispatch\"])(\"start\", \"drag\", \"end\"),\n      active = 0,\n      mousedownx,\n      mousedowny,\n      mousemoving,\n      touchending,\n      clickDistance2 = 0;\n\n  function drag(selection) {\n    selection\n        .on(\"mousedown.drag\", mousedowned)\n      .filter(touchable)\n        .on(\"touchstart.drag\", touchstarted)\n        .on(\"touchmove.drag\", touchmoved, _noevent_js__WEBPACK_IMPORTED_MODULE_3__[\"nonpassive\"])\n        .on(\"touchend.drag touchcancel.drag\", touchended)\n        .style(\"touch-action\", \"none\")\n        .style(\"-webkit-tap-highlight-color\", \"rgba(0,0,0,0)\");\n  }\n\n  function mousedowned(event, d) {\n    if (touchending || !filter.call(this, event, d)) return;\n    var gesture = beforestart(this, container.call(this, event, d), event, d, \"mouse\");\n    if (!gesture) return;\n    Object(d3_selection__WEBPACK_IMPORTED_MODULE_1__[\"select\"])(event.view)\n      .on(\"mousemove.drag\", mousemoved, _noevent_js__WEBPACK_IMPORTED_MODULE_3__[\"nonpassivecapture\"])\n      .on(\"mouseup.drag\", mouseupped, _noevent_js__WEBPACK_IMPORTED_MODULE_3__[\"nonpassivecapture\"]);\n    Object(_nodrag_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(event.view);\n    Object(_noevent_js__WEBPACK_IMPORTED_MODULE_3__[\"nopropagation\"])(event);\n    mousemoving = false;\n    mousedownx = event.clientX;\n    mousedowny = event.clientY;\n    gesture(\"start\", event);\n  }\n\n  function mousemoved(event) {\n    Object(_noevent_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(event);\n    if (!mousemoving) {\n      var dx = event.clientX - mousedownx, dy = event.clientY - mousedowny;\n      mousemoving = dx * dx + dy * dy > clickDistance2;\n    }\n    gestures.mouse(\"drag\", event);\n  }\n\n  function mouseupped(event) {\n    Object(d3_selection__WEBPACK_IMPORTED_MODULE_1__[\"select\"])(event.view).on(\"mousemove.drag mouseup.drag\", null);\n    Object(_nodrag_js__WEBPACK_IMPORTED_MODULE_2__[\"yesdrag\"])(event.view, mousemoving);\n    Object(_noevent_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(event);\n    gestures.mouse(\"end\", event);\n  }\n\n  function touchstarted(event, d) {\n    if (!filter.call(this, event, d)) return;\n    var touches = event.changedTouches,\n        c = container.call(this, event, d),\n        n = touches.length, i, gesture;\n\n    for (i = 0; i < n; ++i) {\n      if (gesture = beforestart(this, c, event, d, touches[i].identifier, touches[i])) {\n        Object(_noevent_js__WEBPACK_IMPORTED_MODULE_3__[\"nopropagation\"])(event);\n        gesture(\"start\", event, touches[i]);\n      }\n    }\n  }\n\n  function touchmoved(event) {\n    var touches = event.changedTouches,\n        n = touches.length, i, gesture;\n\n    for (i = 0; i < n; ++i) {\n      if (gesture = gestures[touches[i].identifier]) {\n        Object(_noevent_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(event);\n        gesture(\"drag\", event, touches[i]);\n      }\n    }\n  }\n\n  function touchended(event) {\n    var touches = event.changedTouches,\n        n = touches.length, i, gesture;\n\n    if (touchending) clearTimeout(touchending);\n    touchending = setTimeout(function() { touchending = null; }, 500); // Ghost clicks are delayed!\n    for (i = 0; i < n; ++i) {\n      if (gesture = gestures[touches[i].identifier]) {\n        Object(_noevent_js__WEBPACK_IMPORTED_MODULE_3__[\"nopropagation\"])(event);\n        gesture(\"end\", event, touches[i]);\n      }\n    }\n  }\n\n  function beforestart(that, container, event, d, identifier, touch) {\n    var dispatch = listeners.copy(),\n        p = Object(d3_selection__WEBPACK_IMPORTED_MODULE_1__[\"pointer\"])(touch || event, container), dx, dy,\n        s;\n\n    if ((s = subject.call(that, new _event_js__WEBPACK_IMPORTED_MODULE_5__[\"default\"](\"beforestart\", {\n        sourceEvent: event,\n        target: drag,\n        identifier,\n        active,\n        x: p[0],\n        y: p[1],\n        dx: 0,\n        dy: 0,\n        dispatch\n      }), d)) == null) return;\n\n    dx = s.x - p[0] || 0;\n    dy = s.y - p[1] || 0;\n\n    return function gesture(type, event, touch) {\n      var p0 = p, n;\n      switch (type) {\n        case \"start\": gestures[identifier] = gesture, n = active++; break;\n        case \"end\": delete gestures[identifier], --active; // falls through\n        case \"drag\": p = Object(d3_selection__WEBPACK_IMPORTED_MODULE_1__[\"pointer\"])(touch || event, container), n = active; break;\n      }\n      dispatch.call(\n        type,\n        that,\n        new _event_js__WEBPACK_IMPORTED_MODULE_5__[\"default\"](type, {\n          sourceEvent: event,\n          subject: s,\n          target: drag,\n          identifier,\n          active: n,\n          x: p[0] + dx,\n          y: p[1] + dy,\n          dx: p[0] - p0[0],\n          dy: p[1] - p0[1],\n          dispatch\n        }),\n        d\n      );\n    };\n  }\n\n  drag.filter = function(_) {\n    return arguments.length ? (filter = typeof _ === \"function\" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(!!_), drag) : filter;\n  };\n\n  drag.container = function(_) {\n    return arguments.length ? (container = typeof _ === \"function\" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(_), drag) : container;\n  };\n\n  drag.subject = function(_) {\n    return arguments.length ? (subject = typeof _ === \"function\" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(_), drag) : subject;\n  };\n\n  drag.touchable = function(_) {\n    return arguments.length ? (touchable = typeof _ === \"function\" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(!!_), drag) : touchable;\n  };\n\n  drag.on = function() {\n    var value = listeners.on.apply(listeners, arguments);\n    return value === listeners ? drag : value;\n  };\n\n  drag.clickDistance = function(_) {\n    return arguments.length ? (clickDistance2 = (_ = +_) * _, drag) : Math.sqrt(clickDistance2);\n  };\n\n  return drag;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-drag/src/event.js\":\n/*!***********************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-drag/src/event.js ***!\n  \\***********************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return DragEvent; });\nfunction DragEvent(type, {\n  sourceEvent,\n  subject,\n  target,\n  identifier,\n  active,\n  x, y, dx, dy,\n  dispatch\n}) {\n  Object.defineProperties(this, {\n    type: {value: type, enumerable: true, configurable: true},\n    sourceEvent: {value: sourceEvent, enumerable: true, configurable: true},\n    subject: {value: subject, enumerable: true, configurable: true},\n    target: {value: target, enumerable: true, configurable: true},\n    identifier: {value: identifier, enumerable: true, configurable: true},\n    active: {value: active, enumerable: true, configurable: true},\n    x: {value: x, enumerable: true, configurable: true},\n    y: {value: y, enumerable: true, configurable: true},\n    dx: {value: dx, enumerable: true, configurable: true},\n    dy: {value: dy, enumerable: true, configurable: true},\n    _: {value: dispatch}\n  });\n}\n\nDragEvent.prototype.on = function() {\n  var value = this._.on.apply(this._, arguments);\n  return value === this._ ? this : value;\n};\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-drag/src/index.js\":\n/*!***********************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-drag/src/index.js ***!\n  \\***********************************************************/\n/*! exports provided: drag, dragDisable, dragEnable */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _drag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./drag.js */ \"./node_modules/d3/node_modules/d3-drag/src/drag.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"drag\", function() { return _drag_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n/* harmony import */ var _nodrag_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./nodrag.js */ \"./node_modules/d3/node_modules/d3-drag/src/nodrag.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"dragDisable\", function() { return _nodrag_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"dragEnable\", function() { return _nodrag_js__WEBPACK_IMPORTED_MODULE_1__[\"yesdrag\"]; });\n\n\n\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-drag/src/nodrag.js\":\n/*!************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-drag/src/nodrag.js ***!\n  \\************************************************************/\n/*! exports provided: default, yesdrag */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"yesdrag\", function() { return yesdrag; });\n/* harmony import */ var d3_selection__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-selection */ \"./node_modules/d3/node_modules/d3-selection/src/index.js\");\n/* harmony import */ var _noevent_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./noevent.js */ \"./node_modules/d3/node_modules/d3-drag/src/noevent.js\");\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(view) {\n  var root = view.document.documentElement,\n      selection = Object(d3_selection__WEBPACK_IMPORTED_MODULE_0__[\"select\"])(view).on(\"dragstart.drag\", _noevent_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"], _noevent_js__WEBPACK_IMPORTED_MODULE_1__[\"nonpassivecapture\"]);\n  if (\"onselectstart\" in root) {\n    selection.on(\"selectstart.drag\", _noevent_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"], _noevent_js__WEBPACK_IMPORTED_MODULE_1__[\"nonpassivecapture\"]);\n  } else {\n    root.__noselect = root.style.MozUserSelect;\n    root.style.MozUserSelect = \"none\";\n  }\n});\n\nfunction yesdrag(view, noclick) {\n  var root = view.document.documentElement,\n      selection = Object(d3_selection__WEBPACK_IMPORTED_MODULE_0__[\"select\"])(view).on(\"dragstart.drag\", null);\n  if (noclick) {\n    selection.on(\"click.drag\", _noevent_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"], _noevent_js__WEBPACK_IMPORTED_MODULE_1__[\"nonpassivecapture\"]);\n    setTimeout(function() { selection.on(\"click.drag\", null); }, 0);\n  }\n  if (\"onselectstart\" in root) {\n    selection.on(\"selectstart.drag\", null);\n  } else {\n    root.style.MozUserSelect = root.__noselect;\n    delete root.__noselect;\n  }\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-drag/src/noevent.js\":\n/*!*************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-drag/src/noevent.js ***!\n  \\*************************************************************/\n/*! exports provided: nonpassive, nonpassivecapture, nopropagation, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"nonpassive\", function() { return nonpassive; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"nonpassivecapture\", function() { return nonpassivecapture; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"nopropagation\", function() { return nopropagation; });\n// These are typically used in conjunction with noevent to ensure that we can\n// preventDefault on the event.\nconst nonpassive = {passive: false};\nconst nonpassivecapture = {capture: true, passive: false};\n\nfunction nopropagation(event) {\n  event.stopImmediatePropagation();\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(event) {\n  event.preventDefault();\n  event.stopImmediatePropagation();\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-dsv/src/autoType.js\":\n/*!*************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-dsv/src/autoType.js ***!\n  \\*************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return autoType; });\nfunction autoType(object) {\n  for (var key in object) {\n    var value = object[key].trim(), number, m;\n    if (!value) value = null;\n    else if (value === \"true\") value = true;\n    else if (value === \"false\") value = false;\n    else if (value === \"NaN\") value = NaN;\n    else if (!isNaN(number = +value)) value = number;\n    else if (m = value.match(/^([-+]\\d{2})?\\d{4}(-\\d{2}(-\\d{2})?)?(T\\d{2}:\\d{2}(:\\d{2}(\\.\\d{3})?)?(Z|[-+]\\d{2}:\\d{2})?)?$/)) {\n      if (fixtz && !!m[4] && !m[7]) value = value.replace(/-/g, \"/\").replace(/T/, \" \");\n      value = new Date(value);\n    }\n    else continue;\n    object[key] = value;\n  }\n  return object;\n}\n\n// https://github.com/d3/d3-dsv/issues/45\nconst fixtz = new Date(\"2019-01-01T00:00\").getHours() || new Date(\"2019-07-01T00:00\").getHours();\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-dsv/src/csv.js\":\n/*!********************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-dsv/src/csv.js ***!\n  \\********************************************************/\n/*! exports provided: csvParse, csvParseRows, csvFormat, csvFormatBody, csvFormatRows, csvFormatRow, csvFormatValue */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"csvParse\", function() { return csvParse; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"csvParseRows\", function() { return csvParseRows; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"csvFormat\", function() { return csvFormat; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"csvFormatBody\", function() { return csvFormatBody; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"csvFormatRows\", function() { return csvFormatRows; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"csvFormatRow\", function() { return csvFormatRow; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"csvFormatValue\", function() { return csvFormatValue; });\n/* harmony import */ var _dsv_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./dsv.js */ \"./node_modules/d3/node_modules/d3-dsv/src/dsv.js\");\n\n\nvar csv = Object(_dsv_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(\",\");\n\nvar csvParse = csv.parse;\nvar csvParseRows = csv.parseRows;\nvar csvFormat = csv.format;\nvar csvFormatBody = csv.formatBody;\nvar csvFormatRows = csv.formatRows;\nvar csvFormatRow = csv.formatRow;\nvar csvFormatValue = csv.formatValue;\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-dsv/src/dsv.js\":\n/*!********************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-dsv/src/dsv.js ***!\n  \\********************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\nvar EOL = {},\n    EOF = {},\n    QUOTE = 34,\n    NEWLINE = 10,\n    RETURN = 13;\n\nfunction objectConverter(columns) {\n  return new Function(\"d\", \"return {\" + columns.map(function(name, i) {\n    return JSON.stringify(name) + \": d[\" + i + \"] || \\\"\\\"\";\n  }).join(\",\") + \"}\");\n}\n\nfunction customConverter(columns, f) {\n  var object = objectConverter(columns);\n  return function(row, i) {\n    return f(object(row), i, columns);\n  };\n}\n\n// Compute unique columns in order of discovery.\nfunction inferColumns(rows) {\n  var columnSet = Object.create(null),\n      columns = [];\n\n  rows.forEach(function(row) {\n    for (var column in row) {\n      if (!(column in columnSet)) {\n        columns.push(columnSet[column] = column);\n      }\n    }\n  });\n\n  return columns;\n}\n\nfunction pad(value, width) {\n  var s = value + \"\", length = s.length;\n  return length < width ? new Array(width - length + 1).join(0) + s : s;\n}\n\nfunction formatYear(year) {\n  return year < 0 ? \"-\" + pad(-year, 6)\n    : year > 9999 ? \"+\" + pad(year, 6)\n    : pad(year, 4);\n}\n\nfunction formatDate(date) {\n  var hours = date.getUTCHours(),\n      minutes = date.getUTCMinutes(),\n      seconds = date.getUTCSeconds(),\n      milliseconds = date.getUTCMilliseconds();\n  return isNaN(date) ? \"Invalid Date\"\n      : formatYear(date.getUTCFullYear(), 4) + \"-\" + pad(date.getUTCMonth() + 1, 2) + \"-\" + pad(date.getUTCDate(), 2)\n      + (milliseconds ? \"T\" + pad(hours, 2) + \":\" + pad(minutes, 2) + \":\" + pad(seconds, 2) + \".\" + pad(milliseconds, 3) + \"Z\"\n      : seconds ? \"T\" + pad(hours, 2) + \":\" + pad(minutes, 2) + \":\" + pad(seconds, 2) + \"Z\"\n      : minutes || hours ? \"T\" + pad(hours, 2) + \":\" + pad(minutes, 2) + \"Z\"\n      : \"\");\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(delimiter) {\n  var reFormat = new RegExp(\"[\\\"\" + delimiter + \"\\n\\r]\"),\n      DELIMITER = delimiter.charCodeAt(0);\n\n  function parse(text, f) {\n    var convert, columns, rows = parseRows(text, function(row, i) {\n      if (convert) return convert(row, i - 1);\n      columns = row, convert = f ? customConverter(row, f) : objectConverter(row);\n    });\n    rows.columns = columns || [];\n    return rows;\n  }\n\n  function parseRows(text, f) {\n    var rows = [], // output rows\n        N = text.length,\n        I = 0, // current character index\n        n = 0, // current line number\n        t, // current token\n        eof = N <= 0, // current token followed by EOF?\n        eol = false; // current token followed by EOL?\n\n    // Strip the trailing newline.\n    if (text.charCodeAt(N - 1) === NEWLINE) --N;\n    if (text.charCodeAt(N - 1) === RETURN) --N;\n\n    function token() {\n      if (eof) return EOF;\n      if (eol) return eol = false, EOL;\n\n      // Unescape quotes.\n      var i, j = I, c;\n      if (text.charCodeAt(j) === QUOTE) {\n        while (I++ < N && text.charCodeAt(I) !== QUOTE || text.charCodeAt(++I) === QUOTE);\n        if ((i = I) >= N) eof = true;\n        else if ((c = text.charCodeAt(I++)) === NEWLINE) eol = true;\n        else if (c === RETURN) { eol = true; if (text.charCodeAt(I) === NEWLINE) ++I; }\n        return text.slice(j + 1, i - 1).replace(/\"\"/g, \"\\\"\");\n      }\n\n      // Find next delimiter or newline.\n      while (I < N) {\n        if ((c = text.charCodeAt(i = I++)) === NEWLINE) eol = true;\n        else if (c === RETURN) { eol = true; if (text.charCodeAt(I) === NEWLINE) ++I; }\n        else if (c !== DELIMITER) continue;\n        return text.slice(j, i);\n      }\n\n      // Return last token before EOF.\n      return eof = true, text.slice(j, N);\n    }\n\n    while ((t = token()) !== EOF) {\n      var row = [];\n      while (t !== EOL && t !== EOF) row.push(t), t = token();\n      if (f && (row = f(row, n++)) == null) continue;\n      rows.push(row);\n    }\n\n    return rows;\n  }\n\n  function preformatBody(rows, columns) {\n    return rows.map(function(row) {\n      return columns.map(function(column) {\n        return formatValue(row[column]);\n      }).join(delimiter);\n    });\n  }\n\n  function format(rows, columns) {\n    if (columns == null) columns = inferColumns(rows);\n    return [columns.map(formatValue).join(delimiter)].concat(preformatBody(rows, columns)).join(\"\\n\");\n  }\n\n  function formatBody(rows, columns) {\n    if (columns == null) columns = inferColumns(rows);\n    return preformatBody(rows, columns).join(\"\\n\");\n  }\n\n  function formatRows(rows) {\n    return rows.map(formatRow).join(\"\\n\");\n  }\n\n  function formatRow(row) {\n    return row.map(formatValue).join(delimiter);\n  }\n\n  function formatValue(value) {\n    return value == null ? \"\"\n        : value instanceof Date ? formatDate(value)\n        : reFormat.test(value += \"\") ? \"\\\"\" + value.replace(/\"/g, \"\\\"\\\"\") + \"\\\"\"\n        : value;\n  }\n\n  return {\n    parse: parse,\n    parseRows: parseRows,\n    format: format,\n    formatBody: formatBody,\n    formatRows: formatRows,\n    formatRow: formatRow,\n    formatValue: formatValue\n  };\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-dsv/src/index.js\":\n/*!**********************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-dsv/src/index.js ***!\n  \\**********************************************************/\n/*! exports provided: dsvFormat, csvParse, csvParseRows, csvFormat, csvFormatBody, csvFormatRows, csvFormatRow, csvFormatValue, tsvParse, tsvParseRows, tsvFormat, tsvFormatBody, tsvFormatRows, tsvFormatRow, tsvFormatValue, autoType */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _dsv_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./dsv.js */ \"./node_modules/d3/node_modules/d3-dsv/src/dsv.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"dsvFormat\", function() { return _dsv_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n/* harmony import */ var _csv_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./csv.js */ \"./node_modules/d3/node_modules/d3-dsv/src/csv.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"csvParse\", function() { return _csv_js__WEBPACK_IMPORTED_MODULE_1__[\"csvParse\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"csvParseRows\", function() { return _csv_js__WEBPACK_IMPORTED_MODULE_1__[\"csvParseRows\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"csvFormat\", function() { return _csv_js__WEBPACK_IMPORTED_MODULE_1__[\"csvFormat\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"csvFormatBody\", function() { return _csv_js__WEBPACK_IMPORTED_MODULE_1__[\"csvFormatBody\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"csvFormatRows\", function() { return _csv_js__WEBPACK_IMPORTED_MODULE_1__[\"csvFormatRows\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"csvFormatRow\", function() { return _csv_js__WEBPACK_IMPORTED_MODULE_1__[\"csvFormatRow\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"csvFormatValue\", function() { return _csv_js__WEBPACK_IMPORTED_MODULE_1__[\"csvFormatValue\"]; });\n\n/* harmony import */ var _tsv_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./tsv.js */ \"./node_modules/d3/node_modules/d3-dsv/src/tsv.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"tsvParse\", function() { return _tsv_js__WEBPACK_IMPORTED_MODULE_2__[\"tsvParse\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"tsvParseRows\", function() { return _tsv_js__WEBPACK_IMPORTED_MODULE_2__[\"tsvParseRows\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"tsvFormat\", function() { return _tsv_js__WEBPACK_IMPORTED_MODULE_2__[\"tsvFormat\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"tsvFormatBody\", function() { return _tsv_js__WEBPACK_IMPORTED_MODULE_2__[\"tsvFormatBody\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"tsvFormatRows\", function() { return _tsv_js__WEBPACK_IMPORTED_MODULE_2__[\"tsvFormatRows\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"tsvFormatRow\", function() { return _tsv_js__WEBPACK_IMPORTED_MODULE_2__[\"tsvFormatRow\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"tsvFormatValue\", function() { return _tsv_js__WEBPACK_IMPORTED_MODULE_2__[\"tsvFormatValue\"]; });\n\n/* harmony import */ var _autoType_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./autoType.js */ \"./node_modules/d3/node_modules/d3-dsv/src/autoType.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"autoType\", function() { return _autoType_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"]; });\n\n\n\n\n\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-dsv/src/tsv.js\":\n/*!********************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-dsv/src/tsv.js ***!\n  \\********************************************************/\n/*! exports provided: tsvParse, tsvParseRows, tsvFormat, tsvFormatBody, tsvFormatRows, tsvFormatRow, tsvFormatValue */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"tsvParse\", function() { return tsvParse; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"tsvParseRows\", function() { return tsvParseRows; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"tsvFormat\", function() { return tsvFormat; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"tsvFormatBody\", function() { return tsvFormatBody; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"tsvFormatRows\", function() { return tsvFormatRows; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"tsvFormatRow\", function() { return tsvFormatRow; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"tsvFormatValue\", function() { return tsvFormatValue; });\n/* harmony import */ var _dsv_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./dsv.js */ \"./node_modules/d3/node_modules/d3-dsv/src/dsv.js\");\n\n\nvar tsv = Object(_dsv_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(\"\\t\");\n\nvar tsvParse = tsv.parse;\nvar tsvParseRows = tsv.parseRows;\nvar tsvFormat = tsv.format;\nvar tsvFormatBody = tsv.formatBody;\nvar tsvFormatRows = tsv.formatRows;\nvar tsvFormatRow = tsv.formatRow;\nvar tsvFormatValue = tsv.formatValue;\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-ease/src/back.js\":\n/*!**********************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-ease/src/back.js ***!\n  \\**********************************************************/\n/*! exports provided: backIn, backOut, backInOut */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"backIn\", function() { return backIn; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"backOut\", function() { return backOut; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"backInOut\", function() { return backInOut; });\nvar overshoot = 1.70158;\n\nvar backIn = (function custom(s) {\n  s = +s;\n\n  function backIn(t) {\n    return (t = +t) * t * (s * (t - 1) + t);\n  }\n\n  backIn.overshoot = custom;\n\n  return backIn;\n})(overshoot);\n\nvar backOut = (function custom(s) {\n  s = +s;\n\n  function backOut(t) {\n    return --t * t * ((t + 1) * s + t) + 1;\n  }\n\n  backOut.overshoot = custom;\n\n  return backOut;\n})(overshoot);\n\nvar backInOut = (function custom(s) {\n  s = +s;\n\n  function backInOut(t) {\n    return ((t *= 2) < 1 ? t * t * ((s + 1) * t - s) : (t -= 2) * t * ((s + 1) * t + s) + 2) / 2;\n  }\n\n  backInOut.overshoot = custom;\n\n  return backInOut;\n})(overshoot);\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-ease/src/bounce.js\":\n/*!************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-ease/src/bounce.js ***!\n  \\************************************************************/\n/*! exports provided: bounceIn, bounceOut, bounceInOut */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"bounceIn\", function() { return bounceIn; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"bounceOut\", function() { return bounceOut; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"bounceInOut\", function() { return bounceInOut; });\nvar b1 = 4 / 11,\n    b2 = 6 / 11,\n    b3 = 8 / 11,\n    b4 = 3 / 4,\n    b5 = 9 / 11,\n    b6 = 10 / 11,\n    b7 = 15 / 16,\n    b8 = 21 / 22,\n    b9 = 63 / 64,\n    b0 = 1 / b1 / b1;\n\nfunction bounceIn(t) {\n  return 1 - bounceOut(1 - t);\n}\n\nfunction bounceOut(t) {\n  return (t = +t) < b1 ? b0 * t * t : t < b3 ? b0 * (t -= b2) * t + b4 : t < b6 ? b0 * (t -= b5) * t + b7 : b0 * (t -= b8) * t + b9;\n}\n\nfunction bounceInOut(t) {\n  return ((t *= 2) <= 1 ? 1 - bounceOut(1 - t) : bounceOut(t - 1) + 1) / 2;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-ease/src/circle.js\":\n/*!************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-ease/src/circle.js ***!\n  \\************************************************************/\n/*! exports provided: circleIn, circleOut, circleInOut */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"circleIn\", function() { return circleIn; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"circleOut\", function() { return circleOut; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"circleInOut\", function() { return circleInOut; });\nfunction circleIn(t) {\n  return 1 - Math.sqrt(1 - t * t);\n}\n\nfunction circleOut(t) {\n  return Math.sqrt(1 - --t * t);\n}\n\nfunction circleInOut(t) {\n  return ((t *= 2) <= 1 ? 1 - Math.sqrt(1 - t * t) : Math.sqrt(1 - (t -= 2) * t) + 1) / 2;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-ease/src/cubic.js\":\n/*!***********************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-ease/src/cubic.js ***!\n  \\***********************************************************/\n/*! exports provided: cubicIn, cubicOut, cubicInOut */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"cubicIn\", function() { return cubicIn; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"cubicOut\", function() { return cubicOut; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"cubicInOut\", function() { return cubicInOut; });\nfunction cubicIn(t) {\n  return t * t * t;\n}\n\nfunction cubicOut(t) {\n  return --t * t * t + 1;\n}\n\nfunction cubicInOut(t) {\n  return ((t *= 2) <= 1 ? t * t * t : (t -= 2) * t * t + 2) / 2;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-ease/src/elastic.js\":\n/*!*************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-ease/src/elastic.js ***!\n  \\*************************************************************/\n/*! exports provided: elasticIn, elasticOut, elasticInOut */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"elasticIn\", function() { return elasticIn; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"elasticOut\", function() { return elasticOut; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"elasticInOut\", function() { return elasticInOut; });\n/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./math.js */ \"./node_modules/d3/node_modules/d3-ease/src/math.js\");\n\n\nvar tau = 2 * Math.PI,\n    amplitude = 1,\n    period = 0.3;\n\nvar elasticIn = (function custom(a, p) {\n  var s = Math.asin(1 / (a = Math.max(1, a))) * (p /= tau);\n\n  function elasticIn(t) {\n    return a * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"tpmt\"])(-(--t)) * Math.sin((s - t) / p);\n  }\n\n  elasticIn.amplitude = function(a) { return custom(a, p * tau); };\n  elasticIn.period = function(p) { return custom(a, p); };\n\n  return elasticIn;\n})(amplitude, period);\n\nvar elasticOut = (function custom(a, p) {\n  var s = Math.asin(1 / (a = Math.max(1, a))) * (p /= tau);\n\n  function elasticOut(t) {\n    return 1 - a * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"tpmt\"])(t = +t) * Math.sin((t + s) / p);\n  }\n\n  elasticOut.amplitude = function(a) { return custom(a, p * tau); };\n  elasticOut.period = function(p) { return custom(a, p); };\n\n  return elasticOut;\n})(amplitude, period);\n\nvar elasticInOut = (function custom(a, p) {\n  var s = Math.asin(1 / (a = Math.max(1, a))) * (p /= tau);\n\n  function elasticInOut(t) {\n    return ((t = t * 2 - 1) < 0\n        ? a * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"tpmt\"])(-t) * Math.sin((s - t) / p)\n        : 2 - a * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"tpmt\"])(t) * Math.sin((s + t) / p)) / 2;\n  }\n\n  elasticInOut.amplitude = function(a) { return custom(a, p * tau); };\n  elasticInOut.period = function(p) { return custom(a, p); };\n\n  return elasticInOut;\n})(amplitude, period);\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-ease/src/exp.js\":\n/*!*********************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-ease/src/exp.js ***!\n  \\*********************************************************/\n/*! exports provided: expIn, expOut, expInOut */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"expIn\", function() { return expIn; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"expOut\", function() { return expOut; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"expInOut\", function() { return expInOut; });\n/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./math.js */ \"./node_modules/d3/node_modules/d3-ease/src/math.js\");\n\n\nfunction expIn(t) {\n  return Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"tpmt\"])(1 - +t);\n}\n\nfunction expOut(t) {\n  return 1 - Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"tpmt\"])(t);\n}\n\nfunction expInOut(t) {\n  return ((t *= 2) <= 1 ? Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"tpmt\"])(1 - t) : 2 - Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"tpmt\"])(t - 1)) / 2;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-ease/src/index.js\":\n/*!***********************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-ease/src/index.js ***!\n  \\***********************************************************/\n/*! exports provided: easeLinear, easeQuad, easeQuadIn, easeQuadOut, easeQuadInOut, easeCubic, easeCubicIn, easeCubicOut, easeCubicInOut, easePoly, easePolyIn, easePolyOut, easePolyInOut, easeSin, easeSinIn, easeSinOut, easeSinInOut, easeExp, easeExpIn, easeExpOut, easeExpInOut, easeCircle, easeCircleIn, easeCircleOut, easeCircleInOut, easeBounce, easeBounceIn, easeBounceOut, easeBounceInOut, easeBack, easeBackIn, easeBackOut, easeBackInOut, easeElastic, easeElasticIn, easeElasticOut, easeElasticInOut */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _linear_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./linear.js */ \"./node_modules/d3/node_modules/d3-ease/src/linear.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeLinear\", function() { return _linear_js__WEBPACK_IMPORTED_MODULE_0__[\"linear\"]; });\n\n/* harmony import */ var _quad_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./quad.js */ \"./node_modules/d3/node_modules/d3-ease/src/quad.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeQuad\", function() { return _quad_js__WEBPACK_IMPORTED_MODULE_1__[\"quadInOut\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeQuadIn\", function() { return _quad_js__WEBPACK_IMPORTED_MODULE_1__[\"quadIn\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeQuadOut\", function() { return _quad_js__WEBPACK_IMPORTED_MODULE_1__[\"quadOut\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeQuadInOut\", function() { return _quad_js__WEBPACK_IMPORTED_MODULE_1__[\"quadInOut\"]; });\n\n/* harmony import */ var _cubic_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./cubic.js */ \"./node_modules/d3/node_modules/d3-ease/src/cubic.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeCubic\", function() { return _cubic_js__WEBPACK_IMPORTED_MODULE_2__[\"cubicInOut\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeCubicIn\", function() { return _cubic_js__WEBPACK_IMPORTED_MODULE_2__[\"cubicIn\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeCubicOut\", function() { return _cubic_js__WEBPACK_IMPORTED_MODULE_2__[\"cubicOut\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeCubicInOut\", function() { return _cubic_js__WEBPACK_IMPORTED_MODULE_2__[\"cubicInOut\"]; });\n\n/* harmony import */ var _poly_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./poly.js */ \"./node_modules/d3/node_modules/d3-ease/src/poly.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easePoly\", function() { return _poly_js__WEBPACK_IMPORTED_MODULE_3__[\"polyInOut\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easePolyIn\", function() { return _poly_js__WEBPACK_IMPORTED_MODULE_3__[\"polyIn\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easePolyOut\", function() { return _poly_js__WEBPACK_IMPORTED_MODULE_3__[\"polyOut\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easePolyInOut\", function() { return _poly_js__WEBPACK_IMPORTED_MODULE_3__[\"polyInOut\"]; });\n\n/* harmony import */ var _sin_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./sin.js */ \"./node_modules/d3/node_modules/d3-ease/src/sin.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeSin\", function() { return _sin_js__WEBPACK_IMPORTED_MODULE_4__[\"sinInOut\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeSinIn\", function() { return _sin_js__WEBPACK_IMPORTED_MODULE_4__[\"sinIn\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeSinOut\", function() { return _sin_js__WEBPACK_IMPORTED_MODULE_4__[\"sinOut\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeSinInOut\", function() { return _sin_js__WEBPACK_IMPORTED_MODULE_4__[\"sinInOut\"]; });\n\n/* harmony import */ var _exp_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./exp.js */ \"./node_modules/d3/node_modules/d3-ease/src/exp.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeExp\", function() { return _exp_js__WEBPACK_IMPORTED_MODULE_5__[\"expInOut\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeExpIn\", function() { return _exp_js__WEBPACK_IMPORTED_MODULE_5__[\"expIn\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeExpOut\", function() { return _exp_js__WEBPACK_IMPORTED_MODULE_5__[\"expOut\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeExpInOut\", function() { return _exp_js__WEBPACK_IMPORTED_MODULE_5__[\"expInOut\"]; });\n\n/* harmony import */ var _circle_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./circle.js */ \"./node_modules/d3/node_modules/d3-ease/src/circle.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeCircle\", function() { return _circle_js__WEBPACK_IMPORTED_MODULE_6__[\"circleInOut\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeCircleIn\", function() { return _circle_js__WEBPACK_IMPORTED_MODULE_6__[\"circleIn\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeCircleOut\", function() { return _circle_js__WEBPACK_IMPORTED_MODULE_6__[\"circleOut\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeCircleInOut\", function() { return _circle_js__WEBPACK_IMPORTED_MODULE_6__[\"circleInOut\"]; });\n\n/* harmony import */ var _bounce_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./bounce.js */ \"./node_modules/d3/node_modules/d3-ease/src/bounce.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeBounce\", function() { return _bounce_js__WEBPACK_IMPORTED_MODULE_7__[\"bounceOut\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeBounceIn\", function() { return _bounce_js__WEBPACK_IMPORTED_MODULE_7__[\"bounceIn\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeBounceOut\", function() { return _bounce_js__WEBPACK_IMPORTED_MODULE_7__[\"bounceOut\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeBounceInOut\", function() { return _bounce_js__WEBPACK_IMPORTED_MODULE_7__[\"bounceInOut\"]; });\n\n/* harmony import */ var _back_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./back.js */ \"./node_modules/d3/node_modules/d3-ease/src/back.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeBack\", function() { return _back_js__WEBPACK_IMPORTED_MODULE_8__[\"backInOut\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeBackIn\", function() { return _back_js__WEBPACK_IMPORTED_MODULE_8__[\"backIn\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeBackOut\", function() { return _back_js__WEBPACK_IMPORTED_MODULE_8__[\"backOut\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeBackInOut\", function() { return _back_js__WEBPACK_IMPORTED_MODULE_8__[\"backInOut\"]; });\n\n/* harmony import */ var _elastic_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./elastic.js */ \"./node_modules/d3/node_modules/d3-ease/src/elastic.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeElastic\", function() { return _elastic_js__WEBPACK_IMPORTED_MODULE_9__[\"elasticOut\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeElasticIn\", function() { return _elastic_js__WEBPACK_IMPORTED_MODULE_9__[\"elasticIn\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeElasticOut\", function() { return _elastic_js__WEBPACK_IMPORTED_MODULE_9__[\"elasticOut\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeElasticInOut\", function() { return _elastic_js__WEBPACK_IMPORTED_MODULE_9__[\"elasticInOut\"]; });\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-ease/src/linear.js\":\n/*!************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-ease/src/linear.js ***!\n  \\************************************************************/\n/*! exports provided: linear */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"linear\", function() { return linear; });\nconst linear = t => +t;\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-ease/src/math.js\":\n/*!**********************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-ease/src/math.js ***!\n  \\**********************************************************/\n/*! exports provided: tpmt */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"tpmt\", function() { return tpmt; });\n// tpmt is two power minus ten times t scaled to [0,1]\nfunction tpmt(x) {\n  return (Math.pow(2, -10 * x) - 0.0009765625) * 1.0009775171065494;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-ease/src/poly.js\":\n/*!**********************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-ease/src/poly.js ***!\n  \\**********************************************************/\n/*! exports provided: polyIn, polyOut, polyInOut */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"polyIn\", function() { return polyIn; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"polyOut\", function() { return polyOut; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"polyInOut\", function() { return polyInOut; });\nvar exponent = 3;\n\nvar polyIn = (function custom(e) {\n  e = +e;\n\n  function polyIn(t) {\n    return Math.pow(t, e);\n  }\n\n  polyIn.exponent = custom;\n\n  return polyIn;\n})(exponent);\n\nvar polyOut = (function custom(e) {\n  e = +e;\n\n  function polyOut(t) {\n    return 1 - Math.pow(1 - t, e);\n  }\n\n  polyOut.exponent = custom;\n\n  return polyOut;\n})(exponent);\n\nvar polyInOut = (function custom(e) {\n  e = +e;\n\n  function polyInOut(t) {\n    return ((t *= 2) <= 1 ? Math.pow(t, e) : 2 - Math.pow(2 - t, e)) / 2;\n  }\n\n  polyInOut.exponent = custom;\n\n  return polyInOut;\n})(exponent);\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-ease/src/quad.js\":\n/*!**********************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-ease/src/quad.js ***!\n  \\**********************************************************/\n/*! exports provided: quadIn, quadOut, quadInOut */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"quadIn\", function() { return quadIn; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"quadOut\", function() { return quadOut; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"quadInOut\", function() { return quadInOut; });\nfunction quadIn(t) {\n  return t * t;\n}\n\nfunction quadOut(t) {\n  return t * (2 - t);\n}\n\nfunction quadInOut(t) {\n  return ((t *= 2) <= 1 ? t * t : --t * (2 - t) + 1) / 2;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-ease/src/sin.js\":\n/*!*********************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-ease/src/sin.js ***!\n  \\*********************************************************/\n/*! exports provided: sinIn, sinOut, sinInOut */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"sinIn\", function() { return sinIn; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"sinOut\", function() { return sinOut; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"sinInOut\", function() { return sinInOut; });\nvar pi = Math.PI,\n    halfPi = pi / 2;\n\nfunction sinIn(t) {\n  return (+t === 1) ? 1 : 1 - Math.cos(t * halfPi);\n}\n\nfunction sinOut(t) {\n  return Math.sin(t * halfPi);\n}\n\nfunction sinInOut(t) {\n  return (1 - Math.cos(pi * t)) / 2;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-format/src/defaultLocale.js\":\n/*!*********************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-format/src/defaultLocale.js ***!\n  \\*********************************************************************/\n/*! exports provided: format, formatPrefix, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"format\", function() { return format; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"formatPrefix\", function() { return formatPrefix; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return defaultLocale; });\n/* harmony import */ var _locale_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./locale.js */ \"./node_modules/d3/node_modules/d3-format/src/locale.js\");\n\n\nvar locale;\nvar format;\nvar formatPrefix;\n\ndefaultLocale({\n  thousands: \",\",\n  grouping: [3],\n  currency: [\"$\", \"\"]\n});\n\nfunction defaultLocale(definition) {\n  locale = Object(_locale_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(definition);\n  format = locale.format;\n  formatPrefix = locale.formatPrefix;\n  return locale;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-format/src/exponent.js\":\n/*!****************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-format/src/exponent.js ***!\n  \\****************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _formatDecimal_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./formatDecimal.js */ \"./node_modules/d3/node_modules/d3-format/src/formatDecimal.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(x) {\n  return x = Object(_formatDecimal_js__WEBPACK_IMPORTED_MODULE_0__[\"formatDecimalParts\"])(Math.abs(x)), x ? x[1] : NaN;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-format/src/formatDecimal.js\":\n/*!*********************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-format/src/formatDecimal.js ***!\n  \\*********************************************************************/\n/*! exports provided: default, formatDecimalParts */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"formatDecimalParts\", function() { return formatDecimalParts; });\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(x) {\n  return Math.abs(x = Math.round(x)) >= 1e21\n      ? x.toLocaleString(\"en\").replace(/,/g, \"\")\n      : x.toString(10);\n});\n\n// Computes the decimal coefficient and exponent of the specified number x with\n// significant digits p, where x is positive and p is in [1, 21] or undefined.\n// For example, formatDecimalParts(1.23) returns [\"123\", 0].\nfunction formatDecimalParts(x, p) {\n  if ((i = (x = p ? x.toExponential(p - 1) : x.toExponential()).indexOf(\"e\")) < 0) return null; // NaN, ±Infinity\n  var i, coefficient = x.slice(0, i);\n\n  // The string returned by toExponential either has the form \\d\\.\\d+e[-+]\\d+\n  // (e.g., 1.2e+3) or the form \\de[-+]\\d+ (e.g., 1e+3).\n  return [\n    coefficient.length > 1 ? coefficient[0] + coefficient.slice(2) : coefficient,\n    +x.slice(i + 1)\n  ];\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-format/src/formatGroup.js\":\n/*!*******************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-format/src/formatGroup.js ***!\n  \\*******************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(grouping, thousands) {\n  return function(value, width) {\n    var i = value.length,\n        t = [],\n        j = 0,\n        g = grouping[0],\n        length = 0;\n\n    while (i > 0 && g > 0) {\n      if (length + g + 1 > width) g = Math.max(1, width - length);\n      t.push(value.substring(i -= g, i + g));\n      if ((length += g + 1) > width) break;\n      g = grouping[j = (j + 1) % grouping.length];\n    }\n\n    return t.reverse().join(thousands);\n  };\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-format/src/formatNumerals.js\":\n/*!**********************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-format/src/formatNumerals.js ***!\n  \\**********************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(numerals) {\n  return function(value) {\n    return value.replace(/[0-9]/g, function(i) {\n      return numerals[+i];\n    });\n  };\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-format/src/formatPrefixAuto.js\":\n/*!************************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-format/src/formatPrefixAuto.js ***!\n  \\************************************************************************/\n/*! exports provided: prefixExponent, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"prefixExponent\", function() { return prefixExponent; });\n/* harmony import */ var _formatDecimal_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./formatDecimal.js */ \"./node_modules/d3/node_modules/d3-format/src/formatDecimal.js\");\n\n\nvar prefixExponent;\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(x, p) {\n  var d = Object(_formatDecimal_js__WEBPACK_IMPORTED_MODULE_0__[\"formatDecimalParts\"])(x, p);\n  if (!d) return x + \"\";\n  var coefficient = d[0],\n      exponent = d[1],\n      i = exponent - (prefixExponent = Math.max(-8, Math.min(8, Math.floor(exponent / 3))) * 3) + 1,\n      n = coefficient.length;\n  return i === n ? coefficient\n      : i > n ? coefficient + new Array(i - n + 1).join(\"0\")\n      : i > 0 ? coefficient.slice(0, i) + \".\" + coefficient.slice(i)\n      : \"0.\" + new Array(1 - i).join(\"0\") + Object(_formatDecimal_js__WEBPACK_IMPORTED_MODULE_0__[\"formatDecimalParts\"])(x, Math.max(0, p + i - 1))[0]; // less than 1y!\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-format/src/formatRounded.js\":\n/*!*********************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-format/src/formatRounded.js ***!\n  \\*********************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _formatDecimal_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./formatDecimal.js */ \"./node_modules/d3/node_modules/d3-format/src/formatDecimal.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(x, p) {\n  var d = Object(_formatDecimal_js__WEBPACK_IMPORTED_MODULE_0__[\"formatDecimalParts\"])(x, p);\n  if (!d) return x + \"\";\n  var coefficient = d[0],\n      exponent = d[1];\n  return exponent < 0 ? \"0.\" + new Array(-exponent).join(\"0\") + coefficient\n      : coefficient.length > exponent + 1 ? coefficient.slice(0, exponent + 1) + \".\" + coefficient.slice(exponent + 1)\n      : coefficient + new Array(exponent - coefficient.length + 2).join(\"0\");\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-format/src/formatSpecifier.js\":\n/*!***********************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-format/src/formatSpecifier.js ***!\n  \\***********************************************************************/\n/*! exports provided: default, FormatSpecifier */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return formatSpecifier; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"FormatSpecifier\", function() { return FormatSpecifier; });\n// [[fill]align][sign][symbol][0][width][,][.precision][~][type]\nvar re = /^(?:(.)?([<>=^]))?([+\\-( ])?([$#])?(0)?(\\d+)?(,)?(\\.\\d+)?(~)?([a-z%])?$/i;\n\nfunction formatSpecifier(specifier) {\n  if (!(match = re.exec(specifier))) throw new Error(\"invalid format: \" + specifier);\n  var match;\n  return new FormatSpecifier({\n    fill: match[1],\n    align: match[2],\n    sign: match[3],\n    symbol: match[4],\n    zero: match[5],\n    width: match[6],\n    comma: match[7],\n    precision: match[8] && match[8].slice(1),\n    trim: match[9],\n    type: match[10]\n  });\n}\n\nformatSpecifier.prototype = FormatSpecifier.prototype; // instanceof\n\nfunction FormatSpecifier(specifier) {\n  this.fill = specifier.fill === undefined ? \" \" : specifier.fill + \"\";\n  this.align = specifier.align === undefined ? \">\" : specifier.align + \"\";\n  this.sign = specifier.sign === undefined ? \"-\" : specifier.sign + \"\";\n  this.symbol = specifier.symbol === undefined ? \"\" : specifier.symbol + \"\";\n  this.zero = !!specifier.zero;\n  this.width = specifier.width === undefined ? undefined : +specifier.width;\n  this.comma = !!specifier.comma;\n  this.precision = specifier.precision === undefined ? undefined : +specifier.precision;\n  this.trim = !!specifier.trim;\n  this.type = specifier.type === undefined ? \"\" : specifier.type + \"\";\n}\n\nFormatSpecifier.prototype.toString = function() {\n  return this.fill\n      + this.align\n      + this.sign\n      + this.symbol\n      + (this.zero ? \"0\" : \"\")\n      + (this.width === undefined ? \"\" : Math.max(1, this.width | 0))\n      + (this.comma ? \",\" : \"\")\n      + (this.precision === undefined ? \"\" : \".\" + Math.max(0, this.precision | 0))\n      + (this.trim ? \"~\" : \"\")\n      + this.type;\n};\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-format/src/formatTrim.js\":\n/*!******************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-format/src/formatTrim.js ***!\n  \\******************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n// Trims insignificant zeros, e.g., replaces 1.2000k with 1.2k.\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(s) {\n  out: for (var n = s.length, i = 1, i0 = -1, i1; i < n; ++i) {\n    switch (s[i]) {\n      case \".\": i0 = i1 = i; break;\n      case \"0\": if (i0 === 0) i0 = i; i1 = i; break;\n      default: if (!+s[i]) break out; if (i0 > 0) i0 = 0; break;\n    }\n  }\n  return i0 > 0 ? s.slice(0, i0) + s.slice(i1 + 1) : s;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-format/src/formatTypes.js\":\n/*!*******************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-format/src/formatTypes.js ***!\n  \\*******************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _formatDecimal_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./formatDecimal.js */ \"./node_modules/d3/node_modules/d3-format/src/formatDecimal.js\");\n/* harmony import */ var _formatPrefixAuto_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./formatPrefixAuto.js */ \"./node_modules/d3/node_modules/d3-format/src/formatPrefixAuto.js\");\n/* harmony import */ var _formatRounded_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./formatRounded.js */ \"./node_modules/d3/node_modules/d3-format/src/formatRounded.js\");\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n  \"%\": (x, p) => (x * 100).toFixed(p),\n  \"b\": (x) => Math.round(x).toString(2),\n  \"c\": (x) => x + \"\",\n  \"d\": _formatDecimal_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"],\n  \"e\": (x, p) => x.toExponential(p),\n  \"f\": (x, p) => x.toFixed(p),\n  \"g\": (x, p) => x.toPrecision(p),\n  \"o\": (x) => Math.round(x).toString(8),\n  \"p\": (x, p) => Object(_formatRounded_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(x * 100, p),\n  \"r\": _formatRounded_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"],\n  \"s\": _formatPrefixAuto_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"],\n  \"X\": (x) => Math.round(x).toString(16).toUpperCase(),\n  \"x\": (x) => Math.round(x).toString(16)\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-format/src/identity.js\":\n/*!****************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-format/src/identity.js ***!\n  \\****************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(x) {\n  return x;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-format/src/index.js\":\n/*!*************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-format/src/index.js ***!\n  \\*************************************************************/\n/*! exports provided: formatDefaultLocale, format, formatPrefix, formatLocale, formatSpecifier, FormatSpecifier, precisionFixed, precisionPrefix, precisionRound */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _defaultLocale_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./defaultLocale.js */ \"./node_modules/d3/node_modules/d3-format/src/defaultLocale.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"formatDefaultLocale\", function() { return _defaultLocale_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"format\", function() { return _defaultLocale_js__WEBPACK_IMPORTED_MODULE_0__[\"format\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"formatPrefix\", function() { return _defaultLocale_js__WEBPACK_IMPORTED_MODULE_0__[\"formatPrefix\"]; });\n\n/* harmony import */ var _locale_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./locale.js */ \"./node_modules/d3/node_modules/d3-format/src/locale.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"formatLocale\", function() { return _locale_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"]; });\n\n/* harmony import */ var _formatSpecifier_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./formatSpecifier.js */ \"./node_modules/d3/node_modules/d3-format/src/formatSpecifier.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"formatSpecifier\", function() { return _formatSpecifier_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"FormatSpecifier\", function() { return _formatSpecifier_js__WEBPACK_IMPORTED_MODULE_2__[\"FormatSpecifier\"]; });\n\n/* harmony import */ var _precisionFixed_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./precisionFixed.js */ \"./node_modules/d3/node_modules/d3-format/src/precisionFixed.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"precisionFixed\", function() { return _precisionFixed_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"]; });\n\n/* harmony import */ var _precisionPrefix_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./precisionPrefix.js */ \"./node_modules/d3/node_modules/d3-format/src/precisionPrefix.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"precisionPrefix\", function() { return _precisionPrefix_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"]; });\n\n/* harmony import */ var _precisionRound_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./precisionRound.js */ \"./node_modules/d3/node_modules/d3-format/src/precisionRound.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"precisionRound\", function() { return _precisionRound_js__WEBPACK_IMPORTED_MODULE_5__[\"default\"]; });\n\n\n\n\n\n\n\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-format/src/locale.js\":\n/*!**************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-format/src/locale.js ***!\n  \\**************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _exponent_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./exponent.js */ \"./node_modules/d3/node_modules/d3-format/src/exponent.js\");\n/* harmony import */ var _formatGroup_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./formatGroup.js */ \"./node_modules/d3/node_modules/d3-format/src/formatGroup.js\");\n/* harmony import */ var _formatNumerals_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./formatNumerals.js */ \"./node_modules/d3/node_modules/d3-format/src/formatNumerals.js\");\n/* harmony import */ var _formatSpecifier_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./formatSpecifier.js */ \"./node_modules/d3/node_modules/d3-format/src/formatSpecifier.js\");\n/* harmony import */ var _formatTrim_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./formatTrim.js */ \"./node_modules/d3/node_modules/d3-format/src/formatTrim.js\");\n/* harmony import */ var _formatTypes_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./formatTypes.js */ \"./node_modules/d3/node_modules/d3-format/src/formatTypes.js\");\n/* harmony import */ var _formatPrefixAuto_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./formatPrefixAuto.js */ \"./node_modules/d3/node_modules/d3-format/src/formatPrefixAuto.js\");\n/* harmony import */ var _identity_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./identity.js */ \"./node_modules/d3/node_modules/d3-format/src/identity.js\");\n\n\n\n\n\n\n\n\n\nvar map = Array.prototype.map,\n    prefixes = [\"y\",\"z\",\"a\",\"f\",\"p\",\"n\",\"µ\",\"m\",\"\",\"k\",\"M\",\"G\",\"T\",\"P\",\"E\",\"Z\",\"Y\"];\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(locale) {\n  var group = locale.grouping === undefined || locale.thousands === undefined ? _identity_js__WEBPACK_IMPORTED_MODULE_7__[\"default\"] : Object(_formatGroup_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(map.call(locale.grouping, Number), locale.thousands + \"\"),\n      currencyPrefix = locale.currency === undefined ? \"\" : locale.currency[0] + \"\",\n      currencySuffix = locale.currency === undefined ? \"\" : locale.currency[1] + \"\",\n      decimal = locale.decimal === undefined ? \".\" : locale.decimal + \"\",\n      numerals = locale.numerals === undefined ? _identity_js__WEBPACK_IMPORTED_MODULE_7__[\"default\"] : Object(_formatNumerals_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(map.call(locale.numerals, String)),\n      percent = locale.percent === undefined ? \"%\" : locale.percent + \"\",\n      minus = locale.minus === undefined ? \"−\" : locale.minus + \"\",\n      nan = locale.nan === undefined ? \"NaN\" : locale.nan + \"\";\n\n  function newFormat(specifier) {\n    specifier = Object(_formatSpecifier_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(specifier);\n\n    var fill = specifier.fill,\n        align = specifier.align,\n        sign = specifier.sign,\n        symbol = specifier.symbol,\n        zero = specifier.zero,\n        width = specifier.width,\n        comma = specifier.comma,\n        precision = specifier.precision,\n        trim = specifier.trim,\n        type = specifier.type;\n\n    // The \"n\" type is an alias for \",g\".\n    if (type === \"n\") comma = true, type = \"g\";\n\n    // The \"\" type, and any invalid type, is an alias for \".12~g\".\n    else if (!_formatTypes_js__WEBPACK_IMPORTED_MODULE_5__[\"default\"][type]) precision === undefined && (precision = 12), trim = true, type = \"g\";\n\n    // If zero fill is specified, padding goes after sign and before digits.\n    if (zero || (fill === \"0\" && align === \"=\")) zero = true, fill = \"0\", align = \"=\";\n\n    // Compute the prefix and suffix.\n    // For SI-prefix, the suffix is lazily computed.\n    var prefix = symbol === \"$\" ? currencyPrefix : symbol === \"#\" && /[boxX]/.test(type) ? \"0\" + type.toLowerCase() : \"\",\n        suffix = symbol === \"$\" ? currencySuffix : /[%p]/.test(type) ? percent : \"\";\n\n    // What format function should we use?\n    // Is this an integer type?\n    // Can this type generate exponential notation?\n    var formatType = _formatTypes_js__WEBPACK_IMPORTED_MODULE_5__[\"default\"][type],\n        maybeSuffix = /[defgprs%]/.test(type);\n\n    // Set the default precision if not specified,\n    // or clamp the specified precision to the supported range.\n    // For significant precision, it must be in [1, 21].\n    // For fixed precision, it must be in [0, 20].\n    precision = precision === undefined ? 6\n        : /[gprs]/.test(type) ? Math.max(1, Math.min(21, precision))\n        : Math.max(0, Math.min(20, precision));\n\n    function format(value) {\n      var valuePrefix = prefix,\n          valueSuffix = suffix,\n          i, n, c;\n\n      if (type === \"c\") {\n        valueSuffix = formatType(value) + valueSuffix;\n        value = \"\";\n      } else {\n        value = +value;\n\n        // Determine the sign. -0 is not less than 0, but 1 / -0 is!\n        var valueNegative = value < 0 || 1 / value < 0;\n\n        // Perform the initial formatting.\n        value = isNaN(value) ? nan : formatType(Math.abs(value), precision);\n\n        // Trim insignificant zeros.\n        if (trim) value = Object(_formatTrim_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(value);\n\n        // If a negative value rounds to zero after formatting, and no explicit positive sign is requested, hide the sign.\n        if (valueNegative && +value === 0 && sign !== \"+\") valueNegative = false;\n\n        // Compute the prefix and suffix.\n        valuePrefix = (valueNegative ? (sign === \"(\" ? sign : minus) : sign === \"-\" || sign === \"(\" ? \"\" : sign) + valuePrefix;\n        valueSuffix = (type === \"s\" ? prefixes[8 + _formatPrefixAuto_js__WEBPACK_IMPORTED_MODULE_6__[\"prefixExponent\"] / 3] : \"\") + valueSuffix + (valueNegative && sign === \"(\" ? \")\" : \"\");\n\n        // Break the formatted value into the integer “value” part that can be\n        // grouped, and fractional or exponential “suffix” part that is not.\n        if (maybeSuffix) {\n          i = -1, n = value.length;\n          while (++i < n) {\n            if (c = value.charCodeAt(i), 48 > c || c > 57) {\n              valueSuffix = (c === 46 ? decimal + value.slice(i + 1) : value.slice(i)) + valueSuffix;\n              value = value.slice(0, i);\n              break;\n            }\n          }\n        }\n      }\n\n      // If the fill character is not \"0\", grouping is applied before padding.\n      if (comma && !zero) value = group(value, Infinity);\n\n      // Compute the padding.\n      var length = valuePrefix.length + value.length + valueSuffix.length,\n          padding = length < width ? new Array(width - length + 1).join(fill) : \"\";\n\n      // If the fill character is \"0\", grouping is applied after padding.\n      if (comma && zero) value = group(padding + value, padding.length ? width - valueSuffix.length : Infinity), padding = \"\";\n\n      // Reconstruct the final output based on the desired alignment.\n      switch (align) {\n        case \"<\": value = valuePrefix + value + valueSuffix + padding; break;\n        case \"=\": value = valuePrefix + padding + value + valueSuffix; break;\n        case \"^\": value = padding.slice(0, length = padding.length >> 1) + valuePrefix + value + valueSuffix + padding.slice(length); break;\n        default: value = padding + valuePrefix + value + valueSuffix; break;\n      }\n\n      return numerals(value);\n    }\n\n    format.toString = function() {\n      return specifier + \"\";\n    };\n\n    return format;\n  }\n\n  function formatPrefix(specifier, value) {\n    var f = newFormat((specifier = Object(_formatSpecifier_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(specifier), specifier.type = \"f\", specifier)),\n        e = Math.max(-8, Math.min(8, Math.floor(Object(_exponent_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(value) / 3))) * 3,\n        k = Math.pow(10, -e),\n        prefix = prefixes[8 + e / 3];\n    return function(value) {\n      return f(k * value) + prefix;\n    };\n  }\n\n  return {\n    format: newFormat,\n    formatPrefix: formatPrefix\n  };\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-format/src/precisionFixed.js\":\n/*!**********************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-format/src/precisionFixed.js ***!\n  \\**********************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _exponent_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./exponent.js */ \"./node_modules/d3/node_modules/d3-format/src/exponent.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(step) {\n  return Math.max(0, -Object(_exponent_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(Math.abs(step)));\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-format/src/precisionPrefix.js\":\n/*!***********************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-format/src/precisionPrefix.js ***!\n  \\***********************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _exponent_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./exponent.js */ \"./node_modules/d3/node_modules/d3-format/src/exponent.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(step, value) {\n  return Math.max(0, Math.max(-8, Math.min(8, Math.floor(Object(_exponent_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(value) / 3))) * 3 - Object(_exponent_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(Math.abs(step)));\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-format/src/precisionRound.js\":\n/*!**********************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-format/src/precisionRound.js ***!\n  \\**********************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _exponent_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./exponent.js */ \"./node_modules/d3/node_modules/d3-format/src/exponent.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(step, max) {\n  step = Math.abs(step), max = Math.abs(max) - step;\n  return Math.max(0, Object(_exponent_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(max) - Object(_exponent_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(step)) + 1;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-interpolate/src/array.js\":\n/*!******************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-interpolate/src/array.js ***!\n  \\******************************************************************/\n/*! exports provided: default, genericArray */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"genericArray\", function() { return genericArray; });\n/* harmony import */ var _value_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./value.js */ \"./node_modules/d3/node_modules/d3-interpolate/src/value.js\");\n/* harmony import */ var _numberArray_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./numberArray.js */ \"./node_modules/d3/node_modules/d3-interpolate/src/numberArray.js\");\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(a, b) {\n  return (Object(_numberArray_js__WEBPACK_IMPORTED_MODULE_1__[\"isNumberArray\"])(b) ? _numberArray_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"] : genericArray)(a, b);\n});\n\nfunction genericArray(a, b) {\n  var nb = b ? b.length : 0,\n      na = a ? Math.min(nb, a.length) : 0,\n      x = new Array(na),\n      c = new Array(nb),\n      i;\n\n  for (i = 0; i < na; ++i) x[i] = Object(_value_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(a[i], b[i]);\n  for (; i < nb; ++i) c[i] = b[i];\n\n  return function(t) {\n    for (i = 0; i < na; ++i) c[i] = x[i](t);\n    return c;\n  };\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-interpolate/src/basis.js\":\n/*!******************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-interpolate/src/basis.js ***!\n  \\******************************************************************/\n/*! exports provided: basis, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"basis\", function() { return basis; });\nfunction basis(t1, v0, v1, v2, v3) {\n  var t2 = t1 * t1, t3 = t2 * t1;\n  return ((1 - 3 * t1 + 3 * t2 - t3) * v0\n      + (4 - 6 * t2 + 3 * t3) * v1\n      + (1 + 3 * t1 + 3 * t2 - 3 * t3) * v2\n      + t3 * v3) / 6;\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(values) {\n  var n = values.length - 1;\n  return function(t) {\n    var i = t <= 0 ? (t = 0) : t >= 1 ? (t = 1, n - 1) : Math.floor(t * n),\n        v1 = values[i],\n        v2 = values[i + 1],\n        v0 = i > 0 ? values[i - 1] : 2 * v1 - v2,\n        v3 = i < n - 1 ? values[i + 2] : 2 * v2 - v1;\n    return basis((t - i / n) * n, v0, v1, v2, v3);\n  };\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-interpolate/src/basisClosed.js\":\n/*!************************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-interpolate/src/basisClosed.js ***!\n  \\************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _basis_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./basis.js */ \"./node_modules/d3/node_modules/d3-interpolate/src/basis.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(values) {\n  var n = values.length;\n  return function(t) {\n    var i = Math.floor(((t %= 1) < 0 ? ++t : t) * n),\n        v0 = values[(i + n - 1) % n],\n        v1 = values[i % n],\n        v2 = values[(i + 1) % n],\n        v3 = values[(i + 2) % n];\n    return Object(_basis_js__WEBPACK_IMPORTED_MODULE_0__[\"basis\"])((t - i / n) * n, v0, v1, v2, v3);\n  };\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-interpolate/src/color.js\":\n/*!******************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-interpolate/src/color.js ***!\n  \\******************************************************************/\n/*! exports provided: hue, gamma, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"hue\", function() { return hue; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"gamma\", function() { return gamma; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return nogamma; });\n/* harmony import */ var _constant_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./constant.js */ \"./node_modules/d3/node_modules/d3-interpolate/src/constant.js\");\n\n\nfunction linear(a, d) {\n  return function(t) {\n    return a + t * d;\n  };\n}\n\nfunction exponential(a, b, y) {\n  return a = Math.pow(a, y), b = Math.pow(b, y) - a, y = 1 / y, function(t) {\n    return Math.pow(a + t * b, y);\n  };\n}\n\nfunction hue(a, b) {\n  var d = b - a;\n  return d ? linear(a, d > 180 || d < -180 ? d - 360 * Math.round(d / 360) : d) : Object(_constant_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(isNaN(a) ? b : a);\n}\n\nfunction gamma(y) {\n  return (y = +y) === 1 ? nogamma : function(a, b) {\n    return b - a ? exponential(a, b, y) : Object(_constant_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(isNaN(a) ? b : a);\n  };\n}\n\nfunction nogamma(a, b) {\n  var d = b - a;\n  return d ? linear(a, d) : Object(_constant_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(isNaN(a) ? b : a);\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-interpolate/src/constant.js\":\n/*!*********************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-interpolate/src/constant.js ***!\n  \\*********************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (x => () => x);\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-interpolate/src/cubehelix.js\":\n/*!**********************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-interpolate/src/cubehelix.js ***!\n  \\**********************************************************************/\n/*! exports provided: default, cubehelixLong */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"cubehelixLong\", function() { return cubehelixLong; });\n/* harmony import */ var d3_color__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-color */ \"./node_modules/d3/node_modules/d3-color/src/index.js\");\n/* harmony import */ var _color_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./color.js */ \"./node_modules/d3/node_modules/d3-interpolate/src/color.js\");\n\n\n\nfunction cubehelix(hue) {\n  return (function cubehelixGamma(y) {\n    y = +y;\n\n    function cubehelix(start, end) {\n      var h = hue((start = Object(d3_color__WEBPACK_IMPORTED_MODULE_0__[\"cubehelix\"])(start)).h, (end = Object(d3_color__WEBPACK_IMPORTED_MODULE_0__[\"cubehelix\"])(end)).h),\n          s = Object(_color_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(start.s, end.s),\n          l = Object(_color_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(start.l, end.l),\n          opacity = Object(_color_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(start.opacity, end.opacity);\n      return function(t) {\n        start.h = h(t);\n        start.s = s(t);\n        start.l = l(Math.pow(t, y));\n        start.opacity = opacity(t);\n        return start + \"\";\n      };\n    }\n\n    cubehelix.gamma = cubehelixGamma;\n\n    return cubehelix;\n  })(1);\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (cubehelix(_color_js__WEBPACK_IMPORTED_MODULE_1__[\"hue\"]));\nvar cubehelixLong = cubehelix(_color_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"]);\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-interpolate/src/date.js\":\n/*!*****************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-interpolate/src/date.js ***!\n  \\*****************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(a, b) {\n  var d = new Date;\n  return a = +a, b = +b, function(t) {\n    return d.setTime(a * (1 - t) + b * t), d;\n  };\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-interpolate/src/discrete.js\":\n/*!*********************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-interpolate/src/discrete.js ***!\n  \\*********************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(range) {\n  var n = range.length;\n  return function(t) {\n    return range[Math.max(0, Math.min(n - 1, Math.floor(t * n)))];\n  };\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-interpolate/src/hcl.js\":\n/*!****************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-interpolate/src/hcl.js ***!\n  \\****************************************************************/\n/*! exports provided: default, hclLong */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"hclLong\", function() { return hclLong; });\n/* harmony import */ var d3_color__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-color */ \"./node_modules/d3/node_modules/d3-color/src/index.js\");\n/* harmony import */ var _color_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./color.js */ \"./node_modules/d3/node_modules/d3-interpolate/src/color.js\");\n\n\n\nfunction hcl(hue) {\n  return function(start, end) {\n    var h = hue((start = Object(d3_color__WEBPACK_IMPORTED_MODULE_0__[\"hcl\"])(start)).h, (end = Object(d3_color__WEBPACK_IMPORTED_MODULE_0__[\"hcl\"])(end)).h),\n        c = Object(_color_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(start.c, end.c),\n        l = Object(_color_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(start.l, end.l),\n        opacity = Object(_color_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(start.opacity, end.opacity);\n    return function(t) {\n      start.h = h(t);\n      start.c = c(t);\n      start.l = l(t);\n      start.opacity = opacity(t);\n      return start + \"\";\n    };\n  }\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (hcl(_color_js__WEBPACK_IMPORTED_MODULE_1__[\"hue\"]));\nvar hclLong = hcl(_color_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"]);\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-interpolate/src/hsl.js\":\n/*!****************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-interpolate/src/hsl.js ***!\n  \\****************************************************************/\n/*! exports provided: default, hslLong */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"hslLong\", function() { return hslLong; });\n/* harmony import */ var d3_color__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-color */ \"./node_modules/d3/node_modules/d3-color/src/index.js\");\n/* harmony import */ var _color_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./color.js */ \"./node_modules/d3/node_modules/d3-interpolate/src/color.js\");\n\n\n\nfunction hsl(hue) {\n  return function(start, end) {\n    var h = hue((start = Object(d3_color__WEBPACK_IMPORTED_MODULE_0__[\"hsl\"])(start)).h, (end = Object(d3_color__WEBPACK_IMPORTED_MODULE_0__[\"hsl\"])(end)).h),\n        s = Object(_color_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(start.s, end.s),\n        l = Object(_color_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(start.l, end.l),\n        opacity = Object(_color_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(start.opacity, end.opacity);\n    return function(t) {\n      start.h = h(t);\n      start.s = s(t);\n      start.l = l(t);\n      start.opacity = opacity(t);\n      return start + \"\";\n    };\n  }\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (hsl(_color_js__WEBPACK_IMPORTED_MODULE_1__[\"hue\"]));\nvar hslLong = hsl(_color_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"]);\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-interpolate/src/hue.js\":\n/*!****************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-interpolate/src/hue.js ***!\n  \\****************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _color_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./color.js */ \"./node_modules/d3/node_modules/d3-interpolate/src/color.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(a, b) {\n  var i = Object(_color_js__WEBPACK_IMPORTED_MODULE_0__[\"hue\"])(+a, +b);\n  return function(t) {\n    var x = i(t);\n    return x - 360 * Math.floor(x / 360);\n  };\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-interpolate/src/index.js\":\n/*!******************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-interpolate/src/index.js ***!\n  \\******************************************************************/\n/*! exports provided: interpolate, interpolateArray, interpolateBasis, interpolateBasisClosed, interpolateDate, interpolateDiscrete, interpolateHue, interpolateNumber, interpolateNumberArray, interpolateObject, interpolateRound, interpolateString, interpolateTransformCss, interpolateTransformSvg, interpolateZoom, interpolateRgb, interpolateRgbBasis, interpolateRgbBasisClosed, interpolateHsl, interpolateHslLong, interpolateLab, interpolateHcl, interpolateHclLong, interpolateCubehelix, interpolateCubehelixLong, piecewise, quantize */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _value_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./value.js */ \"./node_modules/d3/node_modules/d3-interpolate/src/value.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolate\", function() { return _value_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n/* harmony import */ var _array_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./array.js */ \"./node_modules/d3/node_modules/d3-interpolate/src/array.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateArray\", function() { return _array_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"]; });\n\n/* harmony import */ var _basis_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./basis.js */ \"./node_modules/d3/node_modules/d3-interpolate/src/basis.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateBasis\", function() { return _basis_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"]; });\n\n/* harmony import */ var _basisClosed_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./basisClosed.js */ \"./node_modules/d3/node_modules/d3-interpolate/src/basisClosed.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateBasisClosed\", function() { return _basisClosed_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"]; });\n\n/* harmony import */ var _date_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./date.js */ \"./node_modules/d3/node_modules/d3-interpolate/src/date.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateDate\", function() { return _date_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"]; });\n\n/* harmony import */ var _discrete_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./discrete.js */ \"./node_modules/d3/node_modules/d3-interpolate/src/discrete.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateDiscrete\", function() { return _discrete_js__WEBPACK_IMPORTED_MODULE_5__[\"default\"]; });\n\n/* harmony import */ var _hue_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./hue.js */ \"./node_modules/d3/node_modules/d3-interpolate/src/hue.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateHue\", function() { return _hue_js__WEBPACK_IMPORTED_MODULE_6__[\"default\"]; });\n\n/* harmony import */ var _number_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./number.js */ \"./node_modules/d3/node_modules/d3-interpolate/src/number.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateNumber\", function() { return _number_js__WEBPACK_IMPORTED_MODULE_7__[\"default\"]; });\n\n/* harmony import */ var _numberArray_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./numberArray.js */ \"./node_modules/d3/node_modules/d3-interpolate/src/numberArray.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateNumberArray\", function() { return _numberArray_js__WEBPACK_IMPORTED_MODULE_8__[\"default\"]; });\n\n/* harmony import */ var _object_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./object.js */ \"./node_modules/d3/node_modules/d3-interpolate/src/object.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateObject\", function() { return _object_js__WEBPACK_IMPORTED_MODULE_9__[\"default\"]; });\n\n/* harmony import */ var _round_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./round.js */ \"./node_modules/d3/node_modules/d3-interpolate/src/round.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateRound\", function() { return _round_js__WEBPACK_IMPORTED_MODULE_10__[\"default\"]; });\n\n/* harmony import */ var _string_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./string.js */ \"./node_modules/d3/node_modules/d3-interpolate/src/string.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateString\", function() { return _string_js__WEBPACK_IMPORTED_MODULE_11__[\"default\"]; });\n\n/* harmony import */ var _transform_index_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./transform/index.js */ \"./node_modules/d3/node_modules/d3-interpolate/src/transform/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateTransformCss\", function() { return _transform_index_js__WEBPACK_IMPORTED_MODULE_12__[\"interpolateTransformCss\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateTransformSvg\", function() { return _transform_index_js__WEBPACK_IMPORTED_MODULE_12__[\"interpolateTransformSvg\"]; });\n\n/* harmony import */ var _zoom_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./zoom.js */ \"./node_modules/d3/node_modules/d3-interpolate/src/zoom.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateZoom\", function() { return _zoom_js__WEBPACK_IMPORTED_MODULE_13__[\"default\"]; });\n\n/* harmony import */ var _rgb_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./rgb.js */ \"./node_modules/d3/node_modules/d3-interpolate/src/rgb.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateRgb\", function() { return _rgb_js__WEBPACK_IMPORTED_MODULE_14__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateRgbBasis\", function() { return _rgb_js__WEBPACK_IMPORTED_MODULE_14__[\"rgbBasis\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateRgbBasisClosed\", function() { return _rgb_js__WEBPACK_IMPORTED_MODULE_14__[\"rgbBasisClosed\"]; });\n\n/* harmony import */ var _hsl_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./hsl.js */ \"./node_modules/d3/node_modules/d3-interpolate/src/hsl.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateHsl\", function() { return _hsl_js__WEBPACK_IMPORTED_MODULE_15__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateHslLong\", function() { return _hsl_js__WEBPACK_IMPORTED_MODULE_15__[\"hslLong\"]; });\n\n/* harmony import */ var _lab_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./lab.js */ \"./node_modules/d3/node_modules/d3-interpolate/src/lab.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateLab\", function() { return _lab_js__WEBPACK_IMPORTED_MODULE_16__[\"default\"]; });\n\n/* harmony import */ var _hcl_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./hcl.js */ \"./node_modules/d3/node_modules/d3-interpolate/src/hcl.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateHcl\", function() { return _hcl_js__WEBPACK_IMPORTED_MODULE_17__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateHclLong\", function() { return _hcl_js__WEBPACK_IMPORTED_MODULE_17__[\"hclLong\"]; });\n\n/* harmony import */ var _cubehelix_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./cubehelix.js */ \"./node_modules/d3/node_modules/d3-interpolate/src/cubehelix.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateCubehelix\", function() { return _cubehelix_js__WEBPACK_IMPORTED_MODULE_18__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateCubehelixLong\", function() { return _cubehelix_js__WEBPACK_IMPORTED_MODULE_18__[\"cubehelixLong\"]; });\n\n/* harmony import */ var _piecewise_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./piecewise.js */ \"./node_modules/d3/node_modules/d3-interpolate/src/piecewise.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"piecewise\", function() { return _piecewise_js__WEBPACK_IMPORTED_MODULE_19__[\"default\"]; });\n\n/* harmony import */ var _quantize_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./quantize.js */ \"./node_modules/d3/node_modules/d3-interpolate/src/quantize.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"quantize\", function() { return _quantize_js__WEBPACK_IMPORTED_MODULE_20__[\"default\"]; });\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-interpolate/src/lab.js\":\n/*!****************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-interpolate/src/lab.js ***!\n  \\****************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return lab; });\n/* harmony import */ var d3_color__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-color */ \"./node_modules/d3/node_modules/d3-color/src/index.js\");\n/* harmony import */ var _color_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./color.js */ \"./node_modules/d3/node_modules/d3-interpolate/src/color.js\");\n\n\n\nfunction lab(start, end) {\n  var l = Object(_color_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])((start = Object(d3_color__WEBPACK_IMPORTED_MODULE_0__[\"lab\"])(start)).l, (end = Object(d3_color__WEBPACK_IMPORTED_MODULE_0__[\"lab\"])(end)).l),\n      a = Object(_color_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(start.a, end.a),\n      b = Object(_color_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(start.b, end.b),\n      opacity = Object(_color_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(start.opacity, end.opacity);\n  return function(t) {\n    start.l = l(t);\n    start.a = a(t);\n    start.b = b(t);\n    start.opacity = opacity(t);\n    return start + \"\";\n  };\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-interpolate/src/number.js\":\n/*!*******************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-interpolate/src/number.js ***!\n  \\*******************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(a, b) {\n  return a = +a, b = +b, function(t) {\n    return a * (1 - t) + b * t;\n  };\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-interpolate/src/numberArray.js\":\n/*!************************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-interpolate/src/numberArray.js ***!\n  \\************************************************************************/\n/*! exports provided: default, isNumberArray */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"isNumberArray\", function() { return isNumberArray; });\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(a, b) {\n  if (!b) b = [];\n  var n = a ? Math.min(b.length, a.length) : 0,\n      c = b.slice(),\n      i;\n  return function(t) {\n    for (i = 0; i < n; ++i) c[i] = a[i] * (1 - t) + b[i] * t;\n    return c;\n  };\n});\n\nfunction isNumberArray(x) {\n  return ArrayBuffer.isView(x) && !(x instanceof DataView);\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-interpolate/src/object.js\":\n/*!*******************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-interpolate/src/object.js ***!\n  \\*******************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _value_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./value.js */ \"./node_modules/d3/node_modules/d3-interpolate/src/value.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(a, b) {\n  var i = {},\n      c = {},\n      k;\n\n  if (a === null || typeof a !== \"object\") a = {};\n  if (b === null || typeof b !== \"object\") b = {};\n\n  for (k in b) {\n    if (k in a) {\n      i[k] = Object(_value_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(a[k], b[k]);\n    } else {\n      c[k] = b[k];\n    }\n  }\n\n  return function(t) {\n    for (k in i) c[k] = i[k](t);\n    return c;\n  };\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-interpolate/src/piecewise.js\":\n/*!**********************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-interpolate/src/piecewise.js ***!\n  \\**********************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return piecewise; });\n/* harmony import */ var _value_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./value.js */ \"./node_modules/d3/node_modules/d3-interpolate/src/value.js\");\n\n\nfunction piecewise(interpolate, values) {\n  if (values === undefined) values = interpolate, interpolate = _value_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"];\n  var i = 0, n = values.length - 1, v = values[0], I = new Array(n < 0 ? 0 : n);\n  while (i < n) I[i] = interpolate(v, v = values[++i]);\n  return function(t) {\n    var i = Math.max(0, Math.min(n - 1, Math.floor(t *= n)));\n    return I[i](t - i);\n  };\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-interpolate/src/quantize.js\":\n/*!*********************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-interpolate/src/quantize.js ***!\n  \\*********************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(interpolator, n) {\n  var samples = new Array(n);\n  for (var i = 0; i < n; ++i) samples[i] = interpolator(i / (n - 1));\n  return samples;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-interpolate/src/rgb.js\":\n/*!****************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-interpolate/src/rgb.js ***!\n  \\****************************************************************/\n/*! exports provided: default, rgbBasis, rgbBasisClosed */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"rgbBasis\", function() { return rgbBasis; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"rgbBasisClosed\", function() { return rgbBasisClosed; });\n/* harmony import */ var d3_color__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-color */ \"./node_modules/d3/node_modules/d3-color/src/index.js\");\n/* harmony import */ var _basis_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./basis.js */ \"./node_modules/d3/node_modules/d3-interpolate/src/basis.js\");\n/* harmony import */ var _basisClosed_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./basisClosed.js */ \"./node_modules/d3/node_modules/d3-interpolate/src/basisClosed.js\");\n/* harmony import */ var _color_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./color.js */ \"./node_modules/d3/node_modules/d3-interpolate/src/color.js\");\n\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ((function rgbGamma(y) {\n  var color = Object(_color_js__WEBPACK_IMPORTED_MODULE_3__[\"gamma\"])(y);\n\n  function rgb(start, end) {\n    var r = color((start = Object(d3_color__WEBPACK_IMPORTED_MODULE_0__[\"rgb\"])(start)).r, (end = Object(d3_color__WEBPACK_IMPORTED_MODULE_0__[\"rgb\"])(end)).r),\n        g = color(start.g, end.g),\n        b = color(start.b, end.b),\n        opacity = Object(_color_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(start.opacity, end.opacity);\n    return function(t) {\n      start.r = r(t);\n      start.g = g(t);\n      start.b = b(t);\n      start.opacity = opacity(t);\n      return start + \"\";\n    };\n  }\n\n  rgb.gamma = rgbGamma;\n\n  return rgb;\n})(1));\n\nfunction rgbSpline(spline) {\n  return function(colors) {\n    var n = colors.length,\n        r = new Array(n),\n        g = new Array(n),\n        b = new Array(n),\n        i, color;\n    for (i = 0; i < n; ++i) {\n      color = Object(d3_color__WEBPACK_IMPORTED_MODULE_0__[\"rgb\"])(colors[i]);\n      r[i] = color.r || 0;\n      g[i] = color.g || 0;\n      b[i] = color.b || 0;\n    }\n    r = spline(r);\n    g = spline(g);\n    b = spline(b);\n    color.opacity = 1;\n    return function(t) {\n      color.r = r(t);\n      color.g = g(t);\n      color.b = b(t);\n      return color + \"\";\n    };\n  };\n}\n\nvar rgbBasis = rgbSpline(_basis_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"]);\nvar rgbBasisClosed = rgbSpline(_basisClosed_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"]);\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-interpolate/src/round.js\":\n/*!******************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-interpolate/src/round.js ***!\n  \\******************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(a, b) {\n  return a = +a, b = +b, function(t) {\n    return Math.round(a * (1 - t) + b * t);\n  };\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-interpolate/src/string.js\":\n/*!*******************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-interpolate/src/string.js ***!\n  \\*******************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _number_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./number.js */ \"./node_modules/d3/node_modules/d3-interpolate/src/number.js\");\n\n\nvar reA = /[-+]?(?:\\d+\\.?\\d*|\\.?\\d+)(?:[eE][-+]?\\d+)?/g,\n    reB = new RegExp(reA.source, \"g\");\n\nfunction zero(b) {\n  return function() {\n    return b;\n  };\n}\n\nfunction one(b) {\n  return function(t) {\n    return b(t) + \"\";\n  };\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(a, b) {\n  var bi = reA.lastIndex = reB.lastIndex = 0, // scan index for next number in b\n      am, // current match in a\n      bm, // current match in b\n      bs, // string preceding current number in b, if any\n      i = -1, // index in s\n      s = [], // string constants and placeholders\n      q = []; // number interpolators\n\n  // Coerce inputs to strings.\n  a = a + \"\", b = b + \"\";\n\n  // Interpolate pairs of numbers in a & b.\n  while ((am = reA.exec(a))\n      && (bm = reB.exec(b))) {\n    if ((bs = bm.index) > bi) { // a string precedes the next number in b\n      bs = b.slice(bi, bs);\n      if (s[i]) s[i] += bs; // coalesce with previous string\n      else s[++i] = bs;\n    }\n    if ((am = am[0]) === (bm = bm[0])) { // numbers in a & b match\n      if (s[i]) s[i] += bm; // coalesce with previous string\n      else s[++i] = bm;\n    } else { // interpolate non-matching numbers\n      s[++i] = null;\n      q.push({i: i, x: Object(_number_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(am, bm)});\n    }\n    bi = reB.lastIndex;\n  }\n\n  // Add remains of b.\n  if (bi < b.length) {\n    bs = b.slice(bi);\n    if (s[i]) s[i] += bs; // coalesce with previous string\n    else s[++i] = bs;\n  }\n\n  // Special optimization for only a single match.\n  // Otherwise, interpolate each of the numbers and rejoin the string.\n  return s.length < 2 ? (q[0]\n      ? one(q[0].x)\n      : zero(b))\n      : (b = q.length, function(t) {\n          for (var i = 0, o; i < b; ++i) s[(o = q[i]).i] = o.x(t);\n          return s.join(\"\");\n        });\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-interpolate/src/transform/decompose.js\":\n/*!********************************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-interpolate/src/transform/decompose.js ***!\n  \\********************************************************************************/\n/*! exports provided: identity, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"identity\", function() { return identity; });\nvar degrees = 180 / Math.PI;\n\nvar identity = {\n  translateX: 0,\n  translateY: 0,\n  rotate: 0,\n  skewX: 0,\n  scaleX: 1,\n  scaleY: 1\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(a, b, c, d, e, f) {\n  var scaleX, scaleY, skewX;\n  if (scaleX = Math.sqrt(a * a + b * b)) a /= scaleX, b /= scaleX;\n  if (skewX = a * c + b * d) c -= a * skewX, d -= b * skewX;\n  if (scaleY = Math.sqrt(c * c + d * d)) c /= scaleY, d /= scaleY, skewX /= scaleY;\n  if (a * d < b * c) a = -a, b = -b, skewX = -skewX, scaleX = -scaleX;\n  return {\n    translateX: e,\n    translateY: f,\n    rotate: Math.atan2(b, a) * degrees,\n    skewX: Math.atan(skewX) * degrees,\n    scaleX: scaleX,\n    scaleY: scaleY\n  };\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-interpolate/src/transform/index.js\":\n/*!****************************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-interpolate/src/transform/index.js ***!\n  \\****************************************************************************/\n/*! exports provided: interpolateTransformCss, interpolateTransformSvg */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"interpolateTransformCss\", function() { return interpolateTransformCss; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"interpolateTransformSvg\", function() { return interpolateTransformSvg; });\n/* harmony import */ var _number_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../number.js */ \"./node_modules/d3/node_modules/d3-interpolate/src/number.js\");\n/* harmony import */ var _parse_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./parse.js */ \"./node_modules/d3/node_modules/d3-interpolate/src/transform/parse.js\");\n\n\n\nfunction interpolateTransform(parse, pxComma, pxParen, degParen) {\n\n  function pop(s) {\n    return s.length ? s.pop() + \" \" : \"\";\n  }\n\n  function translate(xa, ya, xb, yb, s, q) {\n    if (xa !== xb || ya !== yb) {\n      var i = s.push(\"translate(\", null, pxComma, null, pxParen);\n      q.push({i: i - 4, x: Object(_number_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(xa, xb)}, {i: i - 2, x: Object(_number_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(ya, yb)});\n    } else if (xb || yb) {\n      s.push(\"translate(\" + xb + pxComma + yb + pxParen);\n    }\n  }\n\n  function rotate(a, b, s, q) {\n    if (a !== b) {\n      if (a - b > 180) b += 360; else if (b - a > 180) a += 360; // shortest path\n      q.push({i: s.push(pop(s) + \"rotate(\", null, degParen) - 2, x: Object(_number_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(a, b)});\n    } else if (b) {\n      s.push(pop(s) + \"rotate(\" + b + degParen);\n    }\n  }\n\n  function skewX(a, b, s, q) {\n    if (a !== b) {\n      q.push({i: s.push(pop(s) + \"skewX(\", null, degParen) - 2, x: Object(_number_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(a, b)});\n    } else if (b) {\n      s.push(pop(s) + \"skewX(\" + b + degParen);\n    }\n  }\n\n  function scale(xa, ya, xb, yb, s, q) {\n    if (xa !== xb || ya !== yb) {\n      var i = s.push(pop(s) + \"scale(\", null, \",\", null, \")\");\n      q.push({i: i - 4, x: Object(_number_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(xa, xb)}, {i: i - 2, x: Object(_number_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(ya, yb)});\n    } else if (xb !== 1 || yb !== 1) {\n      s.push(pop(s) + \"scale(\" + xb + \",\" + yb + \")\");\n    }\n  }\n\n  return function(a, b) {\n    var s = [], // string constants and placeholders\n        q = []; // number interpolators\n    a = parse(a), b = parse(b);\n    translate(a.translateX, a.translateY, b.translateX, b.translateY, s, q);\n    rotate(a.rotate, b.rotate, s, q);\n    skewX(a.skewX, b.skewX, s, q);\n    scale(a.scaleX, a.scaleY, b.scaleX, b.scaleY, s, q);\n    a = b = null; // gc\n    return function(t) {\n      var i = -1, n = q.length, o;\n      while (++i < n) s[(o = q[i]).i] = o.x(t);\n      return s.join(\"\");\n    };\n  };\n}\n\nvar interpolateTransformCss = interpolateTransform(_parse_js__WEBPACK_IMPORTED_MODULE_1__[\"parseCss\"], \"px, \", \"px)\", \"deg)\");\nvar interpolateTransformSvg = interpolateTransform(_parse_js__WEBPACK_IMPORTED_MODULE_1__[\"parseSvg\"], \", \", \")\", \")\");\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-interpolate/src/transform/parse.js\":\n/*!****************************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-interpolate/src/transform/parse.js ***!\n  \\****************************************************************************/\n/*! exports provided: parseCss, parseSvg */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"parseCss\", function() { return parseCss; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"parseSvg\", function() { return parseSvg; });\n/* harmony import */ var _decompose_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./decompose.js */ \"./node_modules/d3/node_modules/d3-interpolate/src/transform/decompose.js\");\n\n\nvar svgNode;\n\n/* eslint-disable no-undef */\nfunction parseCss(value) {\n  const m = new (typeof DOMMatrix === \"function\" ? DOMMatrix : WebKitCSSMatrix)(value + \"\");\n  return m.isIdentity ? _decompose_js__WEBPACK_IMPORTED_MODULE_0__[\"identity\"] : Object(_decompose_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(m.a, m.b, m.c, m.d, m.e, m.f);\n}\n\nfunction parseSvg(value) {\n  if (value == null) return _decompose_js__WEBPACK_IMPORTED_MODULE_0__[\"identity\"];\n  if (!svgNode) svgNode = document.createElementNS(\"http://www.w3.org/2000/svg\", \"g\");\n  svgNode.setAttribute(\"transform\", value);\n  if (!(value = svgNode.transform.baseVal.consolidate())) return _decompose_js__WEBPACK_IMPORTED_MODULE_0__[\"identity\"];\n  value = value.matrix;\n  return Object(_decompose_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(value.a, value.b, value.c, value.d, value.e, value.f);\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-interpolate/src/value.js\":\n/*!******************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-interpolate/src/value.js ***!\n  \\******************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var d3_color__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-color */ \"./node_modules/d3/node_modules/d3-color/src/index.js\");\n/* harmony import */ var _rgb_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./rgb.js */ \"./node_modules/d3/node_modules/d3-interpolate/src/rgb.js\");\n/* harmony import */ var _array_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./array.js */ \"./node_modules/d3/node_modules/d3-interpolate/src/array.js\");\n/* harmony import */ var _date_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./date.js */ \"./node_modules/d3/node_modules/d3-interpolate/src/date.js\");\n/* harmony import */ var _number_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./number.js */ \"./node_modules/d3/node_modules/d3-interpolate/src/number.js\");\n/* harmony import */ var _object_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./object.js */ \"./node_modules/d3/node_modules/d3-interpolate/src/object.js\");\n/* harmony import */ var _string_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./string.js */ \"./node_modules/d3/node_modules/d3-interpolate/src/string.js\");\n/* harmony import */ var _constant_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./constant.js */ \"./node_modules/d3/node_modules/d3-interpolate/src/constant.js\");\n/* harmony import */ var _numberArray_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./numberArray.js */ \"./node_modules/d3/node_modules/d3-interpolate/src/numberArray.js\");\n\n\n\n\n\n\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(a, b) {\n  var t = typeof b, c;\n  return b == null || t === \"boolean\" ? Object(_constant_js__WEBPACK_IMPORTED_MODULE_7__[\"default\"])(b)\n      : (t === \"number\" ? _number_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"]\n      : t === \"string\" ? ((c = Object(d3_color__WEBPACK_IMPORTED_MODULE_0__[\"color\"])(b)) ? (b = c, _rgb_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"]) : _string_js__WEBPACK_IMPORTED_MODULE_6__[\"default\"])\n      : b instanceof d3_color__WEBPACK_IMPORTED_MODULE_0__[\"color\"] ? _rgb_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"]\n      : b instanceof Date ? _date_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"]\n      : Object(_numberArray_js__WEBPACK_IMPORTED_MODULE_8__[\"isNumberArray\"])(b) ? _numberArray_js__WEBPACK_IMPORTED_MODULE_8__[\"default\"]\n      : Array.isArray(b) ? _array_js__WEBPACK_IMPORTED_MODULE_2__[\"genericArray\"]\n      : typeof b.valueOf !== \"function\" && typeof b.toString !== \"function\" || isNaN(b) ? _object_js__WEBPACK_IMPORTED_MODULE_5__[\"default\"]\n      : _number_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(a, b);\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-interpolate/src/zoom.js\":\n/*!*****************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-interpolate/src/zoom.js ***!\n  \\*****************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\nvar epsilon2 = 1e-12;\n\nfunction cosh(x) {\n  return ((x = Math.exp(x)) + 1 / x) / 2;\n}\n\nfunction sinh(x) {\n  return ((x = Math.exp(x)) - 1 / x) / 2;\n}\n\nfunction tanh(x) {\n  return ((x = Math.exp(2 * x)) - 1) / (x + 1);\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ((function zoomRho(rho, rho2, rho4) {\n\n  // p0 = [ux0, uy0, w0]\n  // p1 = [ux1, uy1, w1]\n  function zoom(p0, p1) {\n    var ux0 = p0[0], uy0 = p0[1], w0 = p0[2],\n        ux1 = p1[0], uy1 = p1[1], w1 = p1[2],\n        dx = ux1 - ux0,\n        dy = uy1 - uy0,\n        d2 = dx * dx + dy * dy,\n        i,\n        S;\n\n    // Special case for u0 ≅ u1.\n    if (d2 < epsilon2) {\n      S = Math.log(w1 / w0) / rho;\n      i = function(t) {\n        return [\n          ux0 + t * dx,\n          uy0 + t * dy,\n          w0 * Math.exp(rho * t * S)\n        ];\n      }\n    }\n\n    // General case.\n    else {\n      var d1 = Math.sqrt(d2),\n          b0 = (w1 * w1 - w0 * w0 + rho4 * d2) / (2 * w0 * rho2 * d1),\n          b1 = (w1 * w1 - w0 * w0 - rho4 * d2) / (2 * w1 * rho2 * d1),\n          r0 = Math.log(Math.sqrt(b0 * b0 + 1) - b0),\n          r1 = Math.log(Math.sqrt(b1 * b1 + 1) - b1);\n      S = (r1 - r0) / rho;\n      i = function(t) {\n        var s = t * S,\n            coshr0 = cosh(r0),\n            u = w0 / (rho2 * d1) * (coshr0 * tanh(rho * s + r0) - sinh(r0));\n        return [\n          ux0 + u * dx,\n          uy0 + u * dy,\n          w0 * coshr0 / cosh(rho * s + r0)\n        ];\n      }\n    }\n\n    i.duration = S * 1000 * rho / Math.SQRT2;\n\n    return i;\n  }\n\n  zoom.rho = function(_) {\n    var _1 = Math.max(1e-3, +_), _2 = _1 * _1, _4 = _2 * _2;\n    return zoomRho(_1, _2, _4);\n  };\n\n  return zoom;\n})(Math.SQRT2, 2, 4));\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-path/src/index.js\":\n/*!***********************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-path/src/index.js ***!\n  \\***********************************************************/\n/*! exports provided: path */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _path_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./path.js */ \"./node_modules/d3/node_modules/d3-path/src/path.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"path\", function() { return _path_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-path/src/path.js\":\n/*!**********************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-path/src/path.js ***!\n  \\**********************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\nconst pi = Math.PI,\n    tau = 2 * pi,\n    epsilon = 1e-6,\n    tauEpsilon = tau - epsilon;\n\nfunction Path() {\n  this._x0 = this._y0 = // start of current subpath\n  this._x1 = this._y1 = null; // end of current subpath\n  this._ = \"\";\n}\n\nfunction path() {\n  return new Path;\n}\n\nPath.prototype = path.prototype = {\n  constructor: Path,\n  moveTo: function(x, y) {\n    this._ += \"M\" + (this._x0 = this._x1 = +x) + \",\" + (this._y0 = this._y1 = +y);\n  },\n  closePath: function() {\n    if (this._x1 !== null) {\n      this._x1 = this._x0, this._y1 = this._y0;\n      this._ += \"Z\";\n    }\n  },\n  lineTo: function(x, y) {\n    this._ += \"L\" + (this._x1 = +x) + \",\" + (this._y1 = +y);\n  },\n  quadraticCurveTo: function(x1, y1, x, y) {\n    this._ += \"Q\" + (+x1) + \",\" + (+y1) + \",\" + (this._x1 = +x) + \",\" + (this._y1 = +y);\n  },\n  bezierCurveTo: function(x1, y1, x2, y2, x, y) {\n    this._ += \"C\" + (+x1) + \",\" + (+y1) + \",\" + (+x2) + \",\" + (+y2) + \",\" + (this._x1 = +x) + \",\" + (this._y1 = +y);\n  },\n  arcTo: function(x1, y1, x2, y2, r) {\n    x1 = +x1, y1 = +y1, x2 = +x2, y2 = +y2, r = +r;\n    var x0 = this._x1,\n        y0 = this._y1,\n        x21 = x2 - x1,\n        y21 = y2 - y1,\n        x01 = x0 - x1,\n        y01 = y0 - y1,\n        l01_2 = x01 * x01 + y01 * y01;\n\n    // Is the radius negative? Error.\n    if (r < 0) throw new Error(\"negative radius: \" + r);\n\n    // Is this path empty? Move to (x1,y1).\n    if (this._x1 === null) {\n      this._ += \"M\" + (this._x1 = x1) + \",\" + (this._y1 = y1);\n    }\n\n    // Or, is (x1,y1) coincident with (x0,y0)? Do nothing.\n    else if (!(l01_2 > epsilon));\n\n    // Or, are (x0,y0), (x1,y1) and (x2,y2) collinear?\n    // Equivalently, is (x1,y1) coincident with (x2,y2)?\n    // Or, is the radius zero? Line to (x1,y1).\n    else if (!(Math.abs(y01 * x21 - y21 * x01) > epsilon) || !r) {\n      this._ += \"L\" + (this._x1 = x1) + \",\" + (this._y1 = y1);\n    }\n\n    // Otherwise, draw an arc!\n    else {\n      var x20 = x2 - x0,\n          y20 = y2 - y0,\n          l21_2 = x21 * x21 + y21 * y21,\n          l20_2 = x20 * x20 + y20 * y20,\n          l21 = Math.sqrt(l21_2),\n          l01 = Math.sqrt(l01_2),\n          l = r * Math.tan((pi - Math.acos((l21_2 + l01_2 - l20_2) / (2 * l21 * l01))) / 2),\n          t01 = l / l01,\n          t21 = l / l21;\n\n      // If the start tangent is not coincident with (x0,y0), line to.\n      if (Math.abs(t01 - 1) > epsilon) {\n        this._ += \"L\" + (x1 + t01 * x01) + \",\" + (y1 + t01 * y01);\n      }\n\n      this._ += \"A\" + r + \",\" + r + \",0,0,\" + (+(y01 * x20 > x01 * y20)) + \",\" + (this._x1 = x1 + t21 * x21) + \",\" + (this._y1 = y1 + t21 * y21);\n    }\n  },\n  arc: function(x, y, r, a0, a1, ccw) {\n    x = +x, y = +y, r = +r, ccw = !!ccw;\n    var dx = r * Math.cos(a0),\n        dy = r * Math.sin(a0),\n        x0 = x + dx,\n        y0 = y + dy,\n        cw = 1 ^ ccw,\n        da = ccw ? a0 - a1 : a1 - a0;\n\n    // Is the radius negative? Error.\n    if (r < 0) throw new Error(\"negative radius: \" + r);\n\n    // Is this path empty? Move to (x0,y0).\n    if (this._x1 === null) {\n      this._ += \"M\" + x0 + \",\" + y0;\n    }\n\n    // Or, is (x0,y0) not coincident with the previous point? Line to (x0,y0).\n    else if (Math.abs(this._x1 - x0) > epsilon || Math.abs(this._y1 - y0) > epsilon) {\n      this._ += \"L\" + x0 + \",\" + y0;\n    }\n\n    // Is this arc empty? We’re done.\n    if (!r) return;\n\n    // Does the angle go the wrong way? Flip the direction.\n    if (da < 0) da = da % tau + tau;\n\n    // Is this a complete circle? Draw two arcs to complete the circle.\n    if (da > tauEpsilon) {\n      this._ += \"A\" + r + \",\" + r + \",0,1,\" + cw + \",\" + (x - dx) + \",\" + (y - dy) + \"A\" + r + \",\" + r + \",0,1,\" + cw + \",\" + (this._x1 = x0) + \",\" + (this._y1 = y0);\n    }\n\n    // Is this arc non-empty? Draw an arc!\n    else if (da > epsilon) {\n      this._ += \"A\" + r + \",\" + r + \",0,\" + (+(da >= pi)) + \",\" + cw + \",\" + (this._x1 = x + r * Math.cos(a1)) + \",\" + (this._y1 = y + r * Math.sin(a1));\n    }\n  },\n  rect: function(x, y, w, h) {\n    this._ += \"M\" + (this._x0 = this._x1 = +x) + \",\" + (this._y0 = this._y1 = +y) + \"h\" + (+w) + \"v\" + (+h) + \"h\" + (-w) + \"Z\";\n  },\n  toString: function() {\n    return this._;\n  }\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (path);\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-quadtree/src/add.js\":\n/*!*************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-quadtree/src/add.js ***!\n  \\*************************************************************/\n/*! exports provided: default, addAll */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"addAll\", function() { return addAll; });\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(d) {\n  const x = +this._x.call(null, d),\n      y = +this._y.call(null, d);\n  return add(this.cover(x, y), x, y, d);\n});\n\nfunction add(tree, x, y, d) {\n  if (isNaN(x) || isNaN(y)) return tree; // ignore invalid points\n\n  var parent,\n      node = tree._root,\n      leaf = {data: d},\n      x0 = tree._x0,\n      y0 = tree._y0,\n      x1 = tree._x1,\n      y1 = tree._y1,\n      xm,\n      ym,\n      xp,\n      yp,\n      right,\n      bottom,\n      i,\n      j;\n\n  // If the tree is empty, initialize the root as a leaf.\n  if (!node) return tree._root = leaf, tree;\n\n  // Find the existing leaf for the new point, or add it.\n  while (node.length) {\n    if (right = x >= (xm = (x0 + x1) / 2)) x0 = xm; else x1 = xm;\n    if (bottom = y >= (ym = (y0 + y1) / 2)) y0 = ym; else y1 = ym;\n    if (parent = node, !(node = node[i = bottom << 1 | right])) return parent[i] = leaf, tree;\n  }\n\n  // Is the new point is exactly coincident with the existing point?\n  xp = +tree._x.call(null, node.data);\n  yp = +tree._y.call(null, node.data);\n  if (x === xp && y === yp) return leaf.next = node, parent ? parent[i] = leaf : tree._root = leaf, tree;\n\n  // Otherwise, split the leaf node until the old and new point are separated.\n  do {\n    parent = parent ? parent[i] = new Array(4) : tree._root = new Array(4);\n    if (right = x >= (xm = (x0 + x1) / 2)) x0 = xm; else x1 = xm;\n    if (bottom = y >= (ym = (y0 + y1) / 2)) y0 = ym; else y1 = ym;\n  } while ((i = bottom << 1 | right) === (j = (yp >= ym) << 1 | (xp >= xm)));\n  return parent[j] = node, parent[i] = leaf, tree;\n}\n\nfunction addAll(data) {\n  var d, i, n = data.length,\n      x,\n      y,\n      xz = new Array(n),\n      yz = new Array(n),\n      x0 = Infinity,\n      y0 = Infinity,\n      x1 = -Infinity,\n      y1 = -Infinity;\n\n  // Compute the points and their extent.\n  for (i = 0; i < n; ++i) {\n    if (isNaN(x = +this._x.call(null, d = data[i])) || isNaN(y = +this._y.call(null, d))) continue;\n    xz[i] = x;\n    yz[i] = y;\n    if (x < x0) x0 = x;\n    if (x > x1) x1 = x;\n    if (y < y0) y0 = y;\n    if (y > y1) y1 = y;\n  }\n\n  // If there were no (valid) points, abort.\n  if (x0 > x1 || y0 > y1) return this;\n\n  // Expand the tree to cover the new points.\n  this.cover(x0, y0).cover(x1, y1);\n\n  // Add the new points.\n  for (i = 0; i < n; ++i) {\n    add(this, xz[i], yz[i], data[i]);\n  }\n\n  return this;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-quadtree/src/cover.js\":\n/*!***************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-quadtree/src/cover.js ***!\n  \\***************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(x, y) {\n  if (isNaN(x = +x) || isNaN(y = +y)) return this; // ignore invalid points\n\n  var x0 = this._x0,\n      y0 = this._y0,\n      x1 = this._x1,\n      y1 = this._y1;\n\n  // If the quadtree has no extent, initialize them.\n  // Integer extent are necessary so that if we later double the extent,\n  // the existing quadrant boundaries don’t change due to floating point error!\n  if (isNaN(x0)) {\n    x1 = (x0 = Math.floor(x)) + 1;\n    y1 = (y0 = Math.floor(y)) + 1;\n  }\n\n  // Otherwise, double repeatedly to cover.\n  else {\n    var z = x1 - x0 || 1,\n        node = this._root,\n        parent,\n        i;\n\n    while (x0 > x || x >= x1 || y0 > y || y >= y1) {\n      i = (y < y0) << 1 | (x < x0);\n      parent = new Array(4), parent[i] = node, node = parent, z *= 2;\n      switch (i) {\n        case 0: x1 = x0 + z, y1 = y0 + z; break;\n        case 1: x0 = x1 - z, y1 = y0 + z; break;\n        case 2: x1 = x0 + z, y0 = y1 - z; break;\n        case 3: x0 = x1 - z, y0 = y1 - z; break;\n      }\n    }\n\n    if (this._root && this._root.length) this._root = node;\n  }\n\n  this._x0 = x0;\n  this._y0 = y0;\n  this._x1 = x1;\n  this._y1 = y1;\n  return this;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-quadtree/src/data.js\":\n/*!**************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-quadtree/src/data.js ***!\n  \\**************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  var data = [];\n  this.visit(function(node) {\n    if (!node.length) do data.push(node.data); while (node = node.next)\n  });\n  return data;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-quadtree/src/extent.js\":\n/*!****************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-quadtree/src/extent.js ***!\n  \\****************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(_) {\n  return arguments.length\n      ? this.cover(+_[0][0], +_[0][1]).cover(+_[1][0], +_[1][1])\n      : isNaN(this._x0) ? undefined : [[this._x0, this._y0], [this._x1, this._y1]];\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-quadtree/src/find.js\":\n/*!**************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-quadtree/src/find.js ***!\n  \\**************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _quad_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./quad.js */ \"./node_modules/d3/node_modules/d3-quadtree/src/quad.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(x, y, radius) {\n  var data,\n      x0 = this._x0,\n      y0 = this._y0,\n      x1,\n      y1,\n      x2,\n      y2,\n      x3 = this._x1,\n      y3 = this._y1,\n      quads = [],\n      node = this._root,\n      q,\n      i;\n\n  if (node) quads.push(new _quad_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"](node, x0, y0, x3, y3));\n  if (radius == null) radius = Infinity;\n  else {\n    x0 = x - radius, y0 = y - radius;\n    x3 = x + radius, y3 = y + radius;\n    radius *= radius;\n  }\n\n  while (q = quads.pop()) {\n\n    // Stop searching if this quadrant can’t contain a closer node.\n    if (!(node = q.node)\n        || (x1 = q.x0) > x3\n        || (y1 = q.y0) > y3\n        || (x2 = q.x1) < x0\n        || (y2 = q.y1) < y0) continue;\n\n    // Bisect the current quadrant.\n    if (node.length) {\n      var xm = (x1 + x2) / 2,\n          ym = (y1 + y2) / 2;\n\n      quads.push(\n        new _quad_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"](node[3], xm, ym, x2, y2),\n        new _quad_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"](node[2], x1, ym, xm, y2),\n        new _quad_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"](node[1], xm, y1, x2, ym),\n        new _quad_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"](node[0], x1, y1, xm, ym)\n      );\n\n      // Visit the closest quadrant first.\n      if (i = (y >= ym) << 1 | (x >= xm)) {\n        q = quads[quads.length - 1];\n        quads[quads.length - 1] = quads[quads.length - 1 - i];\n        quads[quads.length - 1 - i] = q;\n      }\n    }\n\n    // Visit this point. (Visiting coincident points isn’t necessary!)\n    else {\n      var dx = x - +this._x.call(null, node.data),\n          dy = y - +this._y.call(null, node.data),\n          d2 = dx * dx + dy * dy;\n      if (d2 < radius) {\n        var d = Math.sqrt(radius = d2);\n        x0 = x - d, y0 = y - d;\n        x3 = x + d, y3 = y + d;\n        data = node.data;\n      }\n    }\n  }\n\n  return data;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-quadtree/src/index.js\":\n/*!***************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-quadtree/src/index.js ***!\n  \\***************************************************************/\n/*! exports provided: quadtree */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _quadtree_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./quadtree.js */ \"./node_modules/d3/node_modules/d3-quadtree/src/quadtree.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"quadtree\", function() { return _quadtree_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-quadtree/src/quad.js\":\n/*!**************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-quadtree/src/quad.js ***!\n  \\**************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(node, x0, y0, x1, y1) {\n  this.node = node;\n  this.x0 = x0;\n  this.y0 = y0;\n  this.x1 = x1;\n  this.y1 = y1;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-quadtree/src/quadtree.js\":\n/*!******************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-quadtree/src/quadtree.js ***!\n  \\******************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return quadtree; });\n/* harmony import */ var _add_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./add.js */ \"./node_modules/d3/node_modules/d3-quadtree/src/add.js\");\n/* harmony import */ var _cover_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./cover.js */ \"./node_modules/d3/node_modules/d3-quadtree/src/cover.js\");\n/* harmony import */ var _data_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./data.js */ \"./node_modules/d3/node_modules/d3-quadtree/src/data.js\");\n/* harmony import */ var _extent_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./extent.js */ \"./node_modules/d3/node_modules/d3-quadtree/src/extent.js\");\n/* harmony import */ var _find_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./find.js */ \"./node_modules/d3/node_modules/d3-quadtree/src/find.js\");\n/* harmony import */ var _remove_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./remove.js */ \"./node_modules/d3/node_modules/d3-quadtree/src/remove.js\");\n/* harmony import */ var _root_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./root.js */ \"./node_modules/d3/node_modules/d3-quadtree/src/root.js\");\n/* harmony import */ var _size_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./size.js */ \"./node_modules/d3/node_modules/d3-quadtree/src/size.js\");\n/* harmony import */ var _visit_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./visit.js */ \"./node_modules/d3/node_modules/d3-quadtree/src/visit.js\");\n/* harmony import */ var _visitAfter_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./visitAfter.js */ \"./node_modules/d3/node_modules/d3-quadtree/src/visitAfter.js\");\n/* harmony import */ var _x_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./x.js */ \"./node_modules/d3/node_modules/d3-quadtree/src/x.js\");\n/* harmony import */ var _y_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./y.js */ \"./node_modules/d3/node_modules/d3-quadtree/src/y.js\");\n\n\n\n\n\n\n\n\n\n\n\n\n\nfunction quadtree(nodes, x, y) {\n  var tree = new Quadtree(x == null ? _x_js__WEBPACK_IMPORTED_MODULE_10__[\"defaultX\"] : x, y == null ? _y_js__WEBPACK_IMPORTED_MODULE_11__[\"defaultY\"] : y, NaN, NaN, NaN, NaN);\n  return nodes == null ? tree : tree.addAll(nodes);\n}\n\nfunction Quadtree(x, y, x0, y0, x1, y1) {\n  this._x = x;\n  this._y = y;\n  this._x0 = x0;\n  this._y0 = y0;\n  this._x1 = x1;\n  this._y1 = y1;\n  this._root = undefined;\n}\n\nfunction leaf_copy(leaf) {\n  var copy = {data: leaf.data}, next = copy;\n  while (leaf = leaf.next) next = next.next = {data: leaf.data};\n  return copy;\n}\n\nvar treeProto = quadtree.prototype = Quadtree.prototype;\n\ntreeProto.copy = function() {\n  var copy = new Quadtree(this._x, this._y, this._x0, this._y0, this._x1, this._y1),\n      node = this._root,\n      nodes,\n      child;\n\n  if (!node) return copy;\n\n  if (!node.length) return copy._root = leaf_copy(node), copy;\n\n  nodes = [{source: node, target: copy._root = new Array(4)}];\n  while (node = nodes.pop()) {\n    for (var i = 0; i < 4; ++i) {\n      if (child = node.source[i]) {\n        if (child.length) nodes.push({source: child, target: node.target[i] = new Array(4)});\n        else node.target[i] = leaf_copy(child);\n      }\n    }\n  }\n\n  return copy;\n};\n\ntreeProto.add = _add_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"];\ntreeProto.addAll = _add_js__WEBPACK_IMPORTED_MODULE_0__[\"addAll\"];\ntreeProto.cover = _cover_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"];\ntreeProto.data = _data_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"];\ntreeProto.extent = _extent_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"];\ntreeProto.find = _find_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"];\ntreeProto.remove = _remove_js__WEBPACK_IMPORTED_MODULE_5__[\"default\"];\ntreeProto.removeAll = _remove_js__WEBPACK_IMPORTED_MODULE_5__[\"removeAll\"];\ntreeProto.root = _root_js__WEBPACK_IMPORTED_MODULE_6__[\"default\"];\ntreeProto.size = _size_js__WEBPACK_IMPORTED_MODULE_7__[\"default\"];\ntreeProto.visit = _visit_js__WEBPACK_IMPORTED_MODULE_8__[\"default\"];\ntreeProto.visitAfter = _visitAfter_js__WEBPACK_IMPORTED_MODULE_9__[\"default\"];\ntreeProto.x = _x_js__WEBPACK_IMPORTED_MODULE_10__[\"default\"];\ntreeProto.y = _y_js__WEBPACK_IMPORTED_MODULE_11__[\"default\"];\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-quadtree/src/remove.js\":\n/*!****************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-quadtree/src/remove.js ***!\n  \\****************************************************************/\n/*! exports provided: default, removeAll */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"removeAll\", function() { return removeAll; });\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(d) {\n  if (isNaN(x = +this._x.call(null, d)) || isNaN(y = +this._y.call(null, d))) return this; // ignore invalid points\n\n  var parent,\n      node = this._root,\n      retainer,\n      previous,\n      next,\n      x0 = this._x0,\n      y0 = this._y0,\n      x1 = this._x1,\n      y1 = this._y1,\n      x,\n      y,\n      xm,\n      ym,\n      right,\n      bottom,\n      i,\n      j;\n\n  // If the tree is empty, initialize the root as a leaf.\n  if (!node) return this;\n\n  // Find the leaf node for the point.\n  // While descending, also retain the deepest parent with a non-removed sibling.\n  if (node.length) while (true) {\n    if (right = x >= (xm = (x0 + x1) / 2)) x0 = xm; else x1 = xm;\n    if (bottom = y >= (ym = (y0 + y1) / 2)) y0 = ym; else y1 = ym;\n    if (!(parent = node, node = node[i = bottom << 1 | right])) return this;\n    if (!node.length) break;\n    if (parent[(i + 1) & 3] || parent[(i + 2) & 3] || parent[(i + 3) & 3]) retainer = parent, j = i;\n  }\n\n  // Find the point to remove.\n  while (node.data !== d) if (!(previous = node, node = node.next)) return this;\n  if (next = node.next) delete node.next;\n\n  // If there are multiple coincident points, remove just the point.\n  if (previous) return (next ? previous.next = next : delete previous.next), this;\n\n  // If this is the root point, remove it.\n  if (!parent) return this._root = next, this;\n\n  // Remove this leaf.\n  next ? parent[i] = next : delete parent[i];\n\n  // If the parent now contains exactly one leaf, collapse superfluous parents.\n  if ((node = parent[0] || parent[1] || parent[2] || parent[3])\n      && node === (parent[3] || parent[2] || parent[1] || parent[0])\n      && !node.length) {\n    if (retainer) retainer[j] = node;\n    else this._root = node;\n  }\n\n  return this;\n});\n\nfunction removeAll(data) {\n  for (var i = 0, n = data.length; i < n; ++i) this.remove(data[i]);\n  return this;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-quadtree/src/root.js\":\n/*!**************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-quadtree/src/root.js ***!\n  \\**************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  return this._root;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-quadtree/src/size.js\":\n/*!**************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-quadtree/src/size.js ***!\n  \\**************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  var size = 0;\n  this.visit(function(node) {\n    if (!node.length) do ++size; while (node = node.next)\n  });\n  return size;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-quadtree/src/visit.js\":\n/*!***************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-quadtree/src/visit.js ***!\n  \\***************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _quad_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./quad.js */ \"./node_modules/d3/node_modules/d3-quadtree/src/quad.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(callback) {\n  var quads = [], q, node = this._root, child, x0, y0, x1, y1;\n  if (node) quads.push(new _quad_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"](node, this._x0, this._y0, this._x1, this._y1));\n  while (q = quads.pop()) {\n    if (!callback(node = q.node, x0 = q.x0, y0 = q.y0, x1 = q.x1, y1 = q.y1) && node.length) {\n      var xm = (x0 + x1) / 2, ym = (y0 + y1) / 2;\n      if (child = node[3]) quads.push(new _quad_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"](child, xm, ym, x1, y1));\n      if (child = node[2]) quads.push(new _quad_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"](child, x0, ym, xm, y1));\n      if (child = node[1]) quads.push(new _quad_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"](child, xm, y0, x1, ym));\n      if (child = node[0]) quads.push(new _quad_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"](child, x0, y0, xm, ym));\n    }\n  }\n  return this;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-quadtree/src/visitAfter.js\":\n/*!********************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-quadtree/src/visitAfter.js ***!\n  \\********************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _quad_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./quad.js */ \"./node_modules/d3/node_modules/d3-quadtree/src/quad.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(callback) {\n  var quads = [], next = [], q;\n  if (this._root) quads.push(new _quad_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"](this._root, this._x0, this._y0, this._x1, this._y1));\n  while (q = quads.pop()) {\n    var node = q.node;\n    if (node.length) {\n      var child, x0 = q.x0, y0 = q.y0, x1 = q.x1, y1 = q.y1, xm = (x0 + x1) / 2, ym = (y0 + y1) / 2;\n      if (child = node[0]) quads.push(new _quad_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"](child, x0, y0, xm, ym));\n      if (child = node[1]) quads.push(new _quad_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"](child, xm, y0, x1, ym));\n      if (child = node[2]) quads.push(new _quad_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"](child, x0, ym, xm, y1));\n      if (child = node[3]) quads.push(new _quad_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"](child, xm, ym, x1, y1));\n    }\n    next.push(q);\n  }\n  while (q = next.pop()) {\n    callback(q.node, q.x0, q.y0, q.x1, q.y1);\n  }\n  return this;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-quadtree/src/x.js\":\n/*!***********************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-quadtree/src/x.js ***!\n  \\***********************************************************/\n/*! exports provided: defaultX, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"defaultX\", function() { return defaultX; });\nfunction defaultX(d) {\n  return d[0];\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(_) {\n  return arguments.length ? (this._x = _, this) : this._x;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-quadtree/src/y.js\":\n/*!***********************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-quadtree/src/y.js ***!\n  \\***********************************************************/\n/*! exports provided: defaultY, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"defaultY\", function() { return defaultY; });\nfunction defaultY(d) {\n  return d[1];\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(_) {\n  return arguments.length ? (this._y = _, this) : this._y;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-selection/src/array.js\":\n/*!****************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-selection/src/array.js ***!\n  \\****************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return array; });\n// Given something array like (or null), returns something that is strictly an\n// array. This is used to ensure that array-like objects passed to d3.selectAll\n// or selection.selectAll are converted into proper arrays when creating a\n// selection; we don’t ever want to create a selection backed by a live\n// HTMLCollection or NodeList. However, note that selection.selectAll will use a\n// static NodeList as a group, since it safely derived from querySelectorAll.\nfunction array(x) {\n  return x == null ? [] : Array.isArray(x) ? x : Array.from(x);\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-selection/src/constant.js\":\n/*!*******************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-selection/src/constant.js ***!\n  \\*******************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(x) {\n  return function() {\n    return x;\n  };\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-selection/src/create.js\":\n/*!*****************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-selection/src/create.js ***!\n  \\*****************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _creator_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./creator.js */ \"./node_modules/d3/node_modules/d3-selection/src/creator.js\");\n/* harmony import */ var _select_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./select.js */ \"./node_modules/d3/node_modules/d3-selection/src/select.js\");\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(name) {\n  return Object(_select_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(Object(_creator_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(name).call(document.documentElement));\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-selection/src/creator.js\":\n/*!******************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-selection/src/creator.js ***!\n  \\******************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _namespace_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./namespace.js */ \"./node_modules/d3/node_modules/d3-selection/src/namespace.js\");\n/* harmony import */ var _namespaces_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./namespaces.js */ \"./node_modules/d3/node_modules/d3-selection/src/namespaces.js\");\n\n\n\nfunction creatorInherit(name) {\n  return function() {\n    var document = this.ownerDocument,\n        uri = this.namespaceURI;\n    return uri === _namespaces_js__WEBPACK_IMPORTED_MODULE_1__[\"xhtml\"] && document.documentElement.namespaceURI === _namespaces_js__WEBPACK_IMPORTED_MODULE_1__[\"xhtml\"]\n        ? document.createElement(name)\n        : document.createElementNS(uri, name);\n  };\n}\n\nfunction creatorFixed(fullname) {\n  return function() {\n    return this.ownerDocument.createElementNS(fullname.space, fullname.local);\n  };\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(name) {\n  var fullname = Object(_namespace_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(name);\n  return (fullname.local\n      ? creatorFixed\n      : creatorInherit)(fullname);\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-selection/src/index.js\":\n/*!****************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-selection/src/index.js ***!\n  \\****************************************************************/\n/*! exports provided: create, creator, local, matcher, namespace, namespaces, pointer, pointers, select, selectAll, selection, selector, selectorAll, style, window */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _create_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./create.js */ \"./node_modules/d3/node_modules/d3-selection/src/create.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"create\", function() { return _create_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n/* harmony import */ var _creator_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./creator.js */ \"./node_modules/d3/node_modules/d3-selection/src/creator.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"creator\", function() { return _creator_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"]; });\n\n/* harmony import */ var _local_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./local.js */ \"./node_modules/d3/node_modules/d3-selection/src/local.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"local\", function() { return _local_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"]; });\n\n/* harmony import */ var _matcher_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./matcher.js */ \"./node_modules/d3/node_modules/d3-selection/src/matcher.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"matcher\", function() { return _matcher_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"]; });\n\n/* harmony import */ var _namespace_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./namespace.js */ \"./node_modules/d3/node_modules/d3-selection/src/namespace.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"namespace\", function() { return _namespace_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"]; });\n\n/* harmony import */ var _namespaces_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./namespaces.js */ \"./node_modules/d3/node_modules/d3-selection/src/namespaces.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"namespaces\", function() { return _namespaces_js__WEBPACK_IMPORTED_MODULE_5__[\"default\"]; });\n\n/* harmony import */ var _pointer_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./pointer.js */ \"./node_modules/d3/node_modules/d3-selection/src/pointer.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"pointer\", function() { return _pointer_js__WEBPACK_IMPORTED_MODULE_6__[\"default\"]; });\n\n/* harmony import */ var _pointers_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./pointers.js */ \"./node_modules/d3/node_modules/d3-selection/src/pointers.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"pointers\", function() { return _pointers_js__WEBPACK_IMPORTED_MODULE_7__[\"default\"]; });\n\n/* harmony import */ var _select_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./select.js */ \"./node_modules/d3/node_modules/d3-selection/src/select.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"select\", function() { return _select_js__WEBPACK_IMPORTED_MODULE_8__[\"default\"]; });\n\n/* harmony import */ var _selectAll_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./selectAll.js */ \"./node_modules/d3/node_modules/d3-selection/src/selectAll.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"selectAll\", function() { return _selectAll_js__WEBPACK_IMPORTED_MODULE_9__[\"default\"]; });\n\n/* harmony import */ var _selection_index_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./selection/index.js */ \"./node_modules/d3/node_modules/d3-selection/src/selection/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"selection\", function() { return _selection_index_js__WEBPACK_IMPORTED_MODULE_10__[\"default\"]; });\n\n/* harmony import */ var _selector_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./selector.js */ \"./node_modules/d3/node_modules/d3-selection/src/selector.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"selector\", function() { return _selector_js__WEBPACK_IMPORTED_MODULE_11__[\"default\"]; });\n\n/* harmony import */ var _selectorAll_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./selectorAll.js */ \"./node_modules/d3/node_modules/d3-selection/src/selectorAll.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"selectorAll\", function() { return _selectorAll_js__WEBPACK_IMPORTED_MODULE_12__[\"default\"]; });\n\n/* harmony import */ var _selection_style_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./selection/style.js */ \"./node_modules/d3/node_modules/d3-selection/src/selection/style.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"style\", function() { return _selection_style_js__WEBPACK_IMPORTED_MODULE_13__[\"styleValue\"]; });\n\n/* harmony import */ var _window_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./window.js */ \"./node_modules/d3/node_modules/d3-selection/src/window.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"window\", function() { return _window_js__WEBPACK_IMPORTED_MODULE_14__[\"default\"]; });\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-selection/src/local.js\":\n/*!****************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-selection/src/local.js ***!\n  \\****************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return local; });\nvar nextId = 0;\n\nfunction local() {\n  return new Local;\n}\n\nfunction Local() {\n  this._ = \"@\" + (++nextId).toString(36);\n}\n\nLocal.prototype = local.prototype = {\n  constructor: Local,\n  get: function(node) {\n    var id = this._;\n    while (!(id in node)) if (!(node = node.parentNode)) return;\n    return node[id];\n  },\n  set: function(node, value) {\n    return node[this._] = value;\n  },\n  remove: function(node) {\n    return this._ in node && delete node[this._];\n  },\n  toString: function() {\n    return this._;\n  }\n};\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-selection/src/matcher.js\":\n/*!******************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-selection/src/matcher.js ***!\n  \\******************************************************************/\n/*! exports provided: default, childMatcher */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"childMatcher\", function() { return childMatcher; });\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(selector) {\n  return function() {\n    return this.matches(selector);\n  };\n});\n\nfunction childMatcher(selector) {\n  return function(node) {\n    return node.matches(selector);\n  };\n}\n\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-selection/src/namespace.js\":\n/*!********************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-selection/src/namespace.js ***!\n  \\********************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _namespaces_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./namespaces.js */ \"./node_modules/d3/node_modules/d3-selection/src/namespaces.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(name) {\n  var prefix = name += \"\", i = prefix.indexOf(\":\");\n  if (i >= 0 && (prefix = name.slice(0, i)) !== \"xmlns\") name = name.slice(i + 1);\n  return _namespaces_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].hasOwnProperty(prefix) ? {space: _namespaces_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"][prefix], local: name} : name; // eslint-disable-line no-prototype-builtins\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-selection/src/namespaces.js\":\n/*!*********************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-selection/src/namespaces.js ***!\n  \\*********************************************************************/\n/*! exports provided: xhtml, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"xhtml\", function() { return xhtml; });\nvar xhtml = \"http://www.w3.org/1999/xhtml\";\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n  svg: \"http://www.w3.org/2000/svg\",\n  xhtml: xhtml,\n  xlink: \"http://www.w3.org/1999/xlink\",\n  xml: \"http://www.w3.org/XML/1998/namespace\",\n  xmlns: \"http://www.w3.org/2000/xmlns/\"\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-selection/src/pointer.js\":\n/*!******************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-selection/src/pointer.js ***!\n  \\******************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _sourceEvent_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./sourceEvent.js */ \"./node_modules/d3/node_modules/d3-selection/src/sourceEvent.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(event, node) {\n  event = Object(_sourceEvent_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(event);\n  if (node === undefined) node = event.currentTarget;\n  if (node) {\n    var svg = node.ownerSVGElement || node;\n    if (svg.createSVGPoint) {\n      var point = svg.createSVGPoint();\n      point.x = event.clientX, point.y = event.clientY;\n      point = point.matrixTransform(node.getScreenCTM().inverse());\n      return [point.x, point.y];\n    }\n    if (node.getBoundingClientRect) {\n      var rect = node.getBoundingClientRect();\n      return [event.clientX - rect.left - node.clientLeft, event.clientY - rect.top - node.clientTop];\n    }\n  }\n  return [event.pageX, event.pageY];\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-selection/src/pointers.js\":\n/*!*******************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-selection/src/pointers.js ***!\n  \\*******************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _pointer_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./pointer.js */ \"./node_modules/d3/node_modules/d3-selection/src/pointer.js\");\n/* harmony import */ var _sourceEvent_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./sourceEvent.js */ \"./node_modules/d3/node_modules/d3-selection/src/sourceEvent.js\");\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(events, node) {\n  if (events.target) { // i.e., instanceof Event, not TouchList or iterable\n    events = Object(_sourceEvent_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(events);\n    if (node === undefined) node = events.currentTarget;\n    events = events.touches || [events];\n  }\n  return Array.from(events, event => Object(_pointer_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(event, node));\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-selection/src/select.js\":\n/*!*****************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-selection/src/select.js ***!\n  \\*****************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _selection_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./selection/index.js */ \"./node_modules/d3/node_modules/d3-selection/src/selection/index.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(selector) {\n  return typeof selector === \"string\"\n      ? new _selection_index_js__WEBPACK_IMPORTED_MODULE_0__[\"Selection\"]([[document.querySelector(selector)]], [document.documentElement])\n      : new _selection_index_js__WEBPACK_IMPORTED_MODULE_0__[\"Selection\"]([[selector]], _selection_index_js__WEBPACK_IMPORTED_MODULE_0__[\"root\"]);\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-selection/src/selectAll.js\":\n/*!********************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-selection/src/selectAll.js ***!\n  \\********************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _array_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./array.js */ \"./node_modules/d3/node_modules/d3-selection/src/array.js\");\n/* harmony import */ var _selection_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./selection/index.js */ \"./node_modules/d3/node_modules/d3-selection/src/selection/index.js\");\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(selector) {\n  return typeof selector === \"string\"\n      ? new _selection_index_js__WEBPACK_IMPORTED_MODULE_1__[\"Selection\"]([document.querySelectorAll(selector)], [document.documentElement])\n      : new _selection_index_js__WEBPACK_IMPORTED_MODULE_1__[\"Selection\"]([Object(_array_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(selector)], _selection_index_js__WEBPACK_IMPORTED_MODULE_1__[\"root\"]);\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-selection/src/selection/append.js\":\n/*!***************************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-selection/src/selection/append.js ***!\n  \\***************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _creator_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../creator.js */ \"./node_modules/d3/node_modules/d3-selection/src/creator.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(name) {\n  var create = typeof name === \"function\" ? name : Object(_creator_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(name);\n  return this.select(function() {\n    return this.appendChild(create.apply(this, arguments));\n  });\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-selection/src/selection/attr.js\":\n/*!*************************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-selection/src/selection/attr.js ***!\n  \\*************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _namespace_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../namespace.js */ \"./node_modules/d3/node_modules/d3-selection/src/namespace.js\");\n\n\nfunction attrRemove(name) {\n  return function() {\n    this.removeAttribute(name);\n  };\n}\n\nfunction attrRemoveNS(fullname) {\n  return function() {\n    this.removeAttributeNS(fullname.space, fullname.local);\n  };\n}\n\nfunction attrConstant(name, value) {\n  return function() {\n    this.setAttribute(name, value);\n  };\n}\n\nfunction attrConstantNS(fullname, value) {\n  return function() {\n    this.setAttributeNS(fullname.space, fullname.local, value);\n  };\n}\n\nfunction attrFunction(name, value) {\n  return function() {\n    var v = value.apply(this, arguments);\n    if (v == null) this.removeAttribute(name);\n    else this.setAttribute(name, v);\n  };\n}\n\nfunction attrFunctionNS(fullname, value) {\n  return function() {\n    var v = value.apply(this, arguments);\n    if (v == null) this.removeAttributeNS(fullname.space, fullname.local);\n    else this.setAttributeNS(fullname.space, fullname.local, v);\n  };\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(name, value) {\n  var fullname = Object(_namespace_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(name);\n\n  if (arguments.length < 2) {\n    var node = this.node();\n    return fullname.local\n        ? node.getAttributeNS(fullname.space, fullname.local)\n        : node.getAttribute(fullname);\n  }\n\n  return this.each((value == null\n      ? (fullname.local ? attrRemoveNS : attrRemove) : (typeof value === \"function\"\n      ? (fullname.local ? attrFunctionNS : attrFunction)\n      : (fullname.local ? attrConstantNS : attrConstant)))(fullname, value));\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-selection/src/selection/call.js\":\n/*!*************************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-selection/src/selection/call.js ***!\n  \\*************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  var callback = arguments[0];\n  arguments[0] = this;\n  callback.apply(null, arguments);\n  return this;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-selection/src/selection/classed.js\":\n/*!****************************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-selection/src/selection/classed.js ***!\n  \\****************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\nfunction classArray(string) {\n  return string.trim().split(/^|\\s+/);\n}\n\nfunction classList(node) {\n  return node.classList || new ClassList(node);\n}\n\nfunction ClassList(node) {\n  this._node = node;\n  this._names = classArray(node.getAttribute(\"class\") || \"\");\n}\n\nClassList.prototype = {\n  add: function(name) {\n    var i = this._names.indexOf(name);\n    if (i < 0) {\n      this._names.push(name);\n      this._node.setAttribute(\"class\", this._names.join(\" \"));\n    }\n  },\n  remove: function(name) {\n    var i = this._names.indexOf(name);\n    if (i >= 0) {\n      this._names.splice(i, 1);\n      this._node.setAttribute(\"class\", this._names.join(\" \"));\n    }\n  },\n  contains: function(name) {\n    return this._names.indexOf(name) >= 0;\n  }\n};\n\nfunction classedAdd(node, names) {\n  var list = classList(node), i = -1, n = names.length;\n  while (++i < n) list.add(names[i]);\n}\n\nfunction classedRemove(node, names) {\n  var list = classList(node), i = -1, n = names.length;\n  while (++i < n) list.remove(names[i]);\n}\n\nfunction classedTrue(names) {\n  return function() {\n    classedAdd(this, names);\n  };\n}\n\nfunction classedFalse(names) {\n  return function() {\n    classedRemove(this, names);\n  };\n}\n\nfunction classedFunction(names, value) {\n  return function() {\n    (value.apply(this, arguments) ? classedAdd : classedRemove)(this, names);\n  };\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(name, value) {\n  var names = classArray(name + \"\");\n\n  if (arguments.length < 2) {\n    var list = classList(this.node()), i = -1, n = names.length;\n    while (++i < n) if (!list.contains(names[i])) return false;\n    return true;\n  }\n\n  return this.each((typeof value === \"function\"\n      ? classedFunction : value\n      ? classedTrue\n      : classedFalse)(names, value));\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-selection/src/selection/clone.js\":\n/*!**************************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-selection/src/selection/clone.js ***!\n  \\**************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\nfunction selection_cloneShallow() {\n  var clone = this.cloneNode(false), parent = this.parentNode;\n  return parent ? parent.insertBefore(clone, this.nextSibling) : clone;\n}\n\nfunction selection_cloneDeep() {\n  var clone = this.cloneNode(true), parent = this.parentNode;\n  return parent ? parent.insertBefore(clone, this.nextSibling) : clone;\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(deep) {\n  return this.select(deep ? selection_cloneDeep : selection_cloneShallow);\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-selection/src/selection/data.js\":\n/*!*************************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-selection/src/selection/data.js ***!\n  \\*************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./index.js */ \"./node_modules/d3/node_modules/d3-selection/src/selection/index.js\");\n/* harmony import */ var _enter_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./enter.js */ \"./node_modules/d3/node_modules/d3-selection/src/selection/enter.js\");\n/* harmony import */ var _constant_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../constant.js */ \"./node_modules/d3/node_modules/d3-selection/src/constant.js\");\n\n\n\n\nfunction bindIndex(parent, group, enter, update, exit, data) {\n  var i = 0,\n      node,\n      groupLength = group.length,\n      dataLength = data.length;\n\n  // Put any non-null nodes that fit into update.\n  // Put any null nodes into enter.\n  // Put any remaining data into enter.\n  for (; i < dataLength; ++i) {\n    if (node = group[i]) {\n      node.__data__ = data[i];\n      update[i] = node;\n    } else {\n      enter[i] = new _enter_js__WEBPACK_IMPORTED_MODULE_1__[\"EnterNode\"](parent, data[i]);\n    }\n  }\n\n  // Put any non-null nodes that don’t fit into exit.\n  for (; i < groupLength; ++i) {\n    if (node = group[i]) {\n      exit[i] = node;\n    }\n  }\n}\n\nfunction bindKey(parent, group, enter, update, exit, data, key) {\n  var i,\n      node,\n      nodeByKeyValue = new Map,\n      groupLength = group.length,\n      dataLength = data.length,\n      keyValues = new Array(groupLength),\n      keyValue;\n\n  // Compute the key for each node.\n  // If multiple nodes have the same key, the duplicates are added to exit.\n  for (i = 0; i < groupLength; ++i) {\n    if (node = group[i]) {\n      keyValues[i] = keyValue = key.call(node, node.__data__, i, group) + \"\";\n      if (nodeByKeyValue.has(keyValue)) {\n        exit[i] = node;\n      } else {\n        nodeByKeyValue.set(keyValue, node);\n      }\n    }\n  }\n\n  // Compute the key for each datum.\n  // If there a node associated with this key, join and add it to update.\n  // If there is not (or the key is a duplicate), add it to enter.\n  for (i = 0; i < dataLength; ++i) {\n    keyValue = key.call(parent, data[i], i, data) + \"\";\n    if (node = nodeByKeyValue.get(keyValue)) {\n      update[i] = node;\n      node.__data__ = data[i];\n      nodeByKeyValue.delete(keyValue);\n    } else {\n      enter[i] = new _enter_js__WEBPACK_IMPORTED_MODULE_1__[\"EnterNode\"](parent, data[i]);\n    }\n  }\n\n  // Add any remaining nodes that were not bound to data to exit.\n  for (i = 0; i < groupLength; ++i) {\n    if ((node = group[i]) && (nodeByKeyValue.get(keyValues[i]) === node)) {\n      exit[i] = node;\n    }\n  }\n}\n\nfunction datum(node) {\n  return node.__data__;\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(value, key) {\n  if (!arguments.length) return Array.from(this, datum);\n\n  var bind = key ? bindKey : bindIndex,\n      parents = this._parents,\n      groups = this._groups;\n\n  if (typeof value !== \"function\") value = Object(_constant_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(value);\n\n  for (var m = groups.length, update = new Array(m), enter = new Array(m), exit = new Array(m), j = 0; j < m; ++j) {\n    var parent = parents[j],\n        group = groups[j],\n        groupLength = group.length,\n        data = arraylike(value.call(parent, parent && parent.__data__, j, parents)),\n        dataLength = data.length,\n        enterGroup = enter[j] = new Array(dataLength),\n        updateGroup = update[j] = new Array(dataLength),\n        exitGroup = exit[j] = new Array(groupLength);\n\n    bind(parent, group, enterGroup, updateGroup, exitGroup, data, key);\n\n    // Now connect the enter nodes to their following update node, such that\n    // appendChild can insert the materialized enter node before this node,\n    // rather than at the end of the parent node.\n    for (var i0 = 0, i1 = 0, previous, next; i0 < dataLength; ++i0) {\n      if (previous = enterGroup[i0]) {\n        if (i0 >= i1) i1 = i0 + 1;\n        while (!(next = updateGroup[i1]) && ++i1 < dataLength);\n        previous._next = next || null;\n      }\n    }\n  }\n\n  update = new _index_js__WEBPACK_IMPORTED_MODULE_0__[\"Selection\"](update, parents);\n  update._enter = enter;\n  update._exit = exit;\n  return update;\n});\n\n// Given some data, this returns an array-like view of it: an object that\n// exposes a length property and allows numeric indexing. Note that unlike\n// selectAll, this isn’t worried about “live” collections because the resulting\n// array will only be used briefly while data is being bound. (It is possible to\n// cause the data to change while iterating by using a key function, but please\n// don’t; we’d rather avoid a gratuitous copy.)\nfunction arraylike(data) {\n  return typeof data === \"object\" && \"length\" in data\n    ? data // Array, TypedArray, NodeList, array-like\n    : Array.from(data); // Map, Set, iterable, string, or anything else\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-selection/src/selection/datum.js\":\n/*!**************************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-selection/src/selection/datum.js ***!\n  \\**************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(value) {\n  return arguments.length\n      ? this.property(\"__data__\", value)\n      : this.node().__data__;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-selection/src/selection/dispatch.js\":\n/*!*****************************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-selection/src/selection/dispatch.js ***!\n  \\*****************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _window_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../window.js */ \"./node_modules/d3/node_modules/d3-selection/src/window.js\");\n\n\nfunction dispatchEvent(node, type, params) {\n  var window = Object(_window_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(node),\n      event = window.CustomEvent;\n\n  if (typeof event === \"function\") {\n    event = new event(type, params);\n  } else {\n    event = window.document.createEvent(\"Event\");\n    if (params) event.initEvent(type, params.bubbles, params.cancelable), event.detail = params.detail;\n    else event.initEvent(type, false, false);\n  }\n\n  node.dispatchEvent(event);\n}\n\nfunction dispatchConstant(type, params) {\n  return function() {\n    return dispatchEvent(this, type, params);\n  };\n}\n\nfunction dispatchFunction(type, params) {\n  return function() {\n    return dispatchEvent(this, type, params.apply(this, arguments));\n  };\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(type, params) {\n  return this.each((typeof params === \"function\"\n      ? dispatchFunction\n      : dispatchConstant)(type, params));\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-selection/src/selection/each.js\":\n/*!*************************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-selection/src/selection/each.js ***!\n  \\*************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(callback) {\n\n  for (var groups = this._groups, j = 0, m = groups.length; j < m; ++j) {\n    for (var group = groups[j], i = 0, n = group.length, node; i < n; ++i) {\n      if (node = group[i]) callback.call(node, node.__data__, i, group);\n    }\n  }\n\n  return this;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-selection/src/selection/empty.js\":\n/*!**************************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-selection/src/selection/empty.js ***!\n  \\**************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  return !this.node();\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-selection/src/selection/enter.js\":\n/*!**************************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-selection/src/selection/enter.js ***!\n  \\**************************************************************************/\n/*! exports provided: default, EnterNode */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"EnterNode\", function() { return EnterNode; });\n/* harmony import */ var _sparse_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./sparse.js */ \"./node_modules/d3/node_modules/d3-selection/src/selection/sparse.js\");\n/* harmony import */ var _index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./index.js */ \"./node_modules/d3/node_modules/d3-selection/src/selection/index.js\");\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  return new _index_js__WEBPACK_IMPORTED_MODULE_1__[\"Selection\"](this._enter || this._groups.map(_sparse_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]), this._parents);\n});\n\nfunction EnterNode(parent, datum) {\n  this.ownerDocument = parent.ownerDocument;\n  this.namespaceURI = parent.namespaceURI;\n  this._next = null;\n  this._parent = parent;\n  this.__data__ = datum;\n}\n\nEnterNode.prototype = {\n  constructor: EnterNode,\n  appendChild: function(child) { return this._parent.insertBefore(child, this._next); },\n  insertBefore: function(child, next) { return this._parent.insertBefore(child, next); },\n  querySelector: function(selector) { return this._parent.querySelector(selector); },\n  querySelectorAll: function(selector) { return this._parent.querySelectorAll(selector); }\n};\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-selection/src/selection/exit.js\":\n/*!*************************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-selection/src/selection/exit.js ***!\n  \\*************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _sparse_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./sparse.js */ \"./node_modules/d3/node_modules/d3-selection/src/selection/sparse.js\");\n/* harmony import */ var _index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./index.js */ \"./node_modules/d3/node_modules/d3-selection/src/selection/index.js\");\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  return new _index_js__WEBPACK_IMPORTED_MODULE_1__[\"Selection\"](this._exit || this._groups.map(_sparse_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]), this._parents);\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-selection/src/selection/filter.js\":\n/*!***************************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-selection/src/selection/filter.js ***!\n  \\***************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./index.js */ \"./node_modules/d3/node_modules/d3-selection/src/selection/index.js\");\n/* harmony import */ var _matcher_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../matcher.js */ \"./node_modules/d3/node_modules/d3-selection/src/matcher.js\");\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(match) {\n  if (typeof match !== \"function\") match = Object(_matcher_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(match);\n\n  for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {\n    for (var group = groups[j], n = group.length, subgroup = subgroups[j] = [], node, i = 0; i < n; ++i) {\n      if ((node = group[i]) && match.call(node, node.__data__, i, group)) {\n        subgroup.push(node);\n      }\n    }\n  }\n\n  return new _index_js__WEBPACK_IMPORTED_MODULE_0__[\"Selection\"](subgroups, this._parents);\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-selection/src/selection/html.js\":\n/*!*************************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-selection/src/selection/html.js ***!\n  \\*************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\nfunction htmlRemove() {\n  this.innerHTML = \"\";\n}\n\nfunction htmlConstant(value) {\n  return function() {\n    this.innerHTML = value;\n  };\n}\n\nfunction htmlFunction(value) {\n  return function() {\n    var v = value.apply(this, arguments);\n    this.innerHTML = v == null ? \"\" : v;\n  };\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(value) {\n  return arguments.length\n      ? this.each(value == null\n          ? htmlRemove : (typeof value === \"function\"\n          ? htmlFunction\n          : htmlConstant)(value))\n      : this.node().innerHTML;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-selection/src/selection/index.js\":\n/*!**************************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-selection/src/selection/index.js ***!\n  \\**************************************************************************/\n/*! exports provided: root, Selection, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"root\", function() { return root; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Selection\", function() { return Selection; });\n/* harmony import */ var _select_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./select.js */ \"./node_modules/d3/node_modules/d3-selection/src/selection/select.js\");\n/* harmony import */ var _selectAll_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./selectAll.js */ \"./node_modules/d3/node_modules/d3-selection/src/selection/selectAll.js\");\n/* harmony import */ var _selectChild_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./selectChild.js */ \"./node_modules/d3/node_modules/d3-selection/src/selection/selectChild.js\");\n/* harmony import */ var _selectChildren_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./selectChildren.js */ \"./node_modules/d3/node_modules/d3-selection/src/selection/selectChildren.js\");\n/* harmony import */ var _filter_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./filter.js */ \"./node_modules/d3/node_modules/d3-selection/src/selection/filter.js\");\n/* harmony import */ var _data_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./data.js */ \"./node_modules/d3/node_modules/d3-selection/src/selection/data.js\");\n/* harmony import */ var _enter_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./enter.js */ \"./node_modules/d3/node_modules/d3-selection/src/selection/enter.js\");\n/* harmony import */ var _exit_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./exit.js */ \"./node_modules/d3/node_modules/d3-selection/src/selection/exit.js\");\n/* harmony import */ var _join_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./join.js */ \"./node_modules/d3/node_modules/d3-selection/src/selection/join.js\");\n/* harmony import */ var _merge_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./merge.js */ \"./node_modules/d3/node_modules/d3-selection/src/selection/merge.js\");\n/* harmony import */ var _order_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./order.js */ \"./node_modules/d3/node_modules/d3-selection/src/selection/order.js\");\n/* harmony import */ var _sort_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./sort.js */ \"./node_modules/d3/node_modules/d3-selection/src/selection/sort.js\");\n/* harmony import */ var _call_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./call.js */ \"./node_modules/d3/node_modules/d3-selection/src/selection/call.js\");\n/* harmony import */ var _nodes_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./nodes.js */ \"./node_modules/d3/node_modules/d3-selection/src/selection/nodes.js\");\n/* harmony import */ var _node_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./node.js */ \"./node_modules/d3/node_modules/d3-selection/src/selection/node.js\");\n/* harmony import */ var _size_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./size.js */ \"./node_modules/d3/node_modules/d3-selection/src/selection/size.js\");\n/* harmony import */ var _empty_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./empty.js */ \"./node_modules/d3/node_modules/d3-selection/src/selection/empty.js\");\n/* harmony import */ var _each_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./each.js */ \"./node_modules/d3/node_modules/d3-selection/src/selection/each.js\");\n/* harmony import */ var _attr_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./attr.js */ \"./node_modules/d3/node_modules/d3-selection/src/selection/attr.js\");\n/* harmony import */ var _style_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./style.js */ \"./node_modules/d3/node_modules/d3-selection/src/selection/style.js\");\n/* harmony import */ var _property_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./property.js */ \"./node_modules/d3/node_modules/d3-selection/src/selection/property.js\");\n/* harmony import */ var _classed_js__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./classed.js */ \"./node_modules/d3/node_modules/d3-selection/src/selection/classed.js\");\n/* harmony import */ var _text_js__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./text.js */ \"./node_modules/d3/node_modules/d3-selection/src/selection/text.js\");\n/* harmony import */ var _html_js__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./html.js */ \"./node_modules/d3/node_modules/d3-selection/src/selection/html.js\");\n/* harmony import */ var _raise_js__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ./raise.js */ \"./node_modules/d3/node_modules/d3-selection/src/selection/raise.js\");\n/* harmony import */ var _lower_js__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ./lower.js */ \"./node_modules/d3/node_modules/d3-selection/src/selection/lower.js\");\n/* harmony import */ var _append_js__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ./append.js */ \"./node_modules/d3/node_modules/d3-selection/src/selection/append.js\");\n/* harmony import */ var _insert_js__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ./insert.js */ \"./node_modules/d3/node_modules/d3-selection/src/selection/insert.js\");\n/* harmony import */ var _remove_js__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ./remove.js */ \"./node_modules/d3/node_modules/d3-selection/src/selection/remove.js\");\n/* harmony import */ var _clone_js__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ./clone.js */ \"./node_modules/d3/node_modules/d3-selection/src/selection/clone.js\");\n/* harmony import */ var _datum_js__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ./datum.js */ \"./node_modules/d3/node_modules/d3-selection/src/selection/datum.js\");\n/* harmony import */ var _on_js__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ./on.js */ \"./node_modules/d3/node_modules/d3-selection/src/selection/on.js\");\n/* harmony import */ var _dispatch_js__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ./dispatch.js */ \"./node_modules/d3/node_modules/d3-selection/src/selection/dispatch.js\");\n/* harmony import */ var _iterator_js__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! ./iterator.js */ \"./node_modules/d3/node_modules/d3-selection/src/selection/iterator.js\");\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nvar root = [null];\n\nfunction Selection(groups, parents) {\n  this._groups = groups;\n  this._parents = parents;\n}\n\nfunction selection() {\n  return new Selection([[document.documentElement]], root);\n}\n\nfunction selection_selection() {\n  return this;\n}\n\nSelection.prototype = selection.prototype = {\n  constructor: Selection,\n  select: _select_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"],\n  selectAll: _selectAll_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"],\n  selectChild: _selectChild_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"],\n  selectChildren: _selectChildren_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"],\n  filter: _filter_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"],\n  data: _data_js__WEBPACK_IMPORTED_MODULE_5__[\"default\"],\n  enter: _enter_js__WEBPACK_IMPORTED_MODULE_6__[\"default\"],\n  exit: _exit_js__WEBPACK_IMPORTED_MODULE_7__[\"default\"],\n  join: _join_js__WEBPACK_IMPORTED_MODULE_8__[\"default\"],\n  merge: _merge_js__WEBPACK_IMPORTED_MODULE_9__[\"default\"],\n  selection: selection_selection,\n  order: _order_js__WEBPACK_IMPORTED_MODULE_10__[\"default\"],\n  sort: _sort_js__WEBPACK_IMPORTED_MODULE_11__[\"default\"],\n  call: _call_js__WEBPACK_IMPORTED_MODULE_12__[\"default\"],\n  nodes: _nodes_js__WEBPACK_IMPORTED_MODULE_13__[\"default\"],\n  node: _node_js__WEBPACK_IMPORTED_MODULE_14__[\"default\"],\n  size: _size_js__WEBPACK_IMPORTED_MODULE_15__[\"default\"],\n  empty: _empty_js__WEBPACK_IMPORTED_MODULE_16__[\"default\"],\n  each: _each_js__WEBPACK_IMPORTED_MODULE_17__[\"default\"],\n  attr: _attr_js__WEBPACK_IMPORTED_MODULE_18__[\"default\"],\n  style: _style_js__WEBPACK_IMPORTED_MODULE_19__[\"default\"],\n  property: _property_js__WEBPACK_IMPORTED_MODULE_20__[\"default\"],\n  classed: _classed_js__WEBPACK_IMPORTED_MODULE_21__[\"default\"],\n  text: _text_js__WEBPACK_IMPORTED_MODULE_22__[\"default\"],\n  html: _html_js__WEBPACK_IMPORTED_MODULE_23__[\"default\"],\n  raise: _raise_js__WEBPACK_IMPORTED_MODULE_24__[\"default\"],\n  lower: _lower_js__WEBPACK_IMPORTED_MODULE_25__[\"default\"],\n  append: _append_js__WEBPACK_IMPORTED_MODULE_26__[\"default\"],\n  insert: _insert_js__WEBPACK_IMPORTED_MODULE_27__[\"default\"],\n  remove: _remove_js__WEBPACK_IMPORTED_MODULE_28__[\"default\"],\n  clone: _clone_js__WEBPACK_IMPORTED_MODULE_29__[\"default\"],\n  datum: _datum_js__WEBPACK_IMPORTED_MODULE_30__[\"default\"],\n  on: _on_js__WEBPACK_IMPORTED_MODULE_31__[\"default\"],\n  dispatch: _dispatch_js__WEBPACK_IMPORTED_MODULE_32__[\"default\"],\n  [Symbol.iterator]: _iterator_js__WEBPACK_IMPORTED_MODULE_33__[\"default\"]\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (selection);\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-selection/src/selection/insert.js\":\n/*!***************************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-selection/src/selection/insert.js ***!\n  \\***************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _creator_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../creator.js */ \"./node_modules/d3/node_modules/d3-selection/src/creator.js\");\n/* harmony import */ var _selector_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../selector.js */ \"./node_modules/d3/node_modules/d3-selection/src/selector.js\");\n\n\n\nfunction constantNull() {\n  return null;\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(name, before) {\n  var create = typeof name === \"function\" ? name : Object(_creator_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(name),\n      select = before == null ? constantNull : typeof before === \"function\" ? before : Object(_selector_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(before);\n  return this.select(function() {\n    return this.insertBefore(create.apply(this, arguments), select.apply(this, arguments) || null);\n  });\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-selection/src/selection/iterator.js\":\n/*!*****************************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-selection/src/selection/iterator.js ***!\n  \\*****************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function*() {\n  for (var groups = this._groups, j = 0, m = groups.length; j < m; ++j) {\n    for (var group = groups[j], i = 0, n = group.length, node; i < n; ++i) {\n      if (node = group[i]) yield node;\n    }\n  }\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-selection/src/selection/join.js\":\n/*!*************************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-selection/src/selection/join.js ***!\n  \\*************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(onenter, onupdate, onexit) {\n  var enter = this.enter(), update = this, exit = this.exit();\n  if (typeof onenter === \"function\") {\n    enter = onenter(enter);\n    if (enter) enter = enter.selection();\n  } else {\n    enter = enter.append(onenter + \"\");\n  }\n  if (onupdate != null) {\n    update = onupdate(update);\n    if (update) update = update.selection();\n  }\n  if (onexit == null) exit.remove(); else onexit(exit);\n  return enter && update ? enter.merge(update).order() : update;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-selection/src/selection/lower.js\":\n/*!**************************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-selection/src/selection/lower.js ***!\n  \\**************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\nfunction lower() {\n  if (this.previousSibling) this.parentNode.insertBefore(this, this.parentNode.firstChild);\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  return this.each(lower);\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-selection/src/selection/merge.js\":\n/*!**************************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-selection/src/selection/merge.js ***!\n  \\**************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./index.js */ \"./node_modules/d3/node_modules/d3-selection/src/selection/index.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(context) {\n  var selection = context.selection ? context.selection() : context;\n\n  for (var groups0 = this._groups, groups1 = selection._groups, m0 = groups0.length, m1 = groups1.length, m = Math.min(m0, m1), merges = new Array(m0), j = 0; j < m; ++j) {\n    for (var group0 = groups0[j], group1 = groups1[j], n = group0.length, merge = merges[j] = new Array(n), node, i = 0; i < n; ++i) {\n      if (node = group0[i] || group1[i]) {\n        merge[i] = node;\n      }\n    }\n  }\n\n  for (; j < m0; ++j) {\n    merges[j] = groups0[j];\n  }\n\n  return new _index_js__WEBPACK_IMPORTED_MODULE_0__[\"Selection\"](merges, this._parents);\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-selection/src/selection/node.js\":\n/*!*************************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-selection/src/selection/node.js ***!\n  \\*************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n\n  for (var groups = this._groups, j = 0, m = groups.length; j < m; ++j) {\n    for (var group = groups[j], i = 0, n = group.length; i < n; ++i) {\n      var node = group[i];\n      if (node) return node;\n    }\n  }\n\n  return null;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-selection/src/selection/nodes.js\":\n/*!**************************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-selection/src/selection/nodes.js ***!\n  \\**************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  return Array.from(this);\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-selection/src/selection/on.js\":\n/*!***********************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-selection/src/selection/on.js ***!\n  \\***********************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\nfunction contextListener(listener) {\n  return function(event) {\n    listener.call(this, event, this.__data__);\n  };\n}\n\nfunction parseTypenames(typenames) {\n  return typenames.trim().split(/^|\\s+/).map(function(t) {\n    var name = \"\", i = t.indexOf(\".\");\n    if (i >= 0) name = t.slice(i + 1), t = t.slice(0, i);\n    return {type: t, name: name};\n  });\n}\n\nfunction onRemove(typename) {\n  return function() {\n    var on = this.__on;\n    if (!on) return;\n    for (var j = 0, i = -1, m = on.length, o; j < m; ++j) {\n      if (o = on[j], (!typename.type || o.type === typename.type) && o.name === typename.name) {\n        this.removeEventListener(o.type, o.listener, o.options);\n      } else {\n        on[++i] = o;\n      }\n    }\n    if (++i) on.length = i;\n    else delete this.__on;\n  };\n}\n\nfunction onAdd(typename, value, options) {\n  return function() {\n    var on = this.__on, o, listener = contextListener(value);\n    if (on) for (var j = 0, m = on.length; j < m; ++j) {\n      if ((o = on[j]).type === typename.type && o.name === typename.name) {\n        this.removeEventListener(o.type, o.listener, o.options);\n        this.addEventListener(o.type, o.listener = listener, o.options = options);\n        o.value = value;\n        return;\n      }\n    }\n    this.addEventListener(typename.type, listener, options);\n    o = {type: typename.type, name: typename.name, value: value, listener: listener, options: options};\n    if (!on) this.__on = [o];\n    else on.push(o);\n  };\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(typename, value, options) {\n  var typenames = parseTypenames(typename + \"\"), i, n = typenames.length, t;\n\n  if (arguments.length < 2) {\n    var on = this.node().__on;\n    if (on) for (var j = 0, m = on.length, o; j < m; ++j) {\n      for (i = 0, o = on[j]; i < n; ++i) {\n        if ((t = typenames[i]).type === o.type && t.name === o.name) {\n          return o.value;\n        }\n      }\n    }\n    return;\n  }\n\n  on = value ? onAdd : onRemove;\n  for (i = 0; i < n; ++i) this.each(on(typenames[i], value, options));\n  return this;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-selection/src/selection/order.js\":\n/*!**************************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-selection/src/selection/order.js ***!\n  \\**************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n\n  for (var groups = this._groups, j = -1, m = groups.length; ++j < m;) {\n    for (var group = groups[j], i = group.length - 1, next = group[i], node; --i >= 0;) {\n      if (node = group[i]) {\n        if (next && node.compareDocumentPosition(next) ^ 4) next.parentNode.insertBefore(node, next);\n        next = node;\n      }\n    }\n  }\n\n  return this;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-selection/src/selection/property.js\":\n/*!*****************************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-selection/src/selection/property.js ***!\n  \\*****************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\nfunction propertyRemove(name) {\n  return function() {\n    delete this[name];\n  };\n}\n\nfunction propertyConstant(name, value) {\n  return function() {\n    this[name] = value;\n  };\n}\n\nfunction propertyFunction(name, value) {\n  return function() {\n    var v = value.apply(this, arguments);\n    if (v == null) delete this[name];\n    else this[name] = v;\n  };\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(name, value) {\n  return arguments.length > 1\n      ? this.each((value == null\n          ? propertyRemove : typeof value === \"function\"\n          ? propertyFunction\n          : propertyConstant)(name, value))\n      : this.node()[name];\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-selection/src/selection/raise.js\":\n/*!**************************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-selection/src/selection/raise.js ***!\n  \\**************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\nfunction raise() {\n  if (this.nextSibling) this.parentNode.appendChild(this);\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  return this.each(raise);\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-selection/src/selection/remove.js\":\n/*!***************************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-selection/src/selection/remove.js ***!\n  \\***************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\nfunction remove() {\n  var parent = this.parentNode;\n  if (parent) parent.removeChild(this);\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  return this.each(remove);\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-selection/src/selection/select.js\":\n/*!***************************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-selection/src/selection/select.js ***!\n  \\***************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./index.js */ \"./node_modules/d3/node_modules/d3-selection/src/selection/index.js\");\n/* harmony import */ var _selector_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../selector.js */ \"./node_modules/d3/node_modules/d3-selection/src/selector.js\");\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(select) {\n  if (typeof select !== \"function\") select = Object(_selector_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(select);\n\n  for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {\n    for (var group = groups[j], n = group.length, subgroup = subgroups[j] = new Array(n), node, subnode, i = 0; i < n; ++i) {\n      if ((node = group[i]) && (subnode = select.call(node, node.__data__, i, group))) {\n        if (\"__data__\" in node) subnode.__data__ = node.__data__;\n        subgroup[i] = subnode;\n      }\n    }\n  }\n\n  return new _index_js__WEBPACK_IMPORTED_MODULE_0__[\"Selection\"](subgroups, this._parents);\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-selection/src/selection/selectAll.js\":\n/*!******************************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-selection/src/selection/selectAll.js ***!\n  \\******************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./index.js */ \"./node_modules/d3/node_modules/d3-selection/src/selection/index.js\");\n/* harmony import */ var _array_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../array.js */ \"./node_modules/d3/node_modules/d3-selection/src/array.js\");\n/* harmony import */ var _selectorAll_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../selectorAll.js */ \"./node_modules/d3/node_modules/d3-selection/src/selectorAll.js\");\n\n\n\n\nfunction arrayAll(select) {\n  return function() {\n    return Object(_array_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(select.apply(this, arguments));\n  };\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(select) {\n  if (typeof select === \"function\") select = arrayAll(select);\n  else select = Object(_selectorAll_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(select);\n\n  for (var groups = this._groups, m = groups.length, subgroups = [], parents = [], j = 0; j < m; ++j) {\n    for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) {\n      if (node = group[i]) {\n        subgroups.push(select.call(node, node.__data__, i, group));\n        parents.push(node);\n      }\n    }\n  }\n\n  return new _index_js__WEBPACK_IMPORTED_MODULE_0__[\"Selection\"](subgroups, parents);\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-selection/src/selection/selectChild.js\":\n/*!********************************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-selection/src/selection/selectChild.js ***!\n  \\********************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _matcher_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../matcher.js */ \"./node_modules/d3/node_modules/d3-selection/src/matcher.js\");\n\n\nvar find = Array.prototype.find;\n\nfunction childFind(match) {\n  return function() {\n    return find.call(this.children, match);\n  };\n}\n\nfunction childFirst() {\n  return this.firstElementChild;\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(match) {\n  return this.select(match == null ? childFirst\n      : childFind(typeof match === \"function\" ? match : Object(_matcher_js__WEBPACK_IMPORTED_MODULE_0__[\"childMatcher\"])(match)));\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-selection/src/selection/selectChildren.js\":\n/*!***********************************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-selection/src/selection/selectChildren.js ***!\n  \\***********************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _matcher_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../matcher.js */ \"./node_modules/d3/node_modules/d3-selection/src/matcher.js\");\n\n\nvar filter = Array.prototype.filter;\n\nfunction children() {\n  return Array.from(this.children);\n}\n\nfunction childrenFilter(match) {\n  return function() {\n    return filter.call(this.children, match);\n  };\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(match) {\n  return this.selectAll(match == null ? children\n      : childrenFilter(typeof match === \"function\" ? match : Object(_matcher_js__WEBPACK_IMPORTED_MODULE_0__[\"childMatcher\"])(match)));\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-selection/src/selection/size.js\":\n/*!*************************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-selection/src/selection/size.js ***!\n  \\*************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  let size = 0;\n  for (const node of this) ++size; // eslint-disable-line no-unused-vars\n  return size;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-selection/src/selection/sort.js\":\n/*!*************************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-selection/src/selection/sort.js ***!\n  \\*************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./index.js */ \"./node_modules/d3/node_modules/d3-selection/src/selection/index.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(compare) {\n  if (!compare) compare = ascending;\n\n  function compareNode(a, b) {\n    return a && b ? compare(a.__data__, b.__data__) : !a - !b;\n  }\n\n  for (var groups = this._groups, m = groups.length, sortgroups = new Array(m), j = 0; j < m; ++j) {\n    for (var group = groups[j], n = group.length, sortgroup = sortgroups[j] = new Array(n), node, i = 0; i < n; ++i) {\n      if (node = group[i]) {\n        sortgroup[i] = node;\n      }\n    }\n    sortgroup.sort(compareNode);\n  }\n\n  return new _index_js__WEBPACK_IMPORTED_MODULE_0__[\"Selection\"](sortgroups, this._parents).order();\n});\n\nfunction ascending(a, b) {\n  return a < b ? -1 : a > b ? 1 : a >= b ? 0 : NaN;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-selection/src/selection/sparse.js\":\n/*!***************************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-selection/src/selection/sparse.js ***!\n  \\***************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(update) {\n  return new Array(update.length);\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-selection/src/selection/style.js\":\n/*!**************************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-selection/src/selection/style.js ***!\n  \\**************************************************************************/\n/*! exports provided: default, styleValue */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"styleValue\", function() { return styleValue; });\n/* harmony import */ var _window_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../window.js */ \"./node_modules/d3/node_modules/d3-selection/src/window.js\");\n\n\nfunction styleRemove(name) {\n  return function() {\n    this.style.removeProperty(name);\n  };\n}\n\nfunction styleConstant(name, value, priority) {\n  return function() {\n    this.style.setProperty(name, value, priority);\n  };\n}\n\nfunction styleFunction(name, value, priority) {\n  return function() {\n    var v = value.apply(this, arguments);\n    if (v == null) this.style.removeProperty(name);\n    else this.style.setProperty(name, v, priority);\n  };\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(name, value, priority) {\n  return arguments.length > 1\n      ? this.each((value == null\n            ? styleRemove : typeof value === \"function\"\n            ? styleFunction\n            : styleConstant)(name, value, priority == null ? \"\" : priority))\n      : styleValue(this.node(), name);\n});\n\nfunction styleValue(node, name) {\n  return node.style.getPropertyValue(name)\n      || Object(_window_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(node).getComputedStyle(node, null).getPropertyValue(name);\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-selection/src/selection/text.js\":\n/*!*************************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-selection/src/selection/text.js ***!\n  \\*************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\nfunction textRemove() {\n  this.textContent = \"\";\n}\n\nfunction textConstant(value) {\n  return function() {\n    this.textContent = value;\n  };\n}\n\nfunction textFunction(value) {\n  return function() {\n    var v = value.apply(this, arguments);\n    this.textContent = v == null ? \"\" : v;\n  };\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(value) {\n  return arguments.length\n      ? this.each(value == null\n          ? textRemove : (typeof value === \"function\"\n          ? textFunction\n          : textConstant)(value))\n      : this.node().textContent;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-selection/src/selector.js\":\n/*!*******************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-selection/src/selector.js ***!\n  \\*******************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\nfunction none() {}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(selector) {\n  return selector == null ? none : function() {\n    return this.querySelector(selector);\n  };\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-selection/src/selectorAll.js\":\n/*!**********************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-selection/src/selectorAll.js ***!\n  \\**********************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\nfunction empty() {\n  return [];\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(selector) {\n  return selector == null ? empty : function() {\n    return this.querySelectorAll(selector);\n  };\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-selection/src/sourceEvent.js\":\n/*!**********************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-selection/src/sourceEvent.js ***!\n  \\**********************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(event) {\n  let sourceEvent;\n  while (sourceEvent = event.sourceEvent) event = sourceEvent;\n  return event;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-selection/src/window.js\":\n/*!*****************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-selection/src/window.js ***!\n  \\*****************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(node) {\n  return (node.ownerDocument && node.ownerDocument.defaultView) // node is a Node\n      || (node.document && node) // node is a Window\n      || node.defaultView; // node is a Document\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-time-format/src/defaultLocale.js\":\n/*!**************************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-time-format/src/defaultLocale.js ***!\n  \\**************************************************************************/\n/*! exports provided: timeFormat, timeParse, utcFormat, utcParse, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"timeFormat\", function() { return timeFormat; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"timeParse\", function() { return timeParse; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"utcFormat\", function() { return utcFormat; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"utcParse\", function() { return utcParse; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return defaultLocale; });\n/* harmony import */ var _locale_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./locale.js */ \"./node_modules/d3/node_modules/d3-time-format/src/locale.js\");\n\n\nvar locale;\nvar timeFormat;\nvar timeParse;\nvar utcFormat;\nvar utcParse;\n\ndefaultLocale({\n  dateTime: \"%x, %X\",\n  date: \"%-m/%-d/%Y\",\n  time: \"%-I:%M:%S %p\",\n  periods: [\"AM\", \"PM\"],\n  days: [\"Sunday\", \"Monday\", \"Tuesday\", \"Wednesday\", \"Thursday\", \"Friday\", \"Saturday\"],\n  shortDays: [\"Sun\", \"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\"],\n  months: [\"January\", \"February\", \"March\", \"April\", \"May\", \"June\", \"July\", \"August\", \"September\", \"October\", \"November\", \"December\"],\n  shortMonths: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\"]\n});\n\nfunction defaultLocale(definition) {\n  locale = Object(_locale_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(definition);\n  timeFormat = locale.format;\n  timeParse = locale.parse;\n  utcFormat = locale.utcFormat;\n  utcParse = locale.utcParse;\n  return locale;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-time-format/src/index.js\":\n/*!******************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-time-format/src/index.js ***!\n  \\******************************************************************/\n/*! exports provided: timeFormatDefaultLocale, timeFormat, timeParse, utcFormat, utcParse, timeFormatLocale, isoFormat, isoParse */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _defaultLocale_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./defaultLocale.js */ \"./node_modules/d3/node_modules/d3-time-format/src/defaultLocale.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeFormatDefaultLocale\", function() { return _defaultLocale_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeFormat\", function() { return _defaultLocale_js__WEBPACK_IMPORTED_MODULE_0__[\"timeFormat\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeParse\", function() { return _defaultLocale_js__WEBPACK_IMPORTED_MODULE_0__[\"timeParse\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcFormat\", function() { return _defaultLocale_js__WEBPACK_IMPORTED_MODULE_0__[\"utcFormat\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcParse\", function() { return _defaultLocale_js__WEBPACK_IMPORTED_MODULE_0__[\"utcParse\"]; });\n\n/* harmony import */ var _locale_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./locale.js */ \"./node_modules/d3/node_modules/d3-time-format/src/locale.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeFormatLocale\", function() { return _locale_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"]; });\n\n/* harmony import */ var _isoFormat_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./isoFormat.js */ \"./node_modules/d3/node_modules/d3-time-format/src/isoFormat.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"isoFormat\", function() { return _isoFormat_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"]; });\n\n/* harmony import */ var _isoParse_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./isoParse.js */ \"./node_modules/d3/node_modules/d3-time-format/src/isoParse.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"isoParse\", function() { return _isoParse_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"]; });\n\n\n\n\n\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-time-format/src/isoFormat.js\":\n/*!**********************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-time-format/src/isoFormat.js ***!\n  \\**********************************************************************/\n/*! exports provided: isoSpecifier, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"isoSpecifier\", function() { return isoSpecifier; });\n/* harmony import */ var _defaultLocale_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./defaultLocale.js */ \"./node_modules/d3/node_modules/d3-time-format/src/defaultLocale.js\");\n\n\nvar isoSpecifier = \"%Y-%m-%dT%H:%M:%S.%LZ\";\n\nfunction formatIsoNative(date) {\n  return date.toISOString();\n}\n\nvar formatIso = Date.prototype.toISOString\n    ? formatIsoNative\n    : Object(_defaultLocale_js__WEBPACK_IMPORTED_MODULE_0__[\"utcFormat\"])(isoSpecifier);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (formatIso);\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-time-format/src/isoParse.js\":\n/*!*********************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-time-format/src/isoParse.js ***!\n  \\*********************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _isoFormat_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./isoFormat.js */ \"./node_modules/d3/node_modules/d3-time-format/src/isoFormat.js\");\n/* harmony import */ var _defaultLocale_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./defaultLocale.js */ \"./node_modules/d3/node_modules/d3-time-format/src/defaultLocale.js\");\n\n\n\nfunction parseIsoNative(string) {\n  var date = new Date(string);\n  return isNaN(date) ? null : date;\n}\n\nvar parseIso = +new Date(\"2000-01-01T00:00:00.000Z\")\n    ? parseIsoNative\n    : Object(_defaultLocale_js__WEBPACK_IMPORTED_MODULE_1__[\"utcParse\"])(_isoFormat_js__WEBPACK_IMPORTED_MODULE_0__[\"isoSpecifier\"]);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (parseIso);\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-time-format/src/locale.js\":\n/*!*******************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-time-format/src/locale.js ***!\n  \\*******************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return formatLocale; });\n/* harmony import */ var d3_time__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-time */ \"./node_modules/d3/node_modules/d3-time/src/index.js\");\n\n\nfunction localDate(d) {\n  if (0 <= d.y && d.y < 100) {\n    var date = new Date(-1, d.m, d.d, d.H, d.M, d.S, d.L);\n    date.setFullYear(d.y);\n    return date;\n  }\n  return new Date(d.y, d.m, d.d, d.H, d.M, d.S, d.L);\n}\n\nfunction utcDate(d) {\n  if (0 <= d.y && d.y < 100) {\n    var date = new Date(Date.UTC(-1, d.m, d.d, d.H, d.M, d.S, d.L));\n    date.setUTCFullYear(d.y);\n    return date;\n  }\n  return new Date(Date.UTC(d.y, d.m, d.d, d.H, d.M, d.S, d.L));\n}\n\nfunction newDate(y, m, d) {\n  return {y: y, m: m, d: d, H: 0, M: 0, S: 0, L: 0};\n}\n\nfunction formatLocale(locale) {\n  var locale_dateTime = locale.dateTime,\n      locale_date = locale.date,\n      locale_time = locale.time,\n      locale_periods = locale.periods,\n      locale_weekdays = locale.days,\n      locale_shortWeekdays = locale.shortDays,\n      locale_months = locale.months,\n      locale_shortMonths = locale.shortMonths;\n\n  var periodRe = formatRe(locale_periods),\n      periodLookup = formatLookup(locale_periods),\n      weekdayRe = formatRe(locale_weekdays),\n      weekdayLookup = formatLookup(locale_weekdays),\n      shortWeekdayRe = formatRe(locale_shortWeekdays),\n      shortWeekdayLookup = formatLookup(locale_shortWeekdays),\n      monthRe = formatRe(locale_months),\n      monthLookup = formatLookup(locale_months),\n      shortMonthRe = formatRe(locale_shortMonths),\n      shortMonthLookup = formatLookup(locale_shortMonths);\n\n  var formats = {\n    \"a\": formatShortWeekday,\n    \"A\": formatWeekday,\n    \"b\": formatShortMonth,\n    \"B\": formatMonth,\n    \"c\": null,\n    \"d\": formatDayOfMonth,\n    \"e\": formatDayOfMonth,\n    \"f\": formatMicroseconds,\n    \"g\": formatYearISO,\n    \"G\": formatFullYearISO,\n    \"H\": formatHour24,\n    \"I\": formatHour12,\n    \"j\": formatDayOfYear,\n    \"L\": formatMilliseconds,\n    \"m\": formatMonthNumber,\n    \"M\": formatMinutes,\n    \"p\": formatPeriod,\n    \"q\": formatQuarter,\n    \"Q\": formatUnixTimestamp,\n    \"s\": formatUnixTimestampSeconds,\n    \"S\": formatSeconds,\n    \"u\": formatWeekdayNumberMonday,\n    \"U\": formatWeekNumberSunday,\n    \"V\": formatWeekNumberISO,\n    \"w\": formatWeekdayNumberSunday,\n    \"W\": formatWeekNumberMonday,\n    \"x\": null,\n    \"X\": null,\n    \"y\": formatYear,\n    \"Y\": formatFullYear,\n    \"Z\": formatZone,\n    \"%\": formatLiteralPercent\n  };\n\n  var utcFormats = {\n    \"a\": formatUTCShortWeekday,\n    \"A\": formatUTCWeekday,\n    \"b\": formatUTCShortMonth,\n    \"B\": formatUTCMonth,\n    \"c\": null,\n    \"d\": formatUTCDayOfMonth,\n    \"e\": formatUTCDayOfMonth,\n    \"f\": formatUTCMicroseconds,\n    \"g\": formatUTCYearISO,\n    \"G\": formatUTCFullYearISO,\n    \"H\": formatUTCHour24,\n    \"I\": formatUTCHour12,\n    \"j\": formatUTCDayOfYear,\n    \"L\": formatUTCMilliseconds,\n    \"m\": formatUTCMonthNumber,\n    \"M\": formatUTCMinutes,\n    \"p\": formatUTCPeriod,\n    \"q\": formatUTCQuarter,\n    \"Q\": formatUnixTimestamp,\n    \"s\": formatUnixTimestampSeconds,\n    \"S\": formatUTCSeconds,\n    \"u\": formatUTCWeekdayNumberMonday,\n    \"U\": formatUTCWeekNumberSunday,\n    \"V\": formatUTCWeekNumberISO,\n    \"w\": formatUTCWeekdayNumberSunday,\n    \"W\": formatUTCWeekNumberMonday,\n    \"x\": null,\n    \"X\": null,\n    \"y\": formatUTCYear,\n    \"Y\": formatUTCFullYear,\n    \"Z\": formatUTCZone,\n    \"%\": formatLiteralPercent\n  };\n\n  var parses = {\n    \"a\": parseShortWeekday,\n    \"A\": parseWeekday,\n    \"b\": parseShortMonth,\n    \"B\": parseMonth,\n    \"c\": parseLocaleDateTime,\n    \"d\": parseDayOfMonth,\n    \"e\": parseDayOfMonth,\n    \"f\": parseMicroseconds,\n    \"g\": parseYear,\n    \"G\": parseFullYear,\n    \"H\": parseHour24,\n    \"I\": parseHour24,\n    \"j\": parseDayOfYear,\n    \"L\": parseMilliseconds,\n    \"m\": parseMonthNumber,\n    \"M\": parseMinutes,\n    \"p\": parsePeriod,\n    \"q\": parseQuarter,\n    \"Q\": parseUnixTimestamp,\n    \"s\": parseUnixTimestampSeconds,\n    \"S\": parseSeconds,\n    \"u\": parseWeekdayNumberMonday,\n    \"U\": parseWeekNumberSunday,\n    \"V\": parseWeekNumberISO,\n    \"w\": parseWeekdayNumberSunday,\n    \"W\": parseWeekNumberMonday,\n    \"x\": parseLocaleDate,\n    \"X\": parseLocaleTime,\n    \"y\": parseYear,\n    \"Y\": parseFullYear,\n    \"Z\": parseZone,\n    \"%\": parseLiteralPercent\n  };\n\n  // These recursive directive definitions must be deferred.\n  formats.x = newFormat(locale_date, formats);\n  formats.X = newFormat(locale_time, formats);\n  formats.c = newFormat(locale_dateTime, formats);\n  utcFormats.x = newFormat(locale_date, utcFormats);\n  utcFormats.X = newFormat(locale_time, utcFormats);\n  utcFormats.c = newFormat(locale_dateTime, utcFormats);\n\n  function newFormat(specifier, formats) {\n    return function(date) {\n      var string = [],\n          i = -1,\n          j = 0,\n          n = specifier.length,\n          c,\n          pad,\n          format;\n\n      if (!(date instanceof Date)) date = new Date(+date);\n\n      while (++i < n) {\n        if (specifier.charCodeAt(i) === 37) {\n          string.push(specifier.slice(j, i));\n          if ((pad = pads[c = specifier.charAt(++i)]) != null) c = specifier.charAt(++i);\n          else pad = c === \"e\" ? \" \" : \"0\";\n          if (format = formats[c]) c = format(date, pad);\n          string.push(c);\n          j = i + 1;\n        }\n      }\n\n      string.push(specifier.slice(j, i));\n      return string.join(\"\");\n    };\n  }\n\n  function newParse(specifier, Z) {\n    return function(string) {\n      var d = newDate(1900, undefined, 1),\n          i = parseSpecifier(d, specifier, string += \"\", 0),\n          week, day;\n      if (i != string.length) return null;\n\n      // If a UNIX timestamp is specified, return it.\n      if (\"Q\" in d) return new Date(d.Q);\n      if (\"s\" in d) return new Date(d.s * 1000 + (\"L\" in d ? d.L : 0));\n\n      // If this is utcParse, never use the local timezone.\n      if (Z && !(\"Z\" in d)) d.Z = 0;\n\n      // The am-pm flag is 0 for AM, and 1 for PM.\n      if (\"p\" in d) d.H = d.H % 12 + d.p * 12;\n\n      // If the month was not specified, inherit from the quarter.\n      if (d.m === undefined) d.m = \"q\" in d ? d.q : 0;\n\n      // Convert day-of-week and week-of-year to day-of-year.\n      if (\"V\" in d) {\n        if (d.V < 1 || d.V > 53) return null;\n        if (!(\"w\" in d)) d.w = 1;\n        if (\"Z\" in d) {\n          week = utcDate(newDate(d.y, 0, 1)), day = week.getUTCDay();\n          week = day > 4 || day === 0 ? d3_time__WEBPACK_IMPORTED_MODULE_0__[\"utcMonday\"].ceil(week) : Object(d3_time__WEBPACK_IMPORTED_MODULE_0__[\"utcMonday\"])(week);\n          week = d3_time__WEBPACK_IMPORTED_MODULE_0__[\"utcDay\"].offset(week, (d.V - 1) * 7);\n          d.y = week.getUTCFullYear();\n          d.m = week.getUTCMonth();\n          d.d = week.getUTCDate() + (d.w + 6) % 7;\n        } else {\n          week = localDate(newDate(d.y, 0, 1)), day = week.getDay();\n          week = day > 4 || day === 0 ? d3_time__WEBPACK_IMPORTED_MODULE_0__[\"timeMonday\"].ceil(week) : Object(d3_time__WEBPACK_IMPORTED_MODULE_0__[\"timeMonday\"])(week);\n          week = d3_time__WEBPACK_IMPORTED_MODULE_0__[\"timeDay\"].offset(week, (d.V - 1) * 7);\n          d.y = week.getFullYear();\n          d.m = week.getMonth();\n          d.d = week.getDate() + (d.w + 6) % 7;\n        }\n      } else if (\"W\" in d || \"U\" in d) {\n        if (!(\"w\" in d)) d.w = \"u\" in d ? d.u % 7 : \"W\" in d ? 1 : 0;\n        day = \"Z\" in d ? utcDate(newDate(d.y, 0, 1)).getUTCDay() : localDate(newDate(d.y, 0, 1)).getDay();\n        d.m = 0;\n        d.d = \"W\" in d ? (d.w + 6) % 7 + d.W * 7 - (day + 5) % 7 : d.w + d.U * 7 - (day + 6) % 7;\n      }\n\n      // If a time zone is specified, all fields are interpreted as UTC and then\n      // offset according to the specified time zone.\n      if (\"Z\" in d) {\n        d.H += d.Z / 100 | 0;\n        d.M += d.Z % 100;\n        return utcDate(d);\n      }\n\n      // Otherwise, all fields are in local time.\n      return localDate(d);\n    };\n  }\n\n  function parseSpecifier(d, specifier, string, j) {\n    var i = 0,\n        n = specifier.length,\n        m = string.length,\n        c,\n        parse;\n\n    while (i < n) {\n      if (j >= m) return -1;\n      c = specifier.charCodeAt(i++);\n      if (c === 37) {\n        c = specifier.charAt(i++);\n        parse = parses[c in pads ? specifier.charAt(i++) : c];\n        if (!parse || ((j = parse(d, string, j)) < 0)) return -1;\n      } else if (c != string.charCodeAt(j++)) {\n        return -1;\n      }\n    }\n\n    return j;\n  }\n\n  function parsePeriod(d, string, i) {\n    var n = periodRe.exec(string.slice(i));\n    return n ? (d.p = periodLookup.get(n[0].toLowerCase()), i + n[0].length) : -1;\n  }\n\n  function parseShortWeekday(d, string, i) {\n    var n = shortWeekdayRe.exec(string.slice(i));\n    return n ? (d.w = shortWeekdayLookup.get(n[0].toLowerCase()), i + n[0].length) : -1;\n  }\n\n  function parseWeekday(d, string, i) {\n    var n = weekdayRe.exec(string.slice(i));\n    return n ? (d.w = weekdayLookup.get(n[0].toLowerCase()), i + n[0].length) : -1;\n  }\n\n  function parseShortMonth(d, string, i) {\n    var n = shortMonthRe.exec(string.slice(i));\n    return n ? (d.m = shortMonthLookup.get(n[0].toLowerCase()), i + n[0].length) : -1;\n  }\n\n  function parseMonth(d, string, i) {\n    var n = monthRe.exec(string.slice(i));\n    return n ? (d.m = monthLookup.get(n[0].toLowerCase()), i + n[0].length) : -1;\n  }\n\n  function parseLocaleDateTime(d, string, i) {\n    return parseSpecifier(d, locale_dateTime, string, i);\n  }\n\n  function parseLocaleDate(d, string, i) {\n    return parseSpecifier(d, locale_date, string, i);\n  }\n\n  function parseLocaleTime(d, string, i) {\n    return parseSpecifier(d, locale_time, string, i);\n  }\n\n  function formatShortWeekday(d) {\n    return locale_shortWeekdays[d.getDay()];\n  }\n\n  function formatWeekday(d) {\n    return locale_weekdays[d.getDay()];\n  }\n\n  function formatShortMonth(d) {\n    return locale_shortMonths[d.getMonth()];\n  }\n\n  function formatMonth(d) {\n    return locale_months[d.getMonth()];\n  }\n\n  function formatPeriod(d) {\n    return locale_periods[+(d.getHours() >= 12)];\n  }\n\n  function formatQuarter(d) {\n    return 1 + ~~(d.getMonth() / 3);\n  }\n\n  function formatUTCShortWeekday(d) {\n    return locale_shortWeekdays[d.getUTCDay()];\n  }\n\n  function formatUTCWeekday(d) {\n    return locale_weekdays[d.getUTCDay()];\n  }\n\n  function formatUTCShortMonth(d) {\n    return locale_shortMonths[d.getUTCMonth()];\n  }\n\n  function formatUTCMonth(d) {\n    return locale_months[d.getUTCMonth()];\n  }\n\n  function formatUTCPeriod(d) {\n    return locale_periods[+(d.getUTCHours() >= 12)];\n  }\n\n  function formatUTCQuarter(d) {\n    return 1 + ~~(d.getUTCMonth() / 3);\n  }\n\n  return {\n    format: function(specifier) {\n      var f = newFormat(specifier += \"\", formats);\n      f.toString = function() { return specifier; };\n      return f;\n    },\n    parse: function(specifier) {\n      var p = newParse(specifier += \"\", false);\n      p.toString = function() { return specifier; };\n      return p;\n    },\n    utcFormat: function(specifier) {\n      var f = newFormat(specifier += \"\", utcFormats);\n      f.toString = function() { return specifier; };\n      return f;\n    },\n    utcParse: function(specifier) {\n      var p = newParse(specifier += \"\", true);\n      p.toString = function() { return specifier; };\n      return p;\n    }\n  };\n}\n\nvar pads = {\"-\": \"\", \"_\": \" \", \"0\": \"0\"},\n    numberRe = /^\\s*\\d+/, // note: ignores next directive\n    percentRe = /^%/,\n    requoteRe = /[\\\\^$*+?|[\\]().{}]/g;\n\nfunction pad(value, fill, width) {\n  var sign = value < 0 ? \"-\" : \"\",\n      string = (sign ? -value : value) + \"\",\n      length = string.length;\n  return sign + (length < width ? new Array(width - length + 1).join(fill) + string : string);\n}\n\nfunction requote(s) {\n  return s.replace(requoteRe, \"\\\\$&\");\n}\n\nfunction formatRe(names) {\n  return new RegExp(\"^(?:\" + names.map(requote).join(\"|\") + \")\", \"i\");\n}\n\nfunction formatLookup(names) {\n  return new Map(names.map((name, i) => [name.toLowerCase(), i]));\n}\n\nfunction parseWeekdayNumberSunday(d, string, i) {\n  var n = numberRe.exec(string.slice(i, i + 1));\n  return n ? (d.w = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseWeekdayNumberMonday(d, string, i) {\n  var n = numberRe.exec(string.slice(i, i + 1));\n  return n ? (d.u = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseWeekNumberSunday(d, string, i) {\n  var n = numberRe.exec(string.slice(i, i + 2));\n  return n ? (d.U = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseWeekNumberISO(d, string, i) {\n  var n = numberRe.exec(string.slice(i, i + 2));\n  return n ? (d.V = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseWeekNumberMonday(d, string, i) {\n  var n = numberRe.exec(string.slice(i, i + 2));\n  return n ? (d.W = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseFullYear(d, string, i) {\n  var n = numberRe.exec(string.slice(i, i + 4));\n  return n ? (d.y = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseYear(d, string, i) {\n  var n = numberRe.exec(string.slice(i, i + 2));\n  return n ? (d.y = +n[0] + (+n[0] > 68 ? 1900 : 2000), i + n[0].length) : -1;\n}\n\nfunction parseZone(d, string, i) {\n  var n = /^(Z)|([+-]\\d\\d)(?::?(\\d\\d))?/.exec(string.slice(i, i + 6));\n  return n ? (d.Z = n[1] ? 0 : -(n[2] + (n[3] || \"00\")), i + n[0].length) : -1;\n}\n\nfunction parseQuarter(d, string, i) {\n  var n = numberRe.exec(string.slice(i, i + 1));\n  return n ? (d.q = n[0] * 3 - 3, i + n[0].length) : -1;\n}\n\nfunction parseMonthNumber(d, string, i) {\n  var n = numberRe.exec(string.slice(i, i + 2));\n  return n ? (d.m = n[0] - 1, i + n[0].length) : -1;\n}\n\nfunction parseDayOfMonth(d, string, i) {\n  var n = numberRe.exec(string.slice(i, i + 2));\n  return n ? (d.d = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseDayOfYear(d, string, i) {\n  var n = numberRe.exec(string.slice(i, i + 3));\n  return n ? (d.m = 0, d.d = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseHour24(d, string, i) {\n  var n = numberRe.exec(string.slice(i, i + 2));\n  return n ? (d.H = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseMinutes(d, string, i) {\n  var n = numberRe.exec(string.slice(i, i + 2));\n  return n ? (d.M = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseSeconds(d, string, i) {\n  var n = numberRe.exec(string.slice(i, i + 2));\n  return n ? (d.S = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseMilliseconds(d, string, i) {\n  var n = numberRe.exec(string.slice(i, i + 3));\n  return n ? (d.L = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseMicroseconds(d, string, i) {\n  var n = numberRe.exec(string.slice(i, i + 6));\n  return n ? (d.L = Math.floor(n[0] / 1000), i + n[0].length) : -1;\n}\n\nfunction parseLiteralPercent(d, string, i) {\n  var n = percentRe.exec(string.slice(i, i + 1));\n  return n ? i + n[0].length : -1;\n}\n\nfunction parseUnixTimestamp(d, string, i) {\n  var n = numberRe.exec(string.slice(i));\n  return n ? (d.Q = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseUnixTimestampSeconds(d, string, i) {\n  var n = numberRe.exec(string.slice(i));\n  return n ? (d.s = +n[0], i + n[0].length) : -1;\n}\n\nfunction formatDayOfMonth(d, p) {\n  return pad(d.getDate(), p, 2);\n}\n\nfunction formatHour24(d, p) {\n  return pad(d.getHours(), p, 2);\n}\n\nfunction formatHour12(d, p) {\n  return pad(d.getHours() % 12 || 12, p, 2);\n}\n\nfunction formatDayOfYear(d, p) {\n  return pad(1 + d3_time__WEBPACK_IMPORTED_MODULE_0__[\"timeDay\"].count(Object(d3_time__WEBPACK_IMPORTED_MODULE_0__[\"timeYear\"])(d), d), p, 3);\n}\n\nfunction formatMilliseconds(d, p) {\n  return pad(d.getMilliseconds(), p, 3);\n}\n\nfunction formatMicroseconds(d, p) {\n  return formatMilliseconds(d, p) + \"000\";\n}\n\nfunction formatMonthNumber(d, p) {\n  return pad(d.getMonth() + 1, p, 2);\n}\n\nfunction formatMinutes(d, p) {\n  return pad(d.getMinutes(), p, 2);\n}\n\nfunction formatSeconds(d, p) {\n  return pad(d.getSeconds(), p, 2);\n}\n\nfunction formatWeekdayNumberMonday(d) {\n  var day = d.getDay();\n  return day === 0 ? 7 : day;\n}\n\nfunction formatWeekNumberSunday(d, p) {\n  return pad(d3_time__WEBPACK_IMPORTED_MODULE_0__[\"timeSunday\"].count(Object(d3_time__WEBPACK_IMPORTED_MODULE_0__[\"timeYear\"])(d) - 1, d), p, 2);\n}\n\nfunction dISO(d) {\n  var day = d.getDay();\n  return (day >= 4 || day === 0) ? Object(d3_time__WEBPACK_IMPORTED_MODULE_0__[\"timeThursday\"])(d) : d3_time__WEBPACK_IMPORTED_MODULE_0__[\"timeThursday\"].ceil(d);\n}\n\nfunction formatWeekNumberISO(d, p) {\n  d = dISO(d);\n  return pad(d3_time__WEBPACK_IMPORTED_MODULE_0__[\"timeThursday\"].count(Object(d3_time__WEBPACK_IMPORTED_MODULE_0__[\"timeYear\"])(d), d) + (Object(d3_time__WEBPACK_IMPORTED_MODULE_0__[\"timeYear\"])(d).getDay() === 4), p, 2);\n}\n\nfunction formatWeekdayNumberSunday(d) {\n  return d.getDay();\n}\n\nfunction formatWeekNumberMonday(d, p) {\n  return pad(d3_time__WEBPACK_IMPORTED_MODULE_0__[\"timeMonday\"].count(Object(d3_time__WEBPACK_IMPORTED_MODULE_0__[\"timeYear\"])(d) - 1, d), p, 2);\n}\n\nfunction formatYear(d, p) {\n  return pad(d.getFullYear() % 100, p, 2);\n}\n\nfunction formatYearISO(d, p) {\n  d = dISO(d);\n  return pad(d.getFullYear() % 100, p, 2);\n}\n\nfunction formatFullYear(d, p) {\n  return pad(d.getFullYear() % 10000, p, 4);\n}\n\nfunction formatFullYearISO(d, p) {\n  var day = d.getDay();\n  d = (day >= 4 || day === 0) ? Object(d3_time__WEBPACK_IMPORTED_MODULE_0__[\"timeThursday\"])(d) : d3_time__WEBPACK_IMPORTED_MODULE_0__[\"timeThursday\"].ceil(d);\n  return pad(d.getFullYear() % 10000, p, 4);\n}\n\nfunction formatZone(d) {\n  var z = d.getTimezoneOffset();\n  return (z > 0 ? \"-\" : (z *= -1, \"+\"))\n      + pad(z / 60 | 0, \"0\", 2)\n      + pad(z % 60, \"0\", 2);\n}\n\nfunction formatUTCDayOfMonth(d, p) {\n  return pad(d.getUTCDate(), p, 2);\n}\n\nfunction formatUTCHour24(d, p) {\n  return pad(d.getUTCHours(), p, 2);\n}\n\nfunction formatUTCHour12(d, p) {\n  return pad(d.getUTCHours() % 12 || 12, p, 2);\n}\n\nfunction formatUTCDayOfYear(d, p) {\n  return pad(1 + d3_time__WEBPACK_IMPORTED_MODULE_0__[\"utcDay\"].count(Object(d3_time__WEBPACK_IMPORTED_MODULE_0__[\"utcYear\"])(d), d), p, 3);\n}\n\nfunction formatUTCMilliseconds(d, p) {\n  return pad(d.getUTCMilliseconds(), p, 3);\n}\n\nfunction formatUTCMicroseconds(d, p) {\n  return formatUTCMilliseconds(d, p) + \"000\";\n}\n\nfunction formatUTCMonthNumber(d, p) {\n  return pad(d.getUTCMonth() + 1, p, 2);\n}\n\nfunction formatUTCMinutes(d, p) {\n  return pad(d.getUTCMinutes(), p, 2);\n}\n\nfunction formatUTCSeconds(d, p) {\n  return pad(d.getUTCSeconds(), p, 2);\n}\n\nfunction formatUTCWeekdayNumberMonday(d) {\n  var dow = d.getUTCDay();\n  return dow === 0 ? 7 : dow;\n}\n\nfunction formatUTCWeekNumberSunday(d, p) {\n  return pad(d3_time__WEBPACK_IMPORTED_MODULE_0__[\"utcSunday\"].count(Object(d3_time__WEBPACK_IMPORTED_MODULE_0__[\"utcYear\"])(d) - 1, d), p, 2);\n}\n\nfunction UTCdISO(d) {\n  var day = d.getUTCDay();\n  return (day >= 4 || day === 0) ? Object(d3_time__WEBPACK_IMPORTED_MODULE_0__[\"utcThursday\"])(d) : d3_time__WEBPACK_IMPORTED_MODULE_0__[\"utcThursday\"].ceil(d);\n}\n\nfunction formatUTCWeekNumberISO(d, p) {\n  d = UTCdISO(d);\n  return pad(d3_time__WEBPACK_IMPORTED_MODULE_0__[\"utcThursday\"].count(Object(d3_time__WEBPACK_IMPORTED_MODULE_0__[\"utcYear\"])(d), d) + (Object(d3_time__WEBPACK_IMPORTED_MODULE_0__[\"utcYear\"])(d).getUTCDay() === 4), p, 2);\n}\n\nfunction formatUTCWeekdayNumberSunday(d) {\n  return d.getUTCDay();\n}\n\nfunction formatUTCWeekNumberMonday(d, p) {\n  return pad(d3_time__WEBPACK_IMPORTED_MODULE_0__[\"utcMonday\"].count(Object(d3_time__WEBPACK_IMPORTED_MODULE_0__[\"utcYear\"])(d) - 1, d), p, 2);\n}\n\nfunction formatUTCYear(d, p) {\n  return pad(d.getUTCFullYear() % 100, p, 2);\n}\n\nfunction formatUTCYearISO(d, p) {\n  d = UTCdISO(d);\n  return pad(d.getUTCFullYear() % 100, p, 2);\n}\n\nfunction formatUTCFullYear(d, p) {\n  return pad(d.getUTCFullYear() % 10000, p, 4);\n}\n\nfunction formatUTCFullYearISO(d, p) {\n  var day = d.getUTCDay();\n  d = (day >= 4 || day === 0) ? Object(d3_time__WEBPACK_IMPORTED_MODULE_0__[\"utcThursday\"])(d) : d3_time__WEBPACK_IMPORTED_MODULE_0__[\"utcThursday\"].ceil(d);\n  return pad(d.getUTCFullYear() % 10000, p, 4);\n}\n\nfunction formatUTCZone() {\n  return \"+0000\";\n}\n\nfunction formatLiteralPercent() {\n  return \"%\";\n}\n\nfunction formatUnixTimestamp(d) {\n  return +d;\n}\n\nfunction formatUnixTimestampSeconds(d) {\n  return Math.floor(+d / 1000);\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-time/src/day.js\":\n/*!*********************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-time/src/day.js ***!\n  \\*********************************************************/\n/*! exports provided: default, days */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"days\", function() { return days; });\n/* harmony import */ var _interval_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./interval.js */ \"./node_modules/d3/node_modules/d3-time/src/interval.js\");\n/* harmony import */ var _duration_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./duration.js */ \"./node_modules/d3/node_modules/d3-time/src/duration.js\");\n\n\n\nvar day = Object(_interval_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(\n  date => date.setHours(0, 0, 0, 0),\n  (date, step) => date.setDate(date.getDate() + step),\n  (start, end) => (end - start - (end.getTimezoneOffset() - start.getTimezoneOffset()) * _duration_js__WEBPACK_IMPORTED_MODULE_1__[\"durationMinute\"]) / _duration_js__WEBPACK_IMPORTED_MODULE_1__[\"durationDay\"],\n  date => date.getDate() - 1\n);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (day);\nvar days = day.range;\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-time/src/duration.js\":\n/*!**************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-time/src/duration.js ***!\n  \\**************************************************************/\n/*! exports provided: durationSecond, durationMinute, durationHour, durationDay, durationWeek, durationMonth, durationYear */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"durationSecond\", function() { return durationSecond; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"durationMinute\", function() { return durationMinute; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"durationHour\", function() { return durationHour; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"durationDay\", function() { return durationDay; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"durationWeek\", function() { return durationWeek; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"durationMonth\", function() { return durationMonth; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"durationYear\", function() { return durationYear; });\nconst durationSecond = 1000;\nconst durationMinute = durationSecond * 60;\nconst durationHour = durationMinute * 60;\nconst durationDay = durationHour * 24;\nconst durationWeek = durationDay * 7;\nconst durationMonth = durationDay * 30;\nconst durationYear = durationDay * 365;\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-time/src/hour.js\":\n/*!**********************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-time/src/hour.js ***!\n  \\**********************************************************/\n/*! exports provided: default, hours */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"hours\", function() { return hours; });\n/* harmony import */ var _interval_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./interval.js */ \"./node_modules/d3/node_modules/d3-time/src/interval.js\");\n/* harmony import */ var _duration_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./duration.js */ \"./node_modules/d3/node_modules/d3-time/src/duration.js\");\n\n\n\nvar hour = Object(_interval_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function(date) {\n  date.setTime(date - date.getMilliseconds() - date.getSeconds() * _duration_js__WEBPACK_IMPORTED_MODULE_1__[\"durationSecond\"] - date.getMinutes() * _duration_js__WEBPACK_IMPORTED_MODULE_1__[\"durationMinute\"]);\n}, function(date, step) {\n  date.setTime(+date + step * _duration_js__WEBPACK_IMPORTED_MODULE_1__[\"durationHour\"]);\n}, function(start, end) {\n  return (end - start) / _duration_js__WEBPACK_IMPORTED_MODULE_1__[\"durationHour\"];\n}, function(date) {\n  return date.getHours();\n});\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (hour);\nvar hours = hour.range;\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-time/src/index.js\":\n/*!***********************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-time/src/index.js ***!\n  \\***********************************************************/\n/*! exports provided: timeInterval, timeMillisecond, timeMilliseconds, utcMillisecond, utcMilliseconds, timeSecond, timeSeconds, utcSecond, utcSeconds, timeMinute, timeMinutes, timeHour, timeHours, timeDay, timeDays, timeWeek, timeWeeks, timeSunday, timeSundays, timeMonday, timeMondays, timeTuesday, timeTuesdays, timeWednesday, timeWednesdays, timeThursday, timeThursdays, timeFriday, timeFridays, timeSaturday, timeSaturdays, timeMonth, timeMonths, timeYear, timeYears, utcMinute, utcMinutes, utcHour, utcHours, utcDay, utcDays, utcWeek, utcWeeks, utcSunday, utcSundays, utcMonday, utcMondays, utcTuesday, utcTuesdays, utcWednesday, utcWednesdays, utcThursday, utcThursdays, utcFriday, utcFridays, utcSaturday, utcSaturdays, utcMonth, utcMonths, utcYear, utcYears, utcTicks, utcTickInterval, timeTicks, timeTickInterval */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _interval_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./interval.js */ \"./node_modules/d3/node_modules/d3-time/src/interval.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeInterval\", function() { return _interval_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n/* harmony import */ var _millisecond_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./millisecond.js */ \"./node_modules/d3/node_modules/d3-time/src/millisecond.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeMillisecond\", function() { return _millisecond_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeMilliseconds\", function() { return _millisecond_js__WEBPACK_IMPORTED_MODULE_1__[\"milliseconds\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcMillisecond\", function() { return _millisecond_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcMilliseconds\", function() { return _millisecond_js__WEBPACK_IMPORTED_MODULE_1__[\"milliseconds\"]; });\n\n/* harmony import */ var _second_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./second.js */ \"./node_modules/d3/node_modules/d3-time/src/second.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeSecond\", function() { return _second_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeSeconds\", function() { return _second_js__WEBPACK_IMPORTED_MODULE_2__[\"seconds\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcSecond\", function() { return _second_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcSeconds\", function() { return _second_js__WEBPACK_IMPORTED_MODULE_2__[\"seconds\"]; });\n\n/* harmony import */ var _minute_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./minute.js */ \"./node_modules/d3/node_modules/d3-time/src/minute.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeMinute\", function() { return _minute_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeMinutes\", function() { return _minute_js__WEBPACK_IMPORTED_MODULE_3__[\"minutes\"]; });\n\n/* harmony import */ var _hour_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./hour.js */ \"./node_modules/d3/node_modules/d3-time/src/hour.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeHour\", function() { return _hour_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeHours\", function() { return _hour_js__WEBPACK_IMPORTED_MODULE_4__[\"hours\"]; });\n\n/* harmony import */ var _day_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./day.js */ \"./node_modules/d3/node_modules/d3-time/src/day.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeDay\", function() { return _day_js__WEBPACK_IMPORTED_MODULE_5__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeDays\", function() { return _day_js__WEBPACK_IMPORTED_MODULE_5__[\"days\"]; });\n\n/* harmony import */ var _week_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./week.js */ \"./node_modules/d3/node_modules/d3-time/src/week.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeWeek\", function() { return _week_js__WEBPACK_IMPORTED_MODULE_6__[\"sunday\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeWeeks\", function() { return _week_js__WEBPACK_IMPORTED_MODULE_6__[\"sundays\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeSunday\", function() { return _week_js__WEBPACK_IMPORTED_MODULE_6__[\"sunday\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeSundays\", function() { return _week_js__WEBPACK_IMPORTED_MODULE_6__[\"sundays\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeMonday\", function() { return _week_js__WEBPACK_IMPORTED_MODULE_6__[\"monday\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeMondays\", function() { return _week_js__WEBPACK_IMPORTED_MODULE_6__[\"mondays\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeTuesday\", function() { return _week_js__WEBPACK_IMPORTED_MODULE_6__[\"tuesday\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeTuesdays\", function() { return _week_js__WEBPACK_IMPORTED_MODULE_6__[\"tuesdays\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeWednesday\", function() { return _week_js__WEBPACK_IMPORTED_MODULE_6__[\"wednesday\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeWednesdays\", function() { return _week_js__WEBPACK_IMPORTED_MODULE_6__[\"wednesdays\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeThursday\", function() { return _week_js__WEBPACK_IMPORTED_MODULE_6__[\"thursday\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeThursdays\", function() { return _week_js__WEBPACK_IMPORTED_MODULE_6__[\"thursdays\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeFriday\", function() { return _week_js__WEBPACK_IMPORTED_MODULE_6__[\"friday\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeFridays\", function() { return _week_js__WEBPACK_IMPORTED_MODULE_6__[\"fridays\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeSaturday\", function() { return _week_js__WEBPACK_IMPORTED_MODULE_6__[\"saturday\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeSaturdays\", function() { return _week_js__WEBPACK_IMPORTED_MODULE_6__[\"saturdays\"]; });\n\n/* harmony import */ var _month_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./month.js */ \"./node_modules/d3/node_modules/d3-time/src/month.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeMonth\", function() { return _month_js__WEBPACK_IMPORTED_MODULE_7__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeMonths\", function() { return _month_js__WEBPACK_IMPORTED_MODULE_7__[\"months\"]; });\n\n/* harmony import */ var _year_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./year.js */ \"./node_modules/d3/node_modules/d3-time/src/year.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeYear\", function() { return _year_js__WEBPACK_IMPORTED_MODULE_8__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeYears\", function() { return _year_js__WEBPACK_IMPORTED_MODULE_8__[\"years\"]; });\n\n/* harmony import */ var _utcMinute_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./utcMinute.js */ \"./node_modules/d3/node_modules/d3-time/src/utcMinute.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcMinute\", function() { return _utcMinute_js__WEBPACK_IMPORTED_MODULE_9__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcMinutes\", function() { return _utcMinute_js__WEBPACK_IMPORTED_MODULE_9__[\"utcMinutes\"]; });\n\n/* harmony import */ var _utcHour_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./utcHour.js */ \"./node_modules/d3/node_modules/d3-time/src/utcHour.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcHour\", function() { return _utcHour_js__WEBPACK_IMPORTED_MODULE_10__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcHours\", function() { return _utcHour_js__WEBPACK_IMPORTED_MODULE_10__[\"utcHours\"]; });\n\n/* harmony import */ var _utcDay_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./utcDay.js */ \"./node_modules/d3/node_modules/d3-time/src/utcDay.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcDay\", function() { return _utcDay_js__WEBPACK_IMPORTED_MODULE_11__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcDays\", function() { return _utcDay_js__WEBPACK_IMPORTED_MODULE_11__[\"utcDays\"]; });\n\n/* harmony import */ var _utcWeek_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./utcWeek.js */ \"./node_modules/d3/node_modules/d3-time/src/utcWeek.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcWeek\", function() { return _utcWeek_js__WEBPACK_IMPORTED_MODULE_12__[\"utcSunday\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcWeeks\", function() { return _utcWeek_js__WEBPACK_IMPORTED_MODULE_12__[\"utcSundays\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcSunday\", function() { return _utcWeek_js__WEBPACK_IMPORTED_MODULE_12__[\"utcSunday\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcSundays\", function() { return _utcWeek_js__WEBPACK_IMPORTED_MODULE_12__[\"utcSundays\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcMonday\", function() { return _utcWeek_js__WEBPACK_IMPORTED_MODULE_12__[\"utcMonday\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcMondays\", function() { return _utcWeek_js__WEBPACK_IMPORTED_MODULE_12__[\"utcMondays\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcTuesday\", function() { return _utcWeek_js__WEBPACK_IMPORTED_MODULE_12__[\"utcTuesday\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcTuesdays\", function() { return _utcWeek_js__WEBPACK_IMPORTED_MODULE_12__[\"utcTuesdays\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcWednesday\", function() { return _utcWeek_js__WEBPACK_IMPORTED_MODULE_12__[\"utcWednesday\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcWednesdays\", function() { return _utcWeek_js__WEBPACK_IMPORTED_MODULE_12__[\"utcWednesdays\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcThursday\", function() { return _utcWeek_js__WEBPACK_IMPORTED_MODULE_12__[\"utcThursday\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcThursdays\", function() { return _utcWeek_js__WEBPACK_IMPORTED_MODULE_12__[\"utcThursdays\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcFriday\", function() { return _utcWeek_js__WEBPACK_IMPORTED_MODULE_12__[\"utcFriday\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcFridays\", function() { return _utcWeek_js__WEBPACK_IMPORTED_MODULE_12__[\"utcFridays\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcSaturday\", function() { return _utcWeek_js__WEBPACK_IMPORTED_MODULE_12__[\"utcSaturday\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcSaturdays\", function() { return _utcWeek_js__WEBPACK_IMPORTED_MODULE_12__[\"utcSaturdays\"]; });\n\n/* harmony import */ var _utcMonth_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./utcMonth.js */ \"./node_modules/d3/node_modules/d3-time/src/utcMonth.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcMonth\", function() { return _utcMonth_js__WEBPACK_IMPORTED_MODULE_13__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcMonths\", function() { return _utcMonth_js__WEBPACK_IMPORTED_MODULE_13__[\"utcMonths\"]; });\n\n/* harmony import */ var _utcYear_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./utcYear.js */ \"./node_modules/d3/node_modules/d3-time/src/utcYear.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcYear\", function() { return _utcYear_js__WEBPACK_IMPORTED_MODULE_14__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcYears\", function() { return _utcYear_js__WEBPACK_IMPORTED_MODULE_14__[\"utcYears\"]; });\n\n/* harmony import */ var _ticks_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./ticks.js */ \"./node_modules/d3/node_modules/d3-time/src/ticks.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcTicks\", function() { return _ticks_js__WEBPACK_IMPORTED_MODULE_15__[\"utcTicks\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcTickInterval\", function() { return _ticks_js__WEBPACK_IMPORTED_MODULE_15__[\"utcTickInterval\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeTicks\", function() { return _ticks_js__WEBPACK_IMPORTED_MODULE_15__[\"timeTicks\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeTickInterval\", function() { return _ticks_js__WEBPACK_IMPORTED_MODULE_15__[\"timeTickInterval\"]; });\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-time/src/interval.js\":\n/*!**************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-time/src/interval.js ***!\n  \\**************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return newInterval; });\nvar t0 = new Date,\n    t1 = new Date;\n\nfunction newInterval(floori, offseti, count, field) {\n\n  function interval(date) {\n    return floori(date = arguments.length === 0 ? new Date : new Date(+date)), date;\n  }\n\n  interval.floor = function(date) {\n    return floori(date = new Date(+date)), date;\n  };\n\n  interval.ceil = function(date) {\n    return floori(date = new Date(date - 1)), offseti(date, 1), floori(date), date;\n  };\n\n  interval.round = function(date) {\n    var d0 = interval(date),\n        d1 = interval.ceil(date);\n    return date - d0 < d1 - date ? d0 : d1;\n  };\n\n  interval.offset = function(date, step) {\n    return offseti(date = new Date(+date), step == null ? 1 : Math.floor(step)), date;\n  };\n\n  interval.range = function(start, stop, step) {\n    var range = [], previous;\n    start = interval.ceil(start);\n    step = step == null ? 1 : Math.floor(step);\n    if (!(start < stop) || !(step > 0)) return range; // also handles Invalid Date\n    do range.push(previous = new Date(+start)), offseti(start, step), floori(start);\n    while (previous < start && start < stop);\n    return range;\n  };\n\n  interval.filter = function(test) {\n    return newInterval(function(date) {\n      if (date >= date) while (floori(date), !test(date)) date.setTime(date - 1);\n    }, function(date, step) {\n      if (date >= date) {\n        if (step < 0) while (++step <= 0) {\n          while (offseti(date, -1), !test(date)) {} // eslint-disable-line no-empty\n        } else while (--step >= 0) {\n          while (offseti(date, +1), !test(date)) {} // eslint-disable-line no-empty\n        }\n      }\n    });\n  };\n\n  if (count) {\n    interval.count = function(start, end) {\n      t0.setTime(+start), t1.setTime(+end);\n      floori(t0), floori(t1);\n      return Math.floor(count(t0, t1));\n    };\n\n    interval.every = function(step) {\n      step = Math.floor(step);\n      return !isFinite(step) || !(step > 0) ? null\n          : !(step > 1) ? interval\n          : interval.filter(field\n              ? function(d) { return field(d) % step === 0; }\n              : function(d) { return interval.count(0, d) % step === 0; });\n    };\n  }\n\n  return interval;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-time/src/millisecond.js\":\n/*!*****************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-time/src/millisecond.js ***!\n  \\*****************************************************************/\n/*! exports provided: default, milliseconds */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"milliseconds\", function() { return milliseconds; });\n/* harmony import */ var _interval_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./interval.js */ \"./node_modules/d3/node_modules/d3-time/src/interval.js\");\n\n\nvar millisecond = Object(_interval_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function() {\n  // noop\n}, function(date, step) {\n  date.setTime(+date + step);\n}, function(start, end) {\n  return end - start;\n});\n\n// An optimized implementation for this simple case.\nmillisecond.every = function(k) {\n  k = Math.floor(k);\n  if (!isFinite(k) || !(k > 0)) return null;\n  if (!(k > 1)) return millisecond;\n  return Object(_interval_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function(date) {\n    date.setTime(Math.floor(date / k) * k);\n  }, function(date, step) {\n    date.setTime(+date + step * k);\n  }, function(start, end) {\n    return (end - start) / k;\n  });\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (millisecond);\nvar milliseconds = millisecond.range;\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-time/src/minute.js\":\n/*!************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-time/src/minute.js ***!\n  \\************************************************************/\n/*! exports provided: default, minutes */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"minutes\", function() { return minutes; });\n/* harmony import */ var _interval_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./interval.js */ \"./node_modules/d3/node_modules/d3-time/src/interval.js\");\n/* harmony import */ var _duration_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./duration.js */ \"./node_modules/d3/node_modules/d3-time/src/duration.js\");\n\n\n\nvar minute = Object(_interval_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function(date) {\n  date.setTime(date - date.getMilliseconds() - date.getSeconds() * _duration_js__WEBPACK_IMPORTED_MODULE_1__[\"durationSecond\"]);\n}, function(date, step) {\n  date.setTime(+date + step * _duration_js__WEBPACK_IMPORTED_MODULE_1__[\"durationMinute\"]);\n}, function(start, end) {\n  return (end - start) / _duration_js__WEBPACK_IMPORTED_MODULE_1__[\"durationMinute\"];\n}, function(date) {\n  return date.getMinutes();\n});\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (minute);\nvar minutes = minute.range;\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-time/src/month.js\":\n/*!***********************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-time/src/month.js ***!\n  \\***********************************************************/\n/*! exports provided: default, months */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"months\", function() { return months; });\n/* harmony import */ var _interval_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./interval.js */ \"./node_modules/d3/node_modules/d3-time/src/interval.js\");\n\n\nvar month = Object(_interval_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function(date) {\n  date.setDate(1);\n  date.setHours(0, 0, 0, 0);\n}, function(date, step) {\n  date.setMonth(date.getMonth() + step);\n}, function(start, end) {\n  return end.getMonth() - start.getMonth() + (end.getFullYear() - start.getFullYear()) * 12;\n}, function(date) {\n  return date.getMonth();\n});\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (month);\nvar months = month.range;\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-time/src/second.js\":\n/*!************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-time/src/second.js ***!\n  \\************************************************************/\n/*! exports provided: default, seconds */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"seconds\", function() { return seconds; });\n/* harmony import */ var _interval_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./interval.js */ \"./node_modules/d3/node_modules/d3-time/src/interval.js\");\n/* harmony import */ var _duration_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./duration.js */ \"./node_modules/d3/node_modules/d3-time/src/duration.js\");\n\n\n\nvar second = Object(_interval_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function(date) {\n  date.setTime(date - date.getMilliseconds());\n}, function(date, step) {\n  date.setTime(+date + step * _duration_js__WEBPACK_IMPORTED_MODULE_1__[\"durationSecond\"]);\n}, function(start, end) {\n  return (end - start) / _duration_js__WEBPACK_IMPORTED_MODULE_1__[\"durationSecond\"];\n}, function(date) {\n  return date.getUTCSeconds();\n});\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (second);\nvar seconds = second.range;\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-time/src/ticks.js\":\n/*!***********************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-time/src/ticks.js ***!\n  \\***********************************************************/\n/*! exports provided: utcTicks, utcTickInterval, timeTicks, timeTickInterval */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"utcTicks\", function() { return utcTicks; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"utcTickInterval\", function() { return utcTickInterval; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"timeTicks\", function() { return timeTicks; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"timeTickInterval\", function() { return timeTickInterval; });\n/* harmony import */ var d3_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-array */ \"./node_modules/d3/node_modules/d3-array/src/index.js\");\n/* harmony import */ var _duration_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./duration.js */ \"./node_modules/d3/node_modules/d3-time/src/duration.js\");\n/* harmony import */ var _millisecond_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./millisecond.js */ \"./node_modules/d3/node_modules/d3-time/src/millisecond.js\");\n/* harmony import */ var _second_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./second.js */ \"./node_modules/d3/node_modules/d3-time/src/second.js\");\n/* harmony import */ var _minute_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./minute.js */ \"./node_modules/d3/node_modules/d3-time/src/minute.js\");\n/* harmony import */ var _hour_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./hour.js */ \"./node_modules/d3/node_modules/d3-time/src/hour.js\");\n/* harmony import */ var _day_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./day.js */ \"./node_modules/d3/node_modules/d3-time/src/day.js\");\n/* harmony import */ var _week_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./week.js */ \"./node_modules/d3/node_modules/d3-time/src/week.js\");\n/* harmony import */ var _month_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./month.js */ \"./node_modules/d3/node_modules/d3-time/src/month.js\");\n/* harmony import */ var _year_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./year.js */ \"./node_modules/d3/node_modules/d3-time/src/year.js\");\n/* harmony import */ var _utcMinute_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./utcMinute.js */ \"./node_modules/d3/node_modules/d3-time/src/utcMinute.js\");\n/* harmony import */ var _utcHour_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./utcHour.js */ \"./node_modules/d3/node_modules/d3-time/src/utcHour.js\");\n/* harmony import */ var _utcDay_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./utcDay.js */ \"./node_modules/d3/node_modules/d3-time/src/utcDay.js\");\n/* harmony import */ var _utcWeek_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./utcWeek.js */ \"./node_modules/d3/node_modules/d3-time/src/utcWeek.js\");\n/* harmony import */ var _utcMonth_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./utcMonth.js */ \"./node_modules/d3/node_modules/d3-time/src/utcMonth.js\");\n/* harmony import */ var _utcYear_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./utcYear.js */ \"./node_modules/d3/node_modules/d3-time/src/utcYear.js\");\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nfunction ticker(year, month, week, day, hour, minute) {\n\n  const tickIntervals = [\n    [_second_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"],  1,      _duration_js__WEBPACK_IMPORTED_MODULE_1__[\"durationSecond\"]],\n    [_second_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"],  5,  5 * _duration_js__WEBPACK_IMPORTED_MODULE_1__[\"durationSecond\"]],\n    [_second_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"], 15, 15 * _duration_js__WEBPACK_IMPORTED_MODULE_1__[\"durationSecond\"]],\n    [_second_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"], 30, 30 * _duration_js__WEBPACK_IMPORTED_MODULE_1__[\"durationSecond\"]],\n    [minute,  1,      _duration_js__WEBPACK_IMPORTED_MODULE_1__[\"durationMinute\"]],\n    [minute,  5,  5 * _duration_js__WEBPACK_IMPORTED_MODULE_1__[\"durationMinute\"]],\n    [minute, 15, 15 * _duration_js__WEBPACK_IMPORTED_MODULE_1__[\"durationMinute\"]],\n    [minute, 30, 30 * _duration_js__WEBPACK_IMPORTED_MODULE_1__[\"durationMinute\"]],\n    [  hour,  1,      _duration_js__WEBPACK_IMPORTED_MODULE_1__[\"durationHour\"]  ],\n    [  hour,  3,  3 * _duration_js__WEBPACK_IMPORTED_MODULE_1__[\"durationHour\"]  ],\n    [  hour,  6,  6 * _duration_js__WEBPACK_IMPORTED_MODULE_1__[\"durationHour\"]  ],\n    [  hour, 12, 12 * _duration_js__WEBPACK_IMPORTED_MODULE_1__[\"durationHour\"]  ],\n    [   day,  1,      _duration_js__WEBPACK_IMPORTED_MODULE_1__[\"durationDay\"]   ],\n    [   day,  2,  2 * _duration_js__WEBPACK_IMPORTED_MODULE_1__[\"durationDay\"]   ],\n    [  week,  1,      _duration_js__WEBPACK_IMPORTED_MODULE_1__[\"durationWeek\"]  ],\n    [ month,  1,      _duration_js__WEBPACK_IMPORTED_MODULE_1__[\"durationMonth\"] ],\n    [ month,  3,  3 * _duration_js__WEBPACK_IMPORTED_MODULE_1__[\"durationMonth\"] ],\n    [  year,  1,      _duration_js__WEBPACK_IMPORTED_MODULE_1__[\"durationYear\"]  ]\n  ];\n\n  function ticks(start, stop, count) {\n    const reverse = stop < start;\n    if (reverse) [start, stop] = [stop, start];\n    const interval = count && typeof count.range === \"function\" ? count : tickInterval(start, stop, count);\n    const ticks = interval ? interval.range(start, +stop + 1) : []; // inclusive stop\n    return reverse ? ticks.reverse() : ticks;\n  }\n\n  function tickInterval(start, stop, count) {\n    const target = Math.abs(stop - start) / count;\n    const i = Object(d3_array__WEBPACK_IMPORTED_MODULE_0__[\"bisector\"])(([,, step]) => step).right(tickIntervals, target);\n    if (i === tickIntervals.length) return year.every(Object(d3_array__WEBPACK_IMPORTED_MODULE_0__[\"tickStep\"])(start / _duration_js__WEBPACK_IMPORTED_MODULE_1__[\"durationYear\"], stop / _duration_js__WEBPACK_IMPORTED_MODULE_1__[\"durationYear\"], count));\n    if (i === 0) return _millisecond_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"].every(Math.max(Object(d3_array__WEBPACK_IMPORTED_MODULE_0__[\"tickStep\"])(start, stop, count), 1));\n    const [t, step] = tickIntervals[target / tickIntervals[i - 1][2] < tickIntervals[i][2] / target ? i - 1 : i];\n    return t.every(step);\n  }\n\n  return [ticks, tickInterval];\n}\n\nconst [utcTicks, utcTickInterval] = ticker(_utcYear_js__WEBPACK_IMPORTED_MODULE_15__[\"default\"], _utcMonth_js__WEBPACK_IMPORTED_MODULE_14__[\"default\"], _utcWeek_js__WEBPACK_IMPORTED_MODULE_13__[\"utcSunday\"], _utcDay_js__WEBPACK_IMPORTED_MODULE_12__[\"default\"], _utcHour_js__WEBPACK_IMPORTED_MODULE_11__[\"default\"], _utcMinute_js__WEBPACK_IMPORTED_MODULE_10__[\"default\"]);\nconst [timeTicks, timeTickInterval] = ticker(_year_js__WEBPACK_IMPORTED_MODULE_9__[\"default\"], _month_js__WEBPACK_IMPORTED_MODULE_8__[\"default\"], _week_js__WEBPACK_IMPORTED_MODULE_7__[\"sunday\"], _day_js__WEBPACK_IMPORTED_MODULE_6__[\"default\"], _hour_js__WEBPACK_IMPORTED_MODULE_5__[\"default\"], _minute_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"]);\n\n\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-time/src/utcDay.js\":\n/*!************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-time/src/utcDay.js ***!\n  \\************************************************************/\n/*! exports provided: default, utcDays */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"utcDays\", function() { return utcDays; });\n/* harmony import */ var _interval_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./interval.js */ \"./node_modules/d3/node_modules/d3-time/src/interval.js\");\n/* harmony import */ var _duration_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./duration.js */ \"./node_modules/d3/node_modules/d3-time/src/duration.js\");\n\n\n\nvar utcDay = Object(_interval_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function(date) {\n  date.setUTCHours(0, 0, 0, 0);\n}, function(date, step) {\n  date.setUTCDate(date.getUTCDate() + step);\n}, function(start, end) {\n  return (end - start) / _duration_js__WEBPACK_IMPORTED_MODULE_1__[\"durationDay\"];\n}, function(date) {\n  return date.getUTCDate() - 1;\n});\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (utcDay);\nvar utcDays = utcDay.range;\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-time/src/utcHour.js\":\n/*!*************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-time/src/utcHour.js ***!\n  \\*************************************************************/\n/*! exports provided: default, utcHours */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"utcHours\", function() { return utcHours; });\n/* harmony import */ var _interval_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./interval.js */ \"./node_modules/d3/node_modules/d3-time/src/interval.js\");\n/* harmony import */ var _duration_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./duration.js */ \"./node_modules/d3/node_modules/d3-time/src/duration.js\");\n\n\n\nvar utcHour = Object(_interval_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function(date) {\n  date.setUTCMinutes(0, 0, 0);\n}, function(date, step) {\n  date.setTime(+date + step * _duration_js__WEBPACK_IMPORTED_MODULE_1__[\"durationHour\"]);\n}, function(start, end) {\n  return (end - start) / _duration_js__WEBPACK_IMPORTED_MODULE_1__[\"durationHour\"];\n}, function(date) {\n  return date.getUTCHours();\n});\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (utcHour);\nvar utcHours = utcHour.range;\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-time/src/utcMinute.js\":\n/*!***************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-time/src/utcMinute.js ***!\n  \\***************************************************************/\n/*! exports provided: default, utcMinutes */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"utcMinutes\", function() { return utcMinutes; });\n/* harmony import */ var _interval_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./interval.js */ \"./node_modules/d3/node_modules/d3-time/src/interval.js\");\n/* harmony import */ var _duration_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./duration.js */ \"./node_modules/d3/node_modules/d3-time/src/duration.js\");\n\n\n\nvar utcMinute = Object(_interval_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function(date) {\n  date.setUTCSeconds(0, 0);\n}, function(date, step) {\n  date.setTime(+date + step * _duration_js__WEBPACK_IMPORTED_MODULE_1__[\"durationMinute\"]);\n}, function(start, end) {\n  return (end - start) / _duration_js__WEBPACK_IMPORTED_MODULE_1__[\"durationMinute\"];\n}, function(date) {\n  return date.getUTCMinutes();\n});\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (utcMinute);\nvar utcMinutes = utcMinute.range;\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-time/src/utcMonth.js\":\n/*!**************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-time/src/utcMonth.js ***!\n  \\**************************************************************/\n/*! exports provided: default, utcMonths */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"utcMonths\", function() { return utcMonths; });\n/* harmony import */ var _interval_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./interval.js */ \"./node_modules/d3/node_modules/d3-time/src/interval.js\");\n\n\nvar utcMonth = Object(_interval_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function(date) {\n  date.setUTCDate(1);\n  date.setUTCHours(0, 0, 0, 0);\n}, function(date, step) {\n  date.setUTCMonth(date.getUTCMonth() + step);\n}, function(start, end) {\n  return end.getUTCMonth() - start.getUTCMonth() + (end.getUTCFullYear() - start.getUTCFullYear()) * 12;\n}, function(date) {\n  return date.getUTCMonth();\n});\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (utcMonth);\nvar utcMonths = utcMonth.range;\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-time/src/utcWeek.js\":\n/*!*************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-time/src/utcWeek.js ***!\n  \\*************************************************************/\n/*! exports provided: utcSunday, utcMonday, utcTuesday, utcWednesday, utcThursday, utcFriday, utcSaturday, utcSundays, utcMondays, utcTuesdays, utcWednesdays, utcThursdays, utcFridays, utcSaturdays */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"utcSunday\", function() { return utcSunday; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"utcMonday\", function() { return utcMonday; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"utcTuesday\", function() { return utcTuesday; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"utcWednesday\", function() { return utcWednesday; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"utcThursday\", function() { return utcThursday; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"utcFriday\", function() { return utcFriday; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"utcSaturday\", function() { return utcSaturday; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"utcSundays\", function() { return utcSundays; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"utcMondays\", function() { return utcMondays; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"utcTuesdays\", function() { return utcTuesdays; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"utcWednesdays\", function() { return utcWednesdays; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"utcThursdays\", function() { return utcThursdays; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"utcFridays\", function() { return utcFridays; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"utcSaturdays\", function() { return utcSaturdays; });\n/* harmony import */ var _interval_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./interval.js */ \"./node_modules/d3/node_modules/d3-time/src/interval.js\");\n/* harmony import */ var _duration_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./duration.js */ \"./node_modules/d3/node_modules/d3-time/src/duration.js\");\n\n\n\nfunction utcWeekday(i) {\n  return Object(_interval_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function(date) {\n    date.setUTCDate(date.getUTCDate() - (date.getUTCDay() + 7 - i) % 7);\n    date.setUTCHours(0, 0, 0, 0);\n  }, function(date, step) {\n    date.setUTCDate(date.getUTCDate() + step * 7);\n  }, function(start, end) {\n    return (end - start) / _duration_js__WEBPACK_IMPORTED_MODULE_1__[\"durationWeek\"];\n  });\n}\n\nvar utcSunday = utcWeekday(0);\nvar utcMonday = utcWeekday(1);\nvar utcTuesday = utcWeekday(2);\nvar utcWednesday = utcWeekday(3);\nvar utcThursday = utcWeekday(4);\nvar utcFriday = utcWeekday(5);\nvar utcSaturday = utcWeekday(6);\n\nvar utcSundays = utcSunday.range;\nvar utcMondays = utcMonday.range;\nvar utcTuesdays = utcTuesday.range;\nvar utcWednesdays = utcWednesday.range;\nvar utcThursdays = utcThursday.range;\nvar utcFridays = utcFriday.range;\nvar utcSaturdays = utcSaturday.range;\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-time/src/utcYear.js\":\n/*!*************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-time/src/utcYear.js ***!\n  \\*************************************************************/\n/*! exports provided: default, utcYears */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"utcYears\", function() { return utcYears; });\n/* harmony import */ var _interval_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./interval.js */ \"./node_modules/d3/node_modules/d3-time/src/interval.js\");\n\n\nvar utcYear = Object(_interval_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function(date) {\n  date.setUTCMonth(0, 1);\n  date.setUTCHours(0, 0, 0, 0);\n}, function(date, step) {\n  date.setUTCFullYear(date.getUTCFullYear() + step);\n}, function(start, end) {\n  return end.getUTCFullYear() - start.getUTCFullYear();\n}, function(date) {\n  return date.getUTCFullYear();\n});\n\n// An optimized implementation for this simple case.\nutcYear.every = function(k) {\n  return !isFinite(k = Math.floor(k)) || !(k > 0) ? null : Object(_interval_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function(date) {\n    date.setUTCFullYear(Math.floor(date.getUTCFullYear() / k) * k);\n    date.setUTCMonth(0, 1);\n    date.setUTCHours(0, 0, 0, 0);\n  }, function(date, step) {\n    date.setUTCFullYear(date.getUTCFullYear() + step * k);\n  });\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (utcYear);\nvar utcYears = utcYear.range;\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-time/src/week.js\":\n/*!**********************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-time/src/week.js ***!\n  \\**********************************************************/\n/*! exports provided: sunday, monday, tuesday, wednesday, thursday, friday, saturday, sundays, mondays, tuesdays, wednesdays, thursdays, fridays, saturdays */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"sunday\", function() { return sunday; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"monday\", function() { return monday; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"tuesday\", function() { return tuesday; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"wednesday\", function() { return wednesday; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"thursday\", function() { return thursday; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"friday\", function() { return friday; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"saturday\", function() { return saturday; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"sundays\", function() { return sundays; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"mondays\", function() { return mondays; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"tuesdays\", function() { return tuesdays; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"wednesdays\", function() { return wednesdays; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"thursdays\", function() { return thursdays; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"fridays\", function() { return fridays; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"saturdays\", function() { return saturdays; });\n/* harmony import */ var _interval_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./interval.js */ \"./node_modules/d3/node_modules/d3-time/src/interval.js\");\n/* harmony import */ var _duration_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./duration.js */ \"./node_modules/d3/node_modules/d3-time/src/duration.js\");\n\n\n\nfunction weekday(i) {\n  return Object(_interval_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function(date) {\n    date.setDate(date.getDate() - (date.getDay() + 7 - i) % 7);\n    date.setHours(0, 0, 0, 0);\n  }, function(date, step) {\n    date.setDate(date.getDate() + step * 7);\n  }, function(start, end) {\n    return (end - start - (end.getTimezoneOffset() - start.getTimezoneOffset()) * _duration_js__WEBPACK_IMPORTED_MODULE_1__[\"durationMinute\"]) / _duration_js__WEBPACK_IMPORTED_MODULE_1__[\"durationWeek\"];\n  });\n}\n\nvar sunday = weekday(0);\nvar monday = weekday(1);\nvar tuesday = weekday(2);\nvar wednesday = weekday(3);\nvar thursday = weekday(4);\nvar friday = weekday(5);\nvar saturday = weekday(6);\n\nvar sundays = sunday.range;\nvar mondays = monday.range;\nvar tuesdays = tuesday.range;\nvar wednesdays = wednesday.range;\nvar thursdays = thursday.range;\nvar fridays = friday.range;\nvar saturdays = saturday.range;\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-time/src/year.js\":\n/*!**********************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-time/src/year.js ***!\n  \\**********************************************************/\n/*! exports provided: default, years */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"years\", function() { return years; });\n/* harmony import */ var _interval_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./interval.js */ \"./node_modules/d3/node_modules/d3-time/src/interval.js\");\n\n\nvar year = Object(_interval_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function(date) {\n  date.setMonth(0, 1);\n  date.setHours(0, 0, 0, 0);\n}, function(date, step) {\n  date.setFullYear(date.getFullYear() + step);\n}, function(start, end) {\n  return end.getFullYear() - start.getFullYear();\n}, function(date) {\n  return date.getFullYear();\n});\n\n// An optimized implementation for this simple case.\nyear.every = function(k) {\n  return !isFinite(k = Math.floor(k)) || !(k > 0) ? null : Object(_interval_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function(date) {\n    date.setFullYear(Math.floor(date.getFullYear() / k) * k);\n    date.setMonth(0, 1);\n    date.setHours(0, 0, 0, 0);\n  }, function(date, step) {\n    date.setFullYear(date.getFullYear() + step * k);\n  });\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (year);\nvar years = year.range;\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-timer/src/index.js\":\n/*!************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-timer/src/index.js ***!\n  \\************************************************************/\n/*! exports provided: now, timer, timerFlush, timeout, interval */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _timer_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./timer.js */ \"./node_modules/d3/node_modules/d3-timer/src/timer.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"now\", function() { return _timer_js__WEBPACK_IMPORTED_MODULE_0__[\"now\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timer\", function() { return _timer_js__WEBPACK_IMPORTED_MODULE_0__[\"timer\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timerFlush\", function() { return _timer_js__WEBPACK_IMPORTED_MODULE_0__[\"timerFlush\"]; });\n\n/* harmony import */ var _timeout_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./timeout.js */ \"./node_modules/d3/node_modules/d3-timer/src/timeout.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeout\", function() { return _timeout_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"]; });\n\n/* harmony import */ var _interval_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./interval.js */ \"./node_modules/d3/node_modules/d3-timer/src/interval.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interval\", function() { return _interval_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"]; });\n\n\n\n\n\n\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-timer/src/interval.js\":\n/*!***************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-timer/src/interval.js ***!\n  \\***************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _timer_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./timer.js */ \"./node_modules/d3/node_modules/d3-timer/src/timer.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(callback, delay, time) {\n  var t = new _timer_js__WEBPACK_IMPORTED_MODULE_0__[\"Timer\"], total = delay;\n  if (delay == null) return t.restart(callback, delay, time), t;\n  t._restart = t.restart;\n  t.restart = function(callback, delay, time) {\n    delay = +delay, time = time == null ? Object(_timer_js__WEBPACK_IMPORTED_MODULE_0__[\"now\"])() : +time;\n    t._restart(function tick(elapsed) {\n      elapsed += total;\n      t._restart(tick, total += delay, time);\n      callback(elapsed);\n    }, delay, time);\n  }\n  t.restart(callback, delay, time);\n  return t;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-timer/src/timeout.js\":\n/*!**************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-timer/src/timeout.js ***!\n  \\**************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _timer_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./timer.js */ \"./node_modules/d3/node_modules/d3-timer/src/timer.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(callback, delay, time) {\n  var t = new _timer_js__WEBPACK_IMPORTED_MODULE_0__[\"Timer\"];\n  delay = delay == null ? 0 : +delay;\n  t.restart(elapsed => {\n    t.stop();\n    callback(elapsed + delay);\n  }, delay, time);\n  return t;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-timer/src/timer.js\":\n/*!************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-timer/src/timer.js ***!\n  \\************************************************************/\n/*! exports provided: now, Timer, timer, timerFlush */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"now\", function() { return now; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Timer\", function() { return Timer; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"timer\", function() { return timer; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"timerFlush\", function() { return timerFlush; });\nvar frame = 0, // is an animation frame pending?\n    timeout = 0, // is a timeout pending?\n    interval = 0, // are any timers active?\n    pokeDelay = 1000, // how frequently we check for clock skew\n    taskHead,\n    taskTail,\n    clockLast = 0,\n    clockNow = 0,\n    clockSkew = 0,\n    clock = typeof performance === \"object\" && performance.now ? performance : Date,\n    setFrame = typeof window === \"object\" && window.requestAnimationFrame ? window.requestAnimationFrame.bind(window) : function(f) { setTimeout(f, 17); };\n\nfunction now() {\n  return clockNow || (setFrame(clearNow), clockNow = clock.now() + clockSkew);\n}\n\nfunction clearNow() {\n  clockNow = 0;\n}\n\nfunction Timer() {\n  this._call =\n  this._time =\n  this._next = null;\n}\n\nTimer.prototype = timer.prototype = {\n  constructor: Timer,\n  restart: function(callback, delay, time) {\n    if (typeof callback !== \"function\") throw new TypeError(\"callback is not a function\");\n    time = (time == null ? now() : +time) + (delay == null ? 0 : +delay);\n    if (!this._next && taskTail !== this) {\n      if (taskTail) taskTail._next = this;\n      else taskHead = this;\n      taskTail = this;\n    }\n    this._call = callback;\n    this._time = time;\n    sleep();\n  },\n  stop: function() {\n    if (this._call) {\n      this._call = null;\n      this._time = Infinity;\n      sleep();\n    }\n  }\n};\n\nfunction timer(callback, delay, time) {\n  var t = new Timer;\n  t.restart(callback, delay, time);\n  return t;\n}\n\nfunction timerFlush() {\n  now(); // Get the current time, if not already set.\n  ++frame; // Pretend we’ve set an alarm, if we haven’t already.\n  var t = taskHead, e;\n  while (t) {\n    if ((e = clockNow - t._time) >= 0) t._call.call(undefined, e);\n    t = t._next;\n  }\n  --frame;\n}\n\nfunction wake() {\n  clockNow = (clockLast = clock.now()) + clockSkew;\n  frame = timeout = 0;\n  try {\n    timerFlush();\n  } finally {\n    frame = 0;\n    nap();\n    clockNow = 0;\n  }\n}\n\nfunction poke() {\n  var now = clock.now(), delay = now - clockLast;\n  if (delay > pokeDelay) clockSkew -= delay, clockLast = now;\n}\n\nfunction nap() {\n  var t0, t1 = taskHead, t2, time = Infinity;\n  while (t1) {\n    if (t1._call) {\n      if (time > t1._time) time = t1._time;\n      t0 = t1, t1 = t1._next;\n    } else {\n      t2 = t1._next, t1._next = null;\n      t1 = t0 ? t0._next = t2 : taskHead = t2;\n    }\n  }\n  taskTail = t0;\n  sleep(time);\n}\n\nfunction sleep(time) {\n  if (frame) return; // Soonest alarm already set, or will be.\n  if (timeout) timeout = clearTimeout(timeout);\n  var delay = time - clockNow; // Strictly less than if we recomputed clockNow.\n  if (delay > 24) {\n    if (time < Infinity) timeout = setTimeout(wake, time - clock.now() - clockSkew);\n    if (interval) interval = clearInterval(interval);\n  } else {\n    if (!interval) clockLast = clock.now(), interval = setInterval(poke, pokeDelay);\n    frame = 1, setFrame(wake);\n  }\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-transition/src/active.js\":\n/*!******************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-transition/src/active.js ***!\n  \\******************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _transition_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./transition/index.js */ \"./node_modules/d3/node_modules/d3-transition/src/transition/index.js\");\n/* harmony import */ var _transition_schedule_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./transition/schedule.js */ \"./node_modules/d3/node_modules/d3-transition/src/transition/schedule.js\");\n\n\n\nvar root = [null];\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(node, name) {\n  var schedules = node.__transition,\n      schedule,\n      i;\n\n  if (schedules) {\n    name = name == null ? null : name + \"\";\n    for (i in schedules) {\n      if ((schedule = schedules[i]).state > _transition_schedule_js__WEBPACK_IMPORTED_MODULE_1__[\"SCHEDULED\"] && schedule.name === name) {\n        return new _transition_index_js__WEBPACK_IMPORTED_MODULE_0__[\"Transition\"]([[node]], root, name, +i);\n      }\n    }\n  }\n\n  return null;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-transition/src/index.js\":\n/*!*****************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-transition/src/index.js ***!\n  \\*****************************************************************/\n/*! exports provided: transition, active, interrupt */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _selection_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./selection/index.js */ \"./node_modules/d3/node_modules/d3-transition/src/selection/index.js\");\n/* harmony import */ var _transition_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./transition/index.js */ \"./node_modules/d3/node_modules/d3-transition/src/transition/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"transition\", function() { return _transition_index_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"]; });\n\n/* harmony import */ var _active_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./active.js */ \"./node_modules/d3/node_modules/d3-transition/src/active.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"active\", function() { return _active_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"]; });\n\n/* harmony import */ var _interrupt_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./interrupt.js */ \"./node_modules/d3/node_modules/d3-transition/src/interrupt.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interrupt\", function() { return _interrupt_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"]; });\n\n\n\n\n\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-transition/src/interrupt.js\":\n/*!*********************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-transition/src/interrupt.js ***!\n  \\*********************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _transition_schedule_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./transition/schedule.js */ \"./node_modules/d3/node_modules/d3-transition/src/transition/schedule.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(node, name) {\n  var schedules = node.__transition,\n      schedule,\n      active,\n      empty = true,\n      i;\n\n  if (!schedules) return;\n\n  name = name == null ? null : name + \"\";\n\n  for (i in schedules) {\n    if ((schedule = schedules[i]).name !== name) { empty = false; continue; }\n    active = schedule.state > _transition_schedule_js__WEBPACK_IMPORTED_MODULE_0__[\"STARTING\"] && schedule.state < _transition_schedule_js__WEBPACK_IMPORTED_MODULE_0__[\"ENDING\"];\n    schedule.state = _transition_schedule_js__WEBPACK_IMPORTED_MODULE_0__[\"ENDED\"];\n    schedule.timer.stop();\n    schedule.on.call(active ? \"interrupt\" : \"cancel\", node, node.__data__, schedule.index, schedule.group);\n    delete schedules[i];\n  }\n\n  if (empty) delete node.__transition;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-transition/src/selection/index.js\":\n/*!***************************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-transition/src/selection/index.js ***!\n  \\***************************************************************************/\n/*! no exports provided */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var d3_selection__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-selection */ \"./node_modules/d3/node_modules/d3-selection/src/index.js\");\n/* harmony import */ var _interrupt_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./interrupt.js */ \"./node_modules/d3/node_modules/d3-transition/src/selection/interrupt.js\");\n/* harmony import */ var _transition_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./transition.js */ \"./node_modules/d3/node_modules/d3-transition/src/selection/transition.js\");\n\n\n\n\nd3_selection__WEBPACK_IMPORTED_MODULE_0__[\"selection\"].prototype.interrupt = _interrupt_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"];\nd3_selection__WEBPACK_IMPORTED_MODULE_0__[\"selection\"].prototype.transition = _transition_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"];\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-transition/src/selection/interrupt.js\":\n/*!*******************************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-transition/src/selection/interrupt.js ***!\n  \\*******************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _interrupt_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../interrupt.js */ \"./node_modules/d3/node_modules/d3-transition/src/interrupt.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(name) {\n  return this.each(function() {\n    Object(_interrupt_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(this, name);\n  });\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-transition/src/selection/transition.js\":\n/*!********************************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-transition/src/selection/transition.js ***!\n  \\********************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _transition_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../transition/index.js */ \"./node_modules/d3/node_modules/d3-transition/src/transition/index.js\");\n/* harmony import */ var _transition_schedule_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../transition/schedule.js */ \"./node_modules/d3/node_modules/d3-transition/src/transition/schedule.js\");\n/* harmony import */ var d3_ease__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! d3-ease */ \"./node_modules/d3/node_modules/d3-ease/src/index.js\");\n/* harmony import */ var d3_timer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! d3-timer */ \"./node_modules/d3/node_modules/d3-timer/src/index.js\");\n\n\n\n\n\nvar defaultTiming = {\n  time: null, // Set on use.\n  delay: 0,\n  duration: 250,\n  ease: d3_ease__WEBPACK_IMPORTED_MODULE_2__[\"easeCubicInOut\"]\n};\n\nfunction inherit(node, id) {\n  var timing;\n  while (!(timing = node.__transition) || !(timing = timing[id])) {\n    if (!(node = node.parentNode)) {\n      throw new Error(`transition ${id} not found`);\n    }\n  }\n  return timing;\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(name) {\n  var id,\n      timing;\n\n  if (name instanceof _transition_index_js__WEBPACK_IMPORTED_MODULE_0__[\"Transition\"]) {\n    id = name._id, name = name._name;\n  } else {\n    id = Object(_transition_index_js__WEBPACK_IMPORTED_MODULE_0__[\"newId\"])(), (timing = defaultTiming).time = Object(d3_timer__WEBPACK_IMPORTED_MODULE_3__[\"now\"])(), name = name == null ? null : name + \"\";\n  }\n\n  for (var groups = this._groups, m = groups.length, j = 0; j < m; ++j) {\n    for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) {\n      if (node = group[i]) {\n        Object(_transition_schedule_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(node, name, id, i, group, timing || inherit(node, id));\n      }\n    }\n  }\n\n  return new _transition_index_js__WEBPACK_IMPORTED_MODULE_0__[\"Transition\"](groups, this._parents, name, id);\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-transition/src/transition/attr.js\":\n/*!***************************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-transition/src/transition/attr.js ***!\n  \\***************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var d3_interpolate__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-interpolate */ \"./node_modules/d3/node_modules/d3-interpolate/src/index.js\");\n/* harmony import */ var d3_selection__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! d3-selection */ \"./node_modules/d3/node_modules/d3-selection/src/index.js\");\n/* harmony import */ var _tween_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./tween.js */ \"./node_modules/d3/node_modules/d3-transition/src/transition/tween.js\");\n/* harmony import */ var _interpolate_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./interpolate.js */ \"./node_modules/d3/node_modules/d3-transition/src/transition/interpolate.js\");\n\n\n\n\n\nfunction attrRemove(name) {\n  return function() {\n    this.removeAttribute(name);\n  };\n}\n\nfunction attrRemoveNS(fullname) {\n  return function() {\n    this.removeAttributeNS(fullname.space, fullname.local);\n  };\n}\n\nfunction attrConstant(name, interpolate, value1) {\n  var string00,\n      string1 = value1 + \"\",\n      interpolate0;\n  return function() {\n    var string0 = this.getAttribute(name);\n    return string0 === string1 ? null\n        : string0 === string00 ? interpolate0\n        : interpolate0 = interpolate(string00 = string0, value1);\n  };\n}\n\nfunction attrConstantNS(fullname, interpolate, value1) {\n  var string00,\n      string1 = value1 + \"\",\n      interpolate0;\n  return function() {\n    var string0 = this.getAttributeNS(fullname.space, fullname.local);\n    return string0 === string1 ? null\n        : string0 === string00 ? interpolate0\n        : interpolate0 = interpolate(string00 = string0, value1);\n  };\n}\n\nfunction attrFunction(name, interpolate, value) {\n  var string00,\n      string10,\n      interpolate0;\n  return function() {\n    var string0, value1 = value(this), string1;\n    if (value1 == null) return void this.removeAttribute(name);\n    string0 = this.getAttribute(name);\n    string1 = value1 + \"\";\n    return string0 === string1 ? null\n        : string0 === string00 && string1 === string10 ? interpolate0\n        : (string10 = string1, interpolate0 = interpolate(string00 = string0, value1));\n  };\n}\n\nfunction attrFunctionNS(fullname, interpolate, value) {\n  var string00,\n      string10,\n      interpolate0;\n  return function() {\n    var string0, value1 = value(this), string1;\n    if (value1 == null) return void this.removeAttributeNS(fullname.space, fullname.local);\n    string0 = this.getAttributeNS(fullname.space, fullname.local);\n    string1 = value1 + \"\";\n    return string0 === string1 ? null\n        : string0 === string00 && string1 === string10 ? interpolate0\n        : (string10 = string1, interpolate0 = interpolate(string00 = string0, value1));\n  };\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(name, value) {\n  var fullname = Object(d3_selection__WEBPACK_IMPORTED_MODULE_1__[\"namespace\"])(name), i = fullname === \"transform\" ? d3_interpolate__WEBPACK_IMPORTED_MODULE_0__[\"interpolateTransformSvg\"] : _interpolate_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"];\n  return this.attrTween(name, typeof value === \"function\"\n      ? (fullname.local ? attrFunctionNS : attrFunction)(fullname, i, Object(_tween_js__WEBPACK_IMPORTED_MODULE_2__[\"tweenValue\"])(this, \"attr.\" + name, value))\n      : value == null ? (fullname.local ? attrRemoveNS : attrRemove)(fullname)\n      : (fullname.local ? attrConstantNS : attrConstant)(fullname, i, value));\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-transition/src/transition/attrTween.js\":\n/*!********************************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-transition/src/transition/attrTween.js ***!\n  \\********************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var d3_selection__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-selection */ \"./node_modules/d3/node_modules/d3-selection/src/index.js\");\n\n\nfunction attrInterpolate(name, i) {\n  return function(t) {\n    this.setAttribute(name, i.call(this, t));\n  };\n}\n\nfunction attrInterpolateNS(fullname, i) {\n  return function(t) {\n    this.setAttributeNS(fullname.space, fullname.local, i.call(this, t));\n  };\n}\n\nfunction attrTweenNS(fullname, value) {\n  var t0, i0;\n  function tween() {\n    var i = value.apply(this, arguments);\n    if (i !== i0) t0 = (i0 = i) && attrInterpolateNS(fullname, i);\n    return t0;\n  }\n  tween._value = value;\n  return tween;\n}\n\nfunction attrTween(name, value) {\n  var t0, i0;\n  function tween() {\n    var i = value.apply(this, arguments);\n    if (i !== i0) t0 = (i0 = i) && attrInterpolate(name, i);\n    return t0;\n  }\n  tween._value = value;\n  return tween;\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(name, value) {\n  var key = \"attr.\" + name;\n  if (arguments.length < 2) return (key = this.tween(key)) && key._value;\n  if (value == null) return this.tween(key, null);\n  if (typeof value !== \"function\") throw new Error;\n  var fullname = Object(d3_selection__WEBPACK_IMPORTED_MODULE_0__[\"namespace\"])(name);\n  return this.tween(key, (fullname.local ? attrTweenNS : attrTween)(fullname, value));\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-transition/src/transition/delay.js\":\n/*!****************************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-transition/src/transition/delay.js ***!\n  \\****************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _schedule_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./schedule.js */ \"./node_modules/d3/node_modules/d3-transition/src/transition/schedule.js\");\n\n\nfunction delayFunction(id, value) {\n  return function() {\n    Object(_schedule_js__WEBPACK_IMPORTED_MODULE_0__[\"init\"])(this, id).delay = +value.apply(this, arguments);\n  };\n}\n\nfunction delayConstant(id, value) {\n  return value = +value, function() {\n    Object(_schedule_js__WEBPACK_IMPORTED_MODULE_0__[\"init\"])(this, id).delay = value;\n  };\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(value) {\n  var id = this._id;\n\n  return arguments.length\n      ? this.each((typeof value === \"function\"\n          ? delayFunction\n          : delayConstant)(id, value))\n      : Object(_schedule_js__WEBPACK_IMPORTED_MODULE_0__[\"get\"])(this.node(), id).delay;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-transition/src/transition/duration.js\":\n/*!*******************************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-transition/src/transition/duration.js ***!\n  \\*******************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _schedule_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./schedule.js */ \"./node_modules/d3/node_modules/d3-transition/src/transition/schedule.js\");\n\n\nfunction durationFunction(id, value) {\n  return function() {\n    Object(_schedule_js__WEBPACK_IMPORTED_MODULE_0__[\"set\"])(this, id).duration = +value.apply(this, arguments);\n  };\n}\n\nfunction durationConstant(id, value) {\n  return value = +value, function() {\n    Object(_schedule_js__WEBPACK_IMPORTED_MODULE_0__[\"set\"])(this, id).duration = value;\n  };\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(value) {\n  var id = this._id;\n\n  return arguments.length\n      ? this.each((typeof value === \"function\"\n          ? durationFunction\n          : durationConstant)(id, value))\n      : Object(_schedule_js__WEBPACK_IMPORTED_MODULE_0__[\"get\"])(this.node(), id).duration;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-transition/src/transition/ease.js\":\n/*!***************************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-transition/src/transition/ease.js ***!\n  \\***************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _schedule_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./schedule.js */ \"./node_modules/d3/node_modules/d3-transition/src/transition/schedule.js\");\n\n\nfunction easeConstant(id, value) {\n  if (typeof value !== \"function\") throw new Error;\n  return function() {\n    Object(_schedule_js__WEBPACK_IMPORTED_MODULE_0__[\"set\"])(this, id).ease = value;\n  };\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(value) {\n  var id = this._id;\n\n  return arguments.length\n      ? this.each(easeConstant(id, value))\n      : Object(_schedule_js__WEBPACK_IMPORTED_MODULE_0__[\"get\"])(this.node(), id).ease;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-transition/src/transition/easeVarying.js\":\n/*!**********************************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-transition/src/transition/easeVarying.js ***!\n  \\**********************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _schedule_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./schedule.js */ \"./node_modules/d3/node_modules/d3-transition/src/transition/schedule.js\");\n\n\nfunction easeVarying(id, value) {\n  return function() {\n    var v = value.apply(this, arguments);\n    if (typeof v !== \"function\") throw new Error;\n    Object(_schedule_js__WEBPACK_IMPORTED_MODULE_0__[\"set\"])(this, id).ease = v;\n  };\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(value) {\n  if (typeof value !== \"function\") throw new Error;\n  return this.each(easeVarying(this._id, value));\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-transition/src/transition/end.js\":\n/*!**************************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-transition/src/transition/end.js ***!\n  \\**************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _schedule_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./schedule.js */ \"./node_modules/d3/node_modules/d3-transition/src/transition/schedule.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  var on0, on1, that = this, id = that._id, size = that.size();\n  return new Promise(function(resolve, reject) {\n    var cancel = {value: reject},\n        end = {value: function() { if (--size === 0) resolve(); }};\n\n    that.each(function() {\n      var schedule = Object(_schedule_js__WEBPACK_IMPORTED_MODULE_0__[\"set\"])(this, id),\n          on = schedule.on;\n\n      // If this node shared a dispatch with the previous node,\n      // just assign the updated shared dispatch and we’re done!\n      // Otherwise, copy-on-write.\n      if (on !== on0) {\n        on1 = (on0 = on).copy();\n        on1._.cancel.push(cancel);\n        on1._.interrupt.push(cancel);\n        on1._.end.push(end);\n      }\n\n      schedule.on = on1;\n    });\n\n    // The selection was empty, resolve end immediately\n    if (size === 0) resolve();\n  });\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-transition/src/transition/filter.js\":\n/*!*****************************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-transition/src/transition/filter.js ***!\n  \\*****************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var d3_selection__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-selection */ \"./node_modules/d3/node_modules/d3-selection/src/index.js\");\n/* harmony import */ var _index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./index.js */ \"./node_modules/d3/node_modules/d3-transition/src/transition/index.js\");\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(match) {\n  if (typeof match !== \"function\") match = Object(d3_selection__WEBPACK_IMPORTED_MODULE_0__[\"matcher\"])(match);\n\n  for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {\n    for (var group = groups[j], n = group.length, subgroup = subgroups[j] = [], node, i = 0; i < n; ++i) {\n      if ((node = group[i]) && match.call(node, node.__data__, i, group)) {\n        subgroup.push(node);\n      }\n    }\n  }\n\n  return new _index_js__WEBPACK_IMPORTED_MODULE_1__[\"Transition\"](subgroups, this._parents, this._name, this._id);\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-transition/src/transition/index.js\":\n/*!****************************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-transition/src/transition/index.js ***!\n  \\****************************************************************************/\n/*! exports provided: Transition, default, newId */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Transition\", function() { return Transition; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return transition; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"newId\", function() { return newId; });\n/* harmony import */ var d3_selection__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-selection */ \"./node_modules/d3/node_modules/d3-selection/src/index.js\");\n/* harmony import */ var _attr_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./attr.js */ \"./node_modules/d3/node_modules/d3-transition/src/transition/attr.js\");\n/* harmony import */ var _attrTween_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./attrTween.js */ \"./node_modules/d3/node_modules/d3-transition/src/transition/attrTween.js\");\n/* harmony import */ var _delay_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./delay.js */ \"./node_modules/d3/node_modules/d3-transition/src/transition/delay.js\");\n/* harmony import */ var _duration_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./duration.js */ \"./node_modules/d3/node_modules/d3-transition/src/transition/duration.js\");\n/* harmony import */ var _ease_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./ease.js */ \"./node_modules/d3/node_modules/d3-transition/src/transition/ease.js\");\n/* harmony import */ var _easeVarying_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./easeVarying.js */ \"./node_modules/d3/node_modules/d3-transition/src/transition/easeVarying.js\");\n/* harmony import */ var _filter_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./filter.js */ \"./node_modules/d3/node_modules/d3-transition/src/transition/filter.js\");\n/* harmony import */ var _merge_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./merge.js */ \"./node_modules/d3/node_modules/d3-transition/src/transition/merge.js\");\n/* harmony import */ var _on_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./on.js */ \"./node_modules/d3/node_modules/d3-transition/src/transition/on.js\");\n/* harmony import */ var _remove_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./remove.js */ \"./node_modules/d3/node_modules/d3-transition/src/transition/remove.js\");\n/* harmony import */ var _select_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./select.js */ \"./node_modules/d3/node_modules/d3-transition/src/transition/select.js\");\n/* harmony import */ var _selectAll_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./selectAll.js */ \"./node_modules/d3/node_modules/d3-transition/src/transition/selectAll.js\");\n/* harmony import */ var _selection_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./selection.js */ \"./node_modules/d3/node_modules/d3-transition/src/transition/selection.js\");\n/* harmony import */ var _style_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./style.js */ \"./node_modules/d3/node_modules/d3-transition/src/transition/style.js\");\n/* harmony import */ var _styleTween_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./styleTween.js */ \"./node_modules/d3/node_modules/d3-transition/src/transition/styleTween.js\");\n/* harmony import */ var _text_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./text.js */ \"./node_modules/d3/node_modules/d3-transition/src/transition/text.js\");\n/* harmony import */ var _textTween_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./textTween.js */ \"./node_modules/d3/node_modules/d3-transition/src/transition/textTween.js\");\n/* harmony import */ var _transition_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./transition.js */ \"./node_modules/d3/node_modules/d3-transition/src/transition/transition.js\");\n/* harmony import */ var _tween_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./tween.js */ \"./node_modules/d3/node_modules/d3-transition/src/transition/tween.js\");\n/* harmony import */ var _end_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./end.js */ \"./node_modules/d3/node_modules/d3-transition/src/transition/end.js\");\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nvar id = 0;\n\nfunction Transition(groups, parents, name, id) {\n  this._groups = groups;\n  this._parents = parents;\n  this._name = name;\n  this._id = id;\n}\n\nfunction transition(name) {\n  return Object(d3_selection__WEBPACK_IMPORTED_MODULE_0__[\"selection\"])().transition(name);\n}\n\nfunction newId() {\n  return ++id;\n}\n\nvar selection_prototype = d3_selection__WEBPACK_IMPORTED_MODULE_0__[\"selection\"].prototype;\n\nTransition.prototype = transition.prototype = {\n  constructor: Transition,\n  select: _select_js__WEBPACK_IMPORTED_MODULE_11__[\"default\"],\n  selectAll: _selectAll_js__WEBPACK_IMPORTED_MODULE_12__[\"default\"],\n  selectChild: selection_prototype.selectChild,\n  selectChildren: selection_prototype.selectChildren,\n  filter: _filter_js__WEBPACK_IMPORTED_MODULE_7__[\"default\"],\n  merge: _merge_js__WEBPACK_IMPORTED_MODULE_8__[\"default\"],\n  selection: _selection_js__WEBPACK_IMPORTED_MODULE_13__[\"default\"],\n  transition: _transition_js__WEBPACK_IMPORTED_MODULE_18__[\"default\"],\n  call: selection_prototype.call,\n  nodes: selection_prototype.nodes,\n  node: selection_prototype.node,\n  size: selection_prototype.size,\n  empty: selection_prototype.empty,\n  each: selection_prototype.each,\n  on: _on_js__WEBPACK_IMPORTED_MODULE_9__[\"default\"],\n  attr: _attr_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"],\n  attrTween: _attrTween_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"],\n  style: _style_js__WEBPACK_IMPORTED_MODULE_14__[\"default\"],\n  styleTween: _styleTween_js__WEBPACK_IMPORTED_MODULE_15__[\"default\"],\n  text: _text_js__WEBPACK_IMPORTED_MODULE_16__[\"default\"],\n  textTween: _textTween_js__WEBPACK_IMPORTED_MODULE_17__[\"default\"],\n  remove: _remove_js__WEBPACK_IMPORTED_MODULE_10__[\"default\"],\n  tween: _tween_js__WEBPACK_IMPORTED_MODULE_19__[\"default\"],\n  delay: _delay_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"],\n  duration: _duration_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"],\n  ease: _ease_js__WEBPACK_IMPORTED_MODULE_5__[\"default\"],\n  easeVarying: _easeVarying_js__WEBPACK_IMPORTED_MODULE_6__[\"default\"],\n  end: _end_js__WEBPACK_IMPORTED_MODULE_20__[\"default\"],\n  [Symbol.iterator]: selection_prototype[Symbol.iterator]\n};\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-transition/src/transition/interpolate.js\":\n/*!**********************************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-transition/src/transition/interpolate.js ***!\n  \\**********************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var d3_color__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-color */ \"./node_modules/d3/node_modules/d3-color/src/index.js\");\n/* harmony import */ var d3_interpolate__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! d3-interpolate */ \"./node_modules/d3/node_modules/d3-interpolate/src/index.js\");\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(a, b) {\n  var c;\n  return (typeof b === \"number\" ? d3_interpolate__WEBPACK_IMPORTED_MODULE_1__[\"interpolateNumber\"]\n      : b instanceof d3_color__WEBPACK_IMPORTED_MODULE_0__[\"color\"] ? d3_interpolate__WEBPACK_IMPORTED_MODULE_1__[\"interpolateRgb\"]\n      : (c = Object(d3_color__WEBPACK_IMPORTED_MODULE_0__[\"color\"])(b)) ? (b = c, d3_interpolate__WEBPACK_IMPORTED_MODULE_1__[\"interpolateRgb\"])\n      : d3_interpolate__WEBPACK_IMPORTED_MODULE_1__[\"interpolateString\"])(a, b);\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-transition/src/transition/merge.js\":\n/*!****************************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-transition/src/transition/merge.js ***!\n  \\****************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./index.js */ \"./node_modules/d3/node_modules/d3-transition/src/transition/index.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(transition) {\n  if (transition._id !== this._id) throw new Error;\n\n  for (var groups0 = this._groups, groups1 = transition._groups, m0 = groups0.length, m1 = groups1.length, m = Math.min(m0, m1), merges = new Array(m0), j = 0; j < m; ++j) {\n    for (var group0 = groups0[j], group1 = groups1[j], n = group0.length, merge = merges[j] = new Array(n), node, i = 0; i < n; ++i) {\n      if (node = group0[i] || group1[i]) {\n        merge[i] = node;\n      }\n    }\n  }\n\n  for (; j < m0; ++j) {\n    merges[j] = groups0[j];\n  }\n\n  return new _index_js__WEBPACK_IMPORTED_MODULE_0__[\"Transition\"](merges, this._parents, this._name, this._id);\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-transition/src/transition/on.js\":\n/*!*************************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-transition/src/transition/on.js ***!\n  \\*************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _schedule_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./schedule.js */ \"./node_modules/d3/node_modules/d3-transition/src/transition/schedule.js\");\n\n\nfunction start(name) {\n  return (name + \"\").trim().split(/^|\\s+/).every(function(t) {\n    var i = t.indexOf(\".\");\n    if (i >= 0) t = t.slice(0, i);\n    return !t || t === \"start\";\n  });\n}\n\nfunction onFunction(id, name, listener) {\n  var on0, on1, sit = start(name) ? _schedule_js__WEBPACK_IMPORTED_MODULE_0__[\"init\"] : _schedule_js__WEBPACK_IMPORTED_MODULE_0__[\"set\"];\n  return function() {\n    var schedule = sit(this, id),\n        on = schedule.on;\n\n    // If this node shared a dispatch with the previous node,\n    // just assign the updated shared dispatch and we’re done!\n    // Otherwise, copy-on-write.\n    if (on !== on0) (on1 = (on0 = on).copy()).on(name, listener);\n\n    schedule.on = on1;\n  };\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(name, listener) {\n  var id = this._id;\n\n  return arguments.length < 2\n      ? Object(_schedule_js__WEBPACK_IMPORTED_MODULE_0__[\"get\"])(this.node(), id).on.on(name)\n      : this.each(onFunction(id, name, listener));\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-transition/src/transition/remove.js\":\n/*!*****************************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-transition/src/transition/remove.js ***!\n  \\*****************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\nfunction removeFunction(id) {\n  return function() {\n    var parent = this.parentNode;\n    for (var i in this.__transition) if (+i !== id) return;\n    if (parent) parent.removeChild(this);\n  };\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  return this.on(\"end.remove\", removeFunction(this._id));\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-transition/src/transition/schedule.js\":\n/*!*******************************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-transition/src/transition/schedule.js ***!\n  \\*******************************************************************************/\n/*! exports provided: CREATED, SCHEDULED, STARTING, STARTED, RUNNING, ENDING, ENDED, default, init, set, get */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"CREATED\", function() { return CREATED; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"SCHEDULED\", function() { return SCHEDULED; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"STARTING\", function() { return STARTING; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"STARTED\", function() { return STARTED; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"RUNNING\", function() { return RUNNING; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"ENDING\", function() { return ENDING; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"ENDED\", function() { return ENDED; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"init\", function() { return init; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"set\", function() { return set; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"get\", function() { return get; });\n/* harmony import */ var d3_dispatch__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-dispatch */ \"./node_modules/d3/node_modules/d3-dispatch/src/index.js\");\n/* harmony import */ var d3_timer__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! d3-timer */ \"./node_modules/d3/node_modules/d3-timer/src/index.js\");\n\n\n\nvar emptyOn = Object(d3_dispatch__WEBPACK_IMPORTED_MODULE_0__[\"dispatch\"])(\"start\", \"end\", \"cancel\", \"interrupt\");\nvar emptyTween = [];\n\nvar CREATED = 0;\nvar SCHEDULED = 1;\nvar STARTING = 2;\nvar STARTED = 3;\nvar RUNNING = 4;\nvar ENDING = 5;\nvar ENDED = 6;\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(node, name, id, index, group, timing) {\n  var schedules = node.__transition;\n  if (!schedules) node.__transition = {};\n  else if (id in schedules) return;\n  create(node, id, {\n    name: name,\n    index: index, // For context during callback.\n    group: group, // For context during callback.\n    on: emptyOn,\n    tween: emptyTween,\n    time: timing.time,\n    delay: timing.delay,\n    duration: timing.duration,\n    ease: timing.ease,\n    timer: null,\n    state: CREATED\n  });\n});\n\nfunction init(node, id) {\n  var schedule = get(node, id);\n  if (schedule.state > CREATED) throw new Error(\"too late; already scheduled\");\n  return schedule;\n}\n\nfunction set(node, id) {\n  var schedule = get(node, id);\n  if (schedule.state > STARTED) throw new Error(\"too late; already running\");\n  return schedule;\n}\n\nfunction get(node, id) {\n  var schedule = node.__transition;\n  if (!schedule || !(schedule = schedule[id])) throw new Error(\"transition not found\");\n  return schedule;\n}\n\nfunction create(node, id, self) {\n  var schedules = node.__transition,\n      tween;\n\n  // Initialize the self timer when the transition is created.\n  // Note the actual delay is not known until the first callback!\n  schedules[id] = self;\n  self.timer = Object(d3_timer__WEBPACK_IMPORTED_MODULE_1__[\"timer\"])(schedule, 0, self.time);\n\n  function schedule(elapsed) {\n    self.state = SCHEDULED;\n    self.timer.restart(start, self.delay, self.time);\n\n    // If the elapsed delay is less than our first sleep, start immediately.\n    if (self.delay <= elapsed) start(elapsed - self.delay);\n  }\n\n  function start(elapsed) {\n    var i, j, n, o;\n\n    // If the state is not SCHEDULED, then we previously errored on start.\n    if (self.state !== SCHEDULED) return stop();\n\n    for (i in schedules) {\n      o = schedules[i];\n      if (o.name !== self.name) continue;\n\n      // While this element already has a starting transition during this frame,\n      // defer starting an interrupting transition until that transition has a\n      // chance to tick (and possibly end); see d3/d3-transition#54!\n      if (o.state === STARTED) return Object(d3_timer__WEBPACK_IMPORTED_MODULE_1__[\"timeout\"])(start);\n\n      // Interrupt the active transition, if any.\n      if (o.state === RUNNING) {\n        o.state = ENDED;\n        o.timer.stop();\n        o.on.call(\"interrupt\", node, node.__data__, o.index, o.group);\n        delete schedules[i];\n      }\n\n      // Cancel any pre-empted transitions.\n      else if (+i < id) {\n        o.state = ENDED;\n        o.timer.stop();\n        o.on.call(\"cancel\", node, node.__data__, o.index, o.group);\n        delete schedules[i];\n      }\n    }\n\n    // Defer the first tick to end of the current frame; see d3/d3#1576.\n    // Note the transition may be canceled after start and before the first tick!\n    // Note this must be scheduled before the start event; see d3/d3-transition#16!\n    // Assuming this is successful, subsequent callbacks go straight to tick.\n    Object(d3_timer__WEBPACK_IMPORTED_MODULE_1__[\"timeout\"])(function() {\n      if (self.state === STARTED) {\n        self.state = RUNNING;\n        self.timer.restart(tick, self.delay, self.time);\n        tick(elapsed);\n      }\n    });\n\n    // Dispatch the start event.\n    // Note this must be done before the tween are initialized.\n    self.state = STARTING;\n    self.on.call(\"start\", node, node.__data__, self.index, self.group);\n    if (self.state !== STARTING) return; // interrupted\n    self.state = STARTED;\n\n    // Initialize the tween, deleting null tween.\n    tween = new Array(n = self.tween.length);\n    for (i = 0, j = -1; i < n; ++i) {\n      if (o = self.tween[i].value.call(node, node.__data__, self.index, self.group)) {\n        tween[++j] = o;\n      }\n    }\n    tween.length = j + 1;\n  }\n\n  function tick(elapsed) {\n    var t = elapsed < self.duration ? self.ease.call(null, elapsed / self.duration) : (self.timer.restart(stop), self.state = ENDING, 1),\n        i = -1,\n        n = tween.length;\n\n    while (++i < n) {\n      tween[i].call(node, t);\n    }\n\n    // Dispatch the end event.\n    if (self.state === ENDING) {\n      self.on.call(\"end\", node, node.__data__, self.index, self.group);\n      stop();\n    }\n  }\n\n  function stop() {\n    self.state = ENDED;\n    self.timer.stop();\n    delete schedules[id];\n    for (var i in schedules) return; // eslint-disable-line no-unused-vars\n    delete node.__transition;\n  }\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-transition/src/transition/select.js\":\n/*!*****************************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-transition/src/transition/select.js ***!\n  \\*****************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var d3_selection__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-selection */ \"./node_modules/d3/node_modules/d3-selection/src/index.js\");\n/* harmony import */ var _index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./index.js */ \"./node_modules/d3/node_modules/d3-transition/src/transition/index.js\");\n/* harmony import */ var _schedule_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./schedule.js */ \"./node_modules/d3/node_modules/d3-transition/src/transition/schedule.js\");\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(select) {\n  var name = this._name,\n      id = this._id;\n\n  if (typeof select !== \"function\") select = Object(d3_selection__WEBPACK_IMPORTED_MODULE_0__[\"selector\"])(select);\n\n  for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {\n    for (var group = groups[j], n = group.length, subgroup = subgroups[j] = new Array(n), node, subnode, i = 0; i < n; ++i) {\n      if ((node = group[i]) && (subnode = select.call(node, node.__data__, i, group))) {\n        if (\"__data__\" in node) subnode.__data__ = node.__data__;\n        subgroup[i] = subnode;\n        Object(_schedule_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(subgroup[i], name, id, i, subgroup, Object(_schedule_js__WEBPACK_IMPORTED_MODULE_2__[\"get\"])(node, id));\n      }\n    }\n  }\n\n  return new _index_js__WEBPACK_IMPORTED_MODULE_1__[\"Transition\"](subgroups, this._parents, name, id);\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-transition/src/transition/selectAll.js\":\n/*!********************************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-transition/src/transition/selectAll.js ***!\n  \\********************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var d3_selection__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-selection */ \"./node_modules/d3/node_modules/d3-selection/src/index.js\");\n/* harmony import */ var _index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./index.js */ \"./node_modules/d3/node_modules/d3-transition/src/transition/index.js\");\n/* harmony import */ var _schedule_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./schedule.js */ \"./node_modules/d3/node_modules/d3-transition/src/transition/schedule.js\");\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(select) {\n  var name = this._name,\n      id = this._id;\n\n  if (typeof select !== \"function\") select = Object(d3_selection__WEBPACK_IMPORTED_MODULE_0__[\"selectorAll\"])(select);\n\n  for (var groups = this._groups, m = groups.length, subgroups = [], parents = [], j = 0; j < m; ++j) {\n    for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) {\n      if (node = group[i]) {\n        for (var children = select.call(node, node.__data__, i, group), child, inherit = Object(_schedule_js__WEBPACK_IMPORTED_MODULE_2__[\"get\"])(node, id), k = 0, l = children.length; k < l; ++k) {\n          if (child = children[k]) {\n            Object(_schedule_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(child, name, id, k, children, inherit);\n          }\n        }\n        subgroups.push(children);\n        parents.push(node);\n      }\n    }\n  }\n\n  return new _index_js__WEBPACK_IMPORTED_MODULE_1__[\"Transition\"](subgroups, parents, name, id);\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-transition/src/transition/selection.js\":\n/*!********************************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-transition/src/transition/selection.js ***!\n  \\********************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var d3_selection__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-selection */ \"./node_modules/d3/node_modules/d3-selection/src/index.js\");\n\n\nvar Selection = d3_selection__WEBPACK_IMPORTED_MODULE_0__[\"selection\"].prototype.constructor;\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  return new Selection(this._groups, this._parents);\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-transition/src/transition/style.js\":\n/*!****************************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-transition/src/transition/style.js ***!\n  \\****************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var d3_interpolate__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-interpolate */ \"./node_modules/d3/node_modules/d3-interpolate/src/index.js\");\n/* harmony import */ var d3_selection__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! d3-selection */ \"./node_modules/d3/node_modules/d3-selection/src/index.js\");\n/* harmony import */ var _schedule_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./schedule.js */ \"./node_modules/d3/node_modules/d3-transition/src/transition/schedule.js\");\n/* harmony import */ var _tween_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./tween.js */ \"./node_modules/d3/node_modules/d3-transition/src/transition/tween.js\");\n/* harmony import */ var _interpolate_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./interpolate.js */ \"./node_modules/d3/node_modules/d3-transition/src/transition/interpolate.js\");\n\n\n\n\n\n\nfunction styleNull(name, interpolate) {\n  var string00,\n      string10,\n      interpolate0;\n  return function() {\n    var string0 = Object(d3_selection__WEBPACK_IMPORTED_MODULE_1__[\"style\"])(this, name),\n        string1 = (this.style.removeProperty(name), Object(d3_selection__WEBPACK_IMPORTED_MODULE_1__[\"style\"])(this, name));\n    return string0 === string1 ? null\n        : string0 === string00 && string1 === string10 ? interpolate0\n        : interpolate0 = interpolate(string00 = string0, string10 = string1);\n  };\n}\n\nfunction styleRemove(name) {\n  return function() {\n    this.style.removeProperty(name);\n  };\n}\n\nfunction styleConstant(name, interpolate, value1) {\n  var string00,\n      string1 = value1 + \"\",\n      interpolate0;\n  return function() {\n    var string0 = Object(d3_selection__WEBPACK_IMPORTED_MODULE_1__[\"style\"])(this, name);\n    return string0 === string1 ? null\n        : string0 === string00 ? interpolate0\n        : interpolate0 = interpolate(string00 = string0, value1);\n  };\n}\n\nfunction styleFunction(name, interpolate, value) {\n  var string00,\n      string10,\n      interpolate0;\n  return function() {\n    var string0 = Object(d3_selection__WEBPACK_IMPORTED_MODULE_1__[\"style\"])(this, name),\n        value1 = value(this),\n        string1 = value1 + \"\";\n    if (value1 == null) string1 = value1 = (this.style.removeProperty(name), Object(d3_selection__WEBPACK_IMPORTED_MODULE_1__[\"style\"])(this, name));\n    return string0 === string1 ? null\n        : string0 === string00 && string1 === string10 ? interpolate0\n        : (string10 = string1, interpolate0 = interpolate(string00 = string0, value1));\n  };\n}\n\nfunction styleMaybeRemove(id, name) {\n  var on0, on1, listener0, key = \"style.\" + name, event = \"end.\" + key, remove;\n  return function() {\n    var schedule = Object(_schedule_js__WEBPACK_IMPORTED_MODULE_2__[\"set\"])(this, id),\n        on = schedule.on,\n        listener = schedule.value[key] == null ? remove || (remove = styleRemove(name)) : undefined;\n\n    // If this node shared a dispatch with the previous node,\n    // just assign the updated shared dispatch and we’re done!\n    // Otherwise, copy-on-write.\n    if (on !== on0 || listener0 !== listener) (on1 = (on0 = on).copy()).on(event, listener0 = listener);\n\n    schedule.on = on1;\n  };\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(name, value, priority) {\n  var i = (name += \"\") === \"transform\" ? d3_interpolate__WEBPACK_IMPORTED_MODULE_0__[\"interpolateTransformCss\"] : _interpolate_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"];\n  return value == null ? this\n      .styleTween(name, styleNull(name, i))\n      .on(\"end.style.\" + name, styleRemove(name))\n    : typeof value === \"function\" ? this\n      .styleTween(name, styleFunction(name, i, Object(_tween_js__WEBPACK_IMPORTED_MODULE_3__[\"tweenValue\"])(this, \"style.\" + name, value)))\n      .each(styleMaybeRemove(this._id, name))\n    : this\n      .styleTween(name, styleConstant(name, i, value), priority)\n      .on(\"end.style.\" + name, null);\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-transition/src/transition/styleTween.js\":\n/*!*********************************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-transition/src/transition/styleTween.js ***!\n  \\*********************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\nfunction styleInterpolate(name, i, priority) {\n  return function(t) {\n    this.style.setProperty(name, i.call(this, t), priority);\n  };\n}\n\nfunction styleTween(name, value, priority) {\n  var t, i0;\n  function tween() {\n    var i = value.apply(this, arguments);\n    if (i !== i0) t = (i0 = i) && styleInterpolate(name, i, priority);\n    return t;\n  }\n  tween._value = value;\n  return tween;\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(name, value, priority) {\n  var key = \"style.\" + (name += \"\");\n  if (arguments.length < 2) return (key = this.tween(key)) && key._value;\n  if (value == null) return this.tween(key, null);\n  if (typeof value !== \"function\") throw new Error;\n  return this.tween(key, styleTween(name, value, priority == null ? \"\" : priority));\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-transition/src/transition/text.js\":\n/*!***************************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-transition/src/transition/text.js ***!\n  \\***************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _tween_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./tween.js */ \"./node_modules/d3/node_modules/d3-transition/src/transition/tween.js\");\n\n\nfunction textConstant(value) {\n  return function() {\n    this.textContent = value;\n  };\n}\n\nfunction textFunction(value) {\n  return function() {\n    var value1 = value(this);\n    this.textContent = value1 == null ? \"\" : value1;\n  };\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(value) {\n  return this.tween(\"text\", typeof value === \"function\"\n      ? textFunction(Object(_tween_js__WEBPACK_IMPORTED_MODULE_0__[\"tweenValue\"])(this, \"text\", value))\n      : textConstant(value == null ? \"\" : value + \"\"));\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-transition/src/transition/textTween.js\":\n/*!********************************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-transition/src/transition/textTween.js ***!\n  \\********************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\nfunction textInterpolate(i) {\n  return function(t) {\n    this.textContent = i.call(this, t);\n  };\n}\n\nfunction textTween(value) {\n  var t0, i0;\n  function tween() {\n    var i = value.apply(this, arguments);\n    if (i !== i0) t0 = (i0 = i) && textInterpolate(i);\n    return t0;\n  }\n  tween._value = value;\n  return tween;\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(value) {\n  var key = \"text\";\n  if (arguments.length < 1) return (key = this.tween(key)) && key._value;\n  if (value == null) return this.tween(key, null);\n  if (typeof value !== \"function\") throw new Error;\n  return this.tween(key, textTween(value));\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-transition/src/transition/transition.js\":\n/*!*********************************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-transition/src/transition/transition.js ***!\n  \\*********************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./index.js */ \"./node_modules/d3/node_modules/d3-transition/src/transition/index.js\");\n/* harmony import */ var _schedule_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./schedule.js */ \"./node_modules/d3/node_modules/d3-transition/src/transition/schedule.js\");\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  var name = this._name,\n      id0 = this._id,\n      id1 = Object(_index_js__WEBPACK_IMPORTED_MODULE_0__[\"newId\"])();\n\n  for (var groups = this._groups, m = groups.length, j = 0; j < m; ++j) {\n    for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) {\n      if (node = group[i]) {\n        var inherit = Object(_schedule_js__WEBPACK_IMPORTED_MODULE_1__[\"get\"])(node, id0);\n        Object(_schedule_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(node, name, id1, i, group, {\n          time: inherit.time + inherit.delay + inherit.duration,\n          delay: 0,\n          duration: inherit.duration,\n          ease: inherit.ease\n        });\n      }\n    }\n  }\n\n  return new _index_js__WEBPACK_IMPORTED_MODULE_0__[\"Transition\"](groups, this._parents, name, id1);\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/node_modules/d3-transition/src/transition/tween.js\":\n/*!****************************************************************************!*\\\n  !*** ./node_modules/d3/node_modules/d3-transition/src/transition/tween.js ***!\n  \\****************************************************************************/\n/*! exports provided: default, tweenValue */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"tweenValue\", function() { return tweenValue; });\n/* harmony import */ var _schedule_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./schedule.js */ \"./node_modules/d3/node_modules/d3-transition/src/transition/schedule.js\");\n\n\nfunction tweenRemove(id, name) {\n  var tween0, tween1;\n  return function() {\n    var schedule = Object(_schedule_js__WEBPACK_IMPORTED_MODULE_0__[\"set\"])(this, id),\n        tween = schedule.tween;\n\n    // If this node shared tween with the previous node,\n    // just assign the updated shared tween and we’re done!\n    // Otherwise, copy-on-write.\n    if (tween !== tween0) {\n      tween1 = tween0 = tween;\n      for (var i = 0, n = tween1.length; i < n; ++i) {\n        if (tween1[i].name === name) {\n          tween1 = tween1.slice();\n          tween1.splice(i, 1);\n          break;\n        }\n      }\n    }\n\n    schedule.tween = tween1;\n  };\n}\n\nfunction tweenFunction(id, name, value) {\n  var tween0, tween1;\n  if (typeof value !== \"function\") throw new Error;\n  return function() {\n    var schedule = Object(_schedule_js__WEBPACK_IMPORTED_MODULE_0__[\"set\"])(this, id),\n        tween = schedule.tween;\n\n    // If this node shared tween with the previous node,\n    // just assign the updated shared tween and we’re done!\n    // Otherwise, copy-on-write.\n    if (tween !== tween0) {\n      tween1 = (tween0 = tween).slice();\n      for (var t = {name: name, value: value}, i = 0, n = tween1.length; i < n; ++i) {\n        if (tween1[i].name === name) {\n          tween1[i] = t;\n          break;\n        }\n      }\n      if (i === n) tween1.push(t);\n    }\n\n    schedule.tween = tween1;\n  };\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(name, value) {\n  var id = this._id;\n\n  name += \"\";\n\n  if (arguments.length < 2) {\n    var tween = Object(_schedule_js__WEBPACK_IMPORTED_MODULE_0__[\"get\"])(this.node(), id).tween;\n    for (var i = 0, n = tween.length, t; i < n; ++i) {\n      if ((t = tween[i]).name === name) {\n        return t.value;\n      }\n    }\n    return null;\n  }\n\n  return this.each((value == null ? tweenRemove : tweenFunction)(id, name, value));\n});\n\nfunction tweenValue(transition, name, value) {\n  var id = transition._id;\n\n  transition.each(function() {\n    var schedule = Object(_schedule_js__WEBPACK_IMPORTED_MODULE_0__[\"set\"])(this, id);\n    (schedule.value || (schedule.value = {}))[name] = value.apply(this, arguments);\n  });\n\n  return function(node) {\n    return Object(_schedule_js__WEBPACK_IMPORTED_MODULE_0__[\"get\"])(node, id).value[name];\n  };\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/d3/src/index.js\":\n/*!**************************************!*\\\n  !*** ./node_modules/d3/src/index.js ***!\n  \\**************************************/\n/*! exports provided: bisect, bisectRight, bisectLeft, bisectCenter, ascending, bisector, count, cross, cumsum, descending, deviation, extent, Adder, fsum, fcumsum, group, flatGroup, flatRollup, groups, index, indexes, rollup, rollups, groupSort, bin, histogram, thresholdFreedmanDiaconis, thresholdScott, thresholdSturges, max, maxIndex, mean, median, merge, min, minIndex, mode, nice, pairs, permute, quantile, quantileSorted, quickselect, range, least, leastIndex, greatest, greatestIndex, scan, shuffle, shuffler, sum, ticks, tickIncrement, tickStep, transpose, variance, zip, every, some, filter, map, reduce, reverse, sort, difference, disjoint, intersection, subset, superset, union, InternMap, InternSet, axisTop, axisRight, axisBottom, axisLeft, brush, brushX, brushY, brushSelection, chord, chordTranspose, chordDirected, ribbon, ribbonArrow, color, rgb, hsl, lab, hcl, lch, gray, cubehelix, contours, contourDensity, Delaunay, Voronoi, dispatch, drag, dragDisable, dragEnable, dsvFormat, csvParse, csvParseRows, csvFormat, csvFormatBody, csvFormatRows, csvFormatRow, csvFormatValue, tsvParse, tsvParseRows, tsvFormat, tsvFormatBody, tsvFormatRows, tsvFormatRow, tsvFormatValue, autoType, easeLinear, easeQuad, easeQuadIn, easeQuadOut, easeQuadInOut, easeCubic, easeCubicIn, easeCubicOut, easeCubicInOut, easePoly, easePolyIn, easePolyOut, easePolyInOut, easeSin, easeSinIn, easeSinOut, easeSinInOut, easeExp, easeExpIn, easeExpOut, easeExpInOut, easeCircle, easeCircleIn, easeCircleOut, easeCircleInOut, easeBounce, easeBounceIn, easeBounceOut, easeBounceInOut, easeBack, easeBackIn, easeBackOut, easeBackInOut, easeElastic, easeElasticIn, easeElasticOut, easeElasticInOut, blob, buffer, dsv, csv, tsv, image, json, text, xml, html, svg, forceCenter, forceCollide, forceLink, forceManyBody, forceRadial, forceSimulation, forceX, forceY, formatDefaultLocale, format, formatPrefix, formatLocale, formatSpecifier, FormatSpecifier, precisionFixed, precisionPrefix, precisionRound, geoArea, geoBounds, geoCentroid, geoCircle, geoClipAntimeridian, geoClipCircle, geoClipExtent, geoClipRectangle, geoContains, geoDistance, geoGraticule, geoGraticule10, geoInterpolate, geoLength, geoPath, geoAlbers, geoAlbersUsa, geoAzimuthalEqualArea, geoAzimuthalEqualAreaRaw, geoAzimuthalEquidistant, geoAzimuthalEquidistantRaw, geoConicConformal, geoConicConformalRaw, geoConicEqualArea, geoConicEqualAreaRaw, geoConicEquidistant, geoConicEquidistantRaw, geoEqualEarth, geoEqualEarthRaw, geoEquirectangular, geoEquirectangularRaw, geoGnomonic, geoGnomonicRaw, geoIdentity, geoProjection, geoProjectionMutator, geoMercator, geoMercatorRaw, geoNaturalEarth1, geoNaturalEarth1Raw, geoOrthographic, geoOrthographicRaw, geoStereographic, geoStereographicRaw, geoTransverseMercator, geoTransverseMercatorRaw, geoRotation, geoStream, geoTransform, cluster, hierarchy, Node, pack, packSiblings, packEnclose, partition, stratify, tree, treemap, treemapBinary, treemapDice, treemapSlice, treemapSliceDice, treemapSquarify, treemapResquarify, interpolate, interpolateArray, interpolateBasis, interpolateBasisClosed, interpolateDate, interpolateDiscrete, interpolateHue, interpolateNumber, interpolateNumberArray, interpolateObject, interpolateRound, interpolateString, interpolateTransformCss, interpolateTransformSvg, interpolateZoom, interpolateRgb, interpolateRgbBasis, interpolateRgbBasisClosed, interpolateHsl, interpolateHslLong, interpolateLab, interpolateHcl, interpolateHclLong, interpolateCubehelix, interpolateCubehelixLong, piecewise, quantize, path, polygonArea, polygonCentroid, polygonHull, polygonContains, polygonLength, quadtree, randomUniform, randomInt, randomNormal, randomLogNormal, randomBates, randomIrwinHall, randomExponential, randomPareto, randomBernoulli, randomGeometric, randomBinomial, randomGamma, randomBeta, randomWeibull, randomCauchy, randomLogistic, randomPoisson, randomLcg, scaleBand, scalePoint, scaleIdentity, scaleLinear, scaleLog, scaleSymlog, scaleOrdinal, scaleImplicit, scalePow, scaleSqrt, scaleRadial, scaleQuantile, scaleQuantize, scaleThreshold, scaleTime, scaleUtc, scaleSequential, scaleSequentialLog, scaleSequentialPow, scaleSequentialSqrt, scaleSequentialSymlog, scaleSequentialQuantile, scaleDiverging, scaleDivergingLog, scaleDivergingPow, scaleDivergingSqrt, scaleDivergingSymlog, tickFormat, schemeCategory10, schemeAccent, schemeDark2, schemePaired, schemePastel1, schemePastel2, schemeSet1, schemeSet2, schemeSet3, schemeTableau10, interpolateBrBG, schemeBrBG, interpolatePRGn, schemePRGn, interpolatePiYG, schemePiYG, interpolatePuOr, schemePuOr, interpolateRdBu, schemeRdBu, interpolateRdGy, schemeRdGy, interpolateRdYlBu, schemeRdYlBu, interpolateRdYlGn, schemeRdYlGn, interpolateSpectral, schemeSpectral, interpolateBuGn, schemeBuGn, interpolateBuPu, schemeBuPu, interpolateGnBu, schemeGnBu, interpolateOrRd, schemeOrRd, interpolatePuBuGn, schemePuBuGn, interpolatePuBu, schemePuBu, interpolatePuRd, schemePuRd, interpolateRdPu, schemeRdPu, interpolateYlGnBu, schemeYlGnBu, interpolateYlGn, schemeYlGn, interpolateYlOrBr, schemeYlOrBr, interpolateYlOrRd, schemeYlOrRd, interpolateBlues, schemeBlues, interpolateGreens, schemeGreens, interpolateGreys, schemeGreys, interpolatePurples, schemePurples, interpolateReds, schemeReds, interpolateOranges, schemeOranges, interpolateCividis, interpolateCubehelixDefault, interpolateRainbow, interpolateWarm, interpolateCool, interpolateSinebow, interpolateTurbo, interpolateViridis, interpolateMagma, interpolateInferno, interpolatePlasma, create, creator, local, matcher, namespace, namespaces, pointer, pointers, select, selectAll, selection, selector, selectorAll, style, window, arc, area, line, pie, areaRadial, radialArea, lineRadial, radialLine, pointRadial, linkHorizontal, linkVertical, linkRadial, symbol, symbols, symbolCircle, symbolCross, symbolDiamond, symbolSquare, symbolStar, symbolTriangle, symbolWye, curveBasisClosed, curveBasisOpen, curveBasis, curveBumpX, curveBumpY, curveBundle, curveCardinalClosed, curveCardinalOpen, curveCardinal, curveCatmullRomClosed, curveCatmullRomOpen, curveCatmullRom, curveLinearClosed, curveLinear, curveMonotoneX, curveMonotoneY, curveNatural, curveStep, curveStepAfter, curveStepBefore, stack, stackOffsetExpand, stackOffsetDiverging, stackOffsetNone, stackOffsetSilhouette, stackOffsetWiggle, stackOrderAppearance, stackOrderAscending, stackOrderDescending, stackOrderInsideOut, stackOrderNone, stackOrderReverse, timeInterval, timeMillisecond, timeMilliseconds, utcMillisecond, utcMilliseconds, timeSecond, timeSeconds, utcSecond, utcSeconds, timeMinute, timeMinutes, timeHour, timeHours, timeDay, timeDays, timeWeek, timeWeeks, timeSunday, timeSundays, timeMonday, timeMondays, timeTuesday, timeTuesdays, timeWednesday, timeWednesdays, timeThursday, timeThursdays, timeFriday, timeFridays, timeSaturday, timeSaturdays, timeMonth, timeMonths, timeYear, timeYears, utcMinute, utcMinutes, utcHour, utcHours, utcDay, utcDays, utcWeek, utcWeeks, utcSunday, utcSundays, utcMonday, utcMondays, utcTuesday, utcTuesdays, utcWednesday, utcWednesdays, utcThursday, utcThursdays, utcFriday, utcFridays, utcSaturday, utcSaturdays, utcMonth, utcMonths, utcYear, utcYears, utcTicks, utcTickInterval, timeTicks, timeTickInterval, timeFormatDefaultLocale, timeFormat, timeParse, utcFormat, utcParse, timeFormatLocale, isoFormat, isoParse, now, timer, timerFlush, timeout, interval, transition, active, interrupt, zoom, zoomTransform, zoomIdentity, ZoomTransform */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var d3_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-array */ \"./node_modules/d3/node_modules/d3-array/src/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"bisect\", function() { return d3_array__WEBPACK_IMPORTED_MODULE_0__[\"bisect\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"bisectRight\", function() { return d3_array__WEBPACK_IMPORTED_MODULE_0__[\"bisectRight\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"bisectLeft\", function() { return d3_array__WEBPACK_IMPORTED_MODULE_0__[\"bisectLeft\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"bisectCenter\", function() { return d3_array__WEBPACK_IMPORTED_MODULE_0__[\"bisectCenter\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"ascending\", function() { return d3_array__WEBPACK_IMPORTED_MODULE_0__[\"ascending\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"bisector\", function() { return d3_array__WEBPACK_IMPORTED_MODULE_0__[\"bisector\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"count\", function() { return d3_array__WEBPACK_IMPORTED_MODULE_0__[\"count\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"cross\", function() { return d3_array__WEBPACK_IMPORTED_MODULE_0__[\"cross\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"cumsum\", function() { return d3_array__WEBPACK_IMPORTED_MODULE_0__[\"cumsum\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"descending\", function() { return d3_array__WEBPACK_IMPORTED_MODULE_0__[\"descending\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"deviation\", function() { return d3_array__WEBPACK_IMPORTED_MODULE_0__[\"deviation\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"extent\", function() { return d3_array__WEBPACK_IMPORTED_MODULE_0__[\"extent\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"Adder\", function() { return d3_array__WEBPACK_IMPORTED_MODULE_0__[\"Adder\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"fsum\", function() { return d3_array__WEBPACK_IMPORTED_MODULE_0__[\"fsum\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"fcumsum\", function() { return d3_array__WEBPACK_IMPORTED_MODULE_0__[\"fcumsum\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"group\", function() { return d3_array__WEBPACK_IMPORTED_MODULE_0__[\"group\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"flatGroup\", function() { return d3_array__WEBPACK_IMPORTED_MODULE_0__[\"flatGroup\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"flatRollup\", function() { return d3_array__WEBPACK_IMPORTED_MODULE_0__[\"flatRollup\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"groups\", function() { return d3_array__WEBPACK_IMPORTED_MODULE_0__[\"groups\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"index\", function() { return d3_array__WEBPACK_IMPORTED_MODULE_0__[\"index\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"indexes\", function() { return d3_array__WEBPACK_IMPORTED_MODULE_0__[\"indexes\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"rollup\", function() { return d3_array__WEBPACK_IMPORTED_MODULE_0__[\"rollup\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"rollups\", function() { return d3_array__WEBPACK_IMPORTED_MODULE_0__[\"rollups\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"groupSort\", function() { return d3_array__WEBPACK_IMPORTED_MODULE_0__[\"groupSort\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"bin\", function() { return d3_array__WEBPACK_IMPORTED_MODULE_0__[\"bin\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"histogram\", function() { return d3_array__WEBPACK_IMPORTED_MODULE_0__[\"histogram\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"thresholdFreedmanDiaconis\", function() { return d3_array__WEBPACK_IMPORTED_MODULE_0__[\"thresholdFreedmanDiaconis\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"thresholdScott\", function() { return d3_array__WEBPACK_IMPORTED_MODULE_0__[\"thresholdScott\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"thresholdSturges\", function() { return d3_array__WEBPACK_IMPORTED_MODULE_0__[\"thresholdSturges\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"max\", function() { return d3_array__WEBPACK_IMPORTED_MODULE_0__[\"max\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"maxIndex\", function() { return d3_array__WEBPACK_IMPORTED_MODULE_0__[\"maxIndex\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"mean\", function() { return d3_array__WEBPACK_IMPORTED_MODULE_0__[\"mean\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"median\", function() { return d3_array__WEBPACK_IMPORTED_MODULE_0__[\"median\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"merge\", function() { return d3_array__WEBPACK_IMPORTED_MODULE_0__[\"merge\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"min\", function() { return d3_array__WEBPACK_IMPORTED_MODULE_0__[\"min\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"minIndex\", function() { return d3_array__WEBPACK_IMPORTED_MODULE_0__[\"minIndex\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"mode\", function() { return d3_array__WEBPACK_IMPORTED_MODULE_0__[\"mode\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"nice\", function() { return d3_array__WEBPACK_IMPORTED_MODULE_0__[\"nice\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"pairs\", function() { return d3_array__WEBPACK_IMPORTED_MODULE_0__[\"pairs\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"permute\", function() { return d3_array__WEBPACK_IMPORTED_MODULE_0__[\"permute\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"quantile\", function() { return d3_array__WEBPACK_IMPORTED_MODULE_0__[\"quantile\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"quantileSorted\", function() { return d3_array__WEBPACK_IMPORTED_MODULE_0__[\"quantileSorted\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"quickselect\", function() { return d3_array__WEBPACK_IMPORTED_MODULE_0__[\"quickselect\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"range\", function() { return d3_array__WEBPACK_IMPORTED_MODULE_0__[\"range\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"least\", function() { return d3_array__WEBPACK_IMPORTED_MODULE_0__[\"least\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"leastIndex\", function() { return d3_array__WEBPACK_IMPORTED_MODULE_0__[\"leastIndex\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"greatest\", function() { return d3_array__WEBPACK_IMPORTED_MODULE_0__[\"greatest\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"greatestIndex\", function() { return d3_array__WEBPACK_IMPORTED_MODULE_0__[\"greatestIndex\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"scan\", function() { return d3_array__WEBPACK_IMPORTED_MODULE_0__[\"scan\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"shuffle\", function() { return d3_array__WEBPACK_IMPORTED_MODULE_0__[\"shuffle\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"shuffler\", function() { return d3_array__WEBPACK_IMPORTED_MODULE_0__[\"shuffler\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"sum\", function() { return d3_array__WEBPACK_IMPORTED_MODULE_0__[\"sum\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"ticks\", function() { return d3_array__WEBPACK_IMPORTED_MODULE_0__[\"ticks\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"tickIncrement\", function() { return d3_array__WEBPACK_IMPORTED_MODULE_0__[\"tickIncrement\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"tickStep\", function() { return d3_array__WEBPACK_IMPORTED_MODULE_0__[\"tickStep\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"transpose\", function() { return d3_array__WEBPACK_IMPORTED_MODULE_0__[\"transpose\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"variance\", function() { return d3_array__WEBPACK_IMPORTED_MODULE_0__[\"variance\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"zip\", function() { return d3_array__WEBPACK_IMPORTED_MODULE_0__[\"zip\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"every\", function() { return d3_array__WEBPACK_IMPORTED_MODULE_0__[\"every\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"some\", function() { return d3_array__WEBPACK_IMPORTED_MODULE_0__[\"some\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"filter\", function() { return d3_array__WEBPACK_IMPORTED_MODULE_0__[\"filter\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"map\", function() { return d3_array__WEBPACK_IMPORTED_MODULE_0__[\"map\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"reduce\", function() { return d3_array__WEBPACK_IMPORTED_MODULE_0__[\"reduce\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"reverse\", function() { return d3_array__WEBPACK_IMPORTED_MODULE_0__[\"reverse\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"sort\", function() { return d3_array__WEBPACK_IMPORTED_MODULE_0__[\"sort\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"difference\", function() { return d3_array__WEBPACK_IMPORTED_MODULE_0__[\"difference\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"disjoint\", function() { return d3_array__WEBPACK_IMPORTED_MODULE_0__[\"disjoint\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"intersection\", function() { return d3_array__WEBPACK_IMPORTED_MODULE_0__[\"intersection\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"subset\", function() { return d3_array__WEBPACK_IMPORTED_MODULE_0__[\"subset\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"superset\", function() { return d3_array__WEBPACK_IMPORTED_MODULE_0__[\"superset\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"union\", function() { return d3_array__WEBPACK_IMPORTED_MODULE_0__[\"union\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"InternMap\", function() { return d3_array__WEBPACK_IMPORTED_MODULE_0__[\"InternMap\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"InternSet\", function() { return d3_array__WEBPACK_IMPORTED_MODULE_0__[\"InternSet\"]; });\n\n/* harmony import */ var d3_axis__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! d3-axis */ \"./node_modules/d3-axis/src/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"axisTop\", function() { return d3_axis__WEBPACK_IMPORTED_MODULE_1__[\"axisTop\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"axisRight\", function() { return d3_axis__WEBPACK_IMPORTED_MODULE_1__[\"axisRight\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"axisBottom\", function() { return d3_axis__WEBPACK_IMPORTED_MODULE_1__[\"axisBottom\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"axisLeft\", function() { return d3_axis__WEBPACK_IMPORTED_MODULE_1__[\"axisLeft\"]; });\n\n/* harmony import */ var d3_brush__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! d3-brush */ \"./node_modules/d3-brush/src/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"brush\", function() { return d3_brush__WEBPACK_IMPORTED_MODULE_2__[\"brush\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"brushX\", function() { return d3_brush__WEBPACK_IMPORTED_MODULE_2__[\"brushX\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"brushY\", function() { return d3_brush__WEBPACK_IMPORTED_MODULE_2__[\"brushY\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"brushSelection\", function() { return d3_brush__WEBPACK_IMPORTED_MODULE_2__[\"brushSelection\"]; });\n\n/* harmony import */ var d3_chord__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! d3-chord */ \"./node_modules/d3-chord/src/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"chord\", function() { return d3_chord__WEBPACK_IMPORTED_MODULE_3__[\"chord\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"chordTranspose\", function() { return d3_chord__WEBPACK_IMPORTED_MODULE_3__[\"chordTranspose\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"chordDirected\", function() { return d3_chord__WEBPACK_IMPORTED_MODULE_3__[\"chordDirected\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"ribbon\", function() { return d3_chord__WEBPACK_IMPORTED_MODULE_3__[\"ribbon\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"ribbonArrow\", function() { return d3_chord__WEBPACK_IMPORTED_MODULE_3__[\"ribbonArrow\"]; });\n\n/* harmony import */ var d3_color__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! d3-color */ \"./node_modules/d3/node_modules/d3-color/src/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"color\", function() { return d3_color__WEBPACK_IMPORTED_MODULE_4__[\"color\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"rgb\", function() { return d3_color__WEBPACK_IMPORTED_MODULE_4__[\"rgb\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"hsl\", function() { return d3_color__WEBPACK_IMPORTED_MODULE_4__[\"hsl\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"lab\", function() { return d3_color__WEBPACK_IMPORTED_MODULE_4__[\"lab\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"hcl\", function() { return d3_color__WEBPACK_IMPORTED_MODULE_4__[\"hcl\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"lch\", function() { return d3_color__WEBPACK_IMPORTED_MODULE_4__[\"lch\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"gray\", function() { return d3_color__WEBPACK_IMPORTED_MODULE_4__[\"gray\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"cubehelix\", function() { return d3_color__WEBPACK_IMPORTED_MODULE_4__[\"cubehelix\"]; });\n\n/* harmony import */ var d3_contour__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! d3-contour */ \"./node_modules/d3-contour/src/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"contours\", function() { return d3_contour__WEBPACK_IMPORTED_MODULE_5__[\"contours\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"contourDensity\", function() { return d3_contour__WEBPACK_IMPORTED_MODULE_5__[\"contourDensity\"]; });\n\n/* harmony import */ var d3_delaunay__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! d3-delaunay */ \"./node_modules/d3-delaunay/src/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"Delaunay\", function() { return d3_delaunay__WEBPACK_IMPORTED_MODULE_6__[\"Delaunay\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"Voronoi\", function() { return d3_delaunay__WEBPACK_IMPORTED_MODULE_6__[\"Voronoi\"]; });\n\n/* harmony import */ var d3_dispatch__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! d3-dispatch */ \"./node_modules/d3/node_modules/d3-dispatch/src/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"dispatch\", function() { return d3_dispatch__WEBPACK_IMPORTED_MODULE_7__[\"dispatch\"]; });\n\n/* harmony import */ var d3_drag__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! d3-drag */ \"./node_modules/d3/node_modules/d3-drag/src/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"drag\", function() { return d3_drag__WEBPACK_IMPORTED_MODULE_8__[\"drag\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"dragDisable\", function() { return d3_drag__WEBPACK_IMPORTED_MODULE_8__[\"dragDisable\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"dragEnable\", function() { return d3_drag__WEBPACK_IMPORTED_MODULE_8__[\"dragEnable\"]; });\n\n/* harmony import */ var d3_dsv__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! d3-dsv */ \"./node_modules/d3/node_modules/d3-dsv/src/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"dsvFormat\", function() { return d3_dsv__WEBPACK_IMPORTED_MODULE_9__[\"dsvFormat\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"csvParse\", function() { return d3_dsv__WEBPACK_IMPORTED_MODULE_9__[\"csvParse\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"csvParseRows\", function() { return d3_dsv__WEBPACK_IMPORTED_MODULE_9__[\"csvParseRows\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"csvFormat\", function() { return d3_dsv__WEBPACK_IMPORTED_MODULE_9__[\"csvFormat\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"csvFormatBody\", function() { return d3_dsv__WEBPACK_IMPORTED_MODULE_9__[\"csvFormatBody\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"csvFormatRows\", function() { return d3_dsv__WEBPACK_IMPORTED_MODULE_9__[\"csvFormatRows\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"csvFormatRow\", function() { return d3_dsv__WEBPACK_IMPORTED_MODULE_9__[\"csvFormatRow\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"csvFormatValue\", function() { return d3_dsv__WEBPACK_IMPORTED_MODULE_9__[\"csvFormatValue\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"tsvParse\", function() { return d3_dsv__WEBPACK_IMPORTED_MODULE_9__[\"tsvParse\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"tsvParseRows\", function() { return d3_dsv__WEBPACK_IMPORTED_MODULE_9__[\"tsvParseRows\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"tsvFormat\", function() { return d3_dsv__WEBPACK_IMPORTED_MODULE_9__[\"tsvFormat\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"tsvFormatBody\", function() { return d3_dsv__WEBPACK_IMPORTED_MODULE_9__[\"tsvFormatBody\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"tsvFormatRows\", function() { return d3_dsv__WEBPACK_IMPORTED_MODULE_9__[\"tsvFormatRows\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"tsvFormatRow\", function() { return d3_dsv__WEBPACK_IMPORTED_MODULE_9__[\"tsvFormatRow\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"tsvFormatValue\", function() { return d3_dsv__WEBPACK_IMPORTED_MODULE_9__[\"tsvFormatValue\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"autoType\", function() { return d3_dsv__WEBPACK_IMPORTED_MODULE_9__[\"autoType\"]; });\n\n/* harmony import */ var d3_ease__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! d3-ease */ \"./node_modules/d3/node_modules/d3-ease/src/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeLinear\", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_10__[\"easeLinear\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeQuad\", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_10__[\"easeQuad\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeQuadIn\", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_10__[\"easeQuadIn\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeQuadOut\", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_10__[\"easeQuadOut\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeQuadInOut\", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_10__[\"easeQuadInOut\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeCubic\", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_10__[\"easeCubic\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeCubicIn\", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_10__[\"easeCubicIn\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeCubicOut\", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_10__[\"easeCubicOut\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeCubicInOut\", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_10__[\"easeCubicInOut\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easePoly\", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_10__[\"easePoly\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easePolyIn\", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_10__[\"easePolyIn\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easePolyOut\", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_10__[\"easePolyOut\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easePolyInOut\", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_10__[\"easePolyInOut\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeSin\", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_10__[\"easeSin\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeSinIn\", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_10__[\"easeSinIn\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeSinOut\", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_10__[\"easeSinOut\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeSinInOut\", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_10__[\"easeSinInOut\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeExp\", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_10__[\"easeExp\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeExpIn\", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_10__[\"easeExpIn\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeExpOut\", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_10__[\"easeExpOut\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeExpInOut\", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_10__[\"easeExpInOut\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeCircle\", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_10__[\"easeCircle\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeCircleIn\", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_10__[\"easeCircleIn\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeCircleOut\", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_10__[\"easeCircleOut\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeCircleInOut\", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_10__[\"easeCircleInOut\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeBounce\", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_10__[\"easeBounce\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeBounceIn\", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_10__[\"easeBounceIn\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeBounceOut\", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_10__[\"easeBounceOut\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeBounceInOut\", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_10__[\"easeBounceInOut\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeBack\", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_10__[\"easeBack\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeBackIn\", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_10__[\"easeBackIn\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeBackOut\", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_10__[\"easeBackOut\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeBackInOut\", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_10__[\"easeBackInOut\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeElastic\", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_10__[\"easeElastic\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeElasticIn\", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_10__[\"easeElasticIn\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeElasticOut\", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_10__[\"easeElasticOut\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeElasticInOut\", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_10__[\"easeElasticInOut\"]; });\n\n/* harmony import */ var d3_fetch__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! d3-fetch */ \"./node_modules/d3-fetch/src/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"blob\", function() { return d3_fetch__WEBPACK_IMPORTED_MODULE_11__[\"blob\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"buffer\", function() { return d3_fetch__WEBPACK_IMPORTED_MODULE_11__[\"buffer\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"dsv\", function() { return d3_fetch__WEBPACK_IMPORTED_MODULE_11__[\"dsv\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"csv\", function() { return d3_fetch__WEBPACK_IMPORTED_MODULE_11__[\"csv\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"tsv\", function() { return d3_fetch__WEBPACK_IMPORTED_MODULE_11__[\"tsv\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"image\", function() { return d3_fetch__WEBPACK_IMPORTED_MODULE_11__[\"image\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"json\", function() { return d3_fetch__WEBPACK_IMPORTED_MODULE_11__[\"json\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"text\", function() { return d3_fetch__WEBPACK_IMPORTED_MODULE_11__[\"text\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"xml\", function() { return d3_fetch__WEBPACK_IMPORTED_MODULE_11__[\"xml\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"html\", function() { return d3_fetch__WEBPACK_IMPORTED_MODULE_11__[\"html\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"svg\", function() { return d3_fetch__WEBPACK_IMPORTED_MODULE_11__[\"svg\"]; });\n\n/* harmony import */ var d3_force__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! d3-force */ \"./node_modules/d3-force/src/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"forceCenter\", function() { return d3_force__WEBPACK_IMPORTED_MODULE_12__[\"forceCenter\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"forceCollide\", function() { return d3_force__WEBPACK_IMPORTED_MODULE_12__[\"forceCollide\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"forceLink\", function() { return d3_force__WEBPACK_IMPORTED_MODULE_12__[\"forceLink\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"forceManyBody\", function() { return d3_force__WEBPACK_IMPORTED_MODULE_12__[\"forceManyBody\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"forceRadial\", function() { return d3_force__WEBPACK_IMPORTED_MODULE_12__[\"forceRadial\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"forceSimulation\", function() { return d3_force__WEBPACK_IMPORTED_MODULE_12__[\"forceSimulation\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"forceX\", function() { return d3_force__WEBPACK_IMPORTED_MODULE_12__[\"forceX\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"forceY\", function() { return d3_force__WEBPACK_IMPORTED_MODULE_12__[\"forceY\"]; });\n\n/* harmony import */ var d3_format__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! d3-format */ \"./node_modules/d3/node_modules/d3-format/src/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"formatDefaultLocale\", function() { return d3_format__WEBPACK_IMPORTED_MODULE_13__[\"formatDefaultLocale\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"format\", function() { return d3_format__WEBPACK_IMPORTED_MODULE_13__[\"format\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"formatPrefix\", function() { return d3_format__WEBPACK_IMPORTED_MODULE_13__[\"formatPrefix\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"formatLocale\", function() { return d3_format__WEBPACK_IMPORTED_MODULE_13__[\"formatLocale\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"formatSpecifier\", function() { return d3_format__WEBPACK_IMPORTED_MODULE_13__[\"formatSpecifier\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"FormatSpecifier\", function() { return d3_format__WEBPACK_IMPORTED_MODULE_13__[\"FormatSpecifier\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"precisionFixed\", function() { return d3_format__WEBPACK_IMPORTED_MODULE_13__[\"precisionFixed\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"precisionPrefix\", function() { return d3_format__WEBPACK_IMPORTED_MODULE_13__[\"precisionPrefix\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"precisionRound\", function() { return d3_format__WEBPACK_IMPORTED_MODULE_13__[\"precisionRound\"]; });\n\n/* harmony import */ var d3_geo__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! d3-geo */ \"./node_modules/d3-geo/src/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoArea\", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_14__[\"geoArea\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoBounds\", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_14__[\"geoBounds\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoCentroid\", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_14__[\"geoCentroid\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoCircle\", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_14__[\"geoCircle\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoClipAntimeridian\", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_14__[\"geoClipAntimeridian\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoClipCircle\", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_14__[\"geoClipCircle\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoClipExtent\", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_14__[\"geoClipExtent\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoClipRectangle\", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_14__[\"geoClipRectangle\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoContains\", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_14__[\"geoContains\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoDistance\", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_14__[\"geoDistance\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoGraticule\", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_14__[\"geoGraticule\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoGraticule10\", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_14__[\"geoGraticule10\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoInterpolate\", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_14__[\"geoInterpolate\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoLength\", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_14__[\"geoLength\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoPath\", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_14__[\"geoPath\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoAlbers\", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_14__[\"geoAlbers\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoAlbersUsa\", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_14__[\"geoAlbersUsa\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoAzimuthalEqualArea\", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_14__[\"geoAzimuthalEqualArea\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoAzimuthalEqualAreaRaw\", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_14__[\"geoAzimuthalEqualAreaRaw\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoAzimuthalEquidistant\", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_14__[\"geoAzimuthalEquidistant\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoAzimuthalEquidistantRaw\", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_14__[\"geoAzimuthalEquidistantRaw\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoConicConformal\", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_14__[\"geoConicConformal\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoConicConformalRaw\", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_14__[\"geoConicConformalRaw\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoConicEqualArea\", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_14__[\"geoConicEqualArea\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoConicEqualAreaRaw\", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_14__[\"geoConicEqualAreaRaw\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoConicEquidistant\", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_14__[\"geoConicEquidistant\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoConicEquidistantRaw\", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_14__[\"geoConicEquidistantRaw\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoEqualEarth\", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_14__[\"geoEqualEarth\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoEqualEarthRaw\", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_14__[\"geoEqualEarthRaw\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoEquirectangular\", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_14__[\"geoEquirectangular\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoEquirectangularRaw\", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_14__[\"geoEquirectangularRaw\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoGnomonic\", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_14__[\"geoGnomonic\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoGnomonicRaw\", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_14__[\"geoGnomonicRaw\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoIdentity\", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_14__[\"geoIdentity\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoProjection\", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_14__[\"geoProjection\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoProjectionMutator\", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_14__[\"geoProjectionMutator\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoMercator\", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_14__[\"geoMercator\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoMercatorRaw\", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_14__[\"geoMercatorRaw\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoNaturalEarth1\", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_14__[\"geoNaturalEarth1\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoNaturalEarth1Raw\", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_14__[\"geoNaturalEarth1Raw\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoOrthographic\", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_14__[\"geoOrthographic\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoOrthographicRaw\", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_14__[\"geoOrthographicRaw\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoStereographic\", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_14__[\"geoStereographic\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoStereographicRaw\", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_14__[\"geoStereographicRaw\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoTransverseMercator\", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_14__[\"geoTransverseMercator\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoTransverseMercatorRaw\", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_14__[\"geoTransverseMercatorRaw\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoRotation\", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_14__[\"geoRotation\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoStream\", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_14__[\"geoStream\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoTransform\", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_14__[\"geoTransform\"]; });\n\n/* harmony import */ var d3_hierarchy__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! d3-hierarchy */ \"./node_modules/d3-hierarchy/src/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"cluster\", function() { return d3_hierarchy__WEBPACK_IMPORTED_MODULE_15__[\"cluster\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"hierarchy\", function() { return d3_hierarchy__WEBPACK_IMPORTED_MODULE_15__[\"hierarchy\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"Node\", function() { return d3_hierarchy__WEBPACK_IMPORTED_MODULE_15__[\"Node\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"pack\", function() { return d3_hierarchy__WEBPACK_IMPORTED_MODULE_15__[\"pack\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"packSiblings\", function() { return d3_hierarchy__WEBPACK_IMPORTED_MODULE_15__[\"packSiblings\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"packEnclose\", function() { return d3_hierarchy__WEBPACK_IMPORTED_MODULE_15__[\"packEnclose\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"partition\", function() { return d3_hierarchy__WEBPACK_IMPORTED_MODULE_15__[\"partition\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"stratify\", function() { return d3_hierarchy__WEBPACK_IMPORTED_MODULE_15__[\"stratify\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"tree\", function() { return d3_hierarchy__WEBPACK_IMPORTED_MODULE_15__[\"tree\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"treemap\", function() { return d3_hierarchy__WEBPACK_IMPORTED_MODULE_15__[\"treemap\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"treemapBinary\", function() { return d3_hierarchy__WEBPACK_IMPORTED_MODULE_15__[\"treemapBinary\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"treemapDice\", function() { return d3_hierarchy__WEBPACK_IMPORTED_MODULE_15__[\"treemapDice\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"treemapSlice\", function() { return d3_hierarchy__WEBPACK_IMPORTED_MODULE_15__[\"treemapSlice\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"treemapSliceDice\", function() { return d3_hierarchy__WEBPACK_IMPORTED_MODULE_15__[\"treemapSliceDice\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"treemapSquarify\", function() { return d3_hierarchy__WEBPACK_IMPORTED_MODULE_15__[\"treemapSquarify\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"treemapResquarify\", function() { return d3_hierarchy__WEBPACK_IMPORTED_MODULE_15__[\"treemapResquarify\"]; });\n\n/* harmony import */ var d3_interpolate__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! d3-interpolate */ \"./node_modules/d3/node_modules/d3-interpolate/src/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolate\", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_16__[\"interpolate\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateArray\", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_16__[\"interpolateArray\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateBasis\", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_16__[\"interpolateBasis\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateBasisClosed\", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_16__[\"interpolateBasisClosed\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateDate\", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_16__[\"interpolateDate\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateDiscrete\", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_16__[\"interpolateDiscrete\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateHue\", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_16__[\"interpolateHue\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateNumber\", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_16__[\"interpolateNumber\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateNumberArray\", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_16__[\"interpolateNumberArray\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateObject\", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_16__[\"interpolateObject\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateRound\", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_16__[\"interpolateRound\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateString\", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_16__[\"interpolateString\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateTransformCss\", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_16__[\"interpolateTransformCss\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateTransformSvg\", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_16__[\"interpolateTransformSvg\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateZoom\", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_16__[\"interpolateZoom\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateRgb\", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_16__[\"interpolateRgb\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateRgbBasis\", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_16__[\"interpolateRgbBasis\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateRgbBasisClosed\", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_16__[\"interpolateRgbBasisClosed\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateHsl\", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_16__[\"interpolateHsl\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateHslLong\", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_16__[\"interpolateHslLong\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateLab\", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_16__[\"interpolateLab\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateHcl\", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_16__[\"interpolateHcl\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateHclLong\", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_16__[\"interpolateHclLong\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateCubehelix\", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_16__[\"interpolateCubehelix\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateCubehelixLong\", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_16__[\"interpolateCubehelixLong\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"piecewise\", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_16__[\"piecewise\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"quantize\", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_16__[\"quantize\"]; });\n\n/* harmony import */ var d3_path__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! d3-path */ \"./node_modules/d3/node_modules/d3-path/src/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"path\", function() { return d3_path__WEBPACK_IMPORTED_MODULE_17__[\"path\"]; });\n\n/* harmony import */ var d3_polygon__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! d3-polygon */ \"./node_modules/d3-polygon/src/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"polygonArea\", function() { return d3_polygon__WEBPACK_IMPORTED_MODULE_18__[\"polygonArea\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"polygonCentroid\", function() { return d3_polygon__WEBPACK_IMPORTED_MODULE_18__[\"polygonCentroid\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"polygonHull\", function() { return d3_polygon__WEBPACK_IMPORTED_MODULE_18__[\"polygonHull\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"polygonContains\", function() { return d3_polygon__WEBPACK_IMPORTED_MODULE_18__[\"polygonContains\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"polygonLength\", function() { return d3_polygon__WEBPACK_IMPORTED_MODULE_18__[\"polygonLength\"]; });\n\n/* harmony import */ var d3_quadtree__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! d3-quadtree */ \"./node_modules/d3/node_modules/d3-quadtree/src/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"quadtree\", function() { return d3_quadtree__WEBPACK_IMPORTED_MODULE_19__[\"quadtree\"]; });\n\n/* harmony import */ var d3_random__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! d3-random */ \"./node_modules/d3-random/src/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"randomUniform\", function() { return d3_random__WEBPACK_IMPORTED_MODULE_20__[\"randomUniform\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"randomInt\", function() { return d3_random__WEBPACK_IMPORTED_MODULE_20__[\"randomInt\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"randomNormal\", function() { return d3_random__WEBPACK_IMPORTED_MODULE_20__[\"randomNormal\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"randomLogNormal\", function() { return d3_random__WEBPACK_IMPORTED_MODULE_20__[\"randomLogNormal\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"randomBates\", function() { return d3_random__WEBPACK_IMPORTED_MODULE_20__[\"randomBates\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"randomIrwinHall\", function() { return d3_random__WEBPACK_IMPORTED_MODULE_20__[\"randomIrwinHall\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"randomExponential\", function() { return d3_random__WEBPACK_IMPORTED_MODULE_20__[\"randomExponential\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"randomPareto\", function() { return d3_random__WEBPACK_IMPORTED_MODULE_20__[\"randomPareto\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"randomBernoulli\", function() { return d3_random__WEBPACK_IMPORTED_MODULE_20__[\"randomBernoulli\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"randomGeometric\", function() { return d3_random__WEBPACK_IMPORTED_MODULE_20__[\"randomGeometric\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"randomBinomial\", function() { return d3_random__WEBPACK_IMPORTED_MODULE_20__[\"randomBinomial\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"randomGamma\", function() { return d3_random__WEBPACK_IMPORTED_MODULE_20__[\"randomGamma\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"randomBeta\", function() { return d3_random__WEBPACK_IMPORTED_MODULE_20__[\"randomBeta\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"randomWeibull\", function() { return d3_random__WEBPACK_IMPORTED_MODULE_20__[\"randomWeibull\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"randomCauchy\", function() { return d3_random__WEBPACK_IMPORTED_MODULE_20__[\"randomCauchy\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"randomLogistic\", function() { return d3_random__WEBPACK_IMPORTED_MODULE_20__[\"randomLogistic\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"randomPoisson\", function() { return d3_random__WEBPACK_IMPORTED_MODULE_20__[\"randomPoisson\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"randomLcg\", function() { return d3_random__WEBPACK_IMPORTED_MODULE_20__[\"randomLcg\"]; });\n\n/* harmony import */ var d3_scale__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! d3-scale */ \"./node_modules/d3-scale/src/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"scaleBand\", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_21__[\"scaleBand\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"scalePoint\", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_21__[\"scalePoint\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"scaleIdentity\", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_21__[\"scaleIdentity\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"scaleLinear\", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_21__[\"scaleLinear\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"scaleLog\", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_21__[\"scaleLog\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"scaleSymlog\", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_21__[\"scaleSymlog\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"scaleOrdinal\", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_21__[\"scaleOrdinal\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"scaleImplicit\", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_21__[\"scaleImplicit\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"scalePow\", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_21__[\"scalePow\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"scaleSqrt\", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_21__[\"scaleSqrt\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"scaleRadial\", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_21__[\"scaleRadial\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"scaleQuantile\", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_21__[\"scaleQuantile\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"scaleQuantize\", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_21__[\"scaleQuantize\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"scaleThreshold\", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_21__[\"scaleThreshold\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"scaleTime\", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_21__[\"scaleTime\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"scaleUtc\", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_21__[\"scaleUtc\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"scaleSequential\", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_21__[\"scaleSequential\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"scaleSequentialLog\", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_21__[\"scaleSequentialLog\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"scaleSequentialPow\", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_21__[\"scaleSequentialPow\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"scaleSequentialSqrt\", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_21__[\"scaleSequentialSqrt\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"scaleSequentialSymlog\", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_21__[\"scaleSequentialSymlog\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"scaleSequentialQuantile\", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_21__[\"scaleSequentialQuantile\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"scaleDiverging\", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_21__[\"scaleDiverging\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"scaleDivergingLog\", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_21__[\"scaleDivergingLog\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"scaleDivergingPow\", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_21__[\"scaleDivergingPow\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"scaleDivergingSqrt\", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_21__[\"scaleDivergingSqrt\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"scaleDivergingSymlog\", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_21__[\"scaleDivergingSymlog\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"tickFormat\", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_21__[\"tickFormat\"]; });\n\n/* harmony import */ var d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! d3-scale-chromatic */ \"./node_modules/d3-scale-chromatic/src/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"schemeCategory10\", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_22__[\"schemeCategory10\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"schemeAccent\", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_22__[\"schemeAccent\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"schemeDark2\", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_22__[\"schemeDark2\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"schemePaired\", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_22__[\"schemePaired\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"schemePastel1\", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_22__[\"schemePastel1\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"schemePastel2\", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_22__[\"schemePastel2\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"schemeSet1\", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_22__[\"schemeSet1\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"schemeSet2\", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_22__[\"schemeSet2\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"schemeSet3\", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_22__[\"schemeSet3\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"schemeTableau10\", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_22__[\"schemeTableau10\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateBrBG\", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_22__[\"interpolateBrBG\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"schemeBrBG\", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_22__[\"schemeBrBG\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolatePRGn\", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_22__[\"interpolatePRGn\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"schemePRGn\", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_22__[\"schemePRGn\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolatePiYG\", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_22__[\"interpolatePiYG\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"schemePiYG\", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_22__[\"schemePiYG\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolatePuOr\", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_22__[\"interpolatePuOr\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"schemePuOr\", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_22__[\"schemePuOr\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateRdBu\", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_22__[\"interpolateRdBu\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"schemeRdBu\", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_22__[\"schemeRdBu\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateRdGy\", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_22__[\"interpolateRdGy\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"schemeRdGy\", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_22__[\"schemeRdGy\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateRdYlBu\", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_22__[\"interpolateRdYlBu\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"schemeRdYlBu\", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_22__[\"schemeRdYlBu\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateRdYlGn\", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_22__[\"interpolateRdYlGn\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"schemeRdYlGn\", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_22__[\"schemeRdYlGn\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateSpectral\", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_22__[\"interpolateSpectral\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"schemeSpectral\", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_22__[\"schemeSpectral\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateBuGn\", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_22__[\"interpolateBuGn\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"schemeBuGn\", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_22__[\"schemeBuGn\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateBuPu\", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_22__[\"interpolateBuPu\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"schemeBuPu\", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_22__[\"schemeBuPu\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateGnBu\", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_22__[\"interpolateGnBu\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"schemeGnBu\", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_22__[\"schemeGnBu\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateOrRd\", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_22__[\"interpolateOrRd\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"schemeOrRd\", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_22__[\"schemeOrRd\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolatePuBuGn\", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_22__[\"interpolatePuBuGn\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"schemePuBuGn\", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_22__[\"schemePuBuGn\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolatePuBu\", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_22__[\"interpolatePuBu\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"schemePuBu\", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_22__[\"schemePuBu\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolatePuRd\", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_22__[\"interpolatePuRd\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"schemePuRd\", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_22__[\"schemePuRd\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateRdPu\", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_22__[\"interpolateRdPu\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"schemeRdPu\", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_22__[\"schemeRdPu\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateYlGnBu\", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_22__[\"interpolateYlGnBu\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"schemeYlGnBu\", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_22__[\"schemeYlGnBu\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateYlGn\", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_22__[\"interpolateYlGn\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"schemeYlGn\", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_22__[\"schemeYlGn\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateYlOrBr\", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_22__[\"interpolateYlOrBr\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"schemeYlOrBr\", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_22__[\"schemeYlOrBr\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateYlOrRd\", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_22__[\"interpolateYlOrRd\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"schemeYlOrRd\", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_22__[\"schemeYlOrRd\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateBlues\", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_22__[\"interpolateBlues\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"schemeBlues\", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_22__[\"schemeBlues\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateGreens\", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_22__[\"interpolateGreens\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"schemeGreens\", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_22__[\"schemeGreens\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateGreys\", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_22__[\"interpolateGreys\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"schemeGreys\", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_22__[\"schemeGreys\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolatePurples\", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_22__[\"interpolatePurples\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"schemePurples\", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_22__[\"schemePurples\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateReds\", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_22__[\"interpolateReds\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"schemeReds\", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_22__[\"schemeReds\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateOranges\", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_22__[\"interpolateOranges\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"schemeOranges\", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_22__[\"schemeOranges\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateCividis\", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_22__[\"interpolateCividis\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateCubehelixDefault\", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_22__[\"interpolateCubehelixDefault\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateRainbow\", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_22__[\"interpolateRainbow\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateWarm\", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_22__[\"interpolateWarm\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateCool\", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_22__[\"interpolateCool\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateSinebow\", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_22__[\"interpolateSinebow\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateTurbo\", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_22__[\"interpolateTurbo\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateViridis\", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_22__[\"interpolateViridis\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateMagma\", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_22__[\"interpolateMagma\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateInferno\", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_22__[\"interpolateInferno\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolatePlasma\", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_22__[\"interpolatePlasma\"]; });\n\n/* harmony import */ var d3_selection__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! d3-selection */ \"./node_modules/d3/node_modules/d3-selection/src/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"create\", function() { return d3_selection__WEBPACK_IMPORTED_MODULE_23__[\"create\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"creator\", function() { return d3_selection__WEBPACK_IMPORTED_MODULE_23__[\"creator\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"local\", function() { return d3_selection__WEBPACK_IMPORTED_MODULE_23__[\"local\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"matcher\", function() { return d3_selection__WEBPACK_IMPORTED_MODULE_23__[\"matcher\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"namespace\", function() { return d3_selection__WEBPACK_IMPORTED_MODULE_23__[\"namespace\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"namespaces\", function() { return d3_selection__WEBPACK_IMPORTED_MODULE_23__[\"namespaces\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"pointer\", function() { return d3_selection__WEBPACK_IMPORTED_MODULE_23__[\"pointer\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"pointers\", function() { return d3_selection__WEBPACK_IMPORTED_MODULE_23__[\"pointers\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"select\", function() { return d3_selection__WEBPACK_IMPORTED_MODULE_23__[\"select\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"selectAll\", function() { return d3_selection__WEBPACK_IMPORTED_MODULE_23__[\"selectAll\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"selection\", function() { return d3_selection__WEBPACK_IMPORTED_MODULE_23__[\"selection\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"selector\", function() { return d3_selection__WEBPACK_IMPORTED_MODULE_23__[\"selector\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"selectorAll\", function() { return d3_selection__WEBPACK_IMPORTED_MODULE_23__[\"selectorAll\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"style\", function() { return d3_selection__WEBPACK_IMPORTED_MODULE_23__[\"style\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"window\", function() { return d3_selection__WEBPACK_IMPORTED_MODULE_23__[\"window\"]; });\n\n/* harmony import */ var d3_shape__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! d3-shape */ \"./node_modules/d3-shape/src/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"arc\", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_24__[\"arc\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"area\", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_24__[\"area\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"line\", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_24__[\"line\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"pie\", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_24__[\"pie\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"areaRadial\", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_24__[\"areaRadial\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"radialArea\", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_24__[\"radialArea\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"lineRadial\", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_24__[\"lineRadial\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"radialLine\", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_24__[\"radialLine\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"pointRadial\", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_24__[\"pointRadial\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"linkHorizontal\", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_24__[\"linkHorizontal\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"linkVertical\", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_24__[\"linkVertical\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"linkRadial\", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_24__[\"linkRadial\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"symbol\", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_24__[\"symbol\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"symbols\", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_24__[\"symbols\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"symbolCircle\", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_24__[\"symbolCircle\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"symbolCross\", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_24__[\"symbolCross\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"symbolDiamond\", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_24__[\"symbolDiamond\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"symbolSquare\", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_24__[\"symbolSquare\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"symbolStar\", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_24__[\"symbolStar\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"symbolTriangle\", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_24__[\"symbolTriangle\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"symbolWye\", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_24__[\"symbolWye\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"curveBasisClosed\", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_24__[\"curveBasisClosed\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"curveBasisOpen\", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_24__[\"curveBasisOpen\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"curveBasis\", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_24__[\"curveBasis\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"curveBumpX\", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_24__[\"curveBumpX\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"curveBumpY\", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_24__[\"curveBumpY\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"curveBundle\", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_24__[\"curveBundle\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"curveCardinalClosed\", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_24__[\"curveCardinalClosed\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"curveCardinalOpen\", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_24__[\"curveCardinalOpen\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"curveCardinal\", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_24__[\"curveCardinal\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"curveCatmullRomClosed\", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_24__[\"curveCatmullRomClosed\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"curveCatmullRomOpen\", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_24__[\"curveCatmullRomOpen\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"curveCatmullRom\", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_24__[\"curveCatmullRom\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"curveLinearClosed\", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_24__[\"curveLinearClosed\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"curveLinear\", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_24__[\"curveLinear\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"curveMonotoneX\", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_24__[\"curveMonotoneX\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"curveMonotoneY\", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_24__[\"curveMonotoneY\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"curveNatural\", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_24__[\"curveNatural\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"curveStep\", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_24__[\"curveStep\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"curveStepAfter\", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_24__[\"curveStepAfter\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"curveStepBefore\", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_24__[\"curveStepBefore\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"stack\", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_24__[\"stack\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"stackOffsetExpand\", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_24__[\"stackOffsetExpand\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"stackOffsetDiverging\", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_24__[\"stackOffsetDiverging\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"stackOffsetNone\", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_24__[\"stackOffsetNone\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"stackOffsetSilhouette\", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_24__[\"stackOffsetSilhouette\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"stackOffsetWiggle\", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_24__[\"stackOffsetWiggle\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"stackOrderAppearance\", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_24__[\"stackOrderAppearance\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"stackOrderAscending\", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_24__[\"stackOrderAscending\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"stackOrderDescending\", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_24__[\"stackOrderDescending\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"stackOrderInsideOut\", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_24__[\"stackOrderInsideOut\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"stackOrderNone\", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_24__[\"stackOrderNone\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"stackOrderReverse\", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_24__[\"stackOrderReverse\"]; });\n\n/* harmony import */ var d3_time__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! d3-time */ \"./node_modules/d3/node_modules/d3-time/src/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeInterval\", function() { return d3_time__WEBPACK_IMPORTED_MODULE_25__[\"timeInterval\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeMillisecond\", function() { return d3_time__WEBPACK_IMPORTED_MODULE_25__[\"timeMillisecond\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeMilliseconds\", function() { return d3_time__WEBPACK_IMPORTED_MODULE_25__[\"timeMilliseconds\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcMillisecond\", function() { return d3_time__WEBPACK_IMPORTED_MODULE_25__[\"utcMillisecond\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcMilliseconds\", function() { return d3_time__WEBPACK_IMPORTED_MODULE_25__[\"utcMilliseconds\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeSecond\", function() { return d3_time__WEBPACK_IMPORTED_MODULE_25__[\"timeSecond\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeSeconds\", function() { return d3_time__WEBPACK_IMPORTED_MODULE_25__[\"timeSeconds\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcSecond\", function() { return d3_time__WEBPACK_IMPORTED_MODULE_25__[\"utcSecond\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcSeconds\", function() { return d3_time__WEBPACK_IMPORTED_MODULE_25__[\"utcSeconds\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeMinute\", function() { return d3_time__WEBPACK_IMPORTED_MODULE_25__[\"timeMinute\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeMinutes\", function() { return d3_time__WEBPACK_IMPORTED_MODULE_25__[\"timeMinutes\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeHour\", function() { return d3_time__WEBPACK_IMPORTED_MODULE_25__[\"timeHour\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeHours\", function() { return d3_time__WEBPACK_IMPORTED_MODULE_25__[\"timeHours\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeDay\", function() { return d3_time__WEBPACK_IMPORTED_MODULE_25__[\"timeDay\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeDays\", function() { return d3_time__WEBPACK_IMPORTED_MODULE_25__[\"timeDays\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeWeek\", function() { return d3_time__WEBPACK_IMPORTED_MODULE_25__[\"timeWeek\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeWeeks\", function() { return d3_time__WEBPACK_IMPORTED_MODULE_25__[\"timeWeeks\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeSunday\", function() { return d3_time__WEBPACK_IMPORTED_MODULE_25__[\"timeSunday\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeSundays\", function() { return d3_time__WEBPACK_IMPORTED_MODULE_25__[\"timeSundays\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeMonday\", function() { return d3_time__WEBPACK_IMPORTED_MODULE_25__[\"timeMonday\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeMondays\", function() { return d3_time__WEBPACK_IMPORTED_MODULE_25__[\"timeMondays\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeTuesday\", function() { return d3_time__WEBPACK_IMPORTED_MODULE_25__[\"timeTuesday\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeTuesdays\", function() { return d3_time__WEBPACK_IMPORTED_MODULE_25__[\"timeTuesdays\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeWednesday\", function() { return d3_time__WEBPACK_IMPORTED_MODULE_25__[\"timeWednesday\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeWednesdays\", function() { return d3_time__WEBPACK_IMPORTED_MODULE_25__[\"timeWednesdays\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeThursday\", function() { return d3_time__WEBPACK_IMPORTED_MODULE_25__[\"timeThursday\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeThursdays\", function() { return d3_time__WEBPACK_IMPORTED_MODULE_25__[\"timeThursdays\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeFriday\", function() { return d3_time__WEBPACK_IMPORTED_MODULE_25__[\"timeFriday\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeFridays\", function() { return d3_time__WEBPACK_IMPORTED_MODULE_25__[\"timeFridays\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeSaturday\", function() { return d3_time__WEBPACK_IMPORTED_MODULE_25__[\"timeSaturday\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeSaturdays\", function() { return d3_time__WEBPACK_IMPORTED_MODULE_25__[\"timeSaturdays\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeMonth\", function() { return d3_time__WEBPACK_IMPORTED_MODULE_25__[\"timeMonth\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeMonths\", function() { return d3_time__WEBPACK_IMPORTED_MODULE_25__[\"timeMonths\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeYear\", function() { return d3_time__WEBPACK_IMPORTED_MODULE_25__[\"timeYear\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeYears\", function() { return d3_time__WEBPACK_IMPORTED_MODULE_25__[\"timeYears\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcMinute\", function() { return d3_time__WEBPACK_IMPORTED_MODULE_25__[\"utcMinute\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcMinutes\", function() { return d3_time__WEBPACK_IMPORTED_MODULE_25__[\"utcMinutes\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcHour\", function() { return d3_time__WEBPACK_IMPORTED_MODULE_25__[\"utcHour\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcHours\", function() { return d3_time__WEBPACK_IMPORTED_MODULE_25__[\"utcHours\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcDay\", function() { return d3_time__WEBPACK_IMPORTED_MODULE_25__[\"utcDay\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcDays\", function() { return d3_time__WEBPACK_IMPORTED_MODULE_25__[\"utcDays\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcWeek\", function() { return d3_time__WEBPACK_IMPORTED_MODULE_25__[\"utcWeek\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcWeeks\", function() { return d3_time__WEBPACK_IMPORTED_MODULE_25__[\"utcWeeks\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcSunday\", function() { return d3_time__WEBPACK_IMPORTED_MODULE_25__[\"utcSunday\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcSundays\", function() { return d3_time__WEBPACK_IMPORTED_MODULE_25__[\"utcSundays\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcMonday\", function() { return d3_time__WEBPACK_IMPORTED_MODULE_25__[\"utcMonday\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcMondays\", function() { return d3_time__WEBPACK_IMPORTED_MODULE_25__[\"utcMondays\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcTuesday\", function() { return d3_time__WEBPACK_IMPORTED_MODULE_25__[\"utcTuesday\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcTuesdays\", function() { return d3_time__WEBPACK_IMPORTED_MODULE_25__[\"utcTuesdays\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcWednesday\", function() { return d3_time__WEBPACK_IMPORTED_MODULE_25__[\"utcWednesday\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcWednesdays\", function() { return d3_time__WEBPACK_IMPORTED_MODULE_25__[\"utcWednesdays\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcThursday\", function() { return d3_time__WEBPACK_IMPORTED_MODULE_25__[\"utcThursday\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcThursdays\", function() { return d3_time__WEBPACK_IMPORTED_MODULE_25__[\"utcThursdays\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcFriday\", function() { return d3_time__WEBPACK_IMPORTED_MODULE_25__[\"utcFriday\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcFridays\", function() { return d3_time__WEBPACK_IMPORTED_MODULE_25__[\"utcFridays\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcSaturday\", function() { return d3_time__WEBPACK_IMPORTED_MODULE_25__[\"utcSaturday\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcSaturdays\", function() { return d3_time__WEBPACK_IMPORTED_MODULE_25__[\"utcSaturdays\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcMonth\", function() { return d3_time__WEBPACK_IMPORTED_MODULE_25__[\"utcMonth\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcMonths\", function() { return d3_time__WEBPACK_IMPORTED_MODULE_25__[\"utcMonths\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcYear\", function() { return d3_time__WEBPACK_IMPORTED_MODULE_25__[\"utcYear\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcYears\", function() { return d3_time__WEBPACK_IMPORTED_MODULE_25__[\"utcYears\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcTicks\", function() { return d3_time__WEBPACK_IMPORTED_MODULE_25__[\"utcTicks\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcTickInterval\", function() { return d3_time__WEBPACK_IMPORTED_MODULE_25__[\"utcTickInterval\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeTicks\", function() { return d3_time__WEBPACK_IMPORTED_MODULE_25__[\"timeTicks\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeTickInterval\", function() { return d3_time__WEBPACK_IMPORTED_MODULE_25__[\"timeTickInterval\"]; });\n\n/* harmony import */ var d3_time_format__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! d3-time-format */ \"./node_modules/d3/node_modules/d3-time-format/src/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeFormatDefaultLocale\", function() { return d3_time_format__WEBPACK_IMPORTED_MODULE_26__[\"timeFormatDefaultLocale\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeFormat\", function() { return d3_time_format__WEBPACK_IMPORTED_MODULE_26__[\"timeFormat\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeParse\", function() { return d3_time_format__WEBPACK_IMPORTED_MODULE_26__[\"timeParse\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcFormat\", function() { return d3_time_format__WEBPACK_IMPORTED_MODULE_26__[\"utcFormat\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcParse\", function() { return d3_time_format__WEBPACK_IMPORTED_MODULE_26__[\"utcParse\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeFormatLocale\", function() { return d3_time_format__WEBPACK_IMPORTED_MODULE_26__[\"timeFormatLocale\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"isoFormat\", function() { return d3_time_format__WEBPACK_IMPORTED_MODULE_26__[\"isoFormat\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"isoParse\", function() { return d3_time_format__WEBPACK_IMPORTED_MODULE_26__[\"isoParse\"]; });\n\n/* harmony import */ var d3_timer__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! d3-timer */ \"./node_modules/d3/node_modules/d3-timer/src/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"now\", function() { return d3_timer__WEBPACK_IMPORTED_MODULE_27__[\"now\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timer\", function() { return d3_timer__WEBPACK_IMPORTED_MODULE_27__[\"timer\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timerFlush\", function() { return d3_timer__WEBPACK_IMPORTED_MODULE_27__[\"timerFlush\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeout\", function() { return d3_timer__WEBPACK_IMPORTED_MODULE_27__[\"timeout\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interval\", function() { return d3_timer__WEBPACK_IMPORTED_MODULE_27__[\"interval\"]; });\n\n/* harmony import */ var d3_transition__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! d3-transition */ \"./node_modules/d3/node_modules/d3-transition/src/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"transition\", function() { return d3_transition__WEBPACK_IMPORTED_MODULE_28__[\"transition\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"active\", function() { return d3_transition__WEBPACK_IMPORTED_MODULE_28__[\"active\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interrupt\", function() { return d3_transition__WEBPACK_IMPORTED_MODULE_28__[\"interrupt\"]; });\n\n/* harmony import */ var d3_zoom__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! d3-zoom */ \"./node_modules/d3-zoom/src/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"zoom\", function() { return d3_zoom__WEBPACK_IMPORTED_MODULE_29__[\"zoom\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"zoomTransform\", function() { return d3_zoom__WEBPACK_IMPORTED_MODULE_29__[\"zoomTransform\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"zoomIdentity\", function() { return d3_zoom__WEBPACK_IMPORTED_MODULE_29__[\"zoomIdentity\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"ZoomTransform\", function() { return d3_zoom__WEBPACK_IMPORTED_MODULE_29__[\"ZoomTransform\"]; });\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/index.js\":\n/*!****************************************!*\\\n  !*** ./node_modules/dagre-d3/index.js ***!\n  \\****************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n/**\n * @license\n * Copyright (c) 2012-2013 Chris Pettitt\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\nmodule.exports =  {\n  graphlib: __webpack_require__(/*! ./lib/graphlib */ \"./node_modules/dagre-d3/lib/graphlib.js\"),\n  dagre: __webpack_require__(/*! ./lib/dagre */ \"./node_modules/dagre-d3/lib/dagre.js\"),\n  intersect: __webpack_require__(/*! ./lib/intersect */ \"./node_modules/dagre-d3/lib/intersect/index.js\"),\n  render: __webpack_require__(/*! ./lib/render */ \"./node_modules/dagre-d3/lib/render.js\"),\n  util: __webpack_require__(/*! ./lib/util */ \"./node_modules/dagre-d3/lib/util.js\"),\n  version: __webpack_require__(/*! ./lib/version */ \"./node_modules/dagre-d3/lib/version.js\")\n};\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/lib/arrows.js\":\n/*!*********************************************!*\\\n  !*** ./node_modules/dagre-d3/lib/arrows.js ***!\n  \\*********************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar util = __webpack_require__(/*! ./util */ \"./node_modules/dagre-d3/lib/util.js\");\n\nmodule.exports = {\n  \"default\": normal,\n  \"normal\": normal,\n  \"vee\": vee,\n  \"undirected\": undirected\n};\n\nfunction normal(parent, id, edge, type) {\n  var marker = parent.append(\"marker\")\n    .attr(\"id\", id)\n    .attr(\"viewBox\", \"0 0 10 10\")\n    .attr(\"refX\", 9)\n    .attr(\"refY\", 5)\n    .attr(\"markerUnits\", \"strokeWidth\")\n    .attr(\"markerWidth\", 8)\n    .attr(\"markerHeight\", 6)\n    .attr(\"orient\", \"auto\");\n\n  var path = marker.append(\"path\")\n    .attr(\"d\", \"M 0 0 L 10 5 L 0 10 z\")\n    .style(\"stroke-width\", 1)\n    .style(\"stroke-dasharray\", \"1,0\");\n  util.applyStyle(path, edge[type + \"Style\"]);\n  if (edge[type + \"Class\"]) {\n    path.attr(\"class\", edge[type + \"Class\"]);\n  }\n}\n\nfunction vee(parent, id, edge, type) {\n  var marker = parent.append(\"marker\")\n    .attr(\"id\", id)\n    .attr(\"viewBox\", \"0 0 10 10\")\n    .attr(\"refX\", 9)\n    .attr(\"refY\", 5)\n    .attr(\"markerUnits\", \"strokeWidth\")\n    .attr(\"markerWidth\", 8)\n    .attr(\"markerHeight\", 6)\n    .attr(\"orient\", \"auto\");\n\n  var path = marker.append(\"path\")\n    .attr(\"d\", \"M 0 0 L 10 5 L 0 10 L 4 5 z\")\n    .style(\"stroke-width\", 1)\n    .style(\"stroke-dasharray\", \"1,0\");\n  util.applyStyle(path, edge[type + \"Style\"]);\n  if (edge[type + \"Class\"]) {\n    path.attr(\"class\", edge[type + \"Class\"]);\n  }\n}\n\nfunction undirected(parent, id, edge, type) {\n  var marker = parent.append(\"marker\")\n    .attr(\"id\", id)\n    .attr(\"viewBox\", \"0 0 10 10\")\n    .attr(\"refX\", 9)\n    .attr(\"refY\", 5)\n    .attr(\"markerUnits\", \"strokeWidth\")\n    .attr(\"markerWidth\", 8)\n    .attr(\"markerHeight\", 6)\n    .attr(\"orient\", \"auto\");\n\n  var path = marker.append(\"path\")\n    .attr(\"d\", \"M 0 5 L 10 5\")\n    .style(\"stroke-width\", 1)\n    .style(\"stroke-dasharray\", \"1,0\");\n  util.applyStyle(path, edge[type + \"Style\"]);\n  if (edge[type + \"Class\"]) {\n    path.attr(\"class\", edge[type + \"Class\"]);\n  }\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/lib/create-clusters.js\":\n/*!******************************************************!*\\\n  !*** ./node_modules/dagre-d3/lib/create-clusters.js ***!\n  \\******************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar util = __webpack_require__(/*! ./util */ \"./node_modules/dagre-d3/lib/util.js\");\nvar d3 = __webpack_require__(/*! ./d3 */ \"./node_modules/dagre-d3/lib/d3.js\");\nvar addLabel = __webpack_require__(/*! ./label/add-label */ \"./node_modules/dagre-d3/lib/label/add-label.js\");\n\nmodule.exports = createClusters;\n\nfunction createClusters(selection, g) {\n  var clusters = g.nodes().filter(function(v) { return util.isSubgraph(g, v); });\n  var svgClusters = selection.selectAll(\"g.cluster\")\n    .data(clusters, function(v) { return v; });\n\n  svgClusters.selectAll(\"*\").remove();\n  svgClusters.enter().append(\"g\")\n    .attr(\"class\", \"cluster\")\n    .attr(\"id\",function(v){\n      var node = g.node(v);\n      return node.id;\n    })\n    .style(\"opacity\", 0);\n  \n  svgClusters = selection.selectAll(\"g.cluster\");\n\n  util.applyTransition(svgClusters, g)\n    .style(\"opacity\", 1);\n\n  svgClusters.each(function(v) {\n    var node = g.node(v);\n    var thisGroup = d3.select(this);\n    d3.select(this).append(\"rect\");\n    var labelGroup = thisGroup.append(\"g\").attr(\"class\", \"label\");\n    addLabel(labelGroup, node, node.clusterLabelPos);\n  });\n\n  svgClusters.selectAll(\"rect\").each(function(c) {\n    var node = g.node(c);\n    var domCluster = d3.select(this);\n    util.applyStyle(domCluster, node.style);\n  });\n\n  var exitSelection;\n\n  if (svgClusters.exit) {\n    exitSelection = svgClusters.exit();\n  } else {\n    exitSelection = svgClusters.selectAll(null); // empty selection\n  }\n\n  util.applyTransition(exitSelection, g)\n    .style(\"opacity\", 0)\n    .remove();\n\n  return svgClusters;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/lib/create-edge-labels.js\":\n/*!*********************************************************!*\\\n  !*** ./node_modules/dagre-d3/lib/create-edge-labels.js ***!\n  \\*********************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _ = __webpack_require__(/*! ./lodash */ \"./node_modules/dagre-d3/lib/lodash.js\");\nvar addLabel = __webpack_require__(/*! ./label/add-label */ \"./node_modules/dagre-d3/lib/label/add-label.js\");\nvar util = __webpack_require__(/*! ./util */ \"./node_modules/dagre-d3/lib/util.js\");\nvar d3 = __webpack_require__(/*! ./d3 */ \"./node_modules/dagre-d3/lib/d3.js\");\n\nmodule.exports = createEdgeLabels;\n\nfunction createEdgeLabels(selection, g) {\n  var svgEdgeLabels = selection.selectAll(\"g.edgeLabel\")\n    .data(g.edges(), function(e) { return util.edgeToId(e); })\n    .classed(\"update\", true);\n\n  svgEdgeLabels.exit().remove();\n  svgEdgeLabels.enter().append(\"g\")\n    .classed(\"edgeLabel\", true)\n    .style(\"opacity\", 0);\n\n  svgEdgeLabels = selection.selectAll(\"g.edgeLabel\");\n\n  svgEdgeLabels.each(function(e) {\n    var root = d3.select(this);\n    root.select(\".label\").remove();\n    var edge = g.edge(e);\n    var label = addLabel(root, g.edge(e), 0, 0).classed(\"label\", true);\n    var bbox = label.node().getBBox();\n\n    if (edge.labelId) { label.attr(\"id\", edge.labelId); }\n    if (!_.has(edge, \"width\")) { edge.width = bbox.width; }\n    if (!_.has(edge, \"height\")) { edge.height = bbox.height; }\n  });\n\n  var exitSelection;\n\n  if (svgEdgeLabels.exit) {\n    exitSelection = svgEdgeLabels.exit();\n  } else {\n    exitSelection = svgEdgeLabels.selectAll(null); // empty selection\n  }\n\n  util.applyTransition(exitSelection, g)\n    .style(\"opacity\", 0)\n    .remove();\n\n  return svgEdgeLabels;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/lib/create-edge-paths.js\":\n/*!********************************************************!*\\\n  !*** ./node_modules/dagre-d3/lib/create-edge-paths.js ***!\n  \\********************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _ = __webpack_require__(/*! ./lodash */ \"./node_modules/dagre-d3/lib/lodash.js\");\nvar intersectNode = __webpack_require__(/*! ./intersect/intersect-node */ \"./node_modules/dagre-d3/lib/intersect/intersect-node.js\");\nvar util = __webpack_require__(/*! ./util */ \"./node_modules/dagre-d3/lib/util.js\");\nvar d3 = __webpack_require__(/*! ./d3 */ \"./node_modules/dagre-d3/lib/d3.js\");\nmodule.exports = createEdgePaths;\n\nfunction createEdgePaths(selection, g, arrows) {\n  var previousPaths = selection.selectAll(\"g.edgePath\")\n    .data(g.edges(), function(e) { return util.edgeToId(e); })\n    .classed(\"update\", true);\n\n  var newPaths = enter(previousPaths, g);\n  exit(previousPaths, g);\n\n  var svgPaths = previousPaths.merge !== undefined ? previousPaths.merge(newPaths) : previousPaths;\n  util.applyTransition(svgPaths, g)\n    .style(\"opacity\", 1);\n\n  // Save DOM element in the path group, and set ID and class\n  svgPaths.each(function(e) {\n    var domEdge = d3.select(this);\n    var edge = g.edge(e);\n    edge.elem = this;\n\n    if (edge.id) {\n      domEdge.attr(\"id\", edge.id);\n    }\n\n    util.applyClass(domEdge, edge[\"class\"],\n      (domEdge.classed(\"update\") ? \"update \" : \"\") + \"edgePath\");\n  });\n\n  svgPaths.selectAll(\"path.path\")\n    .each(function(e) {\n      var edge = g.edge(e);\n      edge.arrowheadId = _.uniqueId(\"arrowhead\");\n\n      var domEdge = d3.select(this)\n        .attr(\"marker-end\", function() {\n          return \"url(\" + makeFragmentRef(location.href, edge.arrowheadId) + \")\";\n        })\n        .style(\"fill\", \"none\");\n\n      util.applyTransition(domEdge, g)\n        .attr(\"d\", function(e) { return calcPoints(g, e); });\n\n      util.applyStyle(domEdge, edge.style);\n    });\n\n  svgPaths.selectAll(\"defs *\").remove();\n  svgPaths.selectAll(\"defs\")\n    .each(function(e) {\n      var edge = g.edge(e);\n      var arrowhead = arrows[edge.arrowhead];\n      arrowhead(d3.select(this), edge.arrowheadId, edge, \"arrowhead\");\n    });\n\n  return svgPaths;\n}\n\nfunction makeFragmentRef(url, fragmentId) {\n  var baseUrl = url.split(\"#\")[0];\n  return baseUrl + \"#\" + fragmentId;\n}\n\nfunction calcPoints(g, e) {\n  var edge = g.edge(e);\n  var tail = g.node(e.v);\n  var head = g.node(e.w);\n  var points = edge.points.slice(1, edge.points.length - 1);\n  points.unshift(intersectNode(tail, points[0]));\n  points.push(intersectNode(head, points[points.length - 1]));\n\n  return createLine(edge, points);\n}\n\nfunction createLine(edge, points) {\n  var line = (d3.line || d3.svg.line)()\n    .x(function(d) { return d.x; })\n    .y(function(d) { return d.y; });\n  \n  (line.curve || line.interpolate)(edge.curve);\n\n  return line(points);\n}\n\nfunction getCoords(elem) {\n  var bbox = elem.getBBox();\n  var matrix = elem.ownerSVGElement.getScreenCTM()\n    .inverse()\n    .multiply(elem.getScreenCTM())\n    .translate(bbox.width / 2, bbox.height / 2);\n  return { x: matrix.e, y: matrix.f };\n}\n\nfunction enter(svgPaths, g) {\n  var svgPathsEnter = svgPaths.enter().append(\"g\")\n    .attr(\"class\", \"edgePath\")\n    .style(\"opacity\", 0);\n  svgPathsEnter.append(\"path\")\n    .attr(\"class\", \"path\")\n    .attr(\"d\", function(e) {\n      var edge = g.edge(e);\n      var sourceElem = g.node(e.v).elem;\n      var points = _.range(edge.points.length).map(function() { return getCoords(sourceElem); });\n      return createLine(edge, points);\n    });\n  svgPathsEnter.append(\"defs\");\n  return svgPathsEnter;\n}\n\nfunction exit(svgPaths, g) {\n  var svgPathExit = svgPaths.exit();\n  util.applyTransition(svgPathExit, g)\n    .style(\"opacity\", 0)\n    .remove();\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/lib/create-nodes.js\":\n/*!***************************************************!*\\\n  !*** ./node_modules/dagre-d3/lib/create-nodes.js ***!\n  \\***************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _ = __webpack_require__(/*! ./lodash */ \"./node_modules/dagre-d3/lib/lodash.js\");\nvar addLabel = __webpack_require__(/*! ./label/add-label */ \"./node_modules/dagre-d3/lib/label/add-label.js\");\nvar util = __webpack_require__(/*! ./util */ \"./node_modules/dagre-d3/lib/util.js\");\nvar d3 = __webpack_require__(/*! ./d3 */ \"./node_modules/dagre-d3/lib/d3.js\");\n\nmodule.exports = createNodes;\n\nfunction createNodes(selection, g, shapes) {\n  var simpleNodes = g.nodes().filter(function(v) { return !util.isSubgraph(g, v); });\n  var svgNodes = selection.selectAll(\"g.node\")\n    .data(simpleNodes, function(v) { return v; })\n    .classed(\"update\", true);\n\n  svgNodes.exit().remove();\n\n  svgNodes.enter().append(\"g\")\n    .attr(\"class\", \"node\")\n    .style(\"opacity\", 0);\n\n  svgNodes = selection.selectAll(\"g.node\"); \n\n  svgNodes.each(function(v) {\n    var node = g.node(v);\n    var thisGroup = d3.select(this);\n    util.applyClass(thisGroup, node[\"class\"],\n      (thisGroup.classed(\"update\") ? \"update \" : \"\") + \"node\");\n\n    thisGroup.select(\"g.label\").remove();\n    var labelGroup = thisGroup.append(\"g\").attr(\"class\", \"label\");\n    var labelDom = addLabel(labelGroup, node);\n    var shape = shapes[node.shape];\n    var bbox = _.pick(labelDom.node().getBBox(), \"width\", \"height\");\n\n    node.elem = this;\n\n    if (node.id) { thisGroup.attr(\"id\", node.id); }\n    if (node.labelId) { labelGroup.attr(\"id\", node.labelId); }\n\n    if (_.has(node, \"width\")) { bbox.width = node.width; }\n    if (_.has(node, \"height\")) { bbox.height = node.height; }\n\n    bbox.width += node.paddingLeft + node.paddingRight;\n    bbox.height += node.paddingTop + node.paddingBottom;\n    labelGroup.attr(\"transform\", \"translate(\" +\n      ((node.paddingLeft - node.paddingRight) / 2) + \",\" +\n      ((node.paddingTop - node.paddingBottom) / 2) + \")\");\n\n    var root = d3.select(this);\n    root.select(\".label-container\").remove();\n    var shapeSvg = shape(root, bbox, node).classed(\"label-container\", true);\n    util.applyStyle(shapeSvg, node.style);\n\n    var shapeBBox = shapeSvg.node().getBBox();\n    node.width = shapeBBox.width;\n    node.height = shapeBBox.height;\n  });\n\n  var exitSelection;\n\n  if (svgNodes.exit) {\n    exitSelection = svgNodes.exit();\n  } else {\n    exitSelection = svgNodes.selectAll(null); // empty selection\n  }\n\n  util.applyTransition(exitSelection, g)\n    .style(\"opacity\", 0)\n    .remove();\n\n  return svgNodes;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/lib/d3.js\":\n/*!*****************************************!*\\\n  !*** ./node_modules/dagre-d3/lib/d3.js ***!\n  \\*****************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n// Stub to get D3 either via NPM or from the global object\nvar d3;\n\nif (!d3) {\n  if (true) {\n    try {\n      d3 = __webpack_require__(/*! d3 */ \"./node_modules/dagre-d3/node_modules/d3/index.js\");\n    }\n    catch (e) {\n      // continue regardless of error\n    }\n  }\n}\n\nif (!d3) {\n  d3 = window.d3;\n}\n\nmodule.exports = d3;\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/lib/dagre.js\":\n/*!********************************************!*\\\n  !*** ./node_modules/dagre-d3/lib/dagre.js ***!\n  \\********************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n/* global window */\n\nvar dagre;\n\nif (true) {\n  try {\n    dagre = __webpack_require__(/*! dagre */ \"./node_modules/dagre/index.js\");\n  } catch (e) {\n    // continue regardless of error\n  }\n}\n\nif (!dagre) {\n  dagre = window.dagre;\n}\n\nmodule.exports = dagre;\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/lib/graphlib.js\":\n/*!***********************************************!*\\\n  !*** ./node_modules/dagre-d3/lib/graphlib.js ***!\n  \\***********************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n/* global window */\n\nvar graphlib;\n\nif (true) {\n  try {\n    graphlib = __webpack_require__(/*! graphlib */ \"./node_modules/graphlib/index.js\");\n  }\n  catch (e) {\n    // continue regardless of error\n  }\n}\n\nif (!graphlib) {\n  graphlib = window.graphlib;\n}\n\nmodule.exports = graphlib;\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/lib/intersect/index.js\":\n/*!******************************************************!*\\\n  !*** ./node_modules/dagre-d3/lib/intersect/index.js ***!\n  \\******************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nmodule.exports = {\n  node: __webpack_require__(/*! ./intersect-node */ \"./node_modules/dagre-d3/lib/intersect/intersect-node.js\"),\n  circle: __webpack_require__(/*! ./intersect-circle */ \"./node_modules/dagre-d3/lib/intersect/intersect-circle.js\"),\n  ellipse: __webpack_require__(/*! ./intersect-ellipse */ \"./node_modules/dagre-d3/lib/intersect/intersect-ellipse.js\"),\n  polygon: __webpack_require__(/*! ./intersect-polygon */ \"./node_modules/dagre-d3/lib/intersect/intersect-polygon.js\"),\n  rect: __webpack_require__(/*! ./intersect-rect */ \"./node_modules/dagre-d3/lib/intersect/intersect-rect.js\")\n};\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/lib/intersect/intersect-circle.js\":\n/*!*****************************************************************!*\\\n  !*** ./node_modules/dagre-d3/lib/intersect/intersect-circle.js ***!\n  \\*****************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar intersectEllipse = __webpack_require__(/*! ./intersect-ellipse */ \"./node_modules/dagre-d3/lib/intersect/intersect-ellipse.js\");\n\nmodule.exports = intersectCircle;\n\nfunction intersectCircle(node, rx, point) {\n  return intersectEllipse(node, rx, rx, point);\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/lib/intersect/intersect-ellipse.js\":\n/*!******************************************************************!*\\\n  !*** ./node_modules/dagre-d3/lib/intersect/intersect-ellipse.js ***!\n  \\******************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports) {\n\nmodule.exports = intersectEllipse;\n\nfunction intersectEllipse(node, rx, ry, point) {\n  // Formulae from: http://mathworld.wolfram.com/Ellipse-LineIntersection.html\n\n  var cx = node.x;\n  var cy = node.y;\n\n  var px = cx - point.x;\n  var py = cy - point.y;\n\n  var det = Math.sqrt(rx * rx * py * py + ry * ry * px * px);\n\n  var dx = Math.abs(rx * ry * px / det);\n  if (point.x < cx) {\n    dx = -dx;\n  }\n  var dy = Math.abs(rx * ry * py / det);\n  if (point.y < cy) {\n    dy = -dy;\n  }\n\n  return {x: cx + dx, y: cy + dy};\n}\n\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/lib/intersect/intersect-line.js\":\n/*!***************************************************************!*\\\n  !*** ./node_modules/dagre-d3/lib/intersect/intersect-line.js ***!\n  \\***************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports) {\n\nmodule.exports = intersectLine;\n\n/*\n * Returns the point at which two lines, p and q, intersect or returns\n * undefined if they do not intersect.\n */\nfunction intersectLine(p1, p2, q1, q2) {\n  // Algorithm from J. Avro, (ed.) Graphics Gems, No 2, Morgan Kaufmann, 1994,\n  // p7 and p473.\n\n  var a1, a2, b1, b2, c1, c2;\n  var r1, r2 , r3, r4;\n  var denom, offset, num;\n  var x, y;\n\n  // Compute a1, b1, c1, where line joining points 1 and 2 is F(x,y) = a1 x +\n  // b1 y + c1 = 0.\n  a1 = p2.y - p1.y;\n  b1 = p1.x - p2.x;\n  c1 = (p2.x * p1.y) - (p1.x * p2.y);\n\n  // Compute r3 and r4.\n  r3 = ((a1 * q1.x) + (b1 * q1.y) + c1);\n  r4 = ((a1 * q2.x) + (b1 * q2.y) + c1);\n\n  // Check signs of r3 and r4. If both point 3 and point 4 lie on\n  // same side of line 1, the line segments do not intersect.\n  if ((r3 !== 0) && (r4 !== 0) && sameSign(r3, r4)) {\n    return /*DONT_INTERSECT*/;\n  }\n\n  // Compute a2, b2, c2 where line joining points 3 and 4 is G(x,y) = a2 x + b2 y + c2 = 0\n  a2 = q2.y - q1.y;\n  b2 = q1.x - q2.x;\n  c2 = (q2.x * q1.y) - (q1.x * q2.y);\n\n  // Compute r1 and r2\n  r1 = (a2 * p1.x) + (b2 * p1.y) + c2;\n  r2 = (a2 * p2.x) + (b2 * p2.y) + c2;\n\n  // Check signs of r1 and r2. If both point 1 and point 2 lie\n  // on same side of second line segment, the line segments do\n  // not intersect.\n  if ((r1 !== 0) && (r2 !== 0) && (sameSign(r1, r2))) {\n    return /*DONT_INTERSECT*/;\n  }\n\n  // Line segments intersect: compute intersection point.\n  denom = (a1 * b2) - (a2 * b1);\n  if (denom === 0) {\n    return /*COLLINEAR*/;\n  }\n\n  offset = Math.abs(denom / 2);\n\n  // The denom/2 is to get rounding instead of truncating. It\n  // is added or subtracted to the numerator, depending upon the\n  // sign of the numerator.\n  num = (b1 * c2) - (b2 * c1);\n  x = (num < 0) ? ((num - offset) / denom) : ((num + offset) / denom);\n\n  num = (a2 * c1) - (a1 * c2);\n  y = (num < 0) ? ((num - offset) / denom) : ((num + offset) / denom);\n\n  return { x: x, y: y };\n}\n\nfunction sameSign(r1, r2) {\n  return r1 * r2 > 0;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/lib/intersect/intersect-node.js\":\n/*!***************************************************************!*\\\n  !*** ./node_modules/dagre-d3/lib/intersect/intersect-node.js ***!\n  \\***************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports) {\n\nmodule.exports = intersectNode;\n\nfunction intersectNode(node, point) {\n  return node.intersect(point);\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/lib/intersect/intersect-polygon.js\":\n/*!******************************************************************!*\\\n  !*** ./node_modules/dagre-d3/lib/intersect/intersect-polygon.js ***!\n  \\******************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n/* eslint \"no-console\": off */\n\nvar intersectLine = __webpack_require__(/*! ./intersect-line */ \"./node_modules/dagre-d3/lib/intersect/intersect-line.js\");\n\nmodule.exports = intersectPolygon;\n\n/*\n * Returns the point ({x, y}) at which the point argument intersects with the\n * node argument assuming that it has the shape specified by polygon.\n */\nfunction intersectPolygon(node, polyPoints, point) {\n  var x1 = node.x;\n  var y1 = node.y;\n\n  var intersections = [];\n\n  var minX = Number.POSITIVE_INFINITY;\n  var minY = Number.POSITIVE_INFINITY;\n  polyPoints.forEach(function(entry) {\n    minX = Math.min(minX, entry.x);\n    minY = Math.min(minY, entry.y);\n  });\n\n  var left = x1 - node.width / 2 - minX;\n  var top =  y1 - node.height / 2 - minY;\n\n  for (var i = 0; i < polyPoints.length; i++) {\n    var p1 = polyPoints[i];\n    var p2 = polyPoints[i < polyPoints.length - 1 ? i + 1 : 0];\n    var intersect = intersectLine(node, point,\n      {x: left + p1.x, y: top + p1.y}, {x: left + p2.x, y: top + p2.y});\n    if (intersect) {\n      intersections.push(intersect);\n    }\n  }\n\n  if (!intersections.length) {\n    console.log(\"NO INTERSECTION FOUND, RETURN NODE CENTER\", node);\n    return node;\n  }\n\n  if (intersections.length > 1) {\n    // More intersections, find the one nearest to edge end point\n    intersections.sort(function(p, q) {\n      var pdx = p.x - point.x;\n      var pdy = p.y - point.y;\n      var distp = Math.sqrt(pdx * pdx + pdy * pdy);\n\n      var qdx = q.x - point.x;\n      var qdy = q.y - point.y;\n      var distq = Math.sqrt(qdx * qdx + qdy * qdy);\n\n      return (distp < distq) ? -1 : (distp === distq ? 0 : 1);\n    });\n  }\n  return intersections[0];\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/lib/intersect/intersect-rect.js\":\n/*!***************************************************************!*\\\n  !*** ./node_modules/dagre-d3/lib/intersect/intersect-rect.js ***!\n  \\***************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports) {\n\nmodule.exports = intersectRect;\n\nfunction intersectRect(node, point) {\n  var x = node.x;\n  var y = node.y;\n\n  // Rectangle intersection algorithm from:\n  // http://math.stackexchange.com/questions/108113/find-edge-between-two-boxes\n  var dx = point.x - x;\n  var dy = point.y - y;\n  var w = node.width / 2;\n  var h = node.height / 2;\n\n  var sx, sy;\n  if (Math.abs(dy) * w > Math.abs(dx) * h) {\n    // Intersection is top or bottom of rect.\n    if (dy < 0) {\n      h = -h;\n    }\n    sx = dy === 0 ? 0 : h * dx / dy;\n    sy = h;\n  } else {\n    // Intersection is left or right of rect.\n    if (dx < 0) {\n      w = -w;\n    }\n    sx = w;\n    sy = dx === 0 ? 0 : w * dy / dx;\n  }\n\n  return {x: x + sx, y: y + sy};\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/lib/label/add-html-label.js\":\n/*!***********************************************************!*\\\n  !*** ./node_modules/dagre-d3/lib/label/add-html-label.js ***!\n  \\***********************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar util = __webpack_require__(/*! ../util */ \"./node_modules/dagre-d3/lib/util.js\");\n\nmodule.exports = addHtmlLabel;\n\nfunction addHtmlLabel(root, node) {\n  var fo = root\n    .append(\"foreignObject\")\n    .attr(\"width\", \"100000\");\n\n  var div = fo\n    .append(\"xhtml:div\");\n  div.attr(\"xmlns\", \"http://www.w3.org/1999/xhtml\");\n\n  var label = node.label;\n  switch(typeof label) {\n  case \"function\":\n    div.insert(label);\n    break;\n  case \"object\":\n    // Currently we assume this is a DOM object.\n    div.insert(function() { return label; });\n    break;\n  default: div.html(label);\n  }\n\n  util.applyStyle(div, node.labelStyle);\n  div.style(\"display\", \"inline-block\");\n  // Fix for firefox\n  div.style(\"white-space\", \"nowrap\");\n\n  var client = div.node().getBoundingClientRect();\n  fo\n    .attr(\"width\", client.width)\n    .attr(\"height\", client.height); \n\n  return fo;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/lib/label/add-label.js\":\n/*!******************************************************!*\\\n  !*** ./node_modules/dagre-d3/lib/label/add-label.js ***!\n  \\******************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar addTextLabel = __webpack_require__(/*! ./add-text-label */ \"./node_modules/dagre-d3/lib/label/add-text-label.js\");\nvar addHtmlLabel = __webpack_require__(/*! ./add-html-label */ \"./node_modules/dagre-d3/lib/label/add-html-label.js\");\nvar addSVGLabel  = __webpack_require__(/*! ./add-svg-label */ \"./node_modules/dagre-d3/lib/label/add-svg-label.js\");\n\nmodule.exports = addLabel;\n\nfunction addLabel(root, node, location) {\n  var label = node.label;\n  var labelSvg = root.append(\"g\");\n\n  // Allow the label to be a string, a function that returns a DOM element, or\n  // a DOM element itself.\n  if (node.labelType === \"svg\") {\n    addSVGLabel(labelSvg, node);\n  } else if (typeof label !== \"string\" || node.labelType === \"html\") {\n    addHtmlLabel(labelSvg, node);\n  } else {\n    addTextLabel(labelSvg, node);\n  }\n\n  var labelBBox = labelSvg.node().getBBox();\n  var y;\n  switch(location) {\n  case \"top\":\n    y = (-node.height / 2);\n    break;\n  case \"bottom\":\n    y = (node.height / 2) - labelBBox.height;\n    break;\n  default:\n    y = (-labelBBox.height / 2);\n  }\n  labelSvg.attr(\n    \"transform\",\n    \"translate(\" + (-labelBBox.width / 2) + \",\" + y + \")\");\n\n  return labelSvg;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/lib/label/add-svg-label.js\":\n/*!**********************************************************!*\\\n  !*** ./node_modules/dagre-d3/lib/label/add-svg-label.js ***!\n  \\**********************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar util = __webpack_require__(/*! ../util */ \"./node_modules/dagre-d3/lib/util.js\");\n\nmodule.exports = addSVGLabel;\n\nfunction addSVGLabel(root, node) {\n  var domNode = root;\n\n  domNode.node().appendChild(node.label);\n\n  util.applyStyle(domNode, node.labelStyle);\n\n  return domNode;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/lib/label/add-text-label.js\":\n/*!***********************************************************!*\\\n  !*** ./node_modules/dagre-d3/lib/label/add-text-label.js ***!\n  \\***********************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar util = __webpack_require__(/*! ../util */ \"./node_modules/dagre-d3/lib/util.js\");\n\nmodule.exports = addTextLabel;\n\n/*\n * Attaches a text label to the specified root. Handles escape sequences.\n */\nfunction addTextLabel(root, node) {\n  var domNode = root.append(\"text\");\n\n  var lines = processEscapeSequences(node.label).split(\"\\n\");\n  for (var i = 0; i < lines.length; i++) {\n    domNode.append(\"tspan\")\n      .attr(\"xml:space\", \"preserve\")\n      .attr(\"dy\", \"1em\")\n      .attr(\"x\", \"1\")\n      .text(lines[i]);\n  }\n\n  util.applyStyle(domNode, node.labelStyle);\n\n  return domNode;\n}\n\nfunction processEscapeSequences(text) {\n  var newText = \"\";\n  var escaped = false;\n  var ch;\n  for (var i = 0; i < text.length; ++i) {\n    ch = text[i];\n    if (escaped) {\n      switch(ch) {\n      case \"n\": newText += \"\\n\"; break;\n      default: newText += ch;\n      }\n      escaped = false;\n    } else if (ch === \"\\\\\") {\n      escaped = true;\n    } else {\n      newText += ch;\n    }\n  }\n  return newText;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/lib/lodash.js\":\n/*!*********************************************!*\\\n  !*** ./node_modules/dagre-d3/lib/lodash.js ***!\n  \\*********************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n/* global window */\n\nvar lodash;\n\nif (true) {\n  try {\n    lodash = {\n      defaults: __webpack_require__(/*! lodash/defaults */ \"./node_modules/lodash/defaults.js\"),\n      each: __webpack_require__(/*! lodash/each */ \"./node_modules/lodash/each.js\"),\n      isFunction: __webpack_require__(/*! lodash/isFunction */ \"./node_modules/lodash/isFunction.js\"),\n      isPlainObject: __webpack_require__(/*! lodash/isPlainObject */ \"./node_modules/lodash/isPlainObject.js\"),\n      pick: __webpack_require__(/*! lodash/pick */ \"./node_modules/lodash/pick.js\"),\n      has: __webpack_require__(/*! lodash/has */ \"./node_modules/lodash/has.js\"),\n      range: __webpack_require__(/*! lodash/range */ \"./node_modules/lodash/range.js\"),\n      uniqueId: __webpack_require__(/*! lodash/uniqueId */ \"./node_modules/lodash/uniqueId.js\")\n    };\n  }\n  catch (e) {\n    // continue regardless of error\n  }\n}\n\nif (!lodash) {\n  lodash = window._;\n}\n\nmodule.exports = lodash;\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/lib/position-clusters.js\":\n/*!********************************************************!*\\\n  !*** ./node_modules/dagre-d3/lib/position-clusters.js ***!\n  \\********************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar util = __webpack_require__(/*! ./util */ \"./node_modules/dagre-d3/lib/util.js\");\nvar d3 = __webpack_require__(/*! ./d3 */ \"./node_modules/dagre-d3/lib/d3.js\");\n\nmodule.exports = positionClusters;\n\nfunction positionClusters(selection, g) {\n  var created = selection.filter(function() { return !d3.select(this).classed(\"update\"); });\n\n  function translate(v) {\n    var node = g.node(v);\n    return \"translate(\" + node.x + \",\" + node.y + \")\";\n  }\n\n  created.attr(\"transform\", translate);\n\n  util.applyTransition(selection, g)\n    .style(\"opacity\", 1)\n    .attr(\"transform\", translate);\n\n  util.applyTransition(created.selectAll(\"rect\"), g)\n    .attr(\"width\", function(v) { return g.node(v).width; })\n    .attr(\"height\", function(v) { return g.node(v).height; })\n    .attr(\"x\", function(v) {\n      var node = g.node(v);\n      return -node.width / 2;\n    })\n    .attr(\"y\", function(v) {\n      var node = g.node(v);\n      return -node.height / 2;\n    });\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/lib/position-edge-labels.js\":\n/*!***********************************************************!*\\\n  !*** ./node_modules/dagre-d3/lib/position-edge-labels.js ***!\n  \\***********************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar util = __webpack_require__(/*! ./util */ \"./node_modules/dagre-d3/lib/util.js\");\nvar d3 = __webpack_require__(/*! ./d3 */ \"./node_modules/dagre-d3/lib/d3.js\");\nvar _ = __webpack_require__(/*! ./lodash */ \"./node_modules/dagre-d3/lib/lodash.js\");\n\nmodule.exports = positionEdgeLabels;\n\nfunction positionEdgeLabels(selection, g) {\n  var created = selection.filter(function() { return !d3.select(this).classed(\"update\"); });\n\n  function translate(e) {\n    var edge = g.edge(e);\n    return _.has(edge, \"x\") ? \"translate(\" + edge.x + \",\" + edge.y + \")\" : \"\";\n  }\n\n  created.attr(\"transform\", translate);\n\n  util.applyTransition(selection, g)\n    .style(\"opacity\", 1)\n    .attr(\"transform\", translate);\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/lib/position-nodes.js\":\n/*!*****************************************************!*\\\n  !*** ./node_modules/dagre-d3/lib/position-nodes.js ***!\n  \\*****************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar util = __webpack_require__(/*! ./util */ \"./node_modules/dagre-d3/lib/util.js\");\nvar d3 = __webpack_require__(/*! ./d3 */ \"./node_modules/dagre-d3/lib/d3.js\");\n\nmodule.exports = positionNodes;\n\nfunction positionNodes(selection, g) {\n  var created = selection.filter(function() { return !d3.select(this).classed(\"update\"); });\n\n  function translate(v) {\n    var node = g.node(v);\n    return \"translate(\" + node.x + \",\" + node.y + \")\";\n  }\n\n  created.attr(\"transform\", translate);\n\n  util.applyTransition(selection, g)\n    .style(\"opacity\", 1)\n    .attr(\"transform\", translate);\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/lib/render.js\":\n/*!*********************************************!*\\\n  !*** ./node_modules/dagre-d3/lib/render.js ***!\n  \\*********************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar _ = __webpack_require__(/*! ./lodash */ \"./node_modules/dagre-d3/lib/lodash.js\");\nvar d3 = __webpack_require__(/*! ./d3 */ \"./node_modules/dagre-d3/lib/d3.js\");\nvar layout = __webpack_require__(/*! ./dagre */ \"./node_modules/dagre-d3/lib/dagre.js\").layout;\n\nmodule.exports = render;\n\n// This design is based on http://bost.ocks.org/mike/chart/.\nfunction render() {\n  var createNodes = __webpack_require__(/*! ./create-nodes */ \"./node_modules/dagre-d3/lib/create-nodes.js\");\n  var createClusters = __webpack_require__(/*! ./create-clusters */ \"./node_modules/dagre-d3/lib/create-clusters.js\");\n  var createEdgeLabels = __webpack_require__(/*! ./create-edge-labels */ \"./node_modules/dagre-d3/lib/create-edge-labels.js\");\n  var createEdgePaths = __webpack_require__(/*! ./create-edge-paths */ \"./node_modules/dagre-d3/lib/create-edge-paths.js\");\n  var positionNodes = __webpack_require__(/*! ./position-nodes */ \"./node_modules/dagre-d3/lib/position-nodes.js\");\n  var positionEdgeLabels = __webpack_require__(/*! ./position-edge-labels */ \"./node_modules/dagre-d3/lib/position-edge-labels.js\");\n  var positionClusters = __webpack_require__(/*! ./position-clusters */ \"./node_modules/dagre-d3/lib/position-clusters.js\");\n  var shapes = __webpack_require__(/*! ./shapes */ \"./node_modules/dagre-d3/lib/shapes.js\");\n  var arrows = __webpack_require__(/*! ./arrows */ \"./node_modules/dagre-d3/lib/arrows.js\");\n\n  var fn = function(svg, g) {\n    preProcessGraph(g);\n\n    var outputGroup = createOrSelectGroup(svg, \"output\");\n    var clustersGroup = createOrSelectGroup(outputGroup, \"clusters\");\n    var edgePathsGroup = createOrSelectGroup(outputGroup, \"edgePaths\");\n    var edgeLabels = createEdgeLabels(createOrSelectGroup(outputGroup, \"edgeLabels\"), g);\n    var nodes = createNodes(createOrSelectGroup(outputGroup, \"nodes\"), g, shapes);\n\n    layout(g);\n\n    positionNodes(nodes, g);\n    positionEdgeLabels(edgeLabels, g);\n    createEdgePaths(edgePathsGroup, g, arrows);\n\n    var clusters = createClusters(clustersGroup, g);\n    positionClusters(clusters, g);\n\n    postProcessGraph(g);\n  };\n\n  fn.createNodes = function(value) {\n    if (!arguments.length) return createNodes;\n    createNodes = value;\n    return fn;\n  };\n\n  fn.createClusters = function(value) {\n    if (!arguments.length) return createClusters;\n    createClusters = value;\n    return fn;\n  };\n\n  fn.createEdgeLabels = function(value) {\n    if (!arguments.length) return createEdgeLabels;\n    createEdgeLabels = value;\n    return fn;\n  };\n\n  fn.createEdgePaths = function(value) {\n    if (!arguments.length) return createEdgePaths;\n    createEdgePaths = value;\n    return fn;\n  };\n\n  fn.shapes = function(value) {\n    if (!arguments.length) return shapes;\n    shapes = value;\n    return fn;\n  };\n\n  fn.arrows = function(value) {\n    if (!arguments.length) return arrows;\n    arrows = value;\n    return fn;\n  };\n\n  return fn;\n}\n\nvar NODE_DEFAULT_ATTRS = {\n  paddingLeft: 10,\n  paddingRight: 10,\n  paddingTop: 10,\n  paddingBottom: 10,\n  rx: 0,\n  ry: 0,\n  shape: \"rect\"\n};\n\nvar EDGE_DEFAULT_ATTRS = {\n  arrowhead: \"normal\",\n  curve: d3.curveLinear\n};\n\nfunction preProcessGraph(g) {\n  g.nodes().forEach(function(v) {\n    var node = g.node(v);\n    if (!_.has(node, \"label\") && !g.children(v).length) { node.label = v; }\n\n    if (_.has(node, \"paddingX\")) {\n      _.defaults(node, {\n        paddingLeft: node.paddingX,\n        paddingRight: node.paddingX\n      });\n    }\n\n    if (_.has(node, \"paddingY\")) {\n      _.defaults(node, {\n        paddingTop: node.paddingY,\n        paddingBottom: node.paddingY\n      });\n    }\n\n    if (_.has(node, \"padding\")) {\n      _.defaults(node, {\n        paddingLeft: node.padding,\n        paddingRight: node.padding,\n        paddingTop: node.padding,\n        paddingBottom: node.padding\n      });\n    }\n\n    _.defaults(node, NODE_DEFAULT_ATTRS);\n\n    _.each([\"paddingLeft\", \"paddingRight\", \"paddingTop\", \"paddingBottom\"], function(k) {\n      node[k] = Number(node[k]);\n    });\n\n    // Save dimensions for restore during post-processing\n    if (_.has(node, \"width\")) { node._prevWidth = node.width; }\n    if (_.has(node, \"height\")) { node._prevHeight = node.height; }\n  });\n\n  g.edges().forEach(function(e) {\n    var edge = g.edge(e);\n    if (!_.has(edge, \"label\")) { edge.label = \"\"; }\n    _.defaults(edge, EDGE_DEFAULT_ATTRS);\n  });\n}\n\nfunction postProcessGraph(g) {\n  _.each(g.nodes(), function(v) {\n    var node = g.node(v);\n\n    // Restore original dimensions\n    if (_.has(node, \"_prevWidth\")) {\n      node.width = node._prevWidth;\n    } else {\n      delete node.width;\n    }\n\n    if (_.has(node, \"_prevHeight\")) {\n      node.height = node._prevHeight;\n    } else {\n      delete node.height;\n    }\n\n    delete node._prevWidth;\n    delete node._prevHeight;\n  });\n}\n\nfunction createOrSelectGroup(root, name) {\n  var selection = root.select(\"g.\" + name);\n  if (selection.empty()) {\n    selection = root.append(\"g\").attr(\"class\", name);\n  }\n  return selection;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/lib/shapes.js\":\n/*!*********************************************!*\\\n  !*** ./node_modules/dagre-d3/lib/shapes.js ***!\n  \\*********************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar intersectRect = __webpack_require__(/*! ./intersect/intersect-rect */ \"./node_modules/dagre-d3/lib/intersect/intersect-rect.js\");\nvar intersectEllipse = __webpack_require__(/*! ./intersect/intersect-ellipse */ \"./node_modules/dagre-d3/lib/intersect/intersect-ellipse.js\");\nvar intersectCircle = __webpack_require__(/*! ./intersect/intersect-circle */ \"./node_modules/dagre-d3/lib/intersect/intersect-circle.js\");\nvar intersectPolygon = __webpack_require__(/*! ./intersect/intersect-polygon */ \"./node_modules/dagre-d3/lib/intersect/intersect-polygon.js\");\n\nmodule.exports = {\n  rect: rect,\n  ellipse: ellipse,\n  circle: circle,\n  diamond: diamond\n};\n\nfunction rect(parent, bbox, node) {\n  var shapeSvg = parent.insert(\"rect\", \":first-child\")\n    .attr(\"rx\", node.rx)\n    .attr(\"ry\", node.ry)\n    .attr(\"x\", -bbox.width / 2)\n    .attr(\"y\", -bbox.height / 2)\n    .attr(\"width\", bbox.width)\n    .attr(\"height\", bbox.height);\n\n  node.intersect = function(point) {\n    return intersectRect(node, point);\n  };\n\n  return shapeSvg;\n}\n\nfunction ellipse(parent, bbox, node) {\n  var rx = bbox.width / 2;\n  var ry = bbox.height / 2;\n  var shapeSvg = parent.insert(\"ellipse\", \":first-child\")\n    .attr(\"x\", -bbox.width / 2)\n    .attr(\"y\", -bbox.height / 2)\n    .attr(\"rx\", rx)\n    .attr(\"ry\", ry);\n\n  node.intersect = function(point) {\n    return intersectEllipse(node, rx, ry, point);\n  };\n\n  return shapeSvg;\n}\n\nfunction circle(parent, bbox, node) {\n  var r = Math.max(bbox.width, bbox.height) / 2;\n  var shapeSvg = parent.insert(\"circle\", \":first-child\")\n    .attr(\"x\", -bbox.width / 2)\n    .attr(\"y\", -bbox.height / 2)\n    .attr(\"r\", r);\n\n  node.intersect = function(point) {\n    return intersectCircle(node, r, point);\n  };\n\n  return shapeSvg;\n}\n\n// Circumscribe an ellipse for the bounding box with a diamond shape. I derived\n// the function to calculate the diamond shape from:\n// http://mathforum.org/kb/message.jspa?messageID=3750236\nfunction diamond(parent, bbox, node) {\n  var w = (bbox.width * Math.SQRT2) / 2;\n  var h = (bbox.height * Math.SQRT2) / 2;\n  var points = [\n    { x:  0, y: -h },\n    { x: -w, y:  0 },\n    { x:  0, y:  h },\n    { x:  w, y:  0 }\n  ];\n  var shapeSvg = parent.insert(\"polygon\", \":first-child\")\n    .attr(\"points\", points.map(function(p) { return p.x + \",\" + p.y; }).join(\" \"));\n\n  node.intersect = function(p) {\n    return intersectPolygon(node, points, p);\n  };\n\n  return shapeSvg;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/lib/util.js\":\n/*!*******************************************!*\\\n  !*** ./node_modules/dagre-d3/lib/util.js ***!\n  \\*******************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar _ = __webpack_require__(/*! ./lodash */ \"./node_modules/dagre-d3/lib/lodash.js\");\n\n// Public utility functions\nmodule.exports = {\n  isSubgraph: isSubgraph,\n  edgeToId: edgeToId,\n  applyStyle: applyStyle,\n  applyClass: applyClass,\n  applyTransition: applyTransition\n};\n\n/*\n * Returns true if the specified node in the graph is a subgraph node. A\n * subgraph node is one that contains other nodes.\n */\nfunction isSubgraph(g, v) {\n  return !!g.children(v).length;\n}\n\nfunction edgeToId(e) {\n  return escapeId(e.v) + \":\" + escapeId(e.w) + \":\" + escapeId(e.name);\n}\n\nvar ID_DELIM = /:/g;\nfunction escapeId(str) {\n  return str ? String(str).replace(ID_DELIM, \"\\\\:\") : \"\";\n}\n\nfunction applyStyle(dom, styleFn) {\n  if (styleFn) {\n    dom.attr(\"style\", styleFn);\n  }\n}\n\nfunction applyClass(dom, classFn, otherClasses) {\n  if (classFn) {\n    dom\n      .attr(\"class\", classFn)\n      .attr(\"class\", otherClasses + \" \" + dom.attr(\"class\"));\n  }\n}\n\nfunction applyTransition(selection, g) {\n  var graph = g.graph();\n\n  if (_.isPlainObject(graph)) {\n    var transition = graph.transition;\n    if (_.isFunction(transition)) {\n      return transition(selection);\n    }\n  }\n\n  return selection;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/lib/version.js\":\n/*!**********************************************!*\\\n  !*** ./node_modules/dagre-d3/lib/version.js ***!\n  \\**********************************************/\n/*! no static exports found */\n/***/ (function(module, exports) {\n\nmodule.exports = \"0.6.4\";\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-axis/src/array.js\":\n/*!*****************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-axis/src/array.js ***!\n  \\*****************************************************************/\n/*! exports provided: slice */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"slice\", function() { return slice; });\nvar slice = Array.prototype.slice;\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-axis/src/axis.js\":\n/*!****************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-axis/src/axis.js ***!\n  \\****************************************************************/\n/*! exports provided: axisTop, axisRight, axisBottom, axisLeft */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"axisTop\", function() { return axisTop; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"axisRight\", function() { return axisRight; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"axisBottom\", function() { return axisBottom; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"axisLeft\", function() { return axisLeft; });\n/* harmony import */ var _array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./array */ \"./node_modules/dagre-d3/node_modules/d3-axis/src/array.js\");\n/* harmony import */ var _identity__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./identity */ \"./node_modules/dagre-d3/node_modules/d3-axis/src/identity.js\");\n\n\n\nvar top = 1,\n    right = 2,\n    bottom = 3,\n    left = 4,\n    epsilon = 1e-6;\n\nfunction translateX(x) {\n  return \"translate(\" + (x + 0.5) + \",0)\";\n}\n\nfunction translateY(y) {\n  return \"translate(0,\" + (y + 0.5) + \")\";\n}\n\nfunction number(scale) {\n  return function(d) {\n    return +scale(d);\n  };\n}\n\nfunction center(scale) {\n  var offset = Math.max(0, scale.bandwidth() - 1) / 2; // Adjust for 0.5px offset.\n  if (scale.round()) offset = Math.round(offset);\n  return function(d) {\n    return +scale(d) + offset;\n  };\n}\n\nfunction entering() {\n  return !this.__axis;\n}\n\nfunction axis(orient, scale) {\n  var tickArguments = [],\n      tickValues = null,\n      tickFormat = null,\n      tickSizeInner = 6,\n      tickSizeOuter = 6,\n      tickPadding = 3,\n      k = orient === top || orient === left ? -1 : 1,\n      x = orient === left || orient === right ? \"x\" : \"y\",\n      transform = orient === top || orient === bottom ? translateX : translateY;\n\n  function axis(context) {\n    var values = tickValues == null ? (scale.ticks ? scale.ticks.apply(scale, tickArguments) : scale.domain()) : tickValues,\n        format = tickFormat == null ? (scale.tickFormat ? scale.tickFormat.apply(scale, tickArguments) : _identity__WEBPACK_IMPORTED_MODULE_1__[\"default\"]) : tickFormat,\n        spacing = Math.max(tickSizeInner, 0) + tickPadding,\n        range = scale.range(),\n        range0 = +range[0] + 0.5,\n        range1 = +range[range.length - 1] + 0.5,\n        position = (scale.bandwidth ? center : number)(scale.copy()),\n        selection = context.selection ? context.selection() : context,\n        path = selection.selectAll(\".domain\").data([null]),\n        tick = selection.selectAll(\".tick\").data(values, scale).order(),\n        tickExit = tick.exit(),\n        tickEnter = tick.enter().append(\"g\").attr(\"class\", \"tick\"),\n        line = tick.select(\"line\"),\n        text = tick.select(\"text\");\n\n    path = path.merge(path.enter().insert(\"path\", \".tick\")\n        .attr(\"class\", \"domain\")\n        .attr(\"stroke\", \"currentColor\"));\n\n    tick = tick.merge(tickEnter);\n\n    line = line.merge(tickEnter.append(\"line\")\n        .attr(\"stroke\", \"currentColor\")\n        .attr(x + \"2\", k * tickSizeInner));\n\n    text = text.merge(tickEnter.append(\"text\")\n        .attr(\"fill\", \"currentColor\")\n        .attr(x, k * spacing)\n        .attr(\"dy\", orient === top ? \"0em\" : orient === bottom ? \"0.71em\" : \"0.32em\"));\n\n    if (context !== selection) {\n      path = path.transition(context);\n      tick = tick.transition(context);\n      line = line.transition(context);\n      text = text.transition(context);\n\n      tickExit = tickExit.transition(context)\n          .attr(\"opacity\", epsilon)\n          .attr(\"transform\", function(d) { return isFinite(d = position(d)) ? transform(d) : this.getAttribute(\"transform\"); });\n\n      tickEnter\n          .attr(\"opacity\", epsilon)\n          .attr(\"transform\", function(d) { var p = this.parentNode.__axis; return transform(p && isFinite(p = p(d)) ? p : position(d)); });\n    }\n\n    tickExit.remove();\n\n    path\n        .attr(\"d\", orient === left || orient == right\n            ? (tickSizeOuter ? \"M\" + k * tickSizeOuter + \",\" + range0 + \"H0.5V\" + range1 + \"H\" + k * tickSizeOuter : \"M0.5,\" + range0 + \"V\" + range1)\n            : (tickSizeOuter ? \"M\" + range0 + \",\" + k * tickSizeOuter + \"V0.5H\" + range1 + \"V\" + k * tickSizeOuter : \"M\" + range0 + \",0.5H\" + range1));\n\n    tick\n        .attr(\"opacity\", 1)\n        .attr(\"transform\", function(d) { return transform(position(d)); });\n\n    line\n        .attr(x + \"2\", k * tickSizeInner);\n\n    text\n        .attr(x, k * spacing)\n        .text(format);\n\n    selection.filter(entering)\n        .attr(\"fill\", \"none\")\n        .attr(\"font-size\", 10)\n        .attr(\"font-family\", \"sans-serif\")\n        .attr(\"text-anchor\", orient === right ? \"start\" : orient === left ? \"end\" : \"middle\");\n\n    selection\n        .each(function() { this.__axis = position; });\n  }\n\n  axis.scale = function(_) {\n    return arguments.length ? (scale = _, axis) : scale;\n  };\n\n  axis.ticks = function() {\n    return tickArguments = _array__WEBPACK_IMPORTED_MODULE_0__[\"slice\"].call(arguments), axis;\n  };\n\n  axis.tickArguments = function(_) {\n    return arguments.length ? (tickArguments = _ == null ? [] : _array__WEBPACK_IMPORTED_MODULE_0__[\"slice\"].call(_), axis) : tickArguments.slice();\n  };\n\n  axis.tickValues = function(_) {\n    return arguments.length ? (tickValues = _ == null ? null : _array__WEBPACK_IMPORTED_MODULE_0__[\"slice\"].call(_), axis) : tickValues && tickValues.slice();\n  };\n\n  axis.tickFormat = function(_) {\n    return arguments.length ? (tickFormat = _, axis) : tickFormat;\n  };\n\n  axis.tickSize = function(_) {\n    return arguments.length ? (tickSizeInner = tickSizeOuter = +_, axis) : tickSizeInner;\n  };\n\n  axis.tickSizeInner = function(_) {\n    return arguments.length ? (tickSizeInner = +_, axis) : tickSizeInner;\n  };\n\n  axis.tickSizeOuter = function(_) {\n    return arguments.length ? (tickSizeOuter = +_, axis) : tickSizeOuter;\n  };\n\n  axis.tickPadding = function(_) {\n    return arguments.length ? (tickPadding = +_, axis) : tickPadding;\n  };\n\n  return axis;\n}\n\nfunction axisTop(scale) {\n  return axis(top, scale);\n}\n\nfunction axisRight(scale) {\n  return axis(right, scale);\n}\n\nfunction axisBottom(scale) {\n  return axis(bottom, scale);\n}\n\nfunction axisLeft(scale) {\n  return axis(left, scale);\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-axis/src/identity.js\":\n/*!********************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-axis/src/identity.js ***!\n  \\********************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(x) {\n  return x;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-axis/src/index.js\":\n/*!*****************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-axis/src/index.js ***!\n  \\*****************************************************************/\n/*! exports provided: axisTop, axisRight, axisBottom, axisLeft */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _axis__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./axis */ \"./node_modules/dagre-d3/node_modules/d3-axis/src/axis.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"axisTop\", function() { return _axis__WEBPACK_IMPORTED_MODULE_0__[\"axisTop\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"axisRight\", function() { return _axis__WEBPACK_IMPORTED_MODULE_0__[\"axisRight\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"axisBottom\", function() { return _axis__WEBPACK_IMPORTED_MODULE_0__[\"axisBottom\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"axisLeft\", function() { return _axis__WEBPACK_IMPORTED_MODULE_0__[\"axisLeft\"]; });\n\n\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-brush/src/brush.js\":\n/*!******************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-brush/src/brush.js ***!\n  \\******************************************************************/\n/*! exports provided: brushSelection, brushX, brushY, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"brushSelection\", function() { return brushSelection; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"brushX\", function() { return brushX; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"brushY\", function() { return brushY; });\n/* harmony import */ var d3_dispatch__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-dispatch */ \"./node_modules/d3-dispatch/src/index.js\");\n/* harmony import */ var d3_drag__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! d3-drag */ \"./node_modules/d3-drag/src/index.js\");\n/* harmony import */ var d3_interpolate__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! d3-interpolate */ \"./node_modules/d3-interpolate/src/index.js\");\n/* harmony import */ var d3_selection__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! d3-selection */ \"./node_modules/d3-selection/src/index.js\");\n/* harmony import */ var d3_transition__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! d3-transition */ \"./node_modules/d3-transition/src/index.js\");\n/* harmony import */ var _constant_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./constant.js */ \"./node_modules/dagre-d3/node_modules/d3-brush/src/constant.js\");\n/* harmony import */ var _event_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./event.js */ \"./node_modules/dagre-d3/node_modules/d3-brush/src/event.js\");\n/* harmony import */ var _noevent_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./noevent.js */ \"./node_modules/dagre-d3/node_modules/d3-brush/src/noevent.js\");\n\n\n\n\n\n\n\n\n\nvar MODE_DRAG = {name: \"drag\"},\n    MODE_SPACE = {name: \"space\"},\n    MODE_HANDLE = {name: \"handle\"},\n    MODE_CENTER = {name: \"center\"};\n\nfunction number1(e) {\n  return [+e[0], +e[1]];\n}\n\nfunction number2(e) {\n  return [number1(e[0]), number1(e[1])];\n}\n\nfunction toucher(identifier) {\n  return function(target) {\n    return Object(d3_selection__WEBPACK_IMPORTED_MODULE_3__[\"touch\"])(target, d3_selection__WEBPACK_IMPORTED_MODULE_3__[\"event\"].touches, identifier);\n  };\n}\n\nvar X = {\n  name: \"x\",\n  handles: [\"w\", \"e\"].map(type),\n  input: function(x, e) { return x == null ? null : [[+x[0], e[0][1]], [+x[1], e[1][1]]]; },\n  output: function(xy) { return xy && [xy[0][0], xy[1][0]]; }\n};\n\nvar Y = {\n  name: \"y\",\n  handles: [\"n\", \"s\"].map(type),\n  input: function(y, e) { return y == null ? null : [[e[0][0], +y[0]], [e[1][0], +y[1]]]; },\n  output: function(xy) { return xy && [xy[0][1], xy[1][1]]; }\n};\n\nvar XY = {\n  name: \"xy\",\n  handles: [\"n\", \"w\", \"e\", \"s\", \"nw\", \"ne\", \"sw\", \"se\"].map(type),\n  input: function(xy) { return xy == null ? null : number2(xy); },\n  output: function(xy) { return xy; }\n};\n\nvar cursors = {\n  overlay: \"crosshair\",\n  selection: \"move\",\n  n: \"ns-resize\",\n  e: \"ew-resize\",\n  s: \"ns-resize\",\n  w: \"ew-resize\",\n  nw: \"nwse-resize\",\n  ne: \"nesw-resize\",\n  se: \"nwse-resize\",\n  sw: \"nesw-resize\"\n};\n\nvar flipX = {\n  e: \"w\",\n  w: \"e\",\n  nw: \"ne\",\n  ne: \"nw\",\n  se: \"sw\",\n  sw: \"se\"\n};\n\nvar flipY = {\n  n: \"s\",\n  s: \"n\",\n  nw: \"sw\",\n  ne: \"se\",\n  se: \"ne\",\n  sw: \"nw\"\n};\n\nvar signsX = {\n  overlay: +1,\n  selection: +1,\n  n: null,\n  e: +1,\n  s: null,\n  w: -1,\n  nw: -1,\n  ne: +1,\n  se: +1,\n  sw: -1\n};\n\nvar signsY = {\n  overlay: +1,\n  selection: +1,\n  n: -1,\n  e: null,\n  s: +1,\n  w: null,\n  nw: -1,\n  ne: -1,\n  se: +1,\n  sw: +1\n};\n\nfunction type(t) {\n  return {type: t};\n}\n\n// Ignore right-click, since that should open the context menu.\nfunction defaultFilter() {\n  return !d3_selection__WEBPACK_IMPORTED_MODULE_3__[\"event\"].ctrlKey && !d3_selection__WEBPACK_IMPORTED_MODULE_3__[\"event\"].button;\n}\n\nfunction defaultExtent() {\n  var svg = this.ownerSVGElement || this;\n  if (svg.hasAttribute(\"viewBox\")) {\n    svg = svg.viewBox.baseVal;\n    return [[svg.x, svg.y], [svg.x + svg.width, svg.y + svg.height]];\n  }\n  return [[0, 0], [svg.width.baseVal.value, svg.height.baseVal.value]];\n}\n\nfunction defaultTouchable() {\n  return navigator.maxTouchPoints || (\"ontouchstart\" in this);\n}\n\n// Like d3.local, but with the name “__brush” rather than auto-generated.\nfunction local(node) {\n  while (!node.__brush) if (!(node = node.parentNode)) return;\n  return node.__brush;\n}\n\nfunction empty(extent) {\n  return extent[0][0] === extent[1][0]\n      || extent[0][1] === extent[1][1];\n}\n\nfunction brushSelection(node) {\n  var state = node.__brush;\n  return state ? state.dim.output(state.selection) : null;\n}\n\nfunction brushX() {\n  return brush(X);\n}\n\nfunction brushY() {\n  return brush(Y);\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  return brush(XY);\n});\n\nfunction brush(dim) {\n  var extent = defaultExtent,\n      filter = defaultFilter,\n      touchable = defaultTouchable,\n      keys = true,\n      listeners = Object(d3_dispatch__WEBPACK_IMPORTED_MODULE_0__[\"dispatch\"])(\"start\", \"brush\", \"end\"),\n      handleSize = 6,\n      touchending;\n\n  function brush(group) {\n    var overlay = group\n        .property(\"__brush\", initialize)\n      .selectAll(\".overlay\")\n      .data([type(\"overlay\")]);\n\n    overlay.enter().append(\"rect\")\n        .attr(\"class\", \"overlay\")\n        .attr(\"pointer-events\", \"all\")\n        .attr(\"cursor\", cursors.overlay)\n      .merge(overlay)\n        .each(function() {\n          var extent = local(this).extent;\n          Object(d3_selection__WEBPACK_IMPORTED_MODULE_3__[\"select\"])(this)\n              .attr(\"x\", extent[0][0])\n              .attr(\"y\", extent[0][1])\n              .attr(\"width\", extent[1][0] - extent[0][0])\n              .attr(\"height\", extent[1][1] - extent[0][1]);\n        });\n\n    group.selectAll(\".selection\")\n      .data([type(\"selection\")])\n      .enter().append(\"rect\")\n        .attr(\"class\", \"selection\")\n        .attr(\"cursor\", cursors.selection)\n        .attr(\"fill\", \"#777\")\n        .attr(\"fill-opacity\", 0.3)\n        .attr(\"stroke\", \"#fff\")\n        .attr(\"shape-rendering\", \"crispEdges\");\n\n    var handle = group.selectAll(\".handle\")\n      .data(dim.handles, function(d) { return d.type; });\n\n    handle.exit().remove();\n\n    handle.enter().append(\"rect\")\n        .attr(\"class\", function(d) { return \"handle handle--\" + d.type; })\n        .attr(\"cursor\", function(d) { return cursors[d.type]; });\n\n    group\n        .each(redraw)\n        .attr(\"fill\", \"none\")\n        .attr(\"pointer-events\", \"all\")\n        .on(\"mousedown.brush\", started)\n      .filter(touchable)\n        .on(\"touchstart.brush\", started)\n        .on(\"touchmove.brush\", touchmoved)\n        .on(\"touchend.brush touchcancel.brush\", touchended)\n        .style(\"touch-action\", \"none\")\n        .style(\"-webkit-tap-highlight-color\", \"rgba(0,0,0,0)\");\n  }\n\n  brush.move = function(group, selection) {\n    if (group.selection) {\n      group\n          .on(\"start.brush\", function() { emitter(this, arguments).beforestart().start(); })\n          .on(\"interrupt.brush end.brush\", function() { emitter(this, arguments).end(); })\n          .tween(\"brush\", function() {\n            var that = this,\n                state = that.__brush,\n                emit = emitter(that, arguments),\n                selection0 = state.selection,\n                selection1 = dim.input(typeof selection === \"function\" ? selection.apply(this, arguments) : selection, state.extent),\n                i = Object(d3_interpolate__WEBPACK_IMPORTED_MODULE_2__[\"interpolate\"])(selection0, selection1);\n\n            function tween(t) {\n              state.selection = t === 1 && selection1 === null ? null : i(t);\n              redraw.call(that);\n              emit.brush();\n            }\n\n            return selection0 !== null && selection1 !== null ? tween : tween(1);\n          });\n    } else {\n      group\n          .each(function() {\n            var that = this,\n                args = arguments,\n                state = that.__brush,\n                selection1 = dim.input(typeof selection === \"function\" ? selection.apply(that, args) : selection, state.extent),\n                emit = emitter(that, args).beforestart();\n\n            Object(d3_transition__WEBPACK_IMPORTED_MODULE_4__[\"interrupt\"])(that);\n            state.selection = selection1 === null ? null : selection1;\n            redraw.call(that);\n            emit.start().brush().end();\n          });\n    }\n  };\n\n  brush.clear = function(group) {\n    brush.move(group, null);\n  };\n\n  function redraw() {\n    var group = Object(d3_selection__WEBPACK_IMPORTED_MODULE_3__[\"select\"])(this),\n        selection = local(this).selection;\n\n    if (selection) {\n      group.selectAll(\".selection\")\n          .style(\"display\", null)\n          .attr(\"x\", selection[0][0])\n          .attr(\"y\", selection[0][1])\n          .attr(\"width\", selection[1][0] - selection[0][0])\n          .attr(\"height\", selection[1][1] - selection[0][1]);\n\n      group.selectAll(\".handle\")\n          .style(\"display\", null)\n          .attr(\"x\", function(d) { return d.type[d.type.length - 1] === \"e\" ? selection[1][0] - handleSize / 2 : selection[0][0] - handleSize / 2; })\n          .attr(\"y\", function(d) { return d.type[0] === \"s\" ? selection[1][1] - handleSize / 2 : selection[0][1] - handleSize / 2; })\n          .attr(\"width\", function(d) { return d.type === \"n\" || d.type === \"s\" ? selection[1][0] - selection[0][0] + handleSize : handleSize; })\n          .attr(\"height\", function(d) { return d.type === \"e\" || d.type === \"w\" ? selection[1][1] - selection[0][1] + handleSize : handleSize; });\n    }\n\n    else {\n      group.selectAll(\".selection,.handle\")\n          .style(\"display\", \"none\")\n          .attr(\"x\", null)\n          .attr(\"y\", null)\n          .attr(\"width\", null)\n          .attr(\"height\", null);\n    }\n  }\n\n  function emitter(that, args, clean) {\n    var emit = that.__brush.emitter;\n    return emit && (!clean || !emit.clean) ? emit : new Emitter(that, args, clean);\n  }\n\n  function Emitter(that, args, clean) {\n    this.that = that;\n    this.args = args;\n    this.state = that.__brush;\n    this.active = 0;\n    this.clean = clean;\n  }\n\n  Emitter.prototype = {\n    beforestart: function() {\n      if (++this.active === 1) this.state.emitter = this, this.starting = true;\n      return this;\n    },\n    start: function() {\n      if (this.starting) this.starting = false, this.emit(\"start\");\n      else this.emit(\"brush\");\n      return this;\n    },\n    brush: function() {\n      this.emit(\"brush\");\n      return this;\n    },\n    end: function() {\n      if (--this.active === 0) delete this.state.emitter, this.emit(\"end\");\n      return this;\n    },\n    emit: function(type) {\n      Object(d3_selection__WEBPACK_IMPORTED_MODULE_3__[\"customEvent\"])(new _event_js__WEBPACK_IMPORTED_MODULE_6__[\"default\"](brush, type, dim.output(this.state.selection)), listeners.apply, listeners, [type, this.that, this.args]);\n    }\n  };\n\n  function started() {\n    if (touchending && !d3_selection__WEBPACK_IMPORTED_MODULE_3__[\"event\"].touches) return;\n    if (!filter.apply(this, arguments)) return;\n\n    var that = this,\n        type = d3_selection__WEBPACK_IMPORTED_MODULE_3__[\"event\"].target.__data__.type,\n        mode = (keys && d3_selection__WEBPACK_IMPORTED_MODULE_3__[\"event\"].metaKey ? type = \"overlay\" : type) === \"selection\" ? MODE_DRAG : (keys && d3_selection__WEBPACK_IMPORTED_MODULE_3__[\"event\"].altKey ? MODE_CENTER : MODE_HANDLE),\n        signX = dim === Y ? null : signsX[type],\n        signY = dim === X ? null : signsY[type],\n        state = local(that),\n        extent = state.extent,\n        selection = state.selection,\n        W = extent[0][0], w0, w1,\n        N = extent[0][1], n0, n1,\n        E = extent[1][0], e0, e1,\n        S = extent[1][1], s0, s1,\n        dx = 0,\n        dy = 0,\n        moving,\n        shifting = signX && signY && keys && d3_selection__WEBPACK_IMPORTED_MODULE_3__[\"event\"].shiftKey,\n        lockX,\n        lockY,\n        pointer = d3_selection__WEBPACK_IMPORTED_MODULE_3__[\"event\"].touches ? toucher(d3_selection__WEBPACK_IMPORTED_MODULE_3__[\"event\"].changedTouches[0].identifier) : d3_selection__WEBPACK_IMPORTED_MODULE_3__[\"mouse\"],\n        point0 = pointer(that),\n        point = point0,\n        emit = emitter(that, arguments, true).beforestart();\n\n    if (type === \"overlay\") {\n      if (selection) moving = true;\n      state.selection = selection = [\n        [w0 = dim === Y ? W : point0[0], n0 = dim === X ? N : point0[1]],\n        [e0 = dim === Y ? E : w0, s0 = dim === X ? S : n0]\n      ];\n    } else {\n      w0 = selection[0][0];\n      n0 = selection[0][1];\n      e0 = selection[1][0];\n      s0 = selection[1][1];\n    }\n\n    w1 = w0;\n    n1 = n0;\n    e1 = e0;\n    s1 = s0;\n\n    var group = Object(d3_selection__WEBPACK_IMPORTED_MODULE_3__[\"select\"])(that)\n        .attr(\"pointer-events\", \"none\");\n\n    var overlay = group.selectAll(\".overlay\")\n        .attr(\"cursor\", cursors[type]);\n\n    if (d3_selection__WEBPACK_IMPORTED_MODULE_3__[\"event\"].touches) {\n      emit.moved = moved;\n      emit.ended = ended;\n    } else {\n      var view = Object(d3_selection__WEBPACK_IMPORTED_MODULE_3__[\"select\"])(d3_selection__WEBPACK_IMPORTED_MODULE_3__[\"event\"].view)\n          .on(\"mousemove.brush\", moved, true)\n          .on(\"mouseup.brush\", ended, true);\n      if (keys) view\n          .on(\"keydown.brush\", keydowned, true)\n          .on(\"keyup.brush\", keyupped, true)\n\n      Object(d3_drag__WEBPACK_IMPORTED_MODULE_1__[\"dragDisable\"])(d3_selection__WEBPACK_IMPORTED_MODULE_3__[\"event\"].view);\n    }\n\n    Object(_noevent_js__WEBPACK_IMPORTED_MODULE_7__[\"nopropagation\"])();\n    Object(d3_transition__WEBPACK_IMPORTED_MODULE_4__[\"interrupt\"])(that);\n    redraw.call(that);\n    emit.start();\n\n    function moved() {\n      var point1 = pointer(that);\n      if (shifting && !lockX && !lockY) {\n        if (Math.abs(point1[0] - point[0]) > Math.abs(point1[1] - point[1])) lockY = true;\n        else lockX = true;\n      }\n      point = point1;\n      moving = true;\n      Object(_noevent_js__WEBPACK_IMPORTED_MODULE_7__[\"default\"])();\n      move();\n    }\n\n    function move() {\n      var t;\n\n      dx = point[0] - point0[0];\n      dy = point[1] - point0[1];\n\n      switch (mode) {\n        case MODE_SPACE:\n        case MODE_DRAG: {\n          if (signX) dx = Math.max(W - w0, Math.min(E - e0, dx)), w1 = w0 + dx, e1 = e0 + dx;\n          if (signY) dy = Math.max(N - n0, Math.min(S - s0, dy)), n1 = n0 + dy, s1 = s0 + dy;\n          break;\n        }\n        case MODE_HANDLE: {\n          if (signX < 0) dx = Math.max(W - w0, Math.min(E - w0, dx)), w1 = w0 + dx, e1 = e0;\n          else if (signX > 0) dx = Math.max(W - e0, Math.min(E - e0, dx)), w1 = w0, e1 = e0 + dx;\n          if (signY < 0) dy = Math.max(N - n0, Math.min(S - n0, dy)), n1 = n0 + dy, s1 = s0;\n          else if (signY > 0) dy = Math.max(N - s0, Math.min(S - s0, dy)), n1 = n0, s1 = s0 + dy;\n          break;\n        }\n        case MODE_CENTER: {\n          if (signX) w1 = Math.max(W, Math.min(E, w0 - dx * signX)), e1 = Math.max(W, Math.min(E, e0 + dx * signX));\n          if (signY) n1 = Math.max(N, Math.min(S, n0 - dy * signY)), s1 = Math.max(N, Math.min(S, s0 + dy * signY));\n          break;\n        }\n      }\n\n      if (e1 < w1) {\n        signX *= -1;\n        t = w0, w0 = e0, e0 = t;\n        t = w1, w1 = e1, e1 = t;\n        if (type in flipX) overlay.attr(\"cursor\", cursors[type = flipX[type]]);\n      }\n\n      if (s1 < n1) {\n        signY *= -1;\n        t = n0, n0 = s0, s0 = t;\n        t = n1, n1 = s1, s1 = t;\n        if (type in flipY) overlay.attr(\"cursor\", cursors[type = flipY[type]]);\n      }\n\n      if (state.selection) selection = state.selection; // May be set by brush.move!\n      if (lockX) w1 = selection[0][0], e1 = selection[1][0];\n      if (lockY) n1 = selection[0][1], s1 = selection[1][1];\n\n      if (selection[0][0] !== w1\n          || selection[0][1] !== n1\n          || selection[1][0] !== e1\n          || selection[1][1] !== s1) {\n        state.selection = [[w1, n1], [e1, s1]];\n        redraw.call(that);\n        emit.brush();\n      }\n    }\n\n    function ended() {\n      Object(_noevent_js__WEBPACK_IMPORTED_MODULE_7__[\"nopropagation\"])();\n      if (d3_selection__WEBPACK_IMPORTED_MODULE_3__[\"event\"].touches) {\n        if (d3_selection__WEBPACK_IMPORTED_MODULE_3__[\"event\"].touches.length) return;\n        if (touchending) clearTimeout(touchending);\n        touchending = setTimeout(function() { touchending = null; }, 500); // Ghost clicks are delayed!\n      } else {\n        Object(d3_drag__WEBPACK_IMPORTED_MODULE_1__[\"dragEnable\"])(d3_selection__WEBPACK_IMPORTED_MODULE_3__[\"event\"].view, moving);\n        view.on(\"keydown.brush keyup.brush mousemove.brush mouseup.brush\", null);\n      }\n      group.attr(\"pointer-events\", \"all\");\n      overlay.attr(\"cursor\", cursors.overlay);\n      if (state.selection) selection = state.selection; // May be set by brush.move (on start)!\n      if (empty(selection)) state.selection = null, redraw.call(that);\n      emit.end();\n    }\n\n    function keydowned() {\n      switch (d3_selection__WEBPACK_IMPORTED_MODULE_3__[\"event\"].keyCode) {\n        case 16: { // SHIFT\n          shifting = signX && signY;\n          break;\n        }\n        case 18: { // ALT\n          if (mode === MODE_HANDLE) {\n            if (signX) e0 = e1 - dx * signX, w0 = w1 + dx * signX;\n            if (signY) s0 = s1 - dy * signY, n0 = n1 + dy * signY;\n            mode = MODE_CENTER;\n            move();\n          }\n          break;\n        }\n        case 32: { // SPACE; takes priority over ALT\n          if (mode === MODE_HANDLE || mode === MODE_CENTER) {\n            if (signX < 0) e0 = e1 - dx; else if (signX > 0) w0 = w1 - dx;\n            if (signY < 0) s0 = s1 - dy; else if (signY > 0) n0 = n1 - dy;\n            mode = MODE_SPACE;\n            overlay.attr(\"cursor\", cursors.selection);\n            move();\n          }\n          break;\n        }\n        default: return;\n      }\n      Object(_noevent_js__WEBPACK_IMPORTED_MODULE_7__[\"default\"])();\n    }\n\n    function keyupped() {\n      switch (d3_selection__WEBPACK_IMPORTED_MODULE_3__[\"event\"].keyCode) {\n        case 16: { // SHIFT\n          if (shifting) {\n            lockX = lockY = shifting = false;\n            move();\n          }\n          break;\n        }\n        case 18: { // ALT\n          if (mode === MODE_CENTER) {\n            if (signX < 0) e0 = e1; else if (signX > 0) w0 = w1;\n            if (signY < 0) s0 = s1; else if (signY > 0) n0 = n1;\n            mode = MODE_HANDLE;\n            move();\n          }\n          break;\n        }\n        case 32: { // SPACE\n          if (mode === MODE_SPACE) {\n            if (d3_selection__WEBPACK_IMPORTED_MODULE_3__[\"event\"].altKey) {\n              if (signX) e0 = e1 - dx * signX, w0 = w1 + dx * signX;\n              if (signY) s0 = s1 - dy * signY, n0 = n1 + dy * signY;\n              mode = MODE_CENTER;\n            } else {\n              if (signX < 0) e0 = e1; else if (signX > 0) w0 = w1;\n              if (signY < 0) s0 = s1; else if (signY > 0) n0 = n1;\n              mode = MODE_HANDLE;\n            }\n            overlay.attr(\"cursor\", cursors[type]);\n            move();\n          }\n          break;\n        }\n        default: return;\n      }\n      Object(_noevent_js__WEBPACK_IMPORTED_MODULE_7__[\"default\"])();\n    }\n  }\n\n  function touchmoved() {\n    emitter(this, arguments).moved();\n  }\n\n  function touchended() {\n    emitter(this, arguments).ended();\n  }\n\n  function initialize() {\n    var state = this.__brush || {selection: null};\n    state.extent = number2(extent.apply(this, arguments));\n    state.dim = dim;\n    return state;\n  }\n\n  brush.extent = function(_) {\n    return arguments.length ? (extent = typeof _ === \"function\" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(number2(_)), brush) : extent;\n  };\n\n  brush.filter = function(_) {\n    return arguments.length ? (filter = typeof _ === \"function\" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(!!_), brush) : filter;\n  };\n\n  brush.touchable = function(_) {\n    return arguments.length ? (touchable = typeof _ === \"function\" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(!!_), brush) : touchable;\n  };\n\n  brush.handleSize = function(_) {\n    return arguments.length ? (handleSize = +_, brush) : handleSize;\n  };\n\n  brush.keyModifiers = function(_) {\n    return arguments.length ? (keys = !!_, brush) : keys;\n  };\n\n  brush.on = function() {\n    var value = listeners.on.apply(listeners, arguments);\n    return value === listeners ? brush : value;\n  };\n\n  return brush;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-brush/src/constant.js\":\n/*!*********************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-brush/src/constant.js ***!\n  \\*********************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(x) {\n  return function() {\n    return x;\n  };\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-brush/src/event.js\":\n/*!******************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-brush/src/event.js ***!\n  \\******************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(target, type, selection) {\n  this.target = target;\n  this.type = type;\n  this.selection = selection;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-brush/src/index.js\":\n/*!******************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-brush/src/index.js ***!\n  \\******************************************************************/\n/*! exports provided: brush, brushX, brushY, brushSelection */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _brush_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./brush.js */ \"./node_modules/dagre-d3/node_modules/d3-brush/src/brush.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"brush\", function() { return _brush_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"brushX\", function() { return _brush_js__WEBPACK_IMPORTED_MODULE_0__[\"brushX\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"brushY\", function() { return _brush_js__WEBPACK_IMPORTED_MODULE_0__[\"brushY\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"brushSelection\", function() { return _brush_js__WEBPACK_IMPORTED_MODULE_0__[\"brushSelection\"]; });\n\n\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-brush/src/noevent.js\":\n/*!********************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-brush/src/noevent.js ***!\n  \\********************************************************************/\n/*! exports provided: nopropagation, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"nopropagation\", function() { return nopropagation; });\n/* harmony import */ var d3_selection__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-selection */ \"./node_modules/d3-selection/src/index.js\");\n\n\nfunction nopropagation() {\n  d3_selection__WEBPACK_IMPORTED_MODULE_0__[\"event\"].stopImmediatePropagation();\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  d3_selection__WEBPACK_IMPORTED_MODULE_0__[\"event\"].preventDefault();\n  d3_selection__WEBPACK_IMPORTED_MODULE_0__[\"event\"].stopImmediatePropagation();\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-chord/src/array.js\":\n/*!******************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-chord/src/array.js ***!\n  \\******************************************************************/\n/*! exports provided: slice */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"slice\", function() { return slice; });\nvar slice = Array.prototype.slice;\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-chord/src/chord.js\":\n/*!******************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-chord/src/chord.js ***!\n  \\******************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var d3_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-array */ \"./node_modules/d3-array/src/index.js\");\n/* harmony import */ var _math__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./math */ \"./node_modules/dagre-d3/node_modules/d3-chord/src/math.js\");\n\n\n\nfunction compareValue(compare) {\n  return function(a, b) {\n    return compare(\n      a.source.value + a.target.value,\n      b.source.value + b.target.value\n    );\n  };\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  var padAngle = 0,\n      sortGroups = null,\n      sortSubgroups = null,\n      sortChords = null;\n\n  function chord(matrix) {\n    var n = matrix.length,\n        groupSums = [],\n        groupIndex = Object(d3_array__WEBPACK_IMPORTED_MODULE_0__[\"range\"])(n),\n        subgroupIndex = [],\n        chords = [],\n        groups = chords.groups = new Array(n),\n        subgroups = new Array(n * n),\n        k,\n        x,\n        x0,\n        dx,\n        i,\n        j;\n\n    // Compute the sum.\n    k = 0, i = -1; while (++i < n) {\n      x = 0, j = -1; while (++j < n) {\n        x += matrix[i][j];\n      }\n      groupSums.push(x);\n      subgroupIndex.push(Object(d3_array__WEBPACK_IMPORTED_MODULE_0__[\"range\"])(n));\n      k += x;\n    }\n\n    // Sort groups…\n    if (sortGroups) groupIndex.sort(function(a, b) {\n      return sortGroups(groupSums[a], groupSums[b]);\n    });\n\n    // Sort subgroups…\n    if (sortSubgroups) subgroupIndex.forEach(function(d, i) {\n      d.sort(function(a, b) {\n        return sortSubgroups(matrix[i][a], matrix[i][b]);\n      });\n    });\n\n    // Convert the sum to scaling factor for [0, 2pi].\n    // TODO Allow start and end angle to be specified?\n    // TODO Allow padding to be specified as percentage?\n    k = Object(_math__WEBPACK_IMPORTED_MODULE_1__[\"max\"])(0, _math__WEBPACK_IMPORTED_MODULE_1__[\"tau\"] - padAngle * n) / k;\n    dx = k ? padAngle : _math__WEBPACK_IMPORTED_MODULE_1__[\"tau\"] / n;\n\n    // Compute the start and end angle for each group and subgroup.\n    // Note: Opera has a bug reordering object literal properties!\n    x = 0, i = -1; while (++i < n) {\n      x0 = x, j = -1; while (++j < n) {\n        var di = groupIndex[i],\n            dj = subgroupIndex[di][j],\n            v = matrix[di][dj],\n            a0 = x,\n            a1 = x += v * k;\n        subgroups[dj * n + di] = {\n          index: di,\n          subindex: dj,\n          startAngle: a0,\n          endAngle: a1,\n          value: v\n        };\n      }\n      groups[di] = {\n        index: di,\n        startAngle: x0,\n        endAngle: x,\n        value: groupSums[di]\n      };\n      x += dx;\n    }\n\n    // Generate chords for each (non-empty) subgroup-subgroup link.\n    i = -1; while (++i < n) {\n      j = i - 1; while (++j < n) {\n        var source = subgroups[j * n + i],\n            target = subgroups[i * n + j];\n        if (source.value || target.value) {\n          chords.push(source.value < target.value\n              ? {source: target, target: source}\n              : {source: source, target: target});\n        }\n      }\n    }\n\n    return sortChords ? chords.sort(sortChords) : chords;\n  }\n\n  chord.padAngle = function(_) {\n    return arguments.length ? (padAngle = Object(_math__WEBPACK_IMPORTED_MODULE_1__[\"max\"])(0, _), chord) : padAngle;\n  };\n\n  chord.sortGroups = function(_) {\n    return arguments.length ? (sortGroups = _, chord) : sortGroups;\n  };\n\n  chord.sortSubgroups = function(_) {\n    return arguments.length ? (sortSubgroups = _, chord) : sortSubgroups;\n  };\n\n  chord.sortChords = function(_) {\n    return arguments.length ? (_ == null ? sortChords = null : (sortChords = compareValue(_))._ = _, chord) : sortChords && sortChords._;\n  };\n\n  return chord;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-chord/src/constant.js\":\n/*!*********************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-chord/src/constant.js ***!\n  \\*********************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(x) {\n  return function() {\n    return x;\n  };\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-chord/src/index.js\":\n/*!******************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-chord/src/index.js ***!\n  \\******************************************************************/\n/*! exports provided: chord, ribbon */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _chord__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./chord */ \"./node_modules/dagre-d3/node_modules/d3-chord/src/chord.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"chord\", function() { return _chord__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n/* harmony import */ var _ribbon__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./ribbon */ \"./node_modules/dagre-d3/node_modules/d3-chord/src/ribbon.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"ribbon\", function() { return _ribbon__WEBPACK_IMPORTED_MODULE_1__[\"default\"]; });\n\n\n\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-chord/src/math.js\":\n/*!*****************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-chord/src/math.js ***!\n  \\*****************************************************************/\n/*! exports provided: cos, sin, pi, halfPi, tau, max */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"cos\", function() { return cos; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"sin\", function() { return sin; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"pi\", function() { return pi; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"halfPi\", function() { return halfPi; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"tau\", function() { return tau; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"max\", function() { return max; });\nvar cos = Math.cos;\nvar sin = Math.sin;\nvar pi = Math.PI;\nvar halfPi = pi / 2;\nvar tau = pi * 2;\nvar max = Math.max;\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-chord/src/ribbon.js\":\n/*!*******************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-chord/src/ribbon.js ***!\n  \\*******************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./array */ \"./node_modules/dagre-d3/node_modules/d3-chord/src/array.js\");\n/* harmony import */ var _constant__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./constant */ \"./node_modules/dagre-d3/node_modules/d3-chord/src/constant.js\");\n/* harmony import */ var _math__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./math */ \"./node_modules/dagre-d3/node_modules/d3-chord/src/math.js\");\n/* harmony import */ var d3_path__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! d3-path */ \"./node_modules/d3-path/src/index.js\");\n\n\n\n\n\nfunction defaultSource(d) {\n  return d.source;\n}\n\nfunction defaultTarget(d) {\n  return d.target;\n}\n\nfunction defaultRadius(d) {\n  return d.radius;\n}\n\nfunction defaultStartAngle(d) {\n  return d.startAngle;\n}\n\nfunction defaultEndAngle(d) {\n  return d.endAngle;\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  var source = defaultSource,\n      target = defaultTarget,\n      radius = defaultRadius,\n      startAngle = defaultStartAngle,\n      endAngle = defaultEndAngle,\n      context = null;\n\n  function ribbon() {\n    var buffer,\n        argv = _array__WEBPACK_IMPORTED_MODULE_0__[\"slice\"].call(arguments),\n        s = source.apply(this, argv),\n        t = target.apply(this, argv),\n        sr = +radius.apply(this, (argv[0] = s, argv)),\n        sa0 = startAngle.apply(this, argv) - _math__WEBPACK_IMPORTED_MODULE_2__[\"halfPi\"],\n        sa1 = endAngle.apply(this, argv) - _math__WEBPACK_IMPORTED_MODULE_2__[\"halfPi\"],\n        sx0 = sr * Object(_math__WEBPACK_IMPORTED_MODULE_2__[\"cos\"])(sa0),\n        sy0 = sr * Object(_math__WEBPACK_IMPORTED_MODULE_2__[\"sin\"])(sa0),\n        tr = +radius.apply(this, (argv[0] = t, argv)),\n        ta0 = startAngle.apply(this, argv) - _math__WEBPACK_IMPORTED_MODULE_2__[\"halfPi\"],\n        ta1 = endAngle.apply(this, argv) - _math__WEBPACK_IMPORTED_MODULE_2__[\"halfPi\"];\n\n    if (!context) context = buffer = Object(d3_path__WEBPACK_IMPORTED_MODULE_3__[\"path\"])();\n\n    context.moveTo(sx0, sy0);\n    context.arc(0, 0, sr, sa0, sa1);\n    if (sa0 !== ta0 || sa1 !== ta1) { // TODO sr !== tr?\n      context.quadraticCurveTo(0, 0, tr * Object(_math__WEBPACK_IMPORTED_MODULE_2__[\"cos\"])(ta0), tr * Object(_math__WEBPACK_IMPORTED_MODULE_2__[\"sin\"])(ta0));\n      context.arc(0, 0, tr, ta0, ta1);\n    }\n    context.quadraticCurveTo(0, 0, sx0, sy0);\n    context.closePath();\n\n    if (buffer) return context = null, buffer + \"\" || null;\n  }\n\n  ribbon.radius = function(_) {\n    return arguments.length ? (radius = typeof _ === \"function\" ? _ : Object(_constant__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(+_), ribbon) : radius;\n  };\n\n  ribbon.startAngle = function(_) {\n    return arguments.length ? (startAngle = typeof _ === \"function\" ? _ : Object(_constant__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(+_), ribbon) : startAngle;\n  };\n\n  ribbon.endAngle = function(_) {\n    return arguments.length ? (endAngle = typeof _ === \"function\" ? _ : Object(_constant__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(+_), ribbon) : endAngle;\n  };\n\n  ribbon.source = function(_) {\n    return arguments.length ? (source = _, ribbon) : source;\n  };\n\n  ribbon.target = function(_) {\n    return arguments.length ? (target = _, ribbon) : target;\n  };\n\n  ribbon.context = function(_) {\n    return arguments.length ? ((context = _ == null ? null : _), ribbon) : context;\n  };\n\n  return ribbon;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-contour/src/area.js\":\n/*!*******************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-contour/src/area.js ***!\n  \\*******************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(ring) {\n  var i = 0, n = ring.length, area = ring[n - 1][1] * ring[0][0] - ring[n - 1][0] * ring[0][1];\n  while (++i < n) area += ring[i - 1][1] * ring[i][0] - ring[i - 1][0] * ring[i][1];\n  return area;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-contour/src/array.js\":\n/*!********************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-contour/src/array.js ***!\n  \\********************************************************************/\n/*! exports provided: slice */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"slice\", function() { return slice; });\nvar array = Array.prototype;\n\nvar slice = array.slice;\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-contour/src/ascending.js\":\n/*!************************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-contour/src/ascending.js ***!\n  \\************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(a, b) {\n  return a - b;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-contour/src/blur.js\":\n/*!*******************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-contour/src/blur.js ***!\n  \\*******************************************************************/\n/*! exports provided: blurX, blurY */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"blurX\", function() { return blurX; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"blurY\", function() { return blurY; });\n// TODO Optimize edge cases.\n// TODO Optimize index calculation.\n// TODO Optimize arguments.\nfunction blurX(source, target, r) {\n  var n = source.width,\n      m = source.height,\n      w = (r << 1) + 1;\n  for (var j = 0; j < m; ++j) {\n    for (var i = 0, sr = 0; i < n + r; ++i) {\n      if (i < n) {\n        sr += source.data[i + j * n];\n      }\n      if (i >= r) {\n        if (i >= w) {\n          sr -= source.data[i - w + j * n];\n        }\n        target.data[i - r + j * n] = sr / Math.min(i + 1, n - 1 + w - i, w);\n      }\n    }\n  }\n}\n\n// TODO Optimize edge cases.\n// TODO Optimize index calculation.\n// TODO Optimize arguments.\nfunction blurY(source, target, r) {\n  var n = source.width,\n      m = source.height,\n      w = (r << 1) + 1;\n  for (var i = 0; i < n; ++i) {\n    for (var j = 0, sr = 0; j < m + r; ++j) {\n      if (j < m) {\n        sr += source.data[i + j * n];\n      }\n      if (j >= r) {\n        if (j >= w) {\n          sr -= source.data[i + (j - w) * n];\n        }\n        target.data[i + (j - r) * n] = sr / Math.min(j + 1, m - 1 + w - j, w);\n      }\n    }\n  }\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-contour/src/constant.js\":\n/*!***********************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-contour/src/constant.js ***!\n  \\***********************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(x) {\n  return function() {\n    return x;\n  };\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-contour/src/contains.js\":\n/*!***********************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-contour/src/contains.js ***!\n  \\***********************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(ring, hole) {\n  var i = -1, n = hole.length, c;\n  while (++i < n) if (c = ringContains(ring, hole[i])) return c;\n  return 0;\n});\n\nfunction ringContains(ring, point) {\n  var x = point[0], y = point[1], contains = -1;\n  for (var i = 0, n = ring.length, j = n - 1; i < n; j = i++) {\n    var pi = ring[i], xi = pi[0], yi = pi[1], pj = ring[j], xj = pj[0], yj = pj[1];\n    if (segmentContains(pi, pj, point)) return 0;\n    if (((yi > y) !== (yj > y)) && ((x < (xj - xi) * (y - yi) / (yj - yi) + xi))) contains = -contains;\n  }\n  return contains;\n}\n\nfunction segmentContains(a, b, c) {\n  var i; return collinear(a, b, c) && within(a[i = +(a[0] === b[0])], c[i], b[i]);\n}\n\nfunction collinear(a, b, c) {\n  return (b[0] - a[0]) * (c[1] - a[1]) === (c[0] - a[0]) * (b[1] - a[1]);\n}\n\nfunction within(p, q, r) {\n  return p <= q && q <= r || r <= q && q <= p;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-contour/src/contours.js\":\n/*!***********************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-contour/src/contours.js ***!\n  \\***********************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var d3_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-array */ \"./node_modules/d3-array/src/index.js\");\n/* harmony import */ var _array__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./array */ \"./node_modules/dagre-d3/node_modules/d3-contour/src/array.js\");\n/* harmony import */ var _ascending__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./ascending */ \"./node_modules/dagre-d3/node_modules/d3-contour/src/ascending.js\");\n/* harmony import */ var _area__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./area */ \"./node_modules/dagre-d3/node_modules/d3-contour/src/area.js\");\n/* harmony import */ var _constant__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./constant */ \"./node_modules/dagre-d3/node_modules/d3-contour/src/constant.js\");\n/* harmony import */ var _contains__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./contains */ \"./node_modules/dagre-d3/node_modules/d3-contour/src/contains.js\");\n/* harmony import */ var _noop__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./noop */ \"./node_modules/dagre-d3/node_modules/d3-contour/src/noop.js\");\n\n\n\n\n\n\n\n\nvar cases = [\n  [],\n  [[[1.0, 1.5], [0.5, 1.0]]],\n  [[[1.5, 1.0], [1.0, 1.5]]],\n  [[[1.5, 1.0], [0.5, 1.0]]],\n  [[[1.0, 0.5], [1.5, 1.0]]],\n  [[[1.0, 1.5], [0.5, 1.0]], [[1.0, 0.5], [1.5, 1.0]]],\n  [[[1.0, 0.5], [1.0, 1.5]]],\n  [[[1.0, 0.5], [0.5, 1.0]]],\n  [[[0.5, 1.0], [1.0, 0.5]]],\n  [[[1.0, 1.5], [1.0, 0.5]]],\n  [[[0.5, 1.0], [1.0, 0.5]], [[1.5, 1.0], [1.0, 1.5]]],\n  [[[1.5, 1.0], [1.0, 0.5]]],\n  [[[0.5, 1.0], [1.5, 1.0]]],\n  [[[1.0, 1.5], [1.5, 1.0]]],\n  [[[0.5, 1.0], [1.0, 1.5]]],\n  []\n];\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  var dx = 1,\n      dy = 1,\n      threshold = d3_array__WEBPACK_IMPORTED_MODULE_0__[\"thresholdSturges\"],\n      smooth = smoothLinear;\n\n  function contours(values) {\n    var tz = threshold(values);\n\n    // Convert number of thresholds into uniform thresholds.\n    if (!Array.isArray(tz)) {\n      var domain = Object(d3_array__WEBPACK_IMPORTED_MODULE_0__[\"extent\"])(values), start = domain[0], stop = domain[1];\n      tz = Object(d3_array__WEBPACK_IMPORTED_MODULE_0__[\"tickStep\"])(start, stop, tz);\n      tz = Object(d3_array__WEBPACK_IMPORTED_MODULE_0__[\"range\"])(Math.floor(start / tz) * tz, Math.floor(stop / tz) * tz, tz);\n    } else {\n      tz = tz.slice().sort(_ascending__WEBPACK_IMPORTED_MODULE_2__[\"default\"]);\n    }\n\n    return tz.map(function(value) {\n      return contour(values, value);\n    });\n  }\n\n  // Accumulate, smooth contour rings, assign holes to exterior rings.\n  // Based on https://github.com/mbostock/shapefile/blob/v0.6.2/shp/polygon.js\n  function contour(values, value) {\n    var polygons = [],\n        holes = [];\n\n    isorings(values, value, function(ring) {\n      smooth(ring, values, value);\n      if (Object(_area__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(ring) > 0) polygons.push([ring]);\n      else holes.push(ring);\n    });\n\n    holes.forEach(function(hole) {\n      for (var i = 0, n = polygons.length, polygon; i < n; ++i) {\n        if (Object(_contains__WEBPACK_IMPORTED_MODULE_5__[\"default\"])((polygon = polygons[i])[0], hole) !== -1) {\n          polygon.push(hole);\n          return;\n        }\n      }\n    });\n\n    return {\n      type: \"MultiPolygon\",\n      value: value,\n      coordinates: polygons\n    };\n  }\n\n  // Marching squares with isolines stitched into rings.\n  // Based on https://github.com/topojson/topojson-client/blob/v3.0.0/src/stitch.js\n  function isorings(values, value, callback) {\n    var fragmentByStart = new Array,\n        fragmentByEnd = new Array,\n        x, y, t0, t1, t2, t3;\n\n    // Special case for the first row (y = -1, t2 = t3 = 0).\n    x = y = -1;\n    t1 = values[0] >= value;\n    cases[t1 << 1].forEach(stitch);\n    while (++x < dx - 1) {\n      t0 = t1, t1 = values[x + 1] >= value;\n      cases[t0 | t1 << 1].forEach(stitch);\n    }\n    cases[t1 << 0].forEach(stitch);\n\n    // General case for the intermediate rows.\n    while (++y < dy - 1) {\n      x = -1;\n      t1 = values[y * dx + dx] >= value;\n      t2 = values[y * dx] >= value;\n      cases[t1 << 1 | t2 << 2].forEach(stitch);\n      while (++x < dx - 1) {\n        t0 = t1, t1 = values[y * dx + dx + x + 1] >= value;\n        t3 = t2, t2 = values[y * dx + x + 1] >= value;\n        cases[t0 | t1 << 1 | t2 << 2 | t3 << 3].forEach(stitch);\n      }\n      cases[t1 | t2 << 3].forEach(stitch);\n    }\n\n    // Special case for the last row (y = dy - 1, t0 = t1 = 0).\n    x = -1;\n    t2 = values[y * dx] >= value;\n    cases[t2 << 2].forEach(stitch);\n    while (++x < dx - 1) {\n      t3 = t2, t2 = values[y * dx + x + 1] >= value;\n      cases[t2 << 2 | t3 << 3].forEach(stitch);\n    }\n    cases[t2 << 3].forEach(stitch);\n\n    function stitch(line) {\n      var start = [line[0][0] + x, line[0][1] + y],\n          end = [line[1][0] + x, line[1][1] + y],\n          startIndex = index(start),\n          endIndex = index(end),\n          f, g;\n      if (f = fragmentByEnd[startIndex]) {\n        if (g = fragmentByStart[endIndex]) {\n          delete fragmentByEnd[f.end];\n          delete fragmentByStart[g.start];\n          if (f === g) {\n            f.ring.push(end);\n            callback(f.ring);\n          } else {\n            fragmentByStart[f.start] = fragmentByEnd[g.end] = {start: f.start, end: g.end, ring: f.ring.concat(g.ring)};\n          }\n        } else {\n          delete fragmentByEnd[f.end];\n          f.ring.push(end);\n          fragmentByEnd[f.end = endIndex] = f;\n        }\n      } else if (f = fragmentByStart[endIndex]) {\n        if (g = fragmentByEnd[startIndex]) {\n          delete fragmentByStart[f.start];\n          delete fragmentByEnd[g.end];\n          if (f === g) {\n            f.ring.push(end);\n            callback(f.ring);\n          } else {\n            fragmentByStart[g.start] = fragmentByEnd[f.end] = {start: g.start, end: f.end, ring: g.ring.concat(f.ring)};\n          }\n        } else {\n          delete fragmentByStart[f.start];\n          f.ring.unshift(start);\n          fragmentByStart[f.start = startIndex] = f;\n        }\n      } else {\n        fragmentByStart[startIndex] = fragmentByEnd[endIndex] = {start: startIndex, end: endIndex, ring: [start, end]};\n      }\n    }\n  }\n\n  function index(point) {\n    return point[0] * 2 + point[1] * (dx + 1) * 4;\n  }\n\n  function smoothLinear(ring, values, value) {\n    ring.forEach(function(point) {\n      var x = point[0],\n          y = point[1],\n          xt = x | 0,\n          yt = y | 0,\n          v0,\n          v1 = values[yt * dx + xt];\n      if (x > 0 && x < dx && xt === x) {\n        v0 = values[yt * dx + xt - 1];\n        point[0] = x + (value - v0) / (v1 - v0) - 0.5;\n      }\n      if (y > 0 && y < dy && yt === y) {\n        v0 = values[(yt - 1) * dx + xt];\n        point[1] = y + (value - v0) / (v1 - v0) - 0.5;\n      }\n    });\n  }\n\n  contours.contour = contour;\n\n  contours.size = function(_) {\n    if (!arguments.length) return [dx, dy];\n    var _0 = Math.ceil(_[0]), _1 = Math.ceil(_[1]);\n    if (!(_0 > 0) || !(_1 > 0)) throw new Error(\"invalid size\");\n    return dx = _0, dy = _1, contours;\n  };\n\n  contours.thresholds = function(_) {\n    return arguments.length ? (threshold = typeof _ === \"function\" ? _ : Array.isArray(_) ? Object(_constant__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(_array__WEBPACK_IMPORTED_MODULE_1__[\"slice\"].call(_)) : Object(_constant__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(_), contours) : threshold;\n  };\n\n  contours.smooth = function(_) {\n    return arguments.length ? (smooth = _ ? smoothLinear : _noop__WEBPACK_IMPORTED_MODULE_6__[\"default\"], contours) : smooth === smoothLinear;\n  };\n\n  return contours;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-contour/src/density.js\":\n/*!**********************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-contour/src/density.js ***!\n  \\**********************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var d3_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-array */ \"./node_modules/d3-array/src/index.js\");\n/* harmony import */ var _array__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./array */ \"./node_modules/dagre-d3/node_modules/d3-contour/src/array.js\");\n/* harmony import */ var _blur__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./blur */ \"./node_modules/dagre-d3/node_modules/d3-contour/src/blur.js\");\n/* harmony import */ var _constant__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./constant */ \"./node_modules/dagre-d3/node_modules/d3-contour/src/constant.js\");\n/* harmony import */ var _contours__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./contours */ \"./node_modules/dagre-d3/node_modules/d3-contour/src/contours.js\");\n\n\n\n\n\n\nfunction defaultX(d) {\n  return d[0];\n}\n\nfunction defaultY(d) {\n  return d[1];\n}\n\nfunction defaultWeight() {\n  return 1;\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  var x = defaultX,\n      y = defaultY,\n      weight = defaultWeight,\n      dx = 960,\n      dy = 500,\n      r = 20, // blur radius\n      k = 2, // log2(grid cell size)\n      o = r * 3, // grid offset, to pad for blur\n      n = (dx + o * 2) >> k, // grid width\n      m = (dy + o * 2) >> k, // grid height\n      threshold = Object(_constant__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(20);\n\n  function density(data) {\n    var values0 = new Float32Array(n * m),\n        values1 = new Float32Array(n * m);\n\n    data.forEach(function(d, i, data) {\n      var xi = (+x(d, i, data) + o) >> k,\n          yi = (+y(d, i, data) + o) >> k,\n          wi = +weight(d, i, data);\n      if (xi >= 0 && xi < n && yi >= 0 && yi < m) {\n        values0[xi + yi * n] += wi;\n      }\n    });\n\n    // TODO Optimize.\n    Object(_blur__WEBPACK_IMPORTED_MODULE_2__[\"blurX\"])({width: n, height: m, data: values0}, {width: n, height: m, data: values1}, r >> k);\n    Object(_blur__WEBPACK_IMPORTED_MODULE_2__[\"blurY\"])({width: n, height: m, data: values1}, {width: n, height: m, data: values0}, r >> k);\n    Object(_blur__WEBPACK_IMPORTED_MODULE_2__[\"blurX\"])({width: n, height: m, data: values0}, {width: n, height: m, data: values1}, r >> k);\n    Object(_blur__WEBPACK_IMPORTED_MODULE_2__[\"blurY\"])({width: n, height: m, data: values1}, {width: n, height: m, data: values0}, r >> k);\n    Object(_blur__WEBPACK_IMPORTED_MODULE_2__[\"blurX\"])({width: n, height: m, data: values0}, {width: n, height: m, data: values1}, r >> k);\n    Object(_blur__WEBPACK_IMPORTED_MODULE_2__[\"blurY\"])({width: n, height: m, data: values1}, {width: n, height: m, data: values0}, r >> k);\n\n    var tz = threshold(values0);\n\n    // Convert number of thresholds into uniform thresholds.\n    if (!Array.isArray(tz)) {\n      var stop = Object(d3_array__WEBPACK_IMPORTED_MODULE_0__[\"max\"])(values0);\n      tz = Object(d3_array__WEBPACK_IMPORTED_MODULE_0__[\"tickStep\"])(0, stop, tz);\n      tz = Object(d3_array__WEBPACK_IMPORTED_MODULE_0__[\"range\"])(0, Math.floor(stop / tz) * tz, tz);\n      tz.shift();\n    }\n\n    return Object(_contours__WEBPACK_IMPORTED_MODULE_4__[\"default\"])()\n        .thresholds(tz)\n        .size([n, m])\n      (values0)\n        .map(transform);\n  }\n\n  function transform(geometry) {\n    geometry.value *= Math.pow(2, -2 * k); // Density in points per square pixel.\n    geometry.coordinates.forEach(transformPolygon);\n    return geometry;\n  }\n\n  function transformPolygon(coordinates) {\n    coordinates.forEach(transformRing);\n  }\n\n  function transformRing(coordinates) {\n    coordinates.forEach(transformPoint);\n  }\n\n  // TODO Optimize.\n  function transformPoint(coordinates) {\n    coordinates[0] = coordinates[0] * Math.pow(2, k) - o;\n    coordinates[1] = coordinates[1] * Math.pow(2, k) - o;\n  }\n\n  function resize() {\n    o = r * 3;\n    n = (dx + o * 2) >> k;\n    m = (dy + o * 2) >> k;\n    return density;\n  }\n\n  density.x = function(_) {\n    return arguments.length ? (x = typeof _ === \"function\" ? _ : Object(_constant__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(+_), density) : x;\n  };\n\n  density.y = function(_) {\n    return arguments.length ? (y = typeof _ === \"function\" ? _ : Object(_constant__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(+_), density) : y;\n  };\n\n  density.weight = function(_) {\n    return arguments.length ? (weight = typeof _ === \"function\" ? _ : Object(_constant__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(+_), density) : weight;\n  };\n\n  density.size = function(_) {\n    if (!arguments.length) return [dx, dy];\n    var _0 = Math.ceil(_[0]), _1 = Math.ceil(_[1]);\n    if (!(_0 >= 0) && !(_0 >= 0)) throw new Error(\"invalid size\");\n    return dx = _0, dy = _1, resize();\n  };\n\n  density.cellSize = function(_) {\n    if (!arguments.length) return 1 << k;\n    if (!((_ = +_) >= 1)) throw new Error(\"invalid cell size\");\n    return k = Math.floor(Math.log(_) / Math.LN2), resize();\n  };\n\n  density.thresholds = function(_) {\n    return arguments.length ? (threshold = typeof _ === \"function\" ? _ : Array.isArray(_) ? Object(_constant__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(_array__WEBPACK_IMPORTED_MODULE_1__[\"slice\"].call(_)) : Object(_constant__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(_), density) : threshold;\n  };\n\n  density.bandwidth = function(_) {\n    if (!arguments.length) return Math.sqrt(r * (r + 1));\n    if (!((_ = +_) >= 0)) throw new Error(\"invalid bandwidth\");\n    return r = Math.round((Math.sqrt(4 * _ * _ + 1) - 1) / 2), resize();\n  };\n\n  return density;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-contour/src/index.js\":\n/*!********************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-contour/src/index.js ***!\n  \\********************************************************************/\n/*! exports provided: contours, contourDensity */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _contours__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./contours */ \"./node_modules/dagre-d3/node_modules/d3-contour/src/contours.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"contours\", function() { return _contours__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n/* harmony import */ var _density__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./density */ \"./node_modules/dagre-d3/node_modules/d3-contour/src/density.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"contourDensity\", function() { return _density__WEBPACK_IMPORTED_MODULE_1__[\"default\"]; });\n\n\n\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-contour/src/noop.js\":\n/*!*******************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-contour/src/noop.js ***!\n  \\*******************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {});\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-fetch/src/blob.js\":\n/*!*****************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-fetch/src/blob.js ***!\n  \\*****************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\nfunction responseBlob(response) {\n  if (!response.ok) throw new Error(response.status + \" \" + response.statusText);\n  return response.blob();\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(input, init) {\n  return fetch(input, init).then(responseBlob);\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-fetch/src/buffer.js\":\n/*!*******************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-fetch/src/buffer.js ***!\n  \\*******************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\nfunction responseArrayBuffer(response) {\n  if (!response.ok) throw new Error(response.status + \" \" + response.statusText);\n  return response.arrayBuffer();\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(input, init) {\n  return fetch(input, init).then(responseArrayBuffer);\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-fetch/src/dsv.js\":\n/*!****************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-fetch/src/dsv.js ***!\n  \\****************************************************************/\n/*! exports provided: default, csv, tsv */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return dsv; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"csv\", function() { return csv; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"tsv\", function() { return tsv; });\n/* harmony import */ var d3_dsv__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-dsv */ \"./node_modules/d3-dsv/src/index.js\");\n/* harmony import */ var _text_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./text.js */ \"./node_modules/dagre-d3/node_modules/d3-fetch/src/text.js\");\n\n\n\nfunction dsvParse(parse) {\n  return function(input, init, row) {\n    if (arguments.length === 2 && typeof init === \"function\") row = init, init = undefined;\n    return Object(_text_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(input, init).then(function(response) {\n      return parse(response, row);\n    });\n  };\n}\n\nfunction dsv(delimiter, input, init, row) {\n  if (arguments.length === 3 && typeof init === \"function\") row = init, init = undefined;\n  var format = Object(d3_dsv__WEBPACK_IMPORTED_MODULE_0__[\"dsvFormat\"])(delimiter);\n  return Object(_text_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(input, init).then(function(response) {\n    return format.parse(response, row);\n  });\n}\n\nvar csv = dsvParse(d3_dsv__WEBPACK_IMPORTED_MODULE_0__[\"csvParse\"]);\nvar tsv = dsvParse(d3_dsv__WEBPACK_IMPORTED_MODULE_0__[\"tsvParse\"]);\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-fetch/src/image.js\":\n/*!******************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-fetch/src/image.js ***!\n  \\******************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(input, init) {\n  return new Promise(function(resolve, reject) {\n    var image = new Image;\n    for (var key in init) image[key] = init[key];\n    image.onerror = reject;\n    image.onload = function() { resolve(image); };\n    image.src = input;\n  });\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-fetch/src/index.js\":\n/*!******************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-fetch/src/index.js ***!\n  \\******************************************************************/\n/*! exports provided: blob, buffer, dsv, csv, tsv, image, json, text, xml, html, svg */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _blob_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./blob.js */ \"./node_modules/dagre-d3/node_modules/d3-fetch/src/blob.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"blob\", function() { return _blob_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n/* harmony import */ var _buffer_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./buffer.js */ \"./node_modules/dagre-d3/node_modules/d3-fetch/src/buffer.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"buffer\", function() { return _buffer_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"]; });\n\n/* harmony import */ var _dsv_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./dsv.js */ \"./node_modules/dagre-d3/node_modules/d3-fetch/src/dsv.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"dsv\", function() { return _dsv_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"csv\", function() { return _dsv_js__WEBPACK_IMPORTED_MODULE_2__[\"csv\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"tsv\", function() { return _dsv_js__WEBPACK_IMPORTED_MODULE_2__[\"tsv\"]; });\n\n/* harmony import */ var _image_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./image.js */ \"./node_modules/dagre-d3/node_modules/d3-fetch/src/image.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"image\", function() { return _image_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"]; });\n\n/* harmony import */ var _json_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./json.js */ \"./node_modules/dagre-d3/node_modules/d3-fetch/src/json.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"json\", function() { return _json_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"]; });\n\n/* harmony import */ var _text_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./text.js */ \"./node_modules/dagre-d3/node_modules/d3-fetch/src/text.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"text\", function() { return _text_js__WEBPACK_IMPORTED_MODULE_5__[\"default\"]; });\n\n/* harmony import */ var _xml_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./xml.js */ \"./node_modules/dagre-d3/node_modules/d3-fetch/src/xml.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"xml\", function() { return _xml_js__WEBPACK_IMPORTED_MODULE_6__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"html\", function() { return _xml_js__WEBPACK_IMPORTED_MODULE_6__[\"html\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"svg\", function() { return _xml_js__WEBPACK_IMPORTED_MODULE_6__[\"svg\"]; });\n\n\n\n\n\n\n\n\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-fetch/src/json.js\":\n/*!*****************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-fetch/src/json.js ***!\n  \\*****************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\nfunction responseJson(response) {\n  if (!response.ok) throw new Error(response.status + \" \" + response.statusText);\n  if (response.status === 204 || response.status === 205) return;\n  return response.json();\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(input, init) {\n  return fetch(input, init).then(responseJson);\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-fetch/src/text.js\":\n/*!*****************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-fetch/src/text.js ***!\n  \\*****************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\nfunction responseText(response) {\n  if (!response.ok) throw new Error(response.status + \" \" + response.statusText);\n  return response.text();\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(input, init) {\n  return fetch(input, init).then(responseText);\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-fetch/src/xml.js\":\n/*!****************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-fetch/src/xml.js ***!\n  \\****************************************************************/\n/*! exports provided: default, html, svg */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"html\", function() { return html; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"svg\", function() { return svg; });\n/* harmony import */ var _text_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./text.js */ \"./node_modules/dagre-d3/node_modules/d3-fetch/src/text.js\");\n\n\nfunction parser(type) {\n  return function(input, init)  {\n    return Object(_text_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(input, init).then(function(text) {\n      return (new DOMParser).parseFromString(text, type);\n    });\n  };\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (parser(\"application/xml\"));\n\nvar html = parser(\"text/html\");\n\nvar svg = parser(\"image/svg+xml\");\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-force/src/center.js\":\n/*!*******************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-force/src/center.js ***!\n  \\*******************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(x, y) {\n  var nodes;\n\n  if (x == null) x = 0;\n  if (y == null) y = 0;\n\n  function force() {\n    var i,\n        n = nodes.length,\n        node,\n        sx = 0,\n        sy = 0;\n\n    for (i = 0; i < n; ++i) {\n      node = nodes[i], sx += node.x, sy += node.y;\n    }\n\n    for (sx = sx / n - x, sy = sy / n - y, i = 0; i < n; ++i) {\n      node = nodes[i], node.x -= sx, node.y -= sy;\n    }\n  }\n\n  force.initialize = function(_) {\n    nodes = _;\n  };\n\n  force.x = function(_) {\n    return arguments.length ? (x = +_, force) : x;\n  };\n\n  force.y = function(_) {\n    return arguments.length ? (y = +_, force) : y;\n  };\n\n  return force;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-force/src/collide.js\":\n/*!********************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-force/src/collide.js ***!\n  \\********************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _constant__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./constant */ \"./node_modules/dagre-d3/node_modules/d3-force/src/constant.js\");\n/* harmony import */ var _jiggle__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./jiggle */ \"./node_modules/dagre-d3/node_modules/d3-force/src/jiggle.js\");\n/* harmony import */ var d3_quadtree__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! d3-quadtree */ \"./node_modules/d3-quadtree/src/index.js\");\n\n\n\n\nfunction x(d) {\n  return d.x + d.vx;\n}\n\nfunction y(d) {\n  return d.y + d.vy;\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(radius) {\n  var nodes,\n      radii,\n      strength = 1,\n      iterations = 1;\n\n  if (typeof radius !== \"function\") radius = Object(_constant__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(radius == null ? 1 : +radius);\n\n  function force() {\n    var i, n = nodes.length,\n        tree,\n        node,\n        xi,\n        yi,\n        ri,\n        ri2;\n\n    for (var k = 0; k < iterations; ++k) {\n      tree = Object(d3_quadtree__WEBPACK_IMPORTED_MODULE_2__[\"quadtree\"])(nodes, x, y).visitAfter(prepare);\n      for (i = 0; i < n; ++i) {\n        node = nodes[i];\n        ri = radii[node.index], ri2 = ri * ri;\n        xi = node.x + node.vx;\n        yi = node.y + node.vy;\n        tree.visit(apply);\n      }\n    }\n\n    function apply(quad, x0, y0, x1, y1) {\n      var data = quad.data, rj = quad.r, r = ri + rj;\n      if (data) {\n        if (data.index > node.index) {\n          var x = xi - data.x - data.vx,\n              y = yi - data.y - data.vy,\n              l = x * x + y * y;\n          if (l < r * r) {\n            if (x === 0) x = Object(_jiggle__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(), l += x * x;\n            if (y === 0) y = Object(_jiggle__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(), l += y * y;\n            l = (r - (l = Math.sqrt(l))) / l * strength;\n            node.vx += (x *= l) * (r = (rj *= rj) / (ri2 + rj));\n            node.vy += (y *= l) * r;\n            data.vx -= x * (r = 1 - r);\n            data.vy -= y * r;\n          }\n        }\n        return;\n      }\n      return x0 > xi + r || x1 < xi - r || y0 > yi + r || y1 < yi - r;\n    }\n  }\n\n  function prepare(quad) {\n    if (quad.data) return quad.r = radii[quad.data.index];\n    for (var i = quad.r = 0; i < 4; ++i) {\n      if (quad[i] && quad[i].r > quad.r) {\n        quad.r = quad[i].r;\n      }\n    }\n  }\n\n  function initialize() {\n    if (!nodes) return;\n    var i, n = nodes.length, node;\n    radii = new Array(n);\n    for (i = 0; i < n; ++i) node = nodes[i], radii[node.index] = +radius(node, i, nodes);\n  }\n\n  force.initialize = function(_) {\n    nodes = _;\n    initialize();\n  };\n\n  force.iterations = function(_) {\n    return arguments.length ? (iterations = +_, force) : iterations;\n  };\n\n  force.strength = function(_) {\n    return arguments.length ? (strength = +_, force) : strength;\n  };\n\n  force.radius = function(_) {\n    return arguments.length ? (radius = typeof _ === \"function\" ? _ : Object(_constant__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(+_), initialize(), force) : radius;\n  };\n\n  return force;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-force/src/constant.js\":\n/*!*********************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-force/src/constant.js ***!\n  \\*********************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(x) {\n  return function() {\n    return x;\n  };\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-force/src/index.js\":\n/*!******************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-force/src/index.js ***!\n  \\******************************************************************/\n/*! exports provided: forceCenter, forceCollide, forceLink, forceManyBody, forceRadial, forceSimulation, forceX, forceY */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _center__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./center */ \"./node_modules/dagre-d3/node_modules/d3-force/src/center.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"forceCenter\", function() { return _center__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n/* harmony import */ var _collide__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./collide */ \"./node_modules/dagre-d3/node_modules/d3-force/src/collide.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"forceCollide\", function() { return _collide__WEBPACK_IMPORTED_MODULE_1__[\"default\"]; });\n\n/* harmony import */ var _link__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./link */ \"./node_modules/dagre-d3/node_modules/d3-force/src/link.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"forceLink\", function() { return _link__WEBPACK_IMPORTED_MODULE_2__[\"default\"]; });\n\n/* harmony import */ var _manyBody__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./manyBody */ \"./node_modules/dagre-d3/node_modules/d3-force/src/manyBody.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"forceManyBody\", function() { return _manyBody__WEBPACK_IMPORTED_MODULE_3__[\"default\"]; });\n\n/* harmony import */ var _radial__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./radial */ \"./node_modules/dagre-d3/node_modules/d3-force/src/radial.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"forceRadial\", function() { return _radial__WEBPACK_IMPORTED_MODULE_4__[\"default\"]; });\n\n/* harmony import */ var _simulation__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./simulation */ \"./node_modules/dagre-d3/node_modules/d3-force/src/simulation.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"forceSimulation\", function() { return _simulation__WEBPACK_IMPORTED_MODULE_5__[\"default\"]; });\n\n/* harmony import */ var _x__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./x */ \"./node_modules/dagre-d3/node_modules/d3-force/src/x.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"forceX\", function() { return _x__WEBPACK_IMPORTED_MODULE_6__[\"default\"]; });\n\n/* harmony import */ var _y__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./y */ \"./node_modules/dagre-d3/node_modules/d3-force/src/y.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"forceY\", function() { return _y__WEBPACK_IMPORTED_MODULE_7__[\"default\"]; });\n\n\n\n\n\n\n\n\n\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-force/src/jiggle.js\":\n/*!*******************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-force/src/jiggle.js ***!\n  \\*******************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  return (Math.random() - 0.5) * 1e-6;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-force/src/link.js\":\n/*!*****************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-force/src/link.js ***!\n  \\*****************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _constant__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./constant */ \"./node_modules/dagre-d3/node_modules/d3-force/src/constant.js\");\n/* harmony import */ var _jiggle__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./jiggle */ \"./node_modules/dagre-d3/node_modules/d3-force/src/jiggle.js\");\n/* harmony import */ var d3_collection__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! d3-collection */ \"./node_modules/d3-collection/src/index.js\");\n\n\n\n\nfunction index(d) {\n  return d.index;\n}\n\nfunction find(nodeById, nodeId) {\n  var node = nodeById.get(nodeId);\n  if (!node) throw new Error(\"missing: \" + nodeId);\n  return node;\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(links) {\n  var id = index,\n      strength = defaultStrength,\n      strengths,\n      distance = Object(_constant__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(30),\n      distances,\n      nodes,\n      count,\n      bias,\n      iterations = 1;\n\n  if (links == null) links = [];\n\n  function defaultStrength(link) {\n    return 1 / Math.min(count[link.source.index], count[link.target.index]);\n  }\n\n  function force(alpha) {\n    for (var k = 0, n = links.length; k < iterations; ++k) {\n      for (var i = 0, link, source, target, x, y, l, b; i < n; ++i) {\n        link = links[i], source = link.source, target = link.target;\n        x = target.x + target.vx - source.x - source.vx || Object(_jiggle__WEBPACK_IMPORTED_MODULE_1__[\"default\"])();\n        y = target.y + target.vy - source.y - source.vy || Object(_jiggle__WEBPACK_IMPORTED_MODULE_1__[\"default\"])();\n        l = Math.sqrt(x * x + y * y);\n        l = (l - distances[i]) / l * alpha * strengths[i];\n        x *= l, y *= l;\n        target.vx -= x * (b = bias[i]);\n        target.vy -= y * b;\n        source.vx += x * (b = 1 - b);\n        source.vy += y * b;\n      }\n    }\n  }\n\n  function initialize() {\n    if (!nodes) return;\n\n    var i,\n        n = nodes.length,\n        m = links.length,\n        nodeById = Object(d3_collection__WEBPACK_IMPORTED_MODULE_2__[\"map\"])(nodes, id),\n        link;\n\n    for (i = 0, count = new Array(n); i < m; ++i) {\n      link = links[i], link.index = i;\n      if (typeof link.source !== \"object\") link.source = find(nodeById, link.source);\n      if (typeof link.target !== \"object\") link.target = find(nodeById, link.target);\n      count[link.source.index] = (count[link.source.index] || 0) + 1;\n      count[link.target.index] = (count[link.target.index] || 0) + 1;\n    }\n\n    for (i = 0, bias = new Array(m); i < m; ++i) {\n      link = links[i], bias[i] = count[link.source.index] / (count[link.source.index] + count[link.target.index]);\n    }\n\n    strengths = new Array(m), initializeStrength();\n    distances = new Array(m), initializeDistance();\n  }\n\n  function initializeStrength() {\n    if (!nodes) return;\n\n    for (var i = 0, n = links.length; i < n; ++i) {\n      strengths[i] = +strength(links[i], i, links);\n    }\n  }\n\n  function initializeDistance() {\n    if (!nodes) return;\n\n    for (var i = 0, n = links.length; i < n; ++i) {\n      distances[i] = +distance(links[i], i, links);\n    }\n  }\n\n  force.initialize = function(_) {\n    nodes = _;\n    initialize();\n  };\n\n  force.links = function(_) {\n    return arguments.length ? (links = _, initialize(), force) : links;\n  };\n\n  force.id = function(_) {\n    return arguments.length ? (id = _, force) : id;\n  };\n\n  force.iterations = function(_) {\n    return arguments.length ? (iterations = +_, force) : iterations;\n  };\n\n  force.strength = function(_) {\n    return arguments.length ? (strength = typeof _ === \"function\" ? _ : Object(_constant__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(+_), initializeStrength(), force) : strength;\n  };\n\n  force.distance = function(_) {\n    return arguments.length ? (distance = typeof _ === \"function\" ? _ : Object(_constant__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(+_), initializeDistance(), force) : distance;\n  };\n\n  return force;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-force/src/manyBody.js\":\n/*!*********************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-force/src/manyBody.js ***!\n  \\*********************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _constant__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./constant */ \"./node_modules/dagre-d3/node_modules/d3-force/src/constant.js\");\n/* harmony import */ var _jiggle__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./jiggle */ \"./node_modules/dagre-d3/node_modules/d3-force/src/jiggle.js\");\n/* harmony import */ var d3_quadtree__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! d3-quadtree */ \"./node_modules/d3-quadtree/src/index.js\");\n/* harmony import */ var _simulation__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./simulation */ \"./node_modules/dagre-d3/node_modules/d3-force/src/simulation.js\");\n\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  var nodes,\n      node,\n      alpha,\n      strength = Object(_constant__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(-30),\n      strengths,\n      distanceMin2 = 1,\n      distanceMax2 = Infinity,\n      theta2 = 0.81;\n\n  function force(_) {\n    var i, n = nodes.length, tree = Object(d3_quadtree__WEBPACK_IMPORTED_MODULE_2__[\"quadtree\"])(nodes, _simulation__WEBPACK_IMPORTED_MODULE_3__[\"x\"], _simulation__WEBPACK_IMPORTED_MODULE_3__[\"y\"]).visitAfter(accumulate);\n    for (alpha = _, i = 0; i < n; ++i) node = nodes[i], tree.visit(apply);\n  }\n\n  function initialize() {\n    if (!nodes) return;\n    var i, n = nodes.length, node;\n    strengths = new Array(n);\n    for (i = 0; i < n; ++i) node = nodes[i], strengths[node.index] = +strength(node, i, nodes);\n  }\n\n  function accumulate(quad) {\n    var strength = 0, q, c, weight = 0, x, y, i;\n\n    // For internal nodes, accumulate forces from child quadrants.\n    if (quad.length) {\n      for (x = y = i = 0; i < 4; ++i) {\n        if ((q = quad[i]) && (c = Math.abs(q.value))) {\n          strength += q.value, weight += c, x += c * q.x, y += c * q.y;\n        }\n      }\n      quad.x = x / weight;\n      quad.y = y / weight;\n    }\n\n    // For leaf nodes, accumulate forces from coincident quadrants.\n    else {\n      q = quad;\n      q.x = q.data.x;\n      q.y = q.data.y;\n      do strength += strengths[q.data.index];\n      while (q = q.next);\n    }\n\n    quad.value = strength;\n  }\n\n  function apply(quad, x1, _, x2) {\n    if (!quad.value) return true;\n\n    var x = quad.x - node.x,\n        y = quad.y - node.y,\n        w = x2 - x1,\n        l = x * x + y * y;\n\n    // Apply the Barnes-Hut approximation if possible.\n    // Limit forces for very close nodes; randomize direction if coincident.\n    if (w * w / theta2 < l) {\n      if (l < distanceMax2) {\n        if (x === 0) x = Object(_jiggle__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(), l += x * x;\n        if (y === 0) y = Object(_jiggle__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(), l += y * y;\n        if (l < distanceMin2) l = Math.sqrt(distanceMin2 * l);\n        node.vx += x * quad.value * alpha / l;\n        node.vy += y * quad.value * alpha / l;\n      }\n      return true;\n    }\n\n    // Otherwise, process points directly.\n    else if (quad.length || l >= distanceMax2) return;\n\n    // Limit forces for very close nodes; randomize direction if coincident.\n    if (quad.data !== node || quad.next) {\n      if (x === 0) x = Object(_jiggle__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(), l += x * x;\n      if (y === 0) y = Object(_jiggle__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(), l += y * y;\n      if (l < distanceMin2) l = Math.sqrt(distanceMin2 * l);\n    }\n\n    do if (quad.data !== node) {\n      w = strengths[quad.data.index] * alpha / l;\n      node.vx += x * w;\n      node.vy += y * w;\n    } while (quad = quad.next);\n  }\n\n  force.initialize = function(_) {\n    nodes = _;\n    initialize();\n  };\n\n  force.strength = function(_) {\n    return arguments.length ? (strength = typeof _ === \"function\" ? _ : Object(_constant__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(+_), initialize(), force) : strength;\n  };\n\n  force.distanceMin = function(_) {\n    return arguments.length ? (distanceMin2 = _ * _, force) : Math.sqrt(distanceMin2);\n  };\n\n  force.distanceMax = function(_) {\n    return arguments.length ? (distanceMax2 = _ * _, force) : Math.sqrt(distanceMax2);\n  };\n\n  force.theta = function(_) {\n    return arguments.length ? (theta2 = _ * _, force) : Math.sqrt(theta2);\n  };\n\n  return force;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-force/src/radial.js\":\n/*!*******************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-force/src/radial.js ***!\n  \\*******************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _constant__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./constant */ \"./node_modules/dagre-d3/node_modules/d3-force/src/constant.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(radius, x, y) {\n  var nodes,\n      strength = Object(_constant__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(0.1),\n      strengths,\n      radiuses;\n\n  if (typeof radius !== \"function\") radius = Object(_constant__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(+radius);\n  if (x == null) x = 0;\n  if (y == null) y = 0;\n\n  function force(alpha) {\n    for (var i = 0, n = nodes.length; i < n; ++i) {\n      var node = nodes[i],\n          dx = node.x - x || 1e-6,\n          dy = node.y - y || 1e-6,\n          r = Math.sqrt(dx * dx + dy * dy),\n          k = (radiuses[i] - r) * strengths[i] * alpha / r;\n      node.vx += dx * k;\n      node.vy += dy * k;\n    }\n  }\n\n  function initialize() {\n    if (!nodes) return;\n    var i, n = nodes.length;\n    strengths = new Array(n);\n    radiuses = new Array(n);\n    for (i = 0; i < n; ++i) {\n      radiuses[i] = +radius(nodes[i], i, nodes);\n      strengths[i] = isNaN(radiuses[i]) ? 0 : +strength(nodes[i], i, nodes);\n    }\n  }\n\n  force.initialize = function(_) {\n    nodes = _, initialize();\n  };\n\n  force.strength = function(_) {\n    return arguments.length ? (strength = typeof _ === \"function\" ? _ : Object(_constant__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(+_), initialize(), force) : strength;\n  };\n\n  force.radius = function(_) {\n    return arguments.length ? (radius = typeof _ === \"function\" ? _ : Object(_constant__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(+_), initialize(), force) : radius;\n  };\n\n  force.x = function(_) {\n    return arguments.length ? (x = +_, force) : x;\n  };\n\n  force.y = function(_) {\n    return arguments.length ? (y = +_, force) : y;\n  };\n\n  return force;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-force/src/simulation.js\":\n/*!***********************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-force/src/simulation.js ***!\n  \\***********************************************************************/\n/*! exports provided: x, y, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"x\", function() { return x; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"y\", function() { return y; });\n/* harmony import */ var d3_dispatch__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-dispatch */ \"./node_modules/d3-dispatch/src/index.js\");\n/* harmony import */ var d3_collection__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! d3-collection */ \"./node_modules/d3-collection/src/index.js\");\n/* harmony import */ var d3_timer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! d3-timer */ \"./node_modules/d3-timer/src/index.js\");\n\n\n\n\nfunction x(d) {\n  return d.x;\n}\n\nfunction y(d) {\n  return d.y;\n}\n\nvar initialRadius = 10,\n    initialAngle = Math.PI * (3 - Math.sqrt(5));\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(nodes) {\n  var simulation,\n      alpha = 1,\n      alphaMin = 0.001,\n      alphaDecay = 1 - Math.pow(alphaMin, 1 / 300),\n      alphaTarget = 0,\n      velocityDecay = 0.6,\n      forces = Object(d3_collection__WEBPACK_IMPORTED_MODULE_1__[\"map\"])(),\n      stepper = Object(d3_timer__WEBPACK_IMPORTED_MODULE_2__[\"timer\"])(step),\n      event = Object(d3_dispatch__WEBPACK_IMPORTED_MODULE_0__[\"dispatch\"])(\"tick\", \"end\");\n\n  if (nodes == null) nodes = [];\n\n  function step() {\n    tick();\n    event.call(\"tick\", simulation);\n    if (alpha < alphaMin) {\n      stepper.stop();\n      event.call(\"end\", simulation);\n    }\n  }\n\n  function tick(iterations) {\n    var i, n = nodes.length, node;\n\n    if (iterations === undefined) iterations = 1;\n\n    for (var k = 0; k < iterations; ++k) {\n      alpha += (alphaTarget - alpha) * alphaDecay;\n\n      forces.each(function (force) {\n        force(alpha);\n      });\n\n      for (i = 0; i < n; ++i) {\n        node = nodes[i];\n        if (node.fx == null) node.x += node.vx *= velocityDecay;\n        else node.x = node.fx, node.vx = 0;\n        if (node.fy == null) node.y += node.vy *= velocityDecay;\n        else node.y = node.fy, node.vy = 0;\n      }\n    }\n\n    return simulation;\n  }\n\n  function initializeNodes() {\n    for (var i = 0, n = nodes.length, node; i < n; ++i) {\n      node = nodes[i], node.index = i;\n      if (node.fx != null) node.x = node.fx;\n      if (node.fy != null) node.y = node.fy;\n      if (isNaN(node.x) || isNaN(node.y)) {\n        var radius = initialRadius * Math.sqrt(i), angle = i * initialAngle;\n        node.x = radius * Math.cos(angle);\n        node.y = radius * Math.sin(angle);\n      }\n      if (isNaN(node.vx) || isNaN(node.vy)) {\n        node.vx = node.vy = 0;\n      }\n    }\n  }\n\n  function initializeForce(force) {\n    if (force.initialize) force.initialize(nodes);\n    return force;\n  }\n\n  initializeNodes();\n\n  return simulation = {\n    tick: tick,\n\n    restart: function() {\n      return stepper.restart(step), simulation;\n    },\n\n    stop: function() {\n      return stepper.stop(), simulation;\n    },\n\n    nodes: function(_) {\n      return arguments.length ? (nodes = _, initializeNodes(), forces.each(initializeForce), simulation) : nodes;\n    },\n\n    alpha: function(_) {\n      return arguments.length ? (alpha = +_, simulation) : alpha;\n    },\n\n    alphaMin: function(_) {\n      return arguments.length ? (alphaMin = +_, simulation) : alphaMin;\n    },\n\n    alphaDecay: function(_) {\n      return arguments.length ? (alphaDecay = +_, simulation) : +alphaDecay;\n    },\n\n    alphaTarget: function(_) {\n      return arguments.length ? (alphaTarget = +_, simulation) : alphaTarget;\n    },\n\n    velocityDecay: function(_) {\n      return arguments.length ? (velocityDecay = 1 - _, simulation) : 1 - velocityDecay;\n    },\n\n    force: function(name, _) {\n      return arguments.length > 1 ? ((_ == null ? forces.remove(name) : forces.set(name, initializeForce(_))), simulation) : forces.get(name);\n    },\n\n    find: function(x, y, radius) {\n      var i = 0,\n          n = nodes.length,\n          dx,\n          dy,\n          d2,\n          node,\n          closest;\n\n      if (radius == null) radius = Infinity;\n      else radius *= radius;\n\n      for (i = 0; i < n; ++i) {\n        node = nodes[i];\n        dx = x - node.x;\n        dy = y - node.y;\n        d2 = dx * dx + dy * dy;\n        if (d2 < radius) closest = node, radius = d2;\n      }\n\n      return closest;\n    },\n\n    on: function(name, _) {\n      return arguments.length > 1 ? (event.on(name, _), simulation) : event.on(name);\n    }\n  };\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-force/src/x.js\":\n/*!**************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-force/src/x.js ***!\n  \\**************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _constant__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./constant */ \"./node_modules/dagre-d3/node_modules/d3-force/src/constant.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(x) {\n  var strength = Object(_constant__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(0.1),\n      nodes,\n      strengths,\n      xz;\n\n  if (typeof x !== \"function\") x = Object(_constant__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(x == null ? 0 : +x);\n\n  function force(alpha) {\n    for (var i = 0, n = nodes.length, node; i < n; ++i) {\n      node = nodes[i], node.vx += (xz[i] - node.x) * strengths[i] * alpha;\n    }\n  }\n\n  function initialize() {\n    if (!nodes) return;\n    var i, n = nodes.length;\n    strengths = new Array(n);\n    xz = new Array(n);\n    for (i = 0; i < n; ++i) {\n      strengths[i] = isNaN(xz[i] = +x(nodes[i], i, nodes)) ? 0 : +strength(nodes[i], i, nodes);\n    }\n  }\n\n  force.initialize = function(_) {\n    nodes = _;\n    initialize();\n  };\n\n  force.strength = function(_) {\n    return arguments.length ? (strength = typeof _ === \"function\" ? _ : Object(_constant__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(+_), initialize(), force) : strength;\n  };\n\n  force.x = function(_) {\n    return arguments.length ? (x = typeof _ === \"function\" ? _ : Object(_constant__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(+_), initialize(), force) : x;\n  };\n\n  return force;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-force/src/y.js\":\n/*!**************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-force/src/y.js ***!\n  \\**************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _constant__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./constant */ \"./node_modules/dagre-d3/node_modules/d3-force/src/constant.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(y) {\n  var strength = Object(_constant__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(0.1),\n      nodes,\n      strengths,\n      yz;\n\n  if (typeof y !== \"function\") y = Object(_constant__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(y == null ? 0 : +y);\n\n  function force(alpha) {\n    for (var i = 0, n = nodes.length, node; i < n; ++i) {\n      node = nodes[i], node.vy += (yz[i] - node.y) * strengths[i] * alpha;\n    }\n  }\n\n  function initialize() {\n    if (!nodes) return;\n    var i, n = nodes.length;\n    strengths = new Array(n);\n    yz = new Array(n);\n    for (i = 0; i < n; ++i) {\n      strengths[i] = isNaN(yz[i] = +y(nodes[i], i, nodes)) ? 0 : +strength(nodes[i], i, nodes);\n    }\n  }\n\n  force.initialize = function(_) {\n    nodes = _;\n    initialize();\n  };\n\n  force.strength = function(_) {\n    return arguments.length ? (strength = typeof _ === \"function\" ? _ : Object(_constant__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(+_), initialize(), force) : strength;\n  };\n\n  force.y = function(_) {\n    return arguments.length ? (y = typeof _ === \"function\" ? _ : Object(_constant__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(+_), initialize(), force) : y;\n  };\n\n  return force;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-geo/src/adder.js\":\n/*!****************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-geo/src/adder.js ***!\n  \\****************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n// Adds floating point numbers with twice the normal precision.\n// Reference: J. R. Shewchuk, Adaptive Precision Floating-Point Arithmetic and\n// Fast Robust Geometric Predicates, Discrete & Computational Geometry 18(3)\n// 305–363 (1997).\n// Code adapted from GeographicLib by Charles F. F. Karney,\n// http://geographiclib.sourceforge.net/\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  return new Adder;\n});\n\nfunction Adder() {\n  this.reset();\n}\n\nAdder.prototype = {\n  constructor: Adder,\n  reset: function() {\n    this.s = // rounded value\n    this.t = 0; // exact error\n  },\n  add: function(y) {\n    add(temp, y, this.t);\n    add(this, temp.s, this.s);\n    if (this.s) this.t += temp.t;\n    else this.s = temp.t;\n  },\n  valueOf: function() {\n    return this.s;\n  }\n};\n\nvar temp = new Adder;\n\nfunction add(adder, a, b) {\n  var x = adder.s = a + b,\n      bv = x - a,\n      av = x - bv;\n  adder.t = (a - av) + (b - bv);\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-geo/src/area.js\":\n/*!***************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-geo/src/area.js ***!\n  \\***************************************************************/\n/*! exports provided: areaRingSum, areaStream, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"areaRingSum\", function() { return areaRingSum; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"areaStream\", function() { return areaStream; });\n/* harmony import */ var _adder_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./adder.js */ \"./node_modules/dagre-d3/node_modules/d3-geo/src/adder.js\");\n/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./math.js */ \"./node_modules/dagre-d3/node_modules/d3-geo/src/math.js\");\n/* harmony import */ var _noop_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./noop.js */ \"./node_modules/dagre-d3/node_modules/d3-geo/src/noop.js\");\n/* harmony import */ var _stream_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./stream.js */ \"./node_modules/dagre-d3/node_modules/d3-geo/src/stream.js\");\n\n\n\n\n\nvar areaRingSum = Object(_adder_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])();\n\nvar areaSum = Object(_adder_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(),\n    lambda00,\n    phi00,\n    lambda0,\n    cosPhi0,\n    sinPhi0;\n\nvar areaStream = {\n  point: _noop_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"],\n  lineStart: _noop_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"],\n  lineEnd: _noop_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"],\n  polygonStart: function() {\n    areaRingSum.reset();\n    areaStream.lineStart = areaRingStart;\n    areaStream.lineEnd = areaRingEnd;\n  },\n  polygonEnd: function() {\n    var areaRing = +areaRingSum;\n    areaSum.add(areaRing < 0 ? _math_js__WEBPACK_IMPORTED_MODULE_1__[\"tau\"] + areaRing : areaRing);\n    this.lineStart = this.lineEnd = this.point = _noop_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"];\n  },\n  sphere: function() {\n    areaSum.add(_math_js__WEBPACK_IMPORTED_MODULE_1__[\"tau\"]);\n  }\n};\n\nfunction areaRingStart() {\n  areaStream.point = areaPointFirst;\n}\n\nfunction areaRingEnd() {\n  areaPoint(lambda00, phi00);\n}\n\nfunction areaPointFirst(lambda, phi) {\n  areaStream.point = areaPoint;\n  lambda00 = lambda, phi00 = phi;\n  lambda *= _math_js__WEBPACK_IMPORTED_MODULE_1__[\"radians\"], phi *= _math_js__WEBPACK_IMPORTED_MODULE_1__[\"radians\"];\n  lambda0 = lambda, cosPhi0 = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__[\"cos\"])(phi = phi / 2 + _math_js__WEBPACK_IMPORTED_MODULE_1__[\"quarterPi\"]), sinPhi0 = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__[\"sin\"])(phi);\n}\n\nfunction areaPoint(lambda, phi) {\n  lambda *= _math_js__WEBPACK_IMPORTED_MODULE_1__[\"radians\"], phi *= _math_js__WEBPACK_IMPORTED_MODULE_1__[\"radians\"];\n  phi = phi / 2 + _math_js__WEBPACK_IMPORTED_MODULE_1__[\"quarterPi\"]; // half the angular distance from south pole\n\n  // Spherical excess E for a spherical triangle with vertices: south pole,\n  // previous point, current point.  Uses a formula derived from Cagnoli’s\n  // theorem.  See Todhunter, Spherical Trig. (1871), Sec. 103, Eq. (2).\n  var dLambda = lambda - lambda0,\n      sdLambda = dLambda >= 0 ? 1 : -1,\n      adLambda = sdLambda * dLambda,\n      cosPhi = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__[\"cos\"])(phi),\n      sinPhi = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__[\"sin\"])(phi),\n      k = sinPhi0 * sinPhi,\n      u = cosPhi0 * cosPhi + k * Object(_math_js__WEBPACK_IMPORTED_MODULE_1__[\"cos\"])(adLambda),\n      v = k * sdLambda * Object(_math_js__WEBPACK_IMPORTED_MODULE_1__[\"sin\"])(adLambda);\n  areaRingSum.add(Object(_math_js__WEBPACK_IMPORTED_MODULE_1__[\"atan2\"])(v, u));\n\n  // Advance the previous points.\n  lambda0 = lambda, cosPhi0 = cosPhi, sinPhi0 = sinPhi;\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(object) {\n  areaSum.reset();\n  Object(_stream_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(object, areaStream);\n  return areaSum * 2;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-geo/src/bounds.js\":\n/*!*****************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-geo/src/bounds.js ***!\n  \\*****************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _adder_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./adder.js */ \"./node_modules/dagre-d3/node_modules/d3-geo/src/adder.js\");\n/* harmony import */ var _area_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./area.js */ \"./node_modules/dagre-d3/node_modules/d3-geo/src/area.js\");\n/* harmony import */ var _cartesian_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./cartesian.js */ \"./node_modules/dagre-d3/node_modules/d3-geo/src/cartesian.js\");\n/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./math.js */ \"./node_modules/dagre-d3/node_modules/d3-geo/src/math.js\");\n/* harmony import */ var _stream_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./stream.js */ \"./node_modules/dagre-d3/node_modules/d3-geo/src/stream.js\");\n\n\n\n\n\n\nvar lambda0, phi0, lambda1, phi1, // bounds\n    lambda2, // previous lambda-coordinate\n    lambda00, phi00, // first point\n    p0, // previous 3D point\n    deltaSum = Object(_adder_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(),\n    ranges,\n    range;\n\nvar boundsStream = {\n  point: boundsPoint,\n  lineStart: boundsLineStart,\n  lineEnd: boundsLineEnd,\n  polygonStart: function() {\n    boundsStream.point = boundsRingPoint;\n    boundsStream.lineStart = boundsRingStart;\n    boundsStream.lineEnd = boundsRingEnd;\n    deltaSum.reset();\n    _area_js__WEBPACK_IMPORTED_MODULE_1__[\"areaStream\"].polygonStart();\n  },\n  polygonEnd: function() {\n    _area_js__WEBPACK_IMPORTED_MODULE_1__[\"areaStream\"].polygonEnd();\n    boundsStream.point = boundsPoint;\n    boundsStream.lineStart = boundsLineStart;\n    boundsStream.lineEnd = boundsLineEnd;\n    if (_area_js__WEBPACK_IMPORTED_MODULE_1__[\"areaRingSum\"] < 0) lambda0 = -(lambda1 = 180), phi0 = -(phi1 = 90);\n    else if (deltaSum > _math_js__WEBPACK_IMPORTED_MODULE_3__[\"epsilon\"]) phi1 = 90;\n    else if (deltaSum < -_math_js__WEBPACK_IMPORTED_MODULE_3__[\"epsilon\"]) phi0 = -90;\n    range[0] = lambda0, range[1] = lambda1;\n  },\n  sphere: function() {\n    lambda0 = -(lambda1 = 180), phi0 = -(phi1 = 90);\n  }\n};\n\nfunction boundsPoint(lambda, phi) {\n  ranges.push(range = [lambda0 = lambda, lambda1 = lambda]);\n  if (phi < phi0) phi0 = phi;\n  if (phi > phi1) phi1 = phi;\n}\n\nfunction linePoint(lambda, phi) {\n  var p = Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_2__[\"cartesian\"])([lambda * _math_js__WEBPACK_IMPORTED_MODULE_3__[\"radians\"], phi * _math_js__WEBPACK_IMPORTED_MODULE_3__[\"radians\"]]);\n  if (p0) {\n    var normal = Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_2__[\"cartesianCross\"])(p0, p),\n        equatorial = [normal[1], -normal[0], 0],\n        inflection = Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_2__[\"cartesianCross\"])(equatorial, normal);\n    Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_2__[\"cartesianNormalizeInPlace\"])(inflection);\n    inflection = Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_2__[\"spherical\"])(inflection);\n    var delta = lambda - lambda2,\n        sign = delta > 0 ? 1 : -1,\n        lambdai = inflection[0] * _math_js__WEBPACK_IMPORTED_MODULE_3__[\"degrees\"] * sign,\n        phii,\n        antimeridian = Object(_math_js__WEBPACK_IMPORTED_MODULE_3__[\"abs\"])(delta) > 180;\n    if (antimeridian ^ (sign * lambda2 < lambdai && lambdai < sign * lambda)) {\n      phii = inflection[1] * _math_js__WEBPACK_IMPORTED_MODULE_3__[\"degrees\"];\n      if (phii > phi1) phi1 = phii;\n    } else if (lambdai = (lambdai + 360) % 360 - 180, antimeridian ^ (sign * lambda2 < lambdai && lambdai < sign * lambda)) {\n      phii = -inflection[1] * _math_js__WEBPACK_IMPORTED_MODULE_3__[\"degrees\"];\n      if (phii < phi0) phi0 = phii;\n    } else {\n      if (phi < phi0) phi0 = phi;\n      if (phi > phi1) phi1 = phi;\n    }\n    if (antimeridian) {\n      if (lambda < lambda2) {\n        if (angle(lambda0, lambda) > angle(lambda0, lambda1)) lambda1 = lambda;\n      } else {\n        if (angle(lambda, lambda1) > angle(lambda0, lambda1)) lambda0 = lambda;\n      }\n    } else {\n      if (lambda1 >= lambda0) {\n        if (lambda < lambda0) lambda0 = lambda;\n        if (lambda > lambda1) lambda1 = lambda;\n      } else {\n        if (lambda > lambda2) {\n          if (angle(lambda0, lambda) > angle(lambda0, lambda1)) lambda1 = lambda;\n        } else {\n          if (angle(lambda, lambda1) > angle(lambda0, lambda1)) lambda0 = lambda;\n        }\n      }\n    }\n  } else {\n    ranges.push(range = [lambda0 = lambda, lambda1 = lambda]);\n  }\n  if (phi < phi0) phi0 = phi;\n  if (phi > phi1) phi1 = phi;\n  p0 = p, lambda2 = lambda;\n}\n\nfunction boundsLineStart() {\n  boundsStream.point = linePoint;\n}\n\nfunction boundsLineEnd() {\n  range[0] = lambda0, range[1] = lambda1;\n  boundsStream.point = boundsPoint;\n  p0 = null;\n}\n\nfunction boundsRingPoint(lambda, phi) {\n  if (p0) {\n    var delta = lambda - lambda2;\n    deltaSum.add(Object(_math_js__WEBPACK_IMPORTED_MODULE_3__[\"abs\"])(delta) > 180 ? delta + (delta > 0 ? 360 : -360) : delta);\n  } else {\n    lambda00 = lambda, phi00 = phi;\n  }\n  _area_js__WEBPACK_IMPORTED_MODULE_1__[\"areaStream\"].point(lambda, phi);\n  linePoint(lambda, phi);\n}\n\nfunction boundsRingStart() {\n  _area_js__WEBPACK_IMPORTED_MODULE_1__[\"areaStream\"].lineStart();\n}\n\nfunction boundsRingEnd() {\n  boundsRingPoint(lambda00, phi00);\n  _area_js__WEBPACK_IMPORTED_MODULE_1__[\"areaStream\"].lineEnd();\n  if (Object(_math_js__WEBPACK_IMPORTED_MODULE_3__[\"abs\"])(deltaSum) > _math_js__WEBPACK_IMPORTED_MODULE_3__[\"epsilon\"]) lambda0 = -(lambda1 = 180);\n  range[0] = lambda0, range[1] = lambda1;\n  p0 = null;\n}\n\n// Finds the left-right distance between two longitudes.\n// This is almost the same as (lambda1 - lambda0 + 360°) % 360°, except that we want\n// the distance between ±180° to be 360°.\nfunction angle(lambda0, lambda1) {\n  return (lambda1 -= lambda0) < 0 ? lambda1 + 360 : lambda1;\n}\n\nfunction rangeCompare(a, b) {\n  return a[0] - b[0];\n}\n\nfunction rangeContains(range, x) {\n  return range[0] <= range[1] ? range[0] <= x && x <= range[1] : x < range[0] || range[1] < x;\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(feature) {\n  var i, n, a, b, merged, deltaMax, delta;\n\n  phi1 = lambda1 = -(lambda0 = phi0 = Infinity);\n  ranges = [];\n  Object(_stream_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(feature, boundsStream);\n\n  // First, sort ranges by their minimum longitudes.\n  if (n = ranges.length) {\n    ranges.sort(rangeCompare);\n\n    // Then, merge any ranges that overlap.\n    for (i = 1, a = ranges[0], merged = [a]; i < n; ++i) {\n      b = ranges[i];\n      if (rangeContains(a, b[0]) || rangeContains(a, b[1])) {\n        if (angle(a[0], b[1]) > angle(a[0], a[1])) a[1] = b[1];\n        if (angle(b[0], a[1]) > angle(a[0], a[1])) a[0] = b[0];\n      } else {\n        merged.push(a = b);\n      }\n    }\n\n    // Finally, find the largest gap between the merged ranges.\n    // The final bounding box will be the inverse of this gap.\n    for (deltaMax = -Infinity, n = merged.length - 1, i = 0, a = merged[n]; i <= n; a = b, ++i) {\n      b = merged[i];\n      if ((delta = angle(a[1], b[0])) > deltaMax) deltaMax = delta, lambda0 = b[0], lambda1 = a[1];\n    }\n  }\n\n  ranges = range = null;\n\n  return lambda0 === Infinity || phi0 === Infinity\n      ? [[NaN, NaN], [NaN, NaN]]\n      : [[lambda0, phi0], [lambda1, phi1]];\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-geo/src/cartesian.js\":\n/*!********************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-geo/src/cartesian.js ***!\n  \\********************************************************************/\n/*! exports provided: spherical, cartesian, cartesianDot, cartesianCross, cartesianAddInPlace, cartesianScale, cartesianNormalizeInPlace */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"spherical\", function() { return spherical; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"cartesian\", function() { return cartesian; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"cartesianDot\", function() { return cartesianDot; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"cartesianCross\", function() { return cartesianCross; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"cartesianAddInPlace\", function() { return cartesianAddInPlace; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"cartesianScale\", function() { return cartesianScale; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"cartesianNormalizeInPlace\", function() { return cartesianNormalizeInPlace; });\n/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./math.js */ \"./node_modules/dagre-d3/node_modules/d3-geo/src/math.js\");\n\n\nfunction spherical(cartesian) {\n  return [Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"atan2\"])(cartesian[1], cartesian[0]), Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"asin\"])(cartesian[2])];\n}\n\nfunction cartesian(spherical) {\n  var lambda = spherical[0], phi = spherical[1], cosPhi = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"cos\"])(phi);\n  return [cosPhi * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"cos\"])(lambda), cosPhi * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"sin\"])(lambda), Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"sin\"])(phi)];\n}\n\nfunction cartesianDot(a, b) {\n  return a[0] * b[0] + a[1] * b[1] + a[2] * b[2];\n}\n\nfunction cartesianCross(a, b) {\n  return [a[1] * b[2] - a[2] * b[1], a[2] * b[0] - a[0] * b[2], a[0] * b[1] - a[1] * b[0]];\n}\n\n// TODO return a\nfunction cartesianAddInPlace(a, b) {\n  a[0] += b[0], a[1] += b[1], a[2] += b[2];\n}\n\nfunction cartesianScale(vector, k) {\n  return [vector[0] * k, vector[1] * k, vector[2] * k];\n}\n\n// TODO return d\nfunction cartesianNormalizeInPlace(d) {\n  var l = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"sqrt\"])(d[0] * d[0] + d[1] * d[1] + d[2] * d[2]);\n  d[0] /= l, d[1] /= l, d[2] /= l;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-geo/src/centroid.js\":\n/*!*******************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-geo/src/centroid.js ***!\n  \\*******************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./math.js */ \"./node_modules/dagre-d3/node_modules/d3-geo/src/math.js\");\n/* harmony import */ var _noop_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./noop.js */ \"./node_modules/dagre-d3/node_modules/d3-geo/src/noop.js\");\n/* harmony import */ var _stream_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./stream.js */ \"./node_modules/dagre-d3/node_modules/d3-geo/src/stream.js\");\n\n\n\n\nvar W0, W1,\n    X0, Y0, Z0,\n    X1, Y1, Z1,\n    X2, Y2, Z2,\n    lambda00, phi00, // first point\n    x0, y0, z0; // previous point\n\nvar centroidStream = {\n  sphere: _noop_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"],\n  point: centroidPoint,\n  lineStart: centroidLineStart,\n  lineEnd: centroidLineEnd,\n  polygonStart: function() {\n    centroidStream.lineStart = centroidRingStart;\n    centroidStream.lineEnd = centroidRingEnd;\n  },\n  polygonEnd: function() {\n    centroidStream.lineStart = centroidLineStart;\n    centroidStream.lineEnd = centroidLineEnd;\n  }\n};\n\n// Arithmetic mean of Cartesian vectors.\nfunction centroidPoint(lambda, phi) {\n  lambda *= _math_js__WEBPACK_IMPORTED_MODULE_0__[\"radians\"], phi *= _math_js__WEBPACK_IMPORTED_MODULE_0__[\"radians\"];\n  var cosPhi = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"cos\"])(phi);\n  centroidPointCartesian(cosPhi * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"cos\"])(lambda), cosPhi * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"sin\"])(lambda), Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"sin\"])(phi));\n}\n\nfunction centroidPointCartesian(x, y, z) {\n  ++W0;\n  X0 += (x - X0) / W0;\n  Y0 += (y - Y0) / W0;\n  Z0 += (z - Z0) / W0;\n}\n\nfunction centroidLineStart() {\n  centroidStream.point = centroidLinePointFirst;\n}\n\nfunction centroidLinePointFirst(lambda, phi) {\n  lambda *= _math_js__WEBPACK_IMPORTED_MODULE_0__[\"radians\"], phi *= _math_js__WEBPACK_IMPORTED_MODULE_0__[\"radians\"];\n  var cosPhi = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"cos\"])(phi);\n  x0 = cosPhi * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"cos\"])(lambda);\n  y0 = cosPhi * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"sin\"])(lambda);\n  z0 = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"sin\"])(phi);\n  centroidStream.point = centroidLinePoint;\n  centroidPointCartesian(x0, y0, z0);\n}\n\nfunction centroidLinePoint(lambda, phi) {\n  lambda *= _math_js__WEBPACK_IMPORTED_MODULE_0__[\"radians\"], phi *= _math_js__WEBPACK_IMPORTED_MODULE_0__[\"radians\"];\n  var cosPhi = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"cos\"])(phi),\n      x = cosPhi * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"cos\"])(lambda),\n      y = cosPhi * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"sin\"])(lambda),\n      z = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"sin\"])(phi),\n      w = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"atan2\"])(Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"sqrt\"])((w = y0 * z - z0 * y) * w + (w = z0 * x - x0 * z) * w + (w = x0 * y - y0 * x) * w), x0 * x + y0 * y + z0 * z);\n  W1 += w;\n  X1 += w * (x0 + (x0 = x));\n  Y1 += w * (y0 + (y0 = y));\n  Z1 += w * (z0 + (z0 = z));\n  centroidPointCartesian(x0, y0, z0);\n}\n\nfunction centroidLineEnd() {\n  centroidStream.point = centroidPoint;\n}\n\n// See J. E. Brock, The Inertia Tensor for a Spherical Triangle,\n// J. Applied Mechanics 42, 239 (1975).\nfunction centroidRingStart() {\n  centroidStream.point = centroidRingPointFirst;\n}\n\nfunction centroidRingEnd() {\n  centroidRingPoint(lambda00, phi00);\n  centroidStream.point = centroidPoint;\n}\n\nfunction centroidRingPointFirst(lambda, phi) {\n  lambda00 = lambda, phi00 = phi;\n  lambda *= _math_js__WEBPACK_IMPORTED_MODULE_0__[\"radians\"], phi *= _math_js__WEBPACK_IMPORTED_MODULE_0__[\"radians\"];\n  centroidStream.point = centroidRingPoint;\n  var cosPhi = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"cos\"])(phi);\n  x0 = cosPhi * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"cos\"])(lambda);\n  y0 = cosPhi * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"sin\"])(lambda);\n  z0 = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"sin\"])(phi);\n  centroidPointCartesian(x0, y0, z0);\n}\n\nfunction centroidRingPoint(lambda, phi) {\n  lambda *= _math_js__WEBPACK_IMPORTED_MODULE_0__[\"radians\"], phi *= _math_js__WEBPACK_IMPORTED_MODULE_0__[\"radians\"];\n  var cosPhi = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"cos\"])(phi),\n      x = cosPhi * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"cos\"])(lambda),\n      y = cosPhi * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"sin\"])(lambda),\n      z = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"sin\"])(phi),\n      cx = y0 * z - z0 * y,\n      cy = z0 * x - x0 * z,\n      cz = x0 * y - y0 * x,\n      m = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"sqrt\"])(cx * cx + cy * cy + cz * cz),\n      w = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"asin\"])(m), // line weight = angle\n      v = m && -w / m; // area weight multiplier\n  X2 += v * cx;\n  Y2 += v * cy;\n  Z2 += v * cz;\n  W1 += w;\n  X1 += w * (x0 + (x0 = x));\n  Y1 += w * (y0 + (y0 = y));\n  Z1 += w * (z0 + (z0 = z));\n  centroidPointCartesian(x0, y0, z0);\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(object) {\n  W0 = W1 =\n  X0 = Y0 = Z0 =\n  X1 = Y1 = Z1 =\n  X2 = Y2 = Z2 = 0;\n  Object(_stream_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(object, centroidStream);\n\n  var x = X2,\n      y = Y2,\n      z = Z2,\n      m = x * x + y * y + z * z;\n\n  // If the area-weighted ccentroid is undefined, fall back to length-weighted ccentroid.\n  if (m < _math_js__WEBPACK_IMPORTED_MODULE_0__[\"epsilon2\"]) {\n    x = X1, y = Y1, z = Z1;\n    // If the feature has zero length, fall back to arithmetic mean of point vectors.\n    if (W1 < _math_js__WEBPACK_IMPORTED_MODULE_0__[\"epsilon\"]) x = X0, y = Y0, z = Z0;\n    m = x * x + y * y + z * z;\n    // If the feature still has an undefined ccentroid, then return.\n    if (m < _math_js__WEBPACK_IMPORTED_MODULE_0__[\"epsilon2\"]) return [NaN, NaN];\n  }\n\n  return [Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"atan2\"])(y, x) * _math_js__WEBPACK_IMPORTED_MODULE_0__[\"degrees\"], Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"asin\"])(z / Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"sqrt\"])(m)) * _math_js__WEBPACK_IMPORTED_MODULE_0__[\"degrees\"]];\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-geo/src/circle.js\":\n/*!*****************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-geo/src/circle.js ***!\n  \\*****************************************************************/\n/*! exports provided: circleStream, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"circleStream\", function() { return circleStream; });\n/* harmony import */ var _cartesian_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./cartesian.js */ \"./node_modules/dagre-d3/node_modules/d3-geo/src/cartesian.js\");\n/* harmony import */ var _constant_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./constant.js */ \"./node_modules/dagre-d3/node_modules/d3-geo/src/constant.js\");\n/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./math.js */ \"./node_modules/dagre-d3/node_modules/d3-geo/src/math.js\");\n/* harmony import */ var _rotation_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./rotation.js */ \"./node_modules/dagre-d3/node_modules/d3-geo/src/rotation.js\");\n\n\n\n\n\n// Generates a circle centered at [0°, 0°], with a given radius and precision.\nfunction circleStream(stream, radius, delta, direction, t0, t1) {\n  if (!delta) return;\n  var cosRadius = Object(_math_js__WEBPACK_IMPORTED_MODULE_2__[\"cos\"])(radius),\n      sinRadius = Object(_math_js__WEBPACK_IMPORTED_MODULE_2__[\"sin\"])(radius),\n      step = direction * delta;\n  if (t0 == null) {\n    t0 = radius + direction * _math_js__WEBPACK_IMPORTED_MODULE_2__[\"tau\"];\n    t1 = radius - step / 2;\n  } else {\n    t0 = circleRadius(cosRadius, t0);\n    t1 = circleRadius(cosRadius, t1);\n    if (direction > 0 ? t0 < t1 : t0 > t1) t0 += direction * _math_js__WEBPACK_IMPORTED_MODULE_2__[\"tau\"];\n  }\n  for (var point, t = t0; direction > 0 ? t > t1 : t < t1; t -= step) {\n    point = Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_0__[\"spherical\"])([cosRadius, -sinRadius * Object(_math_js__WEBPACK_IMPORTED_MODULE_2__[\"cos\"])(t), -sinRadius * Object(_math_js__WEBPACK_IMPORTED_MODULE_2__[\"sin\"])(t)]);\n    stream.point(point[0], point[1]);\n  }\n}\n\n// Returns the signed angle of a cartesian point relative to [cosRadius, 0, 0].\nfunction circleRadius(cosRadius, point) {\n  point = Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_0__[\"cartesian\"])(point), point[0] -= cosRadius;\n  Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_0__[\"cartesianNormalizeInPlace\"])(point);\n  var radius = Object(_math_js__WEBPACK_IMPORTED_MODULE_2__[\"acos\"])(-point[1]);\n  return ((-point[2] < 0 ? -radius : radius) + _math_js__WEBPACK_IMPORTED_MODULE_2__[\"tau\"] - _math_js__WEBPACK_IMPORTED_MODULE_2__[\"epsilon\"]) % _math_js__WEBPACK_IMPORTED_MODULE_2__[\"tau\"];\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  var center = Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])([0, 0]),\n      radius = Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(90),\n      precision = Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(6),\n      ring,\n      rotate,\n      stream = {point: point};\n\n  function point(x, y) {\n    ring.push(x = rotate(x, y));\n    x[0] *= _math_js__WEBPACK_IMPORTED_MODULE_2__[\"degrees\"], x[1] *= _math_js__WEBPACK_IMPORTED_MODULE_2__[\"degrees\"];\n  }\n\n  function circle() {\n    var c = center.apply(this, arguments),\n        r = radius.apply(this, arguments) * _math_js__WEBPACK_IMPORTED_MODULE_2__[\"radians\"],\n        p = precision.apply(this, arguments) * _math_js__WEBPACK_IMPORTED_MODULE_2__[\"radians\"];\n    ring = [];\n    rotate = Object(_rotation_js__WEBPACK_IMPORTED_MODULE_3__[\"rotateRadians\"])(-c[0] * _math_js__WEBPACK_IMPORTED_MODULE_2__[\"radians\"], -c[1] * _math_js__WEBPACK_IMPORTED_MODULE_2__[\"radians\"], 0).invert;\n    circleStream(stream, r, p, 1);\n    c = {type: \"Polygon\", coordinates: [ring]};\n    ring = rotate = null;\n    return c;\n  }\n\n  circle.center = function(_) {\n    return arguments.length ? (center = typeof _ === \"function\" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])([+_[0], +_[1]]), circle) : center;\n  };\n\n  circle.radius = function(_) {\n    return arguments.length ? (radius = typeof _ === \"function\" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(+_), circle) : radius;\n  };\n\n  circle.precision = function(_) {\n    return arguments.length ? (precision = typeof _ === \"function\" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(+_), circle) : precision;\n  };\n\n  return circle;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-geo/src/clip/antimeridian.js\":\n/*!****************************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-geo/src/clip/antimeridian.js ***!\n  \\****************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./index.js */ \"./node_modules/dagre-d3/node_modules/d3-geo/src/clip/index.js\");\n/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../math.js */ \"./node_modules/dagre-d3/node_modules/d3-geo/src/math.js\");\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_index_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(\n  function() { return true; },\n  clipAntimeridianLine,\n  clipAntimeridianInterpolate,\n  [-_math_js__WEBPACK_IMPORTED_MODULE_1__[\"pi\"], -_math_js__WEBPACK_IMPORTED_MODULE_1__[\"halfPi\"]]\n));\n\n// Takes a line and cuts into visible segments. Return values: 0 - there were\n// intersections or the line was empty; 1 - no intersections; 2 - there were\n// intersections, and the first and last segments should be rejoined.\nfunction clipAntimeridianLine(stream) {\n  var lambda0 = NaN,\n      phi0 = NaN,\n      sign0 = NaN,\n      clean; // no intersections\n\n  return {\n    lineStart: function() {\n      stream.lineStart();\n      clean = 1;\n    },\n    point: function(lambda1, phi1) {\n      var sign1 = lambda1 > 0 ? _math_js__WEBPACK_IMPORTED_MODULE_1__[\"pi\"] : -_math_js__WEBPACK_IMPORTED_MODULE_1__[\"pi\"],\n          delta = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__[\"abs\"])(lambda1 - lambda0);\n      if (Object(_math_js__WEBPACK_IMPORTED_MODULE_1__[\"abs\"])(delta - _math_js__WEBPACK_IMPORTED_MODULE_1__[\"pi\"]) < _math_js__WEBPACK_IMPORTED_MODULE_1__[\"epsilon\"]) { // line crosses a pole\n        stream.point(lambda0, phi0 = (phi0 + phi1) / 2 > 0 ? _math_js__WEBPACK_IMPORTED_MODULE_1__[\"halfPi\"] : -_math_js__WEBPACK_IMPORTED_MODULE_1__[\"halfPi\"]);\n        stream.point(sign0, phi0);\n        stream.lineEnd();\n        stream.lineStart();\n        stream.point(sign1, phi0);\n        stream.point(lambda1, phi0);\n        clean = 0;\n      } else if (sign0 !== sign1 && delta >= _math_js__WEBPACK_IMPORTED_MODULE_1__[\"pi\"]) { // line crosses antimeridian\n        if (Object(_math_js__WEBPACK_IMPORTED_MODULE_1__[\"abs\"])(lambda0 - sign0) < _math_js__WEBPACK_IMPORTED_MODULE_1__[\"epsilon\"]) lambda0 -= sign0 * _math_js__WEBPACK_IMPORTED_MODULE_1__[\"epsilon\"]; // handle degeneracies\n        if (Object(_math_js__WEBPACK_IMPORTED_MODULE_1__[\"abs\"])(lambda1 - sign1) < _math_js__WEBPACK_IMPORTED_MODULE_1__[\"epsilon\"]) lambda1 -= sign1 * _math_js__WEBPACK_IMPORTED_MODULE_1__[\"epsilon\"];\n        phi0 = clipAntimeridianIntersect(lambda0, phi0, lambda1, phi1);\n        stream.point(sign0, phi0);\n        stream.lineEnd();\n        stream.lineStart();\n        stream.point(sign1, phi0);\n        clean = 0;\n      }\n      stream.point(lambda0 = lambda1, phi0 = phi1);\n      sign0 = sign1;\n    },\n    lineEnd: function() {\n      stream.lineEnd();\n      lambda0 = phi0 = NaN;\n    },\n    clean: function() {\n      return 2 - clean; // if intersections, rejoin first and last segments\n    }\n  };\n}\n\nfunction clipAntimeridianIntersect(lambda0, phi0, lambda1, phi1) {\n  var cosPhi0,\n      cosPhi1,\n      sinLambda0Lambda1 = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__[\"sin\"])(lambda0 - lambda1);\n  return Object(_math_js__WEBPACK_IMPORTED_MODULE_1__[\"abs\"])(sinLambda0Lambda1) > _math_js__WEBPACK_IMPORTED_MODULE_1__[\"epsilon\"]\n      ? Object(_math_js__WEBPACK_IMPORTED_MODULE_1__[\"atan\"])((Object(_math_js__WEBPACK_IMPORTED_MODULE_1__[\"sin\"])(phi0) * (cosPhi1 = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__[\"cos\"])(phi1)) * Object(_math_js__WEBPACK_IMPORTED_MODULE_1__[\"sin\"])(lambda1)\n          - Object(_math_js__WEBPACK_IMPORTED_MODULE_1__[\"sin\"])(phi1) * (cosPhi0 = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__[\"cos\"])(phi0)) * Object(_math_js__WEBPACK_IMPORTED_MODULE_1__[\"sin\"])(lambda0))\n          / (cosPhi0 * cosPhi1 * sinLambda0Lambda1))\n      : (phi0 + phi1) / 2;\n}\n\nfunction clipAntimeridianInterpolate(from, to, direction, stream) {\n  var phi;\n  if (from == null) {\n    phi = direction * _math_js__WEBPACK_IMPORTED_MODULE_1__[\"halfPi\"];\n    stream.point(-_math_js__WEBPACK_IMPORTED_MODULE_1__[\"pi\"], phi);\n    stream.point(0, phi);\n    stream.point(_math_js__WEBPACK_IMPORTED_MODULE_1__[\"pi\"], phi);\n    stream.point(_math_js__WEBPACK_IMPORTED_MODULE_1__[\"pi\"], 0);\n    stream.point(_math_js__WEBPACK_IMPORTED_MODULE_1__[\"pi\"], -phi);\n    stream.point(0, -phi);\n    stream.point(-_math_js__WEBPACK_IMPORTED_MODULE_1__[\"pi\"], -phi);\n    stream.point(-_math_js__WEBPACK_IMPORTED_MODULE_1__[\"pi\"], 0);\n    stream.point(-_math_js__WEBPACK_IMPORTED_MODULE_1__[\"pi\"], phi);\n  } else if (Object(_math_js__WEBPACK_IMPORTED_MODULE_1__[\"abs\"])(from[0] - to[0]) > _math_js__WEBPACK_IMPORTED_MODULE_1__[\"epsilon\"]) {\n    var lambda = from[0] < to[0] ? _math_js__WEBPACK_IMPORTED_MODULE_1__[\"pi\"] : -_math_js__WEBPACK_IMPORTED_MODULE_1__[\"pi\"];\n    phi = direction * lambda / 2;\n    stream.point(-lambda, phi);\n    stream.point(0, phi);\n    stream.point(lambda, phi);\n  } else {\n    stream.point(to[0], to[1]);\n  }\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-geo/src/clip/buffer.js\":\n/*!**********************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-geo/src/clip/buffer.js ***!\n  \\**********************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _noop_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../noop.js */ \"./node_modules/dagre-d3/node_modules/d3-geo/src/noop.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  var lines = [],\n      line;\n  return {\n    point: function(x, y, m) {\n      line.push([x, y, m]);\n    },\n    lineStart: function() {\n      lines.push(line = []);\n    },\n    lineEnd: _noop_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"],\n    rejoin: function() {\n      if (lines.length > 1) lines.push(lines.pop().concat(lines.shift()));\n    },\n    result: function() {\n      var result = lines;\n      lines = [];\n      line = null;\n      return result;\n    }\n  };\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-geo/src/clip/circle.js\":\n/*!**********************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-geo/src/clip/circle.js ***!\n  \\**********************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _cartesian_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../cartesian.js */ \"./node_modules/dagre-d3/node_modules/d3-geo/src/cartesian.js\");\n/* harmony import */ var _circle_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../circle.js */ \"./node_modules/dagre-d3/node_modules/d3-geo/src/circle.js\");\n/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../math.js */ \"./node_modules/dagre-d3/node_modules/d3-geo/src/math.js\");\n/* harmony import */ var _pointEqual_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../pointEqual.js */ \"./node_modules/dagre-d3/node_modules/d3-geo/src/pointEqual.js\");\n/* harmony import */ var _index_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./index.js */ \"./node_modules/dagre-d3/node_modules/d3-geo/src/clip/index.js\");\n\n\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(radius) {\n  var cr = Object(_math_js__WEBPACK_IMPORTED_MODULE_2__[\"cos\"])(radius),\n      delta = 6 * _math_js__WEBPACK_IMPORTED_MODULE_2__[\"radians\"],\n      smallRadius = cr > 0,\n      notHemisphere = Object(_math_js__WEBPACK_IMPORTED_MODULE_2__[\"abs\"])(cr) > _math_js__WEBPACK_IMPORTED_MODULE_2__[\"epsilon\"]; // TODO optimise for this common case\n\n  function interpolate(from, to, direction, stream) {\n    Object(_circle_js__WEBPACK_IMPORTED_MODULE_1__[\"circleStream\"])(stream, radius, delta, direction, from, to);\n  }\n\n  function visible(lambda, phi) {\n    return Object(_math_js__WEBPACK_IMPORTED_MODULE_2__[\"cos\"])(lambda) * Object(_math_js__WEBPACK_IMPORTED_MODULE_2__[\"cos\"])(phi) > cr;\n  }\n\n  // Takes a line and cuts into visible segments. Return values used for polygon\n  // clipping: 0 - there were intersections or the line was empty; 1 - no\n  // intersections 2 - there were intersections, and the first and last segments\n  // should be rejoined.\n  function clipLine(stream) {\n    var point0, // previous point\n        c0, // code for previous point\n        v0, // visibility of previous point\n        v00, // visibility of first point\n        clean; // no intersections\n    return {\n      lineStart: function() {\n        v00 = v0 = false;\n        clean = 1;\n      },\n      point: function(lambda, phi) {\n        var point1 = [lambda, phi],\n            point2,\n            v = visible(lambda, phi),\n            c = smallRadius\n              ? v ? 0 : code(lambda, phi)\n              : v ? code(lambda + (lambda < 0 ? _math_js__WEBPACK_IMPORTED_MODULE_2__[\"pi\"] : -_math_js__WEBPACK_IMPORTED_MODULE_2__[\"pi\"]), phi) : 0;\n        if (!point0 && (v00 = v0 = v)) stream.lineStart();\n        if (v !== v0) {\n          point2 = intersect(point0, point1);\n          if (!point2 || Object(_pointEqual_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(point0, point2) || Object(_pointEqual_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(point1, point2))\n            point1[2] = 1;\n        }\n        if (v !== v0) {\n          clean = 0;\n          if (v) {\n            // outside going in\n            stream.lineStart();\n            point2 = intersect(point1, point0);\n            stream.point(point2[0], point2[1]);\n          } else {\n            // inside going out\n            point2 = intersect(point0, point1);\n            stream.point(point2[0], point2[1], 2);\n            stream.lineEnd();\n          }\n          point0 = point2;\n        } else if (notHemisphere && point0 && smallRadius ^ v) {\n          var t;\n          // If the codes for two points are different, or are both zero,\n          // and there this segment intersects with the small circle.\n          if (!(c & c0) && (t = intersect(point1, point0, true))) {\n            clean = 0;\n            if (smallRadius) {\n              stream.lineStart();\n              stream.point(t[0][0], t[0][1]);\n              stream.point(t[1][0], t[1][1]);\n              stream.lineEnd();\n            } else {\n              stream.point(t[1][0], t[1][1]);\n              stream.lineEnd();\n              stream.lineStart();\n              stream.point(t[0][0], t[0][1], 3);\n            }\n          }\n        }\n        if (v && (!point0 || !Object(_pointEqual_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(point0, point1))) {\n          stream.point(point1[0], point1[1]);\n        }\n        point0 = point1, v0 = v, c0 = c;\n      },\n      lineEnd: function() {\n        if (v0) stream.lineEnd();\n        point0 = null;\n      },\n      // Rejoin first and last segments if there were intersections and the first\n      // and last points were visible.\n      clean: function() {\n        return clean | ((v00 && v0) << 1);\n      }\n    };\n  }\n\n  // Intersects the great circle between a and b with the clip circle.\n  function intersect(a, b, two) {\n    var pa = Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_0__[\"cartesian\"])(a),\n        pb = Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_0__[\"cartesian\"])(b);\n\n    // We have two planes, n1.p = d1 and n2.p = d2.\n    // Find intersection line p(t) = c1 n1 + c2 n2 + t (n1 ⨯ n2).\n    var n1 = [1, 0, 0], // normal\n        n2 = Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_0__[\"cartesianCross\"])(pa, pb),\n        n2n2 = Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_0__[\"cartesianDot\"])(n2, n2),\n        n1n2 = n2[0], // cartesianDot(n1, n2),\n        determinant = n2n2 - n1n2 * n1n2;\n\n    // Two polar points.\n    if (!determinant) return !two && a;\n\n    var c1 =  cr * n2n2 / determinant,\n        c2 = -cr * n1n2 / determinant,\n        n1xn2 = Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_0__[\"cartesianCross\"])(n1, n2),\n        A = Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_0__[\"cartesianScale\"])(n1, c1),\n        B = Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_0__[\"cartesianScale\"])(n2, c2);\n    Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_0__[\"cartesianAddInPlace\"])(A, B);\n\n    // Solve |p(t)|^2 = 1.\n    var u = n1xn2,\n        w = Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_0__[\"cartesianDot\"])(A, u),\n        uu = Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_0__[\"cartesianDot\"])(u, u),\n        t2 = w * w - uu * (Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_0__[\"cartesianDot\"])(A, A) - 1);\n\n    if (t2 < 0) return;\n\n    var t = Object(_math_js__WEBPACK_IMPORTED_MODULE_2__[\"sqrt\"])(t2),\n        q = Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_0__[\"cartesianScale\"])(u, (-w - t) / uu);\n    Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_0__[\"cartesianAddInPlace\"])(q, A);\n    q = Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_0__[\"spherical\"])(q);\n\n    if (!two) return q;\n\n    // Two intersection points.\n    var lambda0 = a[0],\n        lambda1 = b[0],\n        phi0 = a[1],\n        phi1 = b[1],\n        z;\n\n    if (lambda1 < lambda0) z = lambda0, lambda0 = lambda1, lambda1 = z;\n\n    var delta = lambda1 - lambda0,\n        polar = Object(_math_js__WEBPACK_IMPORTED_MODULE_2__[\"abs\"])(delta - _math_js__WEBPACK_IMPORTED_MODULE_2__[\"pi\"]) < _math_js__WEBPACK_IMPORTED_MODULE_2__[\"epsilon\"],\n        meridian = polar || delta < _math_js__WEBPACK_IMPORTED_MODULE_2__[\"epsilon\"];\n\n    if (!polar && phi1 < phi0) z = phi0, phi0 = phi1, phi1 = z;\n\n    // Check that the first point is between a and b.\n    if (meridian\n        ? polar\n          ? phi0 + phi1 > 0 ^ q[1] < (Object(_math_js__WEBPACK_IMPORTED_MODULE_2__[\"abs\"])(q[0] - lambda0) < _math_js__WEBPACK_IMPORTED_MODULE_2__[\"epsilon\"] ? phi0 : phi1)\n          : phi0 <= q[1] && q[1] <= phi1\n        : delta > _math_js__WEBPACK_IMPORTED_MODULE_2__[\"pi\"] ^ (lambda0 <= q[0] && q[0] <= lambda1)) {\n      var q1 = Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_0__[\"cartesianScale\"])(u, (-w + t) / uu);\n      Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_0__[\"cartesianAddInPlace\"])(q1, A);\n      return [q, Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_0__[\"spherical\"])(q1)];\n    }\n  }\n\n  // Generates a 4-bit vector representing the location of a point relative to\n  // the small circle's bounding box.\n  function code(lambda, phi) {\n    var r = smallRadius ? radius : _math_js__WEBPACK_IMPORTED_MODULE_2__[\"pi\"] - radius,\n        code = 0;\n    if (lambda < -r) code |= 1; // left\n    else if (lambda > r) code |= 2; // right\n    if (phi < -r) code |= 4; // below\n    else if (phi > r) code |= 8; // above\n    return code;\n  }\n\n  return Object(_index_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(visible, clipLine, interpolate, smallRadius ? [0, -radius] : [-_math_js__WEBPACK_IMPORTED_MODULE_2__[\"pi\"], radius - _math_js__WEBPACK_IMPORTED_MODULE_2__[\"pi\"]]);\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-geo/src/clip/extent.js\":\n/*!**********************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-geo/src/clip/extent.js ***!\n  \\**********************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _rectangle_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./rectangle.js */ \"./node_modules/dagre-d3/node_modules/d3-geo/src/clip/rectangle.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  var x0 = 0,\n      y0 = 0,\n      x1 = 960,\n      y1 = 500,\n      cache,\n      cacheStream,\n      clip;\n\n  return clip = {\n    stream: function(stream) {\n      return cache && cacheStream === stream ? cache : cache = Object(_rectangle_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(x0, y0, x1, y1)(cacheStream = stream);\n    },\n    extent: function(_) {\n      return arguments.length ? (x0 = +_[0][0], y0 = +_[0][1], x1 = +_[1][0], y1 = +_[1][1], cache = cacheStream = null, clip) : [[x0, y0], [x1, y1]];\n    }\n  };\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-geo/src/clip/index.js\":\n/*!*********************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-geo/src/clip/index.js ***!\n  \\*********************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _buffer_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./buffer.js */ \"./node_modules/dagre-d3/node_modules/d3-geo/src/clip/buffer.js\");\n/* harmony import */ var _rejoin_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./rejoin.js */ \"./node_modules/dagre-d3/node_modules/d3-geo/src/clip/rejoin.js\");\n/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../math.js */ \"./node_modules/dagre-d3/node_modules/d3-geo/src/math.js\");\n/* harmony import */ var _polygonContains_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../polygonContains.js */ \"./node_modules/dagre-d3/node_modules/d3-geo/src/polygonContains.js\");\n/* harmony import */ var d3_array__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! d3-array */ \"./node_modules/d3-array/src/index.js\");\n\n\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(pointVisible, clipLine, interpolate, start) {\n  return function(sink) {\n    var line = clipLine(sink),\n        ringBuffer = Object(_buffer_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(),\n        ringSink = clipLine(ringBuffer),\n        polygonStarted = false,\n        polygon,\n        segments,\n        ring;\n\n    var clip = {\n      point: point,\n      lineStart: lineStart,\n      lineEnd: lineEnd,\n      polygonStart: function() {\n        clip.point = pointRing;\n        clip.lineStart = ringStart;\n        clip.lineEnd = ringEnd;\n        segments = [];\n        polygon = [];\n      },\n      polygonEnd: function() {\n        clip.point = point;\n        clip.lineStart = lineStart;\n        clip.lineEnd = lineEnd;\n        segments = Object(d3_array__WEBPACK_IMPORTED_MODULE_4__[\"merge\"])(segments);\n        var startInside = Object(_polygonContains_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(polygon, start);\n        if (segments.length) {\n          if (!polygonStarted) sink.polygonStart(), polygonStarted = true;\n          Object(_rejoin_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(segments, compareIntersection, startInside, interpolate, sink);\n        } else if (startInside) {\n          if (!polygonStarted) sink.polygonStart(), polygonStarted = true;\n          sink.lineStart();\n          interpolate(null, null, 1, sink);\n          sink.lineEnd();\n        }\n        if (polygonStarted) sink.polygonEnd(), polygonStarted = false;\n        segments = polygon = null;\n      },\n      sphere: function() {\n        sink.polygonStart();\n        sink.lineStart();\n        interpolate(null, null, 1, sink);\n        sink.lineEnd();\n        sink.polygonEnd();\n      }\n    };\n\n    function point(lambda, phi) {\n      if (pointVisible(lambda, phi)) sink.point(lambda, phi);\n    }\n\n    function pointLine(lambda, phi) {\n      line.point(lambda, phi);\n    }\n\n    function lineStart() {\n      clip.point = pointLine;\n      line.lineStart();\n    }\n\n    function lineEnd() {\n      clip.point = point;\n      line.lineEnd();\n    }\n\n    function pointRing(lambda, phi) {\n      ring.push([lambda, phi]);\n      ringSink.point(lambda, phi);\n    }\n\n    function ringStart() {\n      ringSink.lineStart();\n      ring = [];\n    }\n\n    function ringEnd() {\n      pointRing(ring[0][0], ring[0][1]);\n      ringSink.lineEnd();\n\n      var clean = ringSink.clean(),\n          ringSegments = ringBuffer.result(),\n          i, n = ringSegments.length, m,\n          segment,\n          point;\n\n      ring.pop();\n      polygon.push(ring);\n      ring = null;\n\n      if (!n) return;\n\n      // No intersections.\n      if (clean & 1) {\n        segment = ringSegments[0];\n        if ((m = segment.length - 1) > 0) {\n          if (!polygonStarted) sink.polygonStart(), polygonStarted = true;\n          sink.lineStart();\n          for (i = 0; i < m; ++i) sink.point((point = segment[i])[0], point[1]);\n          sink.lineEnd();\n        }\n        return;\n      }\n\n      // Rejoin connected segments.\n      // TODO reuse ringBuffer.rejoin()?\n      if (n > 1 && clean & 2) ringSegments.push(ringSegments.pop().concat(ringSegments.shift()));\n\n      segments.push(ringSegments.filter(validSegment));\n    }\n\n    return clip;\n  };\n});\n\nfunction validSegment(segment) {\n  return segment.length > 1;\n}\n\n// Intersections are sorted along the clip edge. For both antimeridian cutting\n// and circle clipping, the same comparison is used.\nfunction compareIntersection(a, b) {\n  return ((a = a.x)[0] < 0 ? a[1] - _math_js__WEBPACK_IMPORTED_MODULE_2__[\"halfPi\"] - _math_js__WEBPACK_IMPORTED_MODULE_2__[\"epsilon\"] : _math_js__WEBPACK_IMPORTED_MODULE_2__[\"halfPi\"] - a[1])\n       - ((b = b.x)[0] < 0 ? b[1] - _math_js__WEBPACK_IMPORTED_MODULE_2__[\"halfPi\"] - _math_js__WEBPACK_IMPORTED_MODULE_2__[\"epsilon\"] : _math_js__WEBPACK_IMPORTED_MODULE_2__[\"halfPi\"] - b[1]);\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-geo/src/clip/line.js\":\n/*!********************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-geo/src/clip/line.js ***!\n  \\********************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(a, b, x0, y0, x1, y1) {\n  var ax = a[0],\n      ay = a[1],\n      bx = b[0],\n      by = b[1],\n      t0 = 0,\n      t1 = 1,\n      dx = bx - ax,\n      dy = by - ay,\n      r;\n\n  r = x0 - ax;\n  if (!dx && r > 0) return;\n  r /= dx;\n  if (dx < 0) {\n    if (r < t0) return;\n    if (r < t1) t1 = r;\n  } else if (dx > 0) {\n    if (r > t1) return;\n    if (r > t0) t0 = r;\n  }\n\n  r = x1 - ax;\n  if (!dx && r < 0) return;\n  r /= dx;\n  if (dx < 0) {\n    if (r > t1) return;\n    if (r > t0) t0 = r;\n  } else if (dx > 0) {\n    if (r < t0) return;\n    if (r < t1) t1 = r;\n  }\n\n  r = y0 - ay;\n  if (!dy && r > 0) return;\n  r /= dy;\n  if (dy < 0) {\n    if (r < t0) return;\n    if (r < t1) t1 = r;\n  } else if (dy > 0) {\n    if (r > t1) return;\n    if (r > t0) t0 = r;\n  }\n\n  r = y1 - ay;\n  if (!dy && r < 0) return;\n  r /= dy;\n  if (dy < 0) {\n    if (r > t1) return;\n    if (r > t0) t0 = r;\n  } else if (dy > 0) {\n    if (r < t0) return;\n    if (r < t1) t1 = r;\n  }\n\n  if (t0 > 0) a[0] = ax + t0 * dx, a[1] = ay + t0 * dy;\n  if (t1 < 1) b[0] = ax + t1 * dx, b[1] = ay + t1 * dy;\n  return true;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-geo/src/clip/rectangle.js\":\n/*!*************************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-geo/src/clip/rectangle.js ***!\n  \\*************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return clipRectangle; });\n/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../math.js */ \"./node_modules/dagre-d3/node_modules/d3-geo/src/math.js\");\n/* harmony import */ var _buffer_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./buffer.js */ \"./node_modules/dagre-d3/node_modules/d3-geo/src/clip/buffer.js\");\n/* harmony import */ var _line_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./line.js */ \"./node_modules/dagre-d3/node_modules/d3-geo/src/clip/line.js\");\n/* harmony import */ var _rejoin_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./rejoin.js */ \"./node_modules/dagre-d3/node_modules/d3-geo/src/clip/rejoin.js\");\n/* harmony import */ var d3_array__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! d3-array */ \"./node_modules/d3-array/src/index.js\");\n\n\n\n\n\n\nvar clipMax = 1e9, clipMin = -clipMax;\n\n// TODO Use d3-polygon’s polygonContains here for the ring check?\n// TODO Eliminate duplicate buffering in clipBuffer and polygon.push?\n\nfunction clipRectangle(x0, y0, x1, y1) {\n\n  function visible(x, y) {\n    return x0 <= x && x <= x1 && y0 <= y && y <= y1;\n  }\n\n  function interpolate(from, to, direction, stream) {\n    var a = 0, a1 = 0;\n    if (from == null\n        || (a = corner(from, direction)) !== (a1 = corner(to, direction))\n        || comparePoint(from, to) < 0 ^ direction > 0) {\n      do stream.point(a === 0 || a === 3 ? x0 : x1, a > 1 ? y1 : y0);\n      while ((a = (a + direction + 4) % 4) !== a1);\n    } else {\n      stream.point(to[0], to[1]);\n    }\n  }\n\n  function corner(p, direction) {\n    return Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"abs\"])(p[0] - x0) < _math_js__WEBPACK_IMPORTED_MODULE_0__[\"epsilon\"] ? direction > 0 ? 0 : 3\n        : Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"abs\"])(p[0] - x1) < _math_js__WEBPACK_IMPORTED_MODULE_0__[\"epsilon\"] ? direction > 0 ? 2 : 1\n        : Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"abs\"])(p[1] - y0) < _math_js__WEBPACK_IMPORTED_MODULE_0__[\"epsilon\"] ? direction > 0 ? 1 : 0\n        : direction > 0 ? 3 : 2; // abs(p[1] - y1) < epsilon\n  }\n\n  function compareIntersection(a, b) {\n    return comparePoint(a.x, b.x);\n  }\n\n  function comparePoint(a, b) {\n    var ca = corner(a, 1),\n        cb = corner(b, 1);\n    return ca !== cb ? ca - cb\n        : ca === 0 ? b[1] - a[1]\n        : ca === 1 ? a[0] - b[0]\n        : ca === 2 ? a[1] - b[1]\n        : b[0] - a[0];\n  }\n\n  return function(stream) {\n    var activeStream = stream,\n        bufferStream = Object(_buffer_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(),\n        segments,\n        polygon,\n        ring,\n        x__, y__, v__, // first point\n        x_, y_, v_, // previous point\n        first,\n        clean;\n\n    var clipStream = {\n      point: point,\n      lineStart: lineStart,\n      lineEnd: lineEnd,\n      polygonStart: polygonStart,\n      polygonEnd: polygonEnd\n    };\n\n    function point(x, y) {\n      if (visible(x, y)) activeStream.point(x, y);\n    }\n\n    function polygonInside() {\n      var winding = 0;\n\n      for (var i = 0, n = polygon.length; i < n; ++i) {\n        for (var ring = polygon[i], j = 1, m = ring.length, point = ring[0], a0, a1, b0 = point[0], b1 = point[1]; j < m; ++j) {\n          a0 = b0, a1 = b1, point = ring[j], b0 = point[0], b1 = point[1];\n          if (a1 <= y1) { if (b1 > y1 && (b0 - a0) * (y1 - a1) > (b1 - a1) * (x0 - a0)) ++winding; }\n          else { if (b1 <= y1 && (b0 - a0) * (y1 - a1) < (b1 - a1) * (x0 - a0)) --winding; }\n        }\n      }\n\n      return winding;\n    }\n\n    // Buffer geometry within a polygon and then clip it en masse.\n    function polygonStart() {\n      activeStream = bufferStream, segments = [], polygon = [], clean = true;\n    }\n\n    function polygonEnd() {\n      var startInside = polygonInside(),\n          cleanInside = clean && startInside,\n          visible = (segments = Object(d3_array__WEBPACK_IMPORTED_MODULE_4__[\"merge\"])(segments)).length;\n      if (cleanInside || visible) {\n        stream.polygonStart();\n        if (cleanInside) {\n          stream.lineStart();\n          interpolate(null, null, 1, stream);\n          stream.lineEnd();\n        }\n        if (visible) {\n          Object(_rejoin_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(segments, compareIntersection, startInside, interpolate, stream);\n        }\n        stream.polygonEnd();\n      }\n      activeStream = stream, segments = polygon = ring = null;\n    }\n\n    function lineStart() {\n      clipStream.point = linePoint;\n      if (polygon) polygon.push(ring = []);\n      first = true;\n      v_ = false;\n      x_ = y_ = NaN;\n    }\n\n    // TODO rather than special-case polygons, simply handle them separately.\n    // Ideally, coincident intersection points should be jittered to avoid\n    // clipping issues.\n    function lineEnd() {\n      if (segments) {\n        linePoint(x__, y__);\n        if (v__ && v_) bufferStream.rejoin();\n        segments.push(bufferStream.result());\n      }\n      clipStream.point = point;\n      if (v_) activeStream.lineEnd();\n    }\n\n    function linePoint(x, y) {\n      var v = visible(x, y);\n      if (polygon) ring.push([x, y]);\n      if (first) {\n        x__ = x, y__ = y, v__ = v;\n        first = false;\n        if (v) {\n          activeStream.lineStart();\n          activeStream.point(x, y);\n        }\n      } else {\n        if (v && v_) activeStream.point(x, y);\n        else {\n          var a = [x_ = Math.max(clipMin, Math.min(clipMax, x_)), y_ = Math.max(clipMin, Math.min(clipMax, y_))],\n              b = [x = Math.max(clipMin, Math.min(clipMax, x)), y = Math.max(clipMin, Math.min(clipMax, y))];\n          if (Object(_line_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(a, b, x0, y0, x1, y1)) {\n            if (!v_) {\n              activeStream.lineStart();\n              activeStream.point(a[0], a[1]);\n            }\n            activeStream.point(b[0], b[1]);\n            if (!v) activeStream.lineEnd();\n            clean = false;\n          } else if (v) {\n            activeStream.lineStart();\n            activeStream.point(x, y);\n            clean = false;\n          }\n        }\n      }\n      x_ = x, y_ = y, v_ = v;\n    }\n\n    return clipStream;\n  };\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-geo/src/clip/rejoin.js\":\n/*!**********************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-geo/src/clip/rejoin.js ***!\n  \\**********************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _pointEqual_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../pointEqual.js */ \"./node_modules/dagre-d3/node_modules/d3-geo/src/pointEqual.js\");\n/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../math.js */ \"./node_modules/dagre-d3/node_modules/d3-geo/src/math.js\");\n\n\n\nfunction Intersection(point, points, other, entry) {\n  this.x = point;\n  this.z = points;\n  this.o = other; // another intersection\n  this.e = entry; // is an entry?\n  this.v = false; // visited\n  this.n = this.p = null; // next & previous\n}\n\n// A generalized polygon clipping algorithm: given a polygon that has been cut\n// into its visible line segments, and rejoins the segments by interpolating\n// along the clip edge.\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(segments, compareIntersection, startInside, interpolate, stream) {\n  var subject = [],\n      clip = [],\n      i,\n      n;\n\n  segments.forEach(function(segment) {\n    if ((n = segment.length - 1) <= 0) return;\n    var n, p0 = segment[0], p1 = segment[n], x;\n\n    if (Object(_pointEqual_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(p0, p1)) {\n      if (!p0[2] && !p1[2]) {\n        stream.lineStart();\n        for (i = 0; i < n; ++i) stream.point((p0 = segment[i])[0], p0[1]);\n        stream.lineEnd();\n        return;\n      }\n      // handle degenerate cases by moving the point\n      p1[0] += 2 * _math_js__WEBPACK_IMPORTED_MODULE_1__[\"epsilon\"];\n    }\n\n    subject.push(x = new Intersection(p0, segment, null, true));\n    clip.push(x.o = new Intersection(p0, null, x, false));\n    subject.push(x = new Intersection(p1, segment, null, false));\n    clip.push(x.o = new Intersection(p1, null, x, true));\n  });\n\n  if (!subject.length) return;\n\n  clip.sort(compareIntersection);\n  link(subject);\n  link(clip);\n\n  for (i = 0, n = clip.length; i < n; ++i) {\n    clip[i].e = startInside = !startInside;\n  }\n\n  var start = subject[0],\n      points,\n      point;\n\n  while (1) {\n    // Find first unvisited intersection.\n    var current = start,\n        isSubject = true;\n    while (current.v) if ((current = current.n) === start) return;\n    points = current.z;\n    stream.lineStart();\n    do {\n      current.v = current.o.v = true;\n      if (current.e) {\n        if (isSubject) {\n          for (i = 0, n = points.length; i < n; ++i) stream.point((point = points[i])[0], point[1]);\n        } else {\n          interpolate(current.x, current.n.x, 1, stream);\n        }\n        current = current.n;\n      } else {\n        if (isSubject) {\n          points = current.p.z;\n          for (i = points.length - 1; i >= 0; --i) stream.point((point = points[i])[0], point[1]);\n        } else {\n          interpolate(current.x, current.p.x, -1, stream);\n        }\n        current = current.p;\n      }\n      current = current.o;\n      points = current.z;\n      isSubject = !isSubject;\n    } while (!current.v);\n    stream.lineEnd();\n  }\n});\n\nfunction link(array) {\n  if (!(n = array.length)) return;\n  var n,\n      i = 0,\n      a = array[0],\n      b;\n  while (++i < n) {\n    a.n = b = array[i];\n    b.p = a;\n    a = b;\n  }\n  a.n = b = array[0];\n  b.p = a;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-geo/src/compose.js\":\n/*!******************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-geo/src/compose.js ***!\n  \\******************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(a, b) {\n\n  function compose(x, y) {\n    return x = a(x, y), b(x[0], x[1]);\n  }\n\n  if (a.invert && b.invert) compose.invert = function(x, y) {\n    return x = b.invert(x, y), x && a.invert(x[0], x[1]);\n  };\n\n  return compose;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-geo/src/constant.js\":\n/*!*******************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-geo/src/constant.js ***!\n  \\*******************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(x) {\n  return function() {\n    return x;\n  };\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-geo/src/contains.js\":\n/*!*******************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-geo/src/contains.js ***!\n  \\*******************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _polygonContains_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./polygonContains.js */ \"./node_modules/dagre-d3/node_modules/d3-geo/src/polygonContains.js\");\n/* harmony import */ var _distance_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./distance.js */ \"./node_modules/dagre-d3/node_modules/d3-geo/src/distance.js\");\n/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./math.js */ \"./node_modules/dagre-d3/node_modules/d3-geo/src/math.js\");\n\n\n\n\nvar containsObjectType = {\n  Feature: function(object, point) {\n    return containsGeometry(object.geometry, point);\n  },\n  FeatureCollection: function(object, point) {\n    var features = object.features, i = -1, n = features.length;\n    while (++i < n) if (containsGeometry(features[i].geometry, point)) return true;\n    return false;\n  }\n};\n\nvar containsGeometryType = {\n  Sphere: function() {\n    return true;\n  },\n  Point: function(object, point) {\n    return containsPoint(object.coordinates, point);\n  },\n  MultiPoint: function(object, point) {\n    var coordinates = object.coordinates, i = -1, n = coordinates.length;\n    while (++i < n) if (containsPoint(coordinates[i], point)) return true;\n    return false;\n  },\n  LineString: function(object, point) {\n    return containsLine(object.coordinates, point);\n  },\n  MultiLineString: function(object, point) {\n    var coordinates = object.coordinates, i = -1, n = coordinates.length;\n    while (++i < n) if (containsLine(coordinates[i], point)) return true;\n    return false;\n  },\n  Polygon: function(object, point) {\n    return containsPolygon(object.coordinates, point);\n  },\n  MultiPolygon: function(object, point) {\n    var coordinates = object.coordinates, i = -1, n = coordinates.length;\n    while (++i < n) if (containsPolygon(coordinates[i], point)) return true;\n    return false;\n  },\n  GeometryCollection: function(object, point) {\n    var geometries = object.geometries, i = -1, n = geometries.length;\n    while (++i < n) if (containsGeometry(geometries[i], point)) return true;\n    return false;\n  }\n};\n\nfunction containsGeometry(geometry, point) {\n  return geometry && containsGeometryType.hasOwnProperty(geometry.type)\n      ? containsGeometryType[geometry.type](geometry, point)\n      : false;\n}\n\nfunction containsPoint(coordinates, point) {\n  return Object(_distance_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(coordinates, point) === 0;\n}\n\nfunction containsLine(coordinates, point) {\n  var ao, bo, ab;\n  for (var i = 0, n = coordinates.length; i < n; i++) {\n    bo = Object(_distance_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(coordinates[i], point);\n    if (bo === 0) return true;\n    if (i > 0) {\n      ab = Object(_distance_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(coordinates[i], coordinates[i - 1]);\n      if (\n        ab > 0 &&\n        ao <= ab &&\n        bo <= ab &&\n        (ao + bo - ab) * (1 - Math.pow((ao - bo) / ab, 2)) < _math_js__WEBPACK_IMPORTED_MODULE_2__[\"epsilon2\"] * ab\n      )\n        return true;\n    }\n    ao = bo;\n  }\n  return false;\n}\n\nfunction containsPolygon(coordinates, point) {\n  return !!Object(_polygonContains_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(coordinates.map(ringRadians), pointRadians(point));\n}\n\nfunction ringRadians(ring) {\n  return ring = ring.map(pointRadians), ring.pop(), ring;\n}\n\nfunction pointRadians(point) {\n  return [point[0] * _math_js__WEBPACK_IMPORTED_MODULE_2__[\"radians\"], point[1] * _math_js__WEBPACK_IMPORTED_MODULE_2__[\"radians\"]];\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(object, point) {\n  return (object && containsObjectType.hasOwnProperty(object.type)\n      ? containsObjectType[object.type]\n      : containsGeometry)(object, point);\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-geo/src/distance.js\":\n/*!*******************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-geo/src/distance.js ***!\n  \\*******************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _length_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./length.js */ \"./node_modules/dagre-d3/node_modules/d3-geo/src/length.js\");\n\n\nvar coordinates = [null, null],\n    object = {type: \"LineString\", coordinates: coordinates};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(a, b) {\n  coordinates[0] = a;\n  coordinates[1] = b;\n  return Object(_length_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(object);\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-geo/src/graticule.js\":\n/*!********************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-geo/src/graticule.js ***!\n  \\********************************************************************/\n/*! exports provided: default, graticule10 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return graticule; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"graticule10\", function() { return graticule10; });\n/* harmony import */ var d3_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-array */ \"./node_modules/d3-array/src/index.js\");\n/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./math.js */ \"./node_modules/dagre-d3/node_modules/d3-geo/src/math.js\");\n\n\n\nfunction graticuleX(y0, y1, dy) {\n  var y = Object(d3_array__WEBPACK_IMPORTED_MODULE_0__[\"range\"])(y0, y1 - _math_js__WEBPACK_IMPORTED_MODULE_1__[\"epsilon\"], dy).concat(y1);\n  return function(x) { return y.map(function(y) { return [x, y]; }); };\n}\n\nfunction graticuleY(x0, x1, dx) {\n  var x = Object(d3_array__WEBPACK_IMPORTED_MODULE_0__[\"range\"])(x0, x1 - _math_js__WEBPACK_IMPORTED_MODULE_1__[\"epsilon\"], dx).concat(x1);\n  return function(y) { return x.map(function(x) { return [x, y]; }); };\n}\n\nfunction graticule() {\n  var x1, x0, X1, X0,\n      y1, y0, Y1, Y0,\n      dx = 10, dy = dx, DX = 90, DY = 360,\n      x, y, X, Y,\n      precision = 2.5;\n\n  function graticule() {\n    return {type: \"MultiLineString\", coordinates: lines()};\n  }\n\n  function lines() {\n    return Object(d3_array__WEBPACK_IMPORTED_MODULE_0__[\"range\"])(Object(_math_js__WEBPACK_IMPORTED_MODULE_1__[\"ceil\"])(X0 / DX) * DX, X1, DX).map(X)\n        .concat(Object(d3_array__WEBPACK_IMPORTED_MODULE_0__[\"range\"])(Object(_math_js__WEBPACK_IMPORTED_MODULE_1__[\"ceil\"])(Y0 / DY) * DY, Y1, DY).map(Y))\n        .concat(Object(d3_array__WEBPACK_IMPORTED_MODULE_0__[\"range\"])(Object(_math_js__WEBPACK_IMPORTED_MODULE_1__[\"ceil\"])(x0 / dx) * dx, x1, dx).filter(function(x) { return Object(_math_js__WEBPACK_IMPORTED_MODULE_1__[\"abs\"])(x % DX) > _math_js__WEBPACK_IMPORTED_MODULE_1__[\"epsilon\"]; }).map(x))\n        .concat(Object(d3_array__WEBPACK_IMPORTED_MODULE_0__[\"range\"])(Object(_math_js__WEBPACK_IMPORTED_MODULE_1__[\"ceil\"])(y0 / dy) * dy, y1, dy).filter(function(y) { return Object(_math_js__WEBPACK_IMPORTED_MODULE_1__[\"abs\"])(y % DY) > _math_js__WEBPACK_IMPORTED_MODULE_1__[\"epsilon\"]; }).map(y));\n  }\n\n  graticule.lines = function() {\n    return lines().map(function(coordinates) { return {type: \"LineString\", coordinates: coordinates}; });\n  };\n\n  graticule.outline = function() {\n    return {\n      type: \"Polygon\",\n      coordinates: [\n        X(X0).concat(\n        Y(Y1).slice(1),\n        X(X1).reverse().slice(1),\n        Y(Y0).reverse().slice(1))\n      ]\n    };\n  };\n\n  graticule.extent = function(_) {\n    if (!arguments.length) return graticule.extentMinor();\n    return graticule.extentMajor(_).extentMinor(_);\n  };\n\n  graticule.extentMajor = function(_) {\n    if (!arguments.length) return [[X0, Y0], [X1, Y1]];\n    X0 = +_[0][0], X1 = +_[1][0];\n    Y0 = +_[0][1], Y1 = +_[1][1];\n    if (X0 > X1) _ = X0, X0 = X1, X1 = _;\n    if (Y0 > Y1) _ = Y0, Y0 = Y1, Y1 = _;\n    return graticule.precision(precision);\n  };\n\n  graticule.extentMinor = function(_) {\n    if (!arguments.length) return [[x0, y0], [x1, y1]];\n    x0 = +_[0][0], x1 = +_[1][0];\n    y0 = +_[0][1], y1 = +_[1][1];\n    if (x0 > x1) _ = x0, x0 = x1, x1 = _;\n    if (y0 > y1) _ = y0, y0 = y1, y1 = _;\n    return graticule.precision(precision);\n  };\n\n  graticule.step = function(_) {\n    if (!arguments.length) return graticule.stepMinor();\n    return graticule.stepMajor(_).stepMinor(_);\n  };\n\n  graticule.stepMajor = function(_) {\n    if (!arguments.length) return [DX, DY];\n    DX = +_[0], DY = +_[1];\n    return graticule;\n  };\n\n  graticule.stepMinor = function(_) {\n    if (!arguments.length) return [dx, dy];\n    dx = +_[0], dy = +_[1];\n    return graticule;\n  };\n\n  graticule.precision = function(_) {\n    if (!arguments.length) return precision;\n    precision = +_;\n    x = graticuleX(y0, y1, 90);\n    y = graticuleY(x0, x1, precision);\n    X = graticuleX(Y0, Y1, 90);\n    Y = graticuleY(X0, X1, precision);\n    return graticule;\n  };\n\n  return graticule\n      .extentMajor([[-180, -90 + _math_js__WEBPACK_IMPORTED_MODULE_1__[\"epsilon\"]], [180, 90 - _math_js__WEBPACK_IMPORTED_MODULE_1__[\"epsilon\"]]])\n      .extentMinor([[-180, -80 - _math_js__WEBPACK_IMPORTED_MODULE_1__[\"epsilon\"]], [180, 80 + _math_js__WEBPACK_IMPORTED_MODULE_1__[\"epsilon\"]]]);\n}\n\nfunction graticule10() {\n  return graticule()();\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-geo/src/identity.js\":\n/*!*******************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-geo/src/identity.js ***!\n  \\*******************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(x) {\n  return x;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-geo/src/index.js\":\n/*!****************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-geo/src/index.js ***!\n  \\****************************************************************/\n/*! exports provided: geoArea, geoBounds, geoCentroid, geoCircle, geoClipAntimeridian, geoClipCircle, geoClipExtent, geoClipRectangle, geoContains, geoDistance, geoGraticule, geoGraticule10, geoInterpolate, geoLength, geoPath, geoAlbers, geoAlbersUsa, geoAzimuthalEqualArea, geoAzimuthalEqualAreaRaw, geoAzimuthalEquidistant, geoAzimuthalEquidistantRaw, geoConicConformal, geoConicConformalRaw, geoConicEqualArea, geoConicEqualAreaRaw, geoConicEquidistant, geoConicEquidistantRaw, geoEqualEarth, geoEqualEarthRaw, geoEquirectangular, geoEquirectangularRaw, geoGnomonic, geoGnomonicRaw, geoIdentity, geoProjection, geoProjectionMutator, geoMercator, geoMercatorRaw, geoNaturalEarth1, geoNaturalEarth1Raw, geoOrthographic, geoOrthographicRaw, geoStereographic, geoStereographicRaw, geoTransverseMercator, geoTransverseMercatorRaw, geoRotation, geoStream, geoTransform */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _area_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./area.js */ \"./node_modules/dagre-d3/node_modules/d3-geo/src/area.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoArea\", function() { return _area_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n/* harmony import */ var _bounds_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./bounds.js */ \"./node_modules/dagre-d3/node_modules/d3-geo/src/bounds.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoBounds\", function() { return _bounds_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"]; });\n\n/* harmony import */ var _centroid_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./centroid.js */ \"./node_modules/dagre-d3/node_modules/d3-geo/src/centroid.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoCentroid\", function() { return _centroid_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"]; });\n\n/* harmony import */ var _circle_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./circle.js */ \"./node_modules/dagre-d3/node_modules/d3-geo/src/circle.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoCircle\", function() { return _circle_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"]; });\n\n/* harmony import */ var _clip_antimeridian_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./clip/antimeridian.js */ \"./node_modules/dagre-d3/node_modules/d3-geo/src/clip/antimeridian.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoClipAntimeridian\", function() { return _clip_antimeridian_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"]; });\n\n/* harmony import */ var _clip_circle_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./clip/circle.js */ \"./node_modules/dagre-d3/node_modules/d3-geo/src/clip/circle.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoClipCircle\", function() { return _clip_circle_js__WEBPACK_IMPORTED_MODULE_5__[\"default\"]; });\n\n/* harmony import */ var _clip_extent_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./clip/extent.js */ \"./node_modules/dagre-d3/node_modules/d3-geo/src/clip/extent.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoClipExtent\", function() { return _clip_extent_js__WEBPACK_IMPORTED_MODULE_6__[\"default\"]; });\n\n/* harmony import */ var _clip_rectangle_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./clip/rectangle.js */ \"./node_modules/dagre-d3/node_modules/d3-geo/src/clip/rectangle.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoClipRectangle\", function() { return _clip_rectangle_js__WEBPACK_IMPORTED_MODULE_7__[\"default\"]; });\n\n/* harmony import */ var _contains_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./contains.js */ \"./node_modules/dagre-d3/node_modules/d3-geo/src/contains.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoContains\", function() { return _contains_js__WEBPACK_IMPORTED_MODULE_8__[\"default\"]; });\n\n/* harmony import */ var _distance_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./distance.js */ \"./node_modules/dagre-d3/node_modules/d3-geo/src/distance.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoDistance\", function() { return _distance_js__WEBPACK_IMPORTED_MODULE_9__[\"default\"]; });\n\n/* harmony import */ var _graticule_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./graticule.js */ \"./node_modules/dagre-d3/node_modules/d3-geo/src/graticule.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoGraticule\", function() { return _graticule_js__WEBPACK_IMPORTED_MODULE_10__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoGraticule10\", function() { return _graticule_js__WEBPACK_IMPORTED_MODULE_10__[\"graticule10\"]; });\n\n/* harmony import */ var _interpolate_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./interpolate.js */ \"./node_modules/dagre-d3/node_modules/d3-geo/src/interpolate.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoInterpolate\", function() { return _interpolate_js__WEBPACK_IMPORTED_MODULE_11__[\"default\"]; });\n\n/* harmony import */ var _length_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./length.js */ \"./node_modules/dagre-d3/node_modules/d3-geo/src/length.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoLength\", function() { return _length_js__WEBPACK_IMPORTED_MODULE_12__[\"default\"]; });\n\n/* harmony import */ var _path_index_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./path/index.js */ \"./node_modules/dagre-d3/node_modules/d3-geo/src/path/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoPath\", function() { return _path_index_js__WEBPACK_IMPORTED_MODULE_13__[\"default\"]; });\n\n/* harmony import */ var _projection_albers_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./projection/albers.js */ \"./node_modules/dagre-d3/node_modules/d3-geo/src/projection/albers.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoAlbers\", function() { return _projection_albers_js__WEBPACK_IMPORTED_MODULE_14__[\"default\"]; });\n\n/* harmony import */ var _projection_albersUsa_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./projection/albersUsa.js */ \"./node_modules/dagre-d3/node_modules/d3-geo/src/projection/albersUsa.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoAlbersUsa\", function() { return _projection_albersUsa_js__WEBPACK_IMPORTED_MODULE_15__[\"default\"]; });\n\n/* harmony import */ var _projection_azimuthalEqualArea_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./projection/azimuthalEqualArea.js */ \"./node_modules/dagre-d3/node_modules/d3-geo/src/projection/azimuthalEqualArea.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoAzimuthalEqualArea\", function() { return _projection_azimuthalEqualArea_js__WEBPACK_IMPORTED_MODULE_16__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoAzimuthalEqualAreaRaw\", function() { return _projection_azimuthalEqualArea_js__WEBPACK_IMPORTED_MODULE_16__[\"azimuthalEqualAreaRaw\"]; });\n\n/* harmony import */ var _projection_azimuthalEquidistant_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./projection/azimuthalEquidistant.js */ \"./node_modules/dagre-d3/node_modules/d3-geo/src/projection/azimuthalEquidistant.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoAzimuthalEquidistant\", function() { return _projection_azimuthalEquidistant_js__WEBPACK_IMPORTED_MODULE_17__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoAzimuthalEquidistantRaw\", function() { return _projection_azimuthalEquidistant_js__WEBPACK_IMPORTED_MODULE_17__[\"azimuthalEquidistantRaw\"]; });\n\n/* harmony import */ var _projection_conicConformal_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./projection/conicConformal.js */ \"./node_modules/dagre-d3/node_modules/d3-geo/src/projection/conicConformal.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoConicConformal\", function() { return _projection_conicConformal_js__WEBPACK_IMPORTED_MODULE_18__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoConicConformalRaw\", function() { return _projection_conicConformal_js__WEBPACK_IMPORTED_MODULE_18__[\"conicConformalRaw\"]; });\n\n/* harmony import */ var _projection_conicEqualArea_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./projection/conicEqualArea.js */ \"./node_modules/dagre-d3/node_modules/d3-geo/src/projection/conicEqualArea.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoConicEqualArea\", function() { return _projection_conicEqualArea_js__WEBPACK_IMPORTED_MODULE_19__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoConicEqualAreaRaw\", function() { return _projection_conicEqualArea_js__WEBPACK_IMPORTED_MODULE_19__[\"conicEqualAreaRaw\"]; });\n\n/* harmony import */ var _projection_conicEquidistant_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./projection/conicEquidistant.js */ \"./node_modules/dagre-d3/node_modules/d3-geo/src/projection/conicEquidistant.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoConicEquidistant\", function() { return _projection_conicEquidistant_js__WEBPACK_IMPORTED_MODULE_20__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoConicEquidistantRaw\", function() { return _projection_conicEquidistant_js__WEBPACK_IMPORTED_MODULE_20__[\"conicEquidistantRaw\"]; });\n\n/* harmony import */ var _projection_equalEarth_js__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./projection/equalEarth.js */ \"./node_modules/dagre-d3/node_modules/d3-geo/src/projection/equalEarth.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoEqualEarth\", function() { return _projection_equalEarth_js__WEBPACK_IMPORTED_MODULE_21__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoEqualEarthRaw\", function() { return _projection_equalEarth_js__WEBPACK_IMPORTED_MODULE_21__[\"equalEarthRaw\"]; });\n\n/* harmony import */ var _projection_equirectangular_js__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./projection/equirectangular.js */ \"./node_modules/dagre-d3/node_modules/d3-geo/src/projection/equirectangular.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoEquirectangular\", function() { return _projection_equirectangular_js__WEBPACK_IMPORTED_MODULE_22__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoEquirectangularRaw\", function() { return _projection_equirectangular_js__WEBPACK_IMPORTED_MODULE_22__[\"equirectangularRaw\"]; });\n\n/* harmony import */ var _projection_gnomonic_js__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./projection/gnomonic.js */ \"./node_modules/dagre-d3/node_modules/d3-geo/src/projection/gnomonic.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoGnomonic\", function() { return _projection_gnomonic_js__WEBPACK_IMPORTED_MODULE_23__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoGnomonicRaw\", function() { return _projection_gnomonic_js__WEBPACK_IMPORTED_MODULE_23__[\"gnomonicRaw\"]; });\n\n/* harmony import */ var _projection_identity_js__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ./projection/identity.js */ \"./node_modules/dagre-d3/node_modules/d3-geo/src/projection/identity.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoIdentity\", function() { return _projection_identity_js__WEBPACK_IMPORTED_MODULE_24__[\"default\"]; });\n\n/* harmony import */ var _projection_index_js__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ./projection/index.js */ \"./node_modules/dagre-d3/node_modules/d3-geo/src/projection/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoProjection\", function() { return _projection_index_js__WEBPACK_IMPORTED_MODULE_25__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoProjectionMutator\", function() { return _projection_index_js__WEBPACK_IMPORTED_MODULE_25__[\"projectionMutator\"]; });\n\n/* harmony import */ var _projection_mercator_js__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ./projection/mercator.js */ \"./node_modules/dagre-d3/node_modules/d3-geo/src/projection/mercator.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoMercator\", function() { return _projection_mercator_js__WEBPACK_IMPORTED_MODULE_26__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoMercatorRaw\", function() { return _projection_mercator_js__WEBPACK_IMPORTED_MODULE_26__[\"mercatorRaw\"]; });\n\n/* harmony import */ var _projection_naturalEarth1_js__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ./projection/naturalEarth1.js */ \"./node_modules/dagre-d3/node_modules/d3-geo/src/projection/naturalEarth1.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoNaturalEarth1\", function() { return _projection_naturalEarth1_js__WEBPACK_IMPORTED_MODULE_27__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoNaturalEarth1Raw\", function() { return _projection_naturalEarth1_js__WEBPACK_IMPORTED_MODULE_27__[\"naturalEarth1Raw\"]; });\n\n/* harmony import */ var _projection_orthographic_js__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ./projection/orthographic.js */ \"./node_modules/dagre-d3/node_modules/d3-geo/src/projection/orthographic.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoOrthographic\", function() { return _projection_orthographic_js__WEBPACK_IMPORTED_MODULE_28__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoOrthographicRaw\", function() { return _projection_orthographic_js__WEBPACK_IMPORTED_MODULE_28__[\"orthographicRaw\"]; });\n\n/* harmony import */ var _projection_stereographic_js__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ./projection/stereographic.js */ \"./node_modules/dagre-d3/node_modules/d3-geo/src/projection/stereographic.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoStereographic\", function() { return _projection_stereographic_js__WEBPACK_IMPORTED_MODULE_29__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoStereographicRaw\", function() { return _projection_stereographic_js__WEBPACK_IMPORTED_MODULE_29__[\"stereographicRaw\"]; });\n\n/* harmony import */ var _projection_transverseMercator_js__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ./projection/transverseMercator.js */ \"./node_modules/dagre-d3/node_modules/d3-geo/src/projection/transverseMercator.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoTransverseMercator\", function() { return _projection_transverseMercator_js__WEBPACK_IMPORTED_MODULE_30__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoTransverseMercatorRaw\", function() { return _projection_transverseMercator_js__WEBPACK_IMPORTED_MODULE_30__[\"transverseMercatorRaw\"]; });\n\n/* harmony import */ var _rotation_js__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ./rotation.js */ \"./node_modules/dagre-d3/node_modules/d3-geo/src/rotation.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoRotation\", function() { return _rotation_js__WEBPACK_IMPORTED_MODULE_31__[\"default\"]; });\n\n/* harmony import */ var _stream_js__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ./stream.js */ \"./node_modules/dagre-d3/node_modules/d3-geo/src/stream.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoStream\", function() { return _stream_js__WEBPACK_IMPORTED_MODULE_32__[\"default\"]; });\n\n/* harmony import */ var _transform_js__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! ./transform.js */ \"./node_modules/dagre-d3/node_modules/d3-geo/src/transform.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoTransform\", function() { return _transform_js__WEBPACK_IMPORTED_MODULE_33__[\"default\"]; });\n\n\n\n\n\n\n\n // DEPRECATED! Use d3.geoIdentity().clipExtent(…).\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-geo/src/interpolate.js\":\n/*!**********************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-geo/src/interpolate.js ***!\n  \\**********************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./math.js */ \"./node_modules/dagre-d3/node_modules/d3-geo/src/math.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(a, b) {\n  var x0 = a[0] * _math_js__WEBPACK_IMPORTED_MODULE_0__[\"radians\"],\n      y0 = a[1] * _math_js__WEBPACK_IMPORTED_MODULE_0__[\"radians\"],\n      x1 = b[0] * _math_js__WEBPACK_IMPORTED_MODULE_0__[\"radians\"],\n      y1 = b[1] * _math_js__WEBPACK_IMPORTED_MODULE_0__[\"radians\"],\n      cy0 = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"cos\"])(y0),\n      sy0 = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"sin\"])(y0),\n      cy1 = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"cos\"])(y1),\n      sy1 = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"sin\"])(y1),\n      kx0 = cy0 * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"cos\"])(x0),\n      ky0 = cy0 * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"sin\"])(x0),\n      kx1 = cy1 * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"cos\"])(x1),\n      ky1 = cy1 * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"sin\"])(x1),\n      d = 2 * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"asin\"])(Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"sqrt\"])(Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"haversin\"])(y1 - y0) + cy0 * cy1 * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"haversin\"])(x1 - x0))),\n      k = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"sin\"])(d);\n\n  var interpolate = d ? function(t) {\n    var B = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"sin\"])(t *= d) / k,\n        A = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"sin\"])(d - t) / k,\n        x = A * kx0 + B * kx1,\n        y = A * ky0 + B * ky1,\n        z = A * sy0 + B * sy1;\n    return [\n      Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"atan2\"])(y, x) * _math_js__WEBPACK_IMPORTED_MODULE_0__[\"degrees\"],\n      Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"atan2\"])(z, Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"sqrt\"])(x * x + y * y)) * _math_js__WEBPACK_IMPORTED_MODULE_0__[\"degrees\"]\n    ];\n  } : function() {\n    return [x0 * _math_js__WEBPACK_IMPORTED_MODULE_0__[\"degrees\"], y0 * _math_js__WEBPACK_IMPORTED_MODULE_0__[\"degrees\"]];\n  };\n\n  interpolate.distance = d;\n\n  return interpolate;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-geo/src/length.js\":\n/*!*****************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-geo/src/length.js ***!\n  \\*****************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _adder_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./adder.js */ \"./node_modules/dagre-d3/node_modules/d3-geo/src/adder.js\");\n/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./math.js */ \"./node_modules/dagre-d3/node_modules/d3-geo/src/math.js\");\n/* harmony import */ var _noop_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./noop.js */ \"./node_modules/dagre-d3/node_modules/d3-geo/src/noop.js\");\n/* harmony import */ var _stream_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./stream.js */ \"./node_modules/dagre-d3/node_modules/d3-geo/src/stream.js\");\n\n\n\n\n\nvar lengthSum = Object(_adder_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(),\n    lambda0,\n    sinPhi0,\n    cosPhi0;\n\nvar lengthStream = {\n  sphere: _noop_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"],\n  point: _noop_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"],\n  lineStart: lengthLineStart,\n  lineEnd: _noop_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"],\n  polygonStart: _noop_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"],\n  polygonEnd: _noop_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"]\n};\n\nfunction lengthLineStart() {\n  lengthStream.point = lengthPointFirst;\n  lengthStream.lineEnd = lengthLineEnd;\n}\n\nfunction lengthLineEnd() {\n  lengthStream.point = lengthStream.lineEnd = _noop_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"];\n}\n\nfunction lengthPointFirst(lambda, phi) {\n  lambda *= _math_js__WEBPACK_IMPORTED_MODULE_1__[\"radians\"], phi *= _math_js__WEBPACK_IMPORTED_MODULE_1__[\"radians\"];\n  lambda0 = lambda, sinPhi0 = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__[\"sin\"])(phi), cosPhi0 = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__[\"cos\"])(phi);\n  lengthStream.point = lengthPoint;\n}\n\nfunction lengthPoint(lambda, phi) {\n  lambda *= _math_js__WEBPACK_IMPORTED_MODULE_1__[\"radians\"], phi *= _math_js__WEBPACK_IMPORTED_MODULE_1__[\"radians\"];\n  var sinPhi = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__[\"sin\"])(phi),\n      cosPhi = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__[\"cos\"])(phi),\n      delta = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__[\"abs\"])(lambda - lambda0),\n      cosDelta = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__[\"cos\"])(delta),\n      sinDelta = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__[\"sin\"])(delta),\n      x = cosPhi * sinDelta,\n      y = cosPhi0 * sinPhi - sinPhi0 * cosPhi * cosDelta,\n      z = sinPhi0 * sinPhi + cosPhi0 * cosPhi * cosDelta;\n  lengthSum.add(Object(_math_js__WEBPACK_IMPORTED_MODULE_1__[\"atan2\"])(Object(_math_js__WEBPACK_IMPORTED_MODULE_1__[\"sqrt\"])(x * x + y * y), z));\n  lambda0 = lambda, sinPhi0 = sinPhi, cosPhi0 = cosPhi;\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(object) {\n  lengthSum.reset();\n  Object(_stream_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(object, lengthStream);\n  return +lengthSum;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-geo/src/math.js\":\n/*!***************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-geo/src/math.js ***!\n  \\***************************************************************/\n/*! exports provided: epsilon, epsilon2, pi, halfPi, quarterPi, tau, degrees, radians, abs, atan, atan2, cos, ceil, exp, floor, log, pow, sin, sign, sqrt, tan, acos, asin, haversin */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"epsilon\", function() { return epsilon; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"epsilon2\", function() { return epsilon2; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"pi\", function() { return pi; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"halfPi\", function() { return halfPi; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"quarterPi\", function() { return quarterPi; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"tau\", function() { return tau; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"degrees\", function() { return degrees; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"radians\", function() { return radians; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"abs\", function() { return abs; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"atan\", function() { return atan; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"atan2\", function() { return atan2; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"cos\", function() { return cos; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"ceil\", function() { return ceil; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"exp\", function() { return exp; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"floor\", function() { return floor; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"log\", function() { return log; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"pow\", function() { return pow; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"sin\", function() { return sin; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"sign\", function() { return sign; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"sqrt\", function() { return sqrt; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"tan\", function() { return tan; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"acos\", function() { return acos; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"asin\", function() { return asin; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"haversin\", function() { return haversin; });\nvar epsilon = 1e-6;\nvar epsilon2 = 1e-12;\nvar pi = Math.PI;\nvar halfPi = pi / 2;\nvar quarterPi = pi / 4;\nvar tau = pi * 2;\n\nvar degrees = 180 / pi;\nvar radians = pi / 180;\n\nvar abs = Math.abs;\nvar atan = Math.atan;\nvar atan2 = Math.atan2;\nvar cos = Math.cos;\nvar ceil = Math.ceil;\nvar exp = Math.exp;\nvar floor = Math.floor;\nvar log = Math.log;\nvar pow = Math.pow;\nvar sin = Math.sin;\nvar sign = Math.sign || function(x) { return x > 0 ? 1 : x < 0 ? -1 : 0; };\nvar sqrt = Math.sqrt;\nvar tan = Math.tan;\n\nfunction acos(x) {\n  return x > 1 ? 0 : x < -1 ? pi : Math.acos(x);\n}\n\nfunction asin(x) {\n  return x > 1 ? halfPi : x < -1 ? -halfPi : Math.asin(x);\n}\n\nfunction haversin(x) {\n  return (x = sin(x / 2)) * x;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-geo/src/noop.js\":\n/*!***************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-geo/src/noop.js ***!\n  \\***************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return noop; });\nfunction noop() {}\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-geo/src/path/area.js\":\n/*!********************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-geo/src/path/area.js ***!\n  \\********************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _adder_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../adder.js */ \"./node_modules/dagre-d3/node_modules/d3-geo/src/adder.js\");\n/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../math.js */ \"./node_modules/dagre-d3/node_modules/d3-geo/src/math.js\");\n/* harmony import */ var _noop_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../noop.js */ \"./node_modules/dagre-d3/node_modules/d3-geo/src/noop.js\");\n\n\n\n\nvar areaSum = Object(_adder_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(),\n    areaRingSum = Object(_adder_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(),\n    x00,\n    y00,\n    x0,\n    y0;\n\nvar areaStream = {\n  point: _noop_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"],\n  lineStart: _noop_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"],\n  lineEnd: _noop_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"],\n  polygonStart: function() {\n    areaStream.lineStart = areaRingStart;\n    areaStream.lineEnd = areaRingEnd;\n  },\n  polygonEnd: function() {\n    areaStream.lineStart = areaStream.lineEnd = areaStream.point = _noop_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"];\n    areaSum.add(Object(_math_js__WEBPACK_IMPORTED_MODULE_1__[\"abs\"])(areaRingSum));\n    areaRingSum.reset();\n  },\n  result: function() {\n    var area = areaSum / 2;\n    areaSum.reset();\n    return area;\n  }\n};\n\nfunction areaRingStart() {\n  areaStream.point = areaPointFirst;\n}\n\nfunction areaPointFirst(x, y) {\n  areaStream.point = areaPoint;\n  x00 = x0 = x, y00 = y0 = y;\n}\n\nfunction areaPoint(x, y) {\n  areaRingSum.add(y0 * x - x0 * y);\n  x0 = x, y0 = y;\n}\n\nfunction areaRingEnd() {\n  areaPoint(x00, y00);\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (areaStream);\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-geo/src/path/bounds.js\":\n/*!**********************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-geo/src/path/bounds.js ***!\n  \\**********************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _noop_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../noop.js */ \"./node_modules/dagre-d3/node_modules/d3-geo/src/noop.js\");\n\n\nvar x0 = Infinity,\n    y0 = x0,\n    x1 = -x0,\n    y1 = x1;\n\nvar boundsStream = {\n  point: boundsPoint,\n  lineStart: _noop_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"],\n  lineEnd: _noop_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"],\n  polygonStart: _noop_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"],\n  polygonEnd: _noop_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"],\n  result: function() {\n    var bounds = [[x0, y0], [x1, y1]];\n    x1 = y1 = -(y0 = x0 = Infinity);\n    return bounds;\n  }\n};\n\nfunction boundsPoint(x, y) {\n  if (x < x0) x0 = x;\n  if (x > x1) x1 = x;\n  if (y < y0) y0 = y;\n  if (y > y1) y1 = y;\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (boundsStream);\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-geo/src/path/centroid.js\":\n/*!************************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-geo/src/path/centroid.js ***!\n  \\************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../math.js */ \"./node_modules/dagre-d3/node_modules/d3-geo/src/math.js\");\n\n\n// TODO Enforce positive area for exterior, negative area for interior?\n\nvar X0 = 0,\n    Y0 = 0,\n    Z0 = 0,\n    X1 = 0,\n    Y1 = 0,\n    Z1 = 0,\n    X2 = 0,\n    Y2 = 0,\n    Z2 = 0,\n    x00,\n    y00,\n    x0,\n    y0;\n\nvar centroidStream = {\n  point: centroidPoint,\n  lineStart: centroidLineStart,\n  lineEnd: centroidLineEnd,\n  polygonStart: function() {\n    centroidStream.lineStart = centroidRingStart;\n    centroidStream.lineEnd = centroidRingEnd;\n  },\n  polygonEnd: function() {\n    centroidStream.point = centroidPoint;\n    centroidStream.lineStart = centroidLineStart;\n    centroidStream.lineEnd = centroidLineEnd;\n  },\n  result: function() {\n    var centroid = Z2 ? [X2 / Z2, Y2 / Z2]\n        : Z1 ? [X1 / Z1, Y1 / Z1]\n        : Z0 ? [X0 / Z0, Y0 / Z0]\n        : [NaN, NaN];\n    X0 = Y0 = Z0 =\n    X1 = Y1 = Z1 =\n    X2 = Y2 = Z2 = 0;\n    return centroid;\n  }\n};\n\nfunction centroidPoint(x, y) {\n  X0 += x;\n  Y0 += y;\n  ++Z0;\n}\n\nfunction centroidLineStart() {\n  centroidStream.point = centroidPointFirstLine;\n}\n\nfunction centroidPointFirstLine(x, y) {\n  centroidStream.point = centroidPointLine;\n  centroidPoint(x0 = x, y0 = y);\n}\n\nfunction centroidPointLine(x, y) {\n  var dx = x - x0, dy = y - y0, z = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"sqrt\"])(dx * dx + dy * dy);\n  X1 += z * (x0 + x) / 2;\n  Y1 += z * (y0 + y) / 2;\n  Z1 += z;\n  centroidPoint(x0 = x, y0 = y);\n}\n\nfunction centroidLineEnd() {\n  centroidStream.point = centroidPoint;\n}\n\nfunction centroidRingStart() {\n  centroidStream.point = centroidPointFirstRing;\n}\n\nfunction centroidRingEnd() {\n  centroidPointRing(x00, y00);\n}\n\nfunction centroidPointFirstRing(x, y) {\n  centroidStream.point = centroidPointRing;\n  centroidPoint(x00 = x0 = x, y00 = y0 = y);\n}\n\nfunction centroidPointRing(x, y) {\n  var dx = x - x0,\n      dy = y - y0,\n      z = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"sqrt\"])(dx * dx + dy * dy);\n\n  X1 += z * (x0 + x) / 2;\n  Y1 += z * (y0 + y) / 2;\n  Z1 += z;\n\n  z = y0 * x - x0 * y;\n  X2 += z * (x0 + x);\n  Y2 += z * (y0 + y);\n  Z2 += z * 3;\n  centroidPoint(x0 = x, y0 = y);\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (centroidStream);\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-geo/src/path/context.js\":\n/*!***********************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-geo/src/path/context.js ***!\n  \\***********************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return PathContext; });\n/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../math.js */ \"./node_modules/dagre-d3/node_modules/d3-geo/src/math.js\");\n/* harmony import */ var _noop_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../noop.js */ \"./node_modules/dagre-d3/node_modules/d3-geo/src/noop.js\");\n\n\n\nfunction PathContext(context) {\n  this._context = context;\n}\n\nPathContext.prototype = {\n  _radius: 4.5,\n  pointRadius: function(_) {\n    return this._radius = _, this;\n  },\n  polygonStart: function() {\n    this._line = 0;\n  },\n  polygonEnd: function() {\n    this._line = NaN;\n  },\n  lineStart: function() {\n    this._point = 0;\n  },\n  lineEnd: function() {\n    if (this._line === 0) this._context.closePath();\n    this._point = NaN;\n  },\n  point: function(x, y) {\n    switch (this._point) {\n      case 0: {\n        this._context.moveTo(x, y);\n        this._point = 1;\n        break;\n      }\n      case 1: {\n        this._context.lineTo(x, y);\n        break;\n      }\n      default: {\n        this._context.moveTo(x + this._radius, y);\n        this._context.arc(x, y, this._radius, 0, _math_js__WEBPACK_IMPORTED_MODULE_0__[\"tau\"]);\n        break;\n      }\n    }\n  },\n  result: _noop_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"]\n};\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-geo/src/path/index.js\":\n/*!*********************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-geo/src/path/index.js ***!\n  \\*********************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _identity_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../identity.js */ \"./node_modules/dagre-d3/node_modules/d3-geo/src/identity.js\");\n/* harmony import */ var _stream_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../stream.js */ \"./node_modules/dagre-d3/node_modules/d3-geo/src/stream.js\");\n/* harmony import */ var _area_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./area.js */ \"./node_modules/dagre-d3/node_modules/d3-geo/src/path/area.js\");\n/* harmony import */ var _bounds_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./bounds.js */ \"./node_modules/dagre-d3/node_modules/d3-geo/src/path/bounds.js\");\n/* harmony import */ var _centroid_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./centroid.js */ \"./node_modules/dagre-d3/node_modules/d3-geo/src/path/centroid.js\");\n/* harmony import */ var _context_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./context.js */ \"./node_modules/dagre-d3/node_modules/d3-geo/src/path/context.js\");\n/* harmony import */ var _measure_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./measure.js */ \"./node_modules/dagre-d3/node_modules/d3-geo/src/path/measure.js\");\n/* harmony import */ var _string_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./string.js */ \"./node_modules/dagre-d3/node_modules/d3-geo/src/path/string.js\");\n\n\n\n\n\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(projection, context) {\n  var pointRadius = 4.5,\n      projectionStream,\n      contextStream;\n\n  function path(object) {\n    if (object) {\n      if (typeof pointRadius === \"function\") contextStream.pointRadius(+pointRadius.apply(this, arguments));\n      Object(_stream_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(object, projectionStream(contextStream));\n    }\n    return contextStream.result();\n  }\n\n  path.area = function(object) {\n    Object(_stream_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(object, projectionStream(_area_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"]));\n    return _area_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"].result();\n  };\n\n  path.measure = function(object) {\n    Object(_stream_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(object, projectionStream(_measure_js__WEBPACK_IMPORTED_MODULE_6__[\"default\"]));\n    return _measure_js__WEBPACK_IMPORTED_MODULE_6__[\"default\"].result();\n  };\n\n  path.bounds = function(object) {\n    Object(_stream_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(object, projectionStream(_bounds_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"]));\n    return _bounds_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"].result();\n  };\n\n  path.centroid = function(object) {\n    Object(_stream_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(object, projectionStream(_centroid_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"]));\n    return _centroid_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"].result();\n  };\n\n  path.projection = function(_) {\n    return arguments.length ? (projectionStream = _ == null ? (projection = null, _identity_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]) : (projection = _).stream, path) : projection;\n  };\n\n  path.context = function(_) {\n    if (!arguments.length) return context;\n    contextStream = _ == null ? (context = null, new _string_js__WEBPACK_IMPORTED_MODULE_7__[\"default\"]) : new _context_js__WEBPACK_IMPORTED_MODULE_5__[\"default\"](context = _);\n    if (typeof pointRadius !== \"function\") contextStream.pointRadius(pointRadius);\n    return path;\n  };\n\n  path.pointRadius = function(_) {\n    if (!arguments.length) return pointRadius;\n    pointRadius = typeof _ === \"function\" ? _ : (contextStream.pointRadius(+_), +_);\n    return path;\n  };\n\n  return path.projection(projection).context(context);\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-geo/src/path/measure.js\":\n/*!***********************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-geo/src/path/measure.js ***!\n  \\***********************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _adder_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../adder.js */ \"./node_modules/dagre-d3/node_modules/d3-geo/src/adder.js\");\n/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../math.js */ \"./node_modules/dagre-d3/node_modules/d3-geo/src/math.js\");\n/* harmony import */ var _noop_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../noop.js */ \"./node_modules/dagre-d3/node_modules/d3-geo/src/noop.js\");\n\n\n\n\nvar lengthSum = Object(_adder_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(),\n    lengthRing,\n    x00,\n    y00,\n    x0,\n    y0;\n\nvar lengthStream = {\n  point: _noop_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"],\n  lineStart: function() {\n    lengthStream.point = lengthPointFirst;\n  },\n  lineEnd: function() {\n    if (lengthRing) lengthPoint(x00, y00);\n    lengthStream.point = _noop_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"];\n  },\n  polygonStart: function() {\n    lengthRing = true;\n  },\n  polygonEnd: function() {\n    lengthRing = null;\n  },\n  result: function() {\n    var length = +lengthSum;\n    lengthSum.reset();\n    return length;\n  }\n};\n\nfunction lengthPointFirst(x, y) {\n  lengthStream.point = lengthPoint;\n  x00 = x0 = x, y00 = y0 = y;\n}\n\nfunction lengthPoint(x, y) {\n  x0 -= x, y0 -= y;\n  lengthSum.add(Object(_math_js__WEBPACK_IMPORTED_MODULE_1__[\"sqrt\"])(x0 * x0 + y0 * y0));\n  x0 = x, y0 = y;\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (lengthStream);\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-geo/src/path/string.js\":\n/*!**********************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-geo/src/path/string.js ***!\n  \\**********************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return PathString; });\nfunction PathString() {\n  this._string = [];\n}\n\nPathString.prototype = {\n  _radius: 4.5,\n  _circle: circle(4.5),\n  pointRadius: function(_) {\n    if ((_ = +_) !== this._radius) this._radius = _, this._circle = null;\n    return this;\n  },\n  polygonStart: function() {\n    this._line = 0;\n  },\n  polygonEnd: function() {\n    this._line = NaN;\n  },\n  lineStart: function() {\n    this._point = 0;\n  },\n  lineEnd: function() {\n    if (this._line === 0) this._string.push(\"Z\");\n    this._point = NaN;\n  },\n  point: function(x, y) {\n    switch (this._point) {\n      case 0: {\n        this._string.push(\"M\", x, \",\", y);\n        this._point = 1;\n        break;\n      }\n      case 1: {\n        this._string.push(\"L\", x, \",\", y);\n        break;\n      }\n      default: {\n        if (this._circle == null) this._circle = circle(this._radius);\n        this._string.push(\"M\", x, \",\", y, this._circle);\n        break;\n      }\n    }\n  },\n  result: function() {\n    if (this._string.length) {\n      var result = this._string.join(\"\");\n      this._string = [];\n      return result;\n    } else {\n      return null;\n    }\n  }\n};\n\nfunction circle(radius) {\n  return \"m0,\" + radius\n      + \"a\" + radius + \",\" + radius + \" 0 1,1 0,\" + -2 * radius\n      + \"a\" + radius + \",\" + radius + \" 0 1,1 0,\" + 2 * radius\n      + \"z\";\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-geo/src/pointEqual.js\":\n/*!*********************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-geo/src/pointEqual.js ***!\n  \\*********************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./math.js */ \"./node_modules/dagre-d3/node_modules/d3-geo/src/math.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(a, b) {\n  return Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"abs\"])(a[0] - b[0]) < _math_js__WEBPACK_IMPORTED_MODULE_0__[\"epsilon\"] && Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"abs\"])(a[1] - b[1]) < _math_js__WEBPACK_IMPORTED_MODULE_0__[\"epsilon\"];\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-geo/src/polygonContains.js\":\n/*!**************************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-geo/src/polygonContains.js ***!\n  \\**************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _adder_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./adder.js */ \"./node_modules/dagre-d3/node_modules/d3-geo/src/adder.js\");\n/* harmony import */ var _cartesian_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./cartesian.js */ \"./node_modules/dagre-d3/node_modules/d3-geo/src/cartesian.js\");\n/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./math.js */ \"./node_modules/dagre-d3/node_modules/d3-geo/src/math.js\");\n\n\n\n\nvar sum = Object(_adder_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])();\n\nfunction longitude(point) {\n  if (Object(_math_js__WEBPACK_IMPORTED_MODULE_2__[\"abs\"])(point[0]) <= _math_js__WEBPACK_IMPORTED_MODULE_2__[\"pi\"])\n    return point[0];\n  else\n    return Object(_math_js__WEBPACK_IMPORTED_MODULE_2__[\"sign\"])(point[0]) * ((Object(_math_js__WEBPACK_IMPORTED_MODULE_2__[\"abs\"])(point[0]) + _math_js__WEBPACK_IMPORTED_MODULE_2__[\"pi\"]) % _math_js__WEBPACK_IMPORTED_MODULE_2__[\"tau\"] - _math_js__WEBPACK_IMPORTED_MODULE_2__[\"pi\"]);\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(polygon, point) {\n  var lambda = longitude(point),\n      phi = point[1],\n      sinPhi = Object(_math_js__WEBPACK_IMPORTED_MODULE_2__[\"sin\"])(phi),\n      normal = [Object(_math_js__WEBPACK_IMPORTED_MODULE_2__[\"sin\"])(lambda), -Object(_math_js__WEBPACK_IMPORTED_MODULE_2__[\"cos\"])(lambda), 0],\n      angle = 0,\n      winding = 0;\n\n  sum.reset();\n\n  if (sinPhi === 1) phi = _math_js__WEBPACK_IMPORTED_MODULE_2__[\"halfPi\"] + _math_js__WEBPACK_IMPORTED_MODULE_2__[\"epsilon\"];\n  else if (sinPhi === -1) phi = -_math_js__WEBPACK_IMPORTED_MODULE_2__[\"halfPi\"] - _math_js__WEBPACK_IMPORTED_MODULE_2__[\"epsilon\"];\n\n  for (var i = 0, n = polygon.length; i < n; ++i) {\n    if (!(m = (ring = polygon[i]).length)) continue;\n    var ring,\n        m,\n        point0 = ring[m - 1],\n        lambda0 = longitude(point0),\n        phi0 = point0[1] / 2 + _math_js__WEBPACK_IMPORTED_MODULE_2__[\"quarterPi\"],\n        sinPhi0 = Object(_math_js__WEBPACK_IMPORTED_MODULE_2__[\"sin\"])(phi0),\n        cosPhi0 = Object(_math_js__WEBPACK_IMPORTED_MODULE_2__[\"cos\"])(phi0);\n\n    for (var j = 0; j < m; ++j, lambda0 = lambda1, sinPhi0 = sinPhi1, cosPhi0 = cosPhi1, point0 = point1) {\n      var point1 = ring[j],\n          lambda1 = longitude(point1),\n          phi1 = point1[1] / 2 + _math_js__WEBPACK_IMPORTED_MODULE_2__[\"quarterPi\"],\n          sinPhi1 = Object(_math_js__WEBPACK_IMPORTED_MODULE_2__[\"sin\"])(phi1),\n          cosPhi1 = Object(_math_js__WEBPACK_IMPORTED_MODULE_2__[\"cos\"])(phi1),\n          delta = lambda1 - lambda0,\n          sign = delta >= 0 ? 1 : -1,\n          absDelta = sign * delta,\n          antimeridian = absDelta > _math_js__WEBPACK_IMPORTED_MODULE_2__[\"pi\"],\n          k = sinPhi0 * sinPhi1;\n\n      sum.add(Object(_math_js__WEBPACK_IMPORTED_MODULE_2__[\"atan2\"])(k * sign * Object(_math_js__WEBPACK_IMPORTED_MODULE_2__[\"sin\"])(absDelta), cosPhi0 * cosPhi1 + k * Object(_math_js__WEBPACK_IMPORTED_MODULE_2__[\"cos\"])(absDelta)));\n      angle += antimeridian ? delta + sign * _math_js__WEBPACK_IMPORTED_MODULE_2__[\"tau\"] : delta;\n\n      // Are the longitudes either side of the point’s meridian (lambda),\n      // and are the latitudes smaller than the parallel (phi)?\n      if (antimeridian ^ lambda0 >= lambda ^ lambda1 >= lambda) {\n        var arc = Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_1__[\"cartesianCross\"])(Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_1__[\"cartesian\"])(point0), Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_1__[\"cartesian\"])(point1));\n        Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_1__[\"cartesianNormalizeInPlace\"])(arc);\n        var intersection = Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_1__[\"cartesianCross\"])(normal, arc);\n        Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_1__[\"cartesianNormalizeInPlace\"])(intersection);\n        var phiArc = (antimeridian ^ delta >= 0 ? -1 : 1) * Object(_math_js__WEBPACK_IMPORTED_MODULE_2__[\"asin\"])(intersection[2]);\n        if (phi > phiArc || phi === phiArc && (arc[0] || arc[1])) {\n          winding += antimeridian ^ delta >= 0 ? 1 : -1;\n        }\n      }\n    }\n  }\n\n  // First, determine whether the South pole is inside or outside:\n  //\n  // It is inside if:\n  // * the polygon winds around it in a clockwise direction.\n  // * the polygon does not (cumulatively) wind around it, but has a negative\n  //   (counter-clockwise) area.\n  //\n  // Second, count the (signed) number of times a segment crosses a lambda\n  // from the point to the South pole.  If it is zero, then the point is the\n  // same side as the South pole.\n\n  return (angle < -_math_js__WEBPACK_IMPORTED_MODULE_2__[\"epsilon\"] || angle < _math_js__WEBPACK_IMPORTED_MODULE_2__[\"epsilon\"] && sum < -_math_js__WEBPACK_IMPORTED_MODULE_2__[\"epsilon\"]) ^ (winding & 1);\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-geo/src/projection/albers.js\":\n/*!****************************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-geo/src/projection/albers.js ***!\n  \\****************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _conicEqualArea_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./conicEqualArea.js */ \"./node_modules/dagre-d3/node_modules/d3-geo/src/projection/conicEqualArea.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  return Object(_conicEqualArea_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])()\n      .parallels([29.5, 45.5])\n      .scale(1070)\n      .translate([480, 250])\n      .rotate([96, 0])\n      .center([-0.6, 38.7]);\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-geo/src/projection/albersUsa.js\":\n/*!*******************************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-geo/src/projection/albersUsa.js ***!\n  \\*******************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../math.js */ \"./node_modules/dagre-d3/node_modules/d3-geo/src/math.js\");\n/* harmony import */ var _albers_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./albers.js */ \"./node_modules/dagre-d3/node_modules/d3-geo/src/projection/albers.js\");\n/* harmony import */ var _conicEqualArea_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./conicEqualArea.js */ \"./node_modules/dagre-d3/node_modules/d3-geo/src/projection/conicEqualArea.js\");\n/* harmony import */ var _fit_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./fit.js */ \"./node_modules/dagre-d3/node_modules/d3-geo/src/projection/fit.js\");\n\n\n\n\n\n// The projections must have mutually exclusive clip regions on the sphere,\n// as this will avoid emitting interleaving lines and polygons.\nfunction multiplex(streams) {\n  var n = streams.length;\n  return {\n    point: function(x, y) { var i = -1; while (++i < n) streams[i].point(x, y); },\n    sphere: function() { var i = -1; while (++i < n) streams[i].sphere(); },\n    lineStart: function() { var i = -1; while (++i < n) streams[i].lineStart(); },\n    lineEnd: function() { var i = -1; while (++i < n) streams[i].lineEnd(); },\n    polygonStart: function() { var i = -1; while (++i < n) streams[i].polygonStart(); },\n    polygonEnd: function() { var i = -1; while (++i < n) streams[i].polygonEnd(); }\n  };\n}\n\n// A composite projection for the United States, configured by default for\n// 960×500. The projection also works quite well at 960×600 if you change the\n// scale to 1285 and adjust the translate accordingly. The set of standard\n// parallels for each region comes from USGS, which is published here:\n// http://egsc.usgs.gov/isb/pubs/MapProjections/projections.html#albers\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  var cache,\n      cacheStream,\n      lower48 = Object(_albers_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(), lower48Point,\n      alaska = Object(_conicEqualArea_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])().rotate([154, 0]).center([-2, 58.5]).parallels([55, 65]), alaskaPoint, // EPSG:3338\n      hawaii = Object(_conicEqualArea_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])().rotate([157, 0]).center([-3, 19.9]).parallels([8, 18]), hawaiiPoint, // ESRI:102007\n      point, pointStream = {point: function(x, y) { point = [x, y]; }};\n\n  function albersUsa(coordinates) {\n    var x = coordinates[0], y = coordinates[1];\n    return point = null,\n        (lower48Point.point(x, y), point)\n        || (alaskaPoint.point(x, y), point)\n        || (hawaiiPoint.point(x, y), point);\n  }\n\n  albersUsa.invert = function(coordinates) {\n    var k = lower48.scale(),\n        t = lower48.translate(),\n        x = (coordinates[0] - t[0]) / k,\n        y = (coordinates[1] - t[1]) / k;\n    return (y >= 0.120 && y < 0.234 && x >= -0.425 && x < -0.214 ? alaska\n        : y >= 0.166 && y < 0.234 && x >= -0.214 && x < -0.115 ? hawaii\n        : lower48).invert(coordinates);\n  };\n\n  albersUsa.stream = function(stream) {\n    return cache && cacheStream === stream ? cache : cache = multiplex([lower48.stream(cacheStream = stream), alaska.stream(stream), hawaii.stream(stream)]);\n  };\n\n  albersUsa.precision = function(_) {\n    if (!arguments.length) return lower48.precision();\n    lower48.precision(_), alaska.precision(_), hawaii.precision(_);\n    return reset();\n  };\n\n  albersUsa.scale = function(_) {\n    if (!arguments.length) return lower48.scale();\n    lower48.scale(_), alaska.scale(_ * 0.35), hawaii.scale(_);\n    return albersUsa.translate(lower48.translate());\n  };\n\n  albersUsa.translate = function(_) {\n    if (!arguments.length) return lower48.translate();\n    var k = lower48.scale(), x = +_[0], y = +_[1];\n\n    lower48Point = lower48\n        .translate(_)\n        .clipExtent([[x - 0.455 * k, y - 0.238 * k], [x + 0.455 * k, y + 0.238 * k]])\n        .stream(pointStream);\n\n    alaskaPoint = alaska\n        .translate([x - 0.307 * k, y + 0.201 * k])\n        .clipExtent([[x - 0.425 * k + _math_js__WEBPACK_IMPORTED_MODULE_0__[\"epsilon\"], y + 0.120 * k + _math_js__WEBPACK_IMPORTED_MODULE_0__[\"epsilon\"]], [x - 0.214 * k - _math_js__WEBPACK_IMPORTED_MODULE_0__[\"epsilon\"], y + 0.234 * k - _math_js__WEBPACK_IMPORTED_MODULE_0__[\"epsilon\"]]])\n        .stream(pointStream);\n\n    hawaiiPoint = hawaii\n        .translate([x - 0.205 * k, y + 0.212 * k])\n        .clipExtent([[x - 0.214 * k + _math_js__WEBPACK_IMPORTED_MODULE_0__[\"epsilon\"], y + 0.166 * k + _math_js__WEBPACK_IMPORTED_MODULE_0__[\"epsilon\"]], [x - 0.115 * k - _math_js__WEBPACK_IMPORTED_MODULE_0__[\"epsilon\"], y + 0.234 * k - _math_js__WEBPACK_IMPORTED_MODULE_0__[\"epsilon\"]]])\n        .stream(pointStream);\n\n    return reset();\n  };\n\n  albersUsa.fitExtent = function(extent, object) {\n    return Object(_fit_js__WEBPACK_IMPORTED_MODULE_3__[\"fitExtent\"])(albersUsa, extent, object);\n  };\n\n  albersUsa.fitSize = function(size, object) {\n    return Object(_fit_js__WEBPACK_IMPORTED_MODULE_3__[\"fitSize\"])(albersUsa, size, object);\n  };\n\n  albersUsa.fitWidth = function(width, object) {\n    return Object(_fit_js__WEBPACK_IMPORTED_MODULE_3__[\"fitWidth\"])(albersUsa, width, object);\n  };\n\n  albersUsa.fitHeight = function(height, object) {\n    return Object(_fit_js__WEBPACK_IMPORTED_MODULE_3__[\"fitHeight\"])(albersUsa, height, object);\n  };\n\n  function reset() {\n    cache = cacheStream = null;\n    return albersUsa;\n  }\n\n  return albersUsa.scale(1070);\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-geo/src/projection/azimuthal.js\":\n/*!*******************************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-geo/src/projection/azimuthal.js ***!\n  \\*******************************************************************************/\n/*! exports provided: azimuthalRaw, azimuthalInvert */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"azimuthalRaw\", function() { return azimuthalRaw; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"azimuthalInvert\", function() { return azimuthalInvert; });\n/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../math.js */ \"./node_modules/dagre-d3/node_modules/d3-geo/src/math.js\");\n\n\nfunction azimuthalRaw(scale) {\n  return function(x, y) {\n    var cx = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"cos\"])(x),\n        cy = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"cos\"])(y),\n        k = scale(cx * cy);\n    return [\n      k * cy * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"sin\"])(x),\n      k * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"sin\"])(y)\n    ];\n  }\n}\n\nfunction azimuthalInvert(angle) {\n  return function(x, y) {\n    var z = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"sqrt\"])(x * x + y * y),\n        c = angle(z),\n        sc = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"sin\"])(c),\n        cc = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"cos\"])(c);\n    return [\n      Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"atan2\"])(x * sc, z * cc),\n      Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"asin\"])(z && y * sc / z)\n    ];\n  }\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-geo/src/projection/azimuthalEqualArea.js\":\n/*!****************************************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-geo/src/projection/azimuthalEqualArea.js ***!\n  \\****************************************************************************************/\n/*! exports provided: azimuthalEqualAreaRaw, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"azimuthalEqualAreaRaw\", function() { return azimuthalEqualAreaRaw; });\n/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../math.js */ \"./node_modules/dagre-d3/node_modules/d3-geo/src/math.js\");\n/* harmony import */ var _azimuthal_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./azimuthal.js */ \"./node_modules/dagre-d3/node_modules/d3-geo/src/projection/azimuthal.js\");\n/* harmony import */ var _index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./index.js */ \"./node_modules/dagre-d3/node_modules/d3-geo/src/projection/index.js\");\n\n\n\n\nvar azimuthalEqualAreaRaw = Object(_azimuthal_js__WEBPACK_IMPORTED_MODULE_1__[\"azimuthalRaw\"])(function(cxcy) {\n  return Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"sqrt\"])(2 / (1 + cxcy));\n});\n\nazimuthalEqualAreaRaw.invert = Object(_azimuthal_js__WEBPACK_IMPORTED_MODULE_1__[\"azimuthalInvert\"])(function(z) {\n  return 2 * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"asin\"])(z / 2);\n});\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  return Object(_index_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(azimuthalEqualAreaRaw)\n      .scale(124.75)\n      .clipAngle(180 - 1e-3);\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-geo/src/projection/azimuthalEquidistant.js\":\n/*!******************************************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-geo/src/projection/azimuthalEquidistant.js ***!\n  \\******************************************************************************************/\n/*! exports provided: azimuthalEquidistantRaw, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"azimuthalEquidistantRaw\", function() { return azimuthalEquidistantRaw; });\n/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../math.js */ \"./node_modules/dagre-d3/node_modules/d3-geo/src/math.js\");\n/* harmony import */ var _azimuthal_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./azimuthal.js */ \"./node_modules/dagre-d3/node_modules/d3-geo/src/projection/azimuthal.js\");\n/* harmony import */ var _index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./index.js */ \"./node_modules/dagre-d3/node_modules/d3-geo/src/projection/index.js\");\n\n\n\n\nvar azimuthalEquidistantRaw = Object(_azimuthal_js__WEBPACK_IMPORTED_MODULE_1__[\"azimuthalRaw\"])(function(c) {\n  return (c = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"acos\"])(c)) && c / Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"sin\"])(c);\n});\n\nazimuthalEquidistantRaw.invert = Object(_azimuthal_js__WEBPACK_IMPORTED_MODULE_1__[\"azimuthalInvert\"])(function(z) {\n  return z;\n});\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  return Object(_index_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(azimuthalEquidistantRaw)\n      .scale(79.4188)\n      .clipAngle(180 - 1e-3);\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-geo/src/projection/conic.js\":\n/*!***************************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-geo/src/projection/conic.js ***!\n  \\***************************************************************************/\n/*! exports provided: conicProjection */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"conicProjection\", function() { return conicProjection; });\n/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../math.js */ \"./node_modules/dagre-d3/node_modules/d3-geo/src/math.js\");\n/* harmony import */ var _index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./index.js */ \"./node_modules/dagre-d3/node_modules/d3-geo/src/projection/index.js\");\n\n\n\nfunction conicProjection(projectAt) {\n  var phi0 = 0,\n      phi1 = _math_js__WEBPACK_IMPORTED_MODULE_0__[\"pi\"] / 3,\n      m = Object(_index_js__WEBPACK_IMPORTED_MODULE_1__[\"projectionMutator\"])(projectAt),\n      p = m(phi0, phi1);\n\n  p.parallels = function(_) {\n    return arguments.length ? m(phi0 = _[0] * _math_js__WEBPACK_IMPORTED_MODULE_0__[\"radians\"], phi1 = _[1] * _math_js__WEBPACK_IMPORTED_MODULE_0__[\"radians\"]) : [phi0 * _math_js__WEBPACK_IMPORTED_MODULE_0__[\"degrees\"], phi1 * _math_js__WEBPACK_IMPORTED_MODULE_0__[\"degrees\"]];\n  };\n\n  return p;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-geo/src/projection/conicConformal.js\":\n/*!************************************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-geo/src/projection/conicConformal.js ***!\n  \\************************************************************************************/\n/*! exports provided: conicConformalRaw, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"conicConformalRaw\", function() { return conicConformalRaw; });\n/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../math.js */ \"./node_modules/dagre-d3/node_modules/d3-geo/src/math.js\");\n/* harmony import */ var _conic_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./conic.js */ \"./node_modules/dagre-d3/node_modules/d3-geo/src/projection/conic.js\");\n/* harmony import */ var _mercator_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./mercator.js */ \"./node_modules/dagre-d3/node_modules/d3-geo/src/projection/mercator.js\");\n\n\n\n\nfunction tany(y) {\n  return Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"tan\"])((_math_js__WEBPACK_IMPORTED_MODULE_0__[\"halfPi\"] + y) / 2);\n}\n\nfunction conicConformalRaw(y0, y1) {\n  var cy0 = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"cos\"])(y0),\n      n = y0 === y1 ? Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"sin\"])(y0) : Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"log\"])(cy0 / Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"cos\"])(y1)) / Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"log\"])(tany(y1) / tany(y0)),\n      f = cy0 * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"pow\"])(tany(y0), n) / n;\n\n  if (!n) return _mercator_js__WEBPACK_IMPORTED_MODULE_2__[\"mercatorRaw\"];\n\n  function project(x, y) {\n    if (f > 0) { if (y < -_math_js__WEBPACK_IMPORTED_MODULE_0__[\"halfPi\"] + _math_js__WEBPACK_IMPORTED_MODULE_0__[\"epsilon\"]) y = -_math_js__WEBPACK_IMPORTED_MODULE_0__[\"halfPi\"] + _math_js__WEBPACK_IMPORTED_MODULE_0__[\"epsilon\"]; }\n    else { if (y > _math_js__WEBPACK_IMPORTED_MODULE_0__[\"halfPi\"] - _math_js__WEBPACK_IMPORTED_MODULE_0__[\"epsilon\"]) y = _math_js__WEBPACK_IMPORTED_MODULE_0__[\"halfPi\"] - _math_js__WEBPACK_IMPORTED_MODULE_0__[\"epsilon\"]; }\n    var r = f / Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"pow\"])(tany(y), n);\n    return [r * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"sin\"])(n * x), f - r * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"cos\"])(n * x)];\n  }\n\n  project.invert = function(x, y) {\n    var fy = f - y, r = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"sign\"])(n) * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"sqrt\"])(x * x + fy * fy),\n      l = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"atan2\"])(x, Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"abs\"])(fy)) * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"sign\"])(fy);\n    if (fy * n < 0)\n      l -= _math_js__WEBPACK_IMPORTED_MODULE_0__[\"pi\"] * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"sign\"])(x) * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"sign\"])(fy);\n    return [l / n, 2 * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"atan\"])(Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"pow\"])(f / r, 1 / n)) - _math_js__WEBPACK_IMPORTED_MODULE_0__[\"halfPi\"]];\n  };\n\n  return project;\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  return Object(_conic_js__WEBPACK_IMPORTED_MODULE_1__[\"conicProjection\"])(conicConformalRaw)\n      .scale(109.5)\n      .parallels([30, 30]);\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-geo/src/projection/conicEqualArea.js\":\n/*!************************************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-geo/src/projection/conicEqualArea.js ***!\n  \\************************************************************************************/\n/*! exports provided: conicEqualAreaRaw, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"conicEqualAreaRaw\", function() { return conicEqualAreaRaw; });\n/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../math.js */ \"./node_modules/dagre-d3/node_modules/d3-geo/src/math.js\");\n/* harmony import */ var _conic_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./conic.js */ \"./node_modules/dagre-d3/node_modules/d3-geo/src/projection/conic.js\");\n/* harmony import */ var _cylindricalEqualArea_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./cylindricalEqualArea.js */ \"./node_modules/dagre-d3/node_modules/d3-geo/src/projection/cylindricalEqualArea.js\");\n\n\n\n\nfunction conicEqualAreaRaw(y0, y1) {\n  var sy0 = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"sin\"])(y0), n = (sy0 + Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"sin\"])(y1)) / 2;\n\n  // Are the parallels symmetrical around the Equator?\n  if (Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"abs\"])(n) < _math_js__WEBPACK_IMPORTED_MODULE_0__[\"epsilon\"]) return Object(_cylindricalEqualArea_js__WEBPACK_IMPORTED_MODULE_2__[\"cylindricalEqualAreaRaw\"])(y0);\n\n  var c = 1 + sy0 * (2 * n - sy0), r0 = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"sqrt\"])(c) / n;\n\n  function project(x, y) {\n    var r = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"sqrt\"])(c - 2 * n * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"sin\"])(y)) / n;\n    return [r * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"sin\"])(x *= n), r0 - r * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"cos\"])(x)];\n  }\n\n  project.invert = function(x, y) {\n    var r0y = r0 - y,\n        l = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"atan2\"])(x, Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"abs\"])(r0y)) * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"sign\"])(r0y);\n    if (r0y * n < 0)\n      l -= _math_js__WEBPACK_IMPORTED_MODULE_0__[\"pi\"] * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"sign\"])(x) * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"sign\"])(r0y);\n    return [l / n, Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"asin\"])((c - (x * x + r0y * r0y) * n * n) / (2 * n))];\n  };\n\n  return project;\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  return Object(_conic_js__WEBPACK_IMPORTED_MODULE_1__[\"conicProjection\"])(conicEqualAreaRaw)\n      .scale(155.424)\n      .center([0, 33.6442]);\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-geo/src/projection/conicEquidistant.js\":\n/*!**************************************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-geo/src/projection/conicEquidistant.js ***!\n  \\**************************************************************************************/\n/*! exports provided: conicEquidistantRaw, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"conicEquidistantRaw\", function() { return conicEquidistantRaw; });\n/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../math.js */ \"./node_modules/dagre-d3/node_modules/d3-geo/src/math.js\");\n/* harmony import */ var _conic_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./conic.js */ \"./node_modules/dagre-d3/node_modules/d3-geo/src/projection/conic.js\");\n/* harmony import */ var _equirectangular_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./equirectangular.js */ \"./node_modules/dagre-d3/node_modules/d3-geo/src/projection/equirectangular.js\");\n\n\n\n\nfunction conicEquidistantRaw(y0, y1) {\n  var cy0 = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"cos\"])(y0),\n      n = y0 === y1 ? Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"sin\"])(y0) : (cy0 - Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"cos\"])(y1)) / (y1 - y0),\n      g = cy0 / n + y0;\n\n  if (Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"abs\"])(n) < _math_js__WEBPACK_IMPORTED_MODULE_0__[\"epsilon\"]) return _equirectangular_js__WEBPACK_IMPORTED_MODULE_2__[\"equirectangularRaw\"];\n\n  function project(x, y) {\n    var gy = g - y, nx = n * x;\n    return [gy * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"sin\"])(nx), g - gy * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"cos\"])(nx)];\n  }\n\n  project.invert = function(x, y) {\n    var gy = g - y,\n        l = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"atan2\"])(x, Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"abs\"])(gy)) * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"sign\"])(gy);\n    if (gy * n < 0)\n      l -= _math_js__WEBPACK_IMPORTED_MODULE_0__[\"pi\"] * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"sign\"])(x) * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"sign\"])(gy);\n    return [l / n, g - Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"sign\"])(n) * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"sqrt\"])(x * x + gy * gy)];\n  };\n\n  return project;\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  return Object(_conic_js__WEBPACK_IMPORTED_MODULE_1__[\"conicProjection\"])(conicEquidistantRaw)\n      .scale(131.154)\n      .center([0, 13.9389]);\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-geo/src/projection/cylindricalEqualArea.js\":\n/*!******************************************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-geo/src/projection/cylindricalEqualArea.js ***!\n  \\******************************************************************************************/\n/*! exports provided: cylindricalEqualAreaRaw */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"cylindricalEqualAreaRaw\", function() { return cylindricalEqualAreaRaw; });\n/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../math.js */ \"./node_modules/dagre-d3/node_modules/d3-geo/src/math.js\");\n\n\nfunction cylindricalEqualAreaRaw(phi0) {\n  var cosPhi0 = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"cos\"])(phi0);\n\n  function forward(lambda, phi) {\n    return [lambda * cosPhi0, Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"sin\"])(phi) / cosPhi0];\n  }\n\n  forward.invert = function(x, y) {\n    return [x / cosPhi0, Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"asin\"])(y * cosPhi0)];\n  };\n\n  return forward;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-geo/src/projection/equalEarth.js\":\n/*!********************************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-geo/src/projection/equalEarth.js ***!\n  \\********************************************************************************/\n/*! exports provided: equalEarthRaw, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"equalEarthRaw\", function() { return equalEarthRaw; });\n/* harmony import */ var _index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./index.js */ \"./node_modules/dagre-d3/node_modules/d3-geo/src/projection/index.js\");\n/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../math.js */ \"./node_modules/dagre-d3/node_modules/d3-geo/src/math.js\");\n\n\n\nvar A1 = 1.340264,\n    A2 = -0.081106,\n    A3 = 0.000893,\n    A4 = 0.003796,\n    M = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__[\"sqrt\"])(3) / 2,\n    iterations = 12;\n\nfunction equalEarthRaw(lambda, phi) {\n  var l = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__[\"asin\"])(M * Object(_math_js__WEBPACK_IMPORTED_MODULE_1__[\"sin\"])(phi)), l2 = l * l, l6 = l2 * l2 * l2;\n  return [\n    lambda * Object(_math_js__WEBPACK_IMPORTED_MODULE_1__[\"cos\"])(l) / (M * (A1 + 3 * A2 * l2 + l6 * (7 * A3 + 9 * A4 * l2))),\n    l * (A1 + A2 * l2 + l6 * (A3 + A4 * l2))\n  ];\n}\n\nequalEarthRaw.invert = function(x, y) {\n  var l = y, l2 = l * l, l6 = l2 * l2 * l2;\n  for (var i = 0, delta, fy, fpy; i < iterations; ++i) {\n    fy = l * (A1 + A2 * l2 + l6 * (A3 + A4 * l2)) - y;\n    fpy = A1 + 3 * A2 * l2 + l6 * (7 * A3 + 9 * A4 * l2);\n    l -= delta = fy / fpy, l2 = l * l, l6 = l2 * l2 * l2;\n    if (Object(_math_js__WEBPACK_IMPORTED_MODULE_1__[\"abs\"])(delta) < _math_js__WEBPACK_IMPORTED_MODULE_1__[\"epsilon2\"]) break;\n  }\n  return [\n    M * x * (A1 + 3 * A2 * l2 + l6 * (7 * A3 + 9 * A4 * l2)) / Object(_math_js__WEBPACK_IMPORTED_MODULE_1__[\"cos\"])(l),\n    Object(_math_js__WEBPACK_IMPORTED_MODULE_1__[\"asin\"])(Object(_math_js__WEBPACK_IMPORTED_MODULE_1__[\"sin\"])(l) / M)\n  ];\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  return Object(_index_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(equalEarthRaw)\n      .scale(177.158);\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-geo/src/projection/equirectangular.js\":\n/*!*************************************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-geo/src/projection/equirectangular.js ***!\n  \\*************************************************************************************/\n/*! exports provided: equirectangularRaw, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"equirectangularRaw\", function() { return equirectangularRaw; });\n/* harmony import */ var _index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./index.js */ \"./node_modules/dagre-d3/node_modules/d3-geo/src/projection/index.js\");\n\n\nfunction equirectangularRaw(lambda, phi) {\n  return [lambda, phi];\n}\n\nequirectangularRaw.invert = equirectangularRaw;\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  return Object(_index_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(equirectangularRaw)\n      .scale(152.63);\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-geo/src/projection/fit.js\":\n/*!*************************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-geo/src/projection/fit.js ***!\n  \\*************************************************************************/\n/*! exports provided: fitExtent, fitSize, fitWidth, fitHeight */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"fitExtent\", function() { return fitExtent; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"fitSize\", function() { return fitSize; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"fitWidth\", function() { return fitWidth; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"fitHeight\", function() { return fitHeight; });\n/* harmony import */ var _stream_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../stream.js */ \"./node_modules/dagre-d3/node_modules/d3-geo/src/stream.js\");\n/* harmony import */ var _path_bounds_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../path/bounds.js */ \"./node_modules/dagre-d3/node_modules/d3-geo/src/path/bounds.js\");\n\n\n\nfunction fit(projection, fitBounds, object) {\n  var clip = projection.clipExtent && projection.clipExtent();\n  projection.scale(150).translate([0, 0]);\n  if (clip != null) projection.clipExtent(null);\n  Object(_stream_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(object, projection.stream(_path_bounds_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"]));\n  fitBounds(_path_bounds_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"].result());\n  if (clip != null) projection.clipExtent(clip);\n  return projection;\n}\n\nfunction fitExtent(projection, extent, object) {\n  return fit(projection, function(b) {\n    var w = extent[1][0] - extent[0][0],\n        h = extent[1][1] - extent[0][1],\n        k = Math.min(w / (b[1][0] - b[0][0]), h / (b[1][1] - b[0][1])),\n        x = +extent[0][0] + (w - k * (b[1][0] + b[0][0])) / 2,\n        y = +extent[0][1] + (h - k * (b[1][1] + b[0][1])) / 2;\n    projection.scale(150 * k).translate([x, y]);\n  }, object);\n}\n\nfunction fitSize(projection, size, object) {\n  return fitExtent(projection, [[0, 0], size], object);\n}\n\nfunction fitWidth(projection, width, object) {\n  return fit(projection, function(b) {\n    var w = +width,\n        k = w / (b[1][0] - b[0][0]),\n        x = (w - k * (b[1][0] + b[0][0])) / 2,\n        y = -k * b[0][1];\n    projection.scale(150 * k).translate([x, y]);\n  }, object);\n}\n\nfunction fitHeight(projection, height, object) {\n  return fit(projection, function(b) {\n    var h = +height,\n        k = h / (b[1][1] - b[0][1]),\n        x = -k * b[0][0],\n        y = (h - k * (b[1][1] + b[0][1])) / 2;\n    projection.scale(150 * k).translate([x, y]);\n  }, object);\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-geo/src/projection/gnomonic.js\":\n/*!******************************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-geo/src/projection/gnomonic.js ***!\n  \\******************************************************************************/\n/*! exports provided: gnomonicRaw, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"gnomonicRaw\", function() { return gnomonicRaw; });\n/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../math.js */ \"./node_modules/dagre-d3/node_modules/d3-geo/src/math.js\");\n/* harmony import */ var _azimuthal_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./azimuthal.js */ \"./node_modules/dagre-d3/node_modules/d3-geo/src/projection/azimuthal.js\");\n/* harmony import */ var _index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./index.js */ \"./node_modules/dagre-d3/node_modules/d3-geo/src/projection/index.js\");\n\n\n\n\nfunction gnomonicRaw(x, y) {\n  var cy = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"cos\"])(y), k = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"cos\"])(x) * cy;\n  return [cy * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"sin\"])(x) / k, Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"sin\"])(y) / k];\n}\n\ngnomonicRaw.invert = Object(_azimuthal_js__WEBPACK_IMPORTED_MODULE_1__[\"azimuthalInvert\"])(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"atan\"]);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  return Object(_index_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(gnomonicRaw)\n      .scale(144.049)\n      .clipAngle(60);\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-geo/src/projection/identity.js\":\n/*!******************************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-geo/src/projection/identity.js ***!\n  \\******************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _clip_rectangle_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../clip/rectangle.js */ \"./node_modules/dagre-d3/node_modules/d3-geo/src/clip/rectangle.js\");\n/* harmony import */ var _identity_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../identity.js */ \"./node_modules/dagre-d3/node_modules/d3-geo/src/identity.js\");\n/* harmony import */ var _transform_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../transform.js */ \"./node_modules/dagre-d3/node_modules/d3-geo/src/transform.js\");\n/* harmony import */ var _fit_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./fit.js */ \"./node_modules/dagre-d3/node_modules/d3-geo/src/projection/fit.js\");\n/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../math.js */ \"./node_modules/dagre-d3/node_modules/d3-geo/src/math.js\");\n\n\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  var k = 1, tx = 0, ty = 0, sx = 1, sy = 1, // scale, translate and reflect\n      alpha = 0, ca, sa, // angle\n      x0 = null, y0, x1, y1, // clip extent\n      kx = 1, ky = 1,\n      transform = Object(_transform_js__WEBPACK_IMPORTED_MODULE_2__[\"transformer\"])({\n        point: function(x, y) {\n          var p = projection([x, y])\n          this.stream.point(p[0], p[1]);\n        }\n      }),\n      postclip = _identity_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"],\n      cache,\n      cacheStream;\n\n  function reset() {\n    kx = k * sx;\n    ky = k * sy;\n    cache = cacheStream = null;\n    return projection;\n  }\n\n  function projection (p) {\n    var x = p[0] * kx, y = p[1] * ky;\n    if (alpha) {\n      var t = y * ca - x * sa;\n      x = x * ca + y * sa;\n      y = t;\n    }    \n    return [x + tx, y + ty];\n  }\n  projection.invert = function(p) {\n    var x = p[0] - tx, y = p[1] - ty;\n    if (alpha) {\n      var t = y * ca + x * sa;\n      x = x * ca - y * sa;\n      y = t;\n    }\n    return [x / kx, y / ky];\n  };\n  projection.stream = function(stream) {\n    return cache && cacheStream === stream ? cache : cache = transform(postclip(cacheStream = stream));\n  };\n  projection.postclip = function(_) {\n    return arguments.length ? (postclip = _, x0 = y0 = x1 = y1 = null, reset()) : postclip;\n  };\n  projection.clipExtent = function(_) {\n    return arguments.length ? (postclip = _ == null ? (x0 = y0 = x1 = y1 = null, _identity_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"]) : Object(_clip_rectangle_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(x0 = +_[0][0], y0 = +_[0][1], x1 = +_[1][0], y1 = +_[1][1]), reset()) : x0 == null ? null : [[x0, y0], [x1, y1]];\n  };\n  projection.scale = function(_) {\n    return arguments.length ? (k = +_, reset()) : k;\n  };\n  projection.translate = function(_) {\n    return arguments.length ? (tx = +_[0], ty = +_[1], reset()) : [tx, ty];\n  }\n  projection.angle = function(_) {\n    return arguments.length ? (alpha = _ % 360 * _math_js__WEBPACK_IMPORTED_MODULE_4__[\"radians\"], sa = Object(_math_js__WEBPACK_IMPORTED_MODULE_4__[\"sin\"])(alpha), ca = Object(_math_js__WEBPACK_IMPORTED_MODULE_4__[\"cos\"])(alpha), reset()) : alpha * _math_js__WEBPACK_IMPORTED_MODULE_4__[\"degrees\"];\n  };\n  projection.reflectX = function(_) {\n    return arguments.length ? (sx = _ ? -1 : 1, reset()) : sx < 0;\n  };\n  projection.reflectY = function(_) {\n    return arguments.length ? (sy = _ ? -1 : 1, reset()) : sy < 0;\n  };\n  projection.fitExtent = function(extent, object) {\n    return Object(_fit_js__WEBPACK_IMPORTED_MODULE_3__[\"fitExtent\"])(projection, extent, object);\n  };\n  projection.fitSize = function(size, object) {\n    return Object(_fit_js__WEBPACK_IMPORTED_MODULE_3__[\"fitSize\"])(projection, size, object);\n  };\n  projection.fitWidth = function(width, object) {\n    return Object(_fit_js__WEBPACK_IMPORTED_MODULE_3__[\"fitWidth\"])(projection, width, object);\n  };\n  projection.fitHeight = function(height, object) {\n    return Object(_fit_js__WEBPACK_IMPORTED_MODULE_3__[\"fitHeight\"])(projection, height, object);\n  };\n\n  return projection;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-geo/src/projection/index.js\":\n/*!***************************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-geo/src/projection/index.js ***!\n  \\***************************************************************************/\n/*! exports provided: default, projectionMutator */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return projection; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"projectionMutator\", function() { return projectionMutator; });\n/* harmony import */ var _clip_antimeridian_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../clip/antimeridian.js */ \"./node_modules/dagre-d3/node_modules/d3-geo/src/clip/antimeridian.js\");\n/* harmony import */ var _clip_circle_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../clip/circle.js */ \"./node_modules/dagre-d3/node_modules/d3-geo/src/clip/circle.js\");\n/* harmony import */ var _clip_rectangle_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../clip/rectangle.js */ \"./node_modules/dagre-d3/node_modules/d3-geo/src/clip/rectangle.js\");\n/* harmony import */ var _compose_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../compose.js */ \"./node_modules/dagre-d3/node_modules/d3-geo/src/compose.js\");\n/* harmony import */ var _identity_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../identity.js */ \"./node_modules/dagre-d3/node_modules/d3-geo/src/identity.js\");\n/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../math.js */ \"./node_modules/dagre-d3/node_modules/d3-geo/src/math.js\");\n/* harmony import */ var _rotation_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../rotation.js */ \"./node_modules/dagre-d3/node_modules/d3-geo/src/rotation.js\");\n/* harmony import */ var _transform_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../transform.js */ \"./node_modules/dagre-d3/node_modules/d3-geo/src/transform.js\");\n/* harmony import */ var _fit_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./fit.js */ \"./node_modules/dagre-d3/node_modules/d3-geo/src/projection/fit.js\");\n/* harmony import */ var _resample_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./resample.js */ \"./node_modules/dagre-d3/node_modules/d3-geo/src/projection/resample.js\");\n\n\n\n\n\n\n\n\n\n\n\nvar transformRadians = Object(_transform_js__WEBPACK_IMPORTED_MODULE_7__[\"transformer\"])({\n  point: function(x, y) {\n    this.stream.point(x * _math_js__WEBPACK_IMPORTED_MODULE_5__[\"radians\"], y * _math_js__WEBPACK_IMPORTED_MODULE_5__[\"radians\"]);\n  }\n});\n\nfunction transformRotate(rotate) {\n  return Object(_transform_js__WEBPACK_IMPORTED_MODULE_7__[\"transformer\"])({\n    point: function(x, y) {\n      var r = rotate(x, y);\n      return this.stream.point(r[0], r[1]);\n    }\n  });\n}\n\nfunction scaleTranslate(k, dx, dy, sx, sy) {\n  function transform(x, y) {\n    x *= sx; y *= sy;\n    return [dx + k * x, dy - k * y];\n  }\n  transform.invert = function(x, y) {\n    return [(x - dx) / k * sx, (dy - y) / k * sy];\n  };\n  return transform;\n}\n\nfunction scaleTranslateRotate(k, dx, dy, sx, sy, alpha) {\n  var cosAlpha = Object(_math_js__WEBPACK_IMPORTED_MODULE_5__[\"cos\"])(alpha),\n      sinAlpha = Object(_math_js__WEBPACK_IMPORTED_MODULE_5__[\"sin\"])(alpha),\n      a = cosAlpha * k,\n      b = sinAlpha * k,\n      ai = cosAlpha / k,\n      bi = sinAlpha / k,\n      ci = (sinAlpha * dy - cosAlpha * dx) / k,\n      fi = (sinAlpha * dx + cosAlpha * dy) / k;\n  function transform(x, y) {\n    x *= sx; y *= sy;\n    return [a * x - b * y + dx, dy - b * x - a * y];\n  }\n  transform.invert = function(x, y) {\n    return [sx * (ai * x - bi * y + ci), sy * (fi - bi * x - ai * y)];\n  };\n  return transform;\n}\n\nfunction projection(project) {\n  return projectionMutator(function() { return project; })();\n}\n\nfunction projectionMutator(projectAt) {\n  var project,\n      k = 150, // scale\n      x = 480, y = 250, // translate\n      lambda = 0, phi = 0, // center\n      deltaLambda = 0, deltaPhi = 0, deltaGamma = 0, rotate, // pre-rotate\n      alpha = 0, // post-rotate angle\n      sx = 1, // reflectX\n      sy = 1, // reflectX\n      theta = null, preclip = _clip_antimeridian_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"], // pre-clip angle\n      x0 = null, y0, x1, y1, postclip = _identity_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"], // post-clip extent\n      delta2 = 0.5, // precision\n      projectResample,\n      projectTransform,\n      projectRotateTransform,\n      cache,\n      cacheStream;\n\n  function projection(point) {\n    return projectRotateTransform(point[0] * _math_js__WEBPACK_IMPORTED_MODULE_5__[\"radians\"], point[1] * _math_js__WEBPACK_IMPORTED_MODULE_5__[\"radians\"]);\n  }\n\n  function invert(point) {\n    point = projectRotateTransform.invert(point[0], point[1]);\n    return point && [point[0] * _math_js__WEBPACK_IMPORTED_MODULE_5__[\"degrees\"], point[1] * _math_js__WEBPACK_IMPORTED_MODULE_5__[\"degrees\"]];\n  }\n\n  projection.stream = function(stream) {\n    return cache && cacheStream === stream ? cache : cache = transformRadians(transformRotate(rotate)(preclip(projectResample(postclip(cacheStream = stream)))));\n  };\n\n  projection.preclip = function(_) {\n    return arguments.length ? (preclip = _, theta = undefined, reset()) : preclip;\n  };\n\n  projection.postclip = function(_) {\n    return arguments.length ? (postclip = _, x0 = y0 = x1 = y1 = null, reset()) : postclip;\n  };\n\n  projection.clipAngle = function(_) {\n    return arguments.length ? (preclip = +_ ? Object(_clip_circle_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(theta = _ * _math_js__WEBPACK_IMPORTED_MODULE_5__[\"radians\"]) : (theta = null, _clip_antimeridian_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]), reset()) : theta * _math_js__WEBPACK_IMPORTED_MODULE_5__[\"degrees\"];\n  };\n\n  projection.clipExtent = function(_) {\n    return arguments.length ? (postclip = _ == null ? (x0 = y0 = x1 = y1 = null, _identity_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"]) : Object(_clip_rectangle_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(x0 = +_[0][0], y0 = +_[0][1], x1 = +_[1][0], y1 = +_[1][1]), reset()) : x0 == null ? null : [[x0, y0], [x1, y1]];\n  };\n\n  projection.scale = function(_) {\n    return arguments.length ? (k = +_, recenter()) : k;\n  };\n\n  projection.translate = function(_) {\n    return arguments.length ? (x = +_[0], y = +_[1], recenter()) : [x, y];\n  };\n\n  projection.center = function(_) {\n    return arguments.length ? (lambda = _[0] % 360 * _math_js__WEBPACK_IMPORTED_MODULE_5__[\"radians\"], phi = _[1] % 360 * _math_js__WEBPACK_IMPORTED_MODULE_5__[\"radians\"], recenter()) : [lambda * _math_js__WEBPACK_IMPORTED_MODULE_5__[\"degrees\"], phi * _math_js__WEBPACK_IMPORTED_MODULE_5__[\"degrees\"]];\n  };\n\n  projection.rotate = function(_) {\n    return arguments.length ? (deltaLambda = _[0] % 360 * _math_js__WEBPACK_IMPORTED_MODULE_5__[\"radians\"], deltaPhi = _[1] % 360 * _math_js__WEBPACK_IMPORTED_MODULE_5__[\"radians\"], deltaGamma = _.length > 2 ? _[2] % 360 * _math_js__WEBPACK_IMPORTED_MODULE_5__[\"radians\"] : 0, recenter()) : [deltaLambda * _math_js__WEBPACK_IMPORTED_MODULE_5__[\"degrees\"], deltaPhi * _math_js__WEBPACK_IMPORTED_MODULE_5__[\"degrees\"], deltaGamma * _math_js__WEBPACK_IMPORTED_MODULE_5__[\"degrees\"]];\n  };\n\n  projection.angle = function(_) {\n    return arguments.length ? (alpha = _ % 360 * _math_js__WEBPACK_IMPORTED_MODULE_5__[\"radians\"], recenter()) : alpha * _math_js__WEBPACK_IMPORTED_MODULE_5__[\"degrees\"];\n  };\n\n  projection.reflectX = function(_) {\n    return arguments.length ? (sx = _ ? -1 : 1, recenter()) : sx < 0;\n  };\n\n  projection.reflectY = function(_) {\n    return arguments.length ? (sy = _ ? -1 : 1, recenter()) : sy < 0;\n  };\n\n  projection.precision = function(_) {\n    return arguments.length ? (projectResample = Object(_resample_js__WEBPACK_IMPORTED_MODULE_9__[\"default\"])(projectTransform, delta2 = _ * _), reset()) : Object(_math_js__WEBPACK_IMPORTED_MODULE_5__[\"sqrt\"])(delta2);\n  };\n\n  projection.fitExtent = function(extent, object) {\n    return Object(_fit_js__WEBPACK_IMPORTED_MODULE_8__[\"fitExtent\"])(projection, extent, object);\n  };\n\n  projection.fitSize = function(size, object) {\n    return Object(_fit_js__WEBPACK_IMPORTED_MODULE_8__[\"fitSize\"])(projection, size, object);\n  };\n\n  projection.fitWidth = function(width, object) {\n    return Object(_fit_js__WEBPACK_IMPORTED_MODULE_8__[\"fitWidth\"])(projection, width, object);\n  };\n\n  projection.fitHeight = function(height, object) {\n    return Object(_fit_js__WEBPACK_IMPORTED_MODULE_8__[\"fitHeight\"])(projection, height, object);\n  };\n\n  function recenter() {\n    var center = scaleTranslateRotate(k, 0, 0, sx, sy, alpha).apply(null, project(lambda, phi)),\n        transform = (alpha ? scaleTranslateRotate : scaleTranslate)(k, x - center[0], y - center[1], sx, sy, alpha);\n    rotate = Object(_rotation_js__WEBPACK_IMPORTED_MODULE_6__[\"rotateRadians\"])(deltaLambda, deltaPhi, deltaGamma);\n    projectTransform = Object(_compose_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(project, transform);\n    projectRotateTransform = Object(_compose_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(rotate, projectTransform);\n    projectResample = Object(_resample_js__WEBPACK_IMPORTED_MODULE_9__[\"default\"])(projectTransform, delta2);\n    return reset();\n  }\n\n  function reset() {\n    cache = cacheStream = null;\n    return projection;\n  }\n\n  return function() {\n    project = projectAt.apply(this, arguments);\n    projection.invert = project.invert && invert;\n    return recenter();\n  };\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-geo/src/projection/mercator.js\":\n/*!******************************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-geo/src/projection/mercator.js ***!\n  \\******************************************************************************/\n/*! exports provided: mercatorRaw, default, mercatorProjection */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"mercatorRaw\", function() { return mercatorRaw; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"mercatorProjection\", function() { return mercatorProjection; });\n/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../math.js */ \"./node_modules/dagre-d3/node_modules/d3-geo/src/math.js\");\n/* harmony import */ var _rotation_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../rotation.js */ \"./node_modules/dagre-d3/node_modules/d3-geo/src/rotation.js\");\n/* harmony import */ var _index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./index.js */ \"./node_modules/dagre-d3/node_modules/d3-geo/src/projection/index.js\");\n\n\n\n\nfunction mercatorRaw(lambda, phi) {\n  return [lambda, Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"log\"])(Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"tan\"])((_math_js__WEBPACK_IMPORTED_MODULE_0__[\"halfPi\"] + phi) / 2))];\n}\n\nmercatorRaw.invert = function(x, y) {\n  return [x, 2 * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"atan\"])(Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"exp\"])(y)) - _math_js__WEBPACK_IMPORTED_MODULE_0__[\"halfPi\"]];\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  return mercatorProjection(mercatorRaw)\n      .scale(961 / _math_js__WEBPACK_IMPORTED_MODULE_0__[\"tau\"]);\n});\n\nfunction mercatorProjection(project) {\n  var m = Object(_index_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(project),\n      center = m.center,\n      scale = m.scale,\n      translate = m.translate,\n      clipExtent = m.clipExtent,\n      x0 = null, y0, x1, y1; // clip extent\n\n  m.scale = function(_) {\n    return arguments.length ? (scale(_), reclip()) : scale();\n  };\n\n  m.translate = function(_) {\n    return arguments.length ? (translate(_), reclip()) : translate();\n  };\n\n  m.center = function(_) {\n    return arguments.length ? (center(_), reclip()) : center();\n  };\n\n  m.clipExtent = function(_) {\n    return arguments.length ? ((_ == null ? x0 = y0 = x1 = y1 = null : (x0 = +_[0][0], y0 = +_[0][1], x1 = +_[1][0], y1 = +_[1][1])), reclip()) : x0 == null ? null : [[x0, y0], [x1, y1]];\n  };\n\n  function reclip() {\n    var k = _math_js__WEBPACK_IMPORTED_MODULE_0__[\"pi\"] * scale(),\n        t = m(Object(_rotation_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(m.rotate()).invert([0, 0]));\n    return clipExtent(x0 == null\n        ? [[t[0] - k, t[1] - k], [t[0] + k, t[1] + k]] : project === mercatorRaw\n        ? [[Math.max(t[0] - k, x0), y0], [Math.min(t[0] + k, x1), y1]]\n        : [[x0, Math.max(t[1] - k, y0)], [x1, Math.min(t[1] + k, y1)]]);\n  }\n\n  return reclip();\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-geo/src/projection/naturalEarth1.js\":\n/*!***********************************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-geo/src/projection/naturalEarth1.js ***!\n  \\***********************************************************************************/\n/*! exports provided: naturalEarth1Raw, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"naturalEarth1Raw\", function() { return naturalEarth1Raw; });\n/* harmony import */ var _index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./index.js */ \"./node_modules/dagre-d3/node_modules/d3-geo/src/projection/index.js\");\n/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../math.js */ \"./node_modules/dagre-d3/node_modules/d3-geo/src/math.js\");\n\n\n\nfunction naturalEarth1Raw(lambda, phi) {\n  var phi2 = phi * phi, phi4 = phi2 * phi2;\n  return [\n    lambda * (0.8707 - 0.131979 * phi2 + phi4 * (-0.013791 + phi4 * (0.003971 * phi2 - 0.001529 * phi4))),\n    phi * (1.007226 + phi2 * (0.015085 + phi4 * (-0.044475 + 0.028874 * phi2 - 0.005916 * phi4)))\n  ];\n}\n\nnaturalEarth1Raw.invert = function(x, y) {\n  var phi = y, i = 25, delta;\n  do {\n    var phi2 = phi * phi, phi4 = phi2 * phi2;\n    phi -= delta = (phi * (1.007226 + phi2 * (0.015085 + phi4 * (-0.044475 + 0.028874 * phi2 - 0.005916 * phi4))) - y) /\n        (1.007226 + phi2 * (0.015085 * 3 + phi4 * (-0.044475 * 7 + 0.028874 * 9 * phi2 - 0.005916 * 11 * phi4)));\n  } while (Object(_math_js__WEBPACK_IMPORTED_MODULE_1__[\"abs\"])(delta) > _math_js__WEBPACK_IMPORTED_MODULE_1__[\"epsilon\"] && --i > 0);\n  return [\n    x / (0.8707 + (phi2 = phi * phi) * (-0.131979 + phi2 * (-0.013791 + phi2 * phi2 * phi2 * (0.003971 - 0.001529 * phi2)))),\n    phi\n  ];\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  return Object(_index_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(naturalEarth1Raw)\n      .scale(175.295);\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-geo/src/projection/orthographic.js\":\n/*!**********************************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-geo/src/projection/orthographic.js ***!\n  \\**********************************************************************************/\n/*! exports provided: orthographicRaw, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"orthographicRaw\", function() { return orthographicRaw; });\n/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../math.js */ \"./node_modules/dagre-d3/node_modules/d3-geo/src/math.js\");\n/* harmony import */ var _azimuthal_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./azimuthal.js */ \"./node_modules/dagre-d3/node_modules/d3-geo/src/projection/azimuthal.js\");\n/* harmony import */ var _index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./index.js */ \"./node_modules/dagre-d3/node_modules/d3-geo/src/projection/index.js\");\n\n\n\n\nfunction orthographicRaw(x, y) {\n  return [Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"cos\"])(y) * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"sin\"])(x), Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"sin\"])(y)];\n}\n\northographicRaw.invert = Object(_azimuthal_js__WEBPACK_IMPORTED_MODULE_1__[\"azimuthalInvert\"])(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"asin\"]);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  return Object(_index_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(orthographicRaw)\n      .scale(249.5)\n      .clipAngle(90 + _math_js__WEBPACK_IMPORTED_MODULE_0__[\"epsilon\"]);\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-geo/src/projection/resample.js\":\n/*!******************************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-geo/src/projection/resample.js ***!\n  \\******************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _cartesian_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../cartesian.js */ \"./node_modules/dagre-d3/node_modules/d3-geo/src/cartesian.js\");\n/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../math.js */ \"./node_modules/dagre-d3/node_modules/d3-geo/src/math.js\");\n/* harmony import */ var _transform_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../transform.js */ \"./node_modules/dagre-d3/node_modules/d3-geo/src/transform.js\");\n\n\n\n\nvar maxDepth = 16, // maximum depth of subdivision\n    cosMinDistance = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__[\"cos\"])(30 * _math_js__WEBPACK_IMPORTED_MODULE_1__[\"radians\"]); // cos(minimum angular distance)\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(project, delta2) {\n  return +delta2 ? resample(project, delta2) : resampleNone(project);\n});\n\nfunction resampleNone(project) {\n  return Object(_transform_js__WEBPACK_IMPORTED_MODULE_2__[\"transformer\"])({\n    point: function(x, y) {\n      x = project(x, y);\n      this.stream.point(x[0], x[1]);\n    }\n  });\n}\n\nfunction resample(project, delta2) {\n\n  function resampleLineTo(x0, y0, lambda0, a0, b0, c0, x1, y1, lambda1, a1, b1, c1, depth, stream) {\n    var dx = x1 - x0,\n        dy = y1 - y0,\n        d2 = dx * dx + dy * dy;\n    if (d2 > 4 * delta2 && depth--) {\n      var a = a0 + a1,\n          b = b0 + b1,\n          c = c0 + c1,\n          m = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__[\"sqrt\"])(a * a + b * b + c * c),\n          phi2 = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__[\"asin\"])(c /= m),\n          lambda2 = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__[\"abs\"])(Object(_math_js__WEBPACK_IMPORTED_MODULE_1__[\"abs\"])(c) - 1) < _math_js__WEBPACK_IMPORTED_MODULE_1__[\"epsilon\"] || Object(_math_js__WEBPACK_IMPORTED_MODULE_1__[\"abs\"])(lambda0 - lambda1) < _math_js__WEBPACK_IMPORTED_MODULE_1__[\"epsilon\"] ? (lambda0 + lambda1) / 2 : Object(_math_js__WEBPACK_IMPORTED_MODULE_1__[\"atan2\"])(b, a),\n          p = project(lambda2, phi2),\n          x2 = p[0],\n          y2 = p[1],\n          dx2 = x2 - x0,\n          dy2 = y2 - y0,\n          dz = dy * dx2 - dx * dy2;\n      if (dz * dz / d2 > delta2 // perpendicular projected distance\n          || Object(_math_js__WEBPACK_IMPORTED_MODULE_1__[\"abs\"])((dx * dx2 + dy * dy2) / d2 - 0.5) > 0.3 // midpoint close to an end\n          || a0 * a1 + b0 * b1 + c0 * c1 < cosMinDistance) { // angular distance\n        resampleLineTo(x0, y0, lambda0, a0, b0, c0, x2, y2, lambda2, a /= m, b /= m, c, depth, stream);\n        stream.point(x2, y2);\n        resampleLineTo(x2, y2, lambda2, a, b, c, x1, y1, lambda1, a1, b1, c1, depth, stream);\n      }\n    }\n  }\n  return function(stream) {\n    var lambda00, x00, y00, a00, b00, c00, // first point\n        lambda0, x0, y0, a0, b0, c0; // previous point\n\n    var resampleStream = {\n      point: point,\n      lineStart: lineStart,\n      lineEnd: lineEnd,\n      polygonStart: function() { stream.polygonStart(); resampleStream.lineStart = ringStart; },\n      polygonEnd: function() { stream.polygonEnd(); resampleStream.lineStart = lineStart; }\n    };\n\n    function point(x, y) {\n      x = project(x, y);\n      stream.point(x[0], x[1]);\n    }\n\n    function lineStart() {\n      x0 = NaN;\n      resampleStream.point = linePoint;\n      stream.lineStart();\n    }\n\n    function linePoint(lambda, phi) {\n      var c = Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_0__[\"cartesian\"])([lambda, phi]), p = project(lambda, phi);\n      resampleLineTo(x0, y0, lambda0, a0, b0, c0, x0 = p[0], y0 = p[1], lambda0 = lambda, a0 = c[0], b0 = c[1], c0 = c[2], maxDepth, stream);\n      stream.point(x0, y0);\n    }\n\n    function lineEnd() {\n      resampleStream.point = point;\n      stream.lineEnd();\n    }\n\n    function ringStart() {\n      lineStart();\n      resampleStream.point = ringPoint;\n      resampleStream.lineEnd = ringEnd;\n    }\n\n    function ringPoint(lambda, phi) {\n      linePoint(lambda00 = lambda, phi), x00 = x0, y00 = y0, a00 = a0, b00 = b0, c00 = c0;\n      resampleStream.point = linePoint;\n    }\n\n    function ringEnd() {\n      resampleLineTo(x0, y0, lambda0, a0, b0, c0, x00, y00, lambda00, a00, b00, c00, maxDepth, stream);\n      resampleStream.lineEnd = lineEnd;\n      lineEnd();\n    }\n\n    return resampleStream;\n  };\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-geo/src/projection/stereographic.js\":\n/*!***********************************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-geo/src/projection/stereographic.js ***!\n  \\***********************************************************************************/\n/*! exports provided: stereographicRaw, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"stereographicRaw\", function() { return stereographicRaw; });\n/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../math.js */ \"./node_modules/dagre-d3/node_modules/d3-geo/src/math.js\");\n/* harmony import */ var _azimuthal_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./azimuthal.js */ \"./node_modules/dagre-d3/node_modules/d3-geo/src/projection/azimuthal.js\");\n/* harmony import */ var _index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./index.js */ \"./node_modules/dagre-d3/node_modules/d3-geo/src/projection/index.js\");\n\n\n\n\nfunction stereographicRaw(x, y) {\n  var cy = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"cos\"])(y), k = 1 + Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"cos\"])(x) * cy;\n  return [cy * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"sin\"])(x) / k, Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"sin\"])(y) / k];\n}\n\nstereographicRaw.invert = Object(_azimuthal_js__WEBPACK_IMPORTED_MODULE_1__[\"azimuthalInvert\"])(function(z) {\n  return 2 * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"atan\"])(z);\n});\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  return Object(_index_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(stereographicRaw)\n      .scale(250)\n      .clipAngle(142);\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-geo/src/projection/transverseMercator.js\":\n/*!****************************************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-geo/src/projection/transverseMercator.js ***!\n  \\****************************************************************************************/\n/*! exports provided: transverseMercatorRaw, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"transverseMercatorRaw\", function() { return transverseMercatorRaw; });\n/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../math.js */ \"./node_modules/dagre-d3/node_modules/d3-geo/src/math.js\");\n/* harmony import */ var _mercator_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./mercator.js */ \"./node_modules/dagre-d3/node_modules/d3-geo/src/projection/mercator.js\");\n\n\n\nfunction transverseMercatorRaw(lambda, phi) {\n  return [Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"log\"])(Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"tan\"])((_math_js__WEBPACK_IMPORTED_MODULE_0__[\"halfPi\"] + phi) / 2)), -lambda];\n}\n\ntransverseMercatorRaw.invert = function(x, y) {\n  return [-y, 2 * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"atan\"])(Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"exp\"])(x)) - _math_js__WEBPACK_IMPORTED_MODULE_0__[\"halfPi\"]];\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  var m = Object(_mercator_js__WEBPACK_IMPORTED_MODULE_1__[\"mercatorProjection\"])(transverseMercatorRaw),\n      center = m.center,\n      rotate = m.rotate;\n\n  m.center = function(_) {\n    return arguments.length ? center([-_[1], _[0]]) : (_ = center(), [_[1], -_[0]]);\n  };\n\n  m.rotate = function(_) {\n    return arguments.length ? rotate([_[0], _[1], _.length > 2 ? _[2] + 90 : 90]) : (_ = rotate(), [_[0], _[1], _[2] - 90]);\n  };\n\n  return rotate([0, 0, 90])\n      .scale(159.155);\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-geo/src/rotation.js\":\n/*!*******************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-geo/src/rotation.js ***!\n  \\*******************************************************************/\n/*! exports provided: rotateRadians, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"rotateRadians\", function() { return rotateRadians; });\n/* harmony import */ var _compose_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./compose.js */ \"./node_modules/dagre-d3/node_modules/d3-geo/src/compose.js\");\n/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./math.js */ \"./node_modules/dagre-d3/node_modules/d3-geo/src/math.js\");\n\n\n\nfunction rotationIdentity(lambda, phi) {\n  return [Object(_math_js__WEBPACK_IMPORTED_MODULE_1__[\"abs\"])(lambda) > _math_js__WEBPACK_IMPORTED_MODULE_1__[\"pi\"] ? lambda + Math.round(-lambda / _math_js__WEBPACK_IMPORTED_MODULE_1__[\"tau\"]) * _math_js__WEBPACK_IMPORTED_MODULE_1__[\"tau\"] : lambda, phi];\n}\n\nrotationIdentity.invert = rotationIdentity;\n\nfunction rotateRadians(deltaLambda, deltaPhi, deltaGamma) {\n  return (deltaLambda %= _math_js__WEBPACK_IMPORTED_MODULE_1__[\"tau\"]) ? (deltaPhi || deltaGamma ? Object(_compose_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(rotationLambda(deltaLambda), rotationPhiGamma(deltaPhi, deltaGamma))\n    : rotationLambda(deltaLambda))\n    : (deltaPhi || deltaGamma ? rotationPhiGamma(deltaPhi, deltaGamma)\n    : rotationIdentity);\n}\n\nfunction forwardRotationLambda(deltaLambda) {\n  return function(lambda, phi) {\n    return lambda += deltaLambda, [lambda > _math_js__WEBPACK_IMPORTED_MODULE_1__[\"pi\"] ? lambda - _math_js__WEBPACK_IMPORTED_MODULE_1__[\"tau\"] : lambda < -_math_js__WEBPACK_IMPORTED_MODULE_1__[\"pi\"] ? lambda + _math_js__WEBPACK_IMPORTED_MODULE_1__[\"tau\"] : lambda, phi];\n  };\n}\n\nfunction rotationLambda(deltaLambda) {\n  var rotation = forwardRotationLambda(deltaLambda);\n  rotation.invert = forwardRotationLambda(-deltaLambda);\n  return rotation;\n}\n\nfunction rotationPhiGamma(deltaPhi, deltaGamma) {\n  var cosDeltaPhi = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__[\"cos\"])(deltaPhi),\n      sinDeltaPhi = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__[\"sin\"])(deltaPhi),\n      cosDeltaGamma = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__[\"cos\"])(deltaGamma),\n      sinDeltaGamma = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__[\"sin\"])(deltaGamma);\n\n  function rotation(lambda, phi) {\n    var cosPhi = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__[\"cos\"])(phi),\n        x = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__[\"cos\"])(lambda) * cosPhi,\n        y = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__[\"sin\"])(lambda) * cosPhi,\n        z = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__[\"sin\"])(phi),\n        k = z * cosDeltaPhi + x * sinDeltaPhi;\n    return [\n      Object(_math_js__WEBPACK_IMPORTED_MODULE_1__[\"atan2\"])(y * cosDeltaGamma - k * sinDeltaGamma, x * cosDeltaPhi - z * sinDeltaPhi),\n      Object(_math_js__WEBPACK_IMPORTED_MODULE_1__[\"asin\"])(k * cosDeltaGamma + y * sinDeltaGamma)\n    ];\n  }\n\n  rotation.invert = function(lambda, phi) {\n    var cosPhi = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__[\"cos\"])(phi),\n        x = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__[\"cos\"])(lambda) * cosPhi,\n        y = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__[\"sin\"])(lambda) * cosPhi,\n        z = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__[\"sin\"])(phi),\n        k = z * cosDeltaGamma - y * sinDeltaGamma;\n    return [\n      Object(_math_js__WEBPACK_IMPORTED_MODULE_1__[\"atan2\"])(y * cosDeltaGamma + z * sinDeltaGamma, x * cosDeltaPhi + k * sinDeltaPhi),\n      Object(_math_js__WEBPACK_IMPORTED_MODULE_1__[\"asin\"])(k * cosDeltaPhi - x * sinDeltaPhi)\n    ];\n  };\n\n  return rotation;\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(rotate) {\n  rotate = rotateRadians(rotate[0] * _math_js__WEBPACK_IMPORTED_MODULE_1__[\"radians\"], rotate[1] * _math_js__WEBPACK_IMPORTED_MODULE_1__[\"radians\"], rotate.length > 2 ? rotate[2] * _math_js__WEBPACK_IMPORTED_MODULE_1__[\"radians\"] : 0);\n\n  function forward(coordinates) {\n    coordinates = rotate(coordinates[0] * _math_js__WEBPACK_IMPORTED_MODULE_1__[\"radians\"], coordinates[1] * _math_js__WEBPACK_IMPORTED_MODULE_1__[\"radians\"]);\n    return coordinates[0] *= _math_js__WEBPACK_IMPORTED_MODULE_1__[\"degrees\"], coordinates[1] *= _math_js__WEBPACK_IMPORTED_MODULE_1__[\"degrees\"], coordinates;\n  }\n\n  forward.invert = function(coordinates) {\n    coordinates = rotate.invert(coordinates[0] * _math_js__WEBPACK_IMPORTED_MODULE_1__[\"radians\"], coordinates[1] * _math_js__WEBPACK_IMPORTED_MODULE_1__[\"radians\"]);\n    return coordinates[0] *= _math_js__WEBPACK_IMPORTED_MODULE_1__[\"degrees\"], coordinates[1] *= _math_js__WEBPACK_IMPORTED_MODULE_1__[\"degrees\"], coordinates;\n  };\n\n  return forward;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-geo/src/stream.js\":\n/*!*****************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-geo/src/stream.js ***!\n  \\*****************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\nfunction streamGeometry(geometry, stream) {\n  if (geometry && streamGeometryType.hasOwnProperty(geometry.type)) {\n    streamGeometryType[geometry.type](geometry, stream);\n  }\n}\n\nvar streamObjectType = {\n  Feature: function(object, stream) {\n    streamGeometry(object.geometry, stream);\n  },\n  FeatureCollection: function(object, stream) {\n    var features = object.features, i = -1, n = features.length;\n    while (++i < n) streamGeometry(features[i].geometry, stream);\n  }\n};\n\nvar streamGeometryType = {\n  Sphere: function(object, stream) {\n    stream.sphere();\n  },\n  Point: function(object, stream) {\n    object = object.coordinates;\n    stream.point(object[0], object[1], object[2]);\n  },\n  MultiPoint: function(object, stream) {\n    var coordinates = object.coordinates, i = -1, n = coordinates.length;\n    while (++i < n) object = coordinates[i], stream.point(object[0], object[1], object[2]);\n  },\n  LineString: function(object, stream) {\n    streamLine(object.coordinates, stream, 0);\n  },\n  MultiLineString: function(object, stream) {\n    var coordinates = object.coordinates, i = -1, n = coordinates.length;\n    while (++i < n) streamLine(coordinates[i], stream, 0);\n  },\n  Polygon: function(object, stream) {\n    streamPolygon(object.coordinates, stream);\n  },\n  MultiPolygon: function(object, stream) {\n    var coordinates = object.coordinates, i = -1, n = coordinates.length;\n    while (++i < n) streamPolygon(coordinates[i], stream);\n  },\n  GeometryCollection: function(object, stream) {\n    var geometries = object.geometries, i = -1, n = geometries.length;\n    while (++i < n) streamGeometry(geometries[i], stream);\n  }\n};\n\nfunction streamLine(coordinates, stream, closed) {\n  var i = -1, n = coordinates.length - closed, coordinate;\n  stream.lineStart();\n  while (++i < n) coordinate = coordinates[i], stream.point(coordinate[0], coordinate[1], coordinate[2]);\n  stream.lineEnd();\n}\n\nfunction streamPolygon(coordinates, stream) {\n  var i = -1, n = coordinates.length;\n  stream.polygonStart();\n  while (++i < n) streamLine(coordinates[i], stream, 1);\n  stream.polygonEnd();\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(object, stream) {\n  if (object && streamObjectType.hasOwnProperty(object.type)) {\n    streamObjectType[object.type](object, stream);\n  } else {\n    streamGeometry(object, stream);\n  }\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-geo/src/transform.js\":\n/*!********************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-geo/src/transform.js ***!\n  \\********************************************************************/\n/*! exports provided: default, transformer */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"transformer\", function() { return transformer; });\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(methods) {\n  return {\n    stream: transformer(methods)\n  };\n});\n\nfunction transformer(methods) {\n  return function(stream) {\n    var s = new TransformStream;\n    for (var key in methods) s[key] = methods[key];\n    s.stream = stream;\n    return s;\n  };\n}\n\nfunction TransformStream() {}\n\nTransformStream.prototype = {\n  constructor: TransformStream,\n  point: function(x, y) { this.stream.point(x, y); },\n  sphere: function() { this.stream.sphere(); },\n  lineStart: function() { this.stream.lineStart(); },\n  lineEnd: function() { this.stream.lineEnd(); },\n  polygonStart: function() { this.stream.polygonStart(); },\n  polygonEnd: function() { this.stream.polygonEnd(); }\n};\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-hierarchy/src/accessors.js\":\n/*!**************************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-hierarchy/src/accessors.js ***!\n  \\**************************************************************************/\n/*! exports provided: optional, required */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"optional\", function() { return optional; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"required\", function() { return required; });\nfunction optional(f) {\n  return f == null ? null : required(f);\n}\n\nfunction required(f) {\n  if (typeof f !== \"function\") throw new Error;\n  return f;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-hierarchy/src/array.js\":\n/*!**********************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-hierarchy/src/array.js ***!\n  \\**********************************************************************/\n/*! exports provided: slice, shuffle */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"slice\", function() { return slice; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"shuffle\", function() { return shuffle; });\nvar slice = Array.prototype.slice;\n\nfunction shuffle(array) {\n  var m = array.length,\n      t,\n      i;\n\n  while (m) {\n    i = Math.random() * m-- | 0;\n    t = array[m];\n    array[m] = array[i];\n    array[i] = t;\n  }\n\n  return array;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-hierarchy/src/cluster.js\":\n/*!************************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-hierarchy/src/cluster.js ***!\n  \\************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\nfunction defaultSeparation(a, b) {\n  return a.parent === b.parent ? 1 : 2;\n}\n\nfunction meanX(children) {\n  return children.reduce(meanXReduce, 0) / children.length;\n}\n\nfunction meanXReduce(x, c) {\n  return x + c.x;\n}\n\nfunction maxY(children) {\n  return 1 + children.reduce(maxYReduce, 0);\n}\n\nfunction maxYReduce(y, c) {\n  return Math.max(y, c.y);\n}\n\nfunction leafLeft(node) {\n  var children;\n  while (children = node.children) node = children[0];\n  return node;\n}\n\nfunction leafRight(node) {\n  var children;\n  while (children = node.children) node = children[children.length - 1];\n  return node;\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  var separation = defaultSeparation,\n      dx = 1,\n      dy = 1,\n      nodeSize = false;\n\n  function cluster(root) {\n    var previousNode,\n        x = 0;\n\n    // First walk, computing the initial x & y values.\n    root.eachAfter(function(node) {\n      var children = node.children;\n      if (children) {\n        node.x = meanX(children);\n        node.y = maxY(children);\n      } else {\n        node.x = previousNode ? x += separation(node, previousNode) : 0;\n        node.y = 0;\n        previousNode = node;\n      }\n    });\n\n    var left = leafLeft(root),\n        right = leafRight(root),\n        x0 = left.x - separation(left, right) / 2,\n        x1 = right.x + separation(right, left) / 2;\n\n    // Second walk, normalizing x & y to the desired size.\n    return root.eachAfter(nodeSize ? function(node) {\n      node.x = (node.x - root.x) * dx;\n      node.y = (root.y - node.y) * dy;\n    } : function(node) {\n      node.x = (node.x - x0) / (x1 - x0) * dx;\n      node.y = (1 - (root.y ? node.y / root.y : 1)) * dy;\n    });\n  }\n\n  cluster.separation = function(x) {\n    return arguments.length ? (separation = x, cluster) : separation;\n  };\n\n  cluster.size = function(x) {\n    return arguments.length ? (nodeSize = false, dx = +x[0], dy = +x[1], cluster) : (nodeSize ? null : [dx, dy]);\n  };\n\n  cluster.nodeSize = function(x) {\n    return arguments.length ? (nodeSize = true, dx = +x[0], dy = +x[1], cluster) : (nodeSize ? [dx, dy] : null);\n  };\n\n  return cluster;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-hierarchy/src/constant.js\":\n/*!*************************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-hierarchy/src/constant.js ***!\n  \\*************************************************************************/\n/*! exports provided: constantZero, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"constantZero\", function() { return constantZero; });\nfunction constantZero() {\n  return 0;\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(x) {\n  return function() {\n    return x;\n  };\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-hierarchy/src/hierarchy/ancestors.js\":\n/*!************************************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-hierarchy/src/hierarchy/ancestors.js ***!\n  \\************************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  var node = this, nodes = [node];\n  while (node = node.parent) {\n    nodes.push(node);\n  }\n  return nodes;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-hierarchy/src/hierarchy/count.js\":\n/*!********************************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-hierarchy/src/hierarchy/count.js ***!\n  \\********************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\nfunction count(node) {\n  var sum = 0,\n      children = node.children,\n      i = children && children.length;\n  if (!i) sum = 1;\n  else while (--i >= 0) sum += children[i].value;\n  node.value = sum;\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  return this.eachAfter(count);\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-hierarchy/src/hierarchy/descendants.js\":\n/*!**************************************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-hierarchy/src/hierarchy/descendants.js ***!\n  \\**************************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  var nodes = [];\n  this.each(function(node) {\n    nodes.push(node);\n  });\n  return nodes;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-hierarchy/src/hierarchy/each.js\":\n/*!*******************************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-hierarchy/src/hierarchy/each.js ***!\n  \\*******************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(callback) {\n  var node = this, current, next = [node], children, i, n;\n  do {\n    current = next.reverse(), next = [];\n    while (node = current.pop()) {\n      callback(node), children = node.children;\n      if (children) for (i = 0, n = children.length; i < n; ++i) {\n        next.push(children[i]);\n      }\n    }\n  } while (next.length);\n  return this;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-hierarchy/src/hierarchy/eachAfter.js\":\n/*!************************************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-hierarchy/src/hierarchy/eachAfter.js ***!\n  \\************************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(callback) {\n  var node = this, nodes = [node], next = [], children, i, n;\n  while (node = nodes.pop()) {\n    next.push(node), children = node.children;\n    if (children) for (i = 0, n = children.length; i < n; ++i) {\n      nodes.push(children[i]);\n    }\n  }\n  while (node = next.pop()) {\n    callback(node);\n  }\n  return this;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-hierarchy/src/hierarchy/eachBefore.js\":\n/*!*************************************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-hierarchy/src/hierarchy/eachBefore.js ***!\n  \\*************************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(callback) {\n  var node = this, nodes = [node], children, i;\n  while (node = nodes.pop()) {\n    callback(node), children = node.children;\n    if (children) for (i = children.length - 1; i >= 0; --i) {\n      nodes.push(children[i]);\n    }\n  }\n  return this;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-hierarchy/src/hierarchy/index.js\":\n/*!********************************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-hierarchy/src/hierarchy/index.js ***!\n  \\********************************************************************************/\n/*! exports provided: default, computeHeight, Node */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return hierarchy; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"computeHeight\", function() { return computeHeight; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Node\", function() { return Node; });\n/* harmony import */ var _count_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./count.js */ \"./node_modules/dagre-d3/node_modules/d3-hierarchy/src/hierarchy/count.js\");\n/* harmony import */ var _each_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./each.js */ \"./node_modules/dagre-d3/node_modules/d3-hierarchy/src/hierarchy/each.js\");\n/* harmony import */ var _eachBefore_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./eachBefore.js */ \"./node_modules/dagre-d3/node_modules/d3-hierarchy/src/hierarchy/eachBefore.js\");\n/* harmony import */ var _eachAfter_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./eachAfter.js */ \"./node_modules/dagre-d3/node_modules/d3-hierarchy/src/hierarchy/eachAfter.js\");\n/* harmony import */ var _sum_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./sum.js */ \"./node_modules/dagre-d3/node_modules/d3-hierarchy/src/hierarchy/sum.js\");\n/* harmony import */ var _sort_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./sort.js */ \"./node_modules/dagre-d3/node_modules/d3-hierarchy/src/hierarchy/sort.js\");\n/* harmony import */ var _path_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./path.js */ \"./node_modules/dagre-d3/node_modules/d3-hierarchy/src/hierarchy/path.js\");\n/* harmony import */ var _ancestors_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./ancestors.js */ \"./node_modules/dagre-d3/node_modules/d3-hierarchy/src/hierarchy/ancestors.js\");\n/* harmony import */ var _descendants_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./descendants.js */ \"./node_modules/dagre-d3/node_modules/d3-hierarchy/src/hierarchy/descendants.js\");\n/* harmony import */ var _leaves_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./leaves.js */ \"./node_modules/dagre-d3/node_modules/d3-hierarchy/src/hierarchy/leaves.js\");\n/* harmony import */ var _links_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./links.js */ \"./node_modules/dagre-d3/node_modules/d3-hierarchy/src/hierarchy/links.js\");\n\n\n\n\n\n\n\n\n\n\n\n\nfunction hierarchy(data, children) {\n  var root = new Node(data),\n      valued = +data.value && (root.value = data.value),\n      node,\n      nodes = [root],\n      child,\n      childs,\n      i,\n      n;\n\n  if (children == null) children = defaultChildren;\n\n  while (node = nodes.pop()) {\n    if (valued) node.value = +node.data.value;\n    if ((childs = children(node.data)) && (n = childs.length)) {\n      node.children = new Array(n);\n      for (i = n - 1; i >= 0; --i) {\n        nodes.push(child = node.children[i] = new Node(childs[i]));\n        child.parent = node;\n        child.depth = node.depth + 1;\n      }\n    }\n  }\n\n  return root.eachBefore(computeHeight);\n}\n\nfunction node_copy() {\n  return hierarchy(this).eachBefore(copyData);\n}\n\nfunction defaultChildren(d) {\n  return d.children;\n}\n\nfunction copyData(node) {\n  node.data = node.data.data;\n}\n\nfunction computeHeight(node) {\n  var height = 0;\n  do node.height = height;\n  while ((node = node.parent) && (node.height < ++height));\n}\n\nfunction Node(data) {\n  this.data = data;\n  this.depth =\n  this.height = 0;\n  this.parent = null;\n}\n\nNode.prototype = hierarchy.prototype = {\n  constructor: Node,\n  count: _count_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"],\n  each: _each_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"],\n  eachAfter: _eachAfter_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"],\n  eachBefore: _eachBefore_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"],\n  sum: _sum_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"],\n  sort: _sort_js__WEBPACK_IMPORTED_MODULE_5__[\"default\"],\n  path: _path_js__WEBPACK_IMPORTED_MODULE_6__[\"default\"],\n  ancestors: _ancestors_js__WEBPACK_IMPORTED_MODULE_7__[\"default\"],\n  descendants: _descendants_js__WEBPACK_IMPORTED_MODULE_8__[\"default\"],\n  leaves: _leaves_js__WEBPACK_IMPORTED_MODULE_9__[\"default\"],\n  links: _links_js__WEBPACK_IMPORTED_MODULE_10__[\"default\"],\n  copy: node_copy\n};\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-hierarchy/src/hierarchy/leaves.js\":\n/*!*********************************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-hierarchy/src/hierarchy/leaves.js ***!\n  \\*********************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  var leaves = [];\n  this.eachBefore(function(node) {\n    if (!node.children) {\n      leaves.push(node);\n    }\n  });\n  return leaves;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-hierarchy/src/hierarchy/links.js\":\n/*!********************************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-hierarchy/src/hierarchy/links.js ***!\n  \\********************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  var root = this, links = [];\n  root.each(function(node) {\n    if (node !== root) { // Don’t include the root’s parent, if any.\n      links.push({source: node.parent, target: node});\n    }\n  });\n  return links;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-hierarchy/src/hierarchy/path.js\":\n/*!*******************************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-hierarchy/src/hierarchy/path.js ***!\n  \\*******************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(end) {\n  var start = this,\n      ancestor = leastCommonAncestor(start, end),\n      nodes = [start];\n  while (start !== ancestor) {\n    start = start.parent;\n    nodes.push(start);\n  }\n  var k = nodes.length;\n  while (end !== ancestor) {\n    nodes.splice(k, 0, end);\n    end = end.parent;\n  }\n  return nodes;\n});\n\nfunction leastCommonAncestor(a, b) {\n  if (a === b) return a;\n  var aNodes = a.ancestors(),\n      bNodes = b.ancestors(),\n      c = null;\n  a = aNodes.pop();\n  b = bNodes.pop();\n  while (a === b) {\n    c = a;\n    a = aNodes.pop();\n    b = bNodes.pop();\n  }\n  return c;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-hierarchy/src/hierarchy/sort.js\":\n/*!*******************************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-hierarchy/src/hierarchy/sort.js ***!\n  \\*******************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(compare) {\n  return this.eachBefore(function(node) {\n    if (node.children) {\n      node.children.sort(compare);\n    }\n  });\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-hierarchy/src/hierarchy/sum.js\":\n/*!******************************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-hierarchy/src/hierarchy/sum.js ***!\n  \\******************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(value) {\n  return this.eachAfter(function(node) {\n    var sum = +value(node.data) || 0,\n        children = node.children,\n        i = children && children.length;\n    while (--i >= 0) sum += children[i].value;\n    node.value = sum;\n  });\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-hierarchy/src/index.js\":\n/*!**********************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-hierarchy/src/index.js ***!\n  \\**********************************************************************/\n/*! exports provided: cluster, hierarchy, pack, packSiblings, packEnclose, partition, stratify, tree, treemap, treemapBinary, treemapDice, treemapSlice, treemapSliceDice, treemapSquarify, treemapResquarify */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _cluster_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./cluster.js */ \"./node_modules/dagre-d3/node_modules/d3-hierarchy/src/cluster.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"cluster\", function() { return _cluster_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n/* harmony import */ var _hierarchy_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./hierarchy/index.js */ \"./node_modules/dagre-d3/node_modules/d3-hierarchy/src/hierarchy/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"hierarchy\", function() { return _hierarchy_index_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"]; });\n\n/* harmony import */ var _pack_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./pack/index.js */ \"./node_modules/dagre-d3/node_modules/d3-hierarchy/src/pack/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"pack\", function() { return _pack_index_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"]; });\n\n/* harmony import */ var _pack_siblings_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./pack/siblings.js */ \"./node_modules/dagre-d3/node_modules/d3-hierarchy/src/pack/siblings.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"packSiblings\", function() { return _pack_siblings_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"]; });\n\n/* harmony import */ var _pack_enclose_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./pack/enclose.js */ \"./node_modules/dagre-d3/node_modules/d3-hierarchy/src/pack/enclose.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"packEnclose\", function() { return _pack_enclose_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"]; });\n\n/* harmony import */ var _partition_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./partition.js */ \"./node_modules/dagre-d3/node_modules/d3-hierarchy/src/partition.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"partition\", function() { return _partition_js__WEBPACK_IMPORTED_MODULE_5__[\"default\"]; });\n\n/* harmony import */ var _stratify_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./stratify.js */ \"./node_modules/dagre-d3/node_modules/d3-hierarchy/src/stratify.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"stratify\", function() { return _stratify_js__WEBPACK_IMPORTED_MODULE_6__[\"default\"]; });\n\n/* harmony import */ var _tree_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./tree.js */ \"./node_modules/dagre-d3/node_modules/d3-hierarchy/src/tree.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"tree\", function() { return _tree_js__WEBPACK_IMPORTED_MODULE_7__[\"default\"]; });\n\n/* harmony import */ var _treemap_index_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./treemap/index.js */ \"./node_modules/dagre-d3/node_modules/d3-hierarchy/src/treemap/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"treemap\", function() { return _treemap_index_js__WEBPACK_IMPORTED_MODULE_8__[\"default\"]; });\n\n/* harmony import */ var _treemap_binary_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./treemap/binary.js */ \"./node_modules/dagre-d3/node_modules/d3-hierarchy/src/treemap/binary.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"treemapBinary\", function() { return _treemap_binary_js__WEBPACK_IMPORTED_MODULE_9__[\"default\"]; });\n\n/* harmony import */ var _treemap_dice_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./treemap/dice.js */ \"./node_modules/dagre-d3/node_modules/d3-hierarchy/src/treemap/dice.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"treemapDice\", function() { return _treemap_dice_js__WEBPACK_IMPORTED_MODULE_10__[\"default\"]; });\n\n/* harmony import */ var _treemap_slice_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./treemap/slice.js */ \"./node_modules/dagre-d3/node_modules/d3-hierarchy/src/treemap/slice.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"treemapSlice\", function() { return _treemap_slice_js__WEBPACK_IMPORTED_MODULE_11__[\"default\"]; });\n\n/* harmony import */ var _treemap_sliceDice_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./treemap/sliceDice.js */ \"./node_modules/dagre-d3/node_modules/d3-hierarchy/src/treemap/sliceDice.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"treemapSliceDice\", function() { return _treemap_sliceDice_js__WEBPACK_IMPORTED_MODULE_12__[\"default\"]; });\n\n/* harmony import */ var _treemap_squarify_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./treemap/squarify.js */ \"./node_modules/dagre-d3/node_modules/d3-hierarchy/src/treemap/squarify.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"treemapSquarify\", function() { return _treemap_squarify_js__WEBPACK_IMPORTED_MODULE_13__[\"default\"]; });\n\n/* harmony import */ var _treemap_resquarify_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./treemap/resquarify.js */ \"./node_modules/dagre-d3/node_modules/d3-hierarchy/src/treemap/resquarify.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"treemapResquarify\", function() { return _treemap_resquarify_js__WEBPACK_IMPORTED_MODULE_14__[\"default\"]; });\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-hierarchy/src/pack/enclose.js\":\n/*!*****************************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-hierarchy/src/pack/enclose.js ***!\n  \\*****************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _array_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../array.js */ \"./node_modules/dagre-d3/node_modules/d3-hierarchy/src/array.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(circles) {\n  var i = 0, n = (circles = Object(_array_js__WEBPACK_IMPORTED_MODULE_0__[\"shuffle\"])(_array_js__WEBPACK_IMPORTED_MODULE_0__[\"slice\"].call(circles))).length, B = [], p, e;\n\n  while (i < n) {\n    p = circles[i];\n    if (e && enclosesWeak(e, p)) ++i;\n    else e = encloseBasis(B = extendBasis(B, p)), i = 0;\n  }\n\n  return e;\n});\n\nfunction extendBasis(B, p) {\n  var i, j;\n\n  if (enclosesWeakAll(p, B)) return [p];\n\n  // If we get here then B must have at least one element.\n  for (i = 0; i < B.length; ++i) {\n    if (enclosesNot(p, B[i])\n        && enclosesWeakAll(encloseBasis2(B[i], p), B)) {\n      return [B[i], p];\n    }\n  }\n\n  // If we get here then B must have at least two elements.\n  for (i = 0; i < B.length - 1; ++i) {\n    for (j = i + 1; j < B.length; ++j) {\n      if (enclosesNot(encloseBasis2(B[i], B[j]), p)\n          && enclosesNot(encloseBasis2(B[i], p), B[j])\n          && enclosesNot(encloseBasis2(B[j], p), B[i])\n          && enclosesWeakAll(encloseBasis3(B[i], B[j], p), B)) {\n        return [B[i], B[j], p];\n      }\n    }\n  }\n\n  // If we get here then something is very wrong.\n  throw new Error;\n}\n\nfunction enclosesNot(a, b) {\n  var dr = a.r - b.r, dx = b.x - a.x, dy = b.y - a.y;\n  return dr < 0 || dr * dr < dx * dx + dy * dy;\n}\n\nfunction enclosesWeak(a, b) {\n  var dr = a.r - b.r + 1e-6, dx = b.x - a.x, dy = b.y - a.y;\n  return dr > 0 && dr * dr > dx * dx + dy * dy;\n}\n\nfunction enclosesWeakAll(a, B) {\n  for (var i = 0; i < B.length; ++i) {\n    if (!enclosesWeak(a, B[i])) {\n      return false;\n    }\n  }\n  return true;\n}\n\nfunction encloseBasis(B) {\n  switch (B.length) {\n    case 1: return encloseBasis1(B[0]);\n    case 2: return encloseBasis2(B[0], B[1]);\n    case 3: return encloseBasis3(B[0], B[1], B[2]);\n  }\n}\n\nfunction encloseBasis1(a) {\n  return {\n    x: a.x,\n    y: a.y,\n    r: a.r\n  };\n}\n\nfunction encloseBasis2(a, b) {\n  var x1 = a.x, y1 = a.y, r1 = a.r,\n      x2 = b.x, y2 = b.y, r2 = b.r,\n      x21 = x2 - x1, y21 = y2 - y1, r21 = r2 - r1,\n      l = Math.sqrt(x21 * x21 + y21 * y21);\n  return {\n    x: (x1 + x2 + x21 / l * r21) / 2,\n    y: (y1 + y2 + y21 / l * r21) / 2,\n    r: (l + r1 + r2) / 2\n  };\n}\n\nfunction encloseBasis3(a, b, c) {\n  var x1 = a.x, y1 = a.y, r1 = a.r,\n      x2 = b.x, y2 = b.y, r2 = b.r,\n      x3 = c.x, y3 = c.y, r3 = c.r,\n      a2 = x1 - x2,\n      a3 = x1 - x3,\n      b2 = y1 - y2,\n      b3 = y1 - y3,\n      c2 = r2 - r1,\n      c3 = r3 - r1,\n      d1 = x1 * x1 + y1 * y1 - r1 * r1,\n      d2 = d1 - x2 * x2 - y2 * y2 + r2 * r2,\n      d3 = d1 - x3 * x3 - y3 * y3 + r3 * r3,\n      ab = a3 * b2 - a2 * b3,\n      xa = (b2 * d3 - b3 * d2) / (ab * 2) - x1,\n      xb = (b3 * c2 - b2 * c3) / ab,\n      ya = (a3 * d2 - a2 * d3) / (ab * 2) - y1,\n      yb = (a2 * c3 - a3 * c2) / ab,\n      A = xb * xb + yb * yb - 1,\n      B = 2 * (r1 + xa * xb + ya * yb),\n      C = xa * xa + ya * ya - r1 * r1,\n      r = -(A ? (B + Math.sqrt(B * B - 4 * A * C)) / (2 * A) : C / B);\n  return {\n    x: x1 + xa + xb * r,\n    y: y1 + ya + yb * r,\n    r: r\n  };\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-hierarchy/src/pack/index.js\":\n/*!***************************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-hierarchy/src/pack/index.js ***!\n  \\***************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _siblings_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./siblings.js */ \"./node_modules/dagre-d3/node_modules/d3-hierarchy/src/pack/siblings.js\");\n/* harmony import */ var _accessors_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../accessors.js */ \"./node_modules/dagre-d3/node_modules/d3-hierarchy/src/accessors.js\");\n/* harmony import */ var _constant_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../constant.js */ \"./node_modules/dagre-d3/node_modules/d3-hierarchy/src/constant.js\");\n\n\n\n\nfunction defaultRadius(d) {\n  return Math.sqrt(d.value);\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  var radius = null,\n      dx = 1,\n      dy = 1,\n      padding = _constant_js__WEBPACK_IMPORTED_MODULE_2__[\"constantZero\"];\n\n  function pack(root) {\n    root.x = dx / 2, root.y = dy / 2;\n    if (radius) {\n      root.eachBefore(radiusLeaf(radius))\n          .eachAfter(packChildren(padding, 0.5))\n          .eachBefore(translateChild(1));\n    } else {\n      root.eachBefore(radiusLeaf(defaultRadius))\n          .eachAfter(packChildren(_constant_js__WEBPACK_IMPORTED_MODULE_2__[\"constantZero\"], 1))\n          .eachAfter(packChildren(padding, root.r / Math.min(dx, dy)))\n          .eachBefore(translateChild(Math.min(dx, dy) / (2 * root.r)));\n    }\n    return root;\n  }\n\n  pack.radius = function(x) {\n    return arguments.length ? (radius = Object(_accessors_js__WEBPACK_IMPORTED_MODULE_1__[\"optional\"])(x), pack) : radius;\n  };\n\n  pack.size = function(x) {\n    return arguments.length ? (dx = +x[0], dy = +x[1], pack) : [dx, dy];\n  };\n\n  pack.padding = function(x) {\n    return arguments.length ? (padding = typeof x === \"function\" ? x : Object(_constant_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(+x), pack) : padding;\n  };\n\n  return pack;\n});\n\nfunction radiusLeaf(radius) {\n  return function(node) {\n    if (!node.children) {\n      node.r = Math.max(0, +radius(node) || 0);\n    }\n  };\n}\n\nfunction packChildren(padding, k) {\n  return function(node) {\n    if (children = node.children) {\n      var children,\n          i,\n          n = children.length,\n          r = padding(node) * k || 0,\n          e;\n\n      if (r) for (i = 0; i < n; ++i) children[i].r += r;\n      e = Object(_siblings_js__WEBPACK_IMPORTED_MODULE_0__[\"packEnclose\"])(children);\n      if (r) for (i = 0; i < n; ++i) children[i].r -= r;\n      node.r = e + r;\n    }\n  };\n}\n\nfunction translateChild(k) {\n  return function(node) {\n    var parent = node.parent;\n    node.r *= k;\n    if (parent) {\n      node.x = parent.x + k * node.x;\n      node.y = parent.y + k * node.y;\n    }\n  };\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-hierarchy/src/pack/siblings.js\":\n/*!******************************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-hierarchy/src/pack/siblings.js ***!\n  \\******************************************************************************/\n/*! exports provided: packEnclose, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"packEnclose\", function() { return packEnclose; });\n/* harmony import */ var _enclose_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./enclose.js */ \"./node_modules/dagre-d3/node_modules/d3-hierarchy/src/pack/enclose.js\");\n\n\nfunction place(b, a, c) {\n  var dx = b.x - a.x, x, a2,\n      dy = b.y - a.y, y, b2,\n      d2 = dx * dx + dy * dy;\n  if (d2) {\n    a2 = a.r + c.r, a2 *= a2;\n    b2 = b.r + c.r, b2 *= b2;\n    if (a2 > b2) {\n      x = (d2 + b2 - a2) / (2 * d2);\n      y = Math.sqrt(Math.max(0, b2 / d2 - x * x));\n      c.x = b.x - x * dx - y * dy;\n      c.y = b.y - x * dy + y * dx;\n    } else {\n      x = (d2 + a2 - b2) / (2 * d2);\n      y = Math.sqrt(Math.max(0, a2 / d2 - x * x));\n      c.x = a.x + x * dx - y * dy;\n      c.y = a.y + x * dy + y * dx;\n    }\n  } else {\n    c.x = a.x + c.r;\n    c.y = a.y;\n  }\n}\n\nfunction intersects(a, b) {\n  var dr = a.r + b.r - 1e-6, dx = b.x - a.x, dy = b.y - a.y;\n  return dr > 0 && dr * dr > dx * dx + dy * dy;\n}\n\nfunction score(node) {\n  var a = node._,\n      b = node.next._,\n      ab = a.r + b.r,\n      dx = (a.x * b.r + b.x * a.r) / ab,\n      dy = (a.y * b.r + b.y * a.r) / ab;\n  return dx * dx + dy * dy;\n}\n\nfunction Node(circle) {\n  this._ = circle;\n  this.next = null;\n  this.previous = null;\n}\n\nfunction packEnclose(circles) {\n  if (!(n = circles.length)) return 0;\n\n  var a, b, c, n, aa, ca, i, j, k, sj, sk;\n\n  // Place the first circle.\n  a = circles[0], a.x = 0, a.y = 0;\n  if (!(n > 1)) return a.r;\n\n  // Place the second circle.\n  b = circles[1], a.x = -b.r, b.x = a.r, b.y = 0;\n  if (!(n > 2)) return a.r + b.r;\n\n  // Place the third circle.\n  place(b, a, c = circles[2]);\n\n  // Initialize the front-chain using the first three circles a, b and c.\n  a = new Node(a), b = new Node(b), c = new Node(c);\n  a.next = c.previous = b;\n  b.next = a.previous = c;\n  c.next = b.previous = a;\n\n  // Attempt to place each remaining circle…\n  pack: for (i = 3; i < n; ++i) {\n    place(a._, b._, c = circles[i]), c = new Node(c);\n\n    // Find the closest intersecting circle on the front-chain, if any.\n    // “Closeness” is determined by linear distance along the front-chain.\n    // “Ahead” or “behind” is likewise determined by linear distance.\n    j = b.next, k = a.previous, sj = b._.r, sk = a._.r;\n    do {\n      if (sj <= sk) {\n        if (intersects(j._, c._)) {\n          b = j, a.next = b, b.previous = a, --i;\n          continue pack;\n        }\n        sj += j._.r, j = j.next;\n      } else {\n        if (intersects(k._, c._)) {\n          a = k, a.next = b, b.previous = a, --i;\n          continue pack;\n        }\n        sk += k._.r, k = k.previous;\n      }\n    } while (j !== k.next);\n\n    // Success! Insert the new circle c between a and b.\n    c.previous = a, c.next = b, a.next = b.previous = b = c;\n\n    // Compute the new closest circle pair to the centroid.\n    aa = score(a);\n    while ((c = c.next) !== b) {\n      if ((ca = score(c)) < aa) {\n        a = c, aa = ca;\n      }\n    }\n    b = a.next;\n  }\n\n  // Compute the enclosing circle of the front chain.\n  a = [b._], c = b; while ((c = c.next) !== b) a.push(c._); c = Object(_enclose_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(a);\n\n  // Translate the circles to put the enclosing circle around the origin.\n  for (i = 0; i < n; ++i) a = circles[i], a.x -= c.x, a.y -= c.y;\n\n  return c.r;\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(circles) {\n  packEnclose(circles);\n  return circles;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-hierarchy/src/partition.js\":\n/*!**************************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-hierarchy/src/partition.js ***!\n  \\**************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _treemap_round_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./treemap/round.js */ \"./node_modules/dagre-d3/node_modules/d3-hierarchy/src/treemap/round.js\");\n/* harmony import */ var _treemap_dice_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./treemap/dice.js */ \"./node_modules/dagre-d3/node_modules/d3-hierarchy/src/treemap/dice.js\");\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  var dx = 1,\n      dy = 1,\n      padding = 0,\n      round = false;\n\n  function partition(root) {\n    var n = root.height + 1;\n    root.x0 =\n    root.y0 = padding;\n    root.x1 = dx;\n    root.y1 = dy / n;\n    root.eachBefore(positionNode(dy, n));\n    if (round) root.eachBefore(_treemap_round_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]);\n    return root;\n  }\n\n  function positionNode(dy, n) {\n    return function(node) {\n      if (node.children) {\n        Object(_treemap_dice_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(node, node.x0, dy * (node.depth + 1) / n, node.x1, dy * (node.depth + 2) / n);\n      }\n      var x0 = node.x0,\n          y0 = node.y0,\n          x1 = node.x1 - padding,\n          y1 = node.y1 - padding;\n      if (x1 < x0) x0 = x1 = (x0 + x1) / 2;\n      if (y1 < y0) y0 = y1 = (y0 + y1) / 2;\n      node.x0 = x0;\n      node.y0 = y0;\n      node.x1 = x1;\n      node.y1 = y1;\n    };\n  }\n\n  partition.round = function(x) {\n    return arguments.length ? (round = !!x, partition) : round;\n  };\n\n  partition.size = function(x) {\n    return arguments.length ? (dx = +x[0], dy = +x[1], partition) : [dx, dy];\n  };\n\n  partition.padding = function(x) {\n    return arguments.length ? (padding = +x, partition) : padding;\n  };\n\n  return partition;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-hierarchy/src/stratify.js\":\n/*!*************************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-hierarchy/src/stratify.js ***!\n  \\*************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _accessors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./accessors.js */ \"./node_modules/dagre-d3/node_modules/d3-hierarchy/src/accessors.js\");\n/* harmony import */ var _hierarchy_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./hierarchy/index.js */ \"./node_modules/dagre-d3/node_modules/d3-hierarchy/src/hierarchy/index.js\");\n\n\n\nvar keyPrefix = \"$\", // Protect against keys like “__proto__”.\n    preroot = {depth: -1},\n    ambiguous = {};\n\nfunction defaultId(d) {\n  return d.id;\n}\n\nfunction defaultParentId(d) {\n  return d.parentId;\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  var id = defaultId,\n      parentId = defaultParentId;\n\n  function stratify(data) {\n    var d,\n        i,\n        n = data.length,\n        root,\n        parent,\n        node,\n        nodes = new Array(n),\n        nodeId,\n        nodeKey,\n        nodeByKey = {};\n\n    for (i = 0; i < n; ++i) {\n      d = data[i], node = nodes[i] = new _hierarchy_index_js__WEBPACK_IMPORTED_MODULE_1__[\"Node\"](d);\n      if ((nodeId = id(d, i, data)) != null && (nodeId += \"\")) {\n        nodeKey = keyPrefix + (node.id = nodeId);\n        nodeByKey[nodeKey] = nodeKey in nodeByKey ? ambiguous : node;\n      }\n    }\n\n    for (i = 0; i < n; ++i) {\n      node = nodes[i], nodeId = parentId(data[i], i, data);\n      if (nodeId == null || !(nodeId += \"\")) {\n        if (root) throw new Error(\"multiple roots\");\n        root = node;\n      } else {\n        parent = nodeByKey[keyPrefix + nodeId];\n        if (!parent) throw new Error(\"missing: \" + nodeId);\n        if (parent === ambiguous) throw new Error(\"ambiguous: \" + nodeId);\n        if (parent.children) parent.children.push(node);\n        else parent.children = [node];\n        node.parent = parent;\n      }\n    }\n\n    if (!root) throw new Error(\"no root\");\n    root.parent = preroot;\n    root.eachBefore(function(node) { node.depth = node.parent.depth + 1; --n; }).eachBefore(_hierarchy_index_js__WEBPACK_IMPORTED_MODULE_1__[\"computeHeight\"]);\n    root.parent = null;\n    if (n > 0) throw new Error(\"cycle\");\n\n    return root;\n  }\n\n  stratify.id = function(x) {\n    return arguments.length ? (id = Object(_accessors_js__WEBPACK_IMPORTED_MODULE_0__[\"required\"])(x), stratify) : id;\n  };\n\n  stratify.parentId = function(x) {\n    return arguments.length ? (parentId = Object(_accessors_js__WEBPACK_IMPORTED_MODULE_0__[\"required\"])(x), stratify) : parentId;\n  };\n\n  return stratify;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-hierarchy/src/tree.js\":\n/*!*********************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-hierarchy/src/tree.js ***!\n  \\*********************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _hierarchy_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./hierarchy/index.js */ \"./node_modules/dagre-d3/node_modules/d3-hierarchy/src/hierarchy/index.js\");\n\n\nfunction defaultSeparation(a, b) {\n  return a.parent === b.parent ? 1 : 2;\n}\n\n// function radialSeparation(a, b) {\n//   return (a.parent === b.parent ? 1 : 2) / a.depth;\n// }\n\n// This function is used to traverse the left contour of a subtree (or\n// subforest). It returns the successor of v on this contour. This successor is\n// either given by the leftmost child of v or by the thread of v. The function\n// returns null if and only if v is on the highest level of its subtree.\nfunction nextLeft(v) {\n  var children = v.children;\n  return children ? children[0] : v.t;\n}\n\n// This function works analogously to nextLeft.\nfunction nextRight(v) {\n  var children = v.children;\n  return children ? children[children.length - 1] : v.t;\n}\n\n// Shifts the current subtree rooted at w+. This is done by increasing\n// prelim(w+) and mod(w+) by shift.\nfunction moveSubtree(wm, wp, shift) {\n  var change = shift / (wp.i - wm.i);\n  wp.c -= change;\n  wp.s += shift;\n  wm.c += change;\n  wp.z += shift;\n  wp.m += shift;\n}\n\n// All other shifts, applied to the smaller subtrees between w- and w+, are\n// performed by this function. To prepare the shifts, we have to adjust\n// change(w+), shift(w+), and change(w-).\nfunction executeShifts(v) {\n  var shift = 0,\n      change = 0,\n      children = v.children,\n      i = children.length,\n      w;\n  while (--i >= 0) {\n    w = children[i];\n    w.z += shift;\n    w.m += shift;\n    shift += w.s + (change += w.c);\n  }\n}\n\n// If vi-’s ancestor is a sibling of v, returns vi-’s ancestor. Otherwise,\n// returns the specified (default) ancestor.\nfunction nextAncestor(vim, v, ancestor) {\n  return vim.a.parent === v.parent ? vim.a : ancestor;\n}\n\nfunction TreeNode(node, i) {\n  this._ = node;\n  this.parent = null;\n  this.children = null;\n  this.A = null; // default ancestor\n  this.a = this; // ancestor\n  this.z = 0; // prelim\n  this.m = 0; // mod\n  this.c = 0; // change\n  this.s = 0; // shift\n  this.t = null; // thread\n  this.i = i; // number\n}\n\nTreeNode.prototype = Object.create(_hierarchy_index_js__WEBPACK_IMPORTED_MODULE_0__[\"Node\"].prototype);\n\nfunction treeRoot(root) {\n  var tree = new TreeNode(root, 0),\n      node,\n      nodes = [tree],\n      child,\n      children,\n      i,\n      n;\n\n  while (node = nodes.pop()) {\n    if (children = node._.children) {\n      node.children = new Array(n = children.length);\n      for (i = n - 1; i >= 0; --i) {\n        nodes.push(child = node.children[i] = new TreeNode(children[i], i));\n        child.parent = node;\n      }\n    }\n  }\n\n  (tree.parent = new TreeNode(null, 0)).children = [tree];\n  return tree;\n}\n\n// Node-link tree diagram using the Reingold-Tilford \"tidy\" algorithm\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  var separation = defaultSeparation,\n      dx = 1,\n      dy = 1,\n      nodeSize = null;\n\n  function tree(root) {\n    var t = treeRoot(root);\n\n    // Compute the layout using Buchheim et al.’s algorithm.\n    t.eachAfter(firstWalk), t.parent.m = -t.z;\n    t.eachBefore(secondWalk);\n\n    // If a fixed node size is specified, scale x and y.\n    if (nodeSize) root.eachBefore(sizeNode);\n\n    // If a fixed tree size is specified, scale x and y based on the extent.\n    // Compute the left-most, right-most, and depth-most nodes for extents.\n    else {\n      var left = root,\n          right = root,\n          bottom = root;\n      root.eachBefore(function(node) {\n        if (node.x < left.x) left = node;\n        if (node.x > right.x) right = node;\n        if (node.depth > bottom.depth) bottom = node;\n      });\n      var s = left === right ? 1 : separation(left, right) / 2,\n          tx = s - left.x,\n          kx = dx / (right.x + s + tx),\n          ky = dy / (bottom.depth || 1);\n      root.eachBefore(function(node) {\n        node.x = (node.x + tx) * kx;\n        node.y = node.depth * ky;\n      });\n    }\n\n    return root;\n  }\n\n  // Computes a preliminary x-coordinate for v. Before that, FIRST WALK is\n  // applied recursively to the children of v, as well as the function\n  // APPORTION. After spacing out the children by calling EXECUTE SHIFTS, the\n  // node v is placed to the midpoint of its outermost children.\n  function firstWalk(v) {\n    var children = v.children,\n        siblings = v.parent.children,\n        w = v.i ? siblings[v.i - 1] : null;\n    if (children) {\n      executeShifts(v);\n      var midpoint = (children[0].z + children[children.length - 1].z) / 2;\n      if (w) {\n        v.z = w.z + separation(v._, w._);\n        v.m = v.z - midpoint;\n      } else {\n        v.z = midpoint;\n      }\n    } else if (w) {\n      v.z = w.z + separation(v._, w._);\n    }\n    v.parent.A = apportion(v, w, v.parent.A || siblings[0]);\n  }\n\n  // Computes all real x-coordinates by summing up the modifiers recursively.\n  function secondWalk(v) {\n    v._.x = v.z + v.parent.m;\n    v.m += v.parent.m;\n  }\n\n  // The core of the algorithm. Here, a new subtree is combined with the\n  // previous subtrees. Threads are used to traverse the inside and outside\n  // contours of the left and right subtree up to the highest common level. The\n  // vertices used for the traversals are vi+, vi-, vo-, and vo+, where the\n  // superscript o means outside and i means inside, the subscript - means left\n  // subtree and + means right subtree. For summing up the modifiers along the\n  // contour, we use respective variables si+, si-, so-, and so+. Whenever two\n  // nodes of the inside contours conflict, we compute the left one of the\n  // greatest uncommon ancestors using the function ANCESTOR and call MOVE\n  // SUBTREE to shift the subtree and prepare the shifts of smaller subtrees.\n  // Finally, we add a new thread (if necessary).\n  function apportion(v, w, ancestor) {\n    if (w) {\n      var vip = v,\n          vop = v,\n          vim = w,\n          vom = vip.parent.children[0],\n          sip = vip.m,\n          sop = vop.m,\n          sim = vim.m,\n          som = vom.m,\n          shift;\n      while (vim = nextRight(vim), vip = nextLeft(vip), vim && vip) {\n        vom = nextLeft(vom);\n        vop = nextRight(vop);\n        vop.a = v;\n        shift = vim.z + sim - vip.z - sip + separation(vim._, vip._);\n        if (shift > 0) {\n          moveSubtree(nextAncestor(vim, v, ancestor), v, shift);\n          sip += shift;\n          sop += shift;\n        }\n        sim += vim.m;\n        sip += vip.m;\n        som += vom.m;\n        sop += vop.m;\n      }\n      if (vim && !nextRight(vop)) {\n        vop.t = vim;\n        vop.m += sim - sop;\n      }\n      if (vip && !nextLeft(vom)) {\n        vom.t = vip;\n        vom.m += sip - som;\n        ancestor = v;\n      }\n    }\n    return ancestor;\n  }\n\n  function sizeNode(node) {\n    node.x *= dx;\n    node.y = node.depth * dy;\n  }\n\n  tree.separation = function(x) {\n    return arguments.length ? (separation = x, tree) : separation;\n  };\n\n  tree.size = function(x) {\n    return arguments.length ? (nodeSize = false, dx = +x[0], dy = +x[1], tree) : (nodeSize ? null : [dx, dy]);\n  };\n\n  tree.nodeSize = function(x) {\n    return arguments.length ? (nodeSize = true, dx = +x[0], dy = +x[1], tree) : (nodeSize ? [dx, dy] : null);\n  };\n\n  return tree;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-hierarchy/src/treemap/binary.js\":\n/*!*******************************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-hierarchy/src/treemap/binary.js ***!\n  \\*******************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(parent, x0, y0, x1, y1) {\n  var nodes = parent.children,\n      i, n = nodes.length,\n      sum, sums = new Array(n + 1);\n\n  for (sums[0] = sum = i = 0; i < n; ++i) {\n    sums[i + 1] = sum += nodes[i].value;\n  }\n\n  partition(0, n, parent.value, x0, y0, x1, y1);\n\n  function partition(i, j, value, x0, y0, x1, y1) {\n    if (i >= j - 1) {\n      var node = nodes[i];\n      node.x0 = x0, node.y0 = y0;\n      node.x1 = x1, node.y1 = y1;\n      return;\n    }\n\n    var valueOffset = sums[i],\n        valueTarget = (value / 2) + valueOffset,\n        k = i + 1,\n        hi = j - 1;\n\n    while (k < hi) {\n      var mid = k + hi >>> 1;\n      if (sums[mid] < valueTarget) k = mid + 1;\n      else hi = mid;\n    }\n\n    if ((valueTarget - sums[k - 1]) < (sums[k] - valueTarget) && i + 1 < k) --k;\n\n    var valueLeft = sums[k] - valueOffset,\n        valueRight = value - valueLeft;\n\n    if ((x1 - x0) > (y1 - y0)) {\n      var xk = (x0 * valueRight + x1 * valueLeft) / value;\n      partition(i, k, valueLeft, x0, y0, xk, y1);\n      partition(k, j, valueRight, xk, y0, x1, y1);\n    } else {\n      var yk = (y0 * valueRight + y1 * valueLeft) / value;\n      partition(i, k, valueLeft, x0, y0, x1, yk);\n      partition(k, j, valueRight, x0, yk, x1, y1);\n    }\n  }\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-hierarchy/src/treemap/dice.js\":\n/*!*****************************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-hierarchy/src/treemap/dice.js ***!\n  \\*****************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(parent, x0, y0, x1, y1) {\n  var nodes = parent.children,\n      node,\n      i = -1,\n      n = nodes.length,\n      k = parent.value && (x1 - x0) / parent.value;\n\n  while (++i < n) {\n    node = nodes[i], node.y0 = y0, node.y1 = y1;\n    node.x0 = x0, node.x1 = x0 += node.value * k;\n  }\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-hierarchy/src/treemap/index.js\":\n/*!******************************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-hierarchy/src/treemap/index.js ***!\n  \\******************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _round_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./round.js */ \"./node_modules/dagre-d3/node_modules/d3-hierarchy/src/treemap/round.js\");\n/* harmony import */ var _squarify_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./squarify.js */ \"./node_modules/dagre-d3/node_modules/d3-hierarchy/src/treemap/squarify.js\");\n/* harmony import */ var _accessors_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../accessors.js */ \"./node_modules/dagre-d3/node_modules/d3-hierarchy/src/accessors.js\");\n/* harmony import */ var _constant_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../constant.js */ \"./node_modules/dagre-d3/node_modules/d3-hierarchy/src/constant.js\");\n\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  var tile = _squarify_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"],\n      round = false,\n      dx = 1,\n      dy = 1,\n      paddingStack = [0],\n      paddingInner = _constant_js__WEBPACK_IMPORTED_MODULE_3__[\"constantZero\"],\n      paddingTop = _constant_js__WEBPACK_IMPORTED_MODULE_3__[\"constantZero\"],\n      paddingRight = _constant_js__WEBPACK_IMPORTED_MODULE_3__[\"constantZero\"],\n      paddingBottom = _constant_js__WEBPACK_IMPORTED_MODULE_3__[\"constantZero\"],\n      paddingLeft = _constant_js__WEBPACK_IMPORTED_MODULE_3__[\"constantZero\"];\n\n  function treemap(root) {\n    root.x0 =\n    root.y0 = 0;\n    root.x1 = dx;\n    root.y1 = dy;\n    root.eachBefore(positionNode);\n    paddingStack = [0];\n    if (round) root.eachBefore(_round_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]);\n    return root;\n  }\n\n  function positionNode(node) {\n    var p = paddingStack[node.depth],\n        x0 = node.x0 + p,\n        y0 = node.y0 + p,\n        x1 = node.x1 - p,\n        y1 = node.y1 - p;\n    if (x1 < x0) x0 = x1 = (x0 + x1) / 2;\n    if (y1 < y0) y0 = y1 = (y0 + y1) / 2;\n    node.x0 = x0;\n    node.y0 = y0;\n    node.x1 = x1;\n    node.y1 = y1;\n    if (node.children) {\n      p = paddingStack[node.depth + 1] = paddingInner(node) / 2;\n      x0 += paddingLeft(node) - p;\n      y0 += paddingTop(node) - p;\n      x1 -= paddingRight(node) - p;\n      y1 -= paddingBottom(node) - p;\n      if (x1 < x0) x0 = x1 = (x0 + x1) / 2;\n      if (y1 < y0) y0 = y1 = (y0 + y1) / 2;\n      tile(node, x0, y0, x1, y1);\n    }\n  }\n\n  treemap.round = function(x) {\n    return arguments.length ? (round = !!x, treemap) : round;\n  };\n\n  treemap.size = function(x) {\n    return arguments.length ? (dx = +x[0], dy = +x[1], treemap) : [dx, dy];\n  };\n\n  treemap.tile = function(x) {\n    return arguments.length ? (tile = Object(_accessors_js__WEBPACK_IMPORTED_MODULE_2__[\"required\"])(x), treemap) : tile;\n  };\n\n  treemap.padding = function(x) {\n    return arguments.length ? treemap.paddingInner(x).paddingOuter(x) : treemap.paddingInner();\n  };\n\n  treemap.paddingInner = function(x) {\n    return arguments.length ? (paddingInner = typeof x === \"function\" ? x : Object(_constant_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(+x), treemap) : paddingInner;\n  };\n\n  treemap.paddingOuter = function(x) {\n    return arguments.length ? treemap.paddingTop(x).paddingRight(x).paddingBottom(x).paddingLeft(x) : treemap.paddingTop();\n  };\n\n  treemap.paddingTop = function(x) {\n    return arguments.length ? (paddingTop = typeof x === \"function\" ? x : Object(_constant_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(+x), treemap) : paddingTop;\n  };\n\n  treemap.paddingRight = function(x) {\n    return arguments.length ? (paddingRight = typeof x === \"function\" ? x : Object(_constant_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(+x), treemap) : paddingRight;\n  };\n\n  treemap.paddingBottom = function(x) {\n    return arguments.length ? (paddingBottom = typeof x === \"function\" ? x : Object(_constant_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(+x), treemap) : paddingBottom;\n  };\n\n  treemap.paddingLeft = function(x) {\n    return arguments.length ? (paddingLeft = typeof x === \"function\" ? x : Object(_constant_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(+x), treemap) : paddingLeft;\n  };\n\n  return treemap;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-hierarchy/src/treemap/resquarify.js\":\n/*!***********************************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-hierarchy/src/treemap/resquarify.js ***!\n  \\***********************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _dice_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./dice.js */ \"./node_modules/dagre-d3/node_modules/d3-hierarchy/src/treemap/dice.js\");\n/* harmony import */ var _slice_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./slice.js */ \"./node_modules/dagre-d3/node_modules/d3-hierarchy/src/treemap/slice.js\");\n/* harmony import */ var _squarify_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./squarify.js */ \"./node_modules/dagre-d3/node_modules/d3-hierarchy/src/treemap/squarify.js\");\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ((function custom(ratio) {\n\n  function resquarify(parent, x0, y0, x1, y1) {\n    if ((rows = parent._squarify) && (rows.ratio === ratio)) {\n      var rows,\n          row,\n          nodes,\n          i,\n          j = -1,\n          n,\n          m = rows.length,\n          value = parent.value;\n\n      while (++j < m) {\n        row = rows[j], nodes = row.children;\n        for (i = row.value = 0, n = nodes.length; i < n; ++i) row.value += nodes[i].value;\n        if (row.dice) Object(_dice_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(row, x0, y0, x1, y0 += (y1 - y0) * row.value / value);\n        else Object(_slice_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(row, x0, y0, x0 += (x1 - x0) * row.value / value, y1);\n        value -= row.value;\n      }\n    } else {\n      parent._squarify = rows = Object(_squarify_js__WEBPACK_IMPORTED_MODULE_2__[\"squarifyRatio\"])(ratio, parent, x0, y0, x1, y1);\n      rows.ratio = ratio;\n    }\n  }\n\n  resquarify.ratio = function(x) {\n    return custom((x = +x) > 1 ? x : 1);\n  };\n\n  return resquarify;\n})(_squarify_js__WEBPACK_IMPORTED_MODULE_2__[\"phi\"]));\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-hierarchy/src/treemap/round.js\":\n/*!******************************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-hierarchy/src/treemap/round.js ***!\n  \\******************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(node) {\n  node.x0 = Math.round(node.x0);\n  node.y0 = Math.round(node.y0);\n  node.x1 = Math.round(node.x1);\n  node.y1 = Math.round(node.y1);\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-hierarchy/src/treemap/slice.js\":\n/*!******************************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-hierarchy/src/treemap/slice.js ***!\n  \\******************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(parent, x0, y0, x1, y1) {\n  var nodes = parent.children,\n      node,\n      i = -1,\n      n = nodes.length,\n      k = parent.value && (y1 - y0) / parent.value;\n\n  while (++i < n) {\n    node = nodes[i], node.x0 = x0, node.x1 = x1;\n    node.y0 = y0, node.y1 = y0 += node.value * k;\n  }\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-hierarchy/src/treemap/sliceDice.js\":\n/*!**********************************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-hierarchy/src/treemap/sliceDice.js ***!\n  \\**********************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _dice_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./dice.js */ \"./node_modules/dagre-d3/node_modules/d3-hierarchy/src/treemap/dice.js\");\n/* harmony import */ var _slice_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./slice.js */ \"./node_modules/dagre-d3/node_modules/d3-hierarchy/src/treemap/slice.js\");\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(parent, x0, y0, x1, y1) {\n  (parent.depth & 1 ? _slice_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"] : _dice_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(parent, x0, y0, x1, y1);\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-hierarchy/src/treemap/squarify.js\":\n/*!*********************************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-hierarchy/src/treemap/squarify.js ***!\n  \\*********************************************************************************/\n/*! exports provided: phi, squarifyRatio, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"phi\", function() { return phi; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"squarifyRatio\", function() { return squarifyRatio; });\n/* harmony import */ var _dice_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./dice.js */ \"./node_modules/dagre-d3/node_modules/d3-hierarchy/src/treemap/dice.js\");\n/* harmony import */ var _slice_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./slice.js */ \"./node_modules/dagre-d3/node_modules/d3-hierarchy/src/treemap/slice.js\");\n\n\n\nvar phi = (1 + Math.sqrt(5)) / 2;\n\nfunction squarifyRatio(ratio, parent, x0, y0, x1, y1) {\n  var rows = [],\n      nodes = parent.children,\n      row,\n      nodeValue,\n      i0 = 0,\n      i1 = 0,\n      n = nodes.length,\n      dx, dy,\n      value = parent.value,\n      sumValue,\n      minValue,\n      maxValue,\n      newRatio,\n      minRatio,\n      alpha,\n      beta;\n\n  while (i0 < n) {\n    dx = x1 - x0, dy = y1 - y0;\n\n    // Find the next non-empty node.\n    do sumValue = nodes[i1++].value; while (!sumValue && i1 < n);\n    minValue = maxValue = sumValue;\n    alpha = Math.max(dy / dx, dx / dy) / (value * ratio);\n    beta = sumValue * sumValue * alpha;\n    minRatio = Math.max(maxValue / beta, beta / minValue);\n\n    // Keep adding nodes while the aspect ratio maintains or improves.\n    for (; i1 < n; ++i1) {\n      sumValue += nodeValue = nodes[i1].value;\n      if (nodeValue < minValue) minValue = nodeValue;\n      if (nodeValue > maxValue) maxValue = nodeValue;\n      beta = sumValue * sumValue * alpha;\n      newRatio = Math.max(maxValue / beta, beta / minValue);\n      if (newRatio > minRatio) { sumValue -= nodeValue; break; }\n      minRatio = newRatio;\n    }\n\n    // Position and record the row orientation.\n    rows.push(row = {value: sumValue, dice: dx < dy, children: nodes.slice(i0, i1)});\n    if (row.dice) Object(_dice_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(row, x0, y0, x1, value ? y0 += dy * sumValue / value : y1);\n    else Object(_slice_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(row, x0, y0, value ? x0 += dx * sumValue / value : x1, y1);\n    value -= sumValue, i0 = i1;\n  }\n\n  return rows;\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ((function custom(ratio) {\n\n  function squarify(parent, x0, y0, x1, y1) {\n    squarifyRatio(ratio, parent, x0, y0, x1, y1);\n  }\n\n  squarify.ratio = function(x) {\n    return custom((x = +x) > 1 ? x : 1);\n  };\n\n  return squarify;\n})(phi));\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-polygon/src/area.js\":\n/*!*******************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-polygon/src/area.js ***!\n  \\*******************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(polygon) {\n  var i = -1,\n      n = polygon.length,\n      a,\n      b = polygon[n - 1],\n      area = 0;\n\n  while (++i < n) {\n    a = b;\n    b = polygon[i];\n    area += a[1] * b[0] - a[0] * b[1];\n  }\n\n  return area / 2;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-polygon/src/centroid.js\":\n/*!***********************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-polygon/src/centroid.js ***!\n  \\***********************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(polygon) {\n  var i = -1,\n      n = polygon.length,\n      x = 0,\n      y = 0,\n      a,\n      b = polygon[n - 1],\n      c,\n      k = 0;\n\n  while (++i < n) {\n    a = b;\n    b = polygon[i];\n    k += c = a[0] * b[1] - b[0] * a[1];\n    x += (a[0] + b[0]) * c;\n    y += (a[1] + b[1]) * c;\n  }\n\n  return k *= 3, [x / k, y / k];\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-polygon/src/contains.js\":\n/*!***********************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-polygon/src/contains.js ***!\n  \\***********************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(polygon, point) {\n  var n = polygon.length,\n      p = polygon[n - 1],\n      x = point[0], y = point[1],\n      x0 = p[0], y0 = p[1],\n      x1, y1,\n      inside = false;\n\n  for (var i = 0; i < n; ++i) {\n    p = polygon[i], x1 = p[0], y1 = p[1];\n    if (((y1 > y) !== (y0 > y)) && (x < (x0 - x1) * (y - y1) / (y0 - y1) + x1)) inside = !inside;\n    x0 = x1, y0 = y1;\n  }\n\n  return inside;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-polygon/src/cross.js\":\n/*!********************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-polygon/src/cross.js ***!\n  \\********************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n// Returns the 2D cross product of AB and AC vectors, i.e., the z-component of\n// the 3D cross product in a quadrant I Cartesian coordinate system (+x is\n// right, +y is up). Returns a positive value if ABC is counter-clockwise,\n// negative if clockwise, and zero if the points are collinear.\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(a, b, c) {\n  return (b[0] - a[0]) * (c[1] - a[1]) - (b[1] - a[1]) * (c[0] - a[0]);\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-polygon/src/hull.js\":\n/*!*******************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-polygon/src/hull.js ***!\n  \\*******************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _cross_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./cross.js */ \"./node_modules/dagre-d3/node_modules/d3-polygon/src/cross.js\");\n\n\nfunction lexicographicOrder(a, b) {\n  return a[0] - b[0] || a[1] - b[1];\n}\n\n// Computes the upper convex hull per the monotone chain algorithm.\n// Assumes points.length >= 3, is sorted by x, unique in y.\n// Returns an array of indices into points in left-to-right order.\nfunction computeUpperHullIndexes(points) {\n  var n = points.length,\n      indexes = [0, 1],\n      size = 2;\n\n  for (var i = 2; i < n; ++i) {\n    while (size > 1 && Object(_cross_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(points[indexes[size - 2]], points[indexes[size - 1]], points[i]) <= 0) --size;\n    indexes[size++] = i;\n  }\n\n  return indexes.slice(0, size); // remove popped points\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(points) {\n  if ((n = points.length) < 3) return null;\n\n  var i,\n      n,\n      sortedPoints = new Array(n),\n      flippedPoints = new Array(n);\n\n  for (i = 0; i < n; ++i) sortedPoints[i] = [+points[i][0], +points[i][1], i];\n  sortedPoints.sort(lexicographicOrder);\n  for (i = 0; i < n; ++i) flippedPoints[i] = [sortedPoints[i][0], -sortedPoints[i][1]];\n\n  var upperIndexes = computeUpperHullIndexes(sortedPoints),\n      lowerIndexes = computeUpperHullIndexes(flippedPoints);\n\n  // Construct the hull polygon, removing possible duplicate endpoints.\n  var skipLeft = lowerIndexes[0] === upperIndexes[0],\n      skipRight = lowerIndexes[lowerIndexes.length - 1] === upperIndexes[upperIndexes.length - 1],\n      hull = [];\n\n  // Add upper hull in right-to-l order.\n  // Then add lower hull in left-to-right order.\n  for (i = upperIndexes.length - 1; i >= 0; --i) hull.push(points[sortedPoints[upperIndexes[i]][2]]);\n  for (i = +skipLeft; i < lowerIndexes.length - skipRight; ++i) hull.push(points[sortedPoints[lowerIndexes[i]][2]]);\n\n  return hull;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-polygon/src/index.js\":\n/*!********************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-polygon/src/index.js ***!\n  \\********************************************************************/\n/*! exports provided: polygonArea, polygonCentroid, polygonHull, polygonContains, polygonLength */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _area_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./area.js */ \"./node_modules/dagre-d3/node_modules/d3-polygon/src/area.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"polygonArea\", function() { return _area_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n/* harmony import */ var _centroid_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./centroid.js */ \"./node_modules/dagre-d3/node_modules/d3-polygon/src/centroid.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"polygonCentroid\", function() { return _centroid_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"]; });\n\n/* harmony import */ var _hull_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./hull.js */ \"./node_modules/dagre-d3/node_modules/d3-polygon/src/hull.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"polygonHull\", function() { return _hull_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"]; });\n\n/* harmony import */ var _contains_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./contains.js */ \"./node_modules/dagre-d3/node_modules/d3-polygon/src/contains.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"polygonContains\", function() { return _contains_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"]; });\n\n/* harmony import */ var _length_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./length.js */ \"./node_modules/dagre-d3/node_modules/d3-polygon/src/length.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"polygonLength\", function() { return _length_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"]; });\n\n\n\n\n\n\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-polygon/src/length.js\":\n/*!*********************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-polygon/src/length.js ***!\n  \\*********************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(polygon) {\n  var i = -1,\n      n = polygon.length,\n      b = polygon[n - 1],\n      xa,\n      ya,\n      xb = b[0],\n      yb = b[1],\n      perimeter = 0;\n\n  while (++i < n) {\n    xa = xb;\n    ya = yb;\n    b = polygon[i];\n    xb = b[0];\n    yb = b[1];\n    xa -= xb;\n    ya -= yb;\n    perimeter += Math.sqrt(xa * xa + ya * ya);\n  }\n\n  return perimeter;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-random/src/bates.js\":\n/*!*******************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-random/src/bates.js ***!\n  \\*******************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _defaultSource__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./defaultSource */ \"./node_modules/dagre-d3/node_modules/d3-random/src/defaultSource.js\");\n/* harmony import */ var _irwinHall__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./irwinHall */ \"./node_modules/dagre-d3/node_modules/d3-random/src/irwinHall.js\");\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ((function sourceRandomBates(source) {\n  function randomBates(n) {\n    var randomIrwinHall = _irwinHall__WEBPACK_IMPORTED_MODULE_1__[\"default\"].source(source)(n);\n    return function() {\n      return randomIrwinHall() / n;\n    };\n  }\n\n  randomBates.source = sourceRandomBates;\n\n  return randomBates;\n})(_defaultSource__WEBPACK_IMPORTED_MODULE_0__[\"default\"]));\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-random/src/defaultSource.js\":\n/*!***************************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-random/src/defaultSource.js ***!\n  \\***************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  return Math.random();\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-random/src/exponential.js\":\n/*!*************************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-random/src/exponential.js ***!\n  \\*************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _defaultSource__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./defaultSource */ \"./node_modules/dagre-d3/node_modules/d3-random/src/defaultSource.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ((function sourceRandomExponential(source) {\n  function randomExponential(lambda) {\n    return function() {\n      return -Math.log(1 - source()) / lambda;\n    };\n  }\n\n  randomExponential.source = sourceRandomExponential;\n\n  return randomExponential;\n})(_defaultSource__WEBPACK_IMPORTED_MODULE_0__[\"default\"]));\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-random/src/index.js\":\n/*!*******************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-random/src/index.js ***!\n  \\*******************************************************************/\n/*! exports provided: randomUniform, randomNormal, randomLogNormal, randomBates, randomIrwinHall, randomExponential */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _uniform__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./uniform */ \"./node_modules/dagre-d3/node_modules/d3-random/src/uniform.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"randomUniform\", function() { return _uniform__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n/* harmony import */ var _normal__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./normal */ \"./node_modules/dagre-d3/node_modules/d3-random/src/normal.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"randomNormal\", function() { return _normal__WEBPACK_IMPORTED_MODULE_1__[\"default\"]; });\n\n/* harmony import */ var _logNormal__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./logNormal */ \"./node_modules/dagre-d3/node_modules/d3-random/src/logNormal.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"randomLogNormal\", function() { return _logNormal__WEBPACK_IMPORTED_MODULE_2__[\"default\"]; });\n\n/* harmony import */ var _bates__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./bates */ \"./node_modules/dagre-d3/node_modules/d3-random/src/bates.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"randomBates\", function() { return _bates__WEBPACK_IMPORTED_MODULE_3__[\"default\"]; });\n\n/* harmony import */ var _irwinHall__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./irwinHall */ \"./node_modules/dagre-d3/node_modules/d3-random/src/irwinHall.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"randomIrwinHall\", function() { return _irwinHall__WEBPACK_IMPORTED_MODULE_4__[\"default\"]; });\n\n/* harmony import */ var _exponential__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./exponential */ \"./node_modules/dagre-d3/node_modules/d3-random/src/exponential.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"randomExponential\", function() { return _exponential__WEBPACK_IMPORTED_MODULE_5__[\"default\"]; });\n\n\n\n\n\n\n\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-random/src/irwinHall.js\":\n/*!***********************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-random/src/irwinHall.js ***!\n  \\***********************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _defaultSource__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./defaultSource */ \"./node_modules/dagre-d3/node_modules/d3-random/src/defaultSource.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ((function sourceRandomIrwinHall(source) {\n  function randomIrwinHall(n) {\n    return function() {\n      for (var sum = 0, i = 0; i < n; ++i) sum += source();\n      return sum;\n    };\n  }\n\n  randomIrwinHall.source = sourceRandomIrwinHall;\n\n  return randomIrwinHall;\n})(_defaultSource__WEBPACK_IMPORTED_MODULE_0__[\"default\"]));\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-random/src/logNormal.js\":\n/*!***********************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-random/src/logNormal.js ***!\n  \\***********************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _defaultSource__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./defaultSource */ \"./node_modules/dagre-d3/node_modules/d3-random/src/defaultSource.js\");\n/* harmony import */ var _normal__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./normal */ \"./node_modules/dagre-d3/node_modules/d3-random/src/normal.js\");\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ((function sourceRandomLogNormal(source) {\n  function randomLogNormal() {\n    var randomNormal = _normal__WEBPACK_IMPORTED_MODULE_1__[\"default\"].source(source).apply(this, arguments);\n    return function() {\n      return Math.exp(randomNormal());\n    };\n  }\n\n  randomLogNormal.source = sourceRandomLogNormal;\n\n  return randomLogNormal;\n})(_defaultSource__WEBPACK_IMPORTED_MODULE_0__[\"default\"]));\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-random/src/normal.js\":\n/*!********************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-random/src/normal.js ***!\n  \\********************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _defaultSource__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./defaultSource */ \"./node_modules/dagre-d3/node_modules/d3-random/src/defaultSource.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ((function sourceRandomNormal(source) {\n  function randomNormal(mu, sigma) {\n    var x, r;\n    mu = mu == null ? 0 : +mu;\n    sigma = sigma == null ? 1 : +sigma;\n    return function() {\n      var y;\n\n      // If available, use the second previously-generated uniform random.\n      if (x != null) y = x, x = null;\n\n      // Otherwise, generate a new x and y.\n      else do {\n        x = source() * 2 - 1;\n        y = source() * 2 - 1;\n        r = x * x + y * y;\n      } while (!r || r > 1);\n\n      return mu + sigma * y * Math.sqrt(-2 * Math.log(r) / r);\n    };\n  }\n\n  randomNormal.source = sourceRandomNormal;\n\n  return randomNormal;\n})(_defaultSource__WEBPACK_IMPORTED_MODULE_0__[\"default\"]));\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-random/src/uniform.js\":\n/*!*********************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-random/src/uniform.js ***!\n  \\*********************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _defaultSource__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./defaultSource */ \"./node_modules/dagre-d3/node_modules/d3-random/src/defaultSource.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ((function sourceRandomUniform(source) {\n  function randomUniform(min, max) {\n    min = min == null ? 0 : +min;\n    max = max == null ? 1 : +max;\n    if (arguments.length === 1) max = min, min = 0;\n    else max -= min;\n    return function() {\n      return source() * max + min;\n    };\n  }\n\n  randomUniform.source = sourceRandomUniform;\n\n  return randomUniform;\n})(_defaultSource__WEBPACK_IMPORTED_MODULE_0__[\"default\"]));\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-scale-chromatic/src/categorical/Accent.js\":\n/*!*****************************************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-scale-chromatic/src/categorical/Accent.js ***!\n  \\*****************************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ \"./node_modules/dagre-d3/node_modules/d3-scale-chromatic/src/colors.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_colors_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(\"7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666\"));\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-scale-chromatic/src/categorical/Dark2.js\":\n/*!****************************************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-scale-chromatic/src/categorical/Dark2.js ***!\n  \\****************************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ \"./node_modules/dagre-d3/node_modules/d3-scale-chromatic/src/colors.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_colors_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(\"1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666\"));\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-scale-chromatic/src/categorical/Paired.js\":\n/*!*****************************************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-scale-chromatic/src/categorical/Paired.js ***!\n  \\*****************************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ \"./node_modules/dagre-d3/node_modules/d3-scale-chromatic/src/colors.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_colors_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(\"a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928\"));\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-scale-chromatic/src/categorical/Pastel1.js\":\n/*!******************************************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-scale-chromatic/src/categorical/Pastel1.js ***!\n  \\******************************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ \"./node_modules/dagre-d3/node_modules/d3-scale-chromatic/src/colors.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_colors_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(\"fbb4aeb3cde3ccebc5decbe4fed9a6ffffcce5d8bdfddaecf2f2f2\"));\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-scale-chromatic/src/categorical/Pastel2.js\":\n/*!******************************************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-scale-chromatic/src/categorical/Pastel2.js ***!\n  \\******************************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ \"./node_modules/dagre-d3/node_modules/d3-scale-chromatic/src/colors.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_colors_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(\"b3e2cdfdcdaccbd5e8f4cae4e6f5c9fff2aef1e2cccccccc\"));\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-scale-chromatic/src/categorical/Set1.js\":\n/*!***************************************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-scale-chromatic/src/categorical/Set1.js ***!\n  \\***************************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ \"./node_modules/dagre-d3/node_modules/d3-scale-chromatic/src/colors.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_colors_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(\"e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999\"));\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-scale-chromatic/src/categorical/Set2.js\":\n/*!***************************************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-scale-chromatic/src/categorical/Set2.js ***!\n  \\***************************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ \"./node_modules/dagre-d3/node_modules/d3-scale-chromatic/src/colors.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_colors_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(\"66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3\"));\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-scale-chromatic/src/categorical/Set3.js\":\n/*!***************************************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-scale-chromatic/src/categorical/Set3.js ***!\n  \\***************************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ \"./node_modules/dagre-d3/node_modules/d3-scale-chromatic/src/colors.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_colors_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(\"8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f\"));\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-scale-chromatic/src/categorical/Tableau10.js\":\n/*!********************************************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-scale-chromatic/src/categorical/Tableau10.js ***!\n  \\********************************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ \"./node_modules/dagre-d3/node_modules/d3-scale-chromatic/src/colors.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_colors_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(\"4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab\"));\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-scale-chromatic/src/categorical/category10.js\":\n/*!*********************************************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-scale-chromatic/src/categorical/category10.js ***!\n  \\*********************************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ \"./node_modules/dagre-d3/node_modules/d3-scale-chromatic/src/colors.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_colors_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(\"1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf\"));\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-scale-chromatic/src/colors.js\":\n/*!*****************************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-scale-chromatic/src/colors.js ***!\n  \\*****************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(specifier) {\n  var n = specifier.length / 6 | 0, colors = new Array(n), i = 0;\n  while (i < n) colors[i] = \"#\" + specifier.slice(i * 6, ++i * 6);\n  return colors;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-scale-chromatic/src/diverging/BrBG.js\":\n/*!*************************************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-scale-chromatic/src/diverging/BrBG.js ***!\n  \\*************************************************************************************/\n/*! exports provided: scheme, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"scheme\", function() { return scheme; });\n/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ \"./node_modules/dagre-d3/node_modules/d3-scale-chromatic/src/colors.js\");\n/* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ \"./node_modules/dagre-d3/node_modules/d3-scale-chromatic/src/ramp.js\");\n\n\n\nvar scheme = new Array(3).concat(\n  \"d8b365f5f5f55ab4ac\",\n  \"a6611adfc27d80cdc1018571\",\n  \"a6611adfc27df5f5f580cdc1018571\",\n  \"8c510ad8b365f6e8c3c7eae55ab4ac01665e\",\n  \"8c510ad8b365f6e8c3f5f5f5c7eae55ab4ac01665e\",\n  \"8c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e\",\n  \"8c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e\",\n  \"5430058c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e003c30\",\n  \"5430058c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e003c30\"\n).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(scheme));\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-scale-chromatic/src/diverging/PRGn.js\":\n/*!*************************************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-scale-chromatic/src/diverging/PRGn.js ***!\n  \\*************************************************************************************/\n/*! exports provided: scheme, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"scheme\", function() { return scheme; });\n/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ \"./node_modules/dagre-d3/node_modules/d3-scale-chromatic/src/colors.js\");\n/* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ \"./node_modules/dagre-d3/node_modules/d3-scale-chromatic/src/ramp.js\");\n\n\n\nvar scheme = new Array(3).concat(\n  \"af8dc3f7f7f77fbf7b\",\n  \"7b3294c2a5cfa6dba0008837\",\n  \"7b3294c2a5cff7f7f7a6dba0008837\",\n  \"762a83af8dc3e7d4e8d9f0d37fbf7b1b7837\",\n  \"762a83af8dc3e7d4e8f7f7f7d9f0d37fbf7b1b7837\",\n  \"762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b7837\",\n  \"762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b7837\",\n  \"40004b762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b783700441b\",\n  \"40004b762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b783700441b\"\n).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(scheme));\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-scale-chromatic/src/diverging/PiYG.js\":\n/*!*************************************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-scale-chromatic/src/diverging/PiYG.js ***!\n  \\*************************************************************************************/\n/*! exports provided: scheme, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"scheme\", function() { return scheme; });\n/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ \"./node_modules/dagre-d3/node_modules/d3-scale-chromatic/src/colors.js\");\n/* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ \"./node_modules/dagre-d3/node_modules/d3-scale-chromatic/src/ramp.js\");\n\n\n\nvar scheme = new Array(3).concat(\n  \"e9a3c9f7f7f7a1d76a\",\n  \"d01c8bf1b6dab8e1864dac26\",\n  \"d01c8bf1b6daf7f7f7b8e1864dac26\",\n  \"c51b7de9a3c9fde0efe6f5d0a1d76a4d9221\",\n  \"c51b7de9a3c9fde0eff7f7f7e6f5d0a1d76a4d9221\",\n  \"c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221\",\n  \"c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221\",\n  \"8e0152c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221276419\",\n  \"8e0152c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221276419\"\n).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(scheme));\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-scale-chromatic/src/diverging/PuOr.js\":\n/*!*************************************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-scale-chromatic/src/diverging/PuOr.js ***!\n  \\*************************************************************************************/\n/*! exports provided: scheme, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"scheme\", function() { return scheme; });\n/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ \"./node_modules/dagre-d3/node_modules/d3-scale-chromatic/src/colors.js\");\n/* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ \"./node_modules/dagre-d3/node_modules/d3-scale-chromatic/src/ramp.js\");\n\n\n\nvar scheme = new Array(3).concat(\n  \"998ec3f7f7f7f1a340\",\n  \"5e3c99b2abd2fdb863e66101\",\n  \"5e3c99b2abd2f7f7f7fdb863e66101\",\n  \"542788998ec3d8daebfee0b6f1a340b35806\",\n  \"542788998ec3d8daebf7f7f7fee0b6f1a340b35806\",\n  \"5427888073acb2abd2d8daebfee0b6fdb863e08214b35806\",\n  \"5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b35806\",\n  \"2d004b5427888073acb2abd2d8daebfee0b6fdb863e08214b358067f3b08\",\n  \"2d004b5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b358067f3b08\"\n).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(scheme));\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-scale-chromatic/src/diverging/RdBu.js\":\n/*!*************************************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-scale-chromatic/src/diverging/RdBu.js ***!\n  \\*************************************************************************************/\n/*! exports provided: scheme, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"scheme\", function() { return scheme; });\n/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ \"./node_modules/dagre-d3/node_modules/d3-scale-chromatic/src/colors.js\");\n/* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ \"./node_modules/dagre-d3/node_modules/d3-scale-chromatic/src/ramp.js\");\n\n\n\nvar scheme = new Array(3).concat(\n  \"ef8a62f7f7f767a9cf\",\n  \"ca0020f4a58292c5de0571b0\",\n  \"ca0020f4a582f7f7f792c5de0571b0\",\n  \"b2182bef8a62fddbc7d1e5f067a9cf2166ac\",\n  \"b2182bef8a62fddbc7f7f7f7d1e5f067a9cf2166ac\",\n  \"b2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac\",\n  \"b2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac\",\n  \"67001fb2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac053061\",\n  \"67001fb2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac053061\"\n).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(scheme));\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-scale-chromatic/src/diverging/RdGy.js\":\n/*!*************************************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-scale-chromatic/src/diverging/RdGy.js ***!\n  \\*************************************************************************************/\n/*! exports provided: scheme, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"scheme\", function() { return scheme; });\n/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ \"./node_modules/dagre-d3/node_modules/d3-scale-chromatic/src/colors.js\");\n/* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ \"./node_modules/dagre-d3/node_modules/d3-scale-chromatic/src/ramp.js\");\n\n\n\nvar scheme = new Array(3).concat(\n  \"ef8a62ffffff999999\",\n  \"ca0020f4a582bababa404040\",\n  \"ca0020f4a582ffffffbababa404040\",\n  \"b2182bef8a62fddbc7e0e0e09999994d4d4d\",\n  \"b2182bef8a62fddbc7ffffffe0e0e09999994d4d4d\",\n  \"b2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d\",\n  \"b2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d\",\n  \"67001fb2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d1a1a1a\",\n  \"67001fb2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d1a1a1a\"\n).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(scheme));\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-scale-chromatic/src/diverging/RdYlBu.js\":\n/*!***************************************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-scale-chromatic/src/diverging/RdYlBu.js ***!\n  \\***************************************************************************************/\n/*! exports provided: scheme, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"scheme\", function() { return scheme; });\n/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ \"./node_modules/dagre-d3/node_modules/d3-scale-chromatic/src/colors.js\");\n/* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ \"./node_modules/dagre-d3/node_modules/d3-scale-chromatic/src/ramp.js\");\n\n\n\nvar scheme = new Array(3).concat(\n  \"fc8d59ffffbf91bfdb\",\n  \"d7191cfdae61abd9e92c7bb6\",\n  \"d7191cfdae61ffffbfabd9e92c7bb6\",\n  \"d73027fc8d59fee090e0f3f891bfdb4575b4\",\n  \"d73027fc8d59fee090ffffbfe0f3f891bfdb4575b4\",\n  \"d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4\",\n  \"d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4\",\n  \"a50026d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4313695\",\n  \"a50026d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4313695\"\n).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(scheme));\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-scale-chromatic/src/diverging/RdYlGn.js\":\n/*!***************************************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-scale-chromatic/src/diverging/RdYlGn.js ***!\n  \\***************************************************************************************/\n/*! exports provided: scheme, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"scheme\", function() { return scheme; });\n/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ \"./node_modules/dagre-d3/node_modules/d3-scale-chromatic/src/colors.js\");\n/* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ \"./node_modules/dagre-d3/node_modules/d3-scale-chromatic/src/ramp.js\");\n\n\n\nvar scheme = new Array(3).concat(\n  \"fc8d59ffffbf91cf60\",\n  \"d7191cfdae61a6d96a1a9641\",\n  \"d7191cfdae61ffffbfa6d96a1a9641\",\n  \"d73027fc8d59fee08bd9ef8b91cf601a9850\",\n  \"d73027fc8d59fee08bffffbfd9ef8b91cf601a9850\",\n  \"d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850\",\n  \"d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850\",\n  \"a50026d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850006837\",\n  \"a50026d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850006837\"\n).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(scheme));\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-scale-chromatic/src/diverging/Spectral.js\":\n/*!*****************************************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-scale-chromatic/src/diverging/Spectral.js ***!\n  \\*****************************************************************************************/\n/*! exports provided: scheme, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"scheme\", function() { return scheme; });\n/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ \"./node_modules/dagre-d3/node_modules/d3-scale-chromatic/src/colors.js\");\n/* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ \"./node_modules/dagre-d3/node_modules/d3-scale-chromatic/src/ramp.js\");\n\n\n\nvar scheme = new Array(3).concat(\n  \"fc8d59ffffbf99d594\",\n  \"d7191cfdae61abdda42b83ba\",\n  \"d7191cfdae61ffffbfabdda42b83ba\",\n  \"d53e4ffc8d59fee08be6f59899d5943288bd\",\n  \"d53e4ffc8d59fee08bffffbfe6f59899d5943288bd\",\n  \"d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd\",\n  \"d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd\",\n  \"9e0142d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd5e4fa2\",\n  \"9e0142d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd5e4fa2\"\n).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(scheme));\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-scale-chromatic/src/index.js\":\n/*!****************************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-scale-chromatic/src/index.js ***!\n  \\****************************************************************************/\n/*! exports provided: schemeCategory10, schemeAccent, schemeDark2, schemePaired, schemePastel1, schemePastel2, schemeSet1, schemeSet2, schemeSet3, schemeTableau10, interpolateBrBG, schemeBrBG, interpolatePRGn, schemePRGn, interpolatePiYG, schemePiYG, interpolatePuOr, schemePuOr, interpolateRdBu, schemeRdBu, interpolateRdGy, schemeRdGy, interpolateRdYlBu, schemeRdYlBu, interpolateRdYlGn, schemeRdYlGn, interpolateSpectral, schemeSpectral, interpolateBuGn, schemeBuGn, interpolateBuPu, schemeBuPu, interpolateGnBu, schemeGnBu, interpolateOrRd, schemeOrRd, interpolatePuBuGn, schemePuBuGn, interpolatePuBu, schemePuBu, interpolatePuRd, schemePuRd, interpolateRdPu, schemeRdPu, interpolateYlGnBu, schemeYlGnBu, interpolateYlGn, schemeYlGn, interpolateYlOrBr, schemeYlOrBr, interpolateYlOrRd, schemeYlOrRd, interpolateBlues, schemeBlues, interpolateGreens, schemeGreens, interpolateGreys, schemeGreys, interpolatePurples, schemePurples, interpolateReds, schemeReds, interpolateOranges, schemeOranges, interpolateCividis, interpolateCubehelixDefault, interpolateRainbow, interpolateWarm, interpolateCool, interpolateSinebow, interpolateTurbo, interpolateViridis, interpolateMagma, interpolateInferno, interpolatePlasma */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _categorical_category10_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./categorical/category10.js */ \"./node_modules/dagre-d3/node_modules/d3-scale-chromatic/src/categorical/category10.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"schemeCategory10\", function() { return _categorical_category10_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n/* harmony import */ var _categorical_Accent_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./categorical/Accent.js */ \"./node_modules/dagre-d3/node_modules/d3-scale-chromatic/src/categorical/Accent.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"schemeAccent\", function() { return _categorical_Accent_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"]; });\n\n/* harmony import */ var _categorical_Dark2_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./categorical/Dark2.js */ \"./node_modules/dagre-d3/node_modules/d3-scale-chromatic/src/categorical/Dark2.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"schemeDark2\", function() { return _categorical_Dark2_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"]; });\n\n/* harmony import */ var _categorical_Paired_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./categorical/Paired.js */ \"./node_modules/dagre-d3/node_modules/d3-scale-chromatic/src/categorical/Paired.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"schemePaired\", function() { return _categorical_Paired_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"]; });\n\n/* harmony import */ var _categorical_Pastel1_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./categorical/Pastel1.js */ \"./node_modules/dagre-d3/node_modules/d3-scale-chromatic/src/categorical/Pastel1.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"schemePastel1\", function() { return _categorical_Pastel1_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"]; });\n\n/* harmony import */ var _categorical_Pastel2_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./categorical/Pastel2.js */ \"./node_modules/dagre-d3/node_modules/d3-scale-chromatic/src/categorical/Pastel2.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"schemePastel2\", function() { return _categorical_Pastel2_js__WEBPACK_IMPORTED_MODULE_5__[\"default\"]; });\n\n/* harmony import */ var _categorical_Set1_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./categorical/Set1.js */ \"./node_modules/dagre-d3/node_modules/d3-scale-chromatic/src/categorical/Set1.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"schemeSet1\", function() { return _categorical_Set1_js__WEBPACK_IMPORTED_MODULE_6__[\"default\"]; });\n\n/* harmony import */ var _categorical_Set2_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./categorical/Set2.js */ \"./node_modules/dagre-d3/node_modules/d3-scale-chromatic/src/categorical/Set2.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"schemeSet2\", function() { return _categorical_Set2_js__WEBPACK_IMPORTED_MODULE_7__[\"default\"]; });\n\n/* harmony import */ var _categorical_Set3_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./categorical/Set3.js */ \"./node_modules/dagre-d3/node_modules/d3-scale-chromatic/src/categorical/Set3.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"schemeSet3\", function() { return _categorical_Set3_js__WEBPACK_IMPORTED_MODULE_8__[\"default\"]; });\n\n/* harmony import */ var _categorical_Tableau10_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./categorical/Tableau10.js */ \"./node_modules/dagre-d3/node_modules/d3-scale-chromatic/src/categorical/Tableau10.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"schemeTableau10\", function() { return _categorical_Tableau10_js__WEBPACK_IMPORTED_MODULE_9__[\"default\"]; });\n\n/* harmony import */ var _diverging_BrBG_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./diverging/BrBG.js */ \"./node_modules/dagre-d3/node_modules/d3-scale-chromatic/src/diverging/BrBG.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateBrBG\", function() { return _diverging_BrBG_js__WEBPACK_IMPORTED_MODULE_10__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"schemeBrBG\", function() { return _diverging_BrBG_js__WEBPACK_IMPORTED_MODULE_10__[\"scheme\"]; });\n\n/* harmony import */ var _diverging_PRGn_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./diverging/PRGn.js */ \"./node_modules/dagre-d3/node_modules/d3-scale-chromatic/src/diverging/PRGn.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolatePRGn\", function() { return _diverging_PRGn_js__WEBPACK_IMPORTED_MODULE_11__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"schemePRGn\", function() { return _diverging_PRGn_js__WEBPACK_IMPORTED_MODULE_11__[\"scheme\"]; });\n\n/* harmony import */ var _diverging_PiYG_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./diverging/PiYG.js */ \"./node_modules/dagre-d3/node_modules/d3-scale-chromatic/src/diverging/PiYG.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolatePiYG\", function() { return _diverging_PiYG_js__WEBPACK_IMPORTED_MODULE_12__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"schemePiYG\", function() { return _diverging_PiYG_js__WEBPACK_IMPORTED_MODULE_12__[\"scheme\"]; });\n\n/* harmony import */ var _diverging_PuOr_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./diverging/PuOr.js */ \"./node_modules/dagre-d3/node_modules/d3-scale-chromatic/src/diverging/PuOr.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolatePuOr\", function() { return _diverging_PuOr_js__WEBPACK_IMPORTED_MODULE_13__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"schemePuOr\", function() { return _diverging_PuOr_js__WEBPACK_IMPORTED_MODULE_13__[\"scheme\"]; });\n\n/* harmony import */ var _diverging_RdBu_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./diverging/RdBu.js */ \"./node_modules/dagre-d3/node_modules/d3-scale-chromatic/src/diverging/RdBu.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateRdBu\", function() { return _diverging_RdBu_js__WEBPACK_IMPORTED_MODULE_14__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"schemeRdBu\", function() { return _diverging_RdBu_js__WEBPACK_IMPORTED_MODULE_14__[\"scheme\"]; });\n\n/* harmony import */ var _diverging_RdGy_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./diverging/RdGy.js */ \"./node_modules/dagre-d3/node_modules/d3-scale-chromatic/src/diverging/RdGy.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateRdGy\", function() { return _diverging_RdGy_js__WEBPACK_IMPORTED_MODULE_15__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"schemeRdGy\", function() { return _diverging_RdGy_js__WEBPACK_IMPORTED_MODULE_15__[\"scheme\"]; });\n\n/* harmony import */ var _diverging_RdYlBu_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./diverging/RdYlBu.js */ \"./node_modules/dagre-d3/node_modules/d3-scale-chromatic/src/diverging/RdYlBu.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateRdYlBu\", function() { return _diverging_RdYlBu_js__WEBPACK_IMPORTED_MODULE_16__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"schemeRdYlBu\", function() { return _diverging_RdYlBu_js__WEBPACK_IMPORTED_MODULE_16__[\"scheme\"]; });\n\n/* harmony import */ var _diverging_RdYlGn_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./diverging/RdYlGn.js */ \"./node_modules/dagre-d3/node_modules/d3-scale-chromatic/src/diverging/RdYlGn.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateRdYlGn\", function() { return _diverging_RdYlGn_js__WEBPACK_IMPORTED_MODULE_17__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"schemeRdYlGn\", function() { return _diverging_RdYlGn_js__WEBPACK_IMPORTED_MODULE_17__[\"scheme\"]; });\n\n/* harmony import */ var _diverging_Spectral_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./diverging/Spectral.js */ \"./node_modules/dagre-d3/node_modules/d3-scale-chromatic/src/diverging/Spectral.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateSpectral\", function() { return _diverging_Spectral_js__WEBPACK_IMPORTED_MODULE_18__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"schemeSpectral\", function() { return _diverging_Spectral_js__WEBPACK_IMPORTED_MODULE_18__[\"scheme\"]; });\n\n/* harmony import */ var _sequential_multi_BuGn_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./sequential-multi/BuGn.js */ \"./node_modules/dagre-d3/node_modules/d3-scale-chromatic/src/sequential-multi/BuGn.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateBuGn\", function() { return _sequential_multi_BuGn_js__WEBPACK_IMPORTED_MODULE_19__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"schemeBuGn\", function() { return _sequential_multi_BuGn_js__WEBPACK_IMPORTED_MODULE_19__[\"scheme\"]; });\n\n/* harmony import */ var _sequential_multi_BuPu_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./sequential-multi/BuPu.js */ \"./node_modules/dagre-d3/node_modules/d3-scale-chromatic/src/sequential-multi/BuPu.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateBuPu\", function() { return _sequential_multi_BuPu_js__WEBPACK_IMPORTED_MODULE_20__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"schemeBuPu\", function() { return _sequential_multi_BuPu_js__WEBPACK_IMPORTED_MODULE_20__[\"scheme\"]; });\n\n/* harmony import */ var _sequential_multi_GnBu_js__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./sequential-multi/GnBu.js */ \"./node_modules/dagre-d3/node_modules/d3-scale-chromatic/src/sequential-multi/GnBu.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateGnBu\", function() { return _sequential_multi_GnBu_js__WEBPACK_IMPORTED_MODULE_21__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"schemeGnBu\", function() { return _sequential_multi_GnBu_js__WEBPACK_IMPORTED_MODULE_21__[\"scheme\"]; });\n\n/* harmony import */ var _sequential_multi_OrRd_js__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./sequential-multi/OrRd.js */ \"./node_modules/dagre-d3/node_modules/d3-scale-chromatic/src/sequential-multi/OrRd.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateOrRd\", function() { return _sequential_multi_OrRd_js__WEBPACK_IMPORTED_MODULE_22__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"schemeOrRd\", function() { return _sequential_multi_OrRd_js__WEBPACK_IMPORTED_MODULE_22__[\"scheme\"]; });\n\n/* harmony import */ var _sequential_multi_PuBuGn_js__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./sequential-multi/PuBuGn.js */ \"./node_modules/dagre-d3/node_modules/d3-scale-chromatic/src/sequential-multi/PuBuGn.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolatePuBuGn\", function() { return _sequential_multi_PuBuGn_js__WEBPACK_IMPORTED_MODULE_23__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"schemePuBuGn\", function() { return _sequential_multi_PuBuGn_js__WEBPACK_IMPORTED_MODULE_23__[\"scheme\"]; });\n\n/* harmony import */ var _sequential_multi_PuBu_js__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ./sequential-multi/PuBu.js */ \"./node_modules/dagre-d3/node_modules/d3-scale-chromatic/src/sequential-multi/PuBu.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolatePuBu\", function() { return _sequential_multi_PuBu_js__WEBPACK_IMPORTED_MODULE_24__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"schemePuBu\", function() { return _sequential_multi_PuBu_js__WEBPACK_IMPORTED_MODULE_24__[\"scheme\"]; });\n\n/* harmony import */ var _sequential_multi_PuRd_js__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ./sequential-multi/PuRd.js */ \"./node_modules/dagre-d3/node_modules/d3-scale-chromatic/src/sequential-multi/PuRd.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolatePuRd\", function() { return _sequential_multi_PuRd_js__WEBPACK_IMPORTED_MODULE_25__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"schemePuRd\", function() { return _sequential_multi_PuRd_js__WEBPACK_IMPORTED_MODULE_25__[\"scheme\"]; });\n\n/* harmony import */ var _sequential_multi_RdPu_js__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ./sequential-multi/RdPu.js */ \"./node_modules/dagre-d3/node_modules/d3-scale-chromatic/src/sequential-multi/RdPu.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateRdPu\", function() { return _sequential_multi_RdPu_js__WEBPACK_IMPORTED_MODULE_26__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"schemeRdPu\", function() { return _sequential_multi_RdPu_js__WEBPACK_IMPORTED_MODULE_26__[\"scheme\"]; });\n\n/* harmony import */ var _sequential_multi_YlGnBu_js__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ./sequential-multi/YlGnBu.js */ \"./node_modules/dagre-d3/node_modules/d3-scale-chromatic/src/sequential-multi/YlGnBu.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateYlGnBu\", function() { return _sequential_multi_YlGnBu_js__WEBPACK_IMPORTED_MODULE_27__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"schemeYlGnBu\", function() { return _sequential_multi_YlGnBu_js__WEBPACK_IMPORTED_MODULE_27__[\"scheme\"]; });\n\n/* harmony import */ var _sequential_multi_YlGn_js__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ./sequential-multi/YlGn.js */ \"./node_modules/dagre-d3/node_modules/d3-scale-chromatic/src/sequential-multi/YlGn.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateYlGn\", function() { return _sequential_multi_YlGn_js__WEBPACK_IMPORTED_MODULE_28__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"schemeYlGn\", function() { return _sequential_multi_YlGn_js__WEBPACK_IMPORTED_MODULE_28__[\"scheme\"]; });\n\n/* harmony import */ var _sequential_multi_YlOrBr_js__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ./sequential-multi/YlOrBr.js */ \"./node_modules/dagre-d3/node_modules/d3-scale-chromatic/src/sequential-multi/YlOrBr.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateYlOrBr\", function() { return _sequential_multi_YlOrBr_js__WEBPACK_IMPORTED_MODULE_29__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"schemeYlOrBr\", function() { return _sequential_multi_YlOrBr_js__WEBPACK_IMPORTED_MODULE_29__[\"scheme\"]; });\n\n/* harmony import */ var _sequential_multi_YlOrRd_js__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ./sequential-multi/YlOrRd.js */ \"./node_modules/dagre-d3/node_modules/d3-scale-chromatic/src/sequential-multi/YlOrRd.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateYlOrRd\", function() { return _sequential_multi_YlOrRd_js__WEBPACK_IMPORTED_MODULE_30__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"schemeYlOrRd\", function() { return _sequential_multi_YlOrRd_js__WEBPACK_IMPORTED_MODULE_30__[\"scheme\"]; });\n\n/* harmony import */ var _sequential_single_Blues_js__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ./sequential-single/Blues.js */ \"./node_modules/dagre-d3/node_modules/d3-scale-chromatic/src/sequential-single/Blues.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateBlues\", function() { return _sequential_single_Blues_js__WEBPACK_IMPORTED_MODULE_31__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"schemeBlues\", function() { return _sequential_single_Blues_js__WEBPACK_IMPORTED_MODULE_31__[\"scheme\"]; });\n\n/* harmony import */ var _sequential_single_Greens_js__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ./sequential-single/Greens.js */ \"./node_modules/dagre-d3/node_modules/d3-scale-chromatic/src/sequential-single/Greens.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateGreens\", function() { return _sequential_single_Greens_js__WEBPACK_IMPORTED_MODULE_32__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"schemeGreens\", function() { return _sequential_single_Greens_js__WEBPACK_IMPORTED_MODULE_32__[\"scheme\"]; });\n\n/* harmony import */ var _sequential_single_Greys_js__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! ./sequential-single/Greys.js */ \"./node_modules/dagre-d3/node_modules/d3-scale-chromatic/src/sequential-single/Greys.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateGreys\", function() { return _sequential_single_Greys_js__WEBPACK_IMPORTED_MODULE_33__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"schemeGreys\", function() { return _sequential_single_Greys_js__WEBPACK_IMPORTED_MODULE_33__[\"scheme\"]; });\n\n/* harmony import */ var _sequential_single_Purples_js__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! ./sequential-single/Purples.js */ \"./node_modules/dagre-d3/node_modules/d3-scale-chromatic/src/sequential-single/Purples.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolatePurples\", function() { return _sequential_single_Purples_js__WEBPACK_IMPORTED_MODULE_34__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"schemePurples\", function() { return _sequential_single_Purples_js__WEBPACK_IMPORTED_MODULE_34__[\"scheme\"]; });\n\n/* harmony import */ var _sequential_single_Reds_js__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(/*! ./sequential-single/Reds.js */ \"./node_modules/dagre-d3/node_modules/d3-scale-chromatic/src/sequential-single/Reds.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateReds\", function() { return _sequential_single_Reds_js__WEBPACK_IMPORTED_MODULE_35__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"schemeReds\", function() { return _sequential_single_Reds_js__WEBPACK_IMPORTED_MODULE_35__[\"scheme\"]; });\n\n/* harmony import */ var _sequential_single_Oranges_js__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(/*! ./sequential-single/Oranges.js */ \"./node_modules/dagre-d3/node_modules/d3-scale-chromatic/src/sequential-single/Oranges.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateOranges\", function() { return _sequential_single_Oranges_js__WEBPACK_IMPORTED_MODULE_36__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"schemeOranges\", function() { return _sequential_single_Oranges_js__WEBPACK_IMPORTED_MODULE_36__[\"scheme\"]; });\n\n/* harmony import */ var _sequential_multi_cividis_js__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(/*! ./sequential-multi/cividis.js */ \"./node_modules/dagre-d3/node_modules/d3-scale-chromatic/src/sequential-multi/cividis.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateCividis\", function() { return _sequential_multi_cividis_js__WEBPACK_IMPORTED_MODULE_37__[\"default\"]; });\n\n/* harmony import */ var _sequential_multi_cubehelix_js__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(/*! ./sequential-multi/cubehelix.js */ \"./node_modules/dagre-d3/node_modules/d3-scale-chromatic/src/sequential-multi/cubehelix.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateCubehelixDefault\", function() { return _sequential_multi_cubehelix_js__WEBPACK_IMPORTED_MODULE_38__[\"default\"]; });\n\n/* harmony import */ var _sequential_multi_rainbow_js__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__(/*! ./sequential-multi/rainbow.js */ \"./node_modules/dagre-d3/node_modules/d3-scale-chromatic/src/sequential-multi/rainbow.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateRainbow\", function() { return _sequential_multi_rainbow_js__WEBPACK_IMPORTED_MODULE_39__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateWarm\", function() { return _sequential_multi_rainbow_js__WEBPACK_IMPORTED_MODULE_39__[\"warm\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateCool\", function() { return _sequential_multi_rainbow_js__WEBPACK_IMPORTED_MODULE_39__[\"cool\"]; });\n\n/* harmony import */ var _sequential_multi_sinebow_js__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__(/*! ./sequential-multi/sinebow.js */ \"./node_modules/dagre-d3/node_modules/d3-scale-chromatic/src/sequential-multi/sinebow.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateSinebow\", function() { return _sequential_multi_sinebow_js__WEBPACK_IMPORTED_MODULE_40__[\"default\"]; });\n\n/* harmony import */ var _sequential_multi_turbo_js__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__(/*! ./sequential-multi/turbo.js */ \"./node_modules/dagre-d3/node_modules/d3-scale-chromatic/src/sequential-multi/turbo.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateTurbo\", function() { return _sequential_multi_turbo_js__WEBPACK_IMPORTED_MODULE_41__[\"default\"]; });\n\n/* harmony import */ var _sequential_multi_viridis_js__WEBPACK_IMPORTED_MODULE_42__ = __webpack_require__(/*! ./sequential-multi/viridis.js */ \"./node_modules/dagre-d3/node_modules/d3-scale-chromatic/src/sequential-multi/viridis.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateViridis\", function() { return _sequential_multi_viridis_js__WEBPACK_IMPORTED_MODULE_42__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateMagma\", function() { return _sequential_multi_viridis_js__WEBPACK_IMPORTED_MODULE_42__[\"magma\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateInferno\", function() { return _sequential_multi_viridis_js__WEBPACK_IMPORTED_MODULE_42__[\"inferno\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolatePlasma\", function() { return _sequential_multi_viridis_js__WEBPACK_IMPORTED_MODULE_42__[\"plasma\"]; });\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-scale-chromatic/src/ramp.js\":\n/*!***************************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-scale-chromatic/src/ramp.js ***!\n  \\***************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var d3_interpolate__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-interpolate */ \"./node_modules/d3-interpolate/src/index.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(scheme) {\n  return Object(d3_interpolate__WEBPACK_IMPORTED_MODULE_0__[\"interpolateRgbBasis\"])(scheme[scheme.length - 1]);\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-scale-chromatic/src/sequential-multi/BuGn.js\":\n/*!********************************************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-scale-chromatic/src/sequential-multi/BuGn.js ***!\n  \\********************************************************************************************/\n/*! exports provided: scheme, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"scheme\", function() { return scheme; });\n/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ \"./node_modules/dagre-d3/node_modules/d3-scale-chromatic/src/colors.js\");\n/* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ \"./node_modules/dagre-d3/node_modules/d3-scale-chromatic/src/ramp.js\");\n\n\n\nvar scheme = new Array(3).concat(\n  \"e5f5f999d8c92ca25f\",\n  \"edf8fbb2e2e266c2a4238b45\",\n  \"edf8fbb2e2e266c2a42ca25f006d2c\",\n  \"edf8fbccece699d8c966c2a42ca25f006d2c\",\n  \"edf8fbccece699d8c966c2a441ae76238b45005824\",\n  \"f7fcfde5f5f9ccece699d8c966c2a441ae76238b45005824\",\n  \"f7fcfde5f5f9ccece699d8c966c2a441ae76238b45006d2c00441b\"\n).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(scheme));\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-scale-chromatic/src/sequential-multi/BuPu.js\":\n/*!********************************************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-scale-chromatic/src/sequential-multi/BuPu.js ***!\n  \\********************************************************************************************/\n/*! exports provided: scheme, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"scheme\", function() { return scheme; });\n/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ \"./node_modules/dagre-d3/node_modules/d3-scale-chromatic/src/colors.js\");\n/* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ \"./node_modules/dagre-d3/node_modules/d3-scale-chromatic/src/ramp.js\");\n\n\n\nvar scheme = new Array(3).concat(\n  \"e0ecf49ebcda8856a7\",\n  \"edf8fbb3cde38c96c688419d\",\n  \"edf8fbb3cde38c96c68856a7810f7c\",\n  \"edf8fbbfd3e69ebcda8c96c68856a7810f7c\",\n  \"edf8fbbfd3e69ebcda8c96c68c6bb188419d6e016b\",\n  \"f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d6e016b\",\n  \"f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d810f7c4d004b\"\n).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(scheme));\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-scale-chromatic/src/sequential-multi/GnBu.js\":\n/*!********************************************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-scale-chromatic/src/sequential-multi/GnBu.js ***!\n  \\********************************************************************************************/\n/*! exports provided: scheme, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"scheme\", function() { return scheme; });\n/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ \"./node_modules/dagre-d3/node_modules/d3-scale-chromatic/src/colors.js\");\n/* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ \"./node_modules/dagre-d3/node_modules/d3-scale-chromatic/src/ramp.js\");\n\n\n\nvar scheme = new Array(3).concat(\n  \"e0f3dba8ddb543a2ca\",\n  \"f0f9e8bae4bc7bccc42b8cbe\",\n  \"f0f9e8bae4bc7bccc443a2ca0868ac\",\n  \"f0f9e8ccebc5a8ddb57bccc443a2ca0868ac\",\n  \"f0f9e8ccebc5a8ddb57bccc44eb3d32b8cbe08589e\",\n  \"f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe08589e\",\n  \"f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe0868ac084081\"\n).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(scheme));\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-scale-chromatic/src/sequential-multi/OrRd.js\":\n/*!********************************************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-scale-chromatic/src/sequential-multi/OrRd.js ***!\n  \\********************************************************************************************/\n/*! exports provided: scheme, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"scheme\", function() { return scheme; });\n/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ \"./node_modules/dagre-d3/node_modules/d3-scale-chromatic/src/colors.js\");\n/* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ \"./node_modules/dagre-d3/node_modules/d3-scale-chromatic/src/ramp.js\");\n\n\n\nvar scheme = new Array(3).concat(\n  \"fee8c8fdbb84e34a33\",\n  \"fef0d9fdcc8afc8d59d7301f\",\n  \"fef0d9fdcc8afc8d59e34a33b30000\",\n  \"fef0d9fdd49efdbb84fc8d59e34a33b30000\",\n  \"fef0d9fdd49efdbb84fc8d59ef6548d7301f990000\",\n  \"fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000\",\n  \"fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000\"\n).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(scheme));\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-scale-chromatic/src/sequential-multi/PuBu.js\":\n/*!********************************************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-scale-chromatic/src/sequential-multi/PuBu.js ***!\n  \\********************************************************************************************/\n/*! exports provided: scheme, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"scheme\", function() { return scheme; });\n/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ \"./node_modules/dagre-d3/node_modules/d3-scale-chromatic/src/colors.js\");\n/* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ \"./node_modules/dagre-d3/node_modules/d3-scale-chromatic/src/ramp.js\");\n\n\n\nvar scheme = new Array(3).concat(\n  \"ece7f2a6bddb2b8cbe\",\n  \"f1eef6bdc9e174a9cf0570b0\",\n  \"f1eef6bdc9e174a9cf2b8cbe045a8d\",\n  \"f1eef6d0d1e6a6bddb74a9cf2b8cbe045a8d\",\n  \"f1eef6d0d1e6a6bddb74a9cf3690c00570b0034e7b\",\n  \"fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0034e7b\",\n  \"fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0045a8d023858\"\n).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(scheme));\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-scale-chromatic/src/sequential-multi/PuBuGn.js\":\n/*!**********************************************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-scale-chromatic/src/sequential-multi/PuBuGn.js ***!\n  \\**********************************************************************************************/\n/*! exports provided: scheme, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"scheme\", function() { return scheme; });\n/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ \"./node_modules/dagre-d3/node_modules/d3-scale-chromatic/src/colors.js\");\n/* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ \"./node_modules/dagre-d3/node_modules/d3-scale-chromatic/src/ramp.js\");\n\n\n\nvar scheme = new Array(3).concat(\n  \"ece2f0a6bddb1c9099\",\n  \"f6eff7bdc9e167a9cf02818a\",\n  \"f6eff7bdc9e167a9cf1c9099016c59\",\n  \"f6eff7d0d1e6a6bddb67a9cf1c9099016c59\",\n  \"f6eff7d0d1e6a6bddb67a9cf3690c002818a016450\",\n  \"fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016450\",\n  \"fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016c59014636\"\n).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(scheme));\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-scale-chromatic/src/sequential-multi/PuRd.js\":\n/*!********************************************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-scale-chromatic/src/sequential-multi/PuRd.js ***!\n  \\********************************************************************************************/\n/*! exports provided: scheme, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"scheme\", function() { return scheme; });\n/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ \"./node_modules/dagre-d3/node_modules/d3-scale-chromatic/src/colors.js\");\n/* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ \"./node_modules/dagre-d3/node_modules/d3-scale-chromatic/src/ramp.js\");\n\n\n\nvar scheme = new Array(3).concat(\n  \"e7e1efc994c7dd1c77\",\n  \"f1eef6d7b5d8df65b0ce1256\",\n  \"f1eef6d7b5d8df65b0dd1c77980043\",\n  \"f1eef6d4b9dac994c7df65b0dd1c77980043\",\n  \"f1eef6d4b9dac994c7df65b0e7298ace125691003f\",\n  \"f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125691003f\",\n  \"f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125698004367001f\"\n).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(scheme));\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-scale-chromatic/src/sequential-multi/RdPu.js\":\n/*!********************************************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-scale-chromatic/src/sequential-multi/RdPu.js ***!\n  \\********************************************************************************************/\n/*! exports provided: scheme, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"scheme\", function() { return scheme; });\n/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ \"./node_modules/dagre-d3/node_modules/d3-scale-chromatic/src/colors.js\");\n/* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ \"./node_modules/dagre-d3/node_modules/d3-scale-chromatic/src/ramp.js\");\n\n\n\nvar scheme = new Array(3).concat(\n  \"fde0ddfa9fb5c51b8a\",\n  \"feebe2fbb4b9f768a1ae017e\",\n  \"feebe2fbb4b9f768a1c51b8a7a0177\",\n  \"feebe2fcc5c0fa9fb5f768a1c51b8a7a0177\",\n  \"feebe2fcc5c0fa9fb5f768a1dd3497ae017e7a0177\",\n  \"fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a0177\",\n  \"fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a017749006a\"\n).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(scheme));\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-scale-chromatic/src/sequential-multi/YlGn.js\":\n/*!********************************************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-scale-chromatic/src/sequential-multi/YlGn.js ***!\n  \\********************************************************************************************/\n/*! exports provided: scheme, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"scheme\", function() { return scheme; });\n/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ \"./node_modules/dagre-d3/node_modules/d3-scale-chromatic/src/colors.js\");\n/* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ \"./node_modules/dagre-d3/node_modules/d3-scale-chromatic/src/ramp.js\");\n\n\n\nvar scheme = new Array(3).concat(\n  \"f7fcb9addd8e31a354\",\n  \"ffffccc2e69978c679238443\",\n  \"ffffccc2e69978c67931a354006837\",\n  \"ffffccd9f0a3addd8e78c67931a354006837\",\n  \"ffffccd9f0a3addd8e78c67941ab5d238443005a32\",\n  \"ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443005a32\",\n  \"ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443006837004529\"\n).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(scheme));\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-scale-chromatic/src/sequential-multi/YlGnBu.js\":\n/*!**********************************************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-scale-chromatic/src/sequential-multi/YlGnBu.js ***!\n  \\**********************************************************************************************/\n/*! exports provided: scheme, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"scheme\", function() { return scheme; });\n/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ \"./node_modules/dagre-d3/node_modules/d3-scale-chromatic/src/colors.js\");\n/* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ \"./node_modules/dagre-d3/node_modules/d3-scale-chromatic/src/ramp.js\");\n\n\n\nvar scheme = new Array(3).concat(\n  \"edf8b17fcdbb2c7fb8\",\n  \"ffffcca1dab441b6c4225ea8\",\n  \"ffffcca1dab441b6c42c7fb8253494\",\n  \"ffffccc7e9b47fcdbb41b6c42c7fb8253494\",\n  \"ffffccc7e9b47fcdbb41b6c41d91c0225ea80c2c84\",\n  \"ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea80c2c84\",\n  \"ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea8253494081d58\"\n).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(scheme));\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-scale-chromatic/src/sequential-multi/YlOrBr.js\":\n/*!**********************************************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-scale-chromatic/src/sequential-multi/YlOrBr.js ***!\n  \\**********************************************************************************************/\n/*! exports provided: scheme, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"scheme\", function() { return scheme; });\n/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ \"./node_modules/dagre-d3/node_modules/d3-scale-chromatic/src/colors.js\");\n/* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ \"./node_modules/dagre-d3/node_modules/d3-scale-chromatic/src/ramp.js\");\n\n\n\nvar scheme = new Array(3).concat(\n  \"fff7bcfec44fd95f0e\",\n  \"ffffd4fed98efe9929cc4c02\",\n  \"ffffd4fed98efe9929d95f0e993404\",\n  \"ffffd4fee391fec44ffe9929d95f0e993404\",\n  \"ffffd4fee391fec44ffe9929ec7014cc4c028c2d04\",\n  \"ffffe5fff7bcfee391fec44ffe9929ec7014cc4c028c2d04\",\n  \"ffffe5fff7bcfee391fec44ffe9929ec7014cc4c02993404662506\"\n).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(scheme));\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-scale-chromatic/src/sequential-multi/YlOrRd.js\":\n/*!**********************************************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-scale-chromatic/src/sequential-multi/YlOrRd.js ***!\n  \\**********************************************************************************************/\n/*! exports provided: scheme, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"scheme\", function() { return scheme; });\n/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ \"./node_modules/dagre-d3/node_modules/d3-scale-chromatic/src/colors.js\");\n/* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ \"./node_modules/dagre-d3/node_modules/d3-scale-chromatic/src/ramp.js\");\n\n\n\nvar scheme = new Array(3).concat(\n  \"ffeda0feb24cf03b20\",\n  \"ffffb2fecc5cfd8d3ce31a1c\",\n  \"ffffb2fecc5cfd8d3cf03b20bd0026\",\n  \"ffffb2fed976feb24cfd8d3cf03b20bd0026\",\n  \"ffffb2fed976feb24cfd8d3cfc4e2ae31a1cb10026\",\n  \"ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cb10026\",\n  \"ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cbd0026800026\"\n).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(scheme));\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-scale-chromatic/src/sequential-multi/cividis.js\":\n/*!***********************************************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-scale-chromatic/src/sequential-multi/cividis.js ***!\n  \\***********************************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(t) {\n  t = Math.max(0, Math.min(1, t));\n  return \"rgb(\"\n      + Math.max(0, Math.min(255, Math.round(-4.54 - t * (35.34 - t * (2381.73 - t * (6402.7 - t * (7024.72 - t * 2710.57))))))) + \", \"\n      + Math.max(0, Math.min(255, Math.round(32.49 + t * (170.73 + t * (52.82 - t * (131.46 - t * (176.58 - t * 67.37))))))) + \", \"\n      + Math.max(0, Math.min(255, Math.round(81.24 + t * (442.36 - t * (2482.43 - t * (6167.24 - t * (6614.94 - t * 2475.67)))))))\n      + \")\";\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-scale-chromatic/src/sequential-multi/cubehelix.js\":\n/*!*************************************************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-scale-chromatic/src/sequential-multi/cubehelix.js ***!\n  \\*************************************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var d3_color__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-color */ \"./node_modules/d3-color/src/index.js\");\n/* harmony import */ var d3_interpolate__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! d3-interpolate */ \"./node_modules/d3-interpolate/src/index.js\");\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(d3_interpolate__WEBPACK_IMPORTED_MODULE_1__[\"interpolateCubehelixLong\"])(Object(d3_color__WEBPACK_IMPORTED_MODULE_0__[\"cubehelix\"])(300, 0.5, 0.0), Object(d3_color__WEBPACK_IMPORTED_MODULE_0__[\"cubehelix\"])(-240, 0.5, 1.0)));\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-scale-chromatic/src/sequential-multi/rainbow.js\":\n/*!***********************************************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-scale-chromatic/src/sequential-multi/rainbow.js ***!\n  \\***********************************************************************************************/\n/*! exports provided: warm, cool, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"warm\", function() { return warm; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"cool\", function() { return cool; });\n/* harmony import */ var d3_color__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-color */ \"./node_modules/d3-color/src/index.js\");\n/* harmony import */ var d3_interpolate__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! d3-interpolate */ \"./node_modules/d3-interpolate/src/index.js\");\n\n\n\nvar warm = Object(d3_interpolate__WEBPACK_IMPORTED_MODULE_1__[\"interpolateCubehelixLong\"])(Object(d3_color__WEBPACK_IMPORTED_MODULE_0__[\"cubehelix\"])(-100, 0.75, 0.35), Object(d3_color__WEBPACK_IMPORTED_MODULE_0__[\"cubehelix\"])(80, 1.50, 0.8));\n\nvar cool = Object(d3_interpolate__WEBPACK_IMPORTED_MODULE_1__[\"interpolateCubehelixLong\"])(Object(d3_color__WEBPACK_IMPORTED_MODULE_0__[\"cubehelix\"])(260, 0.75, 0.35), Object(d3_color__WEBPACK_IMPORTED_MODULE_0__[\"cubehelix\"])(80, 1.50, 0.8));\n\nvar c = Object(d3_color__WEBPACK_IMPORTED_MODULE_0__[\"cubehelix\"])();\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(t) {\n  if (t < 0 || t > 1) t -= Math.floor(t);\n  var ts = Math.abs(t - 0.5);\n  c.h = 360 * t - 100;\n  c.s = 1.5 - 1.5 * ts;\n  c.l = 0.8 - 0.9 * ts;\n  return c + \"\";\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-scale-chromatic/src/sequential-multi/sinebow.js\":\n/*!***********************************************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-scale-chromatic/src/sequential-multi/sinebow.js ***!\n  \\***********************************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var d3_color__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-color */ \"./node_modules/d3-color/src/index.js\");\n\n\nvar c = Object(d3_color__WEBPACK_IMPORTED_MODULE_0__[\"rgb\"])(),\n    pi_1_3 = Math.PI / 3,\n    pi_2_3 = Math.PI * 2 / 3;\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(t) {\n  var x;\n  t = (0.5 - t) * Math.PI;\n  c.r = 255 * (x = Math.sin(t)) * x;\n  c.g = 255 * (x = Math.sin(t + pi_1_3)) * x;\n  c.b = 255 * (x = Math.sin(t + pi_2_3)) * x;\n  return c + \"\";\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-scale-chromatic/src/sequential-multi/turbo.js\":\n/*!*********************************************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-scale-chromatic/src/sequential-multi/turbo.js ***!\n  \\*********************************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(t) {\n  t = Math.max(0, Math.min(1, t));\n  return \"rgb(\"\n      + Math.max(0, Math.min(255, Math.round(34.61 + t * (1172.33 - t * (10793.56 - t * (33300.12 - t * (38394.49 - t * 14825.05))))))) + \", \"\n      + Math.max(0, Math.min(255, Math.round(23.31 + t * (557.33 + t * (1225.33 - t * (3574.96 - t * (1073.77 + t * 707.56))))))) + \", \"\n      + Math.max(0, Math.min(255, Math.round(27.2 + t * (3211.1 - t * (15327.97 - t * (27814 - t * (22569.18 - t * 6838.66)))))))\n      + \")\";\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-scale-chromatic/src/sequential-multi/viridis.js\":\n/*!***********************************************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-scale-chromatic/src/sequential-multi/viridis.js ***!\n  \\***********************************************************************************************/\n/*! exports provided: default, magma, inferno, plasma */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"magma\", function() { return magma; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"inferno\", function() { return inferno; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"plasma\", function() { return plasma; });\n/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ \"./node_modules/dagre-d3/node_modules/d3-scale-chromatic/src/colors.js\");\n\n\nfunction ramp(range) {\n  var n = range.length;\n  return function(t) {\n    return range[Math.max(0, Math.min(n - 1, Math.floor(t * n)))];\n  };\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (ramp(Object(_colors_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(\"44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725\")));\n\nvar magma = ramp(Object(_colors_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(\"00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf\"));\n\nvar inferno = ramp(Object(_colors_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(\"00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4\"));\n\nvar plasma = ramp(Object(_colors_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(\"0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921\"));\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-scale-chromatic/src/sequential-single/Blues.js\":\n/*!**********************************************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-scale-chromatic/src/sequential-single/Blues.js ***!\n  \\**********************************************************************************************/\n/*! exports provided: scheme, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"scheme\", function() { return scheme; });\n/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ \"./node_modules/dagre-d3/node_modules/d3-scale-chromatic/src/colors.js\");\n/* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ \"./node_modules/dagre-d3/node_modules/d3-scale-chromatic/src/ramp.js\");\n\n\n\nvar scheme = new Array(3).concat(\n  \"deebf79ecae13182bd\",\n  \"eff3ffbdd7e76baed62171b5\",\n  \"eff3ffbdd7e76baed63182bd08519c\",\n  \"eff3ffc6dbef9ecae16baed63182bd08519c\",\n  \"eff3ffc6dbef9ecae16baed64292c62171b5084594\",\n  \"f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594\",\n  \"f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b\"\n).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(scheme));\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-scale-chromatic/src/sequential-single/Greens.js\":\n/*!***********************************************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-scale-chromatic/src/sequential-single/Greens.js ***!\n  \\***********************************************************************************************/\n/*! exports provided: scheme, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"scheme\", function() { return scheme; });\n/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ \"./node_modules/dagre-d3/node_modules/d3-scale-chromatic/src/colors.js\");\n/* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ \"./node_modules/dagre-d3/node_modules/d3-scale-chromatic/src/ramp.js\");\n\n\n\nvar scheme = new Array(3).concat(\n  \"e5f5e0a1d99b31a354\",\n  \"edf8e9bae4b374c476238b45\",\n  \"edf8e9bae4b374c47631a354006d2c\",\n  \"edf8e9c7e9c0a1d99b74c47631a354006d2c\",\n  \"edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32\",\n  \"f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32\",\n  \"f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b\"\n).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(scheme));\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-scale-chromatic/src/sequential-single/Greys.js\":\n/*!**********************************************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-scale-chromatic/src/sequential-single/Greys.js ***!\n  \\**********************************************************************************************/\n/*! exports provided: scheme, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"scheme\", function() { return scheme; });\n/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ \"./node_modules/dagre-d3/node_modules/d3-scale-chromatic/src/colors.js\");\n/* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ \"./node_modules/dagre-d3/node_modules/d3-scale-chromatic/src/ramp.js\");\n\n\n\nvar scheme = new Array(3).concat(\n  \"f0f0f0bdbdbd636363\",\n  \"f7f7f7cccccc969696525252\",\n  \"f7f7f7cccccc969696636363252525\",\n  \"f7f7f7d9d9d9bdbdbd969696636363252525\",\n  \"f7f7f7d9d9d9bdbdbd969696737373525252252525\",\n  \"fffffff0f0f0d9d9d9bdbdbd969696737373525252252525\",\n  \"fffffff0f0f0d9d9d9bdbdbd969696737373525252252525000000\"\n).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(scheme));\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-scale-chromatic/src/sequential-single/Oranges.js\":\n/*!************************************************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-scale-chromatic/src/sequential-single/Oranges.js ***!\n  \\************************************************************************************************/\n/*! exports provided: scheme, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"scheme\", function() { return scheme; });\n/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ \"./node_modules/dagre-d3/node_modules/d3-scale-chromatic/src/colors.js\");\n/* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ \"./node_modules/dagre-d3/node_modules/d3-scale-chromatic/src/ramp.js\");\n\n\n\nvar scheme = new Array(3).concat(\n  \"fee6cefdae6be6550d\",\n  \"feeddefdbe85fd8d3cd94701\",\n  \"feeddefdbe85fd8d3ce6550da63603\",\n  \"feeddefdd0a2fdae6bfd8d3ce6550da63603\",\n  \"feeddefdd0a2fdae6bfd8d3cf16913d948018c2d04\",\n  \"fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d948018c2d04\",\n  \"fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d94801a636037f2704\"\n).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(scheme));\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-scale-chromatic/src/sequential-single/Purples.js\":\n/*!************************************************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-scale-chromatic/src/sequential-single/Purples.js ***!\n  \\************************************************************************************************/\n/*! exports provided: scheme, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"scheme\", function() { return scheme; });\n/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ \"./node_modules/dagre-d3/node_modules/d3-scale-chromatic/src/colors.js\");\n/* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ \"./node_modules/dagre-d3/node_modules/d3-scale-chromatic/src/ramp.js\");\n\n\n\nvar scheme = new Array(3).concat(\n  \"efedf5bcbddc756bb1\",\n  \"f2f0f7cbc9e29e9ac86a51a3\",\n  \"f2f0f7cbc9e29e9ac8756bb154278f\",\n  \"f2f0f7dadaebbcbddc9e9ac8756bb154278f\",\n  \"f2f0f7dadaebbcbddc9e9ac8807dba6a51a34a1486\",\n  \"fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a34a1486\",\n  \"fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a354278f3f007d\"\n).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(scheme));\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-scale-chromatic/src/sequential-single/Reds.js\":\n/*!*********************************************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-scale-chromatic/src/sequential-single/Reds.js ***!\n  \\*********************************************************************************************/\n/*! exports provided: scheme, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"scheme\", function() { return scheme; });\n/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ \"./node_modules/dagre-d3/node_modules/d3-scale-chromatic/src/colors.js\");\n/* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ \"./node_modules/dagre-d3/node_modules/d3-scale-chromatic/src/ramp.js\");\n\n\n\nvar scheme = new Array(3).concat(\n  \"fee0d2fc9272de2d26\",\n  \"fee5d9fcae91fb6a4acb181d\",\n  \"fee5d9fcae91fb6a4ade2d26a50f15\",\n  \"fee5d9fcbba1fc9272fb6a4ade2d26a50f15\",\n  \"fee5d9fcbba1fc9272fb6a4aef3b2ccb181d99000d\",\n  \"fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181d99000d\",\n  \"fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181da50f1567000d\"\n).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(scheme));\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-scale/src/array.js\":\n/*!******************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-scale/src/array.js ***!\n  \\******************************************************************/\n/*! exports provided: map, slice */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"map\", function() { return map; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"slice\", function() { return slice; });\nvar array = Array.prototype;\n\nvar map = array.map;\nvar slice = array.slice;\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-scale/src/band.js\":\n/*!*****************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-scale/src/band.js ***!\n  \\*****************************************************************/\n/*! exports provided: default, point */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return band; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"point\", function() { return point; });\n/* harmony import */ var d3_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-array */ \"./node_modules/d3-array/src/index.js\");\n/* harmony import */ var _init__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./init */ \"./node_modules/dagre-d3/node_modules/d3-scale/src/init.js\");\n/* harmony import */ var _ordinal__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./ordinal */ \"./node_modules/dagre-d3/node_modules/d3-scale/src/ordinal.js\");\n\n\n\n\nfunction band() {\n  var scale = Object(_ordinal__WEBPACK_IMPORTED_MODULE_2__[\"default\"])().unknown(undefined),\n      domain = scale.domain,\n      ordinalRange = scale.range,\n      range = [0, 1],\n      step,\n      bandwidth,\n      round = false,\n      paddingInner = 0,\n      paddingOuter = 0,\n      align = 0.5;\n\n  delete scale.unknown;\n\n  function rescale() {\n    var n = domain().length,\n        reverse = range[1] < range[0],\n        start = range[reverse - 0],\n        stop = range[1 - reverse];\n    step = (stop - start) / Math.max(1, n - paddingInner + paddingOuter * 2);\n    if (round) step = Math.floor(step);\n    start += (stop - start - step * (n - paddingInner)) * align;\n    bandwidth = step * (1 - paddingInner);\n    if (round) start = Math.round(start), bandwidth = Math.round(bandwidth);\n    var values = Object(d3_array__WEBPACK_IMPORTED_MODULE_0__[\"range\"])(n).map(function(i) { return start + step * i; });\n    return ordinalRange(reverse ? values.reverse() : values);\n  }\n\n  scale.domain = function(_) {\n    return arguments.length ? (domain(_), rescale()) : domain();\n  };\n\n  scale.range = function(_) {\n    return arguments.length ? (range = [+_[0], +_[1]], rescale()) : range.slice();\n  };\n\n  scale.rangeRound = function(_) {\n    return range = [+_[0], +_[1]], round = true, rescale();\n  };\n\n  scale.bandwidth = function() {\n    return bandwidth;\n  };\n\n  scale.step = function() {\n    return step;\n  };\n\n  scale.round = function(_) {\n    return arguments.length ? (round = !!_, rescale()) : round;\n  };\n\n  scale.padding = function(_) {\n    return arguments.length ? (paddingInner = Math.min(1, paddingOuter = +_), rescale()) : paddingInner;\n  };\n\n  scale.paddingInner = function(_) {\n    return arguments.length ? (paddingInner = Math.min(1, _), rescale()) : paddingInner;\n  };\n\n  scale.paddingOuter = function(_) {\n    return arguments.length ? (paddingOuter = +_, rescale()) : paddingOuter;\n  };\n\n  scale.align = function(_) {\n    return arguments.length ? (align = Math.max(0, Math.min(1, _)), rescale()) : align;\n  };\n\n  scale.copy = function() {\n    return band(domain(), range)\n        .round(round)\n        .paddingInner(paddingInner)\n        .paddingOuter(paddingOuter)\n        .align(align);\n  };\n\n  return _init__WEBPACK_IMPORTED_MODULE_1__[\"initRange\"].apply(rescale(), arguments);\n}\n\nfunction pointish(scale) {\n  var copy = scale.copy;\n\n  scale.padding = scale.paddingOuter;\n  delete scale.paddingInner;\n  delete scale.paddingOuter;\n\n  scale.copy = function() {\n    return pointish(copy());\n  };\n\n  return scale;\n}\n\nfunction point() {\n  return pointish(band.apply(null, arguments).paddingInner(1));\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-scale/src/constant.js\":\n/*!*********************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-scale/src/constant.js ***!\n  \\*********************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(x) {\n  return function() {\n    return x;\n  };\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-scale/src/continuous.js\":\n/*!***********************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-scale/src/continuous.js ***!\n  \\***********************************************************************/\n/*! exports provided: identity, copy, transformer, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"identity\", function() { return identity; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"copy\", function() { return copy; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"transformer\", function() { return transformer; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return continuous; });\n/* harmony import */ var d3_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-array */ \"./node_modules/d3-array/src/index.js\");\n/* harmony import */ var d3_interpolate__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! d3-interpolate */ \"./node_modules/d3-interpolate/src/index.js\");\n/* harmony import */ var _array__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./array */ \"./node_modules/dagre-d3/node_modules/d3-scale/src/array.js\");\n/* harmony import */ var _constant__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./constant */ \"./node_modules/dagre-d3/node_modules/d3-scale/src/constant.js\");\n/* harmony import */ var _number__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./number */ \"./node_modules/dagre-d3/node_modules/d3-scale/src/number.js\");\n\n\n\n\n\n\nvar unit = [0, 1];\n\nfunction identity(x) {\n  return x;\n}\n\nfunction normalize(a, b) {\n  return (b -= (a = +a))\n      ? function(x) { return (x - a) / b; }\n      : Object(_constant__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(isNaN(b) ? NaN : 0.5);\n}\n\nfunction clamper(domain) {\n  var a = domain[0], b = domain[domain.length - 1], t;\n  if (a > b) t = a, a = b, b = t;\n  return function(x) { return Math.max(a, Math.min(b, x)); };\n}\n\n// normalize(a, b)(x) takes a domain value x in [a,b] and returns the corresponding parameter t in [0,1].\n// interpolate(a, b)(t) takes a parameter t in [0,1] and returns the corresponding range value x in [a,b].\nfunction bimap(domain, range, interpolate) {\n  var d0 = domain[0], d1 = domain[1], r0 = range[0], r1 = range[1];\n  if (d1 < d0) d0 = normalize(d1, d0), r0 = interpolate(r1, r0);\n  else d0 = normalize(d0, d1), r0 = interpolate(r0, r1);\n  return function(x) { return r0(d0(x)); };\n}\n\nfunction polymap(domain, range, interpolate) {\n  var j = Math.min(domain.length, range.length) - 1,\n      d = new Array(j),\n      r = new Array(j),\n      i = -1;\n\n  // Reverse descending domains.\n  if (domain[j] < domain[0]) {\n    domain = domain.slice().reverse();\n    range = range.slice().reverse();\n  }\n\n  while (++i < j) {\n    d[i] = normalize(domain[i], domain[i + 1]);\n    r[i] = interpolate(range[i], range[i + 1]);\n  }\n\n  return function(x) {\n    var i = Object(d3_array__WEBPACK_IMPORTED_MODULE_0__[\"bisect\"])(domain, x, 1, j) - 1;\n    return r[i](d[i](x));\n  };\n}\n\nfunction copy(source, target) {\n  return target\n      .domain(source.domain())\n      .range(source.range())\n      .interpolate(source.interpolate())\n      .clamp(source.clamp())\n      .unknown(source.unknown());\n}\n\nfunction transformer() {\n  var domain = unit,\n      range = unit,\n      interpolate = d3_interpolate__WEBPACK_IMPORTED_MODULE_1__[\"interpolate\"],\n      transform,\n      untransform,\n      unknown,\n      clamp = identity,\n      piecewise,\n      output,\n      input;\n\n  function rescale() {\n    piecewise = Math.min(domain.length, range.length) > 2 ? polymap : bimap;\n    output = input = null;\n    return scale;\n  }\n\n  function scale(x) {\n    return isNaN(x = +x) ? unknown : (output || (output = piecewise(domain.map(transform), range, interpolate)))(transform(clamp(x)));\n  }\n\n  scale.invert = function(y) {\n    return clamp(untransform((input || (input = piecewise(range, domain.map(transform), d3_interpolate__WEBPACK_IMPORTED_MODULE_1__[\"interpolateNumber\"])))(y)));\n  };\n\n  scale.domain = function(_) {\n    return arguments.length ? (domain = _array__WEBPACK_IMPORTED_MODULE_2__[\"map\"].call(_, _number__WEBPACK_IMPORTED_MODULE_4__[\"default\"]), clamp === identity || (clamp = clamper(domain)), rescale()) : domain.slice();\n  };\n\n  scale.range = function(_) {\n    return arguments.length ? (range = _array__WEBPACK_IMPORTED_MODULE_2__[\"slice\"].call(_), rescale()) : range.slice();\n  };\n\n  scale.rangeRound = function(_) {\n    return range = _array__WEBPACK_IMPORTED_MODULE_2__[\"slice\"].call(_), interpolate = d3_interpolate__WEBPACK_IMPORTED_MODULE_1__[\"interpolateRound\"], rescale();\n  };\n\n  scale.clamp = function(_) {\n    return arguments.length ? (clamp = _ ? clamper(domain) : identity, scale) : clamp !== identity;\n  };\n\n  scale.interpolate = function(_) {\n    return arguments.length ? (interpolate = _, rescale()) : interpolate;\n  };\n\n  scale.unknown = function(_) {\n    return arguments.length ? (unknown = _, scale) : unknown;\n  };\n\n  return function(t, u) {\n    transform = t, untransform = u;\n    return rescale();\n  };\n}\n\nfunction continuous(transform, untransform) {\n  return transformer()(transform, untransform);\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-scale/src/diverging.js\":\n/*!**********************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-scale/src/diverging.js ***!\n  \\**********************************************************************/\n/*! exports provided: default, divergingLog, divergingSymlog, divergingPow, divergingSqrt */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return diverging; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"divergingLog\", function() { return divergingLog; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"divergingSymlog\", function() { return divergingSymlog; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"divergingPow\", function() { return divergingPow; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"divergingSqrt\", function() { return divergingSqrt; });\n/* harmony import */ var _continuous__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./continuous */ \"./node_modules/dagre-d3/node_modules/d3-scale/src/continuous.js\");\n/* harmony import */ var _init__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./init */ \"./node_modules/dagre-d3/node_modules/d3-scale/src/init.js\");\n/* harmony import */ var _linear__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./linear */ \"./node_modules/dagre-d3/node_modules/d3-scale/src/linear.js\");\n/* harmony import */ var _log__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./log */ \"./node_modules/dagre-d3/node_modules/d3-scale/src/log.js\");\n/* harmony import */ var _sequential__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./sequential */ \"./node_modules/dagre-d3/node_modules/d3-scale/src/sequential.js\");\n/* harmony import */ var _symlog__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./symlog */ \"./node_modules/dagre-d3/node_modules/d3-scale/src/symlog.js\");\n/* harmony import */ var _pow__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./pow */ \"./node_modules/dagre-d3/node_modules/d3-scale/src/pow.js\");\n\n\n\n\n\n\n\n\nfunction transformer() {\n  var x0 = 0,\n      x1 = 0.5,\n      x2 = 1,\n      t0,\n      t1,\n      t2,\n      k10,\n      k21,\n      interpolator = _continuous__WEBPACK_IMPORTED_MODULE_0__[\"identity\"],\n      transform,\n      clamp = false,\n      unknown;\n\n  function scale(x) {\n    return isNaN(x = +x) ? unknown : (x = 0.5 + ((x = +transform(x)) - t1) * (x < t1 ? k10 : k21), interpolator(clamp ? Math.max(0, Math.min(1, x)) : x));\n  }\n\n  scale.domain = function(_) {\n    return arguments.length ? (t0 = transform(x0 = +_[0]), t1 = transform(x1 = +_[1]), t2 = transform(x2 = +_[2]), k10 = t0 === t1 ? 0 : 0.5 / (t1 - t0), k21 = t1 === t2 ? 0 : 0.5 / (t2 - t1), scale) : [x0, x1, x2];\n  };\n\n  scale.clamp = function(_) {\n    return arguments.length ? (clamp = !!_, scale) : clamp;\n  };\n\n  scale.interpolator = function(_) {\n    return arguments.length ? (interpolator = _, scale) : interpolator;\n  };\n\n  scale.unknown = function(_) {\n    return arguments.length ? (unknown = _, scale) : unknown;\n  };\n\n  return function(t) {\n    transform = t, t0 = t(x0), t1 = t(x1), t2 = t(x2), k10 = t0 === t1 ? 0 : 0.5 / (t1 - t0), k21 = t1 === t2 ? 0 : 0.5 / (t2 - t1);\n    return scale;\n  };\n}\n\nfunction diverging() {\n  var scale = Object(_linear__WEBPACK_IMPORTED_MODULE_2__[\"linearish\"])(transformer()(_continuous__WEBPACK_IMPORTED_MODULE_0__[\"identity\"]));\n\n  scale.copy = function() {\n    return Object(_sequential__WEBPACK_IMPORTED_MODULE_4__[\"copy\"])(scale, diverging());\n  };\n\n  return _init__WEBPACK_IMPORTED_MODULE_1__[\"initInterpolator\"].apply(scale, arguments);\n}\n\nfunction divergingLog() {\n  var scale = Object(_log__WEBPACK_IMPORTED_MODULE_3__[\"loggish\"])(transformer()).domain([0.1, 1, 10]);\n\n  scale.copy = function() {\n    return Object(_sequential__WEBPACK_IMPORTED_MODULE_4__[\"copy\"])(scale, divergingLog()).base(scale.base());\n  };\n\n  return _init__WEBPACK_IMPORTED_MODULE_1__[\"initInterpolator\"].apply(scale, arguments);\n}\n\nfunction divergingSymlog() {\n  var scale = Object(_symlog__WEBPACK_IMPORTED_MODULE_5__[\"symlogish\"])(transformer());\n\n  scale.copy = function() {\n    return Object(_sequential__WEBPACK_IMPORTED_MODULE_4__[\"copy\"])(scale, divergingSymlog()).constant(scale.constant());\n  };\n\n  return _init__WEBPACK_IMPORTED_MODULE_1__[\"initInterpolator\"].apply(scale, arguments);\n}\n\nfunction divergingPow() {\n  var scale = Object(_pow__WEBPACK_IMPORTED_MODULE_6__[\"powish\"])(transformer());\n\n  scale.copy = function() {\n    return Object(_sequential__WEBPACK_IMPORTED_MODULE_4__[\"copy\"])(scale, divergingPow()).exponent(scale.exponent());\n  };\n\n  return _init__WEBPACK_IMPORTED_MODULE_1__[\"initInterpolator\"].apply(scale, arguments);\n}\n\nfunction divergingSqrt() {\n  return divergingPow.apply(null, arguments).exponent(0.5);\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-scale/src/identity.js\":\n/*!*********************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-scale/src/identity.js ***!\n  \\*********************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return identity; });\n/* harmony import */ var _array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./array */ \"./node_modules/dagre-d3/node_modules/d3-scale/src/array.js\");\n/* harmony import */ var _linear__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./linear */ \"./node_modules/dagre-d3/node_modules/d3-scale/src/linear.js\");\n/* harmony import */ var _number__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./number */ \"./node_modules/dagre-d3/node_modules/d3-scale/src/number.js\");\n\n\n\n\nfunction identity(domain) {\n  var unknown;\n\n  function scale(x) {\n    return isNaN(x = +x) ? unknown : x;\n  }\n\n  scale.invert = scale;\n\n  scale.domain = scale.range = function(_) {\n    return arguments.length ? (domain = _array__WEBPACK_IMPORTED_MODULE_0__[\"map\"].call(_, _number__WEBPACK_IMPORTED_MODULE_2__[\"default\"]), scale) : domain.slice();\n  };\n\n  scale.unknown = function(_) {\n    return arguments.length ? (unknown = _, scale) : unknown;\n  };\n\n  scale.copy = function() {\n    return identity(domain).unknown(unknown);\n  };\n\n  domain = arguments.length ? _array__WEBPACK_IMPORTED_MODULE_0__[\"map\"].call(domain, _number__WEBPACK_IMPORTED_MODULE_2__[\"default\"]) : [0, 1];\n\n  return Object(_linear__WEBPACK_IMPORTED_MODULE_1__[\"linearish\"])(scale);\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-scale/src/index.js\":\n/*!******************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-scale/src/index.js ***!\n  \\******************************************************************/\n/*! exports provided: scaleBand, scalePoint, scaleIdentity, scaleLinear, scaleLog, scaleSymlog, scaleOrdinal, scaleImplicit, scalePow, scaleSqrt, scaleQuantile, scaleQuantize, scaleThreshold, scaleTime, scaleUtc, scaleSequential, scaleSequentialLog, scaleSequentialPow, scaleSequentialSqrt, scaleSequentialSymlog, scaleSequentialQuantile, scaleDiverging, scaleDivergingLog, scaleDivergingPow, scaleDivergingSqrt, scaleDivergingSymlog, tickFormat */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _band__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./band */ \"./node_modules/dagre-d3/node_modules/d3-scale/src/band.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"scaleBand\", function() { return _band__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"scalePoint\", function() { return _band__WEBPACK_IMPORTED_MODULE_0__[\"point\"]; });\n\n/* harmony import */ var _identity__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./identity */ \"./node_modules/dagre-d3/node_modules/d3-scale/src/identity.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"scaleIdentity\", function() { return _identity__WEBPACK_IMPORTED_MODULE_1__[\"default\"]; });\n\n/* harmony import */ var _linear__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./linear */ \"./node_modules/dagre-d3/node_modules/d3-scale/src/linear.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"scaleLinear\", function() { return _linear__WEBPACK_IMPORTED_MODULE_2__[\"default\"]; });\n\n/* harmony import */ var _log__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./log */ \"./node_modules/dagre-d3/node_modules/d3-scale/src/log.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"scaleLog\", function() { return _log__WEBPACK_IMPORTED_MODULE_3__[\"default\"]; });\n\n/* harmony import */ var _symlog__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./symlog */ \"./node_modules/dagre-d3/node_modules/d3-scale/src/symlog.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"scaleSymlog\", function() { return _symlog__WEBPACK_IMPORTED_MODULE_4__[\"default\"]; });\n\n/* harmony import */ var _ordinal__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./ordinal */ \"./node_modules/dagre-d3/node_modules/d3-scale/src/ordinal.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"scaleOrdinal\", function() { return _ordinal__WEBPACK_IMPORTED_MODULE_5__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"scaleImplicit\", function() { return _ordinal__WEBPACK_IMPORTED_MODULE_5__[\"implicit\"]; });\n\n/* harmony import */ var _pow__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./pow */ \"./node_modules/dagre-d3/node_modules/d3-scale/src/pow.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"scalePow\", function() { return _pow__WEBPACK_IMPORTED_MODULE_6__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"scaleSqrt\", function() { return _pow__WEBPACK_IMPORTED_MODULE_6__[\"sqrt\"]; });\n\n/* harmony import */ var _quantile__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./quantile */ \"./node_modules/dagre-d3/node_modules/d3-scale/src/quantile.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"scaleQuantile\", function() { return _quantile__WEBPACK_IMPORTED_MODULE_7__[\"default\"]; });\n\n/* harmony import */ var _quantize__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./quantize */ \"./node_modules/dagre-d3/node_modules/d3-scale/src/quantize.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"scaleQuantize\", function() { return _quantize__WEBPACK_IMPORTED_MODULE_8__[\"default\"]; });\n\n/* harmony import */ var _threshold__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./threshold */ \"./node_modules/dagre-d3/node_modules/d3-scale/src/threshold.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"scaleThreshold\", function() { return _threshold__WEBPACK_IMPORTED_MODULE_9__[\"default\"]; });\n\n/* harmony import */ var _time__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./time */ \"./node_modules/dagre-d3/node_modules/d3-scale/src/time.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"scaleTime\", function() { return _time__WEBPACK_IMPORTED_MODULE_10__[\"default\"]; });\n\n/* harmony import */ var _utcTime__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./utcTime */ \"./node_modules/dagre-d3/node_modules/d3-scale/src/utcTime.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"scaleUtc\", function() { return _utcTime__WEBPACK_IMPORTED_MODULE_11__[\"default\"]; });\n\n/* harmony import */ var _sequential__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./sequential */ \"./node_modules/dagre-d3/node_modules/d3-scale/src/sequential.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"scaleSequential\", function() { return _sequential__WEBPACK_IMPORTED_MODULE_12__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"scaleSequentialLog\", function() { return _sequential__WEBPACK_IMPORTED_MODULE_12__[\"sequentialLog\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"scaleSequentialPow\", function() { return _sequential__WEBPACK_IMPORTED_MODULE_12__[\"sequentialPow\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"scaleSequentialSqrt\", function() { return _sequential__WEBPACK_IMPORTED_MODULE_12__[\"sequentialSqrt\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"scaleSequentialSymlog\", function() { return _sequential__WEBPACK_IMPORTED_MODULE_12__[\"sequentialSymlog\"]; });\n\n/* harmony import */ var _sequentialQuantile__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./sequentialQuantile */ \"./node_modules/dagre-d3/node_modules/d3-scale/src/sequentialQuantile.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"scaleSequentialQuantile\", function() { return _sequentialQuantile__WEBPACK_IMPORTED_MODULE_13__[\"default\"]; });\n\n/* harmony import */ var _diverging__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./diverging */ \"./node_modules/dagre-d3/node_modules/d3-scale/src/diverging.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"scaleDiverging\", function() { return _diverging__WEBPACK_IMPORTED_MODULE_14__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"scaleDivergingLog\", function() { return _diverging__WEBPACK_IMPORTED_MODULE_14__[\"divergingLog\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"scaleDivergingPow\", function() { return _diverging__WEBPACK_IMPORTED_MODULE_14__[\"divergingPow\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"scaleDivergingSqrt\", function() { return _diverging__WEBPACK_IMPORTED_MODULE_14__[\"divergingSqrt\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"scaleDivergingSymlog\", function() { return _diverging__WEBPACK_IMPORTED_MODULE_14__[\"divergingSymlog\"]; });\n\n/* harmony import */ var _tickFormat__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./tickFormat */ \"./node_modules/dagre-d3/node_modules/d3-scale/src/tickFormat.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"tickFormat\", function() { return _tickFormat__WEBPACK_IMPORTED_MODULE_15__[\"default\"]; });\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-scale/src/init.js\":\n/*!*****************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-scale/src/init.js ***!\n  \\*****************************************************************/\n/*! exports provided: initRange, initInterpolator */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"initRange\", function() { return initRange; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"initInterpolator\", function() { return initInterpolator; });\nfunction initRange(domain, range) {\n  switch (arguments.length) {\n    case 0: break;\n    case 1: this.range(domain); break;\n    default: this.range(range).domain(domain); break;\n  }\n  return this;\n}\n\nfunction initInterpolator(domain, interpolator) {\n  switch (arguments.length) {\n    case 0: break;\n    case 1: this.interpolator(domain); break;\n    default: this.interpolator(interpolator).domain(domain); break;\n  }\n  return this;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-scale/src/linear.js\":\n/*!*******************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-scale/src/linear.js ***!\n  \\*******************************************************************/\n/*! exports provided: linearish, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"linearish\", function() { return linearish; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return linear; });\n/* harmony import */ var d3_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-array */ \"./node_modules/d3-array/src/index.js\");\n/* harmony import */ var _continuous__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./continuous */ \"./node_modules/dagre-d3/node_modules/d3-scale/src/continuous.js\");\n/* harmony import */ var _init__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./init */ \"./node_modules/dagre-d3/node_modules/d3-scale/src/init.js\");\n/* harmony import */ var _tickFormat__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./tickFormat */ \"./node_modules/dagre-d3/node_modules/d3-scale/src/tickFormat.js\");\n\n\n\n\n\nfunction linearish(scale) {\n  var domain = scale.domain;\n\n  scale.ticks = function(count) {\n    var d = domain();\n    return Object(d3_array__WEBPACK_IMPORTED_MODULE_0__[\"ticks\"])(d[0], d[d.length - 1], count == null ? 10 : count);\n  };\n\n  scale.tickFormat = function(count, specifier) {\n    var d = domain();\n    return Object(_tickFormat__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(d[0], d[d.length - 1], count == null ? 10 : count, specifier);\n  };\n\n  scale.nice = function(count) {\n    if (count == null) count = 10;\n\n    var d = domain(),\n        i0 = 0,\n        i1 = d.length - 1,\n        start = d[i0],\n        stop = d[i1],\n        step;\n\n    if (stop < start) {\n      step = start, start = stop, stop = step;\n      step = i0, i0 = i1, i1 = step;\n    }\n\n    step = Object(d3_array__WEBPACK_IMPORTED_MODULE_0__[\"tickIncrement\"])(start, stop, count);\n\n    if (step > 0) {\n      start = Math.floor(start / step) * step;\n      stop = Math.ceil(stop / step) * step;\n      step = Object(d3_array__WEBPACK_IMPORTED_MODULE_0__[\"tickIncrement\"])(start, stop, count);\n    } else if (step < 0) {\n      start = Math.ceil(start * step) / step;\n      stop = Math.floor(stop * step) / step;\n      step = Object(d3_array__WEBPACK_IMPORTED_MODULE_0__[\"tickIncrement\"])(start, stop, count);\n    }\n\n    if (step > 0) {\n      d[i0] = Math.floor(start / step) * step;\n      d[i1] = Math.ceil(stop / step) * step;\n      domain(d);\n    } else if (step < 0) {\n      d[i0] = Math.ceil(start * step) / step;\n      d[i1] = Math.floor(stop * step) / step;\n      domain(d);\n    }\n\n    return scale;\n  };\n\n  return scale;\n}\n\nfunction linear() {\n  var scale = Object(_continuous__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(_continuous__WEBPACK_IMPORTED_MODULE_1__[\"identity\"], _continuous__WEBPACK_IMPORTED_MODULE_1__[\"identity\"]);\n\n  scale.copy = function() {\n    return Object(_continuous__WEBPACK_IMPORTED_MODULE_1__[\"copy\"])(scale, linear());\n  };\n\n  _init__WEBPACK_IMPORTED_MODULE_2__[\"initRange\"].apply(scale, arguments);\n\n  return linearish(scale);\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-scale/src/log.js\":\n/*!****************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-scale/src/log.js ***!\n  \\****************************************************************/\n/*! exports provided: loggish, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"loggish\", function() { return loggish; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return log; });\n/* harmony import */ var d3_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-array */ \"./node_modules/d3-array/src/index.js\");\n/* harmony import */ var d3_format__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! d3-format */ \"./node_modules/d3-format/src/index.js\");\n/* harmony import */ var _nice__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./nice */ \"./node_modules/dagre-d3/node_modules/d3-scale/src/nice.js\");\n/* harmony import */ var _continuous__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./continuous */ \"./node_modules/dagre-d3/node_modules/d3-scale/src/continuous.js\");\n/* harmony import */ var _init__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./init */ \"./node_modules/dagre-d3/node_modules/d3-scale/src/init.js\");\n\n\n\n\n\n\nfunction transformLog(x) {\n  return Math.log(x);\n}\n\nfunction transformExp(x) {\n  return Math.exp(x);\n}\n\nfunction transformLogn(x) {\n  return -Math.log(-x);\n}\n\nfunction transformExpn(x) {\n  return -Math.exp(-x);\n}\n\nfunction pow10(x) {\n  return isFinite(x) ? +(\"1e\" + x) : x < 0 ? 0 : x;\n}\n\nfunction powp(base) {\n  return base === 10 ? pow10\n      : base === Math.E ? Math.exp\n      : function(x) { return Math.pow(base, x); };\n}\n\nfunction logp(base) {\n  return base === Math.E ? Math.log\n      : base === 10 && Math.log10\n      || base === 2 && Math.log2\n      || (base = Math.log(base), function(x) { return Math.log(x) / base; });\n}\n\nfunction reflect(f) {\n  return function(x) {\n    return -f(-x);\n  };\n}\n\nfunction loggish(transform) {\n  var scale = transform(transformLog, transformExp),\n      domain = scale.domain,\n      base = 10,\n      logs,\n      pows;\n\n  function rescale() {\n    logs = logp(base), pows = powp(base);\n    if (domain()[0] < 0) {\n      logs = reflect(logs), pows = reflect(pows);\n      transform(transformLogn, transformExpn);\n    } else {\n      transform(transformLog, transformExp);\n    }\n    return scale;\n  }\n\n  scale.base = function(_) {\n    return arguments.length ? (base = +_, rescale()) : base;\n  };\n\n  scale.domain = function(_) {\n    return arguments.length ? (domain(_), rescale()) : domain();\n  };\n\n  scale.ticks = function(count) {\n    var d = domain(),\n        u = d[0],\n        v = d[d.length - 1],\n        r;\n\n    if (r = v < u) i = u, u = v, v = i;\n\n    var i = logs(u),\n        j = logs(v),\n        p,\n        k,\n        t,\n        n = count == null ? 10 : +count,\n        z = [];\n\n    if (!(base % 1) && j - i < n) {\n      i = Math.round(i) - 1, j = Math.round(j) + 1;\n      if (u > 0) for (; i < j; ++i) {\n        for (k = 1, p = pows(i); k < base; ++k) {\n          t = p * k;\n          if (t < u) continue;\n          if (t > v) break;\n          z.push(t);\n        }\n      } else for (; i < j; ++i) {\n        for (k = base - 1, p = pows(i); k >= 1; --k) {\n          t = p * k;\n          if (t < u) continue;\n          if (t > v) break;\n          z.push(t);\n        }\n      }\n    } else {\n      z = Object(d3_array__WEBPACK_IMPORTED_MODULE_0__[\"ticks\"])(i, j, Math.min(j - i, n)).map(pows);\n    }\n\n    return r ? z.reverse() : z;\n  };\n\n  scale.tickFormat = function(count, specifier) {\n    if (specifier == null) specifier = base === 10 ? \".0e\" : \",\";\n    if (typeof specifier !== \"function\") specifier = Object(d3_format__WEBPACK_IMPORTED_MODULE_1__[\"format\"])(specifier);\n    if (count === Infinity) return specifier;\n    if (count == null) count = 10;\n    var k = Math.max(1, base * count / scale.ticks().length); // TODO fast estimate?\n    return function(d) {\n      var i = d / pows(Math.round(logs(d)));\n      if (i * base < base - 0.5) i *= base;\n      return i <= k ? specifier(d) : \"\";\n    };\n  };\n\n  scale.nice = function() {\n    return domain(Object(_nice__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(domain(), {\n      floor: function(x) { return pows(Math.floor(logs(x))); },\n      ceil: function(x) { return pows(Math.ceil(logs(x))); }\n    }));\n  };\n\n  return scale;\n}\n\nfunction log() {\n  var scale = loggish(Object(_continuous__WEBPACK_IMPORTED_MODULE_3__[\"transformer\"])()).domain([1, 10]);\n\n  scale.copy = function() {\n    return Object(_continuous__WEBPACK_IMPORTED_MODULE_3__[\"copy\"])(scale, log()).base(scale.base());\n  };\n\n  _init__WEBPACK_IMPORTED_MODULE_4__[\"initRange\"].apply(scale, arguments);\n\n  return scale;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-scale/src/nice.js\":\n/*!*****************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-scale/src/nice.js ***!\n  \\*****************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(domain, interval) {\n  domain = domain.slice();\n\n  var i0 = 0,\n      i1 = domain.length - 1,\n      x0 = domain[i0],\n      x1 = domain[i1],\n      t;\n\n  if (x1 < x0) {\n    t = i0, i0 = i1, i1 = t;\n    t = x0, x0 = x1, x1 = t;\n  }\n\n  domain[i0] = interval.floor(x0);\n  domain[i1] = interval.ceil(x1);\n  return domain;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-scale/src/number.js\":\n/*!*******************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-scale/src/number.js ***!\n  \\*******************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(x) {\n  return +x;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-scale/src/ordinal.js\":\n/*!********************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-scale/src/ordinal.js ***!\n  \\********************************************************************/\n/*! exports provided: implicit, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"implicit\", function() { return implicit; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return ordinal; });\n/* harmony import */ var d3_collection__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-collection */ \"./node_modules/d3-collection/src/index.js\");\n/* harmony import */ var _array__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./array */ \"./node_modules/dagre-d3/node_modules/d3-scale/src/array.js\");\n/* harmony import */ var _init__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./init */ \"./node_modules/dagre-d3/node_modules/d3-scale/src/init.js\");\n\n\n\n\nvar implicit = {name: \"implicit\"};\n\nfunction ordinal() {\n  var index = Object(d3_collection__WEBPACK_IMPORTED_MODULE_0__[\"map\"])(),\n      domain = [],\n      range = [],\n      unknown = implicit;\n\n  function scale(d) {\n    var key = d + \"\", i = index.get(key);\n    if (!i) {\n      if (unknown !== implicit) return unknown;\n      index.set(key, i = domain.push(d));\n    }\n    return range[(i - 1) % range.length];\n  }\n\n  scale.domain = function(_) {\n    if (!arguments.length) return domain.slice();\n    domain = [], index = Object(d3_collection__WEBPACK_IMPORTED_MODULE_0__[\"map\"])();\n    var i = -1, n = _.length, d, key;\n    while (++i < n) if (!index.has(key = (d = _[i]) + \"\")) index.set(key, domain.push(d));\n    return scale;\n  };\n\n  scale.range = function(_) {\n    return arguments.length ? (range = _array__WEBPACK_IMPORTED_MODULE_1__[\"slice\"].call(_), scale) : range.slice();\n  };\n\n  scale.unknown = function(_) {\n    return arguments.length ? (unknown = _, scale) : unknown;\n  };\n\n  scale.copy = function() {\n    return ordinal(domain, range).unknown(unknown);\n  };\n\n  _init__WEBPACK_IMPORTED_MODULE_2__[\"initRange\"].apply(scale, arguments);\n\n  return scale;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-scale/src/pow.js\":\n/*!****************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-scale/src/pow.js ***!\n  \\****************************************************************/\n/*! exports provided: powish, default, sqrt */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"powish\", function() { return powish; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return pow; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"sqrt\", function() { return sqrt; });\n/* harmony import */ var _linear__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./linear */ \"./node_modules/dagre-d3/node_modules/d3-scale/src/linear.js\");\n/* harmony import */ var _continuous__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./continuous */ \"./node_modules/dagre-d3/node_modules/d3-scale/src/continuous.js\");\n/* harmony import */ var _init__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./init */ \"./node_modules/dagre-d3/node_modules/d3-scale/src/init.js\");\n\n\n\n\nfunction transformPow(exponent) {\n  return function(x) {\n    return x < 0 ? -Math.pow(-x, exponent) : Math.pow(x, exponent);\n  };\n}\n\nfunction transformSqrt(x) {\n  return x < 0 ? -Math.sqrt(-x) : Math.sqrt(x);\n}\n\nfunction transformSquare(x) {\n  return x < 0 ? -x * x : x * x;\n}\n\nfunction powish(transform) {\n  var scale = transform(_continuous__WEBPACK_IMPORTED_MODULE_1__[\"identity\"], _continuous__WEBPACK_IMPORTED_MODULE_1__[\"identity\"]),\n      exponent = 1;\n\n  function rescale() {\n    return exponent === 1 ? transform(_continuous__WEBPACK_IMPORTED_MODULE_1__[\"identity\"], _continuous__WEBPACK_IMPORTED_MODULE_1__[\"identity\"])\n        : exponent === 0.5 ? transform(transformSqrt, transformSquare)\n        : transform(transformPow(exponent), transformPow(1 / exponent));\n  }\n\n  scale.exponent = function(_) {\n    return arguments.length ? (exponent = +_, rescale()) : exponent;\n  };\n\n  return Object(_linear__WEBPACK_IMPORTED_MODULE_0__[\"linearish\"])(scale);\n}\n\nfunction pow() {\n  var scale = powish(Object(_continuous__WEBPACK_IMPORTED_MODULE_1__[\"transformer\"])());\n\n  scale.copy = function() {\n    return Object(_continuous__WEBPACK_IMPORTED_MODULE_1__[\"copy\"])(scale, pow()).exponent(scale.exponent());\n  };\n\n  _init__WEBPACK_IMPORTED_MODULE_2__[\"initRange\"].apply(scale, arguments);\n\n  return scale;\n}\n\nfunction sqrt() {\n  return pow.apply(null, arguments).exponent(0.5);\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-scale/src/quantile.js\":\n/*!*********************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-scale/src/quantile.js ***!\n  \\*********************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return quantile; });\n/* harmony import */ var d3_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-array */ \"./node_modules/d3-array/src/index.js\");\n/* harmony import */ var _array__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./array */ \"./node_modules/dagre-d3/node_modules/d3-scale/src/array.js\");\n/* harmony import */ var _init__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./init */ \"./node_modules/dagre-d3/node_modules/d3-scale/src/init.js\");\n\n\n\n\nfunction quantile() {\n  var domain = [],\n      range = [],\n      thresholds = [],\n      unknown;\n\n  function rescale() {\n    var i = 0, n = Math.max(1, range.length);\n    thresholds = new Array(n - 1);\n    while (++i < n) thresholds[i - 1] = Object(d3_array__WEBPACK_IMPORTED_MODULE_0__[\"quantile\"])(domain, i / n);\n    return scale;\n  }\n\n  function scale(x) {\n    return isNaN(x = +x) ? unknown : range[Object(d3_array__WEBPACK_IMPORTED_MODULE_0__[\"bisect\"])(thresholds, x)];\n  }\n\n  scale.invertExtent = function(y) {\n    var i = range.indexOf(y);\n    return i < 0 ? [NaN, NaN] : [\n      i > 0 ? thresholds[i - 1] : domain[0],\n      i < thresholds.length ? thresholds[i] : domain[domain.length - 1]\n    ];\n  };\n\n  scale.domain = function(_) {\n    if (!arguments.length) return domain.slice();\n    domain = [];\n    for (var i = 0, n = _.length, d; i < n; ++i) if (d = _[i], d != null && !isNaN(d = +d)) domain.push(d);\n    domain.sort(d3_array__WEBPACK_IMPORTED_MODULE_0__[\"ascending\"]);\n    return rescale();\n  };\n\n  scale.range = function(_) {\n    return arguments.length ? (range = _array__WEBPACK_IMPORTED_MODULE_1__[\"slice\"].call(_), rescale()) : range.slice();\n  };\n\n  scale.unknown = function(_) {\n    return arguments.length ? (unknown = _, scale) : unknown;\n  };\n\n  scale.quantiles = function() {\n    return thresholds.slice();\n  };\n\n  scale.copy = function() {\n    return quantile()\n        .domain(domain)\n        .range(range)\n        .unknown(unknown);\n  };\n\n  return _init__WEBPACK_IMPORTED_MODULE_2__[\"initRange\"].apply(scale, arguments);\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-scale/src/quantize.js\":\n/*!*********************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-scale/src/quantize.js ***!\n  \\*********************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return quantize; });\n/* harmony import */ var d3_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-array */ \"./node_modules/d3-array/src/index.js\");\n/* harmony import */ var _array__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./array */ \"./node_modules/dagre-d3/node_modules/d3-scale/src/array.js\");\n/* harmony import */ var _linear__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./linear */ \"./node_modules/dagre-d3/node_modules/d3-scale/src/linear.js\");\n/* harmony import */ var _init__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./init */ \"./node_modules/dagre-d3/node_modules/d3-scale/src/init.js\");\n\n\n\n\n\nfunction quantize() {\n  var x0 = 0,\n      x1 = 1,\n      n = 1,\n      domain = [0.5],\n      range = [0, 1],\n      unknown;\n\n  function scale(x) {\n    return x <= x ? range[Object(d3_array__WEBPACK_IMPORTED_MODULE_0__[\"bisect\"])(domain, x, 0, n)] : unknown;\n  }\n\n  function rescale() {\n    var i = -1;\n    domain = new Array(n);\n    while (++i < n) domain[i] = ((i + 1) * x1 - (i - n) * x0) / (n + 1);\n    return scale;\n  }\n\n  scale.domain = function(_) {\n    return arguments.length ? (x0 = +_[0], x1 = +_[1], rescale()) : [x0, x1];\n  };\n\n  scale.range = function(_) {\n    return arguments.length ? (n = (range = _array__WEBPACK_IMPORTED_MODULE_1__[\"slice\"].call(_)).length - 1, rescale()) : range.slice();\n  };\n\n  scale.invertExtent = function(y) {\n    var i = range.indexOf(y);\n    return i < 0 ? [NaN, NaN]\n        : i < 1 ? [x0, domain[0]]\n        : i >= n ? [domain[n - 1], x1]\n        : [domain[i - 1], domain[i]];\n  };\n\n  scale.unknown = function(_) {\n    return arguments.length ? (unknown = _, scale) : scale;\n  };\n\n  scale.thresholds = function() {\n    return domain.slice();\n  };\n\n  scale.copy = function() {\n    return quantize()\n        .domain([x0, x1])\n        .range(range)\n        .unknown(unknown);\n  };\n\n  return _init__WEBPACK_IMPORTED_MODULE_3__[\"initRange\"].apply(Object(_linear__WEBPACK_IMPORTED_MODULE_2__[\"linearish\"])(scale), arguments);\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-scale/src/sequential.js\":\n/*!***********************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-scale/src/sequential.js ***!\n  \\***********************************************************************/\n/*! exports provided: copy, default, sequentialLog, sequentialSymlog, sequentialPow, sequentialSqrt */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"copy\", function() { return copy; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return sequential; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"sequentialLog\", function() { return sequentialLog; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"sequentialSymlog\", function() { return sequentialSymlog; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"sequentialPow\", function() { return sequentialPow; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"sequentialSqrt\", function() { return sequentialSqrt; });\n/* harmony import */ var _continuous__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./continuous */ \"./node_modules/dagre-d3/node_modules/d3-scale/src/continuous.js\");\n/* harmony import */ var _init__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./init */ \"./node_modules/dagre-d3/node_modules/d3-scale/src/init.js\");\n/* harmony import */ var _linear__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./linear */ \"./node_modules/dagre-d3/node_modules/d3-scale/src/linear.js\");\n/* harmony import */ var _log__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./log */ \"./node_modules/dagre-d3/node_modules/d3-scale/src/log.js\");\n/* harmony import */ var _symlog__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./symlog */ \"./node_modules/dagre-d3/node_modules/d3-scale/src/symlog.js\");\n/* harmony import */ var _pow__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./pow */ \"./node_modules/dagre-d3/node_modules/d3-scale/src/pow.js\");\n\n\n\n\n\n\n\nfunction transformer() {\n  var x0 = 0,\n      x1 = 1,\n      t0,\n      t1,\n      k10,\n      transform,\n      interpolator = _continuous__WEBPACK_IMPORTED_MODULE_0__[\"identity\"],\n      clamp = false,\n      unknown;\n\n  function scale(x) {\n    return isNaN(x = +x) ? unknown : interpolator(k10 === 0 ? 0.5 : (x = (transform(x) - t0) * k10, clamp ? Math.max(0, Math.min(1, x)) : x));\n  }\n\n  scale.domain = function(_) {\n    return arguments.length ? (t0 = transform(x0 = +_[0]), t1 = transform(x1 = +_[1]), k10 = t0 === t1 ? 0 : 1 / (t1 - t0), scale) : [x0, x1];\n  };\n\n  scale.clamp = function(_) {\n    return arguments.length ? (clamp = !!_, scale) : clamp;\n  };\n\n  scale.interpolator = function(_) {\n    return arguments.length ? (interpolator = _, scale) : interpolator;\n  };\n\n  scale.unknown = function(_) {\n    return arguments.length ? (unknown = _, scale) : unknown;\n  };\n\n  return function(t) {\n    transform = t, t0 = t(x0), t1 = t(x1), k10 = t0 === t1 ? 0 : 1 / (t1 - t0);\n    return scale;\n  };\n}\n\nfunction copy(source, target) {\n  return target\n      .domain(source.domain())\n      .interpolator(source.interpolator())\n      .clamp(source.clamp())\n      .unknown(source.unknown());\n}\n\nfunction sequential() {\n  var scale = Object(_linear__WEBPACK_IMPORTED_MODULE_2__[\"linearish\"])(transformer()(_continuous__WEBPACK_IMPORTED_MODULE_0__[\"identity\"]));\n\n  scale.copy = function() {\n    return copy(scale, sequential());\n  };\n\n  return _init__WEBPACK_IMPORTED_MODULE_1__[\"initInterpolator\"].apply(scale, arguments);\n}\n\nfunction sequentialLog() {\n  var scale = Object(_log__WEBPACK_IMPORTED_MODULE_3__[\"loggish\"])(transformer()).domain([1, 10]);\n\n  scale.copy = function() {\n    return copy(scale, sequentialLog()).base(scale.base());\n  };\n\n  return _init__WEBPACK_IMPORTED_MODULE_1__[\"initInterpolator\"].apply(scale, arguments);\n}\n\nfunction sequentialSymlog() {\n  var scale = Object(_symlog__WEBPACK_IMPORTED_MODULE_4__[\"symlogish\"])(transformer());\n\n  scale.copy = function() {\n    return copy(scale, sequentialSymlog()).constant(scale.constant());\n  };\n\n  return _init__WEBPACK_IMPORTED_MODULE_1__[\"initInterpolator\"].apply(scale, arguments);\n}\n\nfunction sequentialPow() {\n  var scale = Object(_pow__WEBPACK_IMPORTED_MODULE_5__[\"powish\"])(transformer());\n\n  scale.copy = function() {\n    return copy(scale, sequentialPow()).exponent(scale.exponent());\n  };\n\n  return _init__WEBPACK_IMPORTED_MODULE_1__[\"initInterpolator\"].apply(scale, arguments);\n}\n\nfunction sequentialSqrt() {\n  return sequentialPow.apply(null, arguments).exponent(0.5);\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-scale/src/sequentialQuantile.js\":\n/*!*******************************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-scale/src/sequentialQuantile.js ***!\n  \\*******************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return sequentialQuantile; });\n/* harmony import */ var d3_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-array */ \"./node_modules/d3-array/src/index.js\");\n/* harmony import */ var _continuous__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./continuous */ \"./node_modules/dagre-d3/node_modules/d3-scale/src/continuous.js\");\n/* harmony import */ var _init__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./init */ \"./node_modules/dagre-d3/node_modules/d3-scale/src/init.js\");\n\n\n\n\nfunction sequentialQuantile() {\n  var domain = [],\n      interpolator = _continuous__WEBPACK_IMPORTED_MODULE_1__[\"identity\"];\n\n  function scale(x) {\n    if (!isNaN(x = +x)) return interpolator((Object(d3_array__WEBPACK_IMPORTED_MODULE_0__[\"bisect\"])(domain, x) - 1) / (domain.length - 1));\n  }\n\n  scale.domain = function(_) {\n    if (!arguments.length) return domain.slice();\n    domain = [];\n    for (var i = 0, n = _.length, d; i < n; ++i) if (d = _[i], d != null && !isNaN(d = +d)) domain.push(d);\n    domain.sort(d3_array__WEBPACK_IMPORTED_MODULE_0__[\"ascending\"]);\n    return scale;\n  };\n\n  scale.interpolator = function(_) {\n    return arguments.length ? (interpolator = _, scale) : interpolator;\n  };\n\n  scale.copy = function() {\n    return sequentialQuantile(interpolator).domain(domain);\n  };\n\n  return _init__WEBPACK_IMPORTED_MODULE_2__[\"initInterpolator\"].apply(scale, arguments);\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-scale/src/symlog.js\":\n/*!*******************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-scale/src/symlog.js ***!\n  \\*******************************************************************/\n/*! exports provided: symlogish, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"symlogish\", function() { return symlogish; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return symlog; });\n/* harmony import */ var _linear__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./linear */ \"./node_modules/dagre-d3/node_modules/d3-scale/src/linear.js\");\n/* harmony import */ var _continuous__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./continuous */ \"./node_modules/dagre-d3/node_modules/d3-scale/src/continuous.js\");\n/* harmony import */ var _init__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./init */ \"./node_modules/dagre-d3/node_modules/d3-scale/src/init.js\");\n\n\n\n\nfunction transformSymlog(c) {\n  return function(x) {\n    return Math.sign(x) * Math.log1p(Math.abs(x / c));\n  };\n}\n\nfunction transformSymexp(c) {\n  return function(x) {\n    return Math.sign(x) * Math.expm1(Math.abs(x)) * c;\n  };\n}\n\nfunction symlogish(transform) {\n  var c = 1, scale = transform(transformSymlog(c), transformSymexp(c));\n\n  scale.constant = function(_) {\n    return arguments.length ? transform(transformSymlog(c = +_), transformSymexp(c)) : c;\n  };\n\n  return Object(_linear__WEBPACK_IMPORTED_MODULE_0__[\"linearish\"])(scale);\n}\n\nfunction symlog() {\n  var scale = symlogish(Object(_continuous__WEBPACK_IMPORTED_MODULE_1__[\"transformer\"])());\n\n  scale.copy = function() {\n    return Object(_continuous__WEBPACK_IMPORTED_MODULE_1__[\"copy\"])(scale, symlog()).constant(scale.constant());\n  };\n\n  return _init__WEBPACK_IMPORTED_MODULE_2__[\"initRange\"].apply(scale, arguments);\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-scale/src/threshold.js\":\n/*!**********************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-scale/src/threshold.js ***!\n  \\**********************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return threshold; });\n/* harmony import */ var d3_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-array */ \"./node_modules/d3-array/src/index.js\");\n/* harmony import */ var _array__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./array */ \"./node_modules/dagre-d3/node_modules/d3-scale/src/array.js\");\n/* harmony import */ var _init__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./init */ \"./node_modules/dagre-d3/node_modules/d3-scale/src/init.js\");\n\n\n\n\nfunction threshold() {\n  var domain = [0.5],\n      range = [0, 1],\n      unknown,\n      n = 1;\n\n  function scale(x) {\n    return x <= x ? range[Object(d3_array__WEBPACK_IMPORTED_MODULE_0__[\"bisect\"])(domain, x, 0, n)] : unknown;\n  }\n\n  scale.domain = function(_) {\n    return arguments.length ? (domain = _array__WEBPACK_IMPORTED_MODULE_1__[\"slice\"].call(_), n = Math.min(domain.length, range.length - 1), scale) : domain.slice();\n  };\n\n  scale.range = function(_) {\n    return arguments.length ? (range = _array__WEBPACK_IMPORTED_MODULE_1__[\"slice\"].call(_), n = Math.min(domain.length, range.length - 1), scale) : range.slice();\n  };\n\n  scale.invertExtent = function(y) {\n    var i = range.indexOf(y);\n    return [domain[i - 1], domain[i]];\n  };\n\n  scale.unknown = function(_) {\n    return arguments.length ? (unknown = _, scale) : unknown;\n  };\n\n  scale.copy = function() {\n    return threshold()\n        .domain(domain)\n        .range(range)\n        .unknown(unknown);\n  };\n\n  return _init__WEBPACK_IMPORTED_MODULE_2__[\"initRange\"].apply(scale, arguments);\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-scale/src/tickFormat.js\":\n/*!***********************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-scale/src/tickFormat.js ***!\n  \\***********************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var d3_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-array */ \"./node_modules/d3-array/src/index.js\");\n/* harmony import */ var d3_format__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! d3-format */ \"./node_modules/d3-format/src/index.js\");\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(start, stop, count, specifier) {\n  var step = Object(d3_array__WEBPACK_IMPORTED_MODULE_0__[\"tickStep\"])(start, stop, count),\n      precision;\n  specifier = Object(d3_format__WEBPACK_IMPORTED_MODULE_1__[\"formatSpecifier\"])(specifier == null ? \",f\" : specifier);\n  switch (specifier.type) {\n    case \"s\": {\n      var value = Math.max(Math.abs(start), Math.abs(stop));\n      if (specifier.precision == null && !isNaN(precision = Object(d3_format__WEBPACK_IMPORTED_MODULE_1__[\"precisionPrefix\"])(step, value))) specifier.precision = precision;\n      return Object(d3_format__WEBPACK_IMPORTED_MODULE_1__[\"formatPrefix\"])(specifier, value);\n    }\n    case \"\":\n    case \"e\":\n    case \"g\":\n    case \"p\":\n    case \"r\": {\n      if (specifier.precision == null && !isNaN(precision = Object(d3_format__WEBPACK_IMPORTED_MODULE_1__[\"precisionRound\"])(step, Math.max(Math.abs(start), Math.abs(stop))))) specifier.precision = precision - (specifier.type === \"e\");\n      break;\n    }\n    case \"f\":\n    case \"%\": {\n      if (specifier.precision == null && !isNaN(precision = Object(d3_format__WEBPACK_IMPORTED_MODULE_1__[\"precisionFixed\"])(step))) specifier.precision = precision - (specifier.type === \"%\") * 2;\n      break;\n    }\n  }\n  return Object(d3_format__WEBPACK_IMPORTED_MODULE_1__[\"format\"])(specifier);\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-scale/src/time.js\":\n/*!*****************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-scale/src/time.js ***!\n  \\*****************************************************************/\n/*! exports provided: calendar, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"calendar\", function() { return calendar; });\n/* harmony import */ var d3_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-array */ \"./node_modules/d3-array/src/index.js\");\n/* harmony import */ var d3_time__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! d3-time */ \"./node_modules/d3-time/src/index.js\");\n/* harmony import */ var d3_time_format__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! d3-time-format */ \"./node_modules/d3-time-format/src/index.js\");\n/* harmony import */ var _array__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./array */ \"./node_modules/dagre-d3/node_modules/d3-scale/src/array.js\");\n/* harmony import */ var _continuous__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./continuous */ \"./node_modules/dagre-d3/node_modules/d3-scale/src/continuous.js\");\n/* harmony import */ var _init__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./init */ \"./node_modules/dagre-d3/node_modules/d3-scale/src/init.js\");\n/* harmony import */ var _nice__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./nice */ \"./node_modules/dagre-d3/node_modules/d3-scale/src/nice.js\");\n\n\n\n\n\n\n\n\nvar durationSecond = 1000,\n    durationMinute = durationSecond * 60,\n    durationHour = durationMinute * 60,\n    durationDay = durationHour * 24,\n    durationWeek = durationDay * 7,\n    durationMonth = durationDay * 30,\n    durationYear = durationDay * 365;\n\nfunction date(t) {\n  return new Date(t);\n}\n\nfunction number(t) {\n  return t instanceof Date ? +t : +new Date(+t);\n}\n\nfunction calendar(year, month, week, day, hour, minute, second, millisecond, format) {\n  var scale = Object(_continuous__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(_continuous__WEBPACK_IMPORTED_MODULE_4__[\"identity\"], _continuous__WEBPACK_IMPORTED_MODULE_4__[\"identity\"]),\n      invert = scale.invert,\n      domain = scale.domain;\n\n  var formatMillisecond = format(\".%L\"),\n      formatSecond = format(\":%S\"),\n      formatMinute = format(\"%I:%M\"),\n      formatHour = format(\"%I %p\"),\n      formatDay = format(\"%a %d\"),\n      formatWeek = format(\"%b %d\"),\n      formatMonth = format(\"%B\"),\n      formatYear = format(\"%Y\");\n\n  var tickIntervals = [\n    [second,  1,      durationSecond],\n    [second,  5,  5 * durationSecond],\n    [second, 15, 15 * durationSecond],\n    [second, 30, 30 * durationSecond],\n    [minute,  1,      durationMinute],\n    [minute,  5,  5 * durationMinute],\n    [minute, 15, 15 * durationMinute],\n    [minute, 30, 30 * durationMinute],\n    [  hour,  1,      durationHour  ],\n    [  hour,  3,  3 * durationHour  ],\n    [  hour,  6,  6 * durationHour  ],\n    [  hour, 12, 12 * durationHour  ],\n    [   day,  1,      durationDay   ],\n    [   day,  2,  2 * durationDay   ],\n    [  week,  1,      durationWeek  ],\n    [ month,  1,      durationMonth ],\n    [ month,  3,  3 * durationMonth ],\n    [  year,  1,      durationYear  ]\n  ];\n\n  function tickFormat(date) {\n    return (second(date) < date ? formatMillisecond\n        : minute(date) < date ? formatSecond\n        : hour(date) < date ? formatMinute\n        : day(date) < date ? formatHour\n        : month(date) < date ? (week(date) < date ? formatDay : formatWeek)\n        : year(date) < date ? formatMonth\n        : formatYear)(date);\n  }\n\n  function tickInterval(interval, start, stop, step) {\n    if (interval == null) interval = 10;\n\n    // If a desired tick count is specified, pick a reasonable tick interval\n    // based on the extent of the domain and a rough estimate of tick size.\n    // Otherwise, assume interval is already a time interval and use it.\n    if (typeof interval === \"number\") {\n      var target = Math.abs(stop - start) / interval,\n          i = Object(d3_array__WEBPACK_IMPORTED_MODULE_0__[\"bisector\"])(function(i) { return i[2]; }).right(tickIntervals, target);\n      if (i === tickIntervals.length) {\n        step = Object(d3_array__WEBPACK_IMPORTED_MODULE_0__[\"tickStep\"])(start / durationYear, stop / durationYear, interval);\n        interval = year;\n      } else if (i) {\n        i = tickIntervals[target / tickIntervals[i - 1][2] < tickIntervals[i][2] / target ? i - 1 : i];\n        step = i[1];\n        interval = i[0];\n      } else {\n        step = Math.max(Object(d3_array__WEBPACK_IMPORTED_MODULE_0__[\"tickStep\"])(start, stop, interval), 1);\n        interval = millisecond;\n      }\n    }\n\n    return step == null ? interval : interval.every(step);\n  }\n\n  scale.invert = function(y) {\n    return new Date(invert(y));\n  };\n\n  scale.domain = function(_) {\n    return arguments.length ? domain(_array__WEBPACK_IMPORTED_MODULE_3__[\"map\"].call(_, number)) : domain().map(date);\n  };\n\n  scale.ticks = function(interval, step) {\n    var d = domain(),\n        t0 = d[0],\n        t1 = d[d.length - 1],\n        r = t1 < t0,\n        t;\n    if (r) t = t0, t0 = t1, t1 = t;\n    t = tickInterval(interval, t0, t1, step);\n    t = t ? t.range(t0, t1 + 1) : []; // inclusive stop\n    return r ? t.reverse() : t;\n  };\n\n  scale.tickFormat = function(count, specifier) {\n    return specifier == null ? tickFormat : format(specifier);\n  };\n\n  scale.nice = function(interval, step) {\n    var d = domain();\n    return (interval = tickInterval(interval, d[0], d[d.length - 1], step))\n        ? domain(Object(_nice__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(d, interval))\n        : scale;\n  };\n\n  scale.copy = function() {\n    return Object(_continuous__WEBPACK_IMPORTED_MODULE_4__[\"copy\"])(scale, calendar(year, month, week, day, hour, minute, second, millisecond, format));\n  };\n\n  return scale;\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  return _init__WEBPACK_IMPORTED_MODULE_5__[\"initRange\"].apply(calendar(d3_time__WEBPACK_IMPORTED_MODULE_1__[\"timeYear\"], d3_time__WEBPACK_IMPORTED_MODULE_1__[\"timeMonth\"], d3_time__WEBPACK_IMPORTED_MODULE_1__[\"timeWeek\"], d3_time__WEBPACK_IMPORTED_MODULE_1__[\"timeDay\"], d3_time__WEBPACK_IMPORTED_MODULE_1__[\"timeHour\"], d3_time__WEBPACK_IMPORTED_MODULE_1__[\"timeMinute\"], d3_time__WEBPACK_IMPORTED_MODULE_1__[\"timeSecond\"], d3_time__WEBPACK_IMPORTED_MODULE_1__[\"timeMillisecond\"], d3_time_format__WEBPACK_IMPORTED_MODULE_2__[\"timeFormat\"]).domain([new Date(2000, 0, 1), new Date(2000, 0, 2)]), arguments);\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-scale/src/utcTime.js\":\n/*!********************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-scale/src/utcTime.js ***!\n  \\********************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _time__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./time */ \"./node_modules/dagre-d3/node_modules/d3-scale/src/time.js\");\n/* harmony import */ var d3_time_format__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! d3-time-format */ \"./node_modules/d3-time-format/src/index.js\");\n/* harmony import */ var d3_time__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! d3-time */ \"./node_modules/d3-time/src/index.js\");\n/* harmony import */ var _init__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./init */ \"./node_modules/dagre-d3/node_modules/d3-scale/src/init.js\");\n\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  return _init__WEBPACK_IMPORTED_MODULE_3__[\"initRange\"].apply(Object(_time__WEBPACK_IMPORTED_MODULE_0__[\"calendar\"])(d3_time__WEBPACK_IMPORTED_MODULE_2__[\"utcYear\"], d3_time__WEBPACK_IMPORTED_MODULE_2__[\"utcMonth\"], d3_time__WEBPACK_IMPORTED_MODULE_2__[\"utcWeek\"], d3_time__WEBPACK_IMPORTED_MODULE_2__[\"utcDay\"], d3_time__WEBPACK_IMPORTED_MODULE_2__[\"utcHour\"], d3_time__WEBPACK_IMPORTED_MODULE_2__[\"utcMinute\"], d3_time__WEBPACK_IMPORTED_MODULE_2__[\"utcSecond\"], d3_time__WEBPACK_IMPORTED_MODULE_2__[\"utcMillisecond\"], d3_time_format__WEBPACK_IMPORTED_MODULE_1__[\"utcFormat\"]).domain([Date.UTC(2000, 0, 1), Date.UTC(2000, 0, 2)]), arguments);\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-shape/src/arc.js\":\n/*!****************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-shape/src/arc.js ***!\n  \\****************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var d3_path__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-path */ \"./node_modules/d3-path/src/index.js\");\n/* harmony import */ var _constant_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./constant.js */ \"./node_modules/dagre-d3/node_modules/d3-shape/src/constant.js\");\n/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./math.js */ \"./node_modules/dagre-d3/node_modules/d3-shape/src/math.js\");\n\n\n\n\nfunction arcInnerRadius(d) {\n  return d.innerRadius;\n}\n\nfunction arcOuterRadius(d) {\n  return d.outerRadius;\n}\n\nfunction arcStartAngle(d) {\n  return d.startAngle;\n}\n\nfunction arcEndAngle(d) {\n  return d.endAngle;\n}\n\nfunction arcPadAngle(d) {\n  return d && d.padAngle; // Note: optional!\n}\n\nfunction intersect(x0, y0, x1, y1, x2, y2, x3, y3) {\n  var x10 = x1 - x0, y10 = y1 - y0,\n      x32 = x3 - x2, y32 = y3 - y2,\n      t = y32 * x10 - x32 * y10;\n  if (t * t < _math_js__WEBPACK_IMPORTED_MODULE_2__[\"epsilon\"]) return;\n  t = (x32 * (y0 - y2) - y32 * (x0 - x2)) / t;\n  return [x0 + t * x10, y0 + t * y10];\n}\n\n// Compute perpendicular offset line of length rc.\n// http://mathworld.wolfram.com/Circle-LineIntersection.html\nfunction cornerTangents(x0, y0, x1, y1, r1, rc, cw) {\n  var x01 = x0 - x1,\n      y01 = y0 - y1,\n      lo = (cw ? rc : -rc) / Object(_math_js__WEBPACK_IMPORTED_MODULE_2__[\"sqrt\"])(x01 * x01 + y01 * y01),\n      ox = lo * y01,\n      oy = -lo * x01,\n      x11 = x0 + ox,\n      y11 = y0 + oy,\n      x10 = x1 + ox,\n      y10 = y1 + oy,\n      x00 = (x11 + x10) / 2,\n      y00 = (y11 + y10) / 2,\n      dx = x10 - x11,\n      dy = y10 - y11,\n      d2 = dx * dx + dy * dy,\n      r = r1 - rc,\n      D = x11 * y10 - x10 * y11,\n      d = (dy < 0 ? -1 : 1) * Object(_math_js__WEBPACK_IMPORTED_MODULE_2__[\"sqrt\"])(Object(_math_js__WEBPACK_IMPORTED_MODULE_2__[\"max\"])(0, r * r * d2 - D * D)),\n      cx0 = (D * dy - dx * d) / d2,\n      cy0 = (-D * dx - dy * d) / d2,\n      cx1 = (D * dy + dx * d) / d2,\n      cy1 = (-D * dx + dy * d) / d2,\n      dx0 = cx0 - x00,\n      dy0 = cy0 - y00,\n      dx1 = cx1 - x00,\n      dy1 = cy1 - y00;\n\n  // Pick the closer of the two intersection points.\n  // TODO Is there a faster way to determine which intersection to use?\n  if (dx0 * dx0 + dy0 * dy0 > dx1 * dx1 + dy1 * dy1) cx0 = cx1, cy0 = cy1;\n\n  return {\n    cx: cx0,\n    cy: cy0,\n    x01: -ox,\n    y01: -oy,\n    x11: cx0 * (r1 / r - 1),\n    y11: cy0 * (r1 / r - 1)\n  };\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  var innerRadius = arcInnerRadius,\n      outerRadius = arcOuterRadius,\n      cornerRadius = Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(0),\n      padRadius = null,\n      startAngle = arcStartAngle,\n      endAngle = arcEndAngle,\n      padAngle = arcPadAngle,\n      context = null;\n\n  function arc() {\n    var buffer,\n        r,\n        r0 = +innerRadius.apply(this, arguments),\n        r1 = +outerRadius.apply(this, arguments),\n        a0 = startAngle.apply(this, arguments) - _math_js__WEBPACK_IMPORTED_MODULE_2__[\"halfPi\"],\n        a1 = endAngle.apply(this, arguments) - _math_js__WEBPACK_IMPORTED_MODULE_2__[\"halfPi\"],\n        da = Object(_math_js__WEBPACK_IMPORTED_MODULE_2__[\"abs\"])(a1 - a0),\n        cw = a1 > a0;\n\n    if (!context) context = buffer = Object(d3_path__WEBPACK_IMPORTED_MODULE_0__[\"path\"])();\n\n    // Ensure that the outer radius is always larger than the inner radius.\n    if (r1 < r0) r = r1, r1 = r0, r0 = r;\n\n    // Is it a point?\n    if (!(r1 > _math_js__WEBPACK_IMPORTED_MODULE_2__[\"epsilon\"])) context.moveTo(0, 0);\n\n    // Or is it a circle or annulus?\n    else if (da > _math_js__WEBPACK_IMPORTED_MODULE_2__[\"tau\"] - _math_js__WEBPACK_IMPORTED_MODULE_2__[\"epsilon\"]) {\n      context.moveTo(r1 * Object(_math_js__WEBPACK_IMPORTED_MODULE_2__[\"cos\"])(a0), r1 * Object(_math_js__WEBPACK_IMPORTED_MODULE_2__[\"sin\"])(a0));\n      context.arc(0, 0, r1, a0, a1, !cw);\n      if (r0 > _math_js__WEBPACK_IMPORTED_MODULE_2__[\"epsilon\"]) {\n        context.moveTo(r0 * Object(_math_js__WEBPACK_IMPORTED_MODULE_2__[\"cos\"])(a1), r0 * Object(_math_js__WEBPACK_IMPORTED_MODULE_2__[\"sin\"])(a1));\n        context.arc(0, 0, r0, a1, a0, cw);\n      }\n    }\n\n    // Or is it a circular or annular sector?\n    else {\n      var a01 = a0,\n          a11 = a1,\n          a00 = a0,\n          a10 = a1,\n          da0 = da,\n          da1 = da,\n          ap = padAngle.apply(this, arguments) / 2,\n          rp = (ap > _math_js__WEBPACK_IMPORTED_MODULE_2__[\"epsilon\"]) && (padRadius ? +padRadius.apply(this, arguments) : Object(_math_js__WEBPACK_IMPORTED_MODULE_2__[\"sqrt\"])(r0 * r0 + r1 * r1)),\n          rc = Object(_math_js__WEBPACK_IMPORTED_MODULE_2__[\"min\"])(Object(_math_js__WEBPACK_IMPORTED_MODULE_2__[\"abs\"])(r1 - r0) / 2, +cornerRadius.apply(this, arguments)),\n          rc0 = rc,\n          rc1 = rc,\n          t0,\n          t1;\n\n      // Apply padding? Note that since r1 ≥ r0, da1 ≥ da0.\n      if (rp > _math_js__WEBPACK_IMPORTED_MODULE_2__[\"epsilon\"]) {\n        var p0 = Object(_math_js__WEBPACK_IMPORTED_MODULE_2__[\"asin\"])(rp / r0 * Object(_math_js__WEBPACK_IMPORTED_MODULE_2__[\"sin\"])(ap)),\n            p1 = Object(_math_js__WEBPACK_IMPORTED_MODULE_2__[\"asin\"])(rp / r1 * Object(_math_js__WEBPACK_IMPORTED_MODULE_2__[\"sin\"])(ap));\n        if ((da0 -= p0 * 2) > _math_js__WEBPACK_IMPORTED_MODULE_2__[\"epsilon\"]) p0 *= (cw ? 1 : -1), a00 += p0, a10 -= p0;\n        else da0 = 0, a00 = a10 = (a0 + a1) / 2;\n        if ((da1 -= p1 * 2) > _math_js__WEBPACK_IMPORTED_MODULE_2__[\"epsilon\"]) p1 *= (cw ? 1 : -1), a01 += p1, a11 -= p1;\n        else da1 = 0, a01 = a11 = (a0 + a1) / 2;\n      }\n\n      var x01 = r1 * Object(_math_js__WEBPACK_IMPORTED_MODULE_2__[\"cos\"])(a01),\n          y01 = r1 * Object(_math_js__WEBPACK_IMPORTED_MODULE_2__[\"sin\"])(a01),\n          x10 = r0 * Object(_math_js__WEBPACK_IMPORTED_MODULE_2__[\"cos\"])(a10),\n          y10 = r0 * Object(_math_js__WEBPACK_IMPORTED_MODULE_2__[\"sin\"])(a10);\n\n      // Apply rounded corners?\n      if (rc > _math_js__WEBPACK_IMPORTED_MODULE_2__[\"epsilon\"]) {\n        var x11 = r1 * Object(_math_js__WEBPACK_IMPORTED_MODULE_2__[\"cos\"])(a11),\n            y11 = r1 * Object(_math_js__WEBPACK_IMPORTED_MODULE_2__[\"sin\"])(a11),\n            x00 = r0 * Object(_math_js__WEBPACK_IMPORTED_MODULE_2__[\"cos\"])(a00),\n            y00 = r0 * Object(_math_js__WEBPACK_IMPORTED_MODULE_2__[\"sin\"])(a00),\n            oc;\n\n        // Restrict the corner radius according to the sector angle.\n        if (da < _math_js__WEBPACK_IMPORTED_MODULE_2__[\"pi\"] && (oc = intersect(x01, y01, x00, y00, x11, y11, x10, y10))) {\n          var ax = x01 - oc[0],\n              ay = y01 - oc[1],\n              bx = x11 - oc[0],\n              by = y11 - oc[1],\n              kc = 1 / Object(_math_js__WEBPACK_IMPORTED_MODULE_2__[\"sin\"])(Object(_math_js__WEBPACK_IMPORTED_MODULE_2__[\"acos\"])((ax * bx + ay * by) / (Object(_math_js__WEBPACK_IMPORTED_MODULE_2__[\"sqrt\"])(ax * ax + ay * ay) * Object(_math_js__WEBPACK_IMPORTED_MODULE_2__[\"sqrt\"])(bx * bx + by * by))) / 2),\n              lc = Object(_math_js__WEBPACK_IMPORTED_MODULE_2__[\"sqrt\"])(oc[0] * oc[0] + oc[1] * oc[1]);\n          rc0 = Object(_math_js__WEBPACK_IMPORTED_MODULE_2__[\"min\"])(rc, (r0 - lc) / (kc - 1));\n          rc1 = Object(_math_js__WEBPACK_IMPORTED_MODULE_2__[\"min\"])(rc, (r1 - lc) / (kc + 1));\n        }\n      }\n\n      // Is the sector collapsed to a line?\n      if (!(da1 > _math_js__WEBPACK_IMPORTED_MODULE_2__[\"epsilon\"])) context.moveTo(x01, y01);\n\n      // Does the sector’s outer ring have rounded corners?\n      else if (rc1 > _math_js__WEBPACK_IMPORTED_MODULE_2__[\"epsilon\"]) {\n        t0 = cornerTangents(x00, y00, x01, y01, r1, rc1, cw);\n        t1 = cornerTangents(x11, y11, x10, y10, r1, rc1, cw);\n\n        context.moveTo(t0.cx + t0.x01, t0.cy + t0.y01);\n\n        // Have the corners merged?\n        if (rc1 < rc) context.arc(t0.cx, t0.cy, rc1, Object(_math_js__WEBPACK_IMPORTED_MODULE_2__[\"atan2\"])(t0.y01, t0.x01), Object(_math_js__WEBPACK_IMPORTED_MODULE_2__[\"atan2\"])(t1.y01, t1.x01), !cw);\n\n        // Otherwise, draw the two corners and the ring.\n        else {\n          context.arc(t0.cx, t0.cy, rc1, Object(_math_js__WEBPACK_IMPORTED_MODULE_2__[\"atan2\"])(t0.y01, t0.x01), Object(_math_js__WEBPACK_IMPORTED_MODULE_2__[\"atan2\"])(t0.y11, t0.x11), !cw);\n          context.arc(0, 0, r1, Object(_math_js__WEBPACK_IMPORTED_MODULE_2__[\"atan2\"])(t0.cy + t0.y11, t0.cx + t0.x11), Object(_math_js__WEBPACK_IMPORTED_MODULE_2__[\"atan2\"])(t1.cy + t1.y11, t1.cx + t1.x11), !cw);\n          context.arc(t1.cx, t1.cy, rc1, Object(_math_js__WEBPACK_IMPORTED_MODULE_2__[\"atan2\"])(t1.y11, t1.x11), Object(_math_js__WEBPACK_IMPORTED_MODULE_2__[\"atan2\"])(t1.y01, t1.x01), !cw);\n        }\n      }\n\n      // Or is the outer ring just a circular arc?\n      else context.moveTo(x01, y01), context.arc(0, 0, r1, a01, a11, !cw);\n\n      // Is there no inner ring, and it’s a circular sector?\n      // Or perhaps it’s an annular sector collapsed due to padding?\n      if (!(r0 > _math_js__WEBPACK_IMPORTED_MODULE_2__[\"epsilon\"]) || !(da0 > _math_js__WEBPACK_IMPORTED_MODULE_2__[\"epsilon\"])) context.lineTo(x10, y10);\n\n      // Does the sector’s inner ring (or point) have rounded corners?\n      else if (rc0 > _math_js__WEBPACK_IMPORTED_MODULE_2__[\"epsilon\"]) {\n        t0 = cornerTangents(x10, y10, x11, y11, r0, -rc0, cw);\n        t1 = cornerTangents(x01, y01, x00, y00, r0, -rc0, cw);\n\n        context.lineTo(t0.cx + t0.x01, t0.cy + t0.y01);\n\n        // Have the corners merged?\n        if (rc0 < rc) context.arc(t0.cx, t0.cy, rc0, Object(_math_js__WEBPACK_IMPORTED_MODULE_2__[\"atan2\"])(t0.y01, t0.x01), Object(_math_js__WEBPACK_IMPORTED_MODULE_2__[\"atan2\"])(t1.y01, t1.x01), !cw);\n\n        // Otherwise, draw the two corners and the ring.\n        else {\n          context.arc(t0.cx, t0.cy, rc0, Object(_math_js__WEBPACK_IMPORTED_MODULE_2__[\"atan2\"])(t0.y01, t0.x01), Object(_math_js__WEBPACK_IMPORTED_MODULE_2__[\"atan2\"])(t0.y11, t0.x11), !cw);\n          context.arc(0, 0, r0, Object(_math_js__WEBPACK_IMPORTED_MODULE_2__[\"atan2\"])(t0.cy + t0.y11, t0.cx + t0.x11), Object(_math_js__WEBPACK_IMPORTED_MODULE_2__[\"atan2\"])(t1.cy + t1.y11, t1.cx + t1.x11), cw);\n          context.arc(t1.cx, t1.cy, rc0, Object(_math_js__WEBPACK_IMPORTED_MODULE_2__[\"atan2\"])(t1.y11, t1.x11), Object(_math_js__WEBPACK_IMPORTED_MODULE_2__[\"atan2\"])(t1.y01, t1.x01), !cw);\n        }\n      }\n\n      // Or is the inner ring just a circular arc?\n      else context.arc(0, 0, r0, a10, a00, cw);\n    }\n\n    context.closePath();\n\n    if (buffer) return context = null, buffer + \"\" || null;\n  }\n\n  arc.centroid = function() {\n    var r = (+innerRadius.apply(this, arguments) + +outerRadius.apply(this, arguments)) / 2,\n        a = (+startAngle.apply(this, arguments) + +endAngle.apply(this, arguments)) / 2 - _math_js__WEBPACK_IMPORTED_MODULE_2__[\"pi\"] / 2;\n    return [Object(_math_js__WEBPACK_IMPORTED_MODULE_2__[\"cos\"])(a) * r, Object(_math_js__WEBPACK_IMPORTED_MODULE_2__[\"sin\"])(a) * r];\n  };\n\n  arc.innerRadius = function(_) {\n    return arguments.length ? (innerRadius = typeof _ === \"function\" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(+_), arc) : innerRadius;\n  };\n\n  arc.outerRadius = function(_) {\n    return arguments.length ? (outerRadius = typeof _ === \"function\" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(+_), arc) : outerRadius;\n  };\n\n  arc.cornerRadius = function(_) {\n    return arguments.length ? (cornerRadius = typeof _ === \"function\" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(+_), arc) : cornerRadius;\n  };\n\n  arc.padRadius = function(_) {\n    return arguments.length ? (padRadius = _ == null ? null : typeof _ === \"function\" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(+_), arc) : padRadius;\n  };\n\n  arc.startAngle = function(_) {\n    return arguments.length ? (startAngle = typeof _ === \"function\" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(+_), arc) : startAngle;\n  };\n\n  arc.endAngle = function(_) {\n    return arguments.length ? (endAngle = typeof _ === \"function\" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(+_), arc) : endAngle;\n  };\n\n  arc.padAngle = function(_) {\n    return arguments.length ? (padAngle = typeof _ === \"function\" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(+_), arc) : padAngle;\n  };\n\n  arc.context = function(_) {\n    return arguments.length ? ((context = _ == null ? null : _), arc) : context;\n  };\n\n  return arc;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-shape/src/area.js\":\n/*!*****************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-shape/src/area.js ***!\n  \\*****************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var d3_path__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-path */ \"./node_modules/d3-path/src/index.js\");\n/* harmony import */ var _constant_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./constant.js */ \"./node_modules/dagre-d3/node_modules/d3-shape/src/constant.js\");\n/* harmony import */ var _curve_linear_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./curve/linear.js */ \"./node_modules/dagre-d3/node_modules/d3-shape/src/curve/linear.js\");\n/* harmony import */ var _line_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./line.js */ \"./node_modules/dagre-d3/node_modules/d3-shape/src/line.js\");\n/* harmony import */ var _point_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./point.js */ \"./node_modules/dagre-d3/node_modules/d3-shape/src/point.js\");\n\n\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  var x0 = _point_js__WEBPACK_IMPORTED_MODULE_4__[\"x\"],\n      x1 = null,\n      y0 = Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(0),\n      y1 = _point_js__WEBPACK_IMPORTED_MODULE_4__[\"y\"],\n      defined = Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(true),\n      context = null,\n      curve = _curve_linear_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"],\n      output = null;\n\n  function area(data) {\n    var i,\n        j,\n        k,\n        n = data.length,\n        d,\n        defined0 = false,\n        buffer,\n        x0z = new Array(n),\n        y0z = new Array(n);\n\n    if (context == null) output = curve(buffer = Object(d3_path__WEBPACK_IMPORTED_MODULE_0__[\"path\"])());\n\n    for (i = 0; i <= n; ++i) {\n      if (!(i < n && defined(d = data[i], i, data)) === defined0) {\n        if (defined0 = !defined0) {\n          j = i;\n          output.areaStart();\n          output.lineStart();\n        } else {\n          output.lineEnd();\n          output.lineStart();\n          for (k = i - 1; k >= j; --k) {\n            output.point(x0z[k], y0z[k]);\n          }\n          output.lineEnd();\n          output.areaEnd();\n        }\n      }\n      if (defined0) {\n        x0z[i] = +x0(d, i, data), y0z[i] = +y0(d, i, data);\n        output.point(x1 ? +x1(d, i, data) : x0z[i], y1 ? +y1(d, i, data) : y0z[i]);\n      }\n    }\n\n    if (buffer) return output = null, buffer + \"\" || null;\n  }\n\n  function arealine() {\n    return Object(_line_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"])().defined(defined).curve(curve).context(context);\n  }\n\n  area.x = function(_) {\n    return arguments.length ? (x0 = typeof _ === \"function\" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(+_), x1 = null, area) : x0;\n  };\n\n  area.x0 = function(_) {\n    return arguments.length ? (x0 = typeof _ === \"function\" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(+_), area) : x0;\n  };\n\n  area.x1 = function(_) {\n    return arguments.length ? (x1 = _ == null ? null : typeof _ === \"function\" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(+_), area) : x1;\n  };\n\n  area.y = function(_) {\n    return arguments.length ? (y0 = typeof _ === \"function\" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(+_), y1 = null, area) : y0;\n  };\n\n  area.y0 = function(_) {\n    return arguments.length ? (y0 = typeof _ === \"function\" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(+_), area) : y0;\n  };\n\n  area.y1 = function(_) {\n    return arguments.length ? (y1 = _ == null ? null : typeof _ === \"function\" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(+_), area) : y1;\n  };\n\n  area.lineX0 =\n  area.lineY0 = function() {\n    return arealine().x(x0).y(y0);\n  };\n\n  area.lineY1 = function() {\n    return arealine().x(x0).y(y1);\n  };\n\n  area.lineX1 = function() {\n    return arealine().x(x1).y(y0);\n  };\n\n  area.defined = function(_) {\n    return arguments.length ? (defined = typeof _ === \"function\" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(!!_), area) : defined;\n  };\n\n  area.curve = function(_) {\n    return arguments.length ? (curve = _, context != null && (output = curve(context)), area) : curve;\n  };\n\n  area.context = function(_) {\n    return arguments.length ? (_ == null ? context = output = null : output = curve(context = _), area) : context;\n  };\n\n  return area;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-shape/src/areaRadial.js\":\n/*!***********************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-shape/src/areaRadial.js ***!\n  \\***********************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _curve_radial_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./curve/radial.js */ \"./node_modules/dagre-d3/node_modules/d3-shape/src/curve/radial.js\");\n/* harmony import */ var _area_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./area.js */ \"./node_modules/dagre-d3/node_modules/d3-shape/src/area.js\");\n/* harmony import */ var _lineRadial_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./lineRadial.js */ \"./node_modules/dagre-d3/node_modules/d3-shape/src/lineRadial.js\");\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  var a = Object(_area_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])().curve(_curve_radial_js__WEBPACK_IMPORTED_MODULE_0__[\"curveRadialLinear\"]),\n      c = a.curve,\n      x0 = a.lineX0,\n      x1 = a.lineX1,\n      y0 = a.lineY0,\n      y1 = a.lineY1;\n\n  a.angle = a.x, delete a.x;\n  a.startAngle = a.x0, delete a.x0;\n  a.endAngle = a.x1, delete a.x1;\n  a.radius = a.y, delete a.y;\n  a.innerRadius = a.y0, delete a.y0;\n  a.outerRadius = a.y1, delete a.y1;\n  a.lineStartAngle = function() { return Object(_lineRadial_js__WEBPACK_IMPORTED_MODULE_2__[\"lineRadial\"])(x0()); }, delete a.lineX0;\n  a.lineEndAngle = function() { return Object(_lineRadial_js__WEBPACK_IMPORTED_MODULE_2__[\"lineRadial\"])(x1()); }, delete a.lineX1;\n  a.lineInnerRadius = function() { return Object(_lineRadial_js__WEBPACK_IMPORTED_MODULE_2__[\"lineRadial\"])(y0()); }, delete a.lineY0;\n  a.lineOuterRadius = function() { return Object(_lineRadial_js__WEBPACK_IMPORTED_MODULE_2__[\"lineRadial\"])(y1()); }, delete a.lineY1;\n\n  a.curve = function(_) {\n    return arguments.length ? c(Object(_curve_radial_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(_)) : c()._curve;\n  };\n\n  return a;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-shape/src/array.js\":\n/*!******************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-shape/src/array.js ***!\n  \\******************************************************************/\n/*! exports provided: slice */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"slice\", function() { return slice; });\nvar slice = Array.prototype.slice;\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-shape/src/constant.js\":\n/*!*********************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-shape/src/constant.js ***!\n  \\*********************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(x) {\n  return function constant() {\n    return x;\n  };\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-shape/src/curve/basis.js\":\n/*!************************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-shape/src/curve/basis.js ***!\n  \\************************************************************************/\n/*! exports provided: point, Basis, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"point\", function() { return point; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Basis\", function() { return Basis; });\nfunction point(that, x, y) {\n  that._context.bezierCurveTo(\n    (2 * that._x0 + that._x1) / 3,\n    (2 * that._y0 + that._y1) / 3,\n    (that._x0 + 2 * that._x1) / 3,\n    (that._y0 + 2 * that._y1) / 3,\n    (that._x0 + 4 * that._x1 + x) / 6,\n    (that._y0 + 4 * that._y1 + y) / 6\n  );\n}\n\nfunction Basis(context) {\n  this._context = context;\n}\n\nBasis.prototype = {\n  areaStart: function() {\n    this._line = 0;\n  },\n  areaEnd: function() {\n    this._line = NaN;\n  },\n  lineStart: function() {\n    this._x0 = this._x1 =\n    this._y0 = this._y1 = NaN;\n    this._point = 0;\n  },\n  lineEnd: function() {\n    switch (this._point) {\n      case 3: point(this, this._x1, this._y1); // proceed\n      case 2: this._context.lineTo(this._x1, this._y1); break;\n    }\n    if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath();\n    this._line = 1 - this._line;\n  },\n  point: function(x, y) {\n    x = +x, y = +y;\n    switch (this._point) {\n      case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break;\n      case 1: this._point = 2; break;\n      case 2: this._point = 3; this._context.lineTo((5 * this._x0 + this._x1) / 6, (5 * this._y0 + this._y1) / 6); // proceed\n      default: point(this, x, y); break;\n    }\n    this._x0 = this._x1, this._x1 = x;\n    this._y0 = this._y1, this._y1 = y;\n  }\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(context) {\n  return new Basis(context);\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-shape/src/curve/basisClosed.js\":\n/*!******************************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-shape/src/curve/basisClosed.js ***!\n  \\******************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _noop_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../noop.js */ \"./node_modules/dagre-d3/node_modules/d3-shape/src/noop.js\");\n/* harmony import */ var _basis_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./basis.js */ \"./node_modules/dagre-d3/node_modules/d3-shape/src/curve/basis.js\");\n\n\n\nfunction BasisClosed(context) {\n  this._context = context;\n}\n\nBasisClosed.prototype = {\n  areaStart: _noop_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"],\n  areaEnd: _noop_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"],\n  lineStart: function() {\n    this._x0 = this._x1 = this._x2 = this._x3 = this._x4 =\n    this._y0 = this._y1 = this._y2 = this._y3 = this._y4 = NaN;\n    this._point = 0;\n  },\n  lineEnd: function() {\n    switch (this._point) {\n      case 1: {\n        this._context.moveTo(this._x2, this._y2);\n        this._context.closePath();\n        break;\n      }\n      case 2: {\n        this._context.moveTo((this._x2 + 2 * this._x3) / 3, (this._y2 + 2 * this._y3) / 3);\n        this._context.lineTo((this._x3 + 2 * this._x2) / 3, (this._y3 + 2 * this._y2) / 3);\n        this._context.closePath();\n        break;\n      }\n      case 3: {\n        this.point(this._x2, this._y2);\n        this.point(this._x3, this._y3);\n        this.point(this._x4, this._y4);\n        break;\n      }\n    }\n  },\n  point: function(x, y) {\n    x = +x, y = +y;\n    switch (this._point) {\n      case 0: this._point = 1; this._x2 = x, this._y2 = y; break;\n      case 1: this._point = 2; this._x3 = x, this._y3 = y; break;\n      case 2: this._point = 3; this._x4 = x, this._y4 = y; this._context.moveTo((this._x0 + 4 * this._x1 + x) / 6, (this._y0 + 4 * this._y1 + y) / 6); break;\n      default: Object(_basis_js__WEBPACK_IMPORTED_MODULE_1__[\"point\"])(this, x, y); break;\n    }\n    this._x0 = this._x1, this._x1 = x;\n    this._y0 = this._y1, this._y1 = y;\n  }\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(context) {\n  return new BasisClosed(context);\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-shape/src/curve/basisOpen.js\":\n/*!****************************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-shape/src/curve/basisOpen.js ***!\n  \\****************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _basis_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./basis.js */ \"./node_modules/dagre-d3/node_modules/d3-shape/src/curve/basis.js\");\n\n\nfunction BasisOpen(context) {\n  this._context = context;\n}\n\nBasisOpen.prototype = {\n  areaStart: function() {\n    this._line = 0;\n  },\n  areaEnd: function() {\n    this._line = NaN;\n  },\n  lineStart: function() {\n    this._x0 = this._x1 =\n    this._y0 = this._y1 = NaN;\n    this._point = 0;\n  },\n  lineEnd: function() {\n    if (this._line || (this._line !== 0 && this._point === 3)) this._context.closePath();\n    this._line = 1 - this._line;\n  },\n  point: function(x, y) {\n    x = +x, y = +y;\n    switch (this._point) {\n      case 0: this._point = 1; break;\n      case 1: this._point = 2; break;\n      case 2: this._point = 3; var x0 = (this._x0 + 4 * this._x1 + x) / 6, y0 = (this._y0 + 4 * this._y1 + y) / 6; this._line ? this._context.lineTo(x0, y0) : this._context.moveTo(x0, y0); break;\n      case 3: this._point = 4; // proceed\n      default: Object(_basis_js__WEBPACK_IMPORTED_MODULE_0__[\"point\"])(this, x, y); break;\n    }\n    this._x0 = this._x1, this._x1 = x;\n    this._y0 = this._y1, this._y1 = y;\n  }\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(context) {\n  return new BasisOpen(context);\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-shape/src/curve/bundle.js\":\n/*!*************************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-shape/src/curve/bundle.js ***!\n  \\*************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _basis_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./basis.js */ \"./node_modules/dagre-d3/node_modules/d3-shape/src/curve/basis.js\");\n\n\nfunction Bundle(context, beta) {\n  this._basis = new _basis_js__WEBPACK_IMPORTED_MODULE_0__[\"Basis\"](context);\n  this._beta = beta;\n}\n\nBundle.prototype = {\n  lineStart: function() {\n    this._x = [];\n    this._y = [];\n    this._basis.lineStart();\n  },\n  lineEnd: function() {\n    var x = this._x,\n        y = this._y,\n        j = x.length - 1;\n\n    if (j > 0) {\n      var x0 = x[0],\n          y0 = y[0],\n          dx = x[j] - x0,\n          dy = y[j] - y0,\n          i = -1,\n          t;\n\n      while (++i <= j) {\n        t = i / j;\n        this._basis.point(\n          this._beta * x[i] + (1 - this._beta) * (x0 + t * dx),\n          this._beta * y[i] + (1 - this._beta) * (y0 + t * dy)\n        );\n      }\n    }\n\n    this._x = this._y = null;\n    this._basis.lineEnd();\n  },\n  point: function(x, y) {\n    this._x.push(+x);\n    this._y.push(+y);\n  }\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ((function custom(beta) {\n\n  function bundle(context) {\n    return beta === 1 ? new _basis_js__WEBPACK_IMPORTED_MODULE_0__[\"Basis\"](context) : new Bundle(context, beta);\n  }\n\n  bundle.beta = function(beta) {\n    return custom(+beta);\n  };\n\n  return bundle;\n})(0.85));\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-shape/src/curve/cardinal.js\":\n/*!***************************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-shape/src/curve/cardinal.js ***!\n  \\***************************************************************************/\n/*! exports provided: point, Cardinal, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"point\", function() { return point; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Cardinal\", function() { return Cardinal; });\nfunction point(that, x, y) {\n  that._context.bezierCurveTo(\n    that._x1 + that._k * (that._x2 - that._x0),\n    that._y1 + that._k * (that._y2 - that._y0),\n    that._x2 + that._k * (that._x1 - x),\n    that._y2 + that._k * (that._y1 - y),\n    that._x2,\n    that._y2\n  );\n}\n\nfunction Cardinal(context, tension) {\n  this._context = context;\n  this._k = (1 - tension) / 6;\n}\n\nCardinal.prototype = {\n  areaStart: function() {\n    this._line = 0;\n  },\n  areaEnd: function() {\n    this._line = NaN;\n  },\n  lineStart: function() {\n    this._x0 = this._x1 = this._x2 =\n    this._y0 = this._y1 = this._y2 = NaN;\n    this._point = 0;\n  },\n  lineEnd: function() {\n    switch (this._point) {\n      case 2: this._context.lineTo(this._x2, this._y2); break;\n      case 3: point(this, this._x1, this._y1); break;\n    }\n    if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath();\n    this._line = 1 - this._line;\n  },\n  point: function(x, y) {\n    x = +x, y = +y;\n    switch (this._point) {\n      case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break;\n      case 1: this._point = 2; this._x1 = x, this._y1 = y; break;\n      case 2: this._point = 3; // proceed\n      default: point(this, x, y); break;\n    }\n    this._x0 = this._x1, this._x1 = this._x2, this._x2 = x;\n    this._y0 = this._y1, this._y1 = this._y2, this._y2 = y;\n  }\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ((function custom(tension) {\n\n  function cardinal(context) {\n    return new Cardinal(context, tension);\n  }\n\n  cardinal.tension = function(tension) {\n    return custom(+tension);\n  };\n\n  return cardinal;\n})(0));\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-shape/src/curve/cardinalClosed.js\":\n/*!*********************************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-shape/src/curve/cardinalClosed.js ***!\n  \\*********************************************************************************/\n/*! exports provided: CardinalClosed, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"CardinalClosed\", function() { return CardinalClosed; });\n/* harmony import */ var _noop_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../noop.js */ \"./node_modules/dagre-d3/node_modules/d3-shape/src/noop.js\");\n/* harmony import */ var _cardinal_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./cardinal.js */ \"./node_modules/dagre-d3/node_modules/d3-shape/src/curve/cardinal.js\");\n\n\n\nfunction CardinalClosed(context, tension) {\n  this._context = context;\n  this._k = (1 - tension) / 6;\n}\n\nCardinalClosed.prototype = {\n  areaStart: _noop_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"],\n  areaEnd: _noop_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"],\n  lineStart: function() {\n    this._x0 = this._x1 = this._x2 = this._x3 = this._x4 = this._x5 =\n    this._y0 = this._y1 = this._y2 = this._y3 = this._y4 = this._y5 = NaN;\n    this._point = 0;\n  },\n  lineEnd: function() {\n    switch (this._point) {\n      case 1: {\n        this._context.moveTo(this._x3, this._y3);\n        this._context.closePath();\n        break;\n      }\n      case 2: {\n        this._context.lineTo(this._x3, this._y3);\n        this._context.closePath();\n        break;\n      }\n      case 3: {\n        this.point(this._x3, this._y3);\n        this.point(this._x4, this._y4);\n        this.point(this._x5, this._y5);\n        break;\n      }\n    }\n  },\n  point: function(x, y) {\n    x = +x, y = +y;\n    switch (this._point) {\n      case 0: this._point = 1; this._x3 = x, this._y3 = y; break;\n      case 1: this._point = 2; this._context.moveTo(this._x4 = x, this._y4 = y); break;\n      case 2: this._point = 3; this._x5 = x, this._y5 = y; break;\n      default: Object(_cardinal_js__WEBPACK_IMPORTED_MODULE_1__[\"point\"])(this, x, y); break;\n    }\n    this._x0 = this._x1, this._x1 = this._x2, this._x2 = x;\n    this._y0 = this._y1, this._y1 = this._y2, this._y2 = y;\n  }\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ((function custom(tension) {\n\n  function cardinal(context) {\n    return new CardinalClosed(context, tension);\n  }\n\n  cardinal.tension = function(tension) {\n    return custom(+tension);\n  };\n\n  return cardinal;\n})(0));\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-shape/src/curve/cardinalOpen.js\":\n/*!*******************************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-shape/src/curve/cardinalOpen.js ***!\n  \\*******************************************************************************/\n/*! exports provided: CardinalOpen, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"CardinalOpen\", function() { return CardinalOpen; });\n/* harmony import */ var _cardinal_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./cardinal.js */ \"./node_modules/dagre-d3/node_modules/d3-shape/src/curve/cardinal.js\");\n\n\nfunction CardinalOpen(context, tension) {\n  this._context = context;\n  this._k = (1 - tension) / 6;\n}\n\nCardinalOpen.prototype = {\n  areaStart: function() {\n    this._line = 0;\n  },\n  areaEnd: function() {\n    this._line = NaN;\n  },\n  lineStart: function() {\n    this._x0 = this._x1 = this._x2 =\n    this._y0 = this._y1 = this._y2 = NaN;\n    this._point = 0;\n  },\n  lineEnd: function() {\n    if (this._line || (this._line !== 0 && this._point === 3)) this._context.closePath();\n    this._line = 1 - this._line;\n  },\n  point: function(x, y) {\n    x = +x, y = +y;\n    switch (this._point) {\n      case 0: this._point = 1; break;\n      case 1: this._point = 2; break;\n      case 2: this._point = 3; this._line ? this._context.lineTo(this._x2, this._y2) : this._context.moveTo(this._x2, this._y2); break;\n      case 3: this._point = 4; // proceed\n      default: Object(_cardinal_js__WEBPACK_IMPORTED_MODULE_0__[\"point\"])(this, x, y); break;\n    }\n    this._x0 = this._x1, this._x1 = this._x2, this._x2 = x;\n    this._y0 = this._y1, this._y1 = this._y2, this._y2 = y;\n  }\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ((function custom(tension) {\n\n  function cardinal(context) {\n    return new CardinalOpen(context, tension);\n  }\n\n  cardinal.tension = function(tension) {\n    return custom(+tension);\n  };\n\n  return cardinal;\n})(0));\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-shape/src/curve/catmullRom.js\":\n/*!*****************************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-shape/src/curve/catmullRom.js ***!\n  \\*****************************************************************************/\n/*! exports provided: point, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"point\", function() { return point; });\n/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../math.js */ \"./node_modules/dagre-d3/node_modules/d3-shape/src/math.js\");\n/* harmony import */ var _cardinal_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./cardinal.js */ \"./node_modules/dagre-d3/node_modules/d3-shape/src/curve/cardinal.js\");\n\n\n\nfunction point(that, x, y) {\n  var x1 = that._x1,\n      y1 = that._y1,\n      x2 = that._x2,\n      y2 = that._y2;\n\n  if (that._l01_a > _math_js__WEBPACK_IMPORTED_MODULE_0__[\"epsilon\"]) {\n    var a = 2 * that._l01_2a + 3 * that._l01_a * that._l12_a + that._l12_2a,\n        n = 3 * that._l01_a * (that._l01_a + that._l12_a);\n    x1 = (x1 * a - that._x0 * that._l12_2a + that._x2 * that._l01_2a) / n;\n    y1 = (y1 * a - that._y0 * that._l12_2a + that._y2 * that._l01_2a) / n;\n  }\n\n  if (that._l23_a > _math_js__WEBPACK_IMPORTED_MODULE_0__[\"epsilon\"]) {\n    var b = 2 * that._l23_2a + 3 * that._l23_a * that._l12_a + that._l12_2a,\n        m = 3 * that._l23_a * (that._l23_a + that._l12_a);\n    x2 = (x2 * b + that._x1 * that._l23_2a - x * that._l12_2a) / m;\n    y2 = (y2 * b + that._y1 * that._l23_2a - y * that._l12_2a) / m;\n  }\n\n  that._context.bezierCurveTo(x1, y1, x2, y2, that._x2, that._y2);\n}\n\nfunction CatmullRom(context, alpha) {\n  this._context = context;\n  this._alpha = alpha;\n}\n\nCatmullRom.prototype = {\n  areaStart: function() {\n    this._line = 0;\n  },\n  areaEnd: function() {\n    this._line = NaN;\n  },\n  lineStart: function() {\n    this._x0 = this._x1 = this._x2 =\n    this._y0 = this._y1 = this._y2 = NaN;\n    this._l01_a = this._l12_a = this._l23_a =\n    this._l01_2a = this._l12_2a = this._l23_2a =\n    this._point = 0;\n  },\n  lineEnd: function() {\n    switch (this._point) {\n      case 2: this._context.lineTo(this._x2, this._y2); break;\n      case 3: this.point(this._x2, this._y2); break;\n    }\n    if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath();\n    this._line = 1 - this._line;\n  },\n  point: function(x, y) {\n    x = +x, y = +y;\n\n    if (this._point) {\n      var x23 = this._x2 - x,\n          y23 = this._y2 - y;\n      this._l23_a = Math.sqrt(this._l23_2a = Math.pow(x23 * x23 + y23 * y23, this._alpha));\n    }\n\n    switch (this._point) {\n      case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break;\n      case 1: this._point = 2; break;\n      case 2: this._point = 3; // proceed\n      default: point(this, x, y); break;\n    }\n\n    this._l01_a = this._l12_a, this._l12_a = this._l23_a;\n    this._l01_2a = this._l12_2a, this._l12_2a = this._l23_2a;\n    this._x0 = this._x1, this._x1 = this._x2, this._x2 = x;\n    this._y0 = this._y1, this._y1 = this._y2, this._y2 = y;\n  }\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ((function custom(alpha) {\n\n  function catmullRom(context) {\n    return alpha ? new CatmullRom(context, alpha) : new _cardinal_js__WEBPACK_IMPORTED_MODULE_1__[\"Cardinal\"](context, 0);\n  }\n\n  catmullRom.alpha = function(alpha) {\n    return custom(+alpha);\n  };\n\n  return catmullRom;\n})(0.5));\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-shape/src/curve/catmullRomClosed.js\":\n/*!***********************************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-shape/src/curve/catmullRomClosed.js ***!\n  \\***********************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _cardinalClosed_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./cardinalClosed.js */ \"./node_modules/dagre-d3/node_modules/d3-shape/src/curve/cardinalClosed.js\");\n/* harmony import */ var _noop_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../noop.js */ \"./node_modules/dagre-d3/node_modules/d3-shape/src/noop.js\");\n/* harmony import */ var _catmullRom_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./catmullRom.js */ \"./node_modules/dagre-d3/node_modules/d3-shape/src/curve/catmullRom.js\");\n\n\n\n\nfunction CatmullRomClosed(context, alpha) {\n  this._context = context;\n  this._alpha = alpha;\n}\n\nCatmullRomClosed.prototype = {\n  areaStart: _noop_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"],\n  areaEnd: _noop_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"],\n  lineStart: function() {\n    this._x0 = this._x1 = this._x2 = this._x3 = this._x4 = this._x5 =\n    this._y0 = this._y1 = this._y2 = this._y3 = this._y4 = this._y5 = NaN;\n    this._l01_a = this._l12_a = this._l23_a =\n    this._l01_2a = this._l12_2a = this._l23_2a =\n    this._point = 0;\n  },\n  lineEnd: function() {\n    switch (this._point) {\n      case 1: {\n        this._context.moveTo(this._x3, this._y3);\n        this._context.closePath();\n        break;\n      }\n      case 2: {\n        this._context.lineTo(this._x3, this._y3);\n        this._context.closePath();\n        break;\n      }\n      case 3: {\n        this.point(this._x3, this._y3);\n        this.point(this._x4, this._y4);\n        this.point(this._x5, this._y5);\n        break;\n      }\n    }\n  },\n  point: function(x, y) {\n    x = +x, y = +y;\n\n    if (this._point) {\n      var x23 = this._x2 - x,\n          y23 = this._y2 - y;\n      this._l23_a = Math.sqrt(this._l23_2a = Math.pow(x23 * x23 + y23 * y23, this._alpha));\n    }\n\n    switch (this._point) {\n      case 0: this._point = 1; this._x3 = x, this._y3 = y; break;\n      case 1: this._point = 2; this._context.moveTo(this._x4 = x, this._y4 = y); break;\n      case 2: this._point = 3; this._x5 = x, this._y5 = y; break;\n      default: Object(_catmullRom_js__WEBPACK_IMPORTED_MODULE_2__[\"point\"])(this, x, y); break;\n    }\n\n    this._l01_a = this._l12_a, this._l12_a = this._l23_a;\n    this._l01_2a = this._l12_2a, this._l12_2a = this._l23_2a;\n    this._x0 = this._x1, this._x1 = this._x2, this._x2 = x;\n    this._y0 = this._y1, this._y1 = this._y2, this._y2 = y;\n  }\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ((function custom(alpha) {\n\n  function catmullRom(context) {\n    return alpha ? new CatmullRomClosed(context, alpha) : new _cardinalClosed_js__WEBPACK_IMPORTED_MODULE_0__[\"CardinalClosed\"](context, 0);\n  }\n\n  catmullRom.alpha = function(alpha) {\n    return custom(+alpha);\n  };\n\n  return catmullRom;\n})(0.5));\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-shape/src/curve/catmullRomOpen.js\":\n/*!*********************************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-shape/src/curve/catmullRomOpen.js ***!\n  \\*********************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _cardinalOpen_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./cardinalOpen.js */ \"./node_modules/dagre-d3/node_modules/d3-shape/src/curve/cardinalOpen.js\");\n/* harmony import */ var _catmullRom_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./catmullRom.js */ \"./node_modules/dagre-d3/node_modules/d3-shape/src/curve/catmullRom.js\");\n\n\n\nfunction CatmullRomOpen(context, alpha) {\n  this._context = context;\n  this._alpha = alpha;\n}\n\nCatmullRomOpen.prototype = {\n  areaStart: function() {\n    this._line = 0;\n  },\n  areaEnd: function() {\n    this._line = NaN;\n  },\n  lineStart: function() {\n    this._x0 = this._x1 = this._x2 =\n    this._y0 = this._y1 = this._y2 = NaN;\n    this._l01_a = this._l12_a = this._l23_a =\n    this._l01_2a = this._l12_2a = this._l23_2a =\n    this._point = 0;\n  },\n  lineEnd: function() {\n    if (this._line || (this._line !== 0 && this._point === 3)) this._context.closePath();\n    this._line = 1 - this._line;\n  },\n  point: function(x, y) {\n    x = +x, y = +y;\n\n    if (this._point) {\n      var x23 = this._x2 - x,\n          y23 = this._y2 - y;\n      this._l23_a = Math.sqrt(this._l23_2a = Math.pow(x23 * x23 + y23 * y23, this._alpha));\n    }\n\n    switch (this._point) {\n      case 0: this._point = 1; break;\n      case 1: this._point = 2; break;\n      case 2: this._point = 3; this._line ? this._context.lineTo(this._x2, this._y2) : this._context.moveTo(this._x2, this._y2); break;\n      case 3: this._point = 4; // proceed\n      default: Object(_catmullRom_js__WEBPACK_IMPORTED_MODULE_1__[\"point\"])(this, x, y); break;\n    }\n\n    this._l01_a = this._l12_a, this._l12_a = this._l23_a;\n    this._l01_2a = this._l12_2a, this._l12_2a = this._l23_2a;\n    this._x0 = this._x1, this._x1 = this._x2, this._x2 = x;\n    this._y0 = this._y1, this._y1 = this._y2, this._y2 = y;\n  }\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ((function custom(alpha) {\n\n  function catmullRom(context) {\n    return alpha ? new CatmullRomOpen(context, alpha) : new _cardinalOpen_js__WEBPACK_IMPORTED_MODULE_0__[\"CardinalOpen\"](context, 0);\n  }\n\n  catmullRom.alpha = function(alpha) {\n    return custom(+alpha);\n  };\n\n  return catmullRom;\n})(0.5));\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-shape/src/curve/linear.js\":\n/*!*************************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-shape/src/curve/linear.js ***!\n  \\*************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\nfunction Linear(context) {\n  this._context = context;\n}\n\nLinear.prototype = {\n  areaStart: function() {\n    this._line = 0;\n  },\n  areaEnd: function() {\n    this._line = NaN;\n  },\n  lineStart: function() {\n    this._point = 0;\n  },\n  lineEnd: function() {\n    if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath();\n    this._line = 1 - this._line;\n  },\n  point: function(x, y) {\n    x = +x, y = +y;\n    switch (this._point) {\n      case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break;\n      case 1: this._point = 2; // proceed\n      default: this._context.lineTo(x, y); break;\n    }\n  }\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(context) {\n  return new Linear(context);\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-shape/src/curve/linearClosed.js\":\n/*!*******************************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-shape/src/curve/linearClosed.js ***!\n  \\*******************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _noop_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../noop.js */ \"./node_modules/dagre-d3/node_modules/d3-shape/src/noop.js\");\n\n\nfunction LinearClosed(context) {\n  this._context = context;\n}\n\nLinearClosed.prototype = {\n  areaStart: _noop_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"],\n  areaEnd: _noop_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"],\n  lineStart: function() {\n    this._point = 0;\n  },\n  lineEnd: function() {\n    if (this._point) this._context.closePath();\n  },\n  point: function(x, y) {\n    x = +x, y = +y;\n    if (this._point) this._context.lineTo(x, y);\n    else this._point = 1, this._context.moveTo(x, y);\n  }\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(context) {\n  return new LinearClosed(context);\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-shape/src/curve/monotone.js\":\n/*!***************************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-shape/src/curve/monotone.js ***!\n  \\***************************************************************************/\n/*! exports provided: monotoneX, monotoneY */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"monotoneX\", function() { return monotoneX; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"monotoneY\", function() { return monotoneY; });\nfunction sign(x) {\n  return x < 0 ? -1 : 1;\n}\n\n// Calculate the slopes of the tangents (Hermite-type interpolation) based on\n// the following paper: Steffen, M. 1990. A Simple Method for Monotonic\n// Interpolation in One Dimension. Astronomy and Astrophysics, Vol. 239, NO.\n// NOV(II), P. 443, 1990.\nfunction slope3(that, x2, y2) {\n  var h0 = that._x1 - that._x0,\n      h1 = x2 - that._x1,\n      s0 = (that._y1 - that._y0) / (h0 || h1 < 0 && -0),\n      s1 = (y2 - that._y1) / (h1 || h0 < 0 && -0),\n      p = (s0 * h1 + s1 * h0) / (h0 + h1);\n  return (sign(s0) + sign(s1)) * Math.min(Math.abs(s0), Math.abs(s1), 0.5 * Math.abs(p)) || 0;\n}\n\n// Calculate a one-sided slope.\nfunction slope2(that, t) {\n  var h = that._x1 - that._x0;\n  return h ? (3 * (that._y1 - that._y0) / h - t) / 2 : t;\n}\n\n// According to https://en.wikipedia.org/wiki/Cubic_Hermite_spline#Representations\n// \"you can express cubic Hermite interpolation in terms of cubic Bézier curves\n// with respect to the four values p0, p0 + m0 / 3, p1 - m1 / 3, p1\".\nfunction point(that, t0, t1) {\n  var x0 = that._x0,\n      y0 = that._y0,\n      x1 = that._x1,\n      y1 = that._y1,\n      dx = (x1 - x0) / 3;\n  that._context.bezierCurveTo(x0 + dx, y0 + dx * t0, x1 - dx, y1 - dx * t1, x1, y1);\n}\n\nfunction MonotoneX(context) {\n  this._context = context;\n}\n\nMonotoneX.prototype = {\n  areaStart: function() {\n    this._line = 0;\n  },\n  areaEnd: function() {\n    this._line = NaN;\n  },\n  lineStart: function() {\n    this._x0 = this._x1 =\n    this._y0 = this._y1 =\n    this._t0 = NaN;\n    this._point = 0;\n  },\n  lineEnd: function() {\n    switch (this._point) {\n      case 2: this._context.lineTo(this._x1, this._y1); break;\n      case 3: point(this, this._t0, slope2(this, this._t0)); break;\n    }\n    if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath();\n    this._line = 1 - this._line;\n  },\n  point: function(x, y) {\n    var t1 = NaN;\n\n    x = +x, y = +y;\n    if (x === this._x1 && y === this._y1) return; // Ignore coincident points.\n    switch (this._point) {\n      case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break;\n      case 1: this._point = 2; break;\n      case 2: this._point = 3; point(this, slope2(this, t1 = slope3(this, x, y)), t1); break;\n      default: point(this, this._t0, t1 = slope3(this, x, y)); break;\n    }\n\n    this._x0 = this._x1, this._x1 = x;\n    this._y0 = this._y1, this._y1 = y;\n    this._t0 = t1;\n  }\n}\n\nfunction MonotoneY(context) {\n  this._context = new ReflectContext(context);\n}\n\n(MonotoneY.prototype = Object.create(MonotoneX.prototype)).point = function(x, y) {\n  MonotoneX.prototype.point.call(this, y, x);\n};\n\nfunction ReflectContext(context) {\n  this._context = context;\n}\n\nReflectContext.prototype = {\n  moveTo: function(x, y) { this._context.moveTo(y, x); },\n  closePath: function() { this._context.closePath(); },\n  lineTo: function(x, y) { this._context.lineTo(y, x); },\n  bezierCurveTo: function(x1, y1, x2, y2, x, y) { this._context.bezierCurveTo(y1, x1, y2, x2, y, x); }\n};\n\nfunction monotoneX(context) {\n  return new MonotoneX(context);\n}\n\nfunction monotoneY(context) {\n  return new MonotoneY(context);\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-shape/src/curve/natural.js\":\n/*!**************************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-shape/src/curve/natural.js ***!\n  \\**************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\nfunction Natural(context) {\n  this._context = context;\n}\n\nNatural.prototype = {\n  areaStart: function() {\n    this._line = 0;\n  },\n  areaEnd: function() {\n    this._line = NaN;\n  },\n  lineStart: function() {\n    this._x = [];\n    this._y = [];\n  },\n  lineEnd: function() {\n    var x = this._x,\n        y = this._y,\n        n = x.length;\n\n    if (n) {\n      this._line ? this._context.lineTo(x[0], y[0]) : this._context.moveTo(x[0], y[0]);\n      if (n === 2) {\n        this._context.lineTo(x[1], y[1]);\n      } else {\n        var px = controlPoints(x),\n            py = controlPoints(y);\n        for (var i0 = 0, i1 = 1; i1 < n; ++i0, ++i1) {\n          this._context.bezierCurveTo(px[0][i0], py[0][i0], px[1][i0], py[1][i0], x[i1], y[i1]);\n        }\n      }\n    }\n\n    if (this._line || (this._line !== 0 && n === 1)) this._context.closePath();\n    this._line = 1 - this._line;\n    this._x = this._y = null;\n  },\n  point: function(x, y) {\n    this._x.push(+x);\n    this._y.push(+y);\n  }\n};\n\n// See https://www.particleincell.com/2012/bezier-splines/ for derivation.\nfunction controlPoints(x) {\n  var i,\n      n = x.length - 1,\n      m,\n      a = new Array(n),\n      b = new Array(n),\n      r = new Array(n);\n  a[0] = 0, b[0] = 2, r[0] = x[0] + 2 * x[1];\n  for (i = 1; i < n - 1; ++i) a[i] = 1, b[i] = 4, r[i] = 4 * x[i] + 2 * x[i + 1];\n  a[n - 1] = 2, b[n - 1] = 7, r[n - 1] = 8 * x[n - 1] + x[n];\n  for (i = 1; i < n; ++i) m = a[i] / b[i - 1], b[i] -= m, r[i] -= m * r[i - 1];\n  a[n - 1] = r[n - 1] / b[n - 1];\n  for (i = n - 2; i >= 0; --i) a[i] = (r[i] - a[i + 1]) / b[i];\n  b[n - 1] = (x[n] + a[n - 1]) / 2;\n  for (i = 0; i < n - 1; ++i) b[i] = 2 * x[i + 1] - a[i + 1];\n  return [a, b];\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(context) {\n  return new Natural(context);\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-shape/src/curve/radial.js\":\n/*!*************************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-shape/src/curve/radial.js ***!\n  \\*************************************************************************/\n/*! exports provided: curveRadialLinear, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"curveRadialLinear\", function() { return curveRadialLinear; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return curveRadial; });\n/* harmony import */ var _linear_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./linear.js */ \"./node_modules/dagre-d3/node_modules/d3-shape/src/curve/linear.js\");\n\n\nvar curveRadialLinear = curveRadial(_linear_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]);\n\nfunction Radial(curve) {\n  this._curve = curve;\n}\n\nRadial.prototype = {\n  areaStart: function() {\n    this._curve.areaStart();\n  },\n  areaEnd: function() {\n    this._curve.areaEnd();\n  },\n  lineStart: function() {\n    this._curve.lineStart();\n  },\n  lineEnd: function() {\n    this._curve.lineEnd();\n  },\n  point: function(a, r) {\n    this._curve.point(r * Math.sin(a), r * -Math.cos(a));\n  }\n};\n\nfunction curveRadial(curve) {\n\n  function radial(context) {\n    return new Radial(curve(context));\n  }\n\n  radial._curve = curve;\n\n  return radial;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-shape/src/curve/step.js\":\n/*!***********************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-shape/src/curve/step.js ***!\n  \\***********************************************************************/\n/*! exports provided: default, stepBefore, stepAfter */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"stepBefore\", function() { return stepBefore; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"stepAfter\", function() { return stepAfter; });\nfunction Step(context, t) {\n  this._context = context;\n  this._t = t;\n}\n\nStep.prototype = {\n  areaStart: function() {\n    this._line = 0;\n  },\n  areaEnd: function() {\n    this._line = NaN;\n  },\n  lineStart: function() {\n    this._x = this._y = NaN;\n    this._point = 0;\n  },\n  lineEnd: function() {\n    if (0 < this._t && this._t < 1 && this._point === 2) this._context.lineTo(this._x, this._y);\n    if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath();\n    if (this._line >= 0) this._t = 1 - this._t, this._line = 1 - this._line;\n  },\n  point: function(x, y) {\n    x = +x, y = +y;\n    switch (this._point) {\n      case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break;\n      case 1: this._point = 2; // proceed\n      default: {\n        if (this._t <= 0) {\n          this._context.lineTo(this._x, y);\n          this._context.lineTo(x, y);\n        } else {\n          var x1 = this._x * (1 - this._t) + x * this._t;\n          this._context.lineTo(x1, this._y);\n          this._context.lineTo(x1, y);\n        }\n        break;\n      }\n    }\n    this._x = x, this._y = y;\n  }\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(context) {\n  return new Step(context, 0.5);\n});\n\nfunction stepBefore(context) {\n  return new Step(context, 0);\n}\n\nfunction stepAfter(context) {\n  return new Step(context, 1);\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-shape/src/descending.js\":\n/*!***********************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-shape/src/descending.js ***!\n  \\***********************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(a, b) {\n  return b < a ? -1 : b > a ? 1 : b >= a ? 0 : NaN;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-shape/src/identity.js\":\n/*!*********************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-shape/src/identity.js ***!\n  \\*********************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(d) {\n  return d;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-shape/src/index.js\":\n/*!******************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-shape/src/index.js ***!\n  \\******************************************************************/\n/*! exports provided: arc, area, line, pie, areaRadial, radialArea, lineRadial, radialLine, pointRadial, linkHorizontal, linkVertical, linkRadial, symbol, symbols, symbolCircle, symbolCross, symbolDiamond, symbolSquare, symbolStar, symbolTriangle, symbolWye, curveBasisClosed, curveBasisOpen, curveBasis, curveBundle, curveCardinalClosed, curveCardinalOpen, curveCardinal, curveCatmullRomClosed, curveCatmullRomOpen, curveCatmullRom, curveLinearClosed, curveLinear, curveMonotoneX, curveMonotoneY, curveNatural, curveStep, curveStepAfter, curveStepBefore, stack, stackOffsetExpand, stackOffsetDiverging, stackOffsetNone, stackOffsetSilhouette, stackOffsetWiggle, stackOrderAppearance, stackOrderAscending, stackOrderDescending, stackOrderInsideOut, stackOrderNone, stackOrderReverse */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _arc_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./arc.js */ \"./node_modules/dagre-d3/node_modules/d3-shape/src/arc.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"arc\", function() { return _arc_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n/* harmony import */ var _area_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./area.js */ \"./node_modules/dagre-d3/node_modules/d3-shape/src/area.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"area\", function() { return _area_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"]; });\n\n/* harmony import */ var _line_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./line.js */ \"./node_modules/dagre-d3/node_modules/d3-shape/src/line.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"line\", function() { return _line_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"]; });\n\n/* harmony import */ var _pie_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./pie.js */ \"./node_modules/dagre-d3/node_modules/d3-shape/src/pie.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"pie\", function() { return _pie_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"]; });\n\n/* harmony import */ var _areaRadial_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./areaRadial.js */ \"./node_modules/dagre-d3/node_modules/d3-shape/src/areaRadial.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"areaRadial\", function() { return _areaRadial_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"radialArea\", function() { return _areaRadial_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"]; });\n\n/* harmony import */ var _lineRadial_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./lineRadial.js */ \"./node_modules/dagre-d3/node_modules/d3-shape/src/lineRadial.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"lineRadial\", function() { return _lineRadial_js__WEBPACK_IMPORTED_MODULE_5__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"radialLine\", function() { return _lineRadial_js__WEBPACK_IMPORTED_MODULE_5__[\"default\"]; });\n\n/* harmony import */ var _pointRadial_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./pointRadial.js */ \"./node_modules/dagre-d3/node_modules/d3-shape/src/pointRadial.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"pointRadial\", function() { return _pointRadial_js__WEBPACK_IMPORTED_MODULE_6__[\"default\"]; });\n\n/* harmony import */ var _link_index_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./link/index.js */ \"./node_modules/dagre-d3/node_modules/d3-shape/src/link/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"linkHorizontal\", function() { return _link_index_js__WEBPACK_IMPORTED_MODULE_7__[\"linkHorizontal\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"linkVertical\", function() { return _link_index_js__WEBPACK_IMPORTED_MODULE_7__[\"linkVertical\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"linkRadial\", function() { return _link_index_js__WEBPACK_IMPORTED_MODULE_7__[\"linkRadial\"]; });\n\n/* harmony import */ var _symbol_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./symbol.js */ \"./node_modules/dagre-d3/node_modules/d3-shape/src/symbol.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"symbol\", function() { return _symbol_js__WEBPACK_IMPORTED_MODULE_8__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"symbols\", function() { return _symbol_js__WEBPACK_IMPORTED_MODULE_8__[\"symbols\"]; });\n\n/* harmony import */ var _symbol_circle_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./symbol/circle.js */ \"./node_modules/dagre-d3/node_modules/d3-shape/src/symbol/circle.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"symbolCircle\", function() { return _symbol_circle_js__WEBPACK_IMPORTED_MODULE_9__[\"default\"]; });\n\n/* harmony import */ var _symbol_cross_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./symbol/cross.js */ \"./node_modules/dagre-d3/node_modules/d3-shape/src/symbol/cross.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"symbolCross\", function() { return _symbol_cross_js__WEBPACK_IMPORTED_MODULE_10__[\"default\"]; });\n\n/* harmony import */ var _symbol_diamond_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./symbol/diamond.js */ \"./node_modules/dagre-d3/node_modules/d3-shape/src/symbol/diamond.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"symbolDiamond\", function() { return _symbol_diamond_js__WEBPACK_IMPORTED_MODULE_11__[\"default\"]; });\n\n/* harmony import */ var _symbol_square_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./symbol/square.js */ \"./node_modules/dagre-d3/node_modules/d3-shape/src/symbol/square.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"symbolSquare\", function() { return _symbol_square_js__WEBPACK_IMPORTED_MODULE_12__[\"default\"]; });\n\n/* harmony import */ var _symbol_star_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./symbol/star.js */ \"./node_modules/dagre-d3/node_modules/d3-shape/src/symbol/star.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"symbolStar\", function() { return _symbol_star_js__WEBPACK_IMPORTED_MODULE_13__[\"default\"]; });\n\n/* harmony import */ var _symbol_triangle_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./symbol/triangle.js */ \"./node_modules/dagre-d3/node_modules/d3-shape/src/symbol/triangle.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"symbolTriangle\", function() { return _symbol_triangle_js__WEBPACK_IMPORTED_MODULE_14__[\"default\"]; });\n\n/* harmony import */ var _symbol_wye_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./symbol/wye.js */ \"./node_modules/dagre-d3/node_modules/d3-shape/src/symbol/wye.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"symbolWye\", function() { return _symbol_wye_js__WEBPACK_IMPORTED_MODULE_15__[\"default\"]; });\n\n/* harmony import */ var _curve_basisClosed_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./curve/basisClosed.js */ \"./node_modules/dagre-d3/node_modules/d3-shape/src/curve/basisClosed.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"curveBasisClosed\", function() { return _curve_basisClosed_js__WEBPACK_IMPORTED_MODULE_16__[\"default\"]; });\n\n/* harmony import */ var _curve_basisOpen_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./curve/basisOpen.js */ \"./node_modules/dagre-d3/node_modules/d3-shape/src/curve/basisOpen.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"curveBasisOpen\", function() { return _curve_basisOpen_js__WEBPACK_IMPORTED_MODULE_17__[\"default\"]; });\n\n/* harmony import */ var _curve_basis_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./curve/basis.js */ \"./node_modules/dagre-d3/node_modules/d3-shape/src/curve/basis.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"curveBasis\", function() { return _curve_basis_js__WEBPACK_IMPORTED_MODULE_18__[\"default\"]; });\n\n/* harmony import */ var _curve_bundle_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./curve/bundle.js */ \"./node_modules/dagre-d3/node_modules/d3-shape/src/curve/bundle.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"curveBundle\", function() { return _curve_bundle_js__WEBPACK_IMPORTED_MODULE_19__[\"default\"]; });\n\n/* harmony import */ var _curve_cardinalClosed_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./curve/cardinalClosed.js */ \"./node_modules/dagre-d3/node_modules/d3-shape/src/curve/cardinalClosed.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"curveCardinalClosed\", function() { return _curve_cardinalClosed_js__WEBPACK_IMPORTED_MODULE_20__[\"default\"]; });\n\n/* harmony import */ var _curve_cardinalOpen_js__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./curve/cardinalOpen.js */ \"./node_modules/dagre-d3/node_modules/d3-shape/src/curve/cardinalOpen.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"curveCardinalOpen\", function() { return _curve_cardinalOpen_js__WEBPACK_IMPORTED_MODULE_21__[\"default\"]; });\n\n/* harmony import */ var _curve_cardinal_js__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./curve/cardinal.js */ \"./node_modules/dagre-d3/node_modules/d3-shape/src/curve/cardinal.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"curveCardinal\", function() { return _curve_cardinal_js__WEBPACK_IMPORTED_MODULE_22__[\"default\"]; });\n\n/* harmony import */ var _curve_catmullRomClosed_js__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./curve/catmullRomClosed.js */ \"./node_modules/dagre-d3/node_modules/d3-shape/src/curve/catmullRomClosed.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"curveCatmullRomClosed\", function() { return _curve_catmullRomClosed_js__WEBPACK_IMPORTED_MODULE_23__[\"default\"]; });\n\n/* harmony import */ var _curve_catmullRomOpen_js__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ./curve/catmullRomOpen.js */ \"./node_modules/dagre-d3/node_modules/d3-shape/src/curve/catmullRomOpen.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"curveCatmullRomOpen\", function() { return _curve_catmullRomOpen_js__WEBPACK_IMPORTED_MODULE_24__[\"default\"]; });\n\n/* harmony import */ var _curve_catmullRom_js__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ./curve/catmullRom.js */ \"./node_modules/dagre-d3/node_modules/d3-shape/src/curve/catmullRom.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"curveCatmullRom\", function() { return _curve_catmullRom_js__WEBPACK_IMPORTED_MODULE_25__[\"default\"]; });\n\n/* harmony import */ var _curve_linearClosed_js__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ./curve/linearClosed.js */ \"./node_modules/dagre-d3/node_modules/d3-shape/src/curve/linearClosed.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"curveLinearClosed\", function() { return _curve_linearClosed_js__WEBPACK_IMPORTED_MODULE_26__[\"default\"]; });\n\n/* harmony import */ var _curve_linear_js__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ./curve/linear.js */ \"./node_modules/dagre-d3/node_modules/d3-shape/src/curve/linear.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"curveLinear\", function() { return _curve_linear_js__WEBPACK_IMPORTED_MODULE_27__[\"default\"]; });\n\n/* harmony import */ var _curve_monotone_js__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ./curve/monotone.js */ \"./node_modules/dagre-d3/node_modules/d3-shape/src/curve/monotone.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"curveMonotoneX\", function() { return _curve_monotone_js__WEBPACK_IMPORTED_MODULE_28__[\"monotoneX\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"curveMonotoneY\", function() { return _curve_monotone_js__WEBPACK_IMPORTED_MODULE_28__[\"monotoneY\"]; });\n\n/* harmony import */ var _curve_natural_js__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ./curve/natural.js */ \"./node_modules/dagre-d3/node_modules/d3-shape/src/curve/natural.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"curveNatural\", function() { return _curve_natural_js__WEBPACK_IMPORTED_MODULE_29__[\"default\"]; });\n\n/* harmony import */ var _curve_step_js__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ./curve/step.js */ \"./node_modules/dagre-d3/node_modules/d3-shape/src/curve/step.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"curveStep\", function() { return _curve_step_js__WEBPACK_IMPORTED_MODULE_30__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"curveStepAfter\", function() { return _curve_step_js__WEBPACK_IMPORTED_MODULE_30__[\"stepAfter\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"curveStepBefore\", function() { return _curve_step_js__WEBPACK_IMPORTED_MODULE_30__[\"stepBefore\"]; });\n\n/* harmony import */ var _stack_js__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ./stack.js */ \"./node_modules/dagre-d3/node_modules/d3-shape/src/stack.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"stack\", function() { return _stack_js__WEBPACK_IMPORTED_MODULE_31__[\"default\"]; });\n\n/* harmony import */ var _offset_expand_js__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ./offset/expand.js */ \"./node_modules/dagre-d3/node_modules/d3-shape/src/offset/expand.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"stackOffsetExpand\", function() { return _offset_expand_js__WEBPACK_IMPORTED_MODULE_32__[\"default\"]; });\n\n/* harmony import */ var _offset_diverging_js__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! ./offset/diverging.js */ \"./node_modules/dagre-d3/node_modules/d3-shape/src/offset/diverging.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"stackOffsetDiverging\", function() { return _offset_diverging_js__WEBPACK_IMPORTED_MODULE_33__[\"default\"]; });\n\n/* harmony import */ var _offset_none_js__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! ./offset/none.js */ \"./node_modules/dagre-d3/node_modules/d3-shape/src/offset/none.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"stackOffsetNone\", function() { return _offset_none_js__WEBPACK_IMPORTED_MODULE_34__[\"default\"]; });\n\n/* harmony import */ var _offset_silhouette_js__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(/*! ./offset/silhouette.js */ \"./node_modules/dagre-d3/node_modules/d3-shape/src/offset/silhouette.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"stackOffsetSilhouette\", function() { return _offset_silhouette_js__WEBPACK_IMPORTED_MODULE_35__[\"default\"]; });\n\n/* harmony import */ var _offset_wiggle_js__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(/*! ./offset/wiggle.js */ \"./node_modules/dagre-d3/node_modules/d3-shape/src/offset/wiggle.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"stackOffsetWiggle\", function() { return _offset_wiggle_js__WEBPACK_IMPORTED_MODULE_36__[\"default\"]; });\n\n/* harmony import */ var _order_appearance_js__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(/*! ./order/appearance.js */ \"./node_modules/dagre-d3/node_modules/d3-shape/src/order/appearance.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"stackOrderAppearance\", function() { return _order_appearance_js__WEBPACK_IMPORTED_MODULE_37__[\"default\"]; });\n\n/* harmony import */ var _order_ascending_js__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(/*! ./order/ascending.js */ \"./node_modules/dagre-d3/node_modules/d3-shape/src/order/ascending.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"stackOrderAscending\", function() { return _order_ascending_js__WEBPACK_IMPORTED_MODULE_38__[\"default\"]; });\n\n/* harmony import */ var _order_descending_js__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__(/*! ./order/descending.js */ \"./node_modules/dagre-d3/node_modules/d3-shape/src/order/descending.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"stackOrderDescending\", function() { return _order_descending_js__WEBPACK_IMPORTED_MODULE_39__[\"default\"]; });\n\n/* harmony import */ var _order_insideOut_js__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__(/*! ./order/insideOut.js */ \"./node_modules/dagre-d3/node_modules/d3-shape/src/order/insideOut.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"stackOrderInsideOut\", function() { return _order_insideOut_js__WEBPACK_IMPORTED_MODULE_40__[\"default\"]; });\n\n/* harmony import */ var _order_none_js__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__(/*! ./order/none.js */ \"./node_modules/dagre-d3/node_modules/d3-shape/src/order/none.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"stackOrderNone\", function() { return _order_none_js__WEBPACK_IMPORTED_MODULE_41__[\"default\"]; });\n\n/* harmony import */ var _order_reverse_js__WEBPACK_IMPORTED_MODULE_42__ = __webpack_require__(/*! ./order/reverse.js */ \"./node_modules/dagre-d3/node_modules/d3-shape/src/order/reverse.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"stackOrderReverse\", function() { return _order_reverse_js__WEBPACK_IMPORTED_MODULE_42__[\"default\"]; });\n\n\n\n\n\n // Note: radialArea is deprecated!\n // Note: radialLine is deprecated!\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-shape/src/line.js\":\n/*!*****************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-shape/src/line.js ***!\n  \\*****************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var d3_path__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-path */ \"./node_modules/d3-path/src/index.js\");\n/* harmony import */ var _constant_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./constant.js */ \"./node_modules/dagre-d3/node_modules/d3-shape/src/constant.js\");\n/* harmony import */ var _curve_linear_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./curve/linear.js */ \"./node_modules/dagre-d3/node_modules/d3-shape/src/curve/linear.js\");\n/* harmony import */ var _point_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./point.js */ \"./node_modules/dagre-d3/node_modules/d3-shape/src/point.js\");\n\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  var x = _point_js__WEBPACK_IMPORTED_MODULE_3__[\"x\"],\n      y = _point_js__WEBPACK_IMPORTED_MODULE_3__[\"y\"],\n      defined = Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(true),\n      context = null,\n      curve = _curve_linear_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"],\n      output = null;\n\n  function line(data) {\n    var i,\n        n = data.length,\n        d,\n        defined0 = false,\n        buffer;\n\n    if (context == null) output = curve(buffer = Object(d3_path__WEBPACK_IMPORTED_MODULE_0__[\"path\"])());\n\n    for (i = 0; i <= n; ++i) {\n      if (!(i < n && defined(d = data[i], i, data)) === defined0) {\n        if (defined0 = !defined0) output.lineStart();\n        else output.lineEnd();\n      }\n      if (defined0) output.point(+x(d, i, data), +y(d, i, data));\n    }\n\n    if (buffer) return output = null, buffer + \"\" || null;\n  }\n\n  line.x = function(_) {\n    return arguments.length ? (x = typeof _ === \"function\" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(+_), line) : x;\n  };\n\n  line.y = function(_) {\n    return arguments.length ? (y = typeof _ === \"function\" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(+_), line) : y;\n  };\n\n  line.defined = function(_) {\n    return arguments.length ? (defined = typeof _ === \"function\" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(!!_), line) : defined;\n  };\n\n  line.curve = function(_) {\n    return arguments.length ? (curve = _, context != null && (output = curve(context)), line) : curve;\n  };\n\n  line.context = function(_) {\n    return arguments.length ? (_ == null ? context = output = null : output = curve(context = _), line) : context;\n  };\n\n  return line;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-shape/src/lineRadial.js\":\n/*!***********************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-shape/src/lineRadial.js ***!\n  \\***********************************************************************/\n/*! exports provided: lineRadial, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"lineRadial\", function() { return lineRadial; });\n/* harmony import */ var _curve_radial_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./curve/radial.js */ \"./node_modules/dagre-d3/node_modules/d3-shape/src/curve/radial.js\");\n/* harmony import */ var _line_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./line.js */ \"./node_modules/dagre-d3/node_modules/d3-shape/src/line.js\");\n\n\n\nfunction lineRadial(l) {\n  var c = l.curve;\n\n  l.angle = l.x, delete l.x;\n  l.radius = l.y, delete l.y;\n\n  l.curve = function(_) {\n    return arguments.length ? c(Object(_curve_radial_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(_)) : c()._curve;\n  };\n\n  return l;\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  return lineRadial(Object(_line_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])().curve(_curve_radial_js__WEBPACK_IMPORTED_MODULE_0__[\"curveRadialLinear\"]));\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-shape/src/link/index.js\":\n/*!***********************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-shape/src/link/index.js ***!\n  \\***********************************************************************/\n/*! exports provided: linkHorizontal, linkVertical, linkRadial */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"linkHorizontal\", function() { return linkHorizontal; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"linkVertical\", function() { return linkVertical; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"linkRadial\", function() { return linkRadial; });\n/* harmony import */ var d3_path__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-path */ \"./node_modules/d3-path/src/index.js\");\n/* harmony import */ var _array_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../array.js */ \"./node_modules/dagre-d3/node_modules/d3-shape/src/array.js\");\n/* harmony import */ var _constant_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../constant.js */ \"./node_modules/dagre-d3/node_modules/d3-shape/src/constant.js\");\n/* harmony import */ var _point_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../point.js */ \"./node_modules/dagre-d3/node_modules/d3-shape/src/point.js\");\n/* harmony import */ var _pointRadial_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../pointRadial.js */ \"./node_modules/dagre-d3/node_modules/d3-shape/src/pointRadial.js\");\n\n\n\n\n\n\nfunction linkSource(d) {\n  return d.source;\n}\n\nfunction linkTarget(d) {\n  return d.target;\n}\n\nfunction link(curve) {\n  var source = linkSource,\n      target = linkTarget,\n      x = _point_js__WEBPACK_IMPORTED_MODULE_3__[\"x\"],\n      y = _point_js__WEBPACK_IMPORTED_MODULE_3__[\"y\"],\n      context = null;\n\n  function link() {\n    var buffer, argv = _array_js__WEBPACK_IMPORTED_MODULE_1__[\"slice\"].call(arguments), s = source.apply(this, argv), t = target.apply(this, argv);\n    if (!context) context = buffer = Object(d3_path__WEBPACK_IMPORTED_MODULE_0__[\"path\"])();\n    curve(context, +x.apply(this, (argv[0] = s, argv)), +y.apply(this, argv), +x.apply(this, (argv[0] = t, argv)), +y.apply(this, argv));\n    if (buffer) return context = null, buffer + \"\" || null;\n  }\n\n  link.source = function(_) {\n    return arguments.length ? (source = _, link) : source;\n  };\n\n  link.target = function(_) {\n    return arguments.length ? (target = _, link) : target;\n  };\n\n  link.x = function(_) {\n    return arguments.length ? (x = typeof _ === \"function\" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(+_), link) : x;\n  };\n\n  link.y = function(_) {\n    return arguments.length ? (y = typeof _ === \"function\" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(+_), link) : y;\n  };\n\n  link.context = function(_) {\n    return arguments.length ? ((context = _ == null ? null : _), link) : context;\n  };\n\n  return link;\n}\n\nfunction curveHorizontal(context, x0, y0, x1, y1) {\n  context.moveTo(x0, y0);\n  context.bezierCurveTo(x0 = (x0 + x1) / 2, y0, x0, y1, x1, y1);\n}\n\nfunction curveVertical(context, x0, y0, x1, y1) {\n  context.moveTo(x0, y0);\n  context.bezierCurveTo(x0, y0 = (y0 + y1) / 2, x1, y0, x1, y1);\n}\n\nfunction curveRadial(context, x0, y0, x1, y1) {\n  var p0 = Object(_pointRadial_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(x0, y0),\n      p1 = Object(_pointRadial_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(x0, y0 = (y0 + y1) / 2),\n      p2 = Object(_pointRadial_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(x1, y0),\n      p3 = Object(_pointRadial_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(x1, y1);\n  context.moveTo(p0[0], p0[1]);\n  context.bezierCurveTo(p1[0], p1[1], p2[0], p2[1], p3[0], p3[1]);\n}\n\nfunction linkHorizontal() {\n  return link(curveHorizontal);\n}\n\nfunction linkVertical() {\n  return link(curveVertical);\n}\n\nfunction linkRadial() {\n  var l = link(curveRadial);\n  l.angle = l.x, delete l.x;\n  l.radius = l.y, delete l.y;\n  return l;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-shape/src/math.js\":\n/*!*****************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-shape/src/math.js ***!\n  \\*****************************************************************/\n/*! exports provided: abs, atan2, cos, max, min, sin, sqrt, epsilon, pi, halfPi, tau, acos, asin */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"abs\", function() { return abs; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"atan2\", function() { return atan2; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"cos\", function() { return cos; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"max\", function() { return max; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"min\", function() { return min; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"sin\", function() { return sin; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"sqrt\", function() { return sqrt; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"epsilon\", function() { return epsilon; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"pi\", function() { return pi; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"halfPi\", function() { return halfPi; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"tau\", function() { return tau; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"acos\", function() { return acos; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"asin\", function() { return asin; });\nvar abs = Math.abs;\nvar atan2 = Math.atan2;\nvar cos = Math.cos;\nvar max = Math.max;\nvar min = Math.min;\nvar sin = Math.sin;\nvar sqrt = Math.sqrt;\n\nvar epsilon = 1e-12;\nvar pi = Math.PI;\nvar halfPi = pi / 2;\nvar tau = 2 * pi;\n\nfunction acos(x) {\n  return x > 1 ? 0 : x < -1 ? pi : Math.acos(x);\n}\n\nfunction asin(x) {\n  return x >= 1 ? halfPi : x <= -1 ? -halfPi : Math.asin(x);\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-shape/src/noop.js\":\n/*!*****************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-shape/src/noop.js ***!\n  \\*****************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {});\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-shape/src/offset/diverging.js\":\n/*!*****************************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-shape/src/offset/diverging.js ***!\n  \\*****************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(series, order) {\n  if (!((n = series.length) > 0)) return;\n  for (var i, j = 0, d, dy, yp, yn, n, m = series[order[0]].length; j < m; ++j) {\n    for (yp = yn = 0, i = 0; i < n; ++i) {\n      if ((dy = (d = series[order[i]][j])[1] - d[0]) > 0) {\n        d[0] = yp, d[1] = yp += dy;\n      } else if (dy < 0) {\n        d[1] = yn, d[0] = yn += dy;\n      } else {\n        d[0] = 0, d[1] = dy;\n      }\n    }\n  }\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-shape/src/offset/expand.js\":\n/*!**************************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-shape/src/offset/expand.js ***!\n  \\**************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _none_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./none.js */ \"./node_modules/dagre-d3/node_modules/d3-shape/src/offset/none.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(series, order) {\n  if (!((n = series.length) > 0)) return;\n  for (var i, n, j = 0, m = series[0].length, y; j < m; ++j) {\n    for (y = i = 0; i < n; ++i) y += series[i][j][1] || 0;\n    if (y) for (i = 0; i < n; ++i) series[i][j][1] /= y;\n  }\n  Object(_none_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(series, order);\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-shape/src/offset/none.js\":\n/*!************************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-shape/src/offset/none.js ***!\n  \\************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(series, order) {\n  if (!((n = series.length) > 1)) return;\n  for (var i = 1, j, s0, s1 = series[order[0]], n, m = s1.length; i < n; ++i) {\n    s0 = s1, s1 = series[order[i]];\n    for (j = 0; j < m; ++j) {\n      s1[j][1] += s1[j][0] = isNaN(s0[j][1]) ? s0[j][0] : s0[j][1];\n    }\n  }\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-shape/src/offset/silhouette.js\":\n/*!******************************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-shape/src/offset/silhouette.js ***!\n  \\******************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _none_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./none.js */ \"./node_modules/dagre-d3/node_modules/d3-shape/src/offset/none.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(series, order) {\n  if (!((n = series.length) > 0)) return;\n  for (var j = 0, s0 = series[order[0]], n, m = s0.length; j < m; ++j) {\n    for (var i = 0, y = 0; i < n; ++i) y += series[i][j][1] || 0;\n    s0[j][1] += s0[j][0] = -y / 2;\n  }\n  Object(_none_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(series, order);\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-shape/src/offset/wiggle.js\":\n/*!**************************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-shape/src/offset/wiggle.js ***!\n  \\**************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _none_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./none.js */ \"./node_modules/dagre-d3/node_modules/d3-shape/src/offset/none.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(series, order) {\n  if (!((n = series.length) > 0) || !((m = (s0 = series[order[0]]).length) > 0)) return;\n  for (var y = 0, j = 1, s0, m, n; j < m; ++j) {\n    for (var i = 0, s1 = 0, s2 = 0; i < n; ++i) {\n      var si = series[order[i]],\n          sij0 = si[j][1] || 0,\n          sij1 = si[j - 1][1] || 0,\n          s3 = (sij0 - sij1) / 2;\n      for (var k = 0; k < i; ++k) {\n        var sk = series[order[k]],\n            skj0 = sk[j][1] || 0,\n            skj1 = sk[j - 1][1] || 0;\n        s3 += skj0 - skj1;\n      }\n      s1 += sij0, s2 += s3 * sij0;\n    }\n    s0[j - 1][1] += s0[j - 1][0] = y;\n    if (s1) y -= s2 / s1;\n  }\n  s0[j - 1][1] += s0[j - 1][0] = y;\n  Object(_none_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(series, order);\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-shape/src/order/appearance.js\":\n/*!*****************************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-shape/src/order/appearance.js ***!\n  \\*****************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _none_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./none.js */ \"./node_modules/dagre-d3/node_modules/d3-shape/src/order/none.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(series) {\n  var peaks = series.map(peak);\n  return Object(_none_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(series).sort(function(a, b) { return peaks[a] - peaks[b]; });\n});\n\nfunction peak(series) {\n  var i = -1, j = 0, n = series.length, vi, vj = -Infinity;\n  while (++i < n) if ((vi = +series[i][1]) > vj) vj = vi, j = i;\n  return j;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-shape/src/order/ascending.js\":\n/*!****************************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-shape/src/order/ascending.js ***!\n  \\****************************************************************************/\n/*! exports provided: default, sum */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"sum\", function() { return sum; });\n/* harmony import */ var _none_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./none.js */ \"./node_modules/dagre-d3/node_modules/d3-shape/src/order/none.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(series) {\n  var sums = series.map(sum);\n  return Object(_none_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(series).sort(function(a, b) { return sums[a] - sums[b]; });\n});\n\nfunction sum(series) {\n  var s = 0, i = -1, n = series.length, v;\n  while (++i < n) if (v = +series[i][1]) s += v;\n  return s;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-shape/src/order/descending.js\":\n/*!*****************************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-shape/src/order/descending.js ***!\n  \\*****************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _ascending_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ascending.js */ \"./node_modules/dagre-d3/node_modules/d3-shape/src/order/ascending.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(series) {\n  return Object(_ascending_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(series).reverse();\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-shape/src/order/insideOut.js\":\n/*!****************************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-shape/src/order/insideOut.js ***!\n  \\****************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _appearance_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./appearance.js */ \"./node_modules/dagre-d3/node_modules/d3-shape/src/order/appearance.js\");\n/* harmony import */ var _ascending_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./ascending.js */ \"./node_modules/dagre-d3/node_modules/d3-shape/src/order/ascending.js\");\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(series) {\n  var n = series.length,\n      i,\n      j,\n      sums = series.map(_ascending_js__WEBPACK_IMPORTED_MODULE_1__[\"sum\"]),\n      order = Object(_appearance_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(series),\n      top = 0,\n      bottom = 0,\n      tops = [],\n      bottoms = [];\n\n  for (i = 0; i < n; ++i) {\n    j = order[i];\n    if (top < bottom) {\n      top += sums[j];\n      tops.push(j);\n    } else {\n      bottom += sums[j];\n      bottoms.push(j);\n    }\n  }\n\n  return bottoms.reverse().concat(tops);\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-shape/src/order/none.js\":\n/*!***********************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-shape/src/order/none.js ***!\n  \\***********************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(series) {\n  var n = series.length, o = new Array(n);\n  while (--n >= 0) o[n] = n;\n  return o;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-shape/src/order/reverse.js\":\n/*!**************************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-shape/src/order/reverse.js ***!\n  \\**************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _none_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./none.js */ \"./node_modules/dagre-d3/node_modules/d3-shape/src/order/none.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(series) {\n  return Object(_none_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(series).reverse();\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-shape/src/pie.js\":\n/*!****************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-shape/src/pie.js ***!\n  \\****************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _constant_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./constant.js */ \"./node_modules/dagre-d3/node_modules/d3-shape/src/constant.js\");\n/* harmony import */ var _descending_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./descending.js */ \"./node_modules/dagre-d3/node_modules/d3-shape/src/descending.js\");\n/* harmony import */ var _identity_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./identity.js */ \"./node_modules/dagre-d3/node_modules/d3-shape/src/identity.js\");\n/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./math.js */ \"./node_modules/dagre-d3/node_modules/d3-shape/src/math.js\");\n\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  var value = _identity_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"],\n      sortValues = _descending_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"],\n      sort = null,\n      startAngle = Object(_constant_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(0),\n      endAngle = Object(_constant_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(_math_js__WEBPACK_IMPORTED_MODULE_3__[\"tau\"]),\n      padAngle = Object(_constant_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(0);\n\n  function pie(data) {\n    var i,\n        n = data.length,\n        j,\n        k,\n        sum = 0,\n        index = new Array(n),\n        arcs = new Array(n),\n        a0 = +startAngle.apply(this, arguments),\n        da = Math.min(_math_js__WEBPACK_IMPORTED_MODULE_3__[\"tau\"], Math.max(-_math_js__WEBPACK_IMPORTED_MODULE_3__[\"tau\"], endAngle.apply(this, arguments) - a0)),\n        a1,\n        p = Math.min(Math.abs(da) / n, padAngle.apply(this, arguments)),\n        pa = p * (da < 0 ? -1 : 1),\n        v;\n\n    for (i = 0; i < n; ++i) {\n      if ((v = arcs[index[i] = i] = +value(data[i], i, data)) > 0) {\n        sum += v;\n      }\n    }\n\n    // Optionally sort the arcs by previously-computed values or by data.\n    if (sortValues != null) index.sort(function(i, j) { return sortValues(arcs[i], arcs[j]); });\n    else if (sort != null) index.sort(function(i, j) { return sort(data[i], data[j]); });\n\n    // Compute the arcs! They are stored in the original data's order.\n    for (i = 0, k = sum ? (da - n * pa) / sum : 0; i < n; ++i, a0 = a1) {\n      j = index[i], v = arcs[j], a1 = a0 + (v > 0 ? v * k : 0) + pa, arcs[j] = {\n        data: data[j],\n        index: i,\n        value: v,\n        startAngle: a0,\n        endAngle: a1,\n        padAngle: p\n      };\n    }\n\n    return arcs;\n  }\n\n  pie.value = function(_) {\n    return arguments.length ? (value = typeof _ === \"function\" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(+_), pie) : value;\n  };\n\n  pie.sortValues = function(_) {\n    return arguments.length ? (sortValues = _, sort = null, pie) : sortValues;\n  };\n\n  pie.sort = function(_) {\n    return arguments.length ? (sort = _, sortValues = null, pie) : sort;\n  };\n\n  pie.startAngle = function(_) {\n    return arguments.length ? (startAngle = typeof _ === \"function\" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(+_), pie) : startAngle;\n  };\n\n  pie.endAngle = function(_) {\n    return arguments.length ? (endAngle = typeof _ === \"function\" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(+_), pie) : endAngle;\n  };\n\n  pie.padAngle = function(_) {\n    return arguments.length ? (padAngle = typeof _ === \"function\" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(+_), pie) : padAngle;\n  };\n\n  return pie;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-shape/src/point.js\":\n/*!******************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-shape/src/point.js ***!\n  \\******************************************************************/\n/*! exports provided: x, y */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"x\", function() { return x; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"y\", function() { return y; });\nfunction x(p) {\n  return p[0];\n}\n\nfunction y(p) {\n  return p[1];\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-shape/src/pointRadial.js\":\n/*!************************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-shape/src/pointRadial.js ***!\n  \\************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(x, y) {\n  return [(y = +y) * Math.cos(x -= Math.PI / 2), y * Math.sin(x)];\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-shape/src/stack.js\":\n/*!******************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-shape/src/stack.js ***!\n  \\******************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _array_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./array.js */ \"./node_modules/dagre-d3/node_modules/d3-shape/src/array.js\");\n/* harmony import */ var _constant_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./constant.js */ \"./node_modules/dagre-d3/node_modules/d3-shape/src/constant.js\");\n/* harmony import */ var _offset_none_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./offset/none.js */ \"./node_modules/dagre-d3/node_modules/d3-shape/src/offset/none.js\");\n/* harmony import */ var _order_none_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./order/none.js */ \"./node_modules/dagre-d3/node_modules/d3-shape/src/order/none.js\");\n\n\n\n\n\nfunction stackValue(d, key) {\n  return d[key];\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  var keys = Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])([]),\n      order = _order_none_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"],\n      offset = _offset_none_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"],\n      value = stackValue;\n\n  function stack(data) {\n    var kz = keys.apply(this, arguments),\n        i,\n        m = data.length,\n        n = kz.length,\n        sz = new Array(n),\n        oz;\n\n    for (i = 0; i < n; ++i) {\n      for (var ki = kz[i], si = sz[i] = new Array(m), j = 0, sij; j < m; ++j) {\n        si[j] = sij = [0, +value(data[j], ki, j, data)];\n        sij.data = data[j];\n      }\n      si.key = ki;\n    }\n\n    for (i = 0, oz = order(sz); i < n; ++i) {\n      sz[oz[i]].index = i;\n    }\n\n    offset(sz, oz);\n    return sz;\n  }\n\n  stack.keys = function(_) {\n    return arguments.length ? (keys = typeof _ === \"function\" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(_array_js__WEBPACK_IMPORTED_MODULE_0__[\"slice\"].call(_)), stack) : keys;\n  };\n\n  stack.value = function(_) {\n    return arguments.length ? (value = typeof _ === \"function\" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(+_), stack) : value;\n  };\n\n  stack.order = function(_) {\n    return arguments.length ? (order = _ == null ? _order_none_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"] : typeof _ === \"function\" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(_array_js__WEBPACK_IMPORTED_MODULE_0__[\"slice\"].call(_)), stack) : order;\n  };\n\n  stack.offset = function(_) {\n    return arguments.length ? (offset = _ == null ? _offset_none_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"] : _, stack) : offset;\n  };\n\n  return stack;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-shape/src/symbol.js\":\n/*!*******************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-shape/src/symbol.js ***!\n  \\*******************************************************************/\n/*! exports provided: symbols, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"symbols\", function() { return symbols; });\n/* harmony import */ var d3_path__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-path */ \"./node_modules/d3-path/src/index.js\");\n/* harmony import */ var _symbol_circle_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./symbol/circle.js */ \"./node_modules/dagre-d3/node_modules/d3-shape/src/symbol/circle.js\");\n/* harmony import */ var _symbol_cross_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./symbol/cross.js */ \"./node_modules/dagre-d3/node_modules/d3-shape/src/symbol/cross.js\");\n/* harmony import */ var _symbol_diamond_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./symbol/diamond.js */ \"./node_modules/dagre-d3/node_modules/d3-shape/src/symbol/diamond.js\");\n/* harmony import */ var _symbol_star_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./symbol/star.js */ \"./node_modules/dagre-d3/node_modules/d3-shape/src/symbol/star.js\");\n/* harmony import */ var _symbol_square_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./symbol/square.js */ \"./node_modules/dagre-d3/node_modules/d3-shape/src/symbol/square.js\");\n/* harmony import */ var _symbol_triangle_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./symbol/triangle.js */ \"./node_modules/dagre-d3/node_modules/d3-shape/src/symbol/triangle.js\");\n/* harmony import */ var _symbol_wye_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./symbol/wye.js */ \"./node_modules/dagre-d3/node_modules/d3-shape/src/symbol/wye.js\");\n/* harmony import */ var _constant_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./constant.js */ \"./node_modules/dagre-d3/node_modules/d3-shape/src/constant.js\");\n\n\n\n\n\n\n\n\n\n\nvar symbols = [\n  _symbol_circle_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"],\n  _symbol_cross_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"],\n  _symbol_diamond_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"],\n  _symbol_square_js__WEBPACK_IMPORTED_MODULE_5__[\"default\"],\n  _symbol_star_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"],\n  _symbol_triangle_js__WEBPACK_IMPORTED_MODULE_6__[\"default\"],\n  _symbol_wye_js__WEBPACK_IMPORTED_MODULE_7__[\"default\"]\n];\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  var type = Object(_constant_js__WEBPACK_IMPORTED_MODULE_8__[\"default\"])(_symbol_circle_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"]),\n      size = Object(_constant_js__WEBPACK_IMPORTED_MODULE_8__[\"default\"])(64),\n      context = null;\n\n  function symbol() {\n    var buffer;\n    if (!context) context = buffer = Object(d3_path__WEBPACK_IMPORTED_MODULE_0__[\"path\"])();\n    type.apply(this, arguments).draw(context, +size.apply(this, arguments));\n    if (buffer) return context = null, buffer + \"\" || null;\n  }\n\n  symbol.type = function(_) {\n    return arguments.length ? (type = typeof _ === \"function\" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_8__[\"default\"])(_), symbol) : type;\n  };\n\n  symbol.size = function(_) {\n    return arguments.length ? (size = typeof _ === \"function\" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_8__[\"default\"])(+_), symbol) : size;\n  };\n\n  symbol.context = function(_) {\n    return arguments.length ? (context = _ == null ? null : _, symbol) : context;\n  };\n\n  return symbol;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-shape/src/symbol/circle.js\":\n/*!**************************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-shape/src/symbol/circle.js ***!\n  \\**************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../math.js */ \"./node_modules/dagre-d3/node_modules/d3-shape/src/math.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n  draw: function(context, size) {\n    var r = Math.sqrt(size / _math_js__WEBPACK_IMPORTED_MODULE_0__[\"pi\"]);\n    context.moveTo(r, 0);\n    context.arc(0, 0, r, 0, _math_js__WEBPACK_IMPORTED_MODULE_0__[\"tau\"]);\n  }\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-shape/src/symbol/cross.js\":\n/*!*************************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-shape/src/symbol/cross.js ***!\n  \\*************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n  draw: function(context, size) {\n    var r = Math.sqrt(size / 5) / 2;\n    context.moveTo(-3 * r, -r);\n    context.lineTo(-r, -r);\n    context.lineTo(-r, -3 * r);\n    context.lineTo(r, -3 * r);\n    context.lineTo(r, -r);\n    context.lineTo(3 * r, -r);\n    context.lineTo(3 * r, r);\n    context.lineTo(r, r);\n    context.lineTo(r, 3 * r);\n    context.lineTo(-r, 3 * r);\n    context.lineTo(-r, r);\n    context.lineTo(-3 * r, r);\n    context.closePath();\n  }\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-shape/src/symbol/diamond.js\":\n/*!***************************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-shape/src/symbol/diamond.js ***!\n  \\***************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\nvar tan30 = Math.sqrt(1 / 3),\n    tan30_2 = tan30 * 2;\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n  draw: function(context, size) {\n    var y = Math.sqrt(size / tan30_2),\n        x = y * tan30;\n    context.moveTo(0, -y);\n    context.lineTo(x, 0);\n    context.lineTo(0, y);\n    context.lineTo(-x, 0);\n    context.closePath();\n  }\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-shape/src/symbol/square.js\":\n/*!**************************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-shape/src/symbol/square.js ***!\n  \\**************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n  draw: function(context, size) {\n    var w = Math.sqrt(size),\n        x = -w / 2;\n    context.rect(x, x, w, w);\n  }\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-shape/src/symbol/star.js\":\n/*!************************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-shape/src/symbol/star.js ***!\n  \\************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../math.js */ \"./node_modules/dagre-d3/node_modules/d3-shape/src/math.js\");\n\n\nvar ka = 0.89081309152928522810,\n    kr = Math.sin(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"pi\"] / 10) / Math.sin(7 * _math_js__WEBPACK_IMPORTED_MODULE_0__[\"pi\"] / 10),\n    kx = Math.sin(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"tau\"] / 10) * kr,\n    ky = -Math.cos(_math_js__WEBPACK_IMPORTED_MODULE_0__[\"tau\"] / 10) * kr;\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n  draw: function(context, size) {\n    var r = Math.sqrt(size * ka),\n        x = kx * r,\n        y = ky * r;\n    context.moveTo(0, -r);\n    context.lineTo(x, y);\n    for (var i = 1; i < 5; ++i) {\n      var a = _math_js__WEBPACK_IMPORTED_MODULE_0__[\"tau\"] * i / 5,\n          c = Math.cos(a),\n          s = Math.sin(a);\n      context.lineTo(s * r, -c * r);\n      context.lineTo(c * x - s * y, s * x + c * y);\n    }\n    context.closePath();\n  }\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-shape/src/symbol/triangle.js\":\n/*!****************************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-shape/src/symbol/triangle.js ***!\n  \\****************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\nvar sqrt3 = Math.sqrt(3);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n  draw: function(context, size) {\n    var y = -Math.sqrt(size / (sqrt3 * 3));\n    context.moveTo(0, y * 2);\n    context.lineTo(-sqrt3 * y, -y);\n    context.lineTo(sqrt3 * y, -y);\n    context.closePath();\n  }\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-shape/src/symbol/wye.js\":\n/*!***********************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-shape/src/symbol/wye.js ***!\n  \\***********************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\nvar c = -0.5,\n    s = Math.sqrt(3) / 2,\n    k = 1 / Math.sqrt(12),\n    a = (k / 2 + 1) * 3;\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n  draw: function(context, size) {\n    var r = Math.sqrt(size / a),\n        x0 = r / 2,\n        y0 = r * k,\n        x1 = x0,\n        y1 = r * k + r,\n        x2 = -x1,\n        y2 = y1;\n    context.moveTo(x0, y0);\n    context.lineTo(x1, y1);\n    context.lineTo(x2, y2);\n    context.lineTo(c * x0 - s * y0, s * x0 + c * y0);\n    context.lineTo(c * x1 - s * y1, s * x1 + c * y1);\n    context.lineTo(c * x2 - s * y2, s * x2 + c * y2);\n    context.lineTo(c * x0 + s * y0, c * y0 - s * x0);\n    context.lineTo(c * x1 + s * y1, c * y1 - s * x1);\n    context.lineTo(c * x2 + s * y2, c * y2 - s * x2);\n    context.closePath();\n  }\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-zoom/src/constant.js\":\n/*!********************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-zoom/src/constant.js ***!\n  \\********************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(x) {\n  return function() {\n    return x;\n  };\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-zoom/src/event.js\":\n/*!*****************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-zoom/src/event.js ***!\n  \\*****************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return ZoomEvent; });\nfunction ZoomEvent(target, type, transform) {\n  this.target = target;\n  this.type = type;\n  this.transform = transform;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-zoom/src/index.js\":\n/*!*****************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-zoom/src/index.js ***!\n  \\*****************************************************************/\n/*! exports provided: zoom, zoomTransform, zoomIdentity */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _zoom_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./zoom.js */ \"./node_modules/dagre-d3/node_modules/d3-zoom/src/zoom.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"zoom\", function() { return _zoom_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n/* harmony import */ var _transform_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./transform.js */ \"./node_modules/dagre-d3/node_modules/d3-zoom/src/transform.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"zoomTransform\", function() { return _transform_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"zoomIdentity\", function() { return _transform_js__WEBPACK_IMPORTED_MODULE_1__[\"identity\"]; });\n\n\n\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-zoom/src/noevent.js\":\n/*!*******************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-zoom/src/noevent.js ***!\n  \\*******************************************************************/\n/*! exports provided: nopropagation, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"nopropagation\", function() { return nopropagation; });\n/* harmony import */ var d3_selection__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-selection */ \"./node_modules/d3-selection/src/index.js\");\n\n\nfunction nopropagation() {\n  d3_selection__WEBPACK_IMPORTED_MODULE_0__[\"event\"].stopImmediatePropagation();\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  d3_selection__WEBPACK_IMPORTED_MODULE_0__[\"event\"].preventDefault();\n  d3_selection__WEBPACK_IMPORTED_MODULE_0__[\"event\"].stopImmediatePropagation();\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-zoom/src/transform.js\":\n/*!*********************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-zoom/src/transform.js ***!\n  \\*********************************************************************/\n/*! exports provided: Transform, identity, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Transform\", function() { return Transform; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"identity\", function() { return identity; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return transform; });\nfunction Transform(k, x, y) {\n  this.k = k;\n  this.x = x;\n  this.y = y;\n}\n\nTransform.prototype = {\n  constructor: Transform,\n  scale: function(k) {\n    return k === 1 ? this : new Transform(this.k * k, this.x, this.y);\n  },\n  translate: function(x, y) {\n    return x === 0 & y === 0 ? this : new Transform(this.k, this.x + this.k * x, this.y + this.k * y);\n  },\n  apply: function(point) {\n    return [point[0] * this.k + this.x, point[1] * this.k + this.y];\n  },\n  applyX: function(x) {\n    return x * this.k + this.x;\n  },\n  applyY: function(y) {\n    return y * this.k + this.y;\n  },\n  invert: function(location) {\n    return [(location[0] - this.x) / this.k, (location[1] - this.y) / this.k];\n  },\n  invertX: function(x) {\n    return (x - this.x) / this.k;\n  },\n  invertY: function(y) {\n    return (y - this.y) / this.k;\n  },\n  rescaleX: function(x) {\n    return x.copy().domain(x.range().map(this.invertX, this).map(x.invert, x));\n  },\n  rescaleY: function(y) {\n    return y.copy().domain(y.range().map(this.invertY, this).map(y.invert, y));\n  },\n  toString: function() {\n    return \"translate(\" + this.x + \",\" + this.y + \") scale(\" + this.k + \")\";\n  }\n};\n\nvar identity = new Transform(1, 0, 0);\n\ntransform.prototype = Transform.prototype;\n\nfunction transform(node) {\n  while (!node.__zoom) if (!(node = node.parentNode)) return identity;\n  return node.__zoom;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3-zoom/src/zoom.js\":\n/*!****************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3-zoom/src/zoom.js ***!\n  \\****************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var d3_dispatch__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-dispatch */ \"./node_modules/d3-dispatch/src/index.js\");\n/* harmony import */ var d3_drag__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! d3-drag */ \"./node_modules/d3-drag/src/index.js\");\n/* harmony import */ var d3_interpolate__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! d3-interpolate */ \"./node_modules/d3-interpolate/src/index.js\");\n/* harmony import */ var d3_selection__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! d3-selection */ \"./node_modules/d3-selection/src/index.js\");\n/* harmony import */ var d3_transition__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! d3-transition */ \"./node_modules/d3-transition/src/index.js\");\n/* harmony import */ var _constant_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./constant.js */ \"./node_modules/dagre-d3/node_modules/d3-zoom/src/constant.js\");\n/* harmony import */ var _event_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./event.js */ \"./node_modules/dagre-d3/node_modules/d3-zoom/src/event.js\");\n/* harmony import */ var _transform_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./transform.js */ \"./node_modules/dagre-d3/node_modules/d3-zoom/src/transform.js\");\n/* harmony import */ var _noevent_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./noevent.js */ \"./node_modules/dagre-d3/node_modules/d3-zoom/src/noevent.js\");\n\n\n\n\n\n\n\n\n\n\n// Ignore right-click, since that should open the context menu.\nfunction defaultFilter() {\n  return !d3_selection__WEBPACK_IMPORTED_MODULE_3__[\"event\"].ctrlKey && !d3_selection__WEBPACK_IMPORTED_MODULE_3__[\"event\"].button;\n}\n\nfunction defaultExtent() {\n  var e = this;\n  if (e instanceof SVGElement) {\n    e = e.ownerSVGElement || e;\n    if (e.hasAttribute(\"viewBox\")) {\n      e = e.viewBox.baseVal;\n      return [[e.x, e.y], [e.x + e.width, e.y + e.height]];\n    }\n    return [[0, 0], [e.width.baseVal.value, e.height.baseVal.value]];\n  }\n  return [[0, 0], [e.clientWidth, e.clientHeight]];\n}\n\nfunction defaultTransform() {\n  return this.__zoom || _transform_js__WEBPACK_IMPORTED_MODULE_7__[\"identity\"];\n}\n\nfunction defaultWheelDelta() {\n  return -d3_selection__WEBPACK_IMPORTED_MODULE_3__[\"event\"].deltaY * (d3_selection__WEBPACK_IMPORTED_MODULE_3__[\"event\"].deltaMode === 1 ? 0.05 : d3_selection__WEBPACK_IMPORTED_MODULE_3__[\"event\"].deltaMode ? 1 : 0.002);\n}\n\nfunction defaultTouchable() {\n  return navigator.maxTouchPoints || (\"ontouchstart\" in this);\n}\n\nfunction defaultConstrain(transform, extent, translateExtent) {\n  var dx0 = transform.invertX(extent[0][0]) - translateExtent[0][0],\n      dx1 = transform.invertX(extent[1][0]) - translateExtent[1][0],\n      dy0 = transform.invertY(extent[0][1]) - translateExtent[0][1],\n      dy1 = transform.invertY(extent[1][1]) - translateExtent[1][1];\n  return transform.translate(\n    dx1 > dx0 ? (dx0 + dx1) / 2 : Math.min(0, dx0) || Math.max(0, dx1),\n    dy1 > dy0 ? (dy0 + dy1) / 2 : Math.min(0, dy0) || Math.max(0, dy1)\n  );\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  var filter = defaultFilter,\n      extent = defaultExtent,\n      constrain = defaultConstrain,\n      wheelDelta = defaultWheelDelta,\n      touchable = defaultTouchable,\n      scaleExtent = [0, Infinity],\n      translateExtent = [[-Infinity, -Infinity], [Infinity, Infinity]],\n      duration = 250,\n      interpolate = d3_interpolate__WEBPACK_IMPORTED_MODULE_2__[\"interpolateZoom\"],\n      listeners = Object(d3_dispatch__WEBPACK_IMPORTED_MODULE_0__[\"dispatch\"])(\"start\", \"zoom\", \"end\"),\n      touchstarting,\n      touchending,\n      touchDelay = 500,\n      wheelDelay = 150,\n      clickDistance2 = 0;\n\n  function zoom(selection) {\n    selection\n        .property(\"__zoom\", defaultTransform)\n        .on(\"wheel.zoom\", wheeled)\n        .on(\"mousedown.zoom\", mousedowned)\n        .on(\"dblclick.zoom\", dblclicked)\n      .filter(touchable)\n        .on(\"touchstart.zoom\", touchstarted)\n        .on(\"touchmove.zoom\", touchmoved)\n        .on(\"touchend.zoom touchcancel.zoom\", touchended)\n        .style(\"touch-action\", \"none\")\n        .style(\"-webkit-tap-highlight-color\", \"rgba(0,0,0,0)\");\n  }\n\n  zoom.transform = function(collection, transform, point) {\n    var selection = collection.selection ? collection.selection() : collection;\n    selection.property(\"__zoom\", defaultTransform);\n    if (collection !== selection) {\n      schedule(collection, transform, point);\n    } else {\n      selection.interrupt().each(function() {\n        gesture(this, arguments)\n            .start()\n            .zoom(null, typeof transform === \"function\" ? transform.apply(this, arguments) : transform)\n            .end();\n      });\n    }\n  };\n\n  zoom.scaleBy = function(selection, k, p) {\n    zoom.scaleTo(selection, function() {\n      var k0 = this.__zoom.k,\n          k1 = typeof k === \"function\" ? k.apply(this, arguments) : k;\n      return k0 * k1;\n    }, p);\n  };\n\n  zoom.scaleTo = function(selection, k, p) {\n    zoom.transform(selection, function() {\n      var e = extent.apply(this, arguments),\n          t0 = this.__zoom,\n          p0 = p == null ? centroid(e) : typeof p === \"function\" ? p.apply(this, arguments) : p,\n          p1 = t0.invert(p0),\n          k1 = typeof k === \"function\" ? k.apply(this, arguments) : k;\n      return constrain(translate(scale(t0, k1), p0, p1), e, translateExtent);\n    }, p);\n  };\n\n  zoom.translateBy = function(selection, x, y) {\n    zoom.transform(selection, function() {\n      return constrain(this.__zoom.translate(\n        typeof x === \"function\" ? x.apply(this, arguments) : x,\n        typeof y === \"function\" ? y.apply(this, arguments) : y\n      ), extent.apply(this, arguments), translateExtent);\n    });\n  };\n\n  zoom.translateTo = function(selection, x, y, p) {\n    zoom.transform(selection, function() {\n      var e = extent.apply(this, arguments),\n          t = this.__zoom,\n          p0 = p == null ? centroid(e) : typeof p === \"function\" ? p.apply(this, arguments) : p;\n      return constrain(_transform_js__WEBPACK_IMPORTED_MODULE_7__[\"identity\"].translate(p0[0], p0[1]).scale(t.k).translate(\n        typeof x === \"function\" ? -x.apply(this, arguments) : -x,\n        typeof y === \"function\" ? -y.apply(this, arguments) : -y\n      ), e, translateExtent);\n    }, p);\n  };\n\n  function scale(transform, k) {\n    k = Math.max(scaleExtent[0], Math.min(scaleExtent[1], k));\n    return k === transform.k ? transform : new _transform_js__WEBPACK_IMPORTED_MODULE_7__[\"Transform\"](k, transform.x, transform.y);\n  }\n\n  function translate(transform, p0, p1) {\n    var x = p0[0] - p1[0] * transform.k, y = p0[1] - p1[1] * transform.k;\n    return x === transform.x && y === transform.y ? transform : new _transform_js__WEBPACK_IMPORTED_MODULE_7__[\"Transform\"](transform.k, x, y);\n  }\n\n  function centroid(extent) {\n    return [(+extent[0][0] + +extent[1][0]) / 2, (+extent[0][1] + +extent[1][1]) / 2];\n  }\n\n  function schedule(transition, transform, point) {\n    transition\n        .on(\"start.zoom\", function() { gesture(this, arguments).start(); })\n        .on(\"interrupt.zoom end.zoom\", function() { gesture(this, arguments).end(); })\n        .tween(\"zoom\", function() {\n          var that = this,\n              args = arguments,\n              g = gesture(that, args),\n              e = extent.apply(that, args),\n              p = point == null ? centroid(e) : typeof point === \"function\" ? point.apply(that, args) : point,\n              w = Math.max(e[1][0] - e[0][0], e[1][1] - e[0][1]),\n              a = that.__zoom,\n              b = typeof transform === \"function\" ? transform.apply(that, args) : transform,\n              i = interpolate(a.invert(p).concat(w / a.k), b.invert(p).concat(w / b.k));\n          return function(t) {\n            if (t === 1) t = b; // Avoid rounding error on end.\n            else { var l = i(t), k = w / l[2]; t = new _transform_js__WEBPACK_IMPORTED_MODULE_7__[\"Transform\"](k, p[0] - l[0] * k, p[1] - l[1] * k); }\n            g.zoom(null, t);\n          };\n        });\n  }\n\n  function gesture(that, args, clean) {\n    return (!clean && that.__zooming) || new Gesture(that, args);\n  }\n\n  function Gesture(that, args) {\n    this.that = that;\n    this.args = args;\n    this.active = 0;\n    this.extent = extent.apply(that, args);\n    this.taps = 0;\n  }\n\n  Gesture.prototype = {\n    start: function() {\n      if (++this.active === 1) {\n        this.that.__zooming = this;\n        this.emit(\"start\");\n      }\n      return this;\n    },\n    zoom: function(key, transform) {\n      if (this.mouse && key !== \"mouse\") this.mouse[1] = transform.invert(this.mouse[0]);\n      if (this.touch0 && key !== \"touch\") this.touch0[1] = transform.invert(this.touch0[0]);\n      if (this.touch1 && key !== \"touch\") this.touch1[1] = transform.invert(this.touch1[0]);\n      this.that.__zoom = transform;\n      this.emit(\"zoom\");\n      return this;\n    },\n    end: function() {\n      if (--this.active === 0) {\n        delete this.that.__zooming;\n        this.emit(\"end\");\n      }\n      return this;\n    },\n    emit: function(type) {\n      Object(d3_selection__WEBPACK_IMPORTED_MODULE_3__[\"customEvent\"])(new _event_js__WEBPACK_IMPORTED_MODULE_6__[\"default\"](zoom, type, this.that.__zoom), listeners.apply, listeners, [type, this.that, this.args]);\n    }\n  };\n\n  function wheeled() {\n    if (!filter.apply(this, arguments)) return;\n    var g = gesture(this, arguments),\n        t = this.__zoom,\n        k = Math.max(scaleExtent[0], Math.min(scaleExtent[1], t.k * Math.pow(2, wheelDelta.apply(this, arguments)))),\n        p = Object(d3_selection__WEBPACK_IMPORTED_MODULE_3__[\"mouse\"])(this);\n\n    // If the mouse is in the same location as before, reuse it.\n    // If there were recent wheel events, reset the wheel idle timeout.\n    if (g.wheel) {\n      if (g.mouse[0][0] !== p[0] || g.mouse[0][1] !== p[1]) {\n        g.mouse[1] = t.invert(g.mouse[0] = p);\n      }\n      clearTimeout(g.wheel);\n    }\n\n    // If this wheel event won’t trigger a transform change, ignore it.\n    else if (t.k === k) return;\n\n    // Otherwise, capture the mouse point and location at the start.\n    else {\n      g.mouse = [p, t.invert(p)];\n      Object(d3_transition__WEBPACK_IMPORTED_MODULE_4__[\"interrupt\"])(this);\n      g.start();\n    }\n\n    Object(_noevent_js__WEBPACK_IMPORTED_MODULE_8__[\"default\"])();\n    g.wheel = setTimeout(wheelidled, wheelDelay);\n    g.zoom(\"mouse\", constrain(translate(scale(t, k), g.mouse[0], g.mouse[1]), g.extent, translateExtent));\n\n    function wheelidled() {\n      g.wheel = null;\n      g.end();\n    }\n  }\n\n  function mousedowned() {\n    if (touchending || !filter.apply(this, arguments)) return;\n    var g = gesture(this, arguments, true),\n        v = Object(d3_selection__WEBPACK_IMPORTED_MODULE_3__[\"select\"])(d3_selection__WEBPACK_IMPORTED_MODULE_3__[\"event\"].view).on(\"mousemove.zoom\", mousemoved, true).on(\"mouseup.zoom\", mouseupped, true),\n        p = Object(d3_selection__WEBPACK_IMPORTED_MODULE_3__[\"mouse\"])(this),\n        x0 = d3_selection__WEBPACK_IMPORTED_MODULE_3__[\"event\"].clientX,\n        y0 = d3_selection__WEBPACK_IMPORTED_MODULE_3__[\"event\"].clientY;\n\n    Object(d3_drag__WEBPACK_IMPORTED_MODULE_1__[\"dragDisable\"])(d3_selection__WEBPACK_IMPORTED_MODULE_3__[\"event\"].view);\n    Object(_noevent_js__WEBPACK_IMPORTED_MODULE_8__[\"nopropagation\"])();\n    g.mouse = [p, this.__zoom.invert(p)];\n    Object(d3_transition__WEBPACK_IMPORTED_MODULE_4__[\"interrupt\"])(this);\n    g.start();\n\n    function mousemoved() {\n      Object(_noevent_js__WEBPACK_IMPORTED_MODULE_8__[\"default\"])();\n      if (!g.moved) {\n        var dx = d3_selection__WEBPACK_IMPORTED_MODULE_3__[\"event\"].clientX - x0, dy = d3_selection__WEBPACK_IMPORTED_MODULE_3__[\"event\"].clientY - y0;\n        g.moved = dx * dx + dy * dy > clickDistance2;\n      }\n      g.zoom(\"mouse\", constrain(translate(g.that.__zoom, g.mouse[0] = Object(d3_selection__WEBPACK_IMPORTED_MODULE_3__[\"mouse\"])(g.that), g.mouse[1]), g.extent, translateExtent));\n    }\n\n    function mouseupped() {\n      v.on(\"mousemove.zoom mouseup.zoom\", null);\n      Object(d3_drag__WEBPACK_IMPORTED_MODULE_1__[\"dragEnable\"])(d3_selection__WEBPACK_IMPORTED_MODULE_3__[\"event\"].view, g.moved);\n      Object(_noevent_js__WEBPACK_IMPORTED_MODULE_8__[\"default\"])();\n      g.end();\n    }\n  }\n\n  function dblclicked() {\n    if (!filter.apply(this, arguments)) return;\n    var t0 = this.__zoom,\n        p0 = Object(d3_selection__WEBPACK_IMPORTED_MODULE_3__[\"mouse\"])(this),\n        p1 = t0.invert(p0),\n        k1 = t0.k * (d3_selection__WEBPACK_IMPORTED_MODULE_3__[\"event\"].shiftKey ? 0.5 : 2),\n        t1 = constrain(translate(scale(t0, k1), p0, p1), extent.apply(this, arguments), translateExtent);\n\n    Object(_noevent_js__WEBPACK_IMPORTED_MODULE_8__[\"default\"])();\n    if (duration > 0) Object(d3_selection__WEBPACK_IMPORTED_MODULE_3__[\"select\"])(this).transition().duration(duration).call(schedule, t1, p0);\n    else Object(d3_selection__WEBPACK_IMPORTED_MODULE_3__[\"select\"])(this).call(zoom.transform, t1);\n  }\n\n  function touchstarted() {\n    if (!filter.apply(this, arguments)) return;\n    var touches = d3_selection__WEBPACK_IMPORTED_MODULE_3__[\"event\"].touches,\n        n = touches.length,\n        g = gesture(this, arguments, d3_selection__WEBPACK_IMPORTED_MODULE_3__[\"event\"].changedTouches.length === n),\n        started, i, t, p;\n\n    Object(_noevent_js__WEBPACK_IMPORTED_MODULE_8__[\"nopropagation\"])();\n    for (i = 0; i < n; ++i) {\n      t = touches[i], p = Object(d3_selection__WEBPACK_IMPORTED_MODULE_3__[\"touch\"])(this, touches, t.identifier);\n      p = [p, this.__zoom.invert(p), t.identifier];\n      if (!g.touch0) g.touch0 = p, started = true, g.taps = 1 + !!touchstarting;\n      else if (!g.touch1 && g.touch0[2] !== p[2]) g.touch1 = p, g.taps = 0;\n    }\n\n    if (touchstarting) touchstarting = clearTimeout(touchstarting);\n\n    if (started) {\n      if (g.taps < 2) touchstarting = setTimeout(function() { touchstarting = null; }, touchDelay);\n      Object(d3_transition__WEBPACK_IMPORTED_MODULE_4__[\"interrupt\"])(this);\n      g.start();\n    }\n  }\n\n  function touchmoved() {\n    if (!this.__zooming) return;\n    var g = gesture(this, arguments),\n        touches = d3_selection__WEBPACK_IMPORTED_MODULE_3__[\"event\"].changedTouches,\n        n = touches.length, i, t, p, l;\n\n    Object(_noevent_js__WEBPACK_IMPORTED_MODULE_8__[\"default\"])();\n    if (touchstarting) touchstarting = clearTimeout(touchstarting);\n    g.taps = 0;\n    for (i = 0; i < n; ++i) {\n      t = touches[i], p = Object(d3_selection__WEBPACK_IMPORTED_MODULE_3__[\"touch\"])(this, touches, t.identifier);\n      if (g.touch0 && g.touch0[2] === t.identifier) g.touch0[0] = p;\n      else if (g.touch1 && g.touch1[2] === t.identifier) g.touch1[0] = p;\n    }\n    t = g.that.__zoom;\n    if (g.touch1) {\n      var p0 = g.touch0[0], l0 = g.touch0[1],\n          p1 = g.touch1[0], l1 = g.touch1[1],\n          dp = (dp = p1[0] - p0[0]) * dp + (dp = p1[1] - p0[1]) * dp,\n          dl = (dl = l1[0] - l0[0]) * dl + (dl = l1[1] - l0[1]) * dl;\n      t = scale(t, Math.sqrt(dp / dl));\n      p = [(p0[0] + p1[0]) / 2, (p0[1] + p1[1]) / 2];\n      l = [(l0[0] + l1[0]) / 2, (l0[1] + l1[1]) / 2];\n    }\n    else if (g.touch0) p = g.touch0[0], l = g.touch0[1];\n    else return;\n    g.zoom(\"touch\", constrain(translate(t, p, l), g.extent, translateExtent));\n  }\n\n  function touchended() {\n    if (!this.__zooming) return;\n    var g = gesture(this, arguments),\n        touches = d3_selection__WEBPACK_IMPORTED_MODULE_3__[\"event\"].changedTouches,\n        n = touches.length, i, t;\n\n    Object(_noevent_js__WEBPACK_IMPORTED_MODULE_8__[\"nopropagation\"])();\n    if (touchending) clearTimeout(touchending);\n    touchending = setTimeout(function() { touchending = null; }, touchDelay);\n    for (i = 0; i < n; ++i) {\n      t = touches[i];\n      if (g.touch0 && g.touch0[2] === t.identifier) delete g.touch0;\n      else if (g.touch1 && g.touch1[2] === t.identifier) delete g.touch1;\n    }\n    if (g.touch1 && !g.touch0) g.touch0 = g.touch1, delete g.touch1;\n    if (g.touch0) g.touch0[1] = this.__zoom.invert(g.touch0[0]);\n    else {\n      g.end();\n      // If this was a dbltap, reroute to the (optional) dblclick.zoom handler.\n      if (g.taps === 2) {\n        var p = Object(d3_selection__WEBPACK_IMPORTED_MODULE_3__[\"select\"])(this).on(\"dblclick.zoom\");\n        if (p) p.apply(this, arguments);\n      }\n    }\n  }\n\n  zoom.wheelDelta = function(_) {\n    return arguments.length ? (wheelDelta = typeof _ === \"function\" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(+_), zoom) : wheelDelta;\n  };\n\n  zoom.filter = function(_) {\n    return arguments.length ? (filter = typeof _ === \"function\" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(!!_), zoom) : filter;\n  };\n\n  zoom.touchable = function(_) {\n    return arguments.length ? (touchable = typeof _ === \"function\" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(!!_), zoom) : touchable;\n  };\n\n  zoom.extent = function(_) {\n    return arguments.length ? (extent = typeof _ === \"function\" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_5__[\"default\"])([[+_[0][0], +_[0][1]], [+_[1][0], +_[1][1]]]), zoom) : extent;\n  };\n\n  zoom.scaleExtent = function(_) {\n    return arguments.length ? (scaleExtent[0] = +_[0], scaleExtent[1] = +_[1], zoom) : [scaleExtent[0], scaleExtent[1]];\n  };\n\n  zoom.translateExtent = function(_) {\n    return arguments.length ? (translateExtent[0][0] = +_[0][0], translateExtent[1][0] = +_[1][0], translateExtent[0][1] = +_[0][1], translateExtent[1][1] = +_[1][1], zoom) : [[translateExtent[0][0], translateExtent[0][1]], [translateExtent[1][0], translateExtent[1][1]]];\n  };\n\n  zoom.constrain = function(_) {\n    return arguments.length ? (constrain = _, zoom) : constrain;\n  };\n\n  zoom.duration = function(_) {\n    return arguments.length ? (duration = +_, zoom) : duration;\n  };\n\n  zoom.interpolate = function(_) {\n    return arguments.length ? (interpolate = _, zoom) : interpolate;\n  };\n\n  zoom.on = function() {\n    var value = listeners.on.apply(listeners, arguments);\n    return value === listeners ? zoom : value;\n  };\n\n  zoom.clickDistance = function(_) {\n    return arguments.length ? (clickDistance2 = (_ = +_) * _, zoom) : Math.sqrt(clickDistance2);\n  };\n\n  return zoom;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3/dist/package.js\":\n/*!***************************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3/dist/package.js ***!\n  \\***************************************************************/\n/*! exports provided: name, version, description, keywords, homepage, license, author, main, unpkg, jsdelivr, module, repository, files, scripts, devDependencies, dependencies */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"name\", function() { return name; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"version\", function() { return version; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"description\", function() { return description; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"keywords\", function() { return keywords; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"homepage\", function() { return homepage; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"license\", function() { return license; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"author\", function() { return author; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"main\", function() { return main; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"unpkg\", function() { return unpkg; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"jsdelivr\", function() { return jsdelivr; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"module\", function() { return module; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"repository\", function() { return repository; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"files\", function() { return files; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"scripts\", function() { return scripts; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"devDependencies\", function() { return devDependencies; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"dependencies\", function() { return dependencies; });\nvar name = \"d3\";\nvar version = \"5.16.0\";\nvar description = \"Data-Driven Documents\";\nvar keywords = [\"dom\",\"visualization\",\"svg\",\"animation\",\"canvas\"];\nvar homepage = \"https://d3js.org\";\nvar license = \"BSD-3-Clause\";\nvar author = {\"name\":\"Mike Bostock\",\"url\":\"https://bost.ocks.org/mike\"};\nvar main = \"dist/d3.node.js\";\nvar unpkg = \"dist/d3.min.js\";\nvar jsdelivr = \"dist/d3.min.js\";\nvar module = \"index.js\";\nvar repository = {\"type\":\"git\",\"url\":\"https://github.com/d3/d3.git\"};\nvar files = [\"dist/**/*.js\",\"index.js\"];\nvar scripts = {\"pretest\":\"rimraf dist && mkdir dist && json2module package.json > dist/package.js && rollup -c\",\"test\":\"tape 'test/**/*-test.js'\",\"prepublishOnly\":\"yarn test\",\"postpublish\":\"git push && git push --tags && cd ../d3.github.com && git pull && cp ../d3/dist/d3.js d3.v5.js && cp ../d3/dist/d3.min.js d3.v5.min.js && git add d3.v5.js d3.v5.min.js && git commit -m \\\"d3 ${npm_package_version}\\\" && git push && cd - && cd ../d3-bower && git pull && cp ../d3/LICENSE ../d3/README.md ../d3/dist/d3.js ../d3/dist/d3.min.js . && git add -- LICENSE README.md d3.js d3.min.js && git commit -m \\\"${npm_package_version}\\\" && git tag -am \\\"${npm_package_version}\\\" v${npm_package_version} && git push && git push --tags && cd - && zip -j dist/d3.zip -- LICENSE README.md API.md CHANGES.md dist/d3.js dist/d3.min.js\"};\nvar devDependencies = {\"json2module\":\"0.0\",\"rimraf\":\"2\",\"rollup\":\"1\",\"rollup-plugin-ascii\":\"0.0\",\"rollup-plugin-node-resolve\":\"3\",\"rollup-plugin-terser\":\"5\",\"tape\":\"4\"};\nvar dependencies = {\"d3-array\":\"1\",\"d3-axis\":\"1\",\"d3-brush\":\"1\",\"d3-chord\":\"1\",\"d3-collection\":\"1\",\"d3-color\":\"1\",\"d3-contour\":\"1\",\"d3-dispatch\":\"1\",\"d3-drag\":\"1\",\"d3-dsv\":\"1\",\"d3-ease\":\"1\",\"d3-fetch\":\"1\",\"d3-force\":\"1\",\"d3-format\":\"1\",\"d3-geo\":\"1\",\"d3-hierarchy\":\"1\",\"d3-interpolate\":\"1\",\"d3-path\":\"1\",\"d3-polygon\":\"1\",\"d3-quadtree\":\"1\",\"d3-random\":\"1\",\"d3-scale\":\"2\",\"d3-scale-chromatic\":\"1\",\"d3-selection\":\"1\",\"d3-shape\":\"1\",\"d3-time\":\"1\",\"d3-time-format\":\"2\",\"d3-timer\":\"1\",\"d3-transition\":\"1\",\"d3-voronoi\":\"1\",\"d3-zoom\":\"1\"};\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre-d3/node_modules/d3/index.js\":\n/*!********************************************************!*\\\n  !*** ./node_modules/dagre-d3/node_modules/d3/index.js ***!\n  \\********************************************************/\n/*! exports provided: version, bisect, bisectRight, bisectLeft, ascending, bisector, cross, descending, deviation, extent, histogram, thresholdFreedmanDiaconis, thresholdScott, thresholdSturges, max, mean, median, merge, min, pairs, permute, quantile, range, scan, shuffle, sum, ticks, tickIncrement, tickStep, transpose, variance, zip, axisTop, axisRight, axisBottom, axisLeft, brush, brushX, brushY, brushSelection, chord, ribbon, nest, set, map, keys, values, entries, color, rgb, hsl, lab, hcl, lch, gray, cubehelix, contours, contourDensity, dispatch, drag, dragDisable, dragEnable, dsvFormat, csvParse, csvParseRows, csvFormat, csvFormatBody, csvFormatRows, csvFormatRow, csvFormatValue, tsvParse, tsvParseRows, tsvFormat, tsvFormatBody, tsvFormatRows, tsvFormatRow, tsvFormatValue, autoType, easeLinear, easeQuad, easeQuadIn, easeQuadOut, easeQuadInOut, easeCubic, easeCubicIn, easeCubicOut, easeCubicInOut, easePoly, easePolyIn, easePolyOut, easePolyInOut, easeSin, easeSinIn, easeSinOut, easeSinInOut, easeExp, easeExpIn, easeExpOut, easeExpInOut, easeCircle, easeCircleIn, easeCircleOut, easeCircleInOut, easeBounce, easeBounceIn, easeBounceOut, easeBounceInOut, easeBack, easeBackIn, easeBackOut, easeBackInOut, easeElastic, easeElasticIn, easeElasticOut, easeElasticInOut, blob, buffer, dsv, csv, tsv, image, json, text, xml, html, svg, forceCenter, forceCollide, forceLink, forceManyBody, forceRadial, forceSimulation, forceX, forceY, formatDefaultLocale, format, formatPrefix, formatLocale, formatSpecifier, FormatSpecifier, precisionFixed, precisionPrefix, precisionRound, geoArea, geoBounds, geoCentroid, geoCircle, geoClipAntimeridian, geoClipCircle, geoClipExtent, geoClipRectangle, geoContains, geoDistance, geoGraticule, geoGraticule10, geoInterpolate, geoLength, geoPath, geoAlbers, geoAlbersUsa, geoAzimuthalEqualArea, geoAzimuthalEqualAreaRaw, geoAzimuthalEquidistant, geoAzimuthalEquidistantRaw, geoConicConformal, geoConicConformalRaw, geoConicEqualArea, geoConicEqualAreaRaw, geoConicEquidistant, geoConicEquidistantRaw, geoEqualEarth, geoEqualEarthRaw, geoEquirectangular, geoEquirectangularRaw, geoGnomonic, geoGnomonicRaw, geoIdentity, geoProjection, geoProjectionMutator, geoMercator, geoMercatorRaw, geoNaturalEarth1, geoNaturalEarth1Raw, geoOrthographic, geoOrthographicRaw, geoStereographic, geoStereographicRaw, geoTransverseMercator, geoTransverseMercatorRaw, geoRotation, geoStream, geoTransform, cluster, hierarchy, pack, packSiblings, packEnclose, partition, stratify, tree, treemap, treemapBinary, treemapDice, treemapSlice, treemapSliceDice, treemapSquarify, treemapResquarify, interpolate, interpolateArray, interpolateBasis, interpolateBasisClosed, interpolateDate, interpolateDiscrete, interpolateHue, interpolateNumber, interpolateNumberArray, interpolateObject, interpolateRound, interpolateString, interpolateTransformCss, interpolateTransformSvg, interpolateZoom, interpolateRgb, interpolateRgbBasis, interpolateRgbBasisClosed, interpolateHsl, interpolateHslLong, interpolateLab, interpolateHcl, interpolateHclLong, interpolateCubehelix, interpolateCubehelixLong, piecewise, quantize, path, polygonArea, polygonCentroid, polygonHull, polygonContains, polygonLength, quadtree, randomUniform, randomNormal, randomLogNormal, randomBates, randomIrwinHall, randomExponential, scaleBand, scalePoint, scaleIdentity, scaleLinear, scaleLog, scaleSymlog, scaleOrdinal, scaleImplicit, scalePow, scaleSqrt, scaleQuantile, scaleQuantize, scaleThreshold, scaleTime, scaleUtc, scaleSequential, scaleSequentialLog, scaleSequentialPow, scaleSequentialSqrt, scaleSequentialSymlog, scaleSequentialQuantile, scaleDiverging, scaleDivergingLog, scaleDivergingPow, scaleDivergingSqrt, scaleDivergingSymlog, tickFormat, schemeCategory10, schemeAccent, schemeDark2, schemePaired, schemePastel1, schemePastel2, schemeSet1, schemeSet2, schemeSet3, schemeTableau10, interpolateBrBG, schemeBrBG, interpolatePRGn, schemePRGn, interpolatePiYG, schemePiYG, interpolatePuOr, schemePuOr, interpolateRdBu, schemeRdBu, interpolateRdGy, schemeRdGy, interpolateRdYlBu, schemeRdYlBu, interpolateRdYlGn, schemeRdYlGn, interpolateSpectral, schemeSpectral, interpolateBuGn, schemeBuGn, interpolateBuPu, schemeBuPu, interpolateGnBu, schemeGnBu, interpolateOrRd, schemeOrRd, interpolatePuBuGn, schemePuBuGn, interpolatePuBu, schemePuBu, interpolatePuRd, schemePuRd, interpolateRdPu, schemeRdPu, interpolateYlGnBu, schemeYlGnBu, interpolateYlGn, schemeYlGn, interpolateYlOrBr, schemeYlOrBr, interpolateYlOrRd, schemeYlOrRd, interpolateBlues, schemeBlues, interpolateGreens, schemeGreens, interpolateGreys, schemeGreys, interpolatePurples, schemePurples, interpolateReds, schemeReds, interpolateOranges, schemeOranges, interpolateCividis, interpolateCubehelixDefault, interpolateRainbow, interpolateWarm, interpolateCool, interpolateSinebow, interpolateTurbo, interpolateViridis, interpolateMagma, interpolateInferno, interpolatePlasma, create, creator, local, matcher, mouse, namespace, namespaces, clientPoint, select, selectAll, selection, selector, selectorAll, style, touch, touches, window, event, customEvent, arc, area, line, pie, areaRadial, radialArea, lineRadial, radialLine, pointRadial, linkHorizontal, linkVertical, linkRadial, symbol, symbols, symbolCircle, symbolCross, symbolDiamond, symbolSquare, symbolStar, symbolTriangle, symbolWye, curveBasisClosed, curveBasisOpen, curveBasis, curveBundle, curveCardinalClosed, curveCardinalOpen, curveCardinal, curveCatmullRomClosed, curveCatmullRomOpen, curveCatmullRom, curveLinearClosed, curveLinear, curveMonotoneX, curveMonotoneY, curveNatural, curveStep, curveStepAfter, curveStepBefore, stack, stackOffsetExpand, stackOffsetDiverging, stackOffsetNone, stackOffsetSilhouette, stackOffsetWiggle, stackOrderAppearance, stackOrderAscending, stackOrderDescending, stackOrderInsideOut, stackOrderNone, stackOrderReverse, timeInterval, timeMillisecond, timeMilliseconds, utcMillisecond, utcMilliseconds, timeSecond, timeSeconds, utcSecond, utcSeconds, timeMinute, timeMinutes, timeHour, timeHours, timeDay, timeDays, timeWeek, timeWeeks, timeSunday, timeSundays, timeMonday, timeMondays, timeTuesday, timeTuesdays, timeWednesday, timeWednesdays, timeThursday, timeThursdays, timeFriday, timeFridays, timeSaturday, timeSaturdays, timeMonth, timeMonths, timeYear, timeYears, utcMinute, utcMinutes, utcHour, utcHours, utcDay, utcDays, utcWeek, utcWeeks, utcSunday, utcSundays, utcMonday, utcMondays, utcTuesday, utcTuesdays, utcWednesday, utcWednesdays, utcThursday, utcThursdays, utcFriday, utcFridays, utcSaturday, utcSaturdays, utcMonth, utcMonths, utcYear, utcYears, timeFormatDefaultLocale, timeFormat, timeParse, utcFormat, utcParse, timeFormatLocale, isoFormat, isoParse, now, timer, timerFlush, timeout, interval, transition, active, interrupt, voronoi, zoom, zoomTransform, zoomIdentity */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _dist_package_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./dist/package.js */ \"./node_modules/dagre-d3/node_modules/d3/dist/package.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"version\", function() { return _dist_package_js__WEBPACK_IMPORTED_MODULE_0__[\"version\"]; });\n\n/* harmony import */ var d3_array__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! d3-array */ \"./node_modules/d3-array/src/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"bisect\", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__[\"bisect\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"bisectRight\", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__[\"bisectRight\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"bisectLeft\", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__[\"bisectLeft\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"ascending\", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__[\"ascending\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"bisector\", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__[\"bisector\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"cross\", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__[\"cross\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"descending\", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__[\"descending\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"deviation\", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__[\"deviation\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"extent\", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__[\"extent\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"histogram\", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__[\"histogram\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"thresholdFreedmanDiaconis\", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__[\"thresholdFreedmanDiaconis\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"thresholdScott\", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__[\"thresholdScott\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"thresholdSturges\", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__[\"thresholdSturges\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"max\", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__[\"max\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"mean\", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__[\"mean\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"median\", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__[\"median\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"merge\", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__[\"merge\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"min\", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__[\"min\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"pairs\", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__[\"pairs\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"permute\", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__[\"permute\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"quantile\", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__[\"quantile\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"range\", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__[\"range\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"scan\", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__[\"scan\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"shuffle\", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__[\"shuffle\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"sum\", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__[\"sum\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"ticks\", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__[\"ticks\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"tickIncrement\", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__[\"tickIncrement\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"tickStep\", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__[\"tickStep\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"transpose\", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__[\"transpose\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"variance\", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__[\"variance\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"zip\", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__[\"zip\"]; });\n\n/* harmony import */ var d3_axis__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! d3-axis */ \"./node_modules/dagre-d3/node_modules/d3-axis/src/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"axisTop\", function() { return d3_axis__WEBPACK_IMPORTED_MODULE_2__[\"axisTop\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"axisRight\", function() { return d3_axis__WEBPACK_IMPORTED_MODULE_2__[\"axisRight\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"axisBottom\", function() { return d3_axis__WEBPACK_IMPORTED_MODULE_2__[\"axisBottom\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"axisLeft\", function() { return d3_axis__WEBPACK_IMPORTED_MODULE_2__[\"axisLeft\"]; });\n\n/* harmony import */ var d3_brush__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! d3-brush */ \"./node_modules/dagre-d3/node_modules/d3-brush/src/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"brush\", function() { return d3_brush__WEBPACK_IMPORTED_MODULE_3__[\"brush\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"brushX\", function() { return d3_brush__WEBPACK_IMPORTED_MODULE_3__[\"brushX\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"brushY\", function() { return d3_brush__WEBPACK_IMPORTED_MODULE_3__[\"brushY\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"brushSelection\", function() { return d3_brush__WEBPACK_IMPORTED_MODULE_3__[\"brushSelection\"]; });\n\n/* harmony import */ var d3_chord__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! d3-chord */ \"./node_modules/dagre-d3/node_modules/d3-chord/src/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"chord\", function() { return d3_chord__WEBPACK_IMPORTED_MODULE_4__[\"chord\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"ribbon\", function() { return d3_chord__WEBPACK_IMPORTED_MODULE_4__[\"ribbon\"]; });\n\n/* harmony import */ var d3_collection__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! d3-collection */ \"./node_modules/d3-collection/src/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"nest\", function() { return d3_collection__WEBPACK_IMPORTED_MODULE_5__[\"nest\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"set\", function() { return d3_collection__WEBPACK_IMPORTED_MODULE_5__[\"set\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"map\", function() { return d3_collection__WEBPACK_IMPORTED_MODULE_5__[\"map\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"keys\", function() { return d3_collection__WEBPACK_IMPORTED_MODULE_5__[\"keys\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"values\", function() { return d3_collection__WEBPACK_IMPORTED_MODULE_5__[\"values\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"entries\", function() { return d3_collection__WEBPACK_IMPORTED_MODULE_5__[\"entries\"]; });\n\n/* harmony import */ var d3_color__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! d3-color */ \"./node_modules/d3-color/src/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"color\", function() { return d3_color__WEBPACK_IMPORTED_MODULE_6__[\"color\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"rgb\", function() { return d3_color__WEBPACK_IMPORTED_MODULE_6__[\"rgb\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"hsl\", function() { return d3_color__WEBPACK_IMPORTED_MODULE_6__[\"hsl\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"lab\", function() { return d3_color__WEBPACK_IMPORTED_MODULE_6__[\"lab\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"hcl\", function() { return d3_color__WEBPACK_IMPORTED_MODULE_6__[\"hcl\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"lch\", function() { return d3_color__WEBPACK_IMPORTED_MODULE_6__[\"lch\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"gray\", function() { return d3_color__WEBPACK_IMPORTED_MODULE_6__[\"gray\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"cubehelix\", function() { return d3_color__WEBPACK_IMPORTED_MODULE_6__[\"cubehelix\"]; });\n\n/* harmony import */ var d3_contour__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! d3-contour */ \"./node_modules/dagre-d3/node_modules/d3-contour/src/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"contours\", function() { return d3_contour__WEBPACK_IMPORTED_MODULE_7__[\"contours\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"contourDensity\", function() { return d3_contour__WEBPACK_IMPORTED_MODULE_7__[\"contourDensity\"]; });\n\n/* harmony import */ var d3_dispatch__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! d3-dispatch */ \"./node_modules/d3-dispatch/src/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"dispatch\", function() { return d3_dispatch__WEBPACK_IMPORTED_MODULE_8__[\"dispatch\"]; });\n\n/* harmony import */ var d3_drag__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! d3-drag */ \"./node_modules/d3-drag/src/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"drag\", function() { return d3_drag__WEBPACK_IMPORTED_MODULE_9__[\"drag\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"dragDisable\", function() { return d3_drag__WEBPACK_IMPORTED_MODULE_9__[\"dragDisable\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"dragEnable\", function() { return d3_drag__WEBPACK_IMPORTED_MODULE_9__[\"dragEnable\"]; });\n\n/* harmony import */ var d3_dsv__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! d3-dsv */ \"./node_modules/d3-dsv/src/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"dsvFormat\", function() { return d3_dsv__WEBPACK_IMPORTED_MODULE_10__[\"dsvFormat\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"csvParse\", function() { return d3_dsv__WEBPACK_IMPORTED_MODULE_10__[\"csvParse\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"csvParseRows\", function() { return d3_dsv__WEBPACK_IMPORTED_MODULE_10__[\"csvParseRows\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"csvFormat\", function() { return d3_dsv__WEBPACK_IMPORTED_MODULE_10__[\"csvFormat\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"csvFormatBody\", function() { return d3_dsv__WEBPACK_IMPORTED_MODULE_10__[\"csvFormatBody\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"csvFormatRows\", function() { return d3_dsv__WEBPACK_IMPORTED_MODULE_10__[\"csvFormatRows\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"csvFormatRow\", function() { return d3_dsv__WEBPACK_IMPORTED_MODULE_10__[\"csvFormatRow\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"csvFormatValue\", function() { return d3_dsv__WEBPACK_IMPORTED_MODULE_10__[\"csvFormatValue\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"tsvParse\", function() { return d3_dsv__WEBPACK_IMPORTED_MODULE_10__[\"tsvParse\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"tsvParseRows\", function() { return d3_dsv__WEBPACK_IMPORTED_MODULE_10__[\"tsvParseRows\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"tsvFormat\", function() { return d3_dsv__WEBPACK_IMPORTED_MODULE_10__[\"tsvFormat\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"tsvFormatBody\", function() { return d3_dsv__WEBPACK_IMPORTED_MODULE_10__[\"tsvFormatBody\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"tsvFormatRows\", function() { return d3_dsv__WEBPACK_IMPORTED_MODULE_10__[\"tsvFormatRows\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"tsvFormatRow\", function() { return d3_dsv__WEBPACK_IMPORTED_MODULE_10__[\"tsvFormatRow\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"tsvFormatValue\", function() { return d3_dsv__WEBPACK_IMPORTED_MODULE_10__[\"tsvFormatValue\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"autoType\", function() { return d3_dsv__WEBPACK_IMPORTED_MODULE_10__[\"autoType\"]; });\n\n/* harmony import */ var d3_ease__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! d3-ease */ \"./node_modules/d3-ease/src/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeLinear\", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__[\"easeLinear\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeQuad\", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__[\"easeQuad\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeQuadIn\", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__[\"easeQuadIn\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeQuadOut\", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__[\"easeQuadOut\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeQuadInOut\", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__[\"easeQuadInOut\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeCubic\", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__[\"easeCubic\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeCubicIn\", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__[\"easeCubicIn\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeCubicOut\", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__[\"easeCubicOut\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeCubicInOut\", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__[\"easeCubicInOut\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easePoly\", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__[\"easePoly\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easePolyIn\", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__[\"easePolyIn\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easePolyOut\", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__[\"easePolyOut\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easePolyInOut\", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__[\"easePolyInOut\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeSin\", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__[\"easeSin\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeSinIn\", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__[\"easeSinIn\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeSinOut\", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__[\"easeSinOut\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeSinInOut\", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__[\"easeSinInOut\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeExp\", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__[\"easeExp\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeExpIn\", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__[\"easeExpIn\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeExpOut\", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__[\"easeExpOut\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeExpInOut\", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__[\"easeExpInOut\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeCircle\", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__[\"easeCircle\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeCircleIn\", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__[\"easeCircleIn\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeCircleOut\", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__[\"easeCircleOut\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeCircleInOut\", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__[\"easeCircleInOut\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeBounce\", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__[\"easeBounce\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeBounceIn\", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__[\"easeBounceIn\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeBounceOut\", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__[\"easeBounceOut\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeBounceInOut\", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__[\"easeBounceInOut\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeBack\", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__[\"easeBack\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeBackIn\", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__[\"easeBackIn\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeBackOut\", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__[\"easeBackOut\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeBackInOut\", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__[\"easeBackInOut\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeElastic\", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__[\"easeElastic\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeElasticIn\", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__[\"easeElasticIn\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeElasticOut\", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__[\"easeElasticOut\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeElasticInOut\", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__[\"easeElasticInOut\"]; });\n\n/* harmony import */ var d3_fetch__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! d3-fetch */ \"./node_modules/dagre-d3/node_modules/d3-fetch/src/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"blob\", function() { return d3_fetch__WEBPACK_IMPORTED_MODULE_12__[\"blob\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"buffer\", function() { return d3_fetch__WEBPACK_IMPORTED_MODULE_12__[\"buffer\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"dsv\", function() { return d3_fetch__WEBPACK_IMPORTED_MODULE_12__[\"dsv\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"csv\", function() { return d3_fetch__WEBPACK_IMPORTED_MODULE_12__[\"csv\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"tsv\", function() { return d3_fetch__WEBPACK_IMPORTED_MODULE_12__[\"tsv\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"image\", function() { return d3_fetch__WEBPACK_IMPORTED_MODULE_12__[\"image\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"json\", function() { return d3_fetch__WEBPACK_IMPORTED_MODULE_12__[\"json\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"text\", function() { return d3_fetch__WEBPACK_IMPORTED_MODULE_12__[\"text\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"xml\", function() { return d3_fetch__WEBPACK_IMPORTED_MODULE_12__[\"xml\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"html\", function() { return d3_fetch__WEBPACK_IMPORTED_MODULE_12__[\"html\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"svg\", function() { return d3_fetch__WEBPACK_IMPORTED_MODULE_12__[\"svg\"]; });\n\n/* harmony import */ var d3_force__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! d3-force */ \"./node_modules/dagre-d3/node_modules/d3-force/src/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"forceCenter\", function() { return d3_force__WEBPACK_IMPORTED_MODULE_13__[\"forceCenter\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"forceCollide\", function() { return d3_force__WEBPACK_IMPORTED_MODULE_13__[\"forceCollide\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"forceLink\", function() { return d3_force__WEBPACK_IMPORTED_MODULE_13__[\"forceLink\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"forceManyBody\", function() { return d3_force__WEBPACK_IMPORTED_MODULE_13__[\"forceManyBody\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"forceRadial\", function() { return d3_force__WEBPACK_IMPORTED_MODULE_13__[\"forceRadial\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"forceSimulation\", function() { return d3_force__WEBPACK_IMPORTED_MODULE_13__[\"forceSimulation\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"forceX\", function() { return d3_force__WEBPACK_IMPORTED_MODULE_13__[\"forceX\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"forceY\", function() { return d3_force__WEBPACK_IMPORTED_MODULE_13__[\"forceY\"]; });\n\n/* harmony import */ var d3_format__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! d3-format */ \"./node_modules/d3-format/src/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"formatDefaultLocale\", function() { return d3_format__WEBPACK_IMPORTED_MODULE_14__[\"formatDefaultLocale\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"format\", function() { return d3_format__WEBPACK_IMPORTED_MODULE_14__[\"format\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"formatPrefix\", function() { return d3_format__WEBPACK_IMPORTED_MODULE_14__[\"formatPrefix\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"formatLocale\", function() { return d3_format__WEBPACK_IMPORTED_MODULE_14__[\"formatLocale\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"formatSpecifier\", function() { return d3_format__WEBPACK_IMPORTED_MODULE_14__[\"formatSpecifier\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"FormatSpecifier\", function() { return d3_format__WEBPACK_IMPORTED_MODULE_14__[\"FormatSpecifier\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"precisionFixed\", function() { return d3_format__WEBPACK_IMPORTED_MODULE_14__[\"precisionFixed\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"precisionPrefix\", function() { return d3_format__WEBPACK_IMPORTED_MODULE_14__[\"precisionPrefix\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"precisionRound\", function() { return d3_format__WEBPACK_IMPORTED_MODULE_14__[\"precisionRound\"]; });\n\n/* harmony import */ var d3_geo__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! d3-geo */ \"./node_modules/dagre-d3/node_modules/d3-geo/src/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoArea\", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__[\"geoArea\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoBounds\", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__[\"geoBounds\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoCentroid\", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__[\"geoCentroid\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoCircle\", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__[\"geoCircle\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoClipAntimeridian\", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__[\"geoClipAntimeridian\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoClipCircle\", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__[\"geoClipCircle\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoClipExtent\", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__[\"geoClipExtent\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoClipRectangle\", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__[\"geoClipRectangle\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoContains\", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__[\"geoContains\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoDistance\", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__[\"geoDistance\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoGraticule\", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__[\"geoGraticule\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoGraticule10\", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__[\"geoGraticule10\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoInterpolate\", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__[\"geoInterpolate\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoLength\", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__[\"geoLength\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoPath\", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__[\"geoPath\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoAlbers\", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__[\"geoAlbers\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoAlbersUsa\", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__[\"geoAlbersUsa\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoAzimuthalEqualArea\", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__[\"geoAzimuthalEqualArea\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoAzimuthalEqualAreaRaw\", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__[\"geoAzimuthalEqualAreaRaw\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoAzimuthalEquidistant\", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__[\"geoAzimuthalEquidistant\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoAzimuthalEquidistantRaw\", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__[\"geoAzimuthalEquidistantRaw\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoConicConformal\", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__[\"geoConicConformal\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoConicConformalRaw\", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__[\"geoConicConformalRaw\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoConicEqualArea\", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__[\"geoConicEqualArea\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoConicEqualAreaRaw\", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__[\"geoConicEqualAreaRaw\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoConicEquidistant\", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__[\"geoConicEquidistant\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoConicEquidistantRaw\", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__[\"geoConicEquidistantRaw\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoEqualEarth\", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__[\"geoEqualEarth\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoEqualEarthRaw\", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__[\"geoEqualEarthRaw\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoEquirectangular\", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__[\"geoEquirectangular\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoEquirectangularRaw\", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__[\"geoEquirectangularRaw\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoGnomonic\", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__[\"geoGnomonic\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoGnomonicRaw\", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__[\"geoGnomonicRaw\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoIdentity\", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__[\"geoIdentity\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoProjection\", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__[\"geoProjection\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoProjectionMutator\", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__[\"geoProjectionMutator\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoMercator\", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__[\"geoMercator\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoMercatorRaw\", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__[\"geoMercatorRaw\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoNaturalEarth1\", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__[\"geoNaturalEarth1\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoNaturalEarth1Raw\", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__[\"geoNaturalEarth1Raw\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoOrthographic\", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__[\"geoOrthographic\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoOrthographicRaw\", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__[\"geoOrthographicRaw\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoStereographic\", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__[\"geoStereographic\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoStereographicRaw\", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__[\"geoStereographicRaw\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoTransverseMercator\", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__[\"geoTransverseMercator\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoTransverseMercatorRaw\", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__[\"geoTransverseMercatorRaw\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoRotation\", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__[\"geoRotation\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoStream\", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__[\"geoStream\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoTransform\", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__[\"geoTransform\"]; });\n\n/* harmony import */ var d3_hierarchy__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! d3-hierarchy */ \"./node_modules/dagre-d3/node_modules/d3-hierarchy/src/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"cluster\", function() { return d3_hierarchy__WEBPACK_IMPORTED_MODULE_16__[\"cluster\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"hierarchy\", function() { return d3_hierarchy__WEBPACK_IMPORTED_MODULE_16__[\"hierarchy\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"pack\", function() { return d3_hierarchy__WEBPACK_IMPORTED_MODULE_16__[\"pack\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"packSiblings\", function() { return d3_hierarchy__WEBPACK_IMPORTED_MODULE_16__[\"packSiblings\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"packEnclose\", function() { return d3_hierarchy__WEBPACK_IMPORTED_MODULE_16__[\"packEnclose\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"partition\", function() { return d3_hierarchy__WEBPACK_IMPORTED_MODULE_16__[\"partition\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"stratify\", function() { return d3_hierarchy__WEBPACK_IMPORTED_MODULE_16__[\"stratify\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"tree\", function() { return d3_hierarchy__WEBPACK_IMPORTED_MODULE_16__[\"tree\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"treemap\", function() { return d3_hierarchy__WEBPACK_IMPORTED_MODULE_16__[\"treemap\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"treemapBinary\", function() { return d3_hierarchy__WEBPACK_IMPORTED_MODULE_16__[\"treemapBinary\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"treemapDice\", function() { return d3_hierarchy__WEBPACK_IMPORTED_MODULE_16__[\"treemapDice\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"treemapSlice\", function() { return d3_hierarchy__WEBPACK_IMPORTED_MODULE_16__[\"treemapSlice\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"treemapSliceDice\", function() { return d3_hierarchy__WEBPACK_IMPORTED_MODULE_16__[\"treemapSliceDice\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"treemapSquarify\", function() { return d3_hierarchy__WEBPACK_IMPORTED_MODULE_16__[\"treemapSquarify\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"treemapResquarify\", function() { return d3_hierarchy__WEBPACK_IMPORTED_MODULE_16__[\"treemapResquarify\"]; });\n\n/* harmony import */ var d3_interpolate__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! d3-interpolate */ \"./node_modules/d3-interpolate/src/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolate\", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_17__[\"interpolate\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateArray\", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_17__[\"interpolateArray\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateBasis\", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_17__[\"interpolateBasis\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateBasisClosed\", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_17__[\"interpolateBasisClosed\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateDate\", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_17__[\"interpolateDate\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateDiscrete\", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_17__[\"interpolateDiscrete\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateHue\", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_17__[\"interpolateHue\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateNumber\", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_17__[\"interpolateNumber\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateNumberArray\", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_17__[\"interpolateNumberArray\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateObject\", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_17__[\"interpolateObject\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateRound\", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_17__[\"interpolateRound\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateString\", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_17__[\"interpolateString\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateTransformCss\", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_17__[\"interpolateTransformCss\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateTransformSvg\", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_17__[\"interpolateTransformSvg\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateZoom\", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_17__[\"interpolateZoom\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateRgb\", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_17__[\"interpolateRgb\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateRgbBasis\", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_17__[\"interpolateRgbBasis\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateRgbBasisClosed\", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_17__[\"interpolateRgbBasisClosed\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateHsl\", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_17__[\"interpolateHsl\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateHslLong\", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_17__[\"interpolateHslLong\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateLab\", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_17__[\"interpolateLab\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateHcl\", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_17__[\"interpolateHcl\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateHclLong\", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_17__[\"interpolateHclLong\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateCubehelix\", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_17__[\"interpolateCubehelix\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateCubehelixLong\", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_17__[\"interpolateCubehelixLong\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"piecewise\", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_17__[\"piecewise\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"quantize\", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_17__[\"quantize\"]; });\n\n/* harmony import */ var d3_path__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! d3-path */ \"./node_modules/d3-path/src/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"path\", function() { return d3_path__WEBPACK_IMPORTED_MODULE_18__[\"path\"]; });\n\n/* harmony import */ var d3_polygon__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! d3-polygon */ \"./node_modules/dagre-d3/node_modules/d3-polygon/src/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"polygonArea\", function() { return d3_polygon__WEBPACK_IMPORTED_MODULE_19__[\"polygonArea\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"polygonCentroid\", function() { return d3_polygon__WEBPACK_IMPORTED_MODULE_19__[\"polygonCentroid\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"polygonHull\", function() { return d3_polygon__WEBPACK_IMPORTED_MODULE_19__[\"polygonHull\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"polygonContains\", function() { return d3_polygon__WEBPACK_IMPORTED_MODULE_19__[\"polygonContains\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"polygonLength\", function() { return d3_polygon__WEBPACK_IMPORTED_MODULE_19__[\"polygonLength\"]; });\n\n/* harmony import */ var d3_quadtree__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! d3-quadtree */ \"./node_modules/d3-quadtree/src/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"quadtree\", function() { return d3_quadtree__WEBPACK_IMPORTED_MODULE_20__[\"quadtree\"]; });\n\n/* harmony import */ var d3_random__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! d3-random */ \"./node_modules/dagre-d3/node_modules/d3-random/src/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"randomUniform\", function() { return d3_random__WEBPACK_IMPORTED_MODULE_21__[\"randomUniform\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"randomNormal\", function() { return d3_random__WEBPACK_IMPORTED_MODULE_21__[\"randomNormal\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"randomLogNormal\", function() { return d3_random__WEBPACK_IMPORTED_MODULE_21__[\"randomLogNormal\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"randomBates\", function() { return d3_random__WEBPACK_IMPORTED_MODULE_21__[\"randomBates\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"randomIrwinHall\", function() { return d3_random__WEBPACK_IMPORTED_MODULE_21__[\"randomIrwinHall\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"randomExponential\", function() { return d3_random__WEBPACK_IMPORTED_MODULE_21__[\"randomExponential\"]; });\n\n/* harmony import */ var d3_scale__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! d3-scale */ \"./node_modules/dagre-d3/node_modules/d3-scale/src/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"scaleBand\", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_22__[\"scaleBand\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"scalePoint\", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_22__[\"scalePoint\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"scaleIdentity\", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_22__[\"scaleIdentity\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"scaleLinear\", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_22__[\"scaleLinear\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"scaleLog\", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_22__[\"scaleLog\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"scaleSymlog\", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_22__[\"scaleSymlog\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"scaleOrdinal\", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_22__[\"scaleOrdinal\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"scaleImplicit\", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_22__[\"scaleImplicit\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"scalePow\", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_22__[\"scalePow\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"scaleSqrt\", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_22__[\"scaleSqrt\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"scaleQuantile\", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_22__[\"scaleQuantile\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"scaleQuantize\", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_22__[\"scaleQuantize\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"scaleThreshold\", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_22__[\"scaleThreshold\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"scaleTime\", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_22__[\"scaleTime\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"scaleUtc\", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_22__[\"scaleUtc\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"scaleSequential\", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_22__[\"scaleSequential\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"scaleSequentialLog\", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_22__[\"scaleSequentialLog\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"scaleSequentialPow\", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_22__[\"scaleSequentialPow\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"scaleSequentialSqrt\", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_22__[\"scaleSequentialSqrt\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"scaleSequentialSymlog\", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_22__[\"scaleSequentialSymlog\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"scaleSequentialQuantile\", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_22__[\"scaleSequentialQuantile\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"scaleDiverging\", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_22__[\"scaleDiverging\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"scaleDivergingLog\", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_22__[\"scaleDivergingLog\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"scaleDivergingPow\", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_22__[\"scaleDivergingPow\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"scaleDivergingSqrt\", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_22__[\"scaleDivergingSqrt\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"scaleDivergingSymlog\", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_22__[\"scaleDivergingSymlog\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"tickFormat\", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_22__[\"tickFormat\"]; });\n\n/* harmony import */ var d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! d3-scale-chromatic */ \"./node_modules/dagre-d3/node_modules/d3-scale-chromatic/src/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"schemeCategory10\", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__[\"schemeCategory10\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"schemeAccent\", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__[\"schemeAccent\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"schemeDark2\", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__[\"schemeDark2\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"schemePaired\", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__[\"schemePaired\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"schemePastel1\", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__[\"schemePastel1\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"schemePastel2\", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__[\"schemePastel2\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"schemeSet1\", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__[\"schemeSet1\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"schemeSet2\", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__[\"schemeSet2\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"schemeSet3\", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__[\"schemeSet3\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"schemeTableau10\", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__[\"schemeTableau10\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateBrBG\", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__[\"interpolateBrBG\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"schemeBrBG\", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__[\"schemeBrBG\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolatePRGn\", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__[\"interpolatePRGn\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"schemePRGn\", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__[\"schemePRGn\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolatePiYG\", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__[\"interpolatePiYG\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"schemePiYG\", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__[\"schemePiYG\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolatePuOr\", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__[\"interpolatePuOr\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"schemePuOr\", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__[\"schemePuOr\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateRdBu\", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__[\"interpolateRdBu\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"schemeRdBu\", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__[\"schemeRdBu\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateRdGy\", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__[\"interpolateRdGy\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"schemeRdGy\", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__[\"schemeRdGy\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateRdYlBu\", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__[\"interpolateRdYlBu\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"schemeRdYlBu\", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__[\"schemeRdYlBu\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateRdYlGn\", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__[\"interpolateRdYlGn\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"schemeRdYlGn\", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__[\"schemeRdYlGn\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateSpectral\", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__[\"interpolateSpectral\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"schemeSpectral\", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__[\"schemeSpectral\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateBuGn\", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__[\"interpolateBuGn\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"schemeBuGn\", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__[\"schemeBuGn\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateBuPu\", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__[\"interpolateBuPu\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"schemeBuPu\", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__[\"schemeBuPu\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateGnBu\", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__[\"interpolateGnBu\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"schemeGnBu\", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__[\"schemeGnBu\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateOrRd\", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__[\"interpolateOrRd\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"schemeOrRd\", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__[\"schemeOrRd\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolatePuBuGn\", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__[\"interpolatePuBuGn\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"schemePuBuGn\", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__[\"schemePuBuGn\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolatePuBu\", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__[\"interpolatePuBu\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"schemePuBu\", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__[\"schemePuBu\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolatePuRd\", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__[\"interpolatePuRd\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"schemePuRd\", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__[\"schemePuRd\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateRdPu\", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__[\"interpolateRdPu\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"schemeRdPu\", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__[\"schemeRdPu\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateYlGnBu\", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__[\"interpolateYlGnBu\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"schemeYlGnBu\", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__[\"schemeYlGnBu\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateYlGn\", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__[\"interpolateYlGn\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"schemeYlGn\", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__[\"schemeYlGn\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateYlOrBr\", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__[\"interpolateYlOrBr\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"schemeYlOrBr\", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__[\"schemeYlOrBr\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateYlOrRd\", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__[\"interpolateYlOrRd\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"schemeYlOrRd\", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__[\"schemeYlOrRd\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateBlues\", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__[\"interpolateBlues\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"schemeBlues\", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__[\"schemeBlues\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateGreens\", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__[\"interpolateGreens\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"schemeGreens\", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__[\"schemeGreens\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateGreys\", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__[\"interpolateGreys\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"schemeGreys\", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__[\"schemeGreys\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolatePurples\", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__[\"interpolatePurples\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"schemePurples\", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__[\"schemePurples\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateReds\", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__[\"interpolateReds\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"schemeReds\", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__[\"schemeReds\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateOranges\", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__[\"interpolateOranges\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"schemeOranges\", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__[\"schemeOranges\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateCividis\", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__[\"interpolateCividis\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateCubehelixDefault\", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__[\"interpolateCubehelixDefault\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateRainbow\", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__[\"interpolateRainbow\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateWarm\", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__[\"interpolateWarm\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateCool\", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__[\"interpolateCool\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateSinebow\", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__[\"interpolateSinebow\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateTurbo\", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__[\"interpolateTurbo\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateViridis\", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__[\"interpolateViridis\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateMagma\", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__[\"interpolateMagma\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateInferno\", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__[\"interpolateInferno\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolatePlasma\", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__[\"interpolatePlasma\"]; });\n\n/* harmony import */ var d3_selection__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! d3-selection */ \"./node_modules/d3-selection/src/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"create\", function() { return d3_selection__WEBPACK_IMPORTED_MODULE_24__[\"create\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"creator\", function() { return d3_selection__WEBPACK_IMPORTED_MODULE_24__[\"creator\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"local\", function() { return d3_selection__WEBPACK_IMPORTED_MODULE_24__[\"local\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"matcher\", function() { return d3_selection__WEBPACK_IMPORTED_MODULE_24__[\"matcher\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"mouse\", function() { return d3_selection__WEBPACK_IMPORTED_MODULE_24__[\"mouse\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"namespace\", function() { return d3_selection__WEBPACK_IMPORTED_MODULE_24__[\"namespace\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"namespaces\", function() { return d3_selection__WEBPACK_IMPORTED_MODULE_24__[\"namespaces\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"clientPoint\", function() { return d3_selection__WEBPACK_IMPORTED_MODULE_24__[\"clientPoint\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"select\", function() { return d3_selection__WEBPACK_IMPORTED_MODULE_24__[\"select\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"selectAll\", function() { return d3_selection__WEBPACK_IMPORTED_MODULE_24__[\"selectAll\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"selection\", function() { return d3_selection__WEBPACK_IMPORTED_MODULE_24__[\"selection\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"selector\", function() { return d3_selection__WEBPACK_IMPORTED_MODULE_24__[\"selector\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"selectorAll\", function() { return d3_selection__WEBPACK_IMPORTED_MODULE_24__[\"selectorAll\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"style\", function() { return d3_selection__WEBPACK_IMPORTED_MODULE_24__[\"style\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"touch\", function() { return d3_selection__WEBPACK_IMPORTED_MODULE_24__[\"touch\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"touches\", function() { return d3_selection__WEBPACK_IMPORTED_MODULE_24__[\"touches\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"window\", function() { return d3_selection__WEBPACK_IMPORTED_MODULE_24__[\"window\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"event\", function() { return d3_selection__WEBPACK_IMPORTED_MODULE_24__[\"event\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"customEvent\", function() { return d3_selection__WEBPACK_IMPORTED_MODULE_24__[\"customEvent\"]; });\n\n/* harmony import */ var d3_shape__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! d3-shape */ \"./node_modules/dagre-d3/node_modules/d3-shape/src/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"arc\", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__[\"arc\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"area\", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__[\"area\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"line\", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__[\"line\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"pie\", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__[\"pie\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"areaRadial\", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__[\"areaRadial\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"radialArea\", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__[\"radialArea\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"lineRadial\", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__[\"lineRadial\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"radialLine\", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__[\"radialLine\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"pointRadial\", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__[\"pointRadial\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"linkHorizontal\", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__[\"linkHorizontal\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"linkVertical\", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__[\"linkVertical\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"linkRadial\", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__[\"linkRadial\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"symbol\", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__[\"symbol\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"symbols\", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__[\"symbols\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"symbolCircle\", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__[\"symbolCircle\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"symbolCross\", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__[\"symbolCross\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"symbolDiamond\", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__[\"symbolDiamond\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"symbolSquare\", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__[\"symbolSquare\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"symbolStar\", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__[\"symbolStar\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"symbolTriangle\", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__[\"symbolTriangle\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"symbolWye\", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__[\"symbolWye\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"curveBasisClosed\", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__[\"curveBasisClosed\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"curveBasisOpen\", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__[\"curveBasisOpen\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"curveBasis\", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__[\"curveBasis\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"curveBundle\", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__[\"curveBundle\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"curveCardinalClosed\", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__[\"curveCardinalClosed\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"curveCardinalOpen\", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__[\"curveCardinalOpen\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"curveCardinal\", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__[\"curveCardinal\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"curveCatmullRomClosed\", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__[\"curveCatmullRomClosed\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"curveCatmullRomOpen\", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__[\"curveCatmullRomOpen\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"curveCatmullRom\", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__[\"curveCatmullRom\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"curveLinearClosed\", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__[\"curveLinearClosed\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"curveLinear\", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__[\"curveLinear\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"curveMonotoneX\", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__[\"curveMonotoneX\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"curveMonotoneY\", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__[\"curveMonotoneY\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"curveNatural\", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__[\"curveNatural\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"curveStep\", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__[\"curveStep\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"curveStepAfter\", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__[\"curveStepAfter\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"curveStepBefore\", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__[\"curveStepBefore\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"stack\", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__[\"stack\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"stackOffsetExpand\", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__[\"stackOffsetExpand\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"stackOffsetDiverging\", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__[\"stackOffsetDiverging\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"stackOffsetNone\", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__[\"stackOffsetNone\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"stackOffsetSilhouette\", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__[\"stackOffsetSilhouette\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"stackOffsetWiggle\", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__[\"stackOffsetWiggle\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"stackOrderAppearance\", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__[\"stackOrderAppearance\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"stackOrderAscending\", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__[\"stackOrderAscending\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"stackOrderDescending\", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__[\"stackOrderDescending\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"stackOrderInsideOut\", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__[\"stackOrderInsideOut\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"stackOrderNone\", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__[\"stackOrderNone\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"stackOrderReverse\", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__[\"stackOrderReverse\"]; });\n\n/* harmony import */ var d3_time__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! d3-time */ \"./node_modules/d3-time/src/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeInterval\", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__[\"timeInterval\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeMillisecond\", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__[\"timeMillisecond\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeMilliseconds\", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__[\"timeMilliseconds\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcMillisecond\", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__[\"utcMillisecond\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcMilliseconds\", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__[\"utcMilliseconds\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeSecond\", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__[\"timeSecond\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeSeconds\", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__[\"timeSeconds\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcSecond\", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__[\"utcSecond\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcSeconds\", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__[\"utcSeconds\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeMinute\", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__[\"timeMinute\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeMinutes\", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__[\"timeMinutes\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeHour\", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__[\"timeHour\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeHours\", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__[\"timeHours\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeDay\", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__[\"timeDay\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeDays\", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__[\"timeDays\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeWeek\", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__[\"timeWeek\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeWeeks\", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__[\"timeWeeks\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeSunday\", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__[\"timeSunday\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeSundays\", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__[\"timeSundays\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeMonday\", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__[\"timeMonday\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeMondays\", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__[\"timeMondays\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeTuesday\", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__[\"timeTuesday\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeTuesdays\", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__[\"timeTuesdays\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeWednesday\", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__[\"timeWednesday\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeWednesdays\", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__[\"timeWednesdays\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeThursday\", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__[\"timeThursday\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeThursdays\", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__[\"timeThursdays\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeFriday\", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__[\"timeFriday\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeFridays\", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__[\"timeFridays\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeSaturday\", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__[\"timeSaturday\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeSaturdays\", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__[\"timeSaturdays\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeMonth\", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__[\"timeMonth\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeMonths\", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__[\"timeMonths\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeYear\", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__[\"timeYear\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeYears\", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__[\"timeYears\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcMinute\", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__[\"utcMinute\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcMinutes\", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__[\"utcMinutes\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcHour\", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__[\"utcHour\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcHours\", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__[\"utcHours\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcDay\", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__[\"utcDay\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcDays\", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__[\"utcDays\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcWeek\", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__[\"utcWeek\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcWeeks\", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__[\"utcWeeks\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcSunday\", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__[\"utcSunday\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcSundays\", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__[\"utcSundays\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcMonday\", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__[\"utcMonday\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcMondays\", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__[\"utcMondays\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcTuesday\", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__[\"utcTuesday\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcTuesdays\", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__[\"utcTuesdays\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcWednesday\", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__[\"utcWednesday\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcWednesdays\", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__[\"utcWednesdays\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcThursday\", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__[\"utcThursday\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcThursdays\", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__[\"utcThursdays\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcFriday\", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__[\"utcFriday\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcFridays\", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__[\"utcFridays\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcSaturday\", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__[\"utcSaturday\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcSaturdays\", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__[\"utcSaturdays\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcMonth\", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__[\"utcMonth\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcMonths\", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__[\"utcMonths\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcYear\", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__[\"utcYear\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcYears\", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__[\"utcYears\"]; });\n\n/* harmony import */ var d3_time_format__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! d3-time-format */ \"./node_modules/d3-time-format/src/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeFormatDefaultLocale\", function() { return d3_time_format__WEBPACK_IMPORTED_MODULE_27__[\"timeFormatDefaultLocale\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeFormat\", function() { return d3_time_format__WEBPACK_IMPORTED_MODULE_27__[\"timeFormat\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeParse\", function() { return d3_time_format__WEBPACK_IMPORTED_MODULE_27__[\"timeParse\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcFormat\", function() { return d3_time_format__WEBPACK_IMPORTED_MODULE_27__[\"utcFormat\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcParse\", function() { return d3_time_format__WEBPACK_IMPORTED_MODULE_27__[\"utcParse\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeFormatLocale\", function() { return d3_time_format__WEBPACK_IMPORTED_MODULE_27__[\"timeFormatLocale\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"isoFormat\", function() { return d3_time_format__WEBPACK_IMPORTED_MODULE_27__[\"isoFormat\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"isoParse\", function() { return d3_time_format__WEBPACK_IMPORTED_MODULE_27__[\"isoParse\"]; });\n\n/* harmony import */ var d3_timer__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! d3-timer */ \"./node_modules/d3-timer/src/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"now\", function() { return d3_timer__WEBPACK_IMPORTED_MODULE_28__[\"now\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timer\", function() { return d3_timer__WEBPACK_IMPORTED_MODULE_28__[\"timer\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timerFlush\", function() { return d3_timer__WEBPACK_IMPORTED_MODULE_28__[\"timerFlush\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeout\", function() { return d3_timer__WEBPACK_IMPORTED_MODULE_28__[\"timeout\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interval\", function() { return d3_timer__WEBPACK_IMPORTED_MODULE_28__[\"interval\"]; });\n\n/* harmony import */ var d3_transition__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! d3-transition */ \"./node_modules/d3-transition/src/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"transition\", function() { return d3_transition__WEBPACK_IMPORTED_MODULE_29__[\"transition\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"active\", function() { return d3_transition__WEBPACK_IMPORTED_MODULE_29__[\"active\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interrupt\", function() { return d3_transition__WEBPACK_IMPORTED_MODULE_29__[\"interrupt\"]; });\n\n/* harmony import */ var d3_voronoi__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! d3-voronoi */ \"./node_modules/d3-voronoi/src/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"voronoi\", function() { return d3_voronoi__WEBPACK_IMPORTED_MODULE_30__[\"voronoi\"]; });\n\n/* harmony import */ var d3_zoom__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! d3-zoom */ \"./node_modules/dagre-d3/node_modules/d3-zoom/src/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"zoom\", function() { return d3_zoom__WEBPACK_IMPORTED_MODULE_31__[\"zoom\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"zoomTransform\", function() { return d3_zoom__WEBPACK_IMPORTED_MODULE_31__[\"zoomTransform\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"zoomIdentity\", function() { return d3_zoom__WEBPACK_IMPORTED_MODULE_31__[\"zoomIdentity\"]; });\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre/index.js\":\n/*!*************************************!*\\\n  !*** ./node_modules/dagre/index.js ***!\n  \\*************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n/*\nCopyright (c) 2012-2014 Chris Pettitt\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n*/\n\nmodule.exports = {\n  graphlib: __webpack_require__(/*! ./lib/graphlib */ \"./node_modules/dagre/lib/graphlib.js\"),\n\n  layout: __webpack_require__(/*! ./lib/layout */ \"./node_modules/dagre/lib/layout.js\"),\n  debug: __webpack_require__(/*! ./lib/debug */ \"./node_modules/dagre/lib/debug.js\"),\n  util: {\n    time: __webpack_require__(/*! ./lib/util */ \"./node_modules/dagre/lib/util.js\").time,\n    notime: __webpack_require__(/*! ./lib/util */ \"./node_modules/dagre/lib/util.js\").notime\n  },\n  version: __webpack_require__(/*! ./lib/version */ \"./node_modules/dagre/lib/version.js\")\n};\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre/lib/acyclic.js\":\n/*!*******************************************!*\\\n  !*** ./node_modules/dagre/lib/acyclic.js ***!\n  \\*******************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _ = __webpack_require__(/*! ./lodash */ \"./node_modules/dagre/lib/lodash.js\");\nvar greedyFAS = __webpack_require__(/*! ./greedy-fas */ \"./node_modules/dagre/lib/greedy-fas.js\");\n\nmodule.exports = {\n  run: run,\n  undo: undo\n};\n\nfunction run(g) {\n  var fas = (g.graph().acyclicer === \"greedy\"\n    ? greedyFAS(g, weightFn(g))\n    : dfsFAS(g));\n  _.forEach(fas, function(e) {\n    var label = g.edge(e);\n    g.removeEdge(e);\n    label.forwardName = e.name;\n    label.reversed = true;\n    g.setEdge(e.w, e.v, label, _.uniqueId(\"rev\"));\n  });\n\n  function weightFn(g) {\n    return function(e) {\n      return g.edge(e).weight;\n    };\n  }\n}\n\nfunction dfsFAS(g) {\n  var fas = [];\n  var stack = {};\n  var visited = {};\n\n  function dfs(v) {\n    if (_.has(visited, v)) {\n      return;\n    }\n    visited[v] = true;\n    stack[v] = true;\n    _.forEach(g.outEdges(v), function(e) {\n      if (_.has(stack, e.w)) {\n        fas.push(e);\n      } else {\n        dfs(e.w);\n      }\n    });\n    delete stack[v];\n  }\n\n  _.forEach(g.nodes(), dfs);\n  return fas;\n}\n\nfunction undo(g) {\n  _.forEach(g.edges(), function(e) {\n    var label = g.edge(e);\n    if (label.reversed) {\n      g.removeEdge(e);\n\n      var forwardName = label.forwardName;\n      delete label.reversed;\n      delete label.forwardName;\n      g.setEdge(e.w, e.v, label, forwardName);\n    }\n  });\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre/lib/add-border-segments.js\":\n/*!*******************************************************!*\\\n  !*** ./node_modules/dagre/lib/add-border-segments.js ***!\n  \\*******************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar _ = __webpack_require__(/*! ./lodash */ \"./node_modules/dagre/lib/lodash.js\");\nvar util = __webpack_require__(/*! ./util */ \"./node_modules/dagre/lib/util.js\");\n\nmodule.exports = addBorderSegments;\n\nfunction addBorderSegments(g) {\n  function dfs(v) {\n    var children = g.children(v);\n    var node = g.node(v);\n    if (children.length) {\n      _.forEach(children, dfs);\n    }\n\n    if (_.has(node, \"minRank\")) {\n      node.borderLeft = [];\n      node.borderRight = [];\n      for (var rank = node.minRank, maxRank = node.maxRank + 1;\n        rank < maxRank;\n        ++rank) {\n        addBorderNode(g, \"borderLeft\", \"_bl\", v, node, rank);\n        addBorderNode(g, \"borderRight\", \"_br\", v, node, rank);\n      }\n    }\n  }\n\n  _.forEach(g.children(), dfs);\n}\n\nfunction addBorderNode(g, prop, prefix, sg, sgNode, rank) {\n  var label = { width: 0, height: 0, rank: rank, borderType: prop };\n  var prev = sgNode[prop][rank - 1];\n  var curr = util.addDummyNode(g, \"border\", label, prefix);\n  sgNode[prop][rank] = curr;\n  g.setParent(curr, sg);\n  if (prev) {\n    g.setEdge(prev, curr, { weight: 1 });\n  }\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre/lib/coordinate-system.js\":\n/*!*****************************************************!*\\\n  !*** ./node_modules/dagre/lib/coordinate-system.js ***!\n  \\*****************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _ = __webpack_require__(/*! ./lodash */ \"./node_modules/dagre/lib/lodash.js\");\n\nmodule.exports = {\n  adjust: adjust,\n  undo: undo\n};\n\nfunction adjust(g) {\n  var rankDir = g.graph().rankdir.toLowerCase();\n  if (rankDir === \"lr\" || rankDir === \"rl\") {\n    swapWidthHeight(g);\n  }\n}\n\nfunction undo(g) {\n  var rankDir = g.graph().rankdir.toLowerCase();\n  if (rankDir === \"bt\" || rankDir === \"rl\") {\n    reverseY(g);\n  }\n\n  if (rankDir === \"lr\" || rankDir === \"rl\") {\n    swapXY(g);\n    swapWidthHeight(g);\n  }\n}\n\nfunction swapWidthHeight(g) {\n  _.forEach(g.nodes(), function(v) { swapWidthHeightOne(g.node(v)); });\n  _.forEach(g.edges(), function(e) { swapWidthHeightOne(g.edge(e)); });\n}\n\nfunction swapWidthHeightOne(attrs) {\n  var w = attrs.width;\n  attrs.width = attrs.height;\n  attrs.height = w;\n}\n\nfunction reverseY(g) {\n  _.forEach(g.nodes(), function(v) { reverseYOne(g.node(v)); });\n\n  _.forEach(g.edges(), function(e) {\n    var edge = g.edge(e);\n    _.forEach(edge.points, reverseYOne);\n    if (_.has(edge, \"y\")) {\n      reverseYOne(edge);\n    }\n  });\n}\n\nfunction reverseYOne(attrs) {\n  attrs.y = -attrs.y;\n}\n\nfunction swapXY(g) {\n  _.forEach(g.nodes(), function(v) { swapXYOne(g.node(v)); });\n\n  _.forEach(g.edges(), function(e) {\n    var edge = g.edge(e);\n    _.forEach(edge.points, swapXYOne);\n    if (_.has(edge, \"x\")) {\n      swapXYOne(edge);\n    }\n  });\n}\n\nfunction swapXYOne(attrs) {\n  var x = attrs.x;\n  attrs.x = attrs.y;\n  attrs.y = x;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre/lib/data/list.js\":\n/*!*********************************************!*\\\n  !*** ./node_modules/dagre/lib/data/list.js ***!\n  \\*********************************************/\n/*! no static exports found */\n/***/ (function(module, exports) {\n\n/*\n * Simple doubly linked list implementation derived from Cormen, et al.,\n * \"Introduction to Algorithms\".\n */\n\nmodule.exports = List;\n\nfunction List() {\n  var sentinel = {};\n  sentinel._next = sentinel._prev = sentinel;\n  this._sentinel = sentinel;\n}\n\nList.prototype.dequeue = function() {\n  var sentinel = this._sentinel;\n  var entry = sentinel._prev;\n  if (entry !== sentinel) {\n    unlink(entry);\n    return entry;\n  }\n};\n\nList.prototype.enqueue = function(entry) {\n  var sentinel = this._sentinel;\n  if (entry._prev && entry._next) {\n    unlink(entry);\n  }\n  entry._next = sentinel._next;\n  sentinel._next._prev = entry;\n  sentinel._next = entry;\n  entry._prev = sentinel;\n};\n\nList.prototype.toString = function() {\n  var strs = [];\n  var sentinel = this._sentinel;\n  var curr = sentinel._prev;\n  while (curr !== sentinel) {\n    strs.push(JSON.stringify(curr, filterOutLinks));\n    curr = curr._prev;\n  }\n  return \"[\" + strs.join(\", \") + \"]\";\n};\n\nfunction unlink(entry) {\n  entry._prev._next = entry._next;\n  entry._next._prev = entry._prev;\n  delete entry._next;\n  delete entry._prev;\n}\n\nfunction filterOutLinks(k, v) {\n  if (k !== \"_next\" && k !== \"_prev\") {\n    return v;\n  }\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre/lib/debug.js\":\n/*!*****************************************!*\\\n  !*** ./node_modules/dagre/lib/debug.js ***!\n  \\*****************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar _ = __webpack_require__(/*! ./lodash */ \"./node_modules/dagre/lib/lodash.js\");\nvar util = __webpack_require__(/*! ./util */ \"./node_modules/dagre/lib/util.js\");\nvar Graph = __webpack_require__(/*! ./graphlib */ \"./node_modules/dagre/lib/graphlib.js\").Graph;\n\nmodule.exports = {\n  debugOrdering: debugOrdering\n};\n\n/* istanbul ignore next */\nfunction debugOrdering(g) {\n  var layerMatrix = util.buildLayerMatrix(g);\n\n  var h = new Graph({ compound: true, multigraph: true }).setGraph({});\n\n  _.forEach(g.nodes(), function(v) {\n    h.setNode(v, { label: v });\n    h.setParent(v, \"layer\" + g.node(v).rank);\n  });\n\n  _.forEach(g.edges(), function(e) {\n    h.setEdge(e.v, e.w, {}, e.name);\n  });\n\n  _.forEach(layerMatrix, function(layer, i) {\n    var layerV = \"layer\" + i;\n    h.setNode(layerV, { rank: \"same\" });\n    _.reduce(layer, function(u, v) {\n      h.setEdge(u, v, { style: \"invis\" });\n      return v;\n    });\n  });\n\n  return h;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre/lib/graphlib.js\":\n/*!********************************************!*\\\n  !*** ./node_modules/dagre/lib/graphlib.js ***!\n  \\********************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n/* global window */\n\nvar graphlib;\n\nif (true) {\n  try {\n    graphlib = __webpack_require__(/*! graphlib */ \"./node_modules/graphlib/index.js\");\n  } catch (e) {\n    // continue regardless of error\n  }\n}\n\nif (!graphlib) {\n  graphlib = window.graphlib;\n}\n\nmodule.exports = graphlib;\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre/lib/greedy-fas.js\":\n/*!**********************************************!*\\\n  !*** ./node_modules/dagre/lib/greedy-fas.js ***!\n  \\**********************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar _ = __webpack_require__(/*! ./lodash */ \"./node_modules/dagre/lib/lodash.js\");\nvar Graph = __webpack_require__(/*! ./graphlib */ \"./node_modules/dagre/lib/graphlib.js\").Graph;\nvar List = __webpack_require__(/*! ./data/list */ \"./node_modules/dagre/lib/data/list.js\");\n\n/*\n * A greedy heuristic for finding a feedback arc set for a graph. A feedback\n * arc set is a set of edges that can be removed to make a graph acyclic.\n * The algorithm comes from: P. Eades, X. Lin, and W. F. Smyth, \"A fast and\n * effective heuristic for the feedback arc set problem.\" This implementation\n * adjusts that from the paper to allow for weighted edges.\n */\nmodule.exports = greedyFAS;\n\nvar DEFAULT_WEIGHT_FN = _.constant(1);\n\nfunction greedyFAS(g, weightFn) {\n  if (g.nodeCount() <= 1) {\n    return [];\n  }\n  var state = buildState(g, weightFn || DEFAULT_WEIGHT_FN);\n  var results = doGreedyFAS(state.graph, state.buckets, state.zeroIdx);\n\n  // Expand multi-edges\n  return _.flatten(_.map(results, function(e) {\n    return g.outEdges(e.v, e.w);\n  }), true);\n}\n\nfunction doGreedyFAS(g, buckets, zeroIdx) {\n  var results = [];\n  var sources = buckets[buckets.length - 1];\n  var sinks = buckets[0];\n\n  var entry;\n  while (g.nodeCount()) {\n    while ((entry = sinks.dequeue()))   { removeNode(g, buckets, zeroIdx, entry); }\n    while ((entry = sources.dequeue())) { removeNode(g, buckets, zeroIdx, entry); }\n    if (g.nodeCount()) {\n      for (var i = buckets.length - 2; i > 0; --i) {\n        entry = buckets[i].dequeue();\n        if (entry) {\n          results = results.concat(removeNode(g, buckets, zeroIdx, entry, true));\n          break;\n        }\n      }\n    }\n  }\n\n  return results;\n}\n\nfunction removeNode(g, buckets, zeroIdx, entry, collectPredecessors) {\n  var results = collectPredecessors ? [] : undefined;\n\n  _.forEach(g.inEdges(entry.v), function(edge) {\n    var weight = g.edge(edge);\n    var uEntry = g.node(edge.v);\n\n    if (collectPredecessors) {\n      results.push({ v: edge.v, w: edge.w });\n    }\n\n    uEntry.out -= weight;\n    assignBucket(buckets, zeroIdx, uEntry);\n  });\n\n  _.forEach(g.outEdges(entry.v), function(edge) {\n    var weight = g.edge(edge);\n    var w = edge.w;\n    var wEntry = g.node(w);\n    wEntry[\"in\"] -= weight;\n    assignBucket(buckets, zeroIdx, wEntry);\n  });\n\n  g.removeNode(entry.v);\n\n  return results;\n}\n\nfunction buildState(g, weightFn) {\n  var fasGraph = new Graph();\n  var maxIn = 0;\n  var maxOut = 0;\n\n  _.forEach(g.nodes(), function(v) {\n    fasGraph.setNode(v, { v: v, \"in\": 0, out: 0 });\n  });\n\n  // Aggregate weights on nodes, but also sum the weights across multi-edges\n  // into a single edge for the fasGraph.\n  _.forEach(g.edges(), function(e) {\n    var prevWeight = fasGraph.edge(e.v, e.w) || 0;\n    var weight = weightFn(e);\n    var edgeWeight = prevWeight + weight;\n    fasGraph.setEdge(e.v, e.w, edgeWeight);\n    maxOut = Math.max(maxOut, fasGraph.node(e.v).out += weight);\n    maxIn  = Math.max(maxIn,  fasGraph.node(e.w)[\"in\"]  += weight);\n  });\n\n  var buckets = _.range(maxOut + maxIn + 3).map(function() { return new List(); });\n  var zeroIdx = maxIn + 1;\n\n  _.forEach(fasGraph.nodes(), function(v) {\n    assignBucket(buckets, zeroIdx, fasGraph.node(v));\n  });\n\n  return { graph: fasGraph, buckets: buckets, zeroIdx: zeroIdx };\n}\n\nfunction assignBucket(buckets, zeroIdx, entry) {\n  if (!entry.out) {\n    buckets[0].enqueue(entry);\n  } else if (!entry[\"in\"]) {\n    buckets[buckets.length - 1].enqueue(entry);\n  } else {\n    buckets[entry.out - entry[\"in\"] + zeroIdx].enqueue(entry);\n  }\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre/lib/layout.js\":\n/*!******************************************!*\\\n  !*** ./node_modules/dagre/lib/layout.js ***!\n  \\******************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _ = __webpack_require__(/*! ./lodash */ \"./node_modules/dagre/lib/lodash.js\");\nvar acyclic = __webpack_require__(/*! ./acyclic */ \"./node_modules/dagre/lib/acyclic.js\");\nvar normalize = __webpack_require__(/*! ./normalize */ \"./node_modules/dagre/lib/normalize.js\");\nvar rank = __webpack_require__(/*! ./rank */ \"./node_modules/dagre/lib/rank/index.js\");\nvar normalizeRanks = __webpack_require__(/*! ./util */ \"./node_modules/dagre/lib/util.js\").normalizeRanks;\nvar parentDummyChains = __webpack_require__(/*! ./parent-dummy-chains */ \"./node_modules/dagre/lib/parent-dummy-chains.js\");\nvar removeEmptyRanks = __webpack_require__(/*! ./util */ \"./node_modules/dagre/lib/util.js\").removeEmptyRanks;\nvar nestingGraph = __webpack_require__(/*! ./nesting-graph */ \"./node_modules/dagre/lib/nesting-graph.js\");\nvar addBorderSegments = __webpack_require__(/*! ./add-border-segments */ \"./node_modules/dagre/lib/add-border-segments.js\");\nvar coordinateSystem = __webpack_require__(/*! ./coordinate-system */ \"./node_modules/dagre/lib/coordinate-system.js\");\nvar order = __webpack_require__(/*! ./order */ \"./node_modules/dagre/lib/order/index.js\");\nvar position = __webpack_require__(/*! ./position */ \"./node_modules/dagre/lib/position/index.js\");\nvar util = __webpack_require__(/*! ./util */ \"./node_modules/dagre/lib/util.js\");\nvar Graph = __webpack_require__(/*! ./graphlib */ \"./node_modules/dagre/lib/graphlib.js\").Graph;\n\nmodule.exports = layout;\n\nfunction layout(g, opts) {\n  var time = opts && opts.debugTiming ? util.time : util.notime;\n  time(\"layout\", function() {\n    var layoutGraph = \n      time(\"  buildLayoutGraph\", function() { return buildLayoutGraph(g); });\n    time(\"  runLayout\",        function() { runLayout(layoutGraph, time); });\n    time(\"  updateInputGraph\", function() { updateInputGraph(g, layoutGraph); });\n  });\n}\n\nfunction runLayout(g, time) {\n  time(\"    makeSpaceForEdgeLabels\", function() { makeSpaceForEdgeLabels(g); });\n  time(\"    removeSelfEdges\",        function() { removeSelfEdges(g); });\n  time(\"    acyclic\",                function() { acyclic.run(g); });\n  time(\"    nestingGraph.run\",       function() { nestingGraph.run(g); });\n  time(\"    rank\",                   function() { rank(util.asNonCompoundGraph(g)); });\n  time(\"    injectEdgeLabelProxies\", function() { injectEdgeLabelProxies(g); });\n  time(\"    removeEmptyRanks\",       function() { removeEmptyRanks(g); });\n  time(\"    nestingGraph.cleanup\",   function() { nestingGraph.cleanup(g); });\n  time(\"    normalizeRanks\",         function() { normalizeRanks(g); });\n  time(\"    assignRankMinMax\",       function() { assignRankMinMax(g); });\n  time(\"    removeEdgeLabelProxies\", function() { removeEdgeLabelProxies(g); });\n  time(\"    normalize.run\",          function() { normalize.run(g); });\n  time(\"    parentDummyChains\",      function() { parentDummyChains(g); });\n  time(\"    addBorderSegments\",      function() { addBorderSegments(g); });\n  time(\"    order\",                  function() { order(g); });\n  time(\"    insertSelfEdges\",        function() { insertSelfEdges(g); });\n  time(\"    adjustCoordinateSystem\", function() { coordinateSystem.adjust(g); });\n  time(\"    position\",               function() { position(g); });\n  time(\"    positionSelfEdges\",      function() { positionSelfEdges(g); });\n  time(\"    removeBorderNodes\",      function() { removeBorderNodes(g); });\n  time(\"    normalize.undo\",         function() { normalize.undo(g); });\n  time(\"    fixupEdgeLabelCoords\",   function() { fixupEdgeLabelCoords(g); });\n  time(\"    undoCoordinateSystem\",   function() { coordinateSystem.undo(g); });\n  time(\"    translateGraph\",         function() { translateGraph(g); });\n  time(\"    assignNodeIntersects\",   function() { assignNodeIntersects(g); });\n  time(\"    reversePoints\",          function() { reversePointsForReversedEdges(g); });\n  time(\"    acyclic.undo\",           function() { acyclic.undo(g); });\n}\n\n/*\n * Copies final layout information from the layout graph back to the input\n * graph. This process only copies whitelisted attributes from the layout graph\n * to the input graph, so it serves as a good place to determine what\n * attributes can influence layout.\n */\nfunction updateInputGraph(inputGraph, layoutGraph) {\n  _.forEach(inputGraph.nodes(), function(v) {\n    var inputLabel = inputGraph.node(v);\n    var layoutLabel = layoutGraph.node(v);\n\n    if (inputLabel) {\n      inputLabel.x = layoutLabel.x;\n      inputLabel.y = layoutLabel.y;\n\n      if (layoutGraph.children(v).length) {\n        inputLabel.width = layoutLabel.width;\n        inputLabel.height = layoutLabel.height;\n      }\n    }\n  });\n\n  _.forEach(inputGraph.edges(), function(e) {\n    var inputLabel = inputGraph.edge(e);\n    var layoutLabel = layoutGraph.edge(e);\n\n    inputLabel.points = layoutLabel.points;\n    if (_.has(layoutLabel, \"x\")) {\n      inputLabel.x = layoutLabel.x;\n      inputLabel.y = layoutLabel.y;\n    }\n  });\n\n  inputGraph.graph().width = layoutGraph.graph().width;\n  inputGraph.graph().height = layoutGraph.graph().height;\n}\n\nvar graphNumAttrs = [\"nodesep\", \"edgesep\", \"ranksep\", \"marginx\", \"marginy\"];\nvar graphDefaults = { ranksep: 50, edgesep: 20, nodesep: 50, rankdir: \"tb\" };\nvar graphAttrs = [\"acyclicer\", \"ranker\", \"rankdir\", \"align\"];\nvar nodeNumAttrs = [\"width\", \"height\"];\nvar nodeDefaults = { width: 0, height: 0 };\nvar edgeNumAttrs = [\"minlen\", \"weight\", \"width\", \"height\", \"labeloffset\"];\nvar edgeDefaults = {\n  minlen: 1, weight: 1, width: 0, height: 0,\n  labeloffset: 10, labelpos: \"r\"\n};\nvar edgeAttrs = [\"labelpos\"];\n\n/*\n * Constructs a new graph from the input graph, which can be used for layout.\n * This process copies only whitelisted attributes from the input graph to the\n * layout graph. Thus this function serves as a good place to determine what\n * attributes can influence layout.\n */\nfunction buildLayoutGraph(inputGraph) {\n  var g = new Graph({ multigraph: true, compound: true });\n  var graph = canonicalize(inputGraph.graph());\n\n  g.setGraph(_.merge({},\n    graphDefaults,\n    selectNumberAttrs(graph, graphNumAttrs),\n    _.pick(graph, graphAttrs)));\n\n  _.forEach(inputGraph.nodes(), function(v) {\n    var node = canonicalize(inputGraph.node(v));\n    g.setNode(v, _.defaults(selectNumberAttrs(node, nodeNumAttrs), nodeDefaults));\n    g.setParent(v, inputGraph.parent(v));\n  });\n\n  _.forEach(inputGraph.edges(), function(e) {\n    var edge = canonicalize(inputGraph.edge(e));\n    g.setEdge(e, _.merge({},\n      edgeDefaults,\n      selectNumberAttrs(edge, edgeNumAttrs),\n      _.pick(edge, edgeAttrs)));\n  });\n\n  return g;\n}\n\n/*\n * This idea comes from the Gansner paper: to account for edge labels in our\n * layout we split each rank in half by doubling minlen and halving ranksep.\n * Then we can place labels at these mid-points between nodes.\n *\n * We also add some minimal padding to the width to push the label for the edge\n * away from the edge itself a bit.\n */\nfunction makeSpaceForEdgeLabels(g) {\n  var graph = g.graph();\n  graph.ranksep /= 2;\n  _.forEach(g.edges(), function(e) {\n    var edge = g.edge(e);\n    edge.minlen *= 2;\n    if (edge.labelpos.toLowerCase() !== \"c\") {\n      if (graph.rankdir === \"TB\" || graph.rankdir === \"BT\") {\n        edge.width += edge.labeloffset;\n      } else {\n        edge.height += edge.labeloffset;\n      }\n    }\n  });\n}\n\n/*\n * Creates temporary dummy nodes that capture the rank in which each edge's\n * label is going to, if it has one of non-zero width and height. We do this\n * so that we can safely remove empty ranks while preserving balance for the\n * label's position.\n */\nfunction injectEdgeLabelProxies(g) {\n  _.forEach(g.edges(), function(e) {\n    var edge = g.edge(e);\n    if (edge.width && edge.height) {\n      var v = g.node(e.v);\n      var w = g.node(e.w);\n      var label = { rank: (w.rank - v.rank) / 2 + v.rank, e: e };\n      util.addDummyNode(g, \"edge-proxy\", label, \"_ep\");\n    }\n  });\n}\n\nfunction assignRankMinMax(g) {\n  var maxRank = 0;\n  _.forEach(g.nodes(), function(v) {\n    var node = g.node(v);\n    if (node.borderTop) {\n      node.minRank = g.node(node.borderTop).rank;\n      node.maxRank = g.node(node.borderBottom).rank;\n      maxRank = _.max(maxRank, node.maxRank);\n    }\n  });\n  g.graph().maxRank = maxRank;\n}\n\nfunction removeEdgeLabelProxies(g) {\n  _.forEach(g.nodes(), function(v) {\n    var node = g.node(v);\n    if (node.dummy === \"edge-proxy\") {\n      g.edge(node.e).labelRank = node.rank;\n      g.removeNode(v);\n    }\n  });\n}\n\nfunction translateGraph(g) {\n  var minX = Number.POSITIVE_INFINITY;\n  var maxX = 0;\n  var minY = Number.POSITIVE_INFINITY;\n  var maxY = 0;\n  var graphLabel = g.graph();\n  var marginX = graphLabel.marginx || 0;\n  var marginY = graphLabel.marginy || 0;\n\n  function getExtremes(attrs) {\n    var x = attrs.x;\n    var y = attrs.y;\n    var w = attrs.width;\n    var h = attrs.height;\n    minX = Math.min(minX, x - w / 2);\n    maxX = Math.max(maxX, x + w / 2);\n    minY = Math.min(minY, y - h / 2);\n    maxY = Math.max(maxY, y + h / 2);\n  }\n\n  _.forEach(g.nodes(), function(v) { getExtremes(g.node(v)); });\n  _.forEach(g.edges(), function(e) {\n    var edge = g.edge(e);\n    if (_.has(edge, \"x\")) {\n      getExtremes(edge);\n    }\n  });\n\n  minX -= marginX;\n  minY -= marginY;\n\n  _.forEach(g.nodes(), function(v) {\n    var node = g.node(v);\n    node.x -= minX;\n    node.y -= minY;\n  });\n\n  _.forEach(g.edges(), function(e) {\n    var edge = g.edge(e);\n    _.forEach(edge.points, function(p) {\n      p.x -= minX;\n      p.y -= minY;\n    });\n    if (_.has(edge, \"x\")) { edge.x -= minX; }\n    if (_.has(edge, \"y\")) { edge.y -= minY; }\n  });\n\n  graphLabel.width = maxX - minX + marginX;\n  graphLabel.height = maxY - minY + marginY;\n}\n\nfunction assignNodeIntersects(g) {\n  _.forEach(g.edges(), function(e) {\n    var edge = g.edge(e);\n    var nodeV = g.node(e.v);\n    var nodeW = g.node(e.w);\n    var p1, p2;\n    if (!edge.points) {\n      edge.points = [];\n      p1 = nodeW;\n      p2 = nodeV;\n    } else {\n      p1 = edge.points[0];\n      p2 = edge.points[edge.points.length - 1];\n    }\n    edge.points.unshift(util.intersectRect(nodeV, p1));\n    edge.points.push(util.intersectRect(nodeW, p2));\n  });\n}\n\nfunction fixupEdgeLabelCoords(g) {\n  _.forEach(g.edges(), function(e) {\n    var edge = g.edge(e);\n    if (_.has(edge, \"x\")) {\n      if (edge.labelpos === \"l\" || edge.labelpos === \"r\") {\n        edge.width -= edge.labeloffset;\n      }\n      switch (edge.labelpos) {\n      case \"l\": edge.x -= edge.width / 2 + edge.labeloffset; break;\n      case \"r\": edge.x += edge.width / 2 + edge.labeloffset; break;\n      }\n    }\n  });\n}\n\nfunction reversePointsForReversedEdges(g) {\n  _.forEach(g.edges(), function(e) {\n    var edge = g.edge(e);\n    if (edge.reversed) {\n      edge.points.reverse();\n    }\n  });\n}\n\nfunction removeBorderNodes(g) {\n  _.forEach(g.nodes(), function(v) {\n    if (g.children(v).length) {\n      var node = g.node(v);\n      var t = g.node(node.borderTop);\n      var b = g.node(node.borderBottom);\n      var l = g.node(_.last(node.borderLeft));\n      var r = g.node(_.last(node.borderRight));\n\n      node.width = Math.abs(r.x - l.x);\n      node.height = Math.abs(b.y - t.y);\n      node.x = l.x + node.width / 2;\n      node.y = t.y + node.height / 2;\n    }\n  });\n\n  _.forEach(g.nodes(), function(v) {\n    if (g.node(v).dummy === \"border\") {\n      g.removeNode(v);\n    }\n  });\n}\n\nfunction removeSelfEdges(g) {\n  _.forEach(g.edges(), function(e) {\n    if (e.v === e.w) {\n      var node = g.node(e.v);\n      if (!node.selfEdges) {\n        node.selfEdges = [];\n      }\n      node.selfEdges.push({ e: e, label: g.edge(e) });\n      g.removeEdge(e);\n    }\n  });\n}\n\nfunction insertSelfEdges(g) {\n  var layers = util.buildLayerMatrix(g);\n  _.forEach(layers, function(layer) {\n    var orderShift = 0;\n    _.forEach(layer, function(v, i) {\n      var node = g.node(v);\n      node.order = i + orderShift;\n      _.forEach(node.selfEdges, function(selfEdge) {\n        util.addDummyNode(g, \"selfedge\", {\n          width: selfEdge.label.width,\n          height: selfEdge.label.height,\n          rank: node.rank,\n          order: i + (++orderShift),\n          e: selfEdge.e,\n          label: selfEdge.label\n        }, \"_se\");\n      });\n      delete node.selfEdges;\n    });\n  });\n}\n\nfunction positionSelfEdges(g) {\n  _.forEach(g.nodes(), function(v) {\n    var node = g.node(v);\n    if (node.dummy === \"selfedge\") {\n      var selfNode = g.node(node.e.v);\n      var x = selfNode.x + selfNode.width / 2;\n      var y = selfNode.y;\n      var dx = node.x - x;\n      var dy = selfNode.height / 2;\n      g.setEdge(node.e, node.label);\n      g.removeNode(v);\n      node.label.points = [\n        { x: x + 2 * dx / 3, y: y - dy },\n        { x: x + 5 * dx / 6, y: y - dy },\n        { x: x +     dx    , y: y },\n        { x: x + 5 * dx / 6, y: y + dy },\n        { x: x + 2 * dx / 3, y: y + dy }\n      ];\n      node.label.x = node.x;\n      node.label.y = node.y;\n    }\n  });\n}\n\nfunction selectNumberAttrs(obj, attrs) {\n  return _.mapValues(_.pick(obj, attrs), Number);\n}\n\nfunction canonicalize(attrs) {\n  var newAttrs = {};\n  _.forEach(attrs, function(v, k) {\n    newAttrs[k.toLowerCase()] = v;\n  });\n  return newAttrs;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre/lib/lodash.js\":\n/*!******************************************!*\\\n  !*** ./node_modules/dagre/lib/lodash.js ***!\n  \\******************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n/* global window */\n\nvar lodash;\n\nif (true) {\n  try {\n    lodash = {\n      cloneDeep: __webpack_require__(/*! lodash/cloneDeep */ \"./node_modules/lodash/cloneDeep.js\"),\n      constant: __webpack_require__(/*! lodash/constant */ \"./node_modules/lodash/constant.js\"),\n      defaults: __webpack_require__(/*! lodash/defaults */ \"./node_modules/lodash/defaults.js\"),\n      each: __webpack_require__(/*! lodash/each */ \"./node_modules/lodash/each.js\"),\n      filter: __webpack_require__(/*! lodash/filter */ \"./node_modules/lodash/filter.js\"),\n      find: __webpack_require__(/*! lodash/find */ \"./node_modules/lodash/find.js\"),\n      flatten: __webpack_require__(/*! lodash/flatten */ \"./node_modules/lodash/flatten.js\"),\n      forEach: __webpack_require__(/*! lodash/forEach */ \"./node_modules/lodash/forEach.js\"),\n      forIn: __webpack_require__(/*! lodash/forIn */ \"./node_modules/lodash/forIn.js\"),\n      has:  __webpack_require__(/*! lodash/has */ \"./node_modules/lodash/has.js\"),\n      isUndefined: __webpack_require__(/*! lodash/isUndefined */ \"./node_modules/lodash/isUndefined.js\"),\n      last: __webpack_require__(/*! lodash/last */ \"./node_modules/lodash/last.js\"),\n      map: __webpack_require__(/*! lodash/map */ \"./node_modules/lodash/map.js\"),\n      mapValues: __webpack_require__(/*! lodash/mapValues */ \"./node_modules/lodash/mapValues.js\"),\n      max: __webpack_require__(/*! lodash/max */ \"./node_modules/lodash/max.js\"),\n      merge: __webpack_require__(/*! lodash/merge */ \"./node_modules/lodash/merge.js\"),\n      min: __webpack_require__(/*! lodash/min */ \"./node_modules/lodash/min.js\"),\n      minBy: __webpack_require__(/*! lodash/minBy */ \"./node_modules/lodash/minBy.js\"),\n      now: __webpack_require__(/*! lodash/now */ \"./node_modules/lodash/now.js\"),\n      pick: __webpack_require__(/*! lodash/pick */ \"./node_modules/lodash/pick.js\"),\n      range: __webpack_require__(/*! lodash/range */ \"./node_modules/lodash/range.js\"),\n      reduce: __webpack_require__(/*! lodash/reduce */ \"./node_modules/lodash/reduce.js\"),\n      sortBy: __webpack_require__(/*! lodash/sortBy */ \"./node_modules/lodash/sortBy.js\"),\n      uniqueId: __webpack_require__(/*! lodash/uniqueId */ \"./node_modules/lodash/uniqueId.js\"),\n      values: __webpack_require__(/*! lodash/values */ \"./node_modules/lodash/values.js\"),\n      zipObject: __webpack_require__(/*! lodash/zipObject */ \"./node_modules/lodash/zipObject.js\"),\n    };\n  } catch (e) {\n    // continue regardless of error\n  }\n}\n\nif (!lodash) {\n  lodash = window._;\n}\n\nmodule.exports = lodash;\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre/lib/nesting-graph.js\":\n/*!*************************************************!*\\\n  !*** ./node_modules/dagre/lib/nesting-graph.js ***!\n  \\*************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar _ = __webpack_require__(/*! ./lodash */ \"./node_modules/dagre/lib/lodash.js\");\nvar util = __webpack_require__(/*! ./util */ \"./node_modules/dagre/lib/util.js\");\n\nmodule.exports = {\n  run: run,\n  cleanup: cleanup\n};\n\n/*\n * A nesting graph creates dummy nodes for the tops and bottoms of subgraphs,\n * adds appropriate edges to ensure that all cluster nodes are placed between\n * these boundries, and ensures that the graph is connected.\n *\n * In addition we ensure, through the use of the minlen property, that nodes\n * and subgraph border nodes to not end up on the same rank.\n *\n * Preconditions:\n *\n *    1. Input graph is a DAG\n *    2. Nodes in the input graph has a minlen attribute\n *\n * Postconditions:\n *\n *    1. Input graph is connected.\n *    2. Dummy nodes are added for the tops and bottoms of subgraphs.\n *    3. The minlen attribute for nodes is adjusted to ensure nodes do not\n *       get placed on the same rank as subgraph border nodes.\n *\n * The nesting graph idea comes from Sander, \"Layout of Compound Directed\n * Graphs.\"\n */\nfunction run(g) {\n  var root = util.addDummyNode(g, \"root\", {}, \"_root\");\n  var depths = treeDepths(g);\n  var height = _.max(_.values(depths)) - 1; // Note: depths is an Object not an array\n  var nodeSep = 2 * height + 1;\n\n  g.graph().nestingRoot = root;\n\n  // Multiply minlen by nodeSep to align nodes on non-border ranks.\n  _.forEach(g.edges(), function(e) { g.edge(e).minlen *= nodeSep; });\n\n  // Calculate a weight that is sufficient to keep subgraphs vertically compact\n  var weight = sumWeights(g) + 1;\n\n  // Create border nodes and link them up\n  _.forEach(g.children(), function(child) {\n    dfs(g, root, nodeSep, weight, height, depths, child);\n  });\n\n  // Save the multiplier for node layers for later removal of empty border\n  // layers.\n  g.graph().nodeRankFactor = nodeSep;\n}\n\nfunction dfs(g, root, nodeSep, weight, height, depths, v) {\n  var children = g.children(v);\n  if (!children.length) {\n    if (v !== root) {\n      g.setEdge(root, v, { weight: 0, minlen: nodeSep });\n    }\n    return;\n  }\n\n  var top = util.addBorderNode(g, \"_bt\");\n  var bottom = util.addBorderNode(g, \"_bb\");\n  var label = g.node(v);\n\n  g.setParent(top, v);\n  label.borderTop = top;\n  g.setParent(bottom, v);\n  label.borderBottom = bottom;\n\n  _.forEach(children, function(child) {\n    dfs(g, root, nodeSep, weight, height, depths, child);\n\n    var childNode = g.node(child);\n    var childTop = childNode.borderTop ? childNode.borderTop : child;\n    var childBottom = childNode.borderBottom ? childNode.borderBottom : child;\n    var thisWeight = childNode.borderTop ? weight : 2 * weight;\n    var minlen = childTop !== childBottom ? 1 : height - depths[v] + 1;\n\n    g.setEdge(top, childTop, {\n      weight: thisWeight,\n      minlen: minlen,\n      nestingEdge: true\n    });\n\n    g.setEdge(childBottom, bottom, {\n      weight: thisWeight,\n      minlen: minlen,\n      nestingEdge: true\n    });\n  });\n\n  if (!g.parent(v)) {\n    g.setEdge(root, top, { weight: 0, minlen: height + depths[v] });\n  }\n}\n\nfunction treeDepths(g) {\n  var depths = {};\n  function dfs(v, depth) {\n    var children = g.children(v);\n    if (children && children.length) {\n      _.forEach(children, function(child) {\n        dfs(child, depth + 1);\n      });\n    }\n    depths[v] = depth;\n  }\n  _.forEach(g.children(), function(v) { dfs(v, 1); });\n  return depths;\n}\n\nfunction sumWeights(g) {\n  return _.reduce(g.edges(), function(acc, e) {\n    return acc + g.edge(e).weight;\n  }, 0);\n}\n\nfunction cleanup(g) {\n  var graphLabel = g.graph();\n  g.removeNode(graphLabel.nestingRoot);\n  delete graphLabel.nestingRoot;\n  _.forEach(g.edges(), function(e) {\n    var edge = g.edge(e);\n    if (edge.nestingEdge) {\n      g.removeEdge(e);\n    }\n  });\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre/lib/normalize.js\":\n/*!*********************************************!*\\\n  !*** ./node_modules/dagre/lib/normalize.js ***!\n  \\*********************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _ = __webpack_require__(/*! ./lodash */ \"./node_modules/dagre/lib/lodash.js\");\nvar util = __webpack_require__(/*! ./util */ \"./node_modules/dagre/lib/util.js\");\n\nmodule.exports = {\n  run: run,\n  undo: undo\n};\n\n/*\n * Breaks any long edges in the graph into short segments that span 1 layer\n * each. This operation is undoable with the denormalize function.\n *\n * Pre-conditions:\n *\n *    1. The input graph is a DAG.\n *    2. Each node in the graph has a \"rank\" property.\n *\n * Post-condition:\n *\n *    1. All edges in the graph have a length of 1.\n *    2. Dummy nodes are added where edges have been split into segments.\n *    3. The graph is augmented with a \"dummyChains\" attribute which contains\n *       the first dummy in each chain of dummy nodes produced.\n */\nfunction run(g) {\n  g.graph().dummyChains = [];\n  _.forEach(g.edges(), function(edge) { normalizeEdge(g, edge); });\n}\n\nfunction normalizeEdge(g, e) {\n  var v = e.v;\n  var vRank = g.node(v).rank;\n  var w = e.w;\n  var wRank = g.node(w).rank;\n  var name = e.name;\n  var edgeLabel = g.edge(e);\n  var labelRank = edgeLabel.labelRank;\n\n  if (wRank === vRank + 1) return;\n\n  g.removeEdge(e);\n\n  var dummy, attrs, i;\n  for (i = 0, ++vRank; vRank < wRank; ++i, ++vRank) {\n    edgeLabel.points = [];\n    attrs = {\n      width: 0, height: 0,\n      edgeLabel: edgeLabel, edgeObj: e,\n      rank: vRank\n    };\n    dummy = util.addDummyNode(g, \"edge\", attrs, \"_d\");\n    if (vRank === labelRank) {\n      attrs.width = edgeLabel.width;\n      attrs.height = edgeLabel.height;\n      attrs.dummy = \"edge-label\";\n      attrs.labelpos = edgeLabel.labelpos;\n    }\n    g.setEdge(v, dummy, { weight: edgeLabel.weight }, name);\n    if (i === 0) {\n      g.graph().dummyChains.push(dummy);\n    }\n    v = dummy;\n  }\n\n  g.setEdge(v, w, { weight: edgeLabel.weight }, name);\n}\n\nfunction undo(g) {\n  _.forEach(g.graph().dummyChains, function(v) {\n    var node = g.node(v);\n    var origLabel = node.edgeLabel;\n    var w;\n    g.setEdge(node.edgeObj, origLabel);\n    while (node.dummy) {\n      w = g.successors(v)[0];\n      g.removeNode(v);\n      origLabel.points.push({ x: node.x, y: node.y });\n      if (node.dummy === \"edge-label\") {\n        origLabel.x = node.x;\n        origLabel.y = node.y;\n        origLabel.width = node.width;\n        origLabel.height = node.height;\n      }\n      v = w;\n      node = g.node(v);\n    }\n  });\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre/lib/order/add-subgraph-constraints.js\":\n/*!******************************************************************!*\\\n  !*** ./node_modules/dagre/lib/order/add-subgraph-constraints.js ***!\n  \\******************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar _ = __webpack_require__(/*! ../lodash */ \"./node_modules/dagre/lib/lodash.js\");\n\nmodule.exports = addSubgraphConstraints;\n\nfunction addSubgraphConstraints(g, cg, vs) {\n  var prev = {},\n    rootPrev;\n\n  _.forEach(vs, function(v) {\n    var child = g.parent(v),\n      parent,\n      prevChild;\n    while (child) {\n      parent = g.parent(child);\n      if (parent) {\n        prevChild = prev[parent];\n        prev[parent] = child;\n      } else {\n        prevChild = rootPrev;\n        rootPrev = child;\n      }\n      if (prevChild && prevChild !== child) {\n        cg.setEdge(prevChild, child);\n        return;\n      }\n      child = parent;\n    }\n  });\n\n  /*\n  function dfs(v) {\n    var children = v ? g.children(v) : g.children();\n    if (children.length) {\n      var min = Number.POSITIVE_INFINITY,\n          subgraphs = [];\n      _.each(children, function(child) {\n        var childMin = dfs(child);\n        if (g.children(child).length) {\n          subgraphs.push({ v: child, order: childMin });\n        }\n        min = Math.min(min, childMin);\n      });\n      _.reduce(_.sortBy(subgraphs, \"order\"), function(prev, curr) {\n        cg.setEdge(prev.v, curr.v);\n        return curr;\n      });\n      return min;\n    }\n    return g.node(v).order;\n  }\n  dfs(undefined);\n  */\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre/lib/order/barycenter.js\":\n/*!****************************************************!*\\\n  !*** ./node_modules/dagre/lib/order/barycenter.js ***!\n  \\****************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar _ = __webpack_require__(/*! ../lodash */ \"./node_modules/dagre/lib/lodash.js\");\n\nmodule.exports = barycenter;\n\nfunction barycenter(g, movable) {\n  return _.map(movable, function(v) {\n    var inV = g.inEdges(v);\n    if (!inV.length) {\n      return { v: v };\n    } else {\n      var result = _.reduce(inV, function(acc, e) {\n        var edge = g.edge(e),\n          nodeU = g.node(e.v);\n        return {\n          sum: acc.sum + (edge.weight * nodeU.order),\n          weight: acc.weight + edge.weight\n        };\n      }, { sum: 0, weight: 0 });\n\n      return {\n        v: v,\n        barycenter: result.sum / result.weight,\n        weight: result.weight\n      };\n    }\n  });\n}\n\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre/lib/order/build-layer-graph.js\":\n/*!***********************************************************!*\\\n  !*** ./node_modules/dagre/lib/order/build-layer-graph.js ***!\n  \\***********************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar _ = __webpack_require__(/*! ../lodash */ \"./node_modules/dagre/lib/lodash.js\");\nvar Graph = __webpack_require__(/*! ../graphlib */ \"./node_modules/dagre/lib/graphlib.js\").Graph;\n\nmodule.exports = buildLayerGraph;\n\n/*\n * Constructs a graph that can be used to sort a layer of nodes. The graph will\n * contain all base and subgraph nodes from the request layer in their original\n * hierarchy and any edges that are incident on these nodes and are of the type\n * requested by the \"relationship\" parameter.\n *\n * Nodes from the requested rank that do not have parents are assigned a root\n * node in the output graph, which is set in the root graph attribute. This\n * makes it easy to walk the hierarchy of movable nodes during ordering.\n *\n * Pre-conditions:\n *\n *    1. Input graph is a DAG\n *    2. Base nodes in the input graph have a rank attribute\n *    3. Subgraph nodes in the input graph has minRank and maxRank attributes\n *    4. Edges have an assigned weight\n *\n * Post-conditions:\n *\n *    1. Output graph has all nodes in the movable rank with preserved\n *       hierarchy.\n *    2. Root nodes in the movable layer are made children of the node\n *       indicated by the root attribute of the graph.\n *    3. Non-movable nodes incident on movable nodes, selected by the\n *       relationship parameter, are included in the graph (without hierarchy).\n *    4. Edges incident on movable nodes, selected by the relationship\n *       parameter, are added to the output graph.\n *    5. The weights for copied edges are aggregated as need, since the output\n *       graph is not a multi-graph.\n */\nfunction buildLayerGraph(g, rank, relationship) {\n  var root = createRootNode(g),\n    result = new Graph({ compound: true }).setGraph({ root: root })\n      .setDefaultNodeLabel(function(v) { return g.node(v); });\n\n  _.forEach(g.nodes(), function(v) {\n    var node = g.node(v),\n      parent = g.parent(v);\n\n    if (node.rank === rank || node.minRank <= rank && rank <= node.maxRank) {\n      result.setNode(v);\n      result.setParent(v, parent || root);\n\n      // This assumes we have only short edges!\n      _.forEach(g[relationship](v), function(e) {\n        var u = e.v === v ? e.w : e.v,\n          edge = result.edge(u, v),\n          weight = !_.isUndefined(edge) ? edge.weight : 0;\n        result.setEdge(u, v, { weight: g.edge(e).weight + weight });\n      });\n\n      if (_.has(node, \"minRank\")) {\n        result.setNode(v, {\n          borderLeft: node.borderLeft[rank],\n          borderRight: node.borderRight[rank]\n        });\n      }\n    }\n  });\n\n  return result;\n}\n\nfunction createRootNode(g) {\n  var v;\n  while (g.hasNode((v = _.uniqueId(\"_root\"))));\n  return v;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre/lib/order/cross-count.js\":\n/*!*****************************************************!*\\\n  !*** ./node_modules/dagre/lib/order/cross-count.js ***!\n  \\*****************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _ = __webpack_require__(/*! ../lodash */ \"./node_modules/dagre/lib/lodash.js\");\n\nmodule.exports = crossCount;\n\n/*\n * A function that takes a layering (an array of layers, each with an array of\n * ordererd nodes) and a graph and returns a weighted crossing count.\n *\n * Pre-conditions:\n *\n *    1. Input graph must be simple (not a multigraph), directed, and include\n *       only simple edges.\n *    2. Edges in the input graph must have assigned weights.\n *\n * Post-conditions:\n *\n *    1. The graph and layering matrix are left unchanged.\n *\n * This algorithm is derived from Barth, et al., \"Bilayer Cross Counting.\"\n */\nfunction crossCount(g, layering) {\n  var cc = 0;\n  for (var i = 1; i < layering.length; ++i) {\n    cc += twoLayerCrossCount(g, layering[i-1], layering[i]);\n  }\n  return cc;\n}\n\nfunction twoLayerCrossCount(g, northLayer, southLayer) {\n  // Sort all of the edges between the north and south layers by their position\n  // in the north layer and then the south. Map these edges to the position of\n  // their head in the south layer.\n  var southPos = _.zipObject(southLayer,\n    _.map(southLayer, function (v, i) { return i; }));\n  var southEntries = _.flatten(_.map(northLayer, function(v) {\n    return _.sortBy(_.map(g.outEdges(v), function(e) {\n      return { pos: southPos[e.w], weight: g.edge(e).weight };\n    }), \"pos\");\n  }), true);\n\n  // Build the accumulator tree\n  var firstIndex = 1;\n  while (firstIndex < southLayer.length) firstIndex <<= 1;\n  var treeSize = 2 * firstIndex - 1;\n  firstIndex -= 1;\n  var tree = _.map(new Array(treeSize), function() { return 0; });\n\n  // Calculate the weighted crossings\n  var cc = 0;\n  _.forEach(southEntries.forEach(function(entry) {\n    var index = entry.pos + firstIndex;\n    tree[index] += entry.weight;\n    var weightSum = 0;\n    while (index > 0) {\n      if (index % 2) {\n        weightSum += tree[index + 1];\n      }\n      index = (index - 1) >> 1;\n      tree[index] += entry.weight;\n    }\n    cc += entry.weight * weightSum;\n  }));\n\n  return cc;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre/lib/order/index.js\":\n/*!***********************************************!*\\\n  !*** ./node_modules/dagre/lib/order/index.js ***!\n  \\***********************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _ = __webpack_require__(/*! ../lodash */ \"./node_modules/dagre/lib/lodash.js\");\nvar initOrder = __webpack_require__(/*! ./init-order */ \"./node_modules/dagre/lib/order/init-order.js\");\nvar crossCount = __webpack_require__(/*! ./cross-count */ \"./node_modules/dagre/lib/order/cross-count.js\");\nvar sortSubgraph = __webpack_require__(/*! ./sort-subgraph */ \"./node_modules/dagre/lib/order/sort-subgraph.js\");\nvar buildLayerGraph = __webpack_require__(/*! ./build-layer-graph */ \"./node_modules/dagre/lib/order/build-layer-graph.js\");\nvar addSubgraphConstraints = __webpack_require__(/*! ./add-subgraph-constraints */ \"./node_modules/dagre/lib/order/add-subgraph-constraints.js\");\nvar Graph = __webpack_require__(/*! ../graphlib */ \"./node_modules/dagre/lib/graphlib.js\").Graph;\nvar util = __webpack_require__(/*! ../util */ \"./node_modules/dagre/lib/util.js\");\n\nmodule.exports = order;\n\n/*\n * Applies heuristics to minimize edge crossings in the graph and sets the best\n * order solution as an order attribute on each node.\n *\n * Pre-conditions:\n *\n *    1. Graph must be DAG\n *    2. Graph nodes must be objects with a \"rank\" attribute\n *    3. Graph edges must have the \"weight\" attribute\n *\n * Post-conditions:\n *\n *    1. Graph nodes will have an \"order\" attribute based on the results of the\n *       algorithm.\n */\nfunction order(g) {\n  var maxRank = util.maxRank(g),\n    downLayerGraphs = buildLayerGraphs(g, _.range(1, maxRank + 1), \"inEdges\"),\n    upLayerGraphs = buildLayerGraphs(g, _.range(maxRank - 1, -1, -1), \"outEdges\");\n\n  var layering = initOrder(g);\n  assignOrder(g, layering);\n\n  var bestCC = Number.POSITIVE_INFINITY,\n    best;\n\n  for (var i = 0, lastBest = 0; lastBest < 4; ++i, ++lastBest) {\n    sweepLayerGraphs(i % 2 ? downLayerGraphs : upLayerGraphs, i % 4 >= 2);\n\n    layering = util.buildLayerMatrix(g);\n    var cc = crossCount(g, layering);\n    if (cc < bestCC) {\n      lastBest = 0;\n      best = _.cloneDeep(layering);\n      bestCC = cc;\n    }\n  }\n\n  assignOrder(g, best);\n}\n\nfunction buildLayerGraphs(g, ranks, relationship) {\n  return _.map(ranks, function(rank) {\n    return buildLayerGraph(g, rank, relationship);\n  });\n}\n\nfunction sweepLayerGraphs(layerGraphs, biasRight) {\n  var cg = new Graph();\n  _.forEach(layerGraphs, function(lg) {\n    var root = lg.graph().root;\n    var sorted = sortSubgraph(lg, root, cg, biasRight);\n    _.forEach(sorted.vs, function(v, i) {\n      lg.node(v).order = i;\n    });\n    addSubgraphConstraints(lg, cg, sorted.vs);\n  });\n}\n\nfunction assignOrder(g, layering) {\n  _.forEach(layering, function(layer) {\n    _.forEach(layer, function(v, i) {\n      g.node(v).order = i;\n    });\n  });\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre/lib/order/init-order.js\":\n/*!****************************************************!*\\\n  !*** ./node_modules/dagre/lib/order/init-order.js ***!\n  \\****************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _ = __webpack_require__(/*! ../lodash */ \"./node_modules/dagre/lib/lodash.js\");\n\nmodule.exports = initOrder;\n\n/*\n * Assigns an initial order value for each node by performing a DFS search\n * starting from nodes in the first rank. Nodes are assigned an order in their\n * rank as they are first visited.\n *\n * This approach comes from Gansner, et al., \"A Technique for Drawing Directed\n * Graphs.\"\n *\n * Returns a layering matrix with an array per layer and each layer sorted by\n * the order of its nodes.\n */\nfunction initOrder(g) {\n  var visited = {};\n  var simpleNodes = _.filter(g.nodes(), function(v) {\n    return !g.children(v).length;\n  });\n  var maxRank = _.max(_.map(simpleNodes, function(v) { return g.node(v).rank; }));\n  var layers = _.map(_.range(maxRank + 1), function() { return []; });\n\n  function dfs(v) {\n    if (_.has(visited, v)) return;\n    visited[v] = true;\n    var node = g.node(v);\n    layers[node.rank].push(v);\n    _.forEach(g.successors(v), dfs);\n  }\n\n  var orderedVs = _.sortBy(simpleNodes, function(v) { return g.node(v).rank; });\n  _.forEach(orderedVs, dfs);\n\n  return layers;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre/lib/order/resolve-conflicts.js\":\n/*!***********************************************************!*\\\n  !*** ./node_modules/dagre/lib/order/resolve-conflicts.js ***!\n  \\***********************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _ = __webpack_require__(/*! ../lodash */ \"./node_modules/dagre/lib/lodash.js\");\n\nmodule.exports = resolveConflicts;\n\n/*\n * Given a list of entries of the form {v, barycenter, weight} and a\n * constraint graph this function will resolve any conflicts between the\n * constraint graph and the barycenters for the entries. If the barycenters for\n * an entry would violate a constraint in the constraint graph then we coalesce\n * the nodes in the conflict into a new node that respects the contraint and\n * aggregates barycenter and weight information.\n *\n * This implementation is based on the description in Forster, \"A Fast and\n * Simple Hueristic for Constrained Two-Level Crossing Reduction,\" thought it\n * differs in some specific details.\n *\n * Pre-conditions:\n *\n *    1. Each entry has the form {v, barycenter, weight}, or if the node has\n *       no barycenter, then {v}.\n *\n * Returns:\n *\n *    A new list of entries of the form {vs, i, barycenter, weight}. The list\n *    `vs` may either be a singleton or it may be an aggregation of nodes\n *    ordered such that they do not violate constraints from the constraint\n *    graph. The property `i` is the lowest original index of any of the\n *    elements in `vs`.\n */\nfunction resolveConflicts(entries, cg) {\n  var mappedEntries = {};\n  _.forEach(entries, function(entry, i) {\n    var tmp = mappedEntries[entry.v] = {\n      indegree: 0,\n      \"in\": [],\n      out: [],\n      vs: [entry.v],\n      i: i\n    };\n    if (!_.isUndefined(entry.barycenter)) {\n      tmp.barycenter = entry.barycenter;\n      tmp.weight = entry.weight;\n    }\n  });\n\n  _.forEach(cg.edges(), function(e) {\n    var entryV = mappedEntries[e.v];\n    var entryW = mappedEntries[e.w];\n    if (!_.isUndefined(entryV) && !_.isUndefined(entryW)) {\n      entryW.indegree++;\n      entryV.out.push(mappedEntries[e.w]);\n    }\n  });\n\n  var sourceSet = _.filter(mappedEntries, function(entry) {\n    return !entry.indegree;\n  });\n\n  return doResolveConflicts(sourceSet);\n}\n\nfunction doResolveConflicts(sourceSet) {\n  var entries = [];\n\n  function handleIn(vEntry) {\n    return function(uEntry) {\n      if (uEntry.merged) {\n        return;\n      }\n      if (_.isUndefined(uEntry.barycenter) ||\n          _.isUndefined(vEntry.barycenter) ||\n          uEntry.barycenter >= vEntry.barycenter) {\n        mergeEntries(vEntry, uEntry);\n      }\n    };\n  }\n\n  function handleOut(vEntry) {\n    return function(wEntry) {\n      wEntry[\"in\"].push(vEntry);\n      if (--wEntry.indegree === 0) {\n        sourceSet.push(wEntry);\n      }\n    };\n  }\n\n  while (sourceSet.length) {\n    var entry = sourceSet.pop();\n    entries.push(entry);\n    _.forEach(entry[\"in\"].reverse(), handleIn(entry));\n    _.forEach(entry.out, handleOut(entry));\n  }\n\n  return _.map(_.filter(entries, function(entry) { return !entry.merged; }),\n    function(entry) {\n      return _.pick(entry, [\"vs\", \"i\", \"barycenter\", \"weight\"]);\n    });\n\n}\n\nfunction mergeEntries(target, source) {\n  var sum = 0;\n  var weight = 0;\n\n  if (target.weight) {\n    sum += target.barycenter * target.weight;\n    weight += target.weight;\n  }\n\n  if (source.weight) {\n    sum += source.barycenter * source.weight;\n    weight += source.weight;\n  }\n\n  target.vs = source.vs.concat(target.vs);\n  target.barycenter = sum / weight;\n  target.weight = weight;\n  target.i = Math.min(source.i, target.i);\n  source.merged = true;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre/lib/order/sort-subgraph.js\":\n/*!*******************************************************!*\\\n  !*** ./node_modules/dagre/lib/order/sort-subgraph.js ***!\n  \\*******************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar _ = __webpack_require__(/*! ../lodash */ \"./node_modules/dagre/lib/lodash.js\");\nvar barycenter = __webpack_require__(/*! ./barycenter */ \"./node_modules/dagre/lib/order/barycenter.js\");\nvar resolveConflicts = __webpack_require__(/*! ./resolve-conflicts */ \"./node_modules/dagre/lib/order/resolve-conflicts.js\");\nvar sort = __webpack_require__(/*! ./sort */ \"./node_modules/dagre/lib/order/sort.js\");\n\nmodule.exports = sortSubgraph;\n\nfunction sortSubgraph(g, v, cg, biasRight) {\n  var movable = g.children(v);\n  var node = g.node(v);\n  var bl = node ? node.borderLeft : undefined;\n  var br = node ? node.borderRight: undefined;\n  var subgraphs = {};\n\n  if (bl) {\n    movable = _.filter(movable, function(w) {\n      return w !== bl && w !== br;\n    });\n  }\n\n  var barycenters = barycenter(g, movable);\n  _.forEach(barycenters, function(entry) {\n    if (g.children(entry.v).length) {\n      var subgraphResult = sortSubgraph(g, entry.v, cg, biasRight);\n      subgraphs[entry.v] = subgraphResult;\n      if (_.has(subgraphResult, \"barycenter\")) {\n        mergeBarycenters(entry, subgraphResult);\n      }\n    }\n  });\n\n  var entries = resolveConflicts(barycenters, cg);\n  expandSubgraphs(entries, subgraphs);\n\n  var result = sort(entries, biasRight);\n\n  if (bl) {\n    result.vs = _.flatten([bl, result.vs, br], true);\n    if (g.predecessors(bl).length) {\n      var blPred = g.node(g.predecessors(bl)[0]),\n        brPred = g.node(g.predecessors(br)[0]);\n      if (!_.has(result, \"barycenter\")) {\n        result.barycenter = 0;\n        result.weight = 0;\n      }\n      result.barycenter = (result.barycenter * result.weight +\n                           blPred.order + brPred.order) / (result.weight + 2);\n      result.weight += 2;\n    }\n  }\n\n  return result;\n}\n\nfunction expandSubgraphs(entries, subgraphs) {\n  _.forEach(entries, function(entry) {\n    entry.vs = _.flatten(entry.vs.map(function(v) {\n      if (subgraphs[v]) {\n        return subgraphs[v].vs;\n      }\n      return v;\n    }), true);\n  });\n}\n\nfunction mergeBarycenters(target, other) {\n  if (!_.isUndefined(target.barycenter)) {\n    target.barycenter = (target.barycenter * target.weight +\n                         other.barycenter * other.weight) /\n                        (target.weight + other.weight);\n    target.weight += other.weight;\n  } else {\n    target.barycenter = other.barycenter;\n    target.weight = other.weight;\n  }\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre/lib/order/sort.js\":\n/*!**********************************************!*\\\n  !*** ./node_modules/dagre/lib/order/sort.js ***!\n  \\**********************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar _ = __webpack_require__(/*! ../lodash */ \"./node_modules/dagre/lib/lodash.js\");\nvar util = __webpack_require__(/*! ../util */ \"./node_modules/dagre/lib/util.js\");\n\nmodule.exports = sort;\n\nfunction sort(entries, biasRight) {\n  var parts = util.partition(entries, function(entry) {\n    return _.has(entry, \"barycenter\");\n  });\n  var sortable = parts.lhs,\n    unsortable = _.sortBy(parts.rhs, function(entry) { return -entry.i; }),\n    vs = [],\n    sum = 0,\n    weight = 0,\n    vsIndex = 0;\n\n  sortable.sort(compareWithBias(!!biasRight));\n\n  vsIndex = consumeUnsortable(vs, unsortable, vsIndex);\n\n  _.forEach(sortable, function (entry) {\n    vsIndex += entry.vs.length;\n    vs.push(entry.vs);\n    sum += entry.barycenter * entry.weight;\n    weight += entry.weight;\n    vsIndex = consumeUnsortable(vs, unsortable, vsIndex);\n  });\n\n  var result = { vs: _.flatten(vs, true) };\n  if (weight) {\n    result.barycenter = sum / weight;\n    result.weight = weight;\n  }\n  return result;\n}\n\nfunction consumeUnsortable(vs, unsortable, index) {\n  var last;\n  while (unsortable.length && (last = _.last(unsortable)).i <= index) {\n    unsortable.pop();\n    vs.push(last.vs);\n    index++;\n  }\n  return index;\n}\n\nfunction compareWithBias(bias) {\n  return function(entryV, entryW) {\n    if (entryV.barycenter < entryW.barycenter) {\n      return -1;\n    } else if (entryV.barycenter > entryW.barycenter) {\n      return 1;\n    }\n\n    return !bias ? entryV.i - entryW.i : entryW.i - entryV.i;\n  };\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre/lib/parent-dummy-chains.js\":\n/*!*******************************************************!*\\\n  !*** ./node_modules/dagre/lib/parent-dummy-chains.js ***!\n  \\*******************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar _ = __webpack_require__(/*! ./lodash */ \"./node_modules/dagre/lib/lodash.js\");\n\nmodule.exports = parentDummyChains;\n\nfunction parentDummyChains(g) {\n  var postorderNums = postorder(g);\n\n  _.forEach(g.graph().dummyChains, function(v) {\n    var node = g.node(v);\n    var edgeObj = node.edgeObj;\n    var pathData = findPath(g, postorderNums, edgeObj.v, edgeObj.w);\n    var path = pathData.path;\n    var lca = pathData.lca;\n    var pathIdx = 0;\n    var pathV = path[pathIdx];\n    var ascending = true;\n\n    while (v !== edgeObj.w) {\n      node = g.node(v);\n\n      if (ascending) {\n        while ((pathV = path[pathIdx]) !== lca &&\n               g.node(pathV).maxRank < node.rank) {\n          pathIdx++;\n        }\n\n        if (pathV === lca) {\n          ascending = false;\n        }\n      }\n\n      if (!ascending) {\n        while (pathIdx < path.length - 1 &&\n               g.node(pathV = path[pathIdx + 1]).minRank <= node.rank) {\n          pathIdx++;\n        }\n        pathV = path[pathIdx];\n      }\n\n      g.setParent(v, pathV);\n      v = g.successors(v)[0];\n    }\n  });\n}\n\n// Find a path from v to w through the lowest common ancestor (LCA). Return the\n// full path and the LCA.\nfunction findPath(g, postorderNums, v, w) {\n  var vPath = [];\n  var wPath = [];\n  var low = Math.min(postorderNums[v].low, postorderNums[w].low);\n  var lim = Math.max(postorderNums[v].lim, postorderNums[w].lim);\n  var parent;\n  var lca;\n\n  // Traverse up from v to find the LCA\n  parent = v;\n  do {\n    parent = g.parent(parent);\n    vPath.push(parent);\n  } while (parent &&\n           (postorderNums[parent].low > low || lim > postorderNums[parent].lim));\n  lca = parent;\n\n  // Traverse from w to LCA\n  parent = w;\n  while ((parent = g.parent(parent)) !== lca) {\n    wPath.push(parent);\n  }\n\n  return { path: vPath.concat(wPath.reverse()), lca: lca };\n}\n\nfunction postorder(g) {\n  var result = {};\n  var lim = 0;\n\n  function dfs(v) {\n    var low = lim;\n    _.forEach(g.children(v), dfs);\n    result[v] = { low: low, lim: lim++ };\n  }\n  _.forEach(g.children(), dfs);\n\n  return result;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre/lib/position/bk.js\":\n/*!***********************************************!*\\\n  !*** ./node_modules/dagre/lib/position/bk.js ***!\n  \\***********************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _ = __webpack_require__(/*! ../lodash */ \"./node_modules/dagre/lib/lodash.js\");\nvar Graph = __webpack_require__(/*! ../graphlib */ \"./node_modules/dagre/lib/graphlib.js\").Graph;\nvar util = __webpack_require__(/*! ../util */ \"./node_modules/dagre/lib/util.js\");\n\n/*\n * This module provides coordinate assignment based on Brandes and Köpf, \"Fast\n * and Simple Horizontal Coordinate Assignment.\"\n */\n\nmodule.exports = {\n  positionX: positionX,\n  findType1Conflicts: findType1Conflicts,\n  findType2Conflicts: findType2Conflicts,\n  addConflict: addConflict,\n  hasConflict: hasConflict,\n  verticalAlignment: verticalAlignment,\n  horizontalCompaction: horizontalCompaction,\n  alignCoordinates: alignCoordinates,\n  findSmallestWidthAlignment: findSmallestWidthAlignment,\n  balance: balance\n};\n\n/*\n * Marks all edges in the graph with a type-1 conflict with the \"type1Conflict\"\n * property. A type-1 conflict is one where a non-inner segment crosses an\n * inner segment. An inner segment is an edge with both incident nodes marked\n * with the \"dummy\" property.\n *\n * This algorithm scans layer by layer, starting with the second, for type-1\n * conflicts between the current layer and the previous layer. For each layer\n * it scans the nodes from left to right until it reaches one that is incident\n * on an inner segment. It then scans predecessors to determine if they have\n * edges that cross that inner segment. At the end a final scan is done for all\n * nodes on the current rank to see if they cross the last visited inner\n * segment.\n *\n * This algorithm (safely) assumes that a dummy node will only be incident on a\n * single node in the layers being scanned.\n */\nfunction findType1Conflicts(g, layering) {\n  var conflicts = {};\n\n  function visitLayer(prevLayer, layer) {\n    var\n      // last visited node in the previous layer that is incident on an inner\n      // segment.\n      k0 = 0,\n      // Tracks the last node in this layer scanned for crossings with a type-1\n      // segment.\n      scanPos = 0,\n      prevLayerLength = prevLayer.length,\n      lastNode = _.last(layer);\n\n    _.forEach(layer, function(v, i) {\n      var w = findOtherInnerSegmentNode(g, v),\n        k1 = w ? g.node(w).order : prevLayerLength;\n\n      if (w || v === lastNode) {\n        _.forEach(layer.slice(scanPos, i +1), function(scanNode) {\n          _.forEach(g.predecessors(scanNode), function(u) {\n            var uLabel = g.node(u),\n              uPos = uLabel.order;\n            if ((uPos < k0 || k1 < uPos) &&\n                !(uLabel.dummy && g.node(scanNode).dummy)) {\n              addConflict(conflicts, u, scanNode);\n            }\n          });\n        });\n        scanPos = i + 1;\n        k0 = k1;\n      }\n    });\n\n    return layer;\n  }\n\n  _.reduce(layering, visitLayer);\n  return conflicts;\n}\n\nfunction findType2Conflicts(g, layering) {\n  var conflicts = {};\n\n  function scan(south, southPos, southEnd, prevNorthBorder, nextNorthBorder) {\n    var v;\n    _.forEach(_.range(southPos, southEnd), function(i) {\n      v = south[i];\n      if (g.node(v).dummy) {\n        _.forEach(g.predecessors(v), function(u) {\n          var uNode = g.node(u);\n          if (uNode.dummy &&\n              (uNode.order < prevNorthBorder || uNode.order > nextNorthBorder)) {\n            addConflict(conflicts, u, v);\n          }\n        });\n      }\n    });\n  }\n\n\n  function visitLayer(north, south) {\n    var prevNorthPos = -1,\n      nextNorthPos,\n      southPos = 0;\n\n    _.forEach(south, function(v, southLookahead) {\n      if (g.node(v).dummy === \"border\") {\n        var predecessors = g.predecessors(v);\n        if (predecessors.length) {\n          nextNorthPos = g.node(predecessors[0]).order;\n          scan(south, southPos, southLookahead, prevNorthPos, nextNorthPos);\n          southPos = southLookahead;\n          prevNorthPos = nextNorthPos;\n        }\n      }\n      scan(south, southPos, south.length, nextNorthPos, north.length);\n    });\n\n    return south;\n  }\n\n  _.reduce(layering, visitLayer);\n  return conflicts;\n}\n\nfunction findOtherInnerSegmentNode(g, v) {\n  if (g.node(v).dummy) {\n    return _.find(g.predecessors(v), function(u) {\n      return g.node(u).dummy;\n    });\n  }\n}\n\nfunction addConflict(conflicts, v, w) {\n  if (v > w) {\n    var tmp = v;\n    v = w;\n    w = tmp;\n  }\n\n  var conflictsV = conflicts[v];\n  if (!conflictsV) {\n    conflicts[v] = conflictsV = {};\n  }\n  conflictsV[w] = true;\n}\n\nfunction hasConflict(conflicts, v, w) {\n  if (v > w) {\n    var tmp = v;\n    v = w;\n    w = tmp;\n  }\n  return _.has(conflicts[v], w);\n}\n\n/*\n * Try to align nodes into vertical \"blocks\" where possible. This algorithm\n * attempts to align a node with one of its median neighbors. If the edge\n * connecting a neighbor is a type-1 conflict then we ignore that possibility.\n * If a previous node has already formed a block with a node after the node\n * we're trying to form a block with, we also ignore that possibility - our\n * blocks would be split in that scenario.\n */\nfunction verticalAlignment(g, layering, conflicts, neighborFn) {\n  var root = {},\n    align = {},\n    pos = {};\n\n  // We cache the position here based on the layering because the graph and\n  // layering may be out of sync. The layering matrix is manipulated to\n  // generate different extreme alignments.\n  _.forEach(layering, function(layer) {\n    _.forEach(layer, function(v, order) {\n      root[v] = v;\n      align[v] = v;\n      pos[v] = order;\n    });\n  });\n\n  _.forEach(layering, function(layer) {\n    var prevIdx = -1;\n    _.forEach(layer, function(v) {\n      var ws = neighborFn(v);\n      if (ws.length) {\n        ws = _.sortBy(ws, function(w) { return pos[w]; });\n        var mp = (ws.length - 1) / 2;\n        for (var i = Math.floor(mp), il = Math.ceil(mp); i <= il; ++i) {\n          var w = ws[i];\n          if (align[v] === v &&\n              prevIdx < pos[w] &&\n              !hasConflict(conflicts, v, w)) {\n            align[w] = v;\n            align[v] = root[v] = root[w];\n            prevIdx = pos[w];\n          }\n        }\n      }\n    });\n  });\n\n  return { root: root, align: align };\n}\n\nfunction horizontalCompaction(g, layering, root, align, reverseSep) {\n  // This portion of the algorithm differs from BK due to a number of problems.\n  // Instead of their algorithm we construct a new block graph and do two\n  // sweeps. The first sweep places blocks with the smallest possible\n  // coordinates. The second sweep removes unused space by moving blocks to the\n  // greatest coordinates without violating separation.\n  var xs = {},\n    blockG = buildBlockGraph(g, layering, root, reverseSep),\n    borderType = reverseSep ? \"borderLeft\" : \"borderRight\";\n\n  function iterate(setXsFunc, nextNodesFunc) {\n    var stack = blockG.nodes();\n    var elem = stack.pop();\n    var visited = {};\n    while (elem) {\n      if (visited[elem]) {\n        setXsFunc(elem);\n      } else {\n        visited[elem] = true;\n        stack.push(elem);\n        stack = stack.concat(nextNodesFunc(elem));\n      }\n\n      elem = stack.pop();\n    }\n  }\n\n  // First pass, assign smallest coordinates\n  function pass1(elem) {\n    xs[elem] = blockG.inEdges(elem).reduce(function(acc, e) {\n      return Math.max(acc, xs[e.v] + blockG.edge(e));\n    }, 0);\n  }\n\n  // Second pass, assign greatest coordinates\n  function pass2(elem) {\n    var min = blockG.outEdges(elem).reduce(function(acc, e) {\n      return Math.min(acc, xs[e.w] - blockG.edge(e));\n    }, Number.POSITIVE_INFINITY);\n\n    var node = g.node(elem);\n    if (min !== Number.POSITIVE_INFINITY && node.borderType !== borderType) {\n      xs[elem] = Math.max(xs[elem], min);\n    }\n  }\n\n  iterate(pass1, blockG.predecessors.bind(blockG));\n  iterate(pass2, blockG.successors.bind(blockG));\n\n  // Assign x coordinates to all nodes\n  _.forEach(align, function(v) {\n    xs[v] = xs[root[v]];\n  });\n\n  return xs;\n}\n\n\nfunction buildBlockGraph(g, layering, root, reverseSep) {\n  var blockGraph = new Graph(),\n    graphLabel = g.graph(),\n    sepFn = sep(graphLabel.nodesep, graphLabel.edgesep, reverseSep);\n\n  _.forEach(layering, function(layer) {\n    var u;\n    _.forEach(layer, function(v) {\n      var vRoot = root[v];\n      blockGraph.setNode(vRoot);\n      if (u) {\n        var uRoot = root[u],\n          prevMax = blockGraph.edge(uRoot, vRoot);\n        blockGraph.setEdge(uRoot, vRoot, Math.max(sepFn(g, v, u), prevMax || 0));\n      }\n      u = v;\n    });\n  });\n\n  return blockGraph;\n}\n\n/*\n * Returns the alignment that has the smallest width of the given alignments.\n */\nfunction findSmallestWidthAlignment(g, xss) {\n  return _.minBy(_.values(xss), function (xs) {\n    var max = Number.NEGATIVE_INFINITY;\n    var min = Number.POSITIVE_INFINITY;\n\n    _.forIn(xs, function (x, v) {\n      var halfWidth = width(g, v) / 2;\n\n      max = Math.max(x + halfWidth, max);\n      min = Math.min(x - halfWidth, min);\n    });\n\n    return max - min;\n  });\n}\n\n/*\n * Align the coordinates of each of the layout alignments such that\n * left-biased alignments have their minimum coordinate at the same point as\n * the minimum coordinate of the smallest width alignment and right-biased\n * alignments have their maximum coordinate at the same point as the maximum\n * coordinate of the smallest width alignment.\n */\nfunction alignCoordinates(xss, alignTo) {\n  var alignToVals = _.values(alignTo),\n    alignToMin = _.min(alignToVals),\n    alignToMax = _.max(alignToVals);\n\n  _.forEach([\"u\", \"d\"], function(vert) {\n    _.forEach([\"l\", \"r\"], function(horiz) {\n      var alignment = vert + horiz,\n        xs = xss[alignment],\n        delta;\n      if (xs === alignTo) return;\n\n      var xsVals = _.values(xs);\n      delta = horiz === \"l\" ? alignToMin - _.min(xsVals) : alignToMax - _.max(xsVals);\n\n      if (delta) {\n        xss[alignment] = _.mapValues(xs, function(x) { return x + delta; });\n      }\n    });\n  });\n}\n\nfunction balance(xss, align) {\n  return _.mapValues(xss.ul, function(ignore, v) {\n    if (align) {\n      return xss[align.toLowerCase()][v];\n    } else {\n      var xs = _.sortBy(_.map(xss, v));\n      return (xs[1] + xs[2]) / 2;\n    }\n  });\n}\n\nfunction positionX(g) {\n  var layering = util.buildLayerMatrix(g);\n  var conflicts = _.merge(\n    findType1Conflicts(g, layering),\n    findType2Conflicts(g, layering));\n\n  var xss = {};\n  var adjustedLayering;\n  _.forEach([\"u\", \"d\"], function(vert) {\n    adjustedLayering = vert === \"u\" ? layering : _.values(layering).reverse();\n    _.forEach([\"l\", \"r\"], function(horiz) {\n      if (horiz === \"r\") {\n        adjustedLayering = _.map(adjustedLayering, function(inner) {\n          return _.values(inner).reverse();\n        });\n      }\n\n      var neighborFn = (vert === \"u\" ? g.predecessors : g.successors).bind(g);\n      var align = verticalAlignment(g, adjustedLayering, conflicts, neighborFn);\n      var xs = horizontalCompaction(g, adjustedLayering,\n        align.root, align.align, horiz === \"r\");\n      if (horiz === \"r\") {\n        xs = _.mapValues(xs, function(x) { return -x; });\n      }\n      xss[vert + horiz] = xs;\n    });\n  });\n\n  var smallestWidth = findSmallestWidthAlignment(g, xss);\n  alignCoordinates(xss, smallestWidth);\n  return balance(xss, g.graph().align);\n}\n\nfunction sep(nodeSep, edgeSep, reverseSep) {\n  return function(g, v, w) {\n    var vLabel = g.node(v);\n    var wLabel = g.node(w);\n    var sum = 0;\n    var delta;\n\n    sum += vLabel.width / 2;\n    if (_.has(vLabel, \"labelpos\")) {\n      switch (vLabel.labelpos.toLowerCase()) {\n      case \"l\": delta = -vLabel.width / 2; break;\n      case \"r\": delta = vLabel.width / 2; break;\n      }\n    }\n    if (delta) {\n      sum += reverseSep ? delta : -delta;\n    }\n    delta = 0;\n\n    sum += (vLabel.dummy ? edgeSep : nodeSep) / 2;\n    sum += (wLabel.dummy ? edgeSep : nodeSep) / 2;\n\n    sum += wLabel.width / 2;\n    if (_.has(wLabel, \"labelpos\")) {\n      switch (wLabel.labelpos.toLowerCase()) {\n      case \"l\": delta = wLabel.width / 2; break;\n      case \"r\": delta = -wLabel.width / 2; break;\n      }\n    }\n    if (delta) {\n      sum += reverseSep ? delta : -delta;\n    }\n    delta = 0;\n\n    return sum;\n  };\n}\n\nfunction width(g, v) {\n  return g.node(v).width;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre/lib/position/index.js\":\n/*!**************************************************!*\\\n  !*** ./node_modules/dagre/lib/position/index.js ***!\n  \\**************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _ = __webpack_require__(/*! ../lodash */ \"./node_modules/dagre/lib/lodash.js\");\nvar util = __webpack_require__(/*! ../util */ \"./node_modules/dagre/lib/util.js\");\nvar positionX = __webpack_require__(/*! ./bk */ \"./node_modules/dagre/lib/position/bk.js\").positionX;\n\nmodule.exports = position;\n\nfunction position(g) {\n  g = util.asNonCompoundGraph(g);\n\n  positionY(g);\n  _.forEach(positionX(g), function(x, v) {\n    g.node(v).x = x;\n  });\n}\n\nfunction positionY(g) {\n  var layering = util.buildLayerMatrix(g);\n  var rankSep = g.graph().ranksep;\n  var prevY = 0;\n  _.forEach(layering, function(layer) {\n    var maxHeight = _.max(_.map(layer, function(v) { return g.node(v).height; }));\n    _.forEach(layer, function(v) {\n      g.node(v).y = prevY + maxHeight / 2;\n    });\n    prevY += maxHeight + rankSep;\n  });\n}\n\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre/lib/rank/feasible-tree.js\":\n/*!******************************************************!*\\\n  !*** ./node_modules/dagre/lib/rank/feasible-tree.js ***!\n  \\******************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _ = __webpack_require__(/*! ../lodash */ \"./node_modules/dagre/lib/lodash.js\");\nvar Graph = __webpack_require__(/*! ../graphlib */ \"./node_modules/dagre/lib/graphlib.js\").Graph;\nvar slack = __webpack_require__(/*! ./util */ \"./node_modules/dagre/lib/rank/util.js\").slack;\n\nmodule.exports = feasibleTree;\n\n/*\n * Constructs a spanning tree with tight edges and adjusted the input node's\n * ranks to achieve this. A tight edge is one that is has a length that matches\n * its \"minlen\" attribute.\n *\n * The basic structure for this function is derived from Gansner, et al., \"A\n * Technique for Drawing Directed Graphs.\"\n *\n * Pre-conditions:\n *\n *    1. Graph must be a DAG.\n *    2. Graph must be connected.\n *    3. Graph must have at least one node.\n *    5. Graph nodes must have been previously assigned a \"rank\" property that\n *       respects the \"minlen\" property of incident edges.\n *    6. Graph edges must have a \"minlen\" property.\n *\n * Post-conditions:\n *\n *    - Graph nodes will have their rank adjusted to ensure that all edges are\n *      tight.\n *\n * Returns a tree (undirected graph) that is constructed using only \"tight\"\n * edges.\n */\nfunction feasibleTree(g) {\n  var t = new Graph({ directed: false });\n\n  // Choose arbitrary node from which to start our tree\n  var start = g.nodes()[0];\n  var size = g.nodeCount();\n  t.setNode(start, {});\n\n  var edge, delta;\n  while (tightTree(t, g) < size) {\n    edge = findMinSlackEdge(t, g);\n    delta = t.hasNode(edge.v) ? slack(g, edge) : -slack(g, edge);\n    shiftRanks(t, g, delta);\n  }\n\n  return t;\n}\n\n/*\n * Finds a maximal tree of tight edges and returns the number of nodes in the\n * tree.\n */\nfunction tightTree(t, g) {\n  function dfs(v) {\n    _.forEach(g.nodeEdges(v), function(e) {\n      var edgeV = e.v,\n        w = (v === edgeV) ? e.w : edgeV;\n      if (!t.hasNode(w) && !slack(g, e)) {\n        t.setNode(w, {});\n        t.setEdge(v, w, {});\n        dfs(w);\n      }\n    });\n  }\n\n  _.forEach(t.nodes(), dfs);\n  return t.nodeCount();\n}\n\n/*\n * Finds the edge with the smallest slack that is incident on tree and returns\n * it.\n */\nfunction findMinSlackEdge(t, g) {\n  return _.minBy(g.edges(), function(e) {\n    if (t.hasNode(e.v) !== t.hasNode(e.w)) {\n      return slack(g, e);\n    }\n  });\n}\n\nfunction shiftRanks(t, g, delta) {\n  _.forEach(t.nodes(), function(v) {\n    g.node(v).rank += delta;\n  });\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre/lib/rank/index.js\":\n/*!**********************************************!*\\\n  !*** ./node_modules/dagre/lib/rank/index.js ***!\n  \\**********************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar rankUtil = __webpack_require__(/*! ./util */ \"./node_modules/dagre/lib/rank/util.js\");\nvar longestPath = rankUtil.longestPath;\nvar feasibleTree = __webpack_require__(/*! ./feasible-tree */ \"./node_modules/dagre/lib/rank/feasible-tree.js\");\nvar networkSimplex = __webpack_require__(/*! ./network-simplex */ \"./node_modules/dagre/lib/rank/network-simplex.js\");\n\nmodule.exports = rank;\n\n/*\n * Assigns a rank to each node in the input graph that respects the \"minlen\"\n * constraint specified on edges between nodes.\n *\n * This basic structure is derived from Gansner, et al., \"A Technique for\n * Drawing Directed Graphs.\"\n *\n * Pre-conditions:\n *\n *    1. Graph must be a connected DAG\n *    2. Graph nodes must be objects\n *    3. Graph edges must have \"weight\" and \"minlen\" attributes\n *\n * Post-conditions:\n *\n *    1. Graph nodes will have a \"rank\" attribute based on the results of the\n *       algorithm. Ranks can start at any index (including negative), we'll\n *       fix them up later.\n */\nfunction rank(g) {\n  switch(g.graph().ranker) {\n  case \"network-simplex\": networkSimplexRanker(g); break;\n  case \"tight-tree\": tightTreeRanker(g); break;\n  case \"longest-path\": longestPathRanker(g); break;\n  default: networkSimplexRanker(g);\n  }\n}\n\n// A fast and simple ranker, but results are far from optimal.\nvar longestPathRanker = longestPath;\n\nfunction tightTreeRanker(g) {\n  longestPath(g);\n  feasibleTree(g);\n}\n\nfunction networkSimplexRanker(g) {\n  networkSimplex(g);\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre/lib/rank/network-simplex.js\":\n/*!********************************************************!*\\\n  !*** ./node_modules/dagre/lib/rank/network-simplex.js ***!\n  \\********************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _ = __webpack_require__(/*! ../lodash */ \"./node_modules/dagre/lib/lodash.js\");\nvar feasibleTree = __webpack_require__(/*! ./feasible-tree */ \"./node_modules/dagre/lib/rank/feasible-tree.js\");\nvar slack = __webpack_require__(/*! ./util */ \"./node_modules/dagre/lib/rank/util.js\").slack;\nvar initRank = __webpack_require__(/*! ./util */ \"./node_modules/dagre/lib/rank/util.js\").longestPath;\nvar preorder = __webpack_require__(/*! ../graphlib */ \"./node_modules/dagre/lib/graphlib.js\").alg.preorder;\nvar postorder = __webpack_require__(/*! ../graphlib */ \"./node_modules/dagre/lib/graphlib.js\").alg.postorder;\nvar simplify = __webpack_require__(/*! ../util */ \"./node_modules/dagre/lib/util.js\").simplify;\n\nmodule.exports = networkSimplex;\n\n// Expose some internals for testing purposes\nnetworkSimplex.initLowLimValues = initLowLimValues;\nnetworkSimplex.initCutValues = initCutValues;\nnetworkSimplex.calcCutValue = calcCutValue;\nnetworkSimplex.leaveEdge = leaveEdge;\nnetworkSimplex.enterEdge = enterEdge;\nnetworkSimplex.exchangeEdges = exchangeEdges;\n\n/*\n * The network simplex algorithm assigns ranks to each node in the input graph\n * and iteratively improves the ranking to reduce the length of edges.\n *\n * Preconditions:\n *\n *    1. The input graph must be a DAG.\n *    2. All nodes in the graph must have an object value.\n *    3. All edges in the graph must have \"minlen\" and \"weight\" attributes.\n *\n * Postconditions:\n *\n *    1. All nodes in the graph will have an assigned \"rank\" attribute that has\n *       been optimized by the network simplex algorithm. Ranks start at 0.\n *\n *\n * A rough sketch of the algorithm is as follows:\n *\n *    1. Assign initial ranks to each node. We use the longest path algorithm,\n *       which assigns ranks to the lowest position possible. In general this\n *       leads to very wide bottom ranks and unnecessarily long edges.\n *    2. Construct a feasible tight tree. A tight tree is one such that all\n *       edges in the tree have no slack (difference between length of edge\n *       and minlen for the edge). This by itself greatly improves the assigned\n *       rankings by shorting edges.\n *    3. Iteratively find edges that have negative cut values. Generally a\n *       negative cut value indicates that the edge could be removed and a new\n *       tree edge could be added to produce a more compact graph.\n *\n * Much of the algorithms here are derived from Gansner, et al., \"A Technique\n * for Drawing Directed Graphs.\" The structure of the file roughly follows the\n * structure of the overall algorithm.\n */\nfunction networkSimplex(g) {\n  g = simplify(g);\n  initRank(g);\n  var t = feasibleTree(g);\n  initLowLimValues(t);\n  initCutValues(t, g);\n\n  var e, f;\n  while ((e = leaveEdge(t))) {\n    f = enterEdge(t, g, e);\n    exchangeEdges(t, g, e, f);\n  }\n}\n\n/*\n * Initializes cut values for all edges in the tree.\n */\nfunction initCutValues(t, g) {\n  var vs = postorder(t, t.nodes());\n  vs = vs.slice(0, vs.length - 1);\n  _.forEach(vs, function(v) {\n    assignCutValue(t, g, v);\n  });\n}\n\nfunction assignCutValue(t, g, child) {\n  var childLab = t.node(child);\n  var parent = childLab.parent;\n  t.edge(child, parent).cutvalue = calcCutValue(t, g, child);\n}\n\n/*\n * Given the tight tree, its graph, and a child in the graph calculate and\n * return the cut value for the edge between the child and its parent.\n */\nfunction calcCutValue(t, g, child) {\n  var childLab = t.node(child);\n  var parent = childLab.parent;\n  // True if the child is on the tail end of the edge in the directed graph\n  var childIsTail = true;\n  // The graph's view of the tree edge we're inspecting\n  var graphEdge = g.edge(child, parent);\n  // The accumulated cut value for the edge between this node and its parent\n  var cutValue = 0;\n\n  if (!graphEdge) {\n    childIsTail = false;\n    graphEdge = g.edge(parent, child);\n  }\n\n  cutValue = graphEdge.weight;\n\n  _.forEach(g.nodeEdges(child), function(e) {\n    var isOutEdge = e.v === child,\n      other = isOutEdge ? e.w : e.v;\n\n    if (other !== parent) {\n      var pointsToHead = isOutEdge === childIsTail,\n        otherWeight = g.edge(e).weight;\n\n      cutValue += pointsToHead ? otherWeight : -otherWeight;\n      if (isTreeEdge(t, child, other)) {\n        var otherCutValue = t.edge(child, other).cutvalue;\n        cutValue += pointsToHead ? -otherCutValue : otherCutValue;\n      }\n    }\n  });\n\n  return cutValue;\n}\n\nfunction initLowLimValues(tree, root) {\n  if (arguments.length < 2) {\n    root = tree.nodes()[0];\n  }\n  dfsAssignLowLim(tree, {}, 1, root);\n}\n\nfunction dfsAssignLowLim(tree, visited, nextLim, v, parent) {\n  var low = nextLim;\n  var label = tree.node(v);\n\n  visited[v] = true;\n  _.forEach(tree.neighbors(v), function(w) {\n    if (!_.has(visited, w)) {\n      nextLim = dfsAssignLowLim(tree, visited, nextLim, w, v);\n    }\n  });\n\n  label.low = low;\n  label.lim = nextLim++;\n  if (parent) {\n    label.parent = parent;\n  } else {\n    // TODO should be able to remove this when we incrementally update low lim\n    delete label.parent;\n  }\n\n  return nextLim;\n}\n\nfunction leaveEdge(tree) {\n  return _.find(tree.edges(), function(e) {\n    return tree.edge(e).cutvalue < 0;\n  });\n}\n\nfunction enterEdge(t, g, edge) {\n  var v = edge.v;\n  var w = edge.w;\n\n  // For the rest of this function we assume that v is the tail and w is the\n  // head, so if we don't have this edge in the graph we should flip it to\n  // match the correct orientation.\n  if (!g.hasEdge(v, w)) {\n    v = edge.w;\n    w = edge.v;\n  }\n\n  var vLabel = t.node(v);\n  var wLabel = t.node(w);\n  var tailLabel = vLabel;\n  var flip = false;\n\n  // If the root is in the tail of the edge then we need to flip the logic that\n  // checks for the head and tail nodes in the candidates function below.\n  if (vLabel.lim > wLabel.lim) {\n    tailLabel = wLabel;\n    flip = true;\n  }\n\n  var candidates = _.filter(g.edges(), function(edge) {\n    return flip === isDescendant(t, t.node(edge.v), tailLabel) &&\n           flip !== isDescendant(t, t.node(edge.w), tailLabel);\n  });\n\n  return _.minBy(candidates, function(edge) { return slack(g, edge); });\n}\n\nfunction exchangeEdges(t, g, e, f) {\n  var v = e.v;\n  var w = e.w;\n  t.removeEdge(v, w);\n  t.setEdge(f.v, f.w, {});\n  initLowLimValues(t);\n  initCutValues(t, g);\n  updateRanks(t, g);\n}\n\nfunction updateRanks(t, g) {\n  var root = _.find(t.nodes(), function(v) { return !g.node(v).parent; });\n  var vs = preorder(t, root);\n  vs = vs.slice(1);\n  _.forEach(vs, function(v) {\n    var parent = t.node(v).parent,\n      edge = g.edge(v, parent),\n      flipped = false;\n\n    if (!edge) {\n      edge = g.edge(parent, v);\n      flipped = true;\n    }\n\n    g.node(v).rank = g.node(parent).rank + (flipped ? edge.minlen : -edge.minlen);\n  });\n}\n\n/*\n * Returns true if the edge is in the tree.\n */\nfunction isTreeEdge(tree, u, v) {\n  return tree.hasEdge(u, v);\n}\n\n/*\n * Returns true if the specified node is descendant of the root node per the\n * assigned low and lim attributes in the tree.\n */\nfunction isDescendant(tree, vLabel, rootLabel) {\n  return rootLabel.low <= vLabel.lim && vLabel.lim <= rootLabel.lim;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre/lib/rank/util.js\":\n/*!*********************************************!*\\\n  !*** ./node_modules/dagre/lib/rank/util.js ***!\n  \\*********************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _ = __webpack_require__(/*! ../lodash */ \"./node_modules/dagre/lib/lodash.js\");\n\nmodule.exports = {\n  longestPath: longestPath,\n  slack: slack\n};\n\n/*\n * Initializes ranks for the input graph using the longest path algorithm. This\n * algorithm scales well and is fast in practice, it yields rather poor\n * solutions. Nodes are pushed to the lowest layer possible, leaving the bottom\n * ranks wide and leaving edges longer than necessary. However, due to its\n * speed, this algorithm is good for getting an initial ranking that can be fed\n * into other algorithms.\n *\n * This algorithm does not normalize layers because it will be used by other\n * algorithms in most cases. If using this algorithm directly, be sure to\n * run normalize at the end.\n *\n * Pre-conditions:\n *\n *    1. Input graph is a DAG.\n *    2. Input graph node labels can be assigned properties.\n *\n * Post-conditions:\n *\n *    1. Each node will be assign an (unnormalized) \"rank\" property.\n */\nfunction longestPath(g) {\n  var visited = {};\n\n  function dfs(v) {\n    var label = g.node(v);\n    if (_.has(visited, v)) {\n      return label.rank;\n    }\n    visited[v] = true;\n\n    var rank = _.min(_.map(g.outEdges(v), function(e) {\n      return dfs(e.w) - g.edge(e).minlen;\n    }));\n\n    if (rank === Number.POSITIVE_INFINITY || // return value of _.map([]) for Lodash 3\n        rank === undefined || // return value of _.map([]) for Lodash 4\n        rank === null) { // return value of _.map([null])\n      rank = 0;\n    }\n\n    return (label.rank = rank);\n  }\n\n  _.forEach(g.sources(), dfs);\n}\n\n/*\n * Returns the amount of slack for the given edge. The slack is defined as the\n * difference between the length of the edge and its minimum length.\n */\nfunction slack(g, e) {\n  return g.node(e.w).rank - g.node(e.v).rank - g.edge(e).minlen;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre/lib/util.js\":\n/*!****************************************!*\\\n  !*** ./node_modules/dagre/lib/util.js ***!\n  \\****************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/* eslint \"no-console\": off */\n\n\n\nvar _ = __webpack_require__(/*! ./lodash */ \"./node_modules/dagre/lib/lodash.js\");\nvar Graph = __webpack_require__(/*! ./graphlib */ \"./node_modules/dagre/lib/graphlib.js\").Graph;\n\nmodule.exports = {\n  addDummyNode: addDummyNode,\n  simplify: simplify,\n  asNonCompoundGraph: asNonCompoundGraph,\n  successorWeights: successorWeights,\n  predecessorWeights: predecessorWeights,\n  intersectRect: intersectRect,\n  buildLayerMatrix: buildLayerMatrix,\n  normalizeRanks: normalizeRanks,\n  removeEmptyRanks: removeEmptyRanks,\n  addBorderNode: addBorderNode,\n  maxRank: maxRank,\n  partition: partition,\n  time: time,\n  notime: notime\n};\n\n/*\n * Adds a dummy node to the graph and return v.\n */\nfunction addDummyNode(g, type, attrs, name) {\n  var v;\n  do {\n    v = _.uniqueId(name);\n  } while (g.hasNode(v));\n\n  attrs.dummy = type;\n  g.setNode(v, attrs);\n  return v;\n}\n\n/*\n * Returns a new graph with only simple edges. Handles aggregation of data\n * associated with multi-edges.\n */\nfunction simplify(g) {\n  var simplified = new Graph().setGraph(g.graph());\n  _.forEach(g.nodes(), function(v) { simplified.setNode(v, g.node(v)); });\n  _.forEach(g.edges(), function(e) {\n    var simpleLabel = simplified.edge(e.v, e.w) || { weight: 0, minlen: 1 };\n    var label = g.edge(e);\n    simplified.setEdge(e.v, e.w, {\n      weight: simpleLabel.weight + label.weight,\n      minlen: Math.max(simpleLabel.minlen, label.minlen)\n    });\n  });\n  return simplified;\n}\n\nfunction asNonCompoundGraph(g) {\n  var simplified = new Graph({ multigraph: g.isMultigraph() }).setGraph(g.graph());\n  _.forEach(g.nodes(), function(v) {\n    if (!g.children(v).length) {\n      simplified.setNode(v, g.node(v));\n    }\n  });\n  _.forEach(g.edges(), function(e) {\n    simplified.setEdge(e, g.edge(e));\n  });\n  return simplified;\n}\n\nfunction successorWeights(g) {\n  var weightMap = _.map(g.nodes(), function(v) {\n    var sucs = {};\n    _.forEach(g.outEdges(v), function(e) {\n      sucs[e.w] = (sucs[e.w] || 0) + g.edge(e).weight;\n    });\n    return sucs;\n  });\n  return _.zipObject(g.nodes(), weightMap);\n}\n\nfunction predecessorWeights(g) {\n  var weightMap = _.map(g.nodes(), function(v) {\n    var preds = {};\n    _.forEach(g.inEdges(v), function(e) {\n      preds[e.v] = (preds[e.v] || 0) + g.edge(e).weight;\n    });\n    return preds;\n  });\n  return _.zipObject(g.nodes(), weightMap);\n}\n\n/*\n * Finds where a line starting at point ({x, y}) would intersect a rectangle\n * ({x, y, width, height}) if it were pointing at the rectangle's center.\n */\nfunction intersectRect(rect, point) {\n  var x = rect.x;\n  var y = rect.y;\n\n  // Rectangle intersection algorithm from:\n  // http://math.stackexchange.com/questions/108113/find-edge-between-two-boxes\n  var dx = point.x - x;\n  var dy = point.y - y;\n  var w = rect.width / 2;\n  var h = rect.height / 2;\n\n  if (!dx && !dy) {\n    throw new Error(\"Not possible to find intersection inside of the rectangle\");\n  }\n\n  var sx, sy;\n  if (Math.abs(dy) * w > Math.abs(dx) * h) {\n    // Intersection is top or bottom of rect.\n    if (dy < 0) {\n      h = -h;\n    }\n    sx = h * dx / dy;\n    sy = h;\n  } else {\n    // Intersection is left or right of rect.\n    if (dx < 0) {\n      w = -w;\n    }\n    sx = w;\n    sy = w * dy / dx;\n  }\n\n  return { x: x + sx, y: y + sy };\n}\n\n/*\n * Given a DAG with each node assigned \"rank\" and \"order\" properties, this\n * function will produce a matrix with the ids of each node.\n */\nfunction buildLayerMatrix(g) {\n  var layering = _.map(_.range(maxRank(g) + 1), function() { return []; });\n  _.forEach(g.nodes(), function(v) {\n    var node = g.node(v);\n    var rank = node.rank;\n    if (!_.isUndefined(rank)) {\n      layering[rank][node.order] = v;\n    }\n  });\n  return layering;\n}\n\n/*\n * Adjusts the ranks for all nodes in the graph such that all nodes v have\n * rank(v) >= 0 and at least one node w has rank(w) = 0.\n */\nfunction normalizeRanks(g) {\n  var min = _.min(_.map(g.nodes(), function(v) { return g.node(v).rank; }));\n  _.forEach(g.nodes(), function(v) {\n    var node = g.node(v);\n    if (_.has(node, \"rank\")) {\n      node.rank -= min;\n    }\n  });\n}\n\nfunction removeEmptyRanks(g) {\n  // Ranks may not start at 0, so we need to offset them\n  var offset = _.min(_.map(g.nodes(), function(v) { return g.node(v).rank; }));\n\n  var layers = [];\n  _.forEach(g.nodes(), function(v) {\n    var rank = g.node(v).rank - offset;\n    if (!layers[rank]) {\n      layers[rank] = [];\n    }\n    layers[rank].push(v);\n  });\n\n  var delta = 0;\n  var nodeRankFactor = g.graph().nodeRankFactor;\n  _.forEach(layers, function(vs, i) {\n    if (_.isUndefined(vs) && i % nodeRankFactor !== 0) {\n      --delta;\n    } else if (delta) {\n      _.forEach(vs, function(v) { g.node(v).rank += delta; });\n    }\n  });\n}\n\nfunction addBorderNode(g, prefix, rank, order) {\n  var node = {\n    width: 0,\n    height: 0\n  };\n  if (arguments.length >= 4) {\n    node.rank = rank;\n    node.order = order;\n  }\n  return addDummyNode(g, \"border\", node, prefix);\n}\n\nfunction maxRank(g) {\n  return _.max(_.map(g.nodes(), function(v) {\n    var rank = g.node(v).rank;\n    if (!_.isUndefined(rank)) {\n      return rank;\n    }\n  }));\n}\n\n/*\n * Partition a collection into two groups: `lhs` and `rhs`. If the supplied\n * function returns true for an entry it goes into `lhs`. Otherwise it goes\n * into `rhs.\n */\nfunction partition(collection, fn) {\n  var result = { lhs: [], rhs: [] };\n  _.forEach(collection, function(value) {\n    if (fn(value)) {\n      result.lhs.push(value);\n    } else {\n      result.rhs.push(value);\n    }\n  });\n  return result;\n}\n\n/*\n * Returns a new function that wraps `fn` with a timer. The wrapper logs the\n * time it takes to execute the function.\n */\nfunction time(name, fn) {\n  var start = _.now();\n  try {\n    return fn();\n  } finally {\n    console.log(name + \" time: \" + (_.now() - start) + \"ms\");\n  }\n}\n\nfunction notime(name, fn) {\n  return fn();\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/dagre/lib/version.js\":\n/*!*******************************************!*\\\n  !*** ./node_modules/dagre/lib/version.js ***!\n  \\*******************************************/\n/*! no static exports found */\n/***/ (function(module, exports) {\n\nmodule.exports = \"0.8.5\";\n\n\n/***/ }),\n\n/***/ \"./node_modules/delaunator/index.js\":\n/*!******************************************!*\\\n  !*** ./node_modules/delaunator/index.js ***!\n  \\******************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return Delaunator; });\n/* harmony import */ var robust_predicates__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! robust-predicates */ \"./node_modules/robust-predicates/index.js\");\n\nconst EPSILON = Math.pow(2, -52);\nconst EDGE_STACK = new Uint32Array(512);\n\n\n\nclass Delaunator {\n\n    static from(points, getX = defaultGetX, getY = defaultGetY) {\n        const n = points.length;\n        const coords = new Float64Array(n * 2);\n\n        for (let i = 0; i < n; i++) {\n            const p = points[i];\n            coords[2 * i] = getX(p);\n            coords[2 * i + 1] = getY(p);\n        }\n\n        return new Delaunator(coords);\n    }\n\n    constructor(coords) {\n        const n = coords.length >> 1;\n        if (n > 0 && typeof coords[0] !== 'number') throw new Error('Expected coords to contain numbers.');\n\n        this.coords = coords;\n\n        // arrays that will store the triangulation graph\n        const maxTriangles = Math.max(2 * n - 5, 0);\n        this._triangles = new Uint32Array(maxTriangles * 3);\n        this._halfedges = new Int32Array(maxTriangles * 3);\n\n        // temporary arrays for tracking the edges of the advancing convex hull\n        this._hashSize = Math.ceil(Math.sqrt(n));\n        this._hullPrev = new Uint32Array(n); // edge to prev edge\n        this._hullNext = new Uint32Array(n); // edge to next edge\n        this._hullTri = new Uint32Array(n); // edge to adjacent triangle\n        this._hullHash = new Int32Array(this._hashSize).fill(-1); // angular edge hash\n\n        // temporary arrays for sorting points\n        this._ids = new Uint32Array(n);\n        this._dists = new Float64Array(n);\n\n        this.update();\n    }\n\n    update() {\n        const {coords, _hullPrev: hullPrev, _hullNext: hullNext, _hullTri: hullTri, _hullHash: hullHash} =  this;\n        const n = coords.length >> 1;\n\n        // populate an array of point indices; calculate input data bbox\n        let minX = Infinity;\n        let minY = Infinity;\n        let maxX = -Infinity;\n        let maxY = -Infinity;\n\n        for (let i = 0; i < n; i++) {\n            const x = coords[2 * i];\n            const y = coords[2 * i + 1];\n            if (x < minX) minX = x;\n            if (y < minY) minY = y;\n            if (x > maxX) maxX = x;\n            if (y > maxY) maxY = y;\n            this._ids[i] = i;\n        }\n        const cx = (minX + maxX) / 2;\n        const cy = (minY + maxY) / 2;\n\n        let minDist = Infinity;\n        let i0, i1, i2;\n\n        // pick a seed point close to the center\n        for (let i = 0; i < n; i++) {\n            const d = dist(cx, cy, coords[2 * i], coords[2 * i + 1]);\n            if (d < minDist) {\n                i0 = i;\n                minDist = d;\n            }\n        }\n        const i0x = coords[2 * i0];\n        const i0y = coords[2 * i0 + 1];\n\n        minDist = Infinity;\n\n        // find the point closest to the seed\n        for (let i = 0; i < n; i++) {\n            if (i === i0) continue;\n            const d = dist(i0x, i0y, coords[2 * i], coords[2 * i + 1]);\n            if (d < minDist && d > 0) {\n                i1 = i;\n                minDist = d;\n            }\n        }\n        let i1x = coords[2 * i1];\n        let i1y = coords[2 * i1 + 1];\n\n        let minRadius = Infinity;\n\n        // find the third point which forms the smallest circumcircle with the first two\n        for (let i = 0; i < n; i++) {\n            if (i === i0 || i === i1) continue;\n            const r = circumradius(i0x, i0y, i1x, i1y, coords[2 * i], coords[2 * i + 1]);\n            if (r < minRadius) {\n                i2 = i;\n                minRadius = r;\n            }\n        }\n        let i2x = coords[2 * i2];\n        let i2y = coords[2 * i2 + 1];\n\n        if (minRadius === Infinity) {\n            // order collinear points by dx (or dy if all x are identical)\n            // and return the list as a hull\n            for (let i = 0; i < n; i++) {\n                this._dists[i] = (coords[2 * i] - coords[0]) || (coords[2 * i + 1] - coords[1]);\n            }\n            quicksort(this._ids, this._dists, 0, n - 1);\n            const hull = new Uint32Array(n);\n            let j = 0;\n            for (let i = 0, d0 = -Infinity; i < n; i++) {\n                const id = this._ids[i];\n                if (this._dists[id] > d0) {\n                    hull[j++] = id;\n                    d0 = this._dists[id];\n                }\n            }\n            this.hull = hull.subarray(0, j);\n            this.triangles = new Uint32Array(0);\n            this.halfedges = new Uint32Array(0);\n            return;\n        }\n\n        // swap the order of the seed points for counter-clockwise orientation\n        if (Object(robust_predicates__WEBPACK_IMPORTED_MODULE_0__[\"orient2d\"])(i0x, i0y, i1x, i1y, i2x, i2y) < 0) {\n            const i = i1;\n            const x = i1x;\n            const y = i1y;\n            i1 = i2;\n            i1x = i2x;\n            i1y = i2y;\n            i2 = i;\n            i2x = x;\n            i2y = y;\n        }\n\n        const center = circumcenter(i0x, i0y, i1x, i1y, i2x, i2y);\n        this._cx = center.x;\n        this._cy = center.y;\n\n        for (let i = 0; i < n; i++) {\n            this._dists[i] = dist(coords[2 * i], coords[2 * i + 1], center.x, center.y);\n        }\n\n        // sort the points by distance from the seed triangle circumcenter\n        quicksort(this._ids, this._dists, 0, n - 1);\n\n        // set up the seed triangle as the starting hull\n        this._hullStart = i0;\n        let hullSize = 3;\n\n        hullNext[i0] = hullPrev[i2] = i1;\n        hullNext[i1] = hullPrev[i0] = i2;\n        hullNext[i2] = hullPrev[i1] = i0;\n\n        hullTri[i0] = 0;\n        hullTri[i1] = 1;\n        hullTri[i2] = 2;\n\n        hullHash.fill(-1);\n        hullHash[this._hashKey(i0x, i0y)] = i0;\n        hullHash[this._hashKey(i1x, i1y)] = i1;\n        hullHash[this._hashKey(i2x, i2y)] = i2;\n\n        this.trianglesLen = 0;\n        this._addTriangle(i0, i1, i2, -1, -1, -1);\n\n        for (let k = 0, xp, yp; k < this._ids.length; k++) {\n            const i = this._ids[k];\n            const x = coords[2 * i];\n            const y = coords[2 * i + 1];\n\n            // skip near-duplicate points\n            if (k > 0 && Math.abs(x - xp) <= EPSILON && Math.abs(y - yp) <= EPSILON) continue;\n            xp = x;\n            yp = y;\n\n            // skip seed triangle points\n            if (i === i0 || i === i1 || i === i2) continue;\n\n            // find a visible edge on the convex hull using edge hash\n            let start = 0;\n            for (let j = 0, key = this._hashKey(x, y); j < this._hashSize; j++) {\n                start = hullHash[(key + j) % this._hashSize];\n                if (start !== -1 && start !== hullNext[start]) break;\n            }\n\n            start = hullPrev[start];\n            let e = start, q;\n            while (q = hullNext[e], Object(robust_predicates__WEBPACK_IMPORTED_MODULE_0__[\"orient2d\"])(x, y, coords[2 * e], coords[2 * e + 1], coords[2 * q], coords[2 * q + 1]) >= 0) {\n                e = q;\n                if (e === start) {\n                    e = -1;\n                    break;\n                }\n            }\n            if (e === -1) continue; // likely a near-duplicate point; skip it\n\n            // add the first triangle from the point\n            let t = this._addTriangle(e, i, hullNext[e], -1, -1, hullTri[e]);\n\n            // recursively flip triangles from the point until they satisfy the Delaunay condition\n            hullTri[i] = this._legalize(t + 2);\n            hullTri[e] = t; // keep track of boundary triangles on the hull\n            hullSize++;\n\n            // walk forward through the hull, adding more triangles and flipping recursively\n            let n = hullNext[e];\n            while (q = hullNext[n], Object(robust_predicates__WEBPACK_IMPORTED_MODULE_0__[\"orient2d\"])(x, y, coords[2 * n], coords[2 * n + 1], coords[2 * q], coords[2 * q + 1]) < 0) {\n                t = this._addTriangle(n, i, q, hullTri[i], -1, hullTri[n]);\n                hullTri[i] = this._legalize(t + 2);\n                hullNext[n] = n; // mark as removed\n                hullSize--;\n                n = q;\n            }\n\n            // walk backward from the other side, adding more triangles and flipping\n            if (e === start) {\n                while (q = hullPrev[e], Object(robust_predicates__WEBPACK_IMPORTED_MODULE_0__[\"orient2d\"])(x, y, coords[2 * q], coords[2 * q + 1], coords[2 * e], coords[2 * e + 1]) < 0) {\n                    t = this._addTriangle(q, i, e, -1, hullTri[e], hullTri[q]);\n                    this._legalize(t + 2);\n                    hullTri[q] = t;\n                    hullNext[e] = e; // mark as removed\n                    hullSize--;\n                    e = q;\n                }\n            }\n\n            // update the hull indices\n            this._hullStart = hullPrev[i] = e;\n            hullNext[e] = hullPrev[n] = i;\n            hullNext[i] = n;\n\n            // save the two new edges in the hash table\n            hullHash[this._hashKey(x, y)] = i;\n            hullHash[this._hashKey(coords[2 * e], coords[2 * e + 1])] = e;\n        }\n\n        this.hull = new Uint32Array(hullSize);\n        for (let i = 0, e = this._hullStart; i < hullSize; i++) {\n            this.hull[i] = e;\n            e = hullNext[e];\n        }\n\n        // trim typed triangle mesh arrays\n        this.triangles = this._triangles.subarray(0, this.trianglesLen);\n        this.halfedges = this._halfedges.subarray(0, this.trianglesLen);\n    }\n\n    _hashKey(x, y) {\n        return Math.floor(pseudoAngle(x - this._cx, y - this._cy) * this._hashSize) % this._hashSize;\n    }\n\n    _legalize(a) {\n        const {_triangles: triangles, _halfedges: halfedges, coords} = this;\n\n        let i = 0;\n        let ar = 0;\n\n        // recursion eliminated with a fixed-size stack\n        while (true) {\n            const b = halfedges[a];\n\n            /* if the pair of triangles doesn't satisfy the Delaunay condition\n             * (p1 is inside the circumcircle of [p0, pl, pr]), flip them,\n             * then do the same check/flip recursively for the new pair of triangles\n             *\n             *           pl                    pl\n             *          /||\\                  /  \\\n             *       al/ || \\bl            al/    \\a\n             *        /  ||  \\              /      \\\n             *       /  a||b  \\    flip    /___ar___\\\n             *     p0\\   ||   /p1   =>   p0\\---bl---/p1\n             *        \\  ||  /              \\      /\n             *       ar\\ || /br             b\\    /br\n             *          \\||/                  \\  /\n             *           pr                    pr\n             */\n            const a0 = a - a % 3;\n            ar = a0 + (a + 2) % 3;\n\n            if (b === -1) { // convex hull edge\n                if (i === 0) break;\n                a = EDGE_STACK[--i];\n                continue;\n            }\n\n            const b0 = b - b % 3;\n            const al = a0 + (a + 1) % 3;\n            const bl = b0 + (b + 2) % 3;\n\n            const p0 = triangles[ar];\n            const pr = triangles[a];\n            const pl = triangles[al];\n            const p1 = triangles[bl];\n\n            const illegal = inCircle(\n                coords[2 * p0], coords[2 * p0 + 1],\n                coords[2 * pr], coords[2 * pr + 1],\n                coords[2 * pl], coords[2 * pl + 1],\n                coords[2 * p1], coords[2 * p1 + 1]);\n\n            if (illegal) {\n                triangles[a] = p1;\n                triangles[b] = p0;\n\n                const hbl = halfedges[bl];\n\n                // edge swapped on the other side of the hull (rare); fix the halfedge reference\n                if (hbl === -1) {\n                    let e = this._hullStart;\n                    do {\n                        if (this._hullTri[e] === bl) {\n                            this._hullTri[e] = a;\n                            break;\n                        }\n                        e = this._hullPrev[e];\n                    } while (e !== this._hullStart);\n                }\n                this._link(a, hbl);\n                this._link(b, halfedges[ar]);\n                this._link(ar, bl);\n\n                const br = b0 + (b + 1) % 3;\n\n                // don't worry about hitting the cap: it can only happen on extremely degenerate input\n                if (i < EDGE_STACK.length) {\n                    EDGE_STACK[i++] = br;\n                }\n            } else {\n                if (i === 0) break;\n                a = EDGE_STACK[--i];\n            }\n        }\n\n        return ar;\n    }\n\n    _link(a, b) {\n        this._halfedges[a] = b;\n        if (b !== -1) this._halfedges[b] = a;\n    }\n\n    // add a new triangle given vertex indices and adjacent half-edge ids\n    _addTriangle(i0, i1, i2, a, b, c) {\n        const t = this.trianglesLen;\n\n        this._triangles[t] = i0;\n        this._triangles[t + 1] = i1;\n        this._triangles[t + 2] = i2;\n\n        this._link(t, a);\n        this._link(t + 1, b);\n        this._link(t + 2, c);\n\n        this.trianglesLen += 3;\n\n        return t;\n    }\n}\n\n// monotonically increases with real angle, but doesn't need expensive trigonometry\nfunction pseudoAngle(dx, dy) {\n    const p = dx / (Math.abs(dx) + Math.abs(dy));\n    return (dy > 0 ? 3 - p : 1 + p) / 4; // [0..1]\n}\n\nfunction dist(ax, ay, bx, by) {\n    const dx = ax - bx;\n    const dy = ay - by;\n    return dx * dx + dy * dy;\n}\n\nfunction inCircle(ax, ay, bx, by, cx, cy, px, py) {\n    const dx = ax - px;\n    const dy = ay - py;\n    const ex = bx - px;\n    const ey = by - py;\n    const fx = cx - px;\n    const fy = cy - py;\n\n    const ap = dx * dx + dy * dy;\n    const bp = ex * ex + ey * ey;\n    const cp = fx * fx + fy * fy;\n\n    return dx * (ey * cp - bp * fy) -\n           dy * (ex * cp - bp * fx) +\n           ap * (ex * fy - ey * fx) < 0;\n}\n\nfunction circumradius(ax, ay, bx, by, cx, cy) {\n    const dx = bx - ax;\n    const dy = by - ay;\n    const ex = cx - ax;\n    const ey = cy - ay;\n\n    const bl = dx * dx + dy * dy;\n    const cl = ex * ex + ey * ey;\n    const d = 0.5 / (dx * ey - dy * ex);\n\n    const x = (ey * bl - dy * cl) * d;\n    const y = (dx * cl - ex * bl) * d;\n\n    return x * x + y * y;\n}\n\nfunction circumcenter(ax, ay, bx, by, cx, cy) {\n    const dx = bx - ax;\n    const dy = by - ay;\n    const ex = cx - ax;\n    const ey = cy - ay;\n\n    const bl = dx * dx + dy * dy;\n    const cl = ex * ex + ey * ey;\n    const d = 0.5 / (dx * ey - dy * ex);\n\n    const x = ax + (ey * bl - dy * cl) * d;\n    const y = ay + (dx * cl - ex * bl) * d;\n\n    return {x, y};\n}\n\nfunction quicksort(ids, dists, left, right) {\n    if (right - left <= 20) {\n        for (let i = left + 1; i <= right; i++) {\n            const temp = ids[i];\n            const tempDist = dists[temp];\n            let j = i - 1;\n            while (j >= left && dists[ids[j]] > tempDist) ids[j + 1] = ids[j--];\n            ids[j + 1] = temp;\n        }\n    } else {\n        const median = (left + right) >> 1;\n        let i = left + 1;\n        let j = right;\n        swap(ids, median, i);\n        if (dists[ids[left]] > dists[ids[right]]) swap(ids, left, right);\n        if (dists[ids[i]] > dists[ids[right]]) swap(ids, i, right);\n        if (dists[ids[left]] > dists[ids[i]]) swap(ids, left, i);\n\n        const temp = ids[i];\n        const tempDist = dists[temp];\n        while (true) {\n            do i++; while (dists[ids[i]] < tempDist);\n            do j--; while (dists[ids[j]] > tempDist);\n            if (j < i) break;\n            swap(ids, i, j);\n        }\n        ids[left + 1] = ids[j];\n        ids[j] = temp;\n\n        if (right - i + 1 >= j - left) {\n            quicksort(ids, dists, i, right);\n            quicksort(ids, dists, left, j - 1);\n        } else {\n            quicksort(ids, dists, left, j - 1);\n            quicksort(ids, dists, i, right);\n        }\n    }\n}\n\nfunction swap(arr, i, j) {\n    const tmp = arr[i];\n    arr[i] = arr[j];\n    arr[j] = tmp;\n}\n\nfunction defaultGetX(p) {\n    return p[0];\n}\nfunction defaultGetY(p) {\n    return p[1];\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/dompurify/dist/purify.js\":\n/*!***********************************************!*\\\n  !*** ./node_modules/dompurify/dist/purify.js ***!\n  \\***********************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n/*! @license DOMPurify 2.3.3 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/2.3.3/LICENSE */\n\n(function (global, factory) {\n   true ? module.exports = factory() :\n  undefined;\n}(this, function () { 'use strict';\n\n  function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }\n\n  var hasOwnProperty = Object.hasOwnProperty,\n      setPrototypeOf = Object.setPrototypeOf,\n      isFrozen = Object.isFrozen,\n      getPrototypeOf = Object.getPrototypeOf,\n      getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\n  var freeze = Object.freeze,\n      seal = Object.seal,\n      create = Object.create; // eslint-disable-line import/no-mutable-exports\n\n  var _ref = typeof Reflect !== 'undefined' && Reflect,\n      apply = _ref.apply,\n      construct = _ref.construct;\n\n  if (!apply) {\n    apply = function apply(fun, thisValue, args) {\n      return fun.apply(thisValue, args);\n    };\n  }\n\n  if (!freeze) {\n    freeze = function freeze(x) {\n      return x;\n    };\n  }\n\n  if (!seal) {\n    seal = function seal(x) {\n      return x;\n    };\n  }\n\n  if (!construct) {\n    construct = function construct(Func, args) {\n      return new (Function.prototype.bind.apply(Func, [null].concat(_toConsumableArray(args))))();\n    };\n  }\n\n  var arrayForEach = unapply(Array.prototype.forEach);\n  var arrayPop = unapply(Array.prototype.pop);\n  var arrayPush = unapply(Array.prototype.push);\n\n  var stringToLowerCase = unapply(String.prototype.toLowerCase);\n  var stringMatch = unapply(String.prototype.match);\n  var stringReplace = unapply(String.prototype.replace);\n  var stringIndexOf = unapply(String.prototype.indexOf);\n  var stringTrim = unapply(String.prototype.trim);\n\n  var regExpTest = unapply(RegExp.prototype.test);\n\n  var typeErrorCreate = unconstruct(TypeError);\n\n  function unapply(func) {\n    return function (thisArg) {\n      for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n        args[_key - 1] = arguments[_key];\n      }\n\n      return apply(func, thisArg, args);\n    };\n  }\n\n  function unconstruct(func) {\n    return function () {\n      for (var _len2 = arguments.length, args = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n        args[_key2] = arguments[_key2];\n      }\n\n      return construct(func, args);\n    };\n  }\n\n  /* Add properties to a lookup table */\n  function addToSet(set, array) {\n    if (setPrototypeOf) {\n      // Make 'in' and truthy checks like Boolean(set.constructor)\n      // independent of any properties defined on Object.prototype.\n      // Prevent prototype setters from intercepting set as a this value.\n      setPrototypeOf(set, null);\n    }\n\n    var l = array.length;\n    while (l--) {\n      var element = array[l];\n      if (typeof element === 'string') {\n        var lcElement = stringToLowerCase(element);\n        if (lcElement !== element) {\n          // Config presets (e.g. tags.js, attrs.js) are immutable.\n          if (!isFrozen(array)) {\n            array[l] = lcElement;\n          }\n\n          element = lcElement;\n        }\n      }\n\n      set[element] = true;\n    }\n\n    return set;\n  }\n\n  /* Shallow clone an object */\n  function clone(object) {\n    var newObject = create(null);\n\n    var property = void 0;\n    for (property in object) {\n      if (apply(hasOwnProperty, object, [property])) {\n        newObject[property] = object[property];\n      }\n    }\n\n    return newObject;\n  }\n\n  /* IE10 doesn't support __lookupGetter__ so lets'\n   * simulate it. It also automatically checks\n   * if the prop is function or getter and behaves\n   * accordingly. */\n  function lookupGetter(object, prop) {\n    while (object !== null) {\n      var desc = getOwnPropertyDescriptor(object, prop);\n      if (desc) {\n        if (desc.get) {\n          return unapply(desc.get);\n        }\n\n        if (typeof desc.value === 'function') {\n          return unapply(desc.value);\n        }\n      }\n\n      object = getPrototypeOf(object);\n    }\n\n    function fallbackValue(element) {\n      console.warn('fallback value for', element);\n      return null;\n    }\n\n    return fallbackValue;\n  }\n\n  var html = freeze(['a', 'abbr', 'acronym', 'address', 'area', 'article', 'aside', 'audio', 'b', 'bdi', 'bdo', 'big', 'blink', 'blockquote', 'body', 'br', 'button', 'canvas', 'caption', 'center', 'cite', 'code', 'col', 'colgroup', 'content', 'data', 'datalist', 'dd', 'decorator', 'del', 'details', 'dfn', 'dialog', 'dir', 'div', 'dl', 'dt', 'element', 'em', 'fieldset', 'figcaption', 'figure', 'font', 'footer', 'form', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'header', 'hgroup', 'hr', 'html', 'i', 'img', 'input', 'ins', 'kbd', 'label', 'legend', 'li', 'main', 'map', 'mark', 'marquee', 'menu', 'menuitem', 'meter', 'nav', 'nobr', 'ol', 'optgroup', 'option', 'output', 'p', 'picture', 'pre', 'progress', 'q', 'rp', 'rt', 'ruby', 's', 'samp', 'section', 'select', 'shadow', 'small', 'source', 'spacer', 'span', 'strike', 'strong', 'style', 'sub', 'summary', 'sup', 'table', 'tbody', 'td', 'template', 'textarea', 'tfoot', 'th', 'thead', 'time', 'tr', 'track', 'tt', 'u', 'ul', 'var', 'video', 'wbr']);\n\n  // SVG\n  var svg = freeze(['svg', 'a', 'altglyph', 'altglyphdef', 'altglyphitem', 'animatecolor', 'animatemotion', 'animatetransform', 'circle', 'clippath', 'defs', 'desc', 'ellipse', 'filter', 'font', 'g', 'glyph', 'glyphref', 'hkern', 'image', 'line', 'lineargradient', 'marker', 'mask', 'metadata', 'mpath', 'path', 'pattern', 'polygon', 'polyline', 'radialgradient', 'rect', 'stop', 'style', 'switch', 'symbol', 'text', 'textpath', 'title', 'tref', 'tspan', 'view', 'vkern']);\n\n  var svgFilters = freeze(['feBlend', 'feColorMatrix', 'feComponentTransfer', 'feComposite', 'feConvolveMatrix', 'feDiffuseLighting', 'feDisplacementMap', 'feDistantLight', 'feFlood', 'feFuncA', 'feFuncB', 'feFuncG', 'feFuncR', 'feGaussianBlur', 'feMerge', 'feMergeNode', 'feMorphology', 'feOffset', 'fePointLight', 'feSpecularLighting', 'feSpotLight', 'feTile', 'feTurbulence']);\n\n  // List of SVG elements that are disallowed by default.\n  // We still need to know them so that we can do namespace\n  // checks properly in case one wants to add them to\n  // allow-list.\n  var svgDisallowed = freeze(['animate', 'color-profile', 'cursor', 'discard', 'fedropshadow', 'feimage', 'font-face', 'font-face-format', 'font-face-name', 'font-face-src', 'font-face-uri', 'foreignobject', 'hatch', 'hatchpath', 'mesh', 'meshgradient', 'meshpatch', 'meshrow', 'missing-glyph', 'script', 'set', 'solidcolor', 'unknown', 'use']);\n\n  var mathMl = freeze(['math', 'menclose', 'merror', 'mfenced', 'mfrac', 'mglyph', 'mi', 'mlabeledtr', 'mmultiscripts', 'mn', 'mo', 'mover', 'mpadded', 'mphantom', 'mroot', 'mrow', 'ms', 'mspace', 'msqrt', 'mstyle', 'msub', 'msup', 'msubsup', 'mtable', 'mtd', 'mtext', 'mtr', 'munder', 'munderover']);\n\n  // Similarly to SVG, we want to know all MathML elements,\n  // even those that we disallow by default.\n  var mathMlDisallowed = freeze(['maction', 'maligngroup', 'malignmark', 'mlongdiv', 'mscarries', 'mscarry', 'msgroup', 'mstack', 'msline', 'msrow', 'semantics', 'annotation', 'annotation-xml', 'mprescripts', 'none']);\n\n  var text = freeze(['#text']);\n\n  var html$1 = freeze(['accept', 'action', 'align', 'alt', 'autocapitalize', 'autocomplete', 'autopictureinpicture', 'autoplay', 'background', 'bgcolor', 'border', 'capture', 'cellpadding', 'cellspacing', 'checked', 'cite', 'class', 'clear', 'color', 'cols', 'colspan', 'controls', 'controlslist', 'coords', 'crossorigin', 'datetime', 'decoding', 'default', 'dir', 'disabled', 'disablepictureinpicture', 'disableremoteplayback', 'download', 'draggable', 'enctype', 'enterkeyhint', 'face', 'for', 'headers', 'height', 'hidden', 'high', 'href', 'hreflang', 'id', 'inputmode', 'integrity', 'ismap', 'kind', 'label', 'lang', 'list', 'loading', 'loop', 'low', 'max', 'maxlength', 'media', 'method', 'min', 'minlength', 'multiple', 'muted', 'name', 'noshade', 'novalidate', 'nowrap', 'open', 'optimum', 'pattern', 'placeholder', 'playsinline', 'poster', 'preload', 'pubdate', 'radiogroup', 'readonly', 'rel', 'required', 'rev', 'reversed', 'role', 'rows', 'rowspan', 'spellcheck', 'scope', 'selected', 'shape', 'size', 'sizes', 'span', 'srclang', 'start', 'src', 'srcset', 'step', 'style', 'summary', 'tabindex', 'title', 'translate', 'type', 'usemap', 'valign', 'value', 'width', 'xmlns', 'slot']);\n\n  var svg$1 = freeze(['accent-height', 'accumulate', 'additive', 'alignment-baseline', 'ascent', 'attributename', 'attributetype', 'azimuth', 'basefrequency', 'baseline-shift', 'begin', 'bias', 'by', 'class', 'clip', 'clippathunits', 'clip-path', 'clip-rule', 'color', 'color-interpolation', 'color-interpolation-filters', 'color-profile', 'color-rendering', 'cx', 'cy', 'd', 'dx', 'dy', 'diffuseconstant', 'direction', 'display', 'divisor', 'dur', 'edgemode', 'elevation', 'end', 'fill', 'fill-opacity', 'fill-rule', 'filter', 'filterunits', 'flood-color', 'flood-opacity', 'font-family', 'font-size', 'font-size-adjust', 'font-stretch', 'font-style', 'font-variant', 'font-weight', 'fx', 'fy', 'g1', 'g2', 'glyph-name', 'glyphref', 'gradientunits', 'gradienttransform', 'height', 'href', 'id', 'image-rendering', 'in', 'in2', 'k', 'k1', 'k2', 'k3', 'k4', 'kerning', 'keypoints', 'keysplines', 'keytimes', 'lang', 'lengthadjust', 'letter-spacing', 'kernelmatrix', 'kernelunitlength', 'lighting-color', 'local', 'marker-end', 'marker-mid', 'marker-start', 'markerheight', 'markerunits', 'markerwidth', 'maskcontentunits', 'maskunits', 'max', 'mask', 'media', 'method', 'mode', 'min', 'name', 'numoctaves', 'offset', 'operator', 'opacity', 'order', 'orient', 'orientation', 'origin', 'overflow', 'paint-order', 'path', 'pathlength', 'patterncontentunits', 'patterntransform', 'patternunits', 'points', 'preservealpha', 'preserveaspectratio', 'primitiveunits', 'r', 'rx', 'ry', 'radius', 'refx', 'refy', 'repeatcount', 'repeatdur', 'restart', 'result', 'rotate', 'scale', 'seed', 'shape-rendering', 'specularconstant', 'specularexponent', 'spreadmethod', 'startoffset', 'stddeviation', 'stitchtiles', 'stop-color', 'stop-opacity', 'stroke-dasharray', 'stroke-dashoffset', 'stroke-linecap', 'stroke-linejoin', 'stroke-miterlimit', 'stroke-opacity', 'stroke', 'stroke-width', 'style', 'surfacescale', 'systemlanguage', 'tabindex', 'targetx', 'targety', 'transform', 'text-anchor', 'text-decoration', 'text-rendering', 'textlength', 'type', 'u1', 'u2', 'unicode', 'values', 'viewbox', 'visibility', 'version', 'vert-adv-y', 'vert-origin-x', 'vert-origin-y', 'width', 'word-spacing', 'wrap', 'writing-mode', 'xchannelselector', 'ychannelselector', 'x', 'x1', 'x2', 'xmlns', 'y', 'y1', 'y2', 'z', 'zoomandpan']);\n\n  var mathMl$1 = freeze(['accent', 'accentunder', 'align', 'bevelled', 'close', 'columnsalign', 'columnlines', 'columnspan', 'denomalign', 'depth', 'dir', 'display', 'displaystyle', 'encoding', 'fence', 'frame', 'height', 'href', 'id', 'largeop', 'length', 'linethickness', 'lspace', 'lquote', 'mathbackground', 'mathcolor', 'mathsize', 'mathvariant', 'maxsize', 'minsize', 'movablelimits', 'notation', 'numalign', 'open', 'rowalign', 'rowlines', 'rowspacing', 'rowspan', 'rspace', 'rquote', 'scriptlevel', 'scriptminsize', 'scriptsizemultiplier', 'selection', 'separator', 'separators', 'stretchy', 'subscriptshift', 'supscriptshift', 'symmetric', 'voffset', 'width', 'xmlns']);\n\n  var xml = freeze(['xlink:href', 'xml:id', 'xlink:title', 'xml:space', 'xmlns:xlink']);\n\n  // eslint-disable-next-line unicorn/better-regex\n  var MUSTACHE_EXPR = seal(/\\{\\{[\\s\\S]*|[\\s\\S]*\\}\\}/gm); // Specify template detection regex for SAFE_FOR_TEMPLATES mode\n  var ERB_EXPR = seal(/<%[\\s\\S]*|[\\s\\S]*%>/gm);\n  var DATA_ATTR = seal(/^data-[\\-\\w.\\u00B7-\\uFFFF]/); // eslint-disable-line no-useless-escape\n  var ARIA_ATTR = seal(/^aria-[\\-\\w]+$/); // eslint-disable-line no-useless-escape\n  var IS_ALLOWED_URI = seal(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\\-]+(?:[^a-z+.\\-:]|$))/i // eslint-disable-line no-useless-escape\n  );\n  var IS_SCRIPT_OR_DATA = seal(/^(?:\\w+script|data):/i);\n  var ATTR_WHITESPACE = seal(/[\\u0000-\\u0020\\u00A0\\u1680\\u180E\\u2000-\\u2029\\u205F\\u3000]/g // eslint-disable-line no-control-regex\n  );\n\n  var _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\n  function _toConsumableArray$1(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }\n\n  var getGlobal = function getGlobal() {\n    return typeof window === 'undefined' ? null : window;\n  };\n\n  /**\n   * Creates a no-op policy for internal use only.\n   * Don't export this function outside this module!\n   * @param {?TrustedTypePolicyFactory} trustedTypes The policy factory.\n   * @param {Document} document The document object (to determine policy name suffix)\n   * @return {?TrustedTypePolicy} The policy created (or null, if Trusted Types\n   * are not supported).\n   */\n  var _createTrustedTypesPolicy = function _createTrustedTypesPolicy(trustedTypes, document) {\n    if ((typeof trustedTypes === 'undefined' ? 'undefined' : _typeof(trustedTypes)) !== 'object' || typeof trustedTypes.createPolicy !== 'function') {\n      return null;\n    }\n\n    // Allow the callers to control the unique policy name\n    // by adding a data-tt-policy-suffix to the script element with the DOMPurify.\n    // Policy creation with duplicate names throws in Trusted Types.\n    var suffix = null;\n    var ATTR_NAME = 'data-tt-policy-suffix';\n    if (document.currentScript && document.currentScript.hasAttribute(ATTR_NAME)) {\n      suffix = document.currentScript.getAttribute(ATTR_NAME);\n    }\n\n    var policyName = 'dompurify' + (suffix ? '#' + suffix : '');\n\n    try {\n      return trustedTypes.createPolicy(policyName, {\n        createHTML: function createHTML(html$$1) {\n          return html$$1;\n        }\n      });\n    } catch (_) {\n      // Policy creation failed (most likely another DOMPurify script has\n      // already run). Skip creating the policy, as this will only cause errors\n      // if TT are enforced.\n      console.warn('TrustedTypes policy ' + policyName + ' could not be created.');\n      return null;\n    }\n  };\n\n  function createDOMPurify() {\n    var window = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : getGlobal();\n\n    var DOMPurify = function DOMPurify(root) {\n      return createDOMPurify(root);\n    };\n\n    /**\n     * Version label, exposed for easier checks\n     * if DOMPurify is up to date or not\n     */\n    DOMPurify.version = '2.3.3';\n\n    /**\n     * Array of elements that DOMPurify removed during sanitation.\n     * Empty if nothing was removed.\n     */\n    DOMPurify.removed = [];\n\n    if (!window || !window.document || window.document.nodeType !== 9) {\n      // Not running in a browser, provide a factory function\n      // so that you can pass your own Window\n      DOMPurify.isSupported = false;\n\n      return DOMPurify;\n    }\n\n    var originalDocument = window.document;\n\n    var document = window.document;\n    var DocumentFragment = window.DocumentFragment,\n        HTMLTemplateElement = window.HTMLTemplateElement,\n        Node = window.Node,\n        Element = window.Element,\n        NodeFilter = window.NodeFilter,\n        _window$NamedNodeMap = window.NamedNodeMap,\n        NamedNodeMap = _window$NamedNodeMap === undefined ? window.NamedNodeMap || window.MozNamedAttrMap : _window$NamedNodeMap,\n        Text = window.Text,\n        Comment = window.Comment,\n        DOMParser = window.DOMParser,\n        trustedTypes = window.trustedTypes;\n\n\n    var ElementPrototype = Element.prototype;\n\n    var cloneNode = lookupGetter(ElementPrototype, 'cloneNode');\n    var getNextSibling = lookupGetter(ElementPrototype, 'nextSibling');\n    var getChildNodes = lookupGetter(ElementPrototype, 'childNodes');\n    var getParentNode = lookupGetter(ElementPrototype, 'parentNode');\n\n    // As per issue #47, the web-components registry is inherited by a\n    // new document created via createHTMLDocument. As per the spec\n    // (http://w3c.github.io/webcomponents/spec/custom/#creating-and-passing-registries)\n    // a new empty registry is used when creating a template contents owner\n    // document, so we use that as our parent document to ensure nothing\n    // is inherited.\n    if (typeof HTMLTemplateElement === 'function') {\n      var template = document.createElement('template');\n      if (template.content && template.content.ownerDocument) {\n        document = template.content.ownerDocument;\n      }\n    }\n\n    var trustedTypesPolicy = _createTrustedTypesPolicy(trustedTypes, originalDocument);\n    var emptyHTML = trustedTypesPolicy && RETURN_TRUSTED_TYPE ? trustedTypesPolicy.createHTML('') : '';\n\n    var _document = document,\n        implementation = _document.implementation,\n        createNodeIterator = _document.createNodeIterator,\n        createDocumentFragment = _document.createDocumentFragment,\n        getElementsByTagName = _document.getElementsByTagName;\n    var importNode = originalDocument.importNode;\n\n\n    var documentMode = {};\n    try {\n      documentMode = clone(document).documentMode ? document.documentMode : {};\n    } catch (_) {}\n\n    var hooks = {};\n\n    /**\n     * Expose whether this browser supports running the full DOMPurify.\n     */\n    DOMPurify.isSupported = typeof getParentNode === 'function' && implementation && typeof implementation.createHTMLDocument !== 'undefined' && documentMode !== 9;\n\n    var MUSTACHE_EXPR$$1 = MUSTACHE_EXPR,\n        ERB_EXPR$$1 = ERB_EXPR,\n        DATA_ATTR$$1 = DATA_ATTR,\n        ARIA_ATTR$$1 = ARIA_ATTR,\n        IS_SCRIPT_OR_DATA$$1 = IS_SCRIPT_OR_DATA,\n        ATTR_WHITESPACE$$1 = ATTR_WHITESPACE;\n    var IS_ALLOWED_URI$$1 = IS_ALLOWED_URI;\n\n    /**\n     * We consider the elements and attributes below to be safe. Ideally\n     * don't add any new ones but feel free to remove unwanted ones.\n     */\n\n    /* allowed element names */\n\n    var ALLOWED_TAGS = null;\n    var DEFAULT_ALLOWED_TAGS = addToSet({}, [].concat(_toConsumableArray$1(html), _toConsumableArray$1(svg), _toConsumableArray$1(svgFilters), _toConsumableArray$1(mathMl), _toConsumableArray$1(text)));\n\n    /* Allowed attribute names */\n    var ALLOWED_ATTR = null;\n    var DEFAULT_ALLOWED_ATTR = addToSet({}, [].concat(_toConsumableArray$1(html$1), _toConsumableArray$1(svg$1), _toConsumableArray$1(mathMl$1), _toConsumableArray$1(xml)));\n\n    /* Explicitly forbidden tags (overrides ALLOWED_TAGS/ADD_TAGS) */\n    var FORBID_TAGS = null;\n\n    /* Explicitly forbidden attributes (overrides ALLOWED_ATTR/ADD_ATTR) */\n    var FORBID_ATTR = null;\n\n    /* Decide if ARIA attributes are okay */\n    var ALLOW_ARIA_ATTR = true;\n\n    /* Decide if custom data attributes are okay */\n    var ALLOW_DATA_ATTR = true;\n\n    /* Decide if unknown protocols are okay */\n    var ALLOW_UNKNOWN_PROTOCOLS = false;\n\n    /* Output should be safe for common template engines.\n     * This means, DOMPurify removes data attributes, mustaches and ERB\n     */\n    var SAFE_FOR_TEMPLATES = false;\n\n    /* Decide if document with <html>... should be returned */\n    var WHOLE_DOCUMENT = false;\n\n    /* Track whether config is already set on this instance of DOMPurify. */\n    var SET_CONFIG = false;\n\n    /* Decide if all elements (e.g. style, script) must be children of\n     * document.body. By default, browsers might move them to document.head */\n    var FORCE_BODY = false;\n\n    /* Decide if a DOM `HTMLBodyElement` should be returned, instead of a html\n     * string (or a TrustedHTML object if Trusted Types are supported).\n     * If `WHOLE_DOCUMENT` is enabled a `HTMLHtmlElement` will be returned instead\n     */\n    var RETURN_DOM = false;\n\n    /* Decide if a DOM `DocumentFragment` should be returned, instead of a html\n     * string  (or a TrustedHTML object if Trusted Types are supported) */\n    var RETURN_DOM_FRAGMENT = false;\n\n    /* If `RETURN_DOM` or `RETURN_DOM_FRAGMENT` is enabled, decide if the returned DOM\n     * `Node` is imported into the current `Document`. If this flag is not enabled the\n     * `Node` will belong (its ownerDocument) to a fresh `HTMLDocument`, created by\n     * DOMPurify.\n     *\n     * This defaults to `true` starting DOMPurify 2.2.0. Note that setting it to `false`\n     * might cause XSS from attacks hidden in closed shadowroots in case the browser\n     * supports Declarative Shadow: DOM https://web.dev/declarative-shadow-dom/\n     */\n    var RETURN_DOM_IMPORT = true;\n\n    /* Try to return a Trusted Type object instead of a string, return a string in\n     * case Trusted Types are not supported  */\n    var RETURN_TRUSTED_TYPE = false;\n\n    /* Output should be free from DOM clobbering attacks? */\n    var SANITIZE_DOM = true;\n\n    /* Keep element content when removing element? */\n    var KEEP_CONTENT = true;\n\n    /* If a `Node` is passed to sanitize(), then performs sanitization in-place instead\n     * of importing it into a new Document and returning a sanitized copy */\n    var IN_PLACE = false;\n\n    /* Allow usage of profiles like html, svg and mathMl */\n    var USE_PROFILES = {};\n\n    /* Tags to ignore content of when KEEP_CONTENT is true */\n    var FORBID_CONTENTS = null;\n    var DEFAULT_FORBID_CONTENTS = addToSet({}, ['annotation-xml', 'audio', 'colgroup', 'desc', 'foreignobject', 'head', 'iframe', 'math', 'mi', 'mn', 'mo', 'ms', 'mtext', 'noembed', 'noframes', 'noscript', 'plaintext', 'script', 'style', 'svg', 'template', 'thead', 'title', 'video', 'xmp']);\n\n    /* Tags that are safe for data: URIs */\n    var DATA_URI_TAGS = null;\n    var DEFAULT_DATA_URI_TAGS = addToSet({}, ['audio', 'video', 'img', 'source', 'image', 'track']);\n\n    /* Attributes safe for values like \"javascript:\" */\n    var URI_SAFE_ATTRIBUTES = null;\n    var DEFAULT_URI_SAFE_ATTRIBUTES = addToSet({}, ['alt', 'class', 'for', 'id', 'label', 'name', 'pattern', 'placeholder', 'role', 'summary', 'title', 'value', 'style', 'xmlns']);\n\n    var MATHML_NAMESPACE = 'http://www.w3.org/1998/Math/MathML';\n    var SVG_NAMESPACE = 'http://www.w3.org/2000/svg';\n    var HTML_NAMESPACE = 'http://www.w3.org/1999/xhtml';\n    /* Document namespace */\n    var NAMESPACE = HTML_NAMESPACE;\n    var IS_EMPTY_INPUT = false;\n\n    /* Parsing of strict XHTML documents */\n    var PARSER_MEDIA_TYPE = void 0;\n    var SUPPORTED_PARSER_MEDIA_TYPES = ['application/xhtml+xml', 'text/html'];\n    var DEFAULT_PARSER_MEDIA_TYPE = 'text/html';\n    var transformCaseFunc = void 0;\n\n    /* Keep a reference to config to pass to hooks */\n    var CONFIG = null;\n\n    /* Ideally, do not touch anything below this line */\n    /* ______________________________________________ */\n\n    var formElement = document.createElement('form');\n\n    /**\n     * _parseConfig\n     *\n     * @param  {Object} cfg optional config literal\n     */\n    // eslint-disable-next-line complexity\n    var _parseConfig = function _parseConfig(cfg) {\n      if (CONFIG && CONFIG === cfg) {\n        return;\n      }\n\n      /* Shield configuration object from tampering */\n      if (!cfg || (typeof cfg === 'undefined' ? 'undefined' : _typeof(cfg)) !== 'object') {\n        cfg = {};\n      }\n\n      /* Shield configuration object from prototype pollution */\n      cfg = clone(cfg);\n\n      /* Set configuration parameters */\n      ALLOWED_TAGS = 'ALLOWED_TAGS' in cfg ? addToSet({}, cfg.ALLOWED_TAGS) : DEFAULT_ALLOWED_TAGS;\n      ALLOWED_ATTR = 'ALLOWED_ATTR' in cfg ? addToSet({}, cfg.ALLOWED_ATTR) : DEFAULT_ALLOWED_ATTR;\n      URI_SAFE_ATTRIBUTES = 'ADD_URI_SAFE_ATTR' in cfg ? addToSet(clone(DEFAULT_URI_SAFE_ATTRIBUTES), cfg.ADD_URI_SAFE_ATTR) : DEFAULT_URI_SAFE_ATTRIBUTES;\n      DATA_URI_TAGS = 'ADD_DATA_URI_TAGS' in cfg ? addToSet(clone(DEFAULT_DATA_URI_TAGS), cfg.ADD_DATA_URI_TAGS) : DEFAULT_DATA_URI_TAGS;\n      FORBID_CONTENTS = 'FORBID_CONTENTS' in cfg ? addToSet({}, cfg.FORBID_CONTENTS) : DEFAULT_FORBID_CONTENTS;\n      FORBID_TAGS = 'FORBID_TAGS' in cfg ? addToSet({}, cfg.FORBID_TAGS) : {};\n      FORBID_ATTR = 'FORBID_ATTR' in cfg ? addToSet({}, cfg.FORBID_ATTR) : {};\n      USE_PROFILES = 'USE_PROFILES' in cfg ? cfg.USE_PROFILES : false;\n      ALLOW_ARIA_ATTR = cfg.ALLOW_ARIA_ATTR !== false; // Default true\n      ALLOW_DATA_ATTR = cfg.ALLOW_DATA_ATTR !== false; // Default true\n      ALLOW_UNKNOWN_PROTOCOLS = cfg.ALLOW_UNKNOWN_PROTOCOLS || false; // Default false\n      SAFE_FOR_TEMPLATES = cfg.SAFE_FOR_TEMPLATES || false; // Default false\n      WHOLE_DOCUMENT = cfg.WHOLE_DOCUMENT || false; // Default false\n      RETURN_DOM = cfg.RETURN_DOM || false; // Default false\n      RETURN_DOM_FRAGMENT = cfg.RETURN_DOM_FRAGMENT || false; // Default false\n      RETURN_DOM_IMPORT = cfg.RETURN_DOM_IMPORT !== false; // Default true\n      RETURN_TRUSTED_TYPE = cfg.RETURN_TRUSTED_TYPE || false; // Default false\n      FORCE_BODY = cfg.FORCE_BODY || false; // Default false\n      SANITIZE_DOM = cfg.SANITIZE_DOM !== false; // Default true\n      KEEP_CONTENT = cfg.KEEP_CONTENT !== false; // Default true\n      IN_PLACE = cfg.IN_PLACE || false; // Default false\n      IS_ALLOWED_URI$$1 = cfg.ALLOWED_URI_REGEXP || IS_ALLOWED_URI$$1;\n      NAMESPACE = cfg.NAMESPACE || HTML_NAMESPACE;\n\n      PARSER_MEDIA_TYPE =\n      // eslint-disable-next-line unicorn/prefer-includes\n      SUPPORTED_PARSER_MEDIA_TYPES.indexOf(cfg.PARSER_MEDIA_TYPE) === -1 ? PARSER_MEDIA_TYPE = DEFAULT_PARSER_MEDIA_TYPE : PARSER_MEDIA_TYPE = cfg.PARSER_MEDIA_TYPE;\n\n      // HTML tags and attributes are not case-sensitive, converting to lowercase. Keeping XHTML as is.\n      transformCaseFunc = PARSER_MEDIA_TYPE === 'application/xhtml+xml' ? function (x) {\n        return x;\n      } : stringToLowerCase;\n\n      if (SAFE_FOR_TEMPLATES) {\n        ALLOW_DATA_ATTR = false;\n      }\n\n      if (RETURN_DOM_FRAGMENT) {\n        RETURN_DOM = true;\n      }\n\n      /* Parse profile info */\n      if (USE_PROFILES) {\n        ALLOWED_TAGS = addToSet({}, [].concat(_toConsumableArray$1(text)));\n        ALLOWED_ATTR = [];\n        if (USE_PROFILES.html === true) {\n          addToSet(ALLOWED_TAGS, html);\n          addToSet(ALLOWED_ATTR, html$1);\n        }\n\n        if (USE_PROFILES.svg === true) {\n          addToSet(ALLOWED_TAGS, svg);\n          addToSet(ALLOWED_ATTR, svg$1);\n          addToSet(ALLOWED_ATTR, xml);\n        }\n\n        if (USE_PROFILES.svgFilters === true) {\n          addToSet(ALLOWED_TAGS, svgFilters);\n          addToSet(ALLOWED_ATTR, svg$1);\n          addToSet(ALLOWED_ATTR, xml);\n        }\n\n        if (USE_PROFILES.mathMl === true) {\n          addToSet(ALLOWED_TAGS, mathMl);\n          addToSet(ALLOWED_ATTR, mathMl$1);\n          addToSet(ALLOWED_ATTR, xml);\n        }\n      }\n\n      /* Merge configuration parameters */\n      if (cfg.ADD_TAGS) {\n        if (ALLOWED_TAGS === DEFAULT_ALLOWED_TAGS) {\n          ALLOWED_TAGS = clone(ALLOWED_TAGS);\n        }\n\n        addToSet(ALLOWED_TAGS, cfg.ADD_TAGS);\n      }\n\n      if (cfg.ADD_ATTR) {\n        if (ALLOWED_ATTR === DEFAULT_ALLOWED_ATTR) {\n          ALLOWED_ATTR = clone(ALLOWED_ATTR);\n        }\n\n        addToSet(ALLOWED_ATTR, cfg.ADD_ATTR);\n      }\n\n      if (cfg.ADD_URI_SAFE_ATTR) {\n        addToSet(URI_SAFE_ATTRIBUTES, cfg.ADD_URI_SAFE_ATTR);\n      }\n\n      if (cfg.FORBID_CONTENTS) {\n        if (FORBID_CONTENTS === DEFAULT_FORBID_CONTENTS) {\n          FORBID_CONTENTS = clone(FORBID_CONTENTS);\n        }\n\n        addToSet(FORBID_CONTENTS, cfg.FORBID_CONTENTS);\n      }\n\n      /* Add #text in case KEEP_CONTENT is set to true */\n      if (KEEP_CONTENT) {\n        ALLOWED_TAGS['#text'] = true;\n      }\n\n      /* Add html, head and body to ALLOWED_TAGS in case WHOLE_DOCUMENT is true */\n      if (WHOLE_DOCUMENT) {\n        addToSet(ALLOWED_TAGS, ['html', 'head', 'body']);\n      }\n\n      /* Add tbody to ALLOWED_TAGS in case tables are permitted, see #286, #365 */\n      if (ALLOWED_TAGS.table) {\n        addToSet(ALLOWED_TAGS, ['tbody']);\n        delete FORBID_TAGS.tbody;\n      }\n\n      // Prevent further manipulation of configuration.\n      // Not available in IE8, Safari 5, etc.\n      if (freeze) {\n        freeze(cfg);\n      }\n\n      CONFIG = cfg;\n    };\n\n    var MATHML_TEXT_INTEGRATION_POINTS = addToSet({}, ['mi', 'mo', 'mn', 'ms', 'mtext']);\n\n    var HTML_INTEGRATION_POINTS = addToSet({}, ['foreignobject', 'desc', 'title', 'annotation-xml']);\n\n    /* Keep track of all possible SVG and MathML tags\n     * so that we can perform the namespace checks\n     * correctly. */\n    var ALL_SVG_TAGS = addToSet({}, svg);\n    addToSet(ALL_SVG_TAGS, svgFilters);\n    addToSet(ALL_SVG_TAGS, svgDisallowed);\n\n    var ALL_MATHML_TAGS = addToSet({}, mathMl);\n    addToSet(ALL_MATHML_TAGS, mathMlDisallowed);\n\n    /**\n     *\n     *\n     * @param  {Element} element a DOM element whose namespace is being checked\n     * @returns {boolean} Return false if the element has a\n     *  namespace that a spec-compliant parser would never\n     *  return. Return true otherwise.\n     */\n    var _checkValidNamespace = function _checkValidNamespace(element) {\n      var parent = getParentNode(element);\n\n      // In JSDOM, if we're inside shadow DOM, then parentNode\n      // can be null. We just simulate parent in this case.\n      if (!parent || !parent.tagName) {\n        parent = {\n          namespaceURI: HTML_NAMESPACE,\n          tagName: 'template'\n        };\n      }\n\n      var tagName = stringToLowerCase(element.tagName);\n      var parentTagName = stringToLowerCase(parent.tagName);\n\n      if (element.namespaceURI === SVG_NAMESPACE) {\n        // The only way to switch from HTML namespace to SVG\n        // is via <svg>. If it happens via any other tag, then\n        // it should be killed.\n        if (parent.namespaceURI === HTML_NAMESPACE) {\n          return tagName === 'svg';\n        }\n\n        // The only way to switch from MathML to SVG is via\n        // svg if parent is either <annotation-xml> or MathML\n        // text integration points.\n        if (parent.namespaceURI === MATHML_NAMESPACE) {\n          return tagName === 'svg' && (parentTagName === 'annotation-xml' || MATHML_TEXT_INTEGRATION_POINTS[parentTagName]);\n        }\n\n        // We only allow elements that are defined in SVG\n        // spec. All others are disallowed in SVG namespace.\n        return Boolean(ALL_SVG_TAGS[tagName]);\n      }\n\n      if (element.namespaceURI === MATHML_NAMESPACE) {\n        // The only way to switch from HTML namespace to MathML\n        // is via <math>. If it happens via any other tag, then\n        // it should be killed.\n        if (parent.namespaceURI === HTML_NAMESPACE) {\n          return tagName === 'math';\n        }\n\n        // The only way to switch from SVG to MathML is via\n        // <math> and HTML integration points\n        if (parent.namespaceURI === SVG_NAMESPACE) {\n          return tagName === 'math' && HTML_INTEGRATION_POINTS[parentTagName];\n        }\n\n        // We only allow elements that are defined in MathML\n        // spec. All others are disallowed in MathML namespace.\n        return Boolean(ALL_MATHML_TAGS[tagName]);\n      }\n\n      if (element.namespaceURI === HTML_NAMESPACE) {\n        // The only way to switch from SVG to HTML is via\n        // HTML integration points, and from MathML to HTML\n        // is via MathML text integration points\n        if (parent.namespaceURI === SVG_NAMESPACE && !HTML_INTEGRATION_POINTS[parentTagName]) {\n          return false;\n        }\n\n        if (parent.namespaceURI === MATHML_NAMESPACE && !MATHML_TEXT_INTEGRATION_POINTS[parentTagName]) {\n          return false;\n        }\n\n        // Certain elements are allowed in both SVG and HTML\n        // namespace. We need to specify them explicitly\n        // so that they don't get erronously deleted from\n        // HTML namespace.\n        var commonSvgAndHTMLElements = addToSet({}, ['title', 'style', 'font', 'a', 'script']);\n\n        // We disallow tags that are specific for MathML\n        // or SVG and should never appear in HTML namespace\n        return !ALL_MATHML_TAGS[tagName] && (commonSvgAndHTMLElements[tagName] || !ALL_SVG_TAGS[tagName]);\n      }\n\n      // The code should never reach this place (this means\n      // that the element somehow got namespace that is not\n      // HTML, SVG or MathML). Return false just in case.\n      return false;\n    };\n\n    /**\n     * _forceRemove\n     *\n     * @param  {Node} node a DOM node\n     */\n    var _forceRemove = function _forceRemove(node) {\n      arrayPush(DOMPurify.removed, { element: node });\n      try {\n        // eslint-disable-next-line unicorn/prefer-dom-node-remove\n        node.parentNode.removeChild(node);\n      } catch (_) {\n        try {\n          node.outerHTML = emptyHTML;\n        } catch (_) {\n          node.remove();\n        }\n      }\n    };\n\n    /**\n     * _removeAttribute\n     *\n     * @param  {String} name an Attribute name\n     * @param  {Node} node a DOM node\n     */\n    var _removeAttribute = function _removeAttribute(name, node) {\n      try {\n        arrayPush(DOMPurify.removed, {\n          attribute: node.getAttributeNode(name),\n          from: node\n        });\n      } catch (_) {\n        arrayPush(DOMPurify.removed, {\n          attribute: null,\n          from: node\n        });\n      }\n\n      node.removeAttribute(name);\n\n      // We void attribute values for unremovable \"is\"\" attributes\n      if (name === 'is' && !ALLOWED_ATTR[name]) {\n        if (RETURN_DOM || RETURN_DOM_FRAGMENT) {\n          try {\n            _forceRemove(node);\n          } catch (_) {}\n        } else {\n          try {\n            node.setAttribute(name, '');\n          } catch (_) {}\n        }\n      }\n    };\n\n    /**\n     * _initDocument\n     *\n     * @param  {String} dirty a string of dirty markup\n     * @return {Document} a DOM, filled with the dirty markup\n     */\n    var _initDocument = function _initDocument(dirty) {\n      /* Create a HTML document */\n      var doc = void 0;\n      var leadingWhitespace = void 0;\n\n      if (FORCE_BODY) {\n        dirty = '<remove></remove>' + dirty;\n      } else {\n        /* If FORCE_BODY isn't used, leading whitespace needs to be preserved manually */\n        var matches = stringMatch(dirty, /^[\\r\\n\\t ]+/);\n        leadingWhitespace = matches && matches[0];\n      }\n\n      if (PARSER_MEDIA_TYPE === 'application/xhtml+xml') {\n        // Root of XHTML doc must contain xmlns declaration (see https://www.w3.org/TR/xhtml1/normative.html#strict)\n        dirty = '<html xmlns=\"http://www.w3.org/1999/xhtml\"><head></head><body>' + dirty + '</body></html>';\n      }\n\n      var dirtyPayload = trustedTypesPolicy ? trustedTypesPolicy.createHTML(dirty) : dirty;\n      /*\n       * Use the DOMParser API by default, fallback later if needs be\n       * DOMParser not work for svg when has multiple root element.\n       */\n      if (NAMESPACE === HTML_NAMESPACE) {\n        try {\n          doc = new DOMParser().parseFromString(dirtyPayload, PARSER_MEDIA_TYPE);\n        } catch (_) {}\n      }\n\n      /* Use createHTMLDocument in case DOMParser is not available */\n      if (!doc || !doc.documentElement) {\n        doc = implementation.createDocument(NAMESPACE, 'template', null);\n        try {\n          doc.documentElement.innerHTML = IS_EMPTY_INPUT ? '' : dirtyPayload;\n        } catch (_) {\n          // Syntax error if dirtyPayload is invalid xml\n        }\n      }\n\n      var body = doc.body || doc.documentElement;\n\n      if (dirty && leadingWhitespace) {\n        body.insertBefore(document.createTextNode(leadingWhitespace), body.childNodes[0] || null);\n      }\n\n      /* Work on whole document or just its body */\n      if (NAMESPACE === HTML_NAMESPACE) {\n        return getElementsByTagName.call(doc, WHOLE_DOCUMENT ? 'html' : 'body')[0];\n      }\n\n      return WHOLE_DOCUMENT ? doc.documentElement : body;\n    };\n\n    /**\n     * _createIterator\n     *\n     * @param  {Document} root document/fragment to create iterator for\n     * @return {Iterator} iterator instance\n     */\n    var _createIterator = function _createIterator(root) {\n      return createNodeIterator.call(root.ownerDocument || root, root, NodeFilter.SHOW_ELEMENT | NodeFilter.SHOW_COMMENT | NodeFilter.SHOW_TEXT, null, false);\n    };\n\n    /**\n     * _isClobbered\n     *\n     * @param  {Node} elm element to check for clobbering attacks\n     * @return {Boolean} true if clobbered, false if safe\n     */\n    var _isClobbered = function _isClobbered(elm) {\n      if (elm instanceof Text || elm instanceof Comment) {\n        return false;\n      }\n\n      if (typeof elm.nodeName !== 'string' || typeof elm.textContent !== 'string' || typeof elm.removeChild !== 'function' || !(elm.attributes instanceof NamedNodeMap) || typeof elm.removeAttribute !== 'function' || typeof elm.setAttribute !== 'function' || typeof elm.namespaceURI !== 'string' || typeof elm.insertBefore !== 'function') {\n        return true;\n      }\n\n      return false;\n    };\n\n    /**\n     * _isNode\n     *\n     * @param  {Node} obj object to check whether it's a DOM node\n     * @return {Boolean} true is object is a DOM node\n     */\n    var _isNode = function _isNode(object) {\n      return (typeof Node === 'undefined' ? 'undefined' : _typeof(Node)) === 'object' ? object instanceof Node : object && (typeof object === 'undefined' ? 'undefined' : _typeof(object)) === 'object' && typeof object.nodeType === 'number' && typeof object.nodeName === 'string';\n    };\n\n    /**\n     * _executeHook\n     * Execute user configurable hooks\n     *\n     * @param  {String} entryPoint  Name of the hook's entry point\n     * @param  {Node} currentNode node to work on with the hook\n     * @param  {Object} data additional hook parameters\n     */\n    var _executeHook = function _executeHook(entryPoint, currentNode, data) {\n      if (!hooks[entryPoint]) {\n        return;\n      }\n\n      arrayForEach(hooks[entryPoint], function (hook) {\n        hook.call(DOMPurify, currentNode, data, CONFIG);\n      });\n    };\n\n    /**\n     * _sanitizeElements\n     *\n     * @protect nodeName\n     * @protect textContent\n     * @protect removeChild\n     *\n     * @param   {Node} currentNode to check for permission to exist\n     * @return  {Boolean} true if node was killed, false if left alive\n     */\n    var _sanitizeElements = function _sanitizeElements(currentNode) {\n      var content = void 0;\n\n      /* Execute a hook if present */\n      _executeHook('beforeSanitizeElements', currentNode, null);\n\n      /* Check if element is clobbered or can clobber */\n      if (_isClobbered(currentNode)) {\n        _forceRemove(currentNode);\n        return true;\n      }\n\n      /* Check if tagname contains Unicode */\n      if (stringMatch(currentNode.nodeName, /[\\u0080-\\uFFFF]/)) {\n        _forceRemove(currentNode);\n        return true;\n      }\n\n      /* Now let's check the element's type and name */\n      var tagName = transformCaseFunc(currentNode.nodeName);\n\n      /* Execute a hook if present */\n      _executeHook('uponSanitizeElement', currentNode, {\n        tagName: tagName,\n        allowedTags: ALLOWED_TAGS\n      });\n\n      /* Detect mXSS attempts abusing namespace confusion */\n      if (!_isNode(currentNode.firstElementChild) && (!_isNode(currentNode.content) || !_isNode(currentNode.content.firstElementChild)) && regExpTest(/<[/\\w]/g, currentNode.innerHTML) && regExpTest(/<[/\\w]/g, currentNode.textContent)) {\n        _forceRemove(currentNode);\n        return true;\n      }\n\n      /* Mitigate a problem with templates inside select */\n      if (tagName === 'select' && regExpTest(/<template/i, currentNode.innerHTML)) {\n        _forceRemove(currentNode);\n        return true;\n      }\n\n      /* Remove element if anything forbids its presence */\n      if (!ALLOWED_TAGS[tagName] || FORBID_TAGS[tagName]) {\n        /* Keep content except for bad-listed elements */\n        if (KEEP_CONTENT && !FORBID_CONTENTS[tagName]) {\n          var parentNode = getParentNode(currentNode) || currentNode.parentNode;\n          var childNodes = getChildNodes(currentNode) || currentNode.childNodes;\n\n          if (childNodes && parentNode) {\n            var childCount = childNodes.length;\n\n            for (var i = childCount - 1; i >= 0; --i) {\n              parentNode.insertBefore(cloneNode(childNodes[i], true), getNextSibling(currentNode));\n            }\n          }\n        }\n\n        _forceRemove(currentNode);\n        return true;\n      }\n\n      /* Check whether element has a valid namespace */\n      if (currentNode instanceof Element && !_checkValidNamespace(currentNode)) {\n        _forceRemove(currentNode);\n        return true;\n      }\n\n      if ((tagName === 'noscript' || tagName === 'noembed') && regExpTest(/<\\/no(script|embed)/i, currentNode.innerHTML)) {\n        _forceRemove(currentNode);\n        return true;\n      }\n\n      /* Sanitize element content to be template-safe */\n      if (SAFE_FOR_TEMPLATES && currentNode.nodeType === 3) {\n        /* Get the element's text content */\n        content = currentNode.textContent;\n        content = stringReplace(content, MUSTACHE_EXPR$$1, ' ');\n        content = stringReplace(content, ERB_EXPR$$1, ' ');\n        if (currentNode.textContent !== content) {\n          arrayPush(DOMPurify.removed, { element: currentNode.cloneNode() });\n          currentNode.textContent = content;\n        }\n      }\n\n      /* Execute a hook if present */\n      _executeHook('afterSanitizeElements', currentNode, null);\n\n      return false;\n    };\n\n    /**\n     * _isValidAttribute\n     *\n     * @param  {string} lcTag Lowercase tag name of containing element.\n     * @param  {string} lcName Lowercase attribute name.\n     * @param  {string} value Attribute value.\n     * @return {Boolean} Returns true if `value` is valid, otherwise false.\n     */\n    // eslint-disable-next-line complexity\n    var _isValidAttribute = function _isValidAttribute(lcTag, lcName, value) {\n      /* Make sure attribute cannot clobber */\n      if (SANITIZE_DOM && (lcName === 'id' || lcName === 'name') && (value in document || value in formElement)) {\n        return false;\n      }\n\n      /* Allow valid data-* attributes: At least one character after \"-\"\n          (https://html.spec.whatwg.org/multipage/dom.html#embedding-custom-non-visible-data-with-the-data-*-attributes)\n          XML-compatible (https://html.spec.whatwg.org/multipage/infrastructure.html#xml-compatible and http://www.w3.org/TR/xml/#d0e804)\n          We don't need to check the value; it's always URI safe. */\n      if (ALLOW_DATA_ATTR && !FORBID_ATTR[lcName] && regExpTest(DATA_ATTR$$1, lcName)) ; else if (ALLOW_ARIA_ATTR && regExpTest(ARIA_ATTR$$1, lcName)) ; else if (!ALLOWED_ATTR[lcName] || FORBID_ATTR[lcName]) {\n        return false;\n\n        /* Check value is safe. First, is attr inert? If so, is safe */\n      } else if (URI_SAFE_ATTRIBUTES[lcName]) ; else if (regExpTest(IS_ALLOWED_URI$$1, stringReplace(value, ATTR_WHITESPACE$$1, ''))) ; else if ((lcName === 'src' || lcName === 'xlink:href' || lcName === 'href') && lcTag !== 'script' && stringIndexOf(value, 'data:') === 0 && DATA_URI_TAGS[lcTag]) ; else if (ALLOW_UNKNOWN_PROTOCOLS && !regExpTest(IS_SCRIPT_OR_DATA$$1, stringReplace(value, ATTR_WHITESPACE$$1, ''))) ; else if (!value) ; else {\n        return false;\n      }\n\n      return true;\n    };\n\n    /**\n     * _sanitizeAttributes\n     *\n     * @protect attributes\n     * @protect nodeName\n     * @protect removeAttribute\n     * @protect setAttribute\n     *\n     * @param  {Node} currentNode to sanitize\n     */\n    var _sanitizeAttributes = function _sanitizeAttributes(currentNode) {\n      var attr = void 0;\n      var value = void 0;\n      var lcName = void 0;\n      var l = void 0;\n      /* Execute a hook if present */\n      _executeHook('beforeSanitizeAttributes', currentNode, null);\n\n      var attributes = currentNode.attributes;\n\n      /* Check if we have attributes; if not we might have a text node */\n\n      if (!attributes) {\n        return;\n      }\n\n      var hookEvent = {\n        attrName: '',\n        attrValue: '',\n        keepAttr: true,\n        allowedAttributes: ALLOWED_ATTR\n      };\n      l = attributes.length;\n\n      /* Go backwards over all attributes; safely remove bad ones */\n      while (l--) {\n        attr = attributes[l];\n        var _attr = attr,\n            name = _attr.name,\n            namespaceURI = _attr.namespaceURI;\n\n        value = stringTrim(attr.value);\n        lcName = transformCaseFunc(name);\n\n        /* Execute a hook if present */\n        hookEvent.attrName = lcName;\n        hookEvent.attrValue = value;\n        hookEvent.keepAttr = true;\n        hookEvent.forceKeepAttr = undefined; // Allows developers to see this is a property they can set\n        _executeHook('uponSanitizeAttribute', currentNode, hookEvent);\n        value = hookEvent.attrValue;\n        /* Did the hooks approve of the attribute? */\n        if (hookEvent.forceKeepAttr) {\n          continue;\n        }\n\n        /* Remove attribute */\n        _removeAttribute(name, currentNode);\n\n        /* Did the hooks approve of the attribute? */\n        if (!hookEvent.keepAttr) {\n          continue;\n        }\n\n        /* Work around a security issue in jQuery 3.0 */\n        if (regExpTest(/\\/>/i, value)) {\n          _removeAttribute(name, currentNode);\n          continue;\n        }\n\n        /* Sanitize attribute content to be template-safe */\n        if (SAFE_FOR_TEMPLATES) {\n          value = stringReplace(value, MUSTACHE_EXPR$$1, ' ');\n          value = stringReplace(value, ERB_EXPR$$1, ' ');\n        }\n\n        /* Is `value` valid for this attribute? */\n        var lcTag = transformCaseFunc(currentNode.nodeName);\n        if (!_isValidAttribute(lcTag, lcName, value)) {\n          continue;\n        }\n\n        /* Handle invalid data-* attribute set by try-catching it */\n        try {\n          if (namespaceURI) {\n            currentNode.setAttributeNS(namespaceURI, name, value);\n          } else {\n            /* Fallback to setAttribute() for browser-unrecognized namespaces e.g. \"x-schema\". */\n            currentNode.setAttribute(name, value);\n          }\n\n          arrayPop(DOMPurify.removed);\n        } catch (_) {}\n      }\n\n      /* Execute a hook if present */\n      _executeHook('afterSanitizeAttributes', currentNode, null);\n    };\n\n    /**\n     * _sanitizeShadowDOM\n     *\n     * @param  {DocumentFragment} fragment to iterate over recursively\n     */\n    var _sanitizeShadowDOM = function _sanitizeShadowDOM(fragment) {\n      var shadowNode = void 0;\n      var shadowIterator = _createIterator(fragment);\n\n      /* Execute a hook if present */\n      _executeHook('beforeSanitizeShadowDOM', fragment, null);\n\n      while (shadowNode = shadowIterator.nextNode()) {\n        /* Execute a hook if present */\n        _executeHook('uponSanitizeShadowNode', shadowNode, null);\n\n        /* Sanitize tags and elements */\n        if (_sanitizeElements(shadowNode)) {\n          continue;\n        }\n\n        /* Deep shadow DOM detected */\n        if (shadowNode.content instanceof DocumentFragment) {\n          _sanitizeShadowDOM(shadowNode.content);\n        }\n\n        /* Check attributes, sanitize if necessary */\n        _sanitizeAttributes(shadowNode);\n      }\n\n      /* Execute a hook if present */\n      _executeHook('afterSanitizeShadowDOM', fragment, null);\n    };\n\n    /**\n     * Sanitize\n     * Public method providing core sanitation functionality\n     *\n     * @param {String|Node} dirty string or DOM node\n     * @param {Object} configuration object\n     */\n    // eslint-disable-next-line complexity\n    DOMPurify.sanitize = function (dirty, cfg) {\n      var body = void 0;\n      var importedNode = void 0;\n      var currentNode = void 0;\n      var oldNode = void 0;\n      var returnNode = void 0;\n      /* Make sure we have a string to sanitize.\n        DO NOT return early, as this will return the wrong type if\n        the user has requested a DOM object rather than a string */\n      IS_EMPTY_INPUT = !dirty;\n      if (IS_EMPTY_INPUT) {\n        dirty = '<!-->';\n      }\n\n      /* Stringify, in case dirty is an object */\n      if (typeof dirty !== 'string' && !_isNode(dirty)) {\n        // eslint-disable-next-line no-negated-condition\n        if (typeof dirty.toString !== 'function') {\n          throw typeErrorCreate('toString is not a function');\n        } else {\n          dirty = dirty.toString();\n          if (typeof dirty !== 'string') {\n            throw typeErrorCreate('dirty is not a string, aborting');\n          }\n        }\n      }\n\n      /* Check we can run. Otherwise fall back or ignore */\n      if (!DOMPurify.isSupported) {\n        if (_typeof(window.toStaticHTML) === 'object' || typeof window.toStaticHTML === 'function') {\n          if (typeof dirty === 'string') {\n            return window.toStaticHTML(dirty);\n          }\n\n          if (_isNode(dirty)) {\n            return window.toStaticHTML(dirty.outerHTML);\n          }\n        }\n\n        return dirty;\n      }\n\n      /* Assign config vars */\n      if (!SET_CONFIG) {\n        _parseConfig(cfg);\n      }\n\n      /* Clean up removed elements */\n      DOMPurify.removed = [];\n\n      /* Check if dirty is correctly typed for IN_PLACE */\n      if (typeof dirty === 'string') {\n        IN_PLACE = false;\n      }\n\n      if (IN_PLACE) ; else if (dirty instanceof Node) {\n        /* If dirty is a DOM element, append to an empty document to avoid\n           elements being stripped by the parser */\n        body = _initDocument('<!---->');\n        importedNode = body.ownerDocument.importNode(dirty, true);\n        if (importedNode.nodeType === 1 && importedNode.nodeName === 'BODY') {\n          /* Node is already a body, use as is */\n          body = importedNode;\n        } else if (importedNode.nodeName === 'HTML') {\n          body = importedNode;\n        } else {\n          // eslint-disable-next-line unicorn/prefer-dom-node-append\n          body.appendChild(importedNode);\n        }\n      } else {\n        /* Exit directly if we have nothing to do */\n        if (!RETURN_DOM && !SAFE_FOR_TEMPLATES && !WHOLE_DOCUMENT &&\n        // eslint-disable-next-line unicorn/prefer-includes\n        dirty.indexOf('<') === -1) {\n          return trustedTypesPolicy && RETURN_TRUSTED_TYPE ? trustedTypesPolicy.createHTML(dirty) : dirty;\n        }\n\n        /* Initialize the document to work on */\n        body = _initDocument(dirty);\n\n        /* Check we have a DOM node from the data */\n        if (!body) {\n          return RETURN_DOM ? null : emptyHTML;\n        }\n      }\n\n      /* Remove first element node (ours) if FORCE_BODY is set */\n      if (body && FORCE_BODY) {\n        _forceRemove(body.firstChild);\n      }\n\n      /* Get node iterator */\n      var nodeIterator = _createIterator(IN_PLACE ? dirty : body);\n\n      /* Now start iterating over the created document */\n      while (currentNode = nodeIterator.nextNode()) {\n        /* Fix IE's strange behavior with manipulated textNodes #89 */\n        if (currentNode.nodeType === 3 && currentNode === oldNode) {\n          continue;\n        }\n\n        /* Sanitize tags and elements */\n        if (_sanitizeElements(currentNode)) {\n          continue;\n        }\n\n        /* Shadow DOM detected, sanitize it */\n        if (currentNode.content instanceof DocumentFragment) {\n          _sanitizeShadowDOM(currentNode.content);\n        }\n\n        /* Check attributes, sanitize if necessary */\n        _sanitizeAttributes(currentNode);\n\n        oldNode = currentNode;\n      }\n\n      oldNode = null;\n\n      /* If we sanitized `dirty` in-place, return it. */\n      if (IN_PLACE) {\n        return dirty;\n      }\n\n      /* Return sanitized string or DOM */\n      if (RETURN_DOM) {\n        if (RETURN_DOM_FRAGMENT) {\n          returnNode = createDocumentFragment.call(body.ownerDocument);\n\n          while (body.firstChild) {\n            // eslint-disable-next-line unicorn/prefer-dom-node-append\n            returnNode.appendChild(body.firstChild);\n          }\n        } else {\n          returnNode = body;\n        }\n\n        if (RETURN_DOM_IMPORT) {\n          /*\n            AdoptNode() is not used because internal state is not reset\n            (e.g. the past names map of a HTMLFormElement), this is safe\n            in theory but we would rather not risk another attack vector.\n            The state that is cloned by importNode() is explicitly defined\n            by the specs.\n          */\n          returnNode = importNode.call(originalDocument, returnNode, true);\n        }\n\n        return returnNode;\n      }\n\n      var serializedHTML = WHOLE_DOCUMENT ? body.outerHTML : body.innerHTML;\n\n      /* Sanitize final string template-safe */\n      if (SAFE_FOR_TEMPLATES) {\n        serializedHTML = stringReplace(serializedHTML, MUSTACHE_EXPR$$1, ' ');\n        serializedHTML = stringReplace(serializedHTML, ERB_EXPR$$1, ' ');\n      }\n\n      return trustedTypesPolicy && RETURN_TRUSTED_TYPE ? trustedTypesPolicy.createHTML(serializedHTML) : serializedHTML;\n    };\n\n    /**\n     * Public method to set the configuration once\n     * setConfig\n     *\n     * @param {Object} cfg configuration object\n     */\n    DOMPurify.setConfig = function (cfg) {\n      _parseConfig(cfg);\n      SET_CONFIG = true;\n    };\n\n    /**\n     * Public method to remove the configuration\n     * clearConfig\n     *\n     */\n    DOMPurify.clearConfig = function () {\n      CONFIG = null;\n      SET_CONFIG = false;\n    };\n\n    /**\n     * Public method to check if an attribute value is valid.\n     * Uses last set config, if any. Otherwise, uses config defaults.\n     * isValidAttribute\n     *\n     * @param  {string} tag Tag name of containing element.\n     * @param  {string} attr Attribute name.\n     * @param  {string} value Attribute value.\n     * @return {Boolean} Returns true if `value` is valid. Otherwise, returns false.\n     */\n    DOMPurify.isValidAttribute = function (tag, attr, value) {\n      /* Initialize shared config vars if necessary. */\n      if (!CONFIG) {\n        _parseConfig({});\n      }\n\n      var lcTag = transformCaseFunc(tag);\n      var lcName = transformCaseFunc(attr);\n      return _isValidAttribute(lcTag, lcName, value);\n    };\n\n    /**\n     * AddHook\n     * Public method to add DOMPurify hooks\n     *\n     * @param {String} entryPoint entry point for the hook to add\n     * @param {Function} hookFunction function to execute\n     */\n    DOMPurify.addHook = function (entryPoint, hookFunction) {\n      if (typeof hookFunction !== 'function') {\n        return;\n      }\n\n      hooks[entryPoint] = hooks[entryPoint] || [];\n      arrayPush(hooks[entryPoint], hookFunction);\n    };\n\n    /**\n     * RemoveHook\n     * Public method to remove a DOMPurify hook at a given entryPoint\n     * (pops it from the stack of hooks if more are present)\n     *\n     * @param {String} entryPoint entry point for the hook to remove\n     */\n    DOMPurify.removeHook = function (entryPoint) {\n      if (hooks[entryPoint]) {\n        arrayPop(hooks[entryPoint]);\n      }\n    };\n\n    /**\n     * RemoveHooks\n     * Public method to remove all DOMPurify hooks at a given entryPoint\n     *\n     * @param  {String} entryPoint entry point for the hooks to remove\n     */\n    DOMPurify.removeHooks = function (entryPoint) {\n      if (hooks[entryPoint]) {\n        hooks[entryPoint] = [];\n      }\n    };\n\n    /**\n     * RemoveAllHooks\n     * Public method to remove all DOMPurify hooks\n     *\n     */\n    DOMPurify.removeAllHooks = function () {\n      hooks = {};\n    };\n\n    return DOMPurify;\n  }\n\n  var purify = createDOMPurify();\n\n  return purify;\n\n}));\n//# sourceMappingURL=purify.js.map\n\n\n/***/ }),\n\n/***/ \"./node_modules/graphlib/index.js\":\n/*!****************************************!*\\\n  !*** ./node_modules/graphlib/index.js ***!\n  \\****************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n/**\n * Copyright (c) 2014, Chris Pettitt\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions are met:\n *\n * 1. Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation\n * and/or other materials provided with the distribution.\n *\n * 3. Neither the name of the copyright holder nor the names of its contributors\n * may be used to endorse or promote products derived from this software without\n * specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\n * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\n * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\n * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nvar lib = __webpack_require__(/*! ./lib */ \"./node_modules/graphlib/lib/index.js\");\n\nmodule.exports = {\n  Graph: lib.Graph,\n  json: __webpack_require__(/*! ./lib/json */ \"./node_modules/graphlib/lib/json.js\"),\n  alg: __webpack_require__(/*! ./lib/alg */ \"./node_modules/graphlib/lib/alg/index.js\"),\n  version: lib.version\n};\n\n\n/***/ }),\n\n/***/ \"./node_modules/graphlib/lib/alg/components.js\":\n/*!*****************************************************!*\\\n  !*** ./node_modules/graphlib/lib/alg/components.js ***!\n  \\*****************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar _ = __webpack_require__(/*! ../lodash */ \"./node_modules/graphlib/lib/lodash.js\");\n\nmodule.exports = components;\n\nfunction components(g) {\n  var visited = {};\n  var cmpts = [];\n  var cmpt;\n\n  function dfs(v) {\n    if (_.has(visited, v)) return;\n    visited[v] = true;\n    cmpt.push(v);\n    _.each(g.successors(v), dfs);\n    _.each(g.predecessors(v), dfs);\n  }\n\n  _.each(g.nodes(), function(v) {\n    cmpt = [];\n    dfs(v);\n    if (cmpt.length) {\n      cmpts.push(cmpt);\n    }\n  });\n\n  return cmpts;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/graphlib/lib/alg/dfs.js\":\n/*!**********************************************!*\\\n  !*** ./node_modules/graphlib/lib/alg/dfs.js ***!\n  \\**********************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar _ = __webpack_require__(/*! ../lodash */ \"./node_modules/graphlib/lib/lodash.js\");\n\nmodule.exports = dfs;\n\n/*\n * A helper that preforms a pre- or post-order traversal on the input graph\n * and returns the nodes in the order they were visited. If the graph is\n * undirected then this algorithm will navigate using neighbors. If the graph\n * is directed then this algorithm will navigate using successors.\n *\n * Order must be one of \"pre\" or \"post\".\n */\nfunction dfs(g, vs, order) {\n  if (!_.isArray(vs)) {\n    vs = [vs];\n  }\n\n  var navigation = (g.isDirected() ? g.successors : g.neighbors).bind(g);\n\n  var acc = [];\n  var visited = {};\n  _.each(vs, function(v) {\n    if (!g.hasNode(v)) {\n      throw new Error(\"Graph does not have node: \" + v);\n    }\n\n    doDfs(g, v, order === \"post\", visited, navigation, acc);\n  });\n  return acc;\n}\n\nfunction doDfs(g, v, postorder, visited, navigation, acc) {\n  if (!_.has(visited, v)) {\n    visited[v] = true;\n\n    if (!postorder) { acc.push(v); }\n    _.each(navigation(v), function(w) {\n      doDfs(g, w, postorder, visited, navigation, acc);\n    });\n    if (postorder) { acc.push(v); }\n  }\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/graphlib/lib/alg/dijkstra-all.js\":\n/*!*******************************************************!*\\\n  !*** ./node_modules/graphlib/lib/alg/dijkstra-all.js ***!\n  \\*******************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar dijkstra = __webpack_require__(/*! ./dijkstra */ \"./node_modules/graphlib/lib/alg/dijkstra.js\");\nvar _ = __webpack_require__(/*! ../lodash */ \"./node_modules/graphlib/lib/lodash.js\");\n\nmodule.exports = dijkstraAll;\n\nfunction dijkstraAll(g, weightFunc, edgeFunc) {\n  return _.transform(g.nodes(), function(acc, v) {\n    acc[v] = dijkstra(g, v, weightFunc, edgeFunc);\n  }, {});\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/graphlib/lib/alg/dijkstra.js\":\n/*!***************************************************!*\\\n  !*** ./node_modules/graphlib/lib/alg/dijkstra.js ***!\n  \\***************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar _ = __webpack_require__(/*! ../lodash */ \"./node_modules/graphlib/lib/lodash.js\");\nvar PriorityQueue = __webpack_require__(/*! ../data/priority-queue */ \"./node_modules/graphlib/lib/data/priority-queue.js\");\n\nmodule.exports = dijkstra;\n\nvar DEFAULT_WEIGHT_FUNC = _.constant(1);\n\nfunction dijkstra(g, source, weightFn, edgeFn) {\n  return runDijkstra(g, String(source),\n    weightFn || DEFAULT_WEIGHT_FUNC,\n    edgeFn || function(v) { return g.outEdges(v); });\n}\n\nfunction runDijkstra(g, source, weightFn, edgeFn) {\n  var results = {};\n  var pq = new PriorityQueue();\n  var v, vEntry;\n\n  var updateNeighbors = function(edge) {\n    var w = edge.v !== v ? edge.v : edge.w;\n    var wEntry = results[w];\n    var weight = weightFn(edge);\n    var distance = vEntry.distance + weight;\n\n    if (weight < 0) {\n      throw new Error(\"dijkstra does not allow negative edge weights. \" +\n                      \"Bad edge: \" + edge + \" Weight: \" + weight);\n    }\n\n    if (distance < wEntry.distance) {\n      wEntry.distance = distance;\n      wEntry.predecessor = v;\n      pq.decrease(w, distance);\n    }\n  };\n\n  g.nodes().forEach(function(v) {\n    var distance = v === source ? 0 : Number.POSITIVE_INFINITY;\n    results[v] = { distance: distance };\n    pq.add(v, distance);\n  });\n\n  while (pq.size() > 0) {\n    v = pq.removeMin();\n    vEntry = results[v];\n    if (vEntry.distance === Number.POSITIVE_INFINITY) {\n      break;\n    }\n\n    edgeFn(v).forEach(updateNeighbors);\n  }\n\n  return results;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/graphlib/lib/alg/find-cycles.js\":\n/*!******************************************************!*\\\n  !*** ./node_modules/graphlib/lib/alg/find-cycles.js ***!\n  \\******************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar _ = __webpack_require__(/*! ../lodash */ \"./node_modules/graphlib/lib/lodash.js\");\nvar tarjan = __webpack_require__(/*! ./tarjan */ \"./node_modules/graphlib/lib/alg/tarjan.js\");\n\nmodule.exports = findCycles;\n\nfunction findCycles(g) {\n  return _.filter(tarjan(g), function(cmpt) {\n    return cmpt.length > 1 || (cmpt.length === 1 && g.hasEdge(cmpt[0], cmpt[0]));\n  });\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/graphlib/lib/alg/floyd-warshall.js\":\n/*!*********************************************************!*\\\n  !*** ./node_modules/graphlib/lib/alg/floyd-warshall.js ***!\n  \\*********************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar _ = __webpack_require__(/*! ../lodash */ \"./node_modules/graphlib/lib/lodash.js\");\n\nmodule.exports = floydWarshall;\n\nvar DEFAULT_WEIGHT_FUNC = _.constant(1);\n\nfunction floydWarshall(g, weightFn, edgeFn) {\n  return runFloydWarshall(g,\n    weightFn || DEFAULT_WEIGHT_FUNC,\n    edgeFn || function(v) { return g.outEdges(v); });\n}\n\nfunction runFloydWarshall(g, weightFn, edgeFn) {\n  var results = {};\n  var nodes = g.nodes();\n\n  nodes.forEach(function(v) {\n    results[v] = {};\n    results[v][v] = { distance: 0 };\n    nodes.forEach(function(w) {\n      if (v !== w) {\n        results[v][w] = { distance: Number.POSITIVE_INFINITY };\n      }\n    });\n    edgeFn(v).forEach(function(edge) {\n      var w = edge.v === v ? edge.w : edge.v;\n      var d = weightFn(edge);\n      results[v][w] = { distance: d, predecessor: v };\n    });\n  });\n\n  nodes.forEach(function(k) {\n    var rowK = results[k];\n    nodes.forEach(function(i) {\n      var rowI = results[i];\n      nodes.forEach(function(j) {\n        var ik = rowI[k];\n        var kj = rowK[j];\n        var ij = rowI[j];\n        var altDistance = ik.distance + kj.distance;\n        if (altDistance < ij.distance) {\n          ij.distance = altDistance;\n          ij.predecessor = kj.predecessor;\n        }\n      });\n    });\n  });\n\n  return results;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/graphlib/lib/alg/index.js\":\n/*!************************************************!*\\\n  !*** ./node_modules/graphlib/lib/alg/index.js ***!\n  \\************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nmodule.exports = {\n  components: __webpack_require__(/*! ./components */ \"./node_modules/graphlib/lib/alg/components.js\"),\n  dijkstra: __webpack_require__(/*! ./dijkstra */ \"./node_modules/graphlib/lib/alg/dijkstra.js\"),\n  dijkstraAll: __webpack_require__(/*! ./dijkstra-all */ \"./node_modules/graphlib/lib/alg/dijkstra-all.js\"),\n  findCycles: __webpack_require__(/*! ./find-cycles */ \"./node_modules/graphlib/lib/alg/find-cycles.js\"),\n  floydWarshall: __webpack_require__(/*! ./floyd-warshall */ \"./node_modules/graphlib/lib/alg/floyd-warshall.js\"),\n  isAcyclic: __webpack_require__(/*! ./is-acyclic */ \"./node_modules/graphlib/lib/alg/is-acyclic.js\"),\n  postorder: __webpack_require__(/*! ./postorder */ \"./node_modules/graphlib/lib/alg/postorder.js\"),\n  preorder: __webpack_require__(/*! ./preorder */ \"./node_modules/graphlib/lib/alg/preorder.js\"),\n  prim: __webpack_require__(/*! ./prim */ \"./node_modules/graphlib/lib/alg/prim.js\"),\n  tarjan: __webpack_require__(/*! ./tarjan */ \"./node_modules/graphlib/lib/alg/tarjan.js\"),\n  topsort: __webpack_require__(/*! ./topsort */ \"./node_modules/graphlib/lib/alg/topsort.js\")\n};\n\n\n/***/ }),\n\n/***/ \"./node_modules/graphlib/lib/alg/is-acyclic.js\":\n/*!*****************************************************!*\\\n  !*** ./node_modules/graphlib/lib/alg/is-acyclic.js ***!\n  \\*****************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar topsort = __webpack_require__(/*! ./topsort */ \"./node_modules/graphlib/lib/alg/topsort.js\");\n\nmodule.exports = isAcyclic;\n\nfunction isAcyclic(g) {\n  try {\n    topsort(g);\n  } catch (e) {\n    if (e instanceof topsort.CycleException) {\n      return false;\n    }\n    throw e;\n  }\n  return true;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/graphlib/lib/alg/postorder.js\":\n/*!****************************************************!*\\\n  !*** ./node_modules/graphlib/lib/alg/postorder.js ***!\n  \\****************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar dfs = __webpack_require__(/*! ./dfs */ \"./node_modules/graphlib/lib/alg/dfs.js\");\n\nmodule.exports = postorder;\n\nfunction postorder(g, vs) {\n  return dfs(g, vs, \"post\");\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/graphlib/lib/alg/preorder.js\":\n/*!***************************************************!*\\\n  !*** ./node_modules/graphlib/lib/alg/preorder.js ***!\n  \\***************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar dfs = __webpack_require__(/*! ./dfs */ \"./node_modules/graphlib/lib/alg/dfs.js\");\n\nmodule.exports = preorder;\n\nfunction preorder(g, vs) {\n  return dfs(g, vs, \"pre\");\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/graphlib/lib/alg/prim.js\":\n/*!***********************************************!*\\\n  !*** ./node_modules/graphlib/lib/alg/prim.js ***!\n  \\***********************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar _ = __webpack_require__(/*! ../lodash */ \"./node_modules/graphlib/lib/lodash.js\");\nvar Graph = __webpack_require__(/*! ../graph */ \"./node_modules/graphlib/lib/graph.js\");\nvar PriorityQueue = __webpack_require__(/*! ../data/priority-queue */ \"./node_modules/graphlib/lib/data/priority-queue.js\");\n\nmodule.exports = prim;\n\nfunction prim(g, weightFunc) {\n  var result = new Graph();\n  var parents = {};\n  var pq = new PriorityQueue();\n  var v;\n\n  function updateNeighbors(edge) {\n    var w = edge.v === v ? edge.w : edge.v;\n    var pri = pq.priority(w);\n    if (pri !== undefined) {\n      var edgeWeight = weightFunc(edge);\n      if (edgeWeight < pri) {\n        parents[w] = v;\n        pq.decrease(w, edgeWeight);\n      }\n    }\n  }\n\n  if (g.nodeCount() === 0) {\n    return result;\n  }\n\n  _.each(g.nodes(), function(v) {\n    pq.add(v, Number.POSITIVE_INFINITY);\n    result.setNode(v);\n  });\n\n  // Start from an arbitrary node\n  pq.decrease(g.nodes()[0], 0);\n\n  var init = false;\n  while (pq.size() > 0) {\n    v = pq.removeMin();\n    if (_.has(parents, v)) {\n      result.setEdge(v, parents[v]);\n    } else if (init) {\n      throw new Error(\"Input graph is not connected: \" + g);\n    } else {\n      init = true;\n    }\n\n    g.nodeEdges(v).forEach(updateNeighbors);\n  }\n\n  return result;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/graphlib/lib/alg/tarjan.js\":\n/*!*************************************************!*\\\n  !*** ./node_modules/graphlib/lib/alg/tarjan.js ***!\n  \\*************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar _ = __webpack_require__(/*! ../lodash */ \"./node_modules/graphlib/lib/lodash.js\");\n\nmodule.exports = tarjan;\n\nfunction tarjan(g) {\n  var index = 0;\n  var stack = [];\n  var visited = {}; // node id -> { onStack, lowlink, index }\n  var results = [];\n\n  function dfs(v) {\n    var entry = visited[v] = {\n      onStack: true,\n      lowlink: index,\n      index: index++\n    };\n    stack.push(v);\n\n    g.successors(v).forEach(function(w) {\n      if (!_.has(visited, w)) {\n        dfs(w);\n        entry.lowlink = Math.min(entry.lowlink, visited[w].lowlink);\n      } else if (visited[w].onStack) {\n        entry.lowlink = Math.min(entry.lowlink, visited[w].index);\n      }\n    });\n\n    if (entry.lowlink === entry.index) {\n      var cmpt = [];\n      var w;\n      do {\n        w = stack.pop();\n        visited[w].onStack = false;\n        cmpt.push(w);\n      } while (v !== w);\n      results.push(cmpt);\n    }\n  }\n\n  g.nodes().forEach(function(v) {\n    if (!_.has(visited, v)) {\n      dfs(v);\n    }\n  });\n\n  return results;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/graphlib/lib/alg/topsort.js\":\n/*!**************************************************!*\\\n  !*** ./node_modules/graphlib/lib/alg/topsort.js ***!\n  \\**************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar _ = __webpack_require__(/*! ../lodash */ \"./node_modules/graphlib/lib/lodash.js\");\n\nmodule.exports = topsort;\ntopsort.CycleException = CycleException;\n\nfunction topsort(g) {\n  var visited = {};\n  var stack = {};\n  var results = [];\n\n  function visit(node) {\n    if (_.has(stack, node)) {\n      throw new CycleException();\n    }\n\n    if (!_.has(visited, node)) {\n      stack[node] = true;\n      visited[node] = true;\n      _.each(g.predecessors(node), visit);\n      delete stack[node];\n      results.push(node);\n    }\n  }\n\n  _.each(g.sinks(), visit);\n\n  if (_.size(visited) !== g.nodeCount()) {\n    throw new CycleException();\n  }\n\n  return results;\n}\n\nfunction CycleException() {}\nCycleException.prototype = new Error(); // must be an instance of Error to pass testing\n\n/***/ }),\n\n/***/ \"./node_modules/graphlib/lib/data/priority-queue.js\":\n/*!**********************************************************!*\\\n  !*** ./node_modules/graphlib/lib/data/priority-queue.js ***!\n  \\**********************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar _ = __webpack_require__(/*! ../lodash */ \"./node_modules/graphlib/lib/lodash.js\");\n\nmodule.exports = PriorityQueue;\n\n/**\n * A min-priority queue data structure. This algorithm is derived from Cormen,\n * et al., \"Introduction to Algorithms\". The basic idea of a min-priority\n * queue is that you can efficiently (in O(1) time) get the smallest key in\n * the queue. Adding and removing elements takes O(log n) time. A key can\n * have its priority decreased in O(log n) time.\n */\nfunction PriorityQueue() {\n  this._arr = [];\n  this._keyIndices = {};\n}\n\n/**\n * Returns the number of elements in the queue. Takes `O(1)` time.\n */\nPriorityQueue.prototype.size = function() {\n  return this._arr.length;\n};\n\n/**\n * Returns the keys that are in the queue. Takes `O(n)` time.\n */\nPriorityQueue.prototype.keys = function() {\n  return this._arr.map(function(x) { return x.key; });\n};\n\n/**\n * Returns `true` if **key** is in the queue and `false` if not.\n */\nPriorityQueue.prototype.has = function(key) {\n  return _.has(this._keyIndices, key);\n};\n\n/**\n * Returns the priority for **key**. If **key** is not present in the queue\n * then this function returns `undefined`. Takes `O(1)` time.\n *\n * @param {Object} key\n */\nPriorityQueue.prototype.priority = function(key) {\n  var index = this._keyIndices[key];\n  if (index !== undefined) {\n    return this._arr[index].priority;\n  }\n};\n\n/**\n * Returns the key for the minimum element in this queue. If the queue is\n * empty this function throws an Error. Takes `O(1)` time.\n */\nPriorityQueue.prototype.min = function() {\n  if (this.size() === 0) {\n    throw new Error(\"Queue underflow\");\n  }\n  return this._arr[0].key;\n};\n\n/**\n * Inserts a new key into the priority queue. If the key already exists in\n * the queue this function returns `false`; otherwise it will return `true`.\n * Takes `O(n)` time.\n *\n * @param {Object} key the key to add\n * @param {Number} priority the initial priority for the key\n */\nPriorityQueue.prototype.add = function(key, priority) {\n  var keyIndices = this._keyIndices;\n  key = String(key);\n  if (!_.has(keyIndices, key)) {\n    var arr = this._arr;\n    var index = arr.length;\n    keyIndices[key] = index;\n    arr.push({key: key, priority: priority});\n    this._decrease(index);\n    return true;\n  }\n  return false;\n};\n\n/**\n * Removes and returns the smallest key in the queue. Takes `O(log n)` time.\n */\nPriorityQueue.prototype.removeMin = function() {\n  this._swap(0, this._arr.length - 1);\n  var min = this._arr.pop();\n  delete this._keyIndices[min.key];\n  this._heapify(0);\n  return min.key;\n};\n\n/**\n * Decreases the priority for **key** to **priority**. If the new priority is\n * greater than the previous priority, this function will throw an Error.\n *\n * @param {Object} key the key for which to raise priority\n * @param {Number} priority the new priority for the key\n */\nPriorityQueue.prototype.decrease = function(key, priority) {\n  var index = this._keyIndices[key];\n  if (priority > this._arr[index].priority) {\n    throw new Error(\"New priority is greater than current priority. \" +\n        \"Key: \" + key + \" Old: \" + this._arr[index].priority + \" New: \" + priority);\n  }\n  this._arr[index].priority = priority;\n  this._decrease(index);\n};\n\nPriorityQueue.prototype._heapify = function(i) {\n  var arr = this._arr;\n  var l = 2 * i;\n  var r = l + 1;\n  var largest = i;\n  if (l < arr.length) {\n    largest = arr[l].priority < arr[largest].priority ? l : largest;\n    if (r < arr.length) {\n      largest = arr[r].priority < arr[largest].priority ? r : largest;\n    }\n    if (largest !== i) {\n      this._swap(i, largest);\n      this._heapify(largest);\n    }\n  }\n};\n\nPriorityQueue.prototype._decrease = function(index) {\n  var arr = this._arr;\n  var priority = arr[index].priority;\n  var parent;\n  while (index !== 0) {\n    parent = index >> 1;\n    if (arr[parent].priority < priority) {\n      break;\n    }\n    this._swap(index, parent);\n    index = parent;\n  }\n};\n\nPriorityQueue.prototype._swap = function(i, j) {\n  var arr = this._arr;\n  var keyIndices = this._keyIndices;\n  var origArrI = arr[i];\n  var origArrJ = arr[j];\n  arr[i] = origArrJ;\n  arr[j] = origArrI;\n  keyIndices[origArrJ.key] = i;\n  keyIndices[origArrI.key] = j;\n};\n\n\n/***/ }),\n\n/***/ \"./node_modules/graphlib/lib/graph.js\":\n/*!********************************************!*\\\n  !*** ./node_modules/graphlib/lib/graph.js ***!\n  \\********************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _ = __webpack_require__(/*! ./lodash */ \"./node_modules/graphlib/lib/lodash.js\");\n\nmodule.exports = Graph;\n\nvar DEFAULT_EDGE_NAME = \"\\x00\";\nvar GRAPH_NODE = \"\\x00\";\nvar EDGE_KEY_DELIM = \"\\x01\";\n\n// Implementation notes:\n//\n//  * Node id query functions should return string ids for the nodes\n//  * Edge id query functions should return an \"edgeObj\", edge object, that is\n//    composed of enough information to uniquely identify an edge: {v, w, name}.\n//  * Internally we use an \"edgeId\", a stringified form of the edgeObj, to\n//    reference edges. This is because we need a performant way to look these\n//    edges up and, object properties, which have string keys, are the closest\n//    we're going to get to a performant hashtable in JavaScript.\n\nfunction Graph(opts) {\n  this._isDirected = _.has(opts, \"directed\") ? opts.directed : true;\n  this._isMultigraph = _.has(opts, \"multigraph\") ? opts.multigraph : false;\n  this._isCompound = _.has(opts, \"compound\") ? opts.compound : false;\n\n  // Label for the graph itself\n  this._label = undefined;\n\n  // Defaults to be set when creating a new node\n  this._defaultNodeLabelFn = _.constant(undefined);\n\n  // Defaults to be set when creating a new edge\n  this._defaultEdgeLabelFn = _.constant(undefined);\n\n  // v -> label\n  this._nodes = {};\n\n  if (this._isCompound) {\n    // v -> parent\n    this._parent = {};\n\n    // v -> children\n    this._children = {};\n    this._children[GRAPH_NODE] = {};\n  }\n\n  // v -> edgeObj\n  this._in = {};\n\n  // u -> v -> Number\n  this._preds = {};\n\n  // v -> edgeObj\n  this._out = {};\n\n  // v -> w -> Number\n  this._sucs = {};\n\n  // e -> edgeObj\n  this._edgeObjs = {};\n\n  // e -> label\n  this._edgeLabels = {};\n}\n\n/* Number of nodes in the graph. Should only be changed by the implementation. */\nGraph.prototype._nodeCount = 0;\n\n/* Number of edges in the graph. Should only be changed by the implementation. */\nGraph.prototype._edgeCount = 0;\n\n\n/* === Graph functions ========= */\n\nGraph.prototype.isDirected = function() {\n  return this._isDirected;\n};\n\nGraph.prototype.isMultigraph = function() {\n  return this._isMultigraph;\n};\n\nGraph.prototype.isCompound = function() {\n  return this._isCompound;\n};\n\nGraph.prototype.setGraph = function(label) {\n  this._label = label;\n  return this;\n};\n\nGraph.prototype.graph = function() {\n  return this._label;\n};\n\n\n/* === Node functions ========== */\n\nGraph.prototype.setDefaultNodeLabel = function(newDefault) {\n  if (!_.isFunction(newDefault)) {\n    newDefault = _.constant(newDefault);\n  }\n  this._defaultNodeLabelFn = newDefault;\n  return this;\n};\n\nGraph.prototype.nodeCount = function() {\n  return this._nodeCount;\n};\n\nGraph.prototype.nodes = function() {\n  return _.keys(this._nodes);\n};\n\nGraph.prototype.sources = function() {\n  var self = this;\n  return _.filter(this.nodes(), function(v) {\n    return _.isEmpty(self._in[v]);\n  });\n};\n\nGraph.prototype.sinks = function() {\n  var self = this;\n  return _.filter(this.nodes(), function(v) {\n    return _.isEmpty(self._out[v]);\n  });\n};\n\nGraph.prototype.setNodes = function(vs, value) {\n  var args = arguments;\n  var self = this;\n  _.each(vs, function(v) {\n    if (args.length > 1) {\n      self.setNode(v, value);\n    } else {\n      self.setNode(v);\n    }\n  });\n  return this;\n};\n\nGraph.prototype.setNode = function(v, value) {\n  if (_.has(this._nodes, v)) {\n    if (arguments.length > 1) {\n      this._nodes[v] = value;\n    }\n    return this;\n  }\n\n  this._nodes[v] = arguments.length > 1 ? value : this._defaultNodeLabelFn(v);\n  if (this._isCompound) {\n    this._parent[v] = GRAPH_NODE;\n    this._children[v] = {};\n    this._children[GRAPH_NODE][v] = true;\n  }\n  this._in[v] = {};\n  this._preds[v] = {};\n  this._out[v] = {};\n  this._sucs[v] = {};\n  ++this._nodeCount;\n  return this;\n};\n\nGraph.prototype.node = function(v) {\n  return this._nodes[v];\n};\n\nGraph.prototype.hasNode = function(v) {\n  return _.has(this._nodes, v);\n};\n\nGraph.prototype.removeNode =  function(v) {\n  var self = this;\n  if (_.has(this._nodes, v)) {\n    var removeEdge = function(e) { self.removeEdge(self._edgeObjs[e]); };\n    delete this._nodes[v];\n    if (this._isCompound) {\n      this._removeFromParentsChildList(v);\n      delete this._parent[v];\n      _.each(this.children(v), function(child) {\n        self.setParent(child);\n      });\n      delete this._children[v];\n    }\n    _.each(_.keys(this._in[v]), removeEdge);\n    delete this._in[v];\n    delete this._preds[v];\n    _.each(_.keys(this._out[v]), removeEdge);\n    delete this._out[v];\n    delete this._sucs[v];\n    --this._nodeCount;\n  }\n  return this;\n};\n\nGraph.prototype.setParent = function(v, parent) {\n  if (!this._isCompound) {\n    throw new Error(\"Cannot set parent in a non-compound graph\");\n  }\n\n  if (_.isUndefined(parent)) {\n    parent = GRAPH_NODE;\n  } else {\n    // Coerce parent to string\n    parent += \"\";\n    for (var ancestor = parent;\n      !_.isUndefined(ancestor);\n      ancestor = this.parent(ancestor)) {\n      if (ancestor === v) {\n        throw new Error(\"Setting \" + parent+ \" as parent of \" + v +\n                        \" would create a cycle\");\n      }\n    }\n\n    this.setNode(parent);\n  }\n\n  this.setNode(v);\n  this._removeFromParentsChildList(v);\n  this._parent[v] = parent;\n  this._children[parent][v] = true;\n  return this;\n};\n\nGraph.prototype._removeFromParentsChildList = function(v) {\n  delete this._children[this._parent[v]][v];\n};\n\nGraph.prototype.parent = function(v) {\n  if (this._isCompound) {\n    var parent = this._parent[v];\n    if (parent !== GRAPH_NODE) {\n      return parent;\n    }\n  }\n};\n\nGraph.prototype.children = function(v) {\n  if (_.isUndefined(v)) {\n    v = GRAPH_NODE;\n  }\n\n  if (this._isCompound) {\n    var children = this._children[v];\n    if (children) {\n      return _.keys(children);\n    }\n  } else if (v === GRAPH_NODE) {\n    return this.nodes();\n  } else if (this.hasNode(v)) {\n    return [];\n  }\n};\n\nGraph.prototype.predecessors = function(v) {\n  var predsV = this._preds[v];\n  if (predsV) {\n    return _.keys(predsV);\n  }\n};\n\nGraph.prototype.successors = function(v) {\n  var sucsV = this._sucs[v];\n  if (sucsV) {\n    return _.keys(sucsV);\n  }\n};\n\nGraph.prototype.neighbors = function(v) {\n  var preds = this.predecessors(v);\n  if (preds) {\n    return _.union(preds, this.successors(v));\n  }\n};\n\nGraph.prototype.isLeaf = function (v) {\n  var neighbors;\n  if (this.isDirected()) {\n    neighbors = this.successors(v);\n  } else {\n    neighbors = this.neighbors(v);\n  }\n  return neighbors.length === 0;\n};\n\nGraph.prototype.filterNodes = function(filter) {\n  var copy = new this.constructor({\n    directed: this._isDirected,\n    multigraph: this._isMultigraph,\n    compound: this._isCompound\n  });\n\n  copy.setGraph(this.graph());\n\n  var self = this;\n  _.each(this._nodes, function(value, v) {\n    if (filter(v)) {\n      copy.setNode(v, value);\n    }\n  });\n\n  _.each(this._edgeObjs, function(e) {\n    if (copy.hasNode(e.v) && copy.hasNode(e.w)) {\n      copy.setEdge(e, self.edge(e));\n    }\n  });\n\n  var parents = {};\n  function findParent(v) {\n    var parent = self.parent(v);\n    if (parent === undefined || copy.hasNode(parent)) {\n      parents[v] = parent;\n      return parent;\n    } else if (parent in parents) {\n      return parents[parent];\n    } else {\n      return findParent(parent);\n    }\n  }\n\n  if (this._isCompound) {\n    _.each(copy.nodes(), function(v) {\n      copy.setParent(v, findParent(v));\n    });\n  }\n\n  return copy;\n};\n\n/* === Edge functions ========== */\n\nGraph.prototype.setDefaultEdgeLabel = function(newDefault) {\n  if (!_.isFunction(newDefault)) {\n    newDefault = _.constant(newDefault);\n  }\n  this._defaultEdgeLabelFn = newDefault;\n  return this;\n};\n\nGraph.prototype.edgeCount = function() {\n  return this._edgeCount;\n};\n\nGraph.prototype.edges = function() {\n  return _.values(this._edgeObjs);\n};\n\nGraph.prototype.setPath = function(vs, value) {\n  var self = this;\n  var args = arguments;\n  _.reduce(vs, function(v, w) {\n    if (args.length > 1) {\n      self.setEdge(v, w, value);\n    } else {\n      self.setEdge(v, w);\n    }\n    return w;\n  });\n  return this;\n};\n\n/*\n * setEdge(v, w, [value, [name]])\n * setEdge({ v, w, [name] }, [value])\n */\nGraph.prototype.setEdge = function() {\n  var v, w, name, value;\n  var valueSpecified = false;\n  var arg0 = arguments[0];\n\n  if (typeof arg0 === \"object\" && arg0 !== null && \"v\" in arg0) {\n    v = arg0.v;\n    w = arg0.w;\n    name = arg0.name;\n    if (arguments.length === 2) {\n      value = arguments[1];\n      valueSpecified = true;\n    }\n  } else {\n    v = arg0;\n    w = arguments[1];\n    name = arguments[3];\n    if (arguments.length > 2) {\n      value = arguments[2];\n      valueSpecified = true;\n    }\n  }\n\n  v = \"\" + v;\n  w = \"\" + w;\n  if (!_.isUndefined(name)) {\n    name = \"\" + name;\n  }\n\n  var e = edgeArgsToId(this._isDirected, v, w, name);\n  if (_.has(this._edgeLabels, e)) {\n    if (valueSpecified) {\n      this._edgeLabels[e] = value;\n    }\n    return this;\n  }\n\n  if (!_.isUndefined(name) && !this._isMultigraph) {\n    throw new Error(\"Cannot set a named edge when isMultigraph = false\");\n  }\n\n  // It didn't exist, so we need to create it.\n  // First ensure the nodes exist.\n  this.setNode(v);\n  this.setNode(w);\n\n  this._edgeLabels[e] = valueSpecified ? value : this._defaultEdgeLabelFn(v, w, name);\n\n  var edgeObj = edgeArgsToObj(this._isDirected, v, w, name);\n  // Ensure we add undirected edges in a consistent way.\n  v = edgeObj.v;\n  w = edgeObj.w;\n\n  Object.freeze(edgeObj);\n  this._edgeObjs[e] = edgeObj;\n  incrementOrInitEntry(this._preds[w], v);\n  incrementOrInitEntry(this._sucs[v], w);\n  this._in[w][e] = edgeObj;\n  this._out[v][e] = edgeObj;\n  this._edgeCount++;\n  return this;\n};\n\nGraph.prototype.edge = function(v, w, name) {\n  var e = (arguments.length === 1\n    ? edgeObjToId(this._isDirected, arguments[0])\n    : edgeArgsToId(this._isDirected, v, w, name));\n  return this._edgeLabels[e];\n};\n\nGraph.prototype.hasEdge = function(v, w, name) {\n  var e = (arguments.length === 1\n    ? edgeObjToId(this._isDirected, arguments[0])\n    : edgeArgsToId(this._isDirected, v, w, name));\n  return _.has(this._edgeLabels, e);\n};\n\nGraph.prototype.removeEdge = function(v, w, name) {\n  var e = (arguments.length === 1\n    ? edgeObjToId(this._isDirected, arguments[0])\n    : edgeArgsToId(this._isDirected, v, w, name));\n  var edge = this._edgeObjs[e];\n  if (edge) {\n    v = edge.v;\n    w = edge.w;\n    delete this._edgeLabels[e];\n    delete this._edgeObjs[e];\n    decrementOrRemoveEntry(this._preds[w], v);\n    decrementOrRemoveEntry(this._sucs[v], w);\n    delete this._in[w][e];\n    delete this._out[v][e];\n    this._edgeCount--;\n  }\n  return this;\n};\n\nGraph.prototype.inEdges = function(v, u) {\n  var inV = this._in[v];\n  if (inV) {\n    var edges = _.values(inV);\n    if (!u) {\n      return edges;\n    }\n    return _.filter(edges, function(edge) { return edge.v === u; });\n  }\n};\n\nGraph.prototype.outEdges = function(v, w) {\n  var outV = this._out[v];\n  if (outV) {\n    var edges = _.values(outV);\n    if (!w) {\n      return edges;\n    }\n    return _.filter(edges, function(edge) { return edge.w === w; });\n  }\n};\n\nGraph.prototype.nodeEdges = function(v, w) {\n  var inEdges = this.inEdges(v, w);\n  if (inEdges) {\n    return inEdges.concat(this.outEdges(v, w));\n  }\n};\n\nfunction incrementOrInitEntry(map, k) {\n  if (map[k]) {\n    map[k]++;\n  } else {\n    map[k] = 1;\n  }\n}\n\nfunction decrementOrRemoveEntry(map, k) {\n  if (!--map[k]) { delete map[k]; }\n}\n\nfunction edgeArgsToId(isDirected, v_, w_, name) {\n  var v = \"\" + v_;\n  var w = \"\" + w_;\n  if (!isDirected && v > w) {\n    var tmp = v;\n    v = w;\n    w = tmp;\n  }\n  return v + EDGE_KEY_DELIM + w + EDGE_KEY_DELIM +\n             (_.isUndefined(name) ? DEFAULT_EDGE_NAME : name);\n}\n\nfunction edgeArgsToObj(isDirected, v_, w_, name) {\n  var v = \"\" + v_;\n  var w = \"\" + w_;\n  if (!isDirected && v > w) {\n    var tmp = v;\n    v = w;\n    w = tmp;\n  }\n  var edgeObj =  { v: v, w: w };\n  if (name) {\n    edgeObj.name = name;\n  }\n  return edgeObj;\n}\n\nfunction edgeObjToId(isDirected, edgeObj) {\n  return edgeArgsToId(isDirected, edgeObj.v, edgeObj.w, edgeObj.name);\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/graphlib/lib/index.js\":\n/*!********************************************!*\\\n  !*** ./node_modules/graphlib/lib/index.js ***!\n  \\********************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n// Includes only the \"core\" of graphlib\nmodule.exports = {\n  Graph: __webpack_require__(/*! ./graph */ \"./node_modules/graphlib/lib/graph.js\"),\n  version: __webpack_require__(/*! ./version */ \"./node_modules/graphlib/lib/version.js\")\n};\n\n\n/***/ }),\n\n/***/ \"./node_modules/graphlib/lib/json.js\":\n/*!*******************************************!*\\\n  !*** ./node_modules/graphlib/lib/json.js ***!\n  \\*******************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar _ = __webpack_require__(/*! ./lodash */ \"./node_modules/graphlib/lib/lodash.js\");\nvar Graph = __webpack_require__(/*! ./graph */ \"./node_modules/graphlib/lib/graph.js\");\n\nmodule.exports = {\n  write: write,\n  read: read\n};\n\nfunction write(g) {\n  var json = {\n    options: {\n      directed: g.isDirected(),\n      multigraph: g.isMultigraph(),\n      compound: g.isCompound()\n    },\n    nodes: writeNodes(g),\n    edges: writeEdges(g)\n  };\n  if (!_.isUndefined(g.graph())) {\n    json.value = _.clone(g.graph());\n  }\n  return json;\n}\n\nfunction writeNodes(g) {\n  return _.map(g.nodes(), function(v) {\n    var nodeValue = g.node(v);\n    var parent = g.parent(v);\n    var node = { v: v };\n    if (!_.isUndefined(nodeValue)) {\n      node.value = nodeValue;\n    }\n    if (!_.isUndefined(parent)) {\n      node.parent = parent;\n    }\n    return node;\n  });\n}\n\nfunction writeEdges(g) {\n  return _.map(g.edges(), function(e) {\n    var edgeValue = g.edge(e);\n    var edge = { v: e.v, w: e.w };\n    if (!_.isUndefined(e.name)) {\n      edge.name = e.name;\n    }\n    if (!_.isUndefined(edgeValue)) {\n      edge.value = edgeValue;\n    }\n    return edge;\n  });\n}\n\nfunction read(json) {\n  var g = new Graph(json.options).setGraph(json.value);\n  _.each(json.nodes, function(entry) {\n    g.setNode(entry.v, entry.value);\n    if (entry.parent) {\n      g.setParent(entry.v, entry.parent);\n    }\n  });\n  _.each(json.edges, function(entry) {\n    g.setEdge({ v: entry.v, w: entry.w, name: entry.name }, entry.value);\n  });\n  return g;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/graphlib/lib/lodash.js\":\n/*!*********************************************!*\\\n  !*** ./node_modules/graphlib/lib/lodash.js ***!\n  \\*********************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n/* global window */\n\nvar lodash;\n\nif (true) {\n  try {\n    lodash = {\n      clone: __webpack_require__(/*! lodash/clone */ \"./node_modules/lodash/clone.js\"),\n      constant: __webpack_require__(/*! lodash/constant */ \"./node_modules/lodash/constant.js\"),\n      each: __webpack_require__(/*! lodash/each */ \"./node_modules/lodash/each.js\"),\n      filter: __webpack_require__(/*! lodash/filter */ \"./node_modules/lodash/filter.js\"),\n      has:  __webpack_require__(/*! lodash/has */ \"./node_modules/lodash/has.js\"),\n      isArray: __webpack_require__(/*! lodash/isArray */ \"./node_modules/lodash/isArray.js\"),\n      isEmpty: __webpack_require__(/*! lodash/isEmpty */ \"./node_modules/lodash/isEmpty.js\"),\n      isFunction: __webpack_require__(/*! lodash/isFunction */ \"./node_modules/lodash/isFunction.js\"),\n      isUndefined: __webpack_require__(/*! lodash/isUndefined */ \"./node_modules/lodash/isUndefined.js\"),\n      keys: __webpack_require__(/*! lodash/keys */ \"./node_modules/lodash/keys.js\"),\n      map: __webpack_require__(/*! lodash/map */ \"./node_modules/lodash/map.js\"),\n      reduce: __webpack_require__(/*! lodash/reduce */ \"./node_modules/lodash/reduce.js\"),\n      size: __webpack_require__(/*! lodash/size */ \"./node_modules/lodash/size.js\"),\n      transform: __webpack_require__(/*! lodash/transform */ \"./node_modules/lodash/transform.js\"),\n      union: __webpack_require__(/*! lodash/union */ \"./node_modules/lodash/union.js\"),\n      values: __webpack_require__(/*! lodash/values */ \"./node_modules/lodash/values.js\")\n    };\n  } catch (e) {\n    // continue regardless of error\n  }\n}\n\nif (!lodash) {\n  lodash = window._;\n}\n\nmodule.exports = lodash;\n\n\n/***/ }),\n\n/***/ \"./node_modules/graphlib/lib/version.js\":\n/*!**********************************************!*\\\n  !*** ./node_modules/graphlib/lib/version.js ***!\n  \\**********************************************/\n/*! no static exports found */\n/***/ (function(module, exports) {\n\nmodule.exports = '2.1.8';\n\n\n/***/ }),\n\n/***/ \"./node_modules/internmap/src/index.js\":\n/*!*********************************************!*\\\n  !*** ./node_modules/internmap/src/index.js ***!\n  \\*********************************************/\n/*! exports provided: InternMap, InternSet */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"InternMap\", function() { return InternMap; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"InternSet\", function() { return InternSet; });\nclass InternMap extends Map {\n  constructor(entries, key = keyof) {\n    super();\n    Object.defineProperties(this, {_intern: {value: new Map()}, _key: {value: key}});\n    if (entries != null) for (const [key, value] of entries) this.set(key, value);\n  }\n  get(key) {\n    return super.get(intern_get(this, key));\n  }\n  has(key) {\n    return super.has(intern_get(this, key));\n  }\n  set(key, value) {\n    return super.set(intern_set(this, key), value);\n  }\n  delete(key) {\n    return super.delete(intern_delete(this, key));\n  }\n}\n\nclass InternSet extends Set {\n  constructor(values, key = keyof) {\n    super();\n    Object.defineProperties(this, {_intern: {value: new Map()}, _key: {value: key}});\n    if (values != null) for (const value of values) this.add(value);\n  }\n  has(value) {\n    return super.has(intern_get(this, value));\n  }\n  add(value) {\n    return super.add(intern_set(this, value));\n  }\n  delete(value) {\n    return super.delete(intern_delete(this, value));\n  }\n}\n\nfunction intern_get({_intern, _key}, value) {\n  const key = _key(value);\n  return _intern.has(key) ? _intern.get(key) : value;\n}\n\nfunction intern_set({_intern, _key}, value) {\n  const key = _key(value);\n  if (_intern.has(key)) return _intern.get(key);\n  _intern.set(key, value);\n  return value;\n}\n\nfunction intern_delete({_intern, _key}, value) {\n  const key = _key(value);\n  if (_intern.has(key)) {\n    value = _intern.get(value);\n    _intern.delete(key);\n  }\n  return value;\n}\n\nfunction keyof(value) {\n  return value !== null && typeof value === \"object\" ? value.valueOf() : value;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/khroma/dist/channels/index.js\":\n/*!****************************************************!*\\\n  !*** ./node_modules/khroma/dist/channels/index.js ***!\n  \\****************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/* IMPORT */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar utils_1 = __webpack_require__(/*! ../utils */ \"./node_modules/khroma/dist/utils/index.js\");\nvar type_1 = __webpack_require__(/*! ./type */ \"./node_modules/khroma/dist/channels/type.js\");\n/* CHANNELS */\nvar Channels = /** @class */ (function () {\n    /* CONSTRUCTOR */\n    function Channels(data, color) {\n        this.color = color;\n        this.changed = false;\n        this.data = data; //TSC\n        this.type = new type_1.default();\n    }\n    /* API */\n    Channels.prototype.set = function (data, color) {\n        this.color = color;\n        this.changed = false;\n        this.data = data; //TSC\n        this.type.type = 0 /* ALL */;\n        return this;\n    };\n    /* HELPERS */\n    Channels.prototype._ensureHSL = function () {\n        var data = this.data;\n        var h = data.h, s = data.s, l = data.l;\n        if (h === undefined)\n            data.h = utils_1.default.channel.rgb2hsl(data, 'h');\n        if (s === undefined)\n            data.s = utils_1.default.channel.rgb2hsl(data, 's');\n        if (l === undefined)\n            data.l = utils_1.default.channel.rgb2hsl(data, 'l');\n    };\n    Channels.prototype._ensureRGB = function () {\n        var data = this.data;\n        var r = data.r, g = data.g, b = data.b;\n        if (r === undefined)\n            data.r = utils_1.default.channel.hsl2rgb(data, 'r');\n        if (g === undefined)\n            data.g = utils_1.default.channel.hsl2rgb(data, 'g');\n        if (b === undefined)\n            data.b = utils_1.default.channel.hsl2rgb(data, 'b');\n    };\n    Object.defineProperty(Channels.prototype, \"r\", {\n        /* GETTERS */\n        get: function () {\n            var data = this.data;\n            var r = data.r;\n            if (!this.type.is(2 /* HSL */) && r !== undefined)\n                return r;\n            this._ensureHSL();\n            return utils_1.default.channel.hsl2rgb(data, 'r');\n        },\n        /* SETTERS */\n        set: function (r) {\n            this.type.set(1 /* RGB */);\n            this.changed = true;\n            this.data.r = r;\n        },\n        enumerable: true,\n        configurable: true\n    });\n    Object.defineProperty(Channels.prototype, \"g\", {\n        get: function () {\n            var data = this.data;\n            var g = data.g;\n            if (!this.type.is(2 /* HSL */) && g !== undefined)\n                return g;\n            this._ensureHSL();\n            return utils_1.default.channel.hsl2rgb(data, 'g');\n        },\n        set: function (g) {\n            this.type.set(1 /* RGB */);\n            this.changed = true;\n            this.data.g = g;\n        },\n        enumerable: true,\n        configurable: true\n    });\n    Object.defineProperty(Channels.prototype, \"b\", {\n        get: function () {\n            var data = this.data;\n            var b = data.b;\n            if (!this.type.is(2 /* HSL */) && b !== undefined)\n                return b;\n            this._ensureHSL();\n            return utils_1.default.channel.hsl2rgb(data, 'b');\n        },\n        set: function (b) {\n            this.type.set(1 /* RGB */);\n            this.changed = true;\n            this.data.b = b;\n        },\n        enumerable: true,\n        configurable: true\n    });\n    Object.defineProperty(Channels.prototype, \"h\", {\n        get: function () {\n            var data = this.data;\n            var h = data.h;\n            if (!this.type.is(1 /* RGB */) && h !== undefined)\n                return h;\n            this._ensureRGB();\n            return utils_1.default.channel.rgb2hsl(data, 'h');\n        },\n        set: function (h) {\n            this.type.set(2 /* HSL */);\n            this.changed = true;\n            this.data.h = h;\n        },\n        enumerable: true,\n        configurable: true\n    });\n    Object.defineProperty(Channels.prototype, \"s\", {\n        get: function () {\n            var data = this.data;\n            var s = data.s;\n            if (!this.type.is(1 /* RGB */) && s !== undefined)\n                return s;\n            this._ensureRGB();\n            return utils_1.default.channel.rgb2hsl(data, 's');\n        },\n        set: function (s) {\n            this.type.set(2 /* HSL */);\n            this.changed = true;\n            this.data.s = s;\n        },\n        enumerable: true,\n        configurable: true\n    });\n    Object.defineProperty(Channels.prototype, \"l\", {\n        get: function () {\n            var data = this.data;\n            var l = data.l;\n            if (!this.type.is(1 /* RGB */) && l !== undefined)\n                return l;\n            this._ensureRGB();\n            return utils_1.default.channel.rgb2hsl(data, 'l');\n        },\n        set: function (l) {\n            this.type.set(2 /* HSL */);\n            this.changed = true;\n            this.data.l = l;\n        },\n        enumerable: true,\n        configurable: true\n    });\n    Object.defineProperty(Channels.prototype, \"a\", {\n        get: function () {\n            return this.data.a;\n        },\n        set: function (a) {\n            this.changed = true;\n            this.data.a = a;\n        },\n        enumerable: true,\n        configurable: true\n    });\n    return Channels;\n}());\n/* EXPORT */\nexports.default = Channels;\n\n\n/***/ }),\n\n/***/ \"./node_modules/khroma/dist/channels/reusable.js\":\n/*!*******************************************************!*\\\n  !*** ./node_modules/khroma/dist/channels/reusable.js ***!\n  \\*******************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/* IMPORT */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar _1 = __webpack_require__(/*! . */ \"./node_modules/khroma/dist/channels/index.js\");\n/* REUSABLE */\nvar channels = new _1.default({ r: 0, g: 0, b: 0, a: 0 }, 'transparent');\n/* EXPORT */\nexports.default = channels;\n\n\n/***/ }),\n\n/***/ \"./node_modules/khroma/dist/channels/type.js\":\n/*!***************************************************!*\\\n  !*** ./node_modules/khroma/dist/channels/type.js ***!\n  \\***************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/* IMPORT */\nObject.defineProperty(exports, \"__esModule\", { value: true });\n/* TYPE */\nvar Type = /** @class */ (function () {\n    function Type() {\n        this.type = 0 /* ALL */;\n    }\n    Type.prototype.get = function () {\n        return this.type;\n    };\n    Type.prototype.set = function (type) {\n        if (this.type && this.type !== type)\n            throw new Error('Cannot change both RGB and HSL channels at the same time');\n        this.type = type;\n    };\n    Type.prototype.reset = function () {\n        this.type = 0 /* ALL */;\n    };\n    Type.prototype.is = function (type) {\n        return this.type === type;\n    };\n    return Type;\n}());\n/* EXPORT */\nexports.default = Type;\n\n\n/***/ }),\n\n/***/ \"./node_modules/khroma/dist/color/hex.js\":\n/*!***********************************************!*\\\n  !*** ./node_modules/khroma/dist/color/hex.js ***!\n  \\***********************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/* IMPORT */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar reusable_1 = __webpack_require__(/*! ../channels/reusable */ \"./node_modules/khroma/dist/channels/reusable.js\");\nvar consts_1 = __webpack_require__(/*! ../consts */ \"./node_modules/khroma/dist/consts.js\");\n/* HEX */\nvar Hex = {\n    /* VARIABLES */\n    re: /^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,\n    /* API */\n    parse: function (color) {\n        if (color.charCodeAt(0) !== 35)\n            return; // '#'\n        var match = color.match(Hex.re);\n        if (!match)\n            return;\n        var hex = match[1], dec = parseInt(hex, 16), length = hex.length, hasAlpha = length % 4 === 0, isFullLength = length > 4, multiplier = isFullLength ? 1 : 17, bits = isFullLength ? 8 : 4, bitsOffset = hasAlpha ? 0 : -1, mask = isFullLength ? 255 : 15;\n        return reusable_1.default.set({\n            r: ((dec >> (bits * (bitsOffset + 3))) & mask) * multiplier,\n            g: ((dec >> (bits * (bitsOffset + 2))) & mask) * multiplier,\n            b: ((dec >> (bits * (bitsOffset + 1))) & mask) * multiplier,\n            a: hasAlpha ? (dec & mask) * multiplier / 255 : 1\n        }, color);\n    },\n    stringify: function (channels) {\n        var r = channels.r, g = channels.g, b = channels.b, a = channels.a;\n        if (a < 1) { // #RRGGBBAA\n            return \"#\" + consts_1.DEC2HEX[Math.round(r)] + consts_1.DEC2HEX[Math.round(g)] + consts_1.DEC2HEX[Math.round(b)] + consts_1.DEC2HEX[Math.round(a * 255)];\n        }\n        else { // #RRGGBB\n            return \"#\" + consts_1.DEC2HEX[Math.round(r)] + consts_1.DEC2HEX[Math.round(g)] + consts_1.DEC2HEX[Math.round(b)];\n        }\n    }\n};\n/* EXPORT */\nexports.default = Hex;\n\n\n/***/ }),\n\n/***/ \"./node_modules/khroma/dist/color/hsl.js\":\n/*!***********************************************!*\\\n  !*** ./node_modules/khroma/dist/color/hsl.js ***!\n  \\***********************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/* IMPORT */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar utils_1 = __webpack_require__(/*! ../utils */ \"./node_modules/khroma/dist/utils/index.js\");\nvar reusable_1 = __webpack_require__(/*! ../channels/reusable */ \"./node_modules/khroma/dist/channels/reusable.js\");\n/* HSL */\nvar HSL = {\n    /* VARIABLES */\n    re: /^hsla?\\(\\s*?(-?(?:\\d+(?:\\.\\d+)?|(?:\\.\\d+))(?:e-?\\d+)?(?:deg|grad|rad|turn)?)\\s*?(?:,|\\s)\\s*?(-?(?:\\d+(?:\\.\\d+)?|(?:\\.\\d+))(?:e-?\\d+)?%)\\s*?(?:,|\\s)\\s*?(-?(?:\\d+(?:\\.\\d+)?|(?:\\.\\d+))(?:e-?\\d+)?%)(?:\\s*?(?:,|\\/)\\s*?\\+?(-?(?:\\d+(?:\\.\\d+)?|(?:\\.\\d+))(?:e-?\\d+)?(%)?))?\\s*?\\)$/i,\n    hueRe: /^(.+?)(deg|grad|rad|turn)$/i,\n    /* HELPERS */\n    _hue2deg: function (hue) {\n        var match = hue.match(HSL.hueRe);\n        if (match) {\n            var number = match[1], unit = match[2];\n            switch (unit) {\n                case 'grad': return utils_1.default.channel.clamp.h(parseFloat(number) * .9);\n                case 'rad': return utils_1.default.channel.clamp.h(parseFloat(number) * 180 / Math.PI);\n                case 'turn': return utils_1.default.channel.clamp.h(parseFloat(number) * 360);\n            }\n        }\n        return utils_1.default.channel.clamp.h(parseFloat(hue));\n    },\n    /* API */\n    parse: function (color) {\n        var charCode = color.charCodeAt(0);\n        if (charCode !== 104 && charCode !== 72)\n            return; // 'h'/'H'\n        var match = color.match(HSL.re);\n        if (!match)\n            return;\n        var h = match[1], s = match[2], l = match[3], a = match[4], isAlphaPercentage = match[5];\n        return reusable_1.default.set({\n            h: HSL._hue2deg(h),\n            s: utils_1.default.channel.clamp.s(parseFloat(s)),\n            l: utils_1.default.channel.clamp.l(parseFloat(l)),\n            a: a ? utils_1.default.channel.clamp.a(isAlphaPercentage ? parseFloat(a) / 100 : parseFloat(a)) : 1\n        }, color);\n    },\n    stringify: function (channels) {\n        var h = channels.h, s = channels.s, l = channels.l, a = channels.a;\n        if (a < 1) { // HSLA\n            return \"hsla(\" + utils_1.default.lang.round(h) + \", \" + utils_1.default.lang.round(s) + \"%, \" + utils_1.default.lang.round(l) + \"%, \" + a + \")\";\n        }\n        else { // HSL\n            return \"hsl(\" + utils_1.default.lang.round(h) + \", \" + utils_1.default.lang.round(s) + \"%, \" + utils_1.default.lang.round(l) + \"%)\";\n        }\n    }\n};\n/* EXPORT */\nexports.default = HSL;\n\n\n/***/ }),\n\n/***/ \"./node_modules/khroma/dist/color/index.js\":\n/*!*************************************************!*\\\n  !*** ./node_modules/khroma/dist/color/index.js ***!\n  \\*************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/* IMPORT */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar hex_1 = __webpack_require__(/*! ./hex */ \"./node_modules/khroma/dist/color/hex.js\");\nvar keyword_1 = __webpack_require__(/*! ./keyword */ \"./node_modules/khroma/dist/color/keyword.js\");\nvar rgb_1 = __webpack_require__(/*! ./rgb */ \"./node_modules/khroma/dist/color/rgb.js\");\nvar hsl_1 = __webpack_require__(/*! ./hsl */ \"./node_modules/khroma/dist/color/hsl.js\");\n/* COLOR */\nvar Color = {\n    /* VARIABLES */\n    format: {\n        keyword: keyword_1.default,\n        hex: hex_1.default,\n        rgb: rgb_1.default,\n        rgba: rgb_1.default,\n        hsl: hsl_1.default,\n        hsla: hsl_1.default\n    },\n    /* API */\n    parse: function (color) {\n        if (typeof color !== 'string')\n            return color;\n        var channels = hex_1.default.parse(color) || rgb_1.default.parse(color) || hsl_1.default.parse(color) || keyword_1.default.parse(color); // Color providers ordered with performance in mind\n        if (channels)\n            return channels;\n        throw new Error(\"Unsupported color format: \\\"\" + color + \"\\\"\");\n    },\n    stringify: function (channels) {\n        // SASS returns a keyword if possible, but we avoid doing that as it's slower and doesn't really add any value\n        if (!channels.changed && channels.color)\n            return channels.color;\n        if (channels.type.is(2 /* HSL */) || channels.data.r === undefined) {\n            return hsl_1.default.stringify(channels);\n        }\n        else if (channels.a < 1 || !Number.isInteger(channels.r) || !Number.isInteger(channels.g) || !Number.isInteger(channels.b)) {\n            return rgb_1.default.stringify(channels);\n        }\n        else {\n            return hex_1.default.stringify(channels);\n        }\n    }\n};\n/* EXPORT */\nexports.default = Color;\n\n\n/***/ }),\n\n/***/ \"./node_modules/khroma/dist/color/keyword.js\":\n/*!***************************************************!*\\\n  !*** ./node_modules/khroma/dist/color/keyword.js ***!\n  \\***************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/* IMPORT */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar hex_1 = __webpack_require__(/*! ./hex */ \"./node_modules/khroma/dist/color/hex.js\");\n/* KEYWORD */\nvar Keyword = {\n    /* VARIABLES */\n    colors: {\n        aliceblue: '#f0f8ff',\n        antiquewhite: '#faebd7',\n        aqua: '#00ffff',\n        aquamarine: '#7fffd4',\n        azure: '#f0ffff',\n        beige: '#f5f5dc',\n        bisque: '#ffe4c4',\n        black: '#000000',\n        blanchedalmond: '#ffebcd',\n        blue: '#0000ff',\n        blueviolet: '#8a2be2',\n        brown: '#a52a2a',\n        burlywood: '#deb887',\n        cadetblue: '#5f9ea0',\n        chartreuse: '#7fff00',\n        chocolate: '#d2691e',\n        coral: '#ff7f50',\n        cornflowerblue: '#6495ed',\n        cornsilk: '#fff8dc',\n        crimson: '#dc143c',\n        cyanaqua: '#00ffff',\n        darkblue: '#00008b',\n        darkcyan: '#008b8b',\n        darkgoldenrod: '#b8860b',\n        darkgray: '#a9a9a9',\n        darkgreen: '#006400',\n        darkgrey: '#a9a9a9',\n        darkkhaki: '#bdb76b',\n        darkmagenta: '#8b008b',\n        darkolivegreen: '#556b2f',\n        darkorange: '#ff8c00',\n        darkorchid: '#9932cc',\n        darkred: '#8b0000',\n        darksalmon: '#e9967a',\n        darkseagreen: '#8fbc8f',\n        darkslateblue: '#483d8b',\n        darkslategray: '#2f4f4f',\n        darkslategrey: '#2f4f4f',\n        darkturquoise: '#00ced1',\n        darkviolet: '#9400d3',\n        deeppink: '#ff1493',\n        deepskyblue: '#00bfff',\n        dimgray: '#696969',\n        dimgrey: '#696969',\n        dodgerblue: '#1e90ff',\n        firebrick: '#b22222',\n        floralwhite: '#fffaf0',\n        forestgreen: '#228b22',\n        fuchsia: '#ff00ff',\n        gainsboro: '#dcdcdc',\n        ghostwhite: '#f8f8ff',\n        gold: '#ffd700',\n        goldenrod: '#daa520',\n        gray: '#808080',\n        green: '#008000',\n        greenyellow: '#adff2f',\n        grey: '#808080',\n        honeydew: '#f0fff0',\n        hotpink: '#ff69b4',\n        indianred: '#cd5c5c',\n        indigo: '#4b0082',\n        ivory: '#fffff0',\n        khaki: '#f0e68c',\n        lavender: '#e6e6fa',\n        lavenderblush: '#fff0f5',\n        lawngreen: '#7cfc00',\n        lemonchiffon: '#fffacd',\n        lightblue: '#add8e6',\n        lightcoral: '#f08080',\n        lightcyan: '#e0ffff',\n        lightgoldenrodyellow: '#fafad2',\n        lightgray: '#d3d3d3',\n        lightgreen: '#90ee90',\n        lightgrey: '#d3d3d3',\n        lightpink: '#ffb6c1',\n        lightsalmon: '#ffa07a',\n        lightseagreen: '#20b2aa',\n        lightskyblue: '#87cefa',\n        lightslategray: '#778899',\n        lightslategrey: '#778899',\n        lightsteelblue: '#b0c4de',\n        lightyellow: '#ffffe0',\n        lime: '#00ff00',\n        limegreen: '#32cd32',\n        linen: '#faf0e6',\n        magenta: '#ff00ff',\n        maroon: '#800000',\n        mediumaquamarine: '#66cdaa',\n        mediumblue: '#0000cd',\n        mediumorchid: '#ba55d3',\n        mediumpurple: '#9370db',\n        mediumseagreen: '#3cb371',\n        mediumslateblue: '#7b68ee',\n        mediumspringgreen: '#00fa9a',\n        mediumturquoise: '#48d1cc',\n        mediumvioletred: '#c71585',\n        midnightblue: '#191970',\n        mintcream: '#f5fffa',\n        mistyrose: '#ffe4e1',\n        moccasin: '#ffe4b5',\n        navajowhite: '#ffdead',\n        navy: '#000080',\n        oldlace: '#fdf5e6',\n        olive: '#808000',\n        olivedrab: '#6b8e23',\n        orange: '#ffa500',\n        orangered: '#ff4500',\n        orchid: '#da70d6',\n        palegoldenrod: '#eee8aa',\n        palegreen: '#98fb98',\n        paleturquoise: '#afeeee',\n        palevioletred: '#db7093',\n        papayawhip: '#ffefd5',\n        peachpuff: '#ffdab9',\n        peru: '#cd853f',\n        pink: '#ffc0cb',\n        plum: '#dda0dd',\n        powderblue: '#b0e0e6',\n        purple: '#800080',\n        rebeccapurple: '#663399',\n        red: '#ff0000',\n        rosybrown: '#bc8f8f',\n        royalblue: '#4169e1',\n        saddlebrown: '#8b4513',\n        salmon: '#fa8072',\n        sandybrown: '#f4a460',\n        seagreen: '#2e8b57',\n        seashell: '#fff5ee',\n        sienna: '#a0522d',\n        silver: '#c0c0c0',\n        skyblue: '#87ceeb',\n        slateblue: '#6a5acd',\n        slategray: '#708090',\n        slategrey: '#708090',\n        snow: '#fffafa',\n        springgreen: '#00ff7f',\n        tan: '#d2b48c',\n        teal: '#008080',\n        thistle: '#d8bfd8',\n        transparent: '#00000000',\n        turquoise: '#40e0d0',\n        violet: '#ee82ee',\n        wheat: '#f5deb3',\n        white: '#ffffff',\n        whitesmoke: '#f5f5f5',\n        yellow: '#ffff00',\n        yellowgreen: '#9acd32'\n    },\n    /* API */\n    parse: function (color) {\n        color = color.toLowerCase();\n        var hex = Keyword.colors[color];\n        if (!hex)\n            return;\n        return hex_1.default.parse(hex);\n    },\n    stringify: function (channels) {\n        var hex = hex_1.default.stringify(channels);\n        for (var name_1 in Keyword.colors) {\n            if (Keyword.colors[name_1] === hex)\n                return name_1;\n        }\n    }\n};\n/* EXPORT */\nexports.default = Keyword;\n\n\n/***/ }),\n\n/***/ \"./node_modules/khroma/dist/color/rgb.js\":\n/*!***********************************************!*\\\n  !*** ./node_modules/khroma/dist/color/rgb.js ***!\n  \\***********************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/* IMPORT */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar utils_1 = __webpack_require__(/*! ../utils */ \"./node_modules/khroma/dist/utils/index.js\");\nvar reusable_1 = __webpack_require__(/*! ../channels/reusable */ \"./node_modules/khroma/dist/channels/reusable.js\");\n/* RGB */\nvar RGB = {\n    /* VARIABLES */\n    re: /^rgba?\\(\\s*?(-?(?:\\d+(?:\\.\\d+)?|(?:\\.\\d+))(?:e\\d+)?(%?))\\s*?(?:,|\\s)\\s*?(-?(?:\\d+(?:\\.\\d+)?|(?:\\.\\d+))(?:e\\d+)?(%?))\\s*?(?:,|\\s)\\s*?(-?(?:\\d+(?:\\.\\d+)?|(?:\\.\\d+))(?:e\\d+)?(%?))(?:\\s*?(?:,|\\/)\\s*?\\+?(-?(?:\\d+(?:\\.\\d+)?|(?:\\.\\d+))(?:e\\d+)?(%?)))?\\s*?\\)$/i,\n    /* API */\n    parse: function (color) {\n        var charCode = color.charCodeAt(0);\n        if (charCode !== 114 && charCode !== 82)\n            return; // 'r'/'R'\n        var match = color.match(RGB.re);\n        if (!match)\n            return;\n        var r = match[1], isRedPercentage = match[2], g = match[3], isGreenPercentage = match[4], b = match[5], isBluePercentage = match[6], a = match[7], isAlphaPercentage = match[8];\n        return reusable_1.default.set({\n            r: utils_1.default.channel.clamp.r(isRedPercentage ? parseFloat(r) * 2.55 : parseFloat(r)),\n            g: utils_1.default.channel.clamp.g(isGreenPercentage ? parseFloat(g) * 2.55 : parseFloat(g)),\n            b: utils_1.default.channel.clamp.b(isBluePercentage ? parseFloat(b) * 2.55 : parseFloat(b)),\n            a: a ? utils_1.default.channel.clamp.a(isAlphaPercentage ? parseFloat(a) / 100 : parseFloat(a)) : 1\n        }, color);\n    },\n    stringify: function (channels) {\n        var r = channels.r, g = channels.g, b = channels.b, a = channels.a;\n        if (a < 1) { // RGBA\n            return \"rgba(\" + utils_1.default.lang.round(r) + \", \" + utils_1.default.lang.round(g) + \", \" + utils_1.default.lang.round(b) + \", \" + utils_1.default.lang.round(a) + \")\";\n        }\n        else { // RGB\n            return \"rgb(\" + utils_1.default.lang.round(r) + \", \" + utils_1.default.lang.round(g) + \", \" + utils_1.default.lang.round(b) + \")\";\n        }\n    }\n};\n/* EXPORT */\nexports.default = RGB;\n\n\n/***/ }),\n\n/***/ \"./node_modules/khroma/dist/consts.js\":\n/*!********************************************!*\\\n  !*** ./node_modules/khroma/dist/consts.js ***!\n  \\********************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/* IMPORT */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar utils_1 = __webpack_require__(/*! ./utils */ \"./node_modules/khroma/dist/utils/index.js\");\n/* CONSTS */\nvar DEC2HEX = {};\nexports.DEC2HEX = DEC2HEX;\nfor (var i = 0; i <= 255; i++)\n    DEC2HEX[i] = utils_1.default.unit.dec2hex(i); // Populating dynamically, striking a balance between code size and performance\n\n\n/***/ }),\n\n/***/ \"./node_modules/khroma/dist/index.js\":\n/*!*******************************************!*\\\n  !*** ./node_modules/khroma/dist/index.js ***!\n  \\*******************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/* EXPORT */\nfunction __export(m) {\n    for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\n}\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__export(__webpack_require__(/*! ./methods */ \"./node_modules/khroma/dist/methods/index.js\"));\n\n\n/***/ }),\n\n/***/ \"./node_modules/khroma/dist/methods/adjust.js\":\n/*!****************************************************!*\\\n  !*** ./node_modules/khroma/dist/methods/adjust.js ***!\n  \\****************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/* IMPORT */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar color_1 = __webpack_require__(/*! ../color */ \"./node_modules/khroma/dist/color/index.js\");\nvar change_1 = __webpack_require__(/*! ./change */ \"./node_modules/khroma/dist/methods/change.js\");\n/* ADJUST */\nfunction adjust(color, channels) {\n    var ch = color_1.default.parse(color), changes = {};\n    for (var c in channels) {\n        if (!channels[c])\n            continue;\n        changes[c] = ch[c] + channels[c];\n    }\n    return change_1.default(color, changes);\n}\n/* EXPORT */\nexports.default = adjust;\n\n\n/***/ }),\n\n/***/ \"./node_modules/khroma/dist/methods/adjust_channel.js\":\n/*!************************************************************!*\\\n  !*** ./node_modules/khroma/dist/methods/adjust_channel.js ***!\n  \\************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/* IMPORT */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar utils_1 = __webpack_require__(/*! ../utils */ \"./node_modules/khroma/dist/utils/index.js\");\nvar color_1 = __webpack_require__(/*! ../color */ \"./node_modules/khroma/dist/color/index.js\");\n/* ADJUST CHANNEL */\nfunction adjustChannel(color, channel, amount) {\n    var channels = color_1.default.parse(color), amountCurrent = channels[channel], amountNext = utils_1.default.channel.clamp[channel](amountCurrent + amount);\n    if (amountCurrent !== amountNext)\n        channels[channel] = amountNext;\n    return color_1.default.stringify(channels);\n}\n/* EXPORT */\nexports.default = adjustChannel;\n\n\n/***/ }),\n\n/***/ \"./node_modules/khroma/dist/methods/alpha.js\":\n/*!***************************************************!*\\\n  !*** ./node_modules/khroma/dist/methods/alpha.js ***!\n  \\***************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/* IMPORT */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar channel_1 = __webpack_require__(/*! ./channel */ \"./node_modules/khroma/dist/methods/channel.js\");\n/* ALPHA */\nfunction alpha(color) {\n    return channel_1.default(color, 'a');\n}\n/* EXPORT */\nexports.default = alpha;\n\n\n/***/ }),\n\n/***/ \"./node_modules/khroma/dist/methods/blue.js\":\n/*!**************************************************!*\\\n  !*** ./node_modules/khroma/dist/methods/blue.js ***!\n  \\**************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/* IMPORT */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar channel_1 = __webpack_require__(/*! ./channel */ \"./node_modules/khroma/dist/methods/channel.js\");\n/* BLUE */\nfunction blue(color) {\n    return channel_1.default(color, 'b');\n}\n/* EXPORT */\nexports.default = blue;\n\n\n/***/ }),\n\n/***/ \"./node_modules/khroma/dist/methods/change.js\":\n/*!****************************************************!*\\\n  !*** ./node_modules/khroma/dist/methods/change.js ***!\n  \\****************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/* IMPORT */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar utils_1 = __webpack_require__(/*! ../utils */ \"./node_modules/khroma/dist/utils/index.js\");\nvar color_1 = __webpack_require__(/*! ../color */ \"./node_modules/khroma/dist/color/index.js\");\n/* CHANGE */\nfunction change(color, channels) {\n    var ch = color_1.default.parse(color);\n    for (var c in channels) {\n        ch[c] = utils_1.default.channel.clamp[c](channels[c]);\n    }\n    return color_1.default.stringify(ch);\n}\n/* EXPORT */\nexports.default = change;\n\n\n/***/ }),\n\n/***/ \"./node_modules/khroma/dist/methods/channel.js\":\n/*!*****************************************************!*\\\n  !*** ./node_modules/khroma/dist/methods/channel.js ***!\n  \\*****************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/* IMPORT */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar utils_1 = __webpack_require__(/*! ../utils */ \"./node_modules/khroma/dist/utils/index.js\");\nvar color_1 = __webpack_require__(/*! ../color */ \"./node_modules/khroma/dist/color/index.js\");\n/* CHANNEL */\nfunction channel(color, channel) {\n    return utils_1.default.lang.round(color_1.default.parse(color)[channel]);\n}\n/* EXPORT */\nexports.default = channel;\n\n\n/***/ }),\n\n/***/ \"./node_modules/khroma/dist/methods/complement.js\":\n/*!********************************************************!*\\\n  !*** ./node_modules/khroma/dist/methods/complement.js ***!\n  \\********************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/* IMPORT */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar adjust_channel_1 = __webpack_require__(/*! ./adjust_channel */ \"./node_modules/khroma/dist/methods/adjust_channel.js\");\n/* COMPLEMENT */\nfunction complement(color) {\n    return adjust_channel_1.default(color, 'h', 180);\n}\n/* EXPORT */\nexports.default = complement;\n\n\n/***/ }),\n\n/***/ \"./node_modules/khroma/dist/methods/contrast.js\":\n/*!******************************************************!*\\\n  !*** ./node_modules/khroma/dist/methods/contrast.js ***!\n  \\******************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/* IMPORT */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar utils_1 = __webpack_require__(/*! ../utils */ \"./node_modules/khroma/dist/utils/index.js\");\nvar luminance_1 = __webpack_require__(/*! ./luminance */ \"./node_modules/khroma/dist/methods/luminance.js\");\n/* CONTRAST */\nfunction contrast(color1, color2) {\n    var luminance1 = luminance_1.default(color1), luminance2 = luminance_1.default(color2), max = Math.max(luminance1, luminance2), min = Math.min(luminance1, luminance2), ratio = (max + Number.EPSILON) / (min + Number.EPSILON);\n    return utils_1.default.lang.round(utils_1.default.lang.clamp(ratio, 1, 10));\n}\n/* EXPORT */\nexports.default = contrast;\n\n\n/***/ }),\n\n/***/ \"./node_modules/khroma/dist/methods/darken.js\":\n/*!****************************************************!*\\\n  !*** ./node_modules/khroma/dist/methods/darken.js ***!\n  \\****************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/* IMPORT */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar adjust_channel_1 = __webpack_require__(/*! ./adjust_channel */ \"./node_modules/khroma/dist/methods/adjust_channel.js\");\n/* DARKEN */\nfunction darken(color, amount) {\n    return adjust_channel_1.default(color, 'l', -amount);\n}\n/* EXPORT */\nexports.default = darken;\n\n\n/***/ }),\n\n/***/ \"./node_modules/khroma/dist/methods/desaturate.js\":\n/*!********************************************************!*\\\n  !*** ./node_modules/khroma/dist/methods/desaturate.js ***!\n  \\********************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/* IMPORT */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar adjust_channel_1 = __webpack_require__(/*! ./adjust_channel */ \"./node_modules/khroma/dist/methods/adjust_channel.js\");\n/* DESATURATE */\nfunction desaturate(color, amount) {\n    return adjust_channel_1.default(color, 's', -amount);\n}\n/* EXPORT */\nexports.default = desaturate;\n\n\n/***/ }),\n\n/***/ \"./node_modules/khroma/dist/methods/grayscale.js\":\n/*!*******************************************************!*\\\n  !*** ./node_modules/khroma/dist/methods/grayscale.js ***!\n  \\*******************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/* IMPORT */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar change_1 = __webpack_require__(/*! ./change */ \"./node_modules/khroma/dist/methods/change.js\");\n/* GRAYSCALE */\nfunction grayscale(color) {\n    return change_1.default(color, { s: 0 });\n}\n/* EXPORT */\nexports.default = grayscale;\n\n\n/***/ }),\n\n/***/ \"./node_modules/khroma/dist/methods/green.js\":\n/*!***************************************************!*\\\n  !*** ./node_modules/khroma/dist/methods/green.js ***!\n  \\***************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/* IMPORT */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar channel_1 = __webpack_require__(/*! ./channel */ \"./node_modules/khroma/dist/methods/channel.js\");\n/* GREEN */\nfunction green(color) {\n    return channel_1.default(color, 'g');\n}\n/* EXPORT */\nexports.default = green;\n\n\n/***/ }),\n\n/***/ \"./node_modules/khroma/dist/methods/hsla.js\":\n/*!**************************************************!*\\\n  !*** ./node_modules/khroma/dist/methods/hsla.js ***!\n  \\**************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/* IMPORT */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar utils_1 = __webpack_require__(/*! ../utils */ \"./node_modules/khroma/dist/utils/index.js\");\nvar reusable_1 = __webpack_require__(/*! ../channels/reusable */ \"./node_modules/khroma/dist/channels/reusable.js\");\nvar color_1 = __webpack_require__(/*! ../color */ \"./node_modules/khroma/dist/color/index.js\");\n/* HSLA */\nfunction hsla(h, s, l, a) {\n    if (a === void 0) { a = 1; }\n    var channels = reusable_1.default.set({\n        h: utils_1.default.channel.clamp.h(h),\n        s: utils_1.default.channel.clamp.s(s),\n        l: utils_1.default.channel.clamp.l(l),\n        a: utils_1.default.channel.clamp.a(a)\n    });\n    return color_1.default.stringify(channels);\n}\n/* EXPORT */\nexports.default = hsla;\n\n\n/***/ }),\n\n/***/ \"./node_modules/khroma/dist/methods/hue.js\":\n/*!*************************************************!*\\\n  !*** ./node_modules/khroma/dist/methods/hue.js ***!\n  \\*************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/* IMPORT */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar channel_1 = __webpack_require__(/*! ./channel */ \"./node_modules/khroma/dist/methods/channel.js\");\n/* HUE */\nfunction hue(color) {\n    return channel_1.default(color, 'h');\n}\n/* EXPORT */\nexports.default = hue;\n\n\n/***/ }),\n\n/***/ \"./node_modules/khroma/dist/methods/index.js\":\n/*!***************************************************!*\\\n  !*** ./node_modules/khroma/dist/methods/index.js ***!\n  \\***************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/* IMPORT */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar rgba_1 = __webpack_require__(/*! ./rgba */ \"./node_modules/khroma/dist/methods/rgba.js\"); // Alias\nexports.hex = rgba_1.default;\nvar rgba_2 = __webpack_require__(/*! ./rgba */ \"./node_modules/khroma/dist/methods/rgba.js\"); // Alias\nexports.rgb = rgba_2.default;\nvar rgba_3 = __webpack_require__(/*! ./rgba */ \"./node_modules/khroma/dist/methods/rgba.js\");\nexports.rgba = rgba_3.default;\nvar hsla_1 = __webpack_require__(/*! ./hsla */ \"./node_modules/khroma/dist/methods/hsla.js\"); // Alias\nexports.hsl = hsla_1.default;\nvar hsla_2 = __webpack_require__(/*! ./hsla */ \"./node_modules/khroma/dist/methods/hsla.js\");\nexports.hsla = hsla_2.default;\nvar to_keyword_1 = __webpack_require__(/*! ./to_keyword */ \"./node_modules/khroma/dist/methods/to_keyword.js\");\nexports.toKeyword = to_keyword_1.default;\nvar to_hex_1 = __webpack_require__(/*! ./to_hex */ \"./node_modules/khroma/dist/methods/to_hex.js\");\nexports.toHex = to_hex_1.default;\nvar to_rgba_1 = __webpack_require__(/*! ./to_rgba */ \"./node_modules/khroma/dist/methods/to_rgba.js\");\nexports.toRgba = to_rgba_1.default;\nvar to_hsla_1 = __webpack_require__(/*! ./to_hsla */ \"./node_modules/khroma/dist/methods/to_hsla.js\");\nexports.toHsla = to_hsla_1.default;\nvar channel_1 = __webpack_require__(/*! ./channel */ \"./node_modules/khroma/dist/methods/channel.js\");\nexports.channel = channel_1.default;\nvar red_1 = __webpack_require__(/*! ./red */ \"./node_modules/khroma/dist/methods/red.js\");\nexports.red = red_1.default;\nvar green_1 = __webpack_require__(/*! ./green */ \"./node_modules/khroma/dist/methods/green.js\");\nexports.green = green_1.default;\nvar blue_1 = __webpack_require__(/*! ./blue */ \"./node_modules/khroma/dist/methods/blue.js\");\nexports.blue = blue_1.default;\nvar hue_1 = __webpack_require__(/*! ./hue */ \"./node_modules/khroma/dist/methods/hue.js\");\nexports.hue = hue_1.default;\nvar saturation_1 = __webpack_require__(/*! ./saturation */ \"./node_modules/khroma/dist/methods/saturation.js\");\nexports.saturation = saturation_1.default;\nvar lightness_1 = __webpack_require__(/*! ./lightness */ \"./node_modules/khroma/dist/methods/lightness.js\");\nexports.lightness = lightness_1.default;\nvar alpha_1 = __webpack_require__(/*! ./alpha */ \"./node_modules/khroma/dist/methods/alpha.js\");\nexports.alpha = alpha_1.default;\nvar alpha_2 = __webpack_require__(/*! ./alpha */ \"./node_modules/khroma/dist/methods/alpha.js\"); // Alias\nexports.opacity = alpha_2.default;\nvar contrast_1 = __webpack_require__(/*! ./contrast */ \"./node_modules/khroma/dist/methods/contrast.js\");\nexports.contrast = contrast_1.default;\nvar luminance_1 = __webpack_require__(/*! ./luminance */ \"./node_modules/khroma/dist/methods/luminance.js\");\nexports.luminance = luminance_1.default;\nvar is_dark_1 = __webpack_require__(/*! ./is_dark */ \"./node_modules/khroma/dist/methods/is_dark.js\");\nexports.isDark = is_dark_1.default;\nvar is_light_1 = __webpack_require__(/*! ./is_light */ \"./node_modules/khroma/dist/methods/is_light.js\");\nexports.isLight = is_light_1.default;\nvar is_valid_1 = __webpack_require__(/*! ./is_valid */ \"./node_modules/khroma/dist/methods/is_valid.js\");\nexports.isValid = is_valid_1.default;\nvar saturate_1 = __webpack_require__(/*! ./saturate */ \"./node_modules/khroma/dist/methods/saturate.js\");\nexports.saturate = saturate_1.default;\nvar desaturate_1 = __webpack_require__(/*! ./desaturate */ \"./node_modules/khroma/dist/methods/desaturate.js\");\nexports.desaturate = desaturate_1.default;\nvar lighten_1 = __webpack_require__(/*! ./lighten */ \"./node_modules/khroma/dist/methods/lighten.js\");\nexports.lighten = lighten_1.default;\nvar darken_1 = __webpack_require__(/*! ./darken */ \"./node_modules/khroma/dist/methods/darken.js\");\nexports.darken = darken_1.default;\nvar opacify_1 = __webpack_require__(/*! ./opacify */ \"./node_modules/khroma/dist/methods/opacify.js\");\nexports.opacify = opacify_1.default;\nvar opacify_2 = __webpack_require__(/*! ./opacify */ \"./node_modules/khroma/dist/methods/opacify.js\"); // Alias\nexports.fadeIn = opacify_2.default;\nvar transparentize_1 = __webpack_require__(/*! ./transparentize */ \"./node_modules/khroma/dist/methods/transparentize.js\");\nexports.transparentize = transparentize_1.default;\nvar transparentize_2 = __webpack_require__(/*! ./transparentize */ \"./node_modules/khroma/dist/methods/transparentize.js\"); // Alias\nexports.fadeOut = transparentize_2.default;\nvar complement_1 = __webpack_require__(/*! ./complement */ \"./node_modules/khroma/dist/methods/complement.js\");\nexports.complement = complement_1.default;\nvar grayscale_1 = __webpack_require__(/*! ./grayscale */ \"./node_modules/khroma/dist/methods/grayscale.js\");\nexports.grayscale = grayscale_1.default;\nvar adjust_1 = __webpack_require__(/*! ./adjust */ \"./node_modules/khroma/dist/methods/adjust.js\");\nexports.adjust = adjust_1.default;\nvar change_1 = __webpack_require__(/*! ./change */ \"./node_modules/khroma/dist/methods/change.js\");\nexports.change = change_1.default;\nvar invert_1 = __webpack_require__(/*! ./invert */ \"./node_modules/khroma/dist/methods/invert.js\");\nexports.invert = invert_1.default;\nvar mix_1 = __webpack_require__(/*! ./mix */ \"./node_modules/khroma/dist/methods/mix.js\");\nexports.mix = mix_1.default;\nvar scale_1 = __webpack_require__(/*! ./scale */ \"./node_modules/khroma/dist/methods/scale.js\");\nexports.scale = scale_1.default;\n\n\n/***/ }),\n\n/***/ \"./node_modules/khroma/dist/methods/invert.js\":\n/*!****************************************************!*\\\n  !*** ./node_modules/khroma/dist/methods/invert.js ***!\n  \\****************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/* IMPORT */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar color_1 = __webpack_require__(/*! ../color */ \"./node_modules/khroma/dist/color/index.js\");\nvar mix_1 = __webpack_require__(/*! ./mix */ \"./node_modules/khroma/dist/methods/mix.js\");\n/* INVERT */\nfunction invert(color, weight) {\n    if (weight === void 0) { weight = 100; }\n    var inverse = color_1.default.parse(color);\n    inverse.r = 255 - inverse.r;\n    inverse.g = 255 - inverse.g;\n    inverse.b = 255 - inverse.b;\n    return mix_1.default(inverse, color, weight);\n}\n/* EXPORT */\nexports.default = invert;\n\n\n/***/ }),\n\n/***/ \"./node_modules/khroma/dist/methods/is_dark.js\":\n/*!*****************************************************!*\\\n  !*** ./node_modules/khroma/dist/methods/is_dark.js ***!\n  \\*****************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/* IMPORT */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar is_light_1 = __webpack_require__(/*! ./is_light */ \"./node_modules/khroma/dist/methods/is_light.js\");\n/* IS DARK */\nfunction isDark(color) {\n    return !is_light_1.default(color);\n}\n/* EXPORT */\nexports.default = isDark;\n\n\n/***/ }),\n\n/***/ \"./node_modules/khroma/dist/methods/is_light.js\":\n/*!******************************************************!*\\\n  !*** ./node_modules/khroma/dist/methods/is_light.js ***!\n  \\******************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/* IMPORT */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar luminance_1 = __webpack_require__(/*! ./luminance */ \"./node_modules/khroma/dist/methods/luminance.js\");\n/* IS LIGHT */\nfunction isLight(color) {\n    return luminance_1.default(color) >= .5;\n}\n/* EXPORT */\nexports.default = isLight;\n\n\n/***/ }),\n\n/***/ \"./node_modules/khroma/dist/methods/is_valid.js\":\n/*!******************************************************!*\\\n  !*** ./node_modules/khroma/dist/methods/is_valid.js ***!\n  \\******************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/* IMPORT */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar color_1 = __webpack_require__(/*! ../color */ \"./node_modules/khroma/dist/color/index.js\");\n/* IS VALID */\nfunction isValid(color) {\n    try {\n        color_1.default.parse(color);\n        return true;\n    }\n    catch (_a) {\n        return false;\n    }\n}\n/* EXPORT */\nexports.default = isValid;\n\n\n/***/ }),\n\n/***/ \"./node_modules/khroma/dist/methods/lighten.js\":\n/*!*****************************************************!*\\\n  !*** ./node_modules/khroma/dist/methods/lighten.js ***!\n  \\*****************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/* IMPORT */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar adjust_channel_1 = __webpack_require__(/*! ./adjust_channel */ \"./node_modules/khroma/dist/methods/adjust_channel.js\");\n/* LIGHTEN */\nfunction lighten(color, amount) {\n    return adjust_channel_1.default(color, 'l', amount);\n}\n/* EXPORT */\nexports.default = lighten;\n\n\n/***/ }),\n\n/***/ \"./node_modules/khroma/dist/methods/lightness.js\":\n/*!*******************************************************!*\\\n  !*** ./node_modules/khroma/dist/methods/lightness.js ***!\n  \\*******************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/* IMPORT */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar channel_1 = __webpack_require__(/*! ./channel */ \"./node_modules/khroma/dist/methods/channel.js\");\n/* LIGHTNESS */\nfunction lightness(color) {\n    return channel_1.default(color, 'l');\n}\n/* EXPORT */\nexports.default = lightness;\n\n\n/***/ }),\n\n/***/ \"./node_modules/khroma/dist/methods/luminance.js\":\n/*!*******************************************************!*\\\n  !*** ./node_modules/khroma/dist/methods/luminance.js ***!\n  \\*******************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/* IMPORT */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar utils_1 = __webpack_require__(/*! ../utils */ \"./node_modules/khroma/dist/utils/index.js\");\nvar color_1 = __webpack_require__(/*! ../color */ \"./node_modules/khroma/dist/color/index.js\");\n/* LUMINANCE */\n//SOURCE: https://planetcalc.com/7779\nfunction luminance(color) {\n    var _a = color_1.default.parse(color), r = _a.r, g = _a.g, b = _a.b, luminance = .2126 * utils_1.default.channel.toLinear(r) + .7152 * utils_1.default.channel.toLinear(g) + .0722 * utils_1.default.channel.toLinear(b);\n    return utils_1.default.lang.round(luminance);\n}\n/* EXPORT */\nexports.default = luminance;\n\n\n/***/ }),\n\n/***/ \"./node_modules/khroma/dist/methods/mix.js\":\n/*!*************************************************!*\\\n  !*** ./node_modules/khroma/dist/methods/mix.js ***!\n  \\*************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/* IMPORT */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar color_1 = __webpack_require__(/*! ../color */ \"./node_modules/khroma/dist/color/index.js\");\nvar rgba_1 = __webpack_require__(/*! ./rgba */ \"./node_modules/khroma/dist/methods/rgba.js\");\n/* MIX */\n//SOURCE: https://github.com/sass/dart-sass/blob/7457d2e9e7e623d9844ffd037a070cf32d39c348/lib/src/functions/color.dart#L718-L756\nfunction mix(color1, color2, weight) {\n    if (weight === void 0) { weight = 50; }\n    var _a = color_1.default.parse(color1), r1 = _a.r, g1 = _a.g, b1 = _a.b, a1 = _a.a, _b = color_1.default.parse(color2), r2 = _b.r, g2 = _b.g, b2 = _b.b, a2 = _b.a, weightScale = weight / 100, weightNormalized = (weightScale * 2) - 1, alphaDelta = a1 - a2, weight1combined = ((weightNormalized * alphaDelta) === -1) ? weightNormalized : (weightNormalized + alphaDelta) / (1 + weightNormalized * alphaDelta), weight1 = (weight1combined + 1) / 2, weight2 = 1 - weight1, r = (r1 * weight1) + (r2 * weight2), g = (g1 * weight1) + (g2 * weight2), b = (b1 * weight1) + (b2 * weight2), a = (a1 * weightScale) + (a2 * (1 - weightScale));\n    return rgba_1.default(r, g, b, a);\n}\n/* EXPORT */\nexports.default = mix;\n\n\n/***/ }),\n\n/***/ \"./node_modules/khroma/dist/methods/opacify.js\":\n/*!*****************************************************!*\\\n  !*** ./node_modules/khroma/dist/methods/opacify.js ***!\n  \\*****************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/* IMPORT */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar adjust_channel_1 = __webpack_require__(/*! ./adjust_channel */ \"./node_modules/khroma/dist/methods/adjust_channel.js\");\n/* OPACIFY */\nfunction opacify(color, amount) {\n    return adjust_channel_1.default(color, 'a', amount);\n}\n/* EXPORT */\nexports.default = opacify;\n\n\n/***/ }),\n\n/***/ \"./node_modules/khroma/dist/methods/red.js\":\n/*!*************************************************!*\\\n  !*** ./node_modules/khroma/dist/methods/red.js ***!\n  \\*************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/* IMPORT */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar channel_1 = __webpack_require__(/*! ./channel */ \"./node_modules/khroma/dist/methods/channel.js\");\n/* RED */\nfunction red(color) {\n    return channel_1.default(color, 'r');\n}\n/* EXPORT */\nexports.default = red;\n\n\n/***/ }),\n\n/***/ \"./node_modules/khroma/dist/methods/rgba.js\":\n/*!**************************************************!*\\\n  !*** ./node_modules/khroma/dist/methods/rgba.js ***!\n  \\**************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/* IMPORT */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar utils_1 = __webpack_require__(/*! ../utils */ \"./node_modules/khroma/dist/utils/index.js\");\nvar reusable_1 = __webpack_require__(/*! ../channels/reusable */ \"./node_modules/khroma/dist/channels/reusable.js\");\nvar color_1 = __webpack_require__(/*! ../color */ \"./node_modules/khroma/dist/color/index.js\");\nvar change_1 = __webpack_require__(/*! ./change */ \"./node_modules/khroma/dist/methods/change.js\");\nfunction rgba(r, g, b, a) {\n    if (b === void 0) { b = 0; }\n    if (a === void 0) { a = 1; }\n    if (typeof r !== 'number')\n        return change_1.default(r, { a: g });\n    var channels = reusable_1.default.set({\n        r: utils_1.default.channel.clamp.r(r),\n        g: utils_1.default.channel.clamp.g(g),\n        b: utils_1.default.channel.clamp.b(b),\n        a: utils_1.default.channel.clamp.a(a)\n    });\n    return color_1.default.stringify(channels);\n}\n/* EXPORT */\nexports.default = rgba;\n\n\n/***/ }),\n\n/***/ \"./node_modules/khroma/dist/methods/saturate.js\":\n/*!******************************************************!*\\\n  !*** ./node_modules/khroma/dist/methods/saturate.js ***!\n  \\******************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/* IMPORT */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar adjust_channel_1 = __webpack_require__(/*! ./adjust_channel */ \"./node_modules/khroma/dist/methods/adjust_channel.js\");\n/* SATURATE */\nfunction saturate(color, amount) {\n    return adjust_channel_1.default(color, 's', amount);\n}\n/* EXPORT */\nexports.default = saturate;\n\n\n/***/ }),\n\n/***/ \"./node_modules/khroma/dist/methods/saturation.js\":\n/*!********************************************************!*\\\n  !*** ./node_modules/khroma/dist/methods/saturation.js ***!\n  \\********************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/* IMPORT */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar channel_1 = __webpack_require__(/*! ./channel */ \"./node_modules/khroma/dist/methods/channel.js\");\n/* SATURATION */\nfunction saturation(color) {\n    return channel_1.default(color, 's');\n}\n/* EXPORT */\nexports.default = saturation;\n\n\n/***/ }),\n\n/***/ \"./node_modules/khroma/dist/methods/scale.js\":\n/*!***************************************************!*\\\n  !*** ./node_modules/khroma/dist/methods/scale.js ***!\n  \\***************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/* IMPORT */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar utils_1 = __webpack_require__(/*! ../utils */ \"./node_modules/khroma/dist/utils/index.js\");\nvar color_1 = __webpack_require__(/*! ../color */ \"./node_modules/khroma/dist/color/index.js\");\nvar adjust_1 = __webpack_require__(/*! ./adjust */ \"./node_modules/khroma/dist/methods/adjust.js\");\n/* SCALE */\nfunction scale(color, channels) {\n    var ch = color_1.default.parse(color), adjustments = {}, delta = function (amount, weight, max) { return weight > 0 ? (max - amount) * weight / 100 : amount * weight / 100; };\n    for (var c in channels) {\n        adjustments[c] = delta(ch[c], channels[c], utils_1.default.channel.max[c]);\n    }\n    return adjust_1.default(color, adjustments);\n}\n/* EXPORT */\nexports.default = scale;\n\n\n/***/ }),\n\n/***/ \"./node_modules/khroma/dist/methods/to_hex.js\":\n/*!****************************************************!*\\\n  !*** ./node_modules/khroma/dist/methods/to_hex.js ***!\n  \\****************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/* IMPORT */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar color_1 = __webpack_require__(/*! ../color */ \"./node_modules/khroma/dist/color/index.js\");\n/* TO HEX */\nfunction toHex(color) {\n    return color_1.default.format.hex.stringify(color_1.default.parse(color));\n}\n/* EXPORT */\nexports.default = toHex;\n\n\n/***/ }),\n\n/***/ \"./node_modules/khroma/dist/methods/to_hsla.js\":\n/*!*****************************************************!*\\\n  !*** ./node_modules/khroma/dist/methods/to_hsla.js ***!\n  \\*****************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/* IMPORT */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar color_1 = __webpack_require__(/*! ../color */ \"./node_modules/khroma/dist/color/index.js\");\n/* TO HSLA */\nfunction toHsla(color) {\n    return color_1.default.format.hsla.stringify(color_1.default.parse(color));\n}\n/* EXPORT */\nexports.default = toHsla;\n\n\n/***/ }),\n\n/***/ \"./node_modules/khroma/dist/methods/to_keyword.js\":\n/*!********************************************************!*\\\n  !*** ./node_modules/khroma/dist/methods/to_keyword.js ***!\n  \\********************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/* IMPORT */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar color_1 = __webpack_require__(/*! ../color */ \"./node_modules/khroma/dist/color/index.js\");\n/* TO KEYWORD */\nfunction toKeyword(color) {\n    return color_1.default.format.keyword.stringify(color_1.default.parse(color));\n}\n/* EXPORT */\nexports.default = toKeyword;\n\n\n/***/ }),\n\n/***/ \"./node_modules/khroma/dist/methods/to_rgba.js\":\n/*!*****************************************************!*\\\n  !*** ./node_modules/khroma/dist/methods/to_rgba.js ***!\n  \\*****************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/* IMPORT */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar color_1 = __webpack_require__(/*! ../color */ \"./node_modules/khroma/dist/color/index.js\");\n/* TO RGBA */\nfunction toRgba(color) {\n    return color_1.default.format.rgba.stringify(color_1.default.parse(color));\n}\n/* EXPORT */\nexports.default = toRgba;\n\n\n/***/ }),\n\n/***/ \"./node_modules/khroma/dist/methods/transparentize.js\":\n/*!************************************************************!*\\\n  !*** ./node_modules/khroma/dist/methods/transparentize.js ***!\n  \\************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/* IMPORT */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar adjust_channel_1 = __webpack_require__(/*! ./adjust_channel */ \"./node_modules/khroma/dist/methods/adjust_channel.js\");\n/* TRANSPARENTIZE */\nfunction transparentize(color, amount) {\n    return adjust_channel_1.default(color, 'a', -amount);\n}\n/* EXPORT */\nexports.default = transparentize;\n\n\n/***/ }),\n\n/***/ \"./node_modules/khroma/dist/utils/channel.js\":\n/*!***************************************************!*\\\n  !*** ./node_modules/khroma/dist/utils/channel.js ***!\n  \\***************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/* IMPORT */\nObject.defineProperty(exports, \"__esModule\", { value: true });\n/* CHANNEL */\nvar Channel = {\n    /* CLAMP */\n    min: {\n        r: 0,\n        g: 0,\n        b: 0,\n        s: 0,\n        l: 0,\n        a: 0\n    },\n    max: {\n        r: 255,\n        g: 255,\n        b: 255,\n        h: 360,\n        s: 100,\n        l: 100,\n        a: 1\n    },\n    clamp: {\n        r: function (r) { return r >= 255 ? 255 : (r < 0 ? 0 : r); },\n        g: function (g) { return g >= 255 ? 255 : (g < 0 ? 0 : g); },\n        b: function (b) { return b >= 255 ? 255 : (b < 0 ? 0 : b); },\n        h: function (h) { return h % 360; },\n        s: function (s) { return s >= 100 ? 100 : (s < 0 ? 0 : s); },\n        l: function (l) { return l >= 100 ? 100 : (l < 0 ? 0 : l); },\n        a: function (a) { return a >= 1 ? 1 : (a < 0 ? 0 : a); }\n    },\n    /* CONVERSION */\n    //SOURCE: https://planetcalc.com/7779\n    toLinear: function (c) {\n        var n = c / 255;\n        return c > .03928 ? Math.pow(((n + .055) / 1.055), 2.4) : n / 12.92;\n    },\n    //SOURCE: https://gist.github.com/mjackson/5311256\n    hue2rgb: function (p, q, t) {\n        if (t < 0)\n            t += 1;\n        if (t > 1)\n            t -= 1;\n        if (t < 1 / 6)\n            return p + (q - p) * 6 * t;\n        if (t < 1 / 2)\n            return q;\n        if (t < 2 / 3)\n            return p + (q - p) * (2 / 3 - t) * 6;\n        return p;\n    },\n    hsl2rgb: function (_a, channel) {\n        var h = _a.h, s = _a.s, l = _a.l;\n        if (!s)\n            return l * 2.55; // Achromatic\n        h /= 360;\n        s /= 100;\n        l /= 100;\n        var q = (l < .5) ? l * (1 + s) : (l + s) - (l * s), p = 2 * l - q;\n        switch (channel) {\n            case 'r': return Channel.hue2rgb(p, q, h + 1 / 3) * 255;\n            case 'g': return Channel.hue2rgb(p, q, h) * 255;\n            case 'b': return Channel.hue2rgb(p, q, h - 1 / 3) * 255;\n        }\n    },\n    rgb2hsl: function (_a, channel) {\n        var r = _a.r, g = _a.g, b = _a.b;\n        r /= 255;\n        g /= 255;\n        b /= 255;\n        var max = Math.max(r, g, b), min = Math.min(r, g, b), l = (max + min) / 2;\n        if (channel === 'l')\n            return l * 100;\n        if (max === min)\n            return 0; // Achromatic\n        var d = max - min, s = (l > .5) ? d / (2 - max - min) : d / (max + min);\n        if (channel === 's')\n            return s * 100;\n        switch (max) {\n            case r: return ((g - b) / d + (g < b ? 6 : 0)) * 60;\n            case g: return ((b - r) / d + 2) * 60;\n            case b: return ((r - g) / d + 4) * 60;\n            default: return -1; //TSC: TypeScript is stupid and complains if there isn't this useless default statement\n        }\n    }\n};\n/* EXPORT */\nexports.default = Channel;\n\n\n/***/ }),\n\n/***/ \"./node_modules/khroma/dist/utils/index.js\":\n/*!*************************************************!*\\\n  !*** ./node_modules/khroma/dist/utils/index.js ***!\n  \\*************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/* IMPORT */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar channel_1 = __webpack_require__(/*! ./channel */ \"./node_modules/khroma/dist/utils/channel.js\");\nvar lang_1 = __webpack_require__(/*! ./lang */ \"./node_modules/khroma/dist/utils/lang.js\");\nvar unit_1 = __webpack_require__(/*! ./unit */ \"./node_modules/khroma/dist/utils/unit.js\");\n/* UTILS */\nvar Utils = {\n    channel: channel_1.default,\n    lang: lang_1.default,\n    unit: unit_1.default\n};\n/* EXPORT */\nexports.default = Utils;\n\n\n/***/ }),\n\n/***/ \"./node_modules/khroma/dist/utils/lang.js\":\n/*!************************************************!*\\\n  !*** ./node_modules/khroma/dist/utils/lang.js ***!\n  \\************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/* LANG */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Lang = {\n    clamp: function (number, lower, upper) {\n        if (lower > upper)\n            return Math.min(lower, Math.max(upper, number));\n        return Math.min(upper, Math.max(lower, number));\n    },\n    round: function (number) {\n        return Math.round(number * 10000000000) / 10000000000;\n    }\n};\n/* EXPORT */\nexports.default = Lang;\n\n\n/***/ }),\n\n/***/ \"./node_modules/khroma/dist/utils/unit.js\":\n/*!************************************************!*\\\n  !*** ./node_modules/khroma/dist/utils/unit.js ***!\n  \\************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/* UNIT */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Unit = {\n    dec2hex: function (dec) {\n        var hex = Math.round(dec).toString(16);\n        return hex.length > 1 ? hex : \"0\" + hex;\n    }\n};\n/* EXPORT */\nexports.default = Unit;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/_DataView.js\":\n/*!******************************************!*\\\n  !*** ./node_modules/lodash/_DataView.js ***!\n  \\******************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar getNative = __webpack_require__(/*! ./_getNative */ \"./node_modules/lodash/_getNative.js\"),\n    root = __webpack_require__(/*! ./_root */ \"./node_modules/lodash/_root.js\");\n\n/* Built-in method references that are verified to be native. */\nvar DataView = getNative(root, 'DataView');\n\nmodule.exports = DataView;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/_Hash.js\":\n/*!**************************************!*\\\n  !*** ./node_modules/lodash/_Hash.js ***!\n  \\**************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar hashClear = __webpack_require__(/*! ./_hashClear */ \"./node_modules/lodash/_hashClear.js\"),\n    hashDelete = __webpack_require__(/*! ./_hashDelete */ \"./node_modules/lodash/_hashDelete.js\"),\n    hashGet = __webpack_require__(/*! ./_hashGet */ \"./node_modules/lodash/_hashGet.js\"),\n    hashHas = __webpack_require__(/*! ./_hashHas */ \"./node_modules/lodash/_hashHas.js\"),\n    hashSet = __webpack_require__(/*! ./_hashSet */ \"./node_modules/lodash/_hashSet.js\");\n\n/**\n * Creates a hash object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Hash(entries) {\n  var index = -1,\n      length = entries == null ? 0 : entries.length;\n\n  this.clear();\n  while (++index < length) {\n    var entry = entries[index];\n    this.set(entry[0], entry[1]);\n  }\n}\n\n// Add methods to `Hash`.\nHash.prototype.clear = hashClear;\nHash.prototype['delete'] = hashDelete;\nHash.prototype.get = hashGet;\nHash.prototype.has = hashHas;\nHash.prototype.set = hashSet;\n\nmodule.exports = Hash;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/_ListCache.js\":\n/*!*******************************************!*\\\n  !*** ./node_modules/lodash/_ListCache.js ***!\n  \\*******************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar listCacheClear = __webpack_require__(/*! ./_listCacheClear */ \"./node_modules/lodash/_listCacheClear.js\"),\n    listCacheDelete = __webpack_require__(/*! ./_listCacheDelete */ \"./node_modules/lodash/_listCacheDelete.js\"),\n    listCacheGet = __webpack_require__(/*! ./_listCacheGet */ \"./node_modules/lodash/_listCacheGet.js\"),\n    listCacheHas = __webpack_require__(/*! ./_listCacheHas */ \"./node_modules/lodash/_listCacheHas.js\"),\n    listCacheSet = __webpack_require__(/*! ./_listCacheSet */ \"./node_modules/lodash/_listCacheSet.js\");\n\n/**\n * Creates an list cache object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction ListCache(entries) {\n  var index = -1,\n      length = entries == null ? 0 : entries.length;\n\n  this.clear();\n  while (++index < length) {\n    var entry = entries[index];\n    this.set(entry[0], entry[1]);\n  }\n}\n\n// Add methods to `ListCache`.\nListCache.prototype.clear = listCacheClear;\nListCache.prototype['delete'] = listCacheDelete;\nListCache.prototype.get = listCacheGet;\nListCache.prototype.has = listCacheHas;\nListCache.prototype.set = listCacheSet;\n\nmodule.exports = ListCache;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/_Map.js\":\n/*!*************************************!*\\\n  !*** ./node_modules/lodash/_Map.js ***!\n  \\*************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar getNative = __webpack_require__(/*! ./_getNative */ \"./node_modules/lodash/_getNative.js\"),\n    root = __webpack_require__(/*! ./_root */ \"./node_modules/lodash/_root.js\");\n\n/* Built-in method references that are verified to be native. */\nvar Map = getNative(root, 'Map');\n\nmodule.exports = Map;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/_MapCache.js\":\n/*!******************************************!*\\\n  !*** ./node_modules/lodash/_MapCache.js ***!\n  \\******************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar mapCacheClear = __webpack_require__(/*! ./_mapCacheClear */ \"./node_modules/lodash/_mapCacheClear.js\"),\n    mapCacheDelete = __webpack_require__(/*! ./_mapCacheDelete */ \"./node_modules/lodash/_mapCacheDelete.js\"),\n    mapCacheGet = __webpack_require__(/*! ./_mapCacheGet */ \"./node_modules/lodash/_mapCacheGet.js\"),\n    mapCacheHas = __webpack_require__(/*! ./_mapCacheHas */ \"./node_modules/lodash/_mapCacheHas.js\"),\n    mapCacheSet = __webpack_require__(/*! ./_mapCacheSet */ \"./node_modules/lodash/_mapCacheSet.js\");\n\n/**\n * Creates a map cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction MapCache(entries) {\n  var index = -1,\n      length = entries == null ? 0 : entries.length;\n\n  this.clear();\n  while (++index < length) {\n    var entry = entries[index];\n    this.set(entry[0], entry[1]);\n  }\n}\n\n// Add methods to `MapCache`.\nMapCache.prototype.clear = mapCacheClear;\nMapCache.prototype['delete'] = mapCacheDelete;\nMapCache.prototype.get = mapCacheGet;\nMapCache.prototype.has = mapCacheHas;\nMapCache.prototype.set = mapCacheSet;\n\nmodule.exports = MapCache;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/_Promise.js\":\n/*!*****************************************!*\\\n  !*** ./node_modules/lodash/_Promise.js ***!\n  \\*****************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar getNative = __webpack_require__(/*! ./_getNative */ \"./node_modules/lodash/_getNative.js\"),\n    root = __webpack_require__(/*! ./_root */ \"./node_modules/lodash/_root.js\");\n\n/* Built-in method references that are verified to be native. */\nvar Promise = getNative(root, 'Promise');\n\nmodule.exports = Promise;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/_Set.js\":\n/*!*************************************!*\\\n  !*** ./node_modules/lodash/_Set.js ***!\n  \\*************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar getNative = __webpack_require__(/*! ./_getNative */ \"./node_modules/lodash/_getNative.js\"),\n    root = __webpack_require__(/*! ./_root */ \"./node_modules/lodash/_root.js\");\n\n/* Built-in method references that are verified to be native. */\nvar Set = getNative(root, 'Set');\n\nmodule.exports = Set;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/_SetCache.js\":\n/*!******************************************!*\\\n  !*** ./node_modules/lodash/_SetCache.js ***!\n  \\******************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar MapCache = __webpack_require__(/*! ./_MapCache */ \"./node_modules/lodash/_MapCache.js\"),\n    setCacheAdd = __webpack_require__(/*! ./_setCacheAdd */ \"./node_modules/lodash/_setCacheAdd.js\"),\n    setCacheHas = __webpack_require__(/*! ./_setCacheHas */ \"./node_modules/lodash/_setCacheHas.js\");\n\n/**\n *\n * Creates an array cache object to store unique values.\n *\n * @private\n * @constructor\n * @param {Array} [values] The values to cache.\n */\nfunction SetCache(values) {\n  var index = -1,\n      length = values == null ? 0 : values.length;\n\n  this.__data__ = new MapCache;\n  while (++index < length) {\n    this.add(values[index]);\n  }\n}\n\n// Add methods to `SetCache`.\nSetCache.prototype.add = SetCache.prototype.push = setCacheAdd;\nSetCache.prototype.has = setCacheHas;\n\nmodule.exports = SetCache;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/_Stack.js\":\n/*!***************************************!*\\\n  !*** ./node_modules/lodash/_Stack.js ***!\n  \\***************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar ListCache = __webpack_require__(/*! ./_ListCache */ \"./node_modules/lodash/_ListCache.js\"),\n    stackClear = __webpack_require__(/*! ./_stackClear */ \"./node_modules/lodash/_stackClear.js\"),\n    stackDelete = __webpack_require__(/*! ./_stackDelete */ \"./node_modules/lodash/_stackDelete.js\"),\n    stackGet = __webpack_require__(/*! ./_stackGet */ \"./node_modules/lodash/_stackGet.js\"),\n    stackHas = __webpack_require__(/*! ./_stackHas */ \"./node_modules/lodash/_stackHas.js\"),\n    stackSet = __webpack_require__(/*! ./_stackSet */ \"./node_modules/lodash/_stackSet.js\");\n\n/**\n * Creates a stack cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Stack(entries) {\n  var data = this.__data__ = new ListCache(entries);\n  this.size = data.size;\n}\n\n// Add methods to `Stack`.\nStack.prototype.clear = stackClear;\nStack.prototype['delete'] = stackDelete;\nStack.prototype.get = stackGet;\nStack.prototype.has = stackHas;\nStack.prototype.set = stackSet;\n\nmodule.exports = Stack;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/_Symbol.js\":\n/*!****************************************!*\\\n  !*** ./node_modules/lodash/_Symbol.js ***!\n  \\****************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar root = __webpack_require__(/*! ./_root */ \"./node_modules/lodash/_root.js\");\n\n/** Built-in value references. */\nvar Symbol = root.Symbol;\n\nmodule.exports = Symbol;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/_Uint8Array.js\":\n/*!********************************************!*\\\n  !*** ./node_modules/lodash/_Uint8Array.js ***!\n  \\********************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar root = __webpack_require__(/*! ./_root */ \"./node_modules/lodash/_root.js\");\n\n/** Built-in value references. */\nvar Uint8Array = root.Uint8Array;\n\nmodule.exports = Uint8Array;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/_WeakMap.js\":\n/*!*****************************************!*\\\n  !*** ./node_modules/lodash/_WeakMap.js ***!\n  \\*****************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar getNative = __webpack_require__(/*! ./_getNative */ \"./node_modules/lodash/_getNative.js\"),\n    root = __webpack_require__(/*! ./_root */ \"./node_modules/lodash/_root.js\");\n\n/* Built-in method references that are verified to be native. */\nvar WeakMap = getNative(root, 'WeakMap');\n\nmodule.exports = WeakMap;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/_apply.js\":\n/*!***************************************!*\\\n  !*** ./node_modules/lodash/_apply.js ***!\n  \\***************************************/\n/*! no static exports found */\n/***/ (function(module, exports) {\n\n/**\n * A faster alternative to `Function#apply`, this function invokes `func`\n * with the `this` binding of `thisArg` and the arguments of `args`.\n *\n * @private\n * @param {Function} func The function to invoke.\n * @param {*} thisArg The `this` binding of `func`.\n * @param {Array} args The arguments to invoke `func` with.\n * @returns {*} Returns the result of `func`.\n */\nfunction apply(func, thisArg, args) {\n  switch (args.length) {\n    case 0: return func.call(thisArg);\n    case 1: return func.call(thisArg, args[0]);\n    case 2: return func.call(thisArg, args[0], args[1]);\n    case 3: return func.call(thisArg, args[0], args[1], args[2]);\n  }\n  return func.apply(thisArg, args);\n}\n\nmodule.exports = apply;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/_arrayEach.js\":\n/*!*******************************************!*\\\n  !*** ./node_modules/lodash/_arrayEach.js ***!\n  \\*******************************************/\n/*! no static exports found */\n/***/ (function(module, exports) {\n\n/**\n * A specialized version of `_.forEach` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns `array`.\n */\nfunction arrayEach(array, iteratee) {\n  var index = -1,\n      length = array == null ? 0 : array.length;\n\n  while (++index < length) {\n    if (iteratee(array[index], index, array) === false) {\n      break;\n    }\n  }\n  return array;\n}\n\nmodule.exports = arrayEach;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/_arrayFilter.js\":\n/*!*********************************************!*\\\n  !*** ./node_modules/lodash/_arrayFilter.js ***!\n  \\*********************************************/\n/*! no static exports found */\n/***/ (function(module, exports) {\n\n/**\n * A specialized version of `_.filter` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n */\nfunction arrayFilter(array, predicate) {\n  var index = -1,\n      length = array == null ? 0 : array.length,\n      resIndex = 0,\n      result = [];\n\n  while (++index < length) {\n    var value = array[index];\n    if (predicate(value, index, array)) {\n      result[resIndex++] = value;\n    }\n  }\n  return result;\n}\n\nmodule.exports = arrayFilter;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/_arrayIncludes.js\":\n/*!***********************************************!*\\\n  !*** ./node_modules/lodash/_arrayIncludes.js ***!\n  \\***********************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar baseIndexOf = __webpack_require__(/*! ./_baseIndexOf */ \"./node_modules/lodash/_baseIndexOf.js\");\n\n/**\n * A specialized version of `_.includes` for arrays without support for\n * specifying an index to search from.\n *\n * @private\n * @param {Array} [array] The array to inspect.\n * @param {*} target The value to search for.\n * @returns {boolean} Returns `true` if `target` is found, else `false`.\n */\nfunction arrayIncludes(array, value) {\n  var length = array == null ? 0 : array.length;\n  return !!length && baseIndexOf(array, value, 0) > -1;\n}\n\nmodule.exports = arrayIncludes;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/_arrayIncludesWith.js\":\n/*!***************************************************!*\\\n  !*** ./node_modules/lodash/_arrayIncludesWith.js ***!\n  \\***************************************************/\n/*! no static exports found */\n/***/ (function(module, exports) {\n\n/**\n * This function is like `arrayIncludes` except that it accepts a comparator.\n *\n * @private\n * @param {Array} [array] The array to inspect.\n * @param {*} target The value to search for.\n * @param {Function} comparator The comparator invoked per element.\n * @returns {boolean} Returns `true` if `target` is found, else `false`.\n */\nfunction arrayIncludesWith(array, value, comparator) {\n  var index = -1,\n      length = array == null ? 0 : array.length;\n\n  while (++index < length) {\n    if (comparator(value, array[index])) {\n      return true;\n    }\n  }\n  return false;\n}\n\nmodule.exports = arrayIncludesWith;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/_arrayLikeKeys.js\":\n/*!***********************************************!*\\\n  !*** ./node_modules/lodash/_arrayLikeKeys.js ***!\n  \\***********************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar baseTimes = __webpack_require__(/*! ./_baseTimes */ \"./node_modules/lodash/_baseTimes.js\"),\n    isArguments = __webpack_require__(/*! ./isArguments */ \"./node_modules/lodash/isArguments.js\"),\n    isArray = __webpack_require__(/*! ./isArray */ \"./node_modules/lodash/isArray.js\"),\n    isBuffer = __webpack_require__(/*! ./isBuffer */ \"./node_modules/lodash/isBuffer.js\"),\n    isIndex = __webpack_require__(/*! ./_isIndex */ \"./node_modules/lodash/_isIndex.js\"),\n    isTypedArray = __webpack_require__(/*! ./isTypedArray */ \"./node_modules/lodash/isTypedArray.js\");\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Creates an array of the enumerable property names of the array-like `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @param {boolean} inherited Specify returning inherited property names.\n * @returns {Array} Returns the array of property names.\n */\nfunction arrayLikeKeys(value, inherited) {\n  var isArr = isArray(value),\n      isArg = !isArr && isArguments(value),\n      isBuff = !isArr && !isArg && isBuffer(value),\n      isType = !isArr && !isArg && !isBuff && isTypedArray(value),\n      skipIndexes = isArr || isArg || isBuff || isType,\n      result = skipIndexes ? baseTimes(value.length, String) : [],\n      length = result.length;\n\n  for (var key in value) {\n    if ((inherited || hasOwnProperty.call(value, key)) &&\n        !(skipIndexes && (\n           // Safari 9 has enumerable `arguments.length` in strict mode.\n           key == 'length' ||\n           // Node.js 0.10 has enumerable non-index properties on buffers.\n           (isBuff && (key == 'offset' || key == 'parent')) ||\n           // PhantomJS 2 has enumerable non-index properties on typed arrays.\n           (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||\n           // Skip index properties.\n           isIndex(key, length)\n        ))) {\n      result.push(key);\n    }\n  }\n  return result;\n}\n\nmodule.exports = arrayLikeKeys;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/_arrayMap.js\":\n/*!******************************************!*\\\n  !*** ./node_modules/lodash/_arrayMap.js ***!\n  \\******************************************/\n/*! no static exports found */\n/***/ (function(module, exports) {\n\n/**\n * A specialized version of `_.map` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the new mapped array.\n */\nfunction arrayMap(array, iteratee) {\n  var index = -1,\n      length = array == null ? 0 : array.length,\n      result = Array(length);\n\n  while (++index < length) {\n    result[index] = iteratee(array[index], index, array);\n  }\n  return result;\n}\n\nmodule.exports = arrayMap;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/_arrayPush.js\":\n/*!*******************************************!*\\\n  !*** ./node_modules/lodash/_arrayPush.js ***!\n  \\*******************************************/\n/*! no static exports found */\n/***/ (function(module, exports) {\n\n/**\n * Appends the elements of `values` to `array`.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {Array} values The values to append.\n * @returns {Array} Returns `array`.\n */\nfunction arrayPush(array, values) {\n  var index = -1,\n      length = values.length,\n      offset = array.length;\n\n  while (++index < length) {\n    array[offset + index] = values[index];\n  }\n  return array;\n}\n\nmodule.exports = arrayPush;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/_arrayReduce.js\":\n/*!*********************************************!*\\\n  !*** ./node_modules/lodash/_arrayReduce.js ***!\n  \\*********************************************/\n/*! no static exports found */\n/***/ (function(module, exports) {\n\n/**\n * A specialized version of `_.reduce` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {*} [accumulator] The initial value.\n * @param {boolean} [initAccum] Specify using the first element of `array` as\n *  the initial value.\n * @returns {*} Returns the accumulated value.\n */\nfunction arrayReduce(array, iteratee, accumulator, initAccum) {\n  var index = -1,\n      length = array == null ? 0 : array.length;\n\n  if (initAccum && length) {\n    accumulator = array[++index];\n  }\n  while (++index < length) {\n    accumulator = iteratee(accumulator, array[index], index, array);\n  }\n  return accumulator;\n}\n\nmodule.exports = arrayReduce;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/_arraySome.js\":\n/*!*******************************************!*\\\n  !*** ./node_modules/lodash/_arraySome.js ***!\n  \\*******************************************/\n/*! no static exports found */\n/***/ (function(module, exports) {\n\n/**\n * A specialized version of `_.some` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if any element passes the predicate check,\n *  else `false`.\n */\nfunction arraySome(array, predicate) {\n  var index = -1,\n      length = array == null ? 0 : array.length;\n\n  while (++index < length) {\n    if (predicate(array[index], index, array)) {\n      return true;\n    }\n  }\n  return false;\n}\n\nmodule.exports = arraySome;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/_asciiSize.js\":\n/*!*******************************************!*\\\n  !*** ./node_modules/lodash/_asciiSize.js ***!\n  \\*******************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar baseProperty = __webpack_require__(/*! ./_baseProperty */ \"./node_modules/lodash/_baseProperty.js\");\n\n/**\n * Gets the size of an ASCII `string`.\n *\n * @private\n * @param {string} string The string inspect.\n * @returns {number} Returns the string size.\n */\nvar asciiSize = baseProperty('length');\n\nmodule.exports = asciiSize;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/_assignMergeValue.js\":\n/*!**************************************************!*\\\n  !*** ./node_modules/lodash/_assignMergeValue.js ***!\n  \\**************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar baseAssignValue = __webpack_require__(/*! ./_baseAssignValue */ \"./node_modules/lodash/_baseAssignValue.js\"),\n    eq = __webpack_require__(/*! ./eq */ \"./node_modules/lodash/eq.js\");\n\n/**\n * This function is like `assignValue` except that it doesn't assign\n * `undefined` values.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction assignMergeValue(object, key, value) {\n  if ((value !== undefined && !eq(object[key], value)) ||\n      (value === undefined && !(key in object))) {\n    baseAssignValue(object, key, value);\n  }\n}\n\nmodule.exports = assignMergeValue;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/_assignValue.js\":\n/*!*********************************************!*\\\n  !*** ./node_modules/lodash/_assignValue.js ***!\n  \\*********************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar baseAssignValue = __webpack_require__(/*! ./_baseAssignValue */ \"./node_modules/lodash/_baseAssignValue.js\"),\n    eq = __webpack_require__(/*! ./eq */ \"./node_modules/lodash/eq.js\");\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Assigns `value` to `key` of `object` if the existing value is not equivalent\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction assignValue(object, key, value) {\n  var objValue = object[key];\n  if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||\n      (value === undefined && !(key in object))) {\n    baseAssignValue(object, key, value);\n  }\n}\n\nmodule.exports = assignValue;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/_assocIndexOf.js\":\n/*!**********************************************!*\\\n  !*** ./node_modules/lodash/_assocIndexOf.js ***!\n  \\**********************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar eq = __webpack_require__(/*! ./eq */ \"./node_modules/lodash/eq.js\");\n\n/**\n * Gets the index at which the `key` is found in `array` of key-value pairs.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} key The key to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction assocIndexOf(array, key) {\n  var length = array.length;\n  while (length--) {\n    if (eq(array[length][0], key)) {\n      return length;\n    }\n  }\n  return -1;\n}\n\nmodule.exports = assocIndexOf;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/_baseAssign.js\":\n/*!********************************************!*\\\n  !*** ./node_modules/lodash/_baseAssign.js ***!\n  \\********************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar copyObject = __webpack_require__(/*! ./_copyObject */ \"./node_modules/lodash/_copyObject.js\"),\n    keys = __webpack_require__(/*! ./keys */ \"./node_modules/lodash/keys.js\");\n\n/**\n * The base implementation of `_.assign` without support for multiple sources\n * or `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @returns {Object} Returns `object`.\n */\nfunction baseAssign(object, source) {\n  return object && copyObject(source, keys(source), object);\n}\n\nmodule.exports = baseAssign;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/_baseAssignIn.js\":\n/*!**********************************************!*\\\n  !*** ./node_modules/lodash/_baseAssignIn.js ***!\n  \\**********************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar copyObject = __webpack_require__(/*! ./_copyObject */ \"./node_modules/lodash/_copyObject.js\"),\n    keysIn = __webpack_require__(/*! ./keysIn */ \"./node_modules/lodash/keysIn.js\");\n\n/**\n * The base implementation of `_.assignIn` without support for multiple sources\n * or `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @returns {Object} Returns `object`.\n */\nfunction baseAssignIn(object, source) {\n  return object && copyObject(source, keysIn(source), object);\n}\n\nmodule.exports = baseAssignIn;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/_baseAssignValue.js\":\n/*!*************************************************!*\\\n  !*** ./node_modules/lodash/_baseAssignValue.js ***!\n  \\*************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar defineProperty = __webpack_require__(/*! ./_defineProperty */ \"./node_modules/lodash/_defineProperty.js\");\n\n/**\n * The base implementation of `assignValue` and `assignMergeValue` without\n * value checks.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction baseAssignValue(object, key, value) {\n  if (key == '__proto__' && defineProperty) {\n    defineProperty(object, key, {\n      'configurable': true,\n      'enumerable': true,\n      'value': value,\n      'writable': true\n    });\n  } else {\n    object[key] = value;\n  }\n}\n\nmodule.exports = baseAssignValue;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/_baseClone.js\":\n/*!*******************************************!*\\\n  !*** ./node_modules/lodash/_baseClone.js ***!\n  \\*******************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar Stack = __webpack_require__(/*! ./_Stack */ \"./node_modules/lodash/_Stack.js\"),\n    arrayEach = __webpack_require__(/*! ./_arrayEach */ \"./node_modules/lodash/_arrayEach.js\"),\n    assignValue = __webpack_require__(/*! ./_assignValue */ \"./node_modules/lodash/_assignValue.js\"),\n    baseAssign = __webpack_require__(/*! ./_baseAssign */ \"./node_modules/lodash/_baseAssign.js\"),\n    baseAssignIn = __webpack_require__(/*! ./_baseAssignIn */ \"./node_modules/lodash/_baseAssignIn.js\"),\n    cloneBuffer = __webpack_require__(/*! ./_cloneBuffer */ \"./node_modules/lodash/_cloneBuffer.js\"),\n    copyArray = __webpack_require__(/*! ./_copyArray */ \"./node_modules/lodash/_copyArray.js\"),\n    copySymbols = __webpack_require__(/*! ./_copySymbols */ \"./node_modules/lodash/_copySymbols.js\"),\n    copySymbolsIn = __webpack_require__(/*! ./_copySymbolsIn */ \"./node_modules/lodash/_copySymbolsIn.js\"),\n    getAllKeys = __webpack_require__(/*! ./_getAllKeys */ \"./node_modules/lodash/_getAllKeys.js\"),\n    getAllKeysIn = __webpack_require__(/*! ./_getAllKeysIn */ \"./node_modules/lodash/_getAllKeysIn.js\"),\n    getTag = __webpack_require__(/*! ./_getTag */ \"./node_modules/lodash/_getTag.js\"),\n    initCloneArray = __webpack_require__(/*! ./_initCloneArray */ \"./node_modules/lodash/_initCloneArray.js\"),\n    initCloneByTag = __webpack_require__(/*! ./_initCloneByTag */ \"./node_modules/lodash/_initCloneByTag.js\"),\n    initCloneObject = __webpack_require__(/*! ./_initCloneObject */ \"./node_modules/lodash/_initCloneObject.js\"),\n    isArray = __webpack_require__(/*! ./isArray */ \"./node_modules/lodash/isArray.js\"),\n    isBuffer = __webpack_require__(/*! ./isBuffer */ \"./node_modules/lodash/isBuffer.js\"),\n    isMap = __webpack_require__(/*! ./isMap */ \"./node_modules/lodash/isMap.js\"),\n    isObject = __webpack_require__(/*! ./isObject */ \"./node_modules/lodash/isObject.js\"),\n    isSet = __webpack_require__(/*! ./isSet */ \"./node_modules/lodash/isSet.js\"),\n    keys = __webpack_require__(/*! ./keys */ \"./node_modules/lodash/keys.js\"),\n    keysIn = __webpack_require__(/*! ./keysIn */ \"./node_modules/lodash/keysIn.js\");\n\n/** Used to compose bitmasks for cloning. */\nvar CLONE_DEEP_FLAG = 1,\n    CLONE_FLAT_FLAG = 2,\n    CLONE_SYMBOLS_FLAG = 4;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n    arrayTag = '[object Array]',\n    boolTag = '[object Boolean]',\n    dateTag = '[object Date]',\n    errorTag = '[object Error]',\n    funcTag = '[object Function]',\n    genTag = '[object GeneratorFunction]',\n    mapTag = '[object Map]',\n    numberTag = '[object Number]',\n    objectTag = '[object Object]',\n    regexpTag = '[object RegExp]',\n    setTag = '[object Set]',\n    stringTag = '[object String]',\n    symbolTag = '[object Symbol]',\n    weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n    dataViewTag = '[object DataView]',\n    float32Tag = '[object Float32Array]',\n    float64Tag = '[object Float64Array]',\n    int8Tag = '[object Int8Array]',\n    int16Tag = '[object Int16Array]',\n    int32Tag = '[object Int32Array]',\n    uint8Tag = '[object Uint8Array]',\n    uint8ClampedTag = '[object Uint8ClampedArray]',\n    uint16Tag = '[object Uint16Array]',\n    uint32Tag = '[object Uint32Array]';\n\n/** Used to identify `toStringTag` values supported by `_.clone`. */\nvar cloneableTags = {};\ncloneableTags[argsTag] = cloneableTags[arrayTag] =\ncloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =\ncloneableTags[boolTag] = cloneableTags[dateTag] =\ncloneableTags[float32Tag] = cloneableTags[float64Tag] =\ncloneableTags[int8Tag] = cloneableTags[int16Tag] =\ncloneableTags[int32Tag] = cloneableTags[mapTag] =\ncloneableTags[numberTag] = cloneableTags[objectTag] =\ncloneableTags[regexpTag] = cloneableTags[setTag] =\ncloneableTags[stringTag] = cloneableTags[symbolTag] =\ncloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =\ncloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;\ncloneableTags[errorTag] = cloneableTags[funcTag] =\ncloneableTags[weakMapTag] = false;\n\n/**\n * The base implementation of `_.clone` and `_.cloneDeep` which tracks\n * traversed objects.\n *\n * @private\n * @param {*} value The value to clone.\n * @param {boolean} bitmask The bitmask flags.\n *  1 - Deep clone\n *  2 - Flatten inherited properties\n *  4 - Clone symbols\n * @param {Function} [customizer] The function to customize cloning.\n * @param {string} [key] The key of `value`.\n * @param {Object} [object] The parent object of `value`.\n * @param {Object} [stack] Tracks traversed objects and their clone counterparts.\n * @returns {*} Returns the cloned value.\n */\nfunction baseClone(value, bitmask, customizer, key, object, stack) {\n  var result,\n      isDeep = bitmask & CLONE_DEEP_FLAG,\n      isFlat = bitmask & CLONE_FLAT_FLAG,\n      isFull = bitmask & CLONE_SYMBOLS_FLAG;\n\n  if (customizer) {\n    result = object ? customizer(value, key, object, stack) : customizer(value);\n  }\n  if (result !== undefined) {\n    return result;\n  }\n  if (!isObject(value)) {\n    return value;\n  }\n  var isArr = isArray(value);\n  if (isArr) {\n    result = initCloneArray(value);\n    if (!isDeep) {\n      return copyArray(value, result);\n    }\n  } else {\n    var tag = getTag(value),\n        isFunc = tag == funcTag || tag == genTag;\n\n    if (isBuffer(value)) {\n      return cloneBuffer(value, isDeep);\n    }\n    if (tag == objectTag || tag == argsTag || (isFunc && !object)) {\n      result = (isFlat || isFunc) ? {} : initCloneObject(value);\n      if (!isDeep) {\n        return isFlat\n          ? copySymbolsIn(value, baseAssignIn(result, value))\n          : copySymbols(value, baseAssign(result, value));\n      }\n    } else {\n      if (!cloneableTags[tag]) {\n        return object ? value : {};\n      }\n      result = initCloneByTag(value, tag, isDeep);\n    }\n  }\n  // Check for circular references and return its corresponding clone.\n  stack || (stack = new Stack);\n  var stacked = stack.get(value);\n  if (stacked) {\n    return stacked;\n  }\n  stack.set(value, result);\n\n  if (isSet(value)) {\n    value.forEach(function(subValue) {\n      result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));\n    });\n  } else if (isMap(value)) {\n    value.forEach(function(subValue, key) {\n      result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack));\n    });\n  }\n\n  var keysFunc = isFull\n    ? (isFlat ? getAllKeysIn : getAllKeys)\n    : (isFlat ? keysIn : keys);\n\n  var props = isArr ? undefined : keysFunc(value);\n  arrayEach(props || value, function(subValue, key) {\n    if (props) {\n      key = subValue;\n      subValue = value[key];\n    }\n    // Recursively populate clone (susceptible to call stack limits).\n    assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack));\n  });\n  return result;\n}\n\nmodule.exports = baseClone;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/_baseCreate.js\":\n/*!********************************************!*\\\n  !*** ./node_modules/lodash/_baseCreate.js ***!\n  \\********************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar isObject = __webpack_require__(/*! ./isObject */ \"./node_modules/lodash/isObject.js\");\n\n/** Built-in value references. */\nvar objectCreate = Object.create;\n\n/**\n * The base implementation of `_.create` without support for assigning\n * properties to the created object.\n *\n * @private\n * @param {Object} proto The object to inherit from.\n * @returns {Object} Returns the new object.\n */\nvar baseCreate = (function() {\n  function object() {}\n  return function(proto) {\n    if (!isObject(proto)) {\n      return {};\n    }\n    if (objectCreate) {\n      return objectCreate(proto);\n    }\n    object.prototype = proto;\n    var result = new object;\n    object.prototype = undefined;\n    return result;\n  };\n}());\n\nmodule.exports = baseCreate;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/_baseEach.js\":\n/*!******************************************!*\\\n  !*** ./node_modules/lodash/_baseEach.js ***!\n  \\******************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar baseForOwn = __webpack_require__(/*! ./_baseForOwn */ \"./node_modules/lodash/_baseForOwn.js\"),\n    createBaseEach = __webpack_require__(/*! ./_createBaseEach */ \"./node_modules/lodash/_createBaseEach.js\");\n\n/**\n * The base implementation of `_.forEach` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array|Object} Returns `collection`.\n */\nvar baseEach = createBaseEach(baseForOwn);\n\nmodule.exports = baseEach;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/_baseExtremum.js\":\n/*!**********************************************!*\\\n  !*** ./node_modules/lodash/_baseExtremum.js ***!\n  \\**********************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar isSymbol = __webpack_require__(/*! ./isSymbol */ \"./node_modules/lodash/isSymbol.js\");\n\n/**\n * The base implementation of methods like `_.max` and `_.min` which accepts a\n * `comparator` to determine the extremum value.\n *\n * @private\n * @param {Array} array The array to iterate over.\n * @param {Function} iteratee The iteratee invoked per iteration.\n * @param {Function} comparator The comparator used to compare values.\n * @returns {*} Returns the extremum value.\n */\nfunction baseExtremum(array, iteratee, comparator) {\n  var index = -1,\n      length = array.length;\n\n  while (++index < length) {\n    var value = array[index],\n        current = iteratee(value);\n\n    if (current != null && (computed === undefined\n          ? (current === current && !isSymbol(current))\n          : comparator(current, computed)\n        )) {\n      var computed = current,\n          result = value;\n    }\n  }\n  return result;\n}\n\nmodule.exports = baseExtremum;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/_baseFilter.js\":\n/*!********************************************!*\\\n  !*** ./node_modules/lodash/_baseFilter.js ***!\n  \\********************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar baseEach = __webpack_require__(/*! ./_baseEach */ \"./node_modules/lodash/_baseEach.js\");\n\n/**\n * The base implementation of `_.filter` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n */\nfunction baseFilter(collection, predicate) {\n  var result = [];\n  baseEach(collection, function(value, index, collection) {\n    if (predicate(value, index, collection)) {\n      result.push(value);\n    }\n  });\n  return result;\n}\n\nmodule.exports = baseFilter;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/_baseFindIndex.js\":\n/*!***********************************************!*\\\n  !*** ./node_modules/lodash/_baseFindIndex.js ***!\n  \\***********************************************/\n/*! no static exports found */\n/***/ (function(module, exports) {\n\n/**\n * The base implementation of `_.findIndex` and `_.findLastIndex` without\n * support for iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {Function} predicate The function invoked per iteration.\n * @param {number} fromIndex The index to search from.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction baseFindIndex(array, predicate, fromIndex, fromRight) {\n  var length = array.length,\n      index = fromIndex + (fromRight ? 1 : -1);\n\n  while ((fromRight ? index-- : ++index < length)) {\n    if (predicate(array[index], index, array)) {\n      return index;\n    }\n  }\n  return -1;\n}\n\nmodule.exports = baseFindIndex;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/_baseFlatten.js\":\n/*!*********************************************!*\\\n  !*** ./node_modules/lodash/_baseFlatten.js ***!\n  \\*********************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar arrayPush = __webpack_require__(/*! ./_arrayPush */ \"./node_modules/lodash/_arrayPush.js\"),\n    isFlattenable = __webpack_require__(/*! ./_isFlattenable */ \"./node_modules/lodash/_isFlattenable.js\");\n\n/**\n * The base implementation of `_.flatten` with support for restricting flattening.\n *\n * @private\n * @param {Array} array The array to flatten.\n * @param {number} depth The maximum recursion depth.\n * @param {boolean} [predicate=isFlattenable] The function invoked per iteration.\n * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks.\n * @param {Array} [result=[]] The initial result value.\n * @returns {Array} Returns the new flattened array.\n */\nfunction baseFlatten(array, depth, predicate, isStrict, result) {\n  var index = -1,\n      length = array.length;\n\n  predicate || (predicate = isFlattenable);\n  result || (result = []);\n\n  while (++index < length) {\n    var value = array[index];\n    if (depth > 0 && predicate(value)) {\n      if (depth > 1) {\n        // Recursively flatten arrays (susceptible to call stack limits).\n        baseFlatten(value, depth - 1, predicate, isStrict, result);\n      } else {\n        arrayPush(result, value);\n      }\n    } else if (!isStrict) {\n      result[result.length] = value;\n    }\n  }\n  return result;\n}\n\nmodule.exports = baseFlatten;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/_baseFor.js\":\n/*!*****************************************!*\\\n  !*** ./node_modules/lodash/_baseFor.js ***!\n  \\*****************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar createBaseFor = __webpack_require__(/*! ./_createBaseFor */ \"./node_modules/lodash/_createBaseFor.js\");\n\n/**\n * The base implementation of `baseForOwn` which iterates over `object`\n * properties returned by `keysFunc` and invokes `iteratee` for each property.\n * Iteratee functions may exit iteration early by explicitly returning `false`.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @returns {Object} Returns `object`.\n */\nvar baseFor = createBaseFor();\n\nmodule.exports = baseFor;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/_baseForOwn.js\":\n/*!********************************************!*\\\n  !*** ./node_modules/lodash/_baseForOwn.js ***!\n  \\********************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar baseFor = __webpack_require__(/*! ./_baseFor */ \"./node_modules/lodash/_baseFor.js\"),\n    keys = __webpack_require__(/*! ./keys */ \"./node_modules/lodash/keys.js\");\n\n/**\n * The base implementation of `_.forOwn` without support for iteratee shorthands.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Object} Returns `object`.\n */\nfunction baseForOwn(object, iteratee) {\n  return object && baseFor(object, iteratee, keys);\n}\n\nmodule.exports = baseForOwn;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/_baseGet.js\":\n/*!*****************************************!*\\\n  !*** ./node_modules/lodash/_baseGet.js ***!\n  \\*****************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar castPath = __webpack_require__(/*! ./_castPath */ \"./node_modules/lodash/_castPath.js\"),\n    toKey = __webpack_require__(/*! ./_toKey */ \"./node_modules/lodash/_toKey.js\");\n\n/**\n * The base implementation of `_.get` without support for default values.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the property to get.\n * @returns {*} Returns the resolved value.\n */\nfunction baseGet(object, path) {\n  path = castPath(path, object);\n\n  var index = 0,\n      length = path.length;\n\n  while (object != null && index < length) {\n    object = object[toKey(path[index++])];\n  }\n  return (index && index == length) ? object : undefined;\n}\n\nmodule.exports = baseGet;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/_baseGetAllKeys.js\":\n/*!************************************************!*\\\n  !*** ./node_modules/lodash/_baseGetAllKeys.js ***!\n  \\************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar arrayPush = __webpack_require__(/*! ./_arrayPush */ \"./node_modules/lodash/_arrayPush.js\"),\n    isArray = __webpack_require__(/*! ./isArray */ \"./node_modules/lodash/isArray.js\");\n\n/**\n * The base implementation of `getAllKeys` and `getAllKeysIn` which uses\n * `keysFunc` and `symbolsFunc` to get the enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @param {Function} symbolsFunc The function to get the symbols of `object`.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction baseGetAllKeys(object, keysFunc, symbolsFunc) {\n  var result = keysFunc(object);\n  return isArray(object) ? result : arrayPush(result, symbolsFunc(object));\n}\n\nmodule.exports = baseGetAllKeys;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/_baseGetTag.js\":\n/*!********************************************!*\\\n  !*** ./node_modules/lodash/_baseGetTag.js ***!\n  \\********************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar Symbol = __webpack_require__(/*! ./_Symbol */ \"./node_modules/lodash/_Symbol.js\"),\n    getRawTag = __webpack_require__(/*! ./_getRawTag */ \"./node_modules/lodash/_getRawTag.js\"),\n    objectToString = __webpack_require__(/*! ./_objectToString */ \"./node_modules/lodash/_objectToString.js\");\n\n/** `Object#toString` result references. */\nvar nullTag = '[object Null]',\n    undefinedTag = '[object Undefined]';\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n  if (value == null) {\n    return value === undefined ? undefinedTag : nullTag;\n  }\n  return (symToStringTag && symToStringTag in Object(value))\n    ? getRawTag(value)\n    : objectToString(value);\n}\n\nmodule.exports = baseGetTag;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/_baseGt.js\":\n/*!****************************************!*\\\n  !*** ./node_modules/lodash/_baseGt.js ***!\n  \\****************************************/\n/*! no static exports found */\n/***/ (function(module, exports) {\n\n/**\n * The base implementation of `_.gt` which doesn't coerce arguments.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if `value` is greater than `other`,\n *  else `false`.\n */\nfunction baseGt(value, other) {\n  return value > other;\n}\n\nmodule.exports = baseGt;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/_baseHas.js\":\n/*!*****************************************!*\\\n  !*** ./node_modules/lodash/_baseHas.js ***!\n  \\*****************************************/\n/*! no static exports found */\n/***/ (function(module, exports) {\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * The base implementation of `_.has` without support for deep paths.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {Array|string} key The key to check.\n * @returns {boolean} Returns `true` if `key` exists, else `false`.\n */\nfunction baseHas(object, key) {\n  return object != null && hasOwnProperty.call(object, key);\n}\n\nmodule.exports = baseHas;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/_baseHasIn.js\":\n/*!*******************************************!*\\\n  !*** ./node_modules/lodash/_baseHasIn.js ***!\n  \\*******************************************/\n/*! no static exports found */\n/***/ (function(module, exports) {\n\n/**\n * The base implementation of `_.hasIn` without support for deep paths.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {Array|string} key The key to check.\n * @returns {boolean} Returns `true` if `key` exists, else `false`.\n */\nfunction baseHasIn(object, key) {\n  return object != null && key in Object(object);\n}\n\nmodule.exports = baseHasIn;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/_baseIndexOf.js\":\n/*!*********************************************!*\\\n  !*** ./node_modules/lodash/_baseIndexOf.js ***!\n  \\*********************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar baseFindIndex = __webpack_require__(/*! ./_baseFindIndex */ \"./node_modules/lodash/_baseFindIndex.js\"),\n    baseIsNaN = __webpack_require__(/*! ./_baseIsNaN */ \"./node_modules/lodash/_baseIsNaN.js\"),\n    strictIndexOf = __webpack_require__(/*! ./_strictIndexOf */ \"./node_modules/lodash/_strictIndexOf.js\");\n\n/**\n * The base implementation of `_.indexOf` without `fromIndex` bounds checks.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @param {number} fromIndex The index to search from.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction baseIndexOf(array, value, fromIndex) {\n  return value === value\n    ? strictIndexOf(array, value, fromIndex)\n    : baseFindIndex(array, baseIsNaN, fromIndex);\n}\n\nmodule.exports = baseIndexOf;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/_baseIsArguments.js\":\n/*!*************************************************!*\\\n  !*** ./node_modules/lodash/_baseIsArguments.js ***!\n  \\*************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar baseGetTag = __webpack_require__(/*! ./_baseGetTag */ \"./node_modules/lodash/_baseGetTag.js\"),\n    isObjectLike = __webpack_require__(/*! ./isObjectLike */ \"./node_modules/lodash/isObjectLike.js\");\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]';\n\n/**\n * The base implementation of `_.isArguments`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n */\nfunction baseIsArguments(value) {\n  return isObjectLike(value) && baseGetTag(value) == argsTag;\n}\n\nmodule.exports = baseIsArguments;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/_baseIsEqual.js\":\n/*!*********************************************!*\\\n  !*** ./node_modules/lodash/_baseIsEqual.js ***!\n  \\*********************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar baseIsEqualDeep = __webpack_require__(/*! ./_baseIsEqualDeep */ \"./node_modules/lodash/_baseIsEqualDeep.js\"),\n    isObjectLike = __webpack_require__(/*! ./isObjectLike */ \"./node_modules/lodash/isObjectLike.js\");\n\n/**\n * The base implementation of `_.isEqual` which supports partial comparisons\n * and tracks traversed objects.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @param {boolean} bitmask The bitmask flags.\n *  1 - Unordered comparison\n *  2 - Partial comparison\n * @param {Function} [customizer] The function to customize comparisons.\n * @param {Object} [stack] Tracks traversed `value` and `other` objects.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n */\nfunction baseIsEqual(value, other, bitmask, customizer, stack) {\n  if (value === other) {\n    return true;\n  }\n  if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {\n    return value !== value && other !== other;\n  }\n  return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);\n}\n\nmodule.exports = baseIsEqual;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/_baseIsEqualDeep.js\":\n/*!*************************************************!*\\\n  !*** ./node_modules/lodash/_baseIsEqualDeep.js ***!\n  \\*************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar Stack = __webpack_require__(/*! ./_Stack */ \"./node_modules/lodash/_Stack.js\"),\n    equalArrays = __webpack_require__(/*! ./_equalArrays */ \"./node_modules/lodash/_equalArrays.js\"),\n    equalByTag = __webpack_require__(/*! ./_equalByTag */ \"./node_modules/lodash/_equalByTag.js\"),\n    equalObjects = __webpack_require__(/*! ./_equalObjects */ \"./node_modules/lodash/_equalObjects.js\"),\n    getTag = __webpack_require__(/*! ./_getTag */ \"./node_modules/lodash/_getTag.js\"),\n    isArray = __webpack_require__(/*! ./isArray */ \"./node_modules/lodash/isArray.js\"),\n    isBuffer = __webpack_require__(/*! ./isBuffer */ \"./node_modules/lodash/isBuffer.js\"),\n    isTypedArray = __webpack_require__(/*! ./isTypedArray */ \"./node_modules/lodash/isTypedArray.js\");\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n    arrayTag = '[object Array]',\n    objectTag = '[object Object]';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * A specialized version of `baseIsEqual` for arrays and objects which performs\n * deep comparisons and tracks traversed objects enabling objects with circular\n * references to be compared.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} [stack] Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {\n  var objIsArr = isArray(object),\n      othIsArr = isArray(other),\n      objTag = objIsArr ? arrayTag : getTag(object),\n      othTag = othIsArr ? arrayTag : getTag(other);\n\n  objTag = objTag == argsTag ? objectTag : objTag;\n  othTag = othTag == argsTag ? objectTag : othTag;\n\n  var objIsObj = objTag == objectTag,\n      othIsObj = othTag == objectTag,\n      isSameTag = objTag == othTag;\n\n  if (isSameTag && isBuffer(object)) {\n    if (!isBuffer(other)) {\n      return false;\n    }\n    objIsArr = true;\n    objIsObj = false;\n  }\n  if (isSameTag && !objIsObj) {\n    stack || (stack = new Stack);\n    return (objIsArr || isTypedArray(object))\n      ? equalArrays(object, other, bitmask, customizer, equalFunc, stack)\n      : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);\n  }\n  if (!(bitmask & COMPARE_PARTIAL_FLAG)) {\n    var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),\n        othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');\n\n    if (objIsWrapped || othIsWrapped) {\n      var objUnwrapped = objIsWrapped ? object.value() : object,\n          othUnwrapped = othIsWrapped ? other.value() : other;\n\n      stack || (stack = new Stack);\n      return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);\n    }\n  }\n  if (!isSameTag) {\n    return false;\n  }\n  stack || (stack = new Stack);\n  return equalObjects(object, other, bitmask, customizer, equalFunc, stack);\n}\n\nmodule.exports = baseIsEqualDeep;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/_baseIsMap.js\":\n/*!*******************************************!*\\\n  !*** ./node_modules/lodash/_baseIsMap.js ***!\n  \\*******************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar getTag = __webpack_require__(/*! ./_getTag */ \"./node_modules/lodash/_getTag.js\"),\n    isObjectLike = __webpack_require__(/*! ./isObjectLike */ \"./node_modules/lodash/isObjectLike.js\");\n\n/** `Object#toString` result references. */\nvar mapTag = '[object Map]';\n\n/**\n * The base implementation of `_.isMap` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n */\nfunction baseIsMap(value) {\n  return isObjectLike(value) && getTag(value) == mapTag;\n}\n\nmodule.exports = baseIsMap;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/_baseIsMatch.js\":\n/*!*********************************************!*\\\n  !*** ./node_modules/lodash/_baseIsMatch.js ***!\n  \\*********************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar Stack = __webpack_require__(/*! ./_Stack */ \"./node_modules/lodash/_Stack.js\"),\n    baseIsEqual = __webpack_require__(/*! ./_baseIsEqual */ \"./node_modules/lodash/_baseIsEqual.js\");\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n    COMPARE_UNORDERED_FLAG = 2;\n\n/**\n * The base implementation of `_.isMatch` without support for iteratee shorthands.\n *\n * @private\n * @param {Object} object The object to inspect.\n * @param {Object} source The object of property values to match.\n * @param {Array} matchData The property names, values, and compare flags to match.\n * @param {Function} [customizer] The function to customize comparisons.\n * @returns {boolean} Returns `true` if `object` is a match, else `false`.\n */\nfunction baseIsMatch(object, source, matchData, customizer) {\n  var index = matchData.length,\n      length = index,\n      noCustomizer = !customizer;\n\n  if (object == null) {\n    return !length;\n  }\n  object = Object(object);\n  while (index--) {\n    var data = matchData[index];\n    if ((noCustomizer && data[2])\n          ? data[1] !== object[data[0]]\n          : !(data[0] in object)\n        ) {\n      return false;\n    }\n  }\n  while (++index < length) {\n    data = matchData[index];\n    var key = data[0],\n        objValue = object[key],\n        srcValue = data[1];\n\n    if (noCustomizer && data[2]) {\n      if (objValue === undefined && !(key in object)) {\n        return false;\n      }\n    } else {\n      var stack = new Stack;\n      if (customizer) {\n        var result = customizer(objValue, srcValue, key, object, source, stack);\n      }\n      if (!(result === undefined\n            ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack)\n            : result\n          )) {\n        return false;\n      }\n    }\n  }\n  return true;\n}\n\nmodule.exports = baseIsMatch;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/_baseIsNaN.js\":\n/*!*******************************************!*\\\n  !*** ./node_modules/lodash/_baseIsNaN.js ***!\n  \\*******************************************/\n/*! no static exports found */\n/***/ (function(module, exports) {\n\n/**\n * The base implementation of `_.isNaN` without support for number objects.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.\n */\nfunction baseIsNaN(value) {\n  return value !== value;\n}\n\nmodule.exports = baseIsNaN;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/_baseIsNative.js\":\n/*!**********************************************!*\\\n  !*** ./node_modules/lodash/_baseIsNative.js ***!\n  \\**********************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar isFunction = __webpack_require__(/*! ./isFunction */ \"./node_modules/lodash/isFunction.js\"),\n    isMasked = __webpack_require__(/*! ./_isMasked */ \"./node_modules/lodash/_isMasked.js\"),\n    isObject = __webpack_require__(/*! ./isObject */ \"./node_modules/lodash/isObject.js\"),\n    toSource = __webpack_require__(/*! ./_toSource */ \"./node_modules/lodash/_toSource.js\");\n\n/**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\nvar reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n\n/** Used to detect host constructors (Safari). */\nvar reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n/** Used for built-in method references. */\nvar funcProto = Function.prototype,\n    objectProto = Object.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Used to detect if a method is native. */\nvar reIsNative = RegExp('^' +\n  funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n  .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n);\n\n/**\n * The base implementation of `_.isNative` without bad shim checks.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n *  else `false`.\n */\nfunction baseIsNative(value) {\n  if (!isObject(value) || isMasked(value)) {\n    return false;\n  }\n  var pattern = isFunction(value) ? reIsNative : reIsHostCtor;\n  return pattern.test(toSource(value));\n}\n\nmodule.exports = baseIsNative;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/_baseIsSet.js\":\n/*!*******************************************!*\\\n  !*** ./node_modules/lodash/_baseIsSet.js ***!\n  \\*******************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar getTag = __webpack_require__(/*! ./_getTag */ \"./node_modules/lodash/_getTag.js\"),\n    isObjectLike = __webpack_require__(/*! ./isObjectLike */ \"./node_modules/lodash/isObjectLike.js\");\n\n/** `Object#toString` result references. */\nvar setTag = '[object Set]';\n\n/**\n * The base implementation of `_.isSet` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n */\nfunction baseIsSet(value) {\n  return isObjectLike(value) && getTag(value) == setTag;\n}\n\nmodule.exports = baseIsSet;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/_baseIsTypedArray.js\":\n/*!**************************************************!*\\\n  !*** ./node_modules/lodash/_baseIsTypedArray.js ***!\n  \\**************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar baseGetTag = __webpack_require__(/*! ./_baseGetTag */ \"./node_modules/lodash/_baseGetTag.js\"),\n    isLength = __webpack_require__(/*! ./isLength */ \"./node_modules/lodash/isLength.js\"),\n    isObjectLike = __webpack_require__(/*! ./isObjectLike */ \"./node_modules/lodash/isObjectLike.js\");\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n    arrayTag = '[object Array]',\n    boolTag = '[object Boolean]',\n    dateTag = '[object Date]',\n    errorTag = '[object Error]',\n    funcTag = '[object Function]',\n    mapTag = '[object Map]',\n    numberTag = '[object Number]',\n    objectTag = '[object Object]',\n    regexpTag = '[object RegExp]',\n    setTag = '[object Set]',\n    stringTag = '[object String]',\n    weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n    dataViewTag = '[object DataView]',\n    float32Tag = '[object Float32Array]',\n    float64Tag = '[object Float64Array]',\n    int8Tag = '[object Int8Array]',\n    int16Tag = '[object Int16Array]',\n    int32Tag = '[object Int32Array]',\n    uint8Tag = '[object Uint8Array]',\n    uint8ClampedTag = '[object Uint8ClampedArray]',\n    uint16Tag = '[object Uint16Array]',\n    uint32Tag = '[object Uint32Array]';\n\n/** Used to identify `toStringTag` values of typed arrays. */\nvar typedArrayTags = {};\ntypedArrayTags[float32Tag] = typedArrayTags[float64Tag] =\ntypedArrayTags[int8Tag] = typedArrayTags[int16Tag] =\ntypedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =\ntypedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =\ntypedArrayTags[uint32Tag] = true;\ntypedArrayTags[argsTag] = typedArrayTags[arrayTag] =\ntypedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =\ntypedArrayTags[dataViewTag] = typedArrayTags[dateTag] =\ntypedArrayTags[errorTag] = typedArrayTags[funcTag] =\ntypedArrayTags[mapTag] = typedArrayTags[numberTag] =\ntypedArrayTags[objectTag] = typedArrayTags[regexpTag] =\ntypedArrayTags[setTag] = typedArrayTags[stringTag] =\ntypedArrayTags[weakMapTag] = false;\n\n/**\n * The base implementation of `_.isTypedArray` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n */\nfunction baseIsTypedArray(value) {\n  return isObjectLike(value) &&\n    isLength(value.length) && !!typedArrayTags[baseGetTag(value)];\n}\n\nmodule.exports = baseIsTypedArray;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/_baseIteratee.js\":\n/*!**********************************************!*\\\n  !*** ./node_modules/lodash/_baseIteratee.js ***!\n  \\**********************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar baseMatches = __webpack_require__(/*! ./_baseMatches */ \"./node_modules/lodash/_baseMatches.js\"),\n    baseMatchesProperty = __webpack_require__(/*! ./_baseMatchesProperty */ \"./node_modules/lodash/_baseMatchesProperty.js\"),\n    identity = __webpack_require__(/*! ./identity */ \"./node_modules/lodash/identity.js\"),\n    isArray = __webpack_require__(/*! ./isArray */ \"./node_modules/lodash/isArray.js\"),\n    property = __webpack_require__(/*! ./property */ \"./node_modules/lodash/property.js\");\n\n/**\n * The base implementation of `_.iteratee`.\n *\n * @private\n * @param {*} [value=_.identity] The value to convert to an iteratee.\n * @returns {Function} Returns the iteratee.\n */\nfunction baseIteratee(value) {\n  // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9.\n  // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details.\n  if (typeof value == 'function') {\n    return value;\n  }\n  if (value == null) {\n    return identity;\n  }\n  if (typeof value == 'object') {\n    return isArray(value)\n      ? baseMatchesProperty(value[0], value[1])\n      : baseMatches(value);\n  }\n  return property(value);\n}\n\nmodule.exports = baseIteratee;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/_baseKeys.js\":\n/*!******************************************!*\\\n  !*** ./node_modules/lodash/_baseKeys.js ***!\n  \\******************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar isPrototype = __webpack_require__(/*! ./_isPrototype */ \"./node_modules/lodash/_isPrototype.js\"),\n    nativeKeys = __webpack_require__(/*! ./_nativeKeys */ \"./node_modules/lodash/_nativeKeys.js\");\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeys(object) {\n  if (!isPrototype(object)) {\n    return nativeKeys(object);\n  }\n  var result = [];\n  for (var key in Object(object)) {\n    if (hasOwnProperty.call(object, key) && key != 'constructor') {\n      result.push(key);\n    }\n  }\n  return result;\n}\n\nmodule.exports = baseKeys;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/_baseKeysIn.js\":\n/*!********************************************!*\\\n  !*** ./node_modules/lodash/_baseKeysIn.js ***!\n  \\********************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar isObject = __webpack_require__(/*! ./isObject */ \"./node_modules/lodash/isObject.js\"),\n    isPrototype = __webpack_require__(/*! ./_isPrototype */ \"./node_modules/lodash/_isPrototype.js\"),\n    nativeKeysIn = __webpack_require__(/*! ./_nativeKeysIn */ \"./node_modules/lodash/_nativeKeysIn.js\");\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeysIn(object) {\n  if (!isObject(object)) {\n    return nativeKeysIn(object);\n  }\n  var isProto = isPrototype(object),\n      result = [];\n\n  for (var key in object) {\n    if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {\n      result.push(key);\n    }\n  }\n  return result;\n}\n\nmodule.exports = baseKeysIn;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/_baseLt.js\":\n/*!****************************************!*\\\n  !*** ./node_modules/lodash/_baseLt.js ***!\n  \\****************************************/\n/*! no static exports found */\n/***/ (function(module, exports) {\n\n/**\n * The base implementation of `_.lt` which doesn't coerce arguments.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if `value` is less than `other`,\n *  else `false`.\n */\nfunction baseLt(value, other) {\n  return value < other;\n}\n\nmodule.exports = baseLt;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/_baseMap.js\":\n/*!*****************************************!*\\\n  !*** ./node_modules/lodash/_baseMap.js ***!\n  \\*****************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar baseEach = __webpack_require__(/*! ./_baseEach */ \"./node_modules/lodash/_baseEach.js\"),\n    isArrayLike = __webpack_require__(/*! ./isArrayLike */ \"./node_modules/lodash/isArrayLike.js\");\n\n/**\n * The base implementation of `_.map` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the new mapped array.\n */\nfunction baseMap(collection, iteratee) {\n  var index = -1,\n      result = isArrayLike(collection) ? Array(collection.length) : [];\n\n  baseEach(collection, function(value, key, collection) {\n    result[++index] = iteratee(value, key, collection);\n  });\n  return result;\n}\n\nmodule.exports = baseMap;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/_baseMatches.js\":\n/*!*********************************************!*\\\n  !*** ./node_modules/lodash/_baseMatches.js ***!\n  \\*********************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar baseIsMatch = __webpack_require__(/*! ./_baseIsMatch */ \"./node_modules/lodash/_baseIsMatch.js\"),\n    getMatchData = __webpack_require__(/*! ./_getMatchData */ \"./node_modules/lodash/_getMatchData.js\"),\n    matchesStrictComparable = __webpack_require__(/*! ./_matchesStrictComparable */ \"./node_modules/lodash/_matchesStrictComparable.js\");\n\n/**\n * The base implementation of `_.matches` which doesn't clone `source`.\n *\n * @private\n * @param {Object} source The object of property values to match.\n * @returns {Function} Returns the new spec function.\n */\nfunction baseMatches(source) {\n  var matchData = getMatchData(source);\n  if (matchData.length == 1 && matchData[0][2]) {\n    return matchesStrictComparable(matchData[0][0], matchData[0][1]);\n  }\n  return function(object) {\n    return object === source || baseIsMatch(object, source, matchData);\n  };\n}\n\nmodule.exports = baseMatches;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/_baseMatchesProperty.js\":\n/*!*****************************************************!*\\\n  !*** ./node_modules/lodash/_baseMatchesProperty.js ***!\n  \\*****************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar baseIsEqual = __webpack_require__(/*! ./_baseIsEqual */ \"./node_modules/lodash/_baseIsEqual.js\"),\n    get = __webpack_require__(/*! ./get */ \"./node_modules/lodash/get.js\"),\n    hasIn = __webpack_require__(/*! ./hasIn */ \"./node_modules/lodash/hasIn.js\"),\n    isKey = __webpack_require__(/*! ./_isKey */ \"./node_modules/lodash/_isKey.js\"),\n    isStrictComparable = __webpack_require__(/*! ./_isStrictComparable */ \"./node_modules/lodash/_isStrictComparable.js\"),\n    matchesStrictComparable = __webpack_require__(/*! ./_matchesStrictComparable */ \"./node_modules/lodash/_matchesStrictComparable.js\"),\n    toKey = __webpack_require__(/*! ./_toKey */ \"./node_modules/lodash/_toKey.js\");\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n    COMPARE_UNORDERED_FLAG = 2;\n\n/**\n * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`.\n *\n * @private\n * @param {string} path The path of the property to get.\n * @param {*} srcValue The value to match.\n * @returns {Function} Returns the new spec function.\n */\nfunction baseMatchesProperty(path, srcValue) {\n  if (isKey(path) && isStrictComparable(srcValue)) {\n    return matchesStrictComparable(toKey(path), srcValue);\n  }\n  return function(object) {\n    var objValue = get(object, path);\n    return (objValue === undefined && objValue === srcValue)\n      ? hasIn(object, path)\n      : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG);\n  };\n}\n\nmodule.exports = baseMatchesProperty;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/_baseMerge.js\":\n/*!*******************************************!*\\\n  !*** ./node_modules/lodash/_baseMerge.js ***!\n  \\*******************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar Stack = __webpack_require__(/*! ./_Stack */ \"./node_modules/lodash/_Stack.js\"),\n    assignMergeValue = __webpack_require__(/*! ./_assignMergeValue */ \"./node_modules/lodash/_assignMergeValue.js\"),\n    baseFor = __webpack_require__(/*! ./_baseFor */ \"./node_modules/lodash/_baseFor.js\"),\n    baseMergeDeep = __webpack_require__(/*! ./_baseMergeDeep */ \"./node_modules/lodash/_baseMergeDeep.js\"),\n    isObject = __webpack_require__(/*! ./isObject */ \"./node_modules/lodash/isObject.js\"),\n    keysIn = __webpack_require__(/*! ./keysIn */ \"./node_modules/lodash/keysIn.js\"),\n    safeGet = __webpack_require__(/*! ./_safeGet */ \"./node_modules/lodash/_safeGet.js\");\n\n/**\n * The base implementation of `_.merge` without support for multiple sources.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @param {number} srcIndex The index of `source`.\n * @param {Function} [customizer] The function to customize merged values.\n * @param {Object} [stack] Tracks traversed source values and their merged\n *  counterparts.\n */\nfunction baseMerge(object, source, srcIndex, customizer, stack) {\n  if (object === source) {\n    return;\n  }\n  baseFor(source, function(srcValue, key) {\n    stack || (stack = new Stack);\n    if (isObject(srcValue)) {\n      baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack);\n    }\n    else {\n      var newValue = customizer\n        ? customizer(safeGet(object, key), srcValue, (key + ''), object, source, stack)\n        : undefined;\n\n      if (newValue === undefined) {\n        newValue = srcValue;\n      }\n      assignMergeValue(object, key, newValue);\n    }\n  }, keysIn);\n}\n\nmodule.exports = baseMerge;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/_baseMergeDeep.js\":\n/*!***********************************************!*\\\n  !*** ./node_modules/lodash/_baseMergeDeep.js ***!\n  \\***********************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar assignMergeValue = __webpack_require__(/*! ./_assignMergeValue */ \"./node_modules/lodash/_assignMergeValue.js\"),\n    cloneBuffer = __webpack_require__(/*! ./_cloneBuffer */ \"./node_modules/lodash/_cloneBuffer.js\"),\n    cloneTypedArray = __webpack_require__(/*! ./_cloneTypedArray */ \"./node_modules/lodash/_cloneTypedArray.js\"),\n    copyArray = __webpack_require__(/*! ./_copyArray */ \"./node_modules/lodash/_copyArray.js\"),\n    initCloneObject = __webpack_require__(/*! ./_initCloneObject */ \"./node_modules/lodash/_initCloneObject.js\"),\n    isArguments = __webpack_require__(/*! ./isArguments */ \"./node_modules/lodash/isArguments.js\"),\n    isArray = __webpack_require__(/*! ./isArray */ \"./node_modules/lodash/isArray.js\"),\n    isArrayLikeObject = __webpack_require__(/*! ./isArrayLikeObject */ \"./node_modules/lodash/isArrayLikeObject.js\"),\n    isBuffer = __webpack_require__(/*! ./isBuffer */ \"./node_modules/lodash/isBuffer.js\"),\n    isFunction = __webpack_require__(/*! ./isFunction */ \"./node_modules/lodash/isFunction.js\"),\n    isObject = __webpack_require__(/*! ./isObject */ \"./node_modules/lodash/isObject.js\"),\n    isPlainObject = __webpack_require__(/*! ./isPlainObject */ \"./node_modules/lodash/isPlainObject.js\"),\n    isTypedArray = __webpack_require__(/*! ./isTypedArray */ \"./node_modules/lodash/isTypedArray.js\"),\n    safeGet = __webpack_require__(/*! ./_safeGet */ \"./node_modules/lodash/_safeGet.js\"),\n    toPlainObject = __webpack_require__(/*! ./toPlainObject */ \"./node_modules/lodash/toPlainObject.js\");\n\n/**\n * A specialized version of `baseMerge` for arrays and objects which performs\n * deep merges and tracks traversed objects enabling objects with circular\n * references to be merged.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @param {string} key The key of the value to merge.\n * @param {number} srcIndex The index of `source`.\n * @param {Function} mergeFunc The function to merge values.\n * @param {Function} [customizer] The function to customize assigned values.\n * @param {Object} [stack] Tracks traversed source values and their merged\n *  counterparts.\n */\nfunction baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) {\n  var objValue = safeGet(object, key),\n      srcValue = safeGet(source, key),\n      stacked = stack.get(srcValue);\n\n  if (stacked) {\n    assignMergeValue(object, key, stacked);\n    return;\n  }\n  var newValue = customizer\n    ? customizer(objValue, srcValue, (key + ''), object, source, stack)\n    : undefined;\n\n  var isCommon = newValue === undefined;\n\n  if (isCommon) {\n    var isArr = isArray(srcValue),\n        isBuff = !isArr && isBuffer(srcValue),\n        isTyped = !isArr && !isBuff && isTypedArray(srcValue);\n\n    newValue = srcValue;\n    if (isArr || isBuff || isTyped) {\n      if (isArray(objValue)) {\n        newValue = objValue;\n      }\n      else if (isArrayLikeObject(objValue)) {\n        newValue = copyArray(objValue);\n      }\n      else if (isBuff) {\n        isCommon = false;\n        newValue = cloneBuffer(srcValue, true);\n      }\n      else if (isTyped) {\n        isCommon = false;\n        newValue = cloneTypedArray(srcValue, true);\n      }\n      else {\n        newValue = [];\n      }\n    }\n    else if (isPlainObject(srcValue) || isArguments(srcValue)) {\n      newValue = objValue;\n      if (isArguments(objValue)) {\n        newValue = toPlainObject(objValue);\n      }\n      else if (!isObject(objValue) || isFunction(objValue)) {\n        newValue = initCloneObject(srcValue);\n      }\n    }\n    else {\n      isCommon = false;\n    }\n  }\n  if (isCommon) {\n    // Recursively merge objects and arrays (susceptible to call stack limits).\n    stack.set(srcValue, newValue);\n    mergeFunc(newValue, srcValue, srcIndex, customizer, stack);\n    stack['delete'](srcValue);\n  }\n  assignMergeValue(object, key, newValue);\n}\n\nmodule.exports = baseMergeDeep;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/_baseOrderBy.js\":\n/*!*********************************************!*\\\n  !*** ./node_modules/lodash/_baseOrderBy.js ***!\n  \\*********************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar arrayMap = __webpack_require__(/*! ./_arrayMap */ \"./node_modules/lodash/_arrayMap.js\"),\n    baseGet = __webpack_require__(/*! ./_baseGet */ \"./node_modules/lodash/_baseGet.js\"),\n    baseIteratee = __webpack_require__(/*! ./_baseIteratee */ \"./node_modules/lodash/_baseIteratee.js\"),\n    baseMap = __webpack_require__(/*! ./_baseMap */ \"./node_modules/lodash/_baseMap.js\"),\n    baseSortBy = __webpack_require__(/*! ./_baseSortBy */ \"./node_modules/lodash/_baseSortBy.js\"),\n    baseUnary = __webpack_require__(/*! ./_baseUnary */ \"./node_modules/lodash/_baseUnary.js\"),\n    compareMultiple = __webpack_require__(/*! ./_compareMultiple */ \"./node_modules/lodash/_compareMultiple.js\"),\n    identity = __webpack_require__(/*! ./identity */ \"./node_modules/lodash/identity.js\"),\n    isArray = __webpack_require__(/*! ./isArray */ \"./node_modules/lodash/isArray.js\");\n\n/**\n * The base implementation of `_.orderBy` without param guards.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by.\n * @param {string[]} orders The sort orders of `iteratees`.\n * @returns {Array} Returns the new sorted array.\n */\nfunction baseOrderBy(collection, iteratees, orders) {\n  if (iteratees.length) {\n    iteratees = arrayMap(iteratees, function(iteratee) {\n      if (isArray(iteratee)) {\n        return function(value) {\n          return baseGet(value, iteratee.length === 1 ? iteratee[0] : iteratee);\n        }\n      }\n      return iteratee;\n    });\n  } else {\n    iteratees = [identity];\n  }\n\n  var index = -1;\n  iteratees = arrayMap(iteratees, baseUnary(baseIteratee));\n\n  var result = baseMap(collection, function(value, key, collection) {\n    var criteria = arrayMap(iteratees, function(iteratee) {\n      return iteratee(value);\n    });\n    return { 'criteria': criteria, 'index': ++index, 'value': value };\n  });\n\n  return baseSortBy(result, function(object, other) {\n    return compareMultiple(object, other, orders);\n  });\n}\n\nmodule.exports = baseOrderBy;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/_basePick.js\":\n/*!******************************************!*\\\n  !*** ./node_modules/lodash/_basePick.js ***!\n  \\******************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar basePickBy = __webpack_require__(/*! ./_basePickBy */ \"./node_modules/lodash/_basePickBy.js\"),\n    hasIn = __webpack_require__(/*! ./hasIn */ \"./node_modules/lodash/hasIn.js\");\n\n/**\n * The base implementation of `_.pick` without support for individual\n * property identifiers.\n *\n * @private\n * @param {Object} object The source object.\n * @param {string[]} paths The property paths to pick.\n * @returns {Object} Returns the new object.\n */\nfunction basePick(object, paths) {\n  return basePickBy(object, paths, function(value, path) {\n    return hasIn(object, path);\n  });\n}\n\nmodule.exports = basePick;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/_basePickBy.js\":\n/*!********************************************!*\\\n  !*** ./node_modules/lodash/_basePickBy.js ***!\n  \\********************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar baseGet = __webpack_require__(/*! ./_baseGet */ \"./node_modules/lodash/_baseGet.js\"),\n    baseSet = __webpack_require__(/*! ./_baseSet */ \"./node_modules/lodash/_baseSet.js\"),\n    castPath = __webpack_require__(/*! ./_castPath */ \"./node_modules/lodash/_castPath.js\");\n\n/**\n * The base implementation of  `_.pickBy` without support for iteratee shorthands.\n *\n * @private\n * @param {Object} object The source object.\n * @param {string[]} paths The property paths to pick.\n * @param {Function} predicate The function invoked per property.\n * @returns {Object} Returns the new object.\n */\nfunction basePickBy(object, paths, predicate) {\n  var index = -1,\n      length = paths.length,\n      result = {};\n\n  while (++index < length) {\n    var path = paths[index],\n        value = baseGet(object, path);\n\n    if (predicate(value, path)) {\n      baseSet(result, castPath(path, object), value);\n    }\n  }\n  return result;\n}\n\nmodule.exports = basePickBy;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/_baseProperty.js\":\n/*!**********************************************!*\\\n  !*** ./node_modules/lodash/_baseProperty.js ***!\n  \\**********************************************/\n/*! no static exports found */\n/***/ (function(module, exports) {\n\n/**\n * The base implementation of `_.property` without support for deep paths.\n *\n * @private\n * @param {string} key The key of the property to get.\n * @returns {Function} Returns the new accessor function.\n */\nfunction baseProperty(key) {\n  return function(object) {\n    return object == null ? undefined : object[key];\n  };\n}\n\nmodule.exports = baseProperty;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/_basePropertyDeep.js\":\n/*!**************************************************!*\\\n  !*** ./node_modules/lodash/_basePropertyDeep.js ***!\n  \\**************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar baseGet = __webpack_require__(/*! ./_baseGet */ \"./node_modules/lodash/_baseGet.js\");\n\n/**\n * A specialized version of `baseProperty` which supports deep paths.\n *\n * @private\n * @param {Array|string} path The path of the property to get.\n * @returns {Function} Returns the new accessor function.\n */\nfunction basePropertyDeep(path) {\n  return function(object) {\n    return baseGet(object, path);\n  };\n}\n\nmodule.exports = basePropertyDeep;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/_baseRange.js\":\n/*!*******************************************!*\\\n  !*** ./node_modules/lodash/_baseRange.js ***!\n  \\*******************************************/\n/*! no static exports found */\n/***/ (function(module, exports) {\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeCeil = Math.ceil,\n    nativeMax = Math.max;\n\n/**\n * The base implementation of `_.range` and `_.rangeRight` which doesn't\n * coerce arguments.\n *\n * @private\n * @param {number} start The start of the range.\n * @param {number} end The end of the range.\n * @param {number} step The value to increment or decrement by.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Array} Returns the range of numbers.\n */\nfunction baseRange(start, end, step, fromRight) {\n  var index = -1,\n      length = nativeMax(nativeCeil((end - start) / (step || 1)), 0),\n      result = Array(length);\n\n  while (length--) {\n    result[fromRight ? length : ++index] = start;\n    start += step;\n  }\n  return result;\n}\n\nmodule.exports = baseRange;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/_baseReduce.js\":\n/*!********************************************!*\\\n  !*** ./node_modules/lodash/_baseReduce.js ***!\n  \\********************************************/\n/*! no static exports found */\n/***/ (function(module, exports) {\n\n/**\n * The base implementation of `_.reduce` and `_.reduceRight`, without support\n * for iteratee shorthands, which iterates over `collection` using `eachFunc`.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {*} accumulator The initial value.\n * @param {boolean} initAccum Specify using the first or last element of\n *  `collection` as the initial value.\n * @param {Function} eachFunc The function to iterate over `collection`.\n * @returns {*} Returns the accumulated value.\n */\nfunction baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) {\n  eachFunc(collection, function(value, index, collection) {\n    accumulator = initAccum\n      ? (initAccum = false, value)\n      : iteratee(accumulator, value, index, collection);\n  });\n  return accumulator;\n}\n\nmodule.exports = baseReduce;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/_baseRest.js\":\n/*!******************************************!*\\\n  !*** ./node_modules/lodash/_baseRest.js ***!\n  \\******************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar identity = __webpack_require__(/*! ./identity */ \"./node_modules/lodash/identity.js\"),\n    overRest = __webpack_require__(/*! ./_overRest */ \"./node_modules/lodash/_overRest.js\"),\n    setToString = __webpack_require__(/*! ./_setToString */ \"./node_modules/lodash/_setToString.js\");\n\n/**\n * The base implementation of `_.rest` which doesn't validate or coerce arguments.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @returns {Function} Returns the new function.\n */\nfunction baseRest(func, start) {\n  return setToString(overRest(func, start, identity), func + '');\n}\n\nmodule.exports = baseRest;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/_baseSet.js\":\n/*!*****************************************!*\\\n  !*** ./node_modules/lodash/_baseSet.js ***!\n  \\*****************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar assignValue = __webpack_require__(/*! ./_assignValue */ \"./node_modules/lodash/_assignValue.js\"),\n    castPath = __webpack_require__(/*! ./_castPath */ \"./node_modules/lodash/_castPath.js\"),\n    isIndex = __webpack_require__(/*! ./_isIndex */ \"./node_modules/lodash/_isIndex.js\"),\n    isObject = __webpack_require__(/*! ./isObject */ \"./node_modules/lodash/isObject.js\"),\n    toKey = __webpack_require__(/*! ./_toKey */ \"./node_modules/lodash/_toKey.js\");\n\n/**\n * The base implementation of `_.set`.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {Array|string} path The path of the property to set.\n * @param {*} value The value to set.\n * @param {Function} [customizer] The function to customize path creation.\n * @returns {Object} Returns `object`.\n */\nfunction baseSet(object, path, value, customizer) {\n  if (!isObject(object)) {\n    return object;\n  }\n  path = castPath(path, object);\n\n  var index = -1,\n      length = path.length,\n      lastIndex = length - 1,\n      nested = object;\n\n  while (nested != null && ++index < length) {\n    var key = toKey(path[index]),\n        newValue = value;\n\n    if (key === '__proto__' || key === 'constructor' || key === 'prototype') {\n      return object;\n    }\n\n    if (index != lastIndex) {\n      var objValue = nested[key];\n      newValue = customizer ? customizer(objValue, key, nested) : undefined;\n      if (newValue === undefined) {\n        newValue = isObject(objValue)\n          ? objValue\n          : (isIndex(path[index + 1]) ? [] : {});\n      }\n    }\n    assignValue(nested, key, newValue);\n    nested = nested[key];\n  }\n  return object;\n}\n\nmodule.exports = baseSet;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/_baseSetToString.js\":\n/*!*************************************************!*\\\n  !*** ./node_modules/lodash/_baseSetToString.js ***!\n  \\*************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar constant = __webpack_require__(/*! ./constant */ \"./node_modules/lodash/constant.js\"),\n    defineProperty = __webpack_require__(/*! ./_defineProperty */ \"./node_modules/lodash/_defineProperty.js\"),\n    identity = __webpack_require__(/*! ./identity */ \"./node_modules/lodash/identity.js\");\n\n/**\n * The base implementation of `setToString` without support for hot loop shorting.\n *\n * @private\n * @param {Function} func The function to modify.\n * @param {Function} string The `toString` result.\n * @returns {Function} Returns `func`.\n */\nvar baseSetToString = !defineProperty ? identity : function(func, string) {\n  return defineProperty(func, 'toString', {\n    'configurable': true,\n    'enumerable': false,\n    'value': constant(string),\n    'writable': true\n  });\n};\n\nmodule.exports = baseSetToString;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/_baseSortBy.js\":\n/*!********************************************!*\\\n  !*** ./node_modules/lodash/_baseSortBy.js ***!\n  \\********************************************/\n/*! no static exports found */\n/***/ (function(module, exports) {\n\n/**\n * The base implementation of `_.sortBy` which uses `comparer` to define the\n * sort order of `array` and replaces criteria objects with their corresponding\n * values.\n *\n * @private\n * @param {Array} array The array to sort.\n * @param {Function} comparer The function to define sort order.\n * @returns {Array} Returns `array`.\n */\nfunction baseSortBy(array, comparer) {\n  var length = array.length;\n\n  array.sort(comparer);\n  while (length--) {\n    array[length] = array[length].value;\n  }\n  return array;\n}\n\nmodule.exports = baseSortBy;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/_baseTimes.js\":\n/*!*******************************************!*\\\n  !*** ./node_modules/lodash/_baseTimes.js ***!\n  \\*******************************************/\n/*! no static exports found */\n/***/ (function(module, exports) {\n\n/**\n * The base implementation of `_.times` without support for iteratee shorthands\n * or max array length checks.\n *\n * @private\n * @param {number} n The number of times to invoke `iteratee`.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the array of results.\n */\nfunction baseTimes(n, iteratee) {\n  var index = -1,\n      result = Array(n);\n\n  while (++index < n) {\n    result[index] = iteratee(index);\n  }\n  return result;\n}\n\nmodule.exports = baseTimes;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/_baseToString.js\":\n/*!**********************************************!*\\\n  !*** ./node_modules/lodash/_baseToString.js ***!\n  \\**********************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar Symbol = __webpack_require__(/*! ./_Symbol */ \"./node_modules/lodash/_Symbol.js\"),\n    arrayMap = __webpack_require__(/*! ./_arrayMap */ \"./node_modules/lodash/_arrayMap.js\"),\n    isArray = __webpack_require__(/*! ./isArray */ \"./node_modules/lodash/isArray.js\"),\n    isSymbol = __webpack_require__(/*! ./isSymbol */ \"./node_modules/lodash/isSymbol.js\");\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0;\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n    symbolToString = symbolProto ? symbolProto.toString : undefined;\n\n/**\n * The base implementation of `_.toString` which doesn't convert nullish\n * values to empty strings.\n *\n * @private\n * @param {*} value The value to process.\n * @returns {string} Returns the string.\n */\nfunction baseToString(value) {\n  // Exit early for strings to avoid a performance hit in some environments.\n  if (typeof value == 'string') {\n    return value;\n  }\n  if (isArray(value)) {\n    // Recursively convert values (susceptible to call stack limits).\n    return arrayMap(value, baseToString) + '';\n  }\n  if (isSymbol(value)) {\n    return symbolToString ? symbolToString.call(value) : '';\n  }\n  var result = (value + '');\n  return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n}\n\nmodule.exports = baseToString;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/_baseTrim.js\":\n/*!******************************************!*\\\n  !*** ./node_modules/lodash/_baseTrim.js ***!\n  \\******************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar trimmedEndIndex = __webpack_require__(/*! ./_trimmedEndIndex */ \"./node_modules/lodash/_trimmedEndIndex.js\");\n\n/** Used to match leading whitespace. */\nvar reTrimStart = /^\\s+/;\n\n/**\n * The base implementation of `_.trim`.\n *\n * @private\n * @param {string} string The string to trim.\n * @returns {string} Returns the trimmed string.\n */\nfunction baseTrim(string) {\n  return string\n    ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, '')\n    : string;\n}\n\nmodule.exports = baseTrim;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/_baseUnary.js\":\n/*!*******************************************!*\\\n  !*** ./node_modules/lodash/_baseUnary.js ***!\n  \\*******************************************/\n/*! no static exports found */\n/***/ (function(module, exports) {\n\n/**\n * The base implementation of `_.unary` without support for storing metadata.\n *\n * @private\n * @param {Function} func The function to cap arguments for.\n * @returns {Function} Returns the new capped function.\n */\nfunction baseUnary(func) {\n  return function(value) {\n    return func(value);\n  };\n}\n\nmodule.exports = baseUnary;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/_baseUniq.js\":\n/*!******************************************!*\\\n  !*** ./node_modules/lodash/_baseUniq.js ***!\n  \\******************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar SetCache = __webpack_require__(/*! ./_SetCache */ \"./node_modules/lodash/_SetCache.js\"),\n    arrayIncludes = __webpack_require__(/*! ./_arrayIncludes */ \"./node_modules/lodash/_arrayIncludes.js\"),\n    arrayIncludesWith = __webpack_require__(/*! ./_arrayIncludesWith */ \"./node_modules/lodash/_arrayIncludesWith.js\"),\n    cacheHas = __webpack_require__(/*! ./_cacheHas */ \"./node_modules/lodash/_cacheHas.js\"),\n    createSet = __webpack_require__(/*! ./_createSet */ \"./node_modules/lodash/_createSet.js\"),\n    setToArray = __webpack_require__(/*! ./_setToArray */ \"./node_modules/lodash/_setToArray.js\");\n\n/** Used as the size to enable large array optimizations. */\nvar LARGE_ARRAY_SIZE = 200;\n\n/**\n * The base implementation of `_.uniqBy` without support for iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {Function} [iteratee] The iteratee invoked per element.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new duplicate free array.\n */\nfunction baseUniq(array, iteratee, comparator) {\n  var index = -1,\n      includes = arrayIncludes,\n      length = array.length,\n      isCommon = true,\n      result = [],\n      seen = result;\n\n  if (comparator) {\n    isCommon = false;\n    includes = arrayIncludesWith;\n  }\n  else if (length >= LARGE_ARRAY_SIZE) {\n    var set = iteratee ? null : createSet(array);\n    if (set) {\n      return setToArray(set);\n    }\n    isCommon = false;\n    includes = cacheHas;\n    seen = new SetCache;\n  }\n  else {\n    seen = iteratee ? [] : result;\n  }\n  outer:\n  while (++index < length) {\n    var value = array[index],\n        computed = iteratee ? iteratee(value) : value;\n\n    value = (comparator || value !== 0) ? value : 0;\n    if (isCommon && computed === computed) {\n      var seenIndex = seen.length;\n      while (seenIndex--) {\n        if (seen[seenIndex] === computed) {\n          continue outer;\n        }\n      }\n      if (iteratee) {\n        seen.push(computed);\n      }\n      result.push(value);\n    }\n    else if (!includes(seen, computed, comparator)) {\n      if (seen !== result) {\n        seen.push(computed);\n      }\n      result.push(value);\n    }\n  }\n  return result;\n}\n\nmodule.exports = baseUniq;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/_baseValues.js\":\n/*!********************************************!*\\\n  !*** ./node_modules/lodash/_baseValues.js ***!\n  \\********************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar arrayMap = __webpack_require__(/*! ./_arrayMap */ \"./node_modules/lodash/_arrayMap.js\");\n\n/**\n * The base implementation of `_.values` and `_.valuesIn` which creates an\n * array of `object` property values corresponding to the property names\n * of `props`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array} props The property names to get values for.\n * @returns {Object} Returns the array of property values.\n */\nfunction baseValues(object, props) {\n  return arrayMap(props, function(key) {\n    return object[key];\n  });\n}\n\nmodule.exports = baseValues;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/_baseZipObject.js\":\n/*!***********************************************!*\\\n  !*** ./node_modules/lodash/_baseZipObject.js ***!\n  \\***********************************************/\n/*! no static exports found */\n/***/ (function(module, exports) {\n\n/**\n * This base implementation of `_.zipObject` which assigns values using `assignFunc`.\n *\n * @private\n * @param {Array} props The property identifiers.\n * @param {Array} values The property values.\n * @param {Function} assignFunc The function to assign values.\n * @returns {Object} Returns the new object.\n */\nfunction baseZipObject(props, values, assignFunc) {\n  var index = -1,\n      length = props.length,\n      valsLength = values.length,\n      result = {};\n\n  while (++index < length) {\n    var value = index < valsLength ? values[index] : undefined;\n    assignFunc(result, props[index], value);\n  }\n  return result;\n}\n\nmodule.exports = baseZipObject;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/_cacheHas.js\":\n/*!******************************************!*\\\n  !*** ./node_modules/lodash/_cacheHas.js ***!\n  \\******************************************/\n/*! no static exports found */\n/***/ (function(module, exports) {\n\n/**\n * Checks if a `cache` value for `key` exists.\n *\n * @private\n * @param {Object} cache The cache to query.\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction cacheHas(cache, key) {\n  return cache.has(key);\n}\n\nmodule.exports = cacheHas;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/_castFunction.js\":\n/*!**********************************************!*\\\n  !*** ./node_modules/lodash/_castFunction.js ***!\n  \\**********************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar identity = __webpack_require__(/*! ./identity */ \"./node_modules/lodash/identity.js\");\n\n/**\n * Casts `value` to `identity` if it's not a function.\n *\n * @private\n * @param {*} value The value to inspect.\n * @returns {Function} Returns cast function.\n */\nfunction castFunction(value) {\n  return typeof value == 'function' ? value : identity;\n}\n\nmodule.exports = castFunction;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/_castPath.js\":\n/*!******************************************!*\\\n  !*** ./node_modules/lodash/_castPath.js ***!\n  \\******************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar isArray = __webpack_require__(/*! ./isArray */ \"./node_modules/lodash/isArray.js\"),\n    isKey = __webpack_require__(/*! ./_isKey */ \"./node_modules/lodash/_isKey.js\"),\n    stringToPath = __webpack_require__(/*! ./_stringToPath */ \"./node_modules/lodash/_stringToPath.js\"),\n    toString = __webpack_require__(/*! ./toString */ \"./node_modules/lodash/toString.js\");\n\n/**\n * Casts `value` to a path array if it's not one.\n *\n * @private\n * @param {*} value The value to inspect.\n * @param {Object} [object] The object to query keys on.\n * @returns {Array} Returns the cast property path array.\n */\nfunction castPath(value, object) {\n  if (isArray(value)) {\n    return value;\n  }\n  return isKey(value, object) ? [value] : stringToPath(toString(value));\n}\n\nmodule.exports = castPath;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/_cloneArrayBuffer.js\":\n/*!**************************************************!*\\\n  !*** ./node_modules/lodash/_cloneArrayBuffer.js ***!\n  \\**************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar Uint8Array = __webpack_require__(/*! ./_Uint8Array */ \"./node_modules/lodash/_Uint8Array.js\");\n\n/**\n * Creates a clone of `arrayBuffer`.\n *\n * @private\n * @param {ArrayBuffer} arrayBuffer The array buffer to clone.\n * @returns {ArrayBuffer} Returns the cloned array buffer.\n */\nfunction cloneArrayBuffer(arrayBuffer) {\n  var result = new arrayBuffer.constructor(arrayBuffer.byteLength);\n  new Uint8Array(result).set(new Uint8Array(arrayBuffer));\n  return result;\n}\n\nmodule.exports = cloneArrayBuffer;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/_cloneBuffer.js\":\n/*!*********************************************!*\\\n  !*** ./node_modules/lodash/_cloneBuffer.js ***!\n  \\*********************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n/* WEBPACK VAR INJECTION */(function(module) {var root = __webpack_require__(/*! ./_root */ \"./node_modules/lodash/_root.js\");\n\n/** Detect free variable `exports`. */\nvar freeExports =  true && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined,\n    allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined;\n\n/**\n * Creates a clone of  `buffer`.\n *\n * @private\n * @param {Buffer} buffer The buffer to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Buffer} Returns the cloned buffer.\n */\nfunction cloneBuffer(buffer, isDeep) {\n  if (isDeep) {\n    return buffer.slice();\n  }\n  var length = buffer.length,\n      result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);\n\n  buffer.copy(result);\n  return result;\n}\n\nmodule.exports = cloneBuffer;\n\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../webpack/buildin/module.js */ \"./node_modules/webpack/buildin/module.js\")(module)))\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/_cloneDataView.js\":\n/*!***********************************************!*\\\n  !*** ./node_modules/lodash/_cloneDataView.js ***!\n  \\***********************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar cloneArrayBuffer = __webpack_require__(/*! ./_cloneArrayBuffer */ \"./node_modules/lodash/_cloneArrayBuffer.js\");\n\n/**\n * Creates a clone of `dataView`.\n *\n * @private\n * @param {Object} dataView The data view to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned data view.\n */\nfunction cloneDataView(dataView, isDeep) {\n  var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;\n  return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);\n}\n\nmodule.exports = cloneDataView;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/_cloneRegExp.js\":\n/*!*********************************************!*\\\n  !*** ./node_modules/lodash/_cloneRegExp.js ***!\n  \\*********************************************/\n/*! no static exports found */\n/***/ (function(module, exports) {\n\n/** Used to match `RegExp` flags from their coerced string values. */\nvar reFlags = /\\w*$/;\n\n/**\n * Creates a clone of `regexp`.\n *\n * @private\n * @param {Object} regexp The regexp to clone.\n * @returns {Object} Returns the cloned regexp.\n */\nfunction cloneRegExp(regexp) {\n  var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));\n  result.lastIndex = regexp.lastIndex;\n  return result;\n}\n\nmodule.exports = cloneRegExp;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/_cloneSymbol.js\":\n/*!*********************************************!*\\\n  !*** ./node_modules/lodash/_cloneSymbol.js ***!\n  \\*********************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar Symbol = __webpack_require__(/*! ./_Symbol */ \"./node_modules/lodash/_Symbol.js\");\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n    symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;\n\n/**\n * Creates a clone of the `symbol` object.\n *\n * @private\n * @param {Object} symbol The symbol object to clone.\n * @returns {Object} Returns the cloned symbol object.\n */\nfunction cloneSymbol(symbol) {\n  return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};\n}\n\nmodule.exports = cloneSymbol;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/_cloneTypedArray.js\":\n/*!*************************************************!*\\\n  !*** ./node_modules/lodash/_cloneTypedArray.js ***!\n  \\*************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar cloneArrayBuffer = __webpack_require__(/*! ./_cloneArrayBuffer */ \"./node_modules/lodash/_cloneArrayBuffer.js\");\n\n/**\n * Creates a clone of `typedArray`.\n *\n * @private\n * @param {Object} typedArray The typed array to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned typed array.\n */\nfunction cloneTypedArray(typedArray, isDeep) {\n  var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;\n  return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);\n}\n\nmodule.exports = cloneTypedArray;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/_compareAscending.js\":\n/*!**************************************************!*\\\n  !*** ./node_modules/lodash/_compareAscending.js ***!\n  \\**************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar isSymbol = __webpack_require__(/*! ./isSymbol */ \"./node_modules/lodash/isSymbol.js\");\n\n/**\n * Compares values to sort them in ascending order.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {number} Returns the sort order indicator for `value`.\n */\nfunction compareAscending(value, other) {\n  if (value !== other) {\n    var valIsDefined = value !== undefined,\n        valIsNull = value === null,\n        valIsReflexive = value === value,\n        valIsSymbol = isSymbol(value);\n\n    var othIsDefined = other !== undefined,\n        othIsNull = other === null,\n        othIsReflexive = other === other,\n        othIsSymbol = isSymbol(other);\n\n    if ((!othIsNull && !othIsSymbol && !valIsSymbol && value > other) ||\n        (valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol) ||\n        (valIsNull && othIsDefined && othIsReflexive) ||\n        (!valIsDefined && othIsReflexive) ||\n        !valIsReflexive) {\n      return 1;\n    }\n    if ((!valIsNull && !valIsSymbol && !othIsSymbol && value < other) ||\n        (othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol) ||\n        (othIsNull && valIsDefined && valIsReflexive) ||\n        (!othIsDefined && valIsReflexive) ||\n        !othIsReflexive) {\n      return -1;\n    }\n  }\n  return 0;\n}\n\nmodule.exports = compareAscending;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/_compareMultiple.js\":\n/*!*************************************************!*\\\n  !*** ./node_modules/lodash/_compareMultiple.js ***!\n  \\*************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar compareAscending = __webpack_require__(/*! ./_compareAscending */ \"./node_modules/lodash/_compareAscending.js\");\n\n/**\n * Used by `_.orderBy` to compare multiple properties of a value to another\n * and stable sort them.\n *\n * If `orders` is unspecified, all values are sorted in ascending order. Otherwise,\n * specify an order of \"desc\" for descending or \"asc\" for ascending sort order\n * of corresponding values.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {boolean[]|string[]} orders The order to sort by for each property.\n * @returns {number} Returns the sort order indicator for `object`.\n */\nfunction compareMultiple(object, other, orders) {\n  var index = -1,\n      objCriteria = object.criteria,\n      othCriteria = other.criteria,\n      length = objCriteria.length,\n      ordersLength = orders.length;\n\n  while (++index < length) {\n    var result = compareAscending(objCriteria[index], othCriteria[index]);\n    if (result) {\n      if (index >= ordersLength) {\n        return result;\n      }\n      var order = orders[index];\n      return result * (order == 'desc' ? -1 : 1);\n    }\n  }\n  // Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications\n  // that causes it, under certain circumstances, to provide the same value for\n  // `object` and `other`. See https://github.com/jashkenas/underscore/pull/1247\n  // for more details.\n  //\n  // This also ensures a stable sort in V8 and other engines.\n  // See https://bugs.chromium.org/p/v8/issues/detail?id=90 for more details.\n  return object.index - other.index;\n}\n\nmodule.exports = compareMultiple;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/_copyArray.js\":\n/*!*******************************************!*\\\n  !*** ./node_modules/lodash/_copyArray.js ***!\n  \\*******************************************/\n/*! no static exports found */\n/***/ (function(module, exports) {\n\n/**\n * Copies the values of `source` to `array`.\n *\n * @private\n * @param {Array} source The array to copy values from.\n * @param {Array} [array=[]] The array to copy values to.\n * @returns {Array} Returns `array`.\n */\nfunction copyArray(source, array) {\n  var index = -1,\n      length = source.length;\n\n  array || (array = Array(length));\n  while (++index < length) {\n    array[index] = source[index];\n  }\n  return array;\n}\n\nmodule.exports = copyArray;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/_copyObject.js\":\n/*!********************************************!*\\\n  !*** ./node_modules/lodash/_copyObject.js ***!\n  \\********************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar assignValue = __webpack_require__(/*! ./_assignValue */ \"./node_modules/lodash/_assignValue.js\"),\n    baseAssignValue = __webpack_require__(/*! ./_baseAssignValue */ \"./node_modules/lodash/_baseAssignValue.js\");\n\n/**\n * Copies properties of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy properties from.\n * @param {Array} props The property identifiers to copy.\n * @param {Object} [object={}] The object to copy properties to.\n * @param {Function} [customizer] The function to customize copied values.\n * @returns {Object} Returns `object`.\n */\nfunction copyObject(source, props, object, customizer) {\n  var isNew = !object;\n  object || (object = {});\n\n  var index = -1,\n      length = props.length;\n\n  while (++index < length) {\n    var key = props[index];\n\n    var newValue = customizer\n      ? customizer(object[key], source[key], key, object, source)\n      : undefined;\n\n    if (newValue === undefined) {\n      newValue = source[key];\n    }\n    if (isNew) {\n      baseAssignValue(object, key, newValue);\n    } else {\n      assignValue(object, key, newValue);\n    }\n  }\n  return object;\n}\n\nmodule.exports = copyObject;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/_copySymbols.js\":\n/*!*********************************************!*\\\n  !*** ./node_modules/lodash/_copySymbols.js ***!\n  \\*********************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar copyObject = __webpack_require__(/*! ./_copyObject */ \"./node_modules/lodash/_copyObject.js\"),\n    getSymbols = __webpack_require__(/*! ./_getSymbols */ \"./node_modules/lodash/_getSymbols.js\");\n\n/**\n * Copies own symbols of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy symbols from.\n * @param {Object} [object={}] The object to copy symbols to.\n * @returns {Object} Returns `object`.\n */\nfunction copySymbols(source, object) {\n  return copyObject(source, getSymbols(source), object);\n}\n\nmodule.exports = copySymbols;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/_copySymbolsIn.js\":\n/*!***********************************************!*\\\n  !*** ./node_modules/lodash/_copySymbolsIn.js ***!\n  \\***********************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar copyObject = __webpack_require__(/*! ./_copyObject */ \"./node_modules/lodash/_copyObject.js\"),\n    getSymbolsIn = __webpack_require__(/*! ./_getSymbolsIn */ \"./node_modules/lodash/_getSymbolsIn.js\");\n\n/**\n * Copies own and inherited symbols of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy symbols from.\n * @param {Object} [object={}] The object to copy symbols to.\n * @returns {Object} Returns `object`.\n */\nfunction copySymbolsIn(source, object) {\n  return copyObject(source, getSymbolsIn(source), object);\n}\n\nmodule.exports = copySymbolsIn;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/_coreJsData.js\":\n/*!********************************************!*\\\n  !*** ./node_modules/lodash/_coreJsData.js ***!\n  \\********************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar root = __webpack_require__(/*! ./_root */ \"./node_modules/lodash/_root.js\");\n\n/** Used to detect overreaching core-js shims. */\nvar coreJsData = root['__core-js_shared__'];\n\nmodule.exports = coreJsData;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/_createAssigner.js\":\n/*!************************************************!*\\\n  !*** ./node_modules/lodash/_createAssigner.js ***!\n  \\************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar baseRest = __webpack_require__(/*! ./_baseRest */ \"./node_modules/lodash/_baseRest.js\"),\n    isIterateeCall = __webpack_require__(/*! ./_isIterateeCall */ \"./node_modules/lodash/_isIterateeCall.js\");\n\n/**\n * Creates a function like `_.assign`.\n *\n * @private\n * @param {Function} assigner The function to assign values.\n * @returns {Function} Returns the new assigner function.\n */\nfunction createAssigner(assigner) {\n  return baseRest(function(object, sources) {\n    var index = -1,\n        length = sources.length,\n        customizer = length > 1 ? sources[length - 1] : undefined,\n        guard = length > 2 ? sources[2] : undefined;\n\n    customizer = (assigner.length > 3 && typeof customizer == 'function')\n      ? (length--, customizer)\n      : undefined;\n\n    if (guard && isIterateeCall(sources[0], sources[1], guard)) {\n      customizer = length < 3 ? undefined : customizer;\n      length = 1;\n    }\n    object = Object(object);\n    while (++index < length) {\n      var source = sources[index];\n      if (source) {\n        assigner(object, source, index, customizer);\n      }\n    }\n    return object;\n  });\n}\n\nmodule.exports = createAssigner;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/_createBaseEach.js\":\n/*!************************************************!*\\\n  !*** ./node_modules/lodash/_createBaseEach.js ***!\n  \\************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar isArrayLike = __webpack_require__(/*! ./isArrayLike */ \"./node_modules/lodash/isArrayLike.js\");\n\n/**\n * Creates a `baseEach` or `baseEachRight` function.\n *\n * @private\n * @param {Function} eachFunc The function to iterate over a collection.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new base function.\n */\nfunction createBaseEach(eachFunc, fromRight) {\n  return function(collection, iteratee) {\n    if (collection == null) {\n      return collection;\n    }\n    if (!isArrayLike(collection)) {\n      return eachFunc(collection, iteratee);\n    }\n    var length = collection.length,\n        index = fromRight ? length : -1,\n        iterable = Object(collection);\n\n    while ((fromRight ? index-- : ++index < length)) {\n      if (iteratee(iterable[index], index, iterable) === false) {\n        break;\n      }\n    }\n    return collection;\n  };\n}\n\nmodule.exports = createBaseEach;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/_createBaseFor.js\":\n/*!***********************************************!*\\\n  !*** ./node_modules/lodash/_createBaseFor.js ***!\n  \\***********************************************/\n/*! no static exports found */\n/***/ (function(module, exports) {\n\n/**\n * Creates a base function for methods like `_.forIn` and `_.forOwn`.\n *\n * @private\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new base function.\n */\nfunction createBaseFor(fromRight) {\n  return function(object, iteratee, keysFunc) {\n    var index = -1,\n        iterable = Object(object),\n        props = keysFunc(object),\n        length = props.length;\n\n    while (length--) {\n      var key = props[fromRight ? length : ++index];\n      if (iteratee(iterable[key], key, iterable) === false) {\n        break;\n      }\n    }\n    return object;\n  };\n}\n\nmodule.exports = createBaseFor;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/_createFind.js\":\n/*!********************************************!*\\\n  !*** ./node_modules/lodash/_createFind.js ***!\n  \\********************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar baseIteratee = __webpack_require__(/*! ./_baseIteratee */ \"./node_modules/lodash/_baseIteratee.js\"),\n    isArrayLike = __webpack_require__(/*! ./isArrayLike */ \"./node_modules/lodash/isArrayLike.js\"),\n    keys = __webpack_require__(/*! ./keys */ \"./node_modules/lodash/keys.js\");\n\n/**\n * Creates a `_.find` or `_.findLast` function.\n *\n * @private\n * @param {Function} findIndexFunc The function to find the collection index.\n * @returns {Function} Returns the new find function.\n */\nfunction createFind(findIndexFunc) {\n  return function(collection, predicate, fromIndex) {\n    var iterable = Object(collection);\n    if (!isArrayLike(collection)) {\n      var iteratee = baseIteratee(predicate, 3);\n      collection = keys(collection);\n      predicate = function(key) { return iteratee(iterable[key], key, iterable); };\n    }\n    var index = findIndexFunc(collection, predicate, fromIndex);\n    return index > -1 ? iterable[iteratee ? collection[index] : index] : undefined;\n  };\n}\n\nmodule.exports = createFind;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/_createRange.js\":\n/*!*********************************************!*\\\n  !*** ./node_modules/lodash/_createRange.js ***!\n  \\*********************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar baseRange = __webpack_require__(/*! ./_baseRange */ \"./node_modules/lodash/_baseRange.js\"),\n    isIterateeCall = __webpack_require__(/*! ./_isIterateeCall */ \"./node_modules/lodash/_isIterateeCall.js\"),\n    toFinite = __webpack_require__(/*! ./toFinite */ \"./node_modules/lodash/toFinite.js\");\n\n/**\n * Creates a `_.range` or `_.rangeRight` function.\n *\n * @private\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new range function.\n */\nfunction createRange(fromRight) {\n  return function(start, end, step) {\n    if (step && typeof step != 'number' && isIterateeCall(start, end, step)) {\n      end = step = undefined;\n    }\n    // Ensure the sign of `-0` is preserved.\n    start = toFinite(start);\n    if (end === undefined) {\n      end = start;\n      start = 0;\n    } else {\n      end = toFinite(end);\n    }\n    step = step === undefined ? (start < end ? 1 : -1) : toFinite(step);\n    return baseRange(start, end, step, fromRight);\n  };\n}\n\nmodule.exports = createRange;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/_createSet.js\":\n/*!*******************************************!*\\\n  !*** ./node_modules/lodash/_createSet.js ***!\n  \\*******************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar Set = __webpack_require__(/*! ./_Set */ \"./node_modules/lodash/_Set.js\"),\n    noop = __webpack_require__(/*! ./noop */ \"./node_modules/lodash/noop.js\"),\n    setToArray = __webpack_require__(/*! ./_setToArray */ \"./node_modules/lodash/_setToArray.js\");\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0;\n\n/**\n * Creates a set object of `values`.\n *\n * @private\n * @param {Array} values The values to add to the set.\n * @returns {Object} Returns the new set.\n */\nvar createSet = !(Set && (1 / setToArray(new Set([,-0]))[1]) == INFINITY) ? noop : function(values) {\n  return new Set(values);\n};\n\nmodule.exports = createSet;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/_defineProperty.js\":\n/*!************************************************!*\\\n  !*** ./node_modules/lodash/_defineProperty.js ***!\n  \\************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar getNative = __webpack_require__(/*! ./_getNative */ \"./node_modules/lodash/_getNative.js\");\n\nvar defineProperty = (function() {\n  try {\n    var func = getNative(Object, 'defineProperty');\n    func({}, '', {});\n    return func;\n  } catch (e) {}\n}());\n\nmodule.exports = defineProperty;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/_equalArrays.js\":\n/*!*********************************************!*\\\n  !*** ./node_modules/lodash/_equalArrays.js ***!\n  \\*********************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar SetCache = __webpack_require__(/*! ./_SetCache */ \"./node_modules/lodash/_SetCache.js\"),\n    arraySome = __webpack_require__(/*! ./_arraySome */ \"./node_modules/lodash/_arraySome.js\"),\n    cacheHas = __webpack_require__(/*! ./_cacheHas */ \"./node_modules/lodash/_cacheHas.js\");\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n    COMPARE_UNORDERED_FLAG = 2;\n\n/**\n * A specialized version of `baseIsEqualDeep` for arrays with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Array} array The array to compare.\n * @param {Array} other The other array to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `array` and `other` objects.\n * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.\n */\nfunction equalArrays(array, other, bitmask, customizer, equalFunc, stack) {\n  var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n      arrLength = array.length,\n      othLength = other.length;\n\n  if (arrLength != othLength && !(isPartial && othLength > arrLength)) {\n    return false;\n  }\n  // Check that cyclic values are equal.\n  var arrStacked = stack.get(array);\n  var othStacked = stack.get(other);\n  if (arrStacked && othStacked) {\n    return arrStacked == other && othStacked == array;\n  }\n  var index = -1,\n      result = true,\n      seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined;\n\n  stack.set(array, other);\n  stack.set(other, array);\n\n  // Ignore non-index properties.\n  while (++index < arrLength) {\n    var arrValue = array[index],\n        othValue = other[index];\n\n    if (customizer) {\n      var compared = isPartial\n        ? customizer(othValue, arrValue, index, other, array, stack)\n        : customizer(arrValue, othValue, index, array, other, stack);\n    }\n    if (compared !== undefined) {\n      if (compared) {\n        continue;\n      }\n      result = false;\n      break;\n    }\n    // Recursively compare arrays (susceptible to call stack limits).\n    if (seen) {\n      if (!arraySome(other, function(othValue, othIndex) {\n            if (!cacheHas(seen, othIndex) &&\n                (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {\n              return seen.push(othIndex);\n            }\n          })) {\n        result = false;\n        break;\n      }\n    } else if (!(\n          arrValue === othValue ||\n            equalFunc(arrValue, othValue, bitmask, customizer, stack)\n        )) {\n      result = false;\n      break;\n    }\n  }\n  stack['delete'](array);\n  stack['delete'](other);\n  return result;\n}\n\nmodule.exports = equalArrays;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/_equalByTag.js\":\n/*!********************************************!*\\\n  !*** ./node_modules/lodash/_equalByTag.js ***!\n  \\********************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar Symbol = __webpack_require__(/*! ./_Symbol */ \"./node_modules/lodash/_Symbol.js\"),\n    Uint8Array = __webpack_require__(/*! ./_Uint8Array */ \"./node_modules/lodash/_Uint8Array.js\"),\n    eq = __webpack_require__(/*! ./eq */ \"./node_modules/lodash/eq.js\"),\n    equalArrays = __webpack_require__(/*! ./_equalArrays */ \"./node_modules/lodash/_equalArrays.js\"),\n    mapToArray = __webpack_require__(/*! ./_mapToArray */ \"./node_modules/lodash/_mapToArray.js\"),\n    setToArray = __webpack_require__(/*! ./_setToArray */ \"./node_modules/lodash/_setToArray.js\");\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n    COMPARE_UNORDERED_FLAG = 2;\n\n/** `Object#toString` result references. */\nvar boolTag = '[object Boolean]',\n    dateTag = '[object Date]',\n    errorTag = '[object Error]',\n    mapTag = '[object Map]',\n    numberTag = '[object Number]',\n    regexpTag = '[object RegExp]',\n    setTag = '[object Set]',\n    stringTag = '[object String]',\n    symbolTag = '[object Symbol]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n    dataViewTag = '[object DataView]';\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n    symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;\n\n/**\n * A specialized version of `baseIsEqualDeep` for comparing objects of\n * the same `toStringTag`.\n *\n * **Note:** This function only supports comparing values with tags of\n * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {string} tag The `toStringTag` of the objects to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {\n  switch (tag) {\n    case dataViewTag:\n      if ((object.byteLength != other.byteLength) ||\n          (object.byteOffset != other.byteOffset)) {\n        return false;\n      }\n      object = object.buffer;\n      other = other.buffer;\n\n    case arrayBufferTag:\n      if ((object.byteLength != other.byteLength) ||\n          !equalFunc(new Uint8Array(object), new Uint8Array(other))) {\n        return false;\n      }\n      return true;\n\n    case boolTag:\n    case dateTag:\n    case numberTag:\n      // Coerce booleans to `1` or `0` and dates to milliseconds.\n      // Invalid dates are coerced to `NaN`.\n      return eq(+object, +other);\n\n    case errorTag:\n      return object.name == other.name && object.message == other.message;\n\n    case regexpTag:\n    case stringTag:\n      // Coerce regexes to strings and treat strings, primitives and objects,\n      // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring\n      // for more details.\n      return object == (other + '');\n\n    case mapTag:\n      var convert = mapToArray;\n\n    case setTag:\n      var isPartial = bitmask & COMPARE_PARTIAL_FLAG;\n      convert || (convert = setToArray);\n\n      if (object.size != other.size && !isPartial) {\n        return false;\n      }\n      // Assume cyclic values are equal.\n      var stacked = stack.get(object);\n      if (stacked) {\n        return stacked == other;\n      }\n      bitmask |= COMPARE_UNORDERED_FLAG;\n\n      // Recursively compare objects (susceptible to call stack limits).\n      stack.set(object, other);\n      var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);\n      stack['delete'](object);\n      return result;\n\n    case symbolTag:\n      if (symbolValueOf) {\n        return symbolValueOf.call(object) == symbolValueOf.call(other);\n      }\n  }\n  return false;\n}\n\nmodule.exports = equalByTag;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/_equalObjects.js\":\n/*!**********************************************!*\\\n  !*** ./node_modules/lodash/_equalObjects.js ***!\n  \\**********************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar getAllKeys = __webpack_require__(/*! ./_getAllKeys */ \"./node_modules/lodash/_getAllKeys.js\");\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1;\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * A specialized version of `baseIsEqualDeep` for objects with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalObjects(object, other, bitmask, customizer, equalFunc, stack) {\n  var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n      objProps = getAllKeys(object),\n      objLength = objProps.length,\n      othProps = getAllKeys(other),\n      othLength = othProps.length;\n\n  if (objLength != othLength && !isPartial) {\n    return false;\n  }\n  var index = objLength;\n  while (index--) {\n    var key = objProps[index];\n    if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {\n      return false;\n    }\n  }\n  // Check that cyclic values are equal.\n  var objStacked = stack.get(object);\n  var othStacked = stack.get(other);\n  if (objStacked && othStacked) {\n    return objStacked == other && othStacked == object;\n  }\n  var result = true;\n  stack.set(object, other);\n  stack.set(other, object);\n\n  var skipCtor = isPartial;\n  while (++index < objLength) {\n    key = objProps[index];\n    var objValue = object[key],\n        othValue = other[key];\n\n    if (customizer) {\n      var compared = isPartial\n        ? customizer(othValue, objValue, key, other, object, stack)\n        : customizer(objValue, othValue, key, object, other, stack);\n    }\n    // Recursively compare objects (susceptible to call stack limits).\n    if (!(compared === undefined\n          ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))\n          : compared\n        )) {\n      result = false;\n      break;\n    }\n    skipCtor || (skipCtor = key == 'constructor');\n  }\n  if (result && !skipCtor) {\n    var objCtor = object.constructor,\n        othCtor = other.constructor;\n\n    // Non `Object` object instances with different constructors are not equal.\n    if (objCtor != othCtor &&\n        ('constructor' in object && 'constructor' in other) &&\n        !(typeof objCtor == 'function' && objCtor instanceof objCtor &&\n          typeof othCtor == 'function' && othCtor instanceof othCtor)) {\n      result = false;\n    }\n  }\n  stack['delete'](object);\n  stack['delete'](other);\n  return result;\n}\n\nmodule.exports = equalObjects;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/_flatRest.js\":\n/*!******************************************!*\\\n  !*** ./node_modules/lodash/_flatRest.js ***!\n  \\******************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar flatten = __webpack_require__(/*! ./flatten */ \"./node_modules/lodash/flatten.js\"),\n    overRest = __webpack_require__(/*! ./_overRest */ \"./node_modules/lodash/_overRest.js\"),\n    setToString = __webpack_require__(/*! ./_setToString */ \"./node_modules/lodash/_setToString.js\");\n\n/**\n * A specialized version of `baseRest` which flattens the rest array.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @returns {Function} Returns the new function.\n */\nfunction flatRest(func) {\n  return setToString(overRest(func, undefined, flatten), func + '');\n}\n\nmodule.exports = flatRest;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/_freeGlobal.js\":\n/*!********************************************!*\\\n  !*** ./node_modules/lodash/_freeGlobal.js ***!\n  \\********************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n/* WEBPACK VAR INJECTION */(function(global) {/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\nmodule.exports = freeGlobal;\n\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../webpack/buildin/global.js */ \"./node_modules/webpack/buildin/global.js\")))\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/_getAllKeys.js\":\n/*!********************************************!*\\\n  !*** ./node_modules/lodash/_getAllKeys.js ***!\n  \\********************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar baseGetAllKeys = __webpack_require__(/*! ./_baseGetAllKeys */ \"./node_modules/lodash/_baseGetAllKeys.js\"),\n    getSymbols = __webpack_require__(/*! ./_getSymbols */ \"./node_modules/lodash/_getSymbols.js\"),\n    keys = __webpack_require__(/*! ./keys */ \"./node_modules/lodash/keys.js\");\n\n/**\n * Creates an array of own enumerable property names and symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction getAllKeys(object) {\n  return baseGetAllKeys(object, keys, getSymbols);\n}\n\nmodule.exports = getAllKeys;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/_getAllKeysIn.js\":\n/*!**********************************************!*\\\n  !*** ./node_modules/lodash/_getAllKeysIn.js ***!\n  \\**********************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar baseGetAllKeys = __webpack_require__(/*! ./_baseGetAllKeys */ \"./node_modules/lodash/_baseGetAllKeys.js\"),\n    getSymbolsIn = __webpack_require__(/*! ./_getSymbolsIn */ \"./node_modules/lodash/_getSymbolsIn.js\"),\n    keysIn = __webpack_require__(/*! ./keysIn */ \"./node_modules/lodash/keysIn.js\");\n\n/**\n * Creates an array of own and inherited enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction getAllKeysIn(object) {\n  return baseGetAllKeys(object, keysIn, getSymbolsIn);\n}\n\nmodule.exports = getAllKeysIn;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/_getMapData.js\":\n/*!********************************************!*\\\n  !*** ./node_modules/lodash/_getMapData.js ***!\n  \\********************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar isKeyable = __webpack_require__(/*! ./_isKeyable */ \"./node_modules/lodash/_isKeyable.js\");\n\n/**\n * Gets the data for `map`.\n *\n * @private\n * @param {Object} map The map to query.\n * @param {string} key The reference key.\n * @returns {*} Returns the map data.\n */\nfunction getMapData(map, key) {\n  var data = map.__data__;\n  return isKeyable(key)\n    ? data[typeof key == 'string' ? 'string' : 'hash']\n    : data.map;\n}\n\nmodule.exports = getMapData;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/_getMatchData.js\":\n/*!**********************************************!*\\\n  !*** ./node_modules/lodash/_getMatchData.js ***!\n  \\**********************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar isStrictComparable = __webpack_require__(/*! ./_isStrictComparable */ \"./node_modules/lodash/_isStrictComparable.js\"),\n    keys = __webpack_require__(/*! ./keys */ \"./node_modules/lodash/keys.js\");\n\n/**\n * Gets the property names, values, and compare flags of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the match data of `object`.\n */\nfunction getMatchData(object) {\n  var result = keys(object),\n      length = result.length;\n\n  while (length--) {\n    var key = result[length],\n        value = object[key];\n\n    result[length] = [key, value, isStrictComparable(value)];\n  }\n  return result;\n}\n\nmodule.exports = getMatchData;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/_getNative.js\":\n/*!*******************************************!*\\\n  !*** ./node_modules/lodash/_getNative.js ***!\n  \\*******************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar baseIsNative = __webpack_require__(/*! ./_baseIsNative */ \"./node_modules/lodash/_baseIsNative.js\"),\n    getValue = __webpack_require__(/*! ./_getValue */ \"./node_modules/lodash/_getValue.js\");\n\n/**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\nfunction getNative(object, key) {\n  var value = getValue(object, key);\n  return baseIsNative(value) ? value : undefined;\n}\n\nmodule.exports = getNative;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/_getPrototype.js\":\n/*!**********************************************!*\\\n  !*** ./node_modules/lodash/_getPrototype.js ***!\n  \\**********************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar overArg = __webpack_require__(/*! ./_overArg */ \"./node_modules/lodash/_overArg.js\");\n\n/** Built-in value references. */\nvar getPrototype = overArg(Object.getPrototypeOf, Object);\n\nmodule.exports = getPrototype;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/_getRawTag.js\":\n/*!*******************************************!*\\\n  !*** ./node_modules/lodash/_getRawTag.js ***!\n  \\*******************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar Symbol = __webpack_require__(/*! ./_Symbol */ \"./node_modules/lodash/_Symbol.js\");\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n  var isOwn = hasOwnProperty.call(value, symToStringTag),\n      tag = value[symToStringTag];\n\n  try {\n    value[symToStringTag] = undefined;\n    var unmasked = true;\n  } catch (e) {}\n\n  var result = nativeObjectToString.call(value);\n  if (unmasked) {\n    if (isOwn) {\n      value[symToStringTag] = tag;\n    } else {\n      delete value[symToStringTag];\n    }\n  }\n  return result;\n}\n\nmodule.exports = getRawTag;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/_getSymbols.js\":\n/*!********************************************!*\\\n  !*** ./node_modules/lodash/_getSymbols.js ***!\n  \\********************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar arrayFilter = __webpack_require__(/*! ./_arrayFilter */ \"./node_modules/lodash/_arrayFilter.js\"),\n    stubArray = __webpack_require__(/*! ./stubArray */ \"./node_modules/lodash/stubArray.js\");\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeGetSymbols = Object.getOwnPropertySymbols;\n\n/**\n * Creates an array of the own enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\nvar getSymbols = !nativeGetSymbols ? stubArray : function(object) {\n  if (object == null) {\n    return [];\n  }\n  object = Object(object);\n  return arrayFilter(nativeGetSymbols(object), function(symbol) {\n    return propertyIsEnumerable.call(object, symbol);\n  });\n};\n\nmodule.exports = getSymbols;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/_getSymbolsIn.js\":\n/*!**********************************************!*\\\n  !*** ./node_modules/lodash/_getSymbolsIn.js ***!\n  \\**********************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar arrayPush = __webpack_require__(/*! ./_arrayPush */ \"./node_modules/lodash/_arrayPush.js\"),\n    getPrototype = __webpack_require__(/*! ./_getPrototype */ \"./node_modules/lodash/_getPrototype.js\"),\n    getSymbols = __webpack_require__(/*! ./_getSymbols */ \"./node_modules/lodash/_getSymbols.js\"),\n    stubArray = __webpack_require__(/*! ./stubArray */ \"./node_modules/lodash/stubArray.js\");\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeGetSymbols = Object.getOwnPropertySymbols;\n\n/**\n * Creates an array of the own and inherited enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\nvar getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) {\n  var result = [];\n  while (object) {\n    arrayPush(result, getSymbols(object));\n    object = getPrototype(object);\n  }\n  return result;\n};\n\nmodule.exports = getSymbolsIn;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/_getTag.js\":\n/*!****************************************!*\\\n  !*** ./node_modules/lodash/_getTag.js ***!\n  \\****************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar DataView = __webpack_require__(/*! ./_DataView */ \"./node_modules/lodash/_DataView.js\"),\n    Map = __webpack_require__(/*! ./_Map */ \"./node_modules/lodash/_Map.js\"),\n    Promise = __webpack_require__(/*! ./_Promise */ \"./node_modules/lodash/_Promise.js\"),\n    Set = __webpack_require__(/*! ./_Set */ \"./node_modules/lodash/_Set.js\"),\n    WeakMap = __webpack_require__(/*! ./_WeakMap */ \"./node_modules/lodash/_WeakMap.js\"),\n    baseGetTag = __webpack_require__(/*! ./_baseGetTag */ \"./node_modules/lodash/_baseGetTag.js\"),\n    toSource = __webpack_require__(/*! ./_toSource */ \"./node_modules/lodash/_toSource.js\");\n\n/** `Object#toString` result references. */\nvar mapTag = '[object Map]',\n    objectTag = '[object Object]',\n    promiseTag = '[object Promise]',\n    setTag = '[object Set]',\n    weakMapTag = '[object WeakMap]';\n\nvar dataViewTag = '[object DataView]';\n\n/** Used to detect maps, sets, and weakmaps. */\nvar dataViewCtorString = toSource(DataView),\n    mapCtorString = toSource(Map),\n    promiseCtorString = toSource(Promise),\n    setCtorString = toSource(Set),\n    weakMapCtorString = toSource(WeakMap);\n\n/**\n * Gets the `toStringTag` of `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nvar getTag = baseGetTag;\n\n// Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.\nif ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||\n    (Map && getTag(new Map) != mapTag) ||\n    (Promise && getTag(Promise.resolve()) != promiseTag) ||\n    (Set && getTag(new Set) != setTag) ||\n    (WeakMap && getTag(new WeakMap) != weakMapTag)) {\n  getTag = function(value) {\n    var result = baseGetTag(value),\n        Ctor = result == objectTag ? value.constructor : undefined,\n        ctorString = Ctor ? toSource(Ctor) : '';\n\n    if (ctorString) {\n      switch (ctorString) {\n        case dataViewCtorString: return dataViewTag;\n        case mapCtorString: return mapTag;\n        case promiseCtorString: return promiseTag;\n        case setCtorString: return setTag;\n        case weakMapCtorString: return weakMapTag;\n      }\n    }\n    return result;\n  };\n}\n\nmodule.exports = getTag;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/_getValue.js\":\n/*!******************************************!*\\\n  !*** ./node_modules/lodash/_getValue.js ***!\n  \\******************************************/\n/*! no static exports found */\n/***/ (function(module, exports) {\n\n/**\n * Gets the value at `key` of `object`.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction getValue(object, key) {\n  return object == null ? undefined : object[key];\n}\n\nmodule.exports = getValue;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/_hasPath.js\":\n/*!*****************************************!*\\\n  !*** ./node_modules/lodash/_hasPath.js ***!\n  \\*****************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar castPath = __webpack_require__(/*! ./_castPath */ \"./node_modules/lodash/_castPath.js\"),\n    isArguments = __webpack_require__(/*! ./isArguments */ \"./node_modules/lodash/isArguments.js\"),\n    isArray = __webpack_require__(/*! ./isArray */ \"./node_modules/lodash/isArray.js\"),\n    isIndex = __webpack_require__(/*! ./_isIndex */ \"./node_modules/lodash/_isIndex.js\"),\n    isLength = __webpack_require__(/*! ./isLength */ \"./node_modules/lodash/isLength.js\"),\n    toKey = __webpack_require__(/*! ./_toKey */ \"./node_modules/lodash/_toKey.js\");\n\n/**\n * Checks if `path` exists on `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array|string} path The path to check.\n * @param {Function} hasFunc The function to check properties.\n * @returns {boolean} Returns `true` if `path` exists, else `false`.\n */\nfunction hasPath(object, path, hasFunc) {\n  path = castPath(path, object);\n\n  var index = -1,\n      length = path.length,\n      result = false;\n\n  while (++index < length) {\n    var key = toKey(path[index]);\n    if (!(result = object != null && hasFunc(object, key))) {\n      break;\n    }\n    object = object[key];\n  }\n  if (result || ++index != length) {\n    return result;\n  }\n  length = object == null ? 0 : object.length;\n  return !!length && isLength(length) && isIndex(key, length) &&\n    (isArray(object) || isArguments(object));\n}\n\nmodule.exports = hasPath;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/_hasUnicode.js\":\n/*!********************************************!*\\\n  !*** ./node_modules/lodash/_hasUnicode.js ***!\n  \\********************************************/\n/*! no static exports found */\n/***/ (function(module, exports) {\n\n/** Used to compose unicode character classes. */\nvar rsAstralRange = '\\\\ud800-\\\\udfff',\n    rsComboMarksRange = '\\\\u0300-\\\\u036f',\n    reComboHalfMarksRange = '\\\\ufe20-\\\\ufe2f',\n    rsComboSymbolsRange = '\\\\u20d0-\\\\u20ff',\n    rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange,\n    rsVarRange = '\\\\ufe0e\\\\ufe0f';\n\n/** Used to compose unicode capture groups. */\nvar rsZWJ = '\\\\u200d';\n\n/** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */\nvar reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange  + rsComboRange + rsVarRange + ']');\n\n/**\n * Checks if `string` contains Unicode symbols.\n *\n * @private\n * @param {string} string The string to inspect.\n * @returns {boolean} Returns `true` if a symbol is found, else `false`.\n */\nfunction hasUnicode(string) {\n  return reHasUnicode.test(string);\n}\n\nmodule.exports = hasUnicode;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/_hashClear.js\":\n/*!*******************************************!*\\\n  !*** ./node_modules/lodash/_hashClear.js ***!\n  \\*******************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar nativeCreate = __webpack_require__(/*! ./_nativeCreate */ \"./node_modules/lodash/_nativeCreate.js\");\n\n/**\n * Removes all key-value entries from the hash.\n *\n * @private\n * @name clear\n * @memberOf Hash\n */\nfunction hashClear() {\n  this.__data__ = nativeCreate ? nativeCreate(null) : {};\n  this.size = 0;\n}\n\nmodule.exports = hashClear;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/_hashDelete.js\":\n/*!********************************************!*\\\n  !*** ./node_modules/lodash/_hashDelete.js ***!\n  \\********************************************/\n/*! no static exports found */\n/***/ (function(module, exports) {\n\n/**\n * Removes `key` and its value from the hash.\n *\n * @private\n * @name delete\n * @memberOf Hash\n * @param {Object} hash The hash to modify.\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction hashDelete(key) {\n  var result = this.has(key) && delete this.__data__[key];\n  this.size -= result ? 1 : 0;\n  return result;\n}\n\nmodule.exports = hashDelete;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/_hashGet.js\":\n/*!*****************************************!*\\\n  !*** ./node_modules/lodash/_hashGet.js ***!\n  \\*****************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar nativeCreate = __webpack_require__(/*! ./_nativeCreate */ \"./node_modules/lodash/_nativeCreate.js\");\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Gets the hash value for `key`.\n *\n * @private\n * @name get\n * @memberOf Hash\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction hashGet(key) {\n  var data = this.__data__;\n  if (nativeCreate) {\n    var result = data[key];\n    return result === HASH_UNDEFINED ? undefined : result;\n  }\n  return hasOwnProperty.call(data, key) ? data[key] : undefined;\n}\n\nmodule.exports = hashGet;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/_hashHas.js\":\n/*!*****************************************!*\\\n  !*** ./node_modules/lodash/_hashHas.js ***!\n  \\*****************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar nativeCreate = __webpack_require__(/*! ./_nativeCreate */ \"./node_modules/lodash/_nativeCreate.js\");\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Checks if a hash value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Hash\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction hashHas(key) {\n  var data = this.__data__;\n  return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);\n}\n\nmodule.exports = hashHas;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/_hashSet.js\":\n/*!*****************************************!*\\\n  !*** ./node_modules/lodash/_hashSet.js ***!\n  \\*****************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar nativeCreate = __webpack_require__(/*! ./_nativeCreate */ \"./node_modules/lodash/_nativeCreate.js\");\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/**\n * Sets the hash `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Hash\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the hash instance.\n */\nfunction hashSet(key, value) {\n  var data = this.__data__;\n  this.size += this.has(key) ? 0 : 1;\n  data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n  return this;\n}\n\nmodule.exports = hashSet;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/_initCloneArray.js\":\n/*!************************************************!*\\\n  !*** ./node_modules/lodash/_initCloneArray.js ***!\n  \\************************************************/\n/*! no static exports found */\n/***/ (function(module, exports) {\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Initializes an array clone.\n *\n * @private\n * @param {Array} array The array to clone.\n * @returns {Array} Returns the initialized clone.\n */\nfunction initCloneArray(array) {\n  var length = array.length,\n      result = new array.constructor(length);\n\n  // Add properties assigned by `RegExp#exec`.\n  if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {\n    result.index = array.index;\n    result.input = array.input;\n  }\n  return result;\n}\n\nmodule.exports = initCloneArray;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/_initCloneByTag.js\":\n/*!************************************************!*\\\n  !*** ./node_modules/lodash/_initCloneByTag.js ***!\n  \\************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar cloneArrayBuffer = __webpack_require__(/*! ./_cloneArrayBuffer */ \"./node_modules/lodash/_cloneArrayBuffer.js\"),\n    cloneDataView = __webpack_require__(/*! ./_cloneDataView */ \"./node_modules/lodash/_cloneDataView.js\"),\n    cloneRegExp = __webpack_require__(/*! ./_cloneRegExp */ \"./node_modules/lodash/_cloneRegExp.js\"),\n    cloneSymbol = __webpack_require__(/*! ./_cloneSymbol */ \"./node_modules/lodash/_cloneSymbol.js\"),\n    cloneTypedArray = __webpack_require__(/*! ./_cloneTypedArray */ \"./node_modules/lodash/_cloneTypedArray.js\");\n\n/** `Object#toString` result references. */\nvar boolTag = '[object Boolean]',\n    dateTag = '[object Date]',\n    mapTag = '[object Map]',\n    numberTag = '[object Number]',\n    regexpTag = '[object RegExp]',\n    setTag = '[object Set]',\n    stringTag = '[object String]',\n    symbolTag = '[object Symbol]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n    dataViewTag = '[object DataView]',\n    float32Tag = '[object Float32Array]',\n    float64Tag = '[object Float64Array]',\n    int8Tag = '[object Int8Array]',\n    int16Tag = '[object Int16Array]',\n    int32Tag = '[object Int32Array]',\n    uint8Tag = '[object Uint8Array]',\n    uint8ClampedTag = '[object Uint8ClampedArray]',\n    uint16Tag = '[object Uint16Array]',\n    uint32Tag = '[object Uint32Array]';\n\n/**\n * Initializes an object clone based on its `toStringTag`.\n *\n * **Note:** This function only supports cloning values with tags of\n * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`.\n *\n * @private\n * @param {Object} object The object to clone.\n * @param {string} tag The `toStringTag` of the object to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the initialized clone.\n */\nfunction initCloneByTag(object, tag, isDeep) {\n  var Ctor = object.constructor;\n  switch (tag) {\n    case arrayBufferTag:\n      return cloneArrayBuffer(object);\n\n    case boolTag:\n    case dateTag:\n      return new Ctor(+object);\n\n    case dataViewTag:\n      return cloneDataView(object, isDeep);\n\n    case float32Tag: case float64Tag:\n    case int8Tag: case int16Tag: case int32Tag:\n    case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:\n      return cloneTypedArray(object, isDeep);\n\n    case mapTag:\n      return new Ctor;\n\n    case numberTag:\n    case stringTag:\n      return new Ctor(object);\n\n    case regexpTag:\n      return cloneRegExp(object);\n\n    case setTag:\n      return new Ctor;\n\n    case symbolTag:\n      return cloneSymbol(object);\n  }\n}\n\nmodule.exports = initCloneByTag;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/_initCloneObject.js\":\n/*!*************************************************!*\\\n  !*** ./node_modules/lodash/_initCloneObject.js ***!\n  \\*************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar baseCreate = __webpack_require__(/*! ./_baseCreate */ \"./node_modules/lodash/_baseCreate.js\"),\n    getPrototype = __webpack_require__(/*! ./_getPrototype */ \"./node_modules/lodash/_getPrototype.js\"),\n    isPrototype = __webpack_require__(/*! ./_isPrototype */ \"./node_modules/lodash/_isPrototype.js\");\n\n/**\n * Initializes an object clone.\n *\n * @private\n * @param {Object} object The object to clone.\n * @returns {Object} Returns the initialized clone.\n */\nfunction initCloneObject(object) {\n  return (typeof object.constructor == 'function' && !isPrototype(object))\n    ? baseCreate(getPrototype(object))\n    : {};\n}\n\nmodule.exports = initCloneObject;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/_isFlattenable.js\":\n/*!***********************************************!*\\\n  !*** ./node_modules/lodash/_isFlattenable.js ***!\n  \\***********************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar Symbol = __webpack_require__(/*! ./_Symbol */ \"./node_modules/lodash/_Symbol.js\"),\n    isArguments = __webpack_require__(/*! ./isArguments */ \"./node_modules/lodash/isArguments.js\"),\n    isArray = __webpack_require__(/*! ./isArray */ \"./node_modules/lodash/isArray.js\");\n\n/** Built-in value references. */\nvar spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined;\n\n/**\n * Checks if `value` is a flattenable `arguments` object or array.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is flattenable, else `false`.\n */\nfunction isFlattenable(value) {\n  return isArray(value) || isArguments(value) ||\n    !!(spreadableSymbol && value && value[spreadableSymbol]);\n}\n\nmodule.exports = isFlattenable;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/_isIndex.js\":\n/*!*****************************************!*\\\n  !*** ./node_modules/lodash/_isIndex.js ***!\n  \\*****************************************/\n/*! no static exports found */\n/***/ (function(module, exports) {\n\n/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/** Used to detect unsigned integer values. */\nvar reIsUint = /^(?:0|[1-9]\\d*)$/;\n\n/**\n * Checks if `value` is a valid array-like index.\n *\n * @private\n * @param {*} value The value to check.\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n */\nfunction isIndex(value, length) {\n  var type = typeof value;\n  length = length == null ? MAX_SAFE_INTEGER : length;\n\n  return !!length &&\n    (type == 'number' ||\n      (type != 'symbol' && reIsUint.test(value))) &&\n        (value > -1 && value % 1 == 0 && value < length);\n}\n\nmodule.exports = isIndex;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/_isIterateeCall.js\":\n/*!************************************************!*\\\n  !*** ./node_modules/lodash/_isIterateeCall.js ***!\n  \\************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar eq = __webpack_require__(/*! ./eq */ \"./node_modules/lodash/eq.js\"),\n    isArrayLike = __webpack_require__(/*! ./isArrayLike */ \"./node_modules/lodash/isArrayLike.js\"),\n    isIndex = __webpack_require__(/*! ./_isIndex */ \"./node_modules/lodash/_isIndex.js\"),\n    isObject = __webpack_require__(/*! ./isObject */ \"./node_modules/lodash/isObject.js\");\n\n/**\n * Checks if the given arguments are from an iteratee call.\n *\n * @private\n * @param {*} value The potential iteratee value argument.\n * @param {*} index The potential iteratee index or key argument.\n * @param {*} object The potential iteratee object argument.\n * @returns {boolean} Returns `true` if the arguments are from an iteratee call,\n *  else `false`.\n */\nfunction isIterateeCall(value, index, object) {\n  if (!isObject(object)) {\n    return false;\n  }\n  var type = typeof index;\n  if (type == 'number'\n        ? (isArrayLike(object) && isIndex(index, object.length))\n        : (type == 'string' && index in object)\n      ) {\n    return eq(object[index], value);\n  }\n  return false;\n}\n\nmodule.exports = isIterateeCall;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/_isKey.js\":\n/*!***************************************!*\\\n  !*** ./node_modules/lodash/_isKey.js ***!\n  \\***************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar isArray = __webpack_require__(/*! ./isArray */ \"./node_modules/lodash/isArray.js\"),\n    isSymbol = __webpack_require__(/*! ./isSymbol */ \"./node_modules/lodash/isSymbol.js\");\n\n/** Used to match property names within property paths. */\nvar reIsDeepProp = /\\.|\\[(?:[^[\\]]*|([\"'])(?:(?!\\1)[^\\\\]|\\\\.)*?\\1)\\]/,\n    reIsPlainProp = /^\\w*$/;\n\n/**\n * Checks if `value` is a property name and not a property path.\n *\n * @private\n * @param {*} value The value to check.\n * @param {Object} [object] The object to query keys on.\n * @returns {boolean} Returns `true` if `value` is a property name, else `false`.\n */\nfunction isKey(value, object) {\n  if (isArray(value)) {\n    return false;\n  }\n  var type = typeof value;\n  if (type == 'number' || type == 'symbol' || type == 'boolean' ||\n      value == null || isSymbol(value)) {\n    return true;\n  }\n  return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||\n    (object != null && value in Object(object));\n}\n\nmodule.exports = isKey;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/_isKeyable.js\":\n/*!*******************************************!*\\\n  !*** ./node_modules/lodash/_isKeyable.js ***!\n  \\*******************************************/\n/*! no static exports found */\n/***/ (function(module, exports) {\n\n/**\n * Checks if `value` is suitable for use as unique object key.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n */\nfunction isKeyable(value) {\n  var type = typeof value;\n  return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n    ? (value !== '__proto__')\n    : (value === null);\n}\n\nmodule.exports = isKeyable;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/_isMasked.js\":\n/*!******************************************!*\\\n  !*** ./node_modules/lodash/_isMasked.js ***!\n  \\******************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar coreJsData = __webpack_require__(/*! ./_coreJsData */ \"./node_modules/lodash/_coreJsData.js\");\n\n/** Used to detect methods masquerading as native. */\nvar maskSrcKey = (function() {\n  var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n  return uid ? ('Symbol(src)_1.' + uid) : '';\n}());\n\n/**\n * Checks if `func` has its source masked.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n */\nfunction isMasked(func) {\n  return !!maskSrcKey && (maskSrcKey in func);\n}\n\nmodule.exports = isMasked;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/_isPrototype.js\":\n/*!*********************************************!*\\\n  !*** ./node_modules/lodash/_isPrototype.js ***!\n  \\*********************************************/\n/*! no static exports found */\n/***/ (function(module, exports) {\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Checks if `value` is likely a prototype object.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.\n */\nfunction isPrototype(value) {\n  var Ctor = value && value.constructor,\n      proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;\n\n  return value === proto;\n}\n\nmodule.exports = isPrototype;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/_isStrictComparable.js\":\n/*!****************************************************!*\\\n  !*** ./node_modules/lodash/_isStrictComparable.js ***!\n  \\****************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar isObject = __webpack_require__(/*! ./isObject */ \"./node_modules/lodash/isObject.js\");\n\n/**\n * Checks if `value` is suitable for strict equality comparisons, i.e. `===`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` if suitable for strict\n *  equality comparisons, else `false`.\n */\nfunction isStrictComparable(value) {\n  return value === value && !isObject(value);\n}\n\nmodule.exports = isStrictComparable;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/_listCacheClear.js\":\n/*!************************************************!*\\\n  !*** ./node_modules/lodash/_listCacheClear.js ***!\n  \\************************************************/\n/*! no static exports found */\n/***/ (function(module, exports) {\n\n/**\n * Removes all key-value entries from the list cache.\n *\n * @private\n * @name clear\n * @memberOf ListCache\n */\nfunction listCacheClear() {\n  this.__data__ = [];\n  this.size = 0;\n}\n\nmodule.exports = listCacheClear;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/_listCacheDelete.js\":\n/*!*************************************************!*\\\n  !*** ./node_modules/lodash/_listCacheDelete.js ***!\n  \\*************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar assocIndexOf = __webpack_require__(/*! ./_assocIndexOf */ \"./node_modules/lodash/_assocIndexOf.js\");\n\n/** Used for built-in method references. */\nvar arrayProto = Array.prototype;\n\n/** Built-in value references. */\nvar splice = arrayProto.splice;\n\n/**\n * Removes `key` and its value from the list cache.\n *\n * @private\n * @name delete\n * @memberOf ListCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction listCacheDelete(key) {\n  var data = this.__data__,\n      index = assocIndexOf(data, key);\n\n  if (index < 0) {\n    return false;\n  }\n  var lastIndex = data.length - 1;\n  if (index == lastIndex) {\n    data.pop();\n  } else {\n    splice.call(data, index, 1);\n  }\n  --this.size;\n  return true;\n}\n\nmodule.exports = listCacheDelete;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/_listCacheGet.js\":\n/*!**********************************************!*\\\n  !*** ./node_modules/lodash/_listCacheGet.js ***!\n  \\**********************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar assocIndexOf = __webpack_require__(/*! ./_assocIndexOf */ \"./node_modules/lodash/_assocIndexOf.js\");\n\n/**\n * Gets the list cache value for `key`.\n *\n * @private\n * @name get\n * @memberOf ListCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction listCacheGet(key) {\n  var data = this.__data__,\n      index = assocIndexOf(data, key);\n\n  return index < 0 ? undefined : data[index][1];\n}\n\nmodule.exports = listCacheGet;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/_listCacheHas.js\":\n/*!**********************************************!*\\\n  !*** ./node_modules/lodash/_listCacheHas.js ***!\n  \\**********************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar assocIndexOf = __webpack_require__(/*! ./_assocIndexOf */ \"./node_modules/lodash/_assocIndexOf.js\");\n\n/**\n * Checks if a list cache value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf ListCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction listCacheHas(key) {\n  return assocIndexOf(this.__data__, key) > -1;\n}\n\nmodule.exports = listCacheHas;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/_listCacheSet.js\":\n/*!**********************************************!*\\\n  !*** ./node_modules/lodash/_listCacheSet.js ***!\n  \\**********************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar assocIndexOf = __webpack_require__(/*! ./_assocIndexOf */ \"./node_modules/lodash/_assocIndexOf.js\");\n\n/**\n * Sets the list cache `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf ListCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the list cache instance.\n */\nfunction listCacheSet(key, value) {\n  var data = this.__data__,\n      index = assocIndexOf(data, key);\n\n  if (index < 0) {\n    ++this.size;\n    data.push([key, value]);\n  } else {\n    data[index][1] = value;\n  }\n  return this;\n}\n\nmodule.exports = listCacheSet;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/_mapCacheClear.js\":\n/*!***********************************************!*\\\n  !*** ./node_modules/lodash/_mapCacheClear.js ***!\n  \\***********************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar Hash = __webpack_require__(/*! ./_Hash */ \"./node_modules/lodash/_Hash.js\"),\n    ListCache = __webpack_require__(/*! ./_ListCache */ \"./node_modules/lodash/_ListCache.js\"),\n    Map = __webpack_require__(/*! ./_Map */ \"./node_modules/lodash/_Map.js\");\n\n/**\n * Removes all key-value entries from the map.\n *\n * @private\n * @name clear\n * @memberOf MapCache\n */\nfunction mapCacheClear() {\n  this.size = 0;\n  this.__data__ = {\n    'hash': new Hash,\n    'map': new (Map || ListCache),\n    'string': new Hash\n  };\n}\n\nmodule.exports = mapCacheClear;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/_mapCacheDelete.js\":\n/*!************************************************!*\\\n  !*** ./node_modules/lodash/_mapCacheDelete.js ***!\n  \\************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar getMapData = __webpack_require__(/*! ./_getMapData */ \"./node_modules/lodash/_getMapData.js\");\n\n/**\n * Removes `key` and its value from the map.\n *\n * @private\n * @name delete\n * @memberOf MapCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction mapCacheDelete(key) {\n  var result = getMapData(this, key)['delete'](key);\n  this.size -= result ? 1 : 0;\n  return result;\n}\n\nmodule.exports = mapCacheDelete;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/_mapCacheGet.js\":\n/*!*********************************************!*\\\n  !*** ./node_modules/lodash/_mapCacheGet.js ***!\n  \\*********************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar getMapData = __webpack_require__(/*! ./_getMapData */ \"./node_modules/lodash/_getMapData.js\");\n\n/**\n * Gets the map value for `key`.\n *\n * @private\n * @name get\n * @memberOf MapCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction mapCacheGet(key) {\n  return getMapData(this, key).get(key);\n}\n\nmodule.exports = mapCacheGet;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/_mapCacheHas.js\":\n/*!*********************************************!*\\\n  !*** ./node_modules/lodash/_mapCacheHas.js ***!\n  \\*********************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar getMapData = __webpack_require__(/*! ./_getMapData */ \"./node_modules/lodash/_getMapData.js\");\n\n/**\n * Checks if a map value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf MapCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction mapCacheHas(key) {\n  return getMapData(this, key).has(key);\n}\n\nmodule.exports = mapCacheHas;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/_mapCacheSet.js\":\n/*!*********************************************!*\\\n  !*** ./node_modules/lodash/_mapCacheSet.js ***!\n  \\*********************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar getMapData = __webpack_require__(/*! ./_getMapData */ \"./node_modules/lodash/_getMapData.js\");\n\n/**\n * Sets the map `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf MapCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the map cache instance.\n */\nfunction mapCacheSet(key, value) {\n  var data = getMapData(this, key),\n      size = data.size;\n\n  data.set(key, value);\n  this.size += data.size == size ? 0 : 1;\n  return this;\n}\n\nmodule.exports = mapCacheSet;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/_mapToArray.js\":\n/*!********************************************!*\\\n  !*** ./node_modules/lodash/_mapToArray.js ***!\n  \\********************************************/\n/*! no static exports found */\n/***/ (function(module, exports) {\n\n/**\n * Converts `map` to its key-value pairs.\n *\n * @private\n * @param {Object} map The map to convert.\n * @returns {Array} Returns the key-value pairs.\n */\nfunction mapToArray(map) {\n  var index = -1,\n      result = Array(map.size);\n\n  map.forEach(function(value, key) {\n    result[++index] = [key, value];\n  });\n  return result;\n}\n\nmodule.exports = mapToArray;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/_matchesStrictComparable.js\":\n/*!*********************************************************!*\\\n  !*** ./node_modules/lodash/_matchesStrictComparable.js ***!\n  \\*********************************************************/\n/*! no static exports found */\n/***/ (function(module, exports) {\n\n/**\n * A specialized version of `matchesProperty` for source values suitable\n * for strict equality comparisons, i.e. `===`.\n *\n * @private\n * @param {string} key The key of the property to get.\n * @param {*} srcValue The value to match.\n * @returns {Function} Returns the new spec function.\n */\nfunction matchesStrictComparable(key, srcValue) {\n  return function(object) {\n    if (object == null) {\n      return false;\n    }\n    return object[key] === srcValue &&\n      (srcValue !== undefined || (key in Object(object)));\n  };\n}\n\nmodule.exports = matchesStrictComparable;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/_memoizeCapped.js\":\n/*!***********************************************!*\\\n  !*** ./node_modules/lodash/_memoizeCapped.js ***!\n  \\***********************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar memoize = __webpack_require__(/*! ./memoize */ \"./node_modules/lodash/memoize.js\");\n\n/** Used as the maximum memoize cache size. */\nvar MAX_MEMOIZE_SIZE = 500;\n\n/**\n * A specialized version of `_.memoize` which clears the memoized function's\n * cache when it exceeds `MAX_MEMOIZE_SIZE`.\n *\n * @private\n * @param {Function} func The function to have its output memoized.\n * @returns {Function} Returns the new memoized function.\n */\nfunction memoizeCapped(func) {\n  var result = memoize(func, function(key) {\n    if (cache.size === MAX_MEMOIZE_SIZE) {\n      cache.clear();\n    }\n    return key;\n  });\n\n  var cache = result.cache;\n  return result;\n}\n\nmodule.exports = memoizeCapped;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/_nativeCreate.js\":\n/*!**********************************************!*\\\n  !*** ./node_modules/lodash/_nativeCreate.js ***!\n  \\**********************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar getNative = __webpack_require__(/*! ./_getNative */ \"./node_modules/lodash/_getNative.js\");\n\n/* Built-in method references that are verified to be native. */\nvar nativeCreate = getNative(Object, 'create');\n\nmodule.exports = nativeCreate;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/_nativeKeys.js\":\n/*!********************************************!*\\\n  !*** ./node_modules/lodash/_nativeKeys.js ***!\n  \\********************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar overArg = __webpack_require__(/*! ./_overArg */ \"./node_modules/lodash/_overArg.js\");\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeKeys = overArg(Object.keys, Object);\n\nmodule.exports = nativeKeys;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/_nativeKeysIn.js\":\n/*!**********************************************!*\\\n  !*** ./node_modules/lodash/_nativeKeysIn.js ***!\n  \\**********************************************/\n/*! no static exports found */\n/***/ (function(module, exports) {\n\n/**\n * This function is like\n * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * except that it includes inherited enumerable properties.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction nativeKeysIn(object) {\n  var result = [];\n  if (object != null) {\n    for (var key in Object(object)) {\n      result.push(key);\n    }\n  }\n  return result;\n}\n\nmodule.exports = nativeKeysIn;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/_nodeUtil.js\":\n/*!******************************************!*\\\n  !*** ./node_modules/lodash/_nodeUtil.js ***!\n  \\******************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n/* WEBPACK VAR INJECTION */(function(module) {var freeGlobal = __webpack_require__(/*! ./_freeGlobal */ \"./node_modules/lodash/_freeGlobal.js\");\n\n/** Detect free variable `exports`. */\nvar freeExports =  true && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Detect free variable `process` from Node.js. */\nvar freeProcess = moduleExports && freeGlobal.process;\n\n/** Used to access faster Node.js helpers. */\nvar nodeUtil = (function() {\n  try {\n    // Use `util.types` for Node.js 10+.\n    var types = freeModule && freeModule.require && freeModule.require('util').types;\n\n    if (types) {\n      return types;\n    }\n\n    // Legacy `process.binding('util')` for Node.js < 10.\n    return freeProcess && freeProcess.binding && freeProcess.binding('util');\n  } catch (e) {}\n}());\n\nmodule.exports = nodeUtil;\n\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../webpack/buildin/module.js */ \"./node_modules/webpack/buildin/module.js\")(module)))\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/_objectToString.js\":\n/*!************************************************!*\\\n  !*** ./node_modules/lodash/_objectToString.js ***!\n  \\************************************************/\n/*! no static exports found */\n/***/ (function(module, exports) {\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n  return nativeObjectToString.call(value);\n}\n\nmodule.exports = objectToString;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/_overArg.js\":\n/*!*****************************************!*\\\n  !*** ./node_modules/lodash/_overArg.js ***!\n  \\*****************************************/\n/*! no static exports found */\n/***/ (function(module, exports) {\n\n/**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\nfunction overArg(func, transform) {\n  return function(arg) {\n    return func(transform(arg));\n  };\n}\n\nmodule.exports = overArg;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/_overRest.js\":\n/*!******************************************!*\\\n  !*** ./node_modules/lodash/_overRest.js ***!\n  \\******************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar apply = __webpack_require__(/*! ./_apply */ \"./node_modules/lodash/_apply.js\");\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max;\n\n/**\n * A specialized version of `baseRest` which transforms the rest array.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @param {Function} transform The rest array transform.\n * @returns {Function} Returns the new function.\n */\nfunction overRest(func, start, transform) {\n  start = nativeMax(start === undefined ? (func.length - 1) : start, 0);\n  return function() {\n    var args = arguments,\n        index = -1,\n        length = nativeMax(args.length - start, 0),\n        array = Array(length);\n\n    while (++index < length) {\n      array[index] = args[start + index];\n    }\n    index = -1;\n    var otherArgs = Array(start + 1);\n    while (++index < start) {\n      otherArgs[index] = args[index];\n    }\n    otherArgs[start] = transform(array);\n    return apply(func, this, otherArgs);\n  };\n}\n\nmodule.exports = overRest;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/_root.js\":\n/*!**************************************!*\\\n  !*** ./node_modules/lodash/_root.js ***!\n  \\**************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar freeGlobal = __webpack_require__(/*! ./_freeGlobal */ \"./node_modules/lodash/_freeGlobal.js\");\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\nmodule.exports = root;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/_safeGet.js\":\n/*!*****************************************!*\\\n  !*** ./node_modules/lodash/_safeGet.js ***!\n  \\*****************************************/\n/*! no static exports found */\n/***/ (function(module, exports) {\n\n/**\n * Gets the value at `key`, unless `key` is \"__proto__\" or \"constructor\".\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction safeGet(object, key) {\n  if (key === 'constructor' && typeof object[key] === 'function') {\n    return;\n  }\n\n  if (key == '__proto__') {\n    return;\n  }\n\n  return object[key];\n}\n\nmodule.exports = safeGet;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/_setCacheAdd.js\":\n/*!*********************************************!*\\\n  !*** ./node_modules/lodash/_setCacheAdd.js ***!\n  \\*********************************************/\n/*! no static exports found */\n/***/ (function(module, exports) {\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/**\n * Adds `value` to the array cache.\n *\n * @private\n * @name add\n * @memberOf SetCache\n * @alias push\n * @param {*} value The value to cache.\n * @returns {Object} Returns the cache instance.\n */\nfunction setCacheAdd(value) {\n  this.__data__.set(value, HASH_UNDEFINED);\n  return this;\n}\n\nmodule.exports = setCacheAdd;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/_setCacheHas.js\":\n/*!*********************************************!*\\\n  !*** ./node_modules/lodash/_setCacheHas.js ***!\n  \\*********************************************/\n/*! no static exports found */\n/***/ (function(module, exports) {\n\n/**\n * Checks if `value` is in the array cache.\n *\n * @private\n * @name has\n * @memberOf SetCache\n * @param {*} value The value to search for.\n * @returns {number} Returns `true` if `value` is found, else `false`.\n */\nfunction setCacheHas(value) {\n  return this.__data__.has(value);\n}\n\nmodule.exports = setCacheHas;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/_setToArray.js\":\n/*!********************************************!*\\\n  !*** ./node_modules/lodash/_setToArray.js ***!\n  \\********************************************/\n/*! no static exports found */\n/***/ (function(module, exports) {\n\n/**\n * Converts `set` to an array of its values.\n *\n * @private\n * @param {Object} set The set to convert.\n * @returns {Array} Returns the values.\n */\nfunction setToArray(set) {\n  var index = -1,\n      result = Array(set.size);\n\n  set.forEach(function(value) {\n    result[++index] = value;\n  });\n  return result;\n}\n\nmodule.exports = setToArray;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/_setToString.js\":\n/*!*********************************************!*\\\n  !*** ./node_modules/lodash/_setToString.js ***!\n  \\*********************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar baseSetToString = __webpack_require__(/*! ./_baseSetToString */ \"./node_modules/lodash/_baseSetToString.js\"),\n    shortOut = __webpack_require__(/*! ./_shortOut */ \"./node_modules/lodash/_shortOut.js\");\n\n/**\n * Sets the `toString` method of `func` to return `string`.\n *\n * @private\n * @param {Function} func The function to modify.\n * @param {Function} string The `toString` result.\n * @returns {Function} Returns `func`.\n */\nvar setToString = shortOut(baseSetToString);\n\nmodule.exports = setToString;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/_shortOut.js\":\n/*!******************************************!*\\\n  !*** ./node_modules/lodash/_shortOut.js ***!\n  \\******************************************/\n/*! no static exports found */\n/***/ (function(module, exports) {\n\n/** Used to detect hot functions by number of calls within a span of milliseconds. */\nvar HOT_COUNT = 800,\n    HOT_SPAN = 16;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeNow = Date.now;\n\n/**\n * Creates a function that'll short out and invoke `identity` instead\n * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN`\n * milliseconds.\n *\n * @private\n * @param {Function} func The function to restrict.\n * @returns {Function} Returns the new shortable function.\n */\nfunction shortOut(func) {\n  var count = 0,\n      lastCalled = 0;\n\n  return function() {\n    var stamp = nativeNow(),\n        remaining = HOT_SPAN - (stamp - lastCalled);\n\n    lastCalled = stamp;\n    if (remaining > 0) {\n      if (++count >= HOT_COUNT) {\n        return arguments[0];\n      }\n    } else {\n      count = 0;\n    }\n    return func.apply(undefined, arguments);\n  };\n}\n\nmodule.exports = shortOut;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/_stackClear.js\":\n/*!********************************************!*\\\n  !*** ./node_modules/lodash/_stackClear.js ***!\n  \\********************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar ListCache = __webpack_require__(/*! ./_ListCache */ \"./node_modules/lodash/_ListCache.js\");\n\n/**\n * Removes all key-value entries from the stack.\n *\n * @private\n * @name clear\n * @memberOf Stack\n */\nfunction stackClear() {\n  this.__data__ = new ListCache;\n  this.size = 0;\n}\n\nmodule.exports = stackClear;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/_stackDelete.js\":\n/*!*********************************************!*\\\n  !*** ./node_modules/lodash/_stackDelete.js ***!\n  \\*********************************************/\n/*! no static exports found */\n/***/ (function(module, exports) {\n\n/**\n * Removes `key` and its value from the stack.\n *\n * @private\n * @name delete\n * @memberOf Stack\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction stackDelete(key) {\n  var data = this.__data__,\n      result = data['delete'](key);\n\n  this.size = data.size;\n  return result;\n}\n\nmodule.exports = stackDelete;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/_stackGet.js\":\n/*!******************************************!*\\\n  !*** ./node_modules/lodash/_stackGet.js ***!\n  \\******************************************/\n/*! no static exports found */\n/***/ (function(module, exports) {\n\n/**\n * Gets the stack value for `key`.\n *\n * @private\n * @name get\n * @memberOf Stack\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction stackGet(key) {\n  return this.__data__.get(key);\n}\n\nmodule.exports = stackGet;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/_stackHas.js\":\n/*!******************************************!*\\\n  !*** ./node_modules/lodash/_stackHas.js ***!\n  \\******************************************/\n/*! no static exports found */\n/***/ (function(module, exports) {\n\n/**\n * Checks if a stack value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Stack\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction stackHas(key) {\n  return this.__data__.has(key);\n}\n\nmodule.exports = stackHas;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/_stackSet.js\":\n/*!******************************************!*\\\n  !*** ./node_modules/lodash/_stackSet.js ***!\n  \\******************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar ListCache = __webpack_require__(/*! ./_ListCache */ \"./node_modules/lodash/_ListCache.js\"),\n    Map = __webpack_require__(/*! ./_Map */ \"./node_modules/lodash/_Map.js\"),\n    MapCache = __webpack_require__(/*! ./_MapCache */ \"./node_modules/lodash/_MapCache.js\");\n\n/** Used as the size to enable large array optimizations. */\nvar LARGE_ARRAY_SIZE = 200;\n\n/**\n * Sets the stack `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Stack\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the stack cache instance.\n */\nfunction stackSet(key, value) {\n  var data = this.__data__;\n  if (data instanceof ListCache) {\n    var pairs = data.__data__;\n    if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {\n      pairs.push([key, value]);\n      this.size = ++data.size;\n      return this;\n    }\n    data = this.__data__ = new MapCache(pairs);\n  }\n  data.set(key, value);\n  this.size = data.size;\n  return this;\n}\n\nmodule.exports = stackSet;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/_strictIndexOf.js\":\n/*!***********************************************!*\\\n  !*** ./node_modules/lodash/_strictIndexOf.js ***!\n  \\***********************************************/\n/*! no static exports found */\n/***/ (function(module, exports) {\n\n/**\n * A specialized version of `_.indexOf` which performs strict equality\n * comparisons of values, i.e. `===`.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @param {number} fromIndex The index to search from.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction strictIndexOf(array, value, fromIndex) {\n  var index = fromIndex - 1,\n      length = array.length;\n\n  while (++index < length) {\n    if (array[index] === value) {\n      return index;\n    }\n  }\n  return -1;\n}\n\nmodule.exports = strictIndexOf;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/_stringSize.js\":\n/*!********************************************!*\\\n  !*** ./node_modules/lodash/_stringSize.js ***!\n  \\********************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar asciiSize = __webpack_require__(/*! ./_asciiSize */ \"./node_modules/lodash/_asciiSize.js\"),\n    hasUnicode = __webpack_require__(/*! ./_hasUnicode */ \"./node_modules/lodash/_hasUnicode.js\"),\n    unicodeSize = __webpack_require__(/*! ./_unicodeSize */ \"./node_modules/lodash/_unicodeSize.js\");\n\n/**\n * Gets the number of symbols in `string`.\n *\n * @private\n * @param {string} string The string to inspect.\n * @returns {number} Returns the string size.\n */\nfunction stringSize(string) {\n  return hasUnicode(string)\n    ? unicodeSize(string)\n    : asciiSize(string);\n}\n\nmodule.exports = stringSize;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/_stringToPath.js\":\n/*!**********************************************!*\\\n  !*** ./node_modules/lodash/_stringToPath.js ***!\n  \\**********************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar memoizeCapped = __webpack_require__(/*! ./_memoizeCapped */ \"./node_modules/lodash/_memoizeCapped.js\");\n\n/** Used to match property names within property paths. */\nvar rePropName = /[^.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))/g;\n\n/** Used to match backslashes in property paths. */\nvar reEscapeChar = /\\\\(\\\\)?/g;\n\n/**\n * Converts `string` to a property path array.\n *\n * @private\n * @param {string} string The string to convert.\n * @returns {Array} Returns the property path array.\n */\nvar stringToPath = memoizeCapped(function(string) {\n  var result = [];\n  if (string.charCodeAt(0) === 46 /* . */) {\n    result.push('');\n  }\n  string.replace(rePropName, function(match, number, quote, subString) {\n    result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match));\n  });\n  return result;\n});\n\nmodule.exports = stringToPath;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/_toKey.js\":\n/*!***************************************!*\\\n  !*** ./node_modules/lodash/_toKey.js ***!\n  \\***************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar isSymbol = __webpack_require__(/*! ./isSymbol */ \"./node_modules/lodash/isSymbol.js\");\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0;\n\n/**\n * Converts `value` to a string key if it's not a string or symbol.\n *\n * @private\n * @param {*} value The value to inspect.\n * @returns {string|symbol} Returns the key.\n */\nfunction toKey(value) {\n  if (typeof value == 'string' || isSymbol(value)) {\n    return value;\n  }\n  var result = (value + '');\n  return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n}\n\nmodule.exports = toKey;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/_toSource.js\":\n/*!******************************************!*\\\n  !*** ./node_modules/lodash/_toSource.js ***!\n  \\******************************************/\n/*! no static exports found */\n/***/ (function(module, exports) {\n\n/** Used for built-in method references. */\nvar funcProto = Function.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to convert.\n * @returns {string} Returns the source code.\n */\nfunction toSource(func) {\n  if (func != null) {\n    try {\n      return funcToString.call(func);\n    } catch (e) {}\n    try {\n      return (func + '');\n    } catch (e) {}\n  }\n  return '';\n}\n\nmodule.exports = toSource;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/_trimmedEndIndex.js\":\n/*!*************************************************!*\\\n  !*** ./node_modules/lodash/_trimmedEndIndex.js ***!\n  \\*************************************************/\n/*! no static exports found */\n/***/ (function(module, exports) {\n\n/** Used to match a single whitespace character. */\nvar reWhitespace = /\\s/;\n\n/**\n * Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace\n * character of `string`.\n *\n * @private\n * @param {string} string The string to inspect.\n * @returns {number} Returns the index of the last non-whitespace character.\n */\nfunction trimmedEndIndex(string) {\n  var index = string.length;\n\n  while (index-- && reWhitespace.test(string.charAt(index))) {}\n  return index;\n}\n\nmodule.exports = trimmedEndIndex;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/_unicodeSize.js\":\n/*!*********************************************!*\\\n  !*** ./node_modules/lodash/_unicodeSize.js ***!\n  \\*********************************************/\n/*! no static exports found */\n/***/ (function(module, exports) {\n\n/** Used to compose unicode character classes. */\nvar rsAstralRange = '\\\\ud800-\\\\udfff',\n    rsComboMarksRange = '\\\\u0300-\\\\u036f',\n    reComboHalfMarksRange = '\\\\ufe20-\\\\ufe2f',\n    rsComboSymbolsRange = '\\\\u20d0-\\\\u20ff',\n    rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange,\n    rsVarRange = '\\\\ufe0e\\\\ufe0f';\n\n/** Used to compose unicode capture groups. */\nvar rsAstral = '[' + rsAstralRange + ']',\n    rsCombo = '[' + rsComboRange + ']',\n    rsFitz = '\\\\ud83c[\\\\udffb-\\\\udfff]',\n    rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')',\n    rsNonAstral = '[^' + rsAstralRange + ']',\n    rsRegional = '(?:\\\\ud83c[\\\\udde6-\\\\uddff]){2}',\n    rsSurrPair = '[\\\\ud800-\\\\udbff][\\\\udc00-\\\\udfff]',\n    rsZWJ = '\\\\u200d';\n\n/** Used to compose unicode regexes. */\nvar reOptMod = rsModifier + '?',\n    rsOptVar = '[' + rsVarRange + ']?',\n    rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*',\n    rsSeq = rsOptVar + reOptMod + rsOptJoin,\n    rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')';\n\n/** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */\nvar reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g');\n\n/**\n * Gets the size of a Unicode `string`.\n *\n * @private\n * @param {string} string The string inspect.\n * @returns {number} Returns the string size.\n */\nfunction unicodeSize(string) {\n  var result = reUnicode.lastIndex = 0;\n  while (reUnicode.test(string)) {\n    ++result;\n  }\n  return result;\n}\n\nmodule.exports = unicodeSize;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/clone.js\":\n/*!**************************************!*\\\n  !*** ./node_modules/lodash/clone.js ***!\n  \\**************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar baseClone = __webpack_require__(/*! ./_baseClone */ \"./node_modules/lodash/_baseClone.js\");\n\n/** Used to compose bitmasks for cloning. */\nvar CLONE_SYMBOLS_FLAG = 4;\n\n/**\n * Creates a shallow clone of `value`.\n *\n * **Note:** This method is loosely based on the\n * [structured clone algorithm](https://mdn.io/Structured_clone_algorithm)\n * and supports cloning arrays, array buffers, booleans, date objects, maps,\n * numbers, `Object` objects, regexes, sets, strings, symbols, and typed\n * arrays. The own enumerable properties of `arguments` objects are cloned\n * as plain objects. An empty object is returned for uncloneable values such\n * as error objects, functions, DOM nodes, and WeakMaps.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to clone.\n * @returns {*} Returns the cloned value.\n * @see _.cloneDeep\n * @example\n *\n * var objects = [{ 'a': 1 }, { 'b': 2 }];\n *\n * var shallow = _.clone(objects);\n * console.log(shallow[0] === objects[0]);\n * // => true\n */\nfunction clone(value) {\n  return baseClone(value, CLONE_SYMBOLS_FLAG);\n}\n\nmodule.exports = clone;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/cloneDeep.js\":\n/*!******************************************!*\\\n  !*** ./node_modules/lodash/cloneDeep.js ***!\n  \\******************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar baseClone = __webpack_require__(/*! ./_baseClone */ \"./node_modules/lodash/_baseClone.js\");\n\n/** Used to compose bitmasks for cloning. */\nvar CLONE_DEEP_FLAG = 1,\n    CLONE_SYMBOLS_FLAG = 4;\n\n/**\n * This method is like `_.clone` except that it recursively clones `value`.\n *\n * @static\n * @memberOf _\n * @since 1.0.0\n * @category Lang\n * @param {*} value The value to recursively clone.\n * @returns {*} Returns the deep cloned value.\n * @see _.clone\n * @example\n *\n * var objects = [{ 'a': 1 }, { 'b': 2 }];\n *\n * var deep = _.cloneDeep(objects);\n * console.log(deep[0] === objects[0]);\n * // => false\n */\nfunction cloneDeep(value) {\n  return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);\n}\n\nmodule.exports = cloneDeep;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/constant.js\":\n/*!*****************************************!*\\\n  !*** ./node_modules/lodash/constant.js ***!\n  \\*****************************************/\n/*! no static exports found */\n/***/ (function(module, exports) {\n\n/**\n * Creates a function that returns `value`.\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Util\n * @param {*} value The value to return from the new function.\n * @returns {Function} Returns the new constant function.\n * @example\n *\n * var objects = _.times(2, _.constant({ 'a': 1 }));\n *\n * console.log(objects);\n * // => [{ 'a': 1 }, { 'a': 1 }]\n *\n * console.log(objects[0] === objects[1]);\n * // => true\n */\nfunction constant(value) {\n  return function() {\n    return value;\n  };\n}\n\nmodule.exports = constant;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/defaults.js\":\n/*!*****************************************!*\\\n  !*** ./node_modules/lodash/defaults.js ***!\n  \\*****************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar baseRest = __webpack_require__(/*! ./_baseRest */ \"./node_modules/lodash/_baseRest.js\"),\n    eq = __webpack_require__(/*! ./eq */ \"./node_modules/lodash/eq.js\"),\n    isIterateeCall = __webpack_require__(/*! ./_isIterateeCall */ \"./node_modules/lodash/_isIterateeCall.js\"),\n    keysIn = __webpack_require__(/*! ./keysIn */ \"./node_modules/lodash/keysIn.js\");\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Assigns own and inherited enumerable string keyed properties of source\n * objects to the destination object for all destination properties that\n * resolve to `undefined`. Source objects are applied from left to right.\n * Once a property is set, additional values of the same property are ignored.\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} [sources] The source objects.\n * @returns {Object} Returns `object`.\n * @see _.defaultsDeep\n * @example\n *\n * _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });\n * // => { 'a': 1, 'b': 2 }\n */\nvar defaults = baseRest(function(object, sources) {\n  object = Object(object);\n\n  var index = -1;\n  var length = sources.length;\n  var guard = length > 2 ? sources[2] : undefined;\n\n  if (guard && isIterateeCall(sources[0], sources[1], guard)) {\n    length = 1;\n  }\n\n  while (++index < length) {\n    var source = sources[index];\n    var props = keysIn(source);\n    var propsIndex = -1;\n    var propsLength = props.length;\n\n    while (++propsIndex < propsLength) {\n      var key = props[propsIndex];\n      var value = object[key];\n\n      if (value === undefined ||\n          (eq(value, objectProto[key]) && !hasOwnProperty.call(object, key))) {\n        object[key] = source[key];\n      }\n    }\n  }\n\n  return object;\n});\n\nmodule.exports = defaults;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/each.js\":\n/*!*************************************!*\\\n  !*** ./node_modules/lodash/each.js ***!\n  \\*************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nmodule.exports = __webpack_require__(/*! ./forEach */ \"./node_modules/lodash/forEach.js\");\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/eq.js\":\n/*!***********************************!*\\\n  !*** ./node_modules/lodash/eq.js ***!\n  \\***********************************/\n/*! no static exports found */\n/***/ (function(module, exports) {\n\n/**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\nfunction eq(value, other) {\n  return value === other || (value !== value && other !== other);\n}\n\nmodule.exports = eq;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/filter.js\":\n/*!***************************************!*\\\n  !*** ./node_modules/lodash/filter.js ***!\n  \\***************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar arrayFilter = __webpack_require__(/*! ./_arrayFilter */ \"./node_modules/lodash/_arrayFilter.js\"),\n    baseFilter = __webpack_require__(/*! ./_baseFilter */ \"./node_modules/lodash/_baseFilter.js\"),\n    baseIteratee = __webpack_require__(/*! ./_baseIteratee */ \"./node_modules/lodash/_baseIteratee.js\"),\n    isArray = __webpack_require__(/*! ./isArray */ \"./node_modules/lodash/isArray.js\");\n\n/**\n * Iterates over elements of `collection`, returning an array of all elements\n * `predicate` returns truthy for. The predicate is invoked with three\n * arguments: (value, index|key, collection).\n *\n * **Note:** Unlike `_.remove`, this method returns a new array.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n * @see _.reject\n * @example\n *\n * var users = [\n *   { 'user': 'barney', 'age': 36, 'active': true },\n *   { 'user': 'fred',   'age': 40, 'active': false }\n * ];\n *\n * _.filter(users, function(o) { return !o.active; });\n * // => objects for ['fred']\n *\n * // The `_.matches` iteratee shorthand.\n * _.filter(users, { 'age': 36, 'active': true });\n * // => objects for ['barney']\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.filter(users, ['active', false]);\n * // => objects for ['fred']\n *\n * // The `_.property` iteratee shorthand.\n * _.filter(users, 'active');\n * // => objects for ['barney']\n *\n * // Combining several predicates using `_.overEvery` or `_.overSome`.\n * _.filter(users, _.overSome([{ 'age': 36 }, ['age', 40]]));\n * // => objects for ['fred', 'barney']\n */\nfunction filter(collection, predicate) {\n  var func = isArray(collection) ? arrayFilter : baseFilter;\n  return func(collection, baseIteratee(predicate, 3));\n}\n\nmodule.exports = filter;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/find.js\":\n/*!*************************************!*\\\n  !*** ./node_modules/lodash/find.js ***!\n  \\*************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar createFind = __webpack_require__(/*! ./_createFind */ \"./node_modules/lodash/_createFind.js\"),\n    findIndex = __webpack_require__(/*! ./findIndex */ \"./node_modules/lodash/findIndex.js\");\n\n/**\n * Iterates over elements of `collection`, returning the first element\n * `predicate` returns truthy for. The predicate is invoked with three\n * arguments: (value, index|key, collection).\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to inspect.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @param {number} [fromIndex=0] The index to search from.\n * @returns {*} Returns the matched element, else `undefined`.\n * @example\n *\n * var users = [\n *   { 'user': 'barney',  'age': 36, 'active': true },\n *   { 'user': 'fred',    'age': 40, 'active': false },\n *   { 'user': 'pebbles', 'age': 1,  'active': true }\n * ];\n *\n * _.find(users, function(o) { return o.age < 40; });\n * // => object for 'barney'\n *\n * // The `_.matches` iteratee shorthand.\n * _.find(users, { 'age': 1, 'active': true });\n * // => object for 'pebbles'\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.find(users, ['active', false]);\n * // => object for 'fred'\n *\n * // The `_.property` iteratee shorthand.\n * _.find(users, 'active');\n * // => object for 'barney'\n */\nvar find = createFind(findIndex);\n\nmodule.exports = find;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/findIndex.js\":\n/*!******************************************!*\\\n  !*** ./node_modules/lodash/findIndex.js ***!\n  \\******************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar baseFindIndex = __webpack_require__(/*! ./_baseFindIndex */ \"./node_modules/lodash/_baseFindIndex.js\"),\n    baseIteratee = __webpack_require__(/*! ./_baseIteratee */ \"./node_modules/lodash/_baseIteratee.js\"),\n    toInteger = __webpack_require__(/*! ./toInteger */ \"./node_modules/lodash/toInteger.js\");\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max;\n\n/**\n * This method is like `_.find` except that it returns the index of the first\n * element `predicate` returns truthy for instead of the element itself.\n *\n * @static\n * @memberOf _\n * @since 1.1.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @param {number} [fromIndex=0] The index to search from.\n * @returns {number} Returns the index of the found element, else `-1`.\n * @example\n *\n * var users = [\n *   { 'user': 'barney',  'active': false },\n *   { 'user': 'fred',    'active': false },\n *   { 'user': 'pebbles', 'active': true }\n * ];\n *\n * _.findIndex(users, function(o) { return o.user == 'barney'; });\n * // => 0\n *\n * // The `_.matches` iteratee shorthand.\n * _.findIndex(users, { 'user': 'fred', 'active': false });\n * // => 1\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.findIndex(users, ['active', false]);\n * // => 0\n *\n * // The `_.property` iteratee shorthand.\n * _.findIndex(users, 'active');\n * // => 2\n */\nfunction findIndex(array, predicate, fromIndex) {\n  var length = array == null ? 0 : array.length;\n  if (!length) {\n    return -1;\n  }\n  var index = fromIndex == null ? 0 : toInteger(fromIndex);\n  if (index < 0) {\n    index = nativeMax(length + index, 0);\n  }\n  return baseFindIndex(array, baseIteratee(predicate, 3), index);\n}\n\nmodule.exports = findIndex;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/flatten.js\":\n/*!****************************************!*\\\n  !*** ./node_modules/lodash/flatten.js ***!\n  \\****************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar baseFlatten = __webpack_require__(/*! ./_baseFlatten */ \"./node_modules/lodash/_baseFlatten.js\");\n\n/**\n * Flattens `array` a single level deep.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to flatten.\n * @returns {Array} Returns the new flattened array.\n * @example\n *\n * _.flatten([1, [2, [3, [4]], 5]]);\n * // => [1, 2, [3, [4]], 5]\n */\nfunction flatten(array) {\n  var length = array == null ? 0 : array.length;\n  return length ? baseFlatten(array, 1) : [];\n}\n\nmodule.exports = flatten;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/forEach.js\":\n/*!****************************************!*\\\n  !*** ./node_modules/lodash/forEach.js ***!\n  \\****************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar arrayEach = __webpack_require__(/*! ./_arrayEach */ \"./node_modules/lodash/_arrayEach.js\"),\n    baseEach = __webpack_require__(/*! ./_baseEach */ \"./node_modules/lodash/_baseEach.js\"),\n    castFunction = __webpack_require__(/*! ./_castFunction */ \"./node_modules/lodash/_castFunction.js\"),\n    isArray = __webpack_require__(/*! ./isArray */ \"./node_modules/lodash/isArray.js\");\n\n/**\n * Iterates over elements of `collection` and invokes `iteratee` for each element.\n * The iteratee is invoked with three arguments: (value, index|key, collection).\n * Iteratee functions may exit iteration early by explicitly returning `false`.\n *\n * **Note:** As with other \"Collections\" methods, objects with a \"length\"\n * property are iterated like arrays. To avoid this behavior use `_.forIn`\n * or `_.forOwn` for object iteration.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @alias each\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Array|Object} Returns `collection`.\n * @see _.forEachRight\n * @example\n *\n * _.forEach([1, 2], function(value) {\n *   console.log(value);\n * });\n * // => Logs `1` then `2`.\n *\n * _.forEach({ 'a': 1, 'b': 2 }, function(value, key) {\n *   console.log(key);\n * });\n * // => Logs 'a' then 'b' (iteration order is not guaranteed).\n */\nfunction forEach(collection, iteratee) {\n  var func = isArray(collection) ? arrayEach : baseEach;\n  return func(collection, castFunction(iteratee));\n}\n\nmodule.exports = forEach;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/forIn.js\":\n/*!**************************************!*\\\n  !*** ./node_modules/lodash/forIn.js ***!\n  \\**************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar baseFor = __webpack_require__(/*! ./_baseFor */ \"./node_modules/lodash/_baseFor.js\"),\n    castFunction = __webpack_require__(/*! ./_castFunction */ \"./node_modules/lodash/_castFunction.js\"),\n    keysIn = __webpack_require__(/*! ./keysIn */ \"./node_modules/lodash/keysIn.js\");\n\n/**\n * Iterates over own and inherited enumerable string keyed properties of an\n * object and invokes `iteratee` for each property. The iteratee is invoked\n * with three arguments: (value, key, object). Iteratee functions may exit\n * iteration early by explicitly returning `false`.\n *\n * @static\n * @memberOf _\n * @since 0.3.0\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Object} Returns `object`.\n * @see _.forInRight\n * @example\n *\n * function Foo() {\n *   this.a = 1;\n *   this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.forIn(new Foo, function(value, key) {\n *   console.log(key);\n * });\n * // => Logs 'a', 'b', then 'c' (iteration order is not guaranteed).\n */\nfunction forIn(object, iteratee) {\n  return object == null\n    ? object\n    : baseFor(object, castFunction(iteratee), keysIn);\n}\n\nmodule.exports = forIn;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/get.js\":\n/*!************************************!*\\\n  !*** ./node_modules/lodash/get.js ***!\n  \\************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar baseGet = __webpack_require__(/*! ./_baseGet */ \"./node_modules/lodash/_baseGet.js\");\n\n/**\n * Gets the value at `path` of `object`. If the resolved value is\n * `undefined`, the `defaultValue` is returned in its place.\n *\n * @static\n * @memberOf _\n * @since 3.7.0\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the property to get.\n * @param {*} [defaultValue] The value returned for `undefined` resolved values.\n * @returns {*} Returns the resolved value.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 3 } }] };\n *\n * _.get(object, 'a[0].b.c');\n * // => 3\n *\n * _.get(object, ['a', '0', 'b', 'c']);\n * // => 3\n *\n * _.get(object, 'a.b.c', 'default');\n * // => 'default'\n */\nfunction get(object, path, defaultValue) {\n  var result = object == null ? undefined : baseGet(object, path);\n  return result === undefined ? defaultValue : result;\n}\n\nmodule.exports = get;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/has.js\":\n/*!************************************!*\\\n  !*** ./node_modules/lodash/has.js ***!\n  \\************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar baseHas = __webpack_require__(/*! ./_baseHas */ \"./node_modules/lodash/_baseHas.js\"),\n    hasPath = __webpack_require__(/*! ./_hasPath */ \"./node_modules/lodash/_hasPath.js\");\n\n/**\n * Checks if `path` is a direct property of `object`.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path to check.\n * @returns {boolean} Returns `true` if `path` exists, else `false`.\n * @example\n *\n * var object = { 'a': { 'b': 2 } };\n * var other = _.create({ 'a': _.create({ 'b': 2 }) });\n *\n * _.has(object, 'a');\n * // => true\n *\n * _.has(object, 'a.b');\n * // => true\n *\n * _.has(object, ['a', 'b']);\n * // => true\n *\n * _.has(other, 'a');\n * // => false\n */\nfunction has(object, path) {\n  return object != null && hasPath(object, path, baseHas);\n}\n\nmodule.exports = has;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/hasIn.js\":\n/*!**************************************!*\\\n  !*** ./node_modules/lodash/hasIn.js ***!\n  \\**************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar baseHasIn = __webpack_require__(/*! ./_baseHasIn */ \"./node_modules/lodash/_baseHasIn.js\"),\n    hasPath = __webpack_require__(/*! ./_hasPath */ \"./node_modules/lodash/_hasPath.js\");\n\n/**\n * Checks if `path` is a direct or inherited property of `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path to check.\n * @returns {boolean} Returns `true` if `path` exists, else `false`.\n * @example\n *\n * var object = _.create({ 'a': _.create({ 'b': 2 }) });\n *\n * _.hasIn(object, 'a');\n * // => true\n *\n * _.hasIn(object, 'a.b');\n * // => true\n *\n * _.hasIn(object, ['a', 'b']);\n * // => true\n *\n * _.hasIn(object, 'b');\n * // => false\n */\nfunction hasIn(object, path) {\n  return object != null && hasPath(object, path, baseHasIn);\n}\n\nmodule.exports = hasIn;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/identity.js\":\n/*!*****************************************!*\\\n  !*** ./node_modules/lodash/identity.js ***!\n  \\*****************************************/\n/*! no static exports found */\n/***/ (function(module, exports) {\n\n/**\n * This method returns the first argument it receives.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Util\n * @param {*} value Any value.\n * @returns {*} Returns `value`.\n * @example\n *\n * var object = { 'a': 1 };\n *\n * console.log(_.identity(object) === object);\n * // => true\n */\nfunction identity(value) {\n  return value;\n}\n\nmodule.exports = identity;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/isArguments.js\":\n/*!********************************************!*\\\n  !*** ./node_modules/lodash/isArguments.js ***!\n  \\********************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar baseIsArguments = __webpack_require__(/*! ./_baseIsArguments */ \"./node_modules/lodash/_baseIsArguments.js\"),\n    isObjectLike = __webpack_require__(/*! ./isObjectLike */ \"./node_modules/lodash/isObjectLike.js\");\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/**\n * Checks if `value` is likely an `arguments` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n *  else `false`.\n * @example\n *\n * _.isArguments(function() { return arguments; }());\n * // => true\n *\n * _.isArguments([1, 2, 3]);\n * // => false\n */\nvar isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {\n  return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&\n    !propertyIsEnumerable.call(value, 'callee');\n};\n\nmodule.exports = isArguments;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/isArray.js\":\n/*!****************************************!*\\\n  !*** ./node_modules/lodash/isArray.js ***!\n  \\****************************************/\n/*! no static exports found */\n/***/ (function(module, exports) {\n\n/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray = Array.isArray;\n\nmodule.exports = isArray;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/isArrayLike.js\":\n/*!********************************************!*\\\n  !*** ./node_modules/lodash/isArrayLike.js ***!\n  \\********************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar isFunction = __webpack_require__(/*! ./isFunction */ \"./node_modules/lodash/isFunction.js\"),\n    isLength = __webpack_require__(/*! ./isLength */ \"./node_modules/lodash/isLength.js\");\n\n/**\n * Checks if `value` is array-like. A value is considered array-like if it's\n * not a function and has a `value.length` that's an integer greater than or\n * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n * @example\n *\n * _.isArrayLike([1, 2, 3]);\n * // => true\n *\n * _.isArrayLike(document.body.children);\n * // => true\n *\n * _.isArrayLike('abc');\n * // => true\n *\n * _.isArrayLike(_.noop);\n * // => false\n */\nfunction isArrayLike(value) {\n  return value != null && isLength(value.length) && !isFunction(value);\n}\n\nmodule.exports = isArrayLike;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/isArrayLikeObject.js\":\n/*!**************************************************!*\\\n  !*** ./node_modules/lodash/isArrayLikeObject.js ***!\n  \\**************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar isArrayLike = __webpack_require__(/*! ./isArrayLike */ \"./node_modules/lodash/isArrayLike.js\"),\n    isObjectLike = __webpack_require__(/*! ./isObjectLike */ \"./node_modules/lodash/isObjectLike.js\");\n\n/**\n * This method is like `_.isArrayLike` except that it also checks if `value`\n * is an object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array-like object,\n *  else `false`.\n * @example\n *\n * _.isArrayLikeObject([1, 2, 3]);\n * // => true\n *\n * _.isArrayLikeObject(document.body.children);\n * // => true\n *\n * _.isArrayLikeObject('abc');\n * // => false\n *\n * _.isArrayLikeObject(_.noop);\n * // => false\n */\nfunction isArrayLikeObject(value) {\n  return isObjectLike(value) && isArrayLike(value);\n}\n\nmodule.exports = isArrayLikeObject;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/isBuffer.js\":\n/*!*****************************************!*\\\n  !*** ./node_modules/lodash/isBuffer.js ***!\n  \\*****************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n/* WEBPACK VAR INJECTION */(function(module) {var root = __webpack_require__(/*! ./_root */ \"./node_modules/lodash/_root.js\"),\n    stubFalse = __webpack_require__(/*! ./stubFalse */ \"./node_modules/lodash/stubFalse.js\");\n\n/** Detect free variable `exports`. */\nvar freeExports =  true && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined;\n\n/**\n * Checks if `value` is a buffer.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.\n * @example\n *\n * _.isBuffer(new Buffer(2));\n * // => true\n *\n * _.isBuffer(new Uint8Array(2));\n * // => false\n */\nvar isBuffer = nativeIsBuffer || stubFalse;\n\nmodule.exports = isBuffer;\n\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../webpack/buildin/module.js */ \"./node_modules/webpack/buildin/module.js\")(module)))\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/isEmpty.js\":\n/*!****************************************!*\\\n  !*** ./node_modules/lodash/isEmpty.js ***!\n  \\****************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar baseKeys = __webpack_require__(/*! ./_baseKeys */ \"./node_modules/lodash/_baseKeys.js\"),\n    getTag = __webpack_require__(/*! ./_getTag */ \"./node_modules/lodash/_getTag.js\"),\n    isArguments = __webpack_require__(/*! ./isArguments */ \"./node_modules/lodash/isArguments.js\"),\n    isArray = __webpack_require__(/*! ./isArray */ \"./node_modules/lodash/isArray.js\"),\n    isArrayLike = __webpack_require__(/*! ./isArrayLike */ \"./node_modules/lodash/isArrayLike.js\"),\n    isBuffer = __webpack_require__(/*! ./isBuffer */ \"./node_modules/lodash/isBuffer.js\"),\n    isPrototype = __webpack_require__(/*! ./_isPrototype */ \"./node_modules/lodash/_isPrototype.js\"),\n    isTypedArray = __webpack_require__(/*! ./isTypedArray */ \"./node_modules/lodash/isTypedArray.js\");\n\n/** `Object#toString` result references. */\nvar mapTag = '[object Map]',\n    setTag = '[object Set]';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Checks if `value` is an empty object, collection, map, or set.\n *\n * Objects are considered empty if they have no own enumerable string keyed\n * properties.\n *\n * Array-like values such as `arguments` objects, arrays, buffers, strings, or\n * jQuery-like collections are considered empty if they have a `length` of `0`.\n * Similarly, maps and sets are considered empty if they have a `size` of `0`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is empty, else `false`.\n * @example\n *\n * _.isEmpty(null);\n * // => true\n *\n * _.isEmpty(true);\n * // => true\n *\n * _.isEmpty(1);\n * // => true\n *\n * _.isEmpty([1, 2, 3]);\n * // => false\n *\n * _.isEmpty({ 'a': 1 });\n * // => false\n */\nfunction isEmpty(value) {\n  if (value == null) {\n    return true;\n  }\n  if (isArrayLike(value) &&\n      (isArray(value) || typeof value == 'string' || typeof value.splice == 'function' ||\n        isBuffer(value) || isTypedArray(value) || isArguments(value))) {\n    return !value.length;\n  }\n  var tag = getTag(value);\n  if (tag == mapTag || tag == setTag) {\n    return !value.size;\n  }\n  if (isPrototype(value)) {\n    return !baseKeys(value).length;\n  }\n  for (var key in value) {\n    if (hasOwnProperty.call(value, key)) {\n      return false;\n    }\n  }\n  return true;\n}\n\nmodule.exports = isEmpty;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/isFunction.js\":\n/*!*******************************************!*\\\n  !*** ./node_modules/lodash/isFunction.js ***!\n  \\*******************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar baseGetTag = __webpack_require__(/*! ./_baseGetTag */ \"./node_modules/lodash/_baseGetTag.js\"),\n    isObject = __webpack_require__(/*! ./isObject */ \"./node_modules/lodash/isObject.js\");\n\n/** `Object#toString` result references. */\nvar asyncTag = '[object AsyncFunction]',\n    funcTag = '[object Function]',\n    genTag = '[object GeneratorFunction]',\n    proxyTag = '[object Proxy]';\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n  if (!isObject(value)) {\n    return false;\n  }\n  // The use of `Object#toString` avoids issues with the `typeof` operator\n  // in Safari 9 which returns 'object' for typed arrays and other constructors.\n  var tag = baseGetTag(value);\n  return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;\n}\n\nmodule.exports = isFunction;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/isLength.js\":\n/*!*****************************************!*\\\n  !*** ./node_modules/lodash/isLength.js ***!\n  \\*****************************************/\n/*! no static exports found */\n/***/ (function(module, exports) {\n\n/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This method is loosely based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */\nfunction isLength(value) {\n  return typeof value == 'number' &&\n    value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n}\n\nmodule.exports = isLength;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/isMap.js\":\n/*!**************************************!*\\\n  !*** ./node_modules/lodash/isMap.js ***!\n  \\**************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar baseIsMap = __webpack_require__(/*! ./_baseIsMap */ \"./node_modules/lodash/_baseIsMap.js\"),\n    baseUnary = __webpack_require__(/*! ./_baseUnary */ \"./node_modules/lodash/_baseUnary.js\"),\n    nodeUtil = __webpack_require__(/*! ./_nodeUtil */ \"./node_modules/lodash/_nodeUtil.js\");\n\n/* Node.js helper references. */\nvar nodeIsMap = nodeUtil && nodeUtil.isMap;\n\n/**\n * Checks if `value` is classified as a `Map` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n * @example\n *\n * _.isMap(new Map);\n * // => true\n *\n * _.isMap(new WeakMap);\n * // => false\n */\nvar isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap;\n\nmodule.exports = isMap;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/isObject.js\":\n/*!*****************************************!*\\\n  !*** ./node_modules/lodash/isObject.js ***!\n  \\*****************************************/\n/*! no static exports found */\n/***/ (function(module, exports) {\n\n/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n  var type = typeof value;\n  return value != null && (type == 'object' || type == 'function');\n}\n\nmodule.exports = isObject;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/isObjectLike.js\":\n/*!*********************************************!*\\\n  !*** ./node_modules/lodash/isObjectLike.js ***!\n  \\*********************************************/\n/*! no static exports found */\n/***/ (function(module, exports) {\n\n/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n  return value != null && typeof value == 'object';\n}\n\nmodule.exports = isObjectLike;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/isPlainObject.js\":\n/*!**********************************************!*\\\n  !*** ./node_modules/lodash/isPlainObject.js ***!\n  \\**********************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar baseGetTag = __webpack_require__(/*! ./_baseGetTag */ \"./node_modules/lodash/_baseGetTag.js\"),\n    getPrototype = __webpack_require__(/*! ./_getPrototype */ \"./node_modules/lodash/_getPrototype.js\"),\n    isObjectLike = __webpack_require__(/*! ./isObjectLike */ \"./node_modules/lodash/isObjectLike.js\");\n\n/** `Object#toString` result references. */\nvar objectTag = '[object Object]';\n\n/** Used for built-in method references. */\nvar funcProto = Function.prototype,\n    objectProto = Object.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Used to infer the `Object` constructor. */\nvar objectCtorString = funcToString.call(Object);\n\n/**\n * Checks if `value` is a plain object, that is, an object created by the\n * `Object` constructor or one with a `[[Prototype]]` of `null`.\n *\n * @static\n * @memberOf _\n * @since 0.8.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.\n * @example\n *\n * function Foo() {\n *   this.a = 1;\n * }\n *\n * _.isPlainObject(new Foo);\n * // => false\n *\n * _.isPlainObject([1, 2, 3]);\n * // => false\n *\n * _.isPlainObject({ 'x': 0, 'y': 0 });\n * // => true\n *\n * _.isPlainObject(Object.create(null));\n * // => true\n */\nfunction isPlainObject(value) {\n  if (!isObjectLike(value) || baseGetTag(value) != objectTag) {\n    return false;\n  }\n  var proto = getPrototype(value);\n  if (proto === null) {\n    return true;\n  }\n  var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;\n  return typeof Ctor == 'function' && Ctor instanceof Ctor &&\n    funcToString.call(Ctor) == objectCtorString;\n}\n\nmodule.exports = isPlainObject;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/isSet.js\":\n/*!**************************************!*\\\n  !*** ./node_modules/lodash/isSet.js ***!\n  \\**************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar baseIsSet = __webpack_require__(/*! ./_baseIsSet */ \"./node_modules/lodash/_baseIsSet.js\"),\n    baseUnary = __webpack_require__(/*! ./_baseUnary */ \"./node_modules/lodash/_baseUnary.js\"),\n    nodeUtil = __webpack_require__(/*! ./_nodeUtil */ \"./node_modules/lodash/_nodeUtil.js\");\n\n/* Node.js helper references. */\nvar nodeIsSet = nodeUtil && nodeUtil.isSet;\n\n/**\n * Checks if `value` is classified as a `Set` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n * @example\n *\n * _.isSet(new Set);\n * // => true\n *\n * _.isSet(new WeakSet);\n * // => false\n */\nvar isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;\n\nmodule.exports = isSet;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/isString.js\":\n/*!*****************************************!*\\\n  !*** ./node_modules/lodash/isString.js ***!\n  \\*****************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar baseGetTag = __webpack_require__(/*! ./_baseGetTag */ \"./node_modules/lodash/_baseGetTag.js\"),\n    isArray = __webpack_require__(/*! ./isArray */ \"./node_modules/lodash/isArray.js\"),\n    isObjectLike = __webpack_require__(/*! ./isObjectLike */ \"./node_modules/lodash/isObjectLike.js\");\n\n/** `Object#toString` result references. */\nvar stringTag = '[object String]';\n\n/**\n * Checks if `value` is classified as a `String` primitive or object.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a string, else `false`.\n * @example\n *\n * _.isString('abc');\n * // => true\n *\n * _.isString(1);\n * // => false\n */\nfunction isString(value) {\n  return typeof value == 'string' ||\n    (!isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag);\n}\n\nmodule.exports = isString;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/isSymbol.js\":\n/*!*****************************************!*\\\n  !*** ./node_modules/lodash/isSymbol.js ***!\n  \\*****************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar baseGetTag = __webpack_require__(/*! ./_baseGetTag */ \"./node_modules/lodash/_baseGetTag.js\"),\n    isObjectLike = __webpack_require__(/*! ./isObjectLike */ \"./node_modules/lodash/isObjectLike.js\");\n\n/** `Object#toString` result references. */\nvar symbolTag = '[object Symbol]';\n\n/**\n * Checks if `value` is classified as a `Symbol` primitive or object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n * @example\n *\n * _.isSymbol(Symbol.iterator);\n * // => true\n *\n * _.isSymbol('abc');\n * // => false\n */\nfunction isSymbol(value) {\n  return typeof value == 'symbol' ||\n    (isObjectLike(value) && baseGetTag(value) == symbolTag);\n}\n\nmodule.exports = isSymbol;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/isTypedArray.js\":\n/*!*********************************************!*\\\n  !*** ./node_modules/lodash/isTypedArray.js ***!\n  \\*********************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar baseIsTypedArray = __webpack_require__(/*! ./_baseIsTypedArray */ \"./node_modules/lodash/_baseIsTypedArray.js\"),\n    baseUnary = __webpack_require__(/*! ./_baseUnary */ \"./node_modules/lodash/_baseUnary.js\"),\n    nodeUtil = __webpack_require__(/*! ./_nodeUtil */ \"./node_modules/lodash/_nodeUtil.js\");\n\n/* Node.js helper references. */\nvar nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;\n\n/**\n * Checks if `value` is classified as a typed array.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n * @example\n *\n * _.isTypedArray(new Uint8Array);\n * // => true\n *\n * _.isTypedArray([]);\n * // => false\n */\nvar isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;\n\nmodule.exports = isTypedArray;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/isUndefined.js\":\n/*!********************************************!*\\\n  !*** ./node_modules/lodash/isUndefined.js ***!\n  \\********************************************/\n/*! no static exports found */\n/***/ (function(module, exports) {\n\n/**\n * Checks if `value` is `undefined`.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is `undefined`, else `false`.\n * @example\n *\n * _.isUndefined(void 0);\n * // => true\n *\n * _.isUndefined(null);\n * // => false\n */\nfunction isUndefined(value) {\n  return value === undefined;\n}\n\nmodule.exports = isUndefined;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/keys.js\":\n/*!*************************************!*\\\n  !*** ./node_modules/lodash/keys.js ***!\n  \\*************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar arrayLikeKeys = __webpack_require__(/*! ./_arrayLikeKeys */ \"./node_modules/lodash/_arrayLikeKeys.js\"),\n    baseKeys = __webpack_require__(/*! ./_baseKeys */ \"./node_modules/lodash/_baseKeys.js\"),\n    isArrayLike = __webpack_require__(/*! ./isArrayLike */ \"./node_modules/lodash/isArrayLike.js\");\n\n/**\n * Creates an array of the own enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects. See the\n * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * for more details.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n *   this.a = 1;\n *   this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keys(new Foo);\n * // => ['a', 'b'] (iteration order is not guaranteed)\n *\n * _.keys('hi');\n * // => ['0', '1']\n */\nfunction keys(object) {\n  return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);\n}\n\nmodule.exports = keys;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/keysIn.js\":\n/*!***************************************!*\\\n  !*** ./node_modules/lodash/keysIn.js ***!\n  \\***************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar arrayLikeKeys = __webpack_require__(/*! ./_arrayLikeKeys */ \"./node_modules/lodash/_arrayLikeKeys.js\"),\n    baseKeysIn = __webpack_require__(/*! ./_baseKeysIn */ \"./node_modules/lodash/_baseKeysIn.js\"),\n    isArrayLike = __webpack_require__(/*! ./isArrayLike */ \"./node_modules/lodash/isArrayLike.js\");\n\n/**\n * Creates an array of the own and inherited enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n *   this.a = 1;\n *   this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keysIn(new Foo);\n * // => ['a', 'b', 'c'] (iteration order is not guaranteed)\n */\nfunction keysIn(object) {\n  return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);\n}\n\nmodule.exports = keysIn;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/last.js\":\n/*!*************************************!*\\\n  !*** ./node_modules/lodash/last.js ***!\n  \\*************************************/\n/*! no static exports found */\n/***/ (function(module, exports) {\n\n/**\n * Gets the last element of `array`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to query.\n * @returns {*} Returns the last element of `array`.\n * @example\n *\n * _.last([1, 2, 3]);\n * // => 3\n */\nfunction last(array) {\n  var length = array == null ? 0 : array.length;\n  return length ? array[length - 1] : undefined;\n}\n\nmodule.exports = last;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/map.js\":\n/*!************************************!*\\\n  !*** ./node_modules/lodash/map.js ***!\n  \\************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar arrayMap = __webpack_require__(/*! ./_arrayMap */ \"./node_modules/lodash/_arrayMap.js\"),\n    baseIteratee = __webpack_require__(/*! ./_baseIteratee */ \"./node_modules/lodash/_baseIteratee.js\"),\n    baseMap = __webpack_require__(/*! ./_baseMap */ \"./node_modules/lodash/_baseMap.js\"),\n    isArray = __webpack_require__(/*! ./isArray */ \"./node_modules/lodash/isArray.js\");\n\n/**\n * Creates an array of values by running each element in `collection` thru\n * `iteratee`. The iteratee is invoked with three arguments:\n * (value, index|key, collection).\n *\n * Many lodash methods are guarded to work as iteratees for methods like\n * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`.\n *\n * The guarded methods are:\n * `ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`,\n * `fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`,\n * `sampleSize`, `slice`, `some`, `sortBy`, `split`, `take`, `takeRight`,\n * `template`, `trim`, `trimEnd`, `trimStart`, and `words`\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the new mapped array.\n * @example\n *\n * function square(n) {\n *   return n * n;\n * }\n *\n * _.map([4, 8], square);\n * // => [16, 64]\n *\n * _.map({ 'a': 4, 'b': 8 }, square);\n * // => [16, 64] (iteration order is not guaranteed)\n *\n * var users = [\n *   { 'user': 'barney' },\n *   { 'user': 'fred' }\n * ];\n *\n * // The `_.property` iteratee shorthand.\n * _.map(users, 'user');\n * // => ['barney', 'fred']\n */\nfunction map(collection, iteratee) {\n  var func = isArray(collection) ? arrayMap : baseMap;\n  return func(collection, baseIteratee(iteratee, 3));\n}\n\nmodule.exports = map;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/mapValues.js\":\n/*!******************************************!*\\\n  !*** ./node_modules/lodash/mapValues.js ***!\n  \\******************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar baseAssignValue = __webpack_require__(/*! ./_baseAssignValue */ \"./node_modules/lodash/_baseAssignValue.js\"),\n    baseForOwn = __webpack_require__(/*! ./_baseForOwn */ \"./node_modules/lodash/_baseForOwn.js\"),\n    baseIteratee = __webpack_require__(/*! ./_baseIteratee */ \"./node_modules/lodash/_baseIteratee.js\");\n\n/**\n * Creates an object with the same keys as `object` and values generated\n * by running each own enumerable string keyed property of `object` thru\n * `iteratee`. The iteratee is invoked with three arguments:\n * (value, key, object).\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Object} Returns the new mapped object.\n * @see _.mapKeys\n * @example\n *\n * var users = {\n *   'fred':    { 'user': 'fred',    'age': 40 },\n *   'pebbles': { 'user': 'pebbles', 'age': 1 }\n * };\n *\n * _.mapValues(users, function(o) { return o.age; });\n * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)\n *\n * // The `_.property` iteratee shorthand.\n * _.mapValues(users, 'age');\n * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)\n */\nfunction mapValues(object, iteratee) {\n  var result = {};\n  iteratee = baseIteratee(iteratee, 3);\n\n  baseForOwn(object, function(value, key, object) {\n    baseAssignValue(result, key, iteratee(value, key, object));\n  });\n  return result;\n}\n\nmodule.exports = mapValues;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/max.js\":\n/*!************************************!*\\\n  !*** ./node_modules/lodash/max.js ***!\n  \\************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar baseExtremum = __webpack_require__(/*! ./_baseExtremum */ \"./node_modules/lodash/_baseExtremum.js\"),\n    baseGt = __webpack_require__(/*! ./_baseGt */ \"./node_modules/lodash/_baseGt.js\"),\n    identity = __webpack_require__(/*! ./identity */ \"./node_modules/lodash/identity.js\");\n\n/**\n * Computes the maximum value of `array`. If `array` is empty or falsey,\n * `undefined` is returned.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Math\n * @param {Array} array The array to iterate over.\n * @returns {*} Returns the maximum value.\n * @example\n *\n * _.max([4, 2, 8, 6]);\n * // => 8\n *\n * _.max([]);\n * // => undefined\n */\nfunction max(array) {\n  return (array && array.length)\n    ? baseExtremum(array, identity, baseGt)\n    : undefined;\n}\n\nmodule.exports = max;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/memoize.js\":\n/*!****************************************!*\\\n  !*** ./node_modules/lodash/memoize.js ***!\n  \\****************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar MapCache = __webpack_require__(/*! ./_MapCache */ \"./node_modules/lodash/_MapCache.js\");\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/**\n * Creates a function that memoizes the result of `func`. If `resolver` is\n * provided, it determines the cache key for storing the result based on the\n * arguments provided to the memoized function. By default, the first argument\n * provided to the memoized function is used as the map cache key. The `func`\n * is invoked with the `this` binding of the memoized function.\n *\n * **Note:** The cache is exposed as the `cache` property on the memoized\n * function. Its creation may be customized by replacing the `_.memoize.Cache`\n * constructor with one whose instances implement the\n * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)\n * method interface of `clear`, `delete`, `get`, `has`, and `set`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to have its output memoized.\n * @param {Function} [resolver] The function to resolve the cache key.\n * @returns {Function} Returns the new memoized function.\n * @example\n *\n * var object = { 'a': 1, 'b': 2 };\n * var other = { 'c': 3, 'd': 4 };\n *\n * var values = _.memoize(_.values);\n * values(object);\n * // => [1, 2]\n *\n * values(other);\n * // => [3, 4]\n *\n * object.a = 2;\n * values(object);\n * // => [1, 2]\n *\n * // Modify the result cache.\n * values.cache.set(object, ['a', 'b']);\n * values(object);\n * // => ['a', 'b']\n *\n * // Replace `_.memoize.Cache`.\n * _.memoize.Cache = WeakMap;\n */\nfunction memoize(func, resolver) {\n  if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) {\n    throw new TypeError(FUNC_ERROR_TEXT);\n  }\n  var memoized = function() {\n    var args = arguments,\n        key = resolver ? resolver.apply(this, args) : args[0],\n        cache = memoized.cache;\n\n    if (cache.has(key)) {\n      return cache.get(key);\n    }\n    var result = func.apply(this, args);\n    memoized.cache = cache.set(key, result) || cache;\n    return result;\n  };\n  memoized.cache = new (memoize.Cache || MapCache);\n  return memoized;\n}\n\n// Expose `MapCache`.\nmemoize.Cache = MapCache;\n\nmodule.exports = memoize;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/merge.js\":\n/*!**************************************!*\\\n  !*** ./node_modules/lodash/merge.js ***!\n  \\**************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar baseMerge = __webpack_require__(/*! ./_baseMerge */ \"./node_modules/lodash/_baseMerge.js\"),\n    createAssigner = __webpack_require__(/*! ./_createAssigner */ \"./node_modules/lodash/_createAssigner.js\");\n\n/**\n * This method is like `_.assign` except that it recursively merges own and\n * inherited enumerable string keyed properties of source objects into the\n * destination object. Source properties that resolve to `undefined` are\n * skipped if a destination value exists. Array and plain object properties\n * are merged recursively. Other objects and value types are overridden by\n * assignment. Source objects are applied from left to right. Subsequent\n * sources overwrite property assignments of previous sources.\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 0.5.0\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} [sources] The source objects.\n * @returns {Object} Returns `object`.\n * @example\n *\n * var object = {\n *   'a': [{ 'b': 2 }, { 'd': 4 }]\n * };\n *\n * var other = {\n *   'a': [{ 'c': 3 }, { 'e': 5 }]\n * };\n *\n * _.merge(object, other);\n * // => { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] }\n */\nvar merge = createAssigner(function(object, source, srcIndex) {\n  baseMerge(object, source, srcIndex);\n});\n\nmodule.exports = merge;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/min.js\":\n/*!************************************!*\\\n  !*** ./node_modules/lodash/min.js ***!\n  \\************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar baseExtremum = __webpack_require__(/*! ./_baseExtremum */ \"./node_modules/lodash/_baseExtremum.js\"),\n    baseLt = __webpack_require__(/*! ./_baseLt */ \"./node_modules/lodash/_baseLt.js\"),\n    identity = __webpack_require__(/*! ./identity */ \"./node_modules/lodash/identity.js\");\n\n/**\n * Computes the minimum value of `array`. If `array` is empty or falsey,\n * `undefined` is returned.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Math\n * @param {Array} array The array to iterate over.\n * @returns {*} Returns the minimum value.\n * @example\n *\n * _.min([4, 2, 8, 6]);\n * // => 2\n *\n * _.min([]);\n * // => undefined\n */\nfunction min(array) {\n  return (array && array.length)\n    ? baseExtremum(array, identity, baseLt)\n    : undefined;\n}\n\nmodule.exports = min;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/minBy.js\":\n/*!**************************************!*\\\n  !*** ./node_modules/lodash/minBy.js ***!\n  \\**************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar baseExtremum = __webpack_require__(/*! ./_baseExtremum */ \"./node_modules/lodash/_baseExtremum.js\"),\n    baseIteratee = __webpack_require__(/*! ./_baseIteratee */ \"./node_modules/lodash/_baseIteratee.js\"),\n    baseLt = __webpack_require__(/*! ./_baseLt */ \"./node_modules/lodash/_baseLt.js\");\n\n/**\n * This method is like `_.min` except that it accepts `iteratee` which is\n * invoked for each element in `array` to generate the criterion by which\n * the value is ranked. The iteratee is invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Math\n * @param {Array} array The array to iterate over.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {*} Returns the minimum value.\n * @example\n *\n * var objects = [{ 'n': 1 }, { 'n': 2 }];\n *\n * _.minBy(objects, function(o) { return o.n; });\n * // => { 'n': 1 }\n *\n * // The `_.property` iteratee shorthand.\n * _.minBy(objects, 'n');\n * // => { 'n': 1 }\n */\nfunction minBy(array, iteratee) {\n  return (array && array.length)\n    ? baseExtremum(array, baseIteratee(iteratee, 2), baseLt)\n    : undefined;\n}\n\nmodule.exports = minBy;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/noop.js\":\n/*!*************************************!*\\\n  !*** ./node_modules/lodash/noop.js ***!\n  \\*************************************/\n/*! no static exports found */\n/***/ (function(module, exports) {\n\n/**\n * This method returns `undefined`.\n *\n * @static\n * @memberOf _\n * @since 2.3.0\n * @category Util\n * @example\n *\n * _.times(2, _.noop);\n * // => [undefined, undefined]\n */\nfunction noop() {\n  // No operation performed.\n}\n\nmodule.exports = noop;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/now.js\":\n/*!************************************!*\\\n  !*** ./node_modules/lodash/now.js ***!\n  \\************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar root = __webpack_require__(/*! ./_root */ \"./node_modules/lodash/_root.js\");\n\n/**\n * Gets the timestamp of the number of milliseconds that have elapsed since\n * the Unix epoch (1 January 1970 00:00:00 UTC).\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Date\n * @returns {number} Returns the timestamp.\n * @example\n *\n * _.defer(function(stamp) {\n *   console.log(_.now() - stamp);\n * }, _.now());\n * // => Logs the number of milliseconds it took for the deferred invocation.\n */\nvar now = function() {\n  return root.Date.now();\n};\n\nmodule.exports = now;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/pick.js\":\n/*!*************************************!*\\\n  !*** ./node_modules/lodash/pick.js ***!\n  \\*************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar basePick = __webpack_require__(/*! ./_basePick */ \"./node_modules/lodash/_basePick.js\"),\n    flatRest = __webpack_require__(/*! ./_flatRest */ \"./node_modules/lodash/_flatRest.js\");\n\n/**\n * Creates an object composed of the picked `object` properties.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The source object.\n * @param {...(string|string[])} [paths] The property paths to pick.\n * @returns {Object} Returns the new object.\n * @example\n *\n * var object = { 'a': 1, 'b': '2', 'c': 3 };\n *\n * _.pick(object, ['a', 'c']);\n * // => { 'a': 1, 'c': 3 }\n */\nvar pick = flatRest(function(object, paths) {\n  return object == null ? {} : basePick(object, paths);\n});\n\nmodule.exports = pick;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/property.js\":\n/*!*****************************************!*\\\n  !*** ./node_modules/lodash/property.js ***!\n  \\*****************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar baseProperty = __webpack_require__(/*! ./_baseProperty */ \"./node_modules/lodash/_baseProperty.js\"),\n    basePropertyDeep = __webpack_require__(/*! ./_basePropertyDeep */ \"./node_modules/lodash/_basePropertyDeep.js\"),\n    isKey = __webpack_require__(/*! ./_isKey */ \"./node_modules/lodash/_isKey.js\"),\n    toKey = __webpack_require__(/*! ./_toKey */ \"./node_modules/lodash/_toKey.js\");\n\n/**\n * Creates a function that returns the value at `path` of a given object.\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Util\n * @param {Array|string} path The path of the property to get.\n * @returns {Function} Returns the new accessor function.\n * @example\n *\n * var objects = [\n *   { 'a': { 'b': 2 } },\n *   { 'a': { 'b': 1 } }\n * ];\n *\n * _.map(objects, _.property('a.b'));\n * // => [2, 1]\n *\n * _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b');\n * // => [1, 2]\n */\nfunction property(path) {\n  return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path);\n}\n\nmodule.exports = property;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/range.js\":\n/*!**************************************!*\\\n  !*** ./node_modules/lodash/range.js ***!\n  \\**************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar createRange = __webpack_require__(/*! ./_createRange */ \"./node_modules/lodash/_createRange.js\");\n\n/**\n * Creates an array of numbers (positive and/or negative) progressing from\n * `start` up to, but not including, `end`. A step of `-1` is used if a negative\n * `start` is specified without an `end` or `step`. If `end` is not specified,\n * it's set to `start` with `start` then set to `0`.\n *\n * **Note:** JavaScript follows the IEEE-754 standard for resolving\n * floating-point values which can produce unexpected results.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Util\n * @param {number} [start=0] The start of the range.\n * @param {number} end The end of the range.\n * @param {number} [step=1] The value to increment or decrement by.\n * @returns {Array} Returns the range of numbers.\n * @see _.inRange, _.rangeRight\n * @example\n *\n * _.range(4);\n * // => [0, 1, 2, 3]\n *\n * _.range(-4);\n * // => [0, -1, -2, -3]\n *\n * _.range(1, 5);\n * // => [1, 2, 3, 4]\n *\n * _.range(0, 20, 5);\n * // => [0, 5, 10, 15]\n *\n * _.range(0, -4, -1);\n * // => [0, -1, -2, -3]\n *\n * _.range(1, 4, 0);\n * // => [1, 1, 1]\n *\n * _.range(0);\n * // => []\n */\nvar range = createRange();\n\nmodule.exports = range;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/reduce.js\":\n/*!***************************************!*\\\n  !*** ./node_modules/lodash/reduce.js ***!\n  \\***************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar arrayReduce = __webpack_require__(/*! ./_arrayReduce */ \"./node_modules/lodash/_arrayReduce.js\"),\n    baseEach = __webpack_require__(/*! ./_baseEach */ \"./node_modules/lodash/_baseEach.js\"),\n    baseIteratee = __webpack_require__(/*! ./_baseIteratee */ \"./node_modules/lodash/_baseIteratee.js\"),\n    baseReduce = __webpack_require__(/*! ./_baseReduce */ \"./node_modules/lodash/_baseReduce.js\"),\n    isArray = __webpack_require__(/*! ./isArray */ \"./node_modules/lodash/isArray.js\");\n\n/**\n * Reduces `collection` to a value which is the accumulated result of running\n * each element in `collection` thru `iteratee`, where each successive\n * invocation is supplied the return value of the previous. If `accumulator`\n * is not given, the first element of `collection` is used as the initial\n * value. The iteratee is invoked with four arguments:\n * (accumulator, value, index|key, collection).\n *\n * Many lodash methods are guarded to work as iteratees for methods like\n * `_.reduce`, `_.reduceRight`, and `_.transform`.\n *\n * The guarded methods are:\n * `assign`, `defaults`, `defaultsDeep`, `includes`, `merge`, `orderBy`,\n * and `sortBy`\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @param {*} [accumulator] The initial value.\n * @returns {*} Returns the accumulated value.\n * @see _.reduceRight\n * @example\n *\n * _.reduce([1, 2], function(sum, n) {\n *   return sum + n;\n * }, 0);\n * // => 3\n *\n * _.reduce({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) {\n *   (result[value] || (result[value] = [])).push(key);\n *   return result;\n * }, {});\n * // => { '1': ['a', 'c'], '2': ['b'] } (iteration order is not guaranteed)\n */\nfunction reduce(collection, iteratee, accumulator) {\n  var func = isArray(collection) ? arrayReduce : baseReduce,\n      initAccum = arguments.length < 3;\n\n  return func(collection, baseIteratee(iteratee, 4), accumulator, initAccum, baseEach);\n}\n\nmodule.exports = reduce;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/size.js\":\n/*!*************************************!*\\\n  !*** ./node_modules/lodash/size.js ***!\n  \\*************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar baseKeys = __webpack_require__(/*! ./_baseKeys */ \"./node_modules/lodash/_baseKeys.js\"),\n    getTag = __webpack_require__(/*! ./_getTag */ \"./node_modules/lodash/_getTag.js\"),\n    isArrayLike = __webpack_require__(/*! ./isArrayLike */ \"./node_modules/lodash/isArrayLike.js\"),\n    isString = __webpack_require__(/*! ./isString */ \"./node_modules/lodash/isString.js\"),\n    stringSize = __webpack_require__(/*! ./_stringSize */ \"./node_modules/lodash/_stringSize.js\");\n\n/** `Object#toString` result references. */\nvar mapTag = '[object Map]',\n    setTag = '[object Set]';\n\n/**\n * Gets the size of `collection` by returning its length for array-like\n * values or the number of own enumerable string keyed properties for objects.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object|string} collection The collection to inspect.\n * @returns {number} Returns the collection size.\n * @example\n *\n * _.size([1, 2, 3]);\n * // => 3\n *\n * _.size({ 'a': 1, 'b': 2 });\n * // => 2\n *\n * _.size('pebbles');\n * // => 7\n */\nfunction size(collection) {\n  if (collection == null) {\n    return 0;\n  }\n  if (isArrayLike(collection)) {\n    return isString(collection) ? stringSize(collection) : collection.length;\n  }\n  var tag = getTag(collection);\n  if (tag == mapTag || tag == setTag) {\n    return collection.size;\n  }\n  return baseKeys(collection).length;\n}\n\nmodule.exports = size;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/sortBy.js\":\n/*!***************************************!*\\\n  !*** ./node_modules/lodash/sortBy.js ***!\n  \\***************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar baseFlatten = __webpack_require__(/*! ./_baseFlatten */ \"./node_modules/lodash/_baseFlatten.js\"),\n    baseOrderBy = __webpack_require__(/*! ./_baseOrderBy */ \"./node_modules/lodash/_baseOrderBy.js\"),\n    baseRest = __webpack_require__(/*! ./_baseRest */ \"./node_modules/lodash/_baseRest.js\"),\n    isIterateeCall = __webpack_require__(/*! ./_isIterateeCall */ \"./node_modules/lodash/_isIterateeCall.js\");\n\n/**\n * Creates an array of elements, sorted in ascending order by the results of\n * running each element in a collection thru each iteratee. This method\n * performs a stable sort, that is, it preserves the original sort order of\n * equal elements. The iteratees are invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {...(Function|Function[])} [iteratees=[_.identity]]\n *  The iteratees to sort by.\n * @returns {Array} Returns the new sorted array.\n * @example\n *\n * var users = [\n *   { 'user': 'fred',   'age': 48 },\n *   { 'user': 'barney', 'age': 36 },\n *   { 'user': 'fred',   'age': 30 },\n *   { 'user': 'barney', 'age': 34 }\n * ];\n *\n * _.sortBy(users, [function(o) { return o.user; }]);\n * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 30]]\n *\n * _.sortBy(users, ['user', 'age']);\n * // => objects for [['barney', 34], ['barney', 36], ['fred', 30], ['fred', 48]]\n */\nvar sortBy = baseRest(function(collection, iteratees) {\n  if (collection == null) {\n    return [];\n  }\n  var length = iteratees.length;\n  if (length > 1 && isIterateeCall(collection, iteratees[0], iteratees[1])) {\n    iteratees = [];\n  } else if (length > 2 && isIterateeCall(iteratees[0], iteratees[1], iteratees[2])) {\n    iteratees = [iteratees[0]];\n  }\n  return baseOrderBy(collection, baseFlatten(iteratees, 1), []);\n});\n\nmodule.exports = sortBy;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/stubArray.js\":\n/*!******************************************!*\\\n  !*** ./node_modules/lodash/stubArray.js ***!\n  \\******************************************/\n/*! no static exports found */\n/***/ (function(module, exports) {\n\n/**\n * This method returns a new empty array.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {Array} Returns the new empty array.\n * @example\n *\n * var arrays = _.times(2, _.stubArray);\n *\n * console.log(arrays);\n * // => [[], []]\n *\n * console.log(arrays[0] === arrays[1]);\n * // => false\n */\nfunction stubArray() {\n  return [];\n}\n\nmodule.exports = stubArray;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/stubFalse.js\":\n/*!******************************************!*\\\n  !*** ./node_modules/lodash/stubFalse.js ***!\n  \\******************************************/\n/*! no static exports found */\n/***/ (function(module, exports) {\n\n/**\n * This method returns `false`.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {boolean} Returns `false`.\n * @example\n *\n * _.times(2, _.stubFalse);\n * // => [false, false]\n */\nfunction stubFalse() {\n  return false;\n}\n\nmodule.exports = stubFalse;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/toFinite.js\":\n/*!*****************************************!*\\\n  !*** ./node_modules/lodash/toFinite.js ***!\n  \\*****************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar toNumber = __webpack_require__(/*! ./toNumber */ \"./node_modules/lodash/toNumber.js\");\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0,\n    MAX_INTEGER = 1.7976931348623157e+308;\n\n/**\n * Converts `value` to a finite number.\n *\n * @static\n * @memberOf _\n * @since 4.12.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {number} Returns the converted number.\n * @example\n *\n * _.toFinite(3.2);\n * // => 3.2\n *\n * _.toFinite(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toFinite(Infinity);\n * // => 1.7976931348623157e+308\n *\n * _.toFinite('3.2');\n * // => 3.2\n */\nfunction toFinite(value) {\n  if (!value) {\n    return value === 0 ? value : 0;\n  }\n  value = toNumber(value);\n  if (value === INFINITY || value === -INFINITY) {\n    var sign = (value < 0 ? -1 : 1);\n    return sign * MAX_INTEGER;\n  }\n  return value === value ? value : 0;\n}\n\nmodule.exports = toFinite;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/toInteger.js\":\n/*!******************************************!*\\\n  !*** ./node_modules/lodash/toInteger.js ***!\n  \\******************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar toFinite = __webpack_require__(/*! ./toFinite */ \"./node_modules/lodash/toFinite.js\");\n\n/**\n * Converts `value` to an integer.\n *\n * **Note:** This method is loosely based on\n * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {number} Returns the converted integer.\n * @example\n *\n * _.toInteger(3.2);\n * // => 3\n *\n * _.toInteger(Number.MIN_VALUE);\n * // => 0\n *\n * _.toInteger(Infinity);\n * // => 1.7976931348623157e+308\n *\n * _.toInteger('3.2');\n * // => 3\n */\nfunction toInteger(value) {\n  var result = toFinite(value),\n      remainder = result % 1;\n\n  return result === result ? (remainder ? result - remainder : result) : 0;\n}\n\nmodule.exports = toInteger;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/toNumber.js\":\n/*!*****************************************!*\\\n  !*** ./node_modules/lodash/toNumber.js ***!\n  \\*****************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar baseTrim = __webpack_require__(/*! ./_baseTrim */ \"./node_modules/lodash/_baseTrim.js\"),\n    isObject = __webpack_require__(/*! ./isObject */ \"./node_modules/lodash/isObject.js\"),\n    isSymbol = __webpack_require__(/*! ./isSymbol */ \"./node_modules/lodash/isSymbol.js\");\n\n/** Used as references for various `Number` constants. */\nvar NAN = 0 / 0;\n\n/** Used to detect bad signed hexadecimal string values. */\nvar reIsBadHex = /^[-+]0x[0-9a-f]+$/i;\n\n/** Used to detect binary string values. */\nvar reIsBinary = /^0b[01]+$/i;\n\n/** Used to detect octal string values. */\nvar reIsOctal = /^0o[0-7]+$/i;\n\n/** Built-in method references without a dependency on `root`. */\nvar freeParseInt = parseInt;\n\n/**\n * Converts `value` to a number.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to process.\n * @returns {number} Returns the number.\n * @example\n *\n * _.toNumber(3.2);\n * // => 3.2\n *\n * _.toNumber(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toNumber(Infinity);\n * // => Infinity\n *\n * _.toNumber('3.2');\n * // => 3.2\n */\nfunction toNumber(value) {\n  if (typeof value == 'number') {\n    return value;\n  }\n  if (isSymbol(value)) {\n    return NAN;\n  }\n  if (isObject(value)) {\n    var other = typeof value.valueOf == 'function' ? value.valueOf() : value;\n    value = isObject(other) ? (other + '') : other;\n  }\n  if (typeof value != 'string') {\n    return value === 0 ? value : +value;\n  }\n  value = baseTrim(value);\n  var isBinary = reIsBinary.test(value);\n  return (isBinary || reIsOctal.test(value))\n    ? freeParseInt(value.slice(2), isBinary ? 2 : 8)\n    : (reIsBadHex.test(value) ? NAN : +value);\n}\n\nmodule.exports = toNumber;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/toPlainObject.js\":\n/*!**********************************************!*\\\n  !*** ./node_modules/lodash/toPlainObject.js ***!\n  \\**********************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar copyObject = __webpack_require__(/*! ./_copyObject */ \"./node_modules/lodash/_copyObject.js\"),\n    keysIn = __webpack_require__(/*! ./keysIn */ \"./node_modules/lodash/keysIn.js\");\n\n/**\n * Converts `value` to a plain object flattening inherited enumerable string\n * keyed properties of `value` to own properties of the plain object.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {Object} Returns the converted plain object.\n * @example\n *\n * function Foo() {\n *   this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.assign({ 'a': 1 }, new Foo);\n * // => { 'a': 1, 'b': 2 }\n *\n * _.assign({ 'a': 1 }, _.toPlainObject(new Foo));\n * // => { 'a': 1, 'b': 2, 'c': 3 }\n */\nfunction toPlainObject(value) {\n  return copyObject(value, keysIn(value));\n}\n\nmodule.exports = toPlainObject;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/toString.js\":\n/*!*****************************************!*\\\n  !*** ./node_modules/lodash/toString.js ***!\n  \\*****************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar baseToString = __webpack_require__(/*! ./_baseToString */ \"./node_modules/lodash/_baseToString.js\");\n\n/**\n * Converts `value` to a string. An empty string is returned for `null`\n * and `undefined` values. The sign of `-0` is preserved.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n * @example\n *\n * _.toString(null);\n * // => ''\n *\n * _.toString(-0);\n * // => '-0'\n *\n * _.toString([1, 2, 3]);\n * // => '1,2,3'\n */\nfunction toString(value) {\n  return value == null ? '' : baseToString(value);\n}\n\nmodule.exports = toString;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/transform.js\":\n/*!******************************************!*\\\n  !*** ./node_modules/lodash/transform.js ***!\n  \\******************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar arrayEach = __webpack_require__(/*! ./_arrayEach */ \"./node_modules/lodash/_arrayEach.js\"),\n    baseCreate = __webpack_require__(/*! ./_baseCreate */ \"./node_modules/lodash/_baseCreate.js\"),\n    baseForOwn = __webpack_require__(/*! ./_baseForOwn */ \"./node_modules/lodash/_baseForOwn.js\"),\n    baseIteratee = __webpack_require__(/*! ./_baseIteratee */ \"./node_modules/lodash/_baseIteratee.js\"),\n    getPrototype = __webpack_require__(/*! ./_getPrototype */ \"./node_modules/lodash/_getPrototype.js\"),\n    isArray = __webpack_require__(/*! ./isArray */ \"./node_modules/lodash/isArray.js\"),\n    isBuffer = __webpack_require__(/*! ./isBuffer */ \"./node_modules/lodash/isBuffer.js\"),\n    isFunction = __webpack_require__(/*! ./isFunction */ \"./node_modules/lodash/isFunction.js\"),\n    isObject = __webpack_require__(/*! ./isObject */ \"./node_modules/lodash/isObject.js\"),\n    isTypedArray = __webpack_require__(/*! ./isTypedArray */ \"./node_modules/lodash/isTypedArray.js\");\n\n/**\n * An alternative to `_.reduce`; this method transforms `object` to a new\n * `accumulator` object which is the result of running each of its own\n * enumerable string keyed properties thru `iteratee`, with each invocation\n * potentially mutating the `accumulator` object. If `accumulator` is not\n * provided, a new object with the same `[[Prototype]]` will be used. The\n * iteratee is invoked with four arguments: (accumulator, value, key, object).\n * Iteratee functions may exit iteration early by explicitly returning `false`.\n *\n * @static\n * @memberOf _\n * @since 1.3.0\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @param {*} [accumulator] The custom accumulator value.\n * @returns {*} Returns the accumulated value.\n * @example\n *\n * _.transform([2, 3, 4], function(result, n) {\n *   result.push(n *= n);\n *   return n % 2 == 0;\n * }, []);\n * // => [4, 9]\n *\n * _.transform({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) {\n *   (result[value] || (result[value] = [])).push(key);\n * }, {});\n * // => { '1': ['a', 'c'], '2': ['b'] }\n */\nfunction transform(object, iteratee, accumulator) {\n  var isArr = isArray(object),\n      isArrLike = isArr || isBuffer(object) || isTypedArray(object);\n\n  iteratee = baseIteratee(iteratee, 4);\n  if (accumulator == null) {\n    var Ctor = object && object.constructor;\n    if (isArrLike) {\n      accumulator = isArr ? new Ctor : [];\n    }\n    else if (isObject(object)) {\n      accumulator = isFunction(Ctor) ? baseCreate(getPrototype(object)) : {};\n    }\n    else {\n      accumulator = {};\n    }\n  }\n  (isArrLike ? arrayEach : baseForOwn)(object, function(value, index, object) {\n    return iteratee(accumulator, value, index, object);\n  });\n  return accumulator;\n}\n\nmodule.exports = transform;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/union.js\":\n/*!**************************************!*\\\n  !*** ./node_modules/lodash/union.js ***!\n  \\**************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar baseFlatten = __webpack_require__(/*! ./_baseFlatten */ \"./node_modules/lodash/_baseFlatten.js\"),\n    baseRest = __webpack_require__(/*! ./_baseRest */ \"./node_modules/lodash/_baseRest.js\"),\n    baseUniq = __webpack_require__(/*! ./_baseUniq */ \"./node_modules/lodash/_baseUniq.js\"),\n    isArrayLikeObject = __webpack_require__(/*! ./isArrayLikeObject */ \"./node_modules/lodash/isArrayLikeObject.js\");\n\n/**\n * Creates an array of unique values, in order, from all given arrays using\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @returns {Array} Returns the new array of combined values.\n * @example\n *\n * _.union([2], [1, 2]);\n * // => [2, 1]\n */\nvar union = baseRest(function(arrays) {\n  return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true));\n});\n\nmodule.exports = union;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/uniqueId.js\":\n/*!*****************************************!*\\\n  !*** ./node_modules/lodash/uniqueId.js ***!\n  \\*****************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar toString = __webpack_require__(/*! ./toString */ \"./node_modules/lodash/toString.js\");\n\n/** Used to generate unique IDs. */\nvar idCounter = 0;\n\n/**\n * Generates a unique ID. If `prefix` is given, the ID is appended to it.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Util\n * @param {string} [prefix=''] The value to prefix the ID with.\n * @returns {string} Returns the unique ID.\n * @example\n *\n * _.uniqueId('contact_');\n * // => 'contact_104'\n *\n * _.uniqueId();\n * // => '105'\n */\nfunction uniqueId(prefix) {\n  var id = ++idCounter;\n  return toString(prefix) + id;\n}\n\nmodule.exports = uniqueId;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/values.js\":\n/*!***************************************!*\\\n  !*** ./node_modules/lodash/values.js ***!\n  \\***************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar baseValues = __webpack_require__(/*! ./_baseValues */ \"./node_modules/lodash/_baseValues.js\"),\n    keys = __webpack_require__(/*! ./keys */ \"./node_modules/lodash/keys.js\");\n\n/**\n * Creates an array of the own enumerable string keyed property values of `object`.\n *\n * **Note:** Non-object values are coerced to objects.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property values.\n * @example\n *\n * function Foo() {\n *   this.a = 1;\n *   this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.values(new Foo);\n * // => [1, 2] (iteration order is not guaranteed)\n *\n * _.values('hi');\n * // => ['h', 'i']\n */\nfunction values(object) {\n  return object == null ? [] : baseValues(object, keys(object));\n}\n\nmodule.exports = values;\n\n\n/***/ }),\n\n/***/ \"./node_modules/lodash/zipObject.js\":\n/*!******************************************!*\\\n  !*** ./node_modules/lodash/zipObject.js ***!\n  \\******************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar assignValue = __webpack_require__(/*! ./_assignValue */ \"./node_modules/lodash/_assignValue.js\"),\n    baseZipObject = __webpack_require__(/*! ./_baseZipObject */ \"./node_modules/lodash/_baseZipObject.js\");\n\n/**\n * This method is like `_.fromPairs` except that it accepts two arrays,\n * one of property identifiers and one of corresponding values.\n *\n * @static\n * @memberOf _\n * @since 0.4.0\n * @category Array\n * @param {Array} [props=[]] The property identifiers.\n * @param {Array} [values=[]] The property values.\n * @returns {Object} Returns the new object.\n * @example\n *\n * _.zipObject(['a', 'b'], [1, 2]);\n * // => { 'a': 1, 'b': 2 }\n */\nfunction zipObject(props, values) {\n  return baseZipObject(props || [], values || [], assignValue);\n}\n\nmodule.exports = zipObject;\n\n\n/***/ }),\n\n/***/ \"./node_modules/moment-mini/locale sync recursive ^\\\\.\\\\/.*$\":\n/*!*******************************************************!*\\\n  !*** ./node_modules/moment-mini/locale sync ^\\.\\/.*$ ***!\n  \\*******************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar map = {\n\t\"./locale\": \"./node_modules/moment-mini/locale/locale.js\",\n\t\"./locale.js\": \"./node_modules/moment-mini/locale/locale.js\"\n};\n\n\nfunction webpackContext(req) {\n\tvar id = webpackContextResolve(req);\n\treturn __webpack_require__(id);\n}\nfunction webpackContextResolve(req) {\n\tif(!__webpack_require__.o(map, req)) {\n\t\tvar e = new Error(\"Cannot find module '\" + req + \"'\");\n\t\te.code = 'MODULE_NOT_FOUND';\n\t\tthrow e;\n\t}\n\treturn map[req];\n}\nwebpackContext.keys = function webpackContextKeys() {\n\treturn Object.keys(map);\n};\nwebpackContext.resolve = webpackContextResolve;\nmodule.exports = webpackContext;\nwebpackContext.id = \"./node_modules/moment-mini/locale sync recursive ^\\\\.\\\\/.*$\";\n\n/***/ }),\n\n/***/ \"./node_modules/moment-mini/locale/locale.js\":\n/*!***************************************************!*\\\n  !*** ./node_modules/moment-mini/locale/locale.js ***!\n  \\***************************************************/\n/*! no static exports found */\n/***/ (function(module, exports) {\n\n\n\n/***/ }),\n\n/***/ \"./node_modules/moment-mini/moment.min.js\":\n/*!************************************************!*\\\n  !*** ./node_modules/moment-mini/moment.min.js ***!\n  \\************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n/* WEBPACK VAR INJECTION */(function(module) {!function(e,t){ true?module.exports=t():undefined}(this,function(){\"use strict\";var e,i;function c(){return e.apply(null,arguments)}function o(e){return e instanceof Array||\"[object Array]\"===Object.prototype.toString.call(e)}function u(e){return null!=e&&\"[object Object]\"===Object.prototype.toString.call(e)}function l(e){return void 0===e}function h(e){return\"number\"==typeof e||\"[object Number]\"===Object.prototype.toString.call(e)}function d(e){return e instanceof Date||\"[object Date]\"===Object.prototype.toString.call(e)}function f(e,t){var n,s=[];for(n=0;n<e.length;++n)s.push(t(e[n],n));return s}function m(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function _(e,t){for(var n in t)m(t,n)&&(e[n]=t[n]);return m(t,\"toString\")&&(e.toString=t.toString),m(t,\"valueOf\")&&(e.valueOf=t.valueOf),e}function y(e,t,n,s){return Tt(e,t,n,s,!0).utc()}function g(e){return null==e._pf&&(e._pf={empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],meridiem:null,rfc2822:!1,weekdayMismatch:!1}),e._pf}function v(e){if(null==e._isValid){var t=g(e),n=i.call(t.parsedDateParts,function(e){return null!=e}),s=!isNaN(e._d.getTime())&&t.overflow<0&&!t.empty&&!t.invalidMonth&&!t.invalidWeekday&&!t.weekdayMismatch&&!t.nullInput&&!t.invalidFormat&&!t.userInvalidated&&(!t.meridiem||t.meridiem&&n);if(e._strict&&(s=s&&0===t.charsLeftOver&&0===t.unusedTokens.length&&void 0===t.bigHour),null!=Object.isFrozen&&Object.isFrozen(e))return s;e._isValid=s}return e._isValid}function p(e){var t=y(NaN);return null!=e?_(g(t),e):g(t).userInvalidated=!0,t}i=Array.prototype.some?Array.prototype.some:function(e){for(var t=Object(this),n=t.length>>>0,s=0;s<n;s++)if(s in t&&e.call(this,t[s],s,t))return!0;return!1};var r=c.momentProperties=[];function w(e,t){var n,s,i;if(l(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),l(t._i)||(e._i=t._i),l(t._f)||(e._f=t._f),l(t._l)||(e._l=t._l),l(t._strict)||(e._strict=t._strict),l(t._tzm)||(e._tzm=t._tzm),l(t._isUTC)||(e._isUTC=t._isUTC),l(t._offset)||(e._offset=t._offset),l(t._pf)||(e._pf=g(t)),l(t._locale)||(e._locale=t._locale),0<r.length)for(n=0;n<r.length;n++)l(i=t[s=r[n]])||(e[s]=i);return e}var t=!1;function M(e){w(this,e),this._d=new Date(null!=e._d?e._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),!1===t&&(t=!0,c.updateOffset(this),t=!1)}function k(e){return e instanceof M||null!=e&&null!=e._isAMomentObject}function S(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function D(e){var t=+e,n=0;return 0!==t&&isFinite(t)&&(n=S(t)),n}function a(e,t,n){var s,i=Math.min(e.length,t.length),r=Math.abs(e.length-t.length),a=0;for(s=0;s<i;s++)(n&&e[s]!==t[s]||!n&&D(e[s])!==D(t[s]))&&a++;return a+r}function Y(e){!1===c.suppressDeprecationWarnings&&\"undefined\"!=typeof console&&console.warn&&console.warn(\"Deprecation warning: \"+e)}function n(i,r){var a=!0;return _(function(){if(null!=c.deprecationHandler&&c.deprecationHandler(null,i),a){for(var e,t=[],n=0;n<arguments.length;n++){if(e=\"\",\"object\"==typeof arguments[n]){for(var s in e+=\"\\n[\"+n+\"] \",arguments[0])e+=s+\": \"+arguments[0][s]+\", \";e=e.slice(0,-2)}else e=arguments[n];t.push(e)}Y(i+\"\\nArguments: \"+Array.prototype.slice.call(t).join(\"\")+\"\\n\"+(new Error).stack),a=!1}return r.apply(this,arguments)},r)}var s,O={};function T(e,t){null!=c.deprecationHandler&&c.deprecationHandler(e,t),O[e]||(Y(t),O[e]=!0)}function b(e){return e instanceof Function||\"[object Function]\"===Object.prototype.toString.call(e)}function x(e,t){var n,s=_({},e);for(n in t)m(t,n)&&(u(e[n])&&u(t[n])?(s[n]={},_(s[n],e[n]),_(s[n],t[n])):null!=t[n]?s[n]=t[n]:delete s[n]);for(n in e)m(e,n)&&!m(t,n)&&u(e[n])&&(s[n]=_({},s[n]));return s}function P(e){null!=e&&this.set(e)}c.suppressDeprecationWarnings=!1,c.deprecationHandler=null,s=Object.keys?Object.keys:function(e){var t,n=[];for(t in e)m(e,t)&&n.push(t);return n};var W={};function C(e,t){var n=e.toLowerCase();W[n]=W[n+\"s\"]=W[t]=e}function H(e){return\"string\"==typeof e?W[e]||W[e.toLowerCase()]:void 0}function R(e){var t,n,s={};for(n in e)m(e,n)&&(t=H(n))&&(s[t]=e[n]);return s}var U={};function F(e,t){U[e]=t}function L(e,t,n){var s=\"\"+Math.abs(e),i=t-s.length;return(0<=e?n?\"+\":\"\":\"-\")+Math.pow(10,Math.max(0,i)).toString().substr(1)+s}var N=/(\\[[^\\[]*\\])|(\\\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,G=/(\\[[^\\[]*\\])|(\\\\)?(LTS|LT|LL?L?L?|l{1,4})/g,V={},E={};function I(e,t,n,s){var i=s;\"string\"==typeof s&&(i=function(){return this[s]()}),e&&(E[e]=i),t&&(E[t[0]]=function(){return L(i.apply(this,arguments),t[1],t[2])}),n&&(E[n]=function(){return this.localeData().ordinal(i.apply(this,arguments),e)})}function A(e,t){return e.isValid()?(t=j(t,e.localeData()),V[t]=V[t]||function(s){var e,i,t,r=s.match(N);for(e=0,i=r.length;e<i;e++)E[r[e]]?r[e]=E[r[e]]:r[e]=(t=r[e]).match(/\\[[\\s\\S]/)?t.replace(/^\\[|\\]$/g,\"\"):t.replace(/\\\\/g,\"\");return function(e){var t,n=\"\";for(t=0;t<i;t++)n+=b(r[t])?r[t].call(e,s):r[t];return n}}(t),V[t](e)):e.localeData().invalidDate()}function j(e,t){var n=5;function s(e){return t.longDateFormat(e)||e}for(G.lastIndex=0;0<=n&&G.test(e);)e=e.replace(G,s),G.lastIndex=0,n-=1;return e}var Z=/\\d/,z=/\\d\\d/,$=/\\d{3}/,q=/\\d{4}/,J=/[+-]?\\d{6}/,B=/\\d\\d?/,Q=/\\d\\d\\d\\d?/,X=/\\d\\d\\d\\d\\d\\d?/,K=/\\d{1,3}/,ee=/\\d{1,4}/,te=/[+-]?\\d{1,6}/,ne=/\\d+/,se=/[+-]?\\d+/,ie=/Z|[+-]\\d\\d:?\\d\\d/gi,re=/Z|[+-]\\d\\d(?::?\\d\\d)?/gi,ae=/[0-9]{0,256}['a-z\\u00A0-\\u05FF\\u0700-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFF07\\uFF10-\\uFFEF]{1,256}|[\\u0600-\\u06FF\\/]{1,256}(\\s*?[\\u0600-\\u06FF]{1,256}){1,2}/i,oe={};function ue(e,n,s){oe[e]=b(n)?n:function(e,t){return e&&s?s:n}}function le(e,t){return m(oe,e)?oe[e](t._strict,t._locale):new RegExp(he(e.replace(\"\\\\\",\"\").replace(/\\\\(\\[)|\\\\(\\])|\\[([^\\]\\[]*)\\]|\\\\(.)/g,function(e,t,n,s,i){return t||n||s||i})))}function he(e){return e.replace(/[-\\/\\\\^$*+?.()|[\\]{}]/g,\"\\\\$&\")}var de={};function ce(e,n){var t,s=n;for(\"string\"==typeof e&&(e=[e]),h(n)&&(s=function(e,t){t[n]=D(e)}),t=0;t<e.length;t++)de[e[t]]=s}function fe(e,i){ce(e,function(e,t,n,s){n._w=n._w||{},i(e,n._w,n,s)})}var me=0,_e=1,ye=2,ge=3,ve=4,pe=5,we=6,Me=7,ke=8;function Se(e){return De(e)?366:365}function De(e){return e%4==0&&e%100!=0||e%400==0}I(\"Y\",0,0,function(){var e=this.year();return e<=9999?\"\"+e:\"+\"+e}),I(0,[\"YY\",2],0,function(){return this.year()%100}),I(0,[\"YYYY\",4],0,\"year\"),I(0,[\"YYYYY\",5],0,\"year\"),I(0,[\"YYYYYY\",6,!0],0,\"year\"),C(\"year\",\"y\"),F(\"year\",1),ue(\"Y\",se),ue(\"YY\",B,z),ue(\"YYYY\",ee,q),ue(\"YYYYY\",te,J),ue(\"YYYYYY\",te,J),ce([\"YYYYY\",\"YYYYYY\"],me),ce(\"YYYY\",function(e,t){t[me]=2===e.length?c.parseTwoDigitYear(e):D(e)}),ce(\"YY\",function(e,t){t[me]=c.parseTwoDigitYear(e)}),ce(\"Y\",function(e,t){t[me]=parseInt(e,10)}),c.parseTwoDigitYear=function(e){return D(e)+(68<D(e)?1900:2e3)};var Ye,Oe=Te(\"FullYear\",!0);function Te(t,n){return function(e){return null!=e?(xe(this,t,e),c.updateOffset(this,n),this):be(this,t)}}function be(e,t){return e.isValid()?e._d[\"get\"+(e._isUTC?\"UTC\":\"\")+t]():NaN}function xe(e,t,n){e.isValid()&&!isNaN(n)&&(\"FullYear\"===t&&De(e.year())&&1===e.month()&&29===e.date()?e._d[\"set\"+(e._isUTC?\"UTC\":\"\")+t](n,e.month(),Pe(n,e.month())):e._d[\"set\"+(e._isUTC?\"UTC\":\"\")+t](n))}function Pe(e,t){if(isNaN(e)||isNaN(t))return NaN;var n,s=(t%(n=12)+n)%n;return e+=(t-s)/12,1===s?De(e)?29:28:31-s%7%2}Ye=Array.prototype.indexOf?Array.prototype.indexOf:function(e){var t;for(t=0;t<this.length;++t)if(this[t]===e)return t;return-1},I(\"M\",[\"MM\",2],\"Mo\",function(){return this.month()+1}),I(\"MMM\",0,0,function(e){return this.localeData().monthsShort(this,e)}),I(\"MMMM\",0,0,function(e){return this.localeData().months(this,e)}),C(\"month\",\"M\"),F(\"month\",8),ue(\"M\",B),ue(\"MM\",B,z),ue(\"MMM\",function(e,t){return t.monthsShortRegex(e)}),ue(\"MMMM\",function(e,t){return t.monthsRegex(e)}),ce([\"M\",\"MM\"],function(e,t){t[_e]=D(e)-1}),ce([\"MMM\",\"MMMM\"],function(e,t,n,s){var i=n._locale.monthsParse(e,s,n._strict);null!=i?t[_e]=i:g(n).invalidMonth=e});var We=/D[oD]?(\\[[^\\[\\]]*\\]|\\s)+MMMM?/,Ce=\"January_February_March_April_May_June_July_August_September_October_November_December\".split(\"_\");var He=\"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec\".split(\"_\");function Re(e,t){var n;if(!e.isValid())return e;if(\"string\"==typeof t)if(/^\\d+$/.test(t))t=D(t);else if(!h(t=e.localeData().monthsParse(t)))return e;return n=Math.min(e.date(),Pe(e.year(),t)),e._d[\"set\"+(e._isUTC?\"UTC\":\"\")+\"Month\"](t,n),e}function Ue(e){return null!=e?(Re(this,e),c.updateOffset(this,!0),this):be(this,\"Month\")}var Fe=ae;var Le=ae;function Ne(){function e(e,t){return t.length-e.length}var t,n,s=[],i=[],r=[];for(t=0;t<12;t++)n=y([2e3,t]),s.push(this.monthsShort(n,\"\")),i.push(this.months(n,\"\")),r.push(this.months(n,\"\")),r.push(this.monthsShort(n,\"\"));for(s.sort(e),i.sort(e),r.sort(e),t=0;t<12;t++)s[t]=he(s[t]),i[t]=he(i[t]);for(t=0;t<24;t++)r[t]=he(r[t]);this._monthsRegex=new RegExp(\"^(\"+r.join(\"|\")+\")\",\"i\"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp(\"^(\"+i.join(\"|\")+\")\",\"i\"),this._monthsShortStrictRegex=new RegExp(\"^(\"+s.join(\"|\")+\")\",\"i\")}function Ge(e){var t;if(e<100&&0<=e){var n=Array.prototype.slice.call(arguments);n[0]=e+400,t=new Date(Date.UTC.apply(null,n)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)}else t=new Date(Date.UTC.apply(null,arguments));return t}function Ve(e,t,n){var s=7+t-n;return-((7+Ge(e,0,s).getUTCDay()-t)%7)+s-1}function Ee(e,t,n,s,i){var r,a,o=1+7*(t-1)+(7+n-s)%7+Ve(e,s,i);return a=o<=0?Se(r=e-1)+o:o>Se(e)?(r=e+1,o-Se(e)):(r=e,o),{year:r,dayOfYear:a}}function Ie(e,t,n){var s,i,r=Ve(e.year(),t,n),a=Math.floor((e.dayOfYear()-r-1)/7)+1;return a<1?s=a+Ae(i=e.year()-1,t,n):a>Ae(e.year(),t,n)?(s=a-Ae(e.year(),t,n),i=e.year()+1):(i=e.year(),s=a),{week:s,year:i}}function Ae(e,t,n){var s=Ve(e,t,n),i=Ve(e+1,t,n);return(Se(e)-s+i)/7}I(\"w\",[\"ww\",2],\"wo\",\"week\"),I(\"W\",[\"WW\",2],\"Wo\",\"isoWeek\"),C(\"week\",\"w\"),C(\"isoWeek\",\"W\"),F(\"week\",5),F(\"isoWeek\",5),ue(\"w\",B),ue(\"ww\",B,z),ue(\"W\",B),ue(\"WW\",B,z),fe([\"w\",\"ww\",\"W\",\"WW\"],function(e,t,n,s){t[s.substr(0,1)]=D(e)});function je(e,t){return e.slice(t,7).concat(e.slice(0,t))}I(\"d\",0,\"do\",\"day\"),I(\"dd\",0,0,function(e){return this.localeData().weekdaysMin(this,e)}),I(\"ddd\",0,0,function(e){return this.localeData().weekdaysShort(this,e)}),I(\"dddd\",0,0,function(e){return this.localeData().weekdays(this,e)}),I(\"e\",0,0,\"weekday\"),I(\"E\",0,0,\"isoWeekday\"),C(\"day\",\"d\"),C(\"weekday\",\"e\"),C(\"isoWeekday\",\"E\"),F(\"day\",11),F(\"weekday\",11),F(\"isoWeekday\",11),ue(\"d\",B),ue(\"e\",B),ue(\"E\",B),ue(\"dd\",function(e,t){return t.weekdaysMinRegex(e)}),ue(\"ddd\",function(e,t){return t.weekdaysShortRegex(e)}),ue(\"dddd\",function(e,t){return t.weekdaysRegex(e)}),fe([\"dd\",\"ddd\",\"dddd\"],function(e,t,n,s){var i=n._locale.weekdaysParse(e,s,n._strict);null!=i?t.d=i:g(n).invalidWeekday=e}),fe([\"d\",\"e\",\"E\"],function(e,t,n,s){t[s]=D(e)});var Ze=\"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday\".split(\"_\");var ze=\"Sun_Mon_Tue_Wed_Thu_Fri_Sat\".split(\"_\");var $e=\"Su_Mo_Tu_We_Th_Fr_Sa\".split(\"_\");var qe=ae;var Je=ae;var Be=ae;function Qe(){function e(e,t){return t.length-e.length}var t,n,s,i,r,a=[],o=[],u=[],l=[];for(t=0;t<7;t++)n=y([2e3,1]).day(t),s=this.weekdaysMin(n,\"\"),i=this.weekdaysShort(n,\"\"),r=this.weekdays(n,\"\"),a.push(s),o.push(i),u.push(r),l.push(s),l.push(i),l.push(r);for(a.sort(e),o.sort(e),u.sort(e),l.sort(e),t=0;t<7;t++)o[t]=he(o[t]),u[t]=he(u[t]),l[t]=he(l[t]);this._weekdaysRegex=new RegExp(\"^(\"+l.join(\"|\")+\")\",\"i\"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp(\"^(\"+u.join(\"|\")+\")\",\"i\"),this._weekdaysShortStrictRegex=new RegExp(\"^(\"+o.join(\"|\")+\")\",\"i\"),this._weekdaysMinStrictRegex=new RegExp(\"^(\"+a.join(\"|\")+\")\",\"i\")}function Xe(){return this.hours()%12||12}function Ke(e,t){I(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}function et(e,t){return t._meridiemParse}I(\"H\",[\"HH\",2],0,\"hour\"),I(\"h\",[\"hh\",2],0,Xe),I(\"k\",[\"kk\",2],0,function(){return this.hours()||24}),I(\"hmm\",0,0,function(){return\"\"+Xe.apply(this)+L(this.minutes(),2)}),I(\"hmmss\",0,0,function(){return\"\"+Xe.apply(this)+L(this.minutes(),2)+L(this.seconds(),2)}),I(\"Hmm\",0,0,function(){return\"\"+this.hours()+L(this.minutes(),2)}),I(\"Hmmss\",0,0,function(){return\"\"+this.hours()+L(this.minutes(),2)+L(this.seconds(),2)}),Ke(\"a\",!0),Ke(\"A\",!1),C(\"hour\",\"h\"),F(\"hour\",13),ue(\"a\",et),ue(\"A\",et),ue(\"H\",B),ue(\"h\",B),ue(\"k\",B),ue(\"HH\",B,z),ue(\"hh\",B,z),ue(\"kk\",B,z),ue(\"hmm\",Q),ue(\"hmmss\",X),ue(\"Hmm\",Q),ue(\"Hmmss\",X),ce([\"H\",\"HH\"],ge),ce([\"k\",\"kk\"],function(e,t,n){var s=D(e);t[ge]=24===s?0:s}),ce([\"a\",\"A\"],function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e}),ce([\"h\",\"hh\"],function(e,t,n){t[ge]=D(e),g(n).bigHour=!0}),ce(\"hmm\",function(e,t,n){var s=e.length-2;t[ge]=D(e.substr(0,s)),t[ve]=D(e.substr(s)),g(n).bigHour=!0}),ce(\"hmmss\",function(e,t,n){var s=e.length-4,i=e.length-2;t[ge]=D(e.substr(0,s)),t[ve]=D(e.substr(s,2)),t[pe]=D(e.substr(i)),g(n).bigHour=!0}),ce(\"Hmm\",function(e,t,n){var s=e.length-2;t[ge]=D(e.substr(0,s)),t[ve]=D(e.substr(s))}),ce(\"Hmmss\",function(e,t,n){var s=e.length-4,i=e.length-2;t[ge]=D(e.substr(0,s)),t[ve]=D(e.substr(s,2)),t[pe]=D(e.substr(i))});var tt,nt=Te(\"Hours\",!0),st={calendar:{sameDay:\"[Today at] LT\",nextDay:\"[Tomorrow at] LT\",nextWeek:\"dddd [at] LT\",lastDay:\"[Yesterday at] LT\",lastWeek:\"[Last] dddd [at] LT\",sameElse:\"L\"},longDateFormat:{LTS:\"h:mm:ss A\",LT:\"h:mm A\",L:\"MM/DD/YYYY\",LL:\"MMMM D, YYYY\",LLL:\"MMMM D, YYYY h:mm A\",LLLL:\"dddd, MMMM D, YYYY h:mm A\"},invalidDate:\"Invalid date\",ordinal:\"%d\",dayOfMonthOrdinalParse:/\\d{1,2}/,relativeTime:{future:\"in %s\",past:\"%s ago\",s:\"a few seconds\",ss:\"%d seconds\",m:\"a minute\",mm:\"%d minutes\",h:\"an hour\",hh:\"%d hours\",d:\"a day\",dd:\"%d days\",M:\"a month\",MM:\"%d months\",y:\"a year\",yy:\"%d years\"},months:Ce,monthsShort:He,week:{dow:0,doy:6},weekdays:Ze,weekdaysMin:$e,weekdaysShort:ze,meridiemParse:/[ap]\\.?m?\\.?/i},it={},rt={};function at(e){return e?e.toLowerCase().replace(\"_\",\"-\"):e}function ot(e){var t=null;if(!it[e]&&\"undefined\"!=typeof module&&module&&module.exports)try{t=tt._abbr,__webpack_require__(\"./node_modules/moment-mini/locale sync recursive ^\\\\.\\\\/.*$\")(\"./\"+e),ut(t)}catch(e){}return it[e]}function ut(e,t){var n;return e&&((n=l(t)?ht(e):lt(e,t))?tt=n:\"undefined\"!=typeof console&&console.warn&&console.warn(\"Locale \"+e+\" not found. Did you forget to load it?\")),tt._abbr}function lt(e,t){if(null===t)return delete it[e],null;var n,s=st;if(t.abbr=e,null!=it[e])T(\"defineLocaleOverride\",\"use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info.\"),s=it[e]._config;else if(null!=t.parentLocale)if(null!=it[t.parentLocale])s=it[t.parentLocale]._config;else{if(null==(n=ot(t.parentLocale)))return rt[t.parentLocale]||(rt[t.parentLocale]=[]),rt[t.parentLocale].push({name:e,config:t}),null;s=n._config}return it[e]=new P(x(s,t)),rt[e]&&rt[e].forEach(function(e){lt(e.name,e.config)}),ut(e),it[e]}function ht(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return tt;if(!o(e)){if(t=ot(e))return t;e=[e]}return function(e){for(var t,n,s,i,r=0;r<e.length;){for(t=(i=at(e[r]).split(\"-\")).length,n=(n=at(e[r+1]))?n.split(\"-\"):null;0<t;){if(s=ot(i.slice(0,t).join(\"-\")))return s;if(n&&n.length>=t&&a(i,n,!0)>=t-1)break;t--}r++}return tt}(e)}function dt(e){var t,n=e._a;return n&&-2===g(e).overflow&&(t=n[_e]<0||11<n[_e]?_e:n[ye]<1||n[ye]>Pe(n[me],n[_e])?ye:n[ge]<0||24<n[ge]||24===n[ge]&&(0!==n[ve]||0!==n[pe]||0!==n[we])?ge:n[ve]<0||59<n[ve]?ve:n[pe]<0||59<n[pe]?pe:n[we]<0||999<n[we]?we:-1,g(e)._overflowDayOfYear&&(t<me||ye<t)&&(t=ye),g(e)._overflowWeeks&&-1===t&&(t=Me),g(e)._overflowWeekday&&-1===t&&(t=ke),g(e).overflow=t),e}function ct(e,t,n){return null!=e?e:null!=t?t:n}function ft(e){var t,n,s,i,r,a=[];if(!e._d){var o,u;for(o=e,u=new Date(c.now()),s=o._useUTC?[u.getUTCFullYear(),u.getUTCMonth(),u.getUTCDate()]:[u.getFullYear(),u.getMonth(),u.getDate()],e._w&&null==e._a[ye]&&null==e._a[_e]&&function(e){var t,n,s,i,r,a,o,u;if(null!=(t=e._w).GG||null!=t.W||null!=t.E)r=1,a=4,n=ct(t.GG,e._a[me],Ie(bt(),1,4).year),s=ct(t.W,1),((i=ct(t.E,1))<1||7<i)&&(u=!0);else{r=e._locale._week.dow,a=e._locale._week.doy;var l=Ie(bt(),r,a);n=ct(t.gg,e._a[me],l.year),s=ct(t.w,l.week),null!=t.d?((i=t.d)<0||6<i)&&(u=!0):null!=t.e?(i=t.e+r,(t.e<0||6<t.e)&&(u=!0)):i=r}s<1||s>Ae(n,r,a)?g(e)._overflowWeeks=!0:null!=u?g(e)._overflowWeekday=!0:(o=Ee(n,s,i,r,a),e._a[me]=o.year,e._dayOfYear=o.dayOfYear)}(e),null!=e._dayOfYear&&(r=ct(e._a[me],s[me]),(e._dayOfYear>Se(r)||0===e._dayOfYear)&&(g(e)._overflowDayOfYear=!0),n=Ge(r,0,e._dayOfYear),e._a[_e]=n.getUTCMonth(),e._a[ye]=n.getUTCDate()),t=0;t<3&&null==e._a[t];++t)e._a[t]=a[t]=s[t];for(;t<7;t++)e._a[t]=a[t]=null==e._a[t]?2===t?1:0:e._a[t];24===e._a[ge]&&0===e._a[ve]&&0===e._a[pe]&&0===e._a[we]&&(e._nextDay=!0,e._a[ge]=0),e._d=(e._useUTC?Ge:function(e,t,n,s,i,r,a){var o;return e<100&&0<=e?(o=new Date(e+400,t,n,s,i,r,a),isFinite(o.getFullYear())&&o.setFullYear(e)):o=new Date(e,t,n,s,i,r,a),o}).apply(null,a),i=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[ge]=24),e._w&&void 0!==e._w.d&&e._w.d!==i&&(g(e).weekdayMismatch=!0)}}var mt=/^\\s*((?:[+-]\\d{6}|\\d{4})-(?:\\d\\d-\\d\\d|W\\d\\d-\\d|W\\d\\d|\\d\\d\\d|\\d\\d))(?:(T| )(\\d\\d(?::\\d\\d(?::\\d\\d(?:[.,]\\d+)?)?)?)([\\+\\-]\\d\\d(?::?\\d\\d)?|\\s*Z)?)?$/,_t=/^\\s*((?:[+-]\\d{6}|\\d{4})(?:\\d\\d\\d\\d|W\\d\\d\\d|W\\d\\d|\\d\\d\\d|\\d\\d))(?:(T| )(\\d\\d(?:\\d\\d(?:\\d\\d(?:[.,]\\d+)?)?)?)([\\+\\-]\\d\\d(?::?\\d\\d)?|\\s*Z)?)?$/,yt=/Z|[+-]\\d\\d(?::?\\d\\d)?/,gt=[[\"YYYYYY-MM-DD\",/[+-]\\d{6}-\\d\\d-\\d\\d/],[\"YYYY-MM-DD\",/\\d{4}-\\d\\d-\\d\\d/],[\"GGGG-[W]WW-E\",/\\d{4}-W\\d\\d-\\d/],[\"GGGG-[W]WW\",/\\d{4}-W\\d\\d/,!1],[\"YYYY-DDD\",/\\d{4}-\\d{3}/],[\"YYYY-MM\",/\\d{4}-\\d\\d/,!1],[\"YYYYYYMMDD\",/[+-]\\d{10}/],[\"YYYYMMDD\",/\\d{8}/],[\"GGGG[W]WWE\",/\\d{4}W\\d{3}/],[\"GGGG[W]WW\",/\\d{4}W\\d{2}/,!1],[\"YYYYDDD\",/\\d{7}/]],vt=[[\"HH:mm:ss.SSSS\",/\\d\\d:\\d\\d:\\d\\d\\.\\d+/],[\"HH:mm:ss,SSSS\",/\\d\\d:\\d\\d:\\d\\d,\\d+/],[\"HH:mm:ss\",/\\d\\d:\\d\\d:\\d\\d/],[\"HH:mm\",/\\d\\d:\\d\\d/],[\"HHmmss.SSSS\",/\\d\\d\\d\\d\\d\\d\\.\\d+/],[\"HHmmss,SSSS\",/\\d\\d\\d\\d\\d\\d,\\d+/],[\"HHmmss\",/\\d\\d\\d\\d\\d\\d/],[\"HHmm\",/\\d\\d\\d\\d/],[\"HH\",/\\d\\d/]],pt=/^\\/?Date\\((\\-?\\d+)/i;function wt(e){var t,n,s,i,r,a,o=e._i,u=mt.exec(o)||_t.exec(o);if(u){for(g(e).iso=!0,t=0,n=gt.length;t<n;t++)if(gt[t][1].exec(u[1])){i=gt[t][0],s=!1!==gt[t][2];break}if(null==i)return void(e._isValid=!1);if(u[3]){for(t=0,n=vt.length;t<n;t++)if(vt[t][1].exec(u[3])){r=(u[2]||\" \")+vt[t][0];break}if(null==r)return void(e._isValid=!1)}if(!s&&null!=r)return void(e._isValid=!1);if(u[4]){if(!yt.exec(u[4]))return void(e._isValid=!1);a=\"Z\"}e._f=i+(r||\"\")+(a||\"\"),Yt(e)}else e._isValid=!1}var Mt=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\\s)?(\\d{1,2})\\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\\s(\\d{2,4})\\s(\\d\\d):(\\d\\d)(?::(\\d\\d))?\\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\\d{4}))$/;function kt(e,t,n,s,i,r){var a=[function(e){var t=parseInt(e,10);{if(t<=49)return 2e3+t;if(t<=999)return 1900+t}return t}(e),He.indexOf(t),parseInt(n,10),parseInt(s,10),parseInt(i,10)];return r&&a.push(parseInt(r,10)),a}var St={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function Dt(e){var t,n,s,i=Mt.exec(e._i.replace(/\\([^)]*\\)|[\\n\\t]/g,\" \").replace(/(\\s\\s+)/g,\" \").replace(/^\\s\\s*/,\"\").replace(/\\s\\s*$/,\"\"));if(i){var r=kt(i[4],i[3],i[2],i[5],i[6],i[7]);if(t=i[1],n=r,s=e,t&&ze.indexOf(t)!==new Date(n[0],n[1],n[2]).getDay()&&(g(s).weekdayMismatch=!0,!(s._isValid=!1)))return;e._a=r,e._tzm=function(e,t,n){if(e)return St[e];if(t)return 0;var s=parseInt(n,10),i=s%100;return(s-i)/100*60+i}(i[8],i[9],i[10]),e._d=Ge.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),g(e).rfc2822=!0}else e._isValid=!1}function Yt(e){if(e._f!==c.ISO_8601)if(e._f!==c.RFC_2822){e._a=[],g(e).empty=!0;var t,n,s,i,r,a,o,u,l=\"\"+e._i,h=l.length,d=0;for(s=j(e._f,e._locale).match(N)||[],t=0;t<s.length;t++)i=s[t],(n=(l.match(le(i,e))||[])[0])&&(0<(r=l.substr(0,l.indexOf(n))).length&&g(e).unusedInput.push(r),l=l.slice(l.indexOf(n)+n.length),d+=n.length),E[i]?(n?g(e).empty=!1:g(e).unusedTokens.push(i),a=i,u=e,null!=(o=n)&&m(de,a)&&de[a](o,u._a,u,a)):e._strict&&!n&&g(e).unusedTokens.push(i);g(e).charsLeftOver=h-d,0<l.length&&g(e).unusedInput.push(l),e._a[ge]<=12&&!0===g(e).bigHour&&0<e._a[ge]&&(g(e).bigHour=void 0),g(e).parsedDateParts=e._a.slice(0),g(e).meridiem=e._meridiem,e._a[ge]=function(e,t,n){var s;if(null==n)return t;return null!=e.meridiemHour?e.meridiemHour(t,n):(null!=e.isPM&&((s=e.isPM(n))&&t<12&&(t+=12),s||12!==t||(t=0)),t)}(e._locale,e._a[ge],e._meridiem),ft(e),dt(e)}else Dt(e);else wt(e)}function Ot(e){var t,n,s,i,r=e._i,a=e._f;return e._locale=e._locale||ht(e._l),null===r||void 0===a&&\"\"===r?p({nullInput:!0}):(\"string\"==typeof r&&(e._i=r=e._locale.preparse(r)),k(r)?new M(dt(r)):(d(r)?e._d=r:o(a)?function(e){var t,n,s,i,r;if(0===e._f.length)return g(e).invalidFormat=!0,e._d=new Date(NaN);for(i=0;i<e._f.length;i++)r=0,t=w({},e),null!=e._useUTC&&(t._useUTC=e._useUTC),t._f=e._f[i],Yt(t),v(t)&&(r+=g(t).charsLeftOver,r+=10*g(t).unusedTokens.length,g(t).score=r,(null==s||r<s)&&(s=r,n=t));_(e,n||t)}(e):a?Yt(e):l(n=(t=e)._i)?t._d=new Date(c.now()):d(n)?t._d=new Date(n.valueOf()):\"string\"==typeof n?(s=t,null===(i=pt.exec(s._i))?(wt(s),!1===s._isValid&&(delete s._isValid,Dt(s),!1===s._isValid&&(delete s._isValid,c.createFromInputFallback(s)))):s._d=new Date(+i[1])):o(n)?(t._a=f(n.slice(0),function(e){return parseInt(e,10)}),ft(t)):u(n)?function(e){if(!e._d){var t=R(e._i);e._a=f([t.year,t.month,t.day||t.date,t.hour,t.minute,t.second,t.millisecond],function(e){return e&&parseInt(e,10)}),ft(e)}}(t):h(n)?t._d=new Date(n):c.createFromInputFallback(t),v(e)||(e._d=null),e))}function Tt(e,t,n,s,i){var r,a={};return!0!==n&&!1!==n||(s=n,n=void 0),(u(e)&&function(e){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(e).length;var t;for(t in e)if(e.hasOwnProperty(t))return!1;return!0}(e)||o(e)&&0===e.length)&&(e=void 0),a._isAMomentObject=!0,a._useUTC=a._isUTC=i,a._l=n,a._i=e,a._f=t,a._strict=s,(r=new M(dt(Ot(a))))._nextDay&&(r.add(1,\"d\"),r._nextDay=void 0),r}function bt(e,t,n,s){return Tt(e,t,n,s,!1)}c.createFromInputFallback=n(\"value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged and will be removed in an upcoming major release. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.\",function(e){e._d=new Date(e._i+(e._useUTC?\" UTC\":\"\"))}),c.ISO_8601=function(){},c.RFC_2822=function(){};var xt=n(\"moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/\",function(){var e=bt.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:p()}),Pt=n(\"moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/\",function(){var e=bt.apply(null,arguments);return this.isValid()&&e.isValid()?this<e?this:e:p()});function Wt(e,t){var n,s;if(1===t.length&&o(t[0])&&(t=t[0]),!t.length)return bt();for(n=t[0],s=1;s<t.length;++s)t[s].isValid()&&!t[s][e](n)||(n=t[s]);return n}var Ct=[\"year\",\"quarter\",\"month\",\"week\",\"day\",\"hour\",\"minute\",\"second\",\"millisecond\"];function Ht(e){var t=R(e),n=t.year||0,s=t.quarter||0,i=t.month||0,r=t.week||t.isoWeek||0,a=t.day||0,o=t.hour||0,u=t.minute||0,l=t.second||0,h=t.millisecond||0;this._isValid=function(e){for(var t in e)if(-1===Ye.call(Ct,t)||null!=e[t]&&isNaN(e[t]))return!1;for(var n=!1,s=0;s<Ct.length;++s)if(e[Ct[s]]){if(n)return!1;parseFloat(e[Ct[s]])!==D(e[Ct[s]])&&(n=!0)}return!0}(t),this._milliseconds=+h+1e3*l+6e4*u+1e3*o*60*60,this._days=+a+7*r,this._months=+i+3*s+12*n,this._data={},this._locale=ht(),this._bubble()}function Rt(e){return e instanceof Ht}function Ut(e){return e<0?-1*Math.round(-1*e):Math.round(e)}function Ft(e,n){I(e,0,0,function(){var e=this.utcOffset(),t=\"+\";return e<0&&(e=-e,t=\"-\"),t+L(~~(e/60),2)+n+L(~~e%60,2)})}Ft(\"Z\",\":\"),Ft(\"ZZ\",\"\"),ue(\"Z\",re),ue(\"ZZ\",re),ce([\"Z\",\"ZZ\"],function(e,t,n){n._useUTC=!0,n._tzm=Nt(re,e)});var Lt=/([\\+\\-]|\\d\\d)/gi;function Nt(e,t){var n=(t||\"\").match(e);if(null===n)return null;var s=((n[n.length-1]||[])+\"\").match(Lt)||[\"-\",0,0],i=60*s[1]+D(s[2]);return 0===i?0:\"+\"===s[0]?i:-i}function Gt(e,t){var n,s;return t._isUTC?(n=t.clone(),s=(k(e)||d(e)?e.valueOf():bt(e).valueOf())-n.valueOf(),n._d.setTime(n._d.valueOf()+s),c.updateOffset(n,!1),n):bt(e).local()}function Vt(e){return 15*-Math.round(e._d.getTimezoneOffset()/15)}function Et(){return!!this.isValid()&&(this._isUTC&&0===this._offset)}c.updateOffset=function(){};var It=/^(\\-|\\+)?(?:(\\d*)[. ])?(\\d+)\\:(\\d+)(?:\\:(\\d+)(\\.\\d*)?)?$/,At=/^(-|\\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function jt(e,t){var n,s,i,r=e,a=null;return Rt(e)?r={ms:e._milliseconds,d:e._days,M:e._months}:h(e)?(r={},t?r[t]=e:r.milliseconds=e):(a=It.exec(e))?(n=\"-\"===a[1]?-1:1,r={y:0,d:D(a[ye])*n,h:D(a[ge])*n,m:D(a[ve])*n,s:D(a[pe])*n,ms:D(Ut(1e3*a[we]))*n}):(a=At.exec(e))?(n=\"-\"===a[1]?-1:1,r={y:Zt(a[2],n),M:Zt(a[3],n),w:Zt(a[4],n),d:Zt(a[5],n),h:Zt(a[6],n),m:Zt(a[7],n),s:Zt(a[8],n)}):null==r?r={}:\"object\"==typeof r&&(\"from\"in r||\"to\"in r)&&(i=function(e,t){var n;if(!e.isValid()||!t.isValid())return{milliseconds:0,months:0};t=Gt(t,e),e.isBefore(t)?n=zt(e,t):((n=zt(t,e)).milliseconds=-n.milliseconds,n.months=-n.months);return n}(bt(r.from),bt(r.to)),(r={}).ms=i.milliseconds,r.M=i.months),s=new Ht(r),Rt(e)&&m(e,\"_locale\")&&(s._locale=e._locale),s}function Zt(e,t){var n=e&&parseFloat(e.replace(\",\",\".\"));return(isNaN(n)?0:n)*t}function zt(e,t){var n={};return n.months=t.month()-e.month()+12*(t.year()-e.year()),e.clone().add(n.months,\"M\").isAfter(t)&&--n.months,n.milliseconds=+t-+e.clone().add(n.months,\"M\"),n}function $t(s,i){return function(e,t){var n;return null===t||isNaN(+t)||(T(i,\"moment().\"+i+\"(period, number) is deprecated. Please use moment().\"+i+\"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.\"),n=e,e=t,t=n),qt(this,jt(e=\"string\"==typeof e?+e:e,t),s),this}}function qt(e,t,n,s){var i=t._milliseconds,r=Ut(t._days),a=Ut(t._months);e.isValid()&&(s=null==s||s,a&&Re(e,be(e,\"Month\")+a*n),r&&xe(e,\"Date\",be(e,\"Date\")+r*n),i&&e._d.setTime(e._d.valueOf()+i*n),s&&c.updateOffset(e,r||a))}jt.fn=Ht.prototype,jt.invalid=function(){return jt(NaN)};var Jt=$t(1,\"add\"),Bt=$t(-1,\"subtract\");function Qt(e,t){var n=12*(t.year()-e.year())+(t.month()-e.month()),s=e.clone().add(n,\"months\");return-(n+(t-s<0?(t-s)/(s-e.clone().add(n-1,\"months\")):(t-s)/(e.clone().add(n+1,\"months\")-s)))||0}function Xt(e){var t;return void 0===e?this._locale._abbr:(null!=(t=ht(e))&&(this._locale=t),this)}c.defaultFormat=\"YYYY-MM-DDTHH:mm:ssZ\",c.defaultFormatUtc=\"YYYY-MM-DDTHH:mm:ss[Z]\";var Kt=n(\"moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.\",function(e){return void 0===e?this.localeData():this.locale(e)});function en(){return this._locale}var tn=126227808e5;function nn(e,t){return(e%t+t)%t}function sn(e,t,n){return e<100&&0<=e?new Date(e+400,t,n)-tn:new Date(e,t,n).valueOf()}function rn(e,t,n){return e<100&&0<=e?Date.UTC(e+400,t,n)-tn:Date.UTC(e,t,n)}function an(e,t){I(0,[e,e.length],0,t)}function on(e,t,n,s,i){var r;return null==e?Ie(this,s,i).year:((r=Ae(e,s,i))<t&&(t=r),function(e,t,n,s,i){var r=Ee(e,t,n,s,i),a=Ge(r.year,0,r.dayOfYear);return this.year(a.getUTCFullYear()),this.month(a.getUTCMonth()),this.date(a.getUTCDate()),this}.call(this,e,t,n,s,i))}I(0,[\"gg\",2],0,function(){return this.weekYear()%100}),I(0,[\"GG\",2],0,function(){return this.isoWeekYear()%100}),an(\"gggg\",\"weekYear\"),an(\"ggggg\",\"weekYear\"),an(\"GGGG\",\"isoWeekYear\"),an(\"GGGGG\",\"isoWeekYear\"),C(\"weekYear\",\"gg\"),C(\"isoWeekYear\",\"GG\"),F(\"weekYear\",1),F(\"isoWeekYear\",1),ue(\"G\",se),ue(\"g\",se),ue(\"GG\",B,z),ue(\"gg\",B,z),ue(\"GGGG\",ee,q),ue(\"gggg\",ee,q),ue(\"GGGGG\",te,J),ue(\"ggggg\",te,J),fe([\"gggg\",\"ggggg\",\"GGGG\",\"GGGGG\"],function(e,t,n,s){t[s.substr(0,2)]=D(e)}),fe([\"gg\",\"GG\"],function(e,t,n,s){t[s]=c.parseTwoDigitYear(e)}),I(\"Q\",0,\"Qo\",\"quarter\"),C(\"quarter\",\"Q\"),F(\"quarter\",7),ue(\"Q\",Z),ce(\"Q\",function(e,t){t[_e]=3*(D(e)-1)}),I(\"D\",[\"DD\",2],\"Do\",\"date\"),C(\"date\",\"D\"),F(\"date\",9),ue(\"D\",B),ue(\"DD\",B,z),ue(\"Do\",function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient}),ce([\"D\",\"DD\"],ye),ce(\"Do\",function(e,t){t[ye]=D(e.match(B)[0])});var un=Te(\"Date\",!0);I(\"DDD\",[\"DDDD\",3],\"DDDo\",\"dayOfYear\"),C(\"dayOfYear\",\"DDD\"),F(\"dayOfYear\",4),ue(\"DDD\",K),ue(\"DDDD\",$),ce([\"DDD\",\"DDDD\"],function(e,t,n){n._dayOfYear=D(e)}),I(\"m\",[\"mm\",2],0,\"minute\"),C(\"minute\",\"m\"),F(\"minute\",14),ue(\"m\",B),ue(\"mm\",B,z),ce([\"m\",\"mm\"],ve);var ln=Te(\"Minutes\",!1);I(\"s\",[\"ss\",2],0,\"second\"),C(\"second\",\"s\"),F(\"second\",15),ue(\"s\",B),ue(\"ss\",B,z),ce([\"s\",\"ss\"],pe);var hn,dn=Te(\"Seconds\",!1);for(I(\"S\",0,0,function(){return~~(this.millisecond()/100)}),I(0,[\"SS\",2],0,function(){return~~(this.millisecond()/10)}),I(0,[\"SSS\",3],0,\"millisecond\"),I(0,[\"SSSS\",4],0,function(){return 10*this.millisecond()}),I(0,[\"SSSSS\",5],0,function(){return 100*this.millisecond()}),I(0,[\"SSSSSS\",6],0,function(){return 1e3*this.millisecond()}),I(0,[\"SSSSSSS\",7],0,function(){return 1e4*this.millisecond()}),I(0,[\"SSSSSSSS\",8],0,function(){return 1e5*this.millisecond()}),I(0,[\"SSSSSSSSS\",9],0,function(){return 1e6*this.millisecond()}),C(\"millisecond\",\"ms\"),F(\"millisecond\",16),ue(\"S\",K,Z),ue(\"SS\",K,z),ue(\"SSS\",K,$),hn=\"SSSS\";hn.length<=9;hn+=\"S\")ue(hn,ne);function cn(e,t){t[we]=D(1e3*(\"0.\"+e))}for(hn=\"S\";hn.length<=9;hn+=\"S\")ce(hn,cn);var fn=Te(\"Milliseconds\",!1);I(\"z\",0,0,\"zoneAbbr\"),I(\"zz\",0,0,\"zoneName\");var mn=M.prototype;function _n(e){return e}mn.add=Jt,mn.calendar=function(e,t){var n=e||bt(),s=Gt(n,this).startOf(\"day\"),i=c.calendarFormat(this,s)||\"sameElse\",r=t&&(b(t[i])?t[i].call(this,n):t[i]);return this.format(r||this.localeData().calendar(i,this,bt(n)))},mn.clone=function(){return new M(this)},mn.diff=function(e,t,n){var s,i,r;if(!this.isValid())return NaN;if(!(s=Gt(e,this)).isValid())return NaN;switch(i=6e4*(s.utcOffset()-this.utcOffset()),t=H(t)){case\"year\":r=Qt(this,s)/12;break;case\"month\":r=Qt(this,s);break;case\"quarter\":r=Qt(this,s)/3;break;case\"second\":r=(this-s)/1e3;break;case\"minute\":r=(this-s)/6e4;break;case\"hour\":r=(this-s)/36e5;break;case\"day\":r=(this-s-i)/864e5;break;case\"week\":r=(this-s-i)/6048e5;break;default:r=this-s}return n?r:S(r)},mn.endOf=function(e){var t;if(void 0===(e=H(e))||\"millisecond\"===e||!this.isValid())return this;var n=this._isUTC?rn:sn;switch(e){case\"year\":t=n(this.year()+1,0,1)-1;break;case\"quarter\":t=n(this.year(),this.month()-this.month()%3+3,1)-1;break;case\"month\":t=n(this.year(),this.month()+1,1)-1;break;case\"week\":t=n(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case\"isoWeek\":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case\"day\":case\"date\":t=n(this.year(),this.month(),this.date()+1)-1;break;case\"hour\":t=this._d.valueOf(),t+=36e5-nn(t+(this._isUTC?0:6e4*this.utcOffset()),36e5)-1;break;case\"minute\":t=this._d.valueOf(),t+=6e4-nn(t,6e4)-1;break;case\"second\":t=this._d.valueOf(),t+=1e3-nn(t,1e3)-1;break}return this._d.setTime(t),c.updateOffset(this,!0),this},mn.format=function(e){e||(e=this.isUtc()?c.defaultFormatUtc:c.defaultFormat);var t=A(this,e);return this.localeData().postformat(t)},mn.from=function(e,t){return this.isValid()&&(k(e)&&e.isValid()||bt(e).isValid())?jt({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},mn.fromNow=function(e){return this.from(bt(),e)},mn.to=function(e,t){return this.isValid()&&(k(e)&&e.isValid()||bt(e).isValid())?jt({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},mn.toNow=function(e){return this.to(bt(),e)},mn.get=function(e){return b(this[e=H(e)])?this[e]():this},mn.invalidAt=function(){return g(this).overflow},mn.isAfter=function(e,t){var n=k(e)?e:bt(e);return!(!this.isValid()||!n.isValid())&&(\"millisecond\"===(t=H(t)||\"millisecond\")?this.valueOf()>n.valueOf():n.valueOf()<this.clone().startOf(t).valueOf())},mn.isBefore=function(e,t){var n=k(e)?e:bt(e);return!(!this.isValid()||!n.isValid())&&(\"millisecond\"===(t=H(t)||\"millisecond\")?this.valueOf()<n.valueOf():this.clone().endOf(t).valueOf()<n.valueOf())},mn.isBetween=function(e,t,n,s){var i=k(e)?e:bt(e),r=k(t)?t:bt(t);return!!(this.isValid()&&i.isValid()&&r.isValid())&&(\"(\"===(s=s||\"()\")[0]?this.isAfter(i,n):!this.isBefore(i,n))&&(\")\"===s[1]?this.isBefore(r,n):!this.isAfter(r,n))},mn.isSame=function(e,t){var n,s=k(e)?e:bt(e);return!(!this.isValid()||!s.isValid())&&(\"millisecond\"===(t=H(t)||\"millisecond\")?this.valueOf()===s.valueOf():(n=s.valueOf(),this.clone().startOf(t).valueOf()<=n&&n<=this.clone().endOf(t).valueOf()))},mn.isSameOrAfter=function(e,t){return this.isSame(e,t)||this.isAfter(e,t)},mn.isSameOrBefore=function(e,t){return this.isSame(e,t)||this.isBefore(e,t)},mn.isValid=function(){return v(this)},mn.lang=Kt,mn.locale=Xt,mn.localeData=en,mn.max=Pt,mn.min=xt,mn.parsingFlags=function(){return _({},g(this))},mn.set=function(e,t){if(\"object\"==typeof e)for(var n=function(e){var t=[];for(var n in e)t.push({unit:n,priority:U[n]});return t.sort(function(e,t){return e.priority-t.priority}),t}(e=R(e)),s=0;s<n.length;s++)this[n[s].unit](e[n[s].unit]);else if(b(this[e=H(e)]))return this[e](t);return this},mn.startOf=function(e){var t;if(void 0===(e=H(e))||\"millisecond\"===e||!this.isValid())return this;var n=this._isUTC?rn:sn;switch(e){case\"year\":t=n(this.year(),0,1);break;case\"quarter\":t=n(this.year(),this.month()-this.month()%3,1);break;case\"month\":t=n(this.year(),this.month(),1);break;case\"week\":t=n(this.year(),this.month(),this.date()-this.weekday());break;case\"isoWeek\":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case\"day\":case\"date\":t=n(this.year(),this.month(),this.date());break;case\"hour\":t=this._d.valueOf(),t-=nn(t+(this._isUTC?0:6e4*this.utcOffset()),36e5);break;case\"minute\":t=this._d.valueOf(),t-=nn(t,6e4);break;case\"second\":t=this._d.valueOf(),t-=nn(t,1e3);break}return this._d.setTime(t),c.updateOffset(this,!0),this},mn.subtract=Bt,mn.toArray=function(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]},mn.toObject=function(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}},mn.toDate=function(){return new Date(this.valueOf())},mn.toISOString=function(e){if(!this.isValid())return null;var t=!0!==e,n=t?this.clone().utc():this;return n.year()<0||9999<n.year()?A(n,t?\"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]\":\"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ\"):b(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace(\"Z\",A(n,\"Z\")):A(n,t?\"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]\":\"YYYY-MM-DD[T]HH:mm:ss.SSSZ\")},mn.inspect=function(){if(!this.isValid())return\"moment.invalid(/* \"+this._i+\" */)\";var e=\"moment\",t=\"\";this.isLocal()||(e=0===this.utcOffset()?\"moment.utc\":\"moment.parseZone\",t=\"Z\");var n=\"[\"+e+'(\"]',s=0<=this.year()&&this.year()<=9999?\"YYYY\":\"YYYYYY\",i=t+'[\")]';return this.format(n+s+\"-MM-DD[T]HH:mm:ss.SSS\"+i)},mn.toJSON=function(){return this.isValid()?this.toISOString():null},mn.toString=function(){return this.clone().locale(\"en\").format(\"ddd MMM DD YYYY HH:mm:ss [GMT]ZZ\")},mn.unix=function(){return Math.floor(this.valueOf()/1e3)},mn.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)},mn.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},mn.year=Oe,mn.isLeapYear=function(){return De(this.year())},mn.weekYear=function(e){return on.call(this,e,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)},mn.isoWeekYear=function(e){return on.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)},mn.quarter=mn.quarters=function(e){return null==e?Math.ceil((this.month()+1)/3):this.month(3*(e-1)+this.month()%3)},mn.month=Ue,mn.daysInMonth=function(){return Pe(this.year(),this.month())},mn.week=mn.weeks=function(e){var t=this.localeData().week(this);return null==e?t:this.add(7*(e-t),\"d\")},mn.isoWeek=mn.isoWeeks=function(e){var t=Ie(this,1,4).week;return null==e?t:this.add(7*(e-t),\"d\")},mn.weeksInYear=function(){var e=this.localeData()._week;return Ae(this.year(),e.dow,e.doy)},mn.isoWeeksInYear=function(){return Ae(this.year(),1,4)},mn.date=un,mn.day=mn.days=function(e){if(!this.isValid())return null!=e?this:NaN;var t,n,s=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=e?(t=e,n=this.localeData(),e=\"string\"!=typeof t?t:isNaN(t)?\"number\"==typeof(t=n.weekdaysParse(t))?t:null:parseInt(t,10),this.add(e-s,\"d\")):s},mn.weekday=function(e){if(!this.isValid())return null!=e?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return null==e?t:this.add(e-t,\"d\")},mn.isoWeekday=function(e){if(!this.isValid())return null!=e?this:NaN;if(null==e)return this.day()||7;var t,n,s=(t=e,n=this.localeData(),\"string\"==typeof t?n.weekdaysParse(t)%7||7:isNaN(t)?null:t);return this.day(this.day()%7?s:s-7)},mn.dayOfYear=function(e){var t=Math.round((this.clone().startOf(\"day\")-this.clone().startOf(\"year\"))/864e5)+1;return null==e?t:this.add(e-t,\"d\")},mn.hour=mn.hours=nt,mn.minute=mn.minutes=ln,mn.second=mn.seconds=dn,mn.millisecond=mn.milliseconds=fn,mn.utcOffset=function(e,t,n){var s,i=this._offset||0;if(!this.isValid())return null!=e?this:NaN;if(null==e)return this._isUTC?i:Vt(this);if(\"string\"==typeof e){if(null===(e=Nt(re,e)))return this}else Math.abs(e)<16&&!n&&(e*=60);return!this._isUTC&&t&&(s=Vt(this)),this._offset=e,this._isUTC=!0,null!=s&&this.add(s,\"m\"),i!==e&&(!t||this._changeInProgress?qt(this,jt(e-i,\"m\"),1,!1):this._changeInProgress||(this._changeInProgress=!0,c.updateOffset(this,!0),this._changeInProgress=null)),this},mn.utc=function(e){return this.utcOffset(0,e)},mn.local=function(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(Vt(this),\"m\")),this},mn.parseZone=function(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,!0);else if(\"string\"==typeof this._i){var e=Nt(ie,this._i);null!=e?this.utcOffset(e):this.utcOffset(0,!0)}return this},mn.hasAlignedHourOffset=function(e){return!!this.isValid()&&(e=e?bt(e).utcOffset():0,(this.utcOffset()-e)%60==0)},mn.isDST=function(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},mn.isLocal=function(){return!!this.isValid()&&!this._isUTC},mn.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},mn.isUtc=Et,mn.isUTC=Et,mn.zoneAbbr=function(){return this._isUTC?\"UTC\":\"\"},mn.zoneName=function(){return this._isUTC?\"Coordinated Universal Time\":\"\"},mn.dates=n(\"dates accessor is deprecated. Use date instead.\",un),mn.months=n(\"months accessor is deprecated. Use month instead\",Ue),mn.years=n(\"years accessor is deprecated. Use year instead\",Oe),mn.zone=n(\"moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/\",function(e,t){return null!=e?(\"string\"!=typeof e&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()}),mn.isDSTShifted=n(\"isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information\",function(){if(!l(this._isDSTShifted))return this._isDSTShifted;var e={};if(w(e,this),(e=Ot(e))._a){var t=e._isUTC?y(e._a):bt(e._a);this._isDSTShifted=this.isValid()&&0<a(e._a,t.toArray())}else this._isDSTShifted=!1;return this._isDSTShifted});var yn=P.prototype;function gn(e,t,n,s){var i=ht(),r=y().set(s,t);return i[n](r,e)}function vn(e,t,n){if(h(e)&&(t=e,e=void 0),e=e||\"\",null!=t)return gn(e,t,n,\"month\");var s,i=[];for(s=0;s<12;s++)i[s]=gn(e,s,n,\"month\");return i}function pn(e,t,n,s){t=(\"boolean\"==typeof e?h(t)&&(n=t,t=void 0):(t=e,e=!1,h(n=t)&&(n=t,t=void 0)),t||\"\");var i,r=ht(),a=e?r._week.dow:0;if(null!=n)return gn(t,(n+a)%7,s,\"day\");var o=[];for(i=0;i<7;i++)o[i]=gn(t,(i+a)%7,s,\"day\");return o}yn.calendar=function(e,t,n){var s=this._calendar[e]||this._calendar.sameElse;return b(s)?s.call(t,n):s},yn.longDateFormat=function(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.replace(/MMMM|MM|DD|dddd/g,function(e){return e.slice(1)}),this._longDateFormat[e])},yn.invalidDate=function(){return this._invalidDate},yn.ordinal=function(e){return this._ordinal.replace(\"%d\",e)},yn.preparse=_n,yn.postformat=_n,yn.relativeTime=function(e,t,n,s){var i=this._relativeTime[n];return b(i)?i(e,t,n,s):i.replace(/%d/i,e)},yn.pastFuture=function(e,t){var n=this._relativeTime[0<e?\"future\":\"past\"];return b(n)?n(t):n.replace(/%s/i,t)},yn.set=function(e){var t,n;for(n in e)b(t=e[n])?this[n]=t:this[\"_\"+n]=t;this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+\"|\"+/\\d{1,2}/.source)},yn.months=function(e,t){return e?o(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||We).test(t)?\"format\":\"standalone\"][e.month()]:o(this._months)?this._months:this._months.standalone},yn.monthsShort=function(e,t){return e?o(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[We.test(t)?\"format\":\"standalone\"][e.month()]:o(this._monthsShort)?this._monthsShort:this._monthsShort.standalone},yn.monthsParse=function(e,t,n){var s,i,r;if(this._monthsParseExact)return function(e,t,n){var s,i,r,a=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],s=0;s<12;++s)r=y([2e3,s]),this._shortMonthsParse[s]=this.monthsShort(r,\"\").toLocaleLowerCase(),this._longMonthsParse[s]=this.months(r,\"\").toLocaleLowerCase();return n?\"MMM\"===t?-1!==(i=Ye.call(this._shortMonthsParse,a))?i:null:-1!==(i=Ye.call(this._longMonthsParse,a))?i:null:\"MMM\"===t?-1!==(i=Ye.call(this._shortMonthsParse,a))?i:-1!==(i=Ye.call(this._longMonthsParse,a))?i:null:-1!==(i=Ye.call(this._longMonthsParse,a))?i:-1!==(i=Ye.call(this._shortMonthsParse,a))?i:null}.call(this,e,t,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),s=0;s<12;s++){if(i=y([2e3,s]),n&&!this._longMonthsParse[s]&&(this._longMonthsParse[s]=new RegExp(\"^\"+this.months(i,\"\").replace(\".\",\"\")+\"$\",\"i\"),this._shortMonthsParse[s]=new RegExp(\"^\"+this.monthsShort(i,\"\").replace(\".\",\"\")+\"$\",\"i\")),n||this._monthsParse[s]||(r=\"^\"+this.months(i,\"\")+\"|^\"+this.monthsShort(i,\"\"),this._monthsParse[s]=new RegExp(r.replace(\".\",\"\"),\"i\")),n&&\"MMMM\"===t&&this._longMonthsParse[s].test(e))return s;if(n&&\"MMM\"===t&&this._shortMonthsParse[s].test(e))return s;if(!n&&this._monthsParse[s].test(e))return s}},yn.monthsRegex=function(e){return this._monthsParseExact?(m(this,\"_monthsRegex\")||Ne.call(this),e?this._monthsStrictRegex:this._monthsRegex):(m(this,\"_monthsRegex\")||(this._monthsRegex=Le),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)},yn.monthsShortRegex=function(e){return this._monthsParseExact?(m(this,\"_monthsRegex\")||Ne.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(m(this,\"_monthsShortRegex\")||(this._monthsShortRegex=Fe),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)},yn.week=function(e){return Ie(e,this._week.dow,this._week.doy).week},yn.firstDayOfYear=function(){return this._week.doy},yn.firstDayOfWeek=function(){return this._week.dow},yn.weekdays=function(e,t){var n=o(this._weekdays)?this._weekdays:this._weekdays[e&&!0!==e&&this._weekdays.isFormat.test(t)?\"format\":\"standalone\"];return!0===e?je(n,this._week.dow):e?n[e.day()]:n},yn.weekdaysMin=function(e){return!0===e?je(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin},yn.weekdaysShort=function(e){return!0===e?je(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort},yn.weekdaysParse=function(e,t,n){var s,i,r;if(this._weekdaysParseExact)return function(e,t,n){var s,i,r,a=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],s=0;s<7;++s)r=y([2e3,1]).day(s),this._minWeekdaysParse[s]=this.weekdaysMin(r,\"\").toLocaleLowerCase(),this._shortWeekdaysParse[s]=this.weekdaysShort(r,\"\").toLocaleLowerCase(),this._weekdaysParse[s]=this.weekdays(r,\"\").toLocaleLowerCase();return n?\"dddd\"===t?-1!==(i=Ye.call(this._weekdaysParse,a))?i:null:\"ddd\"===t?-1!==(i=Ye.call(this._shortWeekdaysParse,a))?i:null:-1!==(i=Ye.call(this._minWeekdaysParse,a))?i:null:\"dddd\"===t?-1!==(i=Ye.call(this._weekdaysParse,a))?i:-1!==(i=Ye.call(this._shortWeekdaysParse,a))?i:-1!==(i=Ye.call(this._minWeekdaysParse,a))?i:null:\"ddd\"===t?-1!==(i=Ye.call(this._shortWeekdaysParse,a))?i:-1!==(i=Ye.call(this._weekdaysParse,a))?i:-1!==(i=Ye.call(this._minWeekdaysParse,a))?i:null:-1!==(i=Ye.call(this._minWeekdaysParse,a))?i:-1!==(i=Ye.call(this._weekdaysParse,a))?i:-1!==(i=Ye.call(this._shortWeekdaysParse,a))?i:null}.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),s=0;s<7;s++){if(i=y([2e3,1]).day(s),n&&!this._fullWeekdaysParse[s]&&(this._fullWeekdaysParse[s]=new RegExp(\"^\"+this.weekdays(i,\"\").replace(\".\",\"\\\\.?\")+\"$\",\"i\"),this._shortWeekdaysParse[s]=new RegExp(\"^\"+this.weekdaysShort(i,\"\").replace(\".\",\"\\\\.?\")+\"$\",\"i\"),this._minWeekdaysParse[s]=new RegExp(\"^\"+this.weekdaysMin(i,\"\").replace(\".\",\"\\\\.?\")+\"$\",\"i\")),this._weekdaysParse[s]||(r=\"^\"+this.weekdays(i,\"\")+\"|^\"+this.weekdaysShort(i,\"\")+\"|^\"+this.weekdaysMin(i,\"\"),this._weekdaysParse[s]=new RegExp(r.replace(\".\",\"\"),\"i\")),n&&\"dddd\"===t&&this._fullWeekdaysParse[s].test(e))return s;if(n&&\"ddd\"===t&&this._shortWeekdaysParse[s].test(e))return s;if(n&&\"dd\"===t&&this._minWeekdaysParse[s].test(e))return s;if(!n&&this._weekdaysParse[s].test(e))return s}},yn.weekdaysRegex=function(e){return this._weekdaysParseExact?(m(this,\"_weekdaysRegex\")||Qe.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(m(this,\"_weekdaysRegex\")||(this._weekdaysRegex=qe),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)},yn.weekdaysShortRegex=function(e){return this._weekdaysParseExact?(m(this,\"_weekdaysRegex\")||Qe.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(m(this,\"_weekdaysShortRegex\")||(this._weekdaysShortRegex=Je),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)},yn.weekdaysMinRegex=function(e){return this._weekdaysParseExact?(m(this,\"_weekdaysRegex\")||Qe.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(m(this,\"_weekdaysMinRegex\")||(this._weekdaysMinRegex=Be),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)},yn.isPM=function(e){return\"p\"===(e+\"\").toLowerCase().charAt(0)},yn.meridiem=function(e,t,n){return 11<e?n?\"pm\":\"PM\":n?\"am\":\"AM\"},ut(\"en\",{dayOfMonthOrdinalParse:/\\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10;return e+(1===D(e%100/10)?\"th\":1===t?\"st\":2===t?\"nd\":3===t?\"rd\":\"th\")}}),c.lang=n(\"moment.lang is deprecated. Use moment.locale instead.\",ut),c.langData=n(\"moment.langData is deprecated. Use moment.localeData instead.\",ht);var wn=Math.abs;function Mn(e,t,n,s){var i=jt(t,n);return e._milliseconds+=s*i._milliseconds,e._days+=s*i._days,e._months+=s*i._months,e._bubble()}function kn(e){return e<0?Math.floor(e):Math.ceil(e)}function Sn(e){return 4800*e/146097}function Dn(e){return 146097*e/4800}function Yn(e){return function(){return this.as(e)}}var On=Yn(\"ms\"),Tn=Yn(\"s\"),bn=Yn(\"m\"),xn=Yn(\"h\"),Pn=Yn(\"d\"),Wn=Yn(\"w\"),Cn=Yn(\"M\"),Hn=Yn(\"Q\"),Rn=Yn(\"y\");function Un(e){return function(){return this.isValid()?this._data[e]:NaN}}var Fn=Un(\"milliseconds\"),Ln=Un(\"seconds\"),Nn=Un(\"minutes\"),Gn=Un(\"hours\"),Vn=Un(\"days\"),En=Un(\"months\"),In=Un(\"years\");var An=Math.round,jn={ss:44,s:45,m:45,h:22,d:26,M:11};var Zn=Math.abs;function zn(e){return(0<e)-(e<0)||+e}function $n(){if(!this.isValid())return this.localeData().invalidDate();var e,t,n=Zn(this._milliseconds)/1e3,s=Zn(this._days),i=Zn(this._months);t=S((e=S(n/60))/60),n%=60,e%=60;var r=S(i/12),a=i%=12,o=s,u=t,l=e,h=n?n.toFixed(3).replace(/\\.?0+$/,\"\"):\"\",d=this.asSeconds();if(!d)return\"P0D\";var c=d<0?\"-\":\"\",f=zn(this._months)!==zn(d)?\"-\":\"\",m=zn(this._days)!==zn(d)?\"-\":\"\",_=zn(this._milliseconds)!==zn(d)?\"-\":\"\";return c+\"P\"+(r?f+r+\"Y\":\"\")+(a?f+a+\"M\":\"\")+(o?m+o+\"D\":\"\")+(u||l||h?\"T\":\"\")+(u?_+u+\"H\":\"\")+(l?_+l+\"M\":\"\")+(h?_+h+\"S\":\"\")}var qn=Ht.prototype;return qn.isValid=function(){return this._isValid},qn.abs=function(){var e=this._data;return this._milliseconds=wn(this._milliseconds),this._days=wn(this._days),this._months=wn(this._months),e.milliseconds=wn(e.milliseconds),e.seconds=wn(e.seconds),e.minutes=wn(e.minutes),e.hours=wn(e.hours),e.months=wn(e.months),e.years=wn(e.years),this},qn.add=function(e,t){return Mn(this,e,t,1)},qn.subtract=function(e,t){return Mn(this,e,t,-1)},qn.as=function(e){if(!this.isValid())return NaN;var t,n,s=this._milliseconds;if(\"month\"===(e=H(e))||\"quarter\"===e||\"year\"===e)switch(t=this._days+s/864e5,n=this._months+Sn(t),e){case\"month\":return n;case\"quarter\":return n/3;case\"year\":return n/12}else switch(t=this._days+Math.round(Dn(this._months)),e){case\"week\":return t/7+s/6048e5;case\"day\":return t+s/864e5;case\"hour\":return 24*t+s/36e5;case\"minute\":return 1440*t+s/6e4;case\"second\":return 86400*t+s/1e3;case\"millisecond\":return Math.floor(864e5*t)+s;default:throw new Error(\"Unknown unit \"+e)}},qn.asMilliseconds=On,qn.asSeconds=Tn,qn.asMinutes=bn,qn.asHours=xn,qn.asDays=Pn,qn.asWeeks=Wn,qn.asMonths=Cn,qn.asQuarters=Hn,qn.asYears=Rn,qn.valueOf=function(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*D(this._months/12):NaN},qn._bubble=function(){var e,t,n,s,i,r=this._milliseconds,a=this._days,o=this._months,u=this._data;return 0<=r&&0<=a&&0<=o||r<=0&&a<=0&&o<=0||(r+=864e5*kn(Dn(o)+a),o=a=0),u.milliseconds=r%1e3,e=S(r/1e3),u.seconds=e%60,t=S(e/60),u.minutes=t%60,n=S(t/60),u.hours=n%24,o+=i=S(Sn(a+=S(n/24))),a-=kn(Dn(i)),s=S(o/12),o%=12,u.days=a,u.months=o,u.years=s,this},qn.clone=function(){return jt(this)},qn.get=function(e){return e=H(e),this.isValid()?this[e+\"s\"]():NaN},qn.milliseconds=Fn,qn.seconds=Ln,qn.minutes=Nn,qn.hours=Gn,qn.days=Vn,qn.weeks=function(){return S(this.days()/7)},qn.months=En,qn.years=In,qn.humanize=function(e){if(!this.isValid())return this.localeData().invalidDate();var t,n,s,i,r,a,o,u,l,h,d,c=this.localeData(),f=(n=!e,s=c,i=jt(t=this).abs(),r=An(i.as(\"s\")),a=An(i.as(\"m\")),o=An(i.as(\"h\")),u=An(i.as(\"d\")),l=An(i.as(\"M\")),h=An(i.as(\"y\")),(d=r<=jn.ss&&[\"s\",r]||r<jn.s&&[\"ss\",r]||a<=1&&[\"m\"]||a<jn.m&&[\"mm\",a]||o<=1&&[\"h\"]||o<jn.h&&[\"hh\",o]||u<=1&&[\"d\"]||u<jn.d&&[\"dd\",u]||l<=1&&[\"M\"]||l<jn.M&&[\"MM\",l]||h<=1&&[\"y\"]||[\"yy\",h])[2]=n,d[3]=0<+t,d[4]=s,function(e,t,n,s,i){return i.relativeTime(t||1,!!n,e,s)}.apply(null,d));return e&&(f=c.pastFuture(+this,f)),c.postformat(f)},qn.toISOString=$n,qn.toString=$n,qn.toJSON=$n,qn.locale=Xt,qn.localeData=en,qn.toIsoString=n(\"toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)\",$n),qn.lang=Kt,I(\"X\",0,0,\"unix\"),I(\"x\",0,0,\"valueOf\"),ue(\"x\",se),ue(\"X\",/[+-]?\\d+(\\.\\d{1,3})?/),ce(\"X\",function(e,t,n){n._d=new Date(1e3*parseFloat(e,10))}),ce(\"x\",function(e,t,n){n._d=new Date(D(e))}),c.version=\"2.24.0\",e=bt,c.fn=mn,c.min=function(){return Wt(\"isBefore\",[].slice.call(arguments,0))},c.max=function(){return Wt(\"isAfter\",[].slice.call(arguments,0))},c.now=function(){return Date.now?Date.now():+new Date},c.utc=y,c.unix=function(e){return bt(1e3*e)},c.months=function(e,t){return vn(e,t,\"months\")},c.isDate=d,c.locale=ut,c.invalid=p,c.duration=jt,c.isMoment=k,c.weekdays=function(e,t,n){return pn(e,t,n,\"weekdays\")},c.parseZone=function(){return bt.apply(null,arguments).parseZone()},c.localeData=ht,c.isDuration=Rt,c.monthsShort=function(e,t){return vn(e,t,\"monthsShort\")},c.weekdaysMin=function(e,t,n){return pn(e,t,n,\"weekdaysMin\")},c.defineLocale=lt,c.updateLocale=function(e,t){if(null!=t){var n,s,i=st;null!=(s=ot(e))&&(i=s._config),(n=new P(t=x(i,t))).parentLocale=it[e],it[e]=n,ut(e)}else null!=it[e]&&(null!=it[e].parentLocale?it[e]=it[e].parentLocale:null!=it[e]&&delete it[e]);return it[e]},c.locales=function(){return s(it)},c.weekdaysShort=function(e,t,n){return pn(e,t,n,\"weekdaysShort\")},c.normalizeUnits=H,c.relativeTimeRounding=function(e){return void 0===e?An:\"function\"==typeof e&&(An=e,!0)},c.relativeTimeThreshold=function(e,t){return void 0!==jn[e]&&(void 0===t?jn[e]:(jn[e]=t,\"s\"===e&&(jn.ss=t-1),!0))},c.calendarFormat=function(e,t){var n=e.diff(t,\"days\",!0);return n<-6?\"sameElse\":n<-1?\"lastWeek\":n<0?\"lastDay\":n<1?\"sameDay\":n<2?\"nextDay\":n<7?\"nextWeek\":\"sameElse\"},c.prototype=mn,c.HTML5_FMT={DATETIME_LOCAL:\"YYYY-MM-DDTHH:mm\",DATETIME_LOCAL_SECONDS:\"YYYY-MM-DDTHH:mm:ss\",DATETIME_LOCAL_MS:\"YYYY-MM-DDTHH:mm:ss.SSS\",DATE:\"YYYY-MM-DD\",TIME:\"HH:mm\",TIME_SECONDS:\"HH:mm:ss\",TIME_MS:\"HH:mm:ss.SSS\",WEEK:\"GGGG-[W]WW\",MONTH:\"YYYY-MM\"},c});\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../webpack/buildin/module.js */ \"./node_modules/webpack/buildin/module.js\")(module)))\n\n/***/ }),\n\n/***/ \"./node_modules/node-libs-browser/mock/empty.js\":\n/*!******************************************************!*\\\n  !*** ./node_modules/node-libs-browser/mock/empty.js ***!\n  \\******************************************************/\n/*! no static exports found */\n/***/ (function(module, exports) {\n\n\n\n/***/ }),\n\n/***/ \"./node_modules/path-browserify/index.js\":\n/*!***********************************************!*\\\n  !*** ./node_modules/path-browserify/index.js ***!\n  \\***********************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n/* WEBPACK VAR INJECTION */(function(process) {// .dirname, .basename, and .extname methods are extracted from Node.js v8.11.1,\n// backported and transplited with Babel, with backwards-compat fixes\n\n// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n// resolves . and .. elements in a path array with directory names there\n// must be no slashes, empty elements, or device names (c:\\) in the array\n// (so also no leading and trailing slashes - it does not distinguish\n// relative and absolute paths)\nfunction normalizeArray(parts, allowAboveRoot) {\n  // if the path tries to go above the root, `up` ends up > 0\n  var up = 0;\n  for (var i = parts.length - 1; i >= 0; i--) {\n    var last = parts[i];\n    if (last === '.') {\n      parts.splice(i, 1);\n    } else if (last === '..') {\n      parts.splice(i, 1);\n      up++;\n    } else if (up) {\n      parts.splice(i, 1);\n      up--;\n    }\n  }\n\n  // if the path is allowed to go above the root, restore leading ..s\n  if (allowAboveRoot) {\n    for (; up--; up) {\n      parts.unshift('..');\n    }\n  }\n\n  return parts;\n}\n\n// path.resolve([from ...], to)\n// posix version\nexports.resolve = function() {\n  var resolvedPath = '',\n      resolvedAbsolute = false;\n\n  for (var i = arguments.length - 1; i >= -1 && !resolvedAbsolute; i--) {\n    var path = (i >= 0) ? arguments[i] : process.cwd();\n\n    // Skip empty and invalid entries\n    if (typeof path !== 'string') {\n      throw new TypeError('Arguments to path.resolve must be strings');\n    } else if (!path) {\n      continue;\n    }\n\n    resolvedPath = path + '/' + resolvedPath;\n    resolvedAbsolute = path.charAt(0) === '/';\n  }\n\n  // At this point the path should be resolved to a full absolute path, but\n  // handle relative paths to be safe (might happen when process.cwd() fails)\n\n  // Normalize the path\n  resolvedPath = normalizeArray(filter(resolvedPath.split('/'), function(p) {\n    return !!p;\n  }), !resolvedAbsolute).join('/');\n\n  return ((resolvedAbsolute ? '/' : '') + resolvedPath) || '.';\n};\n\n// path.normalize(path)\n// posix version\nexports.normalize = function(path) {\n  var isAbsolute = exports.isAbsolute(path),\n      trailingSlash = substr(path, -1) === '/';\n\n  // Normalize the path\n  path = normalizeArray(filter(path.split('/'), function(p) {\n    return !!p;\n  }), !isAbsolute).join('/');\n\n  if (!path && !isAbsolute) {\n    path = '.';\n  }\n  if (path && trailingSlash) {\n    path += '/';\n  }\n\n  return (isAbsolute ? '/' : '') + path;\n};\n\n// posix version\nexports.isAbsolute = function(path) {\n  return path.charAt(0) === '/';\n};\n\n// posix version\nexports.join = function() {\n  var paths = Array.prototype.slice.call(arguments, 0);\n  return exports.normalize(filter(paths, function(p, index) {\n    if (typeof p !== 'string') {\n      throw new TypeError('Arguments to path.join must be strings');\n    }\n    return p;\n  }).join('/'));\n};\n\n\n// path.relative(from, to)\n// posix version\nexports.relative = function(from, to) {\n  from = exports.resolve(from).substr(1);\n  to = exports.resolve(to).substr(1);\n\n  function trim(arr) {\n    var start = 0;\n    for (; start < arr.length; start++) {\n      if (arr[start] !== '') break;\n    }\n\n    var end = arr.length - 1;\n    for (; end >= 0; end--) {\n      if (arr[end] !== '') break;\n    }\n\n    if (start > end) return [];\n    return arr.slice(start, end - start + 1);\n  }\n\n  var fromParts = trim(from.split('/'));\n  var toParts = trim(to.split('/'));\n\n  var length = Math.min(fromParts.length, toParts.length);\n  var samePartsLength = length;\n  for (var i = 0; i < length; i++) {\n    if (fromParts[i] !== toParts[i]) {\n      samePartsLength = i;\n      break;\n    }\n  }\n\n  var outputParts = [];\n  for (var i = samePartsLength; i < fromParts.length; i++) {\n    outputParts.push('..');\n  }\n\n  outputParts = outputParts.concat(toParts.slice(samePartsLength));\n\n  return outputParts.join('/');\n};\n\nexports.sep = '/';\nexports.delimiter = ':';\n\nexports.dirname = function (path) {\n  if (typeof path !== 'string') path = path + '';\n  if (path.length === 0) return '.';\n  var code = path.charCodeAt(0);\n  var hasRoot = code === 47 /*/*/;\n  var end = -1;\n  var matchedSlash = true;\n  for (var i = path.length - 1; i >= 1; --i) {\n    code = path.charCodeAt(i);\n    if (code === 47 /*/*/) {\n        if (!matchedSlash) {\n          end = i;\n          break;\n        }\n      } else {\n      // We saw the first non-path separator\n      matchedSlash = false;\n    }\n  }\n\n  if (end === -1) return hasRoot ? '/' : '.';\n  if (hasRoot && end === 1) {\n    // return '//';\n    // Backwards-compat fix:\n    return '/';\n  }\n  return path.slice(0, end);\n};\n\nfunction basename(path) {\n  if (typeof path !== 'string') path = path + '';\n\n  var start = 0;\n  var end = -1;\n  var matchedSlash = true;\n  var i;\n\n  for (i = path.length - 1; i >= 0; --i) {\n    if (path.charCodeAt(i) === 47 /*/*/) {\n        // If we reached a path separator that was not part of a set of path\n        // separators at the end of the string, stop now\n        if (!matchedSlash) {\n          start = i + 1;\n          break;\n        }\n      } else if (end === -1) {\n      // We saw the first non-path separator, mark this as the end of our\n      // path component\n      matchedSlash = false;\n      end = i + 1;\n    }\n  }\n\n  if (end === -1) return '';\n  return path.slice(start, end);\n}\n\n// Uses a mixed approach for backwards-compatibility, as ext behavior changed\n// in new Node.js versions, so only basename() above is backported here\nexports.basename = function (path, ext) {\n  var f = basename(path);\n  if (ext && f.substr(-1 * ext.length) === ext) {\n    f = f.substr(0, f.length - ext.length);\n  }\n  return f;\n};\n\nexports.extname = function (path) {\n  if (typeof path !== 'string') path = path + '';\n  var startDot = -1;\n  var startPart = 0;\n  var end = -1;\n  var matchedSlash = true;\n  // Track the state of characters (if any) we see before our first dot and\n  // after any path separator we find\n  var preDotState = 0;\n  for (var i = path.length - 1; i >= 0; --i) {\n    var code = path.charCodeAt(i);\n    if (code === 47 /*/*/) {\n        // If we reached a path separator that was not part of a set of path\n        // separators at the end of the string, stop now\n        if (!matchedSlash) {\n          startPart = i + 1;\n          break;\n        }\n        continue;\n      }\n    if (end === -1) {\n      // We saw the first non-path separator, mark this as the end of our\n      // extension\n      matchedSlash = false;\n      end = i + 1;\n    }\n    if (code === 46 /*.*/) {\n        // If this is our first dot, mark it as the start of our extension\n        if (startDot === -1)\n          startDot = i;\n        else if (preDotState !== 1)\n          preDotState = 1;\n    } else if (startDot !== -1) {\n      // We saw a non-dot and non-path separator before our dot, so we should\n      // have a good chance at having a non-empty extension\n      preDotState = -1;\n    }\n  }\n\n  if (startDot === -1 || end === -1 ||\n      // We saw a non-dot character immediately before the dot\n      preDotState === 0 ||\n      // The (right-most) trimmed path component is exactly '..'\n      preDotState === 1 && startDot === end - 1 && startDot === startPart + 1) {\n    return '';\n  }\n  return path.slice(startDot, end);\n};\n\nfunction filter (xs, f) {\n    if (xs.filter) return xs.filter(f);\n    var res = [];\n    for (var i = 0; i < xs.length; i++) {\n        if (f(xs[i], i, xs)) res.push(xs[i]);\n    }\n    return res;\n}\n\n// String.prototype.substr - negative index don't work in IE8\nvar substr = 'ab'.substr(-1) === 'b'\n    ? function (str, start, len) { return str.substr(start, len) }\n    : function (str, start, len) {\n        if (start < 0) start = str.length + start;\n        return str.substr(start, len);\n    }\n;\n\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../process/browser.js */ \"./node_modules/process/browser.js\")))\n\n/***/ }),\n\n/***/ \"./node_modules/process/browser.js\":\n/*!*****************************************!*\\\n  !*** ./node_modules/process/browser.js ***!\n  \\*****************************************/\n/*! no static exports found */\n/***/ (function(module, exports) {\n\n// shim for using process in browser\nvar process = module.exports = {};\n\n// cached from whatever global is present so that test runners that stub it\n// don't break things.  But we need to wrap it in a try catch in case it is\n// wrapped in strict mode code which doesn't define any globals.  It's inside a\n// function because try/catches deoptimize in certain engines.\n\nvar cachedSetTimeout;\nvar cachedClearTimeout;\n\nfunction defaultSetTimout() {\n    throw new Error('setTimeout has not been defined');\n}\nfunction defaultClearTimeout () {\n    throw new Error('clearTimeout has not been defined');\n}\n(function () {\n    try {\n        if (typeof setTimeout === 'function') {\n            cachedSetTimeout = setTimeout;\n        } else {\n            cachedSetTimeout = defaultSetTimout;\n        }\n    } catch (e) {\n        cachedSetTimeout = defaultSetTimout;\n    }\n    try {\n        if (typeof clearTimeout === 'function') {\n            cachedClearTimeout = clearTimeout;\n        } else {\n            cachedClearTimeout = defaultClearTimeout;\n        }\n    } catch (e) {\n        cachedClearTimeout = defaultClearTimeout;\n    }\n} ())\nfunction runTimeout(fun) {\n    if (cachedSetTimeout === setTimeout) {\n        //normal enviroments in sane situations\n        return setTimeout(fun, 0);\n    }\n    // if setTimeout wasn't available but was latter defined\n    if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n        cachedSetTimeout = setTimeout;\n        return setTimeout(fun, 0);\n    }\n    try {\n        // when when somebody has screwed with setTimeout but no I.E. maddness\n        return cachedSetTimeout(fun, 0);\n    } catch(e){\n        try {\n            // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n            return cachedSetTimeout.call(null, fun, 0);\n        } catch(e){\n            // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\n            return cachedSetTimeout.call(this, fun, 0);\n        }\n    }\n\n\n}\nfunction runClearTimeout(marker) {\n    if (cachedClearTimeout === clearTimeout) {\n        //normal enviroments in sane situations\n        return clearTimeout(marker);\n    }\n    // if clearTimeout wasn't available but was latter defined\n    if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n        cachedClearTimeout = clearTimeout;\n        return clearTimeout(marker);\n    }\n    try {\n        // when when somebody has screwed with setTimeout but no I.E. maddness\n        return cachedClearTimeout(marker);\n    } catch (e){\n        try {\n            // When we are in I.E. but the script has been evaled so I.E. doesn't  trust the global object when called normally\n            return cachedClearTimeout.call(null, marker);\n        } catch (e){\n            // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\n            // Some versions of I.E. have different rules for clearTimeout vs setTimeout\n            return cachedClearTimeout.call(this, marker);\n        }\n    }\n\n\n\n}\nvar queue = [];\nvar draining = false;\nvar currentQueue;\nvar queueIndex = -1;\n\nfunction cleanUpNextTick() {\n    if (!draining || !currentQueue) {\n        return;\n    }\n    draining = false;\n    if (currentQueue.length) {\n        queue = currentQueue.concat(queue);\n    } else {\n        queueIndex = -1;\n    }\n    if (queue.length) {\n        drainQueue();\n    }\n}\n\nfunction drainQueue() {\n    if (draining) {\n        return;\n    }\n    var timeout = runTimeout(cleanUpNextTick);\n    draining = true;\n\n    var len = queue.length;\n    while(len) {\n        currentQueue = queue;\n        queue = [];\n        while (++queueIndex < len) {\n            if (currentQueue) {\n                currentQueue[queueIndex].run();\n            }\n        }\n        queueIndex = -1;\n        len = queue.length;\n    }\n    currentQueue = null;\n    draining = false;\n    runClearTimeout(timeout);\n}\n\nprocess.nextTick = function (fun) {\n    var args = new Array(arguments.length - 1);\n    if (arguments.length > 1) {\n        for (var i = 1; i < arguments.length; i++) {\n            args[i - 1] = arguments[i];\n        }\n    }\n    queue.push(new Item(fun, args));\n    if (queue.length === 1 && !draining) {\n        runTimeout(drainQueue);\n    }\n};\n\n// v8 likes predictible objects\nfunction Item(fun, array) {\n    this.fun = fun;\n    this.array = array;\n}\nItem.prototype.run = function () {\n    this.fun.apply(null, this.array);\n};\nprocess.title = 'browser';\nprocess.browser = true;\nprocess.env = {};\nprocess.argv = [];\nprocess.version = ''; // empty string to avoid regexp issues\nprocess.versions = {};\n\nfunction noop() {}\n\nprocess.on = noop;\nprocess.addListener = noop;\nprocess.once = noop;\nprocess.off = noop;\nprocess.removeListener = noop;\nprocess.removeAllListeners = noop;\nprocess.emit = noop;\nprocess.prependListener = noop;\nprocess.prependOnceListener = noop;\n\nprocess.listeners = function (name) { return [] }\n\nprocess.binding = function (name) {\n    throw new Error('process.binding is not supported');\n};\n\nprocess.cwd = function () { return '/' };\nprocess.chdir = function (dir) {\n    throw new Error('process.chdir is not supported');\n};\nprocess.umask = function() { return 0; };\n\n\n/***/ }),\n\n/***/ \"./node_modules/robust-predicates/esm/incircle.js\":\n/*!********************************************************!*\\\n  !*** ./node_modules/robust-predicates/esm/incircle.js ***!\n  \\********************************************************/\n/*! exports provided: incircle, incirclefast */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"incircle\", function() { return incircle; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"incirclefast\", function() { return incirclefast; });\n/* harmony import */ var _util_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./util.js */ \"./node_modules/robust-predicates/esm/util.js\");\n\n\nconst iccerrboundA = (10 + 96 * _util_js__WEBPACK_IMPORTED_MODULE_0__[\"epsilon\"]) * _util_js__WEBPACK_IMPORTED_MODULE_0__[\"epsilon\"];\nconst iccerrboundB = (4 + 48 * _util_js__WEBPACK_IMPORTED_MODULE_0__[\"epsilon\"]) * _util_js__WEBPACK_IMPORTED_MODULE_0__[\"epsilon\"];\nconst iccerrboundC = (44 + 576 * _util_js__WEBPACK_IMPORTED_MODULE_0__[\"epsilon\"]) * _util_js__WEBPACK_IMPORTED_MODULE_0__[\"epsilon\"] * _util_js__WEBPACK_IMPORTED_MODULE_0__[\"epsilon\"];\n\nconst bc = Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"vec\"])(4);\nconst ca = Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"vec\"])(4);\nconst ab = Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"vec\"])(4);\nconst aa = Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"vec\"])(4);\nconst bb = Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"vec\"])(4);\nconst cc = Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"vec\"])(4);\nconst u = Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"vec\"])(4);\nconst v = Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"vec\"])(4);\nconst axtbc = Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"vec\"])(8);\nconst aytbc = Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"vec\"])(8);\nconst bxtca = Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"vec\"])(8);\nconst bytca = Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"vec\"])(8);\nconst cxtab = Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"vec\"])(8);\nconst cytab = Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"vec\"])(8);\nconst abt = Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"vec\"])(8);\nconst bct = Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"vec\"])(8);\nconst cat = Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"vec\"])(8);\nconst abtt = Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"vec\"])(4);\nconst bctt = Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"vec\"])(4);\nconst catt = Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"vec\"])(4);\n\nconst _8 = Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"vec\"])(8);\nconst _16 = Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"vec\"])(16);\nconst _16b = Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"vec\"])(16);\nconst _16c = Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"vec\"])(16);\nconst _32 = Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"vec\"])(32);\nconst _32b = Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"vec\"])(32);\nconst _48 = Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"vec\"])(48);\nconst _64 = Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"vec\"])(64);\n\nlet fin = Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"vec\"])(1152);\nlet fin2 = Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"vec\"])(1152);\n\nfunction finadd(finlen, a, alen) {\n    finlen = Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"sum\"])(finlen, fin, a, alen, fin2);\n    const tmp = fin; fin = fin2; fin2 = tmp;\n    return finlen;\n}\n\nfunction incircleadapt(ax, ay, bx, by, cx, cy, dx, dy, permanent) {\n    let finlen;\n    let adxtail, bdxtail, cdxtail, adytail, bdytail, cdytail;\n    let axtbclen, aytbclen, bxtcalen, bytcalen, cxtablen, cytablen;\n    let abtlen, bctlen, catlen;\n    let abttlen, bcttlen, cattlen;\n    let n1, n0;\n\n    let bvirt, c, ahi, alo, bhi, blo, _i, _j, _0, s1, s0, t1, t0, u3;\n\n    const adx = ax - dx;\n    const bdx = bx - dx;\n    const cdx = cx - dx;\n    const ady = ay - dy;\n    const bdy = by - dy;\n    const cdy = cy - dy;\n\n    s1 = bdx * cdy;\n    c = _util_js__WEBPACK_IMPORTED_MODULE_0__[\"splitter\"] * bdx;\n    ahi = c - (c - bdx);\n    alo = bdx - ahi;\n    c = _util_js__WEBPACK_IMPORTED_MODULE_0__[\"splitter\"] * cdy;\n    bhi = c - (c - cdy);\n    blo = cdy - bhi;\n    s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n    t1 = cdx * bdy;\n    c = _util_js__WEBPACK_IMPORTED_MODULE_0__[\"splitter\"] * cdx;\n    ahi = c - (c - cdx);\n    alo = cdx - ahi;\n    c = _util_js__WEBPACK_IMPORTED_MODULE_0__[\"splitter\"] * bdy;\n    bhi = c - (c - bdy);\n    blo = bdy - bhi;\n    t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n    _i = s0 - t0;\n    bvirt = s0 - _i;\n    bc[0] = s0 - (_i + bvirt) + (bvirt - t0);\n    _j = s1 + _i;\n    bvirt = _j - s1;\n    _0 = s1 - (_j - bvirt) + (_i - bvirt);\n    _i = _0 - t1;\n    bvirt = _0 - _i;\n    bc[1] = _0 - (_i + bvirt) + (bvirt - t1);\n    u3 = _j + _i;\n    bvirt = u3 - _j;\n    bc[2] = _j - (u3 - bvirt) + (_i - bvirt);\n    bc[3] = u3;\n    s1 = cdx * ady;\n    c = _util_js__WEBPACK_IMPORTED_MODULE_0__[\"splitter\"] * cdx;\n    ahi = c - (c - cdx);\n    alo = cdx - ahi;\n    c = _util_js__WEBPACK_IMPORTED_MODULE_0__[\"splitter\"] * ady;\n    bhi = c - (c - ady);\n    blo = ady - bhi;\n    s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n    t1 = adx * cdy;\n    c = _util_js__WEBPACK_IMPORTED_MODULE_0__[\"splitter\"] * adx;\n    ahi = c - (c - adx);\n    alo = adx - ahi;\n    c = _util_js__WEBPACK_IMPORTED_MODULE_0__[\"splitter\"] * cdy;\n    bhi = c - (c - cdy);\n    blo = cdy - bhi;\n    t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n    _i = s0 - t0;\n    bvirt = s0 - _i;\n    ca[0] = s0 - (_i + bvirt) + (bvirt - t0);\n    _j = s1 + _i;\n    bvirt = _j - s1;\n    _0 = s1 - (_j - bvirt) + (_i - bvirt);\n    _i = _0 - t1;\n    bvirt = _0 - _i;\n    ca[1] = _0 - (_i + bvirt) + (bvirt - t1);\n    u3 = _j + _i;\n    bvirt = u3 - _j;\n    ca[2] = _j - (u3 - bvirt) + (_i - bvirt);\n    ca[3] = u3;\n    s1 = adx * bdy;\n    c = _util_js__WEBPACK_IMPORTED_MODULE_0__[\"splitter\"] * adx;\n    ahi = c - (c - adx);\n    alo = adx - ahi;\n    c = _util_js__WEBPACK_IMPORTED_MODULE_0__[\"splitter\"] * bdy;\n    bhi = c - (c - bdy);\n    blo = bdy - bhi;\n    s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n    t1 = bdx * ady;\n    c = _util_js__WEBPACK_IMPORTED_MODULE_0__[\"splitter\"] * bdx;\n    ahi = c - (c - bdx);\n    alo = bdx - ahi;\n    c = _util_js__WEBPACK_IMPORTED_MODULE_0__[\"splitter\"] * ady;\n    bhi = c - (c - ady);\n    blo = ady - bhi;\n    t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n    _i = s0 - t0;\n    bvirt = s0 - _i;\n    ab[0] = s0 - (_i + bvirt) + (bvirt - t0);\n    _j = s1 + _i;\n    bvirt = _j - s1;\n    _0 = s1 - (_j - bvirt) + (_i - bvirt);\n    _i = _0 - t1;\n    bvirt = _0 - _i;\n    ab[1] = _0 - (_i + bvirt) + (bvirt - t1);\n    u3 = _j + _i;\n    bvirt = u3 - _j;\n    ab[2] = _j - (u3 - bvirt) + (_i - bvirt);\n    ab[3] = u3;\n\n    finlen = Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"sum\"])(\n        Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"sum\"])(\n            Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"sum\"])(\n                Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"scale\"])(Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"scale\"])(4, bc, adx, _8), _8, adx, _16), _16,\n                Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"scale\"])(Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"scale\"])(4, bc, ady, _8), _8, ady, _16b), _16b, _32), _32,\n            Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"sum\"])(\n                Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"scale\"])(Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"scale\"])(4, ca, bdx, _8), _8, bdx, _16), _16,\n                Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"scale\"])(Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"scale\"])(4, ca, bdy, _8), _8, bdy, _16b), _16b, _32b), _32b, _64), _64,\n        Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"sum\"])(\n            Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"scale\"])(Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"scale\"])(4, ab, cdx, _8), _8, cdx, _16), _16,\n            Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"scale\"])(Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"scale\"])(4, ab, cdy, _8), _8, cdy, _16b), _16b, _32), _32, fin);\n\n    let det = Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"estimate\"])(finlen, fin);\n    let errbound = iccerrboundB * permanent;\n    if (det >= errbound || -det >= errbound) {\n        return det;\n    }\n\n    bvirt = ax - adx;\n    adxtail = ax - (adx + bvirt) + (bvirt - dx);\n    bvirt = ay - ady;\n    adytail = ay - (ady + bvirt) + (bvirt - dy);\n    bvirt = bx - bdx;\n    bdxtail = bx - (bdx + bvirt) + (bvirt - dx);\n    bvirt = by - bdy;\n    bdytail = by - (bdy + bvirt) + (bvirt - dy);\n    bvirt = cx - cdx;\n    cdxtail = cx - (cdx + bvirt) + (bvirt - dx);\n    bvirt = cy - cdy;\n    cdytail = cy - (cdy + bvirt) + (bvirt - dy);\n    if (adxtail === 0 && bdxtail === 0 && cdxtail === 0 && adytail === 0 && bdytail === 0 && cdytail === 0) {\n        return det;\n    }\n\n    errbound = iccerrboundC * permanent + _util_js__WEBPACK_IMPORTED_MODULE_0__[\"resulterrbound\"] * Math.abs(det);\n    det += ((adx * adx + ady * ady) * ((bdx * cdytail + cdy * bdxtail) - (bdy * cdxtail + cdx * bdytail)) +\n        2 * (adx * adxtail + ady * adytail) * (bdx * cdy - bdy * cdx)) +\n        ((bdx * bdx + bdy * bdy) * ((cdx * adytail + ady * cdxtail) - (cdy * adxtail + adx * cdytail)) +\n        2 * (bdx * bdxtail + bdy * bdytail) * (cdx * ady - cdy * adx)) +\n        ((cdx * cdx + cdy * cdy) * ((adx * bdytail + bdy * adxtail) - (ady * bdxtail + bdx * adytail)) +\n        2 * (cdx * cdxtail + cdy * cdytail) * (adx * bdy - ady * bdx));\n\n    if (det >= errbound || -det >= errbound) {\n        return det;\n    }\n\n    if (bdxtail !== 0 || bdytail !== 0 || cdxtail !== 0 || cdytail !== 0) {\n        s1 = adx * adx;\n        c = _util_js__WEBPACK_IMPORTED_MODULE_0__[\"splitter\"] * adx;\n        ahi = c - (c - adx);\n        alo = adx - ahi;\n        s0 = alo * alo - (s1 - ahi * ahi - (ahi + ahi) * alo);\n        t1 = ady * ady;\n        c = _util_js__WEBPACK_IMPORTED_MODULE_0__[\"splitter\"] * ady;\n        ahi = c - (c - ady);\n        alo = ady - ahi;\n        t0 = alo * alo - (t1 - ahi * ahi - (ahi + ahi) * alo);\n        _i = s0 + t0;\n        bvirt = _i - s0;\n        aa[0] = s0 - (_i - bvirt) + (t0 - bvirt);\n        _j = s1 + _i;\n        bvirt = _j - s1;\n        _0 = s1 - (_j - bvirt) + (_i - bvirt);\n        _i = _0 + t1;\n        bvirt = _i - _0;\n        aa[1] = _0 - (_i - bvirt) + (t1 - bvirt);\n        u3 = _j + _i;\n        bvirt = u3 - _j;\n        aa[2] = _j - (u3 - bvirt) + (_i - bvirt);\n        aa[3] = u3;\n    }\n    if (cdxtail !== 0 || cdytail !== 0 || adxtail !== 0 || adytail !== 0) {\n        s1 = bdx * bdx;\n        c = _util_js__WEBPACK_IMPORTED_MODULE_0__[\"splitter\"] * bdx;\n        ahi = c - (c - bdx);\n        alo = bdx - ahi;\n        s0 = alo * alo - (s1 - ahi * ahi - (ahi + ahi) * alo);\n        t1 = bdy * bdy;\n        c = _util_js__WEBPACK_IMPORTED_MODULE_0__[\"splitter\"] * bdy;\n        ahi = c - (c - bdy);\n        alo = bdy - ahi;\n        t0 = alo * alo - (t1 - ahi * ahi - (ahi + ahi) * alo);\n        _i = s0 + t0;\n        bvirt = _i - s0;\n        bb[0] = s0 - (_i - bvirt) + (t0 - bvirt);\n        _j = s1 + _i;\n        bvirt = _j - s1;\n        _0 = s1 - (_j - bvirt) + (_i - bvirt);\n        _i = _0 + t1;\n        bvirt = _i - _0;\n        bb[1] = _0 - (_i - bvirt) + (t1 - bvirt);\n        u3 = _j + _i;\n        bvirt = u3 - _j;\n        bb[2] = _j - (u3 - bvirt) + (_i - bvirt);\n        bb[3] = u3;\n    }\n    if (adxtail !== 0 || adytail !== 0 || bdxtail !== 0 || bdytail !== 0) {\n        s1 = cdx * cdx;\n        c = _util_js__WEBPACK_IMPORTED_MODULE_0__[\"splitter\"] * cdx;\n        ahi = c - (c - cdx);\n        alo = cdx - ahi;\n        s0 = alo * alo - (s1 - ahi * ahi - (ahi + ahi) * alo);\n        t1 = cdy * cdy;\n        c = _util_js__WEBPACK_IMPORTED_MODULE_0__[\"splitter\"] * cdy;\n        ahi = c - (c - cdy);\n        alo = cdy - ahi;\n        t0 = alo * alo - (t1 - ahi * ahi - (ahi + ahi) * alo);\n        _i = s0 + t0;\n        bvirt = _i - s0;\n        cc[0] = s0 - (_i - bvirt) + (t0 - bvirt);\n        _j = s1 + _i;\n        bvirt = _j - s1;\n        _0 = s1 - (_j - bvirt) + (_i - bvirt);\n        _i = _0 + t1;\n        bvirt = _i - _0;\n        cc[1] = _0 - (_i - bvirt) + (t1 - bvirt);\n        u3 = _j + _i;\n        bvirt = u3 - _j;\n        cc[2] = _j - (u3 - bvirt) + (_i - bvirt);\n        cc[3] = u3;\n    }\n\n    if (adxtail !== 0) {\n        axtbclen = Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"scale\"])(4, bc, adxtail, axtbc);\n        finlen = finadd(finlen, Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"sum_three\"])(\n            Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"scale\"])(axtbclen, axtbc, 2 * adx, _16), _16,\n            Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"scale\"])(Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"scale\"])(4, cc, adxtail, _8), _8, bdy, _16b), _16b,\n            Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"scale\"])(Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"scale\"])(4, bb, adxtail, _8), _8, -cdy, _16c), _16c, _32, _48), _48);\n    }\n    if (adytail !== 0) {\n        aytbclen = Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"scale\"])(4, bc, adytail, aytbc);\n        finlen = finadd(finlen, Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"sum_three\"])(\n            Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"scale\"])(aytbclen, aytbc, 2 * ady, _16), _16,\n            Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"scale\"])(Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"scale\"])(4, bb, adytail, _8), _8, cdx, _16b), _16b,\n            Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"scale\"])(Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"scale\"])(4, cc, adytail, _8), _8, -bdx, _16c), _16c, _32, _48), _48);\n    }\n    if (bdxtail !== 0) {\n        bxtcalen = Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"scale\"])(4, ca, bdxtail, bxtca);\n        finlen = finadd(finlen, Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"sum_three\"])(\n            Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"scale\"])(bxtcalen, bxtca, 2 * bdx, _16), _16,\n            Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"scale\"])(Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"scale\"])(4, aa, bdxtail, _8), _8, cdy, _16b), _16b,\n            Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"scale\"])(Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"scale\"])(4, cc, bdxtail, _8), _8, -ady, _16c), _16c, _32, _48), _48);\n    }\n    if (bdytail !== 0) {\n        bytcalen = Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"scale\"])(4, ca, bdytail, bytca);\n        finlen = finadd(finlen, Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"sum_three\"])(\n            Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"scale\"])(bytcalen, bytca, 2 * bdy, _16), _16,\n            Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"scale\"])(Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"scale\"])(4, cc, bdytail, _8), _8, adx, _16b), _16b,\n            Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"scale\"])(Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"scale\"])(4, aa, bdytail, _8), _8, -cdx, _16c), _16c, _32, _48), _48);\n    }\n    if (cdxtail !== 0) {\n        cxtablen = Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"scale\"])(4, ab, cdxtail, cxtab);\n        finlen = finadd(finlen, Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"sum_three\"])(\n            Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"scale\"])(cxtablen, cxtab, 2 * cdx, _16), _16,\n            Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"scale\"])(Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"scale\"])(4, bb, cdxtail, _8), _8, ady, _16b), _16b,\n            Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"scale\"])(Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"scale\"])(4, aa, cdxtail, _8), _8, -bdy, _16c), _16c, _32, _48), _48);\n    }\n    if (cdytail !== 0) {\n        cytablen = Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"scale\"])(4, ab, cdytail, cytab);\n        finlen = finadd(finlen, Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"sum_three\"])(\n            Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"scale\"])(cytablen, cytab, 2 * cdy, _16), _16,\n            Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"scale\"])(Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"scale\"])(4, aa, cdytail, _8), _8, bdx, _16b), _16b,\n            Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"scale\"])(Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"scale\"])(4, bb, cdytail, _8), _8, -adx, _16c), _16c, _32, _48), _48);\n    }\n\n    if (adxtail !== 0 || adytail !== 0) {\n        if (bdxtail !== 0 || bdytail !== 0 || cdxtail !== 0 || cdytail !== 0) {\n            s1 = bdxtail * cdy;\n            c = _util_js__WEBPACK_IMPORTED_MODULE_0__[\"splitter\"] * bdxtail;\n            ahi = c - (c - bdxtail);\n            alo = bdxtail - ahi;\n            c = _util_js__WEBPACK_IMPORTED_MODULE_0__[\"splitter\"] * cdy;\n            bhi = c - (c - cdy);\n            blo = cdy - bhi;\n            s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n            t1 = bdx * cdytail;\n            c = _util_js__WEBPACK_IMPORTED_MODULE_0__[\"splitter\"] * bdx;\n            ahi = c - (c - bdx);\n            alo = bdx - ahi;\n            c = _util_js__WEBPACK_IMPORTED_MODULE_0__[\"splitter\"] * cdytail;\n            bhi = c - (c - cdytail);\n            blo = cdytail - bhi;\n            t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n            _i = s0 + t0;\n            bvirt = _i - s0;\n            u[0] = s0 - (_i - bvirt) + (t0 - bvirt);\n            _j = s1 + _i;\n            bvirt = _j - s1;\n            _0 = s1 - (_j - bvirt) + (_i - bvirt);\n            _i = _0 + t1;\n            bvirt = _i - _0;\n            u[1] = _0 - (_i - bvirt) + (t1 - bvirt);\n            u3 = _j + _i;\n            bvirt = u3 - _j;\n            u[2] = _j - (u3 - bvirt) + (_i - bvirt);\n            u[3] = u3;\n            s1 = cdxtail * -bdy;\n            c = _util_js__WEBPACK_IMPORTED_MODULE_0__[\"splitter\"] * cdxtail;\n            ahi = c - (c - cdxtail);\n            alo = cdxtail - ahi;\n            c = _util_js__WEBPACK_IMPORTED_MODULE_0__[\"splitter\"] * -bdy;\n            bhi = c - (c - -bdy);\n            blo = -bdy - bhi;\n            s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n            t1 = cdx * -bdytail;\n            c = _util_js__WEBPACK_IMPORTED_MODULE_0__[\"splitter\"] * cdx;\n            ahi = c - (c - cdx);\n            alo = cdx - ahi;\n            c = _util_js__WEBPACK_IMPORTED_MODULE_0__[\"splitter\"] * -bdytail;\n            bhi = c - (c - -bdytail);\n            blo = -bdytail - bhi;\n            t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n            _i = s0 + t0;\n            bvirt = _i - s0;\n            v[0] = s0 - (_i - bvirt) + (t0 - bvirt);\n            _j = s1 + _i;\n            bvirt = _j - s1;\n            _0 = s1 - (_j - bvirt) + (_i - bvirt);\n            _i = _0 + t1;\n            bvirt = _i - _0;\n            v[1] = _0 - (_i - bvirt) + (t1 - bvirt);\n            u3 = _j + _i;\n            bvirt = u3 - _j;\n            v[2] = _j - (u3 - bvirt) + (_i - bvirt);\n            v[3] = u3;\n            bctlen = Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"sum\"])(4, u, 4, v, bct);\n            s1 = bdxtail * cdytail;\n            c = _util_js__WEBPACK_IMPORTED_MODULE_0__[\"splitter\"] * bdxtail;\n            ahi = c - (c - bdxtail);\n            alo = bdxtail - ahi;\n            c = _util_js__WEBPACK_IMPORTED_MODULE_0__[\"splitter\"] * cdytail;\n            bhi = c - (c - cdytail);\n            blo = cdytail - bhi;\n            s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n            t1 = cdxtail * bdytail;\n            c = _util_js__WEBPACK_IMPORTED_MODULE_0__[\"splitter\"] * cdxtail;\n            ahi = c - (c - cdxtail);\n            alo = cdxtail - ahi;\n            c = _util_js__WEBPACK_IMPORTED_MODULE_0__[\"splitter\"] * bdytail;\n            bhi = c - (c - bdytail);\n            blo = bdytail - bhi;\n            t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n            _i = s0 - t0;\n            bvirt = s0 - _i;\n            bctt[0] = s0 - (_i + bvirt) + (bvirt - t0);\n            _j = s1 + _i;\n            bvirt = _j - s1;\n            _0 = s1 - (_j - bvirt) + (_i - bvirt);\n            _i = _0 - t1;\n            bvirt = _0 - _i;\n            bctt[1] = _0 - (_i + bvirt) + (bvirt - t1);\n            u3 = _j + _i;\n            bvirt = u3 - _j;\n            bctt[2] = _j - (u3 - bvirt) + (_i - bvirt);\n            bctt[3] = u3;\n            bcttlen = 4;\n        } else {\n            bct[0] = 0;\n            bctlen = 1;\n            bctt[0] = 0;\n            bcttlen = 1;\n        }\n        if (adxtail !== 0) {\n            const len = Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"scale\"])(bctlen, bct, adxtail, _16c);\n            finlen = finadd(finlen, Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"sum\"])(\n                Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"scale\"])(axtbclen, axtbc, adxtail, _16), _16,\n                Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"scale\"])(len, _16c, 2 * adx, _32), _32, _48), _48);\n\n            const len2 = Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"scale\"])(bcttlen, bctt, adxtail, _8);\n            finlen = finadd(finlen, Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"sum_three\"])(\n                Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"scale\"])(len2, _8, 2 * adx, _16), _16,\n                Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"scale\"])(len2, _8, adxtail, _16b), _16b,\n                Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"scale\"])(len, _16c, adxtail, _32), _32, _32b, _64), _64);\n\n            if (bdytail !== 0) {\n                finlen = finadd(finlen, Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"scale\"])(Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"scale\"])(4, cc, adxtail, _8), _8, bdytail, _16), _16);\n            }\n            if (cdytail !== 0) {\n                finlen = finadd(finlen, Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"scale\"])(Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"scale\"])(4, bb, -adxtail, _8), _8, cdytail, _16), _16);\n            }\n        }\n        if (adytail !== 0) {\n            const len = Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"scale\"])(bctlen, bct, adytail, _16c);\n            finlen = finadd(finlen, Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"sum\"])(\n                Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"scale\"])(aytbclen, aytbc, adytail, _16), _16,\n                Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"scale\"])(len, _16c, 2 * ady, _32), _32, _48), _48);\n\n            const len2 = Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"scale\"])(bcttlen, bctt, adytail, _8);\n            finlen = finadd(finlen, Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"sum_three\"])(\n                Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"scale\"])(len2, _8, 2 * ady, _16), _16,\n                Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"scale\"])(len2, _8, adytail, _16b), _16b,\n                Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"scale\"])(len, _16c, adytail, _32), _32, _32b, _64), _64);\n        }\n    }\n    if (bdxtail !== 0 || bdytail !== 0) {\n        if (cdxtail !== 0 || cdytail !== 0 || adxtail !== 0 || adytail !== 0) {\n            s1 = cdxtail * ady;\n            c = _util_js__WEBPACK_IMPORTED_MODULE_0__[\"splitter\"] * cdxtail;\n            ahi = c - (c - cdxtail);\n            alo = cdxtail - ahi;\n            c = _util_js__WEBPACK_IMPORTED_MODULE_0__[\"splitter\"] * ady;\n            bhi = c - (c - ady);\n            blo = ady - bhi;\n            s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n            t1 = cdx * adytail;\n            c = _util_js__WEBPACK_IMPORTED_MODULE_0__[\"splitter\"] * cdx;\n            ahi = c - (c - cdx);\n            alo = cdx - ahi;\n            c = _util_js__WEBPACK_IMPORTED_MODULE_0__[\"splitter\"] * adytail;\n            bhi = c - (c - adytail);\n            blo = adytail - bhi;\n            t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n            _i = s0 + t0;\n            bvirt = _i - s0;\n            u[0] = s0 - (_i - bvirt) + (t0 - bvirt);\n            _j = s1 + _i;\n            bvirt = _j - s1;\n            _0 = s1 - (_j - bvirt) + (_i - bvirt);\n            _i = _0 + t1;\n            bvirt = _i - _0;\n            u[1] = _0 - (_i - bvirt) + (t1 - bvirt);\n            u3 = _j + _i;\n            bvirt = u3 - _j;\n            u[2] = _j - (u3 - bvirt) + (_i - bvirt);\n            u[3] = u3;\n            n1 = -cdy;\n            n0 = -cdytail;\n            s1 = adxtail * n1;\n            c = _util_js__WEBPACK_IMPORTED_MODULE_0__[\"splitter\"] * adxtail;\n            ahi = c - (c - adxtail);\n            alo = adxtail - ahi;\n            c = _util_js__WEBPACK_IMPORTED_MODULE_0__[\"splitter\"] * n1;\n            bhi = c - (c - n1);\n            blo = n1 - bhi;\n            s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n            t1 = adx * n0;\n            c = _util_js__WEBPACK_IMPORTED_MODULE_0__[\"splitter\"] * adx;\n            ahi = c - (c - adx);\n            alo = adx - ahi;\n            c = _util_js__WEBPACK_IMPORTED_MODULE_0__[\"splitter\"] * n0;\n            bhi = c - (c - n0);\n            blo = n0 - bhi;\n            t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n            _i = s0 + t0;\n            bvirt = _i - s0;\n            v[0] = s0 - (_i - bvirt) + (t0 - bvirt);\n            _j = s1 + _i;\n            bvirt = _j - s1;\n            _0 = s1 - (_j - bvirt) + (_i - bvirt);\n            _i = _0 + t1;\n            bvirt = _i - _0;\n            v[1] = _0 - (_i - bvirt) + (t1 - bvirt);\n            u3 = _j + _i;\n            bvirt = u3 - _j;\n            v[2] = _j - (u3 - bvirt) + (_i - bvirt);\n            v[3] = u3;\n            catlen = Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"sum\"])(4, u, 4, v, cat);\n            s1 = cdxtail * adytail;\n            c = _util_js__WEBPACK_IMPORTED_MODULE_0__[\"splitter\"] * cdxtail;\n            ahi = c - (c - cdxtail);\n            alo = cdxtail - ahi;\n            c = _util_js__WEBPACK_IMPORTED_MODULE_0__[\"splitter\"] * adytail;\n            bhi = c - (c - adytail);\n            blo = adytail - bhi;\n            s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n            t1 = adxtail * cdytail;\n            c = _util_js__WEBPACK_IMPORTED_MODULE_0__[\"splitter\"] * adxtail;\n            ahi = c - (c - adxtail);\n            alo = adxtail - ahi;\n            c = _util_js__WEBPACK_IMPORTED_MODULE_0__[\"splitter\"] * cdytail;\n            bhi = c - (c - cdytail);\n            blo = cdytail - bhi;\n            t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n            _i = s0 - t0;\n            bvirt = s0 - _i;\n            catt[0] = s0 - (_i + bvirt) + (bvirt - t0);\n            _j = s1 + _i;\n            bvirt = _j - s1;\n            _0 = s1 - (_j - bvirt) + (_i - bvirt);\n            _i = _0 - t1;\n            bvirt = _0 - _i;\n            catt[1] = _0 - (_i + bvirt) + (bvirt - t1);\n            u3 = _j + _i;\n            bvirt = u3 - _j;\n            catt[2] = _j - (u3 - bvirt) + (_i - bvirt);\n            catt[3] = u3;\n            cattlen = 4;\n        } else {\n            cat[0] = 0;\n            catlen = 1;\n            catt[0] = 0;\n            cattlen = 1;\n        }\n        if (bdxtail !== 0) {\n            const len = Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"scale\"])(catlen, cat, bdxtail, _16c);\n            finlen = finadd(finlen, Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"sum\"])(\n                Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"scale\"])(bxtcalen, bxtca, bdxtail, _16), _16,\n                Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"scale\"])(len, _16c, 2 * bdx, _32), _32, _48), _48);\n\n            const len2 = Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"scale\"])(cattlen, catt, bdxtail, _8);\n            finlen = finadd(finlen, Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"sum_three\"])(\n                Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"scale\"])(len2, _8, 2 * bdx, _16), _16,\n                Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"scale\"])(len2, _8, bdxtail, _16b), _16b,\n                Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"scale\"])(len, _16c, bdxtail, _32), _32, _32b, _64), _64);\n\n            if (cdytail !== 0) {\n                finlen = finadd(finlen, Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"scale\"])(Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"scale\"])(4, aa, bdxtail, _8), _8, cdytail, _16), _16);\n            }\n            if (adytail !== 0) {\n                finlen = finadd(finlen, Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"scale\"])(Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"scale\"])(4, cc, -bdxtail, _8), _8, adytail, _16), _16);\n            }\n        }\n        if (bdytail !== 0) {\n            const len = Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"scale\"])(catlen, cat, bdytail, _16c);\n            finlen = finadd(finlen, Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"sum\"])(\n                Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"scale\"])(bytcalen, bytca, bdytail, _16), _16,\n                Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"scale\"])(len, _16c, 2 * bdy, _32), _32, _48), _48);\n\n            const len2 = Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"scale\"])(cattlen, catt, bdytail, _8);\n            finlen = finadd(finlen, Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"sum_three\"])(\n                Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"scale\"])(len2, _8, 2 * bdy, _16), _16,\n                Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"scale\"])(len2, _8, bdytail, _16b), _16b,\n                Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"scale\"])(len, _16c, bdytail, _32), _32,  _32b, _64), _64);\n        }\n    }\n    if (cdxtail !== 0 || cdytail !== 0) {\n        if (adxtail !== 0 || adytail !== 0 || bdxtail !== 0 || bdytail !== 0) {\n            s1 = adxtail * bdy;\n            c = _util_js__WEBPACK_IMPORTED_MODULE_0__[\"splitter\"] * adxtail;\n            ahi = c - (c - adxtail);\n            alo = adxtail - ahi;\n            c = _util_js__WEBPACK_IMPORTED_MODULE_0__[\"splitter\"] * bdy;\n            bhi = c - (c - bdy);\n            blo = bdy - bhi;\n            s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n            t1 = adx * bdytail;\n            c = _util_js__WEBPACK_IMPORTED_MODULE_0__[\"splitter\"] * adx;\n            ahi = c - (c - adx);\n            alo = adx - ahi;\n            c = _util_js__WEBPACK_IMPORTED_MODULE_0__[\"splitter\"] * bdytail;\n            bhi = c - (c - bdytail);\n            blo = bdytail - bhi;\n            t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n            _i = s0 + t0;\n            bvirt = _i - s0;\n            u[0] = s0 - (_i - bvirt) + (t0 - bvirt);\n            _j = s1 + _i;\n            bvirt = _j - s1;\n            _0 = s1 - (_j - bvirt) + (_i - bvirt);\n            _i = _0 + t1;\n            bvirt = _i - _0;\n            u[1] = _0 - (_i - bvirt) + (t1 - bvirt);\n            u3 = _j + _i;\n            bvirt = u3 - _j;\n            u[2] = _j - (u3 - bvirt) + (_i - bvirt);\n            u[3] = u3;\n            n1 = -ady;\n            n0 = -adytail;\n            s1 = bdxtail * n1;\n            c = _util_js__WEBPACK_IMPORTED_MODULE_0__[\"splitter\"] * bdxtail;\n            ahi = c - (c - bdxtail);\n            alo = bdxtail - ahi;\n            c = _util_js__WEBPACK_IMPORTED_MODULE_0__[\"splitter\"] * n1;\n            bhi = c - (c - n1);\n            blo = n1 - bhi;\n            s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n            t1 = bdx * n0;\n            c = _util_js__WEBPACK_IMPORTED_MODULE_0__[\"splitter\"] * bdx;\n            ahi = c - (c - bdx);\n            alo = bdx - ahi;\n            c = _util_js__WEBPACK_IMPORTED_MODULE_0__[\"splitter\"] * n0;\n            bhi = c - (c - n0);\n            blo = n0 - bhi;\n            t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n            _i = s0 + t0;\n            bvirt = _i - s0;\n            v[0] = s0 - (_i - bvirt) + (t0 - bvirt);\n            _j = s1 + _i;\n            bvirt = _j - s1;\n            _0 = s1 - (_j - bvirt) + (_i - bvirt);\n            _i = _0 + t1;\n            bvirt = _i - _0;\n            v[1] = _0 - (_i - bvirt) + (t1 - bvirt);\n            u3 = _j + _i;\n            bvirt = u3 - _j;\n            v[2] = _j - (u3 - bvirt) + (_i - bvirt);\n            v[3] = u3;\n            abtlen = Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"sum\"])(4, u, 4, v, abt);\n            s1 = adxtail * bdytail;\n            c = _util_js__WEBPACK_IMPORTED_MODULE_0__[\"splitter\"] * adxtail;\n            ahi = c - (c - adxtail);\n            alo = adxtail - ahi;\n            c = _util_js__WEBPACK_IMPORTED_MODULE_0__[\"splitter\"] * bdytail;\n            bhi = c - (c - bdytail);\n            blo = bdytail - bhi;\n            s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n            t1 = bdxtail * adytail;\n            c = _util_js__WEBPACK_IMPORTED_MODULE_0__[\"splitter\"] * bdxtail;\n            ahi = c - (c - bdxtail);\n            alo = bdxtail - ahi;\n            c = _util_js__WEBPACK_IMPORTED_MODULE_0__[\"splitter\"] * adytail;\n            bhi = c - (c - adytail);\n            blo = adytail - bhi;\n            t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n            _i = s0 - t0;\n            bvirt = s0 - _i;\n            abtt[0] = s0 - (_i + bvirt) + (bvirt - t0);\n            _j = s1 + _i;\n            bvirt = _j - s1;\n            _0 = s1 - (_j - bvirt) + (_i - bvirt);\n            _i = _0 - t1;\n            bvirt = _0 - _i;\n            abtt[1] = _0 - (_i + bvirt) + (bvirt - t1);\n            u3 = _j + _i;\n            bvirt = u3 - _j;\n            abtt[2] = _j - (u3 - bvirt) + (_i - bvirt);\n            abtt[3] = u3;\n            abttlen = 4;\n        } else {\n            abt[0] = 0;\n            abtlen = 1;\n            abtt[0] = 0;\n            abttlen = 1;\n        }\n        if (cdxtail !== 0) {\n            const len = Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"scale\"])(abtlen, abt, cdxtail, _16c);\n            finlen = finadd(finlen, Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"sum\"])(\n                Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"scale\"])(cxtablen, cxtab, cdxtail, _16), _16,\n                Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"scale\"])(len, _16c, 2 * cdx, _32), _32, _48), _48);\n\n            const len2 = Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"scale\"])(abttlen, abtt, cdxtail, _8);\n            finlen = finadd(finlen, Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"sum_three\"])(\n                Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"scale\"])(len2, _8, 2 * cdx, _16), _16,\n                Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"scale\"])(len2, _8, cdxtail, _16b), _16b,\n                Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"scale\"])(len, _16c, cdxtail, _32), _32, _32b, _64), _64);\n\n            if (adytail !== 0) {\n                finlen = finadd(finlen, Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"scale\"])(Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"scale\"])(4, bb, cdxtail, _8), _8, adytail, _16), _16);\n            }\n            if (bdytail !== 0) {\n                finlen = finadd(finlen, Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"scale\"])(Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"scale\"])(4, aa, -cdxtail, _8), _8, bdytail, _16), _16);\n            }\n        }\n        if (cdytail !== 0) {\n            const len = Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"scale\"])(abtlen, abt, cdytail, _16c);\n            finlen = finadd(finlen, Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"sum\"])(\n                Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"scale\"])(cytablen, cytab, cdytail, _16), _16,\n                Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"scale\"])(len, _16c, 2 * cdy, _32), _32, _48), _48);\n\n            const len2 = Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"scale\"])(abttlen, abtt, cdytail, _8);\n            finlen = finadd(finlen, Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"sum_three\"])(\n                Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"scale\"])(len2, _8, 2 * cdy, _16), _16,\n                Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"scale\"])(len2, _8, cdytail, _16b), _16b,\n                Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"scale\"])(len, _16c, cdytail, _32), _32, _32b, _64), _64);\n        }\n    }\n\n    return fin[finlen - 1];\n}\n\nfunction incircle(ax, ay, bx, by, cx, cy, dx, dy) {\n    const adx = ax - dx;\n    const bdx = bx - dx;\n    const cdx = cx - dx;\n    const ady = ay - dy;\n    const bdy = by - dy;\n    const cdy = cy - dy;\n\n    const bdxcdy = bdx * cdy;\n    const cdxbdy = cdx * bdy;\n    const alift = adx * adx + ady * ady;\n\n    const cdxady = cdx * ady;\n    const adxcdy = adx * cdy;\n    const blift = bdx * bdx + bdy * bdy;\n\n    const adxbdy = adx * bdy;\n    const bdxady = bdx * ady;\n    const clift = cdx * cdx + cdy * cdy;\n\n    const det =\n        alift * (bdxcdy - cdxbdy) +\n        blift * (cdxady - adxcdy) +\n        clift * (adxbdy - bdxady);\n\n    const permanent =\n        (Math.abs(bdxcdy) + Math.abs(cdxbdy)) * alift +\n        (Math.abs(cdxady) + Math.abs(adxcdy)) * blift +\n        (Math.abs(adxbdy) + Math.abs(bdxady)) * clift;\n\n    const errbound = iccerrboundA * permanent;\n\n    if (det > errbound || -det > errbound) {\n        return det;\n    }\n    return incircleadapt(ax, ay, bx, by, cx, cy, dx, dy, permanent);\n}\n\nfunction incirclefast(ax, ay, bx, by, cx, cy, dx, dy) {\n    const adx = ax - dx;\n    const ady = ay - dy;\n    const bdx = bx - dx;\n    const bdy = by - dy;\n    const cdx = cx - dx;\n    const cdy = cy - dy;\n\n    const abdet = adx * bdy - bdx * ady;\n    const bcdet = bdx * cdy - cdx * bdy;\n    const cadet = cdx * ady - adx * cdy;\n    const alift = adx * adx + ady * ady;\n    const blift = bdx * bdx + bdy * bdy;\n    const clift = cdx * cdx + cdy * cdy;\n\n    return alift * bcdet + blift * cadet + clift * abdet;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/robust-predicates/esm/insphere.js\":\n/*!********************************************************!*\\\n  !*** ./node_modules/robust-predicates/esm/insphere.js ***!\n  \\********************************************************/\n/*! exports provided: insphere, inspherefast */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"insphere\", function() { return insphere; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"inspherefast\", function() { return inspherefast; });\n/* harmony import */ var _util_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./util.js */ \"./node_modules/robust-predicates/esm/util.js\");\n\n\nconst isperrboundA = (16 + 224 * _util_js__WEBPACK_IMPORTED_MODULE_0__[\"epsilon\"]) * _util_js__WEBPACK_IMPORTED_MODULE_0__[\"epsilon\"];\nconst isperrboundB = (5 + 72 * _util_js__WEBPACK_IMPORTED_MODULE_0__[\"epsilon\"]) * _util_js__WEBPACK_IMPORTED_MODULE_0__[\"epsilon\"];\nconst isperrboundC = (71 + 1408 * _util_js__WEBPACK_IMPORTED_MODULE_0__[\"epsilon\"]) * _util_js__WEBPACK_IMPORTED_MODULE_0__[\"epsilon\"] * _util_js__WEBPACK_IMPORTED_MODULE_0__[\"epsilon\"];\n\nconst ab = Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"vec\"])(4);\nconst bc = Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"vec\"])(4);\nconst cd = Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"vec\"])(4);\nconst de = Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"vec\"])(4);\nconst ea = Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"vec\"])(4);\nconst ac = Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"vec\"])(4);\nconst bd = Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"vec\"])(4);\nconst ce = Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"vec\"])(4);\nconst da = Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"vec\"])(4);\nconst eb = Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"vec\"])(4);\n\nconst abc = Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"vec\"])(24);\nconst bcd = Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"vec\"])(24);\nconst cde = Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"vec\"])(24);\nconst dea = Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"vec\"])(24);\nconst eab = Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"vec\"])(24);\nconst abd = Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"vec\"])(24);\nconst bce = Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"vec\"])(24);\nconst cda = Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"vec\"])(24);\nconst deb = Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"vec\"])(24);\nconst eac = Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"vec\"])(24);\n\nconst adet = Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"vec\"])(1152);\nconst bdet = Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"vec\"])(1152);\nconst cdet = Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"vec\"])(1152);\nconst ddet = Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"vec\"])(1152);\nconst edet = Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"vec\"])(1152);\nconst abdet = Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"vec\"])(2304);\nconst cddet = Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"vec\"])(2304);\nconst cdedet = Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"vec\"])(3456);\nconst deter = Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"vec\"])(5760);\n\nconst _8 = Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"vec\"])(8);\nconst _8b = Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"vec\"])(8);\nconst _8c = Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"vec\"])(8);\nconst _16 = Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"vec\"])(16);\nconst _24 = Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"vec\"])(24);\nconst _48 = Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"vec\"])(48);\nconst _48b = Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"vec\"])(48);\nconst _96 = Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"vec\"])(96);\nconst _192 = Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"vec\"])(192);\nconst _384x = Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"vec\"])(384);\nconst _384y = Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"vec\"])(384);\nconst _384z = Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"vec\"])(384);\nconst _768 = Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"vec\"])(768);\n\nfunction sum_three_scale(a, b, c, az, bz, cz, out) {\n    return Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"sum_three\"])(\n        Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"scale\"])(4, a, az, _8), _8,\n        Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"scale\"])(4, b, bz, _8b), _8b,\n        Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"scale\"])(4, c, cz, _8c), _8c, _16, out);\n}\n\nfunction liftexact(alen, a, blen, b, clen, c, dlen, d, x, y, z, out) {\n    const len = Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"sum\"])(\n        Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"sum\"])(alen, a, blen, b, _48), _48,\n        Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"negate\"])(Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"sum\"])(clen, c, dlen, d, _48b), _48b), _48b, _96);\n\n    return Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"sum_three\"])(\n        Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"scale\"])(Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"scale\"])(len, _96, x, _192), _192, x, _384x), _384x,\n        Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"scale\"])(Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"scale\"])(len, _96, y, _192), _192, y, _384y), _384y,\n        Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"scale\"])(Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"scale\"])(len, _96, z, _192), _192, z, _384z), _384z, _768, out);\n}\n\nfunction insphereexact(ax, ay, az, bx, by, bz, cx, cy, cz, dx, dy, dz, ex, ey, ez) {\n    let bvirt, c, ahi, alo, bhi, blo, _i, _j, _0, s1, s0, t1, t0, u3;\n\n    s1 = ax * by;\n    c = _util_js__WEBPACK_IMPORTED_MODULE_0__[\"splitter\"] * ax;\n    ahi = c - (c - ax);\n    alo = ax - ahi;\n    c = _util_js__WEBPACK_IMPORTED_MODULE_0__[\"splitter\"] * by;\n    bhi = c - (c - by);\n    blo = by - bhi;\n    s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n    t1 = bx * ay;\n    c = _util_js__WEBPACK_IMPORTED_MODULE_0__[\"splitter\"] * bx;\n    ahi = c - (c - bx);\n    alo = bx - ahi;\n    c = _util_js__WEBPACK_IMPORTED_MODULE_0__[\"splitter\"] * ay;\n    bhi = c - (c - ay);\n    blo = ay - bhi;\n    t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n    _i = s0 - t0;\n    bvirt = s0 - _i;\n    ab[0] = s0 - (_i + bvirt) + (bvirt - t0);\n    _j = s1 + _i;\n    bvirt = _j - s1;\n    _0 = s1 - (_j - bvirt) + (_i - bvirt);\n    _i = _0 - t1;\n    bvirt = _0 - _i;\n    ab[1] = _0 - (_i + bvirt) + (bvirt - t1);\n    u3 = _j + _i;\n    bvirt = u3 - _j;\n    ab[2] = _j - (u3 - bvirt) + (_i - bvirt);\n    ab[3] = u3;\n    s1 = bx * cy;\n    c = _util_js__WEBPACK_IMPORTED_MODULE_0__[\"splitter\"] * bx;\n    ahi = c - (c - bx);\n    alo = bx - ahi;\n    c = _util_js__WEBPACK_IMPORTED_MODULE_0__[\"splitter\"] * cy;\n    bhi = c - (c - cy);\n    blo = cy - bhi;\n    s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n    t1 = cx * by;\n    c = _util_js__WEBPACK_IMPORTED_MODULE_0__[\"splitter\"] * cx;\n    ahi = c - (c - cx);\n    alo = cx - ahi;\n    c = _util_js__WEBPACK_IMPORTED_MODULE_0__[\"splitter\"] * by;\n    bhi = c - (c - by);\n    blo = by - bhi;\n    t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n    _i = s0 - t0;\n    bvirt = s0 - _i;\n    bc[0] = s0 - (_i + bvirt) + (bvirt - t0);\n    _j = s1 + _i;\n    bvirt = _j - s1;\n    _0 = s1 - (_j - bvirt) + (_i - bvirt);\n    _i = _0 - t1;\n    bvirt = _0 - _i;\n    bc[1] = _0 - (_i + bvirt) + (bvirt - t1);\n    u3 = _j + _i;\n    bvirt = u3 - _j;\n    bc[2] = _j - (u3 - bvirt) + (_i - bvirt);\n    bc[3] = u3;\n    s1 = cx * dy;\n    c = _util_js__WEBPACK_IMPORTED_MODULE_0__[\"splitter\"] * cx;\n    ahi = c - (c - cx);\n    alo = cx - ahi;\n    c = _util_js__WEBPACK_IMPORTED_MODULE_0__[\"splitter\"] * dy;\n    bhi = c - (c - dy);\n    blo = dy - bhi;\n    s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n    t1 = dx * cy;\n    c = _util_js__WEBPACK_IMPORTED_MODULE_0__[\"splitter\"] * dx;\n    ahi = c - (c - dx);\n    alo = dx - ahi;\n    c = _util_js__WEBPACK_IMPORTED_MODULE_0__[\"splitter\"] * cy;\n    bhi = c - (c - cy);\n    blo = cy - bhi;\n    t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n    _i = s0 - t0;\n    bvirt = s0 - _i;\n    cd[0] = s0 - (_i + bvirt) + (bvirt - t0);\n    _j = s1 + _i;\n    bvirt = _j - s1;\n    _0 = s1 - (_j - bvirt) + (_i - bvirt);\n    _i = _0 - t1;\n    bvirt = _0 - _i;\n    cd[1] = _0 - (_i + bvirt) + (bvirt - t1);\n    u3 = _j + _i;\n    bvirt = u3 - _j;\n    cd[2] = _j - (u3 - bvirt) + (_i - bvirt);\n    cd[3] = u3;\n    s1 = dx * ey;\n    c = _util_js__WEBPACK_IMPORTED_MODULE_0__[\"splitter\"] * dx;\n    ahi = c - (c - dx);\n    alo = dx - ahi;\n    c = _util_js__WEBPACK_IMPORTED_MODULE_0__[\"splitter\"] * ey;\n    bhi = c - (c - ey);\n    blo = ey - bhi;\n    s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n    t1 = ex * dy;\n    c = _util_js__WEBPACK_IMPORTED_MODULE_0__[\"splitter\"] * ex;\n    ahi = c - (c - ex);\n    alo = ex - ahi;\n    c = _util_js__WEBPACK_IMPORTED_MODULE_0__[\"splitter\"] * dy;\n    bhi = c - (c - dy);\n    blo = dy - bhi;\n    t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n    _i = s0 - t0;\n    bvirt = s0 - _i;\n    de[0] = s0 - (_i + bvirt) + (bvirt - t0);\n    _j = s1 + _i;\n    bvirt = _j - s1;\n    _0 = s1 - (_j - bvirt) + (_i - bvirt);\n    _i = _0 - t1;\n    bvirt = _0 - _i;\n    de[1] = _0 - (_i + bvirt) + (bvirt - t1);\n    u3 = _j + _i;\n    bvirt = u3 - _j;\n    de[2] = _j - (u3 - bvirt) + (_i - bvirt);\n    de[3] = u3;\n    s1 = ex * ay;\n    c = _util_js__WEBPACK_IMPORTED_MODULE_0__[\"splitter\"] * ex;\n    ahi = c - (c - ex);\n    alo = ex - ahi;\n    c = _util_js__WEBPACK_IMPORTED_MODULE_0__[\"splitter\"] * ay;\n    bhi = c - (c - ay);\n    blo = ay - bhi;\n    s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n    t1 = ax * ey;\n    c = _util_js__WEBPACK_IMPORTED_MODULE_0__[\"splitter\"] * ax;\n    ahi = c - (c - ax);\n    alo = ax - ahi;\n    c = _util_js__WEBPACK_IMPORTED_MODULE_0__[\"splitter\"] * ey;\n    bhi = c - (c - ey);\n    blo = ey - bhi;\n    t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n    _i = s0 - t0;\n    bvirt = s0 - _i;\n    ea[0] = s0 - (_i + bvirt) + (bvirt - t0);\n    _j = s1 + _i;\n    bvirt = _j - s1;\n    _0 = s1 - (_j - bvirt) + (_i - bvirt);\n    _i = _0 - t1;\n    bvirt = _0 - _i;\n    ea[1] = _0 - (_i + bvirt) + (bvirt - t1);\n    u3 = _j + _i;\n    bvirt = u3 - _j;\n    ea[2] = _j - (u3 - bvirt) + (_i - bvirt);\n    ea[3] = u3;\n    s1 = ax * cy;\n    c = _util_js__WEBPACK_IMPORTED_MODULE_0__[\"splitter\"] * ax;\n    ahi = c - (c - ax);\n    alo = ax - ahi;\n    c = _util_js__WEBPACK_IMPORTED_MODULE_0__[\"splitter\"] * cy;\n    bhi = c - (c - cy);\n    blo = cy - bhi;\n    s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n    t1 = cx * ay;\n    c = _util_js__WEBPACK_IMPORTED_MODULE_0__[\"splitter\"] * cx;\n    ahi = c - (c - cx);\n    alo = cx - ahi;\n    c = _util_js__WEBPACK_IMPORTED_MODULE_0__[\"splitter\"] * ay;\n    bhi = c - (c - ay);\n    blo = ay - bhi;\n    t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n    _i = s0 - t0;\n    bvirt = s0 - _i;\n    ac[0] = s0 - (_i + bvirt) + (bvirt - t0);\n    _j = s1 + _i;\n    bvirt = _j - s1;\n    _0 = s1 - (_j - bvirt) + (_i - bvirt);\n    _i = _0 - t1;\n    bvirt = _0 - _i;\n    ac[1] = _0 - (_i + bvirt) + (bvirt - t1);\n    u3 = _j + _i;\n    bvirt = u3 - _j;\n    ac[2] = _j - (u3 - bvirt) + (_i - bvirt);\n    ac[3] = u3;\n    s1 = bx * dy;\n    c = _util_js__WEBPACK_IMPORTED_MODULE_0__[\"splitter\"] * bx;\n    ahi = c - (c - bx);\n    alo = bx - ahi;\n    c = _util_js__WEBPACK_IMPORTED_MODULE_0__[\"splitter\"] * dy;\n    bhi = c - (c - dy);\n    blo = dy - bhi;\n    s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n    t1 = dx * by;\n    c = _util_js__WEBPACK_IMPORTED_MODULE_0__[\"splitter\"] * dx;\n    ahi = c - (c - dx);\n    alo = dx - ahi;\n    c = _util_js__WEBPACK_IMPORTED_MODULE_0__[\"splitter\"] * by;\n    bhi = c - (c - by);\n    blo = by - bhi;\n    t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n    _i = s0 - t0;\n    bvirt = s0 - _i;\n    bd[0] = s0 - (_i + bvirt) + (bvirt - t0);\n    _j = s1 + _i;\n    bvirt = _j - s1;\n    _0 = s1 - (_j - bvirt) + (_i - bvirt);\n    _i = _0 - t1;\n    bvirt = _0 - _i;\n    bd[1] = _0 - (_i + bvirt) + (bvirt - t1);\n    u3 = _j + _i;\n    bvirt = u3 - _j;\n    bd[2] = _j - (u3 - bvirt) + (_i - bvirt);\n    bd[3] = u3;\n    s1 = cx * ey;\n    c = _util_js__WEBPACK_IMPORTED_MODULE_0__[\"splitter\"] * cx;\n    ahi = c - (c - cx);\n    alo = cx - ahi;\n    c = _util_js__WEBPACK_IMPORTED_MODULE_0__[\"splitter\"] * ey;\n    bhi = c - (c - ey);\n    blo = ey - bhi;\n    s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n    t1 = ex * cy;\n    c = _util_js__WEBPACK_IMPORTED_MODULE_0__[\"splitter\"] * ex;\n    ahi = c - (c - ex);\n    alo = ex - ahi;\n    c = _util_js__WEBPACK_IMPORTED_MODULE_0__[\"splitter\"] * cy;\n    bhi = c - (c - cy);\n    blo = cy - bhi;\n    t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n    _i = s0 - t0;\n    bvirt = s0 - _i;\n    ce[0] = s0 - (_i + bvirt) + (bvirt - t0);\n    _j = s1 + _i;\n    bvirt = _j - s1;\n    _0 = s1 - (_j - bvirt) + (_i - bvirt);\n    _i = _0 - t1;\n    bvirt = _0 - _i;\n    ce[1] = _0 - (_i + bvirt) + (bvirt - t1);\n    u3 = _j + _i;\n    bvirt = u3 - _j;\n    ce[2] = _j - (u3 - bvirt) + (_i - bvirt);\n    ce[3] = u3;\n    s1 = dx * ay;\n    c = _util_js__WEBPACK_IMPORTED_MODULE_0__[\"splitter\"] * dx;\n    ahi = c - (c - dx);\n    alo = dx - ahi;\n    c = _util_js__WEBPACK_IMPORTED_MODULE_0__[\"splitter\"] * ay;\n    bhi = c - (c - ay);\n    blo = ay - bhi;\n    s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n    t1 = ax * dy;\n    c = _util_js__WEBPACK_IMPORTED_MODULE_0__[\"splitter\"] * ax;\n    ahi = c - (c - ax);\n    alo = ax - ahi;\n    c = _util_js__WEBPACK_IMPORTED_MODULE_0__[\"splitter\"] * dy;\n    bhi = c - (c - dy);\n    blo = dy - bhi;\n    t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n    _i = s0 - t0;\n    bvirt = s0 - _i;\n    da[0] = s0 - (_i + bvirt) + (bvirt - t0);\n    _j = s1 + _i;\n    bvirt = _j - s1;\n    _0 = s1 - (_j - bvirt) + (_i - bvirt);\n    _i = _0 - t1;\n    bvirt = _0 - _i;\n    da[1] = _0 - (_i + bvirt) + (bvirt - t1);\n    u3 = _j + _i;\n    bvirt = u3 - _j;\n    da[2] = _j - (u3 - bvirt) + (_i - bvirt);\n    da[3] = u3;\n    s1 = ex * by;\n    c = _util_js__WEBPACK_IMPORTED_MODULE_0__[\"splitter\"] * ex;\n    ahi = c - (c - ex);\n    alo = ex - ahi;\n    c = _util_js__WEBPACK_IMPORTED_MODULE_0__[\"splitter\"] * by;\n    bhi = c - (c - by);\n    blo = by - bhi;\n    s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n    t1 = bx * ey;\n    c = _util_js__WEBPACK_IMPORTED_MODULE_0__[\"splitter\"] * bx;\n    ahi = c - (c - bx);\n    alo = bx - ahi;\n    c = _util_js__WEBPACK_IMPORTED_MODULE_0__[\"splitter\"] * ey;\n    bhi = c - (c - ey);\n    blo = ey - bhi;\n    t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n    _i = s0 - t0;\n    bvirt = s0 - _i;\n    eb[0] = s0 - (_i + bvirt) + (bvirt - t0);\n    _j = s1 + _i;\n    bvirt = _j - s1;\n    _0 = s1 - (_j - bvirt) + (_i - bvirt);\n    _i = _0 - t1;\n    bvirt = _0 - _i;\n    eb[1] = _0 - (_i + bvirt) + (bvirt - t1);\n    u3 = _j + _i;\n    bvirt = u3 - _j;\n    eb[2] = _j - (u3 - bvirt) + (_i - bvirt);\n    eb[3] = u3;\n\n    const abclen = sum_three_scale(ab, bc, ac, cz, az, -bz, abc);\n    const bcdlen = sum_three_scale(bc, cd, bd, dz, bz, -cz, bcd);\n    const cdelen = sum_three_scale(cd, de, ce, ez, cz, -dz, cde);\n    const dealen = sum_three_scale(de, ea, da, az, dz, -ez, dea);\n    const eablen = sum_three_scale(ea, ab, eb, bz, ez, -az, eab);\n    const abdlen = sum_three_scale(ab, bd, da, dz, az, bz, abd);\n    const bcelen = sum_three_scale(bc, ce, eb, ez, bz, cz, bce);\n    const cdalen = sum_three_scale(cd, da, ac, az, cz, dz, cda);\n    const deblen = sum_three_scale(de, eb, bd, bz, dz, ez, deb);\n    const eaclen = sum_three_scale(ea, ac, ce, cz, ez, az, eac);\n\n    const deterlen = Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"sum_three\"])(\n        liftexact(cdelen, cde, bcelen, bce, deblen, deb, bcdlen, bcd, ax, ay, az, adet), adet,\n        liftexact(dealen, dea, cdalen, cda, eaclen, eac, cdelen, cde, bx, by, bz, bdet), bdet,\n        Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"sum_three\"])(\n            liftexact(eablen, eab, deblen, deb, abdlen, abd, dealen, dea, cx, cy, cz, cdet), cdet,\n            liftexact(abclen, abc, eaclen, eac, bcelen, bce, eablen, eab, dx, dy, dz, ddet), ddet,\n            liftexact(bcdlen, bcd, abdlen, abd, cdalen, cda, abclen, abc, ex, ey, ez, edet), edet, cddet, cdedet), cdedet, abdet, deter);\n\n    return deter[deterlen - 1];\n}\n\nconst xdet = Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"vec\"])(96);\nconst ydet = Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"vec\"])(96);\nconst zdet = Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"vec\"])(96);\nconst fin = Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"vec\"])(1152);\n\nfunction liftadapt(a, b, c, az, bz, cz, x, y, z, out) {\n    const len = sum_three_scale(a, b, c, az, bz, cz, _24);\n    return Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"sum_three\"])(\n        Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"scale\"])(Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"scale\"])(len, _24, x, _48), _48, x, xdet), xdet,\n        Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"scale\"])(Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"scale\"])(len, _24, y, _48), _48, y, ydet), ydet,\n        Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"scale\"])(Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"scale\"])(len, _24, z, _48), _48, z, zdet), zdet, _192, out);\n}\n\nfunction insphereadapt(ax, ay, az, bx, by, bz, cx, cy, cz, dx, dy, dz, ex, ey, ez, permanent) {\n    let ab3, bc3, cd3, da3, ac3, bd3;\n\n    let aextail, bextail, cextail, dextail;\n    let aeytail, beytail, ceytail, deytail;\n    let aeztail, beztail, ceztail, deztail;\n\n    let bvirt, c, ahi, alo, bhi, blo, _i, _j, _0, s1, s0, t1, t0;\n\n    const aex = ax - ex;\n    const bex = bx - ex;\n    const cex = cx - ex;\n    const dex = dx - ex;\n    const aey = ay - ey;\n    const bey = by - ey;\n    const cey = cy - ey;\n    const dey = dy - ey;\n    const aez = az - ez;\n    const bez = bz - ez;\n    const cez = cz - ez;\n    const dez = dz - ez;\n\n    s1 = aex * bey;\n    c = _util_js__WEBPACK_IMPORTED_MODULE_0__[\"splitter\"] * aex;\n    ahi = c - (c - aex);\n    alo = aex - ahi;\n    c = _util_js__WEBPACK_IMPORTED_MODULE_0__[\"splitter\"] * bey;\n    bhi = c - (c - bey);\n    blo = bey - bhi;\n    s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n    t1 = bex * aey;\n    c = _util_js__WEBPACK_IMPORTED_MODULE_0__[\"splitter\"] * bex;\n    ahi = c - (c - bex);\n    alo = bex - ahi;\n    c = _util_js__WEBPACK_IMPORTED_MODULE_0__[\"splitter\"] * aey;\n    bhi = c - (c - aey);\n    blo = aey - bhi;\n    t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n    _i = s0 - t0;\n    bvirt = s0 - _i;\n    ab[0] = s0 - (_i + bvirt) + (bvirt - t0);\n    _j = s1 + _i;\n    bvirt = _j - s1;\n    _0 = s1 - (_j - bvirt) + (_i - bvirt);\n    _i = _0 - t1;\n    bvirt = _0 - _i;\n    ab[1] = _0 - (_i + bvirt) + (bvirt - t1);\n    ab3 = _j + _i;\n    bvirt = ab3 - _j;\n    ab[2] = _j - (ab3 - bvirt) + (_i - bvirt);\n    ab[3] = ab3;\n    s1 = bex * cey;\n    c = _util_js__WEBPACK_IMPORTED_MODULE_0__[\"splitter\"] * bex;\n    ahi = c - (c - bex);\n    alo = bex - ahi;\n    c = _util_js__WEBPACK_IMPORTED_MODULE_0__[\"splitter\"] * cey;\n    bhi = c - (c - cey);\n    blo = cey - bhi;\n    s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n    t1 = cex * bey;\n    c = _util_js__WEBPACK_IMPORTED_MODULE_0__[\"splitter\"] * cex;\n    ahi = c - (c - cex);\n    alo = cex - ahi;\n    c = _util_js__WEBPACK_IMPORTED_MODULE_0__[\"splitter\"] * bey;\n    bhi = c - (c - bey);\n    blo = bey - bhi;\n    t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n    _i = s0 - t0;\n    bvirt = s0 - _i;\n    bc[0] = s0 - (_i + bvirt) + (bvirt - t0);\n    _j = s1 + _i;\n    bvirt = _j - s1;\n    _0 = s1 - (_j - bvirt) + (_i - bvirt);\n    _i = _0 - t1;\n    bvirt = _0 - _i;\n    bc[1] = _0 - (_i + bvirt) + (bvirt - t1);\n    bc3 = _j + _i;\n    bvirt = bc3 - _j;\n    bc[2] = _j - (bc3 - bvirt) + (_i - bvirt);\n    bc[3] = bc3;\n    s1 = cex * dey;\n    c = _util_js__WEBPACK_IMPORTED_MODULE_0__[\"splitter\"] * cex;\n    ahi = c - (c - cex);\n    alo = cex - ahi;\n    c = _util_js__WEBPACK_IMPORTED_MODULE_0__[\"splitter\"] * dey;\n    bhi = c - (c - dey);\n    blo = dey - bhi;\n    s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n    t1 = dex * cey;\n    c = _util_js__WEBPACK_IMPORTED_MODULE_0__[\"splitter\"] * dex;\n    ahi = c - (c - dex);\n    alo = dex - ahi;\n    c = _util_js__WEBPACK_IMPORTED_MODULE_0__[\"splitter\"] * cey;\n    bhi = c - (c - cey);\n    blo = cey - bhi;\n    t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n    _i = s0 - t0;\n    bvirt = s0 - _i;\n    cd[0] = s0 - (_i + bvirt) + (bvirt - t0);\n    _j = s1 + _i;\n    bvirt = _j - s1;\n    _0 = s1 - (_j - bvirt) + (_i - bvirt);\n    _i = _0 - t1;\n    bvirt = _0 - _i;\n    cd[1] = _0 - (_i + bvirt) + (bvirt - t1);\n    cd3 = _j + _i;\n    bvirt = cd3 - _j;\n    cd[2] = _j - (cd3 - bvirt) + (_i - bvirt);\n    cd[3] = cd3;\n    s1 = dex * aey;\n    c = _util_js__WEBPACK_IMPORTED_MODULE_0__[\"splitter\"] * dex;\n    ahi = c - (c - dex);\n    alo = dex - ahi;\n    c = _util_js__WEBPACK_IMPORTED_MODULE_0__[\"splitter\"] * aey;\n    bhi = c - (c - aey);\n    blo = aey - bhi;\n    s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n    t1 = aex * dey;\n    c = _util_js__WEBPACK_IMPORTED_MODULE_0__[\"splitter\"] * aex;\n    ahi = c - (c - aex);\n    alo = aex - ahi;\n    c = _util_js__WEBPACK_IMPORTED_MODULE_0__[\"splitter\"] * dey;\n    bhi = c - (c - dey);\n    blo = dey - bhi;\n    t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n    _i = s0 - t0;\n    bvirt = s0 - _i;\n    da[0] = s0 - (_i + bvirt) + (bvirt - t0);\n    _j = s1 + _i;\n    bvirt = _j - s1;\n    _0 = s1 - (_j - bvirt) + (_i - bvirt);\n    _i = _0 - t1;\n    bvirt = _0 - _i;\n    da[1] = _0 - (_i + bvirt) + (bvirt - t1);\n    da3 = _j + _i;\n    bvirt = da3 - _j;\n    da[2] = _j - (da3 - bvirt) + (_i - bvirt);\n    da[3] = da3;\n    s1 = aex * cey;\n    c = _util_js__WEBPACK_IMPORTED_MODULE_0__[\"splitter\"] * aex;\n    ahi = c - (c - aex);\n    alo = aex - ahi;\n    c = _util_js__WEBPACK_IMPORTED_MODULE_0__[\"splitter\"] * cey;\n    bhi = c - (c - cey);\n    blo = cey - bhi;\n    s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n    t1 = cex * aey;\n    c = _util_js__WEBPACK_IMPORTED_MODULE_0__[\"splitter\"] * cex;\n    ahi = c - (c - cex);\n    alo = cex - ahi;\n    c = _util_js__WEBPACK_IMPORTED_MODULE_0__[\"splitter\"] * aey;\n    bhi = c - (c - aey);\n    blo = aey - bhi;\n    t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n    _i = s0 - t0;\n    bvirt = s0 - _i;\n    ac[0] = s0 - (_i + bvirt) + (bvirt - t0);\n    _j = s1 + _i;\n    bvirt = _j - s1;\n    _0 = s1 - (_j - bvirt) + (_i - bvirt);\n    _i = _0 - t1;\n    bvirt = _0 - _i;\n    ac[1] = _0 - (_i + bvirt) + (bvirt - t1);\n    ac3 = _j + _i;\n    bvirt = ac3 - _j;\n    ac[2] = _j - (ac3 - bvirt) + (_i - bvirt);\n    ac[3] = ac3;\n    s1 = bex * dey;\n    c = _util_js__WEBPACK_IMPORTED_MODULE_0__[\"splitter\"] * bex;\n    ahi = c - (c - bex);\n    alo = bex - ahi;\n    c = _util_js__WEBPACK_IMPORTED_MODULE_0__[\"splitter\"] * dey;\n    bhi = c - (c - dey);\n    blo = dey - bhi;\n    s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n    t1 = dex * bey;\n    c = _util_js__WEBPACK_IMPORTED_MODULE_0__[\"splitter\"] * dex;\n    ahi = c - (c - dex);\n    alo = dex - ahi;\n    c = _util_js__WEBPACK_IMPORTED_MODULE_0__[\"splitter\"] * bey;\n    bhi = c - (c - bey);\n    blo = bey - bhi;\n    t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n    _i = s0 - t0;\n    bvirt = s0 - _i;\n    bd[0] = s0 - (_i + bvirt) + (bvirt - t0);\n    _j = s1 + _i;\n    bvirt = _j - s1;\n    _0 = s1 - (_j - bvirt) + (_i - bvirt);\n    _i = _0 - t1;\n    bvirt = _0 - _i;\n    bd[1] = _0 - (_i + bvirt) + (bvirt - t1);\n    bd3 = _j + _i;\n    bvirt = bd3 - _j;\n    bd[2] = _j - (bd3 - bvirt) + (_i - bvirt);\n    bd[3] = bd3;\n\n    const finlen = Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"sum\"])(\n        Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"sum\"])(\n            Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"negate\"])(liftadapt(bc, cd, bd, dez, bez, -cez, aex, aey, aez, adet), adet), adet,\n            liftadapt(cd, da, ac, aez, cez, dez, bex, bey, bez, bdet), bdet, abdet), abdet,\n        Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"sum\"])(\n            Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"negate\"])(liftadapt(da, ab, bd, bez, dez, aez, cex, cey, cez, cdet), cdet), cdet,\n            liftadapt(ab, bc, ac, cez, aez, -bez, dex, dey, dez, ddet), ddet, cddet), cddet, fin);\n\n    let det = Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"estimate\"])(finlen, fin);\n    let errbound = isperrboundB * permanent;\n    if (det >= errbound || -det >= errbound) {\n        return det;\n    }\n\n    bvirt = ax - aex;\n    aextail = ax - (aex + bvirt) + (bvirt - ex);\n    bvirt = ay - aey;\n    aeytail = ay - (aey + bvirt) + (bvirt - ey);\n    bvirt = az - aez;\n    aeztail = az - (aez + bvirt) + (bvirt - ez);\n    bvirt = bx - bex;\n    bextail = bx - (bex + bvirt) + (bvirt - ex);\n    bvirt = by - bey;\n    beytail = by - (bey + bvirt) + (bvirt - ey);\n    bvirt = bz - bez;\n    beztail = bz - (bez + bvirt) + (bvirt - ez);\n    bvirt = cx - cex;\n    cextail = cx - (cex + bvirt) + (bvirt - ex);\n    bvirt = cy - cey;\n    ceytail = cy - (cey + bvirt) + (bvirt - ey);\n    bvirt = cz - cez;\n    ceztail = cz - (cez + bvirt) + (bvirt - ez);\n    bvirt = dx - dex;\n    dextail = dx - (dex + bvirt) + (bvirt - ex);\n    bvirt = dy - dey;\n    deytail = dy - (dey + bvirt) + (bvirt - ey);\n    bvirt = dz - dez;\n    deztail = dz - (dez + bvirt) + (bvirt - ez);\n    if (aextail === 0 && aeytail === 0 && aeztail === 0 &&\n        bextail === 0 && beytail === 0 && beztail === 0 &&\n        cextail === 0 && ceytail === 0 && ceztail === 0 &&\n        dextail === 0 && deytail === 0 && deztail === 0) {\n        return det;\n    }\n\n    errbound = isperrboundC * permanent + _util_js__WEBPACK_IMPORTED_MODULE_0__[\"resulterrbound\"] * Math.abs(det);\n\n    const abeps = (aex * beytail + bey * aextail) - (aey * bextail + bex * aeytail);\n    const bceps = (bex * ceytail + cey * bextail) - (bey * cextail + cex * beytail);\n    const cdeps = (cex * deytail + dey * cextail) - (cey * dextail + dex * ceytail);\n    const daeps = (dex * aeytail + aey * dextail) - (dey * aextail + aex * deytail);\n    const aceps = (aex * ceytail + cey * aextail) - (aey * cextail + cex * aeytail);\n    const bdeps = (bex * deytail + dey * bextail) - (bey * dextail + dex * beytail);\n    det +=\n        (((bex * bex + bey * bey + bez * bez) * ((cez * daeps + dez * aceps + aez * cdeps) +\n        (ceztail * da3 + deztail * ac3 + aeztail * cd3)) + (dex * dex + dey * dey + dez * dez) *\n        ((aez * bceps - bez * aceps + cez * abeps) + (aeztail * bc3 - beztail * ac3 + ceztail * ab3))) -\n        ((aex * aex + aey * aey + aez * aez) * ((bez * cdeps - cez * bdeps + dez * bceps) +\n        (beztail * cd3 - ceztail * bd3 + deztail * bc3)) + (cex * cex + cey * cey + cez * cez) *\n        ((dez * abeps + aez * bdeps + bez * daeps) + (deztail * ab3 + aeztail * bd3 + beztail * da3)))) +\n        2 * (((bex * bextail + bey * beytail + bez * beztail) * (cez * da3 + dez * ac3 + aez * cd3) +\n        (dex * dextail + dey * deytail + dez * deztail) * (aez * bc3 - bez * ac3 + cez * ab3)) -\n        ((aex * aextail + aey * aeytail + aez * aeztail) * (bez * cd3 - cez * bd3 + dez * bc3) +\n        (cex * cextail + cey * ceytail + cez * ceztail) * (dez * ab3 + aez * bd3 + bez * da3)));\n\n    if (det >= errbound || -det >= errbound) {\n        return det;\n    }\n\n    return insphereexact(ax, ay, az, bx, by, bz, cx, cy, cz, dx, dy, dz, ex, ey, ez);\n}\n\nfunction insphere(ax, ay, az, bx, by, bz, cx, cy, cz, dx, dy, dz, ex, ey, ez) {\n    const aex = ax - ex;\n    const bex = bx - ex;\n    const cex = cx - ex;\n    const dex = dx - ex;\n    const aey = ay - ey;\n    const bey = by - ey;\n    const cey = cy - ey;\n    const dey = dy - ey;\n    const aez = az - ez;\n    const bez = bz - ez;\n    const cez = cz - ez;\n    const dez = dz - ez;\n\n    const aexbey = aex * bey;\n    const bexaey = bex * aey;\n    const ab = aexbey - bexaey;\n    const bexcey = bex * cey;\n    const cexbey = cex * bey;\n    const bc = bexcey - cexbey;\n    const cexdey = cex * dey;\n    const dexcey = dex * cey;\n    const cd = cexdey - dexcey;\n    const dexaey = dex * aey;\n    const aexdey = aex * dey;\n    const da = dexaey - aexdey;\n    const aexcey = aex * cey;\n    const cexaey = cex * aey;\n    const ac = aexcey - cexaey;\n    const bexdey = bex * dey;\n    const dexbey = dex * bey;\n    const bd = bexdey - dexbey;\n\n    const abc = aez * bc - bez * ac + cez * ab;\n    const bcd = bez * cd - cez * bd + dez * bc;\n    const cda = cez * da + dez * ac + aez * cd;\n    const dab = dez * ab + aez * bd + bez * da;\n\n    const alift = aex * aex + aey * aey + aez * aez;\n    const blift = bex * bex + bey * bey + bez * bez;\n    const clift = cex * cex + cey * cey + cez * cez;\n    const dlift = dex * dex + dey * dey + dez * dez;\n\n    const det = (clift * dab - dlift * abc) + (alift * bcd - blift * cda);\n\n    const aezplus = Math.abs(aez);\n    const bezplus = Math.abs(bez);\n    const cezplus = Math.abs(cez);\n    const dezplus = Math.abs(dez);\n    const aexbeyplus = Math.abs(aexbey);\n    const bexaeyplus = Math.abs(bexaey);\n    const bexceyplus = Math.abs(bexcey);\n    const cexbeyplus = Math.abs(cexbey);\n    const cexdeyplus = Math.abs(cexdey);\n    const dexceyplus = Math.abs(dexcey);\n    const dexaeyplus = Math.abs(dexaey);\n    const aexdeyplus = Math.abs(aexdey);\n    const aexceyplus = Math.abs(aexcey);\n    const cexaeyplus = Math.abs(cexaey);\n    const bexdeyplus = Math.abs(bexdey);\n    const dexbeyplus = Math.abs(dexbey);\n    const permanent =\n        ((cexdeyplus + dexceyplus) * bezplus + (dexbeyplus + bexdeyplus) * cezplus + (bexceyplus + cexbeyplus) * dezplus) * alift +\n        ((dexaeyplus + aexdeyplus) * cezplus + (aexceyplus + cexaeyplus) * dezplus + (cexdeyplus + dexceyplus) * aezplus) * blift +\n        ((aexbeyplus + bexaeyplus) * dezplus + (bexdeyplus + dexbeyplus) * aezplus + (dexaeyplus + aexdeyplus) * bezplus) * clift +\n        ((bexceyplus + cexbeyplus) * aezplus + (cexaeyplus + aexceyplus) * bezplus + (aexbeyplus + bexaeyplus) * cezplus) * dlift;\n\n    const errbound = isperrboundA * permanent;\n    if (det > errbound || -det > errbound) {\n        return det;\n    }\n    return -insphereadapt(ax, ay, az, bx, by, bz, cx, cy, cz, dx, dy, dz, ex, ey, ez, permanent);\n}\n\nfunction inspherefast(pax, pay, paz, pbx, pby, pbz, pcx, pcy, pcz, pdx, pdy, pdz, pex, pey, pez) {\n    const aex = pax - pex;\n    const bex = pbx - pex;\n    const cex = pcx - pex;\n    const dex = pdx - pex;\n    const aey = pay - pey;\n    const bey = pby - pey;\n    const cey = pcy - pey;\n    const dey = pdy - pey;\n    const aez = paz - pez;\n    const bez = pbz - pez;\n    const cez = pcz - pez;\n    const dez = pdz - pez;\n\n    const ab = aex * bey - bex * aey;\n    const bc = bex * cey - cex * bey;\n    const cd = cex * dey - dex * cey;\n    const da = dex * aey - aex * dey;\n    const ac = aex * cey - cex * aey;\n    const bd = bex * dey - dex * bey;\n\n    const abc = aez * bc - bez * ac + cez * ab;\n    const bcd = bez * cd - cez * bd + dez * bc;\n    const cda = cez * da + dez * ac + aez * cd;\n    const dab = dez * ab + aez * bd + bez * da;\n\n    const alift = aex * aex + aey * aey + aez * aez;\n    const blift = bex * bex + bey * bey + bez * bez;\n    const clift = cex * cex + cey * cey + cez * cez;\n    const dlift = dex * dex + dey * dey + dez * dez;\n\n    return (clift * dab - dlift * abc) + (alift * bcd - blift * cda);\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/robust-predicates/esm/orient2d.js\":\n/*!********************************************************!*\\\n  !*** ./node_modules/robust-predicates/esm/orient2d.js ***!\n  \\********************************************************/\n/*! exports provided: orient2d, orient2dfast */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"orient2d\", function() { return orient2d; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"orient2dfast\", function() { return orient2dfast; });\n/* harmony import */ var _util_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./util.js */ \"./node_modules/robust-predicates/esm/util.js\");\n\n\nconst ccwerrboundA = (3 + 16 * _util_js__WEBPACK_IMPORTED_MODULE_0__[\"epsilon\"]) * _util_js__WEBPACK_IMPORTED_MODULE_0__[\"epsilon\"];\nconst ccwerrboundB = (2 + 12 * _util_js__WEBPACK_IMPORTED_MODULE_0__[\"epsilon\"]) * _util_js__WEBPACK_IMPORTED_MODULE_0__[\"epsilon\"];\nconst ccwerrboundC = (9 + 64 * _util_js__WEBPACK_IMPORTED_MODULE_0__[\"epsilon\"]) * _util_js__WEBPACK_IMPORTED_MODULE_0__[\"epsilon\"] * _util_js__WEBPACK_IMPORTED_MODULE_0__[\"epsilon\"];\n\nconst B = Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"vec\"])(4);\nconst C1 = Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"vec\"])(8);\nconst C2 = Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"vec\"])(12);\nconst D = Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"vec\"])(16);\nconst u = Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"vec\"])(4);\n\nfunction orient2dadapt(ax, ay, bx, by, cx, cy, detsum) {\n    let acxtail, acytail, bcxtail, bcytail;\n    let bvirt, c, ahi, alo, bhi, blo, _i, _j, _0, s1, s0, t1, t0, u3;\n\n    const acx = ax - cx;\n    const bcx = bx - cx;\n    const acy = ay - cy;\n    const bcy = by - cy;\n\n    s1 = acx * bcy;\n    c = _util_js__WEBPACK_IMPORTED_MODULE_0__[\"splitter\"] * acx;\n    ahi = c - (c - acx);\n    alo = acx - ahi;\n    c = _util_js__WEBPACK_IMPORTED_MODULE_0__[\"splitter\"] * bcy;\n    bhi = c - (c - bcy);\n    blo = bcy - bhi;\n    s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n    t1 = acy * bcx;\n    c = _util_js__WEBPACK_IMPORTED_MODULE_0__[\"splitter\"] * acy;\n    ahi = c - (c - acy);\n    alo = acy - ahi;\n    c = _util_js__WEBPACK_IMPORTED_MODULE_0__[\"splitter\"] * bcx;\n    bhi = c - (c - bcx);\n    blo = bcx - bhi;\n    t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n    _i = s0 - t0;\n    bvirt = s0 - _i;\n    B[0] = s0 - (_i + bvirt) + (bvirt - t0);\n    _j = s1 + _i;\n    bvirt = _j - s1;\n    _0 = s1 - (_j - bvirt) + (_i - bvirt);\n    _i = _0 - t1;\n    bvirt = _0 - _i;\n    B[1] = _0 - (_i + bvirt) + (bvirt - t1);\n    u3 = _j + _i;\n    bvirt = u3 - _j;\n    B[2] = _j - (u3 - bvirt) + (_i - bvirt);\n    B[3] = u3;\n\n    let det = Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"estimate\"])(4, B);\n    let errbound = ccwerrboundB * detsum;\n    if (det >= errbound || -det >= errbound) {\n        return det;\n    }\n\n    bvirt = ax - acx;\n    acxtail = ax - (acx + bvirt) + (bvirt - cx);\n    bvirt = bx - bcx;\n    bcxtail = bx - (bcx + bvirt) + (bvirt - cx);\n    bvirt = ay - acy;\n    acytail = ay - (acy + bvirt) + (bvirt - cy);\n    bvirt = by - bcy;\n    bcytail = by - (bcy + bvirt) + (bvirt - cy);\n\n    if (acxtail === 0 && acytail === 0 && bcxtail === 0 && bcytail === 0) {\n        return det;\n    }\n\n    errbound = ccwerrboundC * detsum + _util_js__WEBPACK_IMPORTED_MODULE_0__[\"resulterrbound\"] * Math.abs(det);\n    det += (acx * bcytail + bcy * acxtail) - (acy * bcxtail + bcx * acytail);\n    if (det >= errbound || -det >= errbound) return det;\n\n    s1 = acxtail * bcy;\n    c = _util_js__WEBPACK_IMPORTED_MODULE_0__[\"splitter\"] * acxtail;\n    ahi = c - (c - acxtail);\n    alo = acxtail - ahi;\n    c = _util_js__WEBPACK_IMPORTED_MODULE_0__[\"splitter\"] * bcy;\n    bhi = c - (c - bcy);\n    blo = bcy - bhi;\n    s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n    t1 = acytail * bcx;\n    c = _util_js__WEBPACK_IMPORTED_MODULE_0__[\"splitter\"] * acytail;\n    ahi = c - (c - acytail);\n    alo = acytail - ahi;\n    c = _util_js__WEBPACK_IMPORTED_MODULE_0__[\"splitter\"] * bcx;\n    bhi = c - (c - bcx);\n    blo = bcx - bhi;\n    t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n    _i = s0 - t0;\n    bvirt = s0 - _i;\n    u[0] = s0 - (_i + bvirt) + (bvirt - t0);\n    _j = s1 + _i;\n    bvirt = _j - s1;\n    _0 = s1 - (_j - bvirt) + (_i - bvirt);\n    _i = _0 - t1;\n    bvirt = _0 - _i;\n    u[1] = _0 - (_i + bvirt) + (bvirt - t1);\n    u3 = _j + _i;\n    bvirt = u3 - _j;\n    u[2] = _j - (u3 - bvirt) + (_i - bvirt);\n    u[3] = u3;\n    const C1len = Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"sum\"])(4, B, 4, u, C1);\n\n    s1 = acx * bcytail;\n    c = _util_js__WEBPACK_IMPORTED_MODULE_0__[\"splitter\"] * acx;\n    ahi = c - (c - acx);\n    alo = acx - ahi;\n    c = _util_js__WEBPACK_IMPORTED_MODULE_0__[\"splitter\"] * bcytail;\n    bhi = c - (c - bcytail);\n    blo = bcytail - bhi;\n    s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n    t1 = acy * bcxtail;\n    c = _util_js__WEBPACK_IMPORTED_MODULE_0__[\"splitter\"] * acy;\n    ahi = c - (c - acy);\n    alo = acy - ahi;\n    c = _util_js__WEBPACK_IMPORTED_MODULE_0__[\"splitter\"] * bcxtail;\n    bhi = c - (c - bcxtail);\n    blo = bcxtail - bhi;\n    t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n    _i = s0 - t0;\n    bvirt = s0 - _i;\n    u[0] = s0 - (_i + bvirt) + (bvirt - t0);\n    _j = s1 + _i;\n    bvirt = _j - s1;\n    _0 = s1 - (_j - bvirt) + (_i - bvirt);\n    _i = _0 - t1;\n    bvirt = _0 - _i;\n    u[1] = _0 - (_i + bvirt) + (bvirt - t1);\n    u3 = _j + _i;\n    bvirt = u3 - _j;\n    u[2] = _j - (u3 - bvirt) + (_i - bvirt);\n    u[3] = u3;\n    const C2len = Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"sum\"])(C1len, C1, 4, u, C2);\n\n    s1 = acxtail * bcytail;\n    c = _util_js__WEBPACK_IMPORTED_MODULE_0__[\"splitter\"] * acxtail;\n    ahi = c - (c - acxtail);\n    alo = acxtail - ahi;\n    c = _util_js__WEBPACK_IMPORTED_MODULE_0__[\"splitter\"] * bcytail;\n    bhi = c - (c - bcytail);\n    blo = bcytail - bhi;\n    s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n    t1 = acytail * bcxtail;\n    c = _util_js__WEBPACK_IMPORTED_MODULE_0__[\"splitter\"] * acytail;\n    ahi = c - (c - acytail);\n    alo = acytail - ahi;\n    c = _util_js__WEBPACK_IMPORTED_MODULE_0__[\"splitter\"] * bcxtail;\n    bhi = c - (c - bcxtail);\n    blo = bcxtail - bhi;\n    t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n    _i = s0 - t0;\n    bvirt = s0 - _i;\n    u[0] = s0 - (_i + bvirt) + (bvirt - t0);\n    _j = s1 + _i;\n    bvirt = _j - s1;\n    _0 = s1 - (_j - bvirt) + (_i - bvirt);\n    _i = _0 - t1;\n    bvirt = _0 - _i;\n    u[1] = _0 - (_i + bvirt) + (bvirt - t1);\n    u3 = _j + _i;\n    bvirt = u3 - _j;\n    u[2] = _j - (u3 - bvirt) + (_i - bvirt);\n    u[3] = u3;\n    const Dlen = Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"sum\"])(C2len, C2, 4, u, D);\n\n    return D[Dlen - 1];\n}\n\nfunction orient2d(ax, ay, bx, by, cx, cy) {\n    const detleft = (ay - cy) * (bx - cx);\n    const detright = (ax - cx) * (by - cy);\n    const det = detleft - detright;\n\n    if (detleft === 0 || detright === 0 || (detleft > 0) !== (detright > 0)) return det;\n\n    const detsum = Math.abs(detleft + detright);\n    if (Math.abs(det) >= ccwerrboundA * detsum) return det;\n\n    return -orient2dadapt(ax, ay, bx, by, cx, cy, detsum);\n}\n\nfunction orient2dfast(ax, ay, bx, by, cx, cy) {\n    return (ay - cy) * (bx - cx) - (ax - cx) * (by - cy);\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/robust-predicates/esm/orient3d.js\":\n/*!********************************************************!*\\\n  !*** ./node_modules/robust-predicates/esm/orient3d.js ***!\n  \\********************************************************/\n/*! exports provided: orient3d, orient3dfast */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"orient3d\", function() { return orient3d; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"orient3dfast\", function() { return orient3dfast; });\n/* harmony import */ var _util_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./util.js */ \"./node_modules/robust-predicates/esm/util.js\");\n\n\nconst o3derrboundA = (7 + 56 * _util_js__WEBPACK_IMPORTED_MODULE_0__[\"epsilon\"]) * _util_js__WEBPACK_IMPORTED_MODULE_0__[\"epsilon\"];\nconst o3derrboundB = (3 + 28 * _util_js__WEBPACK_IMPORTED_MODULE_0__[\"epsilon\"]) * _util_js__WEBPACK_IMPORTED_MODULE_0__[\"epsilon\"];\nconst o3derrboundC = (26 + 288 * _util_js__WEBPACK_IMPORTED_MODULE_0__[\"epsilon\"]) * _util_js__WEBPACK_IMPORTED_MODULE_0__[\"epsilon\"] * _util_js__WEBPACK_IMPORTED_MODULE_0__[\"epsilon\"];\n\nconst bc = Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"vec\"])(4);\nconst ca = Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"vec\"])(4);\nconst ab = Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"vec\"])(4);\nconst at_b = Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"vec\"])(4);\nconst at_c = Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"vec\"])(4);\nconst bt_c = Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"vec\"])(4);\nconst bt_a = Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"vec\"])(4);\nconst ct_a = Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"vec\"])(4);\nconst ct_b = Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"vec\"])(4);\nconst bct = Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"vec\"])(8);\nconst cat = Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"vec\"])(8);\nconst abt = Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"vec\"])(8);\nconst u = Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"vec\"])(4);\n\nconst _8 = Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"vec\"])(8);\nconst _8b = Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"vec\"])(8);\nconst _16 = Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"vec\"])(8);\nconst _12 = Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"vec\"])(12);\n\nlet fin = Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"vec\"])(192);\nlet fin2 = Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"vec\"])(192);\n\nfunction finadd(finlen, alen, a) {\n    finlen = Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"sum\"])(finlen, fin, alen, a, fin2);\n    const tmp = fin; fin = fin2; fin2 = tmp;\n    return finlen;\n}\n\nfunction tailinit(xtail, ytail, ax, ay, bx, by, a, b) {\n    let bvirt, c, ahi, alo, bhi, blo, _i, _j, _k, _0, s1, s0, t1, t0, u3, negate;\n    if (xtail === 0) {\n        if (ytail === 0) {\n            a[0] = 0;\n            b[0] = 0;\n            return 1;\n        } else {\n            negate = -ytail;\n            s1 = negate * ax;\n            c = _util_js__WEBPACK_IMPORTED_MODULE_0__[\"splitter\"] * negate;\n            ahi = c - (c - negate);\n            alo = negate - ahi;\n            c = _util_js__WEBPACK_IMPORTED_MODULE_0__[\"splitter\"] * ax;\n            bhi = c - (c - ax);\n            blo = ax - bhi;\n            a[0] = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n            a[1] = s1;\n            s1 = ytail * bx;\n            c = _util_js__WEBPACK_IMPORTED_MODULE_0__[\"splitter\"] * ytail;\n            ahi = c - (c - ytail);\n            alo = ytail - ahi;\n            c = _util_js__WEBPACK_IMPORTED_MODULE_0__[\"splitter\"] * bx;\n            bhi = c - (c - bx);\n            blo = bx - bhi;\n            b[0] = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n            b[1] = s1;\n            return 2;\n        }\n    } else {\n        if (ytail === 0) {\n            s1 = xtail * ay;\n            c = _util_js__WEBPACK_IMPORTED_MODULE_0__[\"splitter\"] * xtail;\n            ahi = c - (c - xtail);\n            alo = xtail - ahi;\n            c = _util_js__WEBPACK_IMPORTED_MODULE_0__[\"splitter\"] * ay;\n            bhi = c - (c - ay);\n            blo = ay - bhi;\n            a[0] = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n            a[1] = s1;\n            negate = -xtail;\n            s1 = negate * by;\n            c = _util_js__WEBPACK_IMPORTED_MODULE_0__[\"splitter\"] * negate;\n            ahi = c - (c - negate);\n            alo = negate - ahi;\n            c = _util_js__WEBPACK_IMPORTED_MODULE_0__[\"splitter\"] * by;\n            bhi = c - (c - by);\n            blo = by - bhi;\n            b[0] = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n            b[1] = s1;\n            return 2;\n        } else {\n            s1 = xtail * ay;\n            c = _util_js__WEBPACK_IMPORTED_MODULE_0__[\"splitter\"] * xtail;\n            ahi = c - (c - xtail);\n            alo = xtail - ahi;\n            c = _util_js__WEBPACK_IMPORTED_MODULE_0__[\"splitter\"] * ay;\n            bhi = c - (c - ay);\n            blo = ay - bhi;\n            s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n            t1 = ytail * ax;\n            c = _util_js__WEBPACK_IMPORTED_MODULE_0__[\"splitter\"] * ytail;\n            ahi = c - (c - ytail);\n            alo = ytail - ahi;\n            c = _util_js__WEBPACK_IMPORTED_MODULE_0__[\"splitter\"] * ax;\n            bhi = c - (c - ax);\n            blo = ax - bhi;\n            t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n            _i = s0 - t0;\n            bvirt = s0 - _i;\n            a[0] = s0 - (_i + bvirt) + (bvirt - t0);\n            _j = s1 + _i;\n            bvirt = _j - s1;\n            _0 = s1 - (_j - bvirt) + (_i - bvirt);\n            _i = _0 - t1;\n            bvirt = _0 - _i;\n            a[1] = _0 - (_i + bvirt) + (bvirt - t1);\n            u3 = _j + _i;\n            bvirt = u3 - _j;\n            a[2] = _j - (u3 - bvirt) + (_i - bvirt);\n            a[3] = u3;\n            s1 = ytail * bx;\n            c = _util_js__WEBPACK_IMPORTED_MODULE_0__[\"splitter\"] * ytail;\n            ahi = c - (c - ytail);\n            alo = ytail - ahi;\n            c = _util_js__WEBPACK_IMPORTED_MODULE_0__[\"splitter\"] * bx;\n            bhi = c - (c - bx);\n            blo = bx - bhi;\n            s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n            t1 = xtail * by;\n            c = _util_js__WEBPACK_IMPORTED_MODULE_0__[\"splitter\"] * xtail;\n            ahi = c - (c - xtail);\n            alo = xtail - ahi;\n            c = _util_js__WEBPACK_IMPORTED_MODULE_0__[\"splitter\"] * by;\n            bhi = c - (c - by);\n            blo = by - bhi;\n            t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n            _i = s0 - t0;\n            bvirt = s0 - _i;\n            b[0] = s0 - (_i + bvirt) + (bvirt - t0);\n            _j = s1 + _i;\n            bvirt = _j - s1;\n            _0 = s1 - (_j - bvirt) + (_i - bvirt);\n            _i = _0 - t1;\n            bvirt = _0 - _i;\n            b[1] = _0 - (_i + bvirt) + (bvirt - t1);\n            u3 = _j + _i;\n            bvirt = u3 - _j;\n            b[2] = _j - (u3 - bvirt) + (_i - bvirt);\n            b[3] = u3;\n            return 4;\n        }\n    }\n}\n\nfunction tailadd(finlen, a, b, k, z) {\n    let bvirt, c, ahi, alo, bhi, blo, _i, _j, _k, _0, s1, s0, u3;\n    s1 = a * b;\n    c = _util_js__WEBPACK_IMPORTED_MODULE_0__[\"splitter\"] * a;\n    ahi = c - (c - a);\n    alo = a - ahi;\n    c = _util_js__WEBPACK_IMPORTED_MODULE_0__[\"splitter\"] * b;\n    bhi = c - (c - b);\n    blo = b - bhi;\n    s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n    c = _util_js__WEBPACK_IMPORTED_MODULE_0__[\"splitter\"] * k;\n    bhi = c - (c - k);\n    blo = k - bhi;\n    _i = s0 * k;\n    c = _util_js__WEBPACK_IMPORTED_MODULE_0__[\"splitter\"] * s0;\n    ahi = c - (c - s0);\n    alo = s0 - ahi;\n    u[0] = alo * blo - (_i - ahi * bhi - alo * bhi - ahi * blo);\n    _j = s1 * k;\n    c = _util_js__WEBPACK_IMPORTED_MODULE_0__[\"splitter\"] * s1;\n    ahi = c - (c - s1);\n    alo = s1 - ahi;\n    _0 = alo * blo - (_j - ahi * bhi - alo * bhi - ahi * blo);\n    _k = _i + _0;\n    bvirt = _k - _i;\n    u[1] = _i - (_k - bvirt) + (_0 - bvirt);\n    u3 = _j + _k;\n    u[2] = _k - (u3 - _j);\n    u[3] = u3;\n    finlen = finadd(finlen, 4, u);\n    if (z !== 0) {\n        c = _util_js__WEBPACK_IMPORTED_MODULE_0__[\"splitter\"] * z;\n        bhi = c - (c - z);\n        blo = z - bhi;\n        _i = s0 * z;\n        c = _util_js__WEBPACK_IMPORTED_MODULE_0__[\"splitter\"] * s0;\n        ahi = c - (c - s0);\n        alo = s0 - ahi;\n        u[0] = alo * blo - (_i - ahi * bhi - alo * bhi - ahi * blo);\n        _j = s1 * z;\n        c = _util_js__WEBPACK_IMPORTED_MODULE_0__[\"splitter\"] * s1;\n        ahi = c - (c - s1);\n        alo = s1 - ahi;\n        _0 = alo * blo - (_j - ahi * bhi - alo * bhi - ahi * blo);\n        _k = _i + _0;\n        bvirt = _k - _i;\n        u[1] = _i - (_k - bvirt) + (_0 - bvirt);\n        u3 = _j + _k;\n        u[2] = _k - (u3 - _j);\n        u[3] = u3;\n        finlen = finadd(finlen, 4, u);\n    }\n    return finlen;\n}\n\nfunction orient3dadapt(ax, ay, az, bx, by, bz, cx, cy, cz, dx, dy, dz, permanent) {\n    let finlen;\n    let adxtail, bdxtail, cdxtail;\n    let adytail, bdytail, cdytail;\n    let adztail, bdztail, cdztail;\n    let bvirt, c, ahi, alo, bhi, blo, _i, _j, _k, _0, s1, s0, t1, t0, u3;\n\n    const adx = ax - dx;\n    const bdx = bx - dx;\n    const cdx = cx - dx;\n    const ady = ay - dy;\n    const bdy = by - dy;\n    const cdy = cy - dy;\n    const adz = az - dz;\n    const bdz = bz - dz;\n    const cdz = cz - dz;\n\n    s1 = bdx * cdy;\n    c = _util_js__WEBPACK_IMPORTED_MODULE_0__[\"splitter\"] * bdx;\n    ahi = c - (c - bdx);\n    alo = bdx - ahi;\n    c = _util_js__WEBPACK_IMPORTED_MODULE_0__[\"splitter\"] * cdy;\n    bhi = c - (c - cdy);\n    blo = cdy - bhi;\n    s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n    t1 = cdx * bdy;\n    c = _util_js__WEBPACK_IMPORTED_MODULE_0__[\"splitter\"] * cdx;\n    ahi = c - (c - cdx);\n    alo = cdx - ahi;\n    c = _util_js__WEBPACK_IMPORTED_MODULE_0__[\"splitter\"] * bdy;\n    bhi = c - (c - bdy);\n    blo = bdy - bhi;\n    t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n    _i = s0 - t0;\n    bvirt = s0 - _i;\n    bc[0] = s0 - (_i + bvirt) + (bvirt - t0);\n    _j = s1 + _i;\n    bvirt = _j - s1;\n    _0 = s1 - (_j - bvirt) + (_i - bvirt);\n    _i = _0 - t1;\n    bvirt = _0 - _i;\n    bc[1] = _0 - (_i + bvirt) + (bvirt - t1);\n    u3 = _j + _i;\n    bvirt = u3 - _j;\n    bc[2] = _j - (u3 - bvirt) + (_i - bvirt);\n    bc[3] = u3;\n    s1 = cdx * ady;\n    c = _util_js__WEBPACK_IMPORTED_MODULE_0__[\"splitter\"] * cdx;\n    ahi = c - (c - cdx);\n    alo = cdx - ahi;\n    c = _util_js__WEBPACK_IMPORTED_MODULE_0__[\"splitter\"] * ady;\n    bhi = c - (c - ady);\n    blo = ady - bhi;\n    s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n    t1 = adx * cdy;\n    c = _util_js__WEBPACK_IMPORTED_MODULE_0__[\"splitter\"] * adx;\n    ahi = c - (c - adx);\n    alo = adx - ahi;\n    c = _util_js__WEBPACK_IMPORTED_MODULE_0__[\"splitter\"] * cdy;\n    bhi = c - (c - cdy);\n    blo = cdy - bhi;\n    t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n    _i = s0 - t0;\n    bvirt = s0 - _i;\n    ca[0] = s0 - (_i + bvirt) + (bvirt - t0);\n    _j = s1 + _i;\n    bvirt = _j - s1;\n    _0 = s1 - (_j - bvirt) + (_i - bvirt);\n    _i = _0 - t1;\n    bvirt = _0 - _i;\n    ca[1] = _0 - (_i + bvirt) + (bvirt - t1);\n    u3 = _j + _i;\n    bvirt = u3 - _j;\n    ca[2] = _j - (u3 - bvirt) + (_i - bvirt);\n    ca[3] = u3;\n    s1 = adx * bdy;\n    c = _util_js__WEBPACK_IMPORTED_MODULE_0__[\"splitter\"] * adx;\n    ahi = c - (c - adx);\n    alo = adx - ahi;\n    c = _util_js__WEBPACK_IMPORTED_MODULE_0__[\"splitter\"] * bdy;\n    bhi = c - (c - bdy);\n    blo = bdy - bhi;\n    s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n    t1 = bdx * ady;\n    c = _util_js__WEBPACK_IMPORTED_MODULE_0__[\"splitter\"] * bdx;\n    ahi = c - (c - bdx);\n    alo = bdx - ahi;\n    c = _util_js__WEBPACK_IMPORTED_MODULE_0__[\"splitter\"] * ady;\n    bhi = c - (c - ady);\n    blo = ady - bhi;\n    t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n    _i = s0 - t0;\n    bvirt = s0 - _i;\n    ab[0] = s0 - (_i + bvirt) + (bvirt - t0);\n    _j = s1 + _i;\n    bvirt = _j - s1;\n    _0 = s1 - (_j - bvirt) + (_i - bvirt);\n    _i = _0 - t1;\n    bvirt = _0 - _i;\n    ab[1] = _0 - (_i + bvirt) + (bvirt - t1);\n    u3 = _j + _i;\n    bvirt = u3 - _j;\n    ab[2] = _j - (u3 - bvirt) + (_i - bvirt);\n    ab[3] = u3;\n\n    finlen = Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"sum\"])(\n        Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"sum\"])(\n            Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"scale\"])(4, bc, adz, _8), _8,\n            Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"scale\"])(4, ca, bdz, _8b), _8b, _16), _16,\n        Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"scale\"])(4, ab, cdz, _8), _8, fin);\n\n    let det = Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"estimate\"])(finlen, fin);\n    let errbound = o3derrboundB * permanent;\n    if (det >= errbound || -det >= errbound) {\n        return det;\n    }\n\n    bvirt = ax - adx;\n    adxtail = ax - (adx + bvirt) + (bvirt - dx);\n    bvirt = bx - bdx;\n    bdxtail = bx - (bdx + bvirt) + (bvirt - dx);\n    bvirt = cx - cdx;\n    cdxtail = cx - (cdx + bvirt) + (bvirt - dx);\n    bvirt = ay - ady;\n    adytail = ay - (ady + bvirt) + (bvirt - dy);\n    bvirt = by - bdy;\n    bdytail = by - (bdy + bvirt) + (bvirt - dy);\n    bvirt = cy - cdy;\n    cdytail = cy - (cdy + bvirt) + (bvirt - dy);\n    bvirt = az - adz;\n    adztail = az - (adz + bvirt) + (bvirt - dz);\n    bvirt = bz - bdz;\n    bdztail = bz - (bdz + bvirt) + (bvirt - dz);\n    bvirt = cz - cdz;\n    cdztail = cz - (cdz + bvirt) + (bvirt - dz);\n\n    if (adxtail === 0 && bdxtail === 0 && cdxtail === 0 &&\n        adytail === 0 && bdytail === 0 && cdytail === 0 &&\n        adztail === 0 && bdztail === 0 && cdztail === 0) {\n        return det;\n    }\n\n    errbound = o3derrboundC * permanent + _util_js__WEBPACK_IMPORTED_MODULE_0__[\"resulterrbound\"] * Math.abs(det);\n    det +=\n        adz * (bdx * cdytail + cdy * bdxtail - (bdy * cdxtail + cdx * bdytail)) + adztail * (bdx * cdy - bdy * cdx) +\n        bdz * (cdx * adytail + ady * cdxtail - (cdy * adxtail + adx * cdytail)) + bdztail * (cdx * ady - cdy * adx) +\n        cdz * (adx * bdytail + bdy * adxtail - (ady * bdxtail + bdx * adytail)) + cdztail * (adx * bdy - ady * bdx);\n    if (det >= errbound || -det >= errbound) {\n        return det;\n    }\n\n    const at_len = tailinit(adxtail, adytail, bdx, bdy, cdx, cdy, at_b, at_c);\n    const bt_len = tailinit(bdxtail, bdytail, cdx, cdy, adx, ady, bt_c, bt_a);\n    const ct_len = tailinit(cdxtail, cdytail, adx, ady, bdx, bdy, ct_a, ct_b);\n\n    const bctlen = Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"sum\"])(bt_len, bt_c, ct_len, ct_b, bct);\n    finlen = finadd(finlen, Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"scale\"])(bctlen, bct, adz, _16), _16);\n\n    const catlen = Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"sum\"])(ct_len, ct_a, at_len, at_c, cat);\n    finlen = finadd(finlen, Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"scale\"])(catlen, cat, bdz, _16), _16);\n\n    const abtlen = Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"sum\"])(at_len, at_b, bt_len, bt_a, abt);\n    finlen = finadd(finlen, Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"scale\"])(abtlen, abt, cdz, _16), _16);\n\n    if (adztail !== 0) {\n        finlen = finadd(finlen, Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"scale\"])(4, bc, adztail, _12), _12);\n        finlen = finadd(finlen, Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"scale\"])(bctlen, bct, adztail, _16), _16);\n    }\n    if (bdztail !== 0) {\n        finlen = finadd(finlen, Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"scale\"])(4, ca, bdztail, _12), _12);\n        finlen = finadd(finlen, Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"scale\"])(catlen, cat, bdztail, _16), _16);\n    }\n    if (cdztail !== 0) {\n        finlen = finadd(finlen, Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"scale\"])(4, ab, cdztail, _12), _12);\n        finlen = finadd(finlen, Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[\"scale\"])(abtlen, abt, cdztail, _16), _16);\n    }\n\n    if (adxtail !== 0) {\n        if (bdytail !== 0) {\n            finlen = tailadd(finlen, adxtail, bdytail, cdz, cdztail);\n        }\n        if (cdytail !== 0) {\n            finlen = tailadd(finlen, -adxtail, cdytail, bdz, bdztail);\n        }\n    }\n    if (bdxtail !== 0) {\n        if (cdytail !== 0) {\n            finlen = tailadd(finlen, bdxtail, cdytail, adz, adztail);\n        }\n        if (adytail !== 0) {\n            finlen = tailadd(finlen, -bdxtail, adytail, cdz, cdztail);\n        }\n    }\n    if (cdxtail !== 0) {\n        if (adytail !== 0) {\n            finlen = tailadd(finlen, cdxtail, adytail, bdz, bdztail);\n        }\n        if (bdytail !== 0) {\n            finlen = tailadd(finlen, -cdxtail, bdytail, adz, adztail);\n        }\n    }\n\n    return fin[finlen - 1];\n}\n\nfunction orient3d(ax, ay, az, bx, by, bz, cx, cy, cz, dx, dy, dz) {\n    const adx = ax - dx;\n    const bdx = bx - dx;\n    const cdx = cx - dx;\n    const ady = ay - dy;\n    const bdy = by - dy;\n    const cdy = cy - dy;\n    const adz = az - dz;\n    const bdz = bz - dz;\n    const cdz = cz - dz;\n\n    const bdxcdy = bdx * cdy;\n    const cdxbdy = cdx * bdy;\n\n    const cdxady = cdx * ady;\n    const adxcdy = adx * cdy;\n\n    const adxbdy = adx * bdy;\n    const bdxady = bdx * ady;\n\n    const det =\n        adz * (bdxcdy - cdxbdy) +\n        bdz * (cdxady - adxcdy) +\n        cdz * (adxbdy - bdxady);\n\n    const permanent =\n        (Math.abs(bdxcdy) + Math.abs(cdxbdy)) * Math.abs(adz) +\n        (Math.abs(cdxady) + Math.abs(adxcdy)) * Math.abs(bdz) +\n        (Math.abs(adxbdy) + Math.abs(bdxady)) * Math.abs(cdz);\n\n    const errbound = o3derrboundA * permanent;\n    if (det > errbound || -det > errbound) {\n        return det;\n    }\n\n    return orient3dadapt(ax, ay, az, bx, by, bz, cx, cy, cz, dx, dy, dz, permanent);\n}\n\nfunction orient3dfast(ax, ay, az, bx, by, bz, cx, cy, cz, dx, dy, dz) {\n    const adx = ax - dx;\n    const bdx = bx - dx;\n    const cdx = cx - dx;\n    const ady = ay - dy;\n    const bdy = by - dy;\n    const cdy = cy - dy;\n    const adz = az - dz;\n    const bdz = bz - dz;\n    const cdz = cz - dz;\n\n    return adx * (bdy * cdz - bdz * cdy) +\n        bdx * (cdy * adz - cdz * ady) +\n        cdx * (ady * bdz - adz * bdy);\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/robust-predicates/esm/util.js\":\n/*!****************************************************!*\\\n  !*** ./node_modules/robust-predicates/esm/util.js ***!\n  \\****************************************************/\n/*! exports provided: epsilon, splitter, resulterrbound, sum, sum_three, scale, negate, estimate, vec */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"epsilon\", function() { return epsilon; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"splitter\", function() { return splitter; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"resulterrbound\", function() { return resulterrbound; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"sum\", function() { return sum; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"sum_three\", function() { return sum_three; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"scale\", function() { return scale; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"negate\", function() { return negate; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"estimate\", function() { return estimate; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"vec\", function() { return vec; });\nconst epsilon = 1.1102230246251565e-16;\nconst splitter = 134217729;\nconst resulterrbound = (3 + 8 * epsilon) * epsilon;\n\n// fast_expansion_sum_zeroelim routine from oritinal code\nfunction sum(elen, e, flen, f, h) {\n    let Q, Qnew, hh, bvirt;\n    let enow = e[0];\n    let fnow = f[0];\n    let eindex = 0;\n    let findex = 0;\n    if ((fnow > enow) === (fnow > -enow)) {\n        Q = enow;\n        enow = e[++eindex];\n    } else {\n        Q = fnow;\n        fnow = f[++findex];\n    }\n    let hindex = 0;\n    if (eindex < elen && findex < flen) {\n        if ((fnow > enow) === (fnow > -enow)) {\n            Qnew = enow + Q;\n            hh = Q - (Qnew - enow);\n            enow = e[++eindex];\n        } else {\n            Qnew = fnow + Q;\n            hh = Q - (Qnew - fnow);\n            fnow = f[++findex];\n        }\n        Q = Qnew;\n        if (hh !== 0) {\n            h[hindex++] = hh;\n        }\n        while (eindex < elen && findex < flen) {\n            if ((fnow > enow) === (fnow > -enow)) {\n                Qnew = Q + enow;\n                bvirt = Qnew - Q;\n                hh = Q - (Qnew - bvirt) + (enow - bvirt);\n                enow = e[++eindex];\n            } else {\n                Qnew = Q + fnow;\n                bvirt = Qnew - Q;\n                hh = Q - (Qnew - bvirt) + (fnow - bvirt);\n                fnow = f[++findex];\n            }\n            Q = Qnew;\n            if (hh !== 0) {\n                h[hindex++] = hh;\n            }\n        }\n    }\n    while (eindex < elen) {\n        Qnew = Q + enow;\n        bvirt = Qnew - Q;\n        hh = Q - (Qnew - bvirt) + (enow - bvirt);\n        enow = e[++eindex];\n        Q = Qnew;\n        if (hh !== 0) {\n            h[hindex++] = hh;\n        }\n    }\n    while (findex < flen) {\n        Qnew = Q + fnow;\n        bvirt = Qnew - Q;\n        hh = Q - (Qnew - bvirt) + (fnow - bvirt);\n        fnow = f[++findex];\n        Q = Qnew;\n        if (hh !== 0) {\n            h[hindex++] = hh;\n        }\n    }\n    if (Q !== 0 || hindex === 0) {\n        h[hindex++] = Q;\n    }\n    return hindex;\n}\n\nfunction sum_three(alen, a, blen, b, clen, c, tmp, out) {\n    return sum(sum(alen, a, blen, b, tmp), tmp, clen, c, out);\n}\n\n// scale_expansion_zeroelim routine from oritinal code\nfunction scale(elen, e, b, h) {\n    let Q, sum, hh, product1, product0;\n    let bvirt, c, ahi, alo, bhi, blo;\n\n    c = splitter * b;\n    bhi = c - (c - b);\n    blo = b - bhi;\n    let enow = e[0];\n    Q = enow * b;\n    c = splitter * enow;\n    ahi = c - (c - enow);\n    alo = enow - ahi;\n    hh = alo * blo - (Q - ahi * bhi - alo * bhi - ahi * blo);\n    let hindex = 0;\n    if (hh !== 0) {\n        h[hindex++] = hh;\n    }\n    for (let i = 1; i < elen; i++) {\n        enow = e[i];\n        product1 = enow * b;\n        c = splitter * enow;\n        ahi = c - (c - enow);\n        alo = enow - ahi;\n        product0 = alo * blo - (product1 - ahi * bhi - alo * bhi - ahi * blo);\n        sum = Q + product0;\n        bvirt = sum - Q;\n        hh = Q - (sum - bvirt) + (product0 - bvirt);\n        if (hh !== 0) {\n            h[hindex++] = hh;\n        }\n        Q = product1 + sum;\n        hh = sum - (Q - product1);\n        if (hh !== 0) {\n            h[hindex++] = hh;\n        }\n    }\n    if (Q !== 0 || hindex === 0) {\n        h[hindex++] = Q;\n    }\n    return hindex;\n}\n\nfunction negate(elen, e) {\n    for (let i = 0; i < elen; i++) e[i] = -e[i];\n    return elen;\n}\n\nfunction estimate(elen, e) {\n    let Q = e[0];\n    for (let i = 1; i < elen; i++) Q += e[i];\n    return Q;\n}\n\nfunction vec(n) {\n    return new Float64Array(n);\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/robust-predicates/index.js\":\n/*!*************************************************!*\\\n  !*** ./node_modules/robust-predicates/index.js ***!\n  \\*************************************************/\n/*! exports provided: orient2d, orient2dfast, orient3d, orient3dfast, incircle, incirclefast, insphere, inspherefast */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _esm_orient2d_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./esm/orient2d.js */ \"./node_modules/robust-predicates/esm/orient2d.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"orient2d\", function() { return _esm_orient2d_js__WEBPACK_IMPORTED_MODULE_0__[\"orient2d\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"orient2dfast\", function() { return _esm_orient2d_js__WEBPACK_IMPORTED_MODULE_0__[\"orient2dfast\"]; });\n\n/* harmony import */ var _esm_orient3d_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./esm/orient3d.js */ \"./node_modules/robust-predicates/esm/orient3d.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"orient3d\", function() { return _esm_orient3d_js__WEBPACK_IMPORTED_MODULE_1__[\"orient3d\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"orient3dfast\", function() { return _esm_orient3d_js__WEBPACK_IMPORTED_MODULE_1__[\"orient3dfast\"]; });\n\n/* harmony import */ var _esm_incircle_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./esm/incircle.js */ \"./node_modules/robust-predicates/esm/incircle.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"incircle\", function() { return _esm_incircle_js__WEBPACK_IMPORTED_MODULE_2__[\"incircle\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"incirclefast\", function() { return _esm_incircle_js__WEBPACK_IMPORTED_MODULE_2__[\"incirclefast\"]; });\n\n/* harmony import */ var _esm_insphere_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./esm/insphere.js */ \"./node_modules/robust-predicates/esm/insphere.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"insphere\", function() { return _esm_insphere_js__WEBPACK_IMPORTED_MODULE_3__[\"insphere\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"inspherefast\", function() { return _esm_insphere_js__WEBPACK_IMPORTED_MODULE_3__[\"inspherefast\"]; });\n\n\n\n\n\n\n\n\n/***/ }),\n\n/***/ \"./node_modules/stylis/dist/stylis.mjs\":\n/*!*********************************************!*\\\n  !*** ./node_modules/stylis/dist/stylis.mjs ***!\n  \\*********************************************/\n/*! exports provided: CHARSET, COMMENT, COUNTER_STYLE, DECLARATION, DOCUMENT, FONT_FACE, FONT_FEATURE_VALUES, IMPORT, KEYFRAMES, MEDIA, MOZ, MS, NAMESPACE, PAGE, RULESET, SUPPORTS, VIEWPORT, WEBKIT, abs, alloc, append, caret, char, character, characters, charat, column, combine, comment, commenter, compile, copy, dealloc, declaration, delimit, delimiter, escaping, from, hash, identifier, indexof, length, line, match, middleware, namespace, next, node, parse, peek, position, prefix, prefixer, prev, replace, ruleset, rulesheet, serialize, sizeof, slice, stringify, strlen, substr, token, tokenize, tokenizer, trim, whitespace */\n/***/ (function(__webpack_module__, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"CHARSET\", function() { return f; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"COMMENT\", function() { return c; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"COUNTER_STYLE\", function() { return w; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"DECLARATION\", function() { return t; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"DOCUMENT\", function() { return v; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"FONT_FACE\", function() { return b; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"FONT_FEATURE_VALUES\", function() { return $; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"IMPORT\", function() { return i; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"KEYFRAMES\", function() { return p; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"MEDIA\", function() { return u; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"MOZ\", function() { return r; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"MS\", function() { return e; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"NAMESPACE\", function() { return h; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"PAGE\", function() { return s; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"RULESET\", function() { return n; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"SUPPORTS\", function() { return l; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"VIEWPORT\", function() { return o; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"WEBKIT\", function() { return a; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"abs\", function() { return k; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"alloc\", function() { return T; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"append\", function() { return O; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"caret\", function() { return P; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"char\", function() { return J; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"character\", function() { return F; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"characters\", function() { return G; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"charat\", function() { return z; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"column\", function() { return B; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"combine\", function() { return S; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"comment\", function() { return te; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"commenter\", function() { return ee; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"compile\", function() { return ae; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"copy\", function() { return I; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"dealloc\", function() { return U; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"declaration\", function() { return se; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"delimit\", function() { return V; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"delimiter\", function() { return _; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"escaping\", function() { return Z; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"from\", function() { return d; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"hash\", function() { return m; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"identifier\", function() { return re; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"indexof\", function() { return j; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"length\", function() { return D; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"line\", function() { return q; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"match\", function() { return x; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"middleware\", function() { return oe; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"namespace\", function() { return he; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"next\", function() { return L; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"node\", function() { return H; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"parse\", function() { return ce; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"peek\", function() { return N; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"position\", function() { return E; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"prefix\", function() { return ue; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"prefixer\", function() { return ve; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"prev\", function() { return K; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"replace\", function() { return y; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"ruleset\", function() { return ne; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"rulesheet\", function() { return le; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"serialize\", function() { return ie; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"sizeof\", function() { return M; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"slice\", function() { return Q; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"stringify\", function() { return fe; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"strlen\", function() { return A; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"substr\", function() { return C; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"token\", function() { return R; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"tokenize\", function() { return W; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"tokenizer\", function() { return Y; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"trim\", function() { return g; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"whitespace\", function() { return X; });\nvar e=\"-ms-\";var r=\"-moz-\";var a=\"-webkit-\";var c=\"comm\";var n=\"rule\";var t=\"decl\";var s=\"@page\";var u=\"@media\";var i=\"@import\";var f=\"@charset\";var o=\"@viewport\";var l=\"@supports\";var v=\"@document\";var h=\"@namespace\";var p=\"@keyframes\";var b=\"@font-face\";var w=\"@counter-style\";var $=\"@font-feature-values\";var k=Math.abs;var d=String.fromCharCode;function m(e,r){return(((r<<2^z(e,0))<<2^z(e,1))<<2^z(e,2))<<2^z(e,3)}function g(e){return e.trim()}function x(e,r){return(e=r.exec(e))?e[0]:e}function y(e,r,a){return e.replace(r,a)}function j(e,r){return e.indexOf(r)}function z(e,r){return e.charCodeAt(r)|0}function C(e,r,a){return e.slice(r,a)}function A(e){return e.length}function M(e){return e.length}function O(e,r){return r.push(e),e}function S(e,r){return e.map(r).join(\"\")}var q=1;var B=1;var D=0;var E=0;var F=0;var G=\"\";function H(e,r,a,c,n,t,s){return{value:e,root:r,parent:a,type:c,props:n,children:t,line:q,column:B,length:s,return:\"\"}}function I(e,r,a){return H(e,r.root,r.parent,a,r.props,r.children,0)}function J(){return F}function K(){F=E>0?z(G,--E):0;if(B--,F===10)B=1,q--;return F}function L(){F=E<D?z(G,E++):0;if(B++,F===10)B=1,q++;return F}function N(){return z(G,E)}function P(){return E}function Q(e,r){return C(G,e,r)}function R(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function T(e){return q=B=1,D=A(G=e),E=0,[]}function U(e){return G=\"\",e}function V(e){return g(Q(E-1,_(e===91?e+2:e===40?e+1:e)))}function W(e){return U(Y(T(e)))}function X(e){while(F=N())if(F<33)L();else break;return R(e)>2||R(F)>3?\"\":\" \"}function Y(e){while(L())switch(R(F)){case 0:O(re(E-1),e);break;case 2:O(V(F),e);break;default:O(d(F),e)}return e}function Z(e,r){while(--r&&L())if(F<48||F>102||F>57&&F<65||F>70&&F<97)break;return Q(e,P()+(r<6&&N()==32&&L()==32))}function _(e){while(L())switch(F){case e:return E;case 34:case 39:return _(e===34||e===39?e:F);case 40:if(e===41)_(e);break;case 92:L();break}return E}function ee(e,r){while(L())if(e+F===47+10)break;else if(e+F===42+42&&N()===47)break;return\"/*\"+Q(r,E-1)+\"*\"+d(e===47?e:L())}function re(e){while(!R(N()))L();return Q(e,E)}function ae(e){return U(ce(\"\",null,null,null,[\"\"],e=T(e),0,[0],e))}function ce(e,r,a,c,n,t,s,u,i){var f=0;var o=0;var l=s;var v=0;var h=0;var p=0;var b=1;var w=1;var $=1;var k=0;var m=\"\";var g=n;var x=t;var j=c;var z=m;while(w)switch(p=k,k=L()){case 34:case 39:case 91:case 40:z+=V(k);break;case 9:case 10:case 13:case 32:z+=X(p);break;case 92:z+=Z(P()-1,7);continue;case 47:switch(N()){case 42:case 47:O(te(ee(L(),P()),r,a),i);break;default:z+=\"/\"}break;case 123*b:u[f++]=A(z)*$;case 125*b:case 59:case 0:switch(k){case 0:case 125:w=0;case 59+o:if(h>0&&A(z)-l)O(h>32?se(z+\";\",c,a,l-1):se(y(z,\" \",\"\")+\";\",c,a,l-2),i);break;case 59:z+=\";\";default:O(j=ne(z,r,a,f,o,n,u,m,g=[],x=[],l),t);if(k===123)if(o===0)ce(z,r,j,j,g,t,l,u,x);else switch(v){case 100:case 109:case 115:ce(e,j,j,c&&O(ne(e,j,j,0,0,n,u,m,n,g=[],l),x),n,x,l,u,c?g:x);break;default:ce(z,j,j,j,[\"\"],x,l,u,x)}}f=o=h=0,b=$=1,m=z=\"\",l=s;break;case 58:l=1+A(z),h=p;default:if(b<1)if(k==123)--b;else if(k==125&&b++==0&&K()==125)continue;switch(z+=d(k),k*b){case 38:$=o>0?1:(z+=\"\\f\",-1);break;case 44:u[f++]=(A(z)-1)*$,$=1;break;case 64:if(N()===45)z+=V(L());v=N(),o=A(m=z+=re(P())),k++;break;case 45:if(p===45&&A(z)==2)b=0}}return t}function ne(e,r,a,c,t,s,u,i,f,o,l){var v=t-1;var h=t===0?s:[\"\"];var p=M(h);for(var b=0,w=0,$=0;b<c;++b)for(var d=0,m=C(e,v+1,v=k(w=u[b])),x=e;d<p;++d)if(x=g(w>0?h[d]+\" \"+m:y(m,/&\\f/g,h[d])))f[$++]=x;return H(e,r,a,t===0?n:i,f,o,l)}function te(e,r,a){return H(e,r,a,c,d(J()),C(e,2,-2),0)}function se(e,r,a,c){return H(e,r,a,t,C(e,0,c),C(e,c+1,-1),c)}function ue(c,n){switch(m(c,n)){case 5103:return a+\"print-\"+c+c;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return a+c+c;case 5349:case 4246:case 4810:case 6968:case 2756:return a+c+r+c+e+c+c;case 6828:case 4268:return a+c+e+c+c;case 6165:return a+c+e+\"flex-\"+c+c;case 5187:return a+c+y(c,/(\\w+).+(:[^]+)/,a+\"box-$1$2\"+e+\"flex-$1$2\")+c;case 5443:return a+c+e+\"flex-item-\"+y(c,/flex-|-self/,\"\")+c;case 4675:return a+c+e+\"flex-line-pack\"+y(c,/align-content|flex-|-self/,\"\")+c;case 5548:return a+c+e+y(c,\"shrink\",\"negative\")+c;case 5292:return a+c+e+y(c,\"basis\",\"preferred-size\")+c;case 6060:return a+\"box-\"+y(c,\"-grow\",\"\")+a+c+e+y(c,\"grow\",\"positive\")+c;case 4554:return a+y(c,/([^-])(transform)/g,\"$1\"+a+\"$2\")+c;case 6187:return y(y(y(c,/(zoom-|grab)/,a+\"$1\"),/(image-set)/,a+\"$1\"),c,\"\")+c;case 5495:case 3959:return y(c,/(image-set\\([^]*)/,a+\"$1\"+\"$`$1\");case 4968:return y(y(c,/(.+:)(flex-)?(.*)/,a+\"box-pack:$3\"+e+\"flex-pack:$3\"),/s.+-b[^;]+/,\"justify\")+a+c+c;case 4095:case 3583:case 4068:case 2532:return y(c,/(.+)-inline(.+)/,a+\"$1$2\")+c;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(A(c)-1-n>6)switch(z(c,n+1)){case 109:if(z(c,n+4)!==45)break;case 102:return y(c,/(.+:)(.+)-([^]+)/,\"$1\"+a+\"$2-$3\"+\"$1\"+r+(z(c,n+3)==108?\"$3\":\"$2-$3\"))+c;case 115:return~j(c,\"stretch\")?ue(y(c,\"stretch\",\"fill-available\"),n)+c:c}break;case 4949:if(z(c,n+1)!==115)break;case 6444:switch(z(c,A(c)-3-(~j(c,\"!important\")&&10))){case 107:return y(c,\":\",\":\"+a)+c;case 101:return y(c,/(.+:)([^;!]+)(;|!.+)?/,\"$1\"+a+(z(c,14)===45?\"inline-\":\"\")+\"box$3\"+\"$1\"+a+\"$2$3\"+\"$1\"+e+\"$2box$3\")+c}break;case 5936:switch(z(c,n+11)){case 114:return a+c+e+y(c,/[svh]\\w+-[tblr]{2}/,\"tb\")+c;case 108:return a+c+e+y(c,/[svh]\\w+-[tblr]{2}/,\"tb-rl\")+c;case 45:return a+c+e+y(c,/[svh]\\w+-[tblr]{2}/,\"lr\")+c}return a+c+e+c+c}return c}function ie(e,r){var a=\"\";var c=M(e);for(var n=0;n<c;n++)a+=r(e[n],n,e,r)||\"\";return a}function fe(e,r,a,s){switch(e.type){case i:case t:return e.return=e.return||e.value;case c:return\"\";case n:e.value=e.props.join(\",\")}return A(a=ie(e.children,s))?e.return=e.value+\"{\"+a+\"}\":\"\"}function oe(e){var r=M(e);return function(a,c,n,t){var s=\"\";for(var u=0;u<r;u++)s+=e[u](a,c,n,t)||\"\";return s}}function le(e){return function(r){if(!r.root)if(r=r.return)e(r)}}function ve(c,s,u,i){if(!c.return)switch(c.type){case t:c.return=ue(c.value,c.length);break;case p:return ie([I(y(c.value,\"@\",\"@\"+a),c,\"\")],i);case n:if(c.length)return S(c.props,(function(n){switch(x(n,/(::plac\\w+|:read-\\w+)/)){case\":read-only\":case\":read-write\":return ie([I(y(n,/:(read-\\w+)/,\":\"+r+\"$1\"),c,\"\")],i);case\"::placeholder\":return ie([I(y(n,/:(plac\\w+)/,\":\"+a+\"input-$1\"),c,\"\"),I(y(n,/:(plac\\w+)/,\":\"+r+\"$1\"),c,\"\"),I(y(n,/:(plac\\w+)/,e+\"input-$1\"),c,\"\")],i)}return\"\"}))}}function he(e){switch(e.type){case n:e.props=e.props.map((function(r){return S(W(r),(function(r,a,c){switch(z(r,0)){case 12:return C(r,1,A(r));case 0:case 40:case 43:case 62:case 126:return r;case 58:if(c[++a]===\"global\")c[a]=\"\",c[++a]=\"\\f\"+C(c[a],a=1,-1);case 32:return a===1?\"\":r;default:switch(a){case 0:e=r;return M(c)>1?\"\":r;case a=M(c)-1:case 2:return a===2?r+e+e:r+e;default:return r}}}))}))}}\n//# sourceMappingURL=stylis.mjs.map\n\n\n/***/ }),\n\n/***/ \"./node_modules/webpack/buildin/global.js\":\n/*!***********************************!*\\\n  !*** (webpack)/buildin/global.js ***!\n  \\***********************************/\n/*! no static exports found */\n/***/ (function(module, exports) {\n\nvar g;\n\n// This works in non-strict mode\ng = (function() {\n\treturn this;\n})();\n\ntry {\n\t// This works if eval is allowed (see CSP)\n\tg = g || new Function(\"return this\")();\n} catch (e) {\n\t// This works if the window reference is available\n\tif (typeof window === \"object\") g = window;\n}\n\n// g can still be undefined, but nothing to do about it...\n// We return undefined, instead of nothing here, so it's\n// easier to handle this case. if(!global) { ...}\n\nmodule.exports = g;\n\n\n/***/ }),\n\n/***/ \"./node_modules/webpack/buildin/module.js\":\n/*!***********************************!*\\\n  !*** (webpack)/buildin/module.js ***!\n  \\***********************************/\n/*! no static exports found */\n/***/ (function(module, exports) {\n\nmodule.exports = function(module) {\n\tif (!module.webpackPolyfill) {\n\t\tmodule.deprecate = function() {};\n\t\tmodule.paths = [];\n\t\t// module.parent = undefined by default\n\t\tif (!module.children) module.children = [];\n\t\tObject.defineProperty(module, \"loaded\", {\n\t\t\tenumerable: true,\n\t\t\tget: function() {\n\t\t\t\treturn module.l;\n\t\t\t}\n\t\t});\n\t\tObject.defineProperty(module, \"id\", {\n\t\t\tenumerable: true,\n\t\t\tget: function() {\n\t\t\t\treturn module.i;\n\t\t\t}\n\t\t});\n\t\tmodule.webpackPolyfill = 1;\n\t}\n\treturn module;\n};\n\n\n/***/ }),\n\n/***/ \"./package.json\":\n/*!**********************!*\\\n  !*** ./package.json ***!\n  \\**********************/\n/*! exports provided: name, version, description, main, keywords, scripts, repository, author, license, standard, dependencies, devDependencies, files, sideEffects, husky, default */\n/***/ (function(module) {\n\nmodule.exports = JSON.parse(\"{\\\"name\\\":\\\"mermaid\\\",\\\"version\\\":\\\"8.13.0\\\",\\\"description\\\":\\\"Markdownish syntax for generating flowcharts, sequence diagrams, class diagrams, gantt charts and git graphs.\\\",\\\"main\\\":\\\"dist/mermaid.core.js\\\",\\\"keywords\\\":[\\\"diagram\\\",\\\"markdown\\\",\\\"flowchart\\\",\\\"sequence diagram\\\",\\\"gantt\\\",\\\"class diagram\\\",\\\"git graph\\\"],\\\"scripts\\\":{\\\"build:development\\\":\\\"webpack --progress --color\\\",\\\"build:production\\\":\\\"yarn build:development --mode production --config webpack.config.prod.babel.js\\\",\\\"build\\\":\\\"yarn build:development && yarn build:production\\\",\\\"postbuild\\\":\\\"documentation build src/mermaidAPI.js src/config.js src/defaultConfig.js --shallow -f md --markdown-toc false > docs/Setup.md\\\",\\\"build:watch\\\":\\\"yarn build --watch\\\",\\\"release\\\":\\\"yarn build\\\",\\\"lint\\\":\\\"eslint src\\\",\\\"e2e:depr\\\":\\\"yarn lint && jest e2e --config e2e/jest.config.js\\\",\\\"cypress\\\":\\\"percy exec -- cypress run\\\",\\\"e2e\\\":\\\"start-server-and-test dev http://localhost:9000/ cypress\\\",\\\"e2e-upd\\\":\\\"yarn lint && jest e2e -u --config e2e/jest.config.js\\\",\\\"dev\\\":\\\"webpack serve --config webpack.config.e2e.js\\\",\\\"test\\\":\\\"yarn lint && jest src/.*\\\",\\\"test:watch\\\":\\\"jest --watch src\\\",\\\"prepublishOnly\\\":\\\"yarn build && yarn test\\\",\\\"prepare\\\":\\\"yarn build\\\"},\\\"repository\\\":{\\\"type\\\":\\\"git\\\",\\\"url\\\":\\\"https://github.com/knsv/mermaid\\\"},\\\"author\\\":\\\"Knut Sveidqvist\\\",\\\"license\\\":\\\"MIT\\\",\\\"standard\\\":{\\\"ignore\\\":[\\\"**/parser/*.js\\\",\\\"dist/**/*.js\\\",\\\"cypress/**/*.js\\\"],\\\"globals\\\":[\\\"page\\\"]},\\\"dependencies\\\":{\\\"@braintree/sanitize-url\\\":\\\"^3.1.0\\\",\\\"d3\\\":\\\"^7.0.0\\\",\\\"dagre\\\":\\\"^0.8.5\\\",\\\"dagre-d3\\\":\\\"^0.6.4\\\",\\\"dompurify\\\":\\\"2.3.3\\\",\\\"graphlib\\\":\\\"^2.1.8\\\",\\\"khroma\\\":\\\"^1.4.1\\\",\\\"moment-mini\\\":\\\"^2.24.0\\\",\\\"stylis\\\":\\\"^4.0.10\\\"},\\\"devDependencies\\\":{\\\"@babel/core\\\":\\\"^7.14.6\\\",\\\"@babel/eslint-parser\\\":\\\"^7.14.7\\\",\\\"@babel/preset-env\\\":\\\"^7.14.7\\\",\\\"@babel/register\\\":\\\"^7.14.5\\\",\\\"@percy/cli\\\":\\\"^1.0.0-beta.58\\\",\\\"@percy/cypress\\\":\\\"^3.1.0\\\",\\\"@percy/migrate\\\":\\\"^0.11.0\\\",\\\"babel-jest\\\":\\\"^27.0.6\\\",\\\"babel-loader\\\":\\\"^8.2.2\\\",\\\"coveralls\\\":\\\"^3.0.2\\\",\\\"css-to-string-loader\\\":\\\"^0.1.3\\\",\\\"cypress\\\":\\\"8.4.1\\\",\\\"documentation\\\":\\\"13.2.0\\\",\\\"eslint\\\":\\\"^7.30.0\\\",\\\"eslint-config-prettier\\\":\\\"^8.3.0\\\",\\\"eslint-plugin-prettier\\\":\\\"^4.0.0\\\",\\\"husky\\\":\\\"^7.0.1\\\",\\\"identity-obj-proxy\\\":\\\"^3.0.0\\\",\\\"jest\\\":\\\"^27.0.6\\\",\\\"jison\\\":\\\"^0.4.18\\\",\\\"js-base64\\\":\\\"3.7.1\\\",\\\"moment\\\":\\\"^2.23.0\\\",\\\"prettier\\\":\\\"^2.3.2\\\",\\\"start-server-and-test\\\":\\\"^1.12.6\\\",\\\"terser-webpack-plugin\\\":\\\"^4.2.3\\\",\\\"webpack\\\":\\\"^4.41.2\\\",\\\"webpack-cli\\\":\\\"^4.7.2\\\",\\\"webpack-dev-server\\\":\\\"^4.2.1\\\",\\\"webpack-node-externals\\\":\\\"^3.0.0\\\"},\\\"files\\\":[\\\"dist\\\"],\\\"sideEffects\\\":[\\\"**/*.css\\\",\\\"**/*.scss\\\"],\\\"husky\\\":{\\\"hooks\\\":{\\\"pre-push\\\":\\\"yarn test\\\"}}}\");\n\n/***/ }),\n\n/***/ \"./src/config.js\":\n/*!***********************!*\\\n  !*** ./src/config.js ***!\n  \\***********************/\n/*! exports provided: defaultConfig, updateCurrentConfig, setSiteConfig, saveConfigFromInitilize, updateSiteConfig, getSiteConfig, setConfig, getConfig, sanitize, addDirective, reset */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"defaultConfig\", function() { return defaultConfig; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"updateCurrentConfig\", function() { return updateCurrentConfig; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"setSiteConfig\", function() { return setSiteConfig; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"saveConfigFromInitilize\", function() { return saveConfigFromInitilize; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"updateSiteConfig\", function() { return updateSiteConfig; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getSiteConfig\", function() { return getSiteConfig; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"setConfig\", function() { return setConfig; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getConfig\", function() { return getConfig; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"sanitize\", function() { return sanitize; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"addDirective\", function() { return addDirective; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"reset\", function() { return reset; });\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./utils */ \"./src/utils.js\");\n/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./logger */ \"./src/logger.js\");\n/* harmony import */ var _themes__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./themes */ \"./src/themes/index.js\");\n/* harmony import */ var _defaultConfig__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./defaultConfig */ \"./src/defaultConfig.js\");\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n\n\n\n // debugger;\n\nvar defaultConfig = Object.freeze(_defaultConfig__WEBPACK_IMPORTED_MODULE_3__[\"default\"]);\nvar siteConfig = Object(_utils__WEBPACK_IMPORTED_MODULE_0__[\"assignWithDepth\"])({}, defaultConfig);\nvar configFromInitialize;\nvar directives = [];\nvar currentConfig = Object(_utils__WEBPACK_IMPORTED_MODULE_0__[\"assignWithDepth\"])({}, defaultConfig);\nvar updateCurrentConfig = function updateCurrentConfig(siteCfg, _directives) {\n  // start with config beeing the siteConfig\n  var cfg = Object(_utils__WEBPACK_IMPORTED_MODULE_0__[\"assignWithDepth\"])({}, siteCfg); // let sCfg = assignWithDepth(defaultConfig, siteConfigDelta);\n  // Join directives\n\n  var sumOfDirectives = {};\n\n  for (var i = 0; i < _directives.length; i++) {\n    var d = _directives[i];\n    sanitize(d); // Apply the data from the directive where the the overrides the themeVaraibles\n\n    sumOfDirectives = Object(_utils__WEBPACK_IMPORTED_MODULE_0__[\"assignWithDepth\"])(sumOfDirectives, d);\n  }\n\n  cfg = Object(_utils__WEBPACK_IMPORTED_MODULE_0__[\"assignWithDepth\"])(cfg, sumOfDirectives);\n\n  if (sumOfDirectives.theme) {\n    var tmpConfigFromInitialize = Object(_utils__WEBPACK_IMPORTED_MODULE_0__[\"assignWithDepth\"])({}, configFromInitialize);\n    var themeVariables = Object(_utils__WEBPACK_IMPORTED_MODULE_0__[\"assignWithDepth\"])(tmpConfigFromInitialize.themeVariables || {}, sumOfDirectives.themeVariables);\n    cfg.themeVariables = _themes__WEBPACK_IMPORTED_MODULE_2__[\"default\"][cfg.theme].getThemeVariables(themeVariables);\n  }\n\n  currentConfig = cfg;\n  return cfg;\n};\n/**\n *## setSiteConfig\n *| Function | Description         | Type    | Values             |\n *| --------- | ------------------- | ------- | ------------------ |\n *| setSiteConfig|Sets the siteConfig to desired values | Put Request | Any Values, except ones in secure array|\n ***Notes:**\n *Sets the siteConfig. The siteConfig is a protected configuration for repeat use. Calls to reset() will reset\n *the currentConfig to siteConfig. Calls to reset(configApi.defaultConfig) will reset siteConfig and currentConfig\n *to the defaultConfig\n *Note: currentConfig is set in this function\n **Default value: At default, will mirror Global Config**\n * @param conf - the base currentConfig to use as siteConfig\n * @returns {*} - the siteConfig\n */\n\nvar setSiteConfig = function setSiteConfig(conf) {\n  siteConfig = Object(_utils__WEBPACK_IMPORTED_MODULE_0__[\"assignWithDepth\"])({}, defaultConfig);\n  siteConfig = Object(_utils__WEBPACK_IMPORTED_MODULE_0__[\"assignWithDepth\"])(siteConfig, conf);\n\n  if (conf.theme) {\n    siteConfig.themeVariables = _themes__WEBPACK_IMPORTED_MODULE_2__[\"default\"][conf.theme].getThemeVariables(conf.themeVariables);\n  }\n\n  currentConfig = updateCurrentConfig(siteConfig, directives);\n  return siteConfig;\n};\nvar saveConfigFromInitilize = function saveConfigFromInitilize(conf) {\n  configFromInitialize = Object(_utils__WEBPACK_IMPORTED_MODULE_0__[\"assignWithDepth\"])({}, conf);\n};\nvar updateSiteConfig = function updateSiteConfig(conf) {\n  siteConfig = Object(_utils__WEBPACK_IMPORTED_MODULE_0__[\"assignWithDepth\"])(siteConfig, conf);\n  updateCurrentConfig(siteConfig, directives);\n  return siteConfig;\n};\n/**\n *## getSiteConfig\n *| Function | Description         | Type    |  Values             |\n *| --------- | ------------------- | ------- |  ------------------ |\n *| setSiteConfig|Returns the current siteConfig base configuration | Get Request | Returns Any Values  in siteConfig|\n ***Notes**:\n *Returns **any** values in siteConfig.\n * @returns {*}\n */\n\nvar getSiteConfig = function getSiteConfig() {\n  return Object(_utils__WEBPACK_IMPORTED_MODULE_0__[\"assignWithDepth\"])({}, siteConfig);\n};\n/**\n *## setConfig\n *| Function  | Description         | Type    | Values             |\n *| --------- | ------------------- | ------- | ------------------ |\n *| setSiteConfig|Sets the siteConfig to desired values | Put Request| Any Values, except ones in secure array|\n ***Notes**:\n *Sets the currentConfig. The parameter conf is sanitized based on the siteConfig.secure keys. Any\n *values found in conf with key found in siteConfig.secure will be replaced with the corresponding\n *siteConfig value.\n * @param conf - the potential currentConfig\n * @returns {*} - the currentConfig merged with the sanitized conf\n */\n\nvar setConfig = function setConfig(conf) {\n  // sanitize(conf);\n  // Object.keys(conf).forEach(key => {\n  //   const manipulator = manipulators[key];\n  //   conf[key] = manipulator ? manipulator(conf[key]) : conf[key];\n  // });\n  Object(_utils__WEBPACK_IMPORTED_MODULE_0__[\"assignWithDepth\"])(currentConfig, conf);\n  return getConfig();\n};\n/**\n *   ## getConfig\n *| Function  | Description         | Type    | Return Values            |\n *| --------- | ------------------- | ------- | ------------------ |\n *| getConfig |Obtains the currentConfig | Get Request | Any Values from currentConfig|\n ***Notes**:\n *Returns **any** the currentConfig\n * @returns {*} - the currentConfig\n */\n\nvar getConfig = function getConfig() {\n  return Object(_utils__WEBPACK_IMPORTED_MODULE_0__[\"assignWithDepth\"])({}, currentConfig);\n};\n/**\n *## sanitize\n *| Function | Description         | Type    | Values             |\n *| --------- | ------------------- | ------- | ------------------ |\n *| sanitize  |Sets the siteConfig to desired values. | Put Request |None|\n *Ensures options parameter does not attempt to override siteConfig secure keys\n *Note: modifies options in-place\n * @param options - the potential setConfig parameter\n */\n\nvar sanitize = function sanitize(options) {\n  // Checking that options are not in the list of excluded options\n  Object.keys(siteConfig.secure).forEach(function (key) {\n    if (typeof options[siteConfig.secure[key]] !== 'undefined') {\n      // DO NOT attempt to print options[siteConfig.secure[key]] within `${}` as a malicious script\n      // can exploit the logger's attempt to stringify the value and execute arbitrary code\n      _logger__WEBPACK_IMPORTED_MODULE_1__[\"log\"].debug(\"Denied attempt to modify a secure key \".concat(siteConfig.secure[key]), options[siteConfig.secure[key]]);\n      delete options[siteConfig.secure[key]];\n    }\n  }); // Check that there no attempts of prototype pollution\n\n  Object.keys(options).forEach(function (key) {\n    if (key.indexOf('__') === 0) {\n      delete options[key];\n    }\n  }); // Check that there no attempts of xss, there should be no tags at all in the directive\n  // blocking data urls as base64 urls can contain svgs with inline script tags\n\n  Object.keys(options).forEach(function (key) {\n    if (typeof options[key] === 'string') {\n      if (options[key].indexOf('<') > -1 || options[key].indexOf('>') > -1 || options[key].indexOf('url(data:') > -1) {\n        delete options[key];\n      }\n    }\n\n    if (_typeof(options[key]) === 'object') {\n      sanitize(options[key]);\n    }\n  });\n};\nvar addDirective = function addDirective(directive) {\n  if (directive.fontFamily) {\n    if (!directive.themeVariables) {\n      directive.themeVariables = {\n        fontFamily: directive.fontFamily\n      };\n    } else {\n      if (!directive.themeVariables.fontFamily) {\n        directive.themeVariables = {\n          fontFamily: directive.fontFamily\n        };\n      }\n    }\n  }\n\n  directives.push(directive);\n  updateCurrentConfig(siteConfig, directives);\n};\n/**\n *## reset\n *| Function | Description         | Type    | Required | Values             |\n *| --------- | ------------------- | ------- | -------- | ------------------ |\n *| reset|Resets currentConfig to conf| Put Request | Required | None|\n *\n *| Parameter | Description |Type | Required | Values|\n *| --- | --- | --- | --- | --- |\n *| conf| base set of values, which currentConfig coul be **reset** to.| Dictionary | Required | Any Values, with respect to the secure Array|\n *\n **Notes :\n (default: current siteConfig ) (optional, default `getSiteConfig()`)\n * @param conf  the base currentConfig to reset to (default: current siteConfig ) (optional, default `getSiteConfig()`)\n */\n\nvar reset = function reset() {\n  // Replace current config with siteConfig\n  directives = [];\n  updateCurrentConfig(siteConfig, directives);\n};\n\n/***/ }),\n\n/***/ \"./src/dagre-wrapper/clusters.js\":\n/*!***************************************!*\\\n  !*** ./src/dagre-wrapper/clusters.js ***!\n  \\***************************************/\n/*! exports provided: insertCluster, getClusterTitleWidth, clear, positionCluster */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"insertCluster\", function() { return insertCluster; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getClusterTitleWidth\", function() { return getClusterTitleWidth; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"clear\", function() { return clear; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"positionCluster\", function() { return positionCluster; });\n/* harmony import */ var _intersect_intersect_rect__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./intersect/intersect-rect */ \"./src/dagre-wrapper/intersect/intersect-rect.js\");\n/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../logger */ \"./src/logger.js\");\n/* harmony import */ var _createLabel__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./createLabel */ \"./src/dagre-wrapper/createLabel.js\");\n/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! d3 */ \"./node_modules/d3/src/index.js\");\n/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../config */ \"./src/config.js\");\n/* harmony import */ var _diagrams_common_common__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../diagrams/common/common */ \"./src/diagrams/common/common.js\");\n\n\n\n\n\n\n\nvar rect = function rect(parent, node) {\n  _logger__WEBPACK_IMPORTED_MODULE_1__[\"log\"].trace('Creating subgraph rect for ', node.id, node); // Add outer g element\n\n  var shapeSvg = parent.insert('g').attr('class', 'cluster' + (node.class ? ' ' + node.class : '')).attr('id', node.id); // add the rect\n\n  var rect = shapeSvg.insert('rect', ':first-child'); // Create the label and insert it after the rect\n\n  var label = shapeSvg.insert('g').attr('class', 'cluster-label');\n  var text = label.node().appendChild(Object(_createLabel__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(node.labelText, node.labelStyle, undefined, true)); // Get the size of the label\n\n  var bbox = text.getBBox();\n\n  if (Object(_diagrams_common_common__WEBPACK_IMPORTED_MODULE_5__[\"evaluate\"])(Object(_config__WEBPACK_IMPORTED_MODULE_4__[\"getConfig\"])().flowchart.htmlLabels)) {\n    var div = text.children[0];\n    var dv = Object(d3__WEBPACK_IMPORTED_MODULE_3__[\"select\"])(text);\n    bbox = div.getBoundingClientRect();\n    dv.attr('width', bbox.width);\n    dv.attr('height', bbox.height);\n  }\n\n  var padding = 0 * node.padding;\n  var halfPadding = padding / 2;\n  var width = node.width <= bbox.width + padding ? bbox.width + padding : node.width;\n\n  if (node.width <= bbox.width + padding) {\n    node.diff = (bbox.width - node.width) / 2;\n  } else {\n    node.diff = -node.padding / 2;\n  }\n\n  _logger__WEBPACK_IMPORTED_MODULE_1__[\"log\"].trace('Data ', node, JSON.stringify(node)); // center the rect around its coordinate\n\n  rect.attr('style', node.style).attr('rx', node.rx).attr('ry', node.ry).attr('x', node.x - width / 2).attr('y', node.y - node.height / 2 - halfPadding).attr('width', width).attr('height', node.height + padding); // Center the label\n\n  label.attr('transform', 'translate(' + (node.x - bbox.width / 2) + ', ' + (node.y - node.height / 2 + node.padding / 3) + ')');\n  var rectBox = rect.node().getBBox();\n  node.width = rectBox.width;\n  node.height = rectBox.height;\n\n  node.intersect = function (point) {\n    return Object(_intersect_intersect_rect__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(node, point);\n  };\n\n  return shapeSvg;\n};\n/**\n * Non visiable cluster where the note is group with its\n */\n\n\nvar noteGroup = function noteGroup(parent, node) {\n  // Add outer g element\n  var shapeSvg = parent.insert('g').attr('class', 'note-cluster').attr('id', node.id); // add the rect\n\n  var rect = shapeSvg.insert('rect', ':first-child');\n  var padding = 0 * node.padding;\n  var halfPadding = padding / 2; // center the rect around its coordinate\n\n  rect.attr('rx', node.rx).attr('ry', node.ry).attr('x', node.x - node.width / 2 - halfPadding).attr('y', node.y - node.height / 2 - halfPadding).attr('width', node.width + padding).attr('height', node.height + padding).attr('fill', 'none');\n  var rectBox = rect.node().getBBox();\n  node.width = rectBox.width;\n  node.height = rectBox.height;\n\n  node.intersect = function (point) {\n    return Object(_intersect_intersect_rect__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(node, point);\n  };\n\n  return shapeSvg;\n};\n\nvar roundedWithTitle = function roundedWithTitle(parent, node) {\n  // Add outer g element\n  var shapeSvg = parent.insert('g').attr('class', node.classes).attr('id', node.id); // add the rect\n\n  var rect = shapeSvg.insert('rect', ':first-child'); // Create the label and insert it after the rect\n\n  var label = shapeSvg.insert('g').attr('class', 'cluster-label');\n  var innerRect = shapeSvg.append('rect');\n  var text = label.node().appendChild(Object(_createLabel__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(node.labelText, node.labelStyle, undefined, true)); // Get the size of the label\n\n  var bbox = text.getBBox();\n\n  if (Object(_diagrams_common_common__WEBPACK_IMPORTED_MODULE_5__[\"evaluate\"])(Object(_config__WEBPACK_IMPORTED_MODULE_4__[\"getConfig\"])().flowchart.htmlLabels)) {\n    var div = text.children[0];\n    var dv = Object(d3__WEBPACK_IMPORTED_MODULE_3__[\"select\"])(text);\n    bbox = div.getBoundingClientRect();\n    dv.attr('width', bbox.width);\n    dv.attr('height', bbox.height);\n  }\n\n  bbox = text.getBBox();\n  var padding = 0 * node.padding;\n  var halfPadding = padding / 2;\n  var width = node.width <= bbox.width + node.padding ? bbox.width + node.padding : node.width;\n\n  if (node.width <= bbox.width + node.padding) {\n    node.diff = (bbox.width + node.padding * 0 - node.width) / 2;\n  } else {\n    node.diff = -node.padding / 2;\n  } // center the rect around its coordinate\n\n\n  rect.attr('class', 'outer').attr('x', node.x - width / 2 - halfPadding).attr('y', node.y - node.height / 2 - halfPadding).attr('width', width + padding).attr('height', node.height + padding);\n  innerRect.attr('class', 'inner').attr('x', node.x - width / 2 - halfPadding).attr('y', node.y - node.height / 2 - halfPadding + bbox.height - 1).attr('width', width + padding).attr('height', node.height + padding - bbox.height - 3); // Center the label\n\n  label.attr('transform', 'translate(' + (node.x - bbox.width / 2) + ', ' + (node.y - node.height / 2 - node.padding / 3 + (Object(_diagrams_common_common__WEBPACK_IMPORTED_MODULE_5__[\"evaluate\"])(Object(_config__WEBPACK_IMPORTED_MODULE_4__[\"getConfig\"])().flowchart.htmlLabels) ? 5 : 3)) + ')');\n  var rectBox = rect.node().getBBox();\n  node.height = rectBox.height;\n\n  node.intersect = function (point) {\n    return Object(_intersect_intersect_rect__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(node, point);\n  };\n\n  return shapeSvg;\n};\n\nvar divider = function divider(parent, node) {\n  // Add outer g element\n  var shapeSvg = parent.insert('g').attr('class', node.classes).attr('id', node.id); // add the rect\n\n  var rect = shapeSvg.insert('rect', ':first-child');\n  var padding = 0 * node.padding;\n  var halfPadding = padding / 2; // center the rect around its coordinate\n\n  rect.attr('class', 'divider').attr('x', node.x - node.width / 2 - halfPadding).attr('y', node.y - node.height / 2).attr('width', node.width + padding).attr('height', node.height + padding);\n  var rectBox = rect.node().getBBox();\n  node.width = rectBox.width;\n  node.height = rectBox.height;\n  node.diff = -node.padding / 2;\n\n  node.intersect = function (point) {\n    return Object(_intersect_intersect_rect__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(node, point);\n  };\n\n  return shapeSvg;\n};\n\nvar shapes = {\n  rect: rect,\n  roundedWithTitle: roundedWithTitle,\n  noteGroup: noteGroup,\n  divider: divider\n};\nvar clusterElems = {};\nvar insertCluster = function insertCluster(elem, node) {\n  _logger__WEBPACK_IMPORTED_MODULE_1__[\"log\"].trace('Inserting cluster');\n  var shape = node.shape || 'rect';\n  clusterElems[node.id] = shapes[shape](elem, node);\n};\nvar getClusterTitleWidth = function getClusterTitleWidth(elem, node) {\n  var label = Object(_createLabel__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(node.labelText, node.labelStyle, undefined, true);\n  elem.node().appendChild(label);\n  var width = label.getBBox().width;\n  elem.node().removeChild(label);\n  return width;\n};\nvar clear = function clear() {\n  clusterElems = {};\n};\nvar positionCluster = function positionCluster(node) {\n  _logger__WEBPACK_IMPORTED_MODULE_1__[\"log\"].info('Position cluster (' + node.id + ', ' + node.x + ', ' + node.y + ')');\n  var el = clusterElems[node.id];\n  el.attr('transform', 'translate(' + node.x + ', ' + node.y + ')');\n};\n\n/***/ }),\n\n/***/ \"./src/dagre-wrapper/createLabel.js\":\n/*!******************************************!*\\\n  !*** ./src/dagre-wrapper/createLabel.js ***!\n  \\******************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3 */ \"./node_modules/d3/src/index.js\");\n/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../logger */ \"./src/logger.js\");\n/* harmony import */ var _diagrams_common_common__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../diagrams/common/common */ \"./src/diagrams/common/common.js\");\n/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../config */ \"./src/config.js\");\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n\n // eslint-disable-line\n\n // let vertexNode;\n// if (evaluate(getConfig().flowchart.htmlLabels)) {\n//   // TODO: addHtmlLabel accepts a labelStyle. Do we possibly have that?\n//   const node = {\n//     label: vertexText.replace(/fa[lrsb]?:fa-[\\w-]+/g, s => `<i class='${s.replace(':', ' ')}'></i>`)\n//   };\n//   vertexNode = addHtmlLabel(svg, node).node();\n//   vertexNode.parentNode.removeChild(vertexNode);\n// } else {\n//   const svgLabel = document.createElementNS('http://www.w3.org/2000/svg', 'text');\n//   svgLabel.setAttribute('style', styles.labelStyle.replace('color:', 'fill:'));\n//   const rows = vertexText.split(common.lineBreakRegex);\n//   for (let j = 0; j < rows.length; j++) {\n//     const tspan = document.createElementNS('http://www.w3.org/2000/svg', 'tspan');\n//     tspan.setAttributeNS('http://www.w3.org/XML/1998/namespace', 'xml:space', 'preserve');\n//     tspan.setAttribute('dy', '1em');\n//     tspan.setAttribute('x', '1');\n//     tspan.textContent = rows[j];\n//     svgLabel.appendChild(tspan);\n//   }\n//   vertexNode = svgLabel;\n// }\n\n\n\nfunction applyStyle(dom, styleFn) {\n  if (styleFn) {\n    dom.attr('style', styleFn);\n  }\n}\n\nfunction addHtmlLabel(node) {\n  // var fo = root.append('foreignObject').attr('width', '100000');\n  // var div = fo.append('xhtml:div');\n  // div.attr('xmlns', 'http://www.w3.org/1999/xhtml');\n  // var label = node.label;\n  // switch (typeof label) {\n  //   case 'function':\n  //     div.insert(label);\n  //     break;\n  //   case 'object':\n  //     // Currently we assume this is a DOM object.\n  //     div.insert(function() {\n  //       return label;\n  //     });\n  //     break;\n  //   default:\n  //     div.html(label);\n  // }\n  // applyStyle(div, node.labelStyle);\n  // div.style('display', 'inline-block');\n  // // Fix for firefox\n  // div.style('white-space', 'nowrap');\n  // var client = div.node().getBoundingClientRect();\n  // fo.attr('width', client.width).attr('height', client.height);\n  var fo = Object(d3__WEBPACK_IMPORTED_MODULE_0__[\"select\"])(document.createElementNS('http://www.w3.org/2000/svg', 'foreignObject'));\n  var div = fo.append('xhtml:div');\n  var label = node.label;\n  var labelClass = node.isNode ? 'nodeLabel' : 'edgeLabel';\n  div.html('<span class=\"' + labelClass + '\" ' + (node.labelStyle ? 'style=\"' + node.labelStyle + '\"' : '') + '>' + label + '</span>');\n  applyStyle(div, node.labelStyle);\n  div.style('display', 'inline-block'); // Fix for firefox\n\n  div.style('white-space', 'nowrap');\n  div.attr('xmlns', 'http://www.w3.org/1999/xhtml');\n  return fo.node();\n}\n\nvar createLabel = function createLabel(_vertexText, style, isTitle, isNode) {\n  var vertexText = _vertexText || '';\n  if (_typeof(vertexText) === 'object') vertexText = vertexText[0];\n\n  if (Object(_diagrams_common_common__WEBPACK_IMPORTED_MODULE_2__[\"evaluate\"])(Object(_config__WEBPACK_IMPORTED_MODULE_3__[\"getConfig\"])().flowchart.htmlLabels)) {\n    // TODO: addHtmlLabel accepts a labelStyle. Do we possibly have that?\n    vertexText = vertexText.replace(/\\\\n|\\n/g, '<br />');\n    _logger__WEBPACK_IMPORTED_MODULE_1__[\"log\"].info('vertexText' + vertexText);\n    var node = {\n      isNode: isNode,\n      label: vertexText.replace(/fa[lrsb]?:fa-[\\w-]+/g, function (s) {\n        return \"<i class='\".concat(s.replace(':', ' '), \"'></i>\");\n      }),\n      labelStyle: style.replace('fill:', 'color:')\n    };\n    var vertexNode = addHtmlLabel(node); // vertexNode.parentNode.removeChild(vertexNode);\n\n    return vertexNode;\n  } else {\n    var svgLabel = document.createElementNS('http://www.w3.org/2000/svg', 'text');\n    svgLabel.setAttribute('style', style.replace('color:', 'fill:'));\n    var rows = [];\n\n    if (typeof vertexText === 'string') {\n      rows = vertexText.split(/\\\\n|\\n|<br\\s*\\/?>/gi);\n    } else if (Array.isArray(vertexText)) {\n      rows = vertexText;\n    } else {\n      rows = [];\n    }\n\n    for (var j = 0; j < rows.length; j++) {\n      var tspan = document.createElementNS('http://www.w3.org/2000/svg', 'tspan');\n      tspan.setAttributeNS('http://www.w3.org/XML/1998/namespace', 'xml:space', 'preserve');\n      tspan.setAttribute('dy', '1em');\n      tspan.setAttribute('x', '0');\n\n      if (isTitle) {\n        tspan.setAttribute('class', 'title-row');\n      } else {\n        tspan.setAttribute('class', 'row');\n      }\n\n      tspan.textContent = rows[j].trim();\n      svgLabel.appendChild(tspan);\n    }\n\n    return svgLabel;\n  }\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (createLabel);\n\n/***/ }),\n\n/***/ \"./src/dagre-wrapper/edges.js\":\n/*!************************************!*\\\n  !*** ./src/dagre-wrapper/edges.js ***!\n  \\************************************/\n/*! exports provided: clear, insertEdgeLabel, positionEdgeLabel, intersection, insertEdge */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"clear\", function() { return clear; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"insertEdgeLabel\", function() { return insertEdgeLabel; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"positionEdgeLabel\", function() { return positionEdgeLabel; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"intersection\", function() { return intersection; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"insertEdge\", function() { return insertEdge; });\n/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../logger */ \"./src/logger.js\");\n/* harmony import */ var _createLabel__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./createLabel */ \"./src/dagre-wrapper/createLabel.js\");\n/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! d3 */ \"./node_modules/d3/src/index.js\");\n/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../config */ \"./src/config.js\");\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../utils */ \"./src/utils.js\");\n/* harmony import */ var _diagrams_common_common__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../diagrams/common/common */ \"./src/diagrams/common/common.js\");\n // eslint-disable-line\n\n // import { line, curveBasis, curveLinear, select } from 'd3';\n\n\n\n\n\nvar edgeLabels = {};\nvar terminalLabels = {};\nvar clear = function clear() {\n  edgeLabels = {};\n  terminalLabels = {};\n};\nvar insertEdgeLabel = function insertEdgeLabel(elem, edge) {\n  // Create the actual text element\n  var labelElement = Object(_createLabel__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(edge.label, edge.labelStyle); // Create outer g, edgeLabel, this will be positioned after graph layout\n\n  var edgeLabel = elem.insert('g').attr('class', 'edgeLabel'); // Create inner g, label, this will be positioned now for centering the text\n\n  var label = edgeLabel.insert('g').attr('class', 'label');\n  label.node().appendChild(labelElement); // Center the label\n\n  var bbox = labelElement.getBBox();\n\n  if (Object(_diagrams_common_common__WEBPACK_IMPORTED_MODULE_5__[\"evaluate\"])(Object(_config__WEBPACK_IMPORTED_MODULE_3__[\"getConfig\"])().flowchart.htmlLabels)) {\n    var div = labelElement.children[0];\n    var dv = Object(d3__WEBPACK_IMPORTED_MODULE_2__[\"select\"])(labelElement);\n    bbox = div.getBoundingClientRect();\n    dv.attr('width', bbox.width);\n    dv.attr('height', bbox.height);\n  }\n\n  label.attr('transform', 'translate(' + -bbox.width / 2 + ', ' + -bbox.height / 2 + ')'); // Make element accessible by id for positioning\n\n  edgeLabels[edge.id] = edgeLabel; // Update the abstract data of the edge with the new information about its width and height\n\n  edge.width = bbox.width;\n  edge.height = bbox.height;\n  var fo;\n\n  if (edge.startLabelLeft) {\n    // Create the actual text element\n    var startLabelElement = Object(_createLabel__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(edge.startLabelLeft, edge.labelStyle);\n    var startEdgeLabelLeft = elem.insert('g').attr('class', 'edgeTerminals');\n    var inner = startEdgeLabelLeft.insert('g').attr('class', 'inner');\n    fo = inner.node().appendChild(startLabelElement);\n    var slBox = startLabelElement.getBBox();\n    inner.attr('transform', 'translate(' + -slBox.width / 2 + ', ' + -slBox.height / 2 + ')');\n\n    if (!terminalLabels[edge.id]) {\n      terminalLabels[edge.id] = {};\n    }\n\n    terminalLabels[edge.id].startLeft = startEdgeLabelLeft;\n    setTerminalWidth(fo, edge.startLabelLeft);\n  }\n\n  if (edge.startLabelRight) {\n    // Create the actual text element\n    var _startLabelElement = Object(_createLabel__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(edge.startLabelRight, edge.labelStyle);\n\n    var startEdgeLabelRight = elem.insert('g').attr('class', 'edgeTerminals');\n\n    var _inner = startEdgeLabelRight.insert('g').attr('class', 'inner');\n\n    fo = startEdgeLabelRight.node().appendChild(_startLabelElement);\n\n    _inner.node().appendChild(_startLabelElement);\n\n    var _slBox = _startLabelElement.getBBox();\n\n    _inner.attr('transform', 'translate(' + -_slBox.width / 2 + ', ' + -_slBox.height / 2 + ')');\n\n    if (!terminalLabels[edge.id]) {\n      terminalLabels[edge.id] = {};\n    }\n\n    terminalLabels[edge.id].startRight = startEdgeLabelRight;\n    setTerminalWidth(fo, edge.startLabelRight);\n  }\n\n  if (edge.endLabelLeft) {\n    // Create the actual text element\n    var endLabelElement = Object(_createLabel__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(edge.endLabelLeft, edge.labelStyle);\n    var endEdgeLabelLeft = elem.insert('g').attr('class', 'edgeTerminals');\n\n    var _inner2 = endEdgeLabelLeft.insert('g').attr('class', 'inner');\n\n    fo = _inner2.node().appendChild(endLabelElement);\n\n    var _slBox2 = endLabelElement.getBBox();\n\n    _inner2.attr('transform', 'translate(' + -_slBox2.width / 2 + ', ' + -_slBox2.height / 2 + ')');\n\n    endEdgeLabelLeft.node().appendChild(endLabelElement);\n\n    if (!terminalLabels[edge.id]) {\n      terminalLabels[edge.id] = {};\n    }\n\n    terminalLabels[edge.id].endLeft = endEdgeLabelLeft;\n    setTerminalWidth(fo, edge.endLabelLeft);\n  }\n\n  if (edge.endLabelRight) {\n    // Create the actual text element\n    var _endLabelElement = Object(_createLabel__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(edge.endLabelRight, edge.labelStyle);\n\n    var endEdgeLabelRight = elem.insert('g').attr('class', 'edgeTerminals');\n\n    var _inner3 = endEdgeLabelRight.insert('g').attr('class', 'inner');\n\n    fo = _inner3.node().appendChild(_endLabelElement);\n\n    var _slBox3 = _endLabelElement.getBBox();\n\n    _inner3.attr('transform', 'translate(' + -_slBox3.width / 2 + ', ' + -_slBox3.height / 2 + ')');\n\n    endEdgeLabelRight.node().appendChild(_endLabelElement);\n\n    if (!terminalLabels[edge.id]) {\n      terminalLabels[edge.id] = {};\n    }\n\n    terminalLabels[edge.id].endRight = endEdgeLabelRight;\n    setTerminalWidth(fo, edge.endLabelRight);\n  }\n};\n\nfunction setTerminalWidth(fo, value) {\n  if (Object(_config__WEBPACK_IMPORTED_MODULE_3__[\"getConfig\"])().flowchart.htmlLabels && fo) {\n    fo.style.width = value.length * 9 + 'px';\n    fo.style.height = '12px';\n  }\n}\n\nvar positionEdgeLabel = function positionEdgeLabel(edge, paths) {\n  _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].info('Moving label abc78 ', edge.id, edge.label, edgeLabels[edge.id]);\n  var path = paths.updatedPath ? paths.updatedPath : paths.originalPath;\n\n  if (edge.label) {\n    var el = edgeLabels[edge.id];\n    var x = edge.x;\n    var y = edge.y;\n\n    if (path) {\n      //   // debugger;\n      var pos = _utils__WEBPACK_IMPORTED_MODULE_4__[\"default\"].calcLabelPosition(path);\n      _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].info('Moving label from (', x, ',', y, ') to (', pos.x, ',', pos.y, ') abc78'); // x = pos.x;\n      // y = pos.y;\n    }\n\n    el.attr('transform', 'translate(' + x + ', ' + y + ')');\n  } //let path = paths.updatedPath ? paths.updatedPath : paths.originalPath;\n\n\n  if (edge.startLabelLeft) {\n    var _el = terminalLabels[edge.id].startLeft;\n    var _x2 = edge.x;\n    var _y2 = edge.y;\n\n    if (path) {\n      // debugger;\n      var _pos = _utils__WEBPACK_IMPORTED_MODULE_4__[\"default\"].calcTerminalLabelPosition(edge.arrowTypeStart ? 10 : 0, 'start_left', path);\n\n      _x2 = _pos.x;\n      _y2 = _pos.y;\n    }\n\n    _el.attr('transform', 'translate(' + _x2 + ', ' + _y2 + ')');\n  }\n\n  if (edge.startLabelRight) {\n    var _el2 = terminalLabels[edge.id].startRight;\n    var _x3 = edge.x;\n    var _y3 = edge.y;\n\n    if (path) {\n      // debugger;\n      var _pos2 = _utils__WEBPACK_IMPORTED_MODULE_4__[\"default\"].calcTerminalLabelPosition(edge.arrowTypeStart ? 10 : 0, 'start_right', path);\n\n      _x3 = _pos2.x;\n      _y3 = _pos2.y;\n    }\n\n    _el2.attr('transform', 'translate(' + _x3 + ', ' + _y3 + ')');\n  }\n\n  if (edge.endLabelLeft) {\n    var _el3 = terminalLabels[edge.id].endLeft;\n    var _x4 = edge.x;\n    var _y4 = edge.y;\n\n    if (path) {\n      // debugger;\n      var _pos3 = _utils__WEBPACK_IMPORTED_MODULE_4__[\"default\"].calcTerminalLabelPosition(edge.arrowTypeEnd ? 10 : 0, 'end_left', path);\n\n      _x4 = _pos3.x;\n      _y4 = _pos3.y;\n    }\n\n    _el3.attr('transform', 'translate(' + _x4 + ', ' + _y4 + ')');\n  }\n\n  if (edge.endLabelRight) {\n    var _el4 = terminalLabels[edge.id].endRight;\n    var _x5 = edge.x;\n    var _y5 = edge.y;\n\n    if (path) {\n      // debugger;\n      var _pos4 = _utils__WEBPACK_IMPORTED_MODULE_4__[\"default\"].calcTerminalLabelPosition(edge.arrowTypeEnd ? 10 : 0, 'end_right', path);\n\n      _x5 = _pos4.x;\n      _y5 = _pos4.y;\n    }\n\n    _el4.attr('transform', 'translate(' + _x5 + ', ' + _y5 + ')');\n  }\n}; // const getRelationType = function(type) {\n//   switch (type) {\n//     case stateDb.relationType.AGGREGATION:\n//       return 'aggregation';\n//     case stateDb.relationType.EXTENSION:\n//       return 'extension';\n//     case stateDb.relationType.COMPOSITION:\n//       return 'composition';\n//     case stateDb.relationType.DEPENDENCY:\n//       return 'dependency';\n//   }\n// };\n\nvar outsideNode = function outsideNode(node, point) {\n  // log.warn('Checking bounds ', node, point);\n  var x = node.x;\n  var y = node.y;\n  var dx = Math.abs(point.x - x);\n  var dy = Math.abs(point.y - y);\n  var w = node.width / 2;\n  var h = node.height / 2;\n\n  if (dx >= w || dy >= h) {\n    return true;\n  }\n\n  return false;\n};\n\nvar intersection = function intersection(node, outsidePoint, insidePoint) {\n  _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].warn(\"intersection calc abc89:\\n  outsidePoint: \".concat(JSON.stringify(outsidePoint), \"\\n  insidePoint : \").concat(JSON.stringify(insidePoint), \"\\n  node        : x:\").concat(node.x, \" y:\").concat(node.y, \" w:\").concat(node.width, \" h:\").concat(node.height));\n  var x = node.x;\n  var y = node.y;\n  var dx = Math.abs(x - insidePoint.x); // const dy = Math.abs(y - insidePoint.y);\n\n  var w = node.width / 2;\n  var r = insidePoint.x < outsidePoint.x ? w - dx : w + dx;\n  var h = node.height / 2; // const edges = {\n  //   x1: x - w,\n  //   x2: x + w,\n  //   y1: y - h,\n  //   y2: y + h\n  // };\n  // if (\n  //   outsidePoint.x === edges.x1 ||\n  //   outsidePoint.x === edges.x2 ||\n  //   outsidePoint.y === edges.y1 ||\n  //   outsidePoint.y === edges.y2\n  // ) {\n  //   log.warn('abc89 calc equals on edge', outsidePoint, edges);\n  //   return outsidePoint;\n  // }\n\n  var Q = Math.abs(outsidePoint.y - insidePoint.y);\n  var R = Math.abs(outsidePoint.x - insidePoint.x); // log.warn();\n\n  if (Math.abs(y - outsidePoint.y) * w > Math.abs(x - outsidePoint.x) * h) {\n    // eslint-disable-line\n    // Intersection is top or bottom of rect.\n    // let q = insidePoint.y < outsidePoint.y ? outsidePoint.y - h - y : y - h - outsidePoint.y;\n    var q = insidePoint.y < outsidePoint.y ? outsidePoint.y - h - y : y - h - outsidePoint.y;\n    r = R * q / Q;\n    var res = {\n      x: insidePoint.x < outsidePoint.x ? insidePoint.x + r : insidePoint.x - R + r,\n      y: insidePoint.y < outsidePoint.y ? insidePoint.y + Q - q : insidePoint.y - Q + q\n    };\n\n    if (r === 0) {\n      res.x = outsidePoint.x;\n      res.y = outsidePoint.y;\n    }\n\n    if (R === 0) {\n      res.x = outsidePoint.x;\n    }\n\n    if (Q === 0) {\n      res.y = outsidePoint.y;\n    }\n\n    _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].warn(\"abc89 topp/bott calc, Q \".concat(Q, \", q \").concat(q, \", R \").concat(R, \", r \").concat(r), res);\n    return res;\n  } else {\n    // Intersection onn sides of rect\n    if (insidePoint.x < outsidePoint.x) {\n      r = outsidePoint.x - w - x;\n    } else {\n      // r = outsidePoint.x - w - x;\n      r = x - w - outsidePoint.x;\n    }\n\n    var _q = Q * r / R; //  OK let _x = insidePoint.x < outsidePoint.x ? insidePoint.x + R - r : insidePoint.x + dx - w;\n    // OK let _x = insidePoint.x < outsidePoint.x ? insidePoint.x + R - r : outsidePoint.x + r;\n\n\n    var _x = insidePoint.x < outsidePoint.x ? insidePoint.x + R - r : insidePoint.x - R + r; // let _x = insidePoint.x < outsidePoint.x ? insidePoint.x + R - r : outsidePoint.x + r;\n\n\n    var _y = insidePoint.y < outsidePoint.y ? insidePoint.y + _q : insidePoint.y - _q;\n\n    _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].warn(\"sides calc abc89, Q \".concat(Q, \", q \").concat(_q, \", R \").concat(R, \", r \").concat(r), {\n      _x: _x,\n      _y: _y\n    });\n\n    if (r === 0) {\n      _x = outsidePoint.x;\n      _y = outsidePoint.y;\n    }\n\n    if (R === 0) {\n      _x = outsidePoint.x;\n    }\n\n    if (Q === 0) {\n      _y = outsidePoint.y;\n    }\n\n    return {\n      x: _x,\n      y: _y\n    };\n  }\n};\n/**\n * This function will page a path and node where the last point(s) in the path is inside the node\n * and return an update path ending by the border of the node.\n * @param {*} points\n * @param {*} boundryNode\n * @returns\n */\n\nvar cutPathAtIntersect = function cutPathAtIntersect(_points, boundryNode) {\n  _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].warn('abc88 cutPathAtIntersect', _points, boundryNode);\n  var points = [];\n  var lastPointOutside = _points[0];\n  var isInside = false;\n\n  _points.forEach(function (point) {\n    // const node = clusterDb[edge.toCluster].node;\n    _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].info('abc88 checking point', point, boundryNode); // check if point is inside the boundry rect\n\n    if (!outsideNode(boundryNode, point) && !isInside) {\n      // First point inside the rect found\n      // Calc the intersection coord between the point anf the last opint ouside the rect\n      var inter = intersection(boundryNode, lastPointOutside, point);\n      _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].warn('abc88 inside', point, lastPointOutside, inter);\n      _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].warn('abc88 intersection', inter); // // Check case where the intersection is the same as the last point\n\n      var pointPresent = false;\n      points.forEach(function (p) {\n        pointPresent = pointPresent || p.x === inter.x && p.y === inter.y;\n      }); // // if (!pointPresent) {\n\n      if (!points.find(function (e) {\n        return e.x === inter.x && e.y === inter.y;\n      })) {\n        points.push(inter);\n      } else {\n        _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].warn('abc88 no intersect', inter, points);\n      } // points.push(inter);\n\n\n      isInside = true;\n    } else {\n      // Outside\n      _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].warn('abc88 outside', point, lastPointOutside);\n      lastPointOutside = point; // points.push(point);\n\n      if (!isInside) points.push(point);\n    }\n  });\n\n  _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].warn('abc88 returning points', points);\n  return points;\n}; //(edgePaths, e, edge, clusterDb, diagramtype, graph)\n\n\nvar insertEdge = function insertEdge(elem, e, edge, clusterDb, diagramType, graph) {\n  var points = edge.points;\n  var pointsHasChanged = false;\n  var tail = graph.node(e.v);\n  var head = graph.node(e.w);\n  _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].info('abc88 InsertEdge: ', edge);\n\n  if (head.intersect && tail.intersect) {\n    points = points.slice(1, edge.points.length - 1);\n    points.unshift(tail.intersect(points[0]));\n    _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].info('Last point', points[points.length - 1], head, head.intersect(points[points.length - 1]));\n    points.push(head.intersect(points[points.length - 1]));\n  }\n\n  if (edge.toCluster) {\n    _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].info('to cluster abc88', clusterDb[edge.toCluster]);\n    points = cutPathAtIntersect(edge.points, clusterDb[edge.toCluster].node); // log.trace('edge', edge);\n    // points = [];\n    // let lastPointOutside; // = edge.points[0];\n    // let isInside = false;\n    // edge.points.forEach(point => {\n    //   const node = clusterDb[edge.toCluster].node;\n    //   log.warn('checking from', edge.fromCluster, point, node);\n    //   if (!outsideNode(node, point) && !isInside) {\n    //     log.trace('inside', edge.toCluster, point, lastPointOutside);\n    //     // First point inside the rect\n    //     const inter = intersection(node, lastPointOutside, point);\n    //     let pointPresent = false;\n    //     points.forEach(p => {\n    //       pointPresent = pointPresent || (p.x === inter.x && p.y === inter.y);\n    //     });\n    //     // if (!pointPresent) {\n    //     if (!points.find(e => e.x === inter.x && e.y === inter.y)) {\n    //       points.push(inter);\n    //     } else {\n    //       log.warn('no intersect', inter, points);\n    //     }\n    //     isInside = true;\n    // } else {\n    //   // outtside\n    //   lastPointOutside = point;\n    //   if (!isInside) points.push(point);\n    // }\n    // });\n\n    pointsHasChanged = true;\n  }\n\n  if (edge.fromCluster) {\n    _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].info('from cluster abc88', clusterDb[edge.fromCluster]);\n    points = cutPathAtIntersect(points.reverse(), clusterDb[edge.fromCluster].node).reverse(); // log.warn('edge', edge);\n    // log.warn('from cluster', clusterDb[edge.fromCluster], points);\n    // const updatedPoints = [];\n    // let lastPointOutside = edge.points[edge.points.length - 1];\n    // let isInside = false;\n    // for (let i = points.length - 1; i >= 0; i--) {\n    //   const point = points[i];\n    //   const node = clusterDb[edge.fromCluster].node;\n    //   log.warn('checking to', edge.fromCluster, point, node);\n    //   if (!outsideNode(node, point) && !isInside) {\n    //     log.warn('inside', edge.fromCluster, point, node);\n    //     // First point inside the rect\n    //     const inter = intersection(node, lastPointOutside, point);\n    //     log.warn('intersect', intersection(node, lastPointOutside, point));\n    //     let pointPresent = false;\n    //     points.forEach(p => {\n    //       pointPresent = pointPresent || (p.x === inter.x && p.y === inter.y);\n    //     });\n    //     // if (!pointPresent) {\n    //     if (!points.find(e => e.x === inter.x && e.y === inter.y)) {\n    //       updatedPoints.unshift(inter);\n    //       log.warn('Adding point -updated = ', updatedPoints);\n    //     } else {\n    //       log.warn('no intersect', inter, points);\n    //     }\n    //     // points.push(insterection);\n    //     isInside = true;\n    //   } else {\n    //     // at the outside\n    //     // if (!isInside) updatedPoints.unshift(point);\n    //     updatedPoints.unshift(point);\n    //     log.warn('Outside point', point, updatedPoints);\n    //   }\n    //   lastPointOutside = point;\n    // }\n    // points = updatedPoints;\n    // points = edge.points;\n\n    pointsHasChanged = true;\n  } // The data for our line\n\n\n  var lineData = points.filter(function (p) {\n    return !Number.isNaN(p.y);\n  }); // This is the accessor function we talked about above\n\n  var curve; // Currently only flowcharts get the curve from the settings, perhaps this should\n  // be expanded to a common setting? Restricting it for now in order not to cause side-effects that\n  // have not been thought through\n\n  if (diagramType === 'graph' || diagramType === 'flowchart') {\n    curve = edge.curve || d3__WEBPACK_IMPORTED_MODULE_2__[\"curveBasis\"];\n  } else {\n    curve = d3__WEBPACK_IMPORTED_MODULE_2__[\"curveBasis\"];\n  } // curve = curveLinear;\n\n\n  var lineFunction = Object(d3__WEBPACK_IMPORTED_MODULE_2__[\"line\"])().x(function (d) {\n    return d.x;\n  }).y(function (d) {\n    return d.y;\n  }).curve(curve); // Contruct stroke classes based on properties\n\n  var strokeClasses;\n\n  switch (edge.thickness) {\n    case 'normal':\n      strokeClasses = 'edge-thickness-normal';\n      break;\n\n    case 'thick':\n      strokeClasses = 'edge-thickness-thick';\n      break;\n\n    default:\n      strokeClasses = '';\n  }\n\n  switch (edge.pattern) {\n    case 'solid':\n      strokeClasses += ' edge-pattern-solid';\n      break;\n\n    case 'dotted':\n      strokeClasses += ' edge-pattern-dotted';\n      break;\n\n    case 'dashed':\n      strokeClasses += ' edge-pattern-dashed';\n      break;\n  }\n\n  var svgPath = elem.append('path').attr('d', lineFunction(lineData)).attr('id', edge.id).attr('class', ' ' + strokeClasses + (edge.classes ? ' ' + edge.classes : '')).attr('style', edge.style); // DEBUG code, adds a red circle at each edge coordinate\n  // edge.points.forEach(point => {\n  //   elem\n  //     .append('circle')\n  //     .style('stroke', 'red')\n  //     .style('fill', 'red')\n  //     .attr('r', 1)\n  //     .attr('cx', point.x)\n  //     .attr('cy', point.y);\n  // });\n\n  var url = '';\n\n  if (Object(_config__WEBPACK_IMPORTED_MODULE_3__[\"getConfig\"])().state.arrowMarkerAbsolute) {\n    url = window.location.protocol + '//' + window.location.host + window.location.pathname + window.location.search;\n    url = url.replace(/\\(/g, '\\\\(');\n    url = url.replace(/\\)/g, '\\\\)');\n  }\n\n  _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].info('arrowTypeStart', edge.arrowTypeStart);\n  _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].info('arrowTypeEnd', edge.arrowTypeEnd);\n\n  switch (edge.arrowTypeStart) {\n    case 'arrow_cross':\n      svgPath.attr('marker-start', 'url(' + url + '#' + diagramType + '-crossStart' + ')');\n      break;\n\n    case 'arrow_point':\n      svgPath.attr('marker-start', 'url(' + url + '#' + diagramType + '-pointStart' + ')');\n      break;\n\n    case 'arrow_barb':\n      svgPath.attr('marker-start', 'url(' + url + '#' + diagramType + '-barbStart' + ')');\n      break;\n\n    case 'arrow_circle':\n      svgPath.attr('marker-start', 'url(' + url + '#' + diagramType + '-circleStart' + ')');\n      break;\n\n    case 'aggregation':\n      svgPath.attr('marker-start', 'url(' + url + '#' + diagramType + '-aggregationStart' + ')');\n      break;\n\n    case 'extension':\n      svgPath.attr('marker-start', 'url(' + url + '#' + diagramType + '-extensionStart' + ')');\n      break;\n\n    case 'composition':\n      svgPath.attr('marker-start', 'url(' + url + '#' + diagramType + '-compositionStart' + ')');\n      break;\n\n    case 'dependency':\n      svgPath.attr('marker-start', 'url(' + url + '#' + diagramType + '-dependencyStart' + ')');\n      break;\n\n    default:\n  }\n\n  switch (edge.arrowTypeEnd) {\n    case 'arrow_cross':\n      svgPath.attr('marker-end', 'url(' + url + '#' + diagramType + '-crossEnd' + ')');\n      break;\n\n    case 'arrow_point':\n      svgPath.attr('marker-end', 'url(' + url + '#' + diagramType + '-pointEnd' + ')');\n      break;\n\n    case 'arrow_barb':\n      svgPath.attr('marker-end', 'url(' + url + '#' + diagramType + '-barbEnd' + ')');\n      break;\n\n    case 'arrow_circle':\n      svgPath.attr('marker-end', 'url(' + url + '#' + diagramType + '-circleEnd' + ')');\n      break;\n\n    case 'aggregation':\n      svgPath.attr('marker-end', 'url(' + url + '#' + diagramType + '-aggregationEnd' + ')');\n      break;\n\n    case 'extension':\n      svgPath.attr('marker-end', 'url(' + url + '#' + diagramType + '-extensionEnd' + ')');\n      break;\n\n    case 'composition':\n      svgPath.attr('marker-end', 'url(' + url + '#' + diagramType + '-compositionEnd' + ')');\n      break;\n\n    case 'dependency':\n      svgPath.attr('marker-end', 'url(' + url + '#' + diagramType + '-dependencyEnd' + ')');\n      break;\n\n    default:\n  }\n\n  var paths = {};\n\n  if (pointsHasChanged) {\n    paths.updatedPath = points;\n  }\n\n  paths.originalPath = edge.points;\n  return paths;\n};\n\n/***/ }),\n\n/***/ \"./src/dagre-wrapper/index.js\":\n/*!************************************!*\\\n  !*** ./src/dagre-wrapper/index.js ***!\n  \\************************************/\n/*! exports provided: render */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"render\", function() { return render; });\n/* harmony import */ var dagre__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! dagre */ \"./node_modules/dagre/index.js\");\n/* harmony import */ var dagre__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(dagre__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var graphlib__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! graphlib */ \"./node_modules/graphlib/index.js\");\n/* harmony import */ var graphlib__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(graphlib__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _markers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./markers */ \"./src/dagre-wrapper/markers.js\");\n/* harmony import */ var _shapes_util__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./shapes/util */ \"./src/dagre-wrapper/shapes/util.js\");\n/* harmony import */ var _mermaid_graphlib__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./mermaid-graphlib */ \"./src/dagre-wrapper/mermaid-graphlib.js\");\n/* harmony import */ var _nodes__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./nodes */ \"./src/dagre-wrapper/nodes.js\");\n/* harmony import */ var _clusters__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./clusters */ \"./src/dagre-wrapper/clusters.js\");\n/* harmony import */ var _edges__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./edges */ \"./src/dagre-wrapper/edges.js\");\n/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../logger */ \"./src/logger.js\");\n\n\n\n\n\n\n\n\n\n\nvar recursiveRender = function recursiveRender(_elem, graph, diagramtype, parentCluster) {\n  _logger__WEBPACK_IMPORTED_MODULE_8__[\"log\"].info('Graph in recursive render: XXX', graphlib__WEBPACK_IMPORTED_MODULE_1___default.a.json.write(graph), parentCluster);\n  var dir = graph.graph().rankdir;\n  _logger__WEBPACK_IMPORTED_MODULE_8__[\"log\"].trace('Dir in recursive render - dir:', dir);\n\n  var elem = _elem.insert('g').attr('class', 'root'); // eslint-disable-line\n\n\n  if (!graph.nodes()) {\n    _logger__WEBPACK_IMPORTED_MODULE_8__[\"log\"].info('No nodes found for', graph);\n  } else {\n    _logger__WEBPACK_IMPORTED_MODULE_8__[\"log\"].info('Recursive render XXX', graph.nodes());\n  }\n\n  if (graph.edges().length > 0) {\n    _logger__WEBPACK_IMPORTED_MODULE_8__[\"log\"].trace('Recursive edges', graph.edge(graph.edges()[0]));\n  }\n\n  var clusters = elem.insert('g').attr('class', 'clusters'); // eslint-disable-line\n\n  var edgePaths = elem.insert('g').attr('class', 'edgePaths');\n  var edgeLabels = elem.insert('g').attr('class', 'edgeLabels');\n  var nodes = elem.insert('g').attr('class', 'nodes'); // Insert nodes, this will insert them into the dom and each node will get a size. The size is updated\n  // to the abstract node and is later used by dagre for the layout\n\n  graph.nodes().forEach(function (v) {\n    var node = graph.node(v);\n\n    if (typeof parentCluster !== 'undefined') {\n      var data = JSON.parse(JSON.stringify(parentCluster.clusterData)); // data.clusterPositioning = true;\n\n      _logger__WEBPACK_IMPORTED_MODULE_8__[\"log\"].info('Setting data for cluster XXX (', v, ') ', data, parentCluster);\n      graph.setNode(parentCluster.id, data);\n\n      if (!graph.parent(v)) {\n        _logger__WEBPACK_IMPORTED_MODULE_8__[\"log\"].trace('Setting parent', v, parentCluster.id);\n        graph.setParent(v, parentCluster.id, data);\n      }\n    }\n\n    _logger__WEBPACK_IMPORTED_MODULE_8__[\"log\"].info('(Insert) Node XXX' + v + ': ' + JSON.stringify(graph.node(v)));\n\n    if (node && node.clusterNode) {\n      // const children = graph.children(v);\n      _logger__WEBPACK_IMPORTED_MODULE_8__[\"log\"].info('Cluster identified', v, node.width, graph.node(v));\n      var o = recursiveRender(nodes, node.graph, diagramtype, graph.node(v));\n      var newEl = o.elem;\n      Object(_shapes_util__WEBPACK_IMPORTED_MODULE_3__[\"updateNodeBounds\"])(node, newEl);\n      node.diff = o.diff || 0;\n      _logger__WEBPACK_IMPORTED_MODULE_8__[\"log\"].info('Node bounds (abc123)', v, node, node.width, node.x, node.y);\n      Object(_nodes__WEBPACK_IMPORTED_MODULE_5__[\"setNodeElem\"])(newEl, node);\n      _logger__WEBPACK_IMPORTED_MODULE_8__[\"log\"].warn('Recursive render complete ', newEl, node);\n    } else {\n      if (graph.children(v).length > 0) {\n        // This is a cluster but not to be rendered recusively\n        // Render as before\n        _logger__WEBPACK_IMPORTED_MODULE_8__[\"log\"].info('Cluster - the non recursive path XXX', v, node.id, node, graph);\n        _logger__WEBPACK_IMPORTED_MODULE_8__[\"log\"].info(Object(_mermaid_graphlib__WEBPACK_IMPORTED_MODULE_4__[\"findNonClusterChild\"])(node.id, graph));\n        _mermaid_graphlib__WEBPACK_IMPORTED_MODULE_4__[\"clusterDb\"][node.id] = {\n          id: Object(_mermaid_graphlib__WEBPACK_IMPORTED_MODULE_4__[\"findNonClusterChild\"])(node.id, graph),\n          node: node\n        }; // insertCluster(clusters, graph.node(v));\n      } else {\n        _logger__WEBPACK_IMPORTED_MODULE_8__[\"log\"].info('Node - the non recursive path', v, node.id, node);\n        Object(_nodes__WEBPACK_IMPORTED_MODULE_5__[\"insertNode\"])(nodes, graph.node(v), dir);\n      }\n    }\n  }); // Insert labels, this will insert them into the dom so that the width can be calculated\n  // Also figure out which edges point to/from clusters and adjust them accordingly\n  // Edges from/to clusters really points to the first child in the cluster.\n  // TODO: pick optimal child in the cluster to us as link anchor\n\n  graph.edges().forEach(function (e) {\n    var edge = graph.edge(e.v, e.w, e.name);\n    _logger__WEBPACK_IMPORTED_MODULE_8__[\"log\"].info('Edge ' + e.v + ' -> ' + e.w + ': ' + JSON.stringify(e));\n    _logger__WEBPACK_IMPORTED_MODULE_8__[\"log\"].info('Edge ' + e.v + ' -> ' + e.w + ': ', e, ' ', JSON.stringify(graph.edge(e))); // Check if link is either from or to a cluster\n\n    _logger__WEBPACK_IMPORTED_MODULE_8__[\"log\"].info('Fix', _mermaid_graphlib__WEBPACK_IMPORTED_MODULE_4__[\"clusterDb\"], 'ids:', e.v, e.w, 'Translateing: ', _mermaid_graphlib__WEBPACK_IMPORTED_MODULE_4__[\"clusterDb\"][e.v], _mermaid_graphlib__WEBPACK_IMPORTED_MODULE_4__[\"clusterDb\"][e.w]);\n    Object(_edges__WEBPACK_IMPORTED_MODULE_7__[\"insertEdgeLabel\"])(edgeLabels, edge);\n  });\n  graph.edges().forEach(function (e) {\n    _logger__WEBPACK_IMPORTED_MODULE_8__[\"log\"].info('Edge ' + e.v + ' -> ' + e.w + ': ' + JSON.stringify(e));\n  });\n  _logger__WEBPACK_IMPORTED_MODULE_8__[\"log\"].info('#############################################');\n  _logger__WEBPACK_IMPORTED_MODULE_8__[\"log\"].info('###                Layout                 ###');\n  _logger__WEBPACK_IMPORTED_MODULE_8__[\"log\"].info('#############################################');\n  _logger__WEBPACK_IMPORTED_MODULE_8__[\"log\"].info(graph);\n  dagre__WEBPACK_IMPORTED_MODULE_0___default.a.layout(graph);\n  _logger__WEBPACK_IMPORTED_MODULE_8__[\"log\"].info('Graph after layout:', graphlib__WEBPACK_IMPORTED_MODULE_1___default.a.json.write(graph)); // Move the nodes to the correct place\n\n  var diff = 0;\n  Object(_mermaid_graphlib__WEBPACK_IMPORTED_MODULE_4__[\"sortNodesByHierarchy\"])(graph).forEach(function (v) {\n    var node = graph.node(v);\n    _logger__WEBPACK_IMPORTED_MODULE_8__[\"log\"].info('Position ' + v + ': ' + JSON.stringify(graph.node(v)));\n    _logger__WEBPACK_IMPORTED_MODULE_8__[\"log\"].info('Position ' + v + ': (' + node.x, ',' + node.y, ') width: ', node.width, ' height: ', node.height);\n\n    if (node && node.clusterNode) {\n      // clusterDb[node.id].node = node;\n      Object(_nodes__WEBPACK_IMPORTED_MODULE_5__[\"positionNode\"])(node);\n    } else {\n      // Non cluster node\n      if (graph.children(v).length > 0) {\n        // A cluster in the non-recurive way\n        // positionCluster(node);\n        Object(_clusters__WEBPACK_IMPORTED_MODULE_6__[\"insertCluster\"])(clusters, node);\n        _mermaid_graphlib__WEBPACK_IMPORTED_MODULE_4__[\"clusterDb\"][node.id].node = node;\n      } else {\n        Object(_nodes__WEBPACK_IMPORTED_MODULE_5__[\"positionNode\"])(node);\n      }\n    }\n  }); // Move the edge labels to the correct place after layout\n\n  graph.edges().forEach(function (e) {\n    var edge = graph.edge(e);\n    _logger__WEBPACK_IMPORTED_MODULE_8__[\"log\"].info('Edge ' + e.v + ' -> ' + e.w + ': ' + JSON.stringify(edge), edge);\n    var paths = Object(_edges__WEBPACK_IMPORTED_MODULE_7__[\"insertEdge\"])(edgePaths, e, edge, _mermaid_graphlib__WEBPACK_IMPORTED_MODULE_4__[\"clusterDb\"], diagramtype, graph);\n    Object(_edges__WEBPACK_IMPORTED_MODULE_7__[\"positionEdgeLabel\"])(edge, paths);\n  });\n  graph.nodes().forEach(function (v) {\n    var n = graph.node(v);\n    _logger__WEBPACK_IMPORTED_MODULE_8__[\"log\"].info(v, n.type, n.diff);\n\n    if (n.type === 'group') {\n      diff = n.diff;\n    }\n  });\n  return {\n    elem: elem,\n    diff: diff\n  };\n};\n\nvar render = function render(elem, graph, markers, diagramtype, id) {\n  Object(_markers__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(elem, markers, diagramtype, id);\n  Object(_nodes__WEBPACK_IMPORTED_MODULE_5__[\"clear\"])();\n  Object(_edges__WEBPACK_IMPORTED_MODULE_7__[\"clear\"])();\n  Object(_clusters__WEBPACK_IMPORTED_MODULE_6__[\"clear\"])();\n  Object(_mermaid_graphlib__WEBPACK_IMPORTED_MODULE_4__[\"clear\"])();\n  _logger__WEBPACK_IMPORTED_MODULE_8__[\"log\"].warn('Graph at first:', graphlib__WEBPACK_IMPORTED_MODULE_1___default.a.json.write(graph));\n  Object(_mermaid_graphlib__WEBPACK_IMPORTED_MODULE_4__[\"adjustClustersAndEdges\"])(graph);\n  _logger__WEBPACK_IMPORTED_MODULE_8__[\"log\"].warn('Graph after:', graphlib__WEBPACK_IMPORTED_MODULE_1___default.a.json.write(graph)); // log.warn('Graph ever  after:', graphlib.json.write(graph.node('A').graph));\n\n  recursiveRender(elem, graph, diagramtype);\n}; // const shapeDefinitions = {};\n// export const addShape = ({ shapeType: fun }) => {\n//   shapeDefinitions[shapeType] = fun;\n// };\n// const arrowDefinitions = {};\n// export const addArrow = ({ arrowType: fun }) => {\n//   arrowDefinitions[arrowType] = fun;\n// };\n\n/***/ }),\n\n/***/ \"./src/dagre-wrapper/intersect/index.js\":\n/*!**********************************************!*\\\n  !*** ./src/dagre-wrapper/intersect/index.js ***!\n  \\**********************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _intersect_node_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./intersect-node.js */ \"./src/dagre-wrapper/intersect/intersect-node.js\");\n/* harmony import */ var _intersect_node_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_intersect_node_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _intersect_circle_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./intersect-circle.js */ \"./src/dagre-wrapper/intersect/intersect-circle.js\");\n/* harmony import */ var _intersect_ellipse_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./intersect-ellipse.js */ \"./src/dagre-wrapper/intersect/intersect-ellipse.js\");\n/* harmony import */ var _intersect_polygon_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./intersect-polygon.js */ \"./src/dagre-wrapper/intersect/intersect-polygon.js\");\n/* harmony import */ var _intersect_rect_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./intersect-rect.js */ \"./src/dagre-wrapper/intersect/intersect-rect.js\");\n/*\n * Borrowed with love from from dagrge-d3. Many thanks to cpettitt!\n */\n\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n  node: _intersect_node_js__WEBPACK_IMPORTED_MODULE_0___default.a,\n  circle: _intersect_circle_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"],\n  ellipse: _intersect_ellipse_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"],\n  polygon: _intersect_polygon_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"],\n  rect: _intersect_rect_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"]\n});\n\n/***/ }),\n\n/***/ \"./src/dagre-wrapper/intersect/intersect-circle.js\":\n/*!*********************************************************!*\\\n  !*** ./src/dagre-wrapper/intersect/intersect-circle.js ***!\n  \\*********************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _intersect_ellipse__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./intersect-ellipse */ \"./src/dagre-wrapper/intersect/intersect-ellipse.js\");\n\n\nfunction intersectCircle(node, rx, point) {\n  return Object(_intersect_ellipse__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(node, rx, rx, point);\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (intersectCircle);\n\n/***/ }),\n\n/***/ \"./src/dagre-wrapper/intersect/intersect-ellipse.js\":\n/*!**********************************************************!*\\\n  !*** ./src/dagre-wrapper/intersect/intersect-ellipse.js ***!\n  \\**********************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\nfunction intersectEllipse(node, rx, ry, point) {\n  // Formulae from: http://mathworld.wolfram.com/Ellipse-LineIntersection.html\n  var cx = node.x;\n  var cy = node.y;\n  var px = cx - point.x;\n  var py = cy - point.y;\n  var det = Math.sqrt(rx * rx * py * py + ry * ry * px * px);\n  var dx = Math.abs(rx * ry * px / det);\n\n  if (point.x < cx) {\n    dx = -dx;\n  }\n\n  var dy = Math.abs(rx * ry * py / det);\n\n  if (point.y < cy) {\n    dy = -dy;\n  }\n\n  return {\n    x: cx + dx,\n    y: cy + dy\n  };\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (intersectEllipse);\n\n/***/ }),\n\n/***/ \"./src/dagre-wrapper/intersect/intersect-line.js\":\n/*!*******************************************************!*\\\n  !*** ./src/dagre-wrapper/intersect/intersect-line.js ***!\n  \\*******************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/*\n * Returns the point at which two lines, p and q, intersect or returns\n * undefined if they do not intersect.\n */\nfunction intersectLine(p1, p2, q1, q2) {\n  // Algorithm from J. Avro, (ed.) Graphics Gems, No 2, Morgan Kaufmann, 1994,\n  // p7 and p473.\n  var a1, a2, b1, b2, c1, c2;\n  var r1, r2, r3, r4;\n  var denom, offset, num;\n  var x, y; // Compute a1, b1, c1, where line joining points 1 and 2 is F(x,y) = a1 x +\n  // b1 y + c1 = 0.\n\n  a1 = p2.y - p1.y;\n  b1 = p1.x - p2.x;\n  c1 = p2.x * p1.y - p1.x * p2.y; // Compute r3 and r4.\n\n  r3 = a1 * q1.x + b1 * q1.y + c1;\n  r4 = a1 * q2.x + b1 * q2.y + c1; // Check signs of r3 and r4. If both point 3 and point 4 lie on\n  // same side of line 1, the line segments do not intersect.\n\n  if (r3 !== 0 && r4 !== 0 && sameSign(r3, r4)) {\n    return;\n  } // Compute a2, b2, c2 where line joining points 3 and 4 is G(x,y) = a2 x + b2 y + c2 = 0\n\n\n  a2 = q2.y - q1.y;\n  b2 = q1.x - q2.x;\n  c2 = q2.x * q1.y - q1.x * q2.y; // Compute r1 and r2\n\n  r1 = a2 * p1.x + b2 * p1.y + c2;\n  r2 = a2 * p2.x + b2 * p2.y + c2; // Check signs of r1 and r2. If both point 1 and point 2 lie\n  // on same side of second line segment, the line segments do\n  // not intersect.\n\n  if (r1 !== 0 && r2 !== 0 && sameSign(r1, r2)) {\n    return;\n  } // Line segments intersect: compute intersection point.\n\n\n  denom = a1 * b2 - a2 * b1;\n\n  if (denom === 0) {\n    return;\n  }\n\n  offset = Math.abs(denom / 2); // The denom/2 is to get rounding instead of truncating. It\n  // is added or subtracted to the numerator, depending upon the\n  // sign of the numerator.\n\n  num = b1 * c2 - b2 * c1;\n  x = num < 0 ? (num - offset) / denom : (num + offset) / denom;\n  num = a2 * c1 - a1 * c2;\n  y = num < 0 ? (num - offset) / denom : (num + offset) / denom;\n  return {\n    x: x,\n    y: y\n  };\n}\n\nfunction sameSign(r1, r2) {\n  return r1 * r2 > 0;\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (intersectLine);\n\n/***/ }),\n\n/***/ \"./src/dagre-wrapper/intersect/intersect-node.js\":\n/*!*******************************************************!*\\\n  !*** ./src/dagre-wrapper/intersect/intersect-node.js ***!\n  \\*******************************************************/\n/*! no static exports found */\n/***/ (function(module, exports) {\n\nmodule.exports = intersectNode;\n\nfunction intersectNode(node, point) {\n  // console.info('Intersect Node');\n  return node.intersect(point);\n}\n\n/***/ }),\n\n/***/ \"./src/dagre-wrapper/intersect/intersect-polygon.js\":\n/*!**********************************************************!*\\\n  !*** ./src/dagre-wrapper/intersect/intersect-polygon.js ***!\n  \\**********************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _intersect_line__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./intersect-line */ \"./src/dagre-wrapper/intersect/intersect-line.js\");\n/* eslint \"no-console\": off */\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (intersectPolygon);\n/*\n * Returns the point ({x, y}) at which the point argument intersects with the\n * node argument assuming that it has the shape specified by polygon.\n */\n\nfunction intersectPolygon(node, polyPoints, point) {\n  var x1 = node.x;\n  var y1 = node.y;\n  var intersections = [];\n  var minX = Number.POSITIVE_INFINITY;\n  var minY = Number.POSITIVE_INFINITY;\n\n  if (typeof polyPoints.forEach === 'function') {\n    polyPoints.forEach(function (entry) {\n      minX = Math.min(minX, entry.x);\n      minY = Math.min(minY, entry.y);\n    });\n  } else {\n    minX = Math.min(minX, polyPoints.x);\n    minY = Math.min(minY, polyPoints.y);\n  }\n\n  var left = x1 - node.width / 2 - minX;\n  var top = y1 - node.height / 2 - minY;\n\n  for (var i = 0; i < polyPoints.length; i++) {\n    var p1 = polyPoints[i];\n    var p2 = polyPoints[i < polyPoints.length - 1 ? i + 1 : 0];\n    var intersect = Object(_intersect_line__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(node, point, {\n      x: left + p1.x,\n      y: top + p1.y\n    }, {\n      x: left + p2.x,\n      y: top + p2.y\n    });\n\n    if (intersect) {\n      intersections.push(intersect);\n    }\n  }\n\n  if (!intersections.length) {\n    // console.log('NO INTERSECTION FOUND, RETURN NODE CENTER', node);\n    return node;\n  }\n\n  if (intersections.length > 1) {\n    // More intersections, find the one nearest to edge end point\n    intersections.sort(function (p, q) {\n      var pdx = p.x - point.x;\n      var pdy = p.y - point.y;\n      var distp = Math.sqrt(pdx * pdx + pdy * pdy);\n      var qdx = q.x - point.x;\n      var qdy = q.y - point.y;\n      var distq = Math.sqrt(qdx * qdx + qdy * qdy);\n      return distp < distq ? -1 : distp === distq ? 0 : 1;\n    });\n  }\n\n  return intersections[0];\n}\n\n/***/ }),\n\n/***/ \"./src/dagre-wrapper/intersect/intersect-rect.js\":\n/*!*******************************************************!*\\\n  !*** ./src/dagre-wrapper/intersect/intersect-rect.js ***!\n  \\*******************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\nvar intersectRect = function intersectRect(node, point) {\n  var x = node.x;\n  var y = node.y; // Rectangle intersection algorithm from:\n  // http://math.stackexchange.com/questions/108113/find-edge-between-two-boxes\n\n  var dx = point.x - x;\n  var dy = point.y - y;\n  var w = node.width / 2;\n  var h = node.height / 2;\n  var sx, sy;\n\n  if (Math.abs(dy) * w > Math.abs(dx) * h) {\n    // Intersection is top or bottom of rect.\n    if (dy < 0) {\n      h = -h;\n    }\n\n    sx = dy === 0 ? 0 : h * dx / dy;\n    sy = h;\n  } else {\n    // Intersection is left or right of rect.\n    if (dx < 0) {\n      w = -w;\n    }\n\n    sx = w;\n    sy = dx === 0 ? 0 : w * dy / dx;\n  }\n\n  return {\n    x: x + sx,\n    y: y + sy\n  };\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (intersectRect);\n\n/***/ }),\n\n/***/ \"./src/dagre-wrapper/markers.js\":\n/*!**************************************!*\\\n  !*** ./src/dagre-wrapper/markers.js ***!\n  \\**************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../logger */ \"./src/logger.js\");\n/**\n * Setup arrow head and define the marker. The result is appended to the svg.\n */\n // Only add the number of markers that the diagram needs\n\nvar insertMarkers = function insertMarkers(elem, markerArray, type, id) {\n  markerArray.forEach(function (markerName) {\n    markers[markerName](elem, type, id);\n  });\n};\n\nvar extension = function extension(elem, type, id) {\n  _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].trace('Making markers for ', id);\n  elem.append('defs').append('marker').attr('id', type + '-extensionStart').attr('class', 'marker extension ' + type).attr('refX', 0).attr('refY', 7).attr('markerWidth', 190).attr('markerHeight', 240).attr('orient', 'auto').append('path').attr('d', 'M 1,7 L18,13 V 1 Z');\n  elem.append('defs').append('marker').attr('id', type + '-extensionEnd').attr('class', 'marker extension ' + type).attr('refX', 19).attr('refY', 7).attr('markerWidth', 20).attr('markerHeight', 28).attr('orient', 'auto').append('path').attr('d', 'M 1,1 V 13 L18,7 Z'); // this is actual shape for arrowhead\n};\n\nvar composition = function composition(elem, type) {\n  elem.append('defs').append('marker').attr('id', type + '-compositionStart').attr('class', 'marker composition ' + type).attr('refX', 0).attr('refY', 7).attr('markerWidth', 190).attr('markerHeight', 240).attr('orient', 'auto').append('path').attr('d', 'M 18,7 L9,13 L1,7 L9,1 Z');\n  elem.append('defs').append('marker').attr('id', type + '-compositionEnd').attr('class', 'marker composition ' + type).attr('refX', 19).attr('refY', 7).attr('markerWidth', 20).attr('markerHeight', 28).attr('orient', 'auto').append('path').attr('d', 'M 18,7 L9,13 L1,7 L9,1 Z');\n};\n\nvar aggregation = function aggregation(elem, type) {\n  elem.append('defs').append('marker').attr('id', type + '-aggregationStart').attr('class', 'marker aggregation ' + type).attr('refX', 0).attr('refY', 7).attr('markerWidth', 190).attr('markerHeight', 240).attr('orient', 'auto').append('path').attr('d', 'M 18,7 L9,13 L1,7 L9,1 Z');\n  elem.append('defs').append('marker').attr('id', type + '-aggregationEnd').attr('class', 'marker aggregation ' + type).attr('refX', 19).attr('refY', 7).attr('markerWidth', 20).attr('markerHeight', 28).attr('orient', 'auto').append('path').attr('d', 'M 18,7 L9,13 L1,7 L9,1 Z');\n};\n\nvar dependency = function dependency(elem, type) {\n  elem.append('defs').append('marker').attr('id', type + '-dependencyStart').attr('class', 'marker dependency ' + type).attr('refX', 0).attr('refY', 7).attr('markerWidth', 190).attr('markerHeight', 240).attr('orient', 'auto').append('path').attr('d', 'M 5,7 L9,13 L1,7 L9,1 Z');\n  elem.append('defs').append('marker').attr('id', type + '-dependencyEnd').attr('class', 'marker dependency ' + type).attr('refX', 19).attr('refY', 7).attr('markerWidth', 20).attr('markerHeight', 28).attr('orient', 'auto').append('path').attr('d', 'M 18,7 L9,13 L14,7 L9,1 Z');\n};\n\nvar point = function point(elem, type) {\n  elem.append('marker').attr('id', type + '-pointEnd').attr('class', 'marker ' + type).attr('viewBox', '0 0 10 10').attr('refX', 9).attr('refY', 5).attr('markerUnits', 'userSpaceOnUse').attr('markerWidth', 12).attr('markerHeight', 12).attr('orient', 'auto').append('path').attr('d', 'M 0 0 L 10 5 L 0 10 z').attr('class', 'arrowMarkerPath').style('stroke-width', 1).style('stroke-dasharray', '1,0');\n  elem.append('marker').attr('id', type + '-pointStart').attr('class', 'marker ' + type).attr('viewBox', '0 0 10 10').attr('refX', 0).attr('refY', 5).attr('markerUnits', 'userSpaceOnUse').attr('markerWidth', 12).attr('markerHeight', 12).attr('orient', 'auto').append('path').attr('d', 'M 0 5 L 10 10 L 10 0 z').attr('class', 'arrowMarkerPath').style('stroke-width', 1).style('stroke-dasharray', '1,0');\n};\n\nvar circle = function circle(elem, type) {\n  elem.append('marker').attr('id', type + '-circleEnd').attr('class', 'marker ' + type).attr('viewBox', '0 0 10 10').attr('refX', 11).attr('refY', 5).attr('markerUnits', 'userSpaceOnUse').attr('markerWidth', 11).attr('markerHeight', 11).attr('orient', 'auto').append('circle').attr('cx', '5').attr('cy', '5').attr('r', '5').attr('class', 'arrowMarkerPath').style('stroke-width', 1).style('stroke-dasharray', '1,0');\n  elem.append('marker').attr('id', type + '-circleStart').attr('class', 'marker ' + type).attr('viewBox', '0 0 10 10').attr('refX', -1).attr('refY', 5).attr('markerUnits', 'userSpaceOnUse').attr('markerWidth', 11).attr('markerHeight', 11).attr('orient', 'auto').append('circle').attr('cx', '5').attr('cy', '5').attr('r', '5').attr('class', 'arrowMarkerPath').style('stroke-width', 1).style('stroke-dasharray', '1,0');\n};\n\nvar cross = function cross(elem, type) {\n  elem.append('marker').attr('id', type + '-crossEnd').attr('class', 'marker cross ' + type).attr('viewBox', '0 0 11 11').attr('refX', 12).attr('refY', 5.2).attr('markerUnits', 'userSpaceOnUse').attr('markerWidth', 11).attr('markerHeight', 11).attr('orient', 'auto').append('path') // .attr('stroke', 'black')\n  .attr('d', 'M 1,1 l 9,9 M 10,1 l -9,9').attr('class', 'arrowMarkerPath').style('stroke-width', 2).style('stroke-dasharray', '1,0');\n  elem.append('marker').attr('id', type + '-crossStart').attr('class', 'marker cross ' + type).attr('viewBox', '0 0 11 11').attr('refX', -1).attr('refY', 5.2).attr('markerUnits', 'userSpaceOnUse').attr('markerWidth', 11).attr('markerHeight', 11).attr('orient', 'auto').append('path') // .attr('stroke', 'black')\n  .attr('d', 'M 1,1 l 9,9 M 10,1 l -9,9').attr('class', 'arrowMarkerPath').style('stroke-width', 2).style('stroke-dasharray', '1,0');\n};\n\nvar barb = function barb(elem, type) {\n  elem.append('defs').append('marker').attr('id', type + '-barbEnd').attr('refX', 19).attr('refY', 7).attr('markerWidth', 20).attr('markerHeight', 14).attr('markerUnits', 'strokeWidth').attr('orient', 'auto').append('path').attr('d', 'M 19,7 L9,13 L14,7 L9,1 Z');\n}; // TODO rename the class diagram markers to something shape descriptive and semanitc free\n\n\nvar markers = {\n  extension: extension,\n  composition: composition,\n  aggregation: aggregation,\n  dependency: dependency,\n  point: point,\n  circle: circle,\n  cross: cross,\n  barb: barb\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (insertMarkers);\n\n/***/ }),\n\n/***/ \"./src/dagre-wrapper/mermaid-graphlib.js\":\n/*!***********************************************!*\\\n  !*** ./src/dagre-wrapper/mermaid-graphlib.js ***!\n  \\***********************************************/\n/*! exports provided: clusterDb, clear, extractDecendants, validate, findNonClusterChild, adjustClustersAndEdges, extractor, sortNodesByHierarchy */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"clusterDb\", function() { return clusterDb; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"clear\", function() { return clear; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"extractDecendants\", function() { return extractDecendants; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"validate\", function() { return validate; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"findNonClusterChild\", function() { return findNonClusterChild; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"adjustClustersAndEdges\", function() { return adjustClustersAndEdges; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"extractor\", function() { return extractor; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"sortNodesByHierarchy\", function() { return sortNodesByHierarchy; });\n/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../logger */ \"./src/logger.js\");\n/* harmony import */ var graphlib__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! graphlib */ \"./node_modules/graphlib/index.js\");\n/* harmony import */ var graphlib__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(graphlib__WEBPACK_IMPORTED_MODULE_1__);\n/**\n * Decorates with functions required by mermaids dagre-wrapper.\n */\n\n\nvar clusterDb = {};\nvar decendants = {};\nvar parents = {};\nvar clear = function clear() {\n  decendants = {};\n  parents = {};\n  clusterDb = {};\n};\n\nvar isDecendant = function isDecendant(id, ancenstorId) {\n  // if (id === ancenstorId) return true;\n  _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].trace('In isDecendant', ancenstorId, ' ', id, ' = ', decendants[ancenstorId].indexOf(id) >= 0);\n  if (decendants[ancenstorId].indexOf(id) >= 0) return true;\n  return false;\n};\n\nvar edgeInCluster = function edgeInCluster(edge, clusterId) {\n  _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].info('Decendants of ', clusterId, ' is ', decendants[clusterId]);\n  _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].info('Edge is ', edge); // Edges to/from the cluster is not in the cluster, they are in the parent\n\n  if (edge.v === clusterId) return false;\n  if (edge.w === clusterId) return false;\n\n  if (!decendants[clusterId]) {\n    _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].debug('Tilt, ', clusterId, ',not in decendants');\n    return false;\n  }\n\n  _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].info('Here ');\n  if (decendants[clusterId].indexOf(edge.v) >= 0) return true;\n  if (isDecendant(edge.v, clusterId)) return true;\n  if (isDecendant(edge.w, clusterId)) return true;\n  if (decendants[clusterId].indexOf(edge.w) >= 0) return true;\n  return false;\n};\n\nvar copy = function copy(clusterId, graph, newGraph, rootId) {\n  _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].warn('Copying children of ', clusterId, 'root', rootId, 'data', graph.node(clusterId), rootId);\n  var nodes = graph.children(clusterId) || []; // Include cluster node if it is not the root\n\n  if (clusterId !== rootId) {\n    nodes.push(clusterId);\n  }\n\n  _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].warn('Copying (nodes) clusterId', clusterId, 'nodes', nodes);\n  nodes.forEach(function (node) {\n    if (graph.children(node).length > 0) {\n      copy(node, graph, newGraph, rootId);\n    } else {\n      var data = graph.node(node);\n      _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].info('cp ', node, ' to ', rootId, ' with parent ', clusterId); //,node, data, ' parent is ', clusterId);\n\n      newGraph.setNode(node, data);\n\n      if (rootId !== graph.parent(node)) {\n        _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].warn('Setting parent', node, graph.parent(node));\n        newGraph.setParent(node, graph.parent(node));\n      }\n\n      if (clusterId !== rootId && node !== clusterId) {\n        _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].debug('Setting parent', node, clusterId);\n        newGraph.setParent(node, clusterId);\n      } else {\n        _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].info('In copy ', clusterId, 'root', rootId, 'data', graph.node(clusterId), rootId);\n        _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].debug('Not Setting parent for node=', node, 'cluster!==rootId', clusterId !== rootId, 'node!==clusterId', node !== clusterId);\n      }\n\n      var edges = graph.edges(node);\n      _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].debug('Copying Edges', edges);\n      edges.forEach(function (edge) {\n        _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].info('Edge', edge);\n        var data = graph.edge(edge.v, edge.w, edge.name);\n        _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].info('Edge data', data, rootId);\n\n        try {\n          // Do not copy edges in and out of the root cluster, they belong to the parent graph\n          if (edgeInCluster(edge, rootId)) {\n            _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].info('Copying as ', edge.v, edge.w, data, edge.name);\n            newGraph.setEdge(edge.v, edge.w, data, edge.name);\n            _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].info('newGraph edges ', newGraph.edges(), newGraph.edge(newGraph.edges()[0]));\n          } else {\n            _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].info('Skipping copy of edge ', edge.v, '-->', edge.w, ' rootId: ', rootId, ' clusterId:', clusterId);\n          }\n        } catch (e) {\n          _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].error(e);\n        }\n      });\n    }\n\n    _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].debug('Removing node', node);\n    graph.removeNode(node);\n  });\n};\n\nvar extractDecendants = function extractDecendants(id, graph) {\n  // log.debug('Extracting ', id);\n  var children = graph.children(id);\n  var res = [].concat(children);\n\n  for (var i = 0; i < children.length; i++) {\n    parents[children[i]] = id;\n    res = res.concat(extractDecendants(children[i], graph));\n  }\n\n  return res;\n};\n/**\n * Validates the graph, checking that all parent child relation points to existing nodes and that\n * edges between nodes also ia correct. When not correct the function logs the discrepancies.\n * @param {graphlib graph} g\n */\n\nvar validate = function validate(graph) {\n  var edges = graph.edges();\n  _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].trace('Edges: ', edges);\n\n  for (var i = 0; i < edges.length; i++) {\n    if (graph.children(edges[i].v).length > 0) {\n      _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].trace('The node ', edges[i].v, ' is part of and edge even though it has children');\n      return false;\n    }\n\n    if (graph.children(edges[i].w).length > 0) {\n      _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].trace('The node ', edges[i].w, ' is part of and edge even though it has children');\n      return false;\n    }\n  }\n\n  return true;\n};\n/**\n * Finds a child that is not a cluster. When faking a edge between a node and a cluster.\n * @param {Finds a } id\n * @param {*} graph\n */\n\nvar findNonClusterChild = function findNonClusterChild(id, graph) {\n  // const node = graph.node(id);\n  _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].trace('Searching', id); // const children = graph.children(id).reverse();\n\n  var children = graph.children(id); //.reverse();\n\n  _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].trace('Searching children of id ', id, children);\n\n  if (children.length < 1) {\n    _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].trace('This is a valid node', id);\n    return id;\n  }\n\n  for (var i = 0; i < children.length; i++) {\n    var _id = findNonClusterChild(children[i], graph);\n\n    if (_id) {\n      _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].trace('Found replacement for', id, ' => ', _id);\n      return _id;\n    }\n  }\n};\n\nvar getAnchorId = function getAnchorId(id) {\n  if (!clusterDb[id]) {\n    return id;\n  } // If the cluster has no external connections\n\n\n  if (!clusterDb[id].externalConnections) {\n    return id;\n  } // Return the replacement node\n\n\n  if (clusterDb[id]) {\n    return clusterDb[id].id;\n  }\n\n  return id;\n};\n\nvar adjustClustersAndEdges = function adjustClustersAndEdges(graph, depth) {\n  if (!graph || depth > 10) {\n    _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].debug('Opting out, no graph ');\n    return;\n  } else {\n    _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].debug('Opting in, graph ');\n  } // Go through the nodes and for each cluster found, save a replacment node, this can be used when\n  // faking a link to a cluster\n\n\n  graph.nodes().forEach(function (id) {\n    var children = graph.children(id);\n\n    if (children.length > 0) {\n      _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].warn('Cluster identified', id, ' Replacement id in edges: ', findNonClusterChild(id, graph));\n      decendants[id] = extractDecendants(id, graph);\n      clusterDb[id] = {\n        id: findNonClusterChild(id, graph),\n        clusterData: graph.node(id)\n      };\n    }\n  }); // Check incoming and outgoing edges for each cluster\n\n  graph.nodes().forEach(function (id) {\n    var children = graph.children(id);\n    var edges = graph.edges();\n\n    if (children.length > 0) {\n      _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].debug('Cluster identified', id, decendants);\n      edges.forEach(function (edge) {\n        // log.debug('Edge, decendants: ', edge, decendants[id]);\n        // Check if any edge leaves the cluster (not the actual cluster, thats a link from the box)\n        if (edge.v !== id && edge.w !== id) {\n          // Any edge where either the one of the nodes is decending to the cluster but not the other\n          // if (decendants[id].indexOf(edge.v) < 0 && decendants[id].indexOf(edge.w) < 0) {\n          var d1 = isDecendant(edge.v, id);\n          var d2 = isDecendant(edge.w, id); // d1 xor d2 - if either d1 is true and d2 is false or the other way around\n\n          if (d1 ^ d2) {\n            _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].warn('Edge: ', edge, ' leaves cluster ', id);\n            _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].warn('Decendants of XXX ', id, ': ', decendants[id]);\n            clusterDb[id].externalConnections = true;\n          }\n        }\n      });\n    } else {\n      _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].debug('Not a cluster ', id, decendants);\n    }\n  }); // For clusters with incoming and/or outgoing edges translate those edges to a real node\n  // in the cluster inorder to fake the edge\n\n  graph.edges().forEach(function (e) {\n    var edge = graph.edge(e);\n    _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].warn('Edge ' + e.v + ' -> ' + e.w + ': ' + JSON.stringify(e));\n    _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].warn('Edge ' + e.v + ' -> ' + e.w + ': ' + JSON.stringify(graph.edge(e)));\n    var v = e.v;\n    var w = e.w; // Check if link is either from or to a cluster\n\n    _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].warn('Fix XXX', clusterDb, 'ids:', e.v, e.w, 'Translateing: ', clusterDb[e.v], ' --- ', clusterDb[e.w]);\n\n    if (clusterDb[e.v] || clusterDb[e.w]) {\n      _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].warn('Fixing and trixing - removing XXX', e.v, e.w, e.name);\n      v = getAnchorId(e.v);\n      w = getAnchorId(e.w);\n      graph.removeEdge(e.v, e.w, e.name);\n      if (v !== e.v) edge.fromCluster = e.v;\n      if (w !== e.w) edge.toCluster = e.w;\n      _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].warn('Fix Replacing with XXX', v, w, e.name);\n      graph.setEdge(v, w, edge, e.name);\n    }\n  });\n  _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].warn('Adjusted Graph', graphlib__WEBPACK_IMPORTED_MODULE_1___default.a.json.write(graph));\n  extractor(graph, 0);\n  _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].trace(clusterDb); // Remove references to extracted cluster\n  // graph.edges().forEach(edge => {\n  //   if (isDecendant(edge.v, clusterId) || isDecendant(edge.w, clusterId)) {\n  //     graph.removeEdge(edge);\n  //   }\n  // });\n};\nvar extractor = function extractor(graph, depth) {\n  _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].warn('extractor - ', depth, graphlib__WEBPACK_IMPORTED_MODULE_1___default.a.json.write(graph), graph.children('D'));\n\n  if (depth > 10) {\n    _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].error('Bailing out');\n    return;\n  } // For clusters without incoming and/or outgoing edges, create a new cluster-node\n  // containing the nodes and edges in the custer in a new graph\n  // for (let i = 0;)\n\n\n  var nodes = graph.nodes();\n  var hasChildren = false;\n\n  for (var i = 0; i < nodes.length; i++) {\n    var node = nodes[i];\n    var children = graph.children(node);\n    hasChildren = hasChildren || children.length > 0;\n  }\n\n  if (!hasChildren) {\n    _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].debug('Done, no node has children', graph.nodes());\n    return;\n  } // const clusters = Object.keys(clusterDb);\n  // clusters.forEach(clusterId => {\n\n\n  _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].debug('Nodes = ', nodes, depth);\n\n  for (var _i = 0; _i < nodes.length; _i++) {\n    var _node = nodes[_i];\n    _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].debug('Extracting node', _node, clusterDb, clusterDb[_node] && !clusterDb[_node].externalConnections, !graph.parent(_node), graph.node(_node), graph.children('D'), ' Depth ', depth); // Note that the node might have been removed after the Object.keys call so better check\n    // that it still is in the game\n\n    if (!clusterDb[_node]) {\n      // Skip if the node is not a cluster\n      _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].debug('Not a cluster', _node, depth); // break;\n    } else if (!clusterDb[_node].externalConnections && // !graph.parent(node) &&\n    graph.children(_node) && graph.children(_node).length > 0) {\n      _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].warn('Cluster without external connections, without a parent and with children', _node, depth);\n      var graphSettings = graph.graph();\n      var dir = graphSettings.rankdir === 'TB' ? 'LR' : 'TB';\n\n      if (clusterDb[_node]) {\n        if (clusterDb[_node].clusterData && clusterDb[_node].clusterData.dir) {\n          dir = clusterDb[_node].clusterData.dir;\n          _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].warn('Fixing dir', clusterDb[_node].clusterData.dir, dir);\n        }\n      }\n\n      var clusterGraph = new graphlib__WEBPACK_IMPORTED_MODULE_1___default.a.Graph({\n        multigraph: true,\n        compound: true\n      }).setGraph({\n        rankdir: dir,\n        // Todo: set proper spacing\n        nodesep: 50,\n        ranksep: 50,\n        marginx: 8,\n        marginy: 8\n      }).setDefaultEdgeLabel(function () {\n        return {};\n      });\n      _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].warn('Old graph before copy', graphlib__WEBPACK_IMPORTED_MODULE_1___default.a.json.write(graph));\n      copy(_node, graph, clusterGraph, _node);\n      graph.setNode(_node, {\n        clusterNode: true,\n        id: _node,\n        clusterData: clusterDb[_node].clusterData,\n        labelText: clusterDb[_node].labelText,\n        graph: clusterGraph\n      });\n      _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].warn('New graph after copy node: (', _node, ')', graphlib__WEBPACK_IMPORTED_MODULE_1___default.a.json.write(clusterGraph));\n      _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].debug('Old graph after copy', graphlib__WEBPACK_IMPORTED_MODULE_1___default.a.json.write(graph));\n    } else {\n      _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].warn('Cluster ** ', _node, ' **not meeting the criteria !externalConnections:', !clusterDb[_node].externalConnections, ' no parent: ', !graph.parent(_node), ' children ', graph.children(_node) && graph.children(_node).length > 0, graph.children('D'), depth);\n      _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].debug(clusterDb);\n    }\n  }\n\n  nodes = graph.nodes();\n  _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].warn('New list of nodes', nodes);\n\n  for (var _i2 = 0; _i2 < nodes.length; _i2++) {\n    var _node2 = nodes[_i2];\n    var data = graph.node(_node2);\n    _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].warn(' Now next level', _node2, data);\n\n    if (data.clusterNode) {\n      extractor(data.graph, depth + 1);\n    }\n  }\n};\n\nvar sorter = function sorter(graph, nodes) {\n  if (nodes.length === 0) return [];\n  var result = Object.assign(nodes);\n  nodes.forEach(function (node) {\n    var children = graph.children(node);\n    var sorted = sorter(graph, children);\n    result = result.concat(sorted);\n  });\n  return result;\n};\n\nvar sortNodesByHierarchy = function sortNodesByHierarchy(graph) {\n  return sorter(graph, graph.children());\n};\n\n/***/ }),\n\n/***/ \"./src/dagre-wrapper/nodes.js\":\n/*!************************************!*\\\n  !*** ./src/dagre-wrapper/nodes.js ***!\n  \\************************************/\n/*! exports provided: insertNode, setNodeElem, clear, positionNode */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"insertNode\", function() { return insertNode; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"setNodeElem\", function() { return setNodeElem; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"clear\", function() { return clear; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"positionNode\", function() { return positionNode; });\n/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3 */ \"./node_modules/d3/src/index.js\");\n/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../logger */ \"./src/logger.js\");\n/* harmony import */ var _shapes_util__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./shapes/util */ \"./src/dagre-wrapper/shapes/util.js\");\n/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../config */ \"./src/config.js\");\n/* harmony import */ var _intersect_index_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./intersect/index.js */ \"./src/dagre-wrapper/intersect/index.js\");\n/* harmony import */ var _createLabel__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./createLabel */ \"./src/dagre-wrapper/createLabel.js\");\n/* harmony import */ var _shapes_note__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./shapes/note */ \"./src/dagre-wrapper/shapes/note.js\");\n/* harmony import */ var _diagrams_class_svgDraw__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../diagrams/class/svgDraw */ \"./src/diagrams/class/svgDraw.js\");\n/* harmony import */ var _diagrams_common_common__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../diagrams/common/common */ \"./src/diagrams/common/common.js\");\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n\n // eslint-disable-line\n\n\n\n\n\n\n\n\n\nvar question = function question(parent, node) {\n  var _labelHelper = Object(_shapes_util__WEBPACK_IMPORTED_MODULE_2__[\"labelHelper\"])(parent, node, undefined, true),\n      shapeSvg = _labelHelper.shapeSvg,\n      bbox = _labelHelper.bbox;\n\n  var w = bbox.width + node.padding;\n  var h = bbox.height + node.padding;\n  var s = w + h;\n  var points = [{\n    x: s / 2,\n    y: 0\n  }, {\n    x: s,\n    y: -s / 2\n  }, {\n    x: s / 2,\n    y: -s\n  }, {\n    x: 0,\n    y: -s / 2\n  }];\n  _logger__WEBPACK_IMPORTED_MODULE_1__[\"log\"].info('Question main (Circle)');\n  var questionElem = Object(_shapes_util__WEBPACK_IMPORTED_MODULE_2__[\"insertPolygonShape\"])(shapeSvg, s, s, points);\n  questionElem.attr('style', node.style);\n  Object(_shapes_util__WEBPACK_IMPORTED_MODULE_2__[\"updateNodeBounds\"])(node, questionElem);\n\n  node.intersect = function (point) {\n    _logger__WEBPACK_IMPORTED_MODULE_1__[\"log\"].warn('Intersect called');\n    return _intersect_index_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"].polygon(node, points, point);\n  };\n\n  return shapeSvg;\n};\n\nvar choice = function choice(parent, node) {\n  var shapeSvg = parent.insert('g').attr('class', 'node default').attr('id', node.domId || node.id);\n  var s = 28;\n  var points = [{\n    x: 0,\n    y: s / 2\n  }, {\n    x: s / 2,\n    y: 0\n  }, {\n    x: 0,\n    y: -s / 2\n  }, {\n    x: -s / 2,\n    y: 0\n  }];\n  var choice = shapeSvg.insert('polygon', ':first-child').attr('points', points.map(function (d) {\n    return d.x + ',' + d.y;\n  }).join(' ')); // center the circle around its coordinate\n\n  choice.attr('class', 'state-start').attr('r', 7).attr('width', 28).attr('height', 28);\n  node.width = 28;\n  node.height = 28;\n\n  node.intersect = function (point) {\n    return _intersect_index_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"].circle(node, 14, point);\n  };\n\n  return shapeSvg;\n};\n\nvar hexagon = function hexagon(parent, node) {\n  var _labelHelper2 = Object(_shapes_util__WEBPACK_IMPORTED_MODULE_2__[\"labelHelper\"])(parent, node, undefined, true),\n      shapeSvg = _labelHelper2.shapeSvg,\n      bbox = _labelHelper2.bbox;\n\n  var f = 4;\n  var h = bbox.height + node.padding;\n  var m = h / f;\n  var w = bbox.width + 2 * m + node.padding;\n  var points = [{\n    x: m,\n    y: 0\n  }, {\n    x: w - m,\n    y: 0\n  }, {\n    x: w,\n    y: -h / 2\n  }, {\n    x: w - m,\n    y: -h\n  }, {\n    x: m,\n    y: -h\n  }, {\n    x: 0,\n    y: -h / 2\n  }];\n  var hex = Object(_shapes_util__WEBPACK_IMPORTED_MODULE_2__[\"insertPolygonShape\"])(shapeSvg, w, h, points);\n  hex.attr('style', node.style);\n  Object(_shapes_util__WEBPACK_IMPORTED_MODULE_2__[\"updateNodeBounds\"])(node, hex);\n\n  node.intersect = function (point) {\n    return _intersect_index_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"].polygon(node, points, point);\n  };\n\n  return shapeSvg;\n};\n\nvar rect_left_inv_arrow = function rect_left_inv_arrow(parent, node) {\n  var _labelHelper3 = Object(_shapes_util__WEBPACK_IMPORTED_MODULE_2__[\"labelHelper\"])(parent, node, undefined, true),\n      shapeSvg = _labelHelper3.shapeSvg,\n      bbox = _labelHelper3.bbox;\n\n  var w = bbox.width + node.padding;\n  var h = bbox.height + node.padding;\n  var points = [{\n    x: -h / 2,\n    y: 0\n  }, {\n    x: w,\n    y: 0\n  }, {\n    x: w,\n    y: -h\n  }, {\n    x: -h / 2,\n    y: -h\n  }, {\n    x: 0,\n    y: -h / 2\n  }];\n  var el = Object(_shapes_util__WEBPACK_IMPORTED_MODULE_2__[\"insertPolygonShape\"])(shapeSvg, w, h, points);\n  el.attr('style', node.style);\n  node.width = w + h;\n  node.height = h;\n\n  node.intersect = function (point) {\n    return _intersect_index_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"].polygon(node, points, point);\n  };\n\n  return shapeSvg;\n};\n\nvar lean_right = function lean_right(parent, node) {\n  var _labelHelper4 = Object(_shapes_util__WEBPACK_IMPORTED_MODULE_2__[\"labelHelper\"])(parent, node, undefined, true),\n      shapeSvg = _labelHelper4.shapeSvg,\n      bbox = _labelHelper4.bbox;\n\n  var w = bbox.width + node.padding;\n  var h = bbox.height + node.padding;\n  var points = [{\n    x: -2 * h / 6,\n    y: 0\n  }, {\n    x: w - h / 6,\n    y: 0\n  }, {\n    x: w + 2 * h / 6,\n    y: -h\n  }, {\n    x: h / 6,\n    y: -h\n  }];\n  var el = Object(_shapes_util__WEBPACK_IMPORTED_MODULE_2__[\"insertPolygonShape\"])(shapeSvg, w, h, points);\n  el.attr('style', node.style);\n  Object(_shapes_util__WEBPACK_IMPORTED_MODULE_2__[\"updateNodeBounds\"])(node, el);\n\n  node.intersect = function (point) {\n    return _intersect_index_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"].polygon(node, points, point);\n  };\n\n  return shapeSvg;\n};\n\nvar lean_left = function lean_left(parent, node) {\n  var _labelHelper5 = Object(_shapes_util__WEBPACK_IMPORTED_MODULE_2__[\"labelHelper\"])(parent, node, undefined, true),\n      shapeSvg = _labelHelper5.shapeSvg,\n      bbox = _labelHelper5.bbox;\n\n  var w = bbox.width + node.padding;\n  var h = bbox.height + node.padding;\n  var points = [{\n    x: 2 * h / 6,\n    y: 0\n  }, {\n    x: w + h / 6,\n    y: 0\n  }, {\n    x: w - 2 * h / 6,\n    y: -h\n  }, {\n    x: -h / 6,\n    y: -h\n  }];\n  var el = Object(_shapes_util__WEBPACK_IMPORTED_MODULE_2__[\"insertPolygonShape\"])(shapeSvg, w, h, points);\n  el.attr('style', node.style);\n  Object(_shapes_util__WEBPACK_IMPORTED_MODULE_2__[\"updateNodeBounds\"])(node, el);\n\n  node.intersect = function (point) {\n    return _intersect_index_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"].polygon(node, points, point);\n  };\n\n  return shapeSvg;\n};\n\nvar trapezoid = function trapezoid(parent, node) {\n  var _labelHelper6 = Object(_shapes_util__WEBPACK_IMPORTED_MODULE_2__[\"labelHelper\"])(parent, node, undefined, true),\n      shapeSvg = _labelHelper6.shapeSvg,\n      bbox = _labelHelper6.bbox;\n\n  var w = bbox.width + node.padding;\n  var h = bbox.height + node.padding;\n  var points = [{\n    x: -2 * h / 6,\n    y: 0\n  }, {\n    x: w + 2 * h / 6,\n    y: 0\n  }, {\n    x: w - h / 6,\n    y: -h\n  }, {\n    x: h / 6,\n    y: -h\n  }];\n  var el = Object(_shapes_util__WEBPACK_IMPORTED_MODULE_2__[\"insertPolygonShape\"])(shapeSvg, w, h, points);\n  el.attr('style', node.style);\n  Object(_shapes_util__WEBPACK_IMPORTED_MODULE_2__[\"updateNodeBounds\"])(node, el);\n\n  node.intersect = function (point) {\n    return _intersect_index_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"].polygon(node, points, point);\n  };\n\n  return shapeSvg;\n};\n\nvar inv_trapezoid = function inv_trapezoid(parent, node) {\n  var _labelHelper7 = Object(_shapes_util__WEBPACK_IMPORTED_MODULE_2__[\"labelHelper\"])(parent, node, undefined, true),\n      shapeSvg = _labelHelper7.shapeSvg,\n      bbox = _labelHelper7.bbox;\n\n  var w = bbox.width + node.padding;\n  var h = bbox.height + node.padding;\n  var points = [{\n    x: h / 6,\n    y: 0\n  }, {\n    x: w - h / 6,\n    y: 0\n  }, {\n    x: w + 2 * h / 6,\n    y: -h\n  }, {\n    x: -2 * h / 6,\n    y: -h\n  }];\n  var el = Object(_shapes_util__WEBPACK_IMPORTED_MODULE_2__[\"insertPolygonShape\"])(shapeSvg, w, h, points);\n  el.attr('style', node.style);\n  Object(_shapes_util__WEBPACK_IMPORTED_MODULE_2__[\"updateNodeBounds\"])(node, el);\n\n  node.intersect = function (point) {\n    return _intersect_index_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"].polygon(node, points, point);\n  };\n\n  return shapeSvg;\n};\n\nvar rect_right_inv_arrow = function rect_right_inv_arrow(parent, node) {\n  var _labelHelper8 = Object(_shapes_util__WEBPACK_IMPORTED_MODULE_2__[\"labelHelper\"])(parent, node, undefined, true),\n      shapeSvg = _labelHelper8.shapeSvg,\n      bbox = _labelHelper8.bbox;\n\n  var w = bbox.width + node.padding;\n  var h = bbox.height + node.padding;\n  var points = [{\n    x: 0,\n    y: 0\n  }, {\n    x: w + h / 2,\n    y: 0\n  }, {\n    x: w,\n    y: -h / 2\n  }, {\n    x: w + h / 2,\n    y: -h\n  }, {\n    x: 0,\n    y: -h\n  }];\n  var el = Object(_shapes_util__WEBPACK_IMPORTED_MODULE_2__[\"insertPolygonShape\"])(shapeSvg, w, h, points);\n  el.attr('style', node.style);\n  Object(_shapes_util__WEBPACK_IMPORTED_MODULE_2__[\"updateNodeBounds\"])(node, el);\n\n  node.intersect = function (point) {\n    return _intersect_index_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"].polygon(node, points, point);\n  };\n\n  return shapeSvg;\n};\n\nvar cylinder = function cylinder(parent, node) {\n  var _labelHelper9 = Object(_shapes_util__WEBPACK_IMPORTED_MODULE_2__[\"labelHelper\"])(parent, node, undefined, true),\n      shapeSvg = _labelHelper9.shapeSvg,\n      bbox = _labelHelper9.bbox;\n\n  var w = bbox.width + node.padding;\n  var rx = w / 2;\n  var ry = rx / (2.5 + w / 50);\n  var h = bbox.height + ry + node.padding;\n  var shape = 'M 0,' + ry + ' a ' + rx + ',' + ry + ' 0,0,0 ' + w + ' 0 a ' + rx + ',' + ry + ' 0,0,0 ' + -w + ' 0 l 0,' + h + ' a ' + rx + ',' + ry + ' 0,0,0 ' + w + ' 0 l 0,' + -h;\n  var el = shapeSvg.attr('label-offset-y', ry).insert('path', ':first-child').attr('style', node.style).attr('d', shape).attr('transform', 'translate(' + -w / 2 + ',' + -(h / 2 + ry) + ')');\n  Object(_shapes_util__WEBPACK_IMPORTED_MODULE_2__[\"updateNodeBounds\"])(node, el);\n\n  node.intersect = function (point) {\n    var pos = _intersect_index_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"].rect(node, point);\n    var x = pos.x - node.x;\n\n    if (rx != 0 && (Math.abs(x) < node.width / 2 || Math.abs(x) == node.width / 2 && Math.abs(pos.y - node.y) > node.height / 2 - ry)) {\n      // ellipsis equation: x*x / a*a + y*y / b*b = 1\n      // solve for y to get adjustion value for pos.y\n      var y = ry * ry * (1 - x * x / (rx * rx));\n      if (y != 0) y = Math.sqrt(y);\n      y = ry - y;\n      if (point.y - node.y > 0) y = -y;\n      pos.y += y;\n    }\n\n    return pos;\n  };\n\n  return shapeSvg;\n};\n\nvar rect = function rect(parent, node) {\n  var _labelHelper10 = Object(_shapes_util__WEBPACK_IMPORTED_MODULE_2__[\"labelHelper\"])(parent, node, 'node ' + node.classes, true),\n      shapeSvg = _labelHelper10.shapeSvg,\n      bbox = _labelHelper10.bbox,\n      halfPadding = _labelHelper10.halfPadding;\n\n  _logger__WEBPACK_IMPORTED_MODULE_1__[\"log\"].trace('Classes = ', node.classes); // add the rect\n\n  var rect = shapeSvg.insert('rect', ':first-child');\n  rect.attr('class', 'basic label-container').attr('style', node.style).attr('rx', node.rx).attr('ry', node.ry).attr('x', -bbox.width / 2 - halfPadding).attr('y', -bbox.height / 2 - halfPadding).attr('width', bbox.width + node.padding).attr('height', bbox.height + node.padding);\n  Object(_shapes_util__WEBPACK_IMPORTED_MODULE_2__[\"updateNodeBounds\"])(node, rect);\n\n  node.intersect = function (point) {\n    return _intersect_index_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"].rect(node, point);\n  };\n\n  return shapeSvg;\n};\n\nvar rectWithTitle = function rectWithTitle(parent, node) {\n  // const { shapeSvg, bbox, halfPadding } = labelHelper(parent, node, 'node ' + node.classes);\n  var classes;\n\n  if (!node.classes) {\n    classes = 'node default';\n  } else {\n    classes = 'node ' + node.classes;\n  } // Add outer g element\n\n\n  var shapeSvg = parent.insert('g').attr('class', classes).attr('id', node.domId || node.id); // Create the title label and insert it after the rect\n\n  var rect = shapeSvg.insert('rect', ':first-child'); // const innerRect = shapeSvg.insert('rect');\n\n  var innerLine = shapeSvg.insert('line');\n  var label = shapeSvg.insert('g').attr('class', 'label');\n  var text2 = node.labelText.flat ? node.labelText.flat() : node.labelText; // const text2 = typeof text2prim === 'object' ? text2prim[0] : text2prim;\n\n  var title = '';\n\n  if (_typeof(text2) === 'object') {\n    title = text2[0];\n  } else {\n    title = text2;\n  }\n\n  _logger__WEBPACK_IMPORTED_MODULE_1__[\"log\"].info('Label text abc79', title, text2, _typeof(text2) === 'object');\n  var text = label.node().appendChild(Object(_createLabel__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(title, node.labelStyle, true, true));\n  var bbox;\n\n  if (Object(_diagrams_common_common__WEBPACK_IMPORTED_MODULE_8__[\"evaluate\"])(Object(_config__WEBPACK_IMPORTED_MODULE_3__[\"getConfig\"])().flowchart.htmlLabels)) {\n    var div = text.children[0];\n    var dv = Object(d3__WEBPACK_IMPORTED_MODULE_0__[\"select\"])(text);\n    bbox = div.getBoundingClientRect();\n    dv.attr('width', bbox.width);\n    dv.attr('height', bbox.height);\n  }\n\n  _logger__WEBPACK_IMPORTED_MODULE_1__[\"log\"].info('Text 2', text2);\n  var textRows = text2.slice(1, text2.length);\n  var titleBox = text.getBBox();\n  var descr = label.node().appendChild(Object(_createLabel__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(textRows.join ? textRows.join('<br/>') : textRows, node.labelStyle, true, true));\n\n  if (Object(_diagrams_common_common__WEBPACK_IMPORTED_MODULE_8__[\"evaluate\"])(Object(_config__WEBPACK_IMPORTED_MODULE_3__[\"getConfig\"])().flowchart.htmlLabels)) {\n    var _div = descr.children[0];\n\n    var _dv = Object(d3__WEBPACK_IMPORTED_MODULE_0__[\"select\"])(descr);\n\n    bbox = _div.getBoundingClientRect();\n\n    _dv.attr('width', bbox.width);\n\n    _dv.attr('height', bbox.height);\n  } // bbox = label.getBBox();\n  // log.info(descr);\n\n\n  var halfPadding = node.padding / 2;\n  Object(d3__WEBPACK_IMPORTED_MODULE_0__[\"select\"])(descr).attr('transform', 'translate( ' + (bbox.width > titleBox.width ? 0 : (titleBox.width - bbox.width) / 2) + ', ' + (titleBox.height + halfPadding + 5) + ')');\n  Object(d3__WEBPACK_IMPORTED_MODULE_0__[\"select\"])(text).attr('transform', 'translate( ' + (bbox.width < titleBox.width ? 0 : -(titleBox.width - bbox.width) / 2) + ', ' + 0 + ')'); // Get the size of the label\n  // Bounding box for title and text\n\n  bbox = label.node().getBBox(); // Center the label\n\n  label.attr('transform', 'translate(' + -bbox.width / 2 + ', ' + (-bbox.height / 2 - halfPadding + 3) + ')');\n  rect.attr('class', 'outer title-state').attr('x', -bbox.width / 2 - halfPadding).attr('y', -bbox.height / 2 - halfPadding).attr('width', bbox.width + node.padding).attr('height', bbox.height + node.padding);\n  innerLine.attr('class', 'divider').attr('x1', -bbox.width / 2 - halfPadding).attr('x2', bbox.width / 2 + halfPadding).attr('y1', -bbox.height / 2 - halfPadding + titleBox.height + halfPadding).attr('y2', -bbox.height / 2 - halfPadding + titleBox.height + halfPadding);\n  Object(_shapes_util__WEBPACK_IMPORTED_MODULE_2__[\"updateNodeBounds\"])(node, rect);\n\n  node.intersect = function (point) {\n    return _intersect_index_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"].rect(node, point);\n  };\n\n  return shapeSvg;\n};\n\nvar stadium = function stadium(parent, node) {\n  var _labelHelper11 = Object(_shapes_util__WEBPACK_IMPORTED_MODULE_2__[\"labelHelper\"])(parent, node, undefined, true),\n      shapeSvg = _labelHelper11.shapeSvg,\n      bbox = _labelHelper11.bbox;\n\n  var h = bbox.height + node.padding;\n  var w = bbox.width + h / 4 + node.padding; // add the rect\n\n  var rect = shapeSvg.insert('rect', ':first-child').attr('style', node.style).attr('rx', h / 2).attr('ry', h / 2).attr('x', -w / 2).attr('y', -h / 2).attr('width', w).attr('height', h);\n  Object(_shapes_util__WEBPACK_IMPORTED_MODULE_2__[\"updateNodeBounds\"])(node, rect);\n\n  node.intersect = function (point) {\n    return _intersect_index_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"].rect(node, point);\n  };\n\n  return shapeSvg;\n};\n\nvar circle = function circle(parent, node) {\n  var _labelHelper12 = Object(_shapes_util__WEBPACK_IMPORTED_MODULE_2__[\"labelHelper\"])(parent, node, undefined, true),\n      shapeSvg = _labelHelper12.shapeSvg,\n      bbox = _labelHelper12.bbox,\n      halfPadding = _labelHelper12.halfPadding;\n\n  var circle = shapeSvg.insert('circle', ':first-child'); // center the circle around its coordinate\n\n  circle.attr('style', node.style).attr('rx', node.rx).attr('ry', node.ry).attr('r', bbox.width / 2 + halfPadding).attr('width', bbox.width + node.padding).attr('height', bbox.height + node.padding);\n  _logger__WEBPACK_IMPORTED_MODULE_1__[\"log\"].info('Circle main');\n  Object(_shapes_util__WEBPACK_IMPORTED_MODULE_2__[\"updateNodeBounds\"])(node, circle);\n\n  node.intersect = function (point) {\n    _logger__WEBPACK_IMPORTED_MODULE_1__[\"log\"].info('Circle intersect', node, bbox.width / 2 + halfPadding, point);\n    return _intersect_index_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"].circle(node, bbox.width / 2 + halfPadding, point);\n  };\n\n  return shapeSvg;\n};\n\nvar subroutine = function subroutine(parent, node) {\n  var _labelHelper13 = Object(_shapes_util__WEBPACK_IMPORTED_MODULE_2__[\"labelHelper\"])(parent, node, undefined, true),\n      shapeSvg = _labelHelper13.shapeSvg,\n      bbox = _labelHelper13.bbox;\n\n  var w = bbox.width + node.padding;\n  var h = bbox.height + node.padding;\n  var points = [{\n    x: 0,\n    y: 0\n  }, {\n    x: w,\n    y: 0\n  }, {\n    x: w,\n    y: -h\n  }, {\n    x: 0,\n    y: -h\n  }, {\n    x: 0,\n    y: 0\n  }, {\n    x: -8,\n    y: 0\n  }, {\n    x: w + 8,\n    y: 0\n  }, {\n    x: w + 8,\n    y: -h\n  }, {\n    x: -8,\n    y: -h\n  }, {\n    x: -8,\n    y: 0\n  }];\n  var el = Object(_shapes_util__WEBPACK_IMPORTED_MODULE_2__[\"insertPolygonShape\"])(shapeSvg, w, h, points);\n  el.attr('style', node.style);\n  Object(_shapes_util__WEBPACK_IMPORTED_MODULE_2__[\"updateNodeBounds\"])(node, el);\n\n  node.intersect = function (point) {\n    return _intersect_index_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"].polygon(node, points, point);\n  };\n\n  return shapeSvg;\n};\n\nvar start = function start(parent, node) {\n  var shapeSvg = parent.insert('g').attr('class', 'node default').attr('id', node.domId || node.id);\n  var circle = shapeSvg.insert('circle', ':first-child'); // center the circle around its coordinate\n\n  circle.attr('class', 'state-start').attr('r', 7).attr('width', 14).attr('height', 14);\n  Object(_shapes_util__WEBPACK_IMPORTED_MODULE_2__[\"updateNodeBounds\"])(node, circle);\n\n  node.intersect = function (point) {\n    return _intersect_index_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"].circle(node, 7, point);\n  };\n\n  return shapeSvg;\n};\n\nvar forkJoin = function forkJoin(parent, node, dir) {\n  var shapeSvg = parent.insert('g').attr('class', 'node default').attr('id', node.domId || node.id);\n  var width = 70;\n  var height = 10;\n\n  if (dir === 'LR') {\n    width = 10;\n    height = 70;\n  }\n\n  var shape = shapeSvg.append('rect').attr('x', -1 * width / 2).attr('y', -1 * height / 2).attr('width', width).attr('height', height).attr('class', 'fork-join');\n  Object(_shapes_util__WEBPACK_IMPORTED_MODULE_2__[\"updateNodeBounds\"])(node, shape);\n  node.height = node.height + node.padding / 2;\n  node.width = node.width + node.padding / 2;\n\n  node.intersect = function (point) {\n    return _intersect_index_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"].rect(node, point);\n  };\n\n  return shapeSvg;\n};\n\nvar end = function end(parent, node) {\n  var shapeSvg = parent.insert('g').attr('class', 'node default').attr('id', node.domId || node.id);\n  var innerCircle = shapeSvg.insert('circle', ':first-child');\n  var circle = shapeSvg.insert('circle', ':first-child');\n  circle.attr('class', 'state-start').attr('r', 7).attr('width', 14).attr('height', 14);\n  innerCircle.attr('class', 'state-end').attr('r', 5).attr('width', 10).attr('height', 10);\n  Object(_shapes_util__WEBPACK_IMPORTED_MODULE_2__[\"updateNodeBounds\"])(node, circle);\n\n  node.intersect = function (point) {\n    return _intersect_index_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"].circle(node, 7, point);\n  };\n\n  return shapeSvg;\n};\n\nvar class_box = function class_box(parent, node) {\n  var halfPadding = node.padding / 2;\n  var rowPadding = 4;\n  var lineHeight = 8;\n  var classes;\n\n  if (!node.classes) {\n    classes = 'node default';\n  } else {\n    classes = 'node ' + node.classes;\n  } // Add outer g element\n\n\n  var shapeSvg = parent.insert('g').attr('class', classes).attr('id', node.domId || node.id); // Create the title label and insert it after the rect\n\n  var rect = shapeSvg.insert('rect', ':first-child');\n  var topLine = shapeSvg.insert('line');\n  var bottomLine = shapeSvg.insert('line');\n  var maxWidth = 0;\n  var maxHeight = rowPadding;\n  var labelContainer = shapeSvg.insert('g').attr('class', 'label');\n  var verticalPos = 0;\n  var hasInterface = node.classData.annotations && node.classData.annotations[0]; // 1. Create the labels\n\n  var interfaceLabelText = node.classData.annotations[0] ? '«' + node.classData.annotations[0] + '»' : '';\n  var interfaceLabel = labelContainer.node().appendChild(Object(_createLabel__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(interfaceLabelText, node.labelStyle, true, true));\n  var interfaceBBox = interfaceLabel.getBBox();\n\n  if (Object(_diagrams_common_common__WEBPACK_IMPORTED_MODULE_8__[\"evaluate\"])(Object(_config__WEBPACK_IMPORTED_MODULE_3__[\"getConfig\"])().flowchart.htmlLabels)) {\n    var div = interfaceLabel.children[0];\n    var dv = Object(d3__WEBPACK_IMPORTED_MODULE_0__[\"select\"])(interfaceLabel);\n    interfaceBBox = div.getBoundingClientRect();\n    dv.attr('width', interfaceBBox.width);\n    dv.attr('height', interfaceBBox.height);\n  }\n\n  if (node.classData.annotations[0]) {\n    maxHeight += interfaceBBox.height + rowPadding;\n    maxWidth += interfaceBBox.width;\n  }\n\n  var classTitleString = node.classData.id;\n\n  if (node.classData.type !== undefined && node.classData.type !== '') {\n    if (Object(_config__WEBPACK_IMPORTED_MODULE_3__[\"getConfig\"])().flowchart.htmlLabels) {\n      classTitleString += '&lt;' + node.classData.type + '&gt;';\n    } else {\n      classTitleString += '<' + node.classData.type + '>';\n    }\n  }\n\n  var classTitleLabel = labelContainer.node().appendChild(Object(_createLabel__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(classTitleString, node.labelStyle, true, true));\n  Object(d3__WEBPACK_IMPORTED_MODULE_0__[\"select\"])(classTitleLabel).attr('class', 'classTitle');\n  var classTitleBBox = classTitleLabel.getBBox();\n\n  if (Object(_diagrams_common_common__WEBPACK_IMPORTED_MODULE_8__[\"evaluate\"])(Object(_config__WEBPACK_IMPORTED_MODULE_3__[\"getConfig\"])().flowchart.htmlLabels)) {\n    var _div2 = classTitleLabel.children[0];\n\n    var _dv2 = Object(d3__WEBPACK_IMPORTED_MODULE_0__[\"select\"])(classTitleLabel);\n\n    classTitleBBox = _div2.getBoundingClientRect();\n\n    _dv2.attr('width', classTitleBBox.width);\n\n    _dv2.attr('height', classTitleBBox.height);\n  }\n\n  maxHeight += classTitleBBox.height + rowPadding;\n\n  if (classTitleBBox.width > maxWidth) {\n    maxWidth = classTitleBBox.width;\n  }\n\n  var classAttributes = [];\n  node.classData.members.forEach(function (str) {\n    var parsedInfo = Object(_diagrams_class_svgDraw__WEBPACK_IMPORTED_MODULE_7__[\"parseMember\"])(str);\n    var parsedText = parsedInfo.displayText;\n\n    if (Object(_config__WEBPACK_IMPORTED_MODULE_3__[\"getConfig\"])().flowchart.htmlLabels) {\n      parsedText = parsedText.replace(/</g, '&lt;').replace(/>/g, '&gt;');\n    }\n\n    var lbl = labelContainer.node().appendChild(Object(_createLabel__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(parsedText, parsedInfo.cssStyle ? parsedInfo.cssStyle : node.labelStyle, true, true));\n    var bbox = lbl.getBBox();\n\n    if (Object(_diagrams_common_common__WEBPACK_IMPORTED_MODULE_8__[\"evaluate\"])(Object(_config__WEBPACK_IMPORTED_MODULE_3__[\"getConfig\"])().flowchart.htmlLabels)) {\n      var _div3 = lbl.children[0];\n\n      var _dv3 = Object(d3__WEBPACK_IMPORTED_MODULE_0__[\"select\"])(lbl);\n\n      bbox = _div3.getBoundingClientRect();\n\n      _dv3.attr('width', bbox.width);\n\n      _dv3.attr('height', bbox.height);\n    }\n\n    if (bbox.width > maxWidth) {\n      maxWidth = bbox.width;\n    }\n\n    maxHeight += bbox.height + rowPadding;\n    classAttributes.push(lbl);\n  });\n  maxHeight += lineHeight;\n  var classMethods = [];\n  node.classData.methods.forEach(function (str) {\n    var parsedInfo = Object(_diagrams_class_svgDraw__WEBPACK_IMPORTED_MODULE_7__[\"parseMember\"])(str);\n    var displayText = parsedInfo.displayText;\n\n    if (Object(_config__WEBPACK_IMPORTED_MODULE_3__[\"getConfig\"])().flowchart.htmlLabels) {\n      displayText = displayText.replace(/</g, '&lt;').replace(/>/g, '&gt;');\n    }\n\n    var lbl = labelContainer.node().appendChild(Object(_createLabel__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(displayText, parsedInfo.cssStyle ? parsedInfo.cssStyle : node.labelStyle, true, true));\n    var bbox = lbl.getBBox();\n\n    if (Object(_diagrams_common_common__WEBPACK_IMPORTED_MODULE_8__[\"evaluate\"])(Object(_config__WEBPACK_IMPORTED_MODULE_3__[\"getConfig\"])().flowchart.htmlLabels)) {\n      var _div4 = lbl.children[0];\n\n      var _dv4 = Object(d3__WEBPACK_IMPORTED_MODULE_0__[\"select\"])(lbl);\n\n      bbox = _div4.getBoundingClientRect();\n\n      _dv4.attr('width', bbox.width);\n\n      _dv4.attr('height', bbox.height);\n    }\n\n    if (bbox.width > maxWidth) {\n      maxWidth = bbox.width;\n    }\n\n    maxHeight += bbox.height + rowPadding;\n    classMethods.push(lbl);\n  });\n  maxHeight += lineHeight; // 2. Position the labels\n  // position the interface label\n\n  if (hasInterface) {\n    var _diffX = (maxWidth - interfaceBBox.width) / 2;\n\n    Object(d3__WEBPACK_IMPORTED_MODULE_0__[\"select\"])(interfaceLabel).attr('transform', 'translate( ' + (-1 * maxWidth / 2 + _diffX) + ', ' + -1 * maxHeight / 2 + ')');\n    verticalPos = interfaceBBox.height + rowPadding;\n  } // Positin the class title label\n\n\n  var diffX = (maxWidth - classTitleBBox.width) / 2;\n  Object(d3__WEBPACK_IMPORTED_MODULE_0__[\"select\"])(classTitleLabel).attr('transform', 'translate( ' + (-1 * maxWidth / 2 + diffX) + ', ' + (-1 * maxHeight / 2 + verticalPos) + ')');\n  verticalPos += classTitleBBox.height + rowPadding;\n  topLine.attr('class', 'divider').attr('x1', -maxWidth / 2 - halfPadding).attr('x2', maxWidth / 2 + halfPadding).attr('y1', -maxHeight / 2 - halfPadding + lineHeight + verticalPos).attr('y2', -maxHeight / 2 - halfPadding + lineHeight + verticalPos);\n  verticalPos += lineHeight;\n  classAttributes.forEach(function (lbl) {\n    Object(d3__WEBPACK_IMPORTED_MODULE_0__[\"select\"])(lbl).attr('transform', 'translate( ' + -maxWidth / 2 + ', ' + (-1 * maxHeight / 2 + verticalPos + lineHeight / 2) + ')');\n    verticalPos += classTitleBBox.height + rowPadding;\n  });\n  verticalPos += lineHeight;\n  bottomLine.attr('class', 'divider').attr('x1', -maxWidth / 2 - halfPadding).attr('x2', maxWidth / 2 + halfPadding).attr('y1', -maxHeight / 2 - halfPadding + lineHeight + verticalPos).attr('y2', -maxHeight / 2 - halfPadding + lineHeight + verticalPos);\n  verticalPos += lineHeight;\n  classMethods.forEach(function (lbl) {\n    Object(d3__WEBPACK_IMPORTED_MODULE_0__[\"select\"])(lbl).attr('transform', 'translate( ' + -maxWidth / 2 + ', ' + (-1 * maxHeight / 2 + verticalPos) + ')');\n    verticalPos += classTitleBBox.height + rowPadding;\n  }); //\n  // let bbox;\n  // if (evaluate(getConfig().flowchart.htmlLabels)) {\n  //   const div = interfaceLabel.children[0];\n  //   const dv = select(interfaceLabel);\n  //   bbox = div.getBoundingClientRect();\n  //   dv.attr('width', bbox.width);\n  //   dv.attr('height', bbox.height);\n  // }\n  // bbox = labelContainer.getBBox();\n  // log.info('Text 2', text2);\n  // const textRows = text2.slice(1, text2.length);\n  // let titleBox = text.getBBox();\n  // const descr = label\n  //   .node()\n  //   .appendChild(createLabel(textRows.join('<br/>'), node.labelStyle, true, true));\n  // if (evaluate(getConfig().flowchart.htmlLabels)) {\n  //   const div = descr.children[0];\n  //   const dv = select(descr);\n  //   bbox = div.getBoundingClientRect();\n  //   dv.attr('width', bbox.width);\n  //   dv.attr('height', bbox.height);\n  // }\n  // // bbox = label.getBBox();\n  // // log.info(descr);\n  // select(descr).attr(\n  //   'transform',\n  //   'translate( ' +\n  //     // (titleBox.width - bbox.width) / 2 +\n  //     (bbox.width > titleBox.width ? 0 : (titleBox.width - bbox.width) / 2) +\n  //     ', ' +\n  //     (titleBox.height + halfPadding + 5) +\n  //     ')'\n  // );\n  // select(text).attr(\n  //   'transform',\n  //   'translate( ' +\n  //     // (titleBox.width - bbox.width) / 2 +\n  //     (bbox.width < titleBox.width ? 0 : -(titleBox.width - bbox.width) / 2) +\n  //     ', ' +\n  //     0 +\n  //     ')'\n  // );\n  // // Get the size of the label\n  // // Bounding box for title and text\n  // bbox = label.node().getBBox();\n  // // Center the label\n  // label.attr(\n  //   'transform',\n  //   'translate(' + -bbox.width / 2 + ', ' + (-bbox.height / 2 - halfPadding + 3) + ')'\n  // );\n\n  rect.attr('class', 'outer title-state').attr('x', -maxWidth / 2 - halfPadding).attr('y', -(maxHeight / 2) - halfPadding).attr('width', maxWidth + node.padding).attr('height', maxHeight + node.padding); // innerLine\n  //   .attr('class', 'divider')\n  //   .attr('x1', -bbox.width / 2 - halfPadding)\n  //   .attr('x2', bbox.width / 2 + halfPadding)\n  //   .attr('y1', -bbox.height / 2 - halfPadding + titleBox.height + halfPadding)\n  //   .attr('y2', -bbox.height / 2 - halfPadding + titleBox.height + halfPadding);\n\n  Object(_shapes_util__WEBPACK_IMPORTED_MODULE_2__[\"updateNodeBounds\"])(node, rect);\n\n  node.intersect = function (point) {\n    return _intersect_index_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"].rect(node, point);\n  };\n\n  return shapeSvg;\n};\n\nvar shapes = {\n  question: question,\n  rect: rect,\n  rectWithTitle: rectWithTitle,\n  choice: choice,\n  circle: circle,\n  stadium: stadium,\n  hexagon: hexagon,\n  rect_left_inv_arrow: rect_left_inv_arrow,\n  lean_right: lean_right,\n  lean_left: lean_left,\n  trapezoid: trapezoid,\n  inv_trapezoid: inv_trapezoid,\n  rect_right_inv_arrow: rect_right_inv_arrow,\n  cylinder: cylinder,\n  start: start,\n  end: end,\n  note: _shapes_note__WEBPACK_IMPORTED_MODULE_6__[\"default\"],\n  subroutine: subroutine,\n  fork: forkJoin,\n  join: forkJoin,\n  class_box: class_box\n};\nvar nodeElems = {};\nvar insertNode = function insertNode(elem, node, dir) {\n  var newEl;\n  var el; // Add link when appropriate\n\n  if (node.link) {\n    newEl = elem.insert('svg:a').attr('xlink:href', node.link).attr('target', node.linkTarget || '_blank');\n    el = shapes[node.shape](newEl, node, dir);\n  } else {\n    el = shapes[node.shape](elem, node, dir);\n    newEl = el;\n  }\n\n  if (node.tooltip) {\n    el.attr('title', node.tooltip);\n  }\n\n  if (node.class) {\n    el.attr('class', 'node default ' + node.class);\n  }\n\n  nodeElems[node.id] = newEl;\n\n  if (node.haveCallback) {\n    nodeElems[node.id].attr('class', nodeElems[node.id].attr('class') + ' clickable');\n  }\n};\nvar setNodeElem = function setNodeElem(elem, node) {\n  nodeElems[node.id] = elem;\n};\nvar clear = function clear() {\n  nodeElems = {};\n};\nvar positionNode = function positionNode(node) {\n  var el = nodeElems[node.id];\n  _logger__WEBPACK_IMPORTED_MODULE_1__[\"log\"].trace('Transforming node', node.diff, node, 'translate(' + (node.x - node.width / 2 - 5) + ', ' + node.width / 2 + ')');\n  var padding = 8;\n  var diff = node.diff || 0;\n\n  if (node.clusterNode) {\n    el.attr('transform', 'translate(' + (node.x + diff - node.width / 2) + ', ' + (node.y - node.height / 2 - padding) + ')');\n  } else {\n    el.attr('transform', 'translate(' + node.x + ', ' + node.y + ')');\n  }\n\n  return diff;\n};\n\n/***/ }),\n\n/***/ \"./src/dagre-wrapper/shapes/note.js\":\n/*!******************************************!*\\\n  !*** ./src/dagre-wrapper/shapes/note.js ***!\n  \\******************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _util__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./util */ \"./src/dagre-wrapper/shapes/util.js\");\n/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../logger */ \"./src/logger.js\");\n/* harmony import */ var _intersect_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../intersect/index.js */ \"./src/dagre-wrapper/intersect/index.js\");\n\n // eslint-disable-line\n\n\n\nvar note = function note(parent, node) {\n  var _labelHelper = Object(_util__WEBPACK_IMPORTED_MODULE_0__[\"labelHelper\"])(parent, node, 'node ' + node.classes, true),\n      shapeSvg = _labelHelper.shapeSvg,\n      bbox = _labelHelper.bbox,\n      halfPadding = _labelHelper.halfPadding;\n\n  _logger__WEBPACK_IMPORTED_MODULE_1__[\"log\"].info('Classes = ', node.classes); // add the rect\n\n  var rect = shapeSvg.insert('rect', ':first-child');\n  rect.attr('rx', node.rx).attr('ry', node.ry).attr('x', -bbox.width / 2 - halfPadding).attr('y', -bbox.height / 2 - halfPadding).attr('width', bbox.width + node.padding).attr('height', bbox.height + node.padding);\n  Object(_util__WEBPACK_IMPORTED_MODULE_0__[\"updateNodeBounds\"])(node, rect);\n\n  node.intersect = function (point) {\n    return _intersect_index_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"].rect(node, point);\n  };\n\n  return shapeSvg;\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (note);\n\n/***/ }),\n\n/***/ \"./src/dagre-wrapper/shapes/util.js\":\n/*!******************************************!*\\\n  !*** ./src/dagre-wrapper/shapes/util.js ***!\n  \\******************************************/\n/*! exports provided: labelHelper, updateNodeBounds, insertPolygonShape */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"labelHelper\", function() { return labelHelper; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"updateNodeBounds\", function() { return updateNodeBounds; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"insertPolygonShape\", function() { return insertPolygonShape; });\n/* harmony import */ var _createLabel__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../createLabel */ \"./src/dagre-wrapper/createLabel.js\");\n/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../config */ \"./src/config.js\");\n/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! d3 */ \"./node_modules/d3/src/index.js\");\n/* harmony import */ var _diagrams_common_common__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../diagrams/common/common */ \"./src/diagrams/common/common.js\");\n\n\n\n\nvar labelHelper = function labelHelper(parent, node, _classes, isNode) {\n  var classes;\n\n  if (!_classes) {\n    classes = 'node default';\n  } else {\n    classes = _classes;\n  } // Add outer g element\n\n\n  var shapeSvg = parent.insert('g').attr('class', classes).attr('id', node.domId || node.id); // Create the label and insert it after the rect\n\n  var label = shapeSvg.insert('g').attr('class', 'label').attr('style', node.labelStyle);\n  var text = label.node().appendChild(Object(_createLabel__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(node.labelText, node.labelStyle, false, isNode)); // Get the size of the label\n\n  var bbox = text.getBBox();\n\n  if (Object(_diagrams_common_common__WEBPACK_IMPORTED_MODULE_3__[\"evaluate\"])(Object(_config__WEBPACK_IMPORTED_MODULE_1__[\"getConfig\"])().flowchart.htmlLabels)) {\n    var div = text.children[0];\n    var dv = Object(d3__WEBPACK_IMPORTED_MODULE_2__[\"select\"])(text);\n    bbox = div.getBoundingClientRect();\n    dv.attr('width', bbox.width);\n    dv.attr('height', bbox.height);\n  }\n\n  var halfPadding = node.padding / 2; // Center the label\n\n  label.attr('transform', 'translate(' + -bbox.width / 2 + ', ' + -bbox.height / 2 + ')');\n  return {\n    shapeSvg: shapeSvg,\n    bbox: bbox,\n    halfPadding: halfPadding,\n    label: label\n  };\n};\nvar updateNodeBounds = function updateNodeBounds(node, element) {\n  var bbox = element.node().getBBox();\n  node.width = bbox.width;\n  node.height = bbox.height;\n};\nfunction insertPolygonShape(parent, w, h, points) {\n  return parent.insert('polygon', ':first-child').attr('points', points.map(function (d) {\n    return d.x + ',' + d.y;\n  }).join(' ')).attr('class', 'label-container').attr('transform', 'translate(' + -w / 2 + ',' + h / 2 + ')');\n}\n\n/***/ }),\n\n/***/ \"./src/defaultConfig.js\":\n/*!******************************!*\\\n  !*** ./src/defaultConfig.js ***!\n  \\******************************/\n/*! exports provided: configKeys, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"configKeys\", function() { return configKeys; });\n/* harmony import */ var _themes__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./themes */ \"./src/themes/index.js\");\nfunction _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }\n\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _iterableToArray(iter) { if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter); }\n\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n\n/**\n * **Configuration methods in Mermaid version 8.6.0 have been updated, to learn more[[click here](8.6.0_docs.md)].**\n *\n * ## **What follows are config instructions for older versions**\n *\n * These are the default options which can be overridden with the initialization call like so:\n *\n * **Example 1:**\n * <pre>\n * mermaid.initialize({\n *   flowchart:{\n *     htmlLabels: false\n *   }\n * });\n * </pre>\n *\n * **Example 2:**\n * <pre>\n * &lt;script>\n *   var config = {\n *     startOnLoad:true,\n *     flowchart:{\n *       useMaxWidth:true,\n *       htmlLabels:true,\n *       curve:'cardinal',\n *     },\n *\n *     securityLevel:'loose',\n *   };\n *   mermaid.initialize(config);\n * &lt;/script>\n * </pre>\n * A summary of all options and their defaults is found [here](#mermaidapi-configuration-defaults). A description of each option follows below.\n *\n * @name Configuration\n */\n\nvar config = {\n  /**\n   * theme , the CSS style sheet\n   *\n   * | Parameter | Description | Type | Required | Values |\n   * | --- | --- | --- | --- | --- |\n   * | theme | Built in Themes | string | Optional | 'default', 'forest', 'dark', 'neutral', 'null'|\n   *\n   * **Notes:** To disable any pre-defined mermaid theme, use \"null\".\n   *\n   * <pre>\n   *  \"theme\": \"forest\",\n   *  \"themeCSS\": \".node rect { fill: red; }\"\n   * </pre>\n   */\n  theme: 'default',\n  themeVariables: _themes__WEBPACK_IMPORTED_MODULE_0__[\"default\"]['default'].getThemeVariables(),\n  themeCSS: undefined,\n\n  /* **maxTextSize** - The maximum allowed size of the users text diamgram */\n  maxTextSize: 50000,\n\n  /**\n   * | Parameter | Description | Type | Required | Values |\n   * | --- | --- | --- | --- | --- |\n   * | fontFamily | specifies the font to be used in the rendered diagrams| string | Required | Any Posiable CSS FontFamily |\n   *\n   * **Notes:**\n   * Default value: '\"trebuchet ms\", verdana, arial, sans-serif;'.\n   */\n  fontFamily: '\"trebuchet ms\", verdana, arial, sans-serif;',\n\n  /**\n   * | Parameter | Description | Type | Required | Values |\n   * | --- | --- | --- | --- | --- |\n   * | logLevel |This option decides the amount of logging to be used.| string \\| number | Required | 1, 2, 3, 4, 5 |\n   *\n   *\n   * **Notes:**\n   *\n   * - debug: 1\n   * - info: 2\n   * - warn: 3\n   * - error: 4\n   * - fatal: 5 (default)\n   */\n  logLevel: 5,\n\n  /**\n   * | Parameter | Description | Type | Required | Values |\n   * | --- | --- | --- | --- | --- |\n   * | securitylevel | Level of trust for parsed diagram|string | Required | 'strict', 'loose', 'antiscript' |\n   *\n   * **Notes**:\n   *\n   * - **strict**: (**default**) tags in text are encoded, click functionality is disabled\n   * - **loose**: tags in text are allowed, click functionality is enabled\n   * - **antiscript**: html tags in text are allowed, (only script element is removed), click functionality is enabled\n   */\n  securityLevel: 'strict',\n\n  /**\n   * | Parameter | Description | Type | Required | Values |\n   * | --- | --- | --- | --- | --- |\n   * | startOnLoad | Dictates whether mermaind starts on Page load | boolean | Required | true, false |\n   *\n   * **Notes:** Default value: true\n   */\n  startOnLoad: true,\n\n  /**\n   * | Parameter | Description |Type | Required |Values|\n   * | --- | --- | --- | --- | --- |\n   * | arrowMarkerAbsolute | Controls whether or arrow markers in html code are absolute paths or anchors | boolean | Required | true, false |\n   *\n   *\n   * **Notes**:\n   *\n   * This matters if you are using base tag settings.\n   *\n   * Default value: false\n   */\n  arrowMarkerAbsolute: false,\n\n  /**\n   * This option controls which currentConfig keys are considered _secure_ and can only be changed via\n   * call to mermaidAPI.initialize. Calls to mermaidAPI.reinitialize cannot make changes to\n   * the `secure` keys in the current currentConfig. This prevents malicious graph directives from\n   * overriding a site's default security.\n    * **Notes**:\n   *\n   * Default value: ['secure', 'securityLevel', 'startOnLoad', 'maxTextSize']\n   */\n  secure: ['secure', 'securityLevel', 'startOnLoad', 'maxTextSize'],\n\n  /**\n   * This option controls if the generated ids of nodes in the SVG are generated randomly or based on a seed.\n   * If set to false, the IDs are generated based on the current date and thus are not deterministic. This is the default behaviour.\n   *\n   * **Notes**:\n   *\n   * This matters if your files are checked into sourcecontrol e.g. git and should not change unless content is changed.\n   *\n   * Default value: false\n   */\n  deterministicIds: false,\n\n  /**\n   * This option is the optional seed for deterministic ids. if set to undefined but deterministicIds is true, a simple number iterator is used.\n   * You can set this attribute to base the seed on a static string.\n   */\n  deterministicIDSeed: undefined,\n\n  /**\n   * The object containing configurations specific for flowcharts\n   */\n  flowchart: {\n    /**\n     * | Parameter | Description | Type | Required | Values |\n     * | --- | --- | --- | --- | --- |\n     * | diagramPadding | Amount of padding around the diagram as a whole | Integer | Required | Any Positive Value |\n     *\n     * **Notes:**\n     *\n     * The amount of padding around the diagram as a whole so that embedded diagrams have margins, expressed in pixels\n     *\n     * Default value: 8\n     */\n    diagramPadding: 8,\n\n    /**\n     * | Parameter | Description | Type | Required | Values |\n     * | --- | --- | --- | --- | --- |\n     * | htmlLabels | Flag for setting whether or not a html tag should be used for rendering labels on the edges. | boolean| Required | true, false |\n     *\n     * **Notes:** Default value: true.\n     */\n    htmlLabels: true,\n\n    /**\n     * | Parameter | Description | Type | Required | Values |\n     * | --- | --- | --- | --- | --- |\n     * | nodeSpacing | Defines the spacing between nodes on the same level | Integer | Required | Any positive Number |\n     *\n     * **Notes:**\n     *\n     * Pertains to horizontal spacing for TB (top to bottom) or BT (bottom to top) graphs, and the vertical spacing for LR as well as RL graphs.**\n     *\n     * Default value: 50\n     */\n    nodeSpacing: 50,\n\n    /**\n     * | Parameter | Description | Type | Required | Values |\n     * | --- | --- | --- | --- | --- |\n     * | rankSpacing | Defines the spacing between nodes on different levels | Integer | Required | Any Positive Number |\n     *\n     * **Notes**:\n     *\n     * pertains to vertical spacing for TB (top to bottom) or BT (bottom to top), and the horizontal spacing for LR as well as RL graphs.\n     *\n     * Default value 50\n     */\n    rankSpacing: 50,\n\n    /**\n     * | Parameter | Description | Type | Required | Values |\n     * | --- | --- | --- | --- | --- |\n     * | curve | Defines how mermaid renders curves for flowcharts. | string | Required | 'basis', 'linear', 'cardinal'|\n     *\n     * **Notes:**\n     *\n     * Default Vaue: 'basis'\n     */\n    curve: 'basis',\n    // Only used in new experimental rendering\n    // represents the padding between the labels and the shape\n    padding: 15,\n\n    /**\n     * | Parameter | Description | Type | Required | Values|\n     * | --- | --- | --- | --- | --- |\n     * | useMaxWidth | See notes | boolean | 4 | true, false |\n     *\n     * **Notes:**\n     *\n     * When this flag is set the height and width is set to 100% and is then scaling with the\n     * available space if not the absolute space required is used.\n     *\n     * Default value: true\n     */\n    useMaxWidth: true,\n\n    /**\n     * | Parameter | Description | Type | Required | Values|\n     * | --- | --- | --- | --- | --- |\n     * | defaultRenderer | See notes | boolean | 4 | dagre-d3, dagre-wrapper |\n     *\n     * **Notes:**\n     *\n     * Decides which rendering engine that is to be used for the rendering. Legal values are:\n     * * dagre-d3\n     * * dagre-wrapper - wrapper for dagre implemented in mermaid\n     *\n     * Default value: 'dagre-d3'\n     */\n    defaultRenderer: 'dagre-d3'\n  },\n\n  /**\n   * The object containing configurations specific for sequence diagrams\n   */\n  sequence: {\n    /**\n     * | Parameter | Description | Type | Required | Values |\n     * | --- | --- | --- | --- | --- |\n     * | activationWidth | Width of the activation rect | Integer | Required | Any Positive Value |\n     *\n     *\n     * **Notes:** Default value :10\n     */\n    activationWidth: 10,\n\n    /**\n     * | Parameter | Description | Type | Required | Values |\n     * | --- | --- | --- | --- | --- |\n     * | diagramMarginX | Margin to the right and left of the sequence diagram | Integer | Required | Any Positive Value |\n     *\n     * **Notes:** Default value: 50\n     */\n    diagramMarginX: 50,\n\n    /**\n     *| Parameter | Description | Type | Required | Values |\n     *| --- | --- | --- | --- | --- |\n     *| diagramMarginY | Margin to the over and under the sequence diagram | Integer | Required | Any Positive Value |\n     *\n     * **Notes:** Default value: 10\n     */\n    diagramMarginY: 10,\n\n    /**\n     * | Parameter | Description | Type | Required | Values |\n     * | --- | --- | --- | --- | --- |\n     * | actorMargin | Margin between actors | Integer | Required | Any Positive Value |\n     *\n     * **Notes:**\n     * Default value: 50\n     */\n    actorMargin: 50,\n\n    /**\n     * | Parameter | Description | Type | Required | Values |\n     * | --- | --- | --- | --- | --- |\n     * | width | Width of actor boxes | Integer | Required | Any Positive Value |\n     *\n     * **Notes:**\n     * Default value: 150\n     */\n    width: 150,\n\n    /**\n     * | Parameter | Description | Type | Required | Values |\n     * | --- | --- | --- | --- | --- |\n     * | height | Height of actor boxes | Integer | Required | Any Positive Value|\n     *\n     * **Notes:**\n     * Default value: 65\n     */\n    height: 65,\n\n    /**\n     * | Parameter | Description | Type | Required | Values |\n     * | --- | --- | --- | --- | --- |\n     * | boxMargin | Margin around loop boxes | Integer | Required | Any Positive Value |\n     *\n     * **Notes:**\n     * Default value: 10\n     */\n    boxMargin: 10,\n\n    /**\n     * | Parameter | Description | Type | Required | Values |\n     * | --- | --- | --- | --- | --- |\n     * | boxTextMargin | Margin around the text in loop/alt/opt boxes | Integer | Required | Any Positive Value |\n     *\n     * **Notes:**\n     * Default value: 5\n     */\n    boxTextMargin: 5,\n\n    /**\n     * | Parameter | Description | Type | Required | Values |\n     * | --- | --- | --- | --- | --- |\n     * | noteMargin | margin around notes | Integer | Required | Any Positive Value |\n     *\n     * **Notes:**\n     * Default value: 10\n     */\n    noteMargin: 10,\n\n    /**\n     * | Parameter | Description | Type | Required | Values |\n     * | --- | --- | --- | --- | --- |\n     * | messageMargin | Space between messages | Integer | Required | Any Positive Value |\n     *\n     * **Notes:**\n     * Default value: 35\n     */\n    messageMargin: 35,\n\n    /**\n     * | Parameter | Description | Type | Required | Values |\n     * | --- | --- | --- | --- | --- |\n     * | messageAlign | Multiline message alignment | string | Required | 'left', 'center', 'right' |\n     *\n     * **Notes:**\n     * Default value: 'center'\n     */\n    messageAlign: 'center',\n\n    /**\n     * | Parameter | Description | Type | Required | Values |\n     * | --- | --- | --- | --- | --- |\n     * | mirrorActors | Mirror actors under diagram | boolean | Required | true, false |\n     *\n     * **Notes:**\n     * Default value: true\n     */\n    mirrorActors: true,\n\n    /**\n     *| Parameter | Description |Type | Required | Values|\n     *| --- | --- | --- | --- | --- |\n     *| forceMenus | forces actor popup menus to always be visible (to support E2E testing). | Boolean| Required | True, False |\n     *\n     * **Notes:**\n     *\n     * Default value: false.\n     */\n    forceMenus: false,\n\n    /**\n     * | Parameter | Description | Type | Required | Values |\n     * | --- | --- | --- | --- | --- |\n     * | bottomMarginAdj | Prolongs the edge of the diagram downwards | Integer | Required | Any Positive Value |\n     *\n     * **Notes:**\n     *\n     * Depending on css styling this might need adjustment.\n     *\n     * Default value: 1\n     */\n    bottomMarginAdj: 1,\n\n    /**\n     * | Parameter | Description | Type | Required | Values |\n     * | --- | --- | --- | --- | --- |\n     * | useMaxWidth | See Notes | boolean | Required | true, false |\n     *\n     * **Notes:**\n     * When this flag is set to true, the height and width is set to 100% and is then scaling with the\n     * available space. If set to false, the absolute space required is used.\n     *\n     * Default value: true\n     */\n    useMaxWidth: true,\n\n    /**\n     * | Parameter | Description | Type | Required | Values |\n     * | --- | --- | --- | --- | --- |\n     * | rightAngles | display curve arrows as right angles | boolean | Required | true, false |\n     *\n     * **Notes:**\n     *\n     * This will display arrows that start and begin at the same node as right angles, rather than a curve\n     *\n     * Default value: false\n     */\n    rightAngles: false,\n\n    /**\n     * | Parameter | Description | Type | Required | Values |\n     * | --- | --- | --- | --- | --- |\n     * | showSequenceNumbers | This will show the node numbers | boolean | Required | true, false |\n     *\n     * **Notes:**\n     * Default value: false\n     */\n    showSequenceNumbers: false,\n\n    /**\n     * | Parameter | Description | Type | Required | Values |\n     * | --- | --- | --- | --- | --- |\n     * | actorFontSize| This sets the font size of the actor's description | Integer | Require | Any Positive Value |\n     *\n     ***Notes:**\n     ***Default value 14**..\n     */\n    actorFontSize: 14,\n\n    /**\n     * | Parameter | Description | Type | Required | Values |\n     * | --- | --- | --- | --- | --- |\n     * | actorFontFamily |This sets the font family of the actor's description | string | Required | Any Posiable CSS FontFamily |\n     *\n     * **Notes:**\n     * Default value: \"'Open-Sans\", \"sans-serif\"'\n     */\n    actorFontFamily: '\"Open-Sans\", \"sans-serif\"',\n\n    /**\n     * This sets the font weight of the actor's description\n     *\n     * **Notes:**\n     * Default value: 400.\n     */\n    actorFontWeight: 400,\n\n    /**\n     * | Parameter | Description | Type | Required | Values |\n     * | --- | --- | --- | --- | --- |\n     * | noteFontSize | This sets the font size of actor-attached notes | Integer | Required | Any Positive Value |\n     *\n     * **Notes:**\n     * Default value: 14\n     */\n    noteFontSize: 14,\n\n    /**\n     * | Parameter | Description | Type | Required | Values |\n     * | --- | --- | --- | --- | --- |\n     * | noteFontFamily| This sets the font family of actor-attached notes. | string | Required | Any Posiable CSS FontFamily |\n     *\n     * **Notes:**\n     * Default value: ''\"trebuchet ms\", verdana, arial, sans-serif'\n     */\n    noteFontFamily: '\"trebuchet ms\", verdana, arial, sans-serif',\n\n    /**\n     * This sets the font weight of the note's description\n     *\n     * **Notes:**\n     * Default value: 400\n     */\n    noteFontWeight: 400,\n\n    /**\n     * | Parameter | Description | Type | Required | Values |\n     * | --- | --- | --- | --- | --- |\n     * | noteAlign | This sets the text alignment of actor-attached notes | string | required | 'left', 'center', 'right'|\n     *\n     * **Notes:**\n     * Default value: 'center'\n     */\n    noteAlign: 'center',\n\n    /**\n     * | Parameter | Description | Type | Required | Values |\n     * | --- | --- | --- | --- | --- |\n     * | messageFontSize | This sets the font size of actor messages | Integer | Required | Any Positive Number |\n     *\n     * **Notes:**\n     * Default value: 16\n     */\n    messageFontSize: 16,\n\n    /**\n     * | Parameter | Description | Type | Required | Values |\n     * | --- | --- | --- | --- | --- |\n     * | messageFontFamily | This sets the font family of actor messages | string | Required | Any Posiable CSS FontFamily |\n     *\n     * **Notes:**\n     * Default value: '\"trebuchet ms\", verdana, arial, sans-serif'\n     */\n    messageFontFamily: '\"trebuchet ms\", verdana, arial, sans-serif',\n\n    /**\n     * This sets the font weight of the message's description\n     *\n     * **Notes:**\n     * Default value: 400.\n     */\n    messageFontWeight: 400,\n\n    /**\n     * This sets the auto-wrap state for the diagram\n     *\n     * **Notes:**\n     * Default value: false.\n     */\n    wrap: false,\n\n    /**\n     * This sets the auto-wrap padding for the diagram (sides only)\n     *\n     * **Notes:**\n     * Default value: 0.\n     */\n    wrapPadding: 10,\n\n    /**\n     * This sets the width of the loop-box (loop, alt, opt, par)\n     *\n     * **Notes:**\n     * Default value: 50.\n     */\n    labelBoxWidth: 50,\n\n    /**\n     * This sets the height of the loop-box (loop, alt, opt, par)\n     *\n     * **Notes:**\n     * Default value: 20.\n     */\n    labelBoxHeight: 20,\n    messageFont: function messageFont() {\n      return {\n        fontFamily: this.messageFontFamily,\n        fontSize: this.messageFontSize,\n        fontWeight: this.messageFontWeight\n      };\n    },\n    noteFont: function noteFont() {\n      return {\n        fontFamily: this.noteFontFamily,\n        fontSize: this.noteFontSize,\n        fontWeight: this.noteFontWeight\n      };\n    },\n    actorFont: function actorFont() {\n      return {\n        fontFamily: this.actorFontFamily,\n        fontSize: this.actorFontSize,\n        fontWeight: this.actorFontWeight\n      };\n    }\n  },\n\n  /**\n   * The object containing configurations specific for gantt diagrams\n   */\n  gantt: {\n    /**\n     * ### titleTopMargin\n     *\n     * | Parameter | Description | Type | Required | Values |\n     * | --- | --- | --- | --- | --- |\n     * | titleTopMargin | Margin top for the text over the gantt diagram | Integer | Required | Any Positive Value |\n     *\n     * **Notes:**\n     * Default value: 25\n     */\n    titleTopMargin: 25,\n\n    /**\n     * | Parameter | Description | Type | Required | Values |\n     * | --- | --- | --- | --- | --- |\n     * | barHeight | The height of the bars in the graph | Integer | Required | Any Positive Value |\n     *\n     * **Notes:**\n     * Default value: 20\n     */\n    barHeight: 20,\n\n    /**\n     * | Parameter | Description | Type | Required | Values |\n     * | --- | --- | --- | --- | --- |\n     * | barGap | The margin between the different activities in the gantt diagram | Integer | Optional | Any Positive Value |\n     *\n     * **Notes:**\n     * Default value: 4\n     */\n    barGap: 4,\n\n    /**\n     * | Parameter | Description | Type | Required | Values|\n     * | --- | --- | --- | --- | --- |\n     * | topPadding | Margin between title and gantt diagram and between axis and gantt diagram. | Integer | Required | Any Positive Value |\n     *\n     * **Notes:**\n     * Default value: 50\n     */\n    topPadding: 50,\n\n    /**\n     * | Parameter | Description | Type | Required | Values|\n     * | --- | --- | --- | --- | --- |\n     * | rightPadding | The space allocated for the section name to the right of the activities | Integer | Required | Any Positive Value |\n     *\n     * **Notes:**\n     * Default value: 75\n     */\n    rightPadding: 75,\n\n    /**\n     * | Parameter | Description | Type | Required | Values|\n     * | --- | --- | --- | --- | --- |\n     * | leftPadding | The space allocated for the section name to the left of the activities | Integer | Required | Any Positive Value |\n     *\n     * **Notes:**\n     * Default value: 75\n     */\n    leftPadding: 75,\n\n    /**\n     * | Parameter | Description | Type | Required | Values|\n     * | --- | --- | --- | --- | --- |\n     * | gridLineStartPadding | Vertical starting position of the grid lines | Integer | Required | Any Positive Value |\n     *\n     * **Notes:**\n     * Default value: 35\n     */\n    gridLineStartPadding: 35,\n\n    /**\n     * | Parameter | Description | Type | Required | Values|\n     * | --- | --- | --- | --- | --- |\n     * | fontSize | Font size | Integer | Required | Any Positive Value |\n     *\n     * **Notes:**\n     * Default value: 11\n     */\n    fontSize: 11,\n\n    /**\n     * | Parameter | Description | Type | Required | Values|\n     * | --- | --- | --- | --- | --- |\n     * | sectionFontSize | Font size for secions| Integer | Required | Any Positive Value |\n     *\n     * **Notes:**\n     * Default value: 11\n     */\n    sectionFontSize: 11,\n\n    /**\n     * | Parameter | Description | Type | Required | Values|\n     * | --- | --- | --- | --- | --- |\n     * | numberSectionStyles | The number of alternating section styles | Integer | 4 | Any Positive Value |\n     *\n     * **Notes:**\n     * Default value: 4\n     */\n    numberSectionStyles: 4,\n\n    /**\n     * | Parameter | Description | Type | Required | Values |\n     * | --- | --- | --- | --- | --- |\n     * | axisFormat | Datetime format of the axis | 3 | Required | Date in yy-mm-dd |\n     *\n     * **Notes:**\n     *\n     * This might need adjustment to match your locale and preferences\n     *\n     * Default value: '%Y-%m-%d'.\n     */\n    axisFormat: '%Y-%m-%d',\n\n    /**\n     * | Parameter | Description | Type | Required | Values |\n     * | --- | --- | --- | --- | --- |\n     * | useMaxWidth | See notes | boolean | 4 | true, false |\n     *\n     * **Notes:**\n     *\n     * When this flag is set the height and width is set to 100% and is then scaling with the\n     * available space if not the absolute space required is used.\n     *\n     * Default value: true\n     */\n    useMaxWidth: true,\n\n    /**\n     *| Parameter | Description |Type | Required | Values|\n     *| --- | --- | --- | --- | --- |\n     *| topAxis | See notes | Boolean | 4 | True, False |\n     *\n     ***Notes:** when this flag is set date labels will be added to the\n    top of the chart\n     *\n     ***Default value false**.\n     */\n    topAxis: false,\n    useWidth: undefined\n  },\n\n  /**\n   * The object containing configurations specific for journey diagrams\n   */\n  journey: {\n    /**\n     * | Parameter | Description | Type | Required | Values |\n     * | --- | --- | --- | --- | --- |\n     * | diagramMarginX | Margin to the right and left of the sequence diagram | Integer | Required | Any Positive Value |\n     *\n     * **Notes:**\n     * Default value: 50\n     */\n    diagramMarginX: 50,\n\n    /**\n     * | Parameter | Description | Type | Required | Values |\n     * | --- | --- | --- | --- | --- |\n     * | diagramMarginY | Margin to the over and under the sequence diagram. | Integer | Required | Any Positive Value |\n     *\n     * **Notes:**\n     * Default value: 10\n     */\n    diagramMarginY: 10,\n\n    /**\n     * | Parameter | Description | Type | Required | Values |\n     * | --- | --- | --- | --- | --- |\n     * | actorMargin | Margin between actors | Integer | Required | Any Positive Value |\n     *\n     * **Notes:**\n     * Default value: 50\n     */\n    leftMargin: 150,\n\n    /**\n     * | Parameter | Description | Type | Required | Values |\n     * | --- | --- | --- | --- | --- |\n     * | width | Width of actor boxes | Integer | Required | Any Positive Value |\n     *\n     * **Notes:**\n     * Default value: 150\n     */\n    width: 150,\n\n    /**\n     * | Parameter | Description | Type | Required | Values |\n     * | --- | --- | --- | --- | --- |\n     * | height | Height of actor boxes | Integer | Required | Any Positive Value |\n     *\n     * **Notes:**\n     * Default value: 65\n     */\n    height: 50,\n\n    /**\n     *| Parameter | Description |Type | Required | Values|\n     *| --- | --- | --- | --- | --- |\n     *| boxMargin | Margin around loop boxes | Integer | Required | Any Positive Value |\n     *\n     * **Notes:**\n     * Default value: 10\n     */\n    boxMargin: 10,\n\n    /**\n     * | Parameter | Description | Type | Required | Values |\n     * | --- | --- | --- | --- | --- |\n     * | boxTextMargin | Margin around the text in loop/alt/opt boxes | Integer | Required | Any Positive Value |\n     *\n     * **Notes:**\n     * Default value: 5\n     */\n    boxTextMargin: 5,\n\n    /**\n     * | Parameter | Description | Type | Required | Values |\n     * | --- | --- | --- | --- | --- |\n     * | noteMargin | Margin around notes | Integer | Required | Any Positive Value |\n     *\n     * **Notes:**\n     * Default value: 10\n     */\n    noteMargin: 10,\n\n    /**\n     * | Parameter | Description | Type | Required | Values |\n     * | --- | --- | --- | --- | --- |\n     * | messageMargin |Space between messages. | Integer | Required | Any Positive Value |\n     *\n     * **Notes:**\n     *\n     * Space between messages.\n     *\n     * Default value: 35\n     */\n    messageMargin: 35,\n\n    /**\n     * | Parameter | Description | Type | Required | Values |\n     * | --- | --- | --- | --- | --- |\n     * | messageAlign | Multiline message alignment | 3 | 4 | 'left', 'center', 'right' |\n     *\n     * **Notes:**\n     * Default value: 'center'\n     */\n    messageAlign: 'center',\n\n    /**\n     * | Parameter | Description | Type | Required | Values |\n     * | --- | --- | --- | --- | --- |\n     * | bottomMarginAdj | Prolongs the edge of the diagram downwards | Integer | 4 | Any Positive Value |\n     *\n     * **Notes:**\n     *\n     * Depending on css styling this might need adjustment.\n     *\n     * Default value: 1\n     */\n    bottomMarginAdj: 1,\n\n    /**\n     * | Parameter | Description | Type | Required | Values |\n     * | --- | --- | --- | --- | --- |\n     * | useMaxWidth | See notes | boolean | 4 | true, false |\n     *\n     * **Notes:**\n     *\n     * When this flag is set the height and width is set to 100% and is then scaling with the\n     * available space if not the absolute space required is used.\n     *\n     * Default value: true\n     */\n    useMaxWidth: true,\n\n    /**\n     * | Parameter | Description | Type | Required | Values |\n     * | --- | --- | --- | --- | --- |\n     * | rightAngles | Curved Arrows become Right Angles | 3 | 4 | true, false |\n     *\n     * **Notes:**\n     *\n     * This will display arrows that start and begin at the same node as right angles, rather than a curves\n     *\n     * Default value: false\n     */\n    rightAngles: false,\n    taskFontSize: 14,\n    taskFontFamily: '\"Open-Sans\", \"sans-serif\"',\n    taskMargin: 50,\n    // width of activation box\n    activationWidth: 10,\n    // text placement as: tspan | fo | old only text as before\n    textPlacement: 'fo',\n    actorColours: ['#8FBC8F', '#7CFC00', '#00FFFF', '#20B2AA', '#B0E0E6', '#FFFFE0'],\n    sectionFills: ['#191970', '#8B008B', '#4B0082', '#2F4F4F', '#800000', '#8B4513', '#00008B'],\n    sectionColours: ['#fff']\n  },\n  class: {\n    arrowMarkerAbsolute: false,\n\n    /**\n     * | Parameter | Description | Type | Required | Values |\n     * | --- | --- | --- | --- | --- |\n     * | useMaxWidth | See notes | boolean | 4 | true, false |\n     *\n     * **Notes:**\n     *\n     * When this flag is set the height and width is set to 100% and is then scaling with the\n     * available space if not the absolute space required is used.\n     *\n     * Default value: true\n     */\n    useMaxWidth: true,\n\n    /**\n     * | Parameter | Description | Type | Required | Values|\n     * | --- | --- | --- | --- | --- |\n     * | defaultRenderer | See notes | boolean | 4 | dagre-d3, dagre-wrapper |\n     *\n     * **Notes:**\n     *\n     * Decides which rendering engine that is to be used for the rendering. Legal values are:\n     * * dagre-d3\n     * * dagre-wrapper - wrapper for dagre implemented in mermaid\n     *\n     * Default value: 'dagre-d3'\n     */\n    defaultRenderer: 'dagre-wrapper'\n  },\n  git: {\n    arrowMarkerAbsolute: false,\n    useWidth: undefined,\n\n    /**\n     * | Parameter | Description | Type | Required | Values |\n     * | --- | --- | --- | --- | --- |\n     * | useMaxWidth | See notes | boolean | 4 | true, false |\n     *\n     * **Notes:**\n     *\n     * When this flag is set the height and width is set to 100% and is then scaling with the\n     * available space if not the absolute space required is used.\n     *\n     * Default value: true\n     */\n    useMaxWidth: true\n  },\n  state: {\n    dividerMargin: 10,\n    sizeUnit: 5,\n    padding: 8,\n    textHeight: 10,\n    titleShift: -15,\n    noteMargin: 10,\n    forkWidth: 70,\n    forkHeight: 7,\n    // Used\n    miniPadding: 2,\n    // Font size factor, this is used to guess the width of the edges labels before rendering by dagre\n    // layout. This might need updating if/when switching font\n    fontSizeFactor: 5.02,\n    fontSize: 24,\n    labelHeight: 16,\n    edgeLengthFactor: '20',\n    compositTitleSize: 35,\n    radius: 5,\n\n    /**\n     * | Parameter | Description | Type | Required | Values |\n     * | --- | --- | --- | --- | --- |\n     * | useMaxWidth | See notes | boolean | 4 | true, false |\n     *\n     * **Notes:**\n     *\n     * When this flag is set the height and width is set to 100% and is then scaling with the\n     * available space if not the absolute space required is used.\n     *\n     * Default value: true\n     */\n    useMaxWidth: true,\n\n    /**\n     * | Parameter | Description | Type | Required | Values|\n     * | --- | --- | --- | --- | --- |\n     * | defaultRenderer | See notes | boolean | 4 | dagre-d3, dagre-wrapper |\n     *\n     * **Notes:**\n     *\n     * Decides which rendering engine that is to be used for the rendering. Legal values are:\n     * * dagre-d3\n     * * dagre-wrapper - wrapper for dagre implemented in mermaid\n     *\n     * Default value: 'dagre-d3'\n     */\n    defaultRenderer: 'dagre-wrapper'\n  },\n\n  /**\n   * The object containing configurations specific for entity relationship diagrams\n   */\n  er: {\n    /**\n     * | Parameter | Description | Type | Required | Values |\n     * | --- | --- | --- | --- | --- |\n     * | diagramPadding | Amount of padding around the diagram as a whole | Integer | Required | Any Positive Value |\n     *\n     * **Notes:**\n     *\n     * The amount of padding around the diagram as a whole so that embedded diagrams have margins, expressed in pixels\n     *\n     * Default value: 20\n     */\n    diagramPadding: 20,\n\n    /**\n     * | Parameter | Description | Type | Required | Values |\n     * | --- | --- | --- | --- | --- |\n     * | layoutDirection | Directional bias for layout of entities. | string | Required | \"TB\", \"BT\", \"LR\", \"RL\" |\n     *\n     * **Notes:**\n     *\n     * 'TB' for Top-Bottom, 'BT'for Bottom-Top, 'LR' for Left-Right, or 'RL' for Right to Left.\n     *\n     * T = top, B = bottom, L = left, and R = right.\n     *\n     * Default value: 'TB'\n     */\n    layoutDirection: 'TB',\n\n    /**\n     * | Parameter | Description | Type | Required | Values |\n     * | --- | --- | --- | --- | --- |\n     * | minEntityWidth | The mimimum width of an entity box | Integer | Required | Any Positive Value  |\n     *\n     * **Notes:**\n     * Expressed in pixels.\n     * Default value: 100\n     */\n    minEntityWidth: 100,\n\n    /**\n     * | Parameter | Description | Type | Required | Values |\n     * | --- | --- | --- | --- | --- |\n     * | minEntityHeight| The minimum height of an entity box | Integer | 4 | Any Positive Value |\n     *\n     * **Notes:**\n     * Expressed in pixels\n     * Default value: 75\n     */\n    minEntityHeight: 75,\n\n    /**\n     * | Parameter | Description | Type | Required | Values |\n     * | --- | --- | --- | --- | --- |\n     * | entityPadding | Minimum internal padding betweentext in box and box borders | Integer | 4 | Any Positive Value |\n     *\n     * **Notes:**\n     *\n     * The minimum internal padding betweentext in an entity box and the enclosing box borders, expressed in pixels.\n     *\n     * Default value: 15\n     */\n    entityPadding: 15,\n\n    /**\n     * | Parameter | Description | Type | Required | Values |\n     * | --- | --- | --- | --- | --- |\n     * | stroke | Stroke color of box edges and lines | string | 4 | Any recognized color |\n     *\n     * **Notes:**\n     * Default value: 'gray'\n     */\n    stroke: 'gray',\n\n    /**\n     * | Parameter | Description | Type | Required | Values |\n     * | --- | --- | --- | --- | --- |\n     * | fill | Fill color of entity boxes | string | 4 | Any recognized color |\n     *\n     * **Notes:**\n     * Default value: 'honeydew'\n     */\n    fill: 'honeydew',\n\n    /**\n     * | Parameter | Description | Type | Required | Values |\n     * | --- | --- | --- | --- | --- |\n     * | fontSize | Font Size in pixels | Integer |  | Any Positive Value |\n     *\n     * **Notes:**\n     *\n     * Font size (expressed as an integer representing a number of pixels)\n     * Default value: 12\n     */\n    fontSize: 12,\n\n    /**\n     * | Parameter | Description | Type | Required | Values |\n     * | --- | --- | --- | --- | --- |\n     * | useMaxWidth | See Notes | boolean | Required | true, false |\n     *\n     * **Notes:**\n     *\n     * When this flag is set to true, the diagram width is locked to 100% and\n     * scaled based on available space. If set to false, the diagram reserves its\n     * absolute width.\n     *\n     * Default value: true\n     */\n    useMaxWidth: true\n  },\n\n  /**\n   * The object containing configurations specific for pie diagrams\n   */\n  pie: {\n    useWidth: undefined,\n\n    /**\n     * | Parameter | Description | Type | Required | Values |\n     * | --- | --- | --- | --- | --- |\n     * | useMaxWidth | See Notes | boolean | Required | true, false |\n     *\n     * **Notes:**\n     *\n     * When this flag is set to true, the diagram width is locked to 100% and\n     * scaled based on available space. If set to false, the diagram reserves its\n     * absolute width.\n     *\n     * Default value: true\n     */\n    useMaxWidth: true\n  },\n\n  /**\n   * The object containing configurations specific for req diagrams\n   */\n  requirement: {\n    useWidth: undefined,\n\n    /**\n     * | Parameter | Description | Type | Required | Values |\n     * | --- | --- | --- | --- | --- |\n     * | useMaxWidth | See Notes | boolean | Required | true, false |\n     *\n     * **Notes:**\n     *\n     * When this flag is set to true, the diagram width is locked to 100% and\n     * scaled based on available space. If set to false, the diagram reserves its\n     * absolute width.\n     *\n     * Default value: true\n     */\n    useMaxWidth: true,\n    rect_fill: '#f9f9f9',\n    text_color: '#333',\n    rect_border_size: '0.5px',\n    rect_border_color: '#bbb',\n    rect_min_width: 200,\n    rect_min_height: 200,\n    fontSize: 14,\n    rect_padding: 10,\n    line_height: 20\n  }\n};\nconfig.class.arrowMarkerAbsolute = config.arrowMarkerAbsolute;\nconfig.git.arrowMarkerAbsolute = config.arrowMarkerAbsolute;\n\nvar keyify = function keyify(obj) {\n  var prefix = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';\n  return Object.keys(obj).reduce(function (res, el) {\n    if (Array.isArray(obj[el])) {\n      return res;\n    } else if (_typeof(obj[el]) === 'object' && obj[el] !== null) {\n      return [].concat(_toConsumableArray(res), [prefix + el], _toConsumableArray(keyify(obj[el], '')));\n    }\n\n    return [].concat(_toConsumableArray(res), [prefix + el]);\n  }, []);\n};\n\nvar configKeys = keyify(config, '');\n/* harmony default export */ __webpack_exports__[\"default\"] = (config);\n\n/***/ }),\n\n/***/ \"./src/diagrams/class/classDb.js\":\n/*!***************************************!*\\\n  !*** ./src/diagrams/class/classDb.js ***!\n  \\***************************************/\n/*! exports provided: parseDirective, addClass, lookUpDomId, clear, getClass, getClasses, getRelations, addRelation, addAnnotation, addMember, addMembers, cleanupLabel, setCssClass, setLink, setClickEvent, bindFunctions, lineType, relationType, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"parseDirective\", function() { return parseDirective; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"addClass\", function() { return addClass; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"lookUpDomId\", function() { return lookUpDomId; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"clear\", function() { return clear; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getClass\", function() { return getClass; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getClasses\", function() { return getClasses; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getRelations\", function() { return getRelations; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"addRelation\", function() { return addRelation; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"addAnnotation\", function() { return addAnnotation; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"addMember\", function() { return addMember; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"addMembers\", function() { return addMembers; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"cleanupLabel\", function() { return cleanupLabel; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"setCssClass\", function() { return setCssClass; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"setLink\", function() { return setLink; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"setClickEvent\", function() { return setClickEvent; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"bindFunctions\", function() { return bindFunctions; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"lineType\", function() { return lineType; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"relationType\", function() { return relationType; });\n/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3 */ \"./node_modules/d3/src/index.js\");\n/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../logger */ \"./src/logger.js\");\n/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../config */ \"./src/config.js\");\n/* harmony import */ var _common_common__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../common/common */ \"./src/diagrams/common/common.js\");\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../utils */ \"./src/utils.js\");\n/* harmony import */ var _mermaidAPI__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../mermaidAPI */ \"./src/mermaidAPI.js\");\nfunction _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }\n\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _iterableToArray(iter) { if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter); }\n\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\n\n\n\n\n\n\nvar MERMAID_DOM_ID_PREFIX = 'classid-';\nvar relations = [];\nvar classes = {};\nvar classCounter = 0;\nvar funs = [];\nvar parseDirective = function parseDirective(statement, context, type) {\n  _mermaidAPI__WEBPACK_IMPORTED_MODULE_5__[\"default\"].parseDirective(this, statement, context, type);\n};\n\nvar splitClassNameAndType = function splitClassNameAndType(id) {\n  var genericType = '';\n  var className = id;\n\n  if (id.indexOf('~') > 0) {\n    var split = id.split('~');\n    className = split[0];\n    genericType = split[1];\n  }\n\n  return {\n    className: className,\n    type: genericType\n  };\n};\n/**\n * Function called by parser when a node definition has been found.\n * @param id\n * @public\n */\n\n\nvar addClass = function addClass(id) {\n  var classId = splitClassNameAndType(id); // Only add class if not exists\n\n  if (typeof classes[classId.className] !== 'undefined') return;\n  classes[classId.className] = {\n    id: classId.className,\n    type: classId.type,\n    cssClasses: [],\n    methods: [],\n    members: [],\n    annotations: [],\n    domId: MERMAID_DOM_ID_PREFIX + classId.className + '-' + classCounter\n  };\n  classCounter++;\n};\n/**\n * Function to lookup domId from id in the graph definition.\n * @param id\n * @public\n */\n\nvar lookUpDomId = function lookUpDomId(id) {\n  var classKeys = Object.keys(classes);\n\n  for (var i = 0; i < classKeys.length; i++) {\n    if (classes[classKeys[i]].id === id) {\n      return classes[classKeys[i]].domId;\n    }\n  }\n};\nvar clear = function clear() {\n  relations = [];\n  classes = {};\n  funs = [];\n  funs.push(setupToolTips);\n};\nvar getClass = function getClass(id) {\n  return classes[id];\n};\nvar getClasses = function getClasses() {\n  return classes;\n};\nvar getRelations = function getRelations() {\n  return relations;\n};\nvar addRelation = function addRelation(relation) {\n  _logger__WEBPACK_IMPORTED_MODULE_1__[\"log\"].debug('Adding relation: ' + JSON.stringify(relation));\n  addClass(relation.id1);\n  addClass(relation.id2);\n  relation.id1 = splitClassNameAndType(relation.id1).className;\n  relation.id2 = splitClassNameAndType(relation.id2).className;\n  relations.push(relation);\n};\n/**\n * Adds an annotation to the specified class\n * Annotations mark special properties of the given type (like 'interface' or 'service')\n * @param className The class name\n * @param annotation The name of the annotation without any brackets\n * @public\n */\n\nvar addAnnotation = function addAnnotation(className, annotation) {\n  var validatedClassName = splitClassNameAndType(className).className;\n  classes[validatedClassName].annotations.push(annotation);\n};\n/**\n * Adds a member to the specified class\n * @param className The class name\n * @param member The full name of the member.\n * If the member is enclosed in <<brackets>> it is treated as an annotation\n * If the member is ending with a closing bracket ) it is treated as a method\n * Otherwise the member will be treated as a normal property\n * @public\n */\n\nvar addMember = function addMember(className, member) {\n  var validatedClassName = splitClassNameAndType(className).className;\n  var theClass = classes[validatedClassName];\n\n  if (typeof member === 'string') {\n    // Member can contain white spaces, we trim them out\n    var memberString = member.trim();\n\n    if (memberString.startsWith('<<') && memberString.endsWith('>>')) {\n      // Remove leading and trailing brackets\n      theClass.annotations.push(memberString.substring(2, memberString.length - 2));\n    } else if (memberString.indexOf(')') > 0) {\n      theClass.methods.push(memberString);\n    } else if (memberString) {\n      theClass.members.push(memberString);\n    }\n  }\n};\nvar addMembers = function addMembers(className, members) {\n  if (Array.isArray(members)) {\n    members.reverse();\n    members.forEach(function (member) {\n      return addMember(className, member);\n    });\n  }\n};\nvar cleanupLabel = function cleanupLabel(label) {\n  if (label.substring(0, 1) === ':') {\n    return label.substr(1).trim();\n  } else {\n    return label.trim();\n  }\n};\n/**\n * Called by parser when a special node is found, e.g. a clickable element.\n * @param ids Comma separated list of ids\n * @param className Class to add\n */\n\nvar setCssClass = function setCssClass(ids, className) {\n  ids.split(',').forEach(function (_id) {\n    var id = _id;\n    if (_id[0].match(/\\d/)) id = MERMAID_DOM_ID_PREFIX + id;\n\n    if (typeof classes[id] !== 'undefined') {\n      classes[id].cssClasses.push(className);\n    }\n  });\n};\n/**\n * Called by parser when a tooltip is found, e.g. a clickable element.\n * @param ids Comma separated list of ids\n * @param tooltip Tooltip to add\n */\n\nvar setTooltip = function setTooltip(ids, tooltip) {\n  var config = _config__WEBPACK_IMPORTED_MODULE_2__[\"getConfig\"]();\n  ids.split(',').forEach(function (id) {\n    if (typeof tooltip !== 'undefined') {\n      classes[id].tooltip = _common_common__WEBPACK_IMPORTED_MODULE_3__[\"default\"].sanitizeText(tooltip, config);\n    }\n  });\n};\n/**\n * Called by parser when a link is found. Adds the URL to the vertex data.\n * @param ids Comma separated list of ids\n * @param linkStr URL to create a link for\n * @param target Target of the link, _blank by default as originally defined in the svgDraw.js file\n */\n\n\nvar setLink = function setLink(ids, linkStr, target) {\n  var config = _config__WEBPACK_IMPORTED_MODULE_2__[\"getConfig\"]();\n  ids.split(',').forEach(function (_id) {\n    var id = _id;\n    if (_id[0].match(/\\d/)) id = MERMAID_DOM_ID_PREFIX + id;\n\n    if (typeof classes[id] !== 'undefined') {\n      classes[id].link = _utils__WEBPACK_IMPORTED_MODULE_4__[\"default\"].formatUrl(linkStr, config);\n\n      if (typeof target === 'string') {\n        classes[id].linkTarget = target;\n      } else {\n        classes[id].linkTarget = '_blank';\n      }\n    }\n  });\n  setCssClass(ids, 'clickable');\n};\n/**\n * Called by parser when a click definition is found. Registers an event handler.\n * @param ids Comma separated list of ids\n * @param functionName Function to be called on click\n * @param functionArgs Function args the function should be called with\n */\n\nvar setClickEvent = function setClickEvent(ids, functionName, functionArgs) {\n  ids.split(',').forEach(function (id) {\n    setClickFunc(id, functionName, functionArgs);\n    classes[id].haveCallback = true;\n  });\n  setCssClass(ids, 'clickable');\n};\n\nvar setClickFunc = function setClickFunc(domId, functionName, functionArgs) {\n  var config = _config__WEBPACK_IMPORTED_MODULE_2__[\"getConfig\"]();\n  var id = domId;\n  var elemId = lookUpDomId(id);\n\n  if (config.securityLevel !== 'loose') {\n    return;\n  }\n\n  if (typeof functionName === 'undefined') {\n    return;\n  }\n\n  if (typeof classes[id] !== 'undefined') {\n    var argList = [];\n\n    if (typeof functionArgs === 'string') {\n      /* Splits functionArgs by ',', ignoring all ',' in double quoted strings */\n      argList = functionArgs.split(/,(?=(?:(?:[^\"]*\"){2})*[^\"]*$)/);\n\n      for (var i = 0; i < argList.length; i++) {\n        var item = argList[i].trim();\n        /* Removes all double quotes at the start and end of an argument */\n\n        /* This preserves all starting and ending whitespace inside */\n\n        if (item.charAt(0) === '\"' && item.charAt(item.length - 1) === '\"') {\n          item = item.substr(1, item.length - 2);\n        }\n\n        argList[i] = item;\n      }\n    }\n    /* if no arguments passed into callback, default to passing in id */\n\n\n    if (argList.length === 0) {\n      argList.push(elemId);\n    }\n\n    funs.push(function () {\n      var elem = document.querySelector(\"[id=\\\"\".concat(elemId, \"\\\"]\"));\n\n      if (elem !== null) {\n        elem.addEventListener('click', function () {\n          _utils__WEBPACK_IMPORTED_MODULE_4__[\"default\"].runFunc.apply(_utils__WEBPACK_IMPORTED_MODULE_4__[\"default\"], [functionName].concat(_toConsumableArray(argList)));\n        }, false);\n      }\n    });\n  }\n};\n\nvar bindFunctions = function bindFunctions(element) {\n  funs.forEach(function (fun) {\n    fun(element);\n  });\n};\nvar lineType = {\n  LINE: 0,\n  DOTTED_LINE: 1\n};\nvar relationType = {\n  AGGREGATION: 0,\n  EXTENSION: 1,\n  COMPOSITION: 2,\n  DEPENDENCY: 3\n};\n\nvar setupToolTips = function setupToolTips(element) {\n  var tooltipElem = Object(d3__WEBPACK_IMPORTED_MODULE_0__[\"select\"])('.mermaidTooltip');\n\n  if ((tooltipElem._groups || tooltipElem)[0][0] === null) {\n    tooltipElem = Object(d3__WEBPACK_IMPORTED_MODULE_0__[\"select\"])('body').append('div').attr('class', 'mermaidTooltip').style('opacity', 0);\n  }\n\n  var svg = Object(d3__WEBPACK_IMPORTED_MODULE_0__[\"select\"])(element).select('svg');\n  var nodes = svg.selectAll('g.node');\n  nodes.on('mouseover', function () {\n    var el = Object(d3__WEBPACK_IMPORTED_MODULE_0__[\"select\"])(this);\n    var title = el.attr('title'); // Dont try to draw a tooltip if no data is provided\n\n    if (title === null) {\n      return;\n    }\n\n    var rect = this.getBoundingClientRect();\n    tooltipElem.transition().duration(200).style('opacity', '.9');\n    tooltipElem.html(el.attr('title')).style('left', window.scrollX + rect.left + (rect.right - rect.left) / 2 + 'px').style('top', window.scrollY + rect.top - 14 + document.body.scrollTop + 'px');\n    el.classed('hover', true);\n  }).on('mouseout', function () {\n    tooltipElem.transition().duration(500).style('opacity', 0);\n    var el = Object(d3__WEBPACK_IMPORTED_MODULE_0__[\"select\"])(this);\n    el.classed('hover', false);\n  });\n};\n\nfuns.push(setupToolTips);\nvar direction = 'TB';\n\nvar getDirection = function getDirection() {\n  return direction;\n};\n\nvar setDirection = function setDirection(dir) {\n  direction = dir;\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n  parseDirective: parseDirective,\n  getConfig: function getConfig() {\n    return _config__WEBPACK_IMPORTED_MODULE_2__[\"getConfig\"]().class;\n  },\n  addClass: addClass,\n  bindFunctions: bindFunctions,\n  clear: clear,\n  getClass: getClass,\n  getClasses: getClasses,\n  addAnnotation: addAnnotation,\n  getRelations: getRelations,\n  addRelation: addRelation,\n  getDirection: getDirection,\n  setDirection: setDirection,\n  addMember: addMember,\n  addMembers: addMembers,\n  cleanupLabel: cleanupLabel,\n  lineType: lineType,\n  relationType: relationType,\n  setClickEvent: setClickEvent,\n  setCssClass: setCssClass,\n  setLink: setLink,\n  setTooltip: setTooltip,\n  lookUpDomId: lookUpDomId\n});\n\n/***/ }),\n\n/***/ \"./src/diagrams/class/classRenderer-v2.js\":\n/*!************************************************!*\\\n  !*** ./src/diagrams/class/classRenderer-v2.js ***!\n  \\************************************************/\n/*! exports provided: addClasses, addRelations, setConf, drawOld, draw, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"addClasses\", function() { return addClasses; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"addRelations\", function() { return addRelations; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"setConf\", function() { return setConf; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"drawOld\", function() { return drawOld; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"draw\", function() { return draw; });\n/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3 */ \"./node_modules/d3/src/index.js\");\n/* harmony import */ var dagre__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! dagre */ \"./node_modules/dagre/index.js\");\n/* harmony import */ var dagre__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(dagre__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var graphlib__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! graphlib */ \"./node_modules/graphlib/index.js\");\n/* harmony import */ var graphlib__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(graphlib__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../logger */ \"./src/logger.js\");\n/* harmony import */ var _classDb__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./classDb */ \"./src/diagrams/class/classDb.js\");\n/* harmony import */ var _parser_classDiagram__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./parser/classDiagram */ \"./src/diagrams/class/parser/classDiagram.jison\");\n/* harmony import */ var _parser_classDiagram__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_parser_classDiagram__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _svgDraw__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./svgDraw */ \"./src/diagrams/class/svgDraw.js\");\n/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../config */ \"./src/config.js\");\n/* harmony import */ var _dagre_wrapper_index_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../dagre-wrapper/index.js */ \"./src/dagre-wrapper/index.js\");\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../utils */ \"./src/utils.js\");\n/* harmony import */ var _common_common__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../common/common */ \"./src/diagrams/common/common.js\");\n\n\n\n\n\n\n\n\n // import addHtmlLabel from 'dagre-d3/lib/label/add-html-label.js';\n\n\n\n\n_parser_classDiagram__WEBPACK_IMPORTED_MODULE_5__[\"parser\"].yy = _classDb__WEBPACK_IMPORTED_MODULE_4__[\"default\"];\nvar idCache = {};\nvar padding = 20;\nvar conf = {\n  dividerMargin: 10,\n  padding: 5,\n  textHeight: 10\n};\n/**\n * Function that adds the vertices found during parsing to the graph to be rendered.\n * @param vert Object containing the vertices.\n * @param g The graph that is to be drawn.\n */\n\nvar addClasses = function addClasses(classes, g) {\n  // const svg = select(`[id=\"${svgId}\"]`);\n  var keys = Object.keys(classes);\n  _logger__WEBPACK_IMPORTED_MODULE_3__[\"log\"].info('keys:', keys);\n  _logger__WEBPACK_IMPORTED_MODULE_3__[\"log\"].info(classes); // Iterate through each item in the vertex object (containing all the vertices found) in the graph definition\n\n  keys.forEach(function (id) {\n    var vertex = classes[id];\n    /**\n     * Variable for storing the classes for the vertex\n     * @type {string}\n     */\n\n    var cssClassStr = '';\n\n    if (vertex.cssClasses.length > 0) {\n      cssClassStr = cssClassStr + ' ' + vertex.cssClasses.join(' ');\n    } // if (vertex.classes.length > 0) {\n    //   classStr = vertex.classes.join(' ');\n    // }\n\n\n    var styles = {\n      labelStyle: ''\n    }; //getStylesFromArray(vertex.styles);\n    // Use vertex id as text in the box if no text is provided by the graph definition\n\n    var vertexText = vertex.text !== undefined ? vertex.text : vertex.id; // We create a SVG label, either by delegating to addHtmlLabel or manually\n    // let vertexNode;\n    // if (evaluate(getConfig().flowchart.htmlLabels)) {\n    //   const node = {\n    //     label: vertexText.replace(\n    //       /fa[lrsb]?:fa-[\\w-]+/g,\n    //       s => `<i class='${s.replace(':', ' ')}'></i>`\n    //     )\n    //   };\n    //   vertexNode = addHtmlLabel(svg, node).node();\n    //   vertexNode.parentNode.removeChild(vertexNode);\n    // } else {\n    //   const svgLabel = document.createElementNS('http://www.w3.org/2000/svg', 'text');\n    //   svgLabel.setAttribute('style', styles.labelStyle.replace('color:', 'fill:'));\n    //   const rows = vertexText.split(common.lineBreakRegex);\n    //   for (let j = 0; j < rows.length; j++) {\n    //     const tspan = document.createElementNS('http://www.w3.org/2000/svg', 'tspan');\n    //     tspan.setAttributeNS('http://www.w3.org/XML/1998/namespace', 'xml:space', 'preserve');\n    //     tspan.setAttribute('dy', '1em');\n    //     tspan.setAttribute('x', '1');\n    //     tspan.textContent = rows[j];\n    //     svgLabel.appendChild(tspan);\n    //   }\n    //   vertexNode = svgLabel;\n    // }\n\n    var radious = 0;\n    var _shape = ''; // Set the shape based parameters\n\n    switch (vertex.type) {\n      case 'class':\n        _shape = 'class_box';\n        break;\n\n      default:\n        _shape = 'class_box';\n    } // Add the node\n\n\n    g.setNode(vertex.id, {\n      labelStyle: styles.labelStyle,\n      shape: _shape,\n      labelText: vertexText,\n      classData: vertex,\n      rx: radious,\n      ry: radious,\n      class: cssClassStr,\n      style: styles.style,\n      id: vertex.id,\n      domId: vertex.domId,\n      haveCallback: vertex.haveCallback,\n      link: vertex.link,\n      width: vertex.type === 'group' ? 500 : undefined,\n      type: vertex.type,\n      padding: Object(_config__WEBPACK_IMPORTED_MODULE_7__[\"getConfig\"])().flowchart.padding\n    });\n    _logger__WEBPACK_IMPORTED_MODULE_3__[\"log\"].info('setNode', {\n      labelStyle: styles.labelStyle,\n      shape: _shape,\n      labelText: vertexText,\n      rx: radious,\n      ry: radious,\n      class: cssClassStr,\n      style: styles.style,\n      id: vertex.id,\n      width: vertex.type === 'group' ? 500 : undefined,\n      type: vertex.type,\n      padding: Object(_config__WEBPACK_IMPORTED_MODULE_7__[\"getConfig\"])().flowchart.padding\n    });\n  });\n};\n/**\n * Add edges to graph based on parsed graph defninition\n * @param {Object} edges The edges to add to the graph\n * @param {Object} g The graph object\n */\n\nvar addRelations = function addRelations(relations, g) {\n  var cnt = 0;\n  var defaultStyle;\n  var defaultLabelStyle; // if (typeof relations.defaultStyle !== 'undefined') {\n  //   const defaultStyles = getStylesFromArray(relations.defaultStyle);\n  //   defaultStyle = defaultStyles.style;\n  //   defaultLabelStyle = defaultStyles.labelStyle;\n  // }\n\n  relations.forEach(function (edge) {\n    cnt++;\n    var edgeData = {}; //Set relationship style and line type\n\n    edgeData.classes = 'relation';\n    edgeData.pattern = edge.relation.lineType == 1 ? 'dashed' : 'solid';\n    edgeData.id = 'id' + cnt; // Set link type for rendering\n\n    if (edge.type === 'arrow_open') {\n      edgeData.arrowhead = 'none';\n    } else {\n      edgeData.arrowhead = 'normal';\n    }\n\n    _logger__WEBPACK_IMPORTED_MODULE_3__[\"log\"].info(edgeData, edge); //Set edge extra labels\n    //edgeData.startLabelLeft = edge.relationTitle1;\n\n    edgeData.startLabelRight = edge.relationTitle1 === 'none' ? '' : edge.relationTitle1;\n    edgeData.endLabelLeft = edge.relationTitle2 === 'none' ? '' : edge.relationTitle2; //edgeData.endLabelRight = edge.relationTitle2;\n    //Set relation arrow types\n\n    edgeData.arrowTypeStart = getArrowMarker(edge.relation.type1);\n    edgeData.arrowTypeEnd = getArrowMarker(edge.relation.type2);\n    var style = '';\n    var labelStyle = '';\n\n    if (typeof edge.style !== 'undefined') {\n      var styles = Object(_utils__WEBPACK_IMPORTED_MODULE_9__[\"getStylesFromArray\"])(edge.style);\n      style = styles.style;\n      labelStyle = styles.labelStyle;\n    } else {\n      style = 'fill:none';\n\n      if (typeof defaultStyle !== 'undefined') {\n        style = defaultStyle;\n      }\n\n      if (typeof defaultLabelStyle !== 'undefined') {\n        labelStyle = defaultLabelStyle;\n      }\n    }\n\n    edgeData.style = style;\n    edgeData.labelStyle = labelStyle;\n\n    if (typeof edge.interpolate !== 'undefined') {\n      edgeData.curve = Object(_utils__WEBPACK_IMPORTED_MODULE_9__[\"interpolateToCurve\"])(edge.interpolate, d3__WEBPACK_IMPORTED_MODULE_0__[\"curveLinear\"]);\n    } else if (typeof relations.defaultInterpolate !== 'undefined') {\n      edgeData.curve = Object(_utils__WEBPACK_IMPORTED_MODULE_9__[\"interpolateToCurve\"])(relations.defaultInterpolate, d3__WEBPACK_IMPORTED_MODULE_0__[\"curveLinear\"]);\n    } else {\n      edgeData.curve = Object(_utils__WEBPACK_IMPORTED_MODULE_9__[\"interpolateToCurve\"])(conf.curve, d3__WEBPACK_IMPORTED_MODULE_0__[\"curveLinear\"]);\n    }\n\n    edge.text = edge.title;\n\n    if (typeof edge.text === 'undefined') {\n      if (typeof edge.style !== 'undefined') {\n        edgeData.arrowheadStyle = 'fill: #333';\n      }\n    } else {\n      edgeData.arrowheadStyle = 'fill: #333';\n      edgeData.labelpos = 'c';\n\n      if (Object(_config__WEBPACK_IMPORTED_MODULE_7__[\"getConfig\"])().flowchart.htmlLabels) {\n        // eslint-disable-line\n        edgeData.labelType = 'html';\n        edgeData.label = '<span class=\"edgeLabel\">' + edge.text + '</span>';\n      } else {\n        edgeData.labelType = 'text';\n        edgeData.label = edge.text.replace(_common_common__WEBPACK_IMPORTED_MODULE_10__[\"default\"].lineBreakRegex, '\\n');\n\n        if (typeof edge.style === 'undefined') {\n          edgeData.style = edgeData.style || 'stroke: #333; stroke-width: 1.5px;fill:none';\n        }\n\n        edgeData.labelStyle = edgeData.labelStyle.replace('color:', 'fill:');\n      }\n    } // Add the edge to the graph\n\n\n    g.setEdge(edge.id1, edge.id2, edgeData, cnt);\n  });\n}; // Todo optimize\n\nvar getGraphId = function getGraphId(label) {\n  var keys = Object.keys(idCache);\n\n  for (var i = 0; i < keys.length; i++) {\n    if (idCache[keys[i]].label === label) {\n      return keys[i];\n    }\n  }\n\n  return undefined;\n};\n\nvar setConf = function setConf(cnf) {\n  var keys = Object.keys(cnf);\n  keys.forEach(function (key) {\n    conf[key] = cnf[key];\n  });\n};\n/**\n * Draws a flowchart in the tag with id: id based on the graph definition in text.\n * @param text\n * @param id\n */\n\nvar drawOld = function drawOld(text, id) {\n  idCache = {};\n  _parser_classDiagram__WEBPACK_IMPORTED_MODULE_5__[\"parser\"].yy.clear();\n  _parser_classDiagram__WEBPACK_IMPORTED_MODULE_5__[\"parser\"].parse(text);\n  _logger__WEBPACK_IMPORTED_MODULE_3__[\"log\"].info('Rendering diagram ' + text); // Fetch the default direction, use TD if none was found\n\n  var diagram = Object(d3__WEBPACK_IMPORTED_MODULE_0__[\"select\"])(\"[id='\".concat(id, \"']\")); // insertMarkers(diagram);\n  // Layout graph, Create a new directed graph\n\n  var g = new graphlib__WEBPACK_IMPORTED_MODULE_2___default.a.Graph({\n    multigraph: true\n  }); // Set an object for the graph label\n\n  g.setGraph({\n    isMultiGraph: true\n  }); // Default to assigning a new object as a label for each new edge.\n\n  g.setDefaultEdgeLabel(function () {\n    return {};\n  });\n  var classes = _classDb__WEBPACK_IMPORTED_MODULE_4__[\"default\"].getClasses();\n  _logger__WEBPACK_IMPORTED_MODULE_3__[\"log\"].info('classes:');\n  _logger__WEBPACK_IMPORTED_MODULE_3__[\"log\"].info(classes);\n  var keys = Object.keys(classes);\n\n  for (var i = 0; i < keys.length; i++) {\n    var classDef = classes[keys[i]];\n    var node = _svgDraw__WEBPACK_IMPORTED_MODULE_6__[\"default\"].drawClass(diagram, classDef, conf);\n    idCache[node.id] = node; // Add nodes to the graph. The first argument is the node id. The second is\n    // metadata about the node. In this case we're going to add labels to each of\n    // our nodes.\n\n    g.setNode(node.id, node);\n    _logger__WEBPACK_IMPORTED_MODULE_3__[\"log\"].info('Org height: ' + node.height);\n  }\n\n  var relations = _classDb__WEBPACK_IMPORTED_MODULE_4__[\"default\"].getRelations();\n  _logger__WEBPACK_IMPORTED_MODULE_3__[\"log\"].info('relations:', relations);\n  relations.forEach(function (relation) {\n    _logger__WEBPACK_IMPORTED_MODULE_3__[\"log\"].info('tjoho' + getGraphId(relation.id1) + getGraphId(relation.id2) + JSON.stringify(relation));\n    g.setEdge(getGraphId(relation.id1), getGraphId(relation.id2), {\n      relation: relation\n    }, relation.title || 'DEFAULT');\n  });\n  dagre__WEBPACK_IMPORTED_MODULE_1___default.a.layout(g);\n  g.nodes().forEach(function (v) {\n    if (typeof v !== 'undefined' && typeof g.node(v) !== 'undefined') {\n      _logger__WEBPACK_IMPORTED_MODULE_3__[\"log\"].debug('Node ' + v + ': ' + JSON.stringify(g.node(v)));\n      Object(d3__WEBPACK_IMPORTED_MODULE_0__[\"select\"])('#' + Object(_classDb__WEBPACK_IMPORTED_MODULE_4__[\"lookUpDomId\"])(v)).attr('transform', 'translate(' + (g.node(v).x - g.node(v).width / 2) + ',' + (g.node(v).y - g.node(v).height / 2) + ' )');\n    }\n  });\n  g.edges().forEach(function (e) {\n    if (typeof e !== 'undefined' && typeof g.edge(e) !== 'undefined') {\n      _logger__WEBPACK_IMPORTED_MODULE_3__[\"log\"].debug('Edge ' + e.v + ' -> ' + e.w + ': ' + JSON.stringify(g.edge(e)));\n      _svgDraw__WEBPACK_IMPORTED_MODULE_6__[\"default\"].drawEdge(diagram, g.edge(e), g.edge(e).relation, conf);\n    }\n  });\n  var svgBounds = diagram.node().getBBox();\n  var width = svgBounds.width + padding * 2;\n  var height = svgBounds.height + padding * 2;\n  Object(_utils__WEBPACK_IMPORTED_MODULE_9__[\"configureSvgSize\"])(diagram, height, width, conf.useMaxWidth); // Ensure the viewBox includes the whole svgBounds area with extra space for padding\n\n  var vBox = \"\".concat(svgBounds.x - padding, \" \").concat(svgBounds.y - padding, \" \").concat(width, \" \").concat(height);\n  _logger__WEBPACK_IMPORTED_MODULE_3__[\"log\"].debug(\"viewBox \".concat(vBox));\n  diagram.attr('viewBox', vBox);\n};\nvar draw = function draw(text, id) {\n  _logger__WEBPACK_IMPORTED_MODULE_3__[\"log\"].info('Drawing class');\n  _classDb__WEBPACK_IMPORTED_MODULE_4__[\"default\"].clear(); // const parser = classDb.parser;\n  // parser.yy = classDb;\n  // Parse the graph definition\n  // try {\n\n  _parser_classDiagram__WEBPACK_IMPORTED_MODULE_5__[\"parser\"].parse(text); // } catch (err) {\n  // log.debug('Parsing failed');\n  // }\n  // Fetch the default direction, use TD if none was found\n  //let dir = 'TD';\n\n  var conf = Object(_config__WEBPACK_IMPORTED_MODULE_7__[\"getConfig\"])().flowchart;\n  _logger__WEBPACK_IMPORTED_MODULE_3__[\"log\"].info('config:', conf);\n  var nodeSpacing = conf.nodeSpacing || 50;\n  var rankSpacing = conf.rankSpacing || 50; // Create the input mermaid.graph\n\n  var g = new graphlib__WEBPACK_IMPORTED_MODULE_2___default.a.Graph({\n    multigraph: true,\n    compound: true\n  }).setGraph({\n    rankdir: _classDb__WEBPACK_IMPORTED_MODULE_4__[\"default\"].getDirection(),\n    nodesep: nodeSpacing,\n    ranksep: rankSpacing,\n    marginx: 8,\n    marginy: 8\n  }).setDefaultEdgeLabel(function () {\n    return {};\n  }); // let subG;\n  // const subGraphs = flowDb.getSubGraphs();\n  // log.info('Subgraphs - ', subGraphs);\n  // for (let i = subGraphs.length - 1; i >= 0; i--) {\n  //   subG = subGraphs[i];\n  //   log.info('Subgraph - ', subG);\n  //   flowDb.addVertex(subG.id, subG.title, 'group', undefined, subG.classes);\n  // }\n  // Fetch the verices/nodes and edges/links from the parsed graph definition\n\n  var classes = _classDb__WEBPACK_IMPORTED_MODULE_4__[\"default\"].getClasses();\n  var relations = _classDb__WEBPACK_IMPORTED_MODULE_4__[\"default\"].getRelations();\n  _logger__WEBPACK_IMPORTED_MODULE_3__[\"log\"].info(relations); // let i = 0;\n  // for (i = subGraphs.length - 1; i >= 0; i--) {\n  //   subG = subGraphs[i];\n  //   selectAll('cluster').append('text');\n  //   for (let j = 0; j < subG.nodes.length; j++) {\n  //     g.setParent(subG.nodes[j], subG.id);\n  //   }\n  // }\n\n  addClasses(classes, g, id);\n  addRelations(relations, g); // Add custom shapes\n  // flowChartShapes.addToRenderV2(addShape);\n  // Set up an SVG group so that we can translate the final graph.\n\n  var svg = Object(d3__WEBPACK_IMPORTED_MODULE_0__[\"select\"])(\"[id=\\\"\".concat(id, \"\\\"]\"));\n  svg.attr('xmlns:xlink', 'http://www.w3.org/1999/xlink'); // Run the renderer. This is what draws the final graph.\n\n  var element = Object(d3__WEBPACK_IMPORTED_MODULE_0__[\"select\"])('#' + id + ' g');\n  Object(_dagre_wrapper_index_js__WEBPACK_IMPORTED_MODULE_8__[\"render\"])(element, g, ['aggregation', 'extension', 'composition', 'dependency'], 'classDiagram', id); // element.selectAll('g.node').attr('title', function() {\n  //   return flowDb.getTooltip(this.id);\n  // });\n\n  var padding = 8;\n  var svgBounds = svg.node().getBBox();\n  var width = svgBounds.width + padding * 2;\n  var height = svgBounds.height + padding * 2;\n  _logger__WEBPACK_IMPORTED_MODULE_3__[\"log\"].debug(\"new ViewBox 0 0 \".concat(width, \" \").concat(height), \"translate(\".concat(padding - g._label.marginx, \", \").concat(padding - g._label.marginy, \")\"));\n  Object(_utils__WEBPACK_IMPORTED_MODULE_9__[\"configureSvgSize\"])(svg, height, width, conf.useMaxWidth);\n  svg.attr('viewBox', \"0 0 \".concat(width, \" \").concat(height));\n  svg.select('g').attr('transform', \"translate(\".concat(padding - g._label.marginx, \", \").concat(padding - svgBounds.y, \")\")); // Index nodes\n  // flowDb.indexNodes('subGraph' + i);\n  // Add label rects for non html labels\n\n  if (!conf.htmlLabels) {\n    var labels = document.querySelectorAll('[id=\"' + id + '\"] .edgeLabel .label');\n\n    for (var k = 0; k < labels.length; k++) {\n      var label = labels[k]; // Get dimensions of label\n\n      var dim = label.getBBox();\n      var rect = document.createElementNS('http://www.w3.org/2000/svg', 'rect');\n      rect.setAttribute('rx', 0);\n      rect.setAttribute('ry', 0);\n      rect.setAttribute('width', dim.width);\n      rect.setAttribute('height', dim.height); // rect.setAttribute('style', 'fill:#e8e8e8;');\n\n      label.insertBefore(rect, label.firstChild);\n    }\n  } // If node has a link, wrap it in an anchor SVG object.\n  // const keys = Object.keys(classes);\n  // keys.forEach(function(key) {\n  //   const vertex = classes[key];\n  //   if (vertex.link) {\n  //     const node = select('#' + id + ' [id=\"' + key + '\"]');\n  //     if (node) {\n  //       const link = document.createElementNS('http://www.w3.org/2000/svg', 'a');\n  //       link.setAttributeNS('http://www.w3.org/2000/svg', 'class', vertex.classes.join(' '));\n  //       link.setAttributeNS('http://www.w3.org/2000/svg', 'href', vertex.link);\n  //       link.setAttributeNS('http://www.w3.org/2000/svg', 'rel', 'noopener');\n  //       const linkNode = node.insert(function() {\n  //         return link;\n  //       }, ':first-child');\n  //       const shape = node.select('.label-container');\n  //       if (shape) {\n  //         linkNode.append(function() {\n  //           return shape.node();\n  //         });\n  //       }\n  //       const label = node.select('.label');\n  //       if (label) {\n  //         linkNode.append(function() {\n  //           return label.node();\n  //         });\n  //       }\n  //     }\n  //   }\n  // });\n\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n  setConf: setConf,\n  draw: draw\n});\n\nfunction getArrowMarker(type) {\n  var marker;\n\n  switch (type) {\n    case 0:\n      marker = 'aggregation';\n      break;\n\n    case 1:\n      marker = 'extension';\n      break;\n\n    case 2:\n      marker = 'composition';\n      break;\n\n    case 3:\n      marker = 'dependency';\n      break;\n\n    default:\n      marker = 'none';\n  }\n\n  return marker;\n}\n\n/***/ }),\n\n/***/ \"./src/diagrams/class/classRenderer.js\":\n/*!*********************************************!*\\\n  !*** ./src/diagrams/class/classRenderer.js ***!\n  \\*********************************************/\n/*! exports provided: setConf, draw, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"setConf\", function() { return setConf; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"draw\", function() { return draw; });\n/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3 */ \"./node_modules/d3/src/index.js\");\n/* harmony import */ var dagre__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! dagre */ \"./node_modules/dagre/index.js\");\n/* harmony import */ var dagre__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(dagre__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var graphlib__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! graphlib */ \"./node_modules/graphlib/index.js\");\n/* harmony import */ var graphlib__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(graphlib__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../logger */ \"./src/logger.js\");\n/* harmony import */ var _classDb__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./classDb */ \"./src/diagrams/class/classDb.js\");\n/* harmony import */ var _parser_classDiagram__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./parser/classDiagram */ \"./src/diagrams/class/parser/classDiagram.jison\");\n/* harmony import */ var _parser_classDiagram__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_parser_classDiagram__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _svgDraw__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./svgDraw */ \"./src/diagrams/class/svgDraw.js\");\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../utils */ \"./src/utils.js\");\n\n\n\n\n\n\n\n\n_parser_classDiagram__WEBPACK_IMPORTED_MODULE_5__[\"parser\"].yy = _classDb__WEBPACK_IMPORTED_MODULE_4__[\"default\"];\nvar idCache = {};\nvar padding = 20;\nvar conf = {\n  dividerMargin: 10,\n  padding: 5,\n  textHeight: 10\n}; // Todo optimize\n\nvar getGraphId = function getGraphId(label) {\n  var keys = Object.keys(idCache);\n\n  for (var i = 0; i < keys.length; i++) {\n    if (idCache[keys[i]].label === label) {\n      return keys[i];\n    }\n  }\n\n  return undefined;\n};\n/**\n * Setup arrow head and define the marker. The result is appended to the svg.\n */\n\n\nvar insertMarkers = function insertMarkers(elem) {\n  elem.append('defs').append('marker').attr('id', 'extensionStart').attr('class', 'extension').attr('refX', 0).attr('refY', 7).attr('markerWidth', 190).attr('markerHeight', 240).attr('orient', 'auto').append('path').attr('d', 'M 1,7 L18,13 V 1 Z');\n  elem.append('defs').append('marker').attr('id', 'extensionEnd').attr('refX', 19).attr('refY', 7).attr('markerWidth', 20).attr('markerHeight', 28).attr('orient', 'auto').append('path').attr('d', 'M 1,1 V 13 L18,7 Z'); // this is actual shape for arrowhead\n\n  elem.append('defs').append('marker').attr('id', 'compositionStart').attr('class', 'extension').attr('refX', 0).attr('refY', 7).attr('markerWidth', 190).attr('markerHeight', 240).attr('orient', 'auto').append('path').attr('d', 'M 18,7 L9,13 L1,7 L9,1 Z');\n  elem.append('defs').append('marker').attr('id', 'compositionEnd').attr('refX', 19).attr('refY', 7).attr('markerWidth', 20).attr('markerHeight', 28).attr('orient', 'auto').append('path').attr('d', 'M 18,7 L9,13 L1,7 L9,1 Z');\n  elem.append('defs').append('marker').attr('id', 'aggregationStart').attr('class', 'extension').attr('refX', 0).attr('refY', 7).attr('markerWidth', 190).attr('markerHeight', 240).attr('orient', 'auto').append('path').attr('d', 'M 18,7 L9,13 L1,7 L9,1 Z');\n  elem.append('defs').append('marker').attr('id', 'aggregationEnd').attr('refX', 19).attr('refY', 7).attr('markerWidth', 20).attr('markerHeight', 28).attr('orient', 'auto').append('path').attr('d', 'M 18,7 L9,13 L1,7 L9,1 Z');\n  elem.append('defs').append('marker').attr('id', 'dependencyStart').attr('class', 'extension').attr('refX', 0).attr('refY', 7).attr('markerWidth', 190).attr('markerHeight', 240).attr('orient', 'auto').append('path').attr('d', 'M 5,7 L9,13 L1,7 L9,1 Z');\n  elem.append('defs').append('marker').attr('id', 'dependencyEnd').attr('refX', 19).attr('refY', 7).attr('markerWidth', 20).attr('markerHeight', 28).attr('orient', 'auto').append('path').attr('d', 'M 18,7 L9,13 L14,7 L9,1 Z');\n};\n\nvar setConf = function setConf(cnf) {\n  var keys = Object.keys(cnf);\n  keys.forEach(function (key) {\n    conf[key] = cnf[key];\n  });\n};\n/**\n * Draws a flowchart in the tag with id: id based on the graph definition in text.\n * @param text\n * @param id\n */\n\nvar draw = function draw(text, id) {\n  idCache = {};\n  _parser_classDiagram__WEBPACK_IMPORTED_MODULE_5__[\"parser\"].yy.clear();\n  _parser_classDiagram__WEBPACK_IMPORTED_MODULE_5__[\"parser\"].parse(text);\n  _logger__WEBPACK_IMPORTED_MODULE_3__[\"log\"].info('Rendering diagram ' + text); // Fetch the default direction, use TD if none was found\n\n  var diagram = Object(d3__WEBPACK_IMPORTED_MODULE_0__[\"select\"])(\"[id='\".concat(id, \"']\"));\n  diagram.attr('xmlns:xlink', 'http://www.w3.org/1999/xlink');\n  insertMarkers(diagram); // Layout graph, Create a new directed graph\n\n  var g = new graphlib__WEBPACK_IMPORTED_MODULE_2___default.a.Graph({\n    multigraph: true\n  }); // Set an object for the graph label\n\n  g.setGraph({\n    isMultiGraph: true\n  }); // Default to assigning a new object as a label for each new edge.\n\n  g.setDefaultEdgeLabel(function () {\n    return {};\n  });\n  var classes = _classDb__WEBPACK_IMPORTED_MODULE_4__[\"default\"].getClasses();\n  var keys = Object.keys(classes);\n\n  for (var i = 0; i < keys.length; i++) {\n    var classDef = classes[keys[i]];\n    var node = _svgDraw__WEBPACK_IMPORTED_MODULE_6__[\"default\"].drawClass(diagram, classDef, conf);\n    idCache[node.id] = node; // Add nodes to the graph. The first argument is the node id. The second is\n    // metadata about the node. In this case we're going to add labels to each of\n    // our nodes.\n\n    g.setNode(node.id, node);\n    _logger__WEBPACK_IMPORTED_MODULE_3__[\"log\"].info('Org height: ' + node.height);\n  }\n\n  var relations = _classDb__WEBPACK_IMPORTED_MODULE_4__[\"default\"].getRelations();\n  relations.forEach(function (relation) {\n    _logger__WEBPACK_IMPORTED_MODULE_3__[\"log\"].info('tjoho' + getGraphId(relation.id1) + getGraphId(relation.id2) + JSON.stringify(relation));\n    g.setEdge(getGraphId(relation.id1), getGraphId(relation.id2), {\n      relation: relation\n    }, relation.title || 'DEFAULT');\n  });\n  dagre__WEBPACK_IMPORTED_MODULE_1___default.a.layout(g);\n  g.nodes().forEach(function (v) {\n    if (typeof v !== 'undefined' && typeof g.node(v) !== 'undefined') {\n      _logger__WEBPACK_IMPORTED_MODULE_3__[\"log\"].debug('Node ' + v + ': ' + JSON.stringify(g.node(v)));\n      Object(d3__WEBPACK_IMPORTED_MODULE_0__[\"select\"])('#' + Object(_classDb__WEBPACK_IMPORTED_MODULE_4__[\"lookUpDomId\"])(v)).attr('transform', 'translate(' + (g.node(v).x - g.node(v).width / 2) + ',' + (g.node(v).y - g.node(v).height / 2) + ' )');\n    }\n  });\n  g.edges().forEach(function (e) {\n    if (typeof e !== 'undefined' && typeof g.edge(e) !== 'undefined') {\n      _logger__WEBPACK_IMPORTED_MODULE_3__[\"log\"].debug('Edge ' + e.v + ' -> ' + e.w + ': ' + JSON.stringify(g.edge(e)));\n      _svgDraw__WEBPACK_IMPORTED_MODULE_6__[\"default\"].drawEdge(diagram, g.edge(e), g.edge(e).relation, conf);\n    }\n  });\n  var svgBounds = diagram.node().getBBox();\n  var width = svgBounds.width + padding * 2;\n  var height = svgBounds.height + padding * 2;\n  Object(_utils__WEBPACK_IMPORTED_MODULE_7__[\"configureSvgSize\"])(diagram, height, width, conf.useMaxWidth); // Ensure the viewBox includes the whole svgBounds area with extra space for padding\n\n  var vBox = \"\".concat(svgBounds.x - padding, \" \").concat(svgBounds.y - padding, \" \").concat(width, \" \").concat(height);\n  _logger__WEBPACK_IMPORTED_MODULE_3__[\"log\"].debug(\"viewBox \".concat(vBox));\n  diagram.attr('viewBox', vBox);\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n  setConf: setConf,\n  draw: draw\n});\n\n/***/ }),\n\n/***/ \"./src/diagrams/class/parser/classDiagram.jison\":\n/*!******************************************************!*\\\n  !*** ./src/diagrams/class/parser/classDiagram.jison ***!\n  \\******************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n/* WEBPACK VAR INJECTION */(function(process, module) {/* parser generated by jison 0.4.18 */\n/*\n  Returns a Parser object of the following structure:\n\n  Parser: {\n    yy: {}\n  }\n\n  Parser.prototype: {\n    yy: {},\n    trace: function(),\n    symbols_: {associative list: name ==> number},\n    terminals_: {associative list: number ==> name},\n    productions_: [...],\n    performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$),\n    table: [...],\n    defaultActions: {...},\n    parseError: function(str, hash),\n    parse: function(input),\n\n    lexer: {\n        EOF: 1,\n        parseError: function(str, hash),\n        setInput: function(input),\n        input: function(),\n        unput: function(str),\n        more: function(),\n        less: function(n),\n        pastInput: function(),\n        upcomingInput: function(),\n        showPosition: function(),\n        test_match: function(regex_match_array, rule_index),\n        next: function(),\n        lex: function(),\n        begin: function(condition),\n        popState: function(),\n        _currentRules: function(),\n        topState: function(),\n        pushState: function(condition),\n\n        options: {\n            ranges: boolean           (optional: true ==> token location info will include a .range[] member)\n            flex: boolean             (optional: true ==> flex-like lexing behaviour where the rules are tested exhaustively to find the longest match)\n            backtrack_lexer: boolean  (optional: true ==> lexer regexes are tested in order and for each matching regex the action code is invoked; the lexer terminates the scan when a token is returned by the action code)\n        },\n\n        performAction: function(yy, yy_, $avoiding_name_collisions, YY_START),\n        rules: [...],\n        conditions: {associative list: name ==> set},\n    }\n  }\n\n\n  token location info (@$, _$, etc.): {\n    first_line: n,\n    last_line: n,\n    first_column: n,\n    last_column: n,\n    range: [start_number, end_number]       (where the numbers are indexes into the input string, regular zero-based)\n  }\n\n\n  the parseError function receives a 'hash' object with these members for lexer and parser errors: {\n    text:        (matched text)\n    token:       (the produced terminal token, if any)\n    line:        (yylineno)\n  }\n  while parser (grammar) errors will also provide these members, i.e. parser errors deliver a superset of attributes: {\n    loc:         (yylloc)\n    expected:    (string describing the set of expected tokens)\n    recoverable: (boolean: TRUE when the parser has a error recovery rule available for this particular error)\n  }\n*/\nvar parser = (function(){\nvar o=function(k,v,o,l){for(o=o||{},l=k.length;l--;o[k[l]]=v);return o},$V0=[1,6],$V1=[1,7],$V2=[1,8],$V3=[1,9],$V4=[1,12],$V5=[1,11],$V6=[1,15,24],$V7=[1,19],$V8=[1,31],$V9=[1,34],$Va=[1,32],$Vb=[1,33],$Vc=[1,35],$Vd=[1,36],$Ve=[1,37],$Vf=[1,38],$Vg=[1,41],$Vh=[1,42],$Vi=[1,43],$Vj=[1,44],$Vk=[15,24],$Vl=[1,56],$Vm=[1,57],$Vn=[1,58],$Vo=[1,59],$Vp=[1,60],$Vq=[1,61],$Vr=[15,24,31,38,39,47,50,51,52,53,54,55,60,62],$Vs=[15,24,29,31,38,39,43,47,50,51,52,53,54,55,60,62,77,78,79,80],$Vt=[7,8,9,10,15,18,22,24],$Vu=[47,77,78,79,80],$Vv=[47,54,55,77,78,79,80],$Vw=[47,50,51,52,53,77,78,79,80],$Vx=[15,24,31],$Vy=[1,93];\nvar parser = {trace: function trace () { },\nyy: {},\nsymbols_: {\"error\":2,\"start\":3,\"mermaidDoc\":4,\"direction\":5,\"directive\":6,\"direction_tb\":7,\"direction_bt\":8,\"direction_rl\":9,\"direction_lr\":10,\"graphConfig\":11,\"openDirective\":12,\"typeDirective\":13,\"closeDirective\":14,\"NEWLINE\":15,\":\":16,\"argDirective\":17,\"open_directive\":18,\"type_directive\":19,\"arg_directive\":20,\"close_directive\":21,\"CLASS_DIAGRAM\":22,\"statements\":23,\"EOF\":24,\"statement\":25,\"className\":26,\"alphaNumToken\":27,\"classLiteralName\":28,\"GENERICTYPE\":29,\"relationStatement\":30,\"LABEL\":31,\"classStatement\":32,\"methodStatement\":33,\"annotationStatement\":34,\"clickStatement\":35,\"cssClassStatement\":36,\"CLASS\":37,\"STYLE_SEPARATOR\":38,\"STRUCT_START\":39,\"members\":40,\"STRUCT_STOP\":41,\"ANNOTATION_START\":42,\"ANNOTATION_END\":43,\"MEMBER\":44,\"SEPARATOR\":45,\"relation\":46,\"STR\":47,\"relationType\":48,\"lineType\":49,\"AGGREGATION\":50,\"EXTENSION\":51,\"COMPOSITION\":52,\"DEPENDENCY\":53,\"LINE\":54,\"DOTTED_LINE\":55,\"CALLBACK\":56,\"LINK\":57,\"LINK_TARGET\":58,\"CLICK\":59,\"CALLBACK_NAME\":60,\"CALLBACK_ARGS\":61,\"HREF\":62,\"CSSCLASS\":63,\"commentToken\":64,\"textToken\":65,\"graphCodeTokens\":66,\"textNoTagsToken\":67,\"TAGSTART\":68,\"TAGEND\":69,\"==\":70,\"--\":71,\"PCT\":72,\"DEFAULT\":73,\"SPACE\":74,\"MINUS\":75,\"keywords\":76,\"UNICODE_TEXT\":77,\"NUM\":78,\"ALPHA\":79,\"BQUOTE_STR\":80,\"$accept\":0,\"$end\":1},\nterminals_: {2:\"error\",7:\"direction_tb\",8:\"direction_bt\",9:\"direction_rl\",10:\"direction_lr\",15:\"NEWLINE\",16:\":\",18:\"open_directive\",19:\"type_directive\",20:\"arg_directive\",21:\"close_directive\",22:\"CLASS_DIAGRAM\",24:\"EOF\",29:\"GENERICTYPE\",31:\"LABEL\",37:\"CLASS\",38:\"STYLE_SEPARATOR\",39:\"STRUCT_START\",41:\"STRUCT_STOP\",42:\"ANNOTATION_START\",43:\"ANNOTATION_END\",44:\"MEMBER\",45:\"SEPARATOR\",47:\"STR\",50:\"AGGREGATION\",51:\"EXTENSION\",52:\"COMPOSITION\",53:\"DEPENDENCY\",54:\"LINE\",55:\"DOTTED_LINE\",56:\"CALLBACK\",57:\"LINK\",58:\"LINK_TARGET\",59:\"CLICK\",60:\"CALLBACK_NAME\",61:\"CALLBACK_ARGS\",62:\"HREF\",63:\"CSSCLASS\",66:\"graphCodeTokens\",68:\"TAGSTART\",69:\"TAGEND\",70:\"==\",71:\"--\",72:\"PCT\",73:\"DEFAULT\",74:\"SPACE\",75:\"MINUS\",76:\"keywords\",77:\"UNICODE_TEXT\",78:\"NUM\",79:\"ALPHA\",80:\"BQUOTE_STR\"},\nproductions_: [0,[3,1],[3,1],[3,2],[5,1],[5,1],[5,1],[5,1],[4,1],[6,4],[6,6],[12,1],[13,1],[17,1],[14,1],[11,4],[23,1],[23,2],[23,3],[26,1],[26,1],[26,2],[26,2],[26,2],[25,1],[25,2],[25,1],[25,1],[25,1],[25,1],[25,1],[25,1],[25,1],[32,2],[32,4],[32,5],[32,7],[34,4],[40,1],[40,2],[33,1],[33,2],[33,1],[33,1],[30,3],[30,4],[30,4],[30,5],[46,3],[46,2],[46,2],[46,1],[48,1],[48,1],[48,1],[48,1],[49,1],[49,1],[35,3],[35,4],[35,3],[35,4],[35,4],[35,5],[35,3],[35,4],[35,4],[35,5],[35,3],[35,4],[35,4],[35,5],[36,3],[64,1],[64,1],[65,1],[65,1],[65,1],[65,1],[65,1],[65,1],[65,1],[67,1],[67,1],[67,1],[67,1],[27,1],[27,1],[27,1],[28,1]],\nperformAction: function anonymous(yytext, yyleng, yylineno, yy, yystate /* action[1] */, $$ /* vstack */, _$ /* lstack */) {\n/* this == yyval */\n\nvar $0 = $$.length - 1;\nswitch (yystate) {\ncase 4:\n yy.setDirection('TB');\nbreak;\ncase 5:\n yy.setDirection('BT');\nbreak;\ncase 6:\n yy.setDirection('RL');\nbreak;\ncase 7:\n yy.setDirection('LR');\nbreak;\ncase 11:\n yy.parseDirective('%%{', 'open_directive'); \nbreak;\ncase 12:\n yy.parseDirective($$[$0], 'type_directive'); \nbreak;\ncase 13:\n $$[$0] = $$[$0].trim().replace(/'/g, '\"'); yy.parseDirective($$[$0], 'arg_directive'); \nbreak;\ncase 14:\n yy.parseDirective('}%%', 'close_directive', 'class'); \nbreak;\ncase 19: case 20:\n this.$=$$[$0]; \nbreak;\ncase 21:\n this.$=$$[$0-1]+$$[$0]; \nbreak;\ncase 22: case 23:\n this.$=$$[$0-1]+'~'+$$[$0]; \nbreak;\ncase 24:\n yy.addRelation($$[$0]); \nbreak;\ncase 25:\n $$[$0-1].title =  yy.cleanupLabel($$[$0]); yy.addRelation($$[$0-1]);        \nbreak;\ncase 33:\nyy.addClass($$[$0]);\nbreak;\ncase 34:\nyy.addClass($$[$0-2]);yy.setCssClass($$[$0-2], $$[$0]);\nbreak;\ncase 35:\n/*console.log($$[$0-3],JSON.stringify($$[$0-1]));*/yy.addClass($$[$0-3]);yy.addMembers($$[$0-3],$$[$0-1]);\nbreak;\ncase 36:\nyy.addClass($$[$0-5]);yy.setCssClass($$[$0-5], $$[$0-3]);yy.addMembers($$[$0-5],$$[$0-1]);\nbreak;\ncase 37:\n yy.addAnnotation($$[$0],$$[$0-2]); \nbreak;\ncase 38:\n this.$ = [$$[$0]]; \nbreak;\ncase 39:\n $$[$0].push($$[$0-1]);this.$=$$[$0];\nbreak;\ncase 40:\n/*console.log('Rel found',$$[$0]);*/\nbreak;\ncase 41:\nyy.addMember($$[$0-1],yy.cleanupLabel($$[$0]));\nbreak;\ncase 42:\n/*console.warn('Member',$$[$0]);*/\nbreak;\ncase 43:\n/*console.log('sep found',$$[$0]);*/\nbreak;\ncase 44:\n this.$ = {'id1':$$[$0-2],'id2':$$[$0], relation:$$[$0-1], relationTitle1:'none', relationTitle2:'none'}; \nbreak;\ncase 45:\n this.$ = {id1:$$[$0-3], id2:$$[$0], relation:$$[$0-1], relationTitle1:$$[$0-2], relationTitle2:'none'}\nbreak;\ncase 46:\n this.$ = {id1:$$[$0-3], id2:$$[$0], relation:$$[$0-2], relationTitle1:'none', relationTitle2:$$[$0-1]}; \nbreak;\ncase 47:\n this.$ = {id1:$$[$0-4], id2:$$[$0], relation:$$[$0-2], relationTitle1:$$[$0-3], relationTitle2:$$[$0-1]} \nbreak;\ncase 48:\n this.$={type1:$$[$0-2],type2:$$[$0],lineType:$$[$0-1]}; \nbreak;\ncase 49:\n this.$={type1:'none',type2:$$[$0],lineType:$$[$0-1]}; \nbreak;\ncase 50:\n this.$={type1:$$[$0-1],type2:'none',lineType:$$[$0]}; \nbreak;\ncase 51:\n this.$={type1:'none',type2:'none',lineType:$$[$0]}; \nbreak;\ncase 52:\n this.$=yy.relationType.AGGREGATION;\nbreak;\ncase 53:\n this.$=yy.relationType.EXTENSION;\nbreak;\ncase 54:\n this.$=yy.relationType.COMPOSITION;\nbreak;\ncase 55:\n this.$=yy.relationType.DEPENDENCY;\nbreak;\ncase 56:\nthis.$=yy.lineType.LINE;\nbreak;\ncase 57:\nthis.$=yy.lineType.DOTTED_LINE;\nbreak;\ncase 58: case 64:\nthis.$ = $$[$0-2];yy.setClickEvent($$[$0-1], $$[$0]);\nbreak;\ncase 59: case 65:\nthis.$ = $$[$0-3];yy.setClickEvent($$[$0-2], $$[$0-1]);yy.setTooltip($$[$0-2], $$[$0]);\nbreak;\ncase 60: case 68:\nthis.$ = $$[$0-2];yy.setLink($$[$0-1], $$[$0]);\nbreak;\ncase 61:\nthis.$ = $$[$0-3];yy.setLink($$[$0-2], $$[$0-1],$$[$0]);\nbreak;\ncase 62: case 70:\nthis.$ = $$[$0-3];yy.setLink($$[$0-2], $$[$0-1]);yy.setTooltip($$[$0-2], $$[$0]);\nbreak;\ncase 63: case 71:\nthis.$ = $$[$0-4];yy.setLink($$[$0-3], $$[$0-2], $$[$0]);yy.setTooltip($$[$0-3], $$[$0-1]);\nbreak;\ncase 66:\nthis.$ = $$[$0-3];yy.setClickEvent($$[$0-2], $$[$0-1], $$[$0]);\nbreak;\ncase 67:\nthis.$ = $$[$0-4];yy.setClickEvent($$[$0-3], $$[$0-2], $$[$0-1]);yy.setTooltip($$[$0-3], $$[$0]);\nbreak;\ncase 69:\nthis.$ = $$[$0-3];yy.setLink($$[$0-2], $$[$0-1], $$[$0]);\nbreak;\ncase 72:\nyy.setCssClass($$[$0-1], $$[$0]);\nbreak;\n}\n},\ntable: [{3:1,4:2,5:3,6:4,7:$V0,8:$V1,9:$V2,10:$V3,11:5,12:10,18:$V4,22:$V5},{1:[3]},{1:[2,1]},{1:[2,2]},{3:13,4:2,5:3,6:4,7:$V0,8:$V1,9:$V2,10:$V3,11:5,12:10,18:$V4,22:$V5},{1:[2,8]},o($V6,[2,4]),o($V6,[2,5]),o($V6,[2,6]),o($V6,[2,7]),{13:14,19:[1,15]},{15:[1,16]},{19:[2,11]},{1:[2,3]},{14:17,16:[1,18],21:$V7},o([16,21],[2,12]),{5:29,6:28,7:$V0,8:$V1,9:$V2,10:$V3,12:10,18:$V4,23:20,25:21,26:30,27:39,28:40,30:22,32:23,33:24,34:25,35:26,36:27,37:$V8,42:$V9,44:$Va,45:$Vb,56:$Vc,57:$Vd,59:$Ve,63:$Vf,77:$Vg,78:$Vh,79:$Vi,80:$Vj},{15:[1,45]},{17:46,20:[1,47]},{15:[2,14]},{24:[1,48]},{15:[1,49],24:[2,16]},o($Vk,[2,24],{31:[1,50]}),o($Vk,[2,26]),o($Vk,[2,27]),o($Vk,[2,28]),o($Vk,[2,29]),o($Vk,[2,30]),o($Vk,[2,31]),o($Vk,[2,32]),o($Vk,[2,40],{46:51,48:54,49:55,31:[1,53],47:[1,52],50:$Vl,51:$Vm,52:$Vn,53:$Vo,54:$Vp,55:$Vq}),{26:62,27:39,28:40,77:$Vg,78:$Vh,79:$Vi,80:$Vj},o($Vk,[2,42]),o($Vk,[2,43]),{27:63,77:$Vg,78:$Vh,79:$Vi},{26:64,27:39,28:40,77:$Vg,78:$Vh,79:$Vi,80:$Vj},{26:65,27:39,28:40,77:$Vg,78:$Vh,79:$Vi,80:$Vj},{26:66,27:39,28:40,77:$Vg,78:$Vh,79:$Vi,80:$Vj},{47:[1,67]},o($Vr,[2,19],{27:39,28:40,26:68,29:[1,69],77:$Vg,78:$Vh,79:$Vi,80:$Vj}),o($Vr,[2,20],{29:[1,70]}),o($Vs,[2,86]),o($Vs,[2,87]),o($Vs,[2,88]),o([15,24,29,31,38,39,47,50,51,52,53,54,55,60,62],[2,89]),o($Vt,[2,9]),{14:71,21:$V7},{21:[2,13]},{1:[2,15]},{5:29,6:28,7:$V0,8:$V1,9:$V2,10:$V3,12:10,18:$V4,23:72,24:[2,17],25:21,26:30,27:39,28:40,30:22,32:23,33:24,34:25,35:26,36:27,37:$V8,42:$V9,44:$Va,45:$Vb,56:$Vc,57:$Vd,59:$Ve,63:$Vf,77:$Vg,78:$Vh,79:$Vi,80:$Vj},o($Vk,[2,25]),{26:73,27:39,28:40,47:[1,74],77:$Vg,78:$Vh,79:$Vi,80:$Vj},{46:75,48:54,49:55,50:$Vl,51:$Vm,52:$Vn,53:$Vo,54:$Vp,55:$Vq},o($Vk,[2,41]),{49:76,54:$Vp,55:$Vq},o($Vu,[2,51],{48:77,50:$Vl,51:$Vm,52:$Vn,53:$Vo}),o($Vv,[2,52]),o($Vv,[2,53]),o($Vv,[2,54]),o($Vv,[2,55]),o($Vw,[2,56]),o($Vw,[2,57]),o($Vk,[2,33],{38:[1,78],39:[1,79]}),{43:[1,80]},{47:[1,81]},{47:[1,82]},{60:[1,83],62:[1,84]},{27:85,77:$Vg,78:$Vh,79:$Vi},o($Vr,[2,21]),o($Vr,[2,22]),o($Vr,[2,23]),{15:[1,86]},{24:[2,18]},o($Vx,[2,44]),{26:87,27:39,28:40,77:$Vg,78:$Vh,79:$Vi,80:$Vj},{26:88,27:39,28:40,47:[1,89],77:$Vg,78:$Vh,79:$Vi,80:$Vj},o($Vu,[2,50],{48:90,50:$Vl,51:$Vm,52:$Vn,53:$Vo}),o($Vu,[2,49]),{27:91,77:$Vg,78:$Vh,79:$Vi},{40:92,44:$Vy},{26:94,27:39,28:40,77:$Vg,78:$Vh,79:$Vi,80:$Vj},o($Vk,[2,58],{47:[1,95]}),o($Vk,[2,60],{47:[1,97],58:[1,96]}),o($Vk,[2,64],{47:[1,98],61:[1,99]}),o($Vk,[2,68],{47:[1,101],58:[1,100]}),o($Vk,[2,72]),o($Vt,[2,10]),o($Vx,[2,46]),o($Vx,[2,45]),{26:102,27:39,28:40,77:$Vg,78:$Vh,79:$Vi,80:$Vj},o($Vu,[2,48]),o($Vk,[2,34],{39:[1,103]}),{41:[1,104]},{40:105,41:[2,38],44:$Vy},o($Vk,[2,37]),o($Vk,[2,59]),o($Vk,[2,61]),o($Vk,[2,62],{58:[1,106]}),o($Vk,[2,65]),o($Vk,[2,66],{47:[1,107]}),o($Vk,[2,69]),o($Vk,[2,70],{58:[1,108]}),o($Vx,[2,47]),{40:109,44:$Vy},o($Vk,[2,35]),{41:[2,39]},o($Vk,[2,63]),o($Vk,[2,67]),o($Vk,[2,71]),{41:[1,110]},o($Vk,[2,36])],\ndefaultActions: {2:[2,1],3:[2,2],5:[2,8],12:[2,11],13:[2,3],19:[2,14],47:[2,13],48:[2,15],72:[2,18],105:[2,39]},\nparseError: function parseError (str, hash) {\n    if (hash.recoverable) {\n        this.trace(str);\n    } else {\n        var error = new Error(str);\n        error.hash = hash;\n        throw error;\n    }\n},\nparse: function parse(input) {\n    var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = '', yylineno = 0, yyleng = 0, recovering = 0, TERROR = 2, EOF = 1;\n    var args = lstack.slice.call(arguments, 1);\n    var lexer = Object.create(this.lexer);\n    var sharedState = { yy: {} };\n    for (var k in this.yy) {\n        if (Object.prototype.hasOwnProperty.call(this.yy, k)) {\n            sharedState.yy[k] = this.yy[k];\n        }\n    }\n    lexer.setInput(input, sharedState.yy);\n    sharedState.yy.lexer = lexer;\n    sharedState.yy.parser = this;\n    if (typeof lexer.yylloc == 'undefined') {\n        lexer.yylloc = {};\n    }\n    var yyloc = lexer.yylloc;\n    lstack.push(yyloc);\n    var ranges = lexer.options && lexer.options.ranges;\n    if (typeof sharedState.yy.parseError === 'function') {\n        this.parseError = sharedState.yy.parseError;\n    } else {\n        this.parseError = Object.getPrototypeOf(this).parseError;\n    }\n    function popStack(n) {\n        stack.length = stack.length - 2 * n;\n        vstack.length = vstack.length - n;\n        lstack.length = lstack.length - n;\n    }\n            function lex() {\n            var token;\n            token = tstack.pop() || lexer.lex() || EOF;\n            if (typeof token !== 'number') {\n                if (token instanceof Array) {\n                    tstack = token;\n                    token = tstack.pop();\n                }\n                token = self.symbols_[token] || token;\n            }\n            return token;\n        }\n    var symbol, preErrorSymbol, state, action, a, r, yyval = {}, p, len, newState, expected;\n    while (true) {\n        state = stack[stack.length - 1];\n        if (this.defaultActions[state]) {\n            action = this.defaultActions[state];\n        } else {\n            if (symbol === null || typeof symbol == 'undefined') {\n                symbol = lex();\n            }\n            action = table[state] && table[state][symbol];\n        }\n        if (typeof action === 'undefined' || !action.length || !action[0]) {\n            var errStr = '';\n            expected = [];\n            for (p in table[state]) {\n                if (this.terminals_[p] && p > TERROR) {\n                    expected.push('\\'' + this.terminals_[p] + '\\'');\n                }\n            }\n            if (lexer.showPosition) {\n                errStr = 'Parse error on line ' + (yylineno + 1) + ':\\n' + lexer.showPosition() + '\\nExpecting ' + expected.join(', ') + ', got \\'' + (this.terminals_[symbol] || symbol) + '\\'';\n            } else {\n                errStr = 'Parse error on line ' + (yylineno + 1) + ': Unexpected ' + (symbol == EOF ? 'end of input' : '\\'' + (this.terminals_[symbol] || symbol) + '\\'');\n            }\n            this.parseError(errStr, {\n                text: lexer.match,\n                token: this.terminals_[symbol] || symbol,\n                line: lexer.yylineno,\n                loc: yyloc,\n                expected: expected\n            });\n        }\n        if (action[0] instanceof Array && action.length > 1) {\n            throw new Error('Parse Error: multiple actions possible at state: ' + state + ', token: ' + symbol);\n        }\n        switch (action[0]) {\n        case 1:\n            stack.push(symbol);\n            vstack.push(lexer.yytext);\n            lstack.push(lexer.yylloc);\n            stack.push(action[1]);\n            symbol = null;\n            if (!preErrorSymbol) {\n                yyleng = lexer.yyleng;\n                yytext = lexer.yytext;\n                yylineno = lexer.yylineno;\n                yyloc = lexer.yylloc;\n                if (recovering > 0) {\n                    recovering--;\n                }\n            } else {\n                symbol = preErrorSymbol;\n                preErrorSymbol = null;\n            }\n            break;\n        case 2:\n            len = this.productions_[action[1]][1];\n            yyval.$ = vstack[vstack.length - len];\n            yyval._$ = {\n                first_line: lstack[lstack.length - (len || 1)].first_line,\n                last_line: lstack[lstack.length - 1].last_line,\n                first_column: lstack[lstack.length - (len || 1)].first_column,\n                last_column: lstack[lstack.length - 1].last_column\n            };\n            if (ranges) {\n                yyval._$.range = [\n                    lstack[lstack.length - (len || 1)].range[0],\n                    lstack[lstack.length - 1].range[1]\n                ];\n            }\n            r = this.performAction.apply(yyval, [\n                yytext,\n                yyleng,\n                yylineno,\n                sharedState.yy,\n                action[1],\n                vstack,\n                lstack\n            ].concat(args));\n            if (typeof r !== 'undefined') {\n                return r;\n            }\n            if (len) {\n                stack = stack.slice(0, -1 * len * 2);\n                vstack = vstack.slice(0, -1 * len);\n                lstack = lstack.slice(0, -1 * len);\n            }\n            stack.push(this.productions_[action[1]][0]);\n            vstack.push(yyval.$);\n            lstack.push(yyval._$);\n            newState = table[stack[stack.length - 2]][stack[stack.length - 1]];\n            stack.push(newState);\n            break;\n        case 3:\n            return true;\n        }\n    }\n    return true;\n}};\n\n/* generated by jison-lex 0.3.4 */\nvar lexer = (function(){\nvar lexer = ({\n\nEOF:1,\n\nparseError:function parseError(str, hash) {\n        if (this.yy.parser) {\n            this.yy.parser.parseError(str, hash);\n        } else {\n            throw new Error(str);\n        }\n    },\n\n// resets the lexer, sets new input\nsetInput:function (input, yy) {\n        this.yy = yy || this.yy || {};\n        this._input = input;\n        this._more = this._backtrack = this.done = false;\n        this.yylineno = this.yyleng = 0;\n        this.yytext = this.matched = this.match = '';\n        this.conditionStack = ['INITIAL'];\n        this.yylloc = {\n            first_line: 1,\n            first_column: 0,\n            last_line: 1,\n            last_column: 0\n        };\n        if (this.options.ranges) {\n            this.yylloc.range = [0,0];\n        }\n        this.offset = 0;\n        return this;\n    },\n\n// consumes and returns one char from the input\ninput:function () {\n        var ch = this._input[0];\n        this.yytext += ch;\n        this.yyleng++;\n        this.offset++;\n        this.match += ch;\n        this.matched += ch;\n        var lines = ch.match(/(?:\\r\\n?|\\n).*/g);\n        if (lines) {\n            this.yylineno++;\n            this.yylloc.last_line++;\n        } else {\n            this.yylloc.last_column++;\n        }\n        if (this.options.ranges) {\n            this.yylloc.range[1]++;\n        }\n\n        this._input = this._input.slice(1);\n        return ch;\n    },\n\n// unshifts one char (or a string) into the input\nunput:function (ch) {\n        var len = ch.length;\n        var lines = ch.split(/(?:\\r\\n?|\\n)/g);\n\n        this._input = ch + this._input;\n        this.yytext = this.yytext.substr(0, this.yytext.length - len);\n        //this.yyleng -= len;\n        this.offset -= len;\n        var oldLines = this.match.split(/(?:\\r\\n?|\\n)/g);\n        this.match = this.match.substr(0, this.match.length - 1);\n        this.matched = this.matched.substr(0, this.matched.length - 1);\n\n        if (lines.length - 1) {\n            this.yylineno -= lines.length - 1;\n        }\n        var r = this.yylloc.range;\n\n        this.yylloc = {\n            first_line: this.yylloc.first_line,\n            last_line: this.yylineno + 1,\n            first_column: this.yylloc.first_column,\n            last_column: lines ?\n                (lines.length === oldLines.length ? this.yylloc.first_column : 0)\n                 + oldLines[oldLines.length - lines.length].length - lines[0].length :\n              this.yylloc.first_column - len\n        };\n\n        if (this.options.ranges) {\n            this.yylloc.range = [r[0], r[0] + this.yyleng - len];\n        }\n        this.yyleng = this.yytext.length;\n        return this;\n    },\n\n// When called from action, caches matched text and appends it on next action\nmore:function () {\n        this._more = true;\n        return this;\n    },\n\n// When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead.\nreject:function () {\n        if (this.options.backtrack_lexer) {\n            this._backtrack = true;\n        } else {\n            return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\\n' + this.showPosition(), {\n                text: \"\",\n                token: null,\n                line: this.yylineno\n            });\n\n        }\n        return this;\n    },\n\n// retain first n characters of the match\nless:function (n) {\n        this.unput(this.match.slice(n));\n    },\n\n// displays already matched input, i.e. for error messages\npastInput:function () {\n        var past = this.matched.substr(0, this.matched.length - this.match.length);\n        return (past.length > 20 ? '...':'') + past.substr(-20).replace(/\\n/g, \"\");\n    },\n\n// displays upcoming input, i.e. for error messages\nupcomingInput:function () {\n        var next = this.match;\n        if (next.length < 20) {\n            next += this._input.substr(0, 20-next.length);\n        }\n        return (next.substr(0,20) + (next.length > 20 ? '...' : '')).replace(/\\n/g, \"\");\n    },\n\n// displays the character position where the lexing error occurred, i.e. for error messages\nshowPosition:function () {\n        var pre = this.pastInput();\n        var c = new Array(pre.length + 1).join(\"-\");\n        return pre + this.upcomingInput() + \"\\n\" + c + \"^\";\n    },\n\n// test the lexed token: return FALSE when not a match, otherwise return token\ntest_match:function(match, indexed_rule) {\n        var token,\n            lines,\n            backup;\n\n        if (this.options.backtrack_lexer) {\n            // save context\n            backup = {\n                yylineno: this.yylineno,\n                yylloc: {\n                    first_line: this.yylloc.first_line,\n                    last_line: this.last_line,\n                    first_column: this.yylloc.first_column,\n                    last_column: this.yylloc.last_column\n                },\n                yytext: this.yytext,\n                match: this.match,\n                matches: this.matches,\n                matched: this.matched,\n                yyleng: this.yyleng,\n                offset: this.offset,\n                _more: this._more,\n                _input: this._input,\n                yy: this.yy,\n                conditionStack: this.conditionStack.slice(0),\n                done: this.done\n            };\n            if (this.options.ranges) {\n                backup.yylloc.range = this.yylloc.range.slice(0);\n            }\n        }\n\n        lines = match[0].match(/(?:\\r\\n?|\\n).*/g);\n        if (lines) {\n            this.yylineno += lines.length;\n        }\n        this.yylloc = {\n            first_line: this.yylloc.last_line,\n            last_line: this.yylineno + 1,\n            first_column: this.yylloc.last_column,\n            last_column: lines ?\n                         lines[lines.length - 1].length - lines[lines.length - 1].match(/\\r?\\n?/)[0].length :\n                         this.yylloc.last_column + match[0].length\n        };\n        this.yytext += match[0];\n        this.match += match[0];\n        this.matches = match;\n        this.yyleng = this.yytext.length;\n        if (this.options.ranges) {\n            this.yylloc.range = [this.offset, this.offset += this.yyleng];\n        }\n        this._more = false;\n        this._backtrack = false;\n        this._input = this._input.slice(match[0].length);\n        this.matched += match[0];\n        token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]);\n        if (this.done && this._input) {\n            this.done = false;\n        }\n        if (token) {\n            return token;\n        } else if (this._backtrack) {\n            // recover context\n            for (var k in backup) {\n                this[k] = backup[k];\n            }\n            return false; // rule action called reject() implying the next rule should be tested instead.\n        }\n        return false;\n    },\n\n// return next match in input\nnext:function () {\n        if (this.done) {\n            return this.EOF;\n        }\n        if (!this._input) {\n            this.done = true;\n        }\n\n        var token,\n            match,\n            tempMatch,\n            index;\n        if (!this._more) {\n            this.yytext = '';\n            this.match = '';\n        }\n        var rules = this._currentRules();\n        for (var i = 0; i < rules.length; i++) {\n            tempMatch = this._input.match(this.rules[rules[i]]);\n            if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {\n                match = tempMatch;\n                index = i;\n                if (this.options.backtrack_lexer) {\n                    token = this.test_match(tempMatch, rules[i]);\n                    if (token !== false) {\n                        return token;\n                    } else if (this._backtrack) {\n                        match = false;\n                        continue; // rule action called reject() implying a rule MISmatch.\n                    } else {\n                        // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)\n                        return false;\n                    }\n                } else if (!this.options.flex) {\n                    break;\n                }\n            }\n        }\n        if (match) {\n            token = this.test_match(match, rules[index]);\n            if (token !== false) {\n                return token;\n            }\n            // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)\n            return false;\n        }\n        if (this._input === \"\") {\n            return this.EOF;\n        } else {\n            return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. Unrecognized text.\\n' + this.showPosition(), {\n                text: \"\",\n                token: null,\n                line: this.yylineno\n            });\n        }\n    },\n\n// return next match that has a token\nlex:function lex () {\n        var r = this.next();\n        if (r) {\n            return r;\n        } else {\n            return this.lex();\n        }\n    },\n\n// activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)\nbegin:function begin (condition) {\n        this.conditionStack.push(condition);\n    },\n\n// pop the previously active lexer condition state off the condition stack\npopState:function popState () {\n        var n = this.conditionStack.length - 1;\n        if (n > 0) {\n            return this.conditionStack.pop();\n        } else {\n            return this.conditionStack[0];\n        }\n    },\n\n// produce the lexer rule set which is active for the currently active lexer condition state\n_currentRules:function _currentRules () {\n        if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) {\n            return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;\n        } else {\n            return this.conditions[\"INITIAL\"].rules;\n        }\n    },\n\n// return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available\ntopState:function topState (n) {\n        n = this.conditionStack.length - 1 - Math.abs(n || 0);\n        if (n >= 0) {\n            return this.conditionStack[n];\n        } else {\n            return \"INITIAL\";\n        }\n    },\n\n// alias for begin(condition)\npushState:function pushState (condition) {\n        this.begin(condition);\n    },\n\n// return the number of states currently on the stack\nstateStackSize:function stateStackSize() {\n        return this.conditionStack.length;\n    },\noptions: {},\nperformAction: function anonymous(yy,yy_,$avoiding_name_collisions,YY_START) {\nvar YYSTATE=YY_START;\nswitch($avoiding_name_collisions) {\ncase 0: this.begin('open_directive'); return 18; \nbreak;\ncase 1:return 7;\nbreak;\ncase 2:return 8;\nbreak;\ncase 3:return 9;\nbreak;\ncase 4:return 10;\nbreak;\ncase 5: this.begin('type_directive'); return 19; \nbreak;\ncase 6: this.popState(); this.begin('arg_directive'); return 16; \nbreak;\ncase 7: this.popState(); this.popState(); return 21; \nbreak;\ncase 8:return 20;\nbreak;\ncase 9:/* skip comments */\nbreak;\ncase 10:/* skip comments */\nbreak;\ncase 11:return 15;\nbreak;\ncase 12:/* skip whitespace */\nbreak;\ncase 13:return 22;\nbreak;\ncase 14:return 22;\nbreak;\ncase 15: this.begin(\"struct\"); /*console.log('Starting struct');*/ return 39;\nbreak;\ncase 16:return \"EOF_IN_STRUCT\";\nbreak;\ncase 17:return \"OPEN_IN_STRUCT\";\nbreak;\ncase 18: /*console.log('Ending struct');*/this.popState(); return 41;\nbreak;\ncase 19:/* nothing */\nbreak;\ncase 20: /*console.log('lex-member: ' + yy_.yytext);*/  return \"MEMBER\";\nbreak;\ncase 21:return 37;\nbreak;\ncase 22:return 63;\nbreak;\ncase 23:return 56;\nbreak;\ncase 24:return 57;\nbreak;\ncase 25:return 59;\nbreak;\ncase 26:return 42;\nbreak;\ncase 27:return 43;\nbreak;\ncase 28:this.begin(\"generic\");\nbreak;\ncase 29:this.popState();\nbreak;\ncase 30:return \"GENERICTYPE\";\nbreak;\ncase 31:this.begin(\"string\");\nbreak;\ncase 32:this.popState();\nbreak;\ncase 33:return \"STR\";\nbreak;\ncase 34:this.begin(\"bqstring\");\nbreak;\ncase 35:this.popState();\nbreak;\ncase 36:return \"BQUOTE_STR\";\nbreak;\ncase 37:this.begin(\"href\");\nbreak;\ncase 38:this.popState();\nbreak;\ncase 39:return 62;\nbreak;\ncase 40:this.begin(\"callback_name\");\nbreak;\ncase 41:this.popState();\nbreak;\ncase 42:this.popState(); this.begin(\"callback_args\");\nbreak;\ncase 43:return 60;\nbreak;\ncase 44:this.popState();\nbreak;\ncase 45:return 61;\nbreak;\ncase 46:return 58;\nbreak;\ncase 47:return 58;\nbreak;\ncase 48:return 58;\nbreak;\ncase 49:return 58;\nbreak;\ncase 50:return 51;\nbreak;\ncase 51:return 51;\nbreak;\ncase 52:return 53;\nbreak;\ncase 53:return 53;\nbreak;\ncase 54:return 52;\nbreak;\ncase 55:return 50;\nbreak;\ncase 56:return 54;\nbreak;\ncase 57:return 55;\nbreak;\ncase 58:return 31;\nbreak;\ncase 59:return 38;\nbreak;\ncase 60:return 75;\nbreak;\ncase 61:return 'DOT';\nbreak;\ncase 62:return 'PLUS';\nbreak;\ncase 63:return 72;\nbreak;\ncase 64:return 'EQUALS';\nbreak;\ncase 65:return 'EQUALS';\nbreak;\ncase 66:return 79;\nbreak;\ncase 67:return 'PUNCTUATION';\nbreak;\ncase 68:return 78;\nbreak;\ncase 69:return 77;\nbreak;\ncase 70:return 74;\nbreak;\ncase 71:return 24;\nbreak;\n}\n},\nrules: [/^(?:%%\\{)/,/^(?:.*direction\\s+TB[^\\n]*)/,/^(?:.*direction\\s+BT[^\\n]*)/,/^(?:.*direction\\s+RL[^\\n]*)/,/^(?:.*direction\\s+LR[^\\n]*)/,/^(?:((?:(?!\\}%%)[^:.])*))/,/^(?::)/,/^(?:\\}%%)/,/^(?:((?:(?!\\}%%).|\\n)*))/,/^(?:%%(?!\\{)*[^\\n]*(\\r?\\n?)+)/,/^(?:%%[^\\n]*(\\r?\\n)*)/,/^(?:(\\r?\\n)+)/,/^(?:\\s+)/,/^(?:classDiagram-v2\\b)/,/^(?:classDiagram\\b)/,/^(?:[{])/,/^(?:$)/,/^(?:[{])/,/^(?:[}])/,/^(?:[\\n])/,/^(?:[^{}\\n]*)/,/^(?:class\\b)/,/^(?:cssClass\\b)/,/^(?:callback\\b)/,/^(?:link\\b)/,/^(?:click\\b)/,/^(?:<<)/,/^(?:>>)/,/^(?:[~])/,/^(?:[~])/,/^(?:[^~]*)/,/^(?:[\"])/,/^(?:[\"])/,/^(?:[^\"]*)/,/^(?:[`])/,/^(?:[`])/,/^(?:[^`]+)/,/^(?:href[\\s]+[\"])/,/^(?:[\"])/,/^(?:[^\"]*)/,/^(?:call[\\s]+)/,/^(?:\\([\\s]*\\))/,/^(?:\\()/,/^(?:[^(]*)/,/^(?:\\))/,/^(?:[^)]*)/,/^(?:_self\\b)/,/^(?:_blank\\b)/,/^(?:_parent\\b)/,/^(?:_top\\b)/,/^(?:\\s*<\\|)/,/^(?:\\s*\\|>)/,/^(?:\\s*>)/,/^(?:\\s*<)/,/^(?:\\s*\\*)/,/^(?:\\s*o\\b)/,/^(?:--)/,/^(?:\\.\\.)/,/^(?::{1}[^:\\n;]+)/,/^(?::{3})/,/^(?:-)/,/^(?:\\.)/,/^(?:\\+)/,/^(?:%)/,/^(?:=)/,/^(?:=)/,/^(?:\\w+)/,/^(?:[!\"#$%&'*+,-.`?\\\\/])/,/^(?:[0-9]+)/,/^(?:[\\u00AA\\u00B5\\u00BA\\u00C0-\\u00D6\\u00D8-\\u00F6]|[\\u00F8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0370-\\u0374\\u0376\\u0377]|[\\u037A-\\u037D\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5]|[\\u03F7-\\u0481\\u048A-\\u0527\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u05D0-\\u05EA]|[\\u05F0-\\u05F2\\u0620-\\u064A\\u066E\\u066F\\u0671-\\u06D3\\u06D5\\u06E5\\u06E6\\u06EE]|[\\u06EF\\u06FA-\\u06FC\\u06FF\\u0710\\u0712-\\u072F\\u074D-\\u07A5\\u07B1\\u07CA-\\u07EA]|[\\u07F4\\u07F5\\u07FA\\u0800-\\u0815\\u081A\\u0824\\u0828\\u0840-\\u0858\\u08A0]|[\\u08A2-\\u08AC\\u0904-\\u0939\\u093D\\u0950\\u0958-\\u0961\\u0971-\\u0977]|[\\u0979-\\u097F\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2]|[\\u09B6-\\u09B9\\u09BD\\u09CE\\u09DC\\u09DD\\u09DF-\\u09E1\\u09F0\\u09F1\\u0A05-\\u0A0A]|[\\u0A0F\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A32\\u0A33\\u0A35\\u0A36\\u0A38\\u0A39]|[\\u0A59-\\u0A5C\\u0A5E\\u0A72-\\u0A74\\u0A85-\\u0A8D\\u0A8F-\\u0A91\\u0A93-\\u0AA8]|[\\u0AAA-\\u0AB0\\u0AB2\\u0AB3\\u0AB5-\\u0AB9\\u0ABD\\u0AD0\\u0AE0\\u0AE1\\u0B05-\\u0B0C]|[\\u0B0F\\u0B10\\u0B13-\\u0B28\\u0B2A-\\u0B30\\u0B32\\u0B33\\u0B35-\\u0B39\\u0B3D\\u0B5C]|[\\u0B5D\\u0B5F-\\u0B61\\u0B71\\u0B83\\u0B85-\\u0B8A\\u0B8E-\\u0B90\\u0B92-\\u0B95\\u0B99]|[\\u0B9A\\u0B9C\\u0B9E\\u0B9F\\u0BA3\\u0BA4\\u0BA8-\\u0BAA\\u0BAE-\\u0BB9\\u0BD0]|[\\u0C05-\\u0C0C\\u0C0E-\\u0C10\\u0C12-\\u0C28\\u0C2A-\\u0C33\\u0C35-\\u0C39\\u0C3D]|[\\u0C58\\u0C59\\u0C60\\u0C61\\u0C85-\\u0C8C\\u0C8E-\\u0C90\\u0C92-\\u0CA8\\u0CAA-\\u0CB3]|[\\u0CB5-\\u0CB9\\u0CBD\\u0CDE\\u0CE0\\u0CE1\\u0CF1\\u0CF2\\u0D05-\\u0D0C\\u0D0E-\\u0D10]|[\\u0D12-\\u0D3A\\u0D3D\\u0D4E\\u0D60\\u0D61\\u0D7A-\\u0D7F\\u0D85-\\u0D96\\u0D9A-\\u0DB1]|[\\u0DB3-\\u0DBB\\u0DBD\\u0DC0-\\u0DC6\\u0E01-\\u0E30\\u0E32\\u0E33\\u0E40-\\u0E46\\u0E81]|[\\u0E82\\u0E84\\u0E87\\u0E88\\u0E8A\\u0E8D\\u0E94-\\u0E97\\u0E99-\\u0E9F\\u0EA1-\\u0EA3]|[\\u0EA5\\u0EA7\\u0EAA\\u0EAB\\u0EAD-\\u0EB0\\u0EB2\\u0EB3\\u0EBD\\u0EC0-\\u0EC4\\u0EC6]|[\\u0EDC-\\u0EDF\\u0F00\\u0F40-\\u0F47\\u0F49-\\u0F6C\\u0F88-\\u0F8C\\u1000-\\u102A]|[\\u103F\\u1050-\\u1055\\u105A-\\u105D\\u1061\\u1065\\u1066\\u106E-\\u1070\\u1075-\\u1081]|[\\u108E\\u10A0-\\u10C5\\u10C7\\u10CD\\u10D0-\\u10FA\\u10FC-\\u1248\\u124A-\\u124D]|[\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0]|[\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310]|[\\u1312-\\u1315\\u1318-\\u135A\\u1380-\\u138F\\u13A0-\\u13F4\\u1401-\\u166C]|[\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u1700-\\u170C\\u170E-\\u1711]|[\\u1720-\\u1731\\u1740-\\u1751\\u1760-\\u176C\\u176E-\\u1770\\u1780-\\u17B3\\u17D7]|[\\u17DC\\u1820-\\u1877\\u1880-\\u18A8\\u18AA\\u18B0-\\u18F5\\u1900-\\u191C]|[\\u1950-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19C1-\\u19C7\\u1A00-\\u1A16]|[\\u1A20-\\u1A54\\u1AA7\\u1B05-\\u1B33\\u1B45-\\u1B4B\\u1B83-\\u1BA0\\u1BAE\\u1BAF]|[\\u1BBA-\\u1BE5\\u1C00-\\u1C23\\u1C4D-\\u1C4F\\u1C5A-\\u1C7D\\u1CE9-\\u1CEC]|[\\u1CEE-\\u1CF1\\u1CF5\\u1CF6\\u1D00-\\u1DBF\\u1E00-\\u1F15\\u1F18-\\u1F1D]|[\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D]|[\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3]|[\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u2071\\u207F]|[\\u2090-\\u209C\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2119-\\u211D\\u2124\\u2126\\u2128]|[\\u212A-\\u212D\\u212F-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u2183\\u2184]|[\\u2C00-\\u2C2E\\u2C30-\\u2C5E\\u2C60-\\u2CE4\\u2CEB-\\u2CEE\\u2CF2\\u2CF3]|[\\u2D00-\\u2D25\\u2D27\\u2D2D\\u2D30-\\u2D67\\u2D6F\\u2D80-\\u2D96\\u2DA0-\\u2DA6]|[\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE]|[\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u2E2F\\u3005\\u3006\\u3031-\\u3035\\u303B\\u303C]|[\\u3041-\\u3096\\u309D-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312D]|[\\u3131-\\u318E\\u31A0-\\u31BA\\u31F0-\\u31FF\\u3400-\\u4DB5\\u4E00-\\u9FCC]|[\\uA000-\\uA48C\\uA4D0-\\uA4FD\\uA500-\\uA60C\\uA610-\\uA61F\\uA62A\\uA62B]|[\\uA640-\\uA66E\\uA67F-\\uA697\\uA6A0-\\uA6E5\\uA717-\\uA71F\\uA722-\\uA788]|[\\uA78B-\\uA78E\\uA790-\\uA793\\uA7A0-\\uA7AA\\uA7F8-\\uA801\\uA803-\\uA805]|[\\uA807-\\uA80A\\uA80C-\\uA822\\uA840-\\uA873\\uA882-\\uA8B3\\uA8F2-\\uA8F7\\uA8FB]|[\\uA90A-\\uA925\\uA930-\\uA946\\uA960-\\uA97C\\uA984-\\uA9B2\\uA9CF\\uAA00-\\uAA28]|[\\uAA40-\\uAA42\\uAA44-\\uAA4B\\uAA60-\\uAA76\\uAA7A\\uAA80-\\uAAAF\\uAAB1\\uAAB5]|[\\uAAB6\\uAAB9-\\uAABD\\uAAC0\\uAAC2\\uAADB-\\uAADD\\uAAE0-\\uAAEA\\uAAF2-\\uAAF4]|[\\uAB01-\\uAB06\\uAB09-\\uAB0E\\uAB11-\\uAB16\\uAB20-\\uAB26\\uAB28-\\uAB2E]|[\\uABC0-\\uABE2\\uAC00-\\uD7A3\\uD7B0-\\uD7C6\\uD7CB-\\uD7FB\\uF900-\\uFA6D]|[\\uFA70-\\uFAD9\\uFB00-\\uFB06\\uFB13-\\uFB17\\uFB1D\\uFB1F-\\uFB28\\uFB2A-\\uFB36]|[\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46-\\uFBB1\\uFBD3-\\uFD3D]|[\\uFD50-\\uFD8F\\uFD92-\\uFDC7\\uFDF0-\\uFDFB\\uFE70-\\uFE74\\uFE76-\\uFEFC]|[\\uFF21-\\uFF3A\\uFF41-\\uFF5A\\uFF66-\\uFFBE\\uFFC2-\\uFFC7\\uFFCA-\\uFFCF]|[\\uFFD2-\\uFFD7\\uFFDA-\\uFFDC])/,/^(?:\\s)/,/^(?:$)/],\nconditions: {\"arg_directive\":{\"rules\":[7,8],\"inclusive\":false},\"type_directive\":{\"rules\":[6,7],\"inclusive\":false},\"open_directive\":{\"rules\":[5],\"inclusive\":false},\"callback_args\":{\"rules\":[44,45],\"inclusive\":false},\"callback_name\":{\"rules\":[41,42,43],\"inclusive\":false},\"href\":{\"rules\":[38,39],\"inclusive\":false},\"struct\":{\"rules\":[16,17,18,19,20],\"inclusive\":false},\"generic\":{\"rules\":[29,30],\"inclusive\":false},\"bqstring\":{\"rules\":[35,36],\"inclusive\":false},\"string\":{\"rules\":[32,33],\"inclusive\":false},\"INITIAL\":{\"rules\":[0,1,2,3,4,9,10,11,12,13,14,15,21,22,23,24,25,26,27,28,31,34,37,40,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71],\"inclusive\":true}}\n});\nreturn lexer;\n})();\nparser.lexer = lexer;\nfunction Parser () {\n  this.yy = {};\n}\nParser.prototype = parser;parser.Parser = Parser;\nreturn new Parser;\n})();\n\n\nif (true) {\nexports.parser = parser;\nexports.Parser = parser.Parser;\nexports.parse = function () { return parser.parse.apply(parser, arguments); };\nexports.main = function commonjsMain (args) {\n    if (!args[1]) {\n        console.log('Usage: '+args[0]+' FILE');\n        process.exit(1);\n    }\n    var source = __webpack_require__(/*! fs */ \"./node_modules/node-libs-browser/mock/empty.js\").readFileSync(__webpack_require__(/*! path */ \"./node_modules/path-browserify/index.js\").normalize(args[1]), \"utf8\");\n    return exports.parser.parse(source);\n};\nif ( true && __webpack_require__.c[__webpack_require__.s] === module) {\n  exports.main(process.argv.slice(1));\n}\n}\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../node_modules/process/browser.js */ \"./node_modules/process/browser.js\"), __webpack_require__(/*! ./../../../../node_modules/webpack/buildin/module.js */ \"./node_modules/webpack/buildin/module.js\")(module)))\n\n/***/ }),\n\n/***/ \"./src/diagrams/class/styles.js\":\n/*!**************************************!*\\\n  !*** ./src/diagrams/class/styles.js ***!\n  \\**************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\nvar getStyles = function getStyles(options) {\n  return \"g.classGroup text {\\n  fill: \".concat(options.nodeBorder, \";\\n  fill: \").concat(options.classText, \";\\n  stroke: none;\\n  font-family: \").concat(options.fontFamily, \";\\n  font-size: 10px;\\n\\n  .title {\\n    font-weight: bolder;\\n  }\\n\\n}\\n\\n.nodeLabel, .edgeLabel {\\n  color: \").concat(options.classText, \";\\n}\\n.edgeLabel .label rect {\\n  fill: \").concat(options.mainBkg, \";\\n}\\n.label text {\\n  fill: \").concat(options.classText, \";\\n}\\n.edgeLabel .label span {\\n  background: \").concat(options.mainBkg, \";\\n}\\n\\n.classTitle {\\n  font-weight: bolder;\\n}\\n.node rect,\\n  .node circle,\\n  .node ellipse,\\n  .node polygon,\\n  .node path {\\n    fill: \").concat(options.mainBkg, \";\\n    stroke: \").concat(options.nodeBorder, \";\\n    stroke-width: 1px;\\n  }\\n\\n\\n.divider {\\n  stroke: \").concat(options.nodeBorder, \";\\n  stroke: 1;\\n}\\n\\ng.clickable {\\n  cursor: pointer;\\n}\\n\\ng.classGroup rect {\\n  fill: \").concat(options.mainBkg, \";\\n  stroke: \").concat(options.nodeBorder, \";\\n}\\n\\ng.classGroup line {\\n  stroke: \").concat(options.nodeBorder, \";\\n  stroke-width: 1;\\n}\\n\\n.classLabel .box {\\n  stroke: none;\\n  stroke-width: 0;\\n  fill: \").concat(options.mainBkg, \";\\n  opacity: 0.5;\\n}\\n\\n.classLabel .label {\\n  fill: \").concat(options.nodeBorder, \";\\n  font-size: 10px;\\n}\\n\\n.relation {\\n  stroke: \").concat(options.lineColor, \";\\n  stroke-width: 1;\\n  fill: none;\\n}\\n\\n.dashed-line{\\n  stroke-dasharray: 3;\\n}\\n\\n#compositionStart, .composition {\\n  fill: \").concat(options.lineColor, \" !important;\\n  stroke: \").concat(options.lineColor, \" !important;\\n  stroke-width: 1;\\n}\\n\\n#compositionEnd, .composition {\\n  fill: \").concat(options.lineColor, \" !important;\\n  stroke: \").concat(options.lineColor, \" !important;\\n  stroke-width: 1;\\n}\\n\\n#dependencyStart, .dependency {\\n  fill: \").concat(options.lineColor, \" !important;\\n  stroke: \").concat(options.lineColor, \" !important;\\n  stroke-width: 1;\\n}\\n\\n#dependencyStart, .dependency {\\n  fill: \").concat(options.lineColor, \" !important;\\n  stroke: \").concat(options.lineColor, \" !important;\\n  stroke-width: 1;\\n}\\n\\n#extensionStart, .extension {\\n  fill: \").concat(options.lineColor, \" !important;\\n  stroke: \").concat(options.lineColor, \" !important;\\n  stroke-width: 1;\\n}\\n\\n#extensionEnd, .extension {\\n  fill: \").concat(options.lineColor, \" !important;\\n  stroke: \").concat(options.lineColor, \" !important;\\n  stroke-width: 1;\\n}\\n\\n#aggregationStart, .aggregation {\\n  fill: \").concat(options.mainBkg, \" !important;\\n  stroke: \").concat(options.lineColor, \" !important;\\n  stroke-width: 1;\\n}\\n\\n#aggregationEnd, .aggregation {\\n  fill: \").concat(options.mainBkg, \" !important;\\n  stroke: \").concat(options.lineColor, \" !important;\\n  stroke-width: 1;\\n}\\n\\n.edgeTerminals {\\n  font-size: 11px;\\n}\\n\\n\");\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (getStyles);\n\n/***/ }),\n\n/***/ \"./src/diagrams/class/svgDraw.js\":\n/*!***************************************!*\\\n  !*** ./src/diagrams/class/svgDraw.js ***!\n  \\***************************************/\n/*! exports provided: drawEdge, drawClass, parseMember, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"drawEdge\", function() { return drawEdge; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"drawClass\", function() { return drawClass; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"parseMember\", function() { return parseMember; });\n/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3 */ \"./node_modules/d3/src/index.js\");\n/* harmony import */ var _classDb__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./classDb */ \"./src/diagrams/class/classDb.js\");\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../utils */ \"./src/utils.js\");\n/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../logger */ \"./src/logger.js\");\n\n\n\n\nvar edgeCount = 0;\nvar drawEdge = function drawEdge(elem, path, relation, conf) {\n  var getRelationType = function getRelationType(type) {\n    switch (type) {\n      case _classDb__WEBPACK_IMPORTED_MODULE_1__[\"relationType\"].AGGREGATION:\n        return 'aggregation';\n\n      case _classDb__WEBPACK_IMPORTED_MODULE_1__[\"relationType\"].EXTENSION:\n        return 'extension';\n\n      case _classDb__WEBPACK_IMPORTED_MODULE_1__[\"relationType\"].COMPOSITION:\n        return 'composition';\n\n      case _classDb__WEBPACK_IMPORTED_MODULE_1__[\"relationType\"].DEPENDENCY:\n        return 'dependency';\n    }\n  };\n\n  path.points = path.points.filter(function (p) {\n    return !Number.isNaN(p.y);\n  }); // The data for our line\n\n  var lineData = path.points; // This is the accessor function we talked about above\n\n  var lineFunction = Object(d3__WEBPACK_IMPORTED_MODULE_0__[\"line\"])().x(function (d) {\n    return d.x;\n  }).y(function (d) {\n    return d.y;\n  }).curve(d3__WEBPACK_IMPORTED_MODULE_0__[\"curveBasis\"]);\n  var svgPath = elem.append('path').attr('d', lineFunction(lineData)).attr('id', 'edge' + edgeCount).attr('class', 'relation');\n  var url = '';\n\n  if (conf.arrowMarkerAbsolute) {\n    url = window.location.protocol + '//' + window.location.host + window.location.pathname + window.location.search;\n    url = url.replace(/\\(/g, '\\\\(');\n    url = url.replace(/\\)/g, '\\\\)');\n  }\n\n  if (relation.relation.lineType == 1) {\n    svgPath.attr('class', 'relation dashed-line');\n  }\n\n  if (relation.relation.type1 !== 'none') {\n    svgPath.attr('marker-start', 'url(' + url + '#' + getRelationType(relation.relation.type1) + 'Start' + ')');\n  }\n\n  if (relation.relation.type2 !== 'none') {\n    svgPath.attr('marker-end', 'url(' + url + '#' + getRelationType(relation.relation.type2) + 'End' + ')');\n  }\n\n  var x, y;\n  var l = path.points.length; // Calculate Label position\n\n  var labelPosition = _utils__WEBPACK_IMPORTED_MODULE_2__[\"default\"].calcLabelPosition(path.points);\n  x = labelPosition.x;\n  y = labelPosition.y;\n  var p1_card_x, p1_card_y;\n  var p2_card_x, p2_card_y;\n\n  if (l % 2 !== 0 && l > 1) {\n    var cardinality_1_point = _utils__WEBPACK_IMPORTED_MODULE_2__[\"default\"].calcCardinalityPosition(relation.relation.type1 !== 'none', path.points, path.points[0]);\n    var cardinality_2_point = _utils__WEBPACK_IMPORTED_MODULE_2__[\"default\"].calcCardinalityPosition(relation.relation.type2 !== 'none', path.points, path.points[l - 1]);\n    _logger__WEBPACK_IMPORTED_MODULE_3__[\"log\"].debug('cardinality_1_point ' + JSON.stringify(cardinality_1_point));\n    _logger__WEBPACK_IMPORTED_MODULE_3__[\"log\"].debug('cardinality_2_point ' + JSON.stringify(cardinality_2_point));\n    p1_card_x = cardinality_1_point.x;\n    p1_card_y = cardinality_1_point.y;\n    p2_card_x = cardinality_2_point.x;\n    p2_card_y = cardinality_2_point.y;\n  }\n\n  if (typeof relation.title !== 'undefined') {\n    var g = elem.append('g').attr('class', 'classLabel');\n    var label = g.append('text').attr('class', 'label').attr('x', x).attr('y', y).attr('fill', 'red').attr('text-anchor', 'middle').text(relation.title);\n    window.label = label;\n    var bounds = label.node().getBBox();\n    g.insert('rect', ':first-child').attr('class', 'box').attr('x', bounds.x - conf.padding / 2).attr('y', bounds.y - conf.padding / 2).attr('width', bounds.width + conf.padding).attr('height', bounds.height + conf.padding);\n  }\n\n  _logger__WEBPACK_IMPORTED_MODULE_3__[\"log\"].info('Rendering relation ' + JSON.stringify(relation));\n\n  if (typeof relation.relationTitle1 !== 'undefined' && relation.relationTitle1 !== 'none') {\n    var _g = elem.append('g').attr('class', 'cardinality');\n\n    _g.append('text').attr('class', 'type1').attr('x', p1_card_x).attr('y', p1_card_y).attr('fill', 'black').attr('font-size', '6').text(relation.relationTitle1);\n  }\n\n  if (typeof relation.relationTitle2 !== 'undefined' && relation.relationTitle2 !== 'none') {\n    var _g2 = elem.append('g').attr('class', 'cardinality');\n\n    _g2.append('text').attr('class', 'type2').attr('x', p2_card_x).attr('y', p2_card_y).attr('fill', 'black').attr('font-size', '6').text(relation.relationTitle2);\n  }\n\n  edgeCount++;\n};\nvar drawClass = function drawClass(elem, classDef, conf) {\n  _logger__WEBPACK_IMPORTED_MODULE_3__[\"log\"].info('Rendering class ' + classDef);\n  var id = classDef.id;\n  var classInfo = {\n    id: id,\n    label: classDef.id,\n    width: 0,\n    height: 0\n  }; // add class group\n\n  var g = elem.append('g').attr('id', Object(_classDb__WEBPACK_IMPORTED_MODULE_1__[\"lookUpDomId\"])(id)).attr('class', 'classGroup'); // add title\n\n  var title;\n\n  if (classDef.link) {\n    title = g.append('svg:a').attr('xlink:href', classDef.link).attr('target', classDef.linkTarget).append('text').attr('y', conf.textHeight + conf.padding).attr('x', 0);\n  } else {\n    title = g.append('text').attr('y', conf.textHeight + conf.padding).attr('x', 0);\n  } // add annotations\n\n\n  var isFirst = true;\n  classDef.annotations.forEach(function (member) {\n    var titleText2 = title.append('tspan').text('«' + member + '»');\n    if (!isFirst) titleText2.attr('dy', conf.textHeight);\n    isFirst = false;\n  });\n  var classTitleString = classDef.id;\n\n  if (classDef.type !== undefined && classDef.type !== '') {\n    classTitleString += '<' + classDef.type + '>';\n  }\n\n  var classTitle = title.append('tspan').text(classTitleString).attr('class', 'title'); // If class has annotations the title needs to have an offset of the text height\n\n  if (!isFirst) classTitle.attr('dy', conf.textHeight);\n  var titleHeight = title.node().getBBox().height;\n  var membersLine = g.append('line') // text label for the x axis\n  .attr('x1', 0).attr('y1', conf.padding + titleHeight + conf.dividerMargin / 2).attr('y2', conf.padding + titleHeight + conf.dividerMargin / 2);\n  var members = g.append('text') // text label for the x axis\n  .attr('x', conf.padding).attr('y', titleHeight + conf.dividerMargin + conf.textHeight).attr('fill', 'white').attr('class', 'classText');\n  isFirst = true;\n  classDef.members.forEach(function (member) {\n    addTspan(members, member, isFirst, conf);\n    isFirst = false;\n  });\n  var membersBox = members.node().getBBox();\n  var methodsLine = g.append('line') // text label for the x axis\n  .attr('x1', 0).attr('y1', conf.padding + titleHeight + conf.dividerMargin + membersBox.height).attr('y2', conf.padding + titleHeight + conf.dividerMargin + membersBox.height);\n  var methods = g.append('text') // text label for the x axis\n  .attr('x', conf.padding).attr('y', titleHeight + 2 * conf.dividerMargin + membersBox.height + conf.textHeight).attr('fill', 'white').attr('class', 'classText');\n  isFirst = true;\n  classDef.methods.forEach(function (method) {\n    addTspan(methods, method, isFirst, conf);\n    isFirst = false;\n  });\n  var classBox = g.node().getBBox();\n  var cssClassStr = ' ';\n\n  if (classDef.cssClasses.length > 0) {\n    cssClassStr = cssClassStr + classDef.cssClasses.join(' ');\n  }\n\n  var rect = g.insert('rect', ':first-child').attr('x', 0).attr('y', 0).attr('width', classBox.width + 2 * conf.padding).attr('height', classBox.height + conf.padding + 0.5 * conf.dividerMargin).attr('class', cssClassStr);\n  var rectWidth = rect.node().getBBox().width; // Center title\n  // We subtract the width of each text element from the class box width and divide it by 2\n\n  title.node().childNodes.forEach(function (x) {\n    x.setAttribute('x', (rectWidth - x.getBBox().width) / 2);\n  });\n\n  if (classDef.tooltip) {\n    title.insert('title').text(classDef.tooltip);\n  }\n\n  membersLine.attr('x2', rectWidth);\n  methodsLine.attr('x2', rectWidth);\n  classInfo.width = rectWidth;\n  classInfo.height = classBox.height + conf.padding + 0.5 * conf.dividerMargin;\n  return classInfo;\n};\nvar parseMember = function parseMember(text) {\n  var fieldRegEx = /^(\\+|-|~|#)?(\\w+)(~\\w+~|\\[\\])?\\s+(\\w+) *(\\*|\\$)?$/;\n  var methodRegEx = /^([+|\\-|~|#])?(\\w+) *\\( *(.*)\\) *(\\*|\\$)? *(\\w*[~|[\\]]*\\s*\\w*~?)$/;\n  var fieldMatch = text.match(fieldRegEx);\n  var methodMatch = text.match(methodRegEx);\n\n  if (fieldMatch && !methodMatch) {\n    return buildFieldDisplay(fieldMatch);\n  } else if (methodMatch) {\n    return buildMethodDisplay(methodMatch);\n  } else {\n    return buildLegacyDisplay(text);\n  }\n};\n\nvar buildFieldDisplay = function buildFieldDisplay(parsedText) {\n  var cssStyle = '';\n  var displayText = '';\n\n  try {\n    var visibility = parsedText[1] ? parsedText[1].trim() : '';\n    var fieldType = parsedText[2] ? parsedText[2].trim() : '';\n    var genericType = parsedText[3] ? parseGenericTypes(parsedText[3].trim()) : '';\n    var fieldName = parsedText[4] ? parsedText[4].trim() : '';\n    var classifier = parsedText[5] ? parsedText[5].trim() : '';\n    displayText = visibility + fieldType + genericType + ' ' + fieldName;\n    cssStyle = parseClassifier(classifier);\n  } catch (err) {\n    displayText = parsedText;\n  }\n\n  return {\n    displayText: displayText,\n    cssStyle: cssStyle\n  };\n};\n\nvar buildMethodDisplay = function buildMethodDisplay(parsedText) {\n  var cssStyle = '';\n  var displayText = '';\n\n  try {\n    var visibility = parsedText[1] ? parsedText[1].trim() : '';\n    var methodName = parsedText[2] ? parsedText[2].trim() : '';\n    var parameters = parsedText[3] ? parseGenericTypes(parsedText[3].trim()) : '';\n    var classifier = parsedText[4] ? parsedText[4].trim() : '';\n    var returnType = parsedText[5] ? ' : ' + parseGenericTypes(parsedText[5]).trim() : '';\n    displayText = visibility + methodName + '(' + parameters + ')' + returnType;\n    cssStyle = parseClassifier(classifier);\n  } catch (err) {\n    displayText = parsedText;\n  }\n\n  return {\n    displayText: displayText,\n    cssStyle: cssStyle\n  };\n};\n\nvar buildLegacyDisplay = function buildLegacyDisplay(text) {\n  // if for some reason we dont have any match, use old format to parse text\n  var displayText = '';\n  var cssStyle = '';\n  var memberText = '';\n  var returnType = '';\n  var methodStart = text.indexOf('(');\n  var methodEnd = text.indexOf(')');\n\n  if (methodStart > 1 && methodEnd > methodStart && methodEnd <= text.length) {\n    var visibility = '';\n    var methodName = '';\n    var firstChar = text.substring(0, 1);\n\n    if (firstChar.match(/\\w/)) {\n      methodName = text.substring(0, methodStart).trim();\n    } else {\n      if (firstChar.match(/\\+|-|~|#/)) {\n        visibility = firstChar;\n      }\n\n      methodName = text.substring(1, methodStart).trim();\n    }\n\n    var parameters = text.substring(methodStart + 1, methodEnd);\n    var classifier = text.substring(methodEnd + 1, 1);\n    cssStyle = parseClassifier(classifier);\n    displayText = visibility + methodName + '(' + parseGenericTypes(parameters.trim()) + ')';\n\n    if (methodEnd < memberText.length) {\n      returnType = text.substring(methodEnd + 2).trim();\n\n      if (returnType !== '') {\n        returnType = ' : ' + parseGenericTypes(returnType);\n      }\n    }\n  } else {\n    // finally - if all else fails, just send the text back as written (other than parsing for generic types)\n    displayText = parseGenericTypes(text);\n  }\n\n  return {\n    displayText: displayText,\n    cssStyle: cssStyle\n  };\n};\n\nvar addTspan = function addTspan(textEl, txt, isFirst, conf) {\n  var member = parseMember(txt);\n  var tSpan = textEl.append('tspan').attr('x', conf.padding).text(member.displayText);\n\n  if (member.cssStyle !== '') {\n    tSpan.attr('style', member.cssStyle);\n  }\n\n  if (!isFirst) {\n    tSpan.attr('dy', conf.textHeight);\n  }\n};\n\nvar parseGenericTypes = function parseGenericTypes(text) {\n  var cleanedText = text;\n\n  if (text.indexOf('~') != -1) {\n    cleanedText = cleanedText.replace('~', '<');\n    cleanedText = cleanedText.replace('~', '>');\n    return parseGenericTypes(cleanedText);\n  } else {\n    return cleanedText;\n  }\n};\n\nvar parseClassifier = function parseClassifier(classifier) {\n  switch (classifier) {\n    case '*':\n      return 'font-style:italic;';\n\n    case '$':\n      return 'text-decoration:underline;';\n\n    default:\n      return '';\n  }\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n  drawClass: drawClass,\n  drawEdge: drawEdge,\n  parseMember: parseMember\n});\n\n/***/ }),\n\n/***/ \"./src/diagrams/common/common.js\":\n/*!***************************************!*\\\n  !*** ./src/diagrams/common/common.js ***!\n  \\***************************************/\n/*! exports provided: getRows, removeScript, sanitizeText, lineBreakRegex, hasBreaks, splitBreaks, evaluate, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getRows\", function() { return getRows; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"removeScript\", function() { return removeScript; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"sanitizeText\", function() { return sanitizeText; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"lineBreakRegex\", function() { return lineBreakRegex; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"hasBreaks\", function() { return hasBreaks; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"splitBreaks\", function() { return splitBreaks; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"evaluate\", function() { return evaluate; });\n/* harmony import */ var dompurify__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! dompurify */ \"./node_modules/dompurify/dist/purify.js\");\n/* harmony import */ var dompurify__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(dompurify__WEBPACK_IMPORTED_MODULE_0__);\n\nvar getRows = function getRows(s) {\n  if (!s) return 1;\n  var str = breakToPlaceholder(s);\n  str = str.replace(/\\\\n/g, '#br#');\n  return str.split('#br#');\n};\nvar removeScript = function removeScript(txt) {\n  var rs = '';\n  var idx = 0;\n\n  while (idx >= 0) {\n    idx = txt.indexOf('<script');\n\n    if (idx >= 0) {\n      rs += txt.substr(0, idx);\n      txt = txt.substr(idx + 1);\n      idx = txt.indexOf('</script>');\n\n      if (idx >= 0) {\n        idx += 9;\n        txt = txt.substr(idx);\n      }\n    } else {\n      rs += txt;\n      idx = -1;\n      break;\n    }\n  }\n\n  rs = rs.replace(/javascript:/g, '#');\n  rs = rs.replace(/onerror=/g, 'onerror:');\n  rs = rs.replace(/<iframe/g, '');\n  return rs;\n};\n\nvar sanitizeMore = function sanitizeMore(text, config) {\n  var txt = text;\n  var htmlLabels = true;\n\n  if (config.flowchart && (config.flowchart.htmlLabels === false || config.flowchart.htmlLabels === 'false')) {\n    htmlLabels = false;\n  }\n\n  if (htmlLabels) {\n    var level = config.securityLevel;\n\n    if (level === 'antiscript') {\n      txt = removeScript(txt);\n    } else if (level !== 'loose') {\n      // eslint-disable-line\n      txt = breakToPlaceholder(txt);\n      txt = txt.replace(/</g, '&lt;').replace(/>/g, '&gt;');\n      txt = txt.replace(/=/g, '&equals;');\n      txt = placeholderToBreak(txt);\n    }\n  }\n\n  return txt;\n};\n\nvar sanitizeText = function sanitizeText(text, config) {\n  var txt = sanitizeMore(dompurify__WEBPACK_IMPORTED_MODULE_0___default.a.sanitize(text), config);\n  return txt;\n};\nvar lineBreakRegex = /<br\\s*\\/?>/gi;\nvar hasBreaks = function hasBreaks(text) {\n  return /<br\\s*[/]?>/gi.test(text);\n};\nvar splitBreaks = function splitBreaks(text) {\n  return text.split(/<br\\s*[/]?>/gi);\n};\n\nvar placeholderToBreak = function placeholderToBreak(s) {\n  return s.replace(/#br#/g, '<br/>');\n};\n\nvar breakToPlaceholder = function breakToPlaceholder(s) {\n  return s.replace(lineBreakRegex, '#br#');\n};\n\nvar getUrl = function getUrl(useAbsolute) {\n  var url = '';\n\n  if (useAbsolute) {\n    url = window.location.protocol + '//' + window.location.host + window.location.pathname + window.location.search;\n    url = url.replace(/\\(/g, '\\\\(');\n    url = url.replace(/\\)/g, '\\\\)');\n  }\n\n  return url;\n};\n\nvar evaluate = function evaluate(val) {\n  return val === 'false' || val === false ? false : true;\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n  getRows: getRows,\n  sanitizeText: sanitizeText,\n  hasBreaks: hasBreaks,\n  splitBreaks: splitBreaks,\n  lineBreakRegex: lineBreakRegex,\n  removeScript: removeScript,\n  getUrl: getUrl,\n  evaluate: evaluate\n});\n\n/***/ }),\n\n/***/ \"./src/diagrams/er/erDb.js\":\n/*!*********************************!*\\\n  !*** ./src/diagrams/er/erDb.js ***!\n  \\*********************************/\n/*! exports provided: parseDirective, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"parseDirective\", function() { return parseDirective; });\n/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../logger */ \"./src/logger.js\");\n/* harmony import */ var _mermaidAPI__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../mermaidAPI */ \"./src/mermaidAPI.js\");\n/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../config */ \"./src/config.js\");\n/**\n *\n */\n\n\n\nvar entities = {};\nvar relationships = [];\nvar title = '';\nvar Cardinality = {\n  ZERO_OR_ONE: 'ZERO_OR_ONE',\n  ZERO_OR_MORE: 'ZERO_OR_MORE',\n  ONE_OR_MORE: 'ONE_OR_MORE',\n  ONLY_ONE: 'ONLY_ONE'\n};\nvar Identification = {\n  NON_IDENTIFYING: 'NON_IDENTIFYING',\n  IDENTIFYING: 'IDENTIFYING'\n};\nvar parseDirective = function parseDirective(statement, context, type) {\n  _mermaidAPI__WEBPACK_IMPORTED_MODULE_1__[\"default\"].parseDirective(this, statement, context, type);\n};\n\nvar addEntity = function addEntity(name) {\n  if (typeof entities[name] === 'undefined') {\n    entities[name] = {\n      attributes: []\n    };\n    _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].info('Added new entity :', name);\n  }\n\n  return entities[name];\n};\n\nvar getEntities = function getEntities() {\n  return entities;\n};\n\nvar addAttributes = function addAttributes(entityName, attribs) {\n  var entity = addEntity(entityName); // May do nothing (if entity has already been added)\n  // Process attribs in reverse order due to effect of recursive construction (last attribute is first)\n\n  var i;\n\n  for (i = attribs.length - 1; i >= 0; i--) {\n    entity.attributes.push(attribs[i]);\n    _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].debug('Added attribute ', attribs[i].attributeName);\n  }\n};\n/**\n * Add a relationship\n * @param entA The first entity in the relationship\n * @param rolA The role played by the first entity in relation to the second\n * @param entB The second entity in the relationship\n * @param rSpec The details of the relationship between the two entities\n */\n\n\nvar addRelationship = function addRelationship(entA, rolA, entB, rSpec) {\n  var rel = {\n    entityA: entA,\n    roleA: rolA,\n    entityB: entB,\n    relSpec: rSpec\n  };\n  relationships.push(rel);\n  _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].debug('Added new relationship :', rel);\n};\n\nvar getRelationships = function getRelationships() {\n  return relationships;\n}; // Keep this - TODO: revisit...allow the diagram to have a title\n\n\nvar setTitle = function setTitle(txt) {\n  title = txt;\n};\n\nvar getTitle = function getTitle() {\n  return title;\n};\n\nvar clear = function clear() {\n  entities = {};\n  relationships = [];\n  title = '';\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n  Cardinality: Cardinality,\n  Identification: Identification,\n  parseDirective: parseDirective,\n  getConfig: function getConfig() {\n    return _config__WEBPACK_IMPORTED_MODULE_2__[\"getConfig\"]().er;\n  },\n  addEntity: addEntity,\n  addAttributes: addAttributes,\n  getEntities: getEntities,\n  addRelationship: addRelationship,\n  getRelationships: getRelationships,\n  clear: clear,\n  setTitle: setTitle,\n  getTitle: getTitle\n});\n\n/***/ }),\n\n/***/ \"./src/diagrams/er/erMarkers.js\":\n/*!**************************************!*\\\n  !*** ./src/diagrams/er/erMarkers.js ***!\n  \\**************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\nvar ERMarkers = {\n  ONLY_ONE_START: 'ONLY_ONE_START',\n  ONLY_ONE_END: 'ONLY_ONE_END',\n  ZERO_OR_ONE_START: 'ZERO_OR_ONE_START',\n  ZERO_OR_ONE_END: 'ZERO_OR_ONE_END',\n  ONE_OR_MORE_START: 'ONE_OR_MORE_START',\n  ONE_OR_MORE_END: 'ONE_OR_MORE_END',\n  ZERO_OR_MORE_START: 'ZERO_OR_MORE_START',\n  ZERO_OR_MORE_END: 'ZERO_OR_MORE_END'\n};\n/**\n * Put the markers into the svg DOM for later use with edge paths\n */\n\nvar insertMarkers = function insertMarkers(elem, conf) {\n  var marker;\n  elem.append('defs').append('marker').attr('id', ERMarkers.ONLY_ONE_START).attr('refX', 0).attr('refY', 9).attr('markerWidth', 18).attr('markerHeight', 18).attr('orient', 'auto').append('path').attr('stroke', conf.stroke).attr('fill', 'none').attr('d', 'M9,0 L9,18 M15,0 L15,18');\n  elem.append('defs').append('marker').attr('id', ERMarkers.ONLY_ONE_END).attr('refX', 18).attr('refY', 9).attr('markerWidth', 18).attr('markerHeight', 18).attr('orient', 'auto').append('path').attr('stroke', conf.stroke).attr('fill', 'none').attr('d', 'M3,0 L3,18 M9,0 L9,18');\n  marker = elem.append('defs').append('marker').attr('id', ERMarkers.ZERO_OR_ONE_START).attr('refX', 0).attr('refY', 9).attr('markerWidth', 30).attr('markerHeight', 18).attr('orient', 'auto');\n  marker.append('circle').attr('stroke', conf.stroke).attr('fill', 'white').attr('cx', 21).attr('cy', 9).attr('r', 6);\n  marker.append('path').attr('stroke', conf.stroke).attr('fill', 'none').attr('d', 'M9,0 L9,18');\n  marker = elem.append('defs').append('marker').attr('id', ERMarkers.ZERO_OR_ONE_END).attr('refX', 30).attr('refY', 9).attr('markerWidth', 30).attr('markerHeight', 18).attr('orient', 'auto');\n  marker.append('circle').attr('stroke', conf.stroke).attr('fill', 'white').attr('cx', 9).attr('cy', 9).attr('r', 6);\n  marker.append('path').attr('stroke', conf.stroke).attr('fill', 'none').attr('d', 'M21,0 L21,18');\n  elem.append('defs').append('marker').attr('id', ERMarkers.ONE_OR_MORE_START).attr('refX', 18).attr('refY', 18).attr('markerWidth', 45).attr('markerHeight', 36).attr('orient', 'auto').append('path').attr('stroke', conf.stroke).attr('fill', 'none').attr('d', 'M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27');\n  elem.append('defs').append('marker').attr('id', ERMarkers.ONE_OR_MORE_END).attr('refX', 27).attr('refY', 18).attr('markerWidth', 45).attr('markerHeight', 36).attr('orient', 'auto').append('path').attr('stroke', conf.stroke).attr('fill', 'none').attr('d', 'M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18');\n  marker = elem.append('defs').append('marker').attr('id', ERMarkers.ZERO_OR_MORE_START).attr('refX', 18).attr('refY', 18).attr('markerWidth', 57).attr('markerHeight', 36).attr('orient', 'auto');\n  marker.append('circle').attr('stroke', conf.stroke).attr('fill', 'white').attr('cx', 48).attr('cy', 18).attr('r', 6);\n  marker.append('path').attr('stroke', conf.stroke).attr('fill', 'none').attr('d', 'M0,18 Q18,0 36,18 Q18,36 0,18');\n  marker = elem.append('defs').append('marker').attr('id', ERMarkers.ZERO_OR_MORE_END).attr('refX', 39).attr('refY', 18).attr('markerWidth', 57).attr('markerHeight', 36).attr('orient', 'auto');\n  marker.append('circle').attr('stroke', conf.stroke).attr('fill', 'white').attr('cx', 9).attr('cy', 18).attr('r', 6);\n  marker.append('path').attr('stroke', conf.stroke).attr('fill', 'none').attr('d', 'M21,18 Q39,0 57,18 Q39,36 21,18');\n  return;\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n  ERMarkers: ERMarkers,\n  insertMarkers: insertMarkers\n});\n\n/***/ }),\n\n/***/ \"./src/diagrams/er/erRenderer.js\":\n/*!***************************************!*\\\n  !*** ./src/diagrams/er/erRenderer.js ***!\n  \\***************************************/\n/*! exports provided: setConf, draw, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"setConf\", function() { return setConf; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"draw\", function() { return draw; });\n/* harmony import */ var graphlib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! graphlib */ \"./node_modules/graphlib/index.js\");\n/* harmony import */ var graphlib__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(graphlib__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! d3 */ \"./node_modules/d3/src/index.js\");\n/* harmony import */ var _erDb__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./erDb */ \"./src/diagrams/er/erDb.js\");\n/* harmony import */ var _parser_erDiagram__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./parser/erDiagram */ \"./src/diagrams/er/parser/erDiagram.jison\");\n/* harmony import */ var _parser_erDiagram__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_parser_erDiagram__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var dagre__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! dagre */ \"./node_modules/dagre/index.js\");\n/* harmony import */ var dagre__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(dagre__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../config */ \"./src/config.js\");\n/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../logger */ \"./src/logger.js\");\n/* harmony import */ var _erMarkers__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./erMarkers */ \"./src/diagrams/er/erMarkers.js\");\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../utils */ \"./src/utils.js\");\n\n\n\n\n\n\n\n\n\nvar conf = {};\n/**\n * Allows the top-level API module to inject config specific to this renderer,\n * storing it in the local conf object. Note that generic config still needs to be\n * retrieved using getConfig() imported from the config module\n */\n\nvar setConf = function setConf(cnf) {\n  var keys = Object.keys(cnf);\n\n  for (var i = 0; i < keys.length; i++) {\n    conf[keys[i]] = cnf[keys[i]];\n  }\n};\n/**\n * Draw attributes for an entity\n * @param groupNode the svg group node for the entity\n * @param entityTextNode the svg node for the entity label text\n * @param attributes an array of attributes defined for the entity (each attribute has a type and a name)\n * @return the bounding box of the entity, after attributes have been added\n */\n\nvar drawAttributes = function drawAttributes(groupNode, entityTextNode, attributes) {\n  var heightPadding = conf.entityPadding / 3; // Padding internal to attribute boxes\n\n  var widthPadding = conf.entityPadding / 3; // Ditto\n\n  var attrFontSize = conf.fontSize * 0.85;\n  var labelBBox = entityTextNode.node().getBBox();\n  var attributeNodes = []; // Intermediate storage for attribute nodes created so that we can do a second pass\n\n  var hasKeyType = false;\n  var hasComment = false;\n  var maxWidth = 0;\n  var maxTypeWidth = 0;\n  var maxNameWidth = 0;\n  var maxKeyWidth = 0;\n  var maxCommentWidth = 0;\n  var cumulativeHeight = labelBBox.height + heightPadding * 2;\n  var attrNum = 1;\n  attributes.forEach(function (item) {\n    var attrPrefix = \"\".concat(entityTextNode.node().id, \"-attr-\").concat(attrNum);\n    var nodeWidth = 0;\n    var nodeHeight = 0; // Add a text node for the attribute type\n\n    var typeNode = groupNode.append('text').attr('class', 'er entityLabel').attr('id', \"\".concat(attrPrefix, \"-type\")).attr('x', 0).attr('y', 0).attr('dominant-baseline', 'middle').attr('text-anchor', 'left').attr('style', 'font-family: ' + Object(_config__WEBPACK_IMPORTED_MODULE_5__[\"getConfig\"])().fontFamily + '; font-size: ' + attrFontSize + 'px').text(item.attributeType); // Add a text node for the attribute name\n\n    var nameNode = groupNode.append('text').attr('class', 'er entityLabel').attr('id', \"\".concat(attrPrefix, \"-name\")).attr('x', 0).attr('y', 0).attr('dominant-baseline', 'middle').attr('text-anchor', 'left').attr('style', 'font-family: ' + Object(_config__WEBPACK_IMPORTED_MODULE_5__[\"getConfig\"])().fontFamily + '; font-size: ' + attrFontSize + 'px').text(item.attributeName);\n    var attributeNode = {};\n    attributeNode.tn = typeNode;\n    attributeNode.nn = nameNode;\n    var typeBBox = typeNode.node().getBBox();\n    var nameBBox = nameNode.node().getBBox();\n    maxTypeWidth = Math.max(maxTypeWidth, typeBBox.width);\n    maxNameWidth = Math.max(maxNameWidth, nameBBox.width);\n    nodeWidth += typeBBox.width;\n    nodeWidth += nameBBox.width;\n    nodeHeight = Math.max(typeBBox.height, nameBBox.height);\n\n    if (hasKeyType || item.attributeKeyType !== undefined) {\n      var keyTypeNode = groupNode.append('text').attr('class', 'er entityLabel').attr('id', \"\".concat(attrPrefix, \"-name\")).attr('x', 0).attr('y', 0).attr('dominant-baseline', 'middle').attr('text-anchor', 'left').attr('style', 'font-family: ' + Object(_config__WEBPACK_IMPORTED_MODULE_5__[\"getConfig\"])().fontFamily + '; font-size: ' + attrFontSize + 'px').text(item.attributeKeyType || '');\n      attributeNode.kn = keyTypeNode;\n      var keyTypeBBox = keyTypeNode.node().getBBox();\n      nodeWidth += keyTypeBBox.width;\n      maxKeyWidth = Math.max(maxKeyWidth, nodeWidth);\n      nodeHeight = Math.max(nodeHeight, keyTypeBBox.height);\n      hasKeyType = true;\n    }\n\n    if (hasComment || item.attributeComment !== undefined) {\n      var commentNode = groupNode.append('text').attr('class', 'er entityLabel').attr('id', \"\".concat(attrPrefix, \"-name\")).attr('x', 0).attr('y', 0).attr('dominant-baseline', 'middle').attr('text-anchor', 'left').attr('style', 'font-family: ' + Object(_config__WEBPACK_IMPORTED_MODULE_5__[\"getConfig\"])().fontFamily + '; font-size: ' + attrFontSize + 'px').text(item.attributeComment || '');\n      attributeNode.cn = commentNode;\n      var commentNodeBBox = commentNode.node().getBBox();\n      nodeWidth += commentNodeBBox.width;\n      maxCommentWidth = Math.max(nodeWidth, nameBBox.width);\n      nodeHeight = Math.max(nodeHeight, commentNodeBBox.height);\n      hasComment = true;\n    }\n\n    attributeNode.height = nodeHeight; // Keep a reference to the nodes so that we can iterate through them later\n\n    attributeNodes.push(attributeNode);\n    maxWidth = Math.max(maxWidth, nodeWidth);\n    cumulativeHeight += nodeHeight + heightPadding * 2;\n    attrNum += 1;\n  }); // Calculate the new bounding box of the overall entity, now that attributes have been added\n\n  var bBox = {\n    width: Math.max(conf.minEntityWidth, Math.max(labelBBox.width + conf.entityPadding * 2, maxWidth + widthPadding * 4)),\n    height: attributes.length > 0 ? cumulativeHeight : Math.max(conf.minEntityHeight, labelBBox.height + conf.entityPadding * 2)\n  }; // There might be some spare width for padding out attributes if the entity name is very long\n\n  var spareWidth = Math.max(0, bBox.width - maxWidth - widthPadding * 4);\n\n  if (attributes.length > 0) {\n    // Position the entity label near the top of the entity bounding box\n    entityTextNode.attr('transform', 'translate(' + bBox.width / 2 + ',' + (heightPadding + labelBBox.height / 2) + ')'); // Add rectangular boxes for the attribute types/names\n\n    var heightOffset = labelBBox.height + heightPadding * 2; // Start at the bottom of the entity label\n\n    var attribStyle = 'attributeBoxOdd'; // We will flip the style on alternate rows to achieve a banded effect\n\n    attributeNodes.forEach(function (attributeNode) {\n      // Calculate the alignment y co-ordinate for the type/name of the attribute\n      var alignY = heightOffset + heightPadding + attributeNode.height / 2; // Position the type of the attribute\n\n      attributeNode.tn.attr('transform', 'translate(' + widthPadding + ',' + alignY + ')'); // Insert a rectangle for the type\n\n      var typeRect = groupNode.insert('rect', '#' + attributeNode.tn.node().id).attr('class', \"er \".concat(attribStyle)).attr('fill', conf.fill).attr('fill-opacity', '100%').attr('stroke', conf.stroke).attr('x', 0).attr('y', heightOffset).attr('width', maxTypeWidth * 2 + spareWidth / 2).attr('height', attributeNode.tn.node().getBBox().height + heightPadding * 2); // Position the name of the attribute\n\n      attributeNode.nn.attr('transform', 'translate(' + (parseFloat(typeRect.attr('width')) + widthPadding) + ',' + alignY + ')'); // Insert a rectangle for the name\n\n      groupNode.insert('rect', '#' + attributeNode.nn.node().id).attr('class', \"er \".concat(attribStyle)).attr('fill', conf.fill).attr('fill-opacity', '100%').attr('stroke', conf.stroke).attr('x', \"\".concat(typeRect.attr('x') + typeRect.attr('width'))).attr('y', heightOffset).attr('width', maxNameWidth + widthPadding * 2 + spareWidth / 2).attr('height', attributeNode.nn.node().getBBox().height + heightPadding * 2);\n\n      if (hasKeyType) {\n        // Position the name of the attribute\n        attributeNode.kn.attr('transform', 'translate(' + (parseFloat(typeRect.attr('width')) + widthPadding) + ',' + alignY + ')'); // Insert a rectangle for the name\n\n        groupNode.insert('rect', '#' + attributeNode.kn.node().id).attr('class', \"er \".concat(attribStyle)).attr('fill', conf.fill).attr('fill-opacity', '100%').attr('stroke', conf.stroke).attr('x', \"\".concat(typeRect.attr('x') + typeRect.attr('width'))).attr('y', heightOffset).attr('width', maxKeyWidth + widthPadding * 2 + spareWidth / 2).attr('height', attributeNode.kn.node().getBBox().height + heightPadding * 2);\n      }\n\n      if (hasComment) {\n        // Position the name of the attribute\n        attributeNode.cn.attr('transform', 'translate(' + (parseFloat(typeRect.attr('width')) + widthPadding) + ',' + alignY + ')'); // Insert a rectangle for the name\n\n        groupNode.insert('rect', '#' + attributeNode.cn.node().id).attr('class', \"er \".concat(attribStyle)).attr('fill', conf.fill).attr('fill-opacity', '100%').attr('stroke', conf.stroke).attr('x', \"\".concat(typeRect.attr('x') + typeRect.attr('width'))).attr('y', heightOffset).attr('width', maxCommentWidth + widthPadding * 2 + spareWidth / 2).attr('height', attributeNode.cn.node().getBBox().height + heightPadding * 2);\n      } // Increment the height offset to move to the next row\n\n\n      heightOffset += attributeNode.height + heightPadding * 2; // Flip the attribute style for row banding\n\n      attribStyle = attribStyle == 'attributeBoxOdd' ? 'attributeBoxEven' : 'attributeBoxOdd';\n    });\n  } else {\n    // Ensure the entity box is a decent size without any attributes\n    bBox.height = Math.max(conf.minEntityHeight, cumulativeHeight); // Position the entity label in the middle of the box\n\n    entityTextNode.attr('transform', 'translate(' + bBox.width / 2 + ',' + bBox.height / 2 + ')');\n  }\n\n  return bBox;\n};\n/**\n * Use D3 to construct the svg elements for the entities\n * @param svgNode the svg node that contains the diagram\n * @param entities The entities to be drawn\n * @param graph The graph that contains the vertex and edge definitions post-layout\n * @return The first entity that was inserted\n */\n\n\nvar drawEntities = function drawEntities(svgNode, entities, graph) {\n  var keys = Object.keys(entities);\n  var firstOne;\n  keys.forEach(function (id) {\n    // Create a group for each entity\n    var groupNode = svgNode.append('g').attr('id', id);\n    firstOne = firstOne === undefined ? id : firstOne; // Label the entity - this is done first so that we can get the bounding box\n    // which then determines the size of the rectangle\n\n    var textId = 'entity-' + id;\n    var textNode = groupNode.append('text').attr('class', 'er entityLabel').attr('id', textId).attr('x', 0).attr('y', 0).attr('dominant-baseline', 'middle').attr('text-anchor', 'middle').attr('style', 'font-family: ' + Object(_config__WEBPACK_IMPORTED_MODULE_5__[\"getConfig\"])().fontFamily + '; font-size: ' + conf.fontSize + 'px').text(id);\n\n    var _drawAttributes = drawAttributes(groupNode, textNode, entities[id].attributes),\n        entityWidth = _drawAttributes.width,\n        entityHeight = _drawAttributes.height; // Draw the rectangle - insert it before the text so that the text is not obscured\n\n\n    var rectNode = groupNode.insert('rect', '#' + textId).attr('class', 'er entityBox').attr('fill', conf.fill).attr('fill-opacity', '100%').attr('stroke', conf.stroke).attr('x', 0).attr('y', 0).attr('width', entityWidth).attr('height', entityHeight);\n    var rectBBox = rectNode.node().getBBox(); // Add the entity to the graph\n\n    graph.setNode(id, {\n      width: rectBBox.width,\n      height: rectBBox.height,\n      shape: 'rect',\n      id: id\n    });\n  });\n  return firstOne;\n}; // drawEntities\n\n\nvar adjustEntities = function adjustEntities(svgNode, graph) {\n  graph.nodes().forEach(function (v) {\n    if (typeof v !== 'undefined' && typeof graph.node(v) !== 'undefined') {\n      svgNode.select('#' + v).attr('transform', 'translate(' + (graph.node(v).x - graph.node(v).width / 2) + ',' + (graph.node(v).y - graph.node(v).height / 2) + ' )');\n    }\n  });\n  return;\n};\n\nvar getEdgeName = function getEdgeName(rel) {\n  return (rel.entityA + rel.roleA + rel.entityB).replace(/\\s/g, '');\n};\n/**\n * Add each relationship to the graph\n * @param relationships the relationships to be added\n * @param g the graph\n * @return {Array} The array of relationships\n */\n\n\nvar addRelationships = function addRelationships(relationships, g) {\n  relationships.forEach(function (r) {\n    g.setEdge(r.entityA, r.entityB, {\n      relationship: r\n    }, getEdgeName(r));\n  });\n  return relationships;\n}; // addRelationships\n\n\nvar relCnt = 0;\n/**\n * Draw a relationship using edge information from the graph\n * @param svg the svg node\n * @param rel the relationship to draw in the svg\n * @param g the graph containing the edge information\n * @param insert the insertion point in the svg DOM (because relationships have markers that need to sit 'behind' opaque entity boxes)\n */\n\nvar drawRelationshipFromLayout = function drawRelationshipFromLayout(svg, rel, g, insert) {\n  relCnt++; // Find the edge relating to this relationship\n\n  var edge = g.edge(rel.entityA, rel.entityB, getEdgeName(rel)); // Get a function that will generate the line path\n\n  var lineFunction = Object(d3__WEBPACK_IMPORTED_MODULE_1__[\"line\"])().x(function (d) {\n    return d.x;\n  }).y(function (d) {\n    return d.y;\n  }).curve(d3__WEBPACK_IMPORTED_MODULE_1__[\"curveBasis\"]); // Insert the line at the right place\n\n  var svgPath = svg.insert('path', '#' + insert).attr('class', 'er relationshipLine').attr('d', lineFunction(edge.points)).attr('stroke', conf.stroke).attr('fill', 'none'); // ...and with dashes if necessary\n\n  if (rel.relSpec.relType === _erDb__WEBPACK_IMPORTED_MODULE_2__[\"default\"].Identification.NON_IDENTIFYING) {\n    svgPath.attr('stroke-dasharray', '8,8');\n  } // TODO: Understand this better\n\n\n  var url = '';\n\n  if (conf.arrowMarkerAbsolute) {\n    url = window.location.protocol + '//' + window.location.host + window.location.pathname + window.location.search;\n    url = url.replace(/\\(/g, '\\\\(');\n    url = url.replace(/\\)/g, '\\\\)');\n  } // Decide which start and end markers it needs. It may be possible to be more concise here\n  // by reversing a start marker to make an end marker...but this will do for now\n  // Note that the 'A' entity's marker is at the end of the relationship and the 'B' entity's marker is at the start\n\n\n  switch (rel.relSpec.cardA) {\n    case _erDb__WEBPACK_IMPORTED_MODULE_2__[\"default\"].Cardinality.ZERO_OR_ONE:\n      svgPath.attr('marker-end', 'url(' + url + '#' + _erMarkers__WEBPACK_IMPORTED_MODULE_7__[\"default\"].ERMarkers.ZERO_OR_ONE_END + ')');\n      break;\n\n    case _erDb__WEBPACK_IMPORTED_MODULE_2__[\"default\"].Cardinality.ZERO_OR_MORE:\n      svgPath.attr('marker-end', 'url(' + url + '#' + _erMarkers__WEBPACK_IMPORTED_MODULE_7__[\"default\"].ERMarkers.ZERO_OR_MORE_END + ')');\n      break;\n\n    case _erDb__WEBPACK_IMPORTED_MODULE_2__[\"default\"].Cardinality.ONE_OR_MORE:\n      svgPath.attr('marker-end', 'url(' + url + '#' + _erMarkers__WEBPACK_IMPORTED_MODULE_7__[\"default\"].ERMarkers.ONE_OR_MORE_END + ')');\n      break;\n\n    case _erDb__WEBPACK_IMPORTED_MODULE_2__[\"default\"].Cardinality.ONLY_ONE:\n      svgPath.attr('marker-end', 'url(' + url + '#' + _erMarkers__WEBPACK_IMPORTED_MODULE_7__[\"default\"].ERMarkers.ONLY_ONE_END + ')');\n      break;\n  }\n\n  switch (rel.relSpec.cardB) {\n    case _erDb__WEBPACK_IMPORTED_MODULE_2__[\"default\"].Cardinality.ZERO_OR_ONE:\n      svgPath.attr('marker-start', 'url(' + url + '#' + _erMarkers__WEBPACK_IMPORTED_MODULE_7__[\"default\"].ERMarkers.ZERO_OR_ONE_START + ')');\n      break;\n\n    case _erDb__WEBPACK_IMPORTED_MODULE_2__[\"default\"].Cardinality.ZERO_OR_MORE:\n      svgPath.attr('marker-start', 'url(' + url + '#' + _erMarkers__WEBPACK_IMPORTED_MODULE_7__[\"default\"].ERMarkers.ZERO_OR_MORE_START + ')');\n      break;\n\n    case _erDb__WEBPACK_IMPORTED_MODULE_2__[\"default\"].Cardinality.ONE_OR_MORE:\n      svgPath.attr('marker-start', 'url(' + url + '#' + _erMarkers__WEBPACK_IMPORTED_MODULE_7__[\"default\"].ERMarkers.ONE_OR_MORE_START + ')');\n      break;\n\n    case _erDb__WEBPACK_IMPORTED_MODULE_2__[\"default\"].Cardinality.ONLY_ONE:\n      svgPath.attr('marker-start', 'url(' + url + '#' + _erMarkers__WEBPACK_IMPORTED_MODULE_7__[\"default\"].ERMarkers.ONLY_ONE_START + ')');\n      break;\n  } // Now label the relationship\n  // Find the half-way point\n\n\n  var len = svgPath.node().getTotalLength();\n  var labelPoint = svgPath.node().getPointAtLength(len * 0.5); // Append a text node containing the label\n\n  var labelId = 'rel' + relCnt;\n  var labelNode = svg.append('text').attr('class', 'er relationshipLabel').attr('id', labelId).attr('x', labelPoint.x).attr('y', labelPoint.y).attr('text-anchor', 'middle').attr('dominant-baseline', 'middle').attr('style', 'font-family: ' + Object(_config__WEBPACK_IMPORTED_MODULE_5__[\"getConfig\"])().fontFamily + '; font-size: ' + conf.fontSize + 'px').text(rel.roleA); // Figure out how big the opaque 'container' rectangle needs to be\n\n  var labelBBox = labelNode.node().getBBox(); // Insert the opaque rectangle before the text label\n\n  svg.insert('rect', '#' + labelId).attr('class', 'er relationshipLabelBox').attr('x', labelPoint.x - labelBBox.width / 2).attr('y', labelPoint.y - labelBBox.height / 2).attr('width', labelBBox.width).attr('height', labelBBox.height).attr('fill', 'white').attr('fill-opacity', '85%');\n  return;\n};\n/**\n * Draw en E-R diagram in the tag with id: id based on the text definition of the diagram\n * @param text the text of the diagram\n * @param id the unique id of the DOM node that contains the diagram\n */\n\n\nvar draw = function draw(text, id) {\n  _logger__WEBPACK_IMPORTED_MODULE_6__[\"log\"].info('Drawing ER diagram');\n  _erDb__WEBPACK_IMPORTED_MODULE_2__[\"default\"].clear();\n  var parser = _parser_erDiagram__WEBPACK_IMPORTED_MODULE_3___default.a.parser;\n  parser.yy = _erDb__WEBPACK_IMPORTED_MODULE_2__[\"default\"]; // Parse the text to populate erDb\n\n  try {\n    parser.parse(text);\n  } catch (err) {\n    _logger__WEBPACK_IMPORTED_MODULE_6__[\"log\"].debug('Parsing failed');\n  } // Get a reference to the svg node that contains the text\n\n\n  var svg = Object(d3__WEBPACK_IMPORTED_MODULE_1__[\"select\"])(\"[id='\".concat(id, \"']\")); // Add cardinality marker definitions to the svg\n\n  _erMarkers__WEBPACK_IMPORTED_MODULE_7__[\"default\"].insertMarkers(svg, conf); // Now we have to construct the diagram in a specific way:\n  // ---\n  // 1. Create all the entities in the svg node at 0,0, but with the correct dimensions (allowing for text content)\n  // 2. Make sure they are all added to the graph\n  // 3. Add all the edges (relationships) to the graph aswell\n  // 4. Let dagre do its magic to layout the graph.  This assigns:\n  //    - the centre co-ordinates for each node, bearing in mind the dimensions and edge relationships\n  //    - the path co-ordinates for each edge\n  //    But it has no impact on the svg child nodes - the diagram remains with every entity rooted at 0,0\n  // 5. Now assign a transform to each entity in the svg node so that it gets drawn in the correct place, as determined by\n  //    its centre point, which is obtained from the graph, and it's width and height\n  // 6. And finally, create all the edges in the svg node using information from the graph\n  // ---\n  // Create the graph\n\n  var g; // TODO: Explore directed vs undirected graphs, and how the layout is affected\n  // An E-R diagram could be said to be undirected, but there is merit in setting\n  // the direction from parent to child in a one-to-many as this influences graphlib to\n  // put the parent above the child (does it?), which is intuitive.  Most relationships\n  // in ER diagrams are one-to-many.\n\n  g = new graphlib__WEBPACK_IMPORTED_MODULE_0___default.a.Graph({\n    multigraph: true,\n    directed: true,\n    compound: false\n  }).setGraph({\n    rankdir: conf.layoutDirection,\n    marginx: 20,\n    marginy: 20,\n    nodesep: 100,\n    edgesep: 100,\n    ranksep: 100\n  }).setDefaultEdgeLabel(function () {\n    return {};\n  }); // Draw the entities (at 0,0), returning the first svg node that got\n  // inserted - this represents the insertion point for relationship paths\n\n  var firstEntity = drawEntities(svg, _erDb__WEBPACK_IMPORTED_MODULE_2__[\"default\"].getEntities(), g); // TODO: externalise the addition of entities to the graph - it's a bit 'buried' in the above\n  // Add all the relationships to the graph\n\n  var relationships = addRelationships(_erDb__WEBPACK_IMPORTED_MODULE_2__[\"default\"].getRelationships(), g);\n  dagre__WEBPACK_IMPORTED_MODULE_4___default.a.layout(g); // Node and edge positions will be updated\n  // Adjust the positions of the entities so that they adhere to the layout\n\n  adjustEntities(svg, g); // Draw the relationships\n\n  relationships.forEach(function (rel) {\n    drawRelationshipFromLayout(svg, rel, g, firstEntity);\n  });\n  var padding = conf.diagramPadding;\n  var svgBounds = svg.node().getBBox();\n  var width = svgBounds.width + padding * 2;\n  var height = svgBounds.height + padding * 2;\n  Object(_utils__WEBPACK_IMPORTED_MODULE_8__[\"configureSvgSize\"])(svg, height, width, conf.useMaxWidth);\n  svg.attr('viewBox', \"\".concat(svgBounds.x - padding, \" \").concat(svgBounds.y - padding, \" \").concat(width, \" \").concat(height));\n}; // draw\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n  setConf: setConf,\n  draw: draw\n});\n\n/***/ }),\n\n/***/ \"./src/diagrams/er/parser/erDiagram.jison\":\n/*!************************************************!*\\\n  !*** ./src/diagrams/er/parser/erDiagram.jison ***!\n  \\************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n/* WEBPACK VAR INJECTION */(function(process, module) {/* parser generated by jison 0.4.18 */\n/*\n  Returns a Parser object of the following structure:\n\n  Parser: {\n    yy: {}\n  }\n\n  Parser.prototype: {\n    yy: {},\n    trace: function(),\n    symbols_: {associative list: name ==> number},\n    terminals_: {associative list: number ==> name},\n    productions_: [...],\n    performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$),\n    table: [...],\n    defaultActions: {...},\n    parseError: function(str, hash),\n    parse: function(input),\n\n    lexer: {\n        EOF: 1,\n        parseError: function(str, hash),\n        setInput: function(input),\n        input: function(),\n        unput: function(str),\n        more: function(),\n        less: function(n),\n        pastInput: function(),\n        upcomingInput: function(),\n        showPosition: function(),\n        test_match: function(regex_match_array, rule_index),\n        next: function(),\n        lex: function(),\n        begin: function(condition),\n        popState: function(),\n        _currentRules: function(),\n        topState: function(),\n        pushState: function(condition),\n\n        options: {\n            ranges: boolean           (optional: true ==> token location info will include a .range[] member)\n            flex: boolean             (optional: true ==> flex-like lexing behaviour where the rules are tested exhaustively to find the longest match)\n            backtrack_lexer: boolean  (optional: true ==> lexer regexes are tested in order and for each matching regex the action code is invoked; the lexer terminates the scan when a token is returned by the action code)\n        },\n\n        performAction: function(yy, yy_, $avoiding_name_collisions, YY_START),\n        rules: [...],\n        conditions: {associative list: name ==> set},\n    }\n  }\n\n\n  token location info (@$, _$, etc.): {\n    first_line: n,\n    last_line: n,\n    first_column: n,\n    last_column: n,\n    range: [start_number, end_number]       (where the numbers are indexes into the input string, regular zero-based)\n  }\n\n\n  the parseError function receives a 'hash' object with these members for lexer and parser errors: {\n    text:        (matched text)\n    token:       (the produced terminal token, if any)\n    line:        (yylineno)\n  }\n  while parser (grammar) errors will also provide these members, i.e. parser errors deliver a superset of attributes: {\n    loc:         (yylloc)\n    expected:    (string describing the set of expected tokens)\n    recoverable: (boolean: TRUE when the parser has a error recovery rule available for this particular error)\n  }\n*/\nvar parser = (function(){\nvar o=function(k,v,o,l){for(o=o||{},l=k.length;l--;o[k[l]]=v);return o},$V0=[1,2],$V1=[1,5],$V2=[6,9,11,23,40],$V3=[1,17],$V4=[1,20],$V5=[1,25],$V6=[1,26],$V7=[1,27],$V8=[1,28],$V9=[1,37],$Va=[23,37,38],$Vb=[4,6,9,11,23,40],$Vc=[33,34,35,36],$Vd=[22,29];\nvar parser = {trace: function trace () { },\nyy: {},\nsymbols_: {\"error\":2,\"start\":3,\"ER_DIAGRAM\":4,\"document\":5,\"EOF\":6,\"directive\":7,\"line\":8,\"SPACE\":9,\"statement\":10,\"NEWLINE\":11,\"openDirective\":12,\"typeDirective\":13,\"closeDirective\":14,\":\":15,\"argDirective\":16,\"entityName\":17,\"relSpec\":18,\"role\":19,\"BLOCK_START\":20,\"attributes\":21,\"BLOCK_STOP\":22,\"ALPHANUM\":23,\"attribute\":24,\"attributeType\":25,\"attributeName\":26,\"attributeKeyType\":27,\"COMMENT\":28,\"ATTRIBUTE_WORD\":29,\"ATTRIBUTE_KEY\":30,\"cardinality\":31,\"relType\":32,\"ZERO_OR_ONE\":33,\"ZERO_OR_MORE\":34,\"ONE_OR_MORE\":35,\"ONLY_ONE\":36,\"NON_IDENTIFYING\":37,\"IDENTIFYING\":38,\"WORD\":39,\"open_directive\":40,\"type_directive\":41,\"arg_directive\":42,\"close_directive\":43,\"$accept\":0,\"$end\":1},\nterminals_: {2:\"error\",4:\"ER_DIAGRAM\",6:\"EOF\",9:\"SPACE\",11:\"NEWLINE\",15:\":\",20:\"BLOCK_START\",22:\"BLOCK_STOP\",23:\"ALPHANUM\",28:\"COMMENT\",29:\"ATTRIBUTE_WORD\",30:\"ATTRIBUTE_KEY\",33:\"ZERO_OR_ONE\",34:\"ZERO_OR_MORE\",35:\"ONE_OR_MORE\",36:\"ONLY_ONE\",37:\"NON_IDENTIFYING\",38:\"IDENTIFYING\",39:\"WORD\",40:\"open_directive\",41:\"type_directive\",42:\"arg_directive\",43:\"close_directive\"},\nproductions_: [0,[3,3],[3,2],[5,0],[5,2],[8,2],[8,1],[8,1],[8,1],[7,4],[7,6],[10,1],[10,5],[10,4],[10,3],[10,1],[17,1],[21,1],[21,2],[24,2],[24,3],[24,3],[24,4],[25,1],[26,1],[27,1],[18,3],[31,1],[31,1],[31,1],[31,1],[32,1],[32,1],[19,1],[19,1],[12,1],[13,1],[16,1],[14,1]],\nperformAction: function anonymous(yytext, yyleng, yylineno, yy, yystate /* action[1] */, $$ /* vstack */, _$ /* lstack */) {\n/* this == yyval */\n\nvar $0 = $$.length - 1;\nswitch (yystate) {\ncase 1:\n /*console.log('finished parsing');*/ \nbreak;\ncase 3:\n this.$ = [] \nbreak;\ncase 4:\n$$[$0-1].push($$[$0]);this.$ = $$[$0-1]\nbreak;\ncase 5: case 6:\n this.$ = $$[$0] \nbreak;\ncase 7: case 8:\n this.$=[];\nbreak;\ncase 12:\n\n          yy.addEntity($$[$0-4]);\n          yy.addEntity($$[$0-2]);\n          yy.addRelationship($$[$0-4], $$[$0], $$[$0-2], $$[$0-3]);\n          /*console.log($$[$0-4] + $$[$0-3] + $$[$0-2] + ':' + $$[$0]);*/\n      \nbreak;\ncase 13:\n\n          /* console.log('detected block'); */\n          yy.addEntity($$[$0-3]);\n          yy.addAttributes($$[$0-3], $$[$0-1]);\n          /* console.log('handled block'); */\n      \nbreak;\ncase 14:\n yy.addEntity($$[$0-2]); \nbreak;\ncase 15:\n yy.addEntity($$[$0]); \nbreak;\ncase 16:\n this.$ = $$[$0]; /*console.log('Entity: ' + $$[$0]);*/ \nbreak;\ncase 17:\n this.$ = [$$[$0]]; \nbreak;\ncase 18:\n $$[$0].push($$[$0-1]); this.$=$$[$0]; \nbreak;\ncase 19:\n this.$ = { attributeType: $$[$0-1], attributeName: $$[$0] }; \nbreak;\ncase 20:\n this.$ = { attributeType: $$[$0-2], attributeName: $$[$0-1], attributeKeyType: $$[$0] }; \nbreak;\ncase 21:\n this.$ = { attributeType: $$[$0-2], attributeName: $$[$0-1], attributeComment: $$[$0] }; \nbreak;\ncase 22:\n this.$ = { attributeType: $$[$0-3], attributeName: $$[$0-2], attributeKeyType: $$[$0-1], attributeComment: $$[$0] }; \nbreak;\ncase 23: case 24: case 25:\n this.$=$$[$0]; \nbreak;\ncase 26:\n\n        this.$ = { cardA: $$[$0], relType: $$[$0-1], cardB: $$[$0-2] };\n        /*console.log('relSpec: ' + $$[$0] + $$[$0-1] + $$[$0-2]);*/\n      \nbreak;\ncase 27:\n this.$ = yy.Cardinality.ZERO_OR_ONE; \nbreak;\ncase 28:\n this.$ = yy.Cardinality.ZERO_OR_MORE; \nbreak;\ncase 29:\n this.$ = yy.Cardinality.ONE_OR_MORE; \nbreak;\ncase 30:\n this.$ = yy.Cardinality.ONLY_ONE; \nbreak;\ncase 31:\n this.$ = yy.Identification.NON_IDENTIFYING;  \nbreak;\ncase 32:\n this.$ = yy.Identification.IDENTIFYING; \nbreak;\ncase 33:\n this.$ = $$[$0].replace(/\"/g, ''); \nbreak;\ncase 34:\n this.$ = $$[$0]; \nbreak;\ncase 35:\n yy.parseDirective('%%{', 'open_directive'); \nbreak;\ncase 36:\n yy.parseDirective($$[$0], 'type_directive'); \nbreak;\ncase 37:\n $$[$0] = $$[$0].trim().replace(/'/g, '\"'); yy.parseDirective($$[$0], 'arg_directive'); \nbreak;\ncase 38:\n yy.parseDirective('}%%', 'close_directive', 'er'); \nbreak;\n}\n},\ntable: [{3:1,4:$V0,7:3,12:4,40:$V1},{1:[3]},o($V2,[2,3],{5:6}),{3:7,4:$V0,7:3,12:4,40:$V1},{13:8,41:[1,9]},{41:[2,35]},{6:[1,10],7:15,8:11,9:[1,12],10:13,11:[1,14],12:4,17:16,23:$V3,40:$V1},{1:[2,2]},{14:18,15:[1,19],43:$V4},o([15,43],[2,36]),o($V2,[2,8],{1:[2,1]}),o($V2,[2,4]),{7:15,10:21,12:4,17:16,23:$V3,40:$V1},o($V2,[2,6]),o($V2,[2,7]),o($V2,[2,11]),o($V2,[2,15],{18:22,31:24,20:[1,23],33:$V5,34:$V6,35:$V7,36:$V8}),o([6,9,11,15,20,23,33,34,35,36,40],[2,16]),{11:[1,29]},{16:30,42:[1,31]},{11:[2,38]},o($V2,[2,5]),{17:32,23:$V3},{21:33,22:[1,34],24:35,25:36,29:$V9},{32:38,37:[1,39],38:[1,40]},o($Va,[2,27]),o($Va,[2,28]),o($Va,[2,29]),o($Va,[2,30]),o($Vb,[2,9]),{14:41,43:$V4},{43:[2,37]},{15:[1,42]},{22:[1,43]},o($V2,[2,14]),{21:44,22:[2,17],24:35,25:36,29:$V9},{26:45,29:[1,46]},{29:[2,23]},{31:47,33:$V5,34:$V6,35:$V7,36:$V8},o($Vc,[2,31]),o($Vc,[2,32]),{11:[1,48]},{19:49,23:[1,51],39:[1,50]},o($V2,[2,13]),{22:[2,18]},o($Vd,[2,19],{27:52,28:[1,53],30:[1,54]}),o([22,28,29,30],[2,24]),{23:[2,26]},o($Vb,[2,10]),o($V2,[2,12]),o($V2,[2,33]),o($V2,[2,34]),o($Vd,[2,20],{28:[1,55]}),o($Vd,[2,21]),o([22,28,29],[2,25]),o($Vd,[2,22])],\ndefaultActions: {5:[2,35],7:[2,2],20:[2,38],31:[2,37],37:[2,23],44:[2,18],47:[2,26]},\nparseError: function parseError (str, hash) {\n    if (hash.recoverable) {\n        this.trace(str);\n    } else {\n        var error = new Error(str);\n        error.hash = hash;\n        throw error;\n    }\n},\nparse: function parse(input) {\n    var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = '', yylineno = 0, yyleng = 0, recovering = 0, TERROR = 2, EOF = 1;\n    var args = lstack.slice.call(arguments, 1);\n    var lexer = Object.create(this.lexer);\n    var sharedState = { yy: {} };\n    for (var k in this.yy) {\n        if (Object.prototype.hasOwnProperty.call(this.yy, k)) {\n            sharedState.yy[k] = this.yy[k];\n        }\n    }\n    lexer.setInput(input, sharedState.yy);\n    sharedState.yy.lexer = lexer;\n    sharedState.yy.parser = this;\n    if (typeof lexer.yylloc == 'undefined') {\n        lexer.yylloc = {};\n    }\n    var yyloc = lexer.yylloc;\n    lstack.push(yyloc);\n    var ranges = lexer.options && lexer.options.ranges;\n    if (typeof sharedState.yy.parseError === 'function') {\n        this.parseError = sharedState.yy.parseError;\n    } else {\n        this.parseError = Object.getPrototypeOf(this).parseError;\n    }\n    function popStack(n) {\n        stack.length = stack.length - 2 * n;\n        vstack.length = vstack.length - n;\n        lstack.length = lstack.length - n;\n    }\n            function lex() {\n            var token;\n            token = tstack.pop() || lexer.lex() || EOF;\n            if (typeof token !== 'number') {\n                if (token instanceof Array) {\n                    tstack = token;\n                    token = tstack.pop();\n                }\n                token = self.symbols_[token] || token;\n            }\n            return token;\n        }\n    var symbol, preErrorSymbol, state, action, a, r, yyval = {}, p, len, newState, expected;\n    while (true) {\n        state = stack[stack.length - 1];\n        if (this.defaultActions[state]) {\n            action = this.defaultActions[state];\n        } else {\n            if (symbol === null || typeof symbol == 'undefined') {\n                symbol = lex();\n            }\n            action = table[state] && table[state][symbol];\n        }\n        if (typeof action === 'undefined' || !action.length || !action[0]) {\n            var errStr = '';\n            expected = [];\n            for (p in table[state]) {\n                if (this.terminals_[p] && p > TERROR) {\n                    expected.push('\\'' + this.terminals_[p] + '\\'');\n                }\n            }\n            if (lexer.showPosition) {\n                errStr = 'Parse error on line ' + (yylineno + 1) + ':\\n' + lexer.showPosition() + '\\nExpecting ' + expected.join(', ') + ', got \\'' + (this.terminals_[symbol] || symbol) + '\\'';\n            } else {\n                errStr = 'Parse error on line ' + (yylineno + 1) + ': Unexpected ' + (symbol == EOF ? 'end of input' : '\\'' + (this.terminals_[symbol] || symbol) + '\\'');\n            }\n            this.parseError(errStr, {\n                text: lexer.match,\n                token: this.terminals_[symbol] || symbol,\n                line: lexer.yylineno,\n                loc: yyloc,\n                expected: expected\n            });\n        }\n        if (action[0] instanceof Array && action.length > 1) {\n            throw new Error('Parse Error: multiple actions possible at state: ' + state + ', token: ' + symbol);\n        }\n        switch (action[0]) {\n        case 1:\n            stack.push(symbol);\n            vstack.push(lexer.yytext);\n            lstack.push(lexer.yylloc);\n            stack.push(action[1]);\n            symbol = null;\n            if (!preErrorSymbol) {\n                yyleng = lexer.yyleng;\n                yytext = lexer.yytext;\n                yylineno = lexer.yylineno;\n                yyloc = lexer.yylloc;\n                if (recovering > 0) {\n                    recovering--;\n                }\n            } else {\n                symbol = preErrorSymbol;\n                preErrorSymbol = null;\n            }\n            break;\n        case 2:\n            len = this.productions_[action[1]][1];\n            yyval.$ = vstack[vstack.length - len];\n            yyval._$ = {\n                first_line: lstack[lstack.length - (len || 1)].first_line,\n                last_line: lstack[lstack.length - 1].last_line,\n                first_column: lstack[lstack.length - (len || 1)].first_column,\n                last_column: lstack[lstack.length - 1].last_column\n            };\n            if (ranges) {\n                yyval._$.range = [\n                    lstack[lstack.length - (len || 1)].range[0],\n                    lstack[lstack.length - 1].range[1]\n                ];\n            }\n            r = this.performAction.apply(yyval, [\n                yytext,\n                yyleng,\n                yylineno,\n                sharedState.yy,\n                action[1],\n                vstack,\n                lstack\n            ].concat(args));\n            if (typeof r !== 'undefined') {\n                return r;\n            }\n            if (len) {\n                stack = stack.slice(0, -1 * len * 2);\n                vstack = vstack.slice(0, -1 * len);\n                lstack = lstack.slice(0, -1 * len);\n            }\n            stack.push(this.productions_[action[1]][0]);\n            vstack.push(yyval.$);\n            lstack.push(yyval._$);\n            newState = table[stack[stack.length - 2]][stack[stack.length - 1]];\n            stack.push(newState);\n            break;\n        case 3:\n            return true;\n        }\n    }\n    return true;\n}};\n\n/* generated by jison-lex 0.3.4 */\nvar lexer = (function(){\nvar lexer = ({\n\nEOF:1,\n\nparseError:function parseError(str, hash) {\n        if (this.yy.parser) {\n            this.yy.parser.parseError(str, hash);\n        } else {\n            throw new Error(str);\n        }\n    },\n\n// resets the lexer, sets new input\nsetInput:function (input, yy) {\n        this.yy = yy || this.yy || {};\n        this._input = input;\n        this._more = this._backtrack = this.done = false;\n        this.yylineno = this.yyleng = 0;\n        this.yytext = this.matched = this.match = '';\n        this.conditionStack = ['INITIAL'];\n        this.yylloc = {\n            first_line: 1,\n            first_column: 0,\n            last_line: 1,\n            last_column: 0\n        };\n        if (this.options.ranges) {\n            this.yylloc.range = [0,0];\n        }\n        this.offset = 0;\n        return this;\n    },\n\n// consumes and returns one char from the input\ninput:function () {\n        var ch = this._input[0];\n        this.yytext += ch;\n        this.yyleng++;\n        this.offset++;\n        this.match += ch;\n        this.matched += ch;\n        var lines = ch.match(/(?:\\r\\n?|\\n).*/g);\n        if (lines) {\n            this.yylineno++;\n            this.yylloc.last_line++;\n        } else {\n            this.yylloc.last_column++;\n        }\n        if (this.options.ranges) {\n            this.yylloc.range[1]++;\n        }\n\n        this._input = this._input.slice(1);\n        return ch;\n    },\n\n// unshifts one char (or a string) into the input\nunput:function (ch) {\n        var len = ch.length;\n        var lines = ch.split(/(?:\\r\\n?|\\n)/g);\n\n        this._input = ch + this._input;\n        this.yytext = this.yytext.substr(0, this.yytext.length - len);\n        //this.yyleng -= len;\n        this.offset -= len;\n        var oldLines = this.match.split(/(?:\\r\\n?|\\n)/g);\n        this.match = this.match.substr(0, this.match.length - 1);\n        this.matched = this.matched.substr(0, this.matched.length - 1);\n\n        if (lines.length - 1) {\n            this.yylineno -= lines.length - 1;\n        }\n        var r = this.yylloc.range;\n\n        this.yylloc = {\n            first_line: this.yylloc.first_line,\n            last_line: this.yylineno + 1,\n            first_column: this.yylloc.first_column,\n            last_column: lines ?\n                (lines.length === oldLines.length ? this.yylloc.first_column : 0)\n                 + oldLines[oldLines.length - lines.length].length - lines[0].length :\n              this.yylloc.first_column - len\n        };\n\n        if (this.options.ranges) {\n            this.yylloc.range = [r[0], r[0] + this.yyleng - len];\n        }\n        this.yyleng = this.yytext.length;\n        return this;\n    },\n\n// When called from action, caches matched text and appends it on next action\nmore:function () {\n        this._more = true;\n        return this;\n    },\n\n// When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead.\nreject:function () {\n        if (this.options.backtrack_lexer) {\n            this._backtrack = true;\n        } else {\n            return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\\n' + this.showPosition(), {\n                text: \"\",\n                token: null,\n                line: this.yylineno\n            });\n\n        }\n        return this;\n    },\n\n// retain first n characters of the match\nless:function (n) {\n        this.unput(this.match.slice(n));\n    },\n\n// displays already matched input, i.e. for error messages\npastInput:function () {\n        var past = this.matched.substr(0, this.matched.length - this.match.length);\n        return (past.length > 20 ? '...':'') + past.substr(-20).replace(/\\n/g, \"\");\n    },\n\n// displays upcoming input, i.e. for error messages\nupcomingInput:function () {\n        var next = this.match;\n        if (next.length < 20) {\n            next += this._input.substr(0, 20-next.length);\n        }\n        return (next.substr(0,20) + (next.length > 20 ? '...' : '')).replace(/\\n/g, \"\");\n    },\n\n// displays the character position where the lexing error occurred, i.e. for error messages\nshowPosition:function () {\n        var pre = this.pastInput();\n        var c = new Array(pre.length + 1).join(\"-\");\n        return pre + this.upcomingInput() + \"\\n\" + c + \"^\";\n    },\n\n// test the lexed token: return FALSE when not a match, otherwise return token\ntest_match:function(match, indexed_rule) {\n        var token,\n            lines,\n            backup;\n\n        if (this.options.backtrack_lexer) {\n            // save context\n            backup = {\n                yylineno: this.yylineno,\n                yylloc: {\n                    first_line: this.yylloc.first_line,\n                    last_line: this.last_line,\n                    first_column: this.yylloc.first_column,\n                    last_column: this.yylloc.last_column\n                },\n                yytext: this.yytext,\n                match: this.match,\n                matches: this.matches,\n                matched: this.matched,\n                yyleng: this.yyleng,\n                offset: this.offset,\n                _more: this._more,\n                _input: this._input,\n                yy: this.yy,\n                conditionStack: this.conditionStack.slice(0),\n                done: this.done\n            };\n            if (this.options.ranges) {\n                backup.yylloc.range = this.yylloc.range.slice(0);\n            }\n        }\n\n        lines = match[0].match(/(?:\\r\\n?|\\n).*/g);\n        if (lines) {\n            this.yylineno += lines.length;\n        }\n        this.yylloc = {\n            first_line: this.yylloc.last_line,\n            last_line: this.yylineno + 1,\n            first_column: this.yylloc.last_column,\n            last_column: lines ?\n                         lines[lines.length - 1].length - lines[lines.length - 1].match(/\\r?\\n?/)[0].length :\n                         this.yylloc.last_column + match[0].length\n        };\n        this.yytext += match[0];\n        this.match += match[0];\n        this.matches = match;\n        this.yyleng = this.yytext.length;\n        if (this.options.ranges) {\n            this.yylloc.range = [this.offset, this.offset += this.yyleng];\n        }\n        this._more = false;\n        this._backtrack = false;\n        this._input = this._input.slice(match[0].length);\n        this.matched += match[0];\n        token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]);\n        if (this.done && this._input) {\n            this.done = false;\n        }\n        if (token) {\n            return token;\n        } else if (this._backtrack) {\n            // recover context\n            for (var k in backup) {\n                this[k] = backup[k];\n            }\n            return false; // rule action called reject() implying the next rule should be tested instead.\n        }\n        return false;\n    },\n\n// return next match in input\nnext:function () {\n        if (this.done) {\n            return this.EOF;\n        }\n        if (!this._input) {\n            this.done = true;\n        }\n\n        var token,\n            match,\n            tempMatch,\n            index;\n        if (!this._more) {\n            this.yytext = '';\n            this.match = '';\n        }\n        var rules = this._currentRules();\n        for (var i = 0; i < rules.length; i++) {\n            tempMatch = this._input.match(this.rules[rules[i]]);\n            if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {\n                match = tempMatch;\n                index = i;\n                if (this.options.backtrack_lexer) {\n                    token = this.test_match(tempMatch, rules[i]);\n                    if (token !== false) {\n                        return token;\n                    } else if (this._backtrack) {\n                        match = false;\n                        continue; // rule action called reject() implying a rule MISmatch.\n                    } else {\n                        // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)\n                        return false;\n                    }\n                } else if (!this.options.flex) {\n                    break;\n                }\n            }\n        }\n        if (match) {\n            token = this.test_match(match, rules[index]);\n            if (token !== false) {\n                return token;\n            }\n            // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)\n            return false;\n        }\n        if (this._input === \"\") {\n            return this.EOF;\n        } else {\n            return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. Unrecognized text.\\n' + this.showPosition(), {\n                text: \"\",\n                token: null,\n                line: this.yylineno\n            });\n        }\n    },\n\n// return next match that has a token\nlex:function lex () {\n        var r = this.next();\n        if (r) {\n            return r;\n        } else {\n            return this.lex();\n        }\n    },\n\n// activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)\nbegin:function begin (condition) {\n        this.conditionStack.push(condition);\n    },\n\n// pop the previously active lexer condition state off the condition stack\npopState:function popState () {\n        var n = this.conditionStack.length - 1;\n        if (n > 0) {\n            return this.conditionStack.pop();\n        } else {\n            return this.conditionStack[0];\n        }\n    },\n\n// produce the lexer rule set which is active for the currently active lexer condition state\n_currentRules:function _currentRules () {\n        if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) {\n            return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;\n        } else {\n            return this.conditions[\"INITIAL\"].rules;\n        }\n    },\n\n// return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available\ntopState:function topState (n) {\n        n = this.conditionStack.length - 1 - Math.abs(n || 0);\n        if (n >= 0) {\n            return this.conditionStack[n];\n        } else {\n            return \"INITIAL\";\n        }\n    },\n\n// alias for begin(condition)\npushState:function pushState (condition) {\n        this.begin(condition);\n    },\n\n// return the number of states currently on the stack\nstateStackSize:function stateStackSize() {\n        return this.conditionStack.length;\n    },\noptions: {\"case-insensitive\":true},\nperformAction: function anonymous(yy,yy_,$avoiding_name_collisions,YY_START) {\nvar YYSTATE=YY_START;\nswitch($avoiding_name_collisions) {\ncase 0: this.begin('open_directive'); return 40; \nbreak;\ncase 1: this.begin('type_directive'); return 41; \nbreak;\ncase 2: this.popState(); this.begin('arg_directive'); return 15; \nbreak;\ncase 3: this.popState(); this.popState(); return 43; \nbreak;\ncase 4:return 42;\nbreak;\ncase 5:/* skip comments */\nbreak;\ncase 6:/* skip comments */\nbreak;\ncase 7:return 11;\nbreak;\ncase 8:/* skip whitespace */\nbreak;\ncase 9:return 9;\nbreak;\ncase 10:return 39;\nbreak;\ncase 11:return 4;\nbreak;\ncase 12: this.begin(\"block\"); return 20; \nbreak;\ncase 13:/* skip whitespace in block */\nbreak;\ncase 14:return 30\nbreak;\ncase 15:return 29\nbreak;\ncase 16:return 28;\nbreak;\ncase 17:/* nothing */\nbreak;\ncase 18: this.popState(); return 22; \nbreak;\ncase 19:return yy_.yytext[0];\nbreak;\ncase 20:return 33;\nbreak;\ncase 21:return 34;\nbreak;\ncase 22:return 35;\nbreak;\ncase 23:return 36;\nbreak;\ncase 24:return 33;\nbreak;\ncase 25:return 34;\nbreak;\ncase 26:return 35;\nbreak;\ncase 27:return 37;\nbreak;\ncase 28:return 38;\nbreak;\ncase 29:return 37;\nbreak;\ncase 30:return 37;\nbreak;\ncase 31:return 23;\nbreak;\ncase 32:return yy_.yytext[0];\nbreak;\ncase 33:return 6;\nbreak;\n}\n},\nrules: [/^(?:%%\\{)/i,/^(?:((?:(?!\\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\\}%%)/i,/^(?:((?:(?!\\}%%).|\\n)*))/i,/^(?:%(?!\\{)[^\\n]*)/i,/^(?:[^\\}]%%[^\\n]*)/i,/^(?:[\\n]+)/i,/^(?:\\s+)/i,/^(?:[\\s]+)/i,/^(?:\"[^\"]*\")/i,/^(?:erDiagram\\b)/i,/^(?:\\{)/i,/^(?:\\s+)/i,/^(?:(?:PK)|(?:FK))/i,/^(?:[A-Za-z][A-Za-z0-9\\-_]*)/i,/^(?:\"[^\"]*\")/i,/^(?:[\\n]+)/i,/^(?:\\})/i,/^(?:.)/i,/^(?:\\|o\\b)/i,/^(?:\\}o\\b)/i,/^(?:\\}\\|)/i,/^(?:\\|\\|)/i,/^(?:o\\|)/i,/^(?:o\\{)/i,/^(?:\\|\\{)/i,/^(?:\\.\\.)/i,/^(?:--)/i,/^(?:\\.-)/i,/^(?:-\\.)/i,/^(?:[A-Za-z][A-Za-z0-9\\-_]*)/i,/^(?:.)/i,/^(?:$)/i],\nconditions: {\"open_directive\":{\"rules\":[1],\"inclusive\":false},\"type_directive\":{\"rules\":[2,3],\"inclusive\":false},\"arg_directive\":{\"rules\":[3,4],\"inclusive\":false},\"block\":{\"rules\":[13,14,15,16,17,18,19],\"inclusive\":false},\"INITIAL\":{\"rules\":[0,5,6,7,8,9,10,11,12,20,21,22,23,24,25,26,27,28,29,30,31,32,33],\"inclusive\":true}}\n});\nreturn lexer;\n})();\nparser.lexer = lexer;\nfunction Parser () {\n  this.yy = {};\n}\nParser.prototype = parser;parser.Parser = Parser;\nreturn new Parser;\n})();\n\n\nif (true) {\nexports.parser = parser;\nexports.Parser = parser.Parser;\nexports.parse = function () { return parser.parse.apply(parser, arguments); };\nexports.main = function commonjsMain (args) {\n    if (!args[1]) {\n        console.log('Usage: '+args[0]+' FILE');\n        process.exit(1);\n    }\n    var source = __webpack_require__(/*! fs */ \"./node_modules/node-libs-browser/mock/empty.js\").readFileSync(__webpack_require__(/*! path */ \"./node_modules/path-browserify/index.js\").normalize(args[1]), \"utf8\");\n    return exports.parser.parse(source);\n};\nif ( true && __webpack_require__.c[__webpack_require__.s] === module) {\n  exports.main(process.argv.slice(1));\n}\n}\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../node_modules/process/browser.js */ \"./node_modules/process/browser.js\"), __webpack_require__(/*! ./../../../../node_modules/webpack/buildin/module.js */ \"./node_modules/webpack/buildin/module.js\")(module)))\n\n/***/ }),\n\n/***/ \"./src/diagrams/er/styles.js\":\n/*!***********************************!*\\\n  !*** ./src/diagrams/er/styles.js ***!\n  \\***********************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\nvar getStyles = function getStyles(options) {\n  return \"\\n  .entityBox {\\n    fill: \".concat(options.mainBkg, \";\\n    stroke: \").concat(options.nodeBorder, \";\\n  }\\n\\n  .attributeBoxOdd {\\n    fill: #ffffff;\\n    stroke: \").concat(options.nodeBorder, \";\\n  }\\n\\n  .attributeBoxEven {\\n    fill: #f2f2f2;\\n    stroke: \").concat(options.nodeBorder, \";\\n  }\\n\\n  .relationshipLabelBox {\\n    fill: \").concat(options.tertiaryColor, \";\\n    opacity: 0.7;\\n    background-color: \").concat(options.tertiaryColor, \";\\n      rect {\\n        opacity: 0.5;\\n      }\\n  }\\n\\n    .relationshipLine {\\n      stroke: \").concat(options.lineColor, \";\\n    }\\n\");\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (getStyles);\n\n/***/ }),\n\n/***/ \"./src/diagrams/flowchart/flowChartShapes.js\":\n/*!***************************************************!*\\\n  !*** ./src/diagrams/flowchart/flowChartShapes.js ***!\n  \\***************************************************/\n/*! exports provided: addToRender, addToRenderV2, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"addToRender\", function() { return addToRender; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"addToRenderV2\", function() { return addToRenderV2; });\n/* harmony import */ var dagre_d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! dagre-d3 */ \"./node_modules/dagre-d3/index.js\");\n/* harmony import */ var dagre_d3__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(dagre_d3__WEBPACK_IMPORTED_MODULE_0__);\n\n\nfunction question(parent, bbox, node) {\n  var w = bbox.width;\n  var h = bbox.height;\n  var s = (w + h) * 0.9;\n  var points = [{\n    x: s / 2,\n    y: 0\n  }, {\n    x: s,\n    y: -s / 2\n  }, {\n    x: s / 2,\n    y: -s\n  }, {\n    x: 0,\n    y: -s / 2\n  }];\n  var shapeSvg = insertPolygonShape(parent, s, s, points);\n\n  node.intersect = function (point) {\n    return dagre_d3__WEBPACK_IMPORTED_MODULE_0___default.a.intersect.polygon(node, points, point);\n  };\n\n  return shapeSvg;\n}\n\nfunction hexagon(parent, bbox, node) {\n  var f = 4;\n  var h = bbox.height;\n  var m = h / f;\n  var w = bbox.width + 2 * m;\n  var points = [{\n    x: m,\n    y: 0\n  }, {\n    x: w - m,\n    y: 0\n  }, {\n    x: w,\n    y: -h / 2\n  }, {\n    x: w - m,\n    y: -h\n  }, {\n    x: m,\n    y: -h\n  }, {\n    x: 0,\n    y: -h / 2\n  }];\n  var shapeSvg = insertPolygonShape(parent, w, h, points);\n\n  node.intersect = function (point) {\n    return dagre_d3__WEBPACK_IMPORTED_MODULE_0___default.a.intersect.polygon(node, points, point);\n  };\n\n  return shapeSvg;\n}\n\nfunction rect_left_inv_arrow(parent, bbox, node) {\n  var w = bbox.width;\n  var h = bbox.height;\n  var points = [{\n    x: -h / 2,\n    y: 0\n  }, {\n    x: w,\n    y: 0\n  }, {\n    x: w,\n    y: -h\n  }, {\n    x: -h / 2,\n    y: -h\n  }, {\n    x: 0,\n    y: -h / 2\n  }];\n  var shapeSvg = insertPolygonShape(parent, w, h, points);\n\n  node.intersect = function (point) {\n    return dagre_d3__WEBPACK_IMPORTED_MODULE_0___default.a.intersect.polygon(node, points, point);\n  };\n\n  return shapeSvg;\n}\n\nfunction lean_right(parent, bbox, node) {\n  var w = bbox.width;\n  var h = bbox.height;\n  var points = [{\n    x: -2 * h / 6,\n    y: 0\n  }, {\n    x: w - h / 6,\n    y: 0\n  }, {\n    x: w + 2 * h / 6,\n    y: -h\n  }, {\n    x: h / 6,\n    y: -h\n  }];\n  var shapeSvg = insertPolygonShape(parent, w, h, points);\n\n  node.intersect = function (point) {\n    return dagre_d3__WEBPACK_IMPORTED_MODULE_0___default.a.intersect.polygon(node, points, point);\n  };\n\n  return shapeSvg;\n}\n\nfunction lean_left(parent, bbox, node) {\n  var w = bbox.width;\n  var h = bbox.height;\n  var points = [{\n    x: 2 * h / 6,\n    y: 0\n  }, {\n    x: w + h / 6,\n    y: 0\n  }, {\n    x: w - 2 * h / 6,\n    y: -h\n  }, {\n    x: -h / 6,\n    y: -h\n  }];\n  var shapeSvg = insertPolygonShape(parent, w, h, points);\n\n  node.intersect = function (point) {\n    return dagre_d3__WEBPACK_IMPORTED_MODULE_0___default.a.intersect.polygon(node, points, point);\n  };\n\n  return shapeSvg;\n}\n\nfunction trapezoid(parent, bbox, node) {\n  var w = bbox.width;\n  var h = bbox.height;\n  var points = [{\n    x: -2 * h / 6,\n    y: 0\n  }, {\n    x: w + 2 * h / 6,\n    y: 0\n  }, {\n    x: w - h / 6,\n    y: -h\n  }, {\n    x: h / 6,\n    y: -h\n  }];\n  var shapeSvg = insertPolygonShape(parent, w, h, points);\n\n  node.intersect = function (point) {\n    return dagre_d3__WEBPACK_IMPORTED_MODULE_0___default.a.intersect.polygon(node, points, point);\n  };\n\n  return shapeSvg;\n}\n\nfunction inv_trapezoid(parent, bbox, node) {\n  var w = bbox.width;\n  var h = bbox.height;\n  var points = [{\n    x: h / 6,\n    y: 0\n  }, {\n    x: w - h / 6,\n    y: 0\n  }, {\n    x: w + 2 * h / 6,\n    y: -h\n  }, {\n    x: -2 * h / 6,\n    y: -h\n  }];\n  var shapeSvg = insertPolygonShape(parent, w, h, points);\n\n  node.intersect = function (point) {\n    return dagre_d3__WEBPACK_IMPORTED_MODULE_0___default.a.intersect.polygon(node, points, point);\n  };\n\n  return shapeSvg;\n}\n\nfunction rect_right_inv_arrow(parent, bbox, node) {\n  var w = bbox.width;\n  var h = bbox.height;\n  var points = [{\n    x: 0,\n    y: 0\n  }, {\n    x: w + h / 2,\n    y: 0\n  }, {\n    x: w,\n    y: -h / 2\n  }, {\n    x: w + h / 2,\n    y: -h\n  }, {\n    x: 0,\n    y: -h\n  }];\n  var shapeSvg = insertPolygonShape(parent, w, h, points);\n\n  node.intersect = function (point) {\n    return dagre_d3__WEBPACK_IMPORTED_MODULE_0___default.a.intersect.polygon(node, points, point);\n  };\n\n  return shapeSvg;\n}\n\nfunction stadium(parent, bbox, node) {\n  var h = bbox.height;\n  var w = bbox.width + h / 4;\n  var shapeSvg = parent.insert('rect', ':first-child').attr('rx', h / 2).attr('ry', h / 2).attr('x', -w / 2).attr('y', -h / 2).attr('width', w).attr('height', h);\n\n  node.intersect = function (point) {\n    return dagre_d3__WEBPACK_IMPORTED_MODULE_0___default.a.intersect.rect(node, point);\n  };\n\n  return shapeSvg;\n}\n\nfunction subroutine(parent, bbox, node) {\n  var w = bbox.width;\n  var h = bbox.height;\n  var points = [{\n    x: 0,\n    y: 0\n  }, {\n    x: w,\n    y: 0\n  }, {\n    x: w,\n    y: -h\n  }, {\n    x: 0,\n    y: -h\n  }, {\n    x: 0,\n    y: 0\n  }, {\n    x: -8,\n    y: 0\n  }, {\n    x: w + 8,\n    y: 0\n  }, {\n    x: w + 8,\n    y: -h\n  }, {\n    x: -8,\n    y: -h\n  }, {\n    x: -8,\n    y: 0\n  }];\n  var shapeSvg = insertPolygonShape(parent, w, h, points);\n\n  node.intersect = function (point) {\n    return dagre_d3__WEBPACK_IMPORTED_MODULE_0___default.a.intersect.polygon(node, points, point);\n  };\n\n  return shapeSvg;\n}\n\nfunction cylinder(parent, bbox, node) {\n  var w = bbox.width;\n  var rx = w / 2;\n  var ry = rx / (2.5 + w / 50);\n  var h = bbox.height + ry;\n  var shape = 'M 0,' + ry + ' a ' + rx + ',' + ry + ' 0,0,0 ' + w + ' 0 a ' + rx + ',' + ry + ' 0,0,0 ' + -w + ' 0 l 0,' + h + ' a ' + rx + ',' + ry + ' 0,0,0 ' + w + ' 0 l 0,' + -h;\n  var shapeSvg = parent.attr('label-offset-y', ry).insert('path', ':first-child').attr('d', shape).attr('transform', 'translate(' + -w / 2 + ',' + -(h / 2 + ry) + ')');\n\n  node.intersect = function (point) {\n    var pos = dagre_d3__WEBPACK_IMPORTED_MODULE_0___default.a.intersect.rect(node, point);\n    var x = pos.x - node.x;\n\n    if (rx != 0 && (Math.abs(x) < node.width / 2 || Math.abs(x) == node.width / 2 && Math.abs(pos.y - node.y) > node.height / 2 - ry)) {\n      // ellipsis equation: x*x / a*a + y*y / b*b = 1\n      // solve for y to get adjustion value for pos.y\n      var y = ry * ry * (1 - x * x / (rx * rx));\n      if (y != 0) y = Math.sqrt(y);\n      y = ry - y;\n      if (point.y - node.y > 0) y = -y;\n      pos.y += y;\n    }\n\n    return pos;\n  };\n\n  return shapeSvg;\n}\n\nfunction addToRender(render) {\n  render.shapes().question = question;\n  render.shapes().hexagon = hexagon;\n  render.shapes().stadium = stadium;\n  render.shapes().subroutine = subroutine;\n  render.shapes().cylinder = cylinder; // Add custom shape for box with inverted arrow on left side\n\n  render.shapes().rect_left_inv_arrow = rect_left_inv_arrow; // Add custom shape for box with inverted arrow on left side\n\n  render.shapes().lean_right = lean_right; // Add custom shape for box with inverted arrow on left side\n\n  render.shapes().lean_left = lean_left; // Add custom shape for box with inverted arrow on left side\n\n  render.shapes().trapezoid = trapezoid; // Add custom shape for box with inverted arrow on left side\n\n  render.shapes().inv_trapezoid = inv_trapezoid; // Add custom shape for box with inverted arrow on right side\n\n  render.shapes().rect_right_inv_arrow = rect_right_inv_arrow;\n}\nfunction addToRenderV2(addShape) {\n  addShape({\n    question: question\n  });\n  addShape({\n    hexagon: hexagon\n  });\n  addShape({\n    stadium: stadium\n  });\n  addShape({\n    subroutine: subroutine\n  });\n  addShape({\n    cylinder: cylinder\n  }); // Add custom shape for box with inverted arrow on left side\n\n  addShape({\n    rect_left_inv_arrow: rect_left_inv_arrow\n  }); // Add custom shape for box with inverted arrow on left side\n\n  addShape({\n    lean_right: lean_right\n  }); // Add custom shape for box with inverted arrow on left side\n\n  addShape({\n    lean_left: lean_left\n  }); // Add custom shape for box with inverted arrow on left side\n\n  addShape({\n    trapezoid: trapezoid\n  }); // Add custom shape for box with inverted arrow on left side\n\n  addShape({\n    inv_trapezoid: inv_trapezoid\n  }); // Add custom shape for box with inverted arrow on right side\n\n  addShape({\n    rect_right_inv_arrow: rect_right_inv_arrow\n  });\n}\n\nfunction insertPolygonShape(parent, w, h, points) {\n  return parent.insert('polygon', ':first-child').attr('points', points.map(function (d) {\n    return d.x + ',' + d.y;\n  }).join(' ')).attr('transform', 'translate(' + -w / 2 + ',' + h / 2 + ')');\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n  addToRender: addToRender,\n  addToRenderV2: addToRenderV2\n});\n\n/***/ }),\n\n/***/ \"./src/diagrams/flowchart/flowDb.js\":\n/*!******************************************!*\\\n  !*** ./src/diagrams/flowchart/flowDb.js ***!\n  \\******************************************/\n/*! exports provided: parseDirective, lookUpDomId, addVertex, addSingleLink, addLink, updateLinkInterpolate, updateLink, addClass, setDirection, setClass, setLink, getTooltip, setClickEvent, bindFunctions, getDirection, getVertices, getEdges, getClasses, clear, setGen, defaultStyle, addSubGraph, getDepthFirstPos, indexNodes, getSubGraphs, firstGraph, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"parseDirective\", function() { return parseDirective; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"lookUpDomId\", function() { return lookUpDomId; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"addVertex\", function() { return addVertex; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"addSingleLink\", function() { return addSingleLink; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"addLink\", function() { return addLink; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"updateLinkInterpolate\", function() { return updateLinkInterpolate; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"updateLink\", function() { return updateLink; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"addClass\", function() { return addClass; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"setDirection\", function() { return setDirection; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"setClass\", function() { return setClass; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"setLink\", function() { return setLink; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getTooltip\", function() { return getTooltip; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"setClickEvent\", function() { return setClickEvent; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"bindFunctions\", function() { return bindFunctions; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getDirection\", function() { return getDirection; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getVertices\", function() { return getVertices; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getEdges\", function() { return getEdges; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getClasses\", function() { return getClasses; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"clear\", function() { return clear; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"setGen\", function() { return setGen; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"defaultStyle\", function() { return defaultStyle; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"addSubGraph\", function() { return addSubGraph; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getDepthFirstPos\", function() { return getDepthFirstPos; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"indexNodes\", function() { return indexNodes; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getSubGraphs\", function() { return getSubGraphs; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"firstGraph\", function() { return firstGraph; });\n/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3 */ \"./node_modules/d3/src/index.js\");\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../utils */ \"./src/utils.js\");\n/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../config */ \"./src/config.js\");\n/* harmony import */ var _common_common__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../common/common */ \"./src/diagrams/common/common.js\");\n/* harmony import */ var _mermaidAPI__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../mermaidAPI */ \"./src/mermaidAPI.js\");\n/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../logger */ \"./src/logger.js\");\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }\n\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _iterableToArray(iter) { if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter); }\n\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\n\n\n\n\n\n\nvar MERMAID_DOM_ID_PREFIX = 'flowchart-';\nvar vertexCounter = 0;\nvar config = _config__WEBPACK_IMPORTED_MODULE_2__[\"getConfig\"]();\nvar vertices = {};\nvar edges = [];\nvar classes = [];\nvar subGraphs = [];\nvar subGraphLookup = {};\nvar tooltips = {};\nvar subCount = 0;\nvar firstGraphFlag = true;\nvar direction;\nvar version; // As in graph\n// Functions to be run after graph rendering\n\nvar funs = [];\nvar parseDirective = function parseDirective(statement, context, type) {\n  _mermaidAPI__WEBPACK_IMPORTED_MODULE_4__[\"default\"].parseDirective(this, statement, context, type);\n};\n/**\n * Function to lookup domId from id in the graph definition.\n * @param id\n * @public\n */\n\nvar lookUpDomId = function lookUpDomId(id) {\n  var veritceKeys = Object.keys(vertices);\n\n  for (var i = 0; i < veritceKeys.length; i++) {\n    if (vertices[veritceKeys[i]].id === id) {\n      return vertices[veritceKeys[i]].domId;\n    }\n  }\n\n  return id;\n};\n/**\n * Function called by parser when a node definition has been found\n * @param id\n * @param text\n * @param type\n * @param style\n * @param classes\n */\n\nvar addVertex = function addVertex(_id, text, type, style, classes, dir) {\n  var txt;\n  var id = _id;\n\n  if (typeof id === 'undefined') {\n    return;\n  }\n\n  if (id.trim().length === 0) {\n    return;\n  } // if (id[0].match(/\\d/)) id = MERMAID_DOM_ID_PREFIX + id;\n\n\n  if (typeof vertices[id] === 'undefined') {\n    vertices[id] = {\n      id: id,\n      domId: MERMAID_DOM_ID_PREFIX + id + '-' + vertexCounter,\n      styles: [],\n      classes: []\n    };\n  }\n\n  vertexCounter++;\n\n  if (typeof text !== 'undefined') {\n    config = _config__WEBPACK_IMPORTED_MODULE_2__[\"getConfig\"]();\n    txt = _common_common__WEBPACK_IMPORTED_MODULE_3__[\"default\"].sanitizeText(text.trim(), config); // strip quotes if string starts and ends with a quote\n\n    if (txt[0] === '\"' && txt[txt.length - 1] === '\"') {\n      txt = txt.substring(1, txt.length - 1);\n    }\n\n    vertices[id].text = txt;\n  } else {\n    if (typeof vertices[id].text === 'undefined') {\n      vertices[id].text = _id;\n    }\n  }\n\n  if (typeof type !== 'undefined') {\n    vertices[id].type = type;\n  }\n\n  if (typeof style !== 'undefined') {\n    if (style !== null) {\n      style.forEach(function (s) {\n        vertices[id].styles.push(s);\n      });\n    }\n  }\n\n  if (typeof classes !== 'undefined') {\n    if (classes !== null) {\n      classes.forEach(function (s) {\n        vertices[id].classes.push(s);\n      });\n    }\n  }\n\n  if (typeof dir !== 'undefined') {\n    vertices[id].dir = dir;\n  }\n};\n/**\n * Function called by parser when a link/edge definition has been found\n * @param start\n * @param end\n * @param type\n * @param linktext\n */\n\nvar addSingleLink = function addSingleLink(_start, _end, type, linktext) {\n  var start = _start;\n  var end = _end; // if (start[0].match(/\\d/)) start = MERMAID_DOM_ID_PREFIX + start;\n  // if (end[0].match(/\\d/)) end = MERMAID_DOM_ID_PREFIX + end;\n  // log.info('Got edge...', start, end);\n\n  var edge = {\n    start: start,\n    end: end,\n    type: undefined,\n    text: ''\n  };\n  linktext = type.text;\n\n  if (typeof linktext !== 'undefined') {\n    edge.text = _common_common__WEBPACK_IMPORTED_MODULE_3__[\"default\"].sanitizeText(linktext.trim(), config); // strip quotes if string starts and exnds with a quote\n\n    if (edge.text[0] === '\"' && edge.text[edge.text.length - 1] === '\"') {\n      edge.text = edge.text.substring(1, edge.text.length - 1);\n    }\n  }\n\n  if (typeof type !== 'undefined') {\n    edge.type = type.type;\n    edge.stroke = type.stroke;\n    edge.length = type.length;\n  }\n\n  edges.push(edge);\n};\nvar addLink = function addLink(_start, _end, type, linktext) {\n  var i, j;\n\n  for (i = 0; i < _start.length; i++) {\n    for (j = 0; j < _end.length; j++) {\n      addSingleLink(_start[i], _end[j], type, linktext);\n    }\n  }\n};\n/**\n * Updates a link's line interpolation algorithm\n * @param pos\n * @param interpolate\n */\n\nvar updateLinkInterpolate = function updateLinkInterpolate(positions, interp) {\n  positions.forEach(function (pos) {\n    if (pos === 'default') {\n      edges.defaultInterpolate = interp;\n    } else {\n      edges[pos].interpolate = interp;\n    }\n  });\n};\n/**\n * Updates a link with a style\n * @param pos\n * @param style\n */\n\nvar updateLink = function updateLink(positions, style) {\n  positions.forEach(function (pos) {\n    if (pos === 'default') {\n      edges.defaultStyle = style;\n    } else {\n      if (_utils__WEBPACK_IMPORTED_MODULE_1__[\"default\"].isSubstringInArray('fill', style) === -1) {\n        style.push('fill:none');\n      }\n\n      edges[pos].style = style;\n    }\n  });\n};\nvar addClass = function addClass(id, style) {\n  if (typeof classes[id] === 'undefined') {\n    classes[id] = {\n      id: id,\n      styles: [],\n      textStyles: []\n    };\n  }\n\n  if (typeof style !== 'undefined') {\n    if (style !== null) {\n      style.forEach(function (s) {\n        if (s.match('color')) {\n          var newStyle1 = s.replace('fill', 'bgFill');\n          var newStyle2 = newStyle1.replace('color', 'fill');\n          classes[id].textStyles.push(newStyle2);\n        }\n\n        classes[id].styles.push(s);\n      });\n    }\n  }\n};\n/**\n * Called by parser when a graph definition is found, stores the direction of the chart.\n * @param dir\n */\n\nvar setDirection = function setDirection(dir) {\n  direction = dir;\n\n  if (direction.match(/.*</)) {\n    direction = 'RL';\n  }\n\n  if (direction.match(/.*\\^/)) {\n    direction = 'BT';\n  }\n\n  if (direction.match(/.*>/)) {\n    direction = 'LR';\n  }\n\n  if (direction.match(/.*v/)) {\n    direction = 'TB';\n  }\n};\n/**\n * Called by parser when a special node is found, e.g. a clickable element.\n * @param ids Comma separated list of ids\n * @param className Class to add\n */\n\nvar setClass = function setClass(ids, className) {\n  ids.split(',').forEach(function (_id) {\n    // let id = version === 'gen-2' ? lookUpDomId(_id) : _id;\n    var id = _id; // if (_id[0].match(/\\d/)) id = MERMAID_DOM_ID_PREFIX + id;\n\n    if (typeof vertices[id] !== 'undefined') {\n      vertices[id].classes.push(className);\n    }\n\n    if (typeof subGraphLookup[id] !== 'undefined') {\n      subGraphLookup[id].classes.push(className);\n    }\n  });\n};\n\nvar setTooltip = function setTooltip(ids, tooltip) {\n  ids.split(',').forEach(function (id) {\n    if (typeof tooltip !== 'undefined') {\n      tooltips[version === 'gen-1' ? lookUpDomId(id) : id] = _common_common__WEBPACK_IMPORTED_MODULE_3__[\"default\"].sanitizeText(tooltip, config);\n    }\n  });\n};\n\nvar setClickFun = function setClickFun(id, functionName, functionArgs) {\n  var domId = lookUpDomId(id); // if (_id[0].match(/\\d/)) id = MERMAID_DOM_ID_PREFIX + id;\n\n  if (_config__WEBPACK_IMPORTED_MODULE_2__[\"getConfig\"]().securityLevel !== 'loose') {\n    return;\n  }\n\n  if (typeof functionName === 'undefined') {\n    return;\n  }\n\n  var argList = [];\n\n  if (typeof functionArgs === 'string') {\n    /* Splits functionArgs by ',', ignoring all ',' in double quoted strings */\n    argList = functionArgs.split(/,(?=(?:(?:[^\"]*\"){2})*[^\"]*$)/);\n\n    for (var i = 0; i < argList.length; i++) {\n      var item = argList[i].trim();\n      /* Removes all double quotes at the start and end of an argument */\n\n      /* This preserves all starting and ending whitespace inside */\n\n      if (item.charAt(0) === '\"' && item.charAt(item.length - 1) === '\"') {\n        item = item.substr(1, item.length - 2);\n      }\n\n      argList[i] = item;\n    }\n  }\n  /* if no arguments passed into callback, default to passing in id */\n\n\n  if (argList.length === 0) {\n    argList.push(id);\n  }\n\n  if (typeof vertices[id] !== 'undefined') {\n    vertices[id].haveCallback = true;\n    funs.push(function () {\n      var elem = document.querySelector(\"[id=\\\"\".concat(domId, \"\\\"]\"));\n\n      if (elem !== null) {\n        elem.addEventListener('click', function () {\n          _utils__WEBPACK_IMPORTED_MODULE_1__[\"default\"].runFunc.apply(_utils__WEBPACK_IMPORTED_MODULE_1__[\"default\"], [functionName].concat(_toConsumableArray(argList)));\n        }, false);\n      }\n    });\n  }\n};\n/**\n * Called by parser when a link is found. Adds the URL to the vertex data.\n * @param ids Comma separated list of ids\n * @param linkStr URL to create a link for\n */\n\n\nvar setLink = function setLink(ids, linkStr, target) {\n  ids.split(',').forEach(function (id) {\n    if (typeof vertices[id] !== 'undefined') {\n      vertices[id].link = _utils__WEBPACK_IMPORTED_MODULE_1__[\"default\"].formatUrl(linkStr, config);\n      vertices[id].linkTarget = target;\n    }\n  });\n  setClass(ids, 'clickable');\n};\nvar getTooltip = function getTooltip(id) {\n  return tooltips[id];\n};\n/**\n * Called by parser when a click definition is found. Registers an event handler.\n * @param ids Comma separated list of ids\n * @param functionName Function to be called on click\n * @param tooltip Tooltip for the clickable element\n */\n\nvar setClickEvent = function setClickEvent(ids, functionName, functionArgs) {\n  ids.split(',').forEach(function (id) {\n    setClickFun(id, functionName, functionArgs);\n  });\n  setClass(ids, 'clickable');\n};\nvar bindFunctions = function bindFunctions(element) {\n  funs.forEach(function (fun) {\n    fun(element);\n  });\n};\nvar getDirection = function getDirection() {\n  return direction.trim();\n};\n/**\n * Retrieval function for fetching the found nodes after parsing has completed.\n * @returns {{}|*|vertices}\n */\n\nvar getVertices = function getVertices() {\n  return vertices;\n};\n/**\n * Retrieval function for fetching the found links after parsing has completed.\n * @returns {{}|*|edges}\n */\n\nvar getEdges = function getEdges() {\n  return edges;\n};\n/**\n * Retrieval function for fetching the found class definitions after parsing has completed.\n * @returns {{}|*|classes}\n */\n\nvar getClasses = function getClasses() {\n  return classes;\n};\n\nvar setupToolTips = function setupToolTips(element) {\n  var tooltipElem = Object(d3__WEBPACK_IMPORTED_MODULE_0__[\"select\"])('.mermaidTooltip');\n\n  if ((tooltipElem._groups || tooltipElem)[0][0] === null) {\n    tooltipElem = Object(d3__WEBPACK_IMPORTED_MODULE_0__[\"select\"])('body').append('div').attr('class', 'mermaidTooltip').style('opacity', 0);\n  }\n\n  var svg = Object(d3__WEBPACK_IMPORTED_MODULE_0__[\"select\"])(element).select('svg');\n  var nodes = svg.selectAll('g.node');\n  nodes.on('mouseover', function () {\n    var el = Object(d3__WEBPACK_IMPORTED_MODULE_0__[\"select\"])(this);\n    var title = el.attr('title'); // Dont try to draw a tooltip if no data is provided\n\n    if (title === null) {\n      return;\n    }\n\n    var rect = this.getBoundingClientRect();\n    tooltipElem.transition().duration(200).style('opacity', '.9');\n    tooltipElem.html(el.attr('title')).style('left', window.scrollX + rect.left + (rect.right - rect.left) / 2 + 'px').style('top', window.scrollY + rect.top - 14 + document.body.scrollTop + 'px');\n    el.classed('hover', true);\n  }).on('mouseout', function () {\n    tooltipElem.transition().duration(500).style('opacity', 0);\n    var el = Object(d3__WEBPACK_IMPORTED_MODULE_0__[\"select\"])(this);\n    el.classed('hover', false);\n  });\n};\n\nfuns.push(setupToolTips);\n/**\n * Clears the internal graph db so that a new graph can be parsed.\n */\n\nvar clear = function clear(ver) {\n  vertices = {};\n  classes = {};\n  edges = [];\n  funs = [];\n  funs.push(setupToolTips);\n  subGraphs = [];\n  subGraphLookup = {};\n  subCount = 0;\n  tooltips = [];\n  firstGraphFlag = true;\n  version = ver || 'gen-1';\n};\nvar setGen = function setGen(ver) {\n  version = ver || 'gen-1';\n};\n/**\n *\n * @returns {string}\n */\n\nvar defaultStyle = function defaultStyle() {\n  return 'fill:#ffa;stroke: #f66; stroke-width: 3px; stroke-dasharray: 5, 5;fill:#ffa;stroke: #666;';\n};\n/**\n * Clears the internal graph db so that a new graph can be parsed.\n */\n\nvar addSubGraph = function addSubGraph(_id, list, _title) {\n  // console.log('addSubGraph', _id, list, _title);\n  var id = _id.trim();\n\n  var title = _title;\n\n  if (_id === _title && _title.match(/\\s/)) {\n    id = undefined;\n  }\n\n  function uniq(a) {\n    var prims = {\n      boolean: {},\n      number: {},\n      string: {}\n    };\n    var objs = [];\n    var dir; //  = unbdefined; direction.trim();\n\n    var nodeList = a.filter(function (item) {\n      var type = _typeof(item);\n\n      if (item.stmt && item.stmt === 'dir') {\n        dir = item.value;\n        return false;\n      }\n\n      if (item.trim() === '') {\n        return false;\n      }\n\n      if (type in prims) {\n        return prims[type].hasOwnProperty(item) ? false : prims[type][item] = true; // eslint-disable-line\n      } else {\n        return objs.indexOf(item) >= 0 ? false : objs.push(item);\n      }\n    });\n    return {\n      nodeList: nodeList,\n      dir: dir\n    };\n  }\n\n  var nodeList = [];\n\n  var _uniq = uniq(nodeList.concat.apply(nodeList, list)),\n      nl = _uniq.nodeList,\n      dir = _uniq.dir;\n\n  nodeList = nl;\n\n  if (version === 'gen-1') {\n    _logger__WEBPACK_IMPORTED_MODULE_5__[\"log\"].warn('LOOKING UP');\n\n    for (var i = 0; i < nodeList.length; i++) {\n      nodeList[i] = lookUpDomId(nodeList[i]);\n    }\n  }\n\n  id = id || 'subGraph' + subCount; // if (id[0].match(/\\d/)) id = lookUpDomId(id);\n\n  title = title || '';\n  title = _common_common__WEBPACK_IMPORTED_MODULE_3__[\"default\"].sanitizeText(title, config);\n  subCount = subCount + 1;\n  var subGraph = {\n    id: id,\n    nodes: nodeList,\n    title: title.trim(),\n    classes: [],\n    dir: dir\n  };\n  _logger__WEBPACK_IMPORTED_MODULE_5__[\"log\"].info('Adding', subGraph.id, subGraph.nodes, subGraph.dir);\n  /**\n   * Deletes an id from all subgraphs\n   */\n  // const del = _id => {\n  //   subGraphs.forEach(sg => {\n  //     const pos = sg.nodes.indexOf(_id);\n  //     if (pos >= 0) {\n  //       sg.nodes.splice(pos, 1);\n  //     }\n  //   });\n  // };\n  // // Removes the members of this subgraph from any other subgraphs, a node only belong to one subgraph\n  // subGraph.nodes.forEach(_id => del(_id));\n  // Remove the members in the new subgraph if they already belong to another subgraph\n\n  subGraph.nodes = makeUniq(subGraph, subGraphs).nodes;\n  subGraphs.push(subGraph);\n  subGraphLookup[id] = subGraph;\n  return id;\n};\n\nvar getPosForId = function getPosForId(id) {\n  for (var i = 0; i < subGraphs.length; i++) {\n    if (subGraphs[i].id === id) {\n      return i;\n    }\n  }\n\n  return -1;\n};\n\nvar secCount = -1;\nvar posCrossRef = [];\n\nvar indexNodes2 = function indexNodes2(id, pos) {\n  var nodes = subGraphs[pos].nodes;\n  secCount = secCount + 1;\n\n  if (secCount > 2000) {\n    return;\n  }\n\n  posCrossRef[secCount] = pos; // Check if match\n\n  if (subGraphs[pos].id === id) {\n    return {\n      result: true,\n      count: 0\n    };\n  }\n\n  var count = 0;\n  var posCount = 1;\n\n  while (count < nodes.length) {\n    var childPos = getPosForId(nodes[count]); // Ignore regular nodes (pos will be -1)\n\n    if (childPos >= 0) {\n      var res = indexNodes2(id, childPos);\n\n      if (res.result) {\n        return {\n          result: true,\n          count: posCount + res.count\n        };\n      } else {\n        posCount = posCount + res.count;\n      }\n    }\n\n    count = count + 1;\n  }\n\n  return {\n    result: false,\n    count: posCount\n  };\n};\n\nvar getDepthFirstPos = function getDepthFirstPos(pos) {\n  return posCrossRef[pos];\n};\nvar indexNodes = function indexNodes() {\n  secCount = -1;\n\n  if (subGraphs.length > 0) {\n    indexNodes2('none', subGraphs.length - 1, 0);\n  }\n};\nvar getSubGraphs = function getSubGraphs() {\n  return subGraphs;\n};\nvar firstGraph = function firstGraph() {\n  if (firstGraphFlag) {\n    firstGraphFlag = false;\n    return true;\n  }\n\n  return false;\n};\n\nvar destructStartLink = function destructStartLink(_str) {\n  var str = _str.trim();\n\n  var type = 'arrow_open';\n\n  switch (str[0]) {\n    case '<':\n      type = 'arrow_point';\n      str = str.slice(1);\n      break;\n\n    case 'x':\n      type = 'arrow_cross';\n      str = str.slice(1);\n      break;\n\n    case 'o':\n      type = 'arrow_circle';\n      str = str.slice(1);\n      break;\n  }\n\n  var stroke = 'normal';\n\n  if (str.indexOf('=') !== -1) {\n    stroke = 'thick';\n  }\n\n  if (str.indexOf('.') !== -1) {\n    stroke = 'dotted';\n  }\n\n  return {\n    type: type,\n    stroke: stroke\n  };\n};\n\nvar countChar = function countChar(char, str) {\n  var length = str.length;\n  var count = 0;\n\n  for (var i = 0; i < length; ++i) {\n    if (str[i] === char) {\n      ++count;\n    }\n  }\n\n  return count;\n};\n\nvar destructEndLink = function destructEndLink(_str) {\n  var str = _str.trim();\n\n  var line = str.slice(0, -1);\n  var type = 'arrow_open';\n\n  switch (str.slice(-1)) {\n    case 'x':\n      type = 'arrow_cross';\n\n      if (str[0] === 'x') {\n        type = 'double_' + type;\n        line = line.slice(1);\n      }\n\n      break;\n\n    case '>':\n      type = 'arrow_point';\n\n      if (str[0] === '<') {\n        type = 'double_' + type;\n        line = line.slice(1);\n      }\n\n      break;\n\n    case 'o':\n      type = 'arrow_circle';\n\n      if (str[0] === 'o') {\n        type = 'double_' + type;\n        line = line.slice(1);\n      }\n\n      break;\n  }\n\n  var stroke = 'normal';\n  var length = line.length - 1;\n\n  if (line[0] === '=') {\n    stroke = 'thick';\n  }\n\n  var dots = countChar('.', line);\n\n  if (dots) {\n    stroke = 'dotted';\n    length = dots;\n  }\n\n  return {\n    type: type,\n    stroke: stroke,\n    length: length\n  };\n};\n\nvar destructLink = function destructLink(_str, _startStr) {\n  var info = destructEndLink(_str);\n  var startInfo;\n\n  if (_startStr) {\n    startInfo = destructStartLink(_startStr);\n\n    if (startInfo.stroke !== info.stroke) {\n      return {\n        type: 'INVALID',\n        stroke: 'INVALID'\n      };\n    }\n\n    if (startInfo.type === 'arrow_open') {\n      // -- xyz -->  - take arrow type from ending\n      startInfo.type = info.type;\n    } else {\n      // x-- xyz -->  - not supported\n      if (startInfo.type !== info.type) return {\n        type: 'INVALID',\n        stroke: 'INVALID'\n      };\n      startInfo.type = 'double_' + startInfo.type;\n    }\n\n    if (startInfo.type === 'double_arrow') {\n      startInfo.type = 'double_arrow_point';\n    }\n\n    startInfo.length = info.length;\n    return startInfo;\n  }\n\n  return info;\n}; // Todo optimizer this by caching existing nodes\n\n\nvar exists = function exists(allSgs, _id) {\n  var res = false;\n  allSgs.forEach(function (sg) {\n    var pos = sg.nodes.indexOf(_id);\n\n    if (pos >= 0) {\n      res = true;\n    }\n  });\n  return res;\n};\n/**\n * Deletes an id from all subgraphs\n */\n\n\nvar makeUniq = function makeUniq(sg, allSubgraphs) {\n  var res = [];\n  sg.nodes.forEach(function (_id, pos) {\n    if (!exists(allSubgraphs, _id)) {\n      res.push(sg.nodes[pos]);\n    }\n  });\n  return {\n    nodes: res\n  };\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n  parseDirective: parseDirective,\n  defaultConfig: function defaultConfig() {\n    return _config__WEBPACK_IMPORTED_MODULE_2__[\"defaultConfig\"].flowchart;\n  },\n  addVertex: addVertex,\n  lookUpDomId: lookUpDomId,\n  addLink: addLink,\n  updateLinkInterpolate: updateLinkInterpolate,\n  updateLink: updateLink,\n  addClass: addClass,\n  setDirection: setDirection,\n  setClass: setClass,\n  setTooltip: setTooltip,\n  getTooltip: getTooltip,\n  setClickEvent: setClickEvent,\n  setLink: setLink,\n  bindFunctions: bindFunctions,\n  getDirection: getDirection,\n  getVertices: getVertices,\n  getEdges: getEdges,\n  getClasses: getClasses,\n  clear: clear,\n  setGen: setGen,\n  defaultStyle: defaultStyle,\n  addSubGraph: addSubGraph,\n  getDepthFirstPos: getDepthFirstPos,\n  indexNodes: indexNodes,\n  getSubGraphs: getSubGraphs,\n  destructLink: destructLink,\n  lex: {\n    firstGraph: firstGraph\n  },\n  exists: exists,\n  makeUniq: makeUniq\n});\n\n/***/ }),\n\n/***/ \"./src/diagrams/flowchart/flowRenderer-v2.js\":\n/*!***************************************************!*\\\n  !*** ./src/diagrams/flowchart/flowRenderer-v2.js ***!\n  \\***************************************************/\n/*! exports provided: setConf, addVertices, addEdges, getClasses, draw, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"setConf\", function() { return setConf; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"addVertices\", function() { return addVertices; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"addEdges\", function() { return addEdges; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getClasses\", function() { return getClasses; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"draw\", function() { return draw; });\n/* harmony import */ var graphlib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! graphlib */ \"./node_modules/graphlib/index.js\");\n/* harmony import */ var graphlib__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(graphlib__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! d3 */ \"./node_modules/d3/src/index.js\");\n/* harmony import */ var _flowDb__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./flowDb */ \"./src/diagrams/flowchart/flowDb.js\");\n/* harmony import */ var _parser_flow__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./parser/flow */ \"./src/diagrams/flowchart/parser/flow.jison\");\n/* harmony import */ var _parser_flow__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_parser_flow__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../config */ \"./src/config.js\");\n/* harmony import */ var _dagre_wrapper_index_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../dagre-wrapper/index.js */ \"./src/dagre-wrapper/index.js\");\n/* harmony import */ var dagre_d3_lib_label_add_html_label_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! dagre-d3/lib/label/add-html-label.js */ \"./node_modules/dagre-d3/lib/label/add-html-label.js\");\n/* harmony import */ var dagre_d3_lib_label_add_html_label_js__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(dagre_d3_lib_label_add_html_label_js__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../logger */ \"./src/logger.js\");\n/* harmony import */ var _common_common__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../common/common */ \"./src/diagrams/common/common.js\");\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../utils */ \"./src/utils.js\");\n\n\n\n\n\n\n\n\n\n\nvar conf = {};\nvar setConf = function setConf(cnf) {\n  var keys = Object.keys(cnf);\n\n  for (var i = 0; i < keys.length; i++) {\n    conf[keys[i]] = cnf[keys[i]];\n  }\n};\n/**\n * Function that adds the vertices found during parsing to the graph to be rendered.\n * @param vert Object containing the vertices.\n * @param g The graph that is to be drawn.\n */\n\nvar addVertices = function addVertices(vert, g, svgId) {\n  var svg = Object(d3__WEBPACK_IMPORTED_MODULE_1__[\"select\"])(\"[id=\\\"\".concat(svgId, \"\\\"]\"));\n  var keys = Object.keys(vert); // Iterate through each item in the vertex object (containing all the vertices found) in the graph definition\n\n  keys.forEach(function (id) {\n    var vertex = vert[id];\n    /**\n     * Variable for storing the classes for the vertex\n     * @type {string}\n     */\n\n    var classStr = 'default';\n\n    if (vertex.classes.length > 0) {\n      classStr = vertex.classes.join(' ');\n    }\n\n    var styles = Object(_utils__WEBPACK_IMPORTED_MODULE_9__[\"getStylesFromArray\"])(vertex.styles); // Use vertex id as text in the box if no text is provided by the graph definition\n\n    var vertexText = vertex.text !== undefined ? vertex.text : vertex.id; // We create a SVG label, either by delegating to addHtmlLabel or manually\n\n    var vertexNode;\n\n    if (Object(_common_common__WEBPACK_IMPORTED_MODULE_8__[\"evaluate\"])(Object(_config__WEBPACK_IMPORTED_MODULE_4__[\"getConfig\"])().flowchart.htmlLabels)) {\n      // TODO: addHtmlLabel accepts a labelStyle. Do we possibly have that?\n      var node = {\n        label: vertexText.replace(/fa[lrsb]?:fa-[\\w-]+/g, function (s) {\n          return \"<i class='\".concat(s.replace(':', ' '), \"'></i>\");\n        })\n      };\n      vertexNode = dagre_d3_lib_label_add_html_label_js__WEBPACK_IMPORTED_MODULE_6___default()(svg, node).node();\n      vertexNode.parentNode.removeChild(vertexNode);\n    } else {\n      var svgLabel = document.createElementNS('http://www.w3.org/2000/svg', 'text');\n      svgLabel.setAttribute('style', styles.labelStyle.replace('color:', 'fill:'));\n      var rows = vertexText.split(_common_common__WEBPACK_IMPORTED_MODULE_8__[\"default\"].lineBreakRegex);\n\n      for (var j = 0; j < rows.length; j++) {\n        var tspan = document.createElementNS('http://www.w3.org/2000/svg', 'tspan');\n        tspan.setAttributeNS('http://www.w3.org/XML/1998/namespace', 'xml:space', 'preserve');\n        tspan.setAttribute('dy', '1em');\n        tspan.setAttribute('x', '1');\n        tspan.textContent = rows[j];\n        svgLabel.appendChild(tspan);\n      }\n\n      vertexNode = svgLabel;\n    }\n\n    var radious = 0;\n    var _shape = ''; // Set the shape based parameters\n\n    switch (vertex.type) {\n      case 'round':\n        radious = 5;\n        _shape = 'rect';\n        break;\n\n      case 'square':\n        _shape = 'rect';\n        break;\n\n      case 'diamond':\n        _shape = 'question';\n        break;\n\n      case 'hexagon':\n        _shape = 'hexagon';\n        break;\n\n      case 'odd':\n        _shape = 'rect_left_inv_arrow';\n        break;\n\n      case 'lean_right':\n        _shape = 'lean_right';\n        break;\n\n      case 'lean_left':\n        _shape = 'lean_left';\n        break;\n\n      case 'trapezoid':\n        _shape = 'trapezoid';\n        break;\n\n      case 'inv_trapezoid':\n        _shape = 'inv_trapezoid';\n        break;\n\n      case 'odd_right':\n        _shape = 'rect_left_inv_arrow';\n        break;\n\n      case 'circle':\n        _shape = 'circle';\n        break;\n\n      case 'ellipse':\n        _shape = 'ellipse';\n        break;\n\n      case 'stadium':\n        _shape = 'stadium';\n        break;\n\n      case 'subroutine':\n        _shape = 'subroutine';\n        break;\n\n      case 'cylinder':\n        _shape = 'cylinder';\n        break;\n\n      case 'group':\n        _shape = 'rect';\n        break;\n\n      default:\n        _shape = 'rect';\n    } // Add the node\n\n\n    g.setNode(vertex.id, {\n      labelStyle: styles.labelStyle,\n      shape: _shape,\n      labelText: vertexText,\n      rx: radious,\n      ry: radious,\n      class: classStr,\n      style: styles.style,\n      id: vertex.id,\n      link: vertex.link,\n      linkTarget: vertex.linkTarget,\n      tooltip: _flowDb__WEBPACK_IMPORTED_MODULE_2__[\"default\"].getTooltip(vertex.id) || '',\n      domId: _flowDb__WEBPACK_IMPORTED_MODULE_2__[\"default\"].lookUpDomId(vertex.id),\n      haveCallback: vertex.haveCallback,\n      width: vertex.type === 'group' ? 500 : undefined,\n      dir: vertex.dir,\n      type: vertex.type,\n      padding: Object(_config__WEBPACK_IMPORTED_MODULE_4__[\"getConfig\"])().flowchart.padding\n    });\n    _logger__WEBPACK_IMPORTED_MODULE_7__[\"log\"].info('setNode', {\n      labelStyle: styles.labelStyle,\n      shape: _shape,\n      labelText: vertexText,\n      rx: radious,\n      ry: radious,\n      class: classStr,\n      style: styles.style,\n      id: vertex.id,\n      domId: _flowDb__WEBPACK_IMPORTED_MODULE_2__[\"default\"].lookUpDomId(vertex.id),\n      width: vertex.type === 'group' ? 500 : undefined,\n      type: vertex.type,\n      dir: vertex.dir,\n      padding: Object(_config__WEBPACK_IMPORTED_MODULE_4__[\"getConfig\"])().flowchart.padding\n    });\n  });\n};\n/**\n * Add edges to graph based on parsed graph defninition\n * @param {Object} edges The edges to add to the graph\n * @param {Object} g The graph object\n */\n\nvar addEdges = function addEdges(edges, g) {\n  _logger__WEBPACK_IMPORTED_MODULE_7__[\"log\"].info('abc78 edges = ', edges);\n  var cnt = 0;\n  var linkIdCnt = {};\n  var defaultStyle;\n  var defaultLabelStyle;\n\n  if (typeof edges.defaultStyle !== 'undefined') {\n    var defaultStyles = Object(_utils__WEBPACK_IMPORTED_MODULE_9__[\"getStylesFromArray\"])(edges.defaultStyle);\n    defaultStyle = defaultStyles.style;\n    defaultLabelStyle = defaultStyles.labelStyle;\n  }\n\n  edges.forEach(function (edge) {\n    cnt++; // Identify Link\n\n    var linkIdBase = 'L-' + edge.start + '-' + edge.end; // count the links from+to the same node to give unique id\n\n    if (typeof linkIdCnt[linkIdBase] === 'undefined') {\n      linkIdCnt[linkIdBase] = 0;\n      _logger__WEBPACK_IMPORTED_MODULE_7__[\"log\"].info('abc78 new entry', linkIdBase, linkIdCnt[linkIdBase]);\n    } else {\n      linkIdCnt[linkIdBase]++;\n      _logger__WEBPACK_IMPORTED_MODULE_7__[\"log\"].info('abc78 new entry', linkIdBase, linkIdCnt[linkIdBase]);\n    }\n\n    var linkId = linkIdBase + '-' + linkIdCnt[linkIdBase];\n    _logger__WEBPACK_IMPORTED_MODULE_7__[\"log\"].info('abc78 new link id to be used is', linkIdBase, linkId, linkIdCnt[linkIdBase]);\n    var linkNameStart = 'LS-' + edge.start;\n    var linkNameEnd = 'LE-' + edge.end;\n    var edgeData = {\n      style: '',\n      labelStyle: ''\n    };\n    edgeData.minlen = edge.length || 1; //edgeData.id = 'id' + cnt;\n    // Set link type for rendering\n\n    if (edge.type === 'arrow_open') {\n      edgeData.arrowhead = 'none';\n    } else {\n      edgeData.arrowhead = 'normal';\n    } // Check of arrow types, placed here in order not to break old rendering\n\n\n    edgeData.arrowTypeStart = 'arrow_open';\n    edgeData.arrowTypeEnd = 'arrow_open';\n    /* eslint-disable no-fallthrough */\n\n    switch (edge.type) {\n      case 'double_arrow_cross':\n        edgeData.arrowTypeStart = 'arrow_cross';\n\n      case 'arrow_cross':\n        edgeData.arrowTypeEnd = 'arrow_cross';\n        break;\n\n      case 'double_arrow_point':\n        edgeData.arrowTypeStart = 'arrow_point';\n\n      case 'arrow_point':\n        edgeData.arrowTypeEnd = 'arrow_point';\n        break;\n\n      case 'double_arrow_circle':\n        edgeData.arrowTypeStart = 'arrow_circle';\n\n      case 'arrow_circle':\n        edgeData.arrowTypeEnd = 'arrow_circle';\n        break;\n    }\n\n    var style = '';\n    var labelStyle = '';\n\n    switch (edge.stroke) {\n      case 'normal':\n        style = 'fill:none;';\n\n        if (typeof defaultStyle !== 'undefined') {\n          style = defaultStyle;\n        }\n\n        if (typeof defaultLabelStyle !== 'undefined') {\n          labelStyle = defaultLabelStyle;\n        }\n\n        edgeData.thickness = 'normal';\n        edgeData.pattern = 'solid';\n        break;\n\n      case 'dotted':\n        edgeData.thickness = 'normal';\n        edgeData.pattern = 'dotted';\n        edgeData.style = 'fill:none;stroke-width:2px;stroke-dasharray:3;';\n        break;\n\n      case 'thick':\n        edgeData.thickness = 'thick';\n        edgeData.pattern = 'solid';\n        edgeData.style = 'stroke-width: 3.5px;fill:none;';\n        break;\n    }\n\n    if (typeof edge.style !== 'undefined') {\n      var styles = Object(_utils__WEBPACK_IMPORTED_MODULE_9__[\"getStylesFromArray\"])(edge.style);\n      style = styles.style;\n      labelStyle = styles.labelStyle;\n    }\n\n    edgeData.style = edgeData.style += style;\n    edgeData.labelStyle = edgeData.labelStyle += labelStyle;\n\n    if (typeof edge.interpolate !== 'undefined') {\n      edgeData.curve = Object(_utils__WEBPACK_IMPORTED_MODULE_9__[\"interpolateToCurve\"])(edge.interpolate, d3__WEBPACK_IMPORTED_MODULE_1__[\"curveLinear\"]);\n    } else if (typeof edges.defaultInterpolate !== 'undefined') {\n      edgeData.curve = Object(_utils__WEBPACK_IMPORTED_MODULE_9__[\"interpolateToCurve\"])(edges.defaultInterpolate, d3__WEBPACK_IMPORTED_MODULE_1__[\"curveLinear\"]);\n    } else {\n      edgeData.curve = Object(_utils__WEBPACK_IMPORTED_MODULE_9__[\"interpolateToCurve\"])(conf.curve, d3__WEBPACK_IMPORTED_MODULE_1__[\"curveLinear\"]);\n    }\n\n    if (typeof edge.text === 'undefined') {\n      if (typeof edge.style !== 'undefined') {\n        edgeData.arrowheadStyle = 'fill: #333';\n      }\n    } else {\n      edgeData.arrowheadStyle = 'fill: #333';\n      edgeData.labelpos = 'c';\n    } // if (evaluate(getConfig().flowchart.htmlLabels) && false) {\n    //   // eslint-disable-line\n    //   edgeData.labelType = 'html';\n    //   edgeData.label = `<span id=\"L-${linkId}\" class=\"edgeLabel L-${linkNameStart}' L-${linkNameEnd}\">${edge.text}</span>`;\n    // } else {\n\n\n    edgeData.labelType = 'text';\n    edgeData.label = edge.text.replace(_common_common__WEBPACK_IMPORTED_MODULE_8__[\"default\"].lineBreakRegex, '\\n');\n\n    if (typeof edge.style === 'undefined') {\n      edgeData.style = edgeData.style || 'stroke: #333; stroke-width: 1.5px;fill:none;';\n    }\n\n    edgeData.labelStyle = edgeData.labelStyle.replace('color:', 'fill:'); // }\n\n    edgeData.id = linkId;\n    edgeData.classes = 'flowchart-link ' + linkNameStart + ' ' + linkNameEnd; // Add the edge to the graph\n\n    g.setEdge(edge.start, edge.end, edgeData, cnt);\n  });\n};\n/**\n * Returns the all the styles from classDef statements in the graph definition.\n * @returns {object} classDef styles\n */\n\nvar getClasses = function getClasses(text) {\n  _logger__WEBPACK_IMPORTED_MODULE_7__[\"log\"].info('Extracting classes');\n  _flowDb__WEBPACK_IMPORTED_MODULE_2__[\"default\"].clear();\n  var parser = _parser_flow__WEBPACK_IMPORTED_MODULE_3___default.a.parser;\n  parser.yy = _flowDb__WEBPACK_IMPORTED_MODULE_2__[\"default\"];\n\n  try {\n    // Parse the graph definition\n    parser.parse(text);\n  } catch (e) {\n    return;\n  }\n\n  return _flowDb__WEBPACK_IMPORTED_MODULE_2__[\"default\"].getClasses();\n};\n/**\n * Draws a flowchart in the tag with id: id based on the graph definition in text.\n * @param text\n * @param id\n */\n\nvar draw = function draw(text, id) {\n  _logger__WEBPACK_IMPORTED_MODULE_7__[\"log\"].info('Drawing flowchart');\n  _flowDb__WEBPACK_IMPORTED_MODULE_2__[\"default\"].clear();\n  _flowDb__WEBPACK_IMPORTED_MODULE_2__[\"default\"].setGen('gen-2');\n  var parser = _parser_flow__WEBPACK_IMPORTED_MODULE_3___default.a.parser;\n  parser.yy = _flowDb__WEBPACK_IMPORTED_MODULE_2__[\"default\"]; // Parse the graph definition\n  // try {\n\n  parser.parse(text); // } catch (err) {\n  // log.debug('Parsing failed');\n  // }\n  // Fetch the default direction, use TD if none was found\n\n  var dir = _flowDb__WEBPACK_IMPORTED_MODULE_2__[\"default\"].getDirection();\n\n  if (typeof dir === 'undefined') {\n    dir = 'TD';\n  }\n\n  var conf = Object(_config__WEBPACK_IMPORTED_MODULE_4__[\"getConfig\"])().flowchart;\n  var nodeSpacing = conf.nodeSpacing || 50;\n  var rankSpacing = conf.rankSpacing || 50; // Create the input mermaid.graph\n\n  var g = new graphlib__WEBPACK_IMPORTED_MODULE_0___default.a.Graph({\n    multigraph: true,\n    compound: true\n  }).setGraph({\n    rankdir: dir,\n    nodesep: nodeSpacing,\n    ranksep: rankSpacing,\n    marginx: 8,\n    marginy: 8\n  }).setDefaultEdgeLabel(function () {\n    return {};\n  });\n  var subG;\n  var subGraphs = _flowDb__WEBPACK_IMPORTED_MODULE_2__[\"default\"].getSubGraphs();\n  _logger__WEBPACK_IMPORTED_MODULE_7__[\"log\"].info('Subgraphs - ', subGraphs);\n\n  for (var _i = subGraphs.length - 1; _i >= 0; _i--) {\n    subG = subGraphs[_i];\n    _logger__WEBPACK_IMPORTED_MODULE_7__[\"log\"].info('Subgraph - ', subG);\n    _flowDb__WEBPACK_IMPORTED_MODULE_2__[\"default\"].addVertex(subG.id, subG.title, 'group', undefined, subG.classes, subG.dir);\n  } // Fetch the verices/nodes and edges/links from the parsed graph definition\n\n\n  var vert = _flowDb__WEBPACK_IMPORTED_MODULE_2__[\"default\"].getVertices();\n  var edges = _flowDb__WEBPACK_IMPORTED_MODULE_2__[\"default\"].getEdges();\n  _logger__WEBPACK_IMPORTED_MODULE_7__[\"log\"].info(edges);\n  var i = 0;\n\n  for (i = subGraphs.length - 1; i >= 0; i--) {\n    // for (let i = 0; i < subGraphs.length; i++) {\n    subG = subGraphs[i];\n    Object(d3__WEBPACK_IMPORTED_MODULE_1__[\"selectAll\"])('cluster').append('text');\n\n    for (var j = 0; j < subG.nodes.length; j++) {\n      _logger__WEBPACK_IMPORTED_MODULE_7__[\"log\"].info('Setting up subgraphs', subG.nodes[j], subG.id);\n      g.setParent(subG.nodes[j], subG.id);\n    }\n  }\n\n  addVertices(vert, g, id);\n  addEdges(edges, g); // Add custom shapes\n  // flowChartShapes.addToRenderV2(addShape);\n  // Set up an SVG group so that we can translate the final graph.\n\n  var svg = Object(d3__WEBPACK_IMPORTED_MODULE_1__[\"select\"])(\"[id=\\\"\".concat(id, \"\\\"]\"));\n  svg.attr('xmlns:xlink', 'http://www.w3.org/1999/xlink'); // Run the renderer. This is what draws the final graph.\n\n  var element = Object(d3__WEBPACK_IMPORTED_MODULE_1__[\"select\"])('#' + id + ' g');\n  Object(_dagre_wrapper_index_js__WEBPACK_IMPORTED_MODULE_5__[\"render\"])(element, g, ['point', 'circle', 'cross'], 'flowchart', id);\n  var padding = conf.diagramPadding;\n  var svgBounds = svg.node().getBBox();\n  var width = svgBounds.width + padding * 2;\n  var height = svgBounds.height + padding * 2;\n  _logger__WEBPACK_IMPORTED_MODULE_7__[\"log\"].debug(\"new ViewBox 0 0 \".concat(width, \" \").concat(height), \"translate(\".concat(padding - g._label.marginx, \", \").concat(padding - g._label.marginy, \")\"));\n  Object(_utils__WEBPACK_IMPORTED_MODULE_9__[\"configureSvgSize\"])(svg, height, width, conf.useMaxWidth);\n  svg.attr('viewBox', \"0 0 \".concat(width, \" \").concat(height));\n  svg.select('g').attr('transform', \"translate(\".concat(padding - g._label.marginx, \", \").concat(padding - svgBounds.y, \")\")); // Index nodes\n\n  _flowDb__WEBPACK_IMPORTED_MODULE_2__[\"default\"].indexNodes('subGraph' + i); // Add label rects for non html labels\n\n  if (!conf.htmlLabels) {\n    var labels = document.querySelectorAll('[id=\"' + id + '\"] .edgeLabel .label');\n\n    for (var k = 0; k < labels.length; k++) {\n      var label = labels[k]; // Get dimensions of label\n\n      var dim = label.getBBox();\n      var rect = document.createElementNS('http://www.w3.org/2000/svg', 'rect');\n      rect.setAttribute('rx', 0);\n      rect.setAttribute('ry', 0);\n      rect.setAttribute('width', dim.width);\n      rect.setAttribute('height', dim.height); // rect.setAttribute('style', 'fill:#e8e8e8;');\n\n      label.insertBefore(rect, label.firstChild);\n    }\n  } // If node has a link, wrap it in an anchor SVG object.\n\n\n  var keys = Object.keys(vert);\n  keys.forEach(function (key) {\n    var vertex = vert[key];\n\n    if (vertex.link) {\n      var node = Object(d3__WEBPACK_IMPORTED_MODULE_1__[\"select\"])('#' + id + ' [id=\"' + key + '\"]');\n\n      if (node) {\n        var link = document.createElementNS('http://www.w3.org/2000/svg', 'a');\n        link.setAttributeNS('http://www.w3.org/2000/svg', 'class', vertex.classes.join(' '));\n        link.setAttributeNS('http://www.w3.org/2000/svg', 'href', vertex.link);\n        link.setAttributeNS('http://www.w3.org/2000/svg', 'rel', 'noopener');\n\n        if (vertex.linkTarget) {\n          link.setAttributeNS('http://www.w3.org/2000/svg', 'target', vertex.linkTarget);\n        }\n\n        var linkNode = node.insert(function () {\n          return link;\n        }, ':first-child');\n        var shape = node.select('.label-container');\n\n        if (shape) {\n          linkNode.append(function () {\n            return shape.node();\n          });\n        }\n\n        var _label = node.select('.label');\n\n        if (_label) {\n          linkNode.append(function () {\n            return _label.node();\n          });\n        }\n      }\n    }\n  });\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n  setConf: setConf,\n  addVertices: addVertices,\n  addEdges: addEdges,\n  getClasses: getClasses,\n  draw: draw\n});\n\n/***/ }),\n\n/***/ \"./src/diagrams/flowchart/flowRenderer.js\":\n/*!************************************************!*\\\n  !*** ./src/diagrams/flowchart/flowRenderer.js ***!\n  \\************************************************/\n/*! exports provided: setConf, addVertices, addEdges, getClasses, draw, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"setConf\", function() { return setConf; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"addVertices\", function() { return addVertices; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"addEdges\", function() { return addEdges; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getClasses\", function() { return getClasses; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"draw\", function() { return draw; });\n/* harmony import */ var graphlib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! graphlib */ \"./node_modules/graphlib/index.js\");\n/* harmony import */ var graphlib__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(graphlib__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! d3 */ \"./node_modules/d3/src/index.js\");\n/* harmony import */ var _flowDb__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./flowDb */ \"./src/diagrams/flowchart/flowDb.js\");\n/* harmony import */ var _parser_flow__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./parser/flow */ \"./src/diagrams/flowchart/parser/flow.jison\");\n/* harmony import */ var _parser_flow__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_parser_flow__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../config */ \"./src/config.js\");\n/* harmony import */ var dagre_d3__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! dagre-d3 */ \"./node_modules/dagre-d3/index.js\");\n/* harmony import */ var dagre_d3__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(dagre_d3__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var dagre_d3_lib_label_add_html_label_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! dagre-d3/lib/label/add-html-label.js */ \"./node_modules/dagre-d3/lib/label/add-html-label.js\");\n/* harmony import */ var dagre_d3_lib_label_add_html_label_js__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(dagre_d3_lib_label_add_html_label_js__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../logger */ \"./src/logger.js\");\n/* harmony import */ var _common_common__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../common/common */ \"./src/diagrams/common/common.js\");\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../utils */ \"./src/utils.js\");\n/* harmony import */ var _flowChartShapes__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./flowChartShapes */ \"./src/diagrams/flowchart/flowChartShapes.js\");\n\n\n\n\n\n\n\n\n\n\n\nvar conf = {};\nvar setConf = function setConf(cnf) {\n  var keys = Object.keys(cnf);\n\n  for (var i = 0; i < keys.length; i++) {\n    conf[keys[i]] = cnf[keys[i]];\n  }\n};\n/**\n * Function that adds the vertices found in the graph definition to the graph to be rendered.\n * @param vert Object containing the vertices.\n * @param g The graph that is to be drawn.\n */\n\nvar addVertices = function addVertices(vert, g, svgId) {\n  var svg = Object(d3__WEBPACK_IMPORTED_MODULE_1__[\"select\"])(\"[id=\\\"\".concat(svgId, \"\\\"]\"));\n  var keys = Object.keys(vert); // Iterate through each item in the vertex object (containing all the vertices found) in the graph definition\n\n  keys.forEach(function (id) {\n    var vertex = vert[id];\n    /**\n     * Variable for storing the classes for the vertex\n     * @type {string}\n     */\n\n    var classStr = 'default';\n\n    if (vertex.classes.length > 0) {\n      classStr = vertex.classes.join(' ');\n    }\n\n    var styles = Object(_utils__WEBPACK_IMPORTED_MODULE_9__[\"getStylesFromArray\"])(vertex.styles); // Use vertex id as text in the box if no text is provided by the graph definition\n\n    var vertexText = vertex.text !== undefined ? vertex.text : vertex.id; // We create a SVG label, either by delegating to addHtmlLabel or manually\n\n    var vertexNode;\n\n    if (Object(_common_common__WEBPACK_IMPORTED_MODULE_8__[\"evaluate\"])(Object(_config__WEBPACK_IMPORTED_MODULE_4__[\"getConfig\"])().flowchart.htmlLabels)) {\n      // TODO: addHtmlLabel accepts a labelStyle. Do we possibly have that?\n      var node = {\n        label: vertexText.replace(/fa[lrsb]?:fa-[\\w-]+/g, function (s) {\n          return \"<i class='\".concat(s.replace(':', ' '), \"'></i>\");\n        })\n      };\n      vertexNode = dagre_d3_lib_label_add_html_label_js__WEBPACK_IMPORTED_MODULE_6___default()(svg, node).node();\n      vertexNode.parentNode.removeChild(vertexNode);\n    } else {\n      var svgLabel = document.createElementNS('http://www.w3.org/2000/svg', 'text');\n      svgLabel.setAttribute('style', styles.labelStyle.replace('color:', 'fill:'));\n      var rows = vertexText.split(_common_common__WEBPACK_IMPORTED_MODULE_8__[\"default\"].lineBreakRegex);\n\n      for (var j = 0; j < rows.length; j++) {\n        var tspan = document.createElementNS('http://www.w3.org/2000/svg', 'tspan');\n        tspan.setAttributeNS('http://www.w3.org/XML/1998/namespace', 'xml:space', 'preserve');\n        tspan.setAttribute('dy', '1em');\n        tspan.setAttribute('x', '1');\n        tspan.textContent = rows[j];\n        svgLabel.appendChild(tspan);\n      }\n\n      vertexNode = svgLabel;\n    }\n\n    var radious = 0;\n    var _shape = ''; // Set the shape based parameters\n\n    switch (vertex.type) {\n      case 'round':\n        radious = 5;\n        _shape = 'rect';\n        break;\n\n      case 'square':\n        _shape = 'rect';\n        break;\n\n      case 'diamond':\n        _shape = 'question';\n        break;\n\n      case 'hexagon':\n        _shape = 'hexagon';\n        break;\n\n      case 'odd':\n        _shape = 'rect_left_inv_arrow';\n        break;\n\n      case 'lean_right':\n        _shape = 'lean_right';\n        break;\n\n      case 'lean_left':\n        _shape = 'lean_left';\n        break;\n\n      case 'trapezoid':\n        _shape = 'trapezoid';\n        break;\n\n      case 'inv_trapezoid':\n        _shape = 'inv_trapezoid';\n        break;\n\n      case 'odd_right':\n        _shape = 'rect_left_inv_arrow';\n        break;\n\n      case 'circle':\n        _shape = 'circle';\n        break;\n\n      case 'ellipse':\n        _shape = 'ellipse';\n        break;\n\n      case 'stadium':\n        _shape = 'stadium';\n        break;\n\n      case 'subroutine':\n        _shape = 'subroutine';\n        break;\n\n      case 'cylinder':\n        _shape = 'cylinder';\n        break;\n\n      case 'group':\n        _shape = 'rect';\n        break;\n\n      default:\n        _shape = 'rect';\n    } // Add the node\n\n\n    _logger__WEBPACK_IMPORTED_MODULE_7__[\"log\"].warn('Adding node', vertex.id, vertex.domId);\n    g.setNode(_flowDb__WEBPACK_IMPORTED_MODULE_2__[\"default\"].lookUpDomId(vertex.id), {\n      labelType: 'svg',\n      labelStyle: styles.labelStyle,\n      shape: _shape,\n      label: vertexNode,\n      rx: radious,\n      ry: radious,\n      class: classStr,\n      style: styles.style,\n      id: _flowDb__WEBPACK_IMPORTED_MODULE_2__[\"default\"].lookUpDomId(vertex.id)\n    });\n  });\n};\n/**\n * Add edges to graph based on parsed graph defninition\n * @param {Object} edges The edges to add to the graph\n * @param {Object} g The graph object\n */\n\nvar addEdges = function addEdges(edges, g) {\n  var cnt = 0;\n  var defaultStyle;\n  var defaultLabelStyle;\n\n  if (typeof edges.defaultStyle !== 'undefined') {\n    var defaultStyles = Object(_utils__WEBPACK_IMPORTED_MODULE_9__[\"getStylesFromArray\"])(edges.defaultStyle);\n    defaultStyle = defaultStyles.style;\n    defaultLabelStyle = defaultStyles.labelStyle;\n  }\n\n  edges.forEach(function (edge) {\n    cnt++; // Identify Link\n\n    var linkId = 'L-' + edge.start + '-' + edge.end;\n    var linkNameStart = 'LS-' + edge.start;\n    var linkNameEnd = 'LE-' + edge.end;\n    var edgeData = {}; // Set link type for rendering\n\n    if (edge.type === 'arrow_open') {\n      edgeData.arrowhead = 'none';\n    } else {\n      edgeData.arrowhead = 'normal';\n    }\n\n    var style = '';\n    var labelStyle = '';\n\n    if (typeof edge.style !== 'undefined') {\n      var styles = Object(_utils__WEBPACK_IMPORTED_MODULE_9__[\"getStylesFromArray\"])(edge.style);\n      style = styles.style;\n      labelStyle = styles.labelStyle;\n    } else {\n      switch (edge.stroke) {\n        case 'normal':\n          style = 'fill:none';\n\n          if (typeof defaultStyle !== 'undefined') {\n            style = defaultStyle;\n          }\n\n          if (typeof defaultLabelStyle !== 'undefined') {\n            labelStyle = defaultLabelStyle;\n          }\n\n          break;\n\n        case 'dotted':\n          style = 'fill:none;stroke-width:2px;stroke-dasharray:3;';\n          break;\n\n        case 'thick':\n          style = ' stroke-width: 3.5px;fill:none';\n          break;\n      }\n    }\n\n    edgeData.style = style;\n    edgeData.labelStyle = labelStyle;\n\n    if (typeof edge.interpolate !== 'undefined') {\n      edgeData.curve = Object(_utils__WEBPACK_IMPORTED_MODULE_9__[\"interpolateToCurve\"])(edge.interpolate, d3__WEBPACK_IMPORTED_MODULE_1__[\"curveLinear\"]);\n    } else if (typeof edges.defaultInterpolate !== 'undefined') {\n      edgeData.curve = Object(_utils__WEBPACK_IMPORTED_MODULE_9__[\"interpolateToCurve\"])(edges.defaultInterpolate, d3__WEBPACK_IMPORTED_MODULE_1__[\"curveLinear\"]);\n    } else {\n      edgeData.curve = Object(_utils__WEBPACK_IMPORTED_MODULE_9__[\"interpolateToCurve\"])(conf.curve, d3__WEBPACK_IMPORTED_MODULE_1__[\"curveLinear\"]);\n    }\n\n    if (typeof edge.text === 'undefined') {\n      if (typeof edge.style !== 'undefined') {\n        edgeData.arrowheadStyle = 'fill: #333';\n      }\n    } else {\n      edgeData.arrowheadStyle = 'fill: #333';\n      edgeData.labelpos = 'c';\n\n      if (Object(_common_common__WEBPACK_IMPORTED_MODULE_8__[\"evaluate\"])(Object(_config__WEBPACK_IMPORTED_MODULE_4__[\"getConfig\"])().flowchart.htmlLabels)) {\n        edgeData.labelType = 'html';\n        edgeData.label = \"<span id=\\\"L-\".concat(linkId, \"\\\" class=\\\"edgeLabel L-\").concat(linkNameStart, \"' L-\").concat(linkNameEnd, \"\\\">\").concat(edge.text.replace(/fa[lrsb]?:fa-[\\w-]+/g, function (s) {\n          return \"<i class='\".concat(s.replace(':', ' '), \"'></i>\");\n        }), \"</span>\");\n      } else {\n        edgeData.labelType = 'text';\n        edgeData.label = edge.text.replace(_common_common__WEBPACK_IMPORTED_MODULE_8__[\"default\"].lineBreakRegex, '\\n');\n\n        if (typeof edge.style === 'undefined') {\n          edgeData.style = edgeData.style || 'stroke: #333; stroke-width: 1.5px;fill:none';\n        }\n\n        edgeData.labelStyle = edgeData.labelStyle.replace('color:', 'fill:');\n      }\n    }\n\n    edgeData.id = linkId;\n    edgeData.class = linkNameStart + ' ' + linkNameEnd;\n    edgeData.minlen = edge.length || 1; // Add the edge to the graph\n\n    g.setEdge(_flowDb__WEBPACK_IMPORTED_MODULE_2__[\"default\"].lookUpDomId(edge.start), _flowDb__WEBPACK_IMPORTED_MODULE_2__[\"default\"].lookUpDomId(edge.end), edgeData, cnt);\n  });\n};\n/**\n * Returns the all the styles from classDef statements in the graph definition.\n * @returns {object} classDef styles\n */\n\nvar getClasses = function getClasses(text) {\n  _logger__WEBPACK_IMPORTED_MODULE_7__[\"log\"].info('Extracting classes');\n  _flowDb__WEBPACK_IMPORTED_MODULE_2__[\"default\"].clear();\n\n  try {\n    var parser = _parser_flow__WEBPACK_IMPORTED_MODULE_3___default.a.parser;\n    parser.yy = _flowDb__WEBPACK_IMPORTED_MODULE_2__[\"default\"]; // Parse the graph definition\n\n    parser.parse(text);\n    return _flowDb__WEBPACK_IMPORTED_MODULE_2__[\"default\"].getClasses();\n  } catch (e) {\n    return;\n  }\n};\n/**\n * Draws a flowchart in the tag with id: id based on the graph definition in text.\n * @param text\n * @param id\n */\n\nvar draw = function draw(text, id) {\n  _logger__WEBPACK_IMPORTED_MODULE_7__[\"log\"].info('Drawing flowchart');\n  _flowDb__WEBPACK_IMPORTED_MODULE_2__[\"default\"].clear();\n  _flowDb__WEBPACK_IMPORTED_MODULE_2__[\"default\"].setGen('gen-1');\n  var parser = _parser_flow__WEBPACK_IMPORTED_MODULE_3___default.a.parser;\n  parser.yy = _flowDb__WEBPACK_IMPORTED_MODULE_2__[\"default\"]; // Parse the graph definition\n  // try {\n\n  parser.parse(text); // } catch (err) {\n  // log.debug('Parsing failed');\n  // }\n  // Fetch the default direction, use TD if none was found\n\n  var dir = _flowDb__WEBPACK_IMPORTED_MODULE_2__[\"default\"].getDirection();\n\n  if (typeof dir === 'undefined') {\n    dir = 'TD';\n  }\n\n  var conf = Object(_config__WEBPACK_IMPORTED_MODULE_4__[\"getConfig\"])().flowchart;\n  var nodeSpacing = conf.nodeSpacing || 50;\n  var rankSpacing = conf.rankSpacing || 50; // Create the input mermaid.graph\n\n  var g = new graphlib__WEBPACK_IMPORTED_MODULE_0___default.a.Graph({\n    multigraph: true,\n    compound: true\n  }).setGraph({\n    rankdir: dir,\n    nodesep: nodeSpacing,\n    ranksep: rankSpacing,\n    marginx: 8,\n    marginy: 8\n  }).setDefaultEdgeLabel(function () {\n    return {};\n  });\n  var subG;\n  var subGraphs = _flowDb__WEBPACK_IMPORTED_MODULE_2__[\"default\"].getSubGraphs();\n\n  for (var _i = subGraphs.length - 1; _i >= 0; _i--) {\n    subG = subGraphs[_i];\n    _flowDb__WEBPACK_IMPORTED_MODULE_2__[\"default\"].addVertex(subG.id, subG.title, 'group', undefined, subG.classes);\n  } // Fetch the verices/nodes and edges/links from the parsed graph definition\n\n\n  var vert = _flowDb__WEBPACK_IMPORTED_MODULE_2__[\"default\"].getVertices();\n  _logger__WEBPACK_IMPORTED_MODULE_7__[\"log\"].warn('Get vertices', vert);\n  var edges = _flowDb__WEBPACK_IMPORTED_MODULE_2__[\"default\"].getEdges();\n  var i = 0;\n\n  for (i = subGraphs.length - 1; i >= 0; i--) {\n    subG = subGraphs[i];\n    Object(d3__WEBPACK_IMPORTED_MODULE_1__[\"selectAll\"])('cluster').append('text');\n\n    for (var j = 0; j < subG.nodes.length; j++) {\n      _logger__WEBPACK_IMPORTED_MODULE_7__[\"log\"].warn('Setting subgraph', subG.nodes[j], _flowDb__WEBPACK_IMPORTED_MODULE_2__[\"default\"].lookUpDomId(subG.nodes[j]), _flowDb__WEBPACK_IMPORTED_MODULE_2__[\"default\"].lookUpDomId(subG.id));\n      g.setParent(_flowDb__WEBPACK_IMPORTED_MODULE_2__[\"default\"].lookUpDomId(subG.nodes[j]), _flowDb__WEBPACK_IMPORTED_MODULE_2__[\"default\"].lookUpDomId(subG.id));\n    }\n  }\n\n  addVertices(vert, g, id);\n  addEdges(edges, g); // Create the renderer\n\n  var Render = dagre_d3__WEBPACK_IMPORTED_MODULE_5___default.a.render;\n  var render = new Render(); // Add custom shapes\n\n  _flowChartShapes__WEBPACK_IMPORTED_MODULE_10__[\"default\"].addToRender(render); // Add our custom arrow - an empty arrowhead\n\n  render.arrows().none = function normal(parent, id, edge, type) {\n    var marker = parent.append('marker').attr('id', id).attr('viewBox', '0 0 10 10').attr('refX', 9).attr('refY', 5).attr('markerUnits', 'strokeWidth').attr('markerWidth', 8).attr('markerHeight', 6).attr('orient', 'auto');\n    var path = marker.append('path').attr('d', 'M 0 0 L 0 0 L 0 0 z');\n    dagre_d3__WEBPACK_IMPORTED_MODULE_5___default.a.util.applyStyle(path, edge[type + 'Style']);\n  }; // Override normal arrowhead defined in d3. Remove style & add class to allow css styling.\n\n\n  render.arrows().normal = function normal(parent, id) {\n    var marker = parent.append('marker').attr('id', id).attr('viewBox', '0 0 10 10').attr('refX', 9).attr('refY', 5).attr('markerUnits', 'strokeWidth').attr('markerWidth', 8).attr('markerHeight', 6).attr('orient', 'auto');\n    marker.append('path').attr('d', 'M 0 0 L 10 5 L 0 10 z').attr('class', 'arrowheadPath').style('stroke-width', 1).style('stroke-dasharray', '1,0');\n  }; // Set up an SVG group so that we can translate the final graph.\n\n\n  var svg = Object(d3__WEBPACK_IMPORTED_MODULE_1__[\"select\"])(\"[id=\\\"\".concat(id, \"\\\"]\"));\n  svg.attr('xmlns:xlink', 'http://www.w3.org/1999/xlink');\n  _logger__WEBPACK_IMPORTED_MODULE_7__[\"log\"].warn(g); // Run the renderer. This is what draws the final graph.\n\n  var element = Object(d3__WEBPACK_IMPORTED_MODULE_1__[\"select\"])('#' + id + ' g');\n  render(element, g);\n  element.selectAll('g.node').attr('title', function () {\n    return _flowDb__WEBPACK_IMPORTED_MODULE_2__[\"default\"].getTooltip(this.id);\n  });\n  var padding = conf.diagramPadding;\n  var svgBounds = svg.node().getBBox();\n  var width = svgBounds.width + padding * 2;\n  var height = svgBounds.height + padding * 2;\n  Object(_utils__WEBPACK_IMPORTED_MODULE_9__[\"configureSvgSize\"])(svg, height, width, conf.useMaxWidth); // Ensure the viewBox includes the whole svgBounds area with extra space for padding\n\n  var vBox = \"\".concat(svgBounds.x - padding, \" \").concat(svgBounds.y - padding, \" \").concat(width, \" \").concat(height);\n  _logger__WEBPACK_IMPORTED_MODULE_7__[\"log\"].debug(\"viewBox \".concat(vBox));\n  svg.attr('viewBox', vBox); // Index nodes\n\n  _flowDb__WEBPACK_IMPORTED_MODULE_2__[\"default\"].indexNodes('subGraph' + i); // reposition labels\n\n  for (i = 0; i < subGraphs.length; i++) {\n    subG = subGraphs[i];\n\n    if (subG.title !== 'undefined') {\n      var clusterRects = document.querySelectorAll('#' + id + ' [id=\"' + _flowDb__WEBPACK_IMPORTED_MODULE_2__[\"default\"].lookUpDomId(subG.id) + '\"] rect');\n      var clusterEl = document.querySelectorAll('#' + id + ' [id=\"' + _flowDb__WEBPACK_IMPORTED_MODULE_2__[\"default\"].lookUpDomId(subG.id) + '\"]');\n      var xPos = clusterRects[0].x.baseVal.value;\n      var yPos = clusterRects[0].y.baseVal.value;\n      var _width = clusterRects[0].width.baseVal.value;\n      var cluster = Object(d3__WEBPACK_IMPORTED_MODULE_1__[\"select\"])(clusterEl[0]);\n      var te = cluster.select('.label');\n      te.attr('transform', \"translate(\".concat(xPos + _width / 2, \", \").concat(yPos + 14, \")\"));\n      te.attr('id', id + 'Text');\n\n      for (var _j = 0; _j < subG.classes.length; _j++) {\n        clusterEl[0].classList.add(subG.classes[_j]);\n      }\n    }\n  } // Add label rects for non html labels\n\n\n  if (!Object(_common_common__WEBPACK_IMPORTED_MODULE_8__[\"evaluate\"])(conf.htmlLabels) || true) {\n    // eslint-disable-line\n    var labels = document.querySelectorAll('[id=\"' + id + '\"] .edgeLabel .label');\n\n    for (var k = 0; k < labels.length; k++) {\n      var label = labels[k]; // Get dimensions of label\n\n      var dim = label.getBBox();\n      var rect = document.createElementNS('http://www.w3.org/2000/svg', 'rect');\n      rect.setAttribute('rx', 0);\n      rect.setAttribute('ry', 0);\n      rect.setAttribute('width', dim.width);\n      rect.setAttribute('height', dim.height); // rect.setAttribute('style', 'fill:#e8e8e8;');\n\n      label.insertBefore(rect, label.firstChild);\n    }\n  } // If node has a link, wrap it in an anchor SVG object.\n\n\n  var keys = Object.keys(vert);\n  keys.forEach(function (key) {\n    var vertex = vert[key];\n\n    if (vertex.link) {\n      var node = Object(d3__WEBPACK_IMPORTED_MODULE_1__[\"select\"])('#' + id + ' [id=\"' + _flowDb__WEBPACK_IMPORTED_MODULE_2__[\"default\"].lookUpDomId(key) + '\"]');\n\n      if (node) {\n        var link = document.createElementNS('http://www.w3.org/2000/svg', 'a');\n        link.setAttributeNS('http://www.w3.org/2000/svg', 'class', vertex.classes.join(' '));\n        link.setAttributeNS('http://www.w3.org/2000/svg', 'href', vertex.link);\n        link.setAttributeNS('http://www.w3.org/2000/svg', 'rel', 'noopener');\n\n        if (vertex.linkTarget) {\n          link.setAttributeNS('http://www.w3.org/2000/svg', 'target', vertex.linkTarget);\n        }\n\n        var linkNode = node.insert(function () {\n          return link;\n        }, ':first-child');\n        var shape = node.select('.label-container');\n\n        if (shape) {\n          linkNode.append(function () {\n            return shape.node();\n          });\n        }\n\n        var _label = node.select('.label');\n\n        if (_label) {\n          linkNode.append(function () {\n            return _label.node();\n          });\n        }\n      }\n    }\n  });\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n  setConf: setConf,\n  addVertices: addVertices,\n  addEdges: addEdges,\n  getClasses: getClasses,\n  draw: draw\n});\n\n/***/ }),\n\n/***/ \"./src/diagrams/flowchart/parser/flow.jison\":\n/*!**************************************************!*\\\n  !*** ./src/diagrams/flowchart/parser/flow.jison ***!\n  \\**************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n/* WEBPACK VAR INJECTION */(function(process, module) {/* parser generated by jison 0.4.18 */\n/*\n  Returns a Parser object of the following structure:\n\n  Parser: {\n    yy: {}\n  }\n\n  Parser.prototype: {\n    yy: {},\n    trace: function(),\n    symbols_: {associative list: name ==> number},\n    terminals_: {associative list: number ==> name},\n    productions_: [...],\n    performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$),\n    table: [...],\n    defaultActions: {...},\n    parseError: function(str, hash),\n    parse: function(input),\n\n    lexer: {\n        EOF: 1,\n        parseError: function(str, hash),\n        setInput: function(input),\n        input: function(),\n        unput: function(str),\n        more: function(),\n        less: function(n),\n        pastInput: function(),\n        upcomingInput: function(),\n        showPosition: function(),\n        test_match: function(regex_match_array, rule_index),\n        next: function(),\n        lex: function(),\n        begin: function(condition),\n        popState: function(),\n        _currentRules: function(),\n        topState: function(),\n        pushState: function(condition),\n\n        options: {\n            ranges: boolean           (optional: true ==> token location info will include a .range[] member)\n            flex: boolean             (optional: true ==> flex-like lexing behaviour where the rules are tested exhaustively to find the longest match)\n            backtrack_lexer: boolean  (optional: true ==> lexer regexes are tested in order and for each matching regex the action code is invoked; the lexer terminates the scan when a token is returned by the action code)\n        },\n\n        performAction: function(yy, yy_, $avoiding_name_collisions, YY_START),\n        rules: [...],\n        conditions: {associative list: name ==> set},\n    }\n  }\n\n\n  token location info (@$, _$, etc.): {\n    first_line: n,\n    last_line: n,\n    first_column: n,\n    last_column: n,\n    range: [start_number, end_number]       (where the numbers are indexes into the input string, regular zero-based)\n  }\n\n\n  the parseError function receives a 'hash' object with these members for lexer and parser errors: {\n    text:        (matched text)\n    token:       (the produced terminal token, if any)\n    line:        (yylineno)\n  }\n  while parser (grammar) errors will also provide these members, i.e. parser errors deliver a superset of attributes: {\n    loc:         (yylloc)\n    expected:    (string describing the set of expected tokens)\n    recoverable: (boolean: TRUE when the parser has a error recovery rule available for this particular error)\n  }\n*/\nvar parser = (function(){\nvar o=function(k,v,o,l){for(o=o||{},l=k.length;l--;o[k[l]]=v);return o},$V0=[1,9],$V1=[1,7],$V2=[1,6],$V3=[1,8],$V4=[1,20,21,22,23,38,47,76,77,78,79,80,81,95,96,99,100,101,103,104,110,111,112,113,114,115,116,117,118,119],$V5=[2,10],$V6=[1,20],$V7=[1,21],$V8=[1,22],$V9=[1,23],$Va=[1,30],$Vb=[1,59],$Vc=[1,33],$Vd=[1,34],$Ve=[1,35],$Vf=[1,36],$Vg=[1,37],$Vh=[1,53],$Vi=[1,48],$Vj=[1,50],$Vk=[1,45],$Vl=[1,49],$Vm=[1,52],$Vn=[1,56],$Vo=[1,57],$Vp=[1,38],$Vq=[1,39],$Vr=[1,40],$Vs=[1,41],$Vt=[1,58],$Vu=[1,47],$Vv=[1,51],$Vw=[1,54],$Vx=[1,55],$Vy=[1,46],$Vz=[1,62],$VA=[1,67],$VB=[1,20,21,22,23,38,42,47,76,77,78,79,80,81,95,96,99,100,101,103,104,110,111,112,113,114,115,116,117,118,119],$VC=[1,71],$VD=[1,70],$VE=[1,72],$VF=[20,21,23,70,71],$VG=[1,93],$VH=[1,98],$VI=[1,95],$VJ=[1,100],$VK=[1,103],$VL=[1,101],$VM=[1,102],$VN=[1,96],$VO=[1,108],$VP=[1,107],$VQ=[1,97],$VR=[1,99],$VS=[1,104],$VT=[1,105],$VU=[1,106],$VV=[1,109],$VW=[20,21,22,23,70,71],$VX=[20,21,22,23,48,70,71],$VY=[20,21,22,23,40,47,48,50,52,54,56,58,60,62,63,65,70,71,81,95,96,99,100,101,103,104,114,115,116,117,118,119],$VZ=[20,21,23],$V_=[20,21,23,47,70,71,81,95,96,99,100,101,103,104,114,115,116,117,118,119],$V$=[1,12,20,21,22,23,24,38,42,47,76,77,78,79,80,81,95,96,99,100,101,103,104,110,111,112,113,114,115,116,117,118,119],$V01=[47,81,95,96,99,100,101,103,104,114,115,116,117,118,119],$V11=[1,141],$V21=[1,149],$V31=[1,150],$V41=[1,151],$V51=[1,152],$V61=[1,136],$V71=[1,137],$V81=[1,133],$V91=[1,144],$Va1=[1,145],$Vb1=[1,146],$Vc1=[1,147],$Vd1=[1,148],$Ve1=[1,153],$Vf1=[1,154],$Vg1=[1,139],$Vh1=[1,142],$Vi1=[1,138],$Vj1=[1,135],$Vk1=[20,21,22,23,38,42,47,76,77,78,79,80,81,95,96,99,100,101,103,104,110,111,112,113,114,115,116,117,118,119],$Vl1=[1,157],$Vm1=[20,21,22,23,26,47,81,95,96,99,100,101,103,104,114,115,116,117,118,119],$Vn1=[20,21,22,23,24,26,38,40,41,42,47,51,53,55,57,59,61,62,64,66,70,71,72,76,77,78,79,80,81,82,85,95,96,99,100,101,103,104,105,106,114,115,116,117,118,119],$Vo1=[12,21,22,24],$Vp1=[22,96],$Vq1=[1,238],$Vr1=[1,242],$Vs1=[1,239],$Vt1=[1,236],$Vu1=[1,233],$Vv1=[1,234],$Vw1=[1,235],$Vx1=[1,237],$Vy1=[1,240],$Vz1=[1,241],$VA1=[1,243],$VB1=[1,260],$VC1=[20,21,23,96],$VD1=[20,21,22,23,76,92,95,96,99,100,101,102,103,104,105];\nvar parser = {trace: function trace () { },\nyy: {},\nsymbols_: {\"error\":2,\"start\":3,\"mermaidDoc\":4,\"directive\":5,\"openDirective\":6,\"typeDirective\":7,\"closeDirective\":8,\"separator\":9,\":\":10,\"argDirective\":11,\"open_directive\":12,\"type_directive\":13,\"arg_directive\":14,\"close_directive\":15,\"graphConfig\":16,\"document\":17,\"line\":18,\"statement\":19,\"SEMI\":20,\"NEWLINE\":21,\"SPACE\":22,\"EOF\":23,\"GRAPH\":24,\"NODIR\":25,\"DIR\":26,\"FirstStmtSeperator\":27,\"ending\":28,\"endToken\":29,\"spaceList\":30,\"spaceListNewline\":31,\"verticeStatement\":32,\"styleStatement\":33,\"linkStyleStatement\":34,\"classDefStatement\":35,\"classStatement\":36,\"clickStatement\":37,\"subgraph\":38,\"text\":39,\"SQS\":40,\"SQE\":41,\"end\":42,\"direction\":43,\"link\":44,\"node\":45,\"vertex\":46,\"AMP\":47,\"STYLE_SEPARATOR\":48,\"idString\":49,\"PS\":50,\"PE\":51,\"(-\":52,\"-)\":53,\"STADIUMSTART\":54,\"STADIUMEND\":55,\"SUBROUTINESTART\":56,\"SUBROUTINEEND\":57,\"CYLINDERSTART\":58,\"CYLINDEREND\":59,\"DIAMOND_START\":60,\"DIAMOND_STOP\":61,\"TAGEND\":62,\"TRAPSTART\":63,\"TRAPEND\":64,\"INVTRAPSTART\":65,\"INVTRAPEND\":66,\"linkStatement\":67,\"arrowText\":68,\"TESTSTR\":69,\"START_LINK\":70,\"LINK\":71,\"PIPE\":72,\"textToken\":73,\"STR\":74,\"keywords\":75,\"STYLE\":76,\"LINKSTYLE\":77,\"CLASSDEF\":78,\"CLASS\":79,\"CLICK\":80,\"DOWN\":81,\"UP\":82,\"textNoTags\":83,\"textNoTagsToken\":84,\"DEFAULT\":85,\"stylesOpt\":86,\"alphaNum\":87,\"CALLBACKNAME\":88,\"CALLBACKARGS\":89,\"HREF\":90,\"LINK_TARGET\":91,\"HEX\":92,\"numList\":93,\"INTERPOLATE\":94,\"NUM\":95,\"COMMA\":96,\"style\":97,\"styleComponent\":98,\"ALPHA\":99,\"COLON\":100,\"MINUS\":101,\"UNIT\":102,\"BRKT\":103,\"DOT\":104,\"PCT\":105,\"TAGSTART\":106,\"alphaNumToken\":107,\"idStringToken\":108,\"alphaNumStatement\":109,\"direction_tb\":110,\"direction_bt\":111,\"direction_rl\":112,\"direction_lr\":113,\"PUNCTUATION\":114,\"UNICODE_TEXT\":115,\"PLUS\":116,\"EQUALS\":117,\"MULT\":118,\"UNDERSCORE\":119,\"graphCodeTokens\":120,\"ARROW_CROSS\":121,\"ARROW_POINT\":122,\"ARROW_CIRCLE\":123,\"ARROW_OPEN\":124,\"QUOTE\":125,\"$accept\":0,\"$end\":1},\nterminals_: {2:\"error\",10:\":\",12:\"open_directive\",13:\"type_directive\",14:\"arg_directive\",15:\"close_directive\",20:\"SEMI\",21:\"NEWLINE\",22:\"SPACE\",23:\"EOF\",24:\"GRAPH\",25:\"NODIR\",26:\"DIR\",38:\"subgraph\",40:\"SQS\",41:\"SQE\",42:\"end\",47:\"AMP\",48:\"STYLE_SEPARATOR\",50:\"PS\",51:\"PE\",52:\"(-\",53:\"-)\",54:\"STADIUMSTART\",55:\"STADIUMEND\",56:\"SUBROUTINESTART\",57:\"SUBROUTINEEND\",58:\"CYLINDERSTART\",59:\"CYLINDEREND\",60:\"DIAMOND_START\",61:\"DIAMOND_STOP\",62:\"TAGEND\",63:\"TRAPSTART\",64:\"TRAPEND\",65:\"INVTRAPSTART\",66:\"INVTRAPEND\",69:\"TESTSTR\",70:\"START_LINK\",71:\"LINK\",72:\"PIPE\",74:\"STR\",76:\"STYLE\",77:\"LINKSTYLE\",78:\"CLASSDEF\",79:\"CLASS\",80:\"CLICK\",81:\"DOWN\",82:\"UP\",85:\"DEFAULT\",88:\"CALLBACKNAME\",89:\"CALLBACKARGS\",90:\"HREF\",91:\"LINK_TARGET\",92:\"HEX\",94:\"INTERPOLATE\",95:\"NUM\",96:\"COMMA\",99:\"ALPHA\",100:\"COLON\",101:\"MINUS\",102:\"UNIT\",103:\"BRKT\",104:\"DOT\",105:\"PCT\",106:\"TAGSTART\",110:\"direction_tb\",111:\"direction_bt\",112:\"direction_rl\",113:\"direction_lr\",114:\"PUNCTUATION\",115:\"UNICODE_TEXT\",116:\"PLUS\",117:\"EQUALS\",118:\"MULT\",119:\"UNDERSCORE\",121:\"ARROW_CROSS\",122:\"ARROW_POINT\",123:\"ARROW_CIRCLE\",124:\"ARROW_OPEN\",125:\"QUOTE\"},\nproductions_: [0,[3,1],[3,2],[5,4],[5,6],[6,1],[7,1],[11,1],[8,1],[4,2],[17,0],[17,2],[18,1],[18,1],[18,1],[18,1],[18,1],[16,2],[16,2],[16,2],[16,3],[28,2],[28,1],[29,1],[29,1],[29,1],[27,1],[27,1],[27,2],[31,2],[31,2],[31,1],[31,1],[30,2],[30,1],[19,2],[19,2],[19,2],[19,2],[19,2],[19,2],[19,9],[19,6],[19,4],[19,1],[9,1],[9,1],[9,1],[32,3],[32,4],[32,2],[32,1],[45,1],[45,5],[45,3],[46,4],[46,6],[46,4],[46,4],[46,4],[46,4],[46,4],[46,4],[46,6],[46,4],[46,4],[46,4],[46,4],[46,4],[46,1],[44,2],[44,3],[44,3],[44,1],[44,3],[67,1],[68,3],[39,1],[39,2],[39,1],[75,1],[75,1],[75,1],[75,1],[75,1],[75,1],[75,1],[75,1],[75,1],[75,1],[75,1],[83,1],[83,2],[35,5],[35,5],[36,5],[37,2],[37,4],[37,3],[37,5],[37,2],[37,4],[37,4],[37,6],[37,2],[37,4],[37,2],[37,4],[37,4],[37,6],[33,5],[33,5],[34,5],[34,5],[34,9],[34,9],[34,7],[34,7],[93,1],[93,3],[86,1],[86,3],[97,1],[97,2],[98,1],[98,1],[98,1],[98,1],[98,1],[98,1],[98,1],[98,1],[98,1],[98,1],[98,1],[73,1],[73,1],[73,1],[73,1],[73,1],[73,1],[84,1],[84,1],[84,1],[84,1],[49,1],[49,2],[87,1],[87,2],[109,1],[109,1],[109,1],[109,1],[43,1],[43,1],[43,1],[43,1],[107,1],[107,1],[107,1],[107,1],[107,1],[107,1],[107,1],[107,1],[107,1],[107,1],[107,1],[107,1],[107,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1]],\nperformAction: function anonymous(yytext, yyleng, yylineno, yy, yystate /* action[1] */, $$ /* vstack */, _$ /* lstack */) {\n/* this == yyval */\n\nvar $0 = $$.length - 1;\nswitch (yystate) {\ncase 5:\n yy.parseDirective('%%{', 'open_directive'); \nbreak;\ncase 6:\n yy.parseDirective($$[$0], 'type_directive'); \nbreak;\ncase 7:\n $$[$0] = $$[$0].trim().replace(/'/g, '\"'); yy.parseDirective($$[$0], 'arg_directive'); \nbreak;\ncase 8:\n yy.parseDirective('}%%', 'close_directive', 'flowchart'); \nbreak;\ncase 10:\n this.$ = [];\nbreak;\ncase 11:\n\n\t    if($$[$0] !== []){\n\t        $$[$0-1].push($$[$0]);\n\t    }\n\t    this.$=$$[$0-1];\nbreak;\ncase 12: case 77: case 79: case 91: case 147: case 149: case 150:\nthis.$=$$[$0];\nbreak;\ncase 19:\n yy.setDirection('TB');this.$ = 'TB';\nbreak;\ncase 20:\n yy.setDirection($$[$0-1]);this.$ = $$[$0-1];\nbreak;\ncase 35:\n /* console.warn('finat vs', $$[$0-1].nodes); */ this.$=$$[$0-1].nodes\nbreak;\ncase 36: case 37: case 38: case 39: case 40:\nthis.$=[];\nbreak;\ncase 41:\nthis.$=yy.addSubGraph($$[$0-6],$$[$0-1],$$[$0-4]);\nbreak;\ncase 42:\nthis.$=yy.addSubGraph($$[$0-3],$$[$0-1],$$[$0-3]);\nbreak;\ncase 43:\nthis.$=yy.addSubGraph(undefined,$$[$0-1],undefined);\nbreak;\ncase 48:\n /* console.warn('vs',$$[$0-2].stmt,$$[$0]); */ yy.addLink($$[$0-2].stmt,$$[$0],$$[$0-1]); this.$ = { stmt: $$[$0], nodes: $$[$0].concat($$[$0-2].nodes) } \nbreak;\ncase 49:\n /* console.warn('vs',$$[$0-3].stmt,$$[$0-1]); */ yy.addLink($$[$0-3].stmt,$$[$0-1],$$[$0-2]); this.$ = { stmt: $$[$0-1], nodes: $$[$0-1].concat($$[$0-3].nodes) } \nbreak;\ncase 50:\n/*console.warn('noda', $$[$0-1]);*/ this.$ = {stmt: $$[$0-1], nodes:$$[$0-1] }\nbreak;\ncase 51:\n /*console.warn('noda', $$[$0]);*/ this.$ = {stmt: $$[$0], nodes:$$[$0] }\nbreak;\ncase 52:\n /* console.warn('nod', $$[$0]); */ this.$ = [$$[$0]];\nbreak;\ncase 53:\n this.$ = $$[$0-4].concat($$[$0]); /* console.warn('pip', $$[$0-4][0], $$[$0], this.$); */ \nbreak;\ncase 54:\nthis.$ = [$$[$0-2]];yy.setClass($$[$0-2],$$[$0])\nbreak;\ncase 55:\nthis.$ = $$[$0-3];yy.addVertex($$[$0-3],$$[$0-1],'square');\nbreak;\ncase 56:\nthis.$ = $$[$0-5];yy.addVertex($$[$0-5],$$[$0-2],'circle');\nbreak;\ncase 57:\nthis.$ = $$[$0-3];yy.addVertex($$[$0-3],$$[$0-1],'ellipse');\nbreak;\ncase 58:\nthis.$ = $$[$0-3];yy.addVertex($$[$0-3],$$[$0-1],'stadium');\nbreak;\ncase 59:\nthis.$ = $$[$0-3];yy.addVertex($$[$0-3],$$[$0-1],'subroutine');\nbreak;\ncase 60:\nthis.$ = $$[$0-3];yy.addVertex($$[$0-3],$$[$0-1],'cylinder');\nbreak;\ncase 61:\nthis.$ = $$[$0-3];yy.addVertex($$[$0-3],$$[$0-1],'round');\nbreak;\ncase 62:\nthis.$ = $$[$0-3];yy.addVertex($$[$0-3],$$[$0-1],'diamond');\nbreak;\ncase 63:\nthis.$ = $$[$0-5];yy.addVertex($$[$0-5],$$[$0-2],'hexagon');\nbreak;\ncase 64:\nthis.$ = $$[$0-3];yy.addVertex($$[$0-3],$$[$0-1],'odd');\nbreak;\ncase 65:\nthis.$ = $$[$0-3];yy.addVertex($$[$0-3],$$[$0-1],'trapezoid');\nbreak;\ncase 66:\nthis.$ = $$[$0-3];yy.addVertex($$[$0-3],$$[$0-1],'inv_trapezoid');\nbreak;\ncase 67:\nthis.$ = $$[$0-3];yy.addVertex($$[$0-3],$$[$0-1],'lean_right');\nbreak;\ncase 68:\nthis.$ = $$[$0-3];yy.addVertex($$[$0-3],$$[$0-1],'lean_left');\nbreak;\ncase 69:\n /*console.warn('h: ', $$[$0]);*/this.$ = $$[$0];yy.addVertex($$[$0]);\nbreak;\ncase 70:\n$$[$0-1].text = $$[$0];this.$ = $$[$0-1];\nbreak;\ncase 71: case 72:\n$$[$0-2].text = $$[$0-1];this.$ = $$[$0-2];\nbreak;\ncase 73:\nthis.$ = $$[$0];\nbreak;\ncase 74:\nvar inf = yy.destructLink($$[$0], $$[$0-2]); this.$ = {\"type\":inf.type,\"stroke\":inf.stroke,\"length\":inf.length,\"text\":$$[$0-1]};\nbreak;\ncase 75:\nvar inf = yy.destructLink($$[$0]);this.$ = {\"type\":inf.type,\"stroke\":inf.stroke,\"length\":inf.length};\nbreak;\ncase 76:\nthis.$ = $$[$0-1];\nbreak;\ncase 78: case 92: case 148:\nthis.$=$$[$0-1]+''+$$[$0];\nbreak;\ncase 93: case 94:\nthis.$ = $$[$0-4];yy.addClass($$[$0-2],$$[$0]);\nbreak;\ncase 95:\nthis.$ = $$[$0-4];yy.setClass($$[$0-2], $$[$0]);\nbreak;\ncase 96: case 104:\nthis.$ = $$[$0-1];yy.setClickEvent($$[$0-1], $$[$0]);\nbreak;\ncase 97: case 105:\nthis.$ = $$[$0-3];yy.setClickEvent($$[$0-3], $$[$0-2]);yy.setTooltip($$[$0-3], $$[$0]);\nbreak;\ncase 98:\nthis.$ = $$[$0-2];yy.setClickEvent($$[$0-2], $$[$0-1], $$[$0]);\nbreak;\ncase 99:\nthis.$ = $$[$0-4];yy.setClickEvent($$[$0-4], $$[$0-3], $$[$0-2]);yy.setTooltip($$[$0-4], $$[$0]);\nbreak;\ncase 100: case 106:\nthis.$ = $$[$0-1];yy.setLink($$[$0-1], $$[$0]);\nbreak;\ncase 101: case 107:\nthis.$ = $$[$0-3];yy.setLink($$[$0-3], $$[$0-2]);yy.setTooltip($$[$0-3], $$[$0]);\nbreak;\ncase 102: case 108:\nthis.$ = $$[$0-3];yy.setLink($$[$0-3], $$[$0-2], $$[$0]);\nbreak;\ncase 103: case 109:\nthis.$ = $$[$0-5];yy.setLink($$[$0-5], $$[$0-4], $$[$0]);yy.setTooltip($$[$0-5], $$[$0-2]);\nbreak;\ncase 110:\nthis.$ = $$[$0-4];yy.addVertex($$[$0-2],undefined,undefined,$$[$0]);\nbreak;\ncase 111: case 113:\nthis.$ = $$[$0-4];yy.updateLink($$[$0-2],$$[$0]);\nbreak;\ncase 112:\nthis.$ = $$[$0-4];yy.updateLink([$$[$0-2]],$$[$0]);\nbreak;\ncase 114:\nthis.$ = $$[$0-8];yy.updateLinkInterpolate([$$[$0-6]],$$[$0-2]);yy.updateLink([$$[$0-6]],$$[$0]);\nbreak;\ncase 115:\nthis.$ = $$[$0-8];yy.updateLinkInterpolate($$[$0-6],$$[$0-2]);yy.updateLink($$[$0-6],$$[$0]);\nbreak;\ncase 116:\nthis.$ = $$[$0-6];yy.updateLinkInterpolate([$$[$0-4]],$$[$0]);\nbreak;\ncase 117:\nthis.$ = $$[$0-6];yy.updateLinkInterpolate($$[$0-4],$$[$0]);\nbreak;\ncase 118: case 120:\nthis.$ = [$$[$0]]\nbreak;\ncase 119: case 121:\n$$[$0-2].push($$[$0]);this.$ = $$[$0-2];\nbreak;\ncase 123:\nthis.$ = $$[$0-1] + $$[$0];\nbreak;\ncase 145:\nthis.$=$$[$0]\nbreak;\ncase 146:\nthis.$=$$[$0-1]+''+$$[$0]\nbreak;\ncase 151:\nthis.$='v';\nbreak;\ncase 152:\nthis.$='-';\nbreak;\ncase 153:\n this.$={stmt:'dir', value:'TB'};\nbreak;\ncase 154:\n this.$={stmt:'dir', value:'BT'};\nbreak;\ncase 155:\n this.$={stmt:'dir', value:'RL'};\nbreak;\ncase 156:\n this.$={stmt:'dir', value:'LR'};\nbreak;\n}\n},\ntable: [{3:1,4:2,5:3,6:5,12:$V0,16:4,21:$V1,22:$V2,24:$V3},{1:[3]},{1:[2,1]},{3:10,4:2,5:3,6:5,12:$V0,16:4,21:$V1,22:$V2,24:$V3},o($V4,$V5,{17:11}),{7:12,13:[1,13]},{16:14,21:$V1,22:$V2,24:$V3},{16:15,21:$V1,22:$V2,24:$V3},{25:[1,16],26:[1,17]},{13:[2,5]},{1:[2,2]},{1:[2,9],18:18,19:19,20:$V6,21:$V7,22:$V8,23:$V9,32:24,33:25,34:26,35:27,36:28,37:29,38:$Va,43:31,45:32,46:42,47:$Vb,49:43,76:$Vc,77:$Vd,78:$Ve,79:$Vf,80:$Vg,81:$Vh,95:$Vi,96:$Vj,99:$Vk,100:$Vl,101:$Vm,103:$Vn,104:$Vo,108:44,110:$Vp,111:$Vq,112:$Vr,113:$Vs,114:$Vt,115:$Vu,116:$Vv,117:$Vw,118:$Vx,119:$Vy},{8:60,10:[1,61],15:$Vz},o([10,15],[2,6]),o($V4,[2,17]),o($V4,[2,18]),o($V4,[2,19]),{20:[1,64],21:[1,65],22:$VA,27:63,30:66},o($VB,[2,11]),o($VB,[2,12]),o($VB,[2,13]),o($VB,[2,14]),o($VB,[2,15]),o($VB,[2,16]),{9:68,20:$VC,21:$VD,23:$VE,44:69,67:73,70:[1,74],71:[1,75]},{9:76,20:$VC,21:$VD,23:$VE},{9:77,20:$VC,21:$VD,23:$VE},{9:78,20:$VC,21:$VD,23:$VE},{9:79,20:$VC,21:$VD,23:$VE},{9:80,20:$VC,21:$VD,23:$VE},{9:82,20:$VC,21:$VD,22:[1,81],23:$VE},o($VB,[2,44]),o($VF,[2,51],{30:83,22:$VA}),{22:[1,84]},{22:[1,85]},{22:[1,86]},{22:[1,87]},{26:$VG,47:$VH,74:[1,91],81:$VI,87:90,88:[1,88],90:[1,89],95:$VJ,96:$VK,99:$VL,100:$VM,101:$VN,103:$VO,104:$VP,107:94,109:92,114:$VQ,115:$VR,116:$VS,117:$VT,118:$VU,119:$VV},o($VB,[2,153]),o($VB,[2,154]),o($VB,[2,155]),o($VB,[2,156]),o($VW,[2,52],{48:[1,110]}),o($VX,[2,69],{108:121,40:[1,111],47:$Vb,50:[1,112],52:[1,113],54:[1,114],56:[1,115],58:[1,116],60:[1,117],62:[1,118],63:[1,119],65:[1,120],81:$Vh,95:$Vi,96:$Vj,99:$Vk,100:$Vl,101:$Vm,103:$Vn,104:$Vo,114:$Vt,115:$Vu,116:$Vv,117:$Vw,118:$Vx,119:$Vy}),o($VY,[2,145]),o($VY,[2,170]),o($VY,[2,171]),o($VY,[2,172]),o($VY,[2,173]),o($VY,[2,174]),o($VY,[2,175]),o($VY,[2,176]),o($VY,[2,177]),o($VY,[2,178]),o($VY,[2,179]),o($VY,[2,180]),o($VY,[2,181]),o($VY,[2,182]),o($VY,[2,183]),o($VY,[2,184]),{9:122,20:$VC,21:$VD,23:$VE},{11:123,14:[1,124]},o($VZ,[2,8]),o($V4,[2,20]),o($V4,[2,26]),o($V4,[2,27]),{21:[1,125]},o($V_,[2,34],{30:126,22:$VA}),o($VB,[2,35]),{45:127,46:42,47:$Vb,49:43,81:$Vh,95:$Vi,96:$Vj,99:$Vk,100:$Vl,101:$Vm,103:$Vn,104:$Vo,108:44,114:$Vt,115:$Vu,116:$Vv,117:$Vw,118:$Vx,119:$Vy},o($V$,[2,45]),o($V$,[2,46]),o($V$,[2,47]),o($V01,[2,73],{68:128,69:[1,129],72:[1,130]}),{22:$V11,24:$V21,26:$V31,38:$V41,39:131,42:$V51,47:$VH,62:$V61,70:$V71,73:132,74:$V81,75:143,76:$V91,77:$Va1,78:$Vb1,79:$Vc1,80:$Vd1,81:$Ve1,82:$Vf1,84:134,85:$Vg1,95:$VJ,96:$VK,99:$VL,100:$VM,101:$Vh1,103:$VO,104:$VP,105:$Vi1,106:$Vj1,107:140,114:$VQ,115:$VR,116:$VS,117:$VT,118:$VU,119:$VV},o([47,69,72,81,95,96,99,100,101,103,104,114,115,116,117,118,119],[2,75]),o($VB,[2,36]),o($VB,[2,37]),o($VB,[2,38]),o($VB,[2,39]),o($VB,[2,40]),{22:$V11,24:$V21,26:$V31,38:$V41,39:155,42:$V51,47:$VH,62:$V61,70:$V71,73:132,74:$V81,75:143,76:$V91,77:$Va1,78:$Vb1,79:$Vc1,80:$Vd1,81:$Ve1,82:$Vf1,84:134,85:$Vg1,95:$VJ,96:$VK,99:$VL,100:$VM,101:$Vh1,103:$VO,104:$VP,105:$Vi1,106:$Vj1,107:140,114:$VQ,115:$VR,116:$VS,117:$VT,118:$VU,119:$VV},o($Vk1,$V5,{17:156}),o($VF,[2,50],{47:$Vl1}),{26:$VG,47:$VH,81:$VI,87:158,92:[1,159],95:$VJ,96:$VK,99:$VL,100:$VM,101:$VN,103:$VO,104:$VP,107:94,109:92,114:$VQ,115:$VR,116:$VS,117:$VT,118:$VU,119:$VV},{85:[1,160],93:161,95:[1,162]},{26:$VG,47:$VH,81:$VI,85:[1,163],87:164,95:$VJ,96:$VK,99:$VL,100:$VM,101:$VN,103:$VO,104:$VP,107:94,109:92,114:$VQ,115:$VR,116:$VS,117:$VT,118:$VU,119:$VV},{26:$VG,47:$VH,81:$VI,87:165,95:$VJ,96:$VK,99:$VL,100:$VM,101:$VN,103:$VO,104:$VP,107:94,109:92,114:$VQ,115:$VR,116:$VS,117:$VT,118:$VU,119:$VV},o($VZ,[2,96],{22:[1,166],89:[1,167]}),o($VZ,[2,100],{22:[1,168]}),o($VZ,[2,104],{107:94,109:170,22:[1,169],26:$VG,47:$VH,81:$VI,95:$VJ,96:$VK,99:$VL,100:$VM,101:$VN,103:$VO,104:$VP,114:$VQ,115:$VR,116:$VS,117:$VT,118:$VU,119:$VV}),o($VZ,[2,106],{22:[1,171]}),o($Vm1,[2,147]),o($Vm1,[2,149]),o($Vm1,[2,150]),o($Vm1,[2,151]),o($Vm1,[2,152]),o($Vn1,[2,157]),o($Vn1,[2,158]),o($Vn1,[2,159]),o($Vn1,[2,160]),o($Vn1,[2,161]),o($Vn1,[2,162]),o($Vn1,[2,163]),o($Vn1,[2,164]),o($Vn1,[2,165]),o($Vn1,[2,166]),o($Vn1,[2,167]),o($Vn1,[2,168]),o($Vn1,[2,169]),{47:$Vb,49:172,81:$Vh,95:$Vi,96:$Vj,99:$Vk,100:$Vl,101:$Vm,103:$Vn,104:$Vo,108:44,114:$Vt,115:$Vu,116:$Vv,117:$Vw,118:$Vx,119:$Vy},{22:$V11,24:$V21,26:$V31,38:$V41,39:173,42:$V51,47:$VH,62:$V61,70:$V71,73:132,74:$V81,75:143,76:$V91,77:$Va1,78:$Vb1,79:$Vc1,80:$Vd1,81:$Ve1,82:$Vf1,84:134,85:$Vg1,95:$VJ,96:$VK,99:$VL,100:$VM,101:$Vh1,103:$VO,104:$VP,105:$Vi1,106:$Vj1,107:140,114:$VQ,115:$VR,116:$VS,117:$VT,118:$VU,119:$VV},{22:$V11,24:$V21,26:$V31,38:$V41,39:175,42:$V51,47:$VH,50:[1,174],62:$V61,70:$V71,73:132,74:$V81,75:143,76:$V91,77:$Va1,78:$Vb1,79:$Vc1,80:$Vd1,81:$Ve1,82:$Vf1,84:134,85:$Vg1,95:$VJ,96:$VK,99:$VL,100:$VM,101:$Vh1,103:$VO,104:$VP,105:$Vi1,106:$Vj1,107:140,114:$VQ,115:$VR,116:$VS,117:$VT,118:$VU,119:$VV},{22:$V11,24:$V21,26:$V31,38:$V41,39:176,42:$V51,47:$VH,62:$V61,70:$V71,73:132,74:$V81,75:143,76:$V91,77:$Va1,78:$Vb1,79:$Vc1,80:$Vd1,81:$Ve1,82:$Vf1,84:134,85:$Vg1,95:$VJ,96:$VK,99:$VL,100:$VM,101:$Vh1,103:$VO,104:$VP,105:$Vi1,106:$Vj1,107:140,114:$VQ,115:$VR,116:$VS,117:$VT,118:$VU,119:$VV},{22:$V11,24:$V21,26:$V31,38:$V41,39:177,42:$V51,47:$VH,62:$V61,70:$V71,73:132,74:$V81,75:143,76:$V91,77:$Va1,78:$Vb1,79:$Vc1,80:$Vd1,81:$Ve1,82:$Vf1,84:134,85:$Vg1,95:$VJ,96:$VK,99:$VL,100:$VM,101:$Vh1,103:$VO,104:$VP,105:$Vi1,106:$Vj1,107:140,114:$VQ,115:$VR,116:$VS,117:$VT,118:$VU,119:$VV},{22:$V11,24:$V21,26:$V31,38:$V41,39:178,42:$V51,47:$VH,62:$V61,70:$V71,73:132,74:$V81,75:143,76:$V91,77:$Va1,78:$Vb1,79:$Vc1,80:$Vd1,81:$Ve1,82:$Vf1,84:134,85:$Vg1,95:$VJ,96:$VK,99:$VL,100:$VM,101:$Vh1,103:$VO,104:$VP,105:$Vi1,106:$Vj1,107:140,114:$VQ,115:$VR,116:$VS,117:$VT,118:$VU,119:$VV},{22:$V11,24:$V21,26:$V31,38:$V41,39:179,42:$V51,47:$VH,62:$V61,70:$V71,73:132,74:$V81,75:143,76:$V91,77:$Va1,78:$Vb1,79:$Vc1,80:$Vd1,81:$Ve1,82:$Vf1,84:134,85:$Vg1,95:$VJ,96:$VK,99:$VL,100:$VM,101:$Vh1,103:$VO,104:$VP,105:$Vi1,106:$Vj1,107:140,114:$VQ,115:$VR,116:$VS,117:$VT,118:$VU,119:$VV},{22:$V11,24:$V21,26:$V31,38:$V41,39:180,42:$V51,47:$VH,60:[1,181],62:$V61,70:$V71,73:132,74:$V81,75:143,76:$V91,77:$Va1,78:$Vb1,79:$Vc1,80:$Vd1,81:$Ve1,82:$Vf1,84:134,85:$Vg1,95:$VJ,96:$VK,99:$VL,100:$VM,101:$Vh1,103:$VO,104:$VP,105:$Vi1,106:$Vj1,107:140,114:$VQ,115:$VR,116:$VS,117:$VT,118:$VU,119:$VV},{22:$V11,24:$V21,26:$V31,38:$V41,39:182,42:$V51,47:$VH,62:$V61,70:$V71,73:132,74:$V81,75:143,76:$V91,77:$Va1,78:$Vb1,79:$Vc1,80:$Vd1,81:$Ve1,82:$Vf1,84:134,85:$Vg1,95:$VJ,96:$VK,99:$VL,100:$VM,101:$Vh1,103:$VO,104:$VP,105:$Vi1,106:$Vj1,107:140,114:$VQ,115:$VR,116:$VS,117:$VT,118:$VU,119:$VV},{22:$V11,24:$V21,26:$V31,38:$V41,39:183,42:$V51,47:$VH,62:$V61,70:$V71,73:132,74:$V81,75:143,76:$V91,77:$Va1,78:$Vb1,79:$Vc1,80:$Vd1,81:$Ve1,82:$Vf1,84:134,85:$Vg1,95:$VJ,96:$VK,99:$VL,100:$VM,101:$Vh1,103:$VO,104:$VP,105:$Vi1,106:$Vj1,107:140,114:$VQ,115:$VR,116:$VS,117:$VT,118:$VU,119:$VV},{22:$V11,24:$V21,26:$V31,38:$V41,39:184,42:$V51,47:$VH,62:$V61,70:$V71,73:132,74:$V81,75:143,76:$V91,77:$Va1,78:$Vb1,79:$Vc1,80:$Vd1,81:$Ve1,82:$Vf1,84:134,85:$Vg1,95:$VJ,96:$VK,99:$VL,100:$VM,101:$Vh1,103:$VO,104:$VP,105:$Vi1,106:$Vj1,107:140,114:$VQ,115:$VR,116:$VS,117:$VT,118:$VU,119:$VV},o($VY,[2,146]),o($Vo1,[2,3]),{8:185,15:$Vz},{15:[2,7]},o($V4,[2,28]),o($V_,[2,33]),o($VF,[2,48],{30:186,22:$VA}),o($V01,[2,70],{22:[1,187]}),{22:[1,188]},{22:$V11,24:$V21,26:$V31,38:$V41,39:189,42:$V51,47:$VH,62:$V61,70:$V71,73:132,74:$V81,75:143,76:$V91,77:$Va1,78:$Vb1,79:$Vc1,80:$Vd1,81:$Ve1,82:$Vf1,84:134,85:$Vg1,95:$VJ,96:$VK,99:$VL,100:$VM,101:$Vh1,103:$VO,104:$VP,105:$Vi1,106:$Vj1,107:140,114:$VQ,115:$VR,116:$VS,117:$VT,118:$VU,119:$VV},{22:$V11,24:$V21,26:$V31,38:$V41,42:$V51,47:$VH,62:$V61,70:$V71,71:[1,190],73:191,75:143,76:$V91,77:$Va1,78:$Vb1,79:$Vc1,80:$Vd1,81:$Ve1,82:$Vf1,84:134,85:$Vg1,95:$VJ,96:$VK,99:$VL,100:$VM,101:$Vh1,103:$VO,104:$VP,105:$Vi1,106:$Vj1,107:140,114:$VQ,115:$VR,116:$VS,117:$VT,118:$VU,119:$VV},o($Vn1,[2,77]),o($Vn1,[2,79]),o($Vn1,[2,135]),o($Vn1,[2,136]),o($Vn1,[2,137]),o($Vn1,[2,138]),o($Vn1,[2,139]),o($Vn1,[2,140]),o($Vn1,[2,141]),o($Vn1,[2,142]),o($Vn1,[2,143]),o($Vn1,[2,144]),o($Vn1,[2,80]),o($Vn1,[2,81]),o($Vn1,[2,82]),o($Vn1,[2,83]),o($Vn1,[2,84]),o($Vn1,[2,85]),o($Vn1,[2,86]),o($Vn1,[2,87]),o($Vn1,[2,88]),o($Vn1,[2,89]),o($Vn1,[2,90]),{9:193,20:$VC,21:$VD,22:$V11,23:$VE,24:$V21,26:$V31,38:$V41,40:[1,192],42:$V51,47:$VH,62:$V61,70:$V71,73:191,75:143,76:$V91,77:$Va1,78:$Vb1,79:$Vc1,80:$Vd1,81:$Ve1,82:$Vf1,84:134,85:$Vg1,95:$VJ,96:$VK,99:$VL,100:$VM,101:$Vh1,103:$VO,104:$VP,105:$Vi1,106:$Vj1,107:140,114:$VQ,115:$VR,116:$VS,117:$VT,118:$VU,119:$VV},{18:18,19:19,20:$V6,21:$V7,22:$V8,23:$V9,32:24,33:25,34:26,35:27,36:28,37:29,38:$Va,42:[1,194],43:31,45:32,46:42,47:$Vb,49:43,76:$Vc,77:$Vd,78:$Ve,79:$Vf,80:$Vg,81:$Vh,95:$Vi,96:$Vj,99:$Vk,100:$Vl,101:$Vm,103:$Vn,104:$Vo,108:44,110:$Vp,111:$Vq,112:$Vr,113:$Vs,114:$Vt,115:$Vu,116:$Vv,117:$Vw,118:$Vx,119:$Vy},{22:$VA,30:195},{22:[1,196],26:$VG,47:$VH,81:$VI,95:$VJ,96:$VK,99:$VL,100:$VM,101:$VN,103:$VO,104:$VP,107:94,109:170,114:$VQ,115:$VR,116:$VS,117:$VT,118:$VU,119:$VV},{22:[1,197]},{22:[1,198]},{22:[1,199],96:[1,200]},o($Vp1,[2,118]),{22:[1,201]},{22:[1,202],26:$VG,47:$VH,81:$VI,95:$VJ,96:$VK,99:$VL,100:$VM,101:$VN,103:$VO,104:$VP,107:94,109:170,114:$VQ,115:$VR,116:$VS,117:$VT,118:$VU,119:$VV},{22:[1,203],26:$VG,47:$VH,81:$VI,95:$VJ,96:$VK,99:$VL,100:$VM,101:$VN,103:$VO,104:$VP,107:94,109:170,114:$VQ,115:$VR,116:$VS,117:$VT,118:$VU,119:$VV},{74:[1,204]},o($VZ,[2,98],{22:[1,205]}),{74:[1,206],91:[1,207]},{74:[1,208]},o($Vm1,[2,148]),{74:[1,209],91:[1,210]},o($VW,[2,54],{108:121,47:$Vb,81:$Vh,95:$Vi,96:$Vj,99:$Vk,100:$Vl,101:$Vm,103:$Vn,104:$Vo,114:$Vt,115:$Vu,116:$Vv,117:$Vw,118:$Vx,119:$Vy}),{22:$V11,24:$V21,26:$V31,38:$V41,41:[1,211],42:$V51,47:$VH,62:$V61,70:$V71,73:191,75:143,76:$V91,77:$Va1,78:$Vb1,79:$Vc1,80:$Vd1,81:$Ve1,82:$Vf1,84:134,85:$Vg1,95:$VJ,96:$VK,99:$VL,100:$VM,101:$Vh1,103:$VO,104:$VP,105:$Vi1,106:$Vj1,107:140,114:$VQ,115:$VR,116:$VS,117:$VT,118:$VU,119:$VV},{22:$V11,24:$V21,26:$V31,38:$V41,39:212,42:$V51,47:$VH,62:$V61,70:$V71,73:132,74:$V81,75:143,76:$V91,77:$Va1,78:$Vb1,79:$Vc1,80:$Vd1,81:$Ve1,82:$Vf1,84:134,85:$Vg1,95:$VJ,96:$VK,99:$VL,100:$VM,101:$Vh1,103:$VO,104:$VP,105:$Vi1,106:$Vj1,107:140,114:$VQ,115:$VR,116:$VS,117:$VT,118:$VU,119:$VV},{22:$V11,24:$V21,26:$V31,38:$V41,42:$V51,47:$VH,51:[1,213],62:$V61,70:$V71,73:191,75:143,76:$V91,77:$Va1,78:$Vb1,79:$Vc1,80:$Vd1,81:$Ve1,82:$Vf1,84:134,85:$Vg1,95:$VJ,96:$VK,99:$VL,100:$VM,101:$Vh1,103:$VO,104:$VP,105:$Vi1,106:$Vj1,107:140,114:$VQ,115:$VR,116:$VS,117:$VT,118:$VU,119:$VV},{22:$V11,24:$V21,26:$V31,38:$V41,42:$V51,47:$VH,53:[1,214],62:$V61,70:$V71,73:191,75:143,76:$V91,77:$Va1,78:$Vb1,79:$Vc1,80:$Vd1,81:$Ve1,82:$Vf1,84:134,85:$Vg1,95:$VJ,96:$VK,99:$VL,100:$VM,101:$Vh1,103:$VO,104:$VP,105:$Vi1,106:$Vj1,107:140,114:$VQ,115:$VR,116:$VS,117:$VT,118:$VU,119:$VV},{22:$V11,24:$V21,26:$V31,38:$V41,42:$V51,47:$VH,55:[1,215],62:$V61,70:$V71,73:191,75:143,76:$V91,77:$Va1,78:$Vb1,79:$Vc1,80:$Vd1,81:$Ve1,82:$Vf1,84:134,85:$Vg1,95:$VJ,96:$VK,99:$VL,100:$VM,101:$Vh1,103:$VO,104:$VP,105:$Vi1,106:$Vj1,107:140,114:$VQ,115:$VR,116:$VS,117:$VT,118:$VU,119:$VV},{22:$V11,24:$V21,26:$V31,38:$V41,42:$V51,47:$VH,57:[1,216],62:$V61,70:$V71,73:191,75:143,76:$V91,77:$Va1,78:$Vb1,79:$Vc1,80:$Vd1,81:$Ve1,82:$Vf1,84:134,85:$Vg1,95:$VJ,96:$VK,99:$VL,100:$VM,101:$Vh1,103:$VO,104:$VP,105:$Vi1,106:$Vj1,107:140,114:$VQ,115:$VR,116:$VS,117:$VT,118:$VU,119:$VV},{22:$V11,24:$V21,26:$V31,38:$V41,42:$V51,47:$VH,59:[1,217],62:$V61,70:$V71,73:191,75:143,76:$V91,77:$Va1,78:$Vb1,79:$Vc1,80:$Vd1,81:$Ve1,82:$Vf1,84:134,85:$Vg1,95:$VJ,96:$VK,99:$VL,100:$VM,101:$Vh1,103:$VO,104:$VP,105:$Vi1,106:$Vj1,107:140,114:$VQ,115:$VR,116:$VS,117:$VT,118:$VU,119:$VV},{22:$V11,24:$V21,26:$V31,38:$V41,42:$V51,47:$VH,61:[1,218],62:$V61,70:$V71,73:191,75:143,76:$V91,77:$Va1,78:$Vb1,79:$Vc1,80:$Vd1,81:$Ve1,82:$Vf1,84:134,85:$Vg1,95:$VJ,96:$VK,99:$VL,100:$VM,101:$Vh1,103:$VO,104:$VP,105:$Vi1,106:$Vj1,107:140,114:$VQ,115:$VR,116:$VS,117:$VT,118:$VU,119:$VV},{22:$V11,24:$V21,26:$V31,38:$V41,39:219,42:$V51,47:$VH,62:$V61,70:$V71,73:132,74:$V81,75:143,76:$V91,77:$Va1,78:$Vb1,79:$Vc1,80:$Vd1,81:$Ve1,82:$Vf1,84:134,85:$Vg1,95:$VJ,96:$VK,99:$VL,100:$VM,101:$Vh1,103:$VO,104:$VP,105:$Vi1,106:$Vj1,107:140,114:$VQ,115:$VR,116:$VS,117:$VT,118:$VU,119:$VV},{22:$V11,24:$V21,26:$V31,38:$V41,41:[1,220],42:$V51,47:$VH,62:$V61,70:$V71,73:191,75:143,76:$V91,77:$Va1,78:$Vb1,79:$Vc1,80:$Vd1,81:$Ve1,82:$Vf1,84:134,85:$Vg1,95:$VJ,96:$VK,99:$VL,100:$VM,101:$Vh1,103:$VO,104:$VP,105:$Vi1,106:$Vj1,107:140,114:$VQ,115:$VR,116:$VS,117:$VT,118:$VU,119:$VV},{22:$V11,24:$V21,26:$V31,38:$V41,42:$V51,47:$VH,62:$V61,64:[1,221],66:[1,222],70:$V71,73:191,75:143,76:$V91,77:$Va1,78:$Vb1,79:$Vc1,80:$Vd1,81:$Ve1,82:$Vf1,84:134,85:$Vg1,95:$VJ,96:$VK,99:$VL,100:$VM,101:$Vh1,103:$VO,104:$VP,105:$Vi1,106:$Vj1,107:140,114:$VQ,115:$VR,116:$VS,117:$VT,118:$VU,119:$VV},{22:$V11,24:$V21,26:$V31,38:$V41,42:$V51,47:$VH,62:$V61,64:[1,224],66:[1,223],70:$V71,73:191,75:143,76:$V91,77:$Va1,78:$Vb1,79:$Vc1,80:$Vd1,81:$Ve1,82:$Vf1,84:134,85:$Vg1,95:$VJ,96:$VK,99:$VL,100:$VM,101:$Vh1,103:$VO,104:$VP,105:$Vi1,106:$Vj1,107:140,114:$VQ,115:$VR,116:$VS,117:$VT,118:$VU,119:$VV},{9:225,20:$VC,21:$VD,23:$VE},o($VF,[2,49],{47:$Vl1}),o($V01,[2,72]),o($V01,[2,71]),{22:$V11,24:$V21,26:$V31,38:$V41,42:$V51,47:$VH,62:$V61,70:$V71,72:[1,226],73:191,75:143,76:$V91,77:$Va1,78:$Vb1,79:$Vc1,80:$Vd1,81:$Ve1,82:$Vf1,84:134,85:$Vg1,95:$VJ,96:$VK,99:$VL,100:$VM,101:$Vh1,103:$VO,104:$VP,105:$Vi1,106:$Vj1,107:140,114:$VQ,115:$VR,116:$VS,117:$VT,118:$VU,119:$VV},o($V01,[2,74]),o($Vn1,[2,78]),{22:$V11,24:$V21,26:$V31,38:$V41,39:227,42:$V51,47:$VH,62:$V61,70:$V71,73:132,74:$V81,75:143,76:$V91,77:$Va1,78:$Vb1,79:$Vc1,80:$Vd1,81:$Ve1,82:$Vf1,84:134,85:$Vg1,95:$VJ,96:$VK,99:$VL,100:$VM,101:$Vh1,103:$VO,104:$VP,105:$Vi1,106:$Vj1,107:140,114:$VQ,115:$VR,116:$VS,117:$VT,118:$VU,119:$VV},o($Vk1,$V5,{17:228}),o($VB,[2,43]),{46:229,47:$Vb,49:43,81:$Vh,95:$Vi,96:$Vj,99:$Vk,100:$Vl,101:$Vm,103:$Vn,104:$Vo,108:44,114:$Vt,115:$Vu,116:$Vv,117:$Vw,118:$Vx,119:$Vy},{22:$Vq1,76:$Vr1,86:230,92:$Vs1,95:$Vt1,97:231,98:232,99:$Vu1,100:$Vv1,101:$Vw1,102:$Vx1,103:$Vy1,104:$Vz1,105:$VA1},{22:$Vq1,76:$Vr1,86:244,92:$Vs1,95:$Vt1,97:231,98:232,99:$Vu1,100:$Vv1,101:$Vw1,102:$Vx1,103:$Vy1,104:$Vz1,105:$VA1},{22:$Vq1,76:$Vr1,86:245,92:$Vs1,94:[1,246],95:$Vt1,97:231,98:232,99:$Vu1,100:$Vv1,101:$Vw1,102:$Vx1,103:$Vy1,104:$Vz1,105:$VA1},{22:$Vq1,76:$Vr1,86:247,92:$Vs1,94:[1,248],95:$Vt1,97:231,98:232,99:$Vu1,100:$Vv1,101:$Vw1,102:$Vx1,103:$Vy1,104:$Vz1,105:$VA1},{95:[1,249]},{22:$Vq1,76:$Vr1,86:250,92:$Vs1,95:$Vt1,97:231,98:232,99:$Vu1,100:$Vv1,101:$Vw1,102:$Vx1,103:$Vy1,104:$Vz1,105:$VA1},{22:$Vq1,76:$Vr1,86:251,92:$Vs1,95:$Vt1,97:231,98:232,99:$Vu1,100:$Vv1,101:$Vw1,102:$Vx1,103:$Vy1,104:$Vz1,105:$VA1},{26:$VG,47:$VH,81:$VI,87:252,95:$VJ,96:$VK,99:$VL,100:$VM,101:$VN,103:$VO,104:$VP,107:94,109:92,114:$VQ,115:$VR,116:$VS,117:$VT,118:$VU,119:$VV},o($VZ,[2,97]),{74:[1,253]},o($VZ,[2,101],{22:[1,254]}),o($VZ,[2,102]),o($VZ,[2,105]),o($VZ,[2,107],{22:[1,255]}),o($VZ,[2,108]),o($VX,[2,55]),{22:$V11,24:$V21,26:$V31,38:$V41,42:$V51,47:$VH,51:[1,256],62:$V61,70:$V71,73:191,75:143,76:$V91,77:$Va1,78:$Vb1,79:$Vc1,80:$Vd1,81:$Ve1,82:$Vf1,84:134,85:$Vg1,95:$VJ,96:$VK,99:$VL,100:$VM,101:$Vh1,103:$VO,104:$VP,105:$Vi1,106:$Vj1,107:140,114:$VQ,115:$VR,116:$VS,117:$VT,118:$VU,119:$VV},o($VX,[2,61]),o($VX,[2,57]),o($VX,[2,58]),o($VX,[2,59]),o($VX,[2,60]),o($VX,[2,62]),{22:$V11,24:$V21,26:$V31,38:$V41,42:$V51,47:$VH,61:[1,257],62:$V61,70:$V71,73:191,75:143,76:$V91,77:$Va1,78:$Vb1,79:$Vc1,80:$Vd1,81:$Ve1,82:$Vf1,84:134,85:$Vg1,95:$VJ,96:$VK,99:$VL,100:$VM,101:$Vh1,103:$VO,104:$VP,105:$Vi1,106:$Vj1,107:140,114:$VQ,115:$VR,116:$VS,117:$VT,118:$VU,119:$VV},o($VX,[2,64]),o($VX,[2,65]),o($VX,[2,67]),o($VX,[2,66]),o($VX,[2,68]),o($Vo1,[2,4]),o([22,47,81,95,96,99,100,101,103,104,114,115,116,117,118,119],[2,76]),{22:$V11,24:$V21,26:$V31,38:$V41,41:[1,258],42:$V51,47:$VH,62:$V61,70:$V71,73:191,75:143,76:$V91,77:$Va1,78:$Vb1,79:$Vc1,80:$Vd1,81:$Ve1,82:$Vf1,84:134,85:$Vg1,95:$VJ,96:$VK,99:$VL,100:$VM,101:$Vh1,103:$VO,104:$VP,105:$Vi1,106:$Vj1,107:140,114:$VQ,115:$VR,116:$VS,117:$VT,118:$VU,119:$VV},{18:18,19:19,20:$V6,21:$V7,22:$V8,23:$V9,32:24,33:25,34:26,35:27,36:28,37:29,38:$Va,42:[1,259],43:31,45:32,46:42,47:$Vb,49:43,76:$Vc,77:$Vd,78:$Ve,79:$Vf,80:$Vg,81:$Vh,95:$Vi,96:$Vj,99:$Vk,100:$Vl,101:$Vm,103:$Vn,104:$Vo,108:44,110:$Vp,111:$Vq,112:$Vr,113:$Vs,114:$Vt,115:$Vu,116:$Vv,117:$Vw,118:$Vx,119:$Vy},o($VW,[2,53]),o($VZ,[2,110],{96:$VB1}),o($VC1,[2,120],{98:261,22:$Vq1,76:$Vr1,92:$Vs1,95:$Vt1,99:$Vu1,100:$Vv1,101:$Vw1,102:$Vx1,103:$Vy1,104:$Vz1,105:$VA1}),o($VD1,[2,122]),o($VD1,[2,124]),o($VD1,[2,125]),o($VD1,[2,126]),o($VD1,[2,127]),o($VD1,[2,128]),o($VD1,[2,129]),o($VD1,[2,130]),o($VD1,[2,131]),o($VD1,[2,132]),o($VD1,[2,133]),o($VD1,[2,134]),o($VZ,[2,111],{96:$VB1}),o($VZ,[2,112],{96:$VB1}),{22:[1,262]},o($VZ,[2,113],{96:$VB1}),{22:[1,263]},o($Vp1,[2,119]),o($VZ,[2,93],{96:$VB1}),o($VZ,[2,94],{96:$VB1}),o($VZ,[2,95],{107:94,109:170,26:$VG,47:$VH,81:$VI,95:$VJ,96:$VK,99:$VL,100:$VM,101:$VN,103:$VO,104:$VP,114:$VQ,115:$VR,116:$VS,117:$VT,118:$VU,119:$VV}),o($VZ,[2,99]),{91:[1,264]},{91:[1,265]},{51:[1,266]},{61:[1,267]},{9:268,20:$VC,21:$VD,23:$VE},o($VB,[2,42]),{22:$Vq1,76:$Vr1,92:$Vs1,95:$Vt1,97:269,98:232,99:$Vu1,100:$Vv1,101:$Vw1,102:$Vx1,103:$Vy1,104:$Vz1,105:$VA1},o($VD1,[2,123]),{26:$VG,47:$VH,81:$VI,87:270,95:$VJ,96:$VK,99:$VL,100:$VM,101:$VN,103:$VO,104:$VP,107:94,109:92,114:$VQ,115:$VR,116:$VS,117:$VT,118:$VU,119:$VV},{26:$VG,47:$VH,81:$VI,87:271,95:$VJ,96:$VK,99:$VL,100:$VM,101:$VN,103:$VO,104:$VP,107:94,109:92,114:$VQ,115:$VR,116:$VS,117:$VT,118:$VU,119:$VV},o($VZ,[2,103]),o($VZ,[2,109]),o($VX,[2,56]),o($VX,[2,63]),o($Vk1,$V5,{17:272}),o($VC1,[2,121],{98:261,22:$Vq1,76:$Vr1,92:$Vs1,95:$Vt1,99:$Vu1,100:$Vv1,101:$Vw1,102:$Vx1,103:$Vy1,104:$Vz1,105:$VA1}),o($VZ,[2,116],{107:94,109:170,22:[1,273],26:$VG,47:$VH,81:$VI,95:$VJ,96:$VK,99:$VL,100:$VM,101:$VN,103:$VO,104:$VP,114:$VQ,115:$VR,116:$VS,117:$VT,118:$VU,119:$VV}),o($VZ,[2,117],{107:94,109:170,22:[1,274],26:$VG,47:$VH,81:$VI,95:$VJ,96:$VK,99:$VL,100:$VM,101:$VN,103:$VO,104:$VP,114:$VQ,115:$VR,116:$VS,117:$VT,118:$VU,119:$VV}),{18:18,19:19,20:$V6,21:$V7,22:$V8,23:$V9,32:24,33:25,34:26,35:27,36:28,37:29,38:$Va,42:[1,275],43:31,45:32,46:42,47:$Vb,49:43,76:$Vc,77:$Vd,78:$Ve,79:$Vf,80:$Vg,81:$Vh,95:$Vi,96:$Vj,99:$Vk,100:$Vl,101:$Vm,103:$Vn,104:$Vo,108:44,110:$Vp,111:$Vq,112:$Vr,113:$Vs,114:$Vt,115:$Vu,116:$Vv,117:$Vw,118:$Vx,119:$Vy},{22:$Vq1,76:$Vr1,86:276,92:$Vs1,95:$Vt1,97:231,98:232,99:$Vu1,100:$Vv1,101:$Vw1,102:$Vx1,103:$Vy1,104:$Vz1,105:$VA1},{22:$Vq1,76:$Vr1,86:277,92:$Vs1,95:$Vt1,97:231,98:232,99:$Vu1,100:$Vv1,101:$Vw1,102:$Vx1,103:$Vy1,104:$Vz1,105:$VA1},o($VB,[2,41]),o($VZ,[2,114],{96:$VB1}),o($VZ,[2,115],{96:$VB1})],\ndefaultActions: {2:[2,1],9:[2,5],10:[2,2],124:[2,7]},\nparseError: function parseError (str, hash) {\n    if (hash.recoverable) {\n        this.trace(str);\n    } else {\n        var error = new Error(str);\n        error.hash = hash;\n        throw error;\n    }\n},\nparse: function parse(input) {\n    var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = '', yylineno = 0, yyleng = 0, recovering = 0, TERROR = 2, EOF = 1;\n    var args = lstack.slice.call(arguments, 1);\n    var lexer = Object.create(this.lexer);\n    var sharedState = { yy: {} };\n    for (var k in this.yy) {\n        if (Object.prototype.hasOwnProperty.call(this.yy, k)) {\n            sharedState.yy[k] = this.yy[k];\n        }\n    }\n    lexer.setInput(input, sharedState.yy);\n    sharedState.yy.lexer = lexer;\n    sharedState.yy.parser = this;\n    if (typeof lexer.yylloc == 'undefined') {\n        lexer.yylloc = {};\n    }\n    var yyloc = lexer.yylloc;\n    lstack.push(yyloc);\n    var ranges = lexer.options && lexer.options.ranges;\n    if (typeof sharedState.yy.parseError === 'function') {\n        this.parseError = sharedState.yy.parseError;\n    } else {\n        this.parseError = Object.getPrototypeOf(this).parseError;\n    }\n    function popStack(n) {\n        stack.length = stack.length - 2 * n;\n        vstack.length = vstack.length - n;\n        lstack.length = lstack.length - n;\n    }\n            function lex() {\n            var token;\n            token = tstack.pop() || lexer.lex() || EOF;\n            if (typeof token !== 'number') {\n                if (token instanceof Array) {\n                    tstack = token;\n                    token = tstack.pop();\n                }\n                token = self.symbols_[token] || token;\n            }\n            return token;\n        }\n    var symbol, preErrorSymbol, state, action, a, r, yyval = {}, p, len, newState, expected;\n    while (true) {\n        state = stack[stack.length - 1];\n        if (this.defaultActions[state]) {\n            action = this.defaultActions[state];\n        } else {\n            if (symbol === null || typeof symbol == 'undefined') {\n                symbol = lex();\n            }\n            action = table[state] && table[state][symbol];\n        }\n        if (typeof action === 'undefined' || !action.length || !action[0]) {\n            var errStr = '';\n            expected = [];\n            for (p in table[state]) {\n                if (this.terminals_[p] && p > TERROR) {\n                    expected.push('\\'' + this.terminals_[p] + '\\'');\n                }\n            }\n            if (lexer.showPosition) {\n                errStr = 'Parse error on line ' + (yylineno + 1) + ':\\n' + lexer.showPosition() + '\\nExpecting ' + expected.join(', ') + ', got \\'' + (this.terminals_[symbol] || symbol) + '\\'';\n            } else {\n                errStr = 'Parse error on line ' + (yylineno + 1) + ': Unexpected ' + (symbol == EOF ? 'end of input' : '\\'' + (this.terminals_[symbol] || symbol) + '\\'');\n            }\n            this.parseError(errStr, {\n                text: lexer.match,\n                token: this.terminals_[symbol] || symbol,\n                line: lexer.yylineno,\n                loc: yyloc,\n                expected: expected\n            });\n        }\n        if (action[0] instanceof Array && action.length > 1) {\n            throw new Error('Parse Error: multiple actions possible at state: ' + state + ', token: ' + symbol);\n        }\n        switch (action[0]) {\n        case 1:\n            stack.push(symbol);\n            vstack.push(lexer.yytext);\n            lstack.push(lexer.yylloc);\n            stack.push(action[1]);\n            symbol = null;\n            if (!preErrorSymbol) {\n                yyleng = lexer.yyleng;\n                yytext = lexer.yytext;\n                yylineno = lexer.yylineno;\n                yyloc = lexer.yylloc;\n                if (recovering > 0) {\n                    recovering--;\n                }\n            } else {\n                symbol = preErrorSymbol;\n                preErrorSymbol = null;\n            }\n            break;\n        case 2:\n            len = this.productions_[action[1]][1];\n            yyval.$ = vstack[vstack.length - len];\n            yyval._$ = {\n                first_line: lstack[lstack.length - (len || 1)].first_line,\n                last_line: lstack[lstack.length - 1].last_line,\n                first_column: lstack[lstack.length - (len || 1)].first_column,\n                last_column: lstack[lstack.length - 1].last_column\n            };\n            if (ranges) {\n                yyval._$.range = [\n                    lstack[lstack.length - (len || 1)].range[0],\n                    lstack[lstack.length - 1].range[1]\n                ];\n            }\n            r = this.performAction.apply(yyval, [\n                yytext,\n                yyleng,\n                yylineno,\n                sharedState.yy,\n                action[1],\n                vstack,\n                lstack\n            ].concat(args));\n            if (typeof r !== 'undefined') {\n                return r;\n            }\n            if (len) {\n                stack = stack.slice(0, -1 * len * 2);\n                vstack = vstack.slice(0, -1 * len);\n                lstack = lstack.slice(0, -1 * len);\n            }\n            stack.push(this.productions_[action[1]][0]);\n            vstack.push(yyval.$);\n            lstack.push(yyval._$);\n            newState = table[stack[stack.length - 2]][stack[stack.length - 1]];\n            stack.push(newState);\n            break;\n        case 3:\n            return true;\n        }\n    }\n    return true;\n}};\n\n/* generated by jison-lex 0.3.4 */\nvar lexer = (function(){\nvar lexer = ({\n\nEOF:1,\n\nparseError:function parseError(str, hash) {\n        if (this.yy.parser) {\n            this.yy.parser.parseError(str, hash);\n        } else {\n            throw new Error(str);\n        }\n    },\n\n// resets the lexer, sets new input\nsetInput:function (input, yy) {\n        this.yy = yy || this.yy || {};\n        this._input = input;\n        this._more = this._backtrack = this.done = false;\n        this.yylineno = this.yyleng = 0;\n        this.yytext = this.matched = this.match = '';\n        this.conditionStack = ['INITIAL'];\n        this.yylloc = {\n            first_line: 1,\n            first_column: 0,\n            last_line: 1,\n            last_column: 0\n        };\n        if (this.options.ranges) {\n            this.yylloc.range = [0,0];\n        }\n        this.offset = 0;\n        return this;\n    },\n\n// consumes and returns one char from the input\ninput:function () {\n        var ch = this._input[0];\n        this.yytext += ch;\n        this.yyleng++;\n        this.offset++;\n        this.match += ch;\n        this.matched += ch;\n        var lines = ch.match(/(?:\\r\\n?|\\n).*/g);\n        if (lines) {\n            this.yylineno++;\n            this.yylloc.last_line++;\n        } else {\n            this.yylloc.last_column++;\n        }\n        if (this.options.ranges) {\n            this.yylloc.range[1]++;\n        }\n\n        this._input = this._input.slice(1);\n        return ch;\n    },\n\n// unshifts one char (or a string) into the input\nunput:function (ch) {\n        var len = ch.length;\n        var lines = ch.split(/(?:\\r\\n?|\\n)/g);\n\n        this._input = ch + this._input;\n        this.yytext = this.yytext.substr(0, this.yytext.length - len);\n        //this.yyleng -= len;\n        this.offset -= len;\n        var oldLines = this.match.split(/(?:\\r\\n?|\\n)/g);\n        this.match = this.match.substr(0, this.match.length - 1);\n        this.matched = this.matched.substr(0, this.matched.length - 1);\n\n        if (lines.length - 1) {\n            this.yylineno -= lines.length - 1;\n        }\n        var r = this.yylloc.range;\n\n        this.yylloc = {\n            first_line: this.yylloc.first_line,\n            last_line: this.yylineno + 1,\n            first_column: this.yylloc.first_column,\n            last_column: lines ?\n                (lines.length === oldLines.length ? this.yylloc.first_column : 0)\n                 + oldLines[oldLines.length - lines.length].length - lines[0].length :\n              this.yylloc.first_column - len\n        };\n\n        if (this.options.ranges) {\n            this.yylloc.range = [r[0], r[0] + this.yyleng - len];\n        }\n        this.yyleng = this.yytext.length;\n        return this;\n    },\n\n// When called from action, caches matched text and appends it on next action\nmore:function () {\n        this._more = true;\n        return this;\n    },\n\n// When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead.\nreject:function () {\n        if (this.options.backtrack_lexer) {\n            this._backtrack = true;\n        } else {\n            return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\\n' + this.showPosition(), {\n                text: \"\",\n                token: null,\n                line: this.yylineno\n            });\n\n        }\n        return this;\n    },\n\n// retain first n characters of the match\nless:function (n) {\n        this.unput(this.match.slice(n));\n    },\n\n// displays already matched input, i.e. for error messages\npastInput:function () {\n        var past = this.matched.substr(0, this.matched.length - this.match.length);\n        return (past.length > 20 ? '...':'') + past.substr(-20).replace(/\\n/g, \"\");\n    },\n\n// displays upcoming input, i.e. for error messages\nupcomingInput:function () {\n        var next = this.match;\n        if (next.length < 20) {\n            next += this._input.substr(0, 20-next.length);\n        }\n        return (next.substr(0,20) + (next.length > 20 ? '...' : '')).replace(/\\n/g, \"\");\n    },\n\n// displays the character position where the lexing error occurred, i.e. for error messages\nshowPosition:function () {\n        var pre = this.pastInput();\n        var c = new Array(pre.length + 1).join(\"-\");\n        return pre + this.upcomingInput() + \"\\n\" + c + \"^\";\n    },\n\n// test the lexed token: return FALSE when not a match, otherwise return token\ntest_match:function(match, indexed_rule) {\n        var token,\n            lines,\n            backup;\n\n        if (this.options.backtrack_lexer) {\n            // save context\n            backup = {\n                yylineno: this.yylineno,\n                yylloc: {\n                    first_line: this.yylloc.first_line,\n                    last_line: this.last_line,\n                    first_column: this.yylloc.first_column,\n                    last_column: this.yylloc.last_column\n                },\n                yytext: this.yytext,\n                match: this.match,\n                matches: this.matches,\n                matched: this.matched,\n                yyleng: this.yyleng,\n                offset: this.offset,\n                _more: this._more,\n                _input: this._input,\n                yy: this.yy,\n                conditionStack: this.conditionStack.slice(0),\n                done: this.done\n            };\n            if (this.options.ranges) {\n                backup.yylloc.range = this.yylloc.range.slice(0);\n            }\n        }\n\n        lines = match[0].match(/(?:\\r\\n?|\\n).*/g);\n        if (lines) {\n            this.yylineno += lines.length;\n        }\n        this.yylloc = {\n            first_line: this.yylloc.last_line,\n            last_line: this.yylineno + 1,\n            first_column: this.yylloc.last_column,\n            last_column: lines ?\n                         lines[lines.length - 1].length - lines[lines.length - 1].match(/\\r?\\n?/)[0].length :\n                         this.yylloc.last_column + match[0].length\n        };\n        this.yytext += match[0];\n        this.match += match[0];\n        this.matches = match;\n        this.yyleng = this.yytext.length;\n        if (this.options.ranges) {\n            this.yylloc.range = [this.offset, this.offset += this.yyleng];\n        }\n        this._more = false;\n        this._backtrack = false;\n        this._input = this._input.slice(match[0].length);\n        this.matched += match[0];\n        token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]);\n        if (this.done && this._input) {\n            this.done = false;\n        }\n        if (token) {\n            return token;\n        } else if (this._backtrack) {\n            // recover context\n            for (var k in backup) {\n                this[k] = backup[k];\n            }\n            return false; // rule action called reject() implying the next rule should be tested instead.\n        }\n        return false;\n    },\n\n// return next match in input\nnext:function () {\n        if (this.done) {\n            return this.EOF;\n        }\n        if (!this._input) {\n            this.done = true;\n        }\n\n        var token,\n            match,\n            tempMatch,\n            index;\n        if (!this._more) {\n            this.yytext = '';\n            this.match = '';\n        }\n        var rules = this._currentRules();\n        for (var i = 0; i < rules.length; i++) {\n            tempMatch = this._input.match(this.rules[rules[i]]);\n            if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {\n                match = tempMatch;\n                index = i;\n                if (this.options.backtrack_lexer) {\n                    token = this.test_match(tempMatch, rules[i]);\n                    if (token !== false) {\n                        return token;\n                    } else if (this._backtrack) {\n                        match = false;\n                        continue; // rule action called reject() implying a rule MISmatch.\n                    } else {\n                        // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)\n                        return false;\n                    }\n                } else if (!this.options.flex) {\n                    break;\n                }\n            }\n        }\n        if (match) {\n            token = this.test_match(match, rules[index]);\n            if (token !== false) {\n                return token;\n            }\n            // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)\n            return false;\n        }\n        if (this._input === \"\") {\n            return this.EOF;\n        } else {\n            return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. Unrecognized text.\\n' + this.showPosition(), {\n                text: \"\",\n                token: null,\n                line: this.yylineno\n            });\n        }\n    },\n\n// return next match that has a token\nlex:function lex () {\n        var r = this.next();\n        if (r) {\n            return r;\n        } else {\n            return this.lex();\n        }\n    },\n\n// activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)\nbegin:function begin (condition) {\n        this.conditionStack.push(condition);\n    },\n\n// pop the previously active lexer condition state off the condition stack\npopState:function popState () {\n        var n = this.conditionStack.length - 1;\n        if (n > 0) {\n            return this.conditionStack.pop();\n        } else {\n            return this.conditionStack[0];\n        }\n    },\n\n// produce the lexer rule set which is active for the currently active lexer condition state\n_currentRules:function _currentRules () {\n        if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) {\n            return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;\n        } else {\n            return this.conditions[\"INITIAL\"].rules;\n        }\n    },\n\n// return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available\ntopState:function topState (n) {\n        n = this.conditionStack.length - 1 - Math.abs(n || 0);\n        if (n >= 0) {\n            return this.conditionStack[n];\n        } else {\n            return \"INITIAL\";\n        }\n    },\n\n// alias for begin(condition)\npushState:function pushState (condition) {\n        this.begin(condition);\n    },\n\n// return the number of states currently on the stack\nstateStackSize:function stateStackSize() {\n        return this.conditionStack.length;\n    },\noptions: {},\nperformAction: function anonymous(yy,yy_,$avoiding_name_collisions,YY_START) {\nvar YYSTATE=YY_START;\nswitch($avoiding_name_collisions) {\ncase 0: this.begin('open_directive'); return 12; \nbreak;\ncase 1: this.begin('type_directive'); return 13; \nbreak;\ncase 2: this.popState(); this.begin('arg_directive'); return 10; \nbreak;\ncase 3: this.popState(); this.popState(); return 15; \nbreak;\ncase 4:return 14;\nbreak;\ncase 5:/* skip comments */\nbreak;\ncase 6:/* skip comments */\nbreak;\ncase 7:this.begin(\"string\");\nbreak;\ncase 8:this.popState();\nbreak;\ncase 9:return \"STR\";\nbreak;\ncase 10:return 76;\nbreak;\ncase 11:return 85;\nbreak;\ncase 12:return 77;\nbreak;\ncase 13:return 94;\nbreak;\ncase 14:return 78;\nbreak;\ncase 15:return 79;\nbreak;\ncase 16:this.begin(\"href\");\nbreak;\ncase 17:this.popState();\nbreak;\ncase 18:return 90;\nbreak;\ncase 19:this.begin(\"callbackname\");\nbreak;\ncase 20:this.popState();\nbreak;\ncase 21:this.popState(); this.begin(\"callbackargs\");\nbreak;\ncase 22:return 88;\nbreak;\ncase 23:this.popState();\nbreak;\ncase 24:return 89;\nbreak;\ncase 25:this.begin(\"click\");\nbreak;\ncase 26:this.popState();\nbreak;\ncase 27:return 80;\nbreak;\ncase 28:if(yy.lex.firstGraph()){this.begin(\"dir\");}  return 24;\nbreak;\ncase 29:if(yy.lex.firstGraph()){this.begin(\"dir\");}  return 24;\nbreak;\ncase 30:return 38;\nbreak;\ncase 31:return 42;\nbreak;\ncase 32:return 91;\nbreak;\ncase 33:return 91;\nbreak;\ncase 34:return 91;\nbreak;\ncase 35:return 91;\nbreak;\ncase 36:   this.popState();  return 25; \nbreak;\ncase 37:   this.popState();  return 26; \nbreak;\ncase 38:   this.popState();  return 26; \nbreak;\ncase 39:   this.popState();  return 26; \nbreak;\ncase 40:   this.popState();  return 26; \nbreak;\ncase 41:   this.popState();  return 26; \nbreak;\ncase 42:   this.popState();  return 26; \nbreak;\ncase 43:   this.popState();  return 26; \nbreak;\ncase 44:   this.popState();  return 26; \nbreak;\ncase 45:   this.popState();  return 26; \nbreak;\ncase 46:   this.popState();  return 26; \nbreak;\ncase 47:return 110;\nbreak;\ncase 48:return 111;\nbreak;\ncase 49:return 112;\nbreak;\ncase 50:return 113;\nbreak;\ncase 51: return 95;\nbreak;\ncase 52:return 103;\nbreak;\ncase 53:return 48;\nbreak;\ncase 54:return 100;\nbreak;\ncase 55:return 47;\nbreak;\ncase 56:return 20;\nbreak;\ncase 57:return 96;\nbreak;\ncase 58:return 118;\nbreak;\ncase 59:return 71;\nbreak;\ncase 60:return 71;\nbreak;\ncase 61:return 71;\nbreak;\ncase 62:return 70;\nbreak;\ncase 63:return 70;\nbreak;\ncase 64:return 70;\nbreak;\ncase 65:return 52;\nbreak;\ncase 66:return 53;\nbreak;\ncase 67:return 54;\nbreak;\ncase 68:return 55;\nbreak;\ncase 69:return 56;\nbreak;\ncase 70:return 57;\nbreak;\ncase 71:return 58;\nbreak;\ncase 72:return 59;\nbreak;\ncase 73:return 101;\nbreak;\ncase 74:return 104;\nbreak;\ncase 75:return 119;\nbreak;\ncase 76:return 116;\nbreak;\ncase 77:return 105;\nbreak;\ncase 78:return 117;\nbreak;\ncase 79:return 117;\nbreak;\ncase 80:return 106;\nbreak;\ncase 81:return 62;\nbreak;\ncase 82:return 82;\nbreak;\ncase 83:return 'SEP';\nbreak;\ncase 84:return 81;\nbreak;\ncase 85:return 99;\nbreak;\ncase 86:return 64;\nbreak;\ncase 87:return 63;\nbreak;\ncase 88:return 66;\nbreak;\ncase 89:return 65;\nbreak;\ncase 90:return 114;\nbreak;\ncase 91:return 115;\nbreak;\ncase 92:return 72;\nbreak;\ncase 93:return 50;\nbreak;\ncase 94:return 51;\nbreak;\ncase 95:return 40;\nbreak;\ncase 96:return 41;\nbreak;\ncase 97:return 60\nbreak;\ncase 98:return 61\nbreak;\ncase 99:return 125;\nbreak;\ncase 100:return 21;\nbreak;\ncase 101:return 22;\nbreak;\ncase 102:return 23;\nbreak;\n}\n},\nrules: [/^(?:%%\\{)/,/^(?:((?:(?!\\}%%)[^:.])*))/,/^(?::)/,/^(?:\\}%%)/,/^(?:((?:(?!\\}%%).|\\n)*))/,/^(?:%%(?!\\{)[^\\n]*)/,/^(?:[^\\}]%%[^\\n]*)/,/^(?:[\"])/,/^(?:[\"])/,/^(?:[^\"]*)/,/^(?:style\\b)/,/^(?:default\\b)/,/^(?:linkStyle\\b)/,/^(?:interpolate\\b)/,/^(?:classDef\\b)/,/^(?:class\\b)/,/^(?:href[\\s]+[\"])/,/^(?:[\"])/,/^(?:[^\"]*)/,/^(?:call[\\s]+)/,/^(?:\\([\\s]*\\))/,/^(?:\\()/,/^(?:[^(]*)/,/^(?:\\))/,/^(?:[^)]*)/,/^(?:click[\\s]+)/,/^(?:[\\s\\n])/,/^(?:[^\\s\\n]*)/,/^(?:graph\\b)/,/^(?:flowchart\\b)/,/^(?:subgraph\\b)/,/^(?:end\\b\\s*)/,/^(?:_self\\b)/,/^(?:_blank\\b)/,/^(?:_parent\\b)/,/^(?:_top\\b)/,/^(?:(\\r?\\n)*\\s*\\n)/,/^(?:\\s*LR\\b)/,/^(?:\\s*RL\\b)/,/^(?:\\s*TB\\b)/,/^(?:\\s*BT\\b)/,/^(?:\\s*TD\\b)/,/^(?:\\s*BR\\b)/,/^(?:\\s*<)/,/^(?:\\s*>)/,/^(?:\\s*\\^)/,/^(?:\\s*v\\b)/,/^(?:.*direction\\s+TB[^\\n]*)/,/^(?:.*direction\\s+BT[^\\n]*)/,/^(?:.*direction\\s+RL[^\\n]*)/,/^(?:.*direction\\s+LR[^\\n]*)/,/^(?:[0-9]+)/,/^(?:#)/,/^(?::::)/,/^(?::)/,/^(?:&)/,/^(?:;)/,/^(?:,)/,/^(?:\\*)/,/^(?:\\s*[xo<]?--+[-xo>]\\s*)/,/^(?:\\s*[xo<]?==+[=xo>]\\s*)/,/^(?:\\s*[xo<]?-?\\.+-[xo>]?\\s*)/,/^(?:\\s*[xo<]?--\\s*)/,/^(?:\\s*[xo<]?==\\s*)/,/^(?:\\s*[xo<]?-\\.\\s*)/,/^(?:\\(-)/,/^(?:-\\))/,/^(?:\\(\\[)/,/^(?:\\]\\))/,/^(?:\\[\\[)/,/^(?:\\]\\])/,/^(?:\\[\\()/,/^(?:\\)\\])/,/^(?:-)/,/^(?:\\.)/,/^(?:[\\_])/,/^(?:\\+)/,/^(?:%)/,/^(?:=)/,/^(?:=)/,/^(?:<)/,/^(?:>)/,/^(?:\\^)/,/^(?:\\\\\\|)/,/^(?:v\\b)/,/^(?:[A-Za-z]+)/,/^(?:\\\\\\])/,/^(?:\\[\\/)/,/^(?:\\/\\])/,/^(?:\\[\\\\)/,/^(?:[!\"#$%&'*+,-.`?\\\\_/])/,/^(?:[\\u00AA\\u00B5\\u00BA\\u00C0-\\u00D6\\u00D8-\\u00F6]|[\\u00F8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0370-\\u0374\\u0376\\u0377]|[\\u037A-\\u037D\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5]|[\\u03F7-\\u0481\\u048A-\\u0527\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u05D0-\\u05EA]|[\\u05F0-\\u05F2\\u0620-\\u064A\\u066E\\u066F\\u0671-\\u06D3\\u06D5\\u06E5\\u06E6\\u06EE]|[\\u06EF\\u06FA-\\u06FC\\u06FF\\u0710\\u0712-\\u072F\\u074D-\\u07A5\\u07B1\\u07CA-\\u07EA]|[\\u07F4\\u07F5\\u07FA\\u0800-\\u0815\\u081A\\u0824\\u0828\\u0840-\\u0858\\u08A0]|[\\u08A2-\\u08AC\\u0904-\\u0939\\u093D\\u0950\\u0958-\\u0961\\u0971-\\u0977]|[\\u0979-\\u097F\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2]|[\\u09B6-\\u09B9\\u09BD\\u09CE\\u09DC\\u09DD\\u09DF-\\u09E1\\u09F0\\u09F1\\u0A05-\\u0A0A]|[\\u0A0F\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A32\\u0A33\\u0A35\\u0A36\\u0A38\\u0A39]|[\\u0A59-\\u0A5C\\u0A5E\\u0A72-\\u0A74\\u0A85-\\u0A8D\\u0A8F-\\u0A91\\u0A93-\\u0AA8]|[\\u0AAA-\\u0AB0\\u0AB2\\u0AB3\\u0AB5-\\u0AB9\\u0ABD\\u0AD0\\u0AE0\\u0AE1\\u0B05-\\u0B0C]|[\\u0B0F\\u0B10\\u0B13-\\u0B28\\u0B2A-\\u0B30\\u0B32\\u0B33\\u0B35-\\u0B39\\u0B3D\\u0B5C]|[\\u0B5D\\u0B5F-\\u0B61\\u0B71\\u0B83\\u0B85-\\u0B8A\\u0B8E-\\u0B90\\u0B92-\\u0B95\\u0B99]|[\\u0B9A\\u0B9C\\u0B9E\\u0B9F\\u0BA3\\u0BA4\\u0BA8-\\u0BAA\\u0BAE-\\u0BB9\\u0BD0]|[\\u0C05-\\u0C0C\\u0C0E-\\u0C10\\u0C12-\\u0C28\\u0C2A-\\u0C33\\u0C35-\\u0C39\\u0C3D]|[\\u0C58\\u0C59\\u0C60\\u0C61\\u0C85-\\u0C8C\\u0C8E-\\u0C90\\u0C92-\\u0CA8\\u0CAA-\\u0CB3]|[\\u0CB5-\\u0CB9\\u0CBD\\u0CDE\\u0CE0\\u0CE1\\u0CF1\\u0CF2\\u0D05-\\u0D0C\\u0D0E-\\u0D10]|[\\u0D12-\\u0D3A\\u0D3D\\u0D4E\\u0D60\\u0D61\\u0D7A-\\u0D7F\\u0D85-\\u0D96\\u0D9A-\\u0DB1]|[\\u0DB3-\\u0DBB\\u0DBD\\u0DC0-\\u0DC6\\u0E01-\\u0E30\\u0E32\\u0E33\\u0E40-\\u0E46\\u0E81]|[\\u0E82\\u0E84\\u0E87\\u0E88\\u0E8A\\u0E8D\\u0E94-\\u0E97\\u0E99-\\u0E9F\\u0EA1-\\u0EA3]|[\\u0EA5\\u0EA7\\u0EAA\\u0EAB\\u0EAD-\\u0EB0\\u0EB2\\u0EB3\\u0EBD\\u0EC0-\\u0EC4\\u0EC6]|[\\u0EDC-\\u0EDF\\u0F00\\u0F40-\\u0F47\\u0F49-\\u0F6C\\u0F88-\\u0F8C\\u1000-\\u102A]|[\\u103F\\u1050-\\u1055\\u105A-\\u105D\\u1061\\u1065\\u1066\\u106E-\\u1070\\u1075-\\u1081]|[\\u108E\\u10A0-\\u10C5\\u10C7\\u10CD\\u10D0-\\u10FA\\u10FC-\\u1248\\u124A-\\u124D]|[\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0]|[\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310]|[\\u1312-\\u1315\\u1318-\\u135A\\u1380-\\u138F\\u13A0-\\u13F4\\u1401-\\u166C]|[\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u1700-\\u170C\\u170E-\\u1711]|[\\u1720-\\u1731\\u1740-\\u1751\\u1760-\\u176C\\u176E-\\u1770\\u1780-\\u17B3\\u17D7]|[\\u17DC\\u1820-\\u1877\\u1880-\\u18A8\\u18AA\\u18B0-\\u18F5\\u1900-\\u191C]|[\\u1950-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19C1-\\u19C7\\u1A00-\\u1A16]|[\\u1A20-\\u1A54\\u1AA7\\u1B05-\\u1B33\\u1B45-\\u1B4B\\u1B83-\\u1BA0\\u1BAE\\u1BAF]|[\\u1BBA-\\u1BE5\\u1C00-\\u1C23\\u1C4D-\\u1C4F\\u1C5A-\\u1C7D\\u1CE9-\\u1CEC]|[\\u1CEE-\\u1CF1\\u1CF5\\u1CF6\\u1D00-\\u1DBF\\u1E00-\\u1F15\\u1F18-\\u1F1D]|[\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D]|[\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3]|[\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u2071\\u207F]|[\\u2090-\\u209C\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2119-\\u211D\\u2124\\u2126\\u2128]|[\\u212A-\\u212D\\u212F-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u2183\\u2184]|[\\u2C00-\\u2C2E\\u2C30-\\u2C5E\\u2C60-\\u2CE4\\u2CEB-\\u2CEE\\u2CF2\\u2CF3]|[\\u2D00-\\u2D25\\u2D27\\u2D2D\\u2D30-\\u2D67\\u2D6F\\u2D80-\\u2D96\\u2DA0-\\u2DA6]|[\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE]|[\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u2E2F\\u3005\\u3006\\u3031-\\u3035\\u303B\\u303C]|[\\u3041-\\u3096\\u309D-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312D]|[\\u3131-\\u318E\\u31A0-\\u31BA\\u31F0-\\u31FF\\u3400-\\u4DB5\\u4E00-\\u9FCC]|[\\uA000-\\uA48C\\uA4D0-\\uA4FD\\uA500-\\uA60C\\uA610-\\uA61F\\uA62A\\uA62B]|[\\uA640-\\uA66E\\uA67F-\\uA697\\uA6A0-\\uA6E5\\uA717-\\uA71F\\uA722-\\uA788]|[\\uA78B-\\uA78E\\uA790-\\uA793\\uA7A0-\\uA7AA\\uA7F8-\\uA801\\uA803-\\uA805]|[\\uA807-\\uA80A\\uA80C-\\uA822\\uA840-\\uA873\\uA882-\\uA8B3\\uA8F2-\\uA8F7\\uA8FB]|[\\uA90A-\\uA925\\uA930-\\uA946\\uA960-\\uA97C\\uA984-\\uA9B2\\uA9CF\\uAA00-\\uAA28]|[\\uAA40-\\uAA42\\uAA44-\\uAA4B\\uAA60-\\uAA76\\uAA7A\\uAA80-\\uAAAF\\uAAB1\\uAAB5]|[\\uAAB6\\uAAB9-\\uAABD\\uAAC0\\uAAC2\\uAADB-\\uAADD\\uAAE0-\\uAAEA\\uAAF2-\\uAAF4]|[\\uAB01-\\uAB06\\uAB09-\\uAB0E\\uAB11-\\uAB16\\uAB20-\\uAB26\\uAB28-\\uAB2E]|[\\uABC0-\\uABE2\\uAC00-\\uD7A3\\uD7B0-\\uD7C6\\uD7CB-\\uD7FB\\uF900-\\uFA6D]|[\\uFA70-\\uFAD9\\uFB00-\\uFB06\\uFB13-\\uFB17\\uFB1D\\uFB1F-\\uFB28\\uFB2A-\\uFB36]|[\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46-\\uFBB1\\uFBD3-\\uFD3D]|[\\uFD50-\\uFD8F\\uFD92-\\uFDC7\\uFDF0-\\uFDFB\\uFE70-\\uFE74\\uFE76-\\uFEFC]|[\\uFF21-\\uFF3A\\uFF41-\\uFF5A\\uFF66-\\uFFBE\\uFFC2-\\uFFC7\\uFFCA-\\uFFCF]|[\\uFFD2-\\uFFD7\\uFFDA-\\uFFDC])/,/^(?:\\|)/,/^(?:\\()/,/^(?:\\))/,/^(?:\\[)/,/^(?:\\])/,/^(?:\\{)/,/^(?:\\})/,/^(?:\")/,/^(?:(\\r?\\n)+)/,/^(?:\\s)/,/^(?:$)/],\nconditions: {\"close_directive\":{\"rules\":[],\"inclusive\":false},\"arg_directive\":{\"rules\":[3,4],\"inclusive\":false},\"type_directive\":{\"rules\":[2,3],\"inclusive\":false},\"open_directive\":{\"rules\":[1],\"inclusive\":false},\"callbackargs\":{\"rules\":[23,24],\"inclusive\":false},\"callbackname\":{\"rules\":[20,21,22],\"inclusive\":false},\"href\":{\"rules\":[17,18],\"inclusive\":false},\"click\":{\"rules\":[26,27],\"inclusive\":false},\"vertex\":{\"rules\":[],\"inclusive\":false},\"dir\":{\"rules\":[36,37,38,39,40,41,42,43,44,45,46],\"inclusive\":false},\"string\":{\"rules\":[8,9],\"inclusive\":false},\"INITIAL\":{\"rules\":[0,5,6,7,10,11,12,13,14,15,16,19,25,28,29,30,31,32,33,34,35,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102],\"inclusive\":true}}\n});\nreturn lexer;\n})();\nparser.lexer = lexer;\nfunction Parser () {\n  this.yy = {};\n}\nParser.prototype = parser;parser.Parser = Parser;\nreturn new Parser;\n})();\n\n\nif (true) {\nexports.parser = parser;\nexports.Parser = parser.Parser;\nexports.parse = function () { return parser.parse.apply(parser, arguments); };\nexports.main = function commonjsMain (args) {\n    if (!args[1]) {\n        console.log('Usage: '+args[0]+' FILE');\n        process.exit(1);\n    }\n    var source = __webpack_require__(/*! fs */ \"./node_modules/node-libs-browser/mock/empty.js\").readFileSync(__webpack_require__(/*! path */ \"./node_modules/path-browserify/index.js\").normalize(args[1]), \"utf8\");\n    return exports.parser.parse(source);\n};\nif ( true && __webpack_require__.c[__webpack_require__.s] === module) {\n  exports.main(process.argv.slice(1));\n}\n}\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../node_modules/process/browser.js */ \"./node_modules/process/browser.js\"), __webpack_require__(/*! ./../../../../node_modules/webpack/buildin/module.js */ \"./node_modules/webpack/buildin/module.js\")(module)))\n\n/***/ }),\n\n/***/ \"./src/diagrams/flowchart/styles.js\":\n/*!******************************************!*\\\n  !*** ./src/diagrams/flowchart/styles.js ***!\n  \\******************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\nvar getStyles = function getStyles(options) {\n  return \".label {\\n    font-family: \".concat(options.fontFamily, \";\\n    color: \").concat(options.nodeTextColor || options.textColor, \";\\n  }\\n  .cluster-label text {\\n    fill: \").concat(options.titleColor, \";\\n  }\\n  .cluster-label span {\\n    color: \").concat(options.titleColor, \";\\n  }\\n\\n  .label text,span {\\n    fill: \").concat(options.nodeTextColor || options.textColor, \";\\n    color: \").concat(options.nodeTextColor || options.textColor, \";\\n  }\\n\\n  .node rect,\\n  .node circle,\\n  .node ellipse,\\n  .node polygon,\\n  .node path {\\n    fill: \").concat(options.mainBkg, \";\\n    stroke: \").concat(options.nodeBorder, \";\\n    stroke-width: 1px;\\n  }\\n\\n  .node .label {\\n    text-align: center;\\n  }\\n  .node.clickable {\\n    cursor: pointer;\\n  }\\n\\n  .arrowheadPath {\\n    fill: \").concat(options.arrowheadColor, \";\\n  }\\n\\n  .edgePath .path {\\n    stroke: \").concat(options.lineColor, \";\\n    stroke-width: 2.0px;\\n  }\\n\\n  .flowchart-link {\\n    stroke: \").concat(options.lineColor, \";\\n    fill: none;\\n  }\\n\\n  .edgeLabel {\\n    background-color: \").concat(options.edgeLabelBackground, \";\\n    rect {\\n      opacity: 0.5;\\n      background-color: \").concat(options.edgeLabelBackground, \";\\n      fill: \").concat(options.edgeLabelBackground, \";\\n    }\\n    text-align: center;\\n  }\\n\\n  .cluster rect {\\n    fill: \").concat(options.clusterBkg, \";\\n    stroke: \").concat(options.clusterBorder, \";\\n    stroke-width: 1px;\\n  }\\n\\n  .cluster text {\\n    fill: \").concat(options.titleColor, \";\\n  }\\n\\n  .cluster span {\\n    color: \").concat(options.titleColor, \";\\n  }\\n  // .cluster div {\\n  //   color: \").concat(options.titleColor, \";\\n  // }\\n\\n  div.mermaidTooltip {\\n    position: absolute;\\n    text-align: center;\\n    max-width: 200px;\\n    padding: 2px;\\n    font-family: \").concat(options.fontFamily, \";\\n    font-size: 12px;\\n    background: \").concat(options.tertiaryColor, \";\\n    border: 1px solid \").concat(options.border2, \";\\n    border-radius: 2px;\\n    pointer-events: none;\\n    z-index: 100;\\n  }\\n\");\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (getStyles);\n\n/***/ }),\n\n/***/ \"./src/diagrams/gantt/ganttDb.js\":\n/*!***************************************!*\\\n  !*** ./src/diagrams/gantt/ganttDb.js ***!\n  \\***************************************/\n/*! exports provided: parseDirective, clear, setAxisFormat, getAxisFormat, setTodayMarker, getTodayMarker, setDateFormat, enableInclusiveEndDates, endDatesAreInclusive, enableTopAxis, topAxisEnabled, getDateFormat, setExcludes, getExcludes, setTitle, getTitle, addSection, getSections, getTasks, addTask, findTaskById, addTaskOrg, setLink, setClass, setClickEvent, bindFunctions, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"parseDirective\", function() { return parseDirective; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"clear\", function() { return clear; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"setAxisFormat\", function() { return setAxisFormat; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getAxisFormat\", function() { return getAxisFormat; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"setTodayMarker\", function() { return setTodayMarker; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getTodayMarker\", function() { return getTodayMarker; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"setDateFormat\", function() { return setDateFormat; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"enableInclusiveEndDates\", function() { return enableInclusiveEndDates; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"endDatesAreInclusive\", function() { return endDatesAreInclusive; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"enableTopAxis\", function() { return enableTopAxis; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"topAxisEnabled\", function() { return topAxisEnabled; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getDateFormat\", function() { return getDateFormat; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"setExcludes\", function() { return setExcludes; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getExcludes\", function() { return getExcludes; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"setTitle\", function() { return setTitle; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getTitle\", function() { return getTitle; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"addSection\", function() { return addSection; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getSections\", function() { return getSections; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getTasks\", function() { return getTasks; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"addTask\", function() { return addTask; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"findTaskById\", function() { return findTaskById; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"addTaskOrg\", function() { return addTaskOrg; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"setLink\", function() { return setLink; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"setClass\", function() { return setClass; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"setClickEvent\", function() { return setClickEvent; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"bindFunctions\", function() { return bindFunctions; });\n/* harmony import */ var moment_mini__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! moment-mini */ \"./node_modules/moment-mini/moment.min.js\");\n/* harmony import */ var moment_mini__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(moment_mini__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _braintree_sanitize_url__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @braintree/sanitize-url */ \"./node_modules/@braintree/sanitize-url/index.js\");\n/* harmony import */ var _braintree_sanitize_url__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_braintree_sanitize_url__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../logger */ \"./src/logger.js\");\n/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../config */ \"./src/config.js\");\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../utils */ \"./src/utils.js\");\n/* harmony import */ var _mermaidAPI__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../mermaidAPI */ \"./src/mermaidAPI.js\");\nfunction _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }\n\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _iterableToArray(iter) { if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter); }\n\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\n\n\n\n\n\n\nvar dateFormat = '';\nvar axisFormat = '';\nvar todayMarker = '';\nvar excludes = [];\nvar title = '';\nvar sections = [];\nvar tasks = [];\nvar currentSection = '';\nvar tags = ['active', 'done', 'crit', 'milestone'];\nvar funs = [];\nvar inclusiveEndDates = false;\nvar topAxis = false; // The serial order of the task in the script\n\nvar lastOrder = 0;\nvar parseDirective = function parseDirective(statement, context, type) {\n  _mermaidAPI__WEBPACK_IMPORTED_MODULE_5__[\"default\"].parseDirective(this, statement, context, type);\n};\nvar clear = function clear() {\n  sections = [];\n  tasks = [];\n  currentSection = '';\n  funs = [];\n  title = '';\n  taskCnt = 0;\n  lastTask = undefined;\n  lastTaskID = undefined;\n  rawTasks = [];\n  dateFormat = '';\n  axisFormat = '';\n  todayMarker = '';\n  excludes = [];\n  inclusiveEndDates = false;\n  topAxis = false;\n  lastOrder = 0;\n};\nvar setAxisFormat = function setAxisFormat(txt) {\n  axisFormat = txt;\n};\nvar getAxisFormat = function getAxisFormat() {\n  return axisFormat;\n};\nvar setTodayMarker = function setTodayMarker(txt) {\n  todayMarker = txt;\n};\nvar getTodayMarker = function getTodayMarker() {\n  return todayMarker;\n};\nvar setDateFormat = function setDateFormat(txt) {\n  dateFormat = txt;\n};\nvar enableInclusiveEndDates = function enableInclusiveEndDates() {\n  inclusiveEndDates = true;\n};\nvar endDatesAreInclusive = function endDatesAreInclusive() {\n  return inclusiveEndDates;\n};\nvar enableTopAxis = function enableTopAxis() {\n  topAxis = true;\n};\nvar topAxisEnabled = function topAxisEnabled() {\n  return topAxis;\n};\nvar getDateFormat = function getDateFormat() {\n  return dateFormat;\n};\nvar setExcludes = function setExcludes(txt) {\n  excludes = txt.toLowerCase().split(/[\\s,]+/);\n};\nvar getExcludes = function getExcludes() {\n  return excludes;\n};\nvar setTitle = function setTitle(txt) {\n  title = txt;\n};\nvar getTitle = function getTitle() {\n  return title;\n};\nvar addSection = function addSection(txt) {\n  currentSection = txt;\n  sections.push(txt);\n};\nvar getSections = function getSections() {\n  return sections;\n};\nvar getTasks = function getTasks() {\n  var allItemsPricessed = compileTasks();\n  var maxDepth = 10;\n  var iterationCount = 0;\n\n  while (!allItemsPricessed && iterationCount < maxDepth) {\n    allItemsPricessed = compileTasks();\n    iterationCount++;\n  }\n\n  tasks = rawTasks;\n  return tasks;\n};\n\nvar isInvalidDate = function isInvalidDate(date, dateFormat, excludes) {\n  if (date.isoWeekday() >= 6 && excludes.indexOf('weekends') >= 0) {\n    return true;\n  }\n\n  if (excludes.indexOf(date.format('dddd').toLowerCase()) >= 0) {\n    return true;\n  }\n\n  return excludes.indexOf(date.format(dateFormat.trim())) >= 0;\n};\n\nvar checkTaskDates = function checkTaskDates(task, dateFormat, excludes) {\n  if (!excludes.length || task.manualEndTime) return;\n  var startTime = moment_mini__WEBPACK_IMPORTED_MODULE_0___default()(task.startTime, dateFormat, true);\n  startTime.add(1, 'd');\n  var endTime = moment_mini__WEBPACK_IMPORTED_MODULE_0___default()(task.endTime, dateFormat, true);\n  var renderEndTime = fixTaskDates(startTime, endTime, dateFormat, excludes);\n  task.endTime = endTime.toDate();\n  task.renderEndTime = renderEndTime;\n};\n\nvar fixTaskDates = function fixTaskDates(startTime, endTime, dateFormat, excludes) {\n  var invalid = false;\n  var renderEndTime = null;\n\n  while (startTime <= endTime) {\n    if (!invalid) {\n      renderEndTime = endTime.toDate();\n    }\n\n    invalid = isInvalidDate(startTime, dateFormat, excludes);\n\n    if (invalid) {\n      endTime.add(1, 'd');\n    }\n\n    startTime.add(1, 'd');\n  }\n\n  return renderEndTime;\n};\n\nvar getStartDate = function getStartDate(prevTime, dateFormat, str) {\n  str = str.trim(); // Test for after\n\n  var re = /^after\\s+([\\d\\w- ]+)/;\n  var afterStatement = re.exec(str.trim());\n\n  if (afterStatement !== null) {\n    // check all after ids and take the latest\n    var latestEndingTask = null;\n    afterStatement[1].split(' ').forEach(function (id) {\n      var task = findTaskById(id);\n\n      if (typeof task !== 'undefined') {\n        if (!latestEndingTask) {\n          latestEndingTask = task;\n        } else {\n          if (task.endTime > latestEndingTask.endTime) {\n            latestEndingTask = task;\n          }\n        }\n      }\n    });\n\n    if (!latestEndingTask) {\n      var dt = new Date();\n      dt.setHours(0, 0, 0, 0);\n      return dt;\n    } else {\n      return latestEndingTask.endTime;\n    }\n  } // Check for actual date set\n\n\n  var mDate = moment_mini__WEBPACK_IMPORTED_MODULE_0___default()(str, dateFormat.trim(), true);\n\n  if (mDate.isValid()) {\n    return mDate.toDate();\n  } else {\n    _logger__WEBPACK_IMPORTED_MODULE_2__[\"log\"].debug('Invalid date:' + str);\n    _logger__WEBPACK_IMPORTED_MODULE_2__[\"log\"].debug('With date format:' + dateFormat.trim());\n  } // Default date - now\n\n\n  return new Date();\n};\n\nvar durationToDate = function durationToDate(durationStatement, relativeTime) {\n  if (durationStatement !== null) {\n    switch (durationStatement[2]) {\n      case 's':\n        relativeTime.add(durationStatement[1], 'seconds');\n        break;\n\n      case 'm':\n        relativeTime.add(durationStatement[1], 'minutes');\n        break;\n\n      case 'h':\n        relativeTime.add(durationStatement[1], 'hours');\n        break;\n\n      case 'd':\n        relativeTime.add(durationStatement[1], 'days');\n        break;\n\n      case 'w':\n        relativeTime.add(durationStatement[1], 'weeks');\n        break;\n    }\n  } // Default date - now\n\n\n  return relativeTime.toDate();\n};\n\nvar getEndDate = function getEndDate(prevTime, dateFormat, str, inclusive) {\n  inclusive = inclusive || false;\n  str = str.trim(); // Check for actual date\n\n  var mDate = moment_mini__WEBPACK_IMPORTED_MODULE_0___default()(str, dateFormat.trim(), true);\n\n  if (mDate.isValid()) {\n    if (inclusive) {\n      mDate.add(1, 'd');\n    }\n\n    return mDate.toDate();\n  }\n\n  return durationToDate(/^([\\d]+)([wdhms])/.exec(str.trim()), moment_mini__WEBPACK_IMPORTED_MODULE_0___default()(prevTime));\n};\n\nvar taskCnt = 0;\n\nvar parseId = function parseId(idStr) {\n  if (typeof idStr === 'undefined') {\n    taskCnt = taskCnt + 1;\n    return 'task' + taskCnt;\n  }\n\n  return idStr;\n}; // id, startDate, endDate\n// id, startDate, length\n// id, after x, endDate\n// id, after x, length\n// startDate, endDate\n// startDate, length\n// after x, endDate\n// after x, length\n// endDate\n// length\n\n\nvar compileData = function compileData(prevTask, dataStr) {\n  var ds;\n\n  if (dataStr.substr(0, 1) === ':') {\n    ds = dataStr.substr(1, dataStr.length);\n  } else {\n    ds = dataStr;\n  }\n\n  var data = ds.split(',');\n  var task = {}; // Get tags like active, done, crit and milestone\n\n  getTaskTags(data, task, tags);\n\n  for (var i = 0; i < data.length; i++) {\n    data[i] = data[i].trim();\n  }\n\n  var endTimeData = '';\n\n  switch (data.length) {\n    case 1:\n      task.id = parseId();\n      task.startTime = prevTask.endTime;\n      endTimeData = data[0];\n      break;\n\n    case 2:\n      task.id = parseId();\n      task.startTime = getStartDate(undefined, dateFormat, data[0]);\n      endTimeData = data[1];\n      break;\n\n    case 3:\n      task.id = parseId(data[0]);\n      task.startTime = getStartDate(undefined, dateFormat, data[1]);\n      endTimeData = data[2];\n      break;\n\n    default:\n  }\n\n  if (endTimeData) {\n    task.endTime = getEndDate(task.startTime, dateFormat, endTimeData, inclusiveEndDates);\n    task.manualEndTime = moment_mini__WEBPACK_IMPORTED_MODULE_0___default()(endTimeData, 'YYYY-MM-DD', true).isValid();\n    checkTaskDates(task, dateFormat, excludes);\n  }\n\n  return task;\n};\n\nvar parseData = function parseData(prevTaskId, dataStr) {\n  var ds;\n\n  if (dataStr.substr(0, 1) === ':') {\n    ds = dataStr.substr(1, dataStr.length);\n  } else {\n    ds = dataStr;\n  }\n\n  var data = ds.split(',');\n  var task = {}; // Get tags like active, done, crit and milestone\n\n  getTaskTags(data, task, tags);\n\n  for (var i = 0; i < data.length; i++) {\n    data[i] = data[i].trim();\n  }\n\n  switch (data.length) {\n    case 1:\n      task.id = parseId();\n      task.startTime = {\n        type: 'prevTaskEnd',\n        id: prevTaskId\n      };\n      task.endTime = {\n        data: data[0]\n      };\n      break;\n\n    case 2:\n      task.id = parseId();\n      task.startTime = {\n        type: 'getStartDate',\n        startData: data[0]\n      };\n      task.endTime = {\n        data: data[1]\n      };\n      break;\n\n    case 3:\n      task.id = parseId(data[0]);\n      task.startTime = {\n        type: 'getStartDate',\n        startData: data[1]\n      };\n      task.endTime = {\n        data: data[2]\n      };\n      break;\n\n    default:\n  }\n\n  return task;\n};\n\nvar lastTask;\nvar lastTaskID;\nvar rawTasks = [];\nvar taskDb = {};\nvar addTask = function addTask(descr, data) {\n  var rawTask = {\n    section: currentSection,\n    type: currentSection,\n    processed: false,\n    manualEndTime: false,\n    renderEndTime: null,\n    raw: {\n      data: data\n    },\n    task: descr,\n    classes: []\n  };\n  var taskInfo = parseData(lastTaskID, data);\n  rawTask.raw.startTime = taskInfo.startTime;\n  rawTask.raw.endTime = taskInfo.endTime;\n  rawTask.id = taskInfo.id;\n  rawTask.prevTaskId = lastTaskID;\n  rawTask.active = taskInfo.active;\n  rawTask.done = taskInfo.done;\n  rawTask.crit = taskInfo.crit;\n  rawTask.milestone = taskInfo.milestone;\n  rawTask.order = lastOrder;\n  lastOrder++;\n  var pos = rawTasks.push(rawTask);\n  lastTaskID = rawTask.id; // Store cross ref\n\n  taskDb[rawTask.id] = pos - 1;\n};\nvar findTaskById = function findTaskById(id) {\n  var pos = taskDb[id];\n  return rawTasks[pos];\n};\nvar addTaskOrg = function addTaskOrg(descr, data) {\n  var newTask = {\n    section: currentSection,\n    type: currentSection,\n    description: descr,\n    task: descr,\n    classes: []\n  };\n  var taskInfo = compileData(lastTask, data);\n  newTask.startTime = taskInfo.startTime;\n  newTask.endTime = taskInfo.endTime;\n  newTask.id = taskInfo.id;\n  newTask.active = taskInfo.active;\n  newTask.done = taskInfo.done;\n  newTask.crit = taskInfo.crit;\n  newTask.milestone = taskInfo.milestone;\n  lastTask = newTask;\n  tasks.push(newTask);\n};\n\nvar compileTasks = function compileTasks() {\n  var compileTask = function compileTask(pos) {\n    var task = rawTasks[pos];\n    var startTime = '';\n\n    switch (rawTasks[pos].raw.startTime.type) {\n      case 'prevTaskEnd':\n        {\n          var prevTask = findTaskById(task.prevTaskId);\n          task.startTime = prevTask.endTime;\n          break;\n        }\n\n      case 'getStartDate':\n        startTime = getStartDate(undefined, dateFormat, rawTasks[pos].raw.startTime.startData);\n\n        if (startTime) {\n          rawTasks[pos].startTime = startTime;\n        }\n\n        break;\n    }\n\n    if (rawTasks[pos].startTime) {\n      rawTasks[pos].endTime = getEndDate(rawTasks[pos].startTime, dateFormat, rawTasks[pos].raw.endTime.data, inclusiveEndDates);\n\n      if (rawTasks[pos].endTime) {\n        rawTasks[pos].processed = true;\n        rawTasks[pos].manualEndTime = moment_mini__WEBPACK_IMPORTED_MODULE_0___default()(rawTasks[pos].raw.endTime.data, 'YYYY-MM-DD', true).isValid();\n        checkTaskDates(rawTasks[pos], dateFormat, excludes);\n      }\n    }\n\n    return rawTasks[pos].processed;\n  };\n\n  var allProcessed = true;\n\n  for (var i = 0; i < rawTasks.length; i++) {\n    compileTask(i);\n    allProcessed = allProcessed && rawTasks[i].processed;\n  }\n\n  return allProcessed;\n};\n/**\n * Called by parser when a link is found. Adds the URL to the vertex data.\n * @param ids Comma separated list of ids\n * @param linkStr URL to create a link for\n */\n\n\nvar setLink = function setLink(ids, _linkStr) {\n  var linkStr = _linkStr;\n\n  if (_config__WEBPACK_IMPORTED_MODULE_3__[\"getConfig\"]().securityLevel !== 'loose') {\n    linkStr = Object(_braintree_sanitize_url__WEBPACK_IMPORTED_MODULE_1__[\"sanitizeUrl\"])(_linkStr);\n  }\n\n  ids.split(',').forEach(function (id) {\n    var rawTask = findTaskById(id);\n\n    if (typeof rawTask !== 'undefined') {\n      pushFun(id, function () {\n        window.open(linkStr, '_self');\n      });\n    }\n  });\n  setClass(ids, 'clickable');\n};\n/**\n * Called by parser when a special node is found, e.g. a clickable element.\n * @param ids Comma separated list of ids\n * @param className Class to add\n */\n\nvar setClass = function setClass(ids, className) {\n  ids.split(',').forEach(function (id) {\n    var rawTask = findTaskById(id);\n\n    if (typeof rawTask !== 'undefined') {\n      rawTask.classes.push(className);\n    }\n  });\n};\n\nvar setClickFun = function setClickFun(id, functionName, functionArgs) {\n  if (_config__WEBPACK_IMPORTED_MODULE_3__[\"getConfig\"]().securityLevel !== 'loose') {\n    return;\n  }\n\n  if (typeof functionName === 'undefined') {\n    return;\n  }\n\n  var argList = [];\n\n  if (typeof functionArgs === 'string') {\n    /* Splits functionArgs by ',', ignoring all ',' in double quoted strings */\n    argList = functionArgs.split(/,(?=(?:(?:[^\"]*\"){2})*[^\"]*$)/);\n\n    for (var i = 0; i < argList.length; i++) {\n      var item = argList[i].trim();\n      /* Removes all double quotes at the start and end of an argument */\n\n      /* This preserves all starting and ending whitespace inside */\n\n      if (item.charAt(0) === '\"' && item.charAt(item.length - 1) === '\"') {\n        item = item.substr(1, item.length - 2);\n      }\n\n      argList[i] = item;\n    }\n  }\n  /* if no arguments passed into callback, default to passing in id */\n\n\n  if (argList.length === 0) {\n    argList.push(id);\n  }\n\n  var rawTask = findTaskById(id);\n\n  if (typeof rawTask !== 'undefined') {\n    pushFun(id, function () {\n      _utils__WEBPACK_IMPORTED_MODULE_4__[\"default\"].runFunc.apply(_utils__WEBPACK_IMPORTED_MODULE_4__[\"default\"], [functionName].concat(_toConsumableArray(argList)));\n    });\n  }\n};\n/**\n * The callbackFunction is executed in a click event bound to the task with the specified id or the task's assigned text\n * @param id The task's id\n * @param callbackFunction A function to be executed when clicked on the task or the task's text\n */\n\n\nvar pushFun = function pushFun(id, callbackFunction) {\n  funs.push(function () {\n    // const elem = d3.select(element).select(`[id=\"${id}\"]`)\n    var elem = document.querySelector(\"[id=\\\"\".concat(id, \"\\\"]\"));\n\n    if (elem !== null) {\n      elem.addEventListener('click', function () {\n        callbackFunction();\n      });\n    }\n  });\n  funs.push(function () {\n    // const elem = d3.select(element).select(`[id=\"${id}-text\"]`)\n    var elem = document.querySelector(\"[id=\\\"\".concat(id, \"-text\\\"]\"));\n\n    if (elem !== null) {\n      elem.addEventListener('click', function () {\n        callbackFunction();\n      });\n    }\n  });\n};\n/**\n * Called by parser when a click definition is found. Registers an event handler.\n * @param ids Comma separated list of ids\n * @param functionName Function to be called on click\n * @param functionArgs Function args the function should be called with\n */\n\n\nvar setClickEvent = function setClickEvent(ids, functionName, functionArgs) {\n  ids.split(',').forEach(function (id) {\n    setClickFun(id, functionName, functionArgs);\n  });\n  setClass(ids, 'clickable');\n};\n/**\n * Binds all functions previously added to fun (specified through click) to the element\n * @param element\n */\n\nvar bindFunctions = function bindFunctions(element) {\n  funs.forEach(function (fun) {\n    fun(element);\n  });\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n  parseDirective: parseDirective,\n  getConfig: function getConfig() {\n    return _config__WEBPACK_IMPORTED_MODULE_3__[\"getConfig\"]().gantt;\n  },\n  clear: clear,\n  setDateFormat: setDateFormat,\n  getDateFormat: getDateFormat,\n  enableInclusiveEndDates: enableInclusiveEndDates,\n  endDatesAreInclusive: endDatesAreInclusive,\n  enableTopAxis: enableTopAxis,\n  topAxisEnabled: topAxisEnabled,\n  setAxisFormat: setAxisFormat,\n  getAxisFormat: getAxisFormat,\n  setTodayMarker: setTodayMarker,\n  getTodayMarker: getTodayMarker,\n  setTitle: setTitle,\n  getTitle: getTitle,\n  addSection: addSection,\n  getSections: getSections,\n  getTasks: getTasks,\n  addTask: addTask,\n  findTaskById: findTaskById,\n  addTaskOrg: addTaskOrg,\n  setExcludes: setExcludes,\n  getExcludes: getExcludes,\n  setClickEvent: setClickEvent,\n  setLink: setLink,\n  bindFunctions: bindFunctions,\n  durationToDate: durationToDate\n});\n\nfunction getTaskTags(data, task, tags) {\n  var matchFound = true;\n\n  while (matchFound) {\n    matchFound = false;\n    tags.forEach(function (t) {\n      var pattern = '^\\\\s*' + t + '\\\\s*$';\n      var regex = new RegExp(pattern);\n\n      if (data[0].match(regex)) {\n        task[t] = true;\n        data.shift(1);\n        matchFound = true;\n      }\n    });\n  }\n}\n\n/***/ }),\n\n/***/ \"./src/diagrams/gantt/ganttRenderer.js\":\n/*!*********************************************!*\\\n  !*** ./src/diagrams/gantt/ganttRenderer.js ***!\n  \\*********************************************/\n/*! exports provided: setConf, draw, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"setConf\", function() { return setConf; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"draw\", function() { return draw; });\n/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3 */ \"./node_modules/d3/src/index.js\");\n/* harmony import */ var _parser_gantt__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./parser/gantt */ \"./src/diagrams/gantt/parser/gantt.jison\");\n/* harmony import */ var _parser_gantt__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_parser_gantt__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _common_common__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../common/common */ \"./src/diagrams/common/common.js\");\n/* harmony import */ var _ganttDb__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./ganttDb */ \"./src/diagrams/gantt/ganttDb.js\");\n/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../config */ \"./src/config.js\");\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../utils */ \"./src/utils.js\");\n\n\n\n\n\n\n_parser_gantt__WEBPACK_IMPORTED_MODULE_1__[\"parser\"].yy = _ganttDb__WEBPACK_IMPORTED_MODULE_3__[\"default\"];\nvar setConf = function setConf() {// const keys = Object.keys(cnf);\n  // keys.forEach(function(key) {\n  //   conf[key] = cnf[key];\n  // });\n};\nvar w;\nvar draw = function draw(text, id) {\n  var conf = Object(_config__WEBPACK_IMPORTED_MODULE_4__[\"getConfig\"])().gantt;\n  _parser_gantt__WEBPACK_IMPORTED_MODULE_1__[\"parser\"].yy.clear();\n  _parser_gantt__WEBPACK_IMPORTED_MODULE_1__[\"parser\"].parse(text);\n  var elem = document.getElementById(id);\n  w = elem.parentElement.offsetWidth;\n\n  if (typeof w === 'undefined') {\n    w = 1200;\n  }\n\n  if (typeof conf.useWidth !== 'undefined') {\n    w = conf.useWidth;\n  }\n\n  var taskArray = _parser_gantt__WEBPACK_IMPORTED_MODULE_1__[\"parser\"].yy.getTasks(); // Set height based on number of tasks\n\n  var h = taskArray.length * (conf.barHeight + conf.barGap) + 2 * conf.topPadding; // Set viewBox\n\n  elem.setAttribute('viewBox', '0 0 ' + w + ' ' + h);\n  var svg = Object(d3__WEBPACK_IMPORTED_MODULE_0__[\"select\"])(\"[id=\\\"\".concat(id, \"\\\"]\")); // Set timescale\n\n  var timeScale = Object(d3__WEBPACK_IMPORTED_MODULE_0__[\"scaleTime\"])().domain([Object(d3__WEBPACK_IMPORTED_MODULE_0__[\"min\"])(taskArray, function (d) {\n    return d.startTime;\n  }), Object(d3__WEBPACK_IMPORTED_MODULE_0__[\"max\"])(taskArray, function (d) {\n    return d.endTime;\n  })]).rangeRound([0, w - conf.leftPadding - conf.rightPadding]);\n  var categories = [];\n\n  for (var i = 0; i < taskArray.length; i++) {\n    categories.push(taskArray[i].type);\n  }\n\n  var catsUnfiltered = categories; // for vert labels\n\n  categories = checkUnique(categories);\n\n  function taskCompare(a, b) {\n    var taskA = a.startTime;\n    var taskB = b.startTime;\n    var result = 0;\n\n    if (taskA > taskB) {\n      result = 1;\n    } else if (taskA < taskB) {\n      result = -1;\n    }\n\n    return result;\n  } // Sort the task array using the above taskCompare() so that\n  // tasks are created based on their order of startTime\n\n\n  taskArray.sort(taskCompare);\n  makeGant(taskArray, w, h);\n  Object(_utils__WEBPACK_IMPORTED_MODULE_5__[\"configureSvgSize\"])(svg, h, w, conf.useMaxWidth);\n  svg.append('text').text(_parser_gantt__WEBPACK_IMPORTED_MODULE_1__[\"parser\"].yy.getTitle()).attr('x', w / 2).attr('y', conf.titleTopMargin).attr('class', 'titleText');\n\n  function makeGant(tasks, pageWidth, pageHeight) {\n    var barHeight = conf.barHeight;\n    var gap = barHeight + conf.barGap;\n    var topPadding = conf.topPadding;\n    var leftPadding = conf.leftPadding;\n    var colorScale = Object(d3__WEBPACK_IMPORTED_MODULE_0__[\"scaleLinear\"])().domain([0, categories.length]).range(['#00B9FA', '#F95002']).interpolate(d3__WEBPACK_IMPORTED_MODULE_0__[\"interpolateHcl\"]);\n    makeGrid(leftPadding, topPadding, pageWidth, pageHeight);\n    drawRects(tasks, gap, topPadding, leftPadding, barHeight, colorScale, pageWidth, pageHeight);\n    vertLabels(gap, topPadding, leftPadding, barHeight, colorScale);\n    drawToday(leftPadding, topPadding, pageWidth, pageHeight);\n  }\n\n  function drawRects(theArray, theGap, theTopPad, theSidePad, theBarHeight, theColorScale, w) {\n    // Draw background rects covering the entire width of the graph, these form the section rows.\n    svg.append('g').selectAll('rect').data(theArray).enter().append('rect').attr('x', 0).attr('y', function (d, i) {\n      // Ignore the incoming i value and use our order instead\n      i = d.order;\n      return i * theGap + theTopPad - 2;\n    }).attr('width', function () {\n      return w - conf.rightPadding / 2;\n    }).attr('height', theGap).attr('class', function (d) {\n      for (var _i = 0; _i < categories.length; _i++) {\n        if (d.type === categories[_i]) {\n          return 'section section' + _i % conf.numberSectionStyles;\n        }\n      }\n\n      return 'section section0';\n    }); // Draw the rects representing the tasks\n\n    var rectangles = svg.append('g').selectAll('rect').data(theArray).enter();\n    rectangles.append('rect').attr('id', function (d) {\n      return d.id;\n    }).attr('rx', 3).attr('ry', 3).attr('x', function (d) {\n      if (d.milestone) {\n        return timeScale(d.startTime) + theSidePad + 0.5 * (timeScale(d.endTime) - timeScale(d.startTime)) - 0.5 * theBarHeight;\n      }\n\n      return timeScale(d.startTime) + theSidePad;\n    }).attr('y', function (d, i) {\n      // Ignore the incoming i value and use our order instead\n      i = d.order;\n      return i * theGap + theTopPad;\n    }).attr('width', function (d) {\n      if (d.milestone) {\n        return theBarHeight;\n      }\n\n      return timeScale(d.renderEndTime || d.endTime) - timeScale(d.startTime);\n    }).attr('height', theBarHeight).attr('transform-origin', function (d, i) {\n      // Ignore the incoming i value and use our order instead\n      i = d.order;\n      return (timeScale(d.startTime) + theSidePad + 0.5 * (timeScale(d.endTime) - timeScale(d.startTime))).toString() + 'px ' + (i * theGap + theTopPad + 0.5 * theBarHeight).toString() + 'px';\n    }).attr('class', function (d) {\n      var res = 'task';\n      var classStr = '';\n\n      if (d.classes.length > 0) {\n        classStr = d.classes.join(' ');\n      }\n\n      var secNum = 0;\n\n      for (var _i2 = 0; _i2 < categories.length; _i2++) {\n        if (d.type === categories[_i2]) {\n          secNum = _i2 % conf.numberSectionStyles;\n        }\n      }\n\n      var taskClass = '';\n\n      if (d.active) {\n        if (d.crit) {\n          taskClass += ' activeCrit';\n        } else {\n          taskClass = ' active';\n        }\n      } else if (d.done) {\n        if (d.crit) {\n          taskClass = ' doneCrit';\n        } else {\n          taskClass = ' done';\n        }\n      } else {\n        if (d.crit) {\n          taskClass += ' crit';\n        }\n      }\n\n      if (taskClass.length === 0) {\n        taskClass = ' task';\n      }\n\n      if (d.milestone) {\n        taskClass = ' milestone ' + taskClass;\n      }\n\n      taskClass += secNum;\n      taskClass += ' ' + classStr;\n      return res + taskClass;\n    }); // Append task labels\n\n    rectangles.append('text').attr('id', function (d) {\n      return d.id + '-text';\n    }).text(function (d) {\n      return d.task;\n    }).attr('font-size', conf.fontSize).attr('x', function (d) {\n      var startX = timeScale(d.startTime);\n      var endX = timeScale(d.renderEndTime || d.endTime);\n\n      if (d.milestone) {\n        startX += 0.5 * (timeScale(d.endTime) - timeScale(d.startTime)) - 0.5 * theBarHeight;\n      }\n\n      if (d.milestone) {\n        endX = startX + theBarHeight;\n      }\n\n      var textWidth = this.getBBox().width; // Check id text width > width of rectangle\n\n      if (textWidth > endX - startX) {\n        if (endX + textWidth + 1.5 * conf.leftPadding > w) {\n          return startX + theSidePad - 5;\n        } else {\n          return endX + theSidePad + 5;\n        }\n      } else {\n        return (endX - startX) / 2 + startX + theSidePad;\n      }\n    }).attr('y', function (d, i) {\n      // Ignore the incoming i value and use our order instead\n      i = d.order;\n      return i * theGap + conf.barHeight / 2 + (conf.fontSize / 2 - 2) + theTopPad;\n    }).attr('text-height', theBarHeight).attr('class', function (d) {\n      var startX = timeScale(d.startTime);\n      var endX = timeScale(d.endTime);\n\n      if (d.milestone) {\n        endX = startX + theBarHeight;\n      }\n\n      var textWidth = this.getBBox().width;\n      var classStr = '';\n\n      if (d.classes.length > 0) {\n        classStr = d.classes.join(' ');\n      }\n\n      var secNum = 0;\n\n      for (var _i3 = 0; _i3 < categories.length; _i3++) {\n        if (d.type === categories[_i3]) {\n          secNum = _i3 % conf.numberSectionStyles;\n        }\n      }\n\n      var taskType = '';\n\n      if (d.active) {\n        if (d.crit) {\n          taskType = 'activeCritText' + secNum;\n        } else {\n          taskType = 'activeText' + secNum;\n        }\n      }\n\n      if (d.done) {\n        if (d.crit) {\n          taskType = taskType + ' doneCritText' + secNum;\n        } else {\n          taskType = taskType + ' doneText' + secNum;\n        }\n      } else {\n        if (d.crit) {\n          taskType = taskType + ' critText' + secNum;\n        }\n      }\n\n      if (d.milestone) {\n        taskType += ' milestoneText';\n      } // Check id text width > width of rectangle\n\n\n      if (textWidth > endX - startX) {\n        if (endX + textWidth + 1.5 * conf.leftPadding > w) {\n          return classStr + ' taskTextOutsideLeft taskTextOutside' + secNum + ' ' + taskType;\n        } else {\n          return classStr + ' taskTextOutsideRight taskTextOutside' + secNum + ' ' + taskType + ' width-' + textWidth;\n        }\n      } else {\n        return classStr + ' taskText taskText' + secNum + ' ' + taskType + ' width-' + textWidth;\n      }\n    });\n  }\n\n  function makeGrid(theSidePad, theTopPad, w, h) {\n    var bottomXAxis = Object(d3__WEBPACK_IMPORTED_MODULE_0__[\"axisBottom\"])(timeScale).tickSize(-h + theTopPad + conf.gridLineStartPadding).tickFormat(Object(d3__WEBPACK_IMPORTED_MODULE_0__[\"timeFormat\"])(_parser_gantt__WEBPACK_IMPORTED_MODULE_1__[\"parser\"].yy.getAxisFormat() || conf.axisFormat || '%Y-%m-%d'));\n    svg.append('g').attr('class', 'grid').attr('transform', 'translate(' + theSidePad + ', ' + (h - 50) + ')').call(bottomXAxis).selectAll('text').style('text-anchor', 'middle').attr('fill', '#000').attr('stroke', 'none').attr('font-size', 10).attr('dy', '1em');\n\n    if (_ganttDb__WEBPACK_IMPORTED_MODULE_3__[\"default\"].topAxisEnabled() || conf.topAxis) {\n      var topXAxis = Object(d3__WEBPACK_IMPORTED_MODULE_0__[\"axisTop\"])(timeScale).tickSize(-h + theTopPad + conf.gridLineStartPadding).tickFormat(Object(d3__WEBPACK_IMPORTED_MODULE_0__[\"timeFormat\"])(_parser_gantt__WEBPACK_IMPORTED_MODULE_1__[\"parser\"].yy.getAxisFormat() || conf.axisFormat || '%Y-%m-%d'));\n      svg.append('g').attr('class', 'grid').attr('transform', 'translate(' + theSidePad + ', ' + theTopPad + ')').call(topXAxis).selectAll('text').style('text-anchor', 'middle').attr('fill', '#000').attr('stroke', 'none').attr('font-size', 10); // .attr('dy', '1em');\n    }\n  }\n\n  function vertLabels(theGap, theTopPad) {\n    var numOccurances = [];\n    var prevGap = 0;\n\n    for (var _i4 = 0; _i4 < categories.length; _i4++) {\n      numOccurances[_i4] = [categories[_i4], getCount(categories[_i4], catsUnfiltered)];\n    }\n\n    svg.append('g') // without doing this, impossible to put grid lines behind text\n    .selectAll('text').data(numOccurances).enter().append(function (d) {\n      var rows = d[0].split(_common_common__WEBPACK_IMPORTED_MODULE_2__[\"default\"].lineBreakRegex);\n      var dy = -(rows.length - 1) / 2;\n      var svgLabel = document.createElementNS('http://www.w3.org/2000/svg', 'text');\n      svgLabel.setAttribute('dy', dy + 'em');\n\n      for (var j = 0; j < rows.length; j++) {\n        var tspan = document.createElementNS('http://www.w3.org/2000/svg', 'tspan');\n        tspan.setAttribute('alignment-baseline', 'central');\n        tspan.setAttribute('x', '10');\n        if (j > 0) tspan.setAttribute('dy', '1em');\n        tspan.textContent = rows[j];\n        svgLabel.appendChild(tspan);\n      }\n\n      return svgLabel;\n    }).attr('x', 10).attr('y', function (d, i) {\n      if (i > 0) {\n        for (var j = 0; j < i; j++) {\n          prevGap += numOccurances[i - 1][1];\n          return d[1] * theGap / 2 + prevGap * theGap + theTopPad;\n        }\n      } else {\n        return d[1] * theGap / 2 + theTopPad;\n      }\n    }).attr('font-size', conf.sectionFontSize).attr('font-size', conf.sectionFontSize).attr('class', function (d) {\n      for (var _i5 = 0; _i5 < categories.length; _i5++) {\n        if (d[0] === categories[_i5]) {\n          return 'sectionTitle sectionTitle' + _i5 % conf.numberSectionStyles;\n        }\n      }\n\n      return 'sectionTitle';\n    });\n  }\n\n  function drawToday(theSidePad, theTopPad, w, h) {\n    var todayMarker = _ganttDb__WEBPACK_IMPORTED_MODULE_3__[\"default\"].getTodayMarker();\n\n    if (todayMarker === 'off') {\n      return;\n    }\n\n    var todayG = svg.append('g').attr('class', 'today');\n    var today = new Date();\n    var todayLine = todayG.append('line');\n    todayLine.attr('x1', timeScale(today) + theSidePad).attr('x2', timeScale(today) + theSidePad).attr('y1', conf.titleTopMargin).attr('y2', h - conf.titleTopMargin).attr('class', 'today');\n\n    if (todayMarker !== '') {\n      todayLine.attr('style', todayMarker.replace(/,/g, ';'));\n    }\n  } // from this stackexchange question: http://stackoverflow.com/questions/1890203/unique-for-arrays-in-javascript\n\n\n  function checkUnique(arr) {\n    var hash = {};\n    var result = [];\n\n    for (var _i6 = 0, l = arr.length; _i6 < l; ++_i6) {\n      if (!hash.hasOwnProperty(arr[_i6])) {\n        // eslint-disable-line\n        // it works with objects! in FF, at least\n        hash[arr[_i6]] = true;\n        result.push(arr[_i6]);\n      }\n    }\n\n    return result;\n  } // from this stackexchange question: http://stackoverflow.com/questions/14227981/count-how-many-strings-in-an-array-have-duplicates-in-the-same-array\n\n\n  function getCounts(arr) {\n    var i = arr.length; // const to loop over\n\n    var obj = {}; // obj to store results\n\n    while (i) {\n      obj[arr[--i]] = (obj[arr[i]] || 0) + 1; // count occurrences\n    }\n\n    return obj;\n  } // get specific from everything\n\n\n  function getCount(word, arr) {\n    return getCounts(arr)[word] || 0;\n  }\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n  setConf: setConf,\n  draw: draw\n});\n\n/***/ }),\n\n/***/ \"./src/diagrams/gantt/parser/gantt.jison\":\n/*!***********************************************!*\\\n  !*** ./src/diagrams/gantt/parser/gantt.jison ***!\n  \\***********************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n/* WEBPACK VAR INJECTION */(function(process, module) {/* parser generated by jison 0.4.18 */\n/*\n  Returns a Parser object of the following structure:\n\n  Parser: {\n    yy: {}\n  }\n\n  Parser.prototype: {\n    yy: {},\n    trace: function(),\n    symbols_: {associative list: name ==> number},\n    terminals_: {associative list: number ==> name},\n    productions_: [...],\n    performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$),\n    table: [...],\n    defaultActions: {...},\n    parseError: function(str, hash),\n    parse: function(input),\n\n    lexer: {\n        EOF: 1,\n        parseError: function(str, hash),\n        setInput: function(input),\n        input: function(),\n        unput: function(str),\n        more: function(),\n        less: function(n),\n        pastInput: function(),\n        upcomingInput: function(),\n        showPosition: function(),\n        test_match: function(regex_match_array, rule_index),\n        next: function(),\n        lex: function(),\n        begin: function(condition),\n        popState: function(),\n        _currentRules: function(),\n        topState: function(),\n        pushState: function(condition),\n\n        options: {\n            ranges: boolean           (optional: true ==> token location info will include a .range[] member)\n            flex: boolean             (optional: true ==> flex-like lexing behaviour where the rules are tested exhaustively to find the longest match)\n            backtrack_lexer: boolean  (optional: true ==> lexer regexes are tested in order and for each matching regex the action code is invoked; the lexer terminates the scan when a token is returned by the action code)\n        },\n\n        performAction: function(yy, yy_, $avoiding_name_collisions, YY_START),\n        rules: [...],\n        conditions: {associative list: name ==> set},\n    }\n  }\n\n\n  token location info (@$, _$, etc.): {\n    first_line: n,\n    last_line: n,\n    first_column: n,\n    last_column: n,\n    range: [start_number, end_number]       (where the numbers are indexes into the input string, regular zero-based)\n  }\n\n\n  the parseError function receives a 'hash' object with these members for lexer and parser errors: {\n    text:        (matched text)\n    token:       (the produced terminal token, if any)\n    line:        (yylineno)\n  }\n  while parser (grammar) errors will also provide these members, i.e. parser errors deliver a superset of attributes: {\n    loc:         (yylloc)\n    expected:    (string describing the set of expected tokens)\n    recoverable: (boolean: TRUE when the parser has a error recovery rule available for this particular error)\n  }\n*/\nvar parser = (function(){\nvar o=function(k,v,o,l){for(o=o||{},l=k.length;l--;o[k[l]]=v);return o},$V0=[1,3],$V1=[1,5],$V2=[7,9,11,12,13,14,15,16,17,18,19,21,28,33],$V3=[1,15],$V4=[1,16],$V5=[1,17],$V6=[1,18],$V7=[1,19],$V8=[1,20],$V9=[1,21],$Va=[1,22],$Vb=[1,24],$Vc=[1,26],$Vd=[1,29],$Ve=[5,7,9,11,12,13,14,15,16,17,18,19,21,28,33];\nvar parser = {trace: function trace () { },\nyy: {},\nsymbols_: {\"error\":2,\"start\":3,\"directive\":4,\"gantt\":5,\"document\":6,\"EOF\":7,\"line\":8,\"SPACE\":9,\"statement\":10,\"NL\":11,\"dateFormat\":12,\"inclusiveEndDates\":13,\"topAxis\":14,\"axisFormat\":15,\"excludes\":16,\"todayMarker\":17,\"title\":18,\"section\":19,\"clickStatement\":20,\"taskTxt\":21,\"taskData\":22,\"openDirective\":23,\"typeDirective\":24,\"closeDirective\":25,\":\":26,\"argDirective\":27,\"click\":28,\"callbackname\":29,\"callbackargs\":30,\"href\":31,\"clickStatementDebug\":32,\"open_directive\":33,\"type_directive\":34,\"arg_directive\":35,\"close_directive\":36,\"$accept\":0,\"$end\":1},\nterminals_: {2:\"error\",5:\"gantt\",7:\"EOF\",9:\"SPACE\",11:\"NL\",12:\"dateFormat\",13:\"inclusiveEndDates\",14:\"topAxis\",15:\"axisFormat\",16:\"excludes\",17:\"todayMarker\",18:\"title\",19:\"section\",21:\"taskTxt\",22:\"taskData\",26:\":\",28:\"click\",29:\"callbackname\",30:\"callbackargs\",31:\"href\",33:\"open_directive\",34:\"type_directive\",35:\"arg_directive\",36:\"close_directive\"},\nproductions_: [0,[3,2],[3,3],[6,0],[6,2],[8,2],[8,1],[8,1],[8,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,2],[10,1],[4,4],[4,6],[20,2],[20,3],[20,3],[20,4],[20,3],[20,4],[20,2],[32,2],[32,3],[32,3],[32,4],[32,3],[32,4],[32,2],[23,1],[24,1],[27,1],[25,1]],\nperformAction: function anonymous(yytext, yyleng, yylineno, yy, yystate /* action[1] */, $$ /* vstack */, _$ /* lstack */) {\n/* this == yyval */\n\nvar $0 = $$.length - 1;\nswitch (yystate) {\ncase 2:\n return $$[$0-1]; \nbreak;\ncase 3:\n this.$ = [] \nbreak;\ncase 4:\n$$[$0-1].push($$[$0]);this.$ = $$[$0-1]\nbreak;\ncase 5: case 6:\n this.$ = $$[$0] \nbreak;\ncase 7: case 8:\n this.$=[];\nbreak;\ncase 9:\nyy.setDateFormat($$[$0].substr(11));this.$=$$[$0].substr(11);\nbreak;\ncase 10:\nyy.enableInclusiveEndDates();this.$=$$[$0].substr(18);\nbreak;\ncase 11:\nyy.TopAxis();this.$=$$[$0].substr(8);\nbreak;\ncase 12:\nyy.setAxisFormat($$[$0].substr(11));this.$=$$[$0].substr(11);\nbreak;\ncase 13:\nyy.setExcludes($$[$0].substr(9));this.$=$$[$0].substr(9);\nbreak;\ncase 14:\nyy.setTodayMarker($$[$0].substr(12));this.$=$$[$0].substr(12);\nbreak;\ncase 15:\nyy.setTitle($$[$0].substr(6));this.$=$$[$0].substr(6);\nbreak;\ncase 16:\nyy.addSection($$[$0].substr(8));this.$=$$[$0].substr(8);\nbreak;\ncase 18:\nyy.addTask($$[$0-1],$$[$0]);this.$='task';\nbreak;\ncase 22:\nthis.$ = $$[$0-1];yy.setClickEvent($$[$0-1], $$[$0], null);\nbreak;\ncase 23:\nthis.$ = $$[$0-2];yy.setClickEvent($$[$0-2], $$[$0-1], $$[$0]);\nbreak;\ncase 24:\nthis.$ = $$[$0-2];yy.setClickEvent($$[$0-2], $$[$0-1], null);yy.setLink($$[$0-2],$$[$0]);\nbreak;\ncase 25:\nthis.$ = $$[$0-3];yy.setClickEvent($$[$0-3], $$[$0-2], $$[$0-1]);yy.setLink($$[$0-3],$$[$0]);\nbreak;\ncase 26:\nthis.$ = $$[$0-2];yy.setClickEvent($$[$0-2], $$[$0], null);yy.setLink($$[$0-2],$$[$0-1]);\nbreak;\ncase 27:\nthis.$ = $$[$0-3];yy.setClickEvent($$[$0-3], $$[$0-1], $$[$0]);yy.setLink($$[$0-3],$$[$0-2]);\nbreak;\ncase 28:\nthis.$ = $$[$0-1];yy.setLink($$[$0-1], $$[$0]);\nbreak;\ncase 29: case 35:\nthis.$=$$[$0-1] + ' ' + $$[$0];\nbreak;\ncase 30: case 31: case 33:\nthis.$=$$[$0-2] + ' ' + $$[$0-1] + ' ' + $$[$0];\nbreak;\ncase 32: case 34:\nthis.$=$$[$0-3] + ' ' + $$[$0-2] + ' ' + $$[$0-1] + ' ' + $$[$0];\nbreak;\ncase 36:\n yy.parseDirective('%%{', 'open_directive'); \nbreak;\ncase 37:\n yy.parseDirective($$[$0], 'type_directive'); \nbreak;\ncase 38:\n $$[$0] = $$[$0].trim().replace(/'/g, '\"'); yy.parseDirective($$[$0], 'arg_directive'); \nbreak;\ncase 39:\n yy.parseDirective('}%%', 'close_directive', 'gantt'); \nbreak;\n}\n},\ntable: [{3:1,4:2,5:$V0,23:4,33:$V1},{1:[3]},{3:6,4:2,5:$V0,23:4,33:$V1},o($V2,[2,3],{6:7}),{24:8,34:[1,9]},{34:[2,36]},{1:[2,1]},{4:25,7:[1,10],8:11,9:[1,12],10:13,11:[1,14],12:$V3,13:$V4,14:$V5,15:$V6,16:$V7,17:$V8,18:$V9,19:$Va,20:23,21:$Vb,23:4,28:$Vc,33:$V1},{25:27,26:[1,28],36:$Vd},o([26,36],[2,37]),o($V2,[2,8],{1:[2,2]}),o($V2,[2,4]),{4:25,10:30,12:$V3,13:$V4,14:$V5,15:$V6,16:$V7,17:$V8,18:$V9,19:$Va,20:23,21:$Vb,23:4,28:$Vc,33:$V1},o($V2,[2,6]),o($V2,[2,7]),o($V2,[2,9]),o($V2,[2,10]),o($V2,[2,11]),o($V2,[2,12]),o($V2,[2,13]),o($V2,[2,14]),o($V2,[2,15]),o($V2,[2,16]),o($V2,[2,17]),{22:[1,31]},o($V2,[2,19]),{29:[1,32],31:[1,33]},{11:[1,34]},{27:35,35:[1,36]},{11:[2,39]},o($V2,[2,5]),o($V2,[2,18]),o($V2,[2,22],{30:[1,37],31:[1,38]}),o($V2,[2,28],{29:[1,39]}),o($Ve,[2,20]),{25:40,36:$Vd},{36:[2,38]},o($V2,[2,23],{31:[1,41]}),o($V2,[2,24]),o($V2,[2,26],{30:[1,42]}),{11:[1,43]},o($V2,[2,25]),o($V2,[2,27]),o($Ve,[2,21])],\ndefaultActions: {5:[2,36],6:[2,1],29:[2,39],36:[2,38]},\nparseError: function parseError (str, hash) {\n    if (hash.recoverable) {\n        this.trace(str);\n    } else {\n        var error = new Error(str);\n        error.hash = hash;\n        throw error;\n    }\n},\nparse: function parse(input) {\n    var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = '', yylineno = 0, yyleng = 0, recovering = 0, TERROR = 2, EOF = 1;\n    var args = lstack.slice.call(arguments, 1);\n    var lexer = Object.create(this.lexer);\n    var sharedState = { yy: {} };\n    for (var k in this.yy) {\n        if (Object.prototype.hasOwnProperty.call(this.yy, k)) {\n            sharedState.yy[k] = this.yy[k];\n        }\n    }\n    lexer.setInput(input, sharedState.yy);\n    sharedState.yy.lexer = lexer;\n    sharedState.yy.parser = this;\n    if (typeof lexer.yylloc == 'undefined') {\n        lexer.yylloc = {};\n    }\n    var yyloc = lexer.yylloc;\n    lstack.push(yyloc);\n    var ranges = lexer.options && lexer.options.ranges;\n    if (typeof sharedState.yy.parseError === 'function') {\n        this.parseError = sharedState.yy.parseError;\n    } else {\n        this.parseError = Object.getPrototypeOf(this).parseError;\n    }\n    function popStack(n) {\n        stack.length = stack.length - 2 * n;\n        vstack.length = vstack.length - n;\n        lstack.length = lstack.length - n;\n    }\n            function lex() {\n            var token;\n            token = tstack.pop() || lexer.lex() || EOF;\n            if (typeof token !== 'number') {\n                if (token instanceof Array) {\n                    tstack = token;\n                    token = tstack.pop();\n                }\n                token = self.symbols_[token] || token;\n            }\n            return token;\n        }\n    var symbol, preErrorSymbol, state, action, a, r, yyval = {}, p, len, newState, expected;\n    while (true) {\n        state = stack[stack.length - 1];\n        if (this.defaultActions[state]) {\n            action = this.defaultActions[state];\n        } else {\n            if (symbol === null || typeof symbol == 'undefined') {\n                symbol = lex();\n            }\n            action = table[state] && table[state][symbol];\n        }\n        if (typeof action === 'undefined' || !action.length || !action[0]) {\n            var errStr = '';\n            expected = [];\n            for (p in table[state]) {\n                if (this.terminals_[p] && p > TERROR) {\n                    expected.push('\\'' + this.terminals_[p] + '\\'');\n                }\n            }\n            if (lexer.showPosition) {\n                errStr = 'Parse error on line ' + (yylineno + 1) + ':\\n' + lexer.showPosition() + '\\nExpecting ' + expected.join(', ') + ', got \\'' + (this.terminals_[symbol] || symbol) + '\\'';\n            } else {\n                errStr = 'Parse error on line ' + (yylineno + 1) + ': Unexpected ' + (symbol == EOF ? 'end of input' : '\\'' + (this.terminals_[symbol] || symbol) + '\\'');\n            }\n            this.parseError(errStr, {\n                text: lexer.match,\n                token: this.terminals_[symbol] || symbol,\n                line: lexer.yylineno,\n                loc: yyloc,\n                expected: expected\n            });\n        }\n        if (action[0] instanceof Array && action.length > 1) {\n            throw new Error('Parse Error: multiple actions possible at state: ' + state + ', token: ' + symbol);\n        }\n        switch (action[0]) {\n        case 1:\n            stack.push(symbol);\n            vstack.push(lexer.yytext);\n            lstack.push(lexer.yylloc);\n            stack.push(action[1]);\n            symbol = null;\n            if (!preErrorSymbol) {\n                yyleng = lexer.yyleng;\n                yytext = lexer.yytext;\n                yylineno = lexer.yylineno;\n                yyloc = lexer.yylloc;\n                if (recovering > 0) {\n                    recovering--;\n                }\n            } else {\n                symbol = preErrorSymbol;\n                preErrorSymbol = null;\n            }\n            break;\n        case 2:\n            len = this.productions_[action[1]][1];\n            yyval.$ = vstack[vstack.length - len];\n            yyval._$ = {\n                first_line: lstack[lstack.length - (len || 1)].first_line,\n                last_line: lstack[lstack.length - 1].last_line,\n                first_column: lstack[lstack.length - (len || 1)].first_column,\n                last_column: lstack[lstack.length - 1].last_column\n            };\n            if (ranges) {\n                yyval._$.range = [\n                    lstack[lstack.length - (len || 1)].range[0],\n                    lstack[lstack.length - 1].range[1]\n                ];\n            }\n            r = this.performAction.apply(yyval, [\n                yytext,\n                yyleng,\n                yylineno,\n                sharedState.yy,\n                action[1],\n                vstack,\n                lstack\n            ].concat(args));\n            if (typeof r !== 'undefined') {\n                return r;\n            }\n            if (len) {\n                stack = stack.slice(0, -1 * len * 2);\n                vstack = vstack.slice(0, -1 * len);\n                lstack = lstack.slice(0, -1 * len);\n            }\n            stack.push(this.productions_[action[1]][0]);\n            vstack.push(yyval.$);\n            lstack.push(yyval._$);\n            newState = table[stack[stack.length - 2]][stack[stack.length - 1]];\n            stack.push(newState);\n            break;\n        case 3:\n            return true;\n        }\n    }\n    return true;\n}};\n\n/* generated by jison-lex 0.3.4 */\nvar lexer = (function(){\nvar lexer = ({\n\nEOF:1,\n\nparseError:function parseError(str, hash) {\n        if (this.yy.parser) {\n            this.yy.parser.parseError(str, hash);\n        } else {\n            throw new Error(str);\n        }\n    },\n\n// resets the lexer, sets new input\nsetInput:function (input, yy) {\n        this.yy = yy || this.yy || {};\n        this._input = input;\n        this._more = this._backtrack = this.done = false;\n        this.yylineno = this.yyleng = 0;\n        this.yytext = this.matched = this.match = '';\n        this.conditionStack = ['INITIAL'];\n        this.yylloc = {\n            first_line: 1,\n            first_column: 0,\n            last_line: 1,\n            last_column: 0\n        };\n        if (this.options.ranges) {\n            this.yylloc.range = [0,0];\n        }\n        this.offset = 0;\n        return this;\n    },\n\n// consumes and returns one char from the input\ninput:function () {\n        var ch = this._input[0];\n        this.yytext += ch;\n        this.yyleng++;\n        this.offset++;\n        this.match += ch;\n        this.matched += ch;\n        var lines = ch.match(/(?:\\r\\n?|\\n).*/g);\n        if (lines) {\n            this.yylineno++;\n            this.yylloc.last_line++;\n        } else {\n            this.yylloc.last_column++;\n        }\n        if (this.options.ranges) {\n            this.yylloc.range[1]++;\n        }\n\n        this._input = this._input.slice(1);\n        return ch;\n    },\n\n// unshifts one char (or a string) into the input\nunput:function (ch) {\n        var len = ch.length;\n        var lines = ch.split(/(?:\\r\\n?|\\n)/g);\n\n        this._input = ch + this._input;\n        this.yytext = this.yytext.substr(0, this.yytext.length - len);\n        //this.yyleng -= len;\n        this.offset -= len;\n        var oldLines = this.match.split(/(?:\\r\\n?|\\n)/g);\n        this.match = this.match.substr(0, this.match.length - 1);\n        this.matched = this.matched.substr(0, this.matched.length - 1);\n\n        if (lines.length - 1) {\n            this.yylineno -= lines.length - 1;\n        }\n        var r = this.yylloc.range;\n\n        this.yylloc = {\n            first_line: this.yylloc.first_line,\n            last_line: this.yylineno + 1,\n            first_column: this.yylloc.first_column,\n            last_column: lines ?\n                (lines.length === oldLines.length ? this.yylloc.first_column : 0)\n                 + oldLines[oldLines.length - lines.length].length - lines[0].length :\n              this.yylloc.first_column - len\n        };\n\n        if (this.options.ranges) {\n            this.yylloc.range = [r[0], r[0] + this.yyleng - len];\n        }\n        this.yyleng = this.yytext.length;\n        return this;\n    },\n\n// When called from action, caches matched text and appends it on next action\nmore:function () {\n        this._more = true;\n        return this;\n    },\n\n// When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead.\nreject:function () {\n        if (this.options.backtrack_lexer) {\n            this._backtrack = true;\n        } else {\n            return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\\n' + this.showPosition(), {\n                text: \"\",\n                token: null,\n                line: this.yylineno\n            });\n\n        }\n        return this;\n    },\n\n// retain first n characters of the match\nless:function (n) {\n        this.unput(this.match.slice(n));\n    },\n\n// displays already matched input, i.e. for error messages\npastInput:function () {\n        var past = this.matched.substr(0, this.matched.length - this.match.length);\n        return (past.length > 20 ? '...':'') + past.substr(-20).replace(/\\n/g, \"\");\n    },\n\n// displays upcoming input, i.e. for error messages\nupcomingInput:function () {\n        var next = this.match;\n        if (next.length < 20) {\n            next += this._input.substr(0, 20-next.length);\n        }\n        return (next.substr(0,20) + (next.length > 20 ? '...' : '')).replace(/\\n/g, \"\");\n    },\n\n// displays the character position where the lexing error occurred, i.e. for error messages\nshowPosition:function () {\n        var pre = this.pastInput();\n        var c = new Array(pre.length + 1).join(\"-\");\n        return pre + this.upcomingInput() + \"\\n\" + c + \"^\";\n    },\n\n// test the lexed token: return FALSE when not a match, otherwise return token\ntest_match:function(match, indexed_rule) {\n        var token,\n            lines,\n            backup;\n\n        if (this.options.backtrack_lexer) {\n            // save context\n            backup = {\n                yylineno: this.yylineno,\n                yylloc: {\n                    first_line: this.yylloc.first_line,\n                    last_line: this.last_line,\n                    first_column: this.yylloc.first_column,\n                    last_column: this.yylloc.last_column\n                },\n                yytext: this.yytext,\n                match: this.match,\n                matches: this.matches,\n                matched: this.matched,\n                yyleng: this.yyleng,\n                offset: this.offset,\n                _more: this._more,\n                _input: this._input,\n                yy: this.yy,\n                conditionStack: this.conditionStack.slice(0),\n                done: this.done\n            };\n            if (this.options.ranges) {\n                backup.yylloc.range = this.yylloc.range.slice(0);\n            }\n        }\n\n        lines = match[0].match(/(?:\\r\\n?|\\n).*/g);\n        if (lines) {\n            this.yylineno += lines.length;\n        }\n        this.yylloc = {\n            first_line: this.yylloc.last_line,\n            last_line: this.yylineno + 1,\n            first_column: this.yylloc.last_column,\n            last_column: lines ?\n                         lines[lines.length - 1].length - lines[lines.length - 1].match(/\\r?\\n?/)[0].length :\n                         this.yylloc.last_column + match[0].length\n        };\n        this.yytext += match[0];\n        this.match += match[0];\n        this.matches = match;\n        this.yyleng = this.yytext.length;\n        if (this.options.ranges) {\n            this.yylloc.range = [this.offset, this.offset += this.yyleng];\n        }\n        this._more = false;\n        this._backtrack = false;\n        this._input = this._input.slice(match[0].length);\n        this.matched += match[0];\n        token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]);\n        if (this.done && this._input) {\n            this.done = false;\n        }\n        if (token) {\n            return token;\n        } else if (this._backtrack) {\n            // recover context\n            for (var k in backup) {\n                this[k] = backup[k];\n            }\n            return false; // rule action called reject() implying the next rule should be tested instead.\n        }\n        return false;\n    },\n\n// return next match in input\nnext:function () {\n        if (this.done) {\n            return this.EOF;\n        }\n        if (!this._input) {\n            this.done = true;\n        }\n\n        var token,\n            match,\n            tempMatch,\n            index;\n        if (!this._more) {\n            this.yytext = '';\n            this.match = '';\n        }\n        var rules = this._currentRules();\n        for (var i = 0; i < rules.length; i++) {\n            tempMatch = this._input.match(this.rules[rules[i]]);\n            if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {\n                match = tempMatch;\n                index = i;\n                if (this.options.backtrack_lexer) {\n                    token = this.test_match(tempMatch, rules[i]);\n                    if (token !== false) {\n                        return token;\n                    } else if (this._backtrack) {\n                        match = false;\n                        continue; // rule action called reject() implying a rule MISmatch.\n                    } else {\n                        // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)\n                        return false;\n                    }\n                } else if (!this.options.flex) {\n                    break;\n                }\n            }\n        }\n        if (match) {\n            token = this.test_match(match, rules[index]);\n            if (token !== false) {\n                return token;\n            }\n            // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)\n            return false;\n        }\n        if (this._input === \"\") {\n            return this.EOF;\n        } else {\n            return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. Unrecognized text.\\n' + this.showPosition(), {\n                text: \"\",\n                token: null,\n                line: this.yylineno\n            });\n        }\n    },\n\n// return next match that has a token\nlex:function lex () {\n        var r = this.next();\n        if (r) {\n            return r;\n        } else {\n            return this.lex();\n        }\n    },\n\n// activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)\nbegin:function begin (condition) {\n        this.conditionStack.push(condition);\n    },\n\n// pop the previously active lexer condition state off the condition stack\npopState:function popState () {\n        var n = this.conditionStack.length - 1;\n        if (n > 0) {\n            return this.conditionStack.pop();\n        } else {\n            return this.conditionStack[0];\n        }\n    },\n\n// produce the lexer rule set which is active for the currently active lexer condition state\n_currentRules:function _currentRules () {\n        if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) {\n            return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;\n        } else {\n            return this.conditions[\"INITIAL\"].rules;\n        }\n    },\n\n// return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available\ntopState:function topState (n) {\n        n = this.conditionStack.length - 1 - Math.abs(n || 0);\n        if (n >= 0) {\n            return this.conditionStack[n];\n        } else {\n            return \"INITIAL\";\n        }\n    },\n\n// alias for begin(condition)\npushState:function pushState (condition) {\n        this.begin(condition);\n    },\n\n// return the number of states currently on the stack\nstateStackSize:function stateStackSize() {\n        return this.conditionStack.length;\n    },\noptions: {\"case-insensitive\":true},\nperformAction: function anonymous(yy,yy_,$avoiding_name_collisions,YY_START) {\nvar YYSTATE=YY_START;\nswitch($avoiding_name_collisions) {\ncase 0: this.begin('open_directive'); return 33; \nbreak;\ncase 1: this.begin('type_directive'); return 34; \nbreak;\ncase 2: this.popState(); this.begin('arg_directive'); return 26; \nbreak;\ncase 3: this.popState(); this.popState(); return 36; \nbreak;\ncase 4:return 35;\nbreak;\ncase 5:/* skip comments */\nbreak;\ncase 6:/* skip comments */\nbreak;\ncase 7:/* do nothing */\nbreak;\ncase 8:return 11;\nbreak;\ncase 9:/* skip whitespace */\nbreak;\ncase 10:/* skip comments */\nbreak;\ncase 11:/* skip comments */\nbreak;\ncase 12:this.begin(\"href\");\nbreak;\ncase 13:this.popState();\nbreak;\ncase 14:return 31;\nbreak;\ncase 15:this.begin(\"callbackname\");\nbreak;\ncase 16:this.popState();\nbreak;\ncase 17:this.popState(); this.begin(\"callbackargs\");\nbreak;\ncase 18:return 29;\nbreak;\ncase 19:this.popState();\nbreak;\ncase 20:return 30;\nbreak;\ncase 21:this.begin(\"click\");\nbreak;\ncase 22:this.popState();\nbreak;\ncase 23:return 28;\nbreak;\ncase 24:return 5;\nbreak;\ncase 25:return 12;\nbreak;\ncase 26:return 13;\nbreak;\ncase 27:return 14;\nbreak;\ncase 28:return 15;\nbreak;\ncase 29:return 16;\nbreak;\ncase 30:return 17;\nbreak;\ncase 31:return 'date';\nbreak;\ncase 32:return 18;\nbreak;\ncase 33:return 19;\nbreak;\ncase 34:return 21;\nbreak;\ncase 35:return 22;\nbreak;\ncase 36:return 26;\nbreak;\ncase 37:return 7;\nbreak;\ncase 38:return 'INVALID';\nbreak;\n}\n},\nrules: [/^(?:%%\\{)/i,/^(?:((?:(?!\\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\\}%%)/i,/^(?:((?:(?!\\}%%).|\\n)*))/i,/^(?:%%(?!\\{)*[^\\n]*)/i,/^(?:[^\\}]%%*[^\\n]*)/i,/^(?:%%*[^\\n]*[\\n]*)/i,/^(?:[\\n]+)/i,/^(?:\\s+)/i,/^(?:#[^\\n]*)/i,/^(?:%[^\\n]*)/i,/^(?:href[\\s]+[\"])/i,/^(?:[\"])/i,/^(?:[^\"]*)/i,/^(?:call[\\s]+)/i,/^(?:\\([\\s]*\\))/i,/^(?:\\()/i,/^(?:[^(]*)/i,/^(?:\\))/i,/^(?:[^)]*)/i,/^(?:click[\\s]+)/i,/^(?:[\\s\\n])/i,/^(?:[^\\s\\n]*)/i,/^(?:gantt\\b)/i,/^(?:dateFormat\\s[^#\\n;]+)/i,/^(?:inclusiveEndDates\\b)/i,/^(?:topAxis\\b)/i,/^(?:axisFormat\\s[^#\\n;]+)/i,/^(?:excludes\\s[^#\\n;]+)/i,/^(?:todayMarker\\s[^\\n;]+)/i,/^(?:\\d\\d\\d\\d-\\d\\d-\\d\\d\\b)/i,/^(?:title\\s[^#\\n;]+)/i,/^(?:section\\s[^#:\\n;]+)/i,/^(?:[^#:\\n;]+)/i,/^(?::[^#\\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],\nconditions: {\"close_directive\":{\"rules\":[],\"inclusive\":false},\"arg_directive\":{\"rules\":[3,4],\"inclusive\":false},\"type_directive\":{\"rules\":[2,3],\"inclusive\":false},\"open_directive\":{\"rules\":[1],\"inclusive\":false},\"callbackargs\":{\"rules\":[19,20],\"inclusive\":false},\"callbackname\":{\"rules\":[16,17,18],\"inclusive\":false},\"href\":{\"rules\":[13,14],\"inclusive\":false},\"click\":{\"rules\":[22,23],\"inclusive\":false},\"INITIAL\":{\"rules\":[0,5,6,7,8,9,10,11,12,15,21,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38],\"inclusive\":true}}\n});\nreturn lexer;\n})();\nparser.lexer = lexer;\nfunction Parser () {\n  this.yy = {};\n}\nParser.prototype = parser;parser.Parser = Parser;\nreturn new Parser;\n})();\n\n\nif (true) {\nexports.parser = parser;\nexports.Parser = parser.Parser;\nexports.parse = function () { return parser.parse.apply(parser, arguments); };\nexports.main = function commonjsMain (args) {\n    if (!args[1]) {\n        console.log('Usage: '+args[0]+' FILE');\n        process.exit(1);\n    }\n    var source = __webpack_require__(/*! fs */ \"./node_modules/node-libs-browser/mock/empty.js\").readFileSync(__webpack_require__(/*! path */ \"./node_modules/path-browserify/index.js\").normalize(args[1]), \"utf8\");\n    return exports.parser.parse(source);\n};\nif ( true && __webpack_require__.c[__webpack_require__.s] === module) {\n  exports.main(process.argv.slice(1));\n}\n}\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../node_modules/process/browser.js */ \"./node_modules/process/browser.js\"), __webpack_require__(/*! ./../../../../node_modules/webpack/buildin/module.js */ \"./node_modules/webpack/buildin/module.js\")(module)))\n\n/***/ }),\n\n/***/ \"./src/diagrams/gantt/styles.js\":\n/*!**************************************!*\\\n  !*** ./src/diagrams/gantt/styles.js ***!\n  \\**************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\nvar getStyles = function getStyles(options) {\n  return \"\\n  .mermaid-main-font {\\n    font-family: \\\"trebuchet ms\\\", verdana, arial, sans-serif;\\n    font-family: var(--mermaid-font-family);\\n  }\\n\\n  .section {\\n    stroke: none;\\n    opacity: 0.2;\\n  }\\n\\n  .section0 {\\n    fill: \".concat(options.sectionBkgColor, \";\\n  }\\n\\n  .section2 {\\n    fill: \").concat(options.sectionBkgColor2, \";\\n  }\\n\\n  .section1,\\n  .section3 {\\n    fill: \").concat(options.altSectionBkgColor, \";\\n    opacity: 0.2;\\n  }\\n\\n  .sectionTitle0 {\\n    fill: \").concat(options.titleColor, \";\\n  }\\n\\n  .sectionTitle1 {\\n    fill: \").concat(options.titleColor, \";\\n  }\\n\\n  .sectionTitle2 {\\n    fill: \").concat(options.titleColor, \";\\n  }\\n\\n  .sectionTitle3 {\\n    fill: \").concat(options.titleColor, \";\\n  }\\n\\n  .sectionTitle {\\n    text-anchor: start;\\n    // font-size: \").concat(options.ganttFontSize, \";\\n    // text-height: 14px;\\n    font-family: 'trebuchet ms', verdana, arial, sans-serif;\\n    font-family: var(--mermaid-font-family);\\n\\n  }\\n\\n\\n  /* Grid and axis */\\n\\n  .grid .tick {\\n    stroke: \").concat(options.gridColor, \";\\n    opacity: 0.8;\\n    shape-rendering: crispEdges;\\n    text {\\n      font-family: \").concat(options.fontFamily, \";\\n      fill: \").concat(options.textColor, \";\\n    }\\n  }\\n\\n  .grid path {\\n    stroke-width: 0;\\n  }\\n\\n\\n  /* Today line */\\n\\n  .today {\\n    fill: none;\\n    stroke: \").concat(options.todayLineColor, \";\\n    stroke-width: 2px;\\n  }\\n\\n\\n  /* Task styling */\\n\\n  /* Default task */\\n\\n  .task {\\n    stroke-width: 2;\\n  }\\n\\n  .taskText {\\n    text-anchor: middle;\\n    font-family: 'trebuchet ms', verdana, arial, sans-serif;\\n    font-family: var(--mermaid-font-family);\\n  }\\n\\n  // .taskText:not([font-size]) {\\n  //   font-size: \").concat(options.ganttFontSize, \";\\n  // }\\n\\n  .taskTextOutsideRight {\\n    fill: \").concat(options.taskTextDarkColor, \";\\n    text-anchor: start;\\n    // font-size: \").concat(options.ganttFontSize, \";\\n    font-family: 'trebuchet ms', verdana, arial, sans-serif;\\n    font-family: var(--mermaid-font-family);\\n\\n  }\\n\\n  .taskTextOutsideLeft {\\n    fill: \").concat(options.taskTextDarkColor, \";\\n    text-anchor: end;\\n    // font-size: \").concat(options.ganttFontSize, \";\\n  }\\n\\n  /* Special case clickable */\\n  .task.clickable {\\n    cursor: pointer;\\n  }\\n  .taskText.clickable {\\n    cursor: pointer;\\n    fill: \").concat(options.taskTextClickableColor, \" !important;\\n    font-weight: bold;\\n  }\\n\\n  .taskTextOutsideLeft.clickable {\\n    cursor: pointer;\\n    fill: \").concat(options.taskTextClickableColor, \" !important;\\n    font-weight: bold;\\n  }\\n\\n  .taskTextOutsideRight.clickable {\\n    cursor: pointer;\\n    fill: \").concat(options.taskTextClickableColor, \" !important;\\n    font-weight: bold;\\n  }\\n\\n  /* Specific task settings for the sections*/\\n\\n  .taskText0,\\n  .taskText1,\\n  .taskText2,\\n  .taskText3 {\\n    fill: \").concat(options.taskTextColor, \";\\n  }\\n\\n  .task0,\\n  .task1,\\n  .task2,\\n  .task3 {\\n    fill: \").concat(options.taskBkgColor, \";\\n    stroke: \").concat(options.taskBorderColor, \";\\n  }\\n\\n  .taskTextOutside0,\\n  .taskTextOutside2\\n  {\\n    fill: \").concat(options.taskTextOutsideColor, \";\\n  }\\n\\n  .taskTextOutside1,\\n  .taskTextOutside3 {\\n    fill: \").concat(options.taskTextOutsideColor, \";\\n  }\\n\\n\\n  /* Active task */\\n\\n  .active0,\\n  .active1,\\n  .active2,\\n  .active3 {\\n    fill: \").concat(options.activeTaskBkgColor, \";\\n    stroke: \").concat(options.activeTaskBorderColor, \";\\n  }\\n\\n  .activeText0,\\n  .activeText1,\\n  .activeText2,\\n  .activeText3 {\\n    fill: \").concat(options.taskTextDarkColor, \" !important;\\n  }\\n\\n\\n  /* Completed task */\\n\\n  .done0,\\n  .done1,\\n  .done2,\\n  .done3 {\\n    stroke: \").concat(options.doneTaskBorderColor, \";\\n    fill: \").concat(options.doneTaskBkgColor, \";\\n    stroke-width: 2;\\n  }\\n\\n  .doneText0,\\n  .doneText1,\\n  .doneText2,\\n  .doneText3 {\\n    fill: \").concat(options.taskTextDarkColor, \" !important;\\n  }\\n\\n\\n  /* Tasks on the critical line */\\n\\n  .crit0,\\n  .crit1,\\n  .crit2,\\n  .crit3 {\\n    stroke: \").concat(options.critBorderColor, \";\\n    fill: \").concat(options.critBkgColor, \";\\n    stroke-width: 2;\\n  }\\n\\n  .activeCrit0,\\n  .activeCrit1,\\n  .activeCrit2,\\n  .activeCrit3 {\\n    stroke: \").concat(options.critBorderColor, \";\\n    fill: \").concat(options.activeTaskBkgColor, \";\\n    stroke-width: 2;\\n  }\\n\\n  .doneCrit0,\\n  .doneCrit1,\\n  .doneCrit2,\\n  .doneCrit3 {\\n    stroke: \").concat(options.critBorderColor, \";\\n    fill: \").concat(options.doneTaskBkgColor, \";\\n    stroke-width: 2;\\n    cursor: pointer;\\n    shape-rendering: crispEdges;\\n  }\\n\\n  .milestone {\\n    transform: rotate(45deg) scale(0.8,0.8);\\n  }\\n\\n  .milestoneText {\\n    font-style: italic;\\n  }\\n  .doneCritText0,\\n  .doneCritText1,\\n  .doneCritText2,\\n  .doneCritText3 {\\n    fill: \").concat(options.taskTextDarkColor, \" !important;\\n  }\\n\\n  .activeCritText0,\\n  .activeCritText1,\\n  .activeCritText2,\\n  .activeCritText3 {\\n    fill: \").concat(options.taskTextDarkColor, \" !important;\\n  }\\n\\n  .titleText {\\n    text-anchor: middle;\\n    font-size: 18px;\\n    fill: \").concat(options.textColor, \"    ;\\n    font-family: 'trebuchet ms', verdana, arial, sans-serif;\\n    font-family: var(--mermaid-font-family);\\n  }\\n\");\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (getStyles);\n\n/***/ }),\n\n/***/ \"./src/diagrams/git/gitGraphAst.js\":\n/*!*****************************************!*\\\n  !*** ./src/diagrams/git/gitGraphAst.js ***!\n  \\*****************************************/\n/*! exports provided: setDirection, setOptions, getOptions, commit, branch, merge, checkout, reset, prettyPrint, clear, getBranchesAsObjArray, getBranches, getCommits, getCommitsArray, getCurrentBranch, getDirection, getHead, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"setDirection\", function() { return setDirection; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"setOptions\", function() { return setOptions; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getOptions\", function() { return getOptions; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"commit\", function() { return commit; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"branch\", function() { return branch; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"merge\", function() { return merge; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"checkout\", function() { return checkout; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"reset\", function() { return reset; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"prettyPrint\", function() { return prettyPrint; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"clear\", function() { return clear; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getBranchesAsObjArray\", function() { return getBranchesAsObjArray; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getBranches\", function() { return getBranches; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getCommits\", function() { return getCommits; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getCommitsArray\", function() { return getCommitsArray; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getCurrentBranch\", function() { return getCurrentBranch; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getDirection\", function() { return getDirection; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getHead\", function() { return getHead; });\n/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../logger */ \"./src/logger.js\");\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../utils */ \"./src/utils.js\");\n\n\nvar commits = {};\nvar head = null;\nvar branches = {\n  master: head\n};\nvar curBranch = 'master';\nvar direction = 'LR';\nvar seq = 0;\n\nfunction getId() {\n  return Object(_utils__WEBPACK_IMPORTED_MODULE_1__[\"random\"])({\n    length: 7\n  });\n}\n\nfunction isfastforwardable(currentCommit, otherCommit) {\n  _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].debug('Entering isfastforwardable:', currentCommit.id, otherCommit.id);\n\n  while (currentCommit.seq <= otherCommit.seq && currentCommit !== otherCommit) {\n    // only if other branch has more commits\n    if (otherCommit.parent == null) break;\n\n    if (Array.isArray(otherCommit.parent)) {\n      _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].debug('In merge commit:', otherCommit.parent);\n      return isfastforwardable(currentCommit, commits[otherCommit.parent[0]]) || isfastforwardable(currentCommit, commits[otherCommit.parent[1]]);\n    } else {\n      otherCommit = commits[otherCommit.parent];\n    }\n  }\n\n  _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].debug(currentCommit.id, otherCommit.id);\n  return currentCommit.id === otherCommit.id;\n}\n\nfunction isReachableFrom(currentCommit, otherCommit) {\n  var currentSeq = currentCommit.seq;\n  var otherSeq = otherCommit.seq;\n  if (currentSeq > otherSeq) return isfastforwardable(otherCommit, currentCommit);\n  return false;\n}\n\nfunction uniqBy(list, fn) {\n  var recordMap = Object.create(null);\n  return list.reduce(function (out, item) {\n    var key = fn(item);\n\n    if (!recordMap[key]) {\n      recordMap[key] = true;\n      out.push(item);\n    }\n\n    return out;\n  }, []);\n}\n\nvar setDirection = function setDirection(dir) {\n  direction = dir;\n};\nvar options = {};\nvar setOptions = function setOptions(rawOptString) {\n  _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].debug('options str', rawOptString);\n  rawOptString = rawOptString && rawOptString.trim();\n  rawOptString = rawOptString || '{}';\n\n  try {\n    options = JSON.parse(rawOptString);\n  } catch (e) {\n    _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].error('error while parsing gitGraph options', e.message);\n  }\n};\nvar getOptions = function getOptions() {\n  return options;\n};\nvar commit = function commit(msg) {\n  var commit = {\n    id: getId(),\n    message: msg,\n    seq: seq++,\n    parent: head == null ? null : head.id\n  };\n  head = commit;\n  commits[commit.id] = commit;\n  branches[curBranch] = commit.id;\n  _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].debug('in pushCommit ' + commit.id);\n};\nvar branch = function branch(name) {\n  branches[name] = head != null ? head.id : null;\n  _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].debug('in createBranch');\n};\nvar merge = function merge(otherBranch) {\n  var currentCommit = commits[branches[curBranch]];\n  var otherCommit = commits[branches[otherBranch]];\n\n  if (isReachableFrom(currentCommit, otherCommit)) {\n    _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].debug('Already merged');\n    return;\n  }\n\n  if (isfastforwardable(currentCommit, otherCommit)) {\n    branches[curBranch] = branches[otherBranch];\n    head = commits[branches[curBranch]];\n  } else {\n    // create merge commit\n    var _commit = {\n      id: getId(),\n      message: 'merged branch ' + otherBranch + ' into ' + curBranch,\n      seq: seq++,\n      parent: [head == null ? null : head.id, branches[otherBranch]]\n    };\n    head = _commit;\n    commits[_commit.id] = _commit;\n    branches[curBranch] = _commit.id;\n  }\n\n  _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].debug(branches);\n  _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].debug('in mergeBranch');\n};\nvar checkout = function checkout(branch) {\n  _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].debug('in checkout');\n  curBranch = branch;\n  var id = branches[curBranch];\n  head = commits[id];\n};\nvar reset = function reset(commitRef) {\n  _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].debug('in reset', commitRef);\n  var ref = commitRef.split(':')[0];\n  var parentCount = parseInt(commitRef.split(':')[1]);\n  var commit = ref === 'HEAD' ? head : commits[branches[ref]];\n  _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].debug(commit, parentCount);\n\n  while (parentCount > 0) {\n    commit = commits[commit.parent];\n    parentCount--;\n\n    if (!commit) {\n      var err = 'Critical error - unique parent commit not found during reset';\n      _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].error(err);\n      throw err;\n    }\n  }\n\n  head = commit;\n  branches[curBranch] = commit.id;\n};\n\nfunction upsert(arr, key, newval) {\n  var index = arr.indexOf(key);\n\n  if (index === -1) {\n    arr.push(newval);\n  } else {\n    arr.splice(index, 1, newval);\n  }\n}\n\nfunction prettyPrintCommitHistory(commitArr) {\n  var commit = commitArr.reduce(function (out, commit) {\n    if (out.seq > commit.seq) return out;\n    return commit;\n  }, commitArr[0]);\n  var line = '';\n  commitArr.forEach(function (c) {\n    if (c === commit) {\n      line += '\\t*';\n    } else {\n      line += '\\t|';\n    }\n  });\n  var label = [line, commit.id, commit.seq];\n\n  for (var _branch in branches) {\n    if (branches[_branch] === commit.id) label.push(_branch);\n  }\n\n  _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].debug(label.join(' '));\n\n  if (Array.isArray(commit.parent)) {\n    var newCommit = commits[commit.parent[0]];\n    upsert(commitArr, commit, newCommit);\n    commitArr.push(commits[commit.parent[1]]);\n  } else if (commit.parent == null) {\n    return;\n  } else {\n    var nextCommit = commits[commit.parent];\n    upsert(commitArr, commit, nextCommit);\n  }\n\n  commitArr = uniqBy(commitArr, function (c) {\n    return c.id;\n  });\n  prettyPrintCommitHistory(commitArr);\n}\n\nvar prettyPrint = function prettyPrint() {\n  _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].debug(commits);\n  var node = getCommitsArray()[0];\n  prettyPrintCommitHistory([node]);\n};\nvar clear = function clear() {\n  commits = {};\n  head = null;\n  branches = {\n    master: head\n  };\n  curBranch = 'master';\n  seq = 0;\n};\nvar getBranchesAsObjArray = function getBranchesAsObjArray() {\n  var branchArr = [];\n\n  for (var _branch2 in branches) {\n    branchArr.push({\n      name: _branch2,\n      commit: commits[branches[_branch2]]\n    });\n  }\n\n  return branchArr;\n};\nvar getBranches = function getBranches() {\n  return branches;\n};\nvar getCommits = function getCommits() {\n  return commits;\n};\nvar getCommitsArray = function getCommitsArray() {\n  var commitArr = Object.keys(commits).map(function (key) {\n    return commits[key];\n  });\n  commitArr.forEach(function (o) {\n    _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].debug(o.id);\n  });\n  commitArr.sort(function (a, b) {\n    return b.seq - a.seq;\n  });\n  return commitArr;\n};\nvar getCurrentBranch = function getCurrentBranch() {\n  return curBranch;\n};\nvar getDirection = function getDirection() {\n  return direction;\n};\nvar getHead = function getHead() {\n  return head;\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n  setDirection: setDirection,\n  setOptions: setOptions,\n  getOptions: getOptions,\n  commit: commit,\n  branch: branch,\n  merge: merge,\n  checkout: checkout,\n  reset: reset,\n  prettyPrint: prettyPrint,\n  clear: clear,\n  getBranchesAsObjArray: getBranchesAsObjArray,\n  getBranches: getBranches,\n  getCommits: getCommits,\n  getCommitsArray: getCommitsArray,\n  getCurrentBranch: getCurrentBranch,\n  getDirection: getDirection,\n  getHead: getHead\n});\n\n/***/ }),\n\n/***/ \"./src/diagrams/git/gitGraphRenderer.js\":\n/*!**********************************************!*\\\n  !*** ./src/diagrams/git/gitGraphRenderer.js ***!\n  \\**********************************************/\n/*! exports provided: setConf, draw, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"setConf\", function() { return setConf; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"draw\", function() { return draw; });\n/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3 */ \"./node_modules/d3/src/index.js\");\n/* harmony import */ var _gitGraphAst__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./gitGraphAst */ \"./src/diagrams/git/gitGraphAst.js\");\n/* harmony import */ var _parser_gitGraph__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./parser/gitGraph */ \"./src/diagrams/git/parser/gitGraph.jison\");\n/* harmony import */ var _parser_gitGraph__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_parser_gitGraph__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../logger */ \"./src/logger.js\");\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../utils */ \"./src/utils.js\");\n\n\n\n\n\nvar allCommitsDict = {};\nvar branchNum;\nvar config = {\n  nodeSpacing: 150,\n  nodeFillColor: 'yellow',\n  nodeStrokeWidth: 2,\n  nodeStrokeColor: 'grey',\n  lineStrokeWidth: 4,\n  branchOffset: 50,\n  lineColor: 'grey',\n  leftMargin: 50,\n  branchColors: ['#442f74', '#983351', '#609732', '#AA9A39'],\n  nodeRadius: 10,\n  nodeLabel: {\n    width: 75,\n    height: 100,\n    x: -25,\n    y: 0\n  }\n};\nvar apiConfig = {};\nvar setConf = function setConf(c) {\n  apiConfig = c;\n};\n\nfunction svgCreateDefs(svg) {\n  svg.append('defs').append('g').attr('id', 'def-commit').append('circle').attr('r', config.nodeRadius).attr('cx', 0).attr('cy', 0);\n  svg.select('#def-commit').append('foreignObject').attr('width', config.nodeLabel.width).attr('height', config.nodeLabel.height).attr('x', config.nodeLabel.x).attr('y', config.nodeLabel.y).attr('class', 'node-label').attr('requiredFeatures', 'http://www.w3.org/TR/SVG11/feature#Extensibility').append('p').html('');\n}\n\nfunction svgDrawLine(svg, points, colorIdx, interpolate) {\n  var curve = Object(_utils__WEBPACK_IMPORTED_MODULE_4__[\"interpolateToCurve\"])(interpolate, d3__WEBPACK_IMPORTED_MODULE_0__[\"curveBasis\"]);\n  var color = config.branchColors[colorIdx % config.branchColors.length];\n  var lineGen = Object(d3__WEBPACK_IMPORTED_MODULE_0__[\"line\"])().x(function (d) {\n    return Math.round(d.x);\n  }).y(function (d) {\n    return Math.round(d.y);\n  }).curve(curve);\n  svg.append('svg:path').attr('d', lineGen(points)).style('stroke', color).style('stroke-width', config.lineStrokeWidth).style('fill', 'none');\n} // Pass in the element and its pre-transform coords\n\n\nfunction getElementCoords(element, coords) {\n  coords = coords || element.node().getBBox();\n  var ctm = element.node().getCTM();\n  var xn = ctm.e + coords.x * ctm.a;\n  var yn = ctm.f + coords.y * ctm.d;\n  return {\n    left: xn,\n    top: yn,\n    width: coords.width,\n    height: coords.height\n  };\n}\n\nfunction svgDrawLineForCommits(svg, fromId, toId, direction, color) {\n  _logger__WEBPACK_IMPORTED_MODULE_3__[\"log\"].debug('svgDrawLineForCommits: ', fromId, toId);\n  var fromBbox = getElementCoords(svg.select('#node-' + fromId + ' circle'));\n  var toBbox = getElementCoords(svg.select('#node-' + toId + ' circle'));\n\n  switch (direction) {\n    case 'LR':\n      // (toBbox)\n      //  +--------\n      //          + (fromBbox)\n      if (fromBbox.left - toBbox.left > config.nodeSpacing) {\n        var lineStart = {\n          x: fromBbox.left - config.nodeSpacing,\n          y: toBbox.top + toBbox.height / 2\n        };\n        var lineEnd = {\n          x: toBbox.left + toBbox.width,\n          y: toBbox.top + toBbox.height / 2\n        };\n        svgDrawLine(svg, [lineStart, lineEnd], color, 'linear');\n        svgDrawLine(svg, [{\n          x: fromBbox.left,\n          y: fromBbox.top + fromBbox.height / 2\n        }, {\n          x: fromBbox.left - config.nodeSpacing / 2,\n          y: fromBbox.top + fromBbox.height / 2\n        }, {\n          x: fromBbox.left - config.nodeSpacing / 2,\n          y: lineStart.y\n        }, lineStart], color);\n      } else {\n        svgDrawLine(svg, [{\n          x: fromBbox.left,\n          y: fromBbox.top + fromBbox.height / 2\n        }, {\n          x: fromBbox.left - config.nodeSpacing / 2,\n          y: fromBbox.top + fromBbox.height / 2\n        }, {\n          x: fromBbox.left - config.nodeSpacing / 2,\n          y: toBbox.top + toBbox.height / 2\n        }, {\n          x: toBbox.left + toBbox.width,\n          y: toBbox.top + toBbox.height / 2\n        }], color);\n      }\n\n      break;\n\n    case 'BT':\n      //      +           (fromBbox)\n      //      |\n      //      |\n      //              +   (toBbox)\n      if (toBbox.top - fromBbox.top > config.nodeSpacing) {\n        var _lineStart = {\n          x: toBbox.left + toBbox.width / 2,\n          y: fromBbox.top + fromBbox.height + config.nodeSpacing\n        };\n        var _lineEnd = {\n          x: toBbox.left + toBbox.width / 2,\n          y: toBbox.top\n        };\n        svgDrawLine(svg, [_lineStart, _lineEnd], color, 'linear');\n        svgDrawLine(svg, [{\n          x: fromBbox.left + fromBbox.width / 2,\n          y: fromBbox.top + fromBbox.height\n        }, {\n          x: fromBbox.left + fromBbox.width / 2,\n          y: fromBbox.top + fromBbox.height + config.nodeSpacing / 2\n        }, {\n          x: toBbox.left + toBbox.width / 2,\n          y: _lineStart.y - config.nodeSpacing / 2\n        }, _lineStart], color);\n      } else {\n        svgDrawLine(svg, [{\n          x: fromBbox.left + fromBbox.width / 2,\n          y: fromBbox.top + fromBbox.height\n        }, {\n          x: fromBbox.left + fromBbox.width / 2,\n          y: fromBbox.top + config.nodeSpacing / 2\n        }, {\n          x: toBbox.left + toBbox.width / 2,\n          y: toBbox.top - config.nodeSpacing / 2\n        }, {\n          x: toBbox.left + toBbox.width / 2,\n          y: toBbox.top\n        }], color);\n      }\n\n      break;\n  }\n}\n\nfunction cloneNode(svg, selector) {\n  return svg.select(selector).node().cloneNode(true);\n}\n\nfunction renderCommitHistory(svg, commitid, branches, direction) {\n  var commit;\n  var numCommits = Object.keys(allCommitsDict).length;\n\n  if (typeof commitid === 'string') {\n    do {\n      commit = allCommitsDict[commitid];\n      _logger__WEBPACK_IMPORTED_MODULE_3__[\"log\"].debug('in renderCommitHistory', commit.id, commit.seq);\n\n      if (svg.select('#node-' + commitid).size() > 0) {\n        return;\n      }\n\n      svg.append(function () {\n        return cloneNode(svg, '#def-commit');\n      }).attr('class', 'commit').attr('id', function () {\n        return 'node-' + commit.id;\n      }).attr('transform', function () {\n        switch (direction) {\n          case 'LR':\n            return 'translate(' + (commit.seq * config.nodeSpacing + config.leftMargin) + ', ' + branchNum * config.branchOffset + ')';\n\n          case 'BT':\n            return 'translate(' + (branchNum * config.branchOffset + config.leftMargin) + ', ' + (numCommits - commit.seq) * config.nodeSpacing + ')';\n        }\n      }).attr('fill', config.nodeFillColor).attr('stroke', config.nodeStrokeColor).attr('stroke-width', config.nodeStrokeWidth);\n      var branch = void 0;\n\n      for (var branchName in branches) {\n        if (branches[branchName].commit === commit) {\n          branch = branches[branchName];\n          break;\n        }\n      }\n\n      if (branch) {\n        _logger__WEBPACK_IMPORTED_MODULE_3__[\"log\"].debug('found branch ', branch.name);\n        svg.select('#node-' + commit.id + ' p').append('xhtml:span').attr('class', 'branch-label').text(branch.name + ', ');\n      }\n\n      svg.select('#node-' + commit.id + ' p').append('xhtml:span').attr('class', 'commit-id').text(commit.id);\n\n      if (commit.message !== '' && direction === 'BT') {\n        svg.select('#node-' + commit.id + ' p').append('xhtml:span').attr('class', 'commit-msg').text(', ' + commit.message);\n      }\n\n      commitid = commit.parent;\n    } while (commitid && allCommitsDict[commitid]);\n  }\n\n  if (Array.isArray(commitid)) {\n    _logger__WEBPACK_IMPORTED_MODULE_3__[\"log\"].debug('found merge commmit', commitid);\n    renderCommitHistory(svg, commitid[0], branches, direction);\n    branchNum++;\n    renderCommitHistory(svg, commitid[1], branches, direction);\n    branchNum--;\n  }\n}\n\nfunction renderLines(svg, commit, direction, branchColor) {\n  branchColor = branchColor || 0;\n\n  while (commit.seq > 0 && !commit.lineDrawn) {\n    if (typeof commit.parent === 'string') {\n      svgDrawLineForCommits(svg, commit.id, commit.parent, direction, branchColor);\n      commit.lineDrawn = true;\n      commit = allCommitsDict[commit.parent];\n    } else if (Array.isArray(commit.parent)) {\n      svgDrawLineForCommits(svg, commit.id, commit.parent[0], direction, branchColor);\n      svgDrawLineForCommits(svg, commit.id, commit.parent[1], direction, branchColor + 1);\n      renderLines(svg, allCommitsDict[commit.parent[1]], direction, branchColor + 1);\n      commit.lineDrawn = true;\n      commit = allCommitsDict[commit.parent[0]];\n    }\n  }\n}\n\nvar draw = function draw(txt, id, ver) {\n  try {\n    var parser = _parser_gitGraph__WEBPACK_IMPORTED_MODULE_2___default.a.parser;\n    parser.yy = _gitGraphAst__WEBPACK_IMPORTED_MODULE_1__[\"default\"];\n    parser.yy.clear();\n    _logger__WEBPACK_IMPORTED_MODULE_3__[\"log\"].debug('in gitgraph renderer', txt + '\\n', 'id:', id, ver); // Parse the graph definition\n\n    parser.parse(txt + '\\n');\n    config = Object.assign(config, apiConfig, _gitGraphAst__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getOptions());\n    _logger__WEBPACK_IMPORTED_MODULE_3__[\"log\"].debug('effective options', config);\n    var direction = _gitGraphAst__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getDirection();\n    allCommitsDict = _gitGraphAst__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getCommits();\n    var branches = _gitGraphAst__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getBranchesAsObjArray();\n\n    if (direction === 'BT') {\n      config.nodeLabel.x = branches.length * config.branchOffset;\n      config.nodeLabel.width = '100%';\n      config.nodeLabel.y = -1 * 2 * config.nodeRadius;\n    }\n\n    var svg = Object(d3__WEBPACK_IMPORTED_MODULE_0__[\"select\"])(\"[id=\\\"\".concat(id, \"\\\"]\"));\n    svgCreateDefs(svg);\n    branchNum = 1;\n\n    for (var branch in branches) {\n      var v = branches[branch];\n      renderCommitHistory(svg, v.commit.id, branches, direction);\n      renderLines(svg, v.commit, direction);\n      branchNum++;\n    }\n\n    svg.attr('height', function () {\n      if (direction === 'BT') return Object.keys(allCommitsDict).length * config.nodeSpacing;\n      return (branches.length + 1) * config.branchOffset;\n    });\n  } catch (e) {\n    _logger__WEBPACK_IMPORTED_MODULE_3__[\"log\"].error('Error while rendering gitgraph');\n    _logger__WEBPACK_IMPORTED_MODULE_3__[\"log\"].error(e.message);\n  }\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n  setConf: setConf,\n  draw: draw\n});\n\n/***/ }),\n\n/***/ \"./src/diagrams/git/parser/gitGraph.jison\":\n/*!************************************************!*\\\n  !*** ./src/diagrams/git/parser/gitGraph.jison ***!\n  \\************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n/* WEBPACK VAR INJECTION */(function(process, module) {/* parser generated by jison 0.4.18 */\n/*\n  Returns a Parser object of the following structure:\n\n  Parser: {\n    yy: {}\n  }\n\n  Parser.prototype: {\n    yy: {},\n    trace: function(),\n    symbols_: {associative list: name ==> number},\n    terminals_: {associative list: number ==> name},\n    productions_: [...],\n    performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$),\n    table: [...],\n    defaultActions: {...},\n    parseError: function(str, hash),\n    parse: function(input),\n\n    lexer: {\n        EOF: 1,\n        parseError: function(str, hash),\n        setInput: function(input),\n        input: function(),\n        unput: function(str),\n        more: function(),\n        less: function(n),\n        pastInput: function(),\n        upcomingInput: function(),\n        showPosition: function(),\n        test_match: function(regex_match_array, rule_index),\n        next: function(),\n        lex: function(),\n        begin: function(condition),\n        popState: function(),\n        _currentRules: function(),\n        topState: function(),\n        pushState: function(condition),\n\n        options: {\n            ranges: boolean           (optional: true ==> token location info will include a .range[] member)\n            flex: boolean             (optional: true ==> flex-like lexing behaviour where the rules are tested exhaustively to find the longest match)\n            backtrack_lexer: boolean  (optional: true ==> lexer regexes are tested in order and for each matching regex the action code is invoked; the lexer terminates the scan when a token is returned by the action code)\n        },\n\n        performAction: function(yy, yy_, $avoiding_name_collisions, YY_START),\n        rules: [...],\n        conditions: {associative list: name ==> set},\n    }\n  }\n\n\n  token location info (@$, _$, etc.): {\n    first_line: n,\n    last_line: n,\n    first_column: n,\n    last_column: n,\n    range: [start_number, end_number]       (where the numbers are indexes into the input string, regular zero-based)\n  }\n\n\n  the parseError function receives a 'hash' object with these members for lexer and parser errors: {\n    text:        (matched text)\n    token:       (the produced terminal token, if any)\n    line:        (yylineno)\n  }\n  while parser (grammar) errors will also provide these members, i.e. parser errors deliver a superset of attributes: {\n    loc:         (yylloc)\n    expected:    (string describing the set of expected tokens)\n    recoverable: (boolean: TRUE when the parser has a error recovery rule available for this particular error)\n  }\n*/\nvar parser = (function(){\nvar o=function(k,v,o,l){for(o=o||{},l=k.length;l--;o[k[l]]=v);return o},$V0=[2,3],$V1=[1,7],$V2=[7,12,15,17,19,20,21],$V3=[7,11,12,15,17,19,20,21],$V4=[2,20],$V5=[1,32];\nvar parser = {trace: function trace () { },\nyy: {},\nsymbols_: {\"error\":2,\"start\":3,\"GG\":4,\":\":5,\"document\":6,\"EOF\":7,\"DIR\":8,\"options\":9,\"body\":10,\"OPT\":11,\"NL\":12,\"line\":13,\"statement\":14,\"COMMIT\":15,\"commit_arg\":16,\"BRANCH\":17,\"ID\":18,\"CHECKOUT\":19,\"MERGE\":20,\"RESET\":21,\"reset_arg\":22,\"STR\":23,\"HEAD\":24,\"reset_parents\":25,\"CARET\":26,\"$accept\":0,\"$end\":1},\nterminals_: {2:\"error\",4:\"GG\",5:\":\",7:\"EOF\",8:\"DIR\",11:\"OPT\",12:\"NL\",15:\"COMMIT\",17:\"BRANCH\",18:\"ID\",19:\"CHECKOUT\",20:\"MERGE\",21:\"RESET\",23:\"STR\",24:\"HEAD\",26:\"CARET\"},\nproductions_: [0,[3,4],[3,5],[6,0],[6,2],[9,2],[9,1],[10,0],[10,2],[13,2],[13,1],[14,2],[14,2],[14,2],[14,2],[14,2],[16,0],[16,1],[22,2],[22,2],[25,0],[25,2]],\nperformAction: function anonymous(yytext, yyleng, yylineno, yy, yystate /* action[1] */, $$ /* vstack */, _$ /* lstack */) {\n/* this == yyval */\n\nvar $0 = $$.length - 1;\nswitch (yystate) {\ncase 1:\n return $$[$0-1]; \nbreak;\ncase 2:\nyy.setDirection($$[$0-3]); return $$[$0-1];\nbreak;\ncase 4:\n yy.setOptions($$[$0-1]); this.$ = $$[$0]\nbreak;\ncase 5:\n$$[$0-1] +=$$[$0]; this.$=$$[$0-1]\nbreak;\ncase 7:\nthis.$ = []\nbreak;\ncase 8:\n$$[$0-1].push($$[$0]); this.$=$$[$0-1];\nbreak;\ncase 9:\nthis.$ =$$[$0-1]\nbreak;\ncase 11:\nyy.commit($$[$0])\nbreak;\ncase 12:\nyy.branch($$[$0])\nbreak;\ncase 13:\nyy.checkout($$[$0])\nbreak;\ncase 14:\nyy.merge($$[$0])\nbreak;\ncase 15:\nyy.reset($$[$0])\nbreak;\ncase 16:\nthis.$ = \"\"\nbreak;\ncase 17:\nthis.$=$$[$0]\nbreak;\ncase 18:\nthis.$ = $$[$0-1]+ \":\" + $$[$0] \nbreak;\ncase 19:\nthis.$ = $$[$0-1]+ \":\"  + yy.count; yy.count = 0\nbreak;\ncase 20:\nyy.count = 0\nbreak;\ncase 21:\n yy.count += 1 \nbreak;\n}\n},\ntable: [{3:1,4:[1,2]},{1:[3]},{5:[1,3],8:[1,4]},{6:5,7:$V0,9:6,12:$V1},{5:[1,8]},{7:[1,9]},o($V2,[2,7],{10:10,11:[1,11]}),o($V3,[2,6]),{6:12,7:$V0,9:6,12:$V1},{1:[2,1]},{7:[2,4],12:[1,15],13:13,14:14,15:[1,16],17:[1,17],19:[1,18],20:[1,19],21:[1,20]},o($V3,[2,5]),{7:[1,21]},o($V2,[2,8]),{12:[1,22]},o($V2,[2,10]),{12:[2,16],16:23,23:[1,24]},{18:[1,25]},{18:[1,26]},{18:[1,27]},{18:[1,30],22:28,24:[1,29]},{1:[2,2]},o($V2,[2,9]),{12:[2,11]},{12:[2,17]},{12:[2,12]},{12:[2,13]},{12:[2,14]},{12:[2,15]},{12:$V4,25:31,26:$V5},{12:$V4,25:33,26:$V5},{12:[2,18]},{12:$V4,25:34,26:$V5},{12:[2,19]},{12:[2,21]}],\ndefaultActions: {9:[2,1],21:[2,2],23:[2,11],24:[2,17],25:[2,12],26:[2,13],27:[2,14],28:[2,15],31:[2,18],33:[2,19],34:[2,21]},\nparseError: function parseError (str, hash) {\n    if (hash.recoverable) {\n        this.trace(str);\n    } else {\n        var error = new Error(str);\n        error.hash = hash;\n        throw error;\n    }\n},\nparse: function parse(input) {\n    var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = '', yylineno = 0, yyleng = 0, recovering = 0, TERROR = 2, EOF = 1;\n    var args = lstack.slice.call(arguments, 1);\n    var lexer = Object.create(this.lexer);\n    var sharedState = { yy: {} };\n    for (var k in this.yy) {\n        if (Object.prototype.hasOwnProperty.call(this.yy, k)) {\n            sharedState.yy[k] = this.yy[k];\n        }\n    }\n    lexer.setInput(input, sharedState.yy);\n    sharedState.yy.lexer = lexer;\n    sharedState.yy.parser = this;\n    if (typeof lexer.yylloc == 'undefined') {\n        lexer.yylloc = {};\n    }\n    var yyloc = lexer.yylloc;\n    lstack.push(yyloc);\n    var ranges = lexer.options && lexer.options.ranges;\n    if (typeof sharedState.yy.parseError === 'function') {\n        this.parseError = sharedState.yy.parseError;\n    } else {\n        this.parseError = Object.getPrototypeOf(this).parseError;\n    }\n    function popStack(n) {\n        stack.length = stack.length - 2 * n;\n        vstack.length = vstack.length - n;\n        lstack.length = lstack.length - n;\n    }\n            function lex() {\n            var token;\n            token = tstack.pop() || lexer.lex() || EOF;\n            if (typeof token !== 'number') {\n                if (token instanceof Array) {\n                    tstack = token;\n                    token = tstack.pop();\n                }\n                token = self.symbols_[token] || token;\n            }\n            return token;\n        }\n    var symbol, preErrorSymbol, state, action, a, r, yyval = {}, p, len, newState, expected;\n    while (true) {\n        state = stack[stack.length - 1];\n        if (this.defaultActions[state]) {\n            action = this.defaultActions[state];\n        } else {\n            if (symbol === null || typeof symbol == 'undefined') {\n                symbol = lex();\n            }\n            action = table[state] && table[state][symbol];\n        }\n        if (typeof action === 'undefined' || !action.length || !action[0]) {\n            var errStr = '';\n            expected = [];\n            for (p in table[state]) {\n                if (this.terminals_[p] && p > TERROR) {\n                    expected.push('\\'' + this.terminals_[p] + '\\'');\n                }\n            }\n            if (lexer.showPosition) {\n                errStr = 'Parse error on line ' + (yylineno + 1) + ':\\n' + lexer.showPosition() + '\\nExpecting ' + expected.join(', ') + ', got \\'' + (this.terminals_[symbol] || symbol) + '\\'';\n            } else {\n                errStr = 'Parse error on line ' + (yylineno + 1) + ': Unexpected ' + (symbol == EOF ? 'end of input' : '\\'' + (this.terminals_[symbol] || symbol) + '\\'');\n            }\n            this.parseError(errStr, {\n                text: lexer.match,\n                token: this.terminals_[symbol] || symbol,\n                line: lexer.yylineno,\n                loc: yyloc,\n                expected: expected\n            });\n        }\n        if (action[0] instanceof Array && action.length > 1) {\n            throw new Error('Parse Error: multiple actions possible at state: ' + state + ', token: ' + symbol);\n        }\n        switch (action[0]) {\n        case 1:\n            stack.push(symbol);\n            vstack.push(lexer.yytext);\n            lstack.push(lexer.yylloc);\n            stack.push(action[1]);\n            symbol = null;\n            if (!preErrorSymbol) {\n                yyleng = lexer.yyleng;\n                yytext = lexer.yytext;\n                yylineno = lexer.yylineno;\n                yyloc = lexer.yylloc;\n                if (recovering > 0) {\n                    recovering--;\n                }\n            } else {\n                symbol = preErrorSymbol;\n                preErrorSymbol = null;\n            }\n            break;\n        case 2:\n            len = this.productions_[action[1]][1];\n            yyval.$ = vstack[vstack.length - len];\n            yyval._$ = {\n                first_line: lstack[lstack.length - (len || 1)].first_line,\n                last_line: lstack[lstack.length - 1].last_line,\n                first_column: lstack[lstack.length - (len || 1)].first_column,\n                last_column: lstack[lstack.length - 1].last_column\n            };\n            if (ranges) {\n                yyval._$.range = [\n                    lstack[lstack.length - (len || 1)].range[0],\n                    lstack[lstack.length - 1].range[1]\n                ];\n            }\n            r = this.performAction.apply(yyval, [\n                yytext,\n                yyleng,\n                yylineno,\n                sharedState.yy,\n                action[1],\n                vstack,\n                lstack\n            ].concat(args));\n            if (typeof r !== 'undefined') {\n                return r;\n            }\n            if (len) {\n                stack = stack.slice(0, -1 * len * 2);\n                vstack = vstack.slice(0, -1 * len);\n                lstack = lstack.slice(0, -1 * len);\n            }\n            stack.push(this.productions_[action[1]][0]);\n            vstack.push(yyval.$);\n            lstack.push(yyval._$);\n            newState = table[stack[stack.length - 2]][stack[stack.length - 1]];\n            stack.push(newState);\n            break;\n        case 3:\n            return true;\n        }\n    }\n    return true;\n}};\n/* generated by jison-lex 0.3.4 */\nvar lexer = (function(){\nvar lexer = ({\n\nEOF:1,\n\nparseError:function parseError(str, hash) {\n        if (this.yy.parser) {\n            this.yy.parser.parseError(str, hash);\n        } else {\n            throw new Error(str);\n        }\n    },\n\n// resets the lexer, sets new input\nsetInput:function (input, yy) {\n        this.yy = yy || this.yy || {};\n        this._input = input;\n        this._more = this._backtrack = this.done = false;\n        this.yylineno = this.yyleng = 0;\n        this.yytext = this.matched = this.match = '';\n        this.conditionStack = ['INITIAL'];\n        this.yylloc = {\n            first_line: 1,\n            first_column: 0,\n            last_line: 1,\n            last_column: 0\n        };\n        if (this.options.ranges) {\n            this.yylloc.range = [0,0];\n        }\n        this.offset = 0;\n        return this;\n    },\n\n// consumes and returns one char from the input\ninput:function () {\n        var ch = this._input[0];\n        this.yytext += ch;\n        this.yyleng++;\n        this.offset++;\n        this.match += ch;\n        this.matched += ch;\n        var lines = ch.match(/(?:\\r\\n?|\\n).*/g);\n        if (lines) {\n            this.yylineno++;\n            this.yylloc.last_line++;\n        } else {\n            this.yylloc.last_column++;\n        }\n        if (this.options.ranges) {\n            this.yylloc.range[1]++;\n        }\n\n        this._input = this._input.slice(1);\n        return ch;\n    },\n\n// unshifts one char (or a string) into the input\nunput:function (ch) {\n        var len = ch.length;\n        var lines = ch.split(/(?:\\r\\n?|\\n)/g);\n\n        this._input = ch + this._input;\n        this.yytext = this.yytext.substr(0, this.yytext.length - len);\n        //this.yyleng -= len;\n        this.offset -= len;\n        var oldLines = this.match.split(/(?:\\r\\n?|\\n)/g);\n        this.match = this.match.substr(0, this.match.length - 1);\n        this.matched = this.matched.substr(0, this.matched.length - 1);\n\n        if (lines.length - 1) {\n            this.yylineno -= lines.length - 1;\n        }\n        var r = this.yylloc.range;\n\n        this.yylloc = {\n            first_line: this.yylloc.first_line,\n            last_line: this.yylineno + 1,\n            first_column: this.yylloc.first_column,\n            last_column: lines ?\n                (lines.length === oldLines.length ? this.yylloc.first_column : 0)\n                 + oldLines[oldLines.length - lines.length].length - lines[0].length :\n              this.yylloc.first_column - len\n        };\n\n        if (this.options.ranges) {\n            this.yylloc.range = [r[0], r[0] + this.yyleng - len];\n        }\n        this.yyleng = this.yytext.length;\n        return this;\n    },\n\n// When called from action, caches matched text and appends it on next action\nmore:function () {\n        this._more = true;\n        return this;\n    },\n\n// When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead.\nreject:function () {\n        if (this.options.backtrack_lexer) {\n            this._backtrack = true;\n        } else {\n            return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\\n' + this.showPosition(), {\n                text: \"\",\n                token: null,\n                line: this.yylineno\n            });\n\n        }\n        return this;\n    },\n\n// retain first n characters of the match\nless:function (n) {\n        this.unput(this.match.slice(n));\n    },\n\n// displays already matched input, i.e. for error messages\npastInput:function () {\n        var past = this.matched.substr(0, this.matched.length - this.match.length);\n        return (past.length > 20 ? '...':'') + past.substr(-20).replace(/\\n/g, \"\");\n    },\n\n// displays upcoming input, i.e. for error messages\nupcomingInput:function () {\n        var next = this.match;\n        if (next.length < 20) {\n            next += this._input.substr(0, 20-next.length);\n        }\n        return (next.substr(0,20) + (next.length > 20 ? '...' : '')).replace(/\\n/g, \"\");\n    },\n\n// displays the character position where the lexing error occurred, i.e. for error messages\nshowPosition:function () {\n        var pre = this.pastInput();\n        var c = new Array(pre.length + 1).join(\"-\");\n        return pre + this.upcomingInput() + \"\\n\" + c + \"^\";\n    },\n\n// test the lexed token: return FALSE when not a match, otherwise return token\ntest_match:function(match, indexed_rule) {\n        var token,\n            lines,\n            backup;\n\n        if (this.options.backtrack_lexer) {\n            // save context\n            backup = {\n                yylineno: this.yylineno,\n                yylloc: {\n                    first_line: this.yylloc.first_line,\n                    last_line: this.last_line,\n                    first_column: this.yylloc.first_column,\n                    last_column: this.yylloc.last_column\n                },\n                yytext: this.yytext,\n                match: this.match,\n                matches: this.matches,\n                matched: this.matched,\n                yyleng: this.yyleng,\n                offset: this.offset,\n                _more: this._more,\n                _input: this._input,\n                yy: this.yy,\n                conditionStack: this.conditionStack.slice(0),\n                done: this.done\n            };\n            if (this.options.ranges) {\n                backup.yylloc.range = this.yylloc.range.slice(0);\n            }\n        }\n\n        lines = match[0].match(/(?:\\r\\n?|\\n).*/g);\n        if (lines) {\n            this.yylineno += lines.length;\n        }\n        this.yylloc = {\n            first_line: this.yylloc.last_line,\n            last_line: this.yylineno + 1,\n            first_column: this.yylloc.last_column,\n            last_column: lines ?\n                         lines[lines.length - 1].length - lines[lines.length - 1].match(/\\r?\\n?/)[0].length :\n                         this.yylloc.last_column + match[0].length\n        };\n        this.yytext += match[0];\n        this.match += match[0];\n        this.matches = match;\n        this.yyleng = this.yytext.length;\n        if (this.options.ranges) {\n            this.yylloc.range = [this.offset, this.offset += this.yyleng];\n        }\n        this._more = false;\n        this._backtrack = false;\n        this._input = this._input.slice(match[0].length);\n        this.matched += match[0];\n        token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]);\n        if (this.done && this._input) {\n            this.done = false;\n        }\n        if (token) {\n            return token;\n        } else if (this._backtrack) {\n            // recover context\n            for (var k in backup) {\n                this[k] = backup[k];\n            }\n            return false; // rule action called reject() implying the next rule should be tested instead.\n        }\n        return false;\n    },\n\n// return next match in input\nnext:function () {\n        if (this.done) {\n            return this.EOF;\n        }\n        if (!this._input) {\n            this.done = true;\n        }\n\n        var token,\n            match,\n            tempMatch,\n            index;\n        if (!this._more) {\n            this.yytext = '';\n            this.match = '';\n        }\n        var rules = this._currentRules();\n        for (var i = 0; i < rules.length; i++) {\n            tempMatch = this._input.match(this.rules[rules[i]]);\n            if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {\n                match = tempMatch;\n                index = i;\n                if (this.options.backtrack_lexer) {\n                    token = this.test_match(tempMatch, rules[i]);\n                    if (token !== false) {\n                        return token;\n                    } else if (this._backtrack) {\n                        match = false;\n                        continue; // rule action called reject() implying a rule MISmatch.\n                    } else {\n                        // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)\n                        return false;\n                    }\n                } else if (!this.options.flex) {\n                    break;\n                }\n            }\n        }\n        if (match) {\n            token = this.test_match(match, rules[index]);\n            if (token !== false) {\n                return token;\n            }\n            // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)\n            return false;\n        }\n        if (this._input === \"\") {\n            return this.EOF;\n        } else {\n            return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. Unrecognized text.\\n' + this.showPosition(), {\n                text: \"\",\n                token: null,\n                line: this.yylineno\n            });\n        }\n    },\n\n// return next match that has a token\nlex:function lex () {\n        var r = this.next();\n        if (r) {\n            return r;\n        } else {\n            return this.lex();\n        }\n    },\n\n// activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)\nbegin:function begin (condition) {\n        this.conditionStack.push(condition);\n    },\n\n// pop the previously active lexer condition state off the condition stack\npopState:function popState () {\n        var n = this.conditionStack.length - 1;\n        if (n > 0) {\n            return this.conditionStack.pop();\n        } else {\n            return this.conditionStack[0];\n        }\n    },\n\n// produce the lexer rule set which is active for the currently active lexer condition state\n_currentRules:function _currentRules () {\n        if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) {\n            return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;\n        } else {\n            return this.conditions[\"INITIAL\"].rules;\n        }\n    },\n\n// return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available\ntopState:function topState (n) {\n        n = this.conditionStack.length - 1 - Math.abs(n || 0);\n        if (n >= 0) {\n            return this.conditionStack[n];\n        } else {\n            return \"INITIAL\";\n        }\n    },\n\n// alias for begin(condition)\npushState:function pushState (condition) {\n        this.begin(condition);\n    },\n\n// return the number of states currently on the stack\nstateStackSize:function stateStackSize() {\n        return this.conditionStack.length;\n    },\noptions: {\"case-insensitive\":true},\nperformAction: function anonymous(yy,yy_,$avoiding_name_collisions,YY_START) {\nvar YYSTATE=YY_START;\nswitch($avoiding_name_collisions) {\ncase 0:return 12;\nbreak;\ncase 1:/* skip all whitespace */\nbreak;\ncase 2:/* skip comments */\nbreak;\ncase 3:/* skip comments */\nbreak;\ncase 4:return 4;\nbreak;\ncase 5:return 15;\nbreak;\ncase 6:return 17;\nbreak;\ncase 7:return 20;\nbreak;\ncase 8:return 21;\nbreak;\ncase 9:return 19;\nbreak;\ncase 10:return 8;\nbreak;\ncase 11:return 8;\nbreak;\ncase 12:return 5;\nbreak;\ncase 13:return 26\nbreak;\ncase 14:this.begin(\"options\");\nbreak;\ncase 15:this.popState();\nbreak;\ncase 16:return 11;\nbreak;\ncase 17:this.begin(\"string\");\nbreak;\ncase 18:this.popState();\nbreak;\ncase 19:return 23;\nbreak;\ncase 20:return 18;\nbreak;\ncase 21:return 7;\nbreak;\n}\n},\nrules: [/^(?:(\\r?\\n)+)/i,/^(?:\\s+)/i,/^(?:#[^\\n]*)/i,/^(?:%[^\\n]*)/i,/^(?:gitGraph\\b)/i,/^(?:commit\\b)/i,/^(?:branch\\b)/i,/^(?:merge\\b)/i,/^(?:reset\\b)/i,/^(?:checkout\\b)/i,/^(?:LR\\b)/i,/^(?:BT\\b)/i,/^(?::)/i,/^(?:\\^)/i,/^(?:options\\r?\\n)/i,/^(?:end\\r?\\n)/i,/^(?:[^\\n]+\\r?\\n)/i,/^(?:[\"])/i,/^(?:[\"])/i,/^(?:[^\"]*)/i,/^(?:[a-zA-Z][-_\\.a-zA-Z0-9]*[-_a-zA-Z0-9])/i,/^(?:$)/i],\nconditions: {\"options\":{\"rules\":[15,16],\"inclusive\":false},\"string\":{\"rules\":[18,19],\"inclusive\":false},\"INITIAL\":{\"rules\":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,17,20,21],\"inclusive\":true}}\n});\nreturn lexer;\n})();\nparser.lexer = lexer;\nfunction Parser () {\n  this.yy = {};\n}\nParser.prototype = parser;parser.Parser = Parser;\nreturn new Parser;\n})();\n\n\nif (true) {\nexports.parser = parser;\nexports.Parser = parser.Parser;\nexports.parse = function () { return parser.parse.apply(parser, arguments); };\nexports.main = function commonjsMain (args) {\n    if (!args[1]) {\n        console.log('Usage: '+args[0]+' FILE');\n        process.exit(1);\n    }\n    var source = __webpack_require__(/*! fs */ \"./node_modules/node-libs-browser/mock/empty.js\").readFileSync(__webpack_require__(/*! path */ \"./node_modules/path-browserify/index.js\").normalize(args[1]), \"utf8\");\n    return exports.parser.parse(source);\n};\nif ( true && __webpack_require__.c[__webpack_require__.s] === module) {\n  exports.main(process.argv.slice(1));\n}\n}\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../node_modules/process/browser.js */ \"./node_modules/process/browser.js\"), __webpack_require__(/*! ./../../../../node_modules/webpack/buildin/module.js */ \"./node_modules/webpack/buildin/module.js\")(module)))\n\n/***/ }),\n\n/***/ \"./src/diagrams/git/styles.js\":\n/*!************************************!*\\\n  !*** ./src/diagrams/git/styles.js ***!\n  \\************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\nvar getStyles = function getStyles() {\n  return \"\\n  .commit-id,\\n  .commit-msg,\\n  .branch-label {\\n    fill: lightgrey;\\n    color: lightgrey;\\n    font-family: 'trebuchet ms', verdana, arial, sans-serif;\\n    font-family: var(--mermaid-font-family);\\n  }\\n\";\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (getStyles);\n\n/***/ }),\n\n/***/ \"./src/diagrams/info/infoDb.js\":\n/*!*************************************!*\\\n  !*** ./src/diagrams/info/infoDb.js ***!\n  \\*************************************/\n/*! exports provided: setMessage, getMessage, setInfo, getInfo, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"setMessage\", function() { return setMessage; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getMessage\", function() { return getMessage; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"setInfo\", function() { return setInfo; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getInfo\", function() { return getInfo; });\n/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../logger */ \"./src/logger.js\");\n/**\n * Created by knut on 15-01-14.\n */\n\nvar message = '';\nvar info = false;\nvar setMessage = function setMessage(txt) {\n  _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].debug('Setting message to: ' + txt);\n  message = txt;\n};\nvar getMessage = function getMessage() {\n  return message;\n};\nvar setInfo = function setInfo(inf) {\n  info = inf;\n};\nvar getInfo = function getInfo() {\n  return info;\n}; // export const parseError = (err, hash) => {\n//   global.mermaidAPI.parseError(err, hash)\n// }\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n  setMessage: setMessage,\n  getMessage: getMessage,\n  setInfo: setInfo,\n  getInfo: getInfo // parseError\n\n});\n\n/***/ }),\n\n/***/ \"./src/diagrams/info/infoRenderer.js\":\n/*!*******************************************!*\\\n  !*** ./src/diagrams/info/infoRenderer.js ***!\n  \\*******************************************/\n/*! exports provided: setConf, draw, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"setConf\", function() { return setConf; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"draw\", function() { return draw; });\n/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3 */ \"./node_modules/d3/src/index.js\");\n/* harmony import */ var _infoDb__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./infoDb */ \"./src/diagrams/info/infoDb.js\");\n/* harmony import */ var _parser_info__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./parser/info */ \"./src/diagrams/info/parser/info.jison\");\n/* harmony import */ var _parser_info__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_parser_info__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../logger */ \"./src/logger.js\");\n/**\n * Created by knut on 14-12-11.\n */\n\n\n\n\nvar conf = {};\nvar setConf = function setConf(cnf) {\n  var keys = Object.keys(cnf);\n  keys.forEach(function (key) {\n    conf[key] = cnf[key];\n  });\n};\n/**\n * Draws a an info picture in the tag with id: id based on the graph definition in text.\n * @param text\n * @param id\n */\n\nvar draw = function draw(txt, id, ver) {\n  try {\n    var parser = _parser_info__WEBPACK_IMPORTED_MODULE_2___default.a.parser;\n    parser.yy = _infoDb__WEBPACK_IMPORTED_MODULE_1__[\"default\"];\n    _logger__WEBPACK_IMPORTED_MODULE_3__[\"log\"].debug('Renering info diagram\\n' + txt); // Parse the graph definition\n\n    parser.parse(txt);\n    _logger__WEBPACK_IMPORTED_MODULE_3__[\"log\"].debug('Parsed info diagram'); // Fetch the default direction, use TD if none was found\n\n    var svg = Object(d3__WEBPACK_IMPORTED_MODULE_0__[\"select\"])('#' + id);\n    var g = svg.append('g');\n    g.append('text') // text label for the x axis\n    .attr('x', 100).attr('y', 40).attr('class', 'version').attr('font-size', '32px').style('text-anchor', 'middle').text('v ' + ver);\n    svg.attr('height', 100);\n    svg.attr('width', 400); // svg.attr('viewBox', '0 0 300 150');\n  } catch (e) {\n    _logger__WEBPACK_IMPORTED_MODULE_3__[\"log\"].error('Error while rendering info diagram');\n    _logger__WEBPACK_IMPORTED_MODULE_3__[\"log\"].error(e.message);\n  }\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n  setConf: setConf,\n  draw: draw\n});\n\n/***/ }),\n\n/***/ \"./src/diagrams/info/parser/info.jison\":\n/*!*********************************************!*\\\n  !*** ./src/diagrams/info/parser/info.jison ***!\n  \\*********************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n/* WEBPACK VAR INJECTION */(function(process, module) {/* parser generated by jison 0.4.18 */\n/*\n  Returns a Parser object of the following structure:\n\n  Parser: {\n    yy: {}\n  }\n\n  Parser.prototype: {\n    yy: {},\n    trace: function(),\n    symbols_: {associative list: name ==> number},\n    terminals_: {associative list: number ==> name},\n    productions_: [...],\n    performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$),\n    table: [...],\n    defaultActions: {...},\n    parseError: function(str, hash),\n    parse: function(input),\n\n    lexer: {\n        EOF: 1,\n        parseError: function(str, hash),\n        setInput: function(input),\n        input: function(),\n        unput: function(str),\n        more: function(),\n        less: function(n),\n        pastInput: function(),\n        upcomingInput: function(),\n        showPosition: function(),\n        test_match: function(regex_match_array, rule_index),\n        next: function(),\n        lex: function(),\n        begin: function(condition),\n        popState: function(),\n        _currentRules: function(),\n        topState: function(),\n        pushState: function(condition),\n\n        options: {\n            ranges: boolean           (optional: true ==> token location info will include a .range[] member)\n            flex: boolean             (optional: true ==> flex-like lexing behaviour where the rules are tested exhaustively to find the longest match)\n            backtrack_lexer: boolean  (optional: true ==> lexer regexes are tested in order and for each matching regex the action code is invoked; the lexer terminates the scan when a token is returned by the action code)\n        },\n\n        performAction: function(yy, yy_, $avoiding_name_collisions, YY_START),\n        rules: [...],\n        conditions: {associative list: name ==> set},\n    }\n  }\n\n\n  token location info (@$, _$, etc.): {\n    first_line: n,\n    last_line: n,\n    first_column: n,\n    last_column: n,\n    range: [start_number, end_number]       (where the numbers are indexes into the input string, regular zero-based)\n  }\n\n\n  the parseError function receives a 'hash' object with these members for lexer and parser errors: {\n    text:        (matched text)\n    token:       (the produced terminal token, if any)\n    line:        (yylineno)\n  }\n  while parser (grammar) errors will also provide these members, i.e. parser errors deliver a superset of attributes: {\n    loc:         (yylloc)\n    expected:    (string describing the set of expected tokens)\n    recoverable: (boolean: TRUE when the parser has a error recovery rule available for this particular error)\n  }\n*/\nvar parser = (function(){\nvar o=function(k,v,o,l){for(o=o||{},l=k.length;l--;o[k[l]]=v);return o},$V0=[6,9,10];\nvar parser = {trace: function trace () { },\nyy: {},\nsymbols_: {\"error\":2,\"start\":3,\"info\":4,\"document\":5,\"EOF\":6,\"line\":7,\"statement\":8,\"NL\":9,\"showInfo\":10,\"$accept\":0,\"$end\":1},\nterminals_: {2:\"error\",4:\"info\",6:\"EOF\",9:\"NL\",10:\"showInfo\"},\nproductions_: [0,[3,3],[5,0],[5,2],[7,1],[7,1],[8,1]],\nperformAction: function anonymous(yytext, yyleng, yylineno, yy, yystate /* action[1] */, $$ /* vstack */, _$ /* lstack */) {\n/* this == yyval */\n\nvar $0 = $$.length - 1;\nswitch (yystate) {\ncase 1:\n return yy; \nbreak;\ncase 4:\n \nbreak;\ncase 6:\n yy.setInfo(true);  \nbreak;\n}\n},\ntable: [{3:1,4:[1,2]},{1:[3]},o($V0,[2,2],{5:3}),{6:[1,4],7:5,8:6,9:[1,7],10:[1,8]},{1:[2,1]},o($V0,[2,3]),o($V0,[2,4]),o($V0,[2,5]),o($V0,[2,6])],\ndefaultActions: {4:[2,1]},\nparseError: function parseError (str, hash) {\n    if (hash.recoverable) {\n        this.trace(str);\n    } else {\n        var error = new Error(str);\n        error.hash = hash;\n        throw error;\n    }\n},\nparse: function parse(input) {\n    var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = '', yylineno = 0, yyleng = 0, recovering = 0, TERROR = 2, EOF = 1;\n    var args = lstack.slice.call(arguments, 1);\n    var lexer = Object.create(this.lexer);\n    var sharedState = { yy: {} };\n    for (var k in this.yy) {\n        if (Object.prototype.hasOwnProperty.call(this.yy, k)) {\n            sharedState.yy[k] = this.yy[k];\n        }\n    }\n    lexer.setInput(input, sharedState.yy);\n    sharedState.yy.lexer = lexer;\n    sharedState.yy.parser = this;\n    if (typeof lexer.yylloc == 'undefined') {\n        lexer.yylloc = {};\n    }\n    var yyloc = lexer.yylloc;\n    lstack.push(yyloc);\n    var ranges = lexer.options && lexer.options.ranges;\n    if (typeof sharedState.yy.parseError === 'function') {\n        this.parseError = sharedState.yy.parseError;\n    } else {\n        this.parseError = Object.getPrototypeOf(this).parseError;\n    }\n    function popStack(n) {\n        stack.length = stack.length - 2 * n;\n        vstack.length = vstack.length - n;\n        lstack.length = lstack.length - n;\n    }\n            function lex() {\n            var token;\n            token = tstack.pop() || lexer.lex() || EOF;\n            if (typeof token !== 'number') {\n                if (token instanceof Array) {\n                    tstack = token;\n                    token = tstack.pop();\n                }\n                token = self.symbols_[token] || token;\n            }\n            return token;\n        }\n    var symbol, preErrorSymbol, state, action, a, r, yyval = {}, p, len, newState, expected;\n    while (true) {\n        state = stack[stack.length - 1];\n        if (this.defaultActions[state]) {\n            action = this.defaultActions[state];\n        } else {\n            if (symbol === null || typeof symbol == 'undefined') {\n                symbol = lex();\n            }\n            action = table[state] && table[state][symbol];\n        }\n        if (typeof action === 'undefined' || !action.length || !action[0]) {\n            var errStr = '';\n            expected = [];\n            for (p in table[state]) {\n                if (this.terminals_[p] && p > TERROR) {\n                    expected.push('\\'' + this.terminals_[p] + '\\'');\n                }\n            }\n            if (lexer.showPosition) {\n                errStr = 'Parse error on line ' + (yylineno + 1) + ':\\n' + lexer.showPosition() + '\\nExpecting ' + expected.join(', ') + ', got \\'' + (this.terminals_[symbol] || symbol) + '\\'';\n            } else {\n                errStr = 'Parse error on line ' + (yylineno + 1) + ': Unexpected ' + (symbol == EOF ? 'end of input' : '\\'' + (this.terminals_[symbol] || symbol) + '\\'');\n            }\n            this.parseError(errStr, {\n                text: lexer.match,\n                token: this.terminals_[symbol] || symbol,\n                line: lexer.yylineno,\n                loc: yyloc,\n                expected: expected\n            });\n        }\n        if (action[0] instanceof Array && action.length > 1) {\n            throw new Error('Parse Error: multiple actions possible at state: ' + state + ', token: ' + symbol);\n        }\n        switch (action[0]) {\n        case 1:\n            stack.push(symbol);\n            vstack.push(lexer.yytext);\n            lstack.push(lexer.yylloc);\n            stack.push(action[1]);\n            symbol = null;\n            if (!preErrorSymbol) {\n                yyleng = lexer.yyleng;\n                yytext = lexer.yytext;\n                yylineno = lexer.yylineno;\n                yyloc = lexer.yylloc;\n                if (recovering > 0) {\n                    recovering--;\n                }\n            } else {\n                symbol = preErrorSymbol;\n                preErrorSymbol = null;\n            }\n            break;\n        case 2:\n            len = this.productions_[action[1]][1];\n            yyval.$ = vstack[vstack.length - len];\n            yyval._$ = {\n                first_line: lstack[lstack.length - (len || 1)].first_line,\n                last_line: lstack[lstack.length - 1].last_line,\n                first_column: lstack[lstack.length - (len || 1)].first_column,\n                last_column: lstack[lstack.length - 1].last_column\n            };\n            if (ranges) {\n                yyval._$.range = [\n                    lstack[lstack.length - (len || 1)].range[0],\n                    lstack[lstack.length - 1].range[1]\n                ];\n            }\n            r = this.performAction.apply(yyval, [\n                yytext,\n                yyleng,\n                yylineno,\n                sharedState.yy,\n                action[1],\n                vstack,\n                lstack\n            ].concat(args));\n            if (typeof r !== 'undefined') {\n                return r;\n            }\n            if (len) {\n                stack = stack.slice(0, -1 * len * 2);\n                vstack = vstack.slice(0, -1 * len);\n                lstack = lstack.slice(0, -1 * len);\n            }\n            stack.push(this.productions_[action[1]][0]);\n            vstack.push(yyval.$);\n            lstack.push(yyval._$);\n            newState = table[stack[stack.length - 2]][stack[stack.length - 1]];\n            stack.push(newState);\n            break;\n        case 3:\n            return true;\n        }\n    }\n    return true;\n}};\n\n/* generated by jison-lex 0.3.4 */\nvar lexer = (function(){\nvar lexer = ({\n\nEOF:1,\n\nparseError:function parseError(str, hash) {\n        if (this.yy.parser) {\n            this.yy.parser.parseError(str, hash);\n        } else {\n            throw new Error(str);\n        }\n    },\n\n// resets the lexer, sets new input\nsetInput:function (input, yy) {\n        this.yy = yy || this.yy || {};\n        this._input = input;\n        this._more = this._backtrack = this.done = false;\n        this.yylineno = this.yyleng = 0;\n        this.yytext = this.matched = this.match = '';\n        this.conditionStack = ['INITIAL'];\n        this.yylloc = {\n            first_line: 1,\n            first_column: 0,\n            last_line: 1,\n            last_column: 0\n        };\n        if (this.options.ranges) {\n            this.yylloc.range = [0,0];\n        }\n        this.offset = 0;\n        return this;\n    },\n\n// consumes and returns one char from the input\ninput:function () {\n        var ch = this._input[0];\n        this.yytext += ch;\n        this.yyleng++;\n        this.offset++;\n        this.match += ch;\n        this.matched += ch;\n        var lines = ch.match(/(?:\\r\\n?|\\n).*/g);\n        if (lines) {\n            this.yylineno++;\n            this.yylloc.last_line++;\n        } else {\n            this.yylloc.last_column++;\n        }\n        if (this.options.ranges) {\n            this.yylloc.range[1]++;\n        }\n\n        this._input = this._input.slice(1);\n        return ch;\n    },\n\n// unshifts one char (or a string) into the input\nunput:function (ch) {\n        var len = ch.length;\n        var lines = ch.split(/(?:\\r\\n?|\\n)/g);\n\n        this._input = ch + this._input;\n        this.yytext = this.yytext.substr(0, this.yytext.length - len);\n        //this.yyleng -= len;\n        this.offset -= len;\n        var oldLines = this.match.split(/(?:\\r\\n?|\\n)/g);\n        this.match = this.match.substr(0, this.match.length - 1);\n        this.matched = this.matched.substr(0, this.matched.length - 1);\n\n        if (lines.length - 1) {\n            this.yylineno -= lines.length - 1;\n        }\n        var r = this.yylloc.range;\n\n        this.yylloc = {\n            first_line: this.yylloc.first_line,\n            last_line: this.yylineno + 1,\n            first_column: this.yylloc.first_column,\n            last_column: lines ?\n                (lines.length === oldLines.length ? this.yylloc.first_column : 0)\n                 + oldLines[oldLines.length - lines.length].length - lines[0].length :\n              this.yylloc.first_column - len\n        };\n\n        if (this.options.ranges) {\n            this.yylloc.range = [r[0], r[0] + this.yyleng - len];\n        }\n        this.yyleng = this.yytext.length;\n        return this;\n    },\n\n// When called from action, caches matched text and appends it on next action\nmore:function () {\n        this._more = true;\n        return this;\n    },\n\n// When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead.\nreject:function () {\n        if (this.options.backtrack_lexer) {\n            this._backtrack = true;\n        } else {\n            return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\\n' + this.showPosition(), {\n                text: \"\",\n                token: null,\n                line: this.yylineno\n            });\n\n        }\n        return this;\n    },\n\n// retain first n characters of the match\nless:function (n) {\n        this.unput(this.match.slice(n));\n    },\n\n// displays already matched input, i.e. for error messages\npastInput:function () {\n        var past = this.matched.substr(0, this.matched.length - this.match.length);\n        return (past.length > 20 ? '...':'') + past.substr(-20).replace(/\\n/g, \"\");\n    },\n\n// displays upcoming input, i.e. for error messages\nupcomingInput:function () {\n        var next = this.match;\n        if (next.length < 20) {\n            next += this._input.substr(0, 20-next.length);\n        }\n        return (next.substr(0,20) + (next.length > 20 ? '...' : '')).replace(/\\n/g, \"\");\n    },\n\n// displays the character position where the lexing error occurred, i.e. for error messages\nshowPosition:function () {\n        var pre = this.pastInput();\n        var c = new Array(pre.length + 1).join(\"-\");\n        return pre + this.upcomingInput() + \"\\n\" + c + \"^\";\n    },\n\n// test the lexed token: return FALSE when not a match, otherwise return token\ntest_match:function(match, indexed_rule) {\n        var token,\n            lines,\n            backup;\n\n        if (this.options.backtrack_lexer) {\n            // save context\n            backup = {\n                yylineno: this.yylineno,\n                yylloc: {\n                    first_line: this.yylloc.first_line,\n                    last_line: this.last_line,\n                    first_column: this.yylloc.first_column,\n                    last_column: this.yylloc.last_column\n                },\n                yytext: this.yytext,\n                match: this.match,\n                matches: this.matches,\n                matched: this.matched,\n                yyleng: this.yyleng,\n                offset: this.offset,\n                _more: this._more,\n                _input: this._input,\n                yy: this.yy,\n                conditionStack: this.conditionStack.slice(0),\n                done: this.done\n            };\n            if (this.options.ranges) {\n                backup.yylloc.range = this.yylloc.range.slice(0);\n            }\n        }\n\n        lines = match[0].match(/(?:\\r\\n?|\\n).*/g);\n        if (lines) {\n            this.yylineno += lines.length;\n        }\n        this.yylloc = {\n            first_line: this.yylloc.last_line,\n            last_line: this.yylineno + 1,\n            first_column: this.yylloc.last_column,\n            last_column: lines ?\n                         lines[lines.length - 1].length - lines[lines.length - 1].match(/\\r?\\n?/)[0].length :\n                         this.yylloc.last_column + match[0].length\n        };\n        this.yytext += match[0];\n        this.match += match[0];\n        this.matches = match;\n        this.yyleng = this.yytext.length;\n        if (this.options.ranges) {\n            this.yylloc.range = [this.offset, this.offset += this.yyleng];\n        }\n        this._more = false;\n        this._backtrack = false;\n        this._input = this._input.slice(match[0].length);\n        this.matched += match[0];\n        token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]);\n        if (this.done && this._input) {\n            this.done = false;\n        }\n        if (token) {\n            return token;\n        } else if (this._backtrack) {\n            // recover context\n            for (var k in backup) {\n                this[k] = backup[k];\n            }\n            return false; // rule action called reject() implying the next rule should be tested instead.\n        }\n        return false;\n    },\n\n// return next match in input\nnext:function () {\n        if (this.done) {\n            return this.EOF;\n        }\n        if (!this._input) {\n            this.done = true;\n        }\n\n        var token,\n            match,\n            tempMatch,\n            index;\n        if (!this._more) {\n            this.yytext = '';\n            this.match = '';\n        }\n        var rules = this._currentRules();\n        for (var i = 0; i < rules.length; i++) {\n            tempMatch = this._input.match(this.rules[rules[i]]);\n            if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {\n                match = tempMatch;\n                index = i;\n                if (this.options.backtrack_lexer) {\n                    token = this.test_match(tempMatch, rules[i]);\n                    if (token !== false) {\n                        return token;\n                    } else if (this._backtrack) {\n                        match = false;\n                        continue; // rule action called reject() implying a rule MISmatch.\n                    } else {\n                        // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)\n                        return false;\n                    }\n                } else if (!this.options.flex) {\n                    break;\n                }\n            }\n        }\n        if (match) {\n            token = this.test_match(match, rules[index]);\n            if (token !== false) {\n                return token;\n            }\n            // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)\n            return false;\n        }\n        if (this._input === \"\") {\n            return this.EOF;\n        } else {\n            return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. Unrecognized text.\\n' + this.showPosition(), {\n                text: \"\",\n                token: null,\n                line: this.yylineno\n            });\n        }\n    },\n\n// return next match that has a token\nlex:function lex () {\n        var r = this.next();\n        if (r) {\n            return r;\n        } else {\n            return this.lex();\n        }\n    },\n\n// activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)\nbegin:function begin (condition) {\n        this.conditionStack.push(condition);\n    },\n\n// pop the previously active lexer condition state off the condition stack\npopState:function popState () {\n        var n = this.conditionStack.length - 1;\n        if (n > 0) {\n            return this.conditionStack.pop();\n        } else {\n            return this.conditionStack[0];\n        }\n    },\n\n// produce the lexer rule set which is active for the currently active lexer condition state\n_currentRules:function _currentRules () {\n        if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) {\n            return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;\n        } else {\n            return this.conditions[\"INITIAL\"].rules;\n        }\n    },\n\n// return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available\ntopState:function topState (n) {\n        n = this.conditionStack.length - 1 - Math.abs(n || 0);\n        if (n >= 0) {\n            return this.conditionStack[n];\n        } else {\n            return \"INITIAL\";\n        }\n    },\n\n// alias for begin(condition)\npushState:function pushState (condition) {\n        this.begin(condition);\n    },\n\n// return the number of states currently on the stack\nstateStackSize:function stateStackSize() {\n        return this.conditionStack.length;\n    },\noptions: {\"case-insensitive\":true},\nperformAction: function anonymous(yy,yy_,$avoiding_name_collisions,YY_START) {\n\t// Pre-lexer code can go here\n\nvar YYSTATE=YY_START;\nswitch($avoiding_name_collisions) {\ncase 0:return 4    ;\nbreak;\ncase 1:return 9      ;\nbreak;\ncase 2:return 'space';\nbreak;\ncase 3:return 10;\nbreak;\ncase 4:return 6     ;\nbreak;\ncase 5:return 'TXT' ;\nbreak;\n}\n},\nrules: [/^(?:info\\b)/i,/^(?:[\\s\\n\\r]+)/i,/^(?:[\\s]+)/i,/^(?:showInfo\\b)/i,/^(?:$)/i,/^(?:.)/i],\nconditions: {\"INITIAL\":{\"rules\":[0,1,2,3,4,5],\"inclusive\":true}}\n});\nreturn lexer;\n})();\nparser.lexer = lexer;\nfunction Parser () {\n  this.yy = {};\n}\nParser.prototype = parser;parser.Parser = Parser;\nreturn new Parser;\n})();\n\n\nif (true) {\nexports.parser = parser;\nexports.Parser = parser.Parser;\nexports.parse = function () { return parser.parse.apply(parser, arguments); };\nexports.main = function commonjsMain (args) {\n    if (!args[1]) {\n        console.log('Usage: '+args[0]+' FILE');\n        process.exit(1);\n    }\n    var source = __webpack_require__(/*! fs */ \"./node_modules/node-libs-browser/mock/empty.js\").readFileSync(__webpack_require__(/*! path */ \"./node_modules/path-browserify/index.js\").normalize(args[1]), \"utf8\");\n    return exports.parser.parse(source);\n};\nif ( true && __webpack_require__.c[__webpack_require__.s] === module) {\n  exports.main(process.argv.slice(1));\n}\n}\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../node_modules/process/browser.js */ \"./node_modules/process/browser.js\"), __webpack_require__(/*! ./../../../../node_modules/webpack/buildin/module.js */ \"./node_modules/webpack/buildin/module.js\")(module)))\n\n/***/ }),\n\n/***/ \"./src/diagrams/info/styles.js\":\n/*!*************************************!*\\\n  !*** ./src/diagrams/info/styles.js ***!\n  \\*************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\nvar getStyles = function getStyles() {\n  return \"\";\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (getStyles);\n\n/***/ }),\n\n/***/ \"./src/diagrams/pie/parser/pie.jison\":\n/*!*******************************************!*\\\n  !*** ./src/diagrams/pie/parser/pie.jison ***!\n  \\*******************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n/* WEBPACK VAR INJECTION */(function(process, module) {/* parser generated by jison 0.4.18 */\n/*\n  Returns a Parser object of the following structure:\n\n  Parser: {\n    yy: {}\n  }\n\n  Parser.prototype: {\n    yy: {},\n    trace: function(),\n    symbols_: {associative list: name ==> number},\n    terminals_: {associative list: number ==> name},\n    productions_: [...],\n    performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$),\n    table: [...],\n    defaultActions: {...},\n    parseError: function(str, hash),\n    parse: function(input),\n\n    lexer: {\n        EOF: 1,\n        parseError: function(str, hash),\n        setInput: function(input),\n        input: function(),\n        unput: function(str),\n        more: function(),\n        less: function(n),\n        pastInput: function(),\n        upcomingInput: function(),\n        showPosition: function(),\n        test_match: function(regex_match_array, rule_index),\n        next: function(),\n        lex: function(),\n        begin: function(condition),\n        popState: function(),\n        _currentRules: function(),\n        topState: function(),\n        pushState: function(condition),\n\n        options: {\n            ranges: boolean           (optional: true ==> token location info will include a .range[] member)\n            flex: boolean             (optional: true ==> flex-like lexing behaviour where the rules are tested exhaustively to find the longest match)\n            backtrack_lexer: boolean  (optional: true ==> lexer regexes are tested in order and for each matching regex the action code is invoked; the lexer terminates the scan when a token is returned by the action code)\n        },\n\n        performAction: function(yy, yy_, $avoiding_name_collisions, YY_START),\n        rules: [...],\n        conditions: {associative list: name ==> set},\n    }\n  }\n\n\n  token location info (@$, _$, etc.): {\n    first_line: n,\n    last_line: n,\n    first_column: n,\n    last_column: n,\n    range: [start_number, end_number]       (where the numbers are indexes into the input string, regular zero-based)\n  }\n\n\n  the parseError function receives a 'hash' object with these members for lexer and parser errors: {\n    text:        (matched text)\n    token:       (the produced terminal token, if any)\n    line:        (yylineno)\n  }\n  while parser (grammar) errors will also provide these members, i.e. parser errors deliver a superset of attributes: {\n    loc:         (yylloc)\n    expected:    (string describing the set of expected tokens)\n    recoverable: (boolean: TRUE when the parser has a error recovery rule available for this particular error)\n  }\n*/\nvar parser = (function(){\nvar o=function(k,v,o,l){for(o=o||{},l=k.length;l--;o[k[l]]=v);return o},$V0=[1,4],$V1=[1,5],$V2=[1,6],$V3=[1,7],$V4=[1,9],$V5=[1,11,13,20,21,22,23],$V6=[2,5],$V7=[1,6,11,13,20,21,22,23],$V8=[20,21,22],$V9=[2,8],$Va=[1,18],$Vb=[1,19],$Vc=[1,24],$Vd=[6,20,21,22,23];\nvar parser = {trace: function trace () { },\nyy: {},\nsymbols_: {\"error\":2,\"start\":3,\"eol\":4,\"directive\":5,\"PIE\":6,\"document\":7,\"showData\":8,\"line\":9,\"statement\":10,\"txt\":11,\"value\":12,\"title\":13,\"title_value\":14,\"openDirective\":15,\"typeDirective\":16,\"closeDirective\":17,\":\":18,\"argDirective\":19,\"NEWLINE\":20,\";\":21,\"EOF\":22,\"open_directive\":23,\"type_directive\":24,\"arg_directive\":25,\"close_directive\":26,\"$accept\":0,\"$end\":1},\nterminals_: {2:\"error\",6:\"PIE\",8:\"showData\",11:\"txt\",12:\"value\",13:\"title\",14:\"title_value\",18:\":\",20:\"NEWLINE\",21:\";\",22:\"EOF\",23:\"open_directive\",24:\"type_directive\",25:\"arg_directive\",26:\"close_directive\"},\nproductions_: [0,[3,2],[3,2],[3,2],[3,3],[7,0],[7,2],[9,2],[10,0],[10,2],[10,2],[10,1],[5,3],[5,5],[4,1],[4,1],[4,1],[15,1],[16,1],[19,1],[17,1]],\nperformAction: function anonymous(yytext, yyleng, yylineno, yy, yystate /* action[1] */, $$ /* vstack */, _$ /* lstack */) {\n/* this == yyval */\n\nvar $0 = $$.length - 1;\nswitch (yystate) {\ncase 4:\nyy.setShowData(true);\nbreak;\ncase 7:\n this.$ = $$[$0-1] \nbreak;\ncase 9:\n yy.addSection($$[$0-1],yy.cleanupValue($$[$0])); \nbreak;\ncase 10:\n this.$=$$[$0].trim();yy.setTitle(this.$); \nbreak;\ncase 17:\n yy.parseDirective('%%{', 'open_directive'); \nbreak;\ncase 18:\n yy.parseDirective($$[$0], 'type_directive'); \nbreak;\ncase 19:\n $$[$0] = $$[$0].trim().replace(/'/g, '\"'); yy.parseDirective($$[$0], 'arg_directive'); \nbreak;\ncase 20:\n yy.parseDirective('}%%', 'close_directive', 'pie'); \nbreak;\n}\n},\ntable: [{3:1,4:2,5:3,6:$V0,15:8,20:$V1,21:$V2,22:$V3,23:$V4},{1:[3]},{3:10,4:2,5:3,6:$V0,15:8,20:$V1,21:$V2,22:$V3,23:$V4},{3:11,4:2,5:3,6:$V0,15:8,20:$V1,21:$V2,22:$V3,23:$V4},o($V5,$V6,{7:12,8:[1,13]}),o($V7,[2,14]),o($V7,[2,15]),o($V7,[2,16]),{16:14,24:[1,15]},{24:[2,17]},{1:[2,1]},{1:[2,2]},o($V8,$V9,{15:8,9:16,10:17,5:20,1:[2,3],11:$Va,13:$Vb,23:$V4}),o($V5,$V6,{7:21}),{17:22,18:[1,23],26:$Vc},o([18,26],[2,18]),o($V5,[2,6]),{4:25,20:$V1,21:$V2,22:$V3},{12:[1,26]},{14:[1,27]},o($V8,[2,11]),o($V8,$V9,{15:8,9:16,10:17,5:20,1:[2,4],11:$Va,13:$Vb,23:$V4}),o($Vd,[2,12]),{19:28,25:[1,29]},o($Vd,[2,20]),o($V5,[2,7]),o($V8,[2,9]),o($V8,[2,10]),{17:30,26:$Vc},{26:[2,19]},o($Vd,[2,13])],\ndefaultActions: {9:[2,17],10:[2,1],11:[2,2],29:[2,19]},\nparseError: function parseError (str, hash) {\n    if (hash.recoverable) {\n        this.trace(str);\n    } else {\n        var error = new Error(str);\n        error.hash = hash;\n        throw error;\n    }\n},\nparse: function parse(input) {\n    var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = '', yylineno = 0, yyleng = 0, recovering = 0, TERROR = 2, EOF = 1;\n    var args = lstack.slice.call(arguments, 1);\n    var lexer = Object.create(this.lexer);\n    var sharedState = { yy: {} };\n    for (var k in this.yy) {\n        if (Object.prototype.hasOwnProperty.call(this.yy, k)) {\n            sharedState.yy[k] = this.yy[k];\n        }\n    }\n    lexer.setInput(input, sharedState.yy);\n    sharedState.yy.lexer = lexer;\n    sharedState.yy.parser = this;\n    if (typeof lexer.yylloc == 'undefined') {\n        lexer.yylloc = {};\n    }\n    var yyloc = lexer.yylloc;\n    lstack.push(yyloc);\n    var ranges = lexer.options && lexer.options.ranges;\n    if (typeof sharedState.yy.parseError === 'function') {\n        this.parseError = sharedState.yy.parseError;\n    } else {\n        this.parseError = Object.getPrototypeOf(this).parseError;\n    }\n    function popStack(n) {\n        stack.length = stack.length - 2 * n;\n        vstack.length = vstack.length - n;\n        lstack.length = lstack.length - n;\n    }\n            function lex() {\n            var token;\n            token = tstack.pop() || lexer.lex() || EOF;\n            if (typeof token !== 'number') {\n                if (token instanceof Array) {\n                    tstack = token;\n                    token = tstack.pop();\n                }\n                token = self.symbols_[token] || token;\n            }\n            return token;\n        }\n    var symbol, preErrorSymbol, state, action, a, r, yyval = {}, p, len, newState, expected;\n    while (true) {\n        state = stack[stack.length - 1];\n        if (this.defaultActions[state]) {\n            action = this.defaultActions[state];\n        } else {\n            if (symbol === null || typeof symbol == 'undefined') {\n                symbol = lex();\n            }\n            action = table[state] && table[state][symbol];\n        }\n        if (typeof action === 'undefined' || !action.length || !action[0]) {\n            var errStr = '';\n            expected = [];\n            for (p in table[state]) {\n                if (this.terminals_[p] && p > TERROR) {\n                    expected.push('\\'' + this.terminals_[p] + '\\'');\n                }\n            }\n            if (lexer.showPosition) {\n                errStr = 'Parse error on line ' + (yylineno + 1) + ':\\n' + lexer.showPosition() + '\\nExpecting ' + expected.join(', ') + ', got \\'' + (this.terminals_[symbol] || symbol) + '\\'';\n            } else {\n                errStr = 'Parse error on line ' + (yylineno + 1) + ': Unexpected ' + (symbol == EOF ? 'end of input' : '\\'' + (this.terminals_[symbol] || symbol) + '\\'');\n            }\n            this.parseError(errStr, {\n                text: lexer.match,\n                token: this.terminals_[symbol] || symbol,\n                line: lexer.yylineno,\n                loc: yyloc,\n                expected: expected\n            });\n        }\n        if (action[0] instanceof Array && action.length > 1) {\n            throw new Error('Parse Error: multiple actions possible at state: ' + state + ', token: ' + symbol);\n        }\n        switch (action[0]) {\n        case 1:\n            stack.push(symbol);\n            vstack.push(lexer.yytext);\n            lstack.push(lexer.yylloc);\n            stack.push(action[1]);\n            symbol = null;\n            if (!preErrorSymbol) {\n                yyleng = lexer.yyleng;\n                yytext = lexer.yytext;\n                yylineno = lexer.yylineno;\n                yyloc = lexer.yylloc;\n                if (recovering > 0) {\n                    recovering--;\n                }\n            } else {\n                symbol = preErrorSymbol;\n                preErrorSymbol = null;\n            }\n            break;\n        case 2:\n            len = this.productions_[action[1]][1];\n            yyval.$ = vstack[vstack.length - len];\n            yyval._$ = {\n                first_line: lstack[lstack.length - (len || 1)].first_line,\n                last_line: lstack[lstack.length - 1].last_line,\n                first_column: lstack[lstack.length - (len || 1)].first_column,\n                last_column: lstack[lstack.length - 1].last_column\n            };\n            if (ranges) {\n                yyval._$.range = [\n                    lstack[lstack.length - (len || 1)].range[0],\n                    lstack[lstack.length - 1].range[1]\n                ];\n            }\n            r = this.performAction.apply(yyval, [\n                yytext,\n                yyleng,\n                yylineno,\n                sharedState.yy,\n                action[1],\n                vstack,\n                lstack\n            ].concat(args));\n            if (typeof r !== 'undefined') {\n                return r;\n            }\n            if (len) {\n                stack = stack.slice(0, -1 * len * 2);\n                vstack = vstack.slice(0, -1 * len);\n                lstack = lstack.slice(0, -1 * len);\n            }\n            stack.push(this.productions_[action[1]][0]);\n            vstack.push(yyval.$);\n            lstack.push(yyval._$);\n            newState = table[stack[stack.length - 2]][stack[stack.length - 1]];\n            stack.push(newState);\n            break;\n        case 3:\n            return true;\n        }\n    }\n    return true;\n}};\n\n/* generated by jison-lex 0.3.4 */\nvar lexer = (function(){\nvar lexer = ({\n\nEOF:1,\n\nparseError:function parseError(str, hash) {\n        if (this.yy.parser) {\n            this.yy.parser.parseError(str, hash);\n        } else {\n            throw new Error(str);\n        }\n    },\n\n// resets the lexer, sets new input\nsetInput:function (input, yy) {\n        this.yy = yy || this.yy || {};\n        this._input = input;\n        this._more = this._backtrack = this.done = false;\n        this.yylineno = this.yyleng = 0;\n        this.yytext = this.matched = this.match = '';\n        this.conditionStack = ['INITIAL'];\n        this.yylloc = {\n            first_line: 1,\n            first_column: 0,\n            last_line: 1,\n            last_column: 0\n        };\n        if (this.options.ranges) {\n            this.yylloc.range = [0,0];\n        }\n        this.offset = 0;\n        return this;\n    },\n\n// consumes and returns one char from the input\ninput:function () {\n        var ch = this._input[0];\n        this.yytext += ch;\n        this.yyleng++;\n        this.offset++;\n        this.match += ch;\n        this.matched += ch;\n        var lines = ch.match(/(?:\\r\\n?|\\n).*/g);\n        if (lines) {\n            this.yylineno++;\n            this.yylloc.last_line++;\n        } else {\n            this.yylloc.last_column++;\n        }\n        if (this.options.ranges) {\n            this.yylloc.range[1]++;\n        }\n\n        this._input = this._input.slice(1);\n        return ch;\n    },\n\n// unshifts one char (or a string) into the input\nunput:function (ch) {\n        var len = ch.length;\n        var lines = ch.split(/(?:\\r\\n?|\\n)/g);\n\n        this._input = ch + this._input;\n        this.yytext = this.yytext.substr(0, this.yytext.length - len);\n        //this.yyleng -= len;\n        this.offset -= len;\n        var oldLines = this.match.split(/(?:\\r\\n?|\\n)/g);\n        this.match = this.match.substr(0, this.match.length - 1);\n        this.matched = this.matched.substr(0, this.matched.length - 1);\n\n        if (lines.length - 1) {\n            this.yylineno -= lines.length - 1;\n        }\n        var r = this.yylloc.range;\n\n        this.yylloc = {\n            first_line: this.yylloc.first_line,\n            last_line: this.yylineno + 1,\n            first_column: this.yylloc.first_column,\n            last_column: lines ?\n                (lines.length === oldLines.length ? this.yylloc.first_column : 0)\n                 + oldLines[oldLines.length - lines.length].length - lines[0].length :\n              this.yylloc.first_column - len\n        };\n\n        if (this.options.ranges) {\n            this.yylloc.range = [r[0], r[0] + this.yyleng - len];\n        }\n        this.yyleng = this.yytext.length;\n        return this;\n    },\n\n// When called from action, caches matched text and appends it on next action\nmore:function () {\n        this._more = true;\n        return this;\n    },\n\n// When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead.\nreject:function () {\n        if (this.options.backtrack_lexer) {\n            this._backtrack = true;\n        } else {\n            return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\\n' + this.showPosition(), {\n                text: \"\",\n                token: null,\n                line: this.yylineno\n            });\n\n        }\n        return this;\n    },\n\n// retain first n characters of the match\nless:function (n) {\n        this.unput(this.match.slice(n));\n    },\n\n// displays already matched input, i.e. for error messages\npastInput:function () {\n        var past = this.matched.substr(0, this.matched.length - this.match.length);\n        return (past.length > 20 ? '...':'') + past.substr(-20).replace(/\\n/g, \"\");\n    },\n\n// displays upcoming input, i.e. for error messages\nupcomingInput:function () {\n        var next = this.match;\n        if (next.length < 20) {\n            next += this._input.substr(0, 20-next.length);\n        }\n        return (next.substr(0,20) + (next.length > 20 ? '...' : '')).replace(/\\n/g, \"\");\n    },\n\n// displays the character position where the lexing error occurred, i.e. for error messages\nshowPosition:function () {\n        var pre = this.pastInput();\n        var c = new Array(pre.length + 1).join(\"-\");\n        return pre + this.upcomingInput() + \"\\n\" + c + \"^\";\n    },\n\n// test the lexed token: return FALSE when not a match, otherwise return token\ntest_match:function(match, indexed_rule) {\n        var token,\n            lines,\n            backup;\n\n        if (this.options.backtrack_lexer) {\n            // save context\n            backup = {\n                yylineno: this.yylineno,\n                yylloc: {\n                    first_line: this.yylloc.first_line,\n                    last_line: this.last_line,\n                    first_column: this.yylloc.first_column,\n                    last_column: this.yylloc.last_column\n                },\n                yytext: this.yytext,\n                match: this.match,\n                matches: this.matches,\n                matched: this.matched,\n                yyleng: this.yyleng,\n                offset: this.offset,\n                _more: this._more,\n                _input: this._input,\n                yy: this.yy,\n                conditionStack: this.conditionStack.slice(0),\n                done: this.done\n            };\n            if (this.options.ranges) {\n                backup.yylloc.range = this.yylloc.range.slice(0);\n            }\n        }\n\n        lines = match[0].match(/(?:\\r\\n?|\\n).*/g);\n        if (lines) {\n            this.yylineno += lines.length;\n        }\n        this.yylloc = {\n            first_line: this.yylloc.last_line,\n            last_line: this.yylineno + 1,\n            first_column: this.yylloc.last_column,\n            last_column: lines ?\n                         lines[lines.length - 1].length - lines[lines.length - 1].match(/\\r?\\n?/)[0].length :\n                         this.yylloc.last_column + match[0].length\n        };\n        this.yytext += match[0];\n        this.match += match[0];\n        this.matches = match;\n        this.yyleng = this.yytext.length;\n        if (this.options.ranges) {\n            this.yylloc.range = [this.offset, this.offset += this.yyleng];\n        }\n        this._more = false;\n        this._backtrack = false;\n        this._input = this._input.slice(match[0].length);\n        this.matched += match[0];\n        token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]);\n        if (this.done && this._input) {\n            this.done = false;\n        }\n        if (token) {\n            return token;\n        } else if (this._backtrack) {\n            // recover context\n            for (var k in backup) {\n                this[k] = backup[k];\n            }\n            return false; // rule action called reject() implying the next rule should be tested instead.\n        }\n        return false;\n    },\n\n// return next match in input\nnext:function () {\n        if (this.done) {\n            return this.EOF;\n        }\n        if (!this._input) {\n            this.done = true;\n        }\n\n        var token,\n            match,\n            tempMatch,\n            index;\n        if (!this._more) {\n            this.yytext = '';\n            this.match = '';\n        }\n        var rules = this._currentRules();\n        for (var i = 0; i < rules.length; i++) {\n            tempMatch = this._input.match(this.rules[rules[i]]);\n            if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {\n                match = tempMatch;\n                index = i;\n                if (this.options.backtrack_lexer) {\n                    token = this.test_match(tempMatch, rules[i]);\n                    if (token !== false) {\n                        return token;\n                    } else if (this._backtrack) {\n                        match = false;\n                        continue; // rule action called reject() implying a rule MISmatch.\n                    } else {\n                        // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)\n                        return false;\n                    }\n                } else if (!this.options.flex) {\n                    break;\n                }\n            }\n        }\n        if (match) {\n            token = this.test_match(match, rules[index]);\n            if (token !== false) {\n                return token;\n            }\n            // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)\n            return false;\n        }\n        if (this._input === \"\") {\n            return this.EOF;\n        } else {\n            return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. Unrecognized text.\\n' + this.showPosition(), {\n                text: \"\",\n                token: null,\n                line: this.yylineno\n            });\n        }\n    },\n\n// return next match that has a token\nlex:function lex () {\n        var r = this.next();\n        if (r) {\n            return r;\n        } else {\n            return this.lex();\n        }\n    },\n\n// activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)\nbegin:function begin (condition) {\n        this.conditionStack.push(condition);\n    },\n\n// pop the previously active lexer condition state off the condition stack\npopState:function popState () {\n        var n = this.conditionStack.length - 1;\n        if (n > 0) {\n            return this.conditionStack.pop();\n        } else {\n            return this.conditionStack[0];\n        }\n    },\n\n// produce the lexer rule set which is active for the currently active lexer condition state\n_currentRules:function _currentRules () {\n        if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) {\n            return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;\n        } else {\n            return this.conditions[\"INITIAL\"].rules;\n        }\n    },\n\n// return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available\ntopState:function topState (n) {\n        n = this.conditionStack.length - 1 - Math.abs(n || 0);\n        if (n >= 0) {\n            return this.conditionStack[n];\n        } else {\n            return \"INITIAL\";\n        }\n    },\n\n// alias for begin(condition)\npushState:function pushState (condition) {\n        this.begin(condition);\n    },\n\n// return the number of states currently on the stack\nstateStackSize:function stateStackSize() {\n        return this.conditionStack.length;\n    },\noptions: {\"case-insensitive\":true},\nperformAction: function anonymous(yy,yy_,$avoiding_name_collisions,YY_START) {\nvar YYSTATE=YY_START;\nswitch($avoiding_name_collisions) {\ncase 0: this.begin('open_directive'); return 23; \nbreak;\ncase 1: this.begin('type_directive'); return 24; \nbreak;\ncase 2: this.popState(); this.begin('arg_directive'); return 18; \nbreak;\ncase 3: this.popState(); this.popState(); return 26; \nbreak;\ncase 4:return 25;\nbreak;\ncase 5:/* skip comments */\nbreak;\ncase 6:/* skip comments */{ /*console.log('');*/ }\nbreak;\ncase 7:return 20;\nbreak;\ncase 8:/* do nothing */\nbreak;\ncase 9:/* ignore */\nbreak;\ncase 10: this.begin(\"title\");return 13; \nbreak;\ncase 11: this.popState(); return \"title_value\"; \nbreak;\ncase 12: this.begin(\"string\"); \nbreak;\ncase 13: this.popState(); \nbreak;\ncase 14: return \"txt\"; \nbreak;\ncase 15:return 6;\nbreak;\ncase 16:return 8;\nbreak;\ncase 17:return \"value\";\nbreak;\ncase 18:return 22;\nbreak;\n}\n},\nrules: [/^(?:%%\\{)/i,/^(?:((?:(?!\\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\\}%%)/i,/^(?:((?:(?!\\}%%).|\\n)*))/i,/^(?:%%(?!\\{)[^\\n]*)/i,/^(?:[^\\}]%%[^\\n]*)/i,/^(?:[\\n\\r]+)/i,/^(?:%%[^\\n]*)/i,/^(?:[\\s]+)/i,/^(?:title\\b)/i,/^(?:(?!\\n||)*[^\\n]*)/i,/^(?:[\"])/i,/^(?:[\"])/i,/^(?:[^\"]*)/i,/^(?:pie\\b)/i,/^(?:showData\\b)/i,/^(?::[\\s]*[\\d]+(?:\\.[\\d]+)?)/i,/^(?:$)/i],\nconditions: {\"close_directive\":{\"rules\":[],\"inclusive\":false},\"arg_directive\":{\"rules\":[3,4],\"inclusive\":false},\"type_directive\":{\"rules\":[2,3],\"inclusive\":false},\"open_directive\":{\"rules\":[1],\"inclusive\":false},\"title\":{\"rules\":[11],\"inclusive\":false},\"string\":{\"rules\":[13,14],\"inclusive\":false},\"INITIAL\":{\"rules\":[0,5,6,7,8,9,10,12,15,16,17,18],\"inclusive\":true}}\n});\nreturn lexer;\n})();\nparser.lexer = lexer;\nfunction Parser () {\n  this.yy = {};\n}\nParser.prototype = parser;parser.Parser = Parser;\nreturn new Parser;\n})();\n\n\nif (true) {\nexports.parser = parser;\nexports.Parser = parser.Parser;\nexports.parse = function () { return parser.parse.apply(parser, arguments); };\nexports.main = function commonjsMain (args) {\n    if (!args[1]) {\n        console.log('Usage: '+args[0]+' FILE');\n        process.exit(1);\n    }\n    var source = __webpack_require__(/*! fs */ \"./node_modules/node-libs-browser/mock/empty.js\").readFileSync(__webpack_require__(/*! path */ \"./node_modules/path-browserify/index.js\").normalize(args[1]), \"utf8\");\n    return exports.parser.parse(source);\n};\nif ( true && __webpack_require__.c[__webpack_require__.s] === module) {\n  exports.main(process.argv.slice(1));\n}\n}\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../node_modules/process/browser.js */ \"./node_modules/process/browser.js\"), __webpack_require__(/*! ./../../../../node_modules/webpack/buildin/module.js */ \"./node_modules/webpack/buildin/module.js\")(module)))\n\n/***/ }),\n\n/***/ \"./src/diagrams/pie/pieDb.js\":\n/*!***********************************!*\\\n  !*** ./src/diagrams/pie/pieDb.js ***!\n  \\***********************************/\n/*! exports provided: parseDirective, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"parseDirective\", function() { return parseDirective; });\n/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../logger */ \"./src/logger.js\");\n/* harmony import */ var _mermaidAPI__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../mermaidAPI */ \"./src/mermaidAPI.js\");\n/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../config */ \"./src/config.js\");\n/**\n *\n */\n\n\n\nvar sections = {};\nvar title = '';\nvar showData = false;\nvar parseDirective = function parseDirective(statement, context, type) {\n  _mermaidAPI__WEBPACK_IMPORTED_MODULE_1__[\"default\"].parseDirective(this, statement, context, type);\n};\n\nvar addSection = function addSection(id, value) {\n  if (typeof sections[id] === 'undefined') {\n    sections[id] = value;\n    _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].debug('Added new section :', id);\n  }\n};\n\nvar getSections = function getSections() {\n  return sections;\n};\n\nvar setTitle = function setTitle(txt) {\n  title = txt;\n};\n\nvar setShowData = function setShowData(toggle) {\n  showData = toggle;\n};\n\nvar getShowData = function getShowData() {\n  return showData;\n};\n\nvar getTitle = function getTitle() {\n  return title;\n};\n\nvar cleanupValue = function cleanupValue(value) {\n  if (value.substring(0, 1) === ':') {\n    value = value.substring(1).trim();\n    return Number(value.trim());\n  } else {\n    return Number(value.trim());\n  }\n};\n\nvar clear = function clear() {\n  sections = {};\n  title = '';\n  showData = false;\n}; // export const parseError = (err, hash) => {\n//   global.mermaidAPI.parseError(err, hash)\n// }\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n  parseDirective: parseDirective,\n  getConfig: function getConfig() {\n    return _config__WEBPACK_IMPORTED_MODULE_2__[\"getConfig\"]().pie;\n  },\n  addSection: addSection,\n  getSections: getSections,\n  cleanupValue: cleanupValue,\n  clear: clear,\n  setTitle: setTitle,\n  getTitle: getTitle,\n  setShowData: setShowData,\n  getShowData: getShowData // parseError\n\n});\n\n/***/ }),\n\n/***/ \"./src/diagrams/pie/pieRenderer.js\":\n/*!*****************************************!*\\\n  !*** ./src/diagrams/pie/pieRenderer.js ***!\n  \\*****************************************/\n/*! exports provided: draw, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"draw\", function() { return draw; });\n/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3 */ \"./node_modules/d3/src/index.js\");\n/* harmony import */ var _pieDb__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./pieDb */ \"./src/diagrams/pie/pieDb.js\");\n/* harmony import */ var _parser_pie__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./parser/pie */ \"./src/diagrams/pie/parser/pie.jison\");\n/* harmony import */ var _parser_pie__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_parser_pie__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../logger */ \"./src/logger.js\");\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../utils */ \"./src/utils.js\");\n/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../config */ \"./src/config.js\");\n/**\n * Created by AshishJ on 11-09-2019.\n */\n\n\n\n\n\n\nvar conf = _config__WEBPACK_IMPORTED_MODULE_5__[\"getConfig\"]();\n/**\n * Draws a Pie Chart with the data given in text.\n * @param text\n * @param id\n */\n\nvar width;\nvar height = 450;\nvar draw = function draw(txt, id) {\n  try {\n    conf = _config__WEBPACK_IMPORTED_MODULE_5__[\"getConfig\"]();\n    var parser = _parser_pie__WEBPACK_IMPORTED_MODULE_2___default.a.parser;\n    parser.yy = _pieDb__WEBPACK_IMPORTED_MODULE_1__[\"default\"];\n    _logger__WEBPACK_IMPORTED_MODULE_3__[\"log\"].debug('Rendering info diagram\\n' + txt); // Parse the Pie Chart definition\n\n    parser.yy.clear();\n    parser.parse(txt);\n    _logger__WEBPACK_IMPORTED_MODULE_3__[\"log\"].debug('Parsed info diagram');\n    var elem = document.getElementById(id);\n    width = elem.parentElement.offsetWidth;\n\n    if (typeof width === 'undefined') {\n      width = 1200;\n    }\n\n    if (typeof conf.useWidth !== 'undefined') {\n      width = conf.useWidth;\n    }\n\n    if (typeof conf.pie.useWidth !== 'undefined') {\n      width = conf.pie.useWidth;\n    }\n\n    var diagram = Object(d3__WEBPACK_IMPORTED_MODULE_0__[\"select\"])('#' + id);\n    Object(_utils__WEBPACK_IMPORTED_MODULE_4__[\"configureSvgSize\"])(diagram, height, width, conf.pie.useMaxWidth); // Set viewBox\n\n    elem.setAttribute('viewBox', '0 0 ' + width + ' ' + height); // Fetch the default direction, use TD if none was found\n\n    var margin = 40;\n    var legendRectSize = 18;\n    var legendSpacing = 4;\n    var radius = Math.min(width, height) / 2 - margin;\n    var svg = diagram.append('g').attr('transform', 'translate(' + width / 2 + ',' + height / 2 + ')');\n    var data = _pieDb__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getSections();\n    var sum = 0;\n    Object.keys(data).forEach(function (key) {\n      sum += data[key];\n    });\n    var themeVariables = conf.themeVariables;\n    var myGeneratedColors = [themeVariables.pie1, themeVariables.pie2, themeVariables.pie3, themeVariables.pie4, themeVariables.pie5, themeVariables.pie6, themeVariables.pie7, themeVariables.pie8, themeVariables.pie9, themeVariables.pie10, themeVariables.pie11, themeVariables.pie12]; // Set the color scale\n\n    var color = Object(d3__WEBPACK_IMPORTED_MODULE_0__[\"scaleOrdinal\"])().range(myGeneratedColors); // Compute the position of each group on the pie:\n\n    var pie = Object(d3__WEBPACK_IMPORTED_MODULE_0__[\"pie\"])().value(function (d) {\n      return d[1];\n    });\n    var dataReady = pie(Object.entries(data)); // Shape helper to build arcs:\n\n    var arcGenerator = Object(d3__WEBPACK_IMPORTED_MODULE_0__[\"arc\"])().innerRadius(0).outerRadius(radius); // Build the pie chart: each part of the pie is a path that we build using the arc function.\n\n    svg.selectAll('mySlices').data(dataReady).enter().append('path').attr('d', arcGenerator).attr('fill', function (d) {\n      return color(d.data[0]);\n    }).attr('class', 'pieCircle'); // Now add the percentage.\n    // Use the centroid method to get the best coordinates.\n\n    svg.selectAll('mySlices').data(dataReady).enter().append('text').text(function (d) {\n      return (d.data[1] / sum * 100).toFixed(0) + '%';\n    }).attr('transform', function (d) {\n      return 'translate(' + arcGenerator.centroid(d) + ')';\n    }).style('text-anchor', 'middle').attr('class', 'slice');\n    svg.append('text').text(parser.yy.getTitle()).attr('x', 0).attr('y', -(height - 50) / 2).attr('class', 'pieTitleText'); // Add the legends/annotations for each section\n\n    var legend = svg.selectAll('.legend').data(color.domain()).enter().append('g').attr('class', 'legend').attr('transform', function (d, i) {\n      var height = legendRectSize + legendSpacing;\n      var offset = height * color.domain().length / 2;\n      var horz = 12 * legendRectSize;\n      var vert = i * height - offset;\n      return 'translate(' + horz + ',' + vert + ')';\n    });\n    legend.append('rect').attr('width', legendRectSize).attr('height', legendRectSize).style('fill', color).style('stroke', color);\n    legend.data(dataReady).append('text').attr('x', legendRectSize + legendSpacing).attr('y', legendRectSize - legendSpacing).text(function (d) {\n      if (parser.yy.getShowData() || conf.showData || conf.pie.showData) {\n        return d.data[0] + ' [' + d.data[1] + ']';\n      } else {\n        return d.data[0];\n      }\n    });\n  } catch (e) {\n    _logger__WEBPACK_IMPORTED_MODULE_3__[\"log\"].error('Error while rendering info diagram');\n    _logger__WEBPACK_IMPORTED_MODULE_3__[\"log\"].error(e);\n  }\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n  draw: draw\n});\n\n/***/ }),\n\n/***/ \"./src/diagrams/pie/styles.js\":\n/*!************************************!*\\\n  !*** ./src/diagrams/pie/styles.js ***!\n  \\************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\nvar getStyles = function getStyles(options) {\n  return \"\\n  .pieCircle{\\n    stroke: \".concat(options.pieStrokeColor, \";\\n    stroke-width : \").concat(options.pieStrokeWidth, \";\\n    opacity : \").concat(options.pieOpacity, \";\\n  }\\n  .pieTitleText {\\n    text-anchor: middle;\\n    font-size: \").concat(options.pieTitleTextSize, \";\\n    fill: \").concat(options.pieTitleTextColor, \";\\n    font-family: \").concat(options.fontFamily, \";\\n  }\\n  .slice {\\n    font-family: \").concat(options.fontFamily, \";\\n    fill: \").concat(options.pieSectionTextColor, \";\\n    font-size:\").concat(options.pieSectionTextSize, \";\\n    // fill: white;\\n  }\\n  .legend text {\\n    fill: \").concat(options.pieLegendTextColor, \";\\n    font-family: \").concat(options.fontFamily, \";\\n    font-size: \").concat(options.pieLegendTextSize, \";\\n  }\\n\");\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (getStyles);\n\n/***/ }),\n\n/***/ \"./src/diagrams/requirement/parser/requirementDiagram.jison\":\n/*!******************************************************************!*\\\n  !*** ./src/diagrams/requirement/parser/requirementDiagram.jison ***!\n  \\******************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n/* WEBPACK VAR INJECTION */(function(process, module) {/* parser generated by jison 0.4.18 */\n/*\n  Returns a Parser object of the following structure:\n\n  Parser: {\n    yy: {}\n  }\n\n  Parser.prototype: {\n    yy: {},\n    trace: function(),\n    symbols_: {associative list: name ==> number},\n    terminals_: {associative list: number ==> name},\n    productions_: [...],\n    performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$),\n    table: [...],\n    defaultActions: {...},\n    parseError: function(str, hash),\n    parse: function(input),\n\n    lexer: {\n        EOF: 1,\n        parseError: function(str, hash),\n        setInput: function(input),\n        input: function(),\n        unput: function(str),\n        more: function(),\n        less: function(n),\n        pastInput: function(),\n        upcomingInput: function(),\n        showPosition: function(),\n        test_match: function(regex_match_array, rule_index),\n        next: function(),\n        lex: function(),\n        begin: function(condition),\n        popState: function(),\n        _currentRules: function(),\n        topState: function(),\n        pushState: function(condition),\n\n        options: {\n            ranges: boolean           (optional: true ==> token location info will include a .range[] member)\n            flex: boolean             (optional: true ==> flex-like lexing behaviour where the rules are tested exhaustively to find the longest match)\n            backtrack_lexer: boolean  (optional: true ==> lexer regexes are tested in order and for each matching regex the action code is invoked; the lexer terminates the scan when a token is returned by the action code)\n        },\n\n        performAction: function(yy, yy_, $avoiding_name_collisions, YY_START),\n        rules: [...],\n        conditions: {associative list: name ==> set},\n    }\n  }\n\n\n  token location info (@$, _$, etc.): {\n    first_line: n,\n    last_line: n,\n    first_column: n,\n    last_column: n,\n    range: [start_number, end_number]       (where the numbers are indexes into the input string, regular zero-based)\n  }\n\n\n  the parseError function receives a 'hash' object with these members for lexer and parser errors: {\n    text:        (matched text)\n    token:       (the produced terminal token, if any)\n    line:        (yylineno)\n  }\n  while parser (grammar) errors will also provide these members, i.e. parser errors deliver a superset of attributes: {\n    loc:         (yylloc)\n    expected:    (string describing the set of expected tokens)\n    recoverable: (boolean: TRUE when the parser has a error recovery rule available for this particular error)\n  }\n*/\nvar parser = (function(){\nvar o=function(k,v,o,l){for(o=o||{},l=k.length;l--;o[k[l]]=v);return o},$V0=[1,3],$V1=[1,5],$V2=[1,17],$V3=[2,10],$V4=[1,21],$V5=[1,22],$V6=[1,23],$V7=[1,24],$V8=[1,25],$V9=[1,26],$Va=[1,19],$Vb=[1,27],$Vc=[1,28],$Vd=[1,31],$Ve=[66,67],$Vf=[5,8,14,35,36,37,38,39,40,48,55,57,66,67],$Vg=[5,6,8,14,35,36,37,38,39,40,48,66,67],$Vh=[1,51],$Vi=[1,52],$Vj=[1,53],$Vk=[1,54],$Vl=[1,55],$Vm=[1,56],$Vn=[1,57],$Vo=[57,58],$Vp=[1,69],$Vq=[1,65],$Vr=[1,66],$Vs=[1,67],$Vt=[1,68],$Vu=[1,70],$Vv=[1,74],$Vw=[1,75],$Vx=[1,72],$Vy=[1,73],$Vz=[5,8,14,35,36,37,38,39,40,48,66,67];\nvar parser = {trace: function trace () { },\nyy: {},\nsymbols_: {\"error\":2,\"start\":3,\"directive\":4,\"NEWLINE\":5,\"RD\":6,\"diagram\":7,\"EOF\":8,\"openDirective\":9,\"typeDirective\":10,\"closeDirective\":11,\":\":12,\"argDirective\":13,\"open_directive\":14,\"type_directive\":15,\"arg_directive\":16,\"close_directive\":17,\"requirementDef\":18,\"elementDef\":19,\"relationshipDef\":20,\"requirementType\":21,\"requirementName\":22,\"STRUCT_START\":23,\"requirementBody\":24,\"ID\":25,\"COLONSEP\":26,\"id\":27,\"TEXT\":28,\"text\":29,\"RISK\":30,\"riskLevel\":31,\"VERIFYMTHD\":32,\"verifyType\":33,\"STRUCT_STOP\":34,\"REQUIREMENT\":35,\"FUNCTIONAL_REQUIREMENT\":36,\"INTERFACE_REQUIREMENT\":37,\"PERFORMANCE_REQUIREMENT\":38,\"PHYSICAL_REQUIREMENT\":39,\"DESIGN_CONSTRAINT\":40,\"LOW_RISK\":41,\"MED_RISK\":42,\"HIGH_RISK\":43,\"VERIFY_ANALYSIS\":44,\"VERIFY_DEMONSTRATION\":45,\"VERIFY_INSPECTION\":46,\"VERIFY_TEST\":47,\"ELEMENT\":48,\"elementName\":49,\"elementBody\":50,\"TYPE\":51,\"type\":52,\"DOCREF\":53,\"ref\":54,\"END_ARROW_L\":55,\"relationship\":56,\"LINE\":57,\"END_ARROW_R\":58,\"CONTAINS\":59,\"COPIES\":60,\"DERIVES\":61,\"SATISFIES\":62,\"VERIFIES\":63,\"REFINES\":64,\"TRACES\":65,\"unqString\":66,\"qString\":67,\"$accept\":0,\"$end\":1},\nterminals_: {2:\"error\",5:\"NEWLINE\",6:\"RD\",8:\"EOF\",12:\":\",14:\"open_directive\",15:\"type_directive\",16:\"arg_directive\",17:\"close_directive\",23:\"STRUCT_START\",25:\"ID\",26:\"COLONSEP\",28:\"TEXT\",30:\"RISK\",32:\"VERIFYMTHD\",34:\"STRUCT_STOP\",35:\"REQUIREMENT\",36:\"FUNCTIONAL_REQUIREMENT\",37:\"INTERFACE_REQUIREMENT\",38:\"PERFORMANCE_REQUIREMENT\",39:\"PHYSICAL_REQUIREMENT\",40:\"DESIGN_CONSTRAINT\",41:\"LOW_RISK\",42:\"MED_RISK\",43:\"HIGH_RISK\",44:\"VERIFY_ANALYSIS\",45:\"VERIFY_DEMONSTRATION\",46:\"VERIFY_INSPECTION\",47:\"VERIFY_TEST\",48:\"ELEMENT\",51:\"TYPE\",53:\"DOCREF\",55:\"END_ARROW_L\",57:\"LINE\",58:\"END_ARROW_R\",59:\"CONTAINS\",60:\"COPIES\",61:\"DERIVES\",62:\"SATISFIES\",63:\"VERIFIES\",64:\"REFINES\",65:\"TRACES\",66:\"unqString\",67:\"qString\"},\nproductions_: [0,[3,3],[3,2],[3,4],[4,3],[4,5],[9,1],[10,1],[13,1],[11,1],[7,0],[7,2],[7,2],[7,2],[7,2],[7,2],[18,5],[24,5],[24,5],[24,5],[24,5],[24,2],[24,1],[21,1],[21,1],[21,1],[21,1],[21,1],[21,1],[31,1],[31,1],[31,1],[33,1],[33,1],[33,1],[33,1],[19,5],[50,5],[50,5],[50,2],[50,1],[20,5],[20,5],[56,1],[56,1],[56,1],[56,1],[56,1],[56,1],[56,1],[22,1],[22,1],[27,1],[27,1],[29,1],[29,1],[49,1],[49,1],[52,1],[52,1],[54,1],[54,1]],\nperformAction: function anonymous(yytext, yyleng, yylineno, yy, yystate /* action[1] */, $$ /* vstack */, _$ /* lstack */) {\n/* this == yyval */\n\nvar $0 = $$.length - 1;\nswitch (yystate) {\ncase 6:\n yy.parseDirective('%%{', 'open_directive'); \nbreak;\ncase 7:\n yy.parseDirective($$[$0], 'type_directive'); \nbreak;\ncase 8:\n $$[$0] = $$[$0].trim().replace(/'/g, '\"'); yy.parseDirective($$[$0], 'arg_directive'); \nbreak;\ncase 9:\n yy.parseDirective('}%%', 'close_directive', 'pie'); \nbreak;\ncase 10:\n this.$ = [] \nbreak;\ncase 16:\n yy.addRequirement($$[$0-3], $$[$0-4]) \nbreak;\ncase 17:\n yy.setNewReqId($$[$0-2]); \nbreak;\ncase 18:\n yy.setNewReqText($$[$0-2]); \nbreak;\ncase 19:\n yy.setNewReqRisk($$[$0-2]); \nbreak;\ncase 20:\n yy.setNewReqVerifyMethod($$[$0-2]); \nbreak;\ncase 23:\n this.$=yy.RequirementType.REQUIREMENT;\nbreak;\ncase 24:\n this.$=yy.RequirementType.FUNCTIONAL_REQUIREMENT;\nbreak;\ncase 25:\n this.$=yy.RequirementType.INTERFACE_REQUIREMENT;\nbreak;\ncase 26:\n this.$=yy.RequirementType.PERFORMANCE_REQUIREMENT;\nbreak;\ncase 27:\n this.$=yy.RequirementType.PHYSICAL_REQUIREMENT;\nbreak;\ncase 28:\n this.$=yy.RequirementType.DESIGN_CONSTRAINT;\nbreak;\ncase 29:\n this.$=yy.RiskLevel.LOW_RISK;\nbreak;\ncase 30:\n this.$=yy.RiskLevel.MED_RISK;\nbreak;\ncase 31:\n this.$=yy.RiskLevel.HIGH_RISK;\nbreak;\ncase 32:\n this.$=yy.VerifyType.VERIFY_ANALYSIS;\nbreak;\ncase 33:\n this.$=yy.VerifyType.VERIFY_DEMONSTRATION;\nbreak;\ncase 34:\n this.$=yy.VerifyType.VERIFY_INSPECTION;\nbreak;\ncase 35:\n this.$=yy.VerifyType.VERIFY_TEST;\nbreak;\ncase 36:\n yy.addElement($$[$0-3]) \nbreak;\ncase 37:\n yy.setNewElementType($$[$0-2]); \nbreak;\ncase 38:\n yy.setNewElementDocRef($$[$0-2]); \nbreak;\ncase 41:\n  yy.addRelationship($$[$0-2], $$[$0], $$[$0-4]) \nbreak;\ncase 42:\n yy.addRelationship($$[$0-2], $$[$0-4], $$[$0]) \nbreak;\ncase 43:\n this.$=yy.Relationships.CONTAINS;\nbreak;\ncase 44:\n this.$=yy.Relationships.COPIES;\nbreak;\ncase 45:\n this.$=yy.Relationships.DERIVES;\nbreak;\ncase 46:\n this.$=yy.Relationships.SATISFIES;\nbreak;\ncase 47:\n this.$=yy.Relationships.VERIFIES;\nbreak;\ncase 48:\n this.$=yy.Relationships.REFINES;\nbreak;\ncase 49:\n this.$=yy.Relationships.TRACES;\nbreak;\n}\n},\ntable: [{3:1,4:2,6:$V0,9:4,14:$V1},{1:[3]},{3:7,4:2,5:[1,6],6:$V0,9:4,14:$V1},{5:[1,8]},{10:9,15:[1,10]},{15:[2,6]},{3:11,4:2,6:$V0,9:4,14:$V1},{1:[2,2]},{4:16,5:$V2,7:12,8:$V3,9:4,14:$V1,18:13,19:14,20:15,21:18,27:20,35:$V4,36:$V5,37:$V6,38:$V7,39:$V8,40:$V9,48:$Va,66:$Vb,67:$Vc},{11:29,12:[1,30],17:$Vd},o([12,17],[2,7]),{1:[2,1]},{8:[1,32]},{4:16,5:$V2,7:33,8:$V3,9:4,14:$V1,18:13,19:14,20:15,21:18,27:20,35:$V4,36:$V5,37:$V6,38:$V7,39:$V8,40:$V9,48:$Va,66:$Vb,67:$Vc},{4:16,5:$V2,7:34,8:$V3,9:4,14:$V1,18:13,19:14,20:15,21:18,27:20,35:$V4,36:$V5,37:$V6,38:$V7,39:$V8,40:$V9,48:$Va,66:$Vb,67:$Vc},{4:16,5:$V2,7:35,8:$V3,9:4,14:$V1,18:13,19:14,20:15,21:18,27:20,35:$V4,36:$V5,37:$V6,38:$V7,39:$V8,40:$V9,48:$Va,66:$Vb,67:$Vc},{4:16,5:$V2,7:36,8:$V3,9:4,14:$V1,18:13,19:14,20:15,21:18,27:20,35:$V4,36:$V5,37:$V6,38:$V7,39:$V8,40:$V9,48:$Va,66:$Vb,67:$Vc},{4:16,5:$V2,7:37,8:$V3,9:4,14:$V1,18:13,19:14,20:15,21:18,27:20,35:$V4,36:$V5,37:$V6,38:$V7,39:$V8,40:$V9,48:$Va,66:$Vb,67:$Vc},{22:38,66:[1,39],67:[1,40]},{49:41,66:[1,42],67:[1,43]},{55:[1,44],57:[1,45]},o($Ve,[2,23]),o($Ve,[2,24]),o($Ve,[2,25]),o($Ve,[2,26]),o($Ve,[2,27]),o($Ve,[2,28]),o($Vf,[2,52]),o($Vf,[2,53]),o($Vg,[2,4]),{13:46,16:[1,47]},o($Vg,[2,9]),{1:[2,3]},{8:[2,11]},{8:[2,12]},{8:[2,13]},{8:[2,14]},{8:[2,15]},{23:[1,48]},{23:[2,50]},{23:[2,51]},{23:[1,49]},{23:[2,56]},{23:[2,57]},{56:50,59:$Vh,60:$Vi,61:$Vj,62:$Vk,63:$Vl,64:$Vm,65:$Vn},{56:58,59:$Vh,60:$Vi,61:$Vj,62:$Vk,63:$Vl,64:$Vm,65:$Vn},{11:59,17:$Vd},{17:[2,8]},{5:[1,60]},{5:[1,61]},{57:[1,62]},o($Vo,[2,43]),o($Vo,[2,44]),o($Vo,[2,45]),o($Vo,[2,46]),o($Vo,[2,47]),o($Vo,[2,48]),o($Vo,[2,49]),{58:[1,63]},o($Vg,[2,5]),{5:$Vp,24:64,25:$Vq,28:$Vr,30:$Vs,32:$Vt,34:$Vu},{5:$Vv,34:$Vw,50:71,51:$Vx,53:$Vy},{27:76,66:$Vb,67:$Vc},{27:77,66:$Vb,67:$Vc},o($Vz,[2,16]),{26:[1,78]},{26:[1,79]},{26:[1,80]},{26:[1,81]},{5:$Vp,24:82,25:$Vq,28:$Vr,30:$Vs,32:$Vt,34:$Vu},o($Vz,[2,22]),o($Vz,[2,36]),{26:[1,83]},{26:[1,84]},{5:$Vv,34:$Vw,50:85,51:$Vx,53:$Vy},o($Vz,[2,40]),o($Vz,[2,41]),o($Vz,[2,42]),{27:86,66:$Vb,67:$Vc},{29:87,66:[1,88],67:[1,89]},{31:90,41:[1,91],42:[1,92],43:[1,93]},{33:94,44:[1,95],45:[1,96],46:[1,97],47:[1,98]},o($Vz,[2,21]),{52:99,66:[1,100],67:[1,101]},{54:102,66:[1,103],67:[1,104]},o($Vz,[2,39]),{5:[1,105]},{5:[1,106]},{5:[2,54]},{5:[2,55]},{5:[1,107]},{5:[2,29]},{5:[2,30]},{5:[2,31]},{5:[1,108]},{5:[2,32]},{5:[2,33]},{5:[2,34]},{5:[2,35]},{5:[1,109]},{5:[2,58]},{5:[2,59]},{5:[1,110]},{5:[2,60]},{5:[2,61]},{5:$Vp,24:111,25:$Vq,28:$Vr,30:$Vs,32:$Vt,34:$Vu},{5:$Vp,24:112,25:$Vq,28:$Vr,30:$Vs,32:$Vt,34:$Vu},{5:$Vp,24:113,25:$Vq,28:$Vr,30:$Vs,32:$Vt,34:$Vu},{5:$Vp,24:114,25:$Vq,28:$Vr,30:$Vs,32:$Vt,34:$Vu},{5:$Vv,34:$Vw,50:115,51:$Vx,53:$Vy},{5:$Vv,34:$Vw,50:116,51:$Vx,53:$Vy},o($Vz,[2,17]),o($Vz,[2,18]),o($Vz,[2,19]),o($Vz,[2,20]),o($Vz,[2,37]),o($Vz,[2,38])],\ndefaultActions: {5:[2,6],7:[2,2],11:[2,1],32:[2,3],33:[2,11],34:[2,12],35:[2,13],36:[2,14],37:[2,15],39:[2,50],40:[2,51],42:[2,56],43:[2,57],47:[2,8],88:[2,54],89:[2,55],91:[2,29],92:[2,30],93:[2,31],95:[2,32],96:[2,33],97:[2,34],98:[2,35],100:[2,58],101:[2,59],103:[2,60],104:[2,61]},\nparseError: function parseError (str, hash) {\n    if (hash.recoverable) {\n        this.trace(str);\n    } else {\n        var error = new Error(str);\n        error.hash = hash;\n        throw error;\n    }\n},\nparse: function parse(input) {\n    var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = '', yylineno = 0, yyleng = 0, recovering = 0, TERROR = 2, EOF = 1;\n    var args = lstack.slice.call(arguments, 1);\n    var lexer = Object.create(this.lexer);\n    var sharedState = { yy: {} };\n    for (var k in this.yy) {\n        if (Object.prototype.hasOwnProperty.call(this.yy, k)) {\n            sharedState.yy[k] = this.yy[k];\n        }\n    }\n    lexer.setInput(input, sharedState.yy);\n    sharedState.yy.lexer = lexer;\n    sharedState.yy.parser = this;\n    if (typeof lexer.yylloc == 'undefined') {\n        lexer.yylloc = {};\n    }\n    var yyloc = lexer.yylloc;\n    lstack.push(yyloc);\n    var ranges = lexer.options && lexer.options.ranges;\n    if (typeof sharedState.yy.parseError === 'function') {\n        this.parseError = sharedState.yy.parseError;\n    } else {\n        this.parseError = Object.getPrototypeOf(this).parseError;\n    }\n    function popStack(n) {\n        stack.length = stack.length - 2 * n;\n        vstack.length = vstack.length - n;\n        lstack.length = lstack.length - n;\n    }\n            function lex() {\n            var token;\n            token = tstack.pop() || lexer.lex() || EOF;\n            if (typeof token !== 'number') {\n                if (token instanceof Array) {\n                    tstack = token;\n                    token = tstack.pop();\n                }\n                token = self.symbols_[token] || token;\n            }\n            return token;\n        }\n    var symbol, preErrorSymbol, state, action, a, r, yyval = {}, p, len, newState, expected;\n    while (true) {\n        state = stack[stack.length - 1];\n        if (this.defaultActions[state]) {\n            action = this.defaultActions[state];\n        } else {\n            if (symbol === null || typeof symbol == 'undefined') {\n                symbol = lex();\n            }\n            action = table[state] && table[state][symbol];\n        }\n        if (typeof action === 'undefined' || !action.length || !action[0]) {\n            var errStr = '';\n            expected = [];\n            for (p in table[state]) {\n                if (this.terminals_[p] && p > TERROR) {\n                    expected.push('\\'' + this.terminals_[p] + '\\'');\n                }\n            }\n            if (lexer.showPosition) {\n                errStr = 'Parse error on line ' + (yylineno + 1) + ':\\n' + lexer.showPosition() + '\\nExpecting ' + expected.join(', ') + ', got \\'' + (this.terminals_[symbol] || symbol) + '\\'';\n            } else {\n                errStr = 'Parse error on line ' + (yylineno + 1) + ': Unexpected ' + (symbol == EOF ? 'end of input' : '\\'' + (this.terminals_[symbol] || symbol) + '\\'');\n            }\n            this.parseError(errStr, {\n                text: lexer.match,\n                token: this.terminals_[symbol] || symbol,\n                line: lexer.yylineno,\n                loc: yyloc,\n                expected: expected\n            });\n        }\n        if (action[0] instanceof Array && action.length > 1) {\n            throw new Error('Parse Error: multiple actions possible at state: ' + state + ', token: ' + symbol);\n        }\n        switch (action[0]) {\n        case 1:\n            stack.push(symbol);\n            vstack.push(lexer.yytext);\n            lstack.push(lexer.yylloc);\n            stack.push(action[1]);\n            symbol = null;\n            if (!preErrorSymbol) {\n                yyleng = lexer.yyleng;\n                yytext = lexer.yytext;\n                yylineno = lexer.yylineno;\n                yyloc = lexer.yylloc;\n                if (recovering > 0) {\n                    recovering--;\n                }\n            } else {\n                symbol = preErrorSymbol;\n                preErrorSymbol = null;\n            }\n            break;\n        case 2:\n            len = this.productions_[action[1]][1];\n            yyval.$ = vstack[vstack.length - len];\n            yyval._$ = {\n                first_line: lstack[lstack.length - (len || 1)].first_line,\n                last_line: lstack[lstack.length - 1].last_line,\n                first_column: lstack[lstack.length - (len || 1)].first_column,\n                last_column: lstack[lstack.length - 1].last_column\n            };\n            if (ranges) {\n                yyval._$.range = [\n                    lstack[lstack.length - (len || 1)].range[0],\n                    lstack[lstack.length - 1].range[1]\n                ];\n            }\n            r = this.performAction.apply(yyval, [\n                yytext,\n                yyleng,\n                yylineno,\n                sharedState.yy,\n                action[1],\n                vstack,\n                lstack\n            ].concat(args));\n            if (typeof r !== 'undefined') {\n                return r;\n            }\n            if (len) {\n                stack = stack.slice(0, -1 * len * 2);\n                vstack = vstack.slice(0, -1 * len);\n                lstack = lstack.slice(0, -1 * len);\n            }\n            stack.push(this.productions_[action[1]][0]);\n            vstack.push(yyval.$);\n            lstack.push(yyval._$);\n            newState = table[stack[stack.length - 2]][stack[stack.length - 1]];\n            stack.push(newState);\n            break;\n        case 3:\n            return true;\n        }\n    }\n    return true;\n}};\n\n/* generated by jison-lex 0.3.4 */\nvar lexer = (function(){\nvar lexer = ({\n\nEOF:1,\n\nparseError:function parseError(str, hash) {\n        if (this.yy.parser) {\n            this.yy.parser.parseError(str, hash);\n        } else {\n            throw new Error(str);\n        }\n    },\n\n// resets the lexer, sets new input\nsetInput:function (input, yy) {\n        this.yy = yy || this.yy || {};\n        this._input = input;\n        this._more = this._backtrack = this.done = false;\n        this.yylineno = this.yyleng = 0;\n        this.yytext = this.matched = this.match = '';\n        this.conditionStack = ['INITIAL'];\n        this.yylloc = {\n            first_line: 1,\n            first_column: 0,\n            last_line: 1,\n            last_column: 0\n        };\n        if (this.options.ranges) {\n            this.yylloc.range = [0,0];\n        }\n        this.offset = 0;\n        return this;\n    },\n\n// consumes and returns one char from the input\ninput:function () {\n        var ch = this._input[0];\n        this.yytext += ch;\n        this.yyleng++;\n        this.offset++;\n        this.match += ch;\n        this.matched += ch;\n        var lines = ch.match(/(?:\\r\\n?|\\n).*/g);\n        if (lines) {\n            this.yylineno++;\n            this.yylloc.last_line++;\n        } else {\n            this.yylloc.last_column++;\n        }\n        if (this.options.ranges) {\n            this.yylloc.range[1]++;\n        }\n\n        this._input = this._input.slice(1);\n        return ch;\n    },\n\n// unshifts one char (or a string) into the input\nunput:function (ch) {\n        var len = ch.length;\n        var lines = ch.split(/(?:\\r\\n?|\\n)/g);\n\n        this._input = ch + this._input;\n        this.yytext = this.yytext.substr(0, this.yytext.length - len);\n        //this.yyleng -= len;\n        this.offset -= len;\n        var oldLines = this.match.split(/(?:\\r\\n?|\\n)/g);\n        this.match = this.match.substr(0, this.match.length - 1);\n        this.matched = this.matched.substr(0, this.matched.length - 1);\n\n        if (lines.length - 1) {\n            this.yylineno -= lines.length - 1;\n        }\n        var r = this.yylloc.range;\n\n        this.yylloc = {\n            first_line: this.yylloc.first_line,\n            last_line: this.yylineno + 1,\n            first_column: this.yylloc.first_column,\n            last_column: lines ?\n                (lines.length === oldLines.length ? this.yylloc.first_column : 0)\n                 + oldLines[oldLines.length - lines.length].length - lines[0].length :\n              this.yylloc.first_column - len\n        };\n\n        if (this.options.ranges) {\n            this.yylloc.range = [r[0], r[0] + this.yyleng - len];\n        }\n        this.yyleng = this.yytext.length;\n        return this;\n    },\n\n// When called from action, caches matched text and appends it on next action\nmore:function () {\n        this._more = true;\n        return this;\n    },\n\n// When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead.\nreject:function () {\n        if (this.options.backtrack_lexer) {\n            this._backtrack = true;\n        } else {\n            return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\\n' + this.showPosition(), {\n                text: \"\",\n                token: null,\n                line: this.yylineno\n            });\n\n        }\n        return this;\n    },\n\n// retain first n characters of the match\nless:function (n) {\n        this.unput(this.match.slice(n));\n    },\n\n// displays already matched input, i.e. for error messages\npastInput:function () {\n        var past = this.matched.substr(0, this.matched.length - this.match.length);\n        return (past.length > 20 ? '...':'') + past.substr(-20).replace(/\\n/g, \"\");\n    },\n\n// displays upcoming input, i.e. for error messages\nupcomingInput:function () {\n        var next = this.match;\n        if (next.length < 20) {\n            next += this._input.substr(0, 20-next.length);\n        }\n        return (next.substr(0,20) + (next.length > 20 ? '...' : '')).replace(/\\n/g, \"\");\n    },\n\n// displays the character position where the lexing error occurred, i.e. for error messages\nshowPosition:function () {\n        var pre = this.pastInput();\n        var c = new Array(pre.length + 1).join(\"-\");\n        return pre + this.upcomingInput() + \"\\n\" + c + \"^\";\n    },\n\n// test the lexed token: return FALSE when not a match, otherwise return token\ntest_match:function(match, indexed_rule) {\n        var token,\n            lines,\n            backup;\n\n        if (this.options.backtrack_lexer) {\n            // save context\n            backup = {\n                yylineno: this.yylineno,\n                yylloc: {\n                    first_line: this.yylloc.first_line,\n                    last_line: this.last_line,\n                    first_column: this.yylloc.first_column,\n                    last_column: this.yylloc.last_column\n                },\n                yytext: this.yytext,\n                match: this.match,\n                matches: this.matches,\n                matched: this.matched,\n                yyleng: this.yyleng,\n                offset: this.offset,\n                _more: this._more,\n                _input: this._input,\n                yy: this.yy,\n                conditionStack: this.conditionStack.slice(0),\n                done: this.done\n            };\n            if (this.options.ranges) {\n                backup.yylloc.range = this.yylloc.range.slice(0);\n            }\n        }\n\n        lines = match[0].match(/(?:\\r\\n?|\\n).*/g);\n        if (lines) {\n            this.yylineno += lines.length;\n        }\n        this.yylloc = {\n            first_line: this.yylloc.last_line,\n            last_line: this.yylineno + 1,\n            first_column: this.yylloc.last_column,\n            last_column: lines ?\n                         lines[lines.length - 1].length - lines[lines.length - 1].match(/\\r?\\n?/)[0].length :\n                         this.yylloc.last_column + match[0].length\n        };\n        this.yytext += match[0];\n        this.match += match[0];\n        this.matches = match;\n        this.yyleng = this.yytext.length;\n        if (this.options.ranges) {\n            this.yylloc.range = [this.offset, this.offset += this.yyleng];\n        }\n        this._more = false;\n        this._backtrack = false;\n        this._input = this._input.slice(match[0].length);\n        this.matched += match[0];\n        token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]);\n        if (this.done && this._input) {\n            this.done = false;\n        }\n        if (token) {\n            return token;\n        } else if (this._backtrack) {\n            // recover context\n            for (var k in backup) {\n                this[k] = backup[k];\n            }\n            return false; // rule action called reject() implying the next rule should be tested instead.\n        }\n        return false;\n    },\n\n// return next match in input\nnext:function () {\n        if (this.done) {\n            return this.EOF;\n        }\n        if (!this._input) {\n            this.done = true;\n        }\n\n        var token,\n            match,\n            tempMatch,\n            index;\n        if (!this._more) {\n            this.yytext = '';\n            this.match = '';\n        }\n        var rules = this._currentRules();\n        for (var i = 0; i < rules.length; i++) {\n            tempMatch = this._input.match(this.rules[rules[i]]);\n            if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {\n                match = tempMatch;\n                index = i;\n                if (this.options.backtrack_lexer) {\n                    token = this.test_match(tempMatch, rules[i]);\n                    if (token !== false) {\n                        return token;\n                    } else if (this._backtrack) {\n                        match = false;\n                        continue; // rule action called reject() implying a rule MISmatch.\n                    } else {\n                        // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)\n                        return false;\n                    }\n                } else if (!this.options.flex) {\n                    break;\n                }\n            }\n        }\n        if (match) {\n            token = this.test_match(match, rules[index]);\n            if (token !== false) {\n                return token;\n            }\n            // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)\n            return false;\n        }\n        if (this._input === \"\") {\n            return this.EOF;\n        } else {\n            return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. Unrecognized text.\\n' + this.showPosition(), {\n                text: \"\",\n                token: null,\n                line: this.yylineno\n            });\n        }\n    },\n\n// return next match that has a token\nlex:function lex () {\n        var r = this.next();\n        if (r) {\n            return r;\n        } else {\n            return this.lex();\n        }\n    },\n\n// activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)\nbegin:function begin (condition) {\n        this.conditionStack.push(condition);\n    },\n\n// pop the previously active lexer condition state off the condition stack\npopState:function popState () {\n        var n = this.conditionStack.length - 1;\n        if (n > 0) {\n            return this.conditionStack.pop();\n        } else {\n            return this.conditionStack[0];\n        }\n    },\n\n// produce the lexer rule set which is active for the currently active lexer condition state\n_currentRules:function _currentRules () {\n        if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) {\n            return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;\n        } else {\n            return this.conditions[\"INITIAL\"].rules;\n        }\n    },\n\n// return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available\ntopState:function topState (n) {\n        n = this.conditionStack.length - 1 - Math.abs(n || 0);\n        if (n >= 0) {\n            return this.conditionStack[n];\n        } else {\n            return \"INITIAL\";\n        }\n    },\n\n// alias for begin(condition)\npushState:function pushState (condition) {\n        this.begin(condition);\n    },\n\n// return the number of states currently on the stack\nstateStackSize:function stateStackSize() {\n        return this.conditionStack.length;\n    },\noptions: {\"case-insensitive\":true},\nperformAction: function anonymous(yy,yy_,$avoiding_name_collisions,YY_START) {\nvar YYSTATE=YY_START;\nswitch($avoiding_name_collisions) {\ncase 0: this.begin('open_directive'); return 14; \nbreak;\ncase 1: this.begin('type_directive'); return 15; \nbreak;\ncase 2: this.popState(); this.begin('arg_directive'); return 12; \nbreak;\ncase 3: this.popState(); this.popState(); return 17; \nbreak;\ncase 4:return 16;\nbreak;\ncase 5:return 5;\nbreak;\ncase 6:/* skip all whitespace */\nbreak;\ncase 7:/* skip comments */\nbreak;\ncase 8:/* skip comments */\nbreak;\ncase 9:return 8;\nbreak;\ncase 10:return 6;\nbreak;\ncase 11:return 23;\nbreak;\ncase 12:return 34;\nbreak;\ncase 13:return 26;\nbreak;\ncase 14:return 25;\nbreak;\ncase 15:return 28;\nbreak;\ncase 16:return 30;\nbreak;\ncase 17:return 32;\nbreak;\ncase 18:return 35;\nbreak;\ncase 19:return 36;\nbreak;\ncase 20:return 37;\nbreak;\ncase 21:return 38;\nbreak;\ncase 22:return 39;\nbreak;\ncase 23:return 40;\nbreak;\ncase 24:return 41;\nbreak;\ncase 25:return 42;\nbreak;\ncase 26:return 43;\nbreak;\ncase 27:return 44;\nbreak;\ncase 28:return 45;\nbreak;\ncase 29:return 46;\nbreak;\ncase 30:return 47;\nbreak;\ncase 31:return 48;\nbreak;\ncase 32:return 59;\nbreak;\ncase 33:return 60;\nbreak;\ncase 34:return 61;\nbreak;\ncase 35:return 62;\nbreak;\ncase 36:return 63;\nbreak;\ncase 37:return 64;\nbreak;\ncase 38:return 65;\nbreak;\ncase 39:return 51;\nbreak;\ncase 40:return 53;\nbreak;\ncase 41:return 55;\nbreak;\ncase 42:return 58;\nbreak;\ncase 43:return 57;\nbreak;\ncase 44: this.begin(\"string\"); \nbreak;\ncase 45: this.popState(); \nbreak;\ncase 46: return \"qString\"; \nbreak;\ncase 47: yy_.yytext = yy_.yytext.trim(); return 66;\nbreak;\n}\n},\nrules: [/^(?:%%\\{)/i,/^(?:((?:(?!\\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\\}%%)/i,/^(?:((?:(?!\\}%%).|\\n)*))/i,/^(?:(\\r?\\n)+)/i,/^(?:\\s+)/i,/^(?:#[^\\n]*)/i,/^(?:%[^\\n]*)/i,/^(?:$)/i,/^(?:requirementDiagram\\b)/i,/^(?:\\{)/i,/^(?:\\})/i,/^(?::)/i,/^(?:id\\b)/i,/^(?:text\\b)/i,/^(?:risk\\b)/i,/^(?:verifyMethod\\b)/i,/^(?:requirement\\b)/i,/^(?:functionalRequirement\\b)/i,/^(?:interfaceRequirement\\b)/i,/^(?:performanceRequirement\\b)/i,/^(?:physicalRequirement\\b)/i,/^(?:designConstraint\\b)/i,/^(?:low\\b)/i,/^(?:medium\\b)/i,/^(?:high\\b)/i,/^(?:analysis\\b)/i,/^(?:demonstration\\b)/i,/^(?:inspection\\b)/i,/^(?:test\\b)/i,/^(?:element\\b)/i,/^(?:contains\\b)/i,/^(?:copies\\b)/i,/^(?:derives\\b)/i,/^(?:satisfies\\b)/i,/^(?:verifies\\b)/i,/^(?:refines\\b)/i,/^(?:traces\\b)/i,/^(?:type\\b)/i,/^(?:docref\\b)/i,/^(?:<-)/i,/^(?:->)/i,/^(?:-)/i,/^(?:[\"])/i,/^(?:[\"])/i,/^(?:[^\"]*)/i,/^(?:[\\w][^\\r\\n\\{\\<\\>\\-\\=]*)/i],\nconditions: {\"close_directive\":{\"rules\":[],\"inclusive\":false},\"arg_directive\":{\"rules\":[3,4],\"inclusive\":false},\"type_directive\":{\"rules\":[2,3],\"inclusive\":false},\"open_directive\":{\"rules\":[1],\"inclusive\":false},\"unqString\":{\"rules\":[],\"inclusive\":false},\"token\":{\"rules\":[],\"inclusive\":false},\"string\":{\"rules\":[45,46],\"inclusive\":false},\"INITIAL\":{\"rules\":[0,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,47],\"inclusive\":true}}\n});\nreturn lexer;\n})();\nparser.lexer = lexer;\nfunction Parser () {\n  this.yy = {};\n}\nParser.prototype = parser;parser.Parser = Parser;\nreturn new Parser;\n})();\n\n\nif (true) {\nexports.parser = parser;\nexports.Parser = parser.Parser;\nexports.parse = function () { return parser.parse.apply(parser, arguments); };\nexports.main = function commonjsMain (args) {\n    if (!args[1]) {\n        console.log('Usage: '+args[0]+' FILE');\n        process.exit(1);\n    }\n    var source = __webpack_require__(/*! fs */ \"./node_modules/node-libs-browser/mock/empty.js\").readFileSync(__webpack_require__(/*! path */ \"./node_modules/path-browserify/index.js\").normalize(args[1]), \"utf8\");\n    return exports.parser.parse(source);\n};\nif ( true && __webpack_require__.c[__webpack_require__.s] === module) {\n  exports.main(process.argv.slice(1));\n}\n}\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../node_modules/process/browser.js */ \"./node_modules/process/browser.js\"), __webpack_require__(/*! ./../../../../node_modules/webpack/buildin/module.js */ \"./node_modules/webpack/buildin/module.js\")(module)))\n\n/***/ }),\n\n/***/ \"./src/diagrams/requirement/requirementDb.js\":\n/*!***************************************************!*\\\n  !*** ./src/diagrams/requirement/requirementDb.js ***!\n  \\***************************************************/\n/*! exports provided: parseDirective, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"parseDirective\", function() { return parseDirective; });\n/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../config */ \"./src/config.js\");\n/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../logger */ \"./src/logger.js\");\n/* harmony import */ var _mermaidAPI__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../mermaidAPI */ \"./src/mermaidAPI.js\");\n\n\n\nvar relations = [];\nvar latestRequirement = {};\nvar requirements = {};\nvar latestElement = {};\nvar elements = {};\nvar RequirementType = {\n  REQUIREMENT: 'Requirement',\n  FUNCTIONAL_REQUIREMENT: 'Functional Requirement',\n  INTERFACE_REQUIREMENT: 'Interface Requirement',\n  PERFORMANCE_REQUIREMENT: 'Performance Requirement',\n  PHYSICAL_REQUIREMENT: 'Physical Requirement',\n  DESIGN_CONSTRAINT: 'Design Constraint'\n};\nvar RiskLevel = {\n  LOW_RISK: 'Low',\n  MED_RISK: 'Medium',\n  HIGH_RISK: 'High'\n};\nvar VerifyType = {\n  VERIFY_ANALYSIS: 'Analysis',\n  VERIFY_DEMONSTRATION: 'Demonstration',\n  VERIFY_INSPECTION: 'Inspection',\n  VERIFY_TEST: 'Test'\n};\nvar Relationships = {\n  CONTAINS: 'contains',\n  COPIES: 'copies',\n  DERIVES: 'derives',\n  SATISFIES: 'satisfies',\n  VERIFIES: 'verifies',\n  REFINES: 'refines',\n  TRACES: 'traces'\n};\nvar parseDirective = function parseDirective(statement, context, type) {\n  _mermaidAPI__WEBPACK_IMPORTED_MODULE_2__[\"default\"].parseDirective(this, statement, context, type);\n};\n\nvar addRequirement = function addRequirement(name, type) {\n  if (typeof requirements[name] === 'undefined') {\n    requirements[name] = {\n      name: name,\n      type: type,\n      id: latestRequirement.id,\n      text: latestRequirement.text,\n      risk: latestRequirement.risk,\n      verifyMethod: latestRequirement.verifyMethod\n    };\n  }\n\n  latestRequirement = {};\n  return requirements[name];\n};\n\nvar getRequirements = function getRequirements() {\n  return requirements;\n};\n\nvar setNewReqId = function setNewReqId(id) {\n  if (typeof latestRequirement != 'undefined') {\n    latestRequirement.id = id;\n  }\n};\n\nvar setNewReqText = function setNewReqText(text) {\n  if (typeof latestRequirement != 'undefined') {\n    latestRequirement.text = text;\n  }\n};\n\nvar setNewReqRisk = function setNewReqRisk(risk) {\n  if (typeof latestRequirement != 'undefined') {\n    latestRequirement.risk = risk;\n  }\n};\n\nvar setNewReqVerifyMethod = function setNewReqVerifyMethod(verifyMethod) {\n  if (typeof latestRequirement != 'undefined') {\n    latestRequirement.verifyMethod = verifyMethod;\n  }\n};\n\nvar addElement = function addElement(name) {\n  if (typeof elements[name] === 'undefined') {\n    elements[name] = {\n      name: name,\n      type: latestElement.type,\n      docRef: latestElement.docRef\n    };\n    _logger__WEBPACK_IMPORTED_MODULE_1__[\"log\"].info('Added new requirement: ', name);\n  }\n\n  latestElement = {};\n  return elements[name];\n};\n\nvar getElements = function getElements() {\n  return elements;\n};\n\nvar setNewElementType = function setNewElementType(type) {\n  if (typeof latestElement != 'undefined') {\n    latestElement.type = type;\n  }\n};\n\nvar setNewElementDocRef = function setNewElementDocRef(docRef) {\n  if (typeof latestElement != 'undefined') {\n    latestElement.docRef = docRef;\n  }\n};\n\nvar addRelationship = function addRelationship(type, src, dst) {\n  relations.push({\n    type: type,\n    src: src,\n    dst: dst\n  });\n};\n\nvar getRelationships = function getRelationships() {\n  return relations;\n};\n\nvar clear = function clear() {\n  relations = [];\n  latestRequirement = {};\n  requirements = {};\n  latestElement = {};\n  elements = {};\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n  RequirementType: RequirementType,\n  RiskLevel: RiskLevel,\n  VerifyType: VerifyType,\n  Relationships: Relationships,\n  parseDirective: parseDirective,\n  getConfig: function getConfig() {\n    return _config__WEBPACK_IMPORTED_MODULE_0__[\"getConfig\"]().req;\n  },\n  addRequirement: addRequirement,\n  getRequirements: getRequirements,\n  setNewReqId: setNewReqId,\n  setNewReqText: setNewReqText,\n  setNewReqRisk: setNewReqRisk,\n  setNewReqVerifyMethod: setNewReqVerifyMethod,\n  addElement: addElement,\n  getElements: getElements,\n  setNewElementType: setNewElementType,\n  setNewElementDocRef: setNewElementDocRef,\n  addRelationship: addRelationship,\n  getRelationships: getRelationships,\n  clear: clear\n});\n\n/***/ }),\n\n/***/ \"./src/diagrams/requirement/requirementMarkers.js\":\n/*!********************************************************!*\\\n  !*** ./src/diagrams/requirement/requirementMarkers.js ***!\n  \\********************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\nvar ReqMarkers = {\n  CONTAINS: 'contains',\n  ARROW: 'arrow'\n};\n\nvar insertLineEndings = function insertLineEndings(parentNode, conf) {\n  var containsNode = parentNode.append('defs').append('marker').attr('id', ReqMarkers.CONTAINS + '_line_ending').attr('refX', 0).attr('refY', conf.line_height / 2).attr('markerWidth', conf.line_height).attr('markerHeight', conf.line_height).attr('orient', 'auto').append('g');\n  containsNode.append('circle').attr('cx', conf.line_height / 2).attr('cy', conf.line_height / 2).attr('r', conf.line_height / 2) // .attr('stroke', conf.rect_border_color)\n  // .attr('stroke-width', 1)\n  .attr('fill', 'none');\n  containsNode.append('line').attr('x1', 0).attr('x2', conf.line_height).attr('y1', conf.line_height / 2).attr('y2', conf.line_height / 2) // .attr('stroke', conf.rect_border_color)\n  .attr('stroke-width', 1);\n  containsNode.append('line').attr('y1', 0).attr('y2', conf.line_height).attr('x1', conf.line_height / 2).attr('x2', conf.line_height / 2) // .attr('stroke', conf.rect_border_color)\n  .attr('stroke-width', 1);\n  parentNode.append('defs').append('marker').attr('id', ReqMarkers.ARROW + '_line_ending').attr('refX', conf.line_height).attr('refY', 0.5 * conf.line_height).attr('markerWidth', conf.line_height).attr('markerHeight', conf.line_height).attr('orient', 'auto').append('path').attr('d', \"M0,0\\n      L\".concat(conf.line_height, \",\").concat(conf.line_height / 2, \"\\n      M\").concat(conf.line_height, \",\").concat(conf.line_height / 2, \"\\n      L0,\").concat(conf.line_height)).attr('stroke-width', 1); // .attr('stroke', conf.rect_border_color);\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n  ReqMarkers: ReqMarkers,\n  insertLineEndings: insertLineEndings\n});\n\n/***/ }),\n\n/***/ \"./src/diagrams/requirement/requirementRenderer.js\":\n/*!*********************************************************!*\\\n  !*** ./src/diagrams/requirement/requirementRenderer.js ***!\n  \\*********************************************************/\n/*! exports provided: setConf, drawReqs, drawElements, draw, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"setConf\", function() { return setConf; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"drawReqs\", function() { return drawReqs; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"drawElements\", function() { return drawElements; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"draw\", function() { return draw; });\n/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3 */ \"./node_modules/d3/src/index.js\");\n/* harmony import */ var dagre__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! dagre */ \"./node_modules/dagre/index.js\");\n/* harmony import */ var dagre__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(dagre__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var graphlib__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! graphlib */ \"./node_modules/graphlib/index.js\");\n/* harmony import */ var graphlib__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(graphlib__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../logger */ \"./src/logger.js\");\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../utils */ \"./src/utils.js\");\n/* harmony import */ var _common_common__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../common/common */ \"./src/diagrams/common/common.js\");\n/* harmony import */ var _parser_requirementDiagram__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./parser/requirementDiagram */ \"./src/diagrams/requirement/parser/requirementDiagram.jison\");\n/* harmony import */ var _parser_requirementDiagram__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_parser_requirementDiagram__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _requirementDb__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./requirementDb */ \"./src/diagrams/requirement/requirementDb.js\");\n/* harmony import */ var _requirementMarkers__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./requirementMarkers */ \"./src/diagrams/requirement/requirementMarkers.js\");\n\n\n // import * as configApi from '../../config';\n\n\n\n\n\n\n\nvar conf = {};\nvar relCnt = 0;\nvar setConf = function setConf(cnf) {\n  if (typeof cnf === 'undefined') {\n    return;\n  }\n\n  var keys = Object.keys(cnf);\n\n  for (var i = 0; i < keys.length; i++) {\n    conf[keys[i]] = cnf[keys[i]];\n  }\n};\n\nvar newRectNode = function newRectNode(parentNode, id) {\n  return parentNode.insert('rect', '#' + id).attr('class', 'req reqBox').attr('x', 0).attr('y', 0).attr('width', conf.rect_min_width + 'px').attr('height', conf.rect_min_height + 'px');\n};\n\nvar newTitleNode = function newTitleNode(parentNode, id, txts) {\n  var x = conf.rect_min_width / 2;\n  var title = parentNode.append('text').attr('class', 'req reqLabel reqTitle').attr('id', id).attr('x', x).attr('y', conf.rect_padding).attr('dominant-baseline', 'hanging'); // .attr(\n  //   'style',\n  //   'font-family: ' + configApi.getConfig().fontFamily + '; font-size: ' + conf.fontSize + 'px'\n  // )\n\n  var i = 0;\n  txts.forEach(function (textStr) {\n    if (i == 0) {\n      title.append('tspan').attr('text-anchor', 'middle').attr('x', conf.rect_min_width / 2).attr('dy', 0).text(textStr);\n    } else {\n      title.append('tspan').attr('text-anchor', 'middle').attr('x', conf.rect_min_width / 2).attr('dy', conf.line_height * 0.75).text(textStr);\n    }\n\n    i++;\n  });\n  var yPadding = 1.5 * conf.rect_padding;\n  var linePadding = i * conf.line_height * 0.75;\n  var totalY = yPadding + linePadding;\n  parentNode.append('line').attr('class', 'req-title-line').attr('x1', '0').attr('x2', conf.rect_min_width).attr('y1', totalY).attr('y2', totalY);\n  return {\n    titleNode: title,\n    y: totalY\n  };\n};\n\nvar newBodyNode = function newBodyNode(parentNode, id, txts, yStart) {\n  var body = parentNode.append('text').attr('class', 'req reqLabel').attr('id', id).attr('x', conf.rect_padding).attr('y', yStart).attr('dominant-baseline', 'hanging'); // .attr(\n  //   'style',\n  //   'font-family: ' + configApi.getConfig().fontFamily + '; font-size: ' + conf.fontSize + 'px'\n  // );\n\n  var currentRow = 0;\n  var charLimit = 30;\n  var wrappedTxts = [];\n  txts.forEach(function (textStr) {\n    var currentTextLen = textStr.length;\n\n    while (currentTextLen > charLimit && currentRow < 3) {\n      var firstPart = textStr.substring(0, charLimit);\n      textStr = textStr.substring(charLimit, textStr.length);\n      currentTextLen = textStr.length;\n      wrappedTxts[wrappedTxts.length] = firstPart;\n      currentRow++;\n    }\n\n    if (currentRow == 3) {\n      var lastStr = wrappedTxts[wrappedTxts.length - 1];\n      wrappedTxts[wrappedTxts.length - 1] = lastStr.substring(0, lastStr.length - 4) + '...';\n    } else {\n      wrappedTxts[wrappedTxts.length] = textStr;\n    }\n\n    currentRow = 0;\n  });\n  wrappedTxts.forEach(function (textStr) {\n    body.append('tspan').attr('x', conf.rect_padding).attr('dy', conf.line_height).text(textStr);\n  });\n  return body;\n};\n\nvar addEdgeLabel = function addEdgeLabel(parentNode, svgPath, conf, txt) {\n  // Find the half-way point\n  var len = svgPath.node().getTotalLength();\n  var labelPoint = svgPath.node().getPointAtLength(len * 0.5); // Append a text node containing the label\n\n  var labelId = 'rel' + relCnt;\n  relCnt++;\n  var labelNode = parentNode.append('text').attr('class', 'req relationshipLabel').attr('id', labelId).attr('x', labelPoint.x).attr('y', labelPoint.y).attr('text-anchor', 'middle').attr('dominant-baseline', 'middle') // .attr('style', 'font-family: ' + conf.fontFamily + '; font-size: ' + conf.fontSize + 'px')\n  .text(txt); // Figure out how big the opaque 'container' rectangle needs to be\n\n  var labelBBox = labelNode.node().getBBox(); // Insert the opaque rectangle before the text label\n\n  parentNode.insert('rect', '#' + labelId).attr('class', 'req reqLabelBox').attr('x', labelPoint.x - labelBBox.width / 2).attr('y', labelPoint.y - labelBBox.height / 2).attr('width', labelBBox.width).attr('height', labelBBox.height).attr('fill', 'white').attr('fill-opacity', '85%');\n};\n\nvar drawRelationshipFromLayout = function drawRelationshipFromLayout(svg, rel, g, insert) {\n  // Find the edge relating to this relationship\n  var edge = g.edge(elementString(rel.src), elementString(rel.dst)); // Get a function that will generate the line path\n\n  var lineFunction = Object(d3__WEBPACK_IMPORTED_MODULE_0__[\"line\"])().x(function (d) {\n    return d.x;\n  }).y(function (d) {\n    return d.y;\n  }); // Insert the line at the right place\n\n  var svgPath = svg.insert('path', '#' + insert).attr('class', 'er relationshipLine').attr('d', lineFunction(edge.points)).attr('fill', 'none');\n\n  if (rel.type == _requirementDb__WEBPACK_IMPORTED_MODULE_7__[\"default\"].Relationships.CONTAINS) {\n    svgPath.attr('marker-start', 'url(' + _common_common__WEBPACK_IMPORTED_MODULE_5__[\"default\"].getUrl(conf.arrowMarkerAbsolute) + '#' + rel.type + '_line_ending' + ')');\n  } else {\n    svgPath.attr('stroke-dasharray', '10,7');\n    svgPath.attr('marker-end', 'url(' + _common_common__WEBPACK_IMPORTED_MODULE_5__[\"default\"].getUrl(conf.arrowMarkerAbsolute) + '#' + _requirementMarkers__WEBPACK_IMPORTED_MODULE_8__[\"default\"].ReqMarkers.ARROW + '_line_ending' + ')');\n  }\n\n  addEdgeLabel(svg, svgPath, conf, \"<<\".concat(rel.type, \">>\"));\n  return;\n};\n\nvar drawReqs = function drawReqs(reqs, graph, svgNode) {\n  Object.keys(reqs).forEach(function (reqName) {\n    var req = reqs[reqName];\n    reqName = elementString(reqName);\n    _logger__WEBPACK_IMPORTED_MODULE_3__[\"log\"].info('Added new requirement: ', reqName);\n    var groupNode = svgNode.append('g').attr('id', reqName);\n    var textId = 'req-' + reqName;\n    var rectNode = newRectNode(groupNode, textId);\n    var nodes = [];\n    var titleNodeInfo = newTitleNode(groupNode, reqName + '_title', [\"<<\".concat(req.type, \">>\"), \"\".concat(req.name)]);\n    nodes.push(titleNodeInfo.titleNode);\n    var bodyNode = newBodyNode(groupNode, reqName + '_body', [\"Id: \".concat(req.id), \"Text: \".concat(req.text), \"Risk: \".concat(req.risk), \"Verification: \".concat(req.verifyMethod)], titleNodeInfo.y);\n    nodes.push(bodyNode);\n    var rectBBox = rectNode.node().getBBox(); // Add the entity to the graph\n\n    graph.setNode(reqName, {\n      width: rectBBox.width,\n      height: rectBBox.height,\n      shape: 'rect',\n      id: reqName\n    });\n  });\n};\nvar drawElements = function drawElements(els, graph, svgNode) {\n  Object.keys(els).forEach(function (elName) {\n    var el = els[elName];\n    var id = elementString(elName);\n    var groupNode = svgNode.append('g').attr('id', id);\n    var textId = 'element-' + id;\n    var rectNode = newRectNode(groupNode, textId);\n    var nodes = [];\n    var titleNodeInfo = newTitleNode(groupNode, textId + '_title', [\"<<Element>>\", \"\".concat(elName)]);\n    nodes.push(titleNodeInfo.titleNode);\n    var bodyNode = newBodyNode(groupNode, textId + '_body', [\"Type: \".concat(el.type || 'Not Specified'), \"Doc Ref: \".concat(el.docRef || 'None')], titleNodeInfo.y);\n    nodes.push(bodyNode);\n    var rectBBox = rectNode.node().getBBox(); // Add the entity to the graph\n\n    graph.setNode(id, {\n      width: rectBBox.width,\n      height: rectBBox.height,\n      shape: 'rect',\n      id: id\n    });\n  });\n};\n\nvar addRelationships = function addRelationships(relationships, g) {\n  relationships.forEach(function (r) {\n    var src = elementString(r.src);\n    var dst = elementString(r.dst);\n    g.setEdge(src, dst, {\n      relationship: r\n    });\n  });\n  return relationships;\n};\n\nvar adjustEntities = function adjustEntities(svgNode, graph) {\n  graph.nodes().forEach(function (v) {\n    if (typeof v !== 'undefined' && typeof graph.node(v) !== 'undefined') {\n      svgNode.select('#' + v);\n      svgNode.select('#' + v).attr('transform', 'translate(' + (graph.node(v).x - graph.node(v).width / 2) + ',' + (graph.node(v).y - graph.node(v).height / 2) + ' )');\n    }\n  });\n  return;\n};\n\nvar elementString = function elementString(str) {\n  return str.replace(/\\s/g, '').replace(/\\./g, '_');\n};\n\nvar draw = function draw(text, id) {\n  _parser_requirementDiagram__WEBPACK_IMPORTED_MODULE_6__[\"parser\"].yy = _requirementDb__WEBPACK_IMPORTED_MODULE_7__[\"default\"];\n  _parser_requirementDiagram__WEBPACK_IMPORTED_MODULE_6__[\"parser\"].yy.clear();\n  _parser_requirementDiagram__WEBPACK_IMPORTED_MODULE_6__[\"parser\"].parse(text);\n  var svg = Object(d3__WEBPACK_IMPORTED_MODULE_0__[\"select\"])(\"[id='\".concat(id, \"']\"));\n  _requirementMarkers__WEBPACK_IMPORTED_MODULE_8__[\"default\"].insertLineEndings(svg, conf);\n  var g = new graphlib__WEBPACK_IMPORTED_MODULE_2___default.a.Graph({\n    multigraph: false,\n    compound: false,\n    directed: true\n  }).setGraph({\n    rankdir: conf.layoutDirection,\n    marginx: 20,\n    marginy: 20,\n    nodesep: 100,\n    edgesep: 100,\n    ranksep: 100\n  }).setDefaultEdgeLabel(function () {\n    return {};\n  });\n  var requirements = _requirementDb__WEBPACK_IMPORTED_MODULE_7__[\"default\"].getRequirements();\n  var elements = _requirementDb__WEBPACK_IMPORTED_MODULE_7__[\"default\"].getElements();\n  var relationships = _requirementDb__WEBPACK_IMPORTED_MODULE_7__[\"default\"].getRelationships();\n  drawReqs(requirements, g, svg);\n  drawElements(elements, g, svg);\n  addRelationships(relationships, g);\n  dagre__WEBPACK_IMPORTED_MODULE_1___default.a.layout(g);\n  adjustEntities(svg, g);\n  relationships.forEach(function (rel) {\n    drawRelationshipFromLayout(svg, rel, g, id);\n  }); // svg.attr('height', '500px');\n\n  var padding = conf.rect_padding;\n  var svgBounds = svg.node().getBBox();\n  var width = svgBounds.width + padding * 2;\n  var height = svgBounds.height + padding * 2;\n  Object(_utils__WEBPACK_IMPORTED_MODULE_4__[\"configureSvgSize\"])(svg, height, width, conf.useMaxWidth);\n  svg.attr('viewBox', \"\".concat(svgBounds.x - padding, \" \").concat(svgBounds.y - padding, \" \").concat(width, \" \").concat(height));\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n  setConf: setConf,\n  draw: draw\n});\n\n/***/ }),\n\n/***/ \"./src/diagrams/requirement/styles.js\":\n/*!********************************************!*\\\n  !*** ./src/diagrams/requirement/styles.js ***!\n  \\********************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\nvar getStyles = function getStyles(options) {\n  return \"\\n\\n  marker {\\n    fill: \".concat(options.relationColor, \";\\n    stroke: \").concat(options.relationColor, \";\\n  }\\n\\n  marker.cross {\\n    stroke: \").concat(options.lineColor, \";\\n  }\\n\\n  svg {\\n    font-family: \").concat(options.fontFamily, \";\\n    font-size: \").concat(options.fontSize, \";\\n  }\\n\\n  .reqBox {\\n    fill: \").concat(options.requirementBackground, \";\\n    fill-opacity: 100%;\\n    stroke: \").concat(options.requirementBorderColor, \";\\n    stroke-width: \").concat(options.requirementBorderSize, \";\\n  }\\n  \\n  .reqTitle, .reqLabel{\\n    fill:  \").concat(options.requirementTextColor, \";\\n  }\\n  .reqLabelBox {\\n    fill: \").concat(options.relationLabelBackground, \";\\n    fill-opacity: 100%;\\n  }\\n\\n  .req-title-line {\\n    stroke: \").concat(options.requirementBorderColor, \";\\n    stroke-width: \").concat(options.requirementBorderSize, \";\\n  }\\n  .relationshipLine {\\n    stroke: \").concat(options.relationColor, \";\\n    stroke-width: 1;\\n  }\\n  .relationshipLabel {\\n    fill: \").concat(options.relationLabelColor, \";\\n  }\\n\\n\");\n}; // fill', conf.rect_fill)\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (getStyles);\n\n/***/ }),\n\n/***/ \"./src/diagrams/sequence/parser/sequenceDiagram.jison\":\n/*!************************************************************!*\\\n  !*** ./src/diagrams/sequence/parser/sequenceDiagram.jison ***!\n  \\************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n/* WEBPACK VAR INJECTION */(function(process, module) {/* parser generated by jison 0.4.18 */\n/*\n  Returns a Parser object of the following structure:\n\n  Parser: {\n    yy: {}\n  }\n\n  Parser.prototype: {\n    yy: {},\n    trace: function(),\n    symbols_: {associative list: name ==> number},\n    terminals_: {associative list: number ==> name},\n    productions_: [...],\n    performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$),\n    table: [...],\n    defaultActions: {...},\n    parseError: function(str, hash),\n    parse: function(input),\n\n    lexer: {\n        EOF: 1,\n        parseError: function(str, hash),\n        setInput: function(input),\n        input: function(),\n        unput: function(str),\n        more: function(),\n        less: function(n),\n        pastInput: function(),\n        upcomingInput: function(),\n        showPosition: function(),\n        test_match: function(regex_match_array, rule_index),\n        next: function(),\n        lex: function(),\n        begin: function(condition),\n        popState: function(),\n        _currentRules: function(),\n        topState: function(),\n        pushState: function(condition),\n\n        options: {\n            ranges: boolean           (optional: true ==> token location info will include a .range[] member)\n            flex: boolean             (optional: true ==> flex-like lexing behaviour where the rules are tested exhaustively to find the longest match)\n            backtrack_lexer: boolean  (optional: true ==> lexer regexes are tested in order and for each matching regex the action code is invoked; the lexer terminates the scan when a token is returned by the action code)\n        },\n\n        performAction: function(yy, yy_, $avoiding_name_collisions, YY_START),\n        rules: [...],\n        conditions: {associative list: name ==> set},\n    }\n  }\n\n\n  token location info (@$, _$, etc.): {\n    first_line: n,\n    last_line: n,\n    first_column: n,\n    last_column: n,\n    range: [start_number, end_number]       (where the numbers are indexes into the input string, regular zero-based)\n  }\n\n\n  the parseError function receives a 'hash' object with these members for lexer and parser errors: {\n    text:        (matched text)\n    token:       (the produced terminal token, if any)\n    line:        (yylineno)\n  }\n  while parser (grammar) errors will also provide these members, i.e. parser errors deliver a superset of attributes: {\n    loc:         (yylloc)\n    expected:    (string describing the set of expected tokens)\n    recoverable: (boolean: TRUE when the parser has a error recovery rule available for this particular error)\n  }\n*/\nvar parser = (function(){\nvar o=function(k,v,o,l){for(o=o||{},l=k.length;l--;o[k[l]]=v);return o},$V0=[1,2],$V1=[1,3],$V2=[1,5],$V3=[1,7],$V4=[2,5],$V5=[1,15],$V6=[1,17],$V7=[1,18],$V8=[1,19],$V9=[1,21],$Va=[1,22],$Vb=[1,23],$Vc=[1,29],$Vd=[1,30],$Ve=[1,31],$Vf=[1,32],$Vg=[1,33],$Vh=[1,34],$Vi=[1,37],$Vj=[1,38],$Vk=[1,39],$Vl=[1,40],$Vm=[1,41],$Vn=[1,42],$Vo=[1,45],$Vp=[1,4,5,16,20,22,23,24,30,32,33,34,35,36,38,40,41,42,46,47,48,49,57,67],$Vq=[1,58],$Vr=[4,5,16,20,22,23,24,30,32,33,34,35,36,38,42,46,47,48,49,57,67],$Vs=[4,5,16,20,22,23,24,30,32,33,34,35,36,38,41,42,46,47,48,49,57,67],$Vt=[4,5,16,20,22,23,24,30,32,33,34,35,36,38,40,42,46,47,48,49,57,67],$Vu=[55,56,57],$Vv=[1,4,5,7,16,20,22,23,24,30,32,33,34,35,36,38,40,41,42,46,47,48,49,57,67];\nvar parser = {trace: function trace () { },\nyy: {},\nsymbols_: {\"error\":2,\"start\":3,\"SPACE\":4,\"NEWLINE\":5,\"directive\":6,\"SD\":7,\"document\":8,\"line\":9,\"statement\":10,\"openDirective\":11,\"typeDirective\":12,\"closeDirective\":13,\":\":14,\"argDirective\":15,\"participant\":16,\"actor\":17,\"AS\":18,\"restOfLine\":19,\"participant_actor\":20,\"signal\":21,\"autonumber\":22,\"activate\":23,\"deactivate\":24,\"note_statement\":25,\"links_statement\":26,\"link_statement\":27,\"properties_statement\":28,\"details_statement\":29,\"title\":30,\"text2\":31,\"loop\":32,\"end\":33,\"rect\":34,\"opt\":35,\"alt\":36,\"else_sections\":37,\"par\":38,\"par_sections\":39,\"and\":40,\"else\":41,\"note\":42,\"placement\":43,\"over\":44,\"actor_pair\":45,\"links\":46,\"link\":47,\"properties\":48,\"details\":49,\"spaceList\":50,\",\":51,\"left_of\":52,\"right_of\":53,\"signaltype\":54,\"+\":55,\"-\":56,\"ACTOR\":57,\"SOLID_OPEN_ARROW\":58,\"DOTTED_OPEN_ARROW\":59,\"SOLID_ARROW\":60,\"DOTTED_ARROW\":61,\"SOLID_CROSS\":62,\"DOTTED_CROSS\":63,\"SOLID_POINT\":64,\"DOTTED_POINT\":65,\"TXT\":66,\"open_directive\":67,\"type_directive\":68,\"arg_directive\":69,\"close_directive\":70,\"$accept\":0,\"$end\":1},\nterminals_: {2:\"error\",4:\"SPACE\",5:\"NEWLINE\",7:\"SD\",14:\":\",16:\"participant\",18:\"AS\",19:\"restOfLine\",20:\"participant_actor\",22:\"autonumber\",23:\"activate\",24:\"deactivate\",30:\"title\",32:\"loop\",33:\"end\",34:\"rect\",35:\"opt\",36:\"alt\",38:\"par\",40:\"and\",41:\"else\",42:\"note\",44:\"over\",46:\"links\",47:\"link\",48:\"properties\",49:\"details\",51:\",\",52:\"left_of\",53:\"right_of\",55:\"+\",56:\"-\",57:\"ACTOR\",58:\"SOLID_OPEN_ARROW\",59:\"DOTTED_OPEN_ARROW\",60:\"SOLID_ARROW\",61:\"DOTTED_ARROW\",62:\"SOLID_CROSS\",63:\"DOTTED_CROSS\",64:\"SOLID_POINT\",65:\"DOTTED_POINT\",66:\"TXT\",67:\"open_directive\",68:\"type_directive\",69:\"arg_directive\",70:\"close_directive\"},\nproductions_: [0,[3,2],[3,2],[3,2],[3,2],[8,0],[8,2],[9,2],[9,1],[9,1],[6,4],[6,6],[10,5],[10,3],[10,5],[10,3],[10,2],[10,1],[10,3],[10,3],[10,2],[10,2],[10,2],[10,2],[10,2],[10,3],[10,4],[10,4],[10,4],[10,4],[10,4],[10,1],[39,1],[39,4],[37,1],[37,4],[25,4],[25,4],[26,3],[27,3],[28,3],[29,3],[50,2],[50,1],[45,3],[45,1],[43,1],[43,1],[21,5],[21,5],[21,4],[17,1],[54,1],[54,1],[54,1],[54,1],[54,1],[54,1],[54,1],[54,1],[31,1],[11,1],[12,1],[15,1],[13,1]],\nperformAction: function anonymous(yytext, yyleng, yylineno, yy, yystate /* action[1] */, $$ /* vstack */, _$ /* lstack */) {\n/* this == yyval */\n\nvar $0 = $$.length - 1;\nswitch (yystate) {\ncase 4:\n yy.apply($$[$0]);return $$[$0]; \nbreak;\ncase 5:\n this.$ = [] \nbreak;\ncase 6:\n$$[$0-1].push($$[$0]);this.$ = $$[$0-1]\nbreak;\ncase 7: case 8:\n this.$ = $$[$0] \nbreak;\ncase 9:\n this.$=[]; \nbreak;\ncase 12:\n$$[$0-3].type='addParticipant';$$[$0-3].description=yy.parseMessage($$[$0-1]); this.$=$$[$0-3];\nbreak;\ncase 13:\n$$[$0-1].type='addParticipant';this.$=$$[$0-1];\nbreak;\ncase 14:\n$$[$0-3].type='addActor';$$[$0-3].description=yy.parseMessage($$[$0-1]); this.$=$$[$0-3];\nbreak;\ncase 15:\n$$[$0-1].type='addActor'; this.$=$$[$0-1];\nbreak;\ncase 17:\nyy.enableSequenceNumbers()\nbreak;\ncase 18:\nthis.$={type: 'activeStart', signalType: yy.LINETYPE.ACTIVE_START, actor: $$[$0-1]};\nbreak;\ncase 19:\nthis.$={type: 'activeEnd', signalType: yy.LINETYPE.ACTIVE_END, actor: $$[$0-1]};\nbreak;\ncase 25:\nthis.$=[{type:'setTitle', text:$$[$0-1]}]\nbreak;\ncase 26:\n\n\t\t$$[$0-1].unshift({type: 'loopStart', loopText:yy.parseMessage($$[$0-2]), signalType: yy.LINETYPE.LOOP_START});\n\t\t$$[$0-1].push({type: 'loopEnd', loopText:$$[$0-2], signalType: yy.LINETYPE.LOOP_END});\n\t\tthis.$=$$[$0-1];\nbreak;\ncase 27:\n\n\t\t$$[$0-1].unshift({type: 'rectStart', color:yy.parseMessage($$[$0-2]), signalType: yy.LINETYPE.RECT_START });\n\t\t$$[$0-1].push({type: 'rectEnd', color:yy.parseMessage($$[$0-2]), signalType: yy.LINETYPE.RECT_END });\n\t\tthis.$=$$[$0-1];\nbreak;\ncase 28:\n\n\t\t$$[$0-1].unshift({type: 'optStart', optText:yy.parseMessage($$[$0-2]), signalType: yy.LINETYPE.OPT_START});\n\t\t$$[$0-1].push({type: 'optEnd', optText:yy.parseMessage($$[$0-2]), signalType: yy.LINETYPE.OPT_END});\n\t\tthis.$=$$[$0-1];\nbreak;\ncase 29:\n\n\t\t// Alt start\n\t\t$$[$0-1].unshift({type: 'altStart', altText:yy.parseMessage($$[$0-2]), signalType: yy.LINETYPE.ALT_START});\n\t\t// Content in alt is already in $$[$0-1]\n\t\t// End\n\t\t$$[$0-1].push({type: 'altEnd', signalType: yy.LINETYPE.ALT_END});\n\t\tthis.$=$$[$0-1];\nbreak;\ncase 30:\n\n\t\t// Parallel start\n\t\t$$[$0-1].unshift({type: 'parStart', parText:yy.parseMessage($$[$0-2]), signalType: yy.LINETYPE.PAR_START});\n\t\t// Content in par is already in $$[$0-1]\n\t\t// End\n\t\t$$[$0-1].push({type: 'parEnd', signalType: yy.LINETYPE.PAR_END});\n\t\tthis.$=$$[$0-1];\nbreak;\ncase 33:\n this.$ = $$[$0-3].concat([{type: 'and', parText:yy.parseMessage($$[$0-1]), signalType: yy.LINETYPE.PAR_AND}, $$[$0]]); \nbreak;\ncase 35:\n this.$ = $$[$0-3].concat([{type: 'else', altText:yy.parseMessage($$[$0-1]), signalType: yy.LINETYPE.ALT_ELSE}, $$[$0]]); \nbreak;\ncase 36:\n\n\t\tthis.$ = [$$[$0-1], {type:'addNote', placement:$$[$0-2], actor:$$[$0-1].actor, text:$$[$0]}];\nbreak;\ncase 37:\n\n\t\t// Coerce actor_pair into a [to, from, ...] array\n\t\t$$[$0-2] = [].concat($$[$0-1], $$[$0-1]).slice(0, 2);\n\t\t$$[$0-2][0] = $$[$0-2][0].actor;\n\t\t$$[$0-2][1] = $$[$0-2][1].actor;\n\t\tthis.$ = [$$[$0-1], {type:'addNote', placement:yy.PLACEMENT.OVER, actor:$$[$0-2].slice(0, 2), text:$$[$0]}];\nbreak;\ncase 38:\n\n\t\tthis.$ = [$$[$0-1], {type:'addLinks', actor:$$[$0-1].actor, text:$$[$0]}];\n  \nbreak;\ncase 39:\n\n\t\tthis.$ = [$$[$0-1], {type:'addALink', actor:$$[$0-1].actor, text:$$[$0]}];\n  \nbreak;\ncase 40:\n\n\t\tthis.$ = [$$[$0-1], {type:'addProperties', actor:$$[$0-1].actor, text:$$[$0]}];\n  \nbreak;\ncase 41:\n\n\t\tthis.$ = [$$[$0-1], {type:'addDetails', actor:$$[$0-1].actor, text:$$[$0]}];\n  \nbreak;\ncase 44:\n this.$ = [$$[$0-2], $$[$0]]; \nbreak;\ncase 45:\n this.$ = $$[$0]; \nbreak;\ncase 46:\n this.$ = yy.PLACEMENT.LEFTOF; \nbreak;\ncase 47:\n this.$ = yy.PLACEMENT.RIGHTOF; \nbreak;\ncase 48:\n this.$ = [$$[$0-4],$$[$0-1],{type: 'addMessage', from:$$[$0-4].actor, to:$$[$0-1].actor, signalType:$$[$0-3], msg:$$[$0]},\n\t              {type: 'activeStart', signalType: yy.LINETYPE.ACTIVE_START, actor: $$[$0-1]}\n\t             ]\nbreak;\ncase 49:\n this.$ = [$$[$0-4],$$[$0-1],{type: 'addMessage', from:$$[$0-4].actor, to:$$[$0-1].actor, signalType:$$[$0-3], msg:$$[$0]},\n\t             {type: 'activeEnd', signalType: yy.LINETYPE.ACTIVE_END, actor: $$[$0-4]}\n\t             ]\nbreak;\ncase 50:\n this.$ = [$$[$0-3],$$[$0-1],{type: 'addMessage', from:$$[$0-3].actor, to:$$[$0-1].actor, signalType:$$[$0-2], msg:$$[$0]}]\nbreak;\ncase 51:\nthis.$={ type: 'addParticipant', actor:$$[$0]}\nbreak;\ncase 52:\n this.$ = yy.LINETYPE.SOLID_OPEN; \nbreak;\ncase 53:\n this.$ = yy.LINETYPE.DOTTED_OPEN; \nbreak;\ncase 54:\n this.$ = yy.LINETYPE.SOLID; \nbreak;\ncase 55:\n this.$ = yy.LINETYPE.DOTTED; \nbreak;\ncase 56:\n this.$ = yy.LINETYPE.SOLID_CROSS; \nbreak;\ncase 57:\n this.$ = yy.LINETYPE.DOTTED_CROSS; \nbreak;\ncase 58:\n this.$ = yy.LINETYPE.SOLID_POINT; \nbreak;\ncase 59:\n this.$ = yy.LINETYPE.DOTTED_POINT; \nbreak;\ncase 60:\nthis.$ = yy.parseMessage($$[$0].trim().substring(1)) \nbreak;\ncase 61:\n yy.parseDirective('%%{', 'open_directive'); \nbreak;\ncase 62:\n yy.parseDirective($$[$0], 'type_directive'); \nbreak;\ncase 63:\n $$[$0] = $$[$0].trim().replace(/'/g, '\"'); yy.parseDirective($$[$0], 'arg_directive'); \nbreak;\ncase 64:\n yy.parseDirective('}%%', 'close_directive', 'sequence'); \nbreak;\n}\n},\ntable: [{3:1,4:$V0,5:$V1,6:4,7:$V2,11:6,67:$V3},{1:[3]},{3:8,4:$V0,5:$V1,6:4,7:$V2,11:6,67:$V3},{3:9,4:$V0,5:$V1,6:4,7:$V2,11:6,67:$V3},{3:10,4:$V0,5:$V1,6:4,7:$V2,11:6,67:$V3},o([1,4,5,16,20,22,23,24,30,32,34,35,36,38,42,46,47,48,49,57,67],$V4,{8:11}),{12:12,68:[1,13]},{68:[2,61]},{1:[2,1]},{1:[2,2]},{1:[2,3]},{1:[2,4],4:$V5,5:$V6,6:35,9:14,10:16,11:6,16:$V7,17:36,20:$V8,21:20,22:$V9,23:$Va,24:$Vb,25:24,26:25,27:26,28:27,29:28,30:$Vc,32:$Vd,34:$Ve,35:$Vf,36:$Vg,38:$Vh,42:$Vi,46:$Vj,47:$Vk,48:$Vl,49:$Vm,57:$Vn,67:$V3},{13:43,14:[1,44],70:$Vo},o([14,70],[2,62]),o($Vp,[2,6]),{6:35,10:46,11:6,16:$V7,17:36,20:$V8,21:20,22:$V9,23:$Va,24:$Vb,25:24,26:25,27:26,28:27,29:28,30:$Vc,32:$Vd,34:$Ve,35:$Vf,36:$Vg,38:$Vh,42:$Vi,46:$Vj,47:$Vk,48:$Vl,49:$Vm,57:$Vn,67:$V3},o($Vp,[2,8]),o($Vp,[2,9]),{17:47,57:$Vn},{17:48,57:$Vn},{5:[1,49]},o($Vp,[2,17]),{17:50,57:$Vn},{17:51,57:$Vn},{5:[1,52]},{5:[1,53]},{5:[1,54]},{5:[1,55]},{5:[1,56]},{31:57,66:$Vq},{19:[1,59]},{19:[1,60]},{19:[1,61]},{19:[1,62]},{19:[1,63]},o($Vp,[2,31]),{54:64,58:[1,65],59:[1,66],60:[1,67],61:[1,68],62:[1,69],63:[1,70],64:[1,71],65:[1,72]},{43:73,44:[1,74],52:[1,75],53:[1,76]},{17:77,57:$Vn},{17:78,57:$Vn},{17:79,57:$Vn},{17:80,57:$Vn},o([5,18,51,58,59,60,61,62,63,64,65,66],[2,51]),{5:[1,81]},{15:82,69:[1,83]},{5:[2,64]},o($Vp,[2,7]),{5:[1,85],18:[1,84]},{5:[1,87],18:[1,86]},o($Vp,[2,16]),{5:[1,88]},{5:[1,89]},o($Vp,[2,20]),o($Vp,[2,21]),o($Vp,[2,22]),o($Vp,[2,23]),o($Vp,[2,24]),{5:[1,90]},{5:[2,60]},o($Vr,$V4,{8:91}),o($Vr,$V4,{8:92}),o($Vr,$V4,{8:93}),o($Vs,$V4,{37:94,8:95}),o($Vt,$V4,{39:96,8:97}),{17:100,55:[1,98],56:[1,99],57:$Vn},o($Vu,[2,52]),o($Vu,[2,53]),o($Vu,[2,54]),o($Vu,[2,55]),o($Vu,[2,56]),o($Vu,[2,57]),o($Vu,[2,58]),o($Vu,[2,59]),{17:101,57:$Vn},{17:103,45:102,57:$Vn},{57:[2,46]},{57:[2,47]},{31:104,66:$Vq},{31:105,66:$Vq},{31:106,66:$Vq},{31:107,66:$Vq},o($Vv,[2,10]),{13:108,70:$Vo},{70:[2,63]},{19:[1,109]},o($Vp,[2,13]),{19:[1,110]},o($Vp,[2,15]),o($Vp,[2,18]),o($Vp,[2,19]),o($Vp,[2,25]),{4:$V5,5:$V6,6:35,9:14,10:16,11:6,16:$V7,17:36,20:$V8,21:20,22:$V9,23:$Va,24:$Vb,25:24,26:25,27:26,28:27,29:28,30:$Vc,32:$Vd,33:[1,111],34:$Ve,35:$Vf,36:$Vg,38:$Vh,42:$Vi,46:$Vj,47:$Vk,48:$Vl,49:$Vm,57:$Vn,67:$V3},{4:$V5,5:$V6,6:35,9:14,10:16,11:6,16:$V7,17:36,20:$V8,21:20,22:$V9,23:$Va,24:$Vb,25:24,26:25,27:26,28:27,29:28,30:$Vc,32:$Vd,33:[1,112],34:$Ve,35:$Vf,36:$Vg,38:$Vh,42:$Vi,46:$Vj,47:$Vk,48:$Vl,49:$Vm,57:$Vn,67:$V3},{4:$V5,5:$V6,6:35,9:14,10:16,11:6,16:$V7,17:36,20:$V8,21:20,22:$V9,23:$Va,24:$Vb,25:24,26:25,27:26,28:27,29:28,30:$Vc,32:$Vd,33:[1,113],34:$Ve,35:$Vf,36:$Vg,38:$Vh,42:$Vi,46:$Vj,47:$Vk,48:$Vl,49:$Vm,57:$Vn,67:$V3},{33:[1,114]},{4:$V5,5:$V6,6:35,9:14,10:16,11:6,16:$V7,17:36,20:$V8,21:20,22:$V9,23:$Va,24:$Vb,25:24,26:25,27:26,28:27,29:28,30:$Vc,32:$Vd,33:[2,34],34:$Ve,35:$Vf,36:$Vg,38:$Vh,41:[1,115],42:$Vi,46:$Vj,47:$Vk,48:$Vl,49:$Vm,57:$Vn,67:$V3},{33:[1,116]},{4:$V5,5:$V6,6:35,9:14,10:16,11:6,16:$V7,17:36,20:$V8,21:20,22:$V9,23:$Va,24:$Vb,25:24,26:25,27:26,28:27,29:28,30:$Vc,32:$Vd,33:[2,32],34:$Ve,35:$Vf,36:$Vg,38:$Vh,40:[1,117],42:$Vi,46:$Vj,47:$Vk,48:$Vl,49:$Vm,57:$Vn,67:$V3},{17:118,57:$Vn},{17:119,57:$Vn},{31:120,66:$Vq},{31:121,66:$Vq},{31:122,66:$Vq},{51:[1,123],66:[2,45]},{5:[2,38]},{5:[2,39]},{5:[2,40]},{5:[2,41]},{5:[1,124]},{5:[1,125]},{5:[1,126]},o($Vp,[2,26]),o($Vp,[2,27]),o($Vp,[2,28]),o($Vp,[2,29]),{19:[1,127]},o($Vp,[2,30]),{19:[1,128]},{31:129,66:$Vq},{31:130,66:$Vq},{5:[2,50]},{5:[2,36]},{5:[2,37]},{17:131,57:$Vn},o($Vv,[2,11]),o($Vp,[2,12]),o($Vp,[2,14]),o($Vs,$V4,{8:95,37:132}),o($Vt,$V4,{8:97,39:133}),{5:[2,48]},{5:[2,49]},{66:[2,44]},{33:[2,35]},{33:[2,33]}],\ndefaultActions: {7:[2,61],8:[2,1],9:[2,2],10:[2,3],45:[2,64],58:[2,60],75:[2,46],76:[2,47],83:[2,63],104:[2,38],105:[2,39],106:[2,40],107:[2,41],120:[2,50],121:[2,36],122:[2,37],129:[2,48],130:[2,49],131:[2,44],132:[2,35],133:[2,33]},\nparseError: function parseError (str, hash) {\n    if (hash.recoverable) {\n        this.trace(str);\n    } else {\n        var error = new Error(str);\n        error.hash = hash;\n        throw error;\n    }\n},\nparse: function parse(input) {\n    var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = '', yylineno = 0, yyleng = 0, recovering = 0, TERROR = 2, EOF = 1;\n    var args = lstack.slice.call(arguments, 1);\n    var lexer = Object.create(this.lexer);\n    var sharedState = { yy: {} };\n    for (var k in this.yy) {\n        if (Object.prototype.hasOwnProperty.call(this.yy, k)) {\n            sharedState.yy[k] = this.yy[k];\n        }\n    }\n    lexer.setInput(input, sharedState.yy);\n    sharedState.yy.lexer = lexer;\n    sharedState.yy.parser = this;\n    if (typeof lexer.yylloc == 'undefined') {\n        lexer.yylloc = {};\n    }\n    var yyloc = lexer.yylloc;\n    lstack.push(yyloc);\n    var ranges = lexer.options && lexer.options.ranges;\n    if (typeof sharedState.yy.parseError === 'function') {\n        this.parseError = sharedState.yy.parseError;\n    } else {\n        this.parseError = Object.getPrototypeOf(this).parseError;\n    }\n    function popStack(n) {\n        stack.length = stack.length - 2 * n;\n        vstack.length = vstack.length - n;\n        lstack.length = lstack.length - n;\n    }\n            function lex() {\n            var token;\n            token = tstack.pop() || lexer.lex() || EOF;\n            if (typeof token !== 'number') {\n                if (token instanceof Array) {\n                    tstack = token;\n                    token = tstack.pop();\n                }\n                token = self.symbols_[token] || token;\n            }\n            return token;\n        }\n    var symbol, preErrorSymbol, state, action, a, r, yyval = {}, p, len, newState, expected;\n    while (true) {\n        state = stack[stack.length - 1];\n        if (this.defaultActions[state]) {\n            action = this.defaultActions[state];\n        } else {\n            if (symbol === null || typeof symbol == 'undefined') {\n                symbol = lex();\n            }\n            action = table[state] && table[state][symbol];\n        }\n        if (typeof action === 'undefined' || !action.length || !action[0]) {\n            var errStr = '';\n            expected = [];\n            for (p in table[state]) {\n                if (this.terminals_[p] && p > TERROR) {\n                    expected.push('\\'' + this.terminals_[p] + '\\'');\n                }\n            }\n            if (lexer.showPosition) {\n                errStr = 'Parse error on line ' + (yylineno + 1) + ':\\n' + lexer.showPosition() + '\\nExpecting ' + expected.join(', ') + ', got \\'' + (this.terminals_[symbol] || symbol) + '\\'';\n            } else {\n                errStr = 'Parse error on line ' + (yylineno + 1) + ': Unexpected ' + (symbol == EOF ? 'end of input' : '\\'' + (this.terminals_[symbol] || symbol) + '\\'');\n            }\n            this.parseError(errStr, {\n                text: lexer.match,\n                token: this.terminals_[symbol] || symbol,\n                line: lexer.yylineno,\n                loc: yyloc,\n                expected: expected\n            });\n        }\n        if (action[0] instanceof Array && action.length > 1) {\n            throw new Error('Parse Error: multiple actions possible at state: ' + state + ', token: ' + symbol);\n        }\n        switch (action[0]) {\n        case 1:\n            stack.push(symbol);\n            vstack.push(lexer.yytext);\n            lstack.push(lexer.yylloc);\n            stack.push(action[1]);\n            symbol = null;\n            if (!preErrorSymbol) {\n                yyleng = lexer.yyleng;\n                yytext = lexer.yytext;\n                yylineno = lexer.yylineno;\n                yyloc = lexer.yylloc;\n                if (recovering > 0) {\n                    recovering--;\n                }\n            } else {\n                symbol = preErrorSymbol;\n                preErrorSymbol = null;\n            }\n            break;\n        case 2:\n            len = this.productions_[action[1]][1];\n            yyval.$ = vstack[vstack.length - len];\n            yyval._$ = {\n                first_line: lstack[lstack.length - (len || 1)].first_line,\n                last_line: lstack[lstack.length - 1].last_line,\n                first_column: lstack[lstack.length - (len || 1)].first_column,\n                last_column: lstack[lstack.length - 1].last_column\n            };\n            if (ranges) {\n                yyval._$.range = [\n                    lstack[lstack.length - (len || 1)].range[0],\n                    lstack[lstack.length - 1].range[1]\n                ];\n            }\n            r = this.performAction.apply(yyval, [\n                yytext,\n                yyleng,\n                yylineno,\n                sharedState.yy,\n                action[1],\n                vstack,\n                lstack\n            ].concat(args));\n            if (typeof r !== 'undefined') {\n                return r;\n            }\n            if (len) {\n                stack = stack.slice(0, -1 * len * 2);\n                vstack = vstack.slice(0, -1 * len);\n                lstack = lstack.slice(0, -1 * len);\n            }\n            stack.push(this.productions_[action[1]][0]);\n            vstack.push(yyval.$);\n            lstack.push(yyval._$);\n            newState = table[stack[stack.length - 2]][stack[stack.length - 1]];\n            stack.push(newState);\n            break;\n        case 3:\n            return true;\n        }\n    }\n    return true;\n}};\n\n/* generated by jison-lex 0.3.4 */\nvar lexer = (function(){\nvar lexer = ({\n\nEOF:1,\n\nparseError:function parseError(str, hash) {\n        if (this.yy.parser) {\n            this.yy.parser.parseError(str, hash);\n        } else {\n            throw new Error(str);\n        }\n    },\n\n// resets the lexer, sets new input\nsetInput:function (input, yy) {\n        this.yy = yy || this.yy || {};\n        this._input = input;\n        this._more = this._backtrack = this.done = false;\n        this.yylineno = this.yyleng = 0;\n        this.yytext = this.matched = this.match = '';\n        this.conditionStack = ['INITIAL'];\n        this.yylloc = {\n            first_line: 1,\n            first_column: 0,\n            last_line: 1,\n            last_column: 0\n        };\n        if (this.options.ranges) {\n            this.yylloc.range = [0,0];\n        }\n        this.offset = 0;\n        return this;\n    },\n\n// consumes and returns one char from the input\ninput:function () {\n        var ch = this._input[0];\n        this.yytext += ch;\n        this.yyleng++;\n        this.offset++;\n        this.match += ch;\n        this.matched += ch;\n        var lines = ch.match(/(?:\\r\\n?|\\n).*/g);\n        if (lines) {\n            this.yylineno++;\n            this.yylloc.last_line++;\n        } else {\n            this.yylloc.last_column++;\n        }\n        if (this.options.ranges) {\n            this.yylloc.range[1]++;\n        }\n\n        this._input = this._input.slice(1);\n        return ch;\n    },\n\n// unshifts one char (or a string) into the input\nunput:function (ch) {\n        var len = ch.length;\n        var lines = ch.split(/(?:\\r\\n?|\\n)/g);\n\n        this._input = ch + this._input;\n        this.yytext = this.yytext.substr(0, this.yytext.length - len);\n        //this.yyleng -= len;\n        this.offset -= len;\n        var oldLines = this.match.split(/(?:\\r\\n?|\\n)/g);\n        this.match = this.match.substr(0, this.match.length - 1);\n        this.matched = this.matched.substr(0, this.matched.length - 1);\n\n        if (lines.length - 1) {\n            this.yylineno -= lines.length - 1;\n        }\n        var r = this.yylloc.range;\n\n        this.yylloc = {\n            first_line: this.yylloc.first_line,\n            last_line: this.yylineno + 1,\n            first_column: this.yylloc.first_column,\n            last_column: lines ?\n                (lines.length === oldLines.length ? this.yylloc.first_column : 0)\n                 + oldLines[oldLines.length - lines.length].length - lines[0].length :\n              this.yylloc.first_column - len\n        };\n\n        if (this.options.ranges) {\n            this.yylloc.range = [r[0], r[0] + this.yyleng - len];\n        }\n        this.yyleng = this.yytext.length;\n        return this;\n    },\n\n// When called from action, caches matched text and appends it on next action\nmore:function () {\n        this._more = true;\n        return this;\n    },\n\n// When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead.\nreject:function () {\n        if (this.options.backtrack_lexer) {\n            this._backtrack = true;\n        } else {\n            return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\\n' + this.showPosition(), {\n                text: \"\",\n                token: null,\n                line: this.yylineno\n            });\n\n        }\n        return this;\n    },\n\n// retain first n characters of the match\nless:function (n) {\n        this.unput(this.match.slice(n));\n    },\n\n// displays already matched input, i.e. for error messages\npastInput:function () {\n        var past = this.matched.substr(0, this.matched.length - this.match.length);\n        return (past.length > 20 ? '...':'') + past.substr(-20).replace(/\\n/g, \"\");\n    },\n\n// displays upcoming input, i.e. for error messages\nupcomingInput:function () {\n        var next = this.match;\n        if (next.length < 20) {\n            next += this._input.substr(0, 20-next.length);\n        }\n        return (next.substr(0,20) + (next.length > 20 ? '...' : '')).replace(/\\n/g, \"\");\n    },\n\n// displays the character position where the lexing error occurred, i.e. for error messages\nshowPosition:function () {\n        var pre = this.pastInput();\n        var c = new Array(pre.length + 1).join(\"-\");\n        return pre + this.upcomingInput() + \"\\n\" + c + \"^\";\n    },\n\n// test the lexed token: return FALSE when not a match, otherwise return token\ntest_match:function(match, indexed_rule) {\n        var token,\n            lines,\n            backup;\n\n        if (this.options.backtrack_lexer) {\n            // save context\n            backup = {\n                yylineno: this.yylineno,\n                yylloc: {\n                    first_line: this.yylloc.first_line,\n                    last_line: this.last_line,\n                    first_column: this.yylloc.first_column,\n                    last_column: this.yylloc.last_column\n                },\n                yytext: this.yytext,\n                match: this.match,\n                matches: this.matches,\n                matched: this.matched,\n                yyleng: this.yyleng,\n                offset: this.offset,\n                _more: this._more,\n                _input: this._input,\n                yy: this.yy,\n                conditionStack: this.conditionStack.slice(0),\n                done: this.done\n            };\n            if (this.options.ranges) {\n                backup.yylloc.range = this.yylloc.range.slice(0);\n            }\n        }\n\n        lines = match[0].match(/(?:\\r\\n?|\\n).*/g);\n        if (lines) {\n            this.yylineno += lines.length;\n        }\n        this.yylloc = {\n            first_line: this.yylloc.last_line,\n            last_line: this.yylineno + 1,\n            first_column: this.yylloc.last_column,\n            last_column: lines ?\n                         lines[lines.length - 1].length - lines[lines.length - 1].match(/\\r?\\n?/)[0].length :\n                         this.yylloc.last_column + match[0].length\n        };\n        this.yytext += match[0];\n        this.match += match[0];\n        this.matches = match;\n        this.yyleng = this.yytext.length;\n        if (this.options.ranges) {\n            this.yylloc.range = [this.offset, this.offset += this.yyleng];\n        }\n        this._more = false;\n        this._backtrack = false;\n        this._input = this._input.slice(match[0].length);\n        this.matched += match[0];\n        token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]);\n        if (this.done && this._input) {\n            this.done = false;\n        }\n        if (token) {\n            return token;\n        } else if (this._backtrack) {\n            // recover context\n            for (var k in backup) {\n                this[k] = backup[k];\n            }\n            return false; // rule action called reject() implying the next rule should be tested instead.\n        }\n        return false;\n    },\n\n// return next match in input\nnext:function () {\n        if (this.done) {\n            return this.EOF;\n        }\n        if (!this._input) {\n            this.done = true;\n        }\n\n        var token,\n            match,\n            tempMatch,\n            index;\n        if (!this._more) {\n            this.yytext = '';\n            this.match = '';\n        }\n        var rules = this._currentRules();\n        for (var i = 0; i < rules.length; i++) {\n            tempMatch = this._input.match(this.rules[rules[i]]);\n            if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {\n                match = tempMatch;\n                index = i;\n                if (this.options.backtrack_lexer) {\n                    token = this.test_match(tempMatch, rules[i]);\n                    if (token !== false) {\n                        return token;\n                    } else if (this._backtrack) {\n                        match = false;\n                        continue; // rule action called reject() implying a rule MISmatch.\n                    } else {\n                        // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)\n                        return false;\n                    }\n                } else if (!this.options.flex) {\n                    break;\n                }\n            }\n        }\n        if (match) {\n            token = this.test_match(match, rules[index]);\n            if (token !== false) {\n                return token;\n            }\n            // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)\n            return false;\n        }\n        if (this._input === \"\") {\n            return this.EOF;\n        } else {\n            return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. Unrecognized text.\\n' + this.showPosition(), {\n                text: \"\",\n                token: null,\n                line: this.yylineno\n            });\n        }\n    },\n\n// return next match that has a token\nlex:function lex () {\n        var r = this.next();\n        if (r) {\n            return r;\n        } else {\n            return this.lex();\n        }\n    },\n\n// activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)\nbegin:function begin (condition) {\n        this.conditionStack.push(condition);\n    },\n\n// pop the previously active lexer condition state off the condition stack\npopState:function popState () {\n        var n = this.conditionStack.length - 1;\n        if (n > 0) {\n            return this.conditionStack.pop();\n        } else {\n            return this.conditionStack[0];\n        }\n    },\n\n// produce the lexer rule set which is active for the currently active lexer condition state\n_currentRules:function _currentRules () {\n        if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) {\n            return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;\n        } else {\n            return this.conditions[\"INITIAL\"].rules;\n        }\n    },\n\n// return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available\ntopState:function topState (n) {\n        n = this.conditionStack.length - 1 - Math.abs(n || 0);\n        if (n >= 0) {\n            return this.conditionStack[n];\n        } else {\n            return \"INITIAL\";\n        }\n    },\n\n// alias for begin(condition)\npushState:function pushState (condition) {\n        this.begin(condition);\n    },\n\n// return the number of states currently on the stack\nstateStackSize:function stateStackSize() {\n        return this.conditionStack.length;\n    },\noptions: {\"case-insensitive\":true},\nperformAction: function anonymous(yy,yy_,$avoiding_name_collisions,YY_START) {\nvar YYSTATE=YY_START;\nswitch($avoiding_name_collisions) {\ncase 0: this.begin('open_directive'); return 67; \nbreak;\ncase 1: this.begin('type_directive'); return 68; \nbreak;\ncase 2: this.popState(); this.begin('arg_directive'); return 14; \nbreak;\ncase 3: this.popState(); this.popState(); return 70; \nbreak;\ncase 4:return 69;\nbreak;\ncase 5:return 5;\nbreak;\ncase 6:/* skip all whitespace */\nbreak;\ncase 7:/* skip same-line whitespace */\nbreak;\ncase 8:/* skip comments */\nbreak;\ncase 9:/* skip comments */\nbreak;\ncase 10:/* skip comments */\nbreak;\ncase 11: this.begin('ID'); return 16; \nbreak;\ncase 12: this.begin('ID'); return 20; \nbreak;\ncase 13: yy_.yytext = yy_.yytext.trim(); this.begin('ALIAS'); return 57; \nbreak;\ncase 14: this.popState(); this.popState(); this.begin('LINE'); return 18; \nbreak;\ncase 15: this.popState(); this.popState(); return 5; \nbreak;\ncase 16: this.begin('LINE'); return 32; \nbreak;\ncase 17: this.begin('LINE'); return 34; \nbreak;\ncase 18: this.begin('LINE'); return 35; \nbreak;\ncase 19: this.begin('LINE'); return 36; \nbreak;\ncase 20: this.begin('LINE'); return 41; \nbreak;\ncase 21: this.begin('LINE'); return 38; \nbreak;\ncase 22: this.begin('LINE'); return 40; \nbreak;\ncase 23: this.popState(); return 19; \nbreak;\ncase 24:return 33;\nbreak;\ncase 25:return 52;\nbreak;\ncase 26:return 53;\nbreak;\ncase 27:return 46;\nbreak;\ncase 28:return 47;\nbreak;\ncase 29:return 48;\nbreak;\ncase 30:return 49;\nbreak;\ncase 31:return 44;\nbreak;\ncase 32:return 42;\nbreak;\ncase 33: this.begin('ID'); return 23; \nbreak;\ncase 34: this.begin('ID'); return 24; \nbreak;\ncase 35:return 30;\nbreak;\ncase 36:return 7;\nbreak;\ncase 37:return 22;\nbreak;\ncase 38:return 51;\nbreak;\ncase 39:return 5;\nbreak;\ncase 40: yy_.yytext = yy_.yytext.trim(); return 57; \nbreak;\ncase 41:return 60;\nbreak;\ncase 42:return 61;\nbreak;\ncase 43:return 58;\nbreak;\ncase 44:return 59;\nbreak;\ncase 45:return 62;\nbreak;\ncase 46:return 63;\nbreak;\ncase 47:return 64;\nbreak;\ncase 48:return 65;\nbreak;\ncase 49:return 66;\nbreak;\ncase 50:return 55;\nbreak;\ncase 51:return 56;\nbreak;\ncase 52:return 5;\nbreak;\ncase 53:return 'INVALID';\nbreak;\n}\n},\nrules: [/^(?:%%\\{)/i,/^(?:((?:(?!\\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\\}%%)/i,/^(?:((?:(?!\\}%%).|\\n)*))/i,/^(?:[\\n]+)/i,/^(?:\\s+)/i,/^(?:((?!\\n)\\s)+)/i,/^(?:#[^\\n]*)/i,/^(?:%(?!\\{)[^\\n]*)/i,/^(?:[^\\}]%%[^\\n]*)/i,/^(?:participant\\b)/i,/^(?:actor\\b)/i,/^(?:[^\\->:\\n,;]+?(?=((?!\\n)\\s)+as(?!\\n)\\s|[#\\n;]|$))/i,/^(?:as\\b)/i,/^(?:(?:))/i,/^(?:loop\\b)/i,/^(?:rect\\b)/i,/^(?:opt\\b)/i,/^(?:alt\\b)/i,/^(?:else\\b)/i,/^(?:par\\b)/i,/^(?:and\\b)/i,/^(?:(?:[:]?(?:no)?wrap)?[^#\\n;]*)/i,/^(?:end\\b)/i,/^(?:left of\\b)/i,/^(?:right of\\b)/i,/^(?:links\\b)/i,/^(?:link\\b)/i,/^(?:properties\\b)/i,/^(?:details\\b)/i,/^(?:over\\b)/i,/^(?:note\\b)/i,/^(?:activate\\b)/i,/^(?:deactivate\\b)/i,/^(?:title\\b)/i,/^(?:sequenceDiagram\\b)/i,/^(?:autonumber\\b)/i,/^(?:,)/i,/^(?:;)/i,/^(?:[^\\+\\->:\\n,;]+((?!(-x|--x|-\\)|--\\)))[\\-]*[^\\+\\->:\\n,;]+)*)/i,/^(?:->>)/i,/^(?:-->>)/i,/^(?:->)/i,/^(?:-->)/i,/^(?:-[x])/i,/^(?:--[x])/i,/^(?:-[\\)])/i,/^(?:--[\\)])/i,/^(?::(?:(?:no)?wrap)?[^#\\n;]+)/i,/^(?:\\+)/i,/^(?:-)/i,/^(?:$)/i,/^(?:.)/i],\nconditions: {\"open_directive\":{\"rules\":[1,8],\"inclusive\":false},\"type_directive\":{\"rules\":[2,3,8],\"inclusive\":false},\"arg_directive\":{\"rules\":[3,4,8],\"inclusive\":false},\"ID\":{\"rules\":[7,8,13],\"inclusive\":false},\"ALIAS\":{\"rules\":[7,8,14,15],\"inclusive\":false},\"LINE\":{\"rules\":[7,8,23],\"inclusive\":false},\"INITIAL\":{\"rules\":[0,5,6,8,9,10,11,12,16,17,18,19,20,21,22,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53],\"inclusive\":true}}\n});\nreturn lexer;\n})();\nparser.lexer = lexer;\nfunction Parser () {\n  this.yy = {};\n}\nParser.prototype = parser;parser.Parser = Parser;\nreturn new Parser;\n})();\n\n\nif (true) {\nexports.parser = parser;\nexports.Parser = parser.Parser;\nexports.parse = function () { return parser.parse.apply(parser, arguments); };\nexports.main = function commonjsMain (args) {\n    if (!args[1]) {\n        console.log('Usage: '+args[0]+' FILE');\n        process.exit(1);\n    }\n    var source = __webpack_require__(/*! fs */ \"./node_modules/node-libs-browser/mock/empty.js\").readFileSync(__webpack_require__(/*! path */ \"./node_modules/path-browserify/index.js\").normalize(args[1]), \"utf8\");\n    return exports.parser.parse(source);\n};\nif ( true && __webpack_require__.c[__webpack_require__.s] === module) {\n  exports.main(process.argv.slice(1));\n}\n}\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../node_modules/process/browser.js */ \"./node_modules/process/browser.js\"), __webpack_require__(/*! ./../../../../node_modules/webpack/buildin/module.js */ \"./node_modules/webpack/buildin/module.js\")(module)))\n\n/***/ }),\n\n/***/ \"./src/diagrams/sequence/sequenceDb.js\":\n/*!*********************************************!*\\\n  !*** ./src/diagrams/sequence/sequenceDb.js ***!\n  \\*********************************************/\n/*! exports provided: parseDirective, addActor, addMessage, addSignal, getMessages, getActors, getActor, getActorKeys, getTitle, getTitleWrapped, enableSequenceNumbers, showSequenceNumbers, setWrap, autoWrap, clear, parseMessage, LINETYPE, ARROWTYPE, PLACEMENT, addNote, addLinks, addALink, addProperties, addDetails, getActorProperty, setTitle, apply, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"parseDirective\", function() { return parseDirective; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"addActor\", function() { return addActor; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"addMessage\", function() { return addMessage; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"addSignal\", function() { return addSignal; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getMessages\", function() { return getMessages; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getActors\", function() { return getActors; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getActor\", function() { return getActor; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getActorKeys\", function() { return getActorKeys; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getTitle\", function() { return getTitle; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getTitleWrapped\", function() { return getTitleWrapped; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"enableSequenceNumbers\", function() { return enableSequenceNumbers; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"showSequenceNumbers\", function() { return showSequenceNumbers; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"setWrap\", function() { return setWrap; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"autoWrap\", function() { return autoWrap; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"clear\", function() { return clear; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"parseMessage\", function() { return parseMessage; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"LINETYPE\", function() { return LINETYPE; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"ARROWTYPE\", function() { return ARROWTYPE; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"PLACEMENT\", function() { return PLACEMENT; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"addNote\", function() { return addNote; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"addLinks\", function() { return addLinks; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"addALink\", function() { return addALink; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"addProperties\", function() { return addProperties; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"addDetails\", function() { return addDetails; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getActorProperty\", function() { return getActorProperty; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"setTitle\", function() { return setTitle; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"apply\", function() { return apply; });\n/* harmony import */ var _mermaidAPI__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../mermaidAPI */ \"./src/mermaidAPI.js\");\n/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../config */ \"./src/config.js\");\n/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../logger */ \"./src/logger.js\");\n\n\n\nvar prevActor = undefined;\nvar actors = {};\nvar messages = [];\nvar notes = [];\nvar title = '';\nvar titleWrapped = false;\nvar sequenceNumbersEnabled = false;\nvar wrapEnabled = false;\nvar parseDirective = function parseDirective(statement, context, type) {\n  _mermaidAPI__WEBPACK_IMPORTED_MODULE_0__[\"default\"].parseDirective(this, statement, context, type);\n};\nvar addActor = function addActor(id, name, description, type) {\n  // Don't allow description nulling\n  var old = actors[id];\n  if (old && name === old.name && description == null) return; // Don't allow null descriptions, either\n\n  if (description == null || description.text == null) {\n    description = {\n      text: name,\n      wrap: null,\n      type: type\n    };\n  }\n\n  if (type == null || description.text == null) {\n    description = {\n      text: name,\n      wrap: null,\n      type: type\n    };\n  }\n\n  actors[id] = {\n    name: name,\n    description: description.text,\n    wrap: description.wrap === undefined && autoWrap() || !!description.wrap,\n    prevActor: prevActor,\n    links: {},\n    properties: {},\n    actorCnt: null,\n    rectData: null,\n    type: type || 'participant'\n  };\n\n  if (prevActor && actors[prevActor]) {\n    actors[prevActor].nextActor = id;\n  }\n\n  prevActor = id;\n};\n\nvar activationCount = function activationCount(part) {\n  var i;\n  var count = 0;\n\n  for (i = 0; i < messages.length; i++) {\n    if (messages[i].type === LINETYPE.ACTIVE_START) {\n      if (messages[i].from.actor === part) {\n        count++;\n      }\n    }\n\n    if (messages[i].type === LINETYPE.ACTIVE_END) {\n      if (messages[i].from.actor === part) {\n        count--;\n      }\n    }\n  }\n\n  return count;\n};\n\nvar addMessage = function addMessage(idFrom, idTo, message, answer) {\n  messages.push({\n    from: idFrom,\n    to: idTo,\n    message: message.text,\n    wrap: message.wrap === undefined && autoWrap() || !!message.wrap,\n    answer: answer\n  });\n};\nvar addSignal = function addSignal(idFrom, idTo) {\n  var message = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {\n    text: undefined,\n    wrap: undefined\n  };\n  var messageType = arguments.length > 3 ? arguments[3] : undefined;\n\n  if (messageType === LINETYPE.ACTIVE_END) {\n    var cnt = activationCount(idFrom.actor);\n\n    if (cnt < 1) {\n      // Bail out as there is an activation signal from an inactive participant\n      var error = new Error('Trying to inactivate an inactive participant (' + idFrom.actor + ')');\n      error.hash = {\n        text: '->>-',\n        token: '->>-',\n        line: '1',\n        loc: {\n          first_line: 1,\n          last_line: 1,\n          first_column: 1,\n          last_column: 1\n        },\n        expected: [\"'ACTIVE_PARTICIPANT'\"]\n      };\n      throw error;\n    }\n  }\n\n  messages.push({\n    from: idFrom,\n    to: idTo,\n    message: message.text,\n    wrap: message.wrap === undefined && autoWrap() || !!message.wrap,\n    type: messageType\n  });\n  return true;\n};\nvar getMessages = function getMessages() {\n  return messages;\n};\nvar getActors = function getActors() {\n  return actors;\n};\nvar getActor = function getActor(id) {\n  return actors[id];\n};\nvar getActorKeys = function getActorKeys() {\n  return Object.keys(actors);\n};\nvar getTitle = function getTitle() {\n  return title;\n};\nvar getTitleWrapped = function getTitleWrapped() {\n  return titleWrapped;\n};\nvar enableSequenceNumbers = function enableSequenceNumbers() {\n  sequenceNumbersEnabled = true;\n};\nvar showSequenceNumbers = function showSequenceNumbers() {\n  return sequenceNumbersEnabled;\n};\nvar setWrap = function setWrap(wrapSetting) {\n  wrapEnabled = wrapSetting;\n};\nvar autoWrap = function autoWrap() {\n  return wrapEnabled;\n};\nvar clear = function clear() {\n  actors = {};\n  messages = [];\n};\nvar parseMessage = function parseMessage(str) {\n  var _str = str.trim();\n\n  var message = {\n    text: _str.replace(/^[:]?(?:no)?wrap:/, '').trim(),\n    wrap: _str.match(/^[:]?wrap:/) !== null ? true : _str.match(/^[:]?nowrap:/) !== null ? false : undefined\n  };\n  _logger__WEBPACK_IMPORTED_MODULE_2__[\"log\"].debug('parseMessage:', message);\n  return message;\n};\nvar LINETYPE = {\n  SOLID: 0,\n  DOTTED: 1,\n  NOTE: 2,\n  SOLID_CROSS: 3,\n  DOTTED_CROSS: 4,\n  SOLID_OPEN: 5,\n  DOTTED_OPEN: 6,\n  LOOP_START: 10,\n  LOOP_END: 11,\n  ALT_START: 12,\n  ALT_ELSE: 13,\n  ALT_END: 14,\n  OPT_START: 15,\n  OPT_END: 16,\n  ACTIVE_START: 17,\n  ACTIVE_END: 18,\n  PAR_START: 19,\n  PAR_AND: 20,\n  PAR_END: 21,\n  RECT_START: 22,\n  RECT_END: 23,\n  SOLID_POINT: 24,\n  DOTTED_POINT: 25\n};\nvar ARROWTYPE = {\n  FILLED: 0,\n  OPEN: 1\n};\nvar PLACEMENT = {\n  LEFTOF: 0,\n  RIGHTOF: 1,\n  OVER: 2\n};\nvar addNote = function addNote(actor, placement, message) {\n  var note = {\n    actor: actor,\n    placement: placement,\n    message: message.text,\n    wrap: message.wrap === undefined && autoWrap() || !!message.wrap\n  }; // Coerce actor into a [to, from, ...] array\n\n  var actors = [].concat(actor, actor);\n  notes.push(note);\n  messages.push({\n    from: actors[0],\n    to: actors[1],\n    message: message.text,\n    wrap: message.wrap === undefined && autoWrap() || !!message.wrap,\n    type: LINETYPE.NOTE,\n    placement: placement\n  });\n};\nvar addLinks = function addLinks(actorId, text) {\n  // find the actor\n  var actor = getActor(actorId); // JSON.parse the text\n\n  try {\n    var links = JSON.parse(text.text); // add the deserialized text to the actor's links field.\n\n    insertLinks(actor, links);\n  } catch (e) {\n    _logger__WEBPACK_IMPORTED_MODULE_2__[\"log\"].error('error while parsing actor link text', e);\n  }\n};\nvar addALink = function addALink(actorId, text) {\n  // find the actor\n  var actor = getActor(actorId);\n\n  try {\n    var links = {};\n    var sep = text.text.indexOf('@');\n    var label = text.text.slice(0, sep - 1).trim();\n    var link = text.text.slice(sep + 1).trim();\n    links[label] = link; // add the deserialized text to the actor's links field.\n\n    insertLinks(actor, links);\n  } catch (e) {\n    _logger__WEBPACK_IMPORTED_MODULE_2__[\"log\"].error('error while parsing actor link text', e);\n  }\n};\n\nfunction insertLinks(actor, links) {\n  if (actor.links == null) {\n    actor.links = links;\n  } else {\n    for (var key in links) {\n      actor.links[key] = links[key];\n    }\n  }\n}\n\nvar addProperties = function addProperties(actorId, text) {\n  // find the actor\n  var actor = getActor(actorId); // JSON.parse the text\n\n  try {\n    var properties = JSON.parse(text.text); // add the deserialized text to the actor's property field.\n\n    insertProperties(actor, properties);\n  } catch (e) {\n    _logger__WEBPACK_IMPORTED_MODULE_2__[\"log\"].error('error while parsing actor properties text', e);\n  }\n};\n\nfunction insertProperties(actor, properties) {\n  if (actor.properties == null) {\n    actor.properties = properties;\n  } else {\n    for (var key in properties) {\n      actor.properties[key] = properties[key];\n    }\n  }\n}\n\nvar addDetails = function addDetails(actorId, text) {\n  // find the actor\n  var actor = getActor(actorId);\n  var elem = document.getElementById(text.text); // JSON.parse the text\n\n  try {\n    var _text = elem.innerHTML;\n    var details = JSON.parse(_text); // add the deserialized text to the actor's property field.\n\n    if (details['properties']) {\n      insertProperties(actor, details['properties']);\n    }\n\n    if (details['links']) {\n      insertLinks(actor, details['links']);\n    }\n  } catch (e) {\n    _logger__WEBPACK_IMPORTED_MODULE_2__[\"log\"].error('error while parsing actor details text', e);\n  }\n};\nvar getActorProperty = function getActorProperty(actor, key) {\n  if (typeof actor !== 'undefined' && typeof actor.properties !== 'undefined') {\n    return actor.properties[key];\n  }\n\n  return undefined;\n};\nvar setTitle = function setTitle(titleWrap) {\n  title = titleWrap.text;\n  titleWrapped = titleWrap.wrap === undefined && autoWrap() || !!titleWrap.wrap;\n};\nvar apply = function apply(param) {\n  if (param instanceof Array) {\n    param.forEach(function (item) {\n      apply(item);\n    });\n  } else {\n    switch (param.type) {\n      case 'addParticipant':\n        addActor(param.actor, param.actor, param.description, 'participant');\n        break;\n\n      case 'addActor':\n        addActor(param.actor, param.actor, param.description, 'actor');\n        break;\n\n      case 'activeStart':\n        addSignal(param.actor, undefined, undefined, param.signalType);\n        break;\n\n      case 'activeEnd':\n        addSignal(param.actor, undefined, undefined, param.signalType);\n        break;\n\n      case 'addNote':\n        addNote(param.actor, param.placement, param.text);\n        break;\n\n      case 'addLinks':\n        addLinks(param.actor, param.text);\n        break;\n\n      case 'addALink':\n        addALink(param.actor, param.text);\n        break;\n\n      case 'addProperties':\n        addProperties(param.actor, param.text);\n        break;\n\n      case 'addDetails':\n        addDetails(param.actor, param.text);\n        break;\n\n      case 'addMessage':\n        addSignal(param.from, param.to, param.msg, param.signalType);\n        break;\n\n      case 'loopStart':\n        addSignal(undefined, undefined, param.loopText, param.signalType);\n        break;\n\n      case 'loopEnd':\n        addSignal(undefined, undefined, undefined, param.signalType);\n        break;\n\n      case 'rectStart':\n        addSignal(undefined, undefined, param.color, param.signalType);\n        break;\n\n      case 'rectEnd':\n        addSignal(undefined, undefined, undefined, param.signalType);\n        break;\n\n      case 'optStart':\n        addSignal(undefined, undefined, param.optText, param.signalType);\n        break;\n\n      case 'optEnd':\n        addSignal(undefined, undefined, undefined, param.signalType);\n        break;\n\n      case 'altStart':\n        addSignal(undefined, undefined, param.altText, param.signalType);\n        break;\n\n      case 'else':\n        addSignal(undefined, undefined, param.altText, param.signalType);\n        break;\n\n      case 'altEnd':\n        addSignal(undefined, undefined, undefined, param.signalType);\n        break;\n\n      case 'setTitle':\n        setTitle(param.text);\n        break;\n\n      case 'parStart':\n        addSignal(undefined, undefined, param.parText, param.signalType);\n        break;\n\n      case 'and':\n        addSignal(undefined, undefined, param.parText, param.signalType);\n        break;\n\n      case 'parEnd':\n        addSignal(undefined, undefined, undefined, param.signalType);\n        break;\n    }\n  }\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n  addActor: addActor,\n  addMessage: addMessage,\n  addSignal: addSignal,\n  addLinks: addLinks,\n  addDetails: addDetails,\n  addProperties: addProperties,\n  autoWrap: autoWrap,\n  setWrap: setWrap,\n  enableSequenceNumbers: enableSequenceNumbers,\n  showSequenceNumbers: showSequenceNumbers,\n  getMessages: getMessages,\n  getActors: getActors,\n  getActor: getActor,\n  getActorKeys: getActorKeys,\n  getActorProperty: getActorProperty,\n  getTitle: getTitle,\n  parseDirective: parseDirective,\n  getConfig: function getConfig() {\n    return _config__WEBPACK_IMPORTED_MODULE_1__[\"getConfig\"]().sequence;\n  },\n  getTitleWrapped: getTitleWrapped,\n  clear: clear,\n  parseMessage: parseMessage,\n  LINETYPE: LINETYPE,\n  ARROWTYPE: ARROWTYPE,\n  PLACEMENT: PLACEMENT,\n  addNote: addNote,\n  setTitle: setTitle,\n  apply: apply\n});\n\n/***/ }),\n\n/***/ \"./src/diagrams/sequence/sequenceRenderer.js\":\n/*!***************************************************!*\\\n  !*** ./src/diagrams/sequence/sequenceRenderer.js ***!\n  \\***************************************************/\n/*! exports provided: bounds, drawActors, drawActorsPopup, setConf, draw, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"bounds\", function() { return bounds; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"drawActors\", function() { return drawActors; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"drawActorsPopup\", function() { return drawActorsPopup; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"setConf\", function() { return setConf; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"draw\", function() { return draw; });\n/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3 */ \"./node_modules/d3/src/index.js\");\n/* harmony import */ var _svgDraw__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./svgDraw */ \"./src/diagrams/sequence/svgDraw.js\");\n/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../logger */ \"./src/logger.js\");\n/* harmony import */ var _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./parser/sequenceDiagram */ \"./src/diagrams/sequence/parser/sequenceDiagram.jison\");\n/* harmony import */ var _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _common_common__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../common/common */ \"./src/diagrams/common/common.js\");\n/* harmony import */ var _sequenceDb__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./sequenceDb */ \"./src/diagrams/sequence/sequenceDb.js\");\n/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../config */ \"./src/config.js\");\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../utils */ \"./src/utils.js\");\n\n\n\n\n\n\n\n\n_parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__[\"parser\"].yy = _sequenceDb__WEBPACK_IMPORTED_MODULE_5__[\"default\"];\nvar conf = {};\nvar bounds = {\n  data: {\n    startx: undefined,\n    stopx: undefined,\n    starty: undefined,\n    stopy: undefined\n  },\n  verticalPos: 0,\n  sequenceItems: [],\n  activations: [],\n  models: {\n    getHeight: function getHeight() {\n      return Math.max.apply(null, this.actors.length === 0 ? [0] : this.actors.map(function (actor) {\n        return actor.height || 0;\n      })) + (this.loops.length === 0 ? 0 : this.loops.map(function (it) {\n        return it.height || 0;\n      }).reduce(function (acc, h) {\n        return acc + h;\n      })) + (this.messages.length === 0 ? 0 : this.messages.map(function (it) {\n        return it.height || 0;\n      }).reduce(function (acc, h) {\n        return acc + h;\n      })) + (this.notes.length === 0 ? 0 : this.notes.map(function (it) {\n        return it.height || 0;\n      }).reduce(function (acc, h) {\n        return acc + h;\n      }));\n    },\n    clear: function clear() {\n      this.actors = [];\n      this.loops = [];\n      this.messages = [];\n      this.notes = [];\n    },\n    addActor: function addActor(actorModel) {\n      this.actors.push(actorModel);\n    },\n    addLoop: function addLoop(loopModel) {\n      this.loops.push(loopModel);\n    },\n    addMessage: function addMessage(msgModel) {\n      this.messages.push(msgModel);\n    },\n    addNote: function addNote(noteModel) {\n      this.notes.push(noteModel);\n    },\n    lastActor: function lastActor() {\n      return this.actors[this.actors.length - 1];\n    },\n    lastLoop: function lastLoop() {\n      return this.loops[this.loops.length - 1];\n    },\n    lastMessage: function lastMessage() {\n      return this.messages[this.messages.length - 1];\n    },\n    lastNote: function lastNote() {\n      return this.notes[this.notes.length - 1];\n    },\n    actors: [],\n    loops: [],\n    messages: [],\n    notes: []\n  },\n  init: function init() {\n    this.sequenceItems = [];\n    this.activations = [];\n    this.models.clear();\n    this.data = {\n      startx: undefined,\n      stopx: undefined,\n      starty: undefined,\n      stopy: undefined\n    };\n    this.verticalPos = 0;\n    setConf(_parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__[\"parser\"].yy.getConfig());\n  },\n  updateVal: function updateVal(obj, key, val, fun) {\n    if (typeof obj[key] === 'undefined') {\n      obj[key] = val;\n    } else {\n      obj[key] = fun(val, obj[key]);\n    }\n  },\n  updateBounds: function updateBounds(startx, starty, stopx, stopy) {\n    var _self = this;\n\n    var cnt = 0;\n\n    function updateFn(type) {\n      return function updateItemBounds(item) {\n        cnt++; // The loop sequenceItems is a stack so the biggest margins in the beginning of the sequenceItems\n\n        var n = _self.sequenceItems.length - cnt + 1;\n\n        _self.updateVal(item, 'starty', starty - n * conf.boxMargin, Math.min);\n\n        _self.updateVal(item, 'stopy', stopy + n * conf.boxMargin, Math.max);\n\n        _self.updateVal(bounds.data, 'startx', startx - n * conf.boxMargin, Math.min);\n\n        _self.updateVal(bounds.data, 'stopx', stopx + n * conf.boxMargin, Math.max);\n\n        if (!(type === 'activation')) {\n          _self.updateVal(item, 'startx', startx - n * conf.boxMargin, Math.min);\n\n          _self.updateVal(item, 'stopx', stopx + n * conf.boxMargin, Math.max);\n\n          _self.updateVal(bounds.data, 'starty', starty - n * conf.boxMargin, Math.min);\n\n          _self.updateVal(bounds.data, 'stopy', stopy + n * conf.boxMargin, Math.max);\n        }\n      };\n    }\n\n    this.sequenceItems.forEach(updateFn());\n    this.activations.forEach(updateFn('activation'));\n  },\n  insert: function insert(startx, starty, stopx, stopy) {\n    var _startx = Math.min(startx, stopx);\n\n    var _stopx = Math.max(startx, stopx);\n\n    var _starty = Math.min(starty, stopy);\n\n    var _stopy = Math.max(starty, stopy);\n\n    this.updateVal(bounds.data, 'startx', _startx, Math.min);\n    this.updateVal(bounds.data, 'starty', _starty, Math.min);\n    this.updateVal(bounds.data, 'stopx', _stopx, Math.max);\n    this.updateVal(bounds.data, 'stopy', _stopy, Math.max);\n    this.updateBounds(_startx, _starty, _stopx, _stopy);\n  },\n  newActivation: function newActivation(message, diagram, actors) {\n    var actorRect = actors[message.from.actor];\n    var stackedSize = actorActivations(message.from.actor).length || 0;\n    var x = actorRect.x + actorRect.width / 2 + (stackedSize - 1) * conf.activationWidth / 2;\n    this.activations.push({\n      startx: x,\n      starty: this.verticalPos + 2,\n      stopx: x + conf.activationWidth,\n      stopy: undefined,\n      actor: message.from.actor,\n      anchored: _svgDraw__WEBPACK_IMPORTED_MODULE_1__[\"default\"].anchorElement(diagram)\n    });\n  },\n  endActivation: function endActivation(message) {\n    // find most recent activation for given actor\n    var lastActorActivationIdx = this.activations.map(function (activation) {\n      return activation.actor;\n    }).lastIndexOf(message.from.actor);\n    return this.activations.splice(lastActorActivationIdx, 1)[0];\n  },\n  createLoop: function createLoop() {\n    var title = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {\n      message: undefined,\n      wrap: false,\n      width: undefined\n    };\n    var fill = arguments.length > 1 ? arguments[1] : undefined;\n    return {\n      startx: undefined,\n      starty: this.verticalPos,\n      stopx: undefined,\n      stopy: undefined,\n      title: title.message,\n      wrap: title.wrap,\n      width: title.width,\n      height: 0,\n      fill: fill\n    };\n  },\n  newLoop: function newLoop() {\n    var title = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {\n      message: undefined,\n      wrap: false,\n      width: undefined\n    };\n    var fill = arguments.length > 1 ? arguments[1] : undefined;\n    this.sequenceItems.push(this.createLoop(title, fill));\n  },\n  endLoop: function endLoop() {\n    return this.sequenceItems.pop();\n  },\n  addSectionToLoop: function addSectionToLoop(message) {\n    var loop = this.sequenceItems.pop();\n    loop.sections = loop.sections || [];\n    loop.sectionTitles = loop.sectionTitles || [];\n    loop.sections.push({\n      y: bounds.getVerticalPos(),\n      height: 0\n    });\n    loop.sectionTitles.push(message);\n    this.sequenceItems.push(loop);\n  },\n  bumpVerticalPos: function bumpVerticalPos(bump) {\n    this.verticalPos = this.verticalPos + bump;\n    this.data.stopy = this.verticalPos;\n  },\n  getVerticalPos: function getVerticalPos() {\n    return this.verticalPos;\n  },\n  getBounds: function getBounds() {\n    return {\n      bounds: this.data,\n      models: this.models\n    };\n  }\n};\n/**\n * Draws an note in the diagram with the attached line\n * @param elem - The diagram to draw to.\n * @param noteModel:{x: number, y: number, message: string, width: number} - startx: x axis start position, verticalPos: y axis position, messsage: the message to be shown, width: Set this with a custom width to override the default configured width.\n */\n\nvar drawNote = function drawNote(elem, noteModel) {\n  bounds.bumpVerticalPos(conf.boxMargin);\n  noteModel.height = conf.boxMargin;\n  noteModel.starty = bounds.getVerticalPos();\n  var rect = _svgDraw__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getNoteRect();\n  rect.x = noteModel.startx;\n  rect.y = noteModel.starty;\n  rect.width = noteModel.width || conf.width;\n  rect.class = 'note';\n  var g = elem.append('g');\n  var rectElem = _svgDraw__WEBPACK_IMPORTED_MODULE_1__[\"default\"].drawRect(g, rect);\n  var textObj = _svgDraw__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getTextObj();\n  textObj.x = noteModel.startx;\n  textObj.y = noteModel.starty;\n  textObj.width = rect.width;\n  textObj.dy = '1em';\n  textObj.text = noteModel.message;\n  textObj.class = 'noteText';\n  textObj.fontFamily = conf.noteFontFamily;\n  textObj.fontSize = conf.noteFontSize;\n  textObj.fontWeight = conf.noteFontWeight;\n  textObj.anchor = conf.noteAlign;\n  textObj.textMargin = conf.noteMargin;\n  textObj.valign = conf.noteAlign;\n  var textElem = Object(_svgDraw__WEBPACK_IMPORTED_MODULE_1__[\"drawText\"])(g, textObj);\n  var textHeight = Math.round(textElem.map(function (te) {\n    return (te._groups || te)[0][0].getBBox().height;\n  }).reduce(function (acc, curr) {\n    return acc + curr;\n  }));\n  rectElem.attr('height', textHeight + 2 * conf.noteMargin);\n  noteModel.height += textHeight + 2 * conf.noteMargin;\n  bounds.bumpVerticalPos(textHeight + 2 * conf.noteMargin);\n  noteModel.stopy = noteModel.starty + textHeight + 2 * conf.noteMargin;\n  noteModel.stopx = noteModel.startx + rect.width;\n  bounds.insert(noteModel.startx, noteModel.starty, noteModel.stopx, noteModel.stopy);\n  bounds.models.addNote(noteModel);\n};\n\nvar messageFont = function messageFont(cnf) {\n  return {\n    fontFamily: cnf.messageFontFamily,\n    fontSize: cnf.messageFontSize,\n    fontWeight: cnf.messageFontWeight\n  };\n};\n\nvar noteFont = function noteFont(cnf) {\n  return {\n    fontFamily: cnf.noteFontFamily,\n    fontSize: cnf.noteFontSize,\n    fontWeight: cnf.noteFontWeight\n  };\n};\n\nvar actorFont = function actorFont(cnf) {\n  return {\n    fontFamily: cnf.actorFontFamily,\n    fontSize: cnf.actorFontSize,\n    fontWeight: cnf.actorFontWeight\n  };\n};\n/**\n * Draws a message\n * @param g - the parent of the message element\n * @param msgModel - the model containing fields describing a message\n */\n\n\nvar drawMessage = function drawMessage(g, msgModel) {\n  bounds.bumpVerticalPos(10);\n  var startx = msgModel.startx,\n      stopx = msgModel.stopx,\n      starty = msgModel.starty,\n      message = msgModel.message,\n      type = msgModel.type,\n      sequenceIndex = msgModel.sequenceIndex;\n  var lines = _common_common__WEBPACK_IMPORTED_MODULE_4__[\"default\"].splitBreaks(message).length;\n  var textDims = _utils__WEBPACK_IMPORTED_MODULE_7__[\"default\"].calculateTextDimensions(message, messageFont(conf));\n  var lineHeight = textDims.height / lines;\n  msgModel.height += lineHeight;\n  bounds.bumpVerticalPos(lineHeight);\n  var textObj = _svgDraw__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getTextObj();\n  textObj.x = startx;\n  textObj.y = starty + 10;\n  textObj.width = stopx - startx;\n  textObj.class = 'messageText';\n  textObj.dy = '1em';\n  textObj.text = message;\n  textObj.fontFamily = conf.messageFontFamily;\n  textObj.fontSize = conf.messageFontSize;\n  textObj.fontWeight = conf.messageFontWeight;\n  textObj.anchor = conf.messageAlign;\n  textObj.valign = conf.messageAlign;\n  textObj.textMargin = conf.wrapPadding;\n  textObj.tspan = false;\n  Object(_svgDraw__WEBPACK_IMPORTED_MODULE_1__[\"drawText\"])(g, textObj);\n  var totalOffset = textDims.height - 10;\n  var textWidth = textDims.width;\n  var line, lineStarty;\n\n  if (startx === stopx) {\n    lineStarty = bounds.getVerticalPos() + totalOffset;\n\n    if (conf.rightAngles) {\n      line = g.append('path').attr('d', \"M  \".concat(startx, \",\").concat(lineStarty, \" H \").concat(startx + Math.max(conf.width / 2, textWidth / 2), \" V \").concat(lineStarty + 25, \" H \").concat(startx));\n    } else {\n      totalOffset += conf.boxMargin;\n      lineStarty = bounds.getVerticalPos() + totalOffset;\n      line = g.append('path').attr('d', 'M ' + startx + ',' + lineStarty + ' C ' + (startx + 60) + ',' + (lineStarty - 10) + ' ' + (startx + 60) + ',' + (lineStarty + 30) + ' ' + startx + ',' + (lineStarty + 20));\n    }\n\n    totalOffset += 30;\n    var dx = Math.max(textWidth / 2, conf.width / 2);\n    bounds.insert(startx - dx, bounds.getVerticalPos() - 10 + totalOffset, stopx + dx, bounds.getVerticalPos() + 30 + totalOffset);\n  } else {\n    totalOffset += conf.boxMargin;\n    lineStarty = bounds.getVerticalPos() + totalOffset;\n    line = g.append('line');\n    line.attr('x1', startx);\n    line.attr('y1', lineStarty);\n    line.attr('x2', stopx);\n    line.attr('y2', lineStarty);\n    bounds.insert(startx, lineStarty - 10, stopx, lineStarty);\n  } // Make an SVG Container\n  // Draw the line\n\n\n  if (type === _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__[\"parser\"].yy.LINETYPE.DOTTED || type === _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__[\"parser\"].yy.LINETYPE.DOTTED_CROSS || type === _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__[\"parser\"].yy.LINETYPE.DOTTED_POINT || type === _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__[\"parser\"].yy.LINETYPE.DOTTED_OPEN) {\n    line.style('stroke-dasharray', '3, 3');\n    line.attr('class', 'messageLine1');\n  } else {\n    line.attr('class', 'messageLine0');\n  }\n\n  var url = '';\n\n  if (conf.arrowMarkerAbsolute) {\n    url = window.location.protocol + '//' + window.location.host + window.location.pathname + window.location.search;\n    url = url.replace(/\\(/g, '\\\\(');\n    url = url.replace(/\\)/g, '\\\\)');\n  }\n\n  line.attr('stroke-width', 2);\n  line.attr('stroke', 'none'); // handled by theme/css anyway\n\n  line.style('fill', 'none'); // remove any fill colour\n\n  if (type === _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__[\"parser\"].yy.LINETYPE.SOLID || type === _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__[\"parser\"].yy.LINETYPE.DOTTED) {\n    line.attr('marker-end', 'url(' + url + '#arrowhead)');\n  }\n\n  if (type === _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__[\"parser\"].yy.LINETYPE.SOLID_POINT || type === _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__[\"parser\"].yy.LINETYPE.DOTTED_POINT) {\n    line.attr('marker-end', 'url(' + url + '#filled-head)');\n  }\n\n  if (type === _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__[\"parser\"].yy.LINETYPE.SOLID_CROSS || type === _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__[\"parser\"].yy.LINETYPE.DOTTED_CROSS) {\n    line.attr('marker-end', 'url(' + url + '#crosshead)');\n  } // add node number\n\n\n  if (_sequenceDb__WEBPACK_IMPORTED_MODULE_5__[\"default\"].showSequenceNumbers() || conf.showSequenceNumbers) {\n    line.attr('marker-start', 'url(' + url + '#sequencenumber)');\n    g.append('text').attr('x', startx).attr('y', lineStarty + 4).attr('font-family', 'sans-serif').attr('font-size', '12px').attr('text-anchor', 'middle').attr('textLength', '16px').attr('class', 'sequenceNumber').text(sequenceIndex);\n  }\n\n  bounds.bumpVerticalPos(totalOffset);\n  msgModel.height += totalOffset;\n  msgModel.stopy = msgModel.starty + msgModel.height;\n  bounds.insert(msgModel.fromBounds, msgModel.starty, msgModel.toBounds, msgModel.stopy);\n};\n\nvar drawActors = function drawActors(diagram, actors, actorKeys, verticalPos) {\n  // Draw the actors\n  var prevWidth = 0;\n  var prevMargin = 0;\n  var maxHeight = 0;\n\n  for (var i = 0; i < actorKeys.length; i++) {\n    var actor = actors[actorKeys[i]]; // Add some rendering data to the object\n\n    actor.width = actor.width || conf.width;\n    actor.height = Math.max(actor.height || conf.height, conf.height);\n    actor.margin = actor.margin || conf.actorMargin;\n    actor.x = prevWidth + prevMargin;\n    actor.y = verticalPos; // Draw the box with the attached line\n\n    var height = _svgDraw__WEBPACK_IMPORTED_MODULE_1__[\"default\"].drawActor(diagram, actor, conf);\n    maxHeight = Math.max(maxHeight, height);\n    bounds.insert(actor.x, verticalPos, actor.x + actor.width, actor.height);\n    prevWidth += actor.width;\n    prevMargin += actor.margin;\n    bounds.models.addActor(actor);\n  } // Add a margin between the actor boxes and the first arrow\n\n\n  bounds.bumpVerticalPos(maxHeight);\n};\nvar drawActorsPopup = function drawActorsPopup(diagram, actors, actorKeys) {\n  var maxHeight = 0;\n  var maxWidth = 0;\n\n  for (var i = 0; i < actorKeys.length; i++) {\n    var actor = actors[actorKeys[i]];\n    var minMenuWidth = getRequiredPopupWidth(actor);\n    var menuDimensions = _svgDraw__WEBPACK_IMPORTED_MODULE_1__[\"default\"].drawPopup(diagram, actor, minMenuWidth, conf, conf.forceMenus);\n\n    if (menuDimensions.height > maxHeight) {\n      maxHeight = menuDimensions.height;\n    }\n\n    if (menuDimensions.width + actor.x > maxWidth) {\n      maxWidth = menuDimensions.width + actor.x;\n    }\n  }\n\n  return {\n    maxHeight: maxHeight,\n    maxWidth: maxWidth\n  };\n};\nvar setConf = function setConf(cnf) {\n  Object(_utils__WEBPACK_IMPORTED_MODULE_7__[\"assignWithDepth\"])(conf, cnf);\n\n  if (cnf.fontFamily) {\n    conf.actorFontFamily = conf.noteFontFamily = conf.messageFontFamily = cnf.fontFamily;\n  }\n\n  if (cnf.fontSize) {\n    conf.actorFontSize = conf.noteFontSize = conf.messageFontSize = cnf.fontSize;\n  }\n\n  if (cnf.fontWeight) {\n    conf.actorFontWeight = conf.noteFontWeight = conf.messageFontWeight = cnf.fontWeight;\n  }\n};\n\nvar actorActivations = function actorActivations(actor) {\n  return bounds.activations.filter(function (activation) {\n    return activation.actor === actor;\n  });\n};\n\nvar activationBounds = function activationBounds(actor, actors) {\n  // handle multiple stacked activations for same actor\n  var actorObj = actors[actor];\n  var activations = actorActivations(actor);\n  var left = activations.reduce(function (acc, activation) {\n    return Math.min(acc, activation.startx);\n  }, actorObj.x + actorObj.width / 2);\n  var right = activations.reduce(function (acc, activation) {\n    return Math.max(acc, activation.stopx);\n  }, actorObj.x + actorObj.width / 2);\n  return [left, right];\n};\n\nfunction adjustLoopHeightForWrap(loopWidths, msg, preMargin, postMargin, addLoopFn) {\n  bounds.bumpVerticalPos(preMargin);\n  var heightAdjust = postMargin;\n\n  if (msg.id && msg.message && loopWidths[msg.id]) {\n    var loopWidth = loopWidths[msg.id].width;\n    var textConf = messageFont(conf);\n    msg.message = _utils__WEBPACK_IMPORTED_MODULE_7__[\"default\"].wrapLabel(\"[\".concat(msg.message, \"]\"), loopWidth - 2 * conf.wrapPadding, textConf);\n    msg.width = loopWidth;\n    msg.wrap = true; // const lines = common.splitBreaks(msg.message).length;\n\n    var textDims = _utils__WEBPACK_IMPORTED_MODULE_7__[\"default\"].calculateTextDimensions(msg.message, textConf);\n    var totalOffset = Math.max(textDims.height, conf.labelBoxHeight);\n    heightAdjust = postMargin + totalOffset;\n    _logger__WEBPACK_IMPORTED_MODULE_2__[\"log\"].debug(\"\".concat(totalOffset, \" - \").concat(msg.message));\n  }\n\n  addLoopFn(msg);\n  bounds.bumpVerticalPos(heightAdjust);\n}\n/**\n * Draws a sequenceDiagram in the tag with id: id based on the graph definition in text.\n * @param text\n * @param id\n */\n\n\nvar draw = function draw(text, id) {\n  conf = _config__WEBPACK_IMPORTED_MODULE_6__[\"getConfig\"]().sequence;\n  _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__[\"parser\"].yy.clear();\n  _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__[\"parser\"].yy.setWrap(conf.wrap);\n  _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__[\"parser\"].parse(text + '\\n');\n  bounds.init();\n  _logger__WEBPACK_IMPORTED_MODULE_2__[\"log\"].debug(\"C:\".concat(JSON.stringify(conf, null, 2)));\n  var diagram = Object(d3__WEBPACK_IMPORTED_MODULE_0__[\"select\"])(\"[id=\\\"\".concat(id, \"\\\"]\")); // Fetch data from the parsing\n\n  var actors = _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__[\"parser\"].yy.getActors();\n  var actorKeys = _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__[\"parser\"].yy.getActorKeys();\n  var messages = _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__[\"parser\"].yy.getMessages();\n  var title = _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__[\"parser\"].yy.getTitle();\n  var maxMessageWidthPerActor = getMaxMessageWidthPerActor(actors, messages);\n  conf.height = calculateActorMargins(actors, maxMessageWidthPerActor);\n  _svgDraw__WEBPACK_IMPORTED_MODULE_1__[\"default\"].insertComputerIcon(diagram);\n  _svgDraw__WEBPACK_IMPORTED_MODULE_1__[\"default\"].insertDatabaseIcon(diagram);\n  _svgDraw__WEBPACK_IMPORTED_MODULE_1__[\"default\"].insertClockIcon(diagram);\n  drawActors(diagram, actors, actorKeys, 0);\n  var loopWidths = calculateLoopBounds(messages, actors, maxMessageWidthPerActor); // The arrow head definition is attached to the svg once\n\n  _svgDraw__WEBPACK_IMPORTED_MODULE_1__[\"default\"].insertArrowHead(diagram);\n  _svgDraw__WEBPACK_IMPORTED_MODULE_1__[\"default\"].insertArrowCrossHead(diagram);\n  _svgDraw__WEBPACK_IMPORTED_MODULE_1__[\"default\"].insertArrowFilledHead(diagram);\n  _svgDraw__WEBPACK_IMPORTED_MODULE_1__[\"default\"].insertSequenceNumber(diagram);\n\n  function activeEnd(msg, verticalPos) {\n    var activationData = bounds.endActivation(msg);\n\n    if (activationData.starty + 18 > verticalPos) {\n      activationData.starty = verticalPos - 6;\n      verticalPos += 12;\n    }\n\n    _svgDraw__WEBPACK_IMPORTED_MODULE_1__[\"default\"].drawActivation(diagram, activationData, verticalPos, conf, actorActivations(msg.from.actor).length);\n    bounds.insert(activationData.startx, verticalPos - 10, activationData.stopx, verticalPos);\n  } // Draw the messages/signals\n\n\n  var sequenceIndex = 1;\n  messages.forEach(function (msg) {\n    var loopModel, noteModel, msgModel;\n\n    switch (msg.type) {\n      case _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__[\"parser\"].yy.LINETYPE.NOTE:\n        noteModel = msg.noteModel;\n        drawNote(diagram, noteModel);\n        break;\n\n      case _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__[\"parser\"].yy.LINETYPE.ACTIVE_START:\n        bounds.newActivation(msg, diagram, actors);\n        break;\n\n      case _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__[\"parser\"].yy.LINETYPE.ACTIVE_END:\n        activeEnd(msg, bounds.getVerticalPos());\n        break;\n\n      case _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__[\"parser\"].yy.LINETYPE.LOOP_START:\n        adjustLoopHeightForWrap(loopWidths, msg, conf.boxMargin, conf.boxMargin + conf.boxTextMargin, function (message) {\n          return bounds.newLoop(message);\n        });\n        break;\n\n      case _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__[\"parser\"].yy.LINETYPE.LOOP_END:\n        loopModel = bounds.endLoop();\n        _svgDraw__WEBPACK_IMPORTED_MODULE_1__[\"default\"].drawLoop(diagram, loopModel, 'loop', conf);\n        bounds.bumpVerticalPos(loopModel.stopy - bounds.getVerticalPos());\n        bounds.models.addLoop(loopModel);\n        break;\n\n      case _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__[\"parser\"].yy.LINETYPE.RECT_START:\n        adjustLoopHeightForWrap(loopWidths, msg, conf.boxMargin, conf.boxMargin, function (message) {\n          return bounds.newLoop(undefined, message.message);\n        });\n        break;\n\n      case _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__[\"parser\"].yy.LINETYPE.RECT_END:\n        loopModel = bounds.endLoop();\n        _svgDraw__WEBPACK_IMPORTED_MODULE_1__[\"default\"].drawBackgroundRect(diagram, loopModel);\n        bounds.models.addLoop(loopModel);\n        bounds.bumpVerticalPos(loopModel.stopy - bounds.getVerticalPos());\n        break;\n\n      case _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__[\"parser\"].yy.LINETYPE.OPT_START:\n        adjustLoopHeightForWrap(loopWidths, msg, conf.boxMargin, conf.boxMargin + conf.boxTextMargin, function (message) {\n          return bounds.newLoop(message);\n        });\n        break;\n\n      case _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__[\"parser\"].yy.LINETYPE.OPT_END:\n        loopModel = bounds.endLoop();\n        _svgDraw__WEBPACK_IMPORTED_MODULE_1__[\"default\"].drawLoop(diagram, loopModel, 'opt', conf);\n        bounds.bumpVerticalPos(loopModel.stopy - bounds.getVerticalPos());\n        bounds.models.addLoop(loopModel);\n        break;\n\n      case _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__[\"parser\"].yy.LINETYPE.ALT_START:\n        adjustLoopHeightForWrap(loopWidths, msg, conf.boxMargin, conf.boxMargin + conf.boxTextMargin, function (message) {\n          return bounds.newLoop(message);\n        });\n        break;\n\n      case _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__[\"parser\"].yy.LINETYPE.ALT_ELSE:\n        adjustLoopHeightForWrap(loopWidths, msg, conf.boxMargin + conf.boxTextMargin, conf.boxMargin, function (message) {\n          return bounds.addSectionToLoop(message);\n        });\n        break;\n\n      case _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__[\"parser\"].yy.LINETYPE.ALT_END:\n        loopModel = bounds.endLoop();\n        _svgDraw__WEBPACK_IMPORTED_MODULE_1__[\"default\"].drawLoop(diagram, loopModel, 'alt', conf);\n        bounds.bumpVerticalPos(loopModel.stopy - bounds.getVerticalPos());\n        bounds.models.addLoop(loopModel);\n        break;\n\n      case _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__[\"parser\"].yy.LINETYPE.PAR_START:\n        adjustLoopHeightForWrap(loopWidths, msg, conf.boxMargin, conf.boxMargin + conf.boxTextMargin, function (message) {\n          return bounds.newLoop(message);\n        });\n        break;\n\n      case _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__[\"parser\"].yy.LINETYPE.PAR_AND:\n        adjustLoopHeightForWrap(loopWidths, msg, conf.boxMargin + conf.boxTextMargin, conf.boxMargin, function (message) {\n          return bounds.addSectionToLoop(message);\n        });\n        break;\n\n      case _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__[\"parser\"].yy.LINETYPE.PAR_END:\n        loopModel = bounds.endLoop();\n        _svgDraw__WEBPACK_IMPORTED_MODULE_1__[\"default\"].drawLoop(diagram, loopModel, 'par', conf);\n        bounds.bumpVerticalPos(loopModel.stopy - bounds.getVerticalPos());\n        bounds.models.addLoop(loopModel);\n        break;\n\n      default:\n        try {\n          // lastMsg = msg\n          msgModel = msg.msgModel;\n          msgModel.starty = bounds.getVerticalPos();\n          msgModel.sequenceIndex = sequenceIndex;\n          drawMessage(diagram, msgModel);\n          bounds.models.addMessage(msgModel);\n        } catch (e) {\n          _logger__WEBPACK_IMPORTED_MODULE_2__[\"log\"].error('error while drawing message', e);\n        }\n\n    } // Increment sequence counter if msg.type is a line (and not another event like activation or note, etc)\n\n\n    if ([_parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__[\"parser\"].yy.LINETYPE.SOLID_OPEN, _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__[\"parser\"].yy.LINETYPE.DOTTED_OPEN, _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__[\"parser\"].yy.LINETYPE.SOLID, _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__[\"parser\"].yy.LINETYPE.DOTTED, _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__[\"parser\"].yy.LINETYPE.SOLID_CROSS, _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__[\"parser\"].yy.LINETYPE.DOTTED_CROSS, _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__[\"parser\"].yy.LINETYPE.SOLID_POINT, _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__[\"parser\"].yy.LINETYPE.DOTTED_POINT].includes(msg.type)) {\n      sequenceIndex++;\n    }\n  });\n\n  if (conf.mirrorActors) {\n    // Draw actors below diagram\n    bounds.bumpVerticalPos(conf.boxMargin * 2);\n    drawActors(diagram, actors, actorKeys, bounds.getVerticalPos());\n    bounds.bumpVerticalPos(conf.boxMargin);\n    Object(_svgDraw__WEBPACK_IMPORTED_MODULE_1__[\"fixLifeLineHeights\"])(diagram, bounds.getVerticalPos());\n  } // only draw popups for the top row of actors.\n\n\n  var requiredBoxSize = drawActorsPopup(diagram, actors, actorKeys);\n\n  var _bounds$getBounds = bounds.getBounds(),\n      box = _bounds$getBounds.bounds; // Adjust line height of actor lines now that the height of the diagram is known\n\n\n  _logger__WEBPACK_IMPORTED_MODULE_2__[\"log\"].debug('For line height fix Querying: #' + id + ' .actor-line');\n  var actorLines = Object(d3__WEBPACK_IMPORTED_MODULE_0__[\"selectAll\"])('#' + id + ' .actor-line');\n  actorLines.attr('y2', box.stopy); // Make sure the height of the diagram supports long menus.\n\n  var boxHeight = box.stopy - box.starty;\n\n  if (boxHeight < requiredBoxSize.maxHeight) {\n    boxHeight = requiredBoxSize.maxHeight;\n  }\n\n  var height = boxHeight + 2 * conf.diagramMarginY;\n\n  if (conf.mirrorActors) {\n    height = height - conf.boxMargin + conf.bottomMarginAdj;\n  } // Make sure the width of the diagram supports wide menus.\n\n\n  var boxWidth = box.stopx - box.startx;\n\n  if (boxWidth < requiredBoxSize.maxWidth) {\n    boxWidth = requiredBoxSize.maxWidth;\n  }\n\n  var width = boxWidth + 2 * conf.diagramMarginX;\n\n  if (title) {\n    diagram.append('text').text(title).attr('x', (box.stopx - box.startx) / 2 - 2 * conf.diagramMarginX).attr('y', -25);\n  }\n\n  Object(_utils__WEBPACK_IMPORTED_MODULE_7__[\"configureSvgSize\"])(diagram, height, width, conf.useMaxWidth);\n  var extraVertForTitle = title ? 40 : 0;\n  diagram.attr('viewBox', box.startx - conf.diagramMarginX + ' -' + (conf.diagramMarginY + extraVertForTitle) + ' ' + width + ' ' + (height + extraVertForTitle));\n  _logger__WEBPACK_IMPORTED_MODULE_2__[\"log\"].debug(\"models:\", bounds.models);\n};\n/**\n * Retrieves the max message width of each actor, supports signals (messages, loops)\n * and notes.\n *\n * It will enumerate each given message, and will determine its text width, in relation\n * to the actor it originates from, and destined to.\n *\n * @param actors - The actors map\n * @param messages - A list of message objects to iterate\n */\n\nvar getMaxMessageWidthPerActor = function getMaxMessageWidthPerActor(actors, messages) {\n  var maxMessageWidthPerActor = {};\n  messages.forEach(function (msg) {\n    if (actors[msg.to] && actors[msg.from]) {\n      var actor = actors[msg.to]; // If this is the first actor, and the message is left of it, no need to calculate the margin\n\n      if (msg.placement === _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__[\"parser\"].yy.PLACEMENT.LEFTOF && !actor.prevActor) {\n        return;\n      } // If this is the last actor, and the message is right of it, no need to calculate the margin\n\n\n      if (msg.placement === _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__[\"parser\"].yy.PLACEMENT.RIGHTOF && !actor.nextActor) {\n        return;\n      }\n\n      var isNote = msg.placement !== undefined;\n      var isMessage = !isNote;\n      var textFont = isNote ? noteFont(conf) : messageFont(conf);\n      var wrappedMessage = msg.wrap ? _utils__WEBPACK_IMPORTED_MODULE_7__[\"default\"].wrapLabel(msg.message, conf.width - 2 * conf.wrapPadding, textFont) : msg.message;\n      var messageDimensions = _utils__WEBPACK_IMPORTED_MODULE_7__[\"default\"].calculateTextDimensions(wrappedMessage, textFont);\n      var messageWidth = messageDimensions.width + 2 * conf.wrapPadding;\n      /*\n       * The following scenarios should be supported:\n       *\n       * - There's a message (non-note) between fromActor and toActor\n       *   - If fromActor is on the right and toActor is on the left, we should\n       *     define the toActor's margin\n       *   - If fromActor is on the left and toActor is on the right, we should\n       *     define the fromActor's margin\n       * - There's a note, in which case fromActor == toActor\n       *   - If the note is to the left of the actor, we should define the previous actor\n       *     margin\n       *   - If the note is on the actor, we should define both the previous and next actor\n       *     margins, each being the half of the note size\n       *   - If the note is on the right of the actor, we should define the current actor\n       *     margin\n       */\n\n      if (isMessage && msg.from === actor.nextActor) {\n        maxMessageWidthPerActor[msg.to] = Math.max(maxMessageWidthPerActor[msg.to] || 0, messageWidth);\n      } else if (isMessage && msg.from === actor.prevActor) {\n        maxMessageWidthPerActor[msg.from] = Math.max(maxMessageWidthPerActor[msg.from] || 0, messageWidth);\n      } else if (isMessage && msg.from === msg.to) {\n        maxMessageWidthPerActor[msg.from] = Math.max(maxMessageWidthPerActor[msg.from] || 0, messageWidth / 2);\n        maxMessageWidthPerActor[msg.to] = Math.max(maxMessageWidthPerActor[msg.to] || 0, messageWidth / 2);\n      } else if (msg.placement === _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__[\"parser\"].yy.PLACEMENT.RIGHTOF) {\n        maxMessageWidthPerActor[msg.from] = Math.max(maxMessageWidthPerActor[msg.from] || 0, messageWidth);\n      } else if (msg.placement === _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__[\"parser\"].yy.PLACEMENT.LEFTOF) {\n        maxMessageWidthPerActor[actor.prevActor] = Math.max(maxMessageWidthPerActor[actor.prevActor] || 0, messageWidth);\n      } else if (msg.placement === _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__[\"parser\"].yy.PLACEMENT.OVER) {\n        if (actor.prevActor) {\n          maxMessageWidthPerActor[actor.prevActor] = Math.max(maxMessageWidthPerActor[actor.prevActor] || 0, messageWidth / 2);\n        }\n\n        if (actor.nextActor) {\n          maxMessageWidthPerActor[msg.from] = Math.max(maxMessageWidthPerActor[msg.from] || 0, messageWidth / 2);\n        }\n      }\n    }\n  });\n  _logger__WEBPACK_IMPORTED_MODULE_2__[\"log\"].debug('maxMessageWidthPerActor:', maxMessageWidthPerActor);\n  return maxMessageWidthPerActor;\n};\n\nvar getRequiredPopupWidth = function getRequiredPopupWidth(actor) {\n  var requiredPopupWidth = 0;\n  var textFont = actorFont(conf);\n\n  for (var key in actor.links) {\n    var labelDimensions = _utils__WEBPACK_IMPORTED_MODULE_7__[\"default\"].calculateTextDimensions(key, textFont);\n    var labelWidth = labelDimensions.width + 2 * conf.wrapPadding + 2 * conf.boxMargin;\n\n    if (requiredPopupWidth < labelWidth) {\n      requiredPopupWidth = labelWidth;\n    }\n  }\n\n  return requiredPopupWidth;\n};\n/**\n * This will calculate the optimal margin for each given actor, for a given\n * actor->messageWidth map.\n *\n * An actor's margin is determined by the width of the actor, the width of the\n * largest message that originates from it, and the configured conf.actorMargin.\n *\n * @param actors - The actors map to calculate margins for\n * @param actorToMessageWidth - A map of actor key -> max message width it holds\n */\n\n\nvar calculateActorMargins = function calculateActorMargins(actors, actorToMessageWidth) {\n  var maxHeight = 0;\n  Object.keys(actors).forEach(function (prop) {\n    var actor = actors[prop];\n\n    if (actor.wrap) {\n      actor.description = _utils__WEBPACK_IMPORTED_MODULE_7__[\"default\"].wrapLabel(actor.description, conf.width - 2 * conf.wrapPadding, actorFont(conf));\n    }\n\n    var actDims = _utils__WEBPACK_IMPORTED_MODULE_7__[\"default\"].calculateTextDimensions(actor.description, actorFont(conf));\n    actor.width = actor.wrap ? conf.width : Math.max(conf.width, actDims.width + 2 * conf.wrapPadding);\n    actor.height = actor.wrap ? Math.max(actDims.height, conf.height) : conf.height;\n    maxHeight = Math.max(maxHeight, actor.height);\n  });\n\n  for (var actorKey in actorToMessageWidth) {\n    var actor = actors[actorKey];\n\n    if (!actor) {\n      continue;\n    }\n\n    var nextActor = actors[actor.nextActor]; // No need to space out an actor that doesn't have a next link\n\n    if (!nextActor) {\n      continue;\n    }\n\n    var messageWidth = actorToMessageWidth[actorKey];\n    var actorWidth = messageWidth + conf.actorMargin - actor.width / 2 - nextActor.width / 2;\n    actor.margin = Math.max(actorWidth, conf.actorMargin);\n  }\n\n  return Math.max(maxHeight, conf.height);\n};\n\nvar buildNoteModel = function buildNoteModel(msg, actors) {\n  var startx = actors[msg.from].x;\n  var stopx = actors[msg.to].x;\n  var shouldWrap = msg.wrap && msg.message;\n  var textDimensions = _utils__WEBPACK_IMPORTED_MODULE_7__[\"default\"].calculateTextDimensions(shouldWrap ? _utils__WEBPACK_IMPORTED_MODULE_7__[\"default\"].wrapLabel(msg.message, conf.width, noteFont(conf)) : msg.message, noteFont(conf));\n  var noteModel = {\n    width: shouldWrap ? conf.width : Math.max(conf.width, textDimensions.width + 2 * conf.noteMargin),\n    height: 0,\n    startx: actors[msg.from].x,\n    stopx: 0,\n    starty: 0,\n    stopy: 0,\n    message: msg.message\n  };\n\n  if (msg.placement === _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__[\"parser\"].yy.PLACEMENT.RIGHTOF) {\n    noteModel.width = shouldWrap ? Math.max(conf.width, textDimensions.width) : Math.max(actors[msg.from].width / 2 + actors[msg.to].width / 2, textDimensions.width + 2 * conf.noteMargin);\n    noteModel.startx = startx + (actors[msg.from].width + conf.actorMargin) / 2;\n  } else if (msg.placement === _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__[\"parser\"].yy.PLACEMENT.LEFTOF) {\n    noteModel.width = shouldWrap ? Math.max(conf.width, textDimensions.width + 2 * conf.noteMargin) : Math.max(actors[msg.from].width / 2 + actors[msg.to].width / 2, textDimensions.width + 2 * conf.noteMargin);\n    noteModel.startx = startx - noteModel.width + (actors[msg.from].width - conf.actorMargin) / 2;\n  } else if (msg.to === msg.from) {\n    textDimensions = _utils__WEBPACK_IMPORTED_MODULE_7__[\"default\"].calculateTextDimensions(shouldWrap ? _utils__WEBPACK_IMPORTED_MODULE_7__[\"default\"].wrapLabel(msg.message, Math.max(conf.width, actors[msg.from].width), noteFont(conf)) : msg.message, noteFont(conf));\n    noteModel.width = shouldWrap ? Math.max(conf.width, actors[msg.from].width) : Math.max(actors[msg.from].width, conf.width, textDimensions.width + 2 * conf.noteMargin);\n    noteModel.startx = startx + (actors[msg.from].width - noteModel.width) / 2;\n  } else {\n    noteModel.width = Math.abs(startx + actors[msg.from].width / 2 - (stopx + actors[msg.to].width / 2)) + conf.actorMargin;\n    noteModel.startx = startx < stopx ? startx + actors[msg.from].width / 2 - conf.actorMargin / 2 : stopx + actors[msg.to].width / 2 - conf.actorMargin / 2;\n  }\n\n  if (shouldWrap) {\n    noteModel.message = _utils__WEBPACK_IMPORTED_MODULE_7__[\"default\"].wrapLabel(msg.message, noteModel.width - 2 * conf.wrapPadding, noteFont(conf));\n  }\n\n  _logger__WEBPACK_IMPORTED_MODULE_2__[\"log\"].debug(\"NM:[\".concat(noteModel.startx, \",\").concat(noteModel.stopx, \",\").concat(noteModel.starty, \",\").concat(noteModel.stopy, \":\").concat(noteModel.width, \",\").concat(noteModel.height, \"=\").concat(msg.message, \"]\"));\n  return noteModel;\n};\n\nvar buildMessageModel = function buildMessageModel(msg, actors) {\n  var process = false;\n\n  if ([_parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__[\"parser\"].yy.LINETYPE.SOLID_OPEN, _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__[\"parser\"].yy.LINETYPE.DOTTED_OPEN, _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__[\"parser\"].yy.LINETYPE.SOLID, _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__[\"parser\"].yy.LINETYPE.DOTTED, _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__[\"parser\"].yy.LINETYPE.SOLID_CROSS, _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__[\"parser\"].yy.LINETYPE.DOTTED_CROSS, _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__[\"parser\"].yy.LINETYPE.SOLID_POINT, _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__[\"parser\"].yy.LINETYPE.DOTTED_POINT].includes(msg.type)) {\n    process = true;\n  }\n\n  if (!process) {\n    return {};\n  }\n\n  var fromBounds = activationBounds(msg.from, actors);\n  var toBounds = activationBounds(msg.to, actors);\n  var fromIdx = fromBounds[0] <= toBounds[0] ? 1 : 0;\n  var toIdx = fromBounds[0] < toBounds[0] ? 0 : 1;\n  var allBounds = fromBounds.concat(toBounds);\n  var boundedWidth = Math.abs(toBounds[toIdx] - fromBounds[fromIdx]);\n\n  if (msg.wrap && msg.message) {\n    msg.message = _utils__WEBPACK_IMPORTED_MODULE_7__[\"default\"].wrapLabel(msg.message, Math.max(boundedWidth + 2 * conf.wrapPadding, conf.width), messageFont(conf));\n  }\n\n  var msgDims = _utils__WEBPACK_IMPORTED_MODULE_7__[\"default\"].calculateTextDimensions(msg.message, messageFont(conf));\n  return {\n    width: Math.max(msg.wrap ? 0 : msgDims.width + 2 * conf.wrapPadding, boundedWidth + 2 * conf.wrapPadding, conf.width),\n    height: 0,\n    startx: fromBounds[fromIdx],\n    stopx: toBounds[toIdx],\n    starty: 0,\n    stopy: 0,\n    message: msg.message,\n    type: msg.type,\n    wrap: msg.wrap,\n    fromBounds: Math.min.apply(null, allBounds),\n    toBounds: Math.max.apply(null, allBounds)\n  };\n};\n\nvar calculateLoopBounds = function calculateLoopBounds(messages, actors) {\n  var loops = {};\n  var stack = [];\n  var current, noteModel, msgModel;\n  messages.forEach(function (msg) {\n    msg.id = _utils__WEBPACK_IMPORTED_MODULE_7__[\"default\"].random({\n      length: 10\n    });\n\n    switch (msg.type) {\n      case _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__[\"parser\"].yy.LINETYPE.LOOP_START:\n      case _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__[\"parser\"].yy.LINETYPE.ALT_START:\n      case _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__[\"parser\"].yy.LINETYPE.OPT_START:\n      case _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__[\"parser\"].yy.LINETYPE.PAR_START:\n        stack.push({\n          id: msg.id,\n          msg: msg.message,\n          from: Number.MAX_SAFE_INTEGER,\n          to: Number.MIN_SAFE_INTEGER,\n          width: 0\n        });\n        break;\n\n      case _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__[\"parser\"].yy.LINETYPE.ALT_ELSE:\n      case _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__[\"parser\"].yy.LINETYPE.PAR_AND:\n        if (msg.message) {\n          current = stack.pop();\n          loops[current.id] = current;\n          loops[msg.id] = current;\n          stack.push(current);\n        }\n\n        break;\n\n      case _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__[\"parser\"].yy.LINETYPE.LOOP_END:\n      case _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__[\"parser\"].yy.LINETYPE.ALT_END:\n      case _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__[\"parser\"].yy.LINETYPE.OPT_END:\n      case _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__[\"parser\"].yy.LINETYPE.PAR_END:\n        current = stack.pop();\n        loops[current.id] = current;\n        break;\n\n      case _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__[\"parser\"].yy.LINETYPE.ACTIVE_START:\n        {\n          var actorRect = actors[msg.from ? msg.from.actor : msg.to.actor];\n          var stackedSize = actorActivations(msg.from ? msg.from.actor : msg.to.actor).length;\n          var x = actorRect.x + actorRect.width / 2 + (stackedSize - 1) * conf.activationWidth / 2;\n          var toAdd = {\n            startx: x,\n            stopx: x + conf.activationWidth,\n            actor: msg.from.actor,\n            enabled: true\n          };\n          bounds.activations.push(toAdd);\n        }\n        break;\n\n      case _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__[\"parser\"].yy.LINETYPE.ACTIVE_END:\n        {\n          var lastActorActivationIdx = bounds.activations.map(function (a) {\n            return a.actor;\n          }).lastIndexOf(msg.from.actor);\n          delete bounds.activations.splice(lastActorActivationIdx, 1)[0];\n        }\n        break;\n    }\n\n    var isNote = msg.placement !== undefined;\n\n    if (isNote) {\n      noteModel = buildNoteModel(msg, actors);\n      msg.noteModel = noteModel;\n      stack.forEach(function (stk) {\n        current = stk;\n        current.from = Math.min(current.from, noteModel.startx);\n        current.to = Math.max(current.to, noteModel.startx + noteModel.width);\n        current.width = Math.max(current.width, Math.abs(current.from - current.to)) - conf.labelBoxWidth;\n      });\n    } else {\n      msgModel = buildMessageModel(msg, actors);\n      msg.msgModel = msgModel;\n\n      if (msgModel.startx && msgModel.stopx && stack.length > 0) {\n        stack.forEach(function (stk) {\n          current = stk;\n\n          if (msgModel.startx === msgModel.stopx) {\n            var from = actors[msg.from];\n            var to = actors[msg.to];\n            current.from = Math.min(from.x - msgModel.width / 2, from.x - from.width / 2, current.from);\n            current.to = Math.max(to.x + msgModel.width / 2, to.x + from.width / 2, current.to);\n            current.width = Math.max(current.width, Math.abs(current.to - current.from)) - conf.labelBoxWidth;\n          } else {\n            current.from = Math.min(msgModel.startx, current.from);\n            current.to = Math.max(msgModel.stopx, current.to);\n            current.width = Math.max(current.width, msgModel.width) - conf.labelBoxWidth;\n          }\n        });\n      }\n    }\n  });\n  bounds.activations = [];\n  _logger__WEBPACK_IMPORTED_MODULE_2__[\"log\"].debug('Loop type widths:', loops);\n  return loops;\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n  bounds: bounds,\n  drawActors: drawActors,\n  drawActorsPopup: drawActorsPopup,\n  setConf: setConf,\n  draw: draw\n});\n\n/***/ }),\n\n/***/ \"./src/diagrams/sequence/styles.js\":\n/*!*****************************************!*\\\n  !*** ./src/diagrams/sequence/styles.js ***!\n  \\*****************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\nvar getStyles = function getStyles(options) {\n  return \".actor {\\n    stroke: \".concat(options.actorBorder, \";\\n    fill: \").concat(options.actorBkg, \";\\n  }\\n\\n  text.actor > tspan {\\n    fill: \").concat(options.actorTextColor, \";\\n    stroke: none;\\n  }\\n\\n  .actor-line {\\n    stroke: \").concat(options.actorLineColor, \";\\n  }\\n\\n  .messageLine0 {\\n    stroke-width: 1.5;\\n    stroke-dasharray: none;\\n    stroke: \").concat(options.signalColor, \";\\n  }\\n\\n  .messageLine1 {\\n    stroke-width: 1.5;\\n    stroke-dasharray: 2, 2;\\n    stroke: \").concat(options.signalColor, \";\\n  }\\n\\n  #arrowhead path {\\n    fill: \").concat(options.signalColor, \";\\n    stroke: \").concat(options.signalColor, \";\\n  }\\n\\n  .sequenceNumber {\\n    fill: \").concat(options.sequenceNumberColor, \";\\n  }\\n\\n  #sequencenumber {\\n    fill: \").concat(options.signalColor, \";\\n  }\\n\\n  #crosshead path {\\n    fill: \").concat(options.signalColor, \";\\n    stroke: \").concat(options.signalColor, \";\\n  }\\n\\n  .messageText {\\n    fill: \").concat(options.signalTextColor, \";\\n    stroke: \").concat(options.signalTextColor, \";\\n  }\\n\\n  .labelBox {\\n    stroke: \").concat(options.labelBoxBorderColor, \";\\n    fill: \").concat(options.labelBoxBkgColor, \";\\n  }\\n\\n  .labelText, .labelText > tspan {\\n    fill: \").concat(options.labelTextColor, \";\\n    stroke: none;\\n  }\\n\\n  .loopText, .loopText > tspan {\\n    fill: \").concat(options.loopTextColor, \";\\n    stroke: none;\\n  }\\n\\n  .loopLine {\\n    stroke-width: 2px;\\n    stroke-dasharray: 2, 2;\\n    stroke: \").concat(options.labelBoxBorderColor, \";\\n    fill: \").concat(options.labelBoxBorderColor, \";\\n  }\\n\\n  .note {\\n    //stroke: #decc93;\\n    stroke: \").concat(options.noteBorderColor, \";\\n    fill: \").concat(options.noteBkgColor, \";\\n  }\\n\\n  .noteText, .noteText > tspan {\\n    fill: \").concat(options.noteTextColor, \";\\n    stroke: none;\\n  }\\n\\n  .activation0 {\\n    fill: \").concat(options.activationBkgColor, \";\\n    stroke: \").concat(options.activationBorderColor, \";\\n  }\\n\\n  .activation1 {\\n    fill: \").concat(options.activationBkgColor, \";\\n    stroke: \").concat(options.activationBorderColor, \";\\n  }\\n\\n  .activation2 {\\n    fill: \").concat(options.activationBkgColor, \";\\n    stroke: \").concat(options.activationBorderColor, \";\\n  }\\n\\n  .actorPopupMenu {\\n    position: absolute;\\n  }\\n\\n  .actorPopupMenuPanel {\\n    position: absolute;\\n    fill: \").concat(options.actorBkg, \";\\n    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);\\n    filter: drop-shadow(3px 5px 2px rgb(0 0 0 / 0.4));\\n}\\n  .actor-man line {\\n    stroke: \").concat(options.actorBorder, \";\\n    fill: \").concat(options.actorBkg, \";\\n  }\\n  .actor-man circle, line {\\n    stroke: \").concat(options.actorBorder, \";\\n    fill: \").concat(options.actorBkg, \";\\n    stroke-width: 2px;\\n  }\\n\");\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (getStyles);\n\n/***/ }),\n\n/***/ \"./src/diagrams/sequence/svgDraw.js\":\n/*!******************************************!*\\\n  !*** ./src/diagrams/sequence/svgDraw.js ***!\n  \\******************************************/\n/*! exports provided: drawRect, drawPopup, drawImage, drawEmbeddedImage, popupMenu, popdownMenu, drawText, drawLabel, fixLifeLineHeights, drawActor, anchorElement, drawActivation, drawLoop, drawBackgroundRect, insertDatabaseIcon, insertComputerIcon, insertClockIcon, insertArrowHead, insertArrowFilledHead, insertSequenceNumber, insertArrowCrossHead, getTextObj, getNoteRect, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"drawRect\", function() { return drawRect; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"drawPopup\", function() { return drawPopup; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"drawImage\", function() { return drawImage; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"drawEmbeddedImage\", function() { return drawEmbeddedImage; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"popupMenu\", function() { return popupMenu; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"popdownMenu\", function() { return popdownMenu; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"drawText\", function() { return drawText; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"drawLabel\", function() { return drawLabel; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"fixLifeLineHeights\", function() { return fixLifeLineHeights; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"drawActor\", function() { return drawActor; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"anchorElement\", function() { return anchorElement; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"drawActivation\", function() { return drawActivation; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"drawLoop\", function() { return drawLoop; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"drawBackgroundRect\", function() { return drawBackgroundRect; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"insertDatabaseIcon\", function() { return insertDatabaseIcon; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"insertComputerIcon\", function() { return insertComputerIcon; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"insertClockIcon\", function() { return insertClockIcon; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"insertArrowHead\", function() { return insertArrowHead; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"insertArrowFilledHead\", function() { return insertArrowFilledHead; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"insertSequenceNumber\", function() { return insertSequenceNumber; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"insertArrowCrossHead\", function() { return insertArrowCrossHead; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getTextObj\", function() { return getTextObj; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getNoteRect\", function() { return getNoteRect; });\n/* harmony import */ var _common_common__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../common/common */ \"./src/diagrams/common/common.js\");\n\nvar drawRect = function drawRect(elem, rectData) {\n  var rectElem = elem.append('rect');\n  rectElem.attr('x', rectData.x);\n  rectElem.attr('y', rectData.y);\n  rectElem.attr('fill', rectData.fill);\n  rectElem.attr('stroke', rectData.stroke);\n  rectElem.attr('width', rectData.width);\n  rectElem.attr('height', rectData.height);\n  rectElem.attr('rx', rectData.rx);\n  rectElem.attr('ry', rectData.ry);\n\n  if (typeof rectData.class !== 'undefined') {\n    rectElem.attr('class', rectData.class);\n  }\n\n  return rectElem;\n};\n\nvar sanitizeUrl = function sanitizeUrl(s) {\n  return s.replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/javascript:/g, '');\n};\n\nvar drawPopup = function drawPopup(elem, actor, minMenuWidth, textAttrs, forceMenus) {\n  if (actor.links === undefined || actor.links === null || Object.keys(actor.links).length === 0) {\n    return {\n      height: 0,\n      width: 0\n    };\n  }\n\n  var links = actor.links;\n  var actorCnt = actor.actorCnt;\n  var rectData = actor.rectData;\n  var displayValue = 'none';\n\n  if (forceMenus) {\n    displayValue = 'block !important';\n  }\n\n  var g = elem.append('g');\n  g.attr('id', 'actor' + actorCnt + '_popup');\n  g.attr('class', 'actorPopupMenu');\n  g.attr('display', displayValue);\n  g.attr('onmouseover', popupMenu('actor' + actorCnt + '_popup'));\n  g.attr('onmouseout', popdownMenu('actor' + actorCnt + '_popup'));\n  var actorClass = '';\n\n  if (typeof rectData.class !== 'undefined') {\n    actorClass = ' ' + rectData.class;\n  }\n\n  var menuWidth = rectData.width > minMenuWidth ? rectData.width : minMenuWidth;\n  var rectElem = g.append('rect');\n  rectElem.attr('class', 'actorPopupMenuPanel' + actorClass);\n  rectElem.attr('x', rectData.x);\n  rectElem.attr('y', rectData.height);\n  rectElem.attr('fill', rectData.fill);\n  rectElem.attr('stroke', rectData.stroke);\n  rectElem.attr('width', menuWidth);\n  rectElem.attr('height', rectData.height);\n  rectElem.attr('rx', rectData.rx);\n  rectElem.attr('ry', rectData.ry);\n\n  if (links != null) {\n    var linkY = 20;\n\n    for (var key in links) {\n      var linkElem = g.append('a');\n      var sanitizedLink = sanitizeUrl(links[key]);\n      linkElem.attr('xlink:href', sanitizedLink);\n      linkElem.attr('target', '_blank');\n\n      _drawMenuItemTextCandidateFunc(textAttrs)(key, linkElem, rectData.x + 10, rectData.height + linkY, menuWidth, 20, {\n        class: 'actor'\n      }, textAttrs);\n\n      linkY += 30;\n    }\n  }\n\n  rectElem.attr('height', linkY);\n  return {\n    height: rectData.height + linkY,\n    width: menuWidth\n  };\n};\nvar drawImage = function drawImage(elem, x, y, link) {\n  var imageElem = elem.append('image');\n  imageElem.attr('x', x);\n  imageElem.attr('y', y);\n  var sanitizedLink = sanitizeUrl(link);\n  imageElem.attr('xlink:href', sanitizedLink);\n};\nvar drawEmbeddedImage = function drawEmbeddedImage(elem, x, y, link) {\n  var imageElem = elem.append('use');\n  imageElem.attr('x', x);\n  imageElem.attr('y', y);\n  var sanitizedLink = sanitizeUrl(link);\n  imageElem.attr('xlink:href', '#' + sanitizedLink);\n};\nvar popupMenu = function popupMenu(popid) {\n  return \"var pu = document.getElementById('\" + popid + \"'); if (pu != null) { pu.style.display = 'block'; }\";\n};\nvar popdownMenu = function popdownMenu(popid) {\n  return \"var pu = document.getElementById('\" + popid + \"'); if (pu != null) { pu.style.display = 'none'; }\";\n};\nvar drawText = function drawText(elem, textData) {\n  var prevTextHeight = 0,\n      textHeight = 0;\n  var lines = textData.text.split(_common_common__WEBPACK_IMPORTED_MODULE_0__[\"default\"].lineBreakRegex);\n  var textElems = [];\n  var dy = 0;\n\n  var yfunc = function yfunc() {\n    return textData.y;\n  };\n\n  if (typeof textData.valign !== 'undefined' && typeof textData.textMargin !== 'undefined' && textData.textMargin > 0) {\n    switch (textData.valign) {\n      case 'top':\n      case 'start':\n        yfunc = function yfunc() {\n          return Math.round(textData.y + textData.textMargin);\n        };\n\n        break;\n\n      case 'middle':\n      case 'center':\n        yfunc = function yfunc() {\n          return Math.round(textData.y + (prevTextHeight + textHeight + textData.textMargin) / 2);\n        };\n\n        break;\n\n      case 'bottom':\n      case 'end':\n        yfunc = function yfunc() {\n          return Math.round(textData.y + (prevTextHeight + textHeight + 2 * textData.textMargin) - textData.textMargin);\n        };\n\n        break;\n    }\n  }\n\n  if (typeof textData.anchor !== 'undefined' && typeof textData.textMargin !== 'undefined' && typeof textData.width !== 'undefined') {\n    switch (textData.anchor) {\n      case 'left':\n      case 'start':\n        textData.x = Math.round(textData.x + textData.textMargin);\n        textData.anchor = 'start';\n        textData.dominantBaseline = 'text-after-edge';\n        textData.alignmentBaseline = 'middle';\n        break;\n\n      case 'middle':\n      case 'center':\n        textData.x = Math.round(textData.x + textData.width / 2);\n        textData.anchor = 'middle';\n        textData.dominantBaseline = 'middle';\n        textData.alignmentBaseline = 'middle';\n        break;\n\n      case 'right':\n      case 'end':\n        textData.x = Math.round(textData.x + textData.width - textData.textMargin);\n        textData.anchor = 'end';\n        textData.dominantBaseline = 'text-before-edge';\n        textData.alignmentBaseline = 'middle';\n        break;\n    }\n  }\n\n  for (var i = 0; i < lines.length; i++) {\n    var line = lines[i];\n\n    if (typeof textData.textMargin !== 'undefined' && textData.textMargin === 0 && typeof textData.fontSize !== 'undefined') {\n      dy = i * textData.fontSize;\n    }\n\n    var textElem = elem.append('text');\n    textElem.attr('x', textData.x);\n    textElem.attr('y', yfunc());\n\n    if (typeof textData.anchor !== 'undefined') {\n      textElem.attr('text-anchor', textData.anchor).attr('dominant-baseline', textData.dominantBaseline).attr('alignment-baseline', textData.alignmentBaseline);\n    }\n\n    if (typeof textData.fontFamily !== 'undefined') {\n      textElem.style('font-family', textData.fontFamily);\n    }\n\n    if (typeof textData.fontSize !== 'undefined') {\n      textElem.style('font-size', textData.fontSize);\n    }\n\n    if (typeof textData.fontWeight !== 'undefined') {\n      textElem.style('font-weight', textData.fontWeight);\n    }\n\n    if (typeof textData.fill !== 'undefined') {\n      textElem.attr('fill', textData.fill);\n    }\n\n    if (typeof textData.class !== 'undefined') {\n      textElem.attr('class', textData.class);\n    }\n\n    if (typeof textData.dy !== 'undefined') {\n      textElem.attr('dy', textData.dy);\n    } else if (dy !== 0) {\n      textElem.attr('dy', dy);\n    }\n\n    if (textData.tspan) {\n      var span = textElem.append('tspan');\n      span.attr('x', textData.x);\n\n      if (typeof textData.fill !== 'undefined') {\n        span.attr('fill', textData.fill);\n      }\n\n      span.text(line);\n    } else {\n      textElem.text(line);\n    }\n\n    if (typeof textData.valign !== 'undefined' && typeof textData.textMargin !== 'undefined' && textData.textMargin > 0) {\n      textHeight += (textElem._groups || textElem)[0][0].getBBox().height;\n      prevTextHeight = textHeight;\n    }\n\n    textElems.push(textElem);\n  }\n\n  return textElems;\n};\nvar drawLabel = function drawLabel(elem, txtObject) {\n  function genPoints(x, y, width, height, cut) {\n    return x + ',' + y + ' ' + (x + width) + ',' + y + ' ' + (x + width) + ',' + (y + height - cut) + ' ' + (x + width - cut * 1.2) + ',' + (y + height) + ' ' + x + ',' + (y + height);\n  }\n\n  var polygon = elem.append('polygon');\n  polygon.attr('points', genPoints(txtObject.x, txtObject.y, txtObject.width, txtObject.height, 7));\n  polygon.attr('class', 'labelBox');\n  txtObject.y = txtObject.y + txtObject.height / 2;\n  drawText(elem, txtObject);\n  return polygon;\n};\nvar actorCnt = -1;\nvar fixLifeLineHeights = function fixLifeLineHeights(diagram, bounds) {\n  if (!diagram.selectAll) return;\n  diagram.selectAll('.actor-line').attr('class', '200').attr('y2', bounds - 55);\n};\n/**\n * Draws an actor in the diagram with the attached line\n * @param elem - The diagram we'll draw to.\n * @param actor - The actor to draw.\n * @param conf - drawText implementation discriminator object\n */\n\nvar drawActorTypeParticipant = function drawActorTypeParticipant(elem, actor, conf) {\n  var center = actor.x + actor.width / 2;\n  var boxpluslineGroup = elem.append('g');\n  var g = boxpluslineGroup;\n\n  if (actor.y === 0) {\n    actorCnt++;\n    g.append('line').attr('id', 'actor' + actorCnt).attr('x1', center).attr('y1', 5).attr('x2', center).attr('y2', 2000).attr('class', 'actor-line').attr('stroke-width', '0.5px').attr('stroke', '#999');\n    g = boxpluslineGroup.append('g');\n    actor.actorCnt = actorCnt;\n\n    if (actor.links != null) {\n      g.attr('onmouseover', popupMenu('actor' + actorCnt + '_popup'));\n      g.attr('onmouseout', popdownMenu('actor' + actorCnt + '_popup'));\n    }\n  }\n\n  var rect = getNoteRect();\n  var cssclass = 'actor';\n\n  if (actor.properties != null && actor.properties['class']) {\n    cssclass = actor.properties['class'];\n  } else {\n    rect.fill = '#eaeaea';\n  }\n\n  rect.x = actor.x;\n  rect.y = actor.y;\n  rect.width = actor.width;\n  rect.height = actor.height;\n  rect.class = cssclass;\n  rect.rx = 3;\n  rect.ry = 3;\n  var rectElem = drawRect(g, rect);\n  actor.rectData = rect;\n\n  if (actor.properties != null && actor.properties['icon']) {\n    var iconSrc = actor.properties['icon'].trim();\n\n    if (iconSrc.charAt(0) === '@') {\n      drawEmbeddedImage(g, rect.x + rect.width - 20, rect.y + 10, iconSrc.substr(1));\n    } else {\n      drawImage(g, rect.x + rect.width - 20, rect.y + 10, iconSrc);\n    }\n  }\n\n  _drawTextCandidateFunc(conf)(actor.description, g, rect.x, rect.y, rect.width, rect.height, {\n    class: 'actor'\n  }, conf);\n\n  var height = actor.height;\n\n  if (rectElem.node) {\n    var bounds = rectElem.node().getBBox();\n    actor.height = bounds.height;\n    height = bounds.height;\n  }\n\n  return height;\n};\n\nvar drawActorTypeActor = function drawActorTypeActor(elem, actor, conf) {\n  var center = actor.x + actor.width / 2;\n\n  if (actor.y === 0) {\n    actorCnt++;\n    elem.append('line').attr('id', 'actor' + actorCnt).attr('x1', center).attr('y1', 80).attr('x2', center).attr('y2', 2000).attr('class', 'actor-line').attr('stroke-width', '0.5px').attr('stroke', '#999');\n  }\n\n  var actElem = elem.append('g');\n  actElem.attr('class', 'actor-man');\n  var rect = getNoteRect();\n  rect.x = actor.x;\n  rect.y = actor.y;\n  rect.fill = '#eaeaea';\n  rect.width = actor.width;\n  rect.height = actor.height;\n  rect.class = 'actor';\n  rect.rx = 3;\n  rect.ry = 3; // drawRect(actElem, rect);\n\n  actElem.append('line').attr('id', 'actor-man-torso' + actorCnt).attr('x1', center).attr('y1', actor.y + 25).attr('x2', center).attr('y2', actor.y + 45);\n  actElem.append('line').attr('id', 'actor-man-arms' + actorCnt).attr('x1', center - 18).attr('y1', actor.y + 33).attr('x2', center + 18).attr('y2', actor.y + 33);\n  actElem.append('line').attr('x1', center - 18).attr('y1', actor.y + 60).attr('x2', center).attr('y2', actor.y + 45);\n  actElem.append('line').attr('x1', center).attr('y1', actor.y + 45).attr('x2', center + 16).attr('y2', actor.y + 60);\n  var circle = actElem.append('circle');\n  circle.attr('cx', actor.x + actor.width / 2);\n  circle.attr('cy', actor.y + 10);\n  circle.attr('r', 15);\n  circle.attr('width', actor.width);\n  circle.attr('height', actor.height);\n  var bounds = actElem.node().getBBox();\n  actor.height = bounds.height;\n\n  _drawTextCandidateFunc(conf)(actor.description, actElem, rect.x, rect.y + 35, rect.width, rect.height, {\n    class: 'actor'\n  }, conf);\n\n  return actor.height;\n};\n\nvar drawActor = function drawActor(elem, actor, conf) {\n  switch (actor.type) {\n    case 'actor':\n      return drawActorTypeActor(elem, actor, conf);\n\n    case 'participant':\n      return drawActorTypeParticipant(elem, actor, conf);\n  }\n};\nvar anchorElement = function anchorElement(elem) {\n  return elem.append('g');\n};\n/**\n * Draws an activation in the diagram\n * @param elem - element to append activation rect.\n * @param bounds - activation box bounds.\n * @param verticalPos - precise y cooridnate of bottom activation box edge.\n * @param conf - sequence diagram config object.\n * @param actorActivations - number of activations on the actor.\n */\n\nvar drawActivation = function drawActivation(elem, bounds, verticalPos, conf, actorActivations) {\n  var rect = getNoteRect();\n  var g = bounds.anchored;\n  rect.x = bounds.startx;\n  rect.y = bounds.starty;\n  rect.class = 'activation' + actorActivations % 3; // Will evaluate to 0, 1 or 2\n\n  rect.width = bounds.stopx - bounds.startx;\n  rect.height = verticalPos - bounds.starty;\n  drawRect(g, rect);\n};\n/**\n * Draws a loop in the diagram\n * @param elem - elemenet to append the loop to.\n * @param loopModel - loopModel of the given loop.\n * @param labelText - Text within the loop.\n * @param conf - diagrom configuration\n */\n\nvar drawLoop = function drawLoop(elem, loopModel, labelText, conf) {\n  var boxMargin = conf.boxMargin,\n      boxTextMargin = conf.boxTextMargin,\n      labelBoxHeight = conf.labelBoxHeight,\n      labelBoxWidth = conf.labelBoxWidth,\n      fontFamily = conf.messageFontFamily,\n      fontSize = conf.messageFontSize,\n      fontWeight = conf.messageFontWeight;\n  var g = elem.append('g');\n\n  var drawLoopLine = function drawLoopLine(startx, starty, stopx, stopy) {\n    return g.append('line').attr('x1', startx).attr('y1', starty).attr('x2', stopx).attr('y2', stopy).attr('class', 'loopLine');\n  };\n\n  drawLoopLine(loopModel.startx, loopModel.starty, loopModel.stopx, loopModel.starty);\n  drawLoopLine(loopModel.stopx, loopModel.starty, loopModel.stopx, loopModel.stopy);\n  drawLoopLine(loopModel.startx, loopModel.stopy, loopModel.stopx, loopModel.stopy);\n  drawLoopLine(loopModel.startx, loopModel.starty, loopModel.startx, loopModel.stopy);\n\n  if (typeof loopModel.sections !== 'undefined') {\n    loopModel.sections.forEach(function (item) {\n      drawLoopLine(loopModel.startx, item.y, loopModel.stopx, item.y).style('stroke-dasharray', '3, 3');\n    });\n  }\n\n  var txt = getTextObj();\n  txt.text = labelText;\n  txt.x = loopModel.startx;\n  txt.y = loopModel.starty;\n  txt.fontFamily = fontFamily;\n  txt.fontSize = fontSize;\n  txt.fontWeight = fontWeight;\n  txt.anchor = 'middle';\n  txt.valign = 'middle';\n  txt.tspan = false;\n  txt.width = labelBoxWidth || 50;\n  txt.height = labelBoxHeight || 20;\n  txt.textMargin = boxTextMargin;\n  txt.class = 'labelText';\n  drawLabel(g, txt);\n  txt = getTextObj();\n  txt.text = loopModel.title;\n  txt.x = loopModel.startx + labelBoxWidth / 2 + (loopModel.stopx - loopModel.startx) / 2;\n  txt.y = loopModel.starty + boxMargin + boxTextMargin;\n  txt.anchor = 'middle';\n  txt.valign = 'middle';\n  txt.textMargin = boxTextMargin;\n  txt.class = 'loopText';\n  txt.fontFamily = fontFamily;\n  txt.fontSize = fontSize;\n  txt.fontWeight = fontWeight;\n  txt.wrap = true;\n  var textElem = drawText(g, txt);\n\n  if (typeof loopModel.sectionTitles !== 'undefined') {\n    loopModel.sectionTitles.forEach(function (item, idx) {\n      if (item.message) {\n        txt.text = item.message;\n        txt.x = loopModel.startx + (loopModel.stopx - loopModel.startx) / 2;\n        txt.y = loopModel.sections[idx].y + boxMargin + boxTextMargin;\n        txt.class = 'loopText';\n        txt.anchor = 'middle';\n        txt.valign = 'middle';\n        txt.tspan = false;\n        txt.fontFamily = fontFamily;\n        txt.fontSize = fontSize;\n        txt.fontWeight = fontWeight;\n        txt.wrap = loopModel.wrap;\n        textElem = drawText(g, txt);\n        var sectionHeight = Math.round(textElem.map(function (te) {\n          return (te._groups || te)[0][0].getBBox().height;\n        }).reduce(function (acc, curr) {\n          return acc + curr;\n        }));\n        loopModel.sections[idx].height += sectionHeight - (boxMargin + boxTextMargin);\n      }\n    });\n  }\n\n  loopModel.height = Math.round(loopModel.stopy - loopModel.starty);\n  return g;\n};\n/**\n * Draws a background rectangle\n * @param elem diagram (reference for bounds)\n * @param bounds shape of the rectangle\n */\n\nvar drawBackgroundRect = function drawBackgroundRect(elem, bounds) {\n  var rectElem = drawRect(elem, {\n    x: bounds.startx,\n    y: bounds.starty,\n    width: bounds.stopx - bounds.startx,\n    height: bounds.stopy - bounds.starty,\n    fill: bounds.fill,\n    class: 'rect'\n  });\n  rectElem.lower();\n};\nvar insertDatabaseIcon = function insertDatabaseIcon(elem) {\n  elem.append('defs').append('symbol').attr('id', 'database').attr('fill-rule', 'evenodd').attr('clip-rule', 'evenodd').append('path').attr('transform', 'scale(.5)').attr('d', 'M12.258.001l.256.004.255.005.253.008.251.01.249.012.247.015.246.016.242.019.241.02.239.023.236.024.233.027.231.028.229.031.225.032.223.034.22.036.217.038.214.04.211.041.208.043.205.045.201.046.198.048.194.05.191.051.187.053.183.054.18.056.175.057.172.059.168.06.163.061.16.063.155.064.15.066.074.033.073.033.071.034.07.034.069.035.068.035.067.035.066.035.064.036.064.036.062.036.06.036.06.037.058.037.058.037.055.038.055.038.053.038.052.038.051.039.05.039.048.039.047.039.045.04.044.04.043.04.041.04.04.041.039.041.037.041.036.041.034.041.033.042.032.042.03.042.029.042.027.042.026.043.024.043.023.043.021.043.02.043.018.044.017.043.015.044.013.044.012.044.011.045.009.044.007.045.006.045.004.045.002.045.001.045v17l-.001.045-.002.045-.004.045-.006.045-.007.045-.009.044-.011.045-.012.044-.013.044-.015.044-.017.043-.018.044-.02.043-.021.043-.023.043-.024.043-.026.043-.027.042-.029.042-.03.042-.032.042-.033.042-.034.041-.036.041-.037.041-.039.041-.04.041-.041.04-.043.04-.044.04-.045.04-.047.039-.048.039-.05.039-.051.039-.052.038-.053.038-.055.038-.055.038-.058.037-.058.037-.06.037-.06.036-.062.036-.064.036-.064.036-.066.035-.067.035-.068.035-.069.035-.07.034-.071.034-.073.033-.074.033-.15.066-.155.064-.16.063-.163.061-.168.06-.172.059-.175.057-.18.056-.183.054-.187.053-.191.051-.194.05-.198.048-.201.046-.205.045-.208.043-.211.041-.214.04-.217.038-.22.036-.223.034-.225.032-.229.031-.231.028-.233.027-.236.024-.239.023-.241.02-.242.019-.246.016-.247.015-.249.012-.251.01-.253.008-.255.005-.256.004-.258.001-.258-.001-.256-.004-.255-.005-.253-.008-.251-.01-.249-.012-.247-.015-.245-.016-.243-.019-.241-.02-.238-.023-.236-.024-.234-.027-.231-.028-.228-.031-.226-.032-.223-.034-.22-.036-.217-.038-.214-.04-.211-.041-.208-.043-.204-.045-.201-.046-.198-.048-.195-.05-.19-.051-.187-.053-.184-.054-.179-.056-.176-.057-.172-.059-.167-.06-.164-.061-.159-.063-.155-.064-.151-.066-.074-.033-.072-.033-.072-.034-.07-.034-.069-.035-.068-.035-.067-.035-.066-.035-.064-.036-.063-.036-.062-.036-.061-.036-.06-.037-.058-.037-.057-.037-.056-.038-.055-.038-.053-.038-.052-.038-.051-.039-.049-.039-.049-.039-.046-.039-.046-.04-.044-.04-.043-.04-.041-.04-.04-.041-.039-.041-.037-.041-.036-.041-.034-.041-.033-.042-.032-.042-.03-.042-.029-.042-.027-.042-.026-.043-.024-.043-.023-.043-.021-.043-.02-.043-.018-.044-.017-.043-.015-.044-.013-.044-.012-.044-.011-.045-.009-.044-.007-.045-.006-.045-.004-.045-.002-.045-.001-.045v-17l.001-.045.002-.045.004-.045.006-.045.007-.045.009-.044.011-.045.012-.044.013-.044.015-.044.017-.043.018-.044.02-.043.021-.043.023-.043.024-.043.026-.043.027-.042.029-.042.03-.042.032-.042.033-.042.034-.041.036-.041.037-.041.039-.041.04-.041.041-.04.043-.04.044-.04.046-.04.046-.039.049-.039.049-.039.051-.039.052-.038.053-.038.055-.038.056-.038.057-.037.058-.037.06-.037.061-.036.062-.036.063-.036.064-.036.066-.035.067-.035.068-.035.069-.035.07-.034.072-.034.072-.033.074-.033.151-.066.155-.064.159-.063.164-.061.167-.06.172-.059.176-.057.179-.056.184-.054.187-.053.19-.051.195-.05.198-.048.201-.046.204-.045.208-.043.211-.041.214-.04.217-.038.22-.036.223-.034.226-.032.228-.031.231-.028.234-.027.236-.024.238-.023.241-.02.243-.019.245-.016.247-.015.249-.012.251-.01.253-.008.255-.005.256-.004.258-.001.258.001zm-9.258 20.499v.01l.001.021.003.021.004.022.005.021.006.022.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.023.018.024.019.024.021.024.022.025.023.024.024.025.052.049.056.05.061.051.066.051.07.051.075.051.079.052.084.052.088.052.092.052.097.052.102.051.105.052.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.048.144.049.147.047.152.047.155.047.16.045.163.045.167.043.171.043.176.041.178.041.183.039.187.039.19.037.194.035.197.035.202.033.204.031.209.03.212.029.216.027.219.025.222.024.226.021.23.02.233.018.236.016.24.015.243.012.246.01.249.008.253.005.256.004.259.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.021.224-.024.22-.026.216-.027.212-.028.21-.031.205-.031.202-.034.198-.034.194-.036.191-.037.187-.039.183-.04.179-.04.175-.042.172-.043.168-.044.163-.045.16-.046.155-.046.152-.047.148-.048.143-.049.139-.049.136-.05.131-.05.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.053.083-.051.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.05.023-.024.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.023.01-.022.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.127l-.077.055-.08.053-.083.054-.085.053-.087.052-.09.052-.093.051-.095.05-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.045-.118.044-.12.043-.122.042-.124.042-.126.041-.128.04-.13.04-.132.038-.134.038-.135.037-.138.037-.139.035-.142.035-.143.034-.144.033-.147.032-.148.031-.15.03-.151.03-.153.029-.154.027-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.01-.179.008-.179.008-.181.006-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.006-.179-.008-.179-.008-.178-.01-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.027-.153-.029-.151-.03-.15-.03-.148-.031-.146-.032-.145-.033-.143-.034-.141-.035-.14-.035-.137-.037-.136-.037-.134-.038-.132-.038-.13-.04-.128-.04-.126-.041-.124-.042-.122-.042-.12-.044-.117-.043-.116-.045-.113-.045-.112-.046-.109-.047-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.05-.093-.052-.09-.051-.087-.052-.085-.053-.083-.054-.08-.054-.077-.054v4.127zm0-5.654v.011l.001.021.003.021.004.021.005.022.006.022.007.022.009.022.01.022.011.023.012.023.013.023.015.024.016.023.017.024.018.024.019.024.021.024.022.024.023.025.024.024.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.052.11.051.114.051.119.052.123.05.127.051.131.05.135.049.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.044.171.042.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.022.23.02.233.018.236.016.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.012.241-.015.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.048.139-.05.136-.049.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.051.051-.049.023-.025.023-.024.021-.025.02-.024.019-.024.018-.024.017-.024.015-.023.014-.023.013-.024.012-.022.01-.023.01-.023.008-.022.006-.022.006-.022.004-.021.004-.022.001-.021.001-.021v-4.139l-.077.054-.08.054-.083.054-.085.052-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.044-.118.044-.12.044-.122.042-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.035-.143.033-.144.033-.147.033-.148.031-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.009-.179.009-.179.007-.181.007-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.007-.179-.007-.179-.009-.178-.009-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.031-.146-.033-.145-.033-.143-.033-.141-.035-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.04-.126-.041-.124-.042-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.051-.093-.051-.09-.051-.087-.053-.085-.052-.083-.054-.08-.054-.077-.054v4.139zm0-5.666v.011l.001.02.003.022.004.021.005.022.006.021.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.024.018.023.019.024.021.025.022.024.023.024.024.025.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.051.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.043.171.043.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.021.23.02.233.018.236.017.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.013.241-.014.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.049.139-.049.136-.049.131-.051.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.049.023-.025.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.022.01-.023.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.153l-.077.054-.08.054-.083.053-.085.053-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.048-.105.048-.106.048-.109.046-.111.046-.114.046-.115.044-.118.044-.12.043-.122.043-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.034-.143.034-.144.033-.147.032-.148.032-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.024-.161.024-.162.023-.163.023-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.01-.178.01-.179.009-.179.007-.181.006-.182.006-.182.004-.184.003-.184.001-.185.001-.185-.001-.184-.001-.184-.003-.182-.004-.182-.006-.181-.006-.179-.007-.179-.009-.178-.01-.176-.01-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.023-.162-.023-.161-.024-.159-.024-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.032-.146-.032-.145-.033-.143-.034-.141-.034-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.041-.126-.041-.124-.041-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.048-.105-.048-.102-.048-.1-.05-.097-.049-.095-.051-.093-.051-.09-.052-.087-.052-.085-.053-.083-.053-.08-.054-.077-.054v4.153zm8.74-8.179l-.257.004-.254.005-.25.008-.247.011-.244.012-.241.014-.237.016-.233.018-.231.021-.226.022-.224.023-.22.026-.216.027-.212.028-.21.031-.205.032-.202.033-.198.034-.194.036-.191.038-.187.038-.183.04-.179.041-.175.042-.172.043-.168.043-.163.045-.16.046-.155.046-.152.048-.148.048-.143.048-.139.049-.136.05-.131.05-.126.051-.123.051-.118.051-.114.052-.11.052-.106.052-.101.052-.096.052-.092.052-.088.052-.083.052-.079.052-.074.051-.07.052-.065.051-.06.05-.056.05-.051.05-.023.025-.023.024-.021.024-.02.025-.019.024-.018.024-.017.023-.015.024-.014.023-.013.023-.012.023-.01.023-.01.022-.008.022-.006.023-.006.021-.004.022-.004.021-.001.021-.001.021.001.021.001.021.004.021.004.022.006.021.006.023.008.022.01.022.01.023.012.023.013.023.014.023.015.024.017.023.018.024.019.024.02.025.021.024.023.024.023.025.051.05.056.05.06.05.065.051.07.052.074.051.079.052.083.052.088.052.092.052.096.052.101.052.106.052.11.052.114.052.118.051.123.051.126.051.131.05.136.05.139.049.143.048.148.048.152.048.155.046.16.046.163.045.168.043.172.043.175.042.179.041.183.04.187.038.191.038.194.036.198.034.202.033.205.032.21.031.212.028.216.027.22.026.224.023.226.022.231.021.233.018.237.016.241.014.244.012.247.011.25.008.254.005.257.004.26.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.022.224-.023.22-.026.216-.027.212-.028.21-.031.205-.032.202-.033.198-.034.194-.036.191-.038.187-.038.183-.04.179-.041.175-.042.172-.043.168-.043.163-.045.16-.046.155-.046.152-.048.148-.048.143-.048.139-.049.136-.05.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.05.051-.05.023-.025.023-.024.021-.024.02-.025.019-.024.018-.024.017-.023.015-.024.014-.023.013-.023.012-.023.01-.023.01-.022.008-.022.006-.023.006-.021.004-.022.004-.021.001-.021.001-.021-.001-.021-.001-.021-.004-.021-.004-.022-.006-.021-.006-.023-.008-.022-.01-.022-.01-.023-.012-.023-.013-.023-.014-.023-.015-.024-.017-.023-.018-.024-.019-.024-.02-.025-.021-.024-.023-.024-.023-.025-.051-.05-.056-.05-.06-.05-.065-.051-.07-.052-.074-.051-.079-.052-.083-.052-.088-.052-.092-.052-.096-.052-.101-.052-.106-.052-.11-.052-.114-.052-.118-.051-.123-.051-.126-.051-.131-.05-.136-.05-.139-.049-.143-.048-.148-.048-.152-.048-.155-.046-.16-.046-.163-.045-.168-.043-.172-.043-.175-.042-.179-.041-.183-.04-.187-.038-.191-.038-.194-.036-.198-.034-.202-.033-.205-.032-.21-.031-.212-.028-.216-.027-.22-.026-.224-.023-.226-.022-.231-.021-.233-.018-.237-.016-.241-.014-.244-.012-.247-.011-.25-.008-.254-.005-.257-.004-.26-.001-.26.001z');\n};\nvar insertComputerIcon = function insertComputerIcon(elem) {\n  elem.append('defs').append('symbol').attr('id', 'computer').attr('width', '24').attr('height', '24').append('path').attr('transform', 'scale(.5)').attr('d', 'M2 2v13h20v-13h-20zm18 11h-16v-9h16v9zm-10.228 6l.466-1h3.524l.467 1h-4.457zm14.228 3h-24l2-6h2.104l-1.33 4h18.45l-1.297-4h2.073l2 6zm-5-10h-14v-7h14v7z');\n};\nvar insertClockIcon = function insertClockIcon(elem) {\n  elem.append('defs').append('symbol').attr('id', 'clock').attr('width', '24').attr('height', '24').append('path').attr('transform', 'scale(.5)').attr('d', 'M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm5.848 12.459c.202.038.202.333.001.372-1.907.361-6.045 1.111-6.547 1.111-.719 0-1.301-.582-1.301-1.301 0-.512.77-5.447 1.125-7.445.034-.192.312-.181.343.014l.985 6.238 5.394 1.011z');\n};\n/**\n * Setup arrow head and define the marker. The result is appended to the svg.\n */\n\nvar insertArrowHead = function insertArrowHead(elem) {\n  elem.append('defs').append('marker').attr('id', 'arrowhead').attr('refX', 9).attr('refY', 5).attr('markerUnits', 'userSpaceOnUse').attr('markerWidth', 12).attr('markerHeight', 12).attr('orient', 'auto').append('path').attr('d', 'M 0 0 L 10 5 L 0 10 z'); // this is actual shape for arrowhead\n};\n/**\n * Setup arrow head and define the marker. The result is appended to the svg.\n */\n\nvar insertArrowFilledHead = function insertArrowFilledHead(elem) {\n  elem.append('defs').append('marker').attr('id', 'filled-head').attr('refX', 18).attr('refY', 7).attr('markerWidth', 20).attr('markerHeight', 28).attr('orient', 'auto').append('path').attr('d', 'M 18,7 L9,13 L14,7 L9,1 Z');\n};\n/**\n * Setup node number. The result is appended to the svg.\n */\n\nvar insertSequenceNumber = function insertSequenceNumber(elem) {\n  elem.append('defs').append('marker').attr('id', 'sequencenumber').attr('refX', 15).attr('refY', 15).attr('markerWidth', 60).attr('markerHeight', 40).attr('orient', 'auto').append('circle').attr('cx', 15).attr('cy', 15).attr('r', 6); // .style(\"fill\", '#f00');\n};\n/**\n * Setup arrow head and define the marker. The result is appended to the svg.\n */\n\nvar insertArrowCrossHead = function insertArrowCrossHead(elem) {\n  var defs = elem.append('defs');\n  var marker = defs.append('marker').attr('id', 'crosshead').attr('markerWidth', 15).attr('markerHeight', 8).attr('orient', 'auto').attr('refX', 16).attr('refY', 4); // The arrow\n\n  marker.append('path').attr('fill', 'black').attr('stroke', '#000000').style('stroke-dasharray', '0, 0').attr('stroke-width', '1px').attr('d', 'M 9,2 V 6 L16,4 Z'); // The cross\n\n  marker.append('path').attr('fill', 'none').attr('stroke', '#000000').style('stroke-dasharray', '0, 0').attr('stroke-width', '1px').attr('d', 'M 0,1 L 6,7 M 6,1 L 0,7'); // this is actual shape for arrowhead\n};\nvar getTextObj = function getTextObj() {\n  return {\n    x: 0,\n    y: 0,\n    fill: undefined,\n    anchor: undefined,\n    style: '#666',\n    width: undefined,\n    height: undefined,\n    textMargin: 0,\n    rx: 0,\n    ry: 0,\n    tspan: true,\n    valign: undefined\n  };\n};\nvar getNoteRect = function getNoteRect() {\n  return {\n    x: 0,\n    y: 0,\n    fill: '#EDF2AE',\n    stroke: '#666',\n    width: 100,\n    anchor: 'start',\n    height: 100,\n    rx: 0,\n    ry: 0\n  };\n};\n\nvar _drawTextCandidateFunc = function () {\n  function byText(content, g, x, y, width, height, textAttrs) {\n    var text = g.append('text').attr('x', x + width / 2).attr('y', y + height / 2 + 5).style('text-anchor', 'middle').text(content);\n\n    _setTextAttrs(text, textAttrs);\n  }\n\n  function byTspan(content, g, x, y, width, height, textAttrs, conf) {\n    var actorFontSize = conf.actorFontSize,\n        actorFontFamily = conf.actorFontFamily,\n        actorFontWeight = conf.actorFontWeight;\n    var lines = content.split(_common_common__WEBPACK_IMPORTED_MODULE_0__[\"default\"].lineBreakRegex);\n\n    for (var i = 0; i < lines.length; i++) {\n      var dy = i * actorFontSize - actorFontSize * (lines.length - 1) / 2;\n      var text = g.append('text').attr('x', x + width / 2).attr('y', y).style('text-anchor', 'middle').style('font-size', actorFontSize).style('font-weight', actorFontWeight).style('font-family', actorFontFamily);\n      text.append('tspan').attr('x', x + width / 2).attr('dy', dy).text(lines[i]);\n      text.attr('y', y + height / 2.0).attr('dominant-baseline', 'central').attr('alignment-baseline', 'central');\n\n      _setTextAttrs(text, textAttrs);\n    }\n  }\n\n  function byFo(content, g, x, y, width, height, textAttrs, conf) {\n    var s = g.append('switch');\n    var f = s.append('foreignObject').attr('x', x).attr('y', y).attr('width', width).attr('height', height);\n    var text = f.append('xhtml:div').style('display', 'table').style('height', '100%').style('width', '100%');\n    text.append('div').style('display', 'table-cell').style('text-align', 'center').style('vertical-align', 'middle').text(content);\n    byTspan(content, s, x, y, width, height, textAttrs, conf);\n\n    _setTextAttrs(text, textAttrs);\n  }\n\n  function _setTextAttrs(toText, fromTextAttrsDict) {\n    for (var key in fromTextAttrsDict) {\n      if (fromTextAttrsDict.hasOwnProperty(key)) {\n        // eslint-disable-line\n        toText.attr(key, fromTextAttrsDict[key]);\n      }\n    }\n  }\n\n  return function (conf) {\n    return conf.textPlacement === 'fo' ? byFo : conf.textPlacement === 'old' ? byText : byTspan;\n  };\n}();\n\nvar _drawMenuItemTextCandidateFunc = function () {\n  function byText(content, g, x, y, width, height, textAttrs) {\n    var text = g.append('text').attr('x', x).attr('y', y).style('text-anchor', 'start').text(content);\n\n    _setTextAttrs(text, textAttrs);\n  }\n\n  function byTspan(content, g, x, y, width, height, textAttrs, conf) {\n    var actorFontSize = conf.actorFontSize,\n        actorFontFamily = conf.actorFontFamily,\n        actorFontWeight = conf.actorFontWeight;\n    var lines = content.split(_common_common__WEBPACK_IMPORTED_MODULE_0__[\"default\"].lineBreakRegex);\n\n    for (var i = 0; i < lines.length; i++) {\n      var dy = i * actorFontSize - actorFontSize * (lines.length - 1) / 2;\n      var text = g.append('text').attr('x', x).attr('y', y).style('text-anchor', 'start').style('font-size', actorFontSize).style('font-weight', actorFontWeight).style('font-family', actorFontFamily);\n      text.append('tspan').attr('x', x).attr('dy', dy).text(lines[i]);\n      text.attr('y', y + height / 2.0).attr('dominant-baseline', 'central').attr('alignment-baseline', 'central');\n\n      _setTextAttrs(text, textAttrs);\n    }\n  }\n\n  function byFo(content, g, x, y, width, height, textAttrs, conf) {\n    var s = g.append('switch');\n    var f = s.append('foreignObject').attr('x', x).attr('y', y).attr('width', width).attr('height', height);\n    var text = f.append('xhtml:div').style('display', 'table').style('height', '100%').style('width', '100%');\n    text.append('div').style('display', 'table-cell').style('text-align', 'center').style('vertical-align', 'middle').text(content);\n    byTspan(content, s, x, y, width, height, textAttrs, conf);\n\n    _setTextAttrs(text, textAttrs);\n  }\n\n  function _setTextAttrs(toText, fromTextAttrsDict) {\n    for (var key in fromTextAttrsDict) {\n      if (fromTextAttrsDict.hasOwnProperty(key)) {\n        // eslint-disable-line\n        toText.attr(key, fromTextAttrsDict[key]);\n      }\n    }\n  }\n\n  return function (conf) {\n    return conf.textPlacement === 'fo' ? byFo : conf.textPlacement === 'old' ? byText : byTspan;\n  };\n}();\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n  drawRect: drawRect,\n  drawText: drawText,\n  drawLabel: drawLabel,\n  drawActor: drawActor,\n  drawPopup: drawPopup,\n  drawImage: drawImage,\n  drawEmbeddedImage: drawEmbeddedImage,\n  anchorElement: anchorElement,\n  drawActivation: drawActivation,\n  drawLoop: drawLoop,\n  drawBackgroundRect: drawBackgroundRect,\n  insertArrowHead: insertArrowHead,\n  insertArrowFilledHead: insertArrowFilledHead,\n  insertSequenceNumber: insertSequenceNumber,\n  insertArrowCrossHead: insertArrowCrossHead,\n  insertDatabaseIcon: insertDatabaseIcon,\n  insertComputerIcon: insertComputerIcon,\n  insertClockIcon: insertClockIcon,\n  getTextObj: getTextObj,\n  getNoteRect: getNoteRect,\n  popupMenu: popupMenu,\n  popdownMenu: popdownMenu,\n  fixLifeLineHeights: fixLifeLineHeights\n});\n\n/***/ }),\n\n/***/ \"./src/diagrams/state/id-cache.js\":\n/*!****************************************!*\\\n  !*** ./src/diagrams/state/id-cache.js ***!\n  \\****************************************/\n/*! exports provided: set, get, keys, size, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"set\", function() { return set; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"get\", function() { return get; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"keys\", function() { return keys; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"size\", function() { return size; });\nvar idCache = {};\nvar set = function set(key, val) {\n  idCache[key] = val;\n};\nvar get = function get(k) {\n  return idCache[k];\n};\nvar keys = function keys() {\n  return Object.keys(idCache);\n};\nvar size = function size() {\n  return keys().length;\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n  get: get,\n  set: set,\n  keys: keys,\n  size: size\n});\n\n/***/ }),\n\n/***/ \"./src/diagrams/state/parser/stateDiagram.jison\":\n/*!******************************************************!*\\\n  !*** ./src/diagrams/state/parser/stateDiagram.jison ***!\n  \\******************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n/* WEBPACK VAR INJECTION */(function(process, module) {/* parser generated by jison 0.4.18 */\n/*\n  Returns a Parser object of the following structure:\n\n  Parser: {\n    yy: {}\n  }\n\n  Parser.prototype: {\n    yy: {},\n    trace: function(),\n    symbols_: {associative list: name ==> number},\n    terminals_: {associative list: number ==> name},\n    productions_: [...],\n    performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$),\n    table: [...],\n    defaultActions: {...},\n    parseError: function(str, hash),\n    parse: function(input),\n\n    lexer: {\n        EOF: 1,\n        parseError: function(str, hash),\n        setInput: function(input),\n        input: function(),\n        unput: function(str),\n        more: function(),\n        less: function(n),\n        pastInput: function(),\n        upcomingInput: function(),\n        showPosition: function(),\n        test_match: function(regex_match_array, rule_index),\n        next: function(),\n        lex: function(),\n        begin: function(condition),\n        popState: function(),\n        _currentRules: function(),\n        topState: function(),\n        pushState: function(condition),\n\n        options: {\n            ranges: boolean           (optional: true ==> token location info will include a .range[] member)\n            flex: boolean             (optional: true ==> flex-like lexing behaviour where the rules are tested exhaustively to find the longest match)\n            backtrack_lexer: boolean  (optional: true ==> lexer regexes are tested in order and for each matching regex the action code is invoked; the lexer terminates the scan when a token is returned by the action code)\n        },\n\n        performAction: function(yy, yy_, $avoiding_name_collisions, YY_START),\n        rules: [...],\n        conditions: {associative list: name ==> set},\n    }\n  }\n\n\n  token location info (@$, _$, etc.): {\n    first_line: n,\n    last_line: n,\n    first_column: n,\n    last_column: n,\n    range: [start_number, end_number]       (where the numbers are indexes into the input string, regular zero-based)\n  }\n\n\n  the parseError function receives a 'hash' object with these members for lexer and parser errors: {\n    text:        (matched text)\n    token:       (the produced terminal token, if any)\n    line:        (yylineno)\n  }\n  while parser (grammar) errors will also provide these members, i.e. parser errors deliver a superset of attributes: {\n    loc:         (yylloc)\n    expected:    (string describing the set of expected tokens)\n    recoverable: (boolean: TRUE when the parser has a error recovery rule available for this particular error)\n  }\n*/\nvar parser = (function(){\nvar o=function(k,v,o,l){for(o=o||{},l=k.length;l--;o[k[l]]=v);return o},$V0=[1,2],$V1=[1,3],$V2=[1,5],$V3=[1,7],$V4=[2,5],$V5=[1,15],$V6=[1,17],$V7=[1,19],$V8=[1,20],$V9=[1,21],$Va=[1,22],$Vb=[1,30],$Vc=[1,23],$Vd=[1,24],$Ve=[1,25],$Vf=[1,26],$Vg=[1,27],$Vh=[1,32],$Vi=[1,33],$Vj=[1,34],$Vk=[1,35],$Vl=[1,31],$Vm=[1,38],$Vn=[1,4,5,14,15,17,19,20,22,23,24,25,26,27,36,37,38,39,42,45],$Vo=[1,4,5,12,13,14,15,17,19,20,22,23,24,25,26,27,36,37,38,39,42,45],$Vp=[1,4,5,7,14,15,17,19,20,22,23,24,25,26,27,36,37,38,39,42,45],$Vq=[4,5,14,15,17,19,20,22,23,24,25,26,27,36,37,38,39,42,45];\nvar parser = {trace: function trace () { },\nyy: {},\nsymbols_: {\"error\":2,\"start\":3,\"SPACE\":4,\"NL\":5,\"directive\":6,\"SD\":7,\"document\":8,\"line\":9,\"statement\":10,\"idStatement\":11,\"DESCR\":12,\"-->\":13,\"HIDE_EMPTY\":14,\"scale\":15,\"WIDTH\":16,\"COMPOSIT_STATE\":17,\"STRUCT_START\":18,\"STRUCT_STOP\":19,\"STATE_DESCR\":20,\"AS\":21,\"ID\":22,\"FORK\":23,\"JOIN\":24,\"CHOICE\":25,\"CONCURRENT\":26,\"note\":27,\"notePosition\":28,\"NOTE_TEXT\":29,\"direction\":30,\"openDirective\":31,\"typeDirective\":32,\"closeDirective\":33,\":\":34,\"argDirective\":35,\"direction_tb\":36,\"direction_bt\":37,\"direction_rl\":38,\"direction_lr\":39,\"eol\":40,\";\":41,\"EDGE_STATE\":42,\"left_of\":43,\"right_of\":44,\"open_directive\":45,\"type_directive\":46,\"arg_directive\":47,\"close_directive\":48,\"$accept\":0,\"$end\":1},\nterminals_: {2:\"error\",4:\"SPACE\",5:\"NL\",7:\"SD\",12:\"DESCR\",13:\"-->\",14:\"HIDE_EMPTY\",15:\"scale\",16:\"WIDTH\",17:\"COMPOSIT_STATE\",18:\"STRUCT_START\",19:\"STRUCT_STOP\",20:\"STATE_DESCR\",21:\"AS\",22:\"ID\",23:\"FORK\",24:\"JOIN\",25:\"CHOICE\",26:\"CONCURRENT\",27:\"note\",29:\"NOTE_TEXT\",34:\":\",36:\"direction_tb\",37:\"direction_bt\",38:\"direction_rl\",39:\"direction_lr\",41:\";\",42:\"EDGE_STATE\",43:\"left_of\",44:\"right_of\",45:\"open_directive\",46:\"type_directive\",47:\"arg_directive\",48:\"close_directive\"},\nproductions_: [0,[3,2],[3,2],[3,2],[3,2],[8,0],[8,2],[9,2],[9,1],[9,1],[10,1],[10,2],[10,3],[10,4],[10,1],[10,2],[10,1],[10,4],[10,3],[10,6],[10,1],[10,1],[10,1],[10,1],[10,4],[10,4],[10,1],[10,1],[6,3],[6,5],[30,1],[30,1],[30,1],[30,1],[40,1],[40,1],[11,1],[11,1],[28,1],[28,1],[31,1],[32,1],[35,1],[33,1]],\nperformAction: function anonymous(yytext, yyleng, yylineno, yy, yystate /* action[1] */, $$ /* vstack */, _$ /* lstack */) {\n/* this == yyval */\n\nvar $0 = $$.length - 1;\nswitch (yystate) {\ncase 4:\n /*console.warn('Root document', $$[$0]);*/ yy.setRootDoc($$[$0]);return $$[$0]; \nbreak;\ncase 5:\n this.$ = [] \nbreak;\ncase 6:\n\n        if($$[$0]!='nl'){\n            $$[$0-1].push($$[$0]);this.$ = $$[$0-1]\n        }\n        // console.warn('Got document',$$[$0-1], $$[$0]);\n    \nbreak;\ncase 7: case 8:\n this.$ = $$[$0] \nbreak;\ncase 9:\n this.$='nl';\nbreak;\ncase 10:\n /*console.warn('got id and descr', $$[$0]);*/this.$={ stmt: 'state', id: $$[$0], type: 'default', description: ''};\nbreak;\ncase 11:\n /*console.warn('got id and descr', $$[$0-1], $$[$0].trim());*/this.$={ stmt: 'state', id: $$[$0-1], type: 'default', description: yy.trimColon($$[$0])};\nbreak;\ncase 12:\n\n        /*console.warn('got id', $$[$0-2]);yy.addRelation($$[$0-2], $$[$0]);*/\n        this.$={ stmt: 'relation', state1: { stmt: 'state', id: $$[$0-2], type: 'default', description: '' }, state2:{ stmt: 'state', id: $$[$0] ,type: 'default', description: ''}};\n    \nbreak;\ncase 13:\n\n        /*yy.addRelation($$[$0-3], $$[$0-1], $$[$0].substr(1).trim());*/\n        this.$={ stmt: 'relation', state1: { stmt: 'state', id: $$[$0-3], type: 'default', description: '' }, state2:{ stmt: 'state', id: $$[$0-1] ,type: 'default', description: ''}, description: $$[$0].substr(1).trim()};\n    \nbreak;\ncase 17:\n\n        /* console.warn('Adding document for state without id ', $$[$0-3]);*/\n        this.$={ stmt: 'state', id: $$[$0-3], type: 'default', description: '', doc: $$[$0-1] }\n    \nbreak;\ncase 18:\n\n        var id=$$[$0];\n        var description = $$[$0-2].trim();\n        if($$[$0].match(':')){\n            var parts = $$[$0].split(':');\n            id=parts[0];\n            description = [description, parts[1]];\n        }\n        this.$={stmt: 'state', id: id, type: 'default', description: description};\n\n    \nbreak;\ncase 19:\n\n         // console.warn('Adding document for state with id zxzx', $$[$0-3], $$[$0-2], yy.getDirection()); yy.addDocument($$[$0-3]);\n         this.$={ stmt: 'state', id: $$[$0-3], type: 'default', description: $$[$0-5], doc: $$[$0-1] }\n    \nbreak;\ncase 20:\n\n        this.$={ stmt: 'state', id: $$[$0], type: 'fork' }\n    \nbreak;\ncase 21:\n\n        this.$={ stmt: 'state', id: $$[$0], type: 'join' }\n    \nbreak;\ncase 22:\n\n        this.$={ stmt: 'state', id: $$[$0], type: 'choice' }\n    \nbreak;\ncase 23:\n\n        this.$={ stmt: 'state', id: yy.getDividerId(), type: 'divider' }\n    \nbreak;\ncase 24:\n\n        /* console.warn('got NOTE, position: ', $$[$0-2].trim(), 'id = ', $$[$0-1].trim(), 'note: ', $$[$0]);*/\n        this.$={ stmt: 'state', id: $$[$0-1].trim(), note:{position: $$[$0-2].trim(), text: $$[$0].trim()}};\n    \nbreak;\ncase 30:\n yy.setDirection('TB');this.$={stmt:'dir', value:'TB'};\nbreak;\ncase 31:\n yy.setDirection('BT');this.$={stmt:'dir', value:'BT'};\nbreak;\ncase 32:\n yy.setDirection('RL'); this.$={stmt:'dir', value:'RL'};\nbreak;\ncase 33:\n yy.setDirection('LR');this.$={stmt:'dir', value:'LR'};\nbreak;\ncase 36: case 37:\nthis.$=$$[$0];\nbreak;\ncase 40:\n yy.parseDirective('%%{', 'open_directive'); \nbreak;\ncase 41:\n yy.parseDirective($$[$0], 'type_directive'); \nbreak;\ncase 42:\n $$[$0] = $$[$0].trim().replace(/'/g, '\"'); yy.parseDirective($$[$0], 'arg_directive'); \nbreak;\ncase 43:\n yy.parseDirective('}%%', 'close_directive', 'state'); \nbreak;\n}\n},\ntable: [{3:1,4:$V0,5:$V1,6:4,7:$V2,31:6,45:$V3},{1:[3]},{3:8,4:$V0,5:$V1,6:4,7:$V2,31:6,45:$V3},{3:9,4:$V0,5:$V1,6:4,7:$V2,31:6,45:$V3},{3:10,4:$V0,5:$V1,6:4,7:$V2,31:6,45:$V3},o([1,4,5,14,15,17,20,22,23,24,25,26,27,36,37,38,39,42,45],$V4,{8:11}),{32:12,46:[1,13]},{46:[2,40]},{1:[2,1]},{1:[2,2]},{1:[2,3]},{1:[2,4],4:$V5,5:$V6,6:28,9:14,10:16,11:18,14:$V7,15:$V8,17:$V9,20:$Va,22:$Vb,23:$Vc,24:$Vd,25:$Ve,26:$Vf,27:$Vg,30:29,31:6,36:$Vh,37:$Vi,38:$Vj,39:$Vk,42:$Vl,45:$V3},{33:36,34:[1,37],48:$Vm},o([34,48],[2,41]),o($Vn,[2,6]),{6:28,10:39,11:18,14:$V7,15:$V8,17:$V9,20:$Va,22:$Vb,23:$Vc,24:$Vd,25:$Ve,26:$Vf,27:$Vg,30:29,31:6,36:$Vh,37:$Vi,38:$Vj,39:$Vk,42:$Vl,45:$V3},o($Vn,[2,8]),o($Vn,[2,9]),o($Vn,[2,10],{12:[1,40],13:[1,41]}),o($Vn,[2,14]),{16:[1,42]},o($Vn,[2,16],{18:[1,43]}),{21:[1,44]},o($Vn,[2,20]),o($Vn,[2,21]),o($Vn,[2,22]),o($Vn,[2,23]),{28:45,29:[1,46],43:[1,47],44:[1,48]},o($Vn,[2,26]),o($Vn,[2,27]),o($Vo,[2,36]),o($Vo,[2,37]),o($Vn,[2,30]),o($Vn,[2,31]),o($Vn,[2,32]),o($Vn,[2,33]),o($Vp,[2,28]),{35:49,47:[1,50]},o($Vp,[2,43]),o($Vn,[2,7]),o($Vn,[2,11]),{11:51,22:$Vb,42:$Vl},o($Vn,[2,15]),o($Vq,$V4,{8:52}),{22:[1,53]},{22:[1,54]},{21:[1,55]},{22:[2,38]},{22:[2,39]},{33:56,48:$Vm},{48:[2,42]},o($Vn,[2,12],{12:[1,57]}),{4:$V5,5:$V6,6:28,9:14,10:16,11:18,14:$V7,15:$V8,17:$V9,19:[1,58],20:$Va,22:$Vb,23:$Vc,24:$Vd,25:$Ve,26:$Vf,27:$Vg,30:29,31:6,36:$Vh,37:$Vi,38:$Vj,39:$Vk,42:$Vl,45:$V3},o($Vn,[2,18],{18:[1,59]}),{29:[1,60]},{22:[1,61]},o($Vp,[2,29]),o($Vn,[2,13]),o($Vn,[2,17]),o($Vq,$V4,{8:62}),o($Vn,[2,24]),o($Vn,[2,25]),{4:$V5,5:$V6,6:28,9:14,10:16,11:18,14:$V7,15:$V8,17:$V9,19:[1,63],20:$Va,22:$Vb,23:$Vc,24:$Vd,25:$Ve,26:$Vf,27:$Vg,30:29,31:6,36:$Vh,37:$Vi,38:$Vj,39:$Vk,42:$Vl,45:$V3},o($Vn,[2,19])],\ndefaultActions: {7:[2,40],8:[2,1],9:[2,2],10:[2,3],47:[2,38],48:[2,39],50:[2,42]},\nparseError: function parseError (str, hash) {\n    if (hash.recoverable) {\n        this.trace(str);\n    } else {\n        var error = new Error(str);\n        error.hash = hash;\n        throw error;\n    }\n},\nparse: function parse(input) {\n    var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = '', yylineno = 0, yyleng = 0, recovering = 0, TERROR = 2, EOF = 1;\n    var args = lstack.slice.call(arguments, 1);\n    var lexer = Object.create(this.lexer);\n    var sharedState = { yy: {} };\n    for (var k in this.yy) {\n        if (Object.prototype.hasOwnProperty.call(this.yy, k)) {\n            sharedState.yy[k] = this.yy[k];\n        }\n    }\n    lexer.setInput(input, sharedState.yy);\n    sharedState.yy.lexer = lexer;\n    sharedState.yy.parser = this;\n    if (typeof lexer.yylloc == 'undefined') {\n        lexer.yylloc = {};\n    }\n    var yyloc = lexer.yylloc;\n    lstack.push(yyloc);\n    var ranges = lexer.options && lexer.options.ranges;\n    if (typeof sharedState.yy.parseError === 'function') {\n        this.parseError = sharedState.yy.parseError;\n    } else {\n        this.parseError = Object.getPrototypeOf(this).parseError;\n    }\n    function popStack(n) {\n        stack.length = stack.length - 2 * n;\n        vstack.length = vstack.length - n;\n        lstack.length = lstack.length - n;\n    }\n            function lex() {\n            var token;\n            token = tstack.pop() || lexer.lex() || EOF;\n            if (typeof token !== 'number') {\n                if (token instanceof Array) {\n                    tstack = token;\n                    token = tstack.pop();\n                }\n                token = self.symbols_[token] || token;\n            }\n            return token;\n        }\n    var symbol, preErrorSymbol, state, action, a, r, yyval = {}, p, len, newState, expected;\n    while (true) {\n        state = stack[stack.length - 1];\n        if (this.defaultActions[state]) {\n            action = this.defaultActions[state];\n        } else {\n            if (symbol === null || typeof symbol == 'undefined') {\n                symbol = lex();\n            }\n            action = table[state] && table[state][symbol];\n        }\n        if (typeof action === 'undefined' || !action.length || !action[0]) {\n            var errStr = '';\n            expected = [];\n            for (p in table[state]) {\n                if (this.terminals_[p] && p > TERROR) {\n                    expected.push('\\'' + this.terminals_[p] + '\\'');\n                }\n            }\n            if (lexer.showPosition) {\n                errStr = 'Parse error on line ' + (yylineno + 1) + ':\\n' + lexer.showPosition() + '\\nExpecting ' + expected.join(', ') + ', got \\'' + (this.terminals_[symbol] || symbol) + '\\'';\n            } else {\n                errStr = 'Parse error on line ' + (yylineno + 1) + ': Unexpected ' + (symbol == EOF ? 'end of input' : '\\'' + (this.terminals_[symbol] || symbol) + '\\'');\n            }\n            this.parseError(errStr, {\n                text: lexer.match,\n                token: this.terminals_[symbol] || symbol,\n                line: lexer.yylineno,\n                loc: yyloc,\n                expected: expected\n            });\n        }\n        if (action[0] instanceof Array && action.length > 1) {\n            throw new Error('Parse Error: multiple actions possible at state: ' + state + ', token: ' + symbol);\n        }\n        switch (action[0]) {\n        case 1:\n            stack.push(symbol);\n            vstack.push(lexer.yytext);\n            lstack.push(lexer.yylloc);\n            stack.push(action[1]);\n            symbol = null;\n            if (!preErrorSymbol) {\n                yyleng = lexer.yyleng;\n                yytext = lexer.yytext;\n                yylineno = lexer.yylineno;\n                yyloc = lexer.yylloc;\n                if (recovering > 0) {\n                    recovering--;\n                }\n            } else {\n                symbol = preErrorSymbol;\n                preErrorSymbol = null;\n            }\n            break;\n        case 2:\n            len = this.productions_[action[1]][1];\n            yyval.$ = vstack[vstack.length - len];\n            yyval._$ = {\n                first_line: lstack[lstack.length - (len || 1)].first_line,\n                last_line: lstack[lstack.length - 1].last_line,\n                first_column: lstack[lstack.length - (len || 1)].first_column,\n                last_column: lstack[lstack.length - 1].last_column\n            };\n            if (ranges) {\n                yyval._$.range = [\n                    lstack[lstack.length - (len || 1)].range[0],\n                    lstack[lstack.length - 1].range[1]\n                ];\n            }\n            r = this.performAction.apply(yyval, [\n                yytext,\n                yyleng,\n                yylineno,\n                sharedState.yy,\n                action[1],\n                vstack,\n                lstack\n            ].concat(args));\n            if (typeof r !== 'undefined') {\n                return r;\n            }\n            if (len) {\n                stack = stack.slice(0, -1 * len * 2);\n                vstack = vstack.slice(0, -1 * len);\n                lstack = lstack.slice(0, -1 * len);\n            }\n            stack.push(this.productions_[action[1]][0]);\n            vstack.push(yyval.$);\n            lstack.push(yyval._$);\n            newState = table[stack[stack.length - 2]][stack[stack.length - 1]];\n            stack.push(newState);\n            break;\n        case 3:\n            return true;\n        }\n    }\n    return true;\n}};\n\n/* generated by jison-lex 0.3.4 */\nvar lexer = (function(){\nvar lexer = ({\n\nEOF:1,\n\nparseError:function parseError(str, hash) {\n        if (this.yy.parser) {\n            this.yy.parser.parseError(str, hash);\n        } else {\n            throw new Error(str);\n        }\n    },\n\n// resets the lexer, sets new input\nsetInput:function (input, yy) {\n        this.yy = yy || this.yy || {};\n        this._input = input;\n        this._more = this._backtrack = this.done = false;\n        this.yylineno = this.yyleng = 0;\n        this.yytext = this.matched = this.match = '';\n        this.conditionStack = ['INITIAL'];\n        this.yylloc = {\n            first_line: 1,\n            first_column: 0,\n            last_line: 1,\n            last_column: 0\n        };\n        if (this.options.ranges) {\n            this.yylloc.range = [0,0];\n        }\n        this.offset = 0;\n        return this;\n    },\n\n// consumes and returns one char from the input\ninput:function () {\n        var ch = this._input[0];\n        this.yytext += ch;\n        this.yyleng++;\n        this.offset++;\n        this.match += ch;\n        this.matched += ch;\n        var lines = ch.match(/(?:\\r\\n?|\\n).*/g);\n        if (lines) {\n            this.yylineno++;\n            this.yylloc.last_line++;\n        } else {\n            this.yylloc.last_column++;\n        }\n        if (this.options.ranges) {\n            this.yylloc.range[1]++;\n        }\n\n        this._input = this._input.slice(1);\n        return ch;\n    },\n\n// unshifts one char (or a string) into the input\nunput:function (ch) {\n        var len = ch.length;\n        var lines = ch.split(/(?:\\r\\n?|\\n)/g);\n\n        this._input = ch + this._input;\n        this.yytext = this.yytext.substr(0, this.yytext.length - len);\n        //this.yyleng -= len;\n        this.offset -= len;\n        var oldLines = this.match.split(/(?:\\r\\n?|\\n)/g);\n        this.match = this.match.substr(0, this.match.length - 1);\n        this.matched = this.matched.substr(0, this.matched.length - 1);\n\n        if (lines.length - 1) {\n            this.yylineno -= lines.length - 1;\n        }\n        var r = this.yylloc.range;\n\n        this.yylloc = {\n            first_line: this.yylloc.first_line,\n            last_line: this.yylineno + 1,\n            first_column: this.yylloc.first_column,\n            last_column: lines ?\n                (lines.length === oldLines.length ? this.yylloc.first_column : 0)\n                 + oldLines[oldLines.length - lines.length].length - lines[0].length :\n              this.yylloc.first_column - len\n        };\n\n        if (this.options.ranges) {\n            this.yylloc.range = [r[0], r[0] + this.yyleng - len];\n        }\n        this.yyleng = this.yytext.length;\n        return this;\n    },\n\n// When called from action, caches matched text and appends it on next action\nmore:function () {\n        this._more = true;\n        return this;\n    },\n\n// When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead.\nreject:function () {\n        if (this.options.backtrack_lexer) {\n            this._backtrack = true;\n        } else {\n            return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\\n' + this.showPosition(), {\n                text: \"\",\n                token: null,\n                line: this.yylineno\n            });\n\n        }\n        return this;\n    },\n\n// retain first n characters of the match\nless:function (n) {\n        this.unput(this.match.slice(n));\n    },\n\n// displays already matched input, i.e. for error messages\npastInput:function () {\n        var past = this.matched.substr(0, this.matched.length - this.match.length);\n        return (past.length > 20 ? '...':'') + past.substr(-20).replace(/\\n/g, \"\");\n    },\n\n// displays upcoming input, i.e. for error messages\nupcomingInput:function () {\n        var next = this.match;\n        if (next.length < 20) {\n            next += this._input.substr(0, 20-next.length);\n        }\n        return (next.substr(0,20) + (next.length > 20 ? '...' : '')).replace(/\\n/g, \"\");\n    },\n\n// displays the character position where the lexing error occurred, i.e. for error messages\nshowPosition:function () {\n        var pre = this.pastInput();\n        var c = new Array(pre.length + 1).join(\"-\");\n        return pre + this.upcomingInput() + \"\\n\" + c + \"^\";\n    },\n\n// test the lexed token: return FALSE when not a match, otherwise return token\ntest_match:function(match, indexed_rule) {\n        var token,\n            lines,\n            backup;\n\n        if (this.options.backtrack_lexer) {\n            // save context\n            backup = {\n                yylineno: this.yylineno,\n                yylloc: {\n                    first_line: this.yylloc.first_line,\n                    last_line: this.last_line,\n                    first_column: this.yylloc.first_column,\n                    last_column: this.yylloc.last_column\n                },\n                yytext: this.yytext,\n                match: this.match,\n                matches: this.matches,\n                matched: this.matched,\n                yyleng: this.yyleng,\n                offset: this.offset,\n                _more: this._more,\n                _input: this._input,\n                yy: this.yy,\n                conditionStack: this.conditionStack.slice(0),\n                done: this.done\n            };\n            if (this.options.ranges) {\n                backup.yylloc.range = this.yylloc.range.slice(0);\n            }\n        }\n\n        lines = match[0].match(/(?:\\r\\n?|\\n).*/g);\n        if (lines) {\n            this.yylineno += lines.length;\n        }\n        this.yylloc = {\n            first_line: this.yylloc.last_line,\n            last_line: this.yylineno + 1,\n            first_column: this.yylloc.last_column,\n            last_column: lines ?\n                         lines[lines.length - 1].length - lines[lines.length - 1].match(/\\r?\\n?/)[0].length :\n                         this.yylloc.last_column + match[0].length\n        };\n        this.yytext += match[0];\n        this.match += match[0];\n        this.matches = match;\n        this.yyleng = this.yytext.length;\n        if (this.options.ranges) {\n            this.yylloc.range = [this.offset, this.offset += this.yyleng];\n        }\n        this._more = false;\n        this._backtrack = false;\n        this._input = this._input.slice(match[0].length);\n        this.matched += match[0];\n        token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]);\n        if (this.done && this._input) {\n            this.done = false;\n        }\n        if (token) {\n            return token;\n        } else if (this._backtrack) {\n            // recover context\n            for (var k in backup) {\n                this[k] = backup[k];\n            }\n            return false; // rule action called reject() implying the next rule should be tested instead.\n        }\n        return false;\n    },\n\n// return next match in input\nnext:function () {\n        if (this.done) {\n            return this.EOF;\n        }\n        if (!this._input) {\n            this.done = true;\n        }\n\n        var token,\n            match,\n            tempMatch,\n            index;\n        if (!this._more) {\n            this.yytext = '';\n            this.match = '';\n        }\n        var rules = this._currentRules();\n        for (var i = 0; i < rules.length; i++) {\n            tempMatch = this._input.match(this.rules[rules[i]]);\n            if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {\n                match = tempMatch;\n                index = i;\n                if (this.options.backtrack_lexer) {\n                    token = this.test_match(tempMatch, rules[i]);\n                    if (token !== false) {\n                        return token;\n                    } else if (this._backtrack) {\n                        match = false;\n                        continue; // rule action called reject() implying a rule MISmatch.\n                    } else {\n                        // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)\n                        return false;\n                    }\n                } else if (!this.options.flex) {\n                    break;\n                }\n            }\n        }\n        if (match) {\n            token = this.test_match(match, rules[index]);\n            if (token !== false) {\n                return token;\n            }\n            // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)\n            return false;\n        }\n        if (this._input === \"\") {\n            return this.EOF;\n        } else {\n            return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. Unrecognized text.\\n' + this.showPosition(), {\n                text: \"\",\n                token: null,\n                line: this.yylineno\n            });\n        }\n    },\n\n// return next match that has a token\nlex:function lex () {\n        var r = this.next();\n        if (r) {\n            return r;\n        } else {\n            return this.lex();\n        }\n    },\n\n// activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)\nbegin:function begin (condition) {\n        this.conditionStack.push(condition);\n    },\n\n// pop the previously active lexer condition state off the condition stack\npopState:function popState () {\n        var n = this.conditionStack.length - 1;\n        if (n > 0) {\n            return this.conditionStack.pop();\n        } else {\n            return this.conditionStack[0];\n        }\n    },\n\n// produce the lexer rule set which is active for the currently active lexer condition state\n_currentRules:function _currentRules () {\n        if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) {\n            return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;\n        } else {\n            return this.conditions[\"INITIAL\"].rules;\n        }\n    },\n\n// return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available\ntopState:function topState (n) {\n        n = this.conditionStack.length - 1 - Math.abs(n || 0);\n        if (n >= 0) {\n            return this.conditionStack[n];\n        } else {\n            return \"INITIAL\";\n        }\n    },\n\n// alias for begin(condition)\npushState:function pushState (condition) {\n        this.begin(condition);\n    },\n\n// return the number of states currently on the stack\nstateStackSize:function stateStackSize() {\n        return this.conditionStack.length;\n    },\noptions: {\"case-insensitive\":true},\nperformAction: function anonymous(yy,yy_,$avoiding_name_collisions,YY_START) {\nvar YYSTATE=YY_START;\nswitch($avoiding_name_collisions) {\ncase 0:return 36;\nbreak;\ncase 1:return 37;\nbreak;\ncase 2:return 38;\nbreak;\ncase 3:return 39;\nbreak;\ncase 4: this.begin('open_directive'); return 45; \nbreak;\ncase 5: this.begin('type_directive'); return 46; \nbreak;\ncase 6: this.popState(); this.begin('arg_directive'); return 34; \nbreak;\ncase 7: this.popState(); this.popState(); return 48; \nbreak;\ncase 8:return 47;\nbreak;\ncase 9:/* skip comments */\nbreak;\ncase 10:/* skip comments */{ /*console.log('Crap after close');*/ }\nbreak;\ncase 11:return 5;\nbreak;\ncase 12:/* skip all whitespace */\nbreak;\ncase 13:/* skip same-line whitespace */\nbreak;\ncase 14:/* skip comments */\nbreak;\ncase 15:/* skip comments */\nbreak;\ncase 16: this.pushState('SCALE'); /* console.log('Got scale', yy_.yytext);*/ return 15; \nbreak;\ncase 17:return 16;\nbreak;\ncase 18:this.popState();\nbreak;\ncase 19: /*console.log('Starting STATE zxzx'+yy.getDirection());*/this.pushState('STATE'); \nbreak;\ncase 20:this.popState();yy_.yytext=yy_.yytext.slice(0,-8).trim(); /*console.warn('Fork Fork: ',yy_.yytext);*/return 23;\nbreak;\ncase 21:this.popState();yy_.yytext=yy_.yytext.slice(0,-8).trim();/*console.warn('Fork Join: ',yy_.yytext);*/return 24;\nbreak;\ncase 22:this.popState();yy_.yytext=yy_.yytext.slice(0,-10).trim();/*console.warn('Fork Join: ',yy_.yytext);*/return 25;\nbreak;\ncase 23:this.popState();yy_.yytext=yy_.yytext.slice(0,-8).trim();/*console.warn('Fork Fork: ',yy_.yytext);*/return 23;\nbreak;\ncase 24:this.popState();yy_.yytext=yy_.yytext.slice(0,-8).trim();/*console.warn('Fork Join: ',yy_.yytext);*/return 24;\nbreak;\ncase 25:this.popState();yy_.yytext=yy_.yytext.slice(0,-10).trim();/*console.warn('Fork Join: ',yy_.yytext);*/return 25;\nbreak;\ncase 26: return 36;\nbreak;\ncase 27: return 37;\nbreak;\ncase 28: return 38;\nbreak;\ncase 29: return 39;\nbreak;\ncase 30: /*console.log('Starting STATE_STRING zxzx');*/this.begin(\"STATE_STRING\");\nbreak;\ncase 31:this.popState();this.pushState('STATE_ID');return \"AS\";\nbreak;\ncase 32:this.popState();/* console.log('STATE_ID', yy_.yytext);*/return \"ID\";\nbreak;\ncase 33:this.popState();\nbreak;\ncase 34: /*console.log('Long description:', yy_.yytext);*/return \"STATE_DESCR\";\nbreak;\ncase 35:/*console.log('COMPOSIT_STATE', yy_.yytext);*/return 17;\nbreak;\ncase 36:this.popState();\nbreak;\ncase 37:this.popState();this.pushState('struct'); /*console.log('begin struct', yy_.yytext);*/return 18;\nbreak;\ncase 38: /*console.log('Ending struct');*/ this.popState(); return 19;\nbreak;\ncase 39:/* nothing */\nbreak;\ncase 40: this.begin('NOTE'); return 27; \nbreak;\ncase 41: this.popState();this.pushState('NOTE_ID');return 43;\nbreak;\ncase 42: this.popState();this.pushState('NOTE_ID');return 44;\nbreak;\ncase 43: this.popState();this.pushState('FLOATING_NOTE');\nbreak;\ncase 44:this.popState();this.pushState('FLOATING_NOTE_ID');return \"AS\";\nbreak;\ncase 45:/**/\nbreak;\ncase 46: /*console.log('Floating note text: ', yy_.yytext);*/return \"NOTE_TEXT\";\nbreak;\ncase 47:this.popState();/*console.log('Floating note ID', yy_.yytext);*/return \"ID\";\nbreak;\ncase 48: this.popState();this.pushState('NOTE_TEXT');/*console.log('Got ID for note', yy_.yytext);*/return 22;\nbreak;\ncase 49: this.popState();/*console.log('Got NOTE_TEXT for note',yy_.yytext);*/yy_.yytext = yy_.yytext.substr(2).trim();return 29;\nbreak;\ncase 50: this.popState();/*console.log('Got NOTE_TEXT for note',yy_.yytext);*/yy_.yytext = yy_.yytext.slice(0,-8).trim();return 29;\nbreak;\ncase 51: /*console.log('Got state diagram', yy_.yytext,'#');*/return 7; \nbreak;\ncase 52: /*console.log('Got state diagram', yy_.yytext,'#');*/return 7; \nbreak;\ncase 53: /*console.log('HIDE_EMPTY', yy_.yytext,'#');*/return 14; \nbreak;\ncase 54: /*console.log('EDGE_STATE=',yy_.yytext);*/ return 42;\nbreak;\ncase 55: /*console.log('=>ID=',yy_.yytext);*/ return 22;\nbreak;\ncase 56: yy_.yytext = yy_.yytext.trim(); /*console.log('Descr = ', yy_.yytext);*/ return 12; \nbreak;\ncase 57:return 13;\nbreak;\ncase 58:return 26;\nbreak;\ncase 59:return 5;\nbreak;\ncase 60:return 'INVALID';\nbreak;\n}\n},\nrules: [/^(?:.*direction\\s+TB[^\\n]*)/i,/^(?:.*direction\\s+BT[^\\n]*)/i,/^(?:.*direction\\s+RL[^\\n]*)/i,/^(?:.*direction\\s+LR[^\\n]*)/i,/^(?:%%\\{)/i,/^(?:((?:(?!\\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\\}%%)/i,/^(?:((?:(?!\\}%%).|\\n)*))/i,/^(?:%%(?!\\{)[^\\n]*)/i,/^(?:[^\\}]%%[^\\n]*)/i,/^(?:[\\n]+)/i,/^(?:[\\s]+)/i,/^(?:((?!\\n)\\s)+)/i,/^(?:#[^\\n]*)/i,/^(?:%[^\\n]*)/i,/^(?:scale\\s+)/i,/^(?:\\d+)/i,/^(?:\\s+width\\b)/i,/^(?:state\\s+)/i,/^(?:.*<<fork>>)/i,/^(?:.*<<join>>)/i,/^(?:.*<<choice>>)/i,/^(?:.*\\[\\[fork\\]\\])/i,/^(?:.*\\[\\[join\\]\\])/i,/^(?:.*\\[\\[choice\\]\\])/i,/^(?:.*direction\\s+TB[^\\n]*)/i,/^(?:.*direction\\s+BT[^\\n]*)/i,/^(?:.*direction\\s+RL[^\\n]*)/i,/^(?:.*direction\\s+LR[^\\n]*)/i,/^(?:[\"])/i,/^(?:\\s*as\\s+)/i,/^(?:[^\\n\\{]*)/i,/^(?:[\"])/i,/^(?:[^\"]*)/i,/^(?:[^\\n\\s\\{]+)/i,/^(?:\\n)/i,/^(?:\\{)/i,/^(?:\\})/i,/^(?:[\\n])/i,/^(?:note\\s+)/i,/^(?:left of\\b)/i,/^(?:right of\\b)/i,/^(?:\")/i,/^(?:\\s*as\\s*)/i,/^(?:[\"])/i,/^(?:[^\"]*)/i,/^(?:[^\\n]*)/i,/^(?:\\s*[^:\\n\\s\\-]+)/i,/^(?:\\s*:[^:\\n;]+)/i,/^(?:[\\s\\S]*?end note\\b)/i,/^(?:stateDiagram\\s+)/i,/^(?:stateDiagram-v2\\s+)/i,/^(?:hide empty description\\b)/i,/^(?:\\[\\*\\])/i,/^(?:[^:\\n\\s\\-\\{]+)/i,/^(?:\\s*:[^:\\n;]+)/i,/^(?:-->)/i,/^(?:--)/i,/^(?:$)/i,/^(?:.)/i],\nconditions: {\"LINE\":{\"rules\":[13,14],\"inclusive\":false},\"close_directive\":{\"rules\":[13,14],\"inclusive\":false},\"arg_directive\":{\"rules\":[7,8,13,14],\"inclusive\":false},\"type_directive\":{\"rules\":[6,7,13,14],\"inclusive\":false},\"open_directive\":{\"rules\":[5,13,14],\"inclusive\":false},\"struct\":{\"rules\":[13,14,19,26,27,28,29,38,39,40,54,55,56,57,58],\"inclusive\":false},\"FLOATING_NOTE_ID\":{\"rules\":[47],\"inclusive\":false},\"FLOATING_NOTE\":{\"rules\":[44,45,46],\"inclusive\":false},\"NOTE_TEXT\":{\"rules\":[49,50],\"inclusive\":false},\"NOTE_ID\":{\"rules\":[48],\"inclusive\":false},\"NOTE\":{\"rules\":[41,42,43],\"inclusive\":false},\"SCALE\":{\"rules\":[17,18],\"inclusive\":false},\"ALIAS\":{\"rules\":[],\"inclusive\":false},\"STATE_ID\":{\"rules\":[32],\"inclusive\":false},\"STATE_STRING\":{\"rules\":[33,34],\"inclusive\":false},\"FORK_STATE\":{\"rules\":[],\"inclusive\":false},\"STATE\":{\"rules\":[13,14,20,21,22,23,24,25,30,31,35,36,37],\"inclusive\":false},\"ID\":{\"rules\":[13,14],\"inclusive\":false},\"INITIAL\":{\"rules\":[0,1,2,3,4,9,10,11,12,14,15,16,19,37,40,51,52,53,54,55,56,57,59,60],\"inclusive\":true}}\n});\nreturn lexer;\n})();\nparser.lexer = lexer;\nfunction Parser () {\n  this.yy = {};\n}\nParser.prototype = parser;parser.Parser = Parser;\nreturn new Parser;\n})();\n\n\nif (true) {\nexports.parser = parser;\nexports.Parser = parser.Parser;\nexports.parse = function () { return parser.parse.apply(parser, arguments); };\nexports.main = function commonjsMain (args) {\n    if (!args[1]) {\n        console.log('Usage: '+args[0]+' FILE');\n        process.exit(1);\n    }\n    var source = __webpack_require__(/*! fs */ \"./node_modules/node-libs-browser/mock/empty.js\").readFileSync(__webpack_require__(/*! path */ \"./node_modules/path-browserify/index.js\").normalize(args[1]), \"utf8\");\n    return exports.parser.parse(source);\n};\nif ( true && __webpack_require__.c[__webpack_require__.s] === module) {\n  exports.main(process.argv.slice(1));\n}\n}\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../node_modules/process/browser.js */ \"./node_modules/process/browser.js\"), __webpack_require__(/*! ./../../../../node_modules/webpack/buildin/module.js */ \"./node_modules/webpack/buildin/module.js\")(module)))\n\n/***/ }),\n\n/***/ \"./src/diagrams/state/shapes.js\":\n/*!**************************************!*\\\n  !*** ./src/diagrams/state/shapes.js ***!\n  \\**************************************/\n/*! exports provided: drawStartState, drawDivider, drawSimpleState, drawDescrState, addTitleAndBox, drawText, drawNote, drawState, drawEdge */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"drawStartState\", function() { return drawStartState; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"drawDivider\", function() { return drawDivider; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"drawSimpleState\", function() { return drawSimpleState; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"drawDescrState\", function() { return drawDescrState; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"addTitleAndBox\", function() { return addTitleAndBox; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"drawText\", function() { return drawText; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"drawNote\", function() { return drawNote; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"drawState\", function() { return drawState; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"drawEdge\", function() { return drawEdge; });\n/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3 */ \"./node_modules/d3/src/index.js\");\n/* harmony import */ var _id_cache_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./id-cache.js */ \"./src/diagrams/state/id-cache.js\");\n/* harmony import */ var _stateDb__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./stateDb */ \"./src/diagrams/state/stateDb.js\");\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../utils */ \"./src/utils.js\");\n/* harmony import */ var _common_common__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../common/common */ \"./src/diagrams/common/common.js\");\n/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../config */ \"./src/config.js\");\n/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../logger */ \"./src/logger.js\");\nfunction _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== \"undefined\" && o[Symbol.iterator] || o[\"@@iterator\"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\n\n\n\n\n\n\n // let conf;\n\n/**\n * Draws a start state as a black circle\n */\n\nvar drawStartState = function drawStartState(g) {\n  return g.append('circle') // .style('stroke', 'black')\n  // .style('fill', 'black')\n  .attr('class', 'start-state').attr('r', Object(_config__WEBPACK_IMPORTED_MODULE_5__[\"getConfig\"])().state.sizeUnit).attr('cx', Object(_config__WEBPACK_IMPORTED_MODULE_5__[\"getConfig\"])().state.padding + Object(_config__WEBPACK_IMPORTED_MODULE_5__[\"getConfig\"])().state.sizeUnit).attr('cy', Object(_config__WEBPACK_IMPORTED_MODULE_5__[\"getConfig\"])().state.padding + Object(_config__WEBPACK_IMPORTED_MODULE_5__[\"getConfig\"])().state.sizeUnit);\n};\n/**\n * Draws a start state as a black circle\n */\n\nvar drawDivider = function drawDivider(g) {\n  return g.append('line').style('stroke', 'grey').style('stroke-dasharray', '3').attr('x1', Object(_config__WEBPACK_IMPORTED_MODULE_5__[\"getConfig\"])().state.textHeight).attr('class', 'divider').attr('x2', Object(_config__WEBPACK_IMPORTED_MODULE_5__[\"getConfig\"])().state.textHeight * 2).attr('y1', 0).attr('y2', 0);\n};\n/**\n * Draws a an end state as a black circle\n */\n\nvar drawSimpleState = function drawSimpleState(g, stateDef) {\n  var state = g.append('text').attr('x', 2 * Object(_config__WEBPACK_IMPORTED_MODULE_5__[\"getConfig\"])().state.padding).attr('y', Object(_config__WEBPACK_IMPORTED_MODULE_5__[\"getConfig\"])().state.textHeight + 2 * Object(_config__WEBPACK_IMPORTED_MODULE_5__[\"getConfig\"])().state.padding).attr('font-size', Object(_config__WEBPACK_IMPORTED_MODULE_5__[\"getConfig\"])().state.fontSize).attr('class', 'state-title').text(stateDef.id);\n  var classBox = state.node().getBBox();\n  g.insert('rect', ':first-child').attr('x', Object(_config__WEBPACK_IMPORTED_MODULE_5__[\"getConfig\"])().state.padding).attr('y', Object(_config__WEBPACK_IMPORTED_MODULE_5__[\"getConfig\"])().state.padding).attr('width', classBox.width + 2 * Object(_config__WEBPACK_IMPORTED_MODULE_5__[\"getConfig\"])().state.padding).attr('height', classBox.height + 2 * Object(_config__WEBPACK_IMPORTED_MODULE_5__[\"getConfig\"])().state.padding).attr('rx', Object(_config__WEBPACK_IMPORTED_MODULE_5__[\"getConfig\"])().state.radius);\n  return state;\n};\n/**\n * Draws a state with descriptions\n * @param {*} g\n * @param {*} stateDef\n */\n\nvar drawDescrState = function drawDescrState(g, stateDef) {\n  var addTspan = function addTspan(textEl, txt, isFirst) {\n    var tSpan = textEl.append('tspan').attr('x', 2 * Object(_config__WEBPACK_IMPORTED_MODULE_5__[\"getConfig\"])().state.padding).text(txt);\n\n    if (!isFirst) {\n      tSpan.attr('dy', Object(_config__WEBPACK_IMPORTED_MODULE_5__[\"getConfig\"])().state.textHeight);\n    }\n  };\n\n  var title = g.append('text').attr('x', 2 * Object(_config__WEBPACK_IMPORTED_MODULE_5__[\"getConfig\"])().state.padding).attr('y', Object(_config__WEBPACK_IMPORTED_MODULE_5__[\"getConfig\"])().state.textHeight + 1.3 * Object(_config__WEBPACK_IMPORTED_MODULE_5__[\"getConfig\"])().state.padding).attr('font-size', Object(_config__WEBPACK_IMPORTED_MODULE_5__[\"getConfig\"])().state.fontSize).attr('class', 'state-title').text(stateDef.descriptions[0]);\n  var titleBox = title.node().getBBox();\n  var titleHeight = titleBox.height;\n  var description = g.append('text') // text label for the x axis\n  .attr('x', Object(_config__WEBPACK_IMPORTED_MODULE_5__[\"getConfig\"])().state.padding).attr('y', titleHeight + Object(_config__WEBPACK_IMPORTED_MODULE_5__[\"getConfig\"])().state.padding * 0.4 + Object(_config__WEBPACK_IMPORTED_MODULE_5__[\"getConfig\"])().state.dividerMargin + Object(_config__WEBPACK_IMPORTED_MODULE_5__[\"getConfig\"])().state.textHeight).attr('class', 'state-description');\n  var isFirst = true;\n  var isSecond = true;\n  stateDef.descriptions.forEach(function (descr) {\n    if (!isFirst) {\n      addTspan(description, descr, isSecond);\n      isSecond = false;\n    }\n\n    isFirst = false;\n  });\n  var descrLine = g.append('line') // text label for the x axis\n  .attr('x1', Object(_config__WEBPACK_IMPORTED_MODULE_5__[\"getConfig\"])().state.padding).attr('y1', Object(_config__WEBPACK_IMPORTED_MODULE_5__[\"getConfig\"])().state.padding + titleHeight + Object(_config__WEBPACK_IMPORTED_MODULE_5__[\"getConfig\"])().state.dividerMargin / 2).attr('y2', Object(_config__WEBPACK_IMPORTED_MODULE_5__[\"getConfig\"])().state.padding + titleHeight + Object(_config__WEBPACK_IMPORTED_MODULE_5__[\"getConfig\"])().state.dividerMargin / 2).attr('class', 'descr-divider');\n  var descrBox = description.node().getBBox();\n  var width = Math.max(descrBox.width, titleBox.width);\n  descrLine.attr('x2', width + 3 * Object(_config__WEBPACK_IMPORTED_MODULE_5__[\"getConfig\"])().state.padding); // const classBox = title.node().getBBox();\n\n  g.insert('rect', ':first-child').attr('x', Object(_config__WEBPACK_IMPORTED_MODULE_5__[\"getConfig\"])().state.padding).attr('y', Object(_config__WEBPACK_IMPORTED_MODULE_5__[\"getConfig\"])().state.padding).attr('width', width + 2 * Object(_config__WEBPACK_IMPORTED_MODULE_5__[\"getConfig\"])().state.padding).attr('height', descrBox.height + titleHeight + 2 * Object(_config__WEBPACK_IMPORTED_MODULE_5__[\"getConfig\"])().state.padding).attr('rx', Object(_config__WEBPACK_IMPORTED_MODULE_5__[\"getConfig\"])().state.radius);\n  return g;\n};\n/**\n * Adds the creates a box around the existing content and adds a\n * panel for the id on top of the content.\n */\n\n/**\n * Function that creates an title row and a frame around a substate for a composit state diagram.\n * The function returns a new d3 svg object with updated width and height properties;\n * @param {*} g The d3 svg object for the substate to framed\n * @param {*} stateDef The info about the\n */\n\nvar addTitleAndBox = function addTitleAndBox(g, stateDef, altBkg) {\n  var pad = Object(_config__WEBPACK_IMPORTED_MODULE_5__[\"getConfig\"])().state.padding;\n  var dblPad = 2 * Object(_config__WEBPACK_IMPORTED_MODULE_5__[\"getConfig\"])().state.padding;\n  var orgBox = g.node().getBBox();\n  var orgWidth = orgBox.width;\n  var orgX = orgBox.x;\n  var title = g.append('text').attr('x', 0).attr('y', Object(_config__WEBPACK_IMPORTED_MODULE_5__[\"getConfig\"])().state.titleShift).attr('font-size', Object(_config__WEBPACK_IMPORTED_MODULE_5__[\"getConfig\"])().state.fontSize).attr('class', 'state-title').text(stateDef.id);\n  var titleBox = title.node().getBBox();\n  var titleWidth = titleBox.width + dblPad;\n  var width = Math.max(titleWidth, orgWidth); // + dblPad;\n\n  if (width === orgWidth) {\n    width = width + dblPad;\n  }\n\n  var startX; // const lineY = 1 - getConfig().state.textHeight;\n  // const descrLine = g\n  //   .append('line') // text label for the x axis\n  //   .attr('x1', 0)\n  //   .attr('y1', lineY)\n  //   .attr('y2', lineY)\n  //   .attr('class', 'descr-divider');\n\n  var graphBox = g.node().getBBox(); // descrLine.attr('x2', graphBox.width + getConfig().state.padding);\n\n  if (stateDef.doc) {// cnsole.warn(\n    //   stateDef.id,\n    //   'orgX: ',\n    //   orgX,\n    //   'width: ',\n    //   width,\n    //   'titleWidth: ',\n    //   titleWidth,\n    //   'orgWidth: ',\n    //   orgWidth,\n    //   'width',\n    //   width\n    // );\n  }\n\n  startX = orgX - pad;\n\n  if (titleWidth > orgWidth) {\n    startX = (orgWidth - width) / 2 + pad;\n  }\n\n  if (Math.abs(orgX - graphBox.x) < pad) {\n    if (titleWidth > orgWidth) {\n      startX = orgX - (titleWidth - orgWidth) / 2;\n    }\n  }\n\n  var lineY = 1 - Object(_config__WEBPACK_IMPORTED_MODULE_5__[\"getConfig\"])().state.textHeight; // White color\n\n  g.insert('rect', ':first-child').attr('x', startX).attr('y', lineY).attr('class', altBkg ? 'alt-composit' : 'composit').attr('width', width).attr('height', graphBox.height + Object(_config__WEBPACK_IMPORTED_MODULE_5__[\"getConfig\"])().state.textHeight + Object(_config__WEBPACK_IMPORTED_MODULE_5__[\"getConfig\"])().state.titleShift + 1).attr('rx', '0');\n  title.attr('x', startX + pad);\n  if (titleWidth <= orgWidth) title.attr('x', orgX + (width - dblPad) / 2 - titleWidth / 2 + pad); // Title background\n\n  g.insert('rect', ':first-child').attr('x', startX).attr('y', Object(_config__WEBPACK_IMPORTED_MODULE_5__[\"getConfig\"])().state.titleShift - Object(_config__WEBPACK_IMPORTED_MODULE_5__[\"getConfig\"])().state.textHeight - Object(_config__WEBPACK_IMPORTED_MODULE_5__[\"getConfig\"])().state.padding).attr('width', width) // Just needs to be higher then the descr line, will be clipped by the white color box\n  .attr('height', Object(_config__WEBPACK_IMPORTED_MODULE_5__[\"getConfig\"])().state.textHeight * 3).attr('rx', Object(_config__WEBPACK_IMPORTED_MODULE_5__[\"getConfig\"])().state.radius); // Full background\n\n  g.insert('rect', ':first-child').attr('x', startX).attr('y', Object(_config__WEBPACK_IMPORTED_MODULE_5__[\"getConfig\"])().state.titleShift - Object(_config__WEBPACK_IMPORTED_MODULE_5__[\"getConfig\"])().state.textHeight - Object(_config__WEBPACK_IMPORTED_MODULE_5__[\"getConfig\"])().state.padding).attr('width', width).attr('height', graphBox.height + 3 + 2 * Object(_config__WEBPACK_IMPORTED_MODULE_5__[\"getConfig\"])().state.textHeight).attr('rx', Object(_config__WEBPACK_IMPORTED_MODULE_5__[\"getConfig\"])().state.radius);\n  return g;\n};\n\nvar drawEndState = function drawEndState(g) {\n  g.append('circle') // .style('stroke', 'black')\n  // .style('fill', 'white')\n  .attr('class', 'end-state-outer').attr('r', Object(_config__WEBPACK_IMPORTED_MODULE_5__[\"getConfig\"])().state.sizeUnit + Object(_config__WEBPACK_IMPORTED_MODULE_5__[\"getConfig\"])().state.miniPadding).attr('cx', Object(_config__WEBPACK_IMPORTED_MODULE_5__[\"getConfig\"])().state.padding + Object(_config__WEBPACK_IMPORTED_MODULE_5__[\"getConfig\"])().state.sizeUnit + Object(_config__WEBPACK_IMPORTED_MODULE_5__[\"getConfig\"])().state.miniPadding).attr('cy', Object(_config__WEBPACK_IMPORTED_MODULE_5__[\"getConfig\"])().state.padding + Object(_config__WEBPACK_IMPORTED_MODULE_5__[\"getConfig\"])().state.sizeUnit + Object(_config__WEBPACK_IMPORTED_MODULE_5__[\"getConfig\"])().state.miniPadding);\n  return g.append('circle') // .style('stroke', 'black')\n  // .style('fill', 'black')\n  .attr('class', 'end-state-inner').attr('r', Object(_config__WEBPACK_IMPORTED_MODULE_5__[\"getConfig\"])().state.sizeUnit).attr('cx', Object(_config__WEBPACK_IMPORTED_MODULE_5__[\"getConfig\"])().state.padding + Object(_config__WEBPACK_IMPORTED_MODULE_5__[\"getConfig\"])().state.sizeUnit + 2).attr('cy', Object(_config__WEBPACK_IMPORTED_MODULE_5__[\"getConfig\"])().state.padding + Object(_config__WEBPACK_IMPORTED_MODULE_5__[\"getConfig\"])().state.sizeUnit + 2);\n};\n\nvar drawForkJoinState = function drawForkJoinState(g, stateDef) {\n  var width = Object(_config__WEBPACK_IMPORTED_MODULE_5__[\"getConfig\"])().state.forkWidth;\n  var height = Object(_config__WEBPACK_IMPORTED_MODULE_5__[\"getConfig\"])().state.forkHeight;\n\n  if (stateDef.parentId) {\n    var tmp = width;\n    width = height;\n    height = tmp;\n  }\n\n  return g.append('rect').style('stroke', 'black').style('fill', 'black').attr('width', width).attr('height', height).attr('x', Object(_config__WEBPACK_IMPORTED_MODULE_5__[\"getConfig\"])().state.padding).attr('y', Object(_config__WEBPACK_IMPORTED_MODULE_5__[\"getConfig\"])().state.padding);\n};\n\nvar drawText = function drawText(elem, textData) {\n  // Remove and ignore br:s\n  var nText = textData.text.replace(_common_common__WEBPACK_IMPORTED_MODULE_4__[\"default\"].lineBreakRegex, ' ');\n  var textElem = elem.append('text');\n  textElem.attr('x', textData.x);\n  textElem.attr('y', textData.y);\n  textElem.style('text-anchor', textData.anchor);\n  textElem.attr('fill', textData.fill);\n\n  if (typeof textData.class !== 'undefined') {\n    textElem.attr('class', textData.class);\n  }\n\n  var span = textElem.append('tspan');\n  span.attr('x', textData.x + textData.textMargin * 2);\n  span.attr('fill', textData.fill);\n  span.text(nText);\n  return textElem;\n};\n\nvar _drawLongText = function _drawLongText(_text, x, y, g) {\n  var textHeight = 0;\n  var textElem = g.append('text');\n  textElem.style('text-anchor', 'start');\n  textElem.attr('class', 'noteText');\n\n  var text = _text.replace(/\\r\\n/g, '<br/>');\n\n  text = text.replace(/\\n/g, '<br/>');\n  var lines = text.split(_common_common__WEBPACK_IMPORTED_MODULE_4__[\"default\"].lineBreakRegex);\n  var tHeight = 1.25 * Object(_config__WEBPACK_IMPORTED_MODULE_5__[\"getConfig\"])().state.noteMargin;\n\n  var _iterator = _createForOfIteratorHelper(lines),\n      _step;\n\n  try {\n    for (_iterator.s(); !(_step = _iterator.n()).done;) {\n      var _line = _step.value;\n\n      var txt = _line.trim();\n\n      if (txt.length > 0) {\n        var span = textElem.append('tspan');\n        span.text(txt);\n\n        if (tHeight === 0) {\n          var textBounds = span.node().getBBox();\n          tHeight += textBounds.height;\n        }\n\n        textHeight += tHeight;\n        span.attr('x', x + Object(_config__WEBPACK_IMPORTED_MODULE_5__[\"getConfig\"])().state.noteMargin);\n        span.attr('y', y + textHeight + 1.25 * Object(_config__WEBPACK_IMPORTED_MODULE_5__[\"getConfig\"])().state.noteMargin);\n      }\n    }\n  } catch (err) {\n    _iterator.e(err);\n  } finally {\n    _iterator.f();\n  }\n\n  return {\n    textWidth: textElem.node().getBBox().width,\n    textHeight: textHeight\n  };\n};\n/**\n * Draws a note to the diagram\n * @param text - The text of the given note.\n * @param g - The element the note is attached to.\n */\n\n\nvar drawNote = function drawNote(text, g) {\n  g.attr('class', 'state-note');\n  var note = g.append('rect').attr('x', 0).attr('y', Object(_config__WEBPACK_IMPORTED_MODULE_5__[\"getConfig\"])().state.padding);\n  var rectElem = g.append('g');\n\n  var _drawLongText2 = _drawLongText(text, 0, 0, rectElem),\n      textWidth = _drawLongText2.textWidth,\n      textHeight = _drawLongText2.textHeight;\n\n  note.attr('height', textHeight + 2 * Object(_config__WEBPACK_IMPORTED_MODULE_5__[\"getConfig\"])().state.noteMargin);\n  note.attr('width', textWidth + Object(_config__WEBPACK_IMPORTED_MODULE_5__[\"getConfig\"])().state.noteMargin * 2);\n  return note;\n};\n/**\n * Starting point for drawing a state. The function finds out the specifics\n * about the state and renders with approprtiate function.\n * @param {*} elem\n * @param {*} stateDef\n */\n\nvar drawState = function drawState(elem, stateDef) {\n  var id = stateDef.id;\n  var stateInfo = {\n    id: id,\n    label: stateDef.id,\n    width: 0,\n    height: 0\n  };\n  var g = elem.append('g').attr('id', id).attr('class', 'stateGroup');\n  if (stateDef.type === 'start') drawStartState(g);\n  if (stateDef.type === 'end') drawEndState(g);\n  if (stateDef.type === 'fork' || stateDef.type === 'join') drawForkJoinState(g, stateDef);\n  if (stateDef.type === 'note') drawNote(stateDef.note.text, g);\n  if (stateDef.type === 'divider') drawDivider(g);\n  if (stateDef.type === 'default' && stateDef.descriptions.length === 0) drawSimpleState(g, stateDef);\n  if (stateDef.type === 'default' && stateDef.descriptions.length > 0) drawDescrState(g, stateDef);\n  var stateBox = g.node().getBBox();\n  stateInfo.width = stateBox.width + 2 * Object(_config__WEBPACK_IMPORTED_MODULE_5__[\"getConfig\"])().state.padding;\n  stateInfo.height = stateBox.height + 2 * Object(_config__WEBPACK_IMPORTED_MODULE_5__[\"getConfig\"])().state.padding;\n  _id_cache_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"].set(id, stateInfo); // stateCnt++;\n\n  return stateInfo;\n};\nvar edgeCount = 0;\nvar drawEdge = function drawEdge(elem, path, relation) {\n  var getRelationType = function getRelationType(type) {\n    switch (type) {\n      case _stateDb__WEBPACK_IMPORTED_MODULE_2__[\"default\"].relationType.AGGREGATION:\n        return 'aggregation';\n\n      case _stateDb__WEBPACK_IMPORTED_MODULE_2__[\"default\"].relationType.EXTENSION:\n        return 'extension';\n\n      case _stateDb__WEBPACK_IMPORTED_MODULE_2__[\"default\"].relationType.COMPOSITION:\n        return 'composition';\n\n      case _stateDb__WEBPACK_IMPORTED_MODULE_2__[\"default\"].relationType.DEPENDENCY:\n        return 'dependency';\n    }\n  };\n\n  path.points = path.points.filter(function (p) {\n    return !Number.isNaN(p.y);\n  }); // The data for our line\n\n  var lineData = path.points; // This is the accessor function we talked about above\n\n  var lineFunction = Object(d3__WEBPACK_IMPORTED_MODULE_0__[\"line\"])().x(function (d) {\n    return d.x;\n  }).y(function (d) {\n    return d.y;\n  }).curve(d3__WEBPACK_IMPORTED_MODULE_0__[\"curveBasis\"]);\n  var svgPath = elem.append('path').attr('d', lineFunction(lineData)).attr('id', 'edge' + edgeCount).attr('class', 'transition');\n  var url = '';\n\n  if (Object(_config__WEBPACK_IMPORTED_MODULE_5__[\"getConfig\"])().state.arrowMarkerAbsolute) {\n    url = window.location.protocol + '//' + window.location.host + window.location.pathname + window.location.search;\n    url = url.replace(/\\(/g, '\\\\(');\n    url = url.replace(/\\)/g, '\\\\)');\n  }\n\n  svgPath.attr('marker-end', 'url(' + url + '#' + getRelationType(_stateDb__WEBPACK_IMPORTED_MODULE_2__[\"default\"].relationType.DEPENDENCY) + 'End' + ')');\n\n  if (typeof relation.title !== 'undefined') {\n    var label = elem.append('g').attr('class', 'stateLabel');\n\n    var _utils$calcLabelPosit = _utils__WEBPACK_IMPORTED_MODULE_3__[\"default\"].calcLabelPosition(path.points),\n        x = _utils$calcLabelPosit.x,\n        y = _utils$calcLabelPosit.y;\n\n    var rows = _common_common__WEBPACK_IMPORTED_MODULE_4__[\"default\"].getRows(relation.title);\n    var titleHeight = 0;\n    var titleRows = [];\n    var maxWidth = 0;\n    var minX = 0;\n\n    for (var i = 0; i <= rows.length; i++) {\n      var title = label.append('text').attr('text-anchor', 'middle').text(rows[i]).attr('x', x).attr('y', y + titleHeight);\n      var boundstmp = title.node().getBBox();\n      maxWidth = Math.max(maxWidth, boundstmp.width);\n      minX = Math.min(minX, boundstmp.x);\n      _logger__WEBPACK_IMPORTED_MODULE_6__[\"log\"].info(boundstmp.x, x, y + titleHeight);\n\n      if (titleHeight === 0) {\n        var titleBox = title.node().getBBox();\n        titleHeight = titleBox.height;\n        _logger__WEBPACK_IMPORTED_MODULE_6__[\"log\"].info('Title height', titleHeight, y);\n      }\n\n      titleRows.push(title);\n    }\n\n    var boxHeight = titleHeight * rows.length;\n\n    if (rows.length > 1) {\n      var heightAdj = (rows.length - 1) * titleHeight * 0.5;\n      titleRows.forEach(function (title, i) {\n        return title.attr('y', y + i * titleHeight - heightAdj);\n      });\n      boxHeight = titleHeight * rows.length;\n    }\n\n    var bounds = label.node().getBBox();\n    label.insert('rect', ':first-child').attr('class', 'box').attr('x', x - maxWidth / 2 - Object(_config__WEBPACK_IMPORTED_MODULE_5__[\"getConfig\"])().state.padding / 2).attr('y', y - boxHeight / 2 - Object(_config__WEBPACK_IMPORTED_MODULE_5__[\"getConfig\"])().state.padding / 2 - 3.5).attr('width', maxWidth + Object(_config__WEBPACK_IMPORTED_MODULE_5__[\"getConfig\"])().state.padding).attr('height', boxHeight + Object(_config__WEBPACK_IMPORTED_MODULE_5__[\"getConfig\"])().state.padding);\n    _logger__WEBPACK_IMPORTED_MODULE_6__[\"log\"].info(bounds); //label.attr('transform', '0 -' + (bounds.y / 2));\n    // Debug points\n    // path.points.forEach(point => {\n    //   g.append('circle')\n    //     .style('stroke', 'red')\n    //     .style('fill', 'red')\n    //     .attr('r', 1)\n    //     .attr('cx', point.x)\n    //     .attr('cy', point.y);\n    // });\n    // g.append('circle')\n    //   .style('stroke', 'blue')\n    //   .style('fill', 'blue')\n    //   .attr('r', 1)\n    //   .attr('cx', x)\n    //   .attr('cy', y);\n  }\n\n  edgeCount++;\n};\n\n/***/ }),\n\n/***/ \"./src/diagrams/state/stateDb.js\":\n/*!***************************************!*\\\n  !*** ./src/diagrams/state/stateDb.js ***!\n  \\***************************************/\n/*! exports provided: parseDirective, addState, clear, getState, getStates, logDocuments, getRelations, addRelation, cleanupLabel, lineType, relationType, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"parseDirective\", function() { return parseDirective; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"addState\", function() { return addState; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"clear\", function() { return clear; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getState\", function() { return getState; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getStates\", function() { return getStates; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"logDocuments\", function() { return logDocuments; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getRelations\", function() { return getRelations; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"addRelation\", function() { return addRelation; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"cleanupLabel\", function() { return cleanupLabel; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"lineType\", function() { return lineType; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"relationType\", function() { return relationType; });\n/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../logger */ \"./src/logger.js\");\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../utils */ \"./src/utils.js\");\n/* harmony import */ var _mermaidAPI__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../mermaidAPI */ \"./src/mermaidAPI.js\");\n/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../config */ \"./src/config.js\");\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n\n\n\n\n\nvar clone = function clone(o) {\n  return JSON.parse(JSON.stringify(o));\n};\n\nvar rootDoc = [];\nvar parseDirective = function parseDirective(statement, context, type) {\n  _mermaidAPI__WEBPACK_IMPORTED_MODULE_2__[\"default\"].parseDirective(this, statement, context, type);\n};\n\nvar setRootDoc = function setRootDoc(o) {\n  _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].info('Setting root doc', o); // rootDoc = { id: 'root', doc: o };\n\n  rootDoc = o;\n};\n\nvar getRootDoc = function getRootDoc() {\n  return rootDoc;\n};\n\nvar docTranslator = function docTranslator(parent, node, first) {\n  if (node.stmt === 'relation') {\n    docTranslator(parent, node.state1, true);\n    docTranslator(parent, node.state2, false);\n  } else {\n    if (node.stmt === 'state') {\n      if (node.id === '[*]') {\n        node.id = first ? parent.id + '_start' : parent.id + '_end';\n        node.start = first;\n      }\n    }\n\n    if (node.doc) {\n      var doc = []; // Check for concurrency\n\n      var i = 0;\n      var currentDoc = [];\n\n      for (i = 0; i < node.doc.length; i++) {\n        if (node.doc[i].type === 'divider') {\n          // debugger;\n          var newNode = clone(node.doc[i]);\n          newNode.doc = clone(currentDoc);\n          doc.push(newNode);\n          currentDoc = [];\n        } else {\n          currentDoc.push(node.doc[i]);\n        }\n      } // If any divider was encountered\n\n\n      if (doc.length > 0 && currentDoc.length > 0) {\n        var _newNode = {\n          stmt: 'state',\n          id: Object(_utils__WEBPACK_IMPORTED_MODULE_1__[\"generateId\"])(),\n          type: 'divider',\n          doc: clone(currentDoc)\n        };\n        doc.push(clone(_newNode));\n        node.doc = doc;\n      }\n\n      node.doc.forEach(function (docNode) {\n        return docTranslator(node, docNode, true);\n      });\n    }\n  }\n};\n\nvar getRootDocV2 = function getRootDocV2() {\n  docTranslator({\n    id: 'root'\n  }, {\n    id: 'root',\n    doc: rootDoc\n  }, true);\n  return {\n    id: 'root',\n    doc: rootDoc\n  }; // Here\n};\n\nvar extract = function extract(_doc) {\n  // const res = { states: [], relations: [] };\n  var doc;\n\n  if (_doc.doc) {\n    doc = _doc.doc;\n  } else {\n    doc = _doc;\n  } // let doc = root.doc;\n  // if (!doc) {\n  //   doc = root;\n  // }\n\n\n  _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].info(doc);\n  clear();\n  _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].info('Extract', doc);\n  doc.forEach(function (item) {\n    if (item.stmt === 'state') {\n      addState(item.id, item.type, item.doc, item.description, item.note);\n    }\n\n    if (item.stmt === 'relation') {\n      addRelation(item.state1.id, item.state2.id, item.description);\n    }\n  });\n};\n\nvar newDoc = function newDoc() {\n  return {\n    relations: [],\n    states: {},\n    documents: {}\n  };\n};\n\nvar documents = {\n  root: newDoc()\n};\nvar currentDocument = documents.root;\nvar startCnt = 0;\nvar endCnt = 0; // eslint-disable-line\n// let stateCnt = 0;\n\n/**\n * Function called by parser when a node definition has been found.\n * @param id\n * @param text\n * @param type\n * @param style\n */\n\nvar addState = function addState(id, type, doc, descr, note) {\n  if (typeof currentDocument.states[id] === 'undefined') {\n    currentDocument.states[id] = {\n      id: id,\n      descriptions: [],\n      type: type,\n      doc: doc,\n      note: note\n    };\n  } else {\n    if (!currentDocument.states[id].doc) {\n      currentDocument.states[id].doc = doc;\n    }\n\n    if (!currentDocument.states[id].type) {\n      currentDocument.states[id].type = type;\n    }\n  }\n\n  if (descr) {\n    _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].info('Adding state ', id, descr);\n    if (typeof descr === 'string') addDescription(id, descr.trim());\n\n    if (_typeof(descr) === 'object') {\n      descr.forEach(function (des) {\n        return addDescription(id, des.trim());\n      });\n    }\n  }\n\n  if (note) currentDocument.states[id].note = note;\n};\nvar clear = function clear() {\n  documents = {\n    root: newDoc()\n  };\n  currentDocument = documents.root;\n  currentDocument = documents.root;\n  startCnt = 0;\n  endCnt = 0; // eslint-disable-line\n\n  classes = [];\n};\nvar getState = function getState(id) {\n  return currentDocument.states[id];\n};\nvar getStates = function getStates() {\n  return currentDocument.states;\n};\nvar logDocuments = function logDocuments() {\n  _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].info('Documents = ', documents);\n};\nvar getRelations = function getRelations() {\n  return currentDocument.relations;\n};\nvar addRelation = function addRelation(_id1, _id2, title) {\n  var id1 = _id1;\n  var id2 = _id2;\n  var type1 = 'default';\n  var type2 = 'default';\n\n  if (_id1 === '[*]') {\n    startCnt++;\n    id1 = 'start' + startCnt;\n    type1 = 'start';\n  }\n\n  if (_id2 === '[*]') {\n    endCnt++;\n    id2 = 'end' + startCnt;\n    type2 = 'end';\n  }\n\n  addState(id1, type1);\n  addState(id2, type2);\n  currentDocument.relations.push({\n    id1: id1,\n    id2: id2,\n    title: title\n  });\n};\n\nvar addDescription = function addDescription(id, _descr) {\n  var theState = currentDocument.states[id];\n  var descr = _descr;\n\n  if (descr[0] === ':') {\n    descr = descr.substr(1).trim();\n  }\n\n  theState.descriptions.push(descr);\n};\n\nvar cleanupLabel = function cleanupLabel(label) {\n  if (label.substring(0, 1) === ':') {\n    return label.substr(2).trim();\n  } else {\n    return label.trim();\n  }\n};\nvar lineType = {\n  LINE: 0,\n  DOTTED_LINE: 1\n};\nvar dividerCnt = 0;\n\nvar getDividerId = function getDividerId() {\n  dividerCnt++;\n  return 'divider-id-' + dividerCnt;\n};\n\nvar classes = [];\n\nvar getClasses = function getClasses() {\n  return classes;\n};\n\nvar direction = 'TB';\n\nvar getDirection = function getDirection() {\n  return direction;\n};\n\nvar setDirection = function setDirection(dir) {\n  direction = dir;\n};\n\nvar relationType = {\n  AGGREGATION: 0,\n  EXTENSION: 1,\n  COMPOSITION: 2,\n  DEPENDENCY: 3\n};\n\nvar trimColon = function trimColon(str) {\n  return str && str[0] === ':' ? str.substr(1).trim() : str.trim();\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n  parseDirective: parseDirective,\n  getConfig: function getConfig() {\n    return _config__WEBPACK_IMPORTED_MODULE_3__[\"getConfig\"]().state;\n  },\n  addState: addState,\n  clear: clear,\n  getState: getState,\n  getStates: getStates,\n  getRelations: getRelations,\n  getClasses: getClasses,\n  getDirection: getDirection,\n  addRelation: addRelation,\n  getDividerId: getDividerId,\n  setDirection: setDirection,\n  // addDescription,\n  cleanupLabel: cleanupLabel,\n  lineType: lineType,\n  relationType: relationType,\n  logDocuments: logDocuments,\n  getRootDoc: getRootDoc,\n  setRootDoc: setRootDoc,\n  getRootDocV2: getRootDocV2,\n  extract: extract,\n  trimColon: trimColon\n});\n\n/***/ }),\n\n/***/ \"./src/diagrams/state/stateRenderer-v2.js\":\n/*!************************************************!*\\\n  !*** ./src/diagrams/state/stateRenderer-v2.js ***!\n  \\************************************************/\n/*! exports provided: setConf, getClasses, draw, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"setConf\", function() { return setConf; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getClasses\", function() { return getClasses; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"draw\", function() { return draw; });\n/* harmony import */ var graphlib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! graphlib */ \"./node_modules/graphlib/index.js\");\n/* harmony import */ var graphlib__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(graphlib__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! d3 */ \"./node_modules/d3/src/index.js\");\n/* harmony import */ var _stateDb__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./stateDb */ \"./src/diagrams/state/stateDb.js\");\n/* harmony import */ var _parser_stateDiagram__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./parser/stateDiagram */ \"./src/diagrams/state/parser/stateDiagram.jison\");\n/* harmony import */ var _parser_stateDiagram__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_parser_stateDiagram__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../config */ \"./src/config.js\");\n/* harmony import */ var _dagre_wrapper_index_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../dagre-wrapper/index.js */ \"./src/dagre-wrapper/index.js\");\n/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../logger */ \"./src/logger.js\");\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../utils */ \"./src/utils.js\");\n\n\n\n\n // import { evaluate } from '../common/common';\n\n\n\n\nvar conf = {};\nvar setConf = function setConf(cnf) {\n  var keys = Object.keys(cnf);\n\n  for (var i = 0; i < keys.length; i++) {\n    conf[keys[i]] = cnf[keys[i]];\n  }\n};\nvar nodeDb = {};\n/**\n * Returns the all the styles from classDef statements in the graph definition.\n * @returns {object} classDef styles\n */\n\nvar getClasses = function getClasses(text) {\n  _logger__WEBPACK_IMPORTED_MODULE_6__[\"log\"].trace('Extracting classes');\n  _stateDb__WEBPACK_IMPORTED_MODULE_2__[\"default\"].clear();\n  var parser = _parser_stateDiagram__WEBPACK_IMPORTED_MODULE_3___default.a.parser;\n  parser.yy = _stateDb__WEBPACK_IMPORTED_MODULE_2__[\"default\"]; // Parse the graph definition\n\n  parser.parse(text);\n  return _stateDb__WEBPACK_IMPORTED_MODULE_2__[\"default\"].getClasses();\n};\n\nvar setupNode = function setupNode(g, parent, node, altFlag) {\n  // Add the node\n  if (node.id !== 'root') {\n    var shape = 'rect';\n\n    if (node.start === true) {\n      shape = 'start';\n    }\n\n    if (node.start === false) {\n      shape = 'end';\n    }\n\n    if (node.type !== 'default') {\n      shape = node.type;\n    }\n\n    if (!nodeDb[node.id]) {\n      nodeDb[node.id] = {\n        id: node.id,\n        shape: shape,\n        description: node.id,\n        classes: 'statediagram-state'\n      };\n    } // Build of the array of description strings accordinging\n\n\n    if (node.description) {\n      if (Array.isArray(nodeDb[node.id].description)) {\n        // There already is an array of strings,add to it\n        nodeDb[node.id].shape = 'rectWithTitle';\n        nodeDb[node.id].description.push(node.description);\n      } else {\n        if (nodeDb[node.id].description.length > 0) {\n          // if there is a description already transformit to an array\n          nodeDb[node.id].shape = 'rectWithTitle';\n\n          if (nodeDb[node.id].description === node.id) {\n            // If the previous description was the is, remove it\n            nodeDb[node.id].description = [node.description];\n          } else {\n            nodeDb[node.id].description = [nodeDb[node.id].description, node.description];\n          }\n        } else {\n          nodeDb[node.id].shape = 'rect';\n          nodeDb[node.id].description = node.description;\n        }\n      }\n    } // Save data for description and group so that for instance a statement without description overwrites\n    // one with description\n    // group\n\n\n    if (!nodeDb[node.id].type && node.doc) {\n      _logger__WEBPACK_IMPORTED_MODULE_6__[\"log\"].info('Setting cluster for ', node.id, getDir(node));\n      nodeDb[node.id].type = 'group';\n      nodeDb[node.id].dir = getDir(node);\n      nodeDb[node.id].shape = node.type === 'divider' ? 'divider' : 'roundedWithTitle';\n      nodeDb[node.id].classes = nodeDb[node.id].classes + ' ' + (altFlag ? 'statediagram-cluster statediagram-cluster-alt' : 'statediagram-cluster');\n    }\n\n    var nodeData = {\n      labelStyle: '',\n      shape: nodeDb[node.id].shape,\n      labelText: nodeDb[node.id].description,\n      // typeof nodeDb[node.id].description === 'object'\n      //   ? nodeDb[node.id].description[0]\n      //   : nodeDb[node.id].description,\n      classes: nodeDb[node.id].classes,\n      //classStr,\n      style: '',\n      //styles.style,\n      id: node.id,\n      dir: nodeDb[node.id].dir,\n      domId: 'state-' + node.id + '-' + cnt,\n      type: nodeDb[node.id].type,\n      padding: 15 //getConfig().flowchart.padding\n\n    };\n\n    if (node.note) {\n      // Todo: set random id\n      var noteData = {\n        labelStyle: '',\n        shape: 'note',\n        labelText: node.note.text,\n        classes: 'statediagram-note',\n        //classStr,\n        style: '',\n        //styles.style,\n        id: node.id + '----note-' + cnt,\n        domId: 'state-' + node.id + '----note-' + cnt,\n        type: nodeDb[node.id].type,\n        padding: 15 //getConfig().flowchart.padding\n\n      };\n      var groupData = {\n        labelStyle: '',\n        shape: 'noteGroup',\n        labelText: node.note.text,\n        classes: nodeDb[node.id].classes,\n        //classStr,\n        style: '',\n        //styles.style,\n        id: node.id + '----parent',\n        domId: 'state-' + node.id + '----parent-' + cnt,\n        type: 'group',\n        padding: 0 //getConfig().flowchart.padding\n\n      };\n      cnt++;\n      g.setNode(node.id + '----parent', groupData);\n      g.setNode(noteData.id, noteData);\n      g.setNode(node.id, nodeData);\n      g.setParent(node.id, node.id + '----parent');\n      g.setParent(noteData.id, node.id + '----parent');\n      var from = node.id;\n      var to = noteData.id;\n\n      if (node.note.position === 'left of') {\n        from = noteData.id;\n        to = node.id;\n      }\n\n      g.setEdge(from, to, {\n        arrowhead: 'none',\n        arrowType: '',\n        style: 'fill:none',\n        labelStyle: '',\n        classes: 'transition note-edge',\n        arrowheadStyle: 'fill: #333',\n        labelpos: 'c',\n        labelType: 'text',\n        thickness: 'normal'\n      });\n    } else {\n      g.setNode(node.id, nodeData);\n    }\n  }\n\n  if (parent) {\n    if (parent.id !== 'root') {\n      _logger__WEBPACK_IMPORTED_MODULE_6__[\"log\"].trace('Setting node ', node.id, ' to be child of its parent ', parent.id);\n      g.setParent(node.id, parent.id);\n    }\n  }\n\n  if (node.doc) {\n    _logger__WEBPACK_IMPORTED_MODULE_6__[\"log\"].trace('Adding nodes children ');\n    setupDoc(g, node, node.doc, !altFlag);\n  }\n};\n\nvar cnt = 0;\n\nvar setupDoc = function setupDoc(g, parent, doc, altFlag) {\n  // cnt = 0;\n  _logger__WEBPACK_IMPORTED_MODULE_6__[\"log\"].trace('items', doc);\n  doc.forEach(function (item) {\n    if (item.stmt === 'state' || item.stmt === 'default') {\n      setupNode(g, parent, item, altFlag);\n    } else if (item.stmt === 'relation') {\n      setupNode(g, parent, item.state1, altFlag);\n      setupNode(g, parent, item.state2, altFlag);\n      var edgeData = {\n        id: 'edge' + cnt,\n        arrowhead: 'normal',\n        arrowTypeEnd: 'arrow_barb',\n        style: 'fill:none',\n        labelStyle: '',\n        label: item.description,\n        arrowheadStyle: 'fill: #333',\n        labelpos: 'c',\n        labelType: 'text',\n        thickness: 'normal',\n        classes: 'transition'\n      };\n      var startId = item.state1.id;\n      var endId = item.state2.id;\n      g.setEdge(startId, endId, edgeData, cnt);\n      cnt++;\n    }\n  });\n};\n\nvar getDir = function getDir(nodes, defaultDir) {\n  var dir = defaultDir || 'TB';\n\n  if (nodes.doc) {\n    for (var i = 0; i < nodes.doc.length; i++) {\n      var node = nodes.doc[i];\n\n      if (node.stmt === 'dir') {\n        dir = node.value;\n      }\n    }\n  }\n\n  return dir;\n};\n/**\n * Draws a flowchart in the tag with id: id based on the graph definition in text.\n * @param text\n * @param id\n */\n\n\nvar draw = function draw(text, id) {\n  _logger__WEBPACK_IMPORTED_MODULE_6__[\"log\"].info('Drawing state diagram (v2)', id);\n  _stateDb__WEBPACK_IMPORTED_MODULE_2__[\"default\"].clear();\n  nodeDb = {};\n  var parser = _parser_stateDiagram__WEBPACK_IMPORTED_MODULE_3___default.a.parser;\n  parser.yy = _stateDb__WEBPACK_IMPORTED_MODULE_2__[\"default\"]; // Parse the graph definition\n\n  parser.parse(text); // Fetch the default direction, use TD if none was found\n\n  var dir = _stateDb__WEBPACK_IMPORTED_MODULE_2__[\"default\"].getDirection();\n\n  if (typeof dir === 'undefined') {\n    dir = 'LR';\n  }\n\n  var conf = Object(_config__WEBPACK_IMPORTED_MODULE_4__[\"getConfig\"])().state;\n  var nodeSpacing = conf.nodeSpacing || 50;\n  var rankSpacing = conf.rankSpacing || 50;\n  _logger__WEBPACK_IMPORTED_MODULE_6__[\"log\"].info(_stateDb__WEBPACK_IMPORTED_MODULE_2__[\"default\"].getRootDocV2());\n  _stateDb__WEBPACK_IMPORTED_MODULE_2__[\"default\"].extract(_stateDb__WEBPACK_IMPORTED_MODULE_2__[\"default\"].getRootDocV2());\n  _logger__WEBPACK_IMPORTED_MODULE_6__[\"log\"].info(_stateDb__WEBPACK_IMPORTED_MODULE_2__[\"default\"].getRootDocV2()); // Create the input mermaid.graph\n\n  var g = new graphlib__WEBPACK_IMPORTED_MODULE_0___default.a.Graph({\n    multigraph: true,\n    compound: true\n  }).setGraph({\n    rankdir: getDir(_stateDb__WEBPACK_IMPORTED_MODULE_2__[\"default\"].getRootDocV2()),\n    nodesep: nodeSpacing,\n    ranksep: rankSpacing,\n    marginx: 8,\n    marginy: 8\n  }).setDefaultEdgeLabel(function () {\n    return {};\n  });\n  setupNode(g, undefined, _stateDb__WEBPACK_IMPORTED_MODULE_2__[\"default\"].getRootDocV2(), true); // Set up an SVG group so that we can translate the final graph.\n\n  var svg = Object(d3__WEBPACK_IMPORTED_MODULE_1__[\"select\"])(\"[id=\\\"\".concat(id, \"\\\"]\")); // Run the renderer. This is what draws the final graph.\n\n  var element = Object(d3__WEBPACK_IMPORTED_MODULE_1__[\"select\"])('#' + id + ' g');\n  Object(_dagre_wrapper_index_js__WEBPACK_IMPORTED_MODULE_5__[\"render\"])(element, g, ['barb'], 'statediagram', id);\n  var padding = 8;\n  var bounds = svg.node().getBBox();\n  var width = bounds.width + padding * 2;\n  var height = bounds.height + padding * 2; // Zoom in a bit\n\n  svg.attr('class', 'statediagram');\n  var svgBounds = svg.node().getBBox();\n  Object(_utils__WEBPACK_IMPORTED_MODULE_7__[\"configureSvgSize\"])(svg, height, width * 1.75, conf.useMaxWidth); // Ensure the viewBox includes the whole svgBounds area with extra space for padding\n\n  var vBox = \"\".concat(svgBounds.x - padding, \" \").concat(svgBounds.y - padding, \" \").concat(width, \" \").concat(height);\n  _logger__WEBPACK_IMPORTED_MODULE_6__[\"log\"].debug(\"viewBox \".concat(vBox));\n  svg.attr('viewBox', vBox); // Add label rects for non html labels\n  // if (!evaluate(conf.htmlLabels) || true) {\n\n  var labels = document.querySelectorAll('[id=\"' + id + '\"] .edgeLabel .label');\n\n  for (var k = 0; k < labels.length; k++) {\n    var label = labels[k]; // Get dimensions of label\n\n    var dim = label.getBBox();\n    var rect = document.createElementNS('http://www.w3.org/2000/svg', 'rect');\n    rect.setAttribute('rx', 0);\n    rect.setAttribute('ry', 0);\n    rect.setAttribute('width', dim.width);\n    rect.setAttribute('height', dim.height);\n    label.insertBefore(rect, label.firstChild); // }\n  }\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n  setConf: setConf,\n  getClasses: getClasses,\n  draw: draw\n});\n\n/***/ }),\n\n/***/ \"./src/diagrams/state/stateRenderer.js\":\n/*!*********************************************!*\\\n  !*** ./src/diagrams/state/stateRenderer.js ***!\n  \\*********************************************/\n/*! exports provided: setConf, draw, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"setConf\", function() { return setConf; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"draw\", function() { return draw; });\n/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3 */ \"./node_modules/d3/src/index.js\");\n/* harmony import */ var dagre__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! dagre */ \"./node_modules/dagre/index.js\");\n/* harmony import */ var dagre__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(dagre__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var graphlib__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! graphlib */ \"./node_modules/graphlib/index.js\");\n/* harmony import */ var graphlib__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(graphlib__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../logger */ \"./src/logger.js\");\n/* harmony import */ var _stateDb__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./stateDb */ \"./src/diagrams/state/stateDb.js\");\n/* harmony import */ var _common_common__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../common/common */ \"./src/diagrams/common/common.js\");\n/* harmony import */ var _parser_stateDiagram__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./parser/stateDiagram */ \"./src/diagrams/state/parser/stateDiagram.jison\");\n/* harmony import */ var _parser_stateDiagram__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_parser_stateDiagram__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _shapes__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./shapes */ \"./src/diagrams/state/shapes.js\");\n/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../config */ \"./src/config.js\");\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../utils */ \"./src/utils.js\");\n\n\n\n\n\n\n // import idCache from './id-cache';\n\n\n\n\n_parser_stateDiagram__WEBPACK_IMPORTED_MODULE_6__[\"parser\"].yy = _stateDb__WEBPACK_IMPORTED_MODULE_4__[\"default\"]; // TODO Move conf object to main conf in mermaidAPI\n\nvar conf;\nvar transformationLog = {};\nvar setConf = function setConf() {}; // Todo optimize\n\n/**\n * Setup arrow head and define the marker. The result is appended to the svg.\n */\n\nvar insertMarkers = function insertMarkers(elem) {\n  elem.append('defs').append('marker').attr('id', 'dependencyEnd').attr('refX', 19).attr('refY', 7).attr('markerWidth', 20).attr('markerHeight', 28).attr('orient', 'auto').append('path').attr('d', 'M 19,7 L9,13 L14,7 L9,1 Z');\n};\n/**\n * Draws a flowchart in the tag with id: id based on the graph definition in text.\n * @param text\n * @param id\n */\n\n\nvar draw = function draw(text, id) {\n  conf = Object(_config__WEBPACK_IMPORTED_MODULE_8__[\"getConfig\"])().state;\n  _parser_stateDiagram__WEBPACK_IMPORTED_MODULE_6__[\"parser\"].yy.clear();\n  _parser_stateDiagram__WEBPACK_IMPORTED_MODULE_6__[\"parser\"].parse(text);\n  _logger__WEBPACK_IMPORTED_MODULE_3__[\"log\"].debug('Rendering diagram ' + text); // Fetch the default direction, use TD if none was found\n\n  var diagram = Object(d3__WEBPACK_IMPORTED_MODULE_0__[\"select\"])(\"[id='\".concat(id, \"']\"));\n  insertMarkers(diagram); // Layout graph, Create a new directed graph\n\n  var graph = new graphlib__WEBPACK_IMPORTED_MODULE_2___default.a.Graph({\n    multigraph: true,\n    compound: true,\n    // acyclicer: 'greedy',\n    rankdir: 'RL' // ranksep: '20'\n\n  }); // Default to assigning a new object as a label for each new edge.\n\n  graph.setDefaultEdgeLabel(function () {\n    return {};\n  });\n  var rootDoc = _stateDb__WEBPACK_IMPORTED_MODULE_4__[\"default\"].getRootDoc();\n  renderDoc(rootDoc, diagram, undefined, false);\n  var padding = conf.padding;\n  var bounds = diagram.node().getBBox();\n  var width = bounds.width + padding * 2;\n  var height = bounds.height + padding * 2; // zoom in a bit\n\n  var svgWidth = width * 1.75;\n  Object(_utils__WEBPACK_IMPORTED_MODULE_9__[\"configureSvgSize\"])(diagram, height, svgWidth, conf.useMaxWidth);\n  diagram.attr('viewBox', \"\".concat(bounds.x - conf.padding, \"  \").concat(bounds.y - conf.padding, \" \") + width + ' ' + height);\n};\n\nvar getLabelWidth = function getLabelWidth(text) {\n  return text ? text.length * conf.fontSizeFactor : 1;\n};\n\nvar renderDoc = function renderDoc(doc, diagram, parentId, altBkg) {\n  // // Layout graph, Create a new directed graph\n  var graph = new graphlib__WEBPACK_IMPORTED_MODULE_2___default.a.Graph({\n    compound: true,\n    multigraph: true\n  });\n  var i;\n  var edgeFreeDoc = true;\n\n  for (i = 0; i < doc.length; i++) {\n    if (doc[i].stmt === 'relation') {\n      edgeFreeDoc = false;\n      break;\n    }\n  } // Set an object for the graph label\n\n\n  if (parentId) graph.setGraph({\n    rankdir: 'LR',\n    multigraph: true,\n    compound: true,\n    // acyclicer: 'greedy',\n    ranker: 'tight-tree',\n    ranksep: edgeFreeDoc ? 1 : conf.edgeLengthFactor,\n    nodeSep: edgeFreeDoc ? 1 : 50,\n    isMultiGraph: true // ranksep: 5,\n    // nodesep: 1\n\n  });else {\n    graph.setGraph({\n      rankdir: 'TB',\n      multigraph: true,\n      compound: true,\n      // isCompound: true,\n      // acyclicer: 'greedy',\n      // ranker: 'longest-path'\n      ranksep: edgeFreeDoc ? 1 : conf.edgeLengthFactor,\n      nodeSep: edgeFreeDoc ? 1 : 50,\n      ranker: 'tight-tree',\n      // ranker: 'network-simplex'\n      isMultiGraph: true\n    });\n  } // Default to assigning a new object as a label for each new edge.\n\n  graph.setDefaultEdgeLabel(function () {\n    return {};\n  });\n  _stateDb__WEBPACK_IMPORTED_MODULE_4__[\"default\"].extract(doc);\n  var states = _stateDb__WEBPACK_IMPORTED_MODULE_4__[\"default\"].getStates();\n  var relations = _stateDb__WEBPACK_IMPORTED_MODULE_4__[\"default\"].getRelations();\n  var keys = Object.keys(states);\n  var first = true;\n\n  for (var _i = 0; _i < keys.length; _i++) {\n    var stateDef = states[keys[_i]];\n\n    if (parentId) {\n      stateDef.parentId = parentId;\n    }\n\n    var node = void 0;\n\n    if (stateDef.doc) {\n      var sub = diagram.append('g').attr('id', stateDef.id).attr('class', 'stateGroup');\n      node = renderDoc(stateDef.doc, sub, stateDef.id, !altBkg);\n\n      if (first) {\n        // first = false;\n        sub = Object(_shapes__WEBPACK_IMPORTED_MODULE_7__[\"addTitleAndBox\"])(sub, stateDef, altBkg);\n        var boxBounds = sub.node().getBBox();\n        node.width = boxBounds.width;\n        node.height = boxBounds.height + conf.padding / 2;\n        transformationLog[stateDef.id] = {\n          y: conf.compositTitleSize\n        };\n      } else {\n        // sub = addIdAndBox(sub, stateDef);\n        var _boxBounds = sub.node().getBBox();\n\n        node.width = _boxBounds.width;\n        node.height = _boxBounds.height; // transformationLog[stateDef.id] = { y: conf.compositTitleSize };\n      }\n    } else {\n      node = Object(_shapes__WEBPACK_IMPORTED_MODULE_7__[\"drawState\"])(diagram, stateDef, graph);\n    }\n\n    if (stateDef.note) {\n      // Draw note note\n      var noteDef = {\n        descriptions: [],\n        id: stateDef.id + '-note',\n        note: stateDef.note,\n        type: 'note'\n      };\n      var note = Object(_shapes__WEBPACK_IMPORTED_MODULE_7__[\"drawState\"])(diagram, noteDef, graph); // graph.setNode(node.id, node);\n\n      if (stateDef.note.position === 'left of') {\n        graph.setNode(node.id + '-note', note);\n        graph.setNode(node.id, node);\n      } else {\n        graph.setNode(node.id, node);\n        graph.setNode(node.id + '-note', note);\n      } // graph.setNode(node.id);\n\n\n      graph.setParent(node.id, node.id + '-group');\n      graph.setParent(node.id + '-note', node.id + '-group');\n    } else {\n      // Add nodes to the graph. The first argument is the node id. The second is\n      // metadata about the node. In this case we're going to add labels to each of\n      // our nodes.\n      graph.setNode(node.id, node);\n    }\n  }\n\n  _logger__WEBPACK_IMPORTED_MODULE_3__[\"log\"].debug('Count=', graph.nodeCount(), graph);\n  var cnt = 0;\n  relations.forEach(function (relation) {\n    cnt++;\n    _logger__WEBPACK_IMPORTED_MODULE_3__[\"log\"].debug('Setting edge', relation);\n    graph.setEdge(relation.id1, relation.id2, {\n      relation: relation,\n      width: getLabelWidth(relation.title),\n      height: conf.labelHeight * _common_common__WEBPACK_IMPORTED_MODULE_5__[\"default\"].getRows(relation.title).length,\n      labelpos: 'c'\n    }, 'id' + cnt);\n  });\n  dagre__WEBPACK_IMPORTED_MODULE_1___default.a.layout(graph);\n  _logger__WEBPACK_IMPORTED_MODULE_3__[\"log\"].debug('Graph after layout', graph.nodes());\n  var svgElem = diagram.node();\n  graph.nodes().forEach(function (v) {\n    if (typeof v !== 'undefined' && typeof graph.node(v) !== 'undefined') {\n      _logger__WEBPACK_IMPORTED_MODULE_3__[\"log\"].warn('Node ' + v + ': ' + JSON.stringify(graph.node(v)));\n      Object(d3__WEBPACK_IMPORTED_MODULE_0__[\"select\"])('#' + svgElem.id + ' #' + v).attr('transform', 'translate(' + (graph.node(v).x - graph.node(v).width / 2) + ',' + (graph.node(v).y + (transformationLog[v] ? transformationLog[v].y : 0) - graph.node(v).height / 2) + ' )');\n      Object(d3__WEBPACK_IMPORTED_MODULE_0__[\"select\"])('#' + svgElem.id + ' #' + v).attr('data-x-shift', graph.node(v).x - graph.node(v).width / 2);\n      var dividers = document.querySelectorAll('#' + svgElem.id + ' #' + v + ' .divider');\n      dividers.forEach(function (divider) {\n        var parent = divider.parentElement;\n        var pWidth = 0;\n        var pShift = 0;\n\n        if (parent) {\n          if (parent.parentElement) pWidth = parent.parentElement.getBBox().width;\n          pShift = parseInt(parent.getAttribute('data-x-shift'), 10);\n\n          if (Number.isNaN(pShift)) {\n            pShift = 0;\n          }\n        }\n\n        divider.setAttribute('x1', 0 - pShift + 8);\n        divider.setAttribute('x2', pWidth - pShift - 8);\n      });\n    } else {\n      _logger__WEBPACK_IMPORTED_MODULE_3__[\"log\"].debug('No Node ' + v + ': ' + JSON.stringify(graph.node(v)));\n    }\n  });\n  var stateBox = svgElem.getBBox();\n  graph.edges().forEach(function (e) {\n    if (typeof e !== 'undefined' && typeof graph.edge(e) !== 'undefined') {\n      _logger__WEBPACK_IMPORTED_MODULE_3__[\"log\"].debug('Edge ' + e.v + ' -> ' + e.w + ': ' + JSON.stringify(graph.edge(e)));\n      Object(_shapes__WEBPACK_IMPORTED_MODULE_7__[\"drawEdge\"])(diagram, graph.edge(e), graph.edge(e).relation);\n    }\n  });\n  stateBox = svgElem.getBBox();\n  var stateInfo = {\n    id: parentId ? parentId : 'root',\n    label: parentId ? parentId : 'root',\n    width: 0,\n    height: 0\n  };\n  stateInfo.width = stateBox.width + 2 * conf.padding;\n  stateInfo.height = stateBox.height + 2 * conf.padding;\n  _logger__WEBPACK_IMPORTED_MODULE_3__[\"log\"].debug('Doc rendered', stateInfo, graph);\n  return stateInfo;\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n  setConf: setConf,\n  draw: draw\n});\n\n/***/ }),\n\n/***/ \"./src/diagrams/state/styles.js\":\n/*!**************************************!*\\\n  !*** ./src/diagrams/state/styles.js ***!\n  \\**************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\nvar getStyles = function getStyles(options) {\n  return \"\\ndefs #statediagram-barbEnd {\\n    fill: \".concat(options.transitionColor, \";\\n    stroke: \").concat(options.transitionColor, \";\\n  }\\ng.stateGroup text {\\n  fill: \").concat(options.nodeBorder, \";\\n  stroke: none;\\n  font-size: 10px;\\n}\\ng.stateGroup text {\\n  fill: \").concat(options.textColor, \";\\n  stroke: none;\\n  font-size: 10px;\\n\\n}\\ng.stateGroup .state-title {\\n  font-weight: bolder;\\n  fill: \").concat(options.stateLabelColor, \";\\n}\\n\\ng.stateGroup rect {\\n  fill: \").concat(options.mainBkg, \";\\n  stroke: \").concat(options.nodeBorder, \";\\n}\\n\\ng.stateGroup line {\\n  stroke: \").concat(options.lineColor, \";\\n  stroke-width: 1;\\n}\\n\\n.transition {\\n  stroke: \").concat(options.transitionColor, \";\\n  stroke-width: 1;\\n  fill: none;\\n}\\n\\n.stateGroup .composit {\\n  fill: \").concat(options.background, \";\\n  border-bottom: 1px\\n}\\n\\n.stateGroup .alt-composit {\\n  fill: #e0e0e0;\\n  border-bottom: 1px\\n}\\n\\n.state-note {\\n  stroke: \").concat(options.noteBorderColor, \";\\n  fill: \").concat(options.noteBkgColor, \";\\n\\n  text {\\n    fill: \").concat(options.noteTextColor, \";\\n    stroke: none;\\n    font-size: 10px;\\n  }\\n}\\n\\n.stateLabel .box {\\n  stroke: none;\\n  stroke-width: 0;\\n  fill: \").concat(options.mainBkg, \";\\n  opacity: 0.5;\\n}\\n\\n.edgeLabel .label rect {\\n  fill: \").concat(options.labelBackgroundColor, \";\\n  opacity: 0.5;\\n}\\n.edgeLabel .label text {\\n  fill: \").concat(options.transitionLabelColor || options.tertiaryTextColor, \";\\n}\\n.label div .edgeLabel {\\n  color: \").concat(options.transitionLabelColor || options.tertiaryTextColor, \";\\n}\\n\\n.stateLabel text {\\n  fill: \").concat(options.stateLabelColor, \";\\n  font-size: 10px;\\n  font-weight: bold;\\n}\\n\\n.node circle.state-start {\\n  fill: \").concat(options.specialStateColor, \";\\n  stroke: \").concat(options.specialStateColor, \";\\n}\\n\\n.node .fork-join {\\n  fill: \").concat(options.specialStateColor, \";\\n  stroke: \").concat(options.specialStateColor, \";\\n}\\n\\n.node circle.state-end {\\n  fill: \").concat(options.innerEndBackground, \";\\n  stroke: \").concat(options.background, \";\\n  stroke-width: 1.5\\n}\\n.end-state-inner {\\n  fill: \").concat(options.compositeBackground || options.background, \";\\n  // stroke: \").concat(options.background, \";\\n  stroke-width: 1.5\\n}\\n\\n.node rect {\\n  fill: \").concat(options.stateBkg || options.mainBkg, \";\\n  stroke: \").concat(options.stateBorder || options.nodeBorder, \";\\n  stroke-width: 1px;\\n}\\n.node polygon {\\n  fill: \").concat(options.mainBkg, \";\\n  stroke: \").concat(options.stateBorder || options.nodeBorder, \";;\\n  stroke-width: 1px;\\n}\\n#statediagram-barbEnd {\\n  fill: \").concat(options.lineColor, \";\\n}\\n\\n.statediagram-cluster rect {\\n  fill: \").concat(options.compositeTitleBackground, \";\\n  stroke: \").concat(options.stateBorder || options.nodeBorder, \";\\n  stroke-width: 1px;\\n}\\n\\n.cluster-label, .nodeLabel {\\n  color: \").concat(options.stateLabelColor, \";\\n}\\n\\n.statediagram-cluster rect.outer {\\n  rx: 5px;\\n  ry: 5px;\\n}\\n.statediagram-state .divider {\\n  stroke: \").concat(options.stateBorder || options.nodeBorder, \";\\n}\\n\\n.statediagram-state .title-state {\\n  rx: 5px;\\n  ry: 5px;\\n}\\n.statediagram-cluster.statediagram-cluster .inner {\\n  fill: \").concat(options.compositeBackground || options.background, \";\\n}\\n.statediagram-cluster.statediagram-cluster-alt .inner {\\n  fill: \").concat(options.altBackground ? options.altBackground : '#efefef', \";\\n}\\n\\n.statediagram-cluster .inner {\\n  rx:0;\\n  ry:0;\\n}\\n\\n.statediagram-state rect.basic {\\n  rx: 5px;\\n  ry: 5px;\\n}\\n.statediagram-state rect.divider {\\n  stroke-dasharray: 10,10;\\n  fill: \").concat(options.altBackground ? options.altBackground : '#efefef', \";\\n}\\n\\n.note-edge {\\n  stroke-dasharray: 5;\\n}\\n\\n.statediagram-note rect {\\n  fill: \").concat(options.noteBkgColor, \";\\n  stroke: \").concat(options.noteBorderColor, \";\\n  stroke-width: 1px;\\n  rx: 0;\\n  ry: 0;\\n}\\n.statediagram-note rect {\\n  fill: \").concat(options.noteBkgColor, \";\\n  stroke: \").concat(options.noteBorderColor, \";\\n  stroke-width: 1px;\\n  rx: 0;\\n  ry: 0;\\n}\\n\\n.statediagram-note text {\\n  fill: \").concat(options.noteTextColor, \";\\n}\\n\\n.statediagram-note .nodeLabel {\\n  color: \").concat(options.noteTextColor, \";\\n}\\n.statediagram .edgeLabel {\\n  color: red; // \").concat(options.noteTextColor, \";\\n}\\n\\n#dependencyStart, #dependencyEnd {\\n  fill: \").concat(options.lineColor, \";\\n  stroke: \").concat(options.lineColor, \";\\n  stroke-width: 1;\\n}\\n\");\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (getStyles);\n\n/***/ }),\n\n/***/ \"./src/diagrams/user-journey/journeyDb.js\":\n/*!************************************************!*\\\n  !*** ./src/diagrams/user-journey/journeyDb.js ***!\n  \\************************************************/\n/*! exports provided: parseDirective, clear, setTitle, getTitle, addSection, getSections, getTasks, addTask, addTaskOrg, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"parseDirective\", function() { return parseDirective; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"clear\", function() { return clear; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"setTitle\", function() { return setTitle; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getTitle\", function() { return getTitle; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"addSection\", function() { return addSection; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getSections\", function() { return getSections; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getTasks\", function() { return getTasks; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"addTask\", function() { return addTask; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"addTaskOrg\", function() { return addTaskOrg; });\n/* harmony import */ var _mermaidAPI__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../mermaidAPI */ \"./src/mermaidAPI.js\");\n/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../config */ \"./src/config.js\");\nfunction _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }\n\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _iterableToArray(iter) { if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter); }\n\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\n\n\nvar title = '';\nvar currentSection = '';\nvar sections = [];\nvar tasks = [];\nvar rawTasks = [];\nvar parseDirective = function parseDirective(statement, context, type) {\n  _mermaidAPI__WEBPACK_IMPORTED_MODULE_0__[\"default\"].parseDirective(this, statement, context, type);\n};\nvar clear = function clear() {\n  sections.length = 0;\n  tasks.length = 0;\n  currentSection = '';\n  title = '';\n  rawTasks.length = 0;\n};\nvar setTitle = function setTitle(txt) {\n  title = txt;\n};\nvar getTitle = function getTitle() {\n  return title;\n};\nvar addSection = function addSection(txt) {\n  currentSection = txt;\n  sections.push(txt);\n};\nvar getSections = function getSections() {\n  return sections;\n};\nvar getTasks = function getTasks() {\n  var allItemsProcessed = compileTasks();\n  var maxDepth = 100;\n  var iterationCount = 0;\n\n  while (!allItemsProcessed && iterationCount < maxDepth) {\n    allItemsProcessed = compileTasks();\n    iterationCount++;\n  }\n\n  tasks.push.apply(tasks, rawTasks);\n  return tasks;\n};\n\nvar updateActors = function updateActors() {\n  var tempActors = [];\n  tasks.forEach(function (task) {\n    if (task.people) {\n      tempActors.push.apply(tempActors, _toConsumableArray(task.people));\n    }\n  });\n  var unique = new Set(tempActors);\n  return _toConsumableArray(unique).sort();\n};\n\nvar addTask = function addTask(descr, taskData) {\n  var pieces = taskData.substr(1).split(':');\n  var score = 0;\n  var peeps = [];\n\n  if (pieces.length === 1) {\n    score = Number(pieces[0]);\n    peeps = [];\n  } else {\n    score = Number(pieces[0]);\n    peeps = pieces[1].split(',');\n  }\n\n  var peopleList = peeps.map(function (s) {\n    return s.trim();\n  });\n  var rawTask = {\n    section: currentSection,\n    type: currentSection,\n    people: peopleList,\n    task: descr,\n    score: score\n  };\n  rawTasks.push(rawTask);\n};\nvar addTaskOrg = function addTaskOrg(descr) {\n  var newTask = {\n    section: currentSection,\n    type: currentSection,\n    description: descr,\n    task: descr,\n    classes: []\n  };\n  tasks.push(newTask);\n};\n\nvar compileTasks = function compileTasks() {\n  var compileTask = function compileTask(pos) {\n    return rawTasks[pos].processed;\n  };\n\n  var allProcessed = true;\n\n  for (var i = 0; i < rawTasks.length; i++) {\n    compileTask(i);\n    allProcessed = allProcessed && rawTasks[i].processed;\n  }\n\n  return allProcessed;\n};\n\nvar getActors = function getActors() {\n  return updateActors();\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n  parseDirective: parseDirective,\n  getConfig: function getConfig() {\n    return _config__WEBPACK_IMPORTED_MODULE_1__[\"getConfig\"]().journey;\n  },\n  clear: clear,\n  setTitle: setTitle,\n  getTitle: getTitle,\n  addSection: addSection,\n  getSections: getSections,\n  getTasks: getTasks,\n  addTask: addTask,\n  addTaskOrg: addTaskOrg,\n  getActors: getActors\n});\n\n/***/ }),\n\n/***/ \"./src/diagrams/user-journey/journeyRenderer.js\":\n/*!******************************************************!*\\\n  !*** ./src/diagrams/user-journey/journeyRenderer.js ***!\n  \\******************************************************/\n/*! exports provided: setConf, draw, bounds, drawTasks, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"setConf\", function() { return setConf; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"draw\", function() { return draw; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"bounds\", function() { return bounds; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"drawTasks\", function() { return drawTasks; });\n/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3 */ \"./node_modules/d3/src/index.js\");\n/* harmony import */ var _parser_journey__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./parser/journey */ \"./src/diagrams/user-journey/parser/journey.jison\");\n/* harmony import */ var _parser_journey__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_parser_journey__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _journeyDb__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./journeyDb */ \"./src/diagrams/user-journey/journeyDb.js\");\n/* harmony import */ var _svgDraw__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./svgDraw */ \"./src/diagrams/user-journey/svgDraw.js\");\n/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../config */ \"./src/config.js\");\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../utils */ \"./src/utils.js\");\n\n\n\n\n\n\n_parser_journey__WEBPACK_IMPORTED_MODULE_1__[\"parser\"].yy = _journeyDb__WEBPACK_IMPORTED_MODULE_2__[\"default\"];\nvar setConf = function setConf(cnf) {\n  var keys = Object.keys(cnf);\n  keys.forEach(function (key) {\n    conf[key] = cnf[key];\n  });\n};\nvar actors = {};\n\nfunction drawActorLegend(diagram) {\n  var conf = Object(_config__WEBPACK_IMPORTED_MODULE_4__[\"getConfig\"])().journey; // Draw the actors\n\n  var yPos = 60;\n  Object.keys(actors).forEach(function (person) {\n    var colour = actors[person].color;\n    var circleData = {\n      cx: 20,\n      cy: yPos,\n      r: 7,\n      fill: colour,\n      stroke: '#000',\n      pos: actors[person].position\n    };\n    _svgDraw__WEBPACK_IMPORTED_MODULE_3__[\"default\"].drawCircle(diagram, circleData);\n    var labelData = {\n      x: 40,\n      y: yPos + 7,\n      fill: '#666',\n      text: person,\n      textMargin: conf.boxTextMargin | 5\n    };\n    _svgDraw__WEBPACK_IMPORTED_MODULE_3__[\"default\"].drawText(diagram, labelData);\n    yPos += 20;\n  });\n}\n\nvar conf = Object(_config__WEBPACK_IMPORTED_MODULE_4__[\"getConfig\"])().journey;\nvar LEFT_MARGIN = Object(_config__WEBPACK_IMPORTED_MODULE_4__[\"getConfig\"])().journey.leftMargin;\nvar draw = function draw(text, id) {\n  var conf = Object(_config__WEBPACK_IMPORTED_MODULE_4__[\"getConfig\"])().journey;\n  _parser_journey__WEBPACK_IMPORTED_MODULE_1__[\"parser\"].yy.clear();\n  _parser_journey__WEBPACK_IMPORTED_MODULE_1__[\"parser\"].parse(text + '\\n');\n  bounds.init();\n  var diagram = Object(d3__WEBPACK_IMPORTED_MODULE_0__[\"select\"])('#' + id);\n  diagram.attr('xmlns:xlink', 'http://www.w3.org/1999/xlink');\n  _svgDraw__WEBPACK_IMPORTED_MODULE_3__[\"default\"].initGraphics(diagram);\n  var tasks = _parser_journey__WEBPACK_IMPORTED_MODULE_1__[\"parser\"].yy.getTasks();\n  var title = _parser_journey__WEBPACK_IMPORTED_MODULE_1__[\"parser\"].yy.getTitle();\n  var actorNames = _parser_journey__WEBPACK_IMPORTED_MODULE_1__[\"parser\"].yy.getActors();\n\n  for (var member in actors) {\n    delete actors[member];\n  }\n\n  var actorPos = 0;\n  actorNames.forEach(function (actorName) {\n    actors[actorName] = {\n      color: conf.actorColours[actorPos % conf.actorColours.length],\n      position: actorPos\n    };\n    actorPos++;\n  });\n  drawActorLegend(diagram);\n  bounds.insert(0, 0, LEFT_MARGIN, Object.keys(actors).length * 50);\n  drawTasks(diagram, tasks, 0);\n  var box = bounds.getBounds();\n\n  if (title) {\n    diagram.append('text').text(title).attr('x', LEFT_MARGIN).attr('font-size', '4ex').attr('font-weight', 'bold').attr('y', 25);\n  }\n\n  var height = box.stopy - box.starty + 2 * conf.diagramMarginY;\n  var width = LEFT_MARGIN + box.stopx + 2 * conf.diagramMarginX;\n  Object(_utils__WEBPACK_IMPORTED_MODULE_5__[\"configureSvgSize\"])(diagram, height, width, conf.useMaxWidth); // Draw activity line\n\n  diagram.append('line').attr('x1', LEFT_MARGIN).attr('y1', conf.height * 4) // One section head + one task + margins\n  .attr('x2', width - LEFT_MARGIN - 4) // Subtract stroke width so arrow point is retained\n  .attr('y2', conf.height * 4).attr('stroke-width', 4).attr('stroke', 'black').attr('marker-end', 'url(#arrowhead)');\n  var extraVertForTitle = title ? 70 : 0;\n  diagram.attr('viewBox', \"\".concat(box.startx, \" -25 \").concat(width, \" \").concat(height + extraVertForTitle));\n  diagram.attr('preserveAspectRatio', 'xMinYMin meet');\n  diagram.attr('height', height + extraVertForTitle + 25);\n};\nvar bounds = {\n  data: {\n    startx: undefined,\n    stopx: undefined,\n    starty: undefined,\n    stopy: undefined\n  },\n  verticalPos: 0,\n  sequenceItems: [],\n  init: function init() {\n    this.sequenceItems = [];\n    this.data = {\n      startx: undefined,\n      stopx: undefined,\n      starty: undefined,\n      stopy: undefined\n    };\n    this.verticalPos = 0;\n  },\n  updateVal: function updateVal(obj, key, val, fun) {\n    if (typeof obj[key] === 'undefined') {\n      obj[key] = val;\n    } else {\n      obj[key] = fun(val, obj[key]);\n    }\n  },\n  updateBounds: function updateBounds(startx, starty, stopx, stopy) {\n    var conf = Object(_config__WEBPACK_IMPORTED_MODULE_4__[\"getConfig\"])().journey;\n\n    var _self = this;\n\n    var cnt = 0;\n\n    function updateFn(type) {\n      return function updateItemBounds(item) {\n        cnt++; // The loop sequenceItems is a stack so the biggest margins in the beginning of the sequenceItems\n\n        var n = _self.sequenceItems.length - cnt + 1;\n\n        _self.updateVal(item, 'starty', starty - n * conf.boxMargin, Math.min);\n\n        _self.updateVal(item, 'stopy', stopy + n * conf.boxMargin, Math.max);\n\n        _self.updateVal(bounds.data, 'startx', startx - n * conf.boxMargin, Math.min);\n\n        _self.updateVal(bounds.data, 'stopx', stopx + n * conf.boxMargin, Math.max);\n\n        if (!(type === 'activation')) {\n          _self.updateVal(item, 'startx', startx - n * conf.boxMargin, Math.min);\n\n          _self.updateVal(item, 'stopx', stopx + n * conf.boxMargin, Math.max);\n\n          _self.updateVal(bounds.data, 'starty', starty - n * conf.boxMargin, Math.min);\n\n          _self.updateVal(bounds.data, 'stopy', stopy + n * conf.boxMargin, Math.max);\n        }\n      };\n    }\n\n    this.sequenceItems.forEach(updateFn());\n  },\n  insert: function insert(startx, starty, stopx, stopy) {\n    var _startx = Math.min(startx, stopx);\n\n    var _stopx = Math.max(startx, stopx);\n\n    var _starty = Math.min(starty, stopy);\n\n    var _stopy = Math.max(starty, stopy);\n\n    this.updateVal(bounds.data, 'startx', _startx, Math.min);\n    this.updateVal(bounds.data, 'starty', _starty, Math.min);\n    this.updateVal(bounds.data, 'stopx', _stopx, Math.max);\n    this.updateVal(bounds.data, 'stopy', _stopy, Math.max);\n    this.updateBounds(_startx, _starty, _stopx, _stopy);\n  },\n  bumpVerticalPos: function bumpVerticalPos(bump) {\n    this.verticalPos = this.verticalPos + bump;\n    this.data.stopy = this.verticalPos;\n  },\n  getVerticalPos: function getVerticalPos() {\n    return this.verticalPos;\n  },\n  getBounds: function getBounds() {\n    return this.data;\n  }\n};\nvar fills = conf.sectionFills;\nvar textColours = conf.sectionColours;\nvar drawTasks = function drawTasks(diagram, tasks, verticalPos) {\n  var conf = Object(_config__WEBPACK_IMPORTED_MODULE_4__[\"getConfig\"])().journey;\n  var lastSection = '';\n  var sectionVHeight = conf.height * 2 + conf.diagramMarginY;\n  var taskPos = verticalPos + sectionVHeight;\n  var sectionNumber = 0;\n  var fill = '#CCC';\n  var colour = 'black';\n  var num = 0; // Draw the tasks\n\n  for (var i = 0; i < tasks.length; i++) {\n    var task = tasks[i];\n\n    if (lastSection !== task.section) {\n      fill = fills[sectionNumber % fills.length];\n      num = sectionNumber % fills.length;\n      colour = textColours[sectionNumber % textColours.length];\n      var section = {\n        x: i * conf.taskMargin + i * conf.width + LEFT_MARGIN,\n        y: 50,\n        text: task.section,\n        fill: fill,\n        num: num,\n        colour: colour\n      };\n      _svgDraw__WEBPACK_IMPORTED_MODULE_3__[\"default\"].drawSection(diagram, section, conf);\n      lastSection = task.section;\n      sectionNumber++;\n    } // Collect the actors involved in the task\n\n\n    var taskActors = task.people.reduce(function (acc, actorName) {\n      if (actors[actorName]) {\n        acc[actorName] = actors[actorName];\n      }\n\n      return acc;\n    }, {}); // Add some rendering data to the object\n\n    task.x = i * conf.taskMargin + i * conf.width + LEFT_MARGIN;\n    task.y = taskPos;\n    task.width = conf.diagramMarginX;\n    task.height = conf.diagramMarginY;\n    task.colour = colour;\n    task.fill = fill;\n    task.num = num;\n    task.actors = taskActors; // Draw the box with the attached line\n\n    _svgDraw__WEBPACK_IMPORTED_MODULE_3__[\"default\"].drawTask(diagram, task, conf);\n    bounds.insert(task.x, task.y, task.x + task.width + conf.taskMargin, 300 + 5 * 30); // stopy is the length of the descenders.\n  }\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n  setConf: setConf,\n  draw: draw\n});\n\n/***/ }),\n\n/***/ \"./src/diagrams/user-journey/parser/journey.jison\":\n/*!********************************************************!*\\\n  !*** ./src/diagrams/user-journey/parser/journey.jison ***!\n  \\********************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n/* WEBPACK VAR INJECTION */(function(process, module) {/* parser generated by jison 0.4.18 */\n/*\n  Returns a Parser object of the following structure:\n\n  Parser: {\n    yy: {}\n  }\n\n  Parser.prototype: {\n    yy: {},\n    trace: function(),\n    symbols_: {associative list: name ==> number},\n    terminals_: {associative list: number ==> name},\n    productions_: [...],\n    performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$),\n    table: [...],\n    defaultActions: {...},\n    parseError: function(str, hash),\n    parse: function(input),\n\n    lexer: {\n        EOF: 1,\n        parseError: function(str, hash),\n        setInput: function(input),\n        input: function(),\n        unput: function(str),\n        more: function(),\n        less: function(n),\n        pastInput: function(),\n        upcomingInput: function(),\n        showPosition: function(),\n        test_match: function(regex_match_array, rule_index),\n        next: function(),\n        lex: function(),\n        begin: function(condition),\n        popState: function(),\n        _currentRules: function(),\n        topState: function(),\n        pushState: function(condition),\n\n        options: {\n            ranges: boolean           (optional: true ==> token location info will include a .range[] member)\n            flex: boolean             (optional: true ==> flex-like lexing behaviour where the rules are tested exhaustively to find the longest match)\n            backtrack_lexer: boolean  (optional: true ==> lexer regexes are tested in order and for each matching regex the action code is invoked; the lexer terminates the scan when a token is returned by the action code)\n        },\n\n        performAction: function(yy, yy_, $avoiding_name_collisions, YY_START),\n        rules: [...],\n        conditions: {associative list: name ==> set},\n    }\n  }\n\n\n  token location info (@$, _$, etc.): {\n    first_line: n,\n    last_line: n,\n    first_column: n,\n    last_column: n,\n    range: [start_number, end_number]       (where the numbers are indexes into the input string, regular zero-based)\n  }\n\n\n  the parseError function receives a 'hash' object with these members for lexer and parser errors: {\n    text:        (matched text)\n    token:       (the produced terminal token, if any)\n    line:        (yylineno)\n  }\n  while parser (grammar) errors will also provide these members, i.e. parser errors deliver a superset of attributes: {\n    loc:         (yylloc)\n    expected:    (string describing the set of expected tokens)\n    recoverable: (boolean: TRUE when the parser has a error recovery rule available for this particular error)\n  }\n*/\nvar parser = (function(){\nvar o=function(k,v,o,l){for(o=o||{},l=k.length;l--;o[k[l]]=v);return o},$V0=[1,2],$V1=[1,5],$V2=[6,9,11,17,18,19,21],$V3=[1,15],$V4=[1,16],$V5=[1,17],$V6=[1,21],$V7=[4,6,9,11,17,18,19,21];\nvar parser = {trace: function trace () { },\nyy: {},\nsymbols_: {\"error\":2,\"start\":3,\"journey\":4,\"document\":5,\"EOF\":6,\"directive\":7,\"line\":8,\"SPACE\":9,\"statement\":10,\"NEWLINE\":11,\"openDirective\":12,\"typeDirective\":13,\"closeDirective\":14,\":\":15,\"argDirective\":16,\"title\":17,\"section\":18,\"taskName\":19,\"taskData\":20,\"open_directive\":21,\"type_directive\":22,\"arg_directive\":23,\"close_directive\":24,\"$accept\":0,\"$end\":1},\nterminals_: {2:\"error\",4:\"journey\",6:\"EOF\",9:\"SPACE\",11:\"NEWLINE\",15:\":\",17:\"title\",18:\"section\",19:\"taskName\",20:\"taskData\",21:\"open_directive\",22:\"type_directive\",23:\"arg_directive\",24:\"close_directive\"},\nproductions_: [0,[3,3],[3,2],[5,0],[5,2],[8,2],[8,1],[8,1],[8,1],[7,4],[7,6],[10,1],[10,1],[10,2],[10,1],[12,1],[13,1],[16,1],[14,1]],\nperformAction: function anonymous(yytext, yyleng, yylineno, yy, yystate /* action[1] */, $$ /* vstack */, _$ /* lstack */) {\n/* this == yyval */\n\nvar $0 = $$.length - 1;\nswitch (yystate) {\ncase 1:\n return $$[$0-1]; \nbreak;\ncase 3:\n this.$ = [] \nbreak;\ncase 4:\n$$[$0-1].push($$[$0]);this.$ = $$[$0-1]\nbreak;\ncase 5: case 6:\n this.$ = $$[$0] \nbreak;\ncase 7: case 8:\n this.$=[];\nbreak;\ncase 11:\nyy.setTitle($$[$0].substr(6));this.$=$$[$0].substr(6);\nbreak;\ncase 12:\nyy.addSection($$[$0].substr(8));this.$=$$[$0].substr(8);\nbreak;\ncase 13:\nyy.addTask($$[$0-1], $$[$0]);this.$='task';\nbreak;\ncase 15:\n yy.parseDirective('%%{', 'open_directive'); \nbreak;\ncase 16:\n yy.parseDirective($$[$0], 'type_directive'); \nbreak;\ncase 17:\n $$[$0] = $$[$0].trim().replace(/'/g, '\"'); yy.parseDirective($$[$0], 'arg_directive'); \nbreak;\ncase 18:\n yy.parseDirective('}%%', 'close_directive', 'journey'); \nbreak;\n}\n},\ntable: [{3:1,4:$V0,7:3,12:4,21:$V1},{1:[3]},o($V2,[2,3],{5:6}),{3:7,4:$V0,7:3,12:4,21:$V1},{13:8,22:[1,9]},{22:[2,15]},{6:[1,10],7:18,8:11,9:[1,12],10:13,11:[1,14],12:4,17:$V3,18:$V4,19:$V5,21:$V1},{1:[2,2]},{14:19,15:[1,20],24:$V6},o([15,24],[2,16]),o($V2,[2,8],{1:[2,1]}),o($V2,[2,4]),{7:18,10:22,12:4,17:$V3,18:$V4,19:$V5,21:$V1},o($V2,[2,6]),o($V2,[2,7]),o($V2,[2,11]),o($V2,[2,12]),{20:[1,23]},o($V2,[2,14]),{11:[1,24]},{16:25,23:[1,26]},{11:[2,18]},o($V2,[2,5]),o($V2,[2,13]),o($V7,[2,9]),{14:27,24:$V6},{24:[2,17]},{11:[1,28]},o($V7,[2,10])],\ndefaultActions: {5:[2,15],7:[2,2],21:[2,18],26:[2,17]},\nparseError: function parseError (str, hash) {\n    if (hash.recoverable) {\n        this.trace(str);\n    } else {\n        var error = new Error(str);\n        error.hash = hash;\n        throw error;\n    }\n},\nparse: function parse(input) {\n    var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = '', yylineno = 0, yyleng = 0, recovering = 0, TERROR = 2, EOF = 1;\n    var args = lstack.slice.call(arguments, 1);\n    var lexer = Object.create(this.lexer);\n    var sharedState = { yy: {} };\n    for (var k in this.yy) {\n        if (Object.prototype.hasOwnProperty.call(this.yy, k)) {\n            sharedState.yy[k] = this.yy[k];\n        }\n    }\n    lexer.setInput(input, sharedState.yy);\n    sharedState.yy.lexer = lexer;\n    sharedState.yy.parser = this;\n    if (typeof lexer.yylloc == 'undefined') {\n        lexer.yylloc = {};\n    }\n    var yyloc = lexer.yylloc;\n    lstack.push(yyloc);\n    var ranges = lexer.options && lexer.options.ranges;\n    if (typeof sharedState.yy.parseError === 'function') {\n        this.parseError = sharedState.yy.parseError;\n    } else {\n        this.parseError = Object.getPrototypeOf(this).parseError;\n    }\n    function popStack(n) {\n        stack.length = stack.length - 2 * n;\n        vstack.length = vstack.length - n;\n        lstack.length = lstack.length - n;\n    }\n            function lex() {\n            var token;\n            token = tstack.pop() || lexer.lex() || EOF;\n            if (typeof token !== 'number') {\n                if (token instanceof Array) {\n                    tstack = token;\n                    token = tstack.pop();\n                }\n                token = self.symbols_[token] || token;\n            }\n            return token;\n        }\n    var symbol, preErrorSymbol, state, action, a, r, yyval = {}, p, len, newState, expected;\n    while (true) {\n        state = stack[stack.length - 1];\n        if (this.defaultActions[state]) {\n            action = this.defaultActions[state];\n        } else {\n            if (symbol === null || typeof symbol == 'undefined') {\n                symbol = lex();\n            }\n            action = table[state] && table[state][symbol];\n        }\n        if (typeof action === 'undefined' || !action.length || !action[0]) {\n            var errStr = '';\n            expected = [];\n            for (p in table[state]) {\n                if (this.terminals_[p] && p > TERROR) {\n                    expected.push('\\'' + this.terminals_[p] + '\\'');\n                }\n            }\n            if (lexer.showPosition) {\n                errStr = 'Parse error on line ' + (yylineno + 1) + ':\\n' + lexer.showPosition() + '\\nExpecting ' + expected.join(', ') + ', got \\'' + (this.terminals_[symbol] || symbol) + '\\'';\n            } else {\n                errStr = 'Parse error on line ' + (yylineno + 1) + ': Unexpected ' + (symbol == EOF ? 'end of input' : '\\'' + (this.terminals_[symbol] || symbol) + '\\'');\n            }\n            this.parseError(errStr, {\n                text: lexer.match,\n                token: this.terminals_[symbol] || symbol,\n                line: lexer.yylineno,\n                loc: yyloc,\n                expected: expected\n            });\n        }\n        if (action[0] instanceof Array && action.length > 1) {\n            throw new Error('Parse Error: multiple actions possible at state: ' + state + ', token: ' + symbol);\n        }\n        switch (action[0]) {\n        case 1:\n            stack.push(symbol);\n            vstack.push(lexer.yytext);\n            lstack.push(lexer.yylloc);\n            stack.push(action[1]);\n            symbol = null;\n            if (!preErrorSymbol) {\n                yyleng = lexer.yyleng;\n                yytext = lexer.yytext;\n                yylineno = lexer.yylineno;\n                yyloc = lexer.yylloc;\n                if (recovering > 0) {\n                    recovering--;\n                }\n            } else {\n                symbol = preErrorSymbol;\n                preErrorSymbol = null;\n            }\n            break;\n        case 2:\n            len = this.productions_[action[1]][1];\n            yyval.$ = vstack[vstack.length - len];\n            yyval._$ = {\n                first_line: lstack[lstack.length - (len || 1)].first_line,\n                last_line: lstack[lstack.length - 1].last_line,\n                first_column: lstack[lstack.length - (len || 1)].first_column,\n                last_column: lstack[lstack.length - 1].last_column\n            };\n            if (ranges) {\n                yyval._$.range = [\n                    lstack[lstack.length - (len || 1)].range[0],\n                    lstack[lstack.length - 1].range[1]\n                ];\n            }\n            r = this.performAction.apply(yyval, [\n                yytext,\n                yyleng,\n                yylineno,\n                sharedState.yy,\n                action[1],\n                vstack,\n                lstack\n            ].concat(args));\n            if (typeof r !== 'undefined') {\n                return r;\n            }\n            if (len) {\n                stack = stack.slice(0, -1 * len * 2);\n                vstack = vstack.slice(0, -1 * len);\n                lstack = lstack.slice(0, -1 * len);\n            }\n            stack.push(this.productions_[action[1]][0]);\n            vstack.push(yyval.$);\n            lstack.push(yyval._$);\n            newState = table[stack[stack.length - 2]][stack[stack.length - 1]];\n            stack.push(newState);\n            break;\n        case 3:\n            return true;\n        }\n    }\n    return true;\n}};\n\n/* generated by jison-lex 0.3.4 */\nvar lexer = (function(){\nvar lexer = ({\n\nEOF:1,\n\nparseError:function parseError(str, hash) {\n        if (this.yy.parser) {\n            this.yy.parser.parseError(str, hash);\n        } else {\n            throw new Error(str);\n        }\n    },\n\n// resets the lexer, sets new input\nsetInput:function (input, yy) {\n        this.yy = yy || this.yy || {};\n        this._input = input;\n        this._more = this._backtrack = this.done = false;\n        this.yylineno = this.yyleng = 0;\n        this.yytext = this.matched = this.match = '';\n        this.conditionStack = ['INITIAL'];\n        this.yylloc = {\n            first_line: 1,\n            first_column: 0,\n            last_line: 1,\n            last_column: 0\n        };\n        if (this.options.ranges) {\n            this.yylloc.range = [0,0];\n        }\n        this.offset = 0;\n        return this;\n    },\n\n// consumes and returns one char from the input\ninput:function () {\n        var ch = this._input[0];\n        this.yytext += ch;\n        this.yyleng++;\n        this.offset++;\n        this.match += ch;\n        this.matched += ch;\n        var lines = ch.match(/(?:\\r\\n?|\\n).*/g);\n        if (lines) {\n            this.yylineno++;\n            this.yylloc.last_line++;\n        } else {\n            this.yylloc.last_column++;\n        }\n        if (this.options.ranges) {\n            this.yylloc.range[1]++;\n        }\n\n        this._input = this._input.slice(1);\n        return ch;\n    },\n\n// unshifts one char (or a string) into the input\nunput:function (ch) {\n        var len = ch.length;\n        var lines = ch.split(/(?:\\r\\n?|\\n)/g);\n\n        this._input = ch + this._input;\n        this.yytext = this.yytext.substr(0, this.yytext.length - len);\n        //this.yyleng -= len;\n        this.offset -= len;\n        var oldLines = this.match.split(/(?:\\r\\n?|\\n)/g);\n        this.match = this.match.substr(0, this.match.length - 1);\n        this.matched = this.matched.substr(0, this.matched.length - 1);\n\n        if (lines.length - 1) {\n            this.yylineno -= lines.length - 1;\n        }\n        var r = this.yylloc.range;\n\n        this.yylloc = {\n            first_line: this.yylloc.first_line,\n            last_line: this.yylineno + 1,\n            first_column: this.yylloc.first_column,\n            last_column: lines ?\n                (lines.length === oldLines.length ? this.yylloc.first_column : 0)\n                 + oldLines[oldLines.length - lines.length].length - lines[0].length :\n              this.yylloc.first_column - len\n        };\n\n        if (this.options.ranges) {\n            this.yylloc.range = [r[0], r[0] + this.yyleng - len];\n        }\n        this.yyleng = this.yytext.length;\n        return this;\n    },\n\n// When called from action, caches matched text and appends it on next action\nmore:function () {\n        this._more = true;\n        return this;\n    },\n\n// When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead.\nreject:function () {\n        if (this.options.backtrack_lexer) {\n            this._backtrack = true;\n        } else {\n            return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\\n' + this.showPosition(), {\n                text: \"\",\n                token: null,\n                line: this.yylineno\n            });\n\n        }\n        return this;\n    },\n\n// retain first n characters of the match\nless:function (n) {\n        this.unput(this.match.slice(n));\n    },\n\n// displays already matched input, i.e. for error messages\npastInput:function () {\n        var past = this.matched.substr(0, this.matched.length - this.match.length);\n        return (past.length > 20 ? '...':'') + past.substr(-20).replace(/\\n/g, \"\");\n    },\n\n// displays upcoming input, i.e. for error messages\nupcomingInput:function () {\n        var next = this.match;\n        if (next.length < 20) {\n            next += this._input.substr(0, 20-next.length);\n        }\n        return (next.substr(0,20) + (next.length > 20 ? '...' : '')).replace(/\\n/g, \"\");\n    },\n\n// displays the character position where the lexing error occurred, i.e. for error messages\nshowPosition:function () {\n        var pre = this.pastInput();\n        var c = new Array(pre.length + 1).join(\"-\");\n        return pre + this.upcomingInput() + \"\\n\" + c + \"^\";\n    },\n\n// test the lexed token: return FALSE when not a match, otherwise return token\ntest_match:function(match, indexed_rule) {\n        var token,\n            lines,\n            backup;\n\n        if (this.options.backtrack_lexer) {\n            // save context\n            backup = {\n                yylineno: this.yylineno,\n                yylloc: {\n                    first_line: this.yylloc.first_line,\n                    last_line: this.last_line,\n                    first_column: this.yylloc.first_column,\n                    last_column: this.yylloc.last_column\n                },\n                yytext: this.yytext,\n                match: this.match,\n                matches: this.matches,\n                matched: this.matched,\n                yyleng: this.yyleng,\n                offset: this.offset,\n                _more: this._more,\n                _input: this._input,\n                yy: this.yy,\n                conditionStack: this.conditionStack.slice(0),\n                done: this.done\n            };\n            if (this.options.ranges) {\n                backup.yylloc.range = this.yylloc.range.slice(0);\n            }\n        }\n\n        lines = match[0].match(/(?:\\r\\n?|\\n).*/g);\n        if (lines) {\n            this.yylineno += lines.length;\n        }\n        this.yylloc = {\n            first_line: this.yylloc.last_line,\n            last_line: this.yylineno + 1,\n            first_column: this.yylloc.last_column,\n            last_column: lines ?\n                         lines[lines.length - 1].length - lines[lines.length - 1].match(/\\r?\\n?/)[0].length :\n                         this.yylloc.last_column + match[0].length\n        };\n        this.yytext += match[0];\n        this.match += match[0];\n        this.matches = match;\n        this.yyleng = this.yytext.length;\n        if (this.options.ranges) {\n            this.yylloc.range = [this.offset, this.offset += this.yyleng];\n        }\n        this._more = false;\n        this._backtrack = false;\n        this._input = this._input.slice(match[0].length);\n        this.matched += match[0];\n        token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]);\n        if (this.done && this._input) {\n            this.done = false;\n        }\n        if (token) {\n            return token;\n        } else if (this._backtrack) {\n            // recover context\n            for (var k in backup) {\n                this[k] = backup[k];\n            }\n            return false; // rule action called reject() implying the next rule should be tested instead.\n        }\n        return false;\n    },\n\n// return next match in input\nnext:function () {\n        if (this.done) {\n            return this.EOF;\n        }\n        if (!this._input) {\n            this.done = true;\n        }\n\n        var token,\n            match,\n            tempMatch,\n            index;\n        if (!this._more) {\n            this.yytext = '';\n            this.match = '';\n        }\n        var rules = this._currentRules();\n        for (var i = 0; i < rules.length; i++) {\n            tempMatch = this._input.match(this.rules[rules[i]]);\n            if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {\n                match = tempMatch;\n                index = i;\n                if (this.options.backtrack_lexer) {\n                    token = this.test_match(tempMatch, rules[i]);\n                    if (token !== false) {\n                        return token;\n                    } else if (this._backtrack) {\n                        match = false;\n                        continue; // rule action called reject() implying a rule MISmatch.\n                    } else {\n                        // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)\n                        return false;\n                    }\n                } else if (!this.options.flex) {\n                    break;\n                }\n            }\n        }\n        if (match) {\n            token = this.test_match(match, rules[index]);\n            if (token !== false) {\n                return token;\n            }\n            // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)\n            return false;\n        }\n        if (this._input === \"\") {\n            return this.EOF;\n        } else {\n            return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. Unrecognized text.\\n' + this.showPosition(), {\n                text: \"\",\n                token: null,\n                line: this.yylineno\n            });\n        }\n    },\n\n// return next match that has a token\nlex:function lex () {\n        var r = this.next();\n        if (r) {\n            return r;\n        } else {\n            return this.lex();\n        }\n    },\n\n// activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)\nbegin:function begin (condition) {\n        this.conditionStack.push(condition);\n    },\n\n// pop the previously active lexer condition state off the condition stack\npopState:function popState () {\n        var n = this.conditionStack.length - 1;\n        if (n > 0) {\n            return this.conditionStack.pop();\n        } else {\n            return this.conditionStack[0];\n        }\n    },\n\n// produce the lexer rule set which is active for the currently active lexer condition state\n_currentRules:function _currentRules () {\n        if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) {\n            return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;\n        } else {\n            return this.conditions[\"INITIAL\"].rules;\n        }\n    },\n\n// return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available\ntopState:function topState (n) {\n        n = this.conditionStack.length - 1 - Math.abs(n || 0);\n        if (n >= 0) {\n            return this.conditionStack[n];\n        } else {\n            return \"INITIAL\";\n        }\n    },\n\n// alias for begin(condition)\npushState:function pushState (condition) {\n        this.begin(condition);\n    },\n\n// return the number of states currently on the stack\nstateStackSize:function stateStackSize() {\n        return this.conditionStack.length;\n    },\noptions: {\"case-insensitive\":true},\nperformAction: function anonymous(yy,yy_,$avoiding_name_collisions,YY_START) {\nvar YYSTATE=YY_START;\nswitch($avoiding_name_collisions) {\ncase 0: this.begin('open_directive'); return 21; \nbreak;\ncase 1: this.begin('type_directive'); return 22; \nbreak;\ncase 2: this.popState(); this.begin('arg_directive'); return 15; \nbreak;\ncase 3: this.popState(); this.popState(); return 24; \nbreak;\ncase 4:return 23;\nbreak;\ncase 5:/* skip comments */\nbreak;\ncase 6:/* skip comments */\nbreak;\ncase 7:return 11;\nbreak;\ncase 8:/* skip whitespace */\nbreak;\ncase 9:/* skip comments */\nbreak;\ncase 10:return 4;\nbreak;\ncase 11:return 17;\nbreak;\ncase 12:return 18;\nbreak;\ncase 13:return 19;\nbreak;\ncase 14:return 20;\nbreak;\ncase 15:return 15;\nbreak;\ncase 16:return 6;\nbreak;\ncase 17:return 'INVALID';\nbreak;\n}\n},\nrules: [/^(?:%%\\{)/i,/^(?:((?:(?!\\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\\}%%)/i,/^(?:((?:(?!\\}%%).|\\n)*))/i,/^(?:%(?!\\{)[^\\n]*)/i,/^(?:[^\\}]%%[^\\n]*)/i,/^(?:[\\n]+)/i,/^(?:\\s+)/i,/^(?:#[^\\n]*)/i,/^(?:journey\\b)/i,/^(?:title\\s[^#\\n;]+)/i,/^(?:section\\s[^#:\\n;]+)/i,/^(?:[^#:\\n;]+)/i,/^(?::[^#\\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],\nconditions: {\"open_directive\":{\"rules\":[1],\"inclusive\":false},\"type_directive\":{\"rules\":[2,3],\"inclusive\":false},\"arg_directive\":{\"rules\":[3,4],\"inclusive\":false},\"INITIAL\":{\"rules\":[0,5,6,7,8,9,10,11,12,13,14,15,16,17],\"inclusive\":true}}\n});\nreturn lexer;\n})();\nparser.lexer = lexer;\nfunction Parser () {\n  this.yy = {};\n}\nParser.prototype = parser;parser.Parser = Parser;\nreturn new Parser;\n})();\n\n\nif (true) {\nexports.parser = parser;\nexports.Parser = parser.Parser;\nexports.parse = function () { return parser.parse.apply(parser, arguments); };\nexports.main = function commonjsMain (args) {\n    if (!args[1]) {\n        console.log('Usage: '+args[0]+' FILE');\n        process.exit(1);\n    }\n    var source = __webpack_require__(/*! fs */ \"./node_modules/node-libs-browser/mock/empty.js\").readFileSync(__webpack_require__(/*! path */ \"./node_modules/path-browserify/index.js\").normalize(args[1]), \"utf8\");\n    return exports.parser.parse(source);\n};\nif ( true && __webpack_require__.c[__webpack_require__.s] === module) {\n  exports.main(process.argv.slice(1));\n}\n}\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../node_modules/process/browser.js */ \"./node_modules/process/browser.js\"), __webpack_require__(/*! ./../../../../node_modules/webpack/buildin/module.js */ \"./node_modules/webpack/buildin/module.js\")(module)))\n\n/***/ }),\n\n/***/ \"./src/diagrams/user-journey/styles.js\":\n/*!*********************************************!*\\\n  !*** ./src/diagrams/user-journey/styles.js ***!\n  \\*********************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\nvar getStyles = function getStyles(options) {\n  return \".label {\\n    font-family: 'trebuchet ms', verdana, arial, sans-serif;\\n    font-family: var(--mermaid-font-family);\\n    color: \".concat(options.textColor, \";\\n  }\\n  .mouth {\\n    stroke: #666;\\n  }\\n\\n  line {\\n    stroke: \").concat(options.textColor, \"\\n  }\\n\\n  .legend {\\n    fill: \").concat(options.textColor, \";\\n  }\\n\\n  .label text {\\n    fill: #333;\\n  }\\n  .label {\\n    color: \").concat(options.textColor, \"\\n  }\\n\\n  .face {\\n    \").concat(options.faceColor ? \"fill: \".concat(options.faceColor) : 'fill: #FFF8DC', \";\\n    stroke: #999;\\n  }\\n\\n  .node rect,\\n  .node circle,\\n  .node ellipse,\\n  .node polygon,\\n  .node path {\\n    fill: \").concat(options.mainBkg, \";\\n    stroke: \").concat(options.nodeBorder, \";\\n    stroke-width: 1px;\\n  }\\n\\n  .node .label {\\n    text-align: center;\\n  }\\n  .node.clickable {\\n    cursor: pointer;\\n  }\\n\\n  .arrowheadPath {\\n    fill: \").concat(options.arrowheadColor, \";\\n  }\\n\\n  .edgePath .path {\\n    stroke: \").concat(options.lineColor, \";\\n    stroke-width: 1.5px;\\n  }\\n\\n  .flowchart-link {\\n    stroke: \").concat(options.lineColor, \";\\n    fill: none;\\n  }\\n\\n  .edgeLabel {\\n    background-color: \").concat(options.edgeLabelBackground, \";\\n    rect {\\n      opacity: 0.5;\\n    }\\n    text-align: center;\\n  }\\n\\n  .cluster rect {\\n  }\\n\\n  .cluster text {\\n    fill: \").concat(options.titleColor, \";\\n  }\\n\\n  div.mermaidTooltip {\\n    position: absolute;\\n    text-align: center;\\n    max-width: 200px;\\n    padding: 2px;\\n    font-family: 'trebuchet ms', verdana, arial, sans-serif;\\n    font-family: var(--mermaid-font-family);\\n    font-size: 12px;\\n    background: \").concat(options.tertiaryColor, \";\\n    border: 1px solid \").concat(options.border2, \";\\n    border-radius: 2px;\\n    pointer-events: none;\\n    z-index: 100;\\n  }\\n\\n  .task-type-0, .section-type-0  {\\n    \").concat(options.fillType0 ? \"fill: \".concat(options.fillType0) : '', \";\\n  }\\n  .task-type-1, .section-type-1  {\\n    \").concat(options.fillType0 ? \"fill: \".concat(options.fillType1) : '', \";\\n  }\\n  .task-type-2, .section-type-2  {\\n    \").concat(options.fillType0 ? \"fill: \".concat(options.fillType2) : '', \";\\n  }\\n  .task-type-3, .section-type-3  {\\n    \").concat(options.fillType0 ? \"fill: \".concat(options.fillType3) : '', \";\\n  }\\n  .task-type-4, .section-type-4  {\\n    \").concat(options.fillType0 ? \"fill: \".concat(options.fillType4) : '', \";\\n  }\\n  .task-type-5, .section-type-5  {\\n    \").concat(options.fillType0 ? \"fill: \".concat(options.fillType5) : '', \";\\n  }\\n  .task-type-6, .section-type-6  {\\n    \").concat(options.fillType0 ? \"fill: \".concat(options.fillType6) : '', \";\\n  }\\n  .task-type-7, .section-type-7  {\\n    \").concat(options.fillType0 ? \"fill: \".concat(options.fillType7) : '', \";\\n  }\\n\\n  .actor-0 {\\n    \").concat(options.actor0 ? \"fill: \".concat(options.actor0) : '', \";\\n  }\\n  .actor-1 {\\n    \").concat(options.actor1 ? \"fill: \".concat(options.actor1) : '', \";\\n  }\\n  .actor-2 {\\n    \").concat(options.actor2 ? \"fill: \".concat(options.actor2) : '', \";\\n  }\\n  .actor-3 {\\n    \").concat(options.actor3 ? \"fill: \".concat(options.actor3) : '', \";\\n  }\\n  .actor-4 {\\n    \").concat(options.actor4 ? \"fill: \".concat(options.actor4) : '', \";\\n  }\\n  .actor-5 {\\n    \").concat(options.actor5 ? \"fill: \".concat(options.actor5) : '', \";\\n  }\\n\\n  }\\n\");\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (getStyles);\n\n/***/ }),\n\n/***/ \"./src/diagrams/user-journey/svgDraw.js\":\n/*!**********************************************!*\\\n  !*** ./src/diagrams/user-journey/svgDraw.js ***!\n  \\**********************************************/\n/*! exports provided: drawRect, drawFace, drawCircle, drawText, drawLabel, drawSection, drawTask, drawBackgroundRect, getTextObj, getNoteRect, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"drawRect\", function() { return drawRect; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"drawFace\", function() { return drawFace; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"drawCircle\", function() { return drawCircle; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"drawText\", function() { return drawText; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"drawLabel\", function() { return drawLabel; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"drawSection\", function() { return drawSection; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"drawTask\", function() { return drawTask; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"drawBackgroundRect\", function() { return drawBackgroundRect; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getTextObj\", function() { return getTextObj; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getNoteRect\", function() { return getNoteRect; });\n/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3 */ \"./node_modules/d3/src/index.js\");\n\nvar drawRect = function drawRect(elem, rectData) {\n  var rectElem = elem.append('rect');\n  rectElem.attr('x', rectData.x);\n  rectElem.attr('y', rectData.y);\n  rectElem.attr('fill', rectData.fill);\n  rectElem.attr('stroke', rectData.stroke);\n  rectElem.attr('width', rectData.width);\n  rectElem.attr('height', rectData.height);\n  rectElem.attr('rx', rectData.rx);\n  rectElem.attr('ry', rectData.ry);\n\n  if (typeof rectData.class !== 'undefined') {\n    rectElem.attr('class', rectData.class);\n  }\n\n  return rectElem;\n};\nvar drawFace = function drawFace(element, faceData) {\n  var radius = 15;\n  var circleElement = element.append('circle').attr('cx', faceData.cx).attr('cy', faceData.cy).attr('class', 'face').attr('r', radius).attr('stroke-width', 2).attr('overflow', 'visible');\n  var face = element.append('g'); //left eye\n\n  face.append('circle').attr('cx', faceData.cx - radius / 3).attr('cy', faceData.cy - radius / 3).attr('r', 1.5).attr('stroke-width', 2).attr('fill', '#666').attr('stroke', '#666'); //right eye\n\n  face.append('circle').attr('cx', faceData.cx + radius / 3).attr('cy', faceData.cy - radius / 3).attr('r', 1.5).attr('stroke-width', 2).attr('fill', '#666').attr('stroke', '#666');\n\n  function smile(face) {\n    var arc = Object(d3__WEBPACK_IMPORTED_MODULE_0__[\"arc\"])().startAngle(Math.PI / 2).endAngle(3 * (Math.PI / 2)).innerRadius(radius / 2).outerRadius(radius / 2.2); //mouth\n\n    face.append('path').attr('class', 'mouth').attr('d', arc).attr('transform', 'translate(' + faceData.cx + ',' + (faceData.cy + 2) + ')');\n  }\n\n  function sad(face) {\n    var arc = Object(d3__WEBPACK_IMPORTED_MODULE_0__[\"arc\"])().startAngle(3 * Math.PI / 2).endAngle(5 * (Math.PI / 2)).innerRadius(radius / 2).outerRadius(radius / 2.2); //mouth\n\n    face.append('path').attr('class', 'mouth').attr('d', arc).attr('transform', 'translate(' + faceData.cx + ',' + (faceData.cy + 7) + ')');\n  }\n\n  function ambivalent(face) {\n    face.append('line').attr('class', 'mouth').attr('stroke', 2).attr('x1', faceData.cx - 5).attr('y1', faceData.cy + 7).attr('x2', faceData.cx + 5).attr('y2', faceData.cy + 7).attr('class', 'mouth').attr('stroke-width', '1px').attr('stroke', '#666');\n  }\n\n  if (faceData.score > 3) {\n    smile(face);\n  } else if (faceData.score < 3) {\n    sad(face);\n  } else {\n    ambivalent(face);\n  }\n\n  return circleElement;\n};\nvar drawCircle = function drawCircle(element, circleData) {\n  var circleElement = element.append('circle');\n  circleElement.attr('cx', circleData.cx);\n  circleElement.attr('cy', circleData.cy);\n  circleElement.attr('class', 'actor-' + circleData.pos);\n  circleElement.attr('fill', circleData.fill);\n  circleElement.attr('stroke', circleData.stroke);\n  circleElement.attr('r', circleData.r);\n\n  if (typeof circleElement.class !== 'undefined') {\n    circleElement.attr('class', circleElement.class);\n  }\n\n  if (typeof circleData.title !== 'undefined') {\n    circleElement.append('title').text(circleData.title);\n  }\n\n  return circleElement;\n};\nvar drawText = function drawText(elem, textData) {\n  // Remove and ignore br:s\n  var nText = textData.text.replace(/<br\\s*\\/?>/gi, ' ');\n  var textElem = elem.append('text');\n  textElem.attr('x', textData.x);\n  textElem.attr('y', textData.y);\n  textElem.attr('class', 'legend');\n  textElem.style('text-anchor', textData.anchor);\n\n  if (typeof textData.class !== 'undefined') {\n    textElem.attr('class', textData.class);\n  }\n\n  var span = textElem.append('tspan');\n  span.attr('x', textData.x + textData.textMargin * 2);\n  span.text(nText);\n  return textElem;\n};\nvar drawLabel = function drawLabel(elem, txtObject) {\n  function genPoints(x, y, width, height, cut) {\n    return x + ',' + y + ' ' + (x + width) + ',' + y + ' ' + (x + width) + ',' + (y + height - cut) + ' ' + (x + width - cut * 1.2) + ',' + (y + height) + ' ' + x + ',' + (y + height);\n  }\n\n  var polygon = elem.append('polygon');\n  polygon.attr('points', genPoints(txtObject.x, txtObject.y, 50, 20, 7));\n  polygon.attr('class', 'labelBox');\n  txtObject.y = txtObject.y + txtObject.labelMargin;\n  txtObject.x = txtObject.x + 0.5 * txtObject.labelMargin;\n  drawText(elem, txtObject);\n};\nvar drawSection = function drawSection(elem, section, conf) {\n  var g = elem.append('g');\n  var rect = getNoteRect();\n  rect.x = section.x;\n  rect.y = section.y;\n  rect.fill = section.fill;\n  rect.width = conf.width;\n  rect.height = conf.height;\n  rect.class = 'journey-section section-type-' + section.num;\n  rect.rx = 3;\n  rect.ry = 3;\n  drawRect(g, rect);\n\n  _drawTextCandidateFunc(conf)(section.text, g, rect.x, rect.y, rect.width, rect.height, {\n    class: 'journey-section section-type-' + section.num\n  }, conf, section.colour);\n};\nvar taskCount = -1;\n/**\n * Draws an actor in the diagram with the attaced line\n * @param elem The HTML element\n * @param task The task to render\n * @param conf The global configuration\n */\n\nvar drawTask = function drawTask(elem, task, conf) {\n  var center = task.x + conf.width / 2;\n  var g = elem.append('g');\n  taskCount++;\n  var maxHeight = 300 + 5 * 30;\n  g.append('line').attr('id', 'task' + taskCount).attr('x1', center).attr('y1', task.y).attr('x2', center).attr('y2', maxHeight).attr('class', 'task-line').attr('stroke-width', '1px').attr('stroke-dasharray', '4 2').attr('stroke', '#666');\n  drawFace(g, {\n    cx: center,\n    cy: 300 + (5 - task.score) * 30,\n    score: task.score\n  });\n  var rect = getNoteRect();\n  rect.x = task.x;\n  rect.y = task.y;\n  rect.fill = task.fill;\n  rect.width = conf.width;\n  rect.height = conf.height;\n  rect.class = 'task task-type-' + task.num;\n  rect.rx = 3;\n  rect.ry = 3;\n  drawRect(g, rect);\n  var xPos = task.x + 14;\n  task.people.forEach(function (person) {\n    var colour = task.actors[person].color;\n    var circle = {\n      cx: xPos,\n      cy: task.y,\n      r: 7,\n      fill: colour,\n      stroke: '#000',\n      title: person,\n      pos: task.actors[person].position\n    };\n    drawCircle(g, circle);\n    xPos += 10;\n  });\n\n  _drawTextCandidateFunc(conf)(task.task, g, rect.x, rect.y, rect.width, rect.height, {\n    class: 'task'\n  }, conf, task.colour);\n};\n/**\n * Draws a background rectangle\n * @param elem The html element\n * @param bounds The bounds of the drawing\n */\n\nvar drawBackgroundRect = function drawBackgroundRect(elem, bounds) {\n  var rectElem = drawRect(elem, {\n    x: bounds.startx,\n    y: bounds.starty,\n    width: bounds.stopx - bounds.startx,\n    height: bounds.stopy - bounds.starty,\n    fill: bounds.fill,\n    class: 'rect'\n  });\n  rectElem.lower();\n};\nvar getTextObj = function getTextObj() {\n  return {\n    x: 0,\n    y: 0,\n    fill: undefined,\n    'text-anchor': 'start',\n    width: 100,\n    height: 100,\n    textMargin: 0,\n    rx: 0,\n    ry: 0\n  };\n};\nvar getNoteRect = function getNoteRect() {\n  return {\n    x: 0,\n    y: 0,\n    width: 100,\n    anchor: 'start',\n    height: 100,\n    rx: 0,\n    ry: 0\n  };\n};\n\nvar _drawTextCandidateFunc = function () {\n  function byText(content, g, x, y, width, height, textAttrs, colour) {\n    var text = g.append('text').attr('x', x + width / 2).attr('y', y + height / 2 + 5).style('font-color', colour).style('text-anchor', 'middle').text(content);\n\n    _setTextAttrs(text, textAttrs);\n  }\n\n  function byTspan(content, g, x, y, width, height, textAttrs, conf, colour) {\n    var taskFontSize = conf.taskFontSize,\n        taskFontFamily = conf.taskFontFamily;\n    var lines = content.split(/<br\\s*\\/?>/gi);\n\n    for (var i = 0; i < lines.length; i++) {\n      var dy = i * taskFontSize - taskFontSize * (lines.length - 1) / 2;\n      var text = g.append('text').attr('x', x + width / 2).attr('y', y).attr('fill', colour).style('text-anchor', 'middle').style('font-size', taskFontSize).style('font-family', taskFontFamily);\n      text.append('tspan').attr('x', x + width / 2).attr('dy', dy).text(lines[i]);\n      text.attr('y', y + height / 2.0).attr('dominant-baseline', 'central').attr('alignment-baseline', 'central');\n\n      _setTextAttrs(text, textAttrs);\n    }\n  }\n\n  function byFo(content, g, x, y, width, height, textAttrs, conf) {\n    var body = g.append('switch');\n    var f = body.append('foreignObject').attr('x', x).attr('y', y).attr('width', width).attr('height', height).attr('position', 'fixed');\n    var text = f.append('xhtml:div').style('display', 'table').style('height', '100%').style('width', '100%');\n    text.append('div').attr('class', 'label').style('display', 'table-cell').style('text-align', 'center').style('vertical-align', 'middle') // .style('color', colour)\n    .text(content);\n    byTspan(content, body, x, y, width, height, textAttrs, conf);\n\n    _setTextAttrs(text, textAttrs);\n  }\n\n  function _setTextAttrs(toText, fromTextAttrsDict) {\n    for (var key in fromTextAttrsDict) {\n      if (key in fromTextAttrsDict) {\n        // eslint-disable-line\n        // noinspection JSUnfilteredForInLoop\n        toText.attr(key, fromTextAttrsDict[key]);\n      }\n    }\n  }\n\n  return function (conf) {\n    return conf.textPlacement === 'fo' ? byFo : conf.textPlacement === 'old' ? byText : byTspan;\n  };\n}();\n\nvar initGraphics = function initGraphics(graphics) {\n  graphics.append('defs').append('marker').attr('id', 'arrowhead').attr('refX', 5).attr('refY', 2).attr('markerWidth', 6).attr('markerHeight', 4).attr('orient', 'auto').append('path').attr('d', 'M 0,0 V 4 L6,2 Z'); // this is actual shape for arrowhead\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n  drawRect: drawRect,\n  drawCircle: drawCircle,\n  drawSection: drawSection,\n  drawText: drawText,\n  drawLabel: drawLabel,\n  drawTask: drawTask,\n  drawBackgroundRect: drawBackgroundRect,\n  getTextObj: getTextObj,\n  getNoteRect: getNoteRect,\n  initGraphics: initGraphics\n});\n\n/***/ }),\n\n/***/ \"./src/errorRenderer.js\":\n/*!******************************!*\\\n  !*** ./src/errorRenderer.js ***!\n  \\******************************/\n/*! exports provided: setConf, draw, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"setConf\", function() { return setConf; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"draw\", function() { return draw; });\n/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3 */ \"./node_modules/d3/src/index.js\");\n/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./logger */ \"./src/logger.js\");\n/**\n * Created by knut on 14-12-11.\n */\n\n\nvar conf = {};\nvar setConf = function setConf(cnf) {\n  var keys = Object.keys(cnf);\n  keys.forEach(function (key) {\n    conf[key] = cnf[key];\n  });\n};\n/**\n * Draws a an info picture in the tag with id: id based on the graph definition in text.\n * @param text\n * @param id\n */\n\nvar draw = function draw(id, ver) {\n  try {\n    _logger__WEBPACK_IMPORTED_MODULE_1__[\"log\"].debug('Renering svg for syntax error\\n');\n    var svg = Object(d3__WEBPACK_IMPORTED_MODULE_0__[\"select\"])('#' + id);\n    var g = svg.append('g');\n    g.append('path').attr('class', 'error-icon').attr('d', 'm411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z');\n    g.append('path').attr('class', 'error-icon').attr('d', 'm459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z');\n    g.append('path').attr('class', 'error-icon').attr('d', 'm340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z');\n    g.append('path').attr('class', 'error-icon').attr('d', 'm400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z');\n    g.append('path').attr('class', 'error-icon').attr('d', 'm496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z');\n    g.append('path').attr('class', 'error-icon').attr('d', 'm436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z');\n    g.append('text') // text label for the x axis\n    .attr('class', 'error-text').attr('x', 1240).attr('y', 250).attr('font-size', '150px').style('text-anchor', 'middle').text('Syntax error in graph');\n    g.append('text') // text label for the x axis\n    .attr('class', 'error-text').attr('x', 1050).attr('y', 400).attr('font-size', '100px').style('text-anchor', 'middle').text('mermaid version ' + ver);\n    svg.attr('height', 100);\n    svg.attr('width', 400);\n    svg.attr('viewBox', '768 0 512 512');\n  } catch (e) {\n    _logger__WEBPACK_IMPORTED_MODULE_1__[\"log\"].error('Error while rendering info diagram');\n    _logger__WEBPACK_IMPORTED_MODULE_1__[\"log\"].error(e.message);\n  }\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n  setConf: setConf,\n  draw: draw\n});\n\n/***/ }),\n\n/***/ \"./src/logger.js\":\n/*!***********************!*\\\n  !*** ./src/logger.js ***!\n  \\***********************/\n/*! exports provided: LEVELS, log, setLogLevel */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"LEVELS\", function() { return LEVELS; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"log\", function() { return log; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"setLogLevel\", function() { return setLogLevel; });\n/* harmony import */ var moment_mini__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! moment-mini */ \"./node_modules/moment-mini/moment.min.js\");\n/* harmony import */ var moment_mini__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(moment_mini__WEBPACK_IMPORTED_MODULE_0__);\n\nvar LEVELS = {\n  debug: 1,\n  info: 2,\n  warn: 3,\n  error: 4,\n  fatal: 5\n};\nvar log = {\n  debug: function debug() {},\n  info: function info() {},\n  warn: function warn() {},\n  error: function error() {},\n  fatal: function fatal() {}\n};\nvar setLogLevel = function setLogLevel() {\n  var level = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'fatal';\n\n  if (isNaN(level)) {\n    level = level.toLowerCase();\n\n    if (LEVELS[level] !== undefined) {\n      level = LEVELS[level];\n    }\n  }\n\n  log.trace = function () {};\n\n  log.debug = function () {};\n\n  log.info = function () {};\n\n  log.warn = function () {};\n\n  log.error = function () {};\n\n  log.fatal = function () {};\n\n  if (level <= LEVELS.fatal) {\n    log.fatal = console.error ? console.error.bind(console, format('FATAL'), 'color: orange') : console.log.bind(console, '\\x1b[35m', format('FATAL'));\n  }\n\n  if (level <= LEVELS.error) {\n    log.error = console.error ? console.error.bind(console, format('ERROR'), 'color: orange') : console.log.bind(console, '\\x1b[31m', format('ERROR'));\n  }\n\n  if (level <= LEVELS.warn) {\n    log.warn = console.warn ? console.warn.bind(console, format('WARN'), 'color: orange') : console.log.bind(console, \"\\x1B[33m\", format('WARN'));\n  }\n\n  if (level <= LEVELS.info) {\n    log.info = console.info // ? console.info.bind(console, '\\x1b[34m', format('INFO'), 'color: blue')\n    ? console.info.bind(console, format('INFO'), 'color: lightblue') : console.log.bind(console, '\\x1b[34m', format('INFO'));\n  }\n\n  if (level <= LEVELS.debug) {\n    log.debug = console.debug ? console.debug.bind(console, format('DEBUG'), 'color: lightgreen') : console.log.bind(console, '\\x1b[32m', format('DEBUG'));\n  }\n};\n\nvar format = function format(level) {\n  var time = moment_mini__WEBPACK_IMPORTED_MODULE_0___default()().format('ss.SSS');\n  return \"%c\".concat(time, \" : \").concat(level, \" : \");\n};\n\n/***/ }),\n\n/***/ \"./src/mermaid.js\":\n/*!************************!*\\\n  !*** ./src/mermaid.js ***!\n  \\************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./logger */ \"./src/logger.js\");\n/* harmony import */ var _mermaidAPI__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./mermaidAPI */ \"./src/mermaidAPI.js\");\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./utils */ \"./src/utils.js\");\n/**\n * Web page integration module for the mermaid framework. It uses the mermaidAPI for mermaid functionality and to render\n * the diagrams to svg code.\n */\n\n\n\n/**\n * ## init\n * Function that goes through the document to find the chart definitions in there and render them.\n *\n * The function tags the processed attributes with the attribute data-processed and ignores found elements with the\n * attribute already set. This way the init function can be triggered several times.\n *\n * Optionally, `init` can accept in the second argument one of the following:\n * - a DOM Node\n * - an array of DOM nodes (as would come from a jQuery selector)\n * - a W3C selector, a la `.mermaid`\n *\n * ```mermaid\n * graph LR;\n *  a(Find elements)-->b{Processed}\n *  b-->|Yes|c(Leave element)\n *  b-->|No |d(Transform)\n * ```\n * Renders the mermaid diagrams\n * @param nodes a css selector or an array of nodes\n */\n\nvar init = function init() {\n  var _this = this;\n\n  var conf = _mermaidAPI__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getConfig(); // console.log('Starting rendering diagrams (init) - mermaid.init', conf);\n\n  var nodes;\n\n  if (arguments.length >= 2) {\n    /*! sequence config was passed as #1 */\n    if (typeof arguments[0] !== 'undefined') {\n      mermaid.sequenceConfig = arguments[0];\n    }\n\n    nodes = arguments[1];\n  } else {\n    nodes = arguments[0];\n  } // if last argument is a function this is the callback function\n\n\n  var callback;\n\n  if (typeof arguments[arguments.length - 1] === 'function') {\n    callback = arguments[arguments.length - 1];\n    _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].debug('Callback function found');\n  } else {\n    if (typeof conf.mermaid !== 'undefined') {\n      if (typeof conf.mermaid.callback === 'function') {\n        callback = conf.mermaid.callback;\n        _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].debug('Callback function found');\n      } else {\n        _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].debug('No Callback function found');\n      }\n    }\n  }\n\n  nodes = nodes === undefined ? document.querySelectorAll('.mermaid') : typeof nodes === 'string' ? document.querySelectorAll(nodes) : nodes instanceof window.Node ? [nodes] : nodes; // Last case  - sequence config was passed pick next\n\n  _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].debug('Start On Load before: ' + mermaid.startOnLoad);\n\n  if (typeof mermaid.startOnLoad !== 'undefined') {\n    _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].debug('Start On Load inner: ' + mermaid.startOnLoad);\n    _mermaidAPI__WEBPACK_IMPORTED_MODULE_1__[\"default\"].updateSiteConfig({\n      startOnLoad: mermaid.startOnLoad\n    });\n  }\n\n  if (typeof mermaid.ganttConfig !== 'undefined') {\n    _mermaidAPI__WEBPACK_IMPORTED_MODULE_1__[\"default\"].updateSiteConfig({\n      gantt: mermaid.ganttConfig\n    });\n  }\n\n  var idGeneratior = new _utils__WEBPACK_IMPORTED_MODULE_2__[\"default\"].initIdGeneratior(conf.deterministicIds, conf.deterministicIDSeed);\n  var txt;\n\n  var _loop = function _loop(i) {\n    var element = nodes[i];\n    /*! Check if previously processed */\n\n    if (!element.getAttribute('data-processed')) {\n      element.setAttribute('data-processed', true);\n    } else {\n      return \"continue\";\n    }\n\n    var id = \"mermaid-\".concat(idGeneratior.next()); // Fetch the graph definition including tags\n\n    txt = element.innerHTML; // transforms the html to pure text\n\n    txt = _utils__WEBPACK_IMPORTED_MODULE_2__[\"default\"].entityDecode(txt).trim().replace(/<br\\s*\\/?>/gi, '<br/>');\n    var init = _utils__WEBPACK_IMPORTED_MODULE_2__[\"default\"].detectInit(txt);\n\n    if (init) {\n      _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].debug('Detected early reinit: ', init);\n    }\n\n    try {\n      _mermaidAPI__WEBPACK_IMPORTED_MODULE_1__[\"default\"].render(id, txt, function (svgCode, bindFunctions) {\n        element.innerHTML = svgCode;\n\n        if (typeof callback !== 'undefined') {\n          callback(id);\n        }\n\n        if (bindFunctions) bindFunctions(element);\n      }, element);\n    } catch (e) {\n      _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].warn('Syntax Error rendering');\n      _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].warn(e);\n\n      if (_this.parseError) {\n        _this.parseError(e);\n      }\n    }\n  };\n\n  for (var i = 0; i < nodes.length; i++) {\n    var _ret = _loop(i);\n\n    if (_ret === \"continue\") continue;\n  }\n};\n\nvar initialize = function initialize(config) {\n  // mermaidAPI.reset();\n  if (typeof config.mermaid !== 'undefined') {\n    if (typeof config.mermaid.startOnLoad !== 'undefined') {\n      mermaid.startOnLoad = config.mermaid.startOnLoad;\n    }\n\n    if (typeof config.mermaid.htmlLabels !== 'undefined') {\n      mermaid.htmlLabels = config.mermaid.htmlLabels === 'false' || config.mermaid.htmlLabels === false ? false : true;\n    }\n  }\n\n  _mermaidAPI__WEBPACK_IMPORTED_MODULE_1__[\"default\"].initialize(config); // mermaidAPI.reset();\n};\n/**\n * ##contentLoaded\n * Callback function that is called when page is loaded. This functions fetches configuration for mermaid rendering and\n * calls init for rendering the mermaid diagrams on the page.\n */\n\n\nvar contentLoaded = function contentLoaded() {\n  var config;\n\n  if (mermaid.startOnLoad) {\n    // No config found, do check API config\n    config = _mermaidAPI__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getConfig();\n\n    if (config.startOnLoad) {\n      mermaid.init();\n    }\n  } else {\n    if (typeof mermaid.startOnLoad === 'undefined') {\n      _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].debug('In start, no config');\n      config = _mermaidAPI__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getConfig();\n\n      if (config.startOnLoad) {\n        mermaid.init();\n      }\n    }\n  }\n};\n\nif (typeof document !== 'undefined') {\n  /*!\n   * Wait for document loaded before starting the execution\n   */\n  window.addEventListener('load', function () {\n    contentLoaded();\n  }, false);\n}\n\nvar mermaid = {\n  startOnLoad: true,\n  htmlLabels: true,\n  mermaidAPI: _mermaidAPI__WEBPACK_IMPORTED_MODULE_1__[\"default\"],\n  parse: _mermaidAPI__WEBPACK_IMPORTED_MODULE_1__[\"default\"].parse,\n  render: _mermaidAPI__WEBPACK_IMPORTED_MODULE_1__[\"default\"].render,\n  init: init,\n  initialize: initialize,\n  contentLoaded: contentLoaded\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (mermaid);\n\n/***/ }),\n\n/***/ \"./src/mermaidAPI.js\":\n/*!***************************!*\\\n  !*** ./src/mermaidAPI.js ***!\n  \\***************************/\n/*! exports provided: encodeEntities, decodeEntities, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"encodeEntities\", function() { return encodeEntities; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"decodeEntities\", function() { return decodeEntities; });\n/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3 */ \"./node_modules/d3/src/index.js\");\n/* harmony import */ var stylis__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! stylis */ \"./node_modules/stylis/dist/stylis.mjs\");\n/* harmony import */ var _package_json__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../package.json */ \"./package.json\");\nvar _package_json__WEBPACK_IMPORTED_MODULE_2___namespace = /*#__PURE__*/__webpack_require__.t(/*! ../package.json */ \"./package.json\", 1);\n/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./config */ \"./src/config.js\");\n/* harmony import */ var _diagrams_class_classDb__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./diagrams/class/classDb */ \"./src/diagrams/class/classDb.js\");\n/* harmony import */ var _diagrams_class_classRenderer__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./diagrams/class/classRenderer */ \"./src/diagrams/class/classRenderer.js\");\n/* harmony import */ var _diagrams_class_classRenderer_v2__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./diagrams/class/classRenderer-v2 */ \"./src/diagrams/class/classRenderer-v2.js\");\n/* harmony import */ var _diagrams_class_parser_classDiagram__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./diagrams/class/parser/classDiagram */ \"./src/diagrams/class/parser/classDiagram.jison\");\n/* harmony import */ var _diagrams_class_parser_classDiagram__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_diagrams_class_parser_classDiagram__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var _diagrams_er_erDb__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./diagrams/er/erDb */ \"./src/diagrams/er/erDb.js\");\n/* harmony import */ var _diagrams_er_erRenderer__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./diagrams/er/erRenderer */ \"./src/diagrams/er/erRenderer.js\");\n/* harmony import */ var _diagrams_er_parser_erDiagram__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./diagrams/er/parser/erDiagram */ \"./src/diagrams/er/parser/erDiagram.jison\");\n/* harmony import */ var _diagrams_er_parser_erDiagram__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_diagrams_er_parser_erDiagram__WEBPACK_IMPORTED_MODULE_10__);\n/* harmony import */ var _diagrams_flowchart_flowDb__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./diagrams/flowchart/flowDb */ \"./src/diagrams/flowchart/flowDb.js\");\n/* harmony import */ var _diagrams_flowchart_flowRenderer__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./diagrams/flowchart/flowRenderer */ \"./src/diagrams/flowchart/flowRenderer.js\");\n/* harmony import */ var _diagrams_flowchart_flowRenderer_v2__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./diagrams/flowchart/flowRenderer-v2 */ \"./src/diagrams/flowchart/flowRenderer-v2.js\");\n/* harmony import */ var _diagrams_flowchart_parser_flow__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./diagrams/flowchart/parser/flow */ \"./src/diagrams/flowchart/parser/flow.jison\");\n/* harmony import */ var _diagrams_flowchart_parser_flow__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(_diagrams_flowchart_parser_flow__WEBPACK_IMPORTED_MODULE_14__);\n/* harmony import */ var _diagrams_gantt_ganttDb__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./diagrams/gantt/ganttDb */ \"./src/diagrams/gantt/ganttDb.js\");\n/* harmony import */ var _diagrams_gantt_ganttRenderer__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./diagrams/gantt/ganttRenderer */ \"./src/diagrams/gantt/ganttRenderer.js\");\n/* harmony import */ var _diagrams_gantt_parser_gantt__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./diagrams/gantt/parser/gantt */ \"./src/diagrams/gantt/parser/gantt.jison\");\n/* harmony import */ var _diagrams_gantt_parser_gantt__WEBPACK_IMPORTED_MODULE_17___default = /*#__PURE__*/__webpack_require__.n(_diagrams_gantt_parser_gantt__WEBPACK_IMPORTED_MODULE_17__);\n/* harmony import */ var _diagrams_git_gitGraphAst__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./diagrams/git/gitGraphAst */ \"./src/diagrams/git/gitGraphAst.js\");\n/* harmony import */ var _diagrams_git_gitGraphRenderer__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./diagrams/git/gitGraphRenderer */ \"./src/diagrams/git/gitGraphRenderer.js\");\n/* harmony import */ var _diagrams_git_parser_gitGraph__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./diagrams/git/parser/gitGraph */ \"./src/diagrams/git/parser/gitGraph.jison\");\n/* harmony import */ var _diagrams_git_parser_gitGraph__WEBPACK_IMPORTED_MODULE_20___default = /*#__PURE__*/__webpack_require__.n(_diagrams_git_parser_gitGraph__WEBPACK_IMPORTED_MODULE_20__);\n/* harmony import */ var _diagrams_info_infoDb__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./diagrams/info/infoDb */ \"./src/diagrams/info/infoDb.js\");\n/* harmony import */ var _diagrams_info_infoRenderer__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./diagrams/info/infoRenderer */ \"./src/diagrams/info/infoRenderer.js\");\n/* harmony import */ var _diagrams_info_parser_info__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./diagrams/info/parser/info */ \"./src/diagrams/info/parser/info.jison\");\n/* harmony import */ var _diagrams_info_parser_info__WEBPACK_IMPORTED_MODULE_23___default = /*#__PURE__*/__webpack_require__.n(_diagrams_info_parser_info__WEBPACK_IMPORTED_MODULE_23__);\n/* harmony import */ var _diagrams_pie_parser_pie__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ./diagrams/pie/parser/pie */ \"./src/diagrams/pie/parser/pie.jison\");\n/* harmony import */ var _diagrams_pie_parser_pie__WEBPACK_IMPORTED_MODULE_24___default = /*#__PURE__*/__webpack_require__.n(_diagrams_pie_parser_pie__WEBPACK_IMPORTED_MODULE_24__);\n/* harmony import */ var _diagrams_pie_pieDb__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ./diagrams/pie/pieDb */ \"./src/diagrams/pie/pieDb.js\");\n/* harmony import */ var _diagrams_pie_pieRenderer__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ./diagrams/pie/pieRenderer */ \"./src/diagrams/pie/pieRenderer.js\");\n/* harmony import */ var _diagrams_requirement_parser_requirementDiagram__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ./diagrams/requirement/parser/requirementDiagram */ \"./src/diagrams/requirement/parser/requirementDiagram.jison\");\n/* harmony import */ var _diagrams_requirement_parser_requirementDiagram__WEBPACK_IMPORTED_MODULE_27___default = /*#__PURE__*/__webpack_require__.n(_diagrams_requirement_parser_requirementDiagram__WEBPACK_IMPORTED_MODULE_27__);\n/* harmony import */ var _diagrams_requirement_requirementDb__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ./diagrams/requirement/requirementDb */ \"./src/diagrams/requirement/requirementDb.js\");\n/* harmony import */ var _diagrams_requirement_requirementRenderer__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ./diagrams/requirement/requirementRenderer */ \"./src/diagrams/requirement/requirementRenderer.js\");\n/* harmony import */ var _diagrams_sequence_parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ./diagrams/sequence/parser/sequenceDiagram */ \"./src/diagrams/sequence/parser/sequenceDiagram.jison\");\n/* harmony import */ var _diagrams_sequence_parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_30___default = /*#__PURE__*/__webpack_require__.n(_diagrams_sequence_parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_30__);\n/* harmony import */ var _diagrams_sequence_sequenceDb__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ./diagrams/sequence/sequenceDb */ \"./src/diagrams/sequence/sequenceDb.js\");\n/* harmony import */ var _diagrams_sequence_sequenceRenderer__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ./diagrams/sequence/sequenceRenderer */ \"./src/diagrams/sequence/sequenceRenderer.js\");\n/* harmony import */ var _diagrams_state_parser_stateDiagram__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! ./diagrams/state/parser/stateDiagram */ \"./src/diagrams/state/parser/stateDiagram.jison\");\n/* harmony import */ var _diagrams_state_parser_stateDiagram__WEBPACK_IMPORTED_MODULE_33___default = /*#__PURE__*/__webpack_require__.n(_diagrams_state_parser_stateDiagram__WEBPACK_IMPORTED_MODULE_33__);\n/* harmony import */ var _diagrams_state_stateDb__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! ./diagrams/state/stateDb */ \"./src/diagrams/state/stateDb.js\");\n/* harmony import */ var _diagrams_state_stateRenderer__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(/*! ./diagrams/state/stateRenderer */ \"./src/diagrams/state/stateRenderer.js\");\n/* harmony import */ var _diagrams_state_stateRenderer_v2__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(/*! ./diagrams/state/stateRenderer-v2 */ \"./src/diagrams/state/stateRenderer-v2.js\");\n/* harmony import */ var _diagrams_user_journey_journeyDb__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(/*! ./diagrams/user-journey/journeyDb */ \"./src/diagrams/user-journey/journeyDb.js\");\n/* harmony import */ var _diagrams_user_journey_journeyRenderer__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(/*! ./diagrams/user-journey/journeyRenderer */ \"./src/diagrams/user-journey/journeyRenderer.js\");\n/* harmony import */ var _diagrams_user_journey_parser_journey__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__(/*! ./diagrams/user-journey/parser/journey */ \"./src/diagrams/user-journey/parser/journey.jison\");\n/* harmony import */ var _diagrams_user_journey_parser_journey__WEBPACK_IMPORTED_MODULE_39___default = /*#__PURE__*/__webpack_require__.n(_diagrams_user_journey_parser_journey__WEBPACK_IMPORTED_MODULE_39__);\n/* harmony import */ var _errorRenderer__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__(/*! ./errorRenderer */ \"./src/errorRenderer.js\");\n/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__(/*! ./logger */ \"./src/logger.js\");\n/* harmony import */ var _styles__WEBPACK_IMPORTED_MODULE_42__ = __webpack_require__(/*! ./styles */ \"./src/styles.js\");\n/* harmony import */ var _themes__WEBPACK_IMPORTED_MODULE_43__ = __webpack_require__(/*! ./themes */ \"./src/themes/index.js\");\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_44__ = __webpack_require__(/*! ./utils */ \"./src/utils.js\");\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n/**\n *Edit this Page[![N|Solid](img/GitHub-Mark-32px.png)](https://github.com/mermaid-js/mermaid/blob/develop/src/mermaidAPI.js)\n *\n *This is the API to be used when optionally handling the integration with the web page, instead of using the default integration provided by mermaid.js.\n *\n *\n * The core of this api is the [**render**](Setup.md?id=render) function which, given a graph\n * definition as text, renders the graph/diagram and returns an svg element for the graph.\n *\n * It is is then up to the user of the API to make use of the svg, either insert it somewhere in the page or do something completely different.\n *\n * In addition to the render function, a number of behavioral configuration options are available.\n *\n * @name mermaidAPI\n */\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n // import * as configApi from './config';\n// // , {\n// //   setConfig,\n// //   configApi.getConfig,\n// //   configApi.updateSiteConfig,\n// //   configApi.setSiteConfig,\n// //   configApi.getSiteConfig,\n// //   configApi.defaultConfig\n// // }\n\n\n\n\n\n\nfunction parse(text) {\n  var cnf = _config__WEBPACK_IMPORTED_MODULE_3__[\"getConfig\"]();\n  var graphInit = _utils__WEBPACK_IMPORTED_MODULE_44__[\"default\"].detectInit(text, cnf);\n\n  if (graphInit) {\n    reinitialize(graphInit);\n    _logger__WEBPACK_IMPORTED_MODULE_41__[\"log\"].debug('reinit ', graphInit);\n  }\n\n  var graphType = _utils__WEBPACK_IMPORTED_MODULE_44__[\"default\"].detectType(text, cnf);\n  var parser;\n  _logger__WEBPACK_IMPORTED_MODULE_41__[\"log\"].debug('Type ' + graphType);\n\n  switch (graphType) {\n    case 'git':\n      parser = _diagrams_git_parser_gitGraph__WEBPACK_IMPORTED_MODULE_20___default.a;\n      parser.parser.yy = _diagrams_git_gitGraphAst__WEBPACK_IMPORTED_MODULE_18__[\"default\"];\n      break;\n\n    case 'flowchart':\n      _diagrams_flowchart_flowDb__WEBPACK_IMPORTED_MODULE_11__[\"default\"].clear();\n      parser = _diagrams_flowchart_parser_flow__WEBPACK_IMPORTED_MODULE_14___default.a;\n      parser.parser.yy = _diagrams_flowchart_flowDb__WEBPACK_IMPORTED_MODULE_11__[\"default\"];\n      break;\n\n    case 'flowchart-v2':\n      _diagrams_flowchart_flowDb__WEBPACK_IMPORTED_MODULE_11__[\"default\"].clear();\n      parser = _diagrams_flowchart_parser_flow__WEBPACK_IMPORTED_MODULE_14___default.a;\n      parser.parser.yy = _diagrams_flowchart_flowDb__WEBPACK_IMPORTED_MODULE_11__[\"default\"];\n      break;\n\n    case 'sequence':\n      parser = _diagrams_sequence_parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_30___default.a;\n      parser.parser.yy = _diagrams_sequence_sequenceDb__WEBPACK_IMPORTED_MODULE_31__[\"default\"];\n      break;\n\n    case 'gantt':\n      parser = _diagrams_gantt_parser_gantt__WEBPACK_IMPORTED_MODULE_17___default.a;\n      parser.parser.yy = _diagrams_gantt_ganttDb__WEBPACK_IMPORTED_MODULE_15__[\"default\"];\n      break;\n\n    case 'class':\n      parser = _diagrams_class_parser_classDiagram__WEBPACK_IMPORTED_MODULE_7___default.a;\n      parser.parser.yy = _diagrams_class_classDb__WEBPACK_IMPORTED_MODULE_4__[\"default\"];\n      break;\n\n    case 'classDiagram':\n      parser = _diagrams_class_parser_classDiagram__WEBPACK_IMPORTED_MODULE_7___default.a;\n      parser.parser.yy = _diagrams_class_classDb__WEBPACK_IMPORTED_MODULE_4__[\"default\"];\n      break;\n\n    case 'state':\n      parser = _diagrams_state_parser_stateDiagram__WEBPACK_IMPORTED_MODULE_33___default.a;\n      parser.parser.yy = _diagrams_state_stateDb__WEBPACK_IMPORTED_MODULE_34__[\"default\"];\n      break;\n\n    case 'stateDiagram':\n      parser = _diagrams_state_parser_stateDiagram__WEBPACK_IMPORTED_MODULE_33___default.a;\n      parser.parser.yy = _diagrams_state_stateDb__WEBPACK_IMPORTED_MODULE_34__[\"default\"];\n      break;\n\n    case 'info':\n      _logger__WEBPACK_IMPORTED_MODULE_41__[\"log\"].debug('info info info');\n      parser = _diagrams_info_parser_info__WEBPACK_IMPORTED_MODULE_23___default.a;\n      parser.parser.yy = _diagrams_info_infoDb__WEBPACK_IMPORTED_MODULE_21__[\"default\"];\n      break;\n\n    case 'pie':\n      _logger__WEBPACK_IMPORTED_MODULE_41__[\"log\"].debug('pie');\n      parser = _diagrams_pie_parser_pie__WEBPACK_IMPORTED_MODULE_24___default.a;\n      parser.parser.yy = _diagrams_pie_pieDb__WEBPACK_IMPORTED_MODULE_25__[\"default\"];\n      break;\n\n    case 'er':\n      _logger__WEBPACK_IMPORTED_MODULE_41__[\"log\"].debug('er');\n      parser = _diagrams_er_parser_erDiagram__WEBPACK_IMPORTED_MODULE_10___default.a;\n      parser.parser.yy = _diagrams_er_erDb__WEBPACK_IMPORTED_MODULE_8__[\"default\"];\n      break;\n\n    case 'journey':\n      _logger__WEBPACK_IMPORTED_MODULE_41__[\"log\"].debug('Journey');\n      parser = _diagrams_user_journey_parser_journey__WEBPACK_IMPORTED_MODULE_39___default.a;\n      parser.parser.yy = _diagrams_user_journey_journeyDb__WEBPACK_IMPORTED_MODULE_37__[\"default\"];\n      break;\n\n    case 'requirement':\n    case 'requirementDiagram':\n      _logger__WEBPACK_IMPORTED_MODULE_41__[\"log\"].debug('RequirementDiagram');\n      parser = _diagrams_requirement_parser_requirementDiagram__WEBPACK_IMPORTED_MODULE_27___default.a;\n      parser.parser.yy = _diagrams_requirement_requirementDb__WEBPACK_IMPORTED_MODULE_28__[\"default\"];\n      break;\n  }\n\n  parser.parser.yy.graphType = graphType;\n\n  parser.parser.yy.parseError = function (str, hash) {\n    var error = {\n      str: str,\n      hash: hash\n    };\n    throw error;\n  };\n\n  parser.parse(text);\n  return parser;\n}\n\nvar encodeEntities = function encodeEntities(text) {\n  var txt = text;\n  txt = txt.replace(/style.*:\\S*#.*;/g, function (s) {\n    var innerTxt = s.substring(0, s.length - 1);\n    return innerTxt;\n  });\n  txt = txt.replace(/classDef.*:\\S*#.*;/g, function (s) {\n    var innerTxt = s.substring(0, s.length - 1);\n    return innerTxt;\n  });\n  txt = txt.replace(/#\\w+;/g, function (s) {\n    var innerTxt = s.substring(1, s.length - 1);\n    var isInt = /^\\+?\\d+$/.test(innerTxt);\n\n    if (isInt) {\n      return 'ﬂ°°' + innerTxt + '¶ß';\n    } else {\n      return 'ﬂ°' + innerTxt + '¶ß';\n    }\n  });\n  return txt;\n};\nvar decodeEntities = function decodeEntities(text) {\n  var txt = text;\n  txt = txt.replace(/ﬂ°°/g, function () {\n    return '&#';\n  });\n  txt = txt.replace(/ﬂ°/g, function () {\n    return '&';\n  });\n  txt = txt.replace(/¶ß/g, function () {\n    return ';';\n  });\n  return txt;\n};\n/**\n * Function that renders an svg with a graph from a chart definition. Usage example below.\n *\n * ```js\n * mermaidAPI.initialize({\n *      startOnLoad:true\n *  });\n *  $(function(){\n *      const graphDefinition = 'graph TB\\na-->b';\n *      const cb = function(svgGraph){\n *          console.log(svgGraph);\n *      };\n *      mermaidAPI.render('id1',graphDefinition,cb);\n *  });\n *```\n * @param id the id of the element to be rendered\n * @param _txt the graph definition\n * @param cb callback which is called after rendering is finished with the svg code as inparam.\n * @param container selector to element in which a div with the graph temporarily will be inserted. In one is\n * provided a hidden div will be inserted in the body of the page instead. The element will be removed when rendering is\n * completed.\n */\n\nvar render = function render(id, _txt, cb, container) {\n  _config__WEBPACK_IMPORTED_MODULE_3__[\"reset\"]();\n  var txt = _txt;\n  var graphInit = _utils__WEBPACK_IMPORTED_MODULE_44__[\"default\"].detectInit(txt);\n\n  if (graphInit) {\n    _config__WEBPACK_IMPORTED_MODULE_3__[\"addDirective\"](graphInit);\n  } // else {\n  //   configApi.reset();\n  //   const siteConfig = configApi.getSiteConfig();\n  //   configApi.addDirective(siteConfig);\n  // }\n  // console.warn('Render fetching config');\n\n\n  var cnf = _config__WEBPACK_IMPORTED_MODULE_3__[\"getConfig\"](); // Check the maximum allowed text size\n\n  if (_txt.length > cnf.maxTextSize) {\n    txt = 'graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa';\n  }\n\n  if (typeof container !== 'undefined') {\n    container.innerHTML = '';\n    Object(d3__WEBPACK_IMPORTED_MODULE_0__[\"select\"])(container).append('div').attr('id', 'd' + id).attr('style', 'font-family: ' + cnf.fontFamily).append('svg').attr('id', id).attr('width', '100%').attr('xmlns', 'http://www.w3.org/2000/svg').append('g');\n  } else {\n    var existingSvg = document.getElementById(id);\n\n    if (existingSvg) {\n      existingSvg.remove();\n    }\n\n    var _element = document.querySelector('#' + 'd' + id);\n\n    if (_element) {\n      _element.remove();\n    }\n\n    Object(d3__WEBPACK_IMPORTED_MODULE_0__[\"select\"])('body').append('div').attr('id', 'd' + id).append('svg').attr('id', id).attr('width', '100%').attr('xmlns', 'http://www.w3.org/2000/svg').append('g');\n  }\n\n  window.txt = txt;\n  txt = encodeEntities(txt);\n  var element = Object(d3__WEBPACK_IMPORTED_MODULE_0__[\"select\"])('#d' + id).node();\n  var graphType = _utils__WEBPACK_IMPORTED_MODULE_44__[\"default\"].detectType(txt, cnf); // insert inline style into svg\n\n  var svg = element.firstChild;\n  var firstChild = svg.firstChild;\n  var userStyles = ''; // user provided theme CSS\n\n  if (cnf.themeCSS !== undefined) {\n    userStyles += \"\\n\".concat(cnf.themeCSS);\n  } // user provided theme CSS\n\n\n  if (cnf.fontFamily !== undefined) {\n    userStyles += \"\\n:root { --mermaid-font-family: \".concat(cnf.fontFamily, \"}\");\n  } // user provided theme CSS\n\n\n  if (cnf.altFontFamily !== undefined) {\n    userStyles += \"\\n:root { --mermaid-alt-font-family: \".concat(cnf.altFontFamily, \"}\");\n  } // classDef\n\n\n  if (graphType === 'flowchart' || graphType === 'flowchart-v2' || graphType === 'graph') {\n    var classes = _diagrams_flowchart_flowRenderer__WEBPACK_IMPORTED_MODULE_12__[\"default\"].getClasses(txt);\n    var htmlLabels = cnf.htmlLabels || cnf.flowchart.htmlLabels;\n\n    for (var className in classes) {\n      if (htmlLabels) {\n        userStyles += \"\\n.\".concat(className, \" > * { \").concat(classes[className].styles.join(' !important; '), \" !important; }\");\n        userStyles += \"\\n.\".concat(className, \" span { \").concat(classes[className].styles.join(' !important; '), \" !important; }\");\n      } else {\n        userStyles += \"\\n.\".concat(className, \" path { \").concat(classes[className].styles.join(' !important; '), \" !important; }\");\n        userStyles += \"\\n.\".concat(className, \" rect { \").concat(classes[className].styles.join(' !important; '), \" !important; }\");\n        userStyles += \"\\n.\".concat(className, \" polygon { \").concat(classes[className].styles.join(' !important; '), \" !important; }\");\n        userStyles += \"\\n.\".concat(className, \" ellipse { \").concat(classes[className].styles.join(' !important; '), \" !important; }\");\n        userStyles += \"\\n.\".concat(className, \" circle { \").concat(classes[className].styles.join(' !important; '), \" !important; }\");\n\n        if (classes[className].textStyles) {\n          userStyles += \"\\n.\".concat(className, \" tspan { \").concat(classes[className].textStyles.join(' !important; '), \" !important; }\");\n        }\n      }\n    }\n  } // log.warn(cnf.themeVariables);\n\n\n  var stylis = function stylis(selector, styles) {\n    return Object(stylis__WEBPACK_IMPORTED_MODULE_1__[\"serialize\"])(Object(stylis__WEBPACK_IMPORTED_MODULE_1__[\"compile\"])(\"\".concat(selector, \"{\").concat(styles, \"}\")), stylis__WEBPACK_IMPORTED_MODULE_1__[\"stringify\"]);\n  };\n\n  var rules = stylis(\"#\".concat(id), Object(_styles__WEBPACK_IMPORTED_MODULE_42__[\"default\"])(graphType, userStyles, cnf.themeVariables));\n  var style1 = document.createElement('style');\n  style1.innerHTML = \"#\".concat(id, \" \") + rules;\n  svg.insertBefore(style1, firstChild); // Verify that the generated svgs are ok before removing this\n  // const style2 = document.createElement('style');\n  // const cs = window.getComputedStyle(svg);\n  // style2.innerHTML = `#d${id} * {\n  //   color: ${cs.color};\n  //   // font: ${cs.font};\n  //   // font-family: Arial;\n  //   // font-size: 24px;\n  // }`;\n  // svg.insertBefore(style2, firstChild);\n\n  try {\n    switch (graphType) {\n      case 'git':\n        cnf.flowchart.arrowMarkerAbsolute = cnf.arrowMarkerAbsolute;\n        _diagrams_git_gitGraphRenderer__WEBPACK_IMPORTED_MODULE_19__[\"default\"].setConf(cnf.git);\n        _diagrams_git_gitGraphRenderer__WEBPACK_IMPORTED_MODULE_19__[\"default\"].draw(txt, id, false);\n        break;\n\n      case 'flowchart':\n        cnf.flowchart.arrowMarkerAbsolute = cnf.arrowMarkerAbsolute;\n        _diagrams_flowchart_flowRenderer__WEBPACK_IMPORTED_MODULE_12__[\"default\"].setConf(cnf.flowchart);\n        _diagrams_flowchart_flowRenderer__WEBPACK_IMPORTED_MODULE_12__[\"default\"].draw(txt, id, false);\n        break;\n\n      case 'flowchart-v2':\n        cnf.flowchart.arrowMarkerAbsolute = cnf.arrowMarkerAbsolute;\n        _diagrams_flowchart_flowRenderer_v2__WEBPACK_IMPORTED_MODULE_13__[\"default\"].setConf(cnf.flowchart);\n        _diagrams_flowchart_flowRenderer_v2__WEBPACK_IMPORTED_MODULE_13__[\"default\"].draw(txt, id, false);\n        break;\n\n      case 'sequence':\n        cnf.sequence.arrowMarkerAbsolute = cnf.arrowMarkerAbsolute;\n\n        if (cnf.sequenceDiagram) {\n          // backwards compatibility\n          _diagrams_sequence_sequenceRenderer__WEBPACK_IMPORTED_MODULE_32__[\"default\"].setConf(Object.assign(cnf.sequence, cnf.sequenceDiagram));\n          console.error('`mermaid config.sequenceDiagram` has been renamed to `config.sequence`. Please update your mermaid config.');\n        } else {\n          _diagrams_sequence_sequenceRenderer__WEBPACK_IMPORTED_MODULE_32__[\"default\"].setConf(cnf.sequence);\n        }\n\n        _diagrams_sequence_sequenceRenderer__WEBPACK_IMPORTED_MODULE_32__[\"default\"].draw(txt, id);\n        break;\n\n      case 'gantt':\n        cnf.gantt.arrowMarkerAbsolute = cnf.arrowMarkerAbsolute;\n        _diagrams_gantt_ganttRenderer__WEBPACK_IMPORTED_MODULE_16__[\"default\"].setConf(cnf.gantt);\n        _diagrams_gantt_ganttRenderer__WEBPACK_IMPORTED_MODULE_16__[\"default\"].draw(txt, id);\n        break;\n\n      case 'class':\n        cnf.class.arrowMarkerAbsolute = cnf.arrowMarkerAbsolute;\n        _diagrams_class_classRenderer__WEBPACK_IMPORTED_MODULE_5__[\"default\"].setConf(cnf.class);\n        _diagrams_class_classRenderer__WEBPACK_IMPORTED_MODULE_5__[\"default\"].draw(txt, id);\n        break;\n\n      case 'classDiagram':\n        cnf.class.arrowMarkerAbsolute = cnf.arrowMarkerAbsolute;\n        _diagrams_class_classRenderer_v2__WEBPACK_IMPORTED_MODULE_6__[\"default\"].setConf(cnf.class);\n        _diagrams_class_classRenderer_v2__WEBPACK_IMPORTED_MODULE_6__[\"default\"].draw(txt, id);\n        break;\n\n      case 'state':\n        cnf.class.arrowMarkerAbsolute = cnf.arrowMarkerAbsolute;\n        _diagrams_state_stateRenderer__WEBPACK_IMPORTED_MODULE_35__[\"default\"].setConf(cnf.state);\n        _diagrams_state_stateRenderer__WEBPACK_IMPORTED_MODULE_35__[\"default\"].draw(txt, id);\n        break;\n\n      case 'stateDiagram':\n        cnf.class.arrowMarkerAbsolute = cnf.arrowMarkerAbsolute;\n        _diagrams_state_stateRenderer_v2__WEBPACK_IMPORTED_MODULE_36__[\"default\"].setConf(cnf.state);\n        _diagrams_state_stateRenderer_v2__WEBPACK_IMPORTED_MODULE_36__[\"default\"].draw(txt, id);\n        break;\n\n      case 'info':\n        cnf.class.arrowMarkerAbsolute = cnf.arrowMarkerAbsolute;\n        _diagrams_info_infoRenderer__WEBPACK_IMPORTED_MODULE_22__[\"default\"].setConf(cnf.class);\n        _diagrams_info_infoRenderer__WEBPACK_IMPORTED_MODULE_22__[\"default\"].draw(txt, id, _package_json__WEBPACK_IMPORTED_MODULE_2__.version);\n        break;\n\n      case 'pie':\n        //cnf.class.arrowMarkerAbsolute = cnf.arrowMarkerAbsolute;\n        //pieRenderer.setConf(cnf.pie);\n        _diagrams_pie_pieRenderer__WEBPACK_IMPORTED_MODULE_26__[\"default\"].draw(txt, id, _package_json__WEBPACK_IMPORTED_MODULE_2__.version);\n        break;\n\n      case 'er':\n        _diagrams_er_erRenderer__WEBPACK_IMPORTED_MODULE_9__[\"default\"].setConf(cnf.er);\n        _diagrams_er_erRenderer__WEBPACK_IMPORTED_MODULE_9__[\"default\"].draw(txt, id, _package_json__WEBPACK_IMPORTED_MODULE_2__.version);\n        break;\n\n      case 'journey':\n        _diagrams_user_journey_journeyRenderer__WEBPACK_IMPORTED_MODULE_38__[\"default\"].setConf(cnf.journey);\n        _diagrams_user_journey_journeyRenderer__WEBPACK_IMPORTED_MODULE_38__[\"default\"].draw(txt, id, _package_json__WEBPACK_IMPORTED_MODULE_2__.version);\n        break;\n\n      case 'requirement':\n        _diagrams_requirement_requirementRenderer__WEBPACK_IMPORTED_MODULE_29__[\"default\"].setConf(cnf.requirement);\n        _diagrams_requirement_requirementRenderer__WEBPACK_IMPORTED_MODULE_29__[\"default\"].draw(txt, id, _package_json__WEBPACK_IMPORTED_MODULE_2__.version);\n        break;\n    }\n  } catch (e) {\n    // errorRenderer.setConf(cnf.class);\n    _errorRenderer__WEBPACK_IMPORTED_MODULE_40__[\"default\"].draw(id, _package_json__WEBPACK_IMPORTED_MODULE_2__.version);\n    throw e;\n  }\n\n  Object(d3__WEBPACK_IMPORTED_MODULE_0__[\"select\"])(\"[id=\\\"\".concat(id, \"\\\"]\")).selectAll('foreignobject > *').attr('xmlns', 'http://www.w3.org/1999/xhtml'); // if (cnf.arrowMarkerAbsolute) {\n  //   url =\n  //     window.location.protocol +\n  //     '//' +\n  //     window.location.host +\n  //     window.location.pathname +\n  //     window.location.search;\n  //   url = url.replace(/\\(/g, '\\\\(');\n  //   url = url.replace(/\\)/g, '\\\\)');\n  // }\n  // Fix for when the base tag is used\n\n  var svgCode = Object(d3__WEBPACK_IMPORTED_MODULE_0__[\"select\"])('#d' + id).node().innerHTML;\n  _logger__WEBPACK_IMPORTED_MODULE_41__[\"log\"].debug('cnf.arrowMarkerAbsolute', cnf.arrowMarkerAbsolute);\n\n  if (!cnf.arrowMarkerAbsolute || cnf.arrowMarkerAbsolute === 'false') {\n    svgCode = svgCode.replace(/marker-end=\"url\\(.*?#/g, 'marker-end=\"url(#', 'g');\n  }\n\n  svgCode = decodeEntities(svgCode); // Fix for when the br tag is used\n\n  svgCode = svgCode.replace(/<br>/g, '<br/>');\n\n  if (typeof cb !== 'undefined') {\n    switch (graphType) {\n      case 'flowchart':\n      case 'flowchart-v2':\n        cb(svgCode, _diagrams_flowchart_flowDb__WEBPACK_IMPORTED_MODULE_11__[\"default\"].bindFunctions);\n        break;\n\n      case 'gantt':\n        cb(svgCode, _diagrams_gantt_ganttDb__WEBPACK_IMPORTED_MODULE_15__[\"default\"].bindFunctions);\n        break;\n\n      case 'class':\n      case 'classDiagram':\n        cb(svgCode, _diagrams_class_classDb__WEBPACK_IMPORTED_MODULE_4__[\"default\"].bindFunctions);\n        break;\n\n      default:\n        cb(svgCode);\n    }\n  } else {\n    _logger__WEBPACK_IMPORTED_MODULE_41__[\"log\"].debug('CB = undefined!');\n  }\n\n  var node = Object(d3__WEBPACK_IMPORTED_MODULE_0__[\"select\"])('#d' + id).node();\n\n  if (node !== null && typeof node.remove === 'function') {\n    Object(d3__WEBPACK_IMPORTED_MODULE_0__[\"select\"])('#d' + id).node().remove();\n  }\n\n  return svgCode;\n};\n\nvar currentDirective = {};\n\nvar parseDirective = function parseDirective(p, statement, context, type) {\n  try {\n    if (statement !== undefined) {\n      statement = statement.trim();\n\n      switch (context) {\n        case 'open_directive':\n          currentDirective = {};\n          break;\n\n        case 'type_directive':\n          currentDirective.type = statement.toLowerCase();\n          break;\n\n        case 'arg_directive':\n          currentDirective.args = JSON.parse(statement);\n          break;\n\n        case 'close_directive':\n          handleDirective(p, currentDirective, type);\n          currentDirective = null;\n          break;\n      }\n    }\n  } catch (error) {\n    _logger__WEBPACK_IMPORTED_MODULE_41__[\"log\"].error(\"Error while rendering sequenceDiagram directive: \".concat(statement, \" jison context: \").concat(context));\n    _logger__WEBPACK_IMPORTED_MODULE_41__[\"log\"].error(error.message);\n  }\n};\n\nvar handleDirective = function handleDirective(p, directive, type) {\n  _logger__WEBPACK_IMPORTED_MODULE_41__[\"log\"].debug(\"Directive type=\".concat(directive.type, \" with args:\"), directive.args);\n\n  switch (directive.type) {\n    case 'init':\n    case 'initialize':\n      {\n        ['config'].forEach(function (prop) {\n          if (typeof directive.args[prop] !== 'undefined') {\n            if (type === 'flowchart-v2') {\n              type = 'flowchart';\n            }\n\n            directive.args[type] = directive.args[prop];\n            delete directive.args[prop];\n          }\n        });\n        _logger__WEBPACK_IMPORTED_MODULE_41__[\"log\"].debug('sanitize in handleDirective', directive.args);\n        Object(_utils__WEBPACK_IMPORTED_MODULE_44__[\"directiveSanitizer\"])(directive.args);\n        _logger__WEBPACK_IMPORTED_MODULE_41__[\"log\"].debug('sanitize in handleDirective (done)', directive.args);\n        reinitialize(directive.args);\n        _config__WEBPACK_IMPORTED_MODULE_3__[\"addDirective\"](directive.args);\n        break;\n      }\n\n    case 'wrap':\n    case 'nowrap':\n      if (p && p['setWrap']) {\n        p.setWrap(directive.type === 'wrap');\n      }\n\n      break;\n\n    default:\n      _logger__WEBPACK_IMPORTED_MODULE_41__[\"log\"].warn(\"Unhandled directive: source: '%%{\".concat(directive.type, \": \").concat(JSON.stringify(directive.args ? directive.args : {}), \"}%%\"), directive);\n      break;\n  }\n};\n\nfunction updateRendererConfigs(conf) {\n  // Todo remove, all diagrams should get config on demoand from the config object, no need for this\n  _diagrams_git_gitGraphRenderer__WEBPACK_IMPORTED_MODULE_19__[\"default\"].setConf(conf.git);\n  _diagrams_flowchart_flowRenderer__WEBPACK_IMPORTED_MODULE_12__[\"default\"].setConf(conf.flowchart);\n  _diagrams_flowchart_flowRenderer_v2__WEBPACK_IMPORTED_MODULE_13__[\"default\"].setConf(conf.flowchart);\n\n  if (typeof conf['sequenceDiagram'] !== 'undefined') {\n    _diagrams_sequence_sequenceRenderer__WEBPACK_IMPORTED_MODULE_32__[\"default\"].setConf(Object(_utils__WEBPACK_IMPORTED_MODULE_44__[\"assignWithDepth\"])(conf.sequence, conf['sequenceDiagram']));\n  }\n\n  _diagrams_sequence_sequenceRenderer__WEBPACK_IMPORTED_MODULE_32__[\"default\"].setConf(conf.sequence);\n  _diagrams_gantt_ganttRenderer__WEBPACK_IMPORTED_MODULE_16__[\"default\"].setConf(conf.gantt);\n  _diagrams_class_classRenderer__WEBPACK_IMPORTED_MODULE_5__[\"default\"].setConf(conf.class);\n  _diagrams_state_stateRenderer__WEBPACK_IMPORTED_MODULE_35__[\"default\"].setConf(conf.state);\n  _diagrams_state_stateRenderer_v2__WEBPACK_IMPORTED_MODULE_36__[\"default\"].setConf(conf.state);\n  _diagrams_info_infoRenderer__WEBPACK_IMPORTED_MODULE_22__[\"default\"].setConf(conf.class); // pieRenderer.setConf(conf.class);\n\n  _diagrams_er_erRenderer__WEBPACK_IMPORTED_MODULE_9__[\"default\"].setConf(conf.er);\n  _diagrams_user_journey_journeyRenderer__WEBPACK_IMPORTED_MODULE_38__[\"default\"].setConf(conf.journey);\n  _diagrams_requirement_requirementRenderer__WEBPACK_IMPORTED_MODULE_29__[\"default\"].setConf(conf.requirement);\n  _errorRenderer__WEBPACK_IMPORTED_MODULE_40__[\"default\"].setConf(conf.class);\n}\n\nfunction reinitialize() {// `mermaidAPI.reinitialize: v${pkg.version}`,\n  //   JSON.stringify(options),\n  //   options.themeVariables.primaryColor;\n  // // if (options.theme && theme[options.theme]) {\n  // //   options.themeVariables = theme[options.theme].getThemeVariables(options.themeVariables);\n  // // }\n  // // Set default options\n  // const config =\n  //   typeof options === 'object' ? configApi.setConfig(options) : configApi.getSiteConfig();\n  // updateRendererConfigs(config);\n  // setLogLevel(config.logLevel);\n  // log.debug('mermaidAPI.reinitialize: ', config);\n}\n\nfunction initialize(options) {\n  // console.warn(`mermaidAPI.initialize: v${pkg.version} `, options);\n  // Handle legacy location of font-family configuration\n  if (options && options.fontFamily) {\n    if (!options.themeVariables) {\n      options.themeVariables = {\n        fontFamily: options.fontFamily\n      };\n    } else {\n      if (!options.themeVariables.fontFamily) {\n        options.themeVariables = {\n          fontFamily: options.fontFamily\n        };\n      }\n    }\n  } // Set default options\n\n\n  _config__WEBPACK_IMPORTED_MODULE_3__[\"saveConfigFromInitilize\"](options);\n\n  if (options && options.theme && _themes__WEBPACK_IMPORTED_MODULE_43__[\"default\"][options.theme]) {\n    // Todo merge with user options\n    options.themeVariables = _themes__WEBPACK_IMPORTED_MODULE_43__[\"default\"][options.theme].getThemeVariables(options.themeVariables);\n  } else {\n    if (options) options.themeVariables = _themes__WEBPACK_IMPORTED_MODULE_43__[\"default\"].default.getThemeVariables(options.themeVariables);\n  }\n\n  var config = _typeof(options) === 'object' ? _config__WEBPACK_IMPORTED_MODULE_3__[\"setSiteConfig\"](options) : _config__WEBPACK_IMPORTED_MODULE_3__[\"getSiteConfig\"]();\n  updateRendererConfigs(config);\n  Object(_logger__WEBPACK_IMPORTED_MODULE_41__[\"setLogLevel\"])(config.logLevel); // log.debug('mermaidAPI.initialize: ', config);\n}\n\nvar mermaidAPI = Object.freeze({\n  render: render,\n  parse: parse,\n  parseDirective: parseDirective,\n  initialize: initialize,\n  reinitialize: reinitialize,\n  getConfig: _config__WEBPACK_IMPORTED_MODULE_3__[\"getConfig\"],\n  setConfig: _config__WEBPACK_IMPORTED_MODULE_3__[\"setConfig\"],\n  getSiteConfig: _config__WEBPACK_IMPORTED_MODULE_3__[\"getSiteConfig\"],\n  updateSiteConfig: _config__WEBPACK_IMPORTED_MODULE_3__[\"updateSiteConfig\"],\n  reset: function reset() {\n    // console.warn('reset');\n    _config__WEBPACK_IMPORTED_MODULE_3__[\"reset\"](); // const siteConfig = configApi.getSiteConfig();\n    // updateRendererConfigs(siteConfig);\n  },\n  globalReset: function globalReset() {\n    _config__WEBPACK_IMPORTED_MODULE_3__[\"reset\"](_config__WEBPACK_IMPORTED_MODULE_3__[\"defaultConfig\"]);\n    updateRendererConfigs(_config__WEBPACK_IMPORTED_MODULE_3__[\"getConfig\"]());\n  },\n  defaultConfig: _config__WEBPACK_IMPORTED_MODULE_3__[\"defaultConfig\"]\n});\nObject(_logger__WEBPACK_IMPORTED_MODULE_41__[\"setLogLevel\"])(_config__WEBPACK_IMPORTED_MODULE_3__[\"getConfig\"]().logLevel);\n_config__WEBPACK_IMPORTED_MODULE_3__[\"reset\"](_config__WEBPACK_IMPORTED_MODULE_3__[\"getConfig\"]());\n/* harmony default export */ __webpack_exports__[\"default\"] = (mermaidAPI);\n/**\n * ## mermaidAPI configuration defaults\n *\n * ```html\n * <script>\n *   var config = {\n *     theme:'default',\n *     logLevel:'fatal',\n *     securityLevel:'strict',\n *     startOnLoad:true,\n *     arrowMarkerAbsolute:false,\n *\n *     er:{\n *       diagramPadding:20,\n *       layoutDirection:'TB',\n *       minEntityWidth:100,\n *       minEntityHeight:75,\n *       entityPadding:15,\n *       stroke:'gray',\n *       fill:'honeydew',\n *       fontSize:12,\n *       useMaxWidth:true,\n *     },\n *     flowchart:{\n *       diagramPadding:8,\n *       htmlLabels:true,\n *       curve:'basis',\n *     },\n *     sequence:{\n *       diagramMarginX:50,\n *       diagramMarginY:10,\n *       actorMargin:50,\n *       width:150,\n *       height:65,\n *       boxMargin:10,\n *       boxTextMargin:5,\n *       noteMargin:10,\n *       messageMargin:35,\n *       messageAlign:'center',\n *       mirrorActors:true,\n *       bottomMarginAdj:1,\n *       useMaxWidth:true,\n *       rightAngles:false,\n *       showSequenceNumbers:false,\n *     },\n *     gantt:{\n *       titleTopMargin:25,\n *       barHeight:20,\n *       barGap:4,\n *       topPadding:50,\n *       leftPadding:75,\n *       gridLineStartPadding:35,\n *       fontSize:11,\n *       fontFamily:'\"Open-Sans\", \"sans-serif\"',\n *       numberSectionStyles:4,\n *       axisFormat:'%Y-%m-%d',\n *       topAxis:false,\n *     }\n *   };\n *   mermaid.initialize(config);\n * </script>\n * ```\n */\n\n/***/ }),\n\n/***/ \"./src/styles.js\":\n/*!***********************!*\\\n  !*** ./src/styles.js ***!\n  \\***********************/\n/*! exports provided: calcThemeVariables, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"calcThemeVariables\", function() { return calcThemeVariables; });\n/* harmony import */ var _diagrams_class_styles__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./diagrams/class/styles */ \"./src/diagrams/class/styles.js\");\n/* harmony import */ var _diagrams_er_styles__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./diagrams/er/styles */ \"./src/diagrams/er/styles.js\");\n/* harmony import */ var _diagrams_flowchart_styles__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./diagrams/flowchart/styles */ \"./src/diagrams/flowchart/styles.js\");\n/* harmony import */ var _diagrams_gantt_styles__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./diagrams/gantt/styles */ \"./src/diagrams/gantt/styles.js\");\n/* harmony import */ var _diagrams_git_styles__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./diagrams/git/styles */ \"./src/diagrams/git/styles.js\");\n/* harmony import */ var _diagrams_info_styles__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./diagrams/info/styles */ \"./src/diagrams/info/styles.js\");\n/* harmony import */ var _diagrams_pie_styles__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./diagrams/pie/styles */ \"./src/diagrams/pie/styles.js\");\n/* harmony import */ var _diagrams_requirement_styles__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./diagrams/requirement/styles */ \"./src/diagrams/requirement/styles.js\");\n/* harmony import */ var _diagrams_sequence_styles__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./diagrams/sequence/styles */ \"./src/diagrams/sequence/styles.js\");\n/* harmony import */ var _diagrams_state_styles__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./diagrams/state/styles */ \"./src/diagrams/state/styles.js\");\n/* harmony import */ var _diagrams_user_journey_styles__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./diagrams/user-journey/styles */ \"./src/diagrams/user-journey/styles.js\");\n\n\n\n\n\n\n\n\n\n\n\nvar themes = {\n  flowchart: _diagrams_flowchart_styles__WEBPACK_IMPORTED_MODULE_2__[\"default\"],\n  'flowchart-v2': _diagrams_flowchart_styles__WEBPACK_IMPORTED_MODULE_2__[\"default\"],\n  sequence: _diagrams_sequence_styles__WEBPACK_IMPORTED_MODULE_8__[\"default\"],\n  gantt: _diagrams_gantt_styles__WEBPACK_IMPORTED_MODULE_3__[\"default\"],\n  classDiagram: _diagrams_class_styles__WEBPACK_IMPORTED_MODULE_0__[\"default\"],\n  'classDiagram-v2': _diagrams_class_styles__WEBPACK_IMPORTED_MODULE_0__[\"default\"],\n  class: _diagrams_class_styles__WEBPACK_IMPORTED_MODULE_0__[\"default\"],\n  stateDiagram: _diagrams_state_styles__WEBPACK_IMPORTED_MODULE_9__[\"default\"],\n  state: _diagrams_state_styles__WEBPACK_IMPORTED_MODULE_9__[\"default\"],\n  git: _diagrams_git_styles__WEBPACK_IMPORTED_MODULE_4__[\"default\"],\n  info: _diagrams_info_styles__WEBPACK_IMPORTED_MODULE_5__[\"default\"],\n  pie: _diagrams_pie_styles__WEBPACK_IMPORTED_MODULE_6__[\"default\"],\n  er: _diagrams_er_styles__WEBPACK_IMPORTED_MODULE_1__[\"default\"],\n  journey: _diagrams_user_journey_styles__WEBPACK_IMPORTED_MODULE_10__[\"default\"],\n  requirement: _diagrams_requirement_styles__WEBPACK_IMPORTED_MODULE_7__[\"default\"]\n};\nvar calcThemeVariables = function calcThemeVariables(theme, userOverRides) {\n  return theme.calcColors(userOverRides);\n};\n\nvar getStyles = function getStyles(type, userStyles, options) {\n  //console.warn('options in styles: ', options);\n  return \" {\\n    font-family: \".concat(options.fontFamily, \";\\n    font-size: \").concat(options.fontSize, \";\\n    fill: \").concat(options.textColor, \"\\n  }\\n\\n  /* Classes common for multiple diagrams */\\n\\n  .error-icon {\\n    fill: \").concat(options.errorBkgColor, \";\\n  }\\n  .error-text {\\n    fill: \").concat(options.errorTextColor, \";\\n    stroke: \").concat(options.errorTextColor, \";\\n  }\\n\\n  .edge-thickness-normal {\\n    stroke-width: 2px;\\n  }\\n  .edge-thickness-thick {\\n    stroke-width: 3.5px\\n  }\\n  .edge-pattern-solid {\\n    stroke-dasharray: 0;\\n  }\\n\\n  .edge-pattern-dashed{\\n    stroke-dasharray: 3;\\n  }\\n  .edge-pattern-dotted {\\n    stroke-dasharray: 2;\\n  }\\n\\n  .marker {\\n    fill: \").concat(options.lineColor, \";\\n    stroke: \").concat(options.lineColor, \";\\n  }\\n  .marker.cross {\\n    stroke: \").concat(options.lineColor, \";\\n  }\\n\\n  svg {\\n    font-family: \").concat(options.fontFamily, \";\\n    font-size: \").concat(options.fontSize, \";\\n  }\\n\\n  \").concat(themes[type](options), \"\\n\\n  \").concat(userStyles, \"\\n\");\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (getStyles);\n\n/***/ }),\n\n/***/ \"./src/themes/index.js\":\n/*!*****************************!*\\\n  !*** ./src/themes/index.js ***!\n  \\*****************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _theme_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./theme-base */ \"./src/themes/theme-base.js\");\n/* harmony import */ var _theme_dark__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./theme-dark */ \"./src/themes/theme-dark.js\");\n/* harmony import */ var _theme_default__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./theme-default */ \"./src/themes/theme-default.js\");\n/* harmony import */ var _theme_forest__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./theme-forest */ \"./src/themes/theme-forest.js\");\n/* harmony import */ var _theme_neutral__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./theme-neutral */ \"./src/themes/theme-neutral.js\");\n\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n  base: {\n    getThemeVariables: _theme_base__WEBPACK_IMPORTED_MODULE_0__[\"getThemeVariables\"]\n  },\n  dark: {\n    getThemeVariables: _theme_dark__WEBPACK_IMPORTED_MODULE_1__[\"getThemeVariables\"]\n  },\n  default: {\n    getThemeVariables: _theme_default__WEBPACK_IMPORTED_MODULE_2__[\"getThemeVariables\"]\n  },\n  forest: {\n    getThemeVariables: _theme_forest__WEBPACK_IMPORTED_MODULE_3__[\"getThemeVariables\"]\n  },\n  neutral: {\n    getThemeVariables: _theme_neutral__WEBPACK_IMPORTED_MODULE_4__[\"getThemeVariables\"]\n  }\n});\n\n/***/ }),\n\n/***/ \"./src/themes/theme-base.js\":\n/*!**********************************!*\\\n  !*** ./src/themes/theme-base.js ***!\n  \\**********************************/\n/*! exports provided: getThemeVariables */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getThemeVariables\", function() { return getThemeVariables; });\n/* harmony import */ var khroma__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! khroma */ \"./node_modules/khroma/dist/index.js\");\n/* harmony import */ var khroma__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(khroma__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _theme_helpers__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./theme-helpers */ \"./src/themes/theme-helpers.js\");\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\n\n\n\nvar Theme = /*#__PURE__*/function () {\n  function Theme() {\n    _classCallCheck(this, Theme);\n\n    /** # Base variables */\n\n    /** * background - used to know what the background color is of the diagram. This is used for deducing colors for istance line color. Defaulr value is #f4f4f4. */\n    this.background = '#f4f4f4';\n    this.darkMode = false; // this.background = '#0c0c0c';\n    // this.darkMode = true;\n\n    this.primaryColor = '#fff4dd'; // this.background = '#0c0c0c';\n    // this.primaryColor = '#1f1f00';\n\n    this.noteBkgColor = '#fff5ad';\n    this.noteTextColor = '#333'; // dark\n    // this.primaryColor = '#034694';\n    // this.primaryColor = '#f2ee7e';\n    // this.primaryColor = '#9f33be';\n    // this.primaryColor = '#f0fff0';\n    // this.primaryColor = '#fa255e';\n    // this.primaryColor = '#ECECFF';\n    // this.secondaryColor = '#c39ea0';\n    // this.tertiaryColor = '#f8e5e5';\n    // this.secondaryColor = '#dfdfde';\n    // this.tertiaryColor = '#CCCCFF';\n\n    this.fontFamily = '\"trebuchet ms\", verdana, arial, sans-serif';\n    this.fontSize = '16px'; // this.updateColors();\n  }\n\n  _createClass(Theme, [{\n    key: \"updateColors\",\n    value: function updateColors() {\n      // The || is to make sure that if the variable has been defiend by a user override that value is to be used\n\n      /* Main */\n      this.primaryTextColor = this.primaryTextColor || (this.darkMode ? '#ddd' : '#333'); // invert(this.primaryColor);\n\n      this.secondaryColor = this.secondaryColor || Object(khroma__WEBPACK_IMPORTED_MODULE_0__[\"adjust\"])(this.primaryColor, {\n        h: -120\n      });\n      this.tertiaryColor = this.tertiaryColor || Object(khroma__WEBPACK_IMPORTED_MODULE_0__[\"adjust\"])(this.primaryColor, {\n        h: 180,\n        l: 5\n      });\n      this.primaryBorderColor = this.primaryBorderColor || Object(_theme_helpers__WEBPACK_IMPORTED_MODULE_1__[\"mkBorder\"])(this.primaryColor, this.darkMode);\n      this.secondaryBorderColor = this.secondaryBorderColor || Object(_theme_helpers__WEBPACK_IMPORTED_MODULE_1__[\"mkBorder\"])(this.secondaryColor, this.darkMode);\n      this.tertiaryBorderColor = this.tertiaryBorderColor || Object(_theme_helpers__WEBPACK_IMPORTED_MODULE_1__[\"mkBorder\"])(this.tertiaryColor, this.darkMode);\n      this.noteBorderColor = this.noteBorderColor || Object(_theme_helpers__WEBPACK_IMPORTED_MODULE_1__[\"mkBorder\"])(this.noteBkgColor, this.darkMode);\n      this.noteBkgColor = this.noteBkgColor || '#fff5ad';\n      this.noteTextColor = this.noteTextColor || '#333';\n      this.secondaryTextColor = this.secondaryTextColor || Object(khroma__WEBPACK_IMPORTED_MODULE_0__[\"invert\"])(this.secondaryColor);\n      this.tertiaryTextColor = this.tertiaryTextColor || Object(khroma__WEBPACK_IMPORTED_MODULE_0__[\"invert\"])(this.tertiaryColor);\n      this.lineColor = this.lineColor || Object(khroma__WEBPACK_IMPORTED_MODULE_0__[\"invert\"])(this.background);\n      this.textColor = this.textColor || this.primaryTextColor;\n      /* Flowchart variables */\n\n      this.nodeBkg = this.nodeBkg || this.primaryColor;\n      this.mainBkg = this.mainBkg || this.primaryColor;\n      this.nodeBorder = this.nodeBorder || this.primaryBorderColor;\n      this.clusterBkg = this.clusterBkg || this.tertiaryColor;\n      this.clusterBorder = this.clusterBorder || this.tertiaryBorderColor;\n      this.defaultLinkColor = this.defaultLinkColor || this.lineColor;\n      this.titleColor = this.titleColor || this.tertiaryTextColor;\n      this.edgeLabelBackground = this.edgeLabelBackground || (this.darkMode ? Object(khroma__WEBPACK_IMPORTED_MODULE_0__[\"darken\"])(this.secondaryColor, 30) : this.secondaryColor);\n      this.nodeTextColor = this.nodeTextColor || this.primaryTextColor;\n      /* Sequence Diagram variables */\n      // this.actorBorder = lighten(this.border1, 0.5);\n\n      this.actorBorder = this.actorBorder || this.primaryBorderColor;\n      this.actorBkg = this.actorBkg || this.mainBkg;\n      this.actorTextColor = this.actorTextColor || this.primaryTextColor;\n      this.actorLineColor = this.actorLineColor || 'grey';\n      this.labelBoxBkgColor = this.labelBoxBkgColor || this.actorBkg;\n      this.signalColor = this.signalColor || this.textColor;\n      this.signalTextColor = this.signalTextColor || this.textColor;\n      this.labelBoxBorderColor = this.labelBoxBorderColor || this.actorBorder;\n      this.labelTextColor = this.labelTextColor || this.actorTextColor;\n      this.loopTextColor = this.loopTextColor || this.actorTextColor;\n      this.activationBorderColor = this.activationBorderColor || Object(khroma__WEBPACK_IMPORTED_MODULE_0__[\"darken\"])(this.secondaryColor, 10);\n      this.activationBkgColor = this.activationBkgColor || this.secondaryColor;\n      this.sequenceNumberColor = this.sequenceNumberColor || Object(khroma__WEBPACK_IMPORTED_MODULE_0__[\"invert\"])(this.lineColor);\n      /* Gantt chart variables */\n\n      this.sectionBkgColor = this.sectionBkgColor || this.tertiaryColor;\n      this.altSectionBkgColor = this.altSectionBkgColor || 'white';\n      this.sectionBkgColor = this.sectionBkgColor || this.secondaryColor;\n      this.sectionBkgColor2 = this.sectionBkgColor2 || this.primaryColor;\n      this.taskBorderColor = this.taskBorderColor || this.primaryBorderColor;\n      this.taskBkgColor = this.taskBkgColor || this.primaryColor;\n      this.activeTaskBorderColor = this.activeTaskBorderColor || this.primaryColor;\n      this.activeTaskBkgColor = this.activeTaskBkgColor || Object(khroma__WEBPACK_IMPORTED_MODULE_0__[\"lighten\"])(this.primaryColor, 23);\n      this.gridColor = this.gridColor || 'lightgrey';\n      this.doneTaskBkgColor = this.doneTaskBkgColor || 'lightgrey';\n      this.doneTaskBorderColor = this.doneTaskBorderColor || 'grey';\n      this.critBorderColor = this.critBorderColor || '#ff8888';\n      this.critBkgColor = this.critBkgColor || 'red';\n      this.todayLineColor = this.todayLineColor || 'red';\n      this.taskTextColor = this.taskTextColor || this.textColor;\n      this.taskTextOutsideColor = this.taskTextOutsideColor || this.textColor;\n      this.taskTextLightColor = this.taskTextLightColor || this.textColor;\n      this.taskTextColor = this.taskTextColor || this.primaryTextColor;\n      this.taskTextDarkColor = this.taskTextDarkColor || this.textColor;\n      this.taskTextClickableColor = this.taskTextClickableColor || '#003163';\n      /* state colors */\n\n      this.transitionColor = this.transitionColor || this.lineColor;\n      this.transitionLabelColor = this.transitionLabelColor || this.textColor;\n      /* The color of the text tables of the tstates*/\n\n      this.stateLabelColor = this.stateLabelColor || this.stateBkg || this.primaryTextColor;\n      this.stateBkg = this.stateBkg || this.mainBkg;\n      this.labelBackgroundColor = this.labelBackgroundColor || this.stateBkg;\n      this.compositeBackground = this.compositeBackground || this.background || this.tertiaryColor;\n      this.altBackground = this.altBackground || this.tertiaryColor;\n      this.compositeTitleBackground = this.compositeTitleBackground || this.mainBkg;\n      this.compositeBorder = this.compositeBorder || this.nodeBorder;\n      this.innerEndBackground = this.nodeBorder;\n      this.errorBkgColor = this.errorBkgColor || this.tertiaryColor;\n      this.errorTextColor = this.errorTextColor || this.tertiaryTextColor;\n      this.transitionColor = this.transitionColor || this.lineColor;\n      this.specialStateColor = this.lineColor;\n      /* class */\n\n      this.classText = this.classText || this.textColor;\n      /* user-journey */\n\n      this.fillType0 = this.fillType0 || this.primaryColor;\n      this.fillType1 = this.fillType1 || this.secondaryColor;\n      this.fillType2 = this.fillType2 || Object(khroma__WEBPACK_IMPORTED_MODULE_0__[\"adjust\"])(this.primaryColor, {\n        h: 64\n      });\n      this.fillType3 = this.fillType3 || Object(khroma__WEBPACK_IMPORTED_MODULE_0__[\"adjust\"])(this.secondaryColor, {\n        h: 64\n      });\n      this.fillType4 = this.fillType4 || Object(khroma__WEBPACK_IMPORTED_MODULE_0__[\"adjust\"])(this.primaryColor, {\n        h: -64\n      });\n      this.fillType5 = this.fillType5 || Object(khroma__WEBPACK_IMPORTED_MODULE_0__[\"adjust\"])(this.secondaryColor, {\n        h: -64\n      });\n      this.fillType6 = this.fillType6 || Object(khroma__WEBPACK_IMPORTED_MODULE_0__[\"adjust\"])(this.primaryColor, {\n        h: 128\n      });\n      this.fillType7 = this.fillType7 || Object(khroma__WEBPACK_IMPORTED_MODULE_0__[\"adjust\"])(this.secondaryColor, {\n        h: 128\n      });\n      /* pie */\n\n      this.pie1 = this.pie1 || this.primaryColor;\n      this.pie2 = this.pie2 || this.secondaryColor;\n      this.pie3 = this.pie3 || this.tertiaryColor;\n      this.pie4 = this.pie4 || Object(khroma__WEBPACK_IMPORTED_MODULE_0__[\"adjust\"])(this.primaryColor, {\n        l: -10\n      });\n      this.pie5 = this.pie5 || Object(khroma__WEBPACK_IMPORTED_MODULE_0__[\"adjust\"])(this.secondaryColor, {\n        l: -10\n      });\n      this.pie6 = this.pie6 || Object(khroma__WEBPACK_IMPORTED_MODULE_0__[\"adjust\"])(this.tertiaryColor, {\n        l: -10\n      });\n      this.pie7 = this.pie7 || Object(khroma__WEBPACK_IMPORTED_MODULE_0__[\"adjust\"])(this.primaryColor, {\n        h: +60,\n        l: -10\n      });\n      this.pie8 = this.pie8 || Object(khroma__WEBPACK_IMPORTED_MODULE_0__[\"adjust\"])(this.primaryColor, {\n        h: -60,\n        l: -10\n      });\n      this.pie9 = this.pie9 || Object(khroma__WEBPACK_IMPORTED_MODULE_0__[\"adjust\"])(this.primaryColor, {\n        h: 120,\n        l: 0\n      });\n      this.pie10 = this.pie10 || Object(khroma__WEBPACK_IMPORTED_MODULE_0__[\"adjust\"])(this.primaryColor, {\n        h: +60,\n        l: -20\n      });\n      this.pie11 = this.pie11 || Object(khroma__WEBPACK_IMPORTED_MODULE_0__[\"adjust\"])(this.primaryColor, {\n        h: -60,\n        l: -20\n      });\n      this.pie12 = this.pie12 || Object(khroma__WEBPACK_IMPORTED_MODULE_0__[\"adjust\"])(this.primaryColor, {\n        h: 120,\n        l: -10\n      });\n      this.pieTitleTextSize = this.pieTitleTextSize || '25px';\n      this.pieTitleTextColor = this.pieTitleTextColor || this.taskTextDarkColor;\n      this.pieSectionTextSize = this.pieSectionTextSize || '17px';\n      this.pieSectionTextColor = this.pieSectionTextColor || this.textColor;\n      this.pieLegendTextSize = this.pieLegendTextSize || '17px';\n      this.pieLegendTextColor = this.pieLegendTextColor || this.taskTextDarkColor;\n      this.pieStrokeColor = this.pieStrokeColor || 'black';\n      this.pieStrokeWidth = this.pieStrokeWidth || '2px';\n      this.pieOpacity = this.pieOpacity || '0.7';\n      /* requirement-diagram */\n\n      this.requirementBackground = this.requirementBackground || this.primaryColor;\n      this.requirementBorderColor = this.requirementBorderColor || this.primaryBorderColor;\n      this.requirementBorderSize = this.requirementBorderSize || this.primaryBorderColor;\n      this.requirementTextColor = this.requirementTextColor || this.primaryTextColor;\n      this.relationColor = this.relationColor || this.lineColor;\n      this.relationLabelBackground = this.relationLabelBackground || (this.darkMode ? Object(khroma__WEBPACK_IMPORTED_MODULE_0__[\"darken\"])(this.secondaryColor, 30) : this.secondaryColor);\n      this.relationLabelColor = this.relationLabelColor || this.actorTextColor;\n    }\n  }, {\n    key: \"calculate\",\n    value: function calculate(overrides) {\n      var _this = this;\n\n      if (_typeof(overrides) !== 'object') {\n        // Calculate colors form base colors\n        this.updateColors();\n        return;\n      }\n\n      var keys = Object.keys(overrides); // Copy values from overrides, this is mainly for base colors\n\n      keys.forEach(function (k) {\n        _this[k] = overrides[k];\n      }); // Calculate colors form base colors\n\n      this.updateColors(); // Copy values from overrides again in case of an override of derived value\n\n      keys.forEach(function (k) {\n        _this[k] = overrides[k];\n      });\n    }\n  }]);\n\n  return Theme;\n}();\n\nvar getThemeVariables = function getThemeVariables(userOverrides) {\n  var theme = new Theme();\n  theme.calculate(userOverrides);\n  return theme;\n};\n\n/***/ }),\n\n/***/ \"./src/themes/theme-dark.js\":\n/*!**********************************!*\\\n  !*** ./src/themes/theme-dark.js ***!\n  \\**********************************/\n/*! exports provided: getThemeVariables */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getThemeVariables\", function() { return getThemeVariables; });\n/* harmony import */ var khroma__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! khroma */ \"./node_modules/khroma/dist/index.js\");\n/* harmony import */ var khroma__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(khroma__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _theme_helpers__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./theme-helpers */ \"./src/themes/theme-helpers.js\");\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\n\n\n\nvar Theme = /*#__PURE__*/function () {\n  function Theme() {\n    _classCallCheck(this, Theme);\n\n    this.background = '#333';\n    this.primaryColor = '#1f2020';\n    this.secondaryColor = Object(khroma__WEBPACK_IMPORTED_MODULE_0__[\"lighten\"])(this.primaryColor, 16);\n    this.tertiaryColor = Object(khroma__WEBPACK_IMPORTED_MODULE_0__[\"adjust\"])(this.primaryColor, {\n      h: -160\n    });\n    this.primaryBorderColor = Object(_theme_helpers__WEBPACK_IMPORTED_MODULE_1__[\"mkBorder\"])(this.primaryColor, this.darkMode);\n    this.secondaryBorderColor = Object(_theme_helpers__WEBPACK_IMPORTED_MODULE_1__[\"mkBorder\"])(this.secondaryColor, this.darkMode);\n    this.tertiaryBorderColor = Object(_theme_helpers__WEBPACK_IMPORTED_MODULE_1__[\"mkBorder\"])(this.tertiaryColor, this.darkMode);\n    this.primaryTextColor = Object(khroma__WEBPACK_IMPORTED_MODULE_0__[\"invert\"])(this.primaryColor);\n    this.secondaryTextColor = Object(khroma__WEBPACK_IMPORTED_MODULE_0__[\"invert\"])(this.secondaryColor);\n    this.tertiaryTextColor = Object(khroma__WEBPACK_IMPORTED_MODULE_0__[\"invert\"])(this.tertiaryColor);\n    this.lineColor = Object(khroma__WEBPACK_IMPORTED_MODULE_0__[\"invert\"])(this.background);\n    this.textColor = Object(khroma__WEBPACK_IMPORTED_MODULE_0__[\"invert\"])(this.background);\n    this.mainBkg = '#1f2020';\n    this.secondBkg = 'calculated';\n    this.mainContrastColor = 'lightgrey';\n    this.darkTextColor = Object(khroma__WEBPACK_IMPORTED_MODULE_0__[\"lighten\"])(Object(khroma__WEBPACK_IMPORTED_MODULE_0__[\"invert\"])('#323D47'), 10);\n    this.lineColor = 'calculated';\n    this.border1 = '#81B1DB';\n    this.border2 = Object(khroma__WEBPACK_IMPORTED_MODULE_0__[\"rgba\"])(255, 255, 255, 0.25);\n    this.arrowheadColor = 'calculated';\n    this.fontFamily = '\"trebuchet ms\", verdana, arial, sans-serif';\n    this.fontSize = '16px';\n    this.labelBackground = '#181818';\n    this.textColor = '#ccc';\n    /* Flowchart variables */\n\n    this.nodeBkg = 'calculated';\n    this.nodeBorder = 'calculated';\n    this.clusterBkg = 'calculated';\n    this.clusterBorder = 'calculated';\n    this.defaultLinkColor = 'calculated';\n    this.titleColor = '#F9FFFE';\n    this.edgeLabelBackground = 'calculated';\n    /* Sequence Diagram variables */\n\n    this.actorBorder = 'calculated';\n    this.actorBkg = 'calculated';\n    this.actorTextColor = 'calculated';\n    this.actorLineColor = 'calculated';\n    this.signalColor = 'calculated';\n    this.signalTextColor = 'calculated';\n    this.labelBoxBkgColor = 'calculated';\n    this.labelBoxBorderColor = 'calculated';\n    this.labelTextColor = 'calculated';\n    this.loopTextColor = 'calculated';\n    this.noteBorderColor = 'calculated';\n    this.noteBkgColor = '#fff5ad';\n    this.noteTextColor = 'calculated';\n    this.activationBorderColor = 'calculated';\n    this.activationBkgColor = 'calculated';\n    this.sequenceNumberColor = 'black';\n    /* Gantt chart variables */\n\n    this.sectionBkgColor = Object(khroma__WEBPACK_IMPORTED_MODULE_0__[\"darken\"])('#EAE8D9', 30);\n    this.altSectionBkgColor = 'calculated';\n    this.sectionBkgColor2 = '#EAE8D9';\n    this.taskBorderColor = Object(khroma__WEBPACK_IMPORTED_MODULE_0__[\"rgba\"])(255, 255, 255, 70);\n    this.taskBkgColor = 'calculated';\n    this.taskTextColor = 'calculated';\n    this.taskTextLightColor = 'calculated';\n    this.taskTextOutsideColor = 'calculated';\n    this.taskTextClickableColor = '#003163';\n    this.activeTaskBorderColor = Object(khroma__WEBPACK_IMPORTED_MODULE_0__[\"rgba\"])(255, 255, 255, 50);\n    this.activeTaskBkgColor = '#81B1DB';\n    this.gridColor = 'calculated';\n    this.doneTaskBkgColor = 'calculated';\n    this.doneTaskBorderColor = 'grey';\n    this.critBorderColor = '#E83737';\n    this.critBkgColor = '#E83737';\n    this.taskTextDarkColor = 'calculated';\n    this.todayLineColor = '#DB5757';\n    /* state colors */\n\n    this.labelColor = 'calculated';\n    this.errorBkgColor = '#a44141';\n    this.errorTextColor = '#ddd';\n  }\n\n  _createClass(Theme, [{\n    key: \"updateColors\",\n    value: function updateColors() {\n      this.secondBkg = Object(khroma__WEBPACK_IMPORTED_MODULE_0__[\"lighten\"])(this.mainBkg, 16);\n      this.lineColor = this.mainContrastColor;\n      this.arrowheadColor = this.mainContrastColor;\n      /* Flowchart variables */\n\n      this.nodeBkg = this.mainBkg;\n      this.nodeBorder = this.border1;\n      this.clusterBkg = this.secondBkg;\n      this.clusterBorder = this.border2;\n      this.defaultLinkColor = this.lineColor;\n      this.edgeLabelBackground = Object(khroma__WEBPACK_IMPORTED_MODULE_0__[\"lighten\"])(this.labelBackground, 25);\n      /* Sequence Diagram variables */\n\n      this.actorBorder = this.border1;\n      this.actorBkg = this.mainBkg;\n      this.actorTextColor = this.mainContrastColor;\n      this.actorLineColor = this.mainContrastColor;\n      this.signalColor = this.mainContrastColor;\n      this.signalTextColor = this.mainContrastColor;\n      this.labelBoxBkgColor = this.actorBkg;\n      this.labelBoxBorderColor = this.actorBorder;\n      this.labelTextColor = this.mainContrastColor;\n      this.loopTextColor = this.mainContrastColor;\n      this.noteBorderColor = this.secondaryBorderColor;\n      this.noteBkgColor = this.secondBkg;\n      this.noteTextColor = this.secondaryTextColor;\n      this.activationBorderColor = this.border1;\n      this.activationBkgColor = this.secondBkg;\n      /* Gantt chart variables */\n\n      this.altSectionBkgColor = this.background;\n      this.taskBkgColor = Object(khroma__WEBPACK_IMPORTED_MODULE_0__[\"lighten\"])(this.mainBkg, 23);\n      this.taskTextColor = this.darkTextColor;\n      this.taskTextLightColor = this.mainContrastColor;\n      this.taskTextOutsideColor = this.taskTextLightColor;\n      this.gridColor = this.mainContrastColor;\n      this.doneTaskBkgColor = this.mainContrastColor;\n      this.taskTextDarkColor = this.darkTextColor;\n      /* state colors */\n\n      this.transitionColor = this.transitionColor || this.lineColor;\n      this.transitionLabelColor = this.transitionLabelColor || this.textColor;\n      this.stateLabelColor = this.stateLabelColor || this.stateBkg || this.primaryTextColor;\n      this.stateBkg = this.stateBkg || this.mainBkg;\n      this.labelBackgroundColor = this.labelBackgroundColor || this.stateBkg;\n      this.compositeBackground = this.compositeBackground || this.background || this.tertiaryColor;\n      this.altBackground = this.altBackground || '#555';\n      this.compositeTitleBackground = this.compositeTitleBackground || this.mainBkg;\n      this.compositeBorder = this.compositeBorder || this.nodeBorder;\n      this.innerEndBackground = this.primaryBorderColor;\n      this.specialStateColor = '#f4f4f4'; // this.lineColor;\n\n      this.errorBkgColor = this.errorBkgColor || this.tertiaryColor;\n      this.errorTextColor = this.errorTextColor || this.tertiaryTextColor;\n      this.fillType0 = this.primaryColor;\n      this.fillType1 = this.secondaryColor;\n      this.fillType2 = Object(khroma__WEBPACK_IMPORTED_MODULE_0__[\"adjust\"])(this.primaryColor, {\n        h: 64\n      });\n      this.fillType3 = Object(khroma__WEBPACK_IMPORTED_MODULE_0__[\"adjust\"])(this.secondaryColor, {\n        h: 64\n      });\n      this.fillType4 = Object(khroma__WEBPACK_IMPORTED_MODULE_0__[\"adjust\"])(this.primaryColor, {\n        h: -64\n      });\n      this.fillType5 = Object(khroma__WEBPACK_IMPORTED_MODULE_0__[\"adjust\"])(this.secondaryColor, {\n        h: -64\n      });\n      this.fillType6 = Object(khroma__WEBPACK_IMPORTED_MODULE_0__[\"adjust\"])(this.primaryColor, {\n        h: 128\n      });\n      this.fillType7 = Object(khroma__WEBPACK_IMPORTED_MODULE_0__[\"adjust\"])(this.secondaryColor, {\n        h: 128\n      });\n      /* pie */\n\n      this.pie1 = this.pie1 || '#0b0000';\n      this.pie2 = this.pie2 || '#4d1037';\n      this.pie3 = this.pie3 || '#3f5258';\n      this.pie4 = this.pie4 || '#4f2f1b';\n      this.pie5 = this.pie5 || '#6e0a0a';\n      this.pie6 = this.pie6 || '#3b0048';\n      this.pie7 = this.pie7 || '#995a01';\n      this.pie8 = this.pie8 || '#154706';\n      this.pie9 = this.pie9 || '#161722';\n      this.pie10 = this.pie10 || '#00296f';\n      this.pie11 = this.pie11 || '#01629c';\n      this.pie12 = this.pie12 || '#010029';\n      this.pieTitleTextSize = this.pieTitleTextSize || '25px';\n      this.pieTitleTextColor = this.pieTitleTextColor || this.taskTextDarkColor;\n      this.pieSectionTextSize = this.pieSectionTextSize || '17px';\n      this.pieSectionTextColor = this.pieSectionTextColor || this.textColor;\n      this.pieLegendTextSize = this.pieLegendTextSize || '17px';\n      this.pieLegendTextColor = this.pieLegendTextColor || this.taskTextDarkColor;\n      this.pieStrokeColor = this.pieStrokeColor || 'black';\n      this.pieStrokeWidth = this.pieStrokeWidth || '2px';\n      this.pieOpacity = this.pieOpacity || '0.7';\n      /* class */\n\n      this.classText = this.primaryTextColor;\n      /* requirement-diagram */\n\n      this.requirementBackground = this.requirementBackground || this.primaryColor;\n      this.requirementBorderColor = this.requirementBorderColor || this.primaryBorderColor;\n      this.requirementBorderSize = this.requirementBorderSize || this.primaryBorderColor;\n      this.requirementTextColor = this.requirementTextColor || this.primaryTextColor;\n      this.relationColor = this.relationColor || this.lineColor;\n      this.relationLabelBackground = this.relationLabelBackground || (this.darkMode ? Object(khroma__WEBPACK_IMPORTED_MODULE_0__[\"darken\"])(this.secondaryColor, 30) : this.secondaryColor);\n      this.relationLabelColor = this.relationLabelColor || this.actorTextColor;\n    }\n  }, {\n    key: \"calculate\",\n    value: function calculate(overrides) {\n      var _this = this;\n\n      if (_typeof(overrides) !== 'object') {\n        // Calculate colors form base colors\n        this.updateColors();\n        return;\n      }\n\n      var keys = Object.keys(overrides); // Copy values from overrides, this is mainly for base colors\n\n      keys.forEach(function (k) {\n        _this[k] = overrides[k];\n      }); // Calculate colors form base colors\n\n      this.updateColors(); // Copy values from overrides again in case of an override of derived value\n\n      keys.forEach(function (k) {\n        _this[k] = overrides[k];\n      });\n    }\n  }]);\n\n  return Theme;\n}();\n\nvar getThemeVariables = function getThemeVariables(userOverrides) {\n  var theme = new Theme();\n  theme.calculate(userOverrides);\n  return theme;\n};\n\n/***/ }),\n\n/***/ \"./src/themes/theme-default.js\":\n/*!*************************************!*\\\n  !*** ./src/themes/theme-default.js ***!\n  \\*************************************/\n/*! exports provided: getThemeVariables */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getThemeVariables\", function() { return getThemeVariables; });\n/* harmony import */ var khroma__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! khroma */ \"./node_modules/khroma/dist/index.js\");\n/* harmony import */ var khroma__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(khroma__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _theme_helpers__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./theme-helpers */ \"./src/themes/theme-helpers.js\");\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\n\n\n\nvar Theme = /*#__PURE__*/function () {\n  function Theme() {\n    _classCallCheck(this, Theme);\n\n    /* Base variables */\n    this.background = '#f4f4f4';\n    this.primaryColor = '#ECECFF';\n    this.secondaryColor = Object(khroma__WEBPACK_IMPORTED_MODULE_0__[\"adjust\"])(this.primaryColor, {\n      h: 120\n    });\n    this.secondaryColor = '#ffffde';\n    this.tertiaryColor = Object(khroma__WEBPACK_IMPORTED_MODULE_0__[\"adjust\"])(this.primaryColor, {\n      h: -160\n    });\n    this.primaryBorderColor = Object(_theme_helpers__WEBPACK_IMPORTED_MODULE_1__[\"mkBorder\"])(this.primaryColor, this.darkMode);\n    this.secondaryBorderColor = Object(_theme_helpers__WEBPACK_IMPORTED_MODULE_1__[\"mkBorder\"])(this.secondaryColor, this.darkMode);\n    this.tertiaryBorderColor = Object(_theme_helpers__WEBPACK_IMPORTED_MODULE_1__[\"mkBorder\"])(this.tertiaryColor, this.darkMode); // this.noteBorderColor = mkBorder(this.noteBkgColor, this.darkMode);\n\n    this.primaryTextColor = Object(khroma__WEBPACK_IMPORTED_MODULE_0__[\"invert\"])(this.primaryColor);\n    this.secondaryTextColor = Object(khroma__WEBPACK_IMPORTED_MODULE_0__[\"invert\"])(this.secondaryColor);\n    this.tertiaryTextColor = Object(khroma__WEBPACK_IMPORTED_MODULE_0__[\"invert\"])(this.tertiaryColor);\n    this.lineColor = Object(khroma__WEBPACK_IMPORTED_MODULE_0__[\"invert\"])(this.background);\n    this.textColor = Object(khroma__WEBPACK_IMPORTED_MODULE_0__[\"invert\"])(this.background);\n    this.background = 'white';\n    this.mainBkg = '#ECECFF';\n    this.secondBkg = '#ffffde';\n    this.lineColor = '#333333';\n    this.border1 = '#9370DB';\n    this.border2 = '#aaaa33';\n    this.arrowheadColor = '#333333';\n    this.fontFamily = '\"trebuchet ms\", verdana, arial, sans-serif';\n    this.fontSize = '16px';\n    this.labelBackground = '#e8e8e8';\n    this.textColor = '#333';\n    /* Flowchart variables */\n\n    this.nodeBkg = 'calculated';\n    this.nodeBorder = 'calculated';\n    this.clusterBkg = 'calculated';\n    this.clusterBorder = 'calculated';\n    this.defaultLinkColor = 'calculated';\n    this.titleColor = 'calculated';\n    this.edgeLabelBackground = 'calculated';\n    /* Sequence Diagram variables */\n\n    this.actorBorder = 'calculated';\n    this.actorBkg = 'calculated';\n    this.actorTextColor = 'black';\n    this.actorLineColor = 'grey';\n    this.signalColor = 'calculated';\n    this.signalTextColor = 'calculated';\n    this.labelBoxBkgColor = 'calculated';\n    this.labelBoxBorderColor = 'calculated';\n    this.labelTextColor = 'calculated';\n    this.loopTextColor = 'calculated';\n    this.noteBorderColor = 'calculated';\n    this.noteBkgColor = '#fff5ad';\n    this.noteTextColor = 'calculated';\n    this.activationBorderColor = '#666';\n    this.activationBkgColor = '#f4f4f4';\n    this.sequenceNumberColor = 'white';\n    /* Gantt chart variables */\n\n    this.sectionBkgColor = 'calculated';\n    this.altSectionBkgColor = 'calculated';\n    this.sectionBkgColor2 = 'calculated';\n    this.taskBorderColor = 'calculated';\n    this.taskBkgColor = 'calculated';\n    this.taskTextLightColor = 'calculated';\n    this.taskTextColor = this.taskTextLightColor;\n    this.taskTextDarkColor = 'calculated';\n    this.taskTextOutsideColor = this.taskTextDarkColor;\n    this.taskTextClickableColor = 'calculated';\n    this.activeTaskBorderColor = 'calculated';\n    this.activeTaskBkgColor = 'calculated';\n    this.gridColor = 'calculated';\n    this.doneTaskBkgColor = 'calculated';\n    this.doneTaskBorderColor = 'calculated';\n    this.critBorderColor = 'calculated';\n    this.critBkgColor = 'calculated';\n    this.todayLineColor = 'calculated';\n    this.sectionBkgColor = Object(khroma__WEBPACK_IMPORTED_MODULE_0__[\"rgba\"])(102, 102, 255, 0.49);\n    this.altSectionBkgColor = 'white';\n    this.sectionBkgColor2 = '#fff400';\n    this.taskBorderColor = '#534fbc';\n    this.taskBkgColor = '#8a90dd';\n    this.taskTextLightColor = 'white';\n    this.taskTextColor = 'calculated';\n    this.taskTextDarkColor = 'black';\n    this.taskTextOutsideColor = 'calculated';\n    this.taskTextClickableColor = '#003163';\n    this.activeTaskBorderColor = '#534fbc';\n    this.activeTaskBkgColor = '#bfc7ff';\n    this.gridColor = 'lightgrey';\n    this.doneTaskBkgColor = 'lightgrey';\n    this.doneTaskBorderColor = 'grey';\n    this.critBorderColor = '#ff8888';\n    this.critBkgColor = 'red';\n    this.todayLineColor = 'red';\n    /* state colors */\n\n    this.labelColor = 'black';\n    this.errorBkgColor = '#552222';\n    this.errorTextColor = '#552222';\n    this.updateColors();\n  }\n\n  _createClass(Theme, [{\n    key: \"updateColors\",\n    value: function updateColors() {\n      /* Flowchart variables */\n      this.nodeBkg = this.mainBkg;\n      this.nodeBorder = this.border1; // border 1\n\n      this.clusterBkg = this.secondBkg;\n      this.clusterBorder = this.border2;\n      this.defaultLinkColor = this.lineColor;\n      this.titleColor = this.textColor;\n      this.edgeLabelBackground = this.labelBackground;\n      /* Sequence Diagram variables */\n      // this.actorBorder = lighten(this.border1, 0.5);\n\n      this.actorBorder = Object(khroma__WEBPACK_IMPORTED_MODULE_0__[\"lighten\"])(this.border1, 23);\n      this.actorBkg = this.mainBkg;\n      this.labelBoxBkgColor = this.actorBkg;\n      this.signalColor = this.textColor;\n      this.signalTextColor = this.textColor;\n      this.labelBoxBorderColor = this.actorBorder;\n      this.labelTextColor = this.actorTextColor;\n      this.loopTextColor = this.actorTextColor;\n      this.noteBorderColor = this.border2;\n      this.noteTextColor = this.actorTextColor;\n      /* Gantt chart variables */\n\n      this.taskTextColor = this.taskTextLightColor;\n      this.taskTextOutsideColor = this.taskTextDarkColor;\n      /* state colors */\n\n      this.transitionColor = this.transitionColor || this.lineColor;\n      this.transitionLabelColor = this.transitionLabelColor || this.textColor;\n      this.stateLabelColor = this.stateLabelColor || this.stateBkg || this.primaryTextColor;\n      this.stateBkg = this.stateBkg || this.mainBkg;\n      this.labelBackgroundColor = this.labelBackgroundColor || this.stateBkg;\n      this.compositeBackground = this.compositeBackground || this.background || this.tertiaryColor;\n      this.altBackground = this.altBackground || '#f0f0f0';\n      this.compositeTitleBackground = this.compositeTitleBackground || this.mainBkg;\n      this.compositeBorder = this.compositeBorder || this.nodeBorder;\n      this.innerEndBackground = this.nodeBorder;\n      this.specialStateColor = this.lineColor;\n      this.errorBkgColor = this.errorBkgColor || this.tertiaryColor;\n      this.errorTextColor = this.errorTextColor || this.tertiaryTextColor;\n      this.transitionColor = this.transitionColor || this.lineColor;\n      /* class */\n\n      this.classText = this.primaryTextColor;\n      /* journey */\n\n      this.fillType0 = this.primaryColor;\n      this.fillType1 = this.secondaryColor;\n      this.fillType2 = Object(khroma__WEBPACK_IMPORTED_MODULE_0__[\"adjust\"])(this.primaryColor, {\n        h: 64\n      });\n      this.fillType3 = Object(khroma__WEBPACK_IMPORTED_MODULE_0__[\"adjust\"])(this.secondaryColor, {\n        h: 64\n      });\n      this.fillType4 = Object(khroma__WEBPACK_IMPORTED_MODULE_0__[\"adjust\"])(this.primaryColor, {\n        h: -64\n      });\n      this.fillType5 = Object(khroma__WEBPACK_IMPORTED_MODULE_0__[\"adjust\"])(this.secondaryColor, {\n        h: -64\n      });\n      this.fillType6 = Object(khroma__WEBPACK_IMPORTED_MODULE_0__[\"adjust\"])(this.primaryColor, {\n        h: 128\n      });\n      this.fillType7 = Object(khroma__WEBPACK_IMPORTED_MODULE_0__[\"adjust\"])(this.secondaryColor, {\n        h: 128\n      });\n      /* pie */\n\n      this.pie1 = this.pie1 || this.primaryColor;\n      this.pie2 = this.pie2 || this.secondaryColor;\n      this.pie3 = this.pie3 || Object(khroma__WEBPACK_IMPORTED_MODULE_0__[\"adjust\"])(this.tertiaryColor, {\n        l: -40\n      });\n      this.pie4 = this.pie4 || Object(khroma__WEBPACK_IMPORTED_MODULE_0__[\"adjust\"])(this.primaryColor, {\n        l: -10\n      });\n      this.pie5 = this.pie5 || Object(khroma__WEBPACK_IMPORTED_MODULE_0__[\"adjust\"])(this.secondaryColor, {\n        l: -30\n      });\n      this.pie6 = this.pie6 || Object(khroma__WEBPACK_IMPORTED_MODULE_0__[\"adjust\"])(this.tertiaryColor, {\n        l: -20\n      });\n      this.pie7 = this.pie7 || Object(khroma__WEBPACK_IMPORTED_MODULE_0__[\"adjust\"])(this.primaryColor, {\n        h: +60,\n        l: -20\n      });\n      this.pie8 = this.pie8 || Object(khroma__WEBPACK_IMPORTED_MODULE_0__[\"adjust\"])(this.primaryColor, {\n        h: -60,\n        l: -40\n      });\n      this.pie9 = this.pie9 || Object(khroma__WEBPACK_IMPORTED_MODULE_0__[\"adjust\"])(this.primaryColor, {\n        h: 120,\n        l: -40\n      });\n      this.pie10 = this.pie10 || Object(khroma__WEBPACK_IMPORTED_MODULE_0__[\"adjust\"])(this.primaryColor, {\n        h: +60,\n        l: -40\n      });\n      this.pie11 = this.pie11 || Object(khroma__WEBPACK_IMPORTED_MODULE_0__[\"adjust\"])(this.primaryColor, {\n        h: -90,\n        l: -40\n      });\n      this.pie12 = this.pie12 || Object(khroma__WEBPACK_IMPORTED_MODULE_0__[\"adjust\"])(this.primaryColor, {\n        h: 120,\n        l: -30\n      });\n      this.pieTitleTextSize = this.pieTitleTextSize || '25px';\n      this.pieTitleTextColor = this.pieTitleTextColor || this.taskTextDarkColor;\n      this.pieSectionTextSize = this.pieSectionTextSize || '17px';\n      this.pieSectionTextColor = this.pieSectionTextColor || this.textColor;\n      this.pieLegendTextSize = this.pieLegendTextSize || '17px';\n      this.pieLegendTextColor = this.pieLegendTextColor || this.taskTextDarkColor;\n      this.pieStrokeColor = this.pieStrokeColor || 'black';\n      this.pieStrokeWidth = this.pieStrokeWidth || '2px';\n      this.pieOpacity = this.pieOpacity || '0.7';\n      /* requirement-diagram */\n\n      this.requirementBackground = this.requirementBackground || this.primaryColor;\n      this.requirementBorderColor = this.requirementBorderColor || this.primaryBorderColor;\n      this.requirementBorderSize = this.requirementBorderSize || this.primaryBorderColor;\n      this.requirementTextColor = this.requirementTextColor || this.primaryTextColor;\n      this.relationColor = this.relationColor || this.lineColor;\n      this.relationLabelBackground = this.relationLabelBackground || this.labelBackground;\n      this.relationLabelColor = this.relationLabelColor || this.actorTextColor;\n    }\n  }, {\n    key: \"calculate\",\n    value: function calculate(overrides) {\n      var _this = this;\n\n      if (_typeof(overrides) !== 'object') {\n        // Calculate colors form base colors\n        this.updateColors();\n        return;\n      }\n\n      var keys = Object.keys(overrides); // Copy values from overrides, this is mainly for base colors\n\n      keys.forEach(function (k) {\n        _this[k] = overrides[k];\n      }); // Calculate colors form base colors\n\n      this.updateColors(); // Copy values from overrides again in case of an override of derived value\n\n      keys.forEach(function (k) {\n        _this[k] = overrides[k];\n      });\n    }\n  }]);\n\n  return Theme;\n}();\n\nvar getThemeVariables = function getThemeVariables(userOverrides) {\n  var theme = new Theme();\n  theme.calculate(userOverrides);\n  return theme;\n};\n\n/***/ }),\n\n/***/ \"./src/themes/theme-forest.js\":\n/*!************************************!*\\\n  !*** ./src/themes/theme-forest.js ***!\n  \\************************************/\n/*! exports provided: getThemeVariables */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getThemeVariables\", function() { return getThemeVariables; });\n/* harmony import */ var khroma__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! khroma */ \"./node_modules/khroma/dist/index.js\");\n/* harmony import */ var khroma__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(khroma__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _theme_helpers__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./theme-helpers */ \"./src/themes/theme-helpers.js\");\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\n\n\n\nvar Theme = /*#__PURE__*/function () {\n  function Theme() {\n    _classCallCheck(this, Theme);\n\n    /* Base vales */\n    this.background = '#f4f4f4';\n    this.primaryColor = '#cde498';\n    this.secondaryColor = '#cdffb2';\n    this.background = 'white';\n    this.mainBkg = '#cde498';\n    this.secondBkg = '#cdffb2';\n    this.lineColor = 'green';\n    this.border1 = '#13540c';\n    this.border2 = '#6eaa49';\n    this.arrowheadColor = 'green';\n    this.fontFamily = '\"trebuchet ms\", verdana, arial, sans-serif';\n    this.fontSize = '16px';\n    this.tertiaryColor = Object(khroma__WEBPACK_IMPORTED_MODULE_0__[\"lighten\"])('#cde498', 10);\n    this.primaryBorderColor = Object(_theme_helpers__WEBPACK_IMPORTED_MODULE_1__[\"mkBorder\"])(this.primaryColor, this.darkMode);\n    this.secondaryBorderColor = Object(_theme_helpers__WEBPACK_IMPORTED_MODULE_1__[\"mkBorder\"])(this.secondaryColor, this.darkMode);\n    this.tertiaryBorderColor = Object(_theme_helpers__WEBPACK_IMPORTED_MODULE_1__[\"mkBorder\"])(this.tertiaryColor, this.darkMode);\n    this.primaryTextColor = Object(khroma__WEBPACK_IMPORTED_MODULE_0__[\"invert\"])(this.primaryColor);\n    this.secondaryTextColor = Object(khroma__WEBPACK_IMPORTED_MODULE_0__[\"invert\"])(this.secondaryColor);\n    this.tertiaryTextColor = Object(khroma__WEBPACK_IMPORTED_MODULE_0__[\"invert\"])(this.primaryColor);\n    this.lineColor = Object(khroma__WEBPACK_IMPORTED_MODULE_0__[\"invert\"])(this.background);\n    this.textColor = Object(khroma__WEBPACK_IMPORTED_MODULE_0__[\"invert\"])(this.background);\n    /* Flowchart variables */\n\n    this.nodeBkg = 'calculated';\n    this.nodeBorder = 'calculated';\n    this.clusterBkg = 'calculated';\n    this.clusterBorder = 'calculated';\n    this.defaultLinkColor = 'calculated';\n    this.titleColor = '#333';\n    this.edgeLabelBackground = '#e8e8e8';\n    /* Sequence Diagram variables */\n\n    this.actorBorder = 'calculated';\n    this.actorBkg = 'calculated';\n    this.actorTextColor = 'black';\n    this.actorLineColor = 'grey';\n    this.signalColor = '#333';\n    this.signalTextColor = '#333';\n    this.labelBoxBkgColor = 'calculated';\n    this.labelBoxBorderColor = '#326932';\n    this.labelTextColor = 'calculated';\n    this.loopTextColor = 'calculated';\n    this.noteBorderColor = 'calculated';\n    this.noteBkgColor = '#fff5ad';\n    this.noteTextColor = 'calculated';\n    this.activationBorderColor = '#666';\n    this.activationBkgColor = '#f4f4f4';\n    this.sequenceNumberColor = 'white';\n    /* Gantt chart variables */\n\n    this.sectionBkgColor = '#6eaa49';\n    this.altSectionBkgColor = 'white';\n    this.sectionBkgColor2 = '#6eaa49';\n    this.taskBorderColor = 'calculated';\n    this.taskBkgColor = '#487e3a';\n    this.taskTextLightColor = 'white';\n    this.taskTextColor = 'calculated';\n    this.taskTextDarkColor = 'black';\n    this.taskTextOutsideColor = 'calculated';\n    this.taskTextClickableColor = '#003163';\n    this.activeTaskBorderColor = 'calculated';\n    this.activeTaskBkgColor = 'calculated';\n    this.gridColor = 'lightgrey';\n    this.doneTaskBkgColor = 'lightgrey';\n    this.doneTaskBorderColor = 'grey';\n    this.critBorderColor = '#ff8888';\n    this.critBkgColor = 'red';\n    this.todayLineColor = 'red';\n    /* state colors */\n\n    this.labelColor = 'black';\n    this.errorBkgColor = '#552222';\n    this.errorTextColor = '#552222';\n  }\n\n  _createClass(Theme, [{\n    key: \"updateColors\",\n    value: function updateColors() {\n      /* Flowchart variables */\n      this.nodeBkg = this.mainBkg;\n      this.nodeBorder = this.border1;\n      this.clusterBkg = this.secondBkg;\n      this.clusterBorder = this.border2;\n      this.defaultLinkColor = this.lineColor;\n      /* Sequence Diagram variables */\n\n      this.actorBorder = Object(khroma__WEBPACK_IMPORTED_MODULE_0__[\"darken\"])(this.mainBkg, 20);\n      this.actorBkg = this.mainBkg;\n      this.labelBoxBkgColor = this.actorBkg;\n      this.labelTextColor = this.actorTextColor;\n      this.loopTextColor = this.actorTextColor;\n      this.noteBorderColor = this.border2;\n      this.noteTextColor = this.actorTextColor;\n      /* Gantt chart variables */\n\n      this.taskBorderColor = this.border1;\n      this.taskTextColor = this.taskTextLightColor;\n      this.taskTextOutsideColor = this.taskTextDarkColor;\n      this.activeTaskBorderColor = this.taskBorderColor;\n      this.activeTaskBkgColor = this.mainBkg;\n      /* state colors */\n\n      this.transitionColor = this.transitionColor || this.lineColor;\n      this.transitionLabelColor = this.transitionLabelColor || this.textColor;\n      this.stateLabelColor = this.stateLabelColor || this.stateBkg || this.primaryTextColor;\n      this.stateBkg = this.stateBkg || this.mainBkg;\n      this.labelBackgroundColor = this.labelBackgroundColor || this.stateBkg;\n      this.compositeBackground = this.compositeBackground || this.background || this.tertiaryColor;\n      this.altBackground = this.altBackground || '#f0f0f0';\n      this.compositeTitleBackground = this.compositeTitleBackground || this.mainBkg;\n      this.compositeBorder = this.compositeBorder || this.nodeBorder;\n      this.innerEndBackground = this.primaryBorderColor;\n      this.specialStateColor = this.lineColor;\n      this.errorBkgColor = this.errorBkgColor || this.tertiaryColor;\n      this.errorTextColor = this.errorTextColor || this.tertiaryTextColor;\n      this.transitionColor = this.transitionColor || this.lineColor;\n      /* class */\n\n      this.classText = this.primaryTextColor;\n      /* journey */\n\n      this.fillType0 = this.primaryColor;\n      this.fillType1 = this.secondaryColor;\n      this.fillType2 = Object(khroma__WEBPACK_IMPORTED_MODULE_0__[\"adjust\"])(this.primaryColor, {\n        h: 64\n      });\n      this.fillType3 = Object(khroma__WEBPACK_IMPORTED_MODULE_0__[\"adjust\"])(this.secondaryColor, {\n        h: 64\n      });\n      this.fillType4 = Object(khroma__WEBPACK_IMPORTED_MODULE_0__[\"adjust\"])(this.primaryColor, {\n        h: -64\n      });\n      this.fillType5 = Object(khroma__WEBPACK_IMPORTED_MODULE_0__[\"adjust\"])(this.secondaryColor, {\n        h: -64\n      });\n      this.fillType6 = Object(khroma__WEBPACK_IMPORTED_MODULE_0__[\"adjust\"])(this.primaryColor, {\n        h: 128\n      });\n      this.fillType7 = Object(khroma__WEBPACK_IMPORTED_MODULE_0__[\"adjust\"])(this.secondaryColor, {\n        h: 128\n      });\n      /* pie */\n\n      this.pie1 = this.pie1 || this.primaryColor;\n      this.pie2 = this.pie2 || this.secondaryColor;\n      this.pie3 = this.pie3 || this.tertiaryColor;\n      this.pie4 = this.pie4 || Object(khroma__WEBPACK_IMPORTED_MODULE_0__[\"adjust\"])(this.primaryColor, {\n        l: -30\n      });\n      this.pie5 = this.pie5 || Object(khroma__WEBPACK_IMPORTED_MODULE_0__[\"adjust\"])(this.secondaryColor, {\n        l: -30\n      });\n      this.pie6 = this.pie6 || Object(khroma__WEBPACK_IMPORTED_MODULE_0__[\"adjust\"])(this.tertiaryColor, {\n        h: +40,\n        l: -40\n      });\n      this.pie7 = this.pie7 || Object(khroma__WEBPACK_IMPORTED_MODULE_0__[\"adjust\"])(this.primaryColor, {\n        h: +60,\n        l: -10\n      });\n      this.pie8 = this.pie8 || Object(khroma__WEBPACK_IMPORTED_MODULE_0__[\"adjust\"])(this.primaryColor, {\n        h: -60,\n        l: -10\n      });\n      this.pie9 = this.pie9 || Object(khroma__WEBPACK_IMPORTED_MODULE_0__[\"adjust\"])(this.primaryColor, {\n        h: 120,\n        l: 0\n      });\n      this.pie10 = this.pie10 || Object(khroma__WEBPACK_IMPORTED_MODULE_0__[\"adjust\"])(this.primaryColor, {\n        h: +60,\n        l: -50\n      });\n      this.pie11 = this.pie11 || Object(khroma__WEBPACK_IMPORTED_MODULE_0__[\"adjust\"])(this.primaryColor, {\n        h: -60,\n        l: -50\n      });\n      this.pie12 = this.pie12 || Object(khroma__WEBPACK_IMPORTED_MODULE_0__[\"adjust\"])(this.primaryColor, {\n        h: 120,\n        l: -50\n      });\n      this.pieTitleTextSize = this.pieTitleTextSize || '25px';\n      this.pieTitleTextColor = this.pieTitleTextColor || this.taskTextDarkColor;\n      this.pieSectionTextSize = this.pieSectionTextSize || '17px';\n      this.pieSectionTextColor = this.pieSectionTextColor || this.textColor;\n      this.pieLegendTextSize = this.pieLegendTextSize || '17px';\n      this.pieLegendTextColor = this.pieLegendTextColor || this.taskTextDarkColor;\n      this.pieStrokeColor = this.pieStrokeColor || 'black';\n      this.pieStrokeWidth = this.pieStrokeWidth || '2px';\n      this.pieOpacity = this.pieOpacity || '0.7';\n      /* requirement-diagram */\n\n      this.requirementBackground = this.requirementBackground || this.primaryColor;\n      this.requirementBorderColor = this.requirementBorderColor || this.primaryBorderColor;\n      this.requirementBorderSize = this.requirementBorderSize || this.primaryBorderColor;\n      this.requirementTextColor = this.requirementTextColor || this.primaryTextColor;\n      this.relationColor = this.relationColor || this.lineColor;\n      this.relationLabelBackground = this.relationLabelBackground || this.edgeLabelBackground;\n      this.relationLabelColor = this.relationLabelColor || this.actorTextColor;\n    }\n  }, {\n    key: \"calculate\",\n    value: function calculate(overrides) {\n      var _this = this;\n\n      if (_typeof(overrides) !== 'object') {\n        // Calculate colors form base colors\n        this.updateColors();\n        return;\n      }\n\n      var keys = Object.keys(overrides); // Copy values from overrides, this is mainly for base colors\n\n      keys.forEach(function (k) {\n        _this[k] = overrides[k];\n      }); // Calculate colors form base colors\n\n      this.updateColors(); // Copy values from overrides again in case of an override of derived value\n\n      keys.forEach(function (k) {\n        _this[k] = overrides[k];\n      });\n    }\n  }]);\n\n  return Theme;\n}();\n\nvar getThemeVariables = function getThemeVariables(userOverrides) {\n  var theme = new Theme();\n  theme.calculate(userOverrides);\n  return theme;\n};\n\n/***/ }),\n\n/***/ \"./src/themes/theme-helpers.js\":\n/*!*************************************!*\\\n  !*** ./src/themes/theme-helpers.js ***!\n  \\*************************************/\n/*! exports provided: mkBorder */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"mkBorder\", function() { return mkBorder; });\n/* harmony import */ var khroma__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! khroma */ \"./node_modules/khroma/dist/index.js\");\n/* harmony import */ var khroma__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(khroma__WEBPACK_IMPORTED_MODULE_0__);\n\nvar mkBorder = function mkBorder(col, darkMode) {\n  return darkMode ? Object(khroma__WEBPACK_IMPORTED_MODULE_0__[\"adjust\"])(col, {\n    s: -40,\n    l: 10\n  }) : Object(khroma__WEBPACK_IMPORTED_MODULE_0__[\"adjust\"])(col, {\n    s: -40,\n    l: -10\n  });\n};\n\n/***/ }),\n\n/***/ \"./src/themes/theme-neutral.js\":\n/*!*************************************!*\\\n  !*** ./src/themes/theme-neutral.js ***!\n  \\*************************************/\n/*! exports provided: getThemeVariables */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getThemeVariables\", function() { return getThemeVariables; });\n/* harmony import */ var khroma__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! khroma */ \"./node_modules/khroma/dist/index.js\");\n/* harmony import */ var khroma__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(khroma__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _theme_helpers__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./theme-helpers */ \"./src/themes/theme-helpers.js\");\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\n\n // const Color = require ( 'khroma/dist/color' ).default\n// Color.format.hex.stringify(Color.parse('hsl(210, 66.6666666667%, 95%)')); // => \"#EAF2FB\"\n\nvar Theme = /*#__PURE__*/function () {\n  function Theme() {\n    _classCallCheck(this, Theme);\n\n    this.primaryColor = '#eee';\n    this.contrast = '#707070';\n    this.secondaryColor = Object(khroma__WEBPACK_IMPORTED_MODULE_0__[\"lighten\"])(this.contrast, 55);\n    this.background = '#ffffff'; // this.secondaryColor = adjust(this.primaryColor, { h: 120 });\n\n    this.tertiaryColor = Object(khroma__WEBPACK_IMPORTED_MODULE_0__[\"adjust\"])(this.primaryColor, {\n      h: -160\n    });\n    this.primaryBorderColor = Object(_theme_helpers__WEBPACK_IMPORTED_MODULE_1__[\"mkBorder\"])(this.primaryColor, this.darkMode);\n    this.secondaryBorderColor = Object(_theme_helpers__WEBPACK_IMPORTED_MODULE_1__[\"mkBorder\"])(this.secondaryColor, this.darkMode);\n    this.tertiaryBorderColor = Object(_theme_helpers__WEBPACK_IMPORTED_MODULE_1__[\"mkBorder\"])(this.tertiaryColor, this.darkMode); // this.noteBorderColor = mkBorder(this.noteBkgColor, this.darkMode);\n\n    this.primaryTextColor = Object(khroma__WEBPACK_IMPORTED_MODULE_0__[\"invert\"])(this.primaryColor);\n    this.secondaryTextColor = Object(khroma__WEBPACK_IMPORTED_MODULE_0__[\"invert\"])(this.secondaryColor);\n    this.tertiaryTextColor = Object(khroma__WEBPACK_IMPORTED_MODULE_0__[\"invert\"])(this.tertiaryColor);\n    this.lineColor = Object(khroma__WEBPACK_IMPORTED_MODULE_0__[\"invert\"])(this.background);\n    this.textColor = Object(khroma__WEBPACK_IMPORTED_MODULE_0__[\"invert\"])(this.background); // this.altBackground = lighten(this.contrast, 55);\n\n    this.mainBkg = '#eee';\n    this.secondBkg = 'calculated';\n    this.lineColor = '#666';\n    this.border1 = '#999';\n    this.border2 = 'calculated';\n    this.note = '#ffa';\n    this.text = '#333';\n    this.critical = '#d42';\n    this.done = '#bbb';\n    this.arrowheadColor = '#333333';\n    this.fontFamily = '\"trebuchet ms\", verdana, arial, sans-serif';\n    this.fontSize = '16px';\n    /* Flowchart variables */\n\n    this.nodeBkg = 'calculated';\n    this.nodeBorder = 'calculated';\n    this.clusterBkg = 'calculated';\n    this.clusterBorder = 'calculated';\n    this.defaultLinkColor = 'calculated';\n    this.titleColor = 'calculated';\n    this.edgeLabelBackground = 'white';\n    /* Sequence Diagram variables */\n\n    this.actorBorder = 'calculated';\n    this.actorBkg = 'calculated';\n    this.actorTextColor = 'calculated';\n    this.actorLineColor = 'calculated';\n    this.signalColor = 'calculated';\n    this.signalTextColor = 'calculated';\n    this.labelBoxBkgColor = 'calculated';\n    this.labelBoxBorderColor = 'calculated';\n    this.labelTextColor = 'calculated';\n    this.loopTextColor = 'calculated';\n    this.noteBorderColor = 'calculated';\n    this.noteBkgColor = 'calculated';\n    this.noteTextColor = 'calculated';\n    this.activationBorderColor = '#666';\n    this.activationBkgColor = '#f4f4f4';\n    this.sequenceNumberColor = 'white';\n    /* Gantt chart variables */\n\n    this.sectionBkgColor = 'calculated';\n    this.altSectionBkgColor = 'white';\n    this.sectionBkgColor2 = 'calculated';\n    this.taskBorderColor = 'calculated';\n    this.taskBkgColor = 'calculated';\n    this.taskTextLightColor = 'white';\n    this.taskTextColor = 'calculated';\n    this.taskTextDarkColor = 'calculated';\n    this.taskTextOutsideColor = 'calculated';\n    this.taskTextClickableColor = '#003163';\n    this.activeTaskBorderColor = 'calculated';\n    this.activeTaskBkgColor = 'calculated';\n    this.gridColor = 'calculated';\n    this.doneTaskBkgColor = 'calculated';\n    this.doneTaskBorderColor = 'calculated';\n    this.critBkgColor = 'calculated';\n    this.critBorderColor = 'calculated';\n    this.todayLineColor = 'calculated';\n    /* state colors */\n\n    this.labelColor = 'black';\n    this.errorBkgColor = '#552222';\n    this.errorTextColor = '#552222';\n  }\n\n  _createClass(Theme, [{\n    key: \"updateColors\",\n    value: function updateColors() {\n      this.secondBkg = Object(khroma__WEBPACK_IMPORTED_MODULE_0__[\"lighten\"])(this.contrast, 55);\n      this.border2 = this.contrast;\n      /* Flowchart variables */\n\n      this.nodeBkg = this.mainBkg;\n      this.nodeBorder = this.border1;\n      this.clusterBkg = this.secondBkg;\n      this.clusterBorder = this.border2;\n      this.defaultLinkColor = this.lineColor;\n      this.titleColor = this.text;\n      /* Sequence Diagram variables */\n\n      this.actorBorder = Object(khroma__WEBPACK_IMPORTED_MODULE_0__[\"lighten\"])(this.border1, 23);\n      this.actorBkg = this.mainBkg;\n      this.actorTextColor = this.text;\n      this.actorLineColor = this.lineColor;\n      this.signalColor = this.text;\n      this.signalTextColor = this.text;\n      this.labelBoxBkgColor = this.actorBkg;\n      this.labelBoxBorderColor = this.actorBorder;\n      this.labelTextColor = this.text;\n      this.loopTextColor = this.text;\n      this.noteBorderColor = '#999';\n      this.noteBkgColor = '#666';\n      this.noteTextColor = '#fff';\n      /* Gantt chart variables */\n\n      this.sectionBkgColor = Object(khroma__WEBPACK_IMPORTED_MODULE_0__[\"lighten\"])(this.contrast, 30);\n      this.sectionBkgColor2 = Object(khroma__WEBPACK_IMPORTED_MODULE_0__[\"lighten\"])(this.contrast, 30);\n      this.taskBorderColor = Object(khroma__WEBPACK_IMPORTED_MODULE_0__[\"darken\"])(this.contrast, 10);\n      this.taskBkgColor = this.contrast;\n      this.taskTextColor = this.taskTextLightColor;\n      this.taskTextDarkColor = this.text;\n      this.taskTextOutsideColor = this.taskTextDarkColor;\n      this.activeTaskBorderColor = this.taskBorderColor;\n      this.activeTaskBkgColor = this.mainBkg;\n      this.gridColor = Object(khroma__WEBPACK_IMPORTED_MODULE_0__[\"lighten\"])(this.border1, 30);\n      this.doneTaskBkgColor = this.done;\n      this.doneTaskBorderColor = this.lineColor;\n      this.critBkgColor = this.critical;\n      this.critBorderColor = Object(khroma__WEBPACK_IMPORTED_MODULE_0__[\"darken\"])(this.critBkgColor, 10);\n      this.todayLineColor = this.critBkgColor;\n      /* state colors */\n\n      this.transitionColor = this.transitionColor || '#000';\n      this.transitionLabelColor = this.transitionLabelColor || this.textColor;\n      this.stateLabelColor = this.stateLabelColor || this.stateBkg || this.primaryTextColor;\n      this.stateBkg = this.stateBkg || this.mainBkg;\n      this.labelBackgroundColor = this.labelBackgroundColor || this.stateBkg;\n      this.compositeBackground = this.compositeBackground || this.background || this.tertiaryColor;\n      this.altBackground = this.altBackground || '#f4f4f4';\n      this.compositeTitleBackground = this.compositeTitleBackground || this.mainBkg;\n      this.stateBorder = this.stateBorder || '#000';\n      this.innerEndBackground = this.primaryBorderColor;\n      this.specialStateColor = '#222';\n      this.errorBkgColor = this.errorBkgColor || this.tertiaryColor;\n      this.errorTextColor = this.errorTextColor || this.tertiaryTextColor;\n      /* class */\n\n      this.classText = this.primaryTextColor;\n      /* journey */\n\n      this.fillType0 = this.primaryColor;\n      this.fillType1 = this.secondaryColor;\n      this.fillType2 = Object(khroma__WEBPACK_IMPORTED_MODULE_0__[\"adjust\"])(this.primaryColor, {\n        h: 64\n      });\n      this.fillType3 = Object(khroma__WEBPACK_IMPORTED_MODULE_0__[\"adjust\"])(this.secondaryColor, {\n        h: 64\n      });\n      this.fillType4 = Object(khroma__WEBPACK_IMPORTED_MODULE_0__[\"adjust\"])(this.primaryColor, {\n        h: -64\n      });\n      this.fillType5 = Object(khroma__WEBPACK_IMPORTED_MODULE_0__[\"adjust\"])(this.secondaryColor, {\n        h: -64\n      });\n      this.fillType6 = Object(khroma__WEBPACK_IMPORTED_MODULE_0__[\"adjust\"])(this.primaryColor, {\n        h: 128\n      });\n      this.fillType7 = Object(khroma__WEBPACK_IMPORTED_MODULE_0__[\"adjust\"])(this.secondaryColor, {\n        h: 128\n      }); // /* pie */\n\n      this.pie1 = this.pie1 || '#F4F4F4';\n      this.pie2 = this.pie2 || '#555';\n      this.pie3 = this.pie3 || '#BBB';\n      this.pie4 = this.pie4 || '#777';\n      this.pie5 = this.pie5 || '#999';\n      this.pie6 = this.pie6 || '#DDD';\n      this.pie7 = this.pie7 || '#FFF';\n      this.pie8 = this.pie8 || '#DDD';\n      this.pie9 = this.pie9 || '#BBB';\n      this.pie10 = this.pie10 || '#999';\n      this.pie11 = this.pie11 || '#777';\n      this.pie12 = this.pie12 || '#555';\n      this.pieTitleTextSize = this.pieTitleTextSize || '25px';\n      this.pieTitleTextColor = this.pieTitleTextColor || this.taskTextDarkColor;\n      this.pieSectionTextSize = this.pieSectionTextSize || '17px';\n      this.pieSectionTextColor = this.pieSectionTextColor || this.textColor;\n      this.pieLegendTextSize = this.pieLegendTextSize || '17px';\n      this.pieLegendTextColor = this.pieLegendTextColor || this.taskTextDarkColor;\n      this.pieStrokeColor = this.pieStrokeColor || 'black';\n      this.pieStrokeWidth = this.pieStrokeWidth || '2px';\n      this.pieOpacity = this.pieOpacity || '0.7'; // this.pie1 = this.pie1 || '#212529';\n      // this.pie2 = this.pie2 || '#343A40';\n      // this.pie3 = this.pie3 || '#495057';\n      // this.pie4 = this.pie4 || '#6C757D';\n      // this.pie5 = this.pie5 || adjust(this.secondaryColor, { l: -10 });\n      // this.pie6 = this.pie6 || adjust(this.tertiaryColor, { l: -10 });\n      // this.pie7 = this.pie7 || adjust(this.primaryColor, { h: +60, l: -10 });\n      // this.pie8 = this.pie8 || adjust(this.primaryColor, { h: -60, l: -10 });\n      // this.pie9 = this.pie9 || adjust(this.primaryColor, { h: 120, l: 0 });\n      // this.pie10 = this.pie10 || adjust(this.primaryColor, { h: +60, l: -20 });\n      // this.pie11 = this.pie11 || adjust(this.primaryColor, { h: -60, l: -20 });\n      // this.pie12 = this.pie12 || adjust(this.primaryColor, { h: 120, l: -10 });\n\n      /* requirement-diagram */\n\n      this.requirementBackground = this.requirementBackground || this.primaryColor;\n      this.requirementBorderColor = this.requirementBorderColor || this.primaryBorderColor;\n      this.requirementBorderSize = this.requirementBorderSize || this.primaryBorderColor;\n      this.requirementTextColor = this.requirementTextColor || this.primaryTextColor;\n      this.relationColor = this.relationColor || this.lineColor;\n      this.relationLabelBackground = this.relationLabelBackground || this.edgeLabelBackground;\n      this.relationLabelColor = this.relationLabelColor || this.actorTextColor;\n    }\n  }, {\n    key: \"calculate\",\n    value: function calculate(overrides) {\n      var _this = this;\n\n      if (_typeof(overrides) !== 'object') {\n        // Calculate colors form base colors\n        this.updateColors();\n        return;\n      }\n\n      var keys = Object.keys(overrides); // Copy values from overrides, this is mainly for base colors\n\n      keys.forEach(function (k) {\n        _this[k] = overrides[k];\n      }); // Calculate colors form base colors\n\n      this.updateColors(); // Copy values from overrides again in case of an override of derived value\n\n      keys.forEach(function (k) {\n        _this[k] = overrides[k];\n      });\n    }\n  }]);\n\n  return Theme;\n}();\n\nvar getThemeVariables = function getThemeVariables(userOverrides) {\n  var theme = new Theme();\n  theme.calculate(userOverrides);\n  return theme;\n};\n\n/***/ }),\n\n/***/ \"./src/utils.js\":\n/*!**********************!*\\\n  !*** ./src/utils.js ***!\n  \\**********************/\n/*! exports provided: detectInit, detectDirective, detectType, isSubstringInArray, interpolateToCurve, formatUrl, runFunc, getStylesFromArray, generateId, random, assignWithDepth, getTextObj, drawSimpleText, wrapLabel, calculateTextHeight, calculateTextWidth, calculateTextDimensions, calculateSvgSizeAttrs, configureSvgSize, initIdGeneratior, entityDecode, directiveSanitizer, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"detectInit\", function() { return detectInit; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"detectDirective\", function() { return detectDirective; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"detectType\", function() { return detectType; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"isSubstringInArray\", function() { return isSubstringInArray; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"interpolateToCurve\", function() { return interpolateToCurve; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"formatUrl\", function() { return formatUrl; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"runFunc\", function() { return runFunc; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getStylesFromArray\", function() { return getStylesFromArray; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"generateId\", function() { return generateId; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"random\", function() { return random; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"assignWithDepth\", function() { return assignWithDepth; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getTextObj\", function() { return getTextObj; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"drawSimpleText\", function() { return drawSimpleText; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"wrapLabel\", function() { return wrapLabel; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"calculateTextHeight\", function() { return calculateTextHeight; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"calculateTextWidth\", function() { return calculateTextWidth; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"calculateTextDimensions\", function() { return calculateTextDimensions; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"calculateSvgSizeAttrs\", function() { return calculateSvgSizeAttrs; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"configureSvgSize\", function() { return configureSvgSize; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"initIdGeneratior\", function() { return initIdGeneratior; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"entityDecode\", function() { return entityDecode; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"directiveSanitizer\", function() { return directiveSanitizer; });\n/* harmony import */ var _braintree_sanitize_url__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @braintree/sanitize-url */ \"./node_modules/@braintree/sanitize-url/index.js\");\n/* harmony import */ var _braintree_sanitize_url__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_braintree_sanitize_url__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! d3 */ \"./node_modules/d3/src/index.js\");\n/* harmony import */ var _diagrams_common_common__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./diagrams/common/common */ \"./src/diagrams/common/common.js\");\n/* harmony import */ var _defaultConfig__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./defaultConfig */ \"./src/defaultConfig.js\");\n/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./logger */ \"./src/logger.js\");\nvar _this = undefined;\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== \"undefined\" && o[Symbol.iterator] || o[\"@@iterator\"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }\n\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _iterableToArray(iter) { if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter); }\n\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\n\n\n\n\n // Effectively an enum of the supported curve types, accessible by name\n\nvar d3CurveTypes = {\n  curveBasis: d3__WEBPACK_IMPORTED_MODULE_1__[\"curveBasis\"],\n  curveBasisClosed: d3__WEBPACK_IMPORTED_MODULE_1__[\"curveBasisClosed\"],\n  curveBasisOpen: d3__WEBPACK_IMPORTED_MODULE_1__[\"curveBasisOpen\"],\n  curveLinear: d3__WEBPACK_IMPORTED_MODULE_1__[\"curveLinear\"],\n  curveLinearClosed: d3__WEBPACK_IMPORTED_MODULE_1__[\"curveLinearClosed\"],\n  curveMonotoneX: d3__WEBPACK_IMPORTED_MODULE_1__[\"curveMonotoneX\"],\n  curveMonotoneY: d3__WEBPACK_IMPORTED_MODULE_1__[\"curveMonotoneY\"],\n  curveNatural: d3__WEBPACK_IMPORTED_MODULE_1__[\"curveNatural\"],\n  curveStep: d3__WEBPACK_IMPORTED_MODULE_1__[\"curveStep\"],\n  curveStepAfter: d3__WEBPACK_IMPORTED_MODULE_1__[\"curveStepAfter\"],\n  curveStepBefore: d3__WEBPACK_IMPORTED_MODULE_1__[\"curveStepBefore\"]\n};\nvar directive = /[%]{2}[{]\\s*(?:(?:(\\w+)\\s*:|(\\w+))\\s*(?:(?:(\\w+))|((?:(?![}][%]{2}).|\\r?\\n)*))?\\s*)(?:[}][%]{2})?/gi;\nvar directiveWithoutOpen = /\\s*(?:(?:(\\w+)(?=:):|(\\w+))\\s*(?:(?:(\\w+))|((?:(?![}][%]{2}).|\\r?\\n)*))?\\s*)(?:[}][%]{2})?/gi;\nvar anyComment = /\\s*%%.*\\n/gm;\n/**\n * @function detectInit\n * Detects the init config object from the text\n * ```mermaid\n * %%{init: {\"theme\": \"debug\", \"logLevel\": 1 }}%%\n * graph LR\n *  a-->b\n *  b-->c\n *  c-->d\n *  d-->e\n *  e-->f\n *  f-->g\n *  g-->h\n * ```\n * or\n * ```mermaid\n * %%{initialize: {\"theme\": \"dark\", logLevel: \"debug\" }}%%\n * graph LR\n *  a-->b\n *  b-->c\n *  c-->d\n *  d-->e\n *  e-->f\n *  f-->g\n *  g-->h\n * ```\n *\n * @param {string} text The text defining the graph\n * @returns {object} the json object representing the init passed to mermaid.initialize()\n */\n\nvar detectInit = function detectInit(text, cnf) {\n  var inits = detectDirective(text, /(?:init\\b)|(?:initialize\\b)/);\n  var results = {};\n\n  if (Array.isArray(inits)) {\n    var args = inits.map(function (init) {\n      return init.args;\n    });\n    directiveSanitizer(args);\n    results = assignWithDepth(results, _toConsumableArray(args));\n  } else {\n    results = inits.args;\n  }\n\n  if (results) {\n    var type = detectType(text, cnf);\n    ['config'].forEach(function (prop) {\n      if (typeof results[prop] !== 'undefined') {\n        if (type === 'flowchart-v2') {\n          type = 'flowchart';\n        }\n\n        results[type] = results[prop];\n        delete results[prop];\n      }\n    });\n  } // Todo: refactor this, these results are never used\n\n\n  return results;\n};\n/**\n * @function detectDirective\n * Detects the directive from the text. Text can be single line or multiline. If type is null or omitted\n * the first directive encountered in text will be returned\n * ```mermaid\n * graph LR\n *  %%{somedirective}%%\n *  a-->b\n *  b-->c\n *  c-->d\n *  d-->e\n *  e-->f\n *  f-->g\n *  g-->h\n * ```\n *\n * @param {string} text The text defining the graph\n * @param {string|RegExp} type The directive to return (default: null)\n * @returns {object | Array} An object or Array representing the directive(s): { type: string, args: object|null } matched by the input type\n *          if a single directive was found, that directive object will be returned.\n */\n\nvar detectDirective = function detectDirective(text) {\n  var type = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;\n\n  try {\n    var commentWithoutDirectives = new RegExp(\"[%]{2}(?![{]\".concat(directiveWithoutOpen.source, \")(?=[}][%]{2}).*\\n\"), 'ig');\n    text = text.trim().replace(commentWithoutDirectives, '').replace(/'/gm, '\"');\n    _logger__WEBPACK_IMPORTED_MODULE_4__[\"log\"].debug(\"Detecting diagram directive\".concat(type !== null ? ' type:' + type : '', \" based on the text:\").concat(text));\n    var match,\n        result = [];\n\n    while ((match = directive.exec(text)) !== null) {\n      // This is necessary to avoid infinite loops with zero-width matches\n      if (match.index === directive.lastIndex) {\n        directive.lastIndex++;\n      }\n\n      if (match && !type || type && match[1] && match[1].match(type) || type && match[2] && match[2].match(type)) {\n        var _type = match[1] ? match[1] : match[2];\n\n        var args = match[3] ? match[3].trim() : match[4] ? JSON.parse(match[4].trim()) : null;\n        result.push({\n          type: _type,\n          args: args\n        });\n      }\n    }\n\n    if (result.length === 0) {\n      result.push({\n        type: text,\n        args: null\n      });\n    }\n\n    return result.length === 1 ? result[0] : result;\n  } catch (error) {\n    _logger__WEBPACK_IMPORTED_MODULE_4__[\"log\"].error(\"ERROR: \".concat(error.message, \" - Unable to parse directive\\n      \").concat(type !== null ? ' type:' + type : '', \" based on the text:\").concat(text));\n    return {\n      type: null,\n      args: null\n    };\n  }\n};\n/**\n * @function detectType\n * Detects the type of the graph text. Takes into consideration the possible existence of an %%init\n * directive\n * ```mermaid\n * %%{initialize: {\"startOnLoad\": true, logLevel: \"fatal\" }}%%\n * graph LR\n *  a-->b\n *  b-->c\n *  c-->d\n *  d-->e\n *  e-->f\n *  f-->g\n *  g-->h\n * ```\n *\n * @param {string} text The text defining the graph\n * @returns {string} A graph definition key\n */\n\nvar detectType = function detectType(text, cnf) {\n  text = text.replace(directive, '').replace(anyComment, '\\n');\n\n  if (text.match(/^\\s*sequenceDiagram/)) {\n    return 'sequence';\n  }\n\n  if (text.match(/^\\s*gantt/)) {\n    return 'gantt';\n  }\n\n  if (text.match(/^\\s*classDiagram-v2/)) {\n    return 'classDiagram';\n  }\n\n  if (text.match(/^\\s*classDiagram/)) {\n    if (cnf && cnf.class && cnf.class.defaultRenderer === 'dagre-wrapper') return 'classDiagram';\n    return 'class';\n  }\n\n  if (text.match(/^\\s*stateDiagram-v2/)) {\n    return 'stateDiagram';\n  }\n\n  if (text.match(/^\\s*stateDiagram/)) {\n    if (cnf && cnf.class && cnf.state.defaultRenderer === 'dagre-wrapper') return 'stateDiagram';\n    return 'state';\n  }\n\n  if (text.match(/^\\s*gitGraph/)) {\n    return 'git';\n  }\n\n  if (text.match(/^\\s*flowchart/)) {\n    return 'flowchart-v2';\n  }\n\n  if (text.match(/^\\s*info/)) {\n    return 'info';\n  }\n\n  if (text.match(/^\\s*pie/)) {\n    return 'pie';\n  }\n\n  if (text.match(/^\\s*erDiagram/)) {\n    return 'er';\n  }\n\n  if (text.match(/^\\s*journey/)) {\n    return 'journey';\n  }\n\n  if (text.match(/^\\s*requirement/) || text.match(/^\\s*requirementDiagram/)) {\n    return 'requirement';\n  }\n\n  if (cnf && cnf.flowchart && cnf.flowchart.defaultRenderer === 'dagre-wrapper') return 'flowchart-v2';\n  return 'flowchart';\n};\n\nvar memoize = function memoize(fn, resolver) {\n  var cache = {};\n  return function () {\n    for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n      args[_key] = arguments[_key];\n    }\n\n    var n = resolver ? resolver.apply(_this, args) : args[0];\n\n    if (n in cache) {\n      return cache[n];\n    } else {\n      var result = fn.apply(void 0, args);\n      cache[n] = result;\n      return result;\n    }\n  };\n};\n/**\n * @function isSubstringInArray\n * Detects whether a substring in present in a given array\n * @param {string} str The substring to detect\n * @param {array} arr The array to search\n * @returns {number} the array index containing the substring or -1 if not present\n **/\n\n\nvar isSubstringInArray = function isSubstringInArray(str, arr) {\n  for (var i = 0; i < arr.length; i++) {\n    if (arr[i].match(str)) return i;\n  }\n\n  return -1;\n};\nvar interpolateToCurve = function interpolateToCurve(interpolate, defaultCurve) {\n  if (!interpolate) {\n    return defaultCurve;\n  }\n\n  var curveName = \"curve\".concat(interpolate.charAt(0).toUpperCase() + interpolate.slice(1));\n  return d3CurveTypes[curveName] || defaultCurve;\n};\nvar formatUrl = function formatUrl(linkStr, config) {\n  var url = linkStr.trim();\n\n  if (url) {\n    if (config.securityLevel !== 'loose') {\n      return Object(_braintree_sanitize_url__WEBPACK_IMPORTED_MODULE_0__[\"sanitizeUrl\"])(url);\n    }\n\n    return url;\n  }\n};\nvar runFunc = function runFunc(functionName) {\n  var _obj;\n\n  var arrPaths = functionName.split('.');\n  var len = arrPaths.length - 1;\n  var fnName = arrPaths[len];\n  var obj = window;\n\n  for (var i = 0; i < len; i++) {\n    obj = obj[arrPaths[i]];\n    if (!obj) return;\n  }\n\n  for (var _len2 = arguments.length, params = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n    params[_key2 - 1] = arguments[_key2];\n  }\n\n  (_obj = obj)[fnName].apply(_obj, params);\n};\n\nvar distance = function distance(p1, p2) {\n  return p1 && p2 ? Math.sqrt(Math.pow(p2.x - p1.x, 2) + Math.pow(p2.y - p1.y, 2)) : 0;\n};\n\nvar traverseEdge = function traverseEdge(points) {\n  var prevPoint;\n  var totalDistance = 0;\n  points.forEach(function (point) {\n    totalDistance += distance(point, prevPoint);\n    prevPoint = point;\n  }); // Traverse half of total distance along points\n\n  var remainingDistance = totalDistance / 2;\n  var center = undefined;\n  prevPoint = undefined;\n  points.forEach(function (point) {\n    if (prevPoint && !center) {\n      var vectorDistance = distance(point, prevPoint);\n\n      if (vectorDistance < remainingDistance) {\n        remainingDistance -= vectorDistance;\n      } else {\n        // The point is remainingDistance from prevPoint in the vector between prevPoint and point\n        // Calculate the coordinates\n        var distanceRatio = remainingDistance / vectorDistance;\n        if (distanceRatio <= 0) center = prevPoint;\n        if (distanceRatio >= 1) center = {\n          x: point.x,\n          y: point.y\n        };\n\n        if (distanceRatio > 0 && distanceRatio < 1) {\n          center = {\n            x: (1 - distanceRatio) * prevPoint.x + distanceRatio * point.x,\n            y: (1 - distanceRatio) * prevPoint.y + distanceRatio * point.y\n          };\n        }\n      }\n    }\n\n    prevPoint = point;\n  });\n  return center;\n};\n\nvar calcLabelPosition = function calcLabelPosition(points) {\n  return traverseEdge(points);\n};\n\nvar calcCardinalityPosition = function calcCardinalityPosition(isRelationTypePresent, points, initialPosition) {\n  var prevPoint;\n  var totalDistance = 0; // eslint-disable-line\n\n  _logger__WEBPACK_IMPORTED_MODULE_4__[\"log\"].info('our points', points);\n\n  if (points[0] !== initialPosition) {\n    points = points.reverse();\n  }\n\n  points.forEach(function (point) {\n    totalDistance += distance(point, prevPoint);\n    prevPoint = point;\n  }); // Traverse only 25 total distance along points to find cardinality point\n\n  var distanceToCardinalityPoint = 25;\n  var remainingDistance = distanceToCardinalityPoint;\n  var center;\n  prevPoint = undefined;\n  points.forEach(function (point) {\n    if (prevPoint && !center) {\n      var vectorDistance = distance(point, prevPoint);\n\n      if (vectorDistance < remainingDistance) {\n        remainingDistance -= vectorDistance;\n      } else {\n        // The point is remainingDistance from prevPoint in the vector between prevPoint and point\n        // Calculate the coordinates\n        var distanceRatio = remainingDistance / vectorDistance;\n        if (distanceRatio <= 0) center = prevPoint;\n        if (distanceRatio >= 1) center = {\n          x: point.x,\n          y: point.y\n        };\n\n        if (distanceRatio > 0 && distanceRatio < 1) {\n          center = {\n            x: (1 - distanceRatio) * prevPoint.x + distanceRatio * point.x,\n            y: (1 - distanceRatio) * prevPoint.y + distanceRatio * point.y\n          };\n        }\n      }\n    }\n\n    prevPoint = point;\n  }); // if relation is present (Arrows will be added), change cardinality point off-set distance (d)\n\n  var d = isRelationTypePresent ? 10 : 5; //Calculate Angle for x and y axis\n\n  var angle = Math.atan2(points[0].y - center.y, points[0].x - center.x);\n  var cardinalityPosition = {\n    x: 0,\n    y: 0\n  }; //Calculation cardinality position using angle, center point on the line/curve but pendicular and with offset-distance\n\n  cardinalityPosition.x = Math.sin(angle) * d + (points[0].x + center.x) / 2;\n  cardinalityPosition.y = -Math.cos(angle) * d + (points[0].y + center.y) / 2;\n  return cardinalityPosition;\n};\n/**\n * position ['start_left', 'start_right', 'end_left', 'end_right']\n */\n\n\nvar calcTerminalLabelPosition = function calcTerminalLabelPosition(terminalMarkerSize, position, _points) {\n  // Todo looking to faster cloning method\n  var points = JSON.parse(JSON.stringify(_points));\n  var prevPoint;\n  var totalDistance = 0; // eslint-disable-line\n\n  _logger__WEBPACK_IMPORTED_MODULE_4__[\"log\"].info('our points', points);\n\n  if (position !== 'start_left' && position !== 'start_right') {\n    points = points.reverse();\n  }\n\n  points.forEach(function (point) {\n    totalDistance += distance(point, prevPoint);\n    prevPoint = point;\n  }); // Traverse only 25 total distance along points to find cardinality point\n\n  var distanceToCardinalityPoint = 25 + terminalMarkerSize;\n  var remainingDistance = distanceToCardinalityPoint;\n  var center;\n  prevPoint = undefined;\n  points.forEach(function (point) {\n    if (prevPoint && !center) {\n      var vectorDistance = distance(point, prevPoint);\n\n      if (vectorDistance < remainingDistance) {\n        remainingDistance -= vectorDistance;\n      } else {\n        // The point is remainingDistance from prevPoint in the vector between prevPoint and point\n        // Calculate the coordinates\n        var distanceRatio = remainingDistance / vectorDistance;\n        if (distanceRatio <= 0) center = prevPoint;\n        if (distanceRatio >= 1) center = {\n          x: point.x,\n          y: point.y\n        };\n\n        if (distanceRatio > 0 && distanceRatio < 1) {\n          center = {\n            x: (1 - distanceRatio) * prevPoint.x + distanceRatio * point.x,\n            y: (1 - distanceRatio) * prevPoint.y + distanceRatio * point.y\n          };\n        }\n      }\n    }\n\n    prevPoint = point;\n  }); // if relation is present (Arrows will be added), change cardinality point off-set distance (d)\n\n  var d = 10 + terminalMarkerSize * 0.5; //Calculate Angle for x and y axis\n\n  var angle = Math.atan2(points[0].y - center.y, points[0].x - center.x);\n  var cardinalityPosition = {\n    x: 0,\n    y: 0\n  }; //Calculation cardinality position using angle, center point on the line/curve but pendicular and with offset-distance\n\n  cardinalityPosition.x = Math.sin(angle) * d + (points[0].x + center.x) / 2;\n  cardinalityPosition.y = -Math.cos(angle) * d + (points[0].y + center.y) / 2;\n\n  if (position === 'start_left') {\n    cardinalityPosition.x = Math.sin(angle + Math.PI) * d + (points[0].x + center.x) / 2;\n    cardinalityPosition.y = -Math.cos(angle + Math.PI) * d + (points[0].y + center.y) / 2;\n  }\n\n  if (position === 'end_right') {\n    cardinalityPosition.x = Math.sin(angle - Math.PI) * d + (points[0].x + center.x) / 2 - 5;\n    cardinalityPosition.y = -Math.cos(angle - Math.PI) * d + (points[0].y + center.y) / 2 - 5;\n  }\n\n  if (position === 'end_left') {\n    cardinalityPosition.x = Math.sin(angle) * d + (points[0].x + center.x) / 2 - 5;\n    cardinalityPosition.y = -Math.cos(angle) * d + (points[0].y + center.y) / 2 - 5;\n  }\n\n  return cardinalityPosition;\n};\n\nvar getStylesFromArray = function getStylesFromArray(arr) {\n  var style = '';\n  var labelStyle = '';\n\n  for (var i = 0; i < arr.length; i++) {\n    if (typeof arr[i] !== 'undefined') {\n      // add text properties to label style definition\n      if (arr[i].startsWith('color:') || arr[i].startsWith('text-align:')) {\n        labelStyle = labelStyle + arr[i] + ';';\n      } else {\n        style = style + arr[i] + ';';\n      }\n    }\n  }\n\n  return {\n    style: style,\n    labelStyle: labelStyle\n  };\n};\nvar cnt = 0;\nvar generateId = function generateId() {\n  cnt++;\n  return 'id-' + Math.random().toString(36).substr(2, 12) + '-' + cnt;\n};\n\nfunction makeid(length) {\n  var result = '';\n  var characters = '0123456789abcdef';\n  var charactersLength = characters.length;\n\n  for (var i = 0; i < length; i++) {\n    result += characters.charAt(Math.floor(Math.random() * charactersLength));\n  }\n\n  return result;\n}\n\nvar random = function random(options) {\n  return makeid(options.length);\n};\n/**\n * @function assignWithDepth\n * Extends the functionality of {@link ObjectConstructor.assign} with the ability to merge arbitrary-depth objects\n * For each key in src with path `k` (recursively) performs an Object.assign(dst[`k`], src[`k`]) with\n * a slight change from the typical handling of undefined for dst[`k`]: instead of raising an error,\n * dst[`k`] is auto-initialized to {} and effectively merged with src[`k`]\n * <p>\n * Additionally, dissimilar types will not clobber unless the config.clobber parameter === true. Example:\n * ```\n * let config_0 = { foo: { bar: 'bar' }, bar: 'foo' };\n * let config_1 = { foo: 'foo', bar: 'bar' };\n * let result = assignWithDepth(config_0, config_1);\n * console.log(result);\n * //-> result: { foo: { bar: 'bar' }, bar: 'bar' }\n * ```\n * <p>\n * Traditional Object.assign would have clobbered foo in config_0 with foo in config_1.\n * <p>\n * If src is a destructured array of objects and dst is not an array, assignWithDepth will apply each element of src to dst\n * in order.\n * @param dst:any - the destination of the merge\n * @param src:any - the source object(s) to merge into destination\n * @param config:{ depth: number, clobber: boolean } - depth: depth to traverse within src and dst for merging -\n * clobber: should dissimilar types clobber (default: { depth: 2, clobber: false })\n * @returns {*}\n */\n\nvar assignWithDepth = function assignWithDepth(dst, src, config) {\n  var _Object$assign = Object.assign({\n    depth: 2,\n    clobber: false\n  }, config),\n      depth = _Object$assign.depth,\n      clobber = _Object$assign.clobber;\n\n  if (Array.isArray(src) && !Array.isArray(dst)) {\n    src.forEach(function (s) {\n      return assignWithDepth(dst, s, config);\n    });\n    return dst;\n  } else if (Array.isArray(src) && Array.isArray(dst)) {\n    src.forEach(function (s) {\n      if (dst.indexOf(s) === -1) {\n        dst.push(s);\n      }\n    });\n    return dst;\n  }\n\n  if (typeof dst === 'undefined' || depth <= 0) {\n    if (dst !== undefined && dst !== null && _typeof(dst) === 'object' && _typeof(src) === 'object') {\n      return Object.assign(dst, src);\n    } else {\n      return src;\n    }\n  }\n\n  if (typeof src !== 'undefined' && _typeof(dst) === 'object' && _typeof(src) === 'object') {\n    Object.keys(src).forEach(function (key) {\n      if (_typeof(src[key]) === 'object' && (dst[key] === undefined || _typeof(dst[key]) === 'object')) {\n        if (dst[key] === undefined) {\n          dst[key] = Array.isArray(src[key]) ? [] : {};\n        }\n\n        dst[key] = assignWithDepth(dst[key], src[key], {\n          depth: depth - 1,\n          clobber: clobber\n        });\n      } else if (clobber || _typeof(dst[key]) !== 'object' && _typeof(src[key]) !== 'object') {\n        dst[key] = src[key];\n      }\n    });\n  }\n\n  return dst;\n};\nvar getTextObj = function getTextObj() {\n  return {\n    x: 0,\n    y: 0,\n    fill: undefined,\n    anchor: 'start',\n    style: '#666',\n    width: 100,\n    height: 100,\n    textMargin: 0,\n    rx: 0,\n    ry: 0,\n    valign: undefined\n  };\n};\nvar drawSimpleText = function drawSimpleText(elem, textData) {\n  // Remove and ignore br:s\n  var nText = textData.text.replace(_diagrams_common_common__WEBPACK_IMPORTED_MODULE_2__[\"default\"].lineBreakRegex, ' ');\n  var textElem = elem.append('text');\n  textElem.attr('x', textData.x);\n  textElem.attr('y', textData.y);\n  textElem.style('text-anchor', textData.anchor);\n  textElem.style('font-family', textData.fontFamily);\n  textElem.style('font-size', textData.fontSize);\n  textElem.style('font-weight', textData.fontWeight);\n  textElem.attr('fill', textData.fill);\n\n  if (typeof textData.class !== 'undefined') {\n    textElem.attr('class', textData.class);\n  }\n\n  var span = textElem.append('tspan');\n  span.attr('x', textData.x + textData.textMargin * 2);\n  span.attr('fill', textData.fill);\n  span.text(nText);\n  return textElem;\n};\nvar wrapLabel = memoize(function (label, maxWidth, config) {\n  if (!label) {\n    return label;\n  }\n\n  config = Object.assign({\n    fontSize: 12,\n    fontWeight: 400,\n    fontFamily: 'Arial',\n    joinWith: '<br/>'\n  }, config);\n\n  if (_diagrams_common_common__WEBPACK_IMPORTED_MODULE_2__[\"default\"].lineBreakRegex.test(label)) {\n    return label;\n  }\n\n  var words = label.split(' ');\n  var completedLines = [];\n  var nextLine = '';\n  words.forEach(function (word, index) {\n    var wordLength = calculateTextWidth(\"\".concat(word, \" \"), config);\n    var nextLineLength = calculateTextWidth(nextLine, config);\n\n    if (wordLength > maxWidth) {\n      var _breakString = breakString(word, maxWidth, '-', config),\n          hyphenatedStrings = _breakString.hyphenatedStrings,\n          remainingWord = _breakString.remainingWord;\n\n      completedLines.push.apply(completedLines, [nextLine].concat(_toConsumableArray(hyphenatedStrings)));\n      nextLine = remainingWord;\n    } else if (nextLineLength + wordLength >= maxWidth) {\n      completedLines.push(nextLine);\n      nextLine = word;\n    } else {\n      nextLine = [nextLine, word].filter(Boolean).join(' ');\n    }\n\n    var currentWord = index + 1;\n    var isLastWord = currentWord === words.length;\n\n    if (isLastWord) {\n      completedLines.push(nextLine);\n    }\n  });\n  return completedLines.filter(function (line) {\n    return line !== '';\n  }).join(config.joinWith);\n}, function (label, maxWidth, config) {\n  return \"\".concat(label, \"-\").concat(maxWidth, \"-\").concat(config.fontSize, \"-\").concat(config.fontWeight, \"-\").concat(config.fontFamily, \"-\").concat(config.joinWith);\n});\nvar breakString = memoize(function (word, maxWidth) {\n  var hyphenCharacter = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '-';\n  var config = arguments.length > 3 ? arguments[3] : undefined;\n  config = Object.assign({\n    fontSize: 12,\n    fontWeight: 400,\n    fontFamily: 'Arial',\n    margin: 0\n  }, config);\n  var characters = word.split('');\n  var lines = [];\n  var currentLine = '';\n  characters.forEach(function (character, index) {\n    var nextLine = \"\".concat(currentLine).concat(character);\n    var lineWidth = calculateTextWidth(nextLine, config);\n\n    if (lineWidth >= maxWidth) {\n      var currentCharacter = index + 1;\n      var isLastLine = characters.length === currentCharacter;\n      var hyphenatedNextLine = \"\".concat(nextLine).concat(hyphenCharacter);\n      lines.push(isLastLine ? nextLine : hyphenatedNextLine);\n      currentLine = '';\n    } else {\n      currentLine = nextLine;\n    }\n  });\n  return {\n    hyphenatedStrings: lines,\n    remainingWord: currentLine\n  };\n}, function (word, maxWidth) {\n  var hyphenCharacter = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '-';\n  var config = arguments.length > 3 ? arguments[3] : undefined;\n  return \"\".concat(word, \"-\").concat(maxWidth, \"-\").concat(hyphenCharacter, \"-\").concat(config.fontSize, \"-\").concat(config.fontWeight, \"-\").concat(config.fontFamily);\n});\n/**\n * This calculates the text's height, taking into account the wrap breaks and\n * both the statically configured height, width, and the length of the text (in pixels).\n *\n * If the wrapped text text has greater height, we extend the height, so it's\n * value won't overflow.\n *\n * @return - The height for the given text\n * @param text the text to measure\n * @param config - the config for fontSize, fontFamily, and fontWeight all impacting the resulting size\n */\n\nvar calculateTextHeight = function calculateTextHeight(text, config) {\n  config = Object.assign({\n    fontSize: 12,\n    fontWeight: 400,\n    fontFamily: 'Arial',\n    margin: 15\n  }, config);\n  return calculateTextDimensions(text, config).height;\n};\n/**\n * This calculates the width of the given text, font size and family.\n *\n * @return - The width for the given text\n * @param text - The text to calculate the width of\n * @param config - the config for fontSize, fontFamily, and fontWeight all impacting the resulting size\n */\n\nvar calculateTextWidth = function calculateTextWidth(text, config) {\n  config = Object.assign({\n    fontSize: 12,\n    fontWeight: 400,\n    fontFamily: 'Arial'\n  }, config);\n  return calculateTextDimensions(text, config).width;\n};\n/**\n * This calculates the dimensions of the given text, font size, font family, font weight, and margins.\n *\n * @return - The width for the given text\n * @param text - The text to calculate the width of\n * @param config - the config for fontSize, fontFamily, fontWeight, and margin all impacting the resulting size\n */\n\nvar calculateTextDimensions = memoize(function (text, config) {\n  config = Object.assign({\n    fontSize: 12,\n    fontWeight: 400,\n    fontFamily: 'Arial'\n  }, config);\n  var _config = config,\n      fontSize = _config.fontSize,\n      fontFamily = _config.fontFamily,\n      fontWeight = _config.fontWeight;\n\n  if (!text) {\n    return {\n      width: 0,\n      height: 0\n    };\n  } // We can't really know if the user supplied font family will render on the user agent;\n  // thus, we'll take the max width between the user supplied font family, and a default\n  // of sans-serif.\n\n\n  var fontFamilies = ['sans-serif', fontFamily];\n  var lines = text.split(_diagrams_common_common__WEBPACK_IMPORTED_MODULE_2__[\"default\"].lineBreakRegex);\n  var dims = [];\n  var body = Object(d3__WEBPACK_IMPORTED_MODULE_1__[\"select\"])('body'); // We don't want to leak DOM elements - if a removal operation isn't available\n  // for any reason, do not continue.\n\n  if (!body.remove) {\n    return {\n      width: 0,\n      height: 0,\n      lineHeight: 0\n    };\n  }\n\n  var g = body.append('svg');\n\n  for (var _i = 0, _fontFamilies = fontFamilies; _i < _fontFamilies.length; _i++) {\n    var _fontFamily = _fontFamilies[_i];\n    var cheight = 0;\n    var dim = {\n      width: 0,\n      height: 0,\n      lineHeight: 0\n    };\n\n    var _iterator = _createForOfIteratorHelper(lines),\n        _step;\n\n    try {\n      for (_iterator.s(); !(_step = _iterator.n()).done;) {\n        var line = _step.value;\n        var textObj = getTextObj();\n        textObj.text = line;\n        var textElem = drawSimpleText(g, textObj).style('font-size', fontSize).style('font-weight', fontWeight).style('font-family', _fontFamily);\n        var bBox = (textElem._groups || textElem)[0][0].getBBox();\n        dim.width = Math.round(Math.max(dim.width, bBox.width));\n        cheight = Math.round(bBox.height);\n        dim.height += cheight;\n        dim.lineHeight = Math.round(Math.max(dim.lineHeight, cheight));\n      }\n    } catch (err) {\n      _iterator.e(err);\n    } finally {\n      _iterator.f();\n    }\n\n    dims.push(dim);\n  }\n\n  g.remove();\n  var index = isNaN(dims[1].height) || isNaN(dims[1].width) || isNaN(dims[1].lineHeight) || dims[0].height > dims[1].height && dims[0].width > dims[1].width && dims[0].lineHeight > dims[1].lineHeight ? 0 : 1;\n  return dims[index];\n}, function (text, config) {\n  return \"\".concat(text, \"-\").concat(config.fontSize, \"-\").concat(config.fontWeight, \"-\").concat(config.fontFamily);\n});\n\nvar d3Attrs = function d3Attrs(d3Elem, attrs) {\n  var _iterator2 = _createForOfIteratorHelper(attrs),\n      _step2;\n\n  try {\n    for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {\n      var attr = _step2.value;\n      d3Elem.attr(attr[0], attr[1]);\n    }\n  } catch (err) {\n    _iterator2.e(err);\n  } finally {\n    _iterator2.f();\n  }\n};\n\nvar calculateSvgSizeAttrs = function calculateSvgSizeAttrs(height, width, useMaxWidth) {\n  var attrs = new Map();\n\n  if (useMaxWidth) {\n    attrs.set('width', '100%');\n    attrs.set('height', '100%');\n    attrs.set('style', \"max-width: \".concat(width, \"px;\"));\n  } else {\n    attrs.set('width', width);\n    attrs.set('height', height);\n  }\n\n  return attrs;\n};\nvar configureSvgSize = function configureSvgSize(svgElem, height, width, useMaxWidth) {\n  var attrs = calculateSvgSizeAttrs(height, width, useMaxWidth);\n  d3Attrs(svgElem, attrs);\n};\nvar initIdGeneratior = /*#__PURE__*/function () {\n  function iterator(deterministic, seed) {\n    _classCallCheck(this, iterator);\n\n    this.deterministic = deterministic;\n    this.seed = seed;\n    this.count = seed ? seed.length : 0;\n  }\n\n  _createClass(iterator, [{\n    key: \"next\",\n    value: function next() {\n      if (!this.deterministic) return Date.now();\n      return this.count++;\n    }\n  }]);\n\n  return iterator;\n}(); // Source https://github.com/shrpne/entity-decode/blob/master/browser.js\n\nvar decoder;\nvar entityDecode = function entityDecode(html) {\n  decoder = decoder || document.createElement('div'); // Escape HTML before decoding for HTML Entities\n\n  html = escape(html).replace(/%26/g, '&').replace(/%23/g, '#').replace(/%3B/g, ';'); // decoding\n\n  decoder.innerHTML = html;\n  return unescape(decoder.textContent);\n};\nvar directiveSanitizer = function directiveSanitizer(args) {\n  _logger__WEBPACK_IMPORTED_MODULE_4__[\"log\"].debug('directiveSanitizer called with', args);\n\n  if (_typeof(args) === 'object') {\n    // check for array\n    if (args.length) {\n      args.forEach(function (arg) {\n        return directiveSanitizer(arg);\n      });\n    } else {\n      // This is an object\n      Object.keys(args).forEach(function (key) {\n        _logger__WEBPACK_IMPORTED_MODULE_4__[\"log\"].debug('Checking key', key);\n\n        if (key.indexOf('__') === 0) {\n          _logger__WEBPACK_IMPORTED_MODULE_4__[\"log\"].debug('sanitize deleting __ option', key);\n          delete args[key];\n        }\n\n        if (key.indexOf('proto') >= 0) {\n          _logger__WEBPACK_IMPORTED_MODULE_4__[\"log\"].debug('sanitize deleting proto option', key);\n          delete args[key];\n        }\n\n        if (key.indexOf('constr') >= 0) {\n          _logger__WEBPACK_IMPORTED_MODULE_4__[\"log\"].debug('sanitize deleting constr option', key);\n          delete args[key];\n        }\n\n        if (_defaultConfig__WEBPACK_IMPORTED_MODULE_3__[\"configKeys\"].indexOf(key) < 0) {\n          _logger__WEBPACK_IMPORTED_MODULE_4__[\"log\"].debug('sanitize deleting option', key);\n          delete args[key];\n        } else {\n          if (_typeof(args[key]) === 'object') {\n            _logger__WEBPACK_IMPORTED_MODULE_4__[\"log\"].debug('sanitize deleting object', key);\n            directiveSanitizer(args[key]);\n          }\n        }\n      });\n    }\n  }\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n  assignWithDepth: assignWithDepth,\n  wrapLabel: wrapLabel,\n  calculateTextHeight: calculateTextHeight,\n  calculateTextWidth: calculateTextWidth,\n  calculateTextDimensions: calculateTextDimensions,\n  calculateSvgSizeAttrs: calculateSvgSizeAttrs,\n  configureSvgSize: configureSvgSize,\n  detectInit: detectInit,\n  detectDirective: detectDirective,\n  detectType: detectType,\n  isSubstringInArray: isSubstringInArray,\n  interpolateToCurve: interpolateToCurve,\n  calcLabelPosition: calcLabelPosition,\n  calcCardinalityPosition: calcCardinalityPosition,\n  calcTerminalLabelPosition: calcTerminalLabelPosition,\n  formatUrl: formatUrl,\n  getStylesFromArray: getStylesFromArray,\n  generateId: generateId,\n  random: random,\n  memoize: memoize,\n  runFunc: runFunc,\n  entityDecode: entityDecode,\n  initIdGeneratior: initIdGeneratior,\n  directiveSanitizer: directiveSanitizer\n});\n\n/***/ })\n\n/******/ })[\"default\"];\n});\n//# sourceMappingURL=mermaid.js.map"
  },
  {
    "path": "static/editor.md/lib/mindmap/d3@5.js",
    "content": "// https://d3js.org v5.15.1 Copyright 2020 Mike Bostock\n!function(t,n){\"object\"==typeof exports&&\"undefined\"!=typeof module?n(exports):\"function\"==typeof define&&define.amd?define([\"exports\"],n):n((t=t||self).d3=t.d3||{})}(this,function(t){\"use strict\";function n(t,n){return t<n?-1:t>n?1:t>=n?0:NaN}function e(t){var e;return 1===t.length&&(e=t,t=function(t,r){return n(e(t),r)}),{left:function(n,e,r,i){for(null==r&&(r=0),null==i&&(i=n.length);r<i;){var o=r+i>>>1;t(n[o],e)<0?r=o+1:i=o}return r},right:function(n,e,r,i){for(null==r&&(r=0),null==i&&(i=n.length);r<i;){var o=r+i>>>1;t(n[o],e)>0?i=o:r=o+1}return r}}}var r=e(n),i=r.right,o=r.left;function a(t,n){return[t,n]}function u(t){return null===t?NaN:+t}function c(t,n){var e,r,i=t.length,o=0,a=-1,c=0,f=0;if(null==n)for(;++a<i;)isNaN(e=u(t[a]))||(f+=(r=e-c)*(e-(c+=r/++o)));else for(;++a<i;)isNaN(e=u(n(t[a],a,t)))||(f+=(r=e-c)*(e-(c+=r/++o)));if(o>1)return f/(o-1)}function f(t,n){var e=c(t,n);return e?Math.sqrt(e):e}function s(t,n){var e,r,i,o=t.length,a=-1;if(null==n){for(;++a<o;)if(null!=(e=t[a])&&e>=e)for(r=i=e;++a<o;)null!=(e=t[a])&&(r>e&&(r=e),i<e&&(i=e))}else for(;++a<o;)if(null!=(e=n(t[a],a,t))&&e>=e)for(r=i=e;++a<o;)null!=(e=n(t[a],a,t))&&(r>e&&(r=e),i<e&&(i=e));return[r,i]}var l=Array.prototype,h=l.slice,d=l.map;function p(t){return function(){return t}}function v(t){return t}function g(t,n,e){t=+t,n=+n,e=(i=arguments.length)<2?(n=t,t=0,1):i<3?1:+e;for(var r=-1,i=0|Math.max(0,Math.ceil((n-t)/e)),o=new Array(i);++r<i;)o[r]=t+r*e;return o}var y=Math.sqrt(50),_=Math.sqrt(10),b=Math.sqrt(2);function m(t,n,e){var r,i,o,a,u=-1;if(e=+e,(t=+t)===(n=+n)&&e>0)return[t];if((r=n<t)&&(i=t,t=n,n=i),0===(a=x(t,n,e))||!isFinite(a))return[];if(a>0)for(t=Math.ceil(t/a),n=Math.floor(n/a),o=new Array(i=Math.ceil(n-t+1));++u<i;)o[u]=(t+u)*a;else for(t=Math.floor(t*a),n=Math.ceil(n*a),o=new Array(i=Math.ceil(t-n+1));++u<i;)o[u]=(t-u)/a;return r&&o.reverse(),o}function x(t,n,e){var r=(n-t)/Math.max(0,e),i=Math.floor(Math.log(r)/Math.LN10),o=r/Math.pow(10,i);return i>=0?(o>=y?10:o>=_?5:o>=b?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(o>=y?10:o>=_?5:o>=b?2:1)}function w(t,n,e){var r=Math.abs(n-t)/Math.max(0,e),i=Math.pow(10,Math.floor(Math.log(r)/Math.LN10)),o=r/i;return o>=y?i*=10:o>=_?i*=5:o>=b&&(i*=2),n<t?-i:i}function M(t){return Math.ceil(Math.log(t.length)/Math.LN2)+1}function N(t,n,e){if(null==e&&(e=u),r=t.length){if((n=+n)<=0||r<2)return+e(t[0],0,t);if(n>=1)return+e(t[r-1],r-1,t);var r,i=(r-1)*n,o=Math.floor(i),a=+e(t[o],o,t);return a+(+e(t[o+1],o+1,t)-a)*(i-o)}}function T(t,n){var e,r,i=t.length,o=-1;if(null==n){for(;++o<i;)if(null!=(e=t[o])&&e>=e)for(r=e;++o<i;)null!=(e=t[o])&&e>r&&(r=e)}else for(;++o<i;)if(null!=(e=n(t[o],o,t))&&e>=e)for(r=e;++o<i;)null!=(e=n(t[o],o,t))&&e>r&&(r=e);return r}function A(t){for(var n,e,r,i=t.length,o=-1,a=0;++o<i;)a+=t[o].length;for(e=new Array(a);--i>=0;)for(n=(r=t[i]).length;--n>=0;)e[--a]=r[n];return e}function S(t,n){var e,r,i=t.length,o=-1;if(null==n){for(;++o<i;)if(null!=(e=t[o])&&e>=e)for(r=e;++o<i;)null!=(e=t[o])&&r>e&&(r=e)}else for(;++o<i;)if(null!=(e=n(t[o],o,t))&&e>=e)for(r=e;++o<i;)null!=(e=n(t[o],o,t))&&r>e&&(r=e);return r}function k(t){if(!(i=t.length))return[];for(var n=-1,e=S(t,E),r=new Array(e);++n<e;)for(var i,o=-1,a=r[n]=new Array(i);++o<i;)a[o]=t[o][n];return r}function E(t){return t.length}var C=Array.prototype.slice;function P(t){return t}var z=1,R=2,D=3,q=4,L=1e-6;function U(t){return\"translate(\"+(t+.5)+\",0)\"}function O(t){return\"translate(0,\"+(t+.5)+\")\"}function B(){return!this.__axis}function F(t,n){var e=[],r=null,i=null,o=6,a=6,u=3,c=t===z||t===q?-1:1,f=t===q||t===R?\"x\":\"y\",s=t===z||t===D?U:O;function l(l){var h=null==r?n.ticks?n.ticks.apply(n,e):n.domain():r,d=null==i?n.tickFormat?n.tickFormat.apply(n,e):P:i,p=Math.max(o,0)+u,v=n.range(),g=+v[0]+.5,y=+v[v.length-1]+.5,_=(n.bandwidth?function(t){var n=Math.max(0,t.bandwidth()-1)/2;return t.round()&&(n=Math.round(n)),function(e){return+t(e)+n}}:function(t){return function(n){return+t(n)}})(n.copy()),b=l.selection?l.selection():l,m=b.selectAll(\".domain\").data([null]),x=b.selectAll(\".tick\").data(h,n).order(),w=x.exit(),M=x.enter().append(\"g\").attr(\"class\",\"tick\"),N=x.select(\"line\"),T=x.select(\"text\");m=m.merge(m.enter().insert(\"path\",\".tick\").attr(\"class\",\"domain\").attr(\"stroke\",\"currentColor\")),x=x.merge(M),N=N.merge(M.append(\"line\").attr(\"stroke\",\"currentColor\").attr(f+\"2\",c*o)),T=T.merge(M.append(\"text\").attr(\"fill\",\"currentColor\").attr(f,c*p).attr(\"dy\",t===z?\"0em\":t===D?\"0.71em\":\"0.32em\")),l!==b&&(m=m.transition(l),x=x.transition(l),N=N.transition(l),T=T.transition(l),w=w.transition(l).attr(\"opacity\",L).attr(\"transform\",function(t){return isFinite(t=_(t))?s(t):this.getAttribute(\"transform\")}),M.attr(\"opacity\",L).attr(\"transform\",function(t){var n=this.parentNode.__axis;return s(n&&isFinite(n=n(t))?n:_(t))})),w.remove(),m.attr(\"d\",t===q||t==R?a?\"M\"+c*a+\",\"+g+\"H0.5V\"+y+\"H\"+c*a:\"M0.5,\"+g+\"V\"+y:a?\"M\"+g+\",\"+c*a+\"V0.5H\"+y+\"V\"+c*a:\"M\"+g+\",0.5H\"+y),x.attr(\"opacity\",1).attr(\"transform\",function(t){return s(_(t))}),N.attr(f+\"2\",c*o),T.attr(f,c*p).text(d),b.filter(B).attr(\"fill\",\"none\").attr(\"font-size\",10).attr(\"font-family\",\"sans-serif\").attr(\"text-anchor\",t===R?\"start\":t===q?\"end\":\"middle\"),b.each(function(){this.__axis=_})}return l.scale=function(t){return arguments.length?(n=t,l):n},l.ticks=function(){return e=C.call(arguments),l},l.tickArguments=function(t){return arguments.length?(e=null==t?[]:C.call(t),l):e.slice()},l.tickValues=function(t){return arguments.length?(r=null==t?null:C.call(t),l):r&&r.slice()},l.tickFormat=function(t){return arguments.length?(i=t,l):i},l.tickSize=function(t){return arguments.length?(o=a=+t,l):o},l.tickSizeInner=function(t){return arguments.length?(o=+t,l):o},l.tickSizeOuter=function(t){return arguments.length?(a=+t,l):a},l.tickPadding=function(t){return arguments.length?(u=+t,l):u},l}var Y={value:function(){}};function I(){for(var t,n=0,e=arguments.length,r={};n<e;++n){if(!(t=arguments[n]+\"\")||t in r||/[\\s.]/.test(t))throw new Error(\"illegal type: \"+t);r[t]=[]}return new H(r)}function H(t){this._=t}function j(t,n){return t.trim().split(/^|\\s+/).map(function(t){var e=\"\",r=t.indexOf(\".\");if(r>=0&&(e=t.slice(r+1),t=t.slice(0,r)),t&&!n.hasOwnProperty(t))throw new Error(\"unknown type: \"+t);return{type:t,name:e}})}function V(t,n){for(var e,r=0,i=t.length;r<i;++r)if((e=t[r]).name===n)return e.value}function X(t,n,e){for(var r=0,i=t.length;r<i;++r)if(t[r].name===n){t[r]=Y,t=t.slice(0,r).concat(t.slice(r+1));break}return null!=e&&t.push({name:n,value:e}),t}H.prototype=I.prototype={constructor:H,on:function(t,n){var e,r=this._,i=j(t+\"\",r),o=-1,a=i.length;if(!(arguments.length<2)){if(null!=n&&\"function\"!=typeof n)throw new Error(\"invalid callback: \"+n);for(;++o<a;)if(e=(t=i[o]).type)r[e]=X(r[e],t.name,n);else if(null==n)for(e in r)r[e]=X(r[e],t.name,null);return this}for(;++o<a;)if((e=(t=i[o]).type)&&(e=V(r[e],t.name)))return e},copy:function(){var t={},n=this._;for(var e in n)t[e]=n[e].slice();return new H(t)},call:function(t,n){if((e=arguments.length-2)>0)for(var e,r,i=new Array(e),o=0;o<e;++o)i[o]=arguments[o+2];if(!this._.hasOwnProperty(t))throw new Error(\"unknown type: \"+t);for(o=0,e=(r=this._[t]).length;o<e;++o)r[o].value.apply(n,i)},apply:function(t,n,e){if(!this._.hasOwnProperty(t))throw new Error(\"unknown type: \"+t);for(var r=this._[t],i=0,o=r.length;i<o;++i)r[i].value.apply(n,e)}};var G=\"http://www.w3.org/1999/xhtml\",$={svg:\"http://www.w3.org/2000/svg\",xhtml:G,xlink:\"http://www.w3.org/1999/xlink\",xml:\"http://www.w3.org/XML/1998/namespace\",xmlns:\"http://www.w3.org/2000/xmlns/\"};function W(t){var n=t+=\"\",e=n.indexOf(\":\");return e>=0&&\"xmlns\"!==(n=t.slice(0,e))&&(t=t.slice(e+1)),$.hasOwnProperty(n)?{space:$[n],local:t}:t}function Z(t){var n=W(t);return(n.local?function(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}:function(t){return function(){var n=this.ownerDocument,e=this.namespaceURI;return e===G&&n.documentElement.namespaceURI===G?n.createElement(t):n.createElementNS(e,t)}})(n)}function Q(){}function K(t){return null==t?Q:function(){return this.querySelector(t)}}function J(){return[]}function tt(t){return null==t?J:function(){return this.querySelectorAll(t)}}function nt(t){return function(){return this.matches(t)}}function et(t){return new Array(t.length)}function rt(t,n){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=n}rt.prototype={constructor:rt,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,n){return this._parent.insertBefore(t,n)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};var it=\"$\";function ot(t,n,e,r,i,o){for(var a,u=0,c=n.length,f=o.length;u<f;++u)(a=n[u])?(a.__data__=o[u],r[u]=a):e[u]=new rt(t,o[u]);for(;u<c;++u)(a=n[u])&&(i[u]=a)}function at(t,n,e,r,i,o,a){var u,c,f,s={},l=n.length,h=o.length,d=new Array(l);for(u=0;u<l;++u)(c=n[u])&&(d[u]=f=it+a.call(c,c.__data__,u,n),f in s?i[u]=c:s[f]=c);for(u=0;u<h;++u)(c=s[f=it+a.call(t,o[u],u,o)])?(r[u]=c,c.__data__=o[u],s[f]=null):e[u]=new rt(t,o[u]);for(u=0;u<l;++u)(c=n[u])&&s[d[u]]===c&&(i[u]=c)}function ut(t,n){return t<n?-1:t>n?1:t>=n?0:NaN}function ct(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function ft(t,n){return t.style.getPropertyValue(n)||ct(t).getComputedStyle(t,null).getPropertyValue(n)}function st(t){return t.trim().split(/^|\\s+/)}function lt(t){return t.classList||new ht(t)}function ht(t){this._node=t,this._names=st(t.getAttribute(\"class\")||\"\")}function dt(t,n){for(var e=lt(t),r=-1,i=n.length;++r<i;)e.add(n[r])}function pt(t,n){for(var e=lt(t),r=-1,i=n.length;++r<i;)e.remove(n[r])}function vt(){this.textContent=\"\"}function gt(){this.innerHTML=\"\"}function yt(){this.nextSibling&&this.parentNode.appendChild(this)}function _t(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function bt(){return null}function mt(){var t=this.parentNode;t&&t.removeChild(this)}function xt(){var t=this.cloneNode(!1),n=this.parentNode;return n?n.insertBefore(t,this.nextSibling):t}function wt(){var t=this.cloneNode(!0),n=this.parentNode;return n?n.insertBefore(t,this.nextSibling):t}ht.prototype={add:function(t){this._names.indexOf(t)<0&&(this._names.push(t),this._node.setAttribute(\"class\",this._names.join(\" \")))},remove:function(t){var n=this._names.indexOf(t);n>=0&&(this._names.splice(n,1),this._node.setAttribute(\"class\",this._names.join(\" \")))},contains:function(t){return this._names.indexOf(t)>=0}};var Mt={};(t.event=null,\"undefined\"!=typeof document)&&(\"onmouseenter\"in document.documentElement||(Mt={mouseenter:\"mouseover\",mouseleave:\"mouseout\"}));function Nt(t,n,e){return t=Tt(t,n,e),function(n){var e=n.relatedTarget;e&&(e===this||8&e.compareDocumentPosition(this))||t.call(this,n)}}function Tt(n,e,r){return function(i){var o=t.event;t.event=i;try{n.call(this,this.__data__,e,r)}finally{t.event=o}}}function At(t){return function(){var n=this.__on;if(n){for(var e,r=0,i=-1,o=n.length;r<o;++r)e=n[r],t.type&&e.type!==t.type||e.name!==t.name?n[++i]=e:this.removeEventListener(e.type,e.listener,e.capture);++i?n.length=i:delete this.__on}}}function St(t,n,e){var r=Mt.hasOwnProperty(t.type)?Nt:Tt;return function(i,o,a){var u,c=this.__on,f=r(n,o,a);if(c)for(var s=0,l=c.length;s<l;++s)if((u=c[s]).type===t.type&&u.name===t.name)return this.removeEventListener(u.type,u.listener,u.capture),this.addEventListener(u.type,u.listener=f,u.capture=e),void(u.value=n);this.addEventListener(t.type,f,e),u={type:t.type,name:t.name,value:n,listener:f,capture:e},c?c.push(u):this.__on=[u]}}function kt(n,e,r,i){var o=t.event;n.sourceEvent=t.event,t.event=n;try{return e.apply(r,i)}finally{t.event=o}}function Et(t,n,e){var r=ct(t),i=r.CustomEvent;\"function\"==typeof i?i=new i(n,e):(i=r.document.createEvent(\"Event\"),e?(i.initEvent(n,e.bubbles,e.cancelable),i.detail=e.detail):i.initEvent(n,!1,!1)),t.dispatchEvent(i)}var Ct=[null];function Pt(t,n){this._groups=t,this._parents=n}function zt(){return new Pt([[document.documentElement]],Ct)}function Rt(t){return\"string\"==typeof t?new Pt([[document.querySelector(t)]],[document.documentElement]):new Pt([[t]],Ct)}Pt.prototype=zt.prototype={constructor:Pt,select:function(t){\"function\"!=typeof t&&(t=K(t));for(var n=this._groups,e=n.length,r=new Array(e),i=0;i<e;++i)for(var o,a,u=n[i],c=u.length,f=r[i]=new Array(c),s=0;s<c;++s)(o=u[s])&&(a=t.call(o,o.__data__,s,u))&&(\"__data__\"in o&&(a.__data__=o.__data__),f[s]=a);return new Pt(r,this._parents)},selectAll:function(t){\"function\"!=typeof t&&(t=tt(t));for(var n=this._groups,e=n.length,r=[],i=[],o=0;o<e;++o)for(var a,u=n[o],c=u.length,f=0;f<c;++f)(a=u[f])&&(r.push(t.call(a,a.__data__,f,u)),i.push(a));return new Pt(r,i)},filter:function(t){\"function\"!=typeof t&&(t=nt(t));for(var n=this._groups,e=n.length,r=new Array(e),i=0;i<e;++i)for(var o,a=n[i],u=a.length,c=r[i]=[],f=0;f<u;++f)(o=a[f])&&t.call(o,o.__data__,f,a)&&c.push(o);return new Pt(r,this._parents)},data:function(t,n){if(!t)return d=new Array(this.size()),f=-1,this.each(function(t){d[++f]=t}),d;var e=n?at:ot,r=this._parents,i=this._groups;\"function\"!=typeof t&&(t=function(t){return function(){return t}}(t));for(var o=i.length,a=new Array(o),u=new Array(o),c=new Array(o),f=0;f<o;++f){var s=r[f],l=i[f],h=l.length,d=t.call(s,s&&s.__data__,f,r),p=d.length,v=u[f]=new Array(p),g=a[f]=new Array(p);e(s,l,v,g,c[f]=new Array(h),d,n);for(var y,_,b=0,m=0;b<p;++b)if(y=v[b]){for(b>=m&&(m=b+1);!(_=g[m])&&++m<p;);y._next=_||null}}return(a=new Pt(a,r))._enter=u,a._exit=c,a},enter:function(){return new Pt(this._enter||this._groups.map(et),this._parents)},exit:function(){return new Pt(this._exit||this._groups.map(et),this._parents)},join:function(t,n,e){var r=this.enter(),i=this,o=this.exit();return r=\"function\"==typeof t?t(r):r.append(t+\"\"),null!=n&&(i=n(i)),null==e?o.remove():e(o),r&&i?r.merge(i).order():i},merge:function(t){for(var n=this._groups,e=t._groups,r=n.length,i=e.length,o=Math.min(r,i),a=new Array(r),u=0;u<o;++u)for(var c,f=n[u],s=e[u],l=f.length,h=a[u]=new Array(l),d=0;d<l;++d)(c=f[d]||s[d])&&(h[d]=c);for(;u<r;++u)a[u]=n[u];return new Pt(a,this._parents)},order:function(){for(var t=this._groups,n=-1,e=t.length;++n<e;)for(var r,i=t[n],o=i.length-1,a=i[o];--o>=0;)(r=i[o])&&(a&&4^r.compareDocumentPosition(a)&&a.parentNode.insertBefore(r,a),a=r);return this},sort:function(t){function n(n,e){return n&&e?t(n.__data__,e.__data__):!n-!e}t||(t=ut);for(var e=this._groups,r=e.length,i=new Array(r),o=0;o<r;++o){for(var a,u=e[o],c=u.length,f=i[o]=new Array(c),s=0;s<c;++s)(a=u[s])&&(f[s]=a);f.sort(n)}return new Pt(i,this._parents).order()},call:function(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this},nodes:function(){var t=new Array(this.size()),n=-1;return this.each(function(){t[++n]=this}),t},node:function(){for(var t=this._groups,n=0,e=t.length;n<e;++n)for(var r=t[n],i=0,o=r.length;i<o;++i){var a=r[i];if(a)return a}return null},size:function(){var t=0;return this.each(function(){++t}),t},empty:function(){return!this.node()},each:function(t){for(var n=this._groups,e=0,r=n.length;e<r;++e)for(var i,o=n[e],a=0,u=o.length;a<u;++a)(i=o[a])&&t.call(i,i.__data__,a,o);return this},attr:function(t,n){var e=W(t);if(arguments.length<2){var r=this.node();return e.local?r.getAttributeNS(e.space,e.local):r.getAttribute(e)}return this.each((null==n?e.local?function(t){return function(){this.removeAttributeNS(t.space,t.local)}}:function(t){return function(){this.removeAttribute(t)}}:\"function\"==typeof n?e.local?function(t,n){return function(){var e=n.apply(this,arguments);null==e?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,e)}}:function(t,n){return function(){var e=n.apply(this,arguments);null==e?this.removeAttribute(t):this.setAttribute(t,e)}}:e.local?function(t,n){return function(){this.setAttributeNS(t.space,t.local,n)}}:function(t,n){return function(){this.setAttribute(t,n)}})(e,n))},style:function(t,n,e){return arguments.length>1?this.each((null==n?function(t){return function(){this.style.removeProperty(t)}}:\"function\"==typeof n?function(t,n,e){return function(){var r=n.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,e)}}:function(t,n,e){return function(){this.style.setProperty(t,n,e)}})(t,n,null==e?\"\":e)):ft(this.node(),t)},property:function(t,n){return arguments.length>1?this.each((null==n?function(t){return function(){delete this[t]}}:\"function\"==typeof n?function(t,n){return function(){var e=n.apply(this,arguments);null==e?delete this[t]:this[t]=e}}:function(t,n){return function(){this[t]=n}})(t,n)):this.node()[t]},classed:function(t,n){var e=st(t+\"\");if(arguments.length<2){for(var r=lt(this.node()),i=-1,o=e.length;++i<o;)if(!r.contains(e[i]))return!1;return!0}return this.each((\"function\"==typeof n?function(t,n){return function(){(n.apply(this,arguments)?dt:pt)(this,t)}}:n?function(t){return function(){dt(this,t)}}:function(t){return function(){pt(this,t)}})(e,n))},text:function(t){return arguments.length?this.each(null==t?vt:(\"function\"==typeof t?function(t){return function(){var n=t.apply(this,arguments);this.textContent=null==n?\"\":n}}:function(t){return function(){this.textContent=t}})(t)):this.node().textContent},html:function(t){return arguments.length?this.each(null==t?gt:(\"function\"==typeof t?function(t){return function(){var n=t.apply(this,arguments);this.innerHTML=null==n?\"\":n}}:function(t){return function(){this.innerHTML=t}})(t)):this.node().innerHTML},raise:function(){return this.each(yt)},lower:function(){return this.each(_t)},append:function(t){var n=\"function\"==typeof t?t:Z(t);return this.select(function(){return this.appendChild(n.apply(this,arguments))})},insert:function(t,n){var e=\"function\"==typeof t?t:Z(t),r=null==n?bt:\"function\"==typeof n?n:K(n);return this.select(function(){return this.insertBefore(e.apply(this,arguments),r.apply(this,arguments)||null)})},remove:function(){return this.each(mt)},clone:function(t){return this.select(t?wt:xt)},datum:function(t){return arguments.length?this.property(\"__data__\",t):this.node().__data__},on:function(t,n,e){var r,i,o=function(t){return t.trim().split(/^|\\s+/).map(function(t){var n=\"\",e=t.indexOf(\".\");return e>=0&&(n=t.slice(e+1),t=t.slice(0,e)),{type:t,name:n}})}(t+\"\"),a=o.length;if(!(arguments.length<2)){for(u=n?St:At,null==e&&(e=!1),r=0;r<a;++r)this.each(u(o[r],n,e));return this}var u=this.node().__on;if(u)for(var c,f=0,s=u.length;f<s;++f)for(r=0,c=u[f];r<a;++r)if((i=o[r]).type===c.type&&i.name===c.name)return c.value},dispatch:function(t,n){return this.each((\"function\"==typeof n?function(t,n){return function(){return Et(this,t,n.apply(this,arguments))}}:function(t,n){return function(){return Et(this,t,n)}})(t,n))}};var Dt=0;function qt(){return new Lt}function Lt(){this._=\"@\"+(++Dt).toString(36)}function Ut(){for(var n,e=t.event;n=e.sourceEvent;)e=n;return e}function Ot(t,n){var e=t.ownerSVGElement||t;if(e.createSVGPoint){var r=e.createSVGPoint();return r.x=n.clientX,r.y=n.clientY,[(r=r.matrixTransform(t.getScreenCTM().inverse())).x,r.y]}var i=t.getBoundingClientRect();return[n.clientX-i.left-t.clientLeft,n.clientY-i.top-t.clientTop]}function Bt(t){var n=Ut();return n.changedTouches&&(n=n.changedTouches[0]),Ot(t,n)}function Ft(t,n,e){arguments.length<3&&(e=n,n=Ut().changedTouches);for(var r,i=0,o=n?n.length:0;i<o;++i)if((r=n[i]).identifier===e)return Ot(t,r);return null}function Yt(){t.event.stopImmediatePropagation()}function It(){t.event.preventDefault(),t.event.stopImmediatePropagation()}function Ht(t){var n=t.document.documentElement,e=Rt(t).on(\"dragstart.drag\",It,!0);\"onselectstart\"in n?e.on(\"selectstart.drag\",It,!0):(n.__noselect=n.style.MozUserSelect,n.style.MozUserSelect=\"none\")}function jt(t,n){var e=t.document.documentElement,r=Rt(t).on(\"dragstart.drag\",null);n&&(r.on(\"click.drag\",It,!0),setTimeout(function(){r.on(\"click.drag\",null)},0)),\"onselectstart\"in e?r.on(\"selectstart.drag\",null):(e.style.MozUserSelect=e.__noselect,delete e.__noselect)}function Vt(t){return function(){return t}}function Xt(t,n,e,r,i,o,a,u,c,f){this.target=t,this.type=n,this.subject=e,this.identifier=r,this.active=i,this.x=o,this.y=a,this.dx=u,this.dy=c,this._=f}function Gt(){return!t.event.ctrlKey&&!t.event.button}function $t(){return this.parentNode}function Wt(n){return null==n?{x:t.event.x,y:t.event.y}:n}function Zt(){return navigator.maxTouchPoints||\"ontouchstart\"in this}function Qt(t,n,e){t.prototype=n.prototype=e,e.constructor=t}function Kt(t,n){var e=Object.create(t.prototype);for(var r in n)e[r]=n[r];return e}function Jt(){}Lt.prototype=qt.prototype={constructor:Lt,get:function(t){for(var n=this._;!(n in t);)if(!(t=t.parentNode))return;return t[n]},set:function(t,n){return t[this._]=n},remove:function(t){return this._ in t&&delete t[this._]},toString:function(){return this._}},Xt.prototype.on=function(){var t=this._.on.apply(this._,arguments);return t===this._?this:t};var tn=\"\\\\s*([+-]?\\\\d+)\\\\s*\",nn=\"\\\\s*([+-]?\\\\d*\\\\.?\\\\d+(?:[eE][+-]?\\\\d+)?)\\\\s*\",en=\"\\\\s*([+-]?\\\\d*\\\\.?\\\\d+(?:[eE][+-]?\\\\d+)?)%\\\\s*\",rn=/^#([0-9a-f]{3,8})$/,on=new RegExp(\"^rgb\\\\(\"+[tn,tn,tn]+\"\\\\)$\"),an=new RegExp(\"^rgb\\\\(\"+[en,en,en]+\"\\\\)$\"),un=new RegExp(\"^rgba\\\\(\"+[tn,tn,tn,nn]+\"\\\\)$\"),cn=new RegExp(\"^rgba\\\\(\"+[en,en,en,nn]+\"\\\\)$\"),fn=new RegExp(\"^hsl\\\\(\"+[nn,en,en]+\"\\\\)$\"),sn=new RegExp(\"^hsla\\\\(\"+[nn,en,en,nn]+\"\\\\)$\"),ln={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function hn(){return this.rgb().formatHex()}function dn(){return this.rgb().formatRgb()}function pn(t){var n,e;return t=(t+\"\").trim().toLowerCase(),(n=rn.exec(t))?(e=n[1].length,n=parseInt(n[1],16),6===e?vn(n):3===e?new bn(n>>8&15|n>>4&240,n>>4&15|240&n,(15&n)<<4|15&n,1):8===e?new bn(n>>24&255,n>>16&255,n>>8&255,(255&n)/255):4===e?new bn(n>>12&15|n>>8&240,n>>8&15|n>>4&240,n>>4&15|240&n,((15&n)<<4|15&n)/255):null):(n=on.exec(t))?new bn(n[1],n[2],n[3],1):(n=an.exec(t))?new bn(255*n[1]/100,255*n[2]/100,255*n[3]/100,1):(n=un.exec(t))?gn(n[1],n[2],n[3],n[4]):(n=cn.exec(t))?gn(255*n[1]/100,255*n[2]/100,255*n[3]/100,n[4]):(n=fn.exec(t))?Mn(n[1],n[2]/100,n[3]/100,1):(n=sn.exec(t))?Mn(n[1],n[2]/100,n[3]/100,n[4]):ln.hasOwnProperty(t)?vn(ln[t]):\"transparent\"===t?new bn(NaN,NaN,NaN,0):null}function vn(t){return new bn(t>>16&255,t>>8&255,255&t,1)}function gn(t,n,e,r){return r<=0&&(t=n=e=NaN),new bn(t,n,e,r)}function yn(t){return t instanceof Jt||(t=pn(t)),t?new bn((t=t.rgb()).r,t.g,t.b,t.opacity):new bn}function _n(t,n,e,r){return 1===arguments.length?yn(t):new bn(t,n,e,null==r?1:r)}function bn(t,n,e,r){this.r=+t,this.g=+n,this.b=+e,this.opacity=+r}function mn(){return\"#\"+wn(this.r)+wn(this.g)+wn(this.b)}function xn(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?\"rgb(\":\"rgba(\")+Math.max(0,Math.min(255,Math.round(this.r)||0))+\", \"+Math.max(0,Math.min(255,Math.round(this.g)||0))+\", \"+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===t?\")\":\", \"+t+\")\")}function wn(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?\"0\":\"\")+t.toString(16)}function Mn(t,n,e,r){return r<=0?t=n=e=NaN:e<=0||e>=1?t=n=NaN:n<=0&&(t=NaN),new An(t,n,e,r)}function Nn(t){if(t instanceof An)return new An(t.h,t.s,t.l,t.opacity);if(t instanceof Jt||(t=pn(t)),!t)return new An;if(t instanceof An)return t;var n=(t=t.rgb()).r/255,e=t.g/255,r=t.b/255,i=Math.min(n,e,r),o=Math.max(n,e,r),a=NaN,u=o-i,c=(o+i)/2;return u?(a=n===o?(e-r)/u+6*(e<r):e===o?(r-n)/u+2:(n-e)/u+4,u/=c<.5?o+i:2-o-i,a*=60):u=c>0&&c<1?0:a,new An(a,u,c,t.opacity)}function Tn(t,n,e,r){return 1===arguments.length?Nn(t):new An(t,n,e,null==r?1:r)}function An(t,n,e,r){this.h=+t,this.s=+n,this.l=+e,this.opacity=+r}function Sn(t,n,e){return 255*(t<60?n+(e-n)*t/60:t<180?e:t<240?n+(e-n)*(240-t)/60:n)}Qt(Jt,pn,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:hn,formatHex:hn,formatHsl:function(){return Nn(this).formatHsl()},formatRgb:dn,toString:dn}),Qt(bn,_n,Kt(Jt,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new bn(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new bn(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:mn,formatHex:mn,formatRgb:xn,toString:xn})),Qt(An,Tn,Kt(Jt,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new An(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new An(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(this.h<0),n=isNaN(t)||isNaN(this.s)?0:this.s,e=this.l,r=e+(e<.5?e:1-e)*n,i=2*e-r;return new bn(Sn(t>=240?t-240:t+120,i,r),Sn(t,i,r),Sn(t<120?t+240:t-120,i,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?\"hsl(\":\"hsla(\")+(this.h||0)+\", \"+100*(this.s||0)+\"%, \"+100*(this.l||0)+\"%\"+(1===t?\")\":\", \"+t+\")\")}}));var kn=Math.PI/180,En=180/Math.PI,Cn=.96422,Pn=1,zn=.82521,Rn=4/29,Dn=6/29,qn=3*Dn*Dn,Ln=Dn*Dn*Dn;function Un(t){if(t instanceof Bn)return new Bn(t.l,t.a,t.b,t.opacity);if(t instanceof Xn)return Gn(t);t instanceof bn||(t=yn(t));var n,e,r=Hn(t.r),i=Hn(t.g),o=Hn(t.b),a=Fn((.2225045*r+.7168786*i+.0606169*o)/Pn);return r===i&&i===o?n=e=a:(n=Fn((.4360747*r+.3850649*i+.1430804*o)/Cn),e=Fn((.0139322*r+.0971045*i+.7141733*o)/zn)),new Bn(116*a-16,500*(n-a),200*(a-e),t.opacity)}function On(t,n,e,r){return 1===arguments.length?Un(t):new Bn(t,n,e,null==r?1:r)}function Bn(t,n,e,r){this.l=+t,this.a=+n,this.b=+e,this.opacity=+r}function Fn(t){return t>Ln?Math.pow(t,1/3):t/qn+Rn}function Yn(t){return t>Dn?t*t*t:qn*(t-Rn)}function In(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function Hn(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function jn(t){if(t instanceof Xn)return new Xn(t.h,t.c,t.l,t.opacity);if(t instanceof Bn||(t=Un(t)),0===t.a&&0===t.b)return new Xn(NaN,0<t.l&&t.l<100?0:NaN,t.l,t.opacity);var n=Math.atan2(t.b,t.a)*En;return new Xn(n<0?n+360:n,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}function Vn(t,n,e,r){return 1===arguments.length?jn(t):new Xn(t,n,e,null==r?1:r)}function Xn(t,n,e,r){this.h=+t,this.c=+n,this.l=+e,this.opacity=+r}function Gn(t){if(isNaN(t.h))return new Bn(t.l,0,0,t.opacity);var n=t.h*kn;return new Bn(t.l,Math.cos(n)*t.c,Math.sin(n)*t.c,t.opacity)}Qt(Bn,On,Kt(Jt,{brighter:function(t){return new Bn(this.l+18*(null==t?1:t),this.a,this.b,this.opacity)},darker:function(t){return new Bn(this.l-18*(null==t?1:t),this.a,this.b,this.opacity)},rgb:function(){var t=(this.l+16)/116,n=isNaN(this.a)?t:t+this.a/500,e=isNaN(this.b)?t:t-this.b/200;return new bn(In(3.1338561*(n=Cn*Yn(n))-1.6168667*(t=Pn*Yn(t))-.4906146*(e=zn*Yn(e))),In(-.9787684*n+1.9161415*t+.033454*e),In(.0719453*n-.2289914*t+1.4052427*e),this.opacity)}})),Qt(Xn,Vn,Kt(Jt,{brighter:function(t){return new Xn(this.h,this.c,this.l+18*(null==t?1:t),this.opacity)},darker:function(t){return new Xn(this.h,this.c,this.l-18*(null==t?1:t),this.opacity)},rgb:function(){return Gn(this).rgb()}}));var $n=-.14861,Wn=1.78277,Zn=-.29227,Qn=-.90649,Kn=1.97294,Jn=Kn*Qn,te=Kn*Wn,ne=Wn*Zn-Qn*$n;function ee(t,n,e,r){return 1===arguments.length?function(t){if(t instanceof re)return new re(t.h,t.s,t.l,t.opacity);t instanceof bn||(t=yn(t));var n=t.r/255,e=t.g/255,r=t.b/255,i=(ne*r+Jn*n-te*e)/(ne+Jn-te),o=r-i,a=(Kn*(e-i)-Zn*o)/Qn,u=Math.sqrt(a*a+o*o)/(Kn*i*(1-i)),c=u?Math.atan2(a,o)*En-120:NaN;return new re(c<0?c+360:c,u,i,t.opacity)}(t):new re(t,n,e,null==r?1:r)}function re(t,n,e,r){this.h=+t,this.s=+n,this.l=+e,this.opacity=+r}function ie(t,n,e,r,i){var o=t*t,a=o*t;return((1-3*t+3*o-a)*n+(4-6*o+3*a)*e+(1+3*t+3*o-3*a)*r+a*i)/6}function oe(t){var n=t.length-1;return function(e){var r=e<=0?e=0:e>=1?(e=1,n-1):Math.floor(e*n),i=t[r],o=t[r+1],a=r>0?t[r-1]:2*i-o,u=r<n-1?t[r+2]:2*o-i;return ie((e-r/n)*n,a,i,o,u)}}function ae(t){var n=t.length;return function(e){var r=Math.floor(((e%=1)<0?++e:e)*n),i=t[(r+n-1)%n],o=t[r%n],a=t[(r+1)%n],u=t[(r+2)%n];return ie((e-r/n)*n,i,o,a,u)}}function ue(t){return function(){return t}}function ce(t,n){return function(e){return t+e*n}}function fe(t,n){var e=n-t;return e?ce(t,e>180||e<-180?e-360*Math.round(e/360):e):ue(isNaN(t)?n:t)}function se(t){return 1==(t=+t)?le:function(n,e){return e-n?function(t,n,e){return t=Math.pow(t,e),n=Math.pow(n,e)-t,e=1/e,function(r){return Math.pow(t+r*n,e)}}(n,e,t):ue(isNaN(n)?e:n)}}function le(t,n){var e=n-t;return e?ce(t,e):ue(isNaN(t)?n:t)}Qt(re,ee,Kt(Jt,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new re(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new re(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=isNaN(this.h)?0:(this.h+120)*kn,n=+this.l,e=isNaN(this.s)?0:this.s*n*(1-n),r=Math.cos(t),i=Math.sin(t);return new bn(255*(n+e*($n*r+Wn*i)),255*(n+e*(Zn*r+Qn*i)),255*(n+e*(Kn*r)),this.opacity)}}));var he=function t(n){var e=se(n);function r(t,n){var r=e((t=_n(t)).r,(n=_n(n)).r),i=e(t.g,n.g),o=e(t.b,n.b),a=le(t.opacity,n.opacity);return function(n){return t.r=r(n),t.g=i(n),t.b=o(n),t.opacity=a(n),t+\"\"}}return r.gamma=t,r}(1);function de(t){return function(n){var e,r,i=n.length,o=new Array(i),a=new Array(i),u=new Array(i);for(e=0;e<i;++e)r=_n(n[e]),o[e]=r.r||0,a[e]=r.g||0,u[e]=r.b||0;return o=t(o),a=t(a),u=t(u),r.opacity=1,function(t){return r.r=o(t),r.g=a(t),r.b=u(t),r+\"\"}}}var pe=de(oe),ve=de(ae);function ge(t,n){n||(n=[]);var e,r=t?Math.min(n.length,t.length):0,i=n.slice();return function(o){for(e=0;e<r;++e)i[e]=t[e]*(1-o)+n[e]*o;return i}}function ye(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function _e(t,n){var e,r=n?n.length:0,i=t?Math.min(r,t.length):0,o=new Array(i),a=new Array(r);for(e=0;e<i;++e)o[e]=Te(t[e],n[e]);for(;e<r;++e)a[e]=n[e];return function(t){for(e=0;e<i;++e)a[e]=o[e](t);return a}}function be(t,n){var e=new Date;return t=+t,n=+n,function(r){return e.setTime(t*(1-r)+n*r),e}}function me(t,n){return t=+t,n=+n,function(e){return t*(1-e)+n*e}}function xe(t,n){var e,r={},i={};for(e in null!==t&&\"object\"==typeof t||(t={}),null!==n&&\"object\"==typeof n||(n={}),n)e in t?r[e]=Te(t[e],n[e]):i[e]=n[e];return function(t){for(e in r)i[e]=r[e](t);return i}}var we=/[-+]?(?:\\d+\\.?\\d*|\\.?\\d+)(?:[eE][-+]?\\d+)?/g,Me=new RegExp(we.source,\"g\");function Ne(t,n){var e,r,i,o=we.lastIndex=Me.lastIndex=0,a=-1,u=[],c=[];for(t+=\"\",n+=\"\";(e=we.exec(t))&&(r=Me.exec(n));)(i=r.index)>o&&(i=n.slice(o,i),u[a]?u[a]+=i:u[++a]=i),(e=e[0])===(r=r[0])?u[a]?u[a]+=r:u[++a]=r:(u[++a]=null,c.push({i:a,x:me(e,r)})),o=Me.lastIndex;return o<n.length&&(i=n.slice(o),u[a]?u[a]+=i:u[++a]=i),u.length<2?c[0]?function(t){return function(n){return t(n)+\"\"}}(c[0].x):function(t){return function(){return t}}(n):(n=c.length,function(t){for(var e,r=0;r<n;++r)u[(e=c[r]).i]=e.x(t);return u.join(\"\")})}function Te(t,n){var e,r=typeof n;return null==n||\"boolean\"===r?ue(n):(\"number\"===r?me:\"string\"===r?(e=pn(n))?(n=e,he):Ne:n instanceof pn?he:n instanceof Date?be:ye(n)?ge:Array.isArray(n)?_e:\"function\"!=typeof n.valueOf&&\"function\"!=typeof n.toString||isNaN(n)?xe:me)(t,n)}function Ae(t,n){return t=+t,n=+n,function(e){return Math.round(t*(1-e)+n*e)}}var Se,ke,Ee,Ce,Pe=180/Math.PI,ze={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Re(t,n,e,r,i,o){var a,u,c;return(a=Math.sqrt(t*t+n*n))&&(t/=a,n/=a),(c=t*e+n*r)&&(e-=t*c,r-=n*c),(u=Math.sqrt(e*e+r*r))&&(e/=u,r/=u,c/=u),t*r<n*e&&(t=-t,n=-n,c=-c,a=-a),{translateX:i,translateY:o,rotate:Math.atan2(n,t)*Pe,skewX:Math.atan(c)*Pe,scaleX:a,scaleY:u}}function De(t,n,e,r){function i(t){return t.length?t.pop()+\" \":\"\"}return function(o,a){var u=[],c=[];return o=t(o),a=t(a),function(t,r,i,o,a,u){if(t!==i||r!==o){var c=a.push(\"translate(\",null,n,null,e);u.push({i:c-4,x:me(t,i)},{i:c-2,x:me(r,o)})}else(i||o)&&a.push(\"translate(\"+i+n+o+e)}(o.translateX,o.translateY,a.translateX,a.translateY,u,c),function(t,n,e,o){t!==n?(t-n>180?n+=360:n-t>180&&(t+=360),o.push({i:e.push(i(e)+\"rotate(\",null,r)-2,x:me(t,n)})):n&&e.push(i(e)+\"rotate(\"+n+r)}(o.rotate,a.rotate,u,c),function(t,n,e,o){t!==n?o.push({i:e.push(i(e)+\"skewX(\",null,r)-2,x:me(t,n)}):n&&e.push(i(e)+\"skewX(\"+n+r)}(o.skewX,a.skewX,u,c),function(t,n,e,r,o,a){if(t!==e||n!==r){var u=o.push(i(o)+\"scale(\",null,\",\",null,\")\");a.push({i:u-4,x:me(t,e)},{i:u-2,x:me(n,r)})}else 1===e&&1===r||o.push(i(o)+\"scale(\"+e+\",\"+r+\")\")}(o.scaleX,o.scaleY,a.scaleX,a.scaleY,u,c),o=a=null,function(t){for(var n,e=-1,r=c.length;++e<r;)u[(n=c[e]).i]=n.x(t);return u.join(\"\")}}}var qe=De(function(t){return\"none\"===t?ze:(Se||(Se=document.createElement(\"DIV\"),ke=document.documentElement,Ee=document.defaultView),Se.style.transform=t,t=Ee.getComputedStyle(ke.appendChild(Se),null).getPropertyValue(\"transform\"),ke.removeChild(Se),Re(+(t=t.slice(7,-1).split(\",\"))[0],+t[1],+t[2],+t[3],+t[4],+t[5]))},\"px, \",\"px)\",\"deg)\"),Le=De(function(t){return null==t?ze:(Ce||(Ce=document.createElementNS(\"http://www.w3.org/2000/svg\",\"g\")),Ce.setAttribute(\"transform\",t),(t=Ce.transform.baseVal.consolidate())?Re((t=t.matrix).a,t.b,t.c,t.d,t.e,t.f):ze)},\", \",\")\",\")\"),Ue=Math.SQRT2,Oe=2,Be=4,Fe=1e-12;function Ye(t){return((t=Math.exp(t))+1/t)/2}function Ie(t,n){var e,r,i=t[0],o=t[1],a=t[2],u=n[0],c=n[1],f=n[2],s=u-i,l=c-o,h=s*s+l*l;if(h<Fe)r=Math.log(f/a)/Ue,e=function(t){return[i+t*s,o+t*l,a*Math.exp(Ue*t*r)]};else{var d=Math.sqrt(h),p=(f*f-a*a+Be*h)/(2*a*Oe*d),v=(f*f-a*a-Be*h)/(2*f*Oe*d),g=Math.log(Math.sqrt(p*p+1)-p),y=Math.log(Math.sqrt(v*v+1)-v);r=(y-g)/Ue,e=function(t){var n=t*r,e=Ye(g),u=a/(Oe*d)*(e*function(t){return((t=Math.exp(2*t))-1)/(t+1)}(Ue*n+g)-function(t){return((t=Math.exp(t))-1/t)/2}(g));return[i+u*s,o+u*l,a*e/Ye(Ue*n+g)]}}return e.duration=1e3*r,e}function He(t){return function(n,e){var r=t((n=Tn(n)).h,(e=Tn(e)).h),i=le(n.s,e.s),o=le(n.l,e.l),a=le(n.opacity,e.opacity);return function(t){return n.h=r(t),n.s=i(t),n.l=o(t),n.opacity=a(t),n+\"\"}}}var je=He(fe),Ve=He(le);function Xe(t){return function(n,e){var r=t((n=Vn(n)).h,(e=Vn(e)).h),i=le(n.c,e.c),o=le(n.l,e.l),a=le(n.opacity,e.opacity);return function(t){return n.h=r(t),n.c=i(t),n.l=o(t),n.opacity=a(t),n+\"\"}}}var Ge=Xe(fe),$e=Xe(le);function We(t){return function n(e){function r(n,r){var i=t((n=ee(n)).h,(r=ee(r)).h),o=le(n.s,r.s),a=le(n.l,r.l),u=le(n.opacity,r.opacity);return function(t){return n.h=i(t),n.s=o(t),n.l=a(Math.pow(t,e)),n.opacity=u(t),n+\"\"}}return e=+e,r.gamma=n,r}(1)}var Ze=We(fe),Qe=We(le);var Ke,Je,tr=0,nr=0,er=0,rr=1e3,ir=0,or=0,ar=0,ur=\"object\"==typeof performance&&performance.now?performance:Date,cr=\"object\"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function fr(){return or||(cr(sr),or=ur.now()+ar)}function sr(){or=0}function lr(){this._call=this._time=this._next=null}function hr(t,n,e){var r=new lr;return r.restart(t,n,e),r}function dr(){fr(),++tr;for(var t,n=Ke;n;)(t=or-n._time)>=0&&n._call.call(null,t),n=n._next;--tr}function pr(){or=(ir=ur.now())+ar,tr=nr=0;try{dr()}finally{tr=0,function(){var t,n,e=Ke,r=1/0;for(;e;)e._call?(r>e._time&&(r=e._time),t=e,e=e._next):(n=e._next,e._next=null,e=t?t._next=n:Ke=n);Je=t,gr(r)}(),or=0}}function vr(){var t=ur.now(),n=t-ir;n>rr&&(ar-=n,ir=t)}function gr(t){tr||(nr&&(nr=clearTimeout(nr)),t-or>24?(t<1/0&&(nr=setTimeout(pr,t-ur.now()-ar)),er&&(er=clearInterval(er))):(er||(ir=ur.now(),er=setInterval(vr,rr)),tr=1,cr(pr)))}function yr(t,n,e){var r=new lr;return n=null==n?0:+n,r.restart(function(e){r.stop(),t(e+n)},n,e),r}lr.prototype=hr.prototype={constructor:lr,restart:function(t,n,e){if(\"function\"!=typeof t)throw new TypeError(\"callback is not a function\");e=(null==e?fr():+e)+(null==n?0:+n),this._next||Je===this||(Je?Je._next=this:Ke=this,Je=this),this._call=t,this._time=e,gr()},stop:function(){this._call&&(this._call=null,this._time=1/0,gr())}};var _r=I(\"start\",\"end\",\"cancel\",\"interrupt\"),br=[],mr=0,xr=1,wr=2,Mr=3,Nr=4,Tr=5,Ar=6;function Sr(t,n,e,r,i,o){var a=t.__transition;if(a){if(e in a)return}else t.__transition={};!function(t,n,e){var r,i=t.__transition;function o(c){var f,s,l,h;if(e.state!==xr)return u();for(f in i)if((h=i[f]).name===e.name){if(h.state===Mr)return yr(o);h.state===Nr?(h.state=Ar,h.timer.stop(),h.on.call(\"interrupt\",t,t.__data__,h.index,h.group),delete i[f]):+f<n&&(h.state=Ar,h.timer.stop(),h.on.call(\"cancel\",t,t.__data__,h.index,h.group),delete i[f])}if(yr(function(){e.state===Mr&&(e.state=Nr,e.timer.restart(a,e.delay,e.time),a(c))}),e.state=wr,e.on.call(\"start\",t,t.__data__,e.index,e.group),e.state===wr){for(e.state=Mr,r=new Array(l=e.tween.length),f=0,s=-1;f<l;++f)(h=e.tween[f].value.call(t,t.__data__,e.index,e.group))&&(r[++s]=h);r.length=s+1}}function a(n){for(var i=n<e.duration?e.ease.call(null,n/e.duration):(e.timer.restart(u),e.state=Tr,1),o=-1,a=r.length;++o<a;)r[o].call(t,i);e.state===Tr&&(e.on.call(\"end\",t,t.__data__,e.index,e.group),u())}function u(){for(var r in e.state=Ar,e.timer.stop(),delete i[n],i)return;delete t.__transition}i[n]=e,e.timer=hr(function(t){e.state=xr,e.timer.restart(o,e.delay,e.time),e.delay<=t&&o(t-e.delay)},0,e.time)}(t,e,{name:n,index:r,group:i,on:_r,tween:br,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:mr})}function kr(t,n){var e=Cr(t,n);if(e.state>mr)throw new Error(\"too late; already scheduled\");return e}function Er(t,n){var e=Cr(t,n);if(e.state>Mr)throw new Error(\"too late; already running\");return e}function Cr(t,n){var e=t.__transition;if(!e||!(e=e[n]))throw new Error(\"transition not found\");return e}function Pr(t,n){var e,r,i,o=t.__transition,a=!0;if(o){for(i in n=null==n?null:n+\"\",o)(e=o[i]).name===n?(r=e.state>wr&&e.state<Tr,e.state=Ar,e.timer.stop(),e.on.call(r?\"interrupt\":\"cancel\",t,t.__data__,e.index,e.group),delete o[i]):a=!1;a&&delete t.__transition}}function zr(t,n,e){var r=t._id;return t.each(function(){var t=Er(this,r);(t.value||(t.value={}))[n]=e.apply(this,arguments)}),function(t){return Cr(t,r).value[n]}}function Rr(t,n){var e;return(\"number\"==typeof n?me:n instanceof pn?he:(e=pn(n))?(n=e,he):Ne)(t,n)}var Dr=zt.prototype.constructor;function qr(t){return function(){this.style.removeProperty(t)}}var Lr=0;function Ur(t,n,e,r){this._groups=t,this._parents=n,this._name=e,this._id=r}function Or(t){return zt().transition(t)}function Br(){return++Lr}var Fr=zt.prototype;function Yr(t){return((t*=2)<=1?t*t:--t*(2-t)+1)/2}function Ir(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}Ur.prototype=Or.prototype={constructor:Ur,select:function(t){var n=this._name,e=this._id;\"function\"!=typeof t&&(t=K(t));for(var r=this._groups,i=r.length,o=new Array(i),a=0;a<i;++a)for(var u,c,f=r[a],s=f.length,l=o[a]=new Array(s),h=0;h<s;++h)(u=f[h])&&(c=t.call(u,u.__data__,h,f))&&(\"__data__\"in u&&(c.__data__=u.__data__),l[h]=c,Sr(l[h],n,e,h,l,Cr(u,e)));return new Ur(o,this._parents,n,e)},selectAll:function(t){var n=this._name,e=this._id;\"function\"!=typeof t&&(t=tt(t));for(var r=this._groups,i=r.length,o=[],a=[],u=0;u<i;++u)for(var c,f=r[u],s=f.length,l=0;l<s;++l)if(c=f[l]){for(var h,d=t.call(c,c.__data__,l,f),p=Cr(c,e),v=0,g=d.length;v<g;++v)(h=d[v])&&Sr(h,n,e,v,d,p);o.push(d),a.push(c)}return new Ur(o,a,n,e)},filter:function(t){\"function\"!=typeof t&&(t=nt(t));for(var n=this._groups,e=n.length,r=new Array(e),i=0;i<e;++i)for(var o,a=n[i],u=a.length,c=r[i]=[],f=0;f<u;++f)(o=a[f])&&t.call(o,o.__data__,f,a)&&c.push(o);return new Ur(r,this._parents,this._name,this._id)},merge:function(t){if(t._id!==this._id)throw new Error;for(var n=this._groups,e=t._groups,r=n.length,i=e.length,o=Math.min(r,i),a=new Array(r),u=0;u<o;++u)for(var c,f=n[u],s=e[u],l=f.length,h=a[u]=new Array(l),d=0;d<l;++d)(c=f[d]||s[d])&&(h[d]=c);for(;u<r;++u)a[u]=n[u];return new Ur(a,this._parents,this._name,this._id)},selection:function(){return new Dr(this._groups,this._parents)},transition:function(){for(var t=this._name,n=this._id,e=Br(),r=this._groups,i=r.length,o=0;o<i;++o)for(var a,u=r[o],c=u.length,f=0;f<c;++f)if(a=u[f]){var s=Cr(a,n);Sr(a,t,e,f,u,{time:s.time+s.delay+s.duration,delay:0,duration:s.duration,ease:s.ease})}return new Ur(r,this._parents,t,e)},call:Fr.call,nodes:Fr.nodes,node:Fr.node,size:Fr.size,empty:Fr.empty,each:Fr.each,on:function(t,n){var e=this._id;return arguments.length<2?Cr(this.node(),e).on.on(t):this.each(function(t,n,e){var r,i,o=function(t){return(t+\"\").trim().split(/^|\\s+/).every(function(t){var n=t.indexOf(\".\");return n>=0&&(t=t.slice(0,n)),!t||\"start\"===t})}(n)?kr:Er;return function(){var a=o(this,t),u=a.on;u!==r&&(i=(r=u).copy()).on(n,e),a.on=i}}(e,t,n))},attr:function(t,n){var e=W(t),r=\"transform\"===e?Le:Rr;return this.attrTween(t,\"function\"==typeof n?(e.local?function(t,n,e){var r,i,o;return function(){var a,u,c=e(this);if(null!=c)return(a=this.getAttributeNS(t.space,t.local))===(u=c+\"\")?null:a===r&&u===i?o:(i=u,o=n(r=a,c));this.removeAttributeNS(t.space,t.local)}}:function(t,n,e){var r,i,o;return function(){var a,u,c=e(this);if(null!=c)return(a=this.getAttribute(t))===(u=c+\"\")?null:a===r&&u===i?o:(i=u,o=n(r=a,c));this.removeAttribute(t)}})(e,r,zr(this,\"attr.\"+t,n)):null==n?(e.local?function(t){return function(){this.removeAttributeNS(t.space,t.local)}}:function(t){return function(){this.removeAttribute(t)}})(e):(e.local?function(t,n,e){var r,i,o=e+\"\";return function(){var a=this.getAttributeNS(t.space,t.local);return a===o?null:a===r?i:i=n(r=a,e)}}:function(t,n,e){var r,i,o=e+\"\";return function(){var a=this.getAttribute(t);return a===o?null:a===r?i:i=n(r=a,e)}})(e,r,n))},attrTween:function(t,n){var e=\"attr.\"+t;if(arguments.length<2)return(e=this.tween(e))&&e._value;if(null==n)return this.tween(e,null);if(\"function\"!=typeof n)throw new Error;var r=W(t);return this.tween(e,(r.local?function(t,n){var e,r;function i(){var i=n.apply(this,arguments);return i!==r&&(e=(r=i)&&function(t,n){return function(e){this.setAttributeNS(t.space,t.local,n.call(this,e))}}(t,i)),e}return i._value=n,i}:function(t,n){var e,r;function i(){var i=n.apply(this,arguments);return i!==r&&(e=(r=i)&&function(t,n){return function(e){this.setAttribute(t,n.call(this,e))}}(t,i)),e}return i._value=n,i})(r,n))},style:function(t,n,e){var r=\"transform\"==(t+=\"\")?qe:Rr;return null==n?this.styleTween(t,function(t,n){var e,r,i;return function(){var o=ft(this,t),a=(this.style.removeProperty(t),ft(this,t));return o===a?null:o===e&&a===r?i:i=n(e=o,r=a)}}(t,r)).on(\"end.style.\"+t,qr(t)):\"function\"==typeof n?this.styleTween(t,function(t,n,e){var r,i,o;return function(){var a=ft(this,t),u=e(this),c=u+\"\";return null==u&&(this.style.removeProperty(t),c=u=ft(this,t)),a===c?null:a===r&&c===i?o:(i=c,o=n(r=a,u))}}(t,r,zr(this,\"style.\"+t,n))).each(function(t,n){var e,r,i,o,a=\"style.\"+n,u=\"end.\"+a;return function(){var c=Er(this,t),f=c.on,s=null==c.value[a]?o||(o=qr(n)):void 0;f===e&&i===s||(r=(e=f).copy()).on(u,i=s),c.on=r}}(this._id,t)):this.styleTween(t,function(t,n,e){var r,i,o=e+\"\";return function(){var a=ft(this,t);return a===o?null:a===r?i:i=n(r=a,e)}}(t,r,n),e).on(\"end.style.\"+t,null)},styleTween:function(t,n,e){var r=\"style.\"+(t+=\"\");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(null==n)return this.tween(r,null);if(\"function\"!=typeof n)throw new Error;return this.tween(r,function(t,n,e){var r,i;function o(){var o=n.apply(this,arguments);return o!==i&&(r=(i=o)&&function(t,n,e){return function(r){this.style.setProperty(t,n.call(this,r),e)}}(t,o,e)),r}return o._value=n,o}(t,n,null==e?\"\":e))},text:function(t){return this.tween(\"text\",\"function\"==typeof t?function(t){return function(){var n=t(this);this.textContent=null==n?\"\":n}}(zr(this,\"text\",t)):function(t){return function(){this.textContent=t}}(null==t?\"\":t+\"\"))},textTween:function(t){var n=\"text\";if(arguments.length<1)return(n=this.tween(n))&&n._value;if(null==t)return this.tween(n,null);if(\"function\"!=typeof t)throw new Error;return this.tween(n,function(t){var n,e;function r(){var r=t.apply(this,arguments);return r!==e&&(n=(e=r)&&function(t){return function(n){this.textContent=t.call(this,n)}}(r)),n}return r._value=t,r}(t))},remove:function(){return this.on(\"end.remove\",function(t){return function(){var n=this.parentNode;for(var e in this.__transition)if(+e!==t)return;n&&n.removeChild(this)}}(this._id))},tween:function(t,n){var e=this._id;if(t+=\"\",arguments.length<2){for(var r,i=Cr(this.node(),e).tween,o=0,a=i.length;o<a;++o)if((r=i[o]).name===t)return r.value;return null}return this.each((null==n?function(t,n){var e,r;return function(){var i=Er(this,t),o=i.tween;if(o!==e)for(var a=0,u=(r=e=o).length;a<u;++a)if(r[a].name===n){(r=r.slice()).splice(a,1);break}i.tween=r}}:function(t,n,e){var r,i;if(\"function\"!=typeof e)throw new Error;return function(){var o=Er(this,t),a=o.tween;if(a!==r){i=(r=a).slice();for(var u={name:n,value:e},c=0,f=i.length;c<f;++c)if(i[c].name===n){i[c]=u;break}c===f&&i.push(u)}o.tween=i}})(e,t,n))},delay:function(t){var n=this._id;return arguments.length?this.each((\"function\"==typeof t?function(t,n){return function(){kr(this,t).delay=+n.apply(this,arguments)}}:function(t,n){return n=+n,function(){kr(this,t).delay=n}})(n,t)):Cr(this.node(),n).delay},duration:function(t){var n=this._id;return arguments.length?this.each((\"function\"==typeof t?function(t,n){return function(){Er(this,t).duration=+n.apply(this,arguments)}}:function(t,n){return n=+n,function(){Er(this,t).duration=n}})(n,t)):Cr(this.node(),n).duration},ease:function(t){var n=this._id;return arguments.length?this.each(function(t,n){if(\"function\"!=typeof n)throw new Error;return function(){Er(this,t).ease=n}}(n,t)):Cr(this.node(),n).ease},end:function(){var t,n,e=this,r=e._id,i=e.size();return new Promise(function(o,a){var u={value:a},c={value:function(){0==--i&&o()}};e.each(function(){var e=Er(this,r),i=e.on;i!==t&&((n=(t=i).copy())._.cancel.push(u),n._.interrupt.push(u),n._.end.push(c)),e.on=n})})}};var Hr=function t(n){function e(t){return Math.pow(t,n)}return n=+n,e.exponent=t,e}(3),jr=function t(n){function e(t){return 1-Math.pow(1-t,n)}return n=+n,e.exponent=t,e}(3),Vr=function t(n){function e(t){return((t*=2)<=1?Math.pow(t,n):2-Math.pow(2-t,n))/2}return n=+n,e.exponent=t,e}(3),Xr=Math.PI,Gr=Xr/2;function $r(t){return(1-Math.cos(Xr*t))/2}function Wr(t){return((t*=2)<=1?Math.pow(2,10*t-10):2-Math.pow(2,10-10*t))/2}function Zr(t){return((t*=2)<=1?1-Math.sqrt(1-t*t):Math.sqrt(1-(t-=2)*t)+1)/2}var Qr=4/11,Kr=6/11,Jr=8/11,ti=.75,ni=9/11,ei=10/11,ri=.9375,ii=21/22,oi=63/64,ai=1/Qr/Qr;function ui(t){return(t=+t)<Qr?ai*t*t:t<Jr?ai*(t-=Kr)*t+ti:t<ei?ai*(t-=ni)*t+ri:ai*(t-=ii)*t+oi}var ci=function t(n){function e(t){return t*t*((n+1)*t-n)}return n=+n,e.overshoot=t,e}(1.70158),fi=function t(n){function e(t){return--t*t*((n+1)*t+n)+1}return n=+n,e.overshoot=t,e}(1.70158),si=function t(n){function e(t){return((t*=2)<1?t*t*((n+1)*t-n):(t-=2)*t*((n+1)*t+n)+2)/2}return n=+n,e.overshoot=t,e}(1.70158),li=2*Math.PI,hi=function t(n,e){var r=Math.asin(1/(n=Math.max(1,n)))*(e/=li);function i(t){return n*Math.pow(2,10*--t)*Math.sin((r-t)/e)}return i.amplitude=function(n){return t(n,e*li)},i.period=function(e){return t(n,e)},i}(1,.3),di=function t(n,e){var r=Math.asin(1/(n=Math.max(1,n)))*(e/=li);function i(t){return 1-n*Math.pow(2,-10*(t=+t))*Math.sin((t+r)/e)}return i.amplitude=function(n){return t(n,e*li)},i.period=function(e){return t(n,e)},i}(1,.3),pi=function t(n,e){var r=Math.asin(1/(n=Math.max(1,n)))*(e/=li);function i(t){return((t=2*t-1)<0?n*Math.pow(2,10*t)*Math.sin((r-t)/e):2-n*Math.pow(2,-10*t)*Math.sin((r+t)/e))/2}return i.amplitude=function(n){return t(n,e*li)},i.period=function(e){return t(n,e)},i}(1,.3),vi={time:null,delay:0,duration:250,ease:Ir};function gi(t,n){for(var e;!(e=t.__transition)||!(e=e[n]);)if(!(t=t.parentNode))return vi.time=fr(),vi;return e}zt.prototype.interrupt=function(t){return this.each(function(){Pr(this,t)})},zt.prototype.transition=function(t){var n,e;t instanceof Ur?(n=t._id,t=t._name):(n=Br(),(e=vi).time=fr(),t=null==t?null:t+\"\");for(var r=this._groups,i=r.length,o=0;o<i;++o)for(var a,u=r[o],c=u.length,f=0;f<c;++f)(a=u[f])&&Sr(a,t,n,f,u,e||gi(a,n));return new Ur(r,this._parents,t,n)};var yi=[null];function _i(t){return function(){return t}}function bi(t,n,e){this.target=t,this.type=n,this.selection=e}function mi(){t.event.stopImmediatePropagation()}function xi(){t.event.preventDefault(),t.event.stopImmediatePropagation()}var wi={name:\"drag\"},Mi={name:\"space\"},Ni={name:\"handle\"},Ti={name:\"center\"};function Ai(t){return[+t[0],+t[1]]}function Si(t){return[Ai(t[0]),Ai(t[1])]}var ki={name:\"x\",handles:[\"w\",\"e\"].map(Li),input:function(t,n){return null==t?null:[[+t[0],n[0][1]],[+t[1],n[1][1]]]},output:function(t){return t&&[t[0][0],t[1][0]]}},Ei={name:\"y\",handles:[\"n\",\"s\"].map(Li),input:function(t,n){return null==t?null:[[n[0][0],+t[0]],[n[1][0],+t[1]]]},output:function(t){return t&&[t[0][1],t[1][1]]}},Ci={name:\"xy\",handles:[\"n\",\"w\",\"e\",\"s\",\"nw\",\"ne\",\"sw\",\"se\"].map(Li),input:function(t){return null==t?null:Si(t)},output:function(t){return t}},Pi={overlay:\"crosshair\",selection:\"move\",n:\"ns-resize\",e:\"ew-resize\",s:\"ns-resize\",w:\"ew-resize\",nw:\"nwse-resize\",ne:\"nesw-resize\",se:\"nwse-resize\",sw:\"nesw-resize\"},zi={e:\"w\",w:\"e\",nw:\"ne\",ne:\"nw\",se:\"sw\",sw:\"se\"},Ri={n:\"s\",s:\"n\",nw:\"sw\",ne:\"se\",se:\"ne\",sw:\"nw\"},Di={overlay:1,selection:1,n:null,e:1,s:null,w:-1,nw:-1,ne:1,se:1,sw:-1},qi={overlay:1,selection:1,n:-1,e:null,s:1,w:null,nw:-1,ne:-1,se:1,sw:1};function Li(t){return{type:t}}function Ui(){return!t.event.ctrlKey&&!t.event.button}function Oi(){var t=this.ownerSVGElement||this;return t.hasAttribute(\"viewBox\")?[[(t=t.viewBox.baseVal).x,t.y],[t.x+t.width,t.y+t.height]]:[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]}function Bi(){return navigator.maxTouchPoints||\"ontouchstart\"in this}function Fi(t){for(;!t.__brush;)if(!(t=t.parentNode))return;return t.__brush}function Yi(n){var e,r=Oi,i=Ui,o=Bi,a=!0,u=I(\"start\",\"brush\",\"end\"),c=6;function f(t){var e=t.property(\"__brush\",g).selectAll(\".overlay\").data([Li(\"overlay\")]);e.enter().append(\"rect\").attr(\"class\",\"overlay\").attr(\"pointer-events\",\"all\").attr(\"cursor\",Pi.overlay).merge(e).each(function(){var t=Fi(this).extent;Rt(this).attr(\"x\",t[0][0]).attr(\"y\",t[0][1]).attr(\"width\",t[1][0]-t[0][0]).attr(\"height\",t[1][1]-t[0][1])}),t.selectAll(\".selection\").data([Li(\"selection\")]).enter().append(\"rect\").attr(\"class\",\"selection\").attr(\"cursor\",Pi.selection).attr(\"fill\",\"#777\").attr(\"fill-opacity\",.3).attr(\"stroke\",\"#fff\").attr(\"shape-rendering\",\"crispEdges\");var r=t.selectAll(\".handle\").data(n.handles,function(t){return t.type});r.exit().remove(),r.enter().append(\"rect\").attr(\"class\",function(t){return\"handle handle--\"+t.type}).attr(\"cursor\",function(t){return Pi[t.type]}),t.each(s).attr(\"fill\",\"none\").attr(\"pointer-events\",\"all\").on(\"mousedown.brush\",d).filter(o).on(\"touchstart.brush\",d).on(\"touchmove.brush\",p).on(\"touchend.brush touchcancel.brush\",v).style(\"touch-action\",\"none\").style(\"-webkit-tap-highlight-color\",\"rgba(0,0,0,0)\")}function s(){var t=Rt(this),n=Fi(this).selection;n?(t.selectAll(\".selection\").style(\"display\",null).attr(\"x\",n[0][0]).attr(\"y\",n[0][1]).attr(\"width\",n[1][0]-n[0][0]).attr(\"height\",n[1][1]-n[0][1]),t.selectAll(\".handle\").style(\"display\",null).attr(\"x\",function(t){return\"e\"===t.type[t.type.length-1]?n[1][0]-c/2:n[0][0]-c/2}).attr(\"y\",function(t){return\"s\"===t.type[0]?n[1][1]-c/2:n[0][1]-c/2}).attr(\"width\",function(t){return\"n\"===t.type||\"s\"===t.type?n[1][0]-n[0][0]+c:c}).attr(\"height\",function(t){return\"e\"===t.type||\"w\"===t.type?n[1][1]-n[0][1]+c:c})):t.selectAll(\".selection,.handle\").style(\"display\",\"none\").attr(\"x\",null).attr(\"y\",null).attr(\"width\",null).attr(\"height\",null)}function l(t,n,e){return!e&&t.__brush.emitter||new h(t,n)}function h(t,n){this.that=t,this.args=n,this.state=t.__brush,this.active=0}function d(){if((!e||t.event.touches)&&i.apply(this,arguments)){var r,o,u,c,f,h,d,p,v,g,y,_,b=this,m=t.event.target.__data__.type,x=\"selection\"===(a&&t.event.metaKey?m=\"overlay\":m)?wi:a&&t.event.altKey?Ti:Ni,w=n===Ei?null:Di[m],M=n===ki?null:qi[m],N=Fi(b),T=N.extent,A=N.selection,S=T[0][0],k=T[0][1],E=T[1][0],C=T[1][1],P=0,z=0,R=w&&M&&a&&t.event.shiftKey,D=t.event.touches?(_=t.event.changedTouches[0].identifier,function(n){return Ft(n,t.event.touches,_)}):Bt,q=D(b),L=q,U=l(b,arguments,!0).beforestart();\"overlay\"===m?(A&&(v=!0),N.selection=A=[[r=n===Ei?S:q[0],u=n===ki?k:q[1]],[f=n===Ei?E:r,d=n===ki?C:u]]):(r=A[0][0],u=A[0][1],f=A[1][0],d=A[1][1]),o=r,c=u,h=f,p=d;var O=Rt(b).attr(\"pointer-events\",\"none\"),B=O.selectAll(\".overlay\").attr(\"cursor\",Pi[m]);if(t.event.touches)U.moved=Y,U.ended=H;else{var F=Rt(t.event.view).on(\"mousemove.brush\",Y,!0).on(\"mouseup.brush\",H,!0);a&&F.on(\"keydown.brush\",function(){switch(t.event.keyCode){case 16:R=w&&M;break;case 18:x===Ni&&(w&&(f=h-P*w,r=o+P*w),M&&(d=p-z*M,u=c+z*M),x=Ti,I());break;case 32:x!==Ni&&x!==Ti||(w<0?f=h-P:w>0&&(r=o-P),M<0?d=p-z:M>0&&(u=c-z),x=Mi,B.attr(\"cursor\",Pi.selection),I());break;default:return}xi()},!0).on(\"keyup.brush\",function(){switch(t.event.keyCode){case 16:R&&(g=y=R=!1,I());break;case 18:x===Ti&&(w<0?f=h:w>0&&(r=o),M<0?d=p:M>0&&(u=c),x=Ni,I());break;case 32:x===Mi&&(t.event.altKey?(w&&(f=h-P*w,r=o+P*w),M&&(d=p-z*M,u=c+z*M),x=Ti):(w<0?f=h:w>0&&(r=o),M<0?d=p:M>0&&(u=c),x=Ni),B.attr(\"cursor\",Pi[m]),I());break;default:return}xi()},!0),Ht(t.event.view)}mi(),Pr(b),s.call(b),U.start()}function Y(){var t=D(b);!R||g||y||(Math.abs(t[0]-L[0])>Math.abs(t[1]-L[1])?y=!0:g=!0),L=t,v=!0,xi(),I()}function I(){var t;switch(P=L[0]-q[0],z=L[1]-q[1],x){case Mi:case wi:w&&(P=Math.max(S-r,Math.min(E-f,P)),o=r+P,h=f+P),M&&(z=Math.max(k-u,Math.min(C-d,z)),c=u+z,p=d+z);break;case Ni:w<0?(P=Math.max(S-r,Math.min(E-r,P)),o=r+P,h=f):w>0&&(P=Math.max(S-f,Math.min(E-f,P)),o=r,h=f+P),M<0?(z=Math.max(k-u,Math.min(C-u,z)),c=u+z,p=d):M>0&&(z=Math.max(k-d,Math.min(C-d,z)),c=u,p=d+z);break;case Ti:w&&(o=Math.max(S,Math.min(E,r-P*w)),h=Math.max(S,Math.min(E,f+P*w))),M&&(c=Math.max(k,Math.min(C,u-z*M)),p=Math.max(k,Math.min(C,d+z*M)))}h<o&&(w*=-1,t=r,r=f,f=t,t=o,o=h,h=t,m in zi&&B.attr(\"cursor\",Pi[m=zi[m]])),p<c&&(M*=-1,t=u,u=d,d=t,t=c,c=p,p=t,m in Ri&&B.attr(\"cursor\",Pi[m=Ri[m]])),N.selection&&(A=N.selection),g&&(o=A[0][0],h=A[1][0]),y&&(c=A[0][1],p=A[1][1]),A[0][0]===o&&A[0][1]===c&&A[1][0]===h&&A[1][1]===p||(N.selection=[[o,c],[h,p]],s.call(b),U.brush())}function H(){if(mi(),t.event.touches){if(t.event.touches.length)return;e&&clearTimeout(e),e=setTimeout(function(){e=null},500)}else jt(t.event.view,v),F.on(\"keydown.brush keyup.brush mousemove.brush mouseup.brush\",null);O.attr(\"pointer-events\",\"all\"),B.attr(\"cursor\",Pi.overlay),N.selection&&(A=N.selection),function(t){return t[0][0]===t[1][0]||t[0][1]===t[1][1]}(A)&&(N.selection=null,s.call(b)),U.end()}}function p(){l(this,arguments).moved()}function v(){l(this,arguments).ended()}function g(){var t=this.__brush||{selection:null};return t.extent=Si(r.apply(this,arguments)),t.dim=n,t}return f.move=function(t,e){t.selection?t.on(\"start.brush\",function(){l(this,arguments).beforestart().start()}).on(\"interrupt.brush end.brush\",function(){l(this,arguments).end()}).tween(\"brush\",function(){var t=this,r=t.__brush,i=l(t,arguments),o=r.selection,a=n.input(\"function\"==typeof e?e.apply(this,arguments):e,r.extent),u=Te(o,a);function c(n){r.selection=1===n&&null===a?null:u(n),s.call(t),i.brush()}return null!==o&&null!==a?c:c(1)}):t.each(function(){var t=this,r=arguments,i=t.__brush,o=n.input(\"function\"==typeof e?e.apply(t,r):e,i.extent),a=l(t,r).beforestart();Pr(t),i.selection=null===o?null:o,s.call(t),a.start().brush().end()})},f.clear=function(t){f.move(t,null)},h.prototype={beforestart:function(){return 1==++this.active&&(this.state.emitter=this,this.starting=!0),this},start:function(){return this.starting?(this.starting=!1,this.emit(\"start\")):this.emit(\"brush\"),this},brush:function(){return this.emit(\"brush\"),this},end:function(){return 0==--this.active&&(delete this.state.emitter,this.emit(\"end\")),this},emit:function(t){kt(new bi(f,t,n.output(this.state.selection)),u.apply,u,[t,this.that,this.args])}},f.extent=function(t){return arguments.length?(r=\"function\"==typeof t?t:_i(Si(t)),f):r},f.filter=function(t){return arguments.length?(i=\"function\"==typeof t?t:_i(!!t),f):i},f.touchable=function(t){return arguments.length?(o=\"function\"==typeof t?t:_i(!!t),f):o},f.handleSize=function(t){return arguments.length?(c=+t,f):c},f.keyModifiers=function(t){return arguments.length?(a=!!t,f):a},f.on=function(){var t=u.on.apply(u,arguments);return t===u?f:t},f}var Ii=Math.cos,Hi=Math.sin,ji=Math.PI,Vi=ji/2,Xi=2*ji,Gi=Math.max;function $i(t){return function(n,e){return t(n.source.value+n.target.value,e.source.value+e.target.value)}}var Wi=Array.prototype.slice;function Zi(t){return function(){return t}}var Qi=Math.PI,Ki=2*Qi,Ji=Ki-1e-6;function to(){this._x0=this._y0=this._x1=this._y1=null,this._=\"\"}function no(){return new to}function eo(t){return t.source}function ro(t){return t.target}function io(t){return t.radius}function oo(t){return t.startAngle}function ao(t){return t.endAngle}to.prototype=no.prototype={constructor:to,moveTo:function(t,n){this._+=\"M\"+(this._x0=this._x1=+t)+\",\"+(this._y0=this._y1=+n)},closePath:function(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+=\"Z\")},lineTo:function(t,n){this._+=\"L\"+(this._x1=+t)+\",\"+(this._y1=+n)},quadraticCurveTo:function(t,n,e,r){this._+=\"Q\"+ +t+\",\"+ +n+\",\"+(this._x1=+e)+\",\"+(this._y1=+r)},bezierCurveTo:function(t,n,e,r,i,o){this._+=\"C\"+ +t+\",\"+ +n+\",\"+ +e+\",\"+ +r+\",\"+(this._x1=+i)+\",\"+(this._y1=+o)},arcTo:function(t,n,e,r,i){t=+t,n=+n,e=+e,r=+r,i=+i;var o=this._x1,a=this._y1,u=e-t,c=r-n,f=o-t,s=a-n,l=f*f+s*s;if(i<0)throw new Error(\"negative radius: \"+i);if(null===this._x1)this._+=\"M\"+(this._x1=t)+\",\"+(this._y1=n);else if(l>1e-6)if(Math.abs(s*u-c*f)>1e-6&&i){var h=e-o,d=r-a,p=u*u+c*c,v=h*h+d*d,g=Math.sqrt(p),y=Math.sqrt(l),_=i*Math.tan((Qi-Math.acos((p+l-v)/(2*g*y)))/2),b=_/y,m=_/g;Math.abs(b-1)>1e-6&&(this._+=\"L\"+(t+b*f)+\",\"+(n+b*s)),this._+=\"A\"+i+\",\"+i+\",0,0,\"+ +(s*h>f*d)+\",\"+(this._x1=t+m*u)+\",\"+(this._y1=n+m*c)}else this._+=\"L\"+(this._x1=t)+\",\"+(this._y1=n);else;},arc:function(t,n,e,r,i,o){t=+t,n=+n,o=!!o;var a=(e=+e)*Math.cos(r),u=e*Math.sin(r),c=t+a,f=n+u,s=1^o,l=o?r-i:i-r;if(e<0)throw new Error(\"negative radius: \"+e);null===this._x1?this._+=\"M\"+c+\",\"+f:(Math.abs(this._x1-c)>1e-6||Math.abs(this._y1-f)>1e-6)&&(this._+=\"L\"+c+\",\"+f),e&&(l<0&&(l=l%Ki+Ki),l>Ji?this._+=\"A\"+e+\",\"+e+\",0,1,\"+s+\",\"+(t-a)+\",\"+(n-u)+\"A\"+e+\",\"+e+\",0,1,\"+s+\",\"+(this._x1=c)+\",\"+(this._y1=f):l>1e-6&&(this._+=\"A\"+e+\",\"+e+\",0,\"+ +(l>=Qi)+\",\"+s+\",\"+(this._x1=t+e*Math.cos(i))+\",\"+(this._y1=n+e*Math.sin(i))))},rect:function(t,n,e,r){this._+=\"M\"+(this._x0=this._x1=+t)+\",\"+(this._y0=this._y1=+n)+\"h\"+ +e+\"v\"+ +r+\"h\"+-e+\"Z\"},toString:function(){return this._}};function uo(){}function co(t,n){var e=new uo;if(t instanceof uo)t.each(function(t,n){e.set(n,t)});else if(Array.isArray(t)){var r,i=-1,o=t.length;if(null==n)for(;++i<o;)e.set(i,t[i]);else for(;++i<o;)e.set(n(r=t[i],i,t),r)}else if(t)for(var a in t)e.set(a,t[a]);return e}function fo(){return{}}function so(t,n,e){t[n]=e}function lo(){return co()}function ho(t,n,e){t.set(n,e)}function po(){}uo.prototype=co.prototype={constructor:uo,has:function(t){return\"$\"+t in this},get:function(t){return this[\"$\"+t]},set:function(t,n){return this[\"$\"+t]=n,this},remove:function(t){var n=\"$\"+t;return n in this&&delete this[n]},clear:function(){for(var t in this)\"$\"===t[0]&&delete this[t]},keys:function(){var t=[];for(var n in this)\"$\"===n[0]&&t.push(n.slice(1));return t},values:function(){var t=[];for(var n in this)\"$\"===n[0]&&t.push(this[n]);return t},entries:function(){var t=[];for(var n in this)\"$\"===n[0]&&t.push({key:n.slice(1),value:this[n]});return t},size:function(){var t=0;for(var n in this)\"$\"===n[0]&&++t;return t},empty:function(){for(var t in this)if(\"$\"===t[0])return!1;return!0},each:function(t){for(var n in this)\"$\"===n[0]&&t(this[n],n.slice(1),this)}};var vo=co.prototype;function go(t,n){var e=new po;if(t instanceof po)t.each(function(t){e.add(t)});else if(t){var r=-1,i=t.length;if(null==n)for(;++r<i;)e.add(t[r]);else for(;++r<i;)e.add(n(t[r],r,t))}return e}po.prototype=go.prototype={constructor:po,has:vo.has,add:function(t){return this[\"$\"+(t+=\"\")]=t,this},remove:vo.remove,clear:vo.clear,values:vo.keys,size:vo.size,empty:vo.empty,each:vo.each};var yo=Array.prototype.slice;function _o(t,n){return t-n}function bo(t){return function(){return t}}function mo(t,n){for(var e,r=-1,i=n.length;++r<i;)if(e=xo(t,n[r]))return e;return 0}function xo(t,n){for(var e=n[0],r=n[1],i=-1,o=0,a=t.length,u=a-1;o<a;u=o++){var c=t[o],f=c[0],s=c[1],l=t[u],h=l[0],d=l[1];if(wo(c,l,n))return 0;s>r!=d>r&&e<(h-f)*(r-s)/(d-s)+f&&(i=-i)}return i}function wo(t,n,e){var r,i,o,a;return function(t,n,e){return(n[0]-t[0])*(e[1]-t[1])==(e[0]-t[0])*(n[1]-t[1])}(t,n,e)&&(i=t[r=+(t[0]===n[0])],o=e[r],a=n[r],i<=o&&o<=a||a<=o&&o<=i)}function Mo(){}var No=[[],[[[1,1.5],[.5,1]]],[[[1.5,1],[1,1.5]]],[[[1.5,1],[.5,1]]],[[[1,.5],[1.5,1]]],[[[1,1.5],[.5,1]],[[1,.5],[1.5,1]]],[[[1,.5],[1,1.5]]],[[[1,.5],[.5,1]]],[[[.5,1],[1,.5]]],[[[1,1.5],[1,.5]]],[[[.5,1],[1,.5]],[[1.5,1],[1,1.5]]],[[[1.5,1],[1,.5]]],[[[.5,1],[1.5,1]]],[[[1,1.5],[1.5,1]]],[[[.5,1],[1,1.5]]],[]];function To(){var t=1,n=1,e=M,r=u;function i(t){var n=e(t);if(Array.isArray(n))n=n.slice().sort(_o);else{var r=s(t),i=r[0],a=r[1];n=w(i,a,n),n=g(Math.floor(i/n)*n,Math.floor(a/n)*n,n)}return n.map(function(n){return o(t,n)})}function o(e,i){var o=[],u=[];return function(e,r,i){var o,u,c,f,s,l,h=new Array,d=new Array;o=u=-1,f=e[0]>=r,No[f<<1].forEach(p);for(;++o<t-1;)c=f,f=e[o+1]>=r,No[c|f<<1].forEach(p);No[f<<0].forEach(p);for(;++u<n-1;){for(o=-1,f=e[u*t+t]>=r,s=e[u*t]>=r,No[f<<1|s<<2].forEach(p);++o<t-1;)c=f,f=e[u*t+t+o+1]>=r,l=s,s=e[u*t+o+1]>=r,No[c|f<<1|s<<2|l<<3].forEach(p);No[f|s<<3].forEach(p)}o=-1,s=e[u*t]>=r,No[s<<2].forEach(p);for(;++o<t-1;)l=s,s=e[u*t+o+1]>=r,No[s<<2|l<<3].forEach(p);function p(t){var n,e,r=[t[0][0]+o,t[0][1]+u],c=[t[1][0]+o,t[1][1]+u],f=a(r),s=a(c);(n=d[f])?(e=h[s])?(delete d[n.end],delete h[e.start],n===e?(n.ring.push(c),i(n.ring)):h[n.start]=d[e.end]={start:n.start,end:e.end,ring:n.ring.concat(e.ring)}):(delete d[n.end],n.ring.push(c),d[n.end=s]=n):(n=h[s])?(e=d[f])?(delete h[n.start],delete d[e.end],n===e?(n.ring.push(c),i(n.ring)):h[e.start]=d[n.end]={start:e.start,end:n.end,ring:e.ring.concat(n.ring)}):(delete h[n.start],n.ring.unshift(r),h[n.start=f]=n):h[f]=d[s]={start:f,end:s,ring:[r,c]}}No[s<<3].forEach(p)}(e,i,function(t){r(t,e,i),function(t){for(var n=0,e=t.length,r=t[e-1][1]*t[0][0]-t[e-1][0]*t[0][1];++n<e;)r+=t[n-1][1]*t[n][0]-t[n-1][0]*t[n][1];return r}(t)>0?o.push([t]):u.push(t)}),u.forEach(function(t){for(var n,e=0,r=o.length;e<r;++e)if(-1!==mo((n=o[e])[0],t))return void n.push(t)}),{type:\"MultiPolygon\",value:i,coordinates:o}}function a(n){return 2*n[0]+n[1]*(t+1)*4}function u(e,r,i){e.forEach(function(e){var o,a=e[0],u=e[1],c=0|a,f=0|u,s=r[f*t+c];a>0&&a<t&&c===a&&(o=r[f*t+c-1],e[0]=a+(i-o)/(s-o)-.5),u>0&&u<n&&f===u&&(o=r[(f-1)*t+c],e[1]=u+(i-o)/(s-o)-.5)})}return i.contour=o,i.size=function(e){if(!arguments.length)return[t,n];var r=Math.ceil(e[0]),o=Math.ceil(e[1]);if(!(r>0&&o>0))throw new Error(\"invalid size\");return t=r,n=o,i},i.thresholds=function(t){return arguments.length?(e=\"function\"==typeof t?t:Array.isArray(t)?bo(yo.call(t)):bo(t),i):e},i.smooth=function(t){return arguments.length?(r=t?u:Mo,i):r===u},i}function Ao(t,n,e){for(var r=t.width,i=t.height,o=1+(e<<1),a=0;a<i;++a)for(var u=0,c=0;u<r+e;++u)u<r&&(c+=t.data[u+a*r]),u>=e&&(u>=o&&(c-=t.data[u-o+a*r]),n.data[u-e+a*r]=c/Math.min(u+1,r-1+o-u,o))}function So(t,n,e){for(var r=t.width,i=t.height,o=1+(e<<1),a=0;a<r;++a)for(var u=0,c=0;u<i+e;++u)u<i&&(c+=t.data[a+u*r]),u>=e&&(u>=o&&(c-=t.data[a+(u-o)*r]),n.data[a+(u-e)*r]=c/Math.min(u+1,i-1+o-u,o))}function ko(t){return t[0]}function Eo(t){return t[1]}function Co(){return 1}var Po={},zo={},Ro=34,Do=10,qo=13;function Lo(t){return new Function(\"d\",\"return {\"+t.map(function(t,n){return JSON.stringify(t)+\": d[\"+n+'] || \"\"'}).join(\",\")+\"}\")}function Uo(t){var n=Object.create(null),e=[];return t.forEach(function(t){for(var r in t)r in n||e.push(n[r]=r)}),e}function Oo(t,n){var e=t+\"\",r=e.length;return r<n?new Array(n-r+1).join(0)+e:e}function Bo(t){var n=t.getUTCHours(),e=t.getUTCMinutes(),r=t.getUTCSeconds(),i=t.getUTCMilliseconds();return isNaN(t)?\"Invalid Date\":function(t){return t<0?\"-\"+Oo(-t,6):t>9999?\"+\"+Oo(t,6):Oo(t,4)}(t.getUTCFullYear())+\"-\"+Oo(t.getUTCMonth()+1,2)+\"-\"+Oo(t.getUTCDate(),2)+(i?\"T\"+Oo(n,2)+\":\"+Oo(e,2)+\":\"+Oo(r,2)+\".\"+Oo(i,3)+\"Z\":r?\"T\"+Oo(n,2)+\":\"+Oo(e,2)+\":\"+Oo(r,2)+\"Z\":e||n?\"T\"+Oo(n,2)+\":\"+Oo(e,2)+\"Z\":\"\")}function Fo(t){var n=new RegExp('[\"'+t+\"\\n\\r]\"),e=t.charCodeAt(0);function r(t,n){var r,i=[],o=t.length,a=0,u=0,c=o<=0,f=!1;function s(){if(c)return zo;if(f)return f=!1,Po;var n,r,i=a;if(t.charCodeAt(i)===Ro){for(;a++<o&&t.charCodeAt(a)!==Ro||t.charCodeAt(++a)===Ro;);return(n=a)>=o?c=!0:(r=t.charCodeAt(a++))===Do?f=!0:r===qo&&(f=!0,t.charCodeAt(a)===Do&&++a),t.slice(i+1,n-1).replace(/\"\"/g,'\"')}for(;a<o;){if((r=t.charCodeAt(n=a++))===Do)f=!0;else if(r===qo)f=!0,t.charCodeAt(a)===Do&&++a;else if(r!==e)continue;return t.slice(i,n)}return c=!0,t.slice(i,o)}for(t.charCodeAt(o-1)===Do&&--o,t.charCodeAt(o-1)===qo&&--o;(r=s())!==zo;){for(var l=[];r!==Po&&r!==zo;)l.push(r),r=s();n&&null==(l=n(l,u++))||i.push(l)}return i}function i(n,e){return n.map(function(n){return e.map(function(t){return a(n[t])}).join(t)})}function o(n){return n.map(a).join(t)}function a(t){return null==t?\"\":t instanceof Date?Bo(t):n.test(t+=\"\")?'\"'+t.replace(/\"/g,'\"\"')+'\"':t}return{parse:function(t,n){var e,i,o=r(t,function(t,r){if(e)return e(t,r-1);i=t,e=n?function(t,n){var e=Lo(t);return function(r,i){return n(e(r),i,t)}}(t,n):Lo(t)});return o.columns=i||[],o},parseRows:r,format:function(n,e){return null==e&&(e=Uo(n)),[e.map(a).join(t)].concat(i(n,e)).join(\"\\n\")},formatBody:function(t,n){return null==n&&(n=Uo(t)),i(t,n).join(\"\\n\")},formatRows:function(t){return t.map(o).join(\"\\n\")},formatRow:o,formatValue:a}}var Yo=Fo(\",\"),Io=Yo.parse,Ho=Yo.parseRows,jo=Yo.format,Vo=Yo.formatBody,Xo=Yo.formatRows,Go=Yo.formatRow,$o=Yo.formatValue,Wo=Fo(\"\\t\"),Zo=Wo.parse,Qo=Wo.parseRows,Ko=Wo.format,Jo=Wo.formatBody,ta=Wo.formatRows,na=Wo.formatRow,ea=Wo.formatValue;var ra=new Date(\"2019-01-01T00:00\").getHours()||new Date(\"2019-07-01T00:00\").getHours();function ia(t){if(!t.ok)throw new Error(t.status+\" \"+t.statusText);return t.blob()}function oa(t){if(!t.ok)throw new Error(t.status+\" \"+t.statusText);return t.arrayBuffer()}function aa(t){if(!t.ok)throw new Error(t.status+\" \"+t.statusText);return t.text()}function ua(t,n){return fetch(t,n).then(aa)}function ca(t){return function(n,e,r){return 2===arguments.length&&\"function\"==typeof e&&(r=e,e=void 0),ua(n,e).then(function(n){return t(n,r)})}}var fa=ca(Io),sa=ca(Zo);function la(t){if(!t.ok)throw new Error(t.status+\" \"+t.statusText);return t.json()}function ha(t){return function(n,e){return ua(n,e).then(function(n){return(new DOMParser).parseFromString(n,t)})}}var da=ha(\"application/xml\"),pa=ha(\"text/html\"),va=ha(\"image/svg+xml\");function ga(t){return function(){return t}}function ya(){return 1e-6*(Math.random()-.5)}function _a(t,n,e,r){if(isNaN(n)||isNaN(e))return t;var i,o,a,u,c,f,s,l,h,d=t._root,p={data:r},v=t._x0,g=t._y0,y=t._x1,_=t._y1;if(!d)return t._root=p,t;for(;d.length;)if((f=n>=(o=(v+y)/2))?v=o:y=o,(s=e>=(a=(g+_)/2))?g=a:_=a,i=d,!(d=d[l=s<<1|f]))return i[l]=p,t;if(u=+t._x.call(null,d.data),c=+t._y.call(null,d.data),n===u&&e===c)return p.next=d,i?i[l]=p:t._root=p,t;do{i=i?i[l]=new Array(4):t._root=new Array(4),(f=n>=(o=(v+y)/2))?v=o:y=o,(s=e>=(a=(g+_)/2))?g=a:_=a}while((l=s<<1|f)==(h=(c>=a)<<1|u>=o));return i[h]=d,i[l]=p,t}function ba(t,n,e,r,i){this.node=t,this.x0=n,this.y0=e,this.x1=r,this.y1=i}function ma(t){return t[0]}function xa(t){return t[1]}function wa(t,n,e){var r=new Ma(null==n?ma:n,null==e?xa:e,NaN,NaN,NaN,NaN);return null==t?r:r.addAll(t)}function Ma(t,n,e,r,i,o){this._x=t,this._y=n,this._x0=e,this._y0=r,this._x1=i,this._y1=o,this._root=void 0}function Na(t){for(var n={data:t.data},e=n;t=t.next;)e=e.next={data:t.data};return n}var Ta=wa.prototype=Ma.prototype;function Aa(t){return t.x+t.vx}function Sa(t){return t.y+t.vy}function ka(t){return t.index}function Ea(t,n){var e=t.get(n);if(!e)throw new Error(\"missing: \"+n);return e}function Ca(t){return t.x}function Pa(t){return t.y}Ta.copy=function(){var t,n,e=new Ma(this._x,this._y,this._x0,this._y0,this._x1,this._y1),r=this._root;if(!r)return e;if(!r.length)return e._root=Na(r),e;for(t=[{source:r,target:e._root=new Array(4)}];r=t.pop();)for(var i=0;i<4;++i)(n=r.source[i])&&(n.length?t.push({source:n,target:r.target[i]=new Array(4)}):r.target[i]=Na(n));return e},Ta.add=function(t){var n=+this._x.call(null,t),e=+this._y.call(null,t);return _a(this.cover(n,e),n,e,t)},Ta.addAll=function(t){var n,e,r,i,o=t.length,a=new Array(o),u=new Array(o),c=1/0,f=1/0,s=-1/0,l=-1/0;for(e=0;e<o;++e)isNaN(r=+this._x.call(null,n=t[e]))||isNaN(i=+this._y.call(null,n))||(a[e]=r,u[e]=i,r<c&&(c=r),r>s&&(s=r),i<f&&(f=i),i>l&&(l=i));if(c>s||f>l)return this;for(this.cover(c,f).cover(s,l),e=0;e<o;++e)_a(this,a[e],u[e],t[e]);return this},Ta.cover=function(t,n){if(isNaN(t=+t)||isNaN(n=+n))return this;var e=this._x0,r=this._y0,i=this._x1,o=this._y1;if(isNaN(e))i=(e=Math.floor(t))+1,o=(r=Math.floor(n))+1;else{for(var a,u,c=i-e,f=this._root;e>t||t>=i||r>n||n>=o;)switch(u=(n<r)<<1|t<e,(a=new Array(4))[u]=f,f=a,c*=2,u){case 0:i=e+c,o=r+c;break;case 1:e=i-c,o=r+c;break;case 2:i=e+c,r=o-c;break;case 3:e=i-c,r=o-c}this._root&&this._root.length&&(this._root=f)}return this._x0=e,this._y0=r,this._x1=i,this._y1=o,this},Ta.data=function(){var t=[];return this.visit(function(n){if(!n.length)do{t.push(n.data)}while(n=n.next)}),t},Ta.extent=function(t){return arguments.length?this.cover(+t[0][0],+t[0][1]).cover(+t[1][0],+t[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]},Ta.find=function(t,n,e){var r,i,o,a,u,c,f,s=this._x0,l=this._y0,h=this._x1,d=this._y1,p=[],v=this._root;for(v&&p.push(new ba(v,s,l,h,d)),null==e?e=1/0:(s=t-e,l=n-e,h=t+e,d=n+e,e*=e);c=p.pop();)if(!(!(v=c.node)||(i=c.x0)>h||(o=c.y0)>d||(a=c.x1)<s||(u=c.y1)<l))if(v.length){var g=(i+a)/2,y=(o+u)/2;p.push(new ba(v[3],g,y,a,u),new ba(v[2],i,y,g,u),new ba(v[1],g,o,a,y),new ba(v[0],i,o,g,y)),(f=(n>=y)<<1|t>=g)&&(c=p[p.length-1],p[p.length-1]=p[p.length-1-f],p[p.length-1-f]=c)}else{var _=t-+this._x.call(null,v.data),b=n-+this._y.call(null,v.data),m=_*_+b*b;if(m<e){var x=Math.sqrt(e=m);s=t-x,l=n-x,h=t+x,d=n+x,r=v.data}}return r},Ta.remove=function(t){if(isNaN(o=+this._x.call(null,t))||isNaN(a=+this._y.call(null,t)))return this;var n,e,r,i,o,a,u,c,f,s,l,h,d=this._root,p=this._x0,v=this._y0,g=this._x1,y=this._y1;if(!d)return this;if(d.length)for(;;){if((f=o>=(u=(p+g)/2))?p=u:g=u,(s=a>=(c=(v+y)/2))?v=c:y=c,n=d,!(d=d[l=s<<1|f]))return this;if(!d.length)break;(n[l+1&3]||n[l+2&3]||n[l+3&3])&&(e=n,h=l)}for(;d.data!==t;)if(r=d,!(d=d.next))return this;return(i=d.next)&&delete d.next,r?(i?r.next=i:delete r.next,this):n?(i?n[l]=i:delete n[l],(d=n[0]||n[1]||n[2]||n[3])&&d===(n[3]||n[2]||n[1]||n[0])&&!d.length&&(e?e[h]=d:this._root=d),this):(this._root=i,this)},Ta.removeAll=function(t){for(var n=0,e=t.length;n<e;++n)this.remove(t[n]);return this},Ta.root=function(){return this._root},Ta.size=function(){var t=0;return this.visit(function(n){if(!n.length)do{++t}while(n=n.next)}),t},Ta.visit=function(t){var n,e,r,i,o,a,u=[],c=this._root;for(c&&u.push(new ba(c,this._x0,this._y0,this._x1,this._y1));n=u.pop();)if(!t(c=n.node,r=n.x0,i=n.y0,o=n.x1,a=n.y1)&&c.length){var f=(r+o)/2,s=(i+a)/2;(e=c[3])&&u.push(new ba(e,f,s,o,a)),(e=c[2])&&u.push(new ba(e,r,s,f,a)),(e=c[1])&&u.push(new ba(e,f,i,o,s)),(e=c[0])&&u.push(new ba(e,r,i,f,s))}return this},Ta.visitAfter=function(t){var n,e=[],r=[];for(this._root&&e.push(new ba(this._root,this._x0,this._y0,this._x1,this._y1));n=e.pop();){var i=n.node;if(i.length){var o,a=n.x0,u=n.y0,c=n.x1,f=n.y1,s=(a+c)/2,l=(u+f)/2;(o=i[0])&&e.push(new ba(o,a,u,s,l)),(o=i[1])&&e.push(new ba(o,s,u,c,l)),(o=i[2])&&e.push(new ba(o,a,l,s,f)),(o=i[3])&&e.push(new ba(o,s,l,c,f))}r.push(n)}for(;n=r.pop();)t(n.node,n.x0,n.y0,n.x1,n.y1);return this},Ta.x=function(t){return arguments.length?(this._x=t,this):this._x},Ta.y=function(t){return arguments.length?(this._y=t,this):this._y};var za=10,Ra=Math.PI*(3-Math.sqrt(5));function Da(t,n){if((e=(t=n?t.toExponential(n-1):t.toExponential()).indexOf(\"e\"))<0)return null;var e,r=t.slice(0,e);return[r.length>1?r[0]+r.slice(2):r,+t.slice(e+1)]}function qa(t){return(t=Da(Math.abs(t)))?t[1]:NaN}var La,Ua=/^(?:(.)?([<>=^]))?([+\\-( ])?([$#])?(0)?(\\d+)?(,)?(\\.\\d+)?(~)?([a-z%])?$/i;function Oa(t){if(!(n=Ua.exec(t)))throw new Error(\"invalid format: \"+t);var n;return new Ba({fill:n[1],align:n[2],sign:n[3],symbol:n[4],zero:n[5],width:n[6],comma:n[7],precision:n[8]&&n[8].slice(1),trim:n[9],type:n[10]})}function Ba(t){this.fill=void 0===t.fill?\" \":t.fill+\"\",this.align=void 0===t.align?\">\":t.align+\"\",this.sign=void 0===t.sign?\"-\":t.sign+\"\",this.symbol=void 0===t.symbol?\"\":t.symbol+\"\",this.zero=!!t.zero,this.width=void 0===t.width?void 0:+t.width,this.comma=!!t.comma,this.precision=void 0===t.precision?void 0:+t.precision,this.trim=!!t.trim,this.type=void 0===t.type?\"\":t.type+\"\"}function Fa(t,n){var e=Da(t,n);if(!e)return t+\"\";var r=e[0],i=e[1];return i<0?\"0.\"+new Array(-i).join(\"0\")+r:r.length>i+1?r.slice(0,i+1)+\".\"+r.slice(i+1):r+new Array(i-r.length+2).join(\"0\")}Oa.prototype=Ba.prototype,Ba.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?\"0\":\"\")+(void 0===this.width?\"\":Math.max(1,0|this.width))+(this.comma?\",\":\"\")+(void 0===this.precision?\"\":\".\"+Math.max(0,0|this.precision))+(this.trim?\"~\":\"\")+this.type};var Ya={\"%\":function(t,n){return(100*t).toFixed(n)},b:function(t){return Math.round(t).toString(2)},c:function(t){return t+\"\"},d:function(t){return Math.round(t).toString(10)},e:function(t,n){return t.toExponential(n)},f:function(t,n){return t.toFixed(n)},g:function(t,n){return t.toPrecision(n)},o:function(t){return Math.round(t).toString(8)},p:function(t,n){return Fa(100*t,n)},r:Fa,s:function(t,n){var e=Da(t,n);if(!e)return t+\"\";var r=e[0],i=e[1],o=i-(La=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,a=r.length;return o===a?r:o>a?r+new Array(o-a+1).join(\"0\"):o>0?r.slice(0,o)+\".\"+r.slice(o):\"0.\"+new Array(1-o).join(\"0\")+Da(t,Math.max(0,n+o-1))[0]},X:function(t){return Math.round(t).toString(16).toUpperCase()},x:function(t){return Math.round(t).toString(16)}};function Ia(t){return t}var Ha,ja=Array.prototype.map,Va=[\"y\",\"z\",\"a\",\"f\",\"p\",\"n\",\"µ\",\"m\",\"\",\"k\",\"M\",\"G\",\"T\",\"P\",\"E\",\"Z\",\"Y\"];function Xa(t){var n,e,r=void 0===t.grouping||void 0===t.thousands?Ia:(n=ja.call(t.grouping,Number),e=t.thousands+\"\",function(t,r){for(var i=t.length,o=[],a=0,u=n[0],c=0;i>0&&u>0&&(c+u+1>r&&(u=Math.max(1,r-c)),o.push(t.substring(i-=u,i+u)),!((c+=u+1)>r));)u=n[a=(a+1)%n.length];return o.reverse().join(e)}),i=void 0===t.currency?\"\":t.currency[0]+\"\",o=void 0===t.currency?\"\":t.currency[1]+\"\",a=void 0===t.decimal?\".\":t.decimal+\"\",u=void 0===t.numerals?Ia:function(t){return function(n){return n.replace(/[0-9]/g,function(n){return t[+n]})}}(ja.call(t.numerals,String)),c=void 0===t.percent?\"%\":t.percent+\"\",f=void 0===t.minus?\"-\":t.minus+\"\",s=void 0===t.nan?\"NaN\":t.nan+\"\";function l(t){var n=(t=Oa(t)).fill,e=t.align,l=t.sign,h=t.symbol,d=t.zero,p=t.width,v=t.comma,g=t.precision,y=t.trim,_=t.type;\"n\"===_?(v=!0,_=\"g\"):Ya[_]||(void 0===g&&(g=12),y=!0,_=\"g\"),(d||\"0\"===n&&\"=\"===e)&&(d=!0,n=\"0\",e=\"=\");var b=\"$\"===h?i:\"#\"===h&&/[boxX]/.test(_)?\"0\"+_.toLowerCase():\"\",m=\"$\"===h?o:/[%p]/.test(_)?c:\"\",x=Ya[_],w=/[defgprs%]/.test(_);function M(t){var i,o,c,h=b,M=m;if(\"c\"===_)M=x(t)+M,t=\"\";else{var N=(t=+t)<0||1/t<0;if(t=isNaN(t)?s:x(Math.abs(t),g),y&&(t=function(t){t:for(var n,e=t.length,r=1,i=-1;r<e;++r)switch(t[r]){case\".\":i=n=r;break;case\"0\":0===i&&(i=r),n=r;break;default:if(!+t[r])break t;i>0&&(i=0)}return i>0?t.slice(0,i)+t.slice(n+1):t}(t)),N&&0==+t&&\"+\"!==l&&(N=!1),h=(N?\"(\"===l?l:f:\"-\"===l||\"(\"===l?\"\":l)+h,M=(\"s\"===_?Va[8+La/3]:\"\")+M+(N&&\"(\"===l?\")\":\"\"),w)for(i=-1,o=t.length;++i<o;)if(48>(c=t.charCodeAt(i))||c>57){M=(46===c?a+t.slice(i+1):t.slice(i))+M,t=t.slice(0,i);break}}v&&!d&&(t=r(t,1/0));var T=h.length+t.length+M.length,A=T<p?new Array(p-T+1).join(n):\"\";switch(v&&d&&(t=r(A+t,A.length?p-M.length:1/0),A=\"\"),e){case\"<\":t=h+t+M+A;break;case\"=\":t=h+A+t+M;break;case\"^\":t=A.slice(0,T=A.length>>1)+h+t+M+A.slice(T);break;default:t=A+h+t+M}return u(t)}return g=void 0===g?6:/[gprs]/.test(_)?Math.max(1,Math.min(21,g)):Math.max(0,Math.min(20,g)),M.toString=function(){return t+\"\"},M}return{format:l,formatPrefix:function(t,n){var e=l(((t=Oa(t)).type=\"f\",t)),r=3*Math.max(-8,Math.min(8,Math.floor(qa(n)/3))),i=Math.pow(10,-r),o=Va[8+r/3];return function(t){return e(i*t)+o}}}}function Ga(n){return Ha=Xa(n),t.format=Ha.format,t.formatPrefix=Ha.formatPrefix,Ha}function $a(t){return Math.max(0,-qa(Math.abs(t)))}function Wa(t,n){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(qa(n)/3)))-qa(Math.abs(t)))}function Za(t,n){return t=Math.abs(t),n=Math.abs(n)-t,Math.max(0,qa(n)-qa(t))+1}function Qa(){return new Ka}function Ka(){this.reset()}Ga({decimal:\".\",thousands:\",\",grouping:[3],currency:[\"$\",\"\"],minus:\"-\"}),Ka.prototype={constructor:Ka,reset:function(){this.s=this.t=0},add:function(t){tu(Ja,t,this.t),tu(this,Ja.s,this.s),this.s?this.t+=Ja.t:this.s=Ja.t},valueOf:function(){return this.s}};var Ja=new Ka;function tu(t,n,e){var r=t.s=n+e,i=r-n,o=r-i;t.t=n-o+(e-i)}var nu=1e-6,eu=1e-12,ru=Math.PI,iu=ru/2,ou=ru/4,au=2*ru,uu=180/ru,cu=ru/180,fu=Math.abs,su=Math.atan,lu=Math.atan2,hu=Math.cos,du=Math.ceil,pu=Math.exp,vu=Math.log,gu=Math.pow,yu=Math.sin,_u=Math.sign||function(t){return t>0?1:t<0?-1:0},bu=Math.sqrt,mu=Math.tan;function xu(t){return t>1?0:t<-1?ru:Math.acos(t)}function wu(t){return t>1?iu:t<-1?-iu:Math.asin(t)}function Mu(t){return(t=yu(t/2))*t}function Nu(){}function Tu(t,n){t&&Su.hasOwnProperty(t.type)&&Su[t.type](t,n)}var Au={Feature:function(t,n){Tu(t.geometry,n)},FeatureCollection:function(t,n){for(var e=t.features,r=-1,i=e.length;++r<i;)Tu(e[r].geometry,n)}},Su={Sphere:function(t,n){n.sphere()},Point:function(t,n){t=t.coordinates,n.point(t[0],t[1],t[2])},MultiPoint:function(t,n){for(var e=t.coordinates,r=-1,i=e.length;++r<i;)t=e[r],n.point(t[0],t[1],t[2])},LineString:function(t,n){ku(t.coordinates,n,0)},MultiLineString:function(t,n){for(var e=t.coordinates,r=-1,i=e.length;++r<i;)ku(e[r],n,0)},Polygon:function(t,n){Eu(t.coordinates,n)},MultiPolygon:function(t,n){for(var e=t.coordinates,r=-1,i=e.length;++r<i;)Eu(e[r],n)},GeometryCollection:function(t,n){for(var e=t.geometries,r=-1,i=e.length;++r<i;)Tu(e[r],n)}};function ku(t,n,e){var r,i=-1,o=t.length-e;for(n.lineStart();++i<o;)r=t[i],n.point(r[0],r[1],r[2]);n.lineEnd()}function Eu(t,n){var e=-1,r=t.length;for(n.polygonStart();++e<r;)ku(t[e],n,1);n.polygonEnd()}function Cu(t,n){t&&Au.hasOwnProperty(t.type)?Au[t.type](t,n):Tu(t,n)}var Pu,zu,Ru,Du,qu,Lu=Qa(),Uu=Qa(),Ou={point:Nu,lineStart:Nu,lineEnd:Nu,polygonStart:function(){Lu.reset(),Ou.lineStart=Bu,Ou.lineEnd=Fu},polygonEnd:function(){var t=+Lu;Uu.add(t<0?au+t:t),this.lineStart=this.lineEnd=this.point=Nu},sphere:function(){Uu.add(au)}};function Bu(){Ou.point=Yu}function Fu(){Iu(Pu,zu)}function Yu(t,n){Ou.point=Iu,Pu=t,zu=n,Ru=t*=cu,Du=hu(n=(n*=cu)/2+ou),qu=yu(n)}function Iu(t,n){var e=(t*=cu)-Ru,r=e>=0?1:-1,i=r*e,o=hu(n=(n*=cu)/2+ou),a=yu(n),u=qu*a,c=Du*o+u*hu(i),f=u*r*yu(i);Lu.add(lu(f,c)),Ru=t,Du=o,qu=a}function Hu(t){return[lu(t[1],t[0]),wu(t[2])]}function ju(t){var n=t[0],e=t[1],r=hu(e);return[r*hu(n),r*yu(n),yu(e)]}function Vu(t,n){return t[0]*n[0]+t[1]*n[1]+t[2]*n[2]}function Xu(t,n){return[t[1]*n[2]-t[2]*n[1],t[2]*n[0]-t[0]*n[2],t[0]*n[1]-t[1]*n[0]]}function Gu(t,n){t[0]+=n[0],t[1]+=n[1],t[2]+=n[2]}function $u(t,n){return[t[0]*n,t[1]*n,t[2]*n]}function Wu(t){var n=bu(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=n,t[1]/=n,t[2]/=n}var Zu,Qu,Ku,Ju,tc,nc,ec,rc,ic,oc,ac,uc,cc,fc,sc,lc,hc,dc,pc,vc,gc,yc,_c,bc,mc,xc,wc=Qa(),Mc={point:Nc,lineStart:Ac,lineEnd:Sc,polygonStart:function(){Mc.point=kc,Mc.lineStart=Ec,Mc.lineEnd=Cc,wc.reset(),Ou.polygonStart()},polygonEnd:function(){Ou.polygonEnd(),Mc.point=Nc,Mc.lineStart=Ac,Mc.lineEnd=Sc,Lu<0?(Zu=-(Ku=180),Qu=-(Ju=90)):wc>nu?Ju=90:wc<-nu&&(Qu=-90),oc[0]=Zu,oc[1]=Ku},sphere:function(){Zu=-(Ku=180),Qu=-(Ju=90)}};function Nc(t,n){ic.push(oc=[Zu=t,Ku=t]),n<Qu&&(Qu=n),n>Ju&&(Ju=n)}function Tc(t,n){var e=ju([t*cu,n*cu]);if(rc){var r=Xu(rc,e),i=Xu([r[1],-r[0],0],r);Wu(i),i=Hu(i);var o,a=t-tc,u=a>0?1:-1,c=i[0]*uu*u,f=fu(a)>180;f^(u*tc<c&&c<u*t)?(o=i[1]*uu)>Ju&&(Ju=o):f^(u*tc<(c=(c+360)%360-180)&&c<u*t)?(o=-i[1]*uu)<Qu&&(Qu=o):(n<Qu&&(Qu=n),n>Ju&&(Ju=n)),f?t<tc?Pc(Zu,t)>Pc(Zu,Ku)&&(Ku=t):Pc(t,Ku)>Pc(Zu,Ku)&&(Zu=t):Ku>=Zu?(t<Zu&&(Zu=t),t>Ku&&(Ku=t)):t>tc?Pc(Zu,t)>Pc(Zu,Ku)&&(Ku=t):Pc(t,Ku)>Pc(Zu,Ku)&&(Zu=t)}else ic.push(oc=[Zu=t,Ku=t]);n<Qu&&(Qu=n),n>Ju&&(Ju=n),rc=e,tc=t}function Ac(){Mc.point=Tc}function Sc(){oc[0]=Zu,oc[1]=Ku,Mc.point=Nc,rc=null}function kc(t,n){if(rc){var e=t-tc;wc.add(fu(e)>180?e+(e>0?360:-360):e)}else nc=t,ec=n;Ou.point(t,n),Tc(t,n)}function Ec(){Ou.lineStart()}function Cc(){kc(nc,ec),Ou.lineEnd(),fu(wc)>nu&&(Zu=-(Ku=180)),oc[0]=Zu,oc[1]=Ku,rc=null}function Pc(t,n){return(n-=t)<0?n+360:n}function zc(t,n){return t[0]-n[0]}function Rc(t,n){return t[0]<=t[1]?t[0]<=n&&n<=t[1]:n<t[0]||t[1]<n}var Dc={sphere:Nu,point:qc,lineStart:Uc,lineEnd:Fc,polygonStart:function(){Dc.lineStart=Yc,Dc.lineEnd=Ic},polygonEnd:function(){Dc.lineStart=Uc,Dc.lineEnd=Fc}};function qc(t,n){t*=cu;var e=hu(n*=cu);Lc(e*hu(t),e*yu(t),yu(n))}function Lc(t,n,e){cc+=(t-cc)/++ac,fc+=(n-fc)/ac,sc+=(e-sc)/ac}function Uc(){Dc.point=Oc}function Oc(t,n){t*=cu;var e=hu(n*=cu);bc=e*hu(t),mc=e*yu(t),xc=yu(n),Dc.point=Bc,Lc(bc,mc,xc)}function Bc(t,n){t*=cu;var e=hu(n*=cu),r=e*hu(t),i=e*yu(t),o=yu(n),a=lu(bu((a=mc*o-xc*i)*a+(a=xc*r-bc*o)*a+(a=bc*i-mc*r)*a),bc*r+mc*i+xc*o);uc+=a,lc+=a*(bc+(bc=r)),hc+=a*(mc+(mc=i)),dc+=a*(xc+(xc=o)),Lc(bc,mc,xc)}function Fc(){Dc.point=qc}function Yc(){Dc.point=Hc}function Ic(){jc(yc,_c),Dc.point=qc}function Hc(t,n){yc=t,_c=n,t*=cu,n*=cu,Dc.point=jc;var e=hu(n);bc=e*hu(t),mc=e*yu(t),xc=yu(n),Lc(bc,mc,xc)}function jc(t,n){t*=cu;var e=hu(n*=cu),r=e*hu(t),i=e*yu(t),o=yu(n),a=mc*o-xc*i,u=xc*r-bc*o,c=bc*i-mc*r,f=bu(a*a+u*u+c*c),s=wu(f),l=f&&-s/f;pc+=l*a,vc+=l*u,gc+=l*c,uc+=s,lc+=s*(bc+(bc=r)),hc+=s*(mc+(mc=i)),dc+=s*(xc+(xc=o)),Lc(bc,mc,xc)}function Vc(t){return function(){return t}}function Xc(t,n){function e(e,r){return e=t(e,r),n(e[0],e[1])}return t.invert&&n.invert&&(e.invert=function(e,r){return(e=n.invert(e,r))&&t.invert(e[0],e[1])}),e}function Gc(t,n){return[fu(t)>ru?t+Math.round(-t/au)*au:t,n]}function $c(t,n,e){return(t%=au)?n||e?Xc(Zc(t),Qc(n,e)):Zc(t):n||e?Qc(n,e):Gc}function Wc(t){return function(n,e){return[(n+=t)>ru?n-au:n<-ru?n+au:n,e]}}function Zc(t){var n=Wc(t);return n.invert=Wc(-t),n}function Qc(t,n){var e=hu(t),r=yu(t),i=hu(n),o=yu(n);function a(t,n){var a=hu(n),u=hu(t)*a,c=yu(t)*a,f=yu(n),s=f*e+u*r;return[lu(c*i-s*o,u*e-f*r),wu(s*i+c*o)]}return a.invert=function(t,n){var a=hu(n),u=hu(t)*a,c=yu(t)*a,f=yu(n),s=f*i-c*o;return[lu(c*i+f*o,u*e+s*r),wu(s*e-u*r)]},a}function Kc(t){function n(n){return(n=t(n[0]*cu,n[1]*cu))[0]*=uu,n[1]*=uu,n}return t=$c(t[0]*cu,t[1]*cu,t.length>2?t[2]*cu:0),n.invert=function(n){return(n=t.invert(n[0]*cu,n[1]*cu))[0]*=uu,n[1]*=uu,n},n}function Jc(t,n,e,r,i,o){if(e){var a=hu(n),u=yu(n),c=r*e;null==i?(i=n+r*au,o=n-c/2):(i=tf(a,i),o=tf(a,o),(r>0?i<o:i>o)&&(i+=r*au));for(var f,s=i;r>0?s>o:s<o;s-=c)f=Hu([a,-u*hu(s),-u*yu(s)]),t.point(f[0],f[1])}}function tf(t,n){(n=ju(n))[0]-=t,Wu(n);var e=xu(-n[1]);return((-n[2]<0?-e:e)+au-nu)%au}function nf(){var t,n=[];return{point:function(n,e){t.push([n,e])},lineStart:function(){n.push(t=[])},lineEnd:Nu,rejoin:function(){n.length>1&&n.push(n.pop().concat(n.shift()))},result:function(){var e=n;return n=[],t=null,e}}}function ef(t,n){return fu(t[0]-n[0])<nu&&fu(t[1]-n[1])<nu}function rf(t,n,e,r){this.x=t,this.z=n,this.o=e,this.e=r,this.v=!1,this.n=this.p=null}function of(t,n,e,r,i){var o,a,u=[],c=[];if(t.forEach(function(t){if(!((n=t.length-1)<=0)){var n,e,r=t[0],a=t[n];if(ef(r,a)){for(i.lineStart(),o=0;o<n;++o)i.point((r=t[o])[0],r[1]);i.lineEnd()}else u.push(e=new rf(r,t,null,!0)),c.push(e.o=new rf(r,null,e,!1)),u.push(e=new rf(a,t,null,!1)),c.push(e.o=new rf(a,null,e,!0))}}),u.length){for(c.sort(n),af(u),af(c),o=0,a=c.length;o<a;++o)c[o].e=e=!e;for(var f,s,l=u[0];;){for(var h=l,d=!0;h.v;)if((h=h.n)===l)return;f=h.z,i.lineStart();do{if(h.v=h.o.v=!0,h.e){if(d)for(o=0,a=f.length;o<a;++o)i.point((s=f[o])[0],s[1]);else r(h.x,h.n.x,1,i);h=h.n}else{if(d)for(f=h.p.z,o=f.length-1;o>=0;--o)i.point((s=f[o])[0],s[1]);else r(h.x,h.p.x,-1,i);h=h.p}f=(h=h.o).z,d=!d}while(!h.v);i.lineEnd()}}}function af(t){if(n=t.length){for(var n,e,r=0,i=t[0];++r<n;)i.n=e=t[r],e.p=i,i=e;i.n=e=t[0],e.p=i}}Gc.invert=Gc;var uf=Qa();function cf(t){return fu(t[0])<=ru?t[0]:_u(t[0])*((fu(t[0])+ru)%au-ru)}function ff(t,n){var e=cf(n),r=n[1],i=yu(r),o=[yu(e),-hu(e),0],a=0,u=0;uf.reset(),1===i?r=iu+nu:-1===i&&(r=-iu-nu);for(var c=0,f=t.length;c<f;++c)if(l=(s=t[c]).length)for(var s,l,h=s[l-1],d=cf(h),p=h[1]/2+ou,v=yu(p),g=hu(p),y=0;y<l;++y,d=b,v=x,g=w,h=_){var _=s[y],b=cf(_),m=_[1]/2+ou,x=yu(m),w=hu(m),M=b-d,N=M>=0?1:-1,T=N*M,A=T>ru,S=v*x;if(uf.add(lu(S*N*yu(T),g*w+S*hu(T))),a+=A?M+N*au:M,A^d>=e^b>=e){var k=Xu(ju(h),ju(_));Wu(k);var E=Xu(o,k);Wu(E);var C=(A^M>=0?-1:1)*wu(E[2]);(r>C||r===C&&(k[0]||k[1]))&&(u+=A^M>=0?1:-1)}}return(a<-nu||a<nu&&uf<-nu)^1&u}function sf(t,n,e,r){return function(i){var o,a,u,c=n(i),f=nf(),s=n(f),l=!1,h={point:d,lineStart:v,lineEnd:g,polygonStart:function(){h.point=y,h.lineStart=_,h.lineEnd=b,a=[],o=[]},polygonEnd:function(){h.point=d,h.lineStart=v,h.lineEnd=g,a=A(a);var t=ff(o,r);a.length?(l||(i.polygonStart(),l=!0),of(a,hf,t,e,i)):t&&(l||(i.polygonStart(),l=!0),i.lineStart(),e(null,null,1,i),i.lineEnd()),l&&(i.polygonEnd(),l=!1),a=o=null},sphere:function(){i.polygonStart(),i.lineStart(),e(null,null,1,i),i.lineEnd(),i.polygonEnd()}};function d(n,e){t(n,e)&&i.point(n,e)}function p(t,n){c.point(t,n)}function v(){h.point=p,c.lineStart()}function g(){h.point=d,c.lineEnd()}function y(t,n){u.push([t,n]),s.point(t,n)}function _(){s.lineStart(),u=[]}function b(){y(u[0][0],u[0][1]),s.lineEnd();var t,n,e,r,c=s.clean(),h=f.result(),d=h.length;if(u.pop(),o.push(u),u=null,d)if(1&c){if((n=(e=h[0]).length-1)>0){for(l||(i.polygonStart(),l=!0),i.lineStart(),t=0;t<n;++t)i.point((r=e[t])[0],r[1]);i.lineEnd()}}else d>1&&2&c&&h.push(h.pop().concat(h.shift())),a.push(h.filter(lf))}return h}}function lf(t){return t.length>1}function hf(t,n){return((t=t.x)[0]<0?t[1]-iu-nu:iu-t[1])-((n=n.x)[0]<0?n[1]-iu-nu:iu-n[1])}var df=sf(function(){return!0},function(t){var n,e=NaN,r=NaN,i=NaN;return{lineStart:function(){t.lineStart(),n=1},point:function(o,a){var u=o>0?ru:-ru,c=fu(o-e);fu(c-ru)<nu?(t.point(e,r=(r+a)/2>0?iu:-iu),t.point(i,r),t.lineEnd(),t.lineStart(),t.point(u,r),t.point(o,r),n=0):i!==u&&c>=ru&&(fu(e-i)<nu&&(e-=i*nu),fu(o-u)<nu&&(o-=u*nu),r=function(t,n,e,r){var i,o,a=yu(t-e);return fu(a)>nu?su((yu(n)*(o=hu(r))*yu(e)-yu(r)*(i=hu(n))*yu(t))/(i*o*a)):(n+r)/2}(e,r,o,a),t.point(i,r),t.lineEnd(),t.lineStart(),t.point(u,r),n=0),t.point(e=o,r=a),i=u},lineEnd:function(){t.lineEnd(),e=r=NaN},clean:function(){return 2-n}}},function(t,n,e,r){var i;if(null==t)i=e*iu,r.point(-ru,i),r.point(0,i),r.point(ru,i),r.point(ru,0),r.point(ru,-i),r.point(0,-i),r.point(-ru,-i),r.point(-ru,0),r.point(-ru,i);else if(fu(t[0]-n[0])>nu){var o=t[0]<n[0]?ru:-ru;i=e*o/2,r.point(-o,i),r.point(0,i),r.point(o,i)}else r.point(n[0],n[1])},[-ru,-iu]);function pf(t){var n=hu(t),e=6*cu,r=n>0,i=fu(n)>nu;function o(t,e){return hu(t)*hu(e)>n}function a(t,e,r){var i=[1,0,0],o=Xu(ju(t),ju(e)),a=Vu(o,o),u=o[0],c=a-u*u;if(!c)return!r&&t;var f=n*a/c,s=-n*u/c,l=Xu(i,o),h=$u(i,f);Gu(h,$u(o,s));var d=l,p=Vu(h,d),v=Vu(d,d),g=p*p-v*(Vu(h,h)-1);if(!(g<0)){var y=bu(g),_=$u(d,(-p-y)/v);if(Gu(_,h),_=Hu(_),!r)return _;var b,m=t[0],x=e[0],w=t[1],M=e[1];x<m&&(b=m,m=x,x=b);var N=x-m,T=fu(N-ru)<nu;if(!T&&M<w&&(b=w,w=M,M=b),T||N<nu?T?w+M>0^_[1]<(fu(_[0]-m)<nu?w:M):w<=_[1]&&_[1]<=M:N>ru^(m<=_[0]&&_[0]<=x)){var A=$u(d,(-p+y)/v);return Gu(A,h),[_,Hu(A)]}}}function u(n,e){var i=r?t:ru-t,o=0;return n<-i?o|=1:n>i&&(o|=2),e<-i?o|=4:e>i&&(o|=8),o}return sf(o,function(t){var n,e,c,f,s;return{lineStart:function(){f=c=!1,s=1},point:function(l,h){var d,p=[l,h],v=o(l,h),g=r?v?0:u(l,h):v?u(l+(l<0?ru:-ru),h):0;if(!n&&(f=c=v)&&t.lineStart(),v!==c&&(!(d=a(n,p))||ef(n,d)||ef(p,d))&&(p[0]+=nu,p[1]+=nu,v=o(p[0],p[1])),v!==c)s=0,v?(t.lineStart(),d=a(p,n),t.point(d[0],d[1])):(d=a(n,p),t.point(d[0],d[1]),t.lineEnd()),n=d;else if(i&&n&&r^v){var y;g&e||!(y=a(p,n,!0))||(s=0,r?(t.lineStart(),t.point(y[0][0],y[0][1]),t.point(y[1][0],y[1][1]),t.lineEnd()):(t.point(y[1][0],y[1][1]),t.lineEnd(),t.lineStart(),t.point(y[0][0],y[0][1])))}!v||n&&ef(n,p)||t.point(p[0],p[1]),n=p,c=v,e=g},lineEnd:function(){c&&t.lineEnd(),n=null},clean:function(){return s|(f&&c)<<1}}},function(n,r,i,o){Jc(o,t,e,i,n,r)},r?[0,-t]:[-ru,t-ru])}var vf=1e9,gf=-vf;function yf(t,n,e,r){function i(i,o){return t<=i&&i<=e&&n<=o&&o<=r}function o(i,o,u,f){var s=0,l=0;if(null==i||(s=a(i,u))!==(l=a(o,u))||c(i,o)<0^u>0)do{f.point(0===s||3===s?t:e,s>1?r:n)}while((s=(s+u+4)%4)!==l);else f.point(o[0],o[1])}function a(r,i){return fu(r[0]-t)<nu?i>0?0:3:fu(r[0]-e)<nu?i>0?2:1:fu(r[1]-n)<nu?i>0?1:0:i>0?3:2}function u(t,n){return c(t.x,n.x)}function c(t,n){var e=a(t,1),r=a(n,1);return e!==r?e-r:0===e?n[1]-t[1]:1===e?t[0]-n[0]:2===e?t[1]-n[1]:n[0]-t[0]}return function(a){var c,f,s,l,h,d,p,v,g,y,_,b=a,m=nf(),x={point:w,lineStart:function(){x.point=M,f&&f.push(s=[]);y=!0,g=!1,p=v=NaN},lineEnd:function(){c&&(M(l,h),d&&g&&m.rejoin(),c.push(m.result()));x.point=w,g&&b.lineEnd()},polygonStart:function(){b=m,c=[],f=[],_=!0},polygonEnd:function(){var n=function(){for(var n=0,e=0,i=f.length;e<i;++e)for(var o,a,u=f[e],c=1,s=u.length,l=u[0],h=l[0],d=l[1];c<s;++c)o=h,a=d,l=u[c],h=l[0],d=l[1],a<=r?d>r&&(h-o)*(r-a)>(d-a)*(t-o)&&++n:d<=r&&(h-o)*(r-a)<(d-a)*(t-o)&&--n;return n}(),e=_&&n,i=(c=A(c)).length;(e||i)&&(a.polygonStart(),e&&(a.lineStart(),o(null,null,1,a),a.lineEnd()),i&&of(c,u,n,o,a),a.polygonEnd());b=a,c=f=s=null}};function w(t,n){i(t,n)&&b.point(t,n)}function M(o,a){var u=i(o,a);if(f&&s.push([o,a]),y)l=o,h=a,d=u,y=!1,u&&(b.lineStart(),b.point(o,a));else if(u&&g)b.point(o,a);else{var c=[p=Math.max(gf,Math.min(vf,p)),v=Math.max(gf,Math.min(vf,v))],m=[o=Math.max(gf,Math.min(vf,o)),a=Math.max(gf,Math.min(vf,a))];!function(t,n,e,r,i,o){var a,u=t[0],c=t[1],f=0,s=1,l=n[0]-u,h=n[1]-c;if(a=e-u,l||!(a>0)){if(a/=l,l<0){if(a<f)return;a<s&&(s=a)}else if(l>0){if(a>s)return;a>f&&(f=a)}if(a=i-u,l||!(a<0)){if(a/=l,l<0){if(a>s)return;a>f&&(f=a)}else if(l>0){if(a<f)return;a<s&&(s=a)}if(a=r-c,h||!(a>0)){if(a/=h,h<0){if(a<f)return;a<s&&(s=a)}else if(h>0){if(a>s)return;a>f&&(f=a)}if(a=o-c,h||!(a<0)){if(a/=h,h<0){if(a>s)return;a>f&&(f=a)}else if(h>0){if(a<f)return;a<s&&(s=a)}return f>0&&(t[0]=u+f*l,t[1]=c+f*h),s<1&&(n[0]=u+s*l,n[1]=c+s*h),!0}}}}}(c,m,t,n,e,r)?u&&(b.lineStart(),b.point(o,a),_=!1):(g||(b.lineStart(),b.point(c[0],c[1])),b.point(m[0],m[1]),u||b.lineEnd(),_=!1)}p=o,v=a,g=u}return x}}var _f,bf,mf,xf=Qa(),wf={sphere:Nu,point:Nu,lineStart:function(){wf.point=Nf,wf.lineEnd=Mf},lineEnd:Nu,polygonStart:Nu,polygonEnd:Nu};function Mf(){wf.point=wf.lineEnd=Nu}function Nf(t,n){_f=t*=cu,bf=yu(n*=cu),mf=hu(n),wf.point=Tf}function Tf(t,n){t*=cu;var e=yu(n*=cu),r=hu(n),i=fu(t-_f),o=hu(i),a=r*yu(i),u=mf*e-bf*r*o,c=bf*e+mf*r*o;xf.add(lu(bu(a*a+u*u),c)),_f=t,bf=e,mf=r}function Af(t){return xf.reset(),Cu(t,wf),+xf}var Sf=[null,null],kf={type:\"LineString\",coordinates:Sf};function Ef(t,n){return Sf[0]=t,Sf[1]=n,Af(kf)}var Cf={Feature:function(t,n){return zf(t.geometry,n)},FeatureCollection:function(t,n){for(var e=t.features,r=-1,i=e.length;++r<i;)if(zf(e[r].geometry,n))return!0;return!1}},Pf={Sphere:function(){return!0},Point:function(t,n){return Rf(t.coordinates,n)},MultiPoint:function(t,n){for(var e=t.coordinates,r=-1,i=e.length;++r<i;)if(Rf(e[r],n))return!0;return!1},LineString:function(t,n){return Df(t.coordinates,n)},MultiLineString:function(t,n){for(var e=t.coordinates,r=-1,i=e.length;++r<i;)if(Df(e[r],n))return!0;return!1},Polygon:function(t,n){return qf(t.coordinates,n)},MultiPolygon:function(t,n){for(var e=t.coordinates,r=-1,i=e.length;++r<i;)if(qf(e[r],n))return!0;return!1},GeometryCollection:function(t,n){for(var e=t.geometries,r=-1,i=e.length;++r<i;)if(zf(e[r],n))return!0;return!1}};function zf(t,n){return!(!t||!Pf.hasOwnProperty(t.type))&&Pf[t.type](t,n)}function Rf(t,n){return 0===Ef(t,n)}function Df(t,n){for(var e,r,i,o=0,a=t.length;o<a;o++){if(0===(r=Ef(t[o],n)))return!0;if(o>0&&(i=Ef(t[o],t[o-1]))>0&&e<=i&&r<=i&&(e+r-i)*(1-Math.pow((e-r)/i,2))<eu*i)return!0;e=r}return!1}function qf(t,n){return!!ff(t.map(Lf),Uf(n))}function Lf(t){return(t=t.map(Uf)).pop(),t}function Uf(t){return[t[0]*cu,t[1]*cu]}function Of(t,n,e){var r=g(t,n-nu,e).concat(n);return function(t){return r.map(function(n){return[t,n]})}}function Bf(t,n,e){var r=g(t,n-nu,e).concat(n);return function(t){return r.map(function(n){return[n,t]})}}function Ff(){var t,n,e,r,i,o,a,u,c,f,s,l,h=10,d=h,p=90,v=360,y=2.5;function _(){return{type:\"MultiLineString\",coordinates:b()}}function b(){return g(du(r/p)*p,e,p).map(s).concat(g(du(u/v)*v,a,v).map(l)).concat(g(du(n/h)*h,t,h).filter(function(t){return fu(t%p)>nu}).map(c)).concat(g(du(o/d)*d,i,d).filter(function(t){return fu(t%v)>nu}).map(f))}return _.lines=function(){return b().map(function(t){return{type:\"LineString\",coordinates:t}})},_.outline=function(){return{type:\"Polygon\",coordinates:[s(r).concat(l(a).slice(1),s(e).reverse().slice(1),l(u).reverse().slice(1))]}},_.extent=function(t){return arguments.length?_.extentMajor(t).extentMinor(t):_.extentMinor()},_.extentMajor=function(t){return arguments.length?(r=+t[0][0],e=+t[1][0],u=+t[0][1],a=+t[1][1],r>e&&(t=r,r=e,e=t),u>a&&(t=u,u=a,a=t),_.precision(y)):[[r,u],[e,a]]},_.extentMinor=function(e){return arguments.length?(n=+e[0][0],t=+e[1][0],o=+e[0][1],i=+e[1][1],n>t&&(e=n,n=t,t=e),o>i&&(e=o,o=i,i=e),_.precision(y)):[[n,o],[t,i]]},_.step=function(t){return arguments.length?_.stepMajor(t).stepMinor(t):_.stepMinor()},_.stepMajor=function(t){return arguments.length?(p=+t[0],v=+t[1],_):[p,v]},_.stepMinor=function(t){return arguments.length?(h=+t[0],d=+t[1],_):[h,d]},_.precision=function(h){return arguments.length?(y=+h,c=Of(o,i,90),f=Bf(n,t,y),s=Of(u,a,90),l=Bf(r,e,y),_):y},_.extentMajor([[-180,-90+nu],[180,90-nu]]).extentMinor([[-180,-80-nu],[180,80+nu]])}function Yf(t){return t}var If,Hf,jf,Vf,Xf=Qa(),Gf=Qa(),$f={point:Nu,lineStart:Nu,lineEnd:Nu,polygonStart:function(){$f.lineStart=Wf,$f.lineEnd=Kf},polygonEnd:function(){$f.lineStart=$f.lineEnd=$f.point=Nu,Xf.add(fu(Gf)),Gf.reset()},result:function(){var t=Xf/2;return Xf.reset(),t}};function Wf(){$f.point=Zf}function Zf(t,n){$f.point=Qf,If=jf=t,Hf=Vf=n}function Qf(t,n){Gf.add(Vf*t-jf*n),jf=t,Vf=n}function Kf(){Qf(If,Hf)}var Jf=1/0,ts=Jf,ns=-Jf,es=ns,rs={point:function(t,n){t<Jf&&(Jf=t);t>ns&&(ns=t);n<ts&&(ts=n);n>es&&(es=n)},lineStart:Nu,lineEnd:Nu,polygonStart:Nu,polygonEnd:Nu,result:function(){var t=[[Jf,ts],[ns,es]];return ns=es=-(ts=Jf=1/0),t}};var is,os,as,us,cs=0,fs=0,ss=0,ls=0,hs=0,ds=0,ps=0,vs=0,gs=0,ys={point:_s,lineStart:bs,lineEnd:ws,polygonStart:function(){ys.lineStart=Ms,ys.lineEnd=Ns},polygonEnd:function(){ys.point=_s,ys.lineStart=bs,ys.lineEnd=ws},result:function(){var t=gs?[ps/gs,vs/gs]:ds?[ls/ds,hs/ds]:ss?[cs/ss,fs/ss]:[NaN,NaN];return cs=fs=ss=ls=hs=ds=ps=vs=gs=0,t}};function _s(t,n){cs+=t,fs+=n,++ss}function bs(){ys.point=ms}function ms(t,n){ys.point=xs,_s(as=t,us=n)}function xs(t,n){var e=t-as,r=n-us,i=bu(e*e+r*r);ls+=i*(as+t)/2,hs+=i*(us+n)/2,ds+=i,_s(as=t,us=n)}function ws(){ys.point=_s}function Ms(){ys.point=Ts}function Ns(){As(is,os)}function Ts(t,n){ys.point=As,_s(is=as=t,os=us=n)}function As(t,n){var e=t-as,r=n-us,i=bu(e*e+r*r);ls+=i*(as+t)/2,hs+=i*(us+n)/2,ds+=i,ps+=(i=us*t-as*n)*(as+t),vs+=i*(us+n),gs+=3*i,_s(as=t,us=n)}function Ss(t){this._context=t}Ss.prototype={_radius:4.5,pointRadius:function(t){return this._radius=t,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._context.closePath(),this._point=NaN},point:function(t,n){switch(this._point){case 0:this._context.moveTo(t,n),this._point=1;break;case 1:this._context.lineTo(t,n);break;default:this._context.moveTo(t+this._radius,n),this._context.arc(t,n,this._radius,0,au)}},result:Nu};var ks,Es,Cs,Ps,zs,Rs=Qa(),Ds={point:Nu,lineStart:function(){Ds.point=qs},lineEnd:function(){ks&&Ls(Es,Cs),Ds.point=Nu},polygonStart:function(){ks=!0},polygonEnd:function(){ks=null},result:function(){var t=+Rs;return Rs.reset(),t}};function qs(t,n){Ds.point=Ls,Es=Ps=t,Cs=zs=n}function Ls(t,n){Ps-=t,zs-=n,Rs.add(bu(Ps*Ps+zs*zs)),Ps=t,zs=n}function Us(){this._string=[]}function Os(t){return\"m0,\"+t+\"a\"+t+\",\"+t+\" 0 1,1 0,\"+-2*t+\"a\"+t+\",\"+t+\" 0 1,1 0,\"+2*t+\"z\"}function Bs(t){return function(n){var e=new Fs;for(var r in t)e[r]=t[r];return e.stream=n,e}}function Fs(){}function Ys(t,n,e){var r=t.clipExtent&&t.clipExtent();return t.scale(150).translate([0,0]),null!=r&&t.clipExtent(null),Cu(e,t.stream(rs)),n(rs.result()),null!=r&&t.clipExtent(r),t}function Is(t,n,e){return Ys(t,function(e){var r=n[1][0]-n[0][0],i=n[1][1]-n[0][1],o=Math.min(r/(e[1][0]-e[0][0]),i/(e[1][1]-e[0][1])),a=+n[0][0]+(r-o*(e[1][0]+e[0][0]))/2,u=+n[0][1]+(i-o*(e[1][1]+e[0][1]))/2;t.scale(150*o).translate([a,u])},e)}function Hs(t,n,e){return Is(t,[[0,0],n],e)}function js(t,n,e){return Ys(t,function(e){var r=+n,i=r/(e[1][0]-e[0][0]),o=(r-i*(e[1][0]+e[0][0]))/2,a=-i*e[0][1];t.scale(150*i).translate([o,a])},e)}function Vs(t,n,e){return Ys(t,function(e){var r=+n,i=r/(e[1][1]-e[0][1]),o=-i*e[0][0],a=(r-i*(e[1][1]+e[0][1]))/2;t.scale(150*i).translate([o,a])},e)}Us.prototype={_radius:4.5,_circle:Os(4.5),pointRadius:function(t){return(t=+t)!==this._radius&&(this._radius=t,this._circle=null),this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._string.push(\"Z\"),this._point=NaN},point:function(t,n){switch(this._point){case 0:this._string.push(\"M\",t,\",\",n),this._point=1;break;case 1:this._string.push(\"L\",t,\",\",n);break;default:null==this._circle&&(this._circle=Os(this._radius)),this._string.push(\"M\",t,\",\",n,this._circle)}},result:function(){if(this._string.length){var t=this._string.join(\"\");return this._string=[],t}return null}},Fs.prototype={constructor:Fs,point:function(t,n){this.stream.point(t,n)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};var Xs=16,Gs=hu(30*cu);function $s(t,n){return+n?function(t,n){function e(r,i,o,a,u,c,f,s,l,h,d,p,v,g){var y=f-r,_=s-i,b=y*y+_*_;if(b>4*n&&v--){var m=a+h,x=u+d,w=c+p,M=bu(m*m+x*x+w*w),N=wu(w/=M),T=fu(fu(w)-1)<nu||fu(o-l)<nu?(o+l)/2:lu(x,m),A=t(T,N),S=A[0],k=A[1],E=S-r,C=k-i,P=_*E-y*C;(P*P/b>n||fu((y*E+_*C)/b-.5)>.3||a*h+u*d+c*p<Gs)&&(e(r,i,o,a,u,c,S,k,T,m/=M,x/=M,w,v,g),g.point(S,k),e(S,k,T,m,x,w,f,s,l,h,d,p,v,g))}}return function(n){var r,i,o,a,u,c,f,s,l,h,d,p,v={point:g,lineStart:y,lineEnd:b,polygonStart:function(){n.polygonStart(),v.lineStart=m},polygonEnd:function(){n.polygonEnd(),v.lineStart=y}};function g(e,r){e=t(e,r),n.point(e[0],e[1])}function y(){s=NaN,v.point=_,n.lineStart()}function _(r,i){var o=ju([r,i]),a=t(r,i);e(s,l,f,h,d,p,s=a[0],l=a[1],f=r,h=o[0],d=o[1],p=o[2],Xs,n),n.point(s,l)}function b(){v.point=g,n.lineEnd()}function m(){y(),v.point=x,v.lineEnd=w}function x(t,n){_(r=t,n),i=s,o=l,a=h,u=d,c=p,v.point=_}function w(){e(s,l,f,h,d,p,i,o,r,a,u,c,Xs,n),v.lineEnd=b,b()}return v}}(t,n):function(t){return Bs({point:function(n,e){n=t(n,e),this.stream.point(n[0],n[1])}})}(t)}var Ws=Bs({point:function(t,n){this.stream.point(t*cu,n*cu)}});function Zs(t,n,e,r){var i=hu(r),o=yu(r),a=i*t,u=o*t,c=i/t,f=o/t,s=(o*e-i*n)/t,l=(o*n+i*e)/t;function h(t,r){return[a*t-u*r+n,e-u*t-a*r]}return h.invert=function(t,n){return[c*t-f*n+s,l-f*t-c*n]},h}function Qs(t){return Ks(function(){return t})()}function Ks(t){var n,e,r,i,o,a,u,c,f,s,l=150,h=480,d=250,p=0,v=0,g=0,y=0,_=0,b=0,m=null,x=df,w=null,M=Yf,N=.5;function T(t){return c(t[0]*cu,t[1]*cu)}function A(t){return(t=c.invert(t[0],t[1]))&&[t[0]*uu,t[1]*uu]}function S(){var t=Zs(l,0,0,b).apply(null,n(p,v)),r=(b?Zs:function(t,n,e){function r(r,i){return[n+t*r,e-t*i]}return r.invert=function(r,i){return[(r-n)/t,(e-i)/t]},r})(l,h-t[0],d-t[1],b);return e=$c(g,y,_),u=Xc(n,r),c=Xc(e,u),a=$s(u,N),k()}function k(){return f=s=null,T}return T.stream=function(t){return f&&s===t?f:f=Ws(function(t){return Bs({point:function(n,e){var r=t(n,e);return this.stream.point(r[0],r[1])}})}(e)(x(a(M(s=t)))))},T.preclip=function(t){return arguments.length?(x=t,m=void 0,k()):x},T.postclip=function(t){return arguments.length?(M=t,w=r=i=o=null,k()):M},T.clipAngle=function(t){return arguments.length?(x=+t?pf(m=t*cu):(m=null,df),k()):m*uu},T.clipExtent=function(t){return arguments.length?(M=null==t?(w=r=i=o=null,Yf):yf(w=+t[0][0],r=+t[0][1],i=+t[1][0],o=+t[1][1]),k()):null==w?null:[[w,r],[i,o]]},T.scale=function(t){return arguments.length?(l=+t,S()):l},T.translate=function(t){return arguments.length?(h=+t[0],d=+t[1],S()):[h,d]},T.center=function(t){return arguments.length?(p=t[0]%360*cu,v=t[1]%360*cu,S()):[p*uu,v*uu]},T.rotate=function(t){return arguments.length?(g=t[0]%360*cu,y=t[1]%360*cu,_=t.length>2?t[2]%360*cu:0,S()):[g*uu,y*uu,_*uu]},T.angle=function(t){return arguments.length?(b=t%360*cu,S()):b*uu},T.precision=function(t){return arguments.length?(a=$s(u,N=t*t),k()):bu(N)},T.fitExtent=function(t,n){return Is(T,t,n)},T.fitSize=function(t,n){return Hs(T,t,n)},T.fitWidth=function(t,n){return js(T,t,n)},T.fitHeight=function(t,n){return Vs(T,t,n)},function(){return n=t.apply(this,arguments),T.invert=n.invert&&A,S()}}function Js(t){var n=0,e=ru/3,r=Ks(t),i=r(n,e);return i.parallels=function(t){return arguments.length?r(n=t[0]*cu,e=t[1]*cu):[n*uu,e*uu]},i}function tl(t,n){var e=yu(t),r=(e+yu(n))/2;if(fu(r)<nu)return function(t){var n=hu(t);function e(t,e){return[t*n,yu(e)/n]}return e.invert=function(t,e){return[t/n,wu(e*n)]},e}(t);var i=1+e*(2*r-e),o=bu(i)/r;function a(t,n){var e=bu(i-2*r*yu(n))/r;return[e*yu(t*=r),o-e*hu(t)]}return a.invert=function(t,n){var e=o-n;return[lu(t,fu(e))/r*_u(e),wu((i-(t*t+e*e)*r*r)/(2*r))]},a}function nl(){return Js(tl).scale(155.424).center([0,33.6442])}function el(){return nl().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])}function rl(t){return function(n,e){var r=hu(n),i=hu(e),o=t(r*i);return[o*i*yu(n),o*yu(e)]}}function il(t){return function(n,e){var r=bu(n*n+e*e),i=t(r),o=yu(i),a=hu(i);return[lu(n*o,r*a),wu(r&&e*o/r)]}}var ol=rl(function(t){return bu(2/(1+t))});ol.invert=il(function(t){return 2*wu(t/2)});var al=rl(function(t){return(t=xu(t))&&t/yu(t)});function ul(t,n){return[t,vu(mu((iu+n)/2))]}function cl(t){var n,e,r,i=Qs(t),o=i.center,a=i.scale,u=i.translate,c=i.clipExtent,f=null;function s(){var o=ru*a(),u=i(Kc(i.rotate()).invert([0,0]));return c(null==f?[[u[0]-o,u[1]-o],[u[0]+o,u[1]+o]]:t===ul?[[Math.max(u[0]-o,f),n],[Math.min(u[0]+o,e),r]]:[[f,Math.max(u[1]-o,n)],[e,Math.min(u[1]+o,r)]])}return i.scale=function(t){return arguments.length?(a(t),s()):a()},i.translate=function(t){return arguments.length?(u(t),s()):u()},i.center=function(t){return arguments.length?(o(t),s()):o()},i.clipExtent=function(t){return arguments.length?(null==t?f=n=e=r=null:(f=+t[0][0],n=+t[0][1],e=+t[1][0],r=+t[1][1]),s()):null==f?null:[[f,n],[e,r]]},s()}function fl(t){return mu((iu+t)/2)}function sl(t,n){var e=hu(t),r=t===n?yu(t):vu(e/hu(n))/vu(fl(n)/fl(t)),i=e*gu(fl(t),r)/r;if(!r)return ul;function o(t,n){i>0?n<-iu+nu&&(n=-iu+nu):n>iu-nu&&(n=iu-nu);var e=i/gu(fl(n),r);return[e*yu(r*t),i-e*hu(r*t)]}return o.invert=function(t,n){var e=i-n,o=_u(r)*bu(t*t+e*e);return[lu(t,fu(e))/r*_u(e),2*su(gu(i/o,1/r))-iu]},o}function ll(t,n){return[t,n]}function hl(t,n){var e=hu(t),r=t===n?yu(t):(e-hu(n))/(n-t),i=e/r+t;if(fu(r)<nu)return ll;function o(t,n){var e=i-n,o=r*t;return[e*yu(o),i-e*hu(o)]}return o.invert=function(t,n){var e=i-n;return[lu(t,fu(e))/r*_u(e),i-_u(r)*bu(t*t+e*e)]},o}al.invert=il(function(t){return t}),ul.invert=function(t,n){return[t,2*su(pu(n))-iu]},ll.invert=ll;var dl=1.340264,pl=-.081106,vl=893e-6,gl=.003796,yl=bu(3)/2;function _l(t,n){var e=wu(yl*yu(n)),r=e*e,i=r*r*r;return[t*hu(e)/(yl*(dl+3*pl*r+i*(7*vl+9*gl*r))),e*(dl+pl*r+i*(vl+gl*r))]}function bl(t,n){var e=hu(n),r=hu(t)*e;return[e*yu(t)/r,yu(n)/r]}function ml(t,n,e,r){return 1===t&&1===n&&0===e&&0===r?Yf:Bs({point:function(i,o){this.stream.point(i*t+e,o*n+r)}})}function xl(t,n){var e=n*n,r=e*e;return[t*(.8707-.131979*e+r*(r*(.003971*e-.001529*r)-.013791)),n*(1.007226+e*(.015085+r*(.028874*e-.044475-.005916*r)))]}function wl(t,n){return[hu(n)*yu(t),yu(n)]}function Ml(t,n){var e=hu(n),r=1+hu(t)*e;return[e*yu(t)/r,yu(n)/r]}function Nl(t,n){return[vu(mu((iu+n)/2)),-t]}function Tl(t,n){return t.parent===n.parent?1:2}function Al(t,n){return t+n.x}function Sl(t,n){return Math.max(t,n.y)}function kl(t){var n=0,e=t.children,r=e&&e.length;if(r)for(;--r>=0;)n+=e[r].value;else n=1;t.value=n}function El(t,n){var e,r,i,o,a,u=new Rl(t),c=+t.value&&(u.value=t.value),f=[u];for(null==n&&(n=Cl);e=f.pop();)if(c&&(e.value=+e.data.value),(i=n(e.data))&&(a=i.length))for(e.children=new Array(a),o=a-1;o>=0;--o)f.push(r=e.children[o]=new Rl(i[o])),r.parent=e,r.depth=e.depth+1;return u.eachBefore(zl)}function Cl(t){return t.children}function Pl(t){t.data=t.data.data}function zl(t){var n=0;do{t.height=n}while((t=t.parent)&&t.height<++n)}function Rl(t){this.data=t,this.depth=this.height=0,this.parent=null}_l.invert=function(t,n){for(var e,r=n,i=r*r,o=i*i*i,a=0;a<12&&(o=(i=(r-=e=(r*(dl+pl*i+o*(vl+gl*i))-n)/(dl+3*pl*i+o*(7*vl+9*gl*i)))*r)*i*i,!(fu(e)<eu));++a);return[yl*t*(dl+3*pl*i+o*(7*vl+9*gl*i))/hu(r),wu(yu(r)/yl)]},bl.invert=il(su),xl.invert=function(t,n){var e,r=n,i=25;do{var o=r*r,a=o*o;r-=e=(r*(1.007226+o*(.015085+a*(.028874*o-.044475-.005916*a)))-n)/(1.007226+o*(.045255+a*(.259866*o-.311325-.005916*11*a)))}while(fu(e)>nu&&--i>0);return[t/(.8707+(o=r*r)*(o*(o*o*o*(.003971-.001529*o)-.013791)-.131979)),r]},wl.invert=il(wu),Ml.invert=il(function(t){return 2*su(t)}),Nl.invert=function(t,n){return[-n,2*su(pu(t))-iu]},Rl.prototype=El.prototype={constructor:Rl,count:function(){return this.eachAfter(kl)},each:function(t){var n,e,r,i,o=this,a=[o];do{for(n=a.reverse(),a=[];o=n.pop();)if(t(o),e=o.children)for(r=0,i=e.length;r<i;++r)a.push(e[r])}while(a.length);return this},eachAfter:function(t){for(var n,e,r,i=this,o=[i],a=[];i=o.pop();)if(a.push(i),n=i.children)for(e=0,r=n.length;e<r;++e)o.push(n[e]);for(;i=a.pop();)t(i);return this},eachBefore:function(t){for(var n,e,r=this,i=[r];r=i.pop();)if(t(r),n=r.children)for(e=n.length-1;e>=0;--e)i.push(n[e]);return this},sum:function(t){return this.eachAfter(function(n){for(var e=+t(n.data)||0,r=n.children,i=r&&r.length;--i>=0;)e+=r[i].value;n.value=e})},sort:function(t){return this.eachBefore(function(n){n.children&&n.children.sort(t)})},path:function(t){for(var n=this,e=function(t,n){if(t===n)return t;var e=t.ancestors(),r=n.ancestors(),i=null;for(t=e.pop(),n=r.pop();t===n;)i=t,t=e.pop(),n=r.pop();return i}(n,t),r=[n];n!==e;)n=n.parent,r.push(n);for(var i=r.length;t!==e;)r.splice(i,0,t),t=t.parent;return r},ancestors:function(){for(var t=this,n=[t];t=t.parent;)n.push(t);return n},descendants:function(){var t=[];return this.each(function(n){t.push(n)}),t},leaves:function(){var t=[];return this.eachBefore(function(n){n.children||t.push(n)}),t},links:function(){var t=this,n=[];return t.each(function(e){e!==t&&n.push({source:e.parent,target:e})}),n},copy:function(){return El(this).eachBefore(Pl)}};var Dl=Array.prototype.slice;function ql(t){for(var n,e,r=0,i=(t=function(t){for(var n,e,r=t.length;r;)e=Math.random()*r--|0,n=t[r],t[r]=t[e],t[e]=n;return t}(Dl.call(t))).length,o=[];r<i;)n=t[r],e&&Ol(e,n)?++r:(e=Fl(o=Ll(o,n)),r=0);return e}function Ll(t,n){var e,r;if(Bl(n,t))return[n];for(e=0;e<t.length;++e)if(Ul(n,t[e])&&Bl(Yl(t[e],n),t))return[t[e],n];for(e=0;e<t.length-1;++e)for(r=e+1;r<t.length;++r)if(Ul(Yl(t[e],t[r]),n)&&Ul(Yl(t[e],n),t[r])&&Ul(Yl(t[r],n),t[e])&&Bl(Il(t[e],t[r],n),t))return[t[e],t[r],n];throw new Error}function Ul(t,n){var e=t.r-n.r,r=n.x-t.x,i=n.y-t.y;return e<0||e*e<r*r+i*i}function Ol(t,n){var e=t.r-n.r+1e-6,r=n.x-t.x,i=n.y-t.y;return e>0&&e*e>r*r+i*i}function Bl(t,n){for(var e=0;e<n.length;++e)if(!Ol(t,n[e]))return!1;return!0}function Fl(t){switch(t.length){case 1:return function(t){return{x:t.x,y:t.y,r:t.r}}(t[0]);case 2:return Yl(t[0],t[1]);case 3:return Il(t[0],t[1],t[2])}}function Yl(t,n){var e=t.x,r=t.y,i=t.r,o=n.x,a=n.y,u=n.r,c=o-e,f=a-r,s=u-i,l=Math.sqrt(c*c+f*f);return{x:(e+o+c/l*s)/2,y:(r+a+f/l*s)/2,r:(l+i+u)/2}}function Il(t,n,e){var r=t.x,i=t.y,o=t.r,a=n.x,u=n.y,c=n.r,f=e.x,s=e.y,l=e.r,h=r-a,d=r-f,p=i-u,v=i-s,g=c-o,y=l-o,_=r*r+i*i-o*o,b=_-a*a-u*u+c*c,m=_-f*f-s*s+l*l,x=d*p-h*v,w=(p*m-v*b)/(2*x)-r,M=(v*g-p*y)/x,N=(d*b-h*m)/(2*x)-i,T=(h*y-d*g)/x,A=M*M+T*T-1,S=2*(o+w*M+N*T),k=w*w+N*N-o*o,E=-(A?(S+Math.sqrt(S*S-4*A*k))/(2*A):k/S);return{x:r+w+M*E,y:i+N+T*E,r:E}}function Hl(t,n,e){var r,i,o,a,u=t.x-n.x,c=t.y-n.y,f=u*u+c*c;f?(i=n.r+e.r,i*=i,a=t.r+e.r,i>(a*=a)?(r=(f+a-i)/(2*f),o=Math.sqrt(Math.max(0,a/f-r*r)),e.x=t.x-r*u-o*c,e.y=t.y-r*c+o*u):(r=(f+i-a)/(2*f),o=Math.sqrt(Math.max(0,i/f-r*r)),e.x=n.x+r*u-o*c,e.y=n.y+r*c+o*u)):(e.x=n.x+e.r,e.y=n.y)}function jl(t,n){var e=t.r+n.r-1e-6,r=n.x-t.x,i=n.y-t.y;return e>0&&e*e>r*r+i*i}function Vl(t){var n=t._,e=t.next._,r=n.r+e.r,i=(n.x*e.r+e.x*n.r)/r,o=(n.y*e.r+e.y*n.r)/r;return i*i+o*o}function Xl(t){this._=t,this.next=null,this.previous=null}function Gl(t){if(!(i=t.length))return 0;var n,e,r,i,o,a,u,c,f,s,l;if((n=t[0]).x=0,n.y=0,!(i>1))return n.r;if(e=t[1],n.x=-e.r,e.x=n.r,e.y=0,!(i>2))return n.r+e.r;Hl(e,n,r=t[2]),n=new Xl(n),e=new Xl(e),r=new Xl(r),n.next=r.previous=e,e.next=n.previous=r,r.next=e.previous=n;t:for(u=3;u<i;++u){Hl(n._,e._,r=t[u]),r=new Xl(r),c=e.next,f=n.previous,s=e._.r,l=n._.r;do{if(s<=l){if(jl(c._,r._)){e=c,n.next=e,e.previous=n,--u;continue t}s+=c._.r,c=c.next}else{if(jl(f._,r._)){(n=f).next=e,e.previous=n,--u;continue t}l+=f._.r,f=f.previous}}while(c!==f.next);for(r.previous=n,r.next=e,n.next=e.previous=e=r,o=Vl(n);(r=r.next)!==e;)(a=Vl(r))<o&&(n=r,o=a);e=n.next}for(n=[e._],r=e;(r=r.next)!==e;)n.push(r._);for(r=ql(n),u=0;u<i;++u)(n=t[u]).x-=r.x,n.y-=r.y;return r.r}function $l(t){return null==t?null:Wl(t)}function Wl(t){if(\"function\"!=typeof t)throw new Error;return t}function Zl(){return 0}function Ql(t){return function(){return t}}function Kl(t){return Math.sqrt(t.value)}function Jl(t){return function(n){n.children||(n.r=Math.max(0,+t(n)||0))}}function th(t,n){return function(e){if(r=e.children){var r,i,o,a=r.length,u=t(e)*n||0;if(u)for(i=0;i<a;++i)r[i].r+=u;if(o=Gl(r),u)for(i=0;i<a;++i)r[i].r-=u;e.r=o+u}}}function nh(t){return function(n){var e=n.parent;n.r*=t,e&&(n.x=e.x+t*n.x,n.y=e.y+t*n.y)}}function eh(t){t.x0=Math.round(t.x0),t.y0=Math.round(t.y0),t.x1=Math.round(t.x1),t.y1=Math.round(t.y1)}function rh(t,n,e,r,i){for(var o,a=t.children,u=-1,c=a.length,f=t.value&&(r-n)/t.value;++u<c;)(o=a[u]).y0=e,o.y1=i,o.x0=n,o.x1=n+=o.value*f}var ih=\"$\",oh={depth:-1},ah={};function uh(t){return t.id}function ch(t){return t.parentId}function fh(t,n){return t.parent===n.parent?1:2}function sh(t){var n=t.children;return n?n[0]:t.t}function lh(t){var n=t.children;return n?n[n.length-1]:t.t}function hh(t,n,e){var r=e/(n.i-t.i);n.c-=r,n.s+=e,t.c+=r,n.z+=e,n.m+=e}function dh(t,n,e){return t.a.parent===n.parent?t.a:e}function ph(t,n){this._=t,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=n}function vh(t,n,e,r,i){for(var o,a=t.children,u=-1,c=a.length,f=t.value&&(i-e)/t.value;++u<c;)(o=a[u]).x0=n,o.x1=r,o.y0=e,o.y1=e+=o.value*f}ph.prototype=Object.create(Rl.prototype);var gh=(1+Math.sqrt(5))/2;function yh(t,n,e,r,i,o){for(var a,u,c,f,s,l,h,d,p,v,g,y=[],_=n.children,b=0,m=0,x=_.length,w=n.value;b<x;){c=i-e,f=o-r;do{s=_[m++].value}while(!s&&m<x);for(l=h=s,g=s*s*(v=Math.max(f/c,c/f)/(w*t)),p=Math.max(h/g,g/l);m<x;++m){if(s+=u=_[m].value,u<l&&(l=u),u>h&&(h=u),g=s*s*v,(d=Math.max(h/g,g/l))>p){s-=u;break}p=d}y.push(a={value:s,dice:c<f,children:_.slice(b,m)}),a.dice?rh(a,e,r,i,w?r+=f*s/w:o):vh(a,e,r,w?e+=c*s/w:i,o),w-=s,b=m}return y}var _h=function t(n){function e(t,e,r,i,o){yh(n,t,e,r,i,o)}return e.ratio=function(n){return t((n=+n)>1?n:1)},e}(gh);var bh=function t(n){function e(t,e,r,i,o){if((a=t._squarify)&&a.ratio===n)for(var a,u,c,f,s,l=-1,h=a.length,d=t.value;++l<h;){for(c=(u=a[l]).children,f=u.value=0,s=c.length;f<s;++f)u.value+=c[f].value;u.dice?rh(u,e,r,i,r+=(o-r)*u.value/d):vh(u,e,r,e+=(i-e)*u.value/d,o),d-=u.value}else t._squarify=a=yh(n,t,e,r,i,o),a.ratio=n}return e.ratio=function(n){return t((n=+n)>1?n:1)},e}(gh);function mh(t,n,e){return(n[0]-t[0])*(e[1]-t[1])-(n[1]-t[1])*(e[0]-t[0])}function xh(t,n){return t[0]-n[0]||t[1]-n[1]}function wh(t){for(var n=t.length,e=[0,1],r=2,i=2;i<n;++i){for(;r>1&&mh(t[e[r-2]],t[e[r-1]],t[i])<=0;)--r;e[r++]=i}return e.slice(0,r)}function Mh(){return Math.random()}var Nh=function t(n){function e(t,e){return t=null==t?0:+t,e=null==e?1:+e,1===arguments.length?(e=t,t=0):e-=t,function(){return n()*e+t}}return e.source=t,e}(Mh),Th=function t(n){function e(t,e){var r,i;return t=null==t?0:+t,e=null==e?1:+e,function(){var o;if(null!=r)o=r,r=null;else do{r=2*n()-1,o=2*n()-1,i=r*r+o*o}while(!i||i>1);return t+e*o*Math.sqrt(-2*Math.log(i)/i)}}return e.source=t,e}(Mh),Ah=function t(n){function e(){var t=Th.source(n).apply(this,arguments);return function(){return Math.exp(t())}}return e.source=t,e}(Mh),Sh=function t(n){function e(t){return function(){for(var e=0,r=0;r<t;++r)e+=n();return e}}return e.source=t,e}(Mh),kh=function t(n){function e(t){var e=Sh.source(n)(t);return function(){return e()/t}}return e.source=t,e}(Mh),Eh=function t(n){function e(t){return function(){return-Math.log(1-n())/t}}return e.source=t,e}(Mh);function Ch(t,n){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(n).domain(t)}return this}function Ph(t,n){switch(arguments.length){case 0:break;case 1:this.interpolator(t);break;default:this.interpolator(n).domain(t)}return this}var zh=Array.prototype,Rh=zh.map,Dh=zh.slice,qh={name:\"implicit\"};function Lh(){var t=co(),n=[],e=[],r=qh;function i(i){var o=i+\"\",a=t.get(o);if(!a){if(r!==qh)return r;t.set(o,a=n.push(i))}return e[(a-1)%e.length]}return i.domain=function(e){if(!arguments.length)return n.slice();n=[],t=co();for(var r,o,a=-1,u=e.length;++a<u;)t.has(o=(r=e[a])+\"\")||t.set(o,n.push(r));return i},i.range=function(t){return arguments.length?(e=Dh.call(t),i):e.slice()},i.unknown=function(t){return arguments.length?(r=t,i):r},i.copy=function(){return Lh(n,e).unknown(r)},Ch.apply(i,arguments),i}function Uh(){var t,n,e=Lh().unknown(void 0),r=e.domain,i=e.range,o=[0,1],a=!1,u=0,c=0,f=.5;function s(){var e=r().length,s=o[1]<o[0],l=o[s-0],h=o[1-s];t=(h-l)/Math.max(1,e-u+2*c),a&&(t=Math.floor(t)),l+=(h-l-t*(e-u))*f,n=t*(1-u),a&&(l=Math.round(l),n=Math.round(n));var d=g(e).map(function(n){return l+t*n});return i(s?d.reverse():d)}return delete e.unknown,e.domain=function(t){return arguments.length?(r(t),s()):r()},e.range=function(t){return arguments.length?(o=[+t[0],+t[1]],s()):o.slice()},e.rangeRound=function(t){return o=[+t[0],+t[1]],a=!0,s()},e.bandwidth=function(){return n},e.step=function(){return t},e.round=function(t){return arguments.length?(a=!!t,s()):a},e.padding=function(t){return arguments.length?(u=Math.min(1,c=+t),s()):u},e.paddingInner=function(t){return arguments.length?(u=Math.min(1,t),s()):u},e.paddingOuter=function(t){return arguments.length?(c=+t,s()):c},e.align=function(t){return arguments.length?(f=Math.max(0,Math.min(1,t)),s()):f},e.copy=function(){return Uh(r(),o).round(a).paddingInner(u).paddingOuter(c).align(f)},Ch.apply(s(),arguments)}function Oh(t){return+t}var Bh=[0,1];function Fh(t){return t}function Yh(t,n){return(n-=t=+t)?function(e){return(e-t)/n}:function(t){return function(){return t}}(isNaN(n)?NaN:.5)}function Ih(t){var n,e=t[0],r=t[t.length-1];return e>r&&(n=e,e=r,r=n),function(t){return Math.max(e,Math.min(r,t))}}function Hh(t,n,e){var r=t[0],i=t[1],o=n[0],a=n[1];return i<r?(r=Yh(i,r),o=e(a,o)):(r=Yh(r,i),o=e(o,a)),function(t){return o(r(t))}}function jh(t,n,e){var r=Math.min(t.length,n.length)-1,o=new Array(r),a=new Array(r),u=-1;for(t[r]<t[0]&&(t=t.slice().reverse(),n=n.slice().reverse());++u<r;)o[u]=Yh(t[u],t[u+1]),a[u]=e(n[u],n[u+1]);return function(n){var e=i(t,n,1,r)-1;return a[e](o[e](n))}}function Vh(t,n){return n.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function Xh(){var t,n,e,r,i,o,a=Bh,u=Bh,c=Te,f=Fh;function s(){return r=Math.min(a.length,u.length)>2?jh:Hh,i=o=null,l}function l(n){return isNaN(n=+n)?e:(i||(i=r(a.map(t),u,c)))(t(f(n)))}return l.invert=function(e){return f(n((o||(o=r(u,a.map(t),me)))(e)))},l.domain=function(t){return arguments.length?(a=Rh.call(t,Oh),f===Fh||(f=Ih(a)),s()):a.slice()},l.range=function(t){return arguments.length?(u=Dh.call(t),s()):u.slice()},l.rangeRound=function(t){return u=Dh.call(t),c=Ae,s()},l.clamp=function(t){return arguments.length?(f=t?Ih(a):Fh,l):f!==Fh},l.interpolate=function(t){return arguments.length?(c=t,s()):c},l.unknown=function(t){return arguments.length?(e=t,l):e},function(e,r){return t=e,n=r,s()}}function Gh(t,n){return Xh()(t,n)}function $h(n,e,r,i){var o,a=w(n,e,r);switch((i=Oa(null==i?\",f\":i)).type){case\"s\":var u=Math.max(Math.abs(n),Math.abs(e));return null!=i.precision||isNaN(o=Wa(a,u))||(i.precision=o),t.formatPrefix(i,u);case\"\":case\"e\":case\"g\":case\"p\":case\"r\":null!=i.precision||isNaN(o=Za(a,Math.max(Math.abs(n),Math.abs(e))))||(i.precision=o-(\"e\"===i.type));break;case\"f\":case\"%\":null!=i.precision||isNaN(o=$a(a))||(i.precision=o-2*(\"%\"===i.type))}return t.format(i)}function Wh(t){var n=t.domain;return t.ticks=function(t){var e=n();return m(e[0],e[e.length-1],null==t?10:t)},t.tickFormat=function(t,e){var r=n();return $h(r[0],r[r.length-1],null==t?10:t,e)},t.nice=function(e){null==e&&(e=10);var r,i=n(),o=0,a=i.length-1,u=i[o],c=i[a];return c<u&&(r=u,u=c,c=r,r=o,o=a,a=r),(r=x(u,c,e))>0?r=x(u=Math.floor(u/r)*r,c=Math.ceil(c/r)*r,e):r<0&&(r=x(u=Math.ceil(u*r)/r,c=Math.floor(c*r)/r,e)),r>0?(i[o]=Math.floor(u/r)*r,i[a]=Math.ceil(c/r)*r,n(i)):r<0&&(i[o]=Math.ceil(u*r)/r,i[a]=Math.floor(c*r)/r,n(i)),t},t}function Zh(t,n){var e,r=0,i=(t=t.slice()).length-1,o=t[r],a=t[i];return a<o&&(e=r,r=i,i=e,e=o,o=a,a=e),t[r]=n.floor(o),t[i]=n.ceil(a),t}function Qh(t){return Math.log(t)}function Kh(t){return Math.exp(t)}function Jh(t){return-Math.log(-t)}function td(t){return-Math.exp(-t)}function nd(t){return isFinite(t)?+(\"1e\"+t):t<0?0:t}function ed(t){return function(n){return-t(-n)}}function rd(n){var e,r,i=n(Qh,Kh),o=i.domain,a=10;function u(){return e=function(t){return t===Math.E?Math.log:10===t&&Math.log10||2===t&&Math.log2||(t=Math.log(t),function(n){return Math.log(n)/t})}(a),r=function(t){return 10===t?nd:t===Math.E?Math.exp:function(n){return Math.pow(t,n)}}(a),o()[0]<0?(e=ed(e),r=ed(r),n(Jh,td)):n(Qh,Kh),i}return i.base=function(t){return arguments.length?(a=+t,u()):a},i.domain=function(t){return arguments.length?(o(t),u()):o()},i.ticks=function(t){var n,i=o(),u=i[0],c=i[i.length-1];(n=c<u)&&(h=u,u=c,c=h);var f,s,l,h=e(u),d=e(c),p=null==t?10:+t,v=[];if(!(a%1)&&d-h<p){if(h=Math.round(h)-1,d=Math.round(d)+1,u>0){for(;h<d;++h)for(s=1,f=r(h);s<a;++s)if(!((l=f*s)<u)){if(l>c)break;v.push(l)}}else for(;h<d;++h)for(s=a-1,f=r(h);s>=1;--s)if(!((l=f*s)<u)){if(l>c)break;v.push(l)}}else v=m(h,d,Math.min(d-h,p)).map(r);return n?v.reverse():v},i.tickFormat=function(n,o){if(null==o&&(o=10===a?\".0e\":\",\"),\"function\"!=typeof o&&(o=t.format(o)),n===1/0)return o;null==n&&(n=10);var u=Math.max(1,a*n/i.ticks().length);return function(t){var n=t/r(Math.round(e(t)));return n*a<a-.5&&(n*=a),n<=u?o(t):\"\"}},i.nice=function(){return o(Zh(o(),{floor:function(t){return r(Math.floor(e(t)))},ceil:function(t){return r(Math.ceil(e(t)))}}))},i}function id(t){return function(n){return Math.sign(n)*Math.log1p(Math.abs(n/t))}}function od(t){return function(n){return Math.sign(n)*Math.expm1(Math.abs(n))*t}}function ad(t){var n=1,e=t(id(n),od(n));return e.constant=function(e){return arguments.length?t(id(n=+e),od(n)):n},Wh(e)}function ud(t){return function(n){return n<0?-Math.pow(-n,t):Math.pow(n,t)}}function cd(t){return t<0?-Math.sqrt(-t):Math.sqrt(t)}function fd(t){return t<0?-t*t:t*t}function sd(t){var n=t(Fh,Fh),e=1;function r(){return 1===e?t(Fh,Fh):.5===e?t(cd,fd):t(ud(e),ud(1/e))}return n.exponent=function(t){return arguments.length?(e=+t,r()):e},Wh(n)}function ld(){var t=sd(Xh());return t.copy=function(){return Vh(t,ld()).exponent(t.exponent())},Ch.apply(t,arguments),t}var hd=new Date,dd=new Date;function pd(t,n,e,r){function i(n){return t(n=0===arguments.length?new Date:new Date(+n)),n}return i.floor=function(n){return t(n=new Date(+n)),n},i.ceil=function(e){return t(e=new Date(e-1)),n(e,1),t(e),e},i.round=function(t){var n=i(t),e=i.ceil(t);return t-n<e-t?n:e},i.offset=function(t,e){return n(t=new Date(+t),null==e?1:Math.floor(e)),t},i.range=function(e,r,o){var a,u=[];if(e=i.ceil(e),o=null==o?1:Math.floor(o),!(e<r&&o>0))return u;do{u.push(a=new Date(+e)),n(e,o),t(e)}while(a<e&&e<r);return u},i.filter=function(e){return pd(function(n){if(n>=n)for(;t(n),!e(n);)n.setTime(n-1)},function(t,r){if(t>=t)if(r<0)for(;++r<=0;)for(;n(t,-1),!e(t););else for(;--r>=0;)for(;n(t,1),!e(t););})},e&&(i.count=function(n,r){return hd.setTime(+n),dd.setTime(+r),t(hd),t(dd),Math.floor(e(hd,dd))},i.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?i.filter(r?function(n){return r(n)%t==0}:function(n){return i.count(0,n)%t==0}):i:null}),i}var vd=pd(function(){},function(t,n){t.setTime(+t+n)},function(t,n){return n-t});vd.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?pd(function(n){n.setTime(Math.floor(n/t)*t)},function(n,e){n.setTime(+n+e*t)},function(n,e){return(e-n)/t}):vd:null};var gd=vd.range,yd=6e4,_d=6048e5,bd=pd(function(t){t.setTime(t-t.getMilliseconds())},function(t,n){t.setTime(+t+1e3*n)},function(t,n){return(n-t)/1e3},function(t){return t.getUTCSeconds()}),md=bd.range,xd=pd(function(t){t.setTime(t-t.getMilliseconds()-1e3*t.getSeconds())},function(t,n){t.setTime(+t+n*yd)},function(t,n){return(n-t)/yd},function(t){return t.getMinutes()}),wd=xd.range,Md=pd(function(t){t.setTime(t-t.getMilliseconds()-1e3*t.getSeconds()-t.getMinutes()*yd)},function(t,n){t.setTime(+t+36e5*n)},function(t,n){return(n-t)/36e5},function(t){return t.getHours()}),Nd=Md.range,Td=pd(function(t){t.setHours(0,0,0,0)},function(t,n){t.setDate(t.getDate()+n)},function(t,n){return(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*yd)/864e5},function(t){return t.getDate()-1}),Ad=Td.range;function Sd(t){return pd(function(n){n.setDate(n.getDate()-(n.getDay()+7-t)%7),n.setHours(0,0,0,0)},function(t,n){t.setDate(t.getDate()+7*n)},function(t,n){return(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*yd)/_d})}var kd=Sd(0),Ed=Sd(1),Cd=Sd(2),Pd=Sd(3),zd=Sd(4),Rd=Sd(5),Dd=Sd(6),qd=kd.range,Ld=Ed.range,Ud=Cd.range,Od=Pd.range,Bd=zd.range,Fd=Rd.range,Yd=Dd.range,Id=pd(function(t){t.setDate(1),t.setHours(0,0,0,0)},function(t,n){t.setMonth(t.getMonth()+n)},function(t,n){return n.getMonth()-t.getMonth()+12*(n.getFullYear()-t.getFullYear())},function(t){return t.getMonth()}),Hd=Id.range,jd=pd(function(t){t.setMonth(0,1),t.setHours(0,0,0,0)},function(t,n){t.setFullYear(t.getFullYear()+n)},function(t,n){return n.getFullYear()-t.getFullYear()},function(t){return t.getFullYear()});jd.every=function(t){return isFinite(t=Math.floor(t))&&t>0?pd(function(n){n.setFullYear(Math.floor(n.getFullYear()/t)*t),n.setMonth(0,1),n.setHours(0,0,0,0)},function(n,e){n.setFullYear(n.getFullYear()+e*t)}):null};var Vd=jd.range,Xd=pd(function(t){t.setUTCSeconds(0,0)},function(t,n){t.setTime(+t+n*yd)},function(t,n){return(n-t)/yd},function(t){return t.getUTCMinutes()}),Gd=Xd.range,$d=pd(function(t){t.setUTCMinutes(0,0,0)},function(t,n){t.setTime(+t+36e5*n)},function(t,n){return(n-t)/36e5},function(t){return t.getUTCHours()}),Wd=$d.range,Zd=pd(function(t){t.setUTCHours(0,0,0,0)},function(t,n){t.setUTCDate(t.getUTCDate()+n)},function(t,n){return(n-t)/864e5},function(t){return t.getUTCDate()-1}),Qd=Zd.range;function Kd(t){return pd(function(n){n.setUTCDate(n.getUTCDate()-(n.getUTCDay()+7-t)%7),n.setUTCHours(0,0,0,0)},function(t,n){t.setUTCDate(t.getUTCDate()+7*n)},function(t,n){return(n-t)/_d})}var Jd=Kd(0),tp=Kd(1),np=Kd(2),ep=Kd(3),rp=Kd(4),ip=Kd(5),op=Kd(6),ap=Jd.range,up=tp.range,cp=np.range,fp=ep.range,sp=rp.range,lp=ip.range,hp=op.range,dp=pd(function(t){t.setUTCDate(1),t.setUTCHours(0,0,0,0)},function(t,n){t.setUTCMonth(t.getUTCMonth()+n)},function(t,n){return n.getUTCMonth()-t.getUTCMonth()+12*(n.getUTCFullYear()-t.getUTCFullYear())},function(t){return t.getUTCMonth()}),pp=dp.range,vp=pd(function(t){t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},function(t,n){t.setUTCFullYear(t.getUTCFullYear()+n)},function(t,n){return n.getUTCFullYear()-t.getUTCFullYear()},function(t){return t.getUTCFullYear()});vp.every=function(t){return isFinite(t=Math.floor(t))&&t>0?pd(function(n){n.setUTCFullYear(Math.floor(n.getUTCFullYear()/t)*t),n.setUTCMonth(0,1),n.setUTCHours(0,0,0,0)},function(n,e){n.setUTCFullYear(n.getUTCFullYear()+e*t)}):null};var gp=vp.range;function yp(t){if(0<=t.y&&t.y<100){var n=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return n.setFullYear(t.y),n}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function _p(t){if(0<=t.y&&t.y<100){var n=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return n.setUTCFullYear(t.y),n}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function bp(t,n,e){return{y:t,m:n,d:e,H:0,M:0,S:0,L:0}}function mp(t){var n=t.dateTime,e=t.date,r=t.time,i=t.periods,o=t.days,a=t.shortDays,u=t.months,c=t.shortMonths,f=kp(i),s=Ep(i),l=kp(o),h=Ep(o),d=kp(a),p=Ep(a),v=kp(u),g=Ep(u),y=kp(c),_=Ep(c),b={a:function(t){return a[t.getDay()]},A:function(t){return o[t.getDay()]},b:function(t){return c[t.getMonth()]},B:function(t){return u[t.getMonth()]},c:null,d:Zp,e:Zp,f:nv,H:Qp,I:Kp,j:Jp,L:tv,m:ev,M:rv,p:function(t){return i[+(t.getHours()>=12)]},q:function(t){return 1+~~(t.getMonth()/3)},Q:Pv,s:zv,S:iv,u:ov,U:av,V:uv,w:cv,W:fv,x:null,X:null,y:sv,Y:lv,Z:hv,\"%\":Cv},m={a:function(t){return a[t.getUTCDay()]},A:function(t){return o[t.getUTCDay()]},b:function(t){return c[t.getUTCMonth()]},B:function(t){return u[t.getUTCMonth()]},c:null,d:dv,e:dv,f:_v,H:pv,I:vv,j:gv,L:yv,m:bv,M:mv,p:function(t){return i[+(t.getUTCHours()>=12)]},q:function(t){return 1+~~(t.getUTCMonth()/3)},Q:Pv,s:zv,S:xv,u:wv,U:Mv,V:Nv,w:Tv,W:Av,x:null,X:null,y:Sv,Y:kv,Z:Ev,\"%\":Cv},x={a:function(t,n,e){var r=d.exec(n.slice(e));return r?(t.w=p[r[0].toLowerCase()],e+r[0].length):-1},A:function(t,n,e){var r=l.exec(n.slice(e));return r?(t.w=h[r[0].toLowerCase()],e+r[0].length):-1},b:function(t,n,e){var r=y.exec(n.slice(e));return r?(t.m=_[r[0].toLowerCase()],e+r[0].length):-1},B:function(t,n,e){var r=v.exec(n.slice(e));return r?(t.m=g[r[0].toLowerCase()],e+r[0].length):-1},c:function(t,e,r){return N(t,n,e,r)},d:Fp,e:Fp,f:Xp,H:Ip,I:Ip,j:Yp,L:Vp,m:Bp,M:Hp,p:function(t,n,e){var r=f.exec(n.slice(e));return r?(t.p=s[r[0].toLowerCase()],e+r[0].length):-1},q:Op,Q:$p,s:Wp,S:jp,u:Pp,U:zp,V:Rp,w:Cp,W:Dp,x:function(t,n,r){return N(t,e,n,r)},X:function(t,n,e){return N(t,r,n,e)},y:Lp,Y:qp,Z:Up,\"%\":Gp};function w(t,n){return function(e){var r,i,o,a=[],u=-1,c=0,f=t.length;for(e instanceof Date||(e=new Date(+e));++u<f;)37===t.charCodeAt(u)&&(a.push(t.slice(c,u)),null!=(i=wp[r=t.charAt(++u)])?r=t.charAt(++u):i=\"e\"===r?\" \":\"0\",(o=n[r])&&(r=o(e,i)),a.push(r),c=u+1);return a.push(t.slice(c,u)),a.join(\"\")}}function M(t,n){return function(e){var r,i,o=bp(1900,void 0,1);if(N(o,t,e+=\"\",0)!=e.length)return null;if(\"Q\"in o)return new Date(o.Q);if(\"s\"in o)return new Date(1e3*o.s+(\"L\"in o?o.L:0));if(!n||\"Z\"in o||(o.Z=0),\"p\"in o&&(o.H=o.H%12+12*o.p),void 0===o.m&&(o.m=\"q\"in o?o.q:0),\"V\"in o){if(o.V<1||o.V>53)return null;\"w\"in o||(o.w=1),\"Z\"in o?(i=(r=_p(bp(o.y,0,1))).getUTCDay(),r=i>4||0===i?tp.ceil(r):tp(r),r=Zd.offset(r,7*(o.V-1)),o.y=r.getUTCFullYear(),o.m=r.getUTCMonth(),o.d=r.getUTCDate()+(o.w+6)%7):(i=(r=yp(bp(o.y,0,1))).getDay(),r=i>4||0===i?Ed.ceil(r):Ed(r),r=Td.offset(r,7*(o.V-1)),o.y=r.getFullYear(),o.m=r.getMonth(),o.d=r.getDate()+(o.w+6)%7)}else(\"W\"in o||\"U\"in o)&&(\"w\"in o||(o.w=\"u\"in o?o.u%7:\"W\"in o?1:0),i=\"Z\"in o?_p(bp(o.y,0,1)).getUTCDay():yp(bp(o.y,0,1)).getDay(),o.m=0,o.d=\"W\"in o?(o.w+6)%7+7*o.W-(i+5)%7:o.w+7*o.U-(i+6)%7);return\"Z\"in o?(o.H+=o.Z/100|0,o.M+=o.Z%100,_p(o)):yp(o)}}function N(t,n,e,r){for(var i,o,a=0,u=n.length,c=e.length;a<u;){if(r>=c)return-1;if(37===(i=n.charCodeAt(a++))){if(i=n.charAt(a++),!(o=x[i in wp?n.charAt(a++):i])||(r=o(t,e,r))<0)return-1}else if(i!=e.charCodeAt(r++))return-1}return r}return b.x=w(e,b),b.X=w(r,b),b.c=w(n,b),m.x=w(e,m),m.X=w(r,m),m.c=w(n,m),{format:function(t){var n=w(t+=\"\",b);return n.toString=function(){return t},n},parse:function(t){var n=M(t+=\"\",!1);return n.toString=function(){return t},n},utcFormat:function(t){var n=w(t+=\"\",m);return n.toString=function(){return t},n},utcParse:function(t){var n=M(t+=\"\",!0);return n.toString=function(){return t},n}}}var xp,wp={\"-\":\"\",_:\" \",0:\"0\"},Mp=/^\\s*\\d+/,Np=/^%/,Tp=/[\\\\^$*+?|[\\]().{}]/g;function Ap(t,n,e){var r=t<0?\"-\":\"\",i=(r?-t:t)+\"\",o=i.length;return r+(o<e?new Array(e-o+1).join(n)+i:i)}function Sp(t){return t.replace(Tp,\"\\\\$&\")}function kp(t){return new RegExp(\"^(?:\"+t.map(Sp).join(\"|\")+\")\",\"i\")}function Ep(t){for(var n={},e=-1,r=t.length;++e<r;)n[t[e].toLowerCase()]=e;return n}function Cp(t,n,e){var r=Mp.exec(n.slice(e,e+1));return r?(t.w=+r[0],e+r[0].length):-1}function Pp(t,n,e){var r=Mp.exec(n.slice(e,e+1));return r?(t.u=+r[0],e+r[0].length):-1}function zp(t,n,e){var r=Mp.exec(n.slice(e,e+2));return r?(t.U=+r[0],e+r[0].length):-1}function Rp(t,n,e){var r=Mp.exec(n.slice(e,e+2));return r?(t.V=+r[0],e+r[0].length):-1}function Dp(t,n,e){var r=Mp.exec(n.slice(e,e+2));return r?(t.W=+r[0],e+r[0].length):-1}function qp(t,n,e){var r=Mp.exec(n.slice(e,e+4));return r?(t.y=+r[0],e+r[0].length):-1}function Lp(t,n,e){var r=Mp.exec(n.slice(e,e+2));return r?(t.y=+r[0]+(+r[0]>68?1900:2e3),e+r[0].length):-1}function Up(t,n,e){var r=/^(Z)|([+-]\\d\\d)(?::?(\\d\\d))?/.exec(n.slice(e,e+6));return r?(t.Z=r[1]?0:-(r[2]+(r[3]||\"00\")),e+r[0].length):-1}function Op(t,n,e){var r=Mp.exec(n.slice(e,e+1));return r?(t.q=3*r[0]-3,e+r[0].length):-1}function Bp(t,n,e){var r=Mp.exec(n.slice(e,e+2));return r?(t.m=r[0]-1,e+r[0].length):-1}function Fp(t,n,e){var r=Mp.exec(n.slice(e,e+2));return r?(t.d=+r[0],e+r[0].length):-1}function Yp(t,n,e){var r=Mp.exec(n.slice(e,e+3));return r?(t.m=0,t.d=+r[0],e+r[0].length):-1}function Ip(t,n,e){var r=Mp.exec(n.slice(e,e+2));return r?(t.H=+r[0],e+r[0].length):-1}function Hp(t,n,e){var r=Mp.exec(n.slice(e,e+2));return r?(t.M=+r[0],e+r[0].length):-1}function jp(t,n,e){var r=Mp.exec(n.slice(e,e+2));return r?(t.S=+r[0],e+r[0].length):-1}function Vp(t,n,e){var r=Mp.exec(n.slice(e,e+3));return r?(t.L=+r[0],e+r[0].length):-1}function Xp(t,n,e){var r=Mp.exec(n.slice(e,e+6));return r?(t.L=Math.floor(r[0]/1e3),e+r[0].length):-1}function Gp(t,n,e){var r=Np.exec(n.slice(e,e+1));return r?e+r[0].length:-1}function $p(t,n,e){var r=Mp.exec(n.slice(e));return r?(t.Q=+r[0],e+r[0].length):-1}function Wp(t,n,e){var r=Mp.exec(n.slice(e));return r?(t.s=+r[0],e+r[0].length):-1}function Zp(t,n){return Ap(t.getDate(),n,2)}function Qp(t,n){return Ap(t.getHours(),n,2)}function Kp(t,n){return Ap(t.getHours()%12||12,n,2)}function Jp(t,n){return Ap(1+Td.count(jd(t),t),n,3)}function tv(t,n){return Ap(t.getMilliseconds(),n,3)}function nv(t,n){return tv(t,n)+\"000\"}function ev(t,n){return Ap(t.getMonth()+1,n,2)}function rv(t,n){return Ap(t.getMinutes(),n,2)}function iv(t,n){return Ap(t.getSeconds(),n,2)}function ov(t){var n=t.getDay();return 0===n?7:n}function av(t,n){return Ap(kd.count(jd(t)-1,t),n,2)}function uv(t,n){var e=t.getDay();return t=e>=4||0===e?zd(t):zd.ceil(t),Ap(zd.count(jd(t),t)+(4===jd(t).getDay()),n,2)}function cv(t){return t.getDay()}function fv(t,n){return Ap(Ed.count(jd(t)-1,t),n,2)}function sv(t,n){return Ap(t.getFullYear()%100,n,2)}function lv(t,n){return Ap(t.getFullYear()%1e4,n,4)}function hv(t){var n=t.getTimezoneOffset();return(n>0?\"-\":(n*=-1,\"+\"))+Ap(n/60|0,\"0\",2)+Ap(n%60,\"0\",2)}function dv(t,n){return Ap(t.getUTCDate(),n,2)}function pv(t,n){return Ap(t.getUTCHours(),n,2)}function vv(t,n){return Ap(t.getUTCHours()%12||12,n,2)}function gv(t,n){return Ap(1+Zd.count(vp(t),t),n,3)}function yv(t,n){return Ap(t.getUTCMilliseconds(),n,3)}function _v(t,n){return yv(t,n)+\"000\"}function bv(t,n){return Ap(t.getUTCMonth()+1,n,2)}function mv(t,n){return Ap(t.getUTCMinutes(),n,2)}function xv(t,n){return Ap(t.getUTCSeconds(),n,2)}function wv(t){var n=t.getUTCDay();return 0===n?7:n}function Mv(t,n){return Ap(Jd.count(vp(t)-1,t),n,2)}function Nv(t,n){var e=t.getUTCDay();return t=e>=4||0===e?rp(t):rp.ceil(t),Ap(rp.count(vp(t),t)+(4===vp(t).getUTCDay()),n,2)}function Tv(t){return t.getUTCDay()}function Av(t,n){return Ap(tp.count(vp(t)-1,t),n,2)}function Sv(t,n){return Ap(t.getUTCFullYear()%100,n,2)}function kv(t,n){return Ap(t.getUTCFullYear()%1e4,n,4)}function Ev(){return\"+0000\"}function Cv(){return\"%\"}function Pv(t){return+t}function zv(t){return Math.floor(+t/1e3)}function Rv(n){return xp=mp(n),t.timeFormat=xp.format,t.timeParse=xp.parse,t.utcFormat=xp.utcFormat,t.utcParse=xp.utcParse,xp}Rv({dateTime:\"%x, %X\",date:\"%-m/%-d/%Y\",time:\"%-I:%M:%S %p\",periods:[\"AM\",\"PM\"],days:[\"Sunday\",\"Monday\",\"Tuesday\",\"Wednesday\",\"Thursday\",\"Friday\",\"Saturday\"],shortDays:[\"Sun\",\"Mon\",\"Tue\",\"Wed\",\"Thu\",\"Fri\",\"Sat\"],months:[\"January\",\"February\",\"March\",\"April\",\"May\",\"June\",\"July\",\"August\",\"September\",\"October\",\"November\",\"December\"],shortMonths:[\"Jan\",\"Feb\",\"Mar\",\"Apr\",\"May\",\"Jun\",\"Jul\",\"Aug\",\"Sep\",\"Oct\",\"Nov\",\"Dec\"]});var Dv=Date.prototype.toISOString?function(t){return t.toISOString()}:t.utcFormat(\"%Y-%m-%dT%H:%M:%S.%LZ\");var qv=+new Date(\"2000-01-01T00:00:00.000Z\")?function(t){var n=new Date(t);return isNaN(n)?null:n}:t.utcParse(\"%Y-%m-%dT%H:%M:%S.%LZ\"),Lv=1e3,Uv=60*Lv,Ov=60*Uv,Bv=24*Ov,Fv=7*Bv,Yv=30*Bv,Iv=365*Bv;function Hv(t){return new Date(t)}function jv(t){return t instanceof Date?+t:+new Date(+t)}function Vv(t,n,r,i,o,a,u,c,f){var s=Gh(Fh,Fh),l=s.invert,h=s.domain,d=f(\".%L\"),p=f(\":%S\"),v=f(\"%I:%M\"),g=f(\"%I %p\"),y=f(\"%a %d\"),_=f(\"%b %d\"),b=f(\"%B\"),m=f(\"%Y\"),x=[[u,1,Lv],[u,5,5*Lv],[u,15,15*Lv],[u,30,30*Lv],[a,1,Uv],[a,5,5*Uv],[a,15,15*Uv],[a,30,30*Uv],[o,1,Ov],[o,3,3*Ov],[o,6,6*Ov],[o,12,12*Ov],[i,1,Bv],[i,2,2*Bv],[r,1,Fv],[n,1,Yv],[n,3,3*Yv],[t,1,Iv]];function M(e){return(u(e)<e?d:a(e)<e?p:o(e)<e?v:i(e)<e?g:n(e)<e?r(e)<e?y:_:t(e)<e?b:m)(e)}function N(n,r,i,o){if(null==n&&(n=10),\"number\"==typeof n){var a=Math.abs(i-r)/n,u=e(function(t){return t[2]}).right(x,a);u===x.length?(o=w(r/Iv,i/Iv,n),n=t):u?(o=(u=x[a/x[u-1][2]<x[u][2]/a?u-1:u])[1],n=u[0]):(o=Math.max(w(r,i,n),1),n=c)}return null==o?n:n.every(o)}return s.invert=function(t){return new Date(l(t))},s.domain=function(t){return arguments.length?h(Rh.call(t,jv)):h().map(Hv)},s.ticks=function(t,n){var e,r=h(),i=r[0],o=r[r.length-1],a=o<i;return a&&(e=i,i=o,o=e),e=(e=N(t,i,o,n))?e.range(i,o+1):[],a?e.reverse():e},s.tickFormat=function(t,n){return null==n?M:f(n)},s.nice=function(t,n){var e=h();return(t=N(t,e[0],e[e.length-1],n))?h(Zh(e,t)):s},s.copy=function(){return Vh(s,Vv(t,n,r,i,o,a,u,c,f))},s}function Xv(){var t,n,e,r,i,o=0,a=1,u=Fh,c=!1;function f(n){return isNaN(n=+n)?i:u(0===e?.5:(n=(r(n)-t)*e,c?Math.max(0,Math.min(1,n)):n))}return f.domain=function(i){return arguments.length?(t=r(o=+i[0]),n=r(a=+i[1]),e=t===n?0:1/(n-t),f):[o,a]},f.clamp=function(t){return arguments.length?(c=!!t,f):c},f.interpolator=function(t){return arguments.length?(u=t,f):u},f.unknown=function(t){return arguments.length?(i=t,f):i},function(i){return r=i,t=i(o),n=i(a),e=t===n?0:1/(n-t),f}}function Gv(t,n){return n.domain(t.domain()).interpolator(t.interpolator()).clamp(t.clamp()).unknown(t.unknown())}function $v(){var t=sd(Xv());return t.copy=function(){return Gv(t,$v()).exponent(t.exponent())},Ph.apply(t,arguments)}function Wv(){var t,n,e,r,i,o,a,u=0,c=.5,f=1,s=Fh,l=!1;function h(t){return isNaN(t=+t)?a:(t=.5+((t=+o(t))-n)*(t<n?r:i),s(l?Math.max(0,Math.min(1,t)):t))}return h.domain=function(a){return arguments.length?(t=o(u=+a[0]),n=o(c=+a[1]),e=o(f=+a[2]),r=t===n?0:.5/(n-t),i=n===e?0:.5/(e-n),h):[u,c,f]},h.clamp=function(t){return arguments.length?(l=!!t,h):l},h.interpolator=function(t){return arguments.length?(s=t,h):s},h.unknown=function(t){return arguments.length?(a=t,h):a},function(a){return o=a,t=a(u),n=a(c),e=a(f),r=t===n?0:.5/(n-t),i=n===e?0:.5/(e-n),h}}function Zv(){var t=sd(Wv());return t.copy=function(){return Gv(t,Zv()).exponent(t.exponent())},Ph.apply(t,arguments)}function Qv(t){for(var n=t.length/6|0,e=new Array(n),r=0;r<n;)e[r]=\"#\"+t.slice(6*r,6*++r);return e}var Kv=Qv(\"1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf\"),Jv=Qv(\"7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666\"),tg=Qv(\"1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666\"),ng=Qv(\"a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928\"),eg=Qv(\"fbb4aeb3cde3ccebc5decbe4fed9a6ffffcce5d8bdfddaecf2f2f2\"),rg=Qv(\"b3e2cdfdcdaccbd5e8f4cae4e6f5c9fff2aef1e2cccccccc\"),ig=Qv(\"e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999\"),og=Qv(\"66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3\"),ag=Qv(\"8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f\"),ug=Qv(\"4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab\");function cg(t){return pe(t[t.length-1])}var fg=new Array(3).concat(\"d8b365f5f5f55ab4ac\",\"a6611adfc27d80cdc1018571\",\"a6611adfc27df5f5f580cdc1018571\",\"8c510ad8b365f6e8c3c7eae55ab4ac01665e\",\"8c510ad8b365f6e8c3f5f5f5c7eae55ab4ac01665e\",\"8c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e\",\"8c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e\",\"5430058c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e003c30\",\"5430058c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e003c30\").map(Qv),sg=cg(fg),lg=new Array(3).concat(\"af8dc3f7f7f77fbf7b\",\"7b3294c2a5cfa6dba0008837\",\"7b3294c2a5cff7f7f7a6dba0008837\",\"762a83af8dc3e7d4e8d9f0d37fbf7b1b7837\",\"762a83af8dc3e7d4e8f7f7f7d9f0d37fbf7b1b7837\",\"762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b7837\",\"762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b7837\",\"40004b762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b783700441b\",\"40004b762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b783700441b\").map(Qv),hg=cg(lg),dg=new Array(3).concat(\"e9a3c9f7f7f7a1d76a\",\"d01c8bf1b6dab8e1864dac26\",\"d01c8bf1b6daf7f7f7b8e1864dac26\",\"c51b7de9a3c9fde0efe6f5d0a1d76a4d9221\",\"c51b7de9a3c9fde0eff7f7f7e6f5d0a1d76a4d9221\",\"c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221\",\"c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221\",\"8e0152c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221276419\",\"8e0152c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221276419\").map(Qv),pg=cg(dg),vg=new Array(3).concat(\"998ec3f7f7f7f1a340\",\"5e3c99b2abd2fdb863e66101\",\"5e3c99b2abd2f7f7f7fdb863e66101\",\"542788998ec3d8daebfee0b6f1a340b35806\",\"542788998ec3d8daebf7f7f7fee0b6f1a340b35806\",\"5427888073acb2abd2d8daebfee0b6fdb863e08214b35806\",\"5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b35806\",\"2d004b5427888073acb2abd2d8daebfee0b6fdb863e08214b358067f3b08\",\"2d004b5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b358067f3b08\").map(Qv),gg=cg(vg),yg=new Array(3).concat(\"ef8a62f7f7f767a9cf\",\"ca0020f4a58292c5de0571b0\",\"ca0020f4a582f7f7f792c5de0571b0\",\"b2182bef8a62fddbc7d1e5f067a9cf2166ac\",\"b2182bef8a62fddbc7f7f7f7d1e5f067a9cf2166ac\",\"b2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac\",\"b2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac\",\"67001fb2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac053061\",\"67001fb2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac053061\").map(Qv),_g=cg(yg),bg=new Array(3).concat(\"ef8a62ffffff999999\",\"ca0020f4a582bababa404040\",\"ca0020f4a582ffffffbababa404040\",\"b2182bef8a62fddbc7e0e0e09999994d4d4d\",\"b2182bef8a62fddbc7ffffffe0e0e09999994d4d4d\",\"b2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d\",\"b2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d\",\"67001fb2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d1a1a1a\",\"67001fb2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d1a1a1a\").map(Qv),mg=cg(bg),xg=new Array(3).concat(\"fc8d59ffffbf91bfdb\",\"d7191cfdae61abd9e92c7bb6\",\"d7191cfdae61ffffbfabd9e92c7bb6\",\"d73027fc8d59fee090e0f3f891bfdb4575b4\",\"d73027fc8d59fee090ffffbfe0f3f891bfdb4575b4\",\"d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4\",\"d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4\",\"a50026d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4313695\",\"a50026d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4313695\").map(Qv),wg=cg(xg),Mg=new Array(3).concat(\"fc8d59ffffbf91cf60\",\"d7191cfdae61a6d96a1a9641\",\"d7191cfdae61ffffbfa6d96a1a9641\",\"d73027fc8d59fee08bd9ef8b91cf601a9850\",\"d73027fc8d59fee08bffffbfd9ef8b91cf601a9850\",\"d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850\",\"d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850\",\"a50026d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850006837\",\"a50026d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850006837\").map(Qv),Ng=cg(Mg),Tg=new Array(3).concat(\"fc8d59ffffbf99d594\",\"d7191cfdae61abdda42b83ba\",\"d7191cfdae61ffffbfabdda42b83ba\",\"d53e4ffc8d59fee08be6f59899d5943288bd\",\"d53e4ffc8d59fee08bffffbfe6f59899d5943288bd\",\"d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd\",\"d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd\",\"9e0142d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd5e4fa2\",\"9e0142d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd5e4fa2\").map(Qv),Ag=cg(Tg),Sg=new Array(3).concat(\"e5f5f999d8c92ca25f\",\"edf8fbb2e2e266c2a4238b45\",\"edf8fbb2e2e266c2a42ca25f006d2c\",\"edf8fbccece699d8c966c2a42ca25f006d2c\",\"edf8fbccece699d8c966c2a441ae76238b45005824\",\"f7fcfde5f5f9ccece699d8c966c2a441ae76238b45005824\",\"f7fcfde5f5f9ccece699d8c966c2a441ae76238b45006d2c00441b\").map(Qv),kg=cg(Sg),Eg=new Array(3).concat(\"e0ecf49ebcda8856a7\",\"edf8fbb3cde38c96c688419d\",\"edf8fbb3cde38c96c68856a7810f7c\",\"edf8fbbfd3e69ebcda8c96c68856a7810f7c\",\"edf8fbbfd3e69ebcda8c96c68c6bb188419d6e016b\",\"f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d6e016b\",\"f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d810f7c4d004b\").map(Qv),Cg=cg(Eg),Pg=new Array(3).concat(\"e0f3dba8ddb543a2ca\",\"f0f9e8bae4bc7bccc42b8cbe\",\"f0f9e8bae4bc7bccc443a2ca0868ac\",\"f0f9e8ccebc5a8ddb57bccc443a2ca0868ac\",\"f0f9e8ccebc5a8ddb57bccc44eb3d32b8cbe08589e\",\"f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe08589e\",\"f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe0868ac084081\").map(Qv),zg=cg(Pg),Rg=new Array(3).concat(\"fee8c8fdbb84e34a33\",\"fef0d9fdcc8afc8d59d7301f\",\"fef0d9fdcc8afc8d59e34a33b30000\",\"fef0d9fdd49efdbb84fc8d59e34a33b30000\",\"fef0d9fdd49efdbb84fc8d59ef6548d7301f990000\",\"fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000\",\"fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000\").map(Qv),Dg=cg(Rg),qg=new Array(3).concat(\"ece2f0a6bddb1c9099\",\"f6eff7bdc9e167a9cf02818a\",\"f6eff7bdc9e167a9cf1c9099016c59\",\"f6eff7d0d1e6a6bddb67a9cf1c9099016c59\",\"f6eff7d0d1e6a6bddb67a9cf3690c002818a016450\",\"fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016450\",\"fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016c59014636\").map(Qv),Lg=cg(qg),Ug=new Array(3).concat(\"ece7f2a6bddb2b8cbe\",\"f1eef6bdc9e174a9cf0570b0\",\"f1eef6bdc9e174a9cf2b8cbe045a8d\",\"f1eef6d0d1e6a6bddb74a9cf2b8cbe045a8d\",\"f1eef6d0d1e6a6bddb74a9cf3690c00570b0034e7b\",\"fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0034e7b\",\"fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0045a8d023858\").map(Qv),Og=cg(Ug),Bg=new Array(3).concat(\"e7e1efc994c7dd1c77\",\"f1eef6d7b5d8df65b0ce1256\",\"f1eef6d7b5d8df65b0dd1c77980043\",\"f1eef6d4b9dac994c7df65b0dd1c77980043\",\"f1eef6d4b9dac994c7df65b0e7298ace125691003f\",\"f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125691003f\",\"f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125698004367001f\").map(Qv),Fg=cg(Bg),Yg=new Array(3).concat(\"fde0ddfa9fb5c51b8a\",\"feebe2fbb4b9f768a1ae017e\",\"feebe2fbb4b9f768a1c51b8a7a0177\",\"feebe2fcc5c0fa9fb5f768a1c51b8a7a0177\",\"feebe2fcc5c0fa9fb5f768a1dd3497ae017e7a0177\",\"fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a0177\",\"fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a017749006a\").map(Qv),Ig=cg(Yg),Hg=new Array(3).concat(\"edf8b17fcdbb2c7fb8\",\"ffffcca1dab441b6c4225ea8\",\"ffffcca1dab441b6c42c7fb8253494\",\"ffffccc7e9b47fcdbb41b6c42c7fb8253494\",\"ffffccc7e9b47fcdbb41b6c41d91c0225ea80c2c84\",\"ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea80c2c84\",\"ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea8253494081d58\").map(Qv),jg=cg(Hg),Vg=new Array(3).concat(\"f7fcb9addd8e31a354\",\"ffffccc2e69978c679238443\",\"ffffccc2e69978c67931a354006837\",\"ffffccd9f0a3addd8e78c67931a354006837\",\"ffffccd9f0a3addd8e78c67941ab5d238443005a32\",\"ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443005a32\",\"ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443006837004529\").map(Qv),Xg=cg(Vg),Gg=new Array(3).concat(\"fff7bcfec44fd95f0e\",\"ffffd4fed98efe9929cc4c02\",\"ffffd4fed98efe9929d95f0e993404\",\"ffffd4fee391fec44ffe9929d95f0e993404\",\"ffffd4fee391fec44ffe9929ec7014cc4c028c2d04\",\"ffffe5fff7bcfee391fec44ffe9929ec7014cc4c028c2d04\",\"ffffe5fff7bcfee391fec44ffe9929ec7014cc4c02993404662506\").map(Qv),$g=cg(Gg),Wg=new Array(3).concat(\"ffeda0feb24cf03b20\",\"ffffb2fecc5cfd8d3ce31a1c\",\"ffffb2fecc5cfd8d3cf03b20bd0026\",\"ffffb2fed976feb24cfd8d3cf03b20bd0026\",\"ffffb2fed976feb24cfd8d3cfc4e2ae31a1cb10026\",\"ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cb10026\",\"ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cbd0026800026\").map(Qv),Zg=cg(Wg),Qg=new Array(3).concat(\"deebf79ecae13182bd\",\"eff3ffbdd7e76baed62171b5\",\"eff3ffbdd7e76baed63182bd08519c\",\"eff3ffc6dbef9ecae16baed63182bd08519c\",\"eff3ffc6dbef9ecae16baed64292c62171b5084594\",\"f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594\",\"f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b\").map(Qv),Kg=cg(Qg),Jg=new Array(3).concat(\"e5f5e0a1d99b31a354\",\"edf8e9bae4b374c476238b45\",\"edf8e9bae4b374c47631a354006d2c\",\"edf8e9c7e9c0a1d99b74c47631a354006d2c\",\"edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32\",\"f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32\",\"f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b\").map(Qv),ty=cg(Jg),ny=new Array(3).concat(\"f0f0f0bdbdbd636363\",\"f7f7f7cccccc969696525252\",\"f7f7f7cccccc969696636363252525\",\"f7f7f7d9d9d9bdbdbd969696636363252525\",\"f7f7f7d9d9d9bdbdbd969696737373525252252525\",\"fffffff0f0f0d9d9d9bdbdbd969696737373525252252525\",\"fffffff0f0f0d9d9d9bdbdbd969696737373525252252525000000\").map(Qv),ey=cg(ny),ry=new Array(3).concat(\"efedf5bcbddc756bb1\",\"f2f0f7cbc9e29e9ac86a51a3\",\"f2f0f7cbc9e29e9ac8756bb154278f\",\"f2f0f7dadaebbcbddc9e9ac8756bb154278f\",\"f2f0f7dadaebbcbddc9e9ac8807dba6a51a34a1486\",\"fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a34a1486\",\"fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a354278f3f007d\").map(Qv),iy=cg(ry),oy=new Array(3).concat(\"fee0d2fc9272de2d26\",\"fee5d9fcae91fb6a4acb181d\",\"fee5d9fcae91fb6a4ade2d26a50f15\",\"fee5d9fcbba1fc9272fb6a4ade2d26a50f15\",\"fee5d9fcbba1fc9272fb6a4aef3b2ccb181d99000d\",\"fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181d99000d\",\"fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181da50f1567000d\").map(Qv),ay=cg(oy),uy=new Array(3).concat(\"fee6cefdae6be6550d\",\"feeddefdbe85fd8d3cd94701\",\"feeddefdbe85fd8d3ce6550da63603\",\"feeddefdd0a2fdae6bfd8d3ce6550da63603\",\"feeddefdd0a2fdae6bfd8d3cf16913d948018c2d04\",\"fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d948018c2d04\",\"fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d94801a636037f2704\").map(Qv),cy=cg(uy);var fy=Qe(ee(300,.5,0),ee(-240,.5,1)),sy=Qe(ee(-100,.75,.35),ee(80,1.5,.8)),ly=Qe(ee(260,.75,.35),ee(80,1.5,.8)),hy=ee();var dy=_n(),py=Math.PI/3,vy=2*Math.PI/3;function gy(t){var n=t.length;return function(e){return t[Math.max(0,Math.min(n-1,Math.floor(e*n)))]}}var yy=gy(Qv(\"44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725\")),_y=gy(Qv(\"00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf\")),by=gy(Qv(\"00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4\")),my=gy(Qv(\"0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921\"));function xy(t){return function(){return t}}var wy=Math.abs,My=Math.atan2,Ny=Math.cos,Ty=Math.max,Ay=Math.min,Sy=Math.sin,ky=Math.sqrt,Ey=1e-12,Cy=Math.PI,Py=Cy/2,zy=2*Cy;function Ry(t){return t>=1?Py:t<=-1?-Py:Math.asin(t)}function Dy(t){return t.innerRadius}function qy(t){return t.outerRadius}function Ly(t){return t.startAngle}function Uy(t){return t.endAngle}function Oy(t){return t&&t.padAngle}function By(t,n,e,r,i,o,a){var u=t-e,c=n-r,f=(a?o:-o)/ky(u*u+c*c),s=f*c,l=-f*u,h=t+s,d=n+l,p=e+s,v=r+l,g=(h+p)/2,y=(d+v)/2,_=p-h,b=v-d,m=_*_+b*b,x=i-o,w=h*v-p*d,M=(b<0?-1:1)*ky(Ty(0,x*x*m-w*w)),N=(w*b-_*M)/m,T=(-w*_-b*M)/m,A=(w*b+_*M)/m,S=(-w*_+b*M)/m,k=N-g,E=T-y,C=A-g,P=S-y;return k*k+E*E>C*C+P*P&&(N=A,T=S),{cx:N,cy:T,x01:-s,y01:-l,x11:N*(i/x-1),y11:T*(i/x-1)}}function Fy(t){this._context=t}function Yy(t){return new Fy(t)}function Iy(t){return t[0]}function Hy(t){return t[1]}function jy(){var t=Iy,n=Hy,e=xy(!0),r=null,i=Yy,o=null;function a(a){var u,c,f,s=a.length,l=!1;for(null==r&&(o=i(f=no())),u=0;u<=s;++u)!(u<s&&e(c=a[u],u,a))===l&&((l=!l)?o.lineStart():o.lineEnd()),l&&o.point(+t(c,u,a),+n(c,u,a));if(f)return o=null,f+\"\"||null}return a.x=function(n){return arguments.length?(t=\"function\"==typeof n?n:xy(+n),a):t},a.y=function(t){return arguments.length?(n=\"function\"==typeof t?t:xy(+t),a):n},a.defined=function(t){return arguments.length?(e=\"function\"==typeof t?t:xy(!!t),a):e},a.curve=function(t){return arguments.length?(i=t,null!=r&&(o=i(r)),a):i},a.context=function(t){return arguments.length?(null==t?r=o=null:o=i(r=t),a):r},a}function Vy(){var t=Iy,n=null,e=xy(0),r=Hy,i=xy(!0),o=null,a=Yy,u=null;function c(c){var f,s,l,h,d,p=c.length,v=!1,g=new Array(p),y=new Array(p);for(null==o&&(u=a(d=no())),f=0;f<=p;++f){if(!(f<p&&i(h=c[f],f,c))===v)if(v=!v)s=f,u.areaStart(),u.lineStart();else{for(u.lineEnd(),u.lineStart(),l=f-1;l>=s;--l)u.point(g[l],y[l]);u.lineEnd(),u.areaEnd()}v&&(g[f]=+t(h,f,c),y[f]=+e(h,f,c),u.point(n?+n(h,f,c):g[f],r?+r(h,f,c):y[f]))}if(d)return u=null,d+\"\"||null}function f(){return jy().defined(i).curve(a).context(o)}return c.x=function(e){return arguments.length?(t=\"function\"==typeof e?e:xy(+e),n=null,c):t},c.x0=function(n){return arguments.length?(t=\"function\"==typeof n?n:xy(+n),c):t},c.x1=function(t){return arguments.length?(n=null==t?null:\"function\"==typeof t?t:xy(+t),c):n},c.y=function(t){return arguments.length?(e=\"function\"==typeof t?t:xy(+t),r=null,c):e},c.y0=function(t){return arguments.length?(e=\"function\"==typeof t?t:xy(+t),c):e},c.y1=function(t){return arguments.length?(r=null==t?null:\"function\"==typeof t?t:xy(+t),c):r},c.lineX0=c.lineY0=function(){return f().x(t).y(e)},c.lineY1=function(){return f().x(t).y(r)},c.lineX1=function(){return f().x(n).y(e)},c.defined=function(t){return arguments.length?(i=\"function\"==typeof t?t:xy(!!t),c):i},c.curve=function(t){return arguments.length?(a=t,null!=o&&(u=a(o)),c):a},c.context=function(t){return arguments.length?(null==t?o=u=null:u=a(o=t),c):o},c}function Xy(t,n){return n<t?-1:n>t?1:n>=t?0:NaN}function Gy(t){return t}Fy.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;default:this._context.lineTo(t,n)}}};var $y=Zy(Yy);function Wy(t){this._curve=t}function Zy(t){function n(n){return new Wy(t(n))}return n._curve=t,n}function Qy(t){var n=t.curve;return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t.curve=function(t){return arguments.length?n(Zy(t)):n()._curve},t}function Ky(){return Qy(jy().curve($y))}function Jy(){var t=Vy().curve($y),n=t.curve,e=t.lineX0,r=t.lineX1,i=t.lineY0,o=t.lineY1;return t.angle=t.x,delete t.x,t.startAngle=t.x0,delete t.x0,t.endAngle=t.x1,delete t.x1,t.radius=t.y,delete t.y,t.innerRadius=t.y0,delete t.y0,t.outerRadius=t.y1,delete t.y1,t.lineStartAngle=function(){return Qy(e())},delete t.lineX0,t.lineEndAngle=function(){return Qy(r())},delete t.lineX1,t.lineInnerRadius=function(){return Qy(i())},delete t.lineY0,t.lineOuterRadius=function(){return Qy(o())},delete t.lineY1,t.curve=function(t){return arguments.length?n(Zy(t)):n()._curve},t}function t_(t,n){return[(n=+n)*Math.cos(t-=Math.PI/2),n*Math.sin(t)]}Wy.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(t,n){this._curve.point(n*Math.sin(t),n*-Math.cos(t))}};var n_=Array.prototype.slice;function e_(t){return t.source}function r_(t){return t.target}function i_(t){var n=e_,e=r_,r=Iy,i=Hy,o=null;function a(){var a,u=n_.call(arguments),c=n.apply(this,u),f=e.apply(this,u);if(o||(o=a=no()),t(o,+r.apply(this,(u[0]=c,u)),+i.apply(this,u),+r.apply(this,(u[0]=f,u)),+i.apply(this,u)),a)return o=null,a+\"\"||null}return a.source=function(t){return arguments.length?(n=t,a):n},a.target=function(t){return arguments.length?(e=t,a):e},a.x=function(t){return arguments.length?(r=\"function\"==typeof t?t:xy(+t),a):r},a.y=function(t){return arguments.length?(i=\"function\"==typeof t?t:xy(+t),a):i},a.context=function(t){return arguments.length?(o=null==t?null:t,a):o},a}function o_(t,n,e,r,i){t.moveTo(n,e),t.bezierCurveTo(n=(n+r)/2,e,n,i,r,i)}function a_(t,n,e,r,i){t.moveTo(n,e),t.bezierCurveTo(n,e=(e+i)/2,r,e,r,i)}function u_(t,n,e,r,i){var o=t_(n,e),a=t_(n,e=(e+i)/2),u=t_(r,e),c=t_(r,i);t.moveTo(o[0],o[1]),t.bezierCurveTo(a[0],a[1],u[0],u[1],c[0],c[1])}var c_={draw:function(t,n){var e=Math.sqrt(n/Cy);t.moveTo(e,0),t.arc(0,0,e,0,zy)}},f_={draw:function(t,n){var e=Math.sqrt(n/5)/2;t.moveTo(-3*e,-e),t.lineTo(-e,-e),t.lineTo(-e,-3*e),t.lineTo(e,-3*e),t.lineTo(e,-e),t.lineTo(3*e,-e),t.lineTo(3*e,e),t.lineTo(e,e),t.lineTo(e,3*e),t.lineTo(-e,3*e),t.lineTo(-e,e),t.lineTo(-3*e,e),t.closePath()}},s_=Math.sqrt(1/3),l_=2*s_,h_={draw:function(t,n){var e=Math.sqrt(n/l_),r=e*s_;t.moveTo(0,-e),t.lineTo(r,0),t.lineTo(0,e),t.lineTo(-r,0),t.closePath()}},d_=Math.sin(Cy/10)/Math.sin(7*Cy/10),p_=Math.sin(zy/10)*d_,v_=-Math.cos(zy/10)*d_,g_={draw:function(t,n){var e=Math.sqrt(.8908130915292852*n),r=p_*e,i=v_*e;t.moveTo(0,-e),t.lineTo(r,i);for(var o=1;o<5;++o){var a=zy*o/5,u=Math.cos(a),c=Math.sin(a);t.lineTo(c*e,-u*e),t.lineTo(u*r-c*i,c*r+u*i)}t.closePath()}},y_={draw:function(t,n){var e=Math.sqrt(n),r=-e/2;t.rect(r,r,e,e)}},__=Math.sqrt(3),b_={draw:function(t,n){var e=-Math.sqrt(n/(3*__));t.moveTo(0,2*e),t.lineTo(-__*e,-e),t.lineTo(__*e,-e),t.closePath()}},m_=Math.sqrt(3)/2,x_=1/Math.sqrt(12),w_=3*(x_/2+1),M_={draw:function(t,n){var e=Math.sqrt(n/w_),r=e/2,i=e*x_,o=r,a=e*x_+e,u=-o,c=a;t.moveTo(r,i),t.lineTo(o,a),t.lineTo(u,c),t.lineTo(-.5*r-m_*i,m_*r+-.5*i),t.lineTo(-.5*o-m_*a,m_*o+-.5*a),t.lineTo(-.5*u-m_*c,m_*u+-.5*c),t.lineTo(-.5*r+m_*i,-.5*i-m_*r),t.lineTo(-.5*o+m_*a,-.5*a-m_*o),t.lineTo(-.5*u+m_*c,-.5*c-m_*u),t.closePath()}},N_=[c_,f_,h_,y_,g_,b_,M_];function T_(){}function A_(t,n,e){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+n)/6,(t._y0+4*t._y1+e)/6)}function S_(t){this._context=t}function k_(t){this._context=t}function E_(t){this._context=t}function C_(t,n){this._basis=new S_(t),this._beta=n}S_.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:A_(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:A_(this,t,n)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=n}},k_.prototype={areaStart:T_,areaEnd:T_,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4)}},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._x2=t,this._y2=n;break;case 1:this._point=2,this._x3=t,this._y3=n;break;case 2:this._point=3,this._x4=t,this._y4=n,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+n)/6);break;default:A_(this,t,n)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=n}},E_.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var e=(this._x0+4*this._x1+t)/6,r=(this._y0+4*this._y1+n)/6;this._line?this._context.lineTo(e,r):this._context.moveTo(e,r);break;case 3:this._point=4;default:A_(this,t,n)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=n}},C_.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var t=this._x,n=this._y,e=t.length-1;if(e>0)for(var r,i=t[0],o=n[0],a=t[e]-i,u=n[e]-o,c=-1;++c<=e;)r=c/e,this._basis.point(this._beta*t[c]+(1-this._beta)*(i+r*a),this._beta*n[c]+(1-this._beta)*(o+r*u));this._x=this._y=null,this._basis.lineEnd()},point:function(t,n){this._x.push(+t),this._y.push(+n)}};var P_=function t(n){function e(t){return 1===n?new S_(t):new C_(t,n)}return e.beta=function(n){return t(+n)},e}(.85);function z_(t,n,e){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-n),t._y2+t._k*(t._y1-e),t._x2,t._y2)}function R_(t,n){this._context=t,this._k=(1-n)/6}R_.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:z_(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2,this._x1=t,this._y1=n;break;case 2:this._point=3;default:z_(this,t,n)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};var D_=function t(n){function e(t){return new R_(t,n)}return e.tension=function(n){return t(+n)},e}(0);function q_(t,n){this._context=t,this._k=(1-n)/6}q_.prototype={areaStart:T_,areaEnd:T_,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._x3=t,this._y3=n;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=n);break;case 2:this._point=3,this._x5=t,this._y5=n;break;default:z_(this,t,n)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};var L_=function t(n){function e(t){return new q_(t,n)}return e.tension=function(n){return t(+n)},e}(0);function U_(t,n){this._context=t,this._k=(1-n)/6}U_.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:z_(this,t,n)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};var O_=function t(n){function e(t){return new U_(t,n)}return e.tension=function(n){return t(+n)},e}(0);function B_(t,n,e){var r=t._x1,i=t._y1,o=t._x2,a=t._y2;if(t._l01_a>Ey){var u=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,c=3*t._l01_a*(t._l01_a+t._l12_a);r=(r*u-t._x0*t._l12_2a+t._x2*t._l01_2a)/c,i=(i*u-t._y0*t._l12_2a+t._y2*t._l01_2a)/c}if(t._l23_a>Ey){var f=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,s=3*t._l23_a*(t._l23_a+t._l12_a);o=(o*f+t._x1*t._l23_2a-n*t._l12_2a)/s,a=(a*f+t._y1*t._l23_2a-e*t._l12_2a)/s}t._context.bezierCurveTo(r,i,o,a,t._x2,t._y2)}function F_(t,n){this._context=t,this._alpha=n}F_.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){if(t=+t,n=+n,this._point){var e=this._x2-t,r=this._y2-n;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(e*e+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;break;case 2:this._point=3;default:B_(this,t,n)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};var Y_=function t(n){function e(t){return n?new F_(t,n):new R_(t,0)}return e.alpha=function(n){return t(+n)},e}(.5);function I_(t,n){this._context=t,this._alpha=n}I_.prototype={areaStart:T_,areaEnd:T_,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,n){if(t=+t,n=+n,this._point){var e=this._x2-t,r=this._y2-n;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(e*e+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=n;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=n);break;case 2:this._point=3,this._x5=t,this._y5=n;break;default:B_(this,t,n)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};var H_=function t(n){function e(t){return n?new I_(t,n):new q_(t,0)}return e.alpha=function(n){return t(+n)},e}(.5);function j_(t,n){this._context=t,this._alpha=n}j_.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){if(t=+t,n=+n,this._point){var e=this._x2-t,r=this._y2-n;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(e*e+r*r,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:B_(this,t,n)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};var V_=function t(n){function e(t){return n?new j_(t,n):new U_(t,0)}return e.alpha=function(n){return t(+n)},e}(.5);function X_(t){this._context=t}function G_(t){return t<0?-1:1}function $_(t,n,e){var r=t._x1-t._x0,i=n-t._x1,o=(t._y1-t._y0)/(r||i<0&&-0),a=(e-t._y1)/(i||r<0&&-0),u=(o*i+a*r)/(r+i);return(G_(o)+G_(a))*Math.min(Math.abs(o),Math.abs(a),.5*Math.abs(u))||0}function W_(t,n){var e=t._x1-t._x0;return e?(3*(t._y1-t._y0)/e-n)/2:n}function Z_(t,n,e){var r=t._x0,i=t._y0,o=t._x1,a=t._y1,u=(o-r)/3;t._context.bezierCurveTo(r+u,i+u*n,o-u,a-u*e,o,a)}function Q_(t){this._context=t}function K_(t){this._context=new J_(t)}function J_(t){this._context=t}function tb(t){this._context=t}function nb(t){var n,e,r=t.length-1,i=new Array(r),o=new Array(r),a=new Array(r);for(i[0]=0,o[0]=2,a[0]=t[0]+2*t[1],n=1;n<r-1;++n)i[n]=1,o[n]=4,a[n]=4*t[n]+2*t[n+1];for(i[r-1]=2,o[r-1]=7,a[r-1]=8*t[r-1]+t[r],n=1;n<r;++n)e=i[n]/o[n-1],o[n]-=e,a[n]-=e*a[n-1];for(i[r-1]=a[r-1]/o[r-1],n=r-2;n>=0;--n)i[n]=(a[n]-i[n+1])/o[n];for(o[r-1]=(t[r]+i[r-1])/2,n=0;n<r-1;++n)o[n]=2*t[n+1]-i[n+1];return[i,o]}function eb(t,n){this._context=t,this._t=n}function rb(t,n){if((i=t.length)>1)for(var e,r,i,o=1,a=t[n[0]],u=a.length;o<i;++o)for(r=a,a=t[n[o]],e=0;e<u;++e)a[e][1]+=a[e][0]=isNaN(r[e][1])?r[e][0]:r[e][1]}function ib(t){for(var n=t.length,e=new Array(n);--n>=0;)e[n]=n;return e}function ob(t,n){return t[n]}function ab(t){var n=t.map(ub);return ib(t).sort(function(t,e){return n[t]-n[e]})}function ub(t){for(var n,e=-1,r=0,i=t.length,o=-1/0;++e<i;)(n=+t[e][1])>o&&(o=n,r=e);return r}function cb(t){var n=t.map(fb);return ib(t).sort(function(t,e){return n[t]-n[e]})}function fb(t){for(var n,e=0,r=-1,i=t.length;++r<i;)(n=+t[r][1])&&(e+=n);return e}function sb(t){return function(){return t}}function lb(t){return t[0]}function hb(t){return t[1]}function db(){this._=null}function pb(t){t.U=t.C=t.L=t.R=t.P=t.N=null}function vb(t,n){var e=n,r=n.R,i=e.U;i?i.L===e?i.L=r:i.R=r:t._=r,r.U=i,e.U=r,e.R=r.L,e.R&&(e.R.U=e),r.L=e}function gb(t,n){var e=n,r=n.L,i=e.U;i?i.L===e?i.L=r:i.R=r:t._=r,r.U=i,e.U=r,e.L=r.R,e.L&&(e.L.U=e),r.R=e}function yb(t){for(;t.L;)t=t.L;return t}function _b(t,n,e,r){var i=[null,null],o=Ib.push(i)-1;return i.left=t,i.right=n,e&&mb(i,t,n,e),r&&mb(i,n,t,r),Fb[t.index].halfedges.push(o),Fb[n.index].halfedges.push(o),i}function bb(t,n,e){var r=[n,e];return r.left=t,r}function mb(t,n,e,r){t[0]||t[1]?t.left===e?t[1]=r:t[0]=r:(t[0]=r,t.left=n,t.right=e)}function xb(t,n,e,r,i){var o,a=t[0],u=t[1],c=a[0],f=a[1],s=0,l=1,h=u[0]-c,d=u[1]-f;if(o=n-c,h||!(o>0)){if(o/=h,h<0){if(o<s)return;o<l&&(l=o)}else if(h>0){if(o>l)return;o>s&&(s=o)}if(o=r-c,h||!(o<0)){if(o/=h,h<0){if(o>l)return;o>s&&(s=o)}else if(h>0){if(o<s)return;o<l&&(l=o)}if(o=e-f,d||!(o>0)){if(o/=d,d<0){if(o<s)return;o<l&&(l=o)}else if(d>0){if(o>l)return;o>s&&(s=o)}if(o=i-f,d||!(o<0)){if(o/=d,d<0){if(o>l)return;o>s&&(s=o)}else if(d>0){if(o<s)return;o<l&&(l=o)}return!(s>0||l<1)||(s>0&&(t[0]=[c+s*h,f+s*d]),l<1&&(t[1]=[c+l*h,f+l*d]),!0)}}}}}function wb(t,n,e,r,i){var o=t[1];if(o)return!0;var a,u,c=t[0],f=t.left,s=t.right,l=f[0],h=f[1],d=s[0],p=s[1],v=(l+d)/2,g=(h+p)/2;if(p===h){if(v<n||v>=r)return;if(l>d){if(c){if(c[1]>=i)return}else c=[v,e];o=[v,i]}else{if(c){if(c[1]<e)return}else c=[v,i];o=[v,e]}}else if(u=g-(a=(l-d)/(p-h))*v,a<-1||a>1)if(l>d){if(c){if(c[1]>=i)return}else c=[(e-u)/a,e];o=[(i-u)/a,i]}else{if(c){if(c[1]<e)return}else c=[(i-u)/a,i];o=[(e-u)/a,e]}else if(h<p){if(c){if(c[0]>=r)return}else c=[n,a*n+u];o=[r,a*r+u]}else{if(c){if(c[0]<n)return}else c=[r,a*r+u];o=[n,a*n+u]}return t[0]=c,t[1]=o,!0}function Mb(t,n){var e=t.site,r=n.left,i=n.right;return e===i&&(i=r,r=e),i?Math.atan2(i[1]-r[1],i[0]-r[0]):(e===r?(r=n[1],i=n[0]):(r=n[0],i=n[1]),Math.atan2(r[0]-i[0],i[1]-r[1]))}function Nb(t,n){return n[+(n.left!==t.site)]}function Tb(t,n){return n[+(n.left===t.site)]}X_.prototype={areaStart:T_,areaEnd:T_,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(t,n){t=+t,n=+n,this._point?this._context.lineTo(t,n):(this._point=1,this._context.moveTo(t,n))}},Q_.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:Z_(this,this._t0,W_(this,this._t0))}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){var e=NaN;if(n=+n,(t=+t)!==this._x1||n!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;break;case 2:this._point=3,Z_(this,W_(this,e=$_(this,t,n)),e);break;default:Z_(this,this._t0,e=$_(this,t,n))}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=n,this._t0=e}}},(K_.prototype=Object.create(Q_.prototype)).point=function(t,n){Q_.prototype.point.call(this,n,t)},J_.prototype={moveTo:function(t,n){this._context.moveTo(n,t)},closePath:function(){this._context.closePath()},lineTo:function(t,n){this._context.lineTo(n,t)},bezierCurveTo:function(t,n,e,r,i,o){this._context.bezierCurveTo(n,t,r,e,o,i)}},tb.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var t=this._x,n=this._y,e=t.length;if(e)if(this._line?this._context.lineTo(t[0],n[0]):this._context.moveTo(t[0],n[0]),2===e)this._context.lineTo(t[1],n[1]);else for(var r=nb(t),i=nb(n),o=0,a=1;a<e;++o,++a)this._context.bezierCurveTo(r[0][o],i[0][o],r[1][o],i[1][o],t[a],n[a]);(this._line||0!==this._line&&1===e)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(t,n){this._x.push(+t),this._y.push(+n)}},eb.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&2===this._point&&this._context.lineTo(this._x,this._y),(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,n),this._context.lineTo(t,n);else{var e=this._x*(1-this._t)+t*this._t;this._context.lineTo(e,this._y),this._context.lineTo(e,n)}}this._x=t,this._y=n}},db.prototype={constructor:db,insert:function(t,n){var e,r,i;if(t){if(n.P=t,n.N=t.N,t.N&&(t.N.P=n),t.N=n,t.R){for(t=t.R;t.L;)t=t.L;t.L=n}else t.R=n;e=t}else this._?(t=yb(this._),n.P=null,n.N=t,t.P=t.L=n,e=t):(n.P=n.N=null,this._=n,e=null);for(n.L=n.R=null,n.U=e,n.C=!0,t=n;e&&e.C;)e===(r=e.U).L?(i=r.R)&&i.C?(e.C=i.C=!1,r.C=!0,t=r):(t===e.R&&(vb(this,e),e=(t=e).U),e.C=!1,r.C=!0,gb(this,r)):(i=r.L)&&i.C?(e.C=i.C=!1,r.C=!0,t=r):(t===e.L&&(gb(this,e),e=(t=e).U),e.C=!1,r.C=!0,vb(this,r)),e=t.U;this._.C=!1},remove:function(t){t.N&&(t.N.P=t.P),t.P&&(t.P.N=t.N),t.N=t.P=null;var n,e,r,i=t.U,o=t.L,a=t.R;if(e=o?a?yb(a):o:a,i?i.L===t?i.L=e:i.R=e:this._=e,o&&a?(r=e.C,e.C=t.C,e.L=o,o.U=e,e!==a?(i=e.U,e.U=t.U,t=e.R,i.L=t,e.R=a,a.U=e):(e.U=i,i=e,t=e.R)):(r=t.C,t=e),t&&(t.U=i),!r)if(t&&t.C)t.C=!1;else{do{if(t===this._)break;if(t===i.L){if((n=i.R).C&&(n.C=!1,i.C=!0,vb(this,i),n=i.R),n.L&&n.L.C||n.R&&n.R.C){n.R&&n.R.C||(n.L.C=!1,n.C=!0,gb(this,n),n=i.R),n.C=i.C,i.C=n.R.C=!1,vb(this,i),t=this._;break}}else if((n=i.L).C&&(n.C=!1,i.C=!0,gb(this,i),n=i.L),n.L&&n.L.C||n.R&&n.R.C){n.L&&n.L.C||(n.R.C=!1,n.C=!0,vb(this,n),n=i.L),n.C=i.C,i.C=n.L.C=!1,gb(this,i),t=this._;break}n.C=!0,t=i,i=i.U}while(!t.C);t&&(t.C=!1)}}};var Ab,Sb=[];function kb(){pb(this),this.x=this.y=this.arc=this.site=this.cy=null}function Eb(t){var n=t.P,e=t.N;if(n&&e){var r=n.site,i=t.site,o=e.site;if(r!==o){var a=i[0],u=i[1],c=r[0]-a,f=r[1]-u,s=o[0]-a,l=o[1]-u,h=2*(c*l-f*s);if(!(h>=-jb)){var d=c*c+f*f,p=s*s+l*l,v=(l*d-f*p)/h,g=(c*p-s*d)/h,y=Sb.pop()||new kb;y.arc=t,y.site=i,y.x=v+a,y.y=(y.cy=g+u)+Math.sqrt(v*v+g*g),t.circle=y;for(var _=null,b=Yb._;b;)if(y.y<b.y||y.y===b.y&&y.x<=b.x){if(!b.L){_=b.P;break}b=b.L}else{if(!b.R){_=b;break}b=b.R}Yb.insert(_,y),_||(Ab=y)}}}}function Cb(t){var n=t.circle;n&&(n.P||(Ab=n.N),Yb.remove(n),Sb.push(n),pb(n),t.circle=null)}var Pb=[];function zb(){pb(this),this.edge=this.site=this.circle=null}function Rb(t){var n=Pb.pop()||new zb;return n.site=t,n}function Db(t){Cb(t),Bb.remove(t),Pb.push(t),pb(t)}function qb(t){var n=t.circle,e=n.x,r=n.cy,i=[e,r],o=t.P,a=t.N,u=[t];Db(t);for(var c=o;c.circle&&Math.abs(e-c.circle.x)<Hb&&Math.abs(r-c.circle.cy)<Hb;)o=c.P,u.unshift(c),Db(c),c=o;u.unshift(c),Cb(c);for(var f=a;f.circle&&Math.abs(e-f.circle.x)<Hb&&Math.abs(r-f.circle.cy)<Hb;)a=f.N,u.push(f),Db(f),f=a;u.push(f),Cb(f);var s,l=u.length;for(s=1;s<l;++s)f=u[s],c=u[s-1],mb(f.edge,c.site,f.site,i);c=u[0],(f=u[l-1]).edge=_b(c.site,f.site,null,i),Eb(c),Eb(f)}function Lb(t){for(var n,e,r,i,o=t[0],a=t[1],u=Bb._;u;)if((r=Ub(u,a)-o)>Hb)u=u.L;else{if(!((i=o-Ob(u,a))>Hb)){r>-Hb?(n=u.P,e=u):i>-Hb?(n=u,e=u.N):n=e=u;break}if(!u.R){n=u;break}u=u.R}!function(t){Fb[t.index]={site:t,halfedges:[]}}(t);var c=Rb(t);if(Bb.insert(n,c),n||e){if(n===e)return Cb(n),e=Rb(n.site),Bb.insert(c,e),c.edge=e.edge=_b(n.site,c.site),Eb(n),void Eb(e);if(e){Cb(n),Cb(e);var f=n.site,s=f[0],l=f[1],h=t[0]-s,d=t[1]-l,p=e.site,v=p[0]-s,g=p[1]-l,y=2*(h*g-d*v),_=h*h+d*d,b=v*v+g*g,m=[(g*_-d*b)/y+s,(h*b-v*_)/y+l];mb(e.edge,f,p,m),c.edge=_b(f,t,null,m),e.edge=_b(t,p,null,m),Eb(n),Eb(e)}else c.edge=_b(n.site,c.site)}}function Ub(t,n){var e=t.site,r=e[0],i=e[1],o=i-n;if(!o)return r;var a=t.P;if(!a)return-1/0;var u=(e=a.site)[0],c=e[1],f=c-n;if(!f)return u;var s=u-r,l=1/o-1/f,h=s/f;return l?(-h+Math.sqrt(h*h-2*l*(s*s/(-2*f)-c+f/2+i-o/2)))/l+r:(r+u)/2}function Ob(t,n){var e=t.N;if(e)return Ub(e,n);var r=t.site;return r[1]===n?r[0]:1/0}var Bb,Fb,Yb,Ib,Hb=1e-6,jb=1e-12;function Vb(t,n,e){return(t[0]-e[0])*(n[1]-t[1])-(t[0]-n[0])*(e[1]-t[1])}function Xb(t,n){return n[1]-t[1]||n[0]-t[0]}function Gb(t,n){var e,r,i,o=t.sort(Xb).pop();for(Ib=[],Fb=new Array(t.length),Bb=new db,Yb=new db;;)if(i=Ab,o&&(!i||o[1]<i.y||o[1]===i.y&&o[0]<i.x))o[0]===e&&o[1]===r||(Lb(o),e=o[0],r=o[1]),o=t.pop();else{if(!i)break;qb(i.arc)}if(function(){for(var t,n,e,r,i=0,o=Fb.length;i<o;++i)if((t=Fb[i])&&(r=(n=t.halfedges).length)){var a=new Array(r),u=new Array(r);for(e=0;e<r;++e)a[e]=e,u[e]=Mb(t,Ib[n[e]]);for(a.sort(function(t,n){return u[n]-u[t]}),e=0;e<r;++e)u[e]=n[a[e]];for(e=0;e<r;++e)n[e]=u[e]}}(),n){var a=+n[0][0],u=+n[0][1],c=+n[1][0],f=+n[1][1];!function(t,n,e,r){for(var i,o=Ib.length;o--;)wb(i=Ib[o],t,n,e,r)&&xb(i,t,n,e,r)&&(Math.abs(i[0][0]-i[1][0])>Hb||Math.abs(i[0][1]-i[1][1])>Hb)||delete Ib[o]}(a,u,c,f),function(t,n,e,r){var i,o,a,u,c,f,s,l,h,d,p,v,g=Fb.length,y=!0;for(i=0;i<g;++i)if(o=Fb[i]){for(a=o.site,u=(c=o.halfedges).length;u--;)Ib[c[u]]||c.splice(u,1);for(u=0,f=c.length;u<f;)p=(d=Tb(o,Ib[c[u]]))[0],v=d[1],l=(s=Nb(o,Ib[c[++u%f]]))[0],h=s[1],(Math.abs(p-l)>Hb||Math.abs(v-h)>Hb)&&(c.splice(u,0,Ib.push(bb(a,d,Math.abs(p-t)<Hb&&r-v>Hb?[t,Math.abs(l-t)<Hb?h:r]:Math.abs(v-r)<Hb&&e-p>Hb?[Math.abs(h-r)<Hb?l:e,r]:Math.abs(p-e)<Hb&&v-n>Hb?[e,Math.abs(l-e)<Hb?h:n]:Math.abs(v-n)<Hb&&p-t>Hb?[Math.abs(h-n)<Hb?l:t,n]:null))-1),++f);f&&(y=!1)}if(y){var _,b,m,x=1/0;for(i=0,y=null;i<g;++i)(o=Fb[i])&&(m=(_=(a=o.site)[0]-t)*_+(b=a[1]-n)*b)<x&&(x=m,y=o);if(y){var w=[t,n],M=[t,r],N=[e,r],T=[e,n];y.halfedges.push(Ib.push(bb(a=y.site,w,M))-1,Ib.push(bb(a,M,N))-1,Ib.push(bb(a,N,T))-1,Ib.push(bb(a,T,w))-1)}}for(i=0;i<g;++i)(o=Fb[i])&&(o.halfedges.length||delete Fb[i])}(a,u,c,f)}this.edges=Ib,this.cells=Fb,Bb=Yb=Ib=Fb=null}function $b(t){return function(){return t}}function Wb(t,n,e){this.target=t,this.type=n,this.transform=e}function Zb(t,n,e){this.k=t,this.x=n,this.y=e}Gb.prototype={constructor:Gb,polygons:function(){var t=this.edges;return this.cells.map(function(n){var e=n.halfedges.map(function(e){return Nb(n,t[e])});return e.data=n.site.data,e})},triangles:function(){var t=[],n=this.edges;return this.cells.forEach(function(e,r){if(o=(i=e.halfedges).length)for(var i,o,a,u=e.site,c=-1,f=n[i[o-1]],s=f.left===u?f.right:f.left;++c<o;)a=s,s=(f=n[i[c]]).left===u?f.right:f.left,a&&s&&r<a.index&&r<s.index&&Vb(u,a,s)<0&&t.push([u.data,a.data,s.data])}),t},links:function(){return this.edges.filter(function(t){return t.right}).map(function(t){return{source:t.left.data,target:t.right.data}})},find:function(t,n,e){for(var r,i,o=this,a=o._found||0,u=o.cells.length;!(i=o.cells[a]);)if(++a>=u)return null;var c=t-i.site[0],f=n-i.site[1],s=c*c+f*f;do{i=o.cells[r=a],a=null,i.halfedges.forEach(function(e){var r=o.edges[e],u=r.left;if(u!==i.site&&u||(u=r.right)){var c=t-u[0],f=n-u[1],l=c*c+f*f;l<s&&(s=l,a=u.index)}})}while(null!==a);return o._found=r,null==e||s<=e*e?i.site:null}},Zb.prototype={constructor:Zb,scale:function(t){return 1===t?this:new Zb(this.k*t,this.x,this.y)},translate:function(t,n){return 0===t&0===n?this:new Zb(this.k,this.x+this.k*t,this.y+this.k*n)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return\"translate(\"+this.x+\",\"+this.y+\") scale(\"+this.k+\")\"}};var Qb=new Zb(1,0,0);function Kb(t){for(;!t.__zoom;)if(!(t=t.parentNode))return Qb;return t.__zoom}function Jb(){t.event.stopImmediatePropagation()}function tm(){t.event.preventDefault(),t.event.stopImmediatePropagation()}function nm(){return!t.event.ctrlKey&&!t.event.button}function em(){var t=this;return t instanceof SVGElement?(t=t.ownerSVGElement||t).hasAttribute(\"viewBox\")?[[(t=t.viewBox.baseVal).x,t.y],[t.x+t.width,t.y+t.height]]:[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]:[[0,0],[t.clientWidth,t.clientHeight]]}function rm(){return this.__zoom||Qb}function im(){return-t.event.deltaY*(1===t.event.deltaMode?.05:t.event.deltaMode?1:.002)}function om(){return navigator.maxTouchPoints||\"ontouchstart\"in this}function am(t,n,e){var r=t.invertX(n[0][0])-e[0][0],i=t.invertX(n[1][0])-e[1][0],o=t.invertY(n[0][1])-e[0][1],a=t.invertY(n[1][1])-e[1][1];return t.translate(i>r?(r+i)/2:Math.min(0,r)||Math.max(0,i),a>o?(o+a)/2:Math.min(0,o)||Math.max(0,a))}Kb.prototype=Zb.prototype,t.FormatSpecifier=Ba,t.active=function(t,n){var e,r,i=t.__transition;if(i)for(r in n=null==n?null:n+\"\",i)if((e=i[r]).state>xr&&e.name===n)return new Ur([[t]],yi,n,+r);return null},t.arc=function(){var t=Dy,n=qy,e=xy(0),r=null,i=Ly,o=Uy,a=Oy,u=null;function c(){var c,f,s=+t.apply(this,arguments),l=+n.apply(this,arguments),h=i.apply(this,arguments)-Py,d=o.apply(this,arguments)-Py,p=wy(d-h),v=d>h;if(u||(u=c=no()),l<s&&(f=l,l=s,s=f),l>Ey)if(p>zy-Ey)u.moveTo(l*Ny(h),l*Sy(h)),u.arc(0,0,l,h,d,!v),s>Ey&&(u.moveTo(s*Ny(d),s*Sy(d)),u.arc(0,0,s,d,h,v));else{var g,y,_=h,b=d,m=h,x=d,w=p,M=p,N=a.apply(this,arguments)/2,T=N>Ey&&(r?+r.apply(this,arguments):ky(s*s+l*l)),A=Ay(wy(l-s)/2,+e.apply(this,arguments)),S=A,k=A;if(T>Ey){var E=Ry(T/s*Sy(N)),C=Ry(T/l*Sy(N));(w-=2*E)>Ey?(m+=E*=v?1:-1,x-=E):(w=0,m=x=(h+d)/2),(M-=2*C)>Ey?(_+=C*=v?1:-1,b-=C):(M=0,_=b=(h+d)/2)}var P=l*Ny(_),z=l*Sy(_),R=s*Ny(x),D=s*Sy(x);if(A>Ey){var q,L=l*Ny(b),U=l*Sy(b),O=s*Ny(m),B=s*Sy(m);if(p<Cy&&(q=function(t,n,e,r,i,o,a,u){var c=e-t,f=r-n,s=a-i,l=u-o,h=l*c-s*f;if(!(h*h<Ey))return[t+(h=(s*(n-o)-l*(t-i))/h)*c,n+h*f]}(P,z,O,B,L,U,R,D))){var F=P-q[0],Y=z-q[1],I=L-q[0],H=U-q[1],j=1/Sy(function(t){return t>1?0:t<-1?Cy:Math.acos(t)}((F*I+Y*H)/(ky(F*F+Y*Y)*ky(I*I+H*H)))/2),V=ky(q[0]*q[0]+q[1]*q[1]);S=Ay(A,(s-V)/(j-1)),k=Ay(A,(l-V)/(j+1))}}M>Ey?k>Ey?(g=By(O,B,P,z,l,k,v),y=By(L,U,R,D,l,k,v),u.moveTo(g.cx+g.x01,g.cy+g.y01),k<A?u.arc(g.cx,g.cy,k,My(g.y01,g.x01),My(y.y01,y.x01),!v):(u.arc(g.cx,g.cy,k,My(g.y01,g.x01),My(g.y11,g.x11),!v),u.arc(0,0,l,My(g.cy+g.y11,g.cx+g.x11),My(y.cy+y.y11,y.cx+y.x11),!v),u.arc(y.cx,y.cy,k,My(y.y11,y.x11),My(y.y01,y.x01),!v))):(u.moveTo(P,z),u.arc(0,0,l,_,b,!v)):u.moveTo(P,z),s>Ey&&w>Ey?S>Ey?(g=By(R,D,L,U,s,-S,v),y=By(P,z,O,B,s,-S,v),u.lineTo(g.cx+g.x01,g.cy+g.y01),S<A?u.arc(g.cx,g.cy,S,My(g.y01,g.x01),My(y.y01,y.x01),!v):(u.arc(g.cx,g.cy,S,My(g.y01,g.x01),My(g.y11,g.x11),!v),u.arc(0,0,s,My(g.cy+g.y11,g.cx+g.x11),My(y.cy+y.y11,y.cx+y.x11),v),u.arc(y.cx,y.cy,S,My(y.y11,y.x11),My(y.y01,y.x01),!v))):u.arc(0,0,s,x,m,v):u.lineTo(R,D)}else u.moveTo(0,0);if(u.closePath(),c)return u=null,c+\"\"||null}return c.centroid=function(){var e=(+t.apply(this,arguments)+ +n.apply(this,arguments))/2,r=(+i.apply(this,arguments)+ +o.apply(this,arguments))/2-Cy/2;return[Ny(r)*e,Sy(r)*e]},c.innerRadius=function(n){return arguments.length?(t=\"function\"==typeof n?n:xy(+n),c):t},c.outerRadius=function(t){return arguments.length?(n=\"function\"==typeof t?t:xy(+t),c):n},c.cornerRadius=function(t){return arguments.length?(e=\"function\"==typeof t?t:xy(+t),c):e},c.padRadius=function(t){return arguments.length?(r=null==t?null:\"function\"==typeof t?t:xy(+t),c):r},c.startAngle=function(t){return arguments.length?(i=\"function\"==typeof t?t:xy(+t),c):i},c.endAngle=function(t){return arguments.length?(o=\"function\"==typeof t?t:xy(+t),c):o},c.padAngle=function(t){return arguments.length?(a=\"function\"==typeof t?t:xy(+t),c):a},c.context=function(t){return arguments.length?(u=null==t?null:t,c):u},c},t.area=Vy,t.areaRadial=Jy,t.ascending=n,t.autoType=function(t){for(var n in t){var e,r,i=t[n].trim();if(i)if(\"true\"===i)i=!0;else if(\"false\"===i)i=!1;else if(\"NaN\"===i)i=NaN;else if(isNaN(e=+i)){if(!(r=i.match(/^([-+]\\d{2})?\\d{4}(-\\d{2}(-\\d{2})?)?(T\\d{2}:\\d{2}(:\\d{2}(\\.\\d{3})?)?(Z|[-+]\\d{2}:\\d{2})?)?$/)))continue;ra&&r[4]&&!r[7]&&(i=i.replace(/-/g,\"/\").replace(/T/,\" \")),i=new Date(i)}else i=e;else i=null;t[n]=i}return t},t.axisBottom=function(t){return F(D,t)},t.axisLeft=function(t){return F(q,t)},t.axisRight=function(t){return F(R,t)},t.axisTop=function(t){return F(z,t)},t.bisect=i,t.bisectLeft=o,t.bisectRight=i,t.bisector=e,t.blob=function(t,n){return fetch(t,n).then(ia)},t.brush=function(){return Yi(Ci)},t.brushSelection=function(t){var n=t.__brush;return n?n.dim.output(n.selection):null},t.brushX=function(){return Yi(ki)},t.brushY=function(){return Yi(Ei)},t.buffer=function(t,n){return fetch(t,n).then(oa)},t.chord=function(){var t=0,n=null,e=null,r=null;function i(i){var o,a,u,c,f,s,l=i.length,h=[],d=g(l),p=[],v=[],y=v.groups=new Array(l),_=new Array(l*l);for(o=0,f=-1;++f<l;){for(a=0,s=-1;++s<l;)a+=i[f][s];h.push(a),p.push(g(l)),o+=a}for(n&&d.sort(function(t,e){return n(h[t],h[e])}),e&&p.forEach(function(t,n){t.sort(function(t,r){return e(i[n][t],i[n][r])})}),c=(o=Gi(0,Xi-t*l)/o)?t:Xi/l,a=0,f=-1;++f<l;){for(u=a,s=-1;++s<l;){var b=d[f],m=p[b][s],x=i[b][m],w=a,M=a+=x*o;_[m*l+b]={index:b,subindex:m,startAngle:w,endAngle:M,value:x}}y[b]={index:b,startAngle:u,endAngle:a,value:h[b]},a+=c}for(f=-1;++f<l;)for(s=f-1;++s<l;){var N=_[s*l+f],T=_[f*l+s];(N.value||T.value)&&v.push(N.value<T.value?{source:T,target:N}:{source:N,target:T})}return r?v.sort(r):v}return i.padAngle=function(n){return arguments.length?(t=Gi(0,n),i):t},i.sortGroups=function(t){return arguments.length?(n=t,i):n},i.sortSubgroups=function(t){return arguments.length?(e=t,i):e},i.sortChords=function(t){return arguments.length?(null==t?r=null:(r=$i(t))._=t,i):r&&r._},i},t.clientPoint=Ot,t.cluster=function(){var t=Tl,n=1,e=1,r=!1;function i(i){var o,a=0;i.eachAfter(function(n){var e=n.children;e?(n.x=function(t){return t.reduce(Al,0)/t.length}(e),n.y=function(t){return 1+t.reduce(Sl,0)}(e)):(n.x=o?a+=t(n,o):0,n.y=0,o=n)});var u=function(t){for(var n;n=t.children;)t=n[0];return t}(i),c=function(t){for(var n;n=t.children;)t=n[n.length-1];return t}(i),f=u.x-t(u,c)/2,s=c.x+t(c,u)/2;return i.eachAfter(r?function(t){t.x=(t.x-i.x)*n,t.y=(i.y-t.y)*e}:function(t){t.x=(t.x-f)/(s-f)*n,t.y=(1-(i.y?t.y/i.y:1))*e})}return i.separation=function(n){return arguments.length?(t=n,i):t},i.size=function(t){return arguments.length?(r=!1,n=+t[0],e=+t[1],i):r?null:[n,e]},i.nodeSize=function(t){return arguments.length?(r=!0,n=+t[0],e=+t[1],i):r?[n,e]:null},i},t.color=pn,t.contourDensity=function(){var t=ko,n=Eo,e=Co,r=960,i=500,o=20,a=2,u=3*o,c=r+2*u>>a,f=i+2*u>>a,s=bo(20);function l(r){var i=new Float32Array(c*f),l=new Float32Array(c*f);r.forEach(function(r,o,s){var l=+t(r,o,s)+u>>a,h=+n(r,o,s)+u>>a,d=+e(r,o,s);l>=0&&l<c&&h>=0&&h<f&&(i[l+h*c]+=d)}),Ao({width:c,height:f,data:i},{width:c,height:f,data:l},o>>a),So({width:c,height:f,data:l},{width:c,height:f,data:i},o>>a),Ao({width:c,height:f,data:i},{width:c,height:f,data:l},o>>a),So({width:c,height:f,data:l},{width:c,height:f,data:i},o>>a),Ao({width:c,height:f,data:i},{width:c,height:f,data:l},o>>a),So({width:c,height:f,data:l},{width:c,height:f,data:i},o>>a);var d=s(i);if(!Array.isArray(d)){var p=T(i);d=w(0,p,d),(d=g(0,Math.floor(p/d)*d,d)).shift()}return To().thresholds(d).size([c,f])(i).map(h)}function h(t){return t.value*=Math.pow(2,-2*a),t.coordinates.forEach(d),t}function d(t){t.forEach(p)}function p(t){t.forEach(v)}function v(t){t[0]=t[0]*Math.pow(2,a)-u,t[1]=t[1]*Math.pow(2,a)-u}function y(){return c=r+2*(u=3*o)>>a,f=i+2*u>>a,l}return l.x=function(n){return arguments.length?(t=\"function\"==typeof n?n:bo(+n),l):t},l.y=function(t){return arguments.length?(n=\"function\"==typeof t?t:bo(+t),l):n},l.weight=function(t){return arguments.length?(e=\"function\"==typeof t?t:bo(+t),l):e},l.size=function(t){if(!arguments.length)return[r,i];var n=Math.ceil(t[0]),e=Math.ceil(t[1]);if(!(n>=0||n>=0))throw new Error(\"invalid size\");return r=n,i=e,y()},l.cellSize=function(t){if(!arguments.length)return 1<<a;if(!((t=+t)>=1))throw new Error(\"invalid cell size\");return a=Math.floor(Math.log(t)/Math.LN2),y()},l.thresholds=function(t){return arguments.length?(s=\"function\"==typeof t?t:Array.isArray(t)?bo(yo.call(t)):bo(t),l):s},l.bandwidth=function(t){if(!arguments.length)return Math.sqrt(o*(o+1));if(!((t=+t)>=0))throw new Error(\"invalid bandwidth\");return o=Math.round((Math.sqrt(4*t*t+1)-1)/2),y()},l},t.contours=To,t.create=function(t){return Rt(Z(t).call(document.documentElement))},t.creator=Z,t.cross=function(t,n,e){var r,i,o,u,c=t.length,f=n.length,s=new Array(c*f);for(null==e&&(e=a),r=o=0;r<c;++r)for(u=t[r],i=0;i<f;++i,++o)s[o]=e(u,n[i]);return s},t.csv=fa,t.csvFormat=jo,t.csvFormatBody=Vo,t.csvFormatRow=Go,t.csvFormatRows=Xo,t.csvFormatValue=$o,t.csvParse=Io,t.csvParseRows=Ho,t.cubehelix=ee,t.curveBasis=function(t){return new S_(t)},t.curveBasisClosed=function(t){return new k_(t)},t.curveBasisOpen=function(t){return new E_(t)},t.curveBundle=P_,t.curveCardinal=D_,t.curveCardinalClosed=L_,t.curveCardinalOpen=O_,t.curveCatmullRom=Y_,t.curveCatmullRomClosed=H_,t.curveCatmullRomOpen=V_,t.curveLinear=Yy,t.curveLinearClosed=function(t){return new X_(t)},t.curveMonotoneX=function(t){return new Q_(t)},t.curveMonotoneY=function(t){return new K_(t)},t.curveNatural=function(t){return new tb(t)},t.curveStep=function(t){return new eb(t,.5)},t.curveStepAfter=function(t){return new eb(t,1)},t.curveStepBefore=function(t){return new eb(t,0)},t.customEvent=kt,t.descending=function(t,n){return n<t?-1:n>t?1:n>=t?0:NaN},t.deviation=f,t.dispatch=I,t.drag=function(){var n,e,r,i,o=Gt,a=$t,u=Wt,c=Zt,f={},s=I(\"start\",\"drag\",\"end\"),l=0,h=0;function d(t){t.on(\"mousedown.drag\",p).filter(c).on(\"touchstart.drag\",y).on(\"touchmove.drag\",_).on(\"touchend.drag touchcancel.drag\",b).style(\"touch-action\",\"none\").style(\"-webkit-tap-highlight-color\",\"rgba(0,0,0,0)\")}function p(){if(!i&&o.apply(this,arguments)){var u=m(\"mouse\",a.apply(this,arguments),Bt,this,arguments);u&&(Rt(t.event.view).on(\"mousemove.drag\",v,!0).on(\"mouseup.drag\",g,!0),Ht(t.event.view),Yt(),r=!1,n=t.event.clientX,e=t.event.clientY,u(\"start\"))}}function v(){if(It(),!r){var i=t.event.clientX-n,o=t.event.clientY-e;r=i*i+o*o>h}f.mouse(\"drag\")}function g(){Rt(t.event.view).on(\"mousemove.drag mouseup.drag\",null),jt(t.event.view,r),It(),f.mouse(\"end\")}function y(){if(o.apply(this,arguments)){var n,e,r=t.event.changedTouches,i=a.apply(this,arguments),u=r.length;for(n=0;n<u;++n)(e=m(r[n].identifier,i,Ft,this,arguments))&&(Yt(),e(\"start\"))}}function _(){var n,e,r=t.event.changedTouches,i=r.length;for(n=0;n<i;++n)(e=f[r[n].identifier])&&(It(),e(\"drag\"))}function b(){var n,e,r=t.event.changedTouches,o=r.length;for(i&&clearTimeout(i),i=setTimeout(function(){i=null},500),n=0;n<o;++n)(e=f[r[n].identifier])&&(Yt(),e(\"end\"))}function m(n,e,r,i,o){var a,c,h,p=r(e,n),v=s.copy();if(kt(new Xt(d,\"beforestart\",a,n,l,p[0],p[1],0,0,v),function(){return null!=(t.event.subject=a=u.apply(i,o))&&(c=a.x-p[0]||0,h=a.y-p[1]||0,!0)}))return function t(u){var s,g=p;switch(u){case\"start\":f[n]=t,s=l++;break;case\"end\":delete f[n],--l;case\"drag\":p=r(e,n),s=l}kt(new Xt(d,u,a,n,s,p[0]+c,p[1]+h,p[0]-g[0],p[1]-g[1],v),v.apply,v,[u,i,o])}}return d.filter=function(t){return arguments.length?(o=\"function\"==typeof t?t:Vt(!!t),d):o},d.container=function(t){return arguments.length?(a=\"function\"==typeof t?t:Vt(t),d):a},d.subject=function(t){return arguments.length?(u=\"function\"==typeof t?t:Vt(t),d):u},d.touchable=function(t){return arguments.length?(c=\"function\"==typeof t?t:Vt(!!t),d):c},d.on=function(){var t=s.on.apply(s,arguments);return t===s?d:t},d.clickDistance=function(t){return arguments.length?(h=(t=+t)*t,d):Math.sqrt(h)},d},t.dragDisable=Ht,t.dragEnable=jt,t.dsv=function(t,n,e,r){3===arguments.length&&\"function\"==typeof e&&(r=e,e=void 0);var i=Fo(t);return ua(n,e).then(function(t){return i.parse(t,r)})},t.dsvFormat=Fo,t.easeBack=si,t.easeBackIn=ci,t.easeBackInOut=si,t.easeBackOut=fi,t.easeBounce=ui,t.easeBounceIn=function(t){return 1-ui(1-t)},t.easeBounceInOut=function(t){return((t*=2)<=1?1-ui(1-t):ui(t-1)+1)/2},t.easeBounceOut=ui,t.easeCircle=Zr,t.easeCircleIn=function(t){return 1-Math.sqrt(1-t*t)},t.easeCircleInOut=Zr,t.easeCircleOut=function(t){return Math.sqrt(1- --t*t)},t.easeCubic=Ir,t.easeCubicIn=function(t){return t*t*t},t.easeCubicInOut=Ir,t.easeCubicOut=function(t){return--t*t*t+1},t.easeElastic=di,t.easeElasticIn=hi,t.easeElasticInOut=pi,t.easeElasticOut=di,t.easeExp=Wr,t.easeExpIn=function(t){return Math.pow(2,10*t-10)},t.easeExpInOut=Wr,t.easeExpOut=function(t){return 1-Math.pow(2,-10*t)},t.easeLinear=function(t){return+t},t.easePoly=Vr,t.easePolyIn=Hr,t.easePolyInOut=Vr,t.easePolyOut=jr,t.easeQuad=Yr,t.easeQuadIn=function(t){return t*t},t.easeQuadInOut=Yr,t.easeQuadOut=function(t){return t*(2-t)},t.easeSin=$r,t.easeSinIn=function(t){return 1-Math.cos(t*Gr)},t.easeSinInOut=$r,t.easeSinOut=function(t){return Math.sin(t*Gr)},t.entries=function(t){var n=[];for(var e in t)n.push({key:e,value:t[e]});return n},t.extent=s,t.forceCenter=function(t,n){var e;function r(){var r,i,o=e.length,a=0,u=0;for(r=0;r<o;++r)a+=(i=e[r]).x,u+=i.y;for(a=a/o-t,u=u/o-n,r=0;r<o;++r)(i=e[r]).x-=a,i.y-=u}return null==t&&(t=0),null==n&&(n=0),r.initialize=function(t){e=t},r.x=function(n){return arguments.length?(t=+n,r):t},r.y=function(t){return arguments.length?(n=+t,r):n},r},t.forceCollide=function(t){var n,e,r=1,i=1;function o(){for(var t,o,u,c,f,s,l,h=n.length,d=0;d<i;++d)for(o=wa(n,Aa,Sa).visitAfter(a),t=0;t<h;++t)u=n[t],s=e[u.index],l=s*s,c=u.x+u.vx,f=u.y+u.vy,o.visit(p);function p(t,n,e,i,o){var a=t.data,h=t.r,d=s+h;if(!a)return n>c+d||i<c-d||e>f+d||o<f-d;if(a.index>u.index){var p=c-a.x-a.vx,v=f-a.y-a.vy,g=p*p+v*v;g<d*d&&(0===p&&(g+=(p=ya())*p),0===v&&(g+=(v=ya())*v),g=(d-(g=Math.sqrt(g)))/g*r,u.vx+=(p*=g)*(d=(h*=h)/(l+h)),u.vy+=(v*=g)*d,a.vx-=p*(d=1-d),a.vy-=v*d)}}}function a(t){if(t.data)return t.r=e[t.data.index];for(var n=t.r=0;n<4;++n)t[n]&&t[n].r>t.r&&(t.r=t[n].r)}function u(){if(n){var r,i,o=n.length;for(e=new Array(o),r=0;r<o;++r)i=n[r],e[i.index]=+t(i,r,n)}}return\"function\"!=typeof t&&(t=ga(null==t?1:+t)),o.initialize=function(t){n=t,u()},o.iterations=function(t){return arguments.length?(i=+t,o):i},o.strength=function(t){return arguments.length?(r=+t,o):r},o.radius=function(n){return arguments.length?(t=\"function\"==typeof n?n:ga(+n),u(),o):t},o},t.forceLink=function(t){var n,e,r,i,o,a=ka,u=function(t){return 1/Math.min(i[t.source.index],i[t.target.index])},c=ga(30),f=1;function s(r){for(var i=0,a=t.length;i<f;++i)for(var u,c,s,l,h,d,p,v=0;v<a;++v)c=(u=t[v]).source,l=(s=u.target).x+s.vx-c.x-c.vx||ya(),h=s.y+s.vy-c.y-c.vy||ya(),l*=d=((d=Math.sqrt(l*l+h*h))-e[v])/d*r*n[v],h*=d,s.vx-=l*(p=o[v]),s.vy-=h*p,c.vx+=l*(p=1-p),c.vy+=h*p}function l(){if(r){var u,c,f=r.length,s=t.length,l=co(r,a);for(u=0,i=new Array(f);u<s;++u)(c=t[u]).index=u,\"object\"!=typeof c.source&&(c.source=Ea(l,c.source)),\"object\"!=typeof c.target&&(c.target=Ea(l,c.target)),i[c.source.index]=(i[c.source.index]||0)+1,i[c.target.index]=(i[c.target.index]||0)+1;for(u=0,o=new Array(s);u<s;++u)c=t[u],o[u]=i[c.source.index]/(i[c.source.index]+i[c.target.index]);n=new Array(s),h(),e=new Array(s),d()}}function h(){if(r)for(var e=0,i=t.length;e<i;++e)n[e]=+u(t[e],e,t)}function d(){if(r)for(var n=0,i=t.length;n<i;++n)e[n]=+c(t[n],n,t)}return null==t&&(t=[]),s.initialize=function(t){r=t,l()},s.links=function(n){return arguments.length?(t=n,l(),s):t},s.id=function(t){return arguments.length?(a=t,s):a},s.iterations=function(t){return arguments.length?(f=+t,s):f},s.strength=function(t){return arguments.length?(u=\"function\"==typeof t?t:ga(+t),h(),s):u},s.distance=function(t){return arguments.length?(c=\"function\"==typeof t?t:ga(+t),d(),s):c},s},t.forceManyBody=function(){var t,n,e,r,i=ga(-30),o=1,a=1/0,u=.81;function c(r){var i,o=t.length,a=wa(t,Ca,Pa).visitAfter(s);for(e=r,i=0;i<o;++i)n=t[i],a.visit(l)}function f(){if(t){var n,e,o=t.length;for(r=new Array(o),n=0;n<o;++n)e=t[n],r[e.index]=+i(e,n,t)}}function s(t){var n,e,i,o,a,u=0,c=0;if(t.length){for(i=o=a=0;a<4;++a)(n=t[a])&&(e=Math.abs(n.value))&&(u+=n.value,c+=e,i+=e*n.x,o+=e*n.y);t.x=i/c,t.y=o/c}else{(n=t).x=n.data.x,n.y=n.data.y;do{u+=r[n.data.index]}while(n=n.next)}t.value=u}function l(t,i,c,f){if(!t.value)return!0;var s=t.x-n.x,l=t.y-n.y,h=f-i,d=s*s+l*l;if(h*h/u<d)return d<a&&(0===s&&(d+=(s=ya())*s),0===l&&(d+=(l=ya())*l),d<o&&(d=Math.sqrt(o*d)),n.vx+=s*t.value*e/d,n.vy+=l*t.value*e/d),!0;if(!(t.length||d>=a)){(t.data!==n||t.next)&&(0===s&&(d+=(s=ya())*s),0===l&&(d+=(l=ya())*l),d<o&&(d=Math.sqrt(o*d)));do{t.data!==n&&(h=r[t.data.index]*e/d,n.vx+=s*h,n.vy+=l*h)}while(t=t.next)}}return c.initialize=function(n){t=n,f()},c.strength=function(t){return arguments.length?(i=\"function\"==typeof t?t:ga(+t),f(),c):i},c.distanceMin=function(t){return arguments.length?(o=t*t,c):Math.sqrt(o)},c.distanceMax=function(t){return arguments.length?(a=t*t,c):Math.sqrt(a)},c.theta=function(t){return arguments.length?(u=t*t,c):Math.sqrt(u)},c},t.forceRadial=function(t,n,e){var r,i,o,a=ga(.1);function u(t){for(var a=0,u=r.length;a<u;++a){var c=r[a],f=c.x-n||1e-6,s=c.y-e||1e-6,l=Math.sqrt(f*f+s*s),h=(o[a]-l)*i[a]*t/l;c.vx+=f*h,c.vy+=s*h}}function c(){if(r){var n,e=r.length;for(i=new Array(e),o=new Array(e),n=0;n<e;++n)o[n]=+t(r[n],n,r),i[n]=isNaN(o[n])?0:+a(r[n],n,r)}}return\"function\"!=typeof t&&(t=ga(+t)),null==n&&(n=0),null==e&&(e=0),u.initialize=function(t){r=t,c()},u.strength=function(t){return arguments.length?(a=\"function\"==typeof t?t:ga(+t),c(),u):a},u.radius=function(n){return arguments.length?(t=\"function\"==typeof n?n:ga(+n),c(),u):t},u.x=function(t){return arguments.length?(n=+t,u):n},u.y=function(t){return arguments.length?(e=+t,u):e},u},t.forceSimulation=function(t){var n,e=1,r=.001,i=1-Math.pow(r,1/300),o=0,a=.6,u=co(),c=hr(s),f=I(\"tick\",\"end\");function s(){l(),f.call(\"tick\",n),e<r&&(c.stop(),f.call(\"end\",n))}function l(r){var c,f,s=t.length;void 0===r&&(r=1);for(var l=0;l<r;++l)for(e+=(o-e)*i,u.each(function(t){t(e)}),c=0;c<s;++c)null==(f=t[c]).fx?f.x+=f.vx*=a:(f.x=f.fx,f.vx=0),null==f.fy?f.y+=f.vy*=a:(f.y=f.fy,f.vy=0);return n}function h(){for(var n,e=0,r=t.length;e<r;++e){if((n=t[e]).index=e,null!=n.fx&&(n.x=n.fx),null!=n.fy&&(n.y=n.fy),isNaN(n.x)||isNaN(n.y)){var i=za*Math.sqrt(e),o=e*Ra;n.x=i*Math.cos(o),n.y=i*Math.sin(o)}(isNaN(n.vx)||isNaN(n.vy))&&(n.vx=n.vy=0)}}function d(n){return n.initialize&&n.initialize(t),n}return null==t&&(t=[]),h(),n={tick:l,restart:function(){return c.restart(s),n},stop:function(){return c.stop(),n},nodes:function(e){return arguments.length?(t=e,h(),u.each(d),n):t},alpha:function(t){return arguments.length?(e=+t,n):e},alphaMin:function(t){return arguments.length?(r=+t,n):r},alphaDecay:function(t){return arguments.length?(i=+t,n):+i},alphaTarget:function(t){return arguments.length?(o=+t,n):o},velocityDecay:function(t){return arguments.length?(a=1-t,n):1-a},force:function(t,e){return arguments.length>1?(null==e?u.remove(t):u.set(t,d(e)),n):u.get(t)},find:function(n,e,r){var i,o,a,u,c,f=0,s=t.length;for(null==r?r=1/0:r*=r,f=0;f<s;++f)(a=(i=n-(u=t[f]).x)*i+(o=e-u.y)*o)<r&&(c=u,r=a);return c},on:function(t,e){return arguments.length>1?(f.on(t,e),n):f.on(t)}}},t.forceX=function(t){var n,e,r,i=ga(.1);function o(t){for(var i,o=0,a=n.length;o<a;++o)(i=n[o]).vx+=(r[o]-i.x)*e[o]*t}function a(){if(n){var o,a=n.length;for(e=new Array(a),r=new Array(a),o=0;o<a;++o)e[o]=isNaN(r[o]=+t(n[o],o,n))?0:+i(n[o],o,n)}}return\"function\"!=typeof t&&(t=ga(null==t?0:+t)),o.initialize=function(t){n=t,a()},o.strength=function(t){return arguments.length?(i=\"function\"==typeof t?t:ga(+t),a(),o):i},o.x=function(n){return arguments.length?(t=\"function\"==typeof n?n:ga(+n),a(),o):t},o},t.forceY=function(t){var n,e,r,i=ga(.1);function o(t){for(var i,o=0,a=n.length;o<a;++o)(i=n[o]).vy+=(r[o]-i.y)*e[o]*t}function a(){if(n){var o,a=n.length;for(e=new Array(a),r=new Array(a),o=0;o<a;++o)e[o]=isNaN(r[o]=+t(n[o],o,n))?0:+i(n[o],o,n)}}return\"function\"!=typeof t&&(t=ga(null==t?0:+t)),o.initialize=function(t){n=t,a()},o.strength=function(t){return arguments.length?(i=\"function\"==typeof t?t:ga(+t),a(),o):i},o.y=function(n){return arguments.length?(t=\"function\"==typeof n?n:ga(+n),a(),o):t},o},t.formatDefaultLocale=Ga,t.formatLocale=Xa,t.formatSpecifier=Oa,t.geoAlbers=el,t.geoAlbersUsa=function(){var t,n,e,r,i,o,a=el(),u=nl().rotate([154,0]).center([-2,58.5]).parallels([55,65]),c=nl().rotate([157,0]).center([-3,19.9]).parallels([8,18]),f={point:function(t,n){o=[t,n]}};function s(t){var n=t[0],a=t[1];return o=null,e.point(n,a),o||(r.point(n,a),o)||(i.point(n,a),o)}function l(){return t=n=null,s}return s.invert=function(t){var n=a.scale(),e=a.translate(),r=(t[0]-e[0])/n,i=(t[1]-e[1])/n;return(i>=.12&&i<.234&&r>=-.425&&r<-.214?u:i>=.166&&i<.234&&r>=-.214&&r<-.115?c:a).invert(t)},s.stream=function(e){return t&&n===e?t:(r=[a.stream(n=e),u.stream(e),c.stream(e)],i=r.length,t={point:function(t,n){for(var e=-1;++e<i;)r[e].point(t,n)},sphere:function(){for(var t=-1;++t<i;)r[t].sphere()},lineStart:function(){for(var t=-1;++t<i;)r[t].lineStart()},lineEnd:function(){for(var t=-1;++t<i;)r[t].lineEnd()},polygonStart:function(){for(var t=-1;++t<i;)r[t].polygonStart()},polygonEnd:function(){for(var t=-1;++t<i;)r[t].polygonEnd()}});var r,i},s.precision=function(t){return arguments.length?(a.precision(t),u.precision(t),c.precision(t),l()):a.precision()},s.scale=function(t){return arguments.length?(a.scale(t),u.scale(.35*t),c.scale(t),s.translate(a.translate())):a.scale()},s.translate=function(t){if(!arguments.length)return a.translate();var n=a.scale(),o=+t[0],s=+t[1];return e=a.translate(t).clipExtent([[o-.455*n,s-.238*n],[o+.455*n,s+.238*n]]).stream(f),r=u.translate([o-.307*n,s+.201*n]).clipExtent([[o-.425*n+nu,s+.12*n+nu],[o-.214*n-nu,s+.234*n-nu]]).stream(f),i=c.translate([o-.205*n,s+.212*n]).clipExtent([[o-.214*n+nu,s+.166*n+nu],[o-.115*n-nu,s+.234*n-nu]]).stream(f),l()},s.fitExtent=function(t,n){return Is(s,t,n)},s.fitSize=function(t,n){return Hs(s,t,n)},s.fitWidth=function(t,n){return js(s,t,n)},s.fitHeight=function(t,n){return Vs(s,t,n)},s.scale(1070)},t.geoArea=function(t){return Uu.reset(),Cu(t,Ou),2*Uu},t.geoAzimuthalEqualArea=function(){return Qs(ol).scale(124.75).clipAngle(179.999)},t.geoAzimuthalEqualAreaRaw=ol,t.geoAzimuthalEquidistant=function(){return Qs(al).scale(79.4188).clipAngle(179.999)},t.geoAzimuthalEquidistantRaw=al,t.geoBounds=function(t){var n,e,r,i,o,a,u;if(Ju=Ku=-(Zu=Qu=1/0),ic=[],Cu(t,Mc),e=ic.length){for(ic.sort(zc),n=1,o=[r=ic[0]];n<e;++n)Rc(r,(i=ic[n])[0])||Rc(r,i[1])?(Pc(r[0],i[1])>Pc(r[0],r[1])&&(r[1]=i[1]),Pc(i[0],r[1])>Pc(r[0],r[1])&&(r[0]=i[0])):o.push(r=i);for(a=-1/0,n=0,r=o[e=o.length-1];n<=e;r=i,++n)i=o[n],(u=Pc(r[1],i[0]))>a&&(a=u,Zu=i[0],Ku=r[1])}return ic=oc=null,Zu===1/0||Qu===1/0?[[NaN,NaN],[NaN,NaN]]:[[Zu,Qu],[Ku,Ju]]},t.geoCentroid=function(t){ac=uc=cc=fc=sc=lc=hc=dc=pc=vc=gc=0,Cu(t,Dc);var n=pc,e=vc,r=gc,i=n*n+e*e+r*r;return i<eu&&(n=lc,e=hc,r=dc,uc<nu&&(n=cc,e=fc,r=sc),(i=n*n+e*e+r*r)<eu)?[NaN,NaN]:[lu(e,n)*uu,wu(r/bu(i))*uu]},t.geoCircle=function(){var t,n,e=Vc([0,0]),r=Vc(90),i=Vc(6),o={point:function(e,r){t.push(e=n(e,r)),e[0]*=uu,e[1]*=uu}};function a(){var a=e.apply(this,arguments),u=r.apply(this,arguments)*cu,c=i.apply(this,arguments)*cu;return t=[],n=$c(-a[0]*cu,-a[1]*cu,0).invert,Jc(o,u,c,1),a={type:\"Polygon\",coordinates:[t]},t=n=null,a}return a.center=function(t){return arguments.length?(e=\"function\"==typeof t?t:Vc([+t[0],+t[1]]),a):e},a.radius=function(t){return arguments.length?(r=\"function\"==typeof t?t:Vc(+t),a):r},a.precision=function(t){return arguments.length?(i=\"function\"==typeof t?t:Vc(+t),a):i},a},t.geoClipAntimeridian=df,t.geoClipCircle=pf,t.geoClipExtent=function(){var t,n,e,r=0,i=0,o=960,a=500;return e={stream:function(e){return t&&n===e?t:t=yf(r,i,o,a)(n=e)},extent:function(u){return arguments.length?(r=+u[0][0],i=+u[0][1],o=+u[1][0],a=+u[1][1],t=n=null,e):[[r,i],[o,a]]}}},t.geoClipRectangle=yf,t.geoConicConformal=function(){return Js(sl).scale(109.5).parallels([30,30])},t.geoConicConformalRaw=sl,t.geoConicEqualArea=nl,t.geoConicEqualAreaRaw=tl,t.geoConicEquidistant=function(){return Js(hl).scale(131.154).center([0,13.9389])},t.geoConicEquidistantRaw=hl,t.geoContains=function(t,n){return(t&&Cf.hasOwnProperty(t.type)?Cf[t.type]:zf)(t,n)},t.geoDistance=Ef,t.geoEqualEarth=function(){return Qs(_l).scale(177.158)},t.geoEqualEarthRaw=_l,t.geoEquirectangular=function(){return Qs(ll).scale(152.63)},t.geoEquirectangularRaw=ll,t.geoGnomonic=function(){return Qs(bl).scale(144.049).clipAngle(60)},t.geoGnomonicRaw=bl,t.geoGraticule=Ff,t.geoGraticule10=function(){return Ff()()},t.geoIdentity=function(){var t,n,e,r,i,o,a=1,u=0,c=0,f=1,s=1,l=Yf,h=null,d=Yf;function p(){return r=i=null,o}return o={stream:function(t){return r&&i===t?r:r=l(d(i=t))},postclip:function(r){return arguments.length?(d=r,h=t=n=e=null,p()):d},clipExtent:function(r){return arguments.length?(d=null==r?(h=t=n=e=null,Yf):yf(h=+r[0][0],t=+r[0][1],n=+r[1][0],e=+r[1][1]),p()):null==h?null:[[h,t],[n,e]]},scale:function(t){return arguments.length?(l=ml((a=+t)*f,a*s,u,c),p()):a},translate:function(t){return arguments.length?(l=ml(a*f,a*s,u=+t[0],c=+t[1]),p()):[u,c]},reflectX:function(t){return arguments.length?(l=ml(a*(f=t?-1:1),a*s,u,c),p()):f<0},reflectY:function(t){return arguments.length?(l=ml(a*f,a*(s=t?-1:1),u,c),p()):s<0},fitExtent:function(t,n){return Is(o,t,n)},fitSize:function(t,n){return Hs(o,t,n)},fitWidth:function(t,n){return js(o,t,n)},fitHeight:function(t,n){return Vs(o,t,n)}}},t.geoInterpolate=function(t,n){var e=t[0]*cu,r=t[1]*cu,i=n[0]*cu,o=n[1]*cu,a=hu(r),u=yu(r),c=hu(o),f=yu(o),s=a*hu(e),l=a*yu(e),h=c*hu(i),d=c*yu(i),p=2*wu(bu(Mu(o-r)+a*c*Mu(i-e))),v=yu(p),g=p?function(t){var n=yu(t*=p)/v,e=yu(p-t)/v,r=e*s+n*h,i=e*l+n*d,o=e*u+n*f;return[lu(i,r)*uu,lu(o,bu(r*r+i*i))*uu]}:function(){return[e*uu,r*uu]};return g.distance=p,g},t.geoLength=Af,t.geoMercator=function(){return cl(ul).scale(961/au)},t.geoMercatorRaw=ul,t.geoNaturalEarth1=function(){return Qs(xl).scale(175.295)},t.geoNaturalEarth1Raw=xl,t.geoOrthographic=function(){return Qs(wl).scale(249.5).clipAngle(90+nu)},t.geoOrthographicRaw=wl,t.geoPath=function(t,n){var e,r,i=4.5;function o(t){return t&&(\"function\"==typeof i&&r.pointRadius(+i.apply(this,arguments)),Cu(t,e(r))),r.result()}return o.area=function(t){return Cu(t,e($f)),$f.result()},o.measure=function(t){return Cu(t,e(Ds)),Ds.result()},o.bounds=function(t){return Cu(t,e(rs)),rs.result()},o.centroid=function(t){return Cu(t,e(ys)),ys.result()},o.projection=function(n){return arguments.length?(e=null==n?(t=null,Yf):(t=n).stream,o):t},o.context=function(t){return arguments.length?(r=null==t?(n=null,new Us):new Ss(n=t),\"function\"!=typeof i&&r.pointRadius(i),o):n},o.pointRadius=function(t){return arguments.length?(i=\"function\"==typeof t?t:(r.pointRadius(+t),+t),o):i},o.projection(t).context(n)},t.geoProjection=Qs,t.geoProjectionMutator=Ks,t.geoRotation=Kc,t.geoStereographic=function(){return Qs(Ml).scale(250).clipAngle(142)},t.geoStereographicRaw=Ml,t.geoStream=Cu,t.geoTransform=function(t){return{stream:Bs(t)}},t.geoTransverseMercator=function(){var t=cl(Nl),n=t.center,e=t.rotate;return t.center=function(t){return arguments.length?n([-t[1],t[0]]):[(t=n())[1],-t[0]]},t.rotate=function(t){return arguments.length?e([t[0],t[1],t.length>2?t[2]+90:90]):[(t=e())[0],t[1],t[2]-90]},e([0,0,90]).scale(159.155)},t.geoTransverseMercatorRaw=Nl,t.gray=function(t,n){return new Bn(t,0,0,null==n?1:n)},t.hcl=Vn,t.hierarchy=El,t.histogram=function(){var t=v,n=s,e=M;function r(r){var o,a,u=r.length,c=new Array(u);for(o=0;o<u;++o)c[o]=t(r[o],o,r);var f=n(c),s=f[0],l=f[1],h=e(c,s,l);Array.isArray(h)||(h=w(s,l,h),h=g(Math.ceil(s/h)*h,l,h));for(var d=h.length;h[0]<=s;)h.shift(),--d;for(;h[d-1]>l;)h.pop(),--d;var p,v=new Array(d+1);for(o=0;o<=d;++o)(p=v[o]=[]).x0=o>0?h[o-1]:s,p.x1=o<d?h[o]:l;for(o=0;o<u;++o)s<=(a=c[o])&&a<=l&&v[i(h,a,0,d)].push(r[o]);return v}return r.value=function(n){return arguments.length?(t=\"function\"==typeof n?n:p(n),r):t},r.domain=function(t){return arguments.length?(n=\"function\"==typeof t?t:p([t[0],t[1]]),r):n},r.thresholds=function(t){return arguments.length?(e=\"function\"==typeof t?t:Array.isArray(t)?p(h.call(t)):p(t),r):e},r},t.hsl=Tn,t.html=pa,t.image=function(t,n){return new Promise(function(e,r){var i=new Image;for(var o in n)i[o]=n[o];i.onerror=r,i.onload=function(){e(i)},i.src=t})},t.interpolate=Te,t.interpolateArray=function(t,n){return(ye(n)?ge:_e)(t,n)},t.interpolateBasis=oe,t.interpolateBasisClosed=ae,t.interpolateBlues=Kg,t.interpolateBrBG=sg,t.interpolateBuGn=kg,t.interpolateBuPu=Cg,t.interpolateCividis=function(t){return t=Math.max(0,Math.min(1,t)),\"rgb(\"+Math.max(0,Math.min(255,Math.round(-4.54-t*(35.34-t*(2381.73-t*(6402.7-t*(7024.72-2710.57*t)))))))+\", \"+Math.max(0,Math.min(255,Math.round(32.49+t*(170.73+t*(52.82-t*(131.46-t*(176.58-67.37*t)))))))+\", \"+Math.max(0,Math.min(255,Math.round(81.24+t*(442.36-t*(2482.43-t*(6167.24-t*(6614.94-2475.67*t)))))))+\")\"},t.interpolateCool=ly,t.interpolateCubehelix=Ze,t.interpolateCubehelixDefault=fy,t.interpolateCubehelixLong=Qe,t.interpolateDate=be,t.interpolateDiscrete=function(t){var n=t.length;return function(e){return t[Math.max(0,Math.min(n-1,Math.floor(e*n)))]}},t.interpolateGnBu=zg,t.interpolateGreens=ty,t.interpolateGreys=ey,t.interpolateHcl=Ge,t.interpolateHclLong=$e,t.interpolateHsl=je,t.interpolateHslLong=Ve,t.interpolateHue=function(t,n){var e=fe(+t,+n);return function(t){var n=e(t);return n-360*Math.floor(n/360)}},t.interpolateInferno=by,t.interpolateLab=function(t,n){var e=le((t=On(t)).l,(n=On(n)).l),r=le(t.a,n.a),i=le(t.b,n.b),o=le(t.opacity,n.opacity);return function(n){return t.l=e(n),t.a=r(n),t.b=i(n),t.opacity=o(n),t+\"\"}},t.interpolateMagma=_y,t.interpolateNumber=me,t.interpolateNumberArray=ge,t.interpolateObject=xe,t.interpolateOrRd=Dg,t.interpolateOranges=cy,t.interpolatePRGn=hg,t.interpolatePiYG=pg,t.interpolatePlasma=my,t.interpolatePuBu=Og,t.interpolatePuBuGn=Lg,t.interpolatePuOr=gg,t.interpolatePuRd=Fg,t.interpolatePurples=iy,t.interpolateRainbow=function(t){(t<0||t>1)&&(t-=Math.floor(t));var n=Math.abs(t-.5);return hy.h=360*t-100,hy.s=1.5-1.5*n,hy.l=.8-.9*n,hy+\"\"},t.interpolateRdBu=_g,t.interpolateRdGy=mg,t.interpolateRdPu=Ig,t.interpolateRdYlBu=wg,t.interpolateRdYlGn=Ng,t.interpolateReds=ay,t.interpolateRgb=he,t.interpolateRgbBasis=pe,t.interpolateRgbBasisClosed=ve,t.interpolateRound=Ae,t.interpolateSinebow=function(t){var n;return t=(.5-t)*Math.PI,dy.r=255*(n=Math.sin(t))*n,dy.g=255*(n=Math.sin(t+py))*n,dy.b=255*(n=Math.sin(t+vy))*n,dy+\"\"},t.interpolateSpectral=Ag,t.interpolateString=Ne,t.interpolateTransformCss=qe,t.interpolateTransformSvg=Le,t.interpolateTurbo=function(t){return t=Math.max(0,Math.min(1,t)),\"rgb(\"+Math.max(0,Math.min(255,Math.round(34.61+t*(1172.33-t*(10793.56-t*(33300.12-t*(38394.49-14825.05*t)))))))+\", \"+Math.max(0,Math.min(255,Math.round(23.31+t*(557.33+t*(1225.33-t*(3574.96-t*(1073.77+707.56*t)))))))+\", \"+Math.max(0,Math.min(255,Math.round(27.2+t*(3211.1-t*(15327.97-t*(27814-t*(22569.18-6838.66*t)))))))+\")\"},t.interpolateViridis=yy,t.interpolateWarm=sy,t.interpolateYlGn=Xg,t.interpolateYlGnBu=jg,t.interpolateYlOrBr=$g,t.interpolateYlOrRd=Zg,t.interpolateZoom=Ie,t.interrupt=Pr,t.interval=function(t,n,e){var r=new lr,i=n;return null==n?(r.restart(t,n,e),r):(n=+n,e=null==e?fr():+e,r.restart(function o(a){a+=i,r.restart(o,i+=n,e),t(a)},n,e),r)},t.isoFormat=Dv,t.isoParse=qv,t.json=function(t,n){return fetch(t,n).then(la)},t.keys=function(t){var n=[];for(var e in t)n.push(e);return n},t.lab=On,t.lch=function(t,n,e,r){return 1===arguments.length?jn(t):new Xn(e,n,t,null==r?1:r)},t.line=jy,t.lineRadial=Ky,t.linkHorizontal=function(){return i_(o_)},t.linkRadial=function(){var t=i_(u_);return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t},t.linkVertical=function(){return i_(a_)},t.local=qt,t.map=co,t.matcher=nt,t.max=T,t.mean=function(t,n){var e,r=t.length,i=r,o=-1,a=0;if(null==n)for(;++o<r;)isNaN(e=u(t[o]))?--i:a+=e;else for(;++o<r;)isNaN(e=u(n(t[o],o,t)))?--i:a+=e;if(i)return a/i},t.median=function(t,e){var r,i=t.length,o=-1,a=[];if(null==e)for(;++o<i;)isNaN(r=u(t[o]))||a.push(r);else for(;++o<i;)isNaN(r=u(e(t[o],o,t)))||a.push(r);return N(a.sort(n),.5)},t.merge=A,t.min=S,t.mouse=Bt,t.namespace=W,t.namespaces=$,t.nest=function(){var t,n,e,r=[],i=[];function o(e,i,a,u){if(i>=r.length)return null!=t&&e.sort(t),null!=n?n(e):e;for(var c,f,s,l=-1,h=e.length,d=r[i++],p=co(),v=a();++l<h;)(s=p.get(c=d(f=e[l])+\"\"))?s.push(f):p.set(c,[f]);return p.each(function(t,n){u(v,n,o(t,i,a,u))}),v}return e={object:function(t){return o(t,0,fo,so)},map:function(t){return o(t,0,lo,ho)},entries:function(t){return function t(e,o){if(++o>r.length)return e;var a,u=i[o-1];return null!=n&&o>=r.length?a=e.entries():(a=[],e.each(function(n,e){a.push({key:e,values:t(n,o)})})),null!=u?a.sort(function(t,n){return u(t.key,n.key)}):a}(o(t,0,lo,ho),0)},key:function(t){return r.push(t),e},sortKeys:function(t){return i[r.length-1]=t,e},sortValues:function(n){return t=n,e},rollup:function(t){return n=t,e}}},t.now=fr,t.pack=function(){var t=null,n=1,e=1,r=Zl;function i(i){return i.x=n/2,i.y=e/2,t?i.eachBefore(Jl(t)).eachAfter(th(r,.5)).eachBefore(nh(1)):i.eachBefore(Jl(Kl)).eachAfter(th(Zl,1)).eachAfter(th(r,i.r/Math.min(n,e))).eachBefore(nh(Math.min(n,e)/(2*i.r))),i}return i.radius=function(n){return arguments.length?(t=$l(n),i):t},i.size=function(t){return arguments.length?(n=+t[0],e=+t[1],i):[n,e]},i.padding=function(t){return arguments.length?(r=\"function\"==typeof t?t:Ql(+t),i):r},i},t.packEnclose=ql,t.packSiblings=function(t){return Gl(t),t},t.pairs=function(t,n){null==n&&(n=a);for(var e=0,r=t.length-1,i=t[0],o=new Array(r<0?0:r);e<r;)o[e]=n(i,i=t[++e]);return o},t.partition=function(){var t=1,n=1,e=0,r=!1;function i(i){var o=i.height+1;return i.x0=i.y0=e,i.x1=t,i.y1=n/o,i.eachBefore(function(t,n){return function(r){r.children&&rh(r,r.x0,t*(r.depth+1)/n,r.x1,t*(r.depth+2)/n);var i=r.x0,o=r.y0,a=r.x1-e,u=r.y1-e;a<i&&(i=a=(i+a)/2),u<o&&(o=u=(o+u)/2),r.x0=i,r.y0=o,r.x1=a,r.y1=u}}(n,o)),r&&i.eachBefore(eh),i}return i.round=function(t){return arguments.length?(r=!!t,i):r},i.size=function(e){return arguments.length?(t=+e[0],n=+e[1],i):[t,n]},i.padding=function(t){return arguments.length?(e=+t,i):e},i},t.path=no,t.permute=function(t,n){for(var e=n.length,r=new Array(e);e--;)r[e]=t[n[e]];return r},t.pie=function(){var t=Gy,n=Xy,e=null,r=xy(0),i=xy(zy),o=xy(0);function a(a){var u,c,f,s,l,h=a.length,d=0,p=new Array(h),v=new Array(h),g=+r.apply(this,arguments),y=Math.min(zy,Math.max(-zy,i.apply(this,arguments)-g)),_=Math.min(Math.abs(y)/h,o.apply(this,arguments)),b=_*(y<0?-1:1);for(u=0;u<h;++u)(l=v[p[u]=u]=+t(a[u],u,a))>0&&(d+=l);for(null!=n?p.sort(function(t,e){return n(v[t],v[e])}):null!=e&&p.sort(function(t,n){return e(a[t],a[n])}),u=0,f=d?(y-h*b)/d:0;u<h;++u,g=s)c=p[u],s=g+((l=v[c])>0?l*f:0)+b,v[c]={data:a[c],index:u,value:l,startAngle:g,endAngle:s,padAngle:_};return v}return a.value=function(n){return arguments.length?(t=\"function\"==typeof n?n:xy(+n),a):t},a.sortValues=function(t){return arguments.length?(n=t,e=null,a):n},a.sort=function(t){return arguments.length?(e=t,n=null,a):e},a.startAngle=function(t){return arguments.length?(r=\"function\"==typeof t?t:xy(+t),a):r},a.endAngle=function(t){return arguments.length?(i=\"function\"==typeof t?t:xy(+t),a):i},a.padAngle=function(t){return arguments.length?(o=\"function\"==typeof t?t:xy(+t),a):o},a},t.piecewise=function(t,n){for(var e=0,r=n.length-1,i=n[0],o=new Array(r<0?0:r);e<r;)o[e]=t(i,i=n[++e]);return function(t){var n=Math.max(0,Math.min(r-1,Math.floor(t*=r)));return o[n](t-n)}},t.pointRadial=t_,t.polygonArea=function(t){for(var n,e=-1,r=t.length,i=t[r-1],o=0;++e<r;)n=i,i=t[e],o+=n[1]*i[0]-n[0]*i[1];return o/2},t.polygonCentroid=function(t){for(var n,e,r=-1,i=t.length,o=0,a=0,u=t[i-1],c=0;++r<i;)n=u,u=t[r],c+=e=n[0]*u[1]-u[0]*n[1],o+=(n[0]+u[0])*e,a+=(n[1]+u[1])*e;return[o/(c*=3),a/c]},t.polygonContains=function(t,n){for(var e,r,i=t.length,o=t[i-1],a=n[0],u=n[1],c=o[0],f=o[1],s=!1,l=0;l<i;++l)e=(o=t[l])[0],(r=o[1])>u!=f>u&&a<(c-e)*(u-r)/(f-r)+e&&(s=!s),c=e,f=r;return s},t.polygonHull=function(t){if((e=t.length)<3)return null;var n,e,r=new Array(e),i=new Array(e);for(n=0;n<e;++n)r[n]=[+t[n][0],+t[n][1],n];for(r.sort(xh),n=0;n<e;++n)i[n]=[r[n][0],-r[n][1]];var o=wh(r),a=wh(i),u=a[0]===o[0],c=a[a.length-1]===o[o.length-1],f=[];for(n=o.length-1;n>=0;--n)f.push(t[r[o[n]][2]]);for(n=+u;n<a.length-c;++n)f.push(t[r[a[n]][2]]);return f},t.polygonLength=function(t){for(var n,e,r=-1,i=t.length,o=t[i-1],a=o[0],u=o[1],c=0;++r<i;)n=a,e=u,n-=a=(o=t[r])[0],e-=u=o[1],c+=Math.sqrt(n*n+e*e);return c},t.precisionFixed=$a,t.precisionPrefix=Wa,t.precisionRound=Za,t.quadtree=wa,t.quantile=N,t.quantize=function(t,n){for(var e=new Array(n),r=0;r<n;++r)e[r]=t(r/(n-1));return e},t.radialArea=Jy,t.radialLine=Ky,t.randomBates=kh,t.randomExponential=Eh,t.randomIrwinHall=Sh,t.randomLogNormal=Ah,t.randomNormal=Th,t.randomUniform=Nh,t.range=g,t.rgb=_n,t.ribbon=function(){var t=eo,n=ro,e=io,r=oo,i=ao,o=null;function a(){var a,u=Wi.call(arguments),c=t.apply(this,u),f=n.apply(this,u),s=+e.apply(this,(u[0]=c,u)),l=r.apply(this,u)-Vi,h=i.apply(this,u)-Vi,d=s*Ii(l),p=s*Hi(l),v=+e.apply(this,(u[0]=f,u)),g=r.apply(this,u)-Vi,y=i.apply(this,u)-Vi;if(o||(o=a=no()),o.moveTo(d,p),o.arc(0,0,s,l,h),l===g&&h===y||(o.quadraticCurveTo(0,0,v*Ii(g),v*Hi(g)),o.arc(0,0,v,g,y)),o.quadraticCurveTo(0,0,d,p),o.closePath(),a)return o=null,a+\"\"||null}return a.radius=function(t){return arguments.length?(e=\"function\"==typeof t?t:Zi(+t),a):e},a.startAngle=function(t){return arguments.length?(r=\"function\"==typeof t?t:Zi(+t),a):r},a.endAngle=function(t){return arguments.length?(i=\"function\"==typeof t?t:Zi(+t),a):i},a.source=function(n){return arguments.length?(t=n,a):t},a.target=function(t){return arguments.length?(n=t,a):n},a.context=function(t){return arguments.length?(o=null==t?null:t,a):o},a},t.scaleBand=Uh,t.scaleDiverging=function t(){var n=Wh(Wv()(Fh));return n.copy=function(){return Gv(n,t())},Ph.apply(n,arguments)},t.scaleDivergingLog=function t(){var n=rd(Wv()).domain([.1,1,10]);return n.copy=function(){return Gv(n,t()).base(n.base())},Ph.apply(n,arguments)},t.scaleDivergingPow=Zv,t.scaleDivergingSqrt=function(){return Zv.apply(null,arguments).exponent(.5)},t.scaleDivergingSymlog=function t(){var n=ad(Wv());return n.copy=function(){return Gv(n,t()).constant(n.constant())},Ph.apply(n,arguments)},t.scaleIdentity=function t(n){var e;function r(t){return isNaN(t=+t)?e:t}return r.invert=r,r.domain=r.range=function(t){return arguments.length?(n=Rh.call(t,Oh),r):n.slice()},r.unknown=function(t){return arguments.length?(e=t,r):e},r.copy=function(){return t(n).unknown(e)},n=arguments.length?Rh.call(n,Oh):[0,1],Wh(r)},t.scaleImplicit=qh,t.scaleLinear=function t(){var n=Gh(Fh,Fh);return n.copy=function(){return Vh(n,t())},Ch.apply(n,arguments),Wh(n)},t.scaleLog=function t(){var n=rd(Xh()).domain([1,10]);return n.copy=function(){return Vh(n,t()).base(n.base())},Ch.apply(n,arguments),n},t.scaleOrdinal=Lh,t.scalePoint=function(){return function t(n){var e=n.copy;return n.padding=n.paddingOuter,delete n.paddingInner,delete n.paddingOuter,n.copy=function(){return t(e())},n}(Uh.apply(null,arguments).paddingInner(1))},t.scalePow=ld,t.scaleQuantile=function t(){var e,r=[],o=[],a=[];function u(){var t=0,n=Math.max(1,o.length);for(a=new Array(n-1);++t<n;)a[t-1]=N(r,t/n);return c}function c(t){return isNaN(t=+t)?e:o[i(a,t)]}return c.invertExtent=function(t){var n=o.indexOf(t);return n<0?[NaN,NaN]:[n>0?a[n-1]:r[0],n<a.length?a[n]:r[r.length-1]]},c.domain=function(t){if(!arguments.length)return r.slice();r=[];for(var e,i=0,o=t.length;i<o;++i)null==(e=t[i])||isNaN(e=+e)||r.push(e);return r.sort(n),u()},c.range=function(t){return arguments.length?(o=Dh.call(t),u()):o.slice()},c.unknown=function(t){return arguments.length?(e=t,c):e},c.quantiles=function(){return a.slice()},c.copy=function(){return t().domain(r).range(o).unknown(e)},Ch.apply(c,arguments)},t.scaleQuantize=function t(){var n,e=0,r=1,o=1,a=[.5],u=[0,1];function c(t){return t<=t?u[i(a,t,0,o)]:n}function f(){var t=-1;for(a=new Array(o);++t<o;)a[t]=((t+1)*r-(t-o)*e)/(o+1);return c}return c.domain=function(t){return arguments.length?(e=+t[0],r=+t[1],f()):[e,r]},c.range=function(t){return arguments.length?(o=(u=Dh.call(t)).length-1,f()):u.slice()},c.invertExtent=function(t){var n=u.indexOf(t);return n<0?[NaN,NaN]:n<1?[e,a[0]]:n>=o?[a[o-1],r]:[a[n-1],a[n]]},c.unknown=function(t){return arguments.length?(n=t,c):c},c.thresholds=function(){return a.slice()},c.copy=function(){return t().domain([e,r]).range(u).unknown(n)},Ch.apply(Wh(c),arguments)},t.scaleSequential=function t(){var n=Wh(Xv()(Fh));return n.copy=function(){return Gv(n,t())},Ph.apply(n,arguments)},t.scaleSequentialLog=function t(){var n=rd(Xv()).domain([1,10]);return n.copy=function(){return Gv(n,t()).base(n.base())},Ph.apply(n,arguments)},t.scaleSequentialPow=$v,t.scaleSequentialQuantile=function t(){var e=[],r=Fh;function o(t){if(!isNaN(t=+t))return r((i(e,t)-1)/(e.length-1))}return o.domain=function(t){if(!arguments.length)return e.slice();e=[];for(var r,i=0,a=t.length;i<a;++i)null==(r=t[i])||isNaN(r=+r)||e.push(r);return e.sort(n),o},o.interpolator=function(t){return arguments.length?(r=t,o):r},o.copy=function(){return t(r).domain(e)},Ph.apply(o,arguments)},t.scaleSequentialSqrt=function(){return $v.apply(null,arguments).exponent(.5)},t.scaleSequentialSymlog=function t(){var n=ad(Xv());return n.copy=function(){return Gv(n,t()).constant(n.constant())},Ph.apply(n,arguments)},t.scaleSqrt=function(){return ld.apply(null,arguments).exponent(.5)},t.scaleSymlog=function t(){var n=ad(Xh());return n.copy=function(){return Vh(n,t()).constant(n.constant())},Ch.apply(n,arguments)},t.scaleThreshold=function t(){var n,e=[.5],r=[0,1],o=1;function a(t){return t<=t?r[i(e,t,0,o)]:n}return a.domain=function(t){return arguments.length?(e=Dh.call(t),o=Math.min(e.length,r.length-1),a):e.slice()},a.range=function(t){return arguments.length?(r=Dh.call(t),o=Math.min(e.length,r.length-1),a):r.slice()},a.invertExtent=function(t){var n=r.indexOf(t);return[e[n-1],e[n]]},a.unknown=function(t){return arguments.length?(n=t,a):n},a.copy=function(){return t().domain(e).range(r).unknown(n)},Ch.apply(a,arguments)},t.scaleTime=function(){return Ch.apply(Vv(jd,Id,kd,Td,Md,xd,bd,vd,t.timeFormat).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)},t.scaleUtc=function(){return Ch.apply(Vv(vp,dp,Jd,Zd,$d,Xd,bd,vd,t.utcFormat).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)},t.scan=function(t,e){if(r=t.length){var r,i,o=0,a=0,u=t[a];for(null==e&&(e=n);++o<r;)(e(i=t[o],u)<0||0!==e(u,u))&&(u=i,a=o);return 0===e(u,u)?a:void 0}},t.schemeAccent=Jv,t.schemeBlues=Qg,t.schemeBrBG=fg,t.schemeBuGn=Sg,t.schemeBuPu=Eg,t.schemeCategory10=Kv,t.schemeDark2=tg,t.schemeGnBu=Pg,t.schemeGreens=Jg,t.schemeGreys=ny,t.schemeOrRd=Rg,t.schemeOranges=uy,t.schemePRGn=lg,t.schemePaired=ng,t.schemePastel1=eg,t.schemePastel2=rg,t.schemePiYG=dg,t.schemePuBu=Ug,t.schemePuBuGn=qg,t.schemePuOr=vg,t.schemePuRd=Bg,t.schemePurples=ry,t.schemeRdBu=yg,t.schemeRdGy=bg,t.schemeRdPu=Yg,t.schemeRdYlBu=xg,t.schemeRdYlGn=Mg,t.schemeReds=oy,t.schemeSet1=ig,t.schemeSet2=og,t.schemeSet3=ag,t.schemeSpectral=Tg,t.schemeTableau10=ug,t.schemeYlGn=Vg,t.schemeYlGnBu=Hg,t.schemeYlOrBr=Gg,t.schemeYlOrRd=Wg,t.select=Rt,t.selectAll=function(t){return\"string\"==typeof t?new Pt([document.querySelectorAll(t)],[document.documentElement]):new Pt([null==t?[]:t],Ct)},t.selection=zt,t.selector=K,t.selectorAll=tt,t.set=go,t.shuffle=function(t,n,e){for(var r,i,o=(null==e?t.length:e)-(n=null==n?0:+n);o;)i=Math.random()*o--|0,r=t[o+n],t[o+n]=t[i+n],t[i+n]=r;return t},t.stack=function(){var t=xy([]),n=ib,e=rb,r=ob;function i(i){var o,a,u=t.apply(this,arguments),c=i.length,f=u.length,s=new Array(f);for(o=0;o<f;++o){for(var l,h=u[o],d=s[o]=new Array(c),p=0;p<c;++p)d[p]=l=[0,+r(i[p],h,p,i)],l.data=i[p];d.key=h}for(o=0,a=n(s);o<f;++o)s[a[o]].index=o;return e(s,a),s}return i.keys=function(n){return arguments.length?(t=\"function\"==typeof n?n:xy(n_.call(n)),i):t},i.value=function(t){return arguments.length?(r=\"function\"==typeof t?t:xy(+t),i):r},i.order=function(t){return arguments.length?(n=null==t?ib:\"function\"==typeof t?t:xy(n_.call(t)),i):n},i.offset=function(t){return arguments.length?(e=null==t?rb:t,i):e},i},t.stackOffsetDiverging=function(t,n){if((u=t.length)>0)for(var e,r,i,o,a,u,c=0,f=t[n[0]].length;c<f;++c)for(o=a=0,e=0;e<u;++e)(i=(r=t[n[e]][c])[1]-r[0])>0?(r[0]=o,r[1]=o+=i):i<0?(r[1]=a,r[0]=a+=i):(r[0]=0,r[1]=i)},t.stackOffsetExpand=function(t,n){if((r=t.length)>0){for(var e,r,i,o=0,a=t[0].length;o<a;++o){for(i=e=0;e<r;++e)i+=t[e][o][1]||0;if(i)for(e=0;e<r;++e)t[e][o][1]/=i}rb(t,n)}},t.stackOffsetNone=rb,t.stackOffsetSilhouette=function(t,n){if((e=t.length)>0){for(var e,r=0,i=t[n[0]],o=i.length;r<o;++r){for(var a=0,u=0;a<e;++a)u+=t[a][r][1]||0;i[r][1]+=i[r][0]=-u/2}rb(t,n)}},t.stackOffsetWiggle=function(t,n){if((i=t.length)>0&&(r=(e=t[n[0]]).length)>0){for(var e,r,i,o=0,a=1;a<r;++a){for(var u=0,c=0,f=0;u<i;++u){for(var s=t[n[u]],l=s[a][1]||0,h=(l-(s[a-1][1]||0))/2,d=0;d<u;++d){var p=t[n[d]];h+=(p[a][1]||0)-(p[a-1][1]||0)}c+=l,f+=h*l}e[a-1][1]+=e[a-1][0]=o,c&&(o-=f/c)}e[a-1][1]+=e[a-1][0]=o,rb(t,n)}},t.stackOrderAppearance=ab,t.stackOrderAscending=cb,t.stackOrderDescending=function(t){return cb(t).reverse()},t.stackOrderInsideOut=function(t){var n,e,r=t.length,i=t.map(fb),o=ab(t),a=0,u=0,c=[],f=[];for(n=0;n<r;++n)e=o[n],a<u?(a+=i[e],c.push(e)):(u+=i[e],f.push(e));return f.reverse().concat(c)},t.stackOrderNone=ib,t.stackOrderReverse=function(t){return ib(t).reverse()},t.stratify=function(){var t=uh,n=ch;function e(e){var r,i,o,a,u,c,f,s=e.length,l=new Array(s),h={};for(i=0;i<s;++i)r=e[i],u=l[i]=new Rl(r),null!=(c=t(r,i,e))&&(c+=\"\")&&(h[f=ih+(u.id=c)]=f in h?ah:u);for(i=0;i<s;++i)if(u=l[i],null!=(c=n(e[i],i,e))&&(c+=\"\")){if(!(a=h[ih+c]))throw new Error(\"missing: \"+c);if(a===ah)throw new Error(\"ambiguous: \"+c);a.children?a.children.push(u):a.children=[u],u.parent=a}else{if(o)throw new Error(\"multiple roots\");o=u}if(!o)throw new Error(\"no root\");if(o.parent=oh,o.eachBefore(function(t){t.depth=t.parent.depth+1,--s}).eachBefore(zl),o.parent=null,s>0)throw new Error(\"cycle\");return o}return e.id=function(n){return arguments.length?(t=Wl(n),e):t},e.parentId=function(t){return arguments.length?(n=Wl(t),e):n},e},t.style=ft,t.sum=function(t,n){var e,r=t.length,i=-1,o=0;if(null==n)for(;++i<r;)(e=+t[i])&&(o+=e);else for(;++i<r;)(e=+n(t[i],i,t))&&(o+=e);return o},t.svg=va,t.symbol=function(){var t=xy(c_),n=xy(64),e=null;function r(){var r;if(e||(e=r=no()),t.apply(this,arguments).draw(e,+n.apply(this,arguments)),r)return e=null,r+\"\"||null}return r.type=function(n){return arguments.length?(t=\"function\"==typeof n?n:xy(n),r):t},r.size=function(t){return arguments.length?(n=\"function\"==typeof t?t:xy(+t),r):n},r.context=function(t){return arguments.length?(e=null==t?null:t,r):e},r},t.symbolCircle=c_,t.symbolCross=f_,t.symbolDiamond=h_,t.symbolSquare=y_,t.symbolStar=g_,t.symbolTriangle=b_,t.symbolWye=M_,t.symbols=N_,t.text=ua,t.thresholdFreedmanDiaconis=function(t,e,r){return t=d.call(t,u).sort(n),Math.ceil((r-e)/(2*(N(t,.75)-N(t,.25))*Math.pow(t.length,-1/3)))},t.thresholdScott=function(t,n,e){return Math.ceil((e-n)/(3.5*f(t)*Math.pow(t.length,-1/3)))},t.thresholdSturges=M,t.tickFormat=$h,t.tickIncrement=x,t.tickStep=w,t.ticks=m,t.timeDay=Td,t.timeDays=Ad,t.timeFormatDefaultLocale=Rv,t.timeFormatLocale=mp,t.timeFriday=Rd,t.timeFridays=Fd,t.timeHour=Md,t.timeHours=Nd,t.timeInterval=pd,t.timeMillisecond=vd,t.timeMilliseconds=gd,t.timeMinute=xd,t.timeMinutes=wd,t.timeMonday=Ed,t.timeMondays=Ld,t.timeMonth=Id,t.timeMonths=Hd,t.timeSaturday=Dd,t.timeSaturdays=Yd,t.timeSecond=bd,t.timeSeconds=md,t.timeSunday=kd,t.timeSundays=qd,t.timeThursday=zd,t.timeThursdays=Bd,t.timeTuesday=Cd,t.timeTuesdays=Ud,t.timeWednesday=Pd,t.timeWednesdays=Od,t.timeWeek=kd,t.timeWeeks=qd,t.timeYear=jd,t.timeYears=Vd,t.timeout=yr,t.timer=hr,t.timerFlush=dr,t.touch=Ft,t.touches=function(t,n){null==n&&(n=Ut().touches);for(var e=0,r=n?n.length:0,i=new Array(r);e<r;++e)i[e]=Ot(t,n[e]);return i},t.transition=Or,t.transpose=k,t.tree=function(){var t=fh,n=1,e=1,r=null;function i(i){var c=function(t){for(var n,e,r,i,o,a=new ph(t,0),u=[a];n=u.pop();)if(r=n._.children)for(n.children=new Array(o=r.length),i=o-1;i>=0;--i)u.push(e=n.children[i]=new ph(r[i],i)),e.parent=n;return(a.parent=new ph(null,0)).children=[a],a}(i);if(c.eachAfter(o),c.parent.m=-c.z,c.eachBefore(a),r)i.eachBefore(u);else{var f=i,s=i,l=i;i.eachBefore(function(t){t.x<f.x&&(f=t),t.x>s.x&&(s=t),t.depth>l.depth&&(l=t)});var h=f===s?1:t(f,s)/2,d=h-f.x,p=n/(s.x+h+d),v=e/(l.depth||1);i.eachBefore(function(t){t.x=(t.x+d)*p,t.y=t.depth*v})}return i}function o(n){var e=n.children,r=n.parent.children,i=n.i?r[n.i-1]:null;if(e){!function(t){for(var n,e=0,r=0,i=t.children,o=i.length;--o>=0;)(n=i[o]).z+=e,n.m+=e,e+=n.s+(r+=n.c)}(n);var o=(e[0].z+e[e.length-1].z)/2;i?(n.z=i.z+t(n._,i._),n.m=n.z-o):n.z=o}else i&&(n.z=i.z+t(n._,i._));n.parent.A=function(n,e,r){if(e){for(var i,o=n,a=n,u=e,c=o.parent.children[0],f=o.m,s=a.m,l=u.m,h=c.m;u=lh(u),o=sh(o),u&&o;)c=sh(c),(a=lh(a)).a=n,(i=u.z+l-o.z-f+t(u._,o._))>0&&(hh(dh(u,n,r),n,i),f+=i,s+=i),l+=u.m,f+=o.m,h+=c.m,s+=a.m;u&&!lh(a)&&(a.t=u,a.m+=l-s),o&&!sh(c)&&(c.t=o,c.m+=f-h,r=n)}return r}(n,i,n.parent.A||r[0])}function a(t){t._.x=t.z+t.parent.m,t.m+=t.parent.m}function u(t){t.x*=n,t.y=t.depth*e}return i.separation=function(n){return arguments.length?(t=n,i):t},i.size=function(t){return arguments.length?(r=!1,n=+t[0],e=+t[1],i):r?null:[n,e]},i.nodeSize=function(t){return arguments.length?(r=!0,n=+t[0],e=+t[1],i):r?[n,e]:null},i},t.treemap=function(){var t=_h,n=!1,e=1,r=1,i=[0],o=Zl,a=Zl,u=Zl,c=Zl,f=Zl;function s(t){return t.x0=t.y0=0,t.x1=e,t.y1=r,t.eachBefore(l),i=[0],n&&t.eachBefore(eh),t}function l(n){var e=i[n.depth],r=n.x0+e,s=n.y0+e,l=n.x1-e,h=n.y1-e;l<r&&(r=l=(r+l)/2),h<s&&(s=h=(s+h)/2),n.x0=r,n.y0=s,n.x1=l,n.y1=h,n.children&&(e=i[n.depth+1]=o(n)/2,r+=f(n)-e,s+=a(n)-e,(l-=u(n)-e)<r&&(r=l=(r+l)/2),(h-=c(n)-e)<s&&(s=h=(s+h)/2),t(n,r,s,l,h))}return s.round=function(t){return arguments.length?(n=!!t,s):n},s.size=function(t){return arguments.length?(e=+t[0],r=+t[1],s):[e,r]},s.tile=function(n){return arguments.length?(t=Wl(n),s):t},s.padding=function(t){return arguments.length?s.paddingInner(t).paddingOuter(t):s.paddingInner()},s.paddingInner=function(t){return arguments.length?(o=\"function\"==typeof t?t:Ql(+t),s):o},s.paddingOuter=function(t){return arguments.length?s.paddingTop(t).paddingRight(t).paddingBottom(t).paddingLeft(t):s.paddingTop()},s.paddingTop=function(t){return arguments.length?(a=\"function\"==typeof t?t:Ql(+t),s):a},s.paddingRight=function(t){return arguments.length?(u=\"function\"==typeof t?t:Ql(+t),s):u},s.paddingBottom=function(t){return arguments.length?(c=\"function\"==typeof t?t:Ql(+t),s):c},s.paddingLeft=function(t){return arguments.length?(f=\"function\"==typeof t?t:Ql(+t),s):f},s},t.treemapBinary=function(t,n,e,r,i){var o,a,u=t.children,c=u.length,f=new Array(c+1);for(f[0]=a=o=0;o<c;++o)f[o+1]=a+=u[o].value;!function t(n,e,r,i,o,a,c){if(n>=e-1){var s=u[n];return s.x0=i,s.y0=o,s.x1=a,void(s.y1=c)}for(var l=f[n],h=r/2+l,d=n+1,p=e-1;d<p;){var v=d+p>>>1;f[v]<h?d=v+1:p=v}h-f[d-1]<f[d]-h&&n+1<d&&--d;var g=f[d]-l,y=r-g;if(a-i>c-o){var _=(i*y+a*g)/r;t(n,d,g,i,o,_,c),t(d,e,y,_,o,a,c)}else{var b=(o*y+c*g)/r;t(n,d,g,i,o,a,b),t(d,e,y,i,b,a,c)}}(0,c,t.value,n,e,r,i)},t.treemapDice=rh,t.treemapResquarify=bh,t.treemapSlice=vh,t.treemapSliceDice=function(t,n,e,r,i){(1&t.depth?vh:rh)(t,n,e,r,i)},t.treemapSquarify=_h,t.tsv=sa,t.tsvFormat=Ko,t.tsvFormatBody=Jo,t.tsvFormatRow=na,t.tsvFormatRows=ta,t.tsvFormatValue=ea,t.tsvParse=Zo,t.tsvParseRows=Qo,t.utcDay=Zd,t.utcDays=Qd,t.utcFriday=ip,t.utcFridays=lp,t.utcHour=$d,t.utcHours=Wd,t.utcMillisecond=vd,t.utcMilliseconds=gd,t.utcMinute=Xd,t.utcMinutes=Gd,t.utcMonday=tp,t.utcMondays=up,t.utcMonth=dp,t.utcMonths=pp,t.utcSaturday=op,t.utcSaturdays=hp,t.utcSecond=bd,t.utcSeconds=md,t.utcSunday=Jd,t.utcSundays=ap,t.utcThursday=rp,t.utcThursdays=sp,t.utcTuesday=np,t.utcTuesdays=cp,t.utcWednesday=ep,t.utcWednesdays=fp,t.utcWeek=Jd,t.utcWeeks=ap,t.utcYear=vp,t.utcYears=gp,t.values=function(t){var n=[];for(var e in t)n.push(t[e]);return n},t.variance=c,t.version=\"5.15.1\",t.voronoi=function(){var t=lb,n=hb,e=null;function r(r){return new Gb(r.map(function(e,i){var o=[Math.round(t(e,i,r)/Hb)*Hb,Math.round(n(e,i,r)/Hb)*Hb];return o.index=i,o.data=e,o}),e)}return r.polygons=function(t){return r(t).polygons()},r.links=function(t){return r(t).links()},r.triangles=function(t){return r(t).triangles()},r.x=function(n){return arguments.length?(t=\"function\"==typeof n?n:sb(+n),r):t},r.y=function(t){return arguments.length?(n=\"function\"==typeof t?t:sb(+t),r):n},r.extent=function(t){return arguments.length?(e=null==t?null:[[+t[0][0],+t[0][1]],[+t[1][0],+t[1][1]]],r):e&&[[e[0][0],e[0][1]],[e[1][0],e[1][1]]]},r.size=function(t){return arguments.length?(e=null==t?null:[[0,0],[+t[0],+t[1]]],r):e&&[e[1][0]-e[0][0],e[1][1]-e[0][1]]},r},t.window=ct,t.xml=da,t.zip=function(){return k(arguments)},t.zoom=function(){var n,e,r=nm,i=em,o=am,a=im,u=om,c=[0,1/0],f=[[-1/0,-1/0],[1/0,1/0]],s=250,l=Ie,h=I(\"start\",\"zoom\",\"end\"),d=500,p=150,v=0;function g(t){t.property(\"__zoom\",rm).on(\"wheel.zoom\",M).on(\"mousedown.zoom\",N).on(\"dblclick.zoom\",T).filter(u).on(\"touchstart.zoom\",A).on(\"touchmove.zoom\",S).on(\"touchend.zoom touchcancel.zoom\",k).style(\"touch-action\",\"none\").style(\"-webkit-tap-highlight-color\",\"rgba(0,0,0,0)\")}function y(t,n){return(n=Math.max(c[0],Math.min(c[1],n)))===t.k?t:new Zb(n,t.x,t.y)}function _(t,n,e){var r=n[0]-e[0]*t.k,i=n[1]-e[1]*t.k;return r===t.x&&i===t.y?t:new Zb(t.k,r,i)}function b(t){return[(+t[0][0]+ +t[1][0])/2,(+t[0][1]+ +t[1][1])/2]}function m(t,n,e){t.on(\"start.zoom\",function(){x(this,arguments).start()}).on(\"interrupt.zoom end.zoom\",function(){x(this,arguments).end()}).tween(\"zoom\",function(){var t=this,r=arguments,o=x(t,r),a=i.apply(t,r),u=null==e?b(a):\"function\"==typeof e?e.apply(t,r):e,c=Math.max(a[1][0]-a[0][0],a[1][1]-a[0][1]),f=t.__zoom,s=\"function\"==typeof n?n.apply(t,r):n,h=l(f.invert(u).concat(c/f.k),s.invert(u).concat(c/s.k));return function(t){if(1===t)t=s;else{var n=h(t),e=c/n[2];t=new Zb(e,u[0]-n[0]*e,u[1]-n[1]*e)}o.zoom(null,t)}})}function x(t,n,e){return!e&&t.__zooming||new w(t,n)}function w(t,n){this.that=t,this.args=n,this.active=0,this.extent=i.apply(t,n),this.taps=0}function M(){if(r.apply(this,arguments)){var t=x(this,arguments),n=this.__zoom,e=Math.max(c[0],Math.min(c[1],n.k*Math.pow(2,a.apply(this,arguments)))),i=Bt(this);if(t.wheel)t.mouse[0][0]===i[0]&&t.mouse[0][1]===i[1]||(t.mouse[1]=n.invert(t.mouse[0]=i)),clearTimeout(t.wheel);else{if(n.k===e)return;t.mouse=[i,n.invert(i)],Pr(this),t.start()}tm(),t.wheel=setTimeout(function(){t.wheel=null,t.end()},p),t.zoom(\"mouse\",o(_(y(n,e),t.mouse[0],t.mouse[1]),t.extent,f))}}function N(){if(!e&&r.apply(this,arguments)){var n=x(this,arguments,!0),i=Rt(t.event.view).on(\"mousemove.zoom\",function(){if(tm(),!n.moved){var e=t.event.clientX-u,r=t.event.clientY-c;n.moved=e*e+r*r>v}n.zoom(\"mouse\",o(_(n.that.__zoom,n.mouse[0]=Bt(n.that),n.mouse[1]),n.extent,f))},!0).on(\"mouseup.zoom\",function(){i.on(\"mousemove.zoom mouseup.zoom\",null),jt(t.event.view,n.moved),tm(),n.end()},!0),a=Bt(this),u=t.event.clientX,c=t.event.clientY;Ht(t.event.view),Jb(),n.mouse=[a,this.__zoom.invert(a)],Pr(this),n.start()}}function T(){if(r.apply(this,arguments)){var n=this.__zoom,e=Bt(this),a=n.invert(e),u=n.k*(t.event.shiftKey?.5:2),c=o(_(y(n,u),e,a),i.apply(this,arguments),f);tm(),s>0?Rt(this).transition().duration(s).call(m,c,e):Rt(this).call(g.transform,c)}}function A(){if(r.apply(this,arguments)){var e,i,o,a,u=t.event.touches,c=u.length,f=x(this,arguments,t.event.changedTouches.length===c);for(Jb(),i=0;i<c;++i)a=[a=Ft(this,u,(o=u[i]).identifier),this.__zoom.invert(a),o.identifier],f.touch0?f.touch1||f.touch0[2]===a[2]||(f.touch1=a,f.taps=0):(f.touch0=a,e=!0,f.taps=1+!!n);n&&(n=clearTimeout(n)),e&&(f.taps<2&&(n=setTimeout(function(){n=null},d)),Pr(this),f.start())}}function S(){if(this.__zooming){var e,r,i,a,u=x(this,arguments),c=t.event.changedTouches,s=c.length;for(tm(),n&&(n=clearTimeout(n)),u.taps=0,e=0;e<s;++e)i=Ft(this,c,(r=c[e]).identifier),u.touch0&&u.touch0[2]===r.identifier?u.touch0[0]=i:u.touch1&&u.touch1[2]===r.identifier&&(u.touch1[0]=i);if(r=u.that.__zoom,u.touch1){var l=u.touch0[0],h=u.touch0[1],d=u.touch1[0],p=u.touch1[1],v=(v=d[0]-l[0])*v+(v=d[1]-l[1])*v,g=(g=p[0]-h[0])*g+(g=p[1]-h[1])*g;r=y(r,Math.sqrt(v/g)),i=[(l[0]+d[0])/2,(l[1]+d[1])/2],a=[(h[0]+p[0])/2,(h[1]+p[1])/2]}else{if(!u.touch0)return;i=u.touch0[0],a=u.touch0[1]}u.zoom(\"touch\",o(_(r,i,a),u.extent,f))}}function k(){if(this.__zooming){var n,r,i=x(this,arguments),o=t.event.changedTouches,a=o.length;for(Jb(),e&&clearTimeout(e),e=setTimeout(function(){e=null},d),n=0;n<a;++n)r=o[n],i.touch0&&i.touch0[2]===r.identifier?delete i.touch0:i.touch1&&i.touch1[2]===r.identifier&&delete i.touch1;if(i.touch1&&!i.touch0&&(i.touch0=i.touch1,delete i.touch1),i.touch0)i.touch0[1]=this.__zoom.invert(i.touch0[0]);else if(i.end(),2===i.taps){var u=Rt(this).on(\"dblclick.zoom\");u&&u.apply(this,arguments)}}}return g.transform=function(t,n,e){var r=t.selection?t.selection():t;r.property(\"__zoom\",rm),t!==r?m(t,n,e):r.interrupt().each(function(){x(this,arguments).start().zoom(null,\"function\"==typeof n?n.apply(this,arguments):n).end()})},g.scaleBy=function(t,n,e){g.scaleTo(t,function(){var t=this.__zoom.k,e=\"function\"==typeof n?n.apply(this,arguments):n;return t*e},e)},g.scaleTo=function(t,n,e){g.transform(t,function(){var t=i.apply(this,arguments),r=this.__zoom,a=null==e?b(t):\"function\"==typeof e?e.apply(this,arguments):e,u=r.invert(a),c=\"function\"==typeof n?n.apply(this,arguments):n;return o(_(y(r,c),a,u),t,f)},e)},g.translateBy=function(t,n,e){g.transform(t,function(){return o(this.__zoom.translate(\"function\"==typeof n?n.apply(this,arguments):n,\"function\"==typeof e?e.apply(this,arguments):e),i.apply(this,arguments),f)})},g.translateTo=function(t,n,e,r){g.transform(t,function(){var t=i.apply(this,arguments),a=this.__zoom,u=null==r?b(t):\"function\"==typeof r?r.apply(this,arguments):r;return o(Qb.translate(u[0],u[1]).scale(a.k).translate(\"function\"==typeof n?-n.apply(this,arguments):-n,\"function\"==typeof e?-e.apply(this,arguments):-e),t,f)},r)},w.prototype={start:function(){return 1==++this.active&&(this.that.__zooming=this,this.emit(\"start\")),this},zoom:function(t,n){return this.mouse&&\"mouse\"!==t&&(this.mouse[1]=n.invert(this.mouse[0])),this.touch0&&\"touch\"!==t&&(this.touch0[1]=n.invert(this.touch0[0])),this.touch1&&\"touch\"!==t&&(this.touch1[1]=n.invert(this.touch1[0])),this.that.__zoom=n,this.emit(\"zoom\"),this},end:function(){return 0==--this.active&&(delete this.that.__zooming,this.emit(\"end\")),this},emit:function(t){kt(new Wb(g,t,this.that.__zoom),h.apply,h,[t,this.that,this.args])}},g.wheelDelta=function(t){return arguments.length?(a=\"function\"==typeof t?t:$b(+t),g):a},g.filter=function(t){return arguments.length?(r=\"function\"==typeof t?t:$b(!!t),g):r},g.touchable=function(t){return arguments.length?(u=\"function\"==typeof t?t:$b(!!t),g):u},g.extent=function(t){return arguments.length?(i=\"function\"==typeof t?t:$b([[+t[0][0],+t[0][1]],[+t[1][0],+t[1][1]]]),g):i},g.scaleExtent=function(t){return arguments.length?(c[0]=+t[0],c[1]=+t[1],g):[c[0],c[1]]},g.translateExtent=function(t){return arguments.length?(f[0][0]=+t[0][0],f[1][0]=+t[1][0],f[0][1]=+t[0][1],f[1][1]=+t[1][1],g):[[f[0][0],f[0][1]],[f[1][0],f[1][1]]]},g.constrain=function(t){return arguments.length?(o=t,g):o},g.duration=function(t){return arguments.length?(s=+t,g):s},g.interpolate=function(t){return arguments.length?(l=t,g):l},g.on=function(){var t=h.on.apply(h,arguments);return t===h?g:t},g.clickDistance=function(t){return arguments.length?(v=(t=+t)*t,g):Math.sqrt(v)},g},t.zoomIdentity=Qb,t.zoomTransform=Kb,Object.defineProperty(t,\"__esModule\",{value:!0})});\n"
  },
  {
    "path": "static/editor.md/lib/mindmap/transform.js",
    "content": "/*! markmap-lib v0.7.8 | MIT License */\n(function (exports) {\n'use strict';\n\n// List of valid entities\n//\n// Generate with ./support/entities.js script\n//\n\n/*eslint quotes:0*/\nvar entities = {\n  \"Aacute\":\"\\u00C1\",\n  \"aacute\":\"\\u00E1\",\n  \"Abreve\":\"\\u0102\",\n  \"abreve\":\"\\u0103\",\n  \"ac\":\"\\u223E\",\n  \"acd\":\"\\u223F\",\n  \"acE\":\"\\u223E\\u0333\",\n  \"Acirc\":\"\\u00C2\",\n  \"acirc\":\"\\u00E2\",\n  \"acute\":\"\\u00B4\",\n  \"Acy\":\"\\u0410\",\n  \"acy\":\"\\u0430\",\n  \"AElig\":\"\\u00C6\",\n  \"aelig\":\"\\u00E6\",\n  \"af\":\"\\u2061\",\n  \"Afr\":\"\\uD835\\uDD04\",\n  \"afr\":\"\\uD835\\uDD1E\",\n  \"Agrave\":\"\\u00C0\",\n  \"agrave\":\"\\u00E0\",\n  \"alefsym\":\"\\u2135\",\n  \"aleph\":\"\\u2135\",\n  \"Alpha\":\"\\u0391\",\n  \"alpha\":\"\\u03B1\",\n  \"Amacr\":\"\\u0100\",\n  \"amacr\":\"\\u0101\",\n  \"amalg\":\"\\u2A3F\",\n  \"AMP\":\"\\u0026\",\n  \"amp\":\"\\u0026\",\n  \"And\":\"\\u2A53\",\n  \"and\":\"\\u2227\",\n  \"andand\":\"\\u2A55\",\n  \"andd\":\"\\u2A5C\",\n  \"andslope\":\"\\u2A58\",\n  \"andv\":\"\\u2A5A\",\n  \"ang\":\"\\u2220\",\n  \"ange\":\"\\u29A4\",\n  \"angle\":\"\\u2220\",\n  \"angmsd\":\"\\u2221\",\n  \"angmsdaa\":\"\\u29A8\",\n  \"angmsdab\":\"\\u29A9\",\n  \"angmsdac\":\"\\u29AA\",\n  \"angmsdad\":\"\\u29AB\",\n  \"angmsdae\":\"\\u29AC\",\n  \"angmsdaf\":\"\\u29AD\",\n  \"angmsdag\":\"\\u29AE\",\n  \"angmsdah\":\"\\u29AF\",\n  \"angrt\":\"\\u221F\",\n  \"angrtvb\":\"\\u22BE\",\n  \"angrtvbd\":\"\\u299D\",\n  \"angsph\":\"\\u2222\",\n  \"angst\":\"\\u00C5\",\n  \"angzarr\":\"\\u237C\",\n  \"Aogon\":\"\\u0104\",\n  \"aogon\":\"\\u0105\",\n  \"Aopf\":\"\\uD835\\uDD38\",\n  \"aopf\":\"\\uD835\\uDD52\",\n  \"ap\":\"\\u2248\",\n  \"apacir\":\"\\u2A6F\",\n  \"apE\":\"\\u2A70\",\n  \"ape\":\"\\u224A\",\n  \"apid\":\"\\u224B\",\n  \"apos\":\"\\u0027\",\n  \"ApplyFunction\":\"\\u2061\",\n  \"approx\":\"\\u2248\",\n  \"approxeq\":\"\\u224A\",\n  \"Aring\":\"\\u00C5\",\n  \"aring\":\"\\u00E5\",\n  \"Ascr\":\"\\uD835\\uDC9C\",\n  \"ascr\":\"\\uD835\\uDCB6\",\n  \"Assign\":\"\\u2254\",\n  \"ast\":\"\\u002A\",\n  \"asymp\":\"\\u2248\",\n  \"asympeq\":\"\\u224D\",\n  \"Atilde\":\"\\u00C3\",\n  \"atilde\":\"\\u00E3\",\n  \"Auml\":\"\\u00C4\",\n  \"auml\":\"\\u00E4\",\n  \"awconint\":\"\\u2233\",\n  \"awint\":\"\\u2A11\",\n  \"backcong\":\"\\u224C\",\n  \"backepsilon\":\"\\u03F6\",\n  \"backprime\":\"\\u2035\",\n  \"backsim\":\"\\u223D\",\n  \"backsimeq\":\"\\u22CD\",\n  \"Backslash\":\"\\u2216\",\n  \"Barv\":\"\\u2AE7\",\n  \"barvee\":\"\\u22BD\",\n  \"Barwed\":\"\\u2306\",\n  \"barwed\":\"\\u2305\",\n  \"barwedge\":\"\\u2305\",\n  \"bbrk\":\"\\u23B5\",\n  \"bbrktbrk\":\"\\u23B6\",\n  \"bcong\":\"\\u224C\",\n  \"Bcy\":\"\\u0411\",\n  \"bcy\":\"\\u0431\",\n  \"bdquo\":\"\\u201E\",\n  \"becaus\":\"\\u2235\",\n  \"Because\":\"\\u2235\",\n  \"because\":\"\\u2235\",\n  \"bemptyv\":\"\\u29B0\",\n  \"bepsi\":\"\\u03F6\",\n  \"bernou\":\"\\u212C\",\n  \"Bernoullis\":\"\\u212C\",\n  \"Beta\":\"\\u0392\",\n  \"beta\":\"\\u03B2\",\n  \"beth\":\"\\u2136\",\n  \"between\":\"\\u226C\",\n  \"Bfr\":\"\\uD835\\uDD05\",\n  \"bfr\":\"\\uD835\\uDD1F\",\n  \"bigcap\":\"\\u22C2\",\n  \"bigcirc\":\"\\u25EF\",\n  \"bigcup\":\"\\u22C3\",\n  \"bigodot\":\"\\u2A00\",\n  \"bigoplus\":\"\\u2A01\",\n  \"bigotimes\":\"\\u2A02\",\n  \"bigsqcup\":\"\\u2A06\",\n  \"bigstar\":\"\\u2605\",\n  \"bigtriangledown\":\"\\u25BD\",\n  \"bigtriangleup\":\"\\u25B3\",\n  \"biguplus\":\"\\u2A04\",\n  \"bigvee\":\"\\u22C1\",\n  \"bigwedge\":\"\\u22C0\",\n  \"bkarow\":\"\\u290D\",\n  \"blacklozenge\":\"\\u29EB\",\n  \"blacksquare\":\"\\u25AA\",\n  \"blacktriangle\":\"\\u25B4\",\n  \"blacktriangledown\":\"\\u25BE\",\n  \"blacktriangleleft\":\"\\u25C2\",\n  \"blacktriangleright\":\"\\u25B8\",\n  \"blank\":\"\\u2423\",\n  \"blk12\":\"\\u2592\",\n  \"blk14\":\"\\u2591\",\n  \"blk34\":\"\\u2593\",\n  \"block\":\"\\u2588\",\n  \"bne\":\"\\u003D\\u20E5\",\n  \"bnequiv\":\"\\u2261\\u20E5\",\n  \"bNot\":\"\\u2AED\",\n  \"bnot\":\"\\u2310\",\n  \"Bopf\":\"\\uD835\\uDD39\",\n  \"bopf\":\"\\uD835\\uDD53\",\n  \"bot\":\"\\u22A5\",\n  \"bottom\":\"\\u22A5\",\n  \"bowtie\":\"\\u22C8\",\n  \"boxbox\":\"\\u29C9\",\n  \"boxDL\":\"\\u2557\",\n  \"boxDl\":\"\\u2556\",\n  \"boxdL\":\"\\u2555\",\n  \"boxdl\":\"\\u2510\",\n  \"boxDR\":\"\\u2554\",\n  \"boxDr\":\"\\u2553\",\n  \"boxdR\":\"\\u2552\",\n  \"boxdr\":\"\\u250C\",\n  \"boxH\":\"\\u2550\",\n  \"boxh\":\"\\u2500\",\n  \"boxHD\":\"\\u2566\",\n  \"boxHd\":\"\\u2564\",\n  \"boxhD\":\"\\u2565\",\n  \"boxhd\":\"\\u252C\",\n  \"boxHU\":\"\\u2569\",\n  \"boxHu\":\"\\u2567\",\n  \"boxhU\":\"\\u2568\",\n  \"boxhu\":\"\\u2534\",\n  \"boxminus\":\"\\u229F\",\n  \"boxplus\":\"\\u229E\",\n  \"boxtimes\":\"\\u22A0\",\n  \"boxUL\":\"\\u255D\",\n  \"boxUl\":\"\\u255C\",\n  \"boxuL\":\"\\u255B\",\n  \"boxul\":\"\\u2518\",\n  \"boxUR\":\"\\u255A\",\n  \"boxUr\":\"\\u2559\",\n  \"boxuR\":\"\\u2558\",\n  \"boxur\":\"\\u2514\",\n  \"boxV\":\"\\u2551\",\n  \"boxv\":\"\\u2502\",\n  \"boxVH\":\"\\u256C\",\n  \"boxVh\":\"\\u256B\",\n  \"boxvH\":\"\\u256A\",\n  \"boxvh\":\"\\u253C\",\n  \"boxVL\":\"\\u2563\",\n  \"boxVl\":\"\\u2562\",\n  \"boxvL\":\"\\u2561\",\n  \"boxvl\":\"\\u2524\",\n  \"boxVR\":\"\\u2560\",\n  \"boxVr\":\"\\u255F\",\n  \"boxvR\":\"\\u255E\",\n  \"boxvr\":\"\\u251C\",\n  \"bprime\":\"\\u2035\",\n  \"Breve\":\"\\u02D8\",\n  \"breve\":\"\\u02D8\",\n  \"brvbar\":\"\\u00A6\",\n  \"Bscr\":\"\\u212C\",\n  \"bscr\":\"\\uD835\\uDCB7\",\n  \"bsemi\":\"\\u204F\",\n  \"bsim\":\"\\u223D\",\n  \"bsime\":\"\\u22CD\",\n  \"bsol\":\"\\u005C\",\n  \"bsolb\":\"\\u29C5\",\n  \"bsolhsub\":\"\\u27C8\",\n  \"bull\":\"\\u2022\",\n  \"bullet\":\"\\u2022\",\n  \"bump\":\"\\u224E\",\n  \"bumpE\":\"\\u2AAE\",\n  \"bumpe\":\"\\u224F\",\n  \"Bumpeq\":\"\\u224E\",\n  \"bumpeq\":\"\\u224F\",\n  \"Cacute\":\"\\u0106\",\n  \"cacute\":\"\\u0107\",\n  \"Cap\":\"\\u22D2\",\n  \"cap\":\"\\u2229\",\n  \"capand\":\"\\u2A44\",\n  \"capbrcup\":\"\\u2A49\",\n  \"capcap\":\"\\u2A4B\",\n  \"capcup\":\"\\u2A47\",\n  \"capdot\":\"\\u2A40\",\n  \"CapitalDifferentialD\":\"\\u2145\",\n  \"caps\":\"\\u2229\\uFE00\",\n  \"caret\":\"\\u2041\",\n  \"caron\":\"\\u02C7\",\n  \"Cayleys\":\"\\u212D\",\n  \"ccaps\":\"\\u2A4D\",\n  \"Ccaron\":\"\\u010C\",\n  \"ccaron\":\"\\u010D\",\n  \"Ccedil\":\"\\u00C7\",\n  \"ccedil\":\"\\u00E7\",\n  \"Ccirc\":\"\\u0108\",\n  \"ccirc\":\"\\u0109\",\n  \"Cconint\":\"\\u2230\",\n  \"ccups\":\"\\u2A4C\",\n  \"ccupssm\":\"\\u2A50\",\n  \"Cdot\":\"\\u010A\",\n  \"cdot\":\"\\u010B\",\n  \"cedil\":\"\\u00B8\",\n  \"Cedilla\":\"\\u00B8\",\n  \"cemptyv\":\"\\u29B2\",\n  \"cent\":\"\\u00A2\",\n  \"CenterDot\":\"\\u00B7\",\n  \"centerdot\":\"\\u00B7\",\n  \"Cfr\":\"\\u212D\",\n  \"cfr\":\"\\uD835\\uDD20\",\n  \"CHcy\":\"\\u0427\",\n  \"chcy\":\"\\u0447\",\n  \"check\":\"\\u2713\",\n  \"checkmark\":\"\\u2713\",\n  \"Chi\":\"\\u03A7\",\n  \"chi\":\"\\u03C7\",\n  \"cir\":\"\\u25CB\",\n  \"circ\":\"\\u02C6\",\n  \"circeq\":\"\\u2257\",\n  \"circlearrowleft\":\"\\u21BA\",\n  \"circlearrowright\":\"\\u21BB\",\n  \"circledast\":\"\\u229B\",\n  \"circledcirc\":\"\\u229A\",\n  \"circleddash\":\"\\u229D\",\n  \"CircleDot\":\"\\u2299\",\n  \"circledR\":\"\\u00AE\",\n  \"circledS\":\"\\u24C8\",\n  \"CircleMinus\":\"\\u2296\",\n  \"CirclePlus\":\"\\u2295\",\n  \"CircleTimes\":\"\\u2297\",\n  \"cirE\":\"\\u29C3\",\n  \"cire\":\"\\u2257\",\n  \"cirfnint\":\"\\u2A10\",\n  \"cirmid\":\"\\u2AEF\",\n  \"cirscir\":\"\\u29C2\",\n  \"ClockwiseContourIntegral\":\"\\u2232\",\n  \"CloseCurlyDoubleQuote\":\"\\u201D\",\n  \"CloseCurlyQuote\":\"\\u2019\",\n  \"clubs\":\"\\u2663\",\n  \"clubsuit\":\"\\u2663\",\n  \"Colon\":\"\\u2237\",\n  \"colon\":\"\\u003A\",\n  \"Colone\":\"\\u2A74\",\n  \"colone\":\"\\u2254\",\n  \"coloneq\":\"\\u2254\",\n  \"comma\":\"\\u002C\",\n  \"commat\":\"\\u0040\",\n  \"comp\":\"\\u2201\",\n  \"compfn\":\"\\u2218\",\n  \"complement\":\"\\u2201\",\n  \"complexes\":\"\\u2102\",\n  \"cong\":\"\\u2245\",\n  \"congdot\":\"\\u2A6D\",\n  \"Congruent\":\"\\u2261\",\n  \"Conint\":\"\\u222F\",\n  \"conint\":\"\\u222E\",\n  \"ContourIntegral\":\"\\u222E\",\n  \"Copf\":\"\\u2102\",\n  \"copf\":\"\\uD835\\uDD54\",\n  \"coprod\":\"\\u2210\",\n  \"Coproduct\":\"\\u2210\",\n  \"COPY\":\"\\u00A9\",\n  \"copy\":\"\\u00A9\",\n  \"copysr\":\"\\u2117\",\n  \"CounterClockwiseContourIntegral\":\"\\u2233\",\n  \"crarr\":\"\\u21B5\",\n  \"Cross\":\"\\u2A2F\",\n  \"cross\":\"\\u2717\",\n  \"Cscr\":\"\\uD835\\uDC9E\",\n  \"cscr\":\"\\uD835\\uDCB8\",\n  \"csub\":\"\\u2ACF\",\n  \"csube\":\"\\u2AD1\",\n  \"csup\":\"\\u2AD0\",\n  \"csupe\":\"\\u2AD2\",\n  \"ctdot\":\"\\u22EF\",\n  \"cudarrl\":\"\\u2938\",\n  \"cudarrr\":\"\\u2935\",\n  \"cuepr\":\"\\u22DE\",\n  \"cuesc\":\"\\u22DF\",\n  \"cularr\":\"\\u21B6\",\n  \"cularrp\":\"\\u293D\",\n  \"Cup\":\"\\u22D3\",\n  \"cup\":\"\\u222A\",\n  \"cupbrcap\":\"\\u2A48\",\n  \"CupCap\":\"\\u224D\",\n  \"cupcap\":\"\\u2A46\",\n  \"cupcup\":\"\\u2A4A\",\n  \"cupdot\":\"\\u228D\",\n  \"cupor\":\"\\u2A45\",\n  \"cups\":\"\\u222A\\uFE00\",\n  \"curarr\":\"\\u21B7\",\n  \"curarrm\":\"\\u293C\",\n  \"curlyeqprec\":\"\\u22DE\",\n  \"curlyeqsucc\":\"\\u22DF\",\n  \"curlyvee\":\"\\u22CE\",\n  \"curlywedge\":\"\\u22CF\",\n  \"curren\":\"\\u00A4\",\n  \"curvearrowleft\":\"\\u21B6\",\n  \"curvearrowright\":\"\\u21B7\",\n  \"cuvee\":\"\\u22CE\",\n  \"cuwed\":\"\\u22CF\",\n  \"cwconint\":\"\\u2232\",\n  \"cwint\":\"\\u2231\",\n  \"cylcty\":\"\\u232D\",\n  \"Dagger\":\"\\u2021\",\n  \"dagger\":\"\\u2020\",\n  \"daleth\":\"\\u2138\",\n  \"Darr\":\"\\u21A1\",\n  \"dArr\":\"\\u21D3\",\n  \"darr\":\"\\u2193\",\n  \"dash\":\"\\u2010\",\n  \"Dashv\":\"\\u2AE4\",\n  \"dashv\":\"\\u22A3\",\n  \"dbkarow\":\"\\u290F\",\n  \"dblac\":\"\\u02DD\",\n  \"Dcaron\":\"\\u010E\",\n  \"dcaron\":\"\\u010F\",\n  \"Dcy\":\"\\u0414\",\n  \"dcy\":\"\\u0434\",\n  \"DD\":\"\\u2145\",\n  \"dd\":\"\\u2146\",\n  \"ddagger\":\"\\u2021\",\n  \"ddarr\":\"\\u21CA\",\n  \"DDotrahd\":\"\\u2911\",\n  \"ddotseq\":\"\\u2A77\",\n  \"deg\":\"\\u00B0\",\n  \"Del\":\"\\u2207\",\n  \"Delta\":\"\\u0394\",\n  \"delta\":\"\\u03B4\",\n  \"demptyv\":\"\\u29B1\",\n  \"dfisht\":\"\\u297F\",\n  \"Dfr\":\"\\uD835\\uDD07\",\n  \"dfr\":\"\\uD835\\uDD21\",\n  \"dHar\":\"\\u2965\",\n  \"dharl\":\"\\u21C3\",\n  \"dharr\":\"\\u21C2\",\n  \"DiacriticalAcute\":\"\\u00B4\",\n  \"DiacriticalDot\":\"\\u02D9\",\n  \"DiacriticalDoubleAcute\":\"\\u02DD\",\n  \"DiacriticalGrave\":\"\\u0060\",\n  \"DiacriticalTilde\":\"\\u02DC\",\n  \"diam\":\"\\u22C4\",\n  \"Diamond\":\"\\u22C4\",\n  \"diamond\":\"\\u22C4\",\n  \"diamondsuit\":\"\\u2666\",\n  \"diams\":\"\\u2666\",\n  \"die\":\"\\u00A8\",\n  \"DifferentialD\":\"\\u2146\",\n  \"digamma\":\"\\u03DD\",\n  \"disin\":\"\\u22F2\",\n  \"div\":\"\\u00F7\",\n  \"divide\":\"\\u00F7\",\n  \"divideontimes\":\"\\u22C7\",\n  \"divonx\":\"\\u22C7\",\n  \"DJcy\":\"\\u0402\",\n  \"djcy\":\"\\u0452\",\n  \"dlcorn\":\"\\u231E\",\n  \"dlcrop\":\"\\u230D\",\n  \"dollar\":\"\\u0024\",\n  \"Dopf\":\"\\uD835\\uDD3B\",\n  \"dopf\":\"\\uD835\\uDD55\",\n  \"Dot\":\"\\u00A8\",\n  \"dot\":\"\\u02D9\",\n  \"DotDot\":\"\\u20DC\",\n  \"doteq\":\"\\u2250\",\n  \"doteqdot\":\"\\u2251\",\n  \"DotEqual\":\"\\u2250\",\n  \"dotminus\":\"\\u2238\",\n  \"dotplus\":\"\\u2214\",\n  \"dotsquare\":\"\\u22A1\",\n  \"doublebarwedge\":\"\\u2306\",\n  \"DoubleContourIntegral\":\"\\u222F\",\n  \"DoubleDot\":\"\\u00A8\",\n  \"DoubleDownArrow\":\"\\u21D3\",\n  \"DoubleLeftArrow\":\"\\u21D0\",\n  \"DoubleLeftRightArrow\":\"\\u21D4\",\n  \"DoubleLeftTee\":\"\\u2AE4\",\n  \"DoubleLongLeftArrow\":\"\\u27F8\",\n  \"DoubleLongLeftRightArrow\":\"\\u27FA\",\n  \"DoubleLongRightArrow\":\"\\u27F9\",\n  \"DoubleRightArrow\":\"\\u21D2\",\n  \"DoubleRightTee\":\"\\u22A8\",\n  \"DoubleUpArrow\":\"\\u21D1\",\n  \"DoubleUpDownArrow\":\"\\u21D5\",\n  \"DoubleVerticalBar\":\"\\u2225\",\n  \"DownArrow\":\"\\u2193\",\n  \"Downarrow\":\"\\u21D3\",\n  \"downarrow\":\"\\u2193\",\n  \"DownArrowBar\":\"\\u2913\",\n  \"DownArrowUpArrow\":\"\\u21F5\",\n  \"DownBreve\":\"\\u0311\",\n  \"downdownarrows\":\"\\u21CA\",\n  \"downharpoonleft\":\"\\u21C3\",\n  \"downharpoonright\":\"\\u21C2\",\n  \"DownLeftRightVector\":\"\\u2950\",\n  \"DownLeftTeeVector\":\"\\u295E\",\n  \"DownLeftVector\":\"\\u21BD\",\n  \"DownLeftVectorBar\":\"\\u2956\",\n  \"DownRightTeeVector\":\"\\u295F\",\n  \"DownRightVector\":\"\\u21C1\",\n  \"DownRightVectorBar\":\"\\u2957\",\n  \"DownTee\":\"\\u22A4\",\n  \"DownTeeArrow\":\"\\u21A7\",\n  \"drbkarow\":\"\\u2910\",\n  \"drcorn\":\"\\u231F\",\n  \"drcrop\":\"\\u230C\",\n  \"Dscr\":\"\\uD835\\uDC9F\",\n  \"dscr\":\"\\uD835\\uDCB9\",\n  \"DScy\":\"\\u0405\",\n  \"dscy\":\"\\u0455\",\n  \"dsol\":\"\\u29F6\",\n  \"Dstrok\":\"\\u0110\",\n  \"dstrok\":\"\\u0111\",\n  \"dtdot\":\"\\u22F1\",\n  \"dtri\":\"\\u25BF\",\n  \"dtrif\":\"\\u25BE\",\n  \"duarr\":\"\\u21F5\",\n  \"duhar\":\"\\u296F\",\n  \"dwangle\":\"\\u29A6\",\n  \"DZcy\":\"\\u040F\",\n  \"dzcy\":\"\\u045F\",\n  \"dzigrarr\":\"\\u27FF\",\n  \"Eacute\":\"\\u00C9\",\n  \"eacute\":\"\\u00E9\",\n  \"easter\":\"\\u2A6E\",\n  \"Ecaron\":\"\\u011A\",\n  \"ecaron\":\"\\u011B\",\n  \"ecir\":\"\\u2256\",\n  \"Ecirc\":\"\\u00CA\",\n  \"ecirc\":\"\\u00EA\",\n  \"ecolon\":\"\\u2255\",\n  \"Ecy\":\"\\u042D\",\n  \"ecy\":\"\\u044D\",\n  \"eDDot\":\"\\u2A77\",\n  \"Edot\":\"\\u0116\",\n  \"eDot\":\"\\u2251\",\n  \"edot\":\"\\u0117\",\n  \"ee\":\"\\u2147\",\n  \"efDot\":\"\\u2252\",\n  \"Efr\":\"\\uD835\\uDD08\",\n  \"efr\":\"\\uD835\\uDD22\",\n  \"eg\":\"\\u2A9A\",\n  \"Egrave\":\"\\u00C8\",\n  \"egrave\":\"\\u00E8\",\n  \"egs\":\"\\u2A96\",\n  \"egsdot\":\"\\u2A98\",\n  \"el\":\"\\u2A99\",\n  \"Element\":\"\\u2208\",\n  \"elinters\":\"\\u23E7\",\n  \"ell\":\"\\u2113\",\n  \"els\":\"\\u2A95\",\n  \"elsdot\":\"\\u2A97\",\n  \"Emacr\":\"\\u0112\",\n  \"emacr\":\"\\u0113\",\n  \"empty\":\"\\u2205\",\n  \"emptyset\":\"\\u2205\",\n  \"EmptySmallSquare\":\"\\u25FB\",\n  \"emptyv\":\"\\u2205\",\n  \"EmptyVerySmallSquare\":\"\\u25AB\",\n  \"emsp\":\"\\u2003\",\n  \"emsp13\":\"\\u2004\",\n  \"emsp14\":\"\\u2005\",\n  \"ENG\":\"\\u014A\",\n  \"eng\":\"\\u014B\",\n  \"ensp\":\"\\u2002\",\n  \"Eogon\":\"\\u0118\",\n  \"eogon\":\"\\u0119\",\n  \"Eopf\":\"\\uD835\\uDD3C\",\n  \"eopf\":\"\\uD835\\uDD56\",\n  \"epar\":\"\\u22D5\",\n  \"eparsl\":\"\\u29E3\",\n  \"eplus\":\"\\u2A71\",\n  \"epsi\":\"\\u03B5\",\n  \"Epsilon\":\"\\u0395\",\n  \"epsilon\":\"\\u03B5\",\n  \"epsiv\":\"\\u03F5\",\n  \"eqcirc\":\"\\u2256\",\n  \"eqcolon\":\"\\u2255\",\n  \"eqsim\":\"\\u2242\",\n  \"eqslantgtr\":\"\\u2A96\",\n  \"eqslantless\":\"\\u2A95\",\n  \"Equal\":\"\\u2A75\",\n  \"equals\":\"\\u003D\",\n  \"EqualTilde\":\"\\u2242\",\n  \"equest\":\"\\u225F\",\n  \"Equilibrium\":\"\\u21CC\",\n  \"equiv\":\"\\u2261\",\n  \"equivDD\":\"\\u2A78\",\n  \"eqvparsl\":\"\\u29E5\",\n  \"erarr\":\"\\u2971\",\n  \"erDot\":\"\\u2253\",\n  \"Escr\":\"\\u2130\",\n  \"escr\":\"\\u212F\",\n  \"esdot\":\"\\u2250\",\n  \"Esim\":\"\\u2A73\",\n  \"esim\":\"\\u2242\",\n  \"Eta\":\"\\u0397\",\n  \"eta\":\"\\u03B7\",\n  \"ETH\":\"\\u00D0\",\n  \"eth\":\"\\u00F0\",\n  \"Euml\":\"\\u00CB\",\n  \"euml\":\"\\u00EB\",\n  \"euro\":\"\\u20AC\",\n  \"excl\":\"\\u0021\",\n  \"exist\":\"\\u2203\",\n  \"Exists\":\"\\u2203\",\n  \"expectation\":\"\\u2130\",\n  \"ExponentialE\":\"\\u2147\",\n  \"exponentiale\":\"\\u2147\",\n  \"fallingdotseq\":\"\\u2252\",\n  \"Fcy\":\"\\u0424\",\n  \"fcy\":\"\\u0444\",\n  \"female\":\"\\u2640\",\n  \"ffilig\":\"\\uFB03\",\n  \"fflig\":\"\\uFB00\",\n  \"ffllig\":\"\\uFB04\",\n  \"Ffr\":\"\\uD835\\uDD09\",\n  \"ffr\":\"\\uD835\\uDD23\",\n  \"filig\":\"\\uFB01\",\n  \"FilledSmallSquare\":\"\\u25FC\",\n  \"FilledVerySmallSquare\":\"\\u25AA\",\n  \"fjlig\":\"\\u0066\\u006A\",\n  \"flat\":\"\\u266D\",\n  \"fllig\":\"\\uFB02\",\n  \"fltns\":\"\\u25B1\",\n  \"fnof\":\"\\u0192\",\n  \"Fopf\":\"\\uD835\\uDD3D\",\n  \"fopf\":\"\\uD835\\uDD57\",\n  \"ForAll\":\"\\u2200\",\n  \"forall\":\"\\u2200\",\n  \"fork\":\"\\u22D4\",\n  \"forkv\":\"\\u2AD9\",\n  \"Fouriertrf\":\"\\u2131\",\n  \"fpartint\":\"\\u2A0D\",\n  \"frac12\":\"\\u00BD\",\n  \"frac13\":\"\\u2153\",\n  \"frac14\":\"\\u00BC\",\n  \"frac15\":\"\\u2155\",\n  \"frac16\":\"\\u2159\",\n  \"frac18\":\"\\u215B\",\n  \"frac23\":\"\\u2154\",\n  \"frac25\":\"\\u2156\",\n  \"frac34\":\"\\u00BE\",\n  \"frac35\":\"\\u2157\",\n  \"frac38\":\"\\u215C\",\n  \"frac45\":\"\\u2158\",\n  \"frac56\":\"\\u215A\",\n  \"frac58\":\"\\u215D\",\n  \"frac78\":\"\\u215E\",\n  \"frasl\":\"\\u2044\",\n  \"frown\":\"\\u2322\",\n  \"Fscr\":\"\\u2131\",\n  \"fscr\":\"\\uD835\\uDCBB\",\n  \"gacute\":\"\\u01F5\",\n  \"Gamma\":\"\\u0393\",\n  \"gamma\":\"\\u03B3\",\n  \"Gammad\":\"\\u03DC\",\n  \"gammad\":\"\\u03DD\",\n  \"gap\":\"\\u2A86\",\n  \"Gbreve\":\"\\u011E\",\n  \"gbreve\":\"\\u011F\",\n  \"Gcedil\":\"\\u0122\",\n  \"Gcirc\":\"\\u011C\",\n  \"gcirc\":\"\\u011D\",\n  \"Gcy\":\"\\u0413\",\n  \"gcy\":\"\\u0433\",\n  \"Gdot\":\"\\u0120\",\n  \"gdot\":\"\\u0121\",\n  \"gE\":\"\\u2267\",\n  \"ge\":\"\\u2265\",\n  \"gEl\":\"\\u2A8C\",\n  \"gel\":\"\\u22DB\",\n  \"geq\":\"\\u2265\",\n  \"geqq\":\"\\u2267\",\n  \"geqslant\":\"\\u2A7E\",\n  \"ges\":\"\\u2A7E\",\n  \"gescc\":\"\\u2AA9\",\n  \"gesdot\":\"\\u2A80\",\n  \"gesdoto\":\"\\u2A82\",\n  \"gesdotol\":\"\\u2A84\",\n  \"gesl\":\"\\u22DB\\uFE00\",\n  \"gesles\":\"\\u2A94\",\n  \"Gfr\":\"\\uD835\\uDD0A\",\n  \"gfr\":\"\\uD835\\uDD24\",\n  \"Gg\":\"\\u22D9\",\n  \"gg\":\"\\u226B\",\n  \"ggg\":\"\\u22D9\",\n  \"gimel\":\"\\u2137\",\n  \"GJcy\":\"\\u0403\",\n  \"gjcy\":\"\\u0453\",\n  \"gl\":\"\\u2277\",\n  \"gla\":\"\\u2AA5\",\n  \"glE\":\"\\u2A92\",\n  \"glj\":\"\\u2AA4\",\n  \"gnap\":\"\\u2A8A\",\n  \"gnapprox\":\"\\u2A8A\",\n  \"gnE\":\"\\u2269\",\n  \"gne\":\"\\u2A88\",\n  \"gneq\":\"\\u2A88\",\n  \"gneqq\":\"\\u2269\",\n  \"gnsim\":\"\\u22E7\",\n  \"Gopf\":\"\\uD835\\uDD3E\",\n  \"gopf\":\"\\uD835\\uDD58\",\n  \"grave\":\"\\u0060\",\n  \"GreaterEqual\":\"\\u2265\",\n  \"GreaterEqualLess\":\"\\u22DB\",\n  \"GreaterFullEqual\":\"\\u2267\",\n  \"GreaterGreater\":\"\\u2AA2\",\n  \"GreaterLess\":\"\\u2277\",\n  \"GreaterSlantEqual\":\"\\u2A7E\",\n  \"GreaterTilde\":\"\\u2273\",\n  \"Gscr\":\"\\uD835\\uDCA2\",\n  \"gscr\":\"\\u210A\",\n  \"gsim\":\"\\u2273\",\n  \"gsime\":\"\\u2A8E\",\n  \"gsiml\":\"\\u2A90\",\n  \"GT\":\"\\u003E\",\n  \"Gt\":\"\\u226B\",\n  \"gt\":\"\\u003E\",\n  \"gtcc\":\"\\u2AA7\",\n  \"gtcir\":\"\\u2A7A\",\n  \"gtdot\":\"\\u22D7\",\n  \"gtlPar\":\"\\u2995\",\n  \"gtquest\":\"\\u2A7C\",\n  \"gtrapprox\":\"\\u2A86\",\n  \"gtrarr\":\"\\u2978\",\n  \"gtrdot\":\"\\u22D7\",\n  \"gtreqless\":\"\\u22DB\",\n  \"gtreqqless\":\"\\u2A8C\",\n  \"gtrless\":\"\\u2277\",\n  \"gtrsim\":\"\\u2273\",\n  \"gvertneqq\":\"\\u2269\\uFE00\",\n  \"gvnE\":\"\\u2269\\uFE00\",\n  \"Hacek\":\"\\u02C7\",\n  \"hairsp\":\"\\u200A\",\n  \"half\":\"\\u00BD\",\n  \"hamilt\":\"\\u210B\",\n  \"HARDcy\":\"\\u042A\",\n  \"hardcy\":\"\\u044A\",\n  \"hArr\":\"\\u21D4\",\n  \"harr\":\"\\u2194\",\n  \"harrcir\":\"\\u2948\",\n  \"harrw\":\"\\u21AD\",\n  \"Hat\":\"\\u005E\",\n  \"hbar\":\"\\u210F\",\n  \"Hcirc\":\"\\u0124\",\n  \"hcirc\":\"\\u0125\",\n  \"hearts\":\"\\u2665\",\n  \"heartsuit\":\"\\u2665\",\n  \"hellip\":\"\\u2026\",\n  \"hercon\":\"\\u22B9\",\n  \"Hfr\":\"\\u210C\",\n  \"hfr\":\"\\uD835\\uDD25\",\n  \"HilbertSpace\":\"\\u210B\",\n  \"hksearow\":\"\\u2925\",\n  \"hkswarow\":\"\\u2926\",\n  \"hoarr\":\"\\u21FF\",\n  \"homtht\":\"\\u223B\",\n  \"hookleftarrow\":\"\\u21A9\",\n  \"hookrightarrow\":\"\\u21AA\",\n  \"Hopf\":\"\\u210D\",\n  \"hopf\":\"\\uD835\\uDD59\",\n  \"horbar\":\"\\u2015\",\n  \"HorizontalLine\":\"\\u2500\",\n  \"Hscr\":\"\\u210B\",\n  \"hscr\":\"\\uD835\\uDCBD\",\n  \"hslash\":\"\\u210F\",\n  \"Hstrok\":\"\\u0126\",\n  \"hstrok\":\"\\u0127\",\n  \"HumpDownHump\":\"\\u224E\",\n  \"HumpEqual\":\"\\u224F\",\n  \"hybull\":\"\\u2043\",\n  \"hyphen\":\"\\u2010\",\n  \"Iacute\":\"\\u00CD\",\n  \"iacute\":\"\\u00ED\",\n  \"ic\":\"\\u2063\",\n  \"Icirc\":\"\\u00CE\",\n  \"icirc\":\"\\u00EE\",\n  \"Icy\":\"\\u0418\",\n  \"icy\":\"\\u0438\",\n  \"Idot\":\"\\u0130\",\n  \"IEcy\":\"\\u0415\",\n  \"iecy\":\"\\u0435\",\n  \"iexcl\":\"\\u00A1\",\n  \"iff\":\"\\u21D4\",\n  \"Ifr\":\"\\u2111\",\n  \"ifr\":\"\\uD835\\uDD26\",\n  \"Igrave\":\"\\u00CC\",\n  \"igrave\":\"\\u00EC\",\n  \"ii\":\"\\u2148\",\n  \"iiiint\":\"\\u2A0C\",\n  \"iiint\":\"\\u222D\",\n  \"iinfin\":\"\\u29DC\",\n  \"iiota\":\"\\u2129\",\n  \"IJlig\":\"\\u0132\",\n  \"ijlig\":\"\\u0133\",\n  \"Im\":\"\\u2111\",\n  \"Imacr\":\"\\u012A\",\n  \"imacr\":\"\\u012B\",\n  \"image\":\"\\u2111\",\n  \"ImaginaryI\":\"\\u2148\",\n  \"imagline\":\"\\u2110\",\n  \"imagpart\":\"\\u2111\",\n  \"imath\":\"\\u0131\",\n  \"imof\":\"\\u22B7\",\n  \"imped\":\"\\u01B5\",\n  \"Implies\":\"\\u21D2\",\n  \"in\":\"\\u2208\",\n  \"incare\":\"\\u2105\",\n  \"infin\":\"\\u221E\",\n  \"infintie\":\"\\u29DD\",\n  \"inodot\":\"\\u0131\",\n  \"Int\":\"\\u222C\",\n  \"int\":\"\\u222B\",\n  \"intcal\":\"\\u22BA\",\n  \"integers\":\"\\u2124\",\n  \"Integral\":\"\\u222B\",\n  \"intercal\":\"\\u22BA\",\n  \"Intersection\":\"\\u22C2\",\n  \"intlarhk\":\"\\u2A17\",\n  \"intprod\":\"\\u2A3C\",\n  \"InvisibleComma\":\"\\u2063\",\n  \"InvisibleTimes\":\"\\u2062\",\n  \"IOcy\":\"\\u0401\",\n  \"iocy\":\"\\u0451\",\n  \"Iogon\":\"\\u012E\",\n  \"iogon\":\"\\u012F\",\n  \"Iopf\":\"\\uD835\\uDD40\",\n  \"iopf\":\"\\uD835\\uDD5A\",\n  \"Iota\":\"\\u0399\",\n  \"iota\":\"\\u03B9\",\n  \"iprod\":\"\\u2A3C\",\n  \"iquest\":\"\\u00BF\",\n  \"Iscr\":\"\\u2110\",\n  \"iscr\":\"\\uD835\\uDCBE\",\n  \"isin\":\"\\u2208\",\n  \"isindot\":\"\\u22F5\",\n  \"isinE\":\"\\u22F9\",\n  \"isins\":\"\\u22F4\",\n  \"isinsv\":\"\\u22F3\",\n  \"isinv\":\"\\u2208\",\n  \"it\":\"\\u2062\",\n  \"Itilde\":\"\\u0128\",\n  \"itilde\":\"\\u0129\",\n  \"Iukcy\":\"\\u0406\",\n  \"iukcy\":\"\\u0456\",\n  \"Iuml\":\"\\u00CF\",\n  \"iuml\":\"\\u00EF\",\n  \"Jcirc\":\"\\u0134\",\n  \"jcirc\":\"\\u0135\",\n  \"Jcy\":\"\\u0419\",\n  \"jcy\":\"\\u0439\",\n  \"Jfr\":\"\\uD835\\uDD0D\",\n  \"jfr\":\"\\uD835\\uDD27\",\n  \"jmath\":\"\\u0237\",\n  \"Jopf\":\"\\uD835\\uDD41\",\n  \"jopf\":\"\\uD835\\uDD5B\",\n  \"Jscr\":\"\\uD835\\uDCA5\",\n  \"jscr\":\"\\uD835\\uDCBF\",\n  \"Jsercy\":\"\\u0408\",\n  \"jsercy\":\"\\u0458\",\n  \"Jukcy\":\"\\u0404\",\n  \"jukcy\":\"\\u0454\",\n  \"Kappa\":\"\\u039A\",\n  \"kappa\":\"\\u03BA\",\n  \"kappav\":\"\\u03F0\",\n  \"Kcedil\":\"\\u0136\",\n  \"kcedil\":\"\\u0137\",\n  \"Kcy\":\"\\u041A\",\n  \"kcy\":\"\\u043A\",\n  \"Kfr\":\"\\uD835\\uDD0E\",\n  \"kfr\":\"\\uD835\\uDD28\",\n  \"kgreen\":\"\\u0138\",\n  \"KHcy\":\"\\u0425\",\n  \"khcy\":\"\\u0445\",\n  \"KJcy\":\"\\u040C\",\n  \"kjcy\":\"\\u045C\",\n  \"Kopf\":\"\\uD835\\uDD42\",\n  \"kopf\":\"\\uD835\\uDD5C\",\n  \"Kscr\":\"\\uD835\\uDCA6\",\n  \"kscr\":\"\\uD835\\uDCC0\",\n  \"lAarr\":\"\\u21DA\",\n  \"Lacute\":\"\\u0139\",\n  \"lacute\":\"\\u013A\",\n  \"laemptyv\":\"\\u29B4\",\n  \"lagran\":\"\\u2112\",\n  \"Lambda\":\"\\u039B\",\n  \"lambda\":\"\\u03BB\",\n  \"Lang\":\"\\u27EA\",\n  \"lang\":\"\\u27E8\",\n  \"langd\":\"\\u2991\",\n  \"langle\":\"\\u27E8\",\n  \"lap\":\"\\u2A85\",\n  \"Laplacetrf\":\"\\u2112\",\n  \"laquo\":\"\\u00AB\",\n  \"Larr\":\"\\u219E\",\n  \"lArr\":\"\\u21D0\",\n  \"larr\":\"\\u2190\",\n  \"larrb\":\"\\u21E4\",\n  \"larrbfs\":\"\\u291F\",\n  \"larrfs\":\"\\u291D\",\n  \"larrhk\":\"\\u21A9\",\n  \"larrlp\":\"\\u21AB\",\n  \"larrpl\":\"\\u2939\",\n  \"larrsim\":\"\\u2973\",\n  \"larrtl\":\"\\u21A2\",\n  \"lat\":\"\\u2AAB\",\n  \"lAtail\":\"\\u291B\",\n  \"latail\":\"\\u2919\",\n  \"late\":\"\\u2AAD\",\n  \"lates\":\"\\u2AAD\\uFE00\",\n  \"lBarr\":\"\\u290E\",\n  \"lbarr\":\"\\u290C\",\n  \"lbbrk\":\"\\u2772\",\n  \"lbrace\":\"\\u007B\",\n  \"lbrack\":\"\\u005B\",\n  \"lbrke\":\"\\u298B\",\n  \"lbrksld\":\"\\u298F\",\n  \"lbrkslu\":\"\\u298D\",\n  \"Lcaron\":\"\\u013D\",\n  \"lcaron\":\"\\u013E\",\n  \"Lcedil\":\"\\u013B\",\n  \"lcedil\":\"\\u013C\",\n  \"lceil\":\"\\u2308\",\n  \"lcub\":\"\\u007B\",\n  \"Lcy\":\"\\u041B\",\n  \"lcy\":\"\\u043B\",\n  \"ldca\":\"\\u2936\",\n  \"ldquo\":\"\\u201C\",\n  \"ldquor\":\"\\u201E\",\n  \"ldrdhar\":\"\\u2967\",\n  \"ldrushar\":\"\\u294B\",\n  \"ldsh\":\"\\u21B2\",\n  \"lE\":\"\\u2266\",\n  \"le\":\"\\u2264\",\n  \"LeftAngleBracket\":\"\\u27E8\",\n  \"LeftArrow\":\"\\u2190\",\n  \"Leftarrow\":\"\\u21D0\",\n  \"leftarrow\":\"\\u2190\",\n  \"LeftArrowBar\":\"\\u21E4\",\n  \"LeftArrowRightArrow\":\"\\u21C6\",\n  \"leftarrowtail\":\"\\u21A2\",\n  \"LeftCeiling\":\"\\u2308\",\n  \"LeftDoubleBracket\":\"\\u27E6\",\n  \"LeftDownTeeVector\":\"\\u2961\",\n  \"LeftDownVector\":\"\\u21C3\",\n  \"LeftDownVectorBar\":\"\\u2959\",\n  \"LeftFloor\":\"\\u230A\",\n  \"leftharpoondown\":\"\\u21BD\",\n  \"leftharpoonup\":\"\\u21BC\",\n  \"leftleftarrows\":\"\\u21C7\",\n  \"LeftRightArrow\":\"\\u2194\",\n  \"Leftrightarrow\":\"\\u21D4\",\n  \"leftrightarrow\":\"\\u2194\",\n  \"leftrightarrows\":\"\\u21C6\",\n  \"leftrightharpoons\":\"\\u21CB\",\n  \"leftrightsquigarrow\":\"\\u21AD\",\n  \"LeftRightVector\":\"\\u294E\",\n  \"LeftTee\":\"\\u22A3\",\n  \"LeftTeeArrow\":\"\\u21A4\",\n  \"LeftTeeVector\":\"\\u295A\",\n  \"leftthreetimes\":\"\\u22CB\",\n  \"LeftTriangle\":\"\\u22B2\",\n  \"LeftTriangleBar\":\"\\u29CF\",\n  \"LeftTriangleEqual\":\"\\u22B4\",\n  \"LeftUpDownVector\":\"\\u2951\",\n  \"LeftUpTeeVector\":\"\\u2960\",\n  \"LeftUpVector\":\"\\u21BF\",\n  \"LeftUpVectorBar\":\"\\u2958\",\n  \"LeftVector\":\"\\u21BC\",\n  \"LeftVectorBar\":\"\\u2952\",\n  \"lEg\":\"\\u2A8B\",\n  \"leg\":\"\\u22DA\",\n  \"leq\":\"\\u2264\",\n  \"leqq\":\"\\u2266\",\n  \"leqslant\":\"\\u2A7D\",\n  \"les\":\"\\u2A7D\",\n  \"lescc\":\"\\u2AA8\",\n  \"lesdot\":\"\\u2A7F\",\n  \"lesdoto\":\"\\u2A81\",\n  \"lesdotor\":\"\\u2A83\",\n  \"lesg\":\"\\u22DA\\uFE00\",\n  \"lesges\":\"\\u2A93\",\n  \"lessapprox\":\"\\u2A85\",\n  \"lessdot\":\"\\u22D6\",\n  \"lesseqgtr\":\"\\u22DA\",\n  \"lesseqqgtr\":\"\\u2A8B\",\n  \"LessEqualGreater\":\"\\u22DA\",\n  \"LessFullEqual\":\"\\u2266\",\n  \"LessGreater\":\"\\u2276\",\n  \"lessgtr\":\"\\u2276\",\n  \"LessLess\":\"\\u2AA1\",\n  \"lesssim\":\"\\u2272\",\n  \"LessSlantEqual\":\"\\u2A7D\",\n  \"LessTilde\":\"\\u2272\",\n  \"lfisht\":\"\\u297C\",\n  \"lfloor\":\"\\u230A\",\n  \"Lfr\":\"\\uD835\\uDD0F\",\n  \"lfr\":\"\\uD835\\uDD29\",\n  \"lg\":\"\\u2276\",\n  \"lgE\":\"\\u2A91\",\n  \"lHar\":\"\\u2962\",\n  \"lhard\":\"\\u21BD\",\n  \"lharu\":\"\\u21BC\",\n  \"lharul\":\"\\u296A\",\n  \"lhblk\":\"\\u2584\",\n  \"LJcy\":\"\\u0409\",\n  \"ljcy\":\"\\u0459\",\n  \"Ll\":\"\\u22D8\",\n  \"ll\":\"\\u226A\",\n  \"llarr\":\"\\u21C7\",\n  \"llcorner\":\"\\u231E\",\n  \"Lleftarrow\":\"\\u21DA\",\n  \"llhard\":\"\\u296B\",\n  \"lltri\":\"\\u25FA\",\n  \"Lmidot\":\"\\u013F\",\n  \"lmidot\":\"\\u0140\",\n  \"lmoust\":\"\\u23B0\",\n  \"lmoustache\":\"\\u23B0\",\n  \"lnap\":\"\\u2A89\",\n  \"lnapprox\":\"\\u2A89\",\n  \"lnE\":\"\\u2268\",\n  \"lne\":\"\\u2A87\",\n  \"lneq\":\"\\u2A87\",\n  \"lneqq\":\"\\u2268\",\n  \"lnsim\":\"\\u22E6\",\n  \"loang\":\"\\u27EC\",\n  \"loarr\":\"\\u21FD\",\n  \"lobrk\":\"\\u27E6\",\n  \"LongLeftArrow\":\"\\u27F5\",\n  \"Longleftarrow\":\"\\u27F8\",\n  \"longleftarrow\":\"\\u27F5\",\n  \"LongLeftRightArrow\":\"\\u27F7\",\n  \"Longleftrightarrow\":\"\\u27FA\",\n  \"longleftrightarrow\":\"\\u27F7\",\n  \"longmapsto\":\"\\u27FC\",\n  \"LongRightArrow\":\"\\u27F6\",\n  \"Longrightarrow\":\"\\u27F9\",\n  \"longrightarrow\":\"\\u27F6\",\n  \"looparrowleft\":\"\\u21AB\",\n  \"looparrowright\":\"\\u21AC\",\n  \"lopar\":\"\\u2985\",\n  \"Lopf\":\"\\uD835\\uDD43\",\n  \"lopf\":\"\\uD835\\uDD5D\",\n  \"loplus\":\"\\u2A2D\",\n  \"lotimes\":\"\\u2A34\",\n  \"lowast\":\"\\u2217\",\n  \"lowbar\":\"\\u005F\",\n  \"LowerLeftArrow\":\"\\u2199\",\n  \"LowerRightArrow\":\"\\u2198\",\n  \"loz\":\"\\u25CA\",\n  \"lozenge\":\"\\u25CA\",\n  \"lozf\":\"\\u29EB\",\n  \"lpar\":\"\\u0028\",\n  \"lparlt\":\"\\u2993\",\n  \"lrarr\":\"\\u21C6\",\n  \"lrcorner\":\"\\u231F\",\n  \"lrhar\":\"\\u21CB\",\n  \"lrhard\":\"\\u296D\",\n  \"lrm\":\"\\u200E\",\n  \"lrtri\":\"\\u22BF\",\n  \"lsaquo\":\"\\u2039\",\n  \"Lscr\":\"\\u2112\",\n  \"lscr\":\"\\uD835\\uDCC1\",\n  \"Lsh\":\"\\u21B0\",\n  \"lsh\":\"\\u21B0\",\n  \"lsim\":\"\\u2272\",\n  \"lsime\":\"\\u2A8D\",\n  \"lsimg\":\"\\u2A8F\",\n  \"lsqb\":\"\\u005B\",\n  \"lsquo\":\"\\u2018\",\n  \"lsquor\":\"\\u201A\",\n  \"Lstrok\":\"\\u0141\",\n  \"lstrok\":\"\\u0142\",\n  \"LT\":\"\\u003C\",\n  \"Lt\":\"\\u226A\",\n  \"lt\":\"\\u003C\",\n  \"ltcc\":\"\\u2AA6\",\n  \"ltcir\":\"\\u2A79\",\n  \"ltdot\":\"\\u22D6\",\n  \"lthree\":\"\\u22CB\",\n  \"ltimes\":\"\\u22C9\",\n  \"ltlarr\":\"\\u2976\",\n  \"ltquest\":\"\\u2A7B\",\n  \"ltri\":\"\\u25C3\",\n  \"ltrie\":\"\\u22B4\",\n  \"ltrif\":\"\\u25C2\",\n  \"ltrPar\":\"\\u2996\",\n  \"lurdshar\":\"\\u294A\",\n  \"luruhar\":\"\\u2966\",\n  \"lvertneqq\":\"\\u2268\\uFE00\",\n  \"lvnE\":\"\\u2268\\uFE00\",\n  \"macr\":\"\\u00AF\",\n  \"male\":\"\\u2642\",\n  \"malt\":\"\\u2720\",\n  \"maltese\":\"\\u2720\",\n  \"Map\":\"\\u2905\",\n  \"map\":\"\\u21A6\",\n  \"mapsto\":\"\\u21A6\",\n  \"mapstodown\":\"\\u21A7\",\n  \"mapstoleft\":\"\\u21A4\",\n  \"mapstoup\":\"\\u21A5\",\n  \"marker\":\"\\u25AE\",\n  \"mcomma\":\"\\u2A29\",\n  \"Mcy\":\"\\u041C\",\n  \"mcy\":\"\\u043C\",\n  \"mdash\":\"\\u2014\",\n  \"mDDot\":\"\\u223A\",\n  \"measuredangle\":\"\\u2221\",\n  \"MediumSpace\":\"\\u205F\",\n  \"Mellintrf\":\"\\u2133\",\n  \"Mfr\":\"\\uD835\\uDD10\",\n  \"mfr\":\"\\uD835\\uDD2A\",\n  \"mho\":\"\\u2127\",\n  \"micro\":\"\\u00B5\",\n  \"mid\":\"\\u2223\",\n  \"midast\":\"\\u002A\",\n  \"midcir\":\"\\u2AF0\",\n  \"middot\":\"\\u00B7\",\n  \"minus\":\"\\u2212\",\n  \"minusb\":\"\\u229F\",\n  \"minusd\":\"\\u2238\",\n  \"minusdu\":\"\\u2A2A\",\n  \"MinusPlus\":\"\\u2213\",\n  \"mlcp\":\"\\u2ADB\",\n  \"mldr\":\"\\u2026\",\n  \"mnplus\":\"\\u2213\",\n  \"models\":\"\\u22A7\",\n  \"Mopf\":\"\\uD835\\uDD44\",\n  \"mopf\":\"\\uD835\\uDD5E\",\n  \"mp\":\"\\u2213\",\n  \"Mscr\":\"\\u2133\",\n  \"mscr\":\"\\uD835\\uDCC2\",\n  \"mstpos\":\"\\u223E\",\n  \"Mu\":\"\\u039C\",\n  \"mu\":\"\\u03BC\",\n  \"multimap\":\"\\u22B8\",\n  \"mumap\":\"\\u22B8\",\n  \"nabla\":\"\\u2207\",\n  \"Nacute\":\"\\u0143\",\n  \"nacute\":\"\\u0144\",\n  \"nang\":\"\\u2220\\u20D2\",\n  \"nap\":\"\\u2249\",\n  \"napE\":\"\\u2A70\\u0338\",\n  \"napid\":\"\\u224B\\u0338\",\n  \"napos\":\"\\u0149\",\n  \"napprox\":\"\\u2249\",\n  \"natur\":\"\\u266E\",\n  \"natural\":\"\\u266E\",\n  \"naturals\":\"\\u2115\",\n  \"nbsp\":\"\\u00A0\",\n  \"nbump\":\"\\u224E\\u0338\",\n  \"nbumpe\":\"\\u224F\\u0338\",\n  \"ncap\":\"\\u2A43\",\n  \"Ncaron\":\"\\u0147\",\n  \"ncaron\":\"\\u0148\",\n  \"Ncedil\":\"\\u0145\",\n  \"ncedil\":\"\\u0146\",\n  \"ncong\":\"\\u2247\",\n  \"ncongdot\":\"\\u2A6D\\u0338\",\n  \"ncup\":\"\\u2A42\",\n  \"Ncy\":\"\\u041D\",\n  \"ncy\":\"\\u043D\",\n  \"ndash\":\"\\u2013\",\n  \"ne\":\"\\u2260\",\n  \"nearhk\":\"\\u2924\",\n  \"neArr\":\"\\u21D7\",\n  \"nearr\":\"\\u2197\",\n  \"nearrow\":\"\\u2197\",\n  \"nedot\":\"\\u2250\\u0338\",\n  \"NegativeMediumSpace\":\"\\u200B\",\n  \"NegativeThickSpace\":\"\\u200B\",\n  \"NegativeThinSpace\":\"\\u200B\",\n  \"NegativeVeryThinSpace\":\"\\u200B\",\n  \"nequiv\":\"\\u2262\",\n  \"nesear\":\"\\u2928\",\n  \"nesim\":\"\\u2242\\u0338\",\n  \"NestedGreaterGreater\":\"\\u226B\",\n  \"NestedLessLess\":\"\\u226A\",\n  \"NewLine\":\"\\u000A\",\n  \"nexist\":\"\\u2204\",\n  \"nexists\":\"\\u2204\",\n  \"Nfr\":\"\\uD835\\uDD11\",\n  \"nfr\":\"\\uD835\\uDD2B\",\n  \"ngE\":\"\\u2267\\u0338\",\n  \"nge\":\"\\u2271\",\n  \"ngeq\":\"\\u2271\",\n  \"ngeqq\":\"\\u2267\\u0338\",\n  \"ngeqslant\":\"\\u2A7E\\u0338\",\n  \"nges\":\"\\u2A7E\\u0338\",\n  \"nGg\":\"\\u22D9\\u0338\",\n  \"ngsim\":\"\\u2275\",\n  \"nGt\":\"\\u226B\\u20D2\",\n  \"ngt\":\"\\u226F\",\n  \"ngtr\":\"\\u226F\",\n  \"nGtv\":\"\\u226B\\u0338\",\n  \"nhArr\":\"\\u21CE\",\n  \"nharr\":\"\\u21AE\",\n  \"nhpar\":\"\\u2AF2\",\n  \"ni\":\"\\u220B\",\n  \"nis\":\"\\u22FC\",\n  \"nisd\":\"\\u22FA\",\n  \"niv\":\"\\u220B\",\n  \"NJcy\":\"\\u040A\",\n  \"njcy\":\"\\u045A\",\n  \"nlArr\":\"\\u21CD\",\n  \"nlarr\":\"\\u219A\",\n  \"nldr\":\"\\u2025\",\n  \"nlE\":\"\\u2266\\u0338\",\n  \"nle\":\"\\u2270\",\n  \"nLeftarrow\":\"\\u21CD\",\n  \"nleftarrow\":\"\\u219A\",\n  \"nLeftrightarrow\":\"\\u21CE\",\n  \"nleftrightarrow\":\"\\u21AE\",\n  \"nleq\":\"\\u2270\",\n  \"nleqq\":\"\\u2266\\u0338\",\n  \"nleqslant\":\"\\u2A7D\\u0338\",\n  \"nles\":\"\\u2A7D\\u0338\",\n  \"nless\":\"\\u226E\",\n  \"nLl\":\"\\u22D8\\u0338\",\n  \"nlsim\":\"\\u2274\",\n  \"nLt\":\"\\u226A\\u20D2\",\n  \"nlt\":\"\\u226E\",\n  \"nltri\":\"\\u22EA\",\n  \"nltrie\":\"\\u22EC\",\n  \"nLtv\":\"\\u226A\\u0338\",\n  \"nmid\":\"\\u2224\",\n  \"NoBreak\":\"\\u2060\",\n  \"NonBreakingSpace\":\"\\u00A0\",\n  \"Nopf\":\"\\u2115\",\n  \"nopf\":\"\\uD835\\uDD5F\",\n  \"Not\":\"\\u2AEC\",\n  \"not\":\"\\u00AC\",\n  \"NotCongruent\":\"\\u2262\",\n  \"NotCupCap\":\"\\u226D\",\n  \"NotDoubleVerticalBar\":\"\\u2226\",\n  \"NotElement\":\"\\u2209\",\n  \"NotEqual\":\"\\u2260\",\n  \"NotEqualTilde\":\"\\u2242\\u0338\",\n  \"NotExists\":\"\\u2204\",\n  \"NotGreater\":\"\\u226F\",\n  \"NotGreaterEqual\":\"\\u2271\",\n  \"NotGreaterFullEqual\":\"\\u2267\\u0338\",\n  \"NotGreaterGreater\":\"\\u226B\\u0338\",\n  \"NotGreaterLess\":\"\\u2279\",\n  \"NotGreaterSlantEqual\":\"\\u2A7E\\u0338\",\n  \"NotGreaterTilde\":\"\\u2275\",\n  \"NotHumpDownHump\":\"\\u224E\\u0338\",\n  \"NotHumpEqual\":\"\\u224F\\u0338\",\n  \"notin\":\"\\u2209\",\n  \"notindot\":\"\\u22F5\\u0338\",\n  \"notinE\":\"\\u22F9\\u0338\",\n  \"notinva\":\"\\u2209\",\n  \"notinvb\":\"\\u22F7\",\n  \"notinvc\":\"\\u22F6\",\n  \"NotLeftTriangle\":\"\\u22EA\",\n  \"NotLeftTriangleBar\":\"\\u29CF\\u0338\",\n  \"NotLeftTriangleEqual\":\"\\u22EC\",\n  \"NotLess\":\"\\u226E\",\n  \"NotLessEqual\":\"\\u2270\",\n  \"NotLessGreater\":\"\\u2278\",\n  \"NotLessLess\":\"\\u226A\\u0338\",\n  \"NotLessSlantEqual\":\"\\u2A7D\\u0338\",\n  \"NotLessTilde\":\"\\u2274\",\n  \"NotNestedGreaterGreater\":\"\\u2AA2\\u0338\",\n  \"NotNestedLessLess\":\"\\u2AA1\\u0338\",\n  \"notni\":\"\\u220C\",\n  \"notniva\":\"\\u220C\",\n  \"notnivb\":\"\\u22FE\",\n  \"notnivc\":\"\\u22FD\",\n  \"NotPrecedes\":\"\\u2280\",\n  \"NotPrecedesEqual\":\"\\u2AAF\\u0338\",\n  \"NotPrecedesSlantEqual\":\"\\u22E0\",\n  \"NotReverseElement\":\"\\u220C\",\n  \"NotRightTriangle\":\"\\u22EB\",\n  \"NotRightTriangleBar\":\"\\u29D0\\u0338\",\n  \"NotRightTriangleEqual\":\"\\u22ED\",\n  \"NotSquareSubset\":\"\\u228F\\u0338\",\n  \"NotSquareSubsetEqual\":\"\\u22E2\",\n  \"NotSquareSuperset\":\"\\u2290\\u0338\",\n  \"NotSquareSupersetEqual\":\"\\u22E3\",\n  \"NotSubset\":\"\\u2282\\u20D2\",\n  \"NotSubsetEqual\":\"\\u2288\",\n  \"NotSucceeds\":\"\\u2281\",\n  \"NotSucceedsEqual\":\"\\u2AB0\\u0338\",\n  \"NotSucceedsSlantEqual\":\"\\u22E1\",\n  \"NotSucceedsTilde\":\"\\u227F\\u0338\",\n  \"NotSuperset\":\"\\u2283\\u20D2\",\n  \"NotSupersetEqual\":\"\\u2289\",\n  \"NotTilde\":\"\\u2241\",\n  \"NotTildeEqual\":\"\\u2244\",\n  \"NotTildeFullEqual\":\"\\u2247\",\n  \"NotTildeTilde\":\"\\u2249\",\n  \"NotVerticalBar\":\"\\u2224\",\n  \"npar\":\"\\u2226\",\n  \"nparallel\":\"\\u2226\",\n  \"nparsl\":\"\\u2AFD\\u20E5\",\n  \"npart\":\"\\u2202\\u0338\",\n  \"npolint\":\"\\u2A14\",\n  \"npr\":\"\\u2280\",\n  \"nprcue\":\"\\u22E0\",\n  \"npre\":\"\\u2AAF\\u0338\",\n  \"nprec\":\"\\u2280\",\n  \"npreceq\":\"\\u2AAF\\u0338\",\n  \"nrArr\":\"\\u21CF\",\n  \"nrarr\":\"\\u219B\",\n  \"nrarrc\":\"\\u2933\\u0338\",\n  \"nrarrw\":\"\\u219D\\u0338\",\n  \"nRightarrow\":\"\\u21CF\",\n  \"nrightarrow\":\"\\u219B\",\n  \"nrtri\":\"\\u22EB\",\n  \"nrtrie\":\"\\u22ED\",\n  \"nsc\":\"\\u2281\",\n  \"nsccue\":\"\\u22E1\",\n  \"nsce\":\"\\u2AB0\\u0338\",\n  \"Nscr\":\"\\uD835\\uDCA9\",\n  \"nscr\":\"\\uD835\\uDCC3\",\n  \"nshortmid\":\"\\u2224\",\n  \"nshortparallel\":\"\\u2226\",\n  \"nsim\":\"\\u2241\",\n  \"nsime\":\"\\u2244\",\n  \"nsimeq\":\"\\u2244\",\n  \"nsmid\":\"\\u2224\",\n  \"nspar\":\"\\u2226\",\n  \"nsqsube\":\"\\u22E2\",\n  \"nsqsupe\":\"\\u22E3\",\n  \"nsub\":\"\\u2284\",\n  \"nsubE\":\"\\u2AC5\\u0338\",\n  \"nsube\":\"\\u2288\",\n  \"nsubset\":\"\\u2282\\u20D2\",\n  \"nsubseteq\":\"\\u2288\",\n  \"nsubseteqq\":\"\\u2AC5\\u0338\",\n  \"nsucc\":\"\\u2281\",\n  \"nsucceq\":\"\\u2AB0\\u0338\",\n  \"nsup\":\"\\u2285\",\n  \"nsupE\":\"\\u2AC6\\u0338\",\n  \"nsupe\":\"\\u2289\",\n  \"nsupset\":\"\\u2283\\u20D2\",\n  \"nsupseteq\":\"\\u2289\",\n  \"nsupseteqq\":\"\\u2AC6\\u0338\",\n  \"ntgl\":\"\\u2279\",\n  \"Ntilde\":\"\\u00D1\",\n  \"ntilde\":\"\\u00F1\",\n  \"ntlg\":\"\\u2278\",\n  \"ntriangleleft\":\"\\u22EA\",\n  \"ntrianglelefteq\":\"\\u22EC\",\n  \"ntriangleright\":\"\\u22EB\",\n  \"ntrianglerighteq\":\"\\u22ED\",\n  \"Nu\":\"\\u039D\",\n  \"nu\":\"\\u03BD\",\n  \"num\":\"\\u0023\",\n  \"numero\":\"\\u2116\",\n  \"numsp\":\"\\u2007\",\n  \"nvap\":\"\\u224D\\u20D2\",\n  \"nVDash\":\"\\u22AF\",\n  \"nVdash\":\"\\u22AE\",\n  \"nvDash\":\"\\u22AD\",\n  \"nvdash\":\"\\u22AC\",\n  \"nvge\":\"\\u2265\\u20D2\",\n  \"nvgt\":\"\\u003E\\u20D2\",\n  \"nvHarr\":\"\\u2904\",\n  \"nvinfin\":\"\\u29DE\",\n  \"nvlArr\":\"\\u2902\",\n  \"nvle\":\"\\u2264\\u20D2\",\n  \"nvlt\":\"\\u003C\\u20D2\",\n  \"nvltrie\":\"\\u22B4\\u20D2\",\n  \"nvrArr\":\"\\u2903\",\n  \"nvrtrie\":\"\\u22B5\\u20D2\",\n  \"nvsim\":\"\\u223C\\u20D2\",\n  \"nwarhk\":\"\\u2923\",\n  \"nwArr\":\"\\u21D6\",\n  \"nwarr\":\"\\u2196\",\n  \"nwarrow\":\"\\u2196\",\n  \"nwnear\":\"\\u2927\",\n  \"Oacute\":\"\\u00D3\",\n  \"oacute\":\"\\u00F3\",\n  \"oast\":\"\\u229B\",\n  \"ocir\":\"\\u229A\",\n  \"Ocirc\":\"\\u00D4\",\n  \"ocirc\":\"\\u00F4\",\n  \"Ocy\":\"\\u041E\",\n  \"ocy\":\"\\u043E\",\n  \"odash\":\"\\u229D\",\n  \"Odblac\":\"\\u0150\",\n  \"odblac\":\"\\u0151\",\n  \"odiv\":\"\\u2A38\",\n  \"odot\":\"\\u2299\",\n  \"odsold\":\"\\u29BC\",\n  \"OElig\":\"\\u0152\",\n  \"oelig\":\"\\u0153\",\n  \"ofcir\":\"\\u29BF\",\n  \"Ofr\":\"\\uD835\\uDD12\",\n  \"ofr\":\"\\uD835\\uDD2C\",\n  \"ogon\":\"\\u02DB\",\n  \"Ograve\":\"\\u00D2\",\n  \"ograve\":\"\\u00F2\",\n  \"ogt\":\"\\u29C1\",\n  \"ohbar\":\"\\u29B5\",\n  \"ohm\":\"\\u03A9\",\n  \"oint\":\"\\u222E\",\n  \"olarr\":\"\\u21BA\",\n  \"olcir\":\"\\u29BE\",\n  \"olcross\":\"\\u29BB\",\n  \"oline\":\"\\u203E\",\n  \"olt\":\"\\u29C0\",\n  \"Omacr\":\"\\u014C\",\n  \"omacr\":\"\\u014D\",\n  \"Omega\":\"\\u03A9\",\n  \"omega\":\"\\u03C9\",\n  \"Omicron\":\"\\u039F\",\n  \"omicron\":\"\\u03BF\",\n  \"omid\":\"\\u29B6\",\n  \"ominus\":\"\\u2296\",\n  \"Oopf\":\"\\uD835\\uDD46\",\n  \"oopf\":\"\\uD835\\uDD60\",\n  \"opar\":\"\\u29B7\",\n  \"OpenCurlyDoubleQuote\":\"\\u201C\",\n  \"OpenCurlyQuote\":\"\\u2018\",\n  \"operp\":\"\\u29B9\",\n  \"oplus\":\"\\u2295\",\n  \"Or\":\"\\u2A54\",\n  \"or\":\"\\u2228\",\n  \"orarr\":\"\\u21BB\",\n  \"ord\":\"\\u2A5D\",\n  \"order\":\"\\u2134\",\n  \"orderof\":\"\\u2134\",\n  \"ordf\":\"\\u00AA\",\n  \"ordm\":\"\\u00BA\",\n  \"origof\":\"\\u22B6\",\n  \"oror\":\"\\u2A56\",\n  \"orslope\":\"\\u2A57\",\n  \"orv\":\"\\u2A5B\",\n  \"oS\":\"\\u24C8\",\n  \"Oscr\":\"\\uD835\\uDCAA\",\n  \"oscr\":\"\\u2134\",\n  \"Oslash\":\"\\u00D8\",\n  \"oslash\":\"\\u00F8\",\n  \"osol\":\"\\u2298\",\n  \"Otilde\":\"\\u00D5\",\n  \"otilde\":\"\\u00F5\",\n  \"Otimes\":\"\\u2A37\",\n  \"otimes\":\"\\u2297\",\n  \"otimesas\":\"\\u2A36\",\n  \"Ouml\":\"\\u00D6\",\n  \"ouml\":\"\\u00F6\",\n  \"ovbar\":\"\\u233D\",\n  \"OverBar\":\"\\u203E\",\n  \"OverBrace\":\"\\u23DE\",\n  \"OverBracket\":\"\\u23B4\",\n  \"OverParenthesis\":\"\\u23DC\",\n  \"par\":\"\\u2225\",\n  \"para\":\"\\u00B6\",\n  \"parallel\":\"\\u2225\",\n  \"parsim\":\"\\u2AF3\",\n  \"parsl\":\"\\u2AFD\",\n  \"part\":\"\\u2202\",\n  \"PartialD\":\"\\u2202\",\n  \"Pcy\":\"\\u041F\",\n  \"pcy\":\"\\u043F\",\n  \"percnt\":\"\\u0025\",\n  \"period\":\"\\u002E\",\n  \"permil\":\"\\u2030\",\n  \"perp\":\"\\u22A5\",\n  \"pertenk\":\"\\u2031\",\n  \"Pfr\":\"\\uD835\\uDD13\",\n  \"pfr\":\"\\uD835\\uDD2D\",\n  \"Phi\":\"\\u03A6\",\n  \"phi\":\"\\u03C6\",\n  \"phiv\":\"\\u03D5\",\n  \"phmmat\":\"\\u2133\",\n  \"phone\":\"\\u260E\",\n  \"Pi\":\"\\u03A0\",\n  \"pi\":\"\\u03C0\",\n  \"pitchfork\":\"\\u22D4\",\n  \"piv\":\"\\u03D6\",\n  \"planck\":\"\\u210F\",\n  \"planckh\":\"\\u210E\",\n  \"plankv\":\"\\u210F\",\n  \"plus\":\"\\u002B\",\n  \"plusacir\":\"\\u2A23\",\n  \"plusb\":\"\\u229E\",\n  \"pluscir\":\"\\u2A22\",\n  \"plusdo\":\"\\u2214\",\n  \"plusdu\":\"\\u2A25\",\n  \"pluse\":\"\\u2A72\",\n  \"PlusMinus\":\"\\u00B1\",\n  \"plusmn\":\"\\u00B1\",\n  \"plussim\":\"\\u2A26\",\n  \"plustwo\":\"\\u2A27\",\n  \"pm\":\"\\u00B1\",\n  \"Poincareplane\":\"\\u210C\",\n  \"pointint\":\"\\u2A15\",\n  \"Popf\":\"\\u2119\",\n  \"popf\":\"\\uD835\\uDD61\",\n  \"pound\":\"\\u00A3\",\n  \"Pr\":\"\\u2ABB\",\n  \"pr\":\"\\u227A\",\n  \"prap\":\"\\u2AB7\",\n  \"prcue\":\"\\u227C\",\n  \"prE\":\"\\u2AB3\",\n  \"pre\":\"\\u2AAF\",\n  \"prec\":\"\\u227A\",\n  \"precapprox\":\"\\u2AB7\",\n  \"preccurlyeq\":\"\\u227C\",\n  \"Precedes\":\"\\u227A\",\n  \"PrecedesEqual\":\"\\u2AAF\",\n  \"PrecedesSlantEqual\":\"\\u227C\",\n  \"PrecedesTilde\":\"\\u227E\",\n  \"preceq\":\"\\u2AAF\",\n  \"precnapprox\":\"\\u2AB9\",\n  \"precneqq\":\"\\u2AB5\",\n  \"precnsim\":\"\\u22E8\",\n  \"precsim\":\"\\u227E\",\n  \"Prime\":\"\\u2033\",\n  \"prime\":\"\\u2032\",\n  \"primes\":\"\\u2119\",\n  \"prnap\":\"\\u2AB9\",\n  \"prnE\":\"\\u2AB5\",\n  \"prnsim\":\"\\u22E8\",\n  \"prod\":\"\\u220F\",\n  \"Product\":\"\\u220F\",\n  \"profalar\":\"\\u232E\",\n  \"profline\":\"\\u2312\",\n  \"profsurf\":\"\\u2313\",\n  \"prop\":\"\\u221D\",\n  \"Proportion\":\"\\u2237\",\n  \"Proportional\":\"\\u221D\",\n  \"propto\":\"\\u221D\",\n  \"prsim\":\"\\u227E\",\n  \"prurel\":\"\\u22B0\",\n  \"Pscr\":\"\\uD835\\uDCAB\",\n  \"pscr\":\"\\uD835\\uDCC5\",\n  \"Psi\":\"\\u03A8\",\n  \"psi\":\"\\u03C8\",\n  \"puncsp\":\"\\u2008\",\n  \"Qfr\":\"\\uD835\\uDD14\",\n  \"qfr\":\"\\uD835\\uDD2E\",\n  \"qint\":\"\\u2A0C\",\n  \"Qopf\":\"\\u211A\",\n  \"qopf\":\"\\uD835\\uDD62\",\n  \"qprime\":\"\\u2057\",\n  \"Qscr\":\"\\uD835\\uDCAC\",\n  \"qscr\":\"\\uD835\\uDCC6\",\n  \"quaternions\":\"\\u210D\",\n  \"quatint\":\"\\u2A16\",\n  \"quest\":\"\\u003F\",\n  \"questeq\":\"\\u225F\",\n  \"QUOT\":\"\\u0022\",\n  \"quot\":\"\\u0022\",\n  \"rAarr\":\"\\u21DB\",\n  \"race\":\"\\u223D\\u0331\",\n  \"Racute\":\"\\u0154\",\n  \"racute\":\"\\u0155\",\n  \"radic\":\"\\u221A\",\n  \"raemptyv\":\"\\u29B3\",\n  \"Rang\":\"\\u27EB\",\n  \"rang\":\"\\u27E9\",\n  \"rangd\":\"\\u2992\",\n  \"range\":\"\\u29A5\",\n  \"rangle\":\"\\u27E9\",\n  \"raquo\":\"\\u00BB\",\n  \"Rarr\":\"\\u21A0\",\n  \"rArr\":\"\\u21D2\",\n  \"rarr\":\"\\u2192\",\n  \"rarrap\":\"\\u2975\",\n  \"rarrb\":\"\\u21E5\",\n  \"rarrbfs\":\"\\u2920\",\n  \"rarrc\":\"\\u2933\",\n  \"rarrfs\":\"\\u291E\",\n  \"rarrhk\":\"\\u21AA\",\n  \"rarrlp\":\"\\u21AC\",\n  \"rarrpl\":\"\\u2945\",\n  \"rarrsim\":\"\\u2974\",\n  \"Rarrtl\":\"\\u2916\",\n  \"rarrtl\":\"\\u21A3\",\n  \"rarrw\":\"\\u219D\",\n  \"rAtail\":\"\\u291C\",\n  \"ratail\":\"\\u291A\",\n  \"ratio\":\"\\u2236\",\n  \"rationals\":\"\\u211A\",\n  \"RBarr\":\"\\u2910\",\n  \"rBarr\":\"\\u290F\",\n  \"rbarr\":\"\\u290D\",\n  \"rbbrk\":\"\\u2773\",\n  \"rbrace\":\"\\u007D\",\n  \"rbrack\":\"\\u005D\",\n  \"rbrke\":\"\\u298C\",\n  \"rbrksld\":\"\\u298E\",\n  \"rbrkslu\":\"\\u2990\",\n  \"Rcaron\":\"\\u0158\",\n  \"rcaron\":\"\\u0159\",\n  \"Rcedil\":\"\\u0156\",\n  \"rcedil\":\"\\u0157\",\n  \"rceil\":\"\\u2309\",\n  \"rcub\":\"\\u007D\",\n  \"Rcy\":\"\\u0420\",\n  \"rcy\":\"\\u0440\",\n  \"rdca\":\"\\u2937\",\n  \"rdldhar\":\"\\u2969\",\n  \"rdquo\":\"\\u201D\",\n  \"rdquor\":\"\\u201D\",\n  \"rdsh\":\"\\u21B3\",\n  \"Re\":\"\\u211C\",\n  \"real\":\"\\u211C\",\n  \"realine\":\"\\u211B\",\n  \"realpart\":\"\\u211C\",\n  \"reals\":\"\\u211D\",\n  \"rect\":\"\\u25AD\",\n  \"REG\":\"\\u00AE\",\n  \"reg\":\"\\u00AE\",\n  \"ReverseElement\":\"\\u220B\",\n  \"ReverseEquilibrium\":\"\\u21CB\",\n  \"ReverseUpEquilibrium\":\"\\u296F\",\n  \"rfisht\":\"\\u297D\",\n  \"rfloor\":\"\\u230B\",\n  \"Rfr\":\"\\u211C\",\n  \"rfr\":\"\\uD835\\uDD2F\",\n  \"rHar\":\"\\u2964\",\n  \"rhard\":\"\\u21C1\",\n  \"rharu\":\"\\u21C0\",\n  \"rharul\":\"\\u296C\",\n  \"Rho\":\"\\u03A1\",\n  \"rho\":\"\\u03C1\",\n  \"rhov\":\"\\u03F1\",\n  \"RightAngleBracket\":\"\\u27E9\",\n  \"RightArrow\":\"\\u2192\",\n  \"Rightarrow\":\"\\u21D2\",\n  \"rightarrow\":\"\\u2192\",\n  \"RightArrowBar\":\"\\u21E5\",\n  \"RightArrowLeftArrow\":\"\\u21C4\",\n  \"rightarrowtail\":\"\\u21A3\",\n  \"RightCeiling\":\"\\u2309\",\n  \"RightDoubleBracket\":\"\\u27E7\",\n  \"RightDownTeeVector\":\"\\u295D\",\n  \"RightDownVector\":\"\\u21C2\",\n  \"RightDownVectorBar\":\"\\u2955\",\n  \"RightFloor\":\"\\u230B\",\n  \"rightharpoondown\":\"\\u21C1\",\n  \"rightharpoonup\":\"\\u21C0\",\n  \"rightleftarrows\":\"\\u21C4\",\n  \"rightleftharpoons\":\"\\u21CC\",\n  \"rightrightarrows\":\"\\u21C9\",\n  \"rightsquigarrow\":\"\\u219D\",\n  \"RightTee\":\"\\u22A2\",\n  \"RightTeeArrow\":\"\\u21A6\",\n  \"RightTeeVector\":\"\\u295B\",\n  \"rightthreetimes\":\"\\u22CC\",\n  \"RightTriangle\":\"\\u22B3\",\n  \"RightTriangleBar\":\"\\u29D0\",\n  \"RightTriangleEqual\":\"\\u22B5\",\n  \"RightUpDownVector\":\"\\u294F\",\n  \"RightUpTeeVector\":\"\\u295C\",\n  \"RightUpVector\":\"\\u21BE\",\n  \"RightUpVectorBar\":\"\\u2954\",\n  \"RightVector\":\"\\u21C0\",\n  \"RightVectorBar\":\"\\u2953\",\n  \"ring\":\"\\u02DA\",\n  \"risingdotseq\":\"\\u2253\",\n  \"rlarr\":\"\\u21C4\",\n  \"rlhar\":\"\\u21CC\",\n  \"rlm\":\"\\u200F\",\n  \"rmoust\":\"\\u23B1\",\n  \"rmoustache\":\"\\u23B1\",\n  \"rnmid\":\"\\u2AEE\",\n  \"roang\":\"\\u27ED\",\n  \"roarr\":\"\\u21FE\",\n  \"robrk\":\"\\u27E7\",\n  \"ropar\":\"\\u2986\",\n  \"Ropf\":\"\\u211D\",\n  \"ropf\":\"\\uD835\\uDD63\",\n  \"roplus\":\"\\u2A2E\",\n  \"rotimes\":\"\\u2A35\",\n  \"RoundImplies\":\"\\u2970\",\n  \"rpar\":\"\\u0029\",\n  \"rpargt\":\"\\u2994\",\n  \"rppolint\":\"\\u2A12\",\n  \"rrarr\":\"\\u21C9\",\n  \"Rrightarrow\":\"\\u21DB\",\n  \"rsaquo\":\"\\u203A\",\n  \"Rscr\":\"\\u211B\",\n  \"rscr\":\"\\uD835\\uDCC7\",\n  \"Rsh\":\"\\u21B1\",\n  \"rsh\":\"\\u21B1\",\n  \"rsqb\":\"\\u005D\",\n  \"rsquo\":\"\\u2019\",\n  \"rsquor\":\"\\u2019\",\n  \"rthree\":\"\\u22CC\",\n  \"rtimes\":\"\\u22CA\",\n  \"rtri\":\"\\u25B9\",\n  \"rtrie\":\"\\u22B5\",\n  \"rtrif\":\"\\u25B8\",\n  \"rtriltri\":\"\\u29CE\",\n  \"RuleDelayed\":\"\\u29F4\",\n  \"ruluhar\":\"\\u2968\",\n  \"rx\":\"\\u211E\",\n  \"Sacute\":\"\\u015A\",\n  \"sacute\":\"\\u015B\",\n  \"sbquo\":\"\\u201A\",\n  \"Sc\":\"\\u2ABC\",\n  \"sc\":\"\\u227B\",\n  \"scap\":\"\\u2AB8\",\n  \"Scaron\":\"\\u0160\",\n  \"scaron\":\"\\u0161\",\n  \"sccue\":\"\\u227D\",\n  \"scE\":\"\\u2AB4\",\n  \"sce\":\"\\u2AB0\",\n  \"Scedil\":\"\\u015E\",\n  \"scedil\":\"\\u015F\",\n  \"Scirc\":\"\\u015C\",\n  \"scirc\":\"\\u015D\",\n  \"scnap\":\"\\u2ABA\",\n  \"scnE\":\"\\u2AB6\",\n  \"scnsim\":\"\\u22E9\",\n  \"scpolint\":\"\\u2A13\",\n  \"scsim\":\"\\u227F\",\n  \"Scy\":\"\\u0421\",\n  \"scy\":\"\\u0441\",\n  \"sdot\":\"\\u22C5\",\n  \"sdotb\":\"\\u22A1\",\n  \"sdote\":\"\\u2A66\",\n  \"searhk\":\"\\u2925\",\n  \"seArr\":\"\\u21D8\",\n  \"searr\":\"\\u2198\",\n  \"searrow\":\"\\u2198\",\n  \"sect\":\"\\u00A7\",\n  \"semi\":\"\\u003B\",\n  \"seswar\":\"\\u2929\",\n  \"setminus\":\"\\u2216\",\n  \"setmn\":\"\\u2216\",\n  \"sext\":\"\\u2736\",\n  \"Sfr\":\"\\uD835\\uDD16\",\n  \"sfr\":\"\\uD835\\uDD30\",\n  \"sfrown\":\"\\u2322\",\n  \"sharp\":\"\\u266F\",\n  \"SHCHcy\":\"\\u0429\",\n  \"shchcy\":\"\\u0449\",\n  \"SHcy\":\"\\u0428\",\n  \"shcy\":\"\\u0448\",\n  \"ShortDownArrow\":\"\\u2193\",\n  \"ShortLeftArrow\":\"\\u2190\",\n  \"shortmid\":\"\\u2223\",\n  \"shortparallel\":\"\\u2225\",\n  \"ShortRightArrow\":\"\\u2192\",\n  \"ShortUpArrow\":\"\\u2191\",\n  \"shy\":\"\\u00AD\",\n  \"Sigma\":\"\\u03A3\",\n  \"sigma\":\"\\u03C3\",\n  \"sigmaf\":\"\\u03C2\",\n  \"sigmav\":\"\\u03C2\",\n  \"sim\":\"\\u223C\",\n  \"simdot\":\"\\u2A6A\",\n  \"sime\":\"\\u2243\",\n  \"simeq\":\"\\u2243\",\n  \"simg\":\"\\u2A9E\",\n  \"simgE\":\"\\u2AA0\",\n  \"siml\":\"\\u2A9D\",\n  \"simlE\":\"\\u2A9F\",\n  \"simne\":\"\\u2246\",\n  \"simplus\":\"\\u2A24\",\n  \"simrarr\":\"\\u2972\",\n  \"slarr\":\"\\u2190\",\n  \"SmallCircle\":\"\\u2218\",\n  \"smallsetminus\":\"\\u2216\",\n  \"smashp\":\"\\u2A33\",\n  \"smeparsl\":\"\\u29E4\",\n  \"smid\":\"\\u2223\",\n  \"smile\":\"\\u2323\",\n  \"smt\":\"\\u2AAA\",\n  \"smte\":\"\\u2AAC\",\n  \"smtes\":\"\\u2AAC\\uFE00\",\n  \"SOFTcy\":\"\\u042C\",\n  \"softcy\":\"\\u044C\",\n  \"sol\":\"\\u002F\",\n  \"solb\":\"\\u29C4\",\n  \"solbar\":\"\\u233F\",\n  \"Sopf\":\"\\uD835\\uDD4A\",\n  \"sopf\":\"\\uD835\\uDD64\",\n  \"spades\":\"\\u2660\",\n  \"spadesuit\":\"\\u2660\",\n  \"spar\":\"\\u2225\",\n  \"sqcap\":\"\\u2293\",\n  \"sqcaps\":\"\\u2293\\uFE00\",\n  \"sqcup\":\"\\u2294\",\n  \"sqcups\":\"\\u2294\\uFE00\",\n  \"Sqrt\":\"\\u221A\",\n  \"sqsub\":\"\\u228F\",\n  \"sqsube\":\"\\u2291\",\n  \"sqsubset\":\"\\u228F\",\n  \"sqsubseteq\":\"\\u2291\",\n  \"sqsup\":\"\\u2290\",\n  \"sqsupe\":\"\\u2292\",\n  \"sqsupset\":\"\\u2290\",\n  \"sqsupseteq\":\"\\u2292\",\n  \"squ\":\"\\u25A1\",\n  \"Square\":\"\\u25A1\",\n  \"square\":\"\\u25A1\",\n  \"SquareIntersection\":\"\\u2293\",\n  \"SquareSubset\":\"\\u228F\",\n  \"SquareSubsetEqual\":\"\\u2291\",\n  \"SquareSuperset\":\"\\u2290\",\n  \"SquareSupersetEqual\":\"\\u2292\",\n  \"SquareUnion\":\"\\u2294\",\n  \"squarf\":\"\\u25AA\",\n  \"squf\":\"\\u25AA\",\n  \"srarr\":\"\\u2192\",\n  \"Sscr\":\"\\uD835\\uDCAE\",\n  \"sscr\":\"\\uD835\\uDCC8\",\n  \"ssetmn\":\"\\u2216\",\n  \"ssmile\":\"\\u2323\",\n  \"sstarf\":\"\\u22C6\",\n  \"Star\":\"\\u22C6\",\n  \"star\":\"\\u2606\",\n  \"starf\":\"\\u2605\",\n  \"straightepsilon\":\"\\u03F5\",\n  \"straightphi\":\"\\u03D5\",\n  \"strns\":\"\\u00AF\",\n  \"Sub\":\"\\u22D0\",\n  \"sub\":\"\\u2282\",\n  \"subdot\":\"\\u2ABD\",\n  \"subE\":\"\\u2AC5\",\n  \"sube\":\"\\u2286\",\n  \"subedot\":\"\\u2AC3\",\n  \"submult\":\"\\u2AC1\",\n  \"subnE\":\"\\u2ACB\",\n  \"subne\":\"\\u228A\",\n  \"subplus\":\"\\u2ABF\",\n  \"subrarr\":\"\\u2979\",\n  \"Subset\":\"\\u22D0\",\n  \"subset\":\"\\u2282\",\n  \"subseteq\":\"\\u2286\",\n  \"subseteqq\":\"\\u2AC5\",\n  \"SubsetEqual\":\"\\u2286\",\n  \"subsetneq\":\"\\u228A\",\n  \"subsetneqq\":\"\\u2ACB\",\n  \"subsim\":\"\\u2AC7\",\n  \"subsub\":\"\\u2AD5\",\n  \"subsup\":\"\\u2AD3\",\n  \"succ\":\"\\u227B\",\n  \"succapprox\":\"\\u2AB8\",\n  \"succcurlyeq\":\"\\u227D\",\n  \"Succeeds\":\"\\u227B\",\n  \"SucceedsEqual\":\"\\u2AB0\",\n  \"SucceedsSlantEqual\":\"\\u227D\",\n  \"SucceedsTilde\":\"\\u227F\",\n  \"succeq\":\"\\u2AB0\",\n  \"succnapprox\":\"\\u2ABA\",\n  \"succneqq\":\"\\u2AB6\",\n  \"succnsim\":\"\\u22E9\",\n  \"succsim\":\"\\u227F\",\n  \"SuchThat\":\"\\u220B\",\n  \"Sum\":\"\\u2211\",\n  \"sum\":\"\\u2211\",\n  \"sung\":\"\\u266A\",\n  \"Sup\":\"\\u22D1\",\n  \"sup\":\"\\u2283\",\n  \"sup1\":\"\\u00B9\",\n  \"sup2\":\"\\u00B2\",\n  \"sup3\":\"\\u00B3\",\n  \"supdot\":\"\\u2ABE\",\n  \"supdsub\":\"\\u2AD8\",\n  \"supE\":\"\\u2AC6\",\n  \"supe\":\"\\u2287\",\n  \"supedot\":\"\\u2AC4\",\n  \"Superset\":\"\\u2283\",\n  \"SupersetEqual\":\"\\u2287\",\n  \"suphsol\":\"\\u27C9\",\n  \"suphsub\":\"\\u2AD7\",\n  \"suplarr\":\"\\u297B\",\n  \"supmult\":\"\\u2AC2\",\n  \"supnE\":\"\\u2ACC\",\n  \"supne\":\"\\u228B\",\n  \"supplus\":\"\\u2AC0\",\n  \"Supset\":\"\\u22D1\",\n  \"supset\":\"\\u2283\",\n  \"supseteq\":\"\\u2287\",\n  \"supseteqq\":\"\\u2AC6\",\n  \"supsetneq\":\"\\u228B\",\n  \"supsetneqq\":\"\\u2ACC\",\n  \"supsim\":\"\\u2AC8\",\n  \"supsub\":\"\\u2AD4\",\n  \"supsup\":\"\\u2AD6\",\n  \"swarhk\":\"\\u2926\",\n  \"swArr\":\"\\u21D9\",\n  \"swarr\":\"\\u2199\",\n  \"swarrow\":\"\\u2199\",\n  \"swnwar\":\"\\u292A\",\n  \"szlig\":\"\\u00DF\",\n  \"Tab\":\"\\u0009\",\n  \"target\":\"\\u2316\",\n  \"Tau\":\"\\u03A4\",\n  \"tau\":\"\\u03C4\",\n  \"tbrk\":\"\\u23B4\",\n  \"Tcaron\":\"\\u0164\",\n  \"tcaron\":\"\\u0165\",\n  \"Tcedil\":\"\\u0162\",\n  \"tcedil\":\"\\u0163\",\n  \"Tcy\":\"\\u0422\",\n  \"tcy\":\"\\u0442\",\n  \"tdot\":\"\\u20DB\",\n  \"telrec\":\"\\u2315\",\n  \"Tfr\":\"\\uD835\\uDD17\",\n  \"tfr\":\"\\uD835\\uDD31\",\n  \"there4\":\"\\u2234\",\n  \"Therefore\":\"\\u2234\",\n  \"therefore\":\"\\u2234\",\n  \"Theta\":\"\\u0398\",\n  \"theta\":\"\\u03B8\",\n  \"thetasym\":\"\\u03D1\",\n  \"thetav\":\"\\u03D1\",\n  \"thickapprox\":\"\\u2248\",\n  \"thicksim\":\"\\u223C\",\n  \"ThickSpace\":\"\\u205F\\u200A\",\n  \"thinsp\":\"\\u2009\",\n  \"ThinSpace\":\"\\u2009\",\n  \"thkap\":\"\\u2248\",\n  \"thksim\":\"\\u223C\",\n  \"THORN\":\"\\u00DE\",\n  \"thorn\":\"\\u00FE\",\n  \"Tilde\":\"\\u223C\",\n  \"tilde\":\"\\u02DC\",\n  \"TildeEqual\":\"\\u2243\",\n  \"TildeFullEqual\":\"\\u2245\",\n  \"TildeTilde\":\"\\u2248\",\n  \"times\":\"\\u00D7\",\n  \"timesb\":\"\\u22A0\",\n  \"timesbar\":\"\\u2A31\",\n  \"timesd\":\"\\u2A30\",\n  \"tint\":\"\\u222D\",\n  \"toea\":\"\\u2928\",\n  \"top\":\"\\u22A4\",\n  \"topbot\":\"\\u2336\",\n  \"topcir\":\"\\u2AF1\",\n  \"Topf\":\"\\uD835\\uDD4B\",\n  \"topf\":\"\\uD835\\uDD65\",\n  \"topfork\":\"\\u2ADA\",\n  \"tosa\":\"\\u2929\",\n  \"tprime\":\"\\u2034\",\n  \"TRADE\":\"\\u2122\",\n  \"trade\":\"\\u2122\",\n  \"triangle\":\"\\u25B5\",\n  \"triangledown\":\"\\u25BF\",\n  \"triangleleft\":\"\\u25C3\",\n  \"trianglelefteq\":\"\\u22B4\",\n  \"triangleq\":\"\\u225C\",\n  \"triangleright\":\"\\u25B9\",\n  \"trianglerighteq\":\"\\u22B5\",\n  \"tridot\":\"\\u25EC\",\n  \"trie\":\"\\u225C\",\n  \"triminus\":\"\\u2A3A\",\n  \"TripleDot\":\"\\u20DB\",\n  \"triplus\":\"\\u2A39\",\n  \"trisb\":\"\\u29CD\",\n  \"tritime\":\"\\u2A3B\",\n  \"trpezium\":\"\\u23E2\",\n  \"Tscr\":\"\\uD835\\uDCAF\",\n  \"tscr\":\"\\uD835\\uDCC9\",\n  \"TScy\":\"\\u0426\",\n  \"tscy\":\"\\u0446\",\n  \"TSHcy\":\"\\u040B\",\n  \"tshcy\":\"\\u045B\",\n  \"Tstrok\":\"\\u0166\",\n  \"tstrok\":\"\\u0167\",\n  \"twixt\":\"\\u226C\",\n  \"twoheadleftarrow\":\"\\u219E\",\n  \"twoheadrightarrow\":\"\\u21A0\",\n  \"Uacute\":\"\\u00DA\",\n  \"uacute\":\"\\u00FA\",\n  \"Uarr\":\"\\u219F\",\n  \"uArr\":\"\\u21D1\",\n  \"uarr\":\"\\u2191\",\n  \"Uarrocir\":\"\\u2949\",\n  \"Ubrcy\":\"\\u040E\",\n  \"ubrcy\":\"\\u045E\",\n  \"Ubreve\":\"\\u016C\",\n  \"ubreve\":\"\\u016D\",\n  \"Ucirc\":\"\\u00DB\",\n  \"ucirc\":\"\\u00FB\",\n  \"Ucy\":\"\\u0423\",\n  \"ucy\":\"\\u0443\",\n  \"udarr\":\"\\u21C5\",\n  \"Udblac\":\"\\u0170\",\n  \"udblac\":\"\\u0171\",\n  \"udhar\":\"\\u296E\",\n  \"ufisht\":\"\\u297E\",\n  \"Ufr\":\"\\uD835\\uDD18\",\n  \"ufr\":\"\\uD835\\uDD32\",\n  \"Ugrave\":\"\\u00D9\",\n  \"ugrave\":\"\\u00F9\",\n  \"uHar\":\"\\u2963\",\n  \"uharl\":\"\\u21BF\",\n  \"uharr\":\"\\u21BE\",\n  \"uhblk\":\"\\u2580\",\n  \"ulcorn\":\"\\u231C\",\n  \"ulcorner\":\"\\u231C\",\n  \"ulcrop\":\"\\u230F\",\n  \"ultri\":\"\\u25F8\",\n  \"Umacr\":\"\\u016A\",\n  \"umacr\":\"\\u016B\",\n  \"uml\":\"\\u00A8\",\n  \"UnderBar\":\"\\u005F\",\n  \"UnderBrace\":\"\\u23DF\",\n  \"UnderBracket\":\"\\u23B5\",\n  \"UnderParenthesis\":\"\\u23DD\",\n  \"Union\":\"\\u22C3\",\n  \"UnionPlus\":\"\\u228E\",\n  \"Uogon\":\"\\u0172\",\n  \"uogon\":\"\\u0173\",\n  \"Uopf\":\"\\uD835\\uDD4C\",\n  \"uopf\":\"\\uD835\\uDD66\",\n  \"UpArrow\":\"\\u2191\",\n  \"Uparrow\":\"\\u21D1\",\n  \"uparrow\":\"\\u2191\",\n  \"UpArrowBar\":\"\\u2912\",\n  \"UpArrowDownArrow\":\"\\u21C5\",\n  \"UpDownArrow\":\"\\u2195\",\n  \"Updownarrow\":\"\\u21D5\",\n  \"updownarrow\":\"\\u2195\",\n  \"UpEquilibrium\":\"\\u296E\",\n  \"upharpoonleft\":\"\\u21BF\",\n  \"upharpoonright\":\"\\u21BE\",\n  \"uplus\":\"\\u228E\",\n  \"UpperLeftArrow\":\"\\u2196\",\n  \"UpperRightArrow\":\"\\u2197\",\n  \"Upsi\":\"\\u03D2\",\n  \"upsi\":\"\\u03C5\",\n  \"upsih\":\"\\u03D2\",\n  \"Upsilon\":\"\\u03A5\",\n  \"upsilon\":\"\\u03C5\",\n  \"UpTee\":\"\\u22A5\",\n  \"UpTeeArrow\":\"\\u21A5\",\n  \"upuparrows\":\"\\u21C8\",\n  \"urcorn\":\"\\u231D\",\n  \"urcorner\":\"\\u231D\",\n  \"urcrop\":\"\\u230E\",\n  \"Uring\":\"\\u016E\",\n  \"uring\":\"\\u016F\",\n  \"urtri\":\"\\u25F9\",\n  \"Uscr\":\"\\uD835\\uDCB0\",\n  \"uscr\":\"\\uD835\\uDCCA\",\n  \"utdot\":\"\\u22F0\",\n  \"Utilde\":\"\\u0168\",\n  \"utilde\":\"\\u0169\",\n  \"utri\":\"\\u25B5\",\n  \"utrif\":\"\\u25B4\",\n  \"uuarr\":\"\\u21C8\",\n  \"Uuml\":\"\\u00DC\",\n  \"uuml\":\"\\u00FC\",\n  \"uwangle\":\"\\u29A7\",\n  \"vangrt\":\"\\u299C\",\n  \"varepsilon\":\"\\u03F5\",\n  \"varkappa\":\"\\u03F0\",\n  \"varnothing\":\"\\u2205\",\n  \"varphi\":\"\\u03D5\",\n  \"varpi\":\"\\u03D6\",\n  \"varpropto\":\"\\u221D\",\n  \"vArr\":\"\\u21D5\",\n  \"varr\":\"\\u2195\",\n  \"varrho\":\"\\u03F1\",\n  \"varsigma\":\"\\u03C2\",\n  \"varsubsetneq\":\"\\u228A\\uFE00\",\n  \"varsubsetneqq\":\"\\u2ACB\\uFE00\",\n  \"varsupsetneq\":\"\\u228B\\uFE00\",\n  \"varsupsetneqq\":\"\\u2ACC\\uFE00\",\n  \"vartheta\":\"\\u03D1\",\n  \"vartriangleleft\":\"\\u22B2\",\n  \"vartriangleright\":\"\\u22B3\",\n  \"Vbar\":\"\\u2AEB\",\n  \"vBar\":\"\\u2AE8\",\n  \"vBarv\":\"\\u2AE9\",\n  \"Vcy\":\"\\u0412\",\n  \"vcy\":\"\\u0432\",\n  \"VDash\":\"\\u22AB\",\n  \"Vdash\":\"\\u22A9\",\n  \"vDash\":\"\\u22A8\",\n  \"vdash\":\"\\u22A2\",\n  \"Vdashl\":\"\\u2AE6\",\n  \"Vee\":\"\\u22C1\",\n  \"vee\":\"\\u2228\",\n  \"veebar\":\"\\u22BB\",\n  \"veeeq\":\"\\u225A\",\n  \"vellip\":\"\\u22EE\",\n  \"Verbar\":\"\\u2016\",\n  \"verbar\":\"\\u007C\",\n  \"Vert\":\"\\u2016\",\n  \"vert\":\"\\u007C\",\n  \"VerticalBar\":\"\\u2223\",\n  \"VerticalLine\":\"\\u007C\",\n  \"VerticalSeparator\":\"\\u2758\",\n  \"VerticalTilde\":\"\\u2240\",\n  \"VeryThinSpace\":\"\\u200A\",\n  \"Vfr\":\"\\uD835\\uDD19\",\n  \"vfr\":\"\\uD835\\uDD33\",\n  \"vltri\":\"\\u22B2\",\n  \"vnsub\":\"\\u2282\\u20D2\",\n  \"vnsup\":\"\\u2283\\u20D2\",\n  \"Vopf\":\"\\uD835\\uDD4D\",\n  \"vopf\":\"\\uD835\\uDD67\",\n  \"vprop\":\"\\u221D\",\n  \"vrtri\":\"\\u22B3\",\n  \"Vscr\":\"\\uD835\\uDCB1\",\n  \"vscr\":\"\\uD835\\uDCCB\",\n  \"vsubnE\":\"\\u2ACB\\uFE00\",\n  \"vsubne\":\"\\u228A\\uFE00\",\n  \"vsupnE\":\"\\u2ACC\\uFE00\",\n  \"vsupne\":\"\\u228B\\uFE00\",\n  \"Vvdash\":\"\\u22AA\",\n  \"vzigzag\":\"\\u299A\",\n  \"Wcirc\":\"\\u0174\",\n  \"wcirc\":\"\\u0175\",\n  \"wedbar\":\"\\u2A5F\",\n  \"Wedge\":\"\\u22C0\",\n  \"wedge\":\"\\u2227\",\n  \"wedgeq\":\"\\u2259\",\n  \"weierp\":\"\\u2118\",\n  \"Wfr\":\"\\uD835\\uDD1A\",\n  \"wfr\":\"\\uD835\\uDD34\",\n  \"Wopf\":\"\\uD835\\uDD4E\",\n  \"wopf\":\"\\uD835\\uDD68\",\n  \"wp\":\"\\u2118\",\n  \"wr\":\"\\u2240\",\n  \"wreath\":\"\\u2240\",\n  \"Wscr\":\"\\uD835\\uDCB2\",\n  \"wscr\":\"\\uD835\\uDCCC\",\n  \"xcap\":\"\\u22C2\",\n  \"xcirc\":\"\\u25EF\",\n  \"xcup\":\"\\u22C3\",\n  \"xdtri\":\"\\u25BD\",\n  \"Xfr\":\"\\uD835\\uDD1B\",\n  \"xfr\":\"\\uD835\\uDD35\",\n  \"xhArr\":\"\\u27FA\",\n  \"xharr\":\"\\u27F7\",\n  \"Xi\":\"\\u039E\",\n  \"xi\":\"\\u03BE\",\n  \"xlArr\":\"\\u27F8\",\n  \"xlarr\":\"\\u27F5\",\n  \"xmap\":\"\\u27FC\",\n  \"xnis\":\"\\u22FB\",\n  \"xodot\":\"\\u2A00\",\n  \"Xopf\":\"\\uD835\\uDD4F\",\n  \"xopf\":\"\\uD835\\uDD69\",\n  \"xoplus\":\"\\u2A01\",\n  \"xotime\":\"\\u2A02\",\n  \"xrArr\":\"\\u27F9\",\n  \"xrarr\":\"\\u27F6\",\n  \"Xscr\":\"\\uD835\\uDCB3\",\n  \"xscr\":\"\\uD835\\uDCCD\",\n  \"xsqcup\":\"\\u2A06\",\n  \"xuplus\":\"\\u2A04\",\n  \"xutri\":\"\\u25B3\",\n  \"xvee\":\"\\u22C1\",\n  \"xwedge\":\"\\u22C0\",\n  \"Yacute\":\"\\u00DD\",\n  \"yacute\":\"\\u00FD\",\n  \"YAcy\":\"\\u042F\",\n  \"yacy\":\"\\u044F\",\n  \"Ycirc\":\"\\u0176\",\n  \"ycirc\":\"\\u0177\",\n  \"Ycy\":\"\\u042B\",\n  \"ycy\":\"\\u044B\",\n  \"yen\":\"\\u00A5\",\n  \"Yfr\":\"\\uD835\\uDD1C\",\n  \"yfr\":\"\\uD835\\uDD36\",\n  \"YIcy\":\"\\u0407\",\n  \"yicy\":\"\\u0457\",\n  \"Yopf\":\"\\uD835\\uDD50\",\n  \"yopf\":\"\\uD835\\uDD6A\",\n  \"Yscr\":\"\\uD835\\uDCB4\",\n  \"yscr\":\"\\uD835\\uDCCE\",\n  \"YUcy\":\"\\u042E\",\n  \"yucy\":\"\\u044E\",\n  \"Yuml\":\"\\u0178\",\n  \"yuml\":\"\\u00FF\",\n  \"Zacute\":\"\\u0179\",\n  \"zacute\":\"\\u017A\",\n  \"Zcaron\":\"\\u017D\",\n  \"zcaron\":\"\\u017E\",\n  \"Zcy\":\"\\u0417\",\n  \"zcy\":\"\\u0437\",\n  \"Zdot\":\"\\u017B\",\n  \"zdot\":\"\\u017C\",\n  \"zeetrf\":\"\\u2128\",\n  \"ZeroWidthSpace\":\"\\u200B\",\n  \"Zeta\":\"\\u0396\",\n  \"zeta\":\"\\u03B6\",\n  \"Zfr\":\"\\u2128\",\n  \"zfr\":\"\\uD835\\uDD37\",\n  \"ZHcy\":\"\\u0416\",\n  \"zhcy\":\"\\u0436\",\n  \"zigrarr\":\"\\u21DD\",\n  \"Zopf\":\"\\u2124\",\n  \"zopf\":\"\\uD835\\uDD6B\",\n  \"Zscr\":\"\\uD835\\uDCB5\",\n  \"zscr\":\"\\uD835\\uDCCF\",\n  \"zwj\":\"\\u200D\",\n  \"zwnj\":\"\\u200C\"\n};\n\nvar hasOwn = Object.prototype.hasOwnProperty;\n\nfunction has(object, key) {\n  return object\n    ? hasOwn.call(object, key)\n    : false;\n}\n\nfunction decodeEntity(name) {\n  if (has(entities, name)) {\n    return entities[name]\n  } else {\n    return name;\n  }\n}\n\nvar hasOwn$1 = Object.prototype.hasOwnProperty;\n\nfunction has$1(object, key) {\n  return object\n    ? hasOwn$1.call(object, key)\n    : false;\n}\n\n// Extend objects\n//\nfunction assign(obj /*from1, from2, from3, ...*/) {\n  var sources = [].slice.call(arguments, 1);\n\n  sources.forEach(function (source) {\n    if (!source) { return; }\n\n    if (typeof source !== 'object') {\n      throw new TypeError(source + 'must be object');\n    }\n\n    Object.keys(source).forEach(function (key) {\n      obj[key] = source[key];\n    });\n  });\n\n  return obj;\n}\n\n////////////////////////////////////////////////////////////////////////////////\n\nvar UNESCAPE_MD_RE = /\\\\([\\\\!\"#$%&'()*+,.\\/:;<=>?@[\\]^_`{|}~-])/g;\n\nfunction unescapeMd(str) {\n  if (str.indexOf('\\\\') < 0) { return str; }\n  return str.replace(UNESCAPE_MD_RE, '$1');\n}\n\n////////////////////////////////////////////////////////////////////////////////\n\nfunction isValidEntityCode(c) {\n  /*eslint no-bitwise:0*/\n  // broken sequence\n  if (c >= 0xD800 && c <= 0xDFFF) { return false; }\n  // never used\n  if (c >= 0xFDD0 && c <= 0xFDEF) { return false; }\n  if ((c & 0xFFFF) === 0xFFFF || (c & 0xFFFF) === 0xFFFE) { return false; }\n  // control codes\n  if (c >= 0x00 && c <= 0x08) { return false; }\n  if (c === 0x0B) { return false; }\n  if (c >= 0x0E && c <= 0x1F) { return false; }\n  if (c >= 0x7F && c <= 0x9F) { return false; }\n  // out of range\n  if (c > 0x10FFFF) { return false; }\n  return true;\n}\n\nfunction fromCodePoint(c) {\n  /*eslint no-bitwise:0*/\n  if (c > 0xffff) {\n    c -= 0x10000;\n    var surrogate1 = 0xd800 + (c >> 10),\n        surrogate2 = 0xdc00 + (c & 0x3ff);\n\n    return String.fromCharCode(surrogate1, surrogate2);\n  }\n  return String.fromCharCode(c);\n}\n\nvar NAMED_ENTITY_RE   = /&([a-z#][a-z0-9]{1,31});/gi;\nvar DIGITAL_ENTITY_TEST_RE = /^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))/i;\n\nfunction replaceEntityPattern(match, name) {\n  var code = 0;\n  var decoded = decodeEntity(name);\n\n  if (name !== decoded) {\n    return decoded;\n  } else if (name.charCodeAt(0) === 0x23/* # */ && DIGITAL_ENTITY_TEST_RE.test(name)) {\n    code = name[1].toLowerCase() === 'x' ?\n      parseInt(name.slice(2), 16)\n    :\n      parseInt(name.slice(1), 10);\n    if (isValidEntityCode(code)) {\n      return fromCodePoint(code);\n    }\n  }\n  return match;\n}\n\nfunction replaceEntities(str) {\n  if (str.indexOf('&') < 0) { return str; }\n\n  return str.replace(NAMED_ENTITY_RE, replaceEntityPattern);\n}\n\n////////////////////////////////////////////////////////////////////////////////\n\nvar HTML_ESCAPE_TEST_RE = /[&<>\"]/;\nvar HTML_ESCAPE_REPLACE_RE = /[&<>\"]/g;\nvar HTML_REPLACEMENTS = {\n  '&': '&amp;',\n  '<': '&lt;',\n  '>': '&gt;',\n  '\"': '&quot;'\n};\n\nfunction replaceUnsafeChar(ch) {\n  return HTML_REPLACEMENTS[ch];\n}\n\nfunction escapeHtml(str) {\n  if (HTML_ESCAPE_TEST_RE.test(str)) {\n    return str.replace(HTML_ESCAPE_REPLACE_RE, replaceUnsafeChar);\n  }\n  return str;\n}\n\n/**\n * Renderer rules cache\n */\n\nvar rules = {};\n\n/**\n * Blockquotes\n */\n\nrules.blockquote_open = function(/* tokens, idx, options, env */) {\n  return '<blockquote>\\n';\n};\n\nrules.blockquote_close = function(tokens, idx /*, options, env */) {\n  return '</blockquote>' + getBreak(tokens, idx);\n};\n\n/**\n * Code\n */\n\nrules.code = function(tokens, idx /*, options, env */) {\n  if (tokens[idx].block) {\n    return '<pre><code>' + escapeHtml(tokens[idx].content) + '</code></pre>' + getBreak(tokens, idx);\n  }\n  return '<code>' + escapeHtml(tokens[idx].content) + '</code>';\n};\n\n/**\n * Fenced code blocks\n */\n\nrules.fence = function(tokens, idx, options, env, instance) {\n  var token = tokens[idx];\n  var langClass = '';\n  var langPrefix = options.langPrefix;\n  var langName = '', fences, fenceName;\n  var highlighted;\n\n  if (token.params) {\n\n    //\n    // ```foo bar\n    //\n    // Try custom renderer \"foo\" first. That will simplify overwrite\n    // for diagrams, latex, and any other fenced block with custom look\n    //\n\n    fences = token.params.split(/\\s+/g);\n    fenceName = fences.join(' ');\n\n    if (has$1(instance.rules.fence_custom, fences[0])) {\n      return instance.rules.fence_custom[fences[0]](tokens, idx, options, env, instance);\n    }\n\n    langName = escapeHtml(replaceEntities(unescapeMd(fenceName)));\n    langClass = ' class=\"' + langPrefix + langName + '\"';\n  }\n\n  if (options.highlight) {\n    highlighted = options.highlight.apply(options.highlight, [ token.content ].concat(fences))\n      || escapeHtml(token.content);\n  } else {\n    highlighted = escapeHtml(token.content);\n  }\n\n  return '<pre><code' + langClass + '>'\n        + highlighted\n        + '</code></pre>'\n        + getBreak(tokens, idx);\n};\n\nrules.fence_custom = {};\n\n/**\n * Headings\n */\n\nrules.heading_open = function(tokens, idx /*, options, env */) {\n  return '<h' + tokens[idx].hLevel + '>';\n};\nrules.heading_close = function(tokens, idx /*, options, env */) {\n  return '</h' + tokens[idx].hLevel + '>\\n';\n};\n\n/**\n * Horizontal rules\n */\n\nrules.hr = function(tokens, idx, options /*, env */) {\n  return (options.xhtmlOut ? '<hr />' : '<hr>') + getBreak(tokens, idx);\n};\n\n/**\n * Bullets\n */\n\nrules.bullet_list_open = function(/* tokens, idx, options, env */) {\n  return '<ul>\\n';\n};\nrules.bullet_list_close = function(tokens, idx /*, options, env */) {\n  return '</ul>' + getBreak(tokens, idx);\n};\n\n/**\n * List items\n */\n\nrules.list_item_open = function(/* tokens, idx, options, env */) {\n  return '<li>';\n};\nrules.list_item_close = function(/* tokens, idx, options, env */) {\n  return '</li>\\n';\n};\n\n/**\n * Ordered list items\n */\n\nrules.ordered_list_open = function(tokens, idx /*, options, env */) {\n  var token = tokens[idx];\n  var order = token.order > 1 ? ' start=\"' + token.order + '\"' : '';\n  return '<ol' + order + '>\\n';\n};\nrules.ordered_list_close = function(tokens, idx /*, options, env */) {\n  return '</ol>' + getBreak(tokens, idx);\n};\n\n/**\n * Paragraphs\n */\n\nrules.paragraph_open = function(tokens, idx /*, options, env */) {\n  return tokens[idx].tight ? '' : '<p>';\n};\nrules.paragraph_close = function(tokens, idx /*, options, env */) {\n  var addBreak = !(tokens[idx].tight && idx && tokens[idx - 1].type === 'inline' && !tokens[idx - 1].content);\n  return (tokens[idx].tight ? '' : '</p>') + (addBreak ? getBreak(tokens, idx) : '');\n};\n\n/**\n * Links\n */\n\nrules.link_open = function(tokens, idx, options /* env */) {\n  var title = tokens[idx].title ? (' title=\"' + escapeHtml(replaceEntities(tokens[idx].title)) + '\"') : '';\n  var target = options.linkTarget ? (' target=\"' + options.linkTarget + '\"') : '';\n  return '<a href=\"' + escapeHtml(tokens[idx].href) + '\"' + title + target + '>';\n};\nrules.link_close = function(/* tokens, idx, options, env */) {\n  return '</a>';\n};\n\n/**\n * Images\n */\n\nrules.image = function(tokens, idx, options /*, env */) {\n  var src = ' src=\"' + escapeHtml(tokens[idx].src) + '\"';\n  var title = tokens[idx].title ? (' title=\"' + escapeHtml(replaceEntities(tokens[idx].title)) + '\"') : '';\n  var alt = ' alt=\"' + (tokens[idx].alt ? escapeHtml(replaceEntities(unescapeMd(tokens[idx].alt))) : '') + '\"';\n  var suffix = options.xhtmlOut ? ' /' : '';\n  return '<img' + src + alt + title + suffix + '>';\n};\n\n/**\n * Tables\n */\n\nrules.table_open = function(/* tokens, idx, options, env */) {\n  return '<table>\\n';\n};\nrules.table_close = function(/* tokens, idx, options, env */) {\n  return '</table>\\n';\n};\nrules.thead_open = function(/* tokens, idx, options, env */) {\n  return '<thead>\\n';\n};\nrules.thead_close = function(/* tokens, idx, options, env */) {\n  return '</thead>\\n';\n};\nrules.tbody_open = function(/* tokens, idx, options, env */) {\n  return '<tbody>\\n';\n};\nrules.tbody_close = function(/* tokens, idx, options, env */) {\n  return '</tbody>\\n';\n};\nrules.tr_open = function(/* tokens, idx, options, env */) {\n  return '<tr>';\n};\nrules.tr_close = function(/* tokens, idx, options, env */) {\n  return '</tr>\\n';\n};\nrules.th_open = function(tokens, idx /*, options, env */) {\n  var token = tokens[idx];\n  return '<th'\n    + (token.align ? ' style=\"text-align:' + token.align + '\"' : '')\n    + '>';\n};\nrules.th_close = function(/* tokens, idx, options, env */) {\n  return '</th>';\n};\nrules.td_open = function(tokens, idx /*, options, env */) {\n  var token = tokens[idx];\n  return '<td'\n    + (token.align ? ' style=\"text-align:' + token.align + '\"' : '')\n    + '>';\n};\nrules.td_close = function(/* tokens, idx, options, env */) {\n  return '</td>';\n};\n\n/**\n * Bold\n */\n\nrules.strong_open = function(/* tokens, idx, options, env */) {\n  return '<strong>';\n};\nrules.strong_close = function(/* tokens, idx, options, env */) {\n  return '</strong>';\n};\n\n/**\n * Italicize\n */\n\nrules.em_open = function(/* tokens, idx, options, env */) {\n  return '<em>';\n};\nrules.em_close = function(/* tokens, idx, options, env */) {\n  return '</em>';\n};\n\n/**\n * Strikethrough\n */\n\nrules.del_open = function(/* tokens, idx, options, env */) {\n  return '<del>';\n};\nrules.del_close = function(/* tokens, idx, options, env */) {\n  return '</del>';\n};\n\n/**\n * Insert\n */\n\nrules.ins_open = function(/* tokens, idx, options, env */) {\n  return '<ins>';\n};\nrules.ins_close = function(/* tokens, idx, options, env */) {\n  return '</ins>';\n};\n\n/**\n * Highlight\n */\n\nrules.mark_open = function(/* tokens, idx, options, env */) {\n  return '<mark>';\n};\nrules.mark_close = function(/* tokens, idx, options, env */) {\n  return '</mark>';\n};\n\n/**\n * Super- and sub-script\n */\n\nrules.sub = function(tokens, idx /*, options, env */) {\n  return '<sub>' + escapeHtml(tokens[idx].content) + '</sub>';\n};\nrules.sup = function(tokens, idx /*, options, env */) {\n  return '<sup>' + escapeHtml(tokens[idx].content) + '</sup>';\n};\n\n/**\n * Breaks\n */\n\nrules.hardbreak = function(tokens, idx, options /*, env */) {\n  return options.xhtmlOut ? '<br />\\n' : '<br>\\n';\n};\nrules.softbreak = function(tokens, idx, options /*, env */) {\n  return options.breaks ? (options.xhtmlOut ? '<br />\\n' : '<br>\\n') : '\\n';\n};\n\n/**\n * Text\n */\n\nrules.text = function(tokens, idx /*, options, env */) {\n  return escapeHtml(tokens[idx].content);\n};\n\n/**\n * Content\n */\n\nrules.htmlblock = function(tokens, idx /*, options, env */) {\n  return tokens[idx].content;\n};\nrules.htmltag = function(tokens, idx /*, options, env */) {\n  return tokens[idx].content;\n};\n\n/**\n * Abbreviations, initialism\n */\n\nrules.abbr_open = function(tokens, idx /*, options, env */) {\n  return '<abbr title=\"' + escapeHtml(replaceEntities(tokens[idx].title)) + '\">';\n};\nrules.abbr_close = function(/* tokens, idx, options, env */) {\n  return '</abbr>';\n};\n\n/**\n * Footnotes\n */\n\nrules.footnote_ref = function(tokens, idx) {\n  var n = Number(tokens[idx].id + 1).toString();\n  var id = 'fnref' + n;\n  if (tokens[idx].subId > 0) {\n    id += ':' + tokens[idx].subId;\n  }\n  return '<sup class=\"footnote-ref\"><a href=\"#fn' + n + '\" id=\"' + id + '\">[' + n + ']</a></sup>';\n};\nrules.footnote_block_open = function(tokens, idx, options) {\n  var hr = options.xhtmlOut\n    ? '<hr class=\"footnotes-sep\" />\\n'\n    : '<hr class=\"footnotes-sep\">\\n';\n  return hr + '<section class=\"footnotes\">\\n<ol class=\"footnotes-list\">\\n';\n};\nrules.footnote_block_close = function() {\n  return '</ol>\\n</section>\\n';\n};\nrules.footnote_open = function(tokens, idx) {\n  var id = Number(tokens[idx].id + 1).toString();\n  return '<li id=\"fn' + id + '\"  class=\"footnote-item\">';\n};\nrules.footnote_close = function() {\n  return '</li>\\n';\n};\nrules.footnote_anchor = function(tokens, idx) {\n  var n = Number(tokens[idx].id + 1).toString();\n  var id = 'fnref' + n;\n  if (tokens[idx].subId > 0) {\n    id += ':' + tokens[idx].subId;\n  }\n  return ' <a href=\"#' + id + '\" class=\"footnote-backref\">↩</a>';\n};\n\n/**\n * Definition lists\n */\n\nrules.dl_open = function() {\n  return '<dl>\\n';\n};\nrules.dt_open = function() {\n  return '<dt>';\n};\nrules.dd_open = function() {\n  return '<dd>';\n};\nrules.dl_close = function() {\n  return '</dl>\\n';\n};\nrules.dt_close = function() {\n  return '</dt>\\n';\n};\nrules.dd_close = function() {\n  return '</dd>\\n';\n};\n\n/**\n * Helper functions\n */\n\nfunction nextToken(tokens, idx) {\n  if (++idx >= tokens.length - 2) {\n    return idx;\n  }\n  if ((tokens[idx].type === 'paragraph_open' && tokens[idx].tight) &&\n      (tokens[idx + 1].type === 'inline' && tokens[idx + 1].content.length === 0) &&\n      (tokens[idx + 2].type === 'paragraph_close' && tokens[idx + 2].tight)) {\n    return nextToken(tokens, idx + 2);\n  }\n  return idx;\n}\n\n/**\n * Check to see if `\\n` is needed before the next token.\n *\n * @param  {Array} `tokens`\n * @param  {Number} `idx`\n * @return {String} Empty string or newline\n * @api private\n */\n\nvar getBreak = rules.getBreak = function getBreak(tokens, idx) {\n  idx = nextToken(tokens, idx);\n  if (idx < tokens.length && tokens[idx].type === 'list_item_close') {\n    return '';\n  }\n  return '\\n';\n};\n\n/**\n * Renderer class. Renders HTML and exposes `rules` to allow\n * local modifications.\n */\n\nfunction Renderer() {\n  this.rules = assign({}, rules);\n\n  // exported helper, for custom rules only\n  this.getBreak = rules.getBreak;\n}\n\n/**\n * Render a string of inline HTML with the given `tokens` and\n * `options`.\n *\n * @param  {Array} `tokens`\n * @param  {Object} `options`\n * @param  {Object} `env`\n * @return {String}\n * @api public\n */\n\nRenderer.prototype.renderInline = function (tokens, options, env) {\n  var _rules = this.rules;\n  var len = tokens.length, i = 0;\n  var result = '';\n\n  while (len--) {\n    result += _rules[tokens[i].type](tokens, i++, options, env, this);\n  }\n\n  return result;\n};\n\n/**\n * Render a string of HTML with the given `tokens` and\n * `options`.\n *\n * @param  {Array} `tokens`\n * @param  {Object} `options`\n * @param  {Object} `env`\n * @return {String}\n * @api public\n */\n\nRenderer.prototype.render = function (tokens, options, env) {\n  var _rules = this.rules;\n  var len = tokens.length, i = -1;\n  var result = '';\n\n  while (++i < len) {\n    if (tokens[i].type === 'inline') {\n      result += this.renderInline(tokens[i].children, options, env);\n    } else {\n      result += _rules[tokens[i].type](tokens, i, options, env, this);\n    }\n  }\n  return result;\n};\n\n/**\n * Ruler is a helper class for building responsibility chains from\n * parse rules. It allows:\n *\n *   - easy stack rules chains\n *   - getting main chain and named chains content (as arrays of functions)\n *\n * Helper methods, should not be used directly.\n * @api private\n */\n\nfunction Ruler() {\n  // List of added rules. Each element is:\n  //\n  // { name: XXX,\n  //   enabled: Boolean,\n  //   fn: Function(),\n  //   alt: [ name2, name3 ] }\n  //\n  this.__rules__ = [];\n\n  // Cached rule chains.\n  //\n  // First level - chain name, '' for default.\n  // Second level - digital anchor for fast filtering by charcodes.\n  //\n  this.__cache__ = null;\n}\n\n/**\n * Find the index of a rule by `name`.\n *\n * @param  {String} `name`\n * @return {Number} Index of the given `name`\n * @api private\n */\n\nRuler.prototype.__find__ = function (name) {\n  var len = this.__rules__.length;\n  var i = -1;\n\n  while (len--) {\n    if (this.__rules__[++i].name === name) {\n      return i;\n    }\n  }\n  return -1;\n};\n\n/**\n * Build the rules lookup cache\n *\n * @api private\n */\n\nRuler.prototype.__compile__ = function () {\n  var self = this;\n  var chains = [ '' ];\n\n  // collect unique names\n  self.__rules__.forEach(function (rule) {\n    if (!rule.enabled) {\n      return;\n    }\n\n    rule.alt.forEach(function (altName) {\n      if (chains.indexOf(altName) < 0) {\n        chains.push(altName);\n      }\n    });\n  });\n\n  self.__cache__ = {};\n\n  chains.forEach(function (chain) {\n    self.__cache__[chain] = [];\n    self.__rules__.forEach(function (rule) {\n      if (!rule.enabled) {\n        return;\n      }\n\n      if (chain && rule.alt.indexOf(chain) < 0) {\n        return;\n      }\n      self.__cache__[chain].push(rule.fn);\n    });\n  });\n};\n\n/**\n * Ruler public methods\n * ------------------------------------------------\n */\n\n/**\n * Replace rule function\n *\n * @param  {String} `name` Rule name\n * @param  {Function `fn`\n * @param  {Object} `options`\n * @api private\n */\n\nRuler.prototype.at = function (name, fn, options) {\n  var idx = this.__find__(name);\n  var opt = options || {};\n\n  if (idx === -1) {\n    throw new Error('Parser rule not found: ' + name);\n  }\n\n  this.__rules__[idx].fn = fn;\n  this.__rules__[idx].alt = opt.alt || [];\n  this.__cache__ = null;\n};\n\n/**\n * Add a rule to the chain before given the `ruleName`.\n *\n * @param  {String}   `beforeName`\n * @param  {String}   `ruleName`\n * @param  {Function} `fn`\n * @param  {Object}   `options`\n * @api private\n */\n\nRuler.prototype.before = function (beforeName, ruleName, fn, options) {\n  var idx = this.__find__(beforeName);\n  var opt = options || {};\n\n  if (idx === -1) {\n    throw new Error('Parser rule not found: ' + beforeName);\n  }\n\n  this.__rules__.splice(idx, 0, {\n    name: ruleName,\n    enabled: true,\n    fn: fn,\n    alt: opt.alt || []\n  });\n\n  this.__cache__ = null;\n};\n\n/**\n * Add a rule to the chain after the given `ruleName`.\n *\n * @param  {String}   `afterName`\n * @param  {String}   `ruleName`\n * @param  {Function} `fn`\n * @param  {Object}   `options`\n * @api private\n */\n\nRuler.prototype.after = function (afterName, ruleName, fn, options) {\n  var idx = this.__find__(afterName);\n  var opt = options || {};\n\n  if (idx === -1) {\n    throw new Error('Parser rule not found: ' + afterName);\n  }\n\n  this.__rules__.splice(idx + 1, 0, {\n    name: ruleName,\n    enabled: true,\n    fn: fn,\n    alt: opt.alt || []\n  });\n\n  this.__cache__ = null;\n};\n\n/**\n * Add a rule to the end of chain.\n *\n * @param  {String}   `ruleName`\n * @param  {Function} `fn`\n * @param  {Object}   `options`\n * @return {String}\n */\n\nRuler.prototype.push = function (ruleName, fn, options) {\n  var opt = options || {};\n\n  this.__rules__.push({\n    name: ruleName,\n    enabled: true,\n    fn: fn,\n    alt: opt.alt || []\n  });\n\n  this.__cache__ = null;\n};\n\n/**\n * Enable a rule or list of rules.\n *\n * @param  {String|Array} `list` Name or array of rule names to enable\n * @param  {Boolean} `strict` If `true`, all non listed rules will be disabled.\n * @api private\n */\n\nRuler.prototype.enable = function (list, strict) {\n  list = !Array.isArray(list)\n    ? [ list ]\n    : list;\n\n  // In strict mode disable all existing rules first\n  if (strict) {\n    this.__rules__.forEach(function (rule) {\n      rule.enabled = false;\n    });\n  }\n\n  // Search by name and enable\n  list.forEach(function (name) {\n    var idx = this.__find__(name);\n    if (idx < 0) {\n      throw new Error('Rules manager: invalid rule name ' + name);\n    }\n    this.__rules__[idx].enabled = true;\n  }, this);\n\n  this.__cache__ = null;\n};\n\n\n/**\n * Disable a rule or list of rules.\n *\n * @param  {String|Array} `list` Name or array of rule names to disable\n * @api private\n */\n\nRuler.prototype.disable = function (list) {\n  list = !Array.isArray(list)\n    ? [ list ]\n    : list;\n\n  // Search by name and disable\n  list.forEach(function (name) {\n    var idx = this.__find__(name);\n    if (idx < 0) {\n      throw new Error('Rules manager: invalid rule name ' + name);\n    }\n    this.__rules__[idx].enabled = false;\n  }, this);\n\n  this.__cache__ = null;\n};\n\n/**\n * Get a rules list as an array of functions.\n *\n * @param  {String} `chainName`\n * @return {Object}\n * @api private\n */\n\nRuler.prototype.getRules = function (chainName) {\n  if (this.__cache__ === null) {\n    this.__compile__();\n  }\n  return this.__cache__[chainName] || [];\n};\n\nfunction block(state) {\n\n  if (state.inlineMode) {\n    state.tokens.push({\n      type: 'inline',\n      content: state.src.replace(/\\n/g, ' ').trim(),\n      level: 0,\n      lines: [ 0, 1 ],\n      children: []\n    });\n\n  } else {\n    state.block.parse(state.src, state.options, state.env, state.tokens);\n  }\n}\n\n// Inline parser state\n\nfunction StateInline(src, parserInline, options, env, outTokens) {\n  this.src = src;\n  this.env = env;\n  this.options = options;\n  this.parser = parserInline;\n  this.tokens = outTokens;\n  this.pos = 0;\n  this.posMax = this.src.length;\n  this.level = 0;\n  this.pending = '';\n  this.pendingLevel = 0;\n\n  this.cache = [];        // Stores { start: end } pairs. Useful for backtrack\n                          // optimization of pairs parse (emphasis, strikes).\n\n  // Link parser state vars\n\n  this.isInLabel = false; // Set true when seek link label - we should disable\n                          // \"paired\" rules (emphasis, strikes) to not skip\n                          // tailing `]`\n\n  this.linkLevel = 0;     // Increment for each nesting link. Used to prevent\n                          // nesting in definitions\n\n  this.linkContent = '';  // Temporary storage for link url\n\n  this.labelUnmatchedScopes = 0; // Track unpaired `[` for link labels\n                                 // (backtrack optimization)\n}\n\n// Flush pending text\n//\nStateInline.prototype.pushPending = function () {\n  this.tokens.push({\n    type: 'text',\n    content: this.pending,\n    level: this.pendingLevel\n  });\n  this.pending = '';\n};\n\n// Push new token to \"stream\".\n// If pending text exists - flush it as text token\n//\nStateInline.prototype.push = function (token) {\n  if (this.pending) {\n    this.pushPending();\n  }\n\n  this.tokens.push(token);\n  this.pendingLevel = this.level;\n};\n\n// Store value to cache.\n// !!! Implementation has parser-specific optimizations\n// !!! keys MUST be integer, >= 0; values MUST be integer, > 0\n//\nStateInline.prototype.cacheSet = function (key, val) {\n  for (var i = this.cache.length; i <= key; i++) {\n    this.cache.push(0);\n  }\n\n  this.cache[key] = val;\n};\n\n// Get cache value\n//\nStateInline.prototype.cacheGet = function (key) {\n  return key < this.cache.length ? this.cache[key] : 0;\n};\n\n/**\n * Parse link labels\n *\n * This function assumes that first character (`[`) already matches;\n * returns the end of the label.\n *\n * @param  {Object} state\n * @param  {Number} start\n * @api private\n */\n\nfunction parseLinkLabel(state, start) {\n  var level, found, marker,\n      labelEnd = -1,\n      max = state.posMax,\n      oldPos = state.pos,\n      oldFlag = state.isInLabel;\n\n  if (state.isInLabel) { return -1; }\n\n  if (state.labelUnmatchedScopes) {\n    state.labelUnmatchedScopes--;\n    return -1;\n  }\n\n  state.pos = start + 1;\n  state.isInLabel = true;\n  level = 1;\n\n  while (state.pos < max) {\n    marker = state.src.charCodeAt(state.pos);\n    if (marker === 0x5B /* [ */) {\n      level++;\n    } else if (marker === 0x5D /* ] */) {\n      level--;\n      if (level === 0) {\n        found = true;\n        break;\n      }\n    }\n\n    state.parser.skipToken(state);\n  }\n\n  if (found) {\n    labelEnd = state.pos;\n    state.labelUnmatchedScopes = 0;\n  } else {\n    state.labelUnmatchedScopes = level - 1;\n  }\n\n  // restore old state\n  state.pos = oldPos;\n  state.isInLabel = oldFlag;\n\n  return labelEnd;\n}\n\n// Parse abbreviation definitions, i.e. `*[abbr]: description`\n\n\nfunction parseAbbr(str, parserInline, options, env) {\n  var state, labelEnd, pos, max, label, title;\n\n  if (str.charCodeAt(0) !== 0x2A/* * */) { return -1; }\n  if (str.charCodeAt(1) !== 0x5B/* [ */) { return -1; }\n\n  if (str.indexOf(']:') === -1) { return -1; }\n\n  state = new StateInline(str, parserInline, options, env, []);\n  labelEnd = parseLinkLabel(state, 1);\n\n  if (labelEnd < 0 || str.charCodeAt(labelEnd + 1) !== 0x3A/* : */) { return -1; }\n\n  max = state.posMax;\n\n  // abbr title is always one line, so looking for ending \"\\n\" here\n  for (pos = labelEnd + 2; pos < max; pos++) {\n    if (state.src.charCodeAt(pos) === 0x0A) { break; }\n  }\n\n  label = str.slice(2, labelEnd);\n  title = str.slice(labelEnd + 2, pos).trim();\n  if (title.length === 0) { return -1; }\n  if (!env.abbreviations) { env.abbreviations = {}; }\n  // prepend ':' to avoid conflict with Object.prototype members\n  if (typeof env.abbreviations[':' + label] === 'undefined') {\n    env.abbreviations[':' + label] = title;\n  }\n\n  return pos;\n}\n\nfunction abbr(state) {\n  var tokens = state.tokens, i, l, content, pos;\n\n  if (state.inlineMode) {\n    return;\n  }\n\n  // Parse inlines\n  for (i = 1, l = tokens.length - 1; i < l; i++) {\n    if (tokens[i - 1].type === 'paragraph_open' &&\n        tokens[i].type === 'inline' &&\n        tokens[i + 1].type === 'paragraph_close') {\n\n      content = tokens[i].content;\n      while (content.length) {\n        pos = parseAbbr(content, state.inline, state.options, state.env);\n        if (pos < 0) { break; }\n        content = content.slice(pos).trim();\n      }\n\n      tokens[i].content = content;\n      if (!content.length) {\n        tokens[i - 1].tight = true;\n        tokens[i + 1].tight = true;\n      }\n    }\n  }\n}\n\nfunction normalizeLink(url) {\n  var normalized = replaceEntities(url);\n  // We shouldn't care about the result of malformed URIs,\n  // and should not throw an exception.\n  try {\n    normalized = decodeURI(normalized);\n  } catch (err) {}\n  return encodeURI(normalized);\n}\n\n/**\n * Parse link destination\n *\n *   - on success it returns a string and updates state.pos;\n *   - on failure it returns null\n *\n * @param  {Object} state\n * @param  {Number} pos\n * @api private\n */\n\nfunction parseLinkDestination(state, pos) {\n  var code, level, link,\n      start = pos,\n      max = state.posMax;\n\n  if (state.src.charCodeAt(pos) === 0x3C /* < */) {\n    pos++;\n    while (pos < max) {\n      code = state.src.charCodeAt(pos);\n      if (code === 0x0A /* \\n */) { return false; }\n      if (code === 0x3E /* > */) {\n        link = normalizeLink(unescapeMd(state.src.slice(start + 1, pos)));\n        if (!state.parser.validateLink(link)) { return false; }\n        state.pos = pos + 1;\n        state.linkContent = link;\n        return true;\n      }\n      if (code === 0x5C /* \\ */ && pos + 1 < max) {\n        pos += 2;\n        continue;\n      }\n\n      pos++;\n    }\n\n    // no closing '>'\n    return false;\n  }\n\n  // this should be ... } else { ... branch\n\n  level = 0;\n  while (pos < max) {\n    code = state.src.charCodeAt(pos);\n\n    if (code === 0x20) { break; }\n\n    // ascii control chars\n    if (code < 0x20 || code === 0x7F) { break; }\n\n    if (code === 0x5C /* \\ */ && pos + 1 < max) {\n      pos += 2;\n      continue;\n    }\n\n    if (code === 0x28 /* ( */) {\n      level++;\n      if (level > 1) { break; }\n    }\n\n    if (code === 0x29 /* ) */) {\n      level--;\n      if (level < 0) { break; }\n    }\n\n    pos++;\n  }\n\n  if (start === pos) { return false; }\n\n  link = unescapeMd(state.src.slice(start, pos));\n  if (!state.parser.validateLink(link)) { return false; }\n\n  state.linkContent = link;\n  state.pos = pos;\n  return true;\n}\n\n/**\n * Parse link title\n *\n *   - on success it returns a string and updates state.pos;\n *   - on failure it returns null\n *\n * @param  {Object} state\n * @param  {Number} pos\n * @api private\n */\n\nfunction parseLinkTitle(state, pos) {\n  var code,\n      start = pos,\n      max = state.posMax,\n      marker = state.src.charCodeAt(pos);\n\n  if (marker !== 0x22 /* \" */ && marker !== 0x27 /* ' */ && marker !== 0x28 /* ( */) { return false; }\n\n  pos++;\n\n  // if opening marker is \"(\", switch it to closing marker \")\"\n  if (marker === 0x28) { marker = 0x29; }\n\n  while (pos < max) {\n    code = state.src.charCodeAt(pos);\n    if (code === marker) {\n      state.pos = pos + 1;\n      state.linkContent = unescapeMd(state.src.slice(start + 1, pos));\n      return true;\n    }\n    if (code === 0x5C /* \\ */ && pos + 1 < max) {\n      pos += 2;\n      continue;\n    }\n\n    pos++;\n  }\n\n  return false;\n}\n\nfunction normalizeReference(str) {\n  // use .toUpperCase() instead of .toLowerCase()\n  // here to avoid a conflict with Object.prototype\n  // members (most notably, `__proto__`)\n  return str.trim().replace(/\\s+/g, ' ').toUpperCase();\n}\n\nfunction parseReference(str, parser, options, env) {\n  var state, labelEnd, pos, max, code, start, href, title, label;\n\n  if (str.charCodeAt(0) !== 0x5B/* [ */) { return -1; }\n\n  if (str.indexOf(']:') === -1) { return -1; }\n\n  state = new StateInline(str, parser, options, env, []);\n  labelEnd = parseLinkLabel(state, 0);\n\n  if (labelEnd < 0 || str.charCodeAt(labelEnd + 1) !== 0x3A/* : */) { return -1; }\n\n  max = state.posMax;\n\n  // [label]:   destination   'title'\n  //         ^^^ skip optional whitespace here\n  for (pos = labelEnd + 2; pos < max; pos++) {\n    code = state.src.charCodeAt(pos);\n    if (code !== 0x20 && code !== 0x0A) { break; }\n  }\n\n  // [label]:   destination   'title'\n  //            ^^^^^^^^^^^ parse this\n  if (!parseLinkDestination(state, pos)) { return -1; }\n  href = state.linkContent;\n  pos = state.pos;\n\n  // [label]:   destination   'title'\n  //                       ^^^ skipping those spaces\n  start = pos;\n  for (pos = pos + 1; pos < max; pos++) {\n    code = state.src.charCodeAt(pos);\n    if (code !== 0x20 && code !== 0x0A) { break; }\n  }\n\n  // [label]:   destination   'title'\n  //                          ^^^^^^^ parse this\n  if (pos < max && start !== pos && parseLinkTitle(state, pos)) {\n    title = state.linkContent;\n    pos = state.pos;\n  } else {\n    title = '';\n    pos = start;\n  }\n\n  // ensure that the end of the line is empty\n  while (pos < max && state.src.charCodeAt(pos) === 0x20/* space */) { pos++; }\n  if (pos < max && state.src.charCodeAt(pos) !== 0x0A) { return -1; }\n\n  label = normalizeReference(str.slice(1, labelEnd));\n  if (typeof env.references[label] === 'undefined') {\n    env.references[label] = { title: title, href: href };\n  }\n\n  return pos;\n}\n\n\nfunction references(state) {\n  var tokens = state.tokens, i, l, content, pos;\n\n  state.env.references = state.env.references || {};\n\n  if (state.inlineMode) {\n    return;\n  }\n\n  // Scan definitions in paragraph inlines\n  for (i = 1, l = tokens.length - 1; i < l; i++) {\n    if (tokens[i].type === 'inline' &&\n        tokens[i - 1].type === 'paragraph_open' &&\n        tokens[i + 1].type === 'paragraph_close') {\n\n      content = tokens[i].content;\n      while (content.length) {\n        pos = parseReference(content, state.inline, state.options, state.env);\n        if (pos < 0) { break; }\n        content = content.slice(pos).trim();\n      }\n\n      tokens[i].content = content;\n      if (!content.length) {\n        tokens[i - 1].tight = true;\n        tokens[i + 1].tight = true;\n      }\n    }\n  }\n}\n\nfunction inline(state) {\n  var tokens = state.tokens, tok, i, l;\n\n  // Parse inlines\n  for (i = 0, l = tokens.length; i < l; i++) {\n    tok = tokens[i];\n    if (tok.type === 'inline') {\n      state.inline.parse(tok.content, state.options, state.env, tok.children);\n    }\n  }\n}\n\nfunction footnote_block(state) {\n  var i, l, j, t, lastParagraph, list, tokens, current, currentLabel,\n      level = 0,\n      insideRef = false,\n      refTokens = {};\n\n  if (!state.env.footnotes) { return; }\n\n  state.tokens = state.tokens.filter(function(tok) {\n    if (tok.type === 'footnote_reference_open') {\n      insideRef = true;\n      current = [];\n      currentLabel = tok.label;\n      return false;\n    }\n    if (tok.type === 'footnote_reference_close') {\n      insideRef = false;\n      // prepend ':' to avoid conflict with Object.prototype members\n      refTokens[':' + currentLabel] = current;\n      return false;\n    }\n    if (insideRef) { current.push(tok); }\n    return !insideRef;\n  });\n\n  if (!state.env.footnotes.list) { return; }\n  list = state.env.footnotes.list;\n\n  state.tokens.push({\n    type: 'footnote_block_open',\n    level: level++\n  });\n  for (i = 0, l = list.length; i < l; i++) {\n    state.tokens.push({\n      type: 'footnote_open',\n      id: i,\n      level: level++\n    });\n\n    if (list[i].tokens) {\n      tokens = [];\n      tokens.push({\n        type: 'paragraph_open',\n        tight: false,\n        level: level++\n      });\n      tokens.push({\n        type: 'inline',\n        content: '',\n        level: level,\n        children: list[i].tokens\n      });\n      tokens.push({\n        type: 'paragraph_close',\n        tight: false,\n        level: --level\n      });\n    } else if (list[i].label) {\n      tokens = refTokens[':' + list[i].label];\n    }\n\n    state.tokens = state.tokens.concat(tokens);\n    if (state.tokens[state.tokens.length - 1].type === 'paragraph_close') {\n      lastParagraph = state.tokens.pop();\n    } else {\n      lastParagraph = null;\n    }\n\n    t = list[i].count > 0 ? list[i].count : 1;\n    for (j = 0; j < t; j++) {\n      state.tokens.push({\n        type: 'footnote_anchor',\n        id: i,\n        subId: j,\n        level: level\n      });\n    }\n\n    if (lastParagraph) {\n      state.tokens.push(lastParagraph);\n    }\n\n    state.tokens.push({\n      type: 'footnote_close',\n      level: --level\n    });\n  }\n  state.tokens.push({\n    type: 'footnote_block_close',\n    level: --level\n  });\n}\n\n// Enclose abbreviations in <abbr> tags\n//\n\nvar PUNCT_CHARS = ' \\n()[]\\'\".,!?-';\n\n\n// from Google closure library\n// http://closure-library.googlecode.com/git-history/docs/local_closure_goog_string_string.js.source.html#line1021\nfunction regEscape(s) {\n  return s.replace(/([-()\\[\\]{}+?*.$\\^|,:#<!\\\\])/g, '\\\\$1');\n}\n\n\nfunction abbr2(state) {\n  var i, j, l, tokens, token, text, nodes, pos, level, reg, m, regText,\n      blockTokens = state.tokens;\n\n  if (!state.env.abbreviations) { return; }\n  if (!state.env.abbrRegExp) {\n    regText = '(^|[' + PUNCT_CHARS.split('').map(regEscape).join('') + '])'\n            + '(' + Object.keys(state.env.abbreviations).map(function (x) {\n                      return x.substr(1);\n                    }).sort(function (a, b) {\n                      return b.length - a.length;\n                    }).map(regEscape).join('|') + ')'\n            + '($|[' + PUNCT_CHARS.split('').map(regEscape).join('') + '])';\n    state.env.abbrRegExp = new RegExp(regText, 'g');\n  }\n  reg = state.env.abbrRegExp;\n\n  for (j = 0, l = blockTokens.length; j < l; j++) {\n    if (blockTokens[j].type !== 'inline') { continue; }\n    tokens = blockTokens[j].children;\n\n    // We scan from the end, to keep position when new tags added.\n    for (i = tokens.length - 1; i >= 0; i--) {\n      token = tokens[i];\n      if (token.type !== 'text') { continue; }\n\n      pos = 0;\n      text = token.content;\n      reg.lastIndex = 0;\n      level = token.level;\n      nodes = [];\n\n      while ((m = reg.exec(text))) {\n        if (reg.lastIndex > pos) {\n          nodes.push({\n            type: 'text',\n            content: text.slice(pos, m.index + m[1].length),\n            level: level\n          });\n        }\n\n        nodes.push({\n          type: 'abbr_open',\n          title: state.env.abbreviations[':' + m[2]],\n          level: level++\n        });\n        nodes.push({\n          type: 'text',\n          content: m[2],\n          level: level\n        });\n        nodes.push({\n          type: 'abbr_close',\n          level: --level\n        });\n        pos = reg.lastIndex - m[3].length;\n      }\n\n      if (!nodes.length) { continue; }\n\n      if (pos < text.length) {\n        nodes.push({\n          type: 'text',\n          content: text.slice(pos),\n          level: level\n        });\n      }\n\n      // replace current node\n      blockTokens[j].children = tokens = [].concat(tokens.slice(0, i), nodes, tokens.slice(i + 1));\n    }\n  }\n}\n\n// Simple typographical replacements\n//\n// TODO:\n// - fractionals 1/2, 1/4, 3/4 -> ½, ¼, ¾\n// - miltiplication 2 x 4 -> 2 × 4\n\nvar RARE_RE = /\\+-|\\.\\.|\\?\\?\\?\\?|!!!!|,,|--/;\n\nvar SCOPED_ABBR_RE = /\\((c|tm|r|p)\\)/ig;\nvar SCOPED_ABBR = {\n  'c': '©',\n  'r': '®',\n  'p': '§',\n  'tm': '™'\n};\n\nfunction replaceScopedAbbr(str) {\n  if (str.indexOf('(') < 0) { return str; }\n\n  return str.replace(SCOPED_ABBR_RE, function(match, name) {\n    return SCOPED_ABBR[name.toLowerCase()];\n  });\n}\n\n\nfunction replace(state) {\n  var i, token, text, inlineTokens, blkIdx;\n\n  if (!state.options.typographer) { return; }\n\n  for (blkIdx = state.tokens.length - 1; blkIdx >= 0; blkIdx--) {\n\n    if (state.tokens[blkIdx].type !== 'inline') { continue; }\n\n    inlineTokens = state.tokens[blkIdx].children;\n\n    for (i = inlineTokens.length - 1; i >= 0; i--) {\n      token = inlineTokens[i];\n      if (token.type === 'text') {\n        text = token.content;\n\n        text = replaceScopedAbbr(text);\n\n        if (RARE_RE.test(text)) {\n          text = text\n            .replace(/\\+-/g, '±')\n            // .., ..., ....... -> …\n            // but ?..... & !..... -> ?.. & !..\n            .replace(/\\.{2,}/g, '…').replace(/([?!])…/g, '$1..')\n            .replace(/([?!]){4,}/g, '$1$1$1').replace(/,{2,}/g, ',')\n            // em-dash\n            .replace(/(^|[^-])---([^-]|$)/mg, '$1\\u2014$2')\n            // en-dash\n            .replace(/(^|\\s)--(\\s|$)/mg, '$1\\u2013$2')\n            .replace(/(^|[^-\\s])--([^-\\s]|$)/mg, '$1\\u2013$2');\n        }\n\n        token.content = text;\n      }\n    }\n  }\n}\n\n// Convert straight quotation marks to typographic ones\n//\n\nvar QUOTE_TEST_RE = /['\"]/;\nvar QUOTE_RE = /['\"]/g;\nvar PUNCT_RE = /[-\\s()\\[\\]]/;\nvar APOSTROPHE = '’';\n\n// This function returns true if the character at `pos`\n// could be inside a word.\nfunction isLetter(str, pos) {\n  if (pos < 0 || pos >= str.length) { return false; }\n  return !PUNCT_RE.test(str[pos]);\n}\n\n\nfunction replaceAt(str, index, ch) {\n  return str.substr(0, index) + ch + str.substr(index + 1);\n}\n\n\nfunction smartquotes(state) {\n  /*eslint max-depth:0*/\n  var i, token, text, t, pos, max, thisLevel, lastSpace, nextSpace, item,\n      canOpen, canClose, j, isSingle, blkIdx, tokens,\n      stack;\n\n  if (!state.options.typographer) { return; }\n\n  stack = [];\n\n  for (blkIdx = state.tokens.length - 1; blkIdx >= 0; blkIdx--) {\n\n    if (state.tokens[blkIdx].type !== 'inline') { continue; }\n\n    tokens = state.tokens[blkIdx].children;\n    stack.length = 0;\n\n    for (i = 0; i < tokens.length; i++) {\n      token = tokens[i];\n\n      if (token.type !== 'text' || QUOTE_TEST_RE.test(token.text)) { continue; }\n\n      thisLevel = tokens[i].level;\n\n      for (j = stack.length - 1; j >= 0; j--) {\n        if (stack[j].level <= thisLevel) { break; }\n      }\n      stack.length = j + 1;\n\n      text = token.content;\n      pos = 0;\n      max = text.length;\n\n      /*eslint no-labels:0,block-scoped-var:0*/\n      OUTER:\n      while (pos < max) {\n        QUOTE_RE.lastIndex = pos;\n        t = QUOTE_RE.exec(text);\n        if (!t) { break; }\n\n        lastSpace = !isLetter(text, t.index - 1);\n        pos = t.index + 1;\n        isSingle = (t[0] === \"'\");\n        nextSpace = !isLetter(text, pos);\n\n        if (!nextSpace && !lastSpace) {\n          // middle of word\n          if (isSingle) {\n            token.content = replaceAt(token.content, t.index, APOSTROPHE);\n          }\n          continue;\n        }\n\n        canOpen = !nextSpace;\n        canClose = !lastSpace;\n\n        if (canClose) {\n          // this could be a closing quote, rewind the stack to get a match\n          for (j = stack.length - 1; j >= 0; j--) {\n            item = stack[j];\n            if (stack[j].level < thisLevel) { break; }\n            if (item.single === isSingle && stack[j].level === thisLevel) {\n              item = stack[j];\n              if (isSingle) {\n                tokens[item.token].content = replaceAt(tokens[item.token].content, item.pos, state.options.quotes[2]);\n                token.content = replaceAt(token.content, t.index, state.options.quotes[3]);\n              } else {\n                tokens[item.token].content = replaceAt(tokens[item.token].content, item.pos, state.options.quotes[0]);\n                token.content = replaceAt(token.content, t.index, state.options.quotes[1]);\n              }\n              stack.length = j;\n              continue OUTER;\n            }\n          }\n        }\n\n        if (canOpen) {\n          stack.push({\n            token: i,\n            pos: t.index,\n            single: isSingle,\n            level: thisLevel\n          });\n        } else if (canClose && isSingle) {\n          token.content = replaceAt(token.content, t.index, APOSTROPHE);\n        }\n      }\n    }\n  }\n}\n\n/**\n * Core parser `rules`\n */\n\nvar _rules = [\n  [ 'block',          block          ],\n  [ 'abbr',           abbr           ],\n  [ 'references',     references     ],\n  [ 'inline',         inline         ],\n  [ 'footnote_tail',  footnote_block  ],\n  [ 'abbr2',          abbr2          ],\n  [ 'replacements',   replace   ],\n  [ 'smartquotes',    smartquotes    ],\n];\n\n/**\n * Class for top level (`core`) parser rules\n *\n * @api private\n */\n\nfunction Core() {\n  this.options = {};\n  this.ruler = new Ruler();\n  for (var i = 0; i < _rules.length; i++) {\n    this.ruler.push(_rules[i][0], _rules[i][1]);\n  }\n}\n\n/**\n * Process rules with the given `state`\n *\n * @param  {Object} `state`\n * @api private\n */\n\nCore.prototype.process = function (state) {\n  var i, l, rules;\n  rules = this.ruler.getRules('');\n  for (i = 0, l = rules.length; i < l; i++) {\n    rules[i](state);\n  }\n};\n\n// Parser state class\n\nfunction StateBlock(src, parser, options, env, tokens) {\n  var ch, s, start, pos, len, indent, indent_found;\n\n  this.src = src;\n\n  // Shortcuts to simplify nested calls\n  this.parser = parser;\n\n  this.options = options;\n\n  this.env = env;\n\n  //\n  // Internal state vartiables\n  //\n\n  this.tokens = tokens;\n\n  this.bMarks = [];  // line begin offsets for fast jumps\n  this.eMarks = [];  // line end offsets for fast jumps\n  this.tShift = [];  // indent for each line\n\n  // block parser variables\n  this.blkIndent  = 0; // required block content indent\n                       // (for example, if we are in list)\n  this.line       = 0; // line index in src\n  this.lineMax    = 0; // lines count\n  this.tight      = false;  // loose/tight mode for lists\n  this.parentType = 'root'; // if `list`, block parser stops on two newlines\n  this.ddIndent   = -1; // indent of the current dd block (-1 if there isn't any)\n\n  this.level = 0;\n\n  // renderer\n  this.result = '';\n\n  // Create caches\n  // Generate markers.\n  s = this.src;\n  indent = 0;\n  indent_found = false;\n\n  for (start = pos = indent = 0, len = s.length; pos < len; pos++) {\n    ch = s.charCodeAt(pos);\n\n    if (!indent_found) {\n      if (ch === 0x20/* space */) {\n        indent++;\n        continue;\n      } else {\n        indent_found = true;\n      }\n    }\n\n    if (ch === 0x0A || pos === len - 1) {\n      if (ch !== 0x0A) { pos++; }\n      this.bMarks.push(start);\n      this.eMarks.push(pos);\n      this.tShift.push(indent);\n\n      indent_found = false;\n      indent = 0;\n      start = pos + 1;\n    }\n  }\n\n  // Push fake entry to simplify cache bounds checks\n  this.bMarks.push(s.length);\n  this.eMarks.push(s.length);\n  this.tShift.push(0);\n\n  this.lineMax = this.bMarks.length - 1; // don't count last fake line\n}\n\nStateBlock.prototype.isEmpty = function isEmpty(line) {\n  return this.bMarks[line] + this.tShift[line] >= this.eMarks[line];\n};\n\nStateBlock.prototype.skipEmptyLines = function skipEmptyLines(from) {\n  for (var max = this.lineMax; from < max; from++) {\n    if (this.bMarks[from] + this.tShift[from] < this.eMarks[from]) {\n      break;\n    }\n  }\n  return from;\n};\n\n// Skip spaces from given position.\nStateBlock.prototype.skipSpaces = function skipSpaces(pos) {\n  for (var max = this.src.length; pos < max; pos++) {\n    if (this.src.charCodeAt(pos) !== 0x20/* space */) { break; }\n  }\n  return pos;\n};\n\n// Skip char codes from given position\nStateBlock.prototype.skipChars = function skipChars(pos, code) {\n  for (var max = this.src.length; pos < max; pos++) {\n    if (this.src.charCodeAt(pos) !== code) { break; }\n  }\n  return pos;\n};\n\n// Skip char codes reverse from given position - 1\nStateBlock.prototype.skipCharsBack = function skipCharsBack(pos, code, min) {\n  if (pos <= min) { return pos; }\n\n  while (pos > min) {\n    if (code !== this.src.charCodeAt(--pos)) { return pos + 1; }\n  }\n  return pos;\n};\n\n// cut lines range from source.\nStateBlock.prototype.getLines = function getLines(begin, end, indent, keepLastLF) {\n  var i, first, last, queue, shift,\n      line = begin;\n\n  if (begin >= end) {\n    return '';\n  }\n\n  // Opt: don't use push queue for single line;\n  if (line + 1 === end) {\n    first = this.bMarks[line] + Math.min(this.tShift[line], indent);\n    last = keepLastLF ? this.eMarks[line] + 1 : this.eMarks[line];\n    return this.src.slice(first, last);\n  }\n\n  queue = new Array(end - begin);\n\n  for (i = 0; line < end; line++, i++) {\n    shift = this.tShift[line];\n    if (shift > indent) { shift = indent; }\n    if (shift < 0) { shift = 0; }\n\n    first = this.bMarks[line] + shift;\n\n    if (line + 1 < end || keepLastLF) {\n      // No need for bounds check because we have fake entry on tail.\n      last = this.eMarks[line] + 1;\n    } else {\n      last = this.eMarks[line];\n    }\n\n    queue[i] = this.src.slice(first, last);\n  }\n\n  return queue.join('');\n};\n\n// Code block (4 spaces padded)\n\nfunction code(state, startLine, endLine/*, silent*/) {\n  var nextLine, last;\n\n  if (state.tShift[startLine] - state.blkIndent < 4) { return false; }\n\n  last = nextLine = startLine + 1;\n\n  while (nextLine < endLine) {\n    if (state.isEmpty(nextLine)) {\n      nextLine++;\n      continue;\n    }\n    if (state.tShift[nextLine] - state.blkIndent >= 4) {\n      nextLine++;\n      last = nextLine;\n      continue;\n    }\n    break;\n  }\n\n  state.line = nextLine;\n  state.tokens.push({\n    type: 'code',\n    content: state.getLines(startLine, last, 4 + state.blkIndent, true),\n    block: true,\n    lines: [ startLine, state.line ],\n    level: state.level\n  });\n\n  return true;\n}\n\n// fences (``` lang, ~~~ lang)\n\nfunction fences(state, startLine, endLine, silent) {\n  var marker, len, params, nextLine, mem,\n      haveEndMarker = false,\n      pos = state.bMarks[startLine] + state.tShift[startLine],\n      max = state.eMarks[startLine];\n\n  if (pos + 3 > max) { return false; }\n\n  marker = state.src.charCodeAt(pos);\n\n  if (marker !== 0x7E/* ~ */ && marker !== 0x60 /* ` */) {\n    return false;\n  }\n\n  // scan marker length\n  mem = pos;\n  pos = state.skipChars(pos, marker);\n\n  len = pos - mem;\n\n  if (len < 3) { return false; }\n\n  params = state.src.slice(pos, max).trim();\n\n  if (params.indexOf('`') >= 0) { return false; }\n\n  // Since start is found, we can report success here in validation mode\n  if (silent) { return true; }\n\n  // search end of block\n  nextLine = startLine;\n\n  for (;;) {\n    nextLine++;\n    if (nextLine >= endLine) {\n      // unclosed block should be autoclosed by end of document.\n      // also block seems to be autoclosed by end of parent\n      break;\n    }\n\n    pos = mem = state.bMarks[nextLine] + state.tShift[nextLine];\n    max = state.eMarks[nextLine];\n\n    if (pos < max && state.tShift[nextLine] < state.blkIndent) {\n      // non-empty line with negative indent should stop the list:\n      // - ```\n      //  test\n      break;\n    }\n\n    if (state.src.charCodeAt(pos) !== marker) { continue; }\n\n    if (state.tShift[nextLine] - state.blkIndent >= 4) {\n      // closing fence should be indented less than 4 spaces\n      continue;\n    }\n\n    pos = state.skipChars(pos, marker);\n\n    // closing code fence must be at least as long as the opening one\n    if (pos - mem < len) { continue; }\n\n    // make sure tail has spaces only\n    pos = state.skipSpaces(pos);\n\n    if (pos < max) { continue; }\n\n    haveEndMarker = true;\n    // found!\n    break;\n  }\n\n  // If a fence has heading spaces, they should be removed from its inner block\n  len = state.tShift[startLine];\n\n  state.line = nextLine + (haveEndMarker ? 1 : 0);\n  state.tokens.push({\n    type: 'fence',\n    params: params,\n    content: state.getLines(startLine + 1, nextLine, len, true),\n    lines: [ startLine, state.line ],\n    level: state.level\n  });\n\n  return true;\n}\n\n// Block quotes\n\nfunction blockquote(state, startLine, endLine, silent) {\n  var nextLine, lastLineEmpty, oldTShift, oldBMarks, oldIndent, oldParentType, lines,\n      terminatorRules,\n      i, l, terminate,\n      pos = state.bMarks[startLine] + state.tShift[startLine],\n      max = state.eMarks[startLine];\n\n  if (pos > max) { return false; }\n\n  // check the block quote marker\n  if (state.src.charCodeAt(pos++) !== 0x3E/* > */) { return false; }\n\n  if (state.level >= state.options.maxNesting) { return false; }\n\n  // we know that it's going to be a valid blockquote,\n  // so no point trying to find the end of it in silent mode\n  if (silent) { return true; }\n\n  // skip one optional space after '>'\n  if (state.src.charCodeAt(pos) === 0x20) { pos++; }\n\n  oldIndent = state.blkIndent;\n  state.blkIndent = 0;\n\n  oldBMarks = [ state.bMarks[startLine] ];\n  state.bMarks[startLine] = pos;\n\n  // check if we have an empty blockquote\n  pos = pos < max ? state.skipSpaces(pos) : pos;\n  lastLineEmpty = pos >= max;\n\n  oldTShift = [ state.tShift[startLine] ];\n  state.tShift[startLine] = pos - state.bMarks[startLine];\n\n  terminatorRules = state.parser.ruler.getRules('blockquote');\n\n  // Search the end of the block\n  //\n  // Block ends with either:\n  //  1. an empty line outside:\n  //     ```\n  //     > test\n  //\n  //     ```\n  //  2. an empty line inside:\n  //     ```\n  //     >\n  //     test\n  //     ```\n  //  3. another tag\n  //     ```\n  //     > test\n  //      - - -\n  //     ```\n  for (nextLine = startLine + 1; nextLine < endLine; nextLine++) {\n    pos = state.bMarks[nextLine] + state.tShift[nextLine];\n    max = state.eMarks[nextLine];\n\n    if (pos >= max) {\n      // Case 1: line is not inside the blockquote, and this line is empty.\n      break;\n    }\n\n    if (state.src.charCodeAt(pos++) === 0x3E/* > */) {\n      // This line is inside the blockquote.\n\n      // skip one optional space after '>'\n      if (state.src.charCodeAt(pos) === 0x20) { pos++; }\n\n      oldBMarks.push(state.bMarks[nextLine]);\n      state.bMarks[nextLine] = pos;\n\n      pos = pos < max ? state.skipSpaces(pos) : pos;\n      lastLineEmpty = pos >= max;\n\n      oldTShift.push(state.tShift[nextLine]);\n      state.tShift[nextLine] = pos - state.bMarks[nextLine];\n      continue;\n    }\n\n    // Case 2: line is not inside the blockquote, and the last line was empty.\n    if (lastLineEmpty) { break; }\n\n    // Case 3: another tag found.\n    terminate = false;\n    for (i = 0, l = terminatorRules.length; i < l; i++) {\n      if (terminatorRules[i](state, nextLine, endLine, true)) {\n        terminate = true;\n        break;\n      }\n    }\n    if (terminate) { break; }\n\n    oldBMarks.push(state.bMarks[nextLine]);\n    oldTShift.push(state.tShift[nextLine]);\n\n    // A negative number means that this is a paragraph continuation;\n    //\n    // Any negative number will do the job here, but it's better for it\n    // to be large enough to make any bugs obvious.\n    state.tShift[nextLine] = -1337;\n  }\n\n  oldParentType = state.parentType;\n  state.parentType = 'blockquote';\n  state.tokens.push({\n    type: 'blockquote_open',\n    lines: lines = [ startLine, 0 ],\n    level: state.level++\n  });\n  state.parser.tokenize(state, startLine, nextLine);\n  state.tokens.push({\n    type: 'blockquote_close',\n    level: --state.level\n  });\n  state.parentType = oldParentType;\n  lines[1] = state.line;\n\n  // Restore original tShift; this might not be necessary since the parser\n  // has already been here, but just to make sure we can do that.\n  for (i = 0; i < oldTShift.length; i++) {\n    state.bMarks[i + startLine] = oldBMarks[i];\n    state.tShift[i + startLine] = oldTShift[i];\n  }\n  state.blkIndent = oldIndent;\n\n  return true;\n}\n\n// Horizontal rule\n\nfunction hr(state, startLine, endLine, silent) {\n  var marker, cnt, ch,\n      pos = state.bMarks[startLine],\n      max = state.eMarks[startLine];\n\n  pos += state.tShift[startLine];\n\n  if (pos > max) { return false; }\n\n  marker = state.src.charCodeAt(pos++);\n\n  // Check hr marker\n  if (marker !== 0x2A/* * */ &&\n      marker !== 0x2D/* - */ &&\n      marker !== 0x5F/* _ */) {\n    return false;\n  }\n\n  // markers can be mixed with spaces, but there should be at least 3 one\n\n  cnt = 1;\n  while (pos < max) {\n    ch = state.src.charCodeAt(pos++);\n    if (ch !== marker && ch !== 0x20/* space */) { return false; }\n    if (ch === marker) { cnt++; }\n  }\n\n  if (cnt < 3) { return false; }\n\n  if (silent) { return true; }\n\n  state.line = startLine + 1;\n  state.tokens.push({\n    type: 'hr',\n    lines: [ startLine, state.line ],\n    level: state.level\n  });\n\n  return true;\n}\n\n// Lists\n\n// Search `[-+*][\\n ]`, returns next pos arter marker on success\n// or -1 on fail.\nfunction skipBulletListMarker(state, startLine) {\n  var marker, pos, max;\n\n  pos = state.bMarks[startLine] + state.tShift[startLine];\n  max = state.eMarks[startLine];\n\n  if (pos >= max) { return -1; }\n\n  marker = state.src.charCodeAt(pos++);\n  // Check bullet\n  if (marker !== 0x2A/* * */ &&\n      marker !== 0x2D/* - */ &&\n      marker !== 0x2B/* + */) {\n    return -1;\n  }\n\n  if (pos < max && state.src.charCodeAt(pos) !== 0x20) {\n    // \" 1.test \" - is not a list item\n    return -1;\n  }\n\n  return pos;\n}\n\n// Search `\\d+[.)][\\n ]`, returns next pos arter marker on success\n// or -1 on fail.\nfunction skipOrderedListMarker(state, startLine) {\n  var ch,\n      pos = state.bMarks[startLine] + state.tShift[startLine],\n      max = state.eMarks[startLine];\n\n  if (pos + 1 >= max) { return -1; }\n\n  ch = state.src.charCodeAt(pos++);\n\n  if (ch < 0x30/* 0 */ || ch > 0x39/* 9 */) { return -1; }\n\n  for (;;) {\n    // EOL -> fail\n    if (pos >= max) { return -1; }\n\n    ch = state.src.charCodeAt(pos++);\n\n    if (ch >= 0x30/* 0 */ && ch <= 0x39/* 9 */) {\n      continue;\n    }\n\n    // found valid marker\n    if (ch === 0x29/* ) */ || ch === 0x2e/* . */) {\n      break;\n    }\n\n    return -1;\n  }\n\n\n  if (pos < max && state.src.charCodeAt(pos) !== 0x20/* space */) {\n    // \" 1.test \" - is not a list item\n    return -1;\n  }\n  return pos;\n}\n\nfunction markTightParagraphs(state, idx) {\n  var i, l,\n      level = state.level + 2;\n\n  for (i = idx + 2, l = state.tokens.length - 2; i < l; i++) {\n    if (state.tokens[i].level === level && state.tokens[i].type === 'paragraph_open') {\n      state.tokens[i + 2].tight = true;\n      state.tokens[i].tight = true;\n      i += 2;\n    }\n  }\n}\n\n\nfunction list(state, startLine, endLine, silent) {\n  var nextLine,\n      indent,\n      oldTShift,\n      oldIndent,\n      oldTight,\n      oldParentType,\n      start,\n      posAfterMarker,\n      max,\n      indentAfterMarker,\n      markerValue,\n      markerCharCode,\n      isOrdered,\n      contentStart,\n      listTokIdx,\n      prevEmptyEnd,\n      listLines,\n      itemLines,\n      tight = true,\n      terminatorRules,\n      i, l, terminate;\n\n  // Detect list type and position after marker\n  if ((posAfterMarker = skipOrderedListMarker(state, startLine)) >= 0) {\n    isOrdered = true;\n  } else if ((posAfterMarker = skipBulletListMarker(state, startLine)) >= 0) {\n    isOrdered = false;\n  } else {\n    return false;\n  }\n\n  if (state.level >= state.options.maxNesting) { return false; }\n\n  // We should terminate list on style change. Remember first one to compare.\n  markerCharCode = state.src.charCodeAt(posAfterMarker - 1);\n\n  // For validation mode we can terminate immediately\n  if (silent) { return true; }\n\n  // Start list\n  listTokIdx = state.tokens.length;\n\n  if (isOrdered) {\n    start = state.bMarks[startLine] + state.tShift[startLine];\n    markerValue = Number(state.src.substr(start, posAfterMarker - start - 1));\n\n    state.tokens.push({\n      type: 'ordered_list_open',\n      order: markerValue,\n      lines: listLines = [ startLine, 0 ],\n      level: state.level++\n    });\n\n  } else {\n    state.tokens.push({\n      type: 'bullet_list_open',\n      lines: listLines = [ startLine, 0 ],\n      level: state.level++\n    });\n  }\n\n  //\n  // Iterate list items\n  //\n\n  nextLine = startLine;\n  prevEmptyEnd = false;\n  terminatorRules = state.parser.ruler.getRules('list');\n\n  while (nextLine < endLine) {\n    contentStart = state.skipSpaces(posAfterMarker);\n    max = state.eMarks[nextLine];\n\n    if (contentStart >= max) {\n      // trimming space in \"-    \\n  3\" case, indent is 1 here\n      indentAfterMarker = 1;\n    } else {\n      indentAfterMarker = contentStart - posAfterMarker;\n    }\n\n    // If we have more than 4 spaces, the indent is 1\n    // (the rest is just indented code block)\n    if (indentAfterMarker > 4) { indentAfterMarker = 1; }\n\n    // If indent is less than 1, assume that it's one, example:\n    //  \"-\\n  test\"\n    if (indentAfterMarker < 1) { indentAfterMarker = 1; }\n\n    // \"  -  test\"\n    //  ^^^^^ - calculating total length of this thing\n    indent = (posAfterMarker - state.bMarks[nextLine]) + indentAfterMarker;\n\n    // Run subparser & write tokens\n    state.tokens.push({\n      type: 'list_item_open',\n      lines: itemLines = [ startLine, 0 ],\n      level: state.level++\n    });\n\n    oldIndent = state.blkIndent;\n    oldTight = state.tight;\n    oldTShift = state.tShift[startLine];\n    oldParentType = state.parentType;\n    state.tShift[startLine] = contentStart - state.bMarks[startLine];\n    state.blkIndent = indent;\n    state.tight = true;\n    state.parentType = 'list';\n\n    state.parser.tokenize(state, startLine, endLine, true);\n\n    // If any of list item is tight, mark list as tight\n    if (!state.tight || prevEmptyEnd) {\n      tight = false;\n    }\n    // Item become loose if finish with empty line,\n    // but we should filter last element, because it means list finish\n    prevEmptyEnd = (state.line - startLine) > 1 && state.isEmpty(state.line - 1);\n\n    state.blkIndent = oldIndent;\n    state.tShift[startLine] = oldTShift;\n    state.tight = oldTight;\n    state.parentType = oldParentType;\n\n    state.tokens.push({\n      type: 'list_item_close',\n      level: --state.level\n    });\n\n    nextLine = startLine = state.line;\n    itemLines[1] = nextLine;\n    contentStart = state.bMarks[startLine];\n\n    if (nextLine >= endLine) { break; }\n\n    if (state.isEmpty(nextLine)) {\n      break;\n    }\n\n    //\n    // Try to check if list is terminated or continued.\n    //\n    if (state.tShift[nextLine] < state.blkIndent) { break; }\n\n    // fail if terminating block found\n    terminate = false;\n    for (i = 0, l = terminatorRules.length; i < l; i++) {\n      if (terminatorRules[i](state, nextLine, endLine, true)) {\n        terminate = true;\n        break;\n      }\n    }\n    if (terminate) { break; }\n\n    // fail if list has another type\n    if (isOrdered) {\n      posAfterMarker = skipOrderedListMarker(state, nextLine);\n      if (posAfterMarker < 0) { break; }\n    } else {\n      posAfterMarker = skipBulletListMarker(state, nextLine);\n      if (posAfterMarker < 0) { break; }\n    }\n\n    if (markerCharCode !== state.src.charCodeAt(posAfterMarker - 1)) { break; }\n  }\n\n  // Finilize list\n  state.tokens.push({\n    type: isOrdered ? 'ordered_list_close' : 'bullet_list_close',\n    level: --state.level\n  });\n  listLines[1] = nextLine;\n\n  state.line = nextLine;\n\n  // mark paragraphs tight if needed\n  if (tight) {\n    markTightParagraphs(state, listTokIdx);\n  }\n\n  return true;\n}\n\n// Process footnote reference list\n\nfunction footnote(state, startLine, endLine, silent) {\n  var oldBMark, oldTShift, oldParentType, pos, label,\n      start = state.bMarks[startLine] + state.tShift[startLine],\n      max = state.eMarks[startLine];\n\n  // line should be at least 5 chars - \"[^x]:\"\n  if (start + 4 > max) { return false; }\n\n  if (state.src.charCodeAt(start) !== 0x5B/* [ */) { return false; }\n  if (state.src.charCodeAt(start + 1) !== 0x5E/* ^ */) { return false; }\n  if (state.level >= state.options.maxNesting) { return false; }\n\n  for (pos = start + 2; pos < max; pos++) {\n    if (state.src.charCodeAt(pos) === 0x20) { return false; }\n    if (state.src.charCodeAt(pos) === 0x5D /* ] */) {\n      break;\n    }\n  }\n\n  if (pos === start + 2) { return false; } // no empty footnote labels\n  if (pos + 1 >= max || state.src.charCodeAt(++pos) !== 0x3A /* : */) { return false; }\n  if (silent) { return true; }\n  pos++;\n\n  if (!state.env.footnotes) { state.env.footnotes = {}; }\n  if (!state.env.footnotes.refs) { state.env.footnotes.refs = {}; }\n  label = state.src.slice(start + 2, pos - 2);\n  state.env.footnotes.refs[':' + label] = -1;\n\n  state.tokens.push({\n    type: 'footnote_reference_open',\n    label: label,\n    level: state.level++\n  });\n\n  oldBMark = state.bMarks[startLine];\n  oldTShift = state.tShift[startLine];\n  oldParentType = state.parentType;\n  state.tShift[startLine] = state.skipSpaces(pos) - pos;\n  state.bMarks[startLine] = pos;\n  state.blkIndent += 4;\n  state.parentType = 'footnote';\n\n  if (state.tShift[startLine] < state.blkIndent) {\n    state.tShift[startLine] += state.blkIndent;\n    state.bMarks[startLine] -= state.blkIndent;\n  }\n\n  state.parser.tokenize(state, startLine, endLine, true);\n\n  state.parentType = oldParentType;\n  state.blkIndent -= 4;\n  state.tShift[startLine] = oldTShift;\n  state.bMarks[startLine] = oldBMark;\n\n  state.tokens.push({\n    type: 'footnote_reference_close',\n    level: --state.level\n  });\n\n  return true;\n}\n\n// heading (#, ##, ...)\n\nfunction heading(state, startLine, endLine, silent) {\n  var ch, level, tmp,\n      pos = state.bMarks[startLine] + state.tShift[startLine],\n      max = state.eMarks[startLine];\n\n  if (pos >= max) { return false; }\n\n  ch  = state.src.charCodeAt(pos);\n\n  if (ch !== 0x23/* # */ || pos >= max) { return false; }\n\n  // count heading level\n  level = 1;\n  ch = state.src.charCodeAt(++pos);\n  while (ch === 0x23/* # */ && pos < max && level <= 6) {\n    level++;\n    ch = state.src.charCodeAt(++pos);\n  }\n\n  if (level > 6 || (pos < max && ch !== 0x20/* space */)) { return false; }\n\n  if (silent) { return true; }\n\n  // Let's cut tails like '    ###  ' from the end of string\n\n  max = state.skipCharsBack(max, 0x20, pos); // space\n  tmp = state.skipCharsBack(max, 0x23, pos); // #\n  if (tmp > pos && state.src.charCodeAt(tmp - 1) === 0x20/* space */) {\n    max = tmp;\n  }\n\n  state.line = startLine + 1;\n\n  state.tokens.push({ type: 'heading_open',\n    hLevel: level,\n    lines: [ startLine, state.line ],\n    level: state.level\n  });\n\n  // only if header is not empty\n  if (pos < max) {\n    state.tokens.push({\n      type: 'inline',\n      content: state.src.slice(pos, max).trim(),\n      level: state.level + 1,\n      lines: [ startLine, state.line ],\n      children: []\n    });\n  }\n  state.tokens.push({ type: 'heading_close', hLevel: level, level: state.level });\n\n  return true;\n}\n\n// lheading (---, ===)\n\nfunction lheading(state, startLine, endLine/*, silent*/) {\n  var marker, pos, max,\n      next = startLine + 1;\n\n  if (next >= endLine) { return false; }\n  if (state.tShift[next] < state.blkIndent) { return false; }\n\n  // Scan next line\n\n  if (state.tShift[next] - state.blkIndent > 3) { return false; }\n\n  pos = state.bMarks[next] + state.tShift[next];\n  max = state.eMarks[next];\n\n  if (pos >= max) { return false; }\n\n  marker = state.src.charCodeAt(pos);\n\n  if (marker !== 0x2D/* - */ && marker !== 0x3D/* = */) { return false; }\n\n  pos = state.skipChars(pos, marker);\n\n  pos = state.skipSpaces(pos);\n\n  if (pos < max) { return false; }\n\n  pos = state.bMarks[startLine] + state.tShift[startLine];\n\n  state.line = next + 1;\n  state.tokens.push({\n    type: 'heading_open',\n    hLevel: marker === 0x3D/* = */ ? 1 : 2,\n    lines: [ startLine, state.line ],\n    level: state.level\n  });\n  state.tokens.push({\n    type: 'inline',\n    content: state.src.slice(pos, state.eMarks[startLine]).trim(),\n    level: state.level + 1,\n    lines: [ startLine, state.line - 1 ],\n    children: []\n  });\n  state.tokens.push({\n    type: 'heading_close',\n    hLevel: marker === 0x3D/* = */ ? 1 : 2,\n    level: state.level\n  });\n\n  return true;\n}\n\n// List of valid html blocks names, accorting to commonmark spec\n// http://jgm.github.io/CommonMark/spec.html#html-blocks\n\nvar html_blocks = {};\n\n[\n  'article',\n  'aside',\n  'button',\n  'blockquote',\n  'body',\n  'canvas',\n  'caption',\n  'col',\n  'colgroup',\n  'dd',\n  'div',\n  'dl',\n  'dt',\n  'embed',\n  'fieldset',\n  'figcaption',\n  'figure',\n  'footer',\n  'form',\n  'h1',\n  'h2',\n  'h3',\n  'h4',\n  'h5',\n  'h6',\n  'header',\n  'hgroup',\n  'hr',\n  'iframe',\n  'li',\n  'map',\n  'object',\n  'ol',\n  'output',\n  'p',\n  'pre',\n  'progress',\n  'script',\n  'section',\n  'style',\n  'table',\n  'tbody',\n  'td',\n  'textarea',\n  'tfoot',\n  'th',\n  'tr',\n  'thead',\n  'ul',\n  'video'\n].forEach(function (name) { html_blocks[name] = true; });\n\n// HTML block\n\n\nvar HTML_TAG_OPEN_RE = /^<([a-zA-Z]{1,15})[\\s\\/>]/;\nvar HTML_TAG_CLOSE_RE = /^<\\/([a-zA-Z]{1,15})[\\s>]/;\n\nfunction isLetter$1(ch) {\n  /*eslint no-bitwise:0*/\n  var lc = ch | 0x20; // to lower case\n  return (lc >= 0x61/* a */) && (lc <= 0x7a/* z */);\n}\n\nfunction htmlblock(state, startLine, endLine, silent) {\n  var ch, match, nextLine,\n      pos = state.bMarks[startLine],\n      max = state.eMarks[startLine],\n      shift = state.tShift[startLine];\n\n  pos += shift;\n\n  if (!state.options.html) { return false; }\n\n  if (shift > 3 || pos + 2 >= max) { return false; }\n\n  if (state.src.charCodeAt(pos) !== 0x3C/* < */) { return false; }\n\n  ch = state.src.charCodeAt(pos + 1);\n\n  if (ch === 0x21/* ! */ || ch === 0x3F/* ? */) {\n    // Directive start / comment start / processing instruction start\n    if (silent) { return true; }\n\n  } else if (ch === 0x2F/* / */ || isLetter$1(ch)) {\n\n    // Probably start or end of tag\n    if (ch === 0x2F/* \\ */) {\n      // closing tag\n      match = state.src.slice(pos, max).match(HTML_TAG_CLOSE_RE);\n      if (!match) { return false; }\n    } else {\n      // opening tag\n      match = state.src.slice(pos, max).match(HTML_TAG_OPEN_RE);\n      if (!match) { return false; }\n    }\n    // Make sure tag name is valid\n    if (html_blocks[match[1].toLowerCase()] !== true) { return false; }\n    if (silent) { return true; }\n\n  } else {\n    return false;\n  }\n\n  // If we are here - we detected HTML block.\n  // Let's roll down till empty line (block end).\n  nextLine = startLine + 1;\n  while (nextLine < state.lineMax && !state.isEmpty(nextLine)) {\n    nextLine++;\n  }\n\n  state.line = nextLine;\n  state.tokens.push({\n    type: 'htmlblock',\n    level: state.level,\n    lines: [ startLine, state.line ],\n    content: state.getLines(startLine, nextLine, 0, true)\n  });\n\n  return true;\n}\n\n// GFM table, non-standard\n\nfunction getLine(state, line) {\n  var pos = state.bMarks[line] + state.blkIndent,\n      max = state.eMarks[line];\n\n  return state.src.substr(pos, max - pos);\n}\n\nfunction table(state, startLine, endLine, silent) {\n  var ch, lineText, pos, i, nextLine, rows, cell,\n      aligns, t, tableLines, tbodyLines;\n\n  // should have at least three lines\n  if (startLine + 2 > endLine) { return false; }\n\n  nextLine = startLine + 1;\n\n  if (state.tShift[nextLine] < state.blkIndent) { return false; }\n\n  // first character of the second line should be '|' or '-'\n\n  pos = state.bMarks[nextLine] + state.tShift[nextLine];\n  if (pos >= state.eMarks[nextLine]) { return false; }\n\n  ch = state.src.charCodeAt(pos);\n  if (ch !== 0x7C/* | */ && ch !== 0x2D/* - */ && ch !== 0x3A/* : */) { return false; }\n\n  lineText = getLine(state, startLine + 1);\n  if (!/^[-:| ]+$/.test(lineText)) { return false; }\n\n  rows = lineText.split('|');\n  if (rows <= 2) { return false; }\n  aligns = [];\n  for (i = 0; i < rows.length; i++) {\n    t = rows[i].trim();\n    if (!t) {\n      // allow empty columns before and after table, but not in between columns;\n      // e.g. allow ` |---| `, disallow ` ---||--- `\n      if (i === 0 || i === rows.length - 1) {\n        continue;\n      } else {\n        return false;\n      }\n    }\n\n    if (!/^:?-+:?$/.test(t)) { return false; }\n    if (t.charCodeAt(t.length - 1) === 0x3A/* : */) {\n      aligns.push(t.charCodeAt(0) === 0x3A/* : */ ? 'center' : 'right');\n    } else if (t.charCodeAt(0) === 0x3A/* : */) {\n      aligns.push('left');\n    } else {\n      aligns.push('');\n    }\n  }\n\n  lineText = getLine(state, startLine).trim();\n  if (lineText.indexOf('|') === -1) { return false; }\n  rows = lineText.replace(/^\\||\\|$/g, '').split('|');\n  if (aligns.length !== rows.length) { return false; }\n  if (silent) { return true; }\n\n  state.tokens.push({\n    type: 'table_open',\n    lines: tableLines = [ startLine, 0 ],\n    level: state.level++\n  });\n  state.tokens.push({\n    type: 'thead_open',\n    lines: [ startLine, startLine + 1 ],\n    level: state.level++\n  });\n\n  state.tokens.push({\n    type: 'tr_open',\n    lines: [ startLine, startLine + 1 ],\n    level: state.level++\n  });\n  for (i = 0; i < rows.length; i++) {\n    state.tokens.push({\n      type: 'th_open',\n      align: aligns[i],\n      lines: [ startLine, startLine + 1 ],\n      level: state.level++\n    });\n    state.tokens.push({\n      type: 'inline',\n      content: rows[i].trim(),\n      lines: [ startLine, startLine + 1 ],\n      level: state.level,\n      children: []\n    });\n    state.tokens.push({ type: 'th_close', level: --state.level });\n  }\n  state.tokens.push({ type: 'tr_close', level: --state.level });\n  state.tokens.push({ type: 'thead_close', level: --state.level });\n\n  state.tokens.push({\n    type: 'tbody_open',\n    lines: tbodyLines = [ startLine + 2, 0 ],\n    level: state.level++\n  });\n\n  for (nextLine = startLine + 2; nextLine < endLine; nextLine++) {\n    if (state.tShift[nextLine] < state.blkIndent) { break; }\n\n    lineText = getLine(state, nextLine).trim();\n    if (lineText.indexOf('|') === -1) { break; }\n    rows = lineText.replace(/^\\||\\|$/g, '').split('|');\n\n    state.tokens.push({ type: 'tr_open', level: state.level++ });\n    for (i = 0; i < rows.length; i++) {\n      state.tokens.push({ type: 'td_open', align: aligns[i], level: state.level++ });\n      // 0x7c === '|'\n      cell = rows[i].substring(\n          rows[i].charCodeAt(0) === 0x7c ? 1 : 0,\n          rows[i].charCodeAt(rows[i].length - 1) === 0x7c ? rows[i].length - 1 : rows[i].length\n      ).trim();\n      state.tokens.push({\n        type: 'inline',\n        content: cell,\n        level: state.level,\n        children: []\n      });\n      state.tokens.push({ type: 'td_close', level: --state.level });\n    }\n    state.tokens.push({ type: 'tr_close', level: --state.level });\n  }\n  state.tokens.push({ type: 'tbody_close', level: --state.level });\n  state.tokens.push({ type: 'table_close', level: --state.level });\n\n  tableLines[1] = tbodyLines[1] = nextLine;\n  state.line = nextLine;\n  return true;\n}\n\n// Definition lists\n\n// Search `[:~][\\n ]`, returns next pos after marker on success\n// or -1 on fail.\nfunction skipMarker(state, line) {\n  var pos, marker,\n      start = state.bMarks[line] + state.tShift[line],\n      max = state.eMarks[line];\n\n  if (start >= max) { return -1; }\n\n  // Check bullet\n  marker = state.src.charCodeAt(start++);\n  if (marker !== 0x7E/* ~ */ && marker !== 0x3A/* : */) { return -1; }\n\n  pos = state.skipSpaces(start);\n\n  // require space after \":\"\n  if (start === pos) { return -1; }\n\n  // no empty definitions, e.g. \"  : \"\n  if (pos >= max) { return -1; }\n\n  return pos;\n}\n\nfunction markTightParagraphs$1(state, idx) {\n  var i, l,\n      level = state.level + 2;\n\n  for (i = idx + 2, l = state.tokens.length - 2; i < l; i++) {\n    if (state.tokens[i].level === level && state.tokens[i].type === 'paragraph_open') {\n      state.tokens[i + 2].tight = true;\n      state.tokens[i].tight = true;\n      i += 2;\n    }\n  }\n}\n\nfunction deflist(state, startLine, endLine, silent) {\n  var contentStart,\n      ddLine,\n      dtLine,\n      itemLines,\n      listLines,\n      listTokIdx,\n      nextLine,\n      oldIndent,\n      oldDDIndent,\n      oldParentType,\n      oldTShift,\n      oldTight,\n      prevEmptyEnd,\n      tight;\n\n  if (silent) {\n    // quirk: validation mode validates a dd block only, not a whole deflist\n    if (state.ddIndent < 0) { return false; }\n    return skipMarker(state, startLine) >= 0;\n  }\n\n  nextLine = startLine + 1;\n  if (state.isEmpty(nextLine)) {\n    if (++nextLine > endLine) { return false; }\n  }\n\n  if (state.tShift[nextLine] < state.blkIndent) { return false; }\n  contentStart = skipMarker(state, nextLine);\n  if (contentStart < 0) { return false; }\n\n  if (state.level >= state.options.maxNesting) { return false; }\n\n  // Start list\n  listTokIdx = state.tokens.length;\n\n  state.tokens.push({\n    type: 'dl_open',\n    lines: listLines = [ startLine, 0 ],\n    level: state.level++\n  });\n\n  //\n  // Iterate list items\n  //\n\n  dtLine = startLine;\n  ddLine = nextLine;\n\n  // One definition list can contain multiple DTs,\n  // and one DT can be followed by multiple DDs.\n  //\n  // Thus, there is two loops here, and label is\n  // needed to break out of the second one\n  //\n  /*eslint no-labels:0,block-scoped-var:0*/\n  OUTER:\n  for (;;) {\n    tight = true;\n    prevEmptyEnd = false;\n\n    state.tokens.push({\n      type: 'dt_open',\n      lines: [ dtLine, dtLine ],\n      level: state.level++\n    });\n    state.tokens.push({\n      type: 'inline',\n      content: state.getLines(dtLine, dtLine + 1, state.blkIndent, false).trim(),\n      level: state.level + 1,\n      lines: [ dtLine, dtLine ],\n      children: []\n    });\n    state.tokens.push({\n      type: 'dt_close',\n      level: --state.level\n    });\n\n    for (;;) {\n      state.tokens.push({\n        type: 'dd_open',\n        lines: itemLines = [ nextLine, 0 ],\n        level: state.level++\n      });\n\n      oldTight = state.tight;\n      oldDDIndent = state.ddIndent;\n      oldIndent = state.blkIndent;\n      oldTShift = state.tShift[ddLine];\n      oldParentType = state.parentType;\n      state.blkIndent = state.ddIndent = state.tShift[ddLine] + 2;\n      state.tShift[ddLine] = contentStart - state.bMarks[ddLine];\n      state.tight = true;\n      state.parentType = 'deflist';\n\n      state.parser.tokenize(state, ddLine, endLine, true);\n\n      // If any of list item is tight, mark list as tight\n      if (!state.tight || prevEmptyEnd) {\n        tight = false;\n      }\n      // Item become loose if finish with empty line,\n      // but we should filter last element, because it means list finish\n      prevEmptyEnd = (state.line - ddLine) > 1 && state.isEmpty(state.line - 1);\n\n      state.tShift[ddLine] = oldTShift;\n      state.tight = oldTight;\n      state.parentType = oldParentType;\n      state.blkIndent = oldIndent;\n      state.ddIndent = oldDDIndent;\n\n      state.tokens.push({\n        type: 'dd_close',\n        level: --state.level\n      });\n\n      itemLines[1] = nextLine = state.line;\n\n      if (nextLine >= endLine) { break OUTER; }\n\n      if (state.tShift[nextLine] < state.blkIndent) { break OUTER; }\n      contentStart = skipMarker(state, nextLine);\n      if (contentStart < 0) { break; }\n\n      ddLine = nextLine;\n\n      // go to the next loop iteration:\n      // insert DD tag and repeat checking\n    }\n\n    if (nextLine >= endLine) { break; }\n    dtLine = nextLine;\n\n    if (state.isEmpty(dtLine)) { break; }\n    if (state.tShift[dtLine] < state.blkIndent) { break; }\n\n    ddLine = dtLine + 1;\n    if (ddLine >= endLine) { break; }\n    if (state.isEmpty(ddLine)) { ddLine++; }\n    if (ddLine >= endLine) { break; }\n\n    if (state.tShift[ddLine] < state.blkIndent) { break; }\n    contentStart = skipMarker(state, ddLine);\n    if (contentStart < 0) { break; }\n\n    // go to the next loop iteration:\n    // insert DT and DD tags and repeat checking\n  }\n\n  // Finilize list\n  state.tokens.push({\n    type: 'dl_close',\n    level: --state.level\n  });\n  listLines[1] = nextLine;\n\n  state.line = nextLine;\n\n  // mark paragraphs tight if needed\n  if (tight) {\n    markTightParagraphs$1(state, listTokIdx);\n  }\n\n  return true;\n}\n\n// Paragraph\n\nfunction paragraph(state, startLine/*, endLine*/) {\n  var endLine, content, terminate, i, l,\n      nextLine = startLine + 1,\n      terminatorRules;\n\n  endLine = state.lineMax;\n\n  // jump line-by-line until empty one or EOF\n  if (nextLine < endLine && !state.isEmpty(nextLine)) {\n    terminatorRules = state.parser.ruler.getRules('paragraph');\n\n    for (; nextLine < endLine && !state.isEmpty(nextLine); nextLine++) {\n      // this would be a code block normally, but after paragraph\n      // it's considered a lazy continuation regardless of what's there\n      if (state.tShift[nextLine] - state.blkIndent > 3) { continue; }\n\n      // Some tags can terminate paragraph without empty line.\n      terminate = false;\n      for (i = 0, l = terminatorRules.length; i < l; i++) {\n        if (terminatorRules[i](state, nextLine, endLine, true)) {\n          terminate = true;\n          break;\n        }\n      }\n      if (terminate) { break; }\n    }\n  }\n\n  content = state.getLines(startLine, nextLine, state.blkIndent, false).trim();\n\n  state.line = nextLine;\n  if (content.length) {\n    state.tokens.push({\n      type: 'paragraph_open',\n      tight: false,\n      lines: [ startLine, state.line ],\n      level: state.level\n    });\n    state.tokens.push({\n      type: 'inline',\n      content: content,\n      level: state.level + 1,\n      lines: [ startLine, state.line ],\n      children: []\n    });\n    state.tokens.push({\n      type: 'paragraph_close',\n      tight: false,\n      level: state.level\n    });\n  }\n\n  return true;\n}\n\n/**\n * Parser rules\n */\n\nvar _rules$1 = [\n  [ 'code',       code ],\n  [ 'fences',     fences,     [ 'paragraph', 'blockquote', 'list' ] ],\n  [ 'blockquote', blockquote, [ 'paragraph', 'blockquote', 'list' ] ],\n  [ 'hr',         hr,         [ 'paragraph', 'blockquote', 'list' ] ],\n  [ 'list',       list,       [ 'paragraph', 'blockquote' ] ],\n  [ 'footnote',   footnote,   [ 'paragraph' ] ],\n  [ 'heading',    heading,    [ 'paragraph', 'blockquote' ] ],\n  [ 'lheading',   lheading ],\n  [ 'htmlblock',  htmlblock,  [ 'paragraph', 'blockquote' ] ],\n  [ 'table',      table,      [ 'paragraph' ] ],\n  [ 'deflist',    deflist,    [ 'paragraph' ] ],\n  [ 'paragraph',  paragraph ]\n];\n\n/**\n * Block Parser class\n *\n * @api private\n */\n\nfunction ParserBlock() {\n  this.ruler = new Ruler();\n  for (var i = 0; i < _rules$1.length; i++) {\n    this.ruler.push(_rules$1[i][0], _rules$1[i][1], {\n      alt: (_rules$1[i][2] || []).slice()\n    });\n  }\n}\n\n/**\n * Generate tokens for the given input range.\n *\n * @param  {Object} `state` Has properties like `src`, `parser`, `options` etc\n * @param  {Number} `startLine`\n * @param  {Number} `endLine`\n * @api private\n */\n\nParserBlock.prototype.tokenize = function (state, startLine, endLine) {\n  var rules = this.ruler.getRules('');\n  var len = rules.length;\n  var line = startLine;\n  var hasEmptyLines = false;\n  var ok, i;\n\n  while (line < endLine) {\n    state.line = line = state.skipEmptyLines(line);\n    if (line >= endLine) {\n      break;\n    }\n\n    // Termination condition for nested calls.\n    // Nested calls currently used for blockquotes & lists\n    if (state.tShift[line] < state.blkIndent) {\n      break;\n    }\n\n    // Try all possible rules.\n    // On success, rule should:\n    //\n    // - update `state.line`\n    // - update `state.tokens`\n    // - return true\n\n    for (i = 0; i < len; i++) {\n      ok = rules[i](state, line, endLine, false);\n      if (ok) {\n        break;\n      }\n    }\n\n    // set state.tight iff we had an empty line before current tag\n    // i.e. latest empty line should not count\n    state.tight = !hasEmptyLines;\n\n    // paragraph might \"eat\" one newline after it in nested lists\n    if (state.isEmpty(state.line - 1)) {\n      hasEmptyLines = true;\n    }\n\n    line = state.line;\n\n    if (line < endLine && state.isEmpty(line)) {\n      hasEmptyLines = true;\n      line++;\n\n      // two empty lines should stop the parser in list mode\n      if (line < endLine && state.parentType === 'list' && state.isEmpty(line)) { break; }\n      state.line = line;\n    }\n  }\n};\n\nvar TABS_SCAN_RE = /[\\n\\t]/g;\nvar NEWLINES_RE  = /\\r[\\n\\u0085]|[\\u2424\\u2028\\u0085]/g;\nvar SPACES_RE    = /\\u00a0/g;\n\n/**\n * Tokenize the given `str`.\n *\n * @param  {String} `str` Source string\n * @param  {Object} `options`\n * @param  {Object} `env`\n * @param  {Array} `outTokens`\n * @api private\n */\n\nParserBlock.prototype.parse = function (str, options, env, outTokens) {\n  var state, lineStart = 0, lastTabPos = 0;\n  if (!str) { return []; }\n\n  // Normalize spaces\n  str = str.replace(SPACES_RE, ' ');\n\n  // Normalize newlines\n  str = str.replace(NEWLINES_RE, '\\n');\n\n  // Replace tabs with proper number of spaces (1..4)\n  if (str.indexOf('\\t') >= 0) {\n    str = str.replace(TABS_SCAN_RE, function (match, offset) {\n      var result;\n      if (str.charCodeAt(offset) === 0x0A) {\n        lineStart = offset + 1;\n        lastTabPos = 0;\n        return match;\n      }\n      result = '    '.slice((offset - lineStart - lastTabPos) % 4);\n      lastTabPos = offset - lineStart + 1;\n      return result;\n    });\n  }\n\n  state = new StateBlock(str, this, options, env, outTokens);\n  this.tokenize(state, state.line, state.lineMax);\n};\n\n// Skip text characters for text token, place those to pending buffer\n// and increment current pos\n\n// Rule to skip pure text\n// '{}$%@~+=:' reserved for extentions\n\nfunction isTerminatorChar(ch) {\n  switch (ch) {\n    case 0x0A/* \\n */:\n    case 0x5C/* \\ */:\n    case 0x60/* ` */:\n    case 0x2A/* * */:\n    case 0x5F/* _ */:\n    case 0x5E/* ^ */:\n    case 0x5B/* [ */:\n    case 0x5D/* ] */:\n    case 0x21/* ! */:\n    case 0x26/* & */:\n    case 0x3C/* < */:\n    case 0x3E/* > */:\n    case 0x7B/* { */:\n    case 0x7D/* } */:\n    case 0x24/* $ */:\n    case 0x25/* % */:\n    case 0x40/* @ */:\n    case 0x7E/* ~ */:\n    case 0x2B/* + */:\n    case 0x3D/* = */:\n    case 0x3A/* : */:\n      return true;\n    default:\n      return false;\n  }\n}\n\nfunction text(state, silent) {\n  var pos = state.pos;\n\n  while (pos < state.posMax && !isTerminatorChar(state.src.charCodeAt(pos))) {\n    pos++;\n  }\n\n  if (pos === state.pos) { return false; }\n\n  if (!silent) { state.pending += state.src.slice(state.pos, pos); }\n\n  state.pos = pos;\n\n  return true;\n}\n\n// Proceess '\\n'\n\nfunction newline(state, silent) {\n  var pmax, max, pos = state.pos;\n\n  if (state.src.charCodeAt(pos) !== 0x0A/* \\n */) { return false; }\n\n  pmax = state.pending.length - 1;\n  max = state.posMax;\n\n  // '  \\n' -> hardbreak\n  // Lookup in pending chars is bad practice! Don't copy to other rules!\n  // Pending string is stored in concat mode, indexed lookups will cause\n  // convertion to flat mode.\n  if (!silent) {\n    if (pmax >= 0 && state.pending.charCodeAt(pmax) === 0x20) {\n      if (pmax >= 1 && state.pending.charCodeAt(pmax - 1) === 0x20) {\n        // Strip out all trailing spaces on this line.\n        for (var i = pmax - 2; i >= 0; i--) {\n          if (state.pending.charCodeAt(i) !== 0x20) {\n            state.pending = state.pending.substring(0, i + 1);\n            break;\n          }\n        }\n        state.push({\n          type: 'hardbreak',\n          level: state.level\n        });\n      } else {\n        state.pending = state.pending.slice(0, -1);\n        state.push({\n          type: 'softbreak',\n          level: state.level\n        });\n      }\n\n    } else {\n      state.push({\n        type: 'softbreak',\n        level: state.level\n      });\n    }\n  }\n\n  pos++;\n\n  // skip heading spaces for next line\n  while (pos < max && state.src.charCodeAt(pos) === 0x20) { pos++; }\n\n  state.pos = pos;\n  return true;\n}\n\n// Proceess escaped chars and hardbreaks\n\nvar ESCAPED = [];\n\nfor (var i = 0; i < 256; i++) { ESCAPED.push(0); }\n\n'\\\\!\"#$%&\\'()*+,./:;<=>?@[]^_`{|}~-'\n  .split('').forEach(function(ch) { ESCAPED[ch.charCodeAt(0)] = 1; });\n\n\nfunction escape(state, silent) {\n  var ch, pos = state.pos, max = state.posMax;\n\n  if (state.src.charCodeAt(pos) !== 0x5C/* \\ */) { return false; }\n\n  pos++;\n\n  if (pos < max) {\n    ch = state.src.charCodeAt(pos);\n\n    if (ch < 256 && ESCAPED[ch] !== 0) {\n      if (!silent) { state.pending += state.src[pos]; }\n      state.pos += 2;\n      return true;\n    }\n\n    if (ch === 0x0A) {\n      if (!silent) {\n        state.push({\n          type: 'hardbreak',\n          level: state.level\n        });\n      }\n\n      pos++;\n      // skip leading whitespaces from next line\n      while (pos < max && state.src.charCodeAt(pos) === 0x20) { pos++; }\n\n      state.pos = pos;\n      return true;\n    }\n  }\n\n  if (!silent) { state.pending += '\\\\'; }\n  state.pos++;\n  return true;\n}\n\n// Parse backticks\n\nfunction backticks(state, silent) {\n  var start, max, marker, matchStart, matchEnd,\n      pos = state.pos,\n      ch = state.src.charCodeAt(pos);\n\n  if (ch !== 0x60/* ` */) { return false; }\n\n  start = pos;\n  pos++;\n  max = state.posMax;\n\n  while (pos < max && state.src.charCodeAt(pos) === 0x60/* ` */) { pos++; }\n\n  marker = state.src.slice(start, pos);\n\n  matchStart = matchEnd = pos;\n\n  while ((matchStart = state.src.indexOf('`', matchEnd)) !== -1) {\n    matchEnd = matchStart + 1;\n\n    while (matchEnd < max && state.src.charCodeAt(matchEnd) === 0x60/* ` */) { matchEnd++; }\n\n    if (matchEnd - matchStart === marker.length) {\n      if (!silent) {\n        state.push({\n          type: 'code',\n          content: state.src.slice(pos, matchStart)\n                              .replace(/[ \\n]+/g, ' ')\n                              .trim(),\n          block: false,\n          level: state.level\n        });\n      }\n      state.pos = matchEnd;\n      return true;\n    }\n  }\n\n  if (!silent) { state.pending += marker; }\n  state.pos += marker.length;\n  return true;\n}\n\n// Process ~~deleted text~~\n\nfunction del(state, silent) {\n  var found,\n      pos,\n      stack,\n      max = state.posMax,\n      start = state.pos,\n      lastChar,\n      nextChar;\n\n  if (state.src.charCodeAt(start) !== 0x7E/* ~ */) { return false; }\n  if (silent) { return false; } // don't run any pairs in validation mode\n  if (start + 4 >= max) { return false; }\n  if (state.src.charCodeAt(start + 1) !== 0x7E/* ~ */) { return false; }\n  if (state.level >= state.options.maxNesting) { return false; }\n\n  lastChar = start > 0 ? state.src.charCodeAt(start - 1) : -1;\n  nextChar = state.src.charCodeAt(start + 2);\n\n  if (lastChar === 0x7E/* ~ */) { return false; }\n  if (nextChar === 0x7E/* ~ */) { return false; }\n  if (nextChar === 0x20 || nextChar === 0x0A) { return false; }\n\n  pos = start + 2;\n  while (pos < max && state.src.charCodeAt(pos) === 0x7E/* ~ */) { pos++; }\n  if (pos > start + 3) {\n    // sequence of 4+ markers taking as literal, same as in a emphasis\n    state.pos += pos - start;\n    if (!silent) { state.pending += state.src.slice(start, pos); }\n    return true;\n  }\n\n  state.pos = start + 2;\n  stack = 1;\n\n  while (state.pos + 1 < max) {\n    if (state.src.charCodeAt(state.pos) === 0x7E/* ~ */) {\n      if (state.src.charCodeAt(state.pos + 1) === 0x7E/* ~ */) {\n        lastChar = state.src.charCodeAt(state.pos - 1);\n        nextChar = state.pos + 2 < max ? state.src.charCodeAt(state.pos + 2) : -1;\n        if (nextChar !== 0x7E/* ~ */ && lastChar !== 0x7E/* ~ */) {\n          if (lastChar !== 0x20 && lastChar !== 0x0A) {\n            // closing '~~'\n            stack--;\n          } else if (nextChar !== 0x20 && nextChar !== 0x0A) {\n            // opening '~~'\n            stack++;\n          } // else {\n            //  // standalone ' ~~ ' indented with spaces\n            // }\n          if (stack <= 0) {\n            found = true;\n            break;\n          }\n        }\n      }\n    }\n\n    state.parser.skipToken(state);\n  }\n\n  if (!found) {\n    // parser failed to find ending tag, so it's not valid emphasis\n    state.pos = start;\n    return false;\n  }\n\n  // found!\n  state.posMax = state.pos;\n  state.pos = start + 2;\n\n  if (!silent) {\n    state.push({ type: 'del_open', level: state.level++ });\n    state.parser.tokenize(state);\n    state.push({ type: 'del_close', level: --state.level });\n  }\n\n  state.pos = state.posMax + 2;\n  state.posMax = max;\n  return true;\n}\n\n// Process ++inserted text++\n\nfunction ins(state, silent) {\n  var found,\n      pos,\n      stack,\n      max = state.posMax,\n      start = state.pos,\n      lastChar,\n      nextChar;\n\n  if (state.src.charCodeAt(start) !== 0x2B/* + */) { return false; }\n  if (silent) { return false; } // don't run any pairs in validation mode\n  if (start + 4 >= max) { return false; }\n  if (state.src.charCodeAt(start + 1) !== 0x2B/* + */) { return false; }\n  if (state.level >= state.options.maxNesting) { return false; }\n\n  lastChar = start > 0 ? state.src.charCodeAt(start - 1) : -1;\n  nextChar = state.src.charCodeAt(start + 2);\n\n  if (lastChar === 0x2B/* + */) { return false; }\n  if (nextChar === 0x2B/* + */) { return false; }\n  if (nextChar === 0x20 || nextChar === 0x0A) { return false; }\n\n  pos = start + 2;\n  while (pos < max && state.src.charCodeAt(pos) === 0x2B/* + */) { pos++; }\n  if (pos !== start + 2) {\n    // sequence of 3+ markers taking as literal, same as in a emphasis\n    state.pos += pos - start;\n    if (!silent) { state.pending += state.src.slice(start, pos); }\n    return true;\n  }\n\n  state.pos = start + 2;\n  stack = 1;\n\n  while (state.pos + 1 < max) {\n    if (state.src.charCodeAt(state.pos) === 0x2B/* + */) {\n      if (state.src.charCodeAt(state.pos + 1) === 0x2B/* + */) {\n        lastChar = state.src.charCodeAt(state.pos - 1);\n        nextChar = state.pos + 2 < max ? state.src.charCodeAt(state.pos + 2) : -1;\n        if (nextChar !== 0x2B/* + */ && lastChar !== 0x2B/* + */) {\n          if (lastChar !== 0x20 && lastChar !== 0x0A) {\n            // closing '++'\n            stack--;\n          } else if (nextChar !== 0x20 && nextChar !== 0x0A) {\n            // opening '++'\n            stack++;\n          } // else {\n            //  // standalone ' ++ ' indented with spaces\n            // }\n          if (stack <= 0) {\n            found = true;\n            break;\n          }\n        }\n      }\n    }\n\n    state.parser.skipToken(state);\n  }\n\n  if (!found) {\n    // parser failed to find ending tag, so it's not valid emphasis\n    state.pos = start;\n    return false;\n  }\n\n  // found!\n  state.posMax = state.pos;\n  state.pos = start + 2;\n\n  if (!silent) {\n    state.push({ type: 'ins_open', level: state.level++ });\n    state.parser.tokenize(state);\n    state.push({ type: 'ins_close', level: --state.level });\n  }\n\n  state.pos = state.posMax + 2;\n  state.posMax = max;\n  return true;\n}\n\n// Process ==highlighted text==\n\nfunction mark(state, silent) {\n  var found,\n      pos,\n      stack,\n      max = state.posMax,\n      start = state.pos,\n      lastChar,\n      nextChar;\n\n  if (state.src.charCodeAt(start) !== 0x3D/* = */) { return false; }\n  if (silent) { return false; } // don't run any pairs in validation mode\n  if (start + 4 >= max) { return false; }\n  if (state.src.charCodeAt(start + 1) !== 0x3D/* = */) { return false; }\n  if (state.level >= state.options.maxNesting) { return false; }\n\n  lastChar = start > 0 ? state.src.charCodeAt(start - 1) : -1;\n  nextChar = state.src.charCodeAt(start + 2);\n\n  if (lastChar === 0x3D/* = */) { return false; }\n  if (nextChar === 0x3D/* = */) { return false; }\n  if (nextChar === 0x20 || nextChar === 0x0A) { return false; }\n\n  pos = start + 2;\n  while (pos < max && state.src.charCodeAt(pos) === 0x3D/* = */) { pos++; }\n  if (pos !== start + 2) {\n    // sequence of 3+ markers taking as literal, same as in a emphasis\n    state.pos += pos - start;\n    if (!silent) { state.pending += state.src.slice(start, pos); }\n    return true;\n  }\n\n  state.pos = start + 2;\n  stack = 1;\n\n  while (state.pos + 1 < max) {\n    if (state.src.charCodeAt(state.pos) === 0x3D/* = */) {\n      if (state.src.charCodeAt(state.pos + 1) === 0x3D/* = */) {\n        lastChar = state.src.charCodeAt(state.pos - 1);\n        nextChar = state.pos + 2 < max ? state.src.charCodeAt(state.pos + 2) : -1;\n        if (nextChar !== 0x3D/* = */ && lastChar !== 0x3D/* = */) {\n          if (lastChar !== 0x20 && lastChar !== 0x0A) {\n            // closing '=='\n            stack--;\n          } else if (nextChar !== 0x20 && nextChar !== 0x0A) {\n            // opening '=='\n            stack++;\n          } // else {\n            //  // standalone ' == ' indented with spaces\n            // }\n          if (stack <= 0) {\n            found = true;\n            break;\n          }\n        }\n      }\n    }\n\n    state.parser.skipToken(state);\n  }\n\n  if (!found) {\n    // parser failed to find ending tag, so it's not valid emphasis\n    state.pos = start;\n    return false;\n  }\n\n  // found!\n  state.posMax = state.pos;\n  state.pos = start + 2;\n\n  if (!silent) {\n    state.push({ type: 'mark_open', level: state.level++ });\n    state.parser.tokenize(state);\n    state.push({ type: 'mark_close', level: --state.level });\n  }\n\n  state.pos = state.posMax + 2;\n  state.posMax = max;\n  return true;\n}\n\n// Process *this* and _that_\n\nfunction isAlphaNum(code) {\n  return (code >= 0x30 /* 0 */ && code <= 0x39 /* 9 */) ||\n         (code >= 0x41 /* A */ && code <= 0x5A /* Z */) ||\n         (code >= 0x61 /* a */ && code <= 0x7A /* z */);\n}\n\n// parse sequence of emphasis markers,\n// \"start\" should point at a valid marker\nfunction scanDelims(state, start) {\n  var pos = start, lastChar, nextChar, count,\n      can_open = true,\n      can_close = true,\n      max = state.posMax,\n      marker = state.src.charCodeAt(start);\n\n  lastChar = start > 0 ? state.src.charCodeAt(start - 1) : -1;\n\n  while (pos < max && state.src.charCodeAt(pos) === marker) { pos++; }\n  if (pos >= max) { can_open = false; }\n  count = pos - start;\n\n  if (count >= 4) {\n    // sequence of four or more unescaped markers can't start/end an emphasis\n    can_open = can_close = false;\n  } else {\n    nextChar = pos < max ? state.src.charCodeAt(pos) : -1;\n\n    // check whitespace conditions\n    if (nextChar === 0x20 || nextChar === 0x0A) { can_open = false; }\n    if (lastChar === 0x20 || lastChar === 0x0A) { can_close = false; }\n\n    if (marker === 0x5F /* _ */) {\n      // check if we aren't inside the word\n      if (isAlphaNum(lastChar)) { can_open = false; }\n      if (isAlphaNum(nextChar)) { can_close = false; }\n    }\n  }\n\n  return {\n    can_open: can_open,\n    can_close: can_close,\n    delims: count\n  };\n}\n\nfunction emphasis(state, silent) {\n  var startCount,\n      count,\n      found,\n      oldCount,\n      newCount,\n      stack,\n      res,\n      max = state.posMax,\n      start = state.pos,\n      marker = state.src.charCodeAt(start);\n\n  if (marker !== 0x5F/* _ */ && marker !== 0x2A /* * */) { return false; }\n  if (silent) { return false; } // don't run any pairs in validation mode\n\n  res = scanDelims(state, start);\n  startCount = res.delims;\n  if (!res.can_open) {\n    state.pos += startCount;\n    if (!silent) { state.pending += state.src.slice(start, state.pos); }\n    return true;\n  }\n\n  if (state.level >= state.options.maxNesting) { return false; }\n\n  state.pos = start + startCount;\n  stack = [ startCount ];\n\n  while (state.pos < max) {\n    if (state.src.charCodeAt(state.pos) === marker) {\n      res = scanDelims(state, state.pos);\n      count = res.delims;\n      if (res.can_close) {\n        oldCount = stack.pop();\n        newCount = count;\n\n        while (oldCount !== newCount) {\n          if (newCount < oldCount) {\n            stack.push(oldCount - newCount);\n            break;\n          }\n\n          // assert(newCount > oldCount)\n          newCount -= oldCount;\n\n          if (stack.length === 0) { break; }\n          state.pos += oldCount;\n          oldCount = stack.pop();\n        }\n\n        if (stack.length === 0) {\n          startCount = oldCount;\n          found = true;\n          break;\n        }\n        state.pos += count;\n        continue;\n      }\n\n      if (res.can_open) { stack.push(count); }\n      state.pos += count;\n      continue;\n    }\n\n    state.parser.skipToken(state);\n  }\n\n  if (!found) {\n    // parser failed to find ending tag, so it's not valid emphasis\n    state.pos = start;\n    return false;\n  }\n\n  // found!\n  state.posMax = state.pos;\n  state.pos = start + startCount;\n\n  if (!silent) {\n    if (startCount === 2 || startCount === 3) {\n      state.push({ type: 'strong_open', level: state.level++ });\n    }\n    if (startCount === 1 || startCount === 3) {\n      state.push({ type: 'em_open', level: state.level++ });\n    }\n\n    state.parser.tokenize(state);\n\n    if (startCount === 1 || startCount === 3) {\n      state.push({ type: 'em_close', level: --state.level });\n    }\n    if (startCount === 2 || startCount === 3) {\n      state.push({ type: 'strong_close', level: --state.level });\n    }\n  }\n\n  state.pos = state.posMax + startCount;\n  state.posMax = max;\n  return true;\n}\n\n// Process ~subscript~\n\n// same as UNESCAPE_MD_RE plus a space\nvar UNESCAPE_RE = /\\\\([ \\\\!\"#$%&'()*+,.\\/:;<=>?@[\\]^_`{|}~-])/g;\n\nfunction sub(state, silent) {\n  var found,\n      content,\n      max = state.posMax,\n      start = state.pos;\n\n  if (state.src.charCodeAt(start) !== 0x7E/* ~ */) { return false; }\n  if (silent) { return false; } // don't run any pairs in validation mode\n  if (start + 2 >= max) { return false; }\n  if (state.level >= state.options.maxNesting) { return false; }\n\n  state.pos = start + 1;\n\n  while (state.pos < max) {\n    if (state.src.charCodeAt(state.pos) === 0x7E/* ~ */) {\n      found = true;\n      break;\n    }\n\n    state.parser.skipToken(state);\n  }\n\n  if (!found || start + 1 === state.pos) {\n    state.pos = start;\n    return false;\n  }\n\n  content = state.src.slice(start + 1, state.pos);\n\n  // don't allow unescaped spaces/newlines inside\n  if (content.match(/(^|[^\\\\])(\\\\\\\\)*\\s/)) {\n    state.pos = start;\n    return false;\n  }\n\n  // found!\n  state.posMax = state.pos;\n  state.pos = start + 1;\n\n  if (!silent) {\n    state.push({\n      type: 'sub',\n      level: state.level,\n      content: content.replace(UNESCAPE_RE, '$1')\n    });\n  }\n\n  state.pos = state.posMax + 1;\n  state.posMax = max;\n  return true;\n}\n\n// Process ^superscript^\n\n// same as UNESCAPE_MD_RE plus a space\nvar UNESCAPE_RE$1 = /\\\\([ \\\\!\"#$%&'()*+,.\\/:;<=>?@[\\]^_`{|}~-])/g;\n\nfunction sup(state, silent) {\n  var found,\n      content,\n      max = state.posMax,\n      start = state.pos;\n\n  if (state.src.charCodeAt(start) !== 0x5E/* ^ */) { return false; }\n  if (silent) { return false; } // don't run any pairs in validation mode\n  if (start + 2 >= max) { return false; }\n  if (state.level >= state.options.maxNesting) { return false; }\n\n  state.pos = start + 1;\n\n  while (state.pos < max) {\n    if (state.src.charCodeAt(state.pos) === 0x5E/* ^ */) {\n      found = true;\n      break;\n    }\n\n    state.parser.skipToken(state);\n  }\n\n  if (!found || start + 1 === state.pos) {\n    state.pos = start;\n    return false;\n  }\n\n  content = state.src.slice(start + 1, state.pos);\n\n  // don't allow unescaped spaces/newlines inside\n  if (content.match(/(^|[^\\\\])(\\\\\\\\)*\\s/)) {\n    state.pos = start;\n    return false;\n  }\n\n  // found!\n  state.posMax = state.pos;\n  state.pos = start + 1;\n\n  if (!silent) {\n    state.push({\n      type: 'sup',\n      level: state.level,\n      content: content.replace(UNESCAPE_RE$1, '$1')\n    });\n  }\n\n  state.pos = state.posMax + 1;\n  state.posMax = max;\n  return true;\n}\n\n// Process [links](<to> \"stuff\")\n\n\nfunction links(state, silent) {\n  var labelStart,\n      labelEnd,\n      label,\n      href,\n      title,\n      pos,\n      ref,\n      code,\n      isImage = false,\n      oldPos = state.pos,\n      max = state.posMax,\n      start = state.pos,\n      marker = state.src.charCodeAt(start);\n\n  if (marker === 0x21/* ! */) {\n    isImage = true;\n    marker = state.src.charCodeAt(++start);\n  }\n\n  if (marker !== 0x5B/* [ */) { return false; }\n  if (state.level >= state.options.maxNesting) { return false; }\n\n  labelStart = start + 1;\n  labelEnd = parseLinkLabel(state, start);\n\n  // parser failed to find ']', so it's not a valid link\n  if (labelEnd < 0) { return false; }\n\n  pos = labelEnd + 1;\n  if (pos < max && state.src.charCodeAt(pos) === 0x28/* ( */) {\n    //\n    // Inline link\n    //\n\n    // [link](  <href>  \"title\"  )\n    //        ^^ skipping these spaces\n    pos++;\n    for (; pos < max; pos++) {\n      code = state.src.charCodeAt(pos);\n      if (code !== 0x20 && code !== 0x0A) { break; }\n    }\n    if (pos >= max) { return false; }\n\n    // [link](  <href>  \"title\"  )\n    //          ^^^^^^ parsing link destination\n    start = pos;\n    if (parseLinkDestination(state, pos)) {\n      href = state.linkContent;\n      pos = state.pos;\n    } else {\n      href = '';\n    }\n\n    // [link](  <href>  \"title\"  )\n    //                ^^ skipping these spaces\n    start = pos;\n    for (; pos < max; pos++) {\n      code = state.src.charCodeAt(pos);\n      if (code !== 0x20 && code !== 0x0A) { break; }\n    }\n\n    // [link](  <href>  \"title\"  )\n    //                  ^^^^^^^ parsing link title\n    if (pos < max && start !== pos && parseLinkTitle(state, pos)) {\n      title = state.linkContent;\n      pos = state.pos;\n\n      // [link](  <href>  \"title\"  )\n      //                         ^^ skipping these spaces\n      for (; pos < max; pos++) {\n        code = state.src.charCodeAt(pos);\n        if (code !== 0x20 && code !== 0x0A) { break; }\n      }\n    } else {\n      title = '';\n    }\n\n    if (pos >= max || state.src.charCodeAt(pos) !== 0x29/* ) */) {\n      state.pos = oldPos;\n      return false;\n    }\n    pos++;\n  } else {\n    //\n    // Link reference\n    //\n\n    // do not allow nested reference links\n    if (state.linkLevel > 0) { return false; }\n\n    // [foo]  [bar]\n    //      ^^ optional whitespace (can include newlines)\n    for (; pos < max; pos++) {\n      code = state.src.charCodeAt(pos);\n      if (code !== 0x20 && code !== 0x0A) { break; }\n    }\n\n    if (pos < max && state.src.charCodeAt(pos) === 0x5B/* [ */) {\n      start = pos + 1;\n      pos = parseLinkLabel(state, pos);\n      if (pos >= 0) {\n        label = state.src.slice(start, pos++);\n      } else {\n        pos = start - 1;\n      }\n    }\n\n    // covers label === '' and label === undefined\n    // (collapsed reference link and shortcut reference link respectively)\n    if (!label) {\n      if (typeof label === 'undefined') {\n        pos = labelEnd + 1;\n      }\n      label = state.src.slice(labelStart, labelEnd);\n    }\n\n    ref = state.env.references[normalizeReference(label)];\n    if (!ref) {\n      state.pos = oldPos;\n      return false;\n    }\n    href = ref.href;\n    title = ref.title;\n  }\n\n  //\n  // We found the end of the link, and know for a fact it's a valid link;\n  // so all that's left to do is to call tokenizer.\n  //\n  if (!silent) {\n    state.pos = labelStart;\n    state.posMax = labelEnd;\n\n    if (isImage) {\n      state.push({\n        type: 'image',\n        src: href,\n        title: title,\n        alt: state.src.substr(labelStart, labelEnd - labelStart),\n        level: state.level\n      });\n    } else {\n      state.push({\n        type: 'link_open',\n        href: href,\n        title: title,\n        level: state.level++\n      });\n      state.linkLevel++;\n      state.parser.tokenize(state);\n      state.linkLevel--;\n      state.push({ type: 'link_close', level: --state.level });\n    }\n  }\n\n  state.pos = pos;\n  state.posMax = max;\n  return true;\n}\n\n// Process inline footnotes (^[...])\n\n\nfunction footnote_inline(state, silent) {\n  var labelStart,\n      labelEnd,\n      footnoteId,\n      oldLength,\n      max = state.posMax,\n      start = state.pos;\n\n  if (start + 2 >= max) { return false; }\n  if (state.src.charCodeAt(start) !== 0x5E/* ^ */) { return false; }\n  if (state.src.charCodeAt(start + 1) !== 0x5B/* [ */) { return false; }\n  if (state.level >= state.options.maxNesting) { return false; }\n\n  labelStart = start + 2;\n  labelEnd = parseLinkLabel(state, start + 1);\n\n  // parser failed to find ']', so it's not a valid note\n  if (labelEnd < 0) { return false; }\n\n  // We found the end of the link, and know for a fact it's a valid link;\n  // so all that's left to do is to call tokenizer.\n  //\n  if (!silent) {\n    if (!state.env.footnotes) { state.env.footnotes = {}; }\n    if (!state.env.footnotes.list) { state.env.footnotes.list = []; }\n    footnoteId = state.env.footnotes.list.length;\n\n    state.pos = labelStart;\n    state.posMax = labelEnd;\n\n    state.push({\n      type: 'footnote_ref',\n      id: footnoteId,\n      level: state.level\n    });\n    state.linkLevel++;\n    oldLength = state.tokens.length;\n    state.parser.tokenize(state);\n    state.env.footnotes.list[footnoteId] = { tokens: state.tokens.splice(oldLength) };\n    state.linkLevel--;\n  }\n\n  state.pos = labelEnd + 1;\n  state.posMax = max;\n  return true;\n}\n\n// Process footnote references ([^...])\n\nfunction footnote_ref(state, silent) {\n  var label,\n      pos,\n      footnoteId,\n      footnoteSubId,\n      max = state.posMax,\n      start = state.pos;\n\n  // should be at least 4 chars - \"[^x]\"\n  if (start + 3 > max) { return false; }\n\n  if (!state.env.footnotes || !state.env.footnotes.refs) { return false; }\n  if (state.src.charCodeAt(start) !== 0x5B/* [ */) { return false; }\n  if (state.src.charCodeAt(start + 1) !== 0x5E/* ^ */) { return false; }\n  if (state.level >= state.options.maxNesting) { return false; }\n\n  for (pos = start + 2; pos < max; pos++) {\n    if (state.src.charCodeAt(pos) === 0x20) { return false; }\n    if (state.src.charCodeAt(pos) === 0x0A) { return false; }\n    if (state.src.charCodeAt(pos) === 0x5D /* ] */) {\n      break;\n    }\n  }\n\n  if (pos === start + 2) { return false; } // no empty footnote labels\n  if (pos >= max) { return false; }\n  pos++;\n\n  label = state.src.slice(start + 2, pos - 1);\n  if (typeof state.env.footnotes.refs[':' + label] === 'undefined') { return false; }\n\n  if (!silent) {\n    if (!state.env.footnotes.list) { state.env.footnotes.list = []; }\n\n    if (state.env.footnotes.refs[':' + label] < 0) {\n      footnoteId = state.env.footnotes.list.length;\n      state.env.footnotes.list[footnoteId] = { label: label, count: 0 };\n      state.env.footnotes.refs[':' + label] = footnoteId;\n    } else {\n      footnoteId = state.env.footnotes.refs[':' + label];\n    }\n\n    footnoteSubId = state.env.footnotes.list[footnoteId].count;\n    state.env.footnotes.list[footnoteId].count++;\n\n    state.push({\n      type: 'footnote_ref',\n      id: footnoteId,\n      subId: footnoteSubId,\n      level: state.level\n    });\n  }\n\n  state.pos = pos;\n  state.posMax = max;\n  return true;\n}\n\n// List of valid url schemas, accorting to commonmark spec\n// http://jgm.github.io/CommonMark/spec.html#autolinks\n\nvar url_schemas = [\n  'coap',\n  'doi',\n  'javascript',\n  'aaa',\n  'aaas',\n  'about',\n  'acap',\n  'cap',\n  'cid',\n  'crid',\n  'data',\n  'dav',\n  'dict',\n  'dns',\n  'file',\n  'ftp',\n  'geo',\n  'go',\n  'gopher',\n  'h323',\n  'http',\n  'https',\n  'iax',\n  'icap',\n  'im',\n  'imap',\n  'info',\n  'ipp',\n  'iris',\n  'iris.beep',\n  'iris.xpc',\n  'iris.xpcs',\n  'iris.lwz',\n  'ldap',\n  'mailto',\n  'mid',\n  'msrp',\n  'msrps',\n  'mtqp',\n  'mupdate',\n  'news',\n  'nfs',\n  'ni',\n  'nih',\n  'nntp',\n  'opaquelocktoken',\n  'pop',\n  'pres',\n  'rtsp',\n  'service',\n  'session',\n  'shttp',\n  'sieve',\n  'sip',\n  'sips',\n  'sms',\n  'snmp',\n  'soap.beep',\n  'soap.beeps',\n  'tag',\n  'tel',\n  'telnet',\n  'tftp',\n  'thismessage',\n  'tn3270',\n  'tip',\n  'tv',\n  'urn',\n  'vemmi',\n  'ws',\n  'wss',\n  'xcon',\n  'xcon-userid',\n  'xmlrpc.beep',\n  'xmlrpc.beeps',\n  'xmpp',\n  'z39.50r',\n  'z39.50s',\n  'adiumxtra',\n  'afp',\n  'afs',\n  'aim',\n  'apt',\n  'attachment',\n  'aw',\n  'beshare',\n  'bitcoin',\n  'bolo',\n  'callto',\n  'chrome',\n  'chrome-extension',\n  'com-eventbrite-attendee',\n  'content',\n  'cvs',\n  'dlna-playsingle',\n  'dlna-playcontainer',\n  'dtn',\n  'dvb',\n  'ed2k',\n  'facetime',\n  'feed',\n  'finger',\n  'fish',\n  'gg',\n  'git',\n  'gizmoproject',\n  'gtalk',\n  'hcp',\n  'icon',\n  'ipn',\n  'irc',\n  'irc6',\n  'ircs',\n  'itms',\n  'jar',\n  'jms',\n  'keyparc',\n  'lastfm',\n  'ldaps',\n  'magnet',\n  'maps',\n  'market',\n  'message',\n  'mms',\n  'ms-help',\n  'msnim',\n  'mumble',\n  'mvn',\n  'notes',\n  'oid',\n  'palm',\n  'paparazzi',\n  'platform',\n  'proxy',\n  'psyc',\n  'query',\n  'res',\n  'resource',\n  'rmi',\n  'rsync',\n  'rtmp',\n  'secondlife',\n  'sftp',\n  'sgn',\n  'skype',\n  'smb',\n  'soldat',\n  'spotify',\n  'ssh',\n  'steam',\n  'svn',\n  'teamspeak',\n  'things',\n  'udp',\n  'unreal',\n  'ut2004',\n  'ventrilo',\n  'view-source',\n  'webcal',\n  'wtai',\n  'wyciwyg',\n  'xfire',\n  'xri',\n  'ymsgr'\n];\n\n// Process autolinks '<protocol:...>'\n\n\n/*eslint max-len:0*/\nvar EMAIL_RE    = /^<([a-zA-Z0-9.!#$%&'*+\\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)>/;\nvar AUTOLINK_RE = /^<([a-zA-Z.\\-]{1,25}):([^<>\\x00-\\x20]*)>/;\n\n\nfunction autolink(state, silent) {\n  var tail, linkMatch, emailMatch, url, fullUrl, pos = state.pos;\n\n  if (state.src.charCodeAt(pos) !== 0x3C/* < */) { return false; }\n\n  tail = state.src.slice(pos);\n\n  if (tail.indexOf('>') < 0) { return false; }\n\n  linkMatch = tail.match(AUTOLINK_RE);\n\n  if (linkMatch) {\n    if (url_schemas.indexOf(linkMatch[1].toLowerCase()) < 0) { return false; }\n\n    url = linkMatch[0].slice(1, -1);\n    fullUrl = normalizeLink(url);\n    if (!state.parser.validateLink(url)) { return false; }\n\n    if (!silent) {\n      state.push({\n        type: 'link_open',\n        href: fullUrl,\n        level: state.level\n      });\n      state.push({\n        type: 'text',\n        content: url,\n        level: state.level + 1\n      });\n      state.push({ type: 'link_close', level: state.level });\n    }\n\n    state.pos += linkMatch[0].length;\n    return true;\n  }\n\n  emailMatch = tail.match(EMAIL_RE);\n\n  if (emailMatch) {\n\n    url = emailMatch[0].slice(1, -1);\n\n    fullUrl = normalizeLink('mailto:' + url);\n    if (!state.parser.validateLink(fullUrl)) { return false; }\n\n    if (!silent) {\n      state.push({\n        type: 'link_open',\n        href: fullUrl,\n        level: state.level\n      });\n      state.push({\n        type: 'text',\n        content: url,\n        level: state.level + 1\n      });\n      state.push({ type: 'link_close', level: state.level });\n    }\n\n    state.pos += emailMatch[0].length;\n    return true;\n  }\n\n  return false;\n}\n\n// Regexps to match html elements\n\nfunction replace$1(regex, options) {\n  regex = regex.source;\n  options = options || '';\n\n  return function self(name, val) {\n    if (!name) {\n      return new RegExp(regex, options);\n    }\n    val = val.source || val;\n    regex = regex.replace(name, val);\n    return self;\n  };\n}\n\n\nvar attr_name     = /[a-zA-Z_:][a-zA-Z0-9:._-]*/;\n\nvar unquoted      = /[^\"'=<>`\\x00-\\x20]+/;\nvar single_quoted = /'[^']*'/;\nvar double_quoted = /\"[^\"]*\"/;\n\n/*eslint no-spaced-func:0*/\nvar attr_value  = replace$1(/(?:unquoted|single_quoted|double_quoted)/)\n                    ('unquoted', unquoted)\n                    ('single_quoted', single_quoted)\n                    ('double_quoted', double_quoted)\n                    ();\n\nvar attribute   = replace$1(/(?:\\s+attr_name(?:\\s*=\\s*attr_value)?)/)\n                    ('attr_name', attr_name)\n                    ('attr_value', attr_value)\n                    ();\n\nvar open_tag    = replace$1(/<[A-Za-z][A-Za-z0-9]*attribute*\\s*\\/?>/)\n                    ('attribute', attribute)\n                    ();\n\nvar close_tag   = /<\\/[A-Za-z][A-Za-z0-9]*\\s*>/;\nvar comment     = /<!---->|<!--(?:-?[^>-])(?:-?[^-])*-->/;\nvar processing  = /<[?].*?[?]>/;\nvar declaration = /<![A-Z]+\\s+[^>]*>/;\nvar cdata       = /<!\\[CDATA\\[[\\s\\S]*?\\]\\]>/;\n\nvar HTML_TAG_RE = replace$1(/^(?:open_tag|close_tag|comment|processing|declaration|cdata)/)\n  ('open_tag', open_tag)\n  ('close_tag', close_tag)\n  ('comment', comment)\n  ('processing', processing)\n  ('declaration', declaration)\n  ('cdata', cdata)\n  ();\n\n// Process html tags\n\n\nfunction isLetter$2(ch) {\n  /*eslint no-bitwise:0*/\n  var lc = ch | 0x20; // to lower case\n  return (lc >= 0x61/* a */) && (lc <= 0x7a/* z */);\n}\n\n\nfunction htmltag(state, silent) {\n  var ch, match, max, pos = state.pos;\n\n  if (!state.options.html) { return false; }\n\n  // Check start\n  max = state.posMax;\n  if (state.src.charCodeAt(pos) !== 0x3C/* < */ ||\n      pos + 2 >= max) {\n    return false;\n  }\n\n  // Quick fail on second char\n  ch = state.src.charCodeAt(pos + 1);\n  if (ch !== 0x21/* ! */ &&\n      ch !== 0x3F/* ? */ &&\n      ch !== 0x2F/* / */ &&\n      !isLetter$2(ch)) {\n    return false;\n  }\n\n  match = state.src.slice(pos).match(HTML_TAG_RE);\n  if (!match) { return false; }\n\n  if (!silent) {\n    state.push({\n      type: 'htmltag',\n      content: state.src.slice(pos, pos + match[0].length),\n      level: state.level\n    });\n  }\n  state.pos += match[0].length;\n  return true;\n}\n\n// Process html entity - &#123;, &#xAF;, &quot;, ...\n\n\nvar DIGITAL_RE = /^&#((?:x[a-f0-9]{1,8}|[0-9]{1,8}));/i;\nvar NAMED_RE   = /^&([a-z][a-z0-9]{1,31});/i;\n\n\nfunction entity(state, silent) {\n  var ch, code, match, pos = state.pos, max = state.posMax;\n\n  if (state.src.charCodeAt(pos) !== 0x26/* & */) { return false; }\n\n  if (pos + 1 < max) {\n    ch = state.src.charCodeAt(pos + 1);\n\n    if (ch === 0x23 /* # */) {\n      match = state.src.slice(pos).match(DIGITAL_RE);\n      if (match) {\n        if (!silent) {\n          code = match[1][0].toLowerCase() === 'x' ? parseInt(match[1].slice(1), 16) : parseInt(match[1], 10);\n          state.pending += isValidEntityCode(code) ? fromCodePoint(code) : fromCodePoint(0xFFFD);\n        }\n        state.pos += match[0].length;\n        return true;\n      }\n    } else {\n      match = state.src.slice(pos).match(NAMED_RE);\n      if (match) {\n        var decoded = decodeEntity(match[1]);\n        if (match[1] !== decoded) {\n          if (!silent) { state.pending += decoded; }\n          state.pos += match[0].length;\n          return true;\n        }\n      }\n    }\n  }\n\n  if (!silent) { state.pending += '&'; }\n  state.pos++;\n  return true;\n}\n\n/**\n * Inline Parser `rules`\n */\n\nvar _rules$2 = [\n  [ 'text',            text ],\n  [ 'newline',         newline ],\n  [ 'escape',          escape ],\n  [ 'backticks',       backticks ],\n  [ 'del',             del ],\n  [ 'ins',             ins ],\n  [ 'mark',            mark ],\n  [ 'emphasis',        emphasis ],\n  [ 'sub',             sub ],\n  [ 'sup',             sup ],\n  [ 'links',           links ],\n  [ 'footnote_inline', footnote_inline ],\n  [ 'footnote_ref',    footnote_ref ],\n  [ 'autolink',        autolink ],\n  [ 'htmltag',         htmltag ],\n  [ 'entity',          entity ]\n];\n\n/**\n * Inline Parser class. Note that link validation is stricter\n * in Remarkable than what is specified by CommonMark. If you\n * want to change this you can use a custom validator.\n *\n * @api private\n */\n\nfunction ParserInline() {\n  this.ruler = new Ruler();\n  for (var i = 0; i < _rules$2.length; i++) {\n    this.ruler.push(_rules$2[i][0], _rules$2[i][1]);\n  }\n\n  // Can be overridden with a custom validator\n  this.validateLink = validateLink;\n}\n\n/**\n * Skip a single token by running all rules in validation mode.\n * Returns `true` if any rule reports success.\n *\n * @param  {Object} `state`\n * @api privage\n */\n\nParserInline.prototype.skipToken = function (state) {\n  var rules = this.ruler.getRules('');\n  var len = rules.length;\n  var pos = state.pos;\n  var i, cached_pos;\n\n  if ((cached_pos = state.cacheGet(pos)) > 0) {\n    state.pos = cached_pos;\n    return;\n  }\n\n  for (i = 0; i < len; i++) {\n    if (rules[i](state, true)) {\n      state.cacheSet(pos, state.pos);\n      return;\n    }\n  }\n\n  state.pos++;\n  state.cacheSet(pos, state.pos);\n};\n\n/**\n * Generate tokens for the given input range.\n *\n * @param  {Object} `state`\n * @api private\n */\n\nParserInline.prototype.tokenize = function (state) {\n  var rules = this.ruler.getRules('');\n  var len = rules.length;\n  var end = state.posMax;\n  var ok, i;\n\n  while (state.pos < end) {\n\n    // Try all possible rules.\n    // On success, the rule should:\n    //\n    // - update `state.pos`\n    // - update `state.tokens`\n    // - return true\n    for (i = 0; i < len; i++) {\n      ok = rules[i](state, false);\n\n      if (ok) {\n        break;\n      }\n    }\n\n    if (ok) {\n      if (state.pos >= end) { break; }\n      continue;\n    }\n\n    state.pending += state.src[state.pos++];\n  }\n\n  if (state.pending) {\n    state.pushPending();\n  }\n};\n\n/**\n * Parse the given input string.\n *\n * @param  {String} `str`\n * @param  {Object} `options`\n * @param  {Object} `env`\n * @param  {Array} `outTokens`\n * @api private\n */\n\nParserInline.prototype.parse = function (str, options, env, outTokens) {\n  var state = new StateInline(str, this, options, env, outTokens);\n  this.tokenize(state);\n};\n\n/**\n * Validate the given `url` by checking for bad protocols.\n *\n * @param  {String} `url`\n * @return {Boolean}\n */\n\nfunction validateLink(url) {\n  var BAD_PROTOCOLS = [ 'vbscript', 'javascript', 'file', 'data' ];\n  var str = url.trim().toLowerCase();\n  // Care about digital entities \"javascript&#x3A;alert(1)\"\n  str = replaceEntities(str);\n  if (str.indexOf(':') !== -1 && BAD_PROTOCOLS.indexOf(str.split(':')[0]) !== -1) {\n    return false;\n  }\n  return true;\n}\n\n// Remarkable default options\n\nvar defaultConfig = {\n  options: {\n    html:         false,        // Enable HTML tags in source\n    xhtmlOut:     false,        // Use '/' to close single tags (<br />)\n    breaks:       false,        // Convert '\\n' in paragraphs into <br>\n    langPrefix:   'language-',  // CSS language prefix for fenced blocks\n    linkTarget:   '',           // set target to open link in\n\n    // Enable some language-neutral replacements + quotes beautification\n    typographer:  false,\n\n    // Double + single quotes replacement pairs, when typographer enabled,\n    // and smartquotes on. Set doubles to '«»' for Russian, '„“' for German.\n    quotes: '“”‘’',\n\n    // Highlighter function. Should return escaped HTML,\n    // or '' if input not changed\n    //\n    // function (/*str, lang*/) { return ''; }\n    //\n    highlight: null,\n\n    maxNesting:   20            // Internal protection, recursion limit\n  },\n\n  components: {\n\n    core: {\n      rules: [\n        'block',\n        'inline',\n        'references',\n        'replacements',\n        'smartquotes',\n        'references',\n        'abbr2',\n        'footnote_tail'\n      ]\n    },\n\n    block: {\n      rules: [\n        'blockquote',\n        'code',\n        'fences',\n        'footnote',\n        'heading',\n        'hr',\n        'htmlblock',\n        'lheading',\n        'list',\n        'paragraph',\n        'table'\n      ]\n    },\n\n    inline: {\n      rules: [\n        'autolink',\n        'backticks',\n        'del',\n        'emphasis',\n        'entity',\n        'escape',\n        'footnote_ref',\n        'htmltag',\n        'links',\n        'newline',\n        'text'\n      ]\n    }\n  }\n};\n\n// Remarkable default options\n\nvar fullConfig = {\n  options: {\n    html:         false,        // Enable HTML tags in source\n    xhtmlOut:     false,        // Use '/' to close single tags (<br />)\n    breaks:       false,        // Convert '\\n' in paragraphs into <br>\n    langPrefix:   'language-',  // CSS language prefix for fenced blocks\n    linkTarget:   '',           // set target to open link in\n\n    // Enable some language-neutral replacements + quotes beautification\n    typographer:  false,\n\n    // Double + single quotes replacement pairs, when typographer enabled,\n    // and smartquotes on. Set doubles to '«»' for Russian, '„“' for German.\n    quotes:       '“”‘’',\n\n    // Highlighter function. Should return escaped HTML,\n    // or '' if input not changed\n    //\n    // function (/*str, lang*/) { return ''; }\n    //\n    highlight:     null,\n\n    maxNesting:    20            // Internal protection, recursion limit\n  },\n\n  components: {\n    // Don't restrict core/block/inline rules\n    core: {},\n    block: {},\n    inline: {}\n  }\n};\n\n// Commonmark default options\n\nvar commonmarkConfig = {\n  options: {\n    html:         true,         // Enable HTML tags in source\n    xhtmlOut:     true,         // Use '/' to close single tags (<br />)\n    breaks:       false,        // Convert '\\n' in paragraphs into <br>\n    langPrefix:   'language-',  // CSS language prefix for fenced blocks\n    linkTarget:   '',           // set target to open link in\n\n    // Enable some language-neutral replacements + quotes beautification\n    typographer:  false,\n\n    // Double + single quotes replacement pairs, when typographer enabled,\n    // and smartquotes on. Set doubles to '«»' for Russian, '„“' for German.\n    quotes: '“”‘’',\n\n    // Highlighter function. Should return escaped HTML,\n    // or '' if input not changed\n    //\n    // function (/*str, lang*/) { return ''; }\n    //\n    highlight: null,\n\n    maxNesting:   20            // Internal protection, recursion limit\n  },\n\n  components: {\n\n    core: {\n      rules: [\n        'block',\n        'inline',\n        'references',\n        'abbr2'\n      ]\n    },\n\n    block: {\n      rules: [\n        'blockquote',\n        'code',\n        'fences',\n        'heading',\n        'hr',\n        'htmlblock',\n        'lheading',\n        'list',\n        'paragraph'\n      ]\n    },\n\n    inline: {\n      rules: [\n        'autolink',\n        'backticks',\n        'emphasis',\n        'entity',\n        'escape',\n        'htmltag',\n        'links',\n        'newline',\n        'text'\n      ]\n    }\n  }\n};\n\n/**\n * Preset configs\n */\n\nvar config = {\n  'default': defaultConfig,\n  'full': fullConfig,\n  'commonmark': commonmarkConfig\n};\n\n/**\n * The `StateCore` class manages state.\n *\n * @param {Object} `instance` Remarkable instance\n * @param {String} `str` Markdown string\n * @param {Object} `env`\n */\n\nfunction StateCore(instance, str, env) {\n  this.src = str;\n  this.env = env;\n  this.options = instance.options;\n  this.tokens = [];\n  this.inlineMode = false;\n\n  this.inline = instance.inline;\n  this.block = instance.block;\n  this.renderer = instance.renderer;\n  this.typographer = instance.typographer;\n}\n\n/**\n * The main `Remarkable` class. Create an instance of\n * `Remarkable` with a `preset` and/or `options`.\n *\n * @param {String} `preset` If no preset is given, `default` is used.\n * @param {Object} `options`\n */\n\nfunction Remarkable(preset, options) {\n  if (typeof preset !== 'string') {\n    options = preset;\n    preset = 'default';\n  }\n\n  if (options && options.linkify != null) {\n    console.warn(\n      'linkify option is removed. Use linkify plugin instead:\\n\\n' +\n      'import Remarkable from \\'remarkable\\';\\n' +\n      'import linkify from \\'remarkable/linkify\\';\\n' +\n      'new Remarkable().use(linkify)\\n'\n    );\n  }\n\n  this.inline   = new ParserInline();\n  this.block    = new ParserBlock();\n  this.core     = new Core();\n  this.renderer = new Renderer();\n  this.ruler    = new Ruler();\n\n  this.options  = {};\n  this.configure(config[preset]);\n  this.set(options || {});\n}\n\n/**\n * Set options as an alternative to passing them\n * to the constructor.\n *\n * ```js\n * md.set({typographer: true});\n * ```\n * @param {Object} `options`\n * @api public\n */\n\nRemarkable.prototype.set = function (options) {\n  assign(this.options, options);\n};\n\n/**\n * Batch loader for components rules states, and options\n *\n * @param  {Object} `presets`\n */\n\nRemarkable.prototype.configure = function (presets) {\n  var self = this;\n\n  if (!presets) { throw new Error('Wrong `remarkable` preset, check name/content'); }\n  if (presets.options) { self.set(presets.options); }\n  if (presets.components) {\n    Object.keys(presets.components).forEach(function (name) {\n      if (presets.components[name].rules) {\n        self[name].ruler.enable(presets.components[name].rules, true);\n      }\n    });\n  }\n};\n\n/**\n * Use a plugin.\n *\n * ```js\n * var md = new Remarkable();\n *\n * md.use(plugin1)\n *   .use(plugin2, opts)\n *   .use(plugin3);\n * ```\n *\n * @param  {Function} `plugin`\n * @param  {Object} `options`\n * @return {Object} `Remarkable` for chaining\n */\n\nRemarkable.prototype.use = function (plugin, options) {\n  plugin(this, options);\n  return this;\n};\n\n\n/**\n * Parse the input `string` and return a tokens array.\n * Modifies `env` with definitions data.\n *\n * @param  {String} `string`\n * @param  {Object} `env`\n * @return {Array} Array of tokens\n */\n\nRemarkable.prototype.parse = function (str, env) {\n  var state = new StateCore(this, str, env);\n  this.core.process(state);\n  return state.tokens;\n};\n\n/**\n * The main `.render()` method that does all the magic :)\n *\n * @param  {String} `string`\n * @param  {Object} `env`\n * @return {String} Rendered HTML.\n */\n\nRemarkable.prototype.render = function (str, env) {\n  env = env || {};\n  return this.renderer.render(this.parse(str, env), this.options, env);\n};\n\n/**\n * Parse the given content `string` as a single string.\n *\n * @param  {String} `string`\n * @param  {Object} `env`\n * @return {Array} Array of tokens\n */\n\nRemarkable.prototype.parseInline = function (str, env) {\n  var state = new StateCore(this, str, env);\n  state.inlineMode = true;\n  this.core.process(state);\n  return state.tokens;\n};\n\n/**\n * Render a single content `string`, without wrapping it\n * to paragraphs\n *\n * @param  {String} `str`\n * @param  {Object} `env`\n * @return {String}\n */\n\nRemarkable.prototype.renderInline = function (str, env) {\n  env = env || {};\n  return this.renderer.render(this.parseInline(str, env), this.options, env);\n};\n\nconst uniqId = Math.random().toString(36).slice(2, 8);\n\nfunction escapeHtml$1(html) {\n  return html.replace(/[&<\"]/g, m => ({\n    '&': '&amp;',\n    '<': '&lt;',\n    '\"': '&quot;'\n  })[m]);\n}\nfunction htmlOpen(tagName, attrs) {\n  const attrStr = attrs ? Object.entries(attrs).map(([key, value]) => {\n    if (value == null || value === false) return;\n    key = ` ${escapeHtml$1(key)}`;\n    if (value === true) return key;\n    return `${key}=\"${escapeHtml$1(value)}\"`;\n  }).filter(Boolean).join('') : '';\n  return `<${tagName}${attrStr}>`;\n}\nfunction htmlClose(tagName) {\n  return `</${tagName}>`;\n}\nfunction wrapHtml(tagName, content, attrs) {\n  if (content == null) return htmlOpen(tagName, attrs);\n  return htmlOpen(tagName, attrs) + (content || '') + htmlClose(tagName);\n}\nfunction wrapStyle(text, style) {\n  if (style.code) text = wrapHtml('code', text);\n  if (style.del) text = wrapHtml('del', text);\n  if (style.em) text = wrapHtml('em', text);\n  if (style.strong) text = wrapHtml('strong', text);\n  return text;\n}\n\nconst md = new Remarkable();\nmd.block.ruler.enable(['deflist']);\n\nfunction extractInline(token) {\n  const html = [];\n  let style = {};\n\n  for (const child of token.children) {\n    if (child.type === 'text') {\n      html.push(wrapStyle(escapeHtml$1(child.content), style));\n    } else if (child.type === 'code') {\n      html.push(wrapHtml('code', wrapStyle(escapeHtml$1(child.content), style)));\n    } else if (child.type === 'softbreak') {\n      html.push('<br/>');\n    } else if (child.type.endsWith('_open')) {\n      const type = child.type.slice(0, -5);\n\n      if (type === 'link') {\n        html.push(htmlOpen('a', {\n          href: child.href,\n          title: child.title,\n          target: '_blank',\n          rel: 'noopener noreferrer'\n        }));\n      } else {\n        style = Object.assign(Object.assign({}, style), {}, {\n          [type]: true\n        });\n      }\n    } else if (child.type.endsWith('_close')) {\n      const type = child.type.slice(0, -6);\n\n      if (type === 'link') {\n        html.push(htmlClose('a'));\n      } else {\n        style = Object.assign(Object.assign({}, style), {}, {\n          [type]: false\n        });\n      }\n    }\n  }\n\n  return html.join('');\n}\n\nfunction cleanNode(node, depth = 0) {\n  if (node.t === 'heading') {\n    // drop all paragraphs\n    node.c = node.c.filter(item => item.t !== 'paragraph');\n  } else if (node.t === 'list_item') {\n    var _node$p;\n\n    // keep first paragraph as content of list_item, drop others\n    node.c = node.c.filter(item => {\n      if (['paragraph', 'fence'].includes(item.t)) {\n        if (!node.v) node.v = item.v;\n        return false;\n      }\n\n      return true;\n    });\n\n    if (((_node$p = node.p) == null ? void 0 : _node$p.index) != null) {\n      node.v = `${node.p.index}. ${node.v}`;\n    }\n  } else if (node.t === 'ordered_list') {\n    var _node$p$start, _node$p2;\n\n    let index = (_node$p$start = (_node$p2 = node.p) == null ? void 0 : _node$p2.start) != null ? _node$p$start : 1;\n    node.c.forEach(item => {\n      if (item.t === 'list_item') {\n        item.p = Object.assign(Object.assign({}, item.p), {}, {\n          index: index\n        });\n        index += 1;\n      }\n    });\n  }\n\n  if (node.c.length === 0) {\n    delete node.c;\n  } else {\n    if (node.c.length === 1 && !node.c[0].v) {\n      node.c = node.c[0].c;\n    }\n\n    node.c.forEach(child => cleanNode(child, depth + 1));\n  }\n\n  node.d = depth;\n  delete node.p;\n}\n\nfunction buildTree(tokens) {\n  // TODO deal with <dl><dt>\n  const root = {\n    t: 'root',\n    d: 0,\n    v: '',\n    c: []\n  };\n  const stack = [root];\n  let depth = 0;\n\n  for (const token of tokens) {\n    let current = stack[stack.length - 1];\n\n    if (token.type.endsWith('_open')) {\n      const type = token.type.slice(0, -5);\n      const payload = {};\n\n      if (type === 'heading') {\n        depth = token.hLevel;\n\n        while (((_current = current) == null ? void 0 : _current.d) >= depth) {\n          var _current;\n\n          stack.pop();\n          current = stack[stack.length - 1];\n        }\n      } else {\n        var _current2;\n\n        depth = Math.max(depth, ((_current2 = current) == null ? void 0 : _current2.d) || 0) + 1;\n\n        if (type === 'ordered_list') {\n          payload.start = token.order;\n        }\n      }\n\n      const item = {\n        t: type,\n        d: depth,\n        p: payload,\n        v: '',\n        c: []\n      };\n      current.c.push(item);\n      stack.push(item);\n    } else if (!current) {\n      continue;\n    } else if (token.type === `${current.t}_close`) {\n      if (current.t === 'heading') {\n        depth = current.d;\n      } else {\n        stack.pop();\n        depth = 0;\n      }\n    } else if (token.type === 'inline') {\n      current.v = `${current.v || ''}${extractInline(token)}`;\n    } else if (token.type === 'fence') {\n      current.c.push({\n        t: token.type,\n        d: depth + 1,\n        v: `<pre><code class=\"language-${token.params}\">${escapeHtml$1(token.content)}</code></pre>`,\n        c: []\n      });\n    }\n  }\n\n  return root;\n}\nfunction transform(content) {\n  var _root$c;\n\n  const tokens = md.parse(content || '', {});\n  let root = buildTree(tokens);\n  cleanNode(root);\n  if (((_root$c = root.c) == null ? void 0 : _root$c.length) === 1) root = root.c[0];\n  return root;\n}\n\nexports.buildTree = buildTree;\nexports.transform = transform;\n\n}(this.markmap = this.markmap || {}));\n"
  },
  {
    "path": "static/editor.md/lib/mindmap/view.js",
    "content": "/*! markmap-lib v0.7.8 | MIT License */\n(function (exports, d3) {\n'use strict';\n\nfunction count(node) {\n  var sum = 0,\n      children = node.children,\n      i = children && children.length;\n  if (!i) sum = 1;\n  else while (--i >= 0) sum += children[i].value;\n  node.value = sum;\n}\n\nfunction node_count() {\n  return this.eachAfter(count);\n}\n\nfunction node_each(callback) {\n  var node = this, current, next = [node], children, i, n;\n  do {\n    current = next.reverse(), next = [];\n    while (node = current.pop()) {\n      callback(node), children = node.children;\n      if (children) for (i = 0, n = children.length; i < n; ++i) {\n        next.push(children[i]);\n      }\n    }\n  } while (next.length);\n  return this;\n}\n\nfunction node_eachBefore(callback) {\n  var node = this, nodes = [node], children, i;\n  while (node = nodes.pop()) {\n    callback(node), children = node.children;\n    if (children) for (i = children.length - 1; i >= 0; --i) {\n      nodes.push(children[i]);\n    }\n  }\n  return this;\n}\n\nfunction node_eachAfter(callback) {\n  var node = this, nodes = [node], next = [], children, i, n;\n  while (node = nodes.pop()) {\n    next.push(node), children = node.children;\n    if (children) for (i = 0, n = children.length; i < n; ++i) {\n      nodes.push(children[i]);\n    }\n  }\n  while (node = next.pop()) {\n    callback(node);\n  }\n  return this;\n}\n\nfunction node_sum(value) {\n  return this.eachAfter(function(node) {\n    var sum = +value(node.data) || 0,\n        children = node.children,\n        i = children && children.length;\n    while (--i >= 0) sum += children[i].value;\n    node.value = sum;\n  });\n}\n\nfunction node_sort(compare) {\n  return this.eachBefore(function(node) {\n    if (node.children) {\n      node.children.sort(compare);\n    }\n  });\n}\n\nfunction node_path(end) {\n  var start = this,\n      ancestor = leastCommonAncestor(start, end),\n      nodes = [start];\n  while (start !== ancestor) {\n    start = start.parent;\n    nodes.push(start);\n  }\n  var k = nodes.length;\n  while (end !== ancestor) {\n    nodes.splice(k, 0, end);\n    end = end.parent;\n  }\n  return nodes;\n}\n\nfunction leastCommonAncestor(a, b) {\n  if (a === b) return a;\n  var aNodes = a.ancestors(),\n      bNodes = b.ancestors(),\n      c = null;\n  a = aNodes.pop();\n  b = bNodes.pop();\n  while (a === b) {\n    c = a;\n    a = aNodes.pop();\n    b = bNodes.pop();\n  }\n  return c;\n}\n\nfunction node_ancestors() {\n  var node = this, nodes = [node];\n  while (node = node.parent) {\n    nodes.push(node);\n  }\n  return nodes;\n}\n\nfunction node_descendants() {\n  var nodes = [];\n  this.each(function(node) {\n    nodes.push(node);\n  });\n  return nodes;\n}\n\nfunction node_leaves() {\n  var leaves = [];\n  this.eachBefore(function(node) {\n    if (!node.children) {\n      leaves.push(node);\n    }\n  });\n  return leaves;\n}\n\nfunction node_links() {\n  var root = this, links = [];\n  root.each(function(node) {\n    if (node !== root) { // Don’t include the root’s parent, if any.\n      links.push({source: node.parent, target: node});\n    }\n  });\n  return links;\n}\n\nfunction hierarchy(data, children) {\n  var root = new Node(data),\n      valued = +data.value && (root.value = data.value),\n      node,\n      nodes = [root],\n      child,\n      childs,\n      i,\n      n;\n\n  if (children == null) children = defaultChildren;\n\n  while (node = nodes.pop()) {\n    if (valued) node.value = +node.data.value;\n    if ((childs = children(node.data)) && (n = childs.length)) {\n      node.children = new Array(n);\n      for (i = n - 1; i >= 0; --i) {\n        nodes.push(child = node.children[i] = new Node(childs[i]));\n        child.parent = node;\n        child.depth = node.depth + 1;\n      }\n    }\n  }\n\n  return root.eachBefore(computeHeight);\n}\n\nfunction node_copy() {\n  return hierarchy(this).eachBefore(copyData);\n}\n\nfunction defaultChildren(d) {\n  return d.children;\n}\n\nfunction copyData(node) {\n  node.data = node.data.data;\n}\n\nfunction computeHeight(node) {\n  var height = 0;\n  do node.height = height;\n  while ((node = node.parent) && (node.height < ++height));\n}\n\nfunction Node(data) {\n  this.data = data;\n  this.depth =\n  this.height = 0;\n  this.parent = null;\n}\n\nNode.prototype = hierarchy.prototype = {\n  constructor: Node,\n  count: node_count,\n  each: node_each,\n  eachAfter: node_eachAfter,\n  eachBefore: node_eachBefore,\n  sum: node_sum,\n  sort: node_sort,\n  path: node_path,\n  ancestors: node_ancestors,\n  descendants: node_descendants,\n  leaves: node_leaves,\n  links: node_links,\n  copy: node_copy\n};\n\nvar version = \"2.1.1\";\n\nconst defaults = Object.freeze({\n  children: data => data.children,\n  nodeSize: node => node.data.size,\n  spacing: 0,\n});\n\n// Create a layout function with customizable options. Per D3-style, the\n// options can be set at any time using setter methods. The layout function\n// will compute the tree node positions based on the options in effect at the\n// time it is called.\nfunction flextree(options) {\n  const opts = Object.assign({}, defaults, options);\n  function accessor(name) {\n    const opt = opts[name];\n    return typeof opt === 'function' ? opt : () => opt;\n  }\n\n  function layout(tree) {\n    const wtree = wrap(getWrapper(), tree, node=>node.children);\n    wtree.update();\n    return wtree.data;\n  }\n\n  function getFlexNode() {\n    const nodeSize = accessor('nodeSize');\n    const spacing = accessor('spacing');\n    return class FlexNode extends hierarchy.prototype.constructor {\n      constructor(data) {\n        super(data);\n      }\n      copy() {\n        const c = wrap(this.constructor, this, node=>node.children);\n        c.each(node => node.data = node.data.data);\n        return c;\n      }\n      get size() { return nodeSize(this); }\n      spacing(oNode) { return spacing(this, oNode); }\n      get nodes() { return this.descendants(); }\n      get xSize() { return this.size[0]; }\n      get ySize() { return this.size[1]; }\n      get top() { return this.y; }\n      get bottom() { return this.y + this.ySize; }\n      get left() { return this.x - this.xSize / 2; }\n      get right() { return this.x + this.xSize / 2; }\n      get root() {\n        const ancs = this.ancestors();\n        return ancs[ancs.length - 1];\n      }\n      get numChildren() {\n        return this.hasChildren ? this.children.length : 0;\n      }\n      get hasChildren() { return !this.noChildren; }\n      get noChildren() { return this.children === null; }\n      get firstChild() {\n        return this.hasChildren ? this.children[0] : null;\n      }\n      get lastChild() {\n        return this.hasChildren ? this.children[this.numChildren - 1] : null;\n      }\n      get extents() {\n        return (this.children || []).reduce(\n          (acc, kid) => FlexNode.maxExtents(acc, kid.extents),\n          this.nodeExtents);\n      }\n      get nodeExtents() {\n        return {\n          top: this.top,\n          bottom: this.bottom,\n          left: this.left,\n          right: this.right,\n        };\n      }\n      static maxExtents(e0, e1) {\n        return {\n          top: Math.min(e0.top, e1.top),\n          bottom: Math.max(e0.bottom, e1.bottom),\n          left: Math.min(e0.left, e1.left),\n          right: Math.max(e0.right, e1.right),\n        };\n      }\n    };\n  }\n\n  function getWrapper() {\n    const FlexNode = getFlexNode();\n    const nodeSize = accessor('nodeSize');\n    const spacing = accessor('spacing');\n    return class extends FlexNode {\n      constructor(data) {\n        super(data);\n        Object.assign(this, {\n          x: 0, y: 0,\n          relX: 0, prelim: 0, shift: 0, change: 0,\n          lExt: this, lExtRelX: 0, lThr: null,\n          rExt: this, rExtRelX: 0, rThr: null,\n        });\n      }\n      get size() { return nodeSize(this.data); }\n      spacing(oNode) { return spacing(this.data, oNode.data); }\n      get x() { return this.data.x; }\n      set x(v) { this.data.x = v; }\n      get y() { return this.data.y; }\n      set y(v) { this.data.y = v; }\n      update() {\n        layoutChildren(this);\n        resolveX(this);\n        return this;\n      }\n    };\n  }\n\n  function wrap(FlexClass, treeData, children) {\n    const _wrap = (data, parent) => {\n      const node = new FlexClass(data);\n      Object.assign(node, {\n        parent,\n        depth: parent === null ? 0 : parent.depth + 1,\n        height: 0,\n        length: 1,\n      });\n      const kidsData = children(data) || [];\n      node.children = kidsData.length === 0 ? null\n        : kidsData.map(kd => _wrap(kd, node));\n      if (node.children) {\n        Object.assign(node, node.children.reduce(\n          (hl, kid) => ({\n            height: Math.max(hl.height, kid.height + 1),\n            length: hl.length + kid.length,\n          }), node\n        ));\n      }\n      return node;\n    };\n    return _wrap(treeData, null);\n  }\n\n\n  Object.assign(layout, {\n    nodeSize(arg) {\n      return arguments.length ? (opts.nodeSize = arg, layout) : opts.nodeSize;\n    },\n    spacing(arg) {\n      return arguments.length ? (opts.spacing = arg, layout) : opts.spacing;\n    },\n    children(arg) {\n      return arguments.length ? (opts.children = arg, layout) : opts.children;\n    },\n    hierarchy(treeData, children) {\n      const kids = typeof children === 'undefined' ? opts.children : children;\n      return wrap(getFlexNode(), treeData, kids);\n    },\n    dump(tree) {\n      const nodeSize = accessor('nodeSize');\n      const _dump = i0 => node => {\n        const i1 = i0 + '  ';\n        const i2 = i0 + '    ';\n        const {x, y} = node;\n        const size = nodeSize(node);\n        const kids = (node.children || []);\n        const kdumps = (kids.length === 0) ? ' ' :\n          `,${i1}children: [${i2}${kids.map(_dump(i2)).join(i2)}${i1}],${i0}`;\n        return `{ size: [${size.join(', ')}],${i1}x: ${x}, y: ${y}${kdumps}},`;\n      };\n      return _dump('\\n')(tree);\n    },\n  });\n  return layout;\n}\nflextree.version = version;\n\nconst layoutChildren = (w, y = 0) => {\n  w.y = y;\n  (w.children || []).reduce((acc, kid) => {\n    const [i, lastLows] = acc;\n    layoutChildren(kid, w.y + w.ySize);\n    // The lowest vertical coordinate while extreme nodes still point\n    // in current subtree.\n    const lowY = (i === 0 ? kid.lExt : kid.rExt).bottom;\n    if (i !== 0) separate(w, i, lastLows);\n    const lows = updateLows(lowY, i, lastLows);\n    return [i + 1, lows];\n  }, [0, null]);\n  shiftChange(w);\n  positionRoot(w);\n  return w;\n};\n\n// Resolves the relative coordinate properties - relX and prelim --\n// to set the final, absolute x coordinate for each node. This also sets\n// `prelim` to 0, so that `relX` for each node is its x-coordinate relative\n// to its parent.\nconst resolveX = (w, prevSum, parentX) => {\n  // A call to resolveX without arguments is assumed to be for the root of\n  // the tree. This will set the root's x-coord to zero.\n  if (typeof prevSum === 'undefined') {\n    prevSum = -w.relX - w.prelim;\n    parentX = 0;\n  }\n  const sum = prevSum + w.relX;\n  w.relX = sum + w.prelim - parentX;\n  w.prelim = 0;\n  w.x = parentX + w.relX;\n  (w.children || []).forEach(k => resolveX(k, sum, w.x));\n  return w;\n};\n\n// Process shift and change for all children, to add intermediate spacing to\n// each child's modifier.\nconst shiftChange = w => {\n  (w.children || []).reduce((acc, child) => {\n    const [lastShiftSum, lastChangeSum] = acc;\n    const shiftSum = lastShiftSum + child.shift;\n    const changeSum = lastChangeSum + shiftSum + child.change;\n    child.relX += changeSum;\n    return [shiftSum, changeSum];\n  }, [0, 0]);\n};\n\n// Separates the latest child from its previous sibling\n/* eslint-disable complexity */\nconst separate = (w, i, lows) => {\n  const lSib = w.children[i - 1];\n  const curSubtree = w.children[i];\n  let rContour = lSib;\n  let rSumMods = lSib.relX;\n  let lContour = curSubtree;\n  let lSumMods = curSubtree.relX;\n  let isFirst = true;\n  while (rContour && lContour) {\n    if (rContour.bottom > lows.lowY) lows = lows.next;\n    // How far to the left of the right side of rContour is the left side\n    // of lContour? First compute the center-to-center distance, then add\n    // the \"spacing\"\n    const dist =\n      (rSumMods + rContour.prelim) - (lSumMods + lContour.prelim) +\n      rContour.xSize / 2 + lContour.xSize / 2 +\n      rContour.spacing(lContour);\n    if (dist > 0 || (dist < 0 && isFirst)) {\n      lSumMods += dist;\n      // Move subtree by changing relX.\n      moveSubtree(curSubtree, dist);\n      distributeExtra(w, i, lows.index, dist);\n    }\n    isFirst = false;\n    // Advance highest node(s) and sum(s) of modifiers\n    const rightBottom = rContour.bottom;\n    const leftBottom = lContour.bottom;\n    if (rightBottom <= leftBottom) {\n      rContour = nextRContour(rContour);\n      if (rContour) rSumMods += rContour.relX;\n    }\n    if (rightBottom >= leftBottom) {\n      lContour = nextLContour(lContour);\n      if (lContour) lSumMods += lContour.relX;\n    }\n  }\n  // Set threads and update extreme nodes. In the first case, the\n  // current subtree is taller than the left siblings.\n  if (!rContour && lContour) setLThr(w, i, lContour, lSumMods);\n  // In the next case, the left siblings are taller than the current subtree\n  else if (rContour && !lContour) setRThr(w, i, rContour, rSumMods);\n};\n/* eslint-enable complexity */\n\n// Move subtree by changing relX.\nconst moveSubtree = (subtree, distance) => {\n  subtree.relX += distance;\n  subtree.lExtRelX += distance;\n  subtree.rExtRelX += distance;\n};\n\nconst distributeExtra = (w, curSubtreeI, leftSibI, dist) => {\n  const curSubtree = w.children[curSubtreeI];\n  const n = curSubtreeI - leftSibI;\n  // Are there intermediate children?\n  if (n > 1) {\n    const delta = dist / n;\n    w.children[leftSibI + 1].shift += delta;\n    curSubtree.shift -= delta;\n    curSubtree.change -= dist - delta;\n  }\n};\n\nconst nextLContour = w => {\n  return w.hasChildren ? w.firstChild : w.lThr;\n};\n\nconst nextRContour = w => {\n  return w.hasChildren ? w.lastChild : w.rThr;\n};\n\nconst setLThr = (w, i, lContour, lSumMods) => {\n  const firstChild = w.firstChild;\n  const lExt = firstChild.lExt;\n  const curSubtree = w.children[i];\n  lExt.lThr = lContour;\n  // Change relX so that the sum of modifier after following thread is correct.\n  const diff = lSumMods - lContour.relX - firstChild.lExtRelX;\n  lExt.relX += diff;\n  // Change preliminary x coordinate so that the node does not move.\n  lExt.prelim -= diff;\n  // Update extreme node and its sum of modifiers.\n  firstChild.lExt = curSubtree.lExt;\n  firstChild.lExtRelX = curSubtree.lExtRelX;\n};\n\n// Mirror image of setLThr.\nconst setRThr = (w, i, rContour, rSumMods) => {\n  const curSubtree = w.children[i];\n  const rExt = curSubtree.rExt;\n  const lSib = w.children[i - 1];\n  rExt.rThr = rContour;\n  const diff = rSumMods - rContour.relX - curSubtree.rExtRelX;\n  rExt.relX += diff;\n  rExt.prelim -= diff;\n  curSubtree.rExt = lSib.rExt;\n  curSubtree.rExtRelX = lSib.rExtRelX;\n};\n\n// Position root between children, taking into account their modifiers\nconst positionRoot = w => {\n  if (w.hasChildren) {\n    const k0 = w.firstChild;\n    const kf = w.lastChild;\n    const prelim = (k0.prelim + k0.relX - k0.xSize / 2 +\n      kf.relX + kf.prelim + kf.xSize / 2 ) / 2;\n    Object.assign(w, {\n      prelim,\n      lExt: k0.lExt, lExtRelX: k0.lExtRelX,\n      rExt: kf.rExt, rExtRelX: kf.rExtRelX,\n    });\n  }\n};\n\n// Make/maintain a linked list of the indexes of left siblings and their\n// lowest vertical coordinate.\nconst updateLows = (lowY, index, lastLows) => {\n  // Remove siblings that are hidden by the new subtree.\n  while (lastLows !== null && lowY >= lastLows.lowY)\n    lastLows = lastLows.next;\n  // Prepend the new subtree.\n  return {\n    lowY,\n    index,\n    next: lastLows,\n  };\n};\n\nconst uniqId = Math.random().toString(36).slice(2, 8);\nlet globalIndex = 0;\nfunction getId() {\n  globalIndex += 1;\n  return `mm-${uniqId}-${globalIndex}`;\n}\nfunction walkTree(tree, callback, key = 'c') {\n  const walk = (item, parent) => callback(item, () => {\n    var _item$key;\n\n    (_item$key = item[key]) == null ? void 0 : _item$key.forEach(child => {\n      walk(child, item);\n    });\n  }, parent);\n\n  walk(tree);\n}\nfunction arrayFrom(arrayLike) {\n  if (Array.from) return Array.from(arrayLike);\n  const array = [];\n\n  for (let i = 0; i < arrayLike.length; i += 1) {\n    array.push(arrayLike[i]);\n  }\n\n  return array;\n}\nfunction flatMap(arrayLike, callback) {\n  if (arrayLike.flatMap) return arrayLike.flatMap(callback);\n  const array = [];\n\n  for (let i = 0; i < arrayLike.length; i += 1) {\n    const result = callback(arrayLike[i], i, arrayLike);\n    if (Array.isArray(result)) array.push(...result);else array.push(result);\n  }\n\n  return array;\n}\nfunction addClass(className, ...rest) {\n  const classList = (className || '').split(' ').filter(Boolean);\n  rest.forEach(item => {\n    if (item && classList.indexOf(item) < 0) classList.push(item);\n  });\n  return classList.join(' ');\n}\nfunction childSelector(filter) {\n  if (typeof filter === 'string') {\n    const tagName = filter;\n\n    filter = el => el.tagName === tagName;\n  }\n\n  const filterFn = filter;\n  return function selector() {\n    let nodes = arrayFrom(this.childNodes);\n    if (filterFn) nodes = nodes.filter(node => filterFn(node));\n    return nodes;\n  };\n}\n\nfunction memoize(fn) {\n  const cache = {};\n  return function memoized(...args) {\n    const key = `${args[0]}`;\n    let data = cache[key];\n\n    if (!data) {\n      data = {\n        value: fn(...args)\n      };\n      cache[key] = data;\n    }\n\n    return data.value;\n  };\n}\n\nfunction createElement(tagName, props, attrs) {\n  const el = document.createElement(tagName);\n\n  if (props) {\n    Object.entries(props).forEach(([key, value]) => {\n      el[key] = value;\n    });\n  }\n\n  if (attrs) {\n    Object.entries(attrs).forEach(([key, value]) => {\n      el.setAttribute(key, value);\n    });\n  }\n\n  return el;\n}\n\nconst memoizedPreloadJS = memoize(url => {\n  document.head.append(createElement('link', {\n    rel: 'preload',\n    as: 'script',\n    href: url\n  }));\n});\n\nfunction loadJSItem(item, context) {\n  if (item.type === 'script') {\n    return new Promise((resolve, reject) => {\n      document.head.append(createElement('script', Object.assign(Object.assign({}, item.data), {}, {\n        onload: resolve,\n        onerror: reject\n      })));\n    });\n  } else if (item.type === 'iife') {\n    const {\n      fn,\n      getParams\n    } = item.data;\n    fn(...((getParams == null ? void 0 : getParams(context)) || []));\n  }\n}\n\nfunction loadCSSItem(item) {\n  if (item.type === 'style') {\n    document.head.append(createElement('style', {\n      textContent: item.data\n    }));\n  } else if (item.type === 'stylesheet') {\n    document.head.append(createElement('link', Object.assign({\n      rel: 'stylesheet'\n    }, item.data)));\n  }\n}\n\nasync function loadJS(items, options) {\n  const needPreload = items.filter(item => item.type === 'script');\n  if (needPreload.length > 1) needPreload.forEach(item => memoizedPreloadJS(item.data.src));\n\n  for (const item of items) {\n    await loadJSItem(item, options);\n  }\n}\nfunction loadCSS(items) {\n  for (const item of items) {\n    loadCSSItem(item);\n  }\n}\nasync function initializePlugins(Markmap, plugins, options) {\n  options = Object.assign({}, options);\n  await Promise.all(plugins.map(plugin => {\n    loadCSS(plugin.styles);\n    return loadJS(plugin.scripts, options);\n  }));\n\n  for (const {\n    initialize\n  } of plugins) {\n    if (initialize) initialize(Markmap, options);\n  }\n}\n\nconst styles = [];\nconst scripts = [{\n  type: 'iife',\n  data: {\n    fn: mathJax => {\n      mathJax.options = Object.assign({\n        skipHtmlTags: {\n          '[-]': ['code', 'pre']\n        }\n      }, mathJax.options);\n      mathJax.startup = Object.assign({\n        typeset: false\n      }, mathJax.startup);\n      window.MathJax = mathJax;\n    },\n    getParams: context => [Object.assign({}, context.mathJax)]\n  }\n}, {\n  type: 'script',\n  data: {\n    src: 'https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-svg.js'\n  }\n}];\n\nfunction initialize(Markmap, options) {\n  Markmap.transformHtml.tap((mm, nodes) => {\n    var _MathJax$typeset, _MathJax;\n\n    (_MathJax$typeset = (_MathJax = window.MathJax).typeset) == null ? void 0 : _MathJax$typeset.call(_MathJax, nodes);\n  });\n}\n\nconst plugin = {\n  styles,\n  scripts,\n  initialize\n};\n\nconst styles$1 = [{\n  type: 'stylesheet',\n  data: {\n    href: 'https://cdn.jsdelivr.net/npm/prismjs@1/themes/prism.css'\n  }\n}];\nconst scripts$1 = [{\n  type: 'iife',\n  data: {\n    fn: () => {\n      window.Prism = {\n        manual: true\n      };\n    }\n  }\n}, {\n  type: 'script',\n  data: {\n    src: 'https://cdn.jsdelivr.net/npm/prismjs@1/components/prism-core.min.js'\n  }\n}, // components will be added by paths relative to path of autoloader\n{\n  type: 'script',\n  data: {\n    src: 'https://cdn.jsdelivr.net/npm/prismjs@1/plugins/autoloader/prism-autoloader.min.js'\n  }\n}];\n\nfunction initialize$1(Markmap, options) {\n  Markmap.transformHtml.tap((mm, nodes) => {\n    const {\n      Prism\n    } = window;\n    const langs = flatMap(nodes, node => arrayFrom(node.querySelectorAll('code[class*=language-]'))).map(code => {\n      const lang = code.className.match(/(?:^|\\s)language-(\\S+)|$/)[1];\n\n      if (Prism.languages[lang]) {\n        Prism.highlightElement(code);\n      } else {\n        return lang;\n      }\n    }).filter(Boolean);\n\n    if (langs.length) {\n      Prism.plugins.autoloader.loadLanguages(langs, () => {\n        mm.setData();\n        mm.fit();\n      });\n    }\n  });\n}\n\nconst plugin$1 = {\n  styles: styles$1,\n  scripts: scripts$1,\n  initialize: initialize$1\n};\n\nvar plugins = /*#__PURE__*/Object.freeze({\n__proto__: null,\nmathJax: plugin,\nprism: plugin$1\n});\n\nclass Hook {\n  constructor() {\n    this.listeners = [];\n  }\n\n  tap(fn) {\n    this.listeners.push(fn);\n  }\n\n  call(...args) {\n    for (const fn of this.listeners) {\n      fn(...args);\n    }\n  }\n\n}\n\nfunction linkWidth(nodeData) {\n  const data = nodeData.data;\n  return Math.max(6 - 2 * data.d, 1.5);\n}\n\nfunction adjustSpacing(tree, spacing) {\n  walkTree(tree, (d, next) => {\n    d.ySizeInner = d.ySize - spacing;\n    d.y += spacing;\n    next();\n  }, 'children');\n}\n\nclass Markmap {\n  constructor(svg, opts) {\n    this.options = void 0;\n    this.state = void 0;\n    this.svg = void 0;\n    this.styleNode = void 0;\n    this.g = void 0;\n    this.zoom = void 0;\n    ['handleZoom', 'handleClick'].forEach(key => {\n      this[key] = this[key].bind(this);\n    });\n    this.svg = svg.datum ? svg : d3.select(svg);\n    this.styleNode = this.svg.append('style');\n    this.zoom = d3.zoom().on('zoom', this.handleZoom);\n    this.options = Object.assign({\n      duration: 500,\n      nodeFont: '300 16px/20px sans-serif',\n      nodeMinHeight: 16,\n      spacingVertical: 5,\n      spacingHorizontal: 80,\n      autoFit: false,\n      fitRatio: 0.95,\n      color: (colorFn => node => colorFn(node.p.i))(d3.scaleOrdinal(d3.schemeCategory10)),\n      paddingX: 8\n    }, opts);\n    this.state = {\n      id: this.options.id || getId()\n    };\n    this.g = this.svg.append('g').attr('class', `${this.state.id}-g`);\n    this.updateStyle();\n    this.svg.call(this.zoom);\n  }\n\n  getStyleContent() {\n    const {\n      style,\n      nodeFont\n    } = this.options;\n    const {\n      id\n    } = this.state;\n    const extraStyle = typeof style === 'function' ? style(id) : '';\n    const styleText = `\\\n.${id} a { color: #0097e6; }\n.${id} a:hover { color: #00a8ff; }\n.${id}-g > path { fill: none; }\n.${id}-fo > div { font: ${nodeFont}; white-space: nowrap; }\n.${id}-fo code { padding: .2em .4em; font-size: calc(1em - 2px); color: #555; background-color: #f0f0f0; border-radius: 2px; }\n.${id}-fo del { text-decoration: line-through; }\n.${id}-fo em { font-style: italic; }\n.${id}-fo strong { font-weight: 500; }\n.${id}-fo pre { margin: 0; }\n.${id}-fo pre[class*=language-] { padding: 0; }\n.${id}-g > g { cursor: pointer; }\n${extraStyle}\n`;\n    return styleText;\n  }\n\n  updateStyle() {\n    this.svg.attr('class', addClass(this.svg.attr('class'), this.state.id));\n    this.styleNode.text(this.getStyleContent());\n  }\n\n  handleZoom() {\n    const {\n      transform\n    } = d3.event;\n    this.g.attr('transform', transform);\n  }\n\n  handleClick(d) {\n    var _data$p;\n\n    const {\n      data\n    } = d;\n    data.p = Object.assign(Object.assign({}, data.p), {}, {\n      f: !((_data$p = data.p) == null ? void 0 : _data$p.f)\n    });\n    this.renderData(d.data);\n  }\n\n  initializeData(node) {\n    let i = 0;\n    const {\n      nodeFont,\n      color,\n      nodeMinHeight\n    } = this.options;\n    const {\n      id\n    } = this.state;\n    const container = document.createElement('div');\n    const containerClass = `${id}-container`;\n    container.className = addClass(container.className, `${id}-fo`, containerClass);\n    const style = document.createElement('style');\n    style.textContent = `\n${this.getStyleContent()}\n.${containerClass} {\n  position: absolute;\n  width: 0;\n  height: 0;\n  top: -100px;\n  left: -100px;\n  overflow: hidden;\n  font: ${nodeFont};\n}\n.${containerClass} > div {\n  display: inline-block;\n}\n`;\n    document.body.append(style, container);\n    walkTree(node, (item, next) => {\n      var _item$c;\n\n      item.c = (_item$c = item.c) == null ? void 0 : _item$c.map(child => Object.assign({}, child));\n      i += 1;\n      const el = document.createElement('div');\n      el.innerHTML = item.v;\n      container.append(el);\n      item.p = Object.assign(Object.assign({}, item.p), {}, {\n        // unique ID\n        i,\n        el\n      });\n      color(item); // preload colors\n\n      next();\n    });\n    const nodes = arrayFrom(container.childNodes);\n    this.constructor.transformHtml.call(this, nodes);\n    walkTree(node, (item, next, parent) => {\n      var _parent$p;\n\n      const rect = item.p.el.getBoundingClientRect();\n      item.v = item.p.el.innerHTML;\n      item.p.s = [Math.ceil(rect.width), Math.max(Math.ceil(rect.height), nodeMinHeight)]; // TODO keep keys for unchanged objects\n      // unique key, should be based on content\n\n      item.p.k = `${(parent == null ? void 0 : (_parent$p = parent.p) == null ? void 0 : _parent$p.i) || ''}.${item.p.i}:${item.v}`;\n      next();\n    });\n    container.remove();\n    style.remove();\n  }\n\n  setOptions(opts) {\n    Object.assign(this.options, opts);\n  }\n\n  setData(data, opts) {\n    if (!data) data = Object.assign({}, this.state.data);\n    this.state.data = data;\n    this.initializeData(data);\n    if (opts) this.setOptions(opts);\n    this.renderData();\n  }\n\n  renderData(originData) {\n    var _origin$data$p$x, _origin$data$p$y;\n\n    if (!this.state.data) return;\n    const {\n      spacingHorizontal,\n      paddingX,\n      spacingVertical,\n      autoFit,\n      color\n    } = this.options;\n    const {\n      id\n    } = this.state;\n    const layout = flextree().children(d => {\n      var _d$p;\n\n      return !((_d$p = d.p) == null ? void 0 : _d$p.f) && d.c;\n    }).nodeSize(d => {\n      const [width, height] = d.data.p.s;\n      return [height, width + (width ? paddingX * 2 : 0) + spacingHorizontal];\n    }).spacing((a, b) => {\n      return a.parent === b.parent ? spacingVertical : spacingVertical * 2;\n    });\n    const tree = layout.hierarchy(this.state.data);\n    layout(tree);\n    adjustSpacing(tree, spacingHorizontal);\n    const descendants = tree.descendants().reverse();\n    const links = tree.links();\n    const linkShape = d3.linkHorizontal();\n    const minX = d3.min(descendants, d => d.x - d.xSize / 2);\n    const maxX = d3.max(descendants, d => d.x + d.xSize / 2);\n    const minY = d3.min(descendants, d => d.y);\n    const maxY = d3.max(descendants, d => d.y + d.ySizeInner);\n    Object.assign(this.state, {\n      minX,\n      maxX,\n      minY,\n      maxY\n    });\n    if (autoFit) this.fit();\n    const origin = originData && descendants.find(item => item.data === originData) || tree;\n    const x0 = (_origin$data$p$x = origin.data.p.x0) != null ? _origin$data$p$x : origin.x;\n    const y0 = (_origin$data$p$y = origin.data.p.y0) != null ? _origin$data$p$y : origin.y; // Update the nodes\n\n    const node = this.g.selectAll(childSelector('g')).data(descendants, d => d.data.p.k);\n    const nodeEnter = node.enter().append('g').attr('transform', d => `translate(${y0 + origin.ySizeInner - d.ySizeInner},${x0 + origin.xSize / 2 - d.xSize})`).on('click', this.handleClick);\n    const nodeExit = this.transition(node.exit());\n    nodeExit.select('rect').attr('width', 0).attr('x', d => d.ySizeInner);\n    nodeExit.select('foreignObject').style('opacity', 0);\n    nodeExit.attr('transform', d => `translate(${origin.y + origin.ySizeInner - d.ySizeInner},${origin.x + origin.xSize / 2 - d.xSize})`).remove();\n    const nodeMerge = node.merge(nodeEnter);\n    this.transition(nodeMerge).attr('transform', d => `translate(${d.y},${d.x - d.xSize / 2})`);\n    const rect = nodeMerge.selectAll(childSelector('rect')).data(d => [d], d => d.data.p.k).join(enter => {\n      return enter.append('rect').attr('x', d => d.ySizeInner).attr('y', d => d.xSize - linkWidth(d) / 2).attr('width', 0).attr('height', linkWidth);\n    }, update => update, exit => exit.remove());\n    this.transition(rect).attr('x', -1).attr('width', d => d.ySizeInner + 2).attr('fill', d => color(d.data));\n    const circle = nodeMerge.selectAll(childSelector('circle')).data(d => d.data.c ? [d] : [], d => d.data.p.k).join(enter => {\n      return enter.append('circle').attr('stroke-width', '1.5').attr('cx', d => d.ySizeInner).attr('cy', d => d.xSize).attr('r', 0);\n    }, update => update, exit => exit.remove());\n    this.transition(circle).attr('r', 6).attr('stroke', d => color(d.data)).attr('fill', d => {\n      var _d$data$p;\n\n      return ((_d$data$p = d.data.p) == null ? void 0 : _d$data$p.f) ? color(d.data) : '#fff';\n    });\n    const foreignObject = nodeMerge.selectAll(childSelector('foreignObject')).data(d => [d], d => d.data.p.k).join(enter => {\n      const fo = enter.append('foreignObject').attr('class', `${id}-fo`).attr('x', paddingX).attr('y', 0).style('opacity', 0).attr('height', d => d.xSize);\n      fo.append('xhtml:div').select(function (d) {\n        const node = d.data.p.el.cloneNode(true);\n        this.replaceWith(node);\n        return node;\n      }).attr('xmlns', 'http://www.w3.org/1999/xhtml');\n      return fo;\n    }, update => update, exit => exit.remove()).attr('width', d => Math.max(0, d.ySizeInner - paddingX * 2));\n    this.transition(foreignObject).style('opacity', 1); // Update the links\n\n    const path = this.g.selectAll(childSelector('path')).data(links, d => d.target.data.p.k).join(enter => {\n      const source = [y0 + origin.ySizeInner, x0 + origin.xSize / 2];\n      return enter.insert('path', 'g').attr('d', linkShape({\n        source,\n        target: source\n      }));\n    }, update => update, exit => {\n      const source = [origin.y + origin.ySizeInner, origin.x + origin.xSize / 2];\n      return this.transition(exit).attr('d', linkShape({\n        source,\n        target: source\n      })).remove();\n    });\n    this.transition(path).attr('stroke', d => color(d.target.data)).attr('stroke-width', d => linkWidth(d.target)).attr('d', d => {\n      const source = [d.source.y + d.source.ySizeInner, d.source.x + d.source.xSize / 2];\n      const target = [d.target.y, d.target.x + d.target.xSize / 2];\n      return linkShape({\n        source,\n        target\n      });\n    });\n    descendants.forEach(d => {\n      d.data.p.x0 = d.x;\n      d.data.p.y0 = d.y;\n    });\n  }\n\n  transition(sel) {\n    const {\n      duration\n    } = this.options;\n    return sel.transition().duration(duration);\n  }\n\n  fit() {\n    const svgNode = this.svg.node();\n    const {\n      width: offsetWidth,\n      height: offsetHeight\n    } = svgNode.getBoundingClientRect();\n    const {\n      fitRatio\n    } = this.options;\n    const {\n      minX,\n      maxX,\n      minY,\n      maxY\n    } = this.state;\n    const naturalWidth = maxY - minY;\n    const naturalHeight = maxX - minX;\n    const scale = Math.min(offsetWidth / naturalWidth * fitRatio, offsetHeight / naturalHeight * fitRatio, 2);\n    const initialZoom = d3.zoomIdentity.translate((offsetWidth - naturalWidth * scale) / 2 - minY * scale, (offsetHeight - naturalHeight * scale) / 2 - minX * scale).scale(scale);\n    return this.transition(this.svg).call(this.zoom.transform, initialZoom).end();\n  }\n\n  rescale(scale) {\n    const svgNode = this.svg.node();\n    const {\n      width: offsetWidth,\n      height: offsetHeight\n    } = svgNode.getBoundingClientRect();\n    const halfWidth = offsetWidth / 2;\n    const halfHeight = offsetHeight / 2;\n    const transform = d3.zoomTransform(svgNode);\n    const newTransform = transform.translate((halfWidth - transform.x) * (1 - scale) / transform.k, (halfHeight - transform.y) * (1 - scale) / transform.k).scale(scale);\n    return this.transition(this.svg).call(this.zoom.transform, newTransform).end();\n  }\n\n  static create(svg, opts, data) {\n    const mm = new Markmap(svg, opts);\n\n    if (data) {\n      mm.setData(data);\n      mm.fit(); // always fit for the first render\n    }\n\n    return mm;\n  }\n\n}\nMarkmap.transformHtml = new Hook();\nfunction markmap(svg, data, opts) {\n  return Markmap.create(svg, opts, data);\n}\nasync function loadPlugins(items, options) {\n  items = items.map(item => {\n    if (typeof item === 'string') {\n      const name = item;\n      item = plugins[name];\n\n      if (!item) {\n        console.warn(`[markmap] Unknown plugin: ${name}`);\n      }\n    }\n\n    return item;\n  }).filter(Boolean);\n  return initializePlugins(Markmap, items, options);\n}\n\nexports.Markmap = Markmap;\nexports.loadPlugins = loadPlugins;\nexports.markmap = markmap;\nexports.plugins = plugins;\n\n}(this.markmap = this.markmap || {}, d3));\n"
  },
  {
    "path": "static/editor.md/lib/sequence/sequence-diagram-min.css",
    "content": "/** js sequence diagrams\n *  https://bramp.github.io/js-sequence-diagrams/\n *  (c) 2012-2017 Andrew Brampton (bramp.net)\n *  Simplified BSD license.\n */\n@font-face{font-family:'danielbd';src:url(danielbd.woff2) format('woff2'),url(danielbd.woff) format('woff');font-weight:normal;font-style:normal}"
  },
  {
    "path": "static/editor.md/lib/sequence/sequence-diagram-min.js",
    "content": "/** js sequence diagrams 2.0.1\n *  https://bramp.github.io/js-sequence-diagrams/\n *  (c) 2012-2017 Andrew Brampton (bramp.net)\n *  @license Simplified BSD license.\n */\n!function(){\"use strict\";function Diagram(){this.title=void 0,this.actors=[],this.signals=[]}function ParseError(message,hash){_.extend(this,hash),this.name=\"ParseError\",this.message=message||\"\"}function AssertException(message){this.message=message}function assert(exp,message){if(!exp)throw new AssertException(message)}function registerTheme(name,theme){Diagram.themes[name]=theme}function getCenterX(box){return box.x+box.width/2}function getCenterY(box){return box.y+box.height/2}function clamp(x,min,max){return x<min?min:x>max?max:x}function wobble(x1,y1,x2,y2){assert(_.all([x1,x2,y1,y2],_.isFinite),\"x1,x2,y1,y2 must be numeric\");var factor=Math.sqrt((x2-x1)*(x2-x1)+(y2-y1)*(y2-y1))/25,r1=clamp(Math.random(),.2,.8),r2=clamp(Math.random(),.2,.8),xfactor=Math.random()>.5?factor:-factor,yfactor=Math.random()>.5?factor:-factor,p1={x:(x2-x1)*r1+x1+xfactor,y:(y2-y1)*r1+y1+yfactor},p2={x:(x2-x1)*r2+x1-xfactor,y:(y2-y1)*r2+y1-yfactor};return\"C\"+p1.x.toFixed(1)+\",\"+p1.y.toFixed(1)+\" \"+p2.x.toFixed(1)+\",\"+p2.y.toFixed(1)+\" \"+x2.toFixed(1)+\",\"+y2.toFixed(1)}function handRect(x,y,w,h){return assert(_.all([x,y,w,h],_.isFinite),\"x, y, w, h must be numeric\"),\"M\"+x+\",\"+y+wobble(x,y,x+w,y)+wobble(x+w,y,x+w,y+h)+wobble(x+w,y+h,x,y+h)+wobble(x,y+h,x,y)}function handLine(x1,y1,x2,y2){return assert(_.all([x1,x2,y1,y2],_.isFinite),\"x1,x2,y1,y2 must be numeric\"),\"M\"+x1.toFixed(1)+\",\"+y1.toFixed(1)+wobble(x1,y1,x2,y2)}Diagram.prototype.getActor=function(alias,name){alias=alias.trim();var i,actors=this.actors;for(i in actors)if(actors[i].alias==alias)return actors[i];return i=actors.push(new Diagram.Actor(alias,name||alias,actors.length)),actors[i-1]},Diagram.prototype.getActorWithAlias=function(input){input=input.trim();var alias,name,s=/([\\s\\S]+) as (\\S+)$/im.exec(input);return s?(name=s[1].trim(),alias=s[2].trim()):name=alias=input,this.getActor(alias,name)},Diagram.prototype.setTitle=function(title){this.title=title},Diagram.prototype.addSignal=function(signal){this.signals.push(signal)},Diagram.Actor=function(alias,name,index){this.alias=alias,this.name=name,this.index=index},Diagram.Signal=function(actorA,signaltype,actorB,message){this.type=\"Signal\",this.actorA=actorA,this.actorB=actorB,this.linetype=3&signaltype,this.arrowtype=signaltype>>2&3,this.message=message},Diagram.Signal.prototype.isSelf=function(){return this.actorA.index==this.actorB.index},Diagram.Note=function(actor,placement,message){if(this.type=\"Note\",this.actor=actor,this.placement=placement,this.message=message,this.hasManyActors()&&actor[0]==actor[1])throw new Error(\"Note should be over two different actors\")},Diagram.Note.prototype.hasManyActors=function(){return _.isArray(this.actor)},Diagram.unescape=function(s){return s.trim().replace(/^\"(.*)\"$/m,\"$1\").replace(/\\\\n/gm,\"\\n\")},Diagram.LINETYPE={SOLID:0,DOTTED:1},Diagram.ARROWTYPE={FILLED:0,OPEN:1},Diagram.PLACEMENT={LEFTOF:0,RIGHTOF:1,OVER:2},\"function\"!=typeof Object.getPrototypeOf&&(\"object\"==typeof\"test\".__proto__?Object.getPrototypeOf=function(object){return object.__proto__}:Object.getPrototypeOf=function(object){return object.constructor.prototype});var parser=function(){function Parser(){this.yy={}}var o=function(k,v,o,l){for(o=o||{},l=k.length;l--;o[k[l]]=v);return o},$V0=[5,8,9,13,15,24],$V1=[1,13],$V2=[1,17],$V3=[24,29,30],parser={trace:function(){},yy:{},symbols_:{error:2,start:3,document:4,EOF:5,line:6,statement:7,NL:8,participant:9,actor_alias:10,signal:11,note_statement:12,title:13,message:14,note:15,placement:16,actor:17,over:18,actor_pair:19,\",\":20,left_of:21,right_of:22,signaltype:23,ACTOR:24,linetype:25,arrowtype:26,LINE:27,DOTLINE:28,ARROW:29,OPENARROW:30,MESSAGE:31,$accept:0,$end:1},terminals_:{2:\"error\",5:\"EOF\",8:\"NL\",9:\"participant\",13:\"title\",15:\"note\",18:\"over\",20:\",\",21:\"left_of\",22:\"right_of\",24:\"ACTOR\",27:\"LINE\",28:\"DOTLINE\",29:\"ARROW\",30:\"OPENARROW\",31:\"MESSAGE\"},productions_:[0,[3,2],[4,0],[4,2],[6,1],[6,1],[7,2],[7,1],[7,1],[7,2],[12,4],[12,4],[19,1],[19,3],[16,1],[16,1],[11,4],[17,1],[10,1],[23,2],[23,1],[25,1],[25,1],[26,1],[26,1],[14,1]],performAction:function(yytext,yyleng,yylineno,yy,yystate,$$,_$){var $0=$$.length-1;switch(yystate){case 1:return yy.parser.yy;case 4:break;case 6:$$[$0];break;case 7:case 8:yy.parser.yy.addSignal($$[$0]);break;case 9:yy.parser.yy.setTitle($$[$0]);break;case 10:this.$=new Diagram.Note($$[$0-1],$$[$0-2],$$[$0]);break;case 11:this.$=new Diagram.Note($$[$0-1],Diagram.PLACEMENT.OVER,$$[$0]);break;case 12:case 20:this.$=$$[$0];break;case 13:this.$=[$$[$0-2],$$[$0]];break;case 14:this.$=Diagram.PLACEMENT.LEFTOF;break;case 15:this.$=Diagram.PLACEMENT.RIGHTOF;break;case 16:this.$=new Diagram.Signal($$[$0-3],$$[$0-2],$$[$0-1],$$[$0]);break;case 17:this.$=yy.parser.yy.getActor(Diagram.unescape($$[$0]));break;case 18:this.$=yy.parser.yy.getActorWithAlias(Diagram.unescape($$[$0]));break;case 19:this.$=$$[$0-1]|$$[$0]<<2;break;case 21:this.$=Diagram.LINETYPE.SOLID;break;case 22:this.$=Diagram.LINETYPE.DOTTED;break;case 23:this.$=Diagram.ARROWTYPE.FILLED;break;case 24:this.$=Diagram.ARROWTYPE.OPEN;break;case 25:this.$=Diagram.unescape($$[$0].substring(1))}},table:[o($V0,[2,2],{3:1,4:2}),{1:[3]},{5:[1,3],6:4,7:5,8:[1,6],9:[1,7],11:8,12:9,13:[1,10],15:[1,12],17:11,24:$V1},{1:[2,1]},o($V0,[2,3]),o($V0,[2,4]),o($V0,[2,5]),{10:14,24:[1,15]},o($V0,[2,7]),o($V0,[2,8]),{14:16,31:$V2},{23:18,25:19,27:[1,20],28:[1,21]},{16:22,18:[1,23],21:[1,24],22:[1,25]},o([20,27,28,31],[2,17]),o($V0,[2,6]),o($V0,[2,18]),o($V0,[2,9]),o($V0,[2,25]),{17:26,24:$V1},{24:[2,20],26:27,29:[1,28],30:[1,29]},o($V3,[2,21]),o($V3,[2,22]),{17:30,24:$V1},{17:32,19:31,24:$V1},{24:[2,14]},{24:[2,15]},{14:33,31:$V2},{24:[2,19]},{24:[2,23]},{24:[2,24]},{14:34,31:$V2},{14:35,31:$V2},{20:[1,36],31:[2,12]},o($V0,[2,16]),o($V0,[2,10]),o($V0,[2,11]),{17:37,24:$V1},{31:[2,13]}],defaultActions:{3:[2,1],24:[2,14],25:[2,15],27:[2,19],28:[2,23],29:[2,24],37:[2,13]},parseError:function(str,hash){if(!hash.recoverable)throw new Error(str);this.trace(str)},parse:function(input){function lex(){var token;return token=lexer.lex()||EOF,\"number\"!=typeof token&&(token=self.symbols_[token]||token),token}var self=this,stack=[0],vstack=[null],lstack=[],table=this.table,yytext=\"\",yylineno=0,yyleng=0,recovering=0,TERROR=2,EOF=1,args=lstack.slice.call(arguments,1),lexer=Object.create(this.lexer),sharedState={yy:{}};for(var k in this.yy)Object.prototype.hasOwnProperty.call(this.yy,k)&&(sharedState.yy[k]=this.yy[k]);lexer.setInput(input,sharedState.yy),sharedState.yy.lexer=lexer,sharedState.yy.parser=this,\"undefined\"==typeof lexer.yylloc&&(lexer.yylloc={});var yyloc=lexer.yylloc;lstack.push(yyloc);var ranges=lexer.options&&lexer.options.ranges;\"function\"==typeof sharedState.yy.parseError?this.parseError=sharedState.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var symbol,preErrorSymbol,state,action,r,p,len,newState,expected,yyval={};;){if(state=stack[stack.length-1],this.defaultActions[state]?action=this.defaultActions[state]:(null!==symbol&&\"undefined\"!=typeof symbol||(symbol=lex()),action=table[state]&&table[state][symbol]),\"undefined\"==typeof action||!action.length||!action[0]){var errStr=\"\";expected=[];for(p in table[state])this.terminals_[p]&&p>TERROR&&expected.push(\"'\"+this.terminals_[p]+\"'\");errStr=lexer.showPosition?\"Parse error on line \"+(yylineno+1)+\":\\n\"+lexer.showPosition()+\"\\nExpecting \"+expected.join(\", \")+\", got '\"+(this.terminals_[symbol]||symbol)+\"'\":\"Parse error on line \"+(yylineno+1)+\": Unexpected \"+(symbol==EOF?\"end of input\":\"'\"+(this.terminals_[symbol]||symbol)+\"'\"),this.parseError(errStr,{text:lexer.match,token:this.terminals_[symbol]||symbol,line:lexer.yylineno,loc:yyloc,expected:expected})}if(action[0]instanceof Array&&action.length>1)throw new Error(\"Parse Error: multiple actions possible at state: \"+state+\", token: \"+symbol);switch(action[0]){case 1:stack.push(symbol),vstack.push(lexer.yytext),lstack.push(lexer.yylloc),stack.push(action[1]),symbol=null,preErrorSymbol?(symbol=preErrorSymbol,preErrorSymbol=null):(yyleng=lexer.yyleng,yytext=lexer.yytext,yylineno=lexer.yylineno,yyloc=lexer.yylloc,recovering>0&&recovering--);break;case 2:if(len=this.productions_[action[1]][1],yyval.$=vstack[vstack.length-len],yyval._$={first_line:lstack[lstack.length-(len||1)].first_line,last_line:lstack[lstack.length-1].last_line,first_column:lstack[lstack.length-(len||1)].first_column,last_column:lstack[lstack.length-1].last_column},ranges&&(yyval._$.range=[lstack[lstack.length-(len||1)].range[0],lstack[lstack.length-1].range[1]]),r=this.performAction.apply(yyval,[yytext,yyleng,yylineno,sharedState.yy,action[1],vstack,lstack].concat(args)),\"undefined\"!=typeof r)return r;len&&(stack=stack.slice(0,-1*len*2),vstack=vstack.slice(0,-1*len),lstack=lstack.slice(0,-1*len)),stack.push(this.productions_[action[1]][0]),vstack.push(yyval.$),lstack.push(yyval._$),newState=table[stack[stack.length-2]][stack[stack.length-1]],stack.push(newState);break;case 3:return!0}}return!0}},lexer=function(){var lexer={EOF:1,parseError:function(str,hash){if(!this.yy.parser)throw new Error(str);this.yy.parser.parseError(str,hash)},setInput:function(input,yy){return this.yy=yy||this.yy||{},this._input=input,this._more=this._backtrack=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.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var ch=this._input[0];this.yytext+=ch,this.yyleng++,this.offset++,this.match+=ch,this.matched+=ch;var lines=ch.match(/(?:\\r\\n?|\\n).*/g);return lines?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),ch},unput:function(ch){var len=ch.length,lines=ch.split(/(?:\\r\\n?|\\n)/g);this._input=ch+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-len),this.offset-=len;var oldLines=this.match.split(/(?:\\r\\n?|\\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),lines.length-1&&(this.yylineno-=lines.length-1);var r=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:lines?(lines.length===oldLines.length?this.yylloc.first_column:0)+oldLines[oldLines.length-lines.length].length-lines[0].length:this.yylloc.first_column-len},this.options.ranges&&(this.yylloc.range=[r[0],r[0]+this.yyleng-len]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError(\"Lexical error on line \"+(this.yylineno+1)+\". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\\n\"+this.showPosition(),{text:\"\",token:null,line:this.yylineno})},less:function(n){this.unput(this.match.slice(n))},pastInput:function(){var past=this.matched.substr(0,this.matched.length-this.match.length);return(past.length>20?\"...\":\"\")+past.substr(-20).replace(/\\n/g,\"\")},upcomingInput:function(){var next=this.match;return next.length<20&&(next+=this._input.substr(0,20-next.length)),(next.substr(0,20)+(next.length>20?\"...\":\"\")).replace(/\\n/g,\"\")},showPosition:function(){var pre=this.pastInput(),c=new Array(pre.length+1).join(\"-\");return pre+this.upcomingInput()+\"\\n\"+c+\"^\"},test_match:function(match,indexed_rule){var token,lines,backup;if(this.options.backtrack_lexer&&(backup={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(backup.yylloc.range=this.yylloc.range.slice(0))),lines=match[0].match(/(?:\\r\\n?|\\n).*/g),lines&&(this.yylineno+=lines.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:lines?lines[lines.length-1].length-lines[lines.length-1].match(/\\r?\\n?/)[0].length:this.yylloc.last_column+match[0].length},this.yytext+=match[0],this.match+=match[0],this.matches=match,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(match[0].length),this.matched+=match[0],token=this.performAction.call(this,this.yy,this,indexed_rule,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),token)return token;if(this._backtrack){for(var k in backup)this[k]=backup[k];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var token,match,tempMatch,index;this._more||(this.yytext=\"\",this.match=\"\");for(var rules=this._currentRules(),i=0;i<rules.length;i++)if(tempMatch=this._input.match(this.rules[rules[i]]),tempMatch&&(!match||tempMatch[0].length>match[0].length)){if(match=tempMatch,index=i,this.options.backtrack_lexer){if(token=this.test_match(tempMatch,rules[i]),token!==!1)return token;if(this._backtrack){match=!1;continue}return!1}if(!this.options.flex)break}return match?(token=this.test_match(match,rules[index]),token!==!1&&token):\"\"===this._input?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 r=this.next();return r?r:this.lex()},begin:function(condition){this.conditionStack.push(condition)},popState:function(){var n=this.conditionStack.length-1;return n>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(n){return n=this.conditionStack.length-1-Math.abs(n||0),n>=0?this.conditionStack[n]:\"INITIAL\"},pushState:function(condition){this.begin(condition)},stateStackSize:function(){return this.conditionStack.length},options:{\"case-insensitive\":!0},performAction:function(yy,yy_,$avoiding_name_collisions,YY_START){switch($avoiding_name_collisions){case 0:return 8;case 1:break;case 2:break;case 3:return 9;case 4:return 21;case 5:return 22;case 6:return 18;case 7:return 15;case 8:return 13;case 9:return 20;case 10:return 24;case 11:return 24;case 12:return 28;case 13:return 27;case 14:return 30;case 15:return 29;case 16:return 31;case 17:return 5;case 18:return\"INVALID\"}},rules:[/^(?:[\\r\\n]+)/i,/^(?:\\s+)/i,/^(?:#[^\\r\\n]*)/i,/^(?:participant\\b)/i,/^(?:left of\\b)/i,/^(?:right of\\b)/i,/^(?:over\\b)/i,/^(?:note\\b)/i,/^(?:title\\b)/i,/^(?:,)/i,/^(?:[^\\->:,\\r\\n\"]+)/i,/^(?:\"[^\"]+\")/i,/^(?:--)/i,/^(?:-)/i,/^(?:>>)/i,/^(?:>)/i,/^(?:[^\\r\\n]+)/i,/^(?:$)/i,/^(?:.)/i],conditions:{INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18],inclusive:!0}}};return lexer}();return parser.lexer=lexer,Parser.prototype=parser,parser.Parser=Parser,new Parser}();\"undefined\"!=typeof require&&\"undefined\"!=typeof exports&&(exports.parser=parser,exports.Parser=parser.Parser,exports.parse=function(){return parser.parse.apply(parser,arguments)},exports.main=function(args){args[1]||(console.log(\"Usage: \"+args[0]+\" FILE\"),process.exit(1));var source=require(\"fs\").readFileSync(require(\"path\").normalize(args[1]),\"utf8\");return exports.parser.parse(source)},\"undefined\"!=typeof module&&require.main===module&&exports.main(process.argv.slice(1))),ParseError.prototype=new Error,Diagram.ParseError=ParseError,Diagram.parse=function(input){parser.yy=new Diagram,parser.yy.parseError=function(message,hash){throw new ParseError(message,hash)};var diagram=parser.parse(input);return delete diagram.parseError,diagram};var DIAGRAM_MARGIN=10,ACTOR_MARGIN=10,ACTOR_PADDING=10,SIGNAL_MARGIN=5,SIGNAL_PADDING=5,NOTE_MARGIN=10,NOTE_PADDING=5,NOTE_OVERLAP=15,TITLE_MARGIN=0,TITLE_PADDING=5,SELF_SIGNAL_WIDTH=20,PLACEMENT=Diagram.PLACEMENT,LINETYPE=Diagram.LINETYPE,ARROWTYPE=Diagram.ARROWTYPE,ALIGN_LEFT=0,ALIGN_CENTER=1;AssertException.prototype.toString=function(){return\"AssertException: \"+this.message},String.prototype.trim||(String.prototype.trim=function(){return this.replace(/^\\s+|\\s+$/g,\"\")}),Diagram.themes={};var BaseTheme=function(diagram,options){this.init(diagram,options)};if(_.extend(BaseTheme.prototype,{init:function(diagram,options){this.diagram=diagram,this.actorsHeight_=0,this.signalsHeight_=0,this.title_=void 0},setupPaper:function(container){},draw:function(container){this.setupPaper(container),this.layout();var titleHeight=this.title_?this.title_.height:0,y=DIAGRAM_MARGIN+titleHeight;this.drawTitle(),this.drawActors(y),this.drawSignals(y+this.actorsHeight_)},layout:function(){function actorEnsureDistance(a,b,d){assert(a<b,\"a must be less than or equal to b\"),a<0?(b=actors[b],b.x=Math.max(d-b.width/2,b.x)):b>=actors.length?(a=actors[a],a.paddingRight=Math.max(d,a.paddingRight)):(a=actors[a],a.distances[b]=Math.max(d,a.distances[b]?a.distances[b]:0))}var diagram=this.diagram,font=this.font_,actors=diagram.actors,signals=diagram.signals;if(diagram.width=0,diagram.height=0,diagram.title){var title=this.title_={},bb=this.textBBox(diagram.title,font);title.textBB=bb,title.message=diagram.title,title.width=bb.width+2*(TITLE_PADDING+TITLE_MARGIN),title.height=bb.height+2*(TITLE_PADDING+TITLE_MARGIN),title.x=DIAGRAM_MARGIN,title.y=DIAGRAM_MARGIN,diagram.width+=title.width,diagram.height+=title.height}_.each(actors,function(a){var bb=this.textBBox(a.name,font);a.textBB=bb,a.x=0,a.y=0,a.width=bb.width+2*(ACTOR_PADDING+ACTOR_MARGIN),a.height=bb.height+2*(ACTOR_PADDING+ACTOR_MARGIN),a.distances=[],a.paddingRight=0,this.actorsHeight_=Math.max(a.height,this.actorsHeight_)},this),_.each(signals,function(s){var a,b,bb=this.textBBox(s.message,font);s.textBB=bb,s.width=bb.width,s.height=bb.height;var extraWidth=0;if(\"Signal\"==s.type)s.width+=2*(SIGNAL_MARGIN+SIGNAL_PADDING),s.height+=2*(SIGNAL_MARGIN+SIGNAL_PADDING),s.isSelf()?(a=s.actorA.index,b=a+1,s.width+=SELF_SIGNAL_WIDTH):(a=Math.min(s.actorA.index,s.actorB.index),b=Math.max(s.actorA.index,s.actorB.index));else{if(\"Note\"!=s.type)throw new Error(\"Unhandled signal type:\"+s.type);if(s.width+=2*(NOTE_MARGIN+NOTE_PADDING),s.height+=2*(NOTE_MARGIN+NOTE_PADDING),extraWidth=2*ACTOR_MARGIN,s.placement==PLACEMENT.LEFTOF)b=s.actor.index,a=b-1;else if(s.placement==PLACEMENT.RIGHTOF)a=s.actor.index,b=a+1;else if(s.placement==PLACEMENT.OVER&&s.hasManyActors())a=Math.min(s.actor[0].index,s.actor[1].index),b=Math.max(s.actor[0].index,s.actor[1].index),extraWidth=-(2*NOTE_PADDING+2*NOTE_OVERLAP);else if(s.placement==PLACEMENT.OVER)return a=s.actor.index,actorEnsureDistance(a-1,a,s.width/2),actorEnsureDistance(a,a+1,s.width/2),void(this.signalsHeight_+=s.height)}actorEnsureDistance(a,b,s.width+extraWidth),this.signalsHeight_+=s.height},this);var actorsX=0;return _.each(actors,function(a){a.x=Math.max(actorsX,a.x),_.each(a.distances,function(distance,b){\"undefined\"!=typeof distance&&(b=actors[b],distance=Math.max(distance,a.width/2,b.width/2),b.x=Math.max(b.x,a.x+a.width/2+distance-b.width/2))}),actorsX=a.x+a.width+a.paddingRight},this),diagram.width=Math.max(actorsX,diagram.width),diagram.width+=2*DIAGRAM_MARGIN,diagram.height+=2*DIAGRAM_MARGIN+2*this.actorsHeight_+this.signalsHeight_,this},textBBox:function(text,font){},drawTitle:function(){var title=this.title_;title&&this.drawTextBox(title,title.message,TITLE_MARGIN,TITLE_PADDING,this.font_,ALIGN_LEFT)},drawActors:function(offsetY){var y=offsetY;_.each(this.diagram.actors,function(a){this.drawActor(a,y,this.actorsHeight_),this.drawActor(a,y+this.actorsHeight_+this.signalsHeight_,this.actorsHeight_);var aX=getCenterX(a);this.drawLine(aX,y+this.actorsHeight_-ACTOR_MARGIN,aX,y+this.actorsHeight_+ACTOR_MARGIN+this.signalsHeight_)},this)},drawActor:function(actor,offsetY,height){actor.y=offsetY,actor.height=height,this.drawTextBox(actor,actor.name,ACTOR_MARGIN,ACTOR_PADDING,this.font_,ALIGN_CENTER)},drawSignals:function(offsetY){var y=offsetY;_.each(this.diagram.signals,function(s){\"Signal\"==s.type?s.isSelf()?this.drawSelfSignal(s,y):this.drawSignal(s,y):\"Note\"==s.type&&this.drawNote(s,y),y+=s.height},this)},drawSelfSignal:function(signal,offsetY){assert(signal.isSelf(),\"signal must be a self signal\");var textBB=signal.textBB,aX=getCenterX(signal.actorA),x=aX+SELF_SIGNAL_WIDTH+SIGNAL_PADDING,y=offsetY+SIGNAL_PADDING+signal.height/2+textBB.y;this.drawText(x,y,signal.message,this.font_,ALIGN_LEFT);var y1=offsetY+SIGNAL_MARGIN+SIGNAL_PADDING,y2=y1+signal.height-2*SIGNAL_MARGIN-SIGNAL_PADDING;this.drawLine(aX,y1,aX+SELF_SIGNAL_WIDTH,y1,signal.linetype),this.drawLine(aX+SELF_SIGNAL_WIDTH,y1,aX+SELF_SIGNAL_WIDTH,y2,signal.linetype),this.drawLine(aX+SELF_SIGNAL_WIDTH,y2,aX,y2,signal.linetype,signal.arrowtype)},drawSignal:function(signal,offsetY){var aX=getCenterX(signal.actorA),bX=getCenterX(signal.actorB),x=(bX-aX)/2+aX,y=offsetY+SIGNAL_MARGIN+2*SIGNAL_PADDING;this.drawText(x,y,signal.message,this.font_,ALIGN_CENTER),y=offsetY+signal.height-SIGNAL_MARGIN-SIGNAL_PADDING,this.drawLine(aX,y,bX,y,signal.linetype,signal.arrowtype)},drawNote:function(note,offsetY){note.y=offsetY;var actorA=note.hasManyActors()?note.actor[0]:note.actor,aX=getCenterX(actorA);switch(note.placement){case PLACEMENT.RIGHTOF:note.x=aX+ACTOR_MARGIN;break;case PLACEMENT.LEFTOF:note.x=aX-ACTOR_MARGIN-note.width;break;case PLACEMENT.OVER:if(note.hasManyActors()){var bX=getCenterX(note.actor[1]),overlap=NOTE_OVERLAP+NOTE_PADDING;note.x=Math.min(aX,bX)-overlap,note.width=Math.max(aX,bX)+overlap-note.x}else note.x=aX-note.width/2;break;default:throw new Error(\"Unhandled note placement: \"+note.placement)}return this.drawTextBox(note,note.message,NOTE_MARGIN,NOTE_PADDING,this.font_,ALIGN_LEFT)},drawTextBox:function(box,text,margin,padding,font,align){var x=box.x+margin,y=box.y+margin,w=box.width-2*margin,h=box.height-2*margin;return this.drawRect(x,y,w,h),align==ALIGN_CENTER?(x=getCenterX(box),y=getCenterY(box)):(x+=padding,y+=padding),this.drawText(x,y,text,font,align)}}),\"undefined\"!=typeof Snap){var xmlns=\"http://www.w3.org/2000/svg\",LINE={stroke:\"#000000\",\"stroke-width\":2,fill:\"none\"},RECT={stroke:\"#000000\",\"stroke-width\":2,fill:\"#fff\"},LOADED_FONTS={},SnapTheme=function(diagram,options,resume){_.defaults(options,{\"css-class\":\"simple\",\"font-size\":16,\"font-family\":\"Andale Mono, monospace\"}),this.init(diagram,options,resume)};_.extend(SnapTheme.prototype,BaseTheme.prototype,{init:function(diagram,options,resume){BaseTheme.prototype.init.call(this,diagram),this.paper_=void 0,this.cssClass_=options[\"css-class\"]||void 0,this.font_={\"font-size\":options[\"font-size\"],\"font-family\":options[\"font-family\"]};var a=this.arrowTypes_={};a[ARROWTYPE.FILLED]=\"Block\",a[ARROWTYPE.OPEN]=\"Open\";var l=this.lineTypes_={};l[LINETYPE.SOLID]=\"\",l[LINETYPE.DOTTED]=\"6,2\";var that=this;this.waitForFont(function(){resume(that)})},waitForFont:function(callback){var fontFamily=this.font_[\"font-family\"];if(\"undefined\"==typeof WebFont)throw new Error(\"WebFont is required (https://github.com/typekit/webfontloader).\");return LOADED_FONTS[fontFamily]?void callback():void WebFont.load({custom:{families:[fontFamily]},classes:!1,active:function(){LOADED_FONTS[fontFamily]=!0,callback()},inactive:function(){LOADED_FONTS[fontFamily]=!0,callback()}})},addDescription:function(svg,description){var desc=document.createElementNS(xmlns,\"desc\");desc.appendChild(document.createTextNode(description)),svg.appendChild(desc)},setupPaper:function(container){var svg=document.createElementNS(xmlns,\"svg\");container.appendChild(svg),this.addDescription(svg,this.diagram.title||\"\"),this.paper_=Snap(svg),this.paper_.addClass(\"sequence\"),this.cssClass_&&this.paper_.addClass(this.cssClass_),this.beginGroup();var a=this.arrowMarkers_={},arrow=this.paper_.path(\"M 0 0 L 5 2.5 L 0 5 z\");a[ARROWTYPE.FILLED]=arrow.marker(0,0,5,5,5,2.5).attr({id:\"markerArrowBlock\"}),arrow=this.paper_.path(\"M 9.6,8 1.92,16 0,13.7 5.76,8 0,2.286 1.92,0 9.6,8 z\"),a[ARROWTYPE.OPEN]=arrow.marker(0,0,9.6,16,9.6,8).attr({markerWidth:\"4\",id:\"markerArrowOpen\"})},layout:function(){BaseTheme.prototype.layout.call(this),this.paper_.attr({width:this.diagram.width+\"px\",height:this.diagram.height+\"px\"})},textBBox:function(text,font){var t=this.createText(text,font),bb=t.getBBox();return t.remove(),bb},pushToStack:function(element){return this._stack.push(element),element},beginGroup:function(){this._stack=[]},finishGroup:function(){var g=this.paper_.group.apply(this.paper_,this._stack);return this.beginGroup(),g},createText:function(text,font){text=_.invoke(text.split(\"\\n\"),\"trim\");var t=this.paper_.text(0,0,text);return t.attr(font||{}),text.length>1&&t.selectAll(\"tspan:nth-child(n+2)\").attr({dy:\"1.2em\",x:0}),t},drawLine:function(x1,y1,x2,y2,linetype,arrowhead){var line=this.paper_.line(x1,y1,x2,y2).attr(LINE);return void 0!==linetype&&line.attr(\"strokeDasharray\",this.lineTypes_[linetype]),void 0!==arrowhead&&line.attr(\"markerEnd\",this.arrowMarkers_[arrowhead]),this.pushToStack(line)},drawRect:function(x,y,w,h){var rect=this.paper_.rect(x,y,w,h).attr(RECT);return this.pushToStack(rect)},drawText:function(x,y,text,font,align){var t=this.createText(text,font),bb=t.getBBox();return align==ALIGN_CENTER&&(x-=bb.width/2,y-=bb.height/2),t.attr({x:x-bb.x,y:y-bb.y}),t.selectAll(\"tspan\").attr({x:x}),this.pushToStack(t),t},drawTitle:function(){return this.beginGroup(),BaseTheme.prototype.drawTitle.call(this),this.finishGroup().addClass(\"title\")},drawActor:function(actor,offsetY,height){return this.beginGroup(),BaseTheme.prototype.drawActor.call(this,actor,offsetY,height),this.finishGroup().addClass(\"actor\")},drawSignal:function(signal,offsetY){return this.beginGroup(),BaseTheme.prototype.drawSignal.call(this,signal,offsetY),this.finishGroup().addClass(\"signal\")},drawSelfSignal:function(signal,offsetY){return this.beginGroup(),BaseTheme.prototype.drawSelfSignal.call(this,signal,offsetY),this.finishGroup().addClass(\"signal\")},drawNote:function(note,offsetY){return this.beginGroup(),BaseTheme.prototype.drawNote.call(this,note,offsetY),this.finishGroup().addClass(\"note\")}});var SnapHandTheme=function(diagram,options,resume){_.defaults(options,{\"css-class\":\"hand\",\"font-size\":16,\"font-family\":\"danielbd\"}),this.init(diagram,options,resume)};_.extend(SnapHandTheme.prototype,SnapTheme.prototype,{drawLine:function(x1,y1,x2,y2,linetype,arrowhead){var line=this.paper_.path(handLine(x1,y1,x2,y2)).attr(LINE);return void 0!==linetype&&line.attr(\"strokeDasharray\",this.lineTypes_[linetype]),void 0!==arrowhead&&line.attr(\"markerEnd\",this.arrowMarkers_[arrowhead]),this.pushToStack(line)},drawRect:function(x,y,w,h){var rect=this.paper_.path(handRect(x,y,w,h)).attr(RECT);return this.pushToStack(rect)}}),registerTheme(\"snapSimple\",SnapTheme),registerTheme(\"snapHand\",SnapHandTheme)}if(\"undefined\"!=typeof Raphael){var LINE={stroke:\"#000000\",\"stroke-width\":2,fill:\"none\"},RECT={stroke:\"#000000\",\"stroke-width\":2,fill:\"#fff\"};Raphael.fn.line=function(x1,y1,x2,y2){return assert(_.all([x1,x2,y1,y2],_.isFinite),\"x1,x2,y1,y2 must be numeric\"),this.path(\"M{0},{1} L{2},{3}\",x1,y1,x2,y2)};var RaphaelTheme=function(diagram,options,resume){this.init(diagram,_.defaults(options,{\"font-size\":16,\"font-family\":\"Andale Mono, monospace\"}),resume)};_.extend(RaphaelTheme.prototype,BaseTheme.prototype,{init:function(diagram,options,resume){BaseTheme.prototype.init.call(this,diagram),this.paper_=void 0,this.font_={\"font-size\":options[\"font-size\"],\"font-family\":options[\"font-family\"]};var a=this.arrowTypes_={};a[ARROWTYPE.FILLED]=\"block\",a[ARROWTYPE.OPEN]=\"open\";var l=this.lineTypes_={};l[LINETYPE.SOLID]=\"\",l[LINETYPE.DOTTED]=\"-\",resume(this)},setupPaper:function(container){this.paper_=new Raphael(container,320,200),this.paper_.setStart()},draw:function(container){BaseTheme.prototype.draw.call(this,container),this.paper_.setFinish()},layout:function(){BaseTheme.prototype.layout.call(this),this.paper_.setSize(this.diagram.width,this.diagram.height)},cleanText:function(text){return text=_.invoke(text.split(\"\\n\"),\"trim\"),text.join(\"\\n\")},textBBox:function(text,font){text=this.cleanText(text),font=font||{};var p;font.obj_?p=this.paper_.print(0,0,text,font.obj_,font[\"font-size\"]):(p=this.paper_.text(0,0,text),p.attr(font));var bb=p.getBBox();return p.remove(),bb},drawLine:function(x1,y1,x2,y2,linetype,arrowhead){var line=this.paper_.line(x1,y1,x2,y2).attr(LINE);return void 0!==arrowhead&&line.attr(\"arrow-end\",this.arrowTypes_[arrowhead]+\"-wide-long\"),void 0!==arrowhead&&line.attr(\"stroke-dasharray\",this.lineTypes_[linetype]),line},drawRect:function(x,y,w,h){return this.paper_.rect(x,y,w,h).attr(RECT)},drawText:function(x,y,text,font,align){text=this.cleanText(text),font=font||{},align=align||ALIGN_LEFT;var paper=this.paper_,bb=this.textBBox(text,font);align==ALIGN_CENTER&&(x-=bb.width/2,y-=bb.height/2);var t;return font.obj_?t=paper.print(x-bb.x,y-bb.y,text,font.obj_,font[\"font-size\"]):(t=paper.text(x-bb.x-bb.width/2,y-bb.y,text),t.attr(font),t.attr({\"text-anchor\":\"start\"})),t}});var RaphaelHandTheme=function(diagram,options,resume){this.init(diagram,_.defaults(options,{\"font-size\":16,\"font-family\":\"daniel\"}),resume)};_.extend(RaphaelHandTheme.prototype,RaphaelTheme.prototype,{setupPaper:function(container){RaphaelTheme.prototype.setupPaper.call(this,container),this.font_.obj_=this.paper_.getFont(\"daniel\")},drawLine:function(x1,y1,x2,y2,linetype,arrowhead){var line=this.paper_.path(handLine(x1,y1,x2,y2)).attr(LINE);return void 0!==arrowhead&&line.attr(\"arrow-end\",this.arrowTypes_[arrowhead]+\"-wide-long\"),void 0!==arrowhead&&line.attr(\"stroke-dasharray\",this.lineTypes_[linetype]),line},drawRect:function(x,y,w,h){return this.paper_.path(handRect(x,y,w,h)).attr(RECT)}}),registerTheme(\"raphaelSimple\",RaphaelTheme),registerTheme(\"raphaelHand\",RaphaelHandTheme)}if(\"undefined\"!=typeof Raphael&&Raphael.registerFont({w:209,face:{\"font-family\":\"Daniel\",\"font-weight\":700,\"font-stretch\":\"normal\",\"units-per-em\":\"360\",\"panose-1\":\"2 11 8 0 0 0 0 0 0 0\",ascent:\"288\",descent:\"-72\",\"x-height\":\"7\",bbox:\"-92.0373 -310.134 519 184.967\",\"underline-thickness\":\"3.51562\",\"underline-position\":\"-25.1367\",\"unicode-range\":\"U+0009-U+F002\"},glyphs:{\" \":{w:179},\"\\t\":{w:179},\"\\r\":{w:179},\"!\":{d:\"66,-306v9,3,18,11,19,24v-18,73,-20,111,-37,194v0,10,2,34,-12,34v-12,0,-18,-9,-18,-28v0,-85,23,-136,38,-214v1,-7,4,-10,10,-10xm25,-30v15,-1,28,34,5,35v-11,-1,-38,-36,-5,-35\",w:115},'\"':{d:\"91,-214v-32,3,-25,-40,-20,-68v3,-16,7,-25,12,-27v35,13,14,56,8,95xm8,-231v4,-31,1,-40,18,-75v37,7,11,51,11,79v-3,3,-4,8,-5,13v-17,4,-16,-10,-24,-17\",w:117},\"#\":{d:\"271,-64v-30,26,-96,-7,-102,51v-6,2,-13,2,-24,-2v-2,-11,10,-21,2,-28v-14,5,-48,0,-48,22v0,23,-11,14,-29,10v-7,-6,6,-19,-1,-24r-32,4v-19,-8,-15,-24,5,-28r33,-6v4,0,24,-23,11,-27v-26,0,-63,14,-74,-10v3,-1,9,-17,16,-10v15,-8,81,4,89,-30v8,-14,16,-34,24,-38v23,9,24,38,5,49v37,24,55,-38,72,-43v19,10,20,23,-1,45v2,8,23,1,29,4v3,3,6,6,10,11v-14,13,-20,12,-45,12v-17,0,-16,17,-19,29v18,-7,49,3,67,-2v4,0,8,4,12,11xm161,-104v-30,-1,-44,10,-44,37v14,1,24,0,40,-5v0,-1,3,-10,8,-26v0,-4,-1,-6,-4,-6\",w:285},$:{d:\"164,-257v29,4,1,42,-3,50v5,5,38,13,41,24v8,4,6,15,-2,21v-18,3,-36,-17,-49,-17v-17,1,-31,40,-28,48v5,4,8,8,9,10v13,1,35,37,28,44v-10,21,-36,20,-65,28v-10,10,-12,40,-17,51v-9,-3,-28,1,-18,-17v0,-13,5,-24,-1,-35v-18,1,-59,-10,-42,-29v21,0,56,16,55,-16v5,-4,9,-18,9,-26v-14,-15,-55,-41,-53,-65v2,-33,56,-19,98,-26v10,-14,31,-43,38,-45xm93,-152v11,-10,15,-15,14,-29v-17,-3,-37,1,-43,6v10,12,20,19,29,23xm111,-103v-8,1,-11,12,-10,22v10,0,28,2,27,-8v0,-4,-13,-15,-17,-14\",w:225},\"%\":{d:\"181,-96v24,-7,67,-13,104,1v14,18,21,19,22,44v-13,43,-99,61,-146,36v-9,-9,-22,-11,-32,-29v0,-27,24,-53,52,-52xm139,-185v-9,68,-138,73,-131,-5v0,-3,3,-9,9,-17v13,1,27,1,17,-16v5,-39,63,0,93,-6v36,1,80,-9,102,11v15,32,12,32,-8,56v-16,21,-103,78,-152,125r-14,28v-23,11,-25,-7,-29,-20v34,-71,133,-98,171,-162v-13,-12,-52,-5,-61,1v0,1,1,3,3,5xm38,-190v0,34,55,29,70,8v0,-14,-20,-11,-32,-14v-14,-3,-24,-9,-40,-10v1,0,5,11,2,16xm172,-53v12,27,90,18,102,-5v-18,-7,-32,-10,-40,-10v-29,3,-57,-4,-62,15\",\nw:308},\"&\":{d:\"145,-82v17,-8,47,-15,71,-26v13,2,25,12,9,23v-23,7,-40,16,-53,27r0,6v13,8,30,21,36,38v0,8,-4,12,-11,12v-19,0,-43,-39,-59,-44v-30,12,-65,29,-97,32v-32,3,-45,-41,-23,-63v21,-20,52,-26,70,-48v-4,-31,-12,-47,9,-73v13,-16,20,-29,23,-39v15,-15,32,-22,51,-22v30,9,62,64,32,96v-2,3,-47,42,-69,48v-15,8,-11,9,0,22v6,7,10,11,11,11xm114,-138v25,-13,62,-38,74,-62v0,-9,-10,-31,-20,-29v-28,7,-60,42,-60,75v0,10,2,15,6,16xm99,-91v-18,10,-54,18,-59,45v26,5,61,-12,77,-22v-1,-5,-13,-23,-18,-23\",w:253},\"'\":{d:\"36,-182v-36,7,-34,-61,-17,-80v15,1,21,19,21,20r-1,-1v0,0,-1,12,-5,35v1,5,3,17,2,26\",w:63},\"(\":{d:\"130,-306v13,2,23,43,-1,43v-49,43,-77,77,-90,148v5,49,27,67,64,101v4,14,5,6,2,19r-15,0v-35,-17,-79,-58,-79,-120v0,-58,66,-176,119,-191\",w:120},\")\":{d:\"108,-138v-2,73,-48,120,-98,153v-17,-5,-16,-20,-6,-31v52,-64,73,-62,74,-135v1,-42,-40,-98,-58,-128v0,-5,-1,-12,-2,-22v18,-18,25,0,42,27v25,39,50,66,48,136\",w:120},\"*\":{d:\"121,-271v15,-5,36,-8,40,9v-5,10,-31,19,-47,31v0,11,34,43,14,53v-18,8,-24,-24,-34,-20v-4,10,-4,19,-12,41v-25,7,-15,-30,-17,-47v-13,-1,-17,9,-46,30r-10,0v-20,-32,37,-43,54,-64v-10,-11,-36,-33,-16,-51v3,0,14,8,33,24v8,-10,26,-39,32,-42v14,7,15,23,9,36\",w:177},\"+\":{d:\"163,-64v-7,22,-65,2,-77,21v-2,10,-6,21,-11,35v-20,4,-21,-12,-19,-29v3,-23,-44,6,-39,-27v-8,-22,36,-8,49,-18v8,-13,6,-36,24,-40v19,-4,14,32,11,39v18,3,19,2,54,8v2,1,5,5,8,11\",w:170},\",\":{d:\"25,63v-26,21,-48,-2,-22,-24v14,-12,35,-40,35,-69v3,-2,3,-11,12,-9v35,17,5,88,-25,102\",w:97},\"-\":{d:\"57,-94v19,4,55,-5,54,17v-15,23,-54,20,-91,15v-4,2,-13,-10,-11,-16v-1,-22,28,-15,48,-16\",w:124},\".\":{d:\"40,-48v21,20,21,44,-4,44v-33,0,-26,-24,-10,-44r14,0\",w:67},\"/\":{d:\"21,20v-22,-45,21,-95,41,-126v38,-57,115,-158,193,-201v2,0,4,3,7,11v11,29,-15,34,-25,55v-81,56,-189,208,-197,261r-19,0\",w:275},0:{d:\"78,-237v70,-47,269,-41,270,59v0,34,-11,53,-29,76v-13,35,-30,32,-85,64v-6,2,-10,6,-7,8v-73,14,-98,38,-173,1v-7,-13,-52,-48,-46,-88v9,-57,27,-75,70,-120xm123,-38v100,0,202,-46,195,-153v-32,-55,-144,-73,-211,-35v-16,34,-68,54,-53,108v6,25,1,22,-3,39v6,24,41,41,72,41\",w:353},1:{d:\"39,-208v0,-14,6,-59,29,-39v3,4,6,13,10,24r-22,128r8,87v-4,6,-9,3,-16,2v-44,-38,-9,-137,-9,-202\",w:93},2:{d:\"88,-35v47,-10,119,-24,168,-9v0,12,-23,13,-35,16v1,1,3,1,5,1v-74,8,-118,23,-194,23v-14,0,-20,-13,-21,-28v55,-40,83,-61,123,-104v26,-13,65,-67,71,-102v-1,-9,-11,-16,-22,-16v-20,-1,-120,29,-156,49v-10,-2,-30,-20,-10,-28v50,-21,111,-51,178,-48v25,10,44,22,36,39v12,30,-19,64,-34,83v-39,48,-37,39,-115,109v0,5,-3,8,-8,11v4,3,8,4,14,4\",w:265},3:{d:\"188,-282v34,-10,74,25,47,51v-19,32,-55,50,-92,70v28,14,116,25,108,70v8,14,-49,40,-63,48v-29,9,-130,22,-168,42v-6,-5,-19,-7,-12,-22v56,-36,175,-21,210,-76v-9,-20,-88,-42,-97,-33v-20,-1,-41,2,-56,-7r5,-21v56,-25,103,-36,137,-78v1,-1,2,-5,4,-11v-15,-14,-56,7,-79,0v-10,9,-73,22,-92,31v-11,-4,-28,-23,-13,-30v50,-22,96,-26,154,-37v0,-1,8,3,7,3\",w:260},4:{d:\"79,-249v-7,17,-29,75,-33,96v0,6,3,8,8,8v43,-2,111,6,141,-6v17,-47,20,-100,63,-148v9,4,16,7,21,10v-17,31,-44,95,-51,141v7,4,24,-4,23,10v-1,16,-29,12,-31,23v-10,22,-9,69,-7,103v-3,2,-7,5,-10,9v-47,-11,-23,-74,-16,-114v0,-4,-2,-6,-7,-6v-65,2,-89,13,-162,4v-22,-22,-2,-53,5,-76v16,-15,17,-57,35,-70v6,-1,21,11,21,16\",w:267},5:{d:\"185,-272v30,7,45,-8,53,18v1,16,-17,18,-34,14v0,0,-95,-11,-129,1v-6,9,-24,33,-29,54v76,10,171,5,214,47v11,11,22,30,5,52v-14,12,-30,14,-34,27v-26,11,-141,63,-157,60v-16,-2,-25,-19,-4,-27v48,-18,128,-39,170,-86v4,-14,-65,-41,-85,-41r-92,0v-10,-4,-66,-1,-57,-23v0,-23,23,-51,35,-83v11,-28,133,-10,144,-13\",w:284},6:{d:\"70,-64v9,-51,63,-74,123,-71v43,2,109,3,111,41r-25,47v0,1,1,2,2,3v-5,0,-39,10,-41,20v-15,3,-22,4,-22,11v-39,1,-77,20,-119,13v-42,-7,-35,-9,-77,-46v-56,-118,94,-201,176,-229v7,0,21,8,20,15v-2,17,-23,15,-43,24v-69,31,-119,72,-134,145v-5,25,36,68,78,64v59,-6,128,-18,153,-61v-7,-14,-13,-9,-32,-21v-67,-15,-118,-5,-150,43r0,12v-13,4,-17,-3,-20,-10\",w:310},7:{d:\"37,-228v33,-14,173,-17,181,-19v28,-1,24,31,9,45v-17,15,-45,49,-59,69v-17,26,-55,67,-61,113v-10,13,-9,14,-14,20v-33,-13,-20,-25,-11,-53v16,-48,73,-115,109,-156v2,-7,5,-14,-10,-12v-26,4,-54,6,-76,13v-23,-5,-83,31,-94,-9v2,-8,18,-19,26,-11\",w:245},8:{d:\"57,-236v40,-50,166,-51,213,-10v22,28,10,63,-22,78r-35,17v8,5,54,24,53,44v-5,14,-4,33,-18,42v-13,13,-35,18,-44,34v-60,27,-190,49,-194,-42v7,-41,17,-54,59,-70r0,-4v-32,-9,-73,-62,-26,-85v4,0,8,-2,14,-4xm142,-160v24,-2,160,-31,99,-72v-28,-18,-108,-33,-146,-5v-16,12,-28,30,-33,59v24,12,37,20,80,18xm41,-62v30,65,189,6,199,-37v3,-14,-60,-30,-74,-30v-70,0,-118,10,-125,67\",w:290},9:{d:\"11,-192v15,-49,119,-61,161,-23v16,15,27,55,11,79v-20,62,-51,79,-96,118v-10,4,-45,27,-50,6v9,-15,66,-52,98,-99v-7,-7,-8,-3,-25,0v-49,-11,-96,-25,-99,-81xm145,-131v7,-5,13,-34,13,-41v-2,-51,-104,-38,-114,-6v-2,10,37,35,46,35v23,1,43,-1,55,12\",w:198},\":\":{d:\"39,-125v15,-8,40,-1,40,15v0,15,-6,22,-19,22v-13,0,-29,-21,-21,-37xm66,-17v-8,27,-51,19,-46,-8v-1,-6,8,-22,14,-20v29,0,30,6,32,28\",w:95},\";\":{d:\"56,-93v2,-30,37,-22,40,2v0,2,-1,7,-3,15v-13,8,-15,6,-27,4xm64,-44v11,-11,30,-4,32,14v-21,39,-63,71,-92,85v-5,0,-11,-2,-18,-8v11,-23,36,-36,50,-61v11,-7,19,-20,28,-30\",w:107},\"<\":{d:\"166,-202v12,0,29,15,24,29v0,4,-119,64,-120,73v15,21,89,64,91,86v2,29,-18,12,-30,15v-27,-29,-59,-54,-95,-75v-18,-10,-25,-13,-24,-41\",w:176},\"=\":{d:\"125,-121v18,7,55,-9,69,14v0,17,-45,26,-135,26v-18,0,-27,-7,-27,-21v-1,-37,60,-5,93,-19xm138,-71v20,0,48,-1,50,16v-13,24,-86,32,-131,29v-29,-2,-43,-10,-43,-24v-7,-23,36,-14,39,-17v27,6,57,-4,85,-4\",w:196},\">\":{d:\"4,-14v20,-48,77,-59,118,-94v-16,-19,-58,-52,-81,-75v-11,-7,-15,-38,-1,-40v33,16,83,71,121,105v26,23,-6,35,-41,53v-29,16,-56,28,-73,54v-21,15,-16,20,-34,15v-3,0,-9,-16,-9,-18\",w:174},\"?\":{d:\"105,-291v57,-13,107,-4,107,39v0,67,-136,85,-155,137v-1,6,10,23,-4,23v-23,1,-33,-35,-23,-57v31,-41,124,-60,149,-103v-8,-21,-72,-5,-88,-1v-23,6,-59,39,-71,8v0,0,-1,0,1,-17v10,-4,45,-20,84,-29xm80,-25v-6,4,-8,39,-24,22v-24,3,-22,-21,-13,-35v17,-7,29,5,37,13\",w:216},\"@\":{d:\"218,-207v23,8,42,14,47,37v44,68,-27,137,-87,85r1,0v0,2,-59,19,-61,17v-35,0,-42,-47,-17,-68r0,-4v-19,-1,-45,37,-49,40v-37,76,58,72,121,62v11,-2,34,-13,36,3v-14,31,-69,31,-114,33v-51,2,-99,-41,-80,-92v2,-30,22,-40,42,-63v35,-20,91,-53,161,-50xm217,-101v23,0,35,-19,35,-41v0,-43,-75,-41,-102,-19v36,3,55,16,62,41v-6,5,-6,19,5,19xm127,-110v8,5,51,-15,28,-16v-4,0,-25,4,-28,16\",w:291},A:{d:\"97,-81v-23,-10,-39,38,-52,60v-8,6,-8,6,-22,18v-22,-7,-23,-37,-4,-49v7,-8,11,-15,15,-23r-1,1v-14,-26,23,-29,31,-40v1,-1,15,-29,26,-36v17,-31,39,-58,54,-92v16,-20,20,-51,41,-66v29,5,34,62,45,92v9,64,21,103,49,155v-3,25,-44,11,-54,0v-34,-12,-97,-29,-128,-20xm107,-118v20,6,80,10,111,17v6,-7,-4,-15,-7,-24v-11,-28,-9,-92,-30,-117v-9,9,-19,44,-34,55v-9,23,-27,40,-40,69\",w:294},B:{d:\"256,-179v41,10,115,34,91,91v-6,3,-14,12,-19,20v-37,19,-50,34,-63,25v-9,10,-12,11,-34,13r3,-3v-4,-4,-12,-4,-18,0v0,0,2,2,5,4v-21,14,-26,6,-44,15v-4,0,-7,-2,-8,-5v-6,11,-20,-5,-18,11v-36,4,-91,35,-114,4v-7,-62,-10,-138,4,-199v-1,-19,-37,2,-37,-27v0,-8,2,-13,6,-15v68,-31,231,-92,311,-39v8,12,12,20,12,25v-8,42,-32,49,-77,80xm79,-160v72,-17,135,-39,184,-70v20,-13,31,-23,31,-27v1,-6,-30,-13,-38,-12v-54,0,-116,13,-186,41v11,21,1,48,9,68xm262,-43v0,-4,3,-6,-4,-5v0,1,1,2,4,5xm211,-140v-34,7,-94,24,-139,15v-6,20,-4,56,-4,82v0,29,43,1,56,2v48,-11,108,-25,154,-48v20,-10,32,-17,32,-25v0,-18,-33,-26,-99,-26xm195,-20v6,1,6,-2,5,-7v-3,2,-7,2,-5,7\",w:364},C:{d:\"51,-114v-12,75,96,76,166,71r145,-10v9,2,9,5,9,18v-37,18,-85,28,-109,22v-18,10,-47,10,-71,10v-29,0,-68,1,-105,-11v-6,-1,-10,-3,-10,-8v-33,-13,-48,-33,-66,-59v-19,-114,146,-150,224,-177v35,0,88,-31,99,7v-1,29,-49,14,-76,28v-55,8,-115,35,-175,71v-13,8,-23,21,-31,38\",w:376},D:{d:\"312,-78v-2,1,-3,7,-10,5v6,-3,10,-4,10,-5xm4,-252v2,-27,83,-38,106,-39v130,-7,267,1,291,109v0,0,-2,8,-3,25v-5,9,-4,28,-23,34v-4,4,-2,5,-7,0v-3,3,-15,7,-5,10v0,0,-10,14,-13,2v-11,1,-8,5,-20,14v1,2,7,3,9,1v-4,13,-22,13,-11,4v0,-3,1,-6,-3,-5v-40,29,-103,38,-141,65v10,6,22,-7,34,-3v-41,20,-127,44,-171,46v-21,1,-47,-33,-11,-39v15,-2,43,-6,56,-11v-16,-101,-5,-130,9,-207v2,0,4,-1,6,-3v-16,-17,-91,38,-103,-3xm297,-69v-7,3,-17,8,-25,7v1,1,3,2,5,2v-4,2,-11,5,-23,9v4,-11,30,-21,43,-18xm240,-51v10,0,12,2,0,6r0,-6xm220,-36v-1,-3,4,-6,6,-3v0,1,-2,1,-6,3xm125,-48v16,6,137,-46,155,-53v29,-18,101,-44,82,-93v-21,-53,-84,-61,-168,-67v-20,7,-50,3,-77,8v33,54,-12,132,8,205xm159,-22v-4,-1,-15,-5,-15,2v7,-1,12,-2,15,-2\",w:381},E:{d:\"45,-219v-19,-36,34,-41,63,-36v44,-10,133,-8,194,-15v3,2,38,11,52,15v-73,19,-171,21,-246,38v-9,11,-16,32,-20,61v35,11,133,-6,183,3v1,6,2,7,3,14v-46,24,-118,16,-193,27v-15,13,-22,52,-22,66v60,1,121,-20,188,-20v22,10,53,-7,74,5v16,29,-23,26,-43,32v-73,4,-139,13,-216,27r-52,-10v-4,-22,23,-69,26,-98v-3,0,-10,-15,-12,-24v20,-12,34,-23,35,-67v2,-1,5,-5,5,-7v0,-4,-14,-11,-19,-11\",w:353},F:{d:\"270,-258v13,2,59,6,48,34v-78,-3,-143,1,-212,22v-10,16,-21,43,-24,69r145,-9v8,3,29,-3,16,21v-14,-1,-59,13,-60,7v-12,13,-67,18,-108,21v-2,1,-4,3,-7,6v-2,23,-8,43,-7,69v1,28,-30,11,-40,5r10,-80r-26,-14v5,-10,10,-33,28,-25v21,-3,15,-46,26,-59v-1,-3,-32,-13,-28,-24v2,-22,45,-16,59,-30v47,4,99,-14,151,-9v5,-3,25,-3,29,-4\",w:236},G:{d:\"311,-168v53,0,94,57,74,110v-31,37,-71,34,-136,52v-13,-7,-41,10,-57,7v-73,-1,-122,-17,-162,-59v-49,-51,-24,-80,5,-130v35,-61,138,-93,214,-106v16,4,42,-1,40,21v-5,40,-39,2,-73,21v-76,19,-162,65,-177,142v28,103,237,76,312,29v2,-3,3,-7,3,-13v-10,-35,-37,-43,-87,-45v-16,-13,-53,-9,-78,1v-4,-3,-5,-7,-5,-11v17,-29,73,-17,108,-24v12,4,18,5,19,5\",w:391},H:{d:\"300,-268v18,12,19,32,4,51v-35,44,-34,140,-46,217v-1,5,-5,13,-11,12v-6,1,-19,-14,-18,-27r7,-106v-28,7,-76,22,-116,14v-18,2,-36,6,-55,3v-43,-8,-14,53,-33,75v-29,1,-26,-67,-21,-97v5,-31,28,-73,43,-98v2,2,7,3,14,3v13,33,-11,48,-13,78v61,4,118,2,176,2v8,0,13,-6,15,-20v4,-47,21,-87,54,-107\",w:288},I:{d:\"63,-266v34,10,-4,105,-8,128r-24,126v-2,2,-3,1,-9,6v-12,-10,-12,-15,-12,-47v0,-93,9,-156,28,-188v10,-17,19,-25,25,-25\",w:79},J:{d:\"235,-291v26,11,31,104,31,142v0,37,-2,95,-32,126v-33,34,-121,26,-167,1v-18,-11,-54,-29,-59,-59v0,-3,5,-15,16,-14v31,36,90,57,162,51v63,-30,56,-148,32,-226v-1,-16,11,-13,17,-21\",w:282},K:{d:\"212,-219v17,-5,80,-60,80,-19v0,9,-2,14,-5,16r-132,78v-34,23,-54,32,-21,50v39,21,74,23,124,41v5,2,7,5,7,9v-4,24,-55,15,-79,8v-67,-19,-98,-36,-116,-83v9,-24,38,-35,66,-61v7,-4,49,-30,76,-39xm47,-194v11,-20,11,-45,31,-55v2,2,4,3,6,0v29,39,-21,96,-18,128v-17,24,-15,62,-29,113v-4,3,-10,7,-19,11v-12,-13,-10,-28,-8,-53v3,-31,17,-79,37,-144\",w:270},L:{d:\"84,-43v58,0,179,-27,242,-4v3,17,-29,24,-40,26v-85,-4,-202,46,-268,3v-24,-16,-2,-33,-4,-57v26,-76,38,-108,86,-191v14,-7,26,-50,45,-32v6,22,5,31,-12,46v-20,39,-50,82,-67,142v-7,6,-19,46,-19,54v0,9,12,13,37,13\",w:331},M:{d:\"174,-236v-1,52,-11,92,-7,143v10,5,15,-12,22,-18v42,-55,90,-130,136,-174r15,-18v42,2,32,53,11,80v-12,58,-54,143,-34,210v0,3,-3,12,-9,10v-31,-5,-32,-57,-27,-92v4,-27,12,-58,25,-93v-5,-10,5,-19,6,-30v-46,44,-66,110,-129,172v-11,10,-18,15,-22,15v-34,6,-28,-103,-28,-152v-28,22,-65,119,-96,170v-9,15,-34,3,-31,-19v30,-64,91,-177,139,-229v12,-1,29,13,29,25\",w:343},N:{d:\"248,-20v-3,17,-37,18,-43,3v-24,-35,-53,-145,-80,-203v-32,40,-55,120,-92,174v-13,3,-26,-13,-27,-22r87,-171v4,-13,20,-57,42,-32v42,48,46,139,82,198v29,-45,46,-88,65,-153v12,-19,23,-42,38,-60v27,-1,14,18,4,44v-6,46,-32,68,-37,121v-15,29,-33,69,-39,101\",w:307},O:{d:\"240,-268v85,1,163,29,150,125v13,7,-12,18,-5,26v-23,63,-133,112,-228,124v-80,-16,-171,-56,-148,-153v11,-47,20,-43,53,-83v17,-9,39,-22,73,-29v45,-10,81,-10,105,-10xm363,-156v16,-51,-62,-85,-111,-79v-25,-11,-50,8,-81,0v-15,10,-70,16,-85,31v6,20,-27,24,-39,45v-42,75,40,128,115,128v56,0,209,-71,201,-125\",w:383},P:{d:\"70,-225v-7,-12,-36,16,-49,19v-4,0,-9,-5,-14,-17v21,-47,114,-55,172,-59v41,-3,132,33,99,87v-21,34,-72,59,-144,80v-2,16,-79,3,-74,46v3,25,-5,47,-10,68v-22,-1,-23,-29,-22,-56v2,-25,-20,-32,-8,-50v21,-5,10,-35,25,-57v6,-28,14,-48,25,-61xm71,-229v47,14,-2,50,-1,99v41,-3,113,-37,173,-76v5,-9,8,-14,8,-15v-28,-47,-125,-29,-180,-8\",w:252},Q:{d:\"374,-217v20,59,-11,127,-48,156r30,38v-1,6,-8,16,-14,9v-3,0,-19,-9,-47,-26v-72,35,-173,75,-236,12v-70,-40,-67,-213,26,-217r8,5v24,-20,72,-48,112,-38v21,-4,22,-1,50,-2v66,-2,94,20,119,63xm296,-88v13,5,61,-49,63,-84v4,-62,-54,-78,-119,-76v-14,-6,-49,5,-71,3v-42,16,-89,41,-93,94v-9,11,1,25,-7,38v-12,-19,-7,-67,-1,-88v-56,30,-37,137,19,155v27,17,92,19,119,0v12,-2,29,-9,52,-20v2,-2,3,-3,3,-6v-11,-12,-46,-27,-54,-56v0,-13,3,-19,9,-19v18,1,60,52,80,59\",w:379},R:{d:\"100,-275v96,-23,196,-10,208,78v-3,18,-17,52,-49,62v-14,20,-54,23,-79,40v-2,0,-14,2,-36,6v-40,8,-30,14,-3,33v37,27,52,30,118,55v16,6,31,23,12,27v-58,-2,-104,-29,-143,-61v-14,-3,-16,-15,-39,-27v-23,-19,-28,-12,-15,-38v63,-19,111,-15,163,-53v27,-20,43,-36,43,-49v0,-64,-120,-62,-173,-38v-9,4,-38,9,-40,18v-10,32,-16,70,-13,116v-10,21,-8,47,-6,75v2,31,-9,29,-27,22v-9,-55,5,-140,15,-190v-8,-6,-24,10,-24,-11v0,-34,16,-34,42,-55v2,-1,17,-4,46,-10\",w:297},S:{d:\"13,-3v-7,-3,-22,-18,-5,-22v68,-15,119,-32,154,-45v51,-19,39,-34,3,-53v-46,-25,-82,-30,-121,-64v-33,-29,-50,-35,-25,-58v37,-20,119,-29,181,-29v29,0,44,6,44,18v-9,26,-62,6,-104,14v-17,2,-72,6,-92,16v37,53,132,58,180,111v8,9,11,20,11,30v-4,17,-23,35,-42,34v-21,16,-17,1,-49,17v-14,7,-41,9,-56,20v-25,-3,-49,10,-79,11\",w:234},T:{d:\"141,-3v-36,-6,1,-49,-3,-79v10,-19,6,-35,15,-64r26,-85v-51,-9,-100,10,-141,14v-16,2,-30,-26,-11,-32v26,-8,143,-8,179,-19r12,6v67,-2,142,-1,200,-1v8,0,14,3,19,10v-18,16,-74,3,-103,14v-48,-4,-60,4,-113,7v-42,22,-36,130,-58,187v1,12,-9,44,-22,42\",w:277},U:{d:\"365,-262v13,56,-22,104,-36,141v-19,22,-30,38,-57,56v-4,18,-60,35,-78,50v-53,28,-142,0,-161,-34v-31,-56,-37,-108,-11,-164v17,-33,29,-50,48,-29v-2,2,-3,7,-4,13v-44,36,-38,149,7,174v30,26,55,19,102,4v56,-17,66,-34,120,-76v12,-24,56,-68,46,-122r0,-16v0,1,-1,3,-1,6v4,-13,11,-10,25,-3\",w:368},V:{d:\"246,-258v21,-22,31,-26,44,-8v1,1,-12,22,-28,35v-15,25,-41,38,-56,69v-13,15,-20,31,-28,57v-15,13,-11,29,-27,72v3,21,-5,24,-27,27v-33,-45,-54,-118,-84,-167v-5,-26,-18,-50,-25,-76v-3,-12,24,-8,29,-5v8,13,18,52,26,70r52,115v9,-2,4,-9,10,-21r25,-47v25,-44,46,-76,89,-121\",w:234},W:{d:\"31,-213v16,46,17,106,41,151v31,-35,49,-89,76,-127v30,-15,39,27,52,56v10,22,21,48,35,67v2,0,4,-1,5,-3v16,-28,50,-76,79,-121v14,-21,40,-63,64,-83r5,8v-30,58,-76,110,-97,173v-18,28,-25,37,-33,63v-11,1,-16,25,-30,15v-21,-31,-44,-89,-62,-131v0,-2,-1,-3,-5,-5v-17,11,-16,36,-31,50v-20,33,-20,84,-68,94v-24,-19,-23,-81,-39,-111v-1,-15,-29,-94,-10,-108v9,2,12,5,18,12\",w:331},X:{d:\"143,-183v43,-25,69,-36,126,-62v22,-10,86,-10,56,21v-51,3,-158,61,-154,64v10,15,41,30,50,52v27,17,46,60,70,82v9,14,-6,30,-24,20v-35,-43,-75,-100,-116,-132v-48,13,-100,47,-118,94v-1,49,-26,34,-27,4v-1,-26,13,-27,17,-48v22,-27,68,-55,90,-77v-9,-12,-60,-39,-79,-57v-6,-10,-6,-25,12,-25\",w:312},Y:{d:\"216,-240v19,-14,42,10,22,26v-54,66,-121,109,-156,197v-8,21,-11,15,-30,4v3,-37,27,-61,33,-76v12,-12,15,-19,32,-42v-8,-6,-40,5,-45,5v-48,-6,-69,-65,-56,-113v14,0,13,-1,24,7v2,33,12,75,42,73v36,-2,102,-57,134,-81\",w:189},Z:{d:\"60,-255v66,12,200,-34,240,21v-13,42,-63,62,-98,89v-19,15,-47,33,-82,55v-25,16,-47,32,-66,47v58,24,129,-6,208,-6v23,0,36,12,13,19v-33,2,-53,5,-86,10v-32,18,-88,15,-135,15v-9,-1,-55,-1,-48,-29v1,-24,30,-24,40,-41v64,-50,151,-86,208,-147v-38,-17,-155,12,-198,-4v0,0,-11,-33,4,-29\",w:310},\"[\":{d:\"72,-258r-15,250v30,4,55,-3,80,-6v7,-1,8,17,9,23v-28,15,-73,23,-121,21v-7,0,-10,-6,-10,-17v0,-60,25,-193,22,-288v0,-16,13,-20,33,-19v9,-3,34,-12,51,-12v16,0,15,16,19,29v-16,7,-48,10,-68,19\",w:151},\"\\\\\":{d:\"236,38v20,-18,-8,-74,-13,-90v-44,-78,-112,-190,-200,-253v-2,0,-5,4,-7,12v-11,31,13,36,24,58v74,61,174,219,180,273r16,0\",w:257},\"]\":{d:\"133,-258v-23,-13,-84,6,-85,-32v0,-10,5,-15,14,-15v0,0,30,2,90,7v10,1,15,13,15,36v2,7,-8,59,-13,112r-11,125v-9,48,9,90,-59,71v-20,-4,-39,-1,-59,-4v-5,-10,-25,-12,-14,-30v8,-3,61,-13,78,-8v14,1,8,-7,10,-17v15,-69,21,-166,34,-245\",w:171},\"^\":{d:\"68,-306v20,15,47,36,58,60v-1,4,0,7,-9,7v-26,0,-47,-38,-49,-32v-15,9,-41,50,-54,30v-2,-31,17,-23,33,-51v8,-9,15,-14,21,-14\",w:135},_:{d:\"11,15v-8,33,18,45,50,34r205,2r197,-5v11,-5,14,-9,7,-28v-95,-21,-258,-10,-376,-10v-25,0,-72,-3,-83,7\",w:485},\"`\":{d:\"75,-264v16,8,56,14,39,43v-30,-8,-65,-23,-105,-44v-1,-3,-3,-28,5,-25v16,5,44,17,61,26\",w:129},a:{d:\"124,-56v10,4,59,41,65,50v1,7,-6,17,-12,17r-60,-30v-22,2,-42,21,-65,19v-33,4,-68,-67,-15,-81v41,-27,96,-39,110,9v0,6,-4,12,-11,16v-33,-25,-67,-5,-88,12v10,16,61,-18,76,-12\",w:196},b:{d:\"80,-140v69,1,123,0,134,52v5,26,-71,71,-97,70v-11,11,-88,22,-94,22v-11,-3,-26,-18,-6,-24v19,-5,-2,-19,-1,-35v1,-18,11,-36,-5,-47v-6,-17,-6,-21,14,-32v6,-45,18,-89,28,-124v2,-7,8,-12,17,-15v5,3,10,11,16,28v-12,27,-13,63,-23,96v0,6,6,9,17,9xm87,-107v-40,-9,-31,31,-39,54v8,15,0,25,12,22v30,-8,60,-18,88,-32v39,-18,49,-33,-1,-42v-20,-4,-45,-7,-60,-2\",w:217},c:{d:\"128,-123v29,-7,37,29,12,33v-27,-4,-40,6,-79,25v-8,4,-13,11,-16,22v30,32,91,3,134,11v5,13,-8,26,-22,19v-51,25,-139,28,-150,-30v6,-50,69,-82,121,-80\",w:194},d:{d:\"224,-201v0,-35,-17,-111,24,-94v7,86,-2,119,0,197v-4,2,-8,21,-18,16v-62,-7,-154,-8,-185,29v6,17,28,26,51,26v16,0,100,-15,132,-18v7,5,-6,20,-10,22v-24,8,-122,42,-163,25v-32,-5,-62,-53,-36,-80v35,-37,118,-46,198,-43v1,-22,7,-49,7,-80\",w:265},e:{d:\"4,-57v0,-58,51,-71,110,-74v33,-1,45,16,59,35v1,14,2,39,-7,42v-24,-2,-73,13,-99,11v-2,2,-2,3,-2,3v0,3,12,8,37,15v21,0,69,9,31,22v-9,14,-34,6,-56,6v-27,-5,-73,-28,-73,-60xm123,-102v-22,2,-68,5,-65,26v24,-2,66,5,79,-6v-5,-13,-1,-13,-14,-20\",w:182},f:{d:\"6,-59v6,-29,53,-4,53,-43v0,-64,29,-118,84,-150v45,-25,167,-24,155,51v-1,2,-7,6,0,6r-10,2v-45,-58,-165,-39,-186,39v-7,26,-11,42,-9,62v44,8,95,-21,135,-7v-12,25,-39,21,-76,30v-19,5,-18,7,-54,19v-2,8,15,32,17,35v-6,25,-26,26,-40,-5r-15,-24v-41,10,-44,12,-54,-15\",w:234},g:{d:\"132,-97v30,27,21,75,30,117v-12,31,-11,66,-36,103v-32,46,-105,83,-167,39v-31,-21,-49,-29,-51,-75v-2,-37,77,-50,121,-57v37,-6,68,-10,95,-11v7,-6,3,-32,4,-46v0,0,-1,1,-1,2v0,-18,-5,-31,-14,-45v-44,5,-79,20,-94,-18v3,-54,73,-54,125,-50v12,7,12,13,4,25v-30,-11,-76,8,-90,20v23,3,50,-16,74,-4xm-34,121v60,53,168,1,159,-86v-47,-7,-93,24,-142,30v-12,7,-45,19,-42,29v0,10,8,19,25,27\",w:188},h:{d:\"100,-310v11,-2,10,19,11,20v-11,52,-40,133,-53,189v-6,30,-9,37,-9,47v27,0,113,-34,143,-34v42,0,31,47,39,79v0,4,-5,17,-16,16v4,2,11,3,4,6v-24,-1,-28,-34,-25,-64v-1,-1,-2,-3,-5,-5v-51,0,-110,38,-162,51v-9,1,-15,-15,-16,-23v17,-89,39,-141,71,-264v0,-9,6,-19,18,-18\",w:251},i:{d:\"62,-209v7,18,9,23,-5,38v-23,-6,-21,-18,-11,-36v2,0,8,-1,16,-2xm34,-7v-18,-21,-8,-73,-1,-106v7,-10,20,-8,23,6v-1,36,7,72,-2,104v-8,2,-8,0,-20,-4\",w:80},j:{d:\"88,-191v5,28,-18,40,-28,21v0,-20,12,-29,28,-21xm82,-99v28,-1,16,35,16,61v0,60,-19,150,-35,202v-12,8,-19,31,-35,16v-32,-7,-43,-19,-56,-44r2,-17v11,4,49,45,61,18v10,-55,27,-107,30,-171v0,-16,0,-59,17,-65\",w:120},k:{d:\"59,-66v33,26,114,37,155,62v8,-4,22,-2,19,-17v0,-4,-12,-11,-30,-24v-36,-25,-54,-22,-99,-33v14,-21,119,-13,103,-63r-16,-7r-123,47r25,-93v-3,-15,16,-49,18,-81v1,-15,-21,-14,-25,-3v-31,82,-49,168,-75,257v2,2,22,30,27,10v2,-5,4,-9,9,-11v4,-16,4,-15,12,-44\",w:236},l:{d:\"66,-300v21,-6,37,23,30,55v-10,51,-28,135,-28,208v0,11,6,36,-13,37v-29,-5,-30,-48,-25,-83r28,-177v-6,-17,1,-29,8,-40\",w:102},m:{d:\"348,-59v-2,21,0,57,3,73v-17,3,-30,-1,-32,-16v-8,-7,-5,-44,-13,-70v-35,3,-82,49,-111,70v-12,8,-40,4,-39,-15r2,-56v-1,-13,4,-28,-8,-29v-35,8,-79,72,-115,87v-6,2,-20,-18,-21,-22v1,-20,14,-105,39,-64r8,15v17,-14,72,-56,93,-54v27,3,49,40,43,80v24,-2,66,-55,124,-53v11,14,28,23,27,54\",w:368},n:{d:\"121,-136v37,6,62,54,62,111v0,32,-16,25,-31,17v-18,-30,-5,-45,-22,-85v-37,-13,-71,55,-92,65v-20,-3,-39,-39,-21,-62v2,-12,3,-15,11,-30v12,-8,20,11,29,12\",w:194},o:{d:\"108,-139v52,-24,104,18,104,63v0,59,-66,67,-114,83v-52,-2,-115,-50,-80,-105v23,-18,52,-35,90,-41xm45,-60v16,54,125,16,131,-23v-12,-59,-129,-8,-131,23\",w:217},p:{d:\"82,14v-10,12,-8,117,-24,142v-15,2,-19,0,-29,-13v0,-76,9,-113,22,-192v14,-27,35,-6,37,13v0,8,-3,21,-7,38v2,2,3,2,4,2v26,-9,116,-33,126,-72v-7,-17,-24,-33,-49,-31v-40,3,-116,13,-116,47v-5,7,-2,17,-16,20v-17,-12,-18,-20,-12,-38v8,-25,74,-61,110,-59v55,-15,113,15,118,70v-15,52,-84,79,-146,83v-5,0,-11,-4,-18,-10\",w:251},q:{d:\"144,-147v27,-8,89,-3,97,31v-9,29,-42,-4,-73,1v-32,6,-118,20,-111,49v0,7,13,13,21,13v21,0,78,-24,104,-34v2,0,9,8,22,21v1,1,1,2,1,5v-27,90,-22,70,-43,203v11,15,-15,54,-33,33v-6,-8,-10,-20,-3,-28v1,-72,5,-114,15,-172v-35,3,-35,10,-59,8v-41,-4,-98,-41,-56,-85v33,-34,59,-27,118,-45\",w:248},r:{d:\"242,-117v2,22,5,10,-14,23v-73,-7,-166,-23,-174,56v-8,6,-3,20,-8,36v-29,10,-40,-9,-33,-46v6,-31,7,-69,32,-55v58,-37,66,-42,175,-19v3,5,15,4,22,5\",w:229},s:{d:\"154,-151v19,1,27,24,13,32v-4,1,-22,4,-53,7v-16,8,-22,-2,-39,9v23,21,89,16,96,62v-13,24,-85,35,-124,42v-9,-3,-18,-3,-27,0v-6,-4,-21,-16,-8,-25v30,-6,83,-13,102,-24v-17,-16,-80,-33,-97,-48v-3,-2,-4,-7,-4,-15v-6,-6,3,-13,15,-18v22,-9,94,-23,126,-22\",w:188},t:{d:\"85,-150v10,-41,35,-126,65,-134v4,1,24,19,11,36v-17,22,-29,57,-36,104v26,8,50,-7,73,5v14,0,22,3,22,9v-1,19,-44,18,-57,23v-10,1,-46,0,-54,10v-10,24,-4,67,-20,98v-21,-3,-26,1,-26,-20v0,-9,2,-36,8,-81v-15,-13,-81,9,-77,-27v4,-38,71,6,91,-23\",w:194},u:{d:\"207,-136v-1,-2,11,-14,14,-13v6,0,10,7,10,22v-3,40,-23,56,-40,82v-13,19,-62,43,-93,43v-67,-2,-111,-75,-71,-133v26,-3,21,29,19,49v-1,27,26,44,57,42v41,-2,93,-55,104,-92\",w:242},v:{d:\"24,-127r52,71v42,-16,70,-54,124,-65v5,4,8,7,8,11v-8,19,-4,8,-33,32v0,1,-1,3,-1,5v-61,45,-93,68,-97,68v-40,-15,-50,-72,-68,-100v6,-14,10,-22,15,-22\",w:214},w:{d:\"15,-139v38,-2,27,57,45,86v30,2,67,-66,101,-78v26,6,36,69,60,78v47,-35,51,-54,119,-104v3,0,7,-2,15,-4v19,23,-9,28,-21,49v-33,28,-68,90,-107,109v-10,6,-52,-47,-72,-71v-20,17,-85,74,-97,73v-38,7,-41,-98,-52,-122v0,-1,3,-7,9,-16\",w:325},x:{d:\"95,-124v22,-13,78,-32,99,-31v16,0,23,6,23,18v0,22,-17,11,-49,21v-3,0,-45,20,-42,24v0,1,2,4,8,10v20,24,49,41,44,80v-35,3,-27,-9,-60,-44v-40,-43,-37,-26,-79,9v-1,1,-2,3,-3,8v-12,8,-28,10,-27,-11v-6,-8,45,-65,48,-65v-17,-21,-61,-52,-24,-68v9,0,48,37,62,49\",w:223},y:{d:\"44,-65v22,33,70,4,99,-8v5,-4,28,-15,41,-31r17,0v25,47,-26,70,-40,114v-5,4,-9,8,-10,21v-16,12,-11,33,-27,51v-5,18,-12,43,-23,71v-1,-1,-2,34,-18,29v-12,1,-22,-12,-22,-23v20,-70,24,-65,68,-177v-47,16,-111,8,-116,-39v-11,-13,-7,-62,8,-62v18,0,22,26,23,54\",w:216},z:{d:\"189,-43v9,-1,46,-6,41,12v0,7,-5,13,-15,14v-45,6,-148,24,-181,13v0,-3,-5,-8,-14,-15v5,-44,66,-46,90,-85v-15,-18,-84,21,-84,-14v0,-10,5,-17,14,-18v33,-3,79,-13,109,-3v4,-2,14,11,12,15v0,23,-26,51,-78,84v28,10,73,-3,106,-3\",w:244},\"{\":{d:\"94,-303v27,-9,90,-14,79,26v-20,17,-55,-5,-87,13v-4,1,-6,4,-6,8v33,42,31,44,7,85v-6,10,-13,16,-13,13v5,6,17,17,15,31r-33,78v7,35,28,49,57,63r49,0v7,42,-51,41,-86,20v-43,-13,-51,-51,-56,-89v-2,-25,25,-54,27,-71v-3,-4,-46,-5,-41,-21v2,-10,-3,-29,11,-25v2,0,51,-17,52,-38v4,-3,-25,-23,-25,-49v0,-41,8,-30,50,-44\",w:179},\"|\":{d:\"30,-308v26,5,14,50,15,80v5,78,-8,153,-3,225v-2,15,-1,31,-11,36v-8,-3,-25,-22,-25,-32r9,-183v0,-40,0,-78,1,-112v0,-4,9,-15,14,-14\",w:63},\"}\":{d:\"47,-298v34,-17,118,-18,112,36v6,25,-76,98,-69,103v4,16,39,7,44,28v7,34,-34,17,-37,39v8,29,49,83,23,123v-15,23,-43,26,-73,46v-34,8,-43,11,-49,-17v1,-15,30,-15,33,-20v24,-12,70,-27,55,-61v-14,-33,-37,-68,-19,-103v-46,-50,46,-100,60,-141v-10,-16,-68,6,-77,-12\",w:143},\"~\":{d:\"7,-254v2,-6,59,-50,67,-46v11,-1,35,19,46,26v5,0,27,-10,66,-31v21,8,-1,25,-7,38v-27,21,-48,31,-65,31v-24,-11,-37,-39,-65,-9v-7,7,-26,36,-42,11v3,-5,-3,-17,0,-20\",w:199},\" \":{w:179},\"¡\":{d:\"86,-197v8,16,-7,41,-24,25v-11,-11,-4,-16,-3,-29v13,0,15,-2,27,4xm46,-107v4,-8,11,-16,23,-7v19,26,-5,57,-6,87v-7,0,-5,18,-9,28v0,14,-17,52,-11,70v-2,7,-15,28,-25,12v-4,-6,-15,-7,-6,-16v2,-39,14,-96,34,-174\",w:95},\"¢\":{d:\"105,-188v13,-12,14,-18,26,-15v7,23,7,15,-3,49v6,0,18,14,17,20v-3,5,-12,19,-26,13v-14,1,-14,5,-16,21v10,10,46,-13,38,18v-9,17,-23,16,-54,20v-17,16,-4,55,-29,60v-37,-10,19,-64,-24,-71v-20,-10,-37,-47,-6,-62v23,-20,73,-4,77,-53xm65,-101v4,-9,7,-8,3,-13v-14,4,-22,10,-3,13\",w:154},\"£\":{d:\"153,-170v3,22,62,0,49,39v-18,6,-31,12,-58,9v-12,-1,-17,30,-23,39v19,26,50,56,91,35v9,-2,27,-13,27,4v0,27,-27,39,-58,42v-32,-5,-59,-19,-78,-39v-6,1,-35,44,-57,39v-25,0,-37,-15,-37,-46v0,-41,43,-53,73,-50v4,1,12,-18,12,-21v-7,-15,-49,0,-44,-30v-2,-31,31,-16,60,-19v16,-30,25,-119,93,-113v16,2,75,16,50,44v-4,5,-7,7,-12,8v-18,-12,-32,-18,-41,-18v-35,-1,-38,52,-47,77xm43,-45v4,5,12,-2,11,-9v-1,2,-12,1,-11,9\",w:242},\"¤\":{d:\"308,-133r-200,16v-2,1,-6,4,-10,10v70,-2,144,-14,211,-8v3,0,8,4,13,8v-1,4,-3,9,-9,17v-57,11,-164,6,-219,25v26,32,112,25,173,25v9,0,35,2,35,19v0,9,-4,13,-12,14v-115,12,-146,23,-211,-19v-12,-4,-22,-9,-25,-27v-6,-29,-61,3,-43,-49v17,-1,36,7,42,-12v-32,7,-36,-39,-11,-40v29,14,63,-25,73,-30v52,-25,72,-44,142,-44v23,0,21,41,-1,39v-35,-3,-61,9,-102,31v2,2,5,4,8,4v18,-6,101,-9,115,-9v7,0,55,13,31,30\",w:312},\"€\":{d:\"308,-133r-200,16v-2,1,-6,4,-10,10v70,-2,144,-14,211,-8v3,0,8,4,13,8v-1,4,-3,9,-9,17v-57,11,-164,6,-219,25v26,32,112,25,173,25v9,0,35,2,35,19v0,9,-4,13,-12,14v-115,12,-146,23,-211,-19v-12,-4,-22,-9,-25,-27v-6,-29,-61,3,-43,-49v17,-1,36,7,42,-12v-32,7,-36,-39,-11,-40v29,14,63,-25,73,-30v52,-25,72,-44,142,-44v23,0,21,41,-1,39v-35,-3,-61,9,-102,31v2,2,5,4,8,4v18,-6,101,-9,115,-9v7,0,55,13,31,30\",w:312},\"¥\":{d:\"31,-248v30,-3,64,64,74,59v37,-22,77,-65,107,-82v20,-11,34,18,21,32v-28,19,-52,38,-70,57v-18,8,-40,21,-35,60v2,19,39,7,64,7v25,0,16,21,2,27v-36,16,-46,8,-68,18v6,11,101,-20,66,24v-21,11,-42,12,-75,20v-2,1,-5,6,-10,18v-8,3,-11,10,-24,8v-7,-17,-2,-18,-9,-26v-13,5,-39,3,-53,-2v-10,-17,-7,-27,0,-34v23,-1,45,1,64,-5v-11,-7,-28,-4,-64,-6v-13,-8,-15,-24,-6,-35v33,-2,102,9,76,-37v-14,-14,-33,-38,-60,-66v-10,-10,-8,-28,0,-37\",w:219},\"§\":{d:\"141,-115v12,10,29,36,28,56v-4,68,-129,69,-152,16v-1,-12,-10,-22,8,-23v17,3,47,21,67,23v16,1,40,-8,38,-21v-8,-49,-119,-30,-117,-85v1,-28,15,-45,-3,-64v-1,-53,55,-61,103,-62v15,-5,6,-5,20,-2v16,17,23,27,23,30v-1,26,-29,7,-45,7v-21,0,-51,2,-62,17v19,14,87,8,97,43v18,14,16,57,-5,65xm64,-147r57,17v10,-28,-22,-43,-47,-44v-25,-1,-35,19,-10,27\",w:174},\"¨\":{d:\"124,-259v0,9,-4,13,-12,13v-18,0,-22,-21,-17,-35v19,-1,30,1,29,22xm23,-285v7,2,30,9,29,18v1,10,-9,19,-18,19v-19,0,-28,-26,-11,-37\",w:136},\"©\":{d:\"102,-29v-74,5,-124,-84,-70,-140v22,-22,53,-35,97,-38v46,-4,88,49,74,100v0,44,-51,75,-101,78xm96,-66v42,-3,75,-23,75,-69v0,-23,-4,-38,-44,-38v-16,0,-33,6,-49,20v36,-4,55,-12,62,20v-5,16,-49,1,-50,21v10,15,53,-14,54,11v0,18,-14,27,-42,27v-22,1,-46,-11,-46,-31v0,-25,7,-39,20,-44v-1,-1,-2,-2,-3,-2v-51,22,-32,89,23,85\",w:217},\"ª\":{d:\"6,-265v1,-31,58,-53,80,-22v-11,14,25,28,25,36v-2,8,-15,12,-27,10v-22,-29,-68,19,-78,-24xm52,-281v-8,1,-24,10,-9,13v11,1,24,-10,9,-13\",w:117},\"«\":{d:\"191,-64v16,6,87,37,53,63v-39,-9,-71,-28,-107,-40v-14,-13,-13,-34,10,-47v27,-15,48,-55,84,-62v9,-2,21,10,21,18r-13,21v-16,5,-44,22,-51,41v0,4,1,6,3,6xm71,-65v17,6,87,35,55,62v-39,-8,-66,-27,-108,-40v-14,-13,-13,-36,10,-46v23,-18,50,-56,84,-63v9,-2,21,10,21,18r-13,22v-20,6,-32,17,-51,37v0,3,-1,11,2,10\",w:265},\"¬\":{d:\"141,-99v47,7,103,-3,149,6v14,24,18,15,10,39v-10,34,-7,31,-26,76v-4,6,-15,8,-16,21v-4,2,-4,1,-13,5v-22,-33,-4,-33,16,-104v-5,-9,-28,-4,-38,-6r-183,4v-14,0,-41,-29,-17,-36v31,-9,82,5,118,-5\",w:315},\"®\":{d:\"75,-194v78,-29,116,9,130,84v-2,42,-22,47,-57,67v-74,20,-161,-19,-129,-110v6,-18,29,-34,57,-40xm46,-86v51,36,84,21,129,-15v7,-15,0,-39,-10,-49v-13,-37,-49,-26,-86,-18v-28,7,-49,46,-33,82xm72,-123v-5,-43,68,-57,75,-14v-17,26,-18,17,3,32v2,25,-25,18,-45,7r-4,-4v-1,8,-3,20,-12,24v-10,-3,-21,-34,-17,-45xm112,-135v-10,-1,-20,13,-9,14v6,-6,9,-11,9,-14\",w:217},\"¯\":{d:\"63,-295v28,-7,73,10,105,7v11,1,6,8,5,19v-37,21,-72,11,-136,11v-23,0,-31,-14,-27,-36v12,-15,40,0,53,-1\",w:183},\"°\":{d:\"106,-268v0,36,-35,38,-51,46v-48,5,-60,-58,-25,-78v33,-11,76,-9,76,32xm38,-257v16,7,39,2,38,-17v-13,-9,-28,-1,-32,11v-5,3,-7,0,-6,6\",w:114},\"±\":{d:\"93,-163v-7,46,76,-4,46,47v-14,6,-27,13,-38,8v-24,2,-14,28,-28,44r-14,0v-7,-12,-5,-15,-7,-33v-12,-7,-41,-1,-37,-24v2,-11,23,-17,36,-14r28,-38v4,0,9,4,14,10xm113,-27v-12,18,-58,27,-85,24v-16,2,-22,-23,-13,-36v28,-7,85,-11,98,12\",w:151},\"´\":{d:\"52,-284v29,-11,50,-34,62,-14v3,12,-86,54,-94,56v-14,0,-16,-12,-12,-23v11,-5,25,-11,44,-19\",w:120},\"¶\":{d:\"121,-237v21,-9,44,-13,63,-1v-1,7,5,6,7,11r-4,190v-2,33,4,39,-15,40v-16,1,-10,-20,-10,-33r4,-161v0,-17,-1,-34,-16,-25v2,10,1,23,1,35v-9,46,-6,75,-15,156v-3,4,-7,5,-12,5v-17,-10,-3,-89,-10,-115v-43,14,-98,10,-101,-29v-4,-53,59,-63,104,-75v3,1,4,2,4,2xm95,-204v2,9,-30,50,1,50v35,0,23,-13,29,-43v0,-1,-2,-7,-4,-15v-12,-1,-14,2,-26,8\",w:206},\"¸\":{d:\"74,16v32,2,49,14,55,36v-3,7,-14,31,-29,33v-28,4,-57,11,-88,14v-19,-6,-13,-31,8,-33v20,-1,59,-5,73,-14v-17,-14,-68,8,-53,-37v9,-10,2,-28,24,-30v8,8,13,17,10,31\",w:129},\"º\":{d:\"13,-273v1,-31,56,-41,83,-18v36,8,14,48,-9,52v-35,6,-64,-5,-74,-34xm81,-269v-7,-7,-20,-11,-29,-6v5,13,13,11,29,6\",w:128},\"»\":{d:\"120,-129v9,-33,48,-10,64,5v9,20,86,52,50,86v-36,11,-66,31,-107,40v-6,-7,-9,-13,-9,-17v-2,-13,50,-46,63,-46v11,-18,-33,-42,-48,-47xm1,-128v10,-33,46,-8,64,6v8,19,86,50,51,85v-40,13,-69,30,-108,40v-6,-7,-8,-12,-8,-16v-2,-14,50,-46,63,-47v7,-13,-9,-20,-19,-30v-10,-9,-20,-15,-30,-17\",w:252},\"¿\":{d:\"181,-247v3,1,31,2,29,15v-4,22,-37,27,-41,4v1,-5,7,-20,12,-19xm161,-34v-45,-1,-105,19,-124,51v0,11,18,17,54,17v39,0,82,-13,112,4v-10,35,-58,31,-100,31v-47,0,-80,-10,-99,-31v-10,-56,22,-73,64,-90v8,-3,32,-9,74,-18v21,-15,7,-62,22,-92v-1,-5,-1,-11,4,-12v16,0,24,7,24,22v-8,30,-8,73,-17,111v-3,5,-7,7,-14,7\",w:213},\"À\":{d:\"161,-217v20,53,23,124,54,170v-2,20,-34,9,-42,0v-27,-12,-78,-18,-101,-18v-26,6,-29,51,-54,63v-18,-4,-19,-30,-3,-38v5,-9,15,-16,8,-29v1,-12,23,-9,26,-19v6,-10,11,-20,20,-27r70,-121v12,-4,16,4,22,19xm82,-91v17,3,62,7,86,13v-13,-33,-13,-80,-29,-109v-15,30,-38,63,-57,96xm150,-268v14,10,54,14,37,41v-28,-7,-62,-22,-100,-42v-2,-3,-2,-26,5,-23v16,4,42,17,58,24\"},\"Á\":{d:\"161,-217v20,53,23,124,54,170v-2,20,-34,9,-42,0v-27,-12,-78,-18,-101,-18v-26,6,-29,51,-54,63v-18,-4,-19,-30,-3,-38v5,-9,15,-16,8,-29v1,-12,23,-9,26,-19v6,-10,11,-20,20,-27r70,-121v12,-4,16,4,22,19xm82,-91v17,3,62,7,86,13v-13,-33,-13,-80,-29,-109v-15,30,-38,63,-57,96xm84,-250v31,-5,83,-53,100,-31v0,5,-11,15,-35,28v-16,5,-51,28,-53,25v-14,1,-16,-11,-12,-22\"},\"Â\":{d:\"161,-217v20,53,23,124,54,170v-2,20,-34,9,-42,0v-27,-12,-78,-18,-101,-18v-26,6,-29,51,-54,63v-18,-4,-19,-30,-3,-38v5,-9,15,-16,8,-29v1,-12,23,-9,26,-19v6,-10,11,-20,20,-27r70,-121v12,-4,16,4,22,19xm82,-91v17,3,62,7,86,13v-13,-33,-13,-80,-29,-109v-15,30,-38,63,-57,96xm202,-219v-27,-6,-40,-26,-61,-37v-21,7,-39,46,-65,23v-2,-4,-3,-10,-4,-14v19,-4,43,-32,61,-43v27,6,40,22,62,37v12,8,18,17,18,25v0,6,-3,9,-11,9\"},\"Ã\":{d:\"161,-217v20,53,23,124,54,170v-2,20,-34,9,-42,0v-27,-12,-78,-18,-101,-18v-26,6,-29,51,-54,63v-18,-4,-19,-30,-3,-38v5,-9,15,-16,8,-29v1,-12,23,-9,26,-19v6,-10,11,-20,20,-27r70,-121v12,-4,16,4,22,19xm82,-91v17,3,62,7,86,13v-13,-33,-13,-80,-29,-109v-15,30,-38,63,-57,96xm100,-285v26,-19,54,19,69,22v4,0,15,-5,34,-13v23,-9,22,-17,31,-12v3,11,-9,9,-7,21v-26,20,-46,30,-59,30v-3,3,-50,-26,-49,-29v-12,1,-31,35,-51,32v-3,-8,-5,-14,-5,-18v10,-9,16,-17,37,-33\"},\"Ä\":{d:\"161,-217v20,53,23,124,54,170v-2,20,-34,9,-42,0v-27,-12,-78,-18,-101,-18v-26,6,-29,51,-54,63v-18,-4,-19,-30,-3,-38v5,-9,15,-16,8,-29v1,-12,23,-9,26,-19v6,-10,11,-20,20,-27r70,-121v12,-4,16,4,22,19xm82,-91v17,3,62,7,86,13v-13,-33,-13,-80,-29,-109v-15,30,-38,63,-57,96xm187,-259v0,8,-4,13,-12,13v-18,0,-21,-20,-16,-34v18,-1,28,2,28,21xm90,-284v7,3,28,11,28,18v0,9,-9,18,-18,17v-17,0,-25,-24,-10,-35\"},\"Å\":{d:\"161,-217v20,53,23,124,54,170v-2,20,-34,9,-42,0v-27,-12,-78,-18,-101,-18v-26,6,-29,51,-54,63v-18,-4,-19,-30,-3,-38v5,-9,15,-16,8,-29v1,-12,23,-9,26,-19v6,-10,11,-20,20,-27r70,-121v12,-4,16,4,22,19xm82,-91v17,3,62,7,86,13v-13,-33,-13,-80,-29,-109v-15,30,-38,63,-57,96xm112,-239v-31,-17,-9,-61,29,-56v12,2,22,3,33,12v24,39,-30,62,-62,44xm119,-262v2,14,41,8,41,-4v0,-4,-8,-6,-24,-9v-10,-2,-17,10,-17,13\"},\"Æ\":{d:\"335,-259v0,30,-102,12,-122,34v10,21,2,79,16,100v24,-6,59,-13,86,-16v23,-2,32,21,13,26r-103,29v-3,22,-4,38,8,43v28,-5,60,-6,86,-14v5,-1,14,7,14,11v6,16,-90,40,-107,40v-29,0,-39,-19,-32,-46v-2,-4,0,-26,-9,-28v-29,2,-58,6,-88,6v-31,0,-40,74,-82,73v-18,-23,4,-37,12,-50v40,-65,112,-126,165,-207v20,-17,69,-11,112,-13v21,0,31,4,31,12xm123,-111v28,1,44,-2,67,-10v-4,-22,5,-49,-7,-65v-3,6,-65,61,-60,75\",w:348},\"Ç\":{d:\"48,-108v-12,70,90,71,159,67r138,-9v9,-1,7,9,7,17v-37,16,-80,27,-103,21v-14,9,-40,3,-67,9v-30,0,-64,1,-100,-10v-6,-1,-10,-4,-10,-8v-32,-12,-46,-31,-63,-56v-16,-61,47,-103,83,-121v82,-42,118,-45,200,-60v21,-4,36,34,11,37v-90,11,-148,31,-225,77v-12,8,-23,20,-30,36xm172,18v29,4,47,14,53,35v-2,7,-14,31,-27,31v-28,7,-55,9,-84,14v-18,-5,-13,-32,7,-32v21,0,55,-5,69,-13v-16,-14,-63,10,-50,-35v9,-10,1,-27,23,-29v7,8,11,16,9,29\",\nw:331},\"È\":{d:\"49,-160v1,-4,-10,-9,-15,-8v-15,-35,32,-30,57,-31r142,-8v2,1,30,7,40,10v-52,16,-133,17,-190,30v-7,9,-12,24,-15,47v26,10,102,-6,141,3v1,3,1,6,2,10v-36,18,-92,12,-149,21v-11,9,-16,41,-16,51v55,-1,111,-21,168,-13v15,-8,48,1,31,18v-53,16,-130,13,-198,29r-39,-8v-4,-19,17,-53,20,-76v-1,0,-7,-11,-9,-18v18,-7,22,-28,30,-57xm184,-236v6,9,5,13,0,23v-28,-7,-62,-21,-100,-41v-3,-2,-3,-27,5,-23v34,11,60,25,95,41\",w:252},\"É\":{d:\"49,-160v1,-4,-10,-9,-15,-8v-15,-35,32,-30,57,-31r142,-8v2,1,30,7,40,10v-52,16,-133,17,-190,30v-7,9,-12,24,-15,47v26,10,102,-6,141,3v1,3,1,6,2,10v-36,18,-92,12,-149,21v-11,9,-16,41,-16,51v55,-1,111,-21,168,-13v15,-8,48,1,31,18v-53,16,-130,13,-198,29r-39,-8v-4,-19,17,-53,20,-76v-1,0,-7,-11,-9,-18v18,-7,22,-28,30,-57xm133,-248v27,-11,48,-32,59,-14v3,11,-79,52,-88,53v-14,1,-16,-11,-12,-21v10,-4,23,-11,41,-18\",w:252},\"Ê\":{d:\"49,-160v1,-4,-10,-9,-15,-8v-15,-35,32,-30,57,-31r142,-8v2,1,30,7,40,10v-52,16,-133,17,-190,30v-7,9,-12,24,-15,47v26,10,102,-6,141,3v1,3,1,6,2,10v-36,18,-92,12,-149,21v-11,9,-16,41,-16,51v55,-1,111,-21,168,-13v15,-8,48,1,31,18v-53,16,-130,13,-198,29r-39,-8v-4,-19,17,-53,20,-76v-1,0,-7,-11,-9,-18v18,-7,22,-28,30,-57xm199,-211v-27,-6,-39,-26,-60,-37v-21,7,-40,47,-65,22v-2,-7,-2,-7,-4,-13v18,-5,44,-31,61,-43v27,6,41,22,62,37v12,9,18,17,18,25v0,6,-4,9,-12,9\",w:252},\"Ë\":{d:\"49,-160v1,-4,-10,-9,-15,-8v-15,-35,32,-30,57,-31r142,-8v2,1,30,7,40,10v-52,16,-133,17,-190,30v-7,9,-12,24,-15,47v26,10,102,-6,141,3v1,3,1,6,2,10v-36,18,-92,12,-149,21v-11,9,-17,41,-17,51v55,0,112,-21,169,-13v15,-8,48,1,31,18v-53,16,-130,13,-198,29r-39,-8v-3,-21,17,-53,20,-76v-1,0,-7,-11,-9,-18v18,-7,22,-28,30,-57xm191,-236v0,8,-4,13,-12,13v-17,0,-19,-19,-16,-34v18,-1,29,1,28,21xm95,-261v7,3,29,9,28,18v0,7,-9,17,-18,17v-18,0,-26,-25,-10,-35\",w:252},\"Ì\":{d:\"33,-5v-9,-6,-9,-12,-9,-36v0,-71,8,-119,22,-144v8,-13,14,-20,19,-20v27,20,-11,87,-10,120r-15,76v-1,1,-4,2,-7,4xm72,-247v7,6,55,15,36,40v-28,-7,-61,-21,-99,-41v-3,-2,-3,-27,5,-23v18,3,41,17,58,24\",w:111},\"Í\":{d:\"26,-5v-9,-6,-9,-12,-9,-36v0,-71,7,-119,21,-144v8,-13,14,-20,19,-20v28,19,-7,89,-10,120v-2,21,-8,47,-14,76v-2,1,-2,0,-7,4xm6,-233v31,-6,83,-53,101,-31v2,11,-80,53,-89,53v-14,1,-14,-11,-12,-22\",w:104},\"Î\":{d:\"53,-9v-15,7,-16,-3,-16,-32v0,-71,7,-119,21,-144v8,-13,14,-20,19,-20v28,19,-7,89,-10,120v-2,21,-8,47,-14,76xm137,-209v-27,-6,-40,-26,-61,-37v-8,0,-9,4,-13,10v-11,13,-50,37,-56,0v18,-5,43,-32,61,-43v28,5,40,21,62,36v12,9,18,17,18,25v0,6,-4,9,-11,9\",w:144},\"Ï\":{d:\"33,-5v-9,-6,-9,-12,-9,-36v0,-71,8,-119,22,-144v8,-13,14,-20,19,-20v27,20,-11,87,-10,120r-15,76v-1,1,-4,2,-7,4xm111,-222v0,8,-4,12,-12,12v-18,0,-19,-19,-16,-33v18,-1,29,1,28,21xm15,-247v8,2,29,9,28,17v0,21,-37,24,-36,1v0,-7,2,-13,8,-18\",w:110},\"Ñ\":{d:\"224,-182v1,-17,15,-24,22,-38v20,0,13,10,3,33v-3,36,-25,52,-28,94v-10,24,-30,55,-29,82r-19,7v-32,-8,-36,-70,-58,-111v-2,-23,-7,-27,-19,-54v-28,36,-41,93,-71,133v-9,5,-20,-9,-20,-17r73,-149v9,-24,31,-5,36,7v19,41,31,98,53,139v22,-35,34,-69,50,-118v2,-3,3,-3,7,-8xm203,-257v22,-8,41,-24,65,-26v3,11,-8,9,-7,21v-26,20,-46,31,-59,31v-2,3,-49,-27,-49,-29v-11,0,-32,31,-46,32v-11,-2,-12,-21,-4,-23v4,-6,28,-30,48,-34v17,-4,43,28,52,28\",w:219},\"Ò\":{d:\"62,-184v78,-31,249,-50,238,74v-6,65,-102,105,-179,115v-77,-7,-152,-71,-101,-149v2,-5,24,-33,42,-40xm279,-120v14,-38,-47,-64,-85,-61v-20,-9,-41,7,-62,0v-11,7,-54,12,-66,24v0,20,-51,35,-38,66v-1,43,50,67,96,67v44,0,162,-55,155,-96xm161,-262v14,10,52,13,37,41v-28,-7,-62,-21,-100,-41v-3,-3,-3,-26,5,-24v16,5,42,17,58,24\",w:273},\"Ó\":{d:\"62,-184v78,-31,249,-50,238,74v-6,65,-102,105,-179,115v-77,-7,-152,-71,-101,-149v2,-5,24,-33,42,-40xm279,-120v14,-38,-47,-64,-85,-61v-20,-9,-41,7,-62,0v-11,7,-54,12,-66,24v0,20,-51,35,-38,66v-1,43,50,67,96,67v44,0,162,-55,155,-96xm142,-250v27,-11,47,-32,59,-14v2,11,-80,53,-89,53v-13,1,-15,-11,-12,-21v10,-5,24,-11,42,-18\",w:273},\"Ô\":{d:\"62,-184v78,-31,249,-50,238,74v-6,65,-102,105,-179,115v-77,-7,-152,-71,-101,-149v2,-5,24,-33,42,-40xm279,-120v14,-38,-47,-64,-85,-61v-20,-9,-41,7,-62,0v-11,7,-54,12,-66,24v0,20,-51,35,-38,66v-1,43,50,67,96,67v44,0,162,-55,155,-96xm157,-282v17,18,52,34,54,63v-24,12,-52,-36,-53,-29r-42,34v-23,-4,-6,-31,5,-34v1,1,27,-37,36,-34\",w:273},\"Õ\":{d:\"62,-184v78,-31,249,-50,238,74v-6,65,-102,105,-179,115v-77,-7,-152,-71,-101,-149v2,-5,24,-33,42,-40xm279,-120v14,-38,-47,-64,-85,-61v-20,-9,-41,7,-62,0v-11,7,-54,12,-66,24v0,20,-51,35,-38,66v-1,43,50,67,96,67v44,0,162,-55,155,-96xm116,-270v26,-19,54,19,69,22v4,0,15,-5,34,-13v23,-10,22,-16,31,-12v3,11,-8,9,-7,21v-45,28,-47,42,-88,16v-29,-19,-12,-20,-43,2v-8,5,-12,18,-23,15v-13,-3,-12,-20,-4,-23v4,-6,14,-15,31,-28\",w:273},\"Ö\":{d:\"62,-184v78,-31,249,-50,238,74v-6,65,-102,105,-179,115v-77,-7,-152,-71,-101,-149v2,-5,24,-33,42,-40xm279,-120v14,-38,-47,-64,-85,-61v-20,-9,-41,7,-62,0v-11,7,-54,12,-66,24v0,20,-51,35,-38,66v-1,43,50,67,96,67v44,0,162,-55,155,-96xm197,-229v0,8,-4,13,-12,13v-17,0,-19,-19,-16,-34v18,-1,29,1,28,21xm101,-254v7,3,28,9,27,18v1,8,-8,17,-17,17v-18,0,-26,-24,-10,-35\",w:273},\"Ø\":{d:\"76,-211v41,-13,100,-22,140,-3v26,-19,40,-29,44,-29v10,0,15,7,15,20v0,15,-23,23,-30,35v23,39,29,114,-21,139v-36,19,-102,35,-147,18v-14,-5,-29,29,-46,35v-25,-13,-19,-24,3,-56v-9,-17,-28,-27,-28,-60v0,-38,23,-72,70,-99xm107,-66v55,15,125,-12,123,-70v0,-16,-5,-25,-13,-29r-110,95r0,4xm39,-108v-1,3,17,31,22,27v8,-6,109,-90,123,-106v-15,-11,-43,1,-63,2v-33,10,-80,35,-82,77\",w:270},\"Ù\":{d:\"281,-202v6,67,-30,121,-71,152v-3,14,-47,26,-60,39v-41,20,-110,1,-125,-26v-24,-44,-28,-84,-8,-127v12,-26,23,-38,37,-22v-2,2,-3,5,-3,10v-34,26,-30,116,5,134v22,32,86,-1,109,-8v38,-28,104,-64,97,-149v2,-10,7,-8,19,-3xm151,-243v14,10,54,14,37,41v-28,-7,-61,-22,-99,-42v-3,-2,-4,-25,4,-23v16,5,42,17,58,24\",w:262},\"Ú\":{d:\"281,-202v6,67,-30,121,-71,152v-3,14,-47,26,-60,39v-41,20,-110,1,-125,-26v-24,-44,-28,-84,-8,-127v12,-26,23,-38,37,-22v-2,2,-3,5,-3,10v-34,26,-30,116,5,134v22,32,86,-1,109,-8v38,-28,104,-64,97,-149v2,-10,7,-8,19,-3xm194,-265v3,-1,11,4,11,6v3,12,-81,52,-89,54v-14,0,-13,-9,-12,-22\",w:262},\"Û\":{d:\"281,-202v6,67,-30,121,-71,152v-3,14,-47,26,-60,39v-41,20,-110,1,-125,-26v-24,-44,-28,-84,-8,-127v12,-26,23,-38,37,-22v-2,2,-3,5,-3,10v-34,26,-30,116,5,134v22,32,86,-1,109,-8v38,-28,104,-64,97,-149v2,-10,7,-8,19,-3xm150,-266v24,11,58,27,73,46v0,5,-3,6,-10,6v-28,2,-61,-30,-63,-25v-10,0,-57,40,-69,23v3,-10,-8,-15,8,-19v17,-1,34,-29,61,-31\",w:262},\"Ü\":{d:\"281,-202v6,67,-30,121,-71,152v-3,14,-47,26,-60,39v-41,20,-110,1,-125,-26v-24,-44,-28,-84,-8,-127v12,-26,23,-38,37,-22v-2,2,-3,5,-3,10v-34,26,-29,116,5,134v22,32,86,-1,109,-8v38,-28,104,-64,97,-149v2,-10,7,-8,19,-3xm197,-227v0,8,-4,13,-12,13v-18,0,-21,-20,-16,-34v18,-1,28,2,28,21xm101,-252v7,3,27,10,27,18v0,8,-9,18,-18,17v-18,-1,-24,-25,-9,-35\",w:262},\"ß\":{d:\"33,10v-29,4,-28,-32,-16,-70v18,-58,17,-137,56,-176v12,-24,46,-58,82,-43v20,8,47,24,47,54v0,30,-62,59,-67,90v33,23,56,33,63,63v-18,21,-22,36,-48,54v-24,17,-27,41,-53,16v-2,-19,7,-35,24,-42v15,-13,26,-22,34,-40v-13,-17,-78,-29,-56,-70v-3,-27,64,-54,66,-86v-8,-25,-41,-4,-52,8v-29,30,-47,83,-51,141v-17,25,-8,71,-29,101\"},\"à\":{d:\"118,-53v10,4,55,41,62,47v0,7,-5,16,-12,16r-57,-28v-20,3,-40,19,-61,18v-10,2,-43,-17,-42,-36v0,-14,7,-40,27,-41v39,-26,92,-36,104,9v0,6,-2,11,-9,15v-32,-24,-64,-6,-84,11v8,15,58,-17,72,-11xm99,-137v7,6,56,14,37,40v-28,-7,-62,-21,-100,-41v-2,-3,-2,-26,5,-23v16,4,42,17,58,24\",w:173},\"á\":{d:\"118,-53v10,4,55,41,62,47v0,7,-5,16,-12,16r-57,-28v-20,3,-40,19,-61,18v-10,2,-43,-17,-42,-36v0,-14,7,-40,27,-41v39,-26,92,-36,104,9v0,6,-2,11,-9,15v-32,-24,-64,-6,-84,11v8,15,58,-17,72,-11xm32,-117v24,-3,85,-55,101,-32v3,11,-80,53,-89,53v-13,2,-14,-10,-12,-21\",w:173},\"â\":{d:\"118,-53v10,4,55,41,62,47v0,7,-5,16,-12,16r-57,-28v-20,3,-40,19,-61,18v-10,2,-43,-17,-42,-36v0,-14,7,-40,27,-41v39,-26,92,-36,104,9v0,6,-2,11,-9,15v-32,-24,-64,-6,-84,11v8,15,58,-17,72,-11xm147,-97v-27,-6,-39,-26,-60,-37v-21,7,-38,46,-65,23v-2,-5,-3,-10,-4,-14v18,-4,43,-31,61,-42v28,5,40,21,62,36v12,8,18,17,18,25v0,6,-4,9,-12,9\",w:173},\"ã\":{d:\"118,-53v10,4,55,41,62,47v0,7,-5,16,-12,16r-57,-28v-20,3,-40,19,-61,18v-10,2,-43,-17,-42,-36v0,-14,7,-40,27,-41v39,-26,92,-36,104,9v0,6,-2,11,-9,15v-32,-24,-64,-6,-84,11v8,15,58,-17,72,-11xm114,-136v22,-8,41,-24,64,-26v3,11,-7,10,-7,21v-26,20,-45,30,-58,30v-3,3,-49,-26,-49,-28v-10,-1,-32,35,-51,31v-12,-32,8,-29,32,-51v24,-21,54,20,69,23\",w:173},\"ä\":{d:\"118,-53v10,4,55,41,62,47v0,7,-5,16,-12,16r-57,-28v-20,3,-40,19,-61,18v-32,5,-66,-64,-15,-77v39,-26,92,-36,104,9v0,6,-3,11,-9,15v-32,-24,-64,-6,-84,11v8,15,58,-17,72,-11xm142,-119v0,8,-4,13,-12,13v-18,0,-21,-20,-16,-34v18,-1,28,2,28,21xm46,-144v7,3,28,9,27,18v1,8,-9,18,-18,17v-18,-1,-25,-25,-9,-35\",w:173},\"å\":{d:\"118,-53v10,4,55,41,62,47v0,7,-5,16,-12,16r-57,-28v-20,3,-40,19,-61,18v-10,2,-43,-17,-42,-36v0,-14,7,-40,27,-41v39,-26,92,-36,104,9v0,6,-2,11,-9,15v-32,-24,-64,-6,-84,11v8,15,58,-17,72,-11xm54,-101v-37,-20,-9,-71,34,-65v13,1,25,3,38,13v27,45,-34,73,-72,52xm61,-128v4,20,48,7,49,-5v0,-5,-9,-7,-28,-10v-12,-2,-21,11,-21,15\",w:173},\"æ\":{d:\"145,-44r33,7v2,42,-59,29,-85,16v-6,7,-35,24,-48,15v-19,2,-35,-21,-33,-37v2,-24,5,-19,28,-36v-6,-8,-45,3,-33,-21v21,-22,58,-12,85,-1v6,-5,35,-28,45,-15v20,-4,36,17,36,35v0,23,-4,21,-28,37xm111,-72v12,3,49,-16,19,-17v-5,0,-20,12,-19,17xm74,-50v-14,-4,-48,16,-19,17v4,1,19,-14,19,-17\",w:184},\"ç\":{d:\"108,-118v30,-6,56,21,25,33v-24,-6,-39,5,-75,23v-7,4,-12,12,-15,22v31,28,86,3,128,9v3,28,-29,16,-44,28v-53,15,-106,10,-120,-37v0,-48,62,-70,101,-78xm92,18v23,4,45,12,48,32v-2,6,-12,28,-25,28v-24,6,-50,10,-77,13v-16,-4,-11,-28,7,-29v17,-1,51,-4,63,-12v-14,-15,-57,10,-46,-32v9,-8,0,-25,21,-26v6,6,12,14,9,26\",w:171},\"è\":{d:\"108,-124v42,-3,70,39,50,73v-22,-1,-70,12,-94,10v-1,1,-2,3,-2,3v0,3,12,7,35,14v18,0,64,7,30,21v-10,14,-31,6,-53,6v-26,-7,-70,-26,-70,-58v0,-54,48,-65,104,-69xm130,-78v-2,-35,-66,-13,-77,3v16,6,62,6,77,-3xm95,-166v7,6,54,14,37,40v-28,-7,-62,-21,-100,-41v-3,-3,-3,-26,5,-24v16,5,42,18,58,25\",w:161},\"é\":{d:\"108,-124v42,-3,70,39,50,73v-22,-1,-70,12,-94,10v-1,1,-2,3,-2,3v0,3,12,7,35,14v18,0,64,7,30,21v-10,14,-31,6,-53,6v-26,-7,-70,-26,-70,-58v0,-54,48,-65,104,-69xm130,-78v-2,-35,-66,-13,-77,3v16,6,62,6,77,-3xm76,-169v26,-11,48,-32,59,-14v3,10,-80,53,-89,53v-14,1,-14,-10,-12,-21v15,-7,16,-7,42,-18\",w:161},\"ê\":{d:\"108,-124v42,-3,70,39,50,73v-22,-1,-70,12,-94,10v-1,1,-2,3,-2,3v0,3,12,7,35,14v18,0,64,7,30,21v-10,14,-31,6,-53,6v-26,-7,-70,-26,-70,-58v0,-54,48,-65,104,-69xm130,-78v-2,-35,-66,-13,-77,3v16,6,62,6,77,-3xm145,-129v-27,-6,-39,-26,-60,-37v-8,0,-10,4,-14,10v-11,15,-51,34,-56,0v17,-4,44,-32,61,-43v28,5,41,21,63,36v12,8,17,17,17,25v0,6,-3,9,-11,9\",w:161},\"ë\":{d:\"108,-124v42,-3,70,39,50,73v-22,-1,-70,12,-94,10r-3,3v0,3,12,7,36,14v18,0,64,7,30,21v-10,14,-31,6,-53,6v-26,-7,-67,-27,-71,-58v7,-52,48,-65,105,-69xm130,-78v-2,-35,-66,-13,-77,3v16,6,62,6,77,-3xm140,-144v0,8,-4,12,-12,12v-18,0,-19,-19,-16,-33v18,-1,29,1,28,21xm44,-169v7,3,28,9,28,17v0,9,-9,18,-18,18v-18,0,-25,-24,-10,-35\",w:161},\"ì\":{d:\"57,-98v22,5,13,50,11,95v-7,1,-11,2,-20,-4v1,-7,-12,-18,-10,-24v4,-22,-2,-64,19,-67xm70,-139v14,10,54,14,37,41v-28,-7,-61,-22,-99,-42v-3,-2,-3,-25,5,-23v15,5,41,17,57,24\",w:109},\"í\":{d:\"59,-98v20,4,15,53,10,95v-6,1,-11,2,-19,-4v1,-7,-12,-18,-10,-24v4,-22,-4,-65,19,-67xm50,-139v27,-11,49,-32,59,-14v3,11,-80,53,-89,53v-14,1,-14,-12,-11,-22v15,-7,14,-6,41,-17\",w:105},\"î\":{d:\"72,-98v20,5,12,51,10,95v-6,2,-13,1,-20,-4v1,-8,-12,-18,-10,-24v4,-22,-3,-65,20,-67xm134,-94v-26,-7,-39,-25,-60,-37v-7,0,-9,4,-13,10v-14,15,-51,34,-56,-1v18,-4,45,-33,61,-43v27,6,40,22,62,37v12,8,18,17,18,25v0,6,-4,9,-12,9\",w:143},\"ï\":{d:\"55,-97v19,5,15,53,10,95v-17,5,-26,-14,-30,-28v6,-20,-3,-65,20,-67xm110,-118v0,8,-4,13,-12,13v-17,0,-19,-19,-16,-34v18,-1,29,1,28,21xm14,-143v6,3,28,8,28,17v0,9,-9,18,-18,18v-18,0,-25,-24,-10,-35\",w:107},\"ñ\":{d:\"115,-129v34,6,59,50,59,105v0,31,-15,24,-30,17v-15,-29,-5,-42,-20,-81v-35,-13,-68,52,-88,61v-20,-4,-38,-36,-19,-59v0,-12,3,-14,10,-28v11,-8,18,11,27,12xm117,-166v22,-7,41,-23,64,-26v3,11,-7,10,-7,21v-26,20,-45,30,-58,30v-3,3,-49,-26,-49,-28v-10,-1,-32,35,-51,31v-5,-12,-8,-16,0,-23v4,-6,28,-29,48,-33v17,-3,43,28,53,28\",w:171},\"ò\":{d:\"102,-132v50,-20,99,16,99,60v0,54,-60,64,-108,79v-50,-2,-110,-48,-76,-100v22,-17,49,-33,85,-39xm136,-104v-34,0,-91,27,-94,47v16,51,125,16,125,-22v0,-17,-10,-25,-31,-25xm115,-181v14,10,51,13,37,40v-28,-7,-62,-21,-100,-41v-3,-2,-3,-26,5,-23v16,5,42,17,58,24\",w:191},\"ó\":{d:\"102,-132v50,-20,99,16,99,60v0,54,-60,64,-108,79v-50,-2,-110,-48,-76,-100v22,-17,49,-33,85,-39xm136,-104v-34,0,-91,27,-94,47v16,51,125,16,125,-22v0,-17,-10,-25,-31,-25xm49,-154v24,-3,85,-55,101,-32v3,11,-80,53,-89,53v-14,0,-13,-8,-12,-21\",w:191},\"ô\":{d:\"102,-132v50,-20,99,16,99,60v0,54,-60,64,-108,79v-50,-2,-110,-48,-76,-100v22,-17,49,-33,85,-39xm136,-104v-34,0,-91,27,-94,47v16,51,125,16,125,-22v0,-17,-10,-25,-31,-25xm110,-177v-22,6,-38,45,-65,22v-2,-4,-3,-9,-4,-13v18,-4,43,-32,61,-43v27,6,40,21,62,36v12,9,18,17,18,25v1,11,-15,10,-23,7\",w:191},\"õ\":{d:\"102,-132v50,-20,99,16,99,60v0,54,-60,64,-108,79v-50,-2,-110,-48,-76,-100v22,-17,49,-33,85,-39xm136,-104v-34,0,-91,27,-94,47v16,51,125,16,125,-22v0,-17,-10,-25,-31,-25xm58,-199v26,-21,54,18,69,22v4,0,15,-5,34,-13v22,-9,21,-16,31,-13v3,11,-9,9,-7,22v-26,20,-46,30,-59,30v-2,4,-49,-28,-49,-29v-11,0,-32,31,-46,32v-12,-3,-13,-21,-4,-23v4,-6,14,-15,31,-28\",w:191},\"ö\":{d:\"102,-132v50,-20,99,16,99,60v0,54,-60,64,-108,79v-50,-2,-110,-48,-76,-100v22,-17,49,-33,85,-39xm136,-104v-34,0,-91,27,-94,47v16,51,125,16,125,-22v0,-17,-10,-25,-31,-25xm161,-160v0,8,-4,13,-12,13v-17,0,-19,-19,-16,-34v18,-1,29,1,28,21xm65,-185v7,3,28,9,28,18v0,7,-9,18,-18,17v-18,1,-25,-24,-10,-35\",w:191},\"÷\":{d:\"167,-158v-4,3,-7,9,-10,20v-23,4,-34,-8,-29,-31v14,-6,18,1,39,11xm78,-72v-53,11,-53,12,-69,-15v-1,-12,11,-17,22,-14v71,-13,151,-18,230,-24v11,1,21,16,23,28v-28,20,-90,11,-126,16v-36,5,-62,5,-80,9xm123,-40v19,-17,41,-1,41,17v0,13,-6,19,-17,19v-15,0,-29,-14,-24,-36\",w:293},\"ø\":{d:\"76,-136v17,7,33,-8,51,0v9,-6,21,-13,36,-21v23,22,-13,31,3,50v11,13,4,21,14,35v-4,5,-1,14,-4,23v-14,23,-45,41,-84,39v-12,2,-29,28,-41,38v-2,-11,-34,-10,-15,-30v3,-7,5,-11,5,-11v-15,-24,-60,-54,-22,-89v23,-21,25,-32,57,-34xm102,-54v18,1,50,-19,30,-32v-12,7,-22,18,-30,32xm85,-92v-14,3,-26,8,-38,17v2,20,17,13,26,0v6,-8,12,-13,12,-17\",w:188},\"ù\":{d:\"196,-129v-1,-4,12,-13,15,-13v6,0,8,7,8,21v0,24,-7,25,-13,45v-7,7,-14,21,-24,29v-9,24,-61,45,-89,45v-63,0,-105,-72,-67,-126v24,-3,19,27,18,46v-1,26,23,42,54,40v38,-3,88,-51,98,-87xm126,-166v7,6,56,14,37,40v-28,-7,-62,-22,-100,-42v-2,-3,-2,-26,5,-23v16,4,42,18,58,25\",w:213},\"ú\":{d:\"196,-129v-1,-4,12,-13,15,-13v6,0,8,7,8,21v0,24,-7,25,-13,45v-7,7,-14,21,-24,29v-9,24,-61,45,-89,45v-63,0,-105,-72,-67,-126v24,-3,19,27,18,46v-1,26,23,42,54,40v38,-3,88,-51,98,-87xm106,-174v26,-11,48,-32,59,-14v3,11,-81,53,-89,54v-13,1,-15,-12,-11,-22v15,-7,14,-7,41,-18\",w:213},\"û\":{d:\"196,-129v-1,-4,12,-13,15,-13v6,0,8,7,8,21v0,24,-7,25,-13,45v-7,7,-14,21,-24,29v-9,24,-61,45,-89,45v-63,0,-105,-72,-67,-126v24,-3,19,27,18,46v-1,26,23,42,54,40v38,-3,88,-51,98,-87xm172,-143v-27,-6,-39,-26,-60,-37v-8,0,-10,4,-14,10v-11,15,-49,35,-56,0v17,-4,44,-32,61,-43v27,6,41,21,63,36v12,9,17,17,17,25v0,6,-3,9,-11,9\",w:213},\"ü\":{d:\"196,-129v-1,-4,12,-13,15,-13v6,0,8,7,8,21v0,24,-7,25,-13,45v-7,7,-14,21,-24,29v-9,24,-61,45,-89,45v-63,0,-105,-72,-67,-126v24,-3,19,27,18,46v-1,26,23,42,54,40v38,-3,88,-51,98,-87xm168,-161v0,8,-3,13,-11,13v-17,0,-20,-19,-17,-34v18,-1,29,1,28,21xm72,-186v7,3,29,9,28,18v0,7,-9,18,-18,17v-18,1,-25,-24,-10,-35\",w:213},\"ÿ\":{d:\"118,85v-11,11,-11,38,-22,61v-2,-1,-2,31,-17,27v-11,0,-21,-10,-21,-22v20,-66,23,-61,64,-168v-22,1,-38,16,-58,4v-22,4,-51,-16,-51,-42v-11,-13,-7,-59,7,-58v16,1,21,24,22,51v21,33,66,5,94,-7v4,-3,26,-14,38,-29r17,0v23,44,-23,59,-34,102v-6,9,-13,9,-13,26v-15,6,-12,33,-27,48v0,2,1,4,1,7xm158,-136v0,8,-4,13,-12,13v-18,0,-21,-20,-16,-34v18,-1,29,1,28,21xm62,-161v7,3,28,9,27,18v1,8,-8,17,-17,17v-18,0,-26,-24,-10,-35\",w:190},\"ı\":{d:\"43,-103v21,4,16,56,11,100v-7,2,-11,1,-20,-5v0,-7,-13,-18,-11,-25v4,-23,-3,-68,20,-70\",w:80},\"Œ\":{d:\"247,-243v71,4,161,-7,245,-8v17,0,27,6,27,17v-8,27,-70,14,-104,23v-3,1,-52,0,-65,7r0,4v16,16,17,29,17,65v32,10,74,-14,99,16v-14,25,-76,17,-127,24v-17,18,-55,32,-75,51v85,0,128,-3,204,-11v15,-2,21,11,20,29v-78,24,-177,12,-270,24v-24,3,-24,-29,-48,-15v-46,7,-70,4,-105,-4v-19,-18,-42,-22,-52,-55v-10,-34,0,-47,12,-78v-18,-59,48,-78,105,-84v17,-18,103,-13,117,-5xm125,-45v76,-9,186,-43,209,-105v-26,-67,-137,-83,-217,-54v3,34,-45,25,-60,58v-41,48,5,108,68,101\",w:492},\"œ\":{d:\"185,-54v25,28,107,-17,104,33v-12,12,-60,14,-87,14v0,0,1,1,2,1v-11,1,-39,-9,-50,-17v-28,17,-75,32,-114,7v-22,-14,-34,-11,-34,-41v0,-36,33,-49,48,-75v29,-16,72,-3,95,11v12,-9,48,-27,59,-26v30,0,64,15,65,40v0,7,-6,20,-20,37v-29,1,-44,11,-68,16xm226,-106v-21,-7,-41,-2,-48,13v14,1,42,-7,48,-13xm132,-87v-21,-35,-94,11,-92,24v-2,14,43,21,61,21v25,0,36,-20,31,-45\",w:295},\"Ÿ\":{d:\"176,-189v35,20,-25,54,-39,72v-26,34,-57,57,-74,104v-10,15,-4,14,-23,3r0,-10v19,-44,27,-46,50,-81v-9,-5,-24,4,-34,4v-38,0,-54,-50,-44,-87v21,-5,18,19,22,35v4,18,15,27,29,27v41,0,60,-39,113,-67xm153,-222v0,8,-3,12,-11,12v-18,0,-21,-19,-16,-33v18,-1,28,2,27,21xm57,-247v8,2,29,9,28,17v0,21,-37,24,-36,1v0,-7,2,-13,8,-18\",w:135},\"ƒ\":{d:\"115,-262v-23,6,-39,63,-38,96v1,3,57,2,54,16v1,22,-45,15,-51,30v3,34,12,68,10,103v14,17,-18,53,-28,63v-48,8,-89,5,-95,-37v20,-5,77,21,83,-18v17,-29,-4,-61,0,-98v0,-5,-3,-10,-7,-17v-33,4,-43,-17,-25,-37v10,-4,27,5,27,-10v0,-43,15,-77,32,-109v12,-7,16,-22,38,-20v11,1,51,35,25,55v-9,1,-16,-17,-25,-17\",w:145},\"ˆ\":{d:\"144,-220v-29,0,-41,-27,-63,-39v-8,0,-11,5,-15,11v-17,12,-32,31,-54,13v-2,-5,-3,-9,-4,-14v20,-5,45,-33,64,-45v28,6,43,23,65,38v12,9,19,19,19,27v0,6,-4,9,-12,9\",w:165},\"ˇ\":{d:\"39,-286v33,46,63,-4,96,-16v6,0,9,6,9,19v0,24,-49,46,-77,46v-32,0,-52,-28,-59,-48v0,-25,23,-17,31,-1\",w:153},\"˘\":{d:\"65,-269v20,-11,45,-31,74,-36v20,30,-42,40,-59,66v-5,6,-11,8,-18,8v-8,-3,-45,-32,-51,-54v5,-24,14,-13,34,1\",w:158},\"˙\":{d:\"23,-302v15,-13,32,1,32,18v1,22,-36,29,-39,4v0,0,3,-7,7,-22\",w:70},\"˚\":{d:\"23,-225v-43,-24,-11,-85,41,-78v16,2,31,4,46,17v32,54,-41,86,-87,61xm33,-257v2,20,57,11,57,-6v0,-6,-11,-9,-33,-12v-14,-2,-24,13,-24,18\",w:123},\"˛\":{d:\"82,-5v-8,12,-16,55,-21,75v0,4,2,7,7,7v6,0,22,-7,50,-20v8,0,12,7,12,20v-2,22,-6,14,-27,30v-15,12,-26,16,-30,16v-47,-8,-59,-14,-56,-75v8,-27,12,-54,25,-77v19,-21,35,15,40,24\",w:138},\"˜\":{d:\"47,-300v26,-21,57,19,72,23v4,0,16,-5,36,-14v24,-10,22,-16,32,-13v3,12,-7,11,-7,23v-27,21,-48,32,-62,32v-3,2,-52,-27,-51,-31v-12,-2,-34,40,-54,33v-4,-13,-8,-18,1,-24v5,-7,16,-15,33,-29\",w:186},\"˝\":{d:\"91,-249v15,-11,38,-53,57,-29v0,9,0,14,-3,23v-2,3,-20,22,-54,55v-5,5,-10,8,-16,8v-17,2,-6,-22,-7,-31v-1,0,-2,0,-4,1v-17,21,-29,31,-50,27v-5,-18,-3,-15,3,-27v23,-27,40,-46,48,-59v7,-12,31,3,29,9v-1,14,-3,24,-13,31v4,4,9,-1,10,-8\",w:151},\"–\":{d:\"6,-66v-8,-72,79,-21,146,-39v37,-10,79,7,111,0v9,8,14,13,14,17v2,26,-72,13,-99,21v-83,4,-124,21,-172,1\",w:282},\"—\":{d:\"175,-106v86,-9,201,1,286,-1v11,6,13,11,6,30v-118,15,-246,10,-377,10v-25,0,-73,3,-82,-8r-2,-26v11,-13,32,-9,52,-7v38,3,84,-5,117,2\",w:485},\"‘\":{d:\"73,-262v-10,7,-41,39,-38,69v-15,13,-27,-16,-28,-28v-2,-20,51,-83,66,-83v20,0,25,41,0,42\",w:95},\"’\":{d:\"74,-300v13,31,-1,99,-44,101v-13,0,-19,-5,-19,-15v6,-10,31,-34,35,-59v2,-11,1,-32,11,-32v6,0,11,2,17,5\",w:90},\"‚\":{d:\"25,63v-26,21,-48,-2,-22,-24v14,-12,35,-40,35,-69v3,-2,3,-11,12,-9v35,17,5,88,-25,102\",w:97},\"“\":{d:\"66,-261v-21,5,-37,51,-22,77v0,4,-2,6,-7,6v-31,-9,-38,-62,-12,-94v12,-15,21,-28,31,-34v16,-1,19,24,22,34v10,-11,22,-32,43,-23v-2,8,4,16,5,19v-6,11,-51,53,-29,74v-12,21,-30,5,-33,-17v-6,-13,9,-28,2,-42\",w:118},\"”\":{d:\"120,-294v12,3,30,26,19,34v2,15,-40,70,-55,66v-40,-10,10,-51,14,-64v3,-3,8,-31,22,-36xm70,-306v14,3,26,34,16,49v-19,30,-31,45,-58,59v-12,-11,-33,-17,-7,-36v13,-19,36,-27,36,-59v0,-5,9,-13,13,-13\",w:148},\"„\":{d:\"25,63v-26,21,-48,-2,-22,-24v11,-9,36,-41,35,-69v3,-2,4,-12,12,-9v36,14,5,89,-25,102xm84,64v-24,20,-45,-1,-21,-24v21,-20,32,-35,35,-69v3,-2,3,-11,12,-9v36,17,9,86,-26,102\",w:135},\"†\":{d:\"22,-286v15,6,5,-20,19,-19v9,-3,15,21,17,22v6,1,12,3,20,6v3,10,5,16,-9,16v-34,-10,-6,51,-34,52v-20,-7,11,-47,-15,-49v-14,3,-25,-5,-17,-24v7,-2,14,-4,19,-4\",w:77},\"‡\":{d:\"102,-284v16,2,42,-2,33,18v-7,15,-42,1,-38,30v3,3,31,1,30,11v4,15,-29,19,-36,24v-2,18,-4,24,-16,29r-25,-26v-25,7,-53,3,-42,-25v4,-10,70,0,51,-22v-17,4,-41,12,-39,-15v-5,-16,39,-18,44,-20v4,-2,7,-10,10,-24v19,-3,23,6,28,20\",w:145},\"•\":{d:\"130,-114v0,47,-124,54,-120,-8r6,-31v44,-28,64,-34,104,0v8,6,10,20,10,39\",w:139},\"…\":{d:\"244,-24v-1,21,-38,32,-41,3v-2,-19,23,-22,34,-17v0,7,0,15,7,14xm113,-24v0,-22,28,-21,38,-8v5,34,-39,40,-38,8xm35,-2v-10,-2,-36,-17,-18,-29v-1,-15,17,-17,31,-6v7,17,6,33,-13,35\",w:258},\"‰\":{d:\"398,-131v58,-1,87,13,72,65v-1,30,-66,63,-99,65v-56,3,-99,-58,-62,-102v2,2,5,2,8,2v20,-16,51,-17,81,-30xm202,-279v33,0,94,-24,95,18v-7,31,-33,27,-54,55v-36,32,-71,74,-112,99v-18,18,-40,34,-51,58v-19,14,-25,37,-56,40v-17,2,-25,-29,-10,-40v15,-11,40,-37,52,-52r87,-72v-51,13,-100,6,-116,-27v1,-5,-6,-30,-9,-36v-3,-5,22,-41,27,-39v29,2,16,34,5,49v0,15,14,23,42,23v42,0,59,-31,28,-38v-17,-4,-53,3,-50,-23v0,-7,1,-12,4,-16v16,-9,36,4,49,5v0,0,23,-4,69,-4xm222,-118v33,-2,55,18,50,57v-29,36,-48,45,-96,50v-27,-5,-56,-17,-58,-51v13,-37,64,-43,104,-56xm335,-61v13,44,101,7,108,-31v-11,-3,-20,-4,-30,-4v-18,-1,-82,18,-78,35xm225,-244v-18,0,-29,-1,-46,3v7,15,6,28,0,43v15,-14,34,-30,46,-46xm164,-53v26,5,59,-10,76,-26v-17,-16,-49,2,-67,14v1,8,-8,6,-9,12\",w:485},\"‹\":{d:\"64,-107v9,17,86,17,87,43v0,11,-4,16,-13,16v-36,-11,-70,-22,-109,-31v-19,-4,-18,-14,-9,-36v59,-56,93,-84,101,-84v17,0,19,20,13,29\",w:159},\"›\":{d:\"41,-181v26,27,112,44,70,91r-82,60v-20,3,-25,-23,-13,-32r70,-51r-66,-46v-5,-6,-4,-28,5,-29v4,2,9,4,16,7\",w:137},\"⁄\":{d:\"193,-305v7,6,17,31,3,41v-10,7,-12,13,-21,25v-79,56,-190,209,-197,260r-18,0v-23,-19,9,-70,15,-85v52,-83,121,-179,218,-241\",w:120},\"™\":{d:\"213,-307v28,9,11,49,7,75v-1,4,-4,6,-11,6v-7,1,-11,-14,-11,-34v-14,-6,-34,34,-46,28v-2,0,-10,-9,-24,-27v-10,7,-3,36,-27,31v-15,-24,-3,-27,1,-48v-6,-7,-27,-1,-31,3v-3,14,-7,30,-11,51v-5,10,-29,9,-24,-12v-5,-8,1,-18,3,-35v-13,6,-33,2,-29,-18v20,-17,64,-17,100,-19v28,-1,29,30,45,39v11,-6,35,-32,58,-40\",w:239},\"∆\":{d:\"18,-1v-24,-30,8,-48,25,-71v14,-19,34,-28,40,-56v20,-35,29,-14,57,4v9,39,43,62,57,102v0,16,-34,17,-50,14v-28,2,-72,4,-129,7xm139,-47r-22,-52v-12,-5,-12,15,-24,27v-7,6,-14,16,-23,28v23,1,36,-1,69,-3\",w:199},\"∙\":{d:\"57,-77v6,18,-7,21,-19,23v-34,6,-25,-40,-9,-43v18,-3,29,8,28,20\",w:67},\"√\":{d:\"364,-218v43,-21,80,-51,104,-32v-3,19,-24,21,-44,40v-41,15,-78,53,-136,78r-137,98v-20,16,-79,66,-91,68v-3,1,-25,-11,-24,-13v-4,-28,-43,-61,-30,-85v26,-15,42,19,58,32r295,-188v0,1,2,2,5,2\",w:474},\"∞\":{d:\"322,-72v-4,22,-54,41,-76,41v-43,0,-83,-17,-114,-35v-46,19,-125,53,-128,-18v-1,-14,10,-22,13,-35v29,-10,62,-31,97,-4v37,28,47,5,75,-8v40,-19,73,-10,114,1v13,1,18,55,19,58xm228,-69v15,0,62,-12,61,-25v-19,-23,-89,-10,-105,11v0,2,1,4,2,4v28,6,42,10,42,10xm75,-102v-13,2,-41,4,-44,19v0,4,3,7,10,7v21,0,40,-6,54,-17v-9,-6,-16,-9,-20,-9\",w:330},\"∫\":{d:\"62,-151v-7,-70,20,-130,63,-150v28,1,39,10,70,23v20,8,6,33,-6,35v-29,-13,-45,-20,-49,-20v-20,-4,-45,51,-43,70v8,60,5,129,5,189v0,62,-27,93,-79,93v-37,-1,-71,-14,-63,-57v21,0,79,34,91,-2v16,-3,14,-64,21,-85v-2,-31,-1,-74,-10,-96\",w:156},\"≈\":{d:\"133,-112v21,15,48,-30,78,-17v3,3,5,7,5,9v-8,30,-47,45,-76,45v-19,0,-64,-48,-90,-21r-29,20v-6,-1,-17,-16,-15,-32v24,-17,70,-42,107,-21v4,4,10,9,20,17xm138,-57v28,2,48,-25,76,-26v13,30,-21,42,-40,53v-41,24,-77,-15,-114,-23v-15,14,-46,32,-49,-1v-3,-9,27,-28,54,-30\",w:223},\"≠\":{d:\"48,-130v29,11,49,-57,60,-50v25,6,7,27,-1,46v22,5,29,7,21,22v-18,2,-48,-1,-50,15v9,8,53,-7,54,10v-4,22,-46,20,-72,24v-7,13,-18,32,-34,57v-8,6,-15,-3,-13,-14v-1,-9,15,-39,14,-45v-30,5,-24,-17,-13,-25v12,-1,36,4,29,-13v-14,0,-47,6,-36,-12v0,-18,27,-13,41,-15\",w:140},\"≤\":{d:\"73,-109v10,15,87,16,87,42v0,11,-5,16,-13,16v-36,-11,-69,-24,-109,-31v-18,-8,-18,-13,-9,-36v59,-56,93,-83,101,-83v16,0,18,17,14,28v-27,24,-42,35,-71,64xm10,-29v35,-12,117,-26,148,-3v1,2,-5,19,-8,18r-124,15v-16,2,-26,-18,-16,-30\",w:168},\"≥\":{d:\"115,-174v20,7,53,36,20,57v-19,11,-91,68,-82,59v-18,3,-25,-22,-13,-31v15,-10,14,-10,70,-51r-50,-37v-5,-4,-5,-27,4,-28v16,7,40,17,51,31xm14,-32v33,-10,86,-14,127,-10v12,12,5,23,-11,27v-49,9,-82,13,-99,13v-22,0,-24,-16,-17,-30\",w:163},\"◊\":{d:\"76,-158v48,-8,64,11,100,36v28,19,-5,39,-22,54v-15,13,-40,32,-48,49v-17,5,-12,0,-27,-16v-6,-6,-86,-31,-68,-53r2,-9v27,-23,48,-44,63,-61xm93,-65v12,-2,35,-31,41,-38v-5,-10,-16,-14,-34,-24v-12,12,-36,29,-40,44v19,11,30,18,33,18\",w:199}}}),\"undefined\"==typeof Raphael&&\"undefined\"==typeof Snap)throw new Error(\"Raphael or Snap.svg is required to be included.\");if(_.isEmpty(Diagram.themes))throw new Error(\"No themes were registered. Please call registerTheme(...).\");Diagram.themes.hand=Diagram.themes.snapHand||Diagram.themes.raphaelHand,Diagram.themes.simple=Diagram.themes.snapSimple||Diagram.themes.raphaelSimple,Diagram.prototype.drawSVG=function(container,options){var defaultOptions={theme:\"hand\"};if(options=_.defaults(options||{},defaultOptions),!(options.theme in Diagram.themes))throw new Error(\"Unsupported theme: \"+options.theme);var div=_.isString(container)?document.getElementById(container):container;if(null===div||!div.tagName)throw new Error(\"Invalid container: \"+container);var Theme=Diagram.themes[options.theme];new Theme(this,options,function(drawing){drawing.draw(div)})},\"undefined\"!=typeof jQuery&&!function($){$.fn.sequenceDiagram=function(options){return this.each(function(){var $this=$(this),diagram=Diagram.parse($this.text());$this.html(\"\"),diagram.drawSVG(this,options)})}}(jQuery);var root=\"object\"==typeof self&&self.self==self&&self||\"object\"==typeof global&&global.global==global&&global;\"undefined\"!=typeof exports?(\"undefined\"!=typeof module&&module.exports&&(exports=module.exports=Diagram),exports.Diagram=Diagram):root.Diagram=Diagram}();\n//# sourceMappingURL=sequence-diagram.js"
  },
  {
    "path": "static/editor.md/lib/sequence/sequence-diagram-raphael-min.js",
    "content": "/** js sequence diagrams 2.0.1\n *  https://bramp.github.io/js-sequence-diagrams/\n *  (c) 2012-2017 Andrew Brampton (bramp.net)\n *  @license Simplified BSD license.\n */\n!function(){\"use strict\";function Diagram(){this.title=void 0,this.actors=[],this.signals=[]}function ParseError(message,hash){_.extend(this,hash),this.name=\"ParseError\",this.message=message||\"\"}function AssertException(message){this.message=message}function assert(exp,message){if(!exp)throw new AssertException(message)}function registerTheme(name,theme){Diagram.themes[name]=theme}function getCenterX(box){return box.x+box.width/2}function getCenterY(box){return box.y+box.height/2}function clamp(x,min,max){return x<min?min:x>max?max:x}function wobble(x1,y1,x2,y2){assert(_.all([x1,x2,y1,y2],_.isFinite),\"x1,x2,y1,y2 must be numeric\");var factor=Math.sqrt((x2-x1)*(x2-x1)+(y2-y1)*(y2-y1))/25,r1=clamp(Math.random(),.2,.8),r2=clamp(Math.random(),.2,.8),xfactor=Math.random()>.5?factor:-factor,yfactor=Math.random()>.5?factor:-factor,p1={x:(x2-x1)*r1+x1+xfactor,y:(y2-y1)*r1+y1+yfactor},p2={x:(x2-x1)*r2+x1-xfactor,y:(y2-y1)*r2+y1-yfactor};return\"C\"+p1.x.toFixed(1)+\",\"+p1.y.toFixed(1)+\" \"+p2.x.toFixed(1)+\",\"+p2.y.toFixed(1)+\" \"+x2.toFixed(1)+\",\"+y2.toFixed(1)}function handRect(x,y,w,h){return assert(_.all([x,y,w,h],_.isFinite),\"x, y, w, h must be numeric\"),\"M\"+x+\",\"+y+wobble(x,y,x+w,y)+wobble(x+w,y,x+w,y+h)+wobble(x+w,y+h,x,y+h)+wobble(x,y+h,x,y)}function handLine(x1,y1,x2,y2){return assert(_.all([x1,x2,y1,y2],_.isFinite),\"x1,x2,y1,y2 must be numeric\"),\"M\"+x1.toFixed(1)+\",\"+y1.toFixed(1)+wobble(x1,y1,x2,y2)}Diagram.prototype.getActor=function(alias,name){alias=alias.trim();var i,actors=this.actors;for(i in actors)if(actors[i].alias==alias)return actors[i];return i=actors.push(new Diagram.Actor(alias,name||alias,actors.length)),actors[i-1]},Diagram.prototype.getActorWithAlias=function(input){input=input.trim();var alias,name,s=/([\\s\\S]+) as (\\S+)$/im.exec(input);return s?(name=s[1].trim(),alias=s[2].trim()):name=alias=input,this.getActor(alias,name)},Diagram.prototype.setTitle=function(title){this.title=title},Diagram.prototype.addSignal=function(signal){this.signals.push(signal)},Diagram.Actor=function(alias,name,index){this.alias=alias,this.name=name,this.index=index},Diagram.Signal=function(actorA,signaltype,actorB,message){this.type=\"Signal\",this.actorA=actorA,this.actorB=actorB,this.linetype=3&signaltype,this.arrowtype=signaltype>>2&3,this.message=message},Diagram.Signal.prototype.isSelf=function(){return this.actorA.index==this.actorB.index},Diagram.Note=function(actor,placement,message){if(this.type=\"Note\",this.actor=actor,this.placement=placement,this.message=message,this.hasManyActors()&&actor[0]==actor[1])throw new Error(\"Note should be over two different actors\")},Diagram.Note.prototype.hasManyActors=function(){return _.isArray(this.actor)},Diagram.unescape=function(s){return s.trim().replace(/^\"(.*)\"$/m,\"$1\").replace(/\\\\n/gm,\"\\n\")},Diagram.LINETYPE={SOLID:0,DOTTED:1},Diagram.ARROWTYPE={FILLED:0,OPEN:1},Diagram.PLACEMENT={LEFTOF:0,RIGHTOF:1,OVER:2},\"function\"!=typeof Object.getPrototypeOf&&(\"object\"==typeof\"test\".__proto__?Object.getPrototypeOf=function(object){return object.__proto__}:Object.getPrototypeOf=function(object){return object.constructor.prototype});var parser=function(){function Parser(){this.yy={}}var o=function(k,v,o,l){for(o=o||{},l=k.length;l--;o[k[l]]=v);return o},$V0=[5,8,9,13,15,24],$V1=[1,13],$V2=[1,17],$V3=[24,29,30],parser={trace:function(){},yy:{},symbols_:{error:2,start:3,document:4,EOF:5,line:6,statement:7,NL:8,participant:9,actor_alias:10,signal:11,note_statement:12,title:13,message:14,note:15,placement:16,actor:17,over:18,actor_pair:19,\",\":20,left_of:21,right_of:22,signaltype:23,ACTOR:24,linetype:25,arrowtype:26,LINE:27,DOTLINE:28,ARROW:29,OPENARROW:30,MESSAGE:31,$accept:0,$end:1},terminals_:{2:\"error\",5:\"EOF\",8:\"NL\",9:\"participant\",13:\"title\",15:\"note\",18:\"over\",20:\",\",21:\"left_of\",22:\"right_of\",24:\"ACTOR\",27:\"LINE\",28:\"DOTLINE\",29:\"ARROW\",30:\"OPENARROW\",31:\"MESSAGE\"},productions_:[0,[3,2],[4,0],[4,2],[6,1],[6,1],[7,2],[7,1],[7,1],[7,2],[12,4],[12,4],[19,1],[19,3],[16,1],[16,1],[11,4],[17,1],[10,1],[23,2],[23,1],[25,1],[25,1],[26,1],[26,1],[14,1]],performAction:function(yytext,yyleng,yylineno,yy,yystate,$$,_$){var $0=$$.length-1;switch(yystate){case 1:return yy.parser.yy;case 4:break;case 6:$$[$0];break;case 7:case 8:yy.parser.yy.addSignal($$[$0]);break;case 9:yy.parser.yy.setTitle($$[$0]);break;case 10:this.$=new Diagram.Note($$[$0-1],$$[$0-2],$$[$0]);break;case 11:this.$=new Diagram.Note($$[$0-1],Diagram.PLACEMENT.OVER,$$[$0]);break;case 12:case 20:this.$=$$[$0];break;case 13:this.$=[$$[$0-2],$$[$0]];break;case 14:this.$=Diagram.PLACEMENT.LEFTOF;break;case 15:this.$=Diagram.PLACEMENT.RIGHTOF;break;case 16:this.$=new Diagram.Signal($$[$0-3],$$[$0-2],$$[$0-1],$$[$0]);break;case 17:this.$=yy.parser.yy.getActor(Diagram.unescape($$[$0]));break;case 18:this.$=yy.parser.yy.getActorWithAlias(Diagram.unescape($$[$0]));break;case 19:this.$=$$[$0-1]|$$[$0]<<2;break;case 21:this.$=Diagram.LINETYPE.SOLID;break;case 22:this.$=Diagram.LINETYPE.DOTTED;break;case 23:this.$=Diagram.ARROWTYPE.FILLED;break;case 24:this.$=Diagram.ARROWTYPE.OPEN;break;case 25:this.$=Diagram.unescape($$[$0].substring(1))}},table:[o($V0,[2,2],{3:1,4:2}),{1:[3]},{5:[1,3],6:4,7:5,8:[1,6],9:[1,7],11:8,12:9,13:[1,10],15:[1,12],17:11,24:$V1},{1:[2,1]},o($V0,[2,3]),o($V0,[2,4]),o($V0,[2,5]),{10:14,24:[1,15]},o($V0,[2,7]),o($V0,[2,8]),{14:16,31:$V2},{23:18,25:19,27:[1,20],28:[1,21]},{16:22,18:[1,23],21:[1,24],22:[1,25]},o([20,27,28,31],[2,17]),o($V0,[2,6]),o($V0,[2,18]),o($V0,[2,9]),o($V0,[2,25]),{17:26,24:$V1},{24:[2,20],26:27,29:[1,28],30:[1,29]},o($V3,[2,21]),o($V3,[2,22]),{17:30,24:$V1},{17:32,19:31,24:$V1},{24:[2,14]},{24:[2,15]},{14:33,31:$V2},{24:[2,19]},{24:[2,23]},{24:[2,24]},{14:34,31:$V2},{14:35,31:$V2},{20:[1,36],31:[2,12]},o($V0,[2,16]),o($V0,[2,10]),o($V0,[2,11]),{17:37,24:$V1},{31:[2,13]}],defaultActions:{3:[2,1],24:[2,14],25:[2,15],27:[2,19],28:[2,23],29:[2,24],37:[2,13]},parseError:function(str,hash){if(!hash.recoverable)throw new Error(str);this.trace(str)},parse:function(input){function lex(){var token;return token=lexer.lex()||EOF,\"number\"!=typeof token&&(token=self.symbols_[token]||token),token}var self=this,stack=[0],vstack=[null],lstack=[],table=this.table,yytext=\"\",yylineno=0,yyleng=0,recovering=0,TERROR=2,EOF=1,args=lstack.slice.call(arguments,1),lexer=Object.create(this.lexer),sharedState={yy:{}};for(var k in this.yy)Object.prototype.hasOwnProperty.call(this.yy,k)&&(sharedState.yy[k]=this.yy[k]);lexer.setInput(input,sharedState.yy),sharedState.yy.lexer=lexer,sharedState.yy.parser=this,\"undefined\"==typeof lexer.yylloc&&(lexer.yylloc={});var yyloc=lexer.yylloc;lstack.push(yyloc);var ranges=lexer.options&&lexer.options.ranges;\"function\"==typeof sharedState.yy.parseError?this.parseError=sharedState.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var symbol,preErrorSymbol,state,action,r,p,len,newState,expected,yyval={};;){if(state=stack[stack.length-1],this.defaultActions[state]?action=this.defaultActions[state]:(null!==symbol&&\"undefined\"!=typeof symbol||(symbol=lex()),action=table[state]&&table[state][symbol]),\"undefined\"==typeof action||!action.length||!action[0]){var errStr=\"\";expected=[];for(p in table[state])this.terminals_[p]&&p>TERROR&&expected.push(\"'\"+this.terminals_[p]+\"'\");errStr=lexer.showPosition?\"Parse error on line \"+(yylineno+1)+\":\\n\"+lexer.showPosition()+\"\\nExpecting \"+expected.join(\", \")+\", got '\"+(this.terminals_[symbol]||symbol)+\"'\":\"Parse error on line \"+(yylineno+1)+\": Unexpected \"+(symbol==EOF?\"end of input\":\"'\"+(this.terminals_[symbol]||symbol)+\"'\"),this.parseError(errStr,{text:lexer.match,token:this.terminals_[symbol]||symbol,line:lexer.yylineno,loc:yyloc,expected:expected})}if(action[0]instanceof Array&&action.length>1)throw new Error(\"Parse Error: multiple actions possible at state: \"+state+\", token: \"+symbol);switch(action[0]){case 1:stack.push(symbol),vstack.push(lexer.yytext),lstack.push(lexer.yylloc),stack.push(action[1]),symbol=null,preErrorSymbol?(symbol=preErrorSymbol,preErrorSymbol=null):(yyleng=lexer.yyleng,yytext=lexer.yytext,yylineno=lexer.yylineno,yyloc=lexer.yylloc,recovering>0&&recovering--);break;case 2:if(len=this.productions_[action[1]][1],yyval.$=vstack[vstack.length-len],yyval._$={first_line:lstack[lstack.length-(len||1)].first_line,last_line:lstack[lstack.length-1].last_line,first_column:lstack[lstack.length-(len||1)].first_column,last_column:lstack[lstack.length-1].last_column},ranges&&(yyval._$.range=[lstack[lstack.length-(len||1)].range[0],lstack[lstack.length-1].range[1]]),r=this.performAction.apply(yyval,[yytext,yyleng,yylineno,sharedState.yy,action[1],vstack,lstack].concat(args)),\"undefined\"!=typeof r)return r;len&&(stack=stack.slice(0,-1*len*2),vstack=vstack.slice(0,-1*len),lstack=lstack.slice(0,-1*len)),stack.push(this.productions_[action[1]][0]),vstack.push(yyval.$),lstack.push(yyval._$),newState=table[stack[stack.length-2]][stack[stack.length-1]],stack.push(newState);break;case 3:return!0}}return!0}},lexer=function(){var lexer={EOF:1,parseError:function(str,hash){if(!this.yy.parser)throw new Error(str);this.yy.parser.parseError(str,hash)},setInput:function(input,yy){return this.yy=yy||this.yy||{},this._input=input,this._more=this._backtrack=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.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var ch=this._input[0];this.yytext+=ch,this.yyleng++,this.offset++,this.match+=ch,this.matched+=ch;var lines=ch.match(/(?:\\r\\n?|\\n).*/g);return lines?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),ch},unput:function(ch){var len=ch.length,lines=ch.split(/(?:\\r\\n?|\\n)/g);this._input=ch+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-len),this.offset-=len;var oldLines=this.match.split(/(?:\\r\\n?|\\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),lines.length-1&&(this.yylineno-=lines.length-1);var r=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:lines?(lines.length===oldLines.length?this.yylloc.first_column:0)+oldLines[oldLines.length-lines.length].length-lines[0].length:this.yylloc.first_column-len},this.options.ranges&&(this.yylloc.range=[r[0],r[0]+this.yyleng-len]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError(\"Lexical error on line \"+(this.yylineno+1)+\". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\\n\"+this.showPosition(),{text:\"\",token:null,line:this.yylineno})},less:function(n){this.unput(this.match.slice(n))},pastInput:function(){var past=this.matched.substr(0,this.matched.length-this.match.length);return(past.length>20?\"...\":\"\")+past.substr(-20).replace(/\\n/g,\"\")},upcomingInput:function(){var next=this.match;return next.length<20&&(next+=this._input.substr(0,20-next.length)),(next.substr(0,20)+(next.length>20?\"...\":\"\")).replace(/\\n/g,\"\")},showPosition:function(){var pre=this.pastInput(),c=new Array(pre.length+1).join(\"-\");return pre+this.upcomingInput()+\"\\n\"+c+\"^\"},test_match:function(match,indexed_rule){var token,lines,backup;if(this.options.backtrack_lexer&&(backup={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(backup.yylloc.range=this.yylloc.range.slice(0))),lines=match[0].match(/(?:\\r\\n?|\\n).*/g),lines&&(this.yylineno+=lines.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:lines?lines[lines.length-1].length-lines[lines.length-1].match(/\\r?\\n?/)[0].length:this.yylloc.last_column+match[0].length},this.yytext+=match[0],this.match+=match[0],this.matches=match,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(match[0].length),this.matched+=match[0],token=this.performAction.call(this,this.yy,this,indexed_rule,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),token)return token;if(this._backtrack){for(var k in backup)this[k]=backup[k];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var token,match,tempMatch,index;this._more||(this.yytext=\"\",this.match=\"\");for(var rules=this._currentRules(),i=0;i<rules.length;i++)if(tempMatch=this._input.match(this.rules[rules[i]]),tempMatch&&(!match||tempMatch[0].length>match[0].length)){if(match=tempMatch,index=i,this.options.backtrack_lexer){if(token=this.test_match(tempMatch,rules[i]),token!==!1)return token;if(this._backtrack){match=!1;continue}return!1}if(!this.options.flex)break}return match?(token=this.test_match(match,rules[index]),token!==!1&&token):\"\"===this._input?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 r=this.next();return r?r:this.lex()},begin:function(condition){this.conditionStack.push(condition)},popState:function(){var n=this.conditionStack.length-1;return n>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(n){return n=this.conditionStack.length-1-Math.abs(n||0),n>=0?this.conditionStack[n]:\"INITIAL\"},pushState:function(condition){this.begin(condition)},stateStackSize:function(){return this.conditionStack.length},options:{\"case-insensitive\":!0},performAction:function(yy,yy_,$avoiding_name_collisions,YY_START){switch($avoiding_name_collisions){case 0:return 8;case 1:break;case 2:break;case 3:return 9;case 4:return 21;case 5:return 22;case 6:return 18;case 7:return 15;case 8:return 13;case 9:return 20;case 10:return 24;case 11:return 24;case 12:return 28;case 13:return 27;case 14:return 30;case 15:return 29;case 16:return 31;case 17:return 5;case 18:return\"INVALID\"}},rules:[/^(?:[\\r\\n]+)/i,/^(?:\\s+)/i,/^(?:#[^\\r\\n]*)/i,/^(?:participant\\b)/i,/^(?:left of\\b)/i,/^(?:right of\\b)/i,/^(?:over\\b)/i,/^(?:note\\b)/i,/^(?:title\\b)/i,/^(?:,)/i,/^(?:[^\\->:,\\r\\n\"]+)/i,/^(?:\"[^\"]+\")/i,/^(?:--)/i,/^(?:-)/i,/^(?:>>)/i,/^(?:>)/i,/^(?:[^\\r\\n]+)/i,/^(?:$)/i,/^(?:.)/i],conditions:{INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18],inclusive:!0}}};return lexer}();return parser.lexer=lexer,Parser.prototype=parser,parser.Parser=Parser,new Parser}();\"undefined\"!=typeof require&&\"undefined\"!=typeof exports&&(exports.parser=parser,exports.Parser=parser.Parser,exports.parse=function(){return parser.parse.apply(parser,arguments)},exports.main=function(args){args[1]||(console.log(\"Usage: \"+args[0]+\" FILE\"),process.exit(1));var source=require(\"fs\").readFileSync(require(\"path\").normalize(args[1]),\"utf8\");return exports.parser.parse(source)},\"undefined\"!=typeof module&&require.main===module&&exports.main(process.argv.slice(1))),ParseError.prototype=new Error,Diagram.ParseError=ParseError,Diagram.parse=function(input){parser.yy=new Diagram,parser.yy.parseError=function(message,hash){throw new ParseError(message,hash)};var diagram=parser.parse(input);return delete diagram.parseError,diagram};var DIAGRAM_MARGIN=10,ACTOR_MARGIN=10,ACTOR_PADDING=10,SIGNAL_MARGIN=5,SIGNAL_PADDING=5,NOTE_MARGIN=10,NOTE_PADDING=5,NOTE_OVERLAP=15,TITLE_MARGIN=0,TITLE_PADDING=5,SELF_SIGNAL_WIDTH=20,PLACEMENT=Diagram.PLACEMENT,LINETYPE=Diagram.LINETYPE,ARROWTYPE=Diagram.ARROWTYPE,ALIGN_LEFT=0,ALIGN_CENTER=1;AssertException.prototype.toString=function(){return\"AssertException: \"+this.message},String.prototype.trim||(String.prototype.trim=function(){return this.replace(/^\\s+|\\s+$/g,\"\")}),Diagram.themes={};var BaseTheme=function(diagram,options){this.init(diagram,options)};if(_.extend(BaseTheme.prototype,{init:function(diagram,options){this.diagram=diagram,this.actorsHeight_=0,this.signalsHeight_=0,this.title_=void 0},setupPaper:function(container){},draw:function(container){this.setupPaper(container),this.layout();var titleHeight=this.title_?this.title_.height:0,y=DIAGRAM_MARGIN+titleHeight;this.drawTitle(),this.drawActors(y),this.drawSignals(y+this.actorsHeight_)},layout:function(){function actorEnsureDistance(a,b,d){assert(a<b,\"a must be less than or equal to b\"),a<0?(b=actors[b],b.x=Math.max(d-b.width/2,b.x)):b>=actors.length?(a=actors[a],a.paddingRight=Math.max(d,a.paddingRight)):(a=actors[a],a.distances[b]=Math.max(d,a.distances[b]?a.distances[b]:0))}var diagram=this.diagram,font=this.font_,actors=diagram.actors,signals=diagram.signals;if(diagram.width=0,diagram.height=0,diagram.title){var title=this.title_={},bb=this.textBBox(diagram.title,font);title.textBB=bb,title.message=diagram.title,title.width=bb.width+2*(TITLE_PADDING+TITLE_MARGIN),title.height=bb.height+2*(TITLE_PADDING+TITLE_MARGIN),title.x=DIAGRAM_MARGIN,title.y=DIAGRAM_MARGIN,diagram.width+=title.width,diagram.height+=title.height}_.each(actors,function(a){var bb=this.textBBox(a.name,font);a.textBB=bb,a.x=0,a.y=0,a.width=bb.width+2*(ACTOR_PADDING+ACTOR_MARGIN),a.height=bb.height+2*(ACTOR_PADDING+ACTOR_MARGIN),a.distances=[],a.paddingRight=0,this.actorsHeight_=Math.max(a.height,this.actorsHeight_)},this),_.each(signals,function(s){var a,b,bb=this.textBBox(s.message,font);s.textBB=bb,s.width=bb.width,s.height=bb.height;var extraWidth=0;if(\"Signal\"==s.type)s.width+=2*(SIGNAL_MARGIN+SIGNAL_PADDING),s.height+=2*(SIGNAL_MARGIN+SIGNAL_PADDING),s.isSelf()?(a=s.actorA.index,b=a+1,s.width+=SELF_SIGNAL_WIDTH):(a=Math.min(s.actorA.index,s.actorB.index),b=Math.max(s.actorA.index,s.actorB.index));else{if(\"Note\"!=s.type)throw new Error(\"Unhandled signal type:\"+s.type);if(s.width+=2*(NOTE_MARGIN+NOTE_PADDING),s.height+=2*(NOTE_MARGIN+NOTE_PADDING),extraWidth=2*ACTOR_MARGIN,s.placement==PLACEMENT.LEFTOF)b=s.actor.index,a=b-1;else if(s.placement==PLACEMENT.RIGHTOF)a=s.actor.index,b=a+1;else if(s.placement==PLACEMENT.OVER&&s.hasManyActors())a=Math.min(s.actor[0].index,s.actor[1].index),b=Math.max(s.actor[0].index,s.actor[1].index),extraWidth=-(2*NOTE_PADDING+2*NOTE_OVERLAP);else if(s.placement==PLACEMENT.OVER)return a=s.actor.index,actorEnsureDistance(a-1,a,s.width/2),actorEnsureDistance(a,a+1,s.width/2),void(this.signalsHeight_+=s.height)}actorEnsureDistance(a,b,s.width+extraWidth),this.signalsHeight_+=s.height},this);var actorsX=0;return _.each(actors,function(a){a.x=Math.max(actorsX,a.x),_.each(a.distances,function(distance,b){\"undefined\"!=typeof distance&&(b=actors[b],distance=Math.max(distance,a.width/2,b.width/2),b.x=Math.max(b.x,a.x+a.width/2+distance-b.width/2))}),actorsX=a.x+a.width+a.paddingRight},this),diagram.width=Math.max(actorsX,diagram.width),diagram.width+=2*DIAGRAM_MARGIN,diagram.height+=2*DIAGRAM_MARGIN+2*this.actorsHeight_+this.signalsHeight_,this},textBBox:function(text,font){},drawTitle:function(){var title=this.title_;title&&this.drawTextBox(title,title.message,TITLE_MARGIN,TITLE_PADDING,this.font_,ALIGN_LEFT)},drawActors:function(offsetY){var y=offsetY;_.each(this.diagram.actors,function(a){this.drawActor(a,y,this.actorsHeight_),this.drawActor(a,y+this.actorsHeight_+this.signalsHeight_,this.actorsHeight_);var aX=getCenterX(a);this.drawLine(aX,y+this.actorsHeight_-ACTOR_MARGIN,aX,y+this.actorsHeight_+ACTOR_MARGIN+this.signalsHeight_)},this)},drawActor:function(actor,offsetY,height){actor.y=offsetY,actor.height=height,this.drawTextBox(actor,actor.name,ACTOR_MARGIN,ACTOR_PADDING,this.font_,ALIGN_CENTER)},drawSignals:function(offsetY){var y=offsetY;_.each(this.diagram.signals,function(s){\"Signal\"==s.type?s.isSelf()?this.drawSelfSignal(s,y):this.drawSignal(s,y):\"Note\"==s.type&&this.drawNote(s,y),y+=s.height},this)},drawSelfSignal:function(signal,offsetY){assert(signal.isSelf(),\"signal must be a self signal\");var textBB=signal.textBB,aX=getCenterX(signal.actorA),x=aX+SELF_SIGNAL_WIDTH+SIGNAL_PADDING,y=offsetY+SIGNAL_PADDING+signal.height/2+textBB.y;this.drawText(x,y,signal.message,this.font_,ALIGN_LEFT);var y1=offsetY+SIGNAL_MARGIN+SIGNAL_PADDING,y2=y1+signal.height-2*SIGNAL_MARGIN-SIGNAL_PADDING;this.drawLine(aX,y1,aX+SELF_SIGNAL_WIDTH,y1,signal.linetype),this.drawLine(aX+SELF_SIGNAL_WIDTH,y1,aX+SELF_SIGNAL_WIDTH,y2,signal.linetype),this.drawLine(aX+SELF_SIGNAL_WIDTH,y2,aX,y2,signal.linetype,signal.arrowtype)},drawSignal:function(signal,offsetY){var aX=getCenterX(signal.actorA),bX=getCenterX(signal.actorB),x=(bX-aX)/2+aX,y=offsetY+SIGNAL_MARGIN+2*SIGNAL_PADDING;this.drawText(x,y,signal.message,this.font_,ALIGN_CENTER),y=offsetY+signal.height-SIGNAL_MARGIN-SIGNAL_PADDING,this.drawLine(aX,y,bX,y,signal.linetype,signal.arrowtype)},drawNote:function(note,offsetY){note.y=offsetY;var actorA=note.hasManyActors()?note.actor[0]:note.actor,aX=getCenterX(actorA);switch(note.placement){case PLACEMENT.RIGHTOF:note.x=aX+ACTOR_MARGIN;break;case PLACEMENT.LEFTOF:note.x=aX-ACTOR_MARGIN-note.width;break;case PLACEMENT.OVER:if(note.hasManyActors()){var bX=getCenterX(note.actor[1]),overlap=NOTE_OVERLAP+NOTE_PADDING;note.x=Math.min(aX,bX)-overlap,note.width=Math.max(aX,bX)+overlap-note.x}else note.x=aX-note.width/2;break;default:throw new Error(\"Unhandled note placement: \"+note.placement)}return this.drawTextBox(note,note.message,NOTE_MARGIN,NOTE_PADDING,this.font_,ALIGN_LEFT)},drawTextBox:function(box,text,margin,padding,font,align){var x=box.x+margin,y=box.y+margin,w=box.width-2*margin,h=box.height-2*margin;return this.drawRect(x,y,w,h),align==ALIGN_CENTER?(x=getCenterX(box),y=getCenterY(box)):(x+=padding,y+=padding),this.drawText(x,y,text,font,align)}}),\"undefined\"!=typeof Raphael){var LINE={stroke:\"#000000\",\"stroke-width\":2,fill:\"none\"},RECT={stroke:\"#000000\",\"stroke-width\":2,fill:\"#fff\"};Raphael.fn.line=function(x1,y1,x2,y2){return assert(_.all([x1,x2,y1,y2],_.isFinite),\"x1,x2,y1,y2 must be numeric\"),this.path(\"M{0},{1} L{2},{3}\",x1,y1,x2,y2)};var RaphaelTheme=function(diagram,options,resume){this.init(diagram,_.defaults(options,{\"font-size\":16,\"font-family\":\"Andale Mono, monospace\"}),resume)};_.extend(RaphaelTheme.prototype,BaseTheme.prototype,{init:function(diagram,options,resume){BaseTheme.prototype.init.call(this,diagram),this.paper_=void 0,this.font_={\"font-size\":options[\"font-size\"],\"font-family\":options[\"font-family\"]};var a=this.arrowTypes_={};a[ARROWTYPE.FILLED]=\"block\",a[ARROWTYPE.OPEN]=\"open\";var l=this.lineTypes_={};l[LINETYPE.SOLID]=\"\",l[LINETYPE.DOTTED]=\"-\",resume(this)},setupPaper:function(container){this.paper_=new Raphael(container,320,200),this.paper_.setStart()},draw:function(container){BaseTheme.prototype.draw.call(this,container),this.paper_.setFinish()},layout:function(){BaseTheme.prototype.layout.call(this),this.paper_.setSize(this.diagram.width,this.diagram.height)},cleanText:function(text){return text=_.invoke(text.split(\"\\n\"),\"trim\"),text.join(\"\\n\")},textBBox:function(text,font){text=this.cleanText(text),font=font||{};var p;font.obj_?p=this.paper_.print(0,0,text,font.obj_,font[\"font-size\"]):(p=this.paper_.text(0,0,text),p.attr(font));var bb=p.getBBox();return p.remove(),bb},drawLine:function(x1,y1,x2,y2,linetype,arrowhead){var line=this.paper_.line(x1,y1,x2,y2).attr(LINE);return void 0!==arrowhead&&line.attr(\"arrow-end\",this.arrowTypes_[arrowhead]+\"-wide-long\"),void 0!==arrowhead&&line.attr(\"stroke-dasharray\",this.lineTypes_[linetype]),line},drawRect:function(x,y,w,h){return this.paper_.rect(x,y,w,h).attr(RECT)},drawText:function(x,y,text,font,align){text=this.cleanText(text),font=font||{},align=align||ALIGN_LEFT;var paper=this.paper_,bb=this.textBBox(text,font);align==ALIGN_CENTER&&(x-=bb.width/2,y-=bb.height/2);var t;return font.obj_?t=paper.print(x-bb.x,y-bb.y,text,font.obj_,font[\"font-size\"]):(t=paper.text(x-bb.x-bb.width/2,y-bb.y,text),t.attr(font),t.attr({\"text-anchor\":\"start\"})),t}});var RaphaelHandTheme=function(diagram,options,resume){this.init(diagram,_.defaults(options,{\"font-size\":16,\"font-family\":\"daniel\"}),resume)};_.extend(RaphaelHandTheme.prototype,RaphaelTheme.prototype,{setupPaper:function(container){RaphaelTheme.prototype.setupPaper.call(this,container),this.font_.obj_=this.paper_.getFont(\"daniel\")},drawLine:function(x1,y1,x2,y2,linetype,arrowhead){var line=this.paper_.path(handLine(x1,y1,x2,y2)).attr(LINE);return void 0!==arrowhead&&line.attr(\"arrow-end\",this.arrowTypes_[arrowhead]+\"-wide-long\"),void 0!==arrowhead&&line.attr(\"stroke-dasharray\",this.lineTypes_[linetype]),line},drawRect:function(x,y,w,h){return this.paper_.path(handRect(x,y,w,h)).attr(RECT)}}),registerTheme(\"raphaelSimple\",RaphaelTheme),registerTheme(\"raphaelHand\",RaphaelHandTheme)}if(\"undefined\"!=typeof Raphael&&Raphael.registerFont({w:209,face:{\"font-family\":\"Daniel\",\"font-weight\":700,\"font-stretch\":\"normal\",\"units-per-em\":\"360\",\"panose-1\":\"2 11 8 0 0 0 0 0 0 0\",ascent:\"288\",descent:\"-72\",\"x-height\":\"7\",bbox:\"-92.0373 -310.134 519 184.967\",\"underline-thickness\":\"3.51562\",\"underline-position\":\"-25.1367\",\"unicode-range\":\"U+0009-U+F002\"},glyphs:{\" \":{w:179},\"\\t\":{w:179},\"\\r\":{w:179},\"!\":{d:\"66,-306v9,3,18,11,19,24v-18,73,-20,111,-37,194v0,10,2,34,-12,34v-12,0,-18,-9,-18,-28v0,-85,23,-136,38,-214v1,-7,4,-10,10,-10xm25,-30v15,-1,28,34,5,35v-11,-1,-38,-36,-5,-35\",w:115},'\"':{d:\"91,-214v-32,3,-25,-40,-20,-68v3,-16,7,-25,12,-27v35,13,14,56,8,95xm8,-231v4,-31,1,-40,18,-75v37,7,11,51,11,79v-3,3,-4,8,-5,13v-17,4,-16,-10,-24,-17\",w:117},\"#\":{d:\"271,-64v-30,26,-96,-7,-102,51v-6,2,-13,2,-24,-2v-2,-11,10,-21,2,-28v-14,5,-48,0,-48,22v0,23,-11,14,-29,10v-7,-6,6,-19,-1,-24r-32,4v-19,-8,-15,-24,5,-28r33,-6v4,0,24,-23,11,-27v-26,0,-63,14,-74,-10v3,-1,9,-17,16,-10v15,-8,81,4,89,-30v8,-14,16,-34,24,-38v23,9,24,38,5,49v37,24,55,-38,72,-43v19,10,20,23,-1,45v2,8,23,1,29,4v3,3,6,6,10,11v-14,13,-20,12,-45,12v-17,0,-16,17,-19,29v18,-7,49,3,67,-2v4,0,8,4,12,11xm161,-104v-30,-1,-44,10,-44,37v14,1,24,0,40,-5v0,-1,3,-10,8,-26v0,-4,-1,-6,-4,-6\",w:285},$:{d:\"164,-257v29,4,1,42,-3,50v5,5,38,13,41,24v8,4,6,15,-2,21v-18,3,-36,-17,-49,-17v-17,1,-31,40,-28,48v5,4,8,8,9,10v13,1,35,37,28,44v-10,21,-36,20,-65,28v-10,10,-12,40,-17,51v-9,-3,-28,1,-18,-17v0,-13,5,-24,-1,-35v-18,1,-59,-10,-42,-29v21,0,56,16,55,-16v5,-4,9,-18,9,-26v-14,-15,-55,-41,-53,-65v2,-33,56,-19,98,-26v10,-14,31,-43,38,-45xm93,-152v11,-10,15,-15,14,-29v-17,-3,-37,1,-43,6v10,12,20,19,29,23xm111,-103v-8,1,-11,12,-10,22v10,0,28,2,27,-8v0,-4,-13,-15,-17,-14\",w:225},\"%\":{d:\"181,-96v24,-7,67,-13,104,1v14,18,21,19,22,44v-13,43,-99,61,-146,36v-9,-9,-22,-11,-32,-29v0,-27,24,-53,52,-52xm139,-185v-9,68,-138,73,-131,-5v0,-3,3,-9,9,-17v13,1,27,1,17,-16v5,-39,63,0,93,-6v36,1,80,-9,102,11v15,32,12,32,-8,56v-16,21,-103,78,-152,125r-14,28v-23,11,-25,-7,-29,-20v34,-71,133,-98,171,-162v-13,-12,-52,-5,-61,1v0,1,1,3,3,5xm38,-190v0,34,55,29,70,8v0,-14,-20,-11,-32,-14v-14,-3,-24,-9,-40,-10v1,0,5,11,2,16xm172,-53v12,27,90,18,102,-5v-18,-7,-32,-10,-40,-10v-29,3,-57,-4,-62,15\",w:308},\"&\":{d:\"145,-82v17,-8,47,-15,71,-26v13,2,25,12,9,23v-23,7,-40,16,-53,27r0,6v13,8,30,21,36,38v0,8,-4,12,-11,12v-19,0,-43,-39,-59,-44v-30,12,-65,29,-97,32v-32,3,-45,-41,-23,-63v21,-20,52,-26,70,-48v-4,-31,-12,-47,9,-73v13,-16,20,-29,23,-39v15,-15,32,-22,51,-22v30,9,62,64,32,96v-2,3,-47,42,-69,48v-15,8,-11,9,0,22v6,7,10,11,11,11xm114,-138v25,-13,62,-38,74,-62v0,-9,-10,-31,-20,-29v-28,7,-60,42,-60,75v0,10,2,15,6,16xm99,-91v-18,10,-54,18,-59,45v26,5,61,-12,77,-22v-1,-5,-13,-23,-18,-23\",w:253},\"'\":{d:\"36,-182v-36,7,-34,-61,-17,-80v15,1,21,19,21,20r-1,-1v0,0,-1,12,-5,35v1,5,3,17,2,26\",w:63},\"(\":{d:\"130,-306v13,2,23,43,-1,43v-49,43,-77,77,-90,148v5,49,27,67,64,101v4,14,5,6,2,19r-15,0v-35,-17,-79,-58,-79,-120v0,-58,66,-176,119,-191\",w:120},\")\":{d:\"108,-138v-2,73,-48,120,-98,153v-17,-5,-16,-20,-6,-31v52,-64,73,-62,74,-135v1,-42,-40,-98,-58,-128v0,-5,-1,-12,-2,-22v18,-18,25,0,42,27v25,39,50,66,48,136\",w:120},\"*\":{d:\"121,-271v15,-5,36,-8,40,9v-5,10,-31,19,-47,31v0,11,34,43,14,53v-18,8,-24,-24,-34,-20v-4,10,-4,19,-12,41v-25,7,-15,-30,-17,-47v-13,-1,-17,9,-46,30r-10,0v-20,-32,37,-43,54,-64v-10,-11,-36,-33,-16,-51v3,0,14,8,33,24v8,-10,26,-39,32,-42v14,7,15,23,9,36\",w:177},\"+\":{d:\"163,-64v-7,22,-65,2,-77,21v-2,10,-6,21,-11,35v-20,4,-21,-12,-19,-29v3,-23,-44,6,-39,-27v-8,-22,36,-8,49,-18v8,-13,6,-36,24,-40v19,-4,14,32,11,39v18,3,19,2,54,8v2,1,5,5,8,11\",w:170},\",\":{d:\"25,63v-26,21,-48,-2,-22,-24v14,-12,35,-40,35,-69v3,-2,3,-11,12,-9v35,17,5,88,-25,102\",w:97},\"-\":{d:\"57,-94v19,4,55,-5,54,17v-15,23,-54,20,-91,15v-4,2,-13,-10,-11,-16v-1,-22,28,-15,48,-16\",w:124},\".\":{d:\"40,-48v21,20,21,44,-4,44v-33,0,-26,-24,-10,-44r14,0\",w:67},\"/\":{d:\"21,20v-22,-45,21,-95,41,-126v38,-57,115,-158,193,-201v2,0,4,3,7,11v11,29,-15,34,-25,55v-81,56,-189,208,-197,261r-19,0\",w:275},0:{d:\"78,-237v70,-47,269,-41,270,59v0,34,-11,53,-29,76v-13,35,-30,32,-85,64v-6,2,-10,6,-7,8v-73,14,-98,38,-173,1v-7,-13,-52,-48,-46,-88v9,-57,27,-75,70,-120xm123,-38v100,0,202,-46,195,-153v-32,-55,-144,-73,-211,-35v-16,34,-68,54,-53,108v6,25,1,22,-3,39v6,24,41,41,72,41\",w:353},1:{d:\"39,-208v0,-14,6,-59,29,-39v3,4,6,13,10,24r-22,128r8,87v-4,6,-9,3,-16,2v-44,-38,-9,-137,-9,-202\",w:93},2:{d:\"88,-35v47,-10,119,-24,168,-9v0,12,-23,13,-35,16v1,1,3,1,5,1v-74,8,-118,23,-194,23v-14,0,-20,-13,-21,-28v55,-40,83,-61,123,-104v26,-13,65,-67,71,-102v-1,-9,-11,-16,-22,-16v-20,-1,-120,29,-156,49v-10,-2,-30,-20,-10,-28v50,-21,111,-51,178,-48v25,10,44,22,36,39v12,30,-19,64,-34,83v-39,48,-37,39,-115,109v0,5,-3,8,-8,11v4,3,8,4,14,4\",w:265},3:{d:\"188,-282v34,-10,74,25,47,51v-19,32,-55,50,-92,70v28,14,116,25,108,70v8,14,-49,40,-63,48v-29,9,-130,22,-168,42v-6,-5,-19,-7,-12,-22v56,-36,175,-21,210,-76v-9,-20,-88,-42,-97,-33v-20,-1,-41,2,-56,-7r5,-21v56,-25,103,-36,137,-78v1,-1,2,-5,4,-11v-15,-14,-56,7,-79,0v-10,9,-73,22,-92,31v-11,-4,-28,-23,-13,-30v50,-22,96,-26,154,-37v0,-1,8,3,7,3\",w:260},4:{d:\"79,-249v-7,17,-29,75,-33,96v0,6,3,8,8,8v43,-2,111,6,141,-6v17,-47,20,-100,63,-148v9,4,16,7,21,10v-17,31,-44,95,-51,141v7,4,24,-4,23,10v-1,16,-29,12,-31,23v-10,22,-9,69,-7,103v-3,2,-7,5,-10,9v-47,-11,-23,-74,-16,-114v0,-4,-2,-6,-7,-6v-65,2,-89,13,-162,4v-22,-22,-2,-53,5,-76v16,-15,17,-57,35,-70v6,-1,21,11,21,16\",w:267},5:{d:\"185,-272v30,7,45,-8,53,18v1,16,-17,18,-34,14v0,0,-95,-11,-129,1v-6,9,-24,33,-29,54v76,10,171,5,214,47v11,11,22,30,5,52v-14,12,-30,14,-34,27v-26,11,-141,63,-157,60v-16,-2,-25,-19,-4,-27v48,-18,128,-39,170,-86v4,-14,-65,-41,-85,-41r-92,0v-10,-4,-66,-1,-57,-23v0,-23,23,-51,35,-83v11,-28,133,-10,144,-13\",w:284},6:{d:\"70,-64v9,-51,63,-74,123,-71v43,2,109,3,111,41r-25,47v0,1,1,2,2,3v-5,0,-39,10,-41,20v-15,3,-22,4,-22,11v-39,1,-77,20,-119,13v-42,-7,-35,-9,-77,-46v-56,-118,94,-201,176,-229v7,0,21,8,20,15v-2,17,-23,15,-43,24v-69,31,-119,72,-134,145v-5,25,36,68,78,64v59,-6,128,-18,153,-61v-7,-14,-13,-9,-32,-21v-67,-15,-118,-5,-150,43r0,12v-13,4,-17,-3,-20,-10\",w:310},7:{d:\"37,-228v33,-14,173,-17,181,-19v28,-1,24,31,9,45v-17,15,-45,49,-59,69v-17,26,-55,67,-61,113v-10,13,-9,14,-14,20v-33,-13,-20,-25,-11,-53v16,-48,73,-115,109,-156v2,-7,5,-14,-10,-12v-26,4,-54,6,-76,13v-23,-5,-83,31,-94,-9v2,-8,18,-19,26,-11\",w:245},8:{d:\"57,-236v40,-50,166,-51,213,-10v22,28,10,63,-22,78r-35,17v8,5,54,24,53,44v-5,14,-4,33,-18,42v-13,13,-35,18,-44,34v-60,27,-190,49,-194,-42v7,-41,17,-54,59,-70r0,-4v-32,-9,-73,-62,-26,-85v4,0,8,-2,14,-4xm142,-160v24,-2,160,-31,99,-72v-28,-18,-108,-33,-146,-5v-16,12,-28,30,-33,59v24,12,37,20,80,18xm41,-62v30,65,189,6,199,-37v3,-14,-60,-30,-74,-30v-70,0,-118,10,-125,67\",\nw:290},9:{d:\"11,-192v15,-49,119,-61,161,-23v16,15,27,55,11,79v-20,62,-51,79,-96,118v-10,4,-45,27,-50,6v9,-15,66,-52,98,-99v-7,-7,-8,-3,-25,0v-49,-11,-96,-25,-99,-81xm145,-131v7,-5,13,-34,13,-41v-2,-51,-104,-38,-114,-6v-2,10,37,35,46,35v23,1,43,-1,55,12\",w:198},\":\":{d:\"39,-125v15,-8,40,-1,40,15v0,15,-6,22,-19,22v-13,0,-29,-21,-21,-37xm66,-17v-8,27,-51,19,-46,-8v-1,-6,8,-22,14,-20v29,0,30,6,32,28\",w:95},\";\":{d:\"56,-93v2,-30,37,-22,40,2v0,2,-1,7,-3,15v-13,8,-15,6,-27,4xm64,-44v11,-11,30,-4,32,14v-21,39,-63,71,-92,85v-5,0,-11,-2,-18,-8v11,-23,36,-36,50,-61v11,-7,19,-20,28,-30\",w:107},\"<\":{d:\"166,-202v12,0,29,15,24,29v0,4,-119,64,-120,73v15,21,89,64,91,86v2,29,-18,12,-30,15v-27,-29,-59,-54,-95,-75v-18,-10,-25,-13,-24,-41\",w:176},\"=\":{d:\"125,-121v18,7,55,-9,69,14v0,17,-45,26,-135,26v-18,0,-27,-7,-27,-21v-1,-37,60,-5,93,-19xm138,-71v20,0,48,-1,50,16v-13,24,-86,32,-131,29v-29,-2,-43,-10,-43,-24v-7,-23,36,-14,39,-17v27,6,57,-4,85,-4\",w:196},\">\":{d:\"4,-14v20,-48,77,-59,118,-94v-16,-19,-58,-52,-81,-75v-11,-7,-15,-38,-1,-40v33,16,83,71,121,105v26,23,-6,35,-41,53v-29,16,-56,28,-73,54v-21,15,-16,20,-34,15v-3,0,-9,-16,-9,-18\",w:174},\"?\":{d:\"105,-291v57,-13,107,-4,107,39v0,67,-136,85,-155,137v-1,6,10,23,-4,23v-23,1,-33,-35,-23,-57v31,-41,124,-60,149,-103v-8,-21,-72,-5,-88,-1v-23,6,-59,39,-71,8v0,0,-1,0,1,-17v10,-4,45,-20,84,-29xm80,-25v-6,4,-8,39,-24,22v-24,3,-22,-21,-13,-35v17,-7,29,5,37,13\",w:216},\"@\":{d:\"218,-207v23,8,42,14,47,37v44,68,-27,137,-87,85r1,0v0,2,-59,19,-61,17v-35,0,-42,-47,-17,-68r0,-4v-19,-1,-45,37,-49,40v-37,76,58,72,121,62v11,-2,34,-13,36,3v-14,31,-69,31,-114,33v-51,2,-99,-41,-80,-92v2,-30,22,-40,42,-63v35,-20,91,-53,161,-50xm217,-101v23,0,35,-19,35,-41v0,-43,-75,-41,-102,-19v36,3,55,16,62,41v-6,5,-6,19,5,19xm127,-110v8,5,51,-15,28,-16v-4,0,-25,4,-28,16\",w:291},A:{d:\"97,-81v-23,-10,-39,38,-52,60v-8,6,-8,6,-22,18v-22,-7,-23,-37,-4,-49v7,-8,11,-15,15,-23r-1,1v-14,-26,23,-29,31,-40v1,-1,15,-29,26,-36v17,-31,39,-58,54,-92v16,-20,20,-51,41,-66v29,5,34,62,45,92v9,64,21,103,49,155v-3,25,-44,11,-54,0v-34,-12,-97,-29,-128,-20xm107,-118v20,6,80,10,111,17v6,-7,-4,-15,-7,-24v-11,-28,-9,-92,-30,-117v-9,9,-19,44,-34,55v-9,23,-27,40,-40,69\",w:294},B:{d:\"256,-179v41,10,115,34,91,91v-6,3,-14,12,-19,20v-37,19,-50,34,-63,25v-9,10,-12,11,-34,13r3,-3v-4,-4,-12,-4,-18,0v0,0,2,2,5,4v-21,14,-26,6,-44,15v-4,0,-7,-2,-8,-5v-6,11,-20,-5,-18,11v-36,4,-91,35,-114,4v-7,-62,-10,-138,4,-199v-1,-19,-37,2,-37,-27v0,-8,2,-13,6,-15v68,-31,231,-92,311,-39v8,12,12,20,12,25v-8,42,-32,49,-77,80xm79,-160v72,-17,135,-39,184,-70v20,-13,31,-23,31,-27v1,-6,-30,-13,-38,-12v-54,0,-116,13,-186,41v11,21,1,48,9,68xm262,-43v0,-4,3,-6,-4,-5v0,1,1,2,4,5xm211,-140v-34,7,-94,24,-139,15v-6,20,-4,56,-4,82v0,29,43,1,56,2v48,-11,108,-25,154,-48v20,-10,32,-17,32,-25v0,-18,-33,-26,-99,-26xm195,-20v6,1,6,-2,5,-7v-3,2,-7,2,-5,7\",w:364},C:{d:\"51,-114v-12,75,96,76,166,71r145,-10v9,2,9,5,9,18v-37,18,-85,28,-109,22v-18,10,-47,10,-71,10v-29,0,-68,1,-105,-11v-6,-1,-10,-3,-10,-8v-33,-13,-48,-33,-66,-59v-19,-114,146,-150,224,-177v35,0,88,-31,99,7v-1,29,-49,14,-76,28v-55,8,-115,35,-175,71v-13,8,-23,21,-31,38\",w:376},D:{d:\"312,-78v-2,1,-3,7,-10,5v6,-3,10,-4,10,-5xm4,-252v2,-27,83,-38,106,-39v130,-7,267,1,291,109v0,0,-2,8,-3,25v-5,9,-4,28,-23,34v-4,4,-2,5,-7,0v-3,3,-15,7,-5,10v0,0,-10,14,-13,2v-11,1,-8,5,-20,14v1,2,7,3,9,1v-4,13,-22,13,-11,4v0,-3,1,-6,-3,-5v-40,29,-103,38,-141,65v10,6,22,-7,34,-3v-41,20,-127,44,-171,46v-21,1,-47,-33,-11,-39v15,-2,43,-6,56,-11v-16,-101,-5,-130,9,-207v2,0,4,-1,6,-3v-16,-17,-91,38,-103,-3xm297,-69v-7,3,-17,8,-25,7v1,1,3,2,5,2v-4,2,-11,5,-23,9v4,-11,30,-21,43,-18xm240,-51v10,0,12,2,0,6r0,-6xm220,-36v-1,-3,4,-6,6,-3v0,1,-2,1,-6,3xm125,-48v16,6,137,-46,155,-53v29,-18,101,-44,82,-93v-21,-53,-84,-61,-168,-67v-20,7,-50,3,-77,8v33,54,-12,132,8,205xm159,-22v-4,-1,-15,-5,-15,2v7,-1,12,-2,15,-2\",w:381},E:{d:\"45,-219v-19,-36,34,-41,63,-36v44,-10,133,-8,194,-15v3,2,38,11,52,15v-73,19,-171,21,-246,38v-9,11,-16,32,-20,61v35,11,133,-6,183,3v1,6,2,7,3,14v-46,24,-118,16,-193,27v-15,13,-22,52,-22,66v60,1,121,-20,188,-20v22,10,53,-7,74,5v16,29,-23,26,-43,32v-73,4,-139,13,-216,27r-52,-10v-4,-22,23,-69,26,-98v-3,0,-10,-15,-12,-24v20,-12,34,-23,35,-67v2,-1,5,-5,5,-7v0,-4,-14,-11,-19,-11\",w:353},F:{d:\"270,-258v13,2,59,6,48,34v-78,-3,-143,1,-212,22v-10,16,-21,43,-24,69r145,-9v8,3,29,-3,16,21v-14,-1,-59,13,-60,7v-12,13,-67,18,-108,21v-2,1,-4,3,-7,6v-2,23,-8,43,-7,69v1,28,-30,11,-40,5r10,-80r-26,-14v5,-10,10,-33,28,-25v21,-3,15,-46,26,-59v-1,-3,-32,-13,-28,-24v2,-22,45,-16,59,-30v47,4,99,-14,151,-9v5,-3,25,-3,29,-4\",w:236},G:{d:\"311,-168v53,0,94,57,74,110v-31,37,-71,34,-136,52v-13,-7,-41,10,-57,7v-73,-1,-122,-17,-162,-59v-49,-51,-24,-80,5,-130v35,-61,138,-93,214,-106v16,4,42,-1,40,21v-5,40,-39,2,-73,21v-76,19,-162,65,-177,142v28,103,237,76,312,29v2,-3,3,-7,3,-13v-10,-35,-37,-43,-87,-45v-16,-13,-53,-9,-78,1v-4,-3,-5,-7,-5,-11v17,-29,73,-17,108,-24v12,4,18,5,19,5\",w:391},H:{d:\"300,-268v18,12,19,32,4,51v-35,44,-34,140,-46,217v-1,5,-5,13,-11,12v-6,1,-19,-14,-18,-27r7,-106v-28,7,-76,22,-116,14v-18,2,-36,6,-55,3v-43,-8,-14,53,-33,75v-29,1,-26,-67,-21,-97v5,-31,28,-73,43,-98v2,2,7,3,14,3v13,33,-11,48,-13,78v61,4,118,2,176,2v8,0,13,-6,15,-20v4,-47,21,-87,54,-107\",w:288},I:{d:\"63,-266v34,10,-4,105,-8,128r-24,126v-2,2,-3,1,-9,6v-12,-10,-12,-15,-12,-47v0,-93,9,-156,28,-188v10,-17,19,-25,25,-25\",w:79},J:{d:\"235,-291v26,11,31,104,31,142v0,37,-2,95,-32,126v-33,34,-121,26,-167,1v-18,-11,-54,-29,-59,-59v0,-3,5,-15,16,-14v31,36,90,57,162,51v63,-30,56,-148,32,-226v-1,-16,11,-13,17,-21\",w:282},K:{d:\"212,-219v17,-5,80,-60,80,-19v0,9,-2,14,-5,16r-132,78v-34,23,-54,32,-21,50v39,21,74,23,124,41v5,2,7,5,7,9v-4,24,-55,15,-79,8v-67,-19,-98,-36,-116,-83v9,-24,38,-35,66,-61v7,-4,49,-30,76,-39xm47,-194v11,-20,11,-45,31,-55v2,2,4,3,6,0v29,39,-21,96,-18,128v-17,24,-15,62,-29,113v-4,3,-10,7,-19,11v-12,-13,-10,-28,-8,-53v3,-31,17,-79,37,-144\",w:270},L:{d:\"84,-43v58,0,179,-27,242,-4v3,17,-29,24,-40,26v-85,-4,-202,46,-268,3v-24,-16,-2,-33,-4,-57v26,-76,38,-108,86,-191v14,-7,26,-50,45,-32v6,22,5,31,-12,46v-20,39,-50,82,-67,142v-7,6,-19,46,-19,54v0,9,12,13,37,13\",w:331},M:{d:\"174,-236v-1,52,-11,92,-7,143v10,5,15,-12,22,-18v42,-55,90,-130,136,-174r15,-18v42,2,32,53,11,80v-12,58,-54,143,-34,210v0,3,-3,12,-9,10v-31,-5,-32,-57,-27,-92v4,-27,12,-58,25,-93v-5,-10,5,-19,6,-30v-46,44,-66,110,-129,172v-11,10,-18,15,-22,15v-34,6,-28,-103,-28,-152v-28,22,-65,119,-96,170v-9,15,-34,3,-31,-19v30,-64,91,-177,139,-229v12,-1,29,13,29,25\",w:343},N:{d:\"248,-20v-3,17,-37,18,-43,3v-24,-35,-53,-145,-80,-203v-32,40,-55,120,-92,174v-13,3,-26,-13,-27,-22r87,-171v4,-13,20,-57,42,-32v42,48,46,139,82,198v29,-45,46,-88,65,-153v12,-19,23,-42,38,-60v27,-1,14,18,4,44v-6,46,-32,68,-37,121v-15,29,-33,69,-39,101\",w:307},O:{d:\"240,-268v85,1,163,29,150,125v13,7,-12,18,-5,26v-23,63,-133,112,-228,124v-80,-16,-171,-56,-148,-153v11,-47,20,-43,53,-83v17,-9,39,-22,73,-29v45,-10,81,-10,105,-10xm363,-156v16,-51,-62,-85,-111,-79v-25,-11,-50,8,-81,0v-15,10,-70,16,-85,31v6,20,-27,24,-39,45v-42,75,40,128,115,128v56,0,209,-71,201,-125\",w:383},P:{d:\"70,-225v-7,-12,-36,16,-49,19v-4,0,-9,-5,-14,-17v21,-47,114,-55,172,-59v41,-3,132,33,99,87v-21,34,-72,59,-144,80v-2,16,-79,3,-74,46v3,25,-5,47,-10,68v-22,-1,-23,-29,-22,-56v2,-25,-20,-32,-8,-50v21,-5,10,-35,25,-57v6,-28,14,-48,25,-61xm71,-229v47,14,-2,50,-1,99v41,-3,113,-37,173,-76v5,-9,8,-14,8,-15v-28,-47,-125,-29,-180,-8\",w:252},Q:{d:\"374,-217v20,59,-11,127,-48,156r30,38v-1,6,-8,16,-14,9v-3,0,-19,-9,-47,-26v-72,35,-173,75,-236,12v-70,-40,-67,-213,26,-217r8,5v24,-20,72,-48,112,-38v21,-4,22,-1,50,-2v66,-2,94,20,119,63xm296,-88v13,5,61,-49,63,-84v4,-62,-54,-78,-119,-76v-14,-6,-49,5,-71,3v-42,16,-89,41,-93,94v-9,11,1,25,-7,38v-12,-19,-7,-67,-1,-88v-56,30,-37,137,19,155v27,17,92,19,119,0v12,-2,29,-9,52,-20v2,-2,3,-3,3,-6v-11,-12,-46,-27,-54,-56v0,-13,3,-19,9,-19v18,1,60,52,80,59\",w:379},R:{d:\"100,-275v96,-23,196,-10,208,78v-3,18,-17,52,-49,62v-14,20,-54,23,-79,40v-2,0,-14,2,-36,6v-40,8,-30,14,-3,33v37,27,52,30,118,55v16,6,31,23,12,27v-58,-2,-104,-29,-143,-61v-14,-3,-16,-15,-39,-27v-23,-19,-28,-12,-15,-38v63,-19,111,-15,163,-53v27,-20,43,-36,43,-49v0,-64,-120,-62,-173,-38v-9,4,-38,9,-40,18v-10,32,-16,70,-13,116v-10,21,-8,47,-6,75v2,31,-9,29,-27,22v-9,-55,5,-140,15,-190v-8,-6,-24,10,-24,-11v0,-34,16,-34,42,-55v2,-1,17,-4,46,-10\",w:297},S:{d:\"13,-3v-7,-3,-22,-18,-5,-22v68,-15,119,-32,154,-45v51,-19,39,-34,3,-53v-46,-25,-82,-30,-121,-64v-33,-29,-50,-35,-25,-58v37,-20,119,-29,181,-29v29,0,44,6,44,18v-9,26,-62,6,-104,14v-17,2,-72,6,-92,16v37,53,132,58,180,111v8,9,11,20,11,30v-4,17,-23,35,-42,34v-21,16,-17,1,-49,17v-14,7,-41,9,-56,20v-25,-3,-49,10,-79,11\",w:234},T:{d:\"141,-3v-36,-6,1,-49,-3,-79v10,-19,6,-35,15,-64r26,-85v-51,-9,-100,10,-141,14v-16,2,-30,-26,-11,-32v26,-8,143,-8,179,-19r12,6v67,-2,142,-1,200,-1v8,0,14,3,19,10v-18,16,-74,3,-103,14v-48,-4,-60,4,-113,7v-42,22,-36,130,-58,187v1,12,-9,44,-22,42\",w:277},U:{d:\"365,-262v13,56,-22,104,-36,141v-19,22,-30,38,-57,56v-4,18,-60,35,-78,50v-53,28,-142,0,-161,-34v-31,-56,-37,-108,-11,-164v17,-33,29,-50,48,-29v-2,2,-3,7,-4,13v-44,36,-38,149,7,174v30,26,55,19,102,4v56,-17,66,-34,120,-76v12,-24,56,-68,46,-122r0,-16v0,1,-1,3,-1,6v4,-13,11,-10,25,-3\",w:368},V:{d:\"246,-258v21,-22,31,-26,44,-8v1,1,-12,22,-28,35v-15,25,-41,38,-56,69v-13,15,-20,31,-28,57v-15,13,-11,29,-27,72v3,21,-5,24,-27,27v-33,-45,-54,-118,-84,-167v-5,-26,-18,-50,-25,-76v-3,-12,24,-8,29,-5v8,13,18,52,26,70r52,115v9,-2,4,-9,10,-21r25,-47v25,-44,46,-76,89,-121\",w:234},W:{d:\"31,-213v16,46,17,106,41,151v31,-35,49,-89,76,-127v30,-15,39,27,52,56v10,22,21,48,35,67v2,0,4,-1,5,-3v16,-28,50,-76,79,-121v14,-21,40,-63,64,-83r5,8v-30,58,-76,110,-97,173v-18,28,-25,37,-33,63v-11,1,-16,25,-30,15v-21,-31,-44,-89,-62,-131v0,-2,-1,-3,-5,-5v-17,11,-16,36,-31,50v-20,33,-20,84,-68,94v-24,-19,-23,-81,-39,-111v-1,-15,-29,-94,-10,-108v9,2,12,5,18,12\",w:331},X:{d:\"143,-183v43,-25,69,-36,126,-62v22,-10,86,-10,56,21v-51,3,-158,61,-154,64v10,15,41,30,50,52v27,17,46,60,70,82v9,14,-6,30,-24,20v-35,-43,-75,-100,-116,-132v-48,13,-100,47,-118,94v-1,49,-26,34,-27,4v-1,-26,13,-27,17,-48v22,-27,68,-55,90,-77v-9,-12,-60,-39,-79,-57v-6,-10,-6,-25,12,-25\",w:312},Y:{d:\"216,-240v19,-14,42,10,22,26v-54,66,-121,109,-156,197v-8,21,-11,15,-30,4v3,-37,27,-61,33,-76v12,-12,15,-19,32,-42v-8,-6,-40,5,-45,5v-48,-6,-69,-65,-56,-113v14,0,13,-1,24,7v2,33,12,75,42,73v36,-2,102,-57,134,-81\",w:189},Z:{d:\"60,-255v66,12,200,-34,240,21v-13,42,-63,62,-98,89v-19,15,-47,33,-82,55v-25,16,-47,32,-66,47v58,24,129,-6,208,-6v23,0,36,12,13,19v-33,2,-53,5,-86,10v-32,18,-88,15,-135,15v-9,-1,-55,-1,-48,-29v1,-24,30,-24,40,-41v64,-50,151,-86,208,-147v-38,-17,-155,12,-198,-4v0,0,-11,-33,4,-29\",w:310},\"[\":{d:\"72,-258r-15,250v30,4,55,-3,80,-6v7,-1,8,17,9,23v-28,15,-73,23,-121,21v-7,0,-10,-6,-10,-17v0,-60,25,-193,22,-288v0,-16,13,-20,33,-19v9,-3,34,-12,51,-12v16,0,15,16,19,29v-16,7,-48,10,-68,19\",w:151},\"\\\\\":{d:\"236,38v20,-18,-8,-74,-13,-90v-44,-78,-112,-190,-200,-253v-2,0,-5,4,-7,12v-11,31,13,36,24,58v74,61,174,219,180,273r16,0\",w:257},\"]\":{d:\"133,-258v-23,-13,-84,6,-85,-32v0,-10,5,-15,14,-15v0,0,30,2,90,7v10,1,15,13,15,36v2,7,-8,59,-13,112r-11,125v-9,48,9,90,-59,71v-20,-4,-39,-1,-59,-4v-5,-10,-25,-12,-14,-30v8,-3,61,-13,78,-8v14,1,8,-7,10,-17v15,-69,21,-166,34,-245\",w:171},\"^\":{d:\"68,-306v20,15,47,36,58,60v-1,4,0,7,-9,7v-26,0,-47,-38,-49,-32v-15,9,-41,50,-54,30v-2,-31,17,-23,33,-51v8,-9,15,-14,21,-14\",w:135},_:{d:\"11,15v-8,33,18,45,50,34r205,2r197,-5v11,-5,14,-9,7,-28v-95,-21,-258,-10,-376,-10v-25,0,-72,-3,-83,7\",w:485},\"`\":{d:\"75,-264v16,8,56,14,39,43v-30,-8,-65,-23,-105,-44v-1,-3,-3,-28,5,-25v16,5,44,17,61,26\",w:129},a:{d:\"124,-56v10,4,59,41,65,50v1,7,-6,17,-12,17r-60,-30v-22,2,-42,21,-65,19v-33,4,-68,-67,-15,-81v41,-27,96,-39,110,9v0,6,-4,12,-11,16v-33,-25,-67,-5,-88,12v10,16,61,-18,76,-12\",w:196},b:{d:\"80,-140v69,1,123,0,134,52v5,26,-71,71,-97,70v-11,11,-88,22,-94,22v-11,-3,-26,-18,-6,-24v19,-5,-2,-19,-1,-35v1,-18,11,-36,-5,-47v-6,-17,-6,-21,14,-32v6,-45,18,-89,28,-124v2,-7,8,-12,17,-15v5,3,10,11,16,28v-12,27,-13,63,-23,96v0,6,6,9,17,9xm87,-107v-40,-9,-31,31,-39,54v8,15,0,25,12,22v30,-8,60,-18,88,-32v39,-18,49,-33,-1,-42v-20,-4,-45,-7,-60,-2\",w:217},c:{d:\"128,-123v29,-7,37,29,12,33v-27,-4,-40,6,-79,25v-8,4,-13,11,-16,22v30,32,91,3,134,11v5,13,-8,26,-22,19v-51,25,-139,28,-150,-30v6,-50,69,-82,121,-80\",w:194},d:{d:\"224,-201v0,-35,-17,-111,24,-94v7,86,-2,119,0,197v-4,2,-8,21,-18,16v-62,-7,-154,-8,-185,29v6,17,28,26,51,26v16,0,100,-15,132,-18v7,5,-6,20,-10,22v-24,8,-122,42,-163,25v-32,-5,-62,-53,-36,-80v35,-37,118,-46,198,-43v1,-22,7,-49,7,-80\",w:265},e:{d:\"4,-57v0,-58,51,-71,110,-74v33,-1,45,16,59,35v1,14,2,39,-7,42v-24,-2,-73,13,-99,11v-2,2,-2,3,-2,3v0,3,12,8,37,15v21,0,69,9,31,22v-9,14,-34,6,-56,6v-27,-5,-73,-28,-73,-60xm123,-102v-22,2,-68,5,-65,26v24,-2,66,5,79,-6v-5,-13,-1,-13,-14,-20\",w:182},f:{d:\"6,-59v6,-29,53,-4,53,-43v0,-64,29,-118,84,-150v45,-25,167,-24,155,51v-1,2,-7,6,0,6r-10,2v-45,-58,-165,-39,-186,39v-7,26,-11,42,-9,62v44,8,95,-21,135,-7v-12,25,-39,21,-76,30v-19,5,-18,7,-54,19v-2,8,15,32,17,35v-6,25,-26,26,-40,-5r-15,-24v-41,10,-44,12,-54,-15\",w:234},g:{d:\"132,-97v30,27,21,75,30,117v-12,31,-11,66,-36,103v-32,46,-105,83,-167,39v-31,-21,-49,-29,-51,-75v-2,-37,77,-50,121,-57v37,-6,68,-10,95,-11v7,-6,3,-32,4,-46v0,0,-1,1,-1,2v0,-18,-5,-31,-14,-45v-44,5,-79,20,-94,-18v3,-54,73,-54,125,-50v12,7,12,13,4,25v-30,-11,-76,8,-90,20v23,3,50,-16,74,-4xm-34,121v60,53,168,1,159,-86v-47,-7,-93,24,-142,30v-12,7,-45,19,-42,29v0,10,8,19,25,27\",w:188},h:{d:\"100,-310v11,-2,10,19,11,20v-11,52,-40,133,-53,189v-6,30,-9,37,-9,47v27,0,113,-34,143,-34v42,0,31,47,39,79v0,4,-5,17,-16,16v4,2,11,3,4,6v-24,-1,-28,-34,-25,-64v-1,-1,-2,-3,-5,-5v-51,0,-110,38,-162,51v-9,1,-15,-15,-16,-23v17,-89,39,-141,71,-264v0,-9,6,-19,18,-18\",w:251},i:{d:\"62,-209v7,18,9,23,-5,38v-23,-6,-21,-18,-11,-36v2,0,8,-1,16,-2xm34,-7v-18,-21,-8,-73,-1,-106v7,-10,20,-8,23,6v-1,36,7,72,-2,104v-8,2,-8,0,-20,-4\",w:80},j:{d:\"88,-191v5,28,-18,40,-28,21v0,-20,12,-29,28,-21xm82,-99v28,-1,16,35,16,61v0,60,-19,150,-35,202v-12,8,-19,31,-35,16v-32,-7,-43,-19,-56,-44r2,-17v11,4,49,45,61,18v10,-55,27,-107,30,-171v0,-16,0,-59,17,-65\",w:120},k:{d:\"59,-66v33,26,114,37,155,62v8,-4,22,-2,19,-17v0,-4,-12,-11,-30,-24v-36,-25,-54,-22,-99,-33v14,-21,119,-13,103,-63r-16,-7r-123,47r25,-93v-3,-15,16,-49,18,-81v1,-15,-21,-14,-25,-3v-31,82,-49,168,-75,257v2,2,22,30,27,10v2,-5,4,-9,9,-11v4,-16,4,-15,12,-44\",w:236},l:{d:\"66,-300v21,-6,37,23,30,55v-10,51,-28,135,-28,208v0,11,6,36,-13,37v-29,-5,-30,-48,-25,-83r28,-177v-6,-17,1,-29,8,-40\",w:102},m:{d:\"348,-59v-2,21,0,57,3,73v-17,3,-30,-1,-32,-16v-8,-7,-5,-44,-13,-70v-35,3,-82,49,-111,70v-12,8,-40,4,-39,-15r2,-56v-1,-13,4,-28,-8,-29v-35,8,-79,72,-115,87v-6,2,-20,-18,-21,-22v1,-20,14,-105,39,-64r8,15v17,-14,72,-56,93,-54v27,3,49,40,43,80v24,-2,66,-55,124,-53v11,14,28,23,27,54\",w:368},n:{d:\"121,-136v37,6,62,54,62,111v0,32,-16,25,-31,17v-18,-30,-5,-45,-22,-85v-37,-13,-71,55,-92,65v-20,-3,-39,-39,-21,-62v2,-12,3,-15,11,-30v12,-8,20,11,29,12\",w:194},o:{d:\"108,-139v52,-24,104,18,104,63v0,59,-66,67,-114,83v-52,-2,-115,-50,-80,-105v23,-18,52,-35,90,-41xm45,-60v16,54,125,16,131,-23v-12,-59,-129,-8,-131,23\",w:217},p:{d:\"82,14v-10,12,-8,117,-24,142v-15,2,-19,0,-29,-13v0,-76,9,-113,22,-192v14,-27,35,-6,37,13v0,8,-3,21,-7,38v2,2,3,2,4,2v26,-9,116,-33,126,-72v-7,-17,-24,-33,-49,-31v-40,3,-116,13,-116,47v-5,7,-2,17,-16,20v-17,-12,-18,-20,-12,-38v8,-25,74,-61,110,-59v55,-15,113,15,118,70v-15,52,-84,79,-146,83v-5,0,-11,-4,-18,-10\",w:251},q:{d:\"144,-147v27,-8,89,-3,97,31v-9,29,-42,-4,-73,1v-32,6,-118,20,-111,49v0,7,13,13,21,13v21,0,78,-24,104,-34v2,0,9,8,22,21v1,1,1,2,1,5v-27,90,-22,70,-43,203v11,15,-15,54,-33,33v-6,-8,-10,-20,-3,-28v1,-72,5,-114,15,-172v-35,3,-35,10,-59,8v-41,-4,-98,-41,-56,-85v33,-34,59,-27,118,-45\",w:248},r:{d:\"242,-117v2,22,5,10,-14,23v-73,-7,-166,-23,-174,56v-8,6,-3,20,-8,36v-29,10,-40,-9,-33,-46v6,-31,7,-69,32,-55v58,-37,66,-42,175,-19v3,5,15,4,22,5\",w:229},s:{d:\"154,-151v19,1,27,24,13,32v-4,1,-22,4,-53,7v-16,8,-22,-2,-39,9v23,21,89,16,96,62v-13,24,-85,35,-124,42v-9,-3,-18,-3,-27,0v-6,-4,-21,-16,-8,-25v30,-6,83,-13,102,-24v-17,-16,-80,-33,-97,-48v-3,-2,-4,-7,-4,-15v-6,-6,3,-13,15,-18v22,-9,94,-23,126,-22\",w:188},t:{d:\"85,-150v10,-41,35,-126,65,-134v4,1,24,19,11,36v-17,22,-29,57,-36,104v26,8,50,-7,73,5v14,0,22,3,22,9v-1,19,-44,18,-57,23v-10,1,-46,0,-54,10v-10,24,-4,67,-20,98v-21,-3,-26,1,-26,-20v0,-9,2,-36,8,-81v-15,-13,-81,9,-77,-27v4,-38,71,6,91,-23\",w:194},u:{d:\"207,-136v-1,-2,11,-14,14,-13v6,0,10,7,10,22v-3,40,-23,56,-40,82v-13,19,-62,43,-93,43v-67,-2,-111,-75,-71,-133v26,-3,21,29,19,49v-1,27,26,44,57,42v41,-2,93,-55,104,-92\",w:242},v:{d:\"24,-127r52,71v42,-16,70,-54,124,-65v5,4,8,7,8,11v-8,19,-4,8,-33,32v0,1,-1,3,-1,5v-61,45,-93,68,-97,68v-40,-15,-50,-72,-68,-100v6,-14,10,-22,15,-22\",w:214},w:{d:\"15,-139v38,-2,27,57,45,86v30,2,67,-66,101,-78v26,6,36,69,60,78v47,-35,51,-54,119,-104v3,0,7,-2,15,-4v19,23,-9,28,-21,49v-33,28,-68,90,-107,109v-10,6,-52,-47,-72,-71v-20,17,-85,74,-97,73v-38,7,-41,-98,-52,-122v0,-1,3,-7,9,-16\",w:325},x:{d:\"95,-124v22,-13,78,-32,99,-31v16,0,23,6,23,18v0,22,-17,11,-49,21v-3,0,-45,20,-42,24v0,1,2,4,8,10v20,24,49,41,44,80v-35,3,-27,-9,-60,-44v-40,-43,-37,-26,-79,9v-1,1,-2,3,-3,8v-12,8,-28,10,-27,-11v-6,-8,45,-65,48,-65v-17,-21,-61,-52,-24,-68v9,0,48,37,62,49\",w:223},y:{d:\"44,-65v22,33,70,4,99,-8v5,-4,28,-15,41,-31r17,0v25,47,-26,70,-40,114v-5,4,-9,8,-10,21v-16,12,-11,33,-27,51v-5,18,-12,43,-23,71v-1,-1,-2,34,-18,29v-12,1,-22,-12,-22,-23v20,-70,24,-65,68,-177v-47,16,-111,8,-116,-39v-11,-13,-7,-62,8,-62v18,0,22,26,23,54\",w:216},z:{d:\"189,-43v9,-1,46,-6,41,12v0,7,-5,13,-15,14v-45,6,-148,24,-181,13v0,-3,-5,-8,-14,-15v5,-44,66,-46,90,-85v-15,-18,-84,21,-84,-14v0,-10,5,-17,14,-18v33,-3,79,-13,109,-3v4,-2,14,11,12,15v0,23,-26,51,-78,84v28,10,73,-3,106,-3\",w:244},\"{\":{d:\"94,-303v27,-9,90,-14,79,26v-20,17,-55,-5,-87,13v-4,1,-6,4,-6,8v33,42,31,44,7,85v-6,10,-13,16,-13,13v5,6,17,17,15,31r-33,78v7,35,28,49,57,63r49,0v7,42,-51,41,-86,20v-43,-13,-51,-51,-56,-89v-2,-25,25,-54,27,-71v-3,-4,-46,-5,-41,-21v2,-10,-3,-29,11,-25v2,0,51,-17,52,-38v4,-3,-25,-23,-25,-49v0,-41,8,-30,50,-44\",w:179},\"|\":{d:\"30,-308v26,5,14,50,15,80v5,78,-8,153,-3,225v-2,15,-1,31,-11,36v-8,-3,-25,-22,-25,-32r9,-183v0,-40,0,-78,1,-112v0,-4,9,-15,14,-14\",w:63},\"}\":{d:\"47,-298v34,-17,118,-18,112,36v6,25,-76,98,-69,103v4,16,39,7,44,28v7,34,-34,17,-37,39v8,29,49,83,23,123v-15,23,-43,26,-73,46v-34,8,-43,11,-49,-17v1,-15,30,-15,33,-20v24,-12,70,-27,55,-61v-14,-33,-37,-68,-19,-103v-46,-50,46,-100,60,-141v-10,-16,-68,6,-77,-12\",w:143},\"~\":{d:\"7,-254v2,-6,59,-50,67,-46v11,-1,35,19,46,26v5,0,27,-10,66,-31v21,8,-1,25,-7,38v-27,21,-48,31,-65,31v-24,-11,-37,-39,-65,-9v-7,7,-26,36,-42,11v3,-5,-3,-17,0,-20\",w:199},\" \":{w:179},\"¡\":{d:\"86,-197v8,16,-7,41,-24,25v-11,-11,-4,-16,-3,-29v13,0,15,-2,27,4xm46,-107v4,-8,11,-16,23,-7v19,26,-5,57,-6,87v-7,0,-5,18,-9,28v0,14,-17,52,-11,70v-2,7,-15,28,-25,12v-4,-6,-15,-7,-6,-16v2,-39,14,-96,34,-174\",w:95},\"¢\":{d:\"105,-188v13,-12,14,-18,26,-15v7,23,7,15,-3,49v6,0,18,14,17,20v-3,5,-12,19,-26,13v-14,1,-14,5,-16,21v10,10,46,-13,38,18v-9,17,-23,16,-54,20v-17,16,-4,55,-29,60v-37,-10,19,-64,-24,-71v-20,-10,-37,-47,-6,-62v23,-20,73,-4,77,-53xm65,-101v4,-9,7,-8,3,-13v-14,4,-22,10,-3,13\",w:154},\"£\":{d:\"153,-170v3,22,62,0,49,39v-18,6,-31,12,-58,9v-12,-1,-17,30,-23,39v19,26,50,56,91,35v9,-2,27,-13,27,4v0,27,-27,39,-58,42v-32,-5,-59,-19,-78,-39v-6,1,-35,44,-57,39v-25,0,-37,-15,-37,-46v0,-41,43,-53,73,-50v4,1,12,-18,12,-21v-7,-15,-49,0,-44,-30v-2,-31,31,-16,60,-19v16,-30,25,-119,93,-113v16,2,75,16,50,44v-4,5,-7,7,-12,8v-18,-12,-32,-18,-41,-18v-35,-1,-38,52,-47,77xm43,-45v4,5,12,-2,11,-9v-1,2,-12,1,-11,9\",w:242},\"¤\":{d:\"308,-133r-200,16v-2,1,-6,4,-10,10v70,-2,144,-14,211,-8v3,0,8,4,13,8v-1,4,-3,9,-9,17v-57,11,-164,6,-219,25v26,32,112,25,173,25v9,0,35,2,35,19v0,9,-4,13,-12,14v-115,12,-146,23,-211,-19v-12,-4,-22,-9,-25,-27v-6,-29,-61,3,-43,-49v17,-1,36,7,42,-12v-32,7,-36,-39,-11,-40v29,14,63,-25,73,-30v52,-25,72,-44,142,-44v23,0,21,41,-1,39v-35,-3,-61,9,-102,31v2,2,5,4,8,4v18,-6,101,-9,115,-9v7,0,55,13,31,30\",w:312},\"€\":{d:\"308,-133r-200,16v-2,1,-6,4,-10,10v70,-2,144,-14,211,-8v3,0,8,4,13,8v-1,4,-3,9,-9,17v-57,11,-164,6,-219,25v26,32,112,25,173,25v9,0,35,2,35,19v0,9,-4,13,-12,14v-115,12,-146,23,-211,-19v-12,-4,-22,-9,-25,-27v-6,-29,-61,3,-43,-49v17,-1,36,7,42,-12v-32,7,-36,-39,-11,-40v29,14,63,-25,73,-30v52,-25,72,-44,142,-44v23,0,21,41,-1,39v-35,-3,-61,9,-102,31v2,2,5,4,8,4v18,-6,101,-9,115,-9v7,0,55,13,31,30\",w:312},\"¥\":{d:\"31,-248v30,-3,64,64,74,59v37,-22,77,-65,107,-82v20,-11,34,18,21,32v-28,19,-52,38,-70,57v-18,8,-40,21,-35,60v2,19,39,7,64,7v25,0,16,21,2,27v-36,16,-46,8,-68,18v6,11,101,-20,66,24v-21,11,-42,12,-75,20v-2,1,-5,6,-10,18v-8,3,-11,10,-24,8v-7,-17,-2,-18,-9,-26v-13,5,-39,3,-53,-2v-10,-17,-7,-27,0,-34v23,-1,45,1,64,-5v-11,-7,-28,-4,-64,-6v-13,-8,-15,-24,-6,-35v33,-2,102,9,76,-37v-14,-14,-33,-38,-60,-66v-10,-10,-8,-28,0,-37\",w:219},\"§\":{d:\"141,-115v12,10,29,36,28,56v-4,68,-129,69,-152,16v-1,-12,-10,-22,8,-23v17,3,47,21,67,23v16,1,40,-8,38,-21v-8,-49,-119,-30,-117,-85v1,-28,15,-45,-3,-64v-1,-53,55,-61,103,-62v15,-5,6,-5,20,-2v16,17,23,27,23,30v-1,26,-29,7,-45,7v-21,0,-51,2,-62,17v19,14,87,8,97,43v18,14,16,57,-5,65xm64,-147r57,17v10,-28,-22,-43,-47,-44v-25,-1,-35,19,-10,27\",w:174},\"¨\":{d:\"124,-259v0,9,-4,13,-12,13v-18,0,-22,-21,-17,-35v19,-1,30,1,29,22xm23,-285v7,2,30,9,29,18v1,10,-9,19,-18,19v-19,0,-28,-26,-11,-37\",w:136},\"©\":{d:\"102,-29v-74,5,-124,-84,-70,-140v22,-22,53,-35,97,-38v46,-4,88,49,74,100v0,44,-51,75,-101,78xm96,-66v42,-3,75,-23,75,-69v0,-23,-4,-38,-44,-38v-16,0,-33,6,-49,20v36,-4,55,-12,62,20v-5,16,-49,1,-50,21v10,15,53,-14,54,11v0,18,-14,27,-42,27v-22,1,-46,-11,-46,-31v0,-25,7,-39,20,-44v-1,-1,-2,-2,-3,-2v-51,22,-32,89,23,85\",w:217},\"ª\":{d:\"6,-265v1,-31,58,-53,80,-22v-11,14,25,28,25,36v-2,8,-15,12,-27,10v-22,-29,-68,19,-78,-24xm52,-281v-8,1,-24,10,-9,13v11,1,24,-10,9,-13\",w:117},\"«\":{d:\"191,-64v16,6,87,37,53,63v-39,-9,-71,-28,-107,-40v-14,-13,-13,-34,10,-47v27,-15,48,-55,84,-62v9,-2,21,10,21,18r-13,21v-16,5,-44,22,-51,41v0,4,1,6,3,6xm71,-65v17,6,87,35,55,62v-39,-8,-66,-27,-108,-40v-14,-13,-13,-36,10,-46v23,-18,50,-56,84,-63v9,-2,21,10,21,18r-13,22v-20,6,-32,17,-51,37v0,3,-1,11,2,10\",w:265},\"¬\":{d:\"141,-99v47,7,103,-3,149,6v14,24,18,15,10,39v-10,34,-7,31,-26,76v-4,6,-15,8,-16,21v-4,2,-4,1,-13,5v-22,-33,-4,-33,16,-104v-5,-9,-28,-4,-38,-6r-183,4v-14,0,-41,-29,-17,-36v31,-9,82,5,118,-5\",w:315},\"®\":{d:\"75,-194v78,-29,116,9,130,84v-2,42,-22,47,-57,67v-74,20,-161,-19,-129,-110v6,-18,29,-34,57,-40xm46,-86v51,36,84,21,129,-15v7,-15,0,-39,-10,-49v-13,-37,-49,-26,-86,-18v-28,7,-49,46,-33,82xm72,-123v-5,-43,68,-57,75,-14v-17,26,-18,17,3,32v2,25,-25,18,-45,7r-4,-4v-1,8,-3,20,-12,24v-10,-3,-21,-34,-17,-45xm112,-135v-10,-1,-20,13,-9,14v6,-6,9,-11,9,-14\",w:217},\"¯\":{d:\"63,-295v28,-7,73,10,105,7v11,1,6,8,5,19v-37,21,-72,11,-136,11v-23,0,-31,-14,-27,-36v12,-15,40,0,53,-1\",w:183},\"°\":{d:\"106,-268v0,36,-35,38,-51,46v-48,5,-60,-58,-25,-78v33,-11,76,-9,76,32xm38,-257v16,7,39,2,38,-17v-13,-9,-28,-1,-32,11v-5,3,-7,0,-6,6\",w:114},\"±\":{d:\"93,-163v-7,46,76,-4,46,47v-14,6,-27,13,-38,8v-24,2,-14,28,-28,44r-14,0v-7,-12,-5,-15,-7,-33v-12,-7,-41,-1,-37,-24v2,-11,23,-17,36,-14r28,-38v4,0,9,4,14,10xm113,-27v-12,18,-58,27,-85,24v-16,2,-22,-23,-13,-36v28,-7,85,-11,98,12\",w:151},\"´\":{d:\"52,-284v29,-11,50,-34,62,-14v3,12,-86,54,-94,56v-14,0,-16,-12,-12,-23v11,-5,25,-11,44,-19\",w:120},\"¶\":{d:\"121,-237v21,-9,44,-13,63,-1v-1,7,5,6,7,11r-4,190v-2,33,4,39,-15,40v-16,1,-10,-20,-10,-33r4,-161v0,-17,-1,-34,-16,-25v2,10,1,23,1,35v-9,46,-6,75,-15,156v-3,4,-7,5,-12,5v-17,-10,-3,-89,-10,-115v-43,14,-98,10,-101,-29v-4,-53,59,-63,104,-75v3,1,4,2,4,2xm95,-204v2,9,-30,50,1,50v35,0,23,-13,29,-43v0,-1,-2,-7,-4,-15v-12,-1,-14,2,-26,8\",w:206},\"¸\":{d:\"74,16v32,2,49,14,55,36v-3,7,-14,31,-29,33v-28,4,-57,11,-88,14v-19,-6,-13,-31,8,-33v20,-1,59,-5,73,-14v-17,-14,-68,8,-53,-37v9,-10,2,-28,24,-30v8,8,13,17,10,31\",w:129},\"º\":{d:\"13,-273v1,-31,56,-41,83,-18v36,8,14,48,-9,52v-35,6,-64,-5,-74,-34xm81,-269v-7,-7,-20,-11,-29,-6v5,13,13,11,29,6\",w:128},\"»\":{d:\"120,-129v9,-33,48,-10,64,5v9,20,86,52,50,86v-36,11,-66,31,-107,40v-6,-7,-9,-13,-9,-17v-2,-13,50,-46,63,-46v11,-18,-33,-42,-48,-47xm1,-128v10,-33,46,-8,64,6v8,19,86,50,51,85v-40,13,-69,30,-108,40v-6,-7,-8,-12,-8,-16v-2,-14,50,-46,63,-47v7,-13,-9,-20,-19,-30v-10,-9,-20,-15,-30,-17\",w:252},\"¿\":{d:\"181,-247v3,1,31,2,29,15v-4,22,-37,27,-41,4v1,-5,7,-20,12,-19xm161,-34v-45,-1,-105,19,-124,51v0,11,18,17,54,17v39,0,82,-13,112,4v-10,35,-58,31,-100,31v-47,0,-80,-10,-99,-31v-10,-56,22,-73,64,-90v8,-3,32,-9,74,-18v21,-15,7,-62,22,-92v-1,-5,-1,-11,4,-12v16,0,24,7,24,22v-8,30,-8,73,-17,111v-3,5,-7,7,-14,7\",w:213},\"À\":{d:\"161,-217v20,53,23,124,54,170v-2,20,-34,9,-42,0v-27,-12,-78,-18,-101,-18v-26,6,-29,51,-54,63v-18,-4,-19,-30,-3,-38v5,-9,15,-16,8,-29v1,-12,23,-9,26,-19v6,-10,11,-20,20,-27r70,-121v12,-4,16,4,22,19xm82,-91v17,3,62,7,86,13v-13,-33,-13,-80,-29,-109v-15,30,-38,63,-57,96xm150,-268v14,10,54,14,37,41v-28,-7,-62,-22,-100,-42v-2,-3,-2,-26,5,-23v16,4,42,17,58,24\"},\"Á\":{d:\"161,-217v20,53,23,124,54,170v-2,20,-34,9,-42,0v-27,-12,-78,-18,-101,-18v-26,6,-29,51,-54,63v-18,-4,-19,-30,-3,-38v5,-9,15,-16,8,-29v1,-12,23,-9,26,-19v6,-10,11,-20,20,-27r70,-121v12,-4,16,4,22,19xm82,-91v17,3,62,7,86,13v-13,-33,-13,-80,-29,-109v-15,30,-38,63,-57,96xm84,-250v31,-5,83,-53,100,-31v0,5,-11,15,-35,28v-16,5,-51,28,-53,25v-14,1,-16,-11,-12,-22\"},\"Â\":{d:\"161,-217v20,53,23,124,54,170v-2,20,-34,9,-42,0v-27,-12,-78,-18,-101,-18v-26,6,-29,51,-54,63v-18,-4,-19,-30,-3,-38v5,-9,15,-16,8,-29v1,-12,23,-9,26,-19v6,-10,11,-20,20,-27r70,-121v12,-4,16,4,22,19xm82,-91v17,3,62,7,86,13v-13,-33,-13,-80,-29,-109v-15,30,-38,63,-57,96xm202,-219v-27,-6,-40,-26,-61,-37v-21,7,-39,46,-65,23v-2,-4,-3,-10,-4,-14v19,-4,43,-32,61,-43v27,6,40,22,62,37v12,8,18,17,18,25v0,6,-3,9,-11,9\"},\"Ã\":{d:\"161,-217v20,53,23,124,54,170v-2,20,-34,9,-42,0v-27,-12,-78,-18,-101,-18v-26,6,-29,51,-54,63v-18,-4,-19,-30,-3,-38v5,-9,15,-16,8,-29v1,-12,23,-9,26,-19v6,-10,11,-20,20,-27r70,-121v12,-4,16,4,22,19xm82,-91v17,3,62,7,86,13v-13,-33,-13,-80,-29,-109v-15,30,-38,63,-57,96xm100,-285v26,-19,54,19,69,22v4,0,15,-5,34,-13v23,-9,22,-17,31,-12v3,11,-9,9,-7,21v-26,20,-46,30,-59,30v-3,3,-50,-26,-49,-29v-12,1,-31,35,-51,32v-3,-8,-5,-14,-5,-18v10,-9,16,-17,37,-33\"},\"Ä\":{d:\"161,-217v20,53,23,124,54,170v-2,20,-34,9,-42,0v-27,-12,-78,-18,-101,-18v-26,6,-29,51,-54,63v-18,-4,-19,-30,-3,-38v5,-9,15,-16,8,-29v1,-12,23,-9,26,-19v6,-10,11,-20,20,-27r70,-121v12,-4,16,4,22,19xm82,-91v17,3,62,7,86,13v-13,-33,-13,-80,-29,-109v-15,30,-38,63,-57,96xm187,-259v0,8,-4,13,-12,13v-18,0,-21,-20,-16,-34v18,-1,28,2,28,21xm90,-284v7,3,28,11,28,18v0,9,-9,18,-18,17v-17,0,-25,-24,-10,-35\"},\"Å\":{d:\"161,-217v20,53,23,124,54,170v-2,20,-34,9,-42,0v-27,-12,-78,-18,-101,-18v-26,6,-29,51,-54,63v-18,-4,-19,-30,-3,-38v5,-9,15,-16,8,-29v1,-12,23,-9,26,-19v6,-10,11,-20,20,-27r70,-121v12,-4,16,4,22,19xm82,-91v17,3,62,7,86,13v-13,-33,-13,-80,-29,-109v-15,30,-38,63,-57,96xm112,-239v-31,-17,-9,-61,29,-56v12,2,22,3,33,12v24,39,-30,62,-62,44xm119,-262v2,14,41,8,41,-4v0,-4,-8,-6,-24,-9v-10,-2,-17,10,-17,13\"},\"Æ\":{d:\"335,-259v0,30,-102,12,-122,34v10,21,2,79,16,100v24,-6,59,-13,86,-16v23,-2,32,21,13,26r-103,29v-3,22,-4,38,8,43v28,-5,60,-6,86,-14v5,-1,14,7,14,11v6,16,-90,40,-107,40v-29,0,-39,-19,-32,-46v-2,-4,0,-26,-9,-28v-29,2,-58,6,-88,6v-31,0,-40,74,-82,73v-18,-23,4,-37,12,-50v40,-65,112,-126,165,-207v20,-17,69,-11,112,-13v21,0,31,4,31,12xm123,-111v28,1,44,-2,67,-10v-4,-22,5,-49,-7,-65v-3,6,-65,61,-60,75\",w:348},\"Ç\":{d:\"48,-108v-12,70,90,71,159,67r138,-9v9,-1,7,9,7,17v-37,16,-80,27,-103,21v-14,9,-40,3,-67,9v-30,0,-64,1,-100,-10v-6,-1,-10,-4,-10,-8v-32,-12,-46,-31,-63,-56v-16,-61,47,-103,83,-121v82,-42,118,-45,200,-60v21,-4,36,34,11,37v-90,11,-148,31,-225,77v-12,8,-23,20,-30,36xm172,18v29,4,47,14,53,35v-2,7,-14,31,-27,31v-28,7,-55,9,-84,14v-18,-5,-13,-32,7,-32v21,0,55,-5,69,-13v-16,-14,-63,10,-50,-35v9,-10,1,-27,23,-29v7,8,11,16,9,29\",w:331},\"È\":{d:\"49,-160v1,-4,-10,-9,-15,-8v-15,-35,32,-30,57,-31r142,-8v2,1,30,7,40,10v-52,16,-133,17,-190,30v-7,9,-12,24,-15,47v26,10,102,-6,141,3v1,3,1,6,2,10v-36,18,-92,12,-149,21v-11,9,-16,41,-16,51v55,-1,111,-21,168,-13v15,-8,48,1,31,18v-53,16,-130,13,-198,29r-39,-8v-4,-19,17,-53,20,-76v-1,0,-7,-11,-9,-18v18,-7,22,-28,30,-57xm184,-236v6,9,5,13,0,23v-28,-7,-62,-21,-100,-41v-3,-2,-3,-27,5,-23v34,11,60,25,95,41\",w:252},\"É\":{d:\"49,-160v1,-4,-10,-9,-15,-8v-15,-35,32,-30,57,-31r142,-8v2,1,30,7,40,10v-52,16,-133,17,-190,30v-7,9,-12,24,-15,47v26,10,102,-6,141,3v1,3,1,6,2,10v-36,18,-92,12,-149,21v-11,9,-16,41,-16,51v55,-1,111,-21,168,-13v15,-8,48,1,31,18v-53,16,-130,13,-198,29r-39,-8v-4,-19,17,-53,20,-76v-1,0,-7,-11,-9,-18v18,-7,22,-28,30,-57xm133,-248v27,-11,48,-32,59,-14v3,11,-79,52,-88,53v-14,1,-16,-11,-12,-21v10,-4,23,-11,41,-18\",w:252},\"Ê\":{d:\"49,-160v1,-4,-10,-9,-15,-8v-15,-35,32,-30,57,-31r142,-8v2,1,30,7,40,10v-52,16,-133,17,-190,30v-7,9,-12,24,-15,47v26,10,102,-6,141,3v1,3,1,6,2,10v-36,18,-92,12,-149,21v-11,9,-16,41,-16,51v55,-1,111,-21,168,-13v15,-8,48,1,31,18v-53,16,-130,13,-198,29r-39,-8v-4,-19,17,-53,20,-76v-1,0,-7,-11,-9,-18v18,-7,22,-28,30,-57xm199,-211v-27,-6,-39,-26,-60,-37v-21,7,-40,47,-65,22v-2,-7,-2,-7,-4,-13v18,-5,44,-31,61,-43v27,6,41,22,62,37v12,9,18,17,18,25v0,6,-4,9,-12,9\",w:252},\"Ë\":{d:\"49,-160v1,-4,-10,-9,-15,-8v-15,-35,32,-30,57,-31r142,-8v2,1,30,7,40,10v-52,16,-133,17,-190,30v-7,9,-12,24,-15,47v26,10,102,-6,141,3v1,3,1,6,2,10v-36,18,-92,12,-149,21v-11,9,-17,41,-17,51v55,0,112,-21,169,-13v15,-8,48,1,31,18v-53,16,-130,13,-198,29r-39,-8v-3,-21,17,-53,20,-76v-1,0,-7,-11,-9,-18v18,-7,22,-28,30,-57xm191,-236v0,8,-4,13,-12,13v-17,0,-19,-19,-16,-34v18,-1,29,1,28,21xm95,-261v7,3,29,9,28,18v0,7,-9,17,-18,17v-18,0,-26,-25,-10,-35\",w:252},\"Ì\":{d:\"33,-5v-9,-6,-9,-12,-9,-36v0,-71,8,-119,22,-144v8,-13,14,-20,19,-20v27,20,-11,87,-10,120r-15,76v-1,1,-4,2,-7,4xm72,-247v7,6,55,15,36,40v-28,-7,-61,-21,-99,-41v-3,-2,-3,-27,5,-23v18,3,41,17,58,24\",w:111},\"Í\":{d:\"26,-5v-9,-6,-9,-12,-9,-36v0,-71,7,-119,21,-144v8,-13,14,-20,19,-20v28,19,-7,89,-10,120v-2,21,-8,47,-14,76v-2,1,-2,0,-7,4xm6,-233v31,-6,83,-53,101,-31v2,11,-80,53,-89,53v-14,1,-14,-11,-12,-22\",w:104},\"Î\":{d:\"53,-9v-15,7,-16,-3,-16,-32v0,-71,7,-119,21,-144v8,-13,14,-20,19,-20v28,19,-7,89,-10,120v-2,21,-8,47,-14,76xm137,-209v-27,-6,-40,-26,-61,-37v-8,0,-9,4,-13,10v-11,13,-50,37,-56,0v18,-5,43,-32,61,-43v28,5,40,21,62,36v12,9,18,17,18,25v0,6,-4,9,-11,9\",w:144},\"Ï\":{d:\"33,-5v-9,-6,-9,-12,-9,-36v0,-71,8,-119,22,-144v8,-13,14,-20,19,-20v27,20,-11,87,-10,120r-15,76v-1,1,-4,2,-7,4xm111,-222v0,8,-4,12,-12,12v-18,0,-19,-19,-16,-33v18,-1,29,1,28,21xm15,-247v8,2,29,9,28,17v0,21,-37,24,-36,1v0,-7,2,-13,8,-18\",w:110},\"Ñ\":{d:\"224,-182v1,-17,15,-24,22,-38v20,0,13,10,3,33v-3,36,-25,52,-28,94v-10,24,-30,55,-29,82r-19,7v-32,-8,-36,-70,-58,-111v-2,-23,-7,-27,-19,-54v-28,36,-41,93,-71,133v-9,5,-20,-9,-20,-17r73,-149v9,-24,31,-5,36,7v19,41,31,98,53,139v22,-35,34,-69,50,-118v2,-3,3,-3,7,-8xm203,-257v22,-8,41,-24,65,-26v3,11,-8,9,-7,21v-26,20,-46,31,-59,31v-2,3,-49,-27,-49,-29v-11,0,-32,31,-46,32v-11,-2,-12,-21,-4,-23v4,-6,28,-30,48,-34v17,-4,43,28,52,28\",w:219},\"Ò\":{d:\"62,-184v78,-31,249,-50,238,74v-6,65,-102,105,-179,115v-77,-7,-152,-71,-101,-149v2,-5,24,-33,42,-40xm279,-120v14,-38,-47,-64,-85,-61v-20,-9,-41,7,-62,0v-11,7,-54,12,-66,24v0,20,-51,35,-38,66v-1,43,50,67,96,67v44,0,162,-55,155,-96xm161,-262v14,10,52,13,37,41v-28,-7,-62,-21,-100,-41v-3,-3,-3,-26,5,-24v16,5,42,17,58,24\",w:273},\"Ó\":{d:\"62,-184v78,-31,249,-50,238,74v-6,65,-102,105,-179,115v-77,-7,-152,-71,-101,-149v2,-5,24,-33,42,-40xm279,-120v14,-38,-47,-64,-85,-61v-20,-9,-41,7,-62,0v-11,7,-54,12,-66,24v0,20,-51,35,-38,66v-1,43,50,67,96,67v44,0,162,-55,155,-96xm142,-250v27,-11,47,-32,59,-14v2,11,-80,53,-89,53v-13,1,-15,-11,-12,-21v10,-5,24,-11,42,-18\",w:273},\"Ô\":{d:\"62,-184v78,-31,249,-50,238,74v-6,65,-102,105,-179,115v-77,-7,-152,-71,-101,-149v2,-5,24,-33,42,-40xm279,-120v14,-38,-47,-64,-85,-61v-20,-9,-41,7,-62,0v-11,7,-54,12,-66,24v0,20,-51,35,-38,66v-1,43,50,67,96,67v44,0,162,-55,155,-96xm157,-282v17,18,52,34,54,63v-24,12,-52,-36,-53,-29r-42,34v-23,-4,-6,-31,5,-34v1,1,27,-37,36,-34\",w:273},\"Õ\":{\nd:\"62,-184v78,-31,249,-50,238,74v-6,65,-102,105,-179,115v-77,-7,-152,-71,-101,-149v2,-5,24,-33,42,-40xm279,-120v14,-38,-47,-64,-85,-61v-20,-9,-41,7,-62,0v-11,7,-54,12,-66,24v0,20,-51,35,-38,66v-1,43,50,67,96,67v44,0,162,-55,155,-96xm116,-270v26,-19,54,19,69,22v4,0,15,-5,34,-13v23,-10,22,-16,31,-12v3,11,-8,9,-7,21v-45,28,-47,42,-88,16v-29,-19,-12,-20,-43,2v-8,5,-12,18,-23,15v-13,-3,-12,-20,-4,-23v4,-6,14,-15,31,-28\",w:273},\"Ö\":{d:\"62,-184v78,-31,249,-50,238,74v-6,65,-102,105,-179,115v-77,-7,-152,-71,-101,-149v2,-5,24,-33,42,-40xm279,-120v14,-38,-47,-64,-85,-61v-20,-9,-41,7,-62,0v-11,7,-54,12,-66,24v0,20,-51,35,-38,66v-1,43,50,67,96,67v44,0,162,-55,155,-96xm197,-229v0,8,-4,13,-12,13v-17,0,-19,-19,-16,-34v18,-1,29,1,28,21xm101,-254v7,3,28,9,27,18v1,8,-8,17,-17,17v-18,0,-26,-24,-10,-35\",w:273},\"Ø\":{d:\"76,-211v41,-13,100,-22,140,-3v26,-19,40,-29,44,-29v10,0,15,7,15,20v0,15,-23,23,-30,35v23,39,29,114,-21,139v-36,19,-102,35,-147,18v-14,-5,-29,29,-46,35v-25,-13,-19,-24,3,-56v-9,-17,-28,-27,-28,-60v0,-38,23,-72,70,-99xm107,-66v55,15,125,-12,123,-70v0,-16,-5,-25,-13,-29r-110,95r0,4xm39,-108v-1,3,17,31,22,27v8,-6,109,-90,123,-106v-15,-11,-43,1,-63,2v-33,10,-80,35,-82,77\",w:270},\"Ù\":{d:\"281,-202v6,67,-30,121,-71,152v-3,14,-47,26,-60,39v-41,20,-110,1,-125,-26v-24,-44,-28,-84,-8,-127v12,-26,23,-38,37,-22v-2,2,-3,5,-3,10v-34,26,-30,116,5,134v22,32,86,-1,109,-8v38,-28,104,-64,97,-149v2,-10,7,-8,19,-3xm151,-243v14,10,54,14,37,41v-28,-7,-61,-22,-99,-42v-3,-2,-4,-25,4,-23v16,5,42,17,58,24\",w:262},\"Ú\":{d:\"281,-202v6,67,-30,121,-71,152v-3,14,-47,26,-60,39v-41,20,-110,1,-125,-26v-24,-44,-28,-84,-8,-127v12,-26,23,-38,37,-22v-2,2,-3,5,-3,10v-34,26,-30,116,5,134v22,32,86,-1,109,-8v38,-28,104,-64,97,-149v2,-10,7,-8,19,-3xm194,-265v3,-1,11,4,11,6v3,12,-81,52,-89,54v-14,0,-13,-9,-12,-22\",w:262},\"Û\":{d:\"281,-202v6,67,-30,121,-71,152v-3,14,-47,26,-60,39v-41,20,-110,1,-125,-26v-24,-44,-28,-84,-8,-127v12,-26,23,-38,37,-22v-2,2,-3,5,-3,10v-34,26,-30,116,5,134v22,32,86,-1,109,-8v38,-28,104,-64,97,-149v2,-10,7,-8,19,-3xm150,-266v24,11,58,27,73,46v0,5,-3,6,-10,6v-28,2,-61,-30,-63,-25v-10,0,-57,40,-69,23v3,-10,-8,-15,8,-19v17,-1,34,-29,61,-31\",w:262},\"Ü\":{d:\"281,-202v6,67,-30,121,-71,152v-3,14,-47,26,-60,39v-41,20,-110,1,-125,-26v-24,-44,-28,-84,-8,-127v12,-26,23,-38,37,-22v-2,2,-3,5,-3,10v-34,26,-29,116,5,134v22,32,86,-1,109,-8v38,-28,104,-64,97,-149v2,-10,7,-8,19,-3xm197,-227v0,8,-4,13,-12,13v-18,0,-21,-20,-16,-34v18,-1,28,2,28,21xm101,-252v7,3,27,10,27,18v0,8,-9,18,-18,17v-18,-1,-24,-25,-9,-35\",w:262},\"ß\":{d:\"33,10v-29,4,-28,-32,-16,-70v18,-58,17,-137,56,-176v12,-24,46,-58,82,-43v20,8,47,24,47,54v0,30,-62,59,-67,90v33,23,56,33,63,63v-18,21,-22,36,-48,54v-24,17,-27,41,-53,16v-2,-19,7,-35,24,-42v15,-13,26,-22,34,-40v-13,-17,-78,-29,-56,-70v-3,-27,64,-54,66,-86v-8,-25,-41,-4,-52,8v-29,30,-47,83,-51,141v-17,25,-8,71,-29,101\"},\"à\":{d:\"118,-53v10,4,55,41,62,47v0,7,-5,16,-12,16r-57,-28v-20,3,-40,19,-61,18v-10,2,-43,-17,-42,-36v0,-14,7,-40,27,-41v39,-26,92,-36,104,9v0,6,-2,11,-9,15v-32,-24,-64,-6,-84,11v8,15,58,-17,72,-11xm99,-137v7,6,56,14,37,40v-28,-7,-62,-21,-100,-41v-2,-3,-2,-26,5,-23v16,4,42,17,58,24\",w:173},\"á\":{d:\"118,-53v10,4,55,41,62,47v0,7,-5,16,-12,16r-57,-28v-20,3,-40,19,-61,18v-10,2,-43,-17,-42,-36v0,-14,7,-40,27,-41v39,-26,92,-36,104,9v0,6,-2,11,-9,15v-32,-24,-64,-6,-84,11v8,15,58,-17,72,-11xm32,-117v24,-3,85,-55,101,-32v3,11,-80,53,-89,53v-13,2,-14,-10,-12,-21\",w:173},\"â\":{d:\"118,-53v10,4,55,41,62,47v0,7,-5,16,-12,16r-57,-28v-20,3,-40,19,-61,18v-10,2,-43,-17,-42,-36v0,-14,7,-40,27,-41v39,-26,92,-36,104,9v0,6,-2,11,-9,15v-32,-24,-64,-6,-84,11v8,15,58,-17,72,-11xm147,-97v-27,-6,-39,-26,-60,-37v-21,7,-38,46,-65,23v-2,-5,-3,-10,-4,-14v18,-4,43,-31,61,-42v28,5,40,21,62,36v12,8,18,17,18,25v0,6,-4,9,-12,9\",w:173},\"ã\":{d:\"118,-53v10,4,55,41,62,47v0,7,-5,16,-12,16r-57,-28v-20,3,-40,19,-61,18v-10,2,-43,-17,-42,-36v0,-14,7,-40,27,-41v39,-26,92,-36,104,9v0,6,-2,11,-9,15v-32,-24,-64,-6,-84,11v8,15,58,-17,72,-11xm114,-136v22,-8,41,-24,64,-26v3,11,-7,10,-7,21v-26,20,-45,30,-58,30v-3,3,-49,-26,-49,-28v-10,-1,-32,35,-51,31v-12,-32,8,-29,32,-51v24,-21,54,20,69,23\",w:173},\"ä\":{d:\"118,-53v10,4,55,41,62,47v0,7,-5,16,-12,16r-57,-28v-20,3,-40,19,-61,18v-32,5,-66,-64,-15,-77v39,-26,92,-36,104,9v0,6,-3,11,-9,15v-32,-24,-64,-6,-84,11v8,15,58,-17,72,-11xm142,-119v0,8,-4,13,-12,13v-18,0,-21,-20,-16,-34v18,-1,28,2,28,21xm46,-144v7,3,28,9,27,18v1,8,-9,18,-18,17v-18,-1,-25,-25,-9,-35\",w:173},\"å\":{d:\"118,-53v10,4,55,41,62,47v0,7,-5,16,-12,16r-57,-28v-20,3,-40,19,-61,18v-10,2,-43,-17,-42,-36v0,-14,7,-40,27,-41v39,-26,92,-36,104,9v0,6,-2,11,-9,15v-32,-24,-64,-6,-84,11v8,15,58,-17,72,-11xm54,-101v-37,-20,-9,-71,34,-65v13,1,25,3,38,13v27,45,-34,73,-72,52xm61,-128v4,20,48,7,49,-5v0,-5,-9,-7,-28,-10v-12,-2,-21,11,-21,15\",w:173},\"æ\":{d:\"145,-44r33,7v2,42,-59,29,-85,16v-6,7,-35,24,-48,15v-19,2,-35,-21,-33,-37v2,-24,5,-19,28,-36v-6,-8,-45,3,-33,-21v21,-22,58,-12,85,-1v6,-5,35,-28,45,-15v20,-4,36,17,36,35v0,23,-4,21,-28,37xm111,-72v12,3,49,-16,19,-17v-5,0,-20,12,-19,17xm74,-50v-14,-4,-48,16,-19,17v4,1,19,-14,19,-17\",w:184},\"ç\":{d:\"108,-118v30,-6,56,21,25,33v-24,-6,-39,5,-75,23v-7,4,-12,12,-15,22v31,28,86,3,128,9v3,28,-29,16,-44,28v-53,15,-106,10,-120,-37v0,-48,62,-70,101,-78xm92,18v23,4,45,12,48,32v-2,6,-12,28,-25,28v-24,6,-50,10,-77,13v-16,-4,-11,-28,7,-29v17,-1,51,-4,63,-12v-14,-15,-57,10,-46,-32v9,-8,0,-25,21,-26v6,6,12,14,9,26\",w:171},\"è\":{d:\"108,-124v42,-3,70,39,50,73v-22,-1,-70,12,-94,10v-1,1,-2,3,-2,3v0,3,12,7,35,14v18,0,64,7,30,21v-10,14,-31,6,-53,6v-26,-7,-70,-26,-70,-58v0,-54,48,-65,104,-69xm130,-78v-2,-35,-66,-13,-77,3v16,6,62,6,77,-3xm95,-166v7,6,54,14,37,40v-28,-7,-62,-21,-100,-41v-3,-3,-3,-26,5,-24v16,5,42,18,58,25\",w:161},\"é\":{d:\"108,-124v42,-3,70,39,50,73v-22,-1,-70,12,-94,10v-1,1,-2,3,-2,3v0,3,12,7,35,14v18,0,64,7,30,21v-10,14,-31,6,-53,6v-26,-7,-70,-26,-70,-58v0,-54,48,-65,104,-69xm130,-78v-2,-35,-66,-13,-77,3v16,6,62,6,77,-3xm76,-169v26,-11,48,-32,59,-14v3,10,-80,53,-89,53v-14,1,-14,-10,-12,-21v15,-7,16,-7,42,-18\",w:161},\"ê\":{d:\"108,-124v42,-3,70,39,50,73v-22,-1,-70,12,-94,10v-1,1,-2,3,-2,3v0,3,12,7,35,14v18,0,64,7,30,21v-10,14,-31,6,-53,6v-26,-7,-70,-26,-70,-58v0,-54,48,-65,104,-69xm130,-78v-2,-35,-66,-13,-77,3v16,6,62,6,77,-3xm145,-129v-27,-6,-39,-26,-60,-37v-8,0,-10,4,-14,10v-11,15,-51,34,-56,0v17,-4,44,-32,61,-43v28,5,41,21,63,36v12,8,17,17,17,25v0,6,-3,9,-11,9\",w:161},\"ë\":{d:\"108,-124v42,-3,70,39,50,73v-22,-1,-70,12,-94,10r-3,3v0,3,12,7,36,14v18,0,64,7,30,21v-10,14,-31,6,-53,6v-26,-7,-67,-27,-71,-58v7,-52,48,-65,105,-69xm130,-78v-2,-35,-66,-13,-77,3v16,6,62,6,77,-3xm140,-144v0,8,-4,12,-12,12v-18,0,-19,-19,-16,-33v18,-1,29,1,28,21xm44,-169v7,3,28,9,28,17v0,9,-9,18,-18,18v-18,0,-25,-24,-10,-35\",w:161},\"ì\":{d:\"57,-98v22,5,13,50,11,95v-7,1,-11,2,-20,-4v1,-7,-12,-18,-10,-24v4,-22,-2,-64,19,-67xm70,-139v14,10,54,14,37,41v-28,-7,-61,-22,-99,-42v-3,-2,-3,-25,5,-23v15,5,41,17,57,24\",w:109},\"í\":{d:\"59,-98v20,4,15,53,10,95v-6,1,-11,2,-19,-4v1,-7,-12,-18,-10,-24v4,-22,-4,-65,19,-67xm50,-139v27,-11,49,-32,59,-14v3,11,-80,53,-89,53v-14,1,-14,-12,-11,-22v15,-7,14,-6,41,-17\",w:105},\"î\":{d:\"72,-98v20,5,12,51,10,95v-6,2,-13,1,-20,-4v1,-8,-12,-18,-10,-24v4,-22,-3,-65,20,-67xm134,-94v-26,-7,-39,-25,-60,-37v-7,0,-9,4,-13,10v-14,15,-51,34,-56,-1v18,-4,45,-33,61,-43v27,6,40,22,62,37v12,8,18,17,18,25v0,6,-4,9,-12,9\",w:143},\"ï\":{d:\"55,-97v19,5,15,53,10,95v-17,5,-26,-14,-30,-28v6,-20,-3,-65,20,-67xm110,-118v0,8,-4,13,-12,13v-17,0,-19,-19,-16,-34v18,-1,29,1,28,21xm14,-143v6,3,28,8,28,17v0,9,-9,18,-18,18v-18,0,-25,-24,-10,-35\",w:107},\"ñ\":{d:\"115,-129v34,6,59,50,59,105v0,31,-15,24,-30,17v-15,-29,-5,-42,-20,-81v-35,-13,-68,52,-88,61v-20,-4,-38,-36,-19,-59v0,-12,3,-14,10,-28v11,-8,18,11,27,12xm117,-166v22,-7,41,-23,64,-26v3,11,-7,10,-7,21v-26,20,-45,30,-58,30v-3,3,-49,-26,-49,-28v-10,-1,-32,35,-51,31v-5,-12,-8,-16,0,-23v4,-6,28,-29,48,-33v17,-3,43,28,53,28\",w:171},\"ò\":{d:\"102,-132v50,-20,99,16,99,60v0,54,-60,64,-108,79v-50,-2,-110,-48,-76,-100v22,-17,49,-33,85,-39xm136,-104v-34,0,-91,27,-94,47v16,51,125,16,125,-22v0,-17,-10,-25,-31,-25xm115,-181v14,10,51,13,37,40v-28,-7,-62,-21,-100,-41v-3,-2,-3,-26,5,-23v16,5,42,17,58,24\",w:191},\"ó\":{d:\"102,-132v50,-20,99,16,99,60v0,54,-60,64,-108,79v-50,-2,-110,-48,-76,-100v22,-17,49,-33,85,-39xm136,-104v-34,0,-91,27,-94,47v16,51,125,16,125,-22v0,-17,-10,-25,-31,-25xm49,-154v24,-3,85,-55,101,-32v3,11,-80,53,-89,53v-14,0,-13,-8,-12,-21\",w:191},\"ô\":{d:\"102,-132v50,-20,99,16,99,60v0,54,-60,64,-108,79v-50,-2,-110,-48,-76,-100v22,-17,49,-33,85,-39xm136,-104v-34,0,-91,27,-94,47v16,51,125,16,125,-22v0,-17,-10,-25,-31,-25xm110,-177v-22,6,-38,45,-65,22v-2,-4,-3,-9,-4,-13v18,-4,43,-32,61,-43v27,6,40,21,62,36v12,9,18,17,18,25v1,11,-15,10,-23,7\",w:191},\"õ\":{d:\"102,-132v50,-20,99,16,99,60v0,54,-60,64,-108,79v-50,-2,-110,-48,-76,-100v22,-17,49,-33,85,-39xm136,-104v-34,0,-91,27,-94,47v16,51,125,16,125,-22v0,-17,-10,-25,-31,-25xm58,-199v26,-21,54,18,69,22v4,0,15,-5,34,-13v22,-9,21,-16,31,-13v3,11,-9,9,-7,22v-26,20,-46,30,-59,30v-2,4,-49,-28,-49,-29v-11,0,-32,31,-46,32v-12,-3,-13,-21,-4,-23v4,-6,14,-15,31,-28\",w:191},\"ö\":{d:\"102,-132v50,-20,99,16,99,60v0,54,-60,64,-108,79v-50,-2,-110,-48,-76,-100v22,-17,49,-33,85,-39xm136,-104v-34,0,-91,27,-94,47v16,51,125,16,125,-22v0,-17,-10,-25,-31,-25xm161,-160v0,8,-4,13,-12,13v-17,0,-19,-19,-16,-34v18,-1,29,1,28,21xm65,-185v7,3,28,9,28,18v0,7,-9,18,-18,17v-18,1,-25,-24,-10,-35\",w:191},\"÷\":{d:\"167,-158v-4,3,-7,9,-10,20v-23,4,-34,-8,-29,-31v14,-6,18,1,39,11xm78,-72v-53,11,-53,12,-69,-15v-1,-12,11,-17,22,-14v71,-13,151,-18,230,-24v11,1,21,16,23,28v-28,20,-90,11,-126,16v-36,5,-62,5,-80,9xm123,-40v19,-17,41,-1,41,17v0,13,-6,19,-17,19v-15,0,-29,-14,-24,-36\",w:293},\"ø\":{d:\"76,-136v17,7,33,-8,51,0v9,-6,21,-13,36,-21v23,22,-13,31,3,50v11,13,4,21,14,35v-4,5,-1,14,-4,23v-14,23,-45,41,-84,39v-12,2,-29,28,-41,38v-2,-11,-34,-10,-15,-30v3,-7,5,-11,5,-11v-15,-24,-60,-54,-22,-89v23,-21,25,-32,57,-34xm102,-54v18,1,50,-19,30,-32v-12,7,-22,18,-30,32xm85,-92v-14,3,-26,8,-38,17v2,20,17,13,26,0v6,-8,12,-13,12,-17\",w:188},\"ù\":{d:\"196,-129v-1,-4,12,-13,15,-13v6,0,8,7,8,21v0,24,-7,25,-13,45v-7,7,-14,21,-24,29v-9,24,-61,45,-89,45v-63,0,-105,-72,-67,-126v24,-3,19,27,18,46v-1,26,23,42,54,40v38,-3,88,-51,98,-87xm126,-166v7,6,56,14,37,40v-28,-7,-62,-22,-100,-42v-2,-3,-2,-26,5,-23v16,4,42,18,58,25\",w:213},\"ú\":{d:\"196,-129v-1,-4,12,-13,15,-13v6,0,8,7,8,21v0,24,-7,25,-13,45v-7,7,-14,21,-24,29v-9,24,-61,45,-89,45v-63,0,-105,-72,-67,-126v24,-3,19,27,18,46v-1,26,23,42,54,40v38,-3,88,-51,98,-87xm106,-174v26,-11,48,-32,59,-14v3,11,-81,53,-89,54v-13,1,-15,-12,-11,-22v15,-7,14,-7,41,-18\",w:213},\"û\":{d:\"196,-129v-1,-4,12,-13,15,-13v6,0,8,7,8,21v0,24,-7,25,-13,45v-7,7,-14,21,-24,29v-9,24,-61,45,-89,45v-63,0,-105,-72,-67,-126v24,-3,19,27,18,46v-1,26,23,42,54,40v38,-3,88,-51,98,-87xm172,-143v-27,-6,-39,-26,-60,-37v-8,0,-10,4,-14,10v-11,15,-49,35,-56,0v17,-4,44,-32,61,-43v27,6,41,21,63,36v12,9,17,17,17,25v0,6,-3,9,-11,9\",w:213},\"ü\":{d:\"196,-129v-1,-4,12,-13,15,-13v6,0,8,7,8,21v0,24,-7,25,-13,45v-7,7,-14,21,-24,29v-9,24,-61,45,-89,45v-63,0,-105,-72,-67,-126v24,-3,19,27,18,46v-1,26,23,42,54,40v38,-3,88,-51,98,-87xm168,-161v0,8,-3,13,-11,13v-17,0,-20,-19,-17,-34v18,-1,29,1,28,21xm72,-186v7,3,29,9,28,18v0,7,-9,18,-18,17v-18,1,-25,-24,-10,-35\",w:213},\"ÿ\":{d:\"118,85v-11,11,-11,38,-22,61v-2,-1,-2,31,-17,27v-11,0,-21,-10,-21,-22v20,-66,23,-61,64,-168v-22,1,-38,16,-58,4v-22,4,-51,-16,-51,-42v-11,-13,-7,-59,7,-58v16,1,21,24,22,51v21,33,66,5,94,-7v4,-3,26,-14,38,-29r17,0v23,44,-23,59,-34,102v-6,9,-13,9,-13,26v-15,6,-12,33,-27,48v0,2,1,4,1,7xm158,-136v0,8,-4,13,-12,13v-18,0,-21,-20,-16,-34v18,-1,29,1,28,21xm62,-161v7,3,28,9,27,18v1,8,-8,17,-17,17v-18,0,-26,-24,-10,-35\",w:190},\"ı\":{d:\"43,-103v21,4,16,56,11,100v-7,2,-11,1,-20,-5v0,-7,-13,-18,-11,-25v4,-23,-3,-68,20,-70\",w:80},\"Œ\":{d:\"247,-243v71,4,161,-7,245,-8v17,0,27,6,27,17v-8,27,-70,14,-104,23v-3,1,-52,0,-65,7r0,4v16,16,17,29,17,65v32,10,74,-14,99,16v-14,25,-76,17,-127,24v-17,18,-55,32,-75,51v85,0,128,-3,204,-11v15,-2,21,11,20,29v-78,24,-177,12,-270,24v-24,3,-24,-29,-48,-15v-46,7,-70,4,-105,-4v-19,-18,-42,-22,-52,-55v-10,-34,0,-47,12,-78v-18,-59,48,-78,105,-84v17,-18,103,-13,117,-5xm125,-45v76,-9,186,-43,209,-105v-26,-67,-137,-83,-217,-54v3,34,-45,25,-60,58v-41,48,5,108,68,101\",w:492},\"œ\":{d:\"185,-54v25,28,107,-17,104,33v-12,12,-60,14,-87,14v0,0,1,1,2,1v-11,1,-39,-9,-50,-17v-28,17,-75,32,-114,7v-22,-14,-34,-11,-34,-41v0,-36,33,-49,48,-75v29,-16,72,-3,95,11v12,-9,48,-27,59,-26v30,0,64,15,65,40v0,7,-6,20,-20,37v-29,1,-44,11,-68,16xm226,-106v-21,-7,-41,-2,-48,13v14,1,42,-7,48,-13xm132,-87v-21,-35,-94,11,-92,24v-2,14,43,21,61,21v25,0,36,-20,31,-45\",w:295},\"Ÿ\":{d:\"176,-189v35,20,-25,54,-39,72v-26,34,-57,57,-74,104v-10,15,-4,14,-23,3r0,-10v19,-44,27,-46,50,-81v-9,-5,-24,4,-34,4v-38,0,-54,-50,-44,-87v21,-5,18,19,22,35v4,18,15,27,29,27v41,0,60,-39,113,-67xm153,-222v0,8,-3,12,-11,12v-18,0,-21,-19,-16,-33v18,-1,28,2,27,21xm57,-247v8,2,29,9,28,17v0,21,-37,24,-36,1v0,-7,2,-13,8,-18\",w:135},\"ƒ\":{d:\"115,-262v-23,6,-39,63,-38,96v1,3,57,2,54,16v1,22,-45,15,-51,30v3,34,12,68,10,103v14,17,-18,53,-28,63v-48,8,-89,5,-95,-37v20,-5,77,21,83,-18v17,-29,-4,-61,0,-98v0,-5,-3,-10,-7,-17v-33,4,-43,-17,-25,-37v10,-4,27,5,27,-10v0,-43,15,-77,32,-109v12,-7,16,-22,38,-20v11,1,51,35,25,55v-9,1,-16,-17,-25,-17\",w:145},\"ˆ\":{d:\"144,-220v-29,0,-41,-27,-63,-39v-8,0,-11,5,-15,11v-17,12,-32,31,-54,13v-2,-5,-3,-9,-4,-14v20,-5,45,-33,64,-45v28,6,43,23,65,38v12,9,19,19,19,27v0,6,-4,9,-12,9\",w:165},\"ˇ\":{d:\"39,-286v33,46,63,-4,96,-16v6,0,9,6,9,19v0,24,-49,46,-77,46v-32,0,-52,-28,-59,-48v0,-25,23,-17,31,-1\",w:153},\"˘\":{d:\"65,-269v20,-11,45,-31,74,-36v20,30,-42,40,-59,66v-5,6,-11,8,-18,8v-8,-3,-45,-32,-51,-54v5,-24,14,-13,34,1\",w:158},\"˙\":{d:\"23,-302v15,-13,32,1,32,18v1,22,-36,29,-39,4v0,0,3,-7,7,-22\",w:70},\"˚\":{d:\"23,-225v-43,-24,-11,-85,41,-78v16,2,31,4,46,17v32,54,-41,86,-87,61xm33,-257v2,20,57,11,57,-6v0,-6,-11,-9,-33,-12v-14,-2,-24,13,-24,18\",w:123},\"˛\":{d:\"82,-5v-8,12,-16,55,-21,75v0,4,2,7,7,7v6,0,22,-7,50,-20v8,0,12,7,12,20v-2,22,-6,14,-27,30v-15,12,-26,16,-30,16v-47,-8,-59,-14,-56,-75v8,-27,12,-54,25,-77v19,-21,35,15,40,24\",w:138},\"˜\":{d:\"47,-300v26,-21,57,19,72,23v4,0,16,-5,36,-14v24,-10,22,-16,32,-13v3,12,-7,11,-7,23v-27,21,-48,32,-62,32v-3,2,-52,-27,-51,-31v-12,-2,-34,40,-54,33v-4,-13,-8,-18,1,-24v5,-7,16,-15,33,-29\",w:186},\"˝\":{d:\"91,-249v15,-11,38,-53,57,-29v0,9,0,14,-3,23v-2,3,-20,22,-54,55v-5,5,-10,8,-16,8v-17,2,-6,-22,-7,-31v-1,0,-2,0,-4,1v-17,21,-29,31,-50,27v-5,-18,-3,-15,3,-27v23,-27,40,-46,48,-59v7,-12,31,3,29,9v-1,14,-3,24,-13,31v4,4,9,-1,10,-8\",w:151},\"–\":{d:\"6,-66v-8,-72,79,-21,146,-39v37,-10,79,7,111,0v9,8,14,13,14,17v2,26,-72,13,-99,21v-83,4,-124,21,-172,1\",w:282},\"—\":{d:\"175,-106v86,-9,201,1,286,-1v11,6,13,11,6,30v-118,15,-246,10,-377,10v-25,0,-73,3,-82,-8r-2,-26v11,-13,32,-9,52,-7v38,3,84,-5,117,2\",w:485},\"‘\":{d:\"73,-262v-10,7,-41,39,-38,69v-15,13,-27,-16,-28,-28v-2,-20,51,-83,66,-83v20,0,25,41,0,42\",w:95},\"’\":{d:\"74,-300v13,31,-1,99,-44,101v-13,0,-19,-5,-19,-15v6,-10,31,-34,35,-59v2,-11,1,-32,11,-32v6,0,11,2,17,5\",w:90},\"‚\":{d:\"25,63v-26,21,-48,-2,-22,-24v14,-12,35,-40,35,-69v3,-2,3,-11,12,-9v35,17,5,88,-25,102\",w:97},\"“\":{d:\"66,-261v-21,5,-37,51,-22,77v0,4,-2,6,-7,6v-31,-9,-38,-62,-12,-94v12,-15,21,-28,31,-34v16,-1,19,24,22,34v10,-11,22,-32,43,-23v-2,8,4,16,5,19v-6,11,-51,53,-29,74v-12,21,-30,5,-33,-17v-6,-13,9,-28,2,-42\",w:118},\"”\":{d:\"120,-294v12,3,30,26,19,34v2,15,-40,70,-55,66v-40,-10,10,-51,14,-64v3,-3,8,-31,22,-36xm70,-306v14,3,26,34,16,49v-19,30,-31,45,-58,59v-12,-11,-33,-17,-7,-36v13,-19,36,-27,36,-59v0,-5,9,-13,13,-13\",w:148},\"„\":{d:\"25,63v-26,21,-48,-2,-22,-24v11,-9,36,-41,35,-69v3,-2,4,-12,12,-9v36,14,5,89,-25,102xm84,64v-24,20,-45,-1,-21,-24v21,-20,32,-35,35,-69v3,-2,3,-11,12,-9v36,17,9,86,-26,102\",w:135},\"†\":{d:\"22,-286v15,6,5,-20,19,-19v9,-3,15,21,17,22v6,1,12,3,20,6v3,10,5,16,-9,16v-34,-10,-6,51,-34,52v-20,-7,11,-47,-15,-49v-14,3,-25,-5,-17,-24v7,-2,14,-4,19,-4\",w:77},\"‡\":{d:\"102,-284v16,2,42,-2,33,18v-7,15,-42,1,-38,30v3,3,31,1,30,11v4,15,-29,19,-36,24v-2,18,-4,24,-16,29r-25,-26v-25,7,-53,3,-42,-25v4,-10,70,0,51,-22v-17,4,-41,12,-39,-15v-5,-16,39,-18,44,-20v4,-2,7,-10,10,-24v19,-3,23,6,28,20\",w:145},\"•\":{d:\"130,-114v0,47,-124,54,-120,-8r6,-31v44,-28,64,-34,104,0v8,6,10,20,10,39\",w:139},\"…\":{d:\"244,-24v-1,21,-38,32,-41,3v-2,-19,23,-22,34,-17v0,7,0,15,7,14xm113,-24v0,-22,28,-21,38,-8v5,34,-39,40,-38,8xm35,-2v-10,-2,-36,-17,-18,-29v-1,-15,17,-17,31,-6v7,17,6,33,-13,35\",w:258},\"‰\":{d:\"398,-131v58,-1,87,13,72,65v-1,30,-66,63,-99,65v-56,3,-99,-58,-62,-102v2,2,5,2,8,2v20,-16,51,-17,81,-30xm202,-279v33,0,94,-24,95,18v-7,31,-33,27,-54,55v-36,32,-71,74,-112,99v-18,18,-40,34,-51,58v-19,14,-25,37,-56,40v-17,2,-25,-29,-10,-40v15,-11,40,-37,52,-52r87,-72v-51,13,-100,6,-116,-27v1,-5,-6,-30,-9,-36v-3,-5,22,-41,27,-39v29,2,16,34,5,49v0,15,14,23,42,23v42,0,59,-31,28,-38v-17,-4,-53,3,-50,-23v0,-7,1,-12,4,-16v16,-9,36,4,49,5v0,0,23,-4,69,-4xm222,-118v33,-2,55,18,50,57v-29,36,-48,45,-96,50v-27,-5,-56,-17,-58,-51v13,-37,64,-43,104,-56xm335,-61v13,44,101,7,108,-31v-11,-3,-20,-4,-30,-4v-18,-1,-82,18,-78,35xm225,-244v-18,0,-29,-1,-46,3v7,15,6,28,0,43v15,-14,34,-30,46,-46xm164,-53v26,5,59,-10,76,-26v-17,-16,-49,2,-67,14v1,8,-8,6,-9,12\",w:485},\"‹\":{d:\"64,-107v9,17,86,17,87,43v0,11,-4,16,-13,16v-36,-11,-70,-22,-109,-31v-19,-4,-18,-14,-9,-36v59,-56,93,-84,101,-84v17,0,19,20,13,29\",w:159},\"›\":{d:\"41,-181v26,27,112,44,70,91r-82,60v-20,3,-25,-23,-13,-32r70,-51r-66,-46v-5,-6,-4,-28,5,-29v4,2,9,4,16,7\",w:137},\"⁄\":{d:\"193,-305v7,6,17,31,3,41v-10,7,-12,13,-21,25v-79,56,-190,209,-197,260r-18,0v-23,-19,9,-70,15,-85v52,-83,121,-179,218,-241\",w:120},\"™\":{d:\"213,-307v28,9,11,49,7,75v-1,4,-4,6,-11,6v-7,1,-11,-14,-11,-34v-14,-6,-34,34,-46,28v-2,0,-10,-9,-24,-27v-10,7,-3,36,-27,31v-15,-24,-3,-27,1,-48v-6,-7,-27,-1,-31,3v-3,14,-7,30,-11,51v-5,10,-29,9,-24,-12v-5,-8,1,-18,3,-35v-13,6,-33,2,-29,-18v20,-17,64,-17,100,-19v28,-1,29,30,45,39v11,-6,35,-32,58,-40\",w:239},\"∆\":{d:\"18,-1v-24,-30,8,-48,25,-71v14,-19,34,-28,40,-56v20,-35,29,-14,57,4v9,39,43,62,57,102v0,16,-34,17,-50,14v-28,2,-72,4,-129,7xm139,-47r-22,-52v-12,-5,-12,15,-24,27v-7,6,-14,16,-23,28v23,1,36,-1,69,-3\",w:199},\"∙\":{d:\"57,-77v6,18,-7,21,-19,23v-34,6,-25,-40,-9,-43v18,-3,29,8,28,20\",w:67},\"√\":{d:\"364,-218v43,-21,80,-51,104,-32v-3,19,-24,21,-44,40v-41,15,-78,53,-136,78r-137,98v-20,16,-79,66,-91,68v-3,1,-25,-11,-24,-13v-4,-28,-43,-61,-30,-85v26,-15,42,19,58,32r295,-188v0,1,2,2,5,2\",w:474},\"∞\":{d:\"322,-72v-4,22,-54,41,-76,41v-43,0,-83,-17,-114,-35v-46,19,-125,53,-128,-18v-1,-14,10,-22,13,-35v29,-10,62,-31,97,-4v37,28,47,5,75,-8v40,-19,73,-10,114,1v13,1,18,55,19,58xm228,-69v15,0,62,-12,61,-25v-19,-23,-89,-10,-105,11v0,2,1,4,2,4v28,6,42,10,42,10xm75,-102v-13,2,-41,4,-44,19v0,4,3,7,10,7v21,0,40,-6,54,-17v-9,-6,-16,-9,-20,-9\",w:330},\"∫\":{d:\"62,-151v-7,-70,20,-130,63,-150v28,1,39,10,70,23v20,8,6,33,-6,35v-29,-13,-45,-20,-49,-20v-20,-4,-45,51,-43,70v8,60,5,129,5,189v0,62,-27,93,-79,93v-37,-1,-71,-14,-63,-57v21,0,79,34,91,-2v16,-3,14,-64,21,-85v-2,-31,-1,-74,-10,-96\",w:156},\"≈\":{d:\"133,-112v21,15,48,-30,78,-17v3,3,5,7,5,9v-8,30,-47,45,-76,45v-19,0,-64,-48,-90,-21r-29,20v-6,-1,-17,-16,-15,-32v24,-17,70,-42,107,-21v4,4,10,9,20,17xm138,-57v28,2,48,-25,76,-26v13,30,-21,42,-40,53v-41,24,-77,-15,-114,-23v-15,14,-46,32,-49,-1v-3,-9,27,-28,54,-30\",w:223},\"≠\":{d:\"48,-130v29,11,49,-57,60,-50v25,6,7,27,-1,46v22,5,29,7,21,22v-18,2,-48,-1,-50,15v9,8,53,-7,54,10v-4,22,-46,20,-72,24v-7,13,-18,32,-34,57v-8,6,-15,-3,-13,-14v-1,-9,15,-39,14,-45v-30,5,-24,-17,-13,-25v12,-1,36,4,29,-13v-14,0,-47,6,-36,-12v0,-18,27,-13,41,-15\",w:140},\"≤\":{d:\"73,-109v10,15,87,16,87,42v0,11,-5,16,-13,16v-36,-11,-69,-24,-109,-31v-18,-8,-18,-13,-9,-36v59,-56,93,-83,101,-83v16,0,18,17,14,28v-27,24,-42,35,-71,64xm10,-29v35,-12,117,-26,148,-3v1,2,-5,19,-8,18r-124,15v-16,2,-26,-18,-16,-30\",w:168},\"≥\":{d:\"115,-174v20,7,53,36,20,57v-19,11,-91,68,-82,59v-18,3,-25,-22,-13,-31v15,-10,14,-10,70,-51r-50,-37v-5,-4,-5,-27,4,-28v16,7,40,17,51,31xm14,-32v33,-10,86,-14,127,-10v12,12,5,23,-11,27v-49,9,-82,13,-99,13v-22,0,-24,-16,-17,-30\",w:163},\"◊\":{d:\"76,-158v48,-8,64,11,100,36v28,19,-5,39,-22,54v-15,13,-40,32,-48,49v-17,5,-12,0,-27,-16v-6,-6,-86,-31,-68,-53r2,-9v27,-23,48,-44,63,-61xm93,-65v12,-2,35,-31,41,-38v-5,-10,-16,-14,-34,-24v-12,12,-36,29,-40,44v19,11,30,18,33,18\",w:199}}}),\"undefined\"==typeof Raphael&&\"undefined\"==typeof Snap)throw new Error(\"Raphael or Snap.svg is required to be included.\");if(_.isEmpty(Diagram.themes))throw new Error(\"No themes were registered. Please call registerTheme(...).\");Diagram.themes.hand=Diagram.themes.snapHand||Diagram.themes.raphaelHand,Diagram.themes.simple=Diagram.themes.snapSimple||Diagram.themes.raphaelSimple,Diagram.prototype.drawSVG=function(container,options){var defaultOptions={theme:\"hand\"};if(options=_.defaults(options||{},defaultOptions),!(options.theme in Diagram.themes))throw new Error(\"Unsupported theme: \"+options.theme);var div=_.isString(container)?document.getElementById(container):container;if(null===div||!div.tagName)throw new Error(\"Invalid container: \"+container);var Theme=Diagram.themes[options.theme];new Theme(this,options,function(drawing){drawing.draw(div)})},\"undefined\"!=typeof jQuery&&!function($){$.fn.sequenceDiagram=function(options){return this.each(function(){var $this=$(this),diagram=Diagram.parse($this.text());$this.html(\"\"),diagram.drawSVG(this,options)})}}(jQuery);var root=\"object\"==typeof self&&self.self==self&&self||\"object\"==typeof global&&global.global==global&&global;\"undefined\"!=typeof exports?(\"undefined\"!=typeof module&&module.exports&&(exports=module.exports=Diagram),exports.Diagram=Diagram):root.Diagram=Diagram}();\n//# sourceMappingURL=sequence-diagram-raphael.js"
  },
  {
    "path": "static/editor.md/lib/sequence/sequence-diagram-raphael.js",
    "content": "/** js sequence diagrams 2.0.1\n *  https://bramp.github.io/js-sequence-diagrams/\n *  (c) 2012-2017 Andrew Brampton (bramp.net)\n *  @license Simplified BSD license.\n */\n(function() {\n'use strict';\n/*global Diagram */\n\n// The following are included by preprocessor */\n/** js sequence diagrams\n *  https://bramp.github.io/js-sequence-diagrams/\n *  (c) 2012-2017 Andrew Brampton (bramp.net)\n *  Simplified BSD license.\n */\n/*global grammar _ */\n\nfunction Diagram() {\n  this.title   = undefined;\n  this.actors  = [];\n  this.signals = [];\n}\n/*\n * Return an existing actor with this alias, or creates a new one with alias and name.\n */\nDiagram.prototype.getActor = function(alias, name) {\n  alias = alias.trim();\n\n  var i;\n  var actors = this.actors;\n  for (i in actors) {\n    if (actors[i].alias == alias) {\n      return actors[i];\n    }\n  }\n  i = actors.push(new Diagram.Actor(alias, (name || alias), actors.length));\n  return actors[ i - 1 ];\n};\n\n/*\n * Parses the input as either a alias, or a \"name as alias\", and returns the corresponding actor.\n */\nDiagram.prototype.getActorWithAlias = function(input) {\n  input = input.trim();\n\n  // We are lazy and do some of the parsing in javascript :(. TODO move into the .jison file.\n  var s = /([\\s\\S]+) as (\\S+)$/im.exec(input);\n  var alias;\n  var name;\n  if (s) {\n    name  = s[1].trim();\n    alias = s[2].trim();\n  } else {\n    name = alias = input;\n  }\n  return this.getActor(alias, name);\n};\n\nDiagram.prototype.setTitle = function(title) {\n  this.title = title;\n};\n\nDiagram.prototype.addSignal = function(signal) {\n  this.signals.push(signal);\n};\n\nDiagram.Actor = function(alias, name, index) {\n  this.alias = alias;\n  this.name  = name;\n  this.index = index;\n};\n\nDiagram.Signal = function(actorA, signaltype, actorB, message) {\n  this.type       = 'Signal';\n  this.actorA     = actorA;\n  this.actorB     = actorB;\n  this.linetype   = signaltype & 3;\n  this.arrowtype  = (signaltype >> 2) & 3;\n  this.message    = message;\n};\n\nDiagram.Signal.prototype.isSelf = function() {\n  return this.actorA.index == this.actorB.index;\n};\n\nDiagram.Note = function(actor, placement, message) {\n  this.type      = 'Note';\n  this.actor     = actor;\n  this.placement = placement;\n  this.message   = message;\n\n  if (this.hasManyActors() && actor[0] == actor[1]) {\n    throw new Error('Note should be over two different actors');\n  }\n};\n\nDiagram.Note.prototype.hasManyActors = function() {\n  return _.isArray(this.actor);\n};\n\nDiagram.unescape = function(s) {\n  // Turn \"\\\\n\" into \"\\n\"\n  return s.trim().replace(/^\"(.*)\"$/m, '$1').replace(/\\\\n/gm, '\\n');\n};\n\nDiagram.LINETYPE = {\n  SOLID: 0,\n  DOTTED: 1\n};\n\nDiagram.ARROWTYPE = {\n  FILLED: 0,\n  OPEN: 1\n};\n\nDiagram.PLACEMENT = {\n  LEFTOF: 0,\n  RIGHTOF: 1,\n  OVER: 2\n};\n\n// Some older browsers don't have getPrototypeOf, thus we polyfill it\n// https://github.com/bramp/js-sequence-diagrams/issues/57\n// https://github.com/zaach/jison/issues/194\n// Taken from http://ejohn.org/blog/objectgetprototypeof/\nif (typeof Object.getPrototypeOf !== 'function') {\n  /* jshint -W103 */\n  if (typeof 'test'.__proto__ === 'object') {\n    Object.getPrototypeOf = function(object) {\n      return object.__proto__;\n    };\n  } else {\n    Object.getPrototypeOf = function(object) {\n      // May break if the constructor has been tampered with\n      return object.constructor.prototype;\n    };\n  }\n  /* jshint +W103 */\n}\n\n/** The following is included by preprocessor */\n/* parser generated by jison 0.4.15 */\n/*\n  Returns a Parser object of the following structure:\n\n  Parser: {\n    yy: {}\n  }\n\n  Parser.prototype: {\n    yy: {},\n    trace: function(),\n    symbols_: {associative list: name ==> number},\n    terminals_: {associative list: number ==> name},\n    productions_: [...],\n    performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$),\n    table: [...],\n    defaultActions: {...},\n    parseError: function(str, hash),\n    parse: function(input),\n\n    lexer: {\n        EOF: 1,\n        parseError: function(str, hash),\n        setInput: function(input),\n        input: function(),\n        unput: function(str),\n        more: function(),\n        less: function(n),\n        pastInput: function(),\n        upcomingInput: function(),\n        showPosition: function(),\n        test_match: function(regex_match_array, rule_index),\n        next: function(),\n        lex: function(),\n        begin: function(condition),\n        popState: function(),\n        _currentRules: function(),\n        topState: function(),\n        pushState: function(condition),\n\n        options: {\n            ranges: boolean           (optional: true ==> token location info will include a .range[] member)\n            flex: boolean             (optional: true ==> flex-like lexing behaviour where the rules are tested exhaustively to find the longest match)\n            backtrack_lexer: boolean  (optional: true ==> lexer regexes are tested in order and for each matching regex the action code is invoked; the lexer terminates the scan when a token is returned by the action code)\n        },\n\n        performAction: function(yy, yy_, $avoiding_name_collisions, YY_START),\n        rules: [...],\n        conditions: {associative list: name ==> set},\n    }\n  }\n\n\n  token location info (@$, _$, etc.): {\n    first_line: n,\n    last_line: n,\n    first_column: n,\n    last_column: n,\n    range: [start_number, end_number]       (where the numbers are indexes into the input string, regular zero-based)\n  }\n\n\n  the parseError function receives a 'hash' object with these members for lexer and parser errors: {\n    text:        (matched text)\n    token:       (the produced terminal token, if any)\n    line:        (yylineno)\n  }\n  while parser (grammar) errors will also provide these members, i.e. parser errors deliver a superset of attributes: {\n    loc:         (yylloc)\n    expected:    (string describing the set of expected tokens)\n    recoverable: (boolean: TRUE when the parser has a error recovery rule available for this particular error)\n  }\n*/\nvar parser = function() {\n    function Parser() {\n        this.yy = {};\n    }\n    var o = function(k, v, o, l) {\n        for (o = o || {}, l = k.length; l--; o[k[l]] = v) ;\n        return o;\n    }, $V0 = [ 5, 8, 9, 13, 15, 24 ], $V1 = [ 1, 13 ], $V2 = [ 1, 17 ], $V3 = [ 24, 29, 30 ], parser = {\n        trace: function() {},\n        yy: {},\n        symbols_: {\n            error: 2,\n            start: 3,\n            document: 4,\n            EOF: 5,\n            line: 6,\n            statement: 7,\n            NL: 8,\n            participant: 9,\n            actor_alias: 10,\n            signal: 11,\n            note_statement: 12,\n            title: 13,\n            message: 14,\n            note: 15,\n            placement: 16,\n            actor: 17,\n            over: 18,\n            actor_pair: 19,\n            \",\": 20,\n            left_of: 21,\n            right_of: 22,\n            signaltype: 23,\n            ACTOR: 24,\n            linetype: 25,\n            arrowtype: 26,\n            LINE: 27,\n            DOTLINE: 28,\n            ARROW: 29,\n            OPENARROW: 30,\n            MESSAGE: 31,\n            $accept: 0,\n            $end: 1\n        },\n        terminals_: {\n            2: \"error\",\n            5: \"EOF\",\n            8: \"NL\",\n            9: \"participant\",\n            13: \"title\",\n            15: \"note\",\n            18: \"over\",\n            20: \",\",\n            21: \"left_of\",\n            22: \"right_of\",\n            24: \"ACTOR\",\n            27: \"LINE\",\n            28: \"DOTLINE\",\n            29: \"ARROW\",\n            30: \"OPENARROW\",\n            31: \"MESSAGE\"\n        },\n        productions_: [ 0, [ 3, 2 ], [ 4, 0 ], [ 4, 2 ], [ 6, 1 ], [ 6, 1 ], [ 7, 2 ], [ 7, 1 ], [ 7, 1 ], [ 7, 2 ], [ 12, 4 ], [ 12, 4 ], [ 19, 1 ], [ 19, 3 ], [ 16, 1 ], [ 16, 1 ], [ 11, 4 ], [ 17, 1 ], [ 10, 1 ], [ 23, 2 ], [ 23, 1 ], [ 25, 1 ], [ 25, 1 ], [ 26, 1 ], [ 26, 1 ], [ 14, 1 ] ],\n        performAction: function(yytext, yyleng, yylineno, yy, yystate, $$, _$) {\n            /* this == yyval */\n            var $0 = $$.length - 1;\n            switch (yystate) {\n              case 1:\n                return yy.parser.yy;\n\n              case 4:\n                break;\n\n              case 6:\n                $$[$0];\n                break;\n\n              case 7:\n              case 8:\n                yy.parser.yy.addSignal($$[$0]);\n                break;\n\n              case 9:\n                yy.parser.yy.setTitle($$[$0]);\n                break;\n\n              case 10:\n                this.$ = new Diagram.Note($$[$0 - 1], $$[$0 - 2], $$[$0]);\n                break;\n\n              case 11:\n                this.$ = new Diagram.Note($$[$0 - 1], Diagram.PLACEMENT.OVER, $$[$0]);\n                break;\n\n              case 12:\n              case 20:\n                this.$ = $$[$0];\n                break;\n\n              case 13:\n                this.$ = [ $$[$0 - 2], $$[$0] ];\n                break;\n\n              case 14:\n                this.$ = Diagram.PLACEMENT.LEFTOF;\n                break;\n\n              case 15:\n                this.$ = Diagram.PLACEMENT.RIGHTOF;\n                break;\n\n              case 16:\n                this.$ = new Diagram.Signal($$[$0 - 3], $$[$0 - 2], $$[$0 - 1], $$[$0]);\n                break;\n\n              case 17:\n                this.$ = yy.parser.yy.getActor(Diagram.unescape($$[$0]));\n                break;\n\n              case 18:\n                this.$ = yy.parser.yy.getActorWithAlias(Diagram.unescape($$[$0]));\n                break;\n\n              case 19:\n                this.$ = $$[$0 - 1] | $$[$0] << 2;\n                break;\n\n              case 21:\n                this.$ = Diagram.LINETYPE.SOLID;\n                break;\n\n              case 22:\n                this.$ = Diagram.LINETYPE.DOTTED;\n                break;\n\n              case 23:\n                this.$ = Diagram.ARROWTYPE.FILLED;\n                break;\n\n              case 24:\n                this.$ = Diagram.ARROWTYPE.OPEN;\n                break;\n\n              case 25:\n                this.$ = Diagram.unescape($$[$0].substring(1));\n            }\n        },\n        table: [ o($V0, [ 2, 2 ], {\n            3: 1,\n            4: 2\n        }), {\n            1: [ 3 ]\n        }, {\n            5: [ 1, 3 ],\n            6: 4,\n            7: 5,\n            8: [ 1, 6 ],\n            9: [ 1, 7 ],\n            11: 8,\n            12: 9,\n            13: [ 1, 10 ],\n            15: [ 1, 12 ],\n            17: 11,\n            24: $V1\n        }, {\n            1: [ 2, 1 ]\n        }, o($V0, [ 2, 3 ]), o($V0, [ 2, 4 ]), o($V0, [ 2, 5 ]), {\n            10: 14,\n            24: [ 1, 15 ]\n        }, o($V0, [ 2, 7 ]), o($V0, [ 2, 8 ]), {\n            14: 16,\n            31: $V2\n        }, {\n            23: 18,\n            25: 19,\n            27: [ 1, 20 ],\n            28: [ 1, 21 ]\n        }, {\n            16: 22,\n            18: [ 1, 23 ],\n            21: [ 1, 24 ],\n            22: [ 1, 25 ]\n        }, o([ 20, 27, 28, 31 ], [ 2, 17 ]), o($V0, [ 2, 6 ]), o($V0, [ 2, 18 ]), o($V0, [ 2, 9 ]), o($V0, [ 2, 25 ]), {\n            17: 26,\n            24: $V1\n        }, {\n            24: [ 2, 20 ],\n            26: 27,\n            29: [ 1, 28 ],\n            30: [ 1, 29 ]\n        }, o($V3, [ 2, 21 ]), o($V3, [ 2, 22 ]), {\n            17: 30,\n            24: $V1\n        }, {\n            17: 32,\n            19: 31,\n            24: $V1\n        }, {\n            24: [ 2, 14 ]\n        }, {\n            24: [ 2, 15 ]\n        }, {\n            14: 33,\n            31: $V2\n        }, {\n            24: [ 2, 19 ]\n        }, {\n            24: [ 2, 23 ]\n        }, {\n            24: [ 2, 24 ]\n        }, {\n            14: 34,\n            31: $V2\n        }, {\n            14: 35,\n            31: $V2\n        }, {\n            20: [ 1, 36 ],\n            31: [ 2, 12 ]\n        }, o($V0, [ 2, 16 ]), o($V0, [ 2, 10 ]), o($V0, [ 2, 11 ]), {\n            17: 37,\n            24: $V1\n        }, {\n            31: [ 2, 13 ]\n        } ],\n        defaultActions: {\n            3: [ 2, 1 ],\n            24: [ 2, 14 ],\n            25: [ 2, 15 ],\n            27: [ 2, 19 ],\n            28: [ 2, 23 ],\n            29: [ 2, 24 ],\n            37: [ 2, 13 ]\n        },\n        parseError: function(str, hash) {\n            if (!hash.recoverable) throw new Error(str);\n            this.trace(str);\n        },\n        parse: function(input) {\n            function lex() {\n                var token;\n                return token = lexer.lex() || EOF, \"number\" != typeof token && (token = self.symbols_[token] || token), \n                token;\n            }\n            var self = this, stack = [ 0 ], vstack = [ null ], lstack = [], table = this.table, yytext = \"\", yylineno = 0, yyleng = 0, recovering = 0, TERROR = 2, EOF = 1, args = lstack.slice.call(arguments, 1), lexer = Object.create(this.lexer), sharedState = {\n                yy: {}\n            };\n            for (var k in this.yy) Object.prototype.hasOwnProperty.call(this.yy, k) && (sharedState.yy[k] = this.yy[k]);\n            lexer.setInput(input, sharedState.yy), sharedState.yy.lexer = lexer, sharedState.yy.parser = this, \n            \"undefined\" == typeof lexer.yylloc && (lexer.yylloc = {});\n            var yyloc = lexer.yylloc;\n            lstack.push(yyloc);\n            var ranges = lexer.options && lexer.options.ranges;\n            \"function\" == typeof sharedState.yy.parseError ? this.parseError = sharedState.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;\n            for (var symbol, preErrorSymbol, state, action, r, p, len, newState, expected, yyval = {}; ;) {\n                if (state = stack[stack.length - 1], this.defaultActions[state] ? action = this.defaultActions[state] : (null !== symbol && \"undefined\" != typeof symbol || (symbol = lex()), \n                action = table[state] && table[state][symbol]), \"undefined\" == typeof action || !action.length || !action[0]) {\n                    var errStr = \"\";\n                    expected = [];\n                    for (p in table[state]) this.terminals_[p] && p > TERROR && expected.push(\"'\" + this.terminals_[p] + \"'\");\n                    errStr = lexer.showPosition ? \"Parse error on line \" + (yylineno + 1) + \":\\n\" + lexer.showPosition() + \"\\nExpecting \" + expected.join(\", \") + \", got '\" + (this.terminals_[symbol] || symbol) + \"'\" : \"Parse error on line \" + (yylineno + 1) + \": Unexpected \" + (symbol == EOF ? \"end of input\" : \"'\" + (this.terminals_[symbol] || symbol) + \"'\"), \n                    this.parseError(errStr, {\n                        text: lexer.match,\n                        token: this.terminals_[symbol] || symbol,\n                        line: lexer.yylineno,\n                        loc: yyloc,\n                        expected: expected\n                    });\n                }\n                if (action[0] instanceof Array && action.length > 1) throw new Error(\"Parse Error: multiple actions possible at state: \" + state + \", token: \" + symbol);\n                switch (action[0]) {\n                  case 1:\n                    stack.push(symbol), vstack.push(lexer.yytext), lstack.push(lexer.yylloc), stack.push(action[1]), \n                    symbol = null, preErrorSymbol ? (symbol = preErrorSymbol, preErrorSymbol = null) : (yyleng = lexer.yyleng, \n                    yytext = lexer.yytext, yylineno = lexer.yylineno, yyloc = lexer.yylloc, recovering > 0 && recovering--);\n                    break;\n\n                  case 2:\n                    if (len = this.productions_[action[1]][1], yyval.$ = vstack[vstack.length - len], \n                    yyval._$ = {\n                        first_line: lstack[lstack.length - (len || 1)].first_line,\n                        last_line: lstack[lstack.length - 1].last_line,\n                        first_column: lstack[lstack.length - (len || 1)].first_column,\n                        last_column: lstack[lstack.length - 1].last_column\n                    }, ranges && (yyval._$.range = [ lstack[lstack.length - (len || 1)].range[0], lstack[lstack.length - 1].range[1] ]), \n                    r = this.performAction.apply(yyval, [ yytext, yyleng, yylineno, sharedState.yy, action[1], vstack, lstack ].concat(args)), \n                    \"undefined\" != typeof r) return r;\n                    len && (stack = stack.slice(0, -1 * len * 2), vstack = vstack.slice(0, -1 * len), \n                    lstack = lstack.slice(0, -1 * len)), stack.push(this.productions_[action[1]][0]), \n                    vstack.push(yyval.$), lstack.push(yyval._$), newState = table[stack[stack.length - 2]][stack[stack.length - 1]], \n                    stack.push(newState);\n                    break;\n\n                  case 3:\n                    return !0;\n                }\n            }\n            return !0;\n        }\n    }, lexer = function() {\n        var lexer = {\n            EOF: 1,\n            parseError: function(str, hash) {\n                if (!this.yy.parser) throw new Error(str);\n                this.yy.parser.parseError(str, hash);\n            },\n            // resets the lexer, sets new input\n            setInput: function(input, yy) {\n                return this.yy = yy || this.yy || {}, this._input = input, this._more = this._backtrack = this.done = !1, \n                this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = \"\", this.conditionStack = [ \"INITIAL\" ], \n                this.yylloc = {\n                    first_line: 1,\n                    first_column: 0,\n                    last_line: 1,\n                    last_column: 0\n                }, this.options.ranges && (this.yylloc.range = [ 0, 0 ]), this.offset = 0, this;\n            },\n            // consumes and returns one char from the input\n            input: function() {\n                var ch = this._input[0];\n                this.yytext += ch, this.yyleng++, this.offset++, this.match += ch, this.matched += ch;\n                var lines = ch.match(/(?:\\r\\n?|\\n).*/g);\n                return lines ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, \n                this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), \n                ch;\n            },\n            // unshifts one char (or a string) into the input\n            unput: function(ch) {\n                var len = ch.length, lines = ch.split(/(?:\\r\\n?|\\n)/g);\n                this._input = ch + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - len), \n                //this.yyleng -= len;\n                this.offset -= len;\n                var oldLines = this.match.split(/(?:\\r\\n?|\\n)/g);\n                this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), \n                lines.length - 1 && (this.yylineno -= lines.length - 1);\n                var r = this.yylloc.range;\n                return this.yylloc = {\n                    first_line: this.yylloc.first_line,\n                    last_line: this.yylineno + 1,\n                    first_column: this.yylloc.first_column,\n                    last_column: lines ? (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length : this.yylloc.first_column - len\n                }, this.options.ranges && (this.yylloc.range = [ r[0], r[0] + this.yyleng - len ]), \n                this.yyleng = this.yytext.length, this;\n            },\n            // When called from action, caches matched text and appends it on next action\n            more: function() {\n                return this._more = !0, this;\n            },\n            // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead.\n            reject: function() {\n                return this.options.backtrack_lexer ? (this._backtrack = !0, this) : this.parseError(\"Lexical error on line \" + (this.yylineno + 1) + \". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\\n\" + this.showPosition(), {\n                    text: \"\",\n                    token: null,\n                    line: this.yylineno\n                });\n            },\n            // retain first n characters of the match\n            less: function(n) {\n                this.unput(this.match.slice(n));\n            },\n            // displays already matched input, i.e. for error messages\n            pastInput: function() {\n                var past = this.matched.substr(0, this.matched.length - this.match.length);\n                return (past.length > 20 ? \"...\" : \"\") + past.substr(-20).replace(/\\n/g, \"\");\n            },\n            // displays upcoming input, i.e. for error messages\n            upcomingInput: function() {\n                var next = this.match;\n                return next.length < 20 && (next += this._input.substr(0, 20 - next.length)), (next.substr(0, 20) + (next.length > 20 ? \"...\" : \"\")).replace(/\\n/g, \"\");\n            },\n            // displays the character position where the lexing error occurred, i.e. for error messages\n            showPosition: function() {\n                var pre = this.pastInput(), c = new Array(pre.length + 1).join(\"-\");\n                return pre + this.upcomingInput() + \"\\n\" + c + \"^\";\n            },\n            // test the lexed token: return FALSE when not a match, otherwise return token\n            test_match: function(match, indexed_rule) {\n                var token, lines, backup;\n                if (this.options.backtrack_lexer && (// save context\n                backup = {\n                    yylineno: this.yylineno,\n                    yylloc: {\n                        first_line: this.yylloc.first_line,\n                        last_line: this.last_line,\n                        first_column: this.yylloc.first_column,\n                        last_column: this.yylloc.last_column\n                    },\n                    yytext: this.yytext,\n                    match: this.match,\n                    matches: this.matches,\n                    matched: this.matched,\n                    yyleng: this.yyleng,\n                    offset: this.offset,\n                    _more: this._more,\n                    _input: this._input,\n                    yy: this.yy,\n                    conditionStack: this.conditionStack.slice(0),\n                    done: this.done\n                }, this.options.ranges && (backup.yylloc.range = this.yylloc.range.slice(0))), lines = match[0].match(/(?:\\r\\n?|\\n).*/g), \n                lines && (this.yylineno += lines.length), this.yylloc = {\n                    first_line: this.yylloc.last_line,\n                    last_line: this.yylineno + 1,\n                    first_column: this.yylloc.last_column,\n                    last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\\r?\\n?/)[0].length : this.yylloc.last_column + match[0].length\n                }, this.yytext += match[0], this.match += match[0], this.matches = match, this.yyleng = this.yytext.length, \n                this.options.ranges && (this.yylloc.range = [ this.offset, this.offset += this.yyleng ]), \n                this._more = !1, this._backtrack = !1, this._input = this._input.slice(match[0].length), \n                this.matched += match[0], token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]), \n                this.done && this._input && (this.done = !1), token) return token;\n                if (this._backtrack) {\n                    // recover context\n                    for (var k in backup) this[k] = backup[k];\n                    return !1;\n                }\n                return !1;\n            },\n            // return next match in input\n            next: function() {\n                if (this.done) return this.EOF;\n                this._input || (this.done = !0);\n                var token, match, tempMatch, index;\n                this._more || (this.yytext = \"\", this.match = \"\");\n                for (var rules = this._currentRules(), i = 0; i < rules.length; i++) if (tempMatch = this._input.match(this.rules[rules[i]]), \n                tempMatch && (!match || tempMatch[0].length > match[0].length)) {\n                    if (match = tempMatch, index = i, this.options.backtrack_lexer) {\n                        if (token = this.test_match(tempMatch, rules[i]), token !== !1) return token;\n                        if (this._backtrack) {\n                            match = !1;\n                            continue;\n                        }\n                        // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)\n                        return !1;\n                    }\n                    if (!this.options.flex) break;\n                }\n                return match ? (token = this.test_match(match, rules[index]), token !== !1 && token) : \"\" === this._input ? this.EOF : this.parseError(\"Lexical error on line \" + (this.yylineno + 1) + \". Unrecognized text.\\n\" + this.showPosition(), {\n                    text: \"\",\n                    token: null,\n                    line: this.yylineno\n                });\n            },\n            // return next match that has a token\n            lex: function() {\n                var r = this.next();\n                return r ? r : this.lex();\n            },\n            // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)\n            begin: function(condition) {\n                this.conditionStack.push(condition);\n            },\n            // pop the previously active lexer condition state off the condition stack\n            popState: function() {\n                var n = this.conditionStack.length - 1;\n                return n > 0 ? this.conditionStack.pop() : this.conditionStack[0];\n            },\n            // produce the lexer rule set which is active for the currently active lexer condition state\n            _currentRules: function() {\n                return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;\n            },\n            // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available\n            topState: function(n) {\n                return n = this.conditionStack.length - 1 - Math.abs(n || 0), n >= 0 ? this.conditionStack[n] : \"INITIAL\";\n            },\n            // alias for begin(condition)\n            pushState: function(condition) {\n                this.begin(condition);\n            },\n            // return the number of states currently on the stack\n            stateStackSize: function() {\n                return this.conditionStack.length;\n            },\n            options: {\n                \"case-insensitive\": !0\n            },\n            performAction: function(yy, yy_, $avoiding_name_collisions, YY_START) {\n                switch ($avoiding_name_collisions) {\n                  case 0:\n                    return 8;\n\n                  case 1:\n                    /* skip whitespace */\n                    break;\n\n                  case 2:\n                    /* skip comments */\n                    break;\n\n                  case 3:\n                    return 9;\n\n                  case 4:\n                    return 21;\n\n                  case 5:\n                    return 22;\n\n                  case 6:\n                    return 18;\n\n                  case 7:\n                    return 15;\n\n                  case 8:\n                    return 13;\n\n                  case 9:\n                    return 20;\n\n                  case 10:\n                    return 24;\n\n                  case 11:\n                    return 24;\n\n                  case 12:\n                    return 28;\n\n                  case 13:\n                    return 27;\n\n                  case 14:\n                    return 30;\n\n                  case 15:\n                    return 29;\n\n                  case 16:\n                    return 31;\n\n                  case 17:\n                    return 5;\n\n                  case 18:\n                    return \"INVALID\";\n                }\n            },\n            rules: [ /^(?:[\\r\\n]+)/i, /^(?:\\s+)/i, /^(?:#[^\\r\\n]*)/i, /^(?:participant\\b)/i, /^(?:left of\\b)/i, /^(?:right of\\b)/i, /^(?:over\\b)/i, /^(?:note\\b)/i, /^(?:title\\b)/i, /^(?:,)/i, /^(?:[^\\->:,\\r\\n\"]+)/i, /^(?:\"[^\"]+\")/i, /^(?:--)/i, /^(?:-)/i, /^(?:>>)/i, /^(?:>)/i, /^(?:[^\\r\\n]+)/i, /^(?:$)/i, /^(?:.)/i ],\n            conditions: {\n                INITIAL: {\n                    rules: [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18 ],\n                    inclusive: !0\n                }\n            }\n        };\n        return lexer;\n    }();\n    return parser.lexer = lexer, Parser.prototype = parser, parser.Parser = Parser, \n    new Parser();\n}();\n\n\"undefined\" != typeof require && \"undefined\" != typeof exports && (exports.parser = parser, \nexports.Parser = parser.Parser, exports.parse = function() {\n    return parser.parse.apply(parser, arguments);\n}, exports.main = function(args) {\n    args[1] || (console.log(\"Usage: \" + args[0] + \" FILE\"), process.exit(1));\n    var source = require(\"fs\").readFileSync(require(\"path\").normalize(args[1]), \"utf8\");\n    return exports.parser.parse(source);\n}, \"undefined\" != typeof module && require.main === module && exports.main(process.argv.slice(1)));\n/**\n * jison doesn't have a good exception, so we make one.\n * This is brittle as it depends on jison internals\n */\nfunction ParseError(message, hash) {\n  _.extend(this, hash);\n\n  this.name = 'ParseError';\n  this.message = (message || '');\n}\nParseError.prototype = new Error();\nDiagram.ParseError = ParseError;\n\nDiagram.parse = function(input) {\n  // TODO jison v0.4.17 changed their API slightly, so parser is no longer defined:\n\n  // Create the object to track state and deal with errors\n  parser.yy = new Diagram();\n  parser.yy.parseError = function(message, hash) {\n    throw new ParseError(message, hash);\n  };\n\n  // Parse\n  var diagram = parser.parse(input);\n\n  // Then clean up the parseError key that a user won't care about\n  delete diagram.parseError;\n  return diagram;\n};\n\n\n/** js sequence diagrams\n *  https://bramp.github.io/js-sequence-diagrams/\n *  (c) 2012-2017 Andrew Brampton (bramp.net)\n *  Simplified BSD license.\n */\n/*global Diagram, _ */\n\n// Following the CSS convention\n// Margin is the gap outside the box\n// Padding is the gap inside the box\n// Each object has x/y/width/height properties\n// The x/y should be top left corner\n// width/height is with both margin and padding\n\n// TODO\n// Image width is wrong, when there is a note in the right hand col\n// Title box could look better\n// Note box could look better\n\nvar DIAGRAM_MARGIN = 10;\n\nvar ACTOR_MARGIN   = 10; // Margin around a actor\nvar ACTOR_PADDING  = 10; // Padding inside a actor\n\nvar SIGNAL_MARGIN  = 5; // Margin around a signal\nvar SIGNAL_PADDING = 5; // Padding inside a signal\n\nvar NOTE_MARGIN   = 10; // Margin around a note\nvar NOTE_PADDING  = 5; // Padding inside a note\nvar NOTE_OVERLAP  = 15; // Overlap when using a \"note over A,B\"\n\nvar TITLE_MARGIN   = 0;\nvar TITLE_PADDING  = 5;\n\nvar SELF_SIGNAL_WIDTH = 20; // How far out a self signal goes\n\nvar PLACEMENT = Diagram.PLACEMENT;\nvar LINETYPE  = Diagram.LINETYPE;\nvar ARROWTYPE = Diagram.ARROWTYPE;\n\nvar ALIGN_LEFT   = 0;\nvar ALIGN_CENTER = 1;\n\nfunction AssertException(message) { this.message = message; }\nAssertException.prototype.toString = function() {\n  return 'AssertException: ' + this.message;\n};\n\nfunction assert(exp, message) {\n  if (!exp) {\n    throw new AssertException(message);\n  }\n}\n\nif (!String.prototype.trim) {\n  String.prototype.trim = function() {\n    return this.replace(/^\\s+|\\s+$/g, '');\n  };\n}\n\nDiagram.themes = {};\nfunction registerTheme(name, theme) {\n  Diagram.themes[name] = theme;\n}\n\n/******************\n * Drawing extras\n ******************/\n\nfunction getCenterX(box) {\n  return box.x + box.width / 2;\n}\n\nfunction getCenterY(box) {\n  return box.y + box.height / 2;\n}\n\n/******************\n * SVG Path extras\n ******************/\n\nfunction clamp(x, min, max) {\n  if (x < min) {\n    return min;\n  }\n  if (x > max) {\n    return max;\n  }\n  return x;\n}\n\nfunction wobble(x1, y1, x2, y2) {\n  assert(_.all([x1,x2,y1,y2], _.isFinite), 'x1,x2,y1,y2 must be numeric');\n\n  // Wobble no more than 1/25 of the line length\n  var factor = Math.sqrt((x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1)) / 25;\n\n  // Distance along line where the control points are\n  // Clamp between 20% and 80% so any arrow heads aren't angled too much\n  var r1 = clamp(Math.random(), 0.2, 0.8);\n  var r2 = clamp(Math.random(), 0.2, 0.8);\n\n  var xfactor = Math.random() > 0.5 ? factor : -factor;\n  var yfactor = Math.random() > 0.5 ? factor : -factor;\n\n  var p1 = {\n    x: (x2 - x1) * r1 + x1 + xfactor,\n    y: (y2 - y1) * r1 + y1 + yfactor\n  };\n\n  var p2 = {\n    x: (x2 - x1) * r2 + x1 - xfactor,\n    y: (y2 - y1) * r2 + y1 - yfactor\n  };\n\n  return 'C' + p1.x.toFixed(1) + ',' + p1.y.toFixed(1) + // start control point\n         ' ' + p2.x.toFixed(1) + ',' + p2.y.toFixed(1) + // end control point\n         ' ' + x2.toFixed(1) + ',' + y2.toFixed(1);      // end point\n}\n\n/**\n * Draws a wobbly (hand drawn) rect\n */\nfunction handRect(x, y, w, h) {\n  assert(_.all([x, y, w, h], _.isFinite), 'x, y, w, h must be numeric');\n  return 'M' + x + ',' + y +\n   wobble(x, y, x + w, y) +\n   wobble(x + w, y, x + w, y + h) +\n   wobble(x + w, y + h, x, y + h) +\n   wobble(x, y + h, x, y);\n}\n\n/**\n * Draws a wobbly (hand drawn) line\n */\nfunction handLine(x1, y1, x2, y2) {\n  assert(_.all([x1,x2,y1,y2], _.isFinite), 'x1,x2,y1,y2 must be numeric');\n  return 'M' + x1.toFixed(1) + ',' + y1.toFixed(1) + wobble(x1, y1, x2, y2);\n}\n\n/******************\n * BaseTheme\n ******************/\n\nvar BaseTheme = function(diagram, options) {\n  this.init(diagram, options);\n};\n\n_.extend(BaseTheme.prototype, {\n\n  // Init called while creating the Theme\n  init: function(diagram, options) {\n    this.diagram = diagram;\n\n    this.actorsHeight_  = 0;\n    this.signalsHeight_ = 0;\n    this.title_ = undefined; // hack - This should be somewhere better\n  },\n\n  setupPaper: function(container) {},\n\n  draw: function(container) {\n    this.setupPaper(container);\n\n    this.layout();\n\n    var titleHeight = this.title_ ? this.title_.height : 0;\n    var y = DIAGRAM_MARGIN + titleHeight;\n\n    this.drawTitle();\n    this.drawActors(y);\n    this.drawSignals(y + this.actorsHeight_);\n  },\n\n  layout: function() {\n    // Local copies\n    var diagram = this.diagram;\n    var font    = this.font_;\n    var actors  = diagram.actors;\n    var signals = diagram.signals;\n\n    diagram.width  = 0; // min width\n    diagram.height = 0; // min height\n\n    // Setup some layout stuff\n    if (diagram.title) {\n      var title = this.title_ = {};\n      var bb = this.textBBox(diagram.title, font);\n      title.textBB = bb;\n      title.message = diagram.title;\n\n      title.width  = bb.width  + (TITLE_PADDING + TITLE_MARGIN) * 2;\n      title.height = bb.height + (TITLE_PADDING + TITLE_MARGIN) * 2;\n      title.x = DIAGRAM_MARGIN;\n      title.y = DIAGRAM_MARGIN;\n\n      diagram.width  += title.width;\n      diagram.height += title.height;\n    }\n\n    _.each(actors, function(a) {\n      var bb = this.textBBox(a.name, font);\n      a.textBB = bb;\n\n      a.x = 0; a.y = 0;\n      a.width  = bb.width  + (ACTOR_PADDING + ACTOR_MARGIN) * 2;\n      a.height = bb.height + (ACTOR_PADDING + ACTOR_MARGIN) * 2;\n\n      a.distances = [];\n      a.paddingRight = 0;\n      this.actorsHeight_ = Math.max(a.height, this.actorsHeight_);\n    }, this);\n\n    function actorEnsureDistance(a, b, d) {\n      assert(a < b, 'a must be less than or equal to b');\n\n      if (a < 0) {\n        // Ensure b has left margin\n        b = actors[b];\n        b.x = Math.max(d - b.width / 2, b.x);\n      } else if (b >= actors.length) {\n        // Ensure a has right margin\n        a = actors[a];\n        a.paddingRight = Math.max(d, a.paddingRight);\n      } else {\n        a = actors[a];\n        a.distances[b] = Math.max(d, a.distances[b] ? a.distances[b] : 0);\n      }\n    }\n\n    _.each(signals, function(s) {\n      // Indexes of the left and right actors involved\n      var a;\n      var b;\n\n      var bb = this.textBBox(s.message, font);\n\n      //var bb = t.attr(\"text\", s.message).getBBox();\n      s.textBB = bb;\n      s.width   = bb.width;\n      s.height  = bb.height;\n\n      var extraWidth = 0;\n\n      if (s.type == 'Signal') {\n\n        s.width  += (SIGNAL_MARGIN + SIGNAL_PADDING) * 2;\n        s.height += (SIGNAL_MARGIN + SIGNAL_PADDING) * 2;\n\n        if (s.isSelf()) {\n          // TODO Self signals need a min height\n          a = s.actorA.index;\n          b = a + 1;\n          s.width += SELF_SIGNAL_WIDTH;\n        } else {\n          a = Math.min(s.actorA.index, s.actorB.index);\n          b = Math.max(s.actorA.index, s.actorB.index);\n        }\n\n      } else if (s.type == 'Note') {\n        s.width  += (NOTE_MARGIN + NOTE_PADDING) * 2;\n        s.height += (NOTE_MARGIN + NOTE_PADDING) * 2;\n\n        // HACK lets include the actor's padding\n        extraWidth = 2 * ACTOR_MARGIN;\n\n        if (s.placement == PLACEMENT.LEFTOF) {\n          b = s.actor.index;\n          a = b - 1;\n        } else if (s.placement == PLACEMENT.RIGHTOF) {\n          a = s.actor.index;\n          b = a + 1;\n        } else if (s.placement == PLACEMENT.OVER && s.hasManyActors()) {\n          // Over multiple actors\n          a = Math.min(s.actor[0].index, s.actor[1].index);\n          b = Math.max(s.actor[0].index, s.actor[1].index);\n\n          // We don't need our padding, and we want to overlap\n          extraWidth = -(NOTE_PADDING * 2 + NOTE_OVERLAP * 2);\n\n        } else if (s.placement == PLACEMENT.OVER) {\n          // Over single actor\n          a = s.actor.index;\n          actorEnsureDistance(a - 1, a, s.width / 2);\n          actorEnsureDistance(a, a + 1, s.width / 2);\n          this.signalsHeight_ += s.height;\n\n          return; // Bail out early\n        }\n      } else {\n        throw new Error('Unhandled signal type:' + s.type);\n      }\n\n      actorEnsureDistance(a, b, s.width + extraWidth);\n      this.signalsHeight_ += s.height;\n    }, this);\n\n    // Re-jig the positions\n    var actorsX = 0;\n    _.each(actors, function(a) {\n      a.x = Math.max(actorsX, a.x);\n\n      // TODO This only works if we loop in sequence, 0, 1, 2, etc\n      _.each(a.distances, function(distance, b) {\n        // lodash (and possibly others) do not like sparse arrays\n        // so sometimes they return undefined\n        if (typeof distance == 'undefined') {\n          return;\n        }\n\n        b = actors[b];\n        distance = Math.max(distance, a.width / 2, b.width / 2);\n        b.x = Math.max(b.x, a.x + a.width / 2 + distance - b.width / 2);\n      });\n\n      actorsX = a.x + a.width + a.paddingRight;\n    }, this);\n\n    diagram.width = Math.max(actorsX, diagram.width);\n\n    // TODO Refactor a little\n    diagram.width  += 2 * DIAGRAM_MARGIN;\n    diagram.height += 2 * DIAGRAM_MARGIN + 2 * this.actorsHeight_ + this.signalsHeight_;\n\n    return this;\n  },\n\n  // TODO Instead of one textBBox function, create a function for each element type, e.g\n  //      layout_title, layout_actor, etc that returns it's bounding box\n  textBBox: function(text, font) {},\n\n  drawTitle: function() {\n    var title = this.title_;\n    if (title) {\n      this.drawTextBox(title, title.message, TITLE_MARGIN, TITLE_PADDING, this.font_, ALIGN_LEFT);\n    }\n  },\n\n  drawActors: function(offsetY) {\n    var y = offsetY;\n    _.each(this.diagram.actors, function(a) {\n      // Top box\n      this.drawActor(a, y, this.actorsHeight_);\n\n      // Bottom box\n      this.drawActor(a, y + this.actorsHeight_ + this.signalsHeight_, this.actorsHeight_);\n\n      // Veritical line\n      var aX = getCenterX(a);\n      this.drawLine(\n       aX, y + this.actorsHeight_ - ACTOR_MARGIN,\n       aX, y + this.actorsHeight_ + ACTOR_MARGIN + this.signalsHeight_);\n    }, this);\n  },\n\n  drawActor: function(actor, offsetY, height) {\n    actor.y      = offsetY;\n    actor.height = height;\n    this.drawTextBox(actor, actor.name, ACTOR_MARGIN, ACTOR_PADDING, this.font_, ALIGN_CENTER);\n  },\n\n  drawSignals: function(offsetY) {\n    var y = offsetY;\n    _.each(this.diagram.signals, function(s) {\n      // TODO Add debug mode, that draws padding/margin box\n      if (s.type == 'Signal') {\n        if (s.isSelf()) {\n          this.drawSelfSignal(s, y);\n        } else {\n          this.drawSignal(s, y);\n        }\n\n      } else if (s.type == 'Note') {\n        this.drawNote(s, y);\n      }\n\n      y += s.height;\n    }, this);\n  },\n\n  drawSelfSignal: function(signal, offsetY) {\n      assert(signal.isSelf(), 'signal must be a self signal');\n\n      var textBB = signal.textBB;\n      var aX = getCenterX(signal.actorA);\n\n      var x = aX + SELF_SIGNAL_WIDTH + SIGNAL_PADDING;\n      var y = offsetY + SIGNAL_PADDING + signal.height / 2 + textBB.y;\n\n      this.drawText(x, y, signal.message, this.font_, ALIGN_LEFT);\n\n      var y1 = offsetY + SIGNAL_MARGIN + SIGNAL_PADDING;\n      var y2 = y1 + signal.height - 2 * SIGNAL_MARGIN - SIGNAL_PADDING;\n\n      // Draw three lines, the last one with a arrow\n      this.drawLine(aX, y1, aX + SELF_SIGNAL_WIDTH, y1, signal.linetype);\n      this.drawLine(aX + SELF_SIGNAL_WIDTH, y1, aX + SELF_SIGNAL_WIDTH, y2, signal.linetype);\n      this.drawLine(aX + SELF_SIGNAL_WIDTH, y2, aX, y2, signal.linetype, signal.arrowtype);\n    },\n\n  drawSignal: function(signal, offsetY) {\n    var aX = getCenterX(signal.actorA);\n    var bX = getCenterX(signal.actorB);\n\n    // Mid point between actors\n    var x = (bX - aX) / 2 + aX;\n    var y = offsetY + SIGNAL_MARGIN + 2 * SIGNAL_PADDING;\n\n    // Draw the text in the middle of the signal\n    this.drawText(x, y, signal.message, this.font_, ALIGN_CENTER);\n\n    // Draw the line along the bottom of the signal\n    y = offsetY + signal.height - SIGNAL_MARGIN - SIGNAL_PADDING;\n    this.drawLine(aX, y, bX, y, signal.linetype, signal.arrowtype);\n  },\n\n  drawNote: function(note, offsetY) {\n    note.y = offsetY;\n    var actorA = note.hasManyActors() ? note.actor[0] : note.actor;\n    var aX = getCenterX(actorA);\n    switch (note.placement) {\n    case PLACEMENT.RIGHTOF:\n      note.x = aX + ACTOR_MARGIN;\n    break;\n    case PLACEMENT.LEFTOF:\n      note.x = aX - ACTOR_MARGIN - note.width;\n    break;\n    case PLACEMENT.OVER:\n      if (note.hasManyActors()) {\n        var bX = getCenterX(note.actor[1]);\n        var overlap = NOTE_OVERLAP + NOTE_PADDING;\n        note.x = Math.min(aX, bX) - overlap;\n        note.width = (Math.max(aX, bX) + overlap) - note.x;\n      } else {\n        note.x = aX - note.width / 2;\n      }\n    break;\n    default:\n      throw new Error('Unhandled note placement: ' + note.placement);\n  }\n    return this.drawTextBox(note, note.message, NOTE_MARGIN, NOTE_PADDING, this.font_, ALIGN_LEFT);\n  },\n\n  /**\n   * Draw text surrounded by a box\n   */\n  drawTextBox: function(box, text, margin, padding, font, align) {\n    var x = box.x + margin;\n    var y = box.y + margin;\n    var w = box.width  - 2 * margin;\n    var h = box.height - 2 * margin;\n\n    // Draw inner box\n    this.drawRect(x, y, w, h);\n\n    // Draw text (in the center)\n    if (align == ALIGN_CENTER) {\n      x = getCenterX(box);\n      y = getCenterY(box);\n    } else {\n      x += padding;\n      y += padding;\n    }\n\n    return this.drawText(x, y, text, font, align);\n  }\n});\n\n\n/** js sequence diagrams\n *  https://bramp.github.io/js-sequence-diagrams/\n *  (c) 2012-2017 Andrew Brampton (bramp.net)\n *  Simplified BSD license.\n */\n/*global Diagram, Raphael, _ */\n\nif (typeof Raphael != 'undefined') {\n\n  var LINE = {\n    'stroke': '#000000',\n    'stroke-width': 2,\n    'fill': 'none'\n  };\n\n  var RECT = {\n        'stroke': '#000000',\n        'stroke-width': 2,\n        'fill': '#fff'\n      };\n\n  /******************\n   * Raphaël extras\n   ******************/\n  Raphael.fn.line = function(x1, y1, x2, y2) {\n    assert(_.all([x1,x2,y1,y2], _.isFinite), 'x1,x2,y1,y2 must be numeric');\n    return this.path('M{0},{1} L{2},{3}', x1, y1, x2, y2);\n  };\n\n  /******************\n   * RaphaelTheme\n   ******************/\n\n  var RaphaelTheme = function(diagram, options, resume) {\n        this.init(diagram, _.defaults(options, {\n            'font-size': 16,\n            'font-family': 'Andale Mono, monospace'\n          }), resume);\n      };\n\n  _.extend(RaphaelTheme.prototype, BaseTheme.prototype, {\n\n    init: function(diagram, options, resume) {\n      BaseTheme.prototype.init.call(this, diagram);\n\n      this.paper_  = undefined;\n      this.font_   = {\n                  'font-size': options['font-size'],\n                  'font-family': options['font-family']\n                };\n\n      var a = this.arrowTypes_ = {};\n      a[ARROWTYPE.FILLED] = 'block';\n      a[ARROWTYPE.OPEN]   = 'open';\n\n      var l = this.lineTypes_ = {};\n      l[LINETYPE.SOLID]  = '';\n      l[LINETYPE.DOTTED] = '-';\n\n      resume(this);\n    },\n\n    setupPaper: function(container) {\n      this.paper_ = new Raphael(container, 320, 200);\n      this.paper_.setStart();\n    },\n\n    draw: function(container) {\n      BaseTheme.prototype.draw.call(this, container);\n      this.paper_.setFinish();\n    },\n\n    layout: function() {\n      BaseTheme.prototype.layout.call(this);\n      this.paper_.setSize(\n       this.diagram.width,\n       this.diagram.height\n      );\n    },\n\n    /**\n     * Strip whitespace from each newline\n     */\n    cleanText: function(text) {\n      text = _.invoke(text.split('\\n'), 'trim');\n      return text.join('\\n');\n    },\n\n    /**\n     * Returns the text's bounding box\n     */\n    textBBox: function(text, font) {\n      text = this.cleanText(text);\n      font = font || {};\n      var p;\n      if (font.obj_) {\n        p = this.paper_.print(0, 0, text, font.obj_, font['font-size']);\n      } else {\n        p = this.paper_.text(0, 0, text);\n        p.attr(font);\n      }\n\n      var bb = p.getBBox();\n      p.remove();\n\n      return bb;\n    },\n\n    drawLine: function(x1, y1, x2, y2, linetype, arrowhead) {\n      var line = this.paper_.line(x1, y1, x2, y2).attr(LINE);\n      if (arrowhead !== undefined) {\n        line.attr('arrow-end', this.arrowTypes_[arrowhead] + '-wide-long');\n      }\n      if (arrowhead !== undefined) {\n        line.attr('stroke-dasharray', this.lineTypes_[linetype]);\n      }\n      return line;\n    },\n\n    drawRect: function(x, y, w, h) {\n      return this.paper_.rect(x, y, w, h).attr(RECT);\n    },\n\n    /**\n     * Draws text with a optional white background\n     * x,y (int) x,y top left point of the text, or the center of the text (depending on align param)\n     * text (string) text to print\n     * font (Object)\n     * align (string) ALIGN_LEFT or ALIGN_CENTER\n     */\n    drawText: function(x, y, text, font, align) {\n      text = this.cleanText(text);\n      font = font || {};\n      align = align || ALIGN_LEFT;\n\n      var paper = this.paper_;\n      var bb = this.textBBox(text, font);\n\n      if (align == ALIGN_CENTER) {\n        x = x - bb.width / 2;\n        y = y - bb.height / 2;\n      }\n\n      var t;\n      if (font.obj_) {\n        // When using a font, we have to use .print(..)\n        t = paper.print(x - bb.x, y - bb.y, text, font.obj_, font['font-size']);\n      } else {\n        t = paper.text(x - bb.x - bb.width / 2, y - bb.y, text);\n        t.attr(font);\n        t.attr({'text-anchor': 'start'});\n      }\n\n      return t;\n    }\n  });\n\n  /******************\n   * RaphaelHandTheme\n   ******************/\n\n  var RaphaelHandTheme = function(diagram, options, resume) {\n    this.init(diagram, _.defaults(options, {\n              'font-size': 16,\n              'font-family': 'daniel'\n            }), resume);\n  };\n\n  // Take the standard RaphaelTheme and make all the lines wobbly\n  _.extend(RaphaelHandTheme.prototype, RaphaelTheme.prototype, {\n        setupPaper: function(container) {\n            RaphaelTheme.prototype.setupPaper.call(this, container);\n            this.font_.obj_ = this.paper_.getFont('daniel');\n          },\n\n        drawLine: function(x1, y1, x2, y2, linetype, arrowhead) {\n          var line = this.paper_.path(handLine(x1, y1, x2, y2)).attr(LINE);\n          if (arrowhead !== undefined) {\n            line.attr('arrow-end', this.arrowTypes_[arrowhead] + '-wide-long');\n          }\n          if (arrowhead !== undefined) {\n            line.attr('stroke-dasharray', this.lineTypes_[linetype]);\n          }\n          return line;\n        },\n\n        drawRect: function(x, y, w, h) {\n          return this.paper_.path(handRect(x, y, w, h)).attr(RECT);\n        }\n      });\n\n  registerTheme('raphaelSimple', RaphaelTheme);\n  registerTheme('raphaelHand',   RaphaelHandTheme);\n}\n/*!\n * The following copyright notice may not be removed under any circumstances.\n * \n * Copyright:\n * Copyright (c) 2011 by Daniel Midgley. All rights reserved.\n * \n * Trademark:\n * Please refer to the Copyright section for the font trademark attribution\n * notices.\n * \n * Full name:\n * Daniel-Bold\n * \n * Description:\n * Daniel Bold is a font by Daniel Midgley.\n * \n * Designer:\n * Daniel Midgley\n * \n * Vendor URL:\n * http://goodreasonblog.blogspot.com/p/fontery.html\n * \n * License information:\n * http://creativecommons.org/licenses/by-nd/3.0/\n */\nif (typeof Raphael != 'undefined') {\nRaphael.registerFont({\n    \"w\": 209,\n    \"face\": {\n        \"font-family\": \"Daniel\",\n        \"font-weight\": 700,\n        \"font-stretch\": \"normal\",\n        \"units-per-em\": \"360\",\n        \"panose-1\": \"2 11 8 0 0 0 0 0 0 0\",\n        \"ascent\": \"288\",\n        \"descent\": \"-72\",\n        \"x-height\": \"7\",\n        \"bbox\": \"-92.0373 -310.134 519 184.967\",\n        \"underline-thickness\": \"3.51562\",\n        \"underline-position\": \"-25.1367\",\n        \"unicode-range\": \"U+0009-U+F002\"\n    },\n    \"glyphs\": {\n        \" \": {\n            \"w\": 179\n        },\n        \"\\t\": {\n            \"w\": 179\n        },\n        \"\\r\": {\n            \"w\": 179\n        },\n        \"!\": {\n            \"d\": \"66,-306v9,3,18,11,19,24v-18,73,-20,111,-37,194v0,10,2,34,-12,34v-12,0,-18,-9,-18,-28v0,-85,23,-136,38,-214v1,-7,4,-10,10,-10xm25,-30v15,-1,28,34,5,35v-11,-1,-38,-36,-5,-35\",\n            \"w\": 115\n        },\n        \"\\\"\": {\n            \"d\": \"91,-214v-32,3,-25,-40,-20,-68v3,-16,7,-25,12,-27v35,13,14,56,8,95xm8,-231v4,-31,1,-40,18,-75v37,7,11,51,11,79v-3,3,-4,8,-5,13v-17,4,-16,-10,-24,-17\",\n            \"w\": 117\n        },\n        \"#\": {\n            \"d\": \"271,-64v-30,26,-96,-7,-102,51v-6,2,-13,2,-24,-2v-2,-11,10,-21,2,-28v-14,5,-48,0,-48,22v0,23,-11,14,-29,10v-7,-6,6,-19,-1,-24r-32,4v-19,-8,-15,-24,5,-28r33,-6v4,0,24,-23,11,-27v-26,0,-63,14,-74,-10v3,-1,9,-17,16,-10v15,-8,81,4,89,-30v8,-14,16,-34,24,-38v23,9,24,38,5,49v37,24,55,-38,72,-43v19,10,20,23,-1,45v2,8,23,1,29,4v3,3,6,6,10,11v-14,13,-20,12,-45,12v-17,0,-16,17,-19,29v18,-7,49,3,67,-2v4,0,8,4,12,11xm161,-104v-30,-1,-44,10,-44,37v14,1,24,0,40,-5v0,-1,3,-10,8,-26v0,-4,-1,-6,-4,-6\",\n            \"w\": 285\n        },\n        \"$\": {\n            \"d\": \"164,-257v29,4,1,42,-3,50v5,5,38,13,41,24v8,4,6,15,-2,21v-18,3,-36,-17,-49,-17v-17,1,-31,40,-28,48v5,4,8,8,9,10v13,1,35,37,28,44v-10,21,-36,20,-65,28v-10,10,-12,40,-17,51v-9,-3,-28,1,-18,-17v0,-13,5,-24,-1,-35v-18,1,-59,-10,-42,-29v21,0,56,16,55,-16v5,-4,9,-18,9,-26v-14,-15,-55,-41,-53,-65v2,-33,56,-19,98,-26v10,-14,31,-43,38,-45xm93,-152v11,-10,15,-15,14,-29v-17,-3,-37,1,-43,6v10,12,20,19,29,23xm111,-103v-8,1,-11,12,-10,22v10,0,28,2,27,-8v0,-4,-13,-15,-17,-14\",\n            \"w\": 225\n        },\n        \"%\": {\n            \"d\": \"181,-96v24,-7,67,-13,104,1v14,18,21,19,22,44v-13,43,-99,61,-146,36v-9,-9,-22,-11,-32,-29v0,-27,24,-53,52,-52xm139,-185v-9,68,-138,73,-131,-5v0,-3,3,-9,9,-17v13,1,27,1,17,-16v5,-39,63,0,93,-6v36,1,80,-9,102,11v15,32,12,32,-8,56v-16,21,-103,78,-152,125r-14,28v-23,11,-25,-7,-29,-20v34,-71,133,-98,171,-162v-13,-12,-52,-5,-61,1v0,1,1,3,3,5xm38,-190v0,34,55,29,70,8v0,-14,-20,-11,-32,-14v-14,-3,-24,-9,-40,-10v1,0,5,11,2,16xm172,-53v12,27,90,18,102,-5v-18,-7,-32,-10,-40,-10v-29,3,-57,-4,-62,15\",\n            \"w\": 308\n        },\n        \"&\": {\n            \"d\": \"145,-82v17,-8,47,-15,71,-26v13,2,25,12,9,23v-23,7,-40,16,-53,27r0,6v13,8,30,21,36,38v0,8,-4,12,-11,12v-19,0,-43,-39,-59,-44v-30,12,-65,29,-97,32v-32,3,-45,-41,-23,-63v21,-20,52,-26,70,-48v-4,-31,-12,-47,9,-73v13,-16,20,-29,23,-39v15,-15,32,-22,51,-22v30,9,62,64,32,96v-2,3,-47,42,-69,48v-15,8,-11,9,0,22v6,7,10,11,11,11xm114,-138v25,-13,62,-38,74,-62v0,-9,-10,-31,-20,-29v-28,7,-60,42,-60,75v0,10,2,15,6,16xm99,-91v-18,10,-54,18,-59,45v26,5,61,-12,77,-22v-1,-5,-13,-23,-18,-23\",\n            \"w\": 253\n        },\n        \"'\": {\n            \"d\": \"36,-182v-36,7,-34,-61,-17,-80v15,1,21,19,21,20r-1,-1v0,0,-1,12,-5,35v1,5,3,17,2,26\",\n            \"w\": 63\n        },\n        \"(\": {\n            \"d\": \"130,-306v13,2,23,43,-1,43v-49,43,-77,77,-90,148v5,49,27,67,64,101v4,14,5,6,2,19r-15,0v-35,-17,-79,-58,-79,-120v0,-58,66,-176,119,-191\",\n            \"w\": 120\n        },\n        \")\": {\n            \"d\": \"108,-138v-2,73,-48,120,-98,153v-17,-5,-16,-20,-6,-31v52,-64,73,-62,74,-135v1,-42,-40,-98,-58,-128v0,-5,-1,-12,-2,-22v18,-18,25,0,42,27v25,39,50,66,48,136\",\n            \"w\": 120\n        },\n        \"*\": {\n            \"d\": \"121,-271v15,-5,36,-8,40,9v-5,10,-31,19,-47,31v0,11,34,43,14,53v-18,8,-24,-24,-34,-20v-4,10,-4,19,-12,41v-25,7,-15,-30,-17,-47v-13,-1,-17,9,-46,30r-10,0v-20,-32,37,-43,54,-64v-10,-11,-36,-33,-16,-51v3,0,14,8,33,24v8,-10,26,-39,32,-42v14,7,15,23,9,36\",\n            \"w\": 177\n        },\n        \"+\": {\n            \"d\": \"163,-64v-7,22,-65,2,-77,21v-2,10,-6,21,-11,35v-20,4,-21,-12,-19,-29v3,-23,-44,6,-39,-27v-8,-22,36,-8,49,-18v8,-13,6,-36,24,-40v19,-4,14,32,11,39v18,3,19,2,54,8v2,1,5,5,8,11\",\n            \"w\": 170\n        },\n        \",\": {\n            \"d\": \"25,63v-26,21,-48,-2,-22,-24v14,-12,35,-40,35,-69v3,-2,3,-11,12,-9v35,17,5,88,-25,102\",\n            \"w\": 97\n        },\n        \"-\": {\n            \"d\": \"57,-94v19,4,55,-5,54,17v-15,23,-54,20,-91,15v-4,2,-13,-10,-11,-16v-1,-22,28,-15,48,-16\",\n            \"w\": 124\n        },\n        \".\": {\n            \"d\": \"40,-48v21,20,21,44,-4,44v-33,0,-26,-24,-10,-44r14,0\",\n            \"w\": 67\n        },\n        \"\\/\": {\n            \"d\": \"21,20v-22,-45,21,-95,41,-126v38,-57,115,-158,193,-201v2,0,4,3,7,11v11,29,-15,34,-25,55v-81,56,-189,208,-197,261r-19,0\",\n            \"w\": 275\n        },\n        \"0\": {\n            \"d\": \"78,-237v70,-47,269,-41,270,59v0,34,-11,53,-29,76v-13,35,-30,32,-85,64v-6,2,-10,6,-7,8v-73,14,-98,38,-173,1v-7,-13,-52,-48,-46,-88v9,-57,27,-75,70,-120xm123,-38v100,0,202,-46,195,-153v-32,-55,-144,-73,-211,-35v-16,34,-68,54,-53,108v6,25,1,22,-3,39v6,24,41,41,72,41\",\n            \"w\": 353\n        },\n        \"1\": {\n            \"d\": \"39,-208v0,-14,6,-59,29,-39v3,4,6,13,10,24r-22,128r8,87v-4,6,-9,3,-16,2v-44,-38,-9,-137,-9,-202\",\n            \"w\": 93\n        },\n        \"2\": {\n            \"d\": \"88,-35v47,-10,119,-24,168,-9v0,12,-23,13,-35,16v1,1,3,1,5,1v-74,8,-118,23,-194,23v-14,0,-20,-13,-21,-28v55,-40,83,-61,123,-104v26,-13,65,-67,71,-102v-1,-9,-11,-16,-22,-16v-20,-1,-120,29,-156,49v-10,-2,-30,-20,-10,-28v50,-21,111,-51,178,-48v25,10,44,22,36,39v12,30,-19,64,-34,83v-39,48,-37,39,-115,109v0,5,-3,8,-8,11v4,3,8,4,14,4\",\n            \"w\": 265\n        },\n        \"3\": {\n            \"d\": \"188,-282v34,-10,74,25,47,51v-19,32,-55,50,-92,70v28,14,116,25,108,70v8,14,-49,40,-63,48v-29,9,-130,22,-168,42v-6,-5,-19,-7,-12,-22v56,-36,175,-21,210,-76v-9,-20,-88,-42,-97,-33v-20,-1,-41,2,-56,-7r5,-21v56,-25,103,-36,137,-78v1,-1,2,-5,4,-11v-15,-14,-56,7,-79,0v-10,9,-73,22,-92,31v-11,-4,-28,-23,-13,-30v50,-22,96,-26,154,-37v0,-1,8,3,7,3\",\n            \"w\": 260\n        },\n        \"4\": {\n            \"d\": \"79,-249v-7,17,-29,75,-33,96v0,6,3,8,8,8v43,-2,111,6,141,-6v17,-47,20,-100,63,-148v9,4,16,7,21,10v-17,31,-44,95,-51,141v7,4,24,-4,23,10v-1,16,-29,12,-31,23v-10,22,-9,69,-7,103v-3,2,-7,5,-10,9v-47,-11,-23,-74,-16,-114v0,-4,-2,-6,-7,-6v-65,2,-89,13,-162,4v-22,-22,-2,-53,5,-76v16,-15,17,-57,35,-70v6,-1,21,11,21,16\",\n            \"w\": 267\n        },\n        \"5\": {\n            \"d\": \"185,-272v30,7,45,-8,53,18v1,16,-17,18,-34,14v0,0,-95,-11,-129,1v-6,9,-24,33,-29,54v76,10,171,5,214,47v11,11,22,30,5,52v-14,12,-30,14,-34,27v-26,11,-141,63,-157,60v-16,-2,-25,-19,-4,-27v48,-18,128,-39,170,-86v4,-14,-65,-41,-85,-41r-92,0v-10,-4,-66,-1,-57,-23v0,-23,23,-51,35,-83v11,-28,133,-10,144,-13\",\n            \"w\": 284\n        },\n        \"6\": {\n            \"d\": \"70,-64v9,-51,63,-74,123,-71v43,2,109,3,111,41r-25,47v0,1,1,2,2,3v-5,0,-39,10,-41,20v-15,3,-22,4,-22,11v-39,1,-77,20,-119,13v-42,-7,-35,-9,-77,-46v-56,-118,94,-201,176,-229v7,0,21,8,20,15v-2,17,-23,15,-43,24v-69,31,-119,72,-134,145v-5,25,36,68,78,64v59,-6,128,-18,153,-61v-7,-14,-13,-9,-32,-21v-67,-15,-118,-5,-150,43r0,12v-13,4,-17,-3,-20,-10\",\n            \"w\": 310\n        },\n        \"7\": {\n            \"d\": \"37,-228v33,-14,173,-17,181,-19v28,-1,24,31,9,45v-17,15,-45,49,-59,69v-17,26,-55,67,-61,113v-10,13,-9,14,-14,20v-33,-13,-20,-25,-11,-53v16,-48,73,-115,109,-156v2,-7,5,-14,-10,-12v-26,4,-54,6,-76,13v-23,-5,-83,31,-94,-9v2,-8,18,-19,26,-11\",\n            \"w\": 245\n        },\n        \"8\": {\n            \"d\": \"57,-236v40,-50,166,-51,213,-10v22,28,10,63,-22,78r-35,17v8,5,54,24,53,44v-5,14,-4,33,-18,42v-13,13,-35,18,-44,34v-60,27,-190,49,-194,-42v7,-41,17,-54,59,-70r0,-4v-32,-9,-73,-62,-26,-85v4,0,8,-2,14,-4xm142,-160v24,-2,160,-31,99,-72v-28,-18,-108,-33,-146,-5v-16,12,-28,30,-33,59v24,12,37,20,80,18xm41,-62v30,65,189,6,199,-37v3,-14,-60,-30,-74,-30v-70,0,-118,10,-125,67\",\n            \"w\": 290\n        },\n        \"9\": {\n            \"d\": \"11,-192v15,-49,119,-61,161,-23v16,15,27,55,11,79v-20,62,-51,79,-96,118v-10,4,-45,27,-50,6v9,-15,66,-52,98,-99v-7,-7,-8,-3,-25,0v-49,-11,-96,-25,-99,-81xm145,-131v7,-5,13,-34,13,-41v-2,-51,-104,-38,-114,-6v-2,10,37,35,46,35v23,1,43,-1,55,12\",\n            \"w\": 198\n        },\n        \":\": {\n            \"d\": \"39,-125v15,-8,40,-1,40,15v0,15,-6,22,-19,22v-13,0,-29,-21,-21,-37xm66,-17v-8,27,-51,19,-46,-8v-1,-6,8,-22,14,-20v29,0,30,6,32,28\",\n            \"w\": 95\n        },\n        \";\": {\n            \"d\": \"56,-93v2,-30,37,-22,40,2v0,2,-1,7,-3,15v-13,8,-15,6,-27,4xm64,-44v11,-11,30,-4,32,14v-21,39,-63,71,-92,85v-5,0,-11,-2,-18,-8v11,-23,36,-36,50,-61v11,-7,19,-20,28,-30\",\n            \"w\": 107\n        },\n        \"<\": {\n            \"d\": \"166,-202v12,0,29,15,24,29v0,4,-119,64,-120,73v15,21,89,64,91,86v2,29,-18,12,-30,15v-27,-29,-59,-54,-95,-75v-18,-10,-25,-13,-24,-41\",\n            \"w\": 176\n        },\n        \"=\": {\n            \"d\": \"125,-121v18,7,55,-9,69,14v0,17,-45,26,-135,26v-18,0,-27,-7,-27,-21v-1,-37,60,-5,93,-19xm138,-71v20,0,48,-1,50,16v-13,24,-86,32,-131,29v-29,-2,-43,-10,-43,-24v-7,-23,36,-14,39,-17v27,6,57,-4,85,-4\",\n            \"w\": 196\n        },\n        \">\": {\n            \"d\": \"4,-14v20,-48,77,-59,118,-94v-16,-19,-58,-52,-81,-75v-11,-7,-15,-38,-1,-40v33,16,83,71,121,105v26,23,-6,35,-41,53v-29,16,-56,28,-73,54v-21,15,-16,20,-34,15v-3,0,-9,-16,-9,-18\",\n            \"w\": 174\n        },\n        \"?\": {\n            \"d\": \"105,-291v57,-13,107,-4,107,39v0,67,-136,85,-155,137v-1,6,10,23,-4,23v-23,1,-33,-35,-23,-57v31,-41,124,-60,149,-103v-8,-21,-72,-5,-88,-1v-23,6,-59,39,-71,8v0,0,-1,0,1,-17v10,-4,45,-20,84,-29xm80,-25v-6,4,-8,39,-24,22v-24,3,-22,-21,-13,-35v17,-7,29,5,37,13\",\n            \"w\": 216\n        },\n        \"@\": {\n            \"d\": \"218,-207v23,8,42,14,47,37v44,68,-27,137,-87,85r1,0v0,2,-59,19,-61,17v-35,0,-42,-47,-17,-68r0,-4v-19,-1,-45,37,-49,40v-37,76,58,72,121,62v11,-2,34,-13,36,3v-14,31,-69,31,-114,33v-51,2,-99,-41,-80,-92v2,-30,22,-40,42,-63v35,-20,91,-53,161,-50xm217,-101v23,0,35,-19,35,-41v0,-43,-75,-41,-102,-19v36,3,55,16,62,41v-6,5,-6,19,5,19xm127,-110v8,5,51,-15,28,-16v-4,0,-25,4,-28,16\",\n            \"w\": 291\n        },\n        \"A\": {\n            \"d\": \"97,-81v-23,-10,-39,38,-52,60v-8,6,-8,6,-22,18v-22,-7,-23,-37,-4,-49v7,-8,11,-15,15,-23r-1,1v-14,-26,23,-29,31,-40v1,-1,15,-29,26,-36v17,-31,39,-58,54,-92v16,-20,20,-51,41,-66v29,5,34,62,45,92v9,64,21,103,49,155v-3,25,-44,11,-54,0v-34,-12,-97,-29,-128,-20xm107,-118v20,6,80,10,111,17v6,-7,-4,-15,-7,-24v-11,-28,-9,-92,-30,-117v-9,9,-19,44,-34,55v-9,23,-27,40,-40,69\",\n            \"w\": 294\n        },\n        \"B\": {\n            \"d\": \"256,-179v41,10,115,34,91,91v-6,3,-14,12,-19,20v-37,19,-50,34,-63,25v-9,10,-12,11,-34,13r3,-3v-4,-4,-12,-4,-18,0v0,0,2,2,5,4v-21,14,-26,6,-44,15v-4,0,-7,-2,-8,-5v-6,11,-20,-5,-18,11v-36,4,-91,35,-114,4v-7,-62,-10,-138,4,-199v-1,-19,-37,2,-37,-27v0,-8,2,-13,6,-15v68,-31,231,-92,311,-39v8,12,12,20,12,25v-8,42,-32,49,-77,80xm79,-160v72,-17,135,-39,184,-70v20,-13,31,-23,31,-27v1,-6,-30,-13,-38,-12v-54,0,-116,13,-186,41v11,21,1,48,9,68xm262,-43v0,-4,3,-6,-4,-5v0,1,1,2,4,5xm211,-140v-34,7,-94,24,-139,15v-6,20,-4,56,-4,82v0,29,43,1,56,2v48,-11,108,-25,154,-48v20,-10,32,-17,32,-25v0,-18,-33,-26,-99,-26xm195,-20v6,1,6,-2,5,-7v-3,2,-7,2,-5,7\",\n            \"w\": 364\n        },\n        \"C\": {\n            \"d\": \"51,-114v-12,75,96,76,166,71r145,-10v9,2,9,5,9,18v-37,18,-85,28,-109,22v-18,10,-47,10,-71,10v-29,0,-68,1,-105,-11v-6,-1,-10,-3,-10,-8v-33,-13,-48,-33,-66,-59v-19,-114,146,-150,224,-177v35,0,88,-31,99,7v-1,29,-49,14,-76,28v-55,8,-115,35,-175,71v-13,8,-23,21,-31,38\",\n            \"w\": 376\n        },\n        \"D\": {\n            \"d\": \"312,-78v-2,1,-3,7,-10,5v6,-3,10,-4,10,-5xm4,-252v2,-27,83,-38,106,-39v130,-7,267,1,291,109v0,0,-2,8,-3,25v-5,9,-4,28,-23,34v-4,4,-2,5,-7,0v-3,3,-15,7,-5,10v0,0,-10,14,-13,2v-11,1,-8,5,-20,14v1,2,7,3,9,1v-4,13,-22,13,-11,4v0,-3,1,-6,-3,-5v-40,29,-103,38,-141,65v10,6,22,-7,34,-3v-41,20,-127,44,-171,46v-21,1,-47,-33,-11,-39v15,-2,43,-6,56,-11v-16,-101,-5,-130,9,-207v2,0,4,-1,6,-3v-16,-17,-91,38,-103,-3xm297,-69v-7,3,-17,8,-25,7v1,1,3,2,5,2v-4,2,-11,5,-23,9v4,-11,30,-21,43,-18xm240,-51v10,0,12,2,0,6r0,-6xm220,-36v-1,-3,4,-6,6,-3v0,1,-2,1,-6,3xm125,-48v16,6,137,-46,155,-53v29,-18,101,-44,82,-93v-21,-53,-84,-61,-168,-67v-20,7,-50,3,-77,8v33,54,-12,132,8,205xm159,-22v-4,-1,-15,-5,-15,2v7,-1,12,-2,15,-2\",\n            \"w\": 381\n        },\n        \"E\": {\n            \"d\": \"45,-219v-19,-36,34,-41,63,-36v44,-10,133,-8,194,-15v3,2,38,11,52,15v-73,19,-171,21,-246,38v-9,11,-16,32,-20,61v35,11,133,-6,183,3v1,6,2,7,3,14v-46,24,-118,16,-193,27v-15,13,-22,52,-22,66v60,1,121,-20,188,-20v22,10,53,-7,74,5v16,29,-23,26,-43,32v-73,4,-139,13,-216,27r-52,-10v-4,-22,23,-69,26,-98v-3,0,-10,-15,-12,-24v20,-12,34,-23,35,-67v2,-1,5,-5,5,-7v0,-4,-14,-11,-19,-11\",\n            \"w\": 353\n        },\n        \"F\": {\n            \"d\": \"270,-258v13,2,59,6,48,34v-78,-3,-143,1,-212,22v-10,16,-21,43,-24,69r145,-9v8,3,29,-3,16,21v-14,-1,-59,13,-60,7v-12,13,-67,18,-108,21v-2,1,-4,3,-7,6v-2,23,-8,43,-7,69v1,28,-30,11,-40,5r10,-80r-26,-14v5,-10,10,-33,28,-25v21,-3,15,-46,26,-59v-1,-3,-32,-13,-28,-24v2,-22,45,-16,59,-30v47,4,99,-14,151,-9v5,-3,25,-3,29,-4\",\n            \"w\": 236\n        },\n        \"G\": {\n            \"d\": \"311,-168v53,0,94,57,74,110v-31,37,-71,34,-136,52v-13,-7,-41,10,-57,7v-73,-1,-122,-17,-162,-59v-49,-51,-24,-80,5,-130v35,-61,138,-93,214,-106v16,4,42,-1,40,21v-5,40,-39,2,-73,21v-76,19,-162,65,-177,142v28,103,237,76,312,29v2,-3,3,-7,3,-13v-10,-35,-37,-43,-87,-45v-16,-13,-53,-9,-78,1v-4,-3,-5,-7,-5,-11v17,-29,73,-17,108,-24v12,4,18,5,19,5\",\n            \"w\": 391\n        },\n        \"H\": {\n            \"d\": \"300,-268v18,12,19,32,4,51v-35,44,-34,140,-46,217v-1,5,-5,13,-11,12v-6,1,-19,-14,-18,-27r7,-106v-28,7,-76,22,-116,14v-18,2,-36,6,-55,3v-43,-8,-14,53,-33,75v-29,1,-26,-67,-21,-97v5,-31,28,-73,43,-98v2,2,7,3,14,3v13,33,-11,48,-13,78v61,4,118,2,176,2v8,0,13,-6,15,-20v4,-47,21,-87,54,-107\",\n            \"w\": 288\n        },\n        \"I\": {\n            \"d\": \"63,-266v34,10,-4,105,-8,128r-24,126v-2,2,-3,1,-9,6v-12,-10,-12,-15,-12,-47v0,-93,9,-156,28,-188v10,-17,19,-25,25,-25\",\n            \"w\": 79\n        },\n        \"J\": {\n            \"d\": \"235,-291v26,11,31,104,31,142v0,37,-2,95,-32,126v-33,34,-121,26,-167,1v-18,-11,-54,-29,-59,-59v0,-3,5,-15,16,-14v31,36,90,57,162,51v63,-30,56,-148,32,-226v-1,-16,11,-13,17,-21\",\n            \"w\": 282\n        },\n        \"K\": {\n            \"d\": \"212,-219v17,-5,80,-60,80,-19v0,9,-2,14,-5,16r-132,78v-34,23,-54,32,-21,50v39,21,74,23,124,41v5,2,7,5,7,9v-4,24,-55,15,-79,8v-67,-19,-98,-36,-116,-83v9,-24,38,-35,66,-61v7,-4,49,-30,76,-39xm47,-194v11,-20,11,-45,31,-55v2,2,4,3,6,0v29,39,-21,96,-18,128v-17,24,-15,62,-29,113v-4,3,-10,7,-19,11v-12,-13,-10,-28,-8,-53v3,-31,17,-79,37,-144\",\n            \"w\": 270\n        },\n        \"L\": {\n            \"d\": \"84,-43v58,0,179,-27,242,-4v3,17,-29,24,-40,26v-85,-4,-202,46,-268,3v-24,-16,-2,-33,-4,-57v26,-76,38,-108,86,-191v14,-7,26,-50,45,-32v6,22,5,31,-12,46v-20,39,-50,82,-67,142v-7,6,-19,46,-19,54v0,9,12,13,37,13\",\n            \"w\": 331\n        },\n        \"M\": {\n            \"d\": \"174,-236v-1,52,-11,92,-7,143v10,5,15,-12,22,-18v42,-55,90,-130,136,-174r15,-18v42,2,32,53,11,80v-12,58,-54,143,-34,210v0,3,-3,12,-9,10v-31,-5,-32,-57,-27,-92v4,-27,12,-58,25,-93v-5,-10,5,-19,6,-30v-46,44,-66,110,-129,172v-11,10,-18,15,-22,15v-34,6,-28,-103,-28,-152v-28,22,-65,119,-96,170v-9,15,-34,3,-31,-19v30,-64,91,-177,139,-229v12,-1,29,13,29,25\",\n            \"w\": 343\n        },\n        \"N\": {\n            \"d\": \"248,-20v-3,17,-37,18,-43,3v-24,-35,-53,-145,-80,-203v-32,40,-55,120,-92,174v-13,3,-26,-13,-27,-22r87,-171v4,-13,20,-57,42,-32v42,48,46,139,82,198v29,-45,46,-88,65,-153v12,-19,23,-42,38,-60v27,-1,14,18,4,44v-6,46,-32,68,-37,121v-15,29,-33,69,-39,101\",\n            \"w\": 307\n        },\n        \"O\": {\n            \"d\": \"240,-268v85,1,163,29,150,125v13,7,-12,18,-5,26v-23,63,-133,112,-228,124v-80,-16,-171,-56,-148,-153v11,-47,20,-43,53,-83v17,-9,39,-22,73,-29v45,-10,81,-10,105,-10xm363,-156v16,-51,-62,-85,-111,-79v-25,-11,-50,8,-81,0v-15,10,-70,16,-85,31v6,20,-27,24,-39,45v-42,75,40,128,115,128v56,0,209,-71,201,-125\",\n            \"w\": 383\n        },\n        \"P\": {\n            \"d\": \"70,-225v-7,-12,-36,16,-49,19v-4,0,-9,-5,-14,-17v21,-47,114,-55,172,-59v41,-3,132,33,99,87v-21,34,-72,59,-144,80v-2,16,-79,3,-74,46v3,25,-5,47,-10,68v-22,-1,-23,-29,-22,-56v2,-25,-20,-32,-8,-50v21,-5,10,-35,25,-57v6,-28,14,-48,25,-61xm71,-229v47,14,-2,50,-1,99v41,-3,113,-37,173,-76v5,-9,8,-14,8,-15v-28,-47,-125,-29,-180,-8\",\n            \"w\": 252\n        },\n        \"Q\": {\n            \"d\": \"374,-217v20,59,-11,127,-48,156r30,38v-1,6,-8,16,-14,9v-3,0,-19,-9,-47,-26v-72,35,-173,75,-236,12v-70,-40,-67,-213,26,-217r8,5v24,-20,72,-48,112,-38v21,-4,22,-1,50,-2v66,-2,94,20,119,63xm296,-88v13,5,61,-49,63,-84v4,-62,-54,-78,-119,-76v-14,-6,-49,5,-71,3v-42,16,-89,41,-93,94v-9,11,1,25,-7,38v-12,-19,-7,-67,-1,-88v-56,30,-37,137,19,155v27,17,92,19,119,0v12,-2,29,-9,52,-20v2,-2,3,-3,3,-6v-11,-12,-46,-27,-54,-56v0,-13,3,-19,9,-19v18,1,60,52,80,59\",\n            \"w\": 379\n        },\n        \"R\": {\n            \"d\": \"100,-275v96,-23,196,-10,208,78v-3,18,-17,52,-49,62v-14,20,-54,23,-79,40v-2,0,-14,2,-36,6v-40,8,-30,14,-3,33v37,27,52,30,118,55v16,6,31,23,12,27v-58,-2,-104,-29,-143,-61v-14,-3,-16,-15,-39,-27v-23,-19,-28,-12,-15,-38v63,-19,111,-15,163,-53v27,-20,43,-36,43,-49v0,-64,-120,-62,-173,-38v-9,4,-38,9,-40,18v-10,32,-16,70,-13,116v-10,21,-8,47,-6,75v2,31,-9,29,-27,22v-9,-55,5,-140,15,-190v-8,-6,-24,10,-24,-11v0,-34,16,-34,42,-55v2,-1,17,-4,46,-10\",\n            \"w\": 297\n        },\n        \"S\": {\n            \"d\": \"13,-3v-7,-3,-22,-18,-5,-22v68,-15,119,-32,154,-45v51,-19,39,-34,3,-53v-46,-25,-82,-30,-121,-64v-33,-29,-50,-35,-25,-58v37,-20,119,-29,181,-29v29,0,44,6,44,18v-9,26,-62,6,-104,14v-17,2,-72,6,-92,16v37,53,132,58,180,111v8,9,11,20,11,30v-4,17,-23,35,-42,34v-21,16,-17,1,-49,17v-14,7,-41,9,-56,20v-25,-3,-49,10,-79,11\",\n            \"w\": 234\n        },\n        \"T\": {\n            \"d\": \"141,-3v-36,-6,1,-49,-3,-79v10,-19,6,-35,15,-64r26,-85v-51,-9,-100,10,-141,14v-16,2,-30,-26,-11,-32v26,-8,143,-8,179,-19r12,6v67,-2,142,-1,200,-1v8,0,14,3,19,10v-18,16,-74,3,-103,14v-48,-4,-60,4,-113,7v-42,22,-36,130,-58,187v1,12,-9,44,-22,42\",\n            \"w\": 277\n        },\n        \"U\": {\n            \"d\": \"365,-262v13,56,-22,104,-36,141v-19,22,-30,38,-57,56v-4,18,-60,35,-78,50v-53,28,-142,0,-161,-34v-31,-56,-37,-108,-11,-164v17,-33,29,-50,48,-29v-2,2,-3,7,-4,13v-44,36,-38,149,7,174v30,26,55,19,102,4v56,-17,66,-34,120,-76v12,-24,56,-68,46,-122r0,-16v0,1,-1,3,-1,6v4,-13,11,-10,25,-3\",\n            \"w\": 368\n        },\n        \"V\": {\n            \"d\": \"246,-258v21,-22,31,-26,44,-8v1,1,-12,22,-28,35v-15,25,-41,38,-56,69v-13,15,-20,31,-28,57v-15,13,-11,29,-27,72v3,21,-5,24,-27,27v-33,-45,-54,-118,-84,-167v-5,-26,-18,-50,-25,-76v-3,-12,24,-8,29,-5v8,13,18,52,26,70r52,115v9,-2,4,-9,10,-21r25,-47v25,-44,46,-76,89,-121\",\n            \"w\": 234\n        },\n        \"W\": {\n            \"d\": \"31,-213v16,46,17,106,41,151v31,-35,49,-89,76,-127v30,-15,39,27,52,56v10,22,21,48,35,67v2,0,4,-1,5,-3v16,-28,50,-76,79,-121v14,-21,40,-63,64,-83r5,8v-30,58,-76,110,-97,173v-18,28,-25,37,-33,63v-11,1,-16,25,-30,15v-21,-31,-44,-89,-62,-131v0,-2,-1,-3,-5,-5v-17,11,-16,36,-31,50v-20,33,-20,84,-68,94v-24,-19,-23,-81,-39,-111v-1,-15,-29,-94,-10,-108v9,2,12,5,18,12\",\n            \"w\": 331\n        },\n        \"X\": {\n            \"d\": \"143,-183v43,-25,69,-36,126,-62v22,-10,86,-10,56,21v-51,3,-158,61,-154,64v10,15,41,30,50,52v27,17,46,60,70,82v9,14,-6,30,-24,20v-35,-43,-75,-100,-116,-132v-48,13,-100,47,-118,94v-1,49,-26,34,-27,4v-1,-26,13,-27,17,-48v22,-27,68,-55,90,-77v-9,-12,-60,-39,-79,-57v-6,-10,-6,-25,12,-25\",\n            \"w\": 312\n        },\n        \"Y\": {\n            \"d\": \"216,-240v19,-14,42,10,22,26v-54,66,-121,109,-156,197v-8,21,-11,15,-30,4v3,-37,27,-61,33,-76v12,-12,15,-19,32,-42v-8,-6,-40,5,-45,5v-48,-6,-69,-65,-56,-113v14,0,13,-1,24,7v2,33,12,75,42,73v36,-2,102,-57,134,-81\",\n            \"w\": 189\n        },\n        \"Z\": {\n            \"d\": \"60,-255v66,12,200,-34,240,21v-13,42,-63,62,-98,89v-19,15,-47,33,-82,55v-25,16,-47,32,-66,47v58,24,129,-6,208,-6v23,0,36,12,13,19v-33,2,-53,5,-86,10v-32,18,-88,15,-135,15v-9,-1,-55,-1,-48,-29v1,-24,30,-24,40,-41v64,-50,151,-86,208,-147v-38,-17,-155,12,-198,-4v0,0,-11,-33,4,-29\",\n            \"w\": 310\n        },\n        \"[\": {\n            \"d\": \"72,-258r-15,250v30,4,55,-3,80,-6v7,-1,8,17,9,23v-28,15,-73,23,-121,21v-7,0,-10,-6,-10,-17v0,-60,25,-193,22,-288v0,-16,13,-20,33,-19v9,-3,34,-12,51,-12v16,0,15,16,19,29v-16,7,-48,10,-68,19\",\n            \"w\": 151\n        },\n        \"\\\\\": {\n            \"d\": \"236,38v20,-18,-8,-74,-13,-90v-44,-78,-112,-190,-200,-253v-2,0,-5,4,-7,12v-11,31,13,36,24,58v74,61,174,219,180,273r16,0\",\n            \"w\": 257\n        },\n        \"]\": {\n            \"d\": \"133,-258v-23,-13,-84,6,-85,-32v0,-10,5,-15,14,-15v0,0,30,2,90,7v10,1,15,13,15,36v2,7,-8,59,-13,112r-11,125v-9,48,9,90,-59,71v-20,-4,-39,-1,-59,-4v-5,-10,-25,-12,-14,-30v8,-3,61,-13,78,-8v14,1,8,-7,10,-17v15,-69,21,-166,34,-245\",\n            \"w\": 171\n        },\n        \"^\": {\n            \"d\": \"68,-306v20,15,47,36,58,60v-1,4,0,7,-9,7v-26,0,-47,-38,-49,-32v-15,9,-41,50,-54,30v-2,-31,17,-23,33,-51v8,-9,15,-14,21,-14\",\n            \"w\": 135\n        },\n        \"_\": {\n            \"d\": \"11,15v-8,33,18,45,50,34r205,2r197,-5v11,-5,14,-9,7,-28v-95,-21,-258,-10,-376,-10v-25,0,-72,-3,-83,7\",\n            \"w\": 485\n        },\n        \"`\": {\n            \"d\": \"75,-264v16,8,56,14,39,43v-30,-8,-65,-23,-105,-44v-1,-3,-3,-28,5,-25v16,5,44,17,61,26\",\n            \"w\": 129\n        },\n        \"a\": {\n            \"d\": \"124,-56v10,4,59,41,65,50v1,7,-6,17,-12,17r-60,-30v-22,2,-42,21,-65,19v-33,4,-68,-67,-15,-81v41,-27,96,-39,110,9v0,6,-4,12,-11,16v-33,-25,-67,-5,-88,12v10,16,61,-18,76,-12\",\n            \"w\": 196\n        },\n        \"b\": {\n            \"d\": \"80,-140v69,1,123,0,134,52v5,26,-71,71,-97,70v-11,11,-88,22,-94,22v-11,-3,-26,-18,-6,-24v19,-5,-2,-19,-1,-35v1,-18,11,-36,-5,-47v-6,-17,-6,-21,14,-32v6,-45,18,-89,28,-124v2,-7,8,-12,17,-15v5,3,10,11,16,28v-12,27,-13,63,-23,96v0,6,6,9,17,9xm87,-107v-40,-9,-31,31,-39,54v8,15,0,25,12,22v30,-8,60,-18,88,-32v39,-18,49,-33,-1,-42v-20,-4,-45,-7,-60,-2\",\n            \"w\": 217\n        },\n        \"c\": {\n            \"d\": \"128,-123v29,-7,37,29,12,33v-27,-4,-40,6,-79,25v-8,4,-13,11,-16,22v30,32,91,3,134,11v5,13,-8,26,-22,19v-51,25,-139,28,-150,-30v6,-50,69,-82,121,-80\",\n            \"w\": 194\n        },\n        \"d\": {\n            \"d\": \"224,-201v0,-35,-17,-111,24,-94v7,86,-2,119,0,197v-4,2,-8,21,-18,16v-62,-7,-154,-8,-185,29v6,17,28,26,51,26v16,0,100,-15,132,-18v7,5,-6,20,-10,22v-24,8,-122,42,-163,25v-32,-5,-62,-53,-36,-80v35,-37,118,-46,198,-43v1,-22,7,-49,7,-80\",\n            \"w\": 265\n        },\n        \"e\": {\n            \"d\": \"4,-57v0,-58,51,-71,110,-74v33,-1,45,16,59,35v1,14,2,39,-7,42v-24,-2,-73,13,-99,11v-2,2,-2,3,-2,3v0,3,12,8,37,15v21,0,69,9,31,22v-9,14,-34,6,-56,6v-27,-5,-73,-28,-73,-60xm123,-102v-22,2,-68,5,-65,26v24,-2,66,5,79,-6v-5,-13,-1,-13,-14,-20\",\n            \"w\": 182\n        },\n        \"f\": {\n            \"d\": \"6,-59v6,-29,53,-4,53,-43v0,-64,29,-118,84,-150v45,-25,167,-24,155,51v-1,2,-7,6,0,6r-10,2v-45,-58,-165,-39,-186,39v-7,26,-11,42,-9,62v44,8,95,-21,135,-7v-12,25,-39,21,-76,30v-19,5,-18,7,-54,19v-2,8,15,32,17,35v-6,25,-26,26,-40,-5r-15,-24v-41,10,-44,12,-54,-15\",\n            \"w\": 234\n        },\n        \"g\": {\n            \"d\": \"132,-97v30,27,21,75,30,117v-12,31,-11,66,-36,103v-32,46,-105,83,-167,39v-31,-21,-49,-29,-51,-75v-2,-37,77,-50,121,-57v37,-6,68,-10,95,-11v7,-6,3,-32,4,-46v0,0,-1,1,-1,2v0,-18,-5,-31,-14,-45v-44,5,-79,20,-94,-18v3,-54,73,-54,125,-50v12,7,12,13,4,25v-30,-11,-76,8,-90,20v23,3,50,-16,74,-4xm-34,121v60,53,168,1,159,-86v-47,-7,-93,24,-142,30v-12,7,-45,19,-42,29v0,10,8,19,25,27\",\n            \"w\": 188\n        },\n        \"h\": {\n            \"d\": \"100,-310v11,-2,10,19,11,20v-11,52,-40,133,-53,189v-6,30,-9,37,-9,47v27,0,113,-34,143,-34v42,0,31,47,39,79v0,4,-5,17,-16,16v4,2,11,3,4,6v-24,-1,-28,-34,-25,-64v-1,-1,-2,-3,-5,-5v-51,0,-110,38,-162,51v-9,1,-15,-15,-16,-23v17,-89,39,-141,71,-264v0,-9,6,-19,18,-18\",\n            \"w\": 251\n        },\n        \"i\": {\n            \"d\": \"62,-209v7,18,9,23,-5,38v-23,-6,-21,-18,-11,-36v2,0,8,-1,16,-2xm34,-7v-18,-21,-8,-73,-1,-106v7,-10,20,-8,23,6v-1,36,7,72,-2,104v-8,2,-8,0,-20,-4\",\n            \"w\": 80\n        },\n        \"j\": {\n            \"d\": \"88,-191v5,28,-18,40,-28,21v0,-20,12,-29,28,-21xm82,-99v28,-1,16,35,16,61v0,60,-19,150,-35,202v-12,8,-19,31,-35,16v-32,-7,-43,-19,-56,-44r2,-17v11,4,49,45,61,18v10,-55,27,-107,30,-171v0,-16,0,-59,17,-65\",\n            \"w\": 120\n        },\n        \"k\": {\n            \"d\": \"59,-66v33,26,114,37,155,62v8,-4,22,-2,19,-17v0,-4,-12,-11,-30,-24v-36,-25,-54,-22,-99,-33v14,-21,119,-13,103,-63r-16,-7r-123,47r25,-93v-3,-15,16,-49,18,-81v1,-15,-21,-14,-25,-3v-31,82,-49,168,-75,257v2,2,22,30,27,10v2,-5,4,-9,9,-11v4,-16,4,-15,12,-44\",\n            \"w\": 236\n        },\n        \"l\": {\n            \"d\": \"66,-300v21,-6,37,23,30,55v-10,51,-28,135,-28,208v0,11,6,36,-13,37v-29,-5,-30,-48,-25,-83r28,-177v-6,-17,1,-29,8,-40\",\n            \"w\": 102\n        },\n        \"m\": {\n            \"d\": \"348,-59v-2,21,0,57,3,73v-17,3,-30,-1,-32,-16v-8,-7,-5,-44,-13,-70v-35,3,-82,49,-111,70v-12,8,-40,4,-39,-15r2,-56v-1,-13,4,-28,-8,-29v-35,8,-79,72,-115,87v-6,2,-20,-18,-21,-22v1,-20,14,-105,39,-64r8,15v17,-14,72,-56,93,-54v27,3,49,40,43,80v24,-2,66,-55,124,-53v11,14,28,23,27,54\",\n            \"w\": 368\n        },\n        \"n\": {\n            \"d\": \"121,-136v37,6,62,54,62,111v0,32,-16,25,-31,17v-18,-30,-5,-45,-22,-85v-37,-13,-71,55,-92,65v-20,-3,-39,-39,-21,-62v2,-12,3,-15,11,-30v12,-8,20,11,29,12\",\n            \"w\": 194\n        },\n        \"o\": {\n            \"d\": \"108,-139v52,-24,104,18,104,63v0,59,-66,67,-114,83v-52,-2,-115,-50,-80,-105v23,-18,52,-35,90,-41xm45,-60v16,54,125,16,131,-23v-12,-59,-129,-8,-131,23\",\n            \"w\": 217\n        },\n        \"p\": {\n            \"d\": \"82,14v-10,12,-8,117,-24,142v-15,2,-19,0,-29,-13v0,-76,9,-113,22,-192v14,-27,35,-6,37,13v0,8,-3,21,-7,38v2,2,3,2,4,2v26,-9,116,-33,126,-72v-7,-17,-24,-33,-49,-31v-40,3,-116,13,-116,47v-5,7,-2,17,-16,20v-17,-12,-18,-20,-12,-38v8,-25,74,-61,110,-59v55,-15,113,15,118,70v-15,52,-84,79,-146,83v-5,0,-11,-4,-18,-10\",\n            \"w\": 251\n        },\n        \"q\": {\n            \"d\": \"144,-147v27,-8,89,-3,97,31v-9,29,-42,-4,-73,1v-32,6,-118,20,-111,49v0,7,13,13,21,13v21,0,78,-24,104,-34v2,0,9,8,22,21v1,1,1,2,1,5v-27,90,-22,70,-43,203v11,15,-15,54,-33,33v-6,-8,-10,-20,-3,-28v1,-72,5,-114,15,-172v-35,3,-35,10,-59,8v-41,-4,-98,-41,-56,-85v33,-34,59,-27,118,-45\",\n            \"w\": 248\n        },\n        \"r\": {\n            \"d\": \"242,-117v2,22,5,10,-14,23v-73,-7,-166,-23,-174,56v-8,6,-3,20,-8,36v-29,10,-40,-9,-33,-46v6,-31,7,-69,32,-55v58,-37,66,-42,175,-19v3,5,15,4,22,5\",\n            \"w\": 229\n        },\n        \"s\": {\n            \"d\": \"154,-151v19,1,27,24,13,32v-4,1,-22,4,-53,7v-16,8,-22,-2,-39,9v23,21,89,16,96,62v-13,24,-85,35,-124,42v-9,-3,-18,-3,-27,0v-6,-4,-21,-16,-8,-25v30,-6,83,-13,102,-24v-17,-16,-80,-33,-97,-48v-3,-2,-4,-7,-4,-15v-6,-6,3,-13,15,-18v22,-9,94,-23,126,-22\",\n            \"w\": 188\n        },\n        \"t\": {\n            \"d\": \"85,-150v10,-41,35,-126,65,-134v4,1,24,19,11,36v-17,22,-29,57,-36,104v26,8,50,-7,73,5v14,0,22,3,22,9v-1,19,-44,18,-57,23v-10,1,-46,0,-54,10v-10,24,-4,67,-20,98v-21,-3,-26,1,-26,-20v0,-9,2,-36,8,-81v-15,-13,-81,9,-77,-27v4,-38,71,6,91,-23\",\n            \"w\": 194\n        },\n        \"u\": {\n            \"d\": \"207,-136v-1,-2,11,-14,14,-13v6,0,10,7,10,22v-3,40,-23,56,-40,82v-13,19,-62,43,-93,43v-67,-2,-111,-75,-71,-133v26,-3,21,29,19,49v-1,27,26,44,57,42v41,-2,93,-55,104,-92\",\n            \"w\": 242\n        },\n        \"v\": {\n            \"d\": \"24,-127r52,71v42,-16,70,-54,124,-65v5,4,8,7,8,11v-8,19,-4,8,-33,32v0,1,-1,3,-1,5v-61,45,-93,68,-97,68v-40,-15,-50,-72,-68,-100v6,-14,10,-22,15,-22\",\n            \"w\": 214\n        },\n        \"w\": {\n            \"d\": \"15,-139v38,-2,27,57,45,86v30,2,67,-66,101,-78v26,6,36,69,60,78v47,-35,51,-54,119,-104v3,0,7,-2,15,-4v19,23,-9,28,-21,49v-33,28,-68,90,-107,109v-10,6,-52,-47,-72,-71v-20,17,-85,74,-97,73v-38,7,-41,-98,-52,-122v0,-1,3,-7,9,-16\",\n            \"w\": 325\n        },\n        \"x\": {\n            \"d\": \"95,-124v22,-13,78,-32,99,-31v16,0,23,6,23,18v0,22,-17,11,-49,21v-3,0,-45,20,-42,24v0,1,2,4,8,10v20,24,49,41,44,80v-35,3,-27,-9,-60,-44v-40,-43,-37,-26,-79,9v-1,1,-2,3,-3,8v-12,8,-28,10,-27,-11v-6,-8,45,-65,48,-65v-17,-21,-61,-52,-24,-68v9,0,48,37,62,49\",\n            \"w\": 223\n        },\n        \"y\": {\n            \"d\": \"44,-65v22,33,70,4,99,-8v5,-4,28,-15,41,-31r17,0v25,47,-26,70,-40,114v-5,4,-9,8,-10,21v-16,12,-11,33,-27,51v-5,18,-12,43,-23,71v-1,-1,-2,34,-18,29v-12,1,-22,-12,-22,-23v20,-70,24,-65,68,-177v-47,16,-111,8,-116,-39v-11,-13,-7,-62,8,-62v18,0,22,26,23,54\",\n            \"w\": 216\n        },\n        \"z\": {\n            \"d\": \"189,-43v9,-1,46,-6,41,12v0,7,-5,13,-15,14v-45,6,-148,24,-181,13v0,-3,-5,-8,-14,-15v5,-44,66,-46,90,-85v-15,-18,-84,21,-84,-14v0,-10,5,-17,14,-18v33,-3,79,-13,109,-3v4,-2,14,11,12,15v0,23,-26,51,-78,84v28,10,73,-3,106,-3\",\n            \"w\": 244\n        },\n        \"{\": {\n            \"d\": \"94,-303v27,-9,90,-14,79,26v-20,17,-55,-5,-87,13v-4,1,-6,4,-6,8v33,42,31,44,7,85v-6,10,-13,16,-13,13v5,6,17,17,15,31r-33,78v7,35,28,49,57,63r49,0v7,42,-51,41,-86,20v-43,-13,-51,-51,-56,-89v-2,-25,25,-54,27,-71v-3,-4,-46,-5,-41,-21v2,-10,-3,-29,11,-25v2,0,51,-17,52,-38v4,-3,-25,-23,-25,-49v0,-41,8,-30,50,-44\",\n            \"w\": 179\n        },\n        \"|\": {\n            \"d\": \"30,-308v26,5,14,50,15,80v5,78,-8,153,-3,225v-2,15,-1,31,-11,36v-8,-3,-25,-22,-25,-32r9,-183v0,-40,0,-78,1,-112v0,-4,9,-15,14,-14\",\n            \"w\": 63\n        },\n        \"}\": {\n            \"d\": \"47,-298v34,-17,118,-18,112,36v6,25,-76,98,-69,103v4,16,39,7,44,28v7,34,-34,17,-37,39v8,29,49,83,23,123v-15,23,-43,26,-73,46v-34,8,-43,11,-49,-17v1,-15,30,-15,33,-20v24,-12,70,-27,55,-61v-14,-33,-37,-68,-19,-103v-46,-50,46,-100,60,-141v-10,-16,-68,6,-77,-12\",\n            \"w\": 143\n        },\n        \"~\": {\n            \"d\": \"7,-254v2,-6,59,-50,67,-46v11,-1,35,19,46,26v5,0,27,-10,66,-31v21,8,-1,25,-7,38v-27,21,-48,31,-65,31v-24,-11,-37,-39,-65,-9v-7,7,-26,36,-42,11v3,-5,-3,-17,0,-20\",\n            \"w\": 199\n        },\n        \"\\u00a0\": {\n            \"w\": 179\n        },\n        \"\\u00a1\": {\n            \"d\": \"86,-197v8,16,-7,41,-24,25v-11,-11,-4,-16,-3,-29v13,0,15,-2,27,4xm46,-107v4,-8,11,-16,23,-7v19,26,-5,57,-6,87v-7,0,-5,18,-9,28v0,14,-17,52,-11,70v-2,7,-15,28,-25,12v-4,-6,-15,-7,-6,-16v2,-39,14,-96,34,-174\",\n            \"w\": 95\n        },\n        \"\\u00a2\": {\n            \"d\": \"105,-188v13,-12,14,-18,26,-15v7,23,7,15,-3,49v6,0,18,14,17,20v-3,5,-12,19,-26,13v-14,1,-14,5,-16,21v10,10,46,-13,38,18v-9,17,-23,16,-54,20v-17,16,-4,55,-29,60v-37,-10,19,-64,-24,-71v-20,-10,-37,-47,-6,-62v23,-20,73,-4,77,-53xm65,-101v4,-9,7,-8,3,-13v-14,4,-22,10,-3,13\",\n            \"w\": 154\n        },\n        \"\\u00a3\": {\n            \"d\": \"153,-170v3,22,62,0,49,39v-18,6,-31,12,-58,9v-12,-1,-17,30,-23,39v19,26,50,56,91,35v9,-2,27,-13,27,4v0,27,-27,39,-58,42v-32,-5,-59,-19,-78,-39v-6,1,-35,44,-57,39v-25,0,-37,-15,-37,-46v0,-41,43,-53,73,-50v4,1,12,-18,12,-21v-7,-15,-49,0,-44,-30v-2,-31,31,-16,60,-19v16,-30,25,-119,93,-113v16,2,75,16,50,44v-4,5,-7,7,-12,8v-18,-12,-32,-18,-41,-18v-35,-1,-38,52,-47,77xm43,-45v4,5,12,-2,11,-9v-1,2,-12,1,-11,9\",\n            \"w\": 242\n        },\n        \"\\u00a4\": {\n            \"d\": \"308,-133r-200,16v-2,1,-6,4,-10,10v70,-2,144,-14,211,-8v3,0,8,4,13,8v-1,4,-3,9,-9,17v-57,11,-164,6,-219,25v26,32,112,25,173,25v9,0,35,2,35,19v0,9,-4,13,-12,14v-115,12,-146,23,-211,-19v-12,-4,-22,-9,-25,-27v-6,-29,-61,3,-43,-49v17,-1,36,7,42,-12v-32,7,-36,-39,-11,-40v29,14,63,-25,73,-30v52,-25,72,-44,142,-44v23,0,21,41,-1,39v-35,-3,-61,9,-102,31v2,2,5,4,8,4v18,-6,101,-9,115,-9v7,0,55,13,31,30\",\n            \"w\": 312\n        },\n        \"\\u20ac\": {\n            \"d\": \"308,-133r-200,16v-2,1,-6,4,-10,10v70,-2,144,-14,211,-8v3,0,8,4,13,8v-1,4,-3,9,-9,17v-57,11,-164,6,-219,25v26,32,112,25,173,25v9,0,35,2,35,19v0,9,-4,13,-12,14v-115,12,-146,23,-211,-19v-12,-4,-22,-9,-25,-27v-6,-29,-61,3,-43,-49v17,-1,36,7,42,-12v-32,7,-36,-39,-11,-40v29,14,63,-25,73,-30v52,-25,72,-44,142,-44v23,0,21,41,-1,39v-35,-3,-61,9,-102,31v2,2,5,4,8,4v18,-6,101,-9,115,-9v7,0,55,13,31,30\",\n            \"w\": 312\n        },\n        \"\\u00a5\": {\n            \"d\": \"31,-248v30,-3,64,64,74,59v37,-22,77,-65,107,-82v20,-11,34,18,21,32v-28,19,-52,38,-70,57v-18,8,-40,21,-35,60v2,19,39,7,64,7v25,0,16,21,2,27v-36,16,-46,8,-68,18v6,11,101,-20,66,24v-21,11,-42,12,-75,20v-2,1,-5,6,-10,18v-8,3,-11,10,-24,8v-7,-17,-2,-18,-9,-26v-13,5,-39,3,-53,-2v-10,-17,-7,-27,0,-34v23,-1,45,1,64,-5v-11,-7,-28,-4,-64,-6v-13,-8,-15,-24,-6,-35v33,-2,102,9,76,-37v-14,-14,-33,-38,-60,-66v-10,-10,-8,-28,0,-37\",\n            \"w\": 219\n        },\n        \"\\u00a7\": {\n            \"d\": \"141,-115v12,10,29,36,28,56v-4,68,-129,69,-152,16v-1,-12,-10,-22,8,-23v17,3,47,21,67,23v16,1,40,-8,38,-21v-8,-49,-119,-30,-117,-85v1,-28,15,-45,-3,-64v-1,-53,55,-61,103,-62v15,-5,6,-5,20,-2v16,17,23,27,23,30v-1,26,-29,7,-45,7v-21,0,-51,2,-62,17v19,14,87,8,97,43v18,14,16,57,-5,65xm64,-147r57,17v10,-28,-22,-43,-47,-44v-25,-1,-35,19,-10,27\",\n            \"w\": 174\n        },\n        \"\\u00a8\": {\n            \"d\": \"124,-259v0,9,-4,13,-12,13v-18,0,-22,-21,-17,-35v19,-1,30,1,29,22xm23,-285v7,2,30,9,29,18v1,10,-9,19,-18,19v-19,0,-28,-26,-11,-37\",\n            \"w\": 136\n        },\n        \"\\u00a9\": {\n            \"d\": \"102,-29v-74,5,-124,-84,-70,-140v22,-22,53,-35,97,-38v46,-4,88,49,74,100v0,44,-51,75,-101,78xm96,-66v42,-3,75,-23,75,-69v0,-23,-4,-38,-44,-38v-16,0,-33,6,-49,20v36,-4,55,-12,62,20v-5,16,-49,1,-50,21v10,15,53,-14,54,11v0,18,-14,27,-42,27v-22,1,-46,-11,-46,-31v0,-25,7,-39,20,-44v-1,-1,-2,-2,-3,-2v-51,22,-32,89,23,85\",\n            \"w\": 217\n        },\n        \"\\u00aa\": {\n            \"d\": \"6,-265v1,-31,58,-53,80,-22v-11,14,25,28,25,36v-2,8,-15,12,-27,10v-22,-29,-68,19,-78,-24xm52,-281v-8,1,-24,10,-9,13v11,1,24,-10,9,-13\",\n            \"w\": 117\n        },\n        \"\\u00ab\": {\n            \"d\": \"191,-64v16,6,87,37,53,63v-39,-9,-71,-28,-107,-40v-14,-13,-13,-34,10,-47v27,-15,48,-55,84,-62v9,-2,21,10,21,18r-13,21v-16,5,-44,22,-51,41v0,4,1,6,3,6xm71,-65v17,6,87,35,55,62v-39,-8,-66,-27,-108,-40v-14,-13,-13,-36,10,-46v23,-18,50,-56,84,-63v9,-2,21,10,21,18r-13,22v-20,6,-32,17,-51,37v0,3,-1,11,2,10\",\n            \"w\": 265\n        },\n        \"\\u00ac\": {\n            \"d\": \"141,-99v47,7,103,-3,149,6v14,24,18,15,10,39v-10,34,-7,31,-26,76v-4,6,-15,8,-16,21v-4,2,-4,1,-13,5v-22,-33,-4,-33,16,-104v-5,-9,-28,-4,-38,-6r-183,4v-14,0,-41,-29,-17,-36v31,-9,82,5,118,-5\",\n            \"w\": 315\n        },\n        \"\\u00ae\": {\n            \"d\": \"75,-194v78,-29,116,9,130,84v-2,42,-22,47,-57,67v-74,20,-161,-19,-129,-110v6,-18,29,-34,57,-40xm46,-86v51,36,84,21,129,-15v7,-15,0,-39,-10,-49v-13,-37,-49,-26,-86,-18v-28,7,-49,46,-33,82xm72,-123v-5,-43,68,-57,75,-14v-17,26,-18,17,3,32v2,25,-25,18,-45,7r-4,-4v-1,8,-3,20,-12,24v-10,-3,-21,-34,-17,-45xm112,-135v-10,-1,-20,13,-9,14v6,-6,9,-11,9,-14\",\n            \"w\": 217\n        },\n        \"\\u00af\": {\n            \"d\": \"63,-295v28,-7,73,10,105,7v11,1,6,8,5,19v-37,21,-72,11,-136,11v-23,0,-31,-14,-27,-36v12,-15,40,0,53,-1\",\n            \"w\": 183\n        },\n        \"\\u00b0\": {\n            \"d\": \"106,-268v0,36,-35,38,-51,46v-48,5,-60,-58,-25,-78v33,-11,76,-9,76,32xm38,-257v16,7,39,2,38,-17v-13,-9,-28,-1,-32,11v-5,3,-7,0,-6,6\",\n            \"w\": 114\n        },\n        \"\\u00b1\": {\n            \"d\": \"93,-163v-7,46,76,-4,46,47v-14,6,-27,13,-38,8v-24,2,-14,28,-28,44r-14,0v-7,-12,-5,-15,-7,-33v-12,-7,-41,-1,-37,-24v2,-11,23,-17,36,-14r28,-38v4,0,9,4,14,10xm113,-27v-12,18,-58,27,-85,24v-16,2,-22,-23,-13,-36v28,-7,85,-11,98,12\",\n            \"w\": 151\n        },\n        \"\\u00b4\": {\n            \"d\": \"52,-284v29,-11,50,-34,62,-14v3,12,-86,54,-94,56v-14,0,-16,-12,-12,-23v11,-5,25,-11,44,-19\",\n            \"w\": 120\n        },\n        \"\\u00b6\": {\n            \"d\": \"121,-237v21,-9,44,-13,63,-1v-1,7,5,6,7,11r-4,190v-2,33,4,39,-15,40v-16,1,-10,-20,-10,-33r4,-161v0,-17,-1,-34,-16,-25v2,10,1,23,1,35v-9,46,-6,75,-15,156v-3,4,-7,5,-12,5v-17,-10,-3,-89,-10,-115v-43,14,-98,10,-101,-29v-4,-53,59,-63,104,-75v3,1,4,2,4,2xm95,-204v2,9,-30,50,1,50v35,0,23,-13,29,-43v0,-1,-2,-7,-4,-15v-12,-1,-14,2,-26,8\",\n            \"w\": 206\n        },\n        \"\\u00b8\": {\n            \"d\": \"74,16v32,2,49,14,55,36v-3,7,-14,31,-29,33v-28,4,-57,11,-88,14v-19,-6,-13,-31,8,-33v20,-1,59,-5,73,-14v-17,-14,-68,8,-53,-37v9,-10,2,-28,24,-30v8,8,13,17,10,31\",\n            \"w\": 129\n        },\n        \"\\u00ba\": {\n            \"d\": \"13,-273v1,-31,56,-41,83,-18v36,8,14,48,-9,52v-35,6,-64,-5,-74,-34xm81,-269v-7,-7,-20,-11,-29,-6v5,13,13,11,29,6\",\n            \"w\": 128\n        },\n        \"\\u00bb\": {\n            \"d\": \"120,-129v9,-33,48,-10,64,5v9,20,86,52,50,86v-36,11,-66,31,-107,40v-6,-7,-9,-13,-9,-17v-2,-13,50,-46,63,-46v11,-18,-33,-42,-48,-47xm1,-128v10,-33,46,-8,64,6v8,19,86,50,51,85v-40,13,-69,30,-108,40v-6,-7,-8,-12,-8,-16v-2,-14,50,-46,63,-47v7,-13,-9,-20,-19,-30v-10,-9,-20,-15,-30,-17\",\n            \"w\": 252\n        },\n        \"\\u00bf\": {\n            \"d\": \"181,-247v3,1,31,2,29,15v-4,22,-37,27,-41,4v1,-5,7,-20,12,-19xm161,-34v-45,-1,-105,19,-124,51v0,11,18,17,54,17v39,0,82,-13,112,4v-10,35,-58,31,-100,31v-47,0,-80,-10,-99,-31v-10,-56,22,-73,64,-90v8,-3,32,-9,74,-18v21,-15,7,-62,22,-92v-1,-5,-1,-11,4,-12v16,0,24,7,24,22v-8,30,-8,73,-17,111v-3,5,-7,7,-14,7\",\n            \"w\": 213\n        },\n        \"\\u00c0\": {\n            \"d\": \"161,-217v20,53,23,124,54,170v-2,20,-34,9,-42,0v-27,-12,-78,-18,-101,-18v-26,6,-29,51,-54,63v-18,-4,-19,-30,-3,-38v5,-9,15,-16,8,-29v1,-12,23,-9,26,-19v6,-10,11,-20,20,-27r70,-121v12,-4,16,4,22,19xm82,-91v17,3,62,7,86,13v-13,-33,-13,-80,-29,-109v-15,30,-38,63,-57,96xm150,-268v14,10,54,14,37,41v-28,-7,-62,-22,-100,-42v-2,-3,-2,-26,5,-23v16,4,42,17,58,24\"\n        },\n        \"\\u00c1\": {\n            \"d\": \"161,-217v20,53,23,124,54,170v-2,20,-34,9,-42,0v-27,-12,-78,-18,-101,-18v-26,6,-29,51,-54,63v-18,-4,-19,-30,-3,-38v5,-9,15,-16,8,-29v1,-12,23,-9,26,-19v6,-10,11,-20,20,-27r70,-121v12,-4,16,4,22,19xm82,-91v17,3,62,7,86,13v-13,-33,-13,-80,-29,-109v-15,30,-38,63,-57,96xm84,-250v31,-5,83,-53,100,-31v0,5,-11,15,-35,28v-16,5,-51,28,-53,25v-14,1,-16,-11,-12,-22\"\n        },\n        \"\\u00c2\": {\n            \"d\": \"161,-217v20,53,23,124,54,170v-2,20,-34,9,-42,0v-27,-12,-78,-18,-101,-18v-26,6,-29,51,-54,63v-18,-4,-19,-30,-3,-38v5,-9,15,-16,8,-29v1,-12,23,-9,26,-19v6,-10,11,-20,20,-27r70,-121v12,-4,16,4,22,19xm82,-91v17,3,62,7,86,13v-13,-33,-13,-80,-29,-109v-15,30,-38,63,-57,96xm202,-219v-27,-6,-40,-26,-61,-37v-21,7,-39,46,-65,23v-2,-4,-3,-10,-4,-14v19,-4,43,-32,61,-43v27,6,40,22,62,37v12,8,18,17,18,25v0,6,-3,9,-11,9\"\n        },\n        \"\\u00c3\": {\n            \"d\": \"161,-217v20,53,23,124,54,170v-2,20,-34,9,-42,0v-27,-12,-78,-18,-101,-18v-26,6,-29,51,-54,63v-18,-4,-19,-30,-3,-38v5,-9,15,-16,8,-29v1,-12,23,-9,26,-19v6,-10,11,-20,20,-27r70,-121v12,-4,16,4,22,19xm82,-91v17,3,62,7,86,13v-13,-33,-13,-80,-29,-109v-15,30,-38,63,-57,96xm100,-285v26,-19,54,19,69,22v4,0,15,-5,34,-13v23,-9,22,-17,31,-12v3,11,-9,9,-7,21v-26,20,-46,30,-59,30v-3,3,-50,-26,-49,-29v-12,1,-31,35,-51,32v-3,-8,-5,-14,-5,-18v10,-9,16,-17,37,-33\"\n        },\n        \"\\u00c4\": {\n            \"d\": \"161,-217v20,53,23,124,54,170v-2,20,-34,9,-42,0v-27,-12,-78,-18,-101,-18v-26,6,-29,51,-54,63v-18,-4,-19,-30,-3,-38v5,-9,15,-16,8,-29v1,-12,23,-9,26,-19v6,-10,11,-20,20,-27r70,-121v12,-4,16,4,22,19xm82,-91v17,3,62,7,86,13v-13,-33,-13,-80,-29,-109v-15,30,-38,63,-57,96xm187,-259v0,8,-4,13,-12,13v-18,0,-21,-20,-16,-34v18,-1,28,2,28,21xm90,-284v7,3,28,11,28,18v0,9,-9,18,-18,17v-17,0,-25,-24,-10,-35\"\n        },\n        \"\\u00c5\": {\n            \"d\": \"161,-217v20,53,23,124,54,170v-2,20,-34,9,-42,0v-27,-12,-78,-18,-101,-18v-26,6,-29,51,-54,63v-18,-4,-19,-30,-3,-38v5,-9,15,-16,8,-29v1,-12,23,-9,26,-19v6,-10,11,-20,20,-27r70,-121v12,-4,16,4,22,19xm82,-91v17,3,62,7,86,13v-13,-33,-13,-80,-29,-109v-15,30,-38,63,-57,96xm112,-239v-31,-17,-9,-61,29,-56v12,2,22,3,33,12v24,39,-30,62,-62,44xm119,-262v2,14,41,8,41,-4v0,-4,-8,-6,-24,-9v-10,-2,-17,10,-17,13\"\n        },\n        \"\\u00c6\": {\n            \"d\": \"335,-259v0,30,-102,12,-122,34v10,21,2,79,16,100v24,-6,59,-13,86,-16v23,-2,32,21,13,26r-103,29v-3,22,-4,38,8,43v28,-5,60,-6,86,-14v5,-1,14,7,14,11v6,16,-90,40,-107,40v-29,0,-39,-19,-32,-46v-2,-4,0,-26,-9,-28v-29,2,-58,6,-88,6v-31,0,-40,74,-82,73v-18,-23,4,-37,12,-50v40,-65,112,-126,165,-207v20,-17,69,-11,112,-13v21,0,31,4,31,12xm123,-111v28,1,44,-2,67,-10v-4,-22,5,-49,-7,-65v-3,6,-65,61,-60,75\",\n            \"w\": 348\n        },\n        \"\\u00c7\": {\n            \"d\": \"48,-108v-12,70,90,71,159,67r138,-9v9,-1,7,9,7,17v-37,16,-80,27,-103,21v-14,9,-40,3,-67,9v-30,0,-64,1,-100,-10v-6,-1,-10,-4,-10,-8v-32,-12,-46,-31,-63,-56v-16,-61,47,-103,83,-121v82,-42,118,-45,200,-60v21,-4,36,34,11,37v-90,11,-148,31,-225,77v-12,8,-23,20,-30,36xm172,18v29,4,47,14,53,35v-2,7,-14,31,-27,31v-28,7,-55,9,-84,14v-18,-5,-13,-32,7,-32v21,0,55,-5,69,-13v-16,-14,-63,10,-50,-35v9,-10,1,-27,23,-29v7,8,11,16,9,29\",\n            \"w\": 331\n        },\n        \"\\u00c8\": {\n            \"d\": \"49,-160v1,-4,-10,-9,-15,-8v-15,-35,32,-30,57,-31r142,-8v2,1,30,7,40,10v-52,16,-133,17,-190,30v-7,9,-12,24,-15,47v26,10,102,-6,141,3v1,3,1,6,2,10v-36,18,-92,12,-149,21v-11,9,-16,41,-16,51v55,-1,111,-21,168,-13v15,-8,48,1,31,18v-53,16,-130,13,-198,29r-39,-8v-4,-19,17,-53,20,-76v-1,0,-7,-11,-9,-18v18,-7,22,-28,30,-57xm184,-236v6,9,5,13,0,23v-28,-7,-62,-21,-100,-41v-3,-2,-3,-27,5,-23v34,11,60,25,95,41\",\n            \"w\": 252\n        },\n        \"\\u00c9\": {\n            \"d\": \"49,-160v1,-4,-10,-9,-15,-8v-15,-35,32,-30,57,-31r142,-8v2,1,30,7,40,10v-52,16,-133,17,-190,30v-7,9,-12,24,-15,47v26,10,102,-6,141,3v1,3,1,6,2,10v-36,18,-92,12,-149,21v-11,9,-16,41,-16,51v55,-1,111,-21,168,-13v15,-8,48,1,31,18v-53,16,-130,13,-198,29r-39,-8v-4,-19,17,-53,20,-76v-1,0,-7,-11,-9,-18v18,-7,22,-28,30,-57xm133,-248v27,-11,48,-32,59,-14v3,11,-79,52,-88,53v-14,1,-16,-11,-12,-21v10,-4,23,-11,41,-18\",\n            \"w\": 252\n        },\n        \"\\u00ca\": {\n            \"d\": \"49,-160v1,-4,-10,-9,-15,-8v-15,-35,32,-30,57,-31r142,-8v2,1,30,7,40,10v-52,16,-133,17,-190,30v-7,9,-12,24,-15,47v26,10,102,-6,141,3v1,3,1,6,2,10v-36,18,-92,12,-149,21v-11,9,-16,41,-16,51v55,-1,111,-21,168,-13v15,-8,48,1,31,18v-53,16,-130,13,-198,29r-39,-8v-4,-19,17,-53,20,-76v-1,0,-7,-11,-9,-18v18,-7,22,-28,30,-57xm199,-211v-27,-6,-39,-26,-60,-37v-21,7,-40,47,-65,22v-2,-7,-2,-7,-4,-13v18,-5,44,-31,61,-43v27,6,41,22,62,37v12,9,18,17,18,25v0,6,-4,9,-12,9\",\n            \"w\": 252\n        },\n        \"\\u00cb\": {\n            \"d\": \"49,-160v1,-4,-10,-9,-15,-8v-15,-35,32,-30,57,-31r142,-8v2,1,30,7,40,10v-52,16,-133,17,-190,30v-7,9,-12,24,-15,47v26,10,102,-6,141,3v1,3,1,6,2,10v-36,18,-92,12,-149,21v-11,9,-17,41,-17,51v55,0,112,-21,169,-13v15,-8,48,1,31,18v-53,16,-130,13,-198,29r-39,-8v-3,-21,17,-53,20,-76v-1,0,-7,-11,-9,-18v18,-7,22,-28,30,-57xm191,-236v0,8,-4,13,-12,13v-17,0,-19,-19,-16,-34v18,-1,29,1,28,21xm95,-261v7,3,29,9,28,18v0,7,-9,17,-18,17v-18,0,-26,-25,-10,-35\",\n            \"w\": 252\n        },\n        \"\\u00cc\": {\n            \"d\": \"33,-5v-9,-6,-9,-12,-9,-36v0,-71,8,-119,22,-144v8,-13,14,-20,19,-20v27,20,-11,87,-10,120r-15,76v-1,1,-4,2,-7,4xm72,-247v7,6,55,15,36,40v-28,-7,-61,-21,-99,-41v-3,-2,-3,-27,5,-23v18,3,41,17,58,24\",\n            \"w\": 111\n        },\n        \"\\u00cd\": {\n            \"d\": \"26,-5v-9,-6,-9,-12,-9,-36v0,-71,7,-119,21,-144v8,-13,14,-20,19,-20v28,19,-7,89,-10,120v-2,21,-8,47,-14,76v-2,1,-2,0,-7,4xm6,-233v31,-6,83,-53,101,-31v2,11,-80,53,-89,53v-14,1,-14,-11,-12,-22\",\n            \"w\": 104\n        },\n        \"\\u00ce\": {\n            \"d\": \"53,-9v-15,7,-16,-3,-16,-32v0,-71,7,-119,21,-144v8,-13,14,-20,19,-20v28,19,-7,89,-10,120v-2,21,-8,47,-14,76xm137,-209v-27,-6,-40,-26,-61,-37v-8,0,-9,4,-13,10v-11,13,-50,37,-56,0v18,-5,43,-32,61,-43v28,5,40,21,62,36v12,9,18,17,18,25v0,6,-4,9,-11,9\",\n            \"w\": 144\n        },\n        \"\\u00cf\": {\n            \"d\": \"33,-5v-9,-6,-9,-12,-9,-36v0,-71,8,-119,22,-144v8,-13,14,-20,19,-20v27,20,-11,87,-10,120r-15,76v-1,1,-4,2,-7,4xm111,-222v0,8,-4,12,-12,12v-18,0,-19,-19,-16,-33v18,-1,29,1,28,21xm15,-247v8,2,29,9,28,17v0,21,-37,24,-36,1v0,-7,2,-13,8,-18\",\n            \"w\": 110\n        },\n        \"\\u00d1\": {\n            \"d\": \"224,-182v1,-17,15,-24,22,-38v20,0,13,10,3,33v-3,36,-25,52,-28,94v-10,24,-30,55,-29,82r-19,7v-32,-8,-36,-70,-58,-111v-2,-23,-7,-27,-19,-54v-28,36,-41,93,-71,133v-9,5,-20,-9,-20,-17r73,-149v9,-24,31,-5,36,7v19,41,31,98,53,139v22,-35,34,-69,50,-118v2,-3,3,-3,7,-8xm203,-257v22,-8,41,-24,65,-26v3,11,-8,9,-7,21v-26,20,-46,31,-59,31v-2,3,-49,-27,-49,-29v-11,0,-32,31,-46,32v-11,-2,-12,-21,-4,-23v4,-6,28,-30,48,-34v17,-4,43,28,52,28\",\n            \"w\": 219\n        },\n        \"\\u00d2\": {\n            \"d\": \"62,-184v78,-31,249,-50,238,74v-6,65,-102,105,-179,115v-77,-7,-152,-71,-101,-149v2,-5,24,-33,42,-40xm279,-120v14,-38,-47,-64,-85,-61v-20,-9,-41,7,-62,0v-11,7,-54,12,-66,24v0,20,-51,35,-38,66v-1,43,50,67,96,67v44,0,162,-55,155,-96xm161,-262v14,10,52,13,37,41v-28,-7,-62,-21,-100,-41v-3,-3,-3,-26,5,-24v16,5,42,17,58,24\",\n            \"w\": 273\n        },\n        \"\\u00d3\": {\n            \"d\": \"62,-184v78,-31,249,-50,238,74v-6,65,-102,105,-179,115v-77,-7,-152,-71,-101,-149v2,-5,24,-33,42,-40xm279,-120v14,-38,-47,-64,-85,-61v-20,-9,-41,7,-62,0v-11,7,-54,12,-66,24v0,20,-51,35,-38,66v-1,43,50,67,96,67v44,0,162,-55,155,-96xm142,-250v27,-11,47,-32,59,-14v2,11,-80,53,-89,53v-13,1,-15,-11,-12,-21v10,-5,24,-11,42,-18\",\n            \"w\": 273\n        },\n        \"\\u00d4\": {\n            \"d\": \"62,-184v78,-31,249,-50,238,74v-6,65,-102,105,-179,115v-77,-7,-152,-71,-101,-149v2,-5,24,-33,42,-40xm279,-120v14,-38,-47,-64,-85,-61v-20,-9,-41,7,-62,0v-11,7,-54,12,-66,24v0,20,-51,35,-38,66v-1,43,50,67,96,67v44,0,162,-55,155,-96xm157,-282v17,18,52,34,54,63v-24,12,-52,-36,-53,-29r-42,34v-23,-4,-6,-31,5,-34v1,1,27,-37,36,-34\",\n            \"w\": 273\n        },\n        \"\\u00d5\": {\n            \"d\": \"62,-184v78,-31,249,-50,238,74v-6,65,-102,105,-179,115v-77,-7,-152,-71,-101,-149v2,-5,24,-33,42,-40xm279,-120v14,-38,-47,-64,-85,-61v-20,-9,-41,7,-62,0v-11,7,-54,12,-66,24v0,20,-51,35,-38,66v-1,43,50,67,96,67v44,0,162,-55,155,-96xm116,-270v26,-19,54,19,69,22v4,0,15,-5,34,-13v23,-10,22,-16,31,-12v3,11,-8,9,-7,21v-45,28,-47,42,-88,16v-29,-19,-12,-20,-43,2v-8,5,-12,18,-23,15v-13,-3,-12,-20,-4,-23v4,-6,14,-15,31,-28\",\n            \"w\": 273\n        },\n        \"\\u00d6\": {\n            \"d\": \"62,-184v78,-31,249,-50,238,74v-6,65,-102,105,-179,115v-77,-7,-152,-71,-101,-149v2,-5,24,-33,42,-40xm279,-120v14,-38,-47,-64,-85,-61v-20,-9,-41,7,-62,0v-11,7,-54,12,-66,24v0,20,-51,35,-38,66v-1,43,50,67,96,67v44,0,162,-55,155,-96xm197,-229v0,8,-4,13,-12,13v-17,0,-19,-19,-16,-34v18,-1,29,1,28,21xm101,-254v7,3,28,9,27,18v1,8,-8,17,-17,17v-18,0,-26,-24,-10,-35\",\n            \"w\": 273\n        },\n        \"\\u00d8\": {\n            \"d\": \"76,-211v41,-13,100,-22,140,-3v26,-19,40,-29,44,-29v10,0,15,7,15,20v0,15,-23,23,-30,35v23,39,29,114,-21,139v-36,19,-102,35,-147,18v-14,-5,-29,29,-46,35v-25,-13,-19,-24,3,-56v-9,-17,-28,-27,-28,-60v0,-38,23,-72,70,-99xm107,-66v55,15,125,-12,123,-70v0,-16,-5,-25,-13,-29r-110,95r0,4xm39,-108v-1,3,17,31,22,27v8,-6,109,-90,123,-106v-15,-11,-43,1,-63,2v-33,10,-80,35,-82,77\",\n            \"w\": 270\n        },\n        \"\\u00d9\": {\n            \"d\": \"281,-202v6,67,-30,121,-71,152v-3,14,-47,26,-60,39v-41,20,-110,1,-125,-26v-24,-44,-28,-84,-8,-127v12,-26,23,-38,37,-22v-2,2,-3,5,-3,10v-34,26,-30,116,5,134v22,32,86,-1,109,-8v38,-28,104,-64,97,-149v2,-10,7,-8,19,-3xm151,-243v14,10,54,14,37,41v-28,-7,-61,-22,-99,-42v-3,-2,-4,-25,4,-23v16,5,42,17,58,24\",\n            \"w\": 262\n        },\n        \"\\u00da\": {\n            \"d\": \"281,-202v6,67,-30,121,-71,152v-3,14,-47,26,-60,39v-41,20,-110,1,-125,-26v-24,-44,-28,-84,-8,-127v12,-26,23,-38,37,-22v-2,2,-3,5,-3,10v-34,26,-30,116,5,134v22,32,86,-1,109,-8v38,-28,104,-64,97,-149v2,-10,7,-8,19,-3xm194,-265v3,-1,11,4,11,6v3,12,-81,52,-89,54v-14,0,-13,-9,-12,-22\",\n            \"w\": 262\n        },\n        \"\\u00db\": {\n            \"d\": \"281,-202v6,67,-30,121,-71,152v-3,14,-47,26,-60,39v-41,20,-110,1,-125,-26v-24,-44,-28,-84,-8,-127v12,-26,23,-38,37,-22v-2,2,-3,5,-3,10v-34,26,-30,116,5,134v22,32,86,-1,109,-8v38,-28,104,-64,97,-149v2,-10,7,-8,19,-3xm150,-266v24,11,58,27,73,46v0,5,-3,6,-10,6v-28,2,-61,-30,-63,-25v-10,0,-57,40,-69,23v3,-10,-8,-15,8,-19v17,-1,34,-29,61,-31\",\n            \"w\": 262\n        },\n        \"\\u00dc\": {\n            \"d\": \"281,-202v6,67,-30,121,-71,152v-3,14,-47,26,-60,39v-41,20,-110,1,-125,-26v-24,-44,-28,-84,-8,-127v12,-26,23,-38,37,-22v-2,2,-3,5,-3,10v-34,26,-29,116,5,134v22,32,86,-1,109,-8v38,-28,104,-64,97,-149v2,-10,7,-8,19,-3xm197,-227v0,8,-4,13,-12,13v-18,0,-21,-20,-16,-34v18,-1,28,2,28,21xm101,-252v7,3,27,10,27,18v0,8,-9,18,-18,17v-18,-1,-24,-25,-9,-35\",\n            \"w\": 262\n        },\n        \"\\u00df\": {\n            \"d\": \"33,10v-29,4,-28,-32,-16,-70v18,-58,17,-137,56,-176v12,-24,46,-58,82,-43v20,8,47,24,47,54v0,30,-62,59,-67,90v33,23,56,33,63,63v-18,21,-22,36,-48,54v-24,17,-27,41,-53,16v-2,-19,7,-35,24,-42v15,-13,26,-22,34,-40v-13,-17,-78,-29,-56,-70v-3,-27,64,-54,66,-86v-8,-25,-41,-4,-52,8v-29,30,-47,83,-51,141v-17,25,-8,71,-29,101\"\n        },\n        \"\\u00e0\": {\n            \"d\": \"118,-53v10,4,55,41,62,47v0,7,-5,16,-12,16r-57,-28v-20,3,-40,19,-61,18v-10,2,-43,-17,-42,-36v0,-14,7,-40,27,-41v39,-26,92,-36,104,9v0,6,-2,11,-9,15v-32,-24,-64,-6,-84,11v8,15,58,-17,72,-11xm99,-137v7,6,56,14,37,40v-28,-7,-62,-21,-100,-41v-2,-3,-2,-26,5,-23v16,4,42,17,58,24\",\n            \"w\": 173\n        },\n        \"\\u00e1\": {\n            \"d\": \"118,-53v10,4,55,41,62,47v0,7,-5,16,-12,16r-57,-28v-20,3,-40,19,-61,18v-10,2,-43,-17,-42,-36v0,-14,7,-40,27,-41v39,-26,92,-36,104,9v0,6,-2,11,-9,15v-32,-24,-64,-6,-84,11v8,15,58,-17,72,-11xm32,-117v24,-3,85,-55,101,-32v3,11,-80,53,-89,53v-13,2,-14,-10,-12,-21\",\n            \"w\": 173\n        },\n        \"\\u00e2\": {\n            \"d\": \"118,-53v10,4,55,41,62,47v0,7,-5,16,-12,16r-57,-28v-20,3,-40,19,-61,18v-10,2,-43,-17,-42,-36v0,-14,7,-40,27,-41v39,-26,92,-36,104,9v0,6,-2,11,-9,15v-32,-24,-64,-6,-84,11v8,15,58,-17,72,-11xm147,-97v-27,-6,-39,-26,-60,-37v-21,7,-38,46,-65,23v-2,-5,-3,-10,-4,-14v18,-4,43,-31,61,-42v28,5,40,21,62,36v12,8,18,17,18,25v0,6,-4,9,-12,9\",\n            \"w\": 173\n        },\n        \"\\u00e3\": {\n            \"d\": \"118,-53v10,4,55,41,62,47v0,7,-5,16,-12,16r-57,-28v-20,3,-40,19,-61,18v-10,2,-43,-17,-42,-36v0,-14,7,-40,27,-41v39,-26,92,-36,104,9v0,6,-2,11,-9,15v-32,-24,-64,-6,-84,11v8,15,58,-17,72,-11xm114,-136v22,-8,41,-24,64,-26v3,11,-7,10,-7,21v-26,20,-45,30,-58,30v-3,3,-49,-26,-49,-28v-10,-1,-32,35,-51,31v-12,-32,8,-29,32,-51v24,-21,54,20,69,23\",\n            \"w\": 173\n        },\n        \"\\u00e4\": {\n            \"d\": \"118,-53v10,4,55,41,62,47v0,7,-5,16,-12,16r-57,-28v-20,3,-40,19,-61,18v-32,5,-66,-64,-15,-77v39,-26,92,-36,104,9v0,6,-3,11,-9,15v-32,-24,-64,-6,-84,11v8,15,58,-17,72,-11xm142,-119v0,8,-4,13,-12,13v-18,0,-21,-20,-16,-34v18,-1,28,2,28,21xm46,-144v7,3,28,9,27,18v1,8,-9,18,-18,17v-18,-1,-25,-25,-9,-35\",\n            \"w\": 173\n        },\n        \"\\u00e5\": {\n            \"d\": \"118,-53v10,4,55,41,62,47v0,7,-5,16,-12,16r-57,-28v-20,3,-40,19,-61,18v-10,2,-43,-17,-42,-36v0,-14,7,-40,27,-41v39,-26,92,-36,104,9v0,6,-2,11,-9,15v-32,-24,-64,-6,-84,11v8,15,58,-17,72,-11xm54,-101v-37,-20,-9,-71,34,-65v13,1,25,3,38,13v27,45,-34,73,-72,52xm61,-128v4,20,48,7,49,-5v0,-5,-9,-7,-28,-10v-12,-2,-21,11,-21,15\",\n            \"w\": 173\n        },\n        \"\\u00e6\": {\n            \"d\": \"145,-44r33,7v2,42,-59,29,-85,16v-6,7,-35,24,-48,15v-19,2,-35,-21,-33,-37v2,-24,5,-19,28,-36v-6,-8,-45,3,-33,-21v21,-22,58,-12,85,-1v6,-5,35,-28,45,-15v20,-4,36,17,36,35v0,23,-4,21,-28,37xm111,-72v12,3,49,-16,19,-17v-5,0,-20,12,-19,17xm74,-50v-14,-4,-48,16,-19,17v4,1,19,-14,19,-17\",\n            \"w\": 184\n        },\n        \"\\u00e7\": {\n            \"d\": \"108,-118v30,-6,56,21,25,33v-24,-6,-39,5,-75,23v-7,4,-12,12,-15,22v31,28,86,3,128,9v3,28,-29,16,-44,28v-53,15,-106,10,-120,-37v0,-48,62,-70,101,-78xm92,18v23,4,45,12,48,32v-2,6,-12,28,-25,28v-24,6,-50,10,-77,13v-16,-4,-11,-28,7,-29v17,-1,51,-4,63,-12v-14,-15,-57,10,-46,-32v9,-8,0,-25,21,-26v6,6,12,14,9,26\",\n            \"w\": 171\n        },\n        \"\\u00e8\": {\n            \"d\": \"108,-124v42,-3,70,39,50,73v-22,-1,-70,12,-94,10v-1,1,-2,3,-2,3v0,3,12,7,35,14v18,0,64,7,30,21v-10,14,-31,6,-53,6v-26,-7,-70,-26,-70,-58v0,-54,48,-65,104,-69xm130,-78v-2,-35,-66,-13,-77,3v16,6,62,6,77,-3xm95,-166v7,6,54,14,37,40v-28,-7,-62,-21,-100,-41v-3,-3,-3,-26,5,-24v16,5,42,18,58,25\",\n            \"w\": 161\n        },\n        \"\\u00e9\": {\n            \"d\": \"108,-124v42,-3,70,39,50,73v-22,-1,-70,12,-94,10v-1,1,-2,3,-2,3v0,3,12,7,35,14v18,0,64,7,30,21v-10,14,-31,6,-53,6v-26,-7,-70,-26,-70,-58v0,-54,48,-65,104,-69xm130,-78v-2,-35,-66,-13,-77,3v16,6,62,6,77,-3xm76,-169v26,-11,48,-32,59,-14v3,10,-80,53,-89,53v-14,1,-14,-10,-12,-21v15,-7,16,-7,42,-18\",\n            \"w\": 161\n        },\n        \"\\u00ea\": {\n            \"d\": \"108,-124v42,-3,70,39,50,73v-22,-1,-70,12,-94,10v-1,1,-2,3,-2,3v0,3,12,7,35,14v18,0,64,7,30,21v-10,14,-31,6,-53,6v-26,-7,-70,-26,-70,-58v0,-54,48,-65,104,-69xm130,-78v-2,-35,-66,-13,-77,3v16,6,62,6,77,-3xm145,-129v-27,-6,-39,-26,-60,-37v-8,0,-10,4,-14,10v-11,15,-51,34,-56,0v17,-4,44,-32,61,-43v28,5,41,21,63,36v12,8,17,17,17,25v0,6,-3,9,-11,9\",\n            \"w\": 161\n        },\n        \"\\u00eb\": {\n            \"d\": \"108,-124v42,-3,70,39,50,73v-22,-1,-70,12,-94,10r-3,3v0,3,12,7,36,14v18,0,64,7,30,21v-10,14,-31,6,-53,6v-26,-7,-67,-27,-71,-58v7,-52,48,-65,105,-69xm130,-78v-2,-35,-66,-13,-77,3v16,6,62,6,77,-3xm140,-144v0,8,-4,12,-12,12v-18,0,-19,-19,-16,-33v18,-1,29,1,28,21xm44,-169v7,3,28,9,28,17v0,9,-9,18,-18,18v-18,0,-25,-24,-10,-35\",\n            \"w\": 161\n        },\n        \"\\u00ec\": {\n            \"d\": \"57,-98v22,5,13,50,11,95v-7,1,-11,2,-20,-4v1,-7,-12,-18,-10,-24v4,-22,-2,-64,19,-67xm70,-139v14,10,54,14,37,41v-28,-7,-61,-22,-99,-42v-3,-2,-3,-25,5,-23v15,5,41,17,57,24\",\n            \"w\": 109\n        },\n        \"\\u00ed\": {\n            \"d\": \"59,-98v20,4,15,53,10,95v-6,1,-11,2,-19,-4v1,-7,-12,-18,-10,-24v4,-22,-4,-65,19,-67xm50,-139v27,-11,49,-32,59,-14v3,11,-80,53,-89,53v-14,1,-14,-12,-11,-22v15,-7,14,-6,41,-17\",\n            \"w\": 105\n        },\n        \"\\u00ee\": {\n            \"d\": \"72,-98v20,5,12,51,10,95v-6,2,-13,1,-20,-4v1,-8,-12,-18,-10,-24v4,-22,-3,-65,20,-67xm134,-94v-26,-7,-39,-25,-60,-37v-7,0,-9,4,-13,10v-14,15,-51,34,-56,-1v18,-4,45,-33,61,-43v27,6,40,22,62,37v12,8,18,17,18,25v0,6,-4,9,-12,9\",\n            \"w\": 143\n        },\n        \"\\u00ef\": {\n            \"d\": \"55,-97v19,5,15,53,10,95v-17,5,-26,-14,-30,-28v6,-20,-3,-65,20,-67xm110,-118v0,8,-4,13,-12,13v-17,0,-19,-19,-16,-34v18,-1,29,1,28,21xm14,-143v6,3,28,8,28,17v0,9,-9,18,-18,18v-18,0,-25,-24,-10,-35\",\n            \"w\": 107\n        },\n        \"\\u00f1\": {\n            \"d\": \"115,-129v34,6,59,50,59,105v0,31,-15,24,-30,17v-15,-29,-5,-42,-20,-81v-35,-13,-68,52,-88,61v-20,-4,-38,-36,-19,-59v0,-12,3,-14,10,-28v11,-8,18,11,27,12xm117,-166v22,-7,41,-23,64,-26v3,11,-7,10,-7,21v-26,20,-45,30,-58,30v-3,3,-49,-26,-49,-28v-10,-1,-32,35,-51,31v-5,-12,-8,-16,0,-23v4,-6,28,-29,48,-33v17,-3,43,28,53,28\",\n            \"w\": 171\n        },\n        \"\\u00f2\": {\n            \"d\": \"102,-132v50,-20,99,16,99,60v0,54,-60,64,-108,79v-50,-2,-110,-48,-76,-100v22,-17,49,-33,85,-39xm136,-104v-34,0,-91,27,-94,47v16,51,125,16,125,-22v0,-17,-10,-25,-31,-25xm115,-181v14,10,51,13,37,40v-28,-7,-62,-21,-100,-41v-3,-2,-3,-26,5,-23v16,5,42,17,58,24\",\n            \"w\": 191\n        },\n        \"\\u00f3\": {\n            \"d\": \"102,-132v50,-20,99,16,99,60v0,54,-60,64,-108,79v-50,-2,-110,-48,-76,-100v22,-17,49,-33,85,-39xm136,-104v-34,0,-91,27,-94,47v16,51,125,16,125,-22v0,-17,-10,-25,-31,-25xm49,-154v24,-3,85,-55,101,-32v3,11,-80,53,-89,53v-14,0,-13,-8,-12,-21\",\n            \"w\": 191\n        },\n        \"\\u00f4\": {\n            \"d\": \"102,-132v50,-20,99,16,99,60v0,54,-60,64,-108,79v-50,-2,-110,-48,-76,-100v22,-17,49,-33,85,-39xm136,-104v-34,0,-91,27,-94,47v16,51,125,16,125,-22v0,-17,-10,-25,-31,-25xm110,-177v-22,6,-38,45,-65,22v-2,-4,-3,-9,-4,-13v18,-4,43,-32,61,-43v27,6,40,21,62,36v12,9,18,17,18,25v1,11,-15,10,-23,7\",\n            \"w\": 191\n        },\n        \"\\u00f5\": {\n            \"d\": \"102,-132v50,-20,99,16,99,60v0,54,-60,64,-108,79v-50,-2,-110,-48,-76,-100v22,-17,49,-33,85,-39xm136,-104v-34,0,-91,27,-94,47v16,51,125,16,125,-22v0,-17,-10,-25,-31,-25xm58,-199v26,-21,54,18,69,22v4,0,15,-5,34,-13v22,-9,21,-16,31,-13v3,11,-9,9,-7,22v-26,20,-46,30,-59,30v-2,4,-49,-28,-49,-29v-11,0,-32,31,-46,32v-12,-3,-13,-21,-4,-23v4,-6,14,-15,31,-28\",\n            \"w\": 191\n        },\n        \"\\u00f6\": {\n            \"d\": \"102,-132v50,-20,99,16,99,60v0,54,-60,64,-108,79v-50,-2,-110,-48,-76,-100v22,-17,49,-33,85,-39xm136,-104v-34,0,-91,27,-94,47v16,51,125,16,125,-22v0,-17,-10,-25,-31,-25xm161,-160v0,8,-4,13,-12,13v-17,0,-19,-19,-16,-34v18,-1,29,1,28,21xm65,-185v7,3,28,9,28,18v0,7,-9,18,-18,17v-18,1,-25,-24,-10,-35\",\n            \"w\": 191\n        },\n        \"\\u00f7\": {\n            \"d\": \"167,-158v-4,3,-7,9,-10,20v-23,4,-34,-8,-29,-31v14,-6,18,1,39,11xm78,-72v-53,11,-53,12,-69,-15v-1,-12,11,-17,22,-14v71,-13,151,-18,230,-24v11,1,21,16,23,28v-28,20,-90,11,-126,16v-36,5,-62,5,-80,9xm123,-40v19,-17,41,-1,41,17v0,13,-6,19,-17,19v-15,0,-29,-14,-24,-36\",\n            \"w\": 293\n        },\n        \"\\u00f8\": {\n            \"d\": \"76,-136v17,7,33,-8,51,0v9,-6,21,-13,36,-21v23,22,-13,31,3,50v11,13,4,21,14,35v-4,5,-1,14,-4,23v-14,23,-45,41,-84,39v-12,2,-29,28,-41,38v-2,-11,-34,-10,-15,-30v3,-7,5,-11,5,-11v-15,-24,-60,-54,-22,-89v23,-21,25,-32,57,-34xm102,-54v18,1,50,-19,30,-32v-12,7,-22,18,-30,32xm85,-92v-14,3,-26,8,-38,17v2,20,17,13,26,0v6,-8,12,-13,12,-17\",\n            \"w\": 188\n        },\n        \"\\u00f9\": {\n            \"d\": \"196,-129v-1,-4,12,-13,15,-13v6,0,8,7,8,21v0,24,-7,25,-13,45v-7,7,-14,21,-24,29v-9,24,-61,45,-89,45v-63,0,-105,-72,-67,-126v24,-3,19,27,18,46v-1,26,23,42,54,40v38,-3,88,-51,98,-87xm126,-166v7,6,56,14,37,40v-28,-7,-62,-22,-100,-42v-2,-3,-2,-26,5,-23v16,4,42,18,58,25\",\n            \"w\": 213\n        },\n        \"\\u00fa\": {\n            \"d\": \"196,-129v-1,-4,12,-13,15,-13v6,0,8,7,8,21v0,24,-7,25,-13,45v-7,7,-14,21,-24,29v-9,24,-61,45,-89,45v-63,0,-105,-72,-67,-126v24,-3,19,27,18,46v-1,26,23,42,54,40v38,-3,88,-51,98,-87xm106,-174v26,-11,48,-32,59,-14v3,11,-81,53,-89,54v-13,1,-15,-12,-11,-22v15,-7,14,-7,41,-18\",\n            \"w\": 213\n        },\n        \"\\u00fb\": {\n            \"d\": \"196,-129v-1,-4,12,-13,15,-13v6,0,8,7,8,21v0,24,-7,25,-13,45v-7,7,-14,21,-24,29v-9,24,-61,45,-89,45v-63,0,-105,-72,-67,-126v24,-3,19,27,18,46v-1,26,23,42,54,40v38,-3,88,-51,98,-87xm172,-143v-27,-6,-39,-26,-60,-37v-8,0,-10,4,-14,10v-11,15,-49,35,-56,0v17,-4,44,-32,61,-43v27,6,41,21,63,36v12,9,17,17,17,25v0,6,-3,9,-11,9\",\n            \"w\": 213\n        },\n        \"\\u00fc\": {\n            \"d\": \"196,-129v-1,-4,12,-13,15,-13v6,0,8,7,8,21v0,24,-7,25,-13,45v-7,7,-14,21,-24,29v-9,24,-61,45,-89,45v-63,0,-105,-72,-67,-126v24,-3,19,27,18,46v-1,26,23,42,54,40v38,-3,88,-51,98,-87xm168,-161v0,8,-3,13,-11,13v-17,0,-20,-19,-17,-34v18,-1,29,1,28,21xm72,-186v7,3,29,9,28,18v0,7,-9,18,-18,17v-18,1,-25,-24,-10,-35\",\n            \"w\": 213\n        },\n        \"\\u00ff\": {\n            \"d\": \"118,85v-11,11,-11,38,-22,61v-2,-1,-2,31,-17,27v-11,0,-21,-10,-21,-22v20,-66,23,-61,64,-168v-22,1,-38,16,-58,4v-22,4,-51,-16,-51,-42v-11,-13,-7,-59,7,-58v16,1,21,24,22,51v21,33,66,5,94,-7v4,-3,26,-14,38,-29r17,0v23,44,-23,59,-34,102v-6,9,-13,9,-13,26v-15,6,-12,33,-27,48v0,2,1,4,1,7xm158,-136v0,8,-4,13,-12,13v-18,0,-21,-20,-16,-34v18,-1,29,1,28,21xm62,-161v7,3,28,9,27,18v1,8,-8,17,-17,17v-18,0,-26,-24,-10,-35\",\n            \"w\": 190\n        },\n        \"\\u0131\": {\n            \"d\": \"43,-103v21,4,16,56,11,100v-7,2,-11,1,-20,-5v0,-7,-13,-18,-11,-25v4,-23,-3,-68,20,-70\",\n            \"w\": 80\n        },\n        \"\\u0152\": {\n            \"d\": \"247,-243v71,4,161,-7,245,-8v17,0,27,6,27,17v-8,27,-70,14,-104,23v-3,1,-52,0,-65,7r0,4v16,16,17,29,17,65v32,10,74,-14,99,16v-14,25,-76,17,-127,24v-17,18,-55,32,-75,51v85,0,128,-3,204,-11v15,-2,21,11,20,29v-78,24,-177,12,-270,24v-24,3,-24,-29,-48,-15v-46,7,-70,4,-105,-4v-19,-18,-42,-22,-52,-55v-10,-34,0,-47,12,-78v-18,-59,48,-78,105,-84v17,-18,103,-13,117,-5xm125,-45v76,-9,186,-43,209,-105v-26,-67,-137,-83,-217,-54v3,34,-45,25,-60,58v-41,48,5,108,68,101\",\n            \"w\": 492\n        },\n        \"\\u0153\": {\n            \"d\": \"185,-54v25,28,107,-17,104,33v-12,12,-60,14,-87,14v0,0,1,1,2,1v-11,1,-39,-9,-50,-17v-28,17,-75,32,-114,7v-22,-14,-34,-11,-34,-41v0,-36,33,-49,48,-75v29,-16,72,-3,95,11v12,-9,48,-27,59,-26v30,0,64,15,65,40v0,7,-6,20,-20,37v-29,1,-44,11,-68,16xm226,-106v-21,-7,-41,-2,-48,13v14,1,42,-7,48,-13xm132,-87v-21,-35,-94,11,-92,24v-2,14,43,21,61,21v25,0,36,-20,31,-45\",\n            \"w\": 295\n        },\n        \"\\u0178\": {\n            \"d\": \"176,-189v35,20,-25,54,-39,72v-26,34,-57,57,-74,104v-10,15,-4,14,-23,3r0,-10v19,-44,27,-46,50,-81v-9,-5,-24,4,-34,4v-38,0,-54,-50,-44,-87v21,-5,18,19,22,35v4,18,15,27,29,27v41,0,60,-39,113,-67xm153,-222v0,8,-3,12,-11,12v-18,0,-21,-19,-16,-33v18,-1,28,2,27,21xm57,-247v8,2,29,9,28,17v0,21,-37,24,-36,1v0,-7,2,-13,8,-18\",\n            \"w\": 135\n        },\n        \"\\u0192\": {\n            \"d\": \"115,-262v-23,6,-39,63,-38,96v1,3,57,2,54,16v1,22,-45,15,-51,30v3,34,12,68,10,103v14,17,-18,53,-28,63v-48,8,-89,5,-95,-37v20,-5,77,21,83,-18v17,-29,-4,-61,0,-98v0,-5,-3,-10,-7,-17v-33,4,-43,-17,-25,-37v10,-4,27,5,27,-10v0,-43,15,-77,32,-109v12,-7,16,-22,38,-20v11,1,51,35,25,55v-9,1,-16,-17,-25,-17\",\n            \"w\": 145\n        },\n        \"\\u02c6\": {\n            \"d\": \"144,-220v-29,0,-41,-27,-63,-39v-8,0,-11,5,-15,11v-17,12,-32,31,-54,13v-2,-5,-3,-9,-4,-14v20,-5,45,-33,64,-45v28,6,43,23,65,38v12,9,19,19,19,27v0,6,-4,9,-12,9\",\n            \"w\": 165\n        },\n        \"\\u02c7\": {\n            \"d\": \"39,-286v33,46,63,-4,96,-16v6,0,9,6,9,19v0,24,-49,46,-77,46v-32,0,-52,-28,-59,-48v0,-25,23,-17,31,-1\",\n            \"w\": 153\n        },\n        \"\\u02d8\": {\n            \"d\": \"65,-269v20,-11,45,-31,74,-36v20,30,-42,40,-59,66v-5,6,-11,8,-18,8v-8,-3,-45,-32,-51,-54v5,-24,14,-13,34,1\",\n            \"w\": 158\n        },\n        \"\\u02d9\": {\n            \"d\": \"23,-302v15,-13,32,1,32,18v1,22,-36,29,-39,4v0,0,3,-7,7,-22\",\n            \"w\": 70\n        },\n        \"\\u02da\": {\n            \"d\": \"23,-225v-43,-24,-11,-85,41,-78v16,2,31,4,46,17v32,54,-41,86,-87,61xm33,-257v2,20,57,11,57,-6v0,-6,-11,-9,-33,-12v-14,-2,-24,13,-24,18\",\n            \"w\": 123\n        },\n        \"\\u02db\": {\n            \"d\": \"82,-5v-8,12,-16,55,-21,75v0,4,2,7,7,7v6,0,22,-7,50,-20v8,0,12,7,12,20v-2,22,-6,14,-27,30v-15,12,-26,16,-30,16v-47,-8,-59,-14,-56,-75v8,-27,12,-54,25,-77v19,-21,35,15,40,24\",\n            \"w\": 138\n        },\n        \"\\u02dc\": {\n            \"d\": \"47,-300v26,-21,57,19,72,23v4,0,16,-5,36,-14v24,-10,22,-16,32,-13v3,12,-7,11,-7,23v-27,21,-48,32,-62,32v-3,2,-52,-27,-51,-31v-12,-2,-34,40,-54,33v-4,-13,-8,-18,1,-24v5,-7,16,-15,33,-29\",\n            \"w\": 186\n        },\n        \"\\u02dd\": {\n            \"d\": \"91,-249v15,-11,38,-53,57,-29v0,9,0,14,-3,23v-2,3,-20,22,-54,55v-5,5,-10,8,-16,8v-17,2,-6,-22,-7,-31v-1,0,-2,0,-4,1v-17,21,-29,31,-50,27v-5,-18,-3,-15,3,-27v23,-27,40,-46,48,-59v7,-12,31,3,29,9v-1,14,-3,24,-13,31v4,4,9,-1,10,-8\",\n            \"w\": 151\n        },\n        \"\\u2013\": {\n            \"d\": \"6,-66v-8,-72,79,-21,146,-39v37,-10,79,7,111,0v9,8,14,13,14,17v2,26,-72,13,-99,21v-83,4,-124,21,-172,1\",\n            \"w\": 282\n        },\n        \"\\u2014\": {\n            \"d\": \"175,-106v86,-9,201,1,286,-1v11,6,13,11,6,30v-118,15,-246,10,-377,10v-25,0,-73,3,-82,-8r-2,-26v11,-13,32,-9,52,-7v38,3,84,-5,117,2\",\n            \"w\": 485\n        },\n        \"\\u2018\": {\n            \"d\": \"73,-262v-10,7,-41,39,-38,69v-15,13,-27,-16,-28,-28v-2,-20,51,-83,66,-83v20,0,25,41,0,42\",\n            \"w\": 95\n        },\n        \"\\u2019\": {\n            \"d\": \"74,-300v13,31,-1,99,-44,101v-13,0,-19,-5,-19,-15v6,-10,31,-34,35,-59v2,-11,1,-32,11,-32v6,0,11,2,17,5\",\n            \"w\": 90\n        },\n        \"\\u201a\": {\n            \"d\": \"25,63v-26,21,-48,-2,-22,-24v14,-12,35,-40,35,-69v3,-2,3,-11,12,-9v35,17,5,88,-25,102\",\n            \"w\": 97\n        },\n        \"\\u201c\": {\n            \"d\": \"66,-261v-21,5,-37,51,-22,77v0,4,-2,6,-7,6v-31,-9,-38,-62,-12,-94v12,-15,21,-28,31,-34v16,-1,19,24,22,34v10,-11,22,-32,43,-23v-2,8,4,16,5,19v-6,11,-51,53,-29,74v-12,21,-30,5,-33,-17v-6,-13,9,-28,2,-42\",\n            \"w\": 118\n        },\n        \"\\u201d\": {\n            \"d\": \"120,-294v12,3,30,26,19,34v2,15,-40,70,-55,66v-40,-10,10,-51,14,-64v3,-3,8,-31,22,-36xm70,-306v14,3,26,34,16,49v-19,30,-31,45,-58,59v-12,-11,-33,-17,-7,-36v13,-19,36,-27,36,-59v0,-5,9,-13,13,-13\",\n            \"w\": 148\n        },\n        \"\\u201e\": {\n            \"d\": \"25,63v-26,21,-48,-2,-22,-24v11,-9,36,-41,35,-69v3,-2,4,-12,12,-9v36,14,5,89,-25,102xm84,64v-24,20,-45,-1,-21,-24v21,-20,32,-35,35,-69v3,-2,3,-11,12,-9v36,17,9,86,-26,102\",\n            \"w\": 135\n        },\n        \"\\u2020\": {\n            \"d\": \"22,-286v15,6,5,-20,19,-19v9,-3,15,21,17,22v6,1,12,3,20,6v3,10,5,16,-9,16v-34,-10,-6,51,-34,52v-20,-7,11,-47,-15,-49v-14,3,-25,-5,-17,-24v7,-2,14,-4,19,-4\",\n            \"w\": 77\n        },\n        \"\\u2021\": {\n            \"d\": \"102,-284v16,2,42,-2,33,18v-7,15,-42,1,-38,30v3,3,31,1,30,11v4,15,-29,19,-36,24v-2,18,-4,24,-16,29r-25,-26v-25,7,-53,3,-42,-25v4,-10,70,0,51,-22v-17,4,-41,12,-39,-15v-5,-16,39,-18,44,-20v4,-2,7,-10,10,-24v19,-3,23,6,28,20\",\n            \"w\": 145\n        },\n        \"\\u2022\": {\n            \"d\": \"130,-114v0,47,-124,54,-120,-8r6,-31v44,-28,64,-34,104,0v8,6,10,20,10,39\",\n            \"w\": 139\n        },\n        \"\\u2026\": {\n            \"d\": \"244,-24v-1,21,-38,32,-41,3v-2,-19,23,-22,34,-17v0,7,0,15,7,14xm113,-24v0,-22,28,-21,38,-8v5,34,-39,40,-38,8xm35,-2v-10,-2,-36,-17,-18,-29v-1,-15,17,-17,31,-6v7,17,6,33,-13,35\",\n            \"w\": 258\n        },\n        \"\\u2030\": {\n            \"d\": \"398,-131v58,-1,87,13,72,65v-1,30,-66,63,-99,65v-56,3,-99,-58,-62,-102v2,2,5,2,8,2v20,-16,51,-17,81,-30xm202,-279v33,0,94,-24,95,18v-7,31,-33,27,-54,55v-36,32,-71,74,-112,99v-18,18,-40,34,-51,58v-19,14,-25,37,-56,40v-17,2,-25,-29,-10,-40v15,-11,40,-37,52,-52r87,-72v-51,13,-100,6,-116,-27v1,-5,-6,-30,-9,-36v-3,-5,22,-41,27,-39v29,2,16,34,5,49v0,15,14,23,42,23v42,0,59,-31,28,-38v-17,-4,-53,3,-50,-23v0,-7,1,-12,4,-16v16,-9,36,4,49,5v0,0,23,-4,69,-4xm222,-118v33,-2,55,18,50,57v-29,36,-48,45,-96,50v-27,-5,-56,-17,-58,-51v13,-37,64,-43,104,-56xm335,-61v13,44,101,7,108,-31v-11,-3,-20,-4,-30,-4v-18,-1,-82,18,-78,35xm225,-244v-18,0,-29,-1,-46,3v7,15,6,28,0,43v15,-14,34,-30,46,-46xm164,-53v26,5,59,-10,76,-26v-17,-16,-49,2,-67,14v1,8,-8,6,-9,12\",\n            \"w\": 485\n        },\n        \"\\u2039\": {\n            \"d\": \"64,-107v9,17,86,17,87,43v0,11,-4,16,-13,16v-36,-11,-70,-22,-109,-31v-19,-4,-18,-14,-9,-36v59,-56,93,-84,101,-84v17,0,19,20,13,29\",\n            \"w\": 159\n        },\n        \"\\u203a\": {\n            \"d\": \"41,-181v26,27,112,44,70,91r-82,60v-20,3,-25,-23,-13,-32r70,-51r-66,-46v-5,-6,-4,-28,5,-29v4,2,9,4,16,7\",\n            \"w\": 137\n        },\n        \"\\u2044\": {\n            \"d\": \"193,-305v7,6,17,31,3,41v-10,7,-12,13,-21,25v-79,56,-190,209,-197,260r-18,0v-23,-19,9,-70,15,-85v52,-83,121,-179,218,-241\",\n            \"w\": 120\n        },\n        \"\\u2122\": {\n            \"d\": \"213,-307v28,9,11,49,7,75v-1,4,-4,6,-11,6v-7,1,-11,-14,-11,-34v-14,-6,-34,34,-46,28v-2,0,-10,-9,-24,-27v-10,7,-3,36,-27,31v-15,-24,-3,-27,1,-48v-6,-7,-27,-1,-31,3v-3,14,-7,30,-11,51v-5,10,-29,9,-24,-12v-5,-8,1,-18,3,-35v-13,6,-33,2,-29,-18v20,-17,64,-17,100,-19v28,-1,29,30,45,39v11,-6,35,-32,58,-40\",\n            \"w\": 239\n        },\n        \"\\u2206\": {\n            \"d\": \"18,-1v-24,-30,8,-48,25,-71v14,-19,34,-28,40,-56v20,-35,29,-14,57,4v9,39,43,62,57,102v0,16,-34,17,-50,14v-28,2,-72,4,-129,7xm139,-47r-22,-52v-12,-5,-12,15,-24,27v-7,6,-14,16,-23,28v23,1,36,-1,69,-3\",\n            \"w\": 199\n        },\n        \"\\u2219\": {\n            \"d\": \"57,-77v6,18,-7,21,-19,23v-34,6,-25,-40,-9,-43v18,-3,29,8,28,20\",\n            \"w\": 67\n        },\n        \"\\u221a\": {\n            \"d\": \"364,-218v43,-21,80,-51,104,-32v-3,19,-24,21,-44,40v-41,15,-78,53,-136,78r-137,98v-20,16,-79,66,-91,68v-3,1,-25,-11,-24,-13v-4,-28,-43,-61,-30,-85v26,-15,42,19,58,32r295,-188v0,1,2,2,5,2\",\n            \"w\": 474\n        },\n        \"\\u221e\": {\n            \"d\": \"322,-72v-4,22,-54,41,-76,41v-43,0,-83,-17,-114,-35v-46,19,-125,53,-128,-18v-1,-14,10,-22,13,-35v29,-10,62,-31,97,-4v37,28,47,5,75,-8v40,-19,73,-10,114,1v13,1,18,55,19,58xm228,-69v15,0,62,-12,61,-25v-19,-23,-89,-10,-105,11v0,2,1,4,2,4v28,6,42,10,42,10xm75,-102v-13,2,-41,4,-44,19v0,4,3,7,10,7v21,0,40,-6,54,-17v-9,-6,-16,-9,-20,-9\",\n            \"w\": 330\n        },\n        \"\\u222b\": {\n            \"d\": \"62,-151v-7,-70,20,-130,63,-150v28,1,39,10,70,23v20,8,6,33,-6,35v-29,-13,-45,-20,-49,-20v-20,-4,-45,51,-43,70v8,60,5,129,5,189v0,62,-27,93,-79,93v-37,-1,-71,-14,-63,-57v21,0,79,34,91,-2v16,-3,14,-64,21,-85v-2,-31,-1,-74,-10,-96\",\n            \"w\": 156\n        },\n        \"\\u2248\": {\n            \"d\": \"133,-112v21,15,48,-30,78,-17v3,3,5,7,5,9v-8,30,-47,45,-76,45v-19,0,-64,-48,-90,-21r-29,20v-6,-1,-17,-16,-15,-32v24,-17,70,-42,107,-21v4,4,10,9,20,17xm138,-57v28,2,48,-25,76,-26v13,30,-21,42,-40,53v-41,24,-77,-15,-114,-23v-15,14,-46,32,-49,-1v-3,-9,27,-28,54,-30\",\n            \"w\": 223\n        },\n        \"\\u2260\": {\n            \"d\": \"48,-130v29,11,49,-57,60,-50v25,6,7,27,-1,46v22,5,29,7,21,22v-18,2,-48,-1,-50,15v9,8,53,-7,54,10v-4,22,-46,20,-72,24v-7,13,-18,32,-34,57v-8,6,-15,-3,-13,-14v-1,-9,15,-39,14,-45v-30,5,-24,-17,-13,-25v12,-1,36,4,29,-13v-14,0,-47,6,-36,-12v0,-18,27,-13,41,-15\",\n            \"w\": 140\n        },\n        \"\\u2264\": {\n            \"d\": \"73,-109v10,15,87,16,87,42v0,11,-5,16,-13,16v-36,-11,-69,-24,-109,-31v-18,-8,-18,-13,-9,-36v59,-56,93,-83,101,-83v16,0,18,17,14,28v-27,24,-42,35,-71,64xm10,-29v35,-12,117,-26,148,-3v1,2,-5,19,-8,18r-124,15v-16,2,-26,-18,-16,-30\",\n            \"w\": 168\n        },\n        \"\\u2265\": {\n            \"d\": \"115,-174v20,7,53,36,20,57v-19,11,-91,68,-82,59v-18,3,-25,-22,-13,-31v15,-10,14,-10,70,-51r-50,-37v-5,-4,-5,-27,4,-28v16,7,40,17,51,31xm14,-32v33,-10,86,-14,127,-10v12,12,5,23,-11,27v-49,9,-82,13,-99,13v-22,0,-24,-16,-17,-30\",\n            \"w\": 163\n        },\n        \"\\u25ca\": {\n            \"d\": \"76,-158v48,-8,64,11,100,36v28,19,-5,39,-22,54v-15,13,-40,32,-48,49v-17,5,-12,0,-27,-16v-6,-6,-86,-31,-68,-53r2,-9v27,-23,48,-44,63,-61xm93,-65v12,-2,35,-31,41,-38v-5,-10,-16,-14,-34,-24v-12,12,-36,29,-40,44v19,11,30,18,33,18\",\n            \"w\": 199\n        }\n    }\n});\n}\n/** js sequence diagrams\n *  https://bramp.github.io/js-sequence-diagrams/\n *  (c) 2012-2017 Andrew Brampton (bramp.net)\n *  Simplified BSD license.\n */\n/*global Diagram, _ */\n\nif (typeof Raphael == 'undefined' && typeof Snap == 'undefined') {\n  throw new Error('Raphael or Snap.svg is required to be included.');\n}\n\nif (_.isEmpty(Diagram.themes)) {\n  // If you are using stock js-sequence-diagrams you should never see this. This only\n  // happens if you have removed the built in themes.\n  throw new Error('No themes were registered. Please call registerTheme(...).');\n}\n\n// Set the default hand/simple based on which theme is available.\nDiagram.themes.hand = Diagram.themes.snapHand || Diagram.themes.raphaelHand;\nDiagram.themes.simple = Diagram.themes.snapSimple || Diagram.themes.raphaelSimple;\n\n/* Draws the diagram. Creates a SVG inside the container\n* container (HTMLElement|string) DOM element or its ID to draw on\n* options (Object)\n*/\nDiagram.prototype.drawSVG = function(container, options) {\n  var defaultOptions = {\n    theme: 'hand'\n  };\n\n  options = _.defaults(options || {}, defaultOptions);\n\n  if (!(options.theme in Diagram.themes)) {\n    throw new Error('Unsupported theme: ' + options.theme);\n  }\n\n  // TODO Write tests for this check\n  var div = _.isString(container) ? document.getElementById(container) : container;\n  if (div === null || !div.tagName) {\n    throw new Error('Invalid container: ' + container);\n  }\n\n  var Theme = Diagram.themes[options.theme];\n  new Theme(this, options, function(drawing) {\n      drawing.draw(div);\n    });\n}; // end of drawSVG\n/** js sequence diagrams\n *  https://bramp.github.io/js-sequence-diagrams/\n *  (c) 2012-2017 Andrew Brampton (bramp.net)\n *  Simplified BSD license.\n */\n/*global jQuery */\nif (typeof jQuery != 'undefined') {\n  (function($) {\n    $.fn.sequenceDiagram = function(options) {\n      return this.each(function() {\n        var $this = $(this);\n        var diagram = Diagram.parse($this.text());\n        $this.html('');\n        diagram.drawSVG(this, options);\n      });\n    };\n  })(jQuery);\n}\n\n// Taken from underscore.js:\n// Establish the root object, `window` (`self`) in the browser, or `global` on the server.\n// We use `self` instead of `window` for `WebWorker` support.\nvar root = (typeof self == 'object' && self.self == self && self) ||\n (typeof global == 'object' && global.global == global && global);\n\n// Export the Diagram object for **Node.js**, with\n// backwards-compatibility for their old module API. If we're in\n// the browser, add `Diagram` as a global object.\nif (typeof exports !== 'undefined') {\n  if (typeof module !== 'undefined' && module.exports) {\n    exports = module.exports = Diagram;\n  }\n  exports.Diagram = Diagram;\n} else {\n  root.Diagram = Diagram;\n}\n}());\n\n"
  },
  {
    "path": "static/editor.md/lib/sequence/sequence-diagram-snap-min.js",
    "content": "/** js sequence diagrams 2.0.1\n *  https://bramp.github.io/js-sequence-diagrams/\n *  (c) 2012-2017 Andrew Brampton (bramp.net)\n *  @license Simplified BSD license.\n */\n!function(){\"use strict\";function Diagram(){this.title=void 0,this.actors=[],this.signals=[]}function ParseError(message,hash){_.extend(this,hash),this.name=\"ParseError\",this.message=message||\"\"}function AssertException(message){this.message=message}function assert(exp,message){if(!exp)throw new AssertException(message)}function registerTheme(name,theme){Diagram.themes[name]=theme}function getCenterX(box){return box.x+box.width/2}function getCenterY(box){return box.y+box.height/2}function clamp(x,min,max){return x<min?min:x>max?max:x}function wobble(x1,y1,x2,y2){assert(_.all([x1,x2,y1,y2],_.isFinite),\"x1,x2,y1,y2 must be numeric\");var factor=Math.sqrt((x2-x1)*(x2-x1)+(y2-y1)*(y2-y1))/25,r1=clamp(Math.random(),.2,.8),r2=clamp(Math.random(),.2,.8),xfactor=Math.random()>.5?factor:-factor,yfactor=Math.random()>.5?factor:-factor,p1={x:(x2-x1)*r1+x1+xfactor,y:(y2-y1)*r1+y1+yfactor},p2={x:(x2-x1)*r2+x1-xfactor,y:(y2-y1)*r2+y1-yfactor};return\"C\"+p1.x.toFixed(1)+\",\"+p1.y.toFixed(1)+\" \"+p2.x.toFixed(1)+\",\"+p2.y.toFixed(1)+\" \"+x2.toFixed(1)+\",\"+y2.toFixed(1)}function handRect(x,y,w,h){return assert(_.all([x,y,w,h],_.isFinite),\"x, y, w, h must be numeric\"),\"M\"+x+\",\"+y+wobble(x,y,x+w,y)+wobble(x+w,y,x+w,y+h)+wobble(x+w,y+h,x,y+h)+wobble(x,y+h,x,y)}function handLine(x1,y1,x2,y2){return assert(_.all([x1,x2,y1,y2],_.isFinite),\"x1,x2,y1,y2 must be numeric\"),\"M\"+x1.toFixed(1)+\",\"+y1.toFixed(1)+wobble(x1,y1,x2,y2)}Diagram.prototype.getActor=function(alias,name){alias=alias.trim();var i,actors=this.actors;for(i in actors)if(actors[i].alias==alias)return actors[i];return i=actors.push(new Diagram.Actor(alias,name||alias,actors.length)),actors[i-1]},Diagram.prototype.getActorWithAlias=function(input){input=input.trim();var alias,name,s=/([\\s\\S]+) as (\\S+)$/im.exec(input);return s?(name=s[1].trim(),alias=s[2].trim()):name=alias=input,this.getActor(alias,name)},Diagram.prototype.setTitle=function(title){this.title=title},Diagram.prototype.addSignal=function(signal){this.signals.push(signal)},Diagram.Actor=function(alias,name,index){this.alias=alias,this.name=name,this.index=index},Diagram.Signal=function(actorA,signaltype,actorB,message){this.type=\"Signal\",this.actorA=actorA,this.actorB=actorB,this.linetype=3&signaltype,this.arrowtype=signaltype>>2&3,this.message=message},Diagram.Signal.prototype.isSelf=function(){return this.actorA.index==this.actorB.index},Diagram.Note=function(actor,placement,message){if(this.type=\"Note\",this.actor=actor,this.placement=placement,this.message=message,this.hasManyActors()&&actor[0]==actor[1])throw new Error(\"Note should be over two different actors\")},Diagram.Note.prototype.hasManyActors=function(){return _.isArray(this.actor)},Diagram.unescape=function(s){return s.trim().replace(/^\"(.*)\"$/m,\"$1\").replace(/\\\\n/gm,\"\\n\")},Diagram.LINETYPE={SOLID:0,DOTTED:1},Diagram.ARROWTYPE={FILLED:0,OPEN:1},Diagram.PLACEMENT={LEFTOF:0,RIGHTOF:1,OVER:2},\"function\"!=typeof Object.getPrototypeOf&&(\"object\"==typeof\"test\".__proto__?Object.getPrototypeOf=function(object){return object.__proto__}:Object.getPrototypeOf=function(object){return object.constructor.prototype});var parser=function(){function Parser(){this.yy={}}var o=function(k,v,o,l){for(o=o||{},l=k.length;l--;o[k[l]]=v);return o},$V0=[5,8,9,13,15,24],$V1=[1,13],$V2=[1,17],$V3=[24,29,30],parser={trace:function(){},yy:{},symbols_:{error:2,start:3,document:4,EOF:5,line:6,statement:7,NL:8,participant:9,actor_alias:10,signal:11,note_statement:12,title:13,message:14,note:15,placement:16,actor:17,over:18,actor_pair:19,\",\":20,left_of:21,right_of:22,signaltype:23,ACTOR:24,linetype:25,arrowtype:26,LINE:27,DOTLINE:28,ARROW:29,OPENARROW:30,MESSAGE:31,$accept:0,$end:1},terminals_:{2:\"error\",5:\"EOF\",8:\"NL\",9:\"participant\",13:\"title\",15:\"note\",18:\"over\",20:\",\",21:\"left_of\",22:\"right_of\",24:\"ACTOR\",27:\"LINE\",28:\"DOTLINE\",29:\"ARROW\",30:\"OPENARROW\",31:\"MESSAGE\"},productions_:[0,[3,2],[4,0],[4,2],[6,1],[6,1],[7,2],[7,1],[7,1],[7,2],[12,4],[12,4],[19,1],[19,3],[16,1],[16,1],[11,4],[17,1],[10,1],[23,2],[23,1],[25,1],[25,1],[26,1],[26,1],[14,1]],performAction:function(yytext,yyleng,yylineno,yy,yystate,$$,_$){var $0=$$.length-1;switch(yystate){case 1:return yy.parser.yy;case 4:break;case 6:$$[$0];break;case 7:case 8:yy.parser.yy.addSignal($$[$0]);break;case 9:yy.parser.yy.setTitle($$[$0]);break;case 10:this.$=new Diagram.Note($$[$0-1],$$[$0-2],$$[$0]);break;case 11:this.$=new Diagram.Note($$[$0-1],Diagram.PLACEMENT.OVER,$$[$0]);break;case 12:case 20:this.$=$$[$0];break;case 13:this.$=[$$[$0-2],$$[$0]];break;case 14:this.$=Diagram.PLACEMENT.LEFTOF;break;case 15:this.$=Diagram.PLACEMENT.RIGHTOF;break;case 16:this.$=new Diagram.Signal($$[$0-3],$$[$0-2],$$[$0-1],$$[$0]);break;case 17:this.$=yy.parser.yy.getActor(Diagram.unescape($$[$0]));break;case 18:this.$=yy.parser.yy.getActorWithAlias(Diagram.unescape($$[$0]));break;case 19:this.$=$$[$0-1]|$$[$0]<<2;break;case 21:this.$=Diagram.LINETYPE.SOLID;break;case 22:this.$=Diagram.LINETYPE.DOTTED;break;case 23:this.$=Diagram.ARROWTYPE.FILLED;break;case 24:this.$=Diagram.ARROWTYPE.OPEN;break;case 25:this.$=Diagram.unescape($$[$0].substring(1))}},table:[o($V0,[2,2],{3:1,4:2}),{1:[3]},{5:[1,3],6:4,7:5,8:[1,6],9:[1,7],11:8,12:9,13:[1,10],15:[1,12],17:11,24:$V1},{1:[2,1]},o($V0,[2,3]),o($V0,[2,4]),o($V0,[2,5]),{10:14,24:[1,15]},o($V0,[2,7]),o($V0,[2,8]),{14:16,31:$V2},{23:18,25:19,27:[1,20],28:[1,21]},{16:22,18:[1,23],21:[1,24],22:[1,25]},o([20,27,28,31],[2,17]),o($V0,[2,6]),o($V0,[2,18]),o($V0,[2,9]),o($V0,[2,25]),{17:26,24:$V1},{24:[2,20],26:27,29:[1,28],30:[1,29]},o($V3,[2,21]),o($V3,[2,22]),{17:30,24:$V1},{17:32,19:31,24:$V1},{24:[2,14]},{24:[2,15]},{14:33,31:$V2},{24:[2,19]},{24:[2,23]},{24:[2,24]},{14:34,31:$V2},{14:35,31:$V2},{20:[1,36],31:[2,12]},o($V0,[2,16]),o($V0,[2,10]),o($V0,[2,11]),{17:37,24:$V1},{31:[2,13]}],defaultActions:{3:[2,1],24:[2,14],25:[2,15],27:[2,19],28:[2,23],29:[2,24],37:[2,13]},parseError:function(str,hash){if(!hash.recoverable)throw new Error(str);this.trace(str)},parse:function(input){function lex(){var token;return token=lexer.lex()||EOF,\"number\"!=typeof token&&(token=self.symbols_[token]||token),token}var self=this,stack=[0],vstack=[null],lstack=[],table=this.table,yytext=\"\",yylineno=0,yyleng=0,recovering=0,TERROR=2,EOF=1,args=lstack.slice.call(arguments,1),lexer=Object.create(this.lexer),sharedState={yy:{}};for(var k in this.yy)Object.prototype.hasOwnProperty.call(this.yy,k)&&(sharedState.yy[k]=this.yy[k]);lexer.setInput(input,sharedState.yy),sharedState.yy.lexer=lexer,sharedState.yy.parser=this,\"undefined\"==typeof lexer.yylloc&&(lexer.yylloc={});var yyloc=lexer.yylloc;lstack.push(yyloc);var ranges=lexer.options&&lexer.options.ranges;\"function\"==typeof sharedState.yy.parseError?this.parseError=sharedState.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var symbol,preErrorSymbol,state,action,r,p,len,newState,expected,yyval={};;){if(state=stack[stack.length-1],this.defaultActions[state]?action=this.defaultActions[state]:(null!==symbol&&\"undefined\"!=typeof symbol||(symbol=lex()),action=table[state]&&table[state][symbol]),\"undefined\"==typeof action||!action.length||!action[0]){var errStr=\"\";expected=[];for(p in table[state])this.terminals_[p]&&p>TERROR&&expected.push(\"'\"+this.terminals_[p]+\"'\");errStr=lexer.showPosition?\"Parse error on line \"+(yylineno+1)+\":\\n\"+lexer.showPosition()+\"\\nExpecting \"+expected.join(\", \")+\", got '\"+(this.terminals_[symbol]||symbol)+\"'\":\"Parse error on line \"+(yylineno+1)+\": Unexpected \"+(symbol==EOF?\"end of input\":\"'\"+(this.terminals_[symbol]||symbol)+\"'\"),this.parseError(errStr,{text:lexer.match,token:this.terminals_[symbol]||symbol,line:lexer.yylineno,loc:yyloc,expected:expected})}if(action[0]instanceof Array&&action.length>1)throw new Error(\"Parse Error: multiple actions possible at state: \"+state+\", token: \"+symbol);switch(action[0]){case 1:stack.push(symbol),vstack.push(lexer.yytext),lstack.push(lexer.yylloc),stack.push(action[1]),symbol=null,preErrorSymbol?(symbol=preErrorSymbol,preErrorSymbol=null):(yyleng=lexer.yyleng,yytext=lexer.yytext,yylineno=lexer.yylineno,yyloc=lexer.yylloc,recovering>0&&recovering--);break;case 2:if(len=this.productions_[action[1]][1],yyval.$=vstack[vstack.length-len],yyval._$={first_line:lstack[lstack.length-(len||1)].first_line,last_line:lstack[lstack.length-1].last_line,first_column:lstack[lstack.length-(len||1)].first_column,last_column:lstack[lstack.length-1].last_column},ranges&&(yyval._$.range=[lstack[lstack.length-(len||1)].range[0],lstack[lstack.length-1].range[1]]),r=this.performAction.apply(yyval,[yytext,yyleng,yylineno,sharedState.yy,action[1],vstack,lstack].concat(args)),\"undefined\"!=typeof r)return r;len&&(stack=stack.slice(0,-1*len*2),vstack=vstack.slice(0,-1*len),lstack=lstack.slice(0,-1*len)),stack.push(this.productions_[action[1]][0]),vstack.push(yyval.$),lstack.push(yyval._$),newState=table[stack[stack.length-2]][stack[stack.length-1]],stack.push(newState);break;case 3:return!0}}return!0}},lexer=function(){var lexer={EOF:1,parseError:function(str,hash){if(!this.yy.parser)throw new Error(str);this.yy.parser.parseError(str,hash)},setInput:function(input,yy){return this.yy=yy||this.yy||{},this._input=input,this._more=this._backtrack=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.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var ch=this._input[0];this.yytext+=ch,this.yyleng++,this.offset++,this.match+=ch,this.matched+=ch;var lines=ch.match(/(?:\\r\\n?|\\n).*/g);return lines?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),ch},unput:function(ch){var len=ch.length,lines=ch.split(/(?:\\r\\n?|\\n)/g);this._input=ch+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-len),this.offset-=len;var oldLines=this.match.split(/(?:\\r\\n?|\\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),lines.length-1&&(this.yylineno-=lines.length-1);var r=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:lines?(lines.length===oldLines.length?this.yylloc.first_column:0)+oldLines[oldLines.length-lines.length].length-lines[0].length:this.yylloc.first_column-len},this.options.ranges&&(this.yylloc.range=[r[0],r[0]+this.yyleng-len]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError(\"Lexical error on line \"+(this.yylineno+1)+\". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\\n\"+this.showPosition(),{text:\"\",token:null,line:this.yylineno})},less:function(n){this.unput(this.match.slice(n))},pastInput:function(){var past=this.matched.substr(0,this.matched.length-this.match.length);return(past.length>20?\"...\":\"\")+past.substr(-20).replace(/\\n/g,\"\")},upcomingInput:function(){var next=this.match;return next.length<20&&(next+=this._input.substr(0,20-next.length)),(next.substr(0,20)+(next.length>20?\"...\":\"\")).replace(/\\n/g,\"\")},showPosition:function(){var pre=this.pastInput(),c=new Array(pre.length+1).join(\"-\");return pre+this.upcomingInput()+\"\\n\"+c+\"^\"},test_match:function(match,indexed_rule){var token,lines,backup;if(this.options.backtrack_lexer&&(backup={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(backup.yylloc.range=this.yylloc.range.slice(0))),lines=match[0].match(/(?:\\r\\n?|\\n).*/g),lines&&(this.yylineno+=lines.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:lines?lines[lines.length-1].length-lines[lines.length-1].match(/\\r?\\n?/)[0].length:this.yylloc.last_column+match[0].length},this.yytext+=match[0],this.match+=match[0],this.matches=match,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(match[0].length),this.matched+=match[0],token=this.performAction.call(this,this.yy,this,indexed_rule,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),token)return token;if(this._backtrack){for(var k in backup)this[k]=backup[k];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var token,match,tempMatch,index;this._more||(this.yytext=\"\",this.match=\"\");for(var rules=this._currentRules(),i=0;i<rules.length;i++)if(tempMatch=this._input.match(this.rules[rules[i]]),tempMatch&&(!match||tempMatch[0].length>match[0].length)){if(match=tempMatch,index=i,this.options.backtrack_lexer){if(token=this.test_match(tempMatch,rules[i]),token!==!1)return token;if(this._backtrack){match=!1;continue}return!1}if(!this.options.flex)break}return match?(token=this.test_match(match,rules[index]),token!==!1&&token):\"\"===this._input?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 r=this.next();return r?r:this.lex()},begin:function(condition){this.conditionStack.push(condition)},popState:function(){var n=this.conditionStack.length-1;return n>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(n){return n=this.conditionStack.length-1-Math.abs(n||0),n>=0?this.conditionStack[n]:\"INITIAL\"},pushState:function(condition){this.begin(condition)},stateStackSize:function(){return this.conditionStack.length},options:{\"case-insensitive\":!0},performAction:function(yy,yy_,$avoiding_name_collisions,YY_START){switch($avoiding_name_collisions){case 0:return 8;case 1:break;case 2:break;case 3:return 9;case 4:return 21;case 5:return 22;case 6:return 18;case 7:return 15;case 8:return 13;case 9:return 20;case 10:return 24;case 11:return 24;case 12:return 28;case 13:return 27;case 14:return 30;case 15:return 29;case 16:return 31;case 17:return 5;case 18:return\"INVALID\"}},rules:[/^(?:[\\r\\n]+)/i,/^(?:\\s+)/i,/^(?:#[^\\r\\n]*)/i,/^(?:participant\\b)/i,/^(?:left of\\b)/i,/^(?:right of\\b)/i,/^(?:over\\b)/i,/^(?:note\\b)/i,/^(?:title\\b)/i,/^(?:,)/i,/^(?:[^\\->:,\\r\\n\"]+)/i,/^(?:\"[^\"]+\")/i,/^(?:--)/i,/^(?:-)/i,/^(?:>>)/i,/^(?:>)/i,/^(?:[^\\r\\n]+)/i,/^(?:$)/i,/^(?:.)/i],conditions:{INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18],inclusive:!0}}};return lexer}();return parser.lexer=lexer,Parser.prototype=parser,parser.Parser=Parser,new Parser}();\"undefined\"!=typeof require&&\"undefined\"!=typeof exports&&(exports.parser=parser,exports.Parser=parser.Parser,exports.parse=function(){return parser.parse.apply(parser,arguments)},exports.main=function(args){args[1]||(console.log(\"Usage: \"+args[0]+\" FILE\"),process.exit(1));var source=require(\"fs\").readFileSync(require(\"path\").normalize(args[1]),\"utf8\");return exports.parser.parse(source)},\"undefined\"!=typeof module&&require.main===module&&exports.main(process.argv.slice(1))),ParseError.prototype=new Error,Diagram.ParseError=ParseError,Diagram.parse=function(input){parser.yy=new Diagram,parser.yy.parseError=function(message,hash){throw new ParseError(message,hash)};var diagram=parser.parse(input);return delete diagram.parseError,diagram};var DIAGRAM_MARGIN=10,ACTOR_MARGIN=10,ACTOR_PADDING=10,SIGNAL_MARGIN=5,SIGNAL_PADDING=5,NOTE_MARGIN=10,NOTE_PADDING=5,NOTE_OVERLAP=15,TITLE_MARGIN=0,TITLE_PADDING=5,SELF_SIGNAL_WIDTH=20,PLACEMENT=Diagram.PLACEMENT,LINETYPE=Diagram.LINETYPE,ARROWTYPE=Diagram.ARROWTYPE,ALIGN_LEFT=0,ALIGN_CENTER=1;AssertException.prototype.toString=function(){return\"AssertException: \"+this.message},String.prototype.trim||(String.prototype.trim=function(){return this.replace(/^\\s+|\\s+$/g,\"\")}),Diagram.themes={};var BaseTheme=function(diagram,options){this.init(diagram,options)};if(_.extend(BaseTheme.prototype,{init:function(diagram,options){this.diagram=diagram,this.actorsHeight_=0,this.signalsHeight_=0,this.title_=void 0},setupPaper:function(container){},draw:function(container){this.setupPaper(container),this.layout();var titleHeight=this.title_?this.title_.height:0,y=DIAGRAM_MARGIN+titleHeight;this.drawTitle(),this.drawActors(y),this.drawSignals(y+this.actorsHeight_)},layout:function(){function actorEnsureDistance(a,b,d){assert(a<b,\"a must be less than or equal to b\"),a<0?(b=actors[b],b.x=Math.max(d-b.width/2,b.x)):b>=actors.length?(a=actors[a],a.paddingRight=Math.max(d,a.paddingRight)):(a=actors[a],a.distances[b]=Math.max(d,a.distances[b]?a.distances[b]:0))}var diagram=this.diagram,font=this.font_,actors=diagram.actors,signals=diagram.signals;if(diagram.width=0,diagram.height=0,diagram.title){var title=this.title_={},bb=this.textBBox(diagram.title,font);title.textBB=bb,title.message=diagram.title,title.width=bb.width+2*(TITLE_PADDING+TITLE_MARGIN),title.height=bb.height+2*(TITLE_PADDING+TITLE_MARGIN),title.x=DIAGRAM_MARGIN,title.y=DIAGRAM_MARGIN,diagram.width+=title.width,diagram.height+=title.height}_.each(actors,function(a){var bb=this.textBBox(a.name,font);a.textBB=bb,a.x=0,a.y=0,a.width=bb.width+2*(ACTOR_PADDING+ACTOR_MARGIN),a.height=bb.height+2*(ACTOR_PADDING+ACTOR_MARGIN),a.distances=[],a.paddingRight=0,this.actorsHeight_=Math.max(a.height,this.actorsHeight_)},this),_.each(signals,function(s){var a,b,bb=this.textBBox(s.message,font);s.textBB=bb,s.width=bb.width,s.height=bb.height;var extraWidth=0;if(\"Signal\"==s.type)s.width+=2*(SIGNAL_MARGIN+SIGNAL_PADDING),s.height+=2*(SIGNAL_MARGIN+SIGNAL_PADDING),s.isSelf()?(a=s.actorA.index,b=a+1,s.width+=SELF_SIGNAL_WIDTH):(a=Math.min(s.actorA.index,s.actorB.index),b=Math.max(s.actorA.index,s.actorB.index));else{if(\"Note\"!=s.type)throw new Error(\"Unhandled signal type:\"+s.type);if(s.width+=2*(NOTE_MARGIN+NOTE_PADDING),s.height+=2*(NOTE_MARGIN+NOTE_PADDING),extraWidth=2*ACTOR_MARGIN,s.placement==PLACEMENT.LEFTOF)b=s.actor.index,a=b-1;else if(s.placement==PLACEMENT.RIGHTOF)a=s.actor.index,b=a+1;else if(s.placement==PLACEMENT.OVER&&s.hasManyActors())a=Math.min(s.actor[0].index,s.actor[1].index),b=Math.max(s.actor[0].index,s.actor[1].index),extraWidth=-(2*NOTE_PADDING+2*NOTE_OVERLAP);else if(s.placement==PLACEMENT.OVER)return a=s.actor.index,actorEnsureDistance(a-1,a,s.width/2),actorEnsureDistance(a,a+1,s.width/2),void(this.signalsHeight_+=s.height)}actorEnsureDistance(a,b,s.width+extraWidth),this.signalsHeight_+=s.height},this);var actorsX=0;return _.each(actors,function(a){a.x=Math.max(actorsX,a.x),_.each(a.distances,function(distance,b){\"undefined\"!=typeof distance&&(b=actors[b],distance=Math.max(distance,a.width/2,b.width/2),b.x=Math.max(b.x,a.x+a.width/2+distance-b.width/2))}),actorsX=a.x+a.width+a.paddingRight},this),diagram.width=Math.max(actorsX,diagram.width),diagram.width+=2*DIAGRAM_MARGIN,diagram.height+=2*DIAGRAM_MARGIN+2*this.actorsHeight_+this.signalsHeight_,this},textBBox:function(text,font){},drawTitle:function(){var title=this.title_;title&&this.drawTextBox(title,title.message,TITLE_MARGIN,TITLE_PADDING,this.font_,ALIGN_LEFT)},drawActors:function(offsetY){var y=offsetY;_.each(this.diagram.actors,function(a){this.drawActor(a,y,this.actorsHeight_),this.drawActor(a,y+this.actorsHeight_+this.signalsHeight_,this.actorsHeight_);var aX=getCenterX(a);this.drawLine(aX,y+this.actorsHeight_-ACTOR_MARGIN,aX,y+this.actorsHeight_+ACTOR_MARGIN+this.signalsHeight_)},this)},drawActor:function(actor,offsetY,height){actor.y=offsetY,actor.height=height,this.drawTextBox(actor,actor.name,ACTOR_MARGIN,ACTOR_PADDING,this.font_,ALIGN_CENTER)},drawSignals:function(offsetY){var y=offsetY;_.each(this.diagram.signals,function(s){\"Signal\"==s.type?s.isSelf()?this.drawSelfSignal(s,y):this.drawSignal(s,y):\"Note\"==s.type&&this.drawNote(s,y),y+=s.height},this)},drawSelfSignal:function(signal,offsetY){assert(signal.isSelf(),\"signal must be a self signal\");var textBB=signal.textBB,aX=getCenterX(signal.actorA),x=aX+SELF_SIGNAL_WIDTH+SIGNAL_PADDING,y=offsetY+SIGNAL_PADDING+signal.height/2+textBB.y;this.drawText(x,y,signal.message,this.font_,ALIGN_LEFT);var y1=offsetY+SIGNAL_MARGIN+SIGNAL_PADDING,y2=y1+signal.height-2*SIGNAL_MARGIN-SIGNAL_PADDING;this.drawLine(aX,y1,aX+SELF_SIGNAL_WIDTH,y1,signal.linetype),this.drawLine(aX+SELF_SIGNAL_WIDTH,y1,aX+SELF_SIGNAL_WIDTH,y2,signal.linetype),this.drawLine(aX+SELF_SIGNAL_WIDTH,y2,aX,y2,signal.linetype,signal.arrowtype)},drawSignal:function(signal,offsetY){var aX=getCenterX(signal.actorA),bX=getCenterX(signal.actorB),x=(bX-aX)/2+aX,y=offsetY+SIGNAL_MARGIN+2*SIGNAL_PADDING;this.drawText(x,y,signal.message,this.font_,ALIGN_CENTER),y=offsetY+signal.height-SIGNAL_MARGIN-SIGNAL_PADDING,this.drawLine(aX,y,bX,y,signal.linetype,signal.arrowtype)},drawNote:function(note,offsetY){note.y=offsetY;var actorA=note.hasManyActors()?note.actor[0]:note.actor,aX=getCenterX(actorA);switch(note.placement){case PLACEMENT.RIGHTOF:note.x=aX+ACTOR_MARGIN;break;case PLACEMENT.LEFTOF:note.x=aX-ACTOR_MARGIN-note.width;break;case PLACEMENT.OVER:if(note.hasManyActors()){var bX=getCenterX(note.actor[1]),overlap=NOTE_OVERLAP+NOTE_PADDING;note.x=Math.min(aX,bX)-overlap,note.width=Math.max(aX,bX)+overlap-note.x}else note.x=aX-note.width/2;break;default:throw new Error(\"Unhandled note placement: \"+note.placement)}return this.drawTextBox(note,note.message,NOTE_MARGIN,NOTE_PADDING,this.font_,ALIGN_LEFT)},drawTextBox:function(box,text,margin,padding,font,align){var x=box.x+margin,y=box.y+margin,w=box.width-2*margin,h=box.height-2*margin;return this.drawRect(x,y,w,h),align==ALIGN_CENTER?(x=getCenterX(box),y=getCenterY(box)):(x+=padding,y+=padding),this.drawText(x,y,text,font,align)}}),\"undefined\"!=typeof Snap){var xmlns=\"http://www.w3.org/2000/svg\",LINE={stroke:\"#000000\",\"stroke-width\":2,fill:\"none\"},RECT={stroke:\"#000000\",\"stroke-width\":2,fill:\"#fff\"},LOADED_FONTS={},SnapTheme=function(diagram,options,resume){_.defaults(options,{\"css-class\":\"simple\",\"font-size\":16,\"font-family\":\"Andale Mono, monospace\"}),this.init(diagram,options,resume)};_.extend(SnapTheme.prototype,BaseTheme.prototype,{init:function(diagram,options,resume){BaseTheme.prototype.init.call(this,diagram),this.paper_=void 0,this.cssClass_=options[\"css-class\"]||void 0,this.font_={\"font-size\":options[\"font-size\"],\"font-family\":options[\"font-family\"]};var a=this.arrowTypes_={};a[ARROWTYPE.FILLED]=\"Block\",a[ARROWTYPE.OPEN]=\"Open\";var l=this.lineTypes_={};l[LINETYPE.SOLID]=\"\",l[LINETYPE.DOTTED]=\"6,2\";var that=this;this.waitForFont(function(){resume(that)})},waitForFont:function(callback){var fontFamily=this.font_[\"font-family\"];if(\"undefined\"==typeof WebFont)throw new Error(\"WebFont is required (https://github.com/typekit/webfontloader).\");return LOADED_FONTS[fontFamily]?void callback():void WebFont.load({custom:{families:[fontFamily]},classes:!1,active:function(){LOADED_FONTS[fontFamily]=!0,callback()},inactive:function(){LOADED_FONTS[fontFamily]=!0,callback()}})},addDescription:function(svg,description){var desc=document.createElementNS(xmlns,\"desc\");desc.appendChild(document.createTextNode(description)),svg.appendChild(desc)},setupPaper:function(container){var svg=document.createElementNS(xmlns,\"svg\");container.appendChild(svg),this.addDescription(svg,this.diagram.title||\"\"),this.paper_=Snap(svg),this.paper_.addClass(\"sequence\"),this.cssClass_&&this.paper_.addClass(this.cssClass_),this.beginGroup();var a=this.arrowMarkers_={},arrow=this.paper_.path(\"M 0 0 L 5 2.5 L 0 5 z\");a[ARROWTYPE.FILLED]=arrow.marker(0,0,5,5,5,2.5).attr({id:\"markerArrowBlock\"}),arrow=this.paper_.path(\"M 9.6,8 1.92,16 0,13.7 5.76,8 0,2.286 1.92,0 9.6,8 z\"),a[ARROWTYPE.OPEN]=arrow.marker(0,0,9.6,16,9.6,8).attr({markerWidth:\"4\",id:\"markerArrowOpen\"})},layout:function(){BaseTheme.prototype.layout.call(this),this.paper_.attr({width:this.diagram.width+\"px\",height:this.diagram.height+\"px\"})},textBBox:function(text,font){var t=this.createText(text,font),bb=t.getBBox();return t.remove(),bb},pushToStack:function(element){return this._stack.push(element),element},beginGroup:function(){this._stack=[]},finishGroup:function(){var g=this.paper_.group.apply(this.paper_,this._stack);return this.beginGroup(),g},createText:function(text,font){text=_.invoke(text.split(\"\\n\"),\"trim\");var t=this.paper_.text(0,0,text);return t.attr(font||{}),text.length>1&&t.selectAll(\"tspan:nth-child(n+2)\").attr({dy:\"1.2em\",x:0}),t},drawLine:function(x1,y1,x2,y2,linetype,arrowhead){var line=this.paper_.line(x1,y1,x2,y2).attr(LINE);return void 0!==linetype&&line.attr(\"strokeDasharray\",this.lineTypes_[linetype]),void 0!==arrowhead&&line.attr(\"markerEnd\",this.arrowMarkers_[arrowhead]),this.pushToStack(line)},drawRect:function(x,y,w,h){var rect=this.paper_.rect(x,y,w,h).attr(RECT);return this.pushToStack(rect)},drawText:function(x,y,text,font,align){var t=this.createText(text,font),bb=t.getBBox();return align==ALIGN_CENTER&&(x-=bb.width/2,y-=bb.height/2),t.attr({x:x-bb.x,y:y-bb.y}),t.selectAll(\"tspan\").attr({x:x}),this.pushToStack(t),t},drawTitle:function(){return this.beginGroup(),BaseTheme.prototype.drawTitle.call(this),this.finishGroup().addClass(\"title\")},drawActor:function(actor,offsetY,height){return this.beginGroup(),BaseTheme.prototype.drawActor.call(this,actor,offsetY,height),this.finishGroup().addClass(\"actor\")},drawSignal:function(signal,offsetY){return this.beginGroup(),BaseTheme.prototype.drawSignal.call(this,signal,offsetY),this.finishGroup().addClass(\"signal\")},drawSelfSignal:function(signal,offsetY){return this.beginGroup(),BaseTheme.prototype.drawSelfSignal.call(this,signal,offsetY),this.finishGroup().addClass(\"signal\")},drawNote:function(note,offsetY){return this.beginGroup(),BaseTheme.prototype.drawNote.call(this,note,offsetY),this.finishGroup().addClass(\"note\")}});var SnapHandTheme=function(diagram,options,resume){_.defaults(options,{\"css-class\":\"hand\",\"font-size\":16,\"font-family\":\"danielbd\"}),this.init(diagram,options,resume)};_.extend(SnapHandTheme.prototype,SnapTheme.prototype,{drawLine:function(x1,y1,x2,y2,linetype,arrowhead){var line=this.paper_.path(handLine(x1,y1,x2,y2)).attr(LINE);return void 0!==linetype&&line.attr(\"strokeDasharray\",this.lineTypes_[linetype]),void 0!==arrowhead&&line.attr(\"markerEnd\",this.arrowMarkers_[arrowhead]),this.pushToStack(line)},drawRect:function(x,y,w,h){var rect=this.paper_.path(handRect(x,y,w,h)).attr(RECT);return this.pushToStack(rect)}}),registerTheme(\"snapSimple\",SnapTheme),registerTheme(\"snapHand\",SnapHandTheme)}if(\"undefined\"==typeof Raphael&&\"undefined\"==typeof Snap)throw new Error(\"Raphael or Snap.svg is required to be included.\");if(_.isEmpty(Diagram.themes))throw new Error(\"No themes were registered. Please call registerTheme(...).\");Diagram.themes.hand=Diagram.themes.snapHand||Diagram.themes.raphaelHand,Diagram.themes.simple=Diagram.themes.snapSimple||Diagram.themes.raphaelSimple,Diagram.prototype.drawSVG=function(container,options){var defaultOptions={theme:\"hand\"};if(options=_.defaults(options||{},defaultOptions),!(options.theme in Diagram.themes))throw new Error(\"Unsupported theme: \"+options.theme);var div=_.isString(container)?document.getElementById(container):container;if(null===div||!div.tagName)throw new Error(\"Invalid container: \"+container);var Theme=Diagram.themes[options.theme];new Theme(this,options,function(drawing){drawing.draw(div)})},\"undefined\"!=typeof jQuery&&!function($){$.fn.sequenceDiagram=function(options){return this.each(function(){var $this=$(this),diagram=Diagram.parse($this.text());$this.html(\"\"),diagram.drawSVG(this,options)})}}(jQuery);var root=\"object\"==typeof self&&self.self==self&&self||\"object\"==typeof global&&global.global==global&&global;\"undefined\"!=typeof exports?(\"undefined\"!=typeof module&&module.exports&&(exports=module.exports=Diagram),exports.Diagram=Diagram):root.Diagram=Diagram}();\n//# sourceMappingURL=sequence-diagram-snap.js"
  },
  {
    "path": "static/editor.md/lib/sequence/snap.svg-min.js",
    "content": "\n// Snap.svg 0.4.1\n//\n// Copyright (c) 2013 – 2015 Adobe Systems Incorporated. All rights reserved.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n//\n// build: 2015-04-13\n\n!function(a){var b,c,d=\"0.4.2\",e=\"hasOwnProperty\",f=/[\\.\\/]/,g=/\\s*,\\s*/,h=\"*\",i=function(a,b){return a-b},j={n:{}},k=function(){for(var a=0,b=this.length;b>a;a++)if(\"undefined\"!=typeof this[a])return this[a]},l=function(){for(var a=this.length;--a;)if(\"undefined\"!=typeof this[a])return this[a]},m=function(a,d){a=String(a);var e,f=c,g=Array.prototype.slice.call(arguments,2),h=m.listeners(a),j=0,n=[],o={},p=[],q=b;p.firstDefined=k,p.lastDefined=l,b=a,c=0;for(var r=0,s=h.length;s>r;r++)\"zIndex\"in h[r]&&(n.push(h[r].zIndex),h[r].zIndex<0&&(o[h[r].zIndex]=h[r]));for(n.sort(i);n[j]<0;)if(e=o[n[j++]],p.push(e.apply(d,g)),c)return c=f,p;for(r=0;s>r;r++)if(e=h[r],\"zIndex\"in e)if(e.zIndex==n[j]){if(p.push(e.apply(d,g)),c)break;do if(j++,e=o[n[j]],e&&p.push(e.apply(d,g)),c)break;while(e)}else o[e.zIndex]=e;else if(p.push(e.apply(d,g)),c)break;return c=f,b=q,p};m._events=j,m.listeners=function(a){var b,c,d,e,g,i,k,l,m=a.split(f),n=j,o=[n],p=[];for(e=0,g=m.length;g>e;e++){for(l=[],i=0,k=o.length;k>i;i++)for(n=o[i].n,c=[n[m[e]],n[h]],d=2;d--;)b=c[d],b&&(l.push(b),p=p.concat(b.f||[]));o=l}return p},m.on=function(a,b){if(a=String(a),\"function\"!=typeof b)return function(){};for(var c=a.split(g),d=0,e=c.length;e>d;d++)!function(a){for(var c,d=a.split(f),e=j,g=0,h=d.length;h>g;g++)e=e.n,e=e.hasOwnProperty(d[g])&&e[d[g]]||(e[d[g]]={n:{}});for(e.f=e.f||[],g=0,h=e.f.length;h>g;g++)if(e.f[g]==b){c=!0;break}!c&&e.f.push(b)}(c[d]);return function(a){+a==+a&&(b.zIndex=+a)}},m.f=function(a){var b=[].slice.call(arguments,1);return function(){m.apply(null,[a,null].concat(b).concat([].slice.call(arguments,0)))}},m.stop=function(){c=1},m.nt=function(a){return a?new RegExp(\"(?:\\\\.|\\\\/|^)\"+a+\"(?:\\\\.|\\\\/|$)\").test(b):b},m.nts=function(){return b.split(f)},m.off=m.unbind=function(a,b){if(!a)return void(m._events=j={n:{}});var c=a.split(g);if(c.length>1)for(var d=0,i=c.length;i>d;d++)m.off(c[d],b);else{c=a.split(f);var k,l,n,d,i,o,p,q=[j];for(d=0,i=c.length;i>d;d++)for(o=0;o<q.length;o+=n.length-2){if(n=[o,1],k=q[o].n,c[d]!=h)k[c[d]]&&n.push(k[c[d]]);else for(l in k)k[e](l)&&n.push(k[l]);q.splice.apply(q,n)}for(d=0,i=q.length;i>d;d++)for(k=q[d];k.n;){if(b){if(k.f){for(o=0,p=k.f.length;p>o;o++)if(k.f[o]==b){k.f.splice(o,1);break}!k.f.length&&delete k.f}for(l in k.n)if(k.n[e](l)&&k.n[l].f){var r=k.n[l].f;for(o=0,p=r.length;p>o;o++)if(r[o]==b){r.splice(o,1);break}!r.length&&delete k.n[l].f}}else{delete k.f;for(l in k.n)k.n[e](l)&&k.n[l].f&&delete k.n[l].f}k=k.n}}},m.once=function(a,b){var c=function(){return m.unbind(a,c),b.apply(this,arguments)};return m.on(a,c)},m.version=d,m.toString=function(){return\"You are running Eve \"+d},\"undefined\"!=typeof module&&module.exports?module.exports=m:\"function\"==typeof define&&define.amd?define(\"eve\",[],function(){return m}):a.eve=m}(this),function(a,b){if(\"function\"==typeof define&&define.amd)define([\"eve\"],function(c){return b(a,c)});else if(\"undefined\"!=typeof exports){var c=require(\"eve\");module.exports=b(a,c)}else b(a,a.eve)}(window||this,function(a,b){var c=function(b){var c={},d=a.requestAnimationFrame||a.webkitRequestAnimationFrame||a.mozRequestAnimationFrame||a.oRequestAnimationFrame||a.msRequestAnimationFrame||function(a){setTimeout(a,16)},e=Array.isArray||function(a){return a instanceof Array||\"[object Array]\"==Object.prototype.toString.call(a)},f=0,g=\"M\"+(+new Date).toString(36),h=function(){return g+(f++).toString(36)},i=Date.now||function(){return+new Date},j=function(a){var b=this;if(null==a)return b.s;var c=b.s-a;b.b+=b.dur*c,b.B+=b.dur*c,b.s=a},k=function(a){var b=this;return null==a?b.spd:void(b.spd=a)},l=function(a){var b=this;return null==a?b.dur:(b.s=b.s*a/b.dur,void(b.dur=a))},m=function(){var a=this;delete c[a.id],a.update(),b(\"mina.stop.\"+a.id,a)},n=function(){var a=this;a.pdif||(delete c[a.id],a.update(),a.pdif=a.get()-a.b)},o=function(){var a=this;a.pdif&&(a.b=a.get()-a.pdif,delete a.pdif,c[a.id]=a)},p=function(){var a,b=this;if(e(b.start)){a=[];for(var c=0,d=b.start.length;d>c;c++)a[c]=+b.start[c]+(b.end[c]-b.start[c])*b.easing(b.s)}else a=+b.start+(b.end-b.start)*b.easing(b.s);b.set(a)},q=function(){var a=0;for(var e in c)if(c.hasOwnProperty(e)){var f=c[e],g=f.get();a++,f.s=(g-f.b)/(f.dur/f.spd),f.s>=1&&(delete c[e],f.s=1,a--,function(a){setTimeout(function(){b(\"mina.finish.\"+a.id,a)})}(f)),f.update()}a&&d(q)},r=function(a,b,e,f,g,i,s){var t={id:h(),start:a,end:b,b:e,s:0,dur:f-e,spd:1,get:g,set:i,easing:s||r.linear,status:j,speed:k,duration:l,stop:m,pause:n,resume:o,update:p};c[t.id]=t;var u,v=0;for(u in c)if(c.hasOwnProperty(u)&&(v++,2==v))break;return 1==v&&d(q),t};return r.time=i,r.getById=function(a){return c[a]||null},r.linear=function(a){return a},r.easeout=function(a){return Math.pow(a,1.7)},r.easein=function(a){return Math.pow(a,.48)},r.easeinout=function(a){if(1==a)return 1;if(0==a)return 0;var b=.48-a/1.04,c=Math.sqrt(.1734+b*b),d=c-b,e=Math.pow(Math.abs(d),1/3)*(0>d?-1:1),f=-c-b,g=Math.pow(Math.abs(f),1/3)*(0>f?-1:1),h=e+g+.5;return 3*(1-h)*h*h+h*h*h},r.backin=function(a){if(1==a)return 1;var b=1.70158;return a*a*((b+1)*a-b)},r.backout=function(a){if(0==a)return 0;a-=1;var b=1.70158;return a*a*((b+1)*a+b)+1},r.elastic=function(a){return a==!!a?a:Math.pow(2,-10*a)*Math.sin(2*(a-.075)*Math.PI/.3)+1},r.bounce=function(a){var b,c=7.5625,d=2.75;return 1/d>a?b=c*a*a:2/d>a?(a-=1.5/d,b=c*a*a+.75):2.5/d>a?(a-=2.25/d,b=c*a*a+.9375):(a-=2.625/d,b=c*a*a+.984375),b},a.mina=r,r}(\"undefined\"==typeof b?function(){}:b),d=function(a){function c(a,b){if(a){if(a.nodeType)return w(a);if(e(a,\"array\")&&c.set)return c.set.apply(c,a);if(a instanceof s)return a;if(null==b)return a=y.doc.querySelector(String(a)),w(a)}return a=null==a?\"100%\":a,b=null==b?\"100%\":b,new v(a,b)}function d(a,b){if(b){if(\"#text\"==a&&(a=y.doc.createTextNode(b.text||b[\"#text\"]||\"\")),\"#comment\"==a&&(a=y.doc.createComment(b.text||b[\"#text\"]||\"\")),\"string\"==typeof a&&(a=d(a)),\"string\"==typeof b)return 1==a.nodeType?\"xlink:\"==b.substring(0,6)?a.getAttributeNS(T,b.substring(6)):\"xml:\"==b.substring(0,4)?a.getAttributeNS(U,b.substring(4)):a.getAttribute(b):\"text\"==b?a.nodeValue:null;if(1==a.nodeType){for(var c in b)if(b[z](c)){var e=A(b[c]);e?\"xlink:\"==c.substring(0,6)?a.setAttributeNS(T,c.substring(6),e):\"xml:\"==c.substring(0,4)?a.setAttributeNS(U,c.substring(4),e):a.setAttribute(c,e):a.removeAttribute(c)}}else\"text\"in b&&(a.nodeValue=b.text)}else a=y.doc.createElementNS(U,a);return a}function e(a,b){return b=A.prototype.toLowerCase.call(b),\"finite\"==b?isFinite(a):\"array\"==b&&(a instanceof Array||Array.isArray&&Array.isArray(a))?!0:\"null\"==b&&null===a||b==typeof a&&null!==a||\"object\"==b&&a===Object(a)||J.call(a).slice(8,-1).toLowerCase()==b}function f(a){if(\"function\"==typeof a||Object(a)!==a)return a;var b=new a.constructor;for(var c in a)a[z](c)&&(b[c]=f(a[c]));return b}function h(a,b){for(var c=0,d=a.length;d>c;c++)if(a[c]===b)return a.push(a.splice(c,1)[0])}function i(a,b,c){function d(){var e=Array.prototype.slice.call(arguments,0),f=e.join(\"␀\"),g=d.cache=d.cache||{},i=d.count=d.count||[];return g[z](f)?(h(i,f),c?c(g[f]):g[f]):(i.length>=1e3&&delete g[i.shift()],i.push(f),g[f]=a.apply(b,e),c?c(g[f]):g[f])}return d}function j(a,b,c,d,e,f){if(null==e){var g=a-c,h=b-d;return g||h?(180+180*D.atan2(-h,-g)/H+360)%360:0}return j(a,b,e,f)-j(c,d,e,f)}function k(a){return a%360*H/180}function l(a){return 180*a/H%360}function m(a){var b=[];return a=a.replace(/(?:^|\\s)(\\w+)\\(([^)]+)\\)/g,function(a,c,d){return d=d.split(/\\s*,\\s*|\\s+/),\"rotate\"==c&&1==d.length&&d.push(0,0),\"scale\"==c&&(d.length>2?d=d.slice(0,2):2==d.length&&d.push(0,0),1==d.length&&d.push(d[0],0,0)),b.push(\"skewX\"==c?[\"m\",1,0,D.tan(k(d[0])),1,0,0]:\"skewY\"==c?[\"m\",1,D.tan(k(d[0])),0,1,0,0]:[c.charAt(0)].concat(d)),a}),b}function n(a,b){var d=ab(a),e=new c.Matrix;if(d)for(var f=0,g=d.length;g>f;f++){var h,i,j,k,l,m=d[f],n=m.length,o=A(m[0]).toLowerCase(),p=m[0]!=o,q=p?e.invert():0;\"t\"==o&&2==n?e.translate(m[1],0):\"t\"==o&&3==n?p?(h=q.x(0,0),i=q.y(0,0),j=q.x(m[1],m[2]),k=q.y(m[1],m[2]),e.translate(j-h,k-i)):e.translate(m[1],m[2]):\"r\"==o?2==n?(l=l||b,e.rotate(m[1],l.x+l.width/2,l.y+l.height/2)):4==n&&(p?(j=q.x(m[2],m[3]),k=q.y(m[2],m[3]),e.rotate(m[1],j,k)):e.rotate(m[1],m[2],m[3])):\"s\"==o?2==n||3==n?(l=l||b,e.scale(m[1],m[n-1],l.x+l.width/2,l.y+l.height/2)):4==n?p?(j=q.x(m[2],m[3]),k=q.y(m[2],m[3]),e.scale(m[1],m[1],j,k)):e.scale(m[1],m[1],m[2],m[3]):5==n&&(p?(j=q.x(m[3],m[4]),k=q.y(m[3],m[4]),e.scale(m[1],m[2],j,k)):e.scale(m[1],m[2],m[3],m[4])):\"m\"==o&&7==n&&e.add(m[1],m[2],m[3],m[4],m[5],m[6])}return e}function o(a){var b=a.node.ownerSVGElement&&w(a.node.ownerSVGElement)||a.node.parentNode&&w(a.node.parentNode)||c.select(\"svg\")||c(0,0),d=b.select(\"defs\"),e=null==d?!1:d.node;return e||(e=u(\"defs\",b.node).node),e}function p(a){return a.node.ownerSVGElement&&w(a.node.ownerSVGElement)||c.select(\"svg\")}function q(a,b,c){function e(a){if(null==a)return I;if(a==+a)return a;d(j,{width:a});try{return j.getBBox().width}catch(b){return 0}}function f(a){if(null==a)return I;if(a==+a)return a;d(j,{height:a});try{return j.getBBox().height}catch(b){return 0}}function g(d,e){null==b?i[d]=e(a.attr(d)||0):d==b&&(i=e(null==c?a.attr(d)||0:c))}var h=p(a).node,i={},j=h.querySelector(\".svg---mgr\");switch(j||(j=d(\"rect\"),d(j,{x:-9e9,y:-9e9,width:10,height:10,\"class\":\"svg---mgr\",fill:\"none\"}),h.appendChild(j)),a.type){case\"rect\":g(\"rx\",e),g(\"ry\",f);case\"image\":g(\"width\",e),g(\"height\",f);case\"text\":g(\"x\",e),g(\"y\",f);break;case\"circle\":g(\"cx\",e),g(\"cy\",f),g(\"r\",e);break;case\"ellipse\":g(\"cx\",e),g(\"cy\",f),g(\"rx\",e),g(\"ry\",f);break;case\"line\":g(\"x1\",e),g(\"x2\",e),g(\"y1\",f),g(\"y2\",f);break;case\"marker\":g(\"refX\",e),g(\"markerWidth\",e),g(\"refY\",f),g(\"markerHeight\",f);break;case\"radialGradient\":g(\"fx\",e),g(\"fy\",f);break;case\"tspan\":g(\"dx\",e),g(\"dy\",f);break;default:g(b,e)}return h.removeChild(j),i}function r(a){e(a,\"array\")||(a=Array.prototype.slice.call(arguments,0));for(var b=0,c=0,d=this.node;this[b];)delete this[b++];for(b=0;b<a.length;b++)\"set\"==a[b].type?a[b].forEach(function(a){d.appendChild(a.node)}):d.appendChild(a[b].node);var f=d.childNodes;for(b=0;b<f.length;b++)this[c++]=w(f[b]);return this}function s(a){if(a.snap in V)return V[a.snap];var b;try{b=a.ownerSVGElement}catch(c){}this.node=a,b&&(this.paper=new v(b)),this.type=a.tagName||a.nodeName;var d=this.id=S(this);if(this.anims={},this._={transform:[]},a.snap=d,V[d]=this,\"g\"==this.type&&(this.add=r),this.type in{g:1,mask:1,pattern:1,symbol:1})for(var e in v.prototype)v.prototype[z](e)&&(this[e]=v.prototype[e])}function t(a){this.node=a}function u(a,b){var c=d(a);b.appendChild(c);var e=w(c);return e}function v(a,b){var c,e,f,g=v.prototype;if(a&&\"svg\"==a.tagName){if(a.snap in V)return V[a.snap];var h=a.ownerDocument;c=new s(a),e=a.getElementsByTagName(\"desc\")[0],f=a.getElementsByTagName(\"defs\")[0],e||(e=d(\"desc\"),e.appendChild(h.createTextNode(\"Created with Snap\")),c.node.appendChild(e)),f||(f=d(\"defs\"),c.node.appendChild(f)),c.defs=f;for(var i in g)g[z](i)&&(c[i]=g[i]);c.paper=c.root=c}else c=u(\"svg\",y.doc.body),d(c.node,{height:b,version:1.1,width:a,xmlns:U});return c}function w(a){return a?a instanceof s||a instanceof t?a:a.tagName&&\"svg\"==a.tagName.toLowerCase()?new v(a):a.tagName&&\"object\"==a.tagName.toLowerCase()&&\"image/svg+xml\"==a.type?new v(a.contentDocument.getElementsByTagName(\"svg\")[0]):new s(a):a}function x(a,b){for(var c=0,d=a.length;d>c;c++){var e={type:a[c].type,attr:a[c].attr()},f=a[c].children();b.push(e),f.length&&x(f,e.childNodes=[])}}c.version=\"0.4.0\",c.toString=function(){return\"Snap v\"+this.version},c._={};var y={win:a.window,doc:a.window.document};c._.glob=y;{var z=\"hasOwnProperty\",A=String,B=parseFloat,C=parseInt,D=Math,E=D.max,F=D.min,G=D.abs,H=(D.pow,D.PI),I=(D.round,\"\"),J=Object.prototype.toString,K=/^\\s*((#[a-f\\d]{6})|(#[a-f\\d]{3})|rgba?\\(\\s*([\\d\\.]+%?\\s*,\\s*[\\d\\.]+%?\\s*,\\s*[\\d\\.]+%?(?:\\s*,\\s*[\\d\\.]+%?)?)\\s*\\)|hsba?\\(\\s*([\\d\\.]+(?:deg|\\xb0|%)?\\s*,\\s*[\\d\\.]+%?\\s*,\\s*[\\d\\.]+(?:%?\\s*,\\s*[\\d\\.]+)?%?)\\s*\\)|hsla?\\(\\s*([\\d\\.]+(?:deg|\\xb0|%)?\\s*,\\s*[\\d\\.]+%?\\s*,\\s*[\\d\\.]+(?:%?\\s*,\\s*[\\d\\.]+)?%?)\\s*\\))\\s*$/i,L=(c._.separator=/[,\\s]+/,/[\\s]*,[\\s]*/),M={hs:1,rg:1},N=/([a-z])[\\s,]*((-?\\d*\\.?\\d*(?:e[\\-+]?\\d+)?[\\s]*,?[\\s]*)+)/gi,O=/([rstm])[\\s,]*((-?\\d*\\.?\\d*(?:e[\\-+]?\\d+)?[\\s]*,?[\\s]*)+)/gi,P=/(-?\\d*\\.?\\d*(?:e[\\-+]?\\\\d+)?)[\\s]*,?[\\s]*/gi,Q=0,R=\"S\"+(+new Date).toString(36),S=function(a){return(a&&a.type?a.type:I)+R+(Q++).toString(36)},T=\"http://www.w3.org/1999/xlink\",U=\"http://www.w3.org/2000/svg\",V={};c.url=function(a){return\"url('#\"+a+\"')\"}}c._.$=d,c._.id=S,c.format=function(){var a=/\\{([^\\}]+)\\}/g,b=/(?:(?:^|\\.)(.+?)(?=\\[|\\.|$|\\()|\\[('|\")(.+?)\\2\\])(\\(\\))?/g,c=function(a,c,d){var e=d;return c.replace(b,function(a,b,c,d,f){b=b||d,e&&(b in e&&(e=e[b]),\"function\"==typeof e&&f&&(e=e()))}),e=(null==e||e==d?a:e)+\"\"};return function(b,d){return A(b).replace(a,function(a,b){return c(a,b,d)})}}(),c._.clone=f,c._.cacher=i,c.rad=k,c.deg=l,c.sin=function(a){return D.sin(c.rad(a))},c.tan=function(a){return D.tan(c.rad(a))},c.cos=function(a){return D.cos(c.rad(a))},c.asin=function(a){return c.deg(D.asin(a))},c.acos=function(a){return c.deg(D.acos(a))},c.atan=function(a){return c.deg(D.atan(a))},c.atan2=function(a){return c.deg(D.atan2(a))},c.angle=j,c.len=function(a,b,d,e){return Math.sqrt(c.len2(a,b,d,e))},c.len2=function(a,b,c,d){return(a-c)*(a-c)+(b-d)*(b-d)},c.closestPoint=function(a,b,c){function d(a){var d=a.x-b,e=a.y-c;return d*d+e*e}for(var e,f,g,h,i=a.node,j=i.getTotalLength(),k=j/i.pathSegList.numberOfItems*.125,l=1/0,m=0;j>=m;m+=k)(h=d(g=i.getPointAtLength(m)))<l&&(e=g,f=m,l=h);for(k*=.5;k>.5;){var n,o,p,q,r,s;(p=f-k)>=0&&(r=d(n=i.getPointAtLength(p)))<l?(e=n,f=p,l=r):(q=f+k)<=j&&(s=d(o=i.getPointAtLength(q)))<l?(e=o,f=q,l=s):k*=.5}return e={x:e.x,y:e.y,length:f,distance:Math.sqrt(l)}},c.is=e,c.snapTo=function(a,b,c){if(c=e(c,\"finite\")?c:10,e(a,\"array\")){for(var d=a.length;d--;)if(G(a[d]-b)<=c)return a[d]}else{a=+a;var f=b%a;if(c>f)return b-f;if(f>a-c)return b-f+a}return b},c.getRGB=i(function(a){if(!a||(a=A(a)).indexOf(\"-\")+1)return{r:-1,g:-1,b:-1,hex:\"none\",error:1,toString:Z};if(\"none\"==a)return{r:-1,g:-1,b:-1,hex:\"none\",toString:Z};if(!(M[z](a.toLowerCase().substring(0,2))||\"#\"==a.charAt())&&(a=W(a)),!a)return{r:-1,g:-1,b:-1,hex:\"none\",error:1,toString:Z};var b,d,f,g,h,i,j=a.match(K);return j?(j[2]&&(f=C(j[2].substring(5),16),d=C(j[2].substring(3,5),16),b=C(j[2].substring(1,3),16)),j[3]&&(f=C((h=j[3].charAt(3))+h,16),d=C((h=j[3].charAt(2))+h,16),b=C((h=j[3].charAt(1))+h,16)),j[4]&&(i=j[4].split(L),b=B(i[0]),\"%\"==i[0].slice(-1)&&(b*=2.55),d=B(i[1]),\"%\"==i[1].slice(-1)&&(d*=2.55),f=B(i[2]),\"%\"==i[2].slice(-1)&&(f*=2.55),\"rgba\"==j[1].toLowerCase().slice(0,4)&&(g=B(i[3])),i[3]&&\"%\"==i[3].slice(-1)&&(g/=100)),j[5]?(i=j[5].split(L),b=B(i[0]),\"%\"==i[0].slice(-1)&&(b/=100),d=B(i[1]),\"%\"==i[1].slice(-1)&&(d/=100),f=B(i[2]),\"%\"==i[2].slice(-1)&&(f/=100),(\"deg\"==i[0].slice(-3)||\"°\"==i[0].slice(-1))&&(b/=360),\"hsba\"==j[1].toLowerCase().slice(0,4)&&(g=B(i[3])),i[3]&&\"%\"==i[3].slice(-1)&&(g/=100),c.hsb2rgb(b,d,f,g)):j[6]?(i=j[6].split(L),b=B(i[0]),\"%\"==i[0].slice(-1)&&(b/=100),d=B(i[1]),\"%\"==i[1].slice(-1)&&(d/=100),f=B(i[2]),\"%\"==i[2].slice(-1)&&(f/=100),(\"deg\"==i[0].slice(-3)||\"°\"==i[0].slice(-1))&&(b/=360),\"hsla\"==j[1].toLowerCase().slice(0,4)&&(g=B(i[3])),i[3]&&\"%\"==i[3].slice(-1)&&(g/=100),c.hsl2rgb(b,d,f,g)):(b=F(D.round(b),255),d=F(D.round(d),255),f=F(D.round(f),255),g=F(E(g,0),1),j={r:b,g:d,b:f,toString:Z},j.hex=\"#\"+(16777216|f|d<<8|b<<16).toString(16).slice(1),j.opacity=e(g,\"finite\")?g:1,j)):{r:-1,g:-1,b:-1,hex:\"none\",error:1,toString:Z}},c),c.hsb=i(function(a,b,d){return c.hsb2rgb(a,b,d).hex}),c.hsl=i(function(a,b,d){return c.hsl2rgb(a,b,d).hex}),c.rgb=i(function(a,b,c,d){if(e(d,\"finite\")){var f=D.round;return\"rgba(\"+[f(a),f(b),f(c),+d.toFixed(2)]+\")\"}return\"#\"+(16777216|c|b<<8|a<<16).toString(16).slice(1)});var W=function(a){var b=y.doc.getElementsByTagName(\"head\")[0]||y.doc.getElementsByTagName(\"svg\")[0],c=\"rgb(255, 0, 0)\";return(W=i(function(a){if(\"red\"==a.toLowerCase())return c;b.style.color=c,b.style.color=a;var d=y.doc.defaultView.getComputedStyle(b,I).getPropertyValue(\"color\");return d==c?null:d}))(a)},X=function(){return\"hsb(\"+[this.h,this.s,this.b]+\")\"},Y=function(){return\"hsl(\"+[this.h,this.s,this.l]+\")\"},Z=function(){return 1==this.opacity||null==this.opacity?this.hex:\"rgba(\"+[this.r,this.g,this.b,this.opacity]+\")\"},$=function(a,b,d){if(null==b&&e(a,\"object\")&&\"r\"in a&&\"g\"in a&&\"b\"in a&&(d=a.b,b=a.g,a=a.r),null==b&&e(a,string)){var f=c.getRGB(a);a=f.r,b=f.g,d=f.b}return(a>1||b>1||d>1)&&(a/=255,b/=255,d/=255),[a,b,d]},_=function(a,b,d,f){a=D.round(255*a),b=D.round(255*b),d=D.round(255*d);var g={r:a,g:b,b:d,opacity:e(f,\"finite\")?f:1,hex:c.rgb(a,b,d),toString:Z};return e(f,\"finite\")&&(g.opacity=f),g};c.color=function(a){var b;return e(a,\"object\")&&\"h\"in a&&\"s\"in a&&\"b\"in a?(b=c.hsb2rgb(a),a.r=b.r,a.g=b.g,a.b=b.b,a.opacity=1,a.hex=b.hex):e(a,\"object\")&&\"h\"in a&&\"s\"in a&&\"l\"in a?(b=c.hsl2rgb(a),a.r=b.r,a.g=b.g,a.b=b.b,a.opacity=1,a.hex=b.hex):(e(a,\"string\")&&(a=c.getRGB(a)),e(a,\"object\")&&\"r\"in a&&\"g\"in a&&\"b\"in a&&!(\"error\"in a)?(b=c.rgb2hsl(a),a.h=b.h,a.s=b.s,a.l=b.l,b=c.rgb2hsb(a),a.v=b.b):(a={hex:\"none\"},a.r=a.g=a.b=a.h=a.s=a.v=a.l=-1,a.error=1)),a.toString=Z,a},c.hsb2rgb=function(a,b,c,d){e(a,\"object\")&&\"h\"in a&&\"s\"in a&&\"b\"in a&&(c=a.b,b=a.s,d=a.o,a=a.h),a*=360;var f,g,h,i,j;return a=a%360/60,j=c*b,i=j*(1-G(a%2-1)),f=g=h=c-j,a=~~a,f+=[j,i,0,0,i,j][a],g+=[i,j,j,i,0,0][a],h+=[0,0,i,j,j,i][a],_(f,g,h,d)},c.hsl2rgb=function(a,b,c,d){e(a,\"object\")&&\"h\"in a&&\"s\"in a&&\"l\"in a&&(c=a.l,b=a.s,a=a.h),(a>1||b>1||c>1)&&(a/=360,b/=100,c/=100),a*=360;var f,g,h,i,j;return a=a%360/60,j=2*b*(.5>c?c:1-c),i=j*(1-G(a%2-1)),f=g=h=c-j/2,a=~~a,f+=[j,i,0,0,i,j][a],g+=[i,j,j,i,0,0][a],h+=[0,0,i,j,j,i][a],_(f,g,h,d)},c.rgb2hsb=function(a,b,c){c=$(a,b,c),a=c[0],b=c[1],c=c[2];var d,e,f,g;return f=E(a,b,c),g=f-F(a,b,c),d=0==g?null:f==a?(b-c)/g:f==b?(c-a)/g+2:(a-b)/g+4,d=(d+360)%6*60/360,e=0==g?0:g/f,{h:d,s:e,b:f,toString:X}},c.rgb2hsl=function(a,b,c){c=$(a,b,c),a=c[0],b=c[1],c=c[2];var d,e,f,g,h,i;return g=E(a,b,c),h=F(a,b,c),i=g-h,d=0==i?null:g==a?(b-c)/i:g==b?(c-a)/i+2:(a-b)/i+4,d=(d+360)%6*60/360,f=(g+h)/2,e=0==i?0:.5>f?i/(2*f):i/(2-2*f),{h:d,s:e,l:f,toString:Y}},c.parsePathString=function(a){if(!a)return null;var b=c.path(a);if(b.arr)return c.path.clone(b.arr);var d={a:7,c:6,o:2,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,u:3,z:0},f=[];return e(a,\"array\")&&e(a[0],\"array\")&&(f=c.path.clone(a)),f.length||A(a).replace(N,function(a,b,c){var e=[],g=b.toLowerCase();if(c.replace(P,function(a,b){b&&e.push(+b)}),\"m\"==g&&e.length>2&&(f.push([b].concat(e.splice(0,2))),g=\"l\",b=\"m\"==b?\"l\":\"L\"),\"o\"==g&&1==e.length&&f.push([b,e[0]]),\"r\"==g)f.push([b].concat(e));else for(;e.length>=d[g]&&(f.push([b].concat(e.splice(0,d[g]))),d[g]););}),f.toString=c.path.toString,b.arr=c.path.clone(f),f};var ab=c.parseTransformString=function(a){if(!a)return null;var b=[];return e(a,\"array\")&&e(a[0],\"array\")&&(b=c.path.clone(a)),b.length||A(a).replace(O,function(a,c,d){{var e=[];c.toLowerCase()}d.replace(P,function(a,b){b&&e.push(+b)}),b.push([c].concat(e))}),b.toString=c.path.toString,b};c._.svgTransform2string=m,c._.rgTransform=/^[a-z][\\s]*-?\\.?\\d/i,c._.transform2matrix=n,c._unit2px=q;y.doc.contains||y.doc.compareDocumentPosition?function(a,b){var c=9==a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a==d||!(!d||1!=d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)for(;b;)if(b=b.parentNode,b==a)return!0;return!1};c._.getSomeDefs=o,c._.getSomeSVG=p,c.select=function(a){return a=A(a).replace(/([^\\\\]):/g,\"$1\\\\:\"),w(y.doc.querySelector(a))},c.selectAll=function(a){for(var b=y.doc.querySelectorAll(a),d=(c.set||Array)(),e=0;e<b.length;e++)d.push(w(b[e]));return d},setInterval(function(){for(var a in V)if(V[z](a)){var b=V[a],c=b.node;(\"svg\"!=b.type&&!c.ownerSVGElement||\"svg\"==b.type&&(!c.parentNode||\"ownerSVGElement\"in c.parentNode&&!c.ownerSVGElement))&&delete V[a]}},1e4),s.prototype.attr=function(a,c){var d=this,f=d.node;if(!a){if(1!=f.nodeType)return{text:f.nodeValue};for(var g=f.attributes,h={},i=0,j=g.length;j>i;i++)h[g[i].nodeName]=g[i].nodeValue;return h}if(e(a,\"string\")){if(!(arguments.length>1))return b(\"snap.util.getattr.\"+a,d).firstDefined();var k={};k[a]=c,a=k}for(var l in a)a[z](l)&&b(\"snap.util.attr.\"+l,d,a[l]);return d},c.parse=function(a){var b=y.doc.createDocumentFragment(),c=!0,d=y.doc.createElement(\"div\");if(a=A(a),a.match(/^\\s*<\\s*svg(?:\\s|>)/)||(a=\"<svg>\"+a+\"</svg>\",c=!1),d.innerHTML=a,a=d.getElementsByTagName(\"svg\")[0])if(c)b=a;else for(;a.firstChild;)b.appendChild(a.firstChild);return new t(b)},c.fragment=function(){for(var a=Array.prototype.slice.call(arguments,0),b=y.doc.createDocumentFragment(),d=0,e=a.length;e>d;d++){var f=a[d];f.node&&f.node.nodeType&&b.appendChild(f.node),f.nodeType&&b.appendChild(f),\"string\"==typeof f&&b.appendChild(c.parse(f).node)}return new t(b)},c._.make=u,c._.wrap=w,v.prototype.el=function(a,b){var c=u(a,this.node);return b&&c.attr(b),c},s.prototype.children=function(){for(var a=[],b=this.node.childNodes,d=0,e=b.length;e>d;d++)a[d]=c(b[d]);return a},s.prototype.toJSON=function(){var a=[];return x([this],a),a[0]},b.on(\"snap.util.getattr\",function(){var a=b.nt();a=a.substring(a.lastIndexOf(\".\")+1);var c=a.replace(/[A-Z]/g,function(a){return\"-\"+a.toLowerCase()});return bb[z](c)?this.node.ownerDocument.defaultView.getComputedStyle(this.node,null).getPropertyValue(c):d(this.node,a)});var bb={\"alignment-baseline\":0,\"baseline-shift\":0,clip:0,\"clip-path\":0,\"clip-rule\":0,color:0,\"color-interpolation\":0,\"color-interpolation-filters\":0,\"color-profile\":0,\"color-rendering\":0,cursor:0,direction:0,display:0,\"dominant-baseline\":0,\"enable-background\":0,fill:0,\"fill-opacity\":0,\"fill-rule\":0,filter:0,\"flood-color\":0,\"flood-opacity\":0,font:0,\"font-family\":0,\"font-size\":0,\"font-size-adjust\":0,\"font-stretch\":0,\"font-style\":0,\"font-variant\":0,\"font-weight\":0,\"glyph-orientation-horizontal\":0,\"glyph-orientation-vertical\":0,\"image-rendering\":0,kerning:0,\"letter-spacing\":0,\"lighting-color\":0,marker:0,\"marker-end\":0,\"marker-mid\":0,\"marker-start\":0,mask:0,opacity:0,overflow:0,\"pointer-events\":0,\"shape-rendering\":0,\"stop-color\":0,\"stop-opacity\":0,stroke:0,\"stroke-dasharray\":0,\"stroke-dashoffset\":0,\"stroke-linecap\":0,\"stroke-linejoin\":0,\"stroke-miterlimit\":0,\"stroke-opacity\":0,\"stroke-width\":0,\"text-anchor\":0,\"text-decoration\":0,\"text-rendering\":0,\"unicode-bidi\":0,visibility:0,\"word-spacing\":0,\"writing-mode\":0};b.on(\"snap.util.attr\",function(a){var c=b.nt(),e={};c=c.substring(c.lastIndexOf(\".\")+1),e[c]=a;var f=c.replace(/-(\\w)/gi,function(a,b){return b.toUpperCase()}),g=c.replace(/[A-Z]/g,function(a){return\"-\"+a.toLowerCase()});bb[z](g)?this.node.style[f]=null==a?I:a:d(this.node,e)}),function(){}(v.prototype),c.ajax=function(a,c,d,f){var g=new XMLHttpRequest,h=S();if(g){if(e(c,\"function\"))f=d,d=c,c=null;else if(e(c,\"object\")){var i=[];for(var j in c)c.hasOwnProperty(j)&&i.push(encodeURIComponent(j)+\"=\"+encodeURIComponent(c[j]));c=i.join(\"&\")}return g.open(c?\"POST\":\"GET\",a,!0),c&&(g.setRequestHeader(\"X-Requested-With\",\"XMLHttpRequest\"),g.setRequestHeader(\"Content-type\",\"application/x-www-form-urlencoded\")),d&&(b.once(\"snap.ajax.\"+h+\".0\",d),b.once(\"snap.ajax.\"+h+\".200\",d),b.once(\"snap.ajax.\"+h+\".304\",d)),g.onreadystatechange=function(){4==g.readyState&&b(\"snap.ajax.\"+h+\".\"+g.status,f,g)},4==g.readyState?g:(g.send(c),g)}},c.load=function(a,b,d){c.ajax(a,function(a){var e=c.parse(a.responseText);d?b.call(d,e):b(e)})};var cb=function(a){var b=a.getBoundingClientRect(),c=a.ownerDocument,d=c.body,e=c.documentElement,f=e.clientTop||d.clientTop||0,h=e.clientLeft||d.clientLeft||0,i=b.top+(g.win.pageYOffset||e.scrollTop||d.scrollTop)-f,j=b.left+(g.win.pageXOffset||e.scrollLeft||d.scrollLeft)-h;return{y:i,x:j}};return c.getElementByPoint=function(a,b){var c=this,d=(c.canvas,y.doc.elementFromPoint(a,b));if(y.win.opera&&\"svg\"==d.tagName){var e=cb(d),f=d.createSVGRect();f.x=a-e.x,f.y=b-e.y,f.width=f.height=1;var g=d.getIntersectionList(f,null);g.length&&(d=g[g.length-1])}return d?w(d):null},c.plugin=function(a){a(c,s,v,y,t)},y.win.Snap=c,c}(a||this);return d.plugin(function(d,e,f,g,h){function i(a,b){if(null==b){var c=!0;if(b=a.node.getAttribute(\"linearGradient\"==a.type||\"radialGradient\"==a.type?\"gradientTransform\":\"pattern\"==a.type?\"patternTransform\":\"transform\"),!b)return new d.Matrix;b=d._.svgTransform2string(b)}else b=d._.rgTransform.test(b)?o(b).replace(/\\.{3}|\\u2026/g,a._.transform||\"\"):d._.svgTransform2string(b),n(b,\"array\")&&(b=d.path?d.path.toString.call(b):o(b)),a._.transform=b;var e=d._.transform2matrix(b,a.getBBox(1));return c?e:void(a.matrix=e)}function j(a){function b(a,b){var c=q(a.node,b);c=c&&c.match(f),c=c&&c[2],c&&\"#\"==c.charAt()&&(c=c.substring(1),c&&(h[c]=(h[c]||[]).concat(function(c){var d={};d[b]=URL(c),q(a.node,d)})))}function c(a){var b=q(a.node,\"xlink:href\");b&&\"#\"==b.charAt()&&(b=b.substring(1),b&&(h[b]=(h[b]||[]).concat(function(b){a.attr(\"xlink:href\",\"#\"+b)})))}for(var d,e=a.selectAll(\"*\"),f=/^\\s*url\\((\"|'|)(.*)\\1\\)\\s*$/,g=[],h={},i=0,j=e.length;j>i;i++){d=e[i],b(d,\"fill\"),b(d,\"stroke\"),b(d,\"filter\"),b(d,\"mask\"),b(d,\"clip-path\"),c(d);var k=q(d.node,\"id\");k&&(q(d.node,{id:d.id}),g.push({old:k,id:d.id}))}for(i=0,j=g.length;j>i;i++){var l=h[g[i].old];if(l)for(var m=0,n=l.length;n>m;m++)l[m](g[i].id)}}function k(a,b,c){return function(d){var e=d.slice(a,b);return 1==e.length&&(e=e[0]),c?c(e):e}}function l(a){return function(){var b=a?\"<\"+this.type:\"\",c=this.node.attributes,d=this.node.childNodes;if(a)for(var e=0,f=c.length;f>e;e++)b+=\" \"+c[e].name+'=\"'+c[e].value.replace(/\"/g,'\\\\\"')+'\"';if(d.length){for(a&&(b+=\">\"),e=0,f=d.length;f>e;e++)3==d[e].nodeType?b+=d[e].nodeValue:1==d[e].nodeType&&(b+=u(d[e]).toString());a&&(b+=\"</\"+this.type+\">\")}else a&&(b+=\"/>\");return b}}var m=e.prototype,n=d.is,o=String,p=d._unit2px,q=d._.$,r=d._.make,s=d._.getSomeDefs,t=\"hasOwnProperty\",u=d._.wrap;m.getBBox=function(a){if(!d.Matrix||!d.path)return this.node.getBBox();var b=this,c=new d.Matrix;if(b.removed)return d._.box();for(;\"use\"==b.type;)if(a||(c=c.add(b.transform().localMatrix.translate(b.attr(\"x\")||0,b.attr(\"y\")||0))),b.original)b=b.original;else{var e=b.attr(\"xlink:href\");b=b.original=b.node.ownerDocument.getElementById(e.substring(e.indexOf(\"#\")+1))}var f=b._,g=d.path.get[b.type]||d.path.get.deflt;try{return a?(f.bboxwt=g?d.path.getBBox(b.realPath=g(b)):d._.box(b.node.getBBox()),d._.box(f.bboxwt)):(b.realPath=g(b),b.matrix=b.transform().localMatrix,f.bbox=d.path.getBBox(d.path.map(b.realPath,c.add(b.matrix))),d._.box(f.bbox))}catch(h){return d._.box()}};var v=function(){return this.string};m.transform=function(a){var b=this._;if(null==a){for(var c,e=this,f=new d.Matrix(this.node.getCTM()),g=i(this),h=[g],j=new d.Matrix,k=g.toTransformString(),l=o(g)==o(this.matrix)?o(b.transform):k;\"svg\"!=e.type&&(e=e.parent());)h.push(i(e));for(c=h.length;c--;)j.add(h[c]);return{string:l,globalMatrix:f,totalMatrix:j,localMatrix:g,diffMatrix:f.clone().add(g.invert()),global:f.toTransformString(),total:j.toTransformString(),local:k,toString:v}}return a instanceof d.Matrix?(this.matrix=a,this._.transform=a.toTransformString()):i(this,a),this.node&&(\"linearGradient\"==this.type||\"radialGradient\"==this.type?q(this.node,{gradientTransform:this.matrix}):\"pattern\"==this.type?q(this.node,{patternTransform:this.matrix}):q(this.node,{transform:this.matrix})),this},m.parent=function(){return u(this.node.parentNode)},m.append=m.add=function(a){if(a){if(\"set\"==a.type){var b=this;return a.forEach(function(a){b.add(a)}),this}a=u(a),this.node.appendChild(a.node),a.paper=this.paper}return this},m.appendTo=function(a){return a&&(a=u(a),a.append(this)),this},m.prepend=function(a){if(a){if(\"set\"==a.type){var b,c=this;return a.forEach(function(a){b?b.after(a):c.prepend(a),b=a}),this}a=u(a);var d=a.parent();this.node.insertBefore(a.node,this.node.firstChild),this.add&&this.add(),a.paper=this.paper,this.parent()&&this.parent().add(),d&&d.add()}return this},m.prependTo=function(a){return a=u(a),a.prepend(this),this},m.before=function(a){if(\"set\"==a.type){var b=this;return a.forEach(function(a){var c=a.parent();b.node.parentNode.insertBefore(a.node,b.node),c&&c.add()}),this.parent().add(),this}a=u(a);var c=a.parent();return this.node.parentNode.insertBefore(a.node,this.node),this.parent()&&this.parent().add(),c&&c.add(),a.paper=this.paper,this},m.after=function(a){a=u(a);var b=a.parent();return this.node.nextSibling?this.node.parentNode.insertBefore(a.node,this.node.nextSibling):this.node.parentNode.appendChild(a.node),this.parent()&&this.parent().add(),b&&b.add(),a.paper=this.paper,this},m.insertBefore=function(a){a=u(a);var b=this.parent();return a.node.parentNode.insertBefore(this.node,a.node),this.paper=a.paper,b&&b.add(),a.parent()&&a.parent().add(),this},m.insertAfter=function(a){a=u(a);var b=this.parent();return a.node.parentNode.insertBefore(this.node,a.node.nextSibling),this.paper=a.paper,b&&b.add(),a.parent()&&a.parent().add(),this},m.remove=function(){var a=this.parent();return this.node.parentNode&&this.node.parentNode.removeChild(this.node),delete this.paper,this.removed=!0,a&&a.add(),this},m.select=function(a){return u(this.node.querySelector(a))},m.selectAll=function(a){for(var b=this.node.querySelectorAll(a),c=(d.set||Array)(),e=0;e<b.length;e++)c.push(u(b[e]));return c},m.asPX=function(a,b){return null==b&&(b=this.attr(a)),+p(this,a,b)},m.use=function(){var a,b=this.node.id;return b||(b=this.id,q(this.node,{id:b})),a=\"linearGradient\"==this.type||\"radialGradient\"==this.type||\"pattern\"==this.type?r(this.type,this.node.parentNode):r(\"use\",this.node.parentNode),q(a.node,{\"xlink:href\":\"#\"+b}),a.original=this,a},m.clone=function(){var a=u(this.node.cloneNode(!0));return q(a.node,\"id\")&&q(a.node,{id:a.id}),j(a),a.insertAfter(this),a},m.toDefs=function(){var a=s(this);return a.appendChild(this.node),this},m.pattern=m.toPattern=function(a,b,c,d){var e=r(\"pattern\",s(this));return null==a&&(a=this.getBBox()),n(a,\"object\")&&\"x\"in a&&(b=a.y,c=a.width,d=a.height,a=a.x),q(e.node,{x:a,y:b,width:c,height:d,patternUnits:\"userSpaceOnUse\",id:e.id,viewBox:[a,b,c,d].join(\" \")}),e.node.appendChild(this.node),e},m.marker=function(a,b,c,d,e,f){var g=r(\"marker\",s(this));return null==a&&(a=this.getBBox()),n(a,\"object\")&&\"x\"in a&&(b=a.y,c=a.width,d=a.height,e=a.refX||a.cx,f=a.refY||a.cy,a=a.x),q(g.node,{viewBox:[a,b,c,d].join(\" \"),markerWidth:c,markerHeight:d,orient:\"auto\",refX:e||0,refY:f||0,id:g.id}),g.node.appendChild(this.node),g};var w=function(a,b,d,e){\"function\"!=typeof d||d.length||(e=d,d=c.linear),this.attr=a,this.dur=b,d&&(this.easing=d),e&&(this.callback=e)};d._.Animation=w,d.animation=function(a,b,c,d){return new w(a,b,c,d)},m.inAnim=function(){var a=this,b=[];for(var c in a.anims)a.anims[t](c)&&!function(a){b.push({anim:new w(a._attrs,a.dur,a.easing,a._callback),mina:a,curStatus:a.status(),status:function(b){return a.status(b)},stop:function(){a.stop()}})}(a.anims[c]);return b},d.animate=function(a,d,e,f,g,h){\"function\"!=typeof g||g.length||(h=g,g=c.linear);var i=c.time(),j=c(a,d,i,i+f,c.time,e,g);return h&&b.once(\"mina.finish.\"+j.id,h),j},m.stop=function(){for(var a=this.inAnim(),b=0,c=a.length;c>b;b++)a[b].stop();return this},m.animate=function(a,d,e,f){\"function\"!=typeof e||e.length||(f=e,e=c.linear),a instanceof w&&(f=a.callback,e=a.easing,d=a.dur,a=a.attr);var g,h,i,j,l=[],m=[],p={},q=this;for(var r in a)if(a[t](r)){q.equal?(j=q.equal(r,o(a[r])),g=j.from,h=j.to,i=j.f):(g=+q.attr(r),h=+a[r]);var s=n(g,\"array\")?g.length:1;p[r]=k(l.length,l.length+s,i),l=l.concat(g),m=m.concat(h)}var u=c.time(),v=c(l,m,u,u+d,c.time,function(a){var b={};for(var c in p)p[t](c)&&(b[c]=p[c](a));q.attr(b)},e);return q.anims[v.id]=v,v._attrs=a,v._callback=f,b(\"snap.animcreated.\"+q.id,v),b.once(\"mina.finish.\"+v.id,function(){delete q.anims[v.id],f&&f.call(q)}),b.once(\"mina.stop.\"+v.id,function(){delete q.anims[v.id]}),q};var x={};m.data=function(a,c){var e=x[this.id]=x[this.id]||{};if(0==arguments.length)return b(\"snap.data.get.\"+this.id,this,e,null),e;\n    if(1==arguments.length){if(d.is(a,\"object\")){for(var f in a)a[t](f)&&this.data(f,a[f]);return this}return b(\"snap.data.get.\"+this.id,this,e[a],a),e[a]}return e[a]=c,b(\"snap.data.set.\"+this.id,this,c,a),this},m.removeData=function(a){return null==a?x[this.id]={}:x[this.id]&&delete x[this.id][a],this},m.outerSVG=m.toString=l(1),m.innerSVG=l(),m.toDataURL=function(){if(a&&a.btoa){var b=this.getBBox(),c=d.format('<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"{width}\" height=\"{height}\" viewBox=\"{x} {y} {width} {height}\">{contents}</svg>',{x:+b.x.toFixed(3),y:+b.y.toFixed(3),width:+b.width.toFixed(3),height:+b.height.toFixed(3),contents:this.outerSVG()});return\"data:image/svg+xml;base64,\"+btoa(unescape(encodeURIComponent(c)))}},h.prototype.select=m.select,h.prototype.selectAll=m.selectAll}),d.plugin(function(a){function b(a,b,d,e,f,g){return null==b&&\"[object SVGMatrix]\"==c.call(a)?(this.a=a.a,this.b=a.b,this.c=a.c,this.d=a.d,this.e=a.e,void(this.f=a.f)):void(null!=a?(this.a=+a,this.b=+b,this.c=+d,this.d=+e,this.e=+f,this.f=+g):(this.a=1,this.b=0,this.c=0,this.d=1,this.e=0,this.f=0))}var c=Object.prototype.toString,d=String,e=Math,f=\"\";!function(c){function g(a){return a[0]*a[0]+a[1]*a[1]}function h(a){var b=e.sqrt(g(a));a[0]&&(a[0]/=b),a[1]&&(a[1]/=b)}c.add=function(a,c,d,e,f,g){var h,i,j,k,l=[[],[],[]],m=[[this.a,this.c,this.e],[this.b,this.d,this.f],[0,0,1]],n=[[a,d,f],[c,e,g],[0,0,1]];for(a&&a instanceof b&&(n=[[a.a,a.c,a.e],[a.b,a.d,a.f],[0,0,1]]),h=0;3>h;h++)for(i=0;3>i;i++){for(k=0,j=0;3>j;j++)k+=m[h][j]*n[j][i];l[h][i]=k}return this.a=l[0][0],this.b=l[1][0],this.c=l[0][1],this.d=l[1][1],this.e=l[0][2],this.f=l[1][2],this},c.invert=function(){var a=this,c=a.a*a.d-a.b*a.c;return new b(a.d/c,-a.b/c,-a.c/c,a.a/c,(a.c*a.f-a.d*a.e)/c,(a.b*a.e-a.a*a.f)/c)},c.clone=function(){return new b(this.a,this.b,this.c,this.d,this.e,this.f)},c.translate=function(a,b){return this.add(1,0,0,1,a,b)},c.scale=function(a,b,c,d){return null==b&&(b=a),(c||d)&&this.add(1,0,0,1,c,d),this.add(a,0,0,b,0,0),(c||d)&&this.add(1,0,0,1,-c,-d),this},c.rotate=function(b,c,d){b=a.rad(b),c=c||0,d=d||0;var f=+e.cos(b).toFixed(9),g=+e.sin(b).toFixed(9);return this.add(f,g,-g,f,c,d),this.add(1,0,0,1,-c,-d)},c.x=function(a,b){return a*this.a+b*this.c+this.e},c.y=function(a,b){return a*this.b+b*this.d+this.f},c.get=function(a){return+this[d.fromCharCode(97+a)].toFixed(4)},c.toString=function(){return\"matrix(\"+[this.get(0),this.get(1),this.get(2),this.get(3),this.get(4),this.get(5)].join()+\")\"},c.offset=function(){return[this.e.toFixed(4),this.f.toFixed(4)]},c.determinant=function(){return this.a*this.d-this.b*this.c},c.split=function(){var b={};b.dx=this.e,b.dy=this.f;var c=[[this.a,this.c],[this.b,this.d]];b.scalex=e.sqrt(g(c[0])),h(c[0]),b.shear=c[0][0]*c[1][0]+c[0][1]*c[1][1],c[1]=[c[1][0]-c[0][0]*b.shear,c[1][1]-c[0][1]*b.shear],b.scaley=e.sqrt(g(c[1])),h(c[1]),b.shear/=b.scaley,this.determinant()<0&&(b.scalex=-b.scalex);var d=-c[0][1],f=c[1][1];return 0>f?(b.rotate=a.deg(e.acos(f)),0>d&&(b.rotate=360-b.rotate)):b.rotate=a.deg(e.asin(d)),b.isSimple=!(+b.shear.toFixed(9)||b.scalex.toFixed(9)!=b.scaley.toFixed(9)&&b.rotate),b.isSuperSimple=!+b.shear.toFixed(9)&&b.scalex.toFixed(9)==b.scaley.toFixed(9)&&!b.rotate,b.noRotation=!+b.shear.toFixed(9)&&!b.rotate,b},c.toTransformString=function(a){var b=a||this.split();return+b.shear.toFixed(9)?\"m\"+[this.get(0),this.get(1),this.get(2),this.get(3),this.get(4),this.get(5)]:(b.scalex=+b.scalex.toFixed(4),b.scaley=+b.scaley.toFixed(4),b.rotate=+b.rotate.toFixed(4),(b.dx||b.dy?\"t\"+[+b.dx.toFixed(4),+b.dy.toFixed(4)]:f)+(1!=b.scalex||1!=b.scaley?\"s\"+[b.scalex,b.scaley,0,0]:f)+(b.rotate?\"r\"+[+b.rotate.toFixed(4),0,0]:f))}}(b.prototype),a.Matrix=b,a.matrix=function(a,c,d,e,f,g){return new b(a,c,d,e,f,g)}}),d.plugin(function(a,c,d,e,f){function g(d){return function(e){if(b.stop(),e instanceof f&&1==e.node.childNodes.length&&(\"radialGradient\"==e.node.firstChild.tagName||\"linearGradient\"==e.node.firstChild.tagName||\"pattern\"==e.node.firstChild.tagName)&&(e=e.node.firstChild,n(this).appendChild(e),e=l(e)),e instanceof c)if(\"radialGradient\"==e.type||\"linearGradient\"==e.type||\"pattern\"==e.type){e.node.id||p(e.node,{id:e.id});var g=q(e.node.id)}else g=e.attr(d);else if(g=a.color(e),g.error){var h=a(n(this).ownerSVGElement).gradient(e);h?(h.node.id||p(h.node,{id:h.id}),g=q(h.node.id)):g=e}else g=r(g);var i={};i[d]=g,p(this.node,i),this.node.style[d]=t}}function h(a){b.stop(),a==+a&&(a+=\"px\"),this.node.style.fontSize=a}function i(a){for(var b=[],c=a.childNodes,d=0,e=c.length;e>d;d++){var f=c[d];3==f.nodeType&&b.push(f.nodeValue),\"tspan\"==f.tagName&&b.push(1==f.childNodes.length&&3==f.firstChild.nodeType?f.firstChild.nodeValue:i(f))}return b}function j(){return b.stop(),this.node.style.fontSize}var k=a._.make,l=a._.wrap,m=a.is,n=a._.getSomeDefs,o=/^url\\(#?([^)]+)\\)$/,p=a._.$,q=a.url,r=String,s=a._.separator,t=\"\";b.on(\"snap.util.attr.mask\",function(a){if(a instanceof c||a instanceof f){if(b.stop(),a instanceof f&&1==a.node.childNodes.length&&(a=a.node.firstChild,n(this).appendChild(a),a=l(a)),\"mask\"==a.type)var d=a;else d=k(\"mask\",n(this)),d.node.appendChild(a.node);!d.node.id&&p(d.node,{id:d.id}),p(this.node,{mask:q(d.id)})}}),function(a){b.on(\"snap.util.attr.clip\",a),b.on(\"snap.util.attr.clip-path\",a),b.on(\"snap.util.attr.clipPath\",a)}(function(a){if(a instanceof c||a instanceof f){if(b.stop(),\"clipPath\"==a.type)var d=a;else d=k(\"clipPath\",n(this)),d.node.appendChild(a.node),!d.node.id&&p(d.node,{id:d.id});p(this.node,{\"clip-path\":q(d.node.id||d.id)})}}),b.on(\"snap.util.attr.fill\",g(\"fill\")),b.on(\"snap.util.attr.stroke\",g(\"stroke\"));var u=/^([lr])(?:\\(([^)]*)\\))?(.*)$/i;b.on(\"snap.util.grad.parse\",function(a){a=r(a);var b=a.match(u);if(!b)return null;var c=b[1],d=b[2],e=b[3];return d=d.split(/\\s*,\\s*/).map(function(a){return+a==a?+a:a}),1==d.length&&0==d[0]&&(d=[]),e=e.split(\"-\"),e=e.map(function(a){a=a.split(\":\");var b={color:a[0]};return a[1]&&(b.offset=parseFloat(a[1])),b}),{type:c,params:d,stops:e}}),b.on(\"snap.util.attr.d\",function(c){b.stop(),m(c,\"array\")&&m(c[0],\"array\")&&(c=a.path.toString.call(c)),c=r(c),c.match(/[ruo]/i)&&(c=a.path.toAbsolute(c)),p(this.node,{d:c})})(-1),b.on(\"snap.util.attr.#text\",function(a){b.stop(),a=r(a);for(var c=e.doc.createTextNode(a);this.node.firstChild;)this.node.removeChild(this.node.firstChild);this.node.appendChild(c)})(-1),b.on(\"snap.util.attr.path\",function(a){b.stop(),this.attr({d:a})})(-1),b.on(\"snap.util.attr.class\",function(a){b.stop(),this.node.className.baseVal=a})(-1),b.on(\"snap.util.attr.viewBox\",function(a){var c;c=m(a,\"object\")&&\"x\"in a?[a.x,a.y,a.width,a.height].join(\" \"):m(a,\"array\")?a.join(\" \"):a,p(this.node,{viewBox:c}),b.stop()})(-1),b.on(\"snap.util.attr.transform\",function(a){this.transform(a),b.stop()})(-1),b.on(\"snap.util.attr.r\",function(a){\"rect\"==this.type&&(b.stop(),p(this.node,{rx:a,ry:a}))})(-1),b.on(\"snap.util.attr.textpath\",function(a){if(b.stop(),\"text\"==this.type){var d,e,f;if(!a&&this.textPath){for(e=this.textPath;e.node.firstChild;)this.node.appendChild(e.node.firstChild);return e.remove(),void delete this.textPath}if(m(a,\"string\")){var g=n(this),h=l(g.parentNode).path(a);g.appendChild(h.node),d=h.id,h.attr({id:d})}else a=l(a),a instanceof c&&(d=a.attr(\"id\"),d||(d=a.id,a.attr({id:d})));if(d)if(e=this.textPath,f=this.node,e)e.attr({\"xlink:href\":\"#\"+d});else{for(e=p(\"textPath\",{\"xlink:href\":\"#\"+d});f.firstChild;)e.appendChild(f.firstChild);f.appendChild(e),this.textPath=l(e)}}})(-1),b.on(\"snap.util.attr.text\",function(a){if(\"text\"==this.type){for(var c=this.node,d=function(a){var b=p(\"tspan\");if(m(a,\"array\"))for(var c=0;c<a.length;c++)b.appendChild(d(a[c]));else b.appendChild(e.doc.createTextNode(a));return b.normalize&&b.normalize(),b};c.firstChild;)c.removeChild(c.firstChild);for(var f=d(a);f.firstChild;)c.appendChild(f.firstChild)}b.stop()})(-1),b.on(\"snap.util.attr.fontSize\",h)(-1),b.on(\"snap.util.attr.font-size\",h)(-1),b.on(\"snap.util.getattr.transform\",function(){return b.stop(),this.transform()})(-1),b.on(\"snap.util.getattr.textpath\",function(){return b.stop(),this.textPath})(-1),function(){function c(c){return function(){b.stop();var d=e.doc.defaultView.getComputedStyle(this.node,null).getPropertyValue(\"marker-\"+c);return\"none\"==d?d:a(e.doc.getElementById(d.match(o)[1]))}}function d(a){return function(c){b.stop();var d=\"marker\"+a.charAt(0).toUpperCase()+a.substring(1);if(\"\"==c||!c)return void(this.node.style[d]=\"none\");if(\"marker\"==c.type){var e=c.node.id;return e||p(c.node,{id:c.id}),void(this.node.style[d]=q(e))}}}b.on(\"snap.util.getattr.marker-end\",c(\"end\"))(-1),b.on(\"snap.util.getattr.markerEnd\",c(\"end\"))(-1),b.on(\"snap.util.getattr.marker-start\",c(\"start\"))(-1),b.on(\"snap.util.getattr.markerStart\",c(\"start\"))(-1),b.on(\"snap.util.getattr.marker-mid\",c(\"mid\"))(-1),b.on(\"snap.util.getattr.markerMid\",c(\"mid\"))(-1),b.on(\"snap.util.attr.marker-end\",d(\"end\"))(-1),b.on(\"snap.util.attr.markerEnd\",d(\"end\"))(-1),b.on(\"snap.util.attr.marker-start\",d(\"start\"))(-1),b.on(\"snap.util.attr.markerStart\",d(\"start\"))(-1),b.on(\"snap.util.attr.marker-mid\",d(\"mid\"))(-1),b.on(\"snap.util.attr.markerMid\",d(\"mid\"))(-1)}(),b.on(\"snap.util.getattr.r\",function(){return\"rect\"==this.type&&p(this.node,\"rx\")==p(this.node,\"ry\")?(b.stop(),p(this.node,\"rx\")):void 0})(-1),b.on(\"snap.util.getattr.text\",function(){if(\"text\"==this.type||\"tspan\"==this.type){b.stop();var a=i(this.node);return 1==a.length?a[0]:a}})(-1),b.on(\"snap.util.getattr.#text\",function(){return this.node.textContent})(-1),b.on(\"snap.util.getattr.viewBox\",function(){b.stop();var c=p(this.node,\"viewBox\");return c?(c=c.split(s),a._.box(+c[0],+c[1],+c[2],+c[3])):void 0})(-1),b.on(\"snap.util.getattr.points\",function(){var a=p(this.node,\"points\");return b.stop(),a?a.split(s):void 0})(-1),b.on(\"snap.util.getattr.path\",function(){var a=p(this.node,\"d\");return b.stop(),a})(-1),b.on(\"snap.util.getattr.class\",function(){return this.node.className.baseVal})(-1),b.on(\"snap.util.getattr.fontSize\",j)(-1),b.on(\"snap.util.getattr.font-size\",j)(-1)}),d.plugin(function(a,b){var c=/\\S+/g,d=String,e=b.prototype;e.addClass=function(a){var b,e,f,g,h=d(a||\"\").match(c)||[],i=this.node,j=i.className.baseVal,k=j.match(c)||[];if(h.length){for(b=0;f=h[b++];)e=k.indexOf(f),~e||k.push(f);g=k.join(\" \"),j!=g&&(i.className.baseVal=g)}return this},e.removeClass=function(a){var b,e,f,g,h=d(a||\"\").match(c)||[],i=this.node,j=i.className.baseVal,k=j.match(c)||[];if(k.length){for(b=0;f=h[b++];)e=k.indexOf(f),~e&&k.splice(e,1);g=k.join(\" \"),j!=g&&(i.className.baseVal=g)}return this},e.hasClass=function(a){var b=this.node,d=b.className.baseVal,e=d.match(c)||[];return!!~e.indexOf(a)},e.toggleClass=function(a,b){if(null!=b)return b?this.addClass(a):this.removeClass(a);var d,e,f,g,h=(a||\"\").match(c)||[],i=this.node,j=i.className.baseVal,k=j.match(c)||[];for(d=0;f=h[d++];)e=k.indexOf(f),~e?k.splice(e,1):k.push(f);return g=k.join(\" \"),j!=g&&(i.className.baseVal=g),this}}),d.plugin(function(){function a(a){return a}function c(a){return function(b){return+b.toFixed(3)+a}}var d={\"+\":function(a,b){return a+b},\"-\":function(a,b){return a-b},\"/\":function(a,b){return a/b},\"*\":function(a,b){return a*b}},e=String,f=/[a-z]+$/i,g=/^\\s*([+\\-\\/*])\\s*=\\s*([\\d.eE+\\-]+)\\s*([^\\d\\s]+)?\\s*$/;b.on(\"snap.util.attr\",function(a){var c=e(a).match(g);if(c){var h=b.nt(),i=h.substring(h.lastIndexOf(\".\")+1),j=this.attr(i),k={};b.stop();var l=c[3]||\"\",m=j.match(f),n=d[c[1]];if(m&&m==l?a=n(parseFloat(j),+c[2]):(j=this.asPX(i),a=n(this.asPX(i),this.asPX(i,c[2]+l))),isNaN(j)||isNaN(a))return;k[i]=a,this.attr(k)}})(-10),b.on(\"snap.util.equal\",function(h,i){var j=e(this.attr(h)||\"\"),k=e(i).match(g);if(k){b.stop();var l=k[3]||\"\",m=j.match(f),n=d[k[1]];return m&&m==l?{from:parseFloat(j),to:n(parseFloat(j),+k[2]),f:c(m)}:(j=this.asPX(h),{from:j,to:n(j,this.asPX(h,k[2]+l)),f:a})}})(-10)}),d.plugin(function(c,d,e,f){var g=e.prototype,h=c.is;g.rect=function(a,b,c,d,e,f){var g;return null==f&&(f=e),h(a,\"object\")&&\"[object Object]\"==a?g=a:null!=a&&(g={x:a,y:b,width:c,height:d},null!=e&&(g.rx=e,g.ry=f)),this.el(\"rect\",g)},g.circle=function(a,b,c){var d;return h(a,\"object\")&&\"[object Object]\"==a?d=a:null!=a&&(d={cx:a,cy:b,r:c}),this.el(\"circle\",d)};var i=function(){function a(){this.parentNode.removeChild(this)}return function(b,c){var d=f.doc.createElement(\"img\"),e=f.doc.body;d.style.cssText=\"position:absolute;left:-9999em;top:-9999em\",d.onload=function(){c.call(d),d.onload=d.onerror=null,e.removeChild(d)},d.onerror=a,e.appendChild(d),d.src=b}}();g.image=function(a,b,d,e,f){var g=this.el(\"image\");if(h(a,\"object\")&&\"src\"in a)g.attr(a);else if(null!=a){var j={\"xlink:href\":a,preserveAspectRatio:\"none\"};null!=b&&null!=d&&(j.x=b,j.y=d),null!=e&&null!=f?(j.width=e,j.height=f):i(a,function(){c._.$(g.node,{width:this.offsetWidth,height:this.offsetHeight})}),c._.$(g.node,j)}return g},g.ellipse=function(a,b,c,d){var e;return h(a,\"object\")&&\"[object Object]\"==a?e=a:null!=a&&(e={cx:a,cy:b,rx:c,ry:d}),this.el(\"ellipse\",e)},g.path=function(a){var b;return h(a,\"object\")&&!h(a,\"array\")?b=a:a&&(b={d:a}),this.el(\"path\",b)},g.group=g.g=function(a){var b=this.el(\"g\");return 1==arguments.length&&a&&!a.type?b.attr(a):arguments.length&&b.add(Array.prototype.slice.call(arguments,0)),b},g.svg=function(a,b,c,d,e,f,g,i){var j={};return h(a,\"object\")&&null==b?j=a:(null!=a&&(j.x=a),null!=b&&(j.y=b),null!=c&&(j.width=c),null!=d&&(j.height=d),null!=e&&null!=f&&null!=g&&null!=i&&(j.viewBox=[e,f,g,i])),this.el(\"svg\",j)},g.mask=function(a){var b=this.el(\"mask\");return 1==arguments.length&&a&&!a.type?b.attr(a):arguments.length&&b.add(Array.prototype.slice.call(arguments,0)),b},g.ptrn=function(a,b,c,d,e,f,g,i){if(h(a,\"object\"))var j=a;else j={patternUnits:\"userSpaceOnUse\"},a&&(j.x=a),b&&(j.y=b),null!=c&&(j.width=c),null!=d&&(j.height=d),j.viewBox=null!=e&&null!=f&&null!=g&&null!=i?[e,f,g,i]:[a||0,b||0,c||0,d||0];return this.el(\"pattern\",j)},g.use=function(a){return null!=a?(a instanceof d&&(a.attr(\"id\")||a.attr({id:c._.id(a)}),a=a.attr(\"id\")),\"#\"==String(a).charAt()&&(a=a.substring(1)),this.el(\"use\",{\"xlink:href\":\"#\"+a})):d.prototype.use.call(this)},g.symbol=function(a,b,c,d){var e={};return null!=a&&null!=b&&null!=c&&null!=d&&(e.viewBox=[a,b,c,d]),this.el(\"symbol\",e)},g.text=function(a,b,c){var d={};return h(a,\"object\")?d=a:null!=a&&(d={x:a,y:b,text:c||\"\"}),this.el(\"text\",d)},g.line=function(a,b,c,d){var e={};return h(a,\"object\")?e=a:null!=a&&(e={x1:a,x2:c,y1:b,y2:d}),this.el(\"line\",e)},g.polyline=function(a){arguments.length>1&&(a=Array.prototype.slice.call(arguments,0));var b={};return h(a,\"object\")&&!h(a,\"array\")?b=a:null!=a&&(b={points:a}),this.el(\"polyline\",b)},g.polygon=function(a){arguments.length>1&&(a=Array.prototype.slice.call(arguments,0));var b={};return h(a,\"object\")&&!h(a,\"array\")?b=a:null!=a&&(b={points:a}),this.el(\"polygon\",b)},function(){function d(){return this.selectAll(\"stop\")}function e(a,b){var d=k(\"stop\"),e={offset:+b+\"%\"};return a=c.color(a),e[\"stop-color\"]=a.hex,a.opacity<1&&(e[\"stop-opacity\"]=a.opacity),k(d,e),this.node.appendChild(d),this}function f(){if(\"linearGradient\"==this.type){var a=k(this.node,\"x1\")||0,b=k(this.node,\"x2\")||1,d=k(this.node,\"y1\")||0,e=k(this.node,\"y2\")||0;return c._.box(a,d,math.abs(b-a),math.abs(e-d))}var f=this.node.cx||.5,g=this.node.cy||.5,h=this.node.r||0;return c._.box(f-h,g-h,2*h,2*h)}function h(a,c){function d(a,b){for(var c=(b-l)/(a-m),d=m;a>d;d++)g[d].offset=+(+l+c*(d-m)).toFixed(2);m=a,l=b}var e,f=b(\"snap.util.grad.parse\",null,c).firstDefined();if(!f)return null;f.params.unshift(a),e=\"l\"==f.type.toLowerCase()?i.apply(0,f.params):j.apply(0,f.params),f.type!=f.type.toLowerCase()&&k(e.node,{gradientUnits:\"userSpaceOnUse\"});var g=f.stops,h=g.length,l=0,m=0;h--;for(var n=0;h>n;n++)\"offset\"in g[n]&&d(n,g[n].offset);for(g[h].offset=g[h].offset||100,d(h,g[h].offset),n=0;h>=n;n++){var o=g[n];e.addStop(o.color,o.offset)}return e}function i(a,b,g,h,i){var j=c._.make(\"linearGradient\",a);return j.stops=d,j.addStop=e,j.getBBox=f,null!=b&&k(j.node,{x1:b,y1:g,x2:h,y2:i}),j}function j(a,b,g,h,i,j){var l=c._.make(\"radialGradient\",a);return l.stops=d,l.addStop=e,l.getBBox=f,null!=b&&k(l.node,{cx:b,cy:g,r:h}),null!=i&&null!=j&&k(l.node,{fx:i,fy:j}),l}var k=c._.$;g.gradient=function(a){return h(this.defs,a)},g.gradientLinear=function(a,b,c,d){return i(this.defs,a,b,c,d)},g.gradientRadial=function(a,b,c,d,e){return j(this.defs,a,b,c,d,e)},g.toString=function(){var a,b=this.node.ownerDocument,d=b.createDocumentFragment(),e=b.createElement(\"div\"),f=this.node.cloneNode(!0);return d.appendChild(e),e.appendChild(f),c._.$(f,{xmlns:\"http://www.w3.org/2000/svg\"}),a=e.innerHTML,d.removeChild(d.firstChild),a},g.toDataURL=function(){return a&&a.btoa?\"data:image/svg+xml;base64,\"+btoa(unescape(encodeURIComponent(this))):void 0},g.clear=function(){for(var a,b=this.node.firstChild;b;)a=b.nextSibling,\"defs\"!=b.tagName?b.parentNode.removeChild(b):g.clear.call({node:b}),b=a}}()}),d.plugin(function(a,b){function c(a){var b=c.ps=c.ps||{};return b[a]?b[a].sleep=100:b[a]={sleep:100},setTimeout(function(){for(var c in b)b[K](c)&&c!=a&&(b[c].sleep--,!b[c].sleep&&delete b[c])}),b[a]}function d(a,b,c,d){return null==a&&(a=b=c=d=0),null==b&&(b=a.y,c=a.width,d=a.height,a=a.x),{x:a,y:b,width:c,w:c,height:d,h:d,x2:a+c,y2:b+d,cx:a+c/2,cy:b+d/2,r1:N.min(c,d)/2,r2:N.max(c,d)/2,r0:N.sqrt(c*c+d*d)/2,path:w(a,b,c,d),vb:[a,b,c,d].join(\" \")}}function e(){return this.join(\",\").replace(L,\"$1\")}function f(a){var b=J(a);return b.toString=e,b}function g(a,b,c,d,e,f,g,h,j){return null==j?n(a,b,c,d,e,f,g,h):i(a,b,c,d,e,f,g,h,o(a,b,c,d,e,f,g,h,j))}function h(c,d){function e(a){return+(+a).toFixed(3)}return a._.cacher(function(a,f,h){a instanceof b&&(a=a.attr(\"d\")),a=E(a);for(var j,k,l,m,n,o=\"\",p={},q=0,r=0,s=a.length;s>r;r++){if(l=a[r],\"M\"==l[0])j=+l[1],k=+l[2];else{if(m=g(j,k,l[1],l[2],l[3],l[4],l[5],l[6]),q+m>f){if(d&&!p.start){if(n=g(j,k,l[1],l[2],l[3],l[4],l[5],l[6],f-q),o+=[\"C\"+e(n.start.x),e(n.start.y),e(n.m.x),e(n.m.y),e(n.x),e(n.y)],h)return o;p.start=o,o=[\"M\"+e(n.x),e(n.y)+\"C\"+e(n.n.x),e(n.n.y),e(n.end.x),e(n.end.y),e(l[5]),e(l[6])].join(),q+=m,j=+l[5],k=+l[6];continue}if(!c&&!d)return n=g(j,k,l[1],l[2],l[3],l[4],l[5],l[6],f-q)}q+=m,j=+l[5],k=+l[6]}o+=l.shift()+l}return p.end=o,n=c?q:d?p:i(j,k,l[0],l[1],l[2],l[3],l[4],l[5],1)},null,a._.clone)}function i(a,b,c,d,e,f,g,h,i){var j=1-i,k=R(j,3),l=R(j,2),m=i*i,n=m*i,o=k*a+3*l*i*c+3*j*i*i*e+n*g,p=k*b+3*l*i*d+3*j*i*i*f+n*h,q=a+2*i*(c-a)+m*(e-2*c+a),r=b+2*i*(d-b)+m*(f-2*d+b),s=c+2*i*(e-c)+m*(g-2*e+c),t=d+2*i*(f-d)+m*(h-2*f+d),u=j*a+i*c,v=j*b+i*d,w=j*e+i*g,x=j*f+i*h,y=90-180*N.atan2(q-s,r-t)/O;return{x:o,y:p,m:{x:q,y:r},n:{x:s,y:t},start:{x:u,y:v},end:{x:w,y:x},alpha:y}}function j(b,c,e,f,g,h,i,j){a.is(b,\"array\")||(b=[b,c,e,f,g,h,i,j]);var k=D.apply(null,b);return d(k.min.x,k.min.y,k.max.x-k.min.x,k.max.y-k.min.y)}function k(a,b,c){return b>=a.x&&b<=a.x+a.width&&c>=a.y&&c<=a.y+a.height}function l(a,b){return a=d(a),b=d(b),k(b,a.x,a.y)||k(b,a.x2,a.y)||k(b,a.x,a.y2)||k(b,a.x2,a.y2)||k(a,b.x,b.y)||k(a,b.x2,b.y)||k(a,b.x,b.y2)||k(a,b.x2,b.y2)||(a.x<b.x2&&a.x>b.x||b.x<a.x2&&b.x>a.x)&&(a.y<b.y2&&a.y>b.y||b.y<a.y2&&b.y>a.y)}function m(a,b,c,d,e){var f=-3*b+9*c-9*d+3*e,g=a*f+6*b-12*c+6*d;return a*g-3*b+3*c}function n(a,b,c,d,e,f,g,h,i){null==i&&(i=1),i=i>1?1:0>i?0:i;for(var j=i/2,k=12,l=[-.1252,.1252,-.3678,.3678,-.5873,.5873,-.7699,.7699,-.9041,.9041,-.9816,.9816],n=[.2491,.2491,.2335,.2335,.2032,.2032,.1601,.1601,.1069,.1069,.0472,.0472],o=0,p=0;k>p;p++){var q=j*l[p]+j,r=m(q,a,c,e,g),s=m(q,b,d,f,h),t=r*r+s*s;o+=n[p]*N.sqrt(t)}return j*o}function o(a,b,c,d,e,f,g,h,i){if(!(0>i||n(a,b,c,d,e,f,g,h)<i)){var j,k=1,l=k/2,m=k-l,o=.01;for(j=n(a,b,c,d,e,f,g,h,m);S(j-i)>o;)l/=2,m+=(i>j?1:-1)*l,j=n(a,b,c,d,e,f,g,h,m);return m}}function p(a,b,c,d,e,f,g,h){if(!(Q(a,c)<P(e,g)||P(a,c)>Q(e,g)||Q(b,d)<P(f,h)||P(b,d)>Q(f,h))){var i=(a*d-b*c)*(e-g)-(a-c)*(e*h-f*g),j=(a*d-b*c)*(f-h)-(b-d)*(e*h-f*g),k=(a-c)*(f-h)-(b-d)*(e-g);if(k){var l=i/k,m=j/k,n=+l.toFixed(2),o=+m.toFixed(2);if(!(n<+P(a,c).toFixed(2)||n>+Q(a,c).toFixed(2)||n<+P(e,g).toFixed(2)||n>+Q(e,g).toFixed(2)||o<+P(b,d).toFixed(2)||o>+Q(b,d).toFixed(2)||o<+P(f,h).toFixed(2)||o>+Q(f,h).toFixed(2)))return{x:l,y:m}}}}function q(a,b,c){var d=j(a),e=j(b);if(!l(d,e))return c?0:[];for(var f=n.apply(0,a),g=n.apply(0,b),h=~~(f/8),k=~~(g/8),m=[],o=[],q={},r=c?0:[],s=0;h+1>s;s++){var t=i.apply(0,a.concat(s/h));m.push({x:t.x,y:t.y,t:s/h})}for(s=0;k+1>s;s++)t=i.apply(0,b.concat(s/k)),o.push({x:t.x,y:t.y,t:s/k});for(s=0;h>s;s++)for(var u=0;k>u;u++){var v=m[s],w=m[s+1],x=o[u],y=o[u+1],z=S(w.x-v.x)<.001?\"y\":\"x\",A=S(y.x-x.x)<.001?\"y\":\"x\",B=p(v.x,v.y,w.x,w.y,x.x,x.y,y.x,y.y);if(B){if(q[B.x.toFixed(4)]==B.y.toFixed(4))continue;q[B.x.toFixed(4)]=B.y.toFixed(4);var C=v.t+S((B[z]-v[z])/(w[z]-v[z]))*(w.t-v.t),D=x.t+S((B[A]-x[A])/(y[A]-x[A]))*(y.t-x.t);C>=0&&1>=C&&D>=0&&1>=D&&(c?r++:r.push({x:B.x,y:B.y,t1:C,t2:D}))}}return r}function r(a,b){return t(a,b)}function s(a,b){return t(a,b,1)}function t(a,b,c){a=E(a),b=E(b);for(var d,e,f,g,h,i,j,k,l,m,n=c?0:[],o=0,p=a.length;p>o;o++){var r=a[o];if(\"M\"==r[0])d=h=r[1],e=i=r[2];else{\"C\"==r[0]?(l=[d,e].concat(r.slice(1)),d=l[6],e=l[7]):(l=[d,e,d,e,h,i,h,i],d=h,e=i);for(var s=0,t=b.length;t>s;s++){var u=b[s];if(\"M\"==u[0])f=j=u[1],g=k=u[2];else{\"C\"==u[0]?(m=[f,g].concat(u.slice(1)),f=m[6],g=m[7]):(m=[f,g,f,g,j,k,j,k],f=j,g=k);var v=q(l,m,c);if(c)n+=v;else{for(var w=0,x=v.length;x>w;w++)v[w].segment1=o,v[w].segment2=s,v[w].bez1=l,v[w].bez2=m;n=n.concat(v)}}}}}return n}function u(a,b,c){var d=v(a);return k(d,b,c)&&t(a,[[\"M\",b,c],[\"H\",d.x2+10]],1)%2==1}function v(a){var b=c(a);if(b.bbox)return J(b.bbox);if(!a)return d();a=E(a);for(var e,f=0,g=0,h=[],i=[],j=0,k=a.length;k>j;j++)if(e=a[j],\"M\"==e[0])f=e[1],g=e[2],h.push(f),i.push(g);else{var l=D(f,g,e[1],e[2],e[3],e[4],e[5],e[6]);h=h.concat(l.min.x,l.max.x),i=i.concat(l.min.y,l.max.y),f=e[5],g=e[6]}var m=P.apply(0,h),n=P.apply(0,i),o=Q.apply(0,h),p=Q.apply(0,i),q=d(m,n,o-m,p-n);return b.bbox=J(q),q}function w(a,b,c,d,f){if(f)return[[\"M\",+a+ +f,b],[\"l\",c-2*f,0],[\"a\",f,f,0,0,1,f,f],[\"l\",0,d-2*f],[\"a\",f,f,0,0,1,-f,f],[\"l\",2*f-c,0],[\"a\",f,f,0,0,1,-f,-f],[\"l\",0,2*f-d],[\"a\",f,f,0,0,1,f,-f],[\"z\"]];var g=[[\"M\",a,b],[\"l\",c,0],[\"l\",0,d],[\"l\",-c,0],[\"z\"]];return g.toString=e,g}function x(a,b,c,d,f){if(null==f&&null==d&&(d=c),a=+a,b=+b,c=+c,d=+d,null!=f)var g=Math.PI/180,h=a+c*Math.cos(-d*g),i=a+c*Math.cos(-f*g),j=b+c*Math.sin(-d*g),k=b+c*Math.sin(-f*g),l=[[\"M\",h,j],[\"A\",c,c,0,+(f-d>180),0,i,k]];else l=[[\"M\",a,b],[\"m\",0,-d],[\"a\",c,d,0,1,1,0,2*d],[\"a\",c,d,0,1,1,0,-2*d],[\"z\"]];return l.toString=e,l}function y(b){var d=c(b),g=String.prototype.toLowerCase;if(d.rel)return f(d.rel);a.is(b,\"array\")&&a.is(b&&b[0],\"array\")||(b=a.parsePathString(b));var h=[],i=0,j=0,k=0,l=0,m=0;\"M\"==b[0][0]&&(i=b[0][1],j=b[0][2],k=i,l=j,m++,h.push([\"M\",i,j]));for(var n=m,o=b.length;o>n;n++){var p=h[n]=[],q=b[n];if(q[0]!=g.call(q[0]))switch(p[0]=g.call(q[0]),p[0]){case\"a\":p[1]=q[1],p[2]=q[2],p[3]=q[3],p[4]=q[4],p[5]=q[5],p[6]=+(q[6]-i).toFixed(3),p[7]=+(q[7]-j).toFixed(3);break;case\"v\":p[1]=+(q[1]-j).toFixed(3);break;case\"m\":k=q[1],l=q[2];default:for(var r=1,s=q.length;s>r;r++)p[r]=+(q[r]-(r%2?i:j)).toFixed(3)}else{p=h[n]=[],\"m\"==q[0]&&(k=q[1]+i,l=q[2]+j);for(var t=0,u=q.length;u>t;t++)h[n][t]=q[t]}var v=h[n].length;switch(h[n][0]){case\"z\":i=k,j=l;break;case\"h\":i+=+h[n][v-1];break;case\"v\":j+=+h[n][v-1];break;default:i+=+h[n][v-2],j+=+h[n][v-1]}}return h.toString=e,d.rel=f(h),h}function z(b){var d=c(b);if(d.abs)return f(d.abs);if(I(b,\"array\")&&I(b&&b[0],\"array\")||(b=a.parsePathString(b)),!b||!b.length)return[[\"M\",0,0]];var g,h=[],i=0,j=0,k=0,l=0,m=0;\"M\"==b[0][0]&&(i=+b[0][1],j=+b[0][2],k=i,l=j,m++,h[0]=[\"M\",i,j]);for(var n,o,p=3==b.length&&\"M\"==b[0][0]&&\"R\"==b[1][0].toUpperCase()&&\"Z\"==b[2][0].toUpperCase(),q=m,r=b.length;r>q;q++){if(h.push(n=[]),o=b[q],g=o[0],g!=g.toUpperCase())switch(n[0]=g.toUpperCase(),n[0]){case\"A\":n[1]=o[1],n[2]=o[2],n[3]=o[3],n[4]=o[4],n[5]=o[5],n[6]=+o[6]+i,n[7]=+o[7]+j;break;case\"V\":n[1]=+o[1]+j;break;case\"H\":n[1]=+o[1]+i;break;case\"R\":for(var s=[i,j].concat(o.slice(1)),t=2,u=s.length;u>t;t++)s[t]=+s[t]+i,s[++t]=+s[t]+j;h.pop(),h=h.concat(G(s,p));break;case\"O\":h.pop(),s=x(i,j,o[1],o[2]),s.push(s[0]),h=h.concat(s);break;case\"U\":h.pop(),h=h.concat(x(i,j,o[1],o[2],o[3])),n=[\"U\"].concat(h[h.length-1].slice(-2));break;case\"M\":k=+o[1]+i,l=+o[2]+j;default:for(t=1,u=o.length;u>t;t++)n[t]=+o[t]+(t%2?i:j)}else if(\"R\"==g)s=[i,j].concat(o.slice(1)),h.pop(),h=h.concat(G(s,p)),n=[\"R\"].concat(o.slice(-2));else if(\"O\"==g)h.pop(),s=x(i,j,o[1],o[2]),s.push(s[0]),h=h.concat(s);else if(\"U\"==g)h.pop(),h=h.concat(x(i,j,o[1],o[2],o[3])),n=[\"U\"].concat(h[h.length-1].slice(-2));else for(var v=0,w=o.length;w>v;v++)n[v]=o[v];if(g=g.toUpperCase(),\"O\"!=g)switch(n[0]){case\"Z\":i=+k,j=+l;break;case\"H\":i=n[1];break;case\"V\":j=n[1];break;case\"M\":k=n[n.length-2],l=n[n.length-1];default:i=n[n.length-2],j=n[n.length-1]}}return h.toString=e,d.abs=f(h),h}function A(a,b,c,d){return[a,b,c,d,c,d]}function B(a,b,c,d,e,f){var g=1/3,h=2/3;return[g*a+h*c,g*b+h*d,g*e+h*c,g*f+h*d,e,f]}function C(b,c,d,e,f,g,h,i,j,k){var l,m=120*O/180,n=O/180*(+f||0),o=[],p=a._.cacher(function(a,b,c){var d=a*N.cos(c)-b*N.sin(c),e=a*N.sin(c)+b*N.cos(c);return{x:d,y:e}});if(k)y=k[0],z=k[1],w=k[2],x=k[3];else{l=p(b,c,-n),b=l.x,c=l.y,l=p(i,j,-n),i=l.x,j=l.y;var q=(N.cos(O/180*f),N.sin(O/180*f),(b-i)/2),r=(c-j)/2,s=q*q/(d*d)+r*r/(e*e);s>1&&(s=N.sqrt(s),d=s*d,e=s*e);var t=d*d,u=e*e,v=(g==h?-1:1)*N.sqrt(S((t*u-t*r*r-u*q*q)/(t*r*r+u*q*q))),w=v*d*r/e+(b+i)/2,x=v*-e*q/d+(c+j)/2,y=N.asin(((c-x)/e).toFixed(9)),z=N.asin(((j-x)/e).toFixed(9));y=w>b?O-y:y,z=w>i?O-z:z,0>y&&(y=2*O+y),0>z&&(z=2*O+z),h&&y>z&&(y-=2*O),!h&&z>y&&(z-=2*O)}var A=z-y;if(S(A)>m){var B=z,D=i,E=j;z=y+m*(h&&z>y?1:-1),i=w+d*N.cos(z),j=x+e*N.sin(z),o=C(i,j,d,e,f,0,h,D,E,[z,B,w,x])}A=z-y;var F=N.cos(y),G=N.sin(y),H=N.cos(z),I=N.sin(z),J=N.tan(A/4),K=4/3*d*J,L=4/3*e*J,M=[b,c],P=[b+K*G,c-L*F],Q=[i+K*I,j-L*H],R=[i,j];if(P[0]=2*M[0]-P[0],P[1]=2*M[1]-P[1],k)return[P,Q,R].concat(o);o=[P,Q,R].concat(o).join().split(\",\");for(var T=[],U=0,V=o.length;V>U;U++)T[U]=U%2?p(o[U-1],o[U],n).y:p(o[U],o[U+1],n).x;return T}function D(a,b,c,d,e,f,g,h){for(var i,j,k,l,m,n,o,p,q=[],r=[[],[]],s=0;2>s;++s)if(0==s?(j=6*a-12*c+6*e,i=-3*a+9*c-9*e+3*g,k=3*c-3*a):(j=6*b-12*d+6*f,i=-3*b+9*d-9*f+3*h,k=3*d-3*b),S(i)<1e-12){if(S(j)<1e-12)continue;l=-k/j,l>0&&1>l&&q.push(l)}else o=j*j-4*k*i,p=N.sqrt(o),0>o||(m=(-j+p)/(2*i),m>0&&1>m&&q.push(m),n=(-j-p)/(2*i),n>0&&1>n&&q.push(n));for(var t,u=q.length,v=u;u--;)l=q[u],t=1-l,r[0][u]=t*t*t*a+3*t*t*l*c+3*t*l*l*e+l*l*l*g,r[1][u]=t*t*t*b+3*t*t*l*d+3*t*l*l*f+l*l*l*h;return r[0][v]=a,r[1][v]=b,r[0][v+1]=g,r[1][v+1]=h,r[0].length=r[1].length=v+2,{min:{x:P.apply(0,r[0]),y:P.apply(0,r[1])},max:{x:Q.apply(0,r[0]),y:Q.apply(0,r[1])}}}function E(a,b){var d=!b&&c(a);if(!b&&d.curve)return f(d.curve);for(var e=z(a),g=b&&z(b),h={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},i={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},j=(function(a,b,c){var d,e;if(!a)return[\"C\",b.x,b.y,b.x,b.y,b.x,b.y];switch(!(a[0]in{T:1,Q:1})&&(b.qx=b.qy=null),a[0]){case\"M\":b.X=a[1],b.Y=a[2];break;case\"A\":a=[\"C\"].concat(C.apply(0,[b.x,b.y].concat(a.slice(1))));break;case\"S\":\"C\"==c||\"S\"==c?(d=2*b.x-b.bx,e=2*b.y-b.by):(d=b.x,e=b.y),a=[\"C\",d,e].concat(a.slice(1));break;case\"T\":\"Q\"==c||\"T\"==c?(b.qx=2*b.x-b.qx,b.qy=2*b.y-b.qy):(b.qx=b.x,b.qy=b.y),a=[\"C\"].concat(B(b.x,b.y,b.qx,b.qy,a[1],a[2]));break;case\"Q\":b.qx=a[1],b.qy=a[2],a=[\"C\"].concat(B(b.x,b.y,a[1],a[2],a[3],a[4]));break;case\"L\":a=[\"C\"].concat(A(b.x,b.y,a[1],a[2]));break;case\"H\":a=[\"C\"].concat(A(b.x,b.y,a[1],b.y));break;case\"V\":a=[\"C\"].concat(A(b.x,b.y,b.x,a[1]));break;case\"Z\":a=[\"C\"].concat(A(b.x,b.y,b.X,b.Y))}return a}),k=function(a,b){if(a[b].length>7){a[b].shift();for(var c=a[b];c.length;)m[b]=\"A\",g&&(n[b]=\"A\"),a.splice(b++,0,[\"C\"].concat(c.splice(0,6)));a.splice(b,1),r=Q(e.length,g&&g.length||0)}},l=function(a,b,c,d,f){a&&b&&\"M\"==a[f][0]&&\"M\"!=b[f][0]&&(b.splice(f,0,[\"M\",d.x,d.y]),c.bx=0,c.by=0,c.x=a[f][1],c.y=a[f][2],r=Q(e.length,g&&g.length||0))},m=[],n=[],o=\"\",p=\"\",q=0,r=Q(e.length,g&&g.length||0);r>q;q++){e[q]&&(o=e[q][0]),\"C\"!=o&&(m[q]=o,q&&(p=m[q-1])),e[q]=j(e[q],h,p),\"A\"!=m[q]&&\"C\"==o&&(m[q]=\"C\"),k(e,q),g&&(g[q]&&(o=g[q][0]),\"C\"!=o&&(n[q]=o,q&&(p=n[q-1])),g[q]=j(g[q],i,p),\"A\"!=n[q]&&\"C\"==o&&(n[q]=\"C\"),k(g,q)),l(e,g,h,i,q),l(g,e,i,h,q);var s=e[q],t=g&&g[q],u=s.length,v=g&&t.length;h.x=s[u-2],h.y=s[u-1],h.bx=M(s[u-4])||h.x,h.by=M(s[u-3])||h.y,i.bx=g&&(M(t[v-4])||i.x),i.by=g&&(M(t[v-3])||i.y),i.x=g&&t[v-2],i.y=g&&t[v-1]}return g||(d.curve=f(e)),g?[e,g]:e}function F(a,b){if(!b)return a;var c,d,e,f,g,h,i;for(a=E(a),e=0,g=a.length;g>e;e++)for(i=a[e],f=1,h=i.length;h>f;f+=2)c=b.x(i[f],i[f+1]),d=b.y(i[f],i[f+1]),i[f]=c,i[f+1]=d;return a}function G(a,b){for(var c=[],d=0,e=a.length;e-2*!b>d;d+=2){var f=[{x:+a[d-2],y:+a[d-1]},{x:+a[d],y:+a[d+1]},{x:+a[d+2],y:+a[d+3]},{x:+a[d+4],y:+a[d+5]}];b?d?e-4==d?f[3]={x:+a[0],y:+a[1]}:e-2==d&&(f[2]={x:+a[0],y:+a[1]},f[3]={x:+a[2],y:+a[3]}):f[0]={x:+a[e-2],y:+a[e-1]}:e-4==d?f[3]=f[2]:d||(f[0]={x:+a[d],y:+a[d+1]}),c.push([\"C\",(-f[0].x+6*f[1].x+f[2].x)/6,(-f[0].y+6*f[1].y+f[2].y)/6,(f[1].x+6*f[2].x-f[3].x)/6,(f[1].y+6*f[2].y-f[3].y)/6,f[2].x,f[2].y])}return c}var H=b.prototype,I=a.is,J=a._.clone,K=\"hasOwnProperty\",L=/,?([a-z]),?/gi,M=parseFloat,N=Math,O=N.PI,P=N.min,Q=N.max,R=N.pow,S=N.abs,T=h(1),U=h(),V=h(0,1),W=a._unit2px,X={path:function(a){return a.attr(\"path\")},circle:function(a){var b=W(a);return x(b.cx,b.cy,b.r)},ellipse:function(a){var b=W(a);return x(b.cx||0,b.cy||0,b.rx,b.ry)},rect:function(a){var b=W(a);return w(b.x||0,b.y||0,b.width,b.height,b.rx,b.ry)},image:function(a){var b=W(a);return w(b.x||0,b.y||0,b.width,b.height)},line:function(a){return\"M\"+[a.attr(\"x1\")||0,a.attr(\"y1\")||0,a.attr(\"x2\"),a.attr(\"y2\")]},polyline:function(a){return\"M\"+a.attr(\"points\")},polygon:function(a){return\"M\"+a.attr(\"points\")+\"z\"},deflt:function(a){var b=a.node.getBBox();return w(b.x,b.y,b.width,b.height)}};a.path=c,a.path.getTotalLength=T,a.path.getPointAtLength=U,a.path.getSubpath=function(a,b,c){if(this.getTotalLength(a)-c<1e-6)return V(a,b).end;var d=V(a,c,1);return b?V(d,b).end:d},H.getTotalLength=function(){return this.node.getTotalLength?this.node.getTotalLength():void 0},H.getPointAtLength=function(a){return U(this.attr(\"d\"),a)},H.getSubpath=function(b,c){return a.path.getSubpath(this.attr(\"d\"),b,c)},a._.box=d,a.path.findDotsAtSegment=i,a.path.bezierBBox=j,a.path.isPointInsideBBox=k,a.closest=function(b,c,e,f){for(var g=100,h=d(b-g/2,c-g/2,g,g),i=[],j=e[0].hasOwnProperty(\"x\")?function(a){return{x:e[a].x,y:e[a].y}}:function(a){return{x:e[a],y:f[a]}},l=0;1e6>=g&&!l;){for(var m=0,n=e.length;n>m;m++){var o=j(m);if(k(h,o.x,o.y)){l++,i.push(o);break}}l||(g*=2,h=d(b-g/2,c-g/2,g,g))}if(1e6!=g){var p,q=1/0;for(m=0,n=i.length;n>m;m++){var r=a.len(b,c,i[m].x,i[m].y);q>r&&(q=r,i[m].len=r,p=i[m])}return p}},a.path.isBBoxIntersect=l,a.path.intersection=r,a.path.intersectionNumber=s,a.path.isPointInside=u,a.path.getBBox=v,a.path.get=X,a.path.toRelative=y,a.path.toAbsolute=z,a.path.toCubic=E,a.path.map=F,a.path.toString=e,a.path.clone=f}),d.plugin(function(a){var d=Math.max,e=Math.min,f=function(a){if(this.items=[],this.bindings={},this.length=0,this.type=\"set\",a)for(var b=0,c=a.length;c>b;b++)a[b]&&(this[this.items.length]=this.items[this.items.length]=a[b],this.length++)},g=f.prototype;g.push=function(){for(var a,b,c=0,d=arguments.length;d>c;c++)a=arguments[c],a&&(b=this.items.length,this[b]=this.items[b]=a,this.length++);return this},g.pop=function(){return this.length&&delete this[this.length--],this.items.pop()},g.forEach=function(a,b){for(var c=0,d=this.items.length;d>c;c++)if(a.call(b,this.items[c],c)===!1)return this;return this},g.animate=function(d,e,f,g){\"function\"!=typeof f||f.length||(g=f,f=c.linear),d instanceof a._.Animation&&(g=d.callback,f=d.easing,e=f.dur,d=d.attr);var h=arguments;if(a.is(d,\"array\")&&a.is(h[h.length-1],\"array\"))var i=!0;var j,k=function(){j?this.b=j:j=this.b},l=0,m=this,n=g&&function(){++l==m.length&&g.call(this)\n};return this.forEach(function(a,c){b.once(\"snap.animcreated.\"+a.id,k),i?h[c]&&a.animate.apply(a,h[c]):a.animate(d,e,f,n)})},g.remove=function(){for(;this.length;)this.pop().remove();return this},g.bind=function(a,b,c){var d={};if(\"function\"==typeof b)this.bindings[a]=b;else{var e=c||a;this.bindings[a]=function(a){d[e]=a,b.attr(d)}}return this},g.attr=function(a){var b={};for(var c in a)this.bindings[c]?this.bindings[c](a[c]):b[c]=a[c];for(var d=0,e=this.items.length;e>d;d++)this.items[d].attr(b);return this},g.clear=function(){for(;this.length;)this.pop()},g.splice=function(a,b){a=0>a?d(this.length+a,0):a,b=d(0,e(this.length-a,b));var c,g=[],h=[],i=[];for(c=2;c<arguments.length;c++)i.push(arguments[c]);for(c=0;b>c;c++)h.push(this[a+c]);for(;c<this.length-a;c++)g.push(this[a+c]);var j=i.length;for(c=0;c<j+g.length;c++)this.items[a+c]=this[a+c]=j>c?i[c]:g[c-j];for(c=this.items.length=this.length-=b-j;this[c];)delete this[c++];return new f(h)},g.exclude=function(a){for(var b=0,c=this.length;c>b;b++)if(this[b]==a)return this.splice(b,1),!0;return!1},g.insertAfter=function(a){for(var b=this.items.length;b--;)this.items[b].insertAfter(a);return this},g.getBBox=function(){for(var a=[],b=[],c=[],f=[],g=this.items.length;g--;)if(!this.items[g].removed){var h=this.items[g].getBBox();a.push(h.x),b.push(h.y),c.push(h.x+h.width),f.push(h.y+h.height)}return a=e.apply(0,a),b=e.apply(0,b),c=d.apply(0,c),f=d.apply(0,f),{x:a,y:b,x2:c,y2:f,width:c-a,height:f-b,cx:a+(c-a)/2,cy:b+(f-b)/2}},g.clone=function(a){a=new f;for(var b=0,c=this.items.length;c>b;b++)a.push(this.items[b].clone());return a},g.toString=function(){return\"Snap‘s set\"},g.type=\"set\",a.Set=f,a.set=function(){var a=new f;return arguments.length&&a.push.apply(a,Array.prototype.slice.call(arguments,0)),a}}),d.plugin(function(a,c){function d(a){var b=a[0];switch(b.toLowerCase()){case\"t\":return[b,0,0];case\"m\":return[b,1,0,0,1,0,0];case\"r\":return 4==a.length?[b,0,a[2],a[3]]:[b,0];case\"s\":return 5==a.length?[b,1,1,a[3],a[4]]:3==a.length?[b,1,1]:[b,1]}}function e(b,c,e){c=p(c).replace(/\\.{3}|\\u2026/g,b),b=a.parseTransformString(b)||[],c=a.parseTransformString(c)||[];for(var f,g,h,i,l=Math.max(b.length,c.length),m=[],n=[],o=0;l>o;o++){if(h=b[o]||d(c[o]),i=c[o]||d(h),h[0]!=i[0]||\"r\"==h[0].toLowerCase()&&(h[2]!=i[2]||h[3]!=i[3])||\"s\"==h[0].toLowerCase()&&(h[3]!=i[3]||h[4]!=i[4])){b=a._.transform2matrix(b,e()),c=a._.transform2matrix(c,e()),m=[[\"m\",b.a,b.b,b.c,b.d,b.e,b.f]],n=[[\"m\",c.a,c.b,c.c,c.d,c.e,c.f]];break}for(m[o]=[],n[o]=[],f=0,g=Math.max(h.length,i.length);g>f;f++)f in h&&(m[o][f]=h[f]),f in i&&(n[o][f]=i[f])}return{from:k(m),to:k(n),f:j(m)}}function f(a){return a}function g(a){return function(b){return+b.toFixed(3)+a}}function h(a){return a.join(\" \")}function i(b){return a.rgb(b[0],b[1],b[2])}function j(a){var b,c,d,e,f,g,h=0,i=[];for(b=0,c=a.length;c>b;b++){for(f=\"[\",g=['\"'+a[b][0]+'\"'],d=1,e=a[b].length;e>d;d++)g[d]=\"val[\"+h++ +\"]\";f+=g+\"]\",i[b]=f}return Function(\"val\",\"return Snap.path.toString.call([\"+i+\"])\")}function k(a){for(var b=[],c=0,d=a.length;d>c;c++)for(var e=1,f=a[c].length;f>e;e++)b.push(a[c][e]);return b}function l(a){return isFinite(parseFloat(a))}function m(b,c){return a.is(b,\"array\")&&a.is(c,\"array\")?b.toString()==c.toString():!1}var n={},o=/[a-z]+$/i,p=String;n.stroke=n.fill=\"colour\",c.prototype.equal=function(a,c){return b(\"snap.util.equal\",this,a,c).firstDefined()},b.on(\"snap.util.equal\",function(b,c){var d,q,r=p(this.attr(b)||\"\"),s=this;if(l(r)&&l(c))return{from:parseFloat(r),to:parseFloat(c),f:f};if(\"colour\"==n[b])return d=a.color(r),q=a.color(c),{from:[d.r,d.g,d.b,d.opacity],to:[q.r,q.g,q.b,q.opacity],f:i};if(\"viewBox\"==b)return d=this.attr(b).vb.split(\" \").map(Number),q=c.split(\" \").map(Number),{from:d,to:q,f:h};if(\"transform\"==b||\"gradientTransform\"==b||\"patternTransform\"==b)return c instanceof a.Matrix&&(c=c.toTransformString()),a._.rgTransform.test(c)||(c=a._.svgTransform2string(c)),e(r,c,function(){return s.getBBox(1)});if(\"d\"==b||\"path\"==b)return d=a.path.toCubic(r,c),{from:k(d[0]),to:k(d[1]),f:j(d[0])};if(\"points\"==b)return d=p(r).split(a._.separator),q=p(c).split(a._.separator),{from:d,to:q,f:function(a){return a}};var t=r.match(o),u=p(c).match(o);return t&&m(t,u)?{from:parseFloat(r),to:parseFloat(c),f:g(t)}:{from:this.asPX(b),to:this.asPX(b,c),f:f}})}),d.plugin(function(a,c,d,e){for(var f=c.prototype,g=\"hasOwnProperty\",h=(\"createTouch\"in e.doc),i=[\"click\",\"dblclick\",\"mousedown\",\"mousemove\",\"mouseout\",\"mouseover\",\"mouseup\",\"touchstart\",\"touchmove\",\"touchend\",\"touchcancel\"],j={mousedown:\"touchstart\",mousemove:\"touchmove\",mouseup:\"touchend\"},k=(function(a,b){var c=\"y\"==a?\"scrollTop\":\"scrollLeft\",d=b&&b.node?b.node.ownerDocument:e.doc;return d[c in d.documentElement?\"documentElement\":\"body\"][c]}),l=function(){return this.originalEvent.preventDefault()},m=function(){return this.originalEvent.stopPropagation()},n=function(a,b,c,d){var e=h&&j[b]?j[b]:b,f=function(e){var f=k(\"y\",d),i=k(\"x\",d);if(h&&j[g](b))for(var n=0,o=e.targetTouches&&e.targetTouches.length;o>n;n++)if(e.targetTouches[n].target==a||a.contains(e.targetTouches[n].target)){var p=e;e=e.targetTouches[n],e.originalEvent=p,e.preventDefault=l,e.stopPropagation=m;break}var q=e.clientX+i,r=e.clientY+f;return c.call(d,e,q,r)};return b!==e&&a.addEventListener(b,f,!1),a.addEventListener(e,f,!1),function(){return b!==e&&a.removeEventListener(b,f,!1),a.removeEventListener(e,f,!1),!0}},o=[],p=function(a){for(var c,d=a.clientX,e=a.clientY,f=k(\"y\"),g=k(\"x\"),i=o.length;i--;){if(c=o[i],h){for(var j,l=a.touches&&a.touches.length;l--;)if(j=a.touches[l],j.identifier==c.el._drag.id||c.el.node.contains(j.target)){d=j.clientX,e=j.clientY,(a.originalEvent?a.originalEvent:a).preventDefault();break}}else a.preventDefault();{var m=c.el.node;m.nextSibling,m.parentNode,m.style.display}d+=g,e+=f,b(\"snap.drag.move.\"+c.el.id,c.move_scope||c.el,d-c.el._drag.x,e-c.el._drag.y,d,e,a)}},q=function(c){a.unmousemove(p).unmouseup(q);for(var d,e=o.length;e--;)d=o[e],d.el._drag={},b(\"snap.drag.end.\"+d.el.id,d.end_scope||d.start_scope||d.move_scope||d.el,c),b.off(\"snap.drag.*.\"+d.el.id);o=[]},r=i.length;r--;)!function(b){a[b]=f[b]=function(c,d){if(a.is(c,\"function\"))this.events=this.events||[],this.events.push({name:b,f:c,unbind:n(this.node||document,b,c,d||this)});else for(var e=0,f=this.events.length;f>e;e++)if(this.events[e].name==b)try{this.events[e].f.call(this)}catch(g){}return this},a[\"un\"+b]=f[\"un\"+b]=function(a){for(var c=this.events||[],d=c.length;d--;)if(c[d].name==b&&(c[d].f==a||!a))return c[d].unbind(),c.splice(d,1),!c.length&&delete this.events,this;return this}}(i[r]);f.hover=function(a,b,c,d){return this.mouseover(a,c).mouseout(b,d||c)},f.unhover=function(a,b){return this.unmouseover(a).unmouseout(b)};var s=[];f.drag=function(c,d,e,f,g,h){function i(i,j,l){(i.originalEvent||i).preventDefault(),k._drag.x=j,k._drag.y=l,k._drag.id=i.identifier,!o.length&&a.mousemove(p).mouseup(q),o.push({el:k,move_scope:f,start_scope:g,end_scope:h}),d&&b.on(\"snap.drag.start.\"+k.id,d),c&&b.on(\"snap.drag.move.\"+k.id,c),e&&b.on(\"snap.drag.end.\"+k.id,e),b(\"snap.drag.start.\"+k.id,g||f||k,j,l,i)}function j(a,c,d){b(\"snap.draginit.\"+k.id,k,a,c,d)}var k=this;if(!arguments.length){var l;return k.drag(function(a,b){this.attr({transform:l+(l?\"T\":\"t\")+[a,b]})},function(){l=this.transform().local})}return b.on(\"snap.draginit.\"+k.id,i),k._drag={},s.push({el:k,start:i,init:j}),k.mousedown(j),k},f.undrag=function(){for(var c=s.length;c--;)s[c].el==this&&(this.unmousedown(s[c].init),s.splice(c,1),b.unbind(\"snap.drag.*.\"+this.id),b.unbind(\"snap.draginit.\"+this.id));return!s.length&&a.unmousemove(p).unmouseup(q),this}}),d.plugin(function(a,c,d){var e=(c.prototype,d.prototype),f=/^\\s*url\\((.+)\\)/,g=String,h=a._.$;a.filter={},e.filter=function(b){var d=this;\"svg\"!=d.type&&(d=d.paper);var e=a.parse(g(b)),f=a._.id(),i=(d.node.offsetWidth,d.node.offsetHeight,h(\"filter\"));return h(i,{id:f,filterUnits:\"userSpaceOnUse\"}),i.appendChild(e.node),d.defs.appendChild(i),new c(i)},b.on(\"snap.util.getattr.filter\",function(){b.stop();var c=h(this.node,\"filter\");if(c){var d=g(c).match(f);return d&&a.select(d[1])}}),b.on(\"snap.util.attr.filter\",function(d){if(d instanceof c&&\"filter\"==d.type){b.stop();var e=d.node.id;e||(h(d.node,{id:d.id}),e=d.id),h(this.node,{filter:a.url(e)})}d&&\"none\"!=d||(b.stop(),this.node.removeAttribute(\"filter\"))}),a.filter.blur=function(b,c){null==b&&(b=2);var d=null==c?b:[b,c];return a.format('<feGaussianBlur stdDeviation=\"{def}\"/>',{def:d})},a.filter.blur.toString=function(){return this()},a.filter.shadow=function(b,c,d,e,f){return\"string\"==typeof d&&(e=d,f=e,d=4),\"string\"!=typeof e&&(f=e,e=\"#000\"),e=e||\"#000\",null==d&&(d=4),null==f&&(f=1),null==b&&(b=0,c=2),null==c&&(c=b),e=a.color(e),a.format('<feGaussianBlur in=\"SourceAlpha\" stdDeviation=\"{blur}\"/><feOffset dx=\"{dx}\" dy=\"{dy}\" result=\"offsetblur\"/><feFlood flood-color=\"{color}\"/><feComposite in2=\"offsetblur\" operator=\"in\"/><feComponentTransfer><feFuncA type=\"linear\" slope=\"{opacity}\"/></feComponentTransfer><feMerge><feMergeNode/><feMergeNode in=\"SourceGraphic\"/></feMerge>',{color:e,dx:b,dy:c,blur:d,opacity:f})},a.filter.shadow.toString=function(){return this()},a.filter.grayscale=function(b){return null==b&&(b=1),a.format('<feColorMatrix type=\"matrix\" values=\"{a} {b} {c} 0 0 {d} {e} {f} 0 0 {g} {b} {h} 0 0 0 0 0 1 0\"/>',{a:.2126+.7874*(1-b),b:.7152-.7152*(1-b),c:.0722-.0722*(1-b),d:.2126-.2126*(1-b),e:.7152+.2848*(1-b),f:.0722-.0722*(1-b),g:.2126-.2126*(1-b),h:.0722+.9278*(1-b)})},a.filter.grayscale.toString=function(){return this()},a.filter.sepia=function(b){return null==b&&(b=1),a.format('<feColorMatrix type=\"matrix\" values=\"{a} {b} {c} 0 0 {d} {e} {f} 0 0 {g} {h} {i} 0 0 0 0 0 1 0\"/>',{a:.393+.607*(1-b),b:.769-.769*(1-b),c:.189-.189*(1-b),d:.349-.349*(1-b),e:.686+.314*(1-b),f:.168-.168*(1-b),g:.272-.272*(1-b),h:.534-.534*(1-b),i:.131+.869*(1-b)})},a.filter.sepia.toString=function(){return this()},a.filter.saturate=function(b){return null==b&&(b=1),a.format('<feColorMatrix type=\"saturate\" values=\"{amount}\"/>',{amount:1-b})},a.filter.saturate.toString=function(){return this()},a.filter.hueRotate=function(b){return b=b||0,a.format('<feColorMatrix type=\"hueRotate\" values=\"{angle}\"/>',{angle:b})},a.filter.hueRotate.toString=function(){return this()},a.filter.invert=function(b){return null==b&&(b=1),a.format('<feComponentTransfer><feFuncR type=\"table\" tableValues=\"{amount} {amount2}\"/><feFuncG type=\"table\" tableValues=\"{amount} {amount2}\"/><feFuncB type=\"table\" tableValues=\"{amount} {amount2}\"/></feComponentTransfer>',{amount:b,amount2:1-b})},a.filter.invert.toString=function(){return this()},a.filter.brightness=function(b){return null==b&&(b=1),a.format('<feComponentTransfer><feFuncR type=\"linear\" slope=\"{amount}\"/><feFuncG type=\"linear\" slope=\"{amount}\"/><feFuncB type=\"linear\" slope=\"{amount}\"/></feComponentTransfer>',{amount:b})},a.filter.brightness.toString=function(){return this()},a.filter.contrast=function(b){return null==b&&(b=1),a.format('<feComponentTransfer><feFuncR type=\"linear\" slope=\"{amount}\" intercept=\"{amount2}\"/><feFuncG type=\"linear\" slope=\"{amount}\" intercept=\"{amount2}\"/><feFuncB type=\"linear\" slope=\"{amount}\" intercept=\"{amount2}\"/></feComponentTransfer>',{amount:b,amount2:.5-b/2})},a.filter.contrast.toString=function(){return this()}}),d.plugin(function(a,b){var c=a._.box,d=a.is,e=/^[^a-z]*([tbmlrc])/i,f=function(){return\"T\"+this.dx+\",\"+this.dy};b.prototype.getAlign=function(a,b){null==b&&d(a,\"string\")&&(b=a,a=null),a=a||this.paper;var g=a.getBBox?a.getBBox():c(a),h=this.getBBox(),i={};switch(b=b&&b.match(e),b=b?b[1].toLowerCase():\"c\"){case\"t\":i.dx=0,i.dy=g.y-h.y;break;case\"b\":i.dx=0,i.dy=g.y2-h.y2;break;case\"m\":i.dx=0,i.dy=g.cy-h.cy;break;case\"l\":i.dx=g.x-h.x,i.dy=0;break;case\"r\":i.dx=g.x2-h.x2,i.dy=0;break;default:i.dx=g.cx-h.cx,i.dy=0}return i.toString=f,i},b.prototype.align=function(a,b){return this.transform(\"...\"+this.getAlign(a,b))}}),d});\n"
  },
  {
    "path": "static/editor.md/lib/sequence/underscore-min.js",
    "content": "\n//     Underscore.js 1.8.3\n//     http://underscorejs.org\n//     (c) 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n//     Underscore may be freely distributed under the MIT license.\n(function(){function n(n){function t(t,r,e,u,i,o){for(;i>=0&&o>i;i+=n){var a=u?u[i]:i;e=r(e,t[a],a,t)}return e}return function(r,e,u,i){e=b(e,i,4);var o=!k(r)&&m.keys(r),a=(o||r).length,c=n>0?0:a-1;return arguments.length<3&&(u=r[o?o[c]:c],c+=n),t(r,e,u,o,c,a)}}function t(n){return function(t,r,e){r=x(r,e);for(var u=O(t),i=n>0?0:u-1;i>=0&&u>i;i+=n)if(r(t[i],i,t))return i;return-1}}function r(n,t,r){return function(e,u,i){var o=0,a=O(e);if(\"number\"==typeof i)n>0?o=i>=0?i:Math.max(i+a,o):a=i>=0?Math.min(i+1,a):i+a+1;else if(r&&i&&a)return i=r(e,u),e[i]===u?i:-1;if(u!==u)return i=t(l.call(e,o,a),m.isNaN),i>=0?i+o:-1;for(i=n>0?o:a-1;i>=0&&a>i;i+=n)if(e[i]===u)return i;return-1}}function e(n,t){var r=I.length,e=n.constructor,u=m.isFunction(e)&&e.prototype||a,i=\"constructor\";for(m.has(n,i)&&!m.contains(t,i)&&t.push(i);r--;)i=I[r],i in n&&n[i]!==u[i]&&!m.contains(t,i)&&t.push(i)}var u=this,i=u._,o=Array.prototype,a=Object.prototype,c=Function.prototype,f=o.push,l=o.slice,s=a.toString,p=a.hasOwnProperty,h=Array.isArray,v=Object.keys,g=c.bind,y=Object.create,d=function(){},m=function(n){return n instanceof m?n:this instanceof m?void(this._wrapped=n):new m(n)};\"undefined\"!=typeof exports?(\"undefined\"!=typeof module&&module.exports&&(exports=module.exports=m),exports._=m):u._=m,m.VERSION=\"1.8.3\";var b=function(n,t,r){if(t===void 0)return n;switch(null==r?3:r){case 1:return function(r){return n.call(t,r)};case 2:return function(r,e){return n.call(t,r,e)};case 3:return function(r,e,u){return n.call(t,r,e,u)};case 4:return function(r,e,u,i){return n.call(t,r,e,u,i)}}return function(){return n.apply(t,arguments)}},x=function(n,t,r){return null==n?m.identity:m.isFunction(n)?b(n,t,r):m.isObject(n)?m.matcher(n):m.property(n)};m.iteratee=function(n,t){return x(n,t,1/0)};var _=function(n,t){return function(r){var e=arguments.length;if(2>e||null==r)return r;for(var u=1;e>u;u++)for(var i=arguments[u],o=n(i),a=o.length,c=0;a>c;c++){var f=o[c];t&&r[f]!==void 0||(r[f]=i[f])}return r}},j=function(n){if(!m.isObject(n))return{};if(y)return y(n);d.prototype=n;var t=new d;return d.prototype=null,t},w=function(n){return function(t){return null==t?void 0:t[n]}},A=Math.pow(2,53)-1,O=w(\"length\"),k=function(n){var t=O(n);return\"number\"==typeof t&&t>=0&&A>=t};m.each=m.forEach=function(n,t,r){t=b(t,r);var e,u;if(k(n))for(e=0,u=n.length;u>e;e++)t(n[e],e,n);else{var i=m.keys(n);for(e=0,u=i.length;u>e;e++)t(n[i[e]],i[e],n)}return n},m.map=m.collect=function(n,t,r){t=x(t,r);for(var e=!k(n)&&m.keys(n),u=(e||n).length,i=Array(u),o=0;u>o;o++){var a=e?e[o]:o;i[o]=t(n[a],a,n)}return i},m.reduce=m.foldl=m.inject=n(1),m.reduceRight=m.foldr=n(-1),m.find=m.detect=function(n,t,r){var e;return e=k(n)?m.findIndex(n,t,r):m.findKey(n,t,r),e!==void 0&&e!==-1?n[e]:void 0},m.filter=m.select=function(n,t,r){var e=[];return t=x(t,r),m.each(n,function(n,r,u){t(n,r,u)&&e.push(n)}),e},m.reject=function(n,t,r){return m.filter(n,m.negate(x(t)),r)},m.every=m.all=function(n,t,r){t=x(t,r);for(var e=!k(n)&&m.keys(n),u=(e||n).length,i=0;u>i;i++){var o=e?e[i]:i;if(!t(n[o],o,n))return!1}return!0},m.some=m.any=function(n,t,r){t=x(t,r);for(var e=!k(n)&&m.keys(n),u=(e||n).length,i=0;u>i;i++){var o=e?e[i]:i;if(t(n[o],o,n))return!0}return!1},m.contains=m.includes=m.include=function(n,t,r,e){return k(n)||(n=m.values(n)),(\"number\"!=typeof r||e)&&(r=0),m.indexOf(n,t,r)>=0},m.invoke=function(n,t){var r=l.call(arguments,2),e=m.isFunction(t);return m.map(n,function(n){var u=e?t:n[t];return null==u?u:u.apply(n,r)})},m.pluck=function(n,t){return m.map(n,m.property(t))},m.where=function(n,t){return m.filter(n,m.matcher(t))},m.findWhere=function(n,t){return m.find(n,m.matcher(t))},m.max=function(n,t,r){var e,u,i=-1/0,o=-1/0;if(null==t&&null!=n){n=k(n)?n:m.values(n);for(var a=0,c=n.length;c>a;a++)e=n[a],e>i&&(i=e)}else t=x(t,r),m.each(n,function(n,r,e){u=t(n,r,e),(u>o||u===-1/0&&i===-1/0)&&(i=n,o=u)});return i},m.min=function(n,t,r){var e,u,i=1/0,o=1/0;if(null==t&&null!=n){n=k(n)?n:m.values(n);for(var a=0,c=n.length;c>a;a++)e=n[a],i>e&&(i=e)}else t=x(t,r),m.each(n,function(n,r,e){u=t(n,r,e),(o>u||1/0===u&&1/0===i)&&(i=n,o=u)});return i},m.shuffle=function(n){for(var t,r=k(n)?n:m.values(n),e=r.length,u=Array(e),i=0;e>i;i++)t=m.random(0,i),t!==i&&(u[i]=u[t]),u[t]=r[i];return u},m.sample=function(n,t,r){return null==t||r?(k(n)||(n=m.values(n)),n[m.random(n.length-1)]):m.shuffle(n).slice(0,Math.max(0,t))},m.sortBy=function(n,t,r){return t=x(t,r),m.pluck(m.map(n,function(n,r,e){return{value:n,index:r,criteria:t(n,r,e)}}).sort(function(n,t){var r=n.criteria,e=t.criteria;if(r!==e){if(r>e||r===void 0)return 1;if(e>r||e===void 0)return-1}return n.index-t.index}),\"value\")};var F=function(n){return function(t,r,e){var u={};return r=x(r,e),m.each(t,function(e,i){var o=r(e,i,t);n(u,e,o)}),u}};m.groupBy=F(function(n,t,r){m.has(n,r)?n[r].push(t):n[r]=[t]}),m.indexBy=F(function(n,t,r){n[r]=t}),m.countBy=F(function(n,t,r){m.has(n,r)?n[r]++:n[r]=1}),m.toArray=function(n){return n?m.isArray(n)?l.call(n):k(n)?m.map(n,m.identity):m.values(n):[]},m.size=function(n){return null==n?0:k(n)?n.length:m.keys(n).length},m.partition=function(n,t,r){t=x(t,r);var e=[],u=[];return m.each(n,function(n,r,i){(t(n,r,i)?e:u).push(n)}),[e,u]},m.first=m.head=m.take=function(n,t,r){return null==n?void 0:null==t||r?n[0]:m.initial(n,n.length-t)},m.initial=function(n,t,r){return l.call(n,0,Math.max(0,n.length-(null==t||r?1:t)))},m.last=function(n,t,r){return null==n?void 0:null==t||r?n[n.length-1]:m.rest(n,Math.max(0,n.length-t))},m.rest=m.tail=m.drop=function(n,t,r){return l.call(n,null==t||r?1:t)},m.compact=function(n){return m.filter(n,m.identity)};var S=function(n,t,r,e){for(var u=[],i=0,o=e||0,a=O(n);a>o;o++){var c=n[o];if(k(c)&&(m.isArray(c)||m.isArguments(c))){t||(c=S(c,t,r));var f=0,l=c.length;for(u.length+=l;l>f;)u[i++]=c[f++]}else r||(u[i++]=c)}return u};m.flatten=function(n,t){return S(n,t,!1)},m.without=function(n){return m.difference(n,l.call(arguments,1))},m.uniq=m.unique=function(n,t,r,e){m.isBoolean(t)||(e=r,r=t,t=!1),null!=r&&(r=x(r,e));for(var u=[],i=[],o=0,a=O(n);a>o;o++){var c=n[o],f=r?r(c,o,n):c;t?(o&&i===f||u.push(c),i=f):r?m.contains(i,f)||(i.push(f),u.push(c)):m.contains(u,c)||u.push(c)}return u},m.union=function(){return m.uniq(S(arguments,!0,!0))},m.intersection=function(n){for(var t=[],r=arguments.length,e=0,u=O(n);u>e;e++){var i=n[e];if(!m.contains(t,i)){for(var o=1;r>o&&m.contains(arguments[o],i);o++);o===r&&t.push(i)}}return t},m.difference=function(n){var t=S(arguments,!0,!0,1);return m.filter(n,function(n){return!m.contains(t,n)})},m.zip=function(){return m.unzip(arguments)},m.unzip=function(n){for(var t=n&&m.max(n,O).length||0,r=Array(t),e=0;t>e;e++)r[e]=m.pluck(n,e);return r},m.object=function(n,t){for(var r={},e=0,u=O(n);u>e;e++)t?r[n[e]]=t[e]:r[n[e][0]]=n[e][1];return r},m.findIndex=t(1),m.findLastIndex=t(-1),m.sortedIndex=function(n,t,r,e){r=x(r,e,1);for(var u=r(t),i=0,o=O(n);o>i;){var a=Math.floor((i+o)/2);r(n[a])<u?i=a+1:o=a}return i},m.indexOf=r(1,m.findIndex,m.sortedIndex),m.lastIndexOf=r(-1,m.findLastIndex),m.range=function(n,t,r){null==t&&(t=n||0,n=0),r=r||1;for(var e=Math.max(Math.ceil((t-n)/r),0),u=Array(e),i=0;e>i;i++,n+=r)u[i]=n;return u};var E=function(n,t,r,e,u){if(!(e instanceof t))return n.apply(r,u);var i=j(n.prototype),o=n.apply(i,u);return m.isObject(o)?o:i};m.bind=function(n,t){if(g&&n.bind===g)return g.apply(n,l.call(arguments,1));if(!m.isFunction(n))throw new TypeError(\"Bind must be called on a function\");var r=l.call(arguments,2),e=function(){return E(n,e,t,this,r.concat(l.call(arguments)))};return e},m.partial=function(n){var t=l.call(arguments,1),r=function(){for(var e=0,u=t.length,i=Array(u),o=0;u>o;o++)i[o]=t[o]===m?arguments[e++]:t[o];for(;e<arguments.length;)i.push(arguments[e++]);return E(n,r,this,this,i)};return r},m.bindAll=function(n){var t,r,e=arguments.length;if(1>=e)throw new Error(\"bindAll must be passed function names\");for(t=1;e>t;t++)r=arguments[t],n[r]=m.bind(n[r],n);return n},m.memoize=function(n,t){var r=function(e){var u=r.cache,i=\"\"+(t?t.apply(this,arguments):e);return m.has(u,i)||(u[i]=n.apply(this,arguments)),u[i]};return r.cache={},r},m.delay=function(n,t){var r=l.call(arguments,2);return setTimeout(function(){return n.apply(null,r)},t)},m.defer=m.partial(m.delay,m,1),m.throttle=function(n,t,r){var e,u,i,o=null,a=0;r||(r={});var c=function(){a=r.leading===!1?0:m.now(),o=null,i=n.apply(e,u),o||(e=u=null)};return function(){var f=m.now();a||r.leading!==!1||(a=f);var l=t-(f-a);return e=this,u=arguments,0>=l||l>t?(o&&(clearTimeout(o),o=null),a=f,i=n.apply(e,u),o||(e=u=null)):o||r.trailing===!1||(o=setTimeout(c,l)),i}},m.debounce=function(n,t,r){var e,u,i,o,a,c=function(){var f=m.now()-o;t>f&&f>=0?e=setTimeout(c,t-f):(e=null,r||(a=n.apply(i,u),e||(i=u=null)))};return function(){i=this,u=arguments,o=m.now();var f=r&&!e;return e||(e=setTimeout(c,t)),f&&(a=n.apply(i,u),i=u=null),a}},m.wrap=function(n,t){return m.partial(t,n)},m.negate=function(n){return function(){return!n.apply(this,arguments)}},m.compose=function(){var n=arguments,t=n.length-1;return function(){for(var r=t,e=n[t].apply(this,arguments);r--;)e=n[r].call(this,e);return e}},m.after=function(n,t){return function(){return--n<1?t.apply(this,arguments):void 0}},m.before=function(n,t){var r;return function(){return--n>0&&(r=t.apply(this,arguments)),1>=n&&(t=null),r}},m.once=m.partial(m.before,2);var M=!{toString:null}.propertyIsEnumerable(\"toString\"),I=[\"valueOf\",\"isPrototypeOf\",\"toString\",\"propertyIsEnumerable\",\"hasOwnProperty\",\"toLocaleString\"];m.keys=function(n){if(!m.isObject(n))return[];if(v)return v(n);var t=[];for(var r in n)m.has(n,r)&&t.push(r);return M&&e(n,t),t},m.allKeys=function(n){if(!m.isObject(n))return[];var t=[];for(var r in n)t.push(r);return M&&e(n,t),t},m.values=function(n){for(var t=m.keys(n),r=t.length,e=Array(r),u=0;r>u;u++)e[u]=n[t[u]];return e},m.mapObject=function(n,t,r){t=x(t,r);for(var e,u=m.keys(n),i=u.length,o={},a=0;i>a;a++)e=u[a],o[e]=t(n[e],e,n);return o},m.pairs=function(n){for(var t=m.keys(n),r=t.length,e=Array(r),u=0;r>u;u++)e[u]=[t[u],n[t[u]]];return e},m.invert=function(n){for(var t={},r=m.keys(n),e=0,u=r.length;u>e;e++)t[n[r[e]]]=r[e];return t},m.functions=m.methods=function(n){var t=[];for(var r in n)m.isFunction(n[r])&&t.push(r);return t.sort()},m.extend=_(m.allKeys),m.extendOwn=m.assign=_(m.keys),m.findKey=function(n,t,r){t=x(t,r);for(var e,u=m.keys(n),i=0,o=u.length;o>i;i++)if(e=u[i],t(n[e],e,n))return e},m.pick=function(n,t,r){var e,u,i={},o=n;if(null==o)return i;m.isFunction(t)?(u=m.allKeys(o),e=b(t,r)):(u=S(arguments,!1,!1,1),e=function(n,t,r){return t in r},o=Object(o));for(var a=0,c=u.length;c>a;a++){var f=u[a],l=o[f];e(l,f,o)&&(i[f]=l)}return i},m.omit=function(n,t,r){if(m.isFunction(t))t=m.negate(t);else{var e=m.map(S(arguments,!1,!1,1),String);t=function(n,t){return!m.contains(e,t)}}return m.pick(n,t,r)},m.defaults=_(m.allKeys,!0),m.create=function(n,t){var r=j(n);return t&&m.extendOwn(r,t),r},m.clone=function(n){return m.isObject(n)?m.isArray(n)?n.slice():m.extend({},n):n},m.tap=function(n,t){return t(n),n},m.isMatch=function(n,t){var r=m.keys(t),e=r.length;if(null==n)return!e;for(var u=Object(n),i=0;e>i;i++){var o=r[i];if(t[o]!==u[o]||!(o in u))return!1}return!0};var N=function(n,t,r,e){if(n===t)return 0!==n||1/n===1/t;if(null==n||null==t)return n===t;n instanceof m&&(n=n._wrapped),t instanceof m&&(t=t._wrapped);var u=s.call(n);if(u!==s.call(t))return!1;switch(u){case\"[object RegExp]\":case\"[object String]\":return\"\"+n==\"\"+t;case\"[object Number]\":return+n!==+n?+t!==+t:0===+n?1/+n===1/t:+n===+t;case\"[object Date]\":case\"[object Boolean]\":return+n===+t}var i=\"[object Array]\"===u;if(!i){if(\"object\"!=typeof n||\"object\"!=typeof t)return!1;var o=n.constructor,a=t.constructor;if(o!==a&&!(m.isFunction(o)&&o instanceof o&&m.isFunction(a)&&a instanceof a)&&\"constructor\"in n&&\"constructor\"in t)return!1}r=r||[],e=e||[];for(var c=r.length;c--;)if(r[c]===n)return e[c]===t;if(r.push(n),e.push(t),i){if(c=n.length,c!==t.length)return!1;for(;c--;)if(!N(n[c],t[c],r,e))return!1}else{var f,l=m.keys(n);if(c=l.length,m.keys(t).length!==c)return!1;for(;c--;)if(f=l[c],!m.has(t,f)||!N(n[f],t[f],r,e))return!1}return r.pop(),e.pop(),!0};m.isEqual=function(n,t){return N(n,t)},m.isEmpty=function(n){return null==n?!0:k(n)&&(m.isArray(n)||m.isString(n)||m.isArguments(n))?0===n.length:0===m.keys(n).length},m.isElement=function(n){return!(!n||1!==n.nodeType)},m.isArray=h||function(n){return\"[object Array]\"===s.call(n)},m.isObject=function(n){var t=typeof n;return\"function\"===t||\"object\"===t&&!!n},m.each([\"Arguments\",\"Function\",\"String\",\"Number\",\"Date\",\"RegExp\",\"Error\"],function(n){m[\"is\"+n]=function(t){return s.call(t)===\"[object \"+n+\"]\"}}),m.isArguments(arguments)||(m.isArguments=function(n){return m.has(n,\"callee\")}),\"function\"!=typeof/./&&\"object\"!=typeof Int8Array&&(m.isFunction=function(n){return\"function\"==typeof n||!1}),m.isFinite=function(n){return isFinite(n)&&!isNaN(parseFloat(n))},m.isNaN=function(n){return m.isNumber(n)&&n!==+n},m.isBoolean=function(n){return n===!0||n===!1||\"[object Boolean]\"===s.call(n)},m.isNull=function(n){return null===n},m.isUndefined=function(n){return n===void 0},m.has=function(n,t){return null!=n&&p.call(n,t)},m.noConflict=function(){return u._=i,this},m.identity=function(n){return n},m.constant=function(n){return function(){return n}},m.noop=function(){},m.property=w,m.propertyOf=function(n){return null==n?function(){}:function(t){return n[t]}},m.matcher=m.matches=function(n){return n=m.extendOwn({},n),function(t){return m.isMatch(t,n)}},m.times=function(n,t,r){var e=Array(Math.max(0,n));t=b(t,r,1);for(var u=0;n>u;u++)e[u]=t(u);return e},m.random=function(n,t){return null==t&&(t=n,n=0),n+Math.floor(Math.random()*(t-n+1))},m.now=Date.now||function(){return(new Date).getTime()};var B={\"&\":\"&amp;\",\"<\":\"&lt;\",\">\":\"&gt;\",'\"':\"&quot;\",\"'\":\"&#x27;\",\"`\":\"&#x60;\"},T=m.invert(B),R=function(n){var t=function(t){return n[t]},r=\"(?:\"+m.keys(n).join(\"|\")+\")\",e=RegExp(r),u=RegExp(r,\"g\");return function(n){return n=null==n?\"\":\"\"+n,e.test(n)?n.replace(u,t):n}};m.escape=R(B),m.unescape=R(T),m.result=function(n,t,r){var e=null==n?void 0:n[t];return e===void 0&&(e=r),m.isFunction(e)?e.call(n):e};var q=0;m.uniqueId=function(n){var t=++q+\"\";return n?n+t:t},m.templateSettings={evaluate:/<%([\\s\\S]+?)%>/g,interpolate:/<%=([\\s\\S]+?)%>/g,escape:/<%-([\\s\\S]+?)%>/g};var K=/(.)^/,z={\"'\":\"'\",\"\\\\\":\"\\\\\",\"\\r\":\"r\",\"\\n\":\"n\",\"\\u2028\":\"u2028\",\"\\u2029\":\"u2029\"},D=/\\\\|'|\\r|\\n|\\u2028|\\u2029/g,L=function(n){return\"\\\\\"+z[n]};m.template=function(n,t,r){!t&&r&&(t=r),t=m.defaults({},t,m.templateSettings);var e=RegExp([(t.escape||K).source,(t.interpolate||K).source,(t.evaluate||K).source].join(\"|\")+\"|$\",\"g\"),u=0,i=\"__p+='\";n.replace(e,function(t,r,e,o,a){return i+=n.slice(u,a).replace(D,L),u=a+t.length,r?i+=\"'+\\n((__t=(\"+r+\"))==null?'':_.escape(__t))+\\n'\":e?i+=\"'+\\n((__t=(\"+e+\"))==null?'':__t)+\\n'\":o&&(i+=\"';\\n\"+o+\"\\n__p+='\"),t}),i+=\"';\\n\",t.variable||(i=\"with(obj||{}){\\n\"+i+\"}\\n\"),i=\"var __t,__p='',__j=Array.prototype.join,\"+\"print=function(){__p+=__j.call(arguments,'');};\\n\"+i+\"return __p;\\n\";try{var o=new Function(t.variable||\"obj\",\"_\",i)}catch(a){throw a.source=i,a}var c=function(n){return o.call(this,n,m)},f=t.variable||\"obj\";return c.source=\"function(\"+f+\"){\\n\"+i+\"}\",c},m.chain=function(n){var t=m(n);return t._chain=!0,t};var P=function(n,t){return n._chain?m(t).chain():t};m.mixin=function(n){m.each(m.functions(n),function(t){var r=m[t]=n[t];m.prototype[t]=function(){var n=[this._wrapped];return f.apply(n,arguments),P(this,r.apply(m,n))}})},m.mixin(m),m.each([\"pop\",\"push\",\"reverse\",\"shift\",\"sort\",\"splice\",\"unshift\"],function(n){var t=o[n];m.prototype[n]=function(){var r=this._wrapped;return t.apply(r,arguments),\"shift\"!==n&&\"splice\"!==n||0!==r.length||delete r[0],P(this,r)}}),m.each([\"concat\",\"join\",\"slice\"],function(n){var t=o[n];m.prototype[n]=function(){return P(this,t.apply(this._wrapped,arguments))}}),m.prototype.value=function(){return this._wrapped},m.prototype.valueOf=m.prototype.toJSON=m.prototype.value,m.prototype.toString=function(){return\"\"+this._wrapped},\"function\"==typeof define&&define.amd&&define(\"underscore\",[],function(){return m})}).call(this);\n//# sourceMappingURL=underscore-min.map"
  },
  {
    "path": "static/editor.md/lib/sequence/webfont.js",
    "content": "/* Web Font Loader v1.6.6 - (c) Adobe Systems, Google. License: Apache 2.0 */\n(function(){function aa(a,b,c){return a.call.apply(a.bind,arguments)}function ba(a,b,c){if(!a)throw Error();if(2<arguments.length){var d=Array.prototype.slice.call(arguments,2);return function(){var c=Array.prototype.slice.call(arguments);Array.prototype.unshift.apply(c,d);return a.apply(b,c)}}return function(){return a.apply(b,arguments)}}function n(a,b,c){n=Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf(\"native code\")?aa:ba;return n.apply(null,arguments)}var p=Date.now||function(){return+new Date};function r(a,b){this.D=a;this.m=b||a;this.F=this.m.document}r.prototype.createElement=function(a,b,c){a=this.F.createElement(a);if(b)for(var d in b)b.hasOwnProperty(d)&&(\"style\"==d?a.style.cssText=b[d]:a.setAttribute(d,b[d]));c&&a.appendChild(this.F.createTextNode(c));return a};function s(a,b,c){a=a.F.getElementsByTagName(b)[0];a||(a=document.documentElement);a.insertBefore(c,a.lastChild)}\n    function t(a,b,c){b=b||[];c=c||[];for(var d=a.className.split(/\\s+/),f=0;f<b.length;f+=1){for(var e=!1,g=0;g<d.length;g+=1)if(b[f]===d[g]){e=!0;break}e||d.push(b[f])}b=[];for(f=0;f<d.length;f+=1){e=!1;for(g=0;g<c.length;g+=1)if(d[f]===c[g]){e=!0;break}e||b.push(d[f])}a.className=b.join(\" \").replace(/\\s+/g,\" \").replace(/^\\s+|\\s+$/,\"\")}function u(a,b){for(var c=a.className.split(/\\s+/),d=0,f=c.length;d<f;d++)if(c[d]==b)return!0;return!1}\n    function v(a){if(\"string\"===typeof a.da)return a.da;var b=a.m.location.protocol;\"about:\"==b&&(b=a.D.location.protocol);return\"https:\"==b?\"https:\":\"http:\"}function w(a,b){var c=a.createElement(\"link\",{rel:\"stylesheet\",href:b,media:\"all\"}),d=!1;c.onload=function(){d||(d=!0)};c.onerror=function(){d||(d=!0)};s(a,\"head\",c)}\n    function x(a,b,c,d){var f=a.F.getElementsByTagName(\"head\")[0];if(f){var e=a.createElement(\"script\",{src:b}),g=!1;e.onload=e.onreadystatechange=function(){g||this.readyState&&\"loaded\"!=this.readyState&&\"complete\"!=this.readyState||(g=!0,c&&c(null),e.onload=e.onreadystatechange=null,\"HEAD\"==e.parentNode.tagName&&f.removeChild(e))};f.appendChild(e);setTimeout(function(){g||(g=!0,c&&c(Error(\"Script load timeout\")))},d||5E3);return e}return null};function y(a){this.ca=a||\"-\"}y.prototype.d=function(a){for(var b=[],c=0;c<arguments.length;c++)b.push(arguments[c].replace(/[\\W_]+/g,\"\").toLowerCase());return b.join(this.ca)};function A(a,b){this.V=a;this.N=4;this.H=\"n\";var c=(b||\"n4\").match(/^([nio])([1-9])$/i);c&&(this.H=c[1],this.N=parseInt(c[2],10))}A.prototype.getName=function(){return this.V};function B(a){return a.H+a.N}function ca(a){var b=4,c=\"n\",d=null;a&&((d=a.match(/(normal|oblique|italic)/i))&&d[1]&&(c=d[1].substr(0,1).toLowerCase()),(d=a.match(/([1-9]00|normal|bold)/i))&&d[1]&&(/bold/i.test(d[1])?b=7:/[1-9]00/.test(d[1])&&(b=parseInt(d[1].substr(0,1),10))));return c+b};function da(a,b){this.a=a;this.h=a.m.document.documentElement;this.J=b;this.f=\"wf\";this.e=new y(\"-\");this.Z=!1!==b.events;this.u=!1!==b.classes}function ea(a){a.u&&t(a.h,[a.e.d(a.f,\"loading\")]);C(a,\"loading\")}function D(a){if(a.u){var b=u(a.h,a.e.d(a.f,\"active\")),c=[],d=[a.e.d(a.f,\"loading\")];b||c.push(a.e.d(a.f,\"inactive\"));t(a.h,c,d)}C(a,\"inactive\")}function C(a,b,c){if(a.Z&&a.J[b])if(c)a.J[b](c.getName(),B(c));else a.J[b]()};function fa(){this.t={}}function ga(a,b,c){var d=[],f;for(f in b)if(b.hasOwnProperty(f)){var e=a.t[f];e&&d.push(e(b[f],c))}return d};function E(a,b){this.a=a;this.q=b;this.j=this.a.createElement(\"span\",{\"aria-hidden\":\"true\"},this.q)}\n    function G(a,b){var c=a.j,d;d=[];for(var f=b.V.split(/,\\s*/),e=0;e<f.length;e++){var g=f[e].replace(/['\"]/g,\"\");-1==g.indexOf(\" \")?d.push(g):d.push(\"'\"+g+\"'\")}d=d.join(\",\");f=\"normal\";\"o\"===b.H?f=\"oblique\":\"i\"===b.H&&(f=\"italic\");c.style.cssText=\"display:block;position:absolute;top:-9999px;left:-9999px;font-size:300px;width:auto;height:auto;line-height:normal;margin:0;padding:0;font-variant:normal;white-space:nowrap;font-family:\"+d+\";\"+(\"font-style:\"+f+\";font-weight:\"+(b.N+\"00\")+\";\")}\n    function H(a){s(a.a,\"body\",a.j)}E.prototype.remove=function(){var a=this.j;a.parentNode&&a.parentNode.removeChild(a)};function I(a,b,c,d,f,e,g){this.O=a;this.ba=b;this.a=c;this.g=d;this.q=g||\"BESbswy\";this.s={};this.M=f||3E3;this.T=e||null;this.C=this.B=this.w=this.v=null;this.v=new E(this.a,this.q);this.w=new E(this.a,this.q);this.B=new E(this.a,this.q);this.C=new E(this.a,this.q);G(this.v,new A(this.g.getName()+\",serif\",B(this.g)));G(this.w,new A(this.g.getName()+\",sans-serif\",B(this.g)));G(this.B,new A(\"serif\",B(this.g)));G(this.C,new A(\"sans-serif\",B(this.g)));H(this.v);H(this.w);H(this.B);H(this.C)}\n    var J={ga:\"serif\",fa:\"sans-serif\"},K=null;function L(){if(null===K){var a=/AppleWebKit\\/([0-9]+)(?:\\.([0-9]+))/.exec(window.navigator.userAgent);K=!!a&&(536>parseInt(a[1],10)||536===parseInt(a[1],10)&&11>=parseInt(a[2],10))}return K}I.prototype.start=function(){this.s.serif=this.B.j.offsetWidth;this.s[\"sans-serif\"]=this.C.j.offsetWidth;this.ea=p();M(this)};function N(a,b,c){for(var d in J)if(J.hasOwnProperty(d)&&b===a.s[J[d]]&&c===a.s[J[d]])return!0;return!1}\n    function M(a){var b=a.v.j.offsetWidth,c=a.w.j.offsetWidth,d;(d=b===a.s.serif&&c===a.s[\"sans-serif\"])||(d=L()&&N(a,b,c));d?p()-a.ea>=a.M?L()&&N(a,b,c)&&(null===a.T||a.T.hasOwnProperty(a.g.getName()))?O(a,a.O):O(a,a.ba):ha(a):O(a,a.O)}function ha(a){setTimeout(n(function(){M(this)},a),50)}function O(a,b){setTimeout(n(function(){this.v.remove();this.w.remove();this.B.remove();this.C.remove();b(this.g)},a),0)};function P(a,b,c){this.a=a;this.o=b;this.K=0;this.X=this.S=!1;this.M=c}P.prototype.$=function(a){var b=this.o;b.u&&t(b.h,[b.e.d(b.f,a.getName(),B(a).toString(),\"active\")],[b.e.d(b.f,a.getName(),B(a).toString(),\"loading\"),b.e.d(b.f,a.getName(),B(a).toString(),\"inactive\")]);C(b,\"fontactive\",a);this.X=!0;Q(this)};\n    P.prototype.aa=function(a){var b=this.o;if(b.u){var c=u(b.h,b.e.d(b.f,a.getName(),B(a).toString(),\"active\")),d=[],f=[b.e.d(b.f,a.getName(),B(a).toString(),\"loading\")];c||d.push(b.e.d(b.f,a.getName(),B(a).toString(),\"inactive\"));t(b.h,d,f)}C(b,\"fontinactive\",a);Q(this)};function Q(a){0==--a.K&&a.S&&(a.X?(a=a.o,a.u&&t(a.h,[a.e.d(a.f,\"active\")],[a.e.d(a.f,\"loading\"),a.e.d(a.f,\"inactive\")]),C(a,\"active\")):D(a.o))};function R(a){this.D=a;this.p=new fa;this.U=0;this.P=this.Q=!0}R.prototype.load=function(a){this.a=new r(this.D,a.context||this.D);this.Q=!1!==a.events;this.P=!1!==a.classes;ia(this,new da(this.a,a),a)};\n    function ja(a,b,c,d,f){var e=0==--a.U;(a.P||a.Q)&&setTimeout(function(){var a=f||null,l=d||null||{};if(0===c.length&&e)D(b.o);else{b.K+=c.length;e&&(b.S=e);var h,k=[];for(h=0;h<c.length;h++){var m=c[h],z=l[m.getName()],q=b.o,F=m;q.u&&t(q.h,[q.e.d(q.f,F.getName(),B(F).toString(),\"loading\")]);C(q,\"fontloading\",F);q=null;q=new I(n(b.$,b),n(b.aa,b),b.a,m,b.M,a,z);k.push(q)}for(h=0;h<k.length;h++)k[h].start()}},0)}\n    function ia(a,b,c){var d=[],f=c.timeout;ea(b);var d=ga(a.p,c,a.a),e=new P(a.a,b,f);a.U=d.length;b=0;for(c=d.length;b<c;b++)d[b].load(function(b,c,d){ja(a,e,b,c,d)})};function S(a,b,c){this.I=a?a:b+ka;this.k=[];this.L=[];this.Y=c||\"\"}var ka=\"//fonts.googleapis.com/css\";S.prototype.d=function(){if(0==this.k.length)throw Error(\"No fonts to load!\");if(-1!=this.I.indexOf(\"kit=\"))return this.I;for(var a=this.k.length,b=[],c=0;c<a;c++)b.push(this.k[c].replace(/ /g,\"+\"));a=this.I+\"?family=\"+b.join(\"%7C\");0<this.L.length&&(a+=\"&subset=\"+this.L.join(\",\"));0<this.Y.length&&(a+=\"&text=\"+encodeURIComponent(this.Y));return a};function T(a){this.k=a;this.W=[];this.G={}}\n    var U={latin:\"BESbswy\",cyrillic:\"&#1081;&#1103;&#1046;\",greek:\"&#945;&#946;&#931;\",khmer:\"&#x1780;&#x1781;&#x1782;\",Hanuman:\"&#x1780;&#x1781;&#x1782;\"},la={thin:\"1\",extralight:\"2\",\"extra-light\":\"2\",ultralight:\"2\",\"ultra-light\":\"2\",light:\"3\",regular:\"4\",book:\"4\",medium:\"5\",\"semi-bold\":\"6\",semibold:\"6\",\"demi-bold\":\"6\",demibold:\"6\",bold:\"7\",\"extra-bold\":\"8\",extrabold:\"8\",\"ultra-bold\":\"8\",ultrabold:\"8\",black:\"9\",heavy:\"9\",l:\"3\",r:\"4\",b:\"7\"},ma={i:\"i\",italic:\"i\",n:\"n\",normal:\"n\"},na=/^(thin|(?:(?:extra|ultra)-?)?light|regular|book|medium|(?:(?:semi|demi|extra|ultra)-?)?bold|black|heavy|l|r|b|[1-9]00)?(n|i|normal|italic)?$/;\n    T.prototype.parse=function(){for(var a=this.k.length,b=0;b<a;b++){var c=this.k[b].split(\":\"),d=c[0].replace(/\\+/g,\" \"),f=[\"n4\"];if(2<=c.length){var e;var g=c[1];e=[];if(g)for(var g=g.split(\",\"),l=g.length,h=0;h<l;h++){var k;k=g[h];if(k.match(/^[\\w-]+$/))if(k=na.exec(k.toLowerCase()),null==k)k=\"\";else{var m;m=k[1];if(null==m||\"\"==m)m=\"4\";else{var z=la[m];m=z?z:isNaN(m)?\"4\":m.substr(0,1)}k=k[2];k=[null==k||\"\"==k?\"n\":ma[k],m].join(\"\")}else k=\"\";k&&e.push(k)}0<e.length&&(f=e);3==c.length&&(c=c[2],e=[],\n        c=c?c.split(\",\"):e,0<c.length&&(c=U[c[0]])&&(this.G[d]=c))}this.G[d]||(c=U[d])&&(this.G[d]=c);for(c=0;c<f.length;c+=1)this.W.push(new A(d,f[c]))}};function V(a,b){this.a=a;this.c=b}var oa={Arimo:!0,Cousine:!0,Tinos:!0};V.prototype.load=function(a){for(var b=this.a,c=new S(this.c.api,v(b),this.c.text),d=this.c.families,f=d.length,e=0;e<f;e++){var g=d[e].split(\":\");3==g.length&&c.L.push(g.pop());var l=\"\";2==g.length&&\"\"!=g[1]&&(l=\":\");c.k.push(g.join(l))}d=new T(d);d.parse();w(b,c.d());a(d.W,d.G,oa)};function W(a,b){this.a=a;this.c=b;this.R=[]}W.prototype.A=function(a){var b=this.a;return v(this.a)+(this.c.api||\"//f.fontdeck.com/s/css/js/\")+(b.m.location.hostname||b.D.location.hostname)+\"/\"+a+\".js\"};\n    W.prototype.load=function(a){var b=this.c.id,c=this.a.m,d=this;b?(c.__webfontfontdeckmodule__||(c.__webfontfontdeckmodule__={}),c.__webfontfontdeckmodule__[b]=function(b,c){for(var g=0,l=c.fonts.length;g<l;++g){var h=c.fonts[g];d.R.push(new A(h.name,ca(\"font-weight:\"+h.weight+\";font-style:\"+h.style)))}a(d.R)},x(this.a,this.A(b),function(b){b&&a([])})):a([])};function X(a,b){this.a=a;this.c=b}X.prototype.A=function(a){return(this.c.api||\"https://use.typekit.net\")+\"/\"+a+\".js\"};X.prototype.load=function(a){var b=this.c.id,c=this.a.m;b?x(this.a,this.A(b),function(b){if(b)a([]);else if(c.Typekit&&c.Typekit.config&&c.Typekit.config.fn){b=c.Typekit.config.fn;for(var f=[],e=0;e<b.length;e+=2)for(var g=b[e],l=b[e+1],h=0;h<l.length;h++)f.push(new A(g,l[h]));try{c.Typekit.load({events:!1,classes:!1,async:!0})}catch(k){}a(f)}},2E3):a([])};function Y(a,b){this.a=a;this.c=b}Y.prototype.A=function(a,b){var c=v(this.a),d=(this.c.api||\"fast.fonts.net/jsapi\").replace(/^.*http(s?):(\\/\\/)?/,\"\");return c+\"//\"+d+\"/\"+a+\".js\"+(b?\"?v=\"+b:\"\")};Y.prototype.load=function(a){var b=this.c.projectId,c=this.c.version;if(b){var d=this.a.m;x(this.a,this.A(b,c),function(c){if(c)a([]);else if(d[\"__mti_fntLst\"+b]){c=d[\"__mti_fntLst\"+b]();var e=[];if(c)for(var g=0;g<c.length;g++)e.push(new A(c[g].fontfamily));a(e)}else a([])}).id=\"__MonotypeAPIScript__\"+b}else a([])};function pa(a,b){this.a=a;this.c=b}pa.prototype.load=function(a){var b,c,d=this.c.urls||[],f=this.c.families||[],e=this.c.testStrings||{};b=0;for(c=d.length;b<c;b++)w(this.a,d[b]);d=[];b=0;for(c=f.length;b<c;b++){var g=f[b].split(\":\");if(g[1])for(var l=g[1].split(\",\"),h=0;h<l.length;h+=1)d.push(new A(g[0],l[h]));else d.push(new A(g[0]))}a(d,e)};var Z=new R(window);Z.p.t.custom=function(a,b){return new pa(b,a)};Z.p.t.fontdeck=function(a,b){return new W(b,a)};Z.p.t.monotype=function(a,b){return new Y(b,a)};Z.p.t.typekit=function(a,b){return new X(b,a)};Z.p.t.google=function(a,b){return new V(b,a)};var $={load:n(Z.load,Z)};\"function\"===typeof define&&define.amd?define(function(){return $}):\"undefined\"!==typeof module&&module.exports?module.exports=$:(window.WebFont=$,window.WebFontConfig&&Z.load(window.WebFontConfig));}());\n"
  },
  {
    "path": "static/editor.md/plugins/code-block-dialog/code-block-dialog.js",
    "content": "/*!\n * Code block dialog plugin for Editor.md\n *\n * @file        code-block-dialog.js\n * @author      pandao\n * @version     1.2.0\n * @updateTime  2015-03-07\n * {@link       https://github.com/pandao/editor.md}\n * @license     MIT\n */\n\n(function() {\n\n    var factory = function (exports) {\n\t\tvar cmEditor;\n\t\tvar pluginName    = \"code-block-dialog\";\n    \n\t\t// for CodeBlock dialog select\n\t\tvar codeLanguages = exports.codeLanguages = {\n\t\t\tasp           : [\"ASP\", \"vbscript\"],\n\t\t\tactionscript  : [\"ActionScript(3.0)/Flash/Flex\", \"clike\"],\n\t\t\tbash          : [\"Bash/Bat\", \"shell\"],\n\t\t\tcss           : [\"CSS\", \"css\"],\n\t\t\tc             : [\"C\", \"clike\"],\n\t\t\tcpp           : [\"C++\", \"clike\"],\n\t\t\tcsharp        : [\"C#\", \"clike\"],\n\t\t\tcoffeescript  : [\"CoffeeScript\", \"coffeescript\"],\n\t\t\td             : [\"D\", \"d\"],\n\t\t\tdart          : [\"Dart\", \"dart\"],\n\t\t\tdelphi        : [\"Delphi/Pascal\", \"pascal\"],\n\t\t\terlang        : [\"Erlang\", \"erlang\"],\n\t\t\tgo            : [\"Golang\", \"go\"],\n\t\t\tgroovy        : [\"Groovy\", \"groovy\"],\n\t\t\thtml          : [\"HTML\", \"text/html\"],\n\t\t\tjava          : [\"Java\", \"clike\"],\n\t\t\tjson          : [\"JSON\", \"text/json\"],\n\t\t\tjavascript    : [\"Javascript\", \"javascript\"],\n\t\t\tlua           : [\"Lua\", \"lua\"],\n\t\t\tless          : [\"LESS\", \"css\"],\n\t\t\tmarkdown      : [\"Markdown\", \"gfm\"],\n\t\t\t\"objective-c\" : [\"Objective-C\", \"clike\"],\n\t\t\tphp           : [\"PHP\", \"php\"],\n\t\t\tperl          : [\"Perl\", \"perl\"],\n\t\t\tpython        : [\"Python\", \"python\"],\n\t\t\tr             : [\"R\", \"r\"],\n\t\t\trst           : [\"reStructedText\", \"rst\"],\n\t\t\truby          : [\"Ruby\", \"ruby\"],\n\t\t\tsql           : [\"SQL\", \"sql\"],\n\t\t\tsass          : [\"SASS/SCSS\", \"sass\"],\n\t\t\tshell         : [\"Shell\", \"shell\"],\n\t\t\tscala         : [\"Scala\", \"clike\"],\n\t\t\tswift         : [\"Swift\", \"clike\"],\n\t\t\tvb            : [\"VB/VBScript\", \"vb\"],\n\t\t\txml           : [\"XML\", \"text/xml\"],\n\t\t\tyaml          : [\"YAML\", \"yaml\"]\n\t\t};\n\n\t\texports.fn.codeBlockDialog = function() {\n\n\t\t\tvar _this       = this;\n            var cm          = this.cm;\n            var lang        = this.lang;\n            var editor      = this.editor;\n            var settings    = this.settings;\n            var cursor      = cm.getCursor();\n            var selection   = cm.getSelection();\n            var classPrefix = this.classPrefix;\n\t\t\tvar dialogName  = classPrefix + pluginName, dialog;\n\t\t\tvar dialogLang  = lang.dialog.codeBlock;\n\n\t\t\tcm.focus();\n\n            if (editor.find(\".\" + dialogName).length > 0)\n            {\n                dialog = editor.find(\".\" + dialogName);\n                dialog.find(\"option:first\").attr(\"selected\", \"selected\");\n                dialog.find(\"textarea\").val(selection);\n\n                this.dialogShowMask(dialog);\n                this.dialogLockScreen();\n                dialog.show();\n            }\n            else \n            {      \n                var dialogHTML = \"<div class=\\\"\" + classPrefix + \"code-toolbar\\\">\" +\n                                        dialogLang.selectLabel + \"<select><option selected=\\\"selected\\\" value=\\\"\\\">\" + dialogLang.selectDefaultText + \"</option></select>\" +\n                                    \"</div>\" +\n                                    \"<textarea placeholder=\\\"coding now....\\\" style=\\\"display:none;\\\">\" + selection + \"</textarea>\";\n\n                dialog = this.createDialog({\n                    name   : dialogName,\n                    title  : dialogLang.title,\n                    width  : 780,\n                    height : 565,\n                    mask   : settings.dialogShowMask,\n                    drag   : settings.dialogDraggable,\n                    content    : dialogHTML,\n                    lockScreen : settings.dialogLockScreen,\n                    maskStyle  : {\n                        opacity         : settings.dialogMaskOpacity,\n                        backgroundColor : settings.dialogMaskBgColor\n                    },\n                    buttons : {\n                        enter  : [lang.buttons.enter, function() {\n                            var codeTexts  = this.find(\"textarea\").val();\n                            var langName   = this.find(\"select\").val();\n\n                            if (langName === \"\")\n                            {\n                                alert(lang.dialog.codeBlock.unselectedLanguageAlert);\n                                return false;\n                            }\n\n                            if (codeTexts === \"\")\n                            {\n                                alert(lang.dialog.codeBlock.codeEmptyAlert);\n                                return false;\n                            }\n\n                            langName = (langName === \"other\") ? \"\" : langName;\n\n                            cm.replaceSelection([\"```\" + langName, codeTexts, \"```\"].join(\"\\n\"));\n\n                            if (langName === \"\") {\n                                cm.setCursor(cursor.line, cursor.ch + 3);\n                            }\n\n                            this.hide().lockScreen(false).hideMask();\n\n                            return false;\n                        }],\n                        cancel : [lang.buttons.cancel, function() {                                   \n                            this.hide().lockScreen(false).hideMask();\n\n                            return false;\n                        }]\n                    }\n                });\n            }\n\n\t\t\tvar langSelect = dialog.find(\"select\");\n\n\t\t\tif (langSelect.find(\"option\").length === 1) \n\t\t\t{\n\t\t\t\tfor (var key in codeLanguages)\n\t\t\t\t{\n\t\t\t\t\tvar codeLang = codeLanguages[key];\n\t\t\t\t\tlangSelect.append(\"<option value=\\\"\" + key + \"\\\" mode=\\\"\" + codeLang[1] + \"\\\">\" + codeLang[0] + \"</option>\");\n\t\t\t\t}\n\n\t\t\t\tlangSelect.append(\"<option value=\\\"other\\\">\" + dialogLang.otherLanguage + \"</option>\");\n\t\t\t}\n\t\t\t\n\t\t\tvar mode   = langSelect.find(\"option:selected\").attr(\"mode\");\n\t\t\n\t\t\tvar cmConfig = {\n\t\t\t\tmode                      : (mode) ? mode : \"text/html\",\n\t\t\t\ttheme                     : settings.theme,\n\t\t\t\ttabSize                   : 4,\n\t\t\t\tautofocus                 : true,\n\t\t\t\tautoCloseTags             : true,\n\t\t\t\tindentUnit                : 4,\n\t\t\t\tlineNumbers               : true,\n\t\t\t\tlineWrapping              : true,\n\t\t\t\textraKeys                 : {\"Ctrl-Q\": function(cm){ cm.foldCode(cm.getCursor()); }},\n\t\t\t\tfoldGutter                : true,\n\t\t\t\tgutters                   : [\"CodeMirror-linenumbers\", \"CodeMirror-foldgutter\"],\n\t\t\t\tmatchBrackets             : true,\n\t\t\t\tindentWithTabs            : true,\n\t\t\t\tstyleActiveLine           : true,\n\t\t\t\tstyleSelectedText         : true,\n\t\t\t\tautoCloseBrackets         : true,\n\t\t\t\tshowTrailingSpace         : true,\n\t\t\t\thighlightSelectionMatches : true\n\t\t\t};\n\t\t\t\n\t\t\tvar textarea = dialog.find(\"textarea\");\n\t\t\tvar cmObj    = dialog.find(\".CodeMirror\");\n\n\t\t\tif (dialog.find(\".CodeMirror\").length < 1) \n\t\t\t{\n\t\t\t\tcmEditor = exports.$CodeMirror.fromTextArea(textarea[0], cmConfig);\n\t\t\t\tcmObj    = dialog.find(\".CodeMirror\");\n\n\t\t\t\tcmObj.css({\n\t\t\t\t\t\"float\"   : \"none\", \n\t\t\t\t\tmargin    : \"8px 0\",\n\t\t\t\t\tborder    : \"1px solid #ddd\",\n\t\t\t\t\tfontSize  : settings.fontSize,\n\t\t\t\t\twidth     : \"100%\",\n\t\t\t\t\theight    : \"390px\"\n\t\t\t\t});\n\n\t\t\t\tcmEditor.on(\"change\", function(cm) {\n\t\t\t\t\ttextarea.val(cm.getValue());\n\t\t\t\t});\n\t\t\t} \n\t\t\telse \n\t\t\t{\n\n\t\t\t\tcmEditor.setValue(cm.getSelection());\n\t\t\t}\n\n\t\t\tlangSelect.change(function(){\n\t\t\t\tvar _mode = $(this).find(\"option:selected\").attr(\"mode\");\n\t\t\t\tcmEditor.setOption(\"mode\", _mode);\n\t\t\t});\n\t\t};\n\n\t};\n    \n\t// CommonJS/Node.js\n\tif (typeof require === \"function\" && typeof exports === \"object\" && typeof module === \"object\")\n    { \n        module.exports = factory;\n    }\n\telse if (typeof define === \"function\")  // AMD/CMD/Sea.js\n    {\n\t\tif (define.amd) { // for Require.js\n\n\t\t\tdefine([\"editormd\"], function(editormd) {\n                factory(editormd);\n            });\n\n\t\t} else { // for Sea.js\n\t\t\tdefine(function(require) {\n                var editormd = require(\"./../../editormd\");\n                factory(editormd);\n            });\n\t\t}\n\t} \n\telse\n\t{\n        factory(window.editormd);\n\t}\n\n})();\n"
  },
  {
    "path": "static/editor.md/plugins/emoji-dialog/emoji-dialog.js",
    "content": "/*!\n * Emoji dialog plugin for Editor.md\n *\n * @file        emoji-dialog.js\n * @author      pandao\n * @version     1.2.0\n * @updateTime  2015-03-08\n * {@link       https://github.com/pandao/editor.md}\n * @license     MIT\n */\n\n(function() {\n\n\tvar factory = function (exports) {\n\n\t\tvar $             = jQuery;\n\t\tvar pluginName    = \"emoji-dialog\";\n\t\tvar emojiTabIndex = 0;\n\t\tvar emojiData     = [];\n        var selecteds     = [];\n\n\t\tvar logoPrefix    = \"editormd-logo\";\n\t\tvar logos         = [\n\t\t\tlogoPrefix,\n\t\t\tlogoPrefix + \"-1x\",\n\t\t\tlogoPrefix + \"-2x\",\n\t\t\tlogoPrefix + \"-3x\",\n\t\t\tlogoPrefix + \"-4x\",\n\t\t\tlogoPrefix + \"-5x\",\n\t\t\tlogoPrefix + \"-6x\",\n\t\t\tlogoPrefix + \"-7x\",\n\t\t\tlogoPrefix + \"-8x\"\n\t\t];\n\n\t\tvar langs = {\n\t\t\t\"zh-cn\" : {\n\t\t\t\ttoolbar : {\n\t\t\t\t\temoji : \"Emoji 表情\"\n\t\t\t\t},\n\t\t\t\tdialog : {\n\t\t\t\t\temoji : {\n\t\t\t\t\t\ttitle : \"Emoji 表情\"\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\t\t\t\"zh-tw\" : {\n\t\t\t\ttoolbar : {\n\t\t\t\t\temoji : \"Emoji 表情\"\n\t\t\t\t},\n\t\t\t\tdialog : {\n\t\t\t\t\temoji : {\n\t\t\t\t\t\ttitle : \"Emoji 表情\"\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\t\t\t\"en\" : {\n\t\t\t\ttoolbar : {\n\t\t\t\t\temoji : \"Emoji\"\n\t\t\t\t},\n\t\t\t\tdialog : {\n\t\t\t\t\temoji : {\n\t\t\t\t\t\ttitle : \"Emoji\"\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\texports.fn.emojiDialog = function() {\n\t\t\tvar _this       = this;\n\t\t\tvar cm          = this.cm;\n\t\t\tvar settings    = _this.settings;\n            \n            if (!settings.emoji)\n            {\n                alert(\"settings.emoji == false\");\n                return ;\n            }\n            \n\t\t\tvar path        = settings.pluginPath + pluginName + \"/\";\n\t\t\tvar editor      = this.editor;\n\t\t\tvar cursor      = cm.getCursor();\n\t\t\tvar selection   = cm.getSelection();\n\t\t\tvar classPrefix = this.classPrefix;\n\n\t\t\t$.extend(true, this.lang, langs[this.lang.name]);\n\t\t\tthis.setToolbar();\n\n\t\t\tvar lang        = this.lang;\n\t\t\tvar dialogName  = classPrefix + pluginName, dialog;\n\t\t\tvar dialogLang  = lang.dialog.emoji;\n\t\t\t\n\t\t\tvar dialogContent = [\n\t\t\t\t\"<div class=\\\"\" + classPrefix + \"emoji-dialog-box\\\" style=\\\"width: 760px;height: 334px;margin-bottom: 8px;overflow: hidden;\\\">\",\n\t\t\t\t\"<div class=\\\"\" + classPrefix + \"tab\\\"></div>\",\n\t\t\t\t\"</div>\",\n\t\t\t].join(\"\\n\");\n\n\t\t\tcm.focus();\n\n\t\t\tif (editor.find(\".\" + dialogName).length > 0) \n\t\t\t{\n                dialog = editor.find(\".\" + dialogName);\n\n\t\t\t\tselecteds = [];\n\t\t\t\tdialog.find(\"a\").removeClass(\"selected\");\n\n\t\t\t\tthis.dialogShowMask(dialog);\n\t\t\t\tthis.dialogLockScreen();\n\t\t\t\tdialog.show();\n\t\t\t} \n\t\t\telse\n\t\t\t{\n\t\t\t\tdialog = this.createDialog({\n\t\t\t\t\tname       : dialogName,\n\t\t\t\t\ttitle      : dialogLang.title,\n\t\t\t\t\twidth      : 800,\n\t\t\t\t\theight     : 475,\n\t\t\t\t\tmask       : settings.dialogShowMask,\n\t\t\t\t\tdrag       : settings.dialogDraggable,\n\t\t\t\t\tcontent    : dialogContent,\n\t\t\t\t\tlockScreen : settings.dialogLockScreen,\n\t\t\t\t\tmaskStyle  : {\n\t\t\t\t\t\topacity         : settings.dialogMaskOpacity,\n\t\t\t\t\t\tbackgroundColor : settings.dialogMaskBgColor\n\t\t\t\t\t},\n\t\t\t\t\tbuttons    : {\n\t\t\t\t\t\tenter  : [lang.buttons.enter, function() {\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tcm.replaceSelection(selecteds.join(\" \"));\n\t\t\t\t\t\t\tthis.hide().lockScreen(false).hideMask();\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t}],\n\t\t\t\t\t\tcancel : [lang.buttons.cancel, function() {                           \n\t\t\t\t\t\t\tthis.hide().lockScreen(false).hideMask();\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t}]\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t\t\n\t\t\tvar category = [\"Github emoji\", \"Twemoji\", \"Font awesome\", \"Editor.md logo\"];\n\t\t\tvar tab      = dialog.find(\".\" + classPrefix + \"tab\");\n\n\t\t\tif (tab.html() === \"\") \n\t\t\t{\n\t\t\t\tvar head = \"<ul class=\\\"\" + classPrefix + \"tab-head\\\">\";\n\n\t\t\t\tfor (var i = 0; i<4; i++) {\n\t\t\t\t\tvar active = (i === 0) ? \" class=\\\"active\\\"\" : \"\";\n\t\t\t\t\thead += \"<li\" + active + \"><a href=\\\"javascript:;\\\">\" + category[i] + \"</a></li>\";\n\t\t\t\t}\n\n\t\t\t\thead += \"</ul>\";\n\n\t\t\t\ttab.append(head);\n\n\t\t\t\tvar container = \"<div class=\\\"\" + classPrefix + \"tab-container\\\">\";\n\n\t\t\t\tfor (var x = 0; x < 4; x++) \n                {\n\t\t\t\t\tvar display = (x === 0) ? \"\" : \"display:none;\";\n\t\t\t\t\tcontainer += \"<div class=\\\"\" + classPrefix + \"tab-box\\\" style=\\\"height: 260px;overflow: hidden;overflow-y: auto;\" + display + \"\\\"></div>\";\n\t\t\t\t}\n\n\t\t\t\tcontainer += \"</div>\";\n\n\t\t\t\ttab.append(container);  \n\t\t\t}\n            \n\t\t\tvar tabBoxs = tab.find(\".\" + classPrefix + \"tab-box\");\n            var emojiCategories = [\"github-emoji\", \"twemoji\", \"font-awesome\", logoPrefix];\n\n\t\t\tvar drawTable = function() {\n                var cname = emojiCategories[emojiTabIndex];\n\t\t\t\tvar $data = emojiData[cname];\n                var $tab  = tabBoxs.eq(emojiTabIndex);\n\n\t\t\t\tif ($tab.html() !== \"\") {\n                    //console.log(\"break =>\", cname);\n                    return ;\n                }\n                \n                var pagination = function(data, type) {\n                    var rowNumber = (type === \"editormd-logo\") ? \"5\" : 20;\n                    var pageTotal = Math.ceil(data.length / rowNumber);\n                    var table     = \"<div class=\\\"\" + classPrefix + \"grid-table\\\">\";\n\n                    for (var i = 0; i < pageTotal; i++)\n                    {\n                        var row = \"<div class=\\\"\" + classPrefix + \"grid-table-row\\\">\";\n\n                        for (var x = 0; x < rowNumber; x++)\n                        {\n                            var emoji = $.trim(data[(i * rowNumber) + x]);\n                            \n                            if (typeof emoji !== \"undefined\" && emoji !== \"\")\n                            {\n                                var img = \"\", icon = \"\";\n                                \n                                if (type === \"github-emoji\")\n                                {\n                                    var src = (emoji === \"+1\") ? \"plus1\" : emoji;\n                                    src     = (src === \"black_large_square\") ? \"black_square\" : src;\n                                    src     = (src === \"moon\") ? \"waxing_gibbous_moon\" : src;\n                                    \n                                    src     = exports.emoji.path + src + exports.emoji.ext;\n                                    img     = \"<img src=\\\"\" + src + \"\\\" width=\\\"24\\\" class=\\\"emoji\\\" title=\\\"&#58;\" + emoji + \"&#58;\\\" alt=\\\"&#58;\" + emoji + \"&#58;\\\" />\";\n                                    row += \"<a href=\\\"javascript:;\\\" value=\\\":\" + emoji + \":\\\" title=\\\":\" + emoji + \":\\\" class=\\\"\" + classPrefix + \"emoji-btn\\\">\" + img + \"</a>\";\n                                }\n                                else if (type === \"twemoji\")\n                                {\n                                    var twemojiSrc = exports.twemoji.path + emoji + exports.twemoji.ext;\n                                    img = \"<img src=\\\"\" + twemojiSrc + \"\\\" width=\\\"24\\\" title=\\\"twemoji-\" + emoji + \"\\\" alt=\\\"twemoji-\" + emoji + \"\\\" class=\\\"emoji twemoji\\\" />\";\n                                    row += \"<a href=\\\"javascript:;\\\" value=\\\":tw-\" + emoji + \":\\\" title=\\\":tw-\" + emoji + \":\\\" class=\\\"\" + classPrefix + \"emoji-btn\\\">\" + img + \"</a>\";\n                                }\n                                else if (type === \"font-awesome\")\n                                {\n                                    icon = \"<i class=\\\"fa fa-\" + emoji + \" fa-emoji\\\" title=\\\"\" + emoji + \"\\\"></i>\";\n                                    row += \"<a href=\\\"javascript:;\\\" value=\\\":fa-\" + emoji + \":\\\" title=\\\":fa-\" + emoji + \":\\\" class=\\\"\" + classPrefix + \"emoji-btn\\\">\" + icon + \"</a>\";\n                                }\n                                else if (type === \"editormd-logo\")\n                                {\n                                    icon = \"<i class=\\\"\" + emoji + \"\\\" title=\\\"Editor.md logo (\" + emoji + \")\\\"></i>\";\n                                    row += \"<a href=\\\"javascript:;\\\" value=\\\":\" + emoji + \":\\\" title=\\\":\" + emoji + \":\\\" style=\\\"width:20%;\\\" class=\\\"\" + classPrefix + \"emoji-btn\\\">\" + icon + \"</a>\";\n                                }\n                            }\n                            else\n                            {\n                                row += \"<a href=\\\"javascript:;\\\" value=\\\"\\\"></a>\";                        \n                            }\n                        }\n\n                        row += \"</div>\";\n\n                        table += row;\n                    }\n\n                    table += \"</div>\";\n                    \n                    return table;\n                };\n                \n                if (emojiTabIndex === 0)\n                {\n                    for (var i = 0, len = $data.length; i < len; i++)\n                    {\n                        var h4Style = (i === 0) ? \" style=\\\"margin: 0 0 10px;\\\"\" : \" style=\\\"margin: 10px 0;\\\"\";\n                        $tab.append(\"<h4\" + h4Style + \">\" + $data[i].category + \"</h4>\");\n                        $tab.append(pagination($data[i].list, cname));\n                    }\n                }\n                else\n                {\n                    $tab.append(pagination($data, cname));\n                }\n\n\t\t\t\t$tab.find(\".\" + classPrefix + \"emoji-btn\").bind(exports.mouseOrTouch(\"click\", \"touchend\"), function() {\n\t\t\t\t\t$(this).toggleClass(\"selected\");\n\n\t\t\t\t\tif ($(this).hasClass(\"selected\")) \n\t\t\t\t\t{\n\t\t\t\t\t\tselecteds.push($(this).attr(\"value\"));\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t};\n\t\t\t\n\t\t\tif (emojiData.length < 1) \n\t\t\t{            \n\t\t\t\tif (typeof dialog.loading === \"function\") {\n                    dialog.loading(true);\n                }\n\n\t\t\t\t$.getJSON(path + \"emoji.json?temp=\" + Math.random(), function(json) {\n\n\t\t\t\t\tif (typeof dialog.loading === \"function\") {\n                        dialog.loading(false);\n                    }\n\n\t\t\t\t\temojiData = json;\n                    emojiData[logoPrefix] = logos;\n\t\t\t\t\tdrawTable();\n\t\t\t\t});\n\t\t\t} \n\t\t\telse \n\t\t\t{\n\t\t\t\tdrawTable();\n\t\t\t}\n\n\t\t\ttab.find(\"li\").bind(exports.mouseOrTouch(\"click\", \"touchend\"), function() {\n\t\t\t\tvar $this     = $(this);\n\t\t\t\temojiTabIndex = $this.index();\n\n\t\t\t\t$this.addClass(\"active\").siblings().removeClass(\"active\");\n\t\t\t\ttabBoxs.eq(emojiTabIndex).show().siblings().hide();\n\t\t\t\tdrawTable();\n\t\t\t});\n\t\t};\n\n\t};\n    \n\t// CommonJS/Node.js\n\tif (typeof require === \"function\" && typeof exports === \"object\" && typeof module === \"object\")\n    { \n        module.exports = factory;\n    }\n\telse if (typeof define === \"function\")  // AMD/CMD/Sea.js\n    {\n\t\tif (define.amd) { // for Require.js\n\n\t\t\tdefine([\"editormd\"], function(editormd) {\n                factory(editormd);\n            });\n\n\t\t} else { // for Sea.js\n\t\t\tdefine(function(require) {\n                var editormd = require(\"./../../editormd\");\n                factory(editormd);\n            });\n\t\t}\n\t} \n\telse\n\t{\n        factory(window.editormd);\n\t}\n\n})();\n"
  },
  {
    "path": "static/editor.md/plugins/emoji-dialog/emoji.json",
    "content": "{\n\t\"github-emoji\" : [\n\t\t{\n\t\t\t\"category\" :\"People\",\n\t\t\t\"list\" : [\"bowtie\",\"smile\",\"laughing\",\"blush\",\"smiley\",\"relaxed\",\"smirk\",\"heart_eyes\",\"kissing_heart\",\"kissing_closed_eyes\",\"flushed\",\"relieved\",\"satisfied\",\"grin\",\"wink\",\"stuck_out_tongue_winking_eye\",\"stuck_out_tongue_closed_eyes\",\"grinning\",\"kissing\",\"kissing_smiling_eyes\",\"stuck_out_tongue\",\"sleeping\",\"worried\",\"frowning\",\"anguished\",\"open_mouth\",\"grimacing\",\"confused\",\"hushed\",\"expressionless\",\"unamused\",\"sweat_smile\",\"sweat\",\"disappointed_relieved\",\"weary\",\"pensive\",\"disappointed\",\"confounded\",\"fearful\",\"cold_sweat\",\"persevere\",\"cry\",\"sob\",\"joy\",\"astonished\",\"scream\",\"neckbeard\",\"tired_face\",\"angry\",\"rage\",\"triumph\",\"sleepy\",\"yum\",\"mask\",\"sunglasses\",\"dizzy_face\",\"imp\",\"smiling_imp\",\"neutral_face\",\"no_mouth\",\"innocent\",\"alien\",\"yellow_heart\",\"blue_heart\",\"purple_heart\",\"heart\",\"green_heart\",\"broken_heart\",\"heartbeat\",\"heartpulse\",\"two_hearts\",\"revolving_hearts\",\"cupid\",\"sparkling_heart\",\"sparkles\",\"star\",\"star2\",\"dizzy\",\"boom\",\"collision\",\"anger\",\"exclamation\",\"question\",\"grey_exclamation\",\"grey_question\",\"zzz\",\"dash\",\"sweat_drops\",\"notes\",\"musical_note\",\"fire\",\"hankey\",\"poop\",\"shit\",\"+1\",\"thumbsup\",\"-1\",\"thumbsdown\",\"ok_hand\",\"punch\",\"facepunch\",\"fist\",\"v\",\"wave\",\"hand\",\"raised_hand\",\"open_hands\",\"point_up\",\"point_down\",\"point_left\",\"point_right\",\"raised_hands\",\"pray\",\"point_up_2\",\"clap\",\"muscle\",\"metal\",\"fu\",\"walking\",\"runner\",\"running\",\"couple\",\"family\",\"two_men_holding_hands\",\"two_women_holding_hands\",\"dancer\",\"dancers\",\"ok_woman\",\"no_good\",\"information_desk_person\",\"raising_hand\",\"bride_with_veil\",\"person_with_pouting_face\",\"person_frowning\",\"bow\",\"couplekiss\",\"couple_with_heart\",\"massage\",\"haircut\",\"nail_care\",\"boy\",\"girl\",\"woman\",\"man\",\"baby\",\"older_woman\",\"older_man\",\"person_with_blond_hair\",\"man_with_gua_pi_mao\",\"man_with_turban\",\"construction_worker\",\"cop\",\"angel\",\"princess\",\"smiley_cat\",\"smile_cat\",\"heart_eyes_cat\",\"kissing_cat\",\"smirk_cat\",\"scream_cat\",\"crying_cat_face\",\"joy_cat\",\"pouting_cat\",\"japanese_ogre\",\"japanese_goblin\",\"see_no_evil\",\"hear_no_evil\",\"speak_no_evil\",\"guardsman\",\"skull\",\"feet\",\"lips\",\"kiss\",\"droplet\",\"ear\",\"eyes\",\"nose\",\"tongue\",\"love_letter\",\"bust_in_silhouette\",\"busts_in_silhouette\",\"speech_balloon\",\"thought_balloon\",\"feelsgood\",\"finnadie\",\"goberserk\",\"godmode\",\"hurtrealbad\",\"rage1\",\"rage2\",\"rage3\",\"rage4\",\"suspect\",\"trollface\"]\n\t\t},\n\t\t{\n\t\t\t\"category\" :\"Nature\",\n\t\t\t\"list\" : [\"sunny\",\"umbrella\",\"cloud\",\"snowflake\",\"snowman\",\"zap\",\"cyclone\",\"foggy\",\"ocean\",\"cat\",\"dog\",\"mouse\",\"hamster\",\"rabbit\",\"wolf\",\"frog\",\"tiger\",\"koala\",\"bear\",\"pig\",\"pig_nose\",\"cow\",\"boar\",\"monkey_face\",\"monkey\",\"horse\",\"racehorse\",\"camel\",\"sheep\",\"elephant\",\"panda_face\",\"snake\",\"bird\",\"baby_chick\",\"hatched_chick\",\"hatching_chick\",\"chicken\",\"penguin\",\"turtle\",\"bug\",\"honeybee\",\"ant\",\"beetle\",\"snail\",\"octopus\",\"tropical_fish\",\"fish\",\"whale\",\"whale2\",\"dolphin\",\"cow2\",\"ram\",\"rat\",\"water_buffalo\",\"tiger2\",\"rabbit2\",\"dragon\",\"goat\",\"rooster\",\"dog2\",\"pig2\",\"mouse2\",\"ox\",\"dragon_face\",\"blowfish\",\"crocodile\",\"dromedary_camel\",\"leopard\",\"cat2\",\"poodle\",\"paw_prints\",\"bouquet\",\"cherry_blossom\",\"tulip\",\"four_leaf_clover\",\"rose\",\"sunflower\",\"hibiscus\",\"maple_leaf\",\"leaves\",\"fallen_leaf\",\"herb\",\"mushroom\",\"cactus\",\"palm_tree\",\"evergreen_tree\",\"deciduous_tree\",\"chestnut\",\"seedling\",\"blossom\",\"ear_of_rice\",\"shell\",\"globe_with_meridians\",\"sun_with_face\",\"full_moon_with_face\",\"new_moon_with_face\",\"new_moon\",\"waxing_crescent_moon\",\"first_quarter_moon\",\"waxing_gibbous_moon\",\"full_moon\",\"waning_gibbous_moon\",\"last_quarter_moon\",\"waning_crescent_moon\",\"last_quarter_moon_with_face\",\"first_quarter_moon_with_face\",\"moon\",\"earth_africa\",\"earth_americas\",\"earth_asia\",\"volcano\",\"milky_way\",\"partly_sunny\",\"octocat\",\"squirrel\"]\n\t\t},\n\t\t{\n\t\t\t\"category\" :\"Objects\",\n\t\t\t\"list\" : [\"bamboo\",\"gift_heart\",\"dolls\",\"school_satchel\",\"mortar_board\",\"flags\",\"fireworks\",\"sparkler\",\"wind_chime\",\"rice_scene\",\"jack_o_lantern\",\"ghost\",\"santa\",\"christmas_tree\",\"gift\",\"bell\",\"no_bell\",\"tanabata_tree\",\"tada\",\"confetti_ball\",\"balloon\",\"crystal_ball\",\"cd\",\"dvd\",\"floppy_disk\",\"camera\",\"video_camera\",\"movie_camera\",\"computer\",\"tv\",\"iphone\",\"phone\",\"telephone\",\"telephone_receiver\",\"pager\",\"fax\",\"minidisc\",\"vhs\",\"sound\",\"speaker\",\"mute\",\"loudspeaker\",\"mega\",\"hourglass\",\"hourglass_flowing_sand\",\"alarm_clock\",\"watch\",\"radio\",\"satellite\",\"loop\",\"mag\",\"mag_right\",\"unlock\",\"lock\",\"lock_with_ink_pen\",\"closed_lock_with_key\",\"key\",\"bulb\",\"flashlight\",\"high_brightness\",\"low_brightness\",\"electric_plug\",\"battery\",\"calling\",\"email\",\"mailbox\",\"postbox\",\"bath\",\"bathtub\",\"shower\",\"toilet\",\"wrench\",\"nut_and_bolt\",\"hammer\",\"seat\",\"moneybag\",\"yen\",\"dollar\",\"pound\",\"euro\",\"credit_card\",\"money_with_wings\",\"e-mail\",\"inbox_tray\",\"outbox_tray\",\"envelope\",\"incoming_envelope\",\"postal_horn\",\"mailbox_closed\",\"mailbox_with_mail\",\"mailbox_with_no_mail\",\"package\",\"door\",\"smoking\",\"bomb\",\"gun\",\"hocho\",\"pill\",\"syringe\",\"page_facing_up\",\"page_with_curl\",\"bookmark_tabs\",\"bar_chart\",\"chart_with_upwards_trend\",\"chart_with_downwards_trend\",\"scroll\",\"clipboard\",\"calendar\",\"date\",\"card_index\",\"file_folder\",\"open_file_folder\",\"scissors\",\"pushpin\",\"paperclip\",\"black_nib\",\"pencil2\",\"straight_ruler\",\"triangular_ruler\",\"closed_book\",\"green_book\",\"blue_book\",\"orange_book\",\"notebook\",\"notebook_with_decorative_cover\",\"ledger\",\"books\",\"bookmark\",\"name_badge\",\"microscope\",\"telescope\",\"newspaper\",\"football\",\"basketball\",\"soccer\",\"baseball\",\"tennis\",\"8ball\",\"rugby_football\",\"bowling\",\"golf\",\"mountain_bicyclist\",\"bicyclist\",\"horse_racing\",\"snowboarder\",\"swimmer\",\"surfer\",\"ski\",\"spades\",\"hearts\",\"clubs\",\"diamonds\",\"gem\",\"ring\",\"trophy\",\"musical_score\",\"musical_keyboard\",\"violin\",\"space_invader\",\"video_game\",\"black_joker\",\"flower_playing_cards\",\"game_die\",\"dart\",\"mahjong\",\"clapper\",\"memo\",\"pencil\",\"book\",\"art\",\"microphone\",\"headphones\",\"trumpet\",\"saxophone\",\"guitar\",\"shoe\",\"sandal\",\"high_heel\",\"lipstick\",\"boot\",\"shirt\",\"tshirt\",\"necktie\",\"womans_clothes\",\"dress\",\"running_shirt_with_sash\",\"jeans\",\"kimono\",\"bikini\",\"ribbon\",\"tophat\",\"crown\",\"womans_hat\",\"mans_shoe\",\"closed_umbrella\",\"briefcase\",\"handbag\",\"pouch\",\"purse\",\"eyeglasses\",\"fishing_pole_and_fish\",\"coffee\",\"tea\",\"sake\",\"baby_bottle\",\"beer\",\"beers\",\"cocktail\",\"tropical_drink\",\"wine_glass\",\"fork_and_knife\",\"pizza\",\"hamburger\",\"fries\",\"poultry_leg\",\"meat_on_bone\",\"spaghetti\",\"curry\",\"fried_shrimp\",\"bento\",\"sushi\",\"fish_cake\",\"rice_ball\",\"rice_cracker\",\"rice\",\"ramen\",\"stew\",\"oden\",\"dango\",\"egg\",\"bread\",\"doughnut\",\"custard\",\"icecream\",\"ice_cream\",\"shaved_ice\",\"birthday\",\"cake\",\"cookie\",\"chocolate_bar\",\"candy\",\"lollipop\",\"honey_pot\",\"apple\",\"green_apple\",\"tangerine\",\"lemon\",\"cherries\",\"grapes\",\"watermelon\",\"strawberry\",\"peach\",\"melon\",\"banana\",\"pear\",\"pineapple\",\"sweet_potato\",\"eggplant\",\"tomato\",\"corn\"]\n\t\t},\n\t\t{\n\t\t\t\"category\" :\"Places\",\n\t\t\t\"list\" : [\"house\",\"house_with_garden\",\"school\",\"office\",\"post_office\",\"hospital\",\"bank\",\"convenience_store\",\"love_hotel\",\"hotel\",\"wedding\",\"church\",\"department_store\",\"european_post_office\",\"city_sunrise\",\"city_sunset\",\"japanese_castle\",\"european_castle\",\"tent\",\"factory\",\"tokyo_tower\",\"japan\",\"mount_fuji\",\"sunrise_over_mountains\",\"sunrise\",\"stars\",\"statue_of_liberty\",\"bridge_at_night\",\"carousel_horse\",\"rainbow\",\"ferris_wheel\",\"fountain\",\"roller_coaster\",\"ship\",\"speedboat\",\"boat\",\"sailboat\",\"rowboat\",\"anchor\",\"rocket\",\"airplane\",\"helicopter\",\"steam_locomotive\",\"tram\",\"mountain_railway\",\"bike\",\"aerial_tramway\",\"suspension_railway\",\"mountain_cableway\",\"tractor\",\"blue_car\",\"oncoming_automobile\",\"car\",\"red_car\",\"taxi\",\"oncoming_taxi\",\"articulated_lorry\",\"bus\",\"oncoming_bus\",\"rotating_light\",\"police_car\",\"oncoming_police_car\",\"fire_engine\",\"ambulance\",\"minibus\",\"truck\",\"train\",\"station\",\"train2\",\"bullettrain_front\",\"bullettrain_side\",\"light_rail\",\"monorail\",\"railway_car\",\"trolleybus\",\"ticket\",\"fuelpump\",\"vertical_traffic_light\",\"traffic_light\",\"warning\",\"construction\",\"beginner\",\"atm\",\"slot_machine\",\"busstop\",\"barber\",\"hotsprings\",\"checkered_flag\",\"crossed_flags\",\"izakaya_lantern\",\"moyai\",\"circus_tent\",\"performing_arts\",\"round_pushpin\",\"triangular_flag_on_post\",\"jp\",\"kr\",\"cn\",\"us\",\"fr\",\"es\",\"it\",\"ru\",\"gb\",\"uk\",\"de\"]\n\t\t},\n\t\t{\n\t\t\t\"category\" :\"Symbols\",\n\t\t\t\"list\" : [\"one\",\"two\",\"three\",\"four\",\"five\",\"six\",\"seven\",\"eight\",\"nine\",\"keycap_ten\",\"1234\",\"zero\",\"hash\",\"symbols\",\"arrow_backward\",\"arrow_down\",\"arrow_forward\",\"arrow_left\",\"capital_abcd\",\"abcd\",\"abc\",\"arrow_lower_left\",\"arrow_lower_right\",\"arrow_right\",\"arrow_up\",\"arrow_upper_left\",\"arrow_upper_right\",\"arrow_double_down\",\"arrow_double_up\",\"arrow_down_small\",\"arrow_heading_down\",\"arrow_heading_up\",\"leftwards_arrow_with_hook\",\"arrow_right_hook\",\"left_right_arrow\",\"arrow_up_down\",\"arrow_up_small\",\"arrows_clockwise\",\"arrows_counterclockwise\",\"rewind\",\"fast_forward\",\"information_source\",\"ok\",\"twisted_rightwards_arrows\",\"repeat\",\"repeat_one\",\"new\",\"top\",\"up\",\"cool\",\"free\",\"ng\",\"cinema\",\"koko\",\"signal_strength\",\"u5272\",\"u5408\",\"u55b6\",\"u6307\",\"u6708\",\"u6709\",\"u6e80\",\"u7121\",\"u7533\",\"u7a7a\",\"u7981\",\"sa\",\"restroom\",\"mens\",\"womens\",\"baby_symbol\",\"no_smoking\",\"parking\",\"wheelchair\",\"metro\",\"baggage_claim\",\"accept\",\"wc\",\"potable_water\",\"put_litter_in_its_place\",\"secret\",\"congratulations\",\"m\",\"passport_control\",\"left_luggage\",\"customs\",\"ideograph_advantage\",\"cl\",\"sos\",\"id\",\"no_entry_sign\",\"underage\",\"no_mobile_phones\",\"do_not_litter\",\"non-potable_water\",\"no_bicycles\",\"no_pedestrians\",\"children_crossing\",\"no_entry\",\"eight_spoked_asterisk\",\"sparkle\",\"eight_pointed_black_star\",\"heart_decoration\",\"vs\",\"vibration_mode\",\"mobile_phone_off\",\"chart\",\"currency_exchange\",\"aries\",\"taurus\",\"gemini\",\"cancer\",\"leo\",\"virgo\",\"libra\",\"scorpius\",\"sagittarius\",\"capricorn\",\"aquarius\",\"pisces\",\"ophiuchus\",\"six_pointed_star\",\"negative_squared_cross_mark\",\"a\",\"b\",\"ab\",\"o2\",\"diamond_shape_with_a_dot_inside\",\"recycle\",\"end\",\"back\",\"on\",\"soon\",\"clock1\",\"clock130\",\"clock10\",\"clock1030\",\"clock11\",\"clock1130\",\"clock12\",\"clock1230\",\"clock2\",\"clock230\",\"clock3\",\"clock330\",\"clock4\",\"clock430\",\"clock5\",\"clock530\",\"clock6\",\"clock630\",\"clock7\",\"clock730\",\"clock8\",\"clock830\",\"clock9\",\"clock930\",\"heavy_dollar_sign\",\"copyright\",\"registered\",\"tm\",\"x\",\"heavy_exclamation_mark\",\"bangbang\",\"interrobang\",\"o\",\"heavy_multiplication_x\",\"heavy_plus_sign\",\"heavy_minus_sign\",\"heavy_division_sign\",\"white_flower\",\"100\",\"heavy_check_mark\",\"ballot_box_with_check\",\"radio_button\",\"link\",\"curly_loop\",\"wavy_dash\",\"part_alternation_mark\",\"trident\",\"black_small_square\",\"white_small_square\",\"black_medium_small_square\",\"white_medium_small_square\",\"black_medium_square\",\"white_medium_square\",\"black_large_square\",\"white_large_square\",\"white_check_mark\",\"black_square_button\",\"white_square_button\",\"black_circle\",\"white_circle\",\"red_circle\",\"large_blue_circle\",\"large_blue_diamond\",\"large_orange_diamond\",\"small_blue_diamond\",\"small_orange_diamond\",\"small_red_triangle\",\"small_red_triangle_down\",\"shipit\"]\n\t\t}\n\t],\n\n\t\"twemoji\" : [\"1f004\",\"1f0cf\",\"1f170\",\"1f171\",\"1f17e\",\"1f17f\",\"1f18e\",\"1f191\",\"1f192\",\"1f193\",\"1f194\",\"1f195\",\"1f196\",\"1f197\",\"1f198\",\"1f199\",\"1f19a\",\"1f1e6\",\"1f1e7\",\"1f1e8-1f1f3\",\"1f1e8\",\"1f1e9-1f1ea\",\"1f1e9\",\"1f1ea-1f1f8\",\"1f1ea\",\"1f1eb-1f1f7\",\"1f1eb\",\"1f1ec-1f1e7\",\"1f1ec\",\"1f1ed\",\"1f1ee-1f1f9\",\"1f1ee\",\"1f1ef-1f1f5\",\"1f1ef\",\"1f1f0-1f1f7\",\"1f1f0\",\"1f1f1\",\"1f1f2\",\"1f1f3\",\"1f1f4\",\"1f1f5\",\"1f1f6\",\"1f1f7-1f1fa\",\"1f1f7\",\"1f1f8\",\"1f1f9\",\"1f1fa-1f1f8\",\"1f1fa\",\"1f1fb\",\"1f1fc\",\"1f1fd\",\"1f1fe\",\"1f1ff\",\"1f201\",\"1f202\",\"1f21a\",\"1f22f\",\"1f232\",\"1f233\",\"1f234\",\"1f235\",\"1f236\",\"1f237\",\"1f238\",\"1f239\",\"1f23a\",\"1f250\",\"1f251\",\"1f300\",\"1f301\",\"1f302\",\"1f303\",\"1f304\",\"1f305\",\"1f306\",\"1f307\",\"1f308\",\"1f309\",\"1f30a\",\"1f30b\",\"1f30c\",\"1f30d\",\"1f30e\",\"1f30f\",\"1f310\",\"1f311\",\"1f312\",\"1f313\",\"1f314\",\"1f315\",\"1f316\",\"1f317\",\"1f318\",\"1f319\",\"1f31a\",\"1f31b\",\"1f31c\",\"1f31d\",\"1f31e\",\"1f31f\",\"1f320\",\"1f330\",\"1f331\",\"1f332\",\"1f333\",\"1f334\",\"1f335\",\"1f337\",\"1f338\",\"1f339\",\"1f33a\",\"1f33b\",\"1f33c\",\"1f33d\",\"1f33e\",\"1f33f\",\"1f340\",\"1f341\",\"1f342\",\"1f343\",\"1f344\",\"1f345\",\"1f346\",\"1f347\",\"1f348\",\"1f349\",\"1f34a\",\"1f34b\",\"1f34c\",\"1f34d\",\"1f34e\",\"1f34f\",\"1f350\",\"1f351\",\"1f352\",\"1f353\",\"1f354\",\"1f355\",\"1f356\",\"1f357\",\"1f358\",\"1f359\",\"1f35a\",\"1f35b\",\"1f35c\",\"1f35d\",\"1f35e\",\"1f35f\",\"1f360\",\"1f361\",\"1f362\",\"1f363\",\"1f364\",\"1f365\",\"1f366\",\"1f367\",\"1f368\",\"1f369\",\"1f36a\",\"1f36b\",\"1f36c\",\"1f36d\",\"1f36e\",\"1f36f\",\"1f370\",\"1f371\",\"1f372\",\"1f373\",\"1f374\",\"1f375\",\"1f376\",\"1f377\",\"1f378\",\"1f379\",\"1f37a\",\"1f37b\",\"1f37c\",\"1f380\",\"1f381\",\"1f382\",\"1f383\",\"1f384\",\"1f385\",\"1f386\",\"1f387\",\"1f388\",\"1f389\",\"1f38a\",\"1f38b\",\"1f38c\",\"1f38d\",\"1f38e\",\"1f38f\",\"1f390\",\"1f391\",\"1f392\",\"1f393\",\"1f3a0\",\"1f3a1\",\"1f3a2\",\"1f3a3\",\"1f3a4\",\"1f3a5\",\"1f3a6\",\"1f3a7\",\"1f3a8\",\"1f3a9\",\"1f3aa\",\"1f3ab\",\"1f3ac\",\"1f3ad\",\"1f3ae\",\"1f3af\",\"1f3b0\",\"1f3b1\",\"1f3b2\",\"1f3b3\",\"1f3b4\",\"1f3b5\",\"1f3b6\",\"1f3b7\",\"1f3b8\",\"1f3b9\",\"1f3ba\",\"1f3bb\",\"1f3bc\",\"1f3bd\",\"1f3be\",\"1f3bf\",\"1f3c0\",\"1f3c1\",\"1f3c2\",\"1f3c3\",\"1f3c4\",\"1f3c6\",\"1f3c7\",\"1f3c8\",\"1f3c9\",\"1f3ca\",\"1f3e0\",\"1f3e1\",\"1f3e2\",\"1f3e3\",\"1f3e4\",\"1f3e5\",\"1f3e6\",\"1f3e7\",\"1f3e8\",\"1f3e9\",\"1f3ea\",\"1f3eb\",\"1f3ec\",\"1f3ed\",\"1f3ee\",\"1f3ef\",\"1f3f0\",\"1f400\",\"1f401\",\"1f402\",\"1f403\",\"1f404\",\"1f405\",\"1f406\",\"1f407\",\"1f408\",\"1f409\",\"1f40a\",\"1f40b\",\"1f40c\",\"1f40d\",\"1f40e\",\"1f40f\",\"1f410\",\"1f411\",\"1f412\",\"1f413\",\"1f414\",\"1f415\",\"1f416\",\"1f417\",\"1f418\",\"1f419\",\"1f41a\",\"1f41b\",\"1f41c\",\"1f41d\",\"1f41e\",\"1f41f\",\"1f420\",\"1f421\",\"1f422\",\"1f423\",\"1f424\",\"1f425\",\"1f426\",\"1f427\",\"1f428\",\"1f429\",\"1f42a\",\"1f42b\",\"1f42c\",\"1f42d\",\"1f42e\",\"1f42f\",\"1f430\",\"1f431\",\"1f432\",\"1f433\",\"1f434\",\"1f435\",\"1f436\",\"1f437\",\"1f438\",\"1f439\",\"1f43a\",\"1f43b\",\"1f43c\",\"1f43d\",\"1f43e\",\"1f440\",\"1f442\",\"1f443\",\"1f444\",\"1f445\",\"1f446\",\"1f447\",\"1f448\",\"1f449\",\"1f44a\",\"1f44b\",\"1f44c\",\"1f44d\",\"1f44e\",\"1f44f\",\"1f450\",\"1f451\",\"1f452\",\"1f453\",\"1f454\",\"1f455\",\"1f456\",\"1f457\",\"1f458\",\"1f459\",\"1f45a\",\"1f45b\",\"1f45c\",\"1f45d\",\"1f45e\",\"1f45f\",\"1f460\",\"1f461\",\"1f462\",\"1f463\",\"1f464\",\"1f465\",\"1f466\",\"1f467\",\"1f468\",\"1f469\",\"1f46a\",\"1f46b\",\"1f46c\",\"1f46d\",\"1f46e\",\"1f46f\",\"1f470\",\"1f471\",\"1f472\",\"1f473\",\"1f474\",\"1f475\",\"1f476\",\"1f477\",\"1f478\",\"1f479\",\"1f47a\",\"1f47b\",\"1f47c\",\"1f47d\",\"1f47e\",\"1f47f\",\"1f480\",\"1f481\",\"1f482\",\"1f483\",\"1f484\",\"1f485\",\"1f486\",\"1f487\",\"1f488\",\"1f489\",\"1f48a\",\"1f48b\",\"1f48c\",\"1f48d\",\"1f48e\",\"1f48f\",\"1f490\",\"1f491\",\"1f492\",\"1f493\",\"1f494\",\"1f495\",\"1f496\",\"1f497\",\"1f498\",\"1f499\",\"1f49a\",\"1f49b\",\"1f49c\",\"1f49d\",\"1f49e\",\"1f49f\",\"1f4a0\",\"1f4a1\",\"1f4a2\",\"1f4a3\",\"1f4a4\",\"1f4a5\",\"1f4a6\",\"1f4a7\",\"1f4a8\",\"1f4a9\",\"1f4aa\",\"1f4ab\",\"1f4ac\",\"1f4ad\",\"1f4ae\",\"1f4af\",\"1f4b0\",\"1f4b1\",\"1f4b2\",\"1f4b3\",\"1f4b4\",\"1f4b5\",\"1f4b6\",\"1f4b7\",\"1f4b8\",\"1f4b9\",\"1f4ba\",\"1f4bb\",\"1f4bc\",\"1f4bd\",\"1f4be\",\"1f4bf\",\"1f4c0\",\"1f4c1\",\"1f4c2\",\"1f4c3\",\"1f4c4\",\"1f4c5\",\"1f4c6\",\"1f4c7\",\"1f4c8\",\"1f4c9\",\"1f4ca\",\"1f4cb\",\"1f4cc\",\"1f4cd\",\"1f4ce\",\"1f4cf\",\"1f4d0\",\"1f4d1\",\"1f4d2\",\"1f4d3\",\"1f4d4\",\"1f4d5\",\"1f4d6\",\"1f4d7\",\"1f4d8\",\"1f4d9\",\"1f4da\",\"1f4db\",\"1f4dc\",\"1f4dd\",\"1f4de\",\"1f4df\",\"1f4e0\",\"1f4e1\",\"1f4e2\",\"1f4e3\",\"1f4e4\",\"1f4e5\",\"1f4e6\",\"1f4e7\",\"1f4e8\",\"1f4e9\",\"1f4ea\",\"1f4eb\",\"1f4ec\",\"1f4ed\",\"1f4ee\",\"1f4ef\",\"1f4f0\",\"1f4f1\",\"1f4f2\",\"1f4f3\",\"1f4f4\",\"1f4f5\",\"1f4f6\",\"1f4f7\",\"1f4f9\",\"1f4fa\",\"1f4fb\",\"1f4fc\",\"1f500\",\"1f501\",\"1f502\",\"1f503\",\"1f504\",\"1f505\",\"1f506\",\"1f507\",\"1f508\",\"1f509\",\"1f50a\",\"1f50b\",\"1f50c\",\"1f50d\",\"1f50e\",\"1f50f\",\"1f510\",\"1f511\",\"1f512\",\"1f513\",\"1f514\",\"1f515\",\"1f516\",\"1f517\",\"1f518\",\"1f519\",\"1f51a\",\"1f51b\",\"1f51c\",\"1f51d\",\"1f51e\",\"1f51f\",\"1f520\",\"1f521\",\"1f522\",\"1f523\",\"1f524\",\"1f525\",\"1f526\",\"1f527\",\"1f528\",\"1f529\",\"1f52a\",\"1f52b\",\"1f52c\",\"1f52d\",\"1f52e\",\"1f52f\",\"1f530\",\"1f531\",\"1f532\",\"1f533\",\"1f534\",\"1f535\",\"1f536\",\"1f537\",\"1f538\",\"1f539\",\"1f53a\",\"1f53b\",\"1f53c\",\"1f53d\",\"1f550\",\"1f551\",\"1f552\",\"1f553\",\"1f554\",\"1f555\",\"1f556\",\"1f557\",\"1f558\",\"1f559\",\"1f55a\",\"1f55b\",\"1f55c\",\"1f55d\",\"1f55e\",\"1f55f\",\"1f560\",\"1f561\",\"1f562\",\"1f563\",\"1f564\",\"1f565\",\"1f566\",\"1f567\",\"1f5fb\",\"1f5fc\",\"1f5fd\",\"1f5fe\",\"1f5ff\",\"1f600\",\"1f601\",\"1f602\",\"1f603\",\"1f604\",\"1f605\",\"1f606\",\"1f607\",\"1f608\",\"1f609\",\"1f60a\",\"1f60b\",\"1f60c\",\"1f60d\",\"1f60e\",\"1f60f\",\"1f610\",\"1f611\",\"1f612\",\"1f613\",\"1f614\",\"1f615\",\"1f616\",\"1f617\",\"1f618\",\"1f619\",\"1f61a\",\"1f61b\",\"1f61c\",\"1f61d\",\"1f61e\",\"1f61f\",\"1f620\",\"1f621\",\"1f622\",\"1f623\",\"1f624\",\"1f625\",\"1f626\",\"1f627\",\"1f628\",\"1f629\",\"1f62a\",\"1f62b\",\"1f62c\",\"1f62d\",\"1f62e\",\"1f62f\",\"1f630\",\"1f631\",\"1f632\",\"1f633\",\"1f634\",\"1f635\",\"1f636\",\"1f637\",\"1f638\",\"1f639\",\"1f63a\",\"1f63b\",\"1f63c\",\"1f63d\",\"1f63e\",\"1f63f\",\"1f640\",\"1f645\",\"1f646\",\"1f647\",\"1f648\",\"1f649\",\"1f64a\",\"1f64b\",\"1f64c\",\"1f64d\",\"1f64e\",\"1f64f\",\"1f680\",\"1f681\",\"1f682\",\"1f683\",\"1f684\",\"1f685\",\"1f686\",\"1f687\",\"1f688\",\"1f689\",\"1f68a\",\"1f68b\",\"1f68c\",\"1f68d\",\"1f68e\",\"1f68f\",\"1f690\",\"1f691\",\"1f692\",\"1f693\",\"1f694\",\"1f695\",\"1f696\",\"1f697\",\"1f698\",\"1f699\",\"1f69a\",\"1f69b\",\"1f69c\",\"1f69d\",\"1f69e\",\"1f69f\",\"1f6a0\",\"1f6a1\",\"1f6a2\",\"1f6a3\",\"1f6a4\",\"1f6a5\",\"1f6a6\",\"1f6a7\",\"1f6a8\",\"1f6a9\",\"1f6aa\",\"1f6ab\",\"1f6ac\",\"1f6ad\",\"1f6ae\",\"1f6af\",\"1f6b0\",\"1f6b1\",\"1f6b2\",\"1f6b3\",\"1f6b4\",\"1f6b5\",\"1f6b6\",\"1f6b7\",\"1f6b8\",\"1f6b9\",\"1f6ba\",\"1f6bb\",\"1f6bc\",\"1f6bd\",\"1f6be\",\"1f6bf\",\"1f6c0\",\"1f6c1\",\"1f6c2\",\"1f6c3\",\"1f6c4\",\"1f6c5\",\"203c\",\"2049\",\"2122\",\"2139\",\"2194\",\"2195\",\"2196\",\"2197\",\"2198\",\"2199\",\"21a9\",\"21aa\",\"23-20e3\",\"231a\",\"231b\",\"23e9\",\"23ea\",\"23eb\",\"23ec\",\"23f0\",\"23f3\",\"24c2\",\"25aa\",\"25ab\",\"25b6\",\"25c0\",\"25fb\",\"25fc\",\"25fd\",\"25fe\",\"2600\",\"2601\",\"260e\",\"2611\",\"2614\",\"2615\",\"261d\",\"263a\",\"2648\",\"2649\",\"264a\",\"264b\",\"264c\",\"264d\",\"264e\",\"264f\",\"2650\",\"2651\",\"2652\",\"2653\",\"2660\",\"2663\",\"2665\",\"2666\",\"2668\",\"267b\",\"267f\",\"2693\",\"26a0\",\"26a1\",\"26aa\",\"26ab\",\"26bd\",\"26be\",\"26c4\",\"26c5\",\"26ce\",\"26d4\",\"26ea\",\"26f2\",\"26f3\",\"26f5\",\"26fa\",\"26fd\",\"2702\",\"2705\",\"2708\",\"2709\",\"270a\",\"270b\",\"270c\",\"270f\",\"2712\",\"2714\",\"2716\",\"2728\",\"2733\",\"2734\",\"2744\",\"2747\",\"274c\",\"274e\",\"2753\",\"2754\",\"2755\",\"2757\",\"2764\",\"2795\",\"2796\",\"2797\",\"27a1\",\"27b0\",\"27bf\",\"2934\",\"2935\",\"2b05\",\"2b06\",\"2b07\",\"2b1b\",\"2b1c\",\"2b50\",\"2b55\",\"30-20e3\",\"3030\",\"303d\",\"31-20e3\",\"32-20e3\",\"3297\",\"3299\",\"33-20e3\",\"34-20e3\",\"35-20e3\",\"36-20e3\",\"37-20e3\",\"38-20e3\",\"39-20e3\",\"a9\",\"ae\",\"e50a\"],\n\n\t\"font-awesome\" : [\"glass\",\"music\",\"search\",\"envelope-o\",\"heart\",\"star\",\"star-o\",\"user\",\"film\",\"th-large\",\"th\",\"th-list\",\"check\",\"times\",\"search-plus\",\"search-minus\",\"power-off\",\"signal\",\"cog\",\"trash-o\",\"home\",\"file-o\",\"clock-o\",\"road\",\"download\",\"arrow-circle-o-down\",\"arrow-circle-o-up\",\"inbox\",\"play-circle-o\",\"repeat\",\"refresh\",\"list-alt\",\"lock\",\"flag\",\"headphones\",\"volume-off\",\"volume-down\",\"volume-up\",\"qrcode\",\"barcode\",\"tag\",\"tags\",\"book\",\"bookmark\",\"print\",\"camera\",\"font\",\"bold\",\"italic\",\"text-height\",\"text-width\",\"align-left\",\"align-center\",\"align-right\",\"align-justify\",\"list\",\"outdent\",\"indent\",\"video-camera\",\"picture-o\",\"pencil\",\"map-marker\",\"adjust\",\"tint\",\"pencil-square-o\",\"share-square-o\",\"check-square-o\",\"arrows\",\"step-backward\",\"fast-backward\",\"backward\",\"play\",\"pause\",\"stop\",\"forward\",\"fast-forward\",\"step-forward\",\"eject\",\"chevron-left\",\"chevron-right\",\"plus-circle\",\"minus-circle\",\"times-circle\",\"check-circle\",\"question-circle\",\"info-circle\",\"crosshairs\",\"times-circle-o\",\"check-circle-o\",\"ban\",\"arrow-left\",\"arrow-right\",\"arrow-up\",\"arrow-down\",\"share\",\"expand\",\"compress\",\"plus\",\"minus\",\"asterisk\",\"exclamation-circle\",\"gift\",\"leaf\",\"fire\",\"eye\",\"eye-slash\",\"exclamation-triangle\",\"plane\",\"calendar\",\"random\",\"comment\",\"magnet\",\"chevron-up\",\"chevron-down\",\"retweet\",\"shopping-cart\",\"folder\",\"folder-open\",\"arrows-v\",\"arrows-h\",\"bar-chart\",\"twitter-square\",\"facebook-square\",\"camera-retro\",\"key\",\"cogs\",\"comments\",\"thumbs-o-up\",\"thumbs-o-down\",\"star-half\",\"heart-o\",\"sign-out\",\"linkedin-square\",\"thumb-tack\",\"external-link\",\"sign-in\",\"trophy\",\"github-square\",\"upload\",\"lemon-o\",\"phone\",\"square-o\",\"bookmark-o\",\"phone-square\",\"twitter\",\"facebook\",\"github\",\"unlock\",\"credit-card\",\"rss\",\"hdd-o\",\"bullhorn\",\"bell\",\"certificate\",\"hand-o-right\",\"hand-o-left\",\"hand-o-up\",\"hand-o-down\",\"arrow-circle-left\",\"arrow-circle-right\",\"arrow-circle-up\",\"arrow-circle-down\",\"globe\",\"wrench\",\"tasks\",\"filter\",\"briefcase\",\"arrows-alt\",\"users\",\"link\",\"cloud\",\"flask\",\"scissors\",\"files-o\",\"paperclip\",\"floppy-o\",\"square\",\"bars\",\"list-ul\",\"list-ol\",\"strikethrough\",\"underline\",\"table\",\"magic\",\"truck\",\"pinterest\",\"pinterest-square\",\"google-plus-square\",\"google-plus\",\"money\",\"caret-down\",\"caret-up\",\"caret-left\",\"caret-right\",\"columns\",\"sort\",\"sort-desc\",\"sort-asc\",\"envelope\",\"linkedin\",\"undo\",\"gavel\",\"tachometer\",\"comment-o\",\"comments-o\",\"bolt\",\"sitemap\",\"umbrella\",\"clipboard\",\"lightbulb-o\",\"exchange\",\"cloud-download\",\"cloud-upload\",\"user-md\",\"stethoscope\",\"suitcase\",\"bell-o\",\"coffee\",\"cutlery\",\"file-text-o\",\"building-o\",\"hospital-o\",\"ambulance\",\"medkit\",\"fighter-jet\",\"beer\",\"h-square\",\"plus-square\",\"angle-double-left\",\"angle-double-right\",\"angle-double-up\",\"angle-double-down\",\"angle-left\",\"angle-right\",\"angle-up\",\"angle-down\",\"desktop\",\"laptop\",\"tablet\",\"mobile\",\"circle-o\",\"quote-left\",\"quote-right\",\"spinner\",\"circle\",\"reply\",\"github-alt\",\"folder-o\",\"folder-open-o\",\"smile-o\",\"frown-o\",\"meh-o\",\"gamepad\",\"keyboard-o\",\"flag-o\",\"flag-checkered\",\"terminal\",\"code\",\"reply-all\",\"star-half-o\",\"location-arrow\",\"crop\",\"code-fork\",\"chain-broken\",\"question\",\"info\",\"exclamation\",\"superscript\",\"subscript\",\"eraser\",\"puzzle-piece\",\"microphone\",\"microphone-slash\",\"shield\",\"calendar-o\",\"fire-extinguisher\",\"rocket\",\"maxcdn\",\"chevron-circle-left\",\"chevron-circle-right\",\"chevron-circle-up\",\"chevron-circle-down\",\"html5\",\"css3\",\"anchor\",\"unlock-alt\",\"bullseye\",\"ellipsis-h\",\"ellipsis-v\",\"rss-square\",\"play-circle\",\"ticket\",\"minus-square\",\"minus-square-o\",\"level-up\",\"level-down\",\"check-square\",\"pencil-square\",\"share-square\",\"compass\",\"caret-square-o-down\",\"caret-square-o-up\",\"caret-square-o-right\",\"eur\",\"gbp\",\"usd\",\"inr\",\"jpy\",\"rub\",\"krw\",\"btc\",\"file\",\"file-text\",\"sort-alpha-asc\",\"sort-alpha-desc\",\"sort-amount-asc\",\"sort-amount-desc\",\"sort-numeric-asc\",\"sort-numeric-desc\",\"thumbs-up\",\"thumbs-down\",\"youtube-square\",\"youtube\",\"xing\",\"xing-square\",\"youtube-play\",\"dropbox\",\"stack-overflow\",\"instagram\",\"flickr\",\"adn\",\"bitbucket\",\"bitbucket-square\",\"tumblr\",\"tumblr-square\",\"long-arrow-down\",\"long-arrow-up\",\"long-arrow-left\",\"long-arrow-right\",\"apple\",\"windows\",\"android\",\"linux\",\"dribbble\",\"skype\",\"foursquare\",\"trello\",\"female\",\"male\",\"gratipay\",\"sun-o\",\"moon-o\",\"archive\",\"bug\",\"vk\",\"weibo\",\"renren\",\"pagelines\",\"stack-exchange\",\"arrow-circle-o-right\",\"arrow-circle-o-left\",\"caret-square-o-left\",\"dot-circle-o\",\"wheelchair\",\"vimeo-square\",\"try\",\"plus-square-o\",\"space-shuttle\",\"slack\",\"envelope-square\",\"wordpress\",\"openid\",\"university\",\"graduation-cap\",\"yahoo\",\"google\",\"reddit\",\"reddit-square\",\"stumbleupon-circle\",\"stumbleupon\",\"delicious\",\"digg\",\"pied-piper\",\"pied-piper-alt\",\"drupal\",\"joomla\",\"language\",\"fax\",\"building\",\"child\",\"paw\",\"spoon\",\"cube\",\"cubes\",\"behance\",\"behance-square\",\"steam\",\"steam-square\",\"recycle\",\"car\",\"taxi\",\"tree\",\"spotify\",\"deviantart\",\"soundcloud\",\"database\",\"file-pdf-o\",\"file-word-o\",\"file-excel-o\",\"file-powerpoint-o\",\"file-image-o\",\"file-archive-o\",\"file-audio-o\",\"file-video-o\",\"file-code-o\",\"vine\",\"codepen\",\"jsfiddle\",\"life-ring\",\"circle-o-notch\",\"rebel\",\"empire\",\"git-square\",\"git\",\"hacker-news\",\"tencent-weibo\",\"qq\",\"weixin\",\"paper-plane\",\"paper-plane-o\",\"history\",\"circle-thin\",\"header\",\"paragraph\",\"sliders\",\"share-alt\",\"share-alt-square\",\"bomb\",\"futbol-o\",\"tty\",\"binoculars\",\"plug\",\"slideshare\",\"twitch\",\"yelp\",\"newspaper-o\",\"wifi\",\"calculator\",\"paypal\",\"google-wallet\",\"cc-visa\",\"cc-mastercard\",\"cc-discover\",\"cc-amex\",\"cc-paypal\",\"cc-stripe\",\"bell-slash\",\"bell-slash-o\",\"trash\",\"copyright\",\"at\",\"eyedropper\",\"paint-brush\",\"birthday-cake\",\"area-chart\",\"pie-chart\",\"line-chart\",\"lastfm\",\"lastfm-square\",\"toggle-off\",\"toggle-on\",\"bicycle\",\"bus\",\"ioxhost\",\"angellist\",\"cc\",\"ils\",\"meanpath\",\"buysellads\",\"connectdevelop\",\"dashcube\",\"forumbee\",\"leanpub\",\"sellsy\",\"shirtsinbulk\",\"simplybuilt\",\"skyatlas\",\"cart-plus\",\"cart-arrow-down\",\"diamond\",\"ship\",\"user-secret\",\"motorcycle\",\"street-view\",\"heartbeat\",\"venus\",\"mars\",\"mercury\",\"transgender\",\"transgender-alt\",\"venus-double\",\"mars-double\",\"venus-mars\",\"mars-stroke\",\"mars-stroke-v\",\"mars-stroke-h\",\"neuter\",\"facebook-official\",\"pinterest-p\",\"whatsapp\",\"server\",\"user-plus\",\"user-times\",\"bed\",\"viacoin\",\"train\",\"subway\",\"medium\",\"GitHub\",\"bed\",\"buysellads\",\"cart-arrow-down\",\"cart-plus\",\"connectdevelop\",\"dashcube\",\"diamond\",\"facebook-official\",\"forumbee\",\"heartbeat\",\"hotel\",\"leanpub\",\"mars\",\"mars-double\",\"mars-stroke\",\"mars-stroke-h\",\"mars-stroke-v\",\"medium\",\"mercury\",\"motorcycle\",\"neuter\",\"pinterest-p\",\"sellsy\",\"server\",\"ship\",\"shirtsinbulk\",\"simplybuilt\",\"skyatlas\",\"street-view\",\"subway\",\"train\",\"transgender\",\"transgender-alt\",\"user-plus\",\"user-secret\",\"user-times\",\"venus\",\"venus-double\",\"venus-mars\",\"viacoin\",\"whatsapp\",\"adjust\",\"anchor\",\"archive\",\"area-chart\",\"arrows\",\"arrows-h\",\"arrows-v\",\"asterisk\",\"at\",\"automobile\",\"ban\",\"bank\",\"bar-chart\",\"bar-chart-o\",\"barcode\",\"bars\",\"bed\",\"beer\",\"bell\",\"bell-o\",\"bell-slash\",\"bell-slash-o\",\"bicycle\",\"binoculars\",\"birthday-cake\",\"bolt\",\"bomb\",\"book\",\"bookmark\",\"bookmark-o\",\"briefcase\",\"bug\",\"building\",\"building-o\",\"bullhorn\",\"bullseye\",\"bus\",\"cab\",\"calculator\",\"calendar\",\"calendar-o\",\"camera\",\"camera-retro\",\"car\",\"caret-square-o-down\",\"caret-square-o-left\",\"caret-square-o-right\",\"caret-square-o-up\",\"cart-arrow-down\",\"cart-plus\",\"cc\",\"certificate\",\"check\",\"check-circle\",\"check-circle-o\",\"check-square\",\"check-square-o\",\"child\",\"circle\",\"circle-o\",\"circle-o-notch\",\"circle-thin\",\"clock-o\",\"close\",\"cloud\",\"cloud-download\",\"cloud-upload\",\"code\",\"code-fork\",\"coffee\",\"cog\",\"cogs\",\"comment\",\"comment-o\",\"comments\",\"comments-o\",\"compass\",\"copyright\",\"credit-card\",\"crop\",\"crosshairs\",\"cube\",\"cubes\",\"cutlery\",\"dashboard\",\"database\",\"desktop\",\"diamond\",\"dot-circle-o\",\"download\",\"edit\",\"ellipsis-h\",\"ellipsis-v\",\"envelope\",\"envelope-o\",\"envelope-square\",\"eraser\",\"exchange\",\"exclamation\",\"exclamation-circle\",\"exclamation-triangle\",\"external-link\",\"external-link-square\",\"eye\",\"eye-slash\",\"eyedropper\",\"fax\",\"female\",\"fighter-jet\",\"file-archive-o\",\"file-audio-o\",\"file-code-o\",\"file-excel-o\",\"file-image-o\",\"file-movie-o\",\"file-pdf-o\",\"file-photo-o\",\"file-picture-o\",\"file-powerpoint-o\",\"file-sound-o\",\"file-video-o\",\"file-word-o\",\"file-zip-o\",\"film\",\"filter\",\"fire\",\"fire-extinguisher\",\"flag\",\"flag-checkered\",\"flag-o\",\"flash\",\"flask\",\"folder\",\"folder-o\",\"folder-open\",\"folder-open-o\",\"frown-o\",\"futbol-o\",\"gamepad\",\"gavel\",\"gear\",\"gears\",\"genderless\",\"gift\",\"glass\",\"globe\",\"graduation-cap\",\"group\",\"hdd-o\",\"headphones\",\"heart\",\"heart-o\",\"heartbeat\",\"history\",\"home\",\"hotel\",\"image\",\"inbox\",\"info\",\"info-circle\",\"institution\",\"key\",\"keyboard-o\",\"language\",\"laptop\",\"leaf\",\"legal\",\"lemon-o\",\"level-down\",\"level-up\",\"life-bouy\",\"life-buoy\",\"life-ring\",\"life-saver\",\"lightbulb-o\",\"line-chart\",\"location-arrow\",\"lock\",\"magic\",\"magnet\",\"mail-forward\",\"mail-reply\",\"mail-reply-all\",\"male\",\"map-marker\",\"meh-o\",\"microphone\",\"microphone-slash\",\"minus\",\"minus-circle\",\"minus-square\",\"minus-square-o\",\"mobile\",\"mobile-phone\",\"money\",\"moon-o\",\"mortar-board\",\"motorcycle\",\"music\",\"navicon\",\"newspaper-o\",\"paint-brush\",\"paper-plane\",\"paper-plane-o\",\"paw\",\"pencil\",\"pencil-square\",\"pencil-square-o\",\"phone\",\"phone-square\",\"photo\",\"picture-o\",\"pie-chart\",\"plane\",\"plug\",\"plus\",\"plus-circle\",\"plus-square\",\"plus-square-o\",\"power-off\",\"print\",\"puzzle-piece\",\"qrcode\",\"question\",\"question-circle\",\"quote-left\",\"quote-right\",\"random\",\"recycle\",\"refresh\",\"remove\",\"reorder\",\"reply\",\"reply-all\",\"retweet\",\"road\",\"rocket\",\"rss\",\"rss-square\",\"search\",\"search-minus\",\"search-plus\",\"send\",\"send-o\",\"server\",\"share\",\"share-alt\",\"share-alt-square\",\"share-square\",\"share-square-o\",\"shield\",\"ship\",\"shopping-cart\",\"sign-in\",\"sign-out\",\"signal\",\"sitemap\",\"sliders\",\"smile-o\",\"soccer-ball-o\",\"sort\",\"sort-alpha-asc\",\"sort-alpha-desc\",\"sort-amount-asc\",\"sort-amount-desc\",\"sort-asc\",\"sort-desc\",\"sort-down\",\"sort-numeric-asc\",\"sort-numeric-desc\",\"sort-up\",\"space-shuttle\",\"spinner\",\"spoon\",\"square\",\"square-o\",\"star\",\"star-half\",\"star-half-empty\",\"star-half-full\",\"star-half-o\",\"star-o\",\"street-view\",\"suitcase\",\"sun-o\",\"support\",\"tablet\",\"tachometer\",\"tag\",\"tags\",\"tasks\",\"taxi\",\"terminal\",\"thumb-tack\",\"thumbs-down\",\"thumbs-o-down\",\"thumbs-o-up\",\"thumbs-up\",\"ticket\",\"times\",\"times-circle\",\"times-circle-o\",\"tint\",\"toggle-down\",\"toggle-left\",\"toggle-off\",\"toggle-on\",\"toggle-right\",\"toggle-up\",\"trash\",\"trash-o\",\"tree\",\"trophy\",\"truck\",\"tty\",\"umbrella\",\"university\",\"unlock\",\"unlock-alt\",\"unsorted\",\"upload\",\"user\",\"user-plus\",\"user-secret\",\"user-times\",\"users\",\"video-camera\",\"volume-down\",\"volume-off\",\"volume-up\",\"warning\",\"wheelchair\",\"wifi\",\"wrench\",\"ambulance\",\"automobile\",\"bicycle\",\"bus\",\"cab\",\"car\",\"fighter-jet\",\"motorcycle\",\"plane\",\"rocket\",\"ship\",\"space-shuttle\",\"subway\",\"taxi\",\"train\",\"truck\",\"wheelchair\",\"circle-thin\",\"genderless\",\"mars\",\"mars-double\",\"mars-stroke\",\"mars-stroke-h\",\"mars-stroke-v\",\"mercury\",\"neuter\",\"transgender\",\"transgender-alt\",\"venus\",\"venus-double\",\"venus-mars\",\"file\",\"file-archive-o\",\"file-audio-o\",\"file-code-o\",\"file-excel-o\",\"file-image-o\",\"file-movie-o\",\"file-o\",\"file-pdf-o\",\"file-photo-o\",\"file-picture-o\",\"file-powerpoint-o\",\"file-sound-o\",\"file-text\",\"file-text-o\",\"file-video-o\",\"file-word-o\",\"file-zip-o\",\"circle-o-notch\",\"cog\",\"gear\",\"refresh\",\"spinner\",\"check-square\",\"check-square-o\",\"circle\",\"circle-o\",\"dot-circle-o\",\"minus-square\",\"minus-square-o\",\"plus-square\",\"plus-square-o\",\"square\",\"square-o\",\"cc-amex\",\"cc-discover\",\"cc-mastercard\",\"cc-paypal\",\"cc-stripe\",\"cc-visa\",\"credit-card\",\"google-wallet\",\"paypal\",\"area-chart\",\"bar-chart\",\"bar-chart-o\",\"line-chart\",\"pie-chart\",\"bitcoin\",\"btc\",\"cny\",\"dollar\",\"eur\",\"euro\",\"gbp\",\"ils\",\"inr\",\"jpy\",\"krw\",\"money\",\"rmb\",\"rouble\",\"rub\",\"ruble\",\"rupee\",\"shekel\",\"sheqel\",\"try\",\"turkish-lira\",\"usd\",\"won\",\"yen\",\"align-center\",\"align-justify\",\"align-left\",\"align-right\",\"bold\",\"chain\",\"chain-broken\",\"clipboard\",\"columns\",\"copy\",\"cut\",\"dedent\",\"eraser\",\"file\",\"file-o\",\"file-text\",\"file-text-o\",\"files-o\",\"floppy-o\",\"font\",\"header\",\"indent\",\"italic\",\"link\",\"list\",\"list-alt\",\"list-ol\",\"list-ul\",\"outdent\",\"paperclip\",\"paragraph\",\"paste\",\"repeat\",\"rotate-left\",\"rotate-right\",\"save\",\"scissors\",\"strikethrough\",\"subscript\",\"superscript\",\"table\",\"text-height\",\"text-width\",\"th\",\"th-large\",\"th-list\",\"underline\",\"undo\",\"unlink\",\"angle-double-down\",\"angle-double-left\",\"angle-double-right\",\"angle-double-up\",\"angle-down\",\"angle-left\",\"angle-right\",\"angle-up\",\"arrow-circle-down\",\"arrow-circle-left\",\"arrow-circle-o-down\",\"arrow-circle-o-left\",\"arrow-circle-o-right\",\"arrow-circle-o-up\",\"arrow-circle-right\",\"arrow-circle-up\",\"arrow-down\",\"arrow-left\",\"arrow-right\",\"arrow-up\",\"arrows\",\"arrows-alt\",\"arrows-h\",\"arrows-v\",\"caret-down\",\"caret-left\",\"caret-right\",\"caret-square-o-down\",\"caret-square-o-left\",\"caret-square-o-right\",\"caret-square-o-up\",\"caret-up\",\"chevron-circle-down\",\"chevron-circle-left\",\"chevron-circle-right\",\"chevron-circle-up\",\"chevron-down\",\"chevron-left\",\"chevron-right\",\"chevron-up\",\"hand-o-down\",\"hand-o-left\",\"hand-o-right\",\"hand-o-up\",\"long-arrow-down\",\"long-arrow-left\",\"long-arrow-right\",\"long-arrow-up\",\"toggle-down\",\"toggle-left\",\"toggle-right\",\"toggle-up\",\"arrows-alt\",\"backward\",\"compress\",\"eject\",\"expand\",\"fast-backward\",\"fast-forward\",\"forward\",\"pause\",\"play\",\"play-circle\",\"play-circle-o\",\"step-backward\",\"step-forward\",\"stop\",\"youtube-play\",\"report an issue with Adblock Plus\",\"adn\",\"android\",\"angellist\",\"apple\",\"behance\",\"behance-square\",\"bitbucket\",\"bitbucket-square\",\"bitcoin\",\"btc\",\"buysellads\",\"cc-amex\",\"cc-discover\",\"cc-mastercard\",\"cc-paypal\",\"cc-stripe\",\"cc-visa\",\"codepen\",\"connectdevelop\",\"css3\",\"dashcube\",\"delicious\",\"deviantart\",\"digg\",\"dribbble\",\"dropbox\",\"drupal\",\"empire\",\"facebook\",\"facebook-f\",\"facebook-official\",\"facebook-square\",\"flickr\",\"forumbee\",\"foursquare\",\"ge\",\"git\",\"git-square\",\"github\",\"github-alt\",\"github-square\",\"gittip\",\"google\",\"google-plus\",\"google-plus-square\",\"google-wallet\",\"gratipay\",\"hacker-news\",\"html5\",\"instagram\",\"ioxhost\",\"joomla\",\"jsfiddle\",\"lastfm\",\"lastfm-square\",\"leanpub\",\"linkedin\",\"linkedin-square\",\"linux\",\"maxcdn\",\"meanpath\",\"medium\",\"openid\",\"pagelines\",\"paypal\",\"pied-piper\",\"pied-piper-alt\",\"pinterest\",\"pinterest-p\",\"pinterest-square\",\"qq\",\"ra\",\"rebel\",\"reddit\",\"reddit-square\",\"renren\",\"sellsy\",\"share-alt\",\"share-alt-square\",\"shirtsinbulk\",\"simplybuilt\",\"skyatlas\",\"skype\",\"slack\",\"slideshare\",\"soundcloud\",\"spotify\",\"stack-exchange\",\"stack-overflow\",\"steam\",\"steam-square\",\"stumbleupon\",\"stumbleupon-circle\",\"tencent-weibo\",\"trello\",\"tumblr\",\"tumblr-square\",\"twitch\",\"twitter\",\"twitter-square\",\"viacoin\",\"vimeo-square\",\"vine\",\"vk\",\"wechat\",\"weibo\",\"weixin\",\"whatsapp\",\"windows\",\"wordpress\",\"xing\",\"xing-square\",\"yahoo\",\"yelp\",\"youtube\",\"youtube-play\",\"youtube-square\",\"ambulance\",\"h-square\",\"heart\",\"heart-o\",\"heartbeat\",\"hospital-o\",\"medkit\",\"plus-square\",\"stethoscope\",\"user-md\",\"wheelchair\"]\n}"
  },
  {
    "path": "static/editor.md/plugins/file-dialog/file-dialog.js",
    "content": "/*!\n * File (upload) dialog plugin for Editor.md\n *\n * @file        file-dialog.js\n * @author      minho\n * @version     0.1.0\n * @updateTime  2017-01-06\n * {@link       https://github.com/lifei6671/SmartWiki}\n * @license     MIT\n */\n\n(function() {\n\n    var factory = function (exports) {\n\n        var pluginName   = \"file-dialog\";\n\n        exports.fn.fileDialog = function() {\n\n            var _this       = this;\n            var cm          = this.cm;\n            var lang        = this.lang;\n            var editor      = this.editor;\n            var settings    = this.settings;\n            var cursor      = cm.getCursor();\n            var selection   = cm.getSelection();\n            var fileLang   = lang.dialog.file;\n            var classPrefix = this.classPrefix;\n            var iframeName  = classPrefix + \"file-iframe\";\n            var dialogName  = classPrefix + pluginName, dialog;\n\n            cm.focus();\n\n            var loading = function(show) {\n                var _loading = dialog.find(\".\" + classPrefix + \"dialog-mask\");\n                _loading[(show) ? \"show\" : \"hide\"]();\n            };\n\n            if (editor.find(\".\" + dialogName).length < 1)\n            {\n                var guid   = (new Date).getTime();\n                var action = settings.fileUploadURL + (settings.fileUploadURL.indexOf(\"?\") >= 0 ? \"&\" : \"?\") + \"guid=\" + guid;\n\n                if (settings.crossDomainUpload)\n                {\n                    action += \"&callback=\" + settings.uploadCallbackURL + \"&dialog_id=editormd-file-dialog-\" + guid;\n                }\n\n                var dialogContent = ( (settings.fileUpload) ? \"<form action=\\\"\" + action +\"\\\" target=\\\"\" + iframeName + \"\\\" method=\\\"post\\\" enctype=\\\"multipart/form-data\\\" class=\\\"\" + classPrefix + \"form\\\">\" : \"<div class=\\\"\" + classPrefix + \"form\\\">\" ) +\n                    ( (settings.fileUpload) ? \"<iframe name=\\\"\" + iframeName + \"\\\" id=\\\"\" + iframeName + \"\\\" guid=\\\"\" + guid + \"\\\"></iframe>\" : \"\" ) +\n                    \"<label>文件地址</label>\" +\n                    \"<input type=\\\"text\\\" data-url />\" + (function(){\n                        return (settings.fileUpload) ? \"<div class=\\\"\" + classPrefix + \"file-input\\\">\" +\n                            \"<input type=\\\"file\\\" name=\\\"\" + classPrefix + \"file-file\\\" />\" +\n                            \"<input type=\\\"submit\\\" value=\\\"本地上传\\\" />\" +\n                            \"</div>\" : \"\";\n                    })() +\n                    \"<br/>\" +\n                    \"<label>文件说明</label>\" +\n                    \"<input type=\\\"text\\\" value=\\\"\" + selection + \"\\\" data-alt />\" +\n                    \"<br/>\" +\n                    \"<input type='hidden' data-icon>\"+\n                    ( (settings.fileUpload) ? \"</form>\" : \"</div>\");\n\n                //var imageFooterHTML = \"<button class=\\\"\" + classPrefix + \"btn \" + classPrefix + \"image-manager-btn\\\" style=\\\"float:left;\\\">\" + fileLang.managerButton + \"</button>\";\n\n                dialog = this.createDialog({\n                    title      : \"文件上传\",\n                    width      : (settings.fileUpload) ? 465 : 380,\n                    height     : 254,\n                    name       : dialogName,\n                    content    : dialogContent,\n                    mask       : settings.dialogShowMask,\n                    drag       : settings.dialogDraggable,\n                    lockScreen : settings.dialogLockScreen,\n                    maskStyle  : {\n                        opacity         : settings.dialogMaskOpacity,\n                        backgroundColor : settings.dialogMaskBgColor\n                    },\n                    buttons : {\n                        enter : [lang.buttons.enter, function() {\n                            var url  = this.find(\"[data-url]\").val();\n                            var alt  = this.find(\"[data-alt]\").val();\n                            var icon  = this.find(\"[data-icon]\").val();\n\n                            if (url === \"\")\n                            {\n                                alert(fileLang.fileURLEmpty);\n                                return false;\n                            }\n\n                            var altAttr = (alt !== \"\") ? \" \\\"\" + alt + \"\\\"\" : \"\";\n\n\n                            if (icon === \"\" || !icon)\n                            {\n                                cm.replaceSelection(\"[\" + alt + \"](\" + url + altAttr + \")\");\n                            }\n                            else\n                            {\n                                cm.replaceSelection(\"[![\" + alt + \"](\" + icon +  \")\"+ alt +\"](\" + url + altAttr + \")\");\n                            }\n\n\n                            if (alt === \"\") {\n                                cm.setCursor(cursor.line, cursor.ch + 2);\n                            }\n\n                            this.hide().lockScreen(false).hideMask();\n\n                            return false;\n                        }],\n\n                        cancel : [lang.buttons.cancel, function() {\n                            this.hide().lockScreen(false).hideMask();\n\n                            return false;\n                        }]\n                    }\n                });\n\n                dialog.attr(\"id\", classPrefix + \"file-dialog-\" + guid);\n\n                if (!settings.fileUpload) {\n                    return ;\n                }\n\n                var fileInput  = dialog.find(\"[name=\\\"\" + classPrefix + \"file-file\\\"]\");\n\n                fileInput.bind(\"change\", function() {\n                    var fileName  = fileInput.val();\n\n                    if (fileName === \"\")\n                    {\n                        alert(fileLang.uploadFileEmpty);\n\n                        return false;\n                    }\n\n                    loading(true);\n\n                    var submitHandler = function() {\n\n                        var uploadIframe = document.getElementById(iframeName);\n\n                        uploadIframe.onload = function() {\n\n                            loading(false);\n\n                            var body = (uploadIframe.contentWindow ? uploadIframe.contentWindow : uploadIframe.contentDocument).document.body;\n                            var json = (body.innerText) ? body.innerText : ( (body.textContent) ? body.textContent : null);\n\n                            json = (typeof JSON.parse !== \"undefined\") ? JSON.parse(json) : eval(\"(\" + json + \")\");\n\n                            if(!settings.crossDomainUpload)\n                            {\n                                if (json.success === 1)\n                                {\n                                    dialog.find(\"[data-url]\").val(json.url);\n\n                                    json.alt && dialog.find(\"[data-alt]\").val(json.alt);\n                                }\n                                else\n                                {\n                                    alert(json.message);\n                                }\n                            }\n\n                            return false;\n                        };\n                    };\n\n                    dialog.find(\"[type=\\\"submit\\\"]\").bind(\"click\", submitHandler).trigger(\"click\");\n                });\n            }\n\n            dialog = editor.find(\".\" + dialogName);\n            dialog.find(\"[type=\\\"text\\\"]\").val(\"\");\n            dialog.find(\"[type=\\\"file\\\"]\").val(\"\");\n\n            this.dialogShowMask(dialog);\n            this.dialogLockScreen();\n            dialog.show();\n\n        };\n\n    };\n\n    // CommonJS/Node.js\n    if (typeof require === \"function\" && typeof exports === \"object\" && typeof module === \"object\")\n    {\n        module.exports = factory;\n    }\n    else if (typeof define === \"function\")  // AMD/CMD/Sea.js\n    {\n        if (define.amd) { // for Require.js\n\n            define([\"editormd\"], function(editormd) {\n                factory(editormd);\n            });\n\n        } else { // for Sea.js\n            define(function(require) {\n                var editormd = require(\"./../../editormd\");\n                factory(editormd);\n            });\n        }\n    }\n    else\n    {\n        factory(window.editormd);\n    }\n\n})();\n"
  },
  {
    "path": "static/editor.md/plugins/goto-line-dialog/goto-line-dialog.js",
    "content": "/*!\n * Goto line dialog plugin for Editor.md\n *\n * @file        goto-line-dialog.js\n * @author      pandao\n * @version     1.2.1\n * @updateTime  2015-06-09\n * {@link       https://github.com/pandao/editor.md}\n * @license     MIT\n */\n\n(function() {\n\n\tvar factory = function (exports) {\n\n\t\tvar $            = jQuery;\n\t\tvar pluginName   = \"goto-line-dialog\";\n\n\t\tvar langs = {\n\t\t\t\"zh-cn\" : {\n\t\t\t\ttoolbar : {\n\t\t\t\t\t\"goto-line\" : \"跳转到行\"\n\t\t\t\t},\n\t\t\t\tdialog : {\n\t\t\t\t\t\"goto-line\" : {\n\t\t\t\t\t\ttitle  : \"跳转到行\",\n\t\t\t\t\t\tlabel  : \"请输入行号\",\n\t\t\t\t\t\terror  : \"错误：\"\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\t\t\t\"zh-tw\" : {\n\t\t\t\ttoolbar : {\n\t\t\t\t\t\"goto-line\" : \"跳轉到行\"\n\t\t\t\t},\n\t\t\t\tdialog : {\n\t\t\t\t\t\"goto-line\" : {\n\t\t\t\t\t\ttitle  : \"跳轉到行\",\n\t\t\t\t\t\tlabel  : \"請輸入行號\",\n\t\t\t\t\t\terror  : \"錯誤：\"\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\t\t\t\"en\" : {\n\t\t\t\ttoolbar : {\n\t\t\t\t\t\"goto-line\" : \"Goto line\"\n\t\t\t\t},\n\t\t\t\tdialog : {\n\t\t\t\t\t\"goto-line\" : {\n\t\t\t\t\t\ttitle  : \"Goto line\",\n\t\t\t\t\t\tlabel  : \"Enter a line number, range \",\n\t\t\t\t\t\terror  : \"Error: \"\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\texports.fn.gotoLineDialog = function() {\n\t\t\tvar _this       = this;\n\t\t\tvar cm          = this.cm;\n\t\t\tvar editor      = this.editor;\n\t\t\tvar settings    = this.settings;\n\t\t\tvar path        = settings.pluginPath + pluginName +\"/\";\n\t\t\tvar classPrefix = this.classPrefix;\n\t\t\tvar dialogName  = classPrefix + pluginName, dialog;\n\n\t\t\t$.extend(true, this.lang, langs[this.lang.name]);\n\t\t\tthis.setToolbar();\n\n\t\t\tvar lang        = this.lang;\n\t\t\tvar dialogLang  = lang.dialog[\"goto-line\"];\n\t\t\tvar lineCount   = cm.lineCount();\n\n\t\t\tdialogLang.error += dialogLang.label + \" 1-\" + lineCount;\n\n\t\t\tif (editor.find(\".\" + dialogName).length < 1) \n\t\t\t{\t\t\t\n\t\t\t\tvar dialogContent = [\n\t\t\t\t\t\"<div class=\\\"editormd-form\\\" style=\\\"padding: 10px 0;\\\">\",\n\t\t\t\t\t\"<p style=\\\"margin: 0;\\\">\" + dialogLang.label + \" 1-\" + lineCount +\"&nbsp;&nbsp;&nbsp;<input type=\\\"number\\\" class=\\\"number-input\\\" style=\\\"width: 60px;\\\" value=\\\"1\\\" max=\\\"\" + lineCount + \"\\\" min=\\\"1\\\" data-line-number /></p>\",\n\t\t\t\t\t\"</div>\"\n\t\t\t\t].join(\"\\n\");\n\n\t\t\t\tdialog = this.createDialog({\n\t\t\t\t\tname       : dialogName,\n\t\t\t\t\ttitle      : dialogLang.title,\n\t\t\t\t\twidth      : 400,\n\t\t\t\t\theight     : 180,\n\t\t\t\t\tmask       : settings.dialogShowMask,\n\t\t\t\t\tdrag       : settings.dialogDraggable,\n\t\t\t\t\tcontent    : dialogContent,\n\t\t\t\t\tlockScreen : settings.dialogLockScreen,\n\t\t\t\t\tmaskStyle  : {\n\t\t\t\t\t\topacity         : settings.dialogMaskOpacity,\n\t\t\t\t\t\tbackgroundColor : settings.dialogMaskBgColor\n\t\t\t\t\t},\n\t\t\t\t\tbuttons    : {\n                        enter : [lang.buttons.enter, function() {\n\t\t\t\t\t\t\tvar line   = parseInt(this.find(\"[data-line-number]\").val());\n\n\t\t\t\t\t\t\tif (line < 1 || line > lineCount) {\n\t\t\t\t\t\t\t\talert(dialogLang.error);\n\n\t\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t_this.gotoLine(line);\n\n                            this.hide().lockScreen(false).hideMask();\n\n                            return false;\n                        }],\n\n                        cancel : [lang.buttons.cancel, function() {                                   \n                            this.hide().lockScreen(false).hideMask();\n\n                            return false;\n                        }]\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tdialog = editor.find(\".\" + dialogName);\n\n\t\t\tthis.dialogShowMask(dialog);\n\t\t\tthis.dialogLockScreen();\n\t\t\tdialog.show();\n\t\t};\n\n\t};\n    \n\t// CommonJS/Node.js\n\tif (typeof require === \"function\" && typeof exports === \"object\" && typeof module === \"object\")\n    { \n        module.exports = factory;\n    }\n\telse if (typeof define === \"function\")  // AMD/CMD/Sea.js\n    {\n\t\tif (define.amd) { // for Require.js\n\n\t\t\tdefine([\"editormd\"], function(editormd) {\n                factory(editormd);\n            });\n\n\t\t} else { // for Sea.js\n\t\t\tdefine(function(require) {\n                var editormd = require(\"./../../editormd\");\n                factory(editormd);\n            });\n\t\t}\n\t} \n\telse\n\t{\n        factory(window.editormd);\n\t}\n\n})();\n"
  },
  {
    "path": "static/editor.md/plugins/help-dialog/help-dialog.js",
    "content": "/*!\n * Help dialog plugin for Editor.md\n *\n * @file        help-dialog.js\n * @author      pandao\n * @version     1.2.0\n * @updateTime  2015-03-08\n * {@link       https://github.com/pandao/editor.md}\n * @license     MIT\n */\n\n(function() {\n\n\tvar factory = function (exports) {\n\n\t\tvar $            = jQuery;\n\t\tvar pluginName   = \"help-dialog\";\n\n\t\texports.fn.helpDialog = function() {\n\t\t\tvar _this       = this;\n\t\t\tvar lang        = this.lang;\n\t\t\tvar editor      = this.editor;\n\t\t\tvar settings    = this.settings;\n\t\t\tvar path        = settings.pluginPath + pluginName + \"/\";\n\t\t\tvar classPrefix = this.classPrefix;\n\t\t\tvar dialogName  = classPrefix + pluginName, dialog;\n\t\t\tvar dialogLang  = lang.dialog.help;\n\n\t\t\tif (editor.find(\".\" + dialogName).length < 1)\n\t\t\t{\t\t\t\n\t\t\t\tvar dialogContent = \"<div class=\\\"markdown-body\\\" style=\\\"font-family:微软雅黑, Helvetica, Tahoma, STXihei,Arial;height:390px;overflow:auto;font-size:14px;border-bottom:1px solid #ddd;padding:0 20px 20px 0;\\\"></div>\";\n\n\t\t\t\tdialog = this.createDialog({\n\t\t\t\t\tname       : dialogName,\n\t\t\t\t\ttitle      : dialogLang.title,\n\t\t\t\t\twidth      : 840,\n\t\t\t\t\theight     : 540,\n\t\t\t\t\tmask       : settings.dialogShowMask,\n\t\t\t\t\tdrag       : settings.dialogDraggable,\n\t\t\t\t\tcontent    : dialogContent,\n\t\t\t\t\tlockScreen : settings.dialogLockScreen,\n\t\t\t\t\tmaskStyle  : {\n\t\t\t\t\t\topacity         : settings.dialogMaskOpacity,\n\t\t\t\t\t\tbackgroundColor : settings.dialogMaskBgColor\n\t\t\t\t\t},\n\t\t\t\t\tbuttons    : {\n\t\t\t\t\t\tclose : [lang.buttons.close, function() {      \n\t\t\t\t\t\t\tthis.hide().lockScreen(false).hideMask();\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t}]\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tdialog = editor.find(\".\" + dialogName);\n\n\t\t\tthis.dialogShowMask(dialog);\n\t\t\tthis.dialogLockScreen();\n\t\t\tdialog.show();\n\n\t\t\tvar helpContent = dialog.find(\".markdown-body\");\n\n\t\t\tif (helpContent.html() === \"\") \n\t\t\t{\n\t\t\t\t$.get(path + \"help.md\", function(text) {\n\t\t\t\t\tvar md = exports.$marked(text);\n\t\t\t\t\thelpContent.html(md);\n                    \n                    helpContent.find(\"a\").attr(\"target\", \"_blank\");\n\t\t\t\t});\n\t\t\t}\n\t\t};\n\n\t};\n    \n\t// CommonJS/Node.js\n\tif (typeof require === \"function\" && typeof exports === \"object\" && typeof module === \"object\")\n    { \n        module.exports = factory;\n    }\n\telse if (typeof define === \"function\")  // AMD/CMD/Sea.js\n    {\n\t\tif (define.amd) { // for Require.js\n\n\t\t\tdefine([\"editormd\"], function(editormd) {\n                factory(editormd);\n            });\n\n\t\t} else { // for Sea.js\n\t\t\tdefine(function(require) {\n                var editormd = require(\"./../../editormd\");\n                factory(editormd);\n            });\n\t\t}\n\t} \n\telse\n\t{\n        factory(window.editormd);\n\t}\n\n})();\n"
  },
  {
    "path": "static/editor.md/plugins/help-dialog/help.md",
    "content": "##### Markdown语法教程 (Markdown syntax tutorial)\n\n- [Markdown Syntax](http://daringfireball.net/projects/markdown/syntax/ \"Markdown Syntax\")\n- [Mastering Markdown](https://guides.github.com/features/mastering-markdown/ \"Mastering Markdown\")\n- [Markdown Basics](https://help.github.com/articles/markdown-basics/ \"Markdown Basics\")\n- [GitHub Flavored Markdown](https://help.github.com/articles/github-flavored-markdown/ \"GitHub Flavored Markdown\")\n- [Markdown 语法说明（简体中文）](https://www.iminho.me/wiki/docs/mindoc/markdown-basic.md \"Markdown 语法说明（简体中文）\")\n- [Markdown 語法說明（繁體中文）](http://markdown.tw/ \"Markdown 語法說明（繁體中文）\")\n\n##### 键盘快捷键 (Keyboard shortcuts)\n\n> If Editor.md code editor is on focus, you can use keyboard shortcuts.\n    \n| Keyboard shortcuts (键盘快捷键)                 |   说明                            | Description                                        |\n| :---------------------------------------------- |:--------------------------------- | :------------------------------------------------- |\n| F9                                              | 切换实时预览                      | Switch watch/unwatch                               |\n| F10                                             | 全屏HTML预览(按 Shift + ESC 退出) | Full preview HTML (Press Shift + ESC exit)         |\n| F11                                             | 切换全屏状态                      | Switch fullscreen (Press ESC exit)                 |\n| Ctrl + 1~6 / Command + 1~6                      | 插入标题1~6                       | Insert heading 1~6                                 |\n| Ctrl + A / Command + A                          | 全选                              | Select all                                         |\n| Ctrl + B / Command + B                          | 插入粗体                          | Insert bold                                        |\n| Ctrl + D / Command + D                          | 插入日期时间                      | Insert datetime                                    |\n| Ctrl + E / Command + E                          | 插入Emoji符号                     | Insert &#58;emoji&#58;                             |\n| Ctrl + F / Command + F                          | 查找/搜索                         | Start searching                                    |\n| Ctrl + G / Command + G                          | 切换到下一个搜索结果项            | Find next search results                           |\n| Ctrl + H / Command + H                          | 插入水平线                        | Insert horizontal rule                             |\n| Ctrl + I / Command + I                          | 插入斜体                          | Insert italic                                      |\n| Ctrl + K / Command + K                          | 插入行内代码                      | Insert inline code                                 |\n| Ctrl + L / Command + L                          | 插入链接                          | Insert link                                        |\n| Ctrl + U / Command + U                          | 插入无序列表                      | Insert unordered list                              |\n| Ctrl + Q                                        | 代码折叠切换                      | Switch code fold                                   |\n| Ctrl + Z / Command + Z                          | 撤销                              | Undo                                               |\n| Ctrl + Y / Command + Y                          | 重做                              | Redo                                               |\n| Ctrl + Shift + A                                | 插入@链接                         | Insert &#64;link                                   |\n| Ctrl + Shift + C                                | 插入行内代码                      | Insert inline code                                 |\n| Ctrl + Shift + E                                | 打开插入Emoji表情对话框           | Open emoji dialog                                  |\n| Ctrl + Shift + F / Command + Option + F         | 替换                              | Replace                                            |\n| Ctrl + Shift + G / Shift + Command + G          | 切换到上一个搜索结果项            | Find previous search results                       |\n| Ctrl + Shift + H                                | 打开HTML实体字符对话框            | Open HTML Entities dialog                          |\n| Ctrl + Shift + I                                | 插入图片                          | Insert image &#33;[]&#40;&#41;                     |\n| Ctrl + Shift + K                                | 插入TeX(KaTeX)公式符号            | Insert TeX(KaTeX) symbol &#36;&#36;TeX&#36;&#36;   |\n| Ctrl + Shift + L                                | 打开插入链接对话框                | Open link dialog                                   |\n| Ctrl + Shift + O                                | 插入有序列表                      | Insert ordered list                                |\n| Ctrl + Shift + P                                | 打开插入PRE对话框                 | Open Preformatted text dialog                      |\n| Ctrl + Shift + Q                                | 插入引用                          | Insert blockquotes                                 |\n| Ctrl + Shift + R / Shift + Command + Option + F | 全部替换                          | Replace all                                        |\n| Ctrl + Shift + S                                | 插入删除线                        | Insert strikethrough                               |\n| Ctrl + Shift + T                                | 打开插入表格对话框                | Open table dialog                                  |\n| Ctrl + Shift + U                                | 将所选文字转成大写                | Selection text convert to uppercase                |\n| Shift + Alt + C                                 | 插入```代码                       | Insert code blocks (```)                           |\n| Shift + Alt + H                                 | 打开使用帮助对话框                | Open help dialog                                   |\n| Shift + Alt + L                                 | 将所选文本转成小写                | Selection text convert to lowercase                |\n| Shift + Alt + P                                 | 插入分页符                        | Insert page break                                  |\n| Alt + L                                         | 将所选文本转成小写                | Selection text convert to lowercase                |\n| Shift + Alt + U                                 | 将所选的每个单词的首字母转成大写  | Selection words first letter convert to Uppercase  |\n| Ctrl + Shift + Alt + C                          | 打开插入代码块对话框层            | Open code blocks dialog                            |\n| Ctrl + Shift + Alt + I                          | 打开插入图片对话框层              | Open image dialog                                  |\n| Ctrl + Shift + Alt + U                          | 将所选文本的第一个首字母转成大写  | Selection text first letter convert to uppercase   |\n| Ctrl + Alt + G                                  | 跳转到指定的行                    | Goto line                                          |\n\n##### Emoji表情参考 (Emoji reference)\n\n- [Github emoji](http://www.emoji-cheat-sheet.com/ \"Github emoji\")\n- [Twitter Emoji \\(Twemoji\\)](http://twitter.github.io/twemoji/preview.html \"Twitter Emoji \\(Twemoji\\)\")\n- [FontAwesome icons emoji](http://fortawesome.github.io/Font-Awesome/icons/ \"FontAwesome icons emoji\")\n\n##### 流程图参考 (Flowchart reference)\n\n[https://www.iminho.me/wiki/docs/mindoc/flowchart.md](https://www.iminho.me/wiki/docs/mindoc/flowchart.md)\n\n##### 时序图参考 (SequenceDiagram reference)\n\n[https://www.iminho.me/wiki/docs/mindoc/sequence.md](https://www.iminho.me/wiki/docs/mindoc/sequence.md)\n\n#### 基于 mermaid 的甘特图、时序图以及流程图\n\n<https://www.iminho.me/wiki/docs/mindoc/mermaid.md>\n\n##### TeX/LaTeX reference\n\n[http://meta.wikimedia.org/wiki/Help:Formula](http://meta.wikimedia.org/wiki/Help:Formula)\n"
  },
  {
    "path": "static/editor.md/plugins/html-entities-dialog/html-entities-dialog.js",
    "content": "/*!\n * HTML entities dialog plugin for Editor.md\n *\n * @file        html-entities-dialog.js\n * @author      pandao\n * @version     1.2.0\n * @updateTime  2015-03-08\n * {@link       https://github.com/pandao/editor.md}\n * @license     MIT\n */\n\n(function() {\n\n\tvar factory = function (exports) {\n\n\t\tvar $            = jQuery;\n\t\tvar pluginName   = \"html-entities-dialog\";\n\t\tvar selecteds    = [];\n\t\tvar entitiesData = [];\n\n\t\texports.fn.htmlEntitiesDialog = function() {\n\t\t\tvar _this       = this;\n\t\t\tvar cm          = this.cm;\n\t\t\tvar lang        = _this.lang;\n\t\t\tvar settings    = _this.settings;\n\t\t\tvar path        = settings.pluginPath + pluginName + \"/\";\n\t\t\tvar editor      = this.editor;\n\t\t\tvar cursor      = cm.getCursor();\n\t\t\tvar selection   = cm.getSelection();\n\t\t\tvar classPrefix = _this.classPrefix;\n\n\t\t\tvar dialogName  = classPrefix + \"dialog-\" + pluginName, dialog;\n\t\t\tvar dialogLang  = lang.dialog.htmlEntities;\n\n\t\t\tvar dialogContent = [\n\t\t\t\t'<div class=\"' + classPrefix + 'html-entities-box\" style=\\\"width: 760px;height: 334px;margin-bottom: 8px;overflow: hidden;overflow-y: auto;\\\">',\n\t\t\t\t'<div class=\"' + classPrefix + 'grid-table\">',\n\t\t\t\t'</div>',\n\t\t\t\t'</div>',\n\t\t\t].join(\"\\r\\n\");\n\n\t\t\tcm.focus();\n\n\t\t\tif (editor.find(\".\" + dialogName).length > 0) \n\t\t\t{\n                dialog = editor.find(\".\" + dialogName);\n\n\t\t\t\tselecteds = [];\n\t\t\t\tdialog.find(\"a\").removeClass(\"selected\");\n\n\t\t\t\tthis.dialogShowMask(dialog);\n\t\t\t\tthis.dialogLockScreen();\n\t\t\t\tdialog.show();\n\t\t\t} \n\t\t\telse\n\t\t\t{\n\t\t\t\tdialog = this.createDialog({\n\t\t\t\t\tname       : dialogName,\n\t\t\t\t\ttitle      : dialogLang.title,\n\t\t\t\t\twidth      : 800,\n\t\t\t\t\theight     : 475,\n\t\t\t\t\tmask       : settings.dialogShowMask,\n\t\t\t\t\tdrag       : settings.dialogDraggable,\n\t\t\t\t\tcontent    : dialogContent,\n\t\t\t\t\tlockScreen : settings.dialogLockScreen,\n\t\t\t\t\tmaskStyle  : {\n\t\t\t\t\t\topacity         : settings.dialogMaskOpacity,\n\t\t\t\t\t\tbackgroundColor : settings.dialogMaskBgColor\n\t\t\t\t\t},\n\t\t\t\t\tbuttons    : {\n\t\t\t\t\t\tenter  : [lang.buttons.enter, function() {\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tcm.replaceSelection(selecteds.join(\" \"));\n\t\t\t\t\t\t\tthis.hide().lockScreen(false).hideMask();\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t}],\n\t\t\t\t\t\tcancel : [lang.buttons.cancel, function() {                           \n\t\t\t\t\t\t\tthis.hide().lockScreen(false).hideMask();\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t}]\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t\t\t\n\t\t\tvar table = dialog.find(\".\" + classPrefix + \"grid-table\");\n\n\t\t\tvar drawTable = function() {\n\n\t\t\t\tif (entitiesData.length < 1) return ;\n\n\t\t\t\tvar rowNumber = 20;\n\t\t\t\tvar pageTotal = Math.ceil(entitiesData.length / rowNumber);\n\n\t\t\t\ttable.html(\"\");\n\t\t\t\t\n\t\t\t\tfor (var i = 0; i < pageTotal; i++)\n\t\t\t\t{\n\t\t\t\t\tvar row = \"<div class=\\\"\" + classPrefix + \"grid-table-row\\\">\";\n\t\t\t\t\t\n\t\t\t\t\tfor (var x = 0; x < rowNumber; x++)\n\t\t\t\t\t{\n\t\t\t\t\t\tvar entity = entitiesData[(i * rowNumber) + x];\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (typeof entity !== \"undefined\")\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tvar name = entity.name.replace(\"&amp;\", \"&\");\n\n\t\t\t\t\t\t\trow += \"<a href=\\\"javascript:;\\\" value=\\\"\" + entity.name + \"\\\" title=\\\"\" + name + \"\\\" class=\\\"\" + classPrefix + \"html-entity-btn\\\">\" + name + \"</a>\";\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\trow += \"</div>\";\n\t\t\t\t\t\n\t\t\t\t\ttable.append(row);\n\t\t\t\t}\n\n\t\t\t\tdialog.find(\".\" + classPrefix + \"html-entity-btn\").bind(exports.mouseOrTouch(\"click\", \"touchend\"), function() {\n\t\t\t\t\t$(this).toggleClass(\"selected\");\n\n\t\t\t\t\tif ($(this).hasClass(\"selected\")) \n\t\t\t\t\t{\n\t\t\t\t\t\tselecteds.push($(this).attr(\"value\"));\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t};\n\t\t\t\n\t\t\tif (entitiesData.length < 1) \n\t\t\t{            \n\t\t\t\tif (typeof (dialog.loading) == \"function\") dialog.loading(true);\n\n\t\t\t\t$.getJSON(path + pluginName.replace(\"-dialog\", \"\") + \".json\", function(json) {\n\n\t\t\t\t\tif (typeof (dialog.loading) == \"function\") dialog.loading(false);\n\n\t\t\t\t\tentitiesData = json;\n\t\t\t\t\tdrawTable();\n\t\t\t\t});\n\t\t\t}\n\t\t\telse\n\t\t\t{\t\t\n\t\t\t\tdrawTable();\n\t\t\t}\n\t\t};\n\n\t};\n    \n\t// CommonJS/Node.js\n\tif (typeof require === \"function\" && typeof exports === \"object\" && typeof module === \"object\")\n    { \n        module.exports = factory;\n    }\n\telse if (typeof define === \"function\")  // AMD/CMD/Sea.js\n    {\n\t\tif (define.amd) { // for Require.js\n\n\t\t\tdefine([\"editormd\"], function(editormd) {\n                factory(editormd);\n            });\n\n\t\t} else { // for Sea.js\n\t\t\tdefine(function(require) {\n                var editormd = require(\"./../../editormd\");\n                factory(editormd);\n            });\n\t\t}\n\t} \n\telse\n\t{\n        factory(window.editormd);\n\t}\n\n})();\n"
  },
  {
    "path": "static/editor.md/plugins/html-entities-dialog/html-entities.json",
    "content": "[\n\t{\n\t\t\"name\" : \"&amp;#64;\",\n\t\t\"description\":\"at symbol\"\t\t\n\t},\n\t{\n\t\t\"name\":\"&amp;copy;\",\n\t\t\"description\":\"copyright symbol\"\n\t},\n\t{\n\t\t\"name\":\"&amp;reg;\",\n\t\t\"description\":\"registered symbol\"\n\t},\n\t{\n\t\t\"name\":\"&amp;trade;\",\n\t\t\"description\":\"trademark symbol\"\n\t},\n\t{\n\t\t\"name\":\"&amp;hearts;\",\n\t\t\"description\":\"heart\"\n\t},\n\t{\n\t\t\"name\":\"&amp;nbsp;\",\n\t\t\"description\":\"Inserts a non-breaking blank space\"\n\t},\n\t{\n\t\t\"name\":\"&amp;amp;\",\n\t\t\"description\":\"Ampersand\"\n\t},\n\t{\n\t\t\"name\":\"&amp;#36;\",\n\t\t\"description\":\"dollar symbol\"\n\t},\n\t{\n\t\t\"name\":\"&amp;cent;\",\n\t\t\"description\":\"Cent symbol\"\n\t},\n\t{\n\t\t\"name\":\"&amp;pound;\",\n\t\t\"description\":\"Pound\"\n\t},\n\t{\n\t\t\"name\":\"&amp;yen;\",\n\t\t\"description\":\"Yen\"\n\t},\n\t{\n\t\t\"name\":\"&amp;euro;\",\n\t\t\"description\":\"Euro symbol\"\n\t},\n\t{\n\t\t\"name\":\"&amp;quot;\",\n\t\t\"description\":\"quotation mark\"\n\t},\n\t{\n\t\t\"name\":\"&amp;ldquo;\",\n\t\t\"description\":\"Opening Double Quotes \"\n\t},\n\t{\n\t\t\"name\":\"&amp;rdquo;\",\n\t\t\"description\":\"Closing Double Quotes \"\n\t},\n\t{\n\t\t\"name\":\"&amp;lsquo;\",\n\t\t\"description\":\"Opening Single Quote Mark \"\n\t},\n\t{\n\t\t\"name\":\"&amp;rsquo;\",\n\t\t\"description\":\"Closing Single Quote Mark \"\n\t},\n\t{\n\t\t\"name\":\"&amp;laquo;\",\n\t\t\"description\":\"angle quotation mark (left)\"\n\t},\n\t{\n\t\t\"name\":\"&amp;raquo;\",\n\t\t\"description\":\"angle quotation mark (right)\"\n\t},\n\t{\n\t\t\"name\":\"&amp;lsaquo;\",\n\t\t\"description\":\"single left angle quotation\"\n\t},\n\t{\n\t\t\"name\":\"&amp;rsaquo;\",\n\t\t\"description\":\"single right angle quotation\"\n\t},\n\t{\n\t\t\"name\":\"&amp;sect;\",\n\t\t\"description\":\"Section Symbol\"\n\t},\n\t{\n\t\t\"name\":\"&amp;micro;\",\n\t\t\"description\":\"micro sign\"\n\t},\n\t{\n\t\t\"name\":\"&amp;para;\",\n\t\t\"description\":\"Paragraph symbol\"\n\t},\n\t{\n\t\t\"name\":\"&amp;bull;\",\n\t\t\"description\":\"Big List Dot\"\n\t},\n\t{\n\t\t\"name\":\"&amp;middot;\",\n\t\t\"description\":\"Medium List Dot\"\n\t},\n\t{\n\t\t\"name\":\"&amp;hellip;\",\n\t\t\"description\":\"horizontal ellipsis\"\n\t},\n\t{\n\t\t\"name\":\"&amp;#124;\",\n\t\t\"description\":\"vertical bar\"\n\t},\n\t{\n\t\t\"name\":\"&amp;brvbar;\",\n\t\t\"description\":\"broken vertical bar\"\n\t},\n\t{\n\t\t\"name\":\"&amp;ndash;\",\n\t\t\"description\":\"en-dash\"\n\t},\n\t{\n\t\t\"name\":\"&amp;mdash;\",\n\t\t\"description\":\"em-dash\"\n\t},\n\t{\n\t\t\"name\":\"&amp;curren;\",\n\t\t\"description\":\"Generic currency symbol\"\n\t},\n\t{\n\t\t\"name\":\"&amp;#33;\",\n\t\t\"description\":\"exclamation point\"\n\t},\n\t{\n\t\t\"name\":\"&amp;#35;\",\n\t\t\"description\":\"number sign\"\n\t},\n\t{\n\t\t\"name\":\"&amp;#39;\",\n\t\t\"description\":\"single quote\"\n\t},\n\t{\n\t\t\"name\":\"&amp;#40;\",\n\t\t\"description\":\"\"\n\t},\n\t{\n\t\t\"name\":\"&amp;#41;\",\n\t\t\"description\":\"\"\n\t},\n\t{\n\t\t\"name\":\"&amp;#42;\",\n\t\t\"description\":\"asterisk\"\n\t},\n\t{\n\t\t\"name\":\"&amp;#43;\",\n\t\t\"description\":\"plus sign\"\n\t},\n\t{\n\t\t\"name\":\"&amp;#44;\",\n\t\t\"description\":\"comma\"\n\t},\n\t{\n\t\t\"name\":\"&amp;#45;\",\n\t\t\"description\":\"minus sign - hyphen\"\n\t},\n\t{\n\t\t\"name\":\"&amp;#46;\",\n\t\t\"description\":\"period\"\n\t},\n\t{\n\t\t\"name\":\"&amp;#47;\",\n\t\t\"description\":\"slash\"\n\t},\n\t{\n\t\t\"name\":\"&amp;#48;\",\n\t\t\"description\":\"0\"\n\t},\n\t{\n\t\t\"name\":\"&amp;#49;\",\n\t\t\"description\":\"1\"\n\t},\n\t{\n\t\t\"name\":\"&amp;#50;\",\n\t\t\"description\":\"2\"\n\t},\n\t{\n\t\t\"name\":\"&amp;#51;\",\n\t\t\"description\":\"3\"\n\t},\n\t{\n\t\t\"name\":\"&amp;#52;\",\n\t\t\"description\":\"4\"\n\t},\n\t{\n\t\t\"name\":\"&amp;#53;\",\n\t\t\"description\":\"5\"\n\t},\n\t{\n\t\t\"name\":\"&amp;#54;\",\n\t\t\"description\":\"6\"\n\t},\n\t{\n\t\t\"name\":\"&amp;#55;\",\n\t\t\"description\":\"7\"\n\t},\n\t{\n\t\t\"name\":\"&amp;#56;\",\n\t\t\"description\":\"8\"\n\t},\n\t{\n\t\t\"name\":\"&amp;#57;\",\n\t\t\"description\":\"9\"\n\t},\n\t{\n\t\t\"name\":\"&amp;#58;\",\n\t\t\"description\":\"colon\"\n\t},\n\t{\n\t\t\"name\":\"&amp;#59;\",\n\t\t\"description\":\"semicolon\"\n\t},\n\t{\n\t\t\"name\":\"&amp;#61;\",\n\t\t\"description\":\"equal sign\"\n\t},\n\t{\n\t\t\"name\":\"&amp;#63;\",\n\t\t\"description\":\"question mark\"\n\t},\n\t{\n\t\t\"name\":\"&amp;lt;\",\n\t\t\"description\":\"Less than\"\n\t},\n\t{\n\t\t\"name\":\"&amp;gt;\",\n\t\t\"description\":\"Greater than\"\n\t},\n\t{\n\t\t\"name\":\"&amp;le;\",\n\t\t\"description\":\"Less than or Equal to\"\n\t},\n\t{\n\t\t\"name\":\"&amp;ge;\",\n\t\t\"description\":\"Greater than or Equal to\"\n\t},\n\t{\n\t\t\"name\":\"&amp;times;\",\n\t\t\"description\":\"Multiplication symbol\"\n\t},\n\t{\n\t\t\"name\":\"&amp;divide;\",\n\t\t\"description\":\"Division symbol\"\n\t},\n\t{\n\t\t\"name\":\"&amp;minus;\",\n\t\t\"description\":\"Minus symbol\"\n\t},\n\t{\n\t\t\"name\":\"&amp;plusmn;\",\n\t\t\"description\":\"Plus/minus symbol\"\n\t},\n\t{\n\t\t\"name\":\"&amp;ne;\",\n\t\t\"description\":\"Not Equal\"\n\t},\n\t{\n\t\t\"name\":\"&amp;sup1;\",\n\t\t\"description\":\"Superscript 1\"\n\t},\n\t{\n\t\t\"name\":\"&amp;sup2;\",\n\t\t\"description\":\"Superscript 2\"\n\t},\n\t{\n\t\t\"name\":\"&amp;sup3;\",\n\t\t\"description\":\"Superscript 3\"\n\t},\n\t{\n\t\t\"name\":\"&amp;frac12;\",\n\t\t\"description\":\"Fraction ½\"\n\t},\n\t{\n\t\t\"name\":\"&amp;frac14;\",\n\t\t\"description\":\"Fraction ¼\"\n\t},\n\t{\n\t\t\"name\":\"&amp;frac34;\",\n\t\t\"description\":\"Fraction ¾\"\n\t},\n\t{\n\t\t\"name\":\"&amp;permil;\",\n\t\t\"description\":\"per mille\"\n\t},\n\t{\n\t\t\"name\":\"&amp;deg;\",\n\t\t\"description\":\"Degree symbol\"\n\t},\n\t{\n\t\t\"name\":\"&amp;radic;\",\n\t\t\"description\":\"square root\"\n\t},\n\t{\n\t\t\"name\":\"&amp;infin;\",\n\t\t\"description\":\"Infinity\"\n\t},\n\t{\n\t\t\"name\":\"&amp;larr;\",\n\t\t\"description\":\"left arrow\"\n\t},\n\t{\n\t\t\"name\":\"&amp;uarr;\",\n\t\t\"description\":\"up arrow\"\n\t},\n\t{\n\t\t\"name\":\"&amp;rarr;\",\n\t\t\"description\":\"right arrow\"\n\t},\n\t{\n\t\t\"name\":\"&amp;darr;\",\n\t\t\"description\":\"down arrow\"\n\t},\n\t{\n\t\t\"name\":\"&amp;harr;\",\n\t\t\"description\":\"left right arrow\"\n\t},\n\t{\n\t\t\"name\":\"&amp;crarr;\",\n\t\t\"description\":\"carriage return arrow\"\n\t},\n\t{\n\t\t\"name\":\"&amp;lceil;\",\n\t\t\"description\":\"left ceiling\"\n\t},\n\t{\n\t\t\"name\":\"&amp;rceil;\",\n\t\t\"description\":\"right ceiling\"\n\t},\n\t{\n\t\t\"name\":\"&amp;lfloor;\",\n\t\t\"description\":\"left floor\"\n\t},\n\t{\n\t\t\"name\":\"&amp;rfloor;\",\n\t\t\"description\":\"right floor\"\n\t},\n\t{\n\t\t\"name\":\"&amp;spades;\",\n\t\t\"description\":\"spade\"\n\t},\n\t{\n\t\t\"name\":\"&amp;clubs;\",\n\t\t\"description\":\"club\"\n\t},\n\t{\n\t\t\"name\":\"&amp;hearts;\",\n\t\t\"description\":\"heart\"\n\t},\n\t{\n\t\t\"name\":\"&amp;diams;\",\n\t\t\"description\":\"diamond\"\n\t},\n\t{\n\t\t\"name\":\"&amp;loz;\",\n\t\t\"description\":\"lozenge\"\n\t},\n\t{\n\t\t\"name\":\"&amp;dagger;\",\n\t\t\"description\":\"dagger\"\n\t},\n\t{\n\t\t\"name\":\"&amp;Dagger;\",\n\t\t\"description\":\"double dagger\"\n\t},\n\t{\n\t\t\"name\":\"&amp;iexcl;\",\n\t\t\"description\":\"inverted exclamation mark\"\n\t},\n\t{\n\t\t\"name\":\"&amp;iquest;\",\n\t\t\"description\":\"inverted question mark\"\n\t},\n\t{\n\t\t\"name\":\"&amp;#338;\",\n\t\t\"description\":\"latin capital letter OE\"\n\t},\n\t{\n\t\t\"name\":\"&amp;#339;\",\n\t\t\"description\":\"latin small letter oe\"\n\t},\n\t{\n\t\t\"name\":\"&amp;#352;\",\n\t\t\"description\":\"latin capital letter S with caron\"\n\t},\n\t{\n\t\t\"name\":\"&amp;#353;\",\n\t\t\"description\":\"latin small letter s with caron\"\n\t},\n\t{\n\t\t\"name\":\"&amp;#376;\",\n\t\t\"description\":\"latin capital letter Y with diaeresis\"\n\t},\n\t{\n\t\t\"name\":\"&amp;#402;\",\n\t\t\"description\":\"latin small f with hook - function\"\n\t},\n\t{\n\t\t\"name\":\"&amp;not;\",\n\t\t\"description\":\"not sign\"\n\t},\n\t{\n\t\t\"name\":\"&amp;ordf;\",\n\t\t\"description\":\"feminine ordinal indicator\"\n\t},\n\t{\n\t\t\"name\":\"&amp;uml;\",\n\t\t\"description\":\"spacing diaeresis - umlaut\"\n\t},\n\t{\n\t\t\"name\":\"&amp;macr;\",\n\t\t\"description\":\"spacing macron - overline\"\n\t},\n\t{\n\t\t\"name\":\"&amp;acute;\",\n\t\t\"description\":\"acute accent - spacing acute\"\n\t},\n\t{\n\t\t\"name\":\"&amp;Agrave;\",\n\t\t\"description\":\"latin capital letter A with grave\"\n\t},\n\t{\n\t\t\"name\":\"&amp;Aacute;\",\n\t\t\"description\":\"latin capital letter A with acute\"\n\t},\n\t{\n\t\t\"name\":\"&amp;Acirc;\",\n\t\t\"description\":\"latin capital letter A with circumflex\"\n\t},\n\t{\n\t\t\"name\":\"&amp;Atilde;\",\n\t\t\"description\":\"latin capital letter A with tilde\"\n\t},\n\t{\n\t\t\"name\":\"&amp;Auml;\",\n\t\t\"description\":\"latin capital letter A with diaeresis\"\n\t},\n\t{\n\t\t\"name\":\"&amp;Aring;\",\n\t\t\"description\":\"latin capital letter A with ring above\"\n\t},\n\t{\n\t\t\"name\":\"&amp;AElig;\",\n\t\t\"description\":\"latin capital letter AE\"\n\t},\n\t{\n\t\t\"name\":\"&amp;Ccedil;\",\n\t\t\"description\":\"latin capital letter C with cedilla\"\n\t},\n\t{\n\t\t\"name\":\"&amp;Egrave;\",\n\t\t\"description\":\"latin capital letter E with grave\"\n\t},\n\t{\n\t\t\"name\":\"&amp;Eacute;\",\n\t\t\"description\":\"latin capital letter E with acute\"\n\t},\n\t{\n\t\t\"name\":\"&amp;Ecirc;\",\n\t\t\"description\":\"latin capital letter E with circumflex\"\n\t},\n\t{\n\t\t\"name\":\"&amp;Euml;\",\n\t\t\"description\":\"latin capital letter E with diaeresis\"\n\t},\n\t{\n\t\t\"name\":\"&amp;Igrave;\",\n\t\t\"description\":\"latin capital letter I with grave\"\n\t},\n\t{\n\t\t\"name\":\"&amp;Iacute;\",\n\t\t\"description\":\"latin capital letter I with acute\"\n\t},\n\t{\n\t\t\"name\":\"&amp;Icirc;\",\n\t\t\"description\":\"latin capital letter I with circumflex\"\n\t},\n\t{\n\t\t\"name\":\"&amp;Iuml;\",\n\t\t\"description\":\"latin capital letter I with diaeresis\"\n\t},\n\n\t{\n\t\t\"name\":\"&amp;ETH;\",\n\t\t\"description\":\"latin capital letter ETH\"\n\t},\n\t{\n\t\t\"name\":\"&amp;Ntilde;\",\n\t\t\"description\":\"latin capital letter N with tilde\"\n\t},\n\t{\n\t\t\"name\":\"&amp;Ograve;\",\n\t\t\"description\":\"latin capital letter O with grave\"\n\t},\n\t{\n\t\t\"name\":\"&amp;Oacute;\",\n\t\t\"description\":\"latin capital letter O with acute\"\n\t},\n\t{\n\t\t\"name\":\"&amp;Ocirc;\",\n\t\t\"description\":\"latin capital letter O with circumflex\"\n\t},\n\t{\n\t\t\"name\":\"&amp;Otilde;\",\n\t\t\"description\":\"latin capital letter O with tilde\"\n\t},\n\t{\n\t\t\"name\":\"&amp;Ouml;\",\n\t\t\"description\":\"latin capital letter O with diaeresis\"\n\t},\n\t{\n\t\t\"name\":\"&amp;times;\",\n\t\t\"description\":\"multiplication sign\"\n\t},\n\t{\n\t\t\"name\":\"&amp;Oslash;\",\n\t\t\"description\":\"latin capital letter O with slash\"\n\t},\n\t{\n\t\t\"name\":\"&amp;Ugrave;\",\n\t\t\"description\":\"latin capital letter U with grave\"\n\t},\n\t{\n\t\t\"name\":\"&amp;Uacute;\",\n\t\t\"description\":\"latin capital letter U with acute\"\n\t},\n\t{\n\t\t\"name\":\"&amp;Ucirc;\",\n\t\t\"description\":\"latin capital letter U with circumflex\"\n\t},\n\t{\n\t\t\"name\":\"&amp;Uuml;\",\n\t\t\"description\":\"latin capital letter U with diaeresis\"\n\t},\n\t{\n\t\t\"name\":\"&amp;Yacute;\",\n\t\t\"description\":\"latin capital letter Y with acute\"\n\t},\n\t{\n\t\t\"name\":\"&amp;THORN;\",\n\t\t\"description\":\"latin capital letter THORN\"\n\t},\n\t{\n\t\t\"name\":\"&amp;szlig;\",\n\t\t\"description\":\"latin small letter sharp s - ess-zed\"\n\t},\n\n\n\t{\n\t\t\"name\":\"&amp;eth;\",\n\t\t\"description\":\"latin capital letter eth\"\n\t},\n\t{\n\t\t\"name\":\"&amp;ntilde;\",\n\t\t\"description\":\"latin capital letter n with tilde\"\n\t},\n\t{\n\t\t\"name\":\"&amp;ograve;\",\n\t\t\"description\":\"latin capital letter o with grave\"\n\t},\n\t{\n\t\t\"name\":\"&amp;oacute;\",\n\t\t\"description\":\"latin capital letter o with acute\"\n\t},\n\t{\n\t\t\"name\":\"&amp;ocirc;\",\n\t\t\"description\":\"latin capital letter o with circumflex\"\n\t},\n\t{\n\t\t\"name\":\"&amp;otilde;\",\n\t\t\"description\":\"latin capital letter o with tilde\"\n\t},\n\t{\n\t\t\"name\":\"&amp;ouml;\",\n\t\t\"description\":\"latin capital letter o with diaeresis\"\n\t},\n\t{\n\t\t\"name\":\"&amp;times;\",\n\t\t\"description\":\"multiplication sign\"\n\t},\n\t{\n\t\t\"name\":\"&amp;oslash;\",\n\t\t\"description\":\"latin capital letter o with slash\"\n\t},\n\t{\n\t\t\"name\":\"&amp;ugrave;\",\n\t\t\"description\":\"latin capital letter u with grave\"\n\t},\n\t{\n\t\t\"name\":\"&amp;uacute;\",\n\t\t\"description\":\"latin capital letter u with acute\"\n\t},\n\t{\n\t\t\"name\":\"&amp;ucirc;\",\n\t\t\"description\":\"latin capital letter u with circumflex\"\n\t},\n\t{\n\t\t\"name\":\"&amp;uuml;\",\n\t\t\"description\":\"latin capital letter u with diaeresis\"\n\t},\n\t{\n\t\t\"name\":\"&amp;yacute;\",\n\t\t\"description\":\"latin capital letter y with acute\"\n\t},\n\t{\n\t\t\"name\":\"&amp;thorn;\",\n\t\t\"description\":\"latin capital letter thorn\"\n\t},\n\t{\n\t\t\"name\":\"&amp;yuml;\",\n\t\t\"description\":\"latin small letter y with diaeresis\"\n\t},\n\n\t{\n\t\t\"name\":\"&amp;agrave;\",\n\t\t\"description\":\"latin capital letter a with grave\"\n\t},\n\t{\n\t\t\"name\":\"&amp;aacute;\",\n\t\t\"description\":\"latin capital letter a with acute\"\n\t},\n\t{\n\t\t\"name\":\"&amp;acirc;\",\n\t\t\"description\":\"latin capital letter a with circumflex\"\n\t},\n\t{\n\t\t\"name\":\"&amp;atilde;\",\n\t\t\"description\":\"latin capital letter a with tilde\"\n\t},\n\t{\n\t\t\"name\":\"&amp;auml;\",\n\t\t\"description\":\"latin capital letter a with diaeresis\"\n\t},\n\t{\n\t\t\"name\":\"&amp;aring;\",\n\t\t\"description\":\"latin capital letter a with ring above\"\n\t},\n\t{\n\t\t\"name\":\"&amp;aelig;\",\n\t\t\"description\":\"latin capital letter ae\"\n\t},\n\t{\n\t\t\"name\":\"&amp;ccedil;\",\n\t\t\"description\":\"latin capital letter c with cedilla\"\n\t},\n\t{\n\t\t\"name\":\"&amp;egrave;\",\n\t\t\"description\":\"latin capital letter e with grave\"\n\t},\n\t{\n\t\t\"name\":\"&amp;eacute;\",\n\t\t\"description\":\"latin capital letter e with acute\"\n\t},\n\t{\n\t\t\"name\":\"&amp;ecirc;\",\n\t\t\"description\":\"latin capital letter e with circumflex\"\n\t},\n\t{\n\t\t\"name\":\"&amp;euml;\",\n\t\t\"description\":\"latin capital letter e with diaeresis\"\n\t},\n\t{\n\t\t\"name\":\"&amp;igrave;\",\n\t\t\"description\":\"latin capital letter i with grave\"\n\t},\n\t{\n\t\t\"name\":\"&amp;Iacute;\",\n\t\t\"description\":\"latin capital letter i with acute\"\n\t},\n\t{\n\t\t\"name\":\"&amp;icirc;\",\n\t\t\"description\":\"latin capital letter i with circumflex\"\n\t},\n\t{\n\t\t\"name\":\"&amp;iuml;\",\n\t\t\"description\":\"latin capital letter i with diaeresis\"\n\t},\n\n\t{\n\t\t\"name\":\"&amp;#65;\",\n\t\t\"description\":\"A\"\n\t},\n\t{\n\t\t\"name\":\"&amp;#66;\",\n\t\t\"description\":\"B\"\n\t},\n\t{\n\t\t\"name\":\"&amp;#67;\",\n\t\t\"description\":\"C\"\n\t},\n\t{\n\t\t\"name\":\"&amp;#68;\",\n\t\t\"description\":\"D\"\n\t},\n\t{\n\t\t\"name\":\"&amp;#69;\",\n\t\t\"description\":\"E\"\n\t},\n\t{\n\t\t\"name\":\"&amp;#70;\",\n\t\t\"description\":\"F\"\n\t},\n\t{\n\t\t\"name\":\"&amp;#71;\",\n\t\t\"description\":\"G\"\n\t},\n\t{\n\t\t\"name\":\"&amp;#72;\",\n\t\t\"description\":\"H\"\n\t},\n\t{\n\t\t\"name\":\"&amp;#73;\",\n\t\t\"description\":\"I\"\n\t},\n\t{\n\t\t\"name\":\"&amp;#74;\",\n\t\t\"description\":\"J\"\n\t},\n\t{\n\t\t\"name\":\"&amp;#75;\",\n\t\t\"description\":\"K\"\n\t},\n\t{\n\t\t\"name\":\"&amp;#76;\",\n\t\t\"description\":\"L\"\n\t},\n\t{\n\t\t\"name\":\"&amp;#77;\",\n\t\t\"description\":\"M\"\n\t},\n\t{\n\t\t\"name\":\"&amp;#78;\",\n\t\t\"description\":\"N\"\n\t},\n\t{\n\t\t\"name\":\"&amp;#79;\",\n\t\t\"description\":\"O\"\n\t},\n\t{\n\t\t\"name\":\"&amp;#80;\",\n\t\t\"description\":\"P\"\n\t},\n\t{\n\t\t\"name\":\"&amp;#81;\",\n\t\t\"description\":\"Q\"\n\t},\n\t{\n\t\t\"name\":\"&amp;#82;\",\n\t\t\"description\":\"R\"\n\t},\n\t{\n\t\t\"name\":\"&amp;#83;\",\n\t\t\"description\":\"S\"\n\t},\n\t{\n\t\t\"name\":\"&amp;#84;\",\n\t\t\"description\":\"T\"\n\t},\n\t{\n\t\t\"name\":\"&amp;#85;\",\n\t\t\"description\":\"U\"\n\t},\n\t{\n\t\t\"name\":\"&amp;#86;\",\n\t\t\"description\":\"V\"\n\t},\n\t{\n\t\t\"name\":\"&amp;#87;\",\n\t\t\"description\":\"W\"\n\t},\n\t{\n\t\t\"name\":\"&amp;#88;\",\n\t\t\"description\":\"X\"\n\t},\n\t{\n\t\t\"name\":\"&amp;#89;\",\n\t\t\"description\":\"Y\"\n\t},\n\t{\n\t\t\"name\":\"&amp;#90;\",\n\t\t\"description\":\"Z\"\n\t},\n\t{\n\t\t\"name\":\"&amp;#91;\",\n\t\t\"description\":\"opening bracket\"\n\t},\n\t{\n\t\t\"name\":\"&amp;#92;\",\n\t\t\"description\":\"backslash\"\n\t},\n\t{\n\t\t\"name\":\"&amp;#93;\",\n\t\t\"description\":\"closing bracket\"\n\t},\n\t{\n\t\t\"name\":\"&amp;#94;\",\n\t\t\"description\":\"caret - circumflex\"\n\t},\n\t{\n\t\t\"name\":\"&amp;#95;\",\n\t\t\"description\":\"underscore\"\n\t},\n\n\t{\n\t\t\"name\":\"&amp;#96;\",\n\t\t\"description\":\"grave accent\"\n\t},\n\t{\n\t\t\"name\":\"&amp;#97;\",\n\t\t\"description\":\"a\"\n\t},\n\t{\n\t\t\"name\":\"&amp;#98;\",\n\t\t\"description\":\"b\"\n\t},\n\t{\n\t\t\"name\":\"&amp;#99;\",\n\t\t\"description\":\"c\"\n\t},\n\t{\n\t\t\"name\":\"&amp;#100;\",\n\t\t\"description\":\"d\"\n\t},\n\t{\n\t\t\"name\":\"&amp;#101;\",\n\t\t\"description\":\"e\"\n\t},\n\t{\n\t\t\"name\":\"&amp;#102;\",\n\t\t\"description\":\"f\"\n\t},\n\t{\n\t\t\"name\":\"&amp;#103;\",\n\t\t\"description\":\"g\"\n\t},\n\t{\n\t\t\"name\":\"&amp;#104;\",\n\t\t\"description\":\"h\"\n\t},\n\t{\n\t\t\"name\":\"&amp;#105;\",\n\t\t\"description\":\"i\"\n\t},\n\t{\n\t\t\"name\":\"&amp;#106;\",\n\t\t\"description\":\"j\"\n\t},\n\t{\n\t\t\"name\":\"&amp;#107;\",\n\t\t\"description\":\"k\"\n\t},\n\t{\n\t\t\"name\":\"&amp;#108;\",\n\t\t\"description\":\"l\"\n\t},\n\t{\n\t\t\"name\":\"&amp;#109;\",\n\t\t\"description\":\"m\"\n\t},\n\t{\n\t\t\"name\":\"&amp;#110;\",\n\t\t\"description\":\"n\"\n\t},\n\t{\n\t\t\"name\":\"&amp;#111;\",\n\t\t\"description\":\"o\"\n\t},\n\t{\n\t\t\"name\":\"&amp;#112;\",\n\t\t\"description\":\"p\"\n\t},\n\t{\n\t\t\"name\":\"&amp;#113;\",\n\t\t\"description\":\"q\"\n\t},\n\t{\n\t\t\"name\":\"&amp;#114;\",\n\t\t\"description\":\"r\"\n\t},\n\t{\n\t\t\"name\":\"&amp;#115;\",\n\t\t\"description\":\"s\"\n\t},\n\t{\n\t\t\"name\":\"&amp;#116;\",\n\t\t\"description\":\"t\"\n\t},\n\t{\n\t\t\"name\":\"&amp;#117;\",\n\t\t\"description\":\"u\"\n\t},\n\t{\n\t\t\"name\":\"&amp;#118;\",\n\t\t\"description\":\"v\"\n\t},\n\t{\n\t\t\"name\":\"&amp;#119;\",\n\t\t\"description\":\"w\"\n\t},\n\t{\n\t\t\"name\":\"&amp;#120;\",\n\t\t\"description\":\"x\"\n\t},\n\t{\n\t\t\"name\":\"&amp;#121;\",\n\t\t\"description\":\"y\"\n\t},\n\t{\n\t\t\"name\":\"&amp;#122;\",\n\t\t\"description\":\"z\"\n\t},\n\t{\n\t\t\"name\":\"&amp;#123;\",\n\t\t\"description\":\"opening brace\"\n\t},\n\t{\n\t\t\"name\":\"&amp;#124;\",\n\t\t\"description\":\"vertical bar\"\n\t},\n\t{\n\t\t\"name\":\"&amp;#125;\",\n\t\t\"description\":\"closing brace\"\n\t},\n\t{\n\t\t\"name\":\"&amp;#126;\",\n\t\t\"description\":\"equivalency sign - tilde\"\n\t}\n]"
  },
  {
    "path": "static/editor.md/plugins/image-dialog/image-dialog.js",
    "content": "/*!\n * Image (upload) dialog plugin for Editor.md\n *\n * @file        image-dialog.js\n * @author      pandao\n * @version     1.3.4\n * @updateTime  2015-06-09\n * {@link       https://github.com/pandao/editor.md}\n * @license     MIT\n */\n\n(function() {\n\n    var factory = function (exports) {\n\n\t\tvar pluginName   = \"image-dialog\";\n\n\t\texports.fn.imageDialog = function() {\n\n            var _this       = this;\n            var cm          = this.cm;\n            var lang        = this.lang;\n            var editor      = this.editor;\n            var settings    = this.settings;\n            var cursor      = cm.getCursor();\n            var selection   = cm.getSelection();\n            var imageLang   = lang.dialog.image;\n            var classPrefix = this.classPrefix;\n            var iframeName  = classPrefix + \"image-iframe\";\n\t\t\tvar dialogName  = classPrefix + pluginName, dialog;\n\n\t\t\tcm.focus();\n\n            var loading = function(show) {\n                var _loading = dialog.find(\".\" + classPrefix + \"dialog-mask\");\n                _loading[(show) ? \"show\" : \"hide\"]();\n            };\n\n            if (editor.find(\".\" + dialogName).length < 1)\n            {\n                var guid   = (new Date).getTime();\n                var action = settings.imageUploadURL + (settings.imageUploadURL.indexOf(\"?\") >= 0 ? \"&\" : \"?\") + \"guid=\" + guid;\n\n                if (settings.crossDomainUpload)\n                {\n                    action += \"&callback=\" + settings.uploadCallbackURL + \"&dialog_id=editormd-image-dialog-\" + guid;\n                }\n\n        var dialogContent = ((settings.imageUpload) ? \"<form action=\\\"\" + action + \"\\\" target=\\\"\" + iframeName + \"\\\" method=\\\"post\\\" enctype=\\\"multipart/form-data\\\" class=\\\"\" + classPrefix + \"form\\\">\" : \"<div class=\\\"\" + classPrefix + \"form\\\">\") +\n          ((settings.imageUpload) ? \"<iframe name=\\\"\" + iframeName + \"\\\" id=\\\"\" + iframeName + \"\\\" guid=\\\"\" + guid + \"\\\"></iframe>\" : \"\") +\n          \"<label>\" + imageLang.url + \"</label>\" +\n          \"<input type=\\\"text\\\" data-url />\" + (function() {\n            return (settings.imageUpload) ? \"<div class=\\\"\" + classPrefix + \"file-input\\\">\" +\n              // 3xxx �������multiple=\\\"multiple\\\"\n              \"<input type=\\\"file\\\" name=\\\"\" + classPrefix + \"image-file\\\" accept=\\\"image/jpeg,image/png,image/gif,image/jpg\\\" multiple=\\\"multiple\\\" />\" +\n              \"<input type=\\\"submit\\\" value=\\\"\" + imageLang.uploadButton + \"\\\" />\" +\n              \"</div>\" : \"\";\n          })() +\n          \"<br/>\" +\n          \"<label>\" + imageLang.alt + \"</label>\" +\n          \"<input type=\\\"text\\\" value=\\\"\" + selection + \"\\\" data-alt />\" +\n          \"<br/>\" +\n          \"<label>\" + imageLang.link + \"</label>\" +\n          \"<input type=\\\"text\\\" value=\\\"http://\\\" data-link />\" +\n          \"<br/>\" +\n          ((settings.imageUpload) ? \"</form>\" : \"</div>\");\n        //var imageFooterHTML = \"<button class=\\\"\" + classPrefix + \"btn \" + classPrefix + \"image-manager-btn\\\" style=\\\"float:left;\\\">\" + imageLang.managerButton + \"</button>\";\n        dialog = this.createDialog({\n          title: imageLang.title,\n          width: (settings.imageUpload) ? 465 : 380,\n          height: 254,\n          name: dialogName,\n          content: dialogContent,\n          mask: settings.dialogShowMask,\n          drag: settings.dialogDraggable,\n          lockScreen: settings.dialogLockScreen,\n          maskStyle: {\n            opacity: settings.dialogMaskOpacity,\n            backgroundColor: settings.dialogMaskBgColor\n          },\n          // ���ｫ��ͼƬ��ַ���������ĵ���\n          buttons: {\n            enter: [lang.buttons.enter, function() {\n              var url = this.find(\"[data-url]\").val();\n              var alt = this.find(\"[data-alt]\").val();\n              var link = this.find(\"[data-link]\").val();\n              if (url === \"\") {\n                alert(imageLang.imageURLEmpty);\n                return false;\n              }\n              // ��������ѭ��\n              let arr = url.split(\";\");\n              var altAttr = (alt !== \"\") ? \" \\\"\" + alt + \"\\\"\" : \"\";\n              for (let i = 0; i < arr.length; i++) {\n                if (link === \"\" || link === \"http://\") {\n                  // cm.replaceSelection(\"![\" + alt + \"](\" + url + altAttr + \")\");\n                  cm.replaceSelection(\"![\" + alt + \"](\" + arr[i] + altAttr + \")\");\n                } else {\n                  // cm.replaceSelection(\"[![\" + alt + \"](\" + url + altAttr + \")](\" + link + altAttr + \")\");\n                  cm.replaceSelection(\"[![\" + alt + \"](\" + arr[i] + altAttr + \")](\" + link + altAttr + \")\");\n                }\n              }\n              if (alt === \"\") {\n                cm.setCursor(cursor.line, cursor.ch + 2);\n              }\n              this.hide().lockScreen(false).hideMask();\n              return false;\n            }],\n\n            cancel: [lang.buttons.cancel, function() {\n              this.hide().lockScreen(false).hideMask();\n              return false;\n            }]\n          }\n        });\n        dialog.attr(\"id\", classPrefix + \"image-dialog-\" + guid);\n        if (!settings.imageUpload) {\n          return;\n        }\n        var fileInput = dialog.find(\"[name=\\\"\" + classPrefix + \"image-file\\\"]\");\n        fileInput.bind(\"change\", function() {\n          // 3xxx 20240602\n          // let formData = new FormData();\n          // ��ȡ�ı���dom\n          // var doc = document.getElementById('doc');\n          // ��ȡ�ϴ��ؼ�dom\n          // var upload = document.getElementById('upload');\n          // let files = upload.files;\n          //�����ļ���Ϣappend��formData�洢\n          // for (let i = 0; i < files.length; i++) {\n          //     let file = files[i]\n          //     formData.append('files', file)\n          // }\n          // ��ȡ�ļ���\n          // var fileName = upload.files[0].name;\n          // ��ȡ�ļ�·��\n          // var filePath = upload.value;\n          // doc.value = fileName;\n          // 3xxx\n          console.log(fileInput);\n          console.log(fileInput[0].files);\n          let files = fileInput[0].files;\n          for (let i = 0; i < files.length; i++) {\n            var fileName = files[i].name;\n            // var fileName  = fileInput.val();\n            var isImage = new RegExp(\"(\\\\.(\" + settings.imageFormats.join(\"|\") + \"))$\"); // /(\\.(webp|jpg|jpeg|gif|bmp|png))$/\n            if (fileName === \"\") {\n              alert(imageLang.uploadFileEmpty);\n              return false;\n            }\n            if (!isImage.test(fileName)) {\n              alert(imageLang.formatNotAllowed + settings.imageFormats.join(\", \"));\n              return false;\n            }\n            loading(true);\n            var submitHandler = function() {\n              var uploadIframe = document.getElementById(iframeName);\n              uploadIframe.onload = function() {\n                loading(false);\n                var body = (uploadIframe.contentWindow ? uploadIframe.contentWindow : uploadIframe.contentDocument).document.body;\n                var json = (body.innerText) ? body.innerText : ((body.textContent) ? body.textContent : null);\n                json = (typeof JSON.parse !== \"undefined\") ? JSON.parse(json) : eval(\"(\" + json + \")\");\n                var url=\"\";\n                  if (json.success === 1) {\n                      url=json.url;\n                  } else {\n                      alert(json.message);\n                  }\n                dialog.find(\"[data-url]\").val(url)\n                return false;\n              };\n            };\n            dialog.find(\"[type=\\\"submit\\\"]\").bind(\"click\", submitHandler).trigger(\"click\");\n          }\n        });\n      }\n      dialog = editor.find(\".\" + dialogName);\n      dialog.find(\"[type=\\\"text\\\"]\").val(\"\");\n      dialog.find(\"[type=\\\"file\\\"]\").val(\"\");\n      dialog.find(\"[data-link]\").val(\"http://\");\n      this.dialogShowMask(dialog);\n      this.dialogLockScreen();\n      dialog.show();\n    };\n  };\n\n\t// CommonJS/Node.js\n\tif (typeof require === \"function\" && typeof exports === \"object\" && typeof module === \"object\")\n    {\n        module.exports = factory;\n    }\n\telse if (typeof define === \"function\")  // AMD/CMD/Sea.js\n    {\n\t\tif (define.amd) { // for Require.js\n\n\t\t\tdefine([\"editormd\"], function(editormd) {\n                factory(editormd);\n            });\n\n\t\t} else { // for Sea.js\n\t\t\tdefine(function(require) {\n                var editormd = require(\"./../../editormd\");\n                factory(editormd);\n            });\n\t\t}\n\t}\n\telse\n\t{\n        factory(window.editormd);\n\t}\n\n})();\n"
  },
  {
    "path": "static/editor.md/plugins/link-dialog/link-dialog.js",
    "content": "/*!\n * Link dialog plugin for Editor.md\n *\n * @file        link-dialog.js\n * @author      pandao\n * @version     1.2.1\n * @updateTime  2015-06-09\n * {@link       https://github.com/pandao/editor.md}\n * @license     MIT\n */\n\n(function() {\n\n    var factory = function (exports) {\n\n\t\tvar pluginName   = \"link-dialog\";\n\n\t\texports.fn.linkDialog = function() {\n\n\t\t\tvar _this       = this;\n\t\t\tvar cm          = this.cm;\n            var editor      = this.editor;\n            var settings    = this.settings;\n            var selection   = cm.getSelection();\n            var lang        = this.lang;\n            var linkLang    = lang.dialog.link;\n            var classPrefix = this.classPrefix;\n\t\t\tvar dialogName  = classPrefix + pluginName, dialog;\n\n\t\t\tcm.focus();\n\n            if (editor.find(\".\" + dialogName).length > 0)\n            {\n                dialog = editor.find(\".\" + dialogName);\n                dialog.find(\"[data-url]\").val(\"http://\");\n                dialog.find(\"[data-title]\").val(selection);\n\n                this.dialogShowMask(dialog);\n                this.dialogLockScreen();\n                dialog.show();\n            }\n            else\n            {\n                var dialogHTML = \"<div class=\\\"\" + classPrefix + \"form\\\">\" + \n                                        \"<label>\" + linkLang.url + \"</label>\" + \n                                        \"<input type=\\\"text\\\" value=\\\"http://\\\" data-url />\" +\n                                        \"<br/>\" + \n                                        \"<label>\" + linkLang.urlTitle + \"</label>\" + \n                                        \"<input type=\\\"text\\\" value=\\\"\" + selection + \"\\\" data-title />\" + \n                                        \"<br/>\" +\n                                    \"</div>\";\n\n                dialog = this.createDialog({\n                    title      : linkLang.title,\n                    width      : 380,\n                    height     : 211,\n                    content    : dialogHTML,\n                    mask       : settings.dialogShowMask,\n                    drag       : settings.dialogDraggable,\n                    lockScreen : settings.dialogLockScreen,\n                    maskStyle  : {\n                        opacity         : settings.dialogMaskOpacity,\n                        backgroundColor : settings.dialogMaskBgColor\n                    },\n                    buttons    : {\n                        enter  : [lang.buttons.enter, function() {\n                            var url   = this.find(\"[data-url]\").val();\n                            var title = this.find(\"[data-title]\").val();\n\n                            if (url === \"http://\" || url === \"\")\n                            {\n                                alert(linkLang.urlEmpty);\n                                return false;\n                            }\n\n                            /*if (title === \"\")\n                            {\n                                alert(linkLang.titleEmpty);\n                                return false;\n                            }*/\n                            \n                            var str = \"[\" + title + \"](\" + url + \" \\\"\" + title + \"\\\")\";\n                            \n                            if (title == \"\")\n                            {\n                                str = \"[\" + url + \"](\" + url + \")\";\n                            }                                \n\n                            cm.replaceSelection(str);\n\n                            this.hide().lockScreen(false).hideMask();\n\n                            return false;\n                        }],\n\n                        cancel : [lang.buttons.cancel, function() {                                   \n                            this.hide().lockScreen(false).hideMask();\n\n                            return false;\n                        }]\n                    }\n                });\n\t\t\t}\n\t\t};\n\n\t};\n    \n\t// CommonJS/Node.js\n\tif (typeof require === \"function\" && typeof exports === \"object\" && typeof module === \"object\")\n    { \n        module.exports = factory;\n    }\n\telse if (typeof define === \"function\")  // AMD/CMD/Sea.js\n    {\n\t\tif (define.amd) { // for Require.js\n\n\t\t\tdefine([\"editormd\"], function(editormd) {\n                factory(editormd);\n            });\n\n\t\t} else { // for Sea.js\n\t\t\tdefine(function(require) {\n                var editormd = require(\"./../../editormd\");\n                factory(editormd);\n            });\n\t\t}\n\t} \n\telse\n\t{\n        factory(window.editormd);\n\t}\n\n})();\n"
  },
  {
    "path": "static/editor.md/plugins/plugin-template.js",
    "content": "/*!\n * Link dialog plugin for Editor.md\n *\n * @file        link-dialog.js\n * @author      pandao\n * @version     1.2.0\n * @updateTime  2015-03-07\n * {@link       https://github.com/pandao/editor.md}\n * @license     MIT\n */\n\n(function() {\n\n    var factory = function (exports) {\n\n\t\tvar $            = jQuery;           // if using module loader(Require.js/Sea.js).\n\n\t\tvar langs = {\n\t\t\t\"zh-cn\" : {\n\t\t\t\ttoolbar : {\n\t\t\t\t\ttable : \"表格\"\n\t\t\t\t},\n\t\t\t\tdialog : {\n\t\t\t\t\ttable : {\n\t\t\t\t\t\ttitle      : \"添加表格\",\n\t\t\t\t\t\tcellsLabel : \"单元格数\",\n\t\t\t\t\t\talignLabel : \"对齐方式\",\n\t\t\t\t\t\trows       : \"行数\",\n\t\t\t\t\t\tcols       : \"列数\",\n\t\t\t\t\t\taligns     : [\"默认\", \"左对齐\", \"居中对齐\", \"右对齐\"]\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\t\t\t\"zh-tw\" : {\n\t\t\t\ttoolbar : {\n\t\t\t\t\ttable : \"添加表格\"\n\t\t\t\t},\n\t\t\t\tdialog : {\n\t\t\t\t\ttable : {\n\t\t\t\t\t\ttitle      : \"添加表格\",\n\t\t\t\t\t\tcellsLabel : \"單元格數\",\n\t\t\t\t\t\talignLabel : \"對齊方式\",\n\t\t\t\t\t\trows       : \"行數\",\n\t\t\t\t\t\tcols       : \"列數\",\n\t\t\t\t\t\taligns     : [\"默認\", \"左對齊\", \"居中對齊\", \"右對齊\"]\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\t\t\t\"en\" : {\n\t\t\t\ttoolbar : {\n\t\t\t\t\ttable : \"Tables\"\n\t\t\t\t},\n\t\t\t\tdialog : {\n\t\t\t\t\ttable : {\n\t\t\t\t\t\ttitle      : \"Tables\",\n\t\t\t\t\t\tcellsLabel : \"Cells\",\n\t\t\t\t\t\talignLabel : \"Align\",\n\t\t\t\t\t\trows       : \"Rows\",\n\t\t\t\t\t\tcols       : \"Cols\",\n\t\t\t\t\t\taligns     : [\"Default\", \"Left align\", \"Center align\", \"Right align\"]\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\texports.fn.htmlEntities = function() {\n\t\t\t/*\n\t\t\tvar _this       = this; // this == the current instance object of Editor.md\n\t\t\tvar lang        = _this.lang;\n\t\t\tvar settings    = _this.settings;\n\t\t\tvar editor      = this.editor;\n\t\t\tvar cursor      = cm.getCursor();\n\t\t\tvar selection   = cm.getSelection();\n\t\t\tvar classPrefix = this.classPrefix;\n\n\t\t\t$.extend(true, this.lang, langs[this.lang.name]); // l18n\n\t\t\tthis.setToolbar();\n\n\t\t\tcm.focus();\n\t\t\t*/\n\t\t\t//....\n\t\t};\n\n\t};\n    \n\t// CommonJS/Node.js\n\tif (typeof require === \"function\" && typeof exports === \"object\" && typeof module === \"object\")\n    { \n        module.exports = factory;\n    }\n\telse if (typeof define === \"function\")  // AMD/CMD/Sea.js\n    {\n\t\tif (define.amd) { // for Require.js\n\n\t\t\tdefine([\"editormd\"], function(editormd) {\n                factory(editormd);\n            });\n\n\t\t} else { // for Sea.js\n\t\t\tdefine(function(require) {\n                var editormd = require(\"./../../editormd\");\n                factory(editormd);\n            });\n\t\t}\n\t} \n\telse\n\t{\n        factory(window.editormd);\n\t}\n\n})();\n"
  },
  {
    "path": "static/editor.md/plugins/preformatted-text-dialog/preformatted-text-dialog.js",
    "content": "/*!\n * Preformatted text dialog plugin for Editor.md\n *\n * @file        preformatted-text-dialog.js\n * @author      pandao\n * @version     1.2.0\n * @updateTime  2015-03-07\n * {@link       https://github.com/pandao/editor.md}\n * @license     MIT\n */\n\n(function() {\n\n    var factory = function (exports) {\n\t\tvar cmEditor;\n\t\tvar pluginName   = \"preformatted-text-dialog\";\n\n\t\texports.fn.preformattedTextDialog = function() {\n\n            var _this       = this;\n            var cm          = this.cm;\n            var lang        = this.lang;\n\t\t\tvar editor      = this.editor;\n            var settings    = this.settings;\n            var cursor      = cm.getCursor();\n            var selection   = cm.getSelection();\n            var classPrefix = this.classPrefix;\n\t\t\tvar dialogLang  = lang.dialog.preformattedText;\n\t\t\tvar dialogName  = classPrefix + pluginName, dialog;\n\n\t\t\tcm.focus();\n\n            if (editor.find(\".\" + dialogName).length > 0)\n            {\n                dialog = editor.find(\".\" + dialogName);\n                dialog.find(\"textarea\").val(selection);\n\n                this.dialogShowMask(dialog);\n                this.dialogLockScreen();\n                dialog.show();\n            }\n            else \n            {      \n                var dialogContent = \"<textarea placeholder=\\\"coding now....\\\" style=\\\"display:none;\\\">\" + selection + \"</textarea>\";\n\n                dialog = this.createDialog({\n                    name   : dialogName,\n                    title  : dialogLang.title,\n                    width  : 780,\n                    height : 540,\n                    mask   : settings.dialogShowMask,\n                    drag   : settings.dialogDraggable,\n                    content : dialogContent,\n                    lockScreen : settings.dialogLockScreen,\n                    maskStyle  : {\n                        opacity         : settings.dialogMaskOpacity,\n                        backgroundColor : settings.dialogMaskBgColor\n                    },\n                    buttons : {\n                        enter  : [lang.buttons.enter, function() {\n                            var codeTexts  = this.find(\"textarea\").val();\n\n                            if (codeTexts === \"\")\n                            {\n                                alert(dialogLang.emptyAlert);\n                                return false;\n                            }\n\n                            codeTexts = codeTexts.split(\"\\n\");\n\n                            for (var i in codeTexts)\n                            {\n                                codeTexts[i] = \"    \" + codeTexts[i];\n                            }\n                            \n                            codeTexts = codeTexts.join(\"\\n\");\n                            \n                            if (cursor.ch !== 0) {\n                                codeTexts = \"\\r\\n\\r\\n\" + codeTexts;\n                            }\n\n                            cm.replaceSelection(codeTexts);\n\n                            this.hide().lockScreen(false).hideMask();\n\n                            return false;\n                        }],\n                        cancel : [lang.buttons.cancel, function() {                                  \n                            this.hide().lockScreen(false).hideMask();\n\n                            return false;\n                        }]\n                    }\n                });\n            }\n\t\t\n\t\t\tvar cmConfig = {\n\t\t\t\tmode                      : \"text/html\",\n\t\t\t\ttheme                     : settings.theme,\n\t\t\t\ttabSize                   : 4,\n\t\t\t\tautofocus                 : true,\n\t\t\t\tautoCloseTags             : true,\n\t\t\t\tindentUnit                : 4,\n\t\t\t\tlineNumbers               : true,\n\t\t\t\tlineWrapping              : true,\n\t\t\t\textraKeys                 : {\"Ctrl-Q\": function(cm){ cm.foldCode(cm.getCursor()); }},\n\t\t\t\tfoldGutter                : true,\n\t\t\t\tgutters                   : [\"CodeMirror-linenumbers\", \"CodeMirror-foldgutter\"],\n\t\t\t\tmatchBrackets             : true,\n\t\t\t\tindentWithTabs            : true,\n\t\t\t\tstyleActiveLine           : true,\n\t\t\t\tstyleSelectedText         : true,\n\t\t\t\tautoCloseBrackets         : true,\n\t\t\t\tshowTrailingSpace         : true,\n\t\t\t\thighlightSelectionMatches : true\n\t\t\t};\n\t\t\t\n\t\t\tvar textarea = dialog.find(\"textarea\");\n\t\t\tvar cmObj    = dialog.find(\".CodeMirror\");\n\n\t\t\tif (dialog.find(\".CodeMirror\").length < 1) \n\t\t\t{\n\t\t\t\tcmEditor = exports.$CodeMirror.fromTextArea(textarea[0], cmConfig);\n\t\t\t\tcmObj    = dialog.find(\".CodeMirror\");\n\n\t\t\t\tcmObj.css({\n\t\t\t\t\t\"float\"   : \"none\", \n\t\t\t\t\tmargin    : \"0 0 5px\",\n\t\t\t\t\tborder    : \"1px solid #ddd\",\n\t\t\t\t\tfontSize  : settings.fontSize,\n\t\t\t\t\twidth     : \"100%\",\n\t\t\t\t\theight    : \"410px\"\n\t\t\t\t});\n\n\t\t\t\tcmEditor.on(\"change\", function(cm) {\n\t\t\t\t\ttextarea.val(cm.getValue());\n\t\t\t\t});\n\t\t\t} \n\t\t\telse \n\t\t\t{\n\t\t\t\tcmEditor.setValue(cm.getSelection());\n\t\t\t}\n\t\t};\n\n\t};\n\n\t// CommonJS/Node.js\n\tif (typeof require === \"function\" && typeof exports === \"object\" && typeof module === \"object\")\n    { \n        module.exports = factory;\n    }\n\telse if (typeof define === \"function\")  // AMD/CMD/Sea.js\n    {\n\t\tif (define.amd) { // for Require.js\n\n\t\t\tdefine([\"editormd\"], function(editormd) {\n                factory(editormd);\n            });\n\n\t\t} else { // for Sea.js\n\t\t\tdefine(function(require) {\n                var editormd = require(\"./../../editormd\");\n                factory(editormd);\n            });\n\t\t}\n\t} \n\telse\n\t{\n        factory(window.editormd);\n\t}\n\n})();\n"
  },
  {
    "path": "static/editor.md/plugins/reference-link-dialog/reference-link-dialog.js",
    "content": "/*!\n * Reference link dialog plugin for Editor.md\n *\n * @file        reference-link-dialog.js\n * @author      pandao\n * @version     1.2.1\n * @updateTime  2015-06-09\n * {@link       https://github.com/pandao/editor.md}\n * @license     MIT\n */\n\n(function() {\n\n    var factory = function (exports) {\n\n\t\tvar pluginName   = \"reference-link-dialog\";\n\t\tvar ReLinkId     = 1;\n\n\t\texports.fn.referenceLinkDialog = function() {\n\n            var _this       = this;\n            var cm          = this.cm;\n            var lang        = this.lang;\n\t\t\tvar editor      = this.editor;\n            var settings    = this.settings;\n            var cursor      = cm.getCursor();\n            var selection   = cm.getSelection();\n            var dialogLang  = lang.dialog.referenceLink;\n            var classPrefix = this.classPrefix;\n\t\t\tvar dialogName  = classPrefix + pluginName, dialog;\n\n\t\t\tcm.focus();\n\n            if (editor.find(\".\" + dialogName).length < 1)\n            {      \n                var dialogHTML = \"<div class=\\\"\" + classPrefix + \"form\\\">\" +\n                                        \"<label>\" + dialogLang.name + \"</label>\" +\n                                        \"<input type=\\\"text\\\" value=\\\"[\" + ReLinkId + \"]\\\" data-name />\" +  \n                                        \"<br/>\" +\n                                        \"<label>\" + dialogLang.urlId + \"</label>\" +\n                                        \"<input type=\\\"text\\\" data-url-id />\" +\n                                        \"<br/>\" +\n                                        \"<label>\" + dialogLang.url + \"</label>\" +\n                                        \"<input type=\\\"text\\\" value=\\\"http://\\\" data-url />\" + \n                                        \"<br/>\" +\n                                        \"<label>\" + dialogLang.urlTitle + \"</label>\" +\n                                        \"<input type=\\\"text\\\" value=\\\"\" + selection + \"\\\" data-title />\" +\n                                        \"<br/>\" +\n                                    \"</div>\";\n\n                dialog = this.createDialog({   \n                    name       : dialogName,\n                    title      : dialogLang.title,\n                    width      : 380,\n                    height     : 296,\n                    content    : dialogHTML,\n                    mask       : settings.dialogShowMask,\n                    drag       : settings.dialogDraggable,\n                    lockScreen : settings.dialogLockScreen,\n                    maskStyle  : {\n                        opacity         : settings.dialogMaskOpacity,\n                        backgroundColor : settings.dialogMaskBgColor\n                    },\n                    buttons : {\n                        enter  : [lang.buttons.enter, function() {\n                            var name  = this.find(\"[data-name]\").val();\n                            var url   = this.find(\"[data-url]\").val();\n                            var rid   = this.find(\"[data-url-id]\").val();\n                            var title = this.find(\"[data-title]\").val();\n\n                            if (name === \"\")\n                            {\n                                alert(dialogLang.nameEmpty);\n                                return false;\n                            }\n\n                            if (rid === \"\")\n                            {\n                                alert(dialogLang.idEmpty);\n                                return false;\n                            }\n\n                            if (url === \"http://\" || url === \"\")\n                            {\n                                alert(dialogLang.urlEmpty);\n                                return false;\n                            }\n\n                            //cm.replaceSelection(\"[\" + title + \"][\" + name + \"]\\n[\" + name + \"]: \" + url + \"\");\n                            cm.replaceSelection(\"[\" + name + \"][\" + rid + \"]\");\n\n                            if (selection === \"\") {\n                                cm.setCursor(cursor.line, cursor.ch + 1);\n                            }\n\n\t\t\t\t\t\t\ttitle = (title === \"\") ? \"\" : \" \\\"\" + title + \"\\\"\";\n\n\t\t\t\t\t\t\tcm.setValue(cm.getValue() + \"\\n[\" + rid + \"]: \" + url + title + \"\");\n\n                            this.hide().lockScreen(false).hideMask();\n\n                            return false;\n                        }],\n                        cancel : [lang.buttons.cancel, function() {                                   \n                            this.hide().lockScreen(false).hideMask();\n\n                            return false;\n                        }]\n                    }\n                });\n            }\n\n\t\t\tdialog = editor.find(\".\" + dialogName);\n\t\t\tdialog.find(\"[data-name]\").val(\"[\" + ReLinkId + \"]\");\n\t\t\tdialog.find(\"[data-url-id]\").val(\"\");\n\t\t\tdialog.find(\"[data-url]\").val(\"http://\");\n\t\t\tdialog.find(\"[data-title]\").val(selection);\n\n\t\t\tthis.dialogShowMask(dialog);\n\t\t\tthis.dialogLockScreen();\n\t\t\tdialog.show();\n\n\t\t\tReLinkId++;\n\t\t};\n\n\t};\n    \n\t// CommonJS/Node.js\n\tif (typeof require === \"function\" && typeof exports === \"object\" && typeof module === \"object\")\n    { \n        module.exports = factory;\n    }\n\telse if (typeof define === \"function\")  // AMD/CMD/Sea.js\n    {\n\t\tif (define.amd) { // for Require.js\n\n\t\t\tdefine([\"editormd\"], function(editormd) {\n                factory(editormd);\n            });\n\n\t\t} else { // for Sea.js\n\t\t\tdefine(function(require) {\n                var editormd = require(\"./../../editormd\");\n                factory(editormd);\n            });\n\t\t}\n\t} \n\telse\n\t{\n        factory(window.editormd);\n\t}\n\n})();\n"
  },
  {
    "path": "static/editor.md/plugins/table-dialog/table-dialog.js",
    "content": "/*!\n * Table dialog plugin for Editor.md\n *\n * @file        table-dialog.js\n * @author      pandao\n * @version     1.2.1\n * @updateTime  2015-06-09\n * {@link       https://github.com/pandao/editor.md}\n * @license     MIT\n */\n\n(function() {\n\n\tvar factory = function (exports) {\n\n\t\tvar $            = jQuery;\n\t\tvar pluginName   = \"table-dialog\";\n\n\t\tvar langs = {\n\t\t\t\"zh-cn\" : {\n\t\t\t\ttoolbar : {\n\t\t\t\t\ttable : \"表格\"\n\t\t\t\t},\n\t\t\t\tdialog : {\n\t\t\t\t\ttable : {\n\t\t\t\t\t\ttitle      : \"添加表格\",\n\t\t\t\t\t\tcellsLabel : \"单元格数\",\n\t\t\t\t\t\talignLabel : \"对齐方式\",\n\t\t\t\t\t\trows       : \"行数\",\n\t\t\t\t\t\tcols       : \"列数\",\n\t\t\t\t\t\taligns     : [\"默认\", \"左对齐\", \"居中对齐\", \"右对齐\"]\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\t\t\t\"zh-tw\" : {\n\t\t\t\ttoolbar : {\n\t\t\t\t\ttable : \"添加表格\"\n\t\t\t\t},\n\t\t\t\tdialog : {\n\t\t\t\t\ttable : {\n\t\t\t\t\t\ttitle      : \"添加表格\",\n\t\t\t\t\t\tcellsLabel : \"單元格數\",\n\t\t\t\t\t\talignLabel : \"對齊方式\",\n\t\t\t\t\t\trows       : \"行數\",\n\t\t\t\t\t\tcols       : \"列數\",\n\t\t\t\t\t\taligns     : [\"默認\", \"左對齊\", \"居中對齊\", \"右對齊\"]\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\t\t\t\"en\" : {\n\t\t\t\ttoolbar : {\n\t\t\t\t\ttable : \"Tables\"\n\t\t\t\t},\n\t\t\t\tdialog : {\n\t\t\t\t\ttable : {\n\t\t\t\t\t\ttitle      : \"Tables\",\n\t\t\t\t\t\tcellsLabel : \"Cells\",\n\t\t\t\t\t\talignLabel : \"Align\",\n\t\t\t\t\t\trows       : \"Rows\",\n\t\t\t\t\t\tcols       : \"Cols\",\n\t\t\t\t\t\taligns     : [\"Default\", \"Left align\", \"Center align\", \"Right align\"]\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\texports.fn.tableDialog = function() {\n\t\t\tvar _this       = this;\n\t\t\tvar cm          = this.cm;\n\t\t\tvar editor      = this.editor;\n\t\t\tvar settings    = this.settings;\n\t\t\tvar path        = settings.path + \"../plugins/\" + pluginName +\"/\";\n\t\t\tvar classPrefix = this.classPrefix;\n\t\t\tvar dialogName  = classPrefix + pluginName, dialog;\n\n\t\t\t$.extend(true, this.lang, langs[this.lang.name]);\n\t\t\tthis.setToolbar();\n\n\t\t\tvar lang        = this.lang;\n\t\t\tvar dialogLang  = lang.dialog.table;\n\t\t\t\n\t\t\tvar dialogContent = [\n\t\t\t\t\"<div class=\\\"editormd-form\\\" style=\\\"padding: 13px 0;\\\">\",\n\t\t\t\t\"<label>\" + dialogLang.cellsLabel + \"</label>\",\n\t\t\t\tdialogLang.rows + \" <input type=\\\"number\\\" value=\\\"3\\\" class=\\\"number-input\\\" style=\\\"width:40px;\\\" max=\\\"100\\\" min=\\\"2\\\" data-rows />&nbsp;&nbsp;\",\n\t\t\t\tdialogLang.cols + \" <input type=\\\"number\\\" value=\\\"2\\\" class=\\\"number-input\\\" style=\\\"width:40px;\\\" max=\\\"100\\\" min=\\\"1\\\" data-cols /><br/>\",\n\t\t\t\t\"<label>\" + dialogLang.alignLabel + \"</label>\",\n\t\t\t\t\"<div class=\\\"fa-btns\\\"></div>\",\n\t\t\t\t\"</div>\"\n\t\t\t].join(\"\\n\");\n\n\t\t\tif (editor.find(\".\" + dialogName).length > 0) \n\t\t\t{\n                dialog = editor.find(\".\" + dialogName);\n\n\t\t\t\tthis.dialogShowMask(dialog);\n\t\t\t\tthis.dialogLockScreen();\n\t\t\t\tdialog.show();\n\t\t\t} \n\t\t\telse\n\t\t\t{\n\t\t\t\tdialog = this.createDialog({\n\t\t\t\t\tname       : dialogName,\n\t\t\t\t\ttitle      : dialogLang.title,\n\t\t\t\t\twidth      : 360,\n\t\t\t\t\theight     : 226,\n\t\t\t\t\tmask       : settings.dialogShowMask,\n\t\t\t\t\tdrag       : settings.dialogDraggable,\n\t\t\t\t\tcontent    : dialogContent,\n\t\t\t\t\tlockScreen : settings.dialogLockScreen,\n\t\t\t\t\tmaskStyle  : {\n\t\t\t\t\t\topacity         : settings.dialogMaskOpacity,\n\t\t\t\t\t\tbackgroundColor : settings.dialogMaskBgColor\n\t\t\t\t\t},\n\t\t\t\t\tbuttons    : {\n                        enter : [lang.buttons.enter, function() {\n\t\t\t\t\t\t\tvar rows   = parseInt(this.find(\"[data-rows]\").val());\n\t\t\t\t\t\t\tvar cols   = parseInt(this.find(\"[data-cols]\").val());\n\t\t\t\t\t\t\tvar align  = this.find(\"[name=\\\"table-align\\\"]:checked\").val();\n\t\t\t\t\t\t\tvar table  = \"\";\n\t\t\t\t\t\t\tvar hrLine = \"------------\";\n\n\t\t\t\t\t\t\tvar alignSign = {\n\t\t\t\t\t\t\t\t_default : hrLine,\n\t\t\t\t\t\t\t\tleft     : \":\" + hrLine,\n\t\t\t\t\t\t\t\tcenter   : \":\" + hrLine + \":\",\n\t\t\t\t\t\t\t\tright    : hrLine + \":\"\n\t\t\t\t\t\t\t};\n\n\t\t\t\t\t\t\tif ( rows > 1 && cols > 0) \n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tfor (var r = 0, len = rows; r < len; r++) \n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tvar row = [];\n\t\t\t\t\t\t\t\t\tvar head = [];\n\n\t\t\t\t\t\t\t\t\tfor (var c = 0, len2 = cols; c < len2; c++) \n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tif (r === 1) {\n\t\t\t\t\t\t\t\t\t\t\thead.push(alignSign[align]);\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\trow.push(\" \");\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\tif (r === 1) {\n\t\t\t\t\t\t\t\t\t\ttable += \"| \" + head.join(\" | \") + \" |\" + \"\\n\";\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\ttable += \"| \" + row.join( (cols === 1) ? \"\" : \" | \" ) + \" |\" + \"\\n\";\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tcm.replaceSelection(table);\n\n                            this.hide().lockScreen(false).hideMask();\n\n                            return false;\n                        }],\n\n                        cancel : [lang.buttons.cancel, function() {                                   \n                            this.hide().lockScreen(false).hideMask();\n\n                            return false;\n                        }]\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tvar faBtns = dialog.find(\".fa-btns\");\n\n\t\t\tif (faBtns.html() === \"\")\n\t\t\t{\n\t\t\t\tvar icons  = [\"align-justify\", \"align-left\", \"align-center\", \"align-right\"];\n\t\t\t\tvar _lang  = dialogLang.aligns;\n\t\t\t\tvar values = [\"_default\", \"left\", \"center\", \"right\"];\n\n\t\t\t\tfor (var i = 0, len = icons.length; i < len; i++) \n\t\t\t\t{\n\t\t\t\t\tvar checked = (i === 0) ? \" checked=\\\"checked\\\"\" : \"\";\n\t\t\t\t\tvar btn = \"<a href=\\\"javascript:;\\\"><label for=\\\"editormd-table-dialog-radio\"+i+\"\\\" title=\\\"\" + _lang[i] + \"\\\">\";\n\t\t\t\t\tbtn += \"<input type=\\\"radio\\\" name=\\\"table-align\\\" id=\\\"editormd-table-dialog-radio\"+i+\"\\\" value=\\\"\" + values[i] + \"\\\"\" +checked + \" />&nbsp;\";\n\t\t\t\t\tbtn += \"<i class=\\\"fa fa-\" + icons[i] + \"\\\"></i>\";\n\t\t\t\t\tbtn += \"</label></a>\";\n\n\t\t\t\t\tfaBtns.append(btn);\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t};\n    \n\t// CommonJS/Node.js\n\tif (typeof require === \"function\" && typeof exports === \"object\" && typeof module === \"object\")\n    { \n        module.exports = factory;\n    }\n\telse if (typeof define === \"function\")  // AMD/CMD/Sea.js\n    {\n\t\tif (define.amd) { // for Require.js\n\n\t\t\tdefine([\"editormd\"], function(editormd) {\n                factory(editormd);\n            });\n\n\t\t} else { // for Sea.js\n\t\t\tdefine(function(require) {\n                var editormd = require(\"./../../editormd\");\n                factory(editormd);\n            });\n\t\t}\n\t} \n\telse\n\t{\n        factory(window.editormd);\n\t}\n\n})();\n"
  },
  {
    "path": "static/editor.md/plugins/test-plugin/test-plugin.js",
    "content": "/*!\n * Test plugin for Editor.md\n *\n * @file        test-plugin.js\n * @author      pandao\n * @version     1.2.0\n * @updateTime  2015-03-07\n * {@link       https://github.com/pandao/editor.md}\n * @license     MIT\n */\n\n(function() {\n\n    var factory = function (exports) {\n\n\t\tvar $            = jQuery;           // if using module loader(Require.js/Sea.js).\n\n\t\texports.testPlugin = function(){\n\t\t\talert(\"testPlugin\");\n\t\t};\n\n\t\texports.fn.testPluginMethodA = function() {\n\t\t\t/*\n\t\t\tvar _this       = this; // this == the current instance object of Editor.md\n\t\t\tvar lang        = _this.lang;\n\t\t\tvar settings    = _this.settings;\n\t\t\tvar editor      = this.editor;\n\t\t\tvar cursor      = cm.getCursor();\n\t\t\tvar selection   = cm.getSelection();\n\t\t\tvar classPrefix = this.classPrefix;\n\n\t\t\tcm.focus();\n\t\t\t*/\n\t\t\t//....\n\n\t\t\talert(\"testPluginMethodA\");\n\t\t};\n\n\t};\n    \n\t// CommonJS/Node.js\n\tif (typeof require === \"function\" && typeof exports === \"object\" && typeof module === \"object\")\n    { \n        module.exports = factory;\n    }\n\telse if (typeof define === \"function\")  // AMD/CMD/Sea.js\n    {\n\t\tif (define.amd) { // for Require.js\n\n\t\t\tdefine([\"editormd\"], function(editormd) {\n                factory(editormd);\n            });\n\n\t\t} else { // for Sea.js\n\t\t\tdefine(function(require) {\n                var editormd = require(\"./../../editormd\");\n                factory(editormd);\n            });\n\t\t}\n\t} \n\telse\n\t{\n        factory(window.editormd);\n\t}\n\n})();\n"
  },
  {
    "path": "static/font-awesome/css/font-awesome.css",
    "content": "/*!\n *  Font Awesome 4.7.0 by @davegandy - http://fontawesome.io - @fontawesome\n *  License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License)\n */\n/* FONT PATH\n * -------------------------- */\n@font-face {\n  font-family: 'FontAwesome';\n  src: url('../fonts/fontawesome-webfont.eot?v=4.7.0');\n  src: url('../fonts/fontawesome-webfont.eot?#iefix&v=4.7.0') format('embedded-opentype'), url('../fonts/fontawesome-webfont.woff2?v=4.7.0') format('woff2'), url('../fonts/fontawesome-webfont.woff?v=4.7.0') format('woff'), url('../fonts/fontawesome-webfont.ttf?v=4.7.0') format('truetype'), url('../fonts/fontawesome-webfont.svg?v=4.7.0#fontawesomeregular') format('svg');\n  font-weight: normal;\n  font-style: normal;\n}\n.fa {\n  display: inline-block;\n  font: normal normal normal 14px/1 FontAwesome;\n  font-size: inherit;\n  text-rendering: auto;\n  -webkit-font-smoothing: antialiased;\n  -moz-osx-font-smoothing: grayscale;\n}\n/* makes the font 33% larger relative to the icon container */\n.fa-lg {\n  font-size: 1.33333333em;\n  line-height: 0.75em;\n  vertical-align: -15%;\n}\n.fa-2x {\n  font-size: 2em;\n}\n.fa-3x {\n  font-size: 3em;\n}\n.fa-4x {\n  font-size: 4em;\n}\n.fa-5x {\n  font-size: 5em;\n}\n.fa-fw {\n  width: 1.28571429em;\n  text-align: center;\n}\n.fa-ul {\n  padding-left: 0;\n  margin-left: 2.14285714em;\n  list-style-type: none;\n}\n.fa-ul > li {\n  position: relative;\n}\n.fa-li {\n  position: absolute;\n  left: -2.14285714em;\n  width: 2.14285714em;\n  top: 0.14285714em;\n  text-align: center;\n}\n.fa-li.fa-lg {\n  left: -1.85714286em;\n}\n.fa-border {\n  padding: .2em .25em .15em;\n  border: solid 0.08em #eeeeee;\n  border-radius: .1em;\n}\n.fa-pull-left {\n  float: left;\n}\n.fa-pull-right {\n  float: right;\n}\n.fa.fa-pull-left {\n  margin-right: .3em;\n}\n.fa.fa-pull-right {\n  margin-left: .3em;\n}\n/* Deprecated as of 4.4.0 */\n.pull-right {\n  float: right;\n}\n.pull-left {\n  float: left;\n}\n.fa.pull-left {\n  margin-right: .3em;\n}\n.fa.pull-right {\n  margin-left: .3em;\n}\n.fa-spin {\n  -webkit-animation: fa-spin 2s infinite linear;\n  animation: fa-spin 2s infinite linear;\n}\n.fa-pulse {\n  -webkit-animation: fa-spin 1s infinite steps(8);\n  animation: fa-spin 1s infinite steps(8);\n}\n@-webkit-keyframes fa-spin {\n  0% {\n    -webkit-transform: rotate(0deg);\n    transform: rotate(0deg);\n  }\n  100% {\n    -webkit-transform: rotate(359deg);\n    transform: rotate(359deg);\n  }\n}\n@keyframes fa-spin {\n  0% {\n    -webkit-transform: rotate(0deg);\n    transform: rotate(0deg);\n  }\n  100% {\n    -webkit-transform: rotate(359deg);\n    transform: rotate(359deg);\n  }\n}\n.fa-rotate-90 {\n  -ms-filter: \"progid:DXImageTransform.Microsoft.BasicImage(rotation=1)\";\n  -webkit-transform: rotate(90deg);\n  -ms-transform: rotate(90deg);\n  transform: rotate(90deg);\n}\n.fa-rotate-180 {\n  -ms-filter: \"progid:DXImageTransform.Microsoft.BasicImage(rotation=2)\";\n  -webkit-transform: rotate(180deg);\n  -ms-transform: rotate(180deg);\n  transform: rotate(180deg);\n}\n.fa-rotate-270 {\n  -ms-filter: \"progid:DXImageTransform.Microsoft.BasicImage(rotation=3)\";\n  -webkit-transform: rotate(270deg);\n  -ms-transform: rotate(270deg);\n  transform: rotate(270deg);\n}\n.fa-flip-horizontal {\n  -ms-filter: \"progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1)\";\n  -webkit-transform: scale(-1, 1);\n  -ms-transform: scale(-1, 1);\n  transform: scale(-1, 1);\n}\n.fa-flip-vertical {\n  -ms-filter: \"progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)\";\n  -webkit-transform: scale(1, -1);\n  -ms-transform: scale(1, -1);\n  transform: scale(1, -1);\n}\n:root .fa-rotate-90,\n:root .fa-rotate-180,\n:root .fa-rotate-270,\n:root .fa-flip-horizontal,\n:root .fa-flip-vertical {\n  filter: none;\n}\n.fa-stack {\n  position: relative;\n  display: inline-block;\n  width: 2em;\n  height: 2em;\n  line-height: 2em;\n  vertical-align: middle;\n}\n.fa-stack-1x,\n.fa-stack-2x {\n  position: absolute;\n  left: 0;\n  width: 100%;\n  text-align: center;\n}\n.fa-stack-1x {\n  line-height: inherit;\n}\n.fa-stack-2x {\n  font-size: 2em;\n}\n.fa-inverse {\n  color: #ffffff;\n}\n/* Font Awesome uses the Unicode Private Use Area (PUA) to ensure screen\n   readers do not read off random characters that represent icons */\n.fa-glass:before {\n  content: \"\\f000\";\n}\n.fa-music:before {\n  content: \"\\f001\";\n}\n.fa-search:before {\n  content: \"\\f002\";\n}\n.fa-envelope-o:before {\n  content: \"\\f003\";\n}\n.fa-heart:before {\n  content: \"\\f004\";\n}\n.fa-star:before {\n  content: \"\\f005\";\n}\n.fa-star-o:before {\n  content: \"\\f006\";\n}\n.fa-user:before {\n  content: \"\\f007\";\n}\n.fa-film:before {\n  content: \"\\f008\";\n}\n.fa-th-large:before {\n  content: \"\\f009\";\n}\n.fa-th:before {\n  content: \"\\f00a\";\n}\n.fa-th-list:before {\n  content: \"\\f00b\";\n}\n.fa-check:before {\n  content: \"\\f00c\";\n}\n.fa-remove:before,\n.fa-close:before,\n.fa-times:before {\n  content: \"\\f00d\";\n}\n.fa-search-plus:before {\n  content: \"\\f00e\";\n}\n.fa-search-minus:before {\n  content: \"\\f010\";\n}\n.fa-power-off:before {\n  content: \"\\f011\";\n}\n.fa-signal:before {\n  content: \"\\f012\";\n}\n.fa-gear:before,\n.fa-cog:before {\n  content: \"\\f013\";\n}\n.fa-trash-o:before {\n  content: \"\\f014\";\n}\n.fa-home:before {\n  content: \"\\f015\";\n}\n.fa-file-o:before {\n  content: \"\\f016\";\n}\n.fa-clock-o:before {\n  content: \"\\f017\";\n}\n.fa-road:before {\n  content: \"\\f018\";\n}\n.fa-download:before {\n  content: \"\\f019\";\n}\n.fa-arrow-circle-o-down:before {\n  content: \"\\f01a\";\n}\n.fa-arrow-circle-o-up:before {\n  content: \"\\f01b\";\n}\n.fa-inbox:before {\n  content: \"\\f01c\";\n}\n.fa-play-circle-o:before {\n  content: \"\\f01d\";\n}\n.fa-rotate-right:before,\n.fa-repeat:before {\n  content: \"\\f01e\";\n}\n.fa-refresh:before {\n  content: \"\\f021\";\n}\n.fa-list-alt:before {\n  content: \"\\f022\";\n}\n.fa-lock:before {\n  content: \"\\f023\";\n}\n.fa-flag:before {\n  content: \"\\f024\";\n}\n.fa-headphones:before {\n  content: \"\\f025\";\n}\n.fa-volume-off:before {\n  content: \"\\f026\";\n}\n.fa-volume-down:before {\n  content: \"\\f027\";\n}\n.fa-volume-up:before {\n  content: \"\\f028\";\n}\n.fa-qrcode:before {\n  content: \"\\f029\";\n}\n.fa-barcode:before {\n  content: \"\\f02a\";\n}\n.fa-tag:before {\n  content: \"\\f02b\";\n}\n.fa-tags:before {\n  content: \"\\f02c\";\n}\n.fa-book:before {\n  content: \"\\f02d\";\n}\n.fa-bookmark:before {\n  content: \"\\f02e\";\n}\n.fa-print:before {\n  content: \"\\f02f\";\n}\n.fa-camera:before {\n  content: \"\\f030\";\n}\n.fa-font:before {\n  content: \"\\f031\";\n}\n.fa-bold:before {\n  content: \"\\f032\";\n}\n.fa-italic:before {\n  content: \"\\f033\";\n}\n.fa-text-height:before {\n  content: \"\\f034\";\n}\n.fa-text-width:before {\n  content: \"\\f035\";\n}\n.fa-align-left:before {\n  content: \"\\f036\";\n}\n.fa-align-center:before {\n  content: \"\\f037\";\n}\n.fa-align-right:before {\n  content: \"\\f038\";\n}\n.fa-align-justify:before {\n  content: \"\\f039\";\n}\n.fa-list:before {\n  content: \"\\f03a\";\n}\n.fa-dedent:before,\n.fa-outdent:before {\n  content: \"\\f03b\";\n}\n.fa-indent:before {\n  content: \"\\f03c\";\n}\n.fa-video-camera:before {\n  content: \"\\f03d\";\n}\n.fa-photo:before,\n.fa-image:before,\n.fa-picture-o:before {\n  content: \"\\f03e\";\n}\n.fa-pencil:before {\n  content: \"\\f040\";\n}\n.fa-map-marker:before {\n  content: \"\\f041\";\n}\n.fa-adjust:before {\n  content: \"\\f042\";\n}\n.fa-tint:before {\n  content: \"\\f043\";\n}\n.fa-edit:before,\n.fa-pencil-square-o:before {\n  content: \"\\f044\";\n}\n.fa-share-square-o:before {\n  content: \"\\f045\";\n}\n.fa-check-square-o:before {\n  content: \"\\f046\";\n}\n.fa-arrows:before {\n  content: \"\\f047\";\n}\n.fa-step-backward:before {\n  content: \"\\f048\";\n}\n.fa-fast-backward:before {\n  content: \"\\f049\";\n}\n.fa-backward:before {\n  content: \"\\f04a\";\n}\n.fa-play:before {\n  content: \"\\f04b\";\n}\n.fa-pause:before {\n  content: \"\\f04c\";\n}\n.fa-stop:before {\n  content: \"\\f04d\";\n}\n.fa-forward:before {\n  content: \"\\f04e\";\n}\n.fa-fast-forward:before {\n  content: \"\\f050\";\n}\n.fa-step-forward:before {\n  content: \"\\f051\";\n}\n.fa-eject:before {\n  content: \"\\f052\";\n}\n.fa-chevron-left:before {\n  content: \"\\f053\";\n}\n.fa-chevron-right:before {\n  content: \"\\f054\";\n}\n.fa-plus-circle:before {\n  content: \"\\f055\";\n}\n.fa-minus-circle:before {\n  content: \"\\f056\";\n}\n.fa-times-circle:before {\n  content: \"\\f057\";\n}\n.fa-check-circle:before {\n  content: \"\\f058\";\n}\n.fa-question-circle:before {\n  content: \"\\f059\";\n}\n.fa-info-circle:before {\n  content: \"\\f05a\";\n}\n.fa-crosshairs:before {\n  content: \"\\f05b\";\n}\n.fa-times-circle-o:before {\n  content: \"\\f05c\";\n}\n.fa-check-circle-o:before {\n  content: \"\\f05d\";\n}\n.fa-ban:before {\n  content: \"\\f05e\";\n}\n.fa-arrow-left:before {\n  content: \"\\f060\";\n}\n.fa-arrow-right:before {\n  content: \"\\f061\";\n}\n.fa-arrow-up:before {\n  content: \"\\f062\";\n}\n.fa-arrow-down:before {\n  content: \"\\f063\";\n}\n.fa-mail-forward:before,\n.fa-share:before {\n  content: \"\\f064\";\n}\n.fa-expand:before {\n  content: \"\\f065\";\n}\n.fa-compress:before {\n  content: \"\\f066\";\n}\n.fa-plus:before {\n  content: \"\\f067\";\n}\n.fa-minus:before {\n  content: \"\\f068\";\n}\n.fa-asterisk:before {\n  content: \"\\f069\";\n}\n.fa-exclamation-circle:before {\n  content: \"\\f06a\";\n}\n.fa-gift:before {\n  content: \"\\f06b\";\n}\n.fa-leaf:before {\n  content: \"\\f06c\";\n}\n.fa-fire:before {\n  content: \"\\f06d\";\n}\n.fa-eye:before {\n  content: \"\\f06e\";\n}\n.fa-eye-slash:before {\n  content: \"\\f070\";\n}\n.fa-warning:before,\n.fa-exclamation-triangle:before {\n  content: \"\\f071\";\n}\n.fa-plane:before {\n  content: \"\\f072\";\n}\n.fa-calendar:before {\n  content: \"\\f073\";\n}\n.fa-random:before {\n  content: \"\\f074\";\n}\n.fa-comment:before {\n  content: \"\\f075\";\n}\n.fa-magnet:before {\n  content: \"\\f076\";\n}\n.fa-chevron-up:before {\n  content: \"\\f077\";\n}\n.fa-chevron-down:before {\n  content: \"\\f078\";\n}\n.fa-retweet:before {\n  content: \"\\f079\";\n}\n.fa-shopping-cart:before {\n  content: \"\\f07a\";\n}\n.fa-folder:before {\n  content: \"\\f07b\";\n}\n.fa-folder-open:before {\n  content: \"\\f07c\";\n}\n.fa-arrows-v:before {\n  content: \"\\f07d\";\n}\n.fa-arrows-h:before {\n  content: \"\\f07e\";\n}\n.fa-bar-chart-o:before,\n.fa-bar-chart:before {\n  content: \"\\f080\";\n}\n.fa-twitter-square:before {\n  content: \"\\f081\";\n}\n.fa-facebook-square:before {\n  content: \"\\f082\";\n}\n.fa-camera-retro:before {\n  content: \"\\f083\";\n}\n.fa-key:before {\n  content: \"\\f084\";\n}\n.fa-gears:before,\n.fa-cogs:before {\n  content: \"\\f085\";\n}\n.fa-comments:before {\n  content: \"\\f086\";\n}\n.fa-thumbs-o-up:before {\n  content: \"\\f087\";\n}\n.fa-thumbs-o-down:before {\n  content: \"\\f088\";\n}\n.fa-star-half:before {\n  content: \"\\f089\";\n}\n.fa-heart-o:before {\n  content: \"\\f08a\";\n}\n.fa-sign-out:before {\n  content: \"\\f08b\";\n}\n.fa-linkedin-square:before {\n  content: \"\\f08c\";\n}\n.fa-thumb-tack:before {\n  content: \"\\f08d\";\n}\n.fa-external-link:before {\n  content: \"\\f08e\";\n}\n.fa-sign-in:before {\n  content: \"\\f090\";\n}\n.fa-trophy:before {\n  content: \"\\f091\";\n}\n.fa-github-square:before {\n  content: \"\\f092\";\n}\n.fa-upload:before {\n  content: \"\\f093\";\n}\n.fa-lemon-o:before {\n  content: \"\\f094\";\n}\n.fa-phone:before {\n  content: \"\\f095\";\n}\n.fa-square-o:before {\n  content: \"\\f096\";\n}\n.fa-bookmark-o:before {\n  content: \"\\f097\";\n}\n.fa-phone-square:before {\n  content: \"\\f098\";\n}\n.fa-twitter:before {\n  content: \"\\f099\";\n}\n.fa-facebook-f:before,\n.fa-facebook:before {\n  content: \"\\f09a\";\n}\n.fa-github:before {\n  content: \"\\f09b\";\n}\n.fa-unlock:before {\n  content: \"\\f09c\";\n}\n.fa-credit-card:before {\n  content: \"\\f09d\";\n}\n.fa-feed:before,\n.fa-rss:before {\n  content: \"\\f09e\";\n}\n.fa-hdd-o:before {\n  content: \"\\f0a0\";\n}\n.fa-bullhorn:before {\n  content: \"\\f0a1\";\n}\n.fa-bell:before {\n  content: \"\\f0f3\";\n}\n.fa-certificate:before {\n  content: \"\\f0a3\";\n}\n.fa-hand-o-right:before {\n  content: \"\\f0a4\";\n}\n.fa-hand-o-left:before {\n  content: \"\\f0a5\";\n}\n.fa-hand-o-up:before {\n  content: \"\\f0a6\";\n}\n.fa-hand-o-down:before {\n  content: \"\\f0a7\";\n}\n.fa-arrow-circle-left:before {\n  content: \"\\f0a8\";\n}\n.fa-arrow-circle-right:before {\n  content: \"\\f0a9\";\n}\n.fa-arrow-circle-up:before {\n  content: \"\\f0aa\";\n}\n.fa-arrow-circle-down:before {\n  content: \"\\f0ab\";\n}\n.fa-globe:before {\n  content: \"\\f0ac\";\n}\n.fa-wrench:before {\n  content: \"\\f0ad\";\n}\n.fa-tasks:before {\n  content: \"\\f0ae\";\n}\n.fa-filter:before {\n  content: \"\\f0b0\";\n}\n.fa-briefcase:before {\n  content: \"\\f0b1\";\n}\n.fa-arrows-alt:before {\n  content: \"\\f0b2\";\n}\n.fa-group:before,\n.fa-users:before {\n  content: \"\\f0c0\";\n}\n.fa-chain:before,\n.fa-link:before {\n  content: \"\\f0c1\";\n}\n.fa-cloud:before {\n  content: \"\\f0c2\";\n}\n.fa-flask:before {\n  content: \"\\f0c3\";\n}\n.fa-cut:before,\n.fa-scissors:before {\n  content: \"\\f0c4\";\n}\n.fa-copy:before,\n.fa-files-o:before {\n  content: \"\\f0c5\";\n}\n.fa-paperclip:before {\n  content: \"\\f0c6\";\n}\n.fa-save:before,\n.fa-floppy-o:before {\n  content: \"\\f0c7\";\n}\n.fa-square:before {\n  content: \"\\f0c8\";\n}\n.fa-navicon:before,\n.fa-reorder:before,\n.fa-bars:before {\n  content: \"\\f0c9\";\n}\n.fa-list-ul:before {\n  content: \"\\f0ca\";\n}\n.fa-list-ol:before {\n  content: \"\\f0cb\";\n}\n.fa-strikethrough:before {\n  content: \"\\f0cc\";\n}\n.fa-underline:before {\n  content: \"\\f0cd\";\n}\n.fa-table:before {\n  content: \"\\f0ce\";\n}\n.fa-magic:before {\n  content: \"\\f0d0\";\n}\n.fa-truck:before {\n  content: \"\\f0d1\";\n}\n.fa-pinterest:before {\n  content: \"\\f0d2\";\n}\n.fa-pinterest-square:before {\n  content: \"\\f0d3\";\n}\n.fa-google-plus-square:before {\n  content: \"\\f0d4\";\n}\n.fa-google-plus:before {\n  content: \"\\f0d5\";\n}\n.fa-money:before {\n  content: \"\\f0d6\";\n}\n.fa-caret-down:before {\n  content: \"\\f0d7\";\n}\n.fa-caret-up:before {\n  content: \"\\f0d8\";\n}\n.fa-caret-left:before {\n  content: \"\\f0d9\";\n}\n.fa-caret-right:before {\n  content: \"\\f0da\";\n}\n.fa-columns:before {\n  content: \"\\f0db\";\n}\n.fa-unsorted:before,\n.fa-sort:before {\n  content: \"\\f0dc\";\n}\n.fa-sort-down:before,\n.fa-sort-desc:before {\n  content: \"\\f0dd\";\n}\n.fa-sort-up:before,\n.fa-sort-asc:before {\n  content: \"\\f0de\";\n}\n.fa-envelope:before {\n  content: \"\\f0e0\";\n}\n.fa-linkedin:before {\n  content: \"\\f0e1\";\n}\n.fa-rotate-left:before,\n.fa-undo:before {\n  content: \"\\f0e2\";\n}\n.fa-legal:before,\n.fa-gavel:before {\n  content: \"\\f0e3\";\n}\n.fa-dashboard:before,\n.fa-tachometer:before {\n  content: \"\\f0e4\";\n}\n.fa-comment-o:before {\n  content: \"\\f0e5\";\n}\n.fa-comments-o:before {\n  content: \"\\f0e6\";\n}\n.fa-flash:before,\n.fa-bolt:before {\n  content: \"\\f0e7\";\n}\n.fa-sitemap:before {\n  content: \"\\f0e8\";\n}\n.fa-umbrella:before {\n  content: \"\\f0e9\";\n}\n.fa-paste:before,\n.fa-clipboard:before {\n  content: \"\\f0ea\";\n}\n.fa-lightbulb-o:before {\n  content: \"\\f0eb\";\n}\n.fa-exchange:before {\n  content: \"\\f0ec\";\n}\n.fa-cloud-download:before {\n  content: \"\\f0ed\";\n}\n.fa-cloud-upload:before {\n  content: \"\\f0ee\";\n}\n.fa-user-md:before {\n  content: \"\\f0f0\";\n}\n.fa-stethoscope:before {\n  content: \"\\f0f1\";\n}\n.fa-suitcase:before {\n  content: \"\\f0f2\";\n}\n.fa-bell-o:before {\n  content: \"\\f0a2\";\n}\n.fa-coffee:before {\n  content: \"\\f0f4\";\n}\n.fa-cutlery:before {\n  content: \"\\f0f5\";\n}\n.fa-file-text-o:before {\n  content: \"\\f0f6\";\n}\n.fa-building-o:before {\n  content: \"\\f0f7\";\n}\n.fa-hospital-o:before {\n  content: \"\\f0f8\";\n}\n.fa-ambulance:before {\n  content: \"\\f0f9\";\n}\n.fa-medkit:before {\n  content: \"\\f0fa\";\n}\n.fa-fighter-jet:before {\n  content: \"\\f0fb\";\n}\n.fa-beer:before {\n  content: \"\\f0fc\";\n}\n.fa-h-square:before {\n  content: \"\\f0fd\";\n}\n.fa-plus-square:before {\n  content: \"\\f0fe\";\n}\n.fa-angle-double-left:before {\n  content: \"\\f100\";\n}\n.fa-angle-double-right:before {\n  content: \"\\f101\";\n}\n.fa-angle-double-up:before {\n  content: \"\\f102\";\n}\n.fa-angle-double-down:before {\n  content: \"\\f103\";\n}\n.fa-angle-left:before {\n  content: \"\\f104\";\n}\n.fa-angle-right:before {\n  content: \"\\f105\";\n}\n.fa-angle-up:before {\n  content: \"\\f106\";\n}\n.fa-angle-down:before {\n  content: \"\\f107\";\n}\n.fa-desktop:before {\n  content: \"\\f108\";\n}\n.fa-laptop:before {\n  content: \"\\f109\";\n}\n.fa-tablet:before {\n  content: \"\\f10a\";\n}\n.fa-mobile-phone:before,\n.fa-mobile:before {\n  content: \"\\f10b\";\n}\n.fa-circle-o:before {\n  content: \"\\f10c\";\n}\n.fa-quote-left:before {\n  content: \"\\f10d\";\n}\n.fa-quote-right:before {\n  content: \"\\f10e\";\n}\n.fa-spinner:before {\n  content: \"\\f110\";\n}\n.fa-circle:before {\n  content: \"\\f111\";\n}\n.fa-mail-reply:before,\n.fa-reply:before {\n  content: \"\\f112\";\n}\n.fa-github-alt:before {\n  content: \"\\f113\";\n}\n.fa-folder-o:before {\n  content: \"\\f114\";\n}\n.fa-folder-open-o:before {\n  content: \"\\f115\";\n}\n.fa-smile-o:before {\n  content: \"\\f118\";\n}\n.fa-frown-o:before {\n  content: \"\\f119\";\n}\n.fa-meh-o:before {\n  content: \"\\f11a\";\n}\n.fa-gamepad:before {\n  content: \"\\f11b\";\n}\n.fa-keyboard-o:before {\n  content: \"\\f11c\";\n}\n.fa-flag-o:before {\n  content: \"\\f11d\";\n}\n.fa-flag-checkered:before {\n  content: \"\\f11e\";\n}\n.fa-terminal:before {\n  content: \"\\f120\";\n}\n.fa-code:before {\n  content: \"\\f121\";\n}\n.fa-mail-reply-all:before,\n.fa-reply-all:before {\n  content: \"\\f122\";\n}\n.fa-star-half-empty:before,\n.fa-star-half-full:before,\n.fa-star-half-o:before {\n  content: \"\\f123\";\n}\n.fa-location-arrow:before {\n  content: \"\\f124\";\n}\n.fa-crop:before {\n  content: \"\\f125\";\n}\n.fa-code-fork:before {\n  content: \"\\f126\";\n}\n.fa-unlink:before,\n.fa-chain-broken:before {\n  content: \"\\f127\";\n}\n.fa-question:before {\n  content: \"\\f128\";\n}\n.fa-info:before {\n  content: \"\\f129\";\n}\n.fa-exclamation:before {\n  content: \"\\f12a\";\n}\n.fa-superscript:before {\n  content: \"\\f12b\";\n}\n.fa-subscript:before {\n  content: \"\\f12c\";\n}\n.fa-eraser:before {\n  content: \"\\f12d\";\n}\n.fa-puzzle-piece:before {\n  content: \"\\f12e\";\n}\n.fa-microphone:before {\n  content: \"\\f130\";\n}\n.fa-microphone-slash:before {\n  content: \"\\f131\";\n}\n.fa-shield:before {\n  content: \"\\f132\";\n}\n.fa-calendar-o:before {\n  content: \"\\f133\";\n}\n.fa-fire-extinguisher:before {\n  content: \"\\f134\";\n}\n.fa-rocket:before {\n  content: \"\\f135\";\n}\n.fa-maxcdn:before {\n  content: \"\\f136\";\n}\n.fa-chevron-circle-left:before {\n  content: \"\\f137\";\n}\n.fa-chevron-circle-right:before {\n  content: \"\\f138\";\n}\n.fa-chevron-circle-up:before {\n  content: \"\\f139\";\n}\n.fa-chevron-circle-down:before {\n  content: \"\\f13a\";\n}\n.fa-html5:before {\n  content: \"\\f13b\";\n}\n.fa-css3:before {\n  content: \"\\f13c\";\n}\n.fa-anchor:before {\n  content: \"\\f13d\";\n}\n.fa-unlock-alt:before {\n  content: \"\\f13e\";\n}\n.fa-bullseye:before {\n  content: \"\\f140\";\n}\n.fa-ellipsis-h:before {\n  content: \"\\f141\";\n}\n.fa-ellipsis-v:before {\n  content: \"\\f142\";\n}\n.fa-rss-square:before {\n  content: \"\\f143\";\n}\n.fa-play-circle:before {\n  content: \"\\f144\";\n}\n.fa-ticket:before {\n  content: \"\\f145\";\n}\n.fa-minus-square:before {\n  content: \"\\f146\";\n}\n.fa-minus-square-o:before {\n  content: \"\\f147\";\n}\n.fa-level-up:before {\n  content: \"\\f148\";\n}\n.fa-level-down:before {\n  content: \"\\f149\";\n}\n.fa-check-square:before {\n  content: \"\\f14a\";\n}\n.fa-pencil-square:before {\n  content: \"\\f14b\";\n}\n.fa-external-link-square:before {\n  content: \"\\f14c\";\n}\n.fa-share-square:before {\n  content: \"\\f14d\";\n}\n.fa-compass:before {\n  content: \"\\f14e\";\n}\n.fa-toggle-down:before,\n.fa-caret-square-o-down:before {\n  content: \"\\f150\";\n}\n.fa-toggle-up:before,\n.fa-caret-square-o-up:before {\n  content: \"\\f151\";\n}\n.fa-toggle-right:before,\n.fa-caret-square-o-right:before {\n  content: \"\\f152\";\n}\n.fa-euro:before,\n.fa-eur:before {\n  content: \"\\f153\";\n}\n.fa-gbp:before {\n  content: \"\\f154\";\n}\n.fa-dollar:before,\n.fa-usd:before {\n  content: \"\\f155\";\n}\n.fa-rupee:before,\n.fa-inr:before {\n  content: \"\\f156\";\n}\n.fa-cny:before,\n.fa-rmb:before,\n.fa-yen:before,\n.fa-jpy:before {\n  content: \"\\f157\";\n}\n.fa-ruble:before,\n.fa-rouble:before,\n.fa-rub:before {\n  content: \"\\f158\";\n}\n.fa-won:before,\n.fa-krw:before {\n  content: \"\\f159\";\n}\n.fa-bitcoin:before,\n.fa-btc:before {\n  content: \"\\f15a\";\n}\n.fa-file:before {\n  content: \"\\f15b\";\n}\n.fa-file-text:before {\n  content: \"\\f15c\";\n}\n.fa-sort-alpha-asc:before {\n  content: \"\\f15d\";\n}\n.fa-sort-alpha-desc:before {\n  content: \"\\f15e\";\n}\n.fa-sort-amount-asc:before {\n  content: \"\\f160\";\n}\n.fa-sort-amount-desc:before {\n  content: \"\\f161\";\n}\n.fa-sort-numeric-asc:before {\n  content: \"\\f162\";\n}\n.fa-sort-numeric-desc:before {\n  content: \"\\f163\";\n}\n.fa-thumbs-up:before {\n  content: \"\\f164\";\n}\n.fa-thumbs-down:before {\n  content: \"\\f165\";\n}\n.fa-youtube-square:before {\n  content: \"\\f166\";\n}\n.fa-youtube:before {\n  content: \"\\f167\";\n}\n.fa-xing:before {\n  content: \"\\f168\";\n}\n.fa-xing-square:before {\n  content: \"\\f169\";\n}\n.fa-youtube-play:before {\n  content: \"\\f16a\";\n}\n.fa-dropbox:before {\n  content: \"\\f16b\";\n}\n.fa-stack-overflow:before {\n  content: \"\\f16c\";\n}\n.fa-instagram:before {\n  content: \"\\f16d\";\n}\n.fa-flickr:before {\n  content: \"\\f16e\";\n}\n.fa-adn:before {\n  content: \"\\f170\";\n}\n.fa-bitbucket:before {\n  content: \"\\f171\";\n}\n.fa-bitbucket-square:before {\n  content: \"\\f172\";\n}\n.fa-tumblr:before {\n  content: \"\\f173\";\n}\n.fa-tumblr-square:before {\n  content: \"\\f174\";\n}\n.fa-long-arrow-down:before {\n  content: \"\\f175\";\n}\n.fa-long-arrow-up:before {\n  content: \"\\f176\";\n}\n.fa-long-arrow-left:before {\n  content: \"\\f177\";\n}\n.fa-long-arrow-right:before {\n  content: \"\\f178\";\n}\n.fa-apple:before {\n  content: \"\\f179\";\n}\n.fa-windows:before {\n  content: \"\\f17a\";\n}\n.fa-android:before {\n  content: \"\\f17b\";\n}\n.fa-linux:before {\n  content: \"\\f17c\";\n}\n.fa-dribbble:before {\n  content: \"\\f17d\";\n}\n.fa-skype:before {\n  content: \"\\f17e\";\n}\n.fa-foursquare:before {\n  content: \"\\f180\";\n}\n.fa-trello:before {\n  content: \"\\f181\";\n}\n.fa-female:before {\n  content: \"\\f182\";\n}\n.fa-male:before {\n  content: \"\\f183\";\n}\n.fa-gittip:before,\n.fa-gratipay:before {\n  content: \"\\f184\";\n}\n.fa-sun-o:before {\n  content: \"\\f185\";\n}\n.fa-moon-o:before {\n  content: \"\\f186\";\n}\n.fa-archive:before {\n  content: \"\\f187\";\n}\n.fa-bug:before {\n  content: \"\\f188\";\n}\n.fa-vk:before {\n  content: \"\\f189\";\n}\n.fa-weibo:before {\n  content: \"\\f18a\";\n}\n.fa-renren:before {\n  content: \"\\f18b\";\n}\n.fa-pagelines:before {\n  content: \"\\f18c\";\n}\n.fa-stack-exchange:before {\n  content: \"\\f18d\";\n}\n.fa-arrow-circle-o-right:before {\n  content: \"\\f18e\";\n}\n.fa-arrow-circle-o-left:before {\n  content: \"\\f190\";\n}\n.fa-toggle-left:before,\n.fa-caret-square-o-left:before {\n  content: \"\\f191\";\n}\n.fa-dot-circle-o:before {\n  content: \"\\f192\";\n}\n.fa-wheelchair:before {\n  content: \"\\f193\";\n}\n.fa-vimeo-square:before {\n  content: \"\\f194\";\n}\n.fa-turkish-lira:before,\n.fa-try:before {\n  content: \"\\f195\";\n}\n.fa-plus-square-o:before {\n  content: \"\\f196\";\n}\n.fa-space-shuttle:before {\n  content: \"\\f197\";\n}\n.fa-slack:before {\n  content: \"\\f198\";\n}\n.fa-envelope-square:before {\n  content: \"\\f199\";\n}\n.fa-wordpress:before {\n  content: \"\\f19a\";\n}\n.fa-openid:before {\n  content: \"\\f19b\";\n}\n.fa-institution:before,\n.fa-bank:before,\n.fa-university:before {\n  content: \"\\f19c\";\n}\n.fa-mortar-board:before,\n.fa-graduation-cap:before {\n  content: \"\\f19d\";\n}\n.fa-yahoo:before {\n  content: \"\\f19e\";\n}\n.fa-google:before {\n  content: \"\\f1a0\";\n}\n.fa-reddit:before {\n  content: \"\\f1a1\";\n}\n.fa-reddit-square:before {\n  content: \"\\f1a2\";\n}\n.fa-stumbleupon-circle:before {\n  content: \"\\f1a3\";\n}\n.fa-stumbleupon:before {\n  content: \"\\f1a4\";\n}\n.fa-delicious:before {\n  content: \"\\f1a5\";\n}\n.fa-digg:before {\n  content: \"\\f1a6\";\n}\n.fa-pied-piper-pp:before {\n  content: \"\\f1a7\";\n}\n.fa-pied-piper-alt:before {\n  content: \"\\f1a8\";\n}\n.fa-drupal:before {\n  content: \"\\f1a9\";\n}\n.fa-joomla:before {\n  content: \"\\f1aa\";\n}\n.fa-language:before {\n  content: \"\\f1ab\";\n}\n.fa-fax:before {\n  content: \"\\f1ac\";\n}\n.fa-building:before {\n  content: \"\\f1ad\";\n}\n.fa-child:before {\n  content: \"\\f1ae\";\n}\n.fa-paw:before {\n  content: \"\\f1b0\";\n}\n.fa-spoon:before {\n  content: \"\\f1b1\";\n}\n.fa-cube:before {\n  content: \"\\f1b2\";\n}\n.fa-cubes:before {\n  content: \"\\f1b3\";\n}\n.fa-behance:before {\n  content: \"\\f1b4\";\n}\n.fa-behance-square:before {\n  content: \"\\f1b5\";\n}\n.fa-steam:before {\n  content: \"\\f1b6\";\n}\n.fa-steam-square:before {\n  content: \"\\f1b7\";\n}\n.fa-recycle:before {\n  content: \"\\f1b8\";\n}\n.fa-automobile:before,\n.fa-car:before {\n  content: \"\\f1b9\";\n}\n.fa-cab:before,\n.fa-taxi:before {\n  content: \"\\f1ba\";\n}\n.fa-tree:before {\n  content: \"\\f1bb\";\n}\n.fa-spotify:before {\n  content: \"\\f1bc\";\n}\n.fa-deviantart:before {\n  content: \"\\f1bd\";\n}\n.fa-soundcloud:before {\n  content: \"\\f1be\";\n}\n.fa-database:before {\n  content: \"\\f1c0\";\n}\n.fa-file-pdf-o:before {\n  content: \"\\f1c1\";\n}\n.fa-file-word-o:before {\n  content: \"\\f1c2\";\n}\n.fa-file-excel-o:before {\n  content: \"\\f1c3\";\n}\n.fa-file-powerpoint-o:before {\n  content: \"\\f1c4\";\n}\n.fa-file-photo-o:before,\n.fa-file-picture-o:before,\n.fa-file-image-o:before {\n  content: \"\\f1c5\";\n}\n.fa-file-zip-o:before,\n.fa-file-archive-o:before {\n  content: \"\\f1c6\";\n}\n.fa-file-sound-o:before,\n.fa-file-audio-o:before {\n  content: \"\\f1c7\";\n}\n.fa-file-movie-o:before,\n.fa-file-video-o:before {\n  content: \"\\f1c8\";\n}\n.fa-file-code-o:before {\n  content: \"\\f1c9\";\n}\n.fa-vine:before {\n  content: \"\\f1ca\";\n}\n.fa-codepen:before {\n  content: \"\\f1cb\";\n}\n.fa-jsfiddle:before {\n  content: \"\\f1cc\";\n}\n.fa-life-bouy:before,\n.fa-life-buoy:before,\n.fa-life-saver:before,\n.fa-support:before,\n.fa-life-ring:before {\n  content: \"\\f1cd\";\n}\n.fa-circle-o-notch:before {\n  content: \"\\f1ce\";\n}\n.fa-ra:before,\n.fa-resistance:before,\n.fa-rebel:before {\n  content: \"\\f1d0\";\n}\n.fa-ge:before,\n.fa-empire:before {\n  content: \"\\f1d1\";\n}\n.fa-git-square:before {\n  content: \"\\f1d2\";\n}\n.fa-git:before {\n  content: \"\\f1d3\";\n}\n.fa-y-combinator-square:before,\n.fa-yc-square:before,\n.fa-hacker-news:before {\n  content: \"\\f1d4\";\n}\n.fa-tencent-weibo:before {\n  content: \"\\f1d5\";\n}\n.fa-qq:before {\n  content: \"\\f1d6\";\n}\n.fa-wechat:before,\n.fa-weixin:before {\n  content: \"\\f1d7\";\n}\n.fa-send:before,\n.fa-paper-plane:before {\n  content: \"\\f1d8\";\n}\n.fa-send-o:before,\n.fa-paper-plane-o:before {\n  content: \"\\f1d9\";\n}\n.fa-history:before {\n  content: \"\\f1da\";\n}\n.fa-circle-thin:before {\n  content: \"\\f1db\";\n}\n.fa-header:before {\n  content: \"\\f1dc\";\n}\n.fa-paragraph:before {\n  content: \"\\f1dd\";\n}\n.fa-sliders:before {\n  content: \"\\f1de\";\n}\n.fa-share-alt:before {\n  content: \"\\f1e0\";\n}\n.fa-share-alt-square:before {\n  content: \"\\f1e1\";\n}\n.fa-bomb:before {\n  content: \"\\f1e2\";\n}\n.fa-soccer-ball-o:before,\n.fa-futbol-o:before {\n  content: \"\\f1e3\";\n}\n.fa-tty:before {\n  content: \"\\f1e4\";\n}\n.fa-binoculars:before {\n  content: \"\\f1e5\";\n}\n.fa-plug:before {\n  content: \"\\f1e6\";\n}\n.fa-slideshare:before {\n  content: \"\\f1e7\";\n}\n.fa-twitch:before {\n  content: \"\\f1e8\";\n}\n.fa-yelp:before {\n  content: \"\\f1e9\";\n}\n.fa-newspaper-o:before {\n  content: \"\\f1ea\";\n}\n.fa-wifi:before {\n  content: \"\\f1eb\";\n}\n.fa-calculator:before {\n  content: \"\\f1ec\";\n}\n.fa-paypal:before {\n  content: \"\\f1ed\";\n}\n.fa-google-wallet:before {\n  content: \"\\f1ee\";\n}\n.fa-cc-visa:before {\n  content: \"\\f1f0\";\n}\n.fa-cc-mastercard:before {\n  content: \"\\f1f1\";\n}\n.fa-cc-discover:before {\n  content: \"\\f1f2\";\n}\n.fa-cc-amex:before {\n  content: \"\\f1f3\";\n}\n.fa-cc-paypal:before {\n  content: \"\\f1f4\";\n}\n.fa-cc-stripe:before {\n  content: \"\\f1f5\";\n}\n.fa-bell-slash:before {\n  content: \"\\f1f6\";\n}\n.fa-bell-slash-o:before {\n  content: \"\\f1f7\";\n}\n.fa-trash:before {\n  content: \"\\f1f8\";\n}\n.fa-copyright:before {\n  content: \"\\f1f9\";\n}\n.fa-at:before {\n  content: \"\\f1fa\";\n}\n.fa-eyedropper:before {\n  content: \"\\f1fb\";\n}\n.fa-paint-brush:before {\n  content: \"\\f1fc\";\n}\n.fa-birthday-cake:before {\n  content: \"\\f1fd\";\n}\n.fa-area-chart:before {\n  content: \"\\f1fe\";\n}\n.fa-pie-chart:before {\n  content: \"\\f200\";\n}\n.fa-line-chart:before {\n  content: \"\\f201\";\n}\n.fa-lastfm:before {\n  content: \"\\f202\";\n}\n.fa-lastfm-square:before {\n  content: \"\\f203\";\n}\n.fa-toggle-off:before {\n  content: \"\\f204\";\n}\n.fa-toggle-on:before {\n  content: \"\\f205\";\n}\n.fa-bicycle:before {\n  content: \"\\f206\";\n}\n.fa-bus:before {\n  content: \"\\f207\";\n}\n.fa-ioxhost:before {\n  content: \"\\f208\";\n}\n.fa-angellist:before {\n  content: \"\\f209\";\n}\n.fa-cc:before {\n  content: \"\\f20a\";\n}\n.fa-shekel:before,\n.fa-sheqel:before,\n.fa-ils:before {\n  content: \"\\f20b\";\n}\n.fa-meanpath:before {\n  content: \"\\f20c\";\n}\n.fa-buysellads:before {\n  content: \"\\f20d\";\n}\n.fa-connectdevelop:before {\n  content: \"\\f20e\";\n}\n.fa-dashcube:before {\n  content: \"\\f210\";\n}\n.fa-forumbee:before {\n  content: \"\\f211\";\n}\n.fa-leanpub:before {\n  content: \"\\f212\";\n}\n.fa-sellsy:before {\n  content: \"\\f213\";\n}\n.fa-shirtsinbulk:before {\n  content: \"\\f214\";\n}\n.fa-simplybuilt:before {\n  content: \"\\f215\";\n}\n.fa-skyatlas:before {\n  content: \"\\f216\";\n}\n.fa-cart-plus:before {\n  content: \"\\f217\";\n}\n.fa-cart-arrow-down:before {\n  content: \"\\f218\";\n}\n.fa-diamond:before {\n  content: \"\\f219\";\n}\n.fa-ship:before {\n  content: \"\\f21a\";\n}\n.fa-user-secret:before {\n  content: \"\\f21b\";\n}\n.fa-motorcycle:before {\n  content: \"\\f21c\";\n}\n.fa-street-view:before {\n  content: \"\\f21d\";\n}\n.fa-heartbeat:before {\n  content: \"\\f21e\";\n}\n.fa-venus:before {\n  content: \"\\f221\";\n}\n.fa-mars:before {\n  content: \"\\f222\";\n}\n.fa-mercury:before {\n  content: \"\\f223\";\n}\n.fa-intersex:before,\n.fa-transgender:before {\n  content: \"\\f224\";\n}\n.fa-transgender-alt:before {\n  content: \"\\f225\";\n}\n.fa-venus-double:before {\n  content: \"\\f226\";\n}\n.fa-mars-double:before {\n  content: \"\\f227\";\n}\n.fa-venus-mars:before {\n  content: \"\\f228\";\n}\n.fa-mars-stroke:before {\n  content: \"\\f229\";\n}\n.fa-mars-stroke-v:before {\n  content: \"\\f22a\";\n}\n.fa-mars-stroke-h:before {\n  content: \"\\f22b\";\n}\n.fa-neuter:before {\n  content: \"\\f22c\";\n}\n.fa-genderless:before {\n  content: \"\\f22d\";\n}\n.fa-facebook-official:before {\n  content: \"\\f230\";\n}\n.fa-pinterest-p:before {\n  content: \"\\f231\";\n}\n.fa-whatsapp:before {\n  content: \"\\f232\";\n}\n.fa-server:before {\n  content: \"\\f233\";\n}\n.fa-user-plus:before {\n  content: \"\\f234\";\n}\n.fa-user-times:before {\n  content: \"\\f235\";\n}\n.fa-hotel:before,\n.fa-bed:before {\n  content: \"\\f236\";\n}\n.fa-viacoin:before {\n  content: \"\\f237\";\n}\n.fa-train:before {\n  content: \"\\f238\";\n}\n.fa-subway:before {\n  content: \"\\f239\";\n}\n.fa-medium:before {\n  content: \"\\f23a\";\n}\n.fa-yc:before,\n.fa-y-combinator:before {\n  content: \"\\f23b\";\n}\n.fa-optin-monster:before {\n  content: \"\\f23c\";\n}\n.fa-opencart:before {\n  content: \"\\f23d\";\n}\n.fa-expeditedssl:before {\n  content: \"\\f23e\";\n}\n.fa-battery-4:before,\n.fa-battery:before,\n.fa-battery-full:before {\n  content: \"\\f240\";\n}\n.fa-battery-3:before,\n.fa-battery-three-quarters:before {\n  content: \"\\f241\";\n}\n.fa-battery-2:before,\n.fa-battery-half:before {\n  content: \"\\f242\";\n}\n.fa-battery-1:before,\n.fa-battery-quarter:before {\n  content: \"\\f243\";\n}\n.fa-battery-0:before,\n.fa-battery-empty:before {\n  content: \"\\f244\";\n}\n.fa-mouse-pointer:before {\n  content: \"\\f245\";\n}\n.fa-i-cursor:before {\n  content: \"\\f246\";\n}\n.fa-object-group:before {\n  content: \"\\f247\";\n}\n.fa-object-ungroup:before {\n  content: \"\\f248\";\n}\n.fa-sticky-note:before {\n  content: \"\\f249\";\n}\n.fa-sticky-note-o:before {\n  content: \"\\f24a\";\n}\n.fa-cc-jcb:before {\n  content: \"\\f24b\";\n}\n.fa-cc-diners-club:before {\n  content: \"\\f24c\";\n}\n.fa-clone:before {\n  content: \"\\f24d\";\n}\n.fa-balance-scale:before {\n  content: \"\\f24e\";\n}\n.fa-hourglass-o:before {\n  content: \"\\f250\";\n}\n.fa-hourglass-1:before,\n.fa-hourglass-start:before {\n  content: \"\\f251\";\n}\n.fa-hourglass-2:before,\n.fa-hourglass-half:before {\n  content: \"\\f252\";\n}\n.fa-hourglass-3:before,\n.fa-hourglass-end:before {\n  content: \"\\f253\";\n}\n.fa-hourglass:before {\n  content: \"\\f254\";\n}\n.fa-hand-grab-o:before,\n.fa-hand-rock-o:before {\n  content: \"\\f255\";\n}\n.fa-hand-stop-o:before,\n.fa-hand-paper-o:before {\n  content: \"\\f256\";\n}\n.fa-hand-scissors-o:before {\n  content: \"\\f257\";\n}\n.fa-hand-lizard-o:before {\n  content: \"\\f258\";\n}\n.fa-hand-spock-o:before {\n  content: \"\\f259\";\n}\n.fa-hand-pointer-o:before {\n  content: \"\\f25a\";\n}\n.fa-hand-peace-o:before {\n  content: \"\\f25b\";\n}\n.fa-trademark:before {\n  content: \"\\f25c\";\n}\n.fa-registered:before {\n  content: \"\\f25d\";\n}\n.fa-creative-commons:before {\n  content: \"\\f25e\";\n}\n.fa-gg:before {\n  content: \"\\f260\";\n}\n.fa-gg-circle:before {\n  content: \"\\f261\";\n}\n.fa-tripadvisor:before {\n  content: \"\\f262\";\n}\n.fa-odnoklassniki:before {\n  content: \"\\f263\";\n}\n.fa-odnoklassniki-square:before {\n  content: \"\\f264\";\n}\n.fa-get-pocket:before {\n  content: \"\\f265\";\n}\n.fa-wikipedia-w:before {\n  content: \"\\f266\";\n}\n.fa-safari:before {\n  content: \"\\f267\";\n}\n.fa-chrome:before {\n  content: \"\\f268\";\n}\n.fa-firefox:before {\n  content: \"\\f269\";\n}\n.fa-opera:before {\n  content: \"\\f26a\";\n}\n.fa-internet-explorer:before {\n  content: \"\\f26b\";\n}\n.fa-tv:before,\n.fa-television:before {\n  content: \"\\f26c\";\n}\n.fa-contao:before {\n  content: \"\\f26d\";\n}\n.fa-500px:before {\n  content: \"\\f26e\";\n}\n.fa-amazon:before {\n  content: \"\\f270\";\n}\n.fa-calendar-plus-o:before {\n  content: \"\\f271\";\n}\n.fa-calendar-minus-o:before {\n  content: \"\\f272\";\n}\n.fa-calendar-times-o:before {\n  content: \"\\f273\";\n}\n.fa-calendar-check-o:before {\n  content: \"\\f274\";\n}\n.fa-industry:before {\n  content: \"\\f275\";\n}\n.fa-map-pin:before {\n  content: \"\\f276\";\n}\n.fa-map-signs:before {\n  content: \"\\f277\";\n}\n.fa-map-o:before {\n  content: \"\\f278\";\n}\n.fa-map:before {\n  content: \"\\f279\";\n}\n.fa-commenting:before {\n  content: \"\\f27a\";\n}\n.fa-commenting-o:before {\n  content: \"\\f27b\";\n}\n.fa-houzz:before {\n  content: \"\\f27c\";\n}\n.fa-vimeo:before {\n  content: \"\\f27d\";\n}\n.fa-black-tie:before {\n  content: \"\\f27e\";\n}\n.fa-fonticons:before {\n  content: \"\\f280\";\n}\n.fa-reddit-alien:before {\n  content: \"\\f281\";\n}\n.fa-edge:before {\n  content: \"\\f282\";\n}\n.fa-credit-card-alt:before {\n  content: \"\\f283\";\n}\n.fa-codiepie:before {\n  content: \"\\f284\";\n}\n.fa-modx:before {\n  content: \"\\f285\";\n}\n.fa-fort-awesome:before {\n  content: \"\\f286\";\n}\n.fa-usb:before {\n  content: \"\\f287\";\n}\n.fa-product-hunt:before {\n  content: \"\\f288\";\n}\n.fa-mixcloud:before {\n  content: \"\\f289\";\n}\n.fa-scribd:before {\n  content: \"\\f28a\";\n}\n.fa-pause-circle:before {\n  content: \"\\f28b\";\n}\n.fa-pause-circle-o:before {\n  content: \"\\f28c\";\n}\n.fa-stop-circle:before {\n  content: \"\\f28d\";\n}\n.fa-stop-circle-o:before {\n  content: \"\\f28e\";\n}\n.fa-shopping-bag:before {\n  content: \"\\f290\";\n}\n.fa-shopping-basket:before {\n  content: \"\\f291\";\n}\n.fa-hashtag:before {\n  content: \"\\f292\";\n}\n.fa-bluetooth:before {\n  content: \"\\f293\";\n}\n.fa-bluetooth-b:before {\n  content: \"\\f294\";\n}\n.fa-percent:before {\n  content: \"\\f295\";\n}\n.fa-gitlab:before {\n  content: \"\\f296\";\n}\n.fa-wpbeginner:before {\n  content: \"\\f297\";\n}\n.fa-wpforms:before {\n  content: \"\\f298\";\n}\n.fa-envira:before {\n  content: \"\\f299\";\n}\n.fa-universal-access:before {\n  content: \"\\f29a\";\n}\n.fa-wheelchair-alt:before {\n  content: \"\\f29b\";\n}\n.fa-question-circle-o:before {\n  content: \"\\f29c\";\n}\n.fa-blind:before {\n  content: \"\\f29d\";\n}\n.fa-audio-description:before {\n  content: \"\\f29e\";\n}\n.fa-volume-control-phone:before {\n  content: \"\\f2a0\";\n}\n.fa-braille:before {\n  content: \"\\f2a1\";\n}\n.fa-assistive-listening-systems:before {\n  content: \"\\f2a2\";\n}\n.fa-asl-interpreting:before,\n.fa-american-sign-language-interpreting:before {\n  content: \"\\f2a3\";\n}\n.fa-deafness:before,\n.fa-hard-of-hearing:before,\n.fa-deaf:before {\n  content: \"\\f2a4\";\n}\n.fa-glide:before {\n  content: \"\\f2a5\";\n}\n.fa-glide-g:before {\n  content: \"\\f2a6\";\n}\n.fa-signing:before,\n.fa-sign-language:before {\n  content: \"\\f2a7\";\n}\n.fa-low-vision:before {\n  content: \"\\f2a8\";\n}\n.fa-viadeo:before {\n  content: \"\\f2a9\";\n}\n.fa-viadeo-square:before {\n  content: \"\\f2aa\";\n}\n.fa-snapchat:before {\n  content: \"\\f2ab\";\n}\n.fa-snapchat-ghost:before {\n  content: \"\\f2ac\";\n}\n.fa-snapchat-square:before {\n  content: \"\\f2ad\";\n}\n.fa-pied-piper:before {\n  content: \"\\f2ae\";\n}\n.fa-first-order:before {\n  content: \"\\f2b0\";\n}\n.fa-yoast:before {\n  content: \"\\f2b1\";\n}\n.fa-themeisle:before {\n  content: \"\\f2b2\";\n}\n.fa-google-plus-circle:before,\n.fa-google-plus-official:before {\n  content: \"\\f2b3\";\n}\n.fa-fa:before,\n.fa-font-awesome:before {\n  content: \"\\f2b4\";\n}\n.fa-handshake-o:before {\n  content: \"\\f2b5\";\n}\n.fa-envelope-open:before {\n  content: \"\\f2b6\";\n}\n.fa-envelope-open-o:before {\n  content: \"\\f2b7\";\n}\n.fa-linode:before {\n  content: \"\\f2b8\";\n}\n.fa-address-book:before {\n  content: \"\\f2b9\";\n}\n.fa-address-book-o:before {\n  content: \"\\f2ba\";\n}\n.fa-vcard:before,\n.fa-address-card:before {\n  content: \"\\f2bb\";\n}\n.fa-vcard-o:before,\n.fa-address-card-o:before {\n  content: \"\\f2bc\";\n}\n.fa-user-circle:before {\n  content: \"\\f2bd\";\n}\n.fa-user-circle-o:before {\n  content: \"\\f2be\";\n}\n.fa-user-o:before {\n  content: \"\\f2c0\";\n}\n.fa-id-badge:before {\n  content: \"\\f2c1\";\n}\n.fa-drivers-license:before,\n.fa-id-card:before {\n  content: \"\\f2c2\";\n}\n.fa-drivers-license-o:before,\n.fa-id-card-o:before {\n  content: \"\\f2c3\";\n}\n.fa-quora:before {\n  content: \"\\f2c4\";\n}\n.fa-free-code-camp:before {\n  content: \"\\f2c5\";\n}\n.fa-telegram:before {\n  content: \"\\f2c6\";\n}\n.fa-thermometer-4:before,\n.fa-thermometer:before,\n.fa-thermometer-full:before {\n  content: \"\\f2c7\";\n}\n.fa-thermometer-3:before,\n.fa-thermometer-three-quarters:before {\n  content: \"\\f2c8\";\n}\n.fa-thermometer-2:before,\n.fa-thermometer-half:before {\n  content: \"\\f2c9\";\n}\n.fa-thermometer-1:before,\n.fa-thermometer-quarter:before {\n  content: \"\\f2ca\";\n}\n.fa-thermometer-0:before,\n.fa-thermometer-empty:before {\n  content: \"\\f2cb\";\n}\n.fa-shower:before {\n  content: \"\\f2cc\";\n}\n.fa-bathtub:before,\n.fa-s15:before,\n.fa-bath:before {\n  content: \"\\f2cd\";\n}\n.fa-podcast:before {\n  content: \"\\f2ce\";\n}\n.fa-window-maximize:before {\n  content: \"\\f2d0\";\n}\n.fa-window-minimize:before {\n  content: \"\\f2d1\";\n}\n.fa-window-restore:before {\n  content: \"\\f2d2\";\n}\n.fa-times-rectangle:before,\n.fa-window-close:before {\n  content: \"\\f2d3\";\n}\n.fa-times-rectangle-o:before,\n.fa-window-close-o:before {\n  content: \"\\f2d4\";\n}\n.fa-bandcamp:before {\n  content: \"\\f2d5\";\n}\n.fa-grav:before {\n  content: \"\\f2d6\";\n}\n.fa-etsy:before {\n  content: \"\\f2d7\";\n}\n.fa-imdb:before {\n  content: \"\\f2d8\";\n}\n.fa-ravelry:before {\n  content: \"\\f2d9\";\n}\n.fa-eercast:before {\n  content: \"\\f2da\";\n}\n.fa-microchip:before {\n  content: \"\\f2db\";\n}\n.fa-snowflake-o:before {\n  content: \"\\f2dc\";\n}\n.fa-superpowers:before {\n  content: \"\\f2dd\";\n}\n.fa-wpexplorer:before {\n  content: \"\\f2de\";\n}\n.fa-meetup:before {\n  content: \"\\f2e0\";\n}\n.sr-only {\n  position: absolute;\n  width: 1px;\n  height: 1px;\n  padding: 0;\n  margin: -1px;\n  overflow: hidden;\n  clip: rect(0, 0, 0, 0);\n  border: 0;\n}\n.sr-only-focusable:active,\n.sr-only-focusable:focus {\n  position: static;\n  width: auto;\n  height: auto;\n  margin: 0;\n  overflow: visible;\n  clip: auto;\n}\n"
  },
  {
    "path": "static/fonts/lato-100.css",
    "content": "/* latin-ext */\n@font-face {\n    font-family: 'Lato';\n    font-style: normal;\n    font-weight: 100;\n    src: local('Lato Hairline'), local('Lato-Hairline'), url(lato/v11/eFRpvGLEW31oiexbYNx7Y_esZW2xOQ-xsNqO47m55DA.woff2) format('woff2');\n    unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF;\n}\n/* latin */\n@font-face {\n    font-family: 'Lato';\n    font-style: normal;\n    font-weight: 100;\n    src: local('Lato Hairline'), local('Lato-Hairline'), url(lato/v11/GtRkRNTnri0g82CjKnEB0Q.woff2) format('woff2');\n    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215;\n}"
  },
  {
    "path": "static/fonts/notosans.css",
    "content": "/* cyrillic-ext */\n@font-face {\n    font-family: 'Noto Sans';\n    font-style: normal;\n    font-weight: 400;\n    src: local('Noto Sans'), local('NotoSans'), url(notosans/v6/C7bP6N8yXZ-PGLzbFLtQKRJtnKITppOI_IvcXXDNrsc.woff2) format('woff2');\n    unicode-range: U+0460-052F, U+20B4, U+2DE0-2DFF, U+A640-A69F;\n}\n/* cyrillic */\n@font-face {\n    font-family: 'Noto Sans';\n    font-style: normal;\n    font-weight: 400;\n    src: local('Noto Sans'), local('NotoSans'), url(notosans/v6/iLJc6PpCnnbQjYc1Jq4v0xJtnKITppOI_IvcXXDNrsc.woff2) format('woff2');\n    unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;\n}\n/* devanagari */\n@font-face {\n    font-family: 'Noto Sans';\n    font-style: normal;\n    font-weight: 400;\n    src: local('Noto Sans'), local('NotoSans'), url(notosans/v6/5pCv5Yz4eMu9gmvX8nNhfRJtnKITppOI_IvcXXDNrsc.woff2) format('woff2');\n    unicode-range: U+02BC, U+0900-097F, U+1CD0-1CF6, U+1CF8-1CF9, U+200B-200D, U+20A8, U+20B9, U+25CC, U+A830-A839, U+A8E0-A8FB;\n}\n/* greek-ext */\n@font-face {\n    font-family: 'Noto Sans';\n    font-style: normal;\n    font-weight: 400;\n    src: local('Noto Sans'), local('NotoSans'), url(notosans/v6/gEkd0pn-sMtQ_P4HUpi6WBJtnKITppOI_IvcXXDNrsc.woff2) format('woff2');\n    unicode-range: U+1F00-1FFF;\n}\n/* greek */\n@font-face {\n    font-family: 'Noto Sans';\n    font-style: normal;\n    font-weight: 400;\n    src: local('Noto Sans'), local('NotoSans'), url(notosans/v6/iPF-u8L1qkTPHaKjvXERnxJtnKITppOI_IvcXXDNrsc.woff2) format('woff2');\n    unicode-range: U+0370-03FF;\n}\n/* vietnamese */\n@font-face {\n    font-family: 'Noto Sans';\n    font-style: normal;\n    font-weight: 400;\n    src: local('Noto Sans'), local('NotoSans'), url(notosans/v6/mTzVK0-EJOCaJiOPeaz-hxJtnKITppOI_IvcXXDNrsc.woff2) format('woff2');\n    unicode-range: U+0102-0103, U+1EA0-1EF9, U+20AB;\n}\n/* latin-ext */\n@font-face {\n    font-family: 'Noto Sans';\n    font-style: normal;\n    font-weight: 400;\n    src: local('Noto Sans'), local('NotoSans'), url(notosans/v6/erE3KsIWUumgD1j_Ca-V-xJtnKITppOI_IvcXXDNrsc.woff2) format('woff2');\n    unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF;\n}\n/* latin */\n@font-face {\n    font-family: 'Noto Sans';\n    font-style: normal;\n    font-weight: 400;\n    src: local('Noto Sans'), local('NotoSans'), url(notosans/v6/LeFlHvsZjXu2c3ZRgBq9nFtXRa8TVwTICgirnJhmVJw.woff2) format('woff2');\n    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215;\n}\n/* cyrillic-ext */\n@font-face {\n    font-family: 'Noto Sans';\n    font-style: normal;\n    font-weight: 700;\n    src: local('Noto Sans Bold'), local('NotoSans-Bold'), url(notosans/v6/PIbvSEyHEdL91QLOQRnZ16-j2U0lmluP9RWlSytm3ho.woff2) format('woff2');\n    unicode-range: U+0460-052F, U+20B4, U+2DE0-2DFF, U+A640-A69F;\n}\n/* cyrillic */\n@font-face {\n    font-family: 'Noto Sans';\n    font-style: normal;\n    font-weight: 700;\n    src: local('Noto Sans Bold'), local('NotoSans-Bold'), url(notosans/v6/PIbvSEyHEdL91QLOQRnZ15X5f-9o1vgP2EXwfjgl7AY.woff2) format('woff2');\n    unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;\n}\n/* devanagari */\n@font-face {\n    font-family: 'Noto Sans';\n    font-style: normal;\n    font-weight: 700;\n    src: local('Noto Sans Bold'), local('NotoSans-Bold'), url(notosans/v6/PIbvSEyHEdL91QLOQRnZ10Tj6bCwSDA5u__Fbjwz3f0.woff2) format('woff2');\n    unicode-range: U+02BC, U+0900-097F, U+1CD0-1CF6, U+1CF8-1CF9, U+200B-200D, U+20A8, U+20B9, U+25CC, U+A830-A839, U+A8E0-A8FB;\n}\n/* greek-ext */\n@font-face {\n    font-family: 'Noto Sans';\n    font-style: normal;\n    font-weight: 700;\n    src: local('Noto Sans Bold'), local('NotoSans-Bold'), url(notosans/v6/PIbvSEyHEdL91QLOQRnZ1xWV49_lSm1NYrwo-zkhivY.woff2) format('woff2');\n    unicode-range: U+1F00-1FFF;\n}\n/* greek */\n@font-face {\n    font-family: 'Noto Sans';\n    font-style: normal;\n    font-weight: 700;\n    src: local('Noto Sans Bold'), local('NotoSans-Bold'), url(notosans/v6/PIbvSEyHEdL91QLOQRnZ16aRobkAwv3vxw3jMhVENGA.woff2) format('woff2');\n    unicode-range: U+0370-03FF;\n}\n/* vietnamese */\n@font-face {\n    font-family: 'Noto Sans';\n    font-style: normal;\n    font-weight: 700;\n    src: local('Noto Sans Bold'), local('NotoSans-Bold'), url(notosans/v6/PIbvSEyHEdL91QLOQRnZ1_8zf_FOSsgRmwsS7Aa9k2w.woff2) format('woff2');\n    unicode-range: U+0102-0103, U+1EA0-1EF9, U+20AB;\n}\n/* latin-ext */\n@font-face {\n    font-family: 'Noto Sans';\n    font-style: normal;\n    font-weight: 700;\n    src: local('Noto Sans Bold'), local('NotoSans-Bold'), url(notosans/v6/PIbvSEyHEdL91QLOQRnZ1z0LW-43aMEzIO6XUTLjad8.woff2) format('woff2');\n    unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF;\n}\n/* latin */\n@font-face {\n    font-family: 'Noto Sans';\n    font-style: normal;\n    font-weight: 700;\n    src: local('Noto Sans Bold'), local('NotoSans-Bold'), url(notosans/v6/PIbvSEyHEdL91QLOQRnZ1-gdm0LZdjqr5-oayXSOefg.woff2) format('woff2');\n    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215;\n}"
  },
  {
    "path": "static/jquery/1.12.4/jquery.js",
    "content": "/*!\n * jQuery JavaScript Library v1.12.4\n * http://jquery.com/\n *\n * Includes Sizzle.js\n * http://sizzlejs.com/\n *\n * Copyright jQuery Foundation and other contributors\n * Released under the MIT license\n * http://jquery.org/license\n *\n * Date: 2016-05-20T17:17Z\n */\n\n(function( global, factory ) {\n\n\tif ( typeof module === \"object\" && typeof module.exports === \"object\" ) {\n\t\t// For CommonJS and CommonJS-like environments where a proper `window`\n\t\t// is present, execute the factory and get jQuery.\n\t\t// For environments that do not have a `window` with a `document`\n\t\t// (such as Node.js), expose a factory as module.exports.\n\t\t// This accentuates the need for the creation of a real `window`.\n\t\t// e.g. var jQuery = require(\"jquery\")(window);\n\t\t// See ticket #14549 for more info.\n\t\tmodule.exports = global.document ?\n\t\t\tfactory( global, true ) :\n\t\t\tfunction( w ) {\n\t\t\t\tif ( !w.document ) {\n\t\t\t\t\tthrow new Error( \"jQuery requires a window with a document\" );\n\t\t\t\t}\n\t\t\t\treturn factory( w );\n\t\t\t};\n\t} else {\n\t\tfactory( global );\n\t}\n\n// Pass this if window is not defined yet\n}(typeof window !== \"undefined\" ? window : this, function( window, noGlobal ) {\n\n// Support: Firefox 18+\n// Can't be in strict mode, several libs including ASP.NET trace\n// the stack via arguments.caller.callee and Firefox dies if\n// you try to trace through \"use strict\" call chains. (#13335)\n//\"use strict\";\nvar deletedIds = [];\n\nvar document = window.document;\n\nvar slice = deletedIds.slice;\n\nvar concat = deletedIds.concat;\n\nvar push = deletedIds.push;\n\nvar indexOf = deletedIds.indexOf;\n\nvar class2type = {};\n\nvar toString = class2type.toString;\n\nvar hasOwn = class2type.hasOwnProperty;\n\nvar support = {};\n\n\n\nvar\n\tversion = \"1.12.4\",\n\n\t// Define a local copy of jQuery\n\tjQuery = function( selector, context ) {\n\n\t\t// The jQuery object is actually just the init constructor 'enhanced'\n\t\t// Need init if jQuery is called (just allow error to be thrown if not included)\n\t\treturn new jQuery.fn.init( selector, context );\n\t},\n\n\t// Support: Android<4.1, IE<9\n\t// Make sure we trim BOM and NBSP\n\trtrim = /^[\\s\\uFEFF\\xA0]+|[\\s\\uFEFF\\xA0]+$/g,\n\n\t// Matches dashed string for camelizing\n\trmsPrefix = /^-ms-/,\n\trdashAlpha = /-([\\da-z])/gi,\n\n\t// Used by jQuery.camelCase as callback to replace()\n\tfcamelCase = function( all, letter ) {\n\t\treturn letter.toUpperCase();\n\t};\n\njQuery.fn = jQuery.prototype = {\n\n\t// The current version of jQuery being used\n\tjquery: version,\n\n\tconstructor: jQuery,\n\n\t// Start with an empty selector\n\tselector: \"\",\n\n\t// The default length of a jQuery object is 0\n\tlength: 0,\n\n\ttoArray: function() {\n\t\treturn slice.call( this );\n\t},\n\n\t// Get the Nth element in the matched element set OR\n\t// Get the whole matched element set as a clean array\n\tget: function( num ) {\n\t\treturn num != null ?\n\n\t\t\t// Return just the one element from the set\n\t\t\t( num < 0 ? this[ num + this.length ] : this[ num ] ) :\n\n\t\t\t// Return all the elements in a clean array\n\t\t\tslice.call( this );\n\t},\n\n\t// Take an array of elements and push it onto the stack\n\t// (returning the new matched element set)\n\tpushStack: function( elems ) {\n\n\t\t// Build a new jQuery matched element set\n\t\tvar ret = jQuery.merge( this.constructor(), elems );\n\n\t\t// Add the old object onto the stack (as a reference)\n\t\tret.prevObject = this;\n\t\tret.context = this.context;\n\n\t\t// Return the newly-formed element set\n\t\treturn ret;\n\t},\n\n\t// Execute a callback for every element in the matched set.\n\teach: function( callback ) {\n\t\treturn jQuery.each( this, callback );\n\t},\n\n\tmap: function( callback ) {\n\t\treturn this.pushStack( jQuery.map( this, function( elem, i ) {\n\t\t\treturn callback.call( elem, i, elem );\n\t\t} ) );\n\t},\n\n\tslice: function() {\n\t\treturn this.pushStack( slice.apply( this, arguments ) );\n\t},\n\n\tfirst: function() {\n\t\treturn this.eq( 0 );\n\t},\n\n\tlast: function() {\n\t\treturn this.eq( -1 );\n\t},\n\n\teq: function( i ) {\n\t\tvar len = this.length,\n\t\t\tj = +i + ( i < 0 ? len : 0 );\n\t\treturn this.pushStack( j >= 0 && j < len ? [ this[ j ] ] : [] );\n\t},\n\n\tend: function() {\n\t\treturn this.prevObject || this.constructor();\n\t},\n\n\t// For internal use only.\n\t// Behaves like an Array's method, not like a jQuery method.\n\tpush: push,\n\tsort: deletedIds.sort,\n\tsplice: deletedIds.splice\n};\n\njQuery.extend = jQuery.fn.extend = function() {\n\tvar src, copyIsArray, copy, name, options, clone,\n\t\ttarget = arguments[ 0 ] || {},\n\t\ti = 1,\n\t\tlength = arguments.length,\n\t\tdeep = false;\n\n\t// Handle a deep copy situation\n\tif ( typeof target === \"boolean\" ) {\n\t\tdeep = target;\n\n\t\t// skip the boolean and the target\n\t\ttarget = arguments[ i ] || {};\n\t\ti++;\n\t}\n\n\t// Handle case when target is a string or something (possible in deep copy)\n\tif ( typeof target !== \"object\" && !jQuery.isFunction( target ) ) {\n\t\ttarget = {};\n\t}\n\n\t// extend jQuery itself if only one argument is passed\n\tif ( i === length ) {\n\t\ttarget = this;\n\t\ti--;\n\t}\n\n\tfor ( ; i < length; i++ ) {\n\n\t\t// Only deal with non-null/undefined values\n\t\tif ( ( options = arguments[ i ] ) != null ) {\n\n\t\t\t// Extend the base object\n\t\t\tfor ( name in options ) {\n\t\t\t\tsrc = target[ name ];\n\t\t\t\tcopy = options[ name ];\n\n\t\t\t\t// Prevent never-ending loop\n\t\t\t\tif ( target === copy ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t// Recurse if we're merging plain objects or arrays\n\t\t\t\tif ( deep && copy && ( jQuery.isPlainObject( copy ) ||\n\t\t\t\t\t( copyIsArray = jQuery.isArray( copy ) ) ) ) {\n\n\t\t\t\t\tif ( copyIsArray ) {\n\t\t\t\t\t\tcopyIsArray = false;\n\t\t\t\t\t\tclone = src && jQuery.isArray( src ) ? src : [];\n\n\t\t\t\t\t} else {\n\t\t\t\t\t\tclone = src && jQuery.isPlainObject( src ) ? src : {};\n\t\t\t\t\t}\n\n\t\t\t\t\t// Never move original objects, clone them\n\t\t\t\t\ttarget[ name ] = jQuery.extend( deep, clone, copy );\n\n\t\t\t\t// Don't bring in undefined values\n\t\t\t\t} else if ( copy !== undefined ) {\n\t\t\t\t\ttarget[ name ] = copy;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// Return the modified object\n\treturn target;\n};\n\njQuery.extend( {\n\n\t// Unique for each copy of jQuery on the page\n\texpando: \"jQuery\" + ( version + Math.random() ).replace( /\\D/g, \"\" ),\n\n\t// Assume jQuery is ready without the ready module\n\tisReady: true,\n\n\terror: function( msg ) {\n\t\tthrow new Error( msg );\n\t},\n\n\tnoop: function() {},\n\n\t// See test/unit/core.js for details concerning isFunction.\n\t// Since version 1.3, DOM methods and functions like alert\n\t// aren't supported. They return false on IE (#2968).\n\tisFunction: function( obj ) {\n\t\treturn jQuery.type( obj ) === \"function\";\n\t},\n\n\tisArray: Array.isArray || function( obj ) {\n\t\treturn jQuery.type( obj ) === \"array\";\n\t},\n\n\tisWindow: function( obj ) {\n\t\t/* jshint eqeqeq: false */\n\t\treturn obj != null && obj == obj.window;\n\t},\n\n\tisNumeric: function( obj ) {\n\n\t\t// parseFloat NaNs numeric-cast false positives (null|true|false|\"\")\n\t\t// ...but misinterprets leading-number strings, particularly hex literals (\"0x...\")\n\t\t// subtraction forces infinities to NaN\n\t\t// adding 1 corrects loss of precision from parseFloat (#15100)\n\t\tvar realStringObj = obj && obj.toString();\n\t\treturn !jQuery.isArray( obj ) && ( realStringObj - parseFloat( realStringObj ) + 1 ) >= 0;\n\t},\n\n\tisEmptyObject: function( obj ) {\n\t\tvar name;\n\t\tfor ( name in obj ) {\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t},\n\n\tisPlainObject: function( obj ) {\n\t\tvar key;\n\n\t\t// Must be an Object.\n\t\t// Because of IE, we also have to check the presence of the constructor property.\n\t\t// Make sure that DOM nodes and window objects don't pass through, as well\n\t\tif ( !obj || jQuery.type( obj ) !== \"object\" || obj.nodeType || jQuery.isWindow( obj ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\ttry {\n\n\t\t\t// Not own constructor property must be Object\n\t\t\tif ( obj.constructor &&\n\t\t\t\t!hasOwn.call( obj, \"constructor\" ) &&\n\t\t\t\t!hasOwn.call( obj.constructor.prototype, \"isPrototypeOf\" ) ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t} catch ( e ) {\n\n\t\t\t// IE8,9 Will throw exceptions on certain host objects #9897\n\t\t\treturn false;\n\t\t}\n\n\t\t// Support: IE<9\n\t\t// Handle iteration over inherited properties before own properties.\n\t\tif ( !support.ownFirst ) {\n\t\t\tfor ( key in obj ) {\n\t\t\t\treturn hasOwn.call( obj, key );\n\t\t\t}\n\t\t}\n\n\t\t// Own properties are enumerated firstly, so to speed up,\n\t\t// if last one is own, then all properties are own.\n\t\tfor ( key in obj ) {}\n\n\t\treturn key === undefined || hasOwn.call( obj, key );\n\t},\n\n\ttype: function( obj ) {\n\t\tif ( obj == null ) {\n\t\t\treturn obj + \"\";\n\t\t}\n\t\treturn typeof obj === \"object\" || typeof obj === \"function\" ?\n\t\t\tclass2type[ toString.call( obj ) ] || \"object\" :\n\t\t\ttypeof obj;\n\t},\n\n\t// Workarounds based on findings by Jim Driscoll\n\t// http://weblogs.java.net/blog/driscoll/archive/2009/09/08/eval-javascript-global-context\n\tglobalEval: function( data ) {\n\t\tif ( data && jQuery.trim( data ) ) {\n\n\t\t\t// We use execScript on Internet Explorer\n\t\t\t// We use an anonymous function so that context is window\n\t\t\t// rather than jQuery in Firefox\n\t\t\t( window.execScript || function( data ) {\n\t\t\t\twindow[ \"eval\" ].call( window, data ); // jscs:ignore requireDotNotation\n\t\t\t} )( data );\n\t\t}\n\t},\n\n\t// Convert dashed to camelCase; used by the css and data modules\n\t// Microsoft forgot to hump their vendor prefix (#9572)\n\tcamelCase: function( string ) {\n\t\treturn string.replace( rmsPrefix, \"ms-\" ).replace( rdashAlpha, fcamelCase );\n\t},\n\n\tnodeName: function( elem, name ) {\n\t\treturn elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase();\n\t},\n\n\teach: function( obj, callback ) {\n\t\tvar length, i = 0;\n\n\t\tif ( isArrayLike( obj ) ) {\n\t\t\tlength = obj.length;\n\t\t\tfor ( ; i < length; i++ ) {\n\t\t\t\tif ( callback.call( obj[ i ], i, obj[ i ] ) === false ) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tfor ( i in obj ) {\n\t\t\t\tif ( callback.call( obj[ i ], i, obj[ i ] ) === false ) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn obj;\n\t},\n\n\t// Support: Android<4.1, IE<9\n\ttrim: function( text ) {\n\t\treturn text == null ?\n\t\t\t\"\" :\n\t\t\t( text + \"\" ).replace( rtrim, \"\" );\n\t},\n\n\t// results is for internal usage only\n\tmakeArray: function( arr, results ) {\n\t\tvar ret = results || [];\n\n\t\tif ( arr != null ) {\n\t\t\tif ( isArrayLike( Object( arr ) ) ) {\n\t\t\t\tjQuery.merge( ret,\n\t\t\t\t\ttypeof arr === \"string\" ?\n\t\t\t\t\t[ arr ] : arr\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\tpush.call( ret, arr );\n\t\t\t}\n\t\t}\n\n\t\treturn ret;\n\t},\n\n\tinArray: function( elem, arr, i ) {\n\t\tvar len;\n\n\t\tif ( arr ) {\n\t\t\tif ( indexOf ) {\n\t\t\t\treturn indexOf.call( arr, elem, i );\n\t\t\t}\n\n\t\t\tlen = arr.length;\n\t\t\ti = i ? i < 0 ? Math.max( 0, len + i ) : i : 0;\n\n\t\t\tfor ( ; i < len; i++ ) {\n\n\t\t\t\t// Skip accessing in sparse arrays\n\t\t\t\tif ( i in arr && arr[ i ] === elem ) {\n\t\t\t\t\treturn i;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn -1;\n\t},\n\n\tmerge: function( first, second ) {\n\t\tvar len = +second.length,\n\t\t\tj = 0,\n\t\t\ti = first.length;\n\n\t\twhile ( j < len ) {\n\t\t\tfirst[ i++ ] = second[ j++ ];\n\t\t}\n\n\t\t// Support: IE<9\n\t\t// Workaround casting of .length to NaN on otherwise arraylike objects (e.g., NodeLists)\n\t\tif ( len !== len ) {\n\t\t\twhile ( second[ j ] !== undefined ) {\n\t\t\t\tfirst[ i++ ] = second[ j++ ];\n\t\t\t}\n\t\t}\n\n\t\tfirst.length = i;\n\n\t\treturn first;\n\t},\n\n\tgrep: function( elems, callback, invert ) {\n\t\tvar callbackInverse,\n\t\t\tmatches = [],\n\t\t\ti = 0,\n\t\t\tlength = elems.length,\n\t\t\tcallbackExpect = !invert;\n\n\t\t// Go through the array, only saving the items\n\t\t// that pass the validator function\n\t\tfor ( ; i < length; i++ ) {\n\t\t\tcallbackInverse = !callback( elems[ i ], i );\n\t\t\tif ( callbackInverse !== callbackExpect ) {\n\t\t\t\tmatches.push( elems[ i ] );\n\t\t\t}\n\t\t}\n\n\t\treturn matches;\n\t},\n\n\t// arg is for internal usage only\n\tmap: function( elems, callback, arg ) {\n\t\tvar length, value,\n\t\t\ti = 0,\n\t\t\tret = [];\n\n\t\t// Go through the array, translating each of the items to their new values\n\t\tif ( isArrayLike( elems ) ) {\n\t\t\tlength = elems.length;\n\t\t\tfor ( ; i < length; i++ ) {\n\t\t\t\tvalue = callback( elems[ i ], i, arg );\n\n\t\t\t\tif ( value != null ) {\n\t\t\t\t\tret.push( value );\n\t\t\t\t}\n\t\t\t}\n\n\t\t// Go through every key on the object,\n\t\t} else {\n\t\t\tfor ( i in elems ) {\n\t\t\t\tvalue = callback( elems[ i ], i, arg );\n\n\t\t\t\tif ( value != null ) {\n\t\t\t\t\tret.push( value );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Flatten any nested arrays\n\t\treturn concat.apply( [], ret );\n\t},\n\n\t// A global GUID counter for objects\n\tguid: 1,\n\n\t// Bind a function to a context, optionally partially applying any\n\t// arguments.\n\tproxy: function( fn, context ) {\n\t\tvar args, proxy, tmp;\n\n\t\tif ( typeof context === \"string\" ) {\n\t\t\ttmp = fn[ context ];\n\t\t\tcontext = fn;\n\t\t\tfn = tmp;\n\t\t}\n\n\t\t// Quick check to determine if target is callable, in the spec\n\t\t// this throws a TypeError, but we will just return undefined.\n\t\tif ( !jQuery.isFunction( fn ) ) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\t// Simulated bind\n\t\targs = slice.call( arguments, 2 );\n\t\tproxy = function() {\n\t\t\treturn fn.apply( context || this, args.concat( slice.call( arguments ) ) );\n\t\t};\n\n\t\t// Set the guid of unique handler to the same of original handler, so it can be removed\n\t\tproxy.guid = fn.guid = fn.guid || jQuery.guid++;\n\n\t\treturn proxy;\n\t},\n\n\tnow: function() {\n\t\treturn +( new Date() );\n\t},\n\n\t// jQuery.support is not used in Core but other projects attach their\n\t// properties to it so it needs to exist.\n\tsupport: support\n} );\n\n// JSHint would error on this code due to the Symbol not being defined in ES5.\n// Defining this global in .jshintrc would create a danger of using the global\n// unguarded in another place, it seems safer to just disable JSHint for these\n// three lines.\n/* jshint ignore: start */\nif ( typeof Symbol === \"function\" ) {\n\tjQuery.fn[ Symbol.iterator ] = deletedIds[ Symbol.iterator ];\n}\n/* jshint ignore: end */\n\n// Populate the class2type map\njQuery.each( \"Boolean Number String Function Array Date RegExp Object Error Symbol\".split( \" \" ),\nfunction( i, name ) {\n\tclass2type[ \"[object \" + name + \"]\" ] = name.toLowerCase();\n} );\n\nfunction isArrayLike( obj ) {\n\n\t// Support: iOS 8.2 (not reproducible in simulator)\n\t// `in` check used to prevent JIT error (gh-2145)\n\t// hasOwn isn't used here due to false negatives\n\t// regarding Nodelist length in IE\n\tvar length = !!obj && \"length\" in obj && obj.length,\n\t\ttype = jQuery.type( obj );\n\n\tif ( type === \"function\" || jQuery.isWindow( obj ) ) {\n\t\treturn false;\n\t}\n\n\treturn type === \"array\" || length === 0 ||\n\t\ttypeof length === \"number\" && length > 0 && ( length - 1 ) in obj;\n}\nvar Sizzle =\n/*!\n * Sizzle CSS Selector Engine v2.2.1\n * http://sizzlejs.com/\n *\n * Copyright jQuery Foundation and other contributors\n * Released under the MIT license\n * http://jquery.org/license\n *\n * Date: 2015-10-17\n */\n(function( window ) {\n\nvar i,\n\tsupport,\n\tExpr,\n\tgetText,\n\tisXML,\n\ttokenize,\n\tcompile,\n\tselect,\n\toutermostContext,\n\tsortInput,\n\thasDuplicate,\n\n\t// Local document vars\n\tsetDocument,\n\tdocument,\n\tdocElem,\n\tdocumentIsHTML,\n\trbuggyQSA,\n\trbuggyMatches,\n\tmatches,\n\tcontains,\n\n\t// Instance-specific data\n\texpando = \"sizzle\" + 1 * new Date(),\n\tpreferredDoc = window.document,\n\tdirruns = 0,\n\tdone = 0,\n\tclassCache = createCache(),\n\ttokenCache = createCache(),\n\tcompilerCache = createCache(),\n\tsortOrder = function( a, b ) {\n\t\tif ( a === b ) {\n\t\t\thasDuplicate = true;\n\t\t}\n\t\treturn 0;\n\t},\n\n\t// General-purpose constants\n\tMAX_NEGATIVE = 1 << 31,\n\n\t// Instance methods\n\thasOwn = ({}).hasOwnProperty,\n\tarr = [],\n\tpop = arr.pop,\n\tpush_native = arr.push,\n\tpush = arr.push,\n\tslice = arr.slice,\n\t// Use a stripped-down indexOf as it's faster than native\n\t// http://jsperf.com/thor-indexof-vs-for/5\n\tindexOf = function( list, elem ) {\n\t\tvar i = 0,\n\t\t\tlen = list.length;\n\t\tfor ( ; i < len; i++ ) {\n\t\t\tif ( list[i] === elem ) {\n\t\t\t\treturn i;\n\t\t\t}\n\t\t}\n\t\treturn -1;\n\t},\n\n\tbooleans = \"checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped\",\n\n\t// Regular expressions\n\n\t// http://www.w3.org/TR/css3-selectors/#whitespace\n\twhitespace = \"[\\\\x20\\\\t\\\\r\\\\n\\\\f]\",\n\n\t// http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier\n\tidentifier = \"(?:\\\\\\\\.|[\\\\w-]|[^\\\\x00-\\\\xa0])+\",\n\n\t// Attribute selectors: http://www.w3.org/TR/selectors/#attribute-selectors\n\tattributes = \"\\\\[\" + whitespace + \"*(\" + identifier + \")(?:\" + whitespace +\n\t\t// Operator (capture 2)\n\t\t\"*([*^$|!~]?=)\" + whitespace +\n\t\t// \"Attribute values must be CSS identifiers [capture 5] or strings [capture 3 or capture 4]\"\n\t\t\"*(?:'((?:\\\\\\\\.|[^\\\\\\\\'])*)'|\\\"((?:\\\\\\\\.|[^\\\\\\\\\\\"])*)\\\"|(\" + identifier + \"))|)\" + whitespace +\n\t\t\"*\\\\]\",\n\n\tpseudos = \":(\" + identifier + \")(?:\\\\((\" +\n\t\t// To reduce the number of selectors needing tokenize in the preFilter, prefer arguments:\n\t\t// 1. quoted (capture 3; capture 4 or capture 5)\n\t\t\"('((?:\\\\\\\\.|[^\\\\\\\\'])*)'|\\\"((?:\\\\\\\\.|[^\\\\\\\\\\\"])*)\\\")|\" +\n\t\t// 2. simple (capture 6)\n\t\t\"((?:\\\\\\\\.|[^\\\\\\\\()[\\\\]]|\" + attributes + \")*)|\" +\n\t\t// 3. anything else (capture 2)\n\t\t\".*\" +\n\t\t\")\\\\)|)\",\n\n\t// Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter\n\trwhitespace = new RegExp( whitespace + \"+\", \"g\" ),\n\trtrim = new RegExp( \"^\" + whitespace + \"+|((?:^|[^\\\\\\\\])(?:\\\\\\\\.)*)\" + whitespace + \"+$\", \"g\" ),\n\n\trcomma = new RegExp( \"^\" + whitespace + \"*,\" + whitespace + \"*\" ),\n\trcombinators = new RegExp( \"^\" + whitespace + \"*([>+~]|\" + whitespace + \")\" + whitespace + \"*\" ),\n\n\trattributeQuotes = new RegExp( \"=\" + whitespace + \"*([^\\\\]'\\\"]*?)\" + whitespace + \"*\\\\]\", \"g\" ),\n\n\trpseudo = new RegExp( pseudos ),\n\tridentifier = new RegExp( \"^\" + identifier + \"$\" ),\n\n\tmatchExpr = {\n\t\t\"ID\": new RegExp( \"^#(\" + identifier + \")\" ),\n\t\t\"CLASS\": new RegExp( \"^\\\\.(\" + identifier + \")\" ),\n\t\t\"TAG\": new RegExp( \"^(\" + identifier + \"|[*])\" ),\n\t\t\"ATTR\": new RegExp( \"^\" + attributes ),\n\t\t\"PSEUDO\": new RegExp( \"^\" + pseudos ),\n\t\t\"CHILD\": new RegExp( \"^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\\\(\" + whitespace +\n\t\t\t\"*(even|odd|(([+-]|)(\\\\d*)n|)\" + whitespace + \"*(?:([+-]|)\" + whitespace +\n\t\t\t\"*(\\\\d+)|))\" + whitespace + \"*\\\\)|)\", \"i\" ),\n\t\t\"bool\": new RegExp( \"^(?:\" + booleans + \")$\", \"i\" ),\n\t\t// For use in libraries implementing .is()\n\t\t// We use this for POS matching in `select`\n\t\t\"needsContext\": new RegExp( \"^\" + whitespace + \"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\\\(\" +\n\t\t\twhitespace + \"*((?:-\\\\d)?\\\\d*)\" + whitespace + \"*\\\\)|)(?=[^-]|$)\", \"i\" )\n\t},\n\n\trinputs = /^(?:input|select|textarea|button)$/i,\n\trheader = /^h\\d$/i,\n\n\trnative = /^[^{]+\\{\\s*\\[native \\w/,\n\n\t// Easily-parseable/retrievable ID or TAG or CLASS selectors\n\trquickExpr = /^(?:#([\\w-]+)|(\\w+)|\\.([\\w-]+))$/,\n\n\trsibling = /[+~]/,\n\trescape = /'|\\\\/g,\n\n\t// CSS escapes http://www.w3.org/TR/CSS21/syndata.html#escaped-characters\n\trunescape = new RegExp( \"\\\\\\\\([\\\\da-f]{1,6}\" + whitespace + \"?|(\" + whitespace + \")|.)\", \"ig\" ),\n\tfunescape = function( _, escaped, escapedWhitespace ) {\n\t\tvar high = \"0x\" + escaped - 0x10000;\n\t\t// NaN means non-codepoint\n\t\t// Support: Firefox<24\n\t\t// Workaround erroneous numeric interpretation of +\"0x\"\n\t\treturn high !== high || escapedWhitespace ?\n\t\t\tescaped :\n\t\t\thigh < 0 ?\n\t\t\t\t// BMP codepoint\n\t\t\t\tString.fromCharCode( high + 0x10000 ) :\n\t\t\t\t// Supplemental Plane codepoint (surrogate pair)\n\t\t\t\tString.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 );\n\t},\n\n\t// Used for iframes\n\t// See setDocument()\n\t// Removing the function wrapper causes a \"Permission Denied\"\n\t// error in IE\n\tunloadHandler = function() {\n\t\tsetDocument();\n\t};\n\n// Optimize for push.apply( _, NodeList )\ntry {\n\tpush.apply(\n\t\t(arr = slice.call( preferredDoc.childNodes )),\n\t\tpreferredDoc.childNodes\n\t);\n\t// Support: Android<4.0\n\t// Detect silently failing push.apply\n\tarr[ preferredDoc.childNodes.length ].nodeType;\n} catch ( e ) {\n\tpush = { apply: arr.length ?\n\n\t\t// Leverage slice if possible\n\t\tfunction( target, els ) {\n\t\t\tpush_native.apply( target, slice.call(els) );\n\t\t} :\n\n\t\t// Support: IE<9\n\t\t// Otherwise append directly\n\t\tfunction( target, els ) {\n\t\t\tvar j = target.length,\n\t\t\t\ti = 0;\n\t\t\t// Can't trust NodeList.length\n\t\t\twhile ( (target[j++] = els[i++]) ) {}\n\t\t\ttarget.length = j - 1;\n\t\t}\n\t};\n}\n\nfunction Sizzle( selector, context, results, seed ) {\n\tvar m, i, elem, nid, nidselect, match, groups, newSelector,\n\t\tnewContext = context && context.ownerDocument,\n\n\t\t// nodeType defaults to 9, since context defaults to document\n\t\tnodeType = context ? context.nodeType : 9;\n\n\tresults = results || [];\n\n\t// Return early from calls with invalid selector or context\n\tif ( typeof selector !== \"string\" || !selector ||\n\t\tnodeType !== 1 && nodeType !== 9 && nodeType !== 11 ) {\n\n\t\treturn results;\n\t}\n\n\t// Try to shortcut find operations (as opposed to filters) in HTML documents\n\tif ( !seed ) {\n\n\t\tif ( ( context ? context.ownerDocument || context : preferredDoc ) !== document ) {\n\t\t\tsetDocument( context );\n\t\t}\n\t\tcontext = context || document;\n\n\t\tif ( documentIsHTML ) {\n\n\t\t\t// If the selector is sufficiently simple, try using a \"get*By*\" DOM method\n\t\t\t// (excepting DocumentFragment context, where the methods don't exist)\n\t\t\tif ( nodeType !== 11 && (match = rquickExpr.exec( selector )) ) {\n\n\t\t\t\t// ID selector\n\t\t\t\tif ( (m = match[1]) ) {\n\n\t\t\t\t\t// Document context\n\t\t\t\t\tif ( nodeType === 9 ) {\n\t\t\t\t\t\tif ( (elem = context.getElementById( m )) ) {\n\n\t\t\t\t\t\t\t// Support: IE, Opera, Webkit\n\t\t\t\t\t\t\t// TODO: identify versions\n\t\t\t\t\t\t\t// getElementById can match elements by name instead of ID\n\t\t\t\t\t\t\tif ( elem.id === m ) {\n\t\t\t\t\t\t\t\tresults.push( elem );\n\t\t\t\t\t\t\t\treturn results;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\treturn results;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t// Element context\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\t// Support: IE, Opera, Webkit\n\t\t\t\t\t\t// TODO: identify versions\n\t\t\t\t\t\t// getElementById can match elements by name instead of ID\n\t\t\t\t\t\tif ( newContext && (elem = newContext.getElementById( m )) &&\n\t\t\t\t\t\t\tcontains( context, elem ) &&\n\t\t\t\t\t\t\telem.id === m ) {\n\n\t\t\t\t\t\t\tresults.push( elem );\n\t\t\t\t\t\t\treturn results;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t// Type selector\n\t\t\t\t} else if ( match[2] ) {\n\t\t\t\t\tpush.apply( results, context.getElementsByTagName( selector ) );\n\t\t\t\t\treturn results;\n\n\t\t\t\t// Class selector\n\t\t\t\t} else if ( (m = match[3]) && support.getElementsByClassName &&\n\t\t\t\t\tcontext.getElementsByClassName ) {\n\n\t\t\t\t\tpush.apply( results, context.getElementsByClassName( m ) );\n\t\t\t\t\treturn results;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Take advantage of querySelectorAll\n\t\t\tif ( support.qsa &&\n\t\t\t\t!compilerCache[ selector + \" \" ] &&\n\t\t\t\t(!rbuggyQSA || !rbuggyQSA.test( selector )) ) {\n\n\t\t\t\tif ( nodeType !== 1 ) {\n\t\t\t\t\tnewContext = context;\n\t\t\t\t\tnewSelector = selector;\n\n\t\t\t\t// qSA looks outside Element context, which is not what we want\n\t\t\t\t// Thanks to Andrew Dupont for this workaround technique\n\t\t\t\t// Support: IE <=8\n\t\t\t\t// Exclude object elements\n\t\t\t\t} else if ( context.nodeName.toLowerCase() !== \"object\" ) {\n\n\t\t\t\t\t// Capture the context ID, setting it first if necessary\n\t\t\t\t\tif ( (nid = context.getAttribute( \"id\" )) ) {\n\t\t\t\t\t\tnid = nid.replace( rescape, \"\\\\$&\" );\n\t\t\t\t\t} else {\n\t\t\t\t\t\tcontext.setAttribute( \"id\", (nid = expando) );\n\t\t\t\t\t}\n\n\t\t\t\t\t// Prefix every selector in the list\n\t\t\t\t\tgroups = tokenize( selector );\n\t\t\t\t\ti = groups.length;\n\t\t\t\t\tnidselect = ridentifier.test( nid ) ? \"#\" + nid : \"[id='\" + nid + \"']\";\n\t\t\t\t\twhile ( i-- ) {\n\t\t\t\t\t\tgroups[i] = nidselect + \" \" + toSelector( groups[i] );\n\t\t\t\t\t}\n\t\t\t\t\tnewSelector = groups.join( \",\" );\n\n\t\t\t\t\t// Expand context for sibling selectors\n\t\t\t\t\tnewContext = rsibling.test( selector ) && testContext( context.parentNode ) ||\n\t\t\t\t\t\tcontext;\n\t\t\t\t}\n\n\t\t\t\tif ( newSelector ) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tpush.apply( results,\n\t\t\t\t\t\t\tnewContext.querySelectorAll( newSelector )\n\t\t\t\t\t\t);\n\t\t\t\t\t\treturn results;\n\t\t\t\t\t} catch ( qsaError ) {\n\t\t\t\t\t} finally {\n\t\t\t\t\t\tif ( nid === expando ) {\n\t\t\t\t\t\t\tcontext.removeAttribute( \"id\" );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// All others\n\treturn select( selector.replace( rtrim, \"$1\" ), context, results, seed );\n}\n\n/**\n * Create key-value caches of limited size\n * @returns {function(string, object)} Returns the Object data after storing it on itself with\n *\tproperty name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength)\n *\tdeleting the oldest entry\n */\nfunction createCache() {\n\tvar keys = [];\n\n\tfunction cache( key, value ) {\n\t\t// Use (key + \" \") to avoid collision with native prototype properties (see Issue #157)\n\t\tif ( keys.push( key + \" \" ) > Expr.cacheLength ) {\n\t\t\t// Only keep the most recent entries\n\t\t\tdelete cache[ keys.shift() ];\n\t\t}\n\t\treturn (cache[ key + \" \" ] = value);\n\t}\n\treturn cache;\n}\n\n/**\n * Mark a function for special use by Sizzle\n * @param {Function} fn The function to mark\n */\nfunction markFunction( fn ) {\n\tfn[ expando ] = true;\n\treturn fn;\n}\n\n/**\n * Support testing using an element\n * @param {Function} fn Passed the created div and expects a boolean result\n */\nfunction assert( fn ) {\n\tvar div = document.createElement(\"div\");\n\n\ttry {\n\t\treturn !!fn( div );\n\t} catch (e) {\n\t\treturn false;\n\t} finally {\n\t\t// Remove from its parent by default\n\t\tif ( div.parentNode ) {\n\t\t\tdiv.parentNode.removeChild( div );\n\t\t}\n\t\t// release memory in IE\n\t\tdiv = null;\n\t}\n}\n\n/**\n * Adds the same handler for all of the specified attrs\n * @param {String} attrs Pipe-separated list of attributes\n * @param {Function} handler The method that will be applied\n */\nfunction addHandle( attrs, handler ) {\n\tvar arr = attrs.split(\"|\"),\n\t\ti = arr.length;\n\n\twhile ( i-- ) {\n\t\tExpr.attrHandle[ arr[i] ] = handler;\n\t}\n}\n\n/**\n * Checks document order of two siblings\n * @param {Element} a\n * @param {Element} b\n * @returns {Number} Returns less than 0 if a precedes b, greater than 0 if a follows b\n */\nfunction siblingCheck( a, b ) {\n\tvar cur = b && a,\n\t\tdiff = cur && a.nodeType === 1 && b.nodeType === 1 &&\n\t\t\t( ~b.sourceIndex || MAX_NEGATIVE ) -\n\t\t\t( ~a.sourceIndex || MAX_NEGATIVE );\n\n\t// Use IE sourceIndex if available on both nodes\n\tif ( diff ) {\n\t\treturn diff;\n\t}\n\n\t// Check if b follows a\n\tif ( cur ) {\n\t\twhile ( (cur = cur.nextSibling) ) {\n\t\t\tif ( cur === b ) {\n\t\t\t\treturn -1;\n\t\t\t}\n\t\t}\n\t}\n\n\treturn a ? 1 : -1;\n}\n\n/**\n * Returns a function to use in pseudos for input types\n * @param {String} type\n */\nfunction createInputPseudo( type ) {\n\treturn function( elem ) {\n\t\tvar name = elem.nodeName.toLowerCase();\n\t\treturn name === \"input\" && elem.type === type;\n\t};\n}\n\n/**\n * Returns a function to use in pseudos for buttons\n * @param {String} type\n */\nfunction createButtonPseudo( type ) {\n\treturn function( elem ) {\n\t\tvar name = elem.nodeName.toLowerCase();\n\t\treturn (name === \"input\" || name === \"button\") && elem.type === type;\n\t};\n}\n\n/**\n * Returns a function to use in pseudos for positionals\n * @param {Function} fn\n */\nfunction createPositionalPseudo( fn ) {\n\treturn markFunction(function( argument ) {\n\t\targument = +argument;\n\t\treturn markFunction(function( seed, matches ) {\n\t\t\tvar j,\n\t\t\t\tmatchIndexes = fn( [], seed.length, argument ),\n\t\t\t\ti = matchIndexes.length;\n\n\t\t\t// Match elements found at the specified indexes\n\t\t\twhile ( i-- ) {\n\t\t\t\tif ( seed[ (j = matchIndexes[i]) ] ) {\n\t\t\t\t\tseed[j] = !(matches[j] = seed[j]);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t});\n}\n\n/**\n * Checks a node for validity as a Sizzle context\n * @param {Element|Object=} context\n * @returns {Element|Object|Boolean} The input node if acceptable, otherwise a falsy value\n */\nfunction testContext( context ) {\n\treturn context && typeof context.getElementsByTagName !== \"undefined\" && context;\n}\n\n// Expose support vars for convenience\nsupport = Sizzle.support = {};\n\n/**\n * Detects XML nodes\n * @param {Element|Object} elem An element or a document\n * @returns {Boolean} True iff elem is a non-HTML XML node\n */\nisXML = Sizzle.isXML = function( elem ) {\n\t// documentElement is verified for cases where it doesn't yet exist\n\t// (such as loading iframes in IE - #4833)\n\tvar documentElement = elem && (elem.ownerDocument || elem).documentElement;\n\treturn documentElement ? documentElement.nodeName !== \"HTML\" : false;\n};\n\n/**\n * Sets document-related variables once based on the current document\n * @param {Element|Object} [doc] An element or document object to use to set the document\n * @returns {Object} Returns the current document\n */\nsetDocument = Sizzle.setDocument = function( node ) {\n\tvar hasCompare, parent,\n\t\tdoc = node ? node.ownerDocument || node : preferredDoc;\n\n\t// Return early if doc is invalid or already selected\n\tif ( doc === document || doc.nodeType !== 9 || !doc.documentElement ) {\n\t\treturn document;\n\t}\n\n\t// Update global variables\n\tdocument = doc;\n\tdocElem = document.documentElement;\n\tdocumentIsHTML = !isXML( document );\n\n\t// Support: IE 9-11, Edge\n\t// Accessing iframe documents after unload throws \"permission denied\" errors (jQuery #13936)\n\tif ( (parent = document.defaultView) && parent.top !== parent ) {\n\t\t// Support: IE 11\n\t\tif ( parent.addEventListener ) {\n\t\t\tparent.addEventListener( \"unload\", unloadHandler, false );\n\n\t\t// Support: IE 9 - 10 only\n\t\t} else if ( parent.attachEvent ) {\n\t\t\tparent.attachEvent( \"onunload\", unloadHandler );\n\t\t}\n\t}\n\n\t/* Attributes\n\t---------------------------------------------------------------------- */\n\n\t// Support: IE<8\n\t// Verify that getAttribute really returns attributes and not properties\n\t// (excepting IE8 booleans)\n\tsupport.attributes = assert(function( div ) {\n\t\tdiv.className = \"i\";\n\t\treturn !div.getAttribute(\"className\");\n\t});\n\n\t/* getElement(s)By*\n\t---------------------------------------------------------------------- */\n\n\t// Check if getElementsByTagName(\"*\") returns only elements\n\tsupport.getElementsByTagName = assert(function( div ) {\n\t\tdiv.appendChild( document.createComment(\"\") );\n\t\treturn !div.getElementsByTagName(\"*\").length;\n\t});\n\n\t// Support: IE<9\n\tsupport.getElementsByClassName = rnative.test( document.getElementsByClassName );\n\n\t// Support: IE<10\n\t// Check if getElementById returns elements by name\n\t// The broken getElementById methods don't pick up programatically-set names,\n\t// so use a roundabout getElementsByName test\n\tsupport.getById = assert(function( div ) {\n\t\tdocElem.appendChild( div ).id = expando;\n\t\treturn !document.getElementsByName || !document.getElementsByName( expando ).length;\n\t});\n\n\t// ID find and filter\n\tif ( support.getById ) {\n\t\tExpr.find[\"ID\"] = function( id, context ) {\n\t\t\tif ( typeof context.getElementById !== \"undefined\" && documentIsHTML ) {\n\t\t\t\tvar m = context.getElementById( id );\n\t\t\t\treturn m ? [ m ] : [];\n\t\t\t}\n\t\t};\n\t\tExpr.filter[\"ID\"] = function( id ) {\n\t\t\tvar attrId = id.replace( runescape, funescape );\n\t\t\treturn function( elem ) {\n\t\t\t\treturn elem.getAttribute(\"id\") === attrId;\n\t\t\t};\n\t\t};\n\t} else {\n\t\t// Support: IE6/7\n\t\t// getElementById is not reliable as a find shortcut\n\t\tdelete Expr.find[\"ID\"];\n\n\t\tExpr.filter[\"ID\"] =  function( id ) {\n\t\t\tvar attrId = id.replace( runescape, funescape );\n\t\t\treturn function( elem ) {\n\t\t\t\tvar node = typeof elem.getAttributeNode !== \"undefined\" &&\n\t\t\t\t\telem.getAttributeNode(\"id\");\n\t\t\t\treturn node && node.value === attrId;\n\t\t\t};\n\t\t};\n\t}\n\n\t// Tag\n\tExpr.find[\"TAG\"] = support.getElementsByTagName ?\n\t\tfunction( tag, context ) {\n\t\t\tif ( typeof context.getElementsByTagName !== \"undefined\" ) {\n\t\t\t\treturn context.getElementsByTagName( tag );\n\n\t\t\t// DocumentFragment nodes don't have gEBTN\n\t\t\t} else if ( support.qsa ) {\n\t\t\t\treturn context.querySelectorAll( tag );\n\t\t\t}\n\t\t} :\n\n\t\tfunction( tag, context ) {\n\t\t\tvar elem,\n\t\t\t\ttmp = [],\n\t\t\t\ti = 0,\n\t\t\t\t// By happy coincidence, a (broken) gEBTN appears on DocumentFragment nodes too\n\t\t\t\tresults = context.getElementsByTagName( tag );\n\n\t\t\t// Filter out possible comments\n\t\t\tif ( tag === \"*\" ) {\n\t\t\t\twhile ( (elem = results[i++]) ) {\n\t\t\t\t\tif ( elem.nodeType === 1 ) {\n\t\t\t\t\t\ttmp.push( elem );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn tmp;\n\t\t\t}\n\t\t\treturn results;\n\t\t};\n\n\t// Class\n\tExpr.find[\"CLASS\"] = support.getElementsByClassName && function( className, context ) {\n\t\tif ( typeof context.getElementsByClassName !== \"undefined\" && documentIsHTML ) {\n\t\t\treturn context.getElementsByClassName( className );\n\t\t}\n\t};\n\n\t/* QSA/matchesSelector\n\t---------------------------------------------------------------------- */\n\n\t// QSA and matchesSelector support\n\n\t// matchesSelector(:active) reports false when true (IE9/Opera 11.5)\n\trbuggyMatches = [];\n\n\t// qSa(:focus) reports false when true (Chrome 21)\n\t// We allow this because of a bug in IE8/9 that throws an error\n\t// whenever `document.activeElement` is accessed on an iframe\n\t// So, we allow :focus to pass through QSA all the time to avoid the IE error\n\t// See http://bugs.jquery.com/ticket/13378\n\trbuggyQSA = [];\n\n\tif ( (support.qsa = rnative.test( document.querySelectorAll )) ) {\n\t\t// Build QSA regex\n\t\t// Regex strategy adopted from Diego Perini\n\t\tassert(function( div ) {\n\t\t\t// Select is set to empty string on purpose\n\t\t\t// This is to test IE's treatment of not explicitly\n\t\t\t// setting a boolean content attribute,\n\t\t\t// since its presence should be enough\n\t\t\t// http://bugs.jquery.com/ticket/12359\n\t\t\tdocElem.appendChild( div ).innerHTML = \"<a id='\" + expando + \"'></a>\" +\n\t\t\t\t\"<select id='\" + expando + \"-\\r\\\\' msallowcapture=''>\" +\n\t\t\t\t\"<option selected=''></option></select>\";\n\n\t\t\t// Support: IE8, Opera 11-12.16\n\t\t\t// Nothing should be selected when empty strings follow ^= or $= or *=\n\t\t\t// The test attribute must be unknown in Opera but \"safe\" for WinRT\n\t\t\t// http://msdn.microsoft.com/en-us/library/ie/hh465388.aspx#attribute_section\n\t\t\tif ( div.querySelectorAll(\"[msallowcapture^='']\").length ) {\n\t\t\t\trbuggyQSA.push( \"[*^$]=\" + whitespace + \"*(?:''|\\\"\\\")\" );\n\t\t\t}\n\n\t\t\t// Support: IE8\n\t\t\t// Boolean attributes and \"value\" are not treated correctly\n\t\t\tif ( !div.querySelectorAll(\"[selected]\").length ) {\n\t\t\t\trbuggyQSA.push( \"\\\\[\" + whitespace + \"*(?:value|\" + booleans + \")\" );\n\t\t\t}\n\n\t\t\t// Support: Chrome<29, Android<4.4, Safari<7.0+, iOS<7.0+, PhantomJS<1.9.8+\n\t\t\tif ( !div.querySelectorAll( \"[id~=\" + expando + \"-]\" ).length ) {\n\t\t\t\trbuggyQSA.push(\"~=\");\n\t\t\t}\n\n\t\t\t// Webkit/Opera - :checked should return selected option elements\n\t\t\t// http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked\n\t\t\t// IE8 throws error here and will not see later tests\n\t\t\tif ( !div.querySelectorAll(\":checked\").length ) {\n\t\t\t\trbuggyQSA.push(\":checked\");\n\t\t\t}\n\n\t\t\t// Support: Safari 8+, iOS 8+\n\t\t\t// https://bugs.webkit.org/show_bug.cgi?id=136851\n\t\t\t// In-page `selector#id sibing-combinator selector` fails\n\t\t\tif ( !div.querySelectorAll( \"a#\" + expando + \"+*\" ).length ) {\n\t\t\t\trbuggyQSA.push(\".#.+[+~]\");\n\t\t\t}\n\t\t});\n\n\t\tassert(function( div ) {\n\t\t\t// Support: Windows 8 Native Apps\n\t\t\t// The type and name attributes are restricted during .innerHTML assignment\n\t\t\tvar input = document.createElement(\"input\");\n\t\t\tinput.setAttribute( \"type\", \"hidden\" );\n\t\t\tdiv.appendChild( input ).setAttribute( \"name\", \"D\" );\n\n\t\t\t// Support: IE8\n\t\t\t// Enforce case-sensitivity of name attribute\n\t\t\tif ( div.querySelectorAll(\"[name=d]\").length ) {\n\t\t\t\trbuggyQSA.push( \"name\" + whitespace + \"*[*^$|!~]?=\" );\n\t\t\t}\n\n\t\t\t// FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled)\n\t\t\t// IE8 throws error here and will not see later tests\n\t\t\tif ( !div.querySelectorAll(\":enabled\").length ) {\n\t\t\t\trbuggyQSA.push( \":enabled\", \":disabled\" );\n\t\t\t}\n\n\t\t\t// Opera 10-11 does not throw on post-comma invalid pseudos\n\t\t\tdiv.querySelectorAll(\"*,:x\");\n\t\t\trbuggyQSA.push(\",.*:\");\n\t\t});\n\t}\n\n\tif ( (support.matchesSelector = rnative.test( (matches = docElem.matches ||\n\t\tdocElem.webkitMatchesSelector ||\n\t\tdocElem.mozMatchesSelector ||\n\t\tdocElem.oMatchesSelector ||\n\t\tdocElem.msMatchesSelector) )) ) {\n\n\t\tassert(function( div ) {\n\t\t\t// Check to see if it's possible to do matchesSelector\n\t\t\t// on a disconnected node (IE 9)\n\t\t\tsupport.disconnectedMatch = matches.call( div, \"div\" );\n\n\t\t\t// This should fail with an exception\n\t\t\t// Gecko does not error, returns false instead\n\t\t\tmatches.call( div, \"[s!='']:x\" );\n\t\t\trbuggyMatches.push( \"!=\", pseudos );\n\t\t});\n\t}\n\n\trbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join(\"|\") );\n\trbuggyMatches = rbuggyMatches.length && new RegExp( rbuggyMatches.join(\"|\") );\n\n\t/* Contains\n\t---------------------------------------------------------------------- */\n\thasCompare = rnative.test( docElem.compareDocumentPosition );\n\n\t// Element contains another\n\t// Purposefully self-exclusive\n\t// As in, an element does not contain itself\n\tcontains = hasCompare || rnative.test( docElem.contains ) ?\n\t\tfunction( a, b ) {\n\t\t\tvar adown = a.nodeType === 9 ? a.documentElement : a,\n\t\t\t\tbup = b && b.parentNode;\n\t\t\treturn a === bup || !!( bup && bup.nodeType === 1 && (\n\t\t\t\tadown.contains ?\n\t\t\t\t\tadown.contains( bup ) :\n\t\t\t\t\ta.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16\n\t\t\t));\n\t\t} :\n\t\tfunction( a, b ) {\n\t\t\tif ( b ) {\n\t\t\t\twhile ( (b = b.parentNode) ) {\n\t\t\t\t\tif ( b === a ) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false;\n\t\t};\n\n\t/* Sorting\n\t---------------------------------------------------------------------- */\n\n\t// Document order sorting\n\tsortOrder = hasCompare ?\n\tfunction( a, b ) {\n\n\t\t// Flag for duplicate removal\n\t\tif ( a === b ) {\n\t\t\thasDuplicate = true;\n\t\t\treturn 0;\n\t\t}\n\n\t\t// Sort on method existence if only one input has compareDocumentPosition\n\t\tvar compare = !a.compareDocumentPosition - !b.compareDocumentPosition;\n\t\tif ( compare ) {\n\t\t\treturn compare;\n\t\t}\n\n\t\t// Calculate position if both inputs belong to the same document\n\t\tcompare = ( a.ownerDocument || a ) === ( b.ownerDocument || b ) ?\n\t\t\ta.compareDocumentPosition( b ) :\n\n\t\t\t// Otherwise we know they are disconnected\n\t\t\t1;\n\n\t\t// Disconnected nodes\n\t\tif ( compare & 1 ||\n\t\t\t(!support.sortDetached && b.compareDocumentPosition( a ) === compare) ) {\n\n\t\t\t// Choose the first element that is related to our preferred document\n\t\t\tif ( a === document || a.ownerDocument === preferredDoc && contains(preferredDoc, a) ) {\n\t\t\t\treturn -1;\n\t\t\t}\n\t\t\tif ( b === document || b.ownerDocument === preferredDoc && contains(preferredDoc, b) ) {\n\t\t\t\treturn 1;\n\t\t\t}\n\n\t\t\t// Maintain original order\n\t\t\treturn sortInput ?\n\t\t\t\t( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) :\n\t\t\t\t0;\n\t\t}\n\n\t\treturn compare & 4 ? -1 : 1;\n\t} :\n\tfunction( a, b ) {\n\t\t// Exit early if the nodes are identical\n\t\tif ( a === b ) {\n\t\t\thasDuplicate = true;\n\t\t\treturn 0;\n\t\t}\n\n\t\tvar cur,\n\t\t\ti = 0,\n\t\t\taup = a.parentNode,\n\t\t\tbup = b.parentNode,\n\t\t\tap = [ a ],\n\t\t\tbp = [ b ];\n\n\t\t// Parentless nodes are either documents or disconnected\n\t\tif ( !aup || !bup ) {\n\t\t\treturn a === document ? -1 :\n\t\t\t\tb === document ? 1 :\n\t\t\t\taup ? -1 :\n\t\t\t\tbup ? 1 :\n\t\t\t\tsortInput ?\n\t\t\t\t( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) :\n\t\t\t\t0;\n\n\t\t// If the nodes are siblings, we can do a quick check\n\t\t} else if ( aup === bup ) {\n\t\t\treturn siblingCheck( a, b );\n\t\t}\n\n\t\t// Otherwise we need full lists of their ancestors for comparison\n\t\tcur = a;\n\t\twhile ( (cur = cur.parentNode) ) {\n\t\t\tap.unshift( cur );\n\t\t}\n\t\tcur = b;\n\t\twhile ( (cur = cur.parentNode) ) {\n\t\t\tbp.unshift( cur );\n\t\t}\n\n\t\t// Walk down the tree looking for a discrepancy\n\t\twhile ( ap[i] === bp[i] ) {\n\t\t\ti++;\n\t\t}\n\n\t\treturn i ?\n\t\t\t// Do a sibling check if the nodes have a common ancestor\n\t\t\tsiblingCheck( ap[i], bp[i] ) :\n\n\t\t\t// Otherwise nodes in our document sort first\n\t\t\tap[i] === preferredDoc ? -1 :\n\t\t\tbp[i] === preferredDoc ? 1 :\n\t\t\t0;\n\t};\n\n\treturn document;\n};\n\nSizzle.matches = function( expr, elements ) {\n\treturn Sizzle( expr, null, null, elements );\n};\n\nSizzle.matchesSelector = function( elem, expr ) {\n\t// Set document vars if needed\n\tif ( ( elem.ownerDocument || elem ) !== document ) {\n\t\tsetDocument( elem );\n\t}\n\n\t// Make sure that attribute selectors are quoted\n\texpr = expr.replace( rattributeQuotes, \"='$1']\" );\n\n\tif ( support.matchesSelector && documentIsHTML &&\n\t\t!compilerCache[ expr + \" \" ] &&\n\t\t( !rbuggyMatches || !rbuggyMatches.test( expr ) ) &&\n\t\t( !rbuggyQSA     || !rbuggyQSA.test( expr ) ) ) {\n\n\t\ttry {\n\t\t\tvar ret = matches.call( elem, expr );\n\n\t\t\t// IE 9's matchesSelector returns false on disconnected nodes\n\t\t\tif ( ret || support.disconnectedMatch ||\n\t\t\t\t\t// As well, disconnected nodes are said to be in a document\n\t\t\t\t\t// fragment in IE 9\n\t\t\t\t\telem.document && elem.document.nodeType !== 11 ) {\n\t\t\t\treturn ret;\n\t\t\t}\n\t\t} catch (e) {}\n\t}\n\n\treturn Sizzle( expr, document, null, [ elem ] ).length > 0;\n};\n\nSizzle.contains = function( context, elem ) {\n\t// Set document vars if needed\n\tif ( ( context.ownerDocument || context ) !== document ) {\n\t\tsetDocument( context );\n\t}\n\treturn contains( context, elem );\n};\n\nSizzle.attr = function( elem, name ) {\n\t// Set document vars if needed\n\tif ( ( elem.ownerDocument || elem ) !== document ) {\n\t\tsetDocument( elem );\n\t}\n\n\tvar fn = Expr.attrHandle[ name.toLowerCase() ],\n\t\t// Don't get fooled by Object.prototype properties (jQuery #13807)\n\t\tval = fn && hasOwn.call( Expr.attrHandle, name.toLowerCase() ) ?\n\t\t\tfn( elem, name, !documentIsHTML ) :\n\t\t\tundefined;\n\n\treturn val !== undefined ?\n\t\tval :\n\t\tsupport.attributes || !documentIsHTML ?\n\t\t\telem.getAttribute( name ) :\n\t\t\t(val = elem.getAttributeNode(name)) && val.specified ?\n\t\t\t\tval.value :\n\t\t\t\tnull;\n};\n\nSizzle.error = function( msg ) {\n\tthrow new Error( \"Syntax error, unrecognized expression: \" + msg );\n};\n\n/**\n * Document sorting and removing duplicates\n * @param {ArrayLike} results\n */\nSizzle.uniqueSort = function( results ) {\n\tvar elem,\n\t\tduplicates = [],\n\t\tj = 0,\n\t\ti = 0;\n\n\t// Unless we *know* we can detect duplicates, assume their presence\n\thasDuplicate = !support.detectDuplicates;\n\tsortInput = !support.sortStable && results.slice( 0 );\n\tresults.sort( sortOrder );\n\n\tif ( hasDuplicate ) {\n\t\twhile ( (elem = results[i++]) ) {\n\t\t\tif ( elem === results[ i ] ) {\n\t\t\t\tj = duplicates.push( i );\n\t\t\t}\n\t\t}\n\t\twhile ( j-- ) {\n\t\t\tresults.splice( duplicates[ j ], 1 );\n\t\t}\n\t}\n\n\t// Clear input after sorting to release objects\n\t// See https://github.com/jquery/sizzle/pull/225\n\tsortInput = null;\n\n\treturn results;\n};\n\n/**\n * Utility function for retrieving the text value of an array of DOM nodes\n * @param {Array|Element} elem\n */\ngetText = Sizzle.getText = function( elem ) {\n\tvar node,\n\t\tret = \"\",\n\t\ti = 0,\n\t\tnodeType = elem.nodeType;\n\n\tif ( !nodeType ) {\n\t\t// If no nodeType, this is expected to be an array\n\t\twhile ( (node = elem[i++]) ) {\n\t\t\t// Do not traverse comment nodes\n\t\t\tret += getText( node );\n\t\t}\n\t} else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) {\n\t\t// Use textContent for elements\n\t\t// innerText usage removed for consistency of new lines (jQuery #11153)\n\t\tif ( typeof elem.textContent === \"string\" ) {\n\t\t\treturn elem.textContent;\n\t\t} else {\n\t\t\t// Traverse its children\n\t\t\tfor ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {\n\t\t\t\tret += getText( elem );\n\t\t\t}\n\t\t}\n\t} else if ( nodeType === 3 || nodeType === 4 ) {\n\t\treturn elem.nodeValue;\n\t}\n\t// Do not include comment or processing instruction nodes\n\n\treturn ret;\n};\n\nExpr = Sizzle.selectors = {\n\n\t// Can be adjusted by the user\n\tcacheLength: 50,\n\n\tcreatePseudo: markFunction,\n\n\tmatch: matchExpr,\n\n\tattrHandle: {},\n\n\tfind: {},\n\n\trelative: {\n\t\t\">\": { dir: \"parentNode\", first: true },\n\t\t\" \": { dir: \"parentNode\" },\n\t\t\"+\": { dir: \"previousSibling\", first: true },\n\t\t\"~\": { dir: \"previousSibling\" }\n\t},\n\n\tpreFilter: {\n\t\t\"ATTR\": function( match ) {\n\t\t\tmatch[1] = match[1].replace( runescape, funescape );\n\n\t\t\t// Move the given value to match[3] whether quoted or unquoted\n\t\t\tmatch[3] = ( match[3] || match[4] || match[5] || \"\" ).replace( runescape, funescape );\n\n\t\t\tif ( match[2] === \"~=\" ) {\n\t\t\t\tmatch[3] = \" \" + match[3] + \" \";\n\t\t\t}\n\n\t\t\treturn match.slice( 0, 4 );\n\t\t},\n\n\t\t\"CHILD\": function( match ) {\n\t\t\t/* matches from matchExpr[\"CHILD\"]\n\t\t\t\t1 type (only|nth|...)\n\t\t\t\t2 what (child|of-type)\n\t\t\t\t3 argument (even|odd|\\d*|\\d*n([+-]\\d+)?|...)\n\t\t\t\t4 xn-component of xn+y argument ([+-]?\\d*n|)\n\t\t\t\t5 sign of xn-component\n\t\t\t\t6 x of xn-component\n\t\t\t\t7 sign of y-component\n\t\t\t\t8 y of y-component\n\t\t\t*/\n\t\t\tmatch[1] = match[1].toLowerCase();\n\n\t\t\tif ( match[1].slice( 0, 3 ) === \"nth\" ) {\n\t\t\t\t// nth-* requires argument\n\t\t\t\tif ( !match[3] ) {\n\t\t\t\t\tSizzle.error( match[0] );\n\t\t\t\t}\n\n\t\t\t\t// numeric x and y parameters for Expr.filter.CHILD\n\t\t\t\t// remember that false/true cast respectively to 0/1\n\t\t\t\tmatch[4] = +( match[4] ? match[5] + (match[6] || 1) : 2 * ( match[3] === \"even\" || match[3] === \"odd\" ) );\n\t\t\t\tmatch[5] = +( ( match[7] + match[8] ) || match[3] === \"odd\" );\n\n\t\t\t// other types prohibit arguments\n\t\t\t} else if ( match[3] ) {\n\t\t\t\tSizzle.error( match[0] );\n\t\t\t}\n\n\t\t\treturn match;\n\t\t},\n\n\t\t\"PSEUDO\": function( match ) {\n\t\t\tvar excess,\n\t\t\t\tunquoted = !match[6] && match[2];\n\n\t\t\tif ( matchExpr[\"CHILD\"].test( match[0] ) ) {\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\t// Accept quoted arguments as-is\n\t\t\tif ( match[3] ) {\n\t\t\t\tmatch[2] = match[4] || match[5] || \"\";\n\n\t\t\t// Strip excess characters from unquoted arguments\n\t\t\t} else if ( unquoted && rpseudo.test( unquoted ) &&\n\t\t\t\t// Get excess from tokenize (recursively)\n\t\t\t\t(excess = tokenize( unquoted, true )) &&\n\t\t\t\t// advance to the next closing parenthesis\n\t\t\t\t(excess = unquoted.indexOf( \")\", unquoted.length - excess ) - unquoted.length) ) {\n\n\t\t\t\t// excess is a negative index\n\t\t\t\tmatch[0] = match[0].slice( 0, excess );\n\t\t\t\tmatch[2] = unquoted.slice( 0, excess );\n\t\t\t}\n\n\t\t\t// Return only captures needed by the pseudo filter method (type and argument)\n\t\t\treturn match.slice( 0, 3 );\n\t\t}\n\t},\n\n\tfilter: {\n\n\t\t\"TAG\": function( nodeNameSelector ) {\n\t\t\tvar nodeName = nodeNameSelector.replace( runescape, funescape ).toLowerCase();\n\t\t\treturn nodeNameSelector === \"*\" ?\n\t\t\t\tfunction() { return true; } :\n\t\t\t\tfunction( elem ) {\n\t\t\t\t\treturn elem.nodeName && elem.nodeName.toLowerCase() === nodeName;\n\t\t\t\t};\n\t\t},\n\n\t\t\"CLASS\": function( className ) {\n\t\t\tvar pattern = classCache[ className + \" \" ];\n\n\t\t\treturn pattern ||\n\t\t\t\t(pattern = new RegExp( \"(^|\" + whitespace + \")\" + className + \"(\" + whitespace + \"|$)\" )) &&\n\t\t\t\tclassCache( className, function( elem ) {\n\t\t\t\t\treturn pattern.test( typeof elem.className === \"string\" && elem.className || typeof elem.getAttribute !== \"undefined\" && elem.getAttribute(\"class\") || \"\" );\n\t\t\t\t});\n\t\t},\n\n\t\t\"ATTR\": function( name, operator, check ) {\n\t\t\treturn function( elem ) {\n\t\t\t\tvar result = Sizzle.attr( elem, name );\n\n\t\t\t\tif ( result == null ) {\n\t\t\t\t\treturn operator === \"!=\";\n\t\t\t\t}\n\t\t\t\tif ( !operator ) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\n\t\t\t\tresult += \"\";\n\n\t\t\t\treturn operator === \"=\" ? result === check :\n\t\t\t\t\toperator === \"!=\" ? result !== check :\n\t\t\t\t\toperator === \"^=\" ? check && result.indexOf( check ) === 0 :\n\t\t\t\t\toperator === \"*=\" ? check && result.indexOf( check ) > -1 :\n\t\t\t\t\toperator === \"$=\" ? check && result.slice( -check.length ) === check :\n\t\t\t\t\toperator === \"~=\" ? ( \" \" + result.replace( rwhitespace, \" \" ) + \" \" ).indexOf( check ) > -1 :\n\t\t\t\t\toperator === \"|=\" ? result === check || result.slice( 0, check.length + 1 ) === check + \"-\" :\n\t\t\t\t\tfalse;\n\t\t\t};\n\t\t},\n\n\t\t\"CHILD\": function( type, what, argument, first, last ) {\n\t\t\tvar simple = type.slice( 0, 3 ) !== \"nth\",\n\t\t\t\tforward = type.slice( -4 ) !== \"last\",\n\t\t\t\tofType = what === \"of-type\";\n\n\t\t\treturn first === 1 && last === 0 ?\n\n\t\t\t\t// Shortcut for :nth-*(n)\n\t\t\t\tfunction( elem ) {\n\t\t\t\t\treturn !!elem.parentNode;\n\t\t\t\t} :\n\n\t\t\t\tfunction( elem, context, xml ) {\n\t\t\t\t\tvar cache, uniqueCache, outerCache, node, nodeIndex, start,\n\t\t\t\t\t\tdir = simple !== forward ? \"nextSibling\" : \"previousSibling\",\n\t\t\t\t\t\tparent = elem.parentNode,\n\t\t\t\t\t\tname = ofType && elem.nodeName.toLowerCase(),\n\t\t\t\t\t\tuseCache = !xml && !ofType,\n\t\t\t\t\t\tdiff = false;\n\n\t\t\t\t\tif ( parent ) {\n\n\t\t\t\t\t\t// :(first|last|only)-(child|of-type)\n\t\t\t\t\t\tif ( simple ) {\n\t\t\t\t\t\t\twhile ( dir ) {\n\t\t\t\t\t\t\t\tnode = elem;\n\t\t\t\t\t\t\t\twhile ( (node = node[ dir ]) ) {\n\t\t\t\t\t\t\t\t\tif ( ofType ?\n\t\t\t\t\t\t\t\t\t\tnode.nodeName.toLowerCase() === name :\n\t\t\t\t\t\t\t\t\t\tnode.nodeType === 1 ) {\n\n\t\t\t\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t// Reverse direction for :only-* (if we haven't yet done so)\n\t\t\t\t\t\t\t\tstart = dir = type === \"only\" && !start && \"nextSibling\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tstart = [ forward ? parent.firstChild : parent.lastChild ];\n\n\t\t\t\t\t\t// non-xml :nth-child(...) stores cache data on `parent`\n\t\t\t\t\t\tif ( forward && useCache ) {\n\n\t\t\t\t\t\t\t// Seek `elem` from a previously-cached index\n\n\t\t\t\t\t\t\t// ...in a gzip-friendly way\n\t\t\t\t\t\t\tnode = parent;\n\t\t\t\t\t\t\touterCache = node[ expando ] || (node[ expando ] = {});\n\n\t\t\t\t\t\t\t// Support: IE <9 only\n\t\t\t\t\t\t\t// Defend against cloned attroperties (jQuery gh-1709)\n\t\t\t\t\t\t\tuniqueCache = outerCache[ node.uniqueID ] ||\n\t\t\t\t\t\t\t\t(outerCache[ node.uniqueID ] = {});\n\n\t\t\t\t\t\t\tcache = uniqueCache[ type ] || [];\n\t\t\t\t\t\t\tnodeIndex = cache[ 0 ] === dirruns && cache[ 1 ];\n\t\t\t\t\t\t\tdiff = nodeIndex && cache[ 2 ];\n\t\t\t\t\t\t\tnode = nodeIndex && parent.childNodes[ nodeIndex ];\n\n\t\t\t\t\t\t\twhile ( (node = ++nodeIndex && node && node[ dir ] ||\n\n\t\t\t\t\t\t\t\t// Fallback to seeking `elem` from the start\n\t\t\t\t\t\t\t\t(diff = nodeIndex = 0) || start.pop()) ) {\n\n\t\t\t\t\t\t\t\t// When found, cache indexes on `parent` and break\n\t\t\t\t\t\t\t\tif ( node.nodeType === 1 && ++diff && node === elem ) {\n\t\t\t\t\t\t\t\t\tuniqueCache[ type ] = [ dirruns, nodeIndex, diff ];\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// Use previously-cached element index if available\n\t\t\t\t\t\t\tif ( useCache ) {\n\t\t\t\t\t\t\t\t// ...in a gzip-friendly way\n\t\t\t\t\t\t\t\tnode = elem;\n\t\t\t\t\t\t\t\touterCache = node[ expando ] || (node[ expando ] = {});\n\n\t\t\t\t\t\t\t\t// Support: IE <9 only\n\t\t\t\t\t\t\t\t// Defend against cloned attroperties (jQuery gh-1709)\n\t\t\t\t\t\t\t\tuniqueCache = outerCache[ node.uniqueID ] ||\n\t\t\t\t\t\t\t\t\t(outerCache[ node.uniqueID ] = {});\n\n\t\t\t\t\t\t\t\tcache = uniqueCache[ type ] || [];\n\t\t\t\t\t\t\t\tnodeIndex = cache[ 0 ] === dirruns && cache[ 1 ];\n\t\t\t\t\t\t\t\tdiff = nodeIndex;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// xml :nth-child(...)\n\t\t\t\t\t\t\t// or :nth-last-child(...) or :nth(-last)?-of-type(...)\n\t\t\t\t\t\t\tif ( diff === false ) {\n\t\t\t\t\t\t\t\t// Use the same loop as above to seek `elem` from the start\n\t\t\t\t\t\t\t\twhile ( (node = ++nodeIndex && node && node[ dir ] ||\n\t\t\t\t\t\t\t\t\t(diff = nodeIndex = 0) || start.pop()) ) {\n\n\t\t\t\t\t\t\t\t\tif ( ( ofType ?\n\t\t\t\t\t\t\t\t\t\tnode.nodeName.toLowerCase() === name :\n\t\t\t\t\t\t\t\t\t\tnode.nodeType === 1 ) &&\n\t\t\t\t\t\t\t\t\t\t++diff ) {\n\n\t\t\t\t\t\t\t\t\t\t// Cache the index of each encountered element\n\t\t\t\t\t\t\t\t\t\tif ( useCache ) {\n\t\t\t\t\t\t\t\t\t\t\touterCache = node[ expando ] || (node[ expando ] = {});\n\n\t\t\t\t\t\t\t\t\t\t\t// Support: IE <9 only\n\t\t\t\t\t\t\t\t\t\t\t// Defend against cloned attroperties (jQuery gh-1709)\n\t\t\t\t\t\t\t\t\t\t\tuniqueCache = outerCache[ node.uniqueID ] ||\n\t\t\t\t\t\t\t\t\t\t\t\t(outerCache[ node.uniqueID ] = {});\n\n\t\t\t\t\t\t\t\t\t\t\tuniqueCache[ type ] = [ dirruns, diff ];\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\tif ( node === elem ) {\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Incorporate the offset, then check against cycle size\n\t\t\t\t\t\tdiff -= last;\n\t\t\t\t\t\treturn diff === first || ( diff % first === 0 && diff / first >= 0 );\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t},\n\n\t\t\"PSEUDO\": function( pseudo, argument ) {\n\t\t\t// pseudo-class names are case-insensitive\n\t\t\t// http://www.w3.org/TR/selectors/#pseudo-classes\n\t\t\t// Prioritize by case sensitivity in case custom pseudos are added with uppercase letters\n\t\t\t// Remember that setFilters inherits from pseudos\n\t\t\tvar args,\n\t\t\t\tfn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] ||\n\t\t\t\t\tSizzle.error( \"unsupported pseudo: \" + pseudo );\n\n\t\t\t// The user may use createPseudo to indicate that\n\t\t\t// arguments are needed to create the filter function\n\t\t\t// just as Sizzle does\n\t\t\tif ( fn[ expando ] ) {\n\t\t\t\treturn fn( argument );\n\t\t\t}\n\n\t\t\t// But maintain support for old signatures\n\t\t\tif ( fn.length > 1 ) {\n\t\t\t\targs = [ pseudo, pseudo, \"\", argument ];\n\t\t\t\treturn Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ?\n\t\t\t\t\tmarkFunction(function( seed, matches ) {\n\t\t\t\t\t\tvar idx,\n\t\t\t\t\t\t\tmatched = fn( seed, argument ),\n\t\t\t\t\t\t\ti = matched.length;\n\t\t\t\t\t\twhile ( i-- ) {\n\t\t\t\t\t\t\tidx = indexOf( seed, matched[i] );\n\t\t\t\t\t\t\tseed[ idx ] = !( matches[ idx ] = matched[i] );\n\t\t\t\t\t\t}\n\t\t\t\t\t}) :\n\t\t\t\t\tfunction( elem ) {\n\t\t\t\t\t\treturn fn( elem, 0, args );\n\t\t\t\t\t};\n\t\t\t}\n\n\t\t\treturn fn;\n\t\t}\n\t},\n\n\tpseudos: {\n\t\t// Potentially complex pseudos\n\t\t\"not\": markFunction(function( selector ) {\n\t\t\t// Trim the selector passed to compile\n\t\t\t// to avoid treating leading and trailing\n\t\t\t// spaces as combinators\n\t\t\tvar input = [],\n\t\t\t\tresults = [],\n\t\t\t\tmatcher = compile( selector.replace( rtrim, \"$1\" ) );\n\n\t\t\treturn matcher[ expando ] ?\n\t\t\t\tmarkFunction(function( seed, matches, context, xml ) {\n\t\t\t\t\tvar elem,\n\t\t\t\t\t\tunmatched = matcher( seed, null, xml, [] ),\n\t\t\t\t\t\ti = seed.length;\n\n\t\t\t\t\t// Match elements unmatched by `matcher`\n\t\t\t\t\twhile ( i-- ) {\n\t\t\t\t\t\tif ( (elem = unmatched[i]) ) {\n\t\t\t\t\t\t\tseed[i] = !(matches[i] = elem);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}) :\n\t\t\t\tfunction( elem, context, xml ) {\n\t\t\t\t\tinput[0] = elem;\n\t\t\t\t\tmatcher( input, null, xml, results );\n\t\t\t\t\t// Don't keep the element (issue #299)\n\t\t\t\t\tinput[0] = null;\n\t\t\t\t\treturn !results.pop();\n\t\t\t\t};\n\t\t}),\n\n\t\t\"has\": markFunction(function( selector ) {\n\t\t\treturn function( elem ) {\n\t\t\t\treturn Sizzle( selector, elem ).length > 0;\n\t\t\t};\n\t\t}),\n\n\t\t\"contains\": markFunction(function( text ) {\n\t\t\ttext = text.replace( runescape, funescape );\n\t\t\treturn function( elem ) {\n\t\t\t\treturn ( elem.textContent || elem.innerText || getText( elem ) ).indexOf( text ) > -1;\n\t\t\t};\n\t\t}),\n\n\t\t// \"Whether an element is represented by a :lang() selector\n\t\t// is based solely on the element's language value\n\t\t// being equal to the identifier C,\n\t\t// or beginning with the identifier C immediately followed by \"-\".\n\t\t// The matching of C against the element's language value is performed case-insensitively.\n\t\t// The identifier C does not have to be a valid language name.\"\n\t\t// http://www.w3.org/TR/selectors/#lang-pseudo\n\t\t\"lang\": markFunction( function( lang ) {\n\t\t\t// lang value must be a valid identifier\n\t\t\tif ( !ridentifier.test(lang || \"\") ) {\n\t\t\t\tSizzle.error( \"unsupported lang: \" + lang );\n\t\t\t}\n\t\t\tlang = lang.replace( runescape, funescape ).toLowerCase();\n\t\t\treturn function( elem ) {\n\t\t\t\tvar elemLang;\n\t\t\t\tdo {\n\t\t\t\t\tif ( (elemLang = documentIsHTML ?\n\t\t\t\t\t\telem.lang :\n\t\t\t\t\t\telem.getAttribute(\"xml:lang\") || elem.getAttribute(\"lang\")) ) {\n\n\t\t\t\t\t\telemLang = elemLang.toLowerCase();\n\t\t\t\t\t\treturn elemLang === lang || elemLang.indexOf( lang + \"-\" ) === 0;\n\t\t\t\t\t}\n\t\t\t\t} while ( (elem = elem.parentNode) && elem.nodeType === 1 );\n\t\t\t\treturn false;\n\t\t\t};\n\t\t}),\n\n\t\t// Miscellaneous\n\t\t\"target\": function( elem ) {\n\t\t\tvar hash = window.location && window.location.hash;\n\t\t\treturn hash && hash.slice( 1 ) === elem.id;\n\t\t},\n\n\t\t\"root\": function( elem ) {\n\t\t\treturn elem === docElem;\n\t\t},\n\n\t\t\"focus\": function( elem ) {\n\t\t\treturn elem === document.activeElement && (!document.hasFocus || document.hasFocus()) && !!(elem.type || elem.href || ~elem.tabIndex);\n\t\t},\n\n\t\t// Boolean properties\n\t\t\"enabled\": function( elem ) {\n\t\t\treturn elem.disabled === false;\n\t\t},\n\n\t\t\"disabled\": function( elem ) {\n\t\t\treturn elem.disabled === true;\n\t\t},\n\n\t\t\"checked\": function( elem ) {\n\t\t\t// In CSS3, :checked should return both checked and selected elements\n\t\t\t// http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked\n\t\t\tvar nodeName = elem.nodeName.toLowerCase();\n\t\t\treturn (nodeName === \"input\" && !!elem.checked) || (nodeName === \"option\" && !!elem.selected);\n\t\t},\n\n\t\t\"selected\": function( elem ) {\n\t\t\t// Accessing this property makes selected-by-default\n\t\t\t// options in Safari work properly\n\t\t\tif ( elem.parentNode ) {\n\t\t\t\telem.parentNode.selectedIndex;\n\t\t\t}\n\n\t\t\treturn elem.selected === true;\n\t\t},\n\n\t\t// Contents\n\t\t\"empty\": function( elem ) {\n\t\t\t// http://www.w3.org/TR/selectors/#empty-pseudo\n\t\t\t// :empty is negated by element (1) or content nodes (text: 3; cdata: 4; entity ref: 5),\n\t\t\t//   but not by others (comment: 8; processing instruction: 7; etc.)\n\t\t\t// nodeType < 6 works because attributes (2) do not appear as children\n\t\t\tfor ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {\n\t\t\t\tif ( elem.nodeType < 6 ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true;\n\t\t},\n\n\t\t\"parent\": function( elem ) {\n\t\t\treturn !Expr.pseudos[\"empty\"]( elem );\n\t\t},\n\n\t\t// Element/input types\n\t\t\"header\": function( elem ) {\n\t\t\treturn rheader.test( elem.nodeName );\n\t\t},\n\n\t\t\"input\": function( elem ) {\n\t\t\treturn rinputs.test( elem.nodeName );\n\t\t},\n\n\t\t\"button\": function( elem ) {\n\t\t\tvar name = elem.nodeName.toLowerCase();\n\t\t\treturn name === \"input\" && elem.type === \"button\" || name === \"button\";\n\t\t},\n\n\t\t\"text\": function( elem ) {\n\t\t\tvar attr;\n\t\t\treturn elem.nodeName.toLowerCase() === \"input\" &&\n\t\t\t\telem.type === \"text\" &&\n\n\t\t\t\t// Support: IE<8\n\t\t\t\t// New HTML5 attribute values (e.g., \"search\") appear with elem.type === \"text\"\n\t\t\t\t( (attr = elem.getAttribute(\"type\")) == null || attr.toLowerCase() === \"text\" );\n\t\t},\n\n\t\t// Position-in-collection\n\t\t\"first\": createPositionalPseudo(function() {\n\t\t\treturn [ 0 ];\n\t\t}),\n\n\t\t\"last\": createPositionalPseudo(function( matchIndexes, length ) {\n\t\t\treturn [ length - 1 ];\n\t\t}),\n\n\t\t\"eq\": createPositionalPseudo(function( matchIndexes, length, argument ) {\n\t\t\treturn [ argument < 0 ? argument + length : argument ];\n\t\t}),\n\n\t\t\"even\": createPositionalPseudo(function( matchIndexes, length ) {\n\t\t\tvar i = 0;\n\t\t\tfor ( ; i < length; i += 2 ) {\n\t\t\t\tmatchIndexes.push( i );\n\t\t\t}\n\t\t\treturn matchIndexes;\n\t\t}),\n\n\t\t\"odd\": createPositionalPseudo(function( matchIndexes, length ) {\n\t\t\tvar i = 1;\n\t\t\tfor ( ; i < length; i += 2 ) {\n\t\t\t\tmatchIndexes.push( i );\n\t\t\t}\n\t\t\treturn matchIndexes;\n\t\t}),\n\n\t\t\"lt\": createPositionalPseudo(function( matchIndexes, length, argument ) {\n\t\t\tvar i = argument < 0 ? argument + length : argument;\n\t\t\tfor ( ; --i >= 0; ) {\n\t\t\t\tmatchIndexes.push( i );\n\t\t\t}\n\t\t\treturn matchIndexes;\n\t\t}),\n\n\t\t\"gt\": createPositionalPseudo(function( matchIndexes, length, argument ) {\n\t\t\tvar i = argument < 0 ? argument + length : argument;\n\t\t\tfor ( ; ++i < length; ) {\n\t\t\t\tmatchIndexes.push( i );\n\t\t\t}\n\t\t\treturn matchIndexes;\n\t\t})\n\t}\n};\n\nExpr.pseudos[\"nth\"] = Expr.pseudos[\"eq\"];\n\n// Add button/input type pseudos\nfor ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) {\n\tExpr.pseudos[ i ] = createInputPseudo( i );\n}\nfor ( i in { submit: true, reset: true } ) {\n\tExpr.pseudos[ i ] = createButtonPseudo( i );\n}\n\n// Easy API for creating new setFilters\nfunction setFilters() {}\nsetFilters.prototype = Expr.filters = Expr.pseudos;\nExpr.setFilters = new setFilters();\n\ntokenize = Sizzle.tokenize = function( selector, parseOnly ) {\n\tvar matched, match, tokens, type,\n\t\tsoFar, groups, preFilters,\n\t\tcached = tokenCache[ selector + \" \" ];\n\n\tif ( cached ) {\n\t\treturn parseOnly ? 0 : cached.slice( 0 );\n\t}\n\n\tsoFar = selector;\n\tgroups = [];\n\tpreFilters = Expr.preFilter;\n\n\twhile ( soFar ) {\n\n\t\t// Comma and first run\n\t\tif ( !matched || (match = rcomma.exec( soFar )) ) {\n\t\t\tif ( match ) {\n\t\t\t\t// Don't consume trailing commas as valid\n\t\t\t\tsoFar = soFar.slice( match[0].length ) || soFar;\n\t\t\t}\n\t\t\tgroups.push( (tokens = []) );\n\t\t}\n\n\t\tmatched = false;\n\n\t\t// Combinators\n\t\tif ( (match = rcombinators.exec( soFar )) ) {\n\t\t\tmatched = match.shift();\n\t\t\ttokens.push({\n\t\t\t\tvalue: matched,\n\t\t\t\t// Cast descendant combinators to space\n\t\t\t\ttype: match[0].replace( rtrim, \" \" )\n\t\t\t});\n\t\t\tsoFar = soFar.slice( matched.length );\n\t\t}\n\n\t\t// Filters\n\t\tfor ( type in Expr.filter ) {\n\t\t\tif ( (match = matchExpr[ type ].exec( soFar )) && (!preFilters[ type ] ||\n\t\t\t\t(match = preFilters[ type ]( match ))) ) {\n\t\t\t\tmatched = match.shift();\n\t\t\t\ttokens.push({\n\t\t\t\t\tvalue: matched,\n\t\t\t\t\ttype: type,\n\t\t\t\t\tmatches: match\n\t\t\t\t});\n\t\t\t\tsoFar = soFar.slice( matched.length );\n\t\t\t}\n\t\t}\n\n\t\tif ( !matched ) {\n\t\t\tbreak;\n\t\t}\n\t}\n\n\t// Return the length of the invalid excess\n\t// if we're just parsing\n\t// Otherwise, throw an error or return tokens\n\treturn parseOnly ?\n\t\tsoFar.length :\n\t\tsoFar ?\n\t\t\tSizzle.error( selector ) :\n\t\t\t// Cache the tokens\n\t\t\ttokenCache( selector, groups ).slice( 0 );\n};\n\nfunction toSelector( tokens ) {\n\tvar i = 0,\n\t\tlen = tokens.length,\n\t\tselector = \"\";\n\tfor ( ; i < len; i++ ) {\n\t\tselector += tokens[i].value;\n\t}\n\treturn selector;\n}\n\nfunction addCombinator( matcher, combinator, base ) {\n\tvar dir = combinator.dir,\n\t\tcheckNonElements = base && dir === \"parentNode\",\n\t\tdoneName = done++;\n\n\treturn combinator.first ?\n\t\t// Check against closest ancestor/preceding element\n\t\tfunction( elem, context, xml ) {\n\t\t\twhile ( (elem = elem[ dir ]) ) {\n\t\t\t\tif ( elem.nodeType === 1 || checkNonElements ) {\n\t\t\t\t\treturn matcher( elem, context, xml );\n\t\t\t\t}\n\t\t\t}\n\t\t} :\n\n\t\t// Check against all ancestor/preceding elements\n\t\tfunction( elem, context, xml ) {\n\t\t\tvar oldCache, uniqueCache, outerCache,\n\t\t\t\tnewCache = [ dirruns, doneName ];\n\n\t\t\t// We can't set arbitrary data on XML nodes, so they don't benefit from combinator caching\n\t\t\tif ( xml ) {\n\t\t\t\twhile ( (elem = elem[ dir ]) ) {\n\t\t\t\t\tif ( elem.nodeType === 1 || checkNonElements ) {\n\t\t\t\t\t\tif ( matcher( elem, context, xml ) ) {\n\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\twhile ( (elem = elem[ dir ]) ) {\n\t\t\t\t\tif ( elem.nodeType === 1 || checkNonElements ) {\n\t\t\t\t\t\touterCache = elem[ expando ] || (elem[ expando ] = {});\n\n\t\t\t\t\t\t// Support: IE <9 only\n\t\t\t\t\t\t// Defend against cloned attroperties (jQuery gh-1709)\n\t\t\t\t\t\tuniqueCache = outerCache[ elem.uniqueID ] || (outerCache[ elem.uniqueID ] = {});\n\n\t\t\t\t\t\tif ( (oldCache = uniqueCache[ dir ]) &&\n\t\t\t\t\t\t\toldCache[ 0 ] === dirruns && oldCache[ 1 ] === doneName ) {\n\n\t\t\t\t\t\t\t// Assign to newCache so results back-propagate to previous elements\n\t\t\t\t\t\t\treturn (newCache[ 2 ] = oldCache[ 2 ]);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// Reuse newcache so results back-propagate to previous elements\n\t\t\t\t\t\t\tuniqueCache[ dir ] = newCache;\n\n\t\t\t\t\t\t\t// A match means we're done; a fail means we have to keep checking\n\t\t\t\t\t\t\tif ( (newCache[ 2 ] = matcher( elem, context, xml )) ) {\n\t\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t};\n}\n\nfunction elementMatcher( matchers ) {\n\treturn matchers.length > 1 ?\n\t\tfunction( elem, context, xml ) {\n\t\t\tvar i = matchers.length;\n\t\t\twhile ( i-- ) {\n\t\t\t\tif ( !matchers[i]( elem, context, xml ) ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true;\n\t\t} :\n\t\tmatchers[0];\n}\n\nfunction multipleContexts( selector, contexts, results ) {\n\tvar i = 0,\n\t\tlen = contexts.length;\n\tfor ( ; i < len; i++ ) {\n\t\tSizzle( selector, contexts[i], results );\n\t}\n\treturn results;\n}\n\nfunction condense( unmatched, map, filter, context, xml ) {\n\tvar elem,\n\t\tnewUnmatched = [],\n\t\ti = 0,\n\t\tlen = unmatched.length,\n\t\tmapped = map != null;\n\n\tfor ( ; i < len; i++ ) {\n\t\tif ( (elem = unmatched[i]) ) {\n\t\t\tif ( !filter || filter( elem, context, xml ) ) {\n\t\t\t\tnewUnmatched.push( elem );\n\t\t\t\tif ( mapped ) {\n\t\t\t\t\tmap.push( i );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn newUnmatched;\n}\n\nfunction setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) {\n\tif ( postFilter && !postFilter[ expando ] ) {\n\t\tpostFilter = setMatcher( postFilter );\n\t}\n\tif ( postFinder && !postFinder[ expando ] ) {\n\t\tpostFinder = setMatcher( postFinder, postSelector );\n\t}\n\treturn markFunction(function( seed, results, context, xml ) {\n\t\tvar temp, i, elem,\n\t\t\tpreMap = [],\n\t\t\tpostMap = [],\n\t\t\tpreexisting = results.length,\n\n\t\t\t// Get initial elements from seed or context\n\t\t\telems = seed || multipleContexts( selector || \"*\", context.nodeType ? [ context ] : context, [] ),\n\n\t\t\t// Prefilter to get matcher input, preserving a map for seed-results synchronization\n\t\t\tmatcherIn = preFilter && ( seed || !selector ) ?\n\t\t\t\tcondense( elems, preMap, preFilter, context, xml ) :\n\t\t\t\telems,\n\n\t\t\tmatcherOut = matcher ?\n\t\t\t\t// If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results,\n\t\t\t\tpostFinder || ( seed ? preFilter : preexisting || postFilter ) ?\n\n\t\t\t\t\t// ...intermediate processing is necessary\n\t\t\t\t\t[] :\n\n\t\t\t\t\t// ...otherwise use results directly\n\t\t\t\t\tresults :\n\t\t\t\tmatcherIn;\n\n\t\t// Find primary matches\n\t\tif ( matcher ) {\n\t\t\tmatcher( matcherIn, matcherOut, context, xml );\n\t\t}\n\n\t\t// Apply postFilter\n\t\tif ( postFilter ) {\n\t\t\ttemp = condense( matcherOut, postMap );\n\t\t\tpostFilter( temp, [], context, xml );\n\n\t\t\t// Un-match failing elements by moving them back to matcherIn\n\t\t\ti = temp.length;\n\t\t\twhile ( i-- ) {\n\t\t\t\tif ( (elem = temp[i]) ) {\n\t\t\t\t\tmatcherOut[ postMap[i] ] = !(matcherIn[ postMap[i] ] = elem);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif ( seed ) {\n\t\t\tif ( postFinder || preFilter ) {\n\t\t\t\tif ( postFinder ) {\n\t\t\t\t\t// Get the final matcherOut by condensing this intermediate into postFinder contexts\n\t\t\t\t\ttemp = [];\n\t\t\t\t\ti = matcherOut.length;\n\t\t\t\t\twhile ( i-- ) {\n\t\t\t\t\t\tif ( (elem = matcherOut[i]) ) {\n\t\t\t\t\t\t\t// Restore matcherIn since elem is not yet a final match\n\t\t\t\t\t\t\ttemp.push( (matcherIn[i] = elem) );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tpostFinder( null, (matcherOut = []), temp, xml );\n\t\t\t\t}\n\n\t\t\t\t// Move matched elements from seed to results to keep them synchronized\n\t\t\t\ti = matcherOut.length;\n\t\t\t\twhile ( i-- ) {\n\t\t\t\t\tif ( (elem = matcherOut[i]) &&\n\t\t\t\t\t\t(temp = postFinder ? indexOf( seed, elem ) : preMap[i]) > -1 ) {\n\n\t\t\t\t\t\tseed[temp] = !(results[temp] = elem);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t// Add elements to results, through postFinder if defined\n\t\t} else {\n\t\t\tmatcherOut = condense(\n\t\t\t\tmatcherOut === results ?\n\t\t\t\t\tmatcherOut.splice( preexisting, matcherOut.length ) :\n\t\t\t\t\tmatcherOut\n\t\t\t);\n\t\t\tif ( postFinder ) {\n\t\t\t\tpostFinder( null, results, matcherOut, xml );\n\t\t\t} else {\n\t\t\t\tpush.apply( results, matcherOut );\n\t\t\t}\n\t\t}\n\t});\n}\n\nfunction matcherFromTokens( tokens ) {\n\tvar checkContext, matcher, j,\n\t\tlen = tokens.length,\n\t\tleadingRelative = Expr.relative[ tokens[0].type ],\n\t\timplicitRelative = leadingRelative || Expr.relative[\" \"],\n\t\ti = leadingRelative ? 1 : 0,\n\n\t\t// The foundational matcher ensures that elements are reachable from top-level context(s)\n\t\tmatchContext = addCombinator( function( elem ) {\n\t\t\treturn elem === checkContext;\n\t\t}, implicitRelative, true ),\n\t\tmatchAnyContext = addCombinator( function( elem ) {\n\t\t\treturn indexOf( checkContext, elem ) > -1;\n\t\t}, implicitRelative, true ),\n\t\tmatchers = [ function( elem, context, xml ) {\n\t\t\tvar ret = ( !leadingRelative && ( xml || context !== outermostContext ) ) || (\n\t\t\t\t(checkContext = context).nodeType ?\n\t\t\t\t\tmatchContext( elem, context, xml ) :\n\t\t\t\t\tmatchAnyContext( elem, context, xml ) );\n\t\t\t// Avoid hanging onto element (issue #299)\n\t\t\tcheckContext = null;\n\t\t\treturn ret;\n\t\t} ];\n\n\tfor ( ; i < len; i++ ) {\n\t\tif ( (matcher = Expr.relative[ tokens[i].type ]) ) {\n\t\t\tmatchers = [ addCombinator(elementMatcher( matchers ), matcher) ];\n\t\t} else {\n\t\t\tmatcher = Expr.filter[ tokens[i].type ].apply( null, tokens[i].matches );\n\n\t\t\t// Return special upon seeing a positional matcher\n\t\t\tif ( matcher[ expando ] ) {\n\t\t\t\t// Find the next relative operator (if any) for proper handling\n\t\t\t\tj = ++i;\n\t\t\t\tfor ( ; j < len; j++ ) {\n\t\t\t\t\tif ( Expr.relative[ tokens[j].type ] ) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn setMatcher(\n\t\t\t\t\ti > 1 && elementMatcher( matchers ),\n\t\t\t\t\ti > 1 && toSelector(\n\t\t\t\t\t\t// If the preceding token was a descendant combinator, insert an implicit any-element `*`\n\t\t\t\t\t\ttokens.slice( 0, i - 1 ).concat({ value: tokens[ i - 2 ].type === \" \" ? \"*\" : \"\" })\n\t\t\t\t\t).replace( rtrim, \"$1\" ),\n\t\t\t\t\tmatcher,\n\t\t\t\t\ti < j && matcherFromTokens( tokens.slice( i, j ) ),\n\t\t\t\t\tj < len && matcherFromTokens( (tokens = tokens.slice( j )) ),\n\t\t\t\t\tj < len && toSelector( tokens )\n\t\t\t\t);\n\t\t\t}\n\t\t\tmatchers.push( matcher );\n\t\t}\n\t}\n\n\treturn elementMatcher( matchers );\n}\n\nfunction matcherFromGroupMatchers( elementMatchers, setMatchers ) {\n\tvar bySet = setMatchers.length > 0,\n\t\tbyElement = elementMatchers.length > 0,\n\t\tsuperMatcher = function( seed, context, xml, results, outermost ) {\n\t\t\tvar elem, j, matcher,\n\t\t\t\tmatchedCount = 0,\n\t\t\t\ti = \"0\",\n\t\t\t\tunmatched = seed && [],\n\t\t\t\tsetMatched = [],\n\t\t\t\tcontextBackup = outermostContext,\n\t\t\t\t// We must always have either seed elements or outermost context\n\t\t\t\telems = seed || byElement && Expr.find[\"TAG\"]( \"*\", outermost ),\n\t\t\t\t// Use integer dirruns iff this is the outermost matcher\n\t\t\t\tdirrunsUnique = (dirruns += contextBackup == null ? 1 : Math.random() || 0.1),\n\t\t\t\tlen = elems.length;\n\n\t\t\tif ( outermost ) {\n\t\t\t\toutermostContext = context === document || context || outermost;\n\t\t\t}\n\n\t\t\t// Add elements passing elementMatchers directly to results\n\t\t\t// Support: IE<9, Safari\n\t\t\t// Tolerate NodeList properties (IE: \"length\"; Safari: <number>) matching elements by id\n\t\t\tfor ( ; i !== len && (elem = elems[i]) != null; i++ ) {\n\t\t\t\tif ( byElement && elem ) {\n\t\t\t\t\tj = 0;\n\t\t\t\t\tif ( !context && elem.ownerDocument !== document ) {\n\t\t\t\t\t\tsetDocument( elem );\n\t\t\t\t\t\txml = !documentIsHTML;\n\t\t\t\t\t}\n\t\t\t\t\twhile ( (matcher = elementMatchers[j++]) ) {\n\t\t\t\t\t\tif ( matcher( elem, context || document, xml) ) {\n\t\t\t\t\t\t\tresults.push( elem );\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif ( outermost ) {\n\t\t\t\t\t\tdirruns = dirrunsUnique;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Track unmatched elements for set filters\n\t\t\t\tif ( bySet ) {\n\t\t\t\t\t// They will have gone through all possible matchers\n\t\t\t\t\tif ( (elem = !matcher && elem) ) {\n\t\t\t\t\t\tmatchedCount--;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Lengthen the array for every element, matched or not\n\t\t\t\t\tif ( seed ) {\n\t\t\t\t\t\tunmatched.push( elem );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// `i` is now the count of elements visited above, and adding it to `matchedCount`\n\t\t\t// makes the latter nonnegative.\n\t\t\tmatchedCount += i;\n\n\t\t\t// Apply set filters to unmatched elements\n\t\t\t// NOTE: This can be skipped if there are no unmatched elements (i.e., `matchedCount`\n\t\t\t// equals `i`), unless we didn't visit _any_ elements in the above loop because we have\n\t\t\t// no element matchers and no seed.\n\t\t\t// Incrementing an initially-string \"0\" `i` allows `i` to remain a string only in that\n\t\t\t// case, which will result in a \"00\" `matchedCount` that differs from `i` but is also\n\t\t\t// numerically zero.\n\t\t\tif ( bySet && i !== matchedCount ) {\n\t\t\t\tj = 0;\n\t\t\t\twhile ( (matcher = setMatchers[j++]) ) {\n\t\t\t\t\tmatcher( unmatched, setMatched, context, xml );\n\t\t\t\t}\n\n\t\t\t\tif ( seed ) {\n\t\t\t\t\t// Reintegrate element matches to eliminate the need for sorting\n\t\t\t\t\tif ( matchedCount > 0 ) {\n\t\t\t\t\t\twhile ( i-- ) {\n\t\t\t\t\t\t\tif ( !(unmatched[i] || setMatched[i]) ) {\n\t\t\t\t\t\t\t\tsetMatched[i] = pop.call( results );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Discard index placeholder values to get only actual matches\n\t\t\t\t\tsetMatched = condense( setMatched );\n\t\t\t\t}\n\n\t\t\t\t// Add matches to results\n\t\t\t\tpush.apply( results, setMatched );\n\n\t\t\t\t// Seedless set matches succeeding multiple successful matchers stipulate sorting\n\t\t\t\tif ( outermost && !seed && setMatched.length > 0 &&\n\t\t\t\t\t( matchedCount + setMatchers.length ) > 1 ) {\n\n\t\t\t\t\tSizzle.uniqueSort( results );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Override manipulation of globals by nested matchers\n\t\t\tif ( outermost ) {\n\t\t\t\tdirruns = dirrunsUnique;\n\t\t\t\toutermostContext = contextBackup;\n\t\t\t}\n\n\t\t\treturn unmatched;\n\t\t};\n\n\treturn bySet ?\n\t\tmarkFunction( superMatcher ) :\n\t\tsuperMatcher;\n}\n\ncompile = Sizzle.compile = function( selector, match /* Internal Use Only */ ) {\n\tvar i,\n\t\tsetMatchers = [],\n\t\telementMatchers = [],\n\t\tcached = compilerCache[ selector + \" \" ];\n\n\tif ( !cached ) {\n\t\t// Generate a function of recursive functions that can be used to check each element\n\t\tif ( !match ) {\n\t\t\tmatch = tokenize( selector );\n\t\t}\n\t\ti = match.length;\n\t\twhile ( i-- ) {\n\t\t\tcached = matcherFromTokens( match[i] );\n\t\t\tif ( cached[ expando ] ) {\n\t\t\t\tsetMatchers.push( cached );\n\t\t\t} else {\n\t\t\t\telementMatchers.push( cached );\n\t\t\t}\n\t\t}\n\n\t\t// Cache the compiled function\n\t\tcached = compilerCache( selector, matcherFromGroupMatchers( elementMatchers, setMatchers ) );\n\n\t\t// Save selector and tokenization\n\t\tcached.selector = selector;\n\t}\n\treturn cached;\n};\n\n/**\n * A low-level selection function that works with Sizzle's compiled\n *  selector functions\n * @param {String|Function} selector A selector or a pre-compiled\n *  selector function built with Sizzle.compile\n * @param {Element} context\n * @param {Array} [results]\n * @param {Array} [seed] A set of elements to match against\n */\nselect = Sizzle.select = function( selector, context, results, seed ) {\n\tvar i, tokens, token, type, find,\n\t\tcompiled = typeof selector === \"function\" && selector,\n\t\tmatch = !seed && tokenize( (selector = compiled.selector || selector) );\n\n\tresults = results || [];\n\n\t// Try to minimize operations if there is only one selector in the list and no seed\n\t// (the latter of which guarantees us context)\n\tif ( match.length === 1 ) {\n\n\t\t// Reduce context if the leading compound selector is an ID\n\t\ttokens = match[0] = match[0].slice( 0 );\n\t\tif ( tokens.length > 2 && (token = tokens[0]).type === \"ID\" &&\n\t\t\t\tsupport.getById && context.nodeType === 9 && documentIsHTML &&\n\t\t\t\tExpr.relative[ tokens[1].type ] ) {\n\n\t\t\tcontext = ( Expr.find[\"ID\"]( token.matches[0].replace(runescape, funescape), context ) || [] )[0];\n\t\t\tif ( !context ) {\n\t\t\t\treturn results;\n\n\t\t\t// Precompiled matchers will still verify ancestry, so step up a level\n\t\t\t} else if ( compiled ) {\n\t\t\t\tcontext = context.parentNode;\n\t\t\t}\n\n\t\t\tselector = selector.slice( tokens.shift().value.length );\n\t\t}\n\n\t\t// Fetch a seed set for right-to-left matching\n\t\ti = matchExpr[\"needsContext\"].test( selector ) ? 0 : tokens.length;\n\t\twhile ( i-- ) {\n\t\t\ttoken = tokens[i];\n\n\t\t\t// Abort if we hit a combinator\n\t\t\tif ( Expr.relative[ (type = token.type) ] ) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ( (find = Expr.find[ type ]) ) {\n\t\t\t\t// Search, expanding context for leading sibling combinators\n\t\t\t\tif ( (seed = find(\n\t\t\t\t\ttoken.matches[0].replace( runescape, funescape ),\n\t\t\t\t\trsibling.test( tokens[0].type ) && testContext( context.parentNode ) || context\n\t\t\t\t)) ) {\n\n\t\t\t\t\t// If seed is empty or no tokens remain, we can return early\n\t\t\t\t\ttokens.splice( i, 1 );\n\t\t\t\t\tselector = seed.length && toSelector( tokens );\n\t\t\t\t\tif ( !selector ) {\n\t\t\t\t\t\tpush.apply( results, seed );\n\t\t\t\t\t\treturn results;\n\t\t\t\t\t}\n\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// Compile and execute a filtering function if one is not provided\n\t// Provide `match` to avoid retokenization if we modified the selector above\n\t( compiled || compile( selector, match ) )(\n\t\tseed,\n\t\tcontext,\n\t\t!documentIsHTML,\n\t\tresults,\n\t\t!context || rsibling.test( selector ) && testContext( context.parentNode ) || context\n\t);\n\treturn results;\n};\n\n// One-time assignments\n\n// Sort stability\nsupport.sortStable = expando.split(\"\").sort( sortOrder ).join(\"\") === expando;\n\n// Support: Chrome 14-35+\n// Always assume duplicates if they aren't passed to the comparison function\nsupport.detectDuplicates = !!hasDuplicate;\n\n// Initialize against the default document\nsetDocument();\n\n// Support: Webkit<537.32 - Safari 6.0.3/Chrome 25 (fixed in Chrome 27)\n// Detached nodes confoundingly follow *each other*\nsupport.sortDetached = assert(function( div1 ) {\n\t// Should return 1, but returns 4 (following)\n\treturn div1.compareDocumentPosition( document.createElement(\"div\") ) & 1;\n});\n\n// Support: IE<8\n// Prevent attribute/property \"interpolation\"\n// http://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx\nif ( !assert(function( div ) {\n\tdiv.innerHTML = \"<a href='#'></a>\";\n\treturn div.firstChild.getAttribute(\"href\") === \"#\" ;\n}) ) {\n\taddHandle( \"type|href|height|width\", function( elem, name, isXML ) {\n\t\tif ( !isXML ) {\n\t\t\treturn elem.getAttribute( name, name.toLowerCase() === \"type\" ? 1 : 2 );\n\t\t}\n\t});\n}\n\n// Support: IE<9\n// Use defaultValue in place of getAttribute(\"value\")\nif ( !support.attributes || !assert(function( div ) {\n\tdiv.innerHTML = \"<input/>\";\n\tdiv.firstChild.setAttribute( \"value\", \"\" );\n\treturn div.firstChild.getAttribute( \"value\" ) === \"\";\n}) ) {\n\taddHandle( \"value\", function( elem, name, isXML ) {\n\t\tif ( !isXML && elem.nodeName.toLowerCase() === \"input\" ) {\n\t\t\treturn elem.defaultValue;\n\t\t}\n\t});\n}\n\n// Support: IE<9\n// Use getAttributeNode to fetch booleans when getAttribute lies\nif ( !assert(function( div ) {\n\treturn div.getAttribute(\"disabled\") == null;\n}) ) {\n\taddHandle( booleans, function( elem, name, isXML ) {\n\t\tvar val;\n\t\tif ( !isXML ) {\n\t\t\treturn elem[ name ] === true ? name.toLowerCase() :\n\t\t\t\t\t(val = elem.getAttributeNode( name )) && val.specified ?\n\t\t\t\t\tval.value :\n\t\t\t\tnull;\n\t\t}\n\t});\n}\n\nreturn Sizzle;\n\n})( window );\n\n\n\njQuery.find = Sizzle;\njQuery.expr = Sizzle.selectors;\njQuery.expr[ \":\" ] = jQuery.expr.pseudos;\njQuery.uniqueSort = jQuery.unique = Sizzle.uniqueSort;\njQuery.text = Sizzle.getText;\njQuery.isXMLDoc = Sizzle.isXML;\njQuery.contains = Sizzle.contains;\n\n\n\nvar dir = function( elem, dir, until ) {\n\tvar matched = [],\n\t\ttruncate = until !== undefined;\n\n\twhile ( ( elem = elem[ dir ] ) && elem.nodeType !== 9 ) {\n\t\tif ( elem.nodeType === 1 ) {\n\t\t\tif ( truncate && jQuery( elem ).is( until ) ) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tmatched.push( elem );\n\t\t}\n\t}\n\treturn matched;\n};\n\n\nvar siblings = function( n, elem ) {\n\tvar matched = [];\n\n\tfor ( ; n; n = n.nextSibling ) {\n\t\tif ( n.nodeType === 1 && n !== elem ) {\n\t\t\tmatched.push( n );\n\t\t}\n\t}\n\n\treturn matched;\n};\n\n\nvar rneedsContext = jQuery.expr.match.needsContext;\n\nvar rsingleTag = ( /^<([\\w-]+)\\s*\\/?>(?:<\\/\\1>|)$/ );\n\n\n\nvar risSimple = /^.[^:#\\[\\.,]*$/;\n\n// Implement the identical functionality for filter and not\nfunction winnow( elements, qualifier, not ) {\n\tif ( jQuery.isFunction( qualifier ) ) {\n\t\treturn jQuery.grep( elements, function( elem, i ) {\n\t\t\t/* jshint -W018 */\n\t\t\treturn !!qualifier.call( elem, i, elem ) !== not;\n\t\t} );\n\n\t}\n\n\tif ( qualifier.nodeType ) {\n\t\treturn jQuery.grep( elements, function( elem ) {\n\t\t\treturn ( elem === qualifier ) !== not;\n\t\t} );\n\n\t}\n\n\tif ( typeof qualifier === \"string\" ) {\n\t\tif ( risSimple.test( qualifier ) ) {\n\t\t\treturn jQuery.filter( qualifier, elements, not );\n\t\t}\n\n\t\tqualifier = jQuery.filter( qualifier, elements );\n\t}\n\n\treturn jQuery.grep( elements, function( elem ) {\n\t\treturn ( jQuery.inArray( elem, qualifier ) > -1 ) !== not;\n\t} );\n}\n\njQuery.filter = function( expr, elems, not ) {\n\tvar elem = elems[ 0 ];\n\n\tif ( not ) {\n\t\texpr = \":not(\" + expr + \")\";\n\t}\n\n\treturn elems.length === 1 && elem.nodeType === 1 ?\n\t\tjQuery.find.matchesSelector( elem, expr ) ? [ elem ] : [] :\n\t\tjQuery.find.matches( expr, jQuery.grep( elems, function( elem ) {\n\t\t\treturn elem.nodeType === 1;\n\t\t} ) );\n};\n\njQuery.fn.extend( {\n\tfind: function( selector ) {\n\t\tvar i,\n\t\t\tret = [],\n\t\t\tself = this,\n\t\t\tlen = self.length;\n\n\t\tif ( typeof selector !== \"string\" ) {\n\t\t\treturn this.pushStack( jQuery( selector ).filter( function() {\n\t\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\t\tif ( jQuery.contains( self[ i ], this ) ) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} ) );\n\t\t}\n\n\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\tjQuery.find( selector, self[ i ], ret );\n\t\t}\n\n\t\t// Needed because $( selector, context ) becomes $( context ).find( selector )\n\t\tret = this.pushStack( len > 1 ? jQuery.unique( ret ) : ret );\n\t\tret.selector = this.selector ? this.selector + \" \" + selector : selector;\n\t\treturn ret;\n\t},\n\tfilter: function( selector ) {\n\t\treturn this.pushStack( winnow( this, selector || [], false ) );\n\t},\n\tnot: function( selector ) {\n\t\treturn this.pushStack( winnow( this, selector || [], true ) );\n\t},\n\tis: function( selector ) {\n\t\treturn !!winnow(\n\t\t\tthis,\n\n\t\t\t// If this is a positional/relative selector, check membership in the returned set\n\t\t\t// so $(\"p:first\").is(\"p:last\") won't return true for a doc with two \"p\".\n\t\t\ttypeof selector === \"string\" && rneedsContext.test( selector ) ?\n\t\t\t\tjQuery( selector ) :\n\t\t\t\tselector || [],\n\t\t\tfalse\n\t\t).length;\n\t}\n} );\n\n\n// Initialize a jQuery object\n\n\n// A central reference to the root jQuery(document)\nvar rootjQuery,\n\n\t// A simple way to check for HTML strings\n\t// Prioritize #id over <tag> to avoid XSS via location.hash (#9521)\n\t// Strict HTML recognition (#11290: must start with <)\n\trquickExpr = /^(?:\\s*(<[\\w\\W]+>)[^>]*|#([\\w-]*))$/,\n\n\tinit = jQuery.fn.init = function( selector, context, root ) {\n\t\tvar match, elem;\n\n\t\t// HANDLE: $(\"\"), $(null), $(undefined), $(false)\n\t\tif ( !selector ) {\n\t\t\treturn this;\n\t\t}\n\n\t\t// init accepts an alternate rootjQuery\n\t\t// so migrate can support jQuery.sub (gh-2101)\n\t\troot = root || rootjQuery;\n\n\t\t// Handle HTML strings\n\t\tif ( typeof selector === \"string\" ) {\n\t\t\tif ( selector.charAt( 0 ) === \"<\" &&\n\t\t\t\tselector.charAt( selector.length - 1 ) === \">\" &&\n\t\t\t\tselector.length >= 3 ) {\n\n\t\t\t\t// Assume that strings that start and end with <> are HTML and skip the regex check\n\t\t\t\tmatch = [ null, selector, null ];\n\n\t\t\t} else {\n\t\t\t\tmatch = rquickExpr.exec( selector );\n\t\t\t}\n\n\t\t\t// Match html or make sure no context is specified for #id\n\t\t\tif ( match && ( match[ 1 ] || !context ) ) {\n\n\t\t\t\t// HANDLE: $(html) -> $(array)\n\t\t\t\tif ( match[ 1 ] ) {\n\t\t\t\t\tcontext = context instanceof jQuery ? context[ 0 ] : context;\n\n\t\t\t\t\t// scripts is true for back-compat\n\t\t\t\t\t// Intentionally let the error be thrown if parseHTML is not present\n\t\t\t\t\tjQuery.merge( this, jQuery.parseHTML(\n\t\t\t\t\t\tmatch[ 1 ],\n\t\t\t\t\t\tcontext && context.nodeType ? context.ownerDocument || context : document,\n\t\t\t\t\t\ttrue\n\t\t\t\t\t) );\n\n\t\t\t\t\t// HANDLE: $(html, props)\n\t\t\t\t\tif ( rsingleTag.test( match[ 1 ] ) && jQuery.isPlainObject( context ) ) {\n\t\t\t\t\t\tfor ( match in context ) {\n\n\t\t\t\t\t\t\t// Properties of context are called as methods if possible\n\t\t\t\t\t\t\tif ( jQuery.isFunction( this[ match ] ) ) {\n\t\t\t\t\t\t\t\tthis[ match ]( context[ match ] );\n\n\t\t\t\t\t\t\t// ...and otherwise set as attributes\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tthis.attr( match, context[ match ] );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\treturn this;\n\n\t\t\t\t// HANDLE: $(#id)\n\t\t\t\t} else {\n\t\t\t\t\telem = document.getElementById( match[ 2 ] );\n\n\t\t\t\t\t// Check parentNode to catch when Blackberry 4.6 returns\n\t\t\t\t\t// nodes that are no longer in the document #6963\n\t\t\t\t\tif ( elem && elem.parentNode ) {\n\n\t\t\t\t\t\t// Handle the case where IE and Opera return items\n\t\t\t\t\t\t// by name instead of ID\n\t\t\t\t\t\tif ( elem.id !== match[ 2 ] ) {\n\t\t\t\t\t\t\treturn rootjQuery.find( selector );\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Otherwise, we inject the element directly into the jQuery object\n\t\t\t\t\t\tthis.length = 1;\n\t\t\t\t\t\tthis[ 0 ] = elem;\n\t\t\t\t\t}\n\n\t\t\t\t\tthis.context = document;\n\t\t\t\t\tthis.selector = selector;\n\t\t\t\t\treturn this;\n\t\t\t\t}\n\n\t\t\t// HANDLE: $(expr, $(...))\n\t\t\t} else if ( !context || context.jquery ) {\n\t\t\t\treturn ( context || root ).find( selector );\n\n\t\t\t// HANDLE: $(expr, context)\n\t\t\t// (which is just equivalent to: $(context).find(expr)\n\t\t\t} else {\n\t\t\t\treturn this.constructor( context ).find( selector );\n\t\t\t}\n\n\t\t// HANDLE: $(DOMElement)\n\t\t} else if ( selector.nodeType ) {\n\t\t\tthis.context = this[ 0 ] = selector;\n\t\t\tthis.length = 1;\n\t\t\treturn this;\n\n\t\t// HANDLE: $(function)\n\t\t// Shortcut for document ready\n\t\t} else if ( jQuery.isFunction( selector ) ) {\n\t\t\treturn typeof root.ready !== \"undefined\" ?\n\t\t\t\troot.ready( selector ) :\n\n\t\t\t\t// Execute immediately if ready is not present\n\t\t\t\tselector( jQuery );\n\t\t}\n\n\t\tif ( selector.selector !== undefined ) {\n\t\t\tthis.selector = selector.selector;\n\t\t\tthis.context = selector.context;\n\t\t}\n\n\t\treturn jQuery.makeArray( selector, this );\n\t};\n\n// Give the init function the jQuery prototype for later instantiation\ninit.prototype = jQuery.fn;\n\n// Initialize central reference\nrootjQuery = jQuery( document );\n\n\nvar rparentsprev = /^(?:parents|prev(?:Until|All))/,\n\n\t// methods guaranteed to produce a unique set when starting from a unique set\n\tguaranteedUnique = {\n\t\tchildren: true,\n\t\tcontents: true,\n\t\tnext: true,\n\t\tprev: true\n\t};\n\njQuery.fn.extend( {\n\thas: function( target ) {\n\t\tvar i,\n\t\t\ttargets = jQuery( target, this ),\n\t\t\tlen = targets.length;\n\n\t\treturn this.filter( function() {\n\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\tif ( jQuery.contains( this, targets[ i ] ) ) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\t},\n\n\tclosest: function( selectors, context ) {\n\t\tvar cur,\n\t\t\ti = 0,\n\t\t\tl = this.length,\n\t\t\tmatched = [],\n\t\t\tpos = rneedsContext.test( selectors ) || typeof selectors !== \"string\" ?\n\t\t\t\tjQuery( selectors, context || this.context ) :\n\t\t\t\t0;\n\n\t\tfor ( ; i < l; i++ ) {\n\t\t\tfor ( cur = this[ i ]; cur && cur !== context; cur = cur.parentNode ) {\n\n\t\t\t\t// Always skip document fragments\n\t\t\t\tif ( cur.nodeType < 11 && ( pos ?\n\t\t\t\t\tpos.index( cur ) > -1 :\n\n\t\t\t\t\t// Don't pass non-elements to Sizzle\n\t\t\t\t\tcur.nodeType === 1 &&\n\t\t\t\t\t\tjQuery.find.matchesSelector( cur, selectors ) ) ) {\n\n\t\t\t\t\tmatched.push( cur );\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn this.pushStack( matched.length > 1 ? jQuery.uniqueSort( matched ) : matched );\n\t},\n\n\t// Determine the position of an element within\n\t// the matched set of elements\n\tindex: function( elem ) {\n\n\t\t// No argument, return index in parent\n\t\tif ( !elem ) {\n\t\t\treturn ( this[ 0 ] && this[ 0 ].parentNode ) ? this.first().prevAll().length : -1;\n\t\t}\n\n\t\t// index in selector\n\t\tif ( typeof elem === \"string\" ) {\n\t\t\treturn jQuery.inArray( this[ 0 ], jQuery( elem ) );\n\t\t}\n\n\t\t// Locate the position of the desired element\n\t\treturn jQuery.inArray(\n\n\t\t\t// If it receives a jQuery object, the first element is used\n\t\t\telem.jquery ? elem[ 0 ] : elem, this );\n\t},\n\n\tadd: function( selector, context ) {\n\t\treturn this.pushStack(\n\t\t\tjQuery.uniqueSort(\n\t\t\t\tjQuery.merge( this.get(), jQuery( selector, context ) )\n\t\t\t)\n\t\t);\n\t},\n\n\taddBack: function( selector ) {\n\t\treturn this.add( selector == null ?\n\t\t\tthis.prevObject : this.prevObject.filter( selector )\n\t\t);\n\t}\n} );\n\nfunction sibling( cur, dir ) {\n\tdo {\n\t\tcur = cur[ dir ];\n\t} while ( cur && cur.nodeType !== 1 );\n\n\treturn cur;\n}\n\njQuery.each( {\n\tparent: function( elem ) {\n\t\tvar parent = elem.parentNode;\n\t\treturn parent && parent.nodeType !== 11 ? parent : null;\n\t},\n\tparents: function( elem ) {\n\t\treturn dir( elem, \"parentNode\" );\n\t},\n\tparentsUntil: function( elem, i, until ) {\n\t\treturn dir( elem, \"parentNode\", until );\n\t},\n\tnext: function( elem ) {\n\t\treturn sibling( elem, \"nextSibling\" );\n\t},\n\tprev: function( elem ) {\n\t\treturn sibling( elem, \"previousSibling\" );\n\t},\n\tnextAll: function( elem ) {\n\t\treturn dir( elem, \"nextSibling\" );\n\t},\n\tprevAll: function( elem ) {\n\t\treturn dir( elem, \"previousSibling\" );\n\t},\n\tnextUntil: function( elem, i, until ) {\n\t\treturn dir( elem, \"nextSibling\", until );\n\t},\n\tprevUntil: function( elem, i, until ) {\n\t\treturn dir( elem, \"previousSibling\", until );\n\t},\n\tsiblings: function( elem ) {\n\t\treturn siblings( ( elem.parentNode || {} ).firstChild, elem );\n\t},\n\tchildren: function( elem ) {\n\t\treturn siblings( elem.firstChild );\n\t},\n\tcontents: function( elem ) {\n\t\treturn jQuery.nodeName( elem, \"iframe\" ) ?\n\t\t\telem.contentDocument || elem.contentWindow.document :\n\t\t\tjQuery.merge( [], elem.childNodes );\n\t}\n}, function( name, fn ) {\n\tjQuery.fn[ name ] = function( until, selector ) {\n\t\tvar ret = jQuery.map( this, fn, until );\n\n\t\tif ( name.slice( -5 ) !== \"Until\" ) {\n\t\t\tselector = until;\n\t\t}\n\n\t\tif ( selector && typeof selector === \"string\" ) {\n\t\t\tret = jQuery.filter( selector, ret );\n\t\t}\n\n\t\tif ( this.length > 1 ) {\n\n\t\t\t// Remove duplicates\n\t\t\tif ( !guaranteedUnique[ name ] ) {\n\t\t\t\tret = jQuery.uniqueSort( ret );\n\t\t\t}\n\n\t\t\t// Reverse order for parents* and prev-derivatives\n\t\t\tif ( rparentsprev.test( name ) ) {\n\t\t\t\tret = ret.reverse();\n\t\t\t}\n\t\t}\n\n\t\treturn this.pushStack( ret );\n\t};\n} );\nvar rnotwhite = ( /\\S+/g );\n\n\n\n// Convert String-formatted options into Object-formatted ones\nfunction createOptions( options ) {\n\tvar object = {};\n\tjQuery.each( options.match( rnotwhite ) || [], function( _, flag ) {\n\t\tobject[ flag ] = true;\n\t} );\n\treturn object;\n}\n\n/*\n * Create a callback list using the following parameters:\n *\n *\toptions: an optional list of space-separated options that will change how\n *\t\t\tthe callback list behaves or a more traditional option object\n *\n * By default a callback list will act like an event callback list and can be\n * \"fired\" multiple times.\n *\n * Possible options:\n *\n *\tonce:\t\t\twill ensure the callback list can only be fired once (like a Deferred)\n *\n *\tmemory:\t\t\twill keep track of previous values and will call any callback added\n *\t\t\t\t\tafter the list has been fired right away with the latest \"memorized\"\n *\t\t\t\t\tvalues (like a Deferred)\n *\n *\tunique:\t\t\twill ensure a callback can only be added once (no duplicate in the list)\n *\n *\tstopOnFalse:\tinterrupt callings when a callback returns false\n *\n */\njQuery.Callbacks = function( options ) {\n\n\t// Convert options from String-formatted to Object-formatted if needed\n\t// (we check in cache first)\n\toptions = typeof options === \"string\" ?\n\t\tcreateOptions( options ) :\n\t\tjQuery.extend( {}, options );\n\n\tvar // Flag to know if list is currently firing\n\t\tfiring,\n\n\t\t// Last fire value for non-forgettable lists\n\t\tmemory,\n\n\t\t// Flag to know if list was already fired\n\t\tfired,\n\n\t\t// Flag to prevent firing\n\t\tlocked,\n\n\t\t// Actual callback list\n\t\tlist = [],\n\n\t\t// Queue of execution data for repeatable lists\n\t\tqueue = [],\n\n\t\t// Index of currently firing callback (modified by add/remove as needed)\n\t\tfiringIndex = -1,\n\n\t\t// Fire callbacks\n\t\tfire = function() {\n\n\t\t\t// Enforce single-firing\n\t\t\tlocked = options.once;\n\n\t\t\t// Execute callbacks for all pending executions,\n\t\t\t// respecting firingIndex overrides and runtime changes\n\t\t\tfired = firing = true;\n\t\t\tfor ( ; queue.length; firingIndex = -1 ) {\n\t\t\t\tmemory = queue.shift();\n\t\t\t\twhile ( ++firingIndex < list.length ) {\n\n\t\t\t\t\t// Run callback and check for early termination\n\t\t\t\t\tif ( list[ firingIndex ].apply( memory[ 0 ], memory[ 1 ] ) === false &&\n\t\t\t\t\t\toptions.stopOnFalse ) {\n\n\t\t\t\t\t\t// Jump to end and forget the data so .add doesn't re-fire\n\t\t\t\t\t\tfiringIndex = list.length;\n\t\t\t\t\t\tmemory = false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Forget the data if we're done with it\n\t\t\tif ( !options.memory ) {\n\t\t\t\tmemory = false;\n\t\t\t}\n\n\t\t\tfiring = false;\n\n\t\t\t// Clean up if we're done firing for good\n\t\t\tif ( locked ) {\n\n\t\t\t\t// Keep an empty list if we have data for future add calls\n\t\t\t\tif ( memory ) {\n\t\t\t\t\tlist = [];\n\n\t\t\t\t// Otherwise, this object is spent\n\t\t\t\t} else {\n\t\t\t\t\tlist = \"\";\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\n\t\t// Actual Callbacks object\n\t\tself = {\n\n\t\t\t// Add a callback or a collection of callbacks to the list\n\t\t\tadd: function() {\n\t\t\t\tif ( list ) {\n\n\t\t\t\t\t// If we have memory from a past run, we should fire after adding\n\t\t\t\t\tif ( memory && !firing ) {\n\t\t\t\t\t\tfiringIndex = list.length - 1;\n\t\t\t\t\t\tqueue.push( memory );\n\t\t\t\t\t}\n\n\t\t\t\t\t( function add( args ) {\n\t\t\t\t\t\tjQuery.each( args, function( _, arg ) {\n\t\t\t\t\t\t\tif ( jQuery.isFunction( arg ) ) {\n\t\t\t\t\t\t\t\tif ( !options.unique || !self.has( arg ) ) {\n\t\t\t\t\t\t\t\t\tlist.push( arg );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else if ( arg && arg.length && jQuery.type( arg ) !== \"string\" ) {\n\n\t\t\t\t\t\t\t\t// Inspect recursively\n\t\t\t\t\t\t\t\tadd( arg );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} );\n\t\t\t\t\t} )( arguments );\n\n\t\t\t\t\tif ( memory && !firing ) {\n\t\t\t\t\t\tfire();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t},\n\n\t\t\t// Remove a callback from the list\n\t\t\tremove: function() {\n\t\t\t\tjQuery.each( arguments, function( _, arg ) {\n\t\t\t\t\tvar index;\n\t\t\t\t\twhile ( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) {\n\t\t\t\t\t\tlist.splice( index, 1 );\n\n\t\t\t\t\t\t// Handle firing indexes\n\t\t\t\t\t\tif ( index <= firingIndex ) {\n\t\t\t\t\t\t\tfiringIndex--;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t\t\treturn this;\n\t\t\t},\n\n\t\t\t// Check if a given callback is in the list.\n\t\t\t// If no argument is given, return whether or not list has callbacks attached.\n\t\t\thas: function( fn ) {\n\t\t\t\treturn fn ?\n\t\t\t\t\tjQuery.inArray( fn, list ) > -1 :\n\t\t\t\t\tlist.length > 0;\n\t\t\t},\n\n\t\t\t// Remove all callbacks from the list\n\t\t\tempty: function() {\n\t\t\t\tif ( list ) {\n\t\t\t\t\tlist = [];\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t},\n\n\t\t\t// Disable .fire and .add\n\t\t\t// Abort any current/pending executions\n\t\t\t// Clear all callbacks and values\n\t\t\tdisable: function() {\n\t\t\t\tlocked = queue = [];\n\t\t\t\tlist = memory = \"\";\n\t\t\t\treturn this;\n\t\t\t},\n\t\t\tdisabled: function() {\n\t\t\t\treturn !list;\n\t\t\t},\n\n\t\t\t// Disable .fire\n\t\t\t// Also disable .add unless we have memory (since it would have no effect)\n\t\t\t// Abort any pending executions\n\t\t\tlock: function() {\n\t\t\t\tlocked = true;\n\t\t\t\tif ( !memory ) {\n\t\t\t\t\tself.disable();\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t},\n\t\t\tlocked: function() {\n\t\t\t\treturn !!locked;\n\t\t\t},\n\n\t\t\t// Call all callbacks with the given context and arguments\n\t\t\tfireWith: function( context, args ) {\n\t\t\t\tif ( !locked ) {\n\t\t\t\t\targs = args || [];\n\t\t\t\t\targs = [ context, args.slice ? args.slice() : args ];\n\t\t\t\t\tqueue.push( args );\n\t\t\t\t\tif ( !firing ) {\n\t\t\t\t\t\tfire();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t},\n\n\t\t\t// Call all the callbacks with the given arguments\n\t\t\tfire: function() {\n\t\t\t\tself.fireWith( this, arguments );\n\t\t\t\treturn this;\n\t\t\t},\n\n\t\t\t// To know if the callbacks have already been called at least once\n\t\t\tfired: function() {\n\t\t\t\treturn !!fired;\n\t\t\t}\n\t\t};\n\n\treturn self;\n};\n\n\njQuery.extend( {\n\n\tDeferred: function( func ) {\n\t\tvar tuples = [\n\n\t\t\t\t// action, add listener, listener list, final state\n\t\t\t\t[ \"resolve\", \"done\", jQuery.Callbacks( \"once memory\" ), \"resolved\" ],\n\t\t\t\t[ \"reject\", \"fail\", jQuery.Callbacks( \"once memory\" ), \"rejected\" ],\n\t\t\t\t[ \"notify\", \"progress\", jQuery.Callbacks( \"memory\" ) ]\n\t\t\t],\n\t\t\tstate = \"pending\",\n\t\t\tpromise = {\n\t\t\t\tstate: function() {\n\t\t\t\t\treturn state;\n\t\t\t\t},\n\t\t\t\talways: function() {\n\t\t\t\t\tdeferred.done( arguments ).fail( arguments );\n\t\t\t\t\treturn this;\n\t\t\t\t},\n\t\t\t\tthen: function( /* fnDone, fnFail, fnProgress */ ) {\n\t\t\t\t\tvar fns = arguments;\n\t\t\t\t\treturn jQuery.Deferred( function( newDefer ) {\n\t\t\t\t\t\tjQuery.each( tuples, function( i, tuple ) {\n\t\t\t\t\t\t\tvar fn = jQuery.isFunction( fns[ i ] ) && fns[ i ];\n\n\t\t\t\t\t\t\t// deferred[ done | fail | progress ] for forwarding actions to newDefer\n\t\t\t\t\t\t\tdeferred[ tuple[ 1 ] ]( function() {\n\t\t\t\t\t\t\t\tvar returned = fn && fn.apply( this, arguments );\n\t\t\t\t\t\t\t\tif ( returned && jQuery.isFunction( returned.promise ) ) {\n\t\t\t\t\t\t\t\t\treturned.promise()\n\t\t\t\t\t\t\t\t\t\t.progress( newDefer.notify )\n\t\t\t\t\t\t\t\t\t\t.done( newDefer.resolve )\n\t\t\t\t\t\t\t\t\t\t.fail( newDefer.reject );\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tnewDefer[ tuple[ 0 ] + \"With\" ](\n\t\t\t\t\t\t\t\t\t\tthis === promise ? newDefer.promise() : this,\n\t\t\t\t\t\t\t\t\t\tfn ? [ returned ] : arguments\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t} );\n\t\t\t\t\t\tfns = null;\n\t\t\t\t\t} ).promise();\n\t\t\t\t},\n\n\t\t\t\t// Get a promise for this deferred\n\t\t\t\t// If obj is provided, the promise aspect is added to the object\n\t\t\t\tpromise: function( obj ) {\n\t\t\t\t\treturn obj != null ? jQuery.extend( obj, promise ) : promise;\n\t\t\t\t}\n\t\t\t},\n\t\t\tdeferred = {};\n\n\t\t// Keep pipe for back-compat\n\t\tpromise.pipe = promise.then;\n\n\t\t// Add list-specific methods\n\t\tjQuery.each( tuples, function( i, tuple ) {\n\t\t\tvar list = tuple[ 2 ],\n\t\t\t\tstateString = tuple[ 3 ];\n\n\t\t\t// promise[ done | fail | progress ] = list.add\n\t\t\tpromise[ tuple[ 1 ] ] = list.add;\n\n\t\t\t// Handle state\n\t\t\tif ( stateString ) {\n\t\t\t\tlist.add( function() {\n\n\t\t\t\t\t// state = [ resolved | rejected ]\n\t\t\t\t\tstate = stateString;\n\n\t\t\t\t// [ reject_list | resolve_list ].disable; progress_list.lock\n\t\t\t\t}, tuples[ i ^ 1 ][ 2 ].disable, tuples[ 2 ][ 2 ].lock );\n\t\t\t}\n\n\t\t\t// deferred[ resolve | reject | notify ]\n\t\t\tdeferred[ tuple[ 0 ] ] = function() {\n\t\t\t\tdeferred[ tuple[ 0 ] + \"With\" ]( this === deferred ? promise : this, arguments );\n\t\t\t\treturn this;\n\t\t\t};\n\t\t\tdeferred[ tuple[ 0 ] + \"With\" ] = list.fireWith;\n\t\t} );\n\n\t\t// Make the deferred a promise\n\t\tpromise.promise( deferred );\n\n\t\t// Call given func if any\n\t\tif ( func ) {\n\t\t\tfunc.call( deferred, deferred );\n\t\t}\n\n\t\t// All done!\n\t\treturn deferred;\n\t},\n\n\t// Deferred helper\n\twhen: function( subordinate /* , ..., subordinateN */ ) {\n\t\tvar i = 0,\n\t\t\tresolveValues = slice.call( arguments ),\n\t\t\tlength = resolveValues.length,\n\n\t\t\t// the count of uncompleted subordinates\n\t\t\tremaining = length !== 1 ||\n\t\t\t\t( subordinate && jQuery.isFunction( subordinate.promise ) ) ? length : 0,\n\n\t\t\t// the master Deferred.\n\t\t\t// If resolveValues consist of only a single Deferred, just use that.\n\t\t\tdeferred = remaining === 1 ? subordinate : jQuery.Deferred(),\n\n\t\t\t// Update function for both resolve and progress values\n\t\t\tupdateFunc = function( i, contexts, values ) {\n\t\t\t\treturn function( value ) {\n\t\t\t\t\tcontexts[ i ] = this;\n\t\t\t\t\tvalues[ i ] = arguments.length > 1 ? slice.call( arguments ) : value;\n\t\t\t\t\tif ( values === progressValues ) {\n\t\t\t\t\t\tdeferred.notifyWith( contexts, values );\n\n\t\t\t\t\t} else if ( !( --remaining ) ) {\n\t\t\t\t\t\tdeferred.resolveWith( contexts, values );\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t},\n\n\t\t\tprogressValues, progressContexts, resolveContexts;\n\n\t\t// add listeners to Deferred subordinates; treat others as resolved\n\t\tif ( length > 1 ) {\n\t\t\tprogressValues = new Array( length );\n\t\t\tprogressContexts = new Array( length );\n\t\t\tresolveContexts = new Array( length );\n\t\t\tfor ( ; i < length; i++ ) {\n\t\t\t\tif ( resolveValues[ i ] && jQuery.isFunction( resolveValues[ i ].promise ) ) {\n\t\t\t\t\tresolveValues[ i ].promise()\n\t\t\t\t\t\t.progress( updateFunc( i, progressContexts, progressValues ) )\n\t\t\t\t\t\t.done( updateFunc( i, resolveContexts, resolveValues ) )\n\t\t\t\t\t\t.fail( deferred.reject );\n\t\t\t\t} else {\n\t\t\t\t\t--remaining;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// if we're not waiting on anything, resolve the master\n\t\tif ( !remaining ) {\n\t\t\tdeferred.resolveWith( resolveContexts, resolveValues );\n\t\t}\n\n\t\treturn deferred.promise();\n\t}\n} );\n\n\n// The deferred used on DOM ready\nvar readyList;\n\njQuery.fn.ready = function( fn ) {\n\n\t// Add the callback\n\tjQuery.ready.promise().done( fn );\n\n\treturn this;\n};\n\njQuery.extend( {\n\n\t// Is the DOM ready to be used? Set to true once it occurs.\n\tisReady: false,\n\n\t// A counter to track how many items to wait for before\n\t// the ready event fires. See #6781\n\treadyWait: 1,\n\n\t// Hold (or release) the ready event\n\tholdReady: function( hold ) {\n\t\tif ( hold ) {\n\t\t\tjQuery.readyWait++;\n\t\t} else {\n\t\t\tjQuery.ready( true );\n\t\t}\n\t},\n\n\t// Handle when the DOM is ready\n\tready: function( wait ) {\n\n\t\t// Abort if there are pending holds or we're already ready\n\t\tif ( wait === true ? --jQuery.readyWait : jQuery.isReady ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Remember that the DOM is ready\n\t\tjQuery.isReady = true;\n\n\t\t// If a normal DOM Ready event fired, decrement, and wait if need be\n\t\tif ( wait !== true && --jQuery.readyWait > 0 ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// If there are functions bound, to execute\n\t\treadyList.resolveWith( document, [ jQuery ] );\n\n\t\t// Trigger any bound ready events\n\t\tif ( jQuery.fn.triggerHandler ) {\n\t\t\tjQuery( document ).triggerHandler( \"ready\" );\n\t\t\tjQuery( document ).off( \"ready\" );\n\t\t}\n\t}\n} );\n\n/**\n * Clean-up method for dom ready events\n */\nfunction detach() {\n\tif ( document.addEventListener ) {\n\t\tdocument.removeEventListener( \"DOMContentLoaded\", completed );\n\t\twindow.removeEventListener( \"load\", completed );\n\n\t} else {\n\t\tdocument.detachEvent( \"onreadystatechange\", completed );\n\t\twindow.detachEvent( \"onload\", completed );\n\t}\n}\n\n/**\n * The ready event handler and self cleanup method\n */\nfunction completed() {\n\n\t// readyState === \"complete\" is good enough for us to call the dom ready in oldIE\n\tif ( document.addEventListener ||\n\t\twindow.event.type === \"load\" ||\n\t\tdocument.readyState === \"complete\" ) {\n\n\t\tdetach();\n\t\tjQuery.ready();\n\t}\n}\n\njQuery.ready.promise = function( obj ) {\n\tif ( !readyList ) {\n\n\t\treadyList = jQuery.Deferred();\n\n\t\t// Catch cases where $(document).ready() is called\n\t\t// after the browser event has already occurred.\n\t\t// Support: IE6-10\n\t\t// Older IE sometimes signals \"interactive\" too soon\n\t\tif ( document.readyState === \"complete\" ||\n\t\t\t( document.readyState !== \"loading\" && !document.documentElement.doScroll ) ) {\n\n\t\t\t// Handle it asynchronously to allow scripts the opportunity to delay ready\n\t\t\twindow.setTimeout( jQuery.ready );\n\n\t\t// Standards-based browsers support DOMContentLoaded\n\t\t} else if ( document.addEventListener ) {\n\n\t\t\t// Use the handy event callback\n\t\t\tdocument.addEventListener( \"DOMContentLoaded\", completed );\n\n\t\t\t// A fallback to window.onload, that will always work\n\t\t\twindow.addEventListener( \"load\", completed );\n\n\t\t// If IE event model is used\n\t\t} else {\n\n\t\t\t// Ensure firing before onload, maybe late but safe also for iframes\n\t\t\tdocument.attachEvent( \"onreadystatechange\", completed );\n\n\t\t\t// A fallback to window.onload, that will always work\n\t\t\twindow.attachEvent( \"onload\", completed );\n\n\t\t\t// If IE and not a frame\n\t\t\t// continually check to see if the document is ready\n\t\t\tvar top = false;\n\n\t\t\ttry {\n\t\t\t\ttop = window.frameElement == null && document.documentElement;\n\t\t\t} catch ( e ) {}\n\n\t\t\tif ( top && top.doScroll ) {\n\t\t\t\t( function doScrollCheck() {\n\t\t\t\t\tif ( !jQuery.isReady ) {\n\n\t\t\t\t\t\ttry {\n\n\t\t\t\t\t\t\t// Use the trick by Diego Perini\n\t\t\t\t\t\t\t// http://javascript.nwbox.com/IEContentLoaded/\n\t\t\t\t\t\t\ttop.doScroll( \"left\" );\n\t\t\t\t\t\t} catch ( e ) {\n\t\t\t\t\t\t\treturn window.setTimeout( doScrollCheck, 50 );\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// detach all dom ready events\n\t\t\t\t\t\tdetach();\n\n\t\t\t\t\t\t// and execute any waiting functions\n\t\t\t\t\t\tjQuery.ready();\n\t\t\t\t\t}\n\t\t\t\t} )();\n\t\t\t}\n\t\t}\n\t}\n\treturn readyList.promise( obj );\n};\n\n// Kick off the DOM ready check even if the user does not\njQuery.ready.promise();\n\n\n\n\n// Support: IE<9\n// Iteration over object's inherited properties before its own\nvar i;\nfor ( i in jQuery( support ) ) {\n\tbreak;\n}\nsupport.ownFirst = i === \"0\";\n\n// Note: most support tests are defined in their respective modules.\n// false until the test is run\nsupport.inlineBlockNeedsLayout = false;\n\n// Execute ASAP in case we need to set body.style.zoom\njQuery( function() {\n\n\t// Minified: var a,b,c,d\n\tvar val, div, body, container;\n\n\tbody = document.getElementsByTagName( \"body\" )[ 0 ];\n\tif ( !body || !body.style ) {\n\n\t\t// Return for frameset docs that don't have a body\n\t\treturn;\n\t}\n\n\t// Setup\n\tdiv = document.createElement( \"div\" );\n\tcontainer = document.createElement( \"div\" );\n\tcontainer.style.cssText = \"position:absolute;border:0;width:0;height:0;top:0;left:-9999px\";\n\tbody.appendChild( container ).appendChild( div );\n\n\tif ( typeof div.style.zoom !== \"undefined\" ) {\n\n\t\t// Support: IE<8\n\t\t// Check if natively block-level elements act like inline-block\n\t\t// elements when setting their display to 'inline' and giving\n\t\t// them layout\n\t\tdiv.style.cssText = \"display:inline;margin:0;border:0;padding:1px;width:1px;zoom:1\";\n\n\t\tsupport.inlineBlockNeedsLayout = val = div.offsetWidth === 3;\n\t\tif ( val ) {\n\n\t\t\t// Prevent IE 6 from affecting layout for positioned elements #11048\n\t\t\t// Prevent IE from shrinking the body in IE 7 mode #12869\n\t\t\t// Support: IE<8\n\t\t\tbody.style.zoom = 1;\n\t\t}\n\t}\n\n\tbody.removeChild( container );\n} );\n\n\n( function() {\n\tvar div = document.createElement( \"div\" );\n\n\t// Support: IE<9\n\tsupport.deleteExpando = true;\n\ttry {\n\t\tdelete div.test;\n\t} catch ( e ) {\n\t\tsupport.deleteExpando = false;\n\t}\n\n\t// Null elements to avoid leaks in IE.\n\tdiv = null;\n} )();\nvar acceptData = function( elem ) {\n\tvar noData = jQuery.noData[ ( elem.nodeName + \" \" ).toLowerCase() ],\n\t\tnodeType = +elem.nodeType || 1;\n\n\t// Do not set data on non-element DOM nodes because it will not be cleared (#8335).\n\treturn nodeType !== 1 && nodeType !== 9 ?\n\t\tfalse :\n\n\t\t// Nodes accept data unless otherwise specified; rejection can be conditional\n\t\t!noData || noData !== true && elem.getAttribute( \"classid\" ) === noData;\n};\n\n\n\n\nvar rbrace = /^(?:\\{[\\w\\W]*\\}|\\[[\\w\\W]*\\])$/,\n\trmultiDash = /([A-Z])/g;\n\nfunction dataAttr( elem, key, data ) {\n\n\t// If nothing was found internally, try to fetch any\n\t// data from the HTML5 data-* attribute\n\tif ( data === undefined && elem.nodeType === 1 ) {\n\n\t\tvar name = \"data-\" + key.replace( rmultiDash, \"-$1\" ).toLowerCase();\n\n\t\tdata = elem.getAttribute( name );\n\n\t\tif ( typeof data === \"string\" ) {\n\t\t\ttry {\n\t\t\t\tdata = data === \"true\" ? true :\n\t\t\t\t\tdata === \"false\" ? false :\n\t\t\t\t\tdata === \"null\" ? null :\n\n\t\t\t\t\t// Only convert to a number if it doesn't change the string\n\t\t\t\t\t+data + \"\" === data ? +data :\n\t\t\t\t\trbrace.test( data ) ? jQuery.parseJSON( data ) :\n\t\t\t\t\tdata;\n\t\t\t} catch ( e ) {}\n\n\t\t\t// Make sure we set the data so it isn't changed later\n\t\t\tjQuery.data( elem, key, data );\n\n\t\t} else {\n\t\t\tdata = undefined;\n\t\t}\n\t}\n\n\treturn data;\n}\n\n// checks a cache object for emptiness\nfunction isEmptyDataObject( obj ) {\n\tvar name;\n\tfor ( name in obj ) {\n\n\t\t// if the public data object is empty, the private is still empty\n\t\tif ( name === \"data\" && jQuery.isEmptyObject( obj[ name ] ) ) {\n\t\t\tcontinue;\n\t\t}\n\t\tif ( name !== \"toJSON\" ) {\n\t\t\treturn false;\n\t\t}\n\t}\n\n\treturn true;\n}\n\nfunction internalData( elem, name, data, pvt /* Internal Use Only */ ) {\n\tif ( !acceptData( elem ) ) {\n\t\treturn;\n\t}\n\n\tvar ret, thisCache,\n\t\tinternalKey = jQuery.expando,\n\n\t\t// We have to handle DOM nodes and JS objects differently because IE6-7\n\t\t// can't GC object references properly across the DOM-JS boundary\n\t\tisNode = elem.nodeType,\n\n\t\t// Only DOM nodes need the global jQuery cache; JS object data is\n\t\t// attached directly to the object so GC can occur automatically\n\t\tcache = isNode ? jQuery.cache : elem,\n\n\t\t// Only defining an ID for JS objects if its cache already exists allows\n\t\t// the code to shortcut on the same path as a DOM node with no cache\n\t\tid = isNode ? elem[ internalKey ] : elem[ internalKey ] && internalKey;\n\n\t// Avoid doing any more work than we need to when trying to get data on an\n\t// object that has no data at all\n\tif ( ( !id || !cache[ id ] || ( !pvt && !cache[ id ].data ) ) &&\n\t\tdata === undefined && typeof name === \"string\" ) {\n\t\treturn;\n\t}\n\n\tif ( !id ) {\n\n\t\t// Only DOM nodes need a new unique ID for each element since their data\n\t\t// ends up in the global cache\n\t\tif ( isNode ) {\n\t\t\tid = elem[ internalKey ] = deletedIds.pop() || jQuery.guid++;\n\t\t} else {\n\t\t\tid = internalKey;\n\t\t}\n\t}\n\n\tif ( !cache[ id ] ) {\n\n\t\t// Avoid exposing jQuery metadata on plain JS objects when the object\n\t\t// is serialized using JSON.stringify\n\t\tcache[ id ] = isNode ? {} : { toJSON: jQuery.noop };\n\t}\n\n\t// An object can be passed to jQuery.data instead of a key/value pair; this gets\n\t// shallow copied over onto the existing cache\n\tif ( typeof name === \"object\" || typeof name === \"function\" ) {\n\t\tif ( pvt ) {\n\t\t\tcache[ id ] = jQuery.extend( cache[ id ], name );\n\t\t} else {\n\t\t\tcache[ id ].data = jQuery.extend( cache[ id ].data, name );\n\t\t}\n\t}\n\n\tthisCache = cache[ id ];\n\n\t// jQuery data() is stored in a separate object inside the object's internal data\n\t// cache in order to avoid key collisions between internal data and user-defined\n\t// data.\n\tif ( !pvt ) {\n\t\tif ( !thisCache.data ) {\n\t\t\tthisCache.data = {};\n\t\t}\n\n\t\tthisCache = thisCache.data;\n\t}\n\n\tif ( data !== undefined ) {\n\t\tthisCache[ jQuery.camelCase( name ) ] = data;\n\t}\n\n\t// Check for both converted-to-camel and non-converted data property names\n\t// If a data property was specified\n\tif ( typeof name === \"string\" ) {\n\n\t\t// First Try to find as-is property data\n\t\tret = thisCache[ name ];\n\n\t\t// Test for null|undefined property data\n\t\tif ( ret == null ) {\n\n\t\t\t// Try to find the camelCased property\n\t\t\tret = thisCache[ jQuery.camelCase( name ) ];\n\t\t}\n\t} else {\n\t\tret = thisCache;\n\t}\n\n\treturn ret;\n}\n\nfunction internalRemoveData( elem, name, pvt ) {\n\tif ( !acceptData( elem ) ) {\n\t\treturn;\n\t}\n\n\tvar thisCache, i,\n\t\tisNode = elem.nodeType,\n\n\t\t// See jQuery.data for more information\n\t\tcache = isNode ? jQuery.cache : elem,\n\t\tid = isNode ? elem[ jQuery.expando ] : jQuery.expando;\n\n\t// If there is already no cache entry for this object, there is no\n\t// purpose in continuing\n\tif ( !cache[ id ] ) {\n\t\treturn;\n\t}\n\n\tif ( name ) {\n\n\t\tthisCache = pvt ? cache[ id ] : cache[ id ].data;\n\n\t\tif ( thisCache ) {\n\n\t\t\t// Support array or space separated string names for data keys\n\t\t\tif ( !jQuery.isArray( name ) ) {\n\n\t\t\t\t// try the string as a key before any manipulation\n\t\t\t\tif ( name in thisCache ) {\n\t\t\t\t\tname = [ name ];\n\t\t\t\t} else {\n\n\t\t\t\t\t// split the camel cased version by spaces unless a key with the spaces exists\n\t\t\t\t\tname = jQuery.camelCase( name );\n\t\t\t\t\tif ( name in thisCache ) {\n\t\t\t\t\t\tname = [ name ];\n\t\t\t\t\t} else {\n\t\t\t\t\t\tname = name.split( \" \" );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\n\t\t\t\t// If \"name\" is an array of keys...\n\t\t\t\t// When data is initially created, via (\"key\", \"val\") signature,\n\t\t\t\t// keys will be converted to camelCase.\n\t\t\t\t// Since there is no way to tell _how_ a key was added, remove\n\t\t\t\t// both plain key and camelCase key. #12786\n\t\t\t\t// This will only penalize the array argument path.\n\t\t\t\tname = name.concat( jQuery.map( name, jQuery.camelCase ) );\n\t\t\t}\n\n\t\t\ti = name.length;\n\t\t\twhile ( i-- ) {\n\t\t\t\tdelete thisCache[ name[ i ] ];\n\t\t\t}\n\n\t\t\t// If there is no data left in the cache, we want to continue\n\t\t\t// and let the cache object itself get destroyed\n\t\t\tif ( pvt ? !isEmptyDataObject( thisCache ) : !jQuery.isEmptyObject( thisCache ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t}\n\n\t// See jQuery.data for more information\n\tif ( !pvt ) {\n\t\tdelete cache[ id ].data;\n\n\t\t// Don't destroy the parent cache unless the internal data object\n\t\t// had been the only thing left in it\n\t\tif ( !isEmptyDataObject( cache[ id ] ) ) {\n\t\t\treturn;\n\t\t}\n\t}\n\n\t// Destroy the cache\n\tif ( isNode ) {\n\t\tjQuery.cleanData( [ elem ], true );\n\n\t// Use delete when supported for expandos or `cache` is not a window per isWindow (#10080)\n\t/* jshint eqeqeq: false */\n\t} else if ( support.deleteExpando || cache != cache.window ) {\n\t\t/* jshint eqeqeq: true */\n\t\tdelete cache[ id ];\n\n\t// When all else fails, undefined\n\t} else {\n\t\tcache[ id ] = undefined;\n\t}\n}\n\njQuery.extend( {\n\tcache: {},\n\n\t// The following elements (space-suffixed to avoid Object.prototype collisions)\n\t// throw uncatchable exceptions if you attempt to set expando properties\n\tnoData: {\n\t\t\"applet \": true,\n\t\t\"embed \": true,\n\n\t\t// ...but Flash objects (which have this classid) *can* handle expandos\n\t\t\"object \": \"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\"\n\t},\n\n\thasData: function( elem ) {\n\t\telem = elem.nodeType ? jQuery.cache[ elem[ jQuery.expando ] ] : elem[ jQuery.expando ];\n\t\treturn !!elem && !isEmptyDataObject( elem );\n\t},\n\n\tdata: function( elem, name, data ) {\n\t\treturn internalData( elem, name, data );\n\t},\n\n\tremoveData: function( elem, name ) {\n\t\treturn internalRemoveData( elem, name );\n\t},\n\n\t// For internal use only.\n\t_data: function( elem, name, data ) {\n\t\treturn internalData( elem, name, data, true );\n\t},\n\n\t_removeData: function( elem, name ) {\n\t\treturn internalRemoveData( elem, name, true );\n\t}\n} );\n\njQuery.fn.extend( {\n\tdata: function( key, value ) {\n\t\tvar i, name, data,\n\t\t\telem = this[ 0 ],\n\t\t\tattrs = elem && elem.attributes;\n\n\t\t// Special expections of .data basically thwart jQuery.access,\n\t\t// so implement the relevant behavior ourselves\n\n\t\t// Gets all values\n\t\tif ( key === undefined ) {\n\t\t\tif ( this.length ) {\n\t\t\t\tdata = jQuery.data( elem );\n\n\t\t\t\tif ( elem.nodeType === 1 && !jQuery._data( elem, \"parsedAttrs\" ) ) {\n\t\t\t\t\ti = attrs.length;\n\t\t\t\t\twhile ( i-- ) {\n\n\t\t\t\t\t\t// Support: IE11+\n\t\t\t\t\t\t// The attrs elements can be null (#14894)\n\t\t\t\t\t\tif ( attrs[ i ] ) {\n\t\t\t\t\t\t\tname = attrs[ i ].name;\n\t\t\t\t\t\t\tif ( name.indexOf( \"data-\" ) === 0 ) {\n\t\t\t\t\t\t\t\tname = jQuery.camelCase( name.slice( 5 ) );\n\t\t\t\t\t\t\t\tdataAttr( elem, name, data[ name ] );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tjQuery._data( elem, \"parsedAttrs\", true );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn data;\n\t\t}\n\n\t\t// Sets multiple values\n\t\tif ( typeof key === \"object\" ) {\n\t\t\treturn this.each( function() {\n\t\t\t\tjQuery.data( this, key );\n\t\t\t} );\n\t\t}\n\n\t\treturn arguments.length > 1 ?\n\n\t\t\t// Sets one value\n\t\t\tthis.each( function() {\n\t\t\t\tjQuery.data( this, key, value );\n\t\t\t} ) :\n\n\t\t\t// Gets one value\n\t\t\t// Try to fetch any internally stored data first\n\t\t\telem ? dataAttr( elem, key, jQuery.data( elem, key ) ) : undefined;\n\t},\n\n\tremoveData: function( key ) {\n\t\treturn this.each( function() {\n\t\t\tjQuery.removeData( this, key );\n\t\t} );\n\t}\n} );\n\n\njQuery.extend( {\n\tqueue: function( elem, type, data ) {\n\t\tvar queue;\n\n\t\tif ( elem ) {\n\t\t\ttype = ( type || \"fx\" ) + \"queue\";\n\t\t\tqueue = jQuery._data( elem, type );\n\n\t\t\t// Speed up dequeue by getting out quickly if this is just a lookup\n\t\t\tif ( data ) {\n\t\t\t\tif ( !queue || jQuery.isArray( data ) ) {\n\t\t\t\t\tqueue = jQuery._data( elem, type, jQuery.makeArray( data ) );\n\t\t\t\t} else {\n\t\t\t\t\tqueue.push( data );\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn queue || [];\n\t\t}\n\t},\n\n\tdequeue: function( elem, type ) {\n\t\ttype = type || \"fx\";\n\n\t\tvar queue = jQuery.queue( elem, type ),\n\t\t\tstartLength = queue.length,\n\t\t\tfn = queue.shift(),\n\t\t\thooks = jQuery._queueHooks( elem, type ),\n\t\t\tnext = function() {\n\t\t\t\tjQuery.dequeue( elem, type );\n\t\t\t};\n\n\t\t// If the fx queue is dequeued, always remove the progress sentinel\n\t\tif ( fn === \"inprogress\" ) {\n\t\t\tfn = queue.shift();\n\t\t\tstartLength--;\n\t\t}\n\n\t\tif ( fn ) {\n\n\t\t\t// Add a progress sentinel to prevent the fx queue from being\n\t\t\t// automatically dequeued\n\t\t\tif ( type === \"fx\" ) {\n\t\t\t\tqueue.unshift( \"inprogress\" );\n\t\t\t}\n\n\t\t\t// clear up the last queue stop function\n\t\t\tdelete hooks.stop;\n\t\t\tfn.call( elem, next, hooks );\n\t\t}\n\n\t\tif ( !startLength && hooks ) {\n\t\t\thooks.empty.fire();\n\t\t}\n\t},\n\n\t// not intended for public consumption - generates a queueHooks object,\n\t// or returns the current one\n\t_queueHooks: function( elem, type ) {\n\t\tvar key = type + \"queueHooks\";\n\t\treturn jQuery._data( elem, key ) || jQuery._data( elem, key, {\n\t\t\tempty: jQuery.Callbacks( \"once memory\" ).add( function() {\n\t\t\t\tjQuery._removeData( elem, type + \"queue\" );\n\t\t\t\tjQuery._removeData( elem, key );\n\t\t\t} )\n\t\t} );\n\t}\n} );\n\njQuery.fn.extend( {\n\tqueue: function( type, data ) {\n\t\tvar setter = 2;\n\n\t\tif ( typeof type !== \"string\" ) {\n\t\t\tdata = type;\n\t\t\ttype = \"fx\";\n\t\t\tsetter--;\n\t\t}\n\n\t\tif ( arguments.length < setter ) {\n\t\t\treturn jQuery.queue( this[ 0 ], type );\n\t\t}\n\n\t\treturn data === undefined ?\n\t\t\tthis :\n\t\t\tthis.each( function() {\n\t\t\t\tvar queue = jQuery.queue( this, type, data );\n\n\t\t\t\t// ensure a hooks for this queue\n\t\t\t\tjQuery._queueHooks( this, type );\n\n\t\t\t\tif ( type === \"fx\" && queue[ 0 ] !== \"inprogress\" ) {\n\t\t\t\t\tjQuery.dequeue( this, type );\n\t\t\t\t}\n\t\t\t} );\n\t},\n\tdequeue: function( type ) {\n\t\treturn this.each( function() {\n\t\t\tjQuery.dequeue( this, type );\n\t\t} );\n\t},\n\tclearQueue: function( type ) {\n\t\treturn this.queue( type || \"fx\", [] );\n\t},\n\n\t// Get a promise resolved when queues of a certain type\n\t// are emptied (fx is the type by default)\n\tpromise: function( type, obj ) {\n\t\tvar tmp,\n\t\t\tcount = 1,\n\t\t\tdefer = jQuery.Deferred(),\n\t\t\telements = this,\n\t\t\ti = this.length,\n\t\t\tresolve = function() {\n\t\t\t\tif ( !( --count ) ) {\n\t\t\t\t\tdefer.resolveWith( elements, [ elements ] );\n\t\t\t\t}\n\t\t\t};\n\n\t\tif ( typeof type !== \"string\" ) {\n\t\t\tobj = type;\n\t\t\ttype = undefined;\n\t\t}\n\t\ttype = type || \"fx\";\n\n\t\twhile ( i-- ) {\n\t\t\ttmp = jQuery._data( elements[ i ], type + \"queueHooks\" );\n\t\t\tif ( tmp && tmp.empty ) {\n\t\t\t\tcount++;\n\t\t\t\ttmp.empty.add( resolve );\n\t\t\t}\n\t\t}\n\t\tresolve();\n\t\treturn defer.promise( obj );\n\t}\n} );\n\n\n( function() {\n\tvar shrinkWrapBlocksVal;\n\n\tsupport.shrinkWrapBlocks = function() {\n\t\tif ( shrinkWrapBlocksVal != null ) {\n\t\t\treturn shrinkWrapBlocksVal;\n\t\t}\n\n\t\t// Will be changed later if needed.\n\t\tshrinkWrapBlocksVal = false;\n\n\t\t// Minified: var b,c,d\n\t\tvar div, body, container;\n\n\t\tbody = document.getElementsByTagName( \"body\" )[ 0 ];\n\t\tif ( !body || !body.style ) {\n\n\t\t\t// Test fired too early or in an unsupported environment, exit.\n\t\t\treturn;\n\t\t}\n\n\t\t// Setup\n\t\tdiv = document.createElement( \"div\" );\n\t\tcontainer = document.createElement( \"div\" );\n\t\tcontainer.style.cssText = \"position:absolute;border:0;width:0;height:0;top:0;left:-9999px\";\n\t\tbody.appendChild( container ).appendChild( div );\n\n\t\t// Support: IE6\n\t\t// Check if elements with layout shrink-wrap their children\n\t\tif ( typeof div.style.zoom !== \"undefined\" ) {\n\n\t\t\t// Reset CSS: box-sizing; display; margin; border\n\t\t\tdiv.style.cssText =\n\n\t\t\t\t// Support: Firefox<29, Android 2.3\n\t\t\t\t// Vendor-prefix box-sizing\n\t\t\t\t\"-webkit-box-sizing:content-box;-moz-box-sizing:content-box;\" +\n\t\t\t\t\"box-sizing:content-box;display:block;margin:0;border:0;\" +\n\t\t\t\t\"padding:1px;width:1px;zoom:1\";\n\t\t\tdiv.appendChild( document.createElement( \"div\" ) ).style.width = \"5px\";\n\t\t\tshrinkWrapBlocksVal = div.offsetWidth !== 3;\n\t\t}\n\n\t\tbody.removeChild( container );\n\n\t\treturn shrinkWrapBlocksVal;\n\t};\n\n} )();\nvar pnum = ( /[+-]?(?:\\d*\\.|)\\d+(?:[eE][+-]?\\d+|)/ ).source;\n\nvar rcssNum = new RegExp( \"^(?:([+-])=|)(\" + pnum + \")([a-z%]*)$\", \"i\" );\n\n\nvar cssExpand = [ \"Top\", \"Right\", \"Bottom\", \"Left\" ];\n\nvar isHidden = function( elem, el ) {\n\n\t\t// isHidden might be called from jQuery#filter function;\n\t\t// in that case, element will be second argument\n\t\telem = el || elem;\n\t\treturn jQuery.css( elem, \"display\" ) === \"none\" ||\n\t\t\t!jQuery.contains( elem.ownerDocument, elem );\n\t};\n\n\n\nfunction adjustCSS( elem, prop, valueParts, tween ) {\n\tvar adjusted,\n\t\tscale = 1,\n\t\tmaxIterations = 20,\n\t\tcurrentValue = tween ?\n\t\t\tfunction() { return tween.cur(); } :\n\t\t\tfunction() { return jQuery.css( elem, prop, \"\" ); },\n\t\tinitial = currentValue(),\n\t\tunit = valueParts && valueParts[ 3 ] || ( jQuery.cssNumber[ prop ] ? \"\" : \"px\" ),\n\n\t\t// Starting value computation is required for potential unit mismatches\n\t\tinitialInUnit = ( jQuery.cssNumber[ prop ] || unit !== \"px\" && +initial ) &&\n\t\t\trcssNum.exec( jQuery.css( elem, prop ) );\n\n\tif ( initialInUnit && initialInUnit[ 3 ] !== unit ) {\n\n\t\t// Trust units reported by jQuery.css\n\t\tunit = unit || initialInUnit[ 3 ];\n\n\t\t// Make sure we update the tween properties later on\n\t\tvalueParts = valueParts || [];\n\n\t\t// Iteratively approximate from a nonzero starting point\n\t\tinitialInUnit = +initial || 1;\n\n\t\tdo {\n\n\t\t\t// If previous iteration zeroed out, double until we get *something*.\n\t\t\t// Use string for doubling so we don't accidentally see scale as unchanged below\n\t\t\tscale = scale || \".5\";\n\n\t\t\t// Adjust and apply\n\t\t\tinitialInUnit = initialInUnit / scale;\n\t\t\tjQuery.style( elem, prop, initialInUnit + unit );\n\n\t\t// Update scale, tolerating zero or NaN from tween.cur()\n\t\t// Break the loop if scale is unchanged or perfect, or if we've just had enough.\n\t\t} while (\n\t\t\tscale !== ( scale = currentValue() / initial ) && scale !== 1 && --maxIterations\n\t\t);\n\t}\n\n\tif ( valueParts ) {\n\t\tinitialInUnit = +initialInUnit || +initial || 0;\n\n\t\t// Apply relative offset (+=/-=) if specified\n\t\tadjusted = valueParts[ 1 ] ?\n\t\t\tinitialInUnit + ( valueParts[ 1 ] + 1 ) * valueParts[ 2 ] :\n\t\t\t+valueParts[ 2 ];\n\t\tif ( tween ) {\n\t\t\ttween.unit = unit;\n\t\t\ttween.start = initialInUnit;\n\t\t\ttween.end = adjusted;\n\t\t}\n\t}\n\treturn adjusted;\n}\n\n\n// Multifunctional method to get and set values of a collection\n// The value/s can optionally be executed if it's a function\nvar access = function( elems, fn, key, value, chainable, emptyGet, raw ) {\n\tvar i = 0,\n\t\tlength = elems.length,\n\t\tbulk = key == null;\n\n\t// Sets many values\n\tif ( jQuery.type( key ) === \"object\" ) {\n\t\tchainable = true;\n\t\tfor ( i in key ) {\n\t\t\taccess( elems, fn, i, key[ i ], true, emptyGet, raw );\n\t\t}\n\n\t// Sets one value\n\t} else if ( value !== undefined ) {\n\t\tchainable = true;\n\n\t\tif ( !jQuery.isFunction( value ) ) {\n\t\t\traw = true;\n\t\t}\n\n\t\tif ( bulk ) {\n\n\t\t\t// Bulk operations run against the entire set\n\t\t\tif ( raw ) {\n\t\t\t\tfn.call( elems, value );\n\t\t\t\tfn = null;\n\n\t\t\t// ...except when executing function values\n\t\t\t} else {\n\t\t\t\tbulk = fn;\n\t\t\t\tfn = function( elem, key, value ) {\n\t\t\t\t\treturn bulk.call( jQuery( elem ), value );\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\n\t\tif ( fn ) {\n\t\t\tfor ( ; i < length; i++ ) {\n\t\t\t\tfn(\n\t\t\t\t\telems[ i ],\n\t\t\t\t\tkey,\n\t\t\t\t\traw ? value : value.call( elems[ i ], i, fn( elems[ i ], key ) )\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t}\n\n\treturn chainable ?\n\t\telems :\n\n\t\t// Gets\n\t\tbulk ?\n\t\t\tfn.call( elems ) :\n\t\t\tlength ? fn( elems[ 0 ], key ) : emptyGet;\n};\nvar rcheckableType = ( /^(?:checkbox|radio)$/i );\n\nvar rtagName = ( /<([\\w:-]+)/ );\n\nvar rscriptType = ( /^$|\\/(?:java|ecma)script/i );\n\nvar rleadingWhitespace = ( /^\\s+/ );\n\nvar nodeNames = \"abbr|article|aside|audio|bdi|canvas|data|datalist|\" +\n\t\t\"details|dialog|figcaption|figure|footer|header|hgroup|main|\" +\n\t\t\"mark|meter|nav|output|picture|progress|section|summary|template|time|video\";\n\n\n\nfunction createSafeFragment( document ) {\n\tvar list = nodeNames.split( \"|\" ),\n\t\tsafeFrag = document.createDocumentFragment();\n\n\tif ( safeFrag.createElement ) {\n\t\twhile ( list.length ) {\n\t\t\tsafeFrag.createElement(\n\t\t\t\tlist.pop()\n\t\t\t);\n\t\t}\n\t}\n\treturn safeFrag;\n}\n\n\n( function() {\n\tvar div = document.createElement( \"div\" ),\n\t\tfragment = document.createDocumentFragment(),\n\t\tinput = document.createElement( \"input\" );\n\n\t// Setup\n\tdiv.innerHTML = \"  <link/><table></table><a href='/a'>a</a><input type='checkbox'/>\";\n\n\t// IE strips leading whitespace when .innerHTML is used\n\tsupport.leadingWhitespace = div.firstChild.nodeType === 3;\n\n\t// Make sure that tbody elements aren't automatically inserted\n\t// IE will insert them into empty tables\n\tsupport.tbody = !div.getElementsByTagName( \"tbody\" ).length;\n\n\t// Make sure that link elements get serialized correctly by innerHTML\n\t// This requires a wrapper element in IE\n\tsupport.htmlSerialize = !!div.getElementsByTagName( \"link\" ).length;\n\n\t// Makes sure cloning an html5 element does not cause problems\n\t// Where outerHTML is undefined, this still works\n\tsupport.html5Clone =\n\t\tdocument.createElement( \"nav\" ).cloneNode( true ).outerHTML !== \"<:nav></:nav>\";\n\n\t// Check if a disconnected checkbox will retain its checked\n\t// value of true after appended to the DOM (IE6/7)\n\tinput.type = \"checkbox\";\n\tinput.checked = true;\n\tfragment.appendChild( input );\n\tsupport.appendChecked = input.checked;\n\n\t// Make sure textarea (and checkbox) defaultValue is properly cloned\n\t// Support: IE6-IE11+\n\tdiv.innerHTML = \"<textarea>x</textarea>\";\n\tsupport.noCloneChecked = !!div.cloneNode( true ).lastChild.defaultValue;\n\n\t// #11217 - WebKit loses check when the name is after the checked attribute\n\tfragment.appendChild( div );\n\n\t// Support: Windows Web Apps (WWA)\n\t// `name` and `type` must use .setAttribute for WWA (#14901)\n\tinput = document.createElement( \"input\" );\n\tinput.setAttribute( \"type\", \"radio\" );\n\tinput.setAttribute( \"checked\", \"checked\" );\n\tinput.setAttribute( \"name\", \"t\" );\n\n\tdiv.appendChild( input );\n\n\t// Support: Safari 5.1, iOS 5.1, Android 4.x, Android 2.3\n\t// old WebKit doesn't clone checked state correctly in fragments\n\tsupport.checkClone = div.cloneNode( true ).cloneNode( true ).lastChild.checked;\n\n\t// Support: IE<9\n\t// Cloned elements keep attachEvent handlers, we use addEventListener on IE9+\n\tsupport.noCloneEvent = !!div.addEventListener;\n\n\t// Support: IE<9\n\t// Since attributes and properties are the same in IE,\n\t// cleanData must set properties to undefined rather than use removeAttribute\n\tdiv[ jQuery.expando ] = 1;\n\tsupport.attributes = !div.getAttribute( jQuery.expando );\n} )();\n\n\n// We have to close these tags to support XHTML (#13200)\nvar wrapMap = {\n\toption: [ 1, \"<select multiple='multiple'>\", \"</select>\" ],\n\tlegend: [ 1, \"<fieldset>\", \"</fieldset>\" ],\n\tarea: [ 1, \"<map>\", \"</map>\" ],\n\n\t// Support: IE8\n\tparam: [ 1, \"<object>\", \"</object>\" ],\n\tthead: [ 1, \"<table>\", \"</table>\" ],\n\ttr: [ 2, \"<table><tbody>\", \"</tbody></table>\" ],\n\tcol: [ 2, \"<table><tbody></tbody><colgroup>\", \"</colgroup></table>\" ],\n\ttd: [ 3, \"<table><tbody><tr>\", \"</tr></tbody></table>\" ],\n\n\t// IE6-8 can't serialize link, script, style, or any html5 (NoScope) tags,\n\t// unless wrapped in a div with non-breaking characters in front of it.\n\t_default: support.htmlSerialize ? [ 0, \"\", \"\" ] : [ 1, \"X<div>\", \"</div>\" ]\n};\n\n// Support: IE8-IE9\nwrapMap.optgroup = wrapMap.option;\n\nwrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead;\nwrapMap.th = wrapMap.td;\n\n\nfunction getAll( context, tag ) {\n\tvar elems, elem,\n\t\ti = 0,\n\t\tfound = typeof context.getElementsByTagName !== \"undefined\" ?\n\t\t\tcontext.getElementsByTagName( tag || \"*\" ) :\n\t\t\ttypeof context.querySelectorAll !== \"undefined\" ?\n\t\t\t\tcontext.querySelectorAll( tag || \"*\" ) :\n\t\t\t\tundefined;\n\n\tif ( !found ) {\n\t\tfor ( found = [], elems = context.childNodes || context;\n\t\t\t( elem = elems[ i ] ) != null;\n\t\t\ti++\n\t\t) {\n\t\t\tif ( !tag || jQuery.nodeName( elem, tag ) ) {\n\t\t\t\tfound.push( elem );\n\t\t\t} else {\n\t\t\t\tjQuery.merge( found, getAll( elem, tag ) );\n\t\t\t}\n\t\t}\n\t}\n\n\treturn tag === undefined || tag && jQuery.nodeName( context, tag ) ?\n\t\tjQuery.merge( [ context ], found ) :\n\t\tfound;\n}\n\n\n// Mark scripts as having already been evaluated\nfunction setGlobalEval( elems, refElements ) {\n\tvar elem,\n\t\ti = 0;\n\tfor ( ; ( elem = elems[ i ] ) != null; i++ ) {\n\t\tjQuery._data(\n\t\t\telem,\n\t\t\t\"globalEval\",\n\t\t\t!refElements || jQuery._data( refElements[ i ], \"globalEval\" )\n\t\t);\n\t}\n}\n\n\nvar rhtml = /<|&#?\\w+;/,\n\trtbody = /<tbody/i;\n\nfunction fixDefaultChecked( elem ) {\n\tif ( rcheckableType.test( elem.type ) ) {\n\t\telem.defaultChecked = elem.checked;\n\t}\n}\n\nfunction buildFragment( elems, context, scripts, selection, ignored ) {\n\tvar j, elem, contains,\n\t\ttmp, tag, tbody, wrap,\n\t\tl = elems.length,\n\n\t\t// Ensure a safe fragment\n\t\tsafe = createSafeFragment( context ),\n\n\t\tnodes = [],\n\t\ti = 0;\n\n\tfor ( ; i < l; i++ ) {\n\t\telem = elems[ i ];\n\n\t\tif ( elem || elem === 0 ) {\n\n\t\t\t// Add nodes directly\n\t\t\tif ( jQuery.type( elem ) === \"object\" ) {\n\t\t\t\tjQuery.merge( nodes, elem.nodeType ? [ elem ] : elem );\n\n\t\t\t// Convert non-html into a text node\n\t\t\t} else if ( !rhtml.test( elem ) ) {\n\t\t\t\tnodes.push( context.createTextNode( elem ) );\n\n\t\t\t// Convert html into DOM nodes\n\t\t\t} else {\n\t\t\t\ttmp = tmp || safe.appendChild( context.createElement( \"div\" ) );\n\n\t\t\t\t// Deserialize a standard representation\n\t\t\t\ttag = ( rtagName.exec( elem ) || [ \"\", \"\" ] )[ 1 ].toLowerCase();\n\t\t\t\twrap = wrapMap[ tag ] || wrapMap._default;\n\n\t\t\t\ttmp.innerHTML = wrap[ 1 ] + jQuery.htmlPrefilter( elem ) + wrap[ 2 ];\n\n\t\t\t\t// Descend through wrappers to the right content\n\t\t\t\tj = wrap[ 0 ];\n\t\t\t\twhile ( j-- ) {\n\t\t\t\t\ttmp = tmp.lastChild;\n\t\t\t\t}\n\n\t\t\t\t// Manually add leading whitespace removed by IE\n\t\t\t\tif ( !support.leadingWhitespace && rleadingWhitespace.test( elem ) ) {\n\t\t\t\t\tnodes.push( context.createTextNode( rleadingWhitespace.exec( elem )[ 0 ] ) );\n\t\t\t\t}\n\n\t\t\t\t// Remove IE's autoinserted <tbody> from table fragments\n\t\t\t\tif ( !support.tbody ) {\n\n\t\t\t\t\t// String was a <table>, *may* have spurious <tbody>\n\t\t\t\t\telem = tag === \"table\" && !rtbody.test( elem ) ?\n\t\t\t\t\t\ttmp.firstChild :\n\n\t\t\t\t\t\t// String was a bare <thead> or <tfoot>\n\t\t\t\t\t\twrap[ 1 ] === \"<table>\" && !rtbody.test( elem ) ?\n\t\t\t\t\t\t\ttmp :\n\t\t\t\t\t\t\t0;\n\n\t\t\t\t\tj = elem && elem.childNodes.length;\n\t\t\t\t\twhile ( j-- ) {\n\t\t\t\t\t\tif ( jQuery.nodeName( ( tbody = elem.childNodes[ j ] ), \"tbody\" ) &&\n\t\t\t\t\t\t\t!tbody.childNodes.length ) {\n\n\t\t\t\t\t\t\telem.removeChild( tbody );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tjQuery.merge( nodes, tmp.childNodes );\n\n\t\t\t\t// Fix #12392 for WebKit and IE > 9\n\t\t\t\ttmp.textContent = \"\";\n\n\t\t\t\t// Fix #12392 for oldIE\n\t\t\t\twhile ( tmp.firstChild ) {\n\t\t\t\t\ttmp.removeChild( tmp.firstChild );\n\t\t\t\t}\n\n\t\t\t\t// Remember the top-level container for proper cleanup\n\t\t\t\ttmp = safe.lastChild;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Fix #11356: Clear elements from fragment\n\tif ( tmp ) {\n\t\tsafe.removeChild( tmp );\n\t}\n\n\t// Reset defaultChecked for any radios and checkboxes\n\t// about to be appended to the DOM in IE 6/7 (#8060)\n\tif ( !support.appendChecked ) {\n\t\tjQuery.grep( getAll( nodes, \"input\" ), fixDefaultChecked );\n\t}\n\n\ti = 0;\n\twhile ( ( elem = nodes[ i++ ] ) ) {\n\n\t\t// Skip elements already in the context collection (trac-4087)\n\t\tif ( selection && jQuery.inArray( elem, selection ) > -1 ) {\n\t\t\tif ( ignored ) {\n\t\t\t\tignored.push( elem );\n\t\t\t}\n\n\t\t\tcontinue;\n\t\t}\n\n\t\tcontains = jQuery.contains( elem.ownerDocument, elem );\n\n\t\t// Append to fragment\n\t\ttmp = getAll( safe.appendChild( elem ), \"script\" );\n\n\t\t// Preserve script evaluation history\n\t\tif ( contains ) {\n\t\t\tsetGlobalEval( tmp );\n\t\t}\n\n\t\t// Capture executables\n\t\tif ( scripts ) {\n\t\t\tj = 0;\n\t\t\twhile ( ( elem = tmp[ j++ ] ) ) {\n\t\t\t\tif ( rscriptType.test( elem.type || \"\" ) ) {\n\t\t\t\t\tscripts.push( elem );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\ttmp = null;\n\n\treturn safe;\n}\n\n\n( function() {\n\tvar i, eventName,\n\t\tdiv = document.createElement( \"div\" );\n\n\t// Support: IE<9 (lack submit/change bubble), Firefox (lack focus(in | out) events)\n\tfor ( i in { submit: true, change: true, focusin: true } ) {\n\t\teventName = \"on\" + i;\n\n\t\tif ( !( support[ i ] = eventName in window ) ) {\n\n\t\t\t// Beware of CSP restrictions (https://developer.mozilla.org/en/Security/CSP)\n\t\t\tdiv.setAttribute( eventName, \"t\" );\n\t\t\tsupport[ i ] = div.attributes[ eventName ].expando === false;\n\t\t}\n\t}\n\n\t// Null elements to avoid leaks in IE.\n\tdiv = null;\n} )();\n\n\nvar rformElems = /^(?:input|select|textarea)$/i,\n\trkeyEvent = /^key/,\n\trmouseEvent = /^(?:mouse|pointer|contextmenu|drag|drop)|click/,\n\trfocusMorph = /^(?:focusinfocus|focusoutblur)$/,\n\trtypenamespace = /^([^.]*)(?:\\.(.+)|)/;\n\nfunction returnTrue() {\n\treturn true;\n}\n\nfunction returnFalse() {\n\treturn false;\n}\n\n// Support: IE9\n// See #13393 for more info\nfunction safeActiveElement() {\n\ttry {\n\t\treturn document.activeElement;\n\t} catch ( err ) { }\n}\n\nfunction on( elem, types, selector, data, fn, one ) {\n\tvar origFn, type;\n\n\t// Types can be a map of types/handlers\n\tif ( typeof types === \"object\" ) {\n\n\t\t// ( types-Object, selector, data )\n\t\tif ( typeof selector !== \"string\" ) {\n\n\t\t\t// ( types-Object, data )\n\t\t\tdata = data || selector;\n\t\t\tselector = undefined;\n\t\t}\n\t\tfor ( type in types ) {\n\t\t\ton( elem, type, selector, data, types[ type ], one );\n\t\t}\n\t\treturn elem;\n\t}\n\n\tif ( data == null && fn == null ) {\n\n\t\t// ( types, fn )\n\t\tfn = selector;\n\t\tdata = selector = undefined;\n\t} else if ( fn == null ) {\n\t\tif ( typeof selector === \"string\" ) {\n\n\t\t\t// ( types, selector, fn )\n\t\t\tfn = data;\n\t\t\tdata = undefined;\n\t\t} else {\n\n\t\t\t// ( types, data, fn )\n\t\t\tfn = data;\n\t\t\tdata = selector;\n\t\t\tselector = undefined;\n\t\t}\n\t}\n\tif ( fn === false ) {\n\t\tfn = returnFalse;\n\t} else if ( !fn ) {\n\t\treturn elem;\n\t}\n\n\tif ( one === 1 ) {\n\t\torigFn = fn;\n\t\tfn = function( event ) {\n\n\t\t\t// Can use an empty set, since event contains the info\n\t\t\tjQuery().off( event );\n\t\t\treturn origFn.apply( this, arguments );\n\t\t};\n\n\t\t// Use same guid so caller can remove using origFn\n\t\tfn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ );\n\t}\n\treturn elem.each( function() {\n\t\tjQuery.event.add( this, types, fn, data, selector );\n\t} );\n}\n\n/*\n * Helper functions for managing events -- not part of the public interface.\n * Props to Dean Edwards' addEvent library for many of the ideas.\n */\njQuery.event = {\n\n\tglobal: {},\n\n\tadd: function( elem, types, handler, data, selector ) {\n\t\tvar tmp, events, t, handleObjIn,\n\t\t\tspecial, eventHandle, handleObj,\n\t\t\thandlers, type, namespaces, origType,\n\t\t\telemData = jQuery._data( elem );\n\n\t\t// Don't attach events to noData or text/comment nodes (but allow plain objects)\n\t\tif ( !elemData ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Caller can pass in an object of custom data in lieu of the handler\n\t\tif ( handler.handler ) {\n\t\t\thandleObjIn = handler;\n\t\t\thandler = handleObjIn.handler;\n\t\t\tselector = handleObjIn.selector;\n\t\t}\n\n\t\t// Make sure that the handler has a unique ID, used to find/remove it later\n\t\tif ( !handler.guid ) {\n\t\t\thandler.guid = jQuery.guid++;\n\t\t}\n\n\t\t// Init the element's event structure and main handler, if this is the first\n\t\tif ( !( events = elemData.events ) ) {\n\t\t\tevents = elemData.events = {};\n\t\t}\n\t\tif ( !( eventHandle = elemData.handle ) ) {\n\t\t\teventHandle = elemData.handle = function( e ) {\n\n\t\t\t\t// Discard the second event of a jQuery.event.trigger() and\n\t\t\t\t// when an event is called after a page has unloaded\n\t\t\t\treturn typeof jQuery !== \"undefined\" &&\n\t\t\t\t\t( !e || jQuery.event.triggered !== e.type ) ?\n\t\t\t\t\tjQuery.event.dispatch.apply( eventHandle.elem, arguments ) :\n\t\t\t\t\tundefined;\n\t\t\t};\n\n\t\t\t// Add elem as a property of the handle fn to prevent a memory leak\n\t\t\t// with IE non-native events\n\t\t\teventHandle.elem = elem;\n\t\t}\n\n\t\t// Handle multiple events separated by a space\n\t\ttypes = ( types || \"\" ).match( rnotwhite ) || [ \"\" ];\n\t\tt = types.length;\n\t\twhile ( t-- ) {\n\t\t\ttmp = rtypenamespace.exec( types[ t ] ) || [];\n\t\t\ttype = origType = tmp[ 1 ];\n\t\t\tnamespaces = ( tmp[ 2 ] || \"\" ).split( \".\" ).sort();\n\n\t\t\t// There *must* be a type, no attaching namespace-only handlers\n\t\t\tif ( !type ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// If event changes its type, use the special event handlers for the changed type\n\t\t\tspecial = jQuery.event.special[ type ] || {};\n\n\t\t\t// If selector defined, determine special event api type, otherwise given type\n\t\t\ttype = ( selector ? special.delegateType : special.bindType ) || type;\n\n\t\t\t// Update special based on newly reset type\n\t\t\tspecial = jQuery.event.special[ type ] || {};\n\n\t\t\t// handleObj is passed to all event handlers\n\t\t\thandleObj = jQuery.extend( {\n\t\t\t\ttype: type,\n\t\t\t\torigType: origType,\n\t\t\t\tdata: data,\n\t\t\t\thandler: handler,\n\t\t\t\tguid: handler.guid,\n\t\t\t\tselector: selector,\n\t\t\t\tneedsContext: selector && jQuery.expr.match.needsContext.test( selector ),\n\t\t\t\tnamespace: namespaces.join( \".\" )\n\t\t\t}, handleObjIn );\n\n\t\t\t// Init the event handler queue if we're the first\n\t\t\tif ( !( handlers = events[ type ] ) ) {\n\t\t\t\thandlers = events[ type ] = [];\n\t\t\t\thandlers.delegateCount = 0;\n\n\t\t\t\t// Only use addEventListener/attachEvent if the special events handler returns false\n\t\t\t\tif ( !special.setup ||\n\t\t\t\t\tspecial.setup.call( elem, data, namespaces, eventHandle ) === false ) {\n\n\t\t\t\t\t// Bind the global event handler to the element\n\t\t\t\t\tif ( elem.addEventListener ) {\n\t\t\t\t\t\telem.addEventListener( type, eventHandle, false );\n\n\t\t\t\t\t} else if ( elem.attachEvent ) {\n\t\t\t\t\t\telem.attachEvent( \"on\" + type, eventHandle );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ( special.add ) {\n\t\t\t\tspecial.add.call( elem, handleObj );\n\n\t\t\t\tif ( !handleObj.handler.guid ) {\n\t\t\t\t\thandleObj.handler.guid = handler.guid;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Add to the element's handler list, delegates in front\n\t\t\tif ( selector ) {\n\t\t\t\thandlers.splice( handlers.delegateCount++, 0, handleObj );\n\t\t\t} else {\n\t\t\t\thandlers.push( handleObj );\n\t\t\t}\n\n\t\t\t// Keep track of which events have ever been used, for event optimization\n\t\t\tjQuery.event.global[ type ] = true;\n\t\t}\n\n\t\t// Nullify elem to prevent memory leaks in IE\n\t\telem = null;\n\t},\n\n\t// Detach an event or set of events from an element\n\tremove: function( elem, types, handler, selector, mappedTypes ) {\n\t\tvar j, handleObj, tmp,\n\t\t\torigCount, t, events,\n\t\t\tspecial, handlers, type,\n\t\t\tnamespaces, origType,\n\t\t\telemData = jQuery.hasData( elem ) && jQuery._data( elem );\n\n\t\tif ( !elemData || !( events = elemData.events ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Once for each type.namespace in types; type may be omitted\n\t\ttypes = ( types || \"\" ).match( rnotwhite ) || [ \"\" ];\n\t\tt = types.length;\n\t\twhile ( t-- ) {\n\t\t\ttmp = rtypenamespace.exec( types[ t ] ) || [];\n\t\t\ttype = origType = tmp[ 1 ];\n\t\t\tnamespaces = ( tmp[ 2 ] || \"\" ).split( \".\" ).sort();\n\n\t\t\t// Unbind all events (on this namespace, if provided) for the element\n\t\t\tif ( !type ) {\n\t\t\t\tfor ( type in events ) {\n\t\t\t\t\tjQuery.event.remove( elem, type + types[ t ], handler, selector, true );\n\t\t\t\t}\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tspecial = jQuery.event.special[ type ] || {};\n\t\t\ttype = ( selector ? special.delegateType : special.bindType ) || type;\n\t\t\thandlers = events[ type ] || [];\n\t\t\ttmp = tmp[ 2 ] &&\n\t\t\t\tnew RegExp( \"(^|\\\\.)\" + namespaces.join( \"\\\\.(?:.*\\\\.|)\" ) + \"(\\\\.|$)\" );\n\n\t\t\t// Remove matching events\n\t\t\torigCount = j = handlers.length;\n\t\t\twhile ( j-- ) {\n\t\t\t\thandleObj = handlers[ j ];\n\n\t\t\t\tif ( ( mappedTypes || origType === handleObj.origType ) &&\n\t\t\t\t\t( !handler || handler.guid === handleObj.guid ) &&\n\t\t\t\t\t( !tmp || tmp.test( handleObj.namespace ) ) &&\n\t\t\t\t\t( !selector || selector === handleObj.selector ||\n\t\t\t\t\t\tselector === \"**\" && handleObj.selector ) ) {\n\t\t\t\t\thandlers.splice( j, 1 );\n\n\t\t\t\t\tif ( handleObj.selector ) {\n\t\t\t\t\t\thandlers.delegateCount--;\n\t\t\t\t\t}\n\t\t\t\t\tif ( special.remove ) {\n\t\t\t\t\t\tspecial.remove.call( elem, handleObj );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Remove generic event handler if we removed something and no more handlers exist\n\t\t\t// (avoids potential for endless recursion during removal of special event handlers)\n\t\t\tif ( origCount && !handlers.length ) {\n\t\t\t\tif ( !special.teardown ||\n\t\t\t\t\tspecial.teardown.call( elem, namespaces, elemData.handle ) === false ) {\n\n\t\t\t\t\tjQuery.removeEvent( elem, type, elemData.handle );\n\t\t\t\t}\n\n\t\t\t\tdelete events[ type ];\n\t\t\t}\n\t\t}\n\n\t\t// Remove the expando if it's no longer used\n\t\tif ( jQuery.isEmptyObject( events ) ) {\n\t\t\tdelete elemData.handle;\n\n\t\t\t// removeData also checks for emptiness and clears the expando if empty\n\t\t\t// so use it instead of delete\n\t\t\tjQuery._removeData( elem, \"events\" );\n\t\t}\n\t},\n\n\ttrigger: function( event, data, elem, onlyHandlers ) {\n\t\tvar handle, ontype, cur,\n\t\t\tbubbleType, special, tmp, i,\n\t\t\teventPath = [ elem || document ],\n\t\t\ttype = hasOwn.call( event, \"type\" ) ? event.type : event,\n\t\t\tnamespaces = hasOwn.call( event, \"namespace\" ) ? event.namespace.split( \".\" ) : [];\n\n\t\tcur = tmp = elem = elem || document;\n\n\t\t// Don't do events on text and comment nodes\n\t\tif ( elem.nodeType === 3 || elem.nodeType === 8 ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// focus/blur morphs to focusin/out; ensure we're not firing them right now\n\t\tif ( rfocusMorph.test( type + jQuery.event.triggered ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( type.indexOf( \".\" ) > -1 ) {\n\n\t\t\t// Namespaced trigger; create a regexp to match event type in handle()\n\t\t\tnamespaces = type.split( \".\" );\n\t\t\ttype = namespaces.shift();\n\t\t\tnamespaces.sort();\n\t\t}\n\t\tontype = type.indexOf( \":\" ) < 0 && \"on\" + type;\n\n\t\t// Caller can pass in a jQuery.Event object, Object, or just an event type string\n\t\tevent = event[ jQuery.expando ] ?\n\t\t\tevent :\n\t\t\tnew jQuery.Event( type, typeof event === \"object\" && event );\n\n\t\t// Trigger bitmask: & 1 for native handlers; & 2 for jQuery (always true)\n\t\tevent.isTrigger = onlyHandlers ? 2 : 3;\n\t\tevent.namespace = namespaces.join( \".\" );\n\t\tevent.rnamespace = event.namespace ?\n\t\t\tnew RegExp( \"(^|\\\\.)\" + namespaces.join( \"\\\\.(?:.*\\\\.|)\" ) + \"(\\\\.|$)\" ) :\n\t\t\tnull;\n\n\t\t// Clean up the event in case it is being reused\n\t\tevent.result = undefined;\n\t\tif ( !event.target ) {\n\t\t\tevent.target = elem;\n\t\t}\n\n\t\t// Clone any incoming data and prepend the event, creating the handler arg list\n\t\tdata = data == null ?\n\t\t\t[ event ] :\n\t\t\tjQuery.makeArray( data, [ event ] );\n\n\t\t// Allow special events to draw outside the lines\n\t\tspecial = jQuery.event.special[ type ] || {};\n\t\tif ( !onlyHandlers && special.trigger && special.trigger.apply( elem, data ) === false ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Determine event propagation path in advance, per W3C events spec (#9951)\n\t\t// Bubble up to document, then to window; watch for a global ownerDocument var (#9724)\n\t\tif ( !onlyHandlers && !special.noBubble && !jQuery.isWindow( elem ) ) {\n\n\t\t\tbubbleType = special.delegateType || type;\n\t\t\tif ( !rfocusMorph.test( bubbleType + type ) ) {\n\t\t\t\tcur = cur.parentNode;\n\t\t\t}\n\t\t\tfor ( ; cur; cur = cur.parentNode ) {\n\t\t\t\teventPath.push( cur );\n\t\t\t\ttmp = cur;\n\t\t\t}\n\n\t\t\t// Only add window if we got to document (e.g., not plain obj or detached DOM)\n\t\t\tif ( tmp === ( elem.ownerDocument || document ) ) {\n\t\t\t\teventPath.push( tmp.defaultView || tmp.parentWindow || window );\n\t\t\t}\n\t\t}\n\n\t\t// Fire handlers on the event path\n\t\ti = 0;\n\t\twhile ( ( cur = eventPath[ i++ ] ) && !event.isPropagationStopped() ) {\n\n\t\t\tevent.type = i > 1 ?\n\t\t\t\tbubbleType :\n\t\t\t\tspecial.bindType || type;\n\n\t\t\t// jQuery handler\n\t\t\thandle = ( jQuery._data( cur, \"events\" ) || {} )[ event.type ] &&\n\t\t\t\tjQuery._data( cur, \"handle\" );\n\n\t\t\tif ( handle ) {\n\t\t\t\thandle.apply( cur, data );\n\t\t\t}\n\n\t\t\t// Native handler\n\t\t\thandle = ontype && cur[ ontype ];\n\t\t\tif ( handle && handle.apply && acceptData( cur ) ) {\n\t\t\t\tevent.result = handle.apply( cur, data );\n\t\t\t\tif ( event.result === false ) {\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tevent.type = type;\n\n\t\t// If nobody prevented the default action, do it now\n\t\tif ( !onlyHandlers && !event.isDefaultPrevented() ) {\n\n\t\t\tif (\n\t\t\t\t( !special._default ||\n\t\t\t\t special._default.apply( eventPath.pop(), data ) === false\n\t\t\t\t) && acceptData( elem )\n\t\t\t) {\n\n\t\t\t\t// Call a native DOM method on the target with the same name name as the event.\n\t\t\t\t// Can't use an .isFunction() check here because IE6/7 fails that test.\n\t\t\t\t// Don't do default actions on window, that's where global variables be (#6170)\n\t\t\t\tif ( ontype && elem[ type ] && !jQuery.isWindow( elem ) ) {\n\n\t\t\t\t\t// Don't re-trigger an onFOO event when we call its FOO() method\n\t\t\t\t\ttmp = elem[ ontype ];\n\n\t\t\t\t\tif ( tmp ) {\n\t\t\t\t\t\telem[ ontype ] = null;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Prevent re-triggering of the same event, since we already bubbled it above\n\t\t\t\t\tjQuery.event.triggered = type;\n\t\t\t\t\ttry {\n\t\t\t\t\t\telem[ type ]();\n\t\t\t\t\t} catch ( e ) {\n\n\t\t\t\t\t\t// IE<9 dies on focus/blur to hidden element (#1486,#12518)\n\t\t\t\t\t\t// only reproducible on winXP IE8 native, not IE9 in IE8 mode\n\t\t\t\t\t}\n\t\t\t\t\tjQuery.event.triggered = undefined;\n\n\t\t\t\t\tif ( tmp ) {\n\t\t\t\t\t\telem[ ontype ] = tmp;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn event.result;\n\t},\n\n\tdispatch: function( event ) {\n\n\t\t// Make a writable jQuery.Event from the native event object\n\t\tevent = jQuery.event.fix( event );\n\n\t\tvar i, j, ret, matched, handleObj,\n\t\t\thandlerQueue = [],\n\t\t\targs = slice.call( arguments ),\n\t\t\thandlers = ( jQuery._data( this, \"events\" ) || {} )[ event.type ] || [],\n\t\t\tspecial = jQuery.event.special[ event.type ] || {};\n\n\t\t// Use the fix-ed jQuery.Event rather than the (read-only) native event\n\t\targs[ 0 ] = event;\n\t\tevent.delegateTarget = this;\n\n\t\t// Call the preDispatch hook for the mapped type, and let it bail if desired\n\t\tif ( special.preDispatch && special.preDispatch.call( this, event ) === false ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Determine handlers\n\t\thandlerQueue = jQuery.event.handlers.call( this, event, handlers );\n\n\t\t// Run delegates first; they may want to stop propagation beneath us\n\t\ti = 0;\n\t\twhile ( ( matched = handlerQueue[ i++ ] ) && !event.isPropagationStopped() ) {\n\t\t\tevent.currentTarget = matched.elem;\n\n\t\t\tj = 0;\n\t\t\twhile ( ( handleObj = matched.handlers[ j++ ] ) &&\n\t\t\t\t!event.isImmediatePropagationStopped() ) {\n\n\t\t\t\t// Triggered event must either 1) have no namespace, or 2) have namespace(s)\n\t\t\t\t// a subset or equal to those in the bound event (both can have no namespace).\n\t\t\t\tif ( !event.rnamespace || event.rnamespace.test( handleObj.namespace ) ) {\n\n\t\t\t\t\tevent.handleObj = handleObj;\n\t\t\t\t\tevent.data = handleObj.data;\n\n\t\t\t\t\tret = ( ( jQuery.event.special[ handleObj.origType ] || {} ).handle ||\n\t\t\t\t\t\thandleObj.handler ).apply( matched.elem, args );\n\n\t\t\t\t\tif ( ret !== undefined ) {\n\t\t\t\t\t\tif ( ( event.result = ret ) === false ) {\n\t\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\t\tevent.stopPropagation();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Call the postDispatch hook for the mapped type\n\t\tif ( special.postDispatch ) {\n\t\t\tspecial.postDispatch.call( this, event );\n\t\t}\n\n\t\treturn event.result;\n\t},\n\n\thandlers: function( event, handlers ) {\n\t\tvar i, matches, sel, handleObj,\n\t\t\thandlerQueue = [],\n\t\t\tdelegateCount = handlers.delegateCount,\n\t\t\tcur = event.target;\n\n\t\t// Support (at least): Chrome, IE9\n\t\t// Find delegate handlers\n\t\t// Black-hole SVG <use> instance trees (#13180)\n\t\t//\n\t\t// Support: Firefox<=42+\n\t\t// Avoid non-left-click in FF but don't block IE radio events (#3861, gh-2343)\n\t\tif ( delegateCount && cur.nodeType &&\n\t\t\t( event.type !== \"click\" || isNaN( event.button ) || event.button < 1 ) ) {\n\n\t\t\t/* jshint eqeqeq: false */\n\t\t\tfor ( ; cur != this; cur = cur.parentNode || this ) {\n\t\t\t\t/* jshint eqeqeq: true */\n\n\t\t\t\t// Don't check non-elements (#13208)\n\t\t\t\t// Don't process clicks on disabled elements (#6911, #8165, #11382, #11764)\n\t\t\t\tif ( cur.nodeType === 1 && ( cur.disabled !== true || event.type !== \"click\" ) ) {\n\t\t\t\t\tmatches = [];\n\t\t\t\t\tfor ( i = 0; i < delegateCount; i++ ) {\n\t\t\t\t\t\thandleObj = handlers[ i ];\n\n\t\t\t\t\t\t// Don't conflict with Object.prototype properties (#13203)\n\t\t\t\t\t\tsel = handleObj.selector + \" \";\n\n\t\t\t\t\t\tif ( matches[ sel ] === undefined ) {\n\t\t\t\t\t\t\tmatches[ sel ] = handleObj.needsContext ?\n\t\t\t\t\t\t\t\tjQuery( sel, this ).index( cur ) > -1 :\n\t\t\t\t\t\t\t\tjQuery.find( sel, this, null, [ cur ] ).length;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif ( matches[ sel ] ) {\n\t\t\t\t\t\t\tmatches.push( handleObj );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif ( matches.length ) {\n\t\t\t\t\t\thandlerQueue.push( { elem: cur, handlers: matches } );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Add the remaining (directly-bound) handlers\n\t\tif ( delegateCount < handlers.length ) {\n\t\t\thandlerQueue.push( { elem: this, handlers: handlers.slice( delegateCount ) } );\n\t\t}\n\n\t\treturn handlerQueue;\n\t},\n\n\tfix: function( event ) {\n\t\tif ( event[ jQuery.expando ] ) {\n\t\t\treturn event;\n\t\t}\n\n\t\t// Create a writable copy of the event object and normalize some properties\n\t\tvar i, prop, copy,\n\t\t\ttype = event.type,\n\t\t\toriginalEvent = event,\n\t\t\tfixHook = this.fixHooks[ type ];\n\n\t\tif ( !fixHook ) {\n\t\t\tthis.fixHooks[ type ] = fixHook =\n\t\t\t\trmouseEvent.test( type ) ? this.mouseHooks :\n\t\t\t\trkeyEvent.test( type ) ? this.keyHooks :\n\t\t\t\t{};\n\t\t}\n\t\tcopy = fixHook.props ? this.props.concat( fixHook.props ) : this.props;\n\n\t\tevent = new jQuery.Event( originalEvent );\n\n\t\ti = copy.length;\n\t\twhile ( i-- ) {\n\t\t\tprop = copy[ i ];\n\t\t\tevent[ prop ] = originalEvent[ prop ];\n\t\t}\n\n\t\t// Support: IE<9\n\t\t// Fix target property (#1925)\n\t\tif ( !event.target ) {\n\t\t\tevent.target = originalEvent.srcElement || document;\n\t\t}\n\n\t\t// Support: Safari 6-8+\n\t\t// Target should not be a text node (#504, #13143)\n\t\tif ( event.target.nodeType === 3 ) {\n\t\t\tevent.target = event.target.parentNode;\n\t\t}\n\n\t\t// Support: IE<9\n\t\t// For mouse/key events, metaKey==false if it's undefined (#3368, #11328)\n\t\tevent.metaKey = !!event.metaKey;\n\n\t\treturn fixHook.filter ? fixHook.filter( event, originalEvent ) : event;\n\t},\n\n\t// Includes some event props shared by KeyEvent and MouseEvent\n\tprops: ( \"altKey bubbles cancelable ctrlKey currentTarget detail eventPhase \" +\n\t\t\"metaKey relatedTarget shiftKey target timeStamp view which\" ).split( \" \" ),\n\n\tfixHooks: {},\n\n\tkeyHooks: {\n\t\tprops: \"char charCode key keyCode\".split( \" \" ),\n\t\tfilter: function( event, original ) {\n\n\t\t\t// Add which for key events\n\t\t\tif ( event.which == null ) {\n\t\t\t\tevent.which = original.charCode != null ? original.charCode : original.keyCode;\n\t\t\t}\n\n\t\t\treturn event;\n\t\t}\n\t},\n\n\tmouseHooks: {\n\t\tprops: ( \"button buttons clientX clientY fromElement offsetX offsetY \" +\n\t\t\t\"pageX pageY screenX screenY toElement\" ).split( \" \" ),\n\t\tfilter: function( event, original ) {\n\t\t\tvar body, eventDoc, doc,\n\t\t\t\tbutton = original.button,\n\t\t\t\tfromElement = original.fromElement;\n\n\t\t\t// Calculate pageX/Y if missing and clientX/Y available\n\t\t\tif ( event.pageX == null && original.clientX != null ) {\n\t\t\t\teventDoc = event.target.ownerDocument || document;\n\t\t\t\tdoc = eventDoc.documentElement;\n\t\t\t\tbody = eventDoc.body;\n\n\t\t\t\tevent.pageX = original.clientX +\n\t\t\t\t\t( doc && doc.scrollLeft || body && body.scrollLeft || 0 ) -\n\t\t\t\t\t( doc && doc.clientLeft || body && body.clientLeft || 0 );\n\t\t\t\tevent.pageY = original.clientY +\n\t\t\t\t\t( doc && doc.scrollTop  || body && body.scrollTop  || 0 ) -\n\t\t\t\t\t( doc && doc.clientTop  || body && body.clientTop  || 0 );\n\t\t\t}\n\n\t\t\t// Add relatedTarget, if necessary\n\t\t\tif ( !event.relatedTarget && fromElement ) {\n\t\t\t\tevent.relatedTarget = fromElement === event.target ?\n\t\t\t\t\toriginal.toElement :\n\t\t\t\t\tfromElement;\n\t\t\t}\n\n\t\t\t// Add which for click: 1 === left; 2 === middle; 3 === right\n\t\t\t// Note: button is not normalized, so don't use it\n\t\t\tif ( !event.which && button !== undefined ) {\n\t\t\t\tevent.which = ( button & 1 ? 1 : ( button & 2 ? 3 : ( button & 4 ? 2 : 0 ) ) );\n\t\t\t}\n\n\t\t\treturn event;\n\t\t}\n\t},\n\n\tspecial: {\n\t\tload: {\n\n\t\t\t// Prevent triggered image.load events from bubbling to window.load\n\t\t\tnoBubble: true\n\t\t},\n\t\tfocus: {\n\n\t\t\t// Fire native event if possible so blur/focus sequence is correct\n\t\t\ttrigger: function() {\n\t\t\t\tif ( this !== safeActiveElement() && this.focus ) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tthis.focus();\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t} catch ( e ) {\n\n\t\t\t\t\t\t// Support: IE<9\n\t\t\t\t\t\t// If we error on focus to hidden element (#1486, #12518),\n\t\t\t\t\t\t// let .trigger() run the handlers\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\t\t\tdelegateType: \"focusin\"\n\t\t},\n\t\tblur: {\n\t\t\ttrigger: function() {\n\t\t\t\tif ( this === safeActiveElement() && this.blur ) {\n\t\t\t\t\tthis.blur();\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t},\n\t\t\tdelegateType: \"focusout\"\n\t\t},\n\t\tclick: {\n\n\t\t\t// For checkbox, fire native event so checked state will be right\n\t\t\ttrigger: function() {\n\t\t\t\tif ( jQuery.nodeName( this, \"input\" ) && this.type === \"checkbox\" && this.click ) {\n\t\t\t\t\tthis.click();\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t},\n\n\t\t\t// For cross-browser consistency, don't fire native .click() on links\n\t\t\t_default: function( event ) {\n\t\t\t\treturn jQuery.nodeName( event.target, \"a\" );\n\t\t\t}\n\t\t},\n\n\t\tbeforeunload: {\n\t\t\tpostDispatch: function( event ) {\n\n\t\t\t\t// Support: Firefox 20+\n\t\t\t\t// Firefox doesn't alert if the returnValue field is not set.\n\t\t\t\tif ( event.result !== undefined && event.originalEvent ) {\n\t\t\t\t\tevent.originalEvent.returnValue = event.result;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t},\n\n\t// Piggyback on a donor event to simulate a different one\n\tsimulate: function( type, elem, event ) {\n\t\tvar e = jQuery.extend(\n\t\t\tnew jQuery.Event(),\n\t\t\tevent,\n\t\t\t{\n\t\t\t\ttype: type,\n\t\t\t\tisSimulated: true\n\n\t\t\t\t// Previously, `originalEvent: {}` was set here, so stopPropagation call\n\t\t\t\t// would not be triggered on donor event, since in our own\n\t\t\t\t// jQuery.event.stopPropagation function we had a check for existence of\n\t\t\t\t// originalEvent.stopPropagation method, so, consequently it would be a noop.\n\t\t\t\t//\n\t\t\t\t// Guard for simulated events was moved to jQuery.event.stopPropagation function\n\t\t\t\t// since `originalEvent` should point to the original event for the\n\t\t\t\t// constancy with other events and for more focused logic\n\t\t\t}\n\t\t);\n\n\t\tjQuery.event.trigger( e, null, elem );\n\n\t\tif ( e.isDefaultPrevented() ) {\n\t\t\tevent.preventDefault();\n\t\t}\n\t}\n};\n\njQuery.removeEvent = document.removeEventListener ?\n\tfunction( elem, type, handle ) {\n\n\t\t// This \"if\" is needed for plain objects\n\t\tif ( elem.removeEventListener ) {\n\t\t\telem.removeEventListener( type, handle );\n\t\t}\n\t} :\n\tfunction( elem, type, handle ) {\n\t\tvar name = \"on\" + type;\n\n\t\tif ( elem.detachEvent ) {\n\n\t\t\t// #8545, #7054, preventing memory leaks for custom events in IE6-8\n\t\t\t// detachEvent needed property on element, by name of that event,\n\t\t\t// to properly expose it to GC\n\t\t\tif ( typeof elem[ name ] === \"undefined\" ) {\n\t\t\t\telem[ name ] = null;\n\t\t\t}\n\n\t\t\telem.detachEvent( name, handle );\n\t\t}\n\t};\n\njQuery.Event = function( src, props ) {\n\n\t// Allow instantiation without the 'new' keyword\n\tif ( !( this instanceof jQuery.Event ) ) {\n\t\treturn new jQuery.Event( src, props );\n\t}\n\n\t// Event object\n\tif ( src && src.type ) {\n\t\tthis.originalEvent = src;\n\t\tthis.type = src.type;\n\n\t\t// Events bubbling up the document may have been marked as prevented\n\t\t// by a handler lower down the tree; reflect the correct value.\n\t\tthis.isDefaultPrevented = src.defaultPrevented ||\n\t\t\t\tsrc.defaultPrevented === undefined &&\n\n\t\t\t\t// Support: IE < 9, Android < 4.0\n\t\t\t\tsrc.returnValue === false ?\n\t\t\treturnTrue :\n\t\t\treturnFalse;\n\n\t// Event type\n\t} else {\n\t\tthis.type = src;\n\t}\n\n\t// Put explicitly provided properties onto the event object\n\tif ( props ) {\n\t\tjQuery.extend( this, props );\n\t}\n\n\t// Create a timestamp if incoming event doesn't have one\n\tthis.timeStamp = src && src.timeStamp || jQuery.now();\n\n\t// Mark it as fixed\n\tthis[ jQuery.expando ] = true;\n};\n\n// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding\n// http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html\njQuery.Event.prototype = {\n\tconstructor: jQuery.Event,\n\tisDefaultPrevented: returnFalse,\n\tisPropagationStopped: returnFalse,\n\tisImmediatePropagationStopped: returnFalse,\n\n\tpreventDefault: function() {\n\t\tvar e = this.originalEvent;\n\n\t\tthis.isDefaultPrevented = returnTrue;\n\t\tif ( !e ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// If preventDefault exists, run it on the original event\n\t\tif ( e.preventDefault ) {\n\t\t\te.preventDefault();\n\n\t\t// Support: IE\n\t\t// Otherwise set the returnValue property of the original event to false\n\t\t} else {\n\t\t\te.returnValue = false;\n\t\t}\n\t},\n\tstopPropagation: function() {\n\t\tvar e = this.originalEvent;\n\n\t\tthis.isPropagationStopped = returnTrue;\n\n\t\tif ( !e || this.isSimulated ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// If stopPropagation exists, run it on the original event\n\t\tif ( e.stopPropagation ) {\n\t\t\te.stopPropagation();\n\t\t}\n\n\t\t// Support: IE\n\t\t// Set the cancelBubble property of the original event to true\n\t\te.cancelBubble = true;\n\t},\n\tstopImmediatePropagation: function() {\n\t\tvar e = this.originalEvent;\n\n\t\tthis.isImmediatePropagationStopped = returnTrue;\n\n\t\tif ( e && e.stopImmediatePropagation ) {\n\t\t\te.stopImmediatePropagation();\n\t\t}\n\n\t\tthis.stopPropagation();\n\t}\n};\n\n// Create mouseenter/leave events using mouseover/out and event-time checks\n// so that event delegation works in jQuery.\n// Do the same for pointerenter/pointerleave and pointerover/pointerout\n//\n// Support: Safari 7 only\n// Safari sends mouseenter too often; see:\n// https://code.google.com/p/chromium/issues/detail?id=470258\n// for the description of the bug (it existed in older Chrome versions as well).\njQuery.each( {\n\tmouseenter: \"mouseover\",\n\tmouseleave: \"mouseout\",\n\tpointerenter: \"pointerover\",\n\tpointerleave: \"pointerout\"\n}, function( orig, fix ) {\n\tjQuery.event.special[ orig ] = {\n\t\tdelegateType: fix,\n\t\tbindType: fix,\n\n\t\thandle: function( event ) {\n\t\t\tvar ret,\n\t\t\t\ttarget = this,\n\t\t\t\trelated = event.relatedTarget,\n\t\t\t\thandleObj = event.handleObj;\n\n\t\t\t// For mouseenter/leave call the handler if related is outside the target.\n\t\t\t// NB: No relatedTarget if the mouse left/entered the browser window\n\t\t\tif ( !related || ( related !== target && !jQuery.contains( target, related ) ) ) {\n\t\t\t\tevent.type = handleObj.origType;\n\t\t\t\tret = handleObj.handler.apply( this, arguments );\n\t\t\t\tevent.type = fix;\n\t\t\t}\n\t\t\treturn ret;\n\t\t}\n\t};\n} );\n\n// IE submit delegation\nif ( !support.submit ) {\n\n\tjQuery.event.special.submit = {\n\t\tsetup: function() {\n\n\t\t\t// Only need this for delegated form submit events\n\t\t\tif ( jQuery.nodeName( this, \"form\" ) ) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t// Lazy-add a submit handler when a descendant form may potentially be submitted\n\t\t\tjQuery.event.add( this, \"click._submit keypress._submit\", function( e ) {\n\n\t\t\t\t// Node name check avoids a VML-related crash in IE (#9807)\n\t\t\t\tvar elem = e.target,\n\t\t\t\t\tform = jQuery.nodeName( elem, \"input\" ) || jQuery.nodeName( elem, \"button\" ) ?\n\n\t\t\t\t\t\t// Support: IE <=8\n\t\t\t\t\t\t// We use jQuery.prop instead of elem.form\n\t\t\t\t\t\t// to allow fixing the IE8 delegated submit issue (gh-2332)\n\t\t\t\t\t\t// by 3rd party polyfills/workarounds.\n\t\t\t\t\t\tjQuery.prop( elem, \"form\" ) :\n\t\t\t\t\t\tundefined;\n\n\t\t\t\tif ( form && !jQuery._data( form, \"submit\" ) ) {\n\t\t\t\t\tjQuery.event.add( form, \"submit._submit\", function( event ) {\n\t\t\t\t\t\tevent._submitBubble = true;\n\t\t\t\t\t} );\n\t\t\t\t\tjQuery._data( form, \"submit\", true );\n\t\t\t\t}\n\t\t\t} );\n\n\t\t\t// return undefined since we don't need an event listener\n\t\t},\n\n\t\tpostDispatch: function( event ) {\n\n\t\t\t// If form was submitted by the user, bubble the event up the tree\n\t\t\tif ( event._submitBubble ) {\n\t\t\t\tdelete event._submitBubble;\n\t\t\t\tif ( this.parentNode && !event.isTrigger ) {\n\t\t\t\t\tjQuery.event.simulate( \"submit\", this.parentNode, event );\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\n\t\tteardown: function() {\n\n\t\t\t// Only need this for delegated form submit events\n\t\t\tif ( jQuery.nodeName( this, \"form\" ) ) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t// Remove delegated handlers; cleanData eventually reaps submit handlers attached above\n\t\t\tjQuery.event.remove( this, \"._submit\" );\n\t\t}\n\t};\n}\n\n// IE change delegation and checkbox/radio fix\nif ( !support.change ) {\n\n\tjQuery.event.special.change = {\n\n\t\tsetup: function() {\n\n\t\t\tif ( rformElems.test( this.nodeName ) ) {\n\n\t\t\t\t// IE doesn't fire change on a check/radio until blur; trigger it on click\n\t\t\t\t// after a propertychange. Eat the blur-change in special.change.handle.\n\t\t\t\t// This still fires onchange a second time for check/radio after blur.\n\t\t\t\tif ( this.type === \"checkbox\" || this.type === \"radio\" ) {\n\t\t\t\t\tjQuery.event.add( this, \"propertychange._change\", function( event ) {\n\t\t\t\t\t\tif ( event.originalEvent.propertyName === \"checked\" ) {\n\t\t\t\t\t\t\tthis._justChanged = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t} );\n\t\t\t\t\tjQuery.event.add( this, \"click._change\", function( event ) {\n\t\t\t\t\t\tif ( this._justChanged && !event.isTrigger ) {\n\t\t\t\t\t\t\tthis._justChanged = false;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Allow triggered, simulated change events (#11500)\n\t\t\t\t\t\tjQuery.event.simulate( \"change\", this, event );\n\t\t\t\t\t} );\n\t\t\t\t}\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t// Delegated event; lazy-add a change handler on descendant inputs\n\t\t\tjQuery.event.add( this, \"beforeactivate._change\", function( e ) {\n\t\t\t\tvar elem = e.target;\n\n\t\t\t\tif ( rformElems.test( elem.nodeName ) && !jQuery._data( elem, \"change\" ) ) {\n\t\t\t\t\tjQuery.event.add( elem, \"change._change\", function( event ) {\n\t\t\t\t\t\tif ( this.parentNode && !event.isSimulated && !event.isTrigger ) {\n\t\t\t\t\t\t\tjQuery.event.simulate( \"change\", this.parentNode, event );\n\t\t\t\t\t\t}\n\t\t\t\t\t} );\n\t\t\t\t\tjQuery._data( elem, \"change\", true );\n\t\t\t\t}\n\t\t\t} );\n\t\t},\n\n\t\thandle: function( event ) {\n\t\t\tvar elem = event.target;\n\n\t\t\t// Swallow native change events from checkbox/radio, we already triggered them above\n\t\t\tif ( this !== elem || event.isSimulated || event.isTrigger ||\n\t\t\t\t( elem.type !== \"radio\" && elem.type !== \"checkbox\" ) ) {\n\n\t\t\t\treturn event.handleObj.handler.apply( this, arguments );\n\t\t\t}\n\t\t},\n\n\t\tteardown: function() {\n\t\t\tjQuery.event.remove( this, \"._change\" );\n\n\t\t\treturn !rformElems.test( this.nodeName );\n\t\t}\n\t};\n}\n\n// Support: Firefox\n// Firefox doesn't have focus(in | out) events\n// Related ticket - https://bugzilla.mozilla.org/show_bug.cgi?id=687787\n//\n// Support: Chrome, Safari\n// focus(in | out) events fire after focus & blur events,\n// which is spec violation - http://www.w3.org/TR/DOM-Level-3-Events/#events-focusevent-event-order\n// Related ticket - https://code.google.com/p/chromium/issues/detail?id=449857\nif ( !support.focusin ) {\n\tjQuery.each( { focus: \"focusin\", blur: \"focusout\" }, function( orig, fix ) {\n\n\t\t// Attach a single capturing handler on the document while someone wants focusin/focusout\n\t\tvar handler = function( event ) {\n\t\t\tjQuery.event.simulate( fix, event.target, jQuery.event.fix( event ) );\n\t\t};\n\n\t\tjQuery.event.special[ fix ] = {\n\t\t\tsetup: function() {\n\t\t\t\tvar doc = this.ownerDocument || this,\n\t\t\t\t\tattaches = jQuery._data( doc, fix );\n\n\t\t\t\tif ( !attaches ) {\n\t\t\t\t\tdoc.addEventListener( orig, handler, true );\n\t\t\t\t}\n\t\t\t\tjQuery._data( doc, fix, ( attaches || 0 ) + 1 );\n\t\t\t},\n\t\t\tteardown: function() {\n\t\t\t\tvar doc = this.ownerDocument || this,\n\t\t\t\t\tattaches = jQuery._data( doc, fix ) - 1;\n\n\t\t\t\tif ( !attaches ) {\n\t\t\t\t\tdoc.removeEventListener( orig, handler, true );\n\t\t\t\t\tjQuery._removeData( doc, fix );\n\t\t\t\t} else {\n\t\t\t\t\tjQuery._data( doc, fix, attaches );\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t} );\n}\n\njQuery.fn.extend( {\n\n\ton: function( types, selector, data, fn ) {\n\t\treturn on( this, types, selector, data, fn );\n\t},\n\tone: function( types, selector, data, fn ) {\n\t\treturn on( this, types, selector, data, fn, 1 );\n\t},\n\toff: function( types, selector, fn ) {\n\t\tvar handleObj, type;\n\t\tif ( types && types.preventDefault && types.handleObj ) {\n\n\t\t\t// ( event )  dispatched jQuery.Event\n\t\t\thandleObj = types.handleObj;\n\t\t\tjQuery( types.delegateTarget ).off(\n\t\t\t\thandleObj.namespace ?\n\t\t\t\t\thandleObj.origType + \".\" + handleObj.namespace :\n\t\t\t\t\thandleObj.origType,\n\t\t\t\thandleObj.selector,\n\t\t\t\thandleObj.handler\n\t\t\t);\n\t\t\treturn this;\n\t\t}\n\t\tif ( typeof types === \"object\" ) {\n\n\t\t\t// ( types-object [, selector] )\n\t\t\tfor ( type in types ) {\n\t\t\t\tthis.off( type, selector, types[ type ] );\n\t\t\t}\n\t\t\treturn this;\n\t\t}\n\t\tif ( selector === false || typeof selector === \"function\" ) {\n\n\t\t\t// ( types [, fn] )\n\t\t\tfn = selector;\n\t\t\tselector = undefined;\n\t\t}\n\t\tif ( fn === false ) {\n\t\t\tfn = returnFalse;\n\t\t}\n\t\treturn this.each( function() {\n\t\t\tjQuery.event.remove( this, types, fn, selector );\n\t\t} );\n\t},\n\n\ttrigger: function( type, data ) {\n\t\treturn this.each( function() {\n\t\t\tjQuery.event.trigger( type, data, this );\n\t\t} );\n\t},\n\ttriggerHandler: function( type, data ) {\n\t\tvar elem = this[ 0 ];\n\t\tif ( elem ) {\n\t\t\treturn jQuery.event.trigger( type, data, elem, true );\n\t\t}\n\t}\n} );\n\n\nvar rinlinejQuery = / jQuery\\d+=\"(?:null|\\d+)\"/g,\n\trnoshimcache = new RegExp( \"<(?:\" + nodeNames + \")[\\\\s/>]\", \"i\" ),\n\trxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\\w:-]+)[^>]*)\\/>/gi,\n\n\t// Support: IE 10-11, Edge 10240+\n\t// In IE/Edge using regex groups here causes severe slowdowns.\n\t// See https://connect.microsoft.com/IE/feedback/details/1736512/\n\trnoInnerhtml = /<script|<style|<link/i,\n\n\t// checked=\"checked\" or checked\n\trchecked = /checked\\s*(?:[^=]|=\\s*.checked.)/i,\n\trscriptTypeMasked = /^true\\/(.*)/,\n\trcleanScript = /^\\s*<!(?:\\[CDATA\\[|--)|(?:\\]\\]|--)>\\s*$/g,\n\tsafeFragment = createSafeFragment( document ),\n\tfragmentDiv = safeFragment.appendChild( document.createElement( \"div\" ) );\n\n// Support: IE<8\n// Manipulating tables requires a tbody\nfunction manipulationTarget( elem, content ) {\n\treturn jQuery.nodeName( elem, \"table\" ) &&\n\t\tjQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ?\n\n\t\telem.getElementsByTagName( \"tbody\" )[ 0 ] ||\n\t\t\telem.appendChild( elem.ownerDocument.createElement( \"tbody\" ) ) :\n\t\telem;\n}\n\n// Replace/restore the type attribute of script elements for safe DOM manipulation\nfunction disableScript( elem ) {\n\telem.type = ( jQuery.find.attr( elem, \"type\" ) !== null ) + \"/\" + elem.type;\n\treturn elem;\n}\nfunction restoreScript( elem ) {\n\tvar match = rscriptTypeMasked.exec( elem.type );\n\tif ( match ) {\n\t\telem.type = match[ 1 ];\n\t} else {\n\t\telem.removeAttribute( \"type\" );\n\t}\n\treturn elem;\n}\n\nfunction cloneCopyEvent( src, dest ) {\n\tif ( dest.nodeType !== 1 || !jQuery.hasData( src ) ) {\n\t\treturn;\n\t}\n\n\tvar type, i, l,\n\t\toldData = jQuery._data( src ),\n\t\tcurData = jQuery._data( dest, oldData ),\n\t\tevents = oldData.events;\n\n\tif ( events ) {\n\t\tdelete curData.handle;\n\t\tcurData.events = {};\n\n\t\tfor ( type in events ) {\n\t\t\tfor ( i = 0, l = events[ type ].length; i < l; i++ ) {\n\t\t\t\tjQuery.event.add( dest, type, events[ type ][ i ] );\n\t\t\t}\n\t\t}\n\t}\n\n\t// make the cloned public data object a copy from the original\n\tif ( curData.data ) {\n\t\tcurData.data = jQuery.extend( {}, curData.data );\n\t}\n}\n\nfunction fixCloneNodeIssues( src, dest ) {\n\tvar nodeName, e, data;\n\n\t// We do not need to do anything for non-Elements\n\tif ( dest.nodeType !== 1 ) {\n\t\treturn;\n\t}\n\n\tnodeName = dest.nodeName.toLowerCase();\n\n\t// IE6-8 copies events bound via attachEvent when using cloneNode.\n\tif ( !support.noCloneEvent && dest[ jQuery.expando ] ) {\n\t\tdata = jQuery._data( dest );\n\n\t\tfor ( e in data.events ) {\n\t\t\tjQuery.removeEvent( dest, e, data.handle );\n\t\t}\n\n\t\t// Event data gets referenced instead of copied if the expando gets copied too\n\t\tdest.removeAttribute( jQuery.expando );\n\t}\n\n\t// IE blanks contents when cloning scripts, and tries to evaluate newly-set text\n\tif ( nodeName === \"script\" && dest.text !== src.text ) {\n\t\tdisableScript( dest ).text = src.text;\n\t\trestoreScript( dest );\n\n\t// IE6-10 improperly clones children of object elements using classid.\n\t// IE10 throws NoModificationAllowedError if parent is null, #12132.\n\t} else if ( nodeName === \"object\" ) {\n\t\tif ( dest.parentNode ) {\n\t\t\tdest.outerHTML = src.outerHTML;\n\t\t}\n\n\t\t// This path appears unavoidable for IE9. When cloning an object\n\t\t// element in IE9, the outerHTML strategy above is not sufficient.\n\t\t// If the src has innerHTML and the destination does not,\n\t\t// copy the src.innerHTML into the dest.innerHTML. #10324\n\t\tif ( support.html5Clone && ( src.innerHTML && !jQuery.trim( dest.innerHTML ) ) ) {\n\t\t\tdest.innerHTML = src.innerHTML;\n\t\t}\n\n\t} else if ( nodeName === \"input\" && rcheckableType.test( src.type ) ) {\n\n\t\t// IE6-8 fails to persist the checked state of a cloned checkbox\n\t\t// or radio button. Worse, IE6-7 fail to give the cloned element\n\t\t// a checked appearance if the defaultChecked value isn't also set\n\n\t\tdest.defaultChecked = dest.checked = src.checked;\n\n\t\t// IE6-7 get confused and end up setting the value of a cloned\n\t\t// checkbox/radio button to an empty string instead of \"on\"\n\t\tif ( dest.value !== src.value ) {\n\t\t\tdest.value = src.value;\n\t\t}\n\n\t// IE6-8 fails to return the selected option to the default selected\n\t// state when cloning options\n\t} else if ( nodeName === \"option\" ) {\n\t\tdest.defaultSelected = dest.selected = src.defaultSelected;\n\n\t// IE6-8 fails to set the defaultValue to the correct value when\n\t// cloning other types of input fields\n\t} else if ( nodeName === \"input\" || nodeName === \"textarea\" ) {\n\t\tdest.defaultValue = src.defaultValue;\n\t}\n}\n\nfunction domManip( collection, args, callback, ignored ) {\n\n\t// Flatten any nested arrays\n\targs = concat.apply( [], args );\n\n\tvar first, node, hasScripts,\n\t\tscripts, doc, fragment,\n\t\ti = 0,\n\t\tl = collection.length,\n\t\tiNoClone = l - 1,\n\t\tvalue = args[ 0 ],\n\t\tisFunction = jQuery.isFunction( value );\n\n\t// We can't cloneNode fragments that contain checked, in WebKit\n\tif ( isFunction ||\n\t\t\t( l > 1 && typeof value === \"string\" &&\n\t\t\t\t!support.checkClone && rchecked.test( value ) ) ) {\n\t\treturn collection.each( function( index ) {\n\t\t\tvar self = collection.eq( index );\n\t\t\tif ( isFunction ) {\n\t\t\t\targs[ 0 ] = value.call( this, index, self.html() );\n\t\t\t}\n\t\t\tdomManip( self, args, callback, ignored );\n\t\t} );\n\t}\n\n\tif ( l ) {\n\t\tfragment = buildFragment( args, collection[ 0 ].ownerDocument, false, collection, ignored );\n\t\tfirst = fragment.firstChild;\n\n\t\tif ( fragment.childNodes.length === 1 ) {\n\t\t\tfragment = first;\n\t\t}\n\n\t\t// Require either new content or an interest in ignored elements to invoke the callback\n\t\tif ( first || ignored ) {\n\t\t\tscripts = jQuery.map( getAll( fragment, \"script\" ), disableScript );\n\t\t\thasScripts = scripts.length;\n\n\t\t\t// Use the original fragment for the last item\n\t\t\t// instead of the first because it can end up\n\t\t\t// being emptied incorrectly in certain situations (#8070).\n\t\t\tfor ( ; i < l; i++ ) {\n\t\t\t\tnode = fragment;\n\n\t\t\t\tif ( i !== iNoClone ) {\n\t\t\t\t\tnode = jQuery.clone( node, true, true );\n\n\t\t\t\t\t// Keep references to cloned scripts for later restoration\n\t\t\t\t\tif ( hasScripts ) {\n\n\t\t\t\t\t\t// Support: Android<4.1, PhantomJS<2\n\t\t\t\t\t\t// push.apply(_, arraylike) throws on ancient WebKit\n\t\t\t\t\t\tjQuery.merge( scripts, getAll( node, \"script\" ) );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tcallback.call( collection[ i ], node, i );\n\t\t\t}\n\n\t\t\tif ( hasScripts ) {\n\t\t\t\tdoc = scripts[ scripts.length - 1 ].ownerDocument;\n\n\t\t\t\t// Reenable scripts\n\t\t\t\tjQuery.map( scripts, restoreScript );\n\n\t\t\t\t// Evaluate executable scripts on first document insertion\n\t\t\t\tfor ( i = 0; i < hasScripts; i++ ) {\n\t\t\t\t\tnode = scripts[ i ];\n\t\t\t\t\tif ( rscriptType.test( node.type || \"\" ) &&\n\t\t\t\t\t\t!jQuery._data( node, \"globalEval\" ) &&\n\t\t\t\t\t\tjQuery.contains( doc, node ) ) {\n\n\t\t\t\t\t\tif ( node.src ) {\n\n\t\t\t\t\t\t\t// Optional AJAX dependency, but won't run scripts if not present\n\t\t\t\t\t\t\tif ( jQuery._evalUrl ) {\n\t\t\t\t\t\t\t\tjQuery._evalUrl( node.src );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tjQuery.globalEval(\n\t\t\t\t\t\t\t\t( node.text || node.textContent || node.innerHTML || \"\" )\n\t\t\t\t\t\t\t\t\t.replace( rcleanScript, \"\" )\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Fix #11809: Avoid leaking memory\n\t\t\tfragment = first = null;\n\t\t}\n\t}\n\n\treturn collection;\n}\n\nfunction remove( elem, selector, keepData ) {\n\tvar node,\n\t\telems = selector ? jQuery.filter( selector, elem ) : elem,\n\t\ti = 0;\n\n\tfor ( ; ( node = elems[ i ] ) != null; i++ ) {\n\n\t\tif ( !keepData && node.nodeType === 1 ) {\n\t\t\tjQuery.cleanData( getAll( node ) );\n\t\t}\n\n\t\tif ( node.parentNode ) {\n\t\t\tif ( keepData && jQuery.contains( node.ownerDocument, node ) ) {\n\t\t\t\tsetGlobalEval( getAll( node, \"script\" ) );\n\t\t\t}\n\t\t\tnode.parentNode.removeChild( node );\n\t\t}\n\t}\n\n\treturn elem;\n}\n\njQuery.extend( {\n\thtmlPrefilter: function( html ) {\n\t\treturn html.replace( rxhtmlTag, \"<$1></$2>\" );\n\t},\n\n\tclone: function( elem, dataAndEvents, deepDataAndEvents ) {\n\t\tvar destElements, node, clone, i, srcElements,\n\t\t\tinPage = jQuery.contains( elem.ownerDocument, elem );\n\n\t\tif ( support.html5Clone || jQuery.isXMLDoc( elem ) ||\n\t\t\t!rnoshimcache.test( \"<\" + elem.nodeName + \">\" ) ) {\n\n\t\t\tclone = elem.cloneNode( true );\n\n\t\t// IE<=8 does not properly clone detached, unknown element nodes\n\t\t} else {\n\t\t\tfragmentDiv.innerHTML = elem.outerHTML;\n\t\t\tfragmentDiv.removeChild( clone = fragmentDiv.firstChild );\n\t\t}\n\n\t\tif ( ( !support.noCloneEvent || !support.noCloneChecked ) &&\n\t\t\t\t( elem.nodeType === 1 || elem.nodeType === 11 ) && !jQuery.isXMLDoc( elem ) ) {\n\n\t\t\t// We eschew Sizzle here for performance reasons: http://jsperf.com/getall-vs-sizzle/2\n\t\t\tdestElements = getAll( clone );\n\t\t\tsrcElements = getAll( elem );\n\n\t\t\t// Fix all IE cloning issues\n\t\t\tfor ( i = 0; ( node = srcElements[ i ] ) != null; ++i ) {\n\n\t\t\t\t// Ensure that the destination node is not null; Fixes #9587\n\t\t\t\tif ( destElements[ i ] ) {\n\t\t\t\t\tfixCloneNodeIssues( node, destElements[ i ] );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Copy the events from the original to the clone\n\t\tif ( dataAndEvents ) {\n\t\t\tif ( deepDataAndEvents ) {\n\t\t\t\tsrcElements = srcElements || getAll( elem );\n\t\t\t\tdestElements = destElements || getAll( clone );\n\n\t\t\t\tfor ( i = 0; ( node = srcElements[ i ] ) != null; i++ ) {\n\t\t\t\t\tcloneCopyEvent( node, destElements[ i ] );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tcloneCopyEvent( elem, clone );\n\t\t\t}\n\t\t}\n\n\t\t// Preserve script evaluation history\n\t\tdestElements = getAll( clone, \"script\" );\n\t\tif ( destElements.length > 0 ) {\n\t\t\tsetGlobalEval( destElements, !inPage && getAll( elem, \"script\" ) );\n\t\t}\n\n\t\tdestElements = srcElements = node = null;\n\n\t\t// Return the cloned set\n\t\treturn clone;\n\t},\n\n\tcleanData: function( elems, /* internal */ forceAcceptData ) {\n\t\tvar elem, type, id, data,\n\t\t\ti = 0,\n\t\t\tinternalKey = jQuery.expando,\n\t\t\tcache = jQuery.cache,\n\t\t\tattributes = support.attributes,\n\t\t\tspecial = jQuery.event.special;\n\n\t\tfor ( ; ( elem = elems[ i ] ) != null; i++ ) {\n\t\t\tif ( forceAcceptData || acceptData( elem ) ) {\n\n\t\t\t\tid = elem[ internalKey ];\n\t\t\t\tdata = id && cache[ id ];\n\n\t\t\t\tif ( data ) {\n\t\t\t\t\tif ( data.events ) {\n\t\t\t\t\t\tfor ( type in data.events ) {\n\t\t\t\t\t\t\tif ( special[ type ] ) {\n\t\t\t\t\t\t\t\tjQuery.event.remove( elem, type );\n\n\t\t\t\t\t\t\t// This is a shortcut to avoid jQuery.event.remove's overhead\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tjQuery.removeEvent( elem, type, data.handle );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Remove cache only if it was not already removed by jQuery.event.remove\n\t\t\t\t\tif ( cache[ id ] ) {\n\n\t\t\t\t\t\tdelete cache[ id ];\n\n\t\t\t\t\t\t// Support: IE<9\n\t\t\t\t\t\t// IE does not allow us to delete expando properties from nodes\n\t\t\t\t\t\t// IE creates expando attributes along with the property\n\t\t\t\t\t\t// IE does not have a removeAttribute function on Document nodes\n\t\t\t\t\t\tif ( !attributes && typeof elem.removeAttribute !== \"undefined\" ) {\n\t\t\t\t\t\t\telem.removeAttribute( internalKey );\n\n\t\t\t\t\t\t// Webkit & Blink performance suffers when deleting properties\n\t\t\t\t\t\t// from DOM nodes, so set to undefined instead\n\t\t\t\t\t\t// https://code.google.com/p/chromium/issues/detail?id=378607\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\telem[ internalKey ] = undefined;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tdeletedIds.push( id );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n} );\n\njQuery.fn.extend( {\n\n\t// Keep domManip exposed until 3.0 (gh-2225)\n\tdomManip: domManip,\n\n\tdetach: function( selector ) {\n\t\treturn remove( this, selector, true );\n\t},\n\n\tremove: function( selector ) {\n\t\treturn remove( this, selector );\n\t},\n\n\ttext: function( value ) {\n\t\treturn access( this, function( value ) {\n\t\t\treturn value === undefined ?\n\t\t\t\tjQuery.text( this ) :\n\t\t\t\tthis.empty().append(\n\t\t\t\t\t( this[ 0 ] && this[ 0 ].ownerDocument || document ).createTextNode( value )\n\t\t\t\t);\n\t\t}, null, value, arguments.length );\n\t},\n\n\tappend: function() {\n\t\treturn domManip( this, arguments, function( elem ) {\n\t\t\tif ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {\n\t\t\t\tvar target = manipulationTarget( this, elem );\n\t\t\t\ttarget.appendChild( elem );\n\t\t\t}\n\t\t} );\n\t},\n\n\tprepend: function() {\n\t\treturn domManip( this, arguments, function( elem ) {\n\t\t\tif ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {\n\t\t\t\tvar target = manipulationTarget( this, elem );\n\t\t\t\ttarget.insertBefore( elem, target.firstChild );\n\t\t\t}\n\t\t} );\n\t},\n\n\tbefore: function() {\n\t\treturn domManip( this, arguments, function( elem ) {\n\t\t\tif ( this.parentNode ) {\n\t\t\t\tthis.parentNode.insertBefore( elem, this );\n\t\t\t}\n\t\t} );\n\t},\n\n\tafter: function() {\n\t\treturn domManip( this, arguments, function( elem ) {\n\t\t\tif ( this.parentNode ) {\n\t\t\t\tthis.parentNode.insertBefore( elem, this.nextSibling );\n\t\t\t}\n\t\t} );\n\t},\n\n\tempty: function() {\n\t\tvar elem,\n\t\t\ti = 0;\n\n\t\tfor ( ; ( elem = this[ i ] ) != null; i++ ) {\n\n\t\t\t// Remove element nodes and prevent memory leaks\n\t\t\tif ( elem.nodeType === 1 ) {\n\t\t\t\tjQuery.cleanData( getAll( elem, false ) );\n\t\t\t}\n\n\t\t\t// Remove any remaining nodes\n\t\t\twhile ( elem.firstChild ) {\n\t\t\t\telem.removeChild( elem.firstChild );\n\t\t\t}\n\n\t\t\t// If this is a select, ensure that it displays empty (#12336)\n\t\t\t// Support: IE<9\n\t\t\tif ( elem.options && jQuery.nodeName( elem, \"select\" ) ) {\n\t\t\t\telem.options.length = 0;\n\t\t\t}\n\t\t}\n\n\t\treturn this;\n\t},\n\n\tclone: function( dataAndEvents, deepDataAndEvents ) {\n\t\tdataAndEvents = dataAndEvents == null ? false : dataAndEvents;\n\t\tdeepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents;\n\n\t\treturn this.map( function() {\n\t\t\treturn jQuery.clone( this, dataAndEvents, deepDataAndEvents );\n\t\t} );\n\t},\n\n\thtml: function( value ) {\n\t\treturn access( this, function( value ) {\n\t\t\tvar elem = this[ 0 ] || {},\n\t\t\t\ti = 0,\n\t\t\t\tl = this.length;\n\n\t\t\tif ( value === undefined ) {\n\t\t\t\treturn elem.nodeType === 1 ?\n\t\t\t\t\telem.innerHTML.replace( rinlinejQuery, \"\" ) :\n\t\t\t\t\tundefined;\n\t\t\t}\n\n\t\t\t// See if we can take a shortcut and just use innerHTML\n\t\t\tif ( typeof value === \"string\" && !rnoInnerhtml.test( value ) &&\n\t\t\t\t( support.htmlSerialize || !rnoshimcache.test( value )  ) &&\n\t\t\t\t( support.leadingWhitespace || !rleadingWhitespace.test( value ) ) &&\n\t\t\t\t!wrapMap[ ( rtagName.exec( value ) || [ \"\", \"\" ] )[ 1 ].toLowerCase() ] ) {\n\n\t\t\t\tvalue = jQuery.htmlPrefilter( value );\n\n\t\t\t\ttry {\n\t\t\t\t\tfor ( ; i < l; i++ ) {\n\n\t\t\t\t\t\t// Remove element nodes and prevent memory leaks\n\t\t\t\t\t\telem = this[ i ] || {};\n\t\t\t\t\t\tif ( elem.nodeType === 1 ) {\n\t\t\t\t\t\t\tjQuery.cleanData( getAll( elem, false ) );\n\t\t\t\t\t\t\telem.innerHTML = value;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\telem = 0;\n\n\t\t\t\t// If using innerHTML throws an exception, use the fallback method\n\t\t\t\t} catch ( e ) {}\n\t\t\t}\n\n\t\t\tif ( elem ) {\n\t\t\t\tthis.empty().append( value );\n\t\t\t}\n\t\t}, null, value, arguments.length );\n\t},\n\n\treplaceWith: function() {\n\t\tvar ignored = [];\n\n\t\t// Make the changes, replacing each non-ignored context element with the new content\n\t\treturn domManip( this, arguments, function( elem ) {\n\t\t\tvar parent = this.parentNode;\n\n\t\t\tif ( jQuery.inArray( this, ignored ) < 0 ) {\n\t\t\t\tjQuery.cleanData( getAll( this ) );\n\t\t\t\tif ( parent ) {\n\t\t\t\t\tparent.replaceChild( elem, this );\n\t\t\t\t}\n\t\t\t}\n\n\t\t// Force callback invocation\n\t\t}, ignored );\n\t}\n} );\n\njQuery.each( {\n\tappendTo: \"append\",\n\tprependTo: \"prepend\",\n\tinsertBefore: \"before\",\n\tinsertAfter: \"after\",\n\treplaceAll: \"replaceWith\"\n}, function( name, original ) {\n\tjQuery.fn[ name ] = function( selector ) {\n\t\tvar elems,\n\t\t\ti = 0,\n\t\t\tret = [],\n\t\t\tinsert = jQuery( selector ),\n\t\t\tlast = insert.length - 1;\n\n\t\tfor ( ; i <= last; i++ ) {\n\t\t\telems = i === last ? this : this.clone( true );\n\t\t\tjQuery( insert[ i ] )[ original ]( elems );\n\n\t\t\t// Modern browsers can apply jQuery collections as arrays, but oldIE needs a .get()\n\t\t\tpush.apply( ret, elems.get() );\n\t\t}\n\n\t\treturn this.pushStack( ret );\n\t};\n} );\n\n\nvar iframe,\n\telemdisplay = {\n\n\t\t// Support: Firefox\n\t\t// We have to pre-define these values for FF (#10227)\n\t\tHTML: \"block\",\n\t\tBODY: \"block\"\n\t};\n\n/**\n * Retrieve the actual display of a element\n * @param {String} name nodeName of the element\n * @param {Object} doc Document object\n */\n\n// Called only from within defaultDisplay\nfunction actualDisplay( name, doc ) {\n\tvar elem = jQuery( doc.createElement( name ) ).appendTo( doc.body ),\n\n\t\tdisplay = jQuery.css( elem[ 0 ], \"display\" );\n\n\t// We don't have any data stored on the element,\n\t// so use \"detach\" method as fast way to get rid of the element\n\telem.detach();\n\n\treturn display;\n}\n\n/**\n * Try to determine the default display value of an element\n * @param {String} nodeName\n */\nfunction defaultDisplay( nodeName ) {\n\tvar doc = document,\n\t\tdisplay = elemdisplay[ nodeName ];\n\n\tif ( !display ) {\n\t\tdisplay = actualDisplay( nodeName, doc );\n\n\t\t// If the simple way fails, read from inside an iframe\n\t\tif ( display === \"none\" || !display ) {\n\n\t\t\t// Use the already-created iframe if possible\n\t\t\tiframe = ( iframe || jQuery( \"<iframe frameborder='0' width='0' height='0'/>\" ) )\n\t\t\t\t.appendTo( doc.documentElement );\n\n\t\t\t// Always write a new HTML skeleton so Webkit and Firefox don't choke on reuse\n\t\t\tdoc = ( iframe[ 0 ].contentWindow || iframe[ 0 ].contentDocument ).document;\n\n\t\t\t// Support: IE\n\t\t\tdoc.write();\n\t\t\tdoc.close();\n\n\t\t\tdisplay = actualDisplay( nodeName, doc );\n\t\t\tiframe.detach();\n\t\t}\n\n\t\t// Store the correct default display\n\t\telemdisplay[ nodeName ] = display;\n\t}\n\n\treturn display;\n}\nvar rmargin = ( /^margin/ );\n\nvar rnumnonpx = new RegExp( \"^(\" + pnum + \")(?!px)[a-z%]+$\", \"i\" );\n\nvar swap = function( elem, options, callback, args ) {\n\tvar ret, name,\n\t\told = {};\n\n\t// Remember the old values, and insert the new ones\n\tfor ( name in options ) {\n\t\told[ name ] = elem.style[ name ];\n\t\telem.style[ name ] = options[ name ];\n\t}\n\n\tret = callback.apply( elem, args || [] );\n\n\t// Revert the old values\n\tfor ( name in options ) {\n\t\telem.style[ name ] = old[ name ];\n\t}\n\n\treturn ret;\n};\n\n\nvar documentElement = document.documentElement;\n\n\n\n( function() {\n\tvar pixelPositionVal, pixelMarginRightVal, boxSizingReliableVal,\n\t\treliableHiddenOffsetsVal, reliableMarginRightVal, reliableMarginLeftVal,\n\t\tcontainer = document.createElement( \"div\" ),\n\t\tdiv = document.createElement( \"div\" );\n\n\t// Finish early in limited (non-browser) environments\n\tif ( !div.style ) {\n\t\treturn;\n\t}\n\n\tdiv.style.cssText = \"float:left;opacity:.5\";\n\n\t// Support: IE<9\n\t// Make sure that element opacity exists (as opposed to filter)\n\tsupport.opacity = div.style.opacity === \"0.5\";\n\n\t// Verify style float existence\n\t// (IE uses styleFloat instead of cssFloat)\n\tsupport.cssFloat = !!div.style.cssFloat;\n\n\tdiv.style.backgroundClip = \"content-box\";\n\tdiv.cloneNode( true ).style.backgroundClip = \"\";\n\tsupport.clearCloneStyle = div.style.backgroundClip === \"content-box\";\n\n\tcontainer = document.createElement( \"div\" );\n\tcontainer.style.cssText = \"border:0;width:8px;height:0;top:0;left:-9999px;\" +\n\t\t\"padding:0;margin-top:1px;position:absolute\";\n\tdiv.innerHTML = \"\";\n\tcontainer.appendChild( div );\n\n\t// Support: Firefox<29, Android 2.3\n\t// Vendor-prefix box-sizing\n\tsupport.boxSizing = div.style.boxSizing === \"\" || div.style.MozBoxSizing === \"\" ||\n\t\tdiv.style.WebkitBoxSizing === \"\";\n\n\tjQuery.extend( support, {\n\t\treliableHiddenOffsets: function() {\n\t\t\tif ( pixelPositionVal == null ) {\n\t\t\t\tcomputeStyleTests();\n\t\t\t}\n\t\t\treturn reliableHiddenOffsetsVal;\n\t\t},\n\n\t\tboxSizingReliable: function() {\n\n\t\t\t// We're checking for pixelPositionVal here instead of boxSizingReliableVal\n\t\t\t// since that compresses better and they're computed together anyway.\n\t\t\tif ( pixelPositionVal == null ) {\n\t\t\t\tcomputeStyleTests();\n\t\t\t}\n\t\t\treturn boxSizingReliableVal;\n\t\t},\n\n\t\tpixelMarginRight: function() {\n\n\t\t\t// Support: Android 4.0-4.3\n\t\t\tif ( pixelPositionVal == null ) {\n\t\t\t\tcomputeStyleTests();\n\t\t\t}\n\t\t\treturn pixelMarginRightVal;\n\t\t},\n\n\t\tpixelPosition: function() {\n\t\t\tif ( pixelPositionVal == null ) {\n\t\t\t\tcomputeStyleTests();\n\t\t\t}\n\t\t\treturn pixelPositionVal;\n\t\t},\n\n\t\treliableMarginRight: function() {\n\n\t\t\t// Support: Android 2.3\n\t\t\tif ( pixelPositionVal == null ) {\n\t\t\t\tcomputeStyleTests();\n\t\t\t}\n\t\t\treturn reliableMarginRightVal;\n\t\t},\n\n\t\treliableMarginLeft: function() {\n\n\t\t\t// Support: IE <=8 only, Android 4.0 - 4.3 only, Firefox <=3 - 37\n\t\t\tif ( pixelPositionVal == null ) {\n\t\t\t\tcomputeStyleTests();\n\t\t\t}\n\t\t\treturn reliableMarginLeftVal;\n\t\t}\n\t} );\n\n\tfunction computeStyleTests() {\n\t\tvar contents, divStyle,\n\t\t\tdocumentElement = document.documentElement;\n\n\t\t// Setup\n\t\tdocumentElement.appendChild( container );\n\n\t\tdiv.style.cssText =\n\n\t\t\t// Support: Android 2.3\n\t\t\t// Vendor-prefix box-sizing\n\t\t\t\"-webkit-box-sizing:border-box;box-sizing:border-box;\" +\n\t\t\t\"position:relative;display:block;\" +\n\t\t\t\"margin:auto;border:1px;padding:1px;\" +\n\t\t\t\"top:1%;width:50%\";\n\n\t\t// Support: IE<9\n\t\t// Assume reasonable values in the absence of getComputedStyle\n\t\tpixelPositionVal = boxSizingReliableVal = reliableMarginLeftVal = false;\n\t\tpixelMarginRightVal = reliableMarginRightVal = true;\n\n\t\t// Check for getComputedStyle so that this code is not run in IE<9.\n\t\tif ( window.getComputedStyle ) {\n\t\t\tdivStyle = window.getComputedStyle( div );\n\t\t\tpixelPositionVal = ( divStyle || {} ).top !== \"1%\";\n\t\t\treliableMarginLeftVal = ( divStyle || {} ).marginLeft === \"2px\";\n\t\t\tboxSizingReliableVal = ( divStyle || { width: \"4px\" } ).width === \"4px\";\n\n\t\t\t// Support: Android 4.0 - 4.3 only\n\t\t\t// Some styles come back with percentage values, even though they shouldn't\n\t\t\tdiv.style.marginRight = \"50%\";\n\t\t\tpixelMarginRightVal = ( divStyle || { marginRight: \"4px\" } ).marginRight === \"4px\";\n\n\t\t\t// Support: Android 2.3 only\n\t\t\t// Div with explicit width and no margin-right incorrectly\n\t\t\t// gets computed margin-right based on width of container (#3333)\n\t\t\t// WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right\n\t\t\tcontents = div.appendChild( document.createElement( \"div\" ) );\n\n\t\t\t// Reset CSS: box-sizing; display; margin; border; padding\n\t\t\tcontents.style.cssText = div.style.cssText =\n\n\t\t\t\t// Support: Android 2.3\n\t\t\t\t// Vendor-prefix box-sizing\n\t\t\t\t\"-webkit-box-sizing:content-box;-moz-box-sizing:content-box;\" +\n\t\t\t\t\"box-sizing:content-box;display:block;margin:0;border:0;padding:0\";\n\t\t\tcontents.style.marginRight = contents.style.width = \"0\";\n\t\t\tdiv.style.width = \"1px\";\n\n\t\t\treliableMarginRightVal =\n\t\t\t\t!parseFloat( ( window.getComputedStyle( contents ) || {} ).marginRight );\n\n\t\t\tdiv.removeChild( contents );\n\t\t}\n\n\t\t// Support: IE6-8\n\t\t// First check that getClientRects works as expected\n\t\t// Check if table cells still have offsetWidth/Height when they are set\n\t\t// to display:none and there are still other visible table cells in a\n\t\t// table row; if so, offsetWidth/Height are not reliable for use when\n\t\t// determining if an element has been hidden directly using\n\t\t// display:none (it is still safe to use offsets if a parent element is\n\t\t// hidden; don safety goggles and see bug #4512 for more information).\n\t\tdiv.style.display = \"none\";\n\t\treliableHiddenOffsetsVal = div.getClientRects().length === 0;\n\t\tif ( reliableHiddenOffsetsVal ) {\n\t\t\tdiv.style.display = \"\";\n\t\t\tdiv.innerHTML = \"<table><tr><td></td><td>t</td></tr></table>\";\n\t\t\tdiv.childNodes[ 0 ].style.borderCollapse = \"separate\";\n\t\t\tcontents = div.getElementsByTagName( \"td\" );\n\t\t\tcontents[ 0 ].style.cssText = \"margin:0;border:0;padding:0;display:none\";\n\t\t\treliableHiddenOffsetsVal = contents[ 0 ].offsetHeight === 0;\n\t\t\tif ( reliableHiddenOffsetsVal ) {\n\t\t\t\tcontents[ 0 ].style.display = \"\";\n\t\t\t\tcontents[ 1 ].style.display = \"none\";\n\t\t\t\treliableHiddenOffsetsVal = contents[ 0 ].offsetHeight === 0;\n\t\t\t}\n\t\t}\n\n\t\t// Teardown\n\t\tdocumentElement.removeChild( container );\n\t}\n\n} )();\n\n\nvar getStyles, curCSS,\n\trposition = /^(top|right|bottom|left)$/;\n\nif ( window.getComputedStyle ) {\n\tgetStyles = function( elem ) {\n\n\t\t// Support: IE<=11+, Firefox<=30+ (#15098, #14150)\n\t\t// IE throws on elements created in popups\n\t\t// FF meanwhile throws on frame elements through \"defaultView.getComputedStyle\"\n\t\tvar view = elem.ownerDocument.defaultView;\n\n\t\tif ( !view || !view.opener ) {\n\t\t\tview = window;\n\t\t}\n\n\t\treturn view.getComputedStyle( elem );\n\t};\n\n\tcurCSS = function( elem, name, computed ) {\n\t\tvar width, minWidth, maxWidth, ret,\n\t\t\tstyle = elem.style;\n\n\t\tcomputed = computed || getStyles( elem );\n\n\t\t// getPropertyValue is only needed for .css('filter') in IE9, see #12537\n\t\tret = computed ? computed.getPropertyValue( name ) || computed[ name ] : undefined;\n\n\t\t// Support: Opera 12.1x only\n\t\t// Fall back to style even without computed\n\t\t// computed is undefined for elems on document fragments\n\t\tif ( ( ret === \"\" || ret === undefined ) && !jQuery.contains( elem.ownerDocument, elem ) ) {\n\t\t\tret = jQuery.style( elem, name );\n\t\t}\n\n\t\tif ( computed ) {\n\n\t\t\t// A tribute to the \"awesome hack by Dean Edwards\"\n\t\t\t// Chrome < 17 and Safari 5.0 uses \"computed value\"\n\t\t\t// instead of \"used value\" for margin-right\n\t\t\t// Safari 5.1.7 (at least) returns percentage for a larger set of values,\n\t\t\t// but width seems to be reliably pixels\n\t\t\t// this is against the CSSOM draft spec:\n\t\t\t// http://dev.w3.org/csswg/cssom/#resolved-values\n\t\t\tif ( !support.pixelMarginRight() && rnumnonpx.test( ret ) && rmargin.test( name ) ) {\n\n\t\t\t\t// Remember the original values\n\t\t\t\twidth = style.width;\n\t\t\t\tminWidth = style.minWidth;\n\t\t\t\tmaxWidth = style.maxWidth;\n\n\t\t\t\t// Put in the new values to get a computed value out\n\t\t\t\tstyle.minWidth = style.maxWidth = style.width = ret;\n\t\t\t\tret = computed.width;\n\n\t\t\t\t// Revert the changed values\n\t\t\t\tstyle.width = width;\n\t\t\t\tstyle.minWidth = minWidth;\n\t\t\t\tstyle.maxWidth = maxWidth;\n\t\t\t}\n\t\t}\n\n\t\t// Support: IE\n\t\t// IE returns zIndex value as an integer.\n\t\treturn ret === undefined ?\n\t\t\tret :\n\t\t\tret + \"\";\n\t};\n} else if ( documentElement.currentStyle ) {\n\tgetStyles = function( elem ) {\n\t\treturn elem.currentStyle;\n\t};\n\n\tcurCSS = function( elem, name, computed ) {\n\t\tvar left, rs, rsLeft, ret,\n\t\t\tstyle = elem.style;\n\n\t\tcomputed = computed || getStyles( elem );\n\t\tret = computed ? computed[ name ] : undefined;\n\n\t\t// Avoid setting ret to empty string here\n\t\t// so we don't default to auto\n\t\tif ( ret == null && style && style[ name ] ) {\n\t\t\tret = style[ name ];\n\t\t}\n\n\t\t// From the awesome hack by Dean Edwards\n\t\t// http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291\n\n\t\t// If we're not dealing with a regular pixel number\n\t\t// but a number that has a weird ending, we need to convert it to pixels\n\t\t// but not position css attributes, as those are\n\t\t// proportional to the parent element instead\n\t\t// and we can't measure the parent instead because it\n\t\t// might trigger a \"stacking dolls\" problem\n\t\tif ( rnumnonpx.test( ret ) && !rposition.test( name ) ) {\n\n\t\t\t// Remember the original values\n\t\t\tleft = style.left;\n\t\t\trs = elem.runtimeStyle;\n\t\t\trsLeft = rs && rs.left;\n\n\t\t\t// Put in the new values to get a computed value out\n\t\t\tif ( rsLeft ) {\n\t\t\t\trs.left = elem.currentStyle.left;\n\t\t\t}\n\t\t\tstyle.left = name === \"fontSize\" ? \"1em\" : ret;\n\t\t\tret = style.pixelLeft + \"px\";\n\n\t\t\t// Revert the changed values\n\t\t\tstyle.left = left;\n\t\t\tif ( rsLeft ) {\n\t\t\t\trs.left = rsLeft;\n\t\t\t}\n\t\t}\n\n\t\t// Support: IE\n\t\t// IE returns zIndex value as an integer.\n\t\treturn ret === undefined ?\n\t\t\tret :\n\t\t\tret + \"\" || \"auto\";\n\t};\n}\n\n\n\n\nfunction addGetHookIf( conditionFn, hookFn ) {\n\n\t// Define the hook, we'll check on the first run if it's really needed.\n\treturn {\n\t\tget: function() {\n\t\t\tif ( conditionFn() ) {\n\n\t\t\t\t// Hook not needed (or it's not possible to use it due\n\t\t\t\t// to missing dependency), remove it.\n\t\t\t\tdelete this.get;\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Hook needed; redefine it so that the support test is not executed again.\n\t\t\treturn ( this.get = hookFn ).apply( this, arguments );\n\t\t}\n\t};\n}\n\n\nvar\n\n\t\tralpha = /alpha\\([^)]*\\)/i,\n\tropacity = /opacity\\s*=\\s*([^)]*)/i,\n\n\t// swappable if display is none or starts with table except\n\t// \"table\", \"table-cell\", or \"table-caption\"\n\t// see here for display values:\n\t// https://developer.mozilla.org/en-US/docs/CSS/display\n\trdisplayswap = /^(none|table(?!-c[ea]).+)/,\n\trnumsplit = new RegExp( \"^(\" + pnum + \")(.*)$\", \"i\" ),\n\n\tcssShow = { position: \"absolute\", visibility: \"hidden\", display: \"block\" },\n\tcssNormalTransform = {\n\t\tletterSpacing: \"0\",\n\t\tfontWeight: \"400\"\n\t},\n\n\tcssPrefixes = [ \"Webkit\", \"O\", \"Moz\", \"ms\" ],\n\temptyStyle = document.createElement( \"div\" ).style;\n\n\n// return a css property mapped to a potentially vendor prefixed property\nfunction vendorPropName( name ) {\n\n\t// shortcut for names that are not vendor prefixed\n\tif ( name in emptyStyle ) {\n\t\treturn name;\n\t}\n\n\t// check for vendor prefixed names\n\tvar capName = name.charAt( 0 ).toUpperCase() + name.slice( 1 ),\n\t\ti = cssPrefixes.length;\n\n\twhile ( i-- ) {\n\t\tname = cssPrefixes[ i ] + capName;\n\t\tif ( name in emptyStyle ) {\n\t\t\treturn name;\n\t\t}\n\t}\n}\n\nfunction showHide( elements, show ) {\n\tvar display, elem, hidden,\n\t\tvalues = [],\n\t\tindex = 0,\n\t\tlength = elements.length;\n\n\tfor ( ; index < length; index++ ) {\n\t\telem = elements[ index ];\n\t\tif ( !elem.style ) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tvalues[ index ] = jQuery._data( elem, \"olddisplay\" );\n\t\tdisplay = elem.style.display;\n\t\tif ( show ) {\n\n\t\t\t// Reset the inline display of this element to learn if it is\n\t\t\t// being hidden by cascaded rules or not\n\t\t\tif ( !values[ index ] && display === \"none\" ) {\n\t\t\t\telem.style.display = \"\";\n\t\t\t}\n\n\t\t\t// Set elements which have been overridden with display: none\n\t\t\t// in a stylesheet to whatever the default browser style is\n\t\t\t// for such an element\n\t\t\tif ( elem.style.display === \"\" && isHidden( elem ) ) {\n\t\t\t\tvalues[ index ] =\n\t\t\t\t\tjQuery._data( elem, \"olddisplay\", defaultDisplay( elem.nodeName ) );\n\t\t\t}\n\t\t} else {\n\t\t\thidden = isHidden( elem );\n\n\t\t\tif ( display && display !== \"none\" || !hidden ) {\n\t\t\t\tjQuery._data(\n\t\t\t\t\telem,\n\t\t\t\t\t\"olddisplay\",\n\t\t\t\t\thidden ? display : jQuery.css( elem, \"display\" )\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t}\n\n\t// Set the display of most of the elements in a second loop\n\t// to avoid the constant reflow\n\tfor ( index = 0; index < length; index++ ) {\n\t\telem = elements[ index ];\n\t\tif ( !elem.style ) {\n\t\t\tcontinue;\n\t\t}\n\t\tif ( !show || elem.style.display === \"none\" || elem.style.display === \"\" ) {\n\t\t\telem.style.display = show ? values[ index ] || \"\" : \"none\";\n\t\t}\n\t}\n\n\treturn elements;\n}\n\nfunction setPositiveNumber( elem, value, subtract ) {\n\tvar matches = rnumsplit.exec( value );\n\treturn matches ?\n\n\t\t// Guard against undefined \"subtract\", e.g., when used as in cssHooks\n\t\tMath.max( 0, matches[ 1 ] - ( subtract || 0 ) ) + ( matches[ 2 ] || \"px\" ) :\n\t\tvalue;\n}\n\nfunction augmentWidthOrHeight( elem, name, extra, isBorderBox, styles ) {\n\tvar i = extra === ( isBorderBox ? \"border\" : \"content\" ) ?\n\n\t\t// If we already have the right measurement, avoid augmentation\n\t\t4 :\n\n\t\t// Otherwise initialize for horizontal or vertical properties\n\t\tname === \"width\" ? 1 : 0,\n\n\t\tval = 0;\n\n\tfor ( ; i < 4; i += 2 ) {\n\n\t\t// both box models exclude margin, so add it if we want it\n\t\tif ( extra === \"margin\" ) {\n\t\t\tval += jQuery.css( elem, extra + cssExpand[ i ], true, styles );\n\t\t}\n\n\t\tif ( isBorderBox ) {\n\n\t\t\t// border-box includes padding, so remove it if we want content\n\t\t\tif ( extra === \"content\" ) {\n\t\t\t\tval -= jQuery.css( elem, \"padding\" + cssExpand[ i ], true, styles );\n\t\t\t}\n\n\t\t\t// at this point, extra isn't border nor margin, so remove border\n\t\t\tif ( extra !== \"margin\" ) {\n\t\t\t\tval -= jQuery.css( elem, \"border\" + cssExpand[ i ] + \"Width\", true, styles );\n\t\t\t}\n\t\t} else {\n\n\t\t\t// at this point, extra isn't content, so add padding\n\t\t\tval += jQuery.css( elem, \"padding\" + cssExpand[ i ], true, styles );\n\n\t\t\t// at this point, extra isn't content nor padding, so add border\n\t\t\tif ( extra !== \"padding\" ) {\n\t\t\t\tval += jQuery.css( elem, \"border\" + cssExpand[ i ] + \"Width\", true, styles );\n\t\t\t}\n\t\t}\n\t}\n\n\treturn val;\n}\n\nfunction getWidthOrHeight( elem, name, extra ) {\n\n\t// Start with offset property, which is equivalent to the border-box value\n\tvar valueIsBorderBox = true,\n\t\tval = name === \"width\" ? elem.offsetWidth : elem.offsetHeight,\n\t\tstyles = getStyles( elem ),\n\t\tisBorderBox = support.boxSizing &&\n\t\t\tjQuery.css( elem, \"boxSizing\", false, styles ) === \"border-box\";\n\n\t// some non-html elements return undefined for offsetWidth, so check for null/undefined\n\t// svg - https://bugzilla.mozilla.org/show_bug.cgi?id=649285\n\t// MathML - https://bugzilla.mozilla.org/show_bug.cgi?id=491668\n\tif ( val <= 0 || val == null ) {\n\n\t\t// Fall back to computed then uncomputed css if necessary\n\t\tval = curCSS( elem, name, styles );\n\t\tif ( val < 0 || val == null ) {\n\t\t\tval = elem.style[ name ];\n\t\t}\n\n\t\t// Computed unit is not pixels. Stop here and return.\n\t\tif ( rnumnonpx.test( val ) ) {\n\t\t\treturn val;\n\t\t}\n\n\t\t// we need the check for style in case a browser which returns unreliable values\n\t\t// for getComputedStyle silently falls back to the reliable elem.style\n\t\tvalueIsBorderBox = isBorderBox &&\n\t\t\t( support.boxSizingReliable() || val === elem.style[ name ] );\n\n\t\t// Normalize \"\", auto, and prepare for extra\n\t\tval = parseFloat( val ) || 0;\n\t}\n\n\t// use the active box-sizing model to add/subtract irrelevant styles\n\treturn ( val +\n\t\taugmentWidthOrHeight(\n\t\t\telem,\n\t\t\tname,\n\t\t\textra || ( isBorderBox ? \"border\" : \"content\" ),\n\t\t\tvalueIsBorderBox,\n\t\t\tstyles\n\t\t)\n\t) + \"px\";\n}\n\njQuery.extend( {\n\n\t// Add in style property hooks for overriding the default\n\t// behavior of getting and setting a style property\n\tcssHooks: {\n\t\topacity: {\n\t\t\tget: function( elem, computed ) {\n\t\t\t\tif ( computed ) {\n\n\t\t\t\t\t// We should always get a number back from opacity\n\t\t\t\t\tvar ret = curCSS( elem, \"opacity\" );\n\t\t\t\t\treturn ret === \"\" ? \"1\" : ret;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t},\n\n\t// Don't automatically add \"px\" to these possibly-unitless properties\n\tcssNumber: {\n\t\t\"animationIterationCount\": true,\n\t\t\"columnCount\": true,\n\t\t\"fillOpacity\": true,\n\t\t\"flexGrow\": true,\n\t\t\"flexShrink\": true,\n\t\t\"fontWeight\": true,\n\t\t\"lineHeight\": true,\n\t\t\"opacity\": true,\n\t\t\"order\": true,\n\t\t\"orphans\": true,\n\t\t\"widows\": true,\n\t\t\"zIndex\": true,\n\t\t\"zoom\": true\n\t},\n\n\t// Add in properties whose names you wish to fix before\n\t// setting or getting the value\n\tcssProps: {\n\n\t\t// normalize float css property\n\t\t\"float\": support.cssFloat ? \"cssFloat\" : \"styleFloat\"\n\t},\n\n\t// Get and set the style property on a DOM Node\n\tstyle: function( elem, name, value, extra ) {\n\n\t\t// Don't set styles on text and comment nodes\n\t\tif ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Make sure that we're working with the right name\n\t\tvar ret, type, hooks,\n\t\t\torigName = jQuery.camelCase( name ),\n\t\t\tstyle = elem.style;\n\n\t\tname = jQuery.cssProps[ origName ] ||\n\t\t\t( jQuery.cssProps[ origName ] = vendorPropName( origName ) || origName );\n\n\t\t// gets hook for the prefixed version\n\t\t// followed by the unprefixed version\n\t\thooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];\n\n\t\t// Check if we're setting a value\n\t\tif ( value !== undefined ) {\n\t\t\ttype = typeof value;\n\n\t\t\t// Convert \"+=\" or \"-=\" to relative numbers (#7345)\n\t\t\tif ( type === \"string\" && ( ret = rcssNum.exec( value ) ) && ret[ 1 ] ) {\n\t\t\t\tvalue = adjustCSS( elem, name, ret );\n\n\t\t\t\t// Fixes bug #9237\n\t\t\t\ttype = \"number\";\n\t\t\t}\n\n\t\t\t// Make sure that null and NaN values aren't set. See: #7116\n\t\t\tif ( value == null || value !== value ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// If a number was passed in, add the unit (except for certain CSS properties)\n\t\t\tif ( type === \"number\" ) {\n\t\t\t\tvalue += ret && ret[ 3 ] || ( jQuery.cssNumber[ origName ] ? \"\" : \"px\" );\n\t\t\t}\n\n\t\t\t// Fixes #8908, it can be done more correctly by specifing setters in cssHooks,\n\t\t\t// but it would mean to define eight\n\t\t\t// (for every problematic property) identical functions\n\t\t\tif ( !support.clearCloneStyle && value === \"\" && name.indexOf( \"background\" ) === 0 ) {\n\t\t\t\tstyle[ name ] = \"inherit\";\n\t\t\t}\n\n\t\t\t// If a hook was provided, use that value, otherwise just set the specified value\n\t\t\tif ( !hooks || !( \"set\" in hooks ) ||\n\t\t\t\t( value = hooks.set( elem, value, extra ) ) !== undefined ) {\n\n\t\t\t\t// Support: IE\n\t\t\t\t// Swallow errors from 'invalid' CSS values (#5509)\n\t\t\t\ttry {\n\t\t\t\t\tstyle[ name ] = value;\n\t\t\t\t} catch ( e ) {}\n\t\t\t}\n\n\t\t} else {\n\n\t\t\t// If a hook was provided get the non-computed value from there\n\t\t\tif ( hooks && \"get\" in hooks &&\n\t\t\t\t( ret = hooks.get( elem, false, extra ) ) !== undefined ) {\n\n\t\t\t\treturn ret;\n\t\t\t}\n\n\t\t\t// Otherwise just get the value from the style object\n\t\t\treturn style[ name ];\n\t\t}\n\t},\n\n\tcss: function( elem, name, extra, styles ) {\n\t\tvar num, val, hooks,\n\t\t\torigName = jQuery.camelCase( name );\n\n\t\t// Make sure that we're working with the right name\n\t\tname = jQuery.cssProps[ origName ] ||\n\t\t\t( jQuery.cssProps[ origName ] = vendorPropName( origName ) || origName );\n\n\t\t// gets hook for the prefixed version\n\t\t// followed by the unprefixed version\n\t\thooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];\n\n\t\t// If a hook was provided get the computed value from there\n\t\tif ( hooks && \"get\" in hooks ) {\n\t\t\tval = hooks.get( elem, true, extra );\n\t\t}\n\n\t\t// Otherwise, if a way to get the computed value exists, use that\n\t\tif ( val === undefined ) {\n\t\t\tval = curCSS( elem, name, styles );\n\t\t}\n\n\t\t//convert \"normal\" to computed value\n\t\tif ( val === \"normal\" && name in cssNormalTransform ) {\n\t\t\tval = cssNormalTransform[ name ];\n\t\t}\n\n\t\t// Return, converting to number if forced or a qualifier was provided and val looks numeric\n\t\tif ( extra === \"\" || extra ) {\n\t\t\tnum = parseFloat( val );\n\t\t\treturn extra === true || isFinite( num ) ? num || 0 : val;\n\t\t}\n\t\treturn val;\n\t}\n} );\n\njQuery.each( [ \"height\", \"width\" ], function( i, name ) {\n\tjQuery.cssHooks[ name ] = {\n\t\tget: function( elem, computed, extra ) {\n\t\t\tif ( computed ) {\n\n\t\t\t\t// certain elements can have dimension info if we invisibly show them\n\t\t\t\t// however, it must have a current display style that would benefit from this\n\t\t\t\treturn rdisplayswap.test( jQuery.css( elem, \"display\" ) ) &&\n\t\t\t\t\telem.offsetWidth === 0 ?\n\t\t\t\t\t\tswap( elem, cssShow, function() {\n\t\t\t\t\t\t\treturn getWidthOrHeight( elem, name, extra );\n\t\t\t\t\t\t} ) :\n\t\t\t\t\t\tgetWidthOrHeight( elem, name, extra );\n\t\t\t}\n\t\t},\n\n\t\tset: function( elem, value, extra ) {\n\t\t\tvar styles = extra && getStyles( elem );\n\t\t\treturn setPositiveNumber( elem, value, extra ?\n\t\t\t\taugmentWidthOrHeight(\n\t\t\t\t\telem,\n\t\t\t\t\tname,\n\t\t\t\t\textra,\n\t\t\t\t\tsupport.boxSizing &&\n\t\t\t\t\t\tjQuery.css( elem, \"boxSizing\", false, styles ) === \"border-box\",\n\t\t\t\t\tstyles\n\t\t\t\t) : 0\n\t\t\t);\n\t\t}\n\t};\n} );\n\nif ( !support.opacity ) {\n\tjQuery.cssHooks.opacity = {\n\t\tget: function( elem, computed ) {\n\n\t\t\t// IE uses filters for opacity\n\t\t\treturn ropacity.test( ( computed && elem.currentStyle ?\n\t\t\t\telem.currentStyle.filter :\n\t\t\t\telem.style.filter ) || \"\" ) ?\n\t\t\t\t\t( 0.01 * parseFloat( RegExp.$1 ) ) + \"\" :\n\t\t\t\t\tcomputed ? \"1\" : \"\";\n\t\t},\n\n\t\tset: function( elem, value ) {\n\t\t\tvar style = elem.style,\n\t\t\t\tcurrentStyle = elem.currentStyle,\n\t\t\t\topacity = jQuery.isNumeric( value ) ? \"alpha(opacity=\" + value * 100 + \")\" : \"\",\n\t\t\t\tfilter = currentStyle && currentStyle.filter || style.filter || \"\";\n\n\t\t\t// IE has trouble with opacity if it does not have layout\n\t\t\t// Force it by setting the zoom level\n\t\t\tstyle.zoom = 1;\n\n\t\t\t// if setting opacity to 1, and no other filters exist -\n\t\t\t// attempt to remove filter attribute #6652\n\t\t\t// if value === \"\", then remove inline opacity #12685\n\t\t\tif ( ( value >= 1 || value === \"\" ) &&\n\t\t\t\t\tjQuery.trim( filter.replace( ralpha, \"\" ) ) === \"\" &&\n\t\t\t\t\tstyle.removeAttribute ) {\n\n\t\t\t\t// Setting style.filter to null, \"\" & \" \" still leave \"filter:\" in the cssText\n\t\t\t\t// if \"filter:\" is present at all, clearType is disabled, we want to avoid this\n\t\t\t\t// style.removeAttribute is IE Only, but so apparently is this code path...\n\t\t\t\tstyle.removeAttribute( \"filter\" );\n\n\t\t\t\t// if there is no filter style applied in a css rule\n\t\t\t\t// or unset inline opacity, we are done\n\t\t\t\tif ( value === \"\" || currentStyle && !currentStyle.filter ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// otherwise, set new filter values\n\t\t\tstyle.filter = ralpha.test( filter ) ?\n\t\t\t\tfilter.replace( ralpha, opacity ) :\n\t\t\t\tfilter + \" \" + opacity;\n\t\t}\n\t};\n}\n\njQuery.cssHooks.marginRight = addGetHookIf( support.reliableMarginRight,\n\tfunction( elem, computed ) {\n\t\tif ( computed ) {\n\t\t\treturn swap( elem, { \"display\": \"inline-block\" },\n\t\t\t\tcurCSS, [ elem, \"marginRight\" ] );\n\t\t}\n\t}\n);\n\njQuery.cssHooks.marginLeft = addGetHookIf( support.reliableMarginLeft,\n\tfunction( elem, computed ) {\n\t\tif ( computed ) {\n\t\t\treturn (\n\t\t\t\tparseFloat( curCSS( elem, \"marginLeft\" ) ) ||\n\n\t\t\t\t// Support: IE<=11+\n\t\t\t\t// Running getBoundingClientRect on a disconnected node in IE throws an error\n\t\t\t\t// Support: IE8 only\n\t\t\t\t// getClientRects() errors on disconnected elems\n\t\t\t\t( jQuery.contains( elem.ownerDocument, elem ) ?\n\t\t\t\t\telem.getBoundingClientRect().left -\n\t\t\t\t\t\tswap( elem, { marginLeft: 0 }, function() {\n\t\t\t\t\t\t\treturn elem.getBoundingClientRect().left;\n\t\t\t\t\t\t} ) :\n\t\t\t\t\t0\n\t\t\t\t)\n\t\t\t) + \"px\";\n\t\t}\n\t}\n);\n\n// These hooks are used by animate to expand properties\njQuery.each( {\n\tmargin: \"\",\n\tpadding: \"\",\n\tborder: \"Width\"\n}, function( prefix, suffix ) {\n\tjQuery.cssHooks[ prefix + suffix ] = {\n\t\texpand: function( value ) {\n\t\t\tvar i = 0,\n\t\t\t\texpanded = {},\n\n\t\t\t\t// assumes a single number if not a string\n\t\t\t\tparts = typeof value === \"string\" ? value.split( \" \" ) : [ value ];\n\n\t\t\tfor ( ; i < 4; i++ ) {\n\t\t\t\texpanded[ prefix + cssExpand[ i ] + suffix ] =\n\t\t\t\t\tparts[ i ] || parts[ i - 2 ] || parts[ 0 ];\n\t\t\t}\n\n\t\t\treturn expanded;\n\t\t}\n\t};\n\n\tif ( !rmargin.test( prefix ) ) {\n\t\tjQuery.cssHooks[ prefix + suffix ].set = setPositiveNumber;\n\t}\n} );\n\njQuery.fn.extend( {\n\tcss: function( name, value ) {\n\t\treturn access( this, function( elem, name, value ) {\n\t\t\tvar styles, len,\n\t\t\t\tmap = {},\n\t\t\t\ti = 0;\n\n\t\t\tif ( jQuery.isArray( name ) ) {\n\t\t\t\tstyles = getStyles( elem );\n\t\t\t\tlen = name.length;\n\n\t\t\t\tfor ( ; i < len; i++ ) {\n\t\t\t\t\tmap[ name[ i ] ] = jQuery.css( elem, name[ i ], false, styles );\n\t\t\t\t}\n\n\t\t\t\treturn map;\n\t\t\t}\n\n\t\t\treturn value !== undefined ?\n\t\t\t\tjQuery.style( elem, name, value ) :\n\t\t\t\tjQuery.css( elem, name );\n\t\t}, name, value, arguments.length > 1 );\n\t},\n\tshow: function() {\n\t\treturn showHide( this, true );\n\t},\n\thide: function() {\n\t\treturn showHide( this );\n\t},\n\ttoggle: function( state ) {\n\t\tif ( typeof state === \"boolean\" ) {\n\t\t\treturn state ? this.show() : this.hide();\n\t\t}\n\n\t\treturn this.each( function() {\n\t\t\tif ( isHidden( this ) ) {\n\t\t\t\tjQuery( this ).show();\n\t\t\t} else {\n\t\t\t\tjQuery( this ).hide();\n\t\t\t}\n\t\t} );\n\t}\n} );\n\n\nfunction Tween( elem, options, prop, end, easing ) {\n\treturn new Tween.prototype.init( elem, options, prop, end, easing );\n}\njQuery.Tween = Tween;\n\nTween.prototype = {\n\tconstructor: Tween,\n\tinit: function( elem, options, prop, end, easing, unit ) {\n\t\tthis.elem = elem;\n\t\tthis.prop = prop;\n\t\tthis.easing = easing || jQuery.easing._default;\n\t\tthis.options = options;\n\t\tthis.start = this.now = this.cur();\n\t\tthis.end = end;\n\t\tthis.unit = unit || ( jQuery.cssNumber[ prop ] ? \"\" : \"px\" );\n\t},\n\tcur: function() {\n\t\tvar hooks = Tween.propHooks[ this.prop ];\n\n\t\treturn hooks && hooks.get ?\n\t\t\thooks.get( this ) :\n\t\t\tTween.propHooks._default.get( this );\n\t},\n\trun: function( percent ) {\n\t\tvar eased,\n\t\t\thooks = Tween.propHooks[ this.prop ];\n\n\t\tif ( this.options.duration ) {\n\t\t\tthis.pos = eased = jQuery.easing[ this.easing ](\n\t\t\t\tpercent, this.options.duration * percent, 0, 1, this.options.duration\n\t\t\t);\n\t\t} else {\n\t\t\tthis.pos = eased = percent;\n\t\t}\n\t\tthis.now = ( this.end - this.start ) * eased + this.start;\n\n\t\tif ( this.options.step ) {\n\t\t\tthis.options.step.call( this.elem, this.now, this );\n\t\t}\n\n\t\tif ( hooks && hooks.set ) {\n\t\t\thooks.set( this );\n\t\t} else {\n\t\t\tTween.propHooks._default.set( this );\n\t\t}\n\t\treturn this;\n\t}\n};\n\nTween.prototype.init.prototype = Tween.prototype;\n\nTween.propHooks = {\n\t_default: {\n\t\tget: function( tween ) {\n\t\t\tvar result;\n\n\t\t\t// Use a property on the element directly when it is not a DOM element,\n\t\t\t// or when there is no matching style property that exists.\n\t\t\tif ( tween.elem.nodeType !== 1 ||\n\t\t\t\ttween.elem[ tween.prop ] != null && tween.elem.style[ tween.prop ] == null ) {\n\t\t\t\treturn tween.elem[ tween.prop ];\n\t\t\t}\n\n\t\t\t// passing an empty string as a 3rd parameter to .css will automatically\n\t\t\t// attempt a parseFloat and fallback to a string if the parse fails\n\t\t\t// so, simple values such as \"10px\" are parsed to Float.\n\t\t\t// complex values such as \"rotate(1rad)\" are returned as is.\n\t\t\tresult = jQuery.css( tween.elem, tween.prop, \"\" );\n\n\t\t\t// Empty strings, null, undefined and \"auto\" are converted to 0.\n\t\t\treturn !result || result === \"auto\" ? 0 : result;\n\t\t},\n\t\tset: function( tween ) {\n\n\t\t\t// use step hook for back compat - use cssHook if its there - use .style if its\n\t\t\t// available and use plain properties where available\n\t\t\tif ( jQuery.fx.step[ tween.prop ] ) {\n\t\t\t\tjQuery.fx.step[ tween.prop ]( tween );\n\t\t\t} else if ( tween.elem.nodeType === 1 &&\n\t\t\t\t( tween.elem.style[ jQuery.cssProps[ tween.prop ] ] != null ||\n\t\t\t\t\tjQuery.cssHooks[ tween.prop ] ) ) {\n\t\t\t\tjQuery.style( tween.elem, tween.prop, tween.now + tween.unit );\n\t\t\t} else {\n\t\t\t\ttween.elem[ tween.prop ] = tween.now;\n\t\t\t}\n\t\t}\n\t}\n};\n\n// Support: IE <=9\n// Panic based approach to setting things on disconnected nodes\n\nTween.propHooks.scrollTop = Tween.propHooks.scrollLeft = {\n\tset: function( tween ) {\n\t\tif ( tween.elem.nodeType && tween.elem.parentNode ) {\n\t\t\ttween.elem[ tween.prop ] = tween.now;\n\t\t}\n\t}\n};\n\njQuery.easing = {\n\tlinear: function( p ) {\n\t\treturn p;\n\t},\n\tswing: function( p ) {\n\t\treturn 0.5 - Math.cos( p * Math.PI ) / 2;\n\t},\n\t_default: \"swing\"\n};\n\njQuery.fx = Tween.prototype.init;\n\n// Back Compat <1.8 extension point\njQuery.fx.step = {};\n\n\n\n\nvar\n\tfxNow, timerId,\n\trfxtypes = /^(?:toggle|show|hide)$/,\n\trrun = /queueHooks$/;\n\n// Animations created synchronously will run synchronously\nfunction createFxNow() {\n\twindow.setTimeout( function() {\n\t\tfxNow = undefined;\n\t} );\n\treturn ( fxNow = jQuery.now() );\n}\n\n// Generate parameters to create a standard animation\nfunction genFx( type, includeWidth ) {\n\tvar which,\n\t\tattrs = { height: type },\n\t\ti = 0;\n\n\t// if we include width, step value is 1 to do all cssExpand values,\n\t// if we don't include width, step value is 2 to skip over Left and Right\n\tincludeWidth = includeWidth ? 1 : 0;\n\tfor ( ; i < 4 ; i += 2 - includeWidth ) {\n\t\twhich = cssExpand[ i ];\n\t\tattrs[ \"margin\" + which ] = attrs[ \"padding\" + which ] = type;\n\t}\n\n\tif ( includeWidth ) {\n\t\tattrs.opacity = attrs.width = type;\n\t}\n\n\treturn attrs;\n}\n\nfunction createTween( value, prop, animation ) {\n\tvar tween,\n\t\tcollection = ( Animation.tweeners[ prop ] || [] ).concat( Animation.tweeners[ \"*\" ] ),\n\t\tindex = 0,\n\t\tlength = collection.length;\n\tfor ( ; index < length; index++ ) {\n\t\tif ( ( tween = collection[ index ].call( animation, prop, value ) ) ) {\n\n\t\t\t// we're done with this property\n\t\t\treturn tween;\n\t\t}\n\t}\n}\n\nfunction defaultPrefilter( elem, props, opts ) {\n\t/* jshint validthis: true */\n\tvar prop, value, toggle, tween, hooks, oldfire, display, checkDisplay,\n\t\tanim = this,\n\t\torig = {},\n\t\tstyle = elem.style,\n\t\thidden = elem.nodeType && isHidden( elem ),\n\t\tdataShow = jQuery._data( elem, \"fxshow\" );\n\n\t// handle queue: false promises\n\tif ( !opts.queue ) {\n\t\thooks = jQuery._queueHooks( elem, \"fx\" );\n\t\tif ( hooks.unqueued == null ) {\n\t\t\thooks.unqueued = 0;\n\t\t\toldfire = hooks.empty.fire;\n\t\t\thooks.empty.fire = function() {\n\t\t\t\tif ( !hooks.unqueued ) {\n\t\t\t\t\toldfire();\n\t\t\t\t}\n\t\t\t};\n\t\t}\n\t\thooks.unqueued++;\n\n\t\tanim.always( function() {\n\n\t\t\t// doing this makes sure that the complete handler will be called\n\t\t\t// before this completes\n\t\t\tanim.always( function() {\n\t\t\t\thooks.unqueued--;\n\t\t\t\tif ( !jQuery.queue( elem, \"fx\" ).length ) {\n\t\t\t\t\thooks.empty.fire();\n\t\t\t\t}\n\t\t\t} );\n\t\t} );\n\t}\n\n\t// height/width overflow pass\n\tif ( elem.nodeType === 1 && ( \"height\" in props || \"width\" in props ) ) {\n\n\t\t// Make sure that nothing sneaks out\n\t\t// Record all 3 overflow attributes because IE does not\n\t\t// change the overflow attribute when overflowX and\n\t\t// overflowY are set to the same value\n\t\topts.overflow = [ style.overflow, style.overflowX, style.overflowY ];\n\n\t\t// Set display property to inline-block for height/width\n\t\t// animations on inline elements that are having width/height animated\n\t\tdisplay = jQuery.css( elem, \"display\" );\n\n\t\t// Test default display if display is currently \"none\"\n\t\tcheckDisplay = display === \"none\" ?\n\t\t\tjQuery._data( elem, \"olddisplay\" ) || defaultDisplay( elem.nodeName ) : display;\n\n\t\tif ( checkDisplay === \"inline\" && jQuery.css( elem, \"float\" ) === \"none\" ) {\n\n\t\t\t// inline-level elements accept inline-block;\n\t\t\t// block-level elements need to be inline with layout\n\t\t\tif ( !support.inlineBlockNeedsLayout || defaultDisplay( elem.nodeName ) === \"inline\" ) {\n\t\t\t\tstyle.display = \"inline-block\";\n\t\t\t} else {\n\t\t\t\tstyle.zoom = 1;\n\t\t\t}\n\t\t}\n\t}\n\n\tif ( opts.overflow ) {\n\t\tstyle.overflow = \"hidden\";\n\t\tif ( !support.shrinkWrapBlocks() ) {\n\t\t\tanim.always( function() {\n\t\t\t\tstyle.overflow = opts.overflow[ 0 ];\n\t\t\t\tstyle.overflowX = opts.overflow[ 1 ];\n\t\t\t\tstyle.overflowY = opts.overflow[ 2 ];\n\t\t\t} );\n\t\t}\n\t}\n\n\t// show/hide pass\n\tfor ( prop in props ) {\n\t\tvalue = props[ prop ];\n\t\tif ( rfxtypes.exec( value ) ) {\n\t\t\tdelete props[ prop ];\n\t\t\ttoggle = toggle || value === \"toggle\";\n\t\t\tif ( value === ( hidden ? \"hide\" : \"show\" ) ) {\n\n\t\t\t\t// If there is dataShow left over from a stopped hide or show\n\t\t\t\t// and we are going to proceed with show, we should pretend to be hidden\n\t\t\t\tif ( value === \"show\" && dataShow && dataShow[ prop ] !== undefined ) {\n\t\t\t\t\thidden = true;\n\t\t\t\t} else {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t}\n\t\t\torig[ prop ] = dataShow && dataShow[ prop ] || jQuery.style( elem, prop );\n\n\t\t// Any non-fx value stops us from restoring the original display value\n\t\t} else {\n\t\t\tdisplay = undefined;\n\t\t}\n\t}\n\n\tif ( !jQuery.isEmptyObject( orig ) ) {\n\t\tif ( dataShow ) {\n\t\t\tif ( \"hidden\" in dataShow ) {\n\t\t\t\thidden = dataShow.hidden;\n\t\t\t}\n\t\t} else {\n\t\t\tdataShow = jQuery._data( elem, \"fxshow\", {} );\n\t\t}\n\n\t\t// store state if its toggle - enables .stop().toggle() to \"reverse\"\n\t\tif ( toggle ) {\n\t\t\tdataShow.hidden = !hidden;\n\t\t}\n\t\tif ( hidden ) {\n\t\t\tjQuery( elem ).show();\n\t\t} else {\n\t\t\tanim.done( function() {\n\t\t\t\tjQuery( elem ).hide();\n\t\t\t} );\n\t\t}\n\t\tanim.done( function() {\n\t\t\tvar prop;\n\t\t\tjQuery._removeData( elem, \"fxshow\" );\n\t\t\tfor ( prop in orig ) {\n\t\t\t\tjQuery.style( elem, prop, orig[ prop ] );\n\t\t\t}\n\t\t} );\n\t\tfor ( prop in orig ) {\n\t\t\ttween = createTween( hidden ? dataShow[ prop ] : 0, prop, anim );\n\n\t\t\tif ( !( prop in dataShow ) ) {\n\t\t\t\tdataShow[ prop ] = tween.start;\n\t\t\t\tif ( hidden ) {\n\t\t\t\t\ttween.end = tween.start;\n\t\t\t\t\ttween.start = prop === \"width\" || prop === \"height\" ? 1 : 0;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t// If this is a noop like .hide().hide(), restore an overwritten display value\n\t} else if ( ( display === \"none\" ? defaultDisplay( elem.nodeName ) : display ) === \"inline\" ) {\n\t\tstyle.display = display;\n\t}\n}\n\nfunction propFilter( props, specialEasing ) {\n\tvar index, name, easing, value, hooks;\n\n\t// camelCase, specialEasing and expand cssHook pass\n\tfor ( index in props ) {\n\t\tname = jQuery.camelCase( index );\n\t\teasing = specialEasing[ name ];\n\t\tvalue = props[ index ];\n\t\tif ( jQuery.isArray( value ) ) {\n\t\t\teasing = value[ 1 ];\n\t\t\tvalue = props[ index ] = value[ 0 ];\n\t\t}\n\n\t\tif ( index !== name ) {\n\t\t\tprops[ name ] = value;\n\t\t\tdelete props[ index ];\n\t\t}\n\n\t\thooks = jQuery.cssHooks[ name ];\n\t\tif ( hooks && \"expand\" in hooks ) {\n\t\t\tvalue = hooks.expand( value );\n\t\t\tdelete props[ name ];\n\n\t\t\t// not quite $.extend, this wont overwrite keys already present.\n\t\t\t// also - reusing 'index' from above because we have the correct \"name\"\n\t\t\tfor ( index in value ) {\n\t\t\t\tif ( !( index in props ) ) {\n\t\t\t\t\tprops[ index ] = value[ index ];\n\t\t\t\t\tspecialEasing[ index ] = easing;\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tspecialEasing[ name ] = easing;\n\t\t}\n\t}\n}\n\nfunction Animation( elem, properties, options ) {\n\tvar result,\n\t\tstopped,\n\t\tindex = 0,\n\t\tlength = Animation.prefilters.length,\n\t\tdeferred = jQuery.Deferred().always( function() {\n\n\t\t\t// don't match elem in the :animated selector\n\t\t\tdelete tick.elem;\n\t\t} ),\n\t\ttick = function() {\n\t\t\tif ( stopped ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tvar currentTime = fxNow || createFxNow(),\n\t\t\t\tremaining = Math.max( 0, animation.startTime + animation.duration - currentTime ),\n\n\t\t\t\t// Support: Android 2.3\n\t\t\t\t// Archaic crash bug won't allow us to use `1 - ( 0.5 || 0 )` (#12497)\n\t\t\t\ttemp = remaining / animation.duration || 0,\n\t\t\t\tpercent = 1 - temp,\n\t\t\t\tindex = 0,\n\t\t\t\tlength = animation.tweens.length;\n\n\t\t\tfor ( ; index < length ; index++ ) {\n\t\t\t\tanimation.tweens[ index ].run( percent );\n\t\t\t}\n\n\t\t\tdeferred.notifyWith( elem, [ animation, percent, remaining ] );\n\n\t\t\tif ( percent < 1 && length ) {\n\t\t\t\treturn remaining;\n\t\t\t} else {\n\t\t\t\tdeferred.resolveWith( elem, [ animation ] );\n\t\t\t\treturn false;\n\t\t\t}\n\t\t},\n\t\tanimation = deferred.promise( {\n\t\t\telem: elem,\n\t\t\tprops: jQuery.extend( {}, properties ),\n\t\t\topts: jQuery.extend( true, {\n\t\t\t\tspecialEasing: {},\n\t\t\t\teasing: jQuery.easing._default\n\t\t\t}, options ),\n\t\t\toriginalProperties: properties,\n\t\t\toriginalOptions: options,\n\t\t\tstartTime: fxNow || createFxNow(),\n\t\t\tduration: options.duration,\n\t\t\ttweens: [],\n\t\t\tcreateTween: function( prop, end ) {\n\t\t\t\tvar tween = jQuery.Tween( elem, animation.opts, prop, end,\n\t\t\t\t\t\tanimation.opts.specialEasing[ prop ] || animation.opts.easing );\n\t\t\t\tanimation.tweens.push( tween );\n\t\t\t\treturn tween;\n\t\t\t},\n\t\t\tstop: function( gotoEnd ) {\n\t\t\t\tvar index = 0,\n\n\t\t\t\t\t// if we are going to the end, we want to run all the tweens\n\t\t\t\t\t// otherwise we skip this part\n\t\t\t\t\tlength = gotoEnd ? animation.tweens.length : 0;\n\t\t\t\tif ( stopped ) {\n\t\t\t\t\treturn this;\n\t\t\t\t}\n\t\t\t\tstopped = true;\n\t\t\t\tfor ( ; index < length ; index++ ) {\n\t\t\t\t\tanimation.tweens[ index ].run( 1 );\n\t\t\t\t}\n\n\t\t\t\t// resolve when we played the last frame\n\t\t\t\t// otherwise, reject\n\t\t\t\tif ( gotoEnd ) {\n\t\t\t\t\tdeferred.notifyWith( elem, [ animation, 1, 0 ] );\n\t\t\t\t\tdeferred.resolveWith( elem, [ animation, gotoEnd ] );\n\t\t\t\t} else {\n\t\t\t\t\tdeferred.rejectWith( elem, [ animation, gotoEnd ] );\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t}\n\t\t} ),\n\t\tprops = animation.props;\n\n\tpropFilter( props, animation.opts.specialEasing );\n\n\tfor ( ; index < length ; index++ ) {\n\t\tresult = Animation.prefilters[ index ].call( animation, elem, props, animation.opts );\n\t\tif ( result ) {\n\t\t\tif ( jQuery.isFunction( result.stop ) ) {\n\t\t\t\tjQuery._queueHooks( animation.elem, animation.opts.queue ).stop =\n\t\t\t\t\tjQuery.proxy( result.stop, result );\n\t\t\t}\n\t\t\treturn result;\n\t\t}\n\t}\n\n\tjQuery.map( props, createTween, animation );\n\n\tif ( jQuery.isFunction( animation.opts.start ) ) {\n\t\tanimation.opts.start.call( elem, animation );\n\t}\n\n\tjQuery.fx.timer(\n\t\tjQuery.extend( tick, {\n\t\t\telem: elem,\n\t\t\tanim: animation,\n\t\t\tqueue: animation.opts.queue\n\t\t} )\n\t);\n\n\t// attach callbacks from options\n\treturn animation.progress( animation.opts.progress )\n\t\t.done( animation.opts.done, animation.opts.complete )\n\t\t.fail( animation.opts.fail )\n\t\t.always( animation.opts.always );\n}\n\njQuery.Animation = jQuery.extend( Animation, {\n\n\ttweeners: {\n\t\t\"*\": [ function( prop, value ) {\n\t\t\tvar tween = this.createTween( prop, value );\n\t\t\tadjustCSS( tween.elem, prop, rcssNum.exec( value ), tween );\n\t\t\treturn tween;\n\t\t} ]\n\t},\n\n\ttweener: function( props, callback ) {\n\t\tif ( jQuery.isFunction( props ) ) {\n\t\t\tcallback = props;\n\t\t\tprops = [ \"*\" ];\n\t\t} else {\n\t\t\tprops = props.match( rnotwhite );\n\t\t}\n\n\t\tvar prop,\n\t\t\tindex = 0,\n\t\t\tlength = props.length;\n\n\t\tfor ( ; index < length ; index++ ) {\n\t\t\tprop = props[ index ];\n\t\t\tAnimation.tweeners[ prop ] = Animation.tweeners[ prop ] || [];\n\t\t\tAnimation.tweeners[ prop ].unshift( callback );\n\t\t}\n\t},\n\n\tprefilters: [ defaultPrefilter ],\n\n\tprefilter: function( callback, prepend ) {\n\t\tif ( prepend ) {\n\t\t\tAnimation.prefilters.unshift( callback );\n\t\t} else {\n\t\t\tAnimation.prefilters.push( callback );\n\t\t}\n\t}\n} );\n\njQuery.speed = function( speed, easing, fn ) {\n\tvar opt = speed && typeof speed === \"object\" ? jQuery.extend( {}, speed ) : {\n\t\tcomplete: fn || !fn && easing ||\n\t\t\tjQuery.isFunction( speed ) && speed,\n\t\tduration: speed,\n\t\teasing: fn && easing || easing && !jQuery.isFunction( easing ) && easing\n\t};\n\n\topt.duration = jQuery.fx.off ? 0 : typeof opt.duration === \"number\" ? opt.duration :\n\t\topt.duration in jQuery.fx.speeds ?\n\t\t\tjQuery.fx.speeds[ opt.duration ] : jQuery.fx.speeds._default;\n\n\t// normalize opt.queue - true/undefined/null -> \"fx\"\n\tif ( opt.queue == null || opt.queue === true ) {\n\t\topt.queue = \"fx\";\n\t}\n\n\t// Queueing\n\topt.old = opt.complete;\n\n\topt.complete = function() {\n\t\tif ( jQuery.isFunction( opt.old ) ) {\n\t\t\topt.old.call( this );\n\t\t}\n\n\t\tif ( opt.queue ) {\n\t\t\tjQuery.dequeue( this, opt.queue );\n\t\t}\n\t};\n\n\treturn opt;\n};\n\njQuery.fn.extend( {\n\tfadeTo: function( speed, to, easing, callback ) {\n\n\t\t// show any hidden elements after setting opacity to 0\n\t\treturn this.filter( isHidden ).css( \"opacity\", 0 ).show()\n\n\t\t\t// animate to the value specified\n\t\t\t.end().animate( { opacity: to }, speed, easing, callback );\n\t},\n\tanimate: function( prop, speed, easing, callback ) {\n\t\tvar empty = jQuery.isEmptyObject( prop ),\n\t\t\toptall = jQuery.speed( speed, easing, callback ),\n\t\t\tdoAnimation = function() {\n\n\t\t\t\t// Operate on a copy of prop so per-property easing won't be lost\n\t\t\t\tvar anim = Animation( this, jQuery.extend( {}, prop ), optall );\n\n\t\t\t\t// Empty animations, or finishing resolves immediately\n\t\t\t\tif ( empty || jQuery._data( this, \"finish\" ) ) {\n\t\t\t\t\tanim.stop( true );\n\t\t\t\t}\n\t\t\t};\n\t\t\tdoAnimation.finish = doAnimation;\n\n\t\treturn empty || optall.queue === false ?\n\t\t\tthis.each( doAnimation ) :\n\t\t\tthis.queue( optall.queue, doAnimation );\n\t},\n\tstop: function( type, clearQueue, gotoEnd ) {\n\t\tvar stopQueue = function( hooks ) {\n\t\t\tvar stop = hooks.stop;\n\t\t\tdelete hooks.stop;\n\t\t\tstop( gotoEnd );\n\t\t};\n\n\t\tif ( typeof type !== \"string\" ) {\n\t\t\tgotoEnd = clearQueue;\n\t\t\tclearQueue = type;\n\t\t\ttype = undefined;\n\t\t}\n\t\tif ( clearQueue && type !== false ) {\n\t\t\tthis.queue( type || \"fx\", [] );\n\t\t}\n\n\t\treturn this.each( function() {\n\t\t\tvar dequeue = true,\n\t\t\t\tindex = type != null && type + \"queueHooks\",\n\t\t\t\ttimers = jQuery.timers,\n\t\t\t\tdata = jQuery._data( this );\n\n\t\t\tif ( index ) {\n\t\t\t\tif ( data[ index ] && data[ index ].stop ) {\n\t\t\t\t\tstopQueue( data[ index ] );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tfor ( index in data ) {\n\t\t\t\t\tif ( data[ index ] && data[ index ].stop && rrun.test( index ) ) {\n\t\t\t\t\t\tstopQueue( data[ index ] );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfor ( index = timers.length; index--; ) {\n\t\t\t\tif ( timers[ index ].elem === this &&\n\t\t\t\t\t( type == null || timers[ index ].queue === type ) ) {\n\n\t\t\t\t\ttimers[ index ].anim.stop( gotoEnd );\n\t\t\t\t\tdequeue = false;\n\t\t\t\t\ttimers.splice( index, 1 );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// start the next in the queue if the last step wasn't forced\n\t\t\t// timers currently will call their complete callbacks, which will dequeue\n\t\t\t// but only if they were gotoEnd\n\t\t\tif ( dequeue || !gotoEnd ) {\n\t\t\t\tjQuery.dequeue( this, type );\n\t\t\t}\n\t\t} );\n\t},\n\tfinish: function( type ) {\n\t\tif ( type !== false ) {\n\t\t\ttype = type || \"fx\";\n\t\t}\n\t\treturn this.each( function() {\n\t\t\tvar index,\n\t\t\t\tdata = jQuery._data( this ),\n\t\t\t\tqueue = data[ type + \"queue\" ],\n\t\t\t\thooks = data[ type + \"queueHooks\" ],\n\t\t\t\ttimers = jQuery.timers,\n\t\t\t\tlength = queue ? queue.length : 0;\n\n\t\t\t// enable finishing flag on private data\n\t\t\tdata.finish = true;\n\n\t\t\t// empty the queue first\n\t\t\tjQuery.queue( this, type, [] );\n\n\t\t\tif ( hooks && hooks.stop ) {\n\t\t\t\thooks.stop.call( this, true );\n\t\t\t}\n\n\t\t\t// look for any active animations, and finish them\n\t\t\tfor ( index = timers.length; index--; ) {\n\t\t\t\tif ( timers[ index ].elem === this && timers[ index ].queue === type ) {\n\t\t\t\t\ttimers[ index ].anim.stop( true );\n\t\t\t\t\ttimers.splice( index, 1 );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// look for any animations in the old queue and finish them\n\t\t\tfor ( index = 0; index < length; index++ ) {\n\t\t\t\tif ( queue[ index ] && queue[ index ].finish ) {\n\t\t\t\t\tqueue[ index ].finish.call( this );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// turn off finishing flag\n\t\t\tdelete data.finish;\n\t\t} );\n\t}\n} );\n\njQuery.each( [ \"toggle\", \"show\", \"hide\" ], function( i, name ) {\n\tvar cssFn = jQuery.fn[ name ];\n\tjQuery.fn[ name ] = function( speed, easing, callback ) {\n\t\treturn speed == null || typeof speed === \"boolean\" ?\n\t\t\tcssFn.apply( this, arguments ) :\n\t\t\tthis.animate( genFx( name, true ), speed, easing, callback );\n\t};\n} );\n\n// Generate shortcuts for custom animations\njQuery.each( {\n\tslideDown: genFx( \"show\" ),\n\tslideUp: genFx( \"hide\" ),\n\tslideToggle: genFx( \"toggle\" ),\n\tfadeIn: { opacity: \"show\" },\n\tfadeOut: { opacity: \"hide\" },\n\tfadeToggle: { opacity: \"toggle\" }\n}, function( name, props ) {\n\tjQuery.fn[ name ] = function( speed, easing, callback ) {\n\t\treturn this.animate( props, speed, easing, callback );\n\t};\n} );\n\njQuery.timers = [];\njQuery.fx.tick = function() {\n\tvar timer,\n\t\ttimers = jQuery.timers,\n\t\ti = 0;\n\n\tfxNow = jQuery.now();\n\n\tfor ( ; i < timers.length; i++ ) {\n\t\ttimer = timers[ i ];\n\n\t\t// Checks the timer has not already been removed\n\t\tif ( !timer() && timers[ i ] === timer ) {\n\t\t\ttimers.splice( i--, 1 );\n\t\t}\n\t}\n\n\tif ( !timers.length ) {\n\t\tjQuery.fx.stop();\n\t}\n\tfxNow = undefined;\n};\n\njQuery.fx.timer = function( timer ) {\n\tjQuery.timers.push( timer );\n\tif ( timer() ) {\n\t\tjQuery.fx.start();\n\t} else {\n\t\tjQuery.timers.pop();\n\t}\n};\n\njQuery.fx.interval = 13;\n\njQuery.fx.start = function() {\n\tif ( !timerId ) {\n\t\ttimerId = window.setInterval( jQuery.fx.tick, jQuery.fx.interval );\n\t}\n};\n\njQuery.fx.stop = function() {\n\twindow.clearInterval( timerId );\n\ttimerId = null;\n};\n\njQuery.fx.speeds = {\n\tslow: 600,\n\tfast: 200,\n\n\t// Default speed\n\t_default: 400\n};\n\n\n// Based off of the plugin by Clint Helfers, with permission.\n// http://web.archive.org/web/20100324014747/http://blindsignals.com/index.php/2009/07/jquery-delay/\njQuery.fn.delay = function( time, type ) {\n\ttime = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time;\n\ttype = type || \"fx\";\n\n\treturn this.queue( type, function( next, hooks ) {\n\t\tvar timeout = window.setTimeout( next, time );\n\t\thooks.stop = function() {\n\t\t\twindow.clearTimeout( timeout );\n\t\t};\n\t} );\n};\n\n\n( function() {\n\tvar a,\n\t\tinput = document.createElement( \"input\" ),\n\t\tdiv = document.createElement( \"div\" ),\n\t\tselect = document.createElement( \"select\" ),\n\t\topt = select.appendChild( document.createElement( \"option\" ) );\n\n\t// Setup\n\tdiv = document.createElement( \"div\" );\n\tdiv.setAttribute( \"className\", \"t\" );\n\tdiv.innerHTML = \"  <link/><table></table><a href='/a'>a</a><input type='checkbox'/>\";\n\ta = div.getElementsByTagName( \"a\" )[ 0 ];\n\n\t// Support: Windows Web Apps (WWA)\n\t// `type` must use .setAttribute for WWA (#14901)\n\tinput.setAttribute( \"type\", \"checkbox\" );\n\tdiv.appendChild( input );\n\n\ta = div.getElementsByTagName( \"a\" )[ 0 ];\n\n\t// First batch of tests.\n\ta.style.cssText = \"top:1px\";\n\n\t// Test setAttribute on camelCase class.\n\t// If it works, we need attrFixes when doing get/setAttribute (ie6/7)\n\tsupport.getSetAttribute = div.className !== \"t\";\n\n\t// Get the style information from getAttribute\n\t// (IE uses .cssText instead)\n\tsupport.style = /top/.test( a.getAttribute( \"style\" ) );\n\n\t// Make sure that URLs aren't manipulated\n\t// (IE normalizes it by default)\n\tsupport.hrefNormalized = a.getAttribute( \"href\" ) === \"/a\";\n\n\t// Check the default checkbox/radio value (\"\" on WebKit; \"on\" elsewhere)\n\tsupport.checkOn = !!input.value;\n\n\t// Make sure that a selected-by-default option has a working selected property.\n\t// (WebKit defaults to false instead of true, IE too, if it's in an optgroup)\n\tsupport.optSelected = opt.selected;\n\n\t// Tests for enctype support on a form (#6743)\n\tsupport.enctype = !!document.createElement( \"form\" ).enctype;\n\n\t// Make sure that the options inside disabled selects aren't marked as disabled\n\t// (WebKit marks them as disabled)\n\tselect.disabled = true;\n\tsupport.optDisabled = !opt.disabled;\n\n\t// Support: IE8 only\n\t// Check if we can trust getAttribute(\"value\")\n\tinput = document.createElement( \"input\" );\n\tinput.setAttribute( \"value\", \"\" );\n\tsupport.input = input.getAttribute( \"value\" ) === \"\";\n\n\t// Check if an input maintains its value after becoming a radio\n\tinput.value = \"t\";\n\tinput.setAttribute( \"type\", \"radio\" );\n\tsupport.radioValue = input.value === \"t\";\n} )();\n\n\nvar rreturn = /\\r/g,\n\trspaces = /[\\x20\\t\\r\\n\\f]+/g;\n\njQuery.fn.extend( {\n\tval: function( value ) {\n\t\tvar hooks, ret, isFunction,\n\t\t\telem = this[ 0 ];\n\n\t\tif ( !arguments.length ) {\n\t\t\tif ( elem ) {\n\t\t\t\thooks = jQuery.valHooks[ elem.type ] ||\n\t\t\t\t\tjQuery.valHooks[ elem.nodeName.toLowerCase() ];\n\n\t\t\t\tif (\n\t\t\t\t\thooks &&\n\t\t\t\t\t\"get\" in hooks &&\n\t\t\t\t\t( ret = hooks.get( elem, \"value\" ) ) !== undefined\n\t\t\t\t) {\n\t\t\t\t\treturn ret;\n\t\t\t\t}\n\n\t\t\t\tret = elem.value;\n\n\t\t\t\treturn typeof ret === \"string\" ?\n\n\t\t\t\t\t// handle most common string cases\n\t\t\t\t\tret.replace( rreturn, \"\" ) :\n\n\t\t\t\t\t// handle cases where value is null/undef or number\n\t\t\t\t\tret == null ? \"\" : ret;\n\t\t\t}\n\n\t\t\treturn;\n\t\t}\n\n\t\tisFunction = jQuery.isFunction( value );\n\n\t\treturn this.each( function( i ) {\n\t\t\tvar val;\n\n\t\t\tif ( this.nodeType !== 1 ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( isFunction ) {\n\t\t\t\tval = value.call( this, i, jQuery( this ).val() );\n\t\t\t} else {\n\t\t\t\tval = value;\n\t\t\t}\n\n\t\t\t// Treat null/undefined as \"\"; convert numbers to string\n\t\t\tif ( val == null ) {\n\t\t\t\tval = \"\";\n\t\t\t} else if ( typeof val === \"number\" ) {\n\t\t\t\tval += \"\";\n\t\t\t} else if ( jQuery.isArray( val ) ) {\n\t\t\t\tval = jQuery.map( val, function( value ) {\n\t\t\t\t\treturn value == null ? \"\" : value + \"\";\n\t\t\t\t} );\n\t\t\t}\n\n\t\t\thooks = jQuery.valHooks[ this.type ] || jQuery.valHooks[ this.nodeName.toLowerCase() ];\n\n\t\t\t// If set returns undefined, fall back to normal setting\n\t\t\tif ( !hooks || !( \"set\" in hooks ) || hooks.set( this, val, \"value\" ) === undefined ) {\n\t\t\t\tthis.value = val;\n\t\t\t}\n\t\t} );\n\t}\n} );\n\njQuery.extend( {\n\tvalHooks: {\n\t\toption: {\n\t\t\tget: function( elem ) {\n\t\t\t\tvar val = jQuery.find.attr( elem, \"value\" );\n\t\t\t\treturn val != null ?\n\t\t\t\t\tval :\n\n\t\t\t\t\t// Support: IE10-11+\n\t\t\t\t\t// option.text throws exceptions (#14686, #14858)\n\t\t\t\t\t// Strip and collapse whitespace\n\t\t\t\t\t// https://html.spec.whatwg.org/#strip-and-collapse-whitespace\n\t\t\t\t\tjQuery.trim( jQuery.text( elem ) ).replace( rspaces, \" \" );\n\t\t\t}\n\t\t},\n\t\tselect: {\n\t\t\tget: function( elem ) {\n\t\t\t\tvar value, option,\n\t\t\t\t\toptions = elem.options,\n\t\t\t\t\tindex = elem.selectedIndex,\n\t\t\t\t\tone = elem.type === \"select-one\" || index < 0,\n\t\t\t\t\tvalues = one ? null : [],\n\t\t\t\t\tmax = one ? index + 1 : options.length,\n\t\t\t\t\ti = index < 0 ?\n\t\t\t\t\t\tmax :\n\t\t\t\t\t\tone ? index : 0;\n\n\t\t\t\t// Loop through all the selected options\n\t\t\t\tfor ( ; i < max; i++ ) {\n\t\t\t\t\toption = options[ i ];\n\n\t\t\t\t\t// oldIE doesn't update selected after form reset (#2551)\n\t\t\t\t\tif ( ( option.selected || i === index ) &&\n\n\t\t\t\t\t\t\t// Don't return options that are disabled or in a disabled optgroup\n\t\t\t\t\t\t\t( support.optDisabled ?\n\t\t\t\t\t\t\t\t!option.disabled :\n\t\t\t\t\t\t\t\toption.getAttribute( \"disabled\" ) === null ) &&\n\t\t\t\t\t\t\t( !option.parentNode.disabled ||\n\t\t\t\t\t\t\t\t!jQuery.nodeName( option.parentNode, \"optgroup\" ) ) ) {\n\n\t\t\t\t\t\t// Get the specific value for the option\n\t\t\t\t\t\tvalue = jQuery( option ).val();\n\n\t\t\t\t\t\t// We don't need an array for one selects\n\t\t\t\t\t\tif ( one ) {\n\t\t\t\t\t\t\treturn value;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Multi-Selects return an array\n\t\t\t\t\t\tvalues.push( value );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn values;\n\t\t\t},\n\n\t\t\tset: function( elem, value ) {\n\t\t\t\tvar optionSet, option,\n\t\t\t\t\toptions = elem.options,\n\t\t\t\t\tvalues = jQuery.makeArray( value ),\n\t\t\t\t\ti = options.length;\n\n\t\t\t\twhile ( i-- ) {\n\t\t\t\t\toption = options[ i ];\n\n\t\t\t\t\tif ( jQuery.inArray( jQuery.valHooks.option.get( option ), values ) > -1 ) {\n\n\t\t\t\t\t\t// Support: IE6\n\t\t\t\t\t\t// When new option element is added to select box we need to\n\t\t\t\t\t\t// force reflow of newly added node in order to workaround delay\n\t\t\t\t\t\t// of initialization properties\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\toption.selected = optionSet = true;\n\n\t\t\t\t\t\t} catch ( _ ) {\n\n\t\t\t\t\t\t\t// Will be executed only in IE6\n\t\t\t\t\t\t\toption.scrollHeight;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t} else {\n\t\t\t\t\t\toption.selected = false;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Force browsers to behave consistently when non-matching value is set\n\t\t\t\tif ( !optionSet ) {\n\t\t\t\t\telem.selectedIndex = -1;\n\t\t\t\t}\n\n\t\t\t\treturn options;\n\t\t\t}\n\t\t}\n\t}\n} );\n\n// Radios and checkboxes getter/setter\njQuery.each( [ \"radio\", \"checkbox\" ], function() {\n\tjQuery.valHooks[ this ] = {\n\t\tset: function( elem, value ) {\n\t\t\tif ( jQuery.isArray( value ) ) {\n\t\t\t\treturn ( elem.checked = jQuery.inArray( jQuery( elem ).val(), value ) > -1 );\n\t\t\t}\n\t\t}\n\t};\n\tif ( !support.checkOn ) {\n\t\tjQuery.valHooks[ this ].get = function( elem ) {\n\t\t\treturn elem.getAttribute( \"value\" ) === null ? \"on\" : elem.value;\n\t\t};\n\t}\n} );\n\n\n\n\nvar nodeHook, boolHook,\n\tattrHandle = jQuery.expr.attrHandle,\n\truseDefault = /^(?:checked|selected)$/i,\n\tgetSetAttribute = support.getSetAttribute,\n\tgetSetInput = support.input;\n\njQuery.fn.extend( {\n\tattr: function( name, value ) {\n\t\treturn access( this, jQuery.attr, name, value, arguments.length > 1 );\n\t},\n\n\tremoveAttr: function( name ) {\n\t\treturn this.each( function() {\n\t\t\tjQuery.removeAttr( this, name );\n\t\t} );\n\t}\n} );\n\njQuery.extend( {\n\tattr: function( elem, name, value ) {\n\t\tvar ret, hooks,\n\t\t\tnType = elem.nodeType;\n\n\t\t// Don't get/set attributes on text, comment and attribute nodes\n\t\tif ( nType === 3 || nType === 8 || nType === 2 ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Fallback to prop when attributes are not supported\n\t\tif ( typeof elem.getAttribute === \"undefined\" ) {\n\t\t\treturn jQuery.prop( elem, name, value );\n\t\t}\n\n\t\t// All attributes are lowercase\n\t\t// Grab necessary hook if one is defined\n\t\tif ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) {\n\t\t\tname = name.toLowerCase();\n\t\t\thooks = jQuery.attrHooks[ name ] ||\n\t\t\t\t( jQuery.expr.match.bool.test( name ) ? boolHook : nodeHook );\n\t\t}\n\n\t\tif ( value !== undefined ) {\n\t\t\tif ( value === null ) {\n\t\t\t\tjQuery.removeAttr( elem, name );\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( hooks && \"set\" in hooks &&\n\t\t\t\t( ret = hooks.set( elem, value, name ) ) !== undefined ) {\n\t\t\t\treturn ret;\n\t\t\t}\n\n\t\t\telem.setAttribute( name, value + \"\" );\n\t\t\treturn value;\n\t\t}\n\n\t\tif ( hooks && \"get\" in hooks && ( ret = hooks.get( elem, name ) ) !== null ) {\n\t\t\treturn ret;\n\t\t}\n\n\t\tret = jQuery.find.attr( elem, name );\n\n\t\t// Non-existent attributes return null, we normalize to undefined\n\t\treturn ret == null ? undefined : ret;\n\t},\n\n\tattrHooks: {\n\t\ttype: {\n\t\t\tset: function( elem, value ) {\n\t\t\t\tif ( !support.radioValue && value === \"radio\" &&\n\t\t\t\t\tjQuery.nodeName( elem, \"input\" ) ) {\n\n\t\t\t\t\t// Setting the type on a radio button after the value resets the value in IE8-9\n\t\t\t\t\t// Reset value to default in case type is set after value during creation\n\t\t\t\t\tvar val = elem.value;\n\t\t\t\t\telem.setAttribute( \"type\", value );\n\t\t\t\t\tif ( val ) {\n\t\t\t\t\t\telem.value = val;\n\t\t\t\t\t}\n\t\t\t\t\treturn value;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t},\n\n\tremoveAttr: function( elem, value ) {\n\t\tvar name, propName,\n\t\t\ti = 0,\n\t\t\tattrNames = value && value.match( rnotwhite );\n\n\t\tif ( attrNames && elem.nodeType === 1 ) {\n\t\t\twhile ( ( name = attrNames[ i++ ] ) ) {\n\t\t\t\tpropName = jQuery.propFix[ name ] || name;\n\n\t\t\t\t// Boolean attributes get special treatment (#10870)\n\t\t\t\tif ( jQuery.expr.match.bool.test( name ) ) {\n\n\t\t\t\t\t// Set corresponding property to false\n\t\t\t\t\tif ( getSetInput && getSetAttribute || !ruseDefault.test( name ) ) {\n\t\t\t\t\t\telem[ propName ] = false;\n\n\t\t\t\t\t// Support: IE<9\n\t\t\t\t\t// Also clear defaultChecked/defaultSelected (if appropriate)\n\t\t\t\t\t} else {\n\t\t\t\t\t\telem[ jQuery.camelCase( \"default-\" + name ) ] =\n\t\t\t\t\t\t\telem[ propName ] = false;\n\t\t\t\t\t}\n\n\t\t\t\t// See #9699 for explanation of this approach (setting first, then removal)\n\t\t\t\t} else {\n\t\t\t\t\tjQuery.attr( elem, name, \"\" );\n\t\t\t\t}\n\n\t\t\t\telem.removeAttribute( getSetAttribute ? name : propName );\n\t\t\t}\n\t\t}\n\t}\n} );\n\n// Hooks for boolean attributes\nboolHook = {\n\tset: function( elem, value, name ) {\n\t\tif ( value === false ) {\n\n\t\t\t// Remove boolean attributes when set to false\n\t\t\tjQuery.removeAttr( elem, name );\n\t\t} else if ( getSetInput && getSetAttribute || !ruseDefault.test( name ) ) {\n\n\t\t\t// IE<8 needs the *property* name\n\t\t\telem.setAttribute( !getSetAttribute && jQuery.propFix[ name ] || name, name );\n\n\t\t} else {\n\n\t\t\t// Support: IE<9\n\t\t\t// Use defaultChecked and defaultSelected for oldIE\n\t\t\telem[ jQuery.camelCase( \"default-\" + name ) ] = elem[ name ] = true;\n\t\t}\n\t\treturn name;\n\t}\n};\n\njQuery.each( jQuery.expr.match.bool.source.match( /\\w+/g ), function( i, name ) {\n\tvar getter = attrHandle[ name ] || jQuery.find.attr;\n\n\tif ( getSetInput && getSetAttribute || !ruseDefault.test( name ) ) {\n\t\tattrHandle[ name ] = function( elem, name, isXML ) {\n\t\t\tvar ret, handle;\n\t\t\tif ( !isXML ) {\n\n\t\t\t\t// Avoid an infinite loop by temporarily removing this function from the getter\n\t\t\t\thandle = attrHandle[ name ];\n\t\t\t\tattrHandle[ name ] = ret;\n\t\t\t\tret = getter( elem, name, isXML ) != null ?\n\t\t\t\t\tname.toLowerCase() :\n\t\t\t\t\tnull;\n\t\t\t\tattrHandle[ name ] = handle;\n\t\t\t}\n\t\t\treturn ret;\n\t\t};\n\t} else {\n\t\tattrHandle[ name ] = function( elem, name, isXML ) {\n\t\t\tif ( !isXML ) {\n\t\t\t\treturn elem[ jQuery.camelCase( \"default-\" + name ) ] ?\n\t\t\t\t\tname.toLowerCase() :\n\t\t\t\t\tnull;\n\t\t\t}\n\t\t};\n\t}\n} );\n\n// fix oldIE attroperties\nif ( !getSetInput || !getSetAttribute ) {\n\tjQuery.attrHooks.value = {\n\t\tset: function( elem, value, name ) {\n\t\t\tif ( jQuery.nodeName( elem, \"input\" ) ) {\n\n\t\t\t\t// Does not return so that setAttribute is also used\n\t\t\t\telem.defaultValue = value;\n\t\t\t} else {\n\n\t\t\t\t// Use nodeHook if defined (#1954); otherwise setAttribute is fine\n\t\t\t\treturn nodeHook && nodeHook.set( elem, value, name );\n\t\t\t}\n\t\t}\n\t};\n}\n\n// IE6/7 do not support getting/setting some attributes with get/setAttribute\nif ( !getSetAttribute ) {\n\n\t// Use this for any attribute in IE6/7\n\t// This fixes almost every IE6/7 issue\n\tnodeHook = {\n\t\tset: function( elem, value, name ) {\n\n\t\t\t// Set the existing or create a new attribute node\n\t\t\tvar ret = elem.getAttributeNode( name );\n\t\t\tif ( !ret ) {\n\t\t\t\telem.setAttributeNode(\n\t\t\t\t\t( ret = elem.ownerDocument.createAttribute( name ) )\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tret.value = value += \"\";\n\n\t\t\t// Break association with cloned elements by also using setAttribute (#9646)\n\t\t\tif ( name === \"value\" || value === elem.getAttribute( name ) ) {\n\t\t\t\treturn value;\n\t\t\t}\n\t\t}\n\t};\n\n\t// Some attributes are constructed with empty-string values when not defined\n\tattrHandle.id = attrHandle.name = attrHandle.coords =\n\t\tfunction( elem, name, isXML ) {\n\t\t\tvar ret;\n\t\t\tif ( !isXML ) {\n\t\t\t\treturn ( ret = elem.getAttributeNode( name ) ) && ret.value !== \"\" ?\n\t\t\t\t\tret.value :\n\t\t\t\t\tnull;\n\t\t\t}\n\t\t};\n\n\t// Fixing value retrieval on a button requires this module\n\tjQuery.valHooks.button = {\n\t\tget: function( elem, name ) {\n\t\t\tvar ret = elem.getAttributeNode( name );\n\t\t\tif ( ret && ret.specified ) {\n\t\t\t\treturn ret.value;\n\t\t\t}\n\t\t},\n\t\tset: nodeHook.set\n\t};\n\n\t// Set contenteditable to false on removals(#10429)\n\t// Setting to empty string throws an error as an invalid value\n\tjQuery.attrHooks.contenteditable = {\n\t\tset: function( elem, value, name ) {\n\t\t\tnodeHook.set( elem, value === \"\" ? false : value, name );\n\t\t}\n\t};\n\n\t// Set width and height to auto instead of 0 on empty string( Bug #8150 )\n\t// This is for removals\n\tjQuery.each( [ \"width\", \"height\" ], function( i, name ) {\n\t\tjQuery.attrHooks[ name ] = {\n\t\t\tset: function( elem, value ) {\n\t\t\t\tif ( value === \"\" ) {\n\t\t\t\t\telem.setAttribute( name, \"auto\" );\n\t\t\t\t\treturn value;\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t} );\n}\n\nif ( !support.style ) {\n\tjQuery.attrHooks.style = {\n\t\tget: function( elem ) {\n\n\t\t\t// Return undefined in the case of empty string\n\t\t\t// Note: IE uppercases css property names, but if we were to .toLowerCase()\n\t\t\t// .cssText, that would destroy case sensitivity in URL's, like in \"background\"\n\t\t\treturn elem.style.cssText || undefined;\n\t\t},\n\t\tset: function( elem, value ) {\n\t\t\treturn ( elem.style.cssText = value + \"\" );\n\t\t}\n\t};\n}\n\n\n\n\nvar rfocusable = /^(?:input|select|textarea|button|object)$/i,\n\trclickable = /^(?:a|area)$/i;\n\njQuery.fn.extend( {\n\tprop: function( name, value ) {\n\t\treturn access( this, jQuery.prop, name, value, arguments.length > 1 );\n\t},\n\n\tremoveProp: function( name ) {\n\t\tname = jQuery.propFix[ name ] || name;\n\t\treturn this.each( function() {\n\n\t\t\t// try/catch handles cases where IE balks (such as removing a property on window)\n\t\t\ttry {\n\t\t\t\tthis[ name ] = undefined;\n\t\t\t\tdelete this[ name ];\n\t\t\t} catch ( e ) {}\n\t\t} );\n\t}\n} );\n\njQuery.extend( {\n\tprop: function( elem, name, value ) {\n\t\tvar ret, hooks,\n\t\t\tnType = elem.nodeType;\n\n\t\t// Don't get/set properties on text, comment and attribute nodes\n\t\tif ( nType === 3 || nType === 8 || nType === 2 ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) {\n\n\t\t\t// Fix name and attach hooks\n\t\t\tname = jQuery.propFix[ name ] || name;\n\t\t\thooks = jQuery.propHooks[ name ];\n\t\t}\n\n\t\tif ( value !== undefined ) {\n\t\t\tif ( hooks && \"set\" in hooks &&\n\t\t\t\t( ret = hooks.set( elem, value, name ) ) !== undefined ) {\n\t\t\t\treturn ret;\n\t\t\t}\n\n\t\t\treturn ( elem[ name ] = value );\n\t\t}\n\n\t\tif ( hooks && \"get\" in hooks && ( ret = hooks.get( elem, name ) ) !== null ) {\n\t\t\treturn ret;\n\t\t}\n\n\t\treturn elem[ name ];\n\t},\n\n\tpropHooks: {\n\t\ttabIndex: {\n\t\t\tget: function( elem ) {\n\n\t\t\t\t// elem.tabIndex doesn't always return the\n\t\t\t\t// correct value when it hasn't been explicitly set\n\t\t\t\t// http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/\n\t\t\t\t// Use proper attribute retrieval(#12072)\n\t\t\t\tvar tabindex = jQuery.find.attr( elem, \"tabindex\" );\n\n\t\t\t\treturn tabindex ?\n\t\t\t\t\tparseInt( tabindex, 10 ) :\n\t\t\t\t\trfocusable.test( elem.nodeName ) ||\n\t\t\t\t\t\trclickable.test( elem.nodeName ) && elem.href ?\n\t\t\t\t\t\t\t0 :\n\t\t\t\t\t\t\t-1;\n\t\t\t}\n\t\t}\n\t},\n\n\tpropFix: {\n\t\t\"for\": \"htmlFor\",\n\t\t\"class\": \"className\"\n\t}\n} );\n\n// Some attributes require a special call on IE\n// http://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx\nif ( !support.hrefNormalized ) {\n\n\t// href/src property should get the full normalized URL (#10299/#12915)\n\tjQuery.each( [ \"href\", \"src\" ], function( i, name ) {\n\t\tjQuery.propHooks[ name ] = {\n\t\t\tget: function( elem ) {\n\t\t\t\treturn elem.getAttribute( name, 4 );\n\t\t\t}\n\t\t};\n\t} );\n}\n\n// Support: Safari, IE9+\n// Accessing the selectedIndex property\n// forces the browser to respect setting selected\n// on the option\n// The getter ensures a default option is selected\n// when in an optgroup\nif ( !support.optSelected ) {\n\tjQuery.propHooks.selected = {\n\t\tget: function( elem ) {\n\t\t\tvar parent = elem.parentNode;\n\n\t\t\tif ( parent ) {\n\t\t\t\tparent.selectedIndex;\n\n\t\t\t\t// Make sure that it also works with optgroups, see #5701\n\t\t\t\tif ( parent.parentNode ) {\n\t\t\t\t\tparent.parentNode.selectedIndex;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn null;\n\t\t},\n\t\tset: function( elem ) {\n\t\t\tvar parent = elem.parentNode;\n\t\t\tif ( parent ) {\n\t\t\t\tparent.selectedIndex;\n\n\t\t\t\tif ( parent.parentNode ) {\n\t\t\t\t\tparent.parentNode.selectedIndex;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t};\n}\n\njQuery.each( [\n\t\"tabIndex\",\n\t\"readOnly\",\n\t\"maxLength\",\n\t\"cellSpacing\",\n\t\"cellPadding\",\n\t\"rowSpan\",\n\t\"colSpan\",\n\t\"useMap\",\n\t\"frameBorder\",\n\t\"contentEditable\"\n], function() {\n\tjQuery.propFix[ this.toLowerCase() ] = this;\n} );\n\n// IE6/7 call enctype encoding\nif ( !support.enctype ) {\n\tjQuery.propFix.enctype = \"encoding\";\n}\n\n\n\n\nvar rclass = /[\\t\\r\\n\\f]/g;\n\nfunction getClass( elem ) {\n\treturn jQuery.attr( elem, \"class\" ) || \"\";\n}\n\njQuery.fn.extend( {\n\taddClass: function( value ) {\n\t\tvar classes, elem, cur, curValue, clazz, j, finalValue,\n\t\t\ti = 0;\n\n\t\tif ( jQuery.isFunction( value ) ) {\n\t\t\treturn this.each( function( j ) {\n\t\t\t\tjQuery( this ).addClass( value.call( this, j, getClass( this ) ) );\n\t\t\t} );\n\t\t}\n\n\t\tif ( typeof value === \"string\" && value ) {\n\t\t\tclasses = value.match( rnotwhite ) || [];\n\n\t\t\twhile ( ( elem = this[ i++ ] ) ) {\n\t\t\t\tcurValue = getClass( elem );\n\t\t\t\tcur = elem.nodeType === 1 &&\n\t\t\t\t\t( \" \" + curValue + \" \" ).replace( rclass, \" \" );\n\n\t\t\t\tif ( cur ) {\n\t\t\t\t\tj = 0;\n\t\t\t\t\twhile ( ( clazz = classes[ j++ ] ) ) {\n\t\t\t\t\t\tif ( cur.indexOf( \" \" + clazz + \" \" ) < 0 ) {\n\t\t\t\t\t\t\tcur += clazz + \" \";\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// only assign if different to avoid unneeded rendering.\n\t\t\t\t\tfinalValue = jQuery.trim( cur );\n\t\t\t\t\tif ( curValue !== finalValue ) {\n\t\t\t\t\t\tjQuery.attr( elem, \"class\", finalValue );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn this;\n\t},\n\n\tremoveClass: function( value ) {\n\t\tvar classes, elem, cur, curValue, clazz, j, finalValue,\n\t\t\ti = 0;\n\n\t\tif ( jQuery.isFunction( value ) ) {\n\t\t\treturn this.each( function( j ) {\n\t\t\t\tjQuery( this ).removeClass( value.call( this, j, getClass( this ) ) );\n\t\t\t} );\n\t\t}\n\n\t\tif ( !arguments.length ) {\n\t\t\treturn this.attr( \"class\", \"\" );\n\t\t}\n\n\t\tif ( typeof value === \"string\" && value ) {\n\t\t\tclasses = value.match( rnotwhite ) || [];\n\n\t\t\twhile ( ( elem = this[ i++ ] ) ) {\n\t\t\t\tcurValue = getClass( elem );\n\n\t\t\t\t// This expression is here for better compressibility (see addClass)\n\t\t\t\tcur = elem.nodeType === 1 &&\n\t\t\t\t\t( \" \" + curValue + \" \" ).replace( rclass, \" \" );\n\n\t\t\t\tif ( cur ) {\n\t\t\t\t\tj = 0;\n\t\t\t\t\twhile ( ( clazz = classes[ j++ ] ) ) {\n\n\t\t\t\t\t\t// Remove *all* instances\n\t\t\t\t\t\twhile ( cur.indexOf( \" \" + clazz + \" \" ) > -1 ) {\n\t\t\t\t\t\t\tcur = cur.replace( \" \" + clazz + \" \", \" \" );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Only assign if different to avoid unneeded rendering.\n\t\t\t\t\tfinalValue = jQuery.trim( cur );\n\t\t\t\t\tif ( curValue !== finalValue ) {\n\t\t\t\t\t\tjQuery.attr( elem, \"class\", finalValue );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn this;\n\t},\n\n\ttoggleClass: function( value, stateVal ) {\n\t\tvar type = typeof value;\n\n\t\tif ( typeof stateVal === \"boolean\" && type === \"string\" ) {\n\t\t\treturn stateVal ? this.addClass( value ) : this.removeClass( value );\n\t\t}\n\n\t\tif ( jQuery.isFunction( value ) ) {\n\t\t\treturn this.each( function( i ) {\n\t\t\t\tjQuery( this ).toggleClass(\n\t\t\t\t\tvalue.call( this, i, getClass( this ), stateVal ),\n\t\t\t\t\tstateVal\n\t\t\t\t);\n\t\t\t} );\n\t\t}\n\n\t\treturn this.each( function() {\n\t\t\tvar className, i, self, classNames;\n\n\t\t\tif ( type === \"string\" ) {\n\n\t\t\t\t// Toggle individual class names\n\t\t\t\ti = 0;\n\t\t\t\tself = jQuery( this );\n\t\t\t\tclassNames = value.match( rnotwhite ) || [];\n\n\t\t\t\twhile ( ( className = classNames[ i++ ] ) ) {\n\n\t\t\t\t\t// Check each className given, space separated list\n\t\t\t\t\tif ( self.hasClass( className ) ) {\n\t\t\t\t\t\tself.removeClass( className );\n\t\t\t\t\t} else {\n\t\t\t\t\t\tself.addClass( className );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t// Toggle whole class name\n\t\t\t} else if ( value === undefined || type === \"boolean\" ) {\n\t\t\t\tclassName = getClass( this );\n\t\t\t\tif ( className ) {\n\n\t\t\t\t\t// store className if set\n\t\t\t\t\tjQuery._data( this, \"__className__\", className );\n\t\t\t\t}\n\n\t\t\t\t// If the element has a class name or if we're passed \"false\",\n\t\t\t\t// then remove the whole classname (if there was one, the above saved it).\n\t\t\t\t// Otherwise bring back whatever was previously saved (if anything),\n\t\t\t\t// falling back to the empty string if nothing was stored.\n\t\t\t\tjQuery.attr( this, \"class\",\n\t\t\t\t\tclassName || value === false ?\n\t\t\t\t\t\"\" :\n\t\t\t\t\tjQuery._data( this, \"__className__\" ) || \"\"\n\t\t\t\t);\n\t\t\t}\n\t\t} );\n\t},\n\n\thasClass: function( selector ) {\n\t\tvar className, elem,\n\t\t\ti = 0;\n\n\t\tclassName = \" \" + selector + \" \";\n\t\twhile ( ( elem = this[ i++ ] ) ) {\n\t\t\tif ( elem.nodeType === 1 &&\n\t\t\t\t( \" \" + getClass( elem ) + \" \" ).replace( rclass, \" \" )\n\t\t\t\t\t.indexOf( className ) > -1\n\t\t\t) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}\n} );\n\n\n\n\n// Return jQuery for attributes-only inclusion\n\n\njQuery.each( ( \"blur focus focusin focusout load resize scroll unload click dblclick \" +\n\t\"mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave \" +\n\t\"change select submit keydown keypress keyup error contextmenu\" ).split( \" \" ),\n\tfunction( i, name ) {\n\n\t// Handle event binding\n\tjQuery.fn[ name ] = function( data, fn ) {\n\t\treturn arguments.length > 0 ?\n\t\t\tthis.on( name, null, data, fn ) :\n\t\t\tthis.trigger( name );\n\t};\n} );\n\njQuery.fn.extend( {\n\thover: function( fnOver, fnOut ) {\n\t\treturn this.mouseenter( fnOver ).mouseleave( fnOut || fnOver );\n\t}\n} );\n\n\nvar location = window.location;\n\nvar nonce = jQuery.now();\n\nvar rquery = ( /\\?/ );\n\n\n\nvar rvalidtokens = /(,)|(\\[|{)|(}|])|\"(?:[^\"\\\\\\r\\n]|\\\\[\"\\\\\\/bfnrt]|\\\\u[\\da-fA-F]{4})*\"\\s*:?|true|false|null|-?(?!0\\d)\\d+(?:\\.\\d+|)(?:[eE][+-]?\\d+|)/g;\n\njQuery.parseJSON = function( data ) {\n\n\t// Attempt to parse using the native JSON parser first\n\tif ( window.JSON && window.JSON.parse ) {\n\n\t\t// Support: Android 2.3\n\t\t// Workaround failure to string-cast null input\n\t\treturn window.JSON.parse( data + \"\" );\n\t}\n\n\tvar requireNonComma,\n\t\tdepth = null,\n\t\tstr = jQuery.trim( data + \"\" );\n\n\t// Guard against invalid (and possibly dangerous) input by ensuring that nothing remains\n\t// after removing valid tokens\n\treturn str && !jQuery.trim( str.replace( rvalidtokens, function( token, comma, open, close ) {\n\n\t\t// Force termination if we see a misplaced comma\n\t\tif ( requireNonComma && comma ) {\n\t\t\tdepth = 0;\n\t\t}\n\n\t\t// Perform no more replacements after returning to outermost depth\n\t\tif ( depth === 0 ) {\n\t\t\treturn token;\n\t\t}\n\n\t\t// Commas must not follow \"[\", \"{\", or \",\"\n\t\trequireNonComma = open || comma;\n\n\t\t// Determine new depth\n\t\t// array/object open (\"[\" or \"{\"): depth += true - false (increment)\n\t\t// array/object close (\"]\" or \"}\"): depth += false - true (decrement)\n\t\t// other cases (\",\" or primitive): depth += true - true (numeric cast)\n\t\tdepth += !close - !open;\n\n\t\t// Remove this token\n\t\treturn \"\";\n\t} ) ) ?\n\t\t( Function( \"return \" + str ) )() :\n\t\tjQuery.error( \"Invalid JSON: \" + data );\n};\n\n\n// Cross-browser xml parsing\njQuery.parseXML = function( data ) {\n\tvar xml, tmp;\n\tif ( !data || typeof data !== \"string\" ) {\n\t\treturn null;\n\t}\n\ttry {\n\t\tif ( window.DOMParser ) { // Standard\n\t\t\ttmp = new window.DOMParser();\n\t\t\txml = tmp.parseFromString( data, \"text/xml\" );\n\t\t} else { // IE\n\t\t\txml = new window.ActiveXObject( \"Microsoft.XMLDOM\" );\n\t\t\txml.async = \"false\";\n\t\t\txml.loadXML( data );\n\t\t}\n\t} catch ( e ) {\n\t\txml = undefined;\n\t}\n\tif ( !xml || !xml.documentElement || xml.getElementsByTagName( \"parsererror\" ).length ) {\n\t\tjQuery.error( \"Invalid XML: \" + data );\n\t}\n\treturn xml;\n};\n\n\nvar\n\trhash = /#.*$/,\n\trts = /([?&])_=[^&]*/,\n\n\t// IE leaves an \\r character at EOL\n\trheaders = /^(.*?):[ \\t]*([^\\r\\n]*)\\r?$/mg,\n\n\t// #7653, #8125, #8152: local protocol detection\n\trlocalProtocol = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/,\n\trnoContent = /^(?:GET|HEAD)$/,\n\trprotocol = /^\\/\\//,\n\trurl = /^([\\w.+-]+:)(?:\\/\\/(?:[^\\/?#]*@|)([^\\/?#:]*)(?::(\\d+)|)|)/,\n\n\t/* Prefilters\n\t * 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example)\n\t * 2) These are called:\n\t *    - BEFORE asking for a transport\n\t *    - AFTER param serialization (s.data is a string if s.processData is true)\n\t * 3) key is the dataType\n\t * 4) the catchall symbol \"*\" can be used\n\t * 5) execution will start with transport dataType and THEN continue down to \"*\" if needed\n\t */\n\tprefilters = {},\n\n\t/* Transports bindings\n\t * 1) key is the dataType\n\t * 2) the catchall symbol \"*\" can be used\n\t * 3) selection will start with transport dataType and THEN go to \"*\" if needed\n\t */\n\ttransports = {},\n\n\t// Avoid comment-prolog char sequence (#10098); must appease lint and evade compression\n\tallTypes = \"*/\".concat( \"*\" ),\n\n\t// Document location\n\tajaxLocation = location.href,\n\n\t// Segment location into parts\n\tajaxLocParts = rurl.exec( ajaxLocation.toLowerCase() ) || [];\n\n// Base \"constructor\" for jQuery.ajaxPrefilter and jQuery.ajaxTransport\nfunction addToPrefiltersOrTransports( structure ) {\n\n\t// dataTypeExpression is optional and defaults to \"*\"\n\treturn function( dataTypeExpression, func ) {\n\n\t\tif ( typeof dataTypeExpression !== \"string\" ) {\n\t\t\tfunc = dataTypeExpression;\n\t\t\tdataTypeExpression = \"*\";\n\t\t}\n\n\t\tvar dataType,\n\t\t\ti = 0,\n\t\t\tdataTypes = dataTypeExpression.toLowerCase().match( rnotwhite ) || [];\n\n\t\tif ( jQuery.isFunction( func ) ) {\n\n\t\t\t// For each dataType in the dataTypeExpression\n\t\t\twhile ( ( dataType = dataTypes[ i++ ] ) ) {\n\n\t\t\t\t// Prepend if requested\n\t\t\t\tif ( dataType.charAt( 0 ) === \"+\" ) {\n\t\t\t\t\tdataType = dataType.slice( 1 ) || \"*\";\n\t\t\t\t\t( structure[ dataType ] = structure[ dataType ] || [] ).unshift( func );\n\n\t\t\t\t// Otherwise append\n\t\t\t\t} else {\n\t\t\t\t\t( structure[ dataType ] = structure[ dataType ] || [] ).push( func );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t};\n}\n\n// Base inspection function for prefilters and transports\nfunction inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\n\tvar inspected = {},\n\t\tseekingTransport = ( structure === transports );\n\n\tfunction inspect( dataType ) {\n\t\tvar selected;\n\t\tinspected[ dataType ] = true;\n\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n\t\t\tif ( typeof dataTypeOrTransport === \"string\" &&\n\t\t\t\t!seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\n\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\n\t\t\t\tinspect( dataTypeOrTransport );\n\t\t\t\treturn false;\n\t\t\t} else if ( seekingTransport ) {\n\t\t\t\treturn !( selected = dataTypeOrTransport );\n\t\t\t}\n\t\t} );\n\t\treturn selected;\n\t}\n\n\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n}\n\n// A special extend for ajax options\n// that takes \"flat\" options (not to be deep extended)\n// Fixes #9887\nfunction ajaxExtend( target, src ) {\n\tvar deep, key,\n\t\tflatOptions = jQuery.ajaxSettings.flatOptions || {};\n\n\tfor ( key in src ) {\n\t\tif ( src[ key ] !== undefined ) {\n\t\t\t( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ];\n\t\t}\n\t}\n\tif ( deep ) {\n\t\tjQuery.extend( true, target, deep );\n\t}\n\n\treturn target;\n}\n\n/* Handles responses to an ajax request:\n * - finds the right dataType (mediates between content-type and expected dataType)\n * - returns the corresponding response\n */\nfunction ajaxHandleResponses( s, jqXHR, responses ) {\n\tvar firstDataType, ct, finalDataType, type,\n\t\tcontents = s.contents,\n\t\tdataTypes = s.dataTypes;\n\n\t// Remove auto dataType and get content-type in the process\n\twhile ( dataTypes[ 0 ] === \"*\" ) {\n\t\tdataTypes.shift();\n\t\tif ( ct === undefined ) {\n\t\t\tct = s.mimeType || jqXHR.getResponseHeader( \"Content-Type\" );\n\t\t}\n\t}\n\n\t// Check if we're dealing with a known content-type\n\tif ( ct ) {\n\t\tfor ( type in contents ) {\n\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\tdataTypes.unshift( type );\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Check to see if we have a response for the expected dataType\n\tif ( dataTypes[ 0 ] in responses ) {\n\t\tfinalDataType = dataTypes[ 0 ];\n\t} else {\n\n\t\t// Try convertible dataTypes\n\t\tfor ( type in responses ) {\n\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[ 0 ] ] ) {\n\t\t\t\tfinalDataType = type;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ( !firstDataType ) {\n\t\t\t\tfirstDataType = type;\n\t\t\t}\n\t\t}\n\n\t\t// Or just use first one\n\t\tfinalDataType = finalDataType || firstDataType;\n\t}\n\n\t// If we found a dataType\n\t// We add the dataType to the list if needed\n\t// and return the corresponding response\n\tif ( finalDataType ) {\n\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\tdataTypes.unshift( finalDataType );\n\t\t}\n\t\treturn responses[ finalDataType ];\n\t}\n}\n\n/* Chain conversions given the request and the original response\n * Also sets the responseXXX fields on the jqXHR instance\n */\nfunction ajaxConvert( s, response, jqXHR, isSuccess ) {\n\tvar conv2, current, conv, tmp, prev,\n\t\tconverters = {},\n\n\t\t// Work with a copy of dataTypes in case we need to modify it for conversion\n\t\tdataTypes = s.dataTypes.slice();\n\n\t// Create converters map with lowercased keys\n\tif ( dataTypes[ 1 ] ) {\n\t\tfor ( conv in s.converters ) {\n\t\t\tconverters[ conv.toLowerCase() ] = s.converters[ conv ];\n\t\t}\n\t}\n\n\tcurrent = dataTypes.shift();\n\n\t// Convert to each sequential dataType\n\twhile ( current ) {\n\n\t\tif ( s.responseFields[ current ] ) {\n\t\t\tjqXHR[ s.responseFields[ current ] ] = response;\n\t\t}\n\n\t\t// Apply the dataFilter if provided\n\t\tif ( !prev && isSuccess && s.dataFilter ) {\n\t\t\tresponse = s.dataFilter( response, s.dataType );\n\t\t}\n\n\t\tprev = current;\n\t\tcurrent = dataTypes.shift();\n\n\t\tif ( current ) {\n\n\t\t\t// There's only work to do if current dataType is non-auto\n\t\t\tif ( current === \"*\" ) {\n\n\t\t\t\tcurrent = prev;\n\n\t\t\t// Convert response if prev dataType is non-auto and differs from current\n\t\t\t} else if ( prev !== \"*\" && prev !== current ) {\n\n\t\t\t\t// Seek a direct converter\n\t\t\t\tconv = converters[ prev + \" \" + current ] || converters[ \"* \" + current ];\n\n\t\t\t\t// If none found, seek a pair\n\t\t\t\tif ( !conv ) {\n\t\t\t\t\tfor ( conv2 in converters ) {\n\n\t\t\t\t\t\t// If conv2 outputs current\n\t\t\t\t\t\ttmp = conv2.split( \" \" );\n\t\t\t\t\t\tif ( tmp[ 1 ] === current ) {\n\n\t\t\t\t\t\t\t// If prev can be converted to accepted input\n\t\t\t\t\t\t\tconv = converters[ prev + \" \" + tmp[ 0 ] ] ||\n\t\t\t\t\t\t\t\tconverters[ \"* \" + tmp[ 0 ] ];\n\t\t\t\t\t\t\tif ( conv ) {\n\n\t\t\t\t\t\t\t\t// Condense equivalence converters\n\t\t\t\t\t\t\t\tif ( conv === true ) {\n\t\t\t\t\t\t\t\t\tconv = converters[ conv2 ];\n\n\t\t\t\t\t\t\t\t// Otherwise, insert the intermediate dataType\n\t\t\t\t\t\t\t\t} else if ( converters[ conv2 ] !== true ) {\n\t\t\t\t\t\t\t\t\tcurrent = tmp[ 0 ];\n\t\t\t\t\t\t\t\t\tdataTypes.unshift( tmp[ 1 ] );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Apply converter (if not an equivalence)\n\t\t\t\tif ( conv !== true ) {\n\n\t\t\t\t\t// Unless errors are allowed to bubble, catch and return them\n\t\t\t\t\tif ( conv && s[ \"throws\" ] ) { // jscs:ignore requireDotNotation\n\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t\t} catch ( e ) {\n\t\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\t\tstate: \"parsererror\",\n\t\t\t\t\t\t\t\terror: conv ? e : \"No conversion from \" + prev + \" to \" + current\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn { state: \"success\", data: response };\n}\n\njQuery.extend( {\n\n\t// Counter for holding the number of active queries\n\tactive: 0,\n\n\t// Last-Modified header cache for next request\n\tlastModified: {},\n\tetag: {},\n\n\tajaxSettings: {\n\t\turl: ajaxLocation,\n\t\ttype: \"GET\",\n\t\tisLocal: rlocalProtocol.test( ajaxLocParts[ 1 ] ),\n\t\tglobal: true,\n\t\tprocessData: true,\n\t\tasync: true,\n\t\tcontentType: \"application/x-www-form-urlencoded; charset=UTF-8\",\n\t\t/*\n\t\ttimeout: 0,\n\t\tdata: null,\n\t\tdataType: null,\n\t\tusername: null,\n\t\tpassword: null,\n\t\tcache: null,\n\t\tthrows: false,\n\t\ttraditional: false,\n\t\theaders: {},\n\t\t*/\n\n\t\taccepts: {\n\t\t\t\"*\": allTypes,\n\t\t\ttext: \"text/plain\",\n\t\t\thtml: \"text/html\",\n\t\t\txml: \"application/xml, text/xml\",\n\t\t\tjson: \"application/json, text/javascript\"\n\t\t},\n\n\t\tcontents: {\n\t\t\txml: /\\bxml\\b/,\n\t\t\thtml: /\\bhtml/,\n\t\t\tjson: /\\bjson\\b/\n\t\t},\n\n\t\tresponseFields: {\n\t\t\txml: \"responseXML\",\n\t\t\ttext: \"responseText\",\n\t\t\tjson: \"responseJSON\"\n\t\t},\n\n\t\t// Data converters\n\t\t// Keys separate source (or catchall \"*\") and destination types with a single space\n\t\tconverters: {\n\n\t\t\t// Convert anything to text\n\t\t\t\"* text\": String,\n\n\t\t\t// Text to html (true = no transformation)\n\t\t\t\"text html\": true,\n\n\t\t\t// Evaluate text as a json expression\n\t\t\t\"text json\": jQuery.parseJSON,\n\n\t\t\t// Parse text as xml\n\t\t\t\"text xml\": jQuery.parseXML\n\t\t},\n\n\t\t// For options that shouldn't be deep extended:\n\t\t// you can add your own custom options here if\n\t\t// and when you create one that shouldn't be\n\t\t// deep extended (see ajaxExtend)\n\t\tflatOptions: {\n\t\t\turl: true,\n\t\t\tcontext: true\n\t\t}\n\t},\n\n\t// Creates a full fledged settings object into target\n\t// with both ajaxSettings and settings fields.\n\t// If target is omitted, writes into ajaxSettings.\n\tajaxSetup: function( target, settings ) {\n\t\treturn settings ?\n\n\t\t\t// Building a settings object\n\t\t\tajaxExtend( ajaxExtend( target, jQuery.ajaxSettings ), settings ) :\n\n\t\t\t// Extending ajaxSettings\n\t\t\tajaxExtend( jQuery.ajaxSettings, target );\n\t},\n\n\tajaxPrefilter: addToPrefiltersOrTransports( prefilters ),\n\tajaxTransport: addToPrefiltersOrTransports( transports ),\n\n\t// Main method\n\tajax: function( url, options ) {\n\n\t\t// If url is an object, simulate pre-1.5 signature\n\t\tif ( typeof url === \"object\" ) {\n\t\t\toptions = url;\n\t\t\turl = undefined;\n\t\t}\n\n\t\t// Force options to be an object\n\t\toptions = options || {};\n\n\t\tvar\n\n\t\t\t// Cross-domain detection vars\n\t\t\tparts,\n\n\t\t\t// Loop variable\n\t\t\ti,\n\n\t\t\t// URL without anti-cache param\n\t\t\tcacheURL,\n\n\t\t\t// Response headers as string\n\t\t\tresponseHeadersString,\n\n\t\t\t// timeout handle\n\t\t\ttimeoutTimer,\n\n\t\t\t// To know if global events are to be dispatched\n\t\t\tfireGlobals,\n\n\t\t\ttransport,\n\n\t\t\t// Response headers\n\t\t\tresponseHeaders,\n\n\t\t\t// Create the final options object\n\t\t\ts = jQuery.ajaxSetup( {}, options ),\n\n\t\t\t// Callbacks context\n\t\t\tcallbackContext = s.context || s,\n\n\t\t\t// Context for global events is callbackContext if it is a DOM node or jQuery collection\n\t\t\tglobalEventContext = s.context &&\n\t\t\t\t( callbackContext.nodeType || callbackContext.jquery ) ?\n\t\t\t\t\tjQuery( callbackContext ) :\n\t\t\t\t\tjQuery.event,\n\n\t\t\t// Deferreds\n\t\t\tdeferred = jQuery.Deferred(),\n\t\t\tcompleteDeferred = jQuery.Callbacks( \"once memory\" ),\n\n\t\t\t// Status-dependent callbacks\n\t\t\tstatusCode = s.statusCode || {},\n\n\t\t\t// Headers (they are sent all at once)\n\t\t\trequestHeaders = {},\n\t\t\trequestHeadersNames = {},\n\n\t\t\t// The jqXHR state\n\t\t\tstate = 0,\n\n\t\t\t// Default abort message\n\t\t\tstrAbort = \"canceled\",\n\n\t\t\t// Fake xhr\n\t\t\tjqXHR = {\n\t\t\t\treadyState: 0,\n\n\t\t\t\t// Builds headers hashtable if needed\n\t\t\t\tgetResponseHeader: function( key ) {\n\t\t\t\t\tvar match;\n\t\t\t\t\tif ( state === 2 ) {\n\t\t\t\t\t\tif ( !responseHeaders ) {\n\t\t\t\t\t\t\tresponseHeaders = {};\n\t\t\t\t\t\t\twhile ( ( match = rheaders.exec( responseHeadersString ) ) ) {\n\t\t\t\t\t\t\t\tresponseHeaders[ match[ 1 ].toLowerCase() ] = match[ 2 ];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tmatch = responseHeaders[ key.toLowerCase() ];\n\t\t\t\t\t}\n\t\t\t\t\treturn match == null ? null : match;\n\t\t\t\t},\n\n\t\t\t\t// Raw string\n\t\t\t\tgetAllResponseHeaders: function() {\n\t\t\t\t\treturn state === 2 ? responseHeadersString : null;\n\t\t\t\t},\n\n\t\t\t\t// Caches the header\n\t\t\t\tsetRequestHeader: function( name, value ) {\n\t\t\t\t\tvar lname = name.toLowerCase();\n\t\t\t\t\tif ( !state ) {\n\t\t\t\t\t\tname = requestHeadersNames[ lname ] = requestHeadersNames[ lname ] || name;\n\t\t\t\t\t\trequestHeaders[ name ] = value;\n\t\t\t\t\t}\n\t\t\t\t\treturn this;\n\t\t\t\t},\n\n\t\t\t\t// Overrides response content-type header\n\t\t\t\toverrideMimeType: function( type ) {\n\t\t\t\t\tif ( !state ) {\n\t\t\t\t\t\ts.mimeType = type;\n\t\t\t\t\t}\n\t\t\t\t\treturn this;\n\t\t\t\t},\n\n\t\t\t\t// Status-dependent callbacks\n\t\t\t\tstatusCode: function( map ) {\n\t\t\t\t\tvar code;\n\t\t\t\t\tif ( map ) {\n\t\t\t\t\t\tif ( state < 2 ) {\n\t\t\t\t\t\t\tfor ( code in map ) {\n\n\t\t\t\t\t\t\t\t// Lazy-add the new callback in a way that preserves old ones\n\t\t\t\t\t\t\t\tstatusCode[ code ] = [ statusCode[ code ], map[ code ] ];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t// Execute the appropriate callbacks\n\t\t\t\t\t\t\tjqXHR.always( map[ jqXHR.status ] );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\treturn this;\n\t\t\t\t},\n\n\t\t\t\t// Cancel the request\n\t\t\t\tabort: function( statusText ) {\n\t\t\t\t\tvar finalText = statusText || strAbort;\n\t\t\t\t\tif ( transport ) {\n\t\t\t\t\t\ttransport.abort( finalText );\n\t\t\t\t\t}\n\t\t\t\t\tdone( 0, finalText );\n\t\t\t\t\treturn this;\n\t\t\t\t}\n\t\t\t};\n\n\t\t// Attach deferreds\n\t\tdeferred.promise( jqXHR ).complete = completeDeferred.add;\n\t\tjqXHR.success = jqXHR.done;\n\t\tjqXHR.error = jqXHR.fail;\n\n\t\t// Remove hash character (#7531: and string promotion)\n\t\t// Add protocol if not provided (#5866: IE7 issue with protocol-less urls)\n\t\t// Handle falsy url in the settings object (#10093: consistency with old signature)\n\t\t// We also use the url parameter if available\n\t\ts.url = ( ( url || s.url || ajaxLocation ) + \"\" )\n\t\t\t.replace( rhash, \"\" )\n\t\t\t.replace( rprotocol, ajaxLocParts[ 1 ] + \"//\" );\n\n\t\t// Alias method option to type as per ticket #12004\n\t\ts.type = options.method || options.type || s.method || s.type;\n\n\t\t// Extract dataTypes list\n\t\ts.dataTypes = jQuery.trim( s.dataType || \"*\" ).toLowerCase().match( rnotwhite ) || [ \"\" ];\n\n\t\t// A cross-domain request is in order when we have a protocol:host:port mismatch\n\t\tif ( s.crossDomain == null ) {\n\t\t\tparts = rurl.exec( s.url.toLowerCase() );\n\t\t\ts.crossDomain = !!( parts &&\n\t\t\t\t( parts[ 1 ] !== ajaxLocParts[ 1 ] || parts[ 2 ] !== ajaxLocParts[ 2 ] ||\n\t\t\t\t\t( parts[ 3 ] || ( parts[ 1 ] === \"http:\" ? \"80\" : \"443\" ) ) !==\n\t\t\t\t\t\t( ajaxLocParts[ 3 ] || ( ajaxLocParts[ 1 ] === \"http:\" ? \"80\" : \"443\" ) ) )\n\t\t\t);\n\t\t}\n\n\t\t// Convert data if not already a string\n\t\tif ( s.data && s.processData && typeof s.data !== \"string\" ) {\n\t\t\ts.data = jQuery.param( s.data, s.traditional );\n\t\t}\n\n\t\t// Apply prefilters\n\t\tinspectPrefiltersOrTransports( prefilters, s, options, jqXHR );\n\n\t\t// If request was aborted inside a prefilter, stop there\n\t\tif ( state === 2 ) {\n\t\t\treturn jqXHR;\n\t\t}\n\n\t\t// We can fire global events as of now if asked to\n\t\t// Don't fire events if jQuery.event is undefined in an AMD-usage scenario (#15118)\n\t\tfireGlobals = jQuery.event && s.global;\n\n\t\t// Watch for a new set of requests\n\t\tif ( fireGlobals && jQuery.active++ === 0 ) {\n\t\t\tjQuery.event.trigger( \"ajaxStart\" );\n\t\t}\n\n\t\t// Uppercase the type\n\t\ts.type = s.type.toUpperCase();\n\n\t\t// Determine if request has content\n\t\ts.hasContent = !rnoContent.test( s.type );\n\n\t\t// Save the URL in case we're toying with the If-Modified-Since\n\t\t// and/or If-None-Match header later on\n\t\tcacheURL = s.url;\n\n\t\t// More options handling for requests with no content\n\t\tif ( !s.hasContent ) {\n\n\t\t\t// If data is available, append data to url\n\t\t\tif ( s.data ) {\n\t\t\t\tcacheURL = ( s.url += ( rquery.test( cacheURL ) ? \"&\" : \"?\" ) + s.data );\n\n\t\t\t\t// #9682: remove data so that it's not used in an eventual retry\n\t\t\t\tdelete s.data;\n\t\t\t}\n\n\t\t\t// Add anti-cache in url if needed\n\t\t\tif ( s.cache === false ) {\n\t\t\t\ts.url = rts.test( cacheURL ) ?\n\n\t\t\t\t\t// If there is already a '_' parameter, set its value\n\t\t\t\t\tcacheURL.replace( rts, \"$1_=\" + nonce++ ) :\n\n\t\t\t\t\t// Otherwise add one to the end\n\t\t\t\t\tcacheURL + ( rquery.test( cacheURL ) ? \"&\" : \"?\" ) + \"_=\" + nonce++;\n\t\t\t}\n\t\t}\n\n\t\t// Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.\n\t\tif ( s.ifModified ) {\n\t\t\tif ( jQuery.lastModified[ cacheURL ] ) {\n\t\t\t\tjqXHR.setRequestHeader( \"If-Modified-Since\", jQuery.lastModified[ cacheURL ] );\n\t\t\t}\n\t\t\tif ( jQuery.etag[ cacheURL ] ) {\n\t\t\t\tjqXHR.setRequestHeader( \"If-None-Match\", jQuery.etag[ cacheURL ] );\n\t\t\t}\n\t\t}\n\n\t\t// Set the correct header, if data is being sent\n\t\tif ( s.data && s.hasContent && s.contentType !== false || options.contentType ) {\n\t\t\tjqXHR.setRequestHeader( \"Content-Type\", s.contentType );\n\t\t}\n\n\t\t// Set the Accepts header for the server, depending on the dataType\n\t\tjqXHR.setRequestHeader(\n\t\t\t\"Accept\",\n\t\t\ts.dataTypes[ 0 ] && s.accepts[ s.dataTypes[ 0 ] ] ?\n\t\t\t\ts.accepts[ s.dataTypes[ 0 ] ] +\n\t\t\t\t\t( s.dataTypes[ 0 ] !== \"*\" ? \", \" + allTypes + \"; q=0.01\" : \"\" ) :\n\t\t\t\ts.accepts[ \"*\" ]\n\t\t);\n\n\t\t// Check for headers option\n\t\tfor ( i in s.headers ) {\n\t\t\tjqXHR.setRequestHeader( i, s.headers[ i ] );\n\t\t}\n\n\t\t// Allow custom headers/mimetypes and early abort\n\t\tif ( s.beforeSend &&\n\t\t\t( s.beforeSend.call( callbackContext, jqXHR, s ) === false || state === 2 ) ) {\n\n\t\t\t// Abort if not done already and return\n\t\t\treturn jqXHR.abort();\n\t\t}\n\n\t\t// aborting is no longer a cancellation\n\t\tstrAbort = \"abort\";\n\n\t\t// Install callbacks on deferreds\n\t\tfor ( i in { success: 1, error: 1, complete: 1 } ) {\n\t\t\tjqXHR[ i ]( s[ i ] );\n\t\t}\n\n\t\t// Get transport\n\t\ttransport = inspectPrefiltersOrTransports( transports, s, options, jqXHR );\n\n\t\t// If no transport, we auto-abort\n\t\tif ( !transport ) {\n\t\t\tdone( -1, \"No Transport\" );\n\t\t} else {\n\t\t\tjqXHR.readyState = 1;\n\n\t\t\t// Send global event\n\t\t\tif ( fireGlobals ) {\n\t\t\t\tglobalEventContext.trigger( \"ajaxSend\", [ jqXHR, s ] );\n\t\t\t}\n\n\t\t\t// If request was aborted inside ajaxSend, stop there\n\t\t\tif ( state === 2 ) {\n\t\t\t\treturn jqXHR;\n\t\t\t}\n\n\t\t\t// Timeout\n\t\t\tif ( s.async && s.timeout > 0 ) {\n\t\t\t\ttimeoutTimer = window.setTimeout( function() {\n\t\t\t\t\tjqXHR.abort( \"timeout\" );\n\t\t\t\t}, s.timeout );\n\t\t\t}\n\n\t\t\ttry {\n\t\t\t\tstate = 1;\n\t\t\t\ttransport.send( requestHeaders, done );\n\t\t\t} catch ( e ) {\n\n\t\t\t\t// Propagate exception as error if not done\n\t\t\t\tif ( state < 2 ) {\n\t\t\t\t\tdone( -1, e );\n\n\t\t\t\t// Simply rethrow otherwise\n\t\t\t\t} else {\n\t\t\t\t\tthrow e;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Callback for when everything is done\n\t\tfunction done( status, nativeStatusText, responses, headers ) {\n\t\t\tvar isSuccess, success, error, response, modified,\n\t\t\t\tstatusText = nativeStatusText;\n\n\t\t\t// Called once\n\t\t\tif ( state === 2 ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// State is \"done\" now\n\t\t\tstate = 2;\n\n\t\t\t// Clear timeout if it exists\n\t\t\tif ( timeoutTimer ) {\n\t\t\t\twindow.clearTimeout( timeoutTimer );\n\t\t\t}\n\n\t\t\t// Dereference transport for early garbage collection\n\t\t\t// (no matter how long the jqXHR object will be used)\n\t\t\ttransport = undefined;\n\n\t\t\t// Cache response headers\n\t\t\tresponseHeadersString = headers || \"\";\n\n\t\t\t// Set readyState\n\t\t\tjqXHR.readyState = status > 0 ? 4 : 0;\n\n\t\t\t// Determine if successful\n\t\t\tisSuccess = status >= 200 && status < 300 || status === 304;\n\n\t\t\t// Get response data\n\t\t\tif ( responses ) {\n\t\t\t\tresponse = ajaxHandleResponses( s, jqXHR, responses );\n\t\t\t}\n\n\t\t\t// Convert no matter what (that way responseXXX fields are always set)\n\t\t\tresponse = ajaxConvert( s, response, jqXHR, isSuccess );\n\n\t\t\t// If successful, handle type chaining\n\t\t\tif ( isSuccess ) {\n\n\t\t\t\t// Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.\n\t\t\t\tif ( s.ifModified ) {\n\t\t\t\t\tmodified = jqXHR.getResponseHeader( \"Last-Modified\" );\n\t\t\t\t\tif ( modified ) {\n\t\t\t\t\t\tjQuery.lastModified[ cacheURL ] = modified;\n\t\t\t\t\t}\n\t\t\t\t\tmodified = jqXHR.getResponseHeader( \"etag\" );\n\t\t\t\t\tif ( modified ) {\n\t\t\t\t\t\tjQuery.etag[ cacheURL ] = modified;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// if no content\n\t\t\t\tif ( status === 204 || s.type === \"HEAD\" ) {\n\t\t\t\t\tstatusText = \"nocontent\";\n\n\t\t\t\t// if not modified\n\t\t\t\t} else if ( status === 304 ) {\n\t\t\t\t\tstatusText = \"notmodified\";\n\n\t\t\t\t// If we have data, let's convert it\n\t\t\t\t} else {\n\t\t\t\t\tstatusText = response.state;\n\t\t\t\t\tsuccess = response.data;\n\t\t\t\t\terror = response.error;\n\t\t\t\t\tisSuccess = !error;\n\t\t\t\t}\n\t\t\t} else {\n\n\t\t\t\t// We extract error from statusText\n\t\t\t\t// then normalize statusText and status for non-aborts\n\t\t\t\terror = statusText;\n\t\t\t\tif ( status || !statusText ) {\n\t\t\t\t\tstatusText = \"error\";\n\t\t\t\t\tif ( status < 0 ) {\n\t\t\t\t\t\tstatus = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Set data for the fake xhr object\n\t\t\tjqXHR.status = status;\n\t\t\tjqXHR.statusText = ( nativeStatusText || statusText ) + \"\";\n\n\t\t\t// Success/Error\n\t\t\tif ( isSuccess ) {\n\t\t\t\tdeferred.resolveWith( callbackContext, [ success, statusText, jqXHR ] );\n\t\t\t} else {\n\t\t\t\tdeferred.rejectWith( callbackContext, [ jqXHR, statusText, error ] );\n\t\t\t}\n\n\t\t\t// Status-dependent callbacks\n\t\t\tjqXHR.statusCode( statusCode );\n\t\t\tstatusCode = undefined;\n\n\t\t\tif ( fireGlobals ) {\n\t\t\t\tglobalEventContext.trigger( isSuccess ? \"ajaxSuccess\" : \"ajaxError\",\n\t\t\t\t\t[ jqXHR, s, isSuccess ? success : error ] );\n\t\t\t}\n\n\t\t\t// Complete\n\t\t\tcompleteDeferred.fireWith( callbackContext, [ jqXHR, statusText ] );\n\n\t\t\tif ( fireGlobals ) {\n\t\t\t\tglobalEventContext.trigger( \"ajaxComplete\", [ jqXHR, s ] );\n\n\t\t\t\t// Handle the global AJAX counter\n\t\t\t\tif ( !( --jQuery.active ) ) {\n\t\t\t\t\tjQuery.event.trigger( \"ajaxStop\" );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn jqXHR;\n\t},\n\n\tgetJSON: function( url, data, callback ) {\n\t\treturn jQuery.get( url, data, callback, \"json\" );\n\t},\n\n\tgetScript: function( url, callback ) {\n\t\treturn jQuery.get( url, undefined, callback, \"script\" );\n\t}\n} );\n\njQuery.each( [ \"get\", \"post\" ], function( i, method ) {\n\tjQuery[ method ] = function( url, data, callback, type ) {\n\n\t\t// shift arguments if data argument was omitted\n\t\tif ( jQuery.isFunction( data ) ) {\n\t\t\ttype = type || callback;\n\t\t\tcallback = data;\n\t\t\tdata = undefined;\n\t\t}\n\n\t\t// The url can be an options object (which then must have .url)\n\t\treturn jQuery.ajax( jQuery.extend( {\n\t\t\turl: url,\n\t\t\ttype: method,\n\t\t\tdataType: type,\n\t\t\tdata: data,\n\t\t\tsuccess: callback\n\t\t}, jQuery.isPlainObject( url ) && url ) );\n\t};\n} );\n\n\njQuery._evalUrl = function( url ) {\n\treturn jQuery.ajax( {\n\t\turl: url,\n\n\t\t// Make this explicit, since user can override this through ajaxSetup (#11264)\n\t\ttype: \"GET\",\n\t\tdataType: \"script\",\n\t\tcache: true,\n\t\tasync: false,\n\t\tglobal: false,\n\t\t\"throws\": true\n\t} );\n};\n\n\njQuery.fn.extend( {\n\twrapAll: function( html ) {\n\t\tif ( jQuery.isFunction( html ) ) {\n\t\t\treturn this.each( function( i ) {\n\t\t\t\tjQuery( this ).wrapAll( html.call( this, i ) );\n\t\t\t} );\n\t\t}\n\n\t\tif ( this[ 0 ] ) {\n\n\t\t\t// The elements to wrap the target around\n\t\t\tvar wrap = jQuery( html, this[ 0 ].ownerDocument ).eq( 0 ).clone( true );\n\n\t\t\tif ( this[ 0 ].parentNode ) {\n\t\t\t\twrap.insertBefore( this[ 0 ] );\n\t\t\t}\n\n\t\t\twrap.map( function() {\n\t\t\t\tvar elem = this;\n\n\t\t\t\twhile ( elem.firstChild && elem.firstChild.nodeType === 1 ) {\n\t\t\t\t\telem = elem.firstChild;\n\t\t\t\t}\n\n\t\t\t\treturn elem;\n\t\t\t} ).append( this );\n\t\t}\n\n\t\treturn this;\n\t},\n\n\twrapInner: function( html ) {\n\t\tif ( jQuery.isFunction( html ) ) {\n\t\t\treturn this.each( function( i ) {\n\t\t\t\tjQuery( this ).wrapInner( html.call( this, i ) );\n\t\t\t} );\n\t\t}\n\n\t\treturn this.each( function() {\n\t\t\tvar self = jQuery( this ),\n\t\t\t\tcontents = self.contents();\n\n\t\t\tif ( contents.length ) {\n\t\t\t\tcontents.wrapAll( html );\n\n\t\t\t} else {\n\t\t\t\tself.append( html );\n\t\t\t}\n\t\t} );\n\t},\n\n\twrap: function( html ) {\n\t\tvar isFunction = jQuery.isFunction( html );\n\n\t\treturn this.each( function( i ) {\n\t\t\tjQuery( this ).wrapAll( isFunction ? html.call( this, i ) : html );\n\t\t} );\n\t},\n\n\tunwrap: function() {\n\t\treturn this.parent().each( function() {\n\t\t\tif ( !jQuery.nodeName( this, \"body\" ) ) {\n\t\t\t\tjQuery( this ).replaceWith( this.childNodes );\n\t\t\t}\n\t\t} ).end();\n\t}\n} );\n\n\nfunction getDisplay( elem ) {\n\treturn elem.style && elem.style.display || jQuery.css( elem, \"display\" );\n}\n\nfunction filterHidden( elem ) {\n\n\t// Disconnected elements are considered hidden\n\tif ( !jQuery.contains( elem.ownerDocument || document, elem ) ) {\n\t\treturn true;\n\t}\n\twhile ( elem && elem.nodeType === 1 ) {\n\t\tif ( getDisplay( elem ) === \"none\" || elem.type === \"hidden\" ) {\n\t\t\treturn true;\n\t\t}\n\t\telem = elem.parentNode;\n\t}\n\treturn false;\n}\n\njQuery.expr.filters.hidden = function( elem ) {\n\n\t// Support: Opera <= 12.12\n\t// Opera reports offsetWidths and offsetHeights less than zero on some elements\n\treturn support.reliableHiddenOffsets() ?\n\t\t( elem.offsetWidth <= 0 && elem.offsetHeight <= 0 &&\n\t\t\t!elem.getClientRects().length ) :\n\t\t\tfilterHidden( elem );\n};\n\njQuery.expr.filters.visible = function( elem ) {\n\treturn !jQuery.expr.filters.hidden( elem );\n};\n\n\n\n\nvar r20 = /%20/g,\n\trbracket = /\\[\\]$/,\n\trCRLF = /\\r?\\n/g,\n\trsubmitterTypes = /^(?:submit|button|image|reset|file)$/i,\n\trsubmittable = /^(?:input|select|textarea|keygen)/i;\n\nfunction buildParams( prefix, obj, traditional, add ) {\n\tvar name;\n\n\tif ( jQuery.isArray( obj ) ) {\n\n\t\t// Serialize array item.\n\t\tjQuery.each( obj, function( i, v ) {\n\t\t\tif ( traditional || rbracket.test( prefix ) ) {\n\n\t\t\t\t// Treat each array item as a scalar.\n\t\t\t\tadd( prefix, v );\n\n\t\t\t} else {\n\n\t\t\t\t// Item is non-scalar (array or object), encode its numeric index.\n\t\t\t\tbuildParams(\n\t\t\t\t\tprefix + \"[\" + ( typeof v === \"object\" && v != null ? i : \"\" ) + \"]\",\n\t\t\t\t\tv,\n\t\t\t\t\ttraditional,\n\t\t\t\t\tadd\n\t\t\t\t);\n\t\t\t}\n\t\t} );\n\n\t} else if ( !traditional && jQuery.type( obj ) === \"object\" ) {\n\n\t\t// Serialize object item.\n\t\tfor ( name in obj ) {\n\t\t\tbuildParams( prefix + \"[\" + name + \"]\", obj[ name ], traditional, add );\n\t\t}\n\n\t} else {\n\n\t\t// Serialize scalar item.\n\t\tadd( prefix, obj );\n\t}\n}\n\n// Serialize an array of form elements or a set of\n// key/values into a query string\njQuery.param = function( a, traditional ) {\n\tvar prefix,\n\t\ts = [],\n\t\tadd = function( key, value ) {\n\n\t\t\t// If value is a function, invoke it and return its value\n\t\t\tvalue = jQuery.isFunction( value ) ? value() : ( value == null ? \"\" : value );\n\t\t\ts[ s.length ] = encodeURIComponent( key ) + \"=\" + encodeURIComponent( value );\n\t\t};\n\n\t// Set traditional to true for jQuery <= 1.3.2 behavior.\n\tif ( traditional === undefined ) {\n\t\ttraditional = jQuery.ajaxSettings && jQuery.ajaxSettings.traditional;\n\t}\n\n\t// If an array was passed in, assume that it is an array of form elements.\n\tif ( jQuery.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) {\n\n\t\t// Serialize the form elements\n\t\tjQuery.each( a, function() {\n\t\t\tadd( this.name, this.value );\n\t\t} );\n\n\t} else {\n\n\t\t// If traditional, encode the \"old\" way (the way 1.3.2 or older\n\t\t// did it), otherwise encode params recursively.\n\t\tfor ( prefix in a ) {\n\t\t\tbuildParams( prefix, a[ prefix ], traditional, add );\n\t\t}\n\t}\n\n\t// Return the resulting serialization\n\treturn s.join( \"&\" ).replace( r20, \"+\" );\n};\n\njQuery.fn.extend( {\n\tserialize: function() {\n\t\treturn jQuery.param( this.serializeArray() );\n\t},\n\tserializeArray: function() {\n\t\treturn this.map( function() {\n\n\t\t\t// Can add propHook for \"elements\" to filter or add form elements\n\t\t\tvar elements = jQuery.prop( this, \"elements\" );\n\t\t\treturn elements ? jQuery.makeArray( elements ) : this;\n\t\t} )\n\t\t.filter( function() {\n\t\t\tvar type = this.type;\n\n\t\t\t// Use .is(\":disabled\") so that fieldset[disabled] works\n\t\t\treturn this.name && !jQuery( this ).is( \":disabled\" ) &&\n\t\t\t\trsubmittable.test( this.nodeName ) && !rsubmitterTypes.test( type ) &&\n\t\t\t\t( this.checked || !rcheckableType.test( type ) );\n\t\t} )\n\t\t.map( function( i, elem ) {\n\t\t\tvar val = jQuery( this ).val();\n\n\t\t\treturn val == null ?\n\t\t\t\tnull :\n\t\t\t\tjQuery.isArray( val ) ?\n\t\t\t\t\tjQuery.map( val, function( val ) {\n\t\t\t\t\t\treturn { name: elem.name, value: val.replace( rCRLF, \"\\r\\n\" ) };\n\t\t\t\t\t} ) :\n\t\t\t\t\t{ name: elem.name, value: val.replace( rCRLF, \"\\r\\n\" ) };\n\t\t} ).get();\n\t}\n} );\n\n\n// Create the request object\n// (This is still attached to ajaxSettings for backward compatibility)\njQuery.ajaxSettings.xhr = window.ActiveXObject !== undefined ?\n\n\t// Support: IE6-IE8\n\tfunction() {\n\n\t\t// XHR cannot access local files, always use ActiveX for that case\n\t\tif ( this.isLocal ) {\n\t\t\treturn createActiveXHR();\n\t\t}\n\n\t\t// Support: IE 9-11\n\t\t// IE seems to error on cross-domain PATCH requests when ActiveX XHR\n\t\t// is used. In IE 9+ always use the native XHR.\n\t\t// Note: this condition won't catch Edge as it doesn't define\n\t\t// document.documentMode but it also doesn't support ActiveX so it won't\n\t\t// reach this code.\n\t\tif ( document.documentMode > 8 ) {\n\t\t\treturn createStandardXHR();\n\t\t}\n\n\t\t// Support: IE<9\n\t\t// oldIE XHR does not support non-RFC2616 methods (#13240)\n\t\t// See http://msdn.microsoft.com/en-us/library/ie/ms536648(v=vs.85).aspx\n\t\t// and http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html#sec9\n\t\t// Although this check for six methods instead of eight\n\t\t// since IE also does not support \"trace\" and \"connect\"\n\t\treturn /^(get|post|head|put|delete|options)$/i.test( this.type ) &&\n\t\t\tcreateStandardXHR() || createActiveXHR();\n\t} :\n\n\t// For all other browsers, use the standard XMLHttpRequest object\n\tcreateStandardXHR;\n\nvar xhrId = 0,\n\txhrCallbacks = {},\n\txhrSupported = jQuery.ajaxSettings.xhr();\n\n// Support: IE<10\n// Open requests must be manually aborted on unload (#5280)\n// See https://support.microsoft.com/kb/2856746 for more info\nif ( window.attachEvent ) {\n\twindow.attachEvent( \"onunload\", function() {\n\t\tfor ( var key in xhrCallbacks ) {\n\t\t\txhrCallbacks[ key ]( undefined, true );\n\t\t}\n\t} );\n}\n\n// Determine support properties\nsupport.cors = !!xhrSupported && ( \"withCredentials\" in xhrSupported );\nxhrSupported = support.ajax = !!xhrSupported;\n\n// Create transport if the browser can provide an xhr\nif ( xhrSupported ) {\n\n\tjQuery.ajaxTransport( function( options ) {\n\n\t\t// Cross domain only allowed if supported through XMLHttpRequest\n\t\tif ( !options.crossDomain || support.cors ) {\n\n\t\t\tvar callback;\n\n\t\t\treturn {\n\t\t\t\tsend: function( headers, complete ) {\n\t\t\t\t\tvar i,\n\t\t\t\t\t\txhr = options.xhr(),\n\t\t\t\t\t\tid = ++xhrId;\n\n\t\t\t\t\t// Open the socket\n\t\t\t\t\txhr.open(\n\t\t\t\t\t\toptions.type,\n\t\t\t\t\t\toptions.url,\n\t\t\t\t\t\toptions.async,\n\t\t\t\t\t\toptions.username,\n\t\t\t\t\t\toptions.password\n\t\t\t\t\t);\n\n\t\t\t\t\t// Apply custom fields if provided\n\t\t\t\t\tif ( options.xhrFields ) {\n\t\t\t\t\t\tfor ( i in options.xhrFields ) {\n\t\t\t\t\t\t\txhr[ i ] = options.xhrFields[ i ];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Override mime type if needed\n\t\t\t\t\tif ( options.mimeType && xhr.overrideMimeType ) {\n\t\t\t\t\t\txhr.overrideMimeType( options.mimeType );\n\t\t\t\t\t}\n\n\t\t\t\t\t// X-Requested-With header\n\t\t\t\t\t// For cross-domain requests, seeing as conditions for a preflight are\n\t\t\t\t\t// akin to a jigsaw puzzle, we simply never set it to be sure.\n\t\t\t\t\t// (it can always be set on a per-request basis or even using ajaxSetup)\n\t\t\t\t\t// For same-domain requests, won't change header if already provided.\n\t\t\t\t\tif ( !options.crossDomain && !headers[ \"X-Requested-With\" ] ) {\n\t\t\t\t\t\theaders[ \"X-Requested-With\" ] = \"XMLHttpRequest\";\n\t\t\t\t\t}\n\n\t\t\t\t\t// Set headers\n\t\t\t\t\tfor ( i in headers ) {\n\n\t\t\t\t\t\t// Support: IE<9\n\t\t\t\t\t\t// IE's ActiveXObject throws a 'Type Mismatch' exception when setting\n\t\t\t\t\t\t// request header to a null-value.\n\t\t\t\t\t\t//\n\t\t\t\t\t\t// To keep consistent with other XHR implementations, cast the value\n\t\t\t\t\t\t// to string and ignore `undefined`.\n\t\t\t\t\t\tif ( headers[ i ] !== undefined ) {\n\t\t\t\t\t\t\txhr.setRequestHeader( i, headers[ i ] + \"\" );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Do send the request\n\t\t\t\t\t// This may raise an exception which is actually\n\t\t\t\t\t// handled in jQuery.ajax (so no try/catch here)\n\t\t\t\t\txhr.send( ( options.hasContent && options.data ) || null );\n\n\t\t\t\t\t// Listener\n\t\t\t\t\tcallback = function( _, isAbort ) {\n\t\t\t\t\t\tvar status, statusText, responses;\n\n\t\t\t\t\t\t// Was never called and is aborted or complete\n\t\t\t\t\t\tif ( callback && ( isAbort || xhr.readyState === 4 ) ) {\n\n\t\t\t\t\t\t\t// Clean up\n\t\t\t\t\t\t\tdelete xhrCallbacks[ id ];\n\t\t\t\t\t\t\tcallback = undefined;\n\t\t\t\t\t\t\txhr.onreadystatechange = jQuery.noop;\n\n\t\t\t\t\t\t\t// Abort manually if needed\n\t\t\t\t\t\t\tif ( isAbort ) {\n\t\t\t\t\t\t\t\tif ( xhr.readyState !== 4 ) {\n\t\t\t\t\t\t\t\t\txhr.abort();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tresponses = {};\n\t\t\t\t\t\t\t\tstatus = xhr.status;\n\n\t\t\t\t\t\t\t\t// Support: IE<10\n\t\t\t\t\t\t\t\t// Accessing binary-data responseText throws an exception\n\t\t\t\t\t\t\t\t// (#11426)\n\t\t\t\t\t\t\t\tif ( typeof xhr.responseText === \"string\" ) {\n\t\t\t\t\t\t\t\t\tresponses.text = xhr.responseText;\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t// Firefox throws an exception when accessing\n\t\t\t\t\t\t\t\t// statusText for faulty cross-domain requests\n\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\tstatusText = xhr.statusText;\n\t\t\t\t\t\t\t\t} catch ( e ) {\n\n\t\t\t\t\t\t\t\t\t// We normalize with Webkit giving an empty statusText\n\t\t\t\t\t\t\t\t\tstatusText = \"\";\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t// Filter status for non standard behaviors\n\n\t\t\t\t\t\t\t\t// If the request is local and we have data: assume a success\n\t\t\t\t\t\t\t\t// (success with no data won't get notified, that's the best we\n\t\t\t\t\t\t\t\t// can do given current implementations)\n\t\t\t\t\t\t\t\tif ( !status && options.isLocal && !options.crossDomain ) {\n\t\t\t\t\t\t\t\t\tstatus = responses.text ? 200 : 404;\n\n\t\t\t\t\t\t\t\t// IE - #1450: sometimes returns 1223 when it should be 204\n\t\t\t\t\t\t\t\t} else if ( status === 1223 ) {\n\t\t\t\t\t\t\t\t\tstatus = 204;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Call complete if needed\n\t\t\t\t\t\tif ( responses ) {\n\t\t\t\t\t\t\tcomplete( status, statusText, responses, xhr.getAllResponseHeaders() );\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\n\t\t\t\t\t// Do send the request\n\t\t\t\t\t// `xhr.send` may raise an exception, but it will be\n\t\t\t\t\t// handled in jQuery.ajax (so no try/catch here)\n\t\t\t\t\tif ( !options.async ) {\n\n\t\t\t\t\t\t// If we're in sync mode we fire the callback\n\t\t\t\t\t\tcallback();\n\t\t\t\t\t} else if ( xhr.readyState === 4 ) {\n\n\t\t\t\t\t\t// (IE6 & IE7) if it's in cache and has been\n\t\t\t\t\t\t// retrieved directly we need to fire the callback\n\t\t\t\t\t\twindow.setTimeout( callback );\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\t// Register the callback, but delay it in case `xhr.send` throws\n\t\t\t\t\t\t// Add to the list of active xhr callbacks\n\t\t\t\t\t\txhr.onreadystatechange = xhrCallbacks[ id ] = callback;\n\t\t\t\t\t}\n\t\t\t\t},\n\n\t\t\t\tabort: function() {\n\t\t\t\t\tif ( callback ) {\n\t\t\t\t\t\tcallback( undefined, true );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t};\n\t\t}\n\t} );\n}\n\n// Functions to create xhrs\nfunction createStandardXHR() {\n\ttry {\n\t\treturn new window.XMLHttpRequest();\n\t} catch ( e ) {}\n}\n\nfunction createActiveXHR() {\n\ttry {\n\t\treturn new window.ActiveXObject( \"Microsoft.XMLHTTP\" );\n\t} catch ( e ) {}\n}\n\n\n\n\n// Install script dataType\njQuery.ajaxSetup( {\n\taccepts: {\n\t\tscript: \"text/javascript, application/javascript, \" +\n\t\t\t\"application/ecmascript, application/x-ecmascript\"\n\t},\n\tcontents: {\n\t\tscript: /\\b(?:java|ecma)script\\b/\n\t},\n\tconverters: {\n\t\t\"text script\": function( text ) {\n\t\t\tjQuery.globalEval( text );\n\t\t\treturn text;\n\t\t}\n\t}\n} );\n\n// Handle cache's special case and global\njQuery.ajaxPrefilter( \"script\", function( s ) {\n\tif ( s.cache === undefined ) {\n\t\ts.cache = false;\n\t}\n\tif ( s.crossDomain ) {\n\t\ts.type = \"GET\";\n\t\ts.global = false;\n\t}\n} );\n\n// Bind script tag hack transport\njQuery.ajaxTransport( \"script\", function( s ) {\n\n\t// This transport only deals with cross domain requests\n\tif ( s.crossDomain ) {\n\n\t\tvar script,\n\t\t\thead = document.head || jQuery( \"head\" )[ 0 ] || document.documentElement;\n\n\t\treturn {\n\n\t\t\tsend: function( _, callback ) {\n\n\t\t\t\tscript = document.createElement( \"script\" );\n\n\t\t\t\tscript.async = true;\n\n\t\t\t\tif ( s.scriptCharset ) {\n\t\t\t\t\tscript.charset = s.scriptCharset;\n\t\t\t\t}\n\n\t\t\t\tscript.src = s.url;\n\n\t\t\t\t// Attach handlers for all browsers\n\t\t\t\tscript.onload = script.onreadystatechange = function( _, isAbort ) {\n\n\t\t\t\t\tif ( isAbort || !script.readyState || /loaded|complete/.test( script.readyState ) ) {\n\n\t\t\t\t\t\t// Handle memory leak in IE\n\t\t\t\t\t\tscript.onload = script.onreadystatechange = null;\n\n\t\t\t\t\t\t// Remove the script\n\t\t\t\t\t\tif ( script.parentNode ) {\n\t\t\t\t\t\t\tscript.parentNode.removeChild( script );\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Dereference the script\n\t\t\t\t\t\tscript = null;\n\n\t\t\t\t\t\t// Callback if not abort\n\t\t\t\t\t\tif ( !isAbort ) {\n\t\t\t\t\t\t\tcallback( 200, \"success\" );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t};\n\n\t\t\t\t// Circumvent IE6 bugs with base elements (#2709 and #4378) by prepending\n\t\t\t\t// Use native DOM manipulation to avoid our domManip AJAX trickery\n\t\t\t\thead.insertBefore( script, head.firstChild );\n\t\t\t},\n\n\t\t\tabort: function() {\n\t\t\t\tif ( script ) {\n\t\t\t\t\tscript.onload( undefined, true );\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t}\n} );\n\n\n\n\nvar oldCallbacks = [],\n\trjsonp = /(=)\\?(?=&|$)|\\?\\?/;\n\n// Default jsonp settings\njQuery.ajaxSetup( {\n\tjsonp: \"callback\",\n\tjsonpCallback: function() {\n\t\tvar callback = oldCallbacks.pop() || ( jQuery.expando + \"_\" + ( nonce++ ) );\n\t\tthis[ callback ] = true;\n\t\treturn callback;\n\t}\n} );\n\n// Detect, normalize options and install callbacks for jsonp requests\njQuery.ajaxPrefilter( \"json jsonp\", function( s, originalSettings, jqXHR ) {\n\n\tvar callbackName, overwritten, responseContainer,\n\t\tjsonProp = s.jsonp !== false && ( rjsonp.test( s.url ) ?\n\t\t\t\"url\" :\n\t\t\ttypeof s.data === \"string\" &&\n\t\t\t\t( s.contentType || \"\" )\n\t\t\t\t\t.indexOf( \"application/x-www-form-urlencoded\" ) === 0 &&\n\t\t\t\trjsonp.test( s.data ) && \"data\"\n\t\t);\n\n\t// Handle iff the expected data type is \"jsonp\" or we have a parameter to set\n\tif ( jsonProp || s.dataTypes[ 0 ] === \"jsonp\" ) {\n\n\t\t// Get callback name, remembering preexisting value associated with it\n\t\tcallbackName = s.jsonpCallback = jQuery.isFunction( s.jsonpCallback ) ?\n\t\t\ts.jsonpCallback() :\n\t\t\ts.jsonpCallback;\n\n\t\t// Insert callback into url or form data\n\t\tif ( jsonProp ) {\n\t\t\ts[ jsonProp ] = s[ jsonProp ].replace( rjsonp, \"$1\" + callbackName );\n\t\t} else if ( s.jsonp !== false ) {\n\t\t\ts.url += ( rquery.test( s.url ) ? \"&\" : \"?\" ) + s.jsonp + \"=\" + callbackName;\n\t\t}\n\n\t\t// Use data converter to retrieve json after script execution\n\t\ts.converters[ \"script json\" ] = function() {\n\t\t\tif ( !responseContainer ) {\n\t\t\t\tjQuery.error( callbackName + \" was not called\" );\n\t\t\t}\n\t\t\treturn responseContainer[ 0 ];\n\t\t};\n\n\t\t// force json dataType\n\t\ts.dataTypes[ 0 ] = \"json\";\n\n\t\t// Install callback\n\t\toverwritten = window[ callbackName ];\n\t\twindow[ callbackName ] = function() {\n\t\t\tresponseContainer = arguments;\n\t\t};\n\n\t\t// Clean-up function (fires after converters)\n\t\tjqXHR.always( function() {\n\n\t\t\t// If previous value didn't exist - remove it\n\t\t\tif ( overwritten === undefined ) {\n\t\t\t\tjQuery( window ).removeProp( callbackName );\n\n\t\t\t// Otherwise restore preexisting value\n\t\t\t} else {\n\t\t\t\twindow[ callbackName ] = overwritten;\n\t\t\t}\n\n\t\t\t// Save back as free\n\t\t\tif ( s[ callbackName ] ) {\n\n\t\t\t\t// make sure that re-using the options doesn't screw things around\n\t\t\t\ts.jsonpCallback = originalSettings.jsonpCallback;\n\n\t\t\t\t// save the callback name for future use\n\t\t\t\toldCallbacks.push( callbackName );\n\t\t\t}\n\n\t\t\t// Call if it was a function and we have a response\n\t\t\tif ( responseContainer && jQuery.isFunction( overwritten ) ) {\n\t\t\t\toverwritten( responseContainer[ 0 ] );\n\t\t\t}\n\n\t\t\tresponseContainer = overwritten = undefined;\n\t\t} );\n\n\t\t// Delegate to script\n\t\treturn \"script\";\n\t}\n} );\n\n\n\n\n// data: string of html\n// context (optional): If specified, the fragment will be created in this context,\n// defaults to document\n// keepScripts (optional): If true, will include scripts passed in the html string\njQuery.parseHTML = function( data, context, keepScripts ) {\n\tif ( !data || typeof data !== \"string\" ) {\n\t\treturn null;\n\t}\n\tif ( typeof context === \"boolean\" ) {\n\t\tkeepScripts = context;\n\t\tcontext = false;\n\t}\n\tcontext = context || document;\n\n\tvar parsed = rsingleTag.exec( data ),\n\t\tscripts = !keepScripts && [];\n\n\t// Single tag\n\tif ( parsed ) {\n\t\treturn [ context.createElement( parsed[ 1 ] ) ];\n\t}\n\n\tparsed = buildFragment( [ data ], context, scripts );\n\n\tif ( scripts && scripts.length ) {\n\t\tjQuery( scripts ).remove();\n\t}\n\n\treturn jQuery.merge( [], parsed.childNodes );\n};\n\n\n// Keep a copy of the old load method\nvar _load = jQuery.fn.load;\n\n/**\n * Load a url into a page\n */\njQuery.fn.load = function( url, params, callback ) {\n\tif ( typeof url !== \"string\" && _load ) {\n\t\treturn _load.apply( this, arguments );\n\t}\n\n\tvar selector, type, response,\n\t\tself = this,\n\t\toff = url.indexOf( \" \" );\n\n\tif ( off > -1 ) {\n\t\tselector = jQuery.trim( url.slice( off, url.length ) );\n\t\turl = url.slice( 0, off );\n\t}\n\n\t// If it's a function\n\tif ( jQuery.isFunction( params ) ) {\n\n\t\t// We assume that it's the callback\n\t\tcallback = params;\n\t\tparams = undefined;\n\n\t// Otherwise, build a param string\n\t} else if ( params && typeof params === \"object\" ) {\n\t\ttype = \"POST\";\n\t}\n\n\t// If we have elements to modify, make the request\n\tif ( self.length > 0 ) {\n\t\tjQuery.ajax( {\n\t\t\turl: url,\n\n\t\t\t// If \"type\" variable is undefined, then \"GET\" method will be used.\n\t\t\t// Make value of this field explicit since\n\t\t\t// user can override it through ajaxSetup method\n\t\t\ttype: type || \"GET\",\n\t\t\tdataType: \"html\",\n\t\t\tdata: params\n\t\t} ).done( function( responseText ) {\n\n\t\t\t// Save response for use in complete callback\n\t\t\tresponse = arguments;\n\n\t\t\tself.html( selector ?\n\n\t\t\t\t// If a selector was specified, locate the right elements in a dummy div\n\t\t\t\t// Exclude scripts to avoid IE 'Permission Denied' errors\n\t\t\t\tjQuery( \"<div>\" ).append( jQuery.parseHTML( responseText ) ).find( selector ) :\n\n\t\t\t\t// Otherwise use the full result\n\t\t\t\tresponseText );\n\n\t\t// If the request succeeds, this function gets \"data\", \"status\", \"jqXHR\"\n\t\t// but they are ignored because response was set above.\n\t\t// If it fails, this function gets \"jqXHR\", \"status\", \"error\"\n\t\t} ).always( callback && function( jqXHR, status ) {\n\t\t\tself.each( function() {\n\t\t\t\tcallback.apply( this, response || [ jqXHR.responseText, status, jqXHR ] );\n\t\t\t} );\n\t\t} );\n\t}\n\n\treturn this;\n};\n\n\n\n\n// Attach a bunch of functions for handling common AJAX events\njQuery.each( [\n\t\"ajaxStart\",\n\t\"ajaxStop\",\n\t\"ajaxComplete\",\n\t\"ajaxError\",\n\t\"ajaxSuccess\",\n\t\"ajaxSend\"\n], function( i, type ) {\n\tjQuery.fn[ type ] = function( fn ) {\n\t\treturn this.on( type, fn );\n\t};\n} );\n\n\n\n\njQuery.expr.filters.animated = function( elem ) {\n\treturn jQuery.grep( jQuery.timers, function( fn ) {\n\t\treturn elem === fn.elem;\n\t} ).length;\n};\n\n\n\n\n\n/**\n * Gets a window from an element\n */\nfunction getWindow( elem ) {\n\treturn jQuery.isWindow( elem ) ?\n\t\telem :\n\t\telem.nodeType === 9 ?\n\t\t\telem.defaultView || elem.parentWindow :\n\t\t\tfalse;\n}\n\njQuery.offset = {\n\tsetOffset: function( elem, options, i ) {\n\t\tvar curPosition, curLeft, curCSSTop, curTop, curOffset, curCSSLeft, calculatePosition,\n\t\t\tposition = jQuery.css( elem, \"position\" ),\n\t\t\tcurElem = jQuery( elem ),\n\t\t\tprops = {};\n\n\t\t// set position first, in-case top/left are set even on static elem\n\t\tif ( position === \"static\" ) {\n\t\t\telem.style.position = \"relative\";\n\t\t}\n\n\t\tcurOffset = curElem.offset();\n\t\tcurCSSTop = jQuery.css( elem, \"top\" );\n\t\tcurCSSLeft = jQuery.css( elem, \"left\" );\n\t\tcalculatePosition = ( position === \"absolute\" || position === \"fixed\" ) &&\n\t\t\tjQuery.inArray( \"auto\", [ curCSSTop, curCSSLeft ] ) > -1;\n\n\t\t// need to be able to calculate position if either top or left\n\t\t// is auto and position is either absolute or fixed\n\t\tif ( calculatePosition ) {\n\t\t\tcurPosition = curElem.position();\n\t\t\tcurTop = curPosition.top;\n\t\t\tcurLeft = curPosition.left;\n\t\t} else {\n\t\t\tcurTop = parseFloat( curCSSTop ) || 0;\n\t\t\tcurLeft = parseFloat( curCSSLeft ) || 0;\n\t\t}\n\n\t\tif ( jQuery.isFunction( options ) ) {\n\n\t\t\t// Use jQuery.extend here to allow modification of coordinates argument (gh-1848)\n\t\t\toptions = options.call( elem, i, jQuery.extend( {}, curOffset ) );\n\t\t}\n\n\t\tif ( options.top != null ) {\n\t\t\tprops.top = ( options.top - curOffset.top ) + curTop;\n\t\t}\n\t\tif ( options.left != null ) {\n\t\t\tprops.left = ( options.left - curOffset.left ) + curLeft;\n\t\t}\n\n\t\tif ( \"using\" in options ) {\n\t\t\toptions.using.call( elem, props );\n\t\t} else {\n\t\t\tcurElem.css( props );\n\t\t}\n\t}\n};\n\njQuery.fn.extend( {\n\toffset: function( options ) {\n\t\tif ( arguments.length ) {\n\t\t\treturn options === undefined ?\n\t\t\t\tthis :\n\t\t\t\tthis.each( function( i ) {\n\t\t\t\t\tjQuery.offset.setOffset( this, options, i );\n\t\t\t\t} );\n\t\t}\n\n\t\tvar docElem, win,\n\t\t\tbox = { top: 0, left: 0 },\n\t\t\telem = this[ 0 ],\n\t\t\tdoc = elem && elem.ownerDocument;\n\n\t\tif ( !doc ) {\n\t\t\treturn;\n\t\t}\n\n\t\tdocElem = doc.documentElement;\n\n\t\t// Make sure it's not a disconnected DOM node\n\t\tif ( !jQuery.contains( docElem, elem ) ) {\n\t\t\treturn box;\n\t\t}\n\n\t\t// If we don't have gBCR, just use 0,0 rather than error\n\t\t// BlackBerry 5, iOS 3 (original iPhone)\n\t\tif ( typeof elem.getBoundingClientRect !== \"undefined\" ) {\n\t\t\tbox = elem.getBoundingClientRect();\n\t\t}\n\t\twin = getWindow( doc );\n\t\treturn {\n\t\t\ttop: box.top  + ( win.pageYOffset || docElem.scrollTop )  - ( docElem.clientTop  || 0 ),\n\t\t\tleft: box.left + ( win.pageXOffset || docElem.scrollLeft ) - ( docElem.clientLeft || 0 )\n\t\t};\n\t},\n\n\tposition: function() {\n\t\tif ( !this[ 0 ] ) {\n\t\t\treturn;\n\t\t}\n\n\t\tvar offsetParent, offset,\n\t\t\tparentOffset = { top: 0, left: 0 },\n\t\t\telem = this[ 0 ];\n\n\t\t// Fixed elements are offset from window (parentOffset = {top:0, left: 0},\n\t\t// because it is its only offset parent\n\t\tif ( jQuery.css( elem, \"position\" ) === \"fixed\" ) {\n\n\t\t\t// we assume that getBoundingClientRect is available when computed position is fixed\n\t\t\toffset = elem.getBoundingClientRect();\n\t\t} else {\n\n\t\t\t// Get *real* offsetParent\n\t\t\toffsetParent = this.offsetParent();\n\n\t\t\t// Get correct offsets\n\t\t\toffset = this.offset();\n\t\t\tif ( !jQuery.nodeName( offsetParent[ 0 ], \"html\" ) ) {\n\t\t\t\tparentOffset = offsetParent.offset();\n\t\t\t}\n\n\t\t\t// Add offsetParent borders\n\t\t\tparentOffset.top  += jQuery.css( offsetParent[ 0 ], \"borderTopWidth\", true );\n\t\t\tparentOffset.left += jQuery.css( offsetParent[ 0 ], \"borderLeftWidth\", true );\n\t\t}\n\n\t\t// Subtract parent offsets and element margins\n\t\t// note: when an element has margin: auto the offsetLeft and marginLeft\n\t\t// are the same in Safari causing offset.left to incorrectly be 0\n\t\treturn {\n\t\t\ttop:  offset.top  - parentOffset.top - jQuery.css( elem, \"marginTop\", true ),\n\t\t\tleft: offset.left - parentOffset.left - jQuery.css( elem, \"marginLeft\", true )\n\t\t};\n\t},\n\n\toffsetParent: function() {\n\t\treturn this.map( function() {\n\t\t\tvar offsetParent = this.offsetParent;\n\n\t\t\twhile ( offsetParent && ( !jQuery.nodeName( offsetParent, \"html\" ) &&\n\t\t\t\tjQuery.css( offsetParent, \"position\" ) === \"static\" ) ) {\n\t\t\t\toffsetParent = offsetParent.offsetParent;\n\t\t\t}\n\t\t\treturn offsetParent || documentElement;\n\t\t} );\n\t}\n} );\n\n// Create scrollLeft and scrollTop methods\njQuery.each( { scrollLeft: \"pageXOffset\", scrollTop: \"pageYOffset\" }, function( method, prop ) {\n\tvar top = /Y/.test( prop );\n\n\tjQuery.fn[ method ] = function( val ) {\n\t\treturn access( this, function( elem, method, val ) {\n\t\t\tvar win = getWindow( elem );\n\n\t\t\tif ( val === undefined ) {\n\t\t\t\treturn win ? ( prop in win ) ? win[ prop ] :\n\t\t\t\t\twin.document.documentElement[ method ] :\n\t\t\t\t\telem[ method ];\n\t\t\t}\n\n\t\t\tif ( win ) {\n\t\t\t\twin.scrollTo(\n\t\t\t\t\t!top ? val : jQuery( win ).scrollLeft(),\n\t\t\t\t\ttop ? val : jQuery( win ).scrollTop()\n\t\t\t\t);\n\n\t\t\t} else {\n\t\t\t\telem[ method ] = val;\n\t\t\t}\n\t\t}, method, val, arguments.length, null );\n\t};\n} );\n\n// Support: Safari<7-8+, Chrome<37-44+\n// Add the top/left cssHooks using jQuery.fn.position\n// Webkit bug: https://bugs.webkit.org/show_bug.cgi?id=29084\n// getComputedStyle returns percent when specified for top/left/bottom/right\n// rather than make the css module depend on the offset module, we just check for it here\njQuery.each( [ \"top\", \"left\" ], function( i, prop ) {\n\tjQuery.cssHooks[ prop ] = addGetHookIf( support.pixelPosition,\n\t\tfunction( elem, computed ) {\n\t\t\tif ( computed ) {\n\t\t\t\tcomputed = curCSS( elem, prop );\n\n\t\t\t\t// if curCSS returns percentage, fallback to offset\n\t\t\t\treturn rnumnonpx.test( computed ) ?\n\t\t\t\t\tjQuery( elem ).position()[ prop ] + \"px\" :\n\t\t\t\t\tcomputed;\n\t\t\t}\n\t\t}\n\t);\n} );\n\n\n// Create innerHeight, innerWidth, height, width, outerHeight and outerWidth methods\njQuery.each( { Height: \"height\", Width: \"width\" }, function( name, type ) {\n\tjQuery.each( { padding: \"inner\" + name, content: type, \"\": \"outer\" + name },\n\tfunction( defaultExtra, funcName ) {\n\n\t\t// margin is only for outerHeight, outerWidth\n\t\tjQuery.fn[ funcName ] = function( margin, value ) {\n\t\t\tvar chainable = arguments.length && ( defaultExtra || typeof margin !== \"boolean\" ),\n\t\t\t\textra = defaultExtra || ( margin === true || value === true ? \"margin\" : \"border\" );\n\n\t\t\treturn access( this, function( elem, type, value ) {\n\t\t\t\tvar doc;\n\n\t\t\t\tif ( jQuery.isWindow( elem ) ) {\n\n\t\t\t\t\t// As of 5/8/2012 this will yield incorrect results for Mobile Safari, but there\n\t\t\t\t\t// isn't a whole lot we can do. See pull request at this URL for discussion:\n\t\t\t\t\t// https://github.com/jquery/jquery/pull/764\n\t\t\t\t\treturn elem.document.documentElement[ \"client\" + name ];\n\t\t\t\t}\n\n\t\t\t\t// Get document width or height\n\t\t\t\tif ( elem.nodeType === 9 ) {\n\t\t\t\t\tdoc = elem.documentElement;\n\n\t\t\t\t\t// Either scroll[Width/Height] or offset[Width/Height] or client[Width/Height],\n\t\t\t\t\t// whichever is greatest\n\t\t\t\t\t// unfortunately, this causes bug #3838 in IE6/8 only,\n\t\t\t\t\t// but there is currently no good, small way to fix it.\n\t\t\t\t\treturn Math.max(\n\t\t\t\t\t\telem.body[ \"scroll\" + name ], doc[ \"scroll\" + name ],\n\t\t\t\t\t\telem.body[ \"offset\" + name ], doc[ \"offset\" + name ],\n\t\t\t\t\t\tdoc[ \"client\" + name ]\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\treturn value === undefined ?\n\n\t\t\t\t\t// Get width or height on the element, requesting but not forcing parseFloat\n\t\t\t\t\tjQuery.css( elem, type, extra ) :\n\n\t\t\t\t\t// Set width or height on the element\n\t\t\t\t\tjQuery.style( elem, type, value, extra );\n\t\t\t}, type, chainable ? margin : undefined, chainable, null );\n\t\t};\n\t} );\n} );\n\n\njQuery.fn.extend( {\n\n\tbind: function( types, data, fn ) {\n\t\treturn this.on( types, null, data, fn );\n\t},\n\tunbind: function( types, fn ) {\n\t\treturn this.off( types, null, fn );\n\t},\n\n\tdelegate: function( selector, types, data, fn ) {\n\t\treturn this.on( types, selector, data, fn );\n\t},\n\tundelegate: function( selector, types, fn ) {\n\n\t\t// ( namespace ) or ( selector, types [, fn] )\n\t\treturn arguments.length === 1 ?\n\t\t\tthis.off( selector, \"**\" ) :\n\t\t\tthis.off( types, selector || \"**\", fn );\n\t}\n} );\n\n// The number of elements contained in the matched element set\njQuery.fn.size = function() {\n\treturn this.length;\n};\n\njQuery.fn.andSelf = jQuery.fn.addBack;\n\n\n\n\n// Register as a named AMD module, since jQuery can be concatenated with other\n// files that may use define, but not via a proper concatenation script that\n// understands anonymous AMD modules. A named AMD is safest and most robust\n// way to register. Lowercase jquery is used because AMD module names are\n// derived from file names, and jQuery is normally delivered in a lowercase\n// file name. Do this after creating the global so that if an AMD module wants\n// to call noConflict to hide this version of jQuery, it will work.\n\n// Note that for maximum portability, libraries that are not jQuery should\n// declare themselves as anonymous modules, and avoid setting a global if an\n// AMD loader is present. jQuery is a special case. For more information, see\n// https://github.com/jrburke/requirejs/wiki/Updating-existing-libraries#wiki-anon\n\nif ( typeof define === \"function\" && define.amd ) {\n\tdefine( \"jquery\", [], function() {\n\t\treturn jQuery;\n\t} );\n}\n\n\n\nvar\n\n\t// Map over jQuery in case of overwrite\n\t_jQuery = window.jQuery,\n\n\t// Map over the $ in case of overwrite\n\t_$ = window.$;\n\njQuery.noConflict = function( deep ) {\n\tif ( window.$ === jQuery ) {\n\t\twindow.$ = _$;\n\t}\n\n\tif ( deep && window.jQuery === jQuery ) {\n\t\twindow.jQuery = _jQuery;\n\t}\n\n\treturn jQuery;\n};\n\n// Expose jQuery and $ identifiers, even in\n// AMD (#7102#comment:10, https://github.com/jquery/jquery/pull/557)\n// and CommonJS for browser emulators (#13566)\nif ( !noGlobal ) {\n\twindow.jQuery = window.$ = jQuery;\n}\n\nreturn jQuery;\n}));\n"
  },
  {
    "path": "static/js/array.js",
    "content": "/**\n * 删除数组中的匹配值\n * @param $callback\n */\nArray.prototype.remove = function ($callback) {\n    var $isFunction = typeof $callback === \"function\";\n\n    var arr = [];\n    for (var $i = 0, $len = this.length; $i < $len; $i++) {\n        if ($isFunction) {\n            if ($callback(this[$i])) {\n                arr.push($i);\n            }\n        } else if (this[$i] == $callback) {\n            arr.push($i);\n        }\n    }\n    for ($i = 0, $len = arr.length; $i < $len; $i++) {\n        this.slice($i, 1);\n    }\n};\nString.prototype.endWith = function (endStr) {\n    var d = this.length - endStr.length;\n\n    return (d >= 0 && this.lastIndexOf(endStr) === d)\n};\n\n//格式化文件大小\nfunction formatBytes($size) {\n    if (typeof $size === \"number\") {\n        var $units = [\" B\", \" KB\", \" MB\", \" GB\", \" TB\"];\n\n        for ($i = 0; $size >= 1024 && $i < 4; $i++) $size /= 1024;\n\n        return $size.toFixed(2) + $units[$i];\n    }\n    return $size;\n}\n\n/**\n * 将多维的json转换为一维的json\n * @param $json\n * @param $parentKey\n */\nfunction foreachJson($json, $parentKey) {\n    var data = {};\n\n    $.each($json, function (key, item) {\n        var cKey = $parentKey;\n\n        if (Array.isArray($json)) {\n            key = \"[\";\n        }\n\n        if ($parentKey !== undefined && $parentKey !== \"\" && key !== \"\") {\n            if($parentKey.endsWith(\"[\")) {\n                cKey = $parentKey + key + \"]\";\n            } else if (key === \"[\") {\n                cKey = $parentKey + key;\n            } else {\n                cKey = $parentKey + \".\" + key;\n            }\n        } else {\n            cKey = key;\n        }\n\n\n        var node = {};\n        node[\"key\"] = cKey;\n        node[\"type\"] = Array.isArray(item) ? \"array\" : typeof item;\n        node[\"value\"] = item;\n        if (typeof key === \"string\" && key !== \"[\") {\n            data[cKey] = node;\n        }\n\n        if (typeof item === \"object\") {\n            var items = foreachJson(item, cKey);\n            $.each(items,function (k,v) {\n                data[k] = v;\n            });\n        }\n    });\n    return data;\n\n}"
  },
  {
    "path": "static/js/blog.js",
    "content": "$(function () {\n    editormd.katexURL = {\n        js  : window.katex.js,\n        css : window.katex.css\n    };\n    var htmlDecodeList = [\"style\",\"script\",\"title\",\"onmouseover\",\"onmouseout\",\"style\"];\n    if (!window.IS_ENABLE_IFRAME) {\n        htmlDecodeList.unshift(\"iframe\");\n    }\n    window.editor = editormd(\"docEditor\", {\n        width: \"100%\",\n        height: \"100%\",\n        path: window.editormdLib,\n        toolbar: true,\n        placeholder: \"本编辑器支持 Markdown 编辑，左边编写，右边预览。\",\n        imageUpload: true,\n        imageFormats: [\"jpg\", \"jpeg\", \"gif\", \"png\", \"JPG\", \"JPEG\", \"GIF\", \"PNG\"],\n        imageUploadURL: window.imageUploadURL,\n        toolbarModes: \"full\",\n        fileUpload: true,\n        fileUploadURL: window.fileUploadURL,\n        taskList: true,\n        flowChart: true,\n        mermaid: true,\n        htmlDecode: htmlDecodeList.join(','),\n        lineNumbers: true,\n        sequenceDiagram: true,\n        highlightStyle: window.highlightStyle ? window.highlightStyle : \"github\",\n        tocStartLevel: 1,\n        tocm: true,\n        tex:true,\n        saveHTMLToTextarea: true,\n\n        onload: function() {\n            this.hideToolbar();\n            var keyMap = {\n                \"Ctrl-S\": function(cm) {\n                    saveBlog(false);\n                },\n                \"Cmd-S\": function(cm){\n                    saveBlog(false);\n                },\n                \"Ctrl-A\": function(cm) {\n                    cm.execCommand(\"selectAll\");\n                }\n            };\n            this.addKeyMap(keyMap);\n\n            uploadImage(\"docEditor\", function ($state, $res) {\n                console.log(\"注册上传图片\")\n                if ($state === \"before\") {\n                    return layer.load(1, {\n                        shade: [0.1, '#fff'] // 0.1 透明度的白色背景\n                    });\n                } else if ($state === \"success\") {\n                    var $data = $res instanceof Array ? $res[0] : $res;\n                    if ($data.errcode === 0) {\n                        var value = '![](' + $data.url + ')';\n                        window.editor.insertValue(value);\n                    }\n                }\n            });\n        },\n        onchange: function () {\n            resetEditorChanged(true);\n        }\n    });\n    /**\n     * 实现标题栏操作\n     */\n    $(\"#editormd-tools\").on(\"click\", \"a[class!='disabled']\", function () {\n        var name = $(this).find(\"i\").attr(\"name\");\n        if (name === \"attachment\") {\n            $(\"#uploadAttachModal\").modal(\"show\");\n        }else if (name === \"save\") {\n            saveBlog(false);\n        } else if (name === \"template\") {\n            $(\"#documentTemplateModal\").modal(\"show\");\n        } else if (name === \"tasks\") {\n            // 插入 GFM 任务列表\n            var cm = window.editor.cm;\n            var selection = cm.getSelection();\n\n            if (selection === \"\") {\n                cm.replaceSelection(\"- [x] \" + selection);\n            } else {\n                var selectionText = selection.split(\"\\n\");\n\n                for (var i = 0, len = selectionText.length; i < len; i++) {\n                    selectionText[i] = (selectionText[i] === \"\") ? \"\" : \"- [x] \" + selectionText[i];\n                }\n                cm.replaceSelection(selectionText.join(\"\\n\"));\n            }\n        } else {\n            var action = window.editor.toolbarHandlers[name];\n\n            if (action !== \"undefined\") {\n                $.proxy(action, window.editor)();\n                window.editor.focus();\n            }\n        }\n    }) ;\n\n    /**\n     * 保存文章\n     * @param $is_cover\n     */\n    function saveBlog($is_cover) {\n        var content = window.editor.getMarkdown();\n        var html = window.editor.getPreviewedHTML();\n\n        $.ajax({\n            beforeSend: function () {\n                index = layer.load(1, { shade: [0.1, '#fff'] });\n            },\n            url: window.editURL,\n            data: { \"blogId\": window.blogId,\"content\": content,\"htmlContent\": html, \"cover\": $is_cover ? \"yes\" : \"no\",\"version\" : window.blogVersion},\n            type: \"post\",\n            timeout : 30000,\n            dataType: \"json\",\n            success: function ($res) {\n                layer.close(index);\n                if ($res.errcode === 0) {\n                    resetEditorChanged(false);\n                    window.blogVersion = $res.data.version;\n                } else if($res.errcode === 6005) {\n                    var confirmIndex = layer.confirm('文档已被其他人修改确定覆盖已存在的文档吗？', {\n                        btn: ['确定', '取消'] // 按钮\n                    }, function() {\n                        layer.close(confirmIndex);\n                        saveBlog(true);\n                    });\n                } else {\n                    layer.msg(res.message);\n                }\n            },\n            error : function (XMLHttpRequest, textStatus, errorThrown) {\n                layer.close(index);\n                layer.msg(\"服务器错误：\" +  errorThrown);\n            }\n        });\n    }\n    /**\n     * 设置编辑器变更状态\n     * @param $is_change\n     */\n    function resetEditorChanged($is_change) {\n        if ($is_change && !window.isLoad) {\n            $(\"#markdown-save\").removeClass('disabled').addClass('change');\n        } else {\n            $(\"#markdown-save\").removeClass('change').addClass('disabled');\n        }\n        window.isLoad = false;\n    }\n    /**\n     * 打开文档模板\n     */\n    $(\"#documentTemplateModal\").on(\"click\", \".section>a[data-type]\", function () {\n        var $this = $(this).attr(\"data-type\");\n        var body = $(\"#template-\" + $this).html();\n        if (body) {\n            window.isLoad = true;\n            window.editor.clear();\n            window.editor.insertValue(body);\n            window.editor.setCursor({ line: 0, ch: 0 });\n            resetEditorChanged(true);\n        }\n        $(\"#documentTemplateModal\").modal('hide');\n    });\n});\n"
  },
  {
    "path": "static/js/cherry_markdown.js",
    "content": "$(function () {\n\n    window.editormdLocales = {\n        'zh-CN': {\n            placeholder: '本编辑器支持 Markdown 编辑，左边编写，右边预览。',\n            contentUnsaved: '编辑内容未保存，需要保存吗？',\n            noDocNeedPublish: '没有需要发布的文档',\n            loadDocFailed: '文档加载失败',\n            fetchDocFailed: '获取当前文档信息失败',\n            cannotAddToEmptyNode: '空节点不能添加内容',\n            overrideModified: '文档已被其他人修改确定覆盖已存在的文档吗？',\n            confirm: '确定',\n            cancel: '取消',\n            contentsNameEmpty: '目录名称不能为空',\n            addDoc: '添加文档',\n            edit: '编辑',\n            delete: '删除',\n            loadFailed: '加载失败请重试',\n            tplNameEmpty: '模板名称不能为空',\n            tplContentEmpty: '模板内容不能为空',\n            saveSucc: '保存成功',\n            serverExcept: '服务器异常',\n            paramName: '参数名称',\n            paramType: '参数类型',\n            example: '示例值',\n            remark: '备注',\n        },\n        'en': {\n            placeholder: 'This editor supports Markdown editing, writing on the left and previewing on the right.',\n            contentUnsaved: 'The edited content is not saved, need to save it?',\n            noDocNeedPublish: 'No Document need to be publish',\n            loadDocFailed: 'Load Document failed',\n            fetchDocFailed: 'Fetch Document info failed',\n            cannotAddToEmptyNode: 'Cannot add content to empty node',\n            overrideModified: 'The document has been modified by someone else, are you sure to overwrite the document?',\n            confirm: 'Confirm',\n            cancel: 'Cancel',\n            contentsNameEmpty: 'Document Name cannot be empty',\n            addDoc: 'Add Document',\n            edit: 'Edit',\n            delete: 'Delete',\n            loadFailed: 'Failed to load, please try again',\n            tplNameEmpty: 'Template name cannot be empty',\n            tplContentEmpty: 'Template content cannot be empty',\n            saveSucc: 'Save success',\n            serverExcept: 'Server Exception',\n            paramName: 'Parameter',\n            paramType: 'Type',\n            example: 'Example',\n            remark: 'Remark',\n        }\n    };\n\n    var CustomHookA = Cherry.createSyntaxHook('codeBlock', Cherry.constants.HOOKS_TYPE_LIST.PAR, {\n        makeHtml(str) {\n            console.warn('custom hook', 'hello');\n            return str;\n        },\n        rule(str) {\n            const regex = {\n                begin: '',\n                content: '',\n                end: '',\n            };\n            regex.reg = new RegExp(regex.begin + regex.content + regex.end, 'g');\n            return regex;\n        },\n    });\n    /**\n     * 自定义一个自定义菜单\n     * 点第一次时，把选中的文字变成同时加粗和斜体\n     * 保持光标选区不变，点第二次时，把加粗斜体的文字变成普通文本\n     */\n    var customMenuA = Cherry.createMenuHook('加粗斜体', {\n        iconName: 'font',\n        onClick: function (selection) {\n            // 获取用户选中的文字，调用getSelection方法后，如果用户没有选中任何文字，会尝试获取光标所在位置的单词或句子\n            let $selection = this.getSelection(selection) || '同时加粗斜体';\n            // 如果是单选，并且选中内容的开始结束内没有加粗语法，则扩大选中范围\n            if (!this.isSelections && !/^\\s*(\\*\\*\\*)[\\s\\S]+(\\1)/.test($selection)) {\n                this.getMoreSelection('***', '***', () => {\n                    const newSelection = this.editor.editor.getSelection();\n                    const isBoldItalic = /^\\s*(\\*\\*\\*)[\\s\\S]+(\\1)/.test(newSelection);\n                    if (isBoldItalic) {\n                        $selection = newSelection;\n                    }\n                    return isBoldItalic;\n                });\n            }\n            // 如果选中的文本中已经有加粗语法了，则去掉加粗语法\n            if (/^\\s*(\\*\\*\\*)[\\s\\S]+(\\1)/.test($selection)) {\n                return $selection.replace(/(^)(\\s*)(\\*\\*\\*)([^\\n]+)(\\3)(\\s*)($)/gm, '$1$4$7');\n            }\n            /**\n             * 注册缩小选区的规则\n             *    注册后，插入“***TEXT***”，选中状态会变成“***【TEXT】***”\n             *    如果不注册，插入后效果为：“【***TEXT***】”\n             */\n            this.registerAfterClickCb(() => {\n                this.setLessSelection('***', '***');\n            });\n            return $selection.replace(/(^)([^\\n]+)($)/gm, '$1***$2***$3');\n        }\n    });\n    /**\n     * 定义一个空壳，用于自行规划cherry已有工具栏的层级结构\n     */\n    var customMenuB = Cherry.createMenuHook('发布', {\n        iconName: 'publish',\n        onClick: releaseDocument,\n    });\n\n    var customMenuC = Cherry.createMenuHook(\"返回\", {\n        iconName: 'back',\n        onClick: backWard,\n    })\n\n    var customMenuD = Cherry.createMenuHook('保存', {\n        id: \"markdown-save\",\n        iconName: 'save',\n        onClick: saveDocument,\n    });\n\n    var customMenuE = Cherry.createMenuHook('边栏', {\n        iconName: 'sider',\n        onClick: siderChange,\n    });\n\n    var customMenuF = Cherry.createMenuHook('历史', {\n        iconName: 'history',\n        onClick: showHistory,\n    });\n\n    let customMenuTools =  Cherry.createMenuHook('工具',  {\n        iconName: '',\n        subMenuConfig: [\n            {\n                iconName: 'word',\n                name: 'Word转笔记',\n                onclick: ()=>{\n                    let converter = new WordToHtmlConverter();\n                    converter.handleFileSelect(function (response) {\n                        if (response.messages.length) {\n                            let messages = response.messages.map((item)=>{\n                                return item.message + \"<br/>\";\n                            }).join('\\n');\n                            layer.msg(messages);\n                        }\n                        converter.replaceHtmlBase64(response.value).then((html)=>{\n                            window.editor.insertValue(html);\n                        });\n                    })\n                }\n            },\n            {\n                noIcon: true,\n                name: 'Htm转Markdown',\n                onclick: ()=>{\n                    let converter = new HtmlToMarkdownConverter();\n                    converter.handleFileSelect(function (response) {\n                        window.editor.insertValue(response);\n                    })\n                }\n            }\n        ]\n    });\n\n\n    var basicConfig = {\n        id: 'manualEditorContainer',\n        externals: {\n            echarts: window.echarts,\n            katex: window.katex,\n            MathJax: window.MathJax,\n        },\n        isPreviewOnly: false,\n        fileUpload: myFileUpload,\n        engine: {\n            global: {\n                urlProcessor(url, srcType) {\n                    //console.log(`url-processor`, url, srcType);\n                    return url;\n                },\n            },\n            syntax: {\n                codeBlock: {\n                    theme: 'twilight',\n                },\n                table: {\n                    enableChart: false,\n                    // chartEngine: Engine Class\n                },\n                fontEmphasis: {\n                    allowWhitespace: false, // 是否允许首尾空格\n                },\n                strikethrough: {\n                    needWhitespace: false, // 是否必须有前后空格\n                },\n                mathBlock: {\n                    engine: 'MathJax', // katex或MathJax\n                    src: 'https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-svg.js', // 如果使用MathJax plugins，则需要使用该url通过script标签引入\n                },\n                inlineMath: {\n                    engine: 'MathJax', // katex或MathJax\n                },\n                emoji: {\n                    useUnicode: false,\n                    customResourceURL: 'https://github.githubassets.com/images/icons/emoji/unicode/${code}.png?v8',\n                    upperCase: true,\n                },\n                // toc: {\n                //     tocStyle: 'nested'\n                // }\n                // 'header': {\n                //   strict: false\n                // }\n            },\n            customSyntax: {\n                // SyntaxHookClass\n                CustomHook: {\n                    syntaxClass: CustomHookA,\n                    force: false,\n                    after: 'br',\n                },\n            },\n        },\n        toolbars: {\n            toolbar: [\n                'customMenuCName',\n                'customMenuDName',\n                'customMenuBName',\n                'customMenuEName',\n                'undo',\n                'redo',\n                'bold',\n                'italic',\n                {\n                    strikethrough: ['strikethrough', 'underline', 'sub', 'sup', 'ruby', 'customMenuAName'],\n                },\n                'size',\n                '|',\n                'color',\n                'header',\n                '|',\n                'drawIo',\n                '|',\n                'ol',\n                'ul',\n                'checklist',\n                'panel',\n                'detail',\n                '|',\n                'formula',\n                {\n                    insert: ['image', 'audio', 'video', 'link', 'hr', 'br', 'code', 'formula', 'toc', 'table', 'pdf', 'word', 'ruby'],\n                },\n                'graph',\n                'togglePreview',\n                'settings',\n                'switchModel',\n                'export',\n                'customMenuFName',\n                'customMenuToolsName'\n            ],\n            bubble: ['bold', 'italic', 'underline', 'strikethrough', 'sub', 'sup', 'quote', 'ruby', '|', 'size', 'color'], // array or false\n            sidebar: ['mobilePreview', 'copy', 'codeTheme', 'theme'],\n            customMenu: {\n                customMenuAName: customMenuA,\n                customMenuBName: customMenuB,\n                customMenuCName: customMenuC,\n                customMenuDName: customMenuD,\n                customMenuEName: customMenuE,\n                customMenuFName: customMenuF,\n                customMenuToolsName: customMenuTools,\n            },\n        },\n        drawioIframeUrl: '/static/cherry/drawio_demo.html',\n        editor: {\n            defaultModel: 'edit&preview',\n            height: \"100%\",\n        },\n        previewer: {\n            // 自定义markdown预览区域class\n            // className: 'markdown'\n        },\n        keydown: [],\n        //extensions: [],\n        //callback: {\n        //changeString2Pinyin: pinyin,\n        //}\n    };\n\n    fetch('').then((response) => response.text()).then((value) => {\n        //var markdownarea = document.getElementById(\"markdown_area\").value\n        var config = Object.assign({}, basicConfig);// { value: markdownarea });// { value: value });不显示获取的初始化值\n        window.editor = new Cherry(config);\n        window.editor.getCodeMirror().on('change', (e, detail)=>{\n            resetEditorChanged(true);\n        });\n        openLastSelectedNode();\n    });\n\n    /***\n     * 加载指定的文档到编辑器中\n     * @param $node\n     */\n    window.loadDocument = function ($node) {\n        var index = layer.load(1, {\n            shade: [0.1, '#fff'] // 0.1 透明度的白色背景\n        });\n\n        $.get(window.editURL + $node.node.id).done(function (res) {\n            layer.close(index);\n\n            if (res.errcode === 0) {\n                window.isLoad = true;\n                try {\n                    window.editor.setTheme(res.data.markdown_theme);\n                    window.editor.setMarkdown(res.data.markdown);\n                } catch (e) {\n                    console.log(e);\n                }\n                var node = { \"id\": res.data.doc_id, 'parent': res.data.parent_id === 0 ? '#' : res.data.parent_id, \"text\": res.data.doc_name, \"identify\": res.data.identify, \"version\": res.data.version };\n                pushDocumentCategory(node);\n                window.selectNode = node;\n                pushVueLists(res.data.attach);\n                setLastSelectNode($node);\n            } else {\n                layer.msg(editormdLocales[lang].loadDocFailed);\n            }\n        }).fail(function () {\n            layer.close(index);\n            layer.msg(editormdLocales[lang].loadDocFailed);\n        });\n    };\n\n    /**\n     * 保存文档到服务器\n     * @param $is_cover 是否强制覆盖\n     */\n    function saveDocument($is_cover, callback) {\n        var index = null;\n        var node = window.selectNode;\n        var content = window.editor.getMarkdown();\n        var html = window.editor.getHtml(true);\n        var markdownTheme = window.editor.getTheme();\n        var version = \"\";\n\n        if (!node) {\n            layer.msg(editormdLocales[lang].fetchDocFailed);\n            return;\n        }\n        if (node.a_attr && node.a_attr.disabled) {\n            layer.msg(editormdLocales[lang].cannotAddToEmptyNode);\n            return;\n        }\n\n        var doc_id = parseInt(node.id);\n\n        for (var i in window.documentCategory) {\n            var item = window.documentCategory[i];\n\n            if (item.id === doc_id) {\n                version = item.version;\n                break;\n            }\n        }\n        $.ajax({\n            beforeSend: function () {\n                index = layer.load(1, { shade: [0.1, '#fff'] });\n                window.saveing = true;\n            },\n            url: window.editURL,\n            data: { \"identify\": window.book.identify, \"doc_id\": doc_id, \"markdown\": content, \"html\": html, \"markdown_theme\": markdownTheme, \"cover\": $is_cover ? \"yes\" : \"no\", \"version\": version },\n            type: \"post\",\n            timeout: 30000,\n            dataType: \"json\",\n            success: function (res) {\n                if (res.errcode === 0) {\n                    resetEditorChanged(false);\n                    for (var i in window.documentCategory) {\n                        var item = window.documentCategory[i];\n\n                        if (item.id === doc_id) {\n                            window.documentCategory[i].version = res.data.version;\n                            break;\n                        }\n                    }\n                    $.each(window.documentCategory, function (i, item) {\n                        var $item = window.documentCategory[i];\n\n                        if (item.id === doc_id) {\n                            window.documentCategory[i].version = res.data.version;\n                        }\n                    });\n                    if (typeof callback === \"function\") {\n                        callback();\n                    }\n\n                } else if (res.errcode === 6005) {\n                    var confirmIndex = layer.confirm(editormdLocales[lang].overrideModified, {\n                        btn: [editormdLocales[lang].confirm, editormdLocales[lang].cancel] // 按钮\n                    }, function () {\n                        layer.close(confirmIndex);\n                        saveDocument(true, callback);\n                    });\n                } else {\n                    layer.msg(res.message);\n                }\n            },\n            error: function (XMLHttpRequest, textStatus, errorThrown) {\n                layer.msg(window.editormdLocales[window.lang].serverExcept + errorThrown);\n            },\n            complete: function () {\n                layer.close(index);\n                window.saveing = false;\n            }\n        });\n    }\n\n\n    /**\n     * 设置编辑器变更状态\n     * @param $is_change\n     */\n    function resetEditorChanged($is_change) {\n        if ($is_change && !window.isLoad) {\n            $(\"#markdown-save\").removeClass('disabled').addClass('change');\n        } else {\n            $(\"#markdown-save\").removeClass('change').addClass('disabled');\n        }\n        window.isLoad = false;\n    }\n\n    /**\n     * 返回上一个页面\n     */\n    function backWard() {\n        if (document.referrer == \"\") { // 没有上一级\n            var homepage = window.location.origin;\n            window.location.href = homepage; // 返回首页\n            return;\n        }\n        window.location.href = document.referrer;\n    }\n\n    /**\n     * 发布文档\n     */\n\n    function releaseDocument() {\n        if (Object.prototype.toString.call(window.documentCategory) === '[object Array]' && window.documentCategory.length > 0) {\n            if ($(\"#markdown-save\").hasClass('change')) {\n                var confirm_result = confirm(editormdLocales[lang].contentUnsaved);\n                if (confirm_result) {\n                    saveDocument(false, releaseBook);\n                    return;\n                }\n            }\n            releaseBook();\n            return\n        }\n        layer.msg(editormdLocales[lang].noDocNeedPublish)\n    }\n\n\n    /**\n     * 显示/隐藏边栏\n     */\n\n    function siderChange() {\n        $(\"#manualCategory\").toggle(0, \"swing\", function () {\n            var $then = $(\"#manualEditorContainer\");\n            var left = parseInt($then.css(\"left\"));\n            if (left > 0) {\n                window.editorContainerLeft = left;\n                $then.css(\"left\", \"0\");\n            } else {\n                $then.css(\"left\", window.editorContainerLeft + \"px\");\n            }\n        });\n    }\n\n    /**\n     * 显示文档历史\n     */\n\n    function showHistory() {\n        window.documentHistory();\n    }\n\n    /**\n     * 添加文档\n     */\n    $(\"#addDocumentForm\").ajaxForm({\n        beforeSubmit: function () {\n            var doc_name = $.trim($(\"#documentName\").val());\n            if (doc_name === \"\") {\n                return showError(editormdLocales[lang].contentsNameEmpty, \"#add-error-message\")\n            }\n            $(\"#btnSaveDocument\").button(\"loading\");\n            return true;\n        },\n        success: function (res) {\n            if (res.errcode === 0) {\n                var data = {\n                    \"id\": res.data.doc_id,\n                    'parent': res.data.parent_id === 0 ? '#' : res.data.parent_id,\n                    \"text\": res.data.doc_name,\n                    \"identify\": res.data.identify,\n                    \"version\": res.data.version,\n                    state: { opened: res.data.is_open == 1 },\n                    a_attr: { is_open: res.data.is_open == 1 }\n                };\n\n                var node = window.treeCatalog.get_node(data.id);\n                if (node) {\n                    window.treeCatalog.rename_node({ \"id\": data.id }, data.text);\n                    $(\"#sidebar\").jstree(true).get_node(data.id).a_attr.is_open = data.state.opened;\n                } else {\n                    window.treeCatalog.create_node(data.parent, data);\n                    window.treeCatalog.deselect_all();\n                    window.treeCatalog.select_node(data);\n                }\n                pushDocumentCategory(data);\n                $(\"#markdown-save\").removeClass('change').addClass('disabled');\n                $(\"#addDocumentModal\").modal('hide');\n            } else {\n                showError(res.message, \"#add-error-message\");\n            }\n            $(\"#btnSaveDocument\").button(\"reset\");\n        }\n    });\n\n    /**\n     * 文档目录树\n     */\n    $(\"#sidebar\").jstree({\n        'plugins': [\"wholerow\", \"types\", 'dnd', 'contextmenu'],\n        \"types\": {\n            \"default\": {\n                \"icon\": false  // 删除默认图标\n            }\n        },\n        'core': {\n            'worker':true,\n            'check_callback': true,\n            \"multiple\": false,\n            'animation': 0,\n            \"data\": window.documentCategory\n        },\n        \"contextmenu\": {\n            show_at_node: false,\n            select_node: false,\n            \"items\": {\n                \"添加文档\": {\n                    \"separator_before\": false,\n                    \"separator_after\": true,\n                    \"_disabled\": false,\n                    \"label\": window.editormdLocales[window.lang].addDoc,//\"添加文档\",\n                    \"icon\": \"fa fa-plus\",\n                    \"action\": function (data) {\n                        var inst = $.jstree.reference(data.reference),\n                            node = inst.get_node(data.reference);\n\n                        openCreateCatalogDialog(node);\n                    }\n                },\n                \"编辑\": {\n                    \"separator_before\": false,\n                    \"separator_after\": true,\n                    \"_disabled\": false,\n                    \"label\": window.editormdLocales[window.lang].edit,\n                    \"icon\": \"fa fa-edit\",\n                    \"action\": function (data) {\n                        var inst = $.jstree.reference(data.reference);\n                        var node = inst.get_node(data.reference);\n                        openEditCatalogDialog(node);\n                    }\n                },\n                \"删除\": {\n                    \"separator_before\": false,\n                    \"separator_after\": true,\n                    \"_disabled\": false,\n                    \"label\": window.editormdLocales[window.lang].delete,\n                    \"icon\": \"fa fa-trash-o\",\n                    \"action\": function (data) {\n                        var inst = $.jstree.reference(data.reference);\n                        var node = inst.get_node(data.reference);\n                        openDeleteDocumentDialog(node);\n                    }\n                }\n            }\n        }\n    }).on(\"ready.jstree\", function () {\n        window.treeCatalog = $(\"#sidebar\").jstree(true);\n\n        //如果没有选中节点则选中默认节点\n        // openLastSelectedNode();\n    }).on('select_node.jstree', function (node, selected) {\n\n        if ($(\"#markdown-save\").hasClass('change')) {\n            if (confirm(window.editormdLocales[window.lang].contentUnsaved)) {\n                saveDocument(false, function () {\n                    loadDocument(selected);\n                });\n                return true;\n            }\n        }\n        //如果是空目录则直接出发展开下一级功能\n        if (selected.node.a_attr && selected.node.a_attr.disabled) {\n            selected.instance.toggle_node(selected.node);\n            return false\n        }\n\n\n        loadDocument(selected);\n    }).on(\"move_node.jstree\", jstree_save).on(\"delete_node.jstree\", function ($node, $parent) {\n        openLastSelectedNode();\n    });\n    /**\n     * 打开文档模板\n     */\n    $(\"#documentTemplateModal\").on(\"click\", \".section>a[data-type]\", function () {\n        var $this = $(this).attr(\"data-type\");\n        if ($this === \"customs\") {\n            $(\"#displayCustomsTemplateModal\").modal(\"show\");\n            return;\n        }\n        var body = $(\"#template-\" + $this).html();\n        if (body) {\n            window.isLoad = true;\n            window.editor.clear();\n            window.editor.insertValue(body);\n            window.editor.setCursor({ line: 0, ch: 0 });\n            resetEditorChanged(true);\n        }\n        $(\"#documentTemplateModal\").modal('hide');\n    });\n\n    document.addEventListener('keydown', function(event) {\n        if (event.ctrlKey && event.key === 's') {\n            event.preventDefault();\n            saveDocument(true, null);\n        }\n    });\n});\n\nfunction myFileUpload(file, callback) {\n    // 创建 FormData 对象以便包含要上传的文件\n    var formData = new FormData();\n    formData.append(\"editormd-file-file\", file); // \"file\" 是与你的服务端接口相对应的字段名\n    var layerIndex = 0;\n    // AJAX 请求\n    $.ajax({\n        url: window.fileUploadURL, // 确保此 URL 是文件上传 API 的正确 URL\n        type: \"POST\",\n        async: false, // 3xxx 20240609这里修改为同步，保证cherry批量上传图片时，插入的图片名称是正确的，否则，插入的图片名称都是最后一个名称\n        dataType: \"json\",\n        data: formData,\n        processData: false, // 必须设置为 false，因为数据是 FormData 对象，不需要对数据进行序列化处理\n        contentType: false, // 必须设置为 false，因为是 FormData 对象，jQuery 将不会设置内容类型头\n        \n        beforeSend: function () {\n            layerIndex = layer.load(1, {\n                shade: [0.1, '#fff'] // 0.1 透明度的白色背景\n            });\n        },\n        \n        error: function () {\n            layer.close(layerIndex);\n            layer.msg(locales[lang].uploadFailed);\n        },\n        success: function (data) {\n            layer.close(layerIndex);\n            // 验证data是否为数组\n            if (data.errcode !== 0) {\n                layer.msg(data.message);\n            } else {\n                callback(data.url); // 假设返回的 JSON 中包含上传文件的 URL，调用回调函数并传入 URL\n            }\n        }\n    });\n}"
  },
  {
    "path": "static/js/class2browser.js",
    "content": "/**\n * 将es6的class语法转为浏览器可以直接使用的语法,\n * 取自 https://babeljs.io/repl\n * 需要添加 @babel/plugin-transform-classes\n * 是要到的方法添加了`c2b`前缀\n */\n\nfunction c2b_classCallCheck(instance, Constructor) {\n  if (!(instance instanceof Constructor)) {\n    throw new TypeError(\"Cannot call a class as a function\");\n  }\n}\n\nfunction _defineProperties(target, props) {\n  for (var i = 0; i < props.length; i++) {\n    var descriptor = props[i];\n    descriptor.enumerable = descriptor.enumerable || false;\n    descriptor.configurable = true;\n    if (\"value\" in descriptor) descriptor.writable = true;\n    Object.defineProperty(target, descriptor.key, descriptor);\n  }\n}\n\nfunction c2b_createClass(Constructor, protoProps, staticProps) {\n  if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n  if (staticProps) _defineProperties(Constructor, staticProps);\n  return Constructor;\n}\n\nfunction c2b_inherits(subClass, superClass) {\n  if (typeof superClass !== \"function\" && superClass !== null) {\n    throw new TypeError(\"Super expression must either be null or a function\");\n  }\n  subClass.prototype = Object.create(superClass && superClass.prototype, {\n    constructor: { value: subClass, writable: true, configurable: true }\n  });\n  if (superClass) _setPrototypeOf(subClass, superClass);\n}\n\nfunction _setPrototypeOf(o, p) {\n  _setPrototypeOf =\n    Object.setPrototypeOf ||\n    function _setPrototypeOf(o, p) {\n      o.__proto__ = p;\n      return o;\n    };\n  return _setPrototypeOf(o, p);\n}\n\nfunction c2b_createSuper(Derived) {\n  var hasNativeReflectConstruct = _isNativeReflectConstruct();\n  return function _createSuperInternal() {\n    var Super = _getPrototypeOf(Derived),\n      result;\n    if (hasNativeReflectConstruct) {\n      var NewTarget = _getPrototypeOf(this).constructor;\n      result = Reflect.construct(Super, arguments, NewTarget);\n    } else {\n      result = Super.apply(this, arguments);\n    }\n    return _possibleConstructorReturn(this, result);\n  };\n}\n\nfunction _possibleConstructorReturn(self, call) {\n  if (call && (typeof call === \"object\" || typeof call === \"function\")) {\n    return call;\n  } else if (call !== void 0) {\n    throw new TypeError(\n      \"Derived constructors may only return object or undefined\"\n    );\n  }\n  return _assertThisInitialized(self);\n}\n\nfunction _assertThisInitialized(self) {\n  if (self === void 0) {\n    throw new ReferenceError(\n      \"this hasn't been initialised - super() hasn't been called\"\n    );\n  }\n  return self;\n}\n\nfunction _isNativeReflectConstruct() {\n  if (typeof Reflect === \"undefined\" || !Reflect.construct) return false;\n  if (Reflect.construct.sham) return false;\n  if (typeof Proxy === \"function\") return true;\n  try {\n    Boolean.prototype.valueOf.call(\n      Reflect.construct(Boolean, [], function () {})\n    );\n    return true;\n  } catch (e) {\n    return false;\n  }\n}\n\nfunction _getPrototypeOf(o) {\n  _getPrototypeOf = Object.setPrototypeOf\n    ? Object.getPrototypeOf\n    : function _getPrototypeOf(o) {\n        return o.__proto__ || Object.getPrototypeOf(o);\n      };\n  return _getPrototypeOf(o);\n}"
  },
  {
    "path": "static/js/dingtalk-ddlogin.js",
    "content": "!function (window, document) {\n    function d(a) {\n        var e, c = document.createElement(\"iframe\"),\n            d = \"https://login.dingtalk.com/login/qrcode.htm?goto=\" + a.goto ;\n        d += a.style ? \"&style=\" + encodeURIComponent(a.style) : \"\",\n            d += a.href ? \"&href=\" + a.href : \"\",\n            c.src = d,\n            c.frameBorder = \"0\",\n            c.allowTransparency = \"true\",\n            c.scrolling = \"no\",\n            c.width =  a.width ? a.width + 'px' : \"365px\",\n            c.height = a.height ? a.height + 'px' : \"400px\",\n            e = document.getElementById(a.id),\n            e.innerHTML = \"\",\n            e.appendChild(c)\n    }\n    window.DDLogin = d\n}(window, document);"
  },
  {
    "path": "static/js/dingtalk-jsapi.js",
    "content": "(function(e,t){\"object\"==typeof exports&&\"object\"==typeof module?module.exports=t():\"function\"==typeof define&&define.amd?define([],t):\"object\"==typeof exports?exports.dd=t():e.dd=t()})(this,function(){return function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var n={};return t.m=e,t.c=n,t.i=function(e){return e},t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,\"a\",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p=\"\",t(t.s=707)}([function(e,t,n){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0});var r=n(2),o=n(180),i=n(2);t.ENV_ENUM=i.ENV_ENUM,t.ENV_ENUM_SUB=i.ENV_ENUM_SUB;var a=n(3);n(186),t.ddSdk=new a.Sdk(r.getENV(),o.log)},function(e,t,n){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.addWatchParamsDeal=function(e){var t=Object.assign({},e);return t.watch=!0,t},t.addDefaultCorpIdParamsDeal=function(e){var t=Object.assign({},e);return t.corpId=\"corpId\",t},t.genDefaultParamsDealFn=function(e){var t=Object.assign({},e);return function(e){return Object.assign({},t,e)}},t.forceChangeParamsDealFn=function(e){var t=Object.assign({},e);return function(e){return Object.assign(e,t)}},t.genBoolResultDealFn=function(e){return function(t){var n=Object.assign({},t);return e.forEach(function(e){void 0!==n[e]&&(n[e]=!!n[e])}),n}},t.genBizStoreParamsDealFn=function(e){var t=Object.assign({},e);return\"string\"!=typeof t.params?(t.params=JSON.stringify(t),t):t}},function(e,t,n){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0});var r=n(3),o=n(3);t.ENV_ENUM=o.ENV_ENUM,t.APP_TYPE=o.APP_TYPE,t.ENV_ENUM_SUB=o.ENV_ENUM_SUB;var i,a=n(183);(function(e){e.singlePage=\"singlePage\",e.miniApp=\"miniApp\",e.miniWidget=\"miniWidget\"})(i||(i={})),t.getUA=function(){var e=\"\";try{\"undefined\"!=typeof navigator&&(e=navigator&&(navigator.userAgent||navigator.swuserAgent)||\"\")}catch(t){e=\"\"}return e},t.getENV=function(){var e=t.getUA(),n=/iPhone|iPad|iPod|iOS/i.test(e),o=/Android/i.test(e),s=/Nebula/i.test(e),d=/DingTalk/i.test(e),u=/dd-web/i.test(e),c=\"object\"==typeof nuva,l=\"object\"==typeof dd&&\"function\"==typeof dd.dtBridge,f=l&&n||c&&n,v=d||a.default.isDingTalk,p=n&&v||a.default.isWeexiOS||f,_=o&&v||a.default.isWeexAndroid,E=s&&v||l,N=u,P=r.APP_TYPE.WEB;if(N)P=r.APP_TYPE.WEBVIEW_IN_MINIAPP;else if(E)P=r.APP_TYPE.MINI_APP;else if(a.default.isWeexiOS||a.default.isWeexAndroid)try{var M=weex.config.ddWeexEnv;P=M===i.miniWidget?r.APP_TYPE.WEEX_WIDGET:r.APP_TYPE.WEEX}catch(e){P=r.APP_TYPE.WEEX}var h,m=\"*\",k=e.match(/AliApp\\(\\w+\\/([a-zA-Z0-9.-]+)\\)/);null===k&&(k=e.match(/DingTalk\\/([a-zA-Z0-9.-]+)/));var b;k&&k[1]&&(b=k[1]);var g=\"\";if(\"undefined\"!=typeof name&&(g=name),g)try{var I=JSON.parse(g);I.hostVersion&&(b=I.hostVersion),m=I.language||navigator.language||\"*\",h=I.containerId}catch(e){}var y=!!h;y&&!b&&(k=e.match(/DingTalk\\(([a-zA-Z0-9\\.-]+)\\)/))&&k[1]&&(b=k[1]);var A,S=r.ENV_ENUM_SUB.noSub;if(p)A=r.ENV_ENUM.ios;else if(_)A=r.ENV_ENUM.android;else if(y){var V=e.indexOf(\"Macintosh; Intel Mac OS\")>-1;S=V?r.ENV_ENUM_SUB.mac:r.ENV_ENUM_SUB.win,A=r.ENV_ENUM.pc}else A=r.ENV_ENUM.notInDingTalk;return{platform:A,platformSub:S,version:b,appType:P,language:m}}},function(e,t,n){\"use strict\";function r(e,t){var n=e&&e.vs;return\"object\"==typeof n&&(n=n[t.platformSub]),n}Object.defineProperty(t,\"__esModule\",{value:!0});var o=n(189);t.APP_TYPE=o.APP_TYPE,t.LogLevel=o.LogLevel,t.isFunction=o.isFunction,t.compareVersion=o.compareVersion,t.ENV_ENUM=o.ENV_ENUM,t.ENV_ENUM_SUB=o.ENV_ENUM_SUB;var i=function(){function e(e,t){var n=this;this.configJsApiList=[],this.hadConfig=!1,this.p={},this.config$=new Promise(function(e,t){n.p.reject=t,n.p.resolve=e}),this.logQueue=[],this.devConfig={debug:!1},this.platformConfigMap={},this.invokeAPIConfigMapByMethod={},this.isBridgeDrity=!0,this.getExportSdk=function(){return n.exportSdk},this.setAPI=function(e,t){n.invokeAPIConfigMapByMethod[e]=t},this.setPlatform=function(e){n.isBridgeDrity=!0,n.platformConfigMap[e.platform]=e,e.platform===n.env.platform&&e.bridgeInit().catch(function(e){n.customLog(o.LogLevel.WARNING,[\"auto bridgeInit error\",e||\"\"])})},this.getPlatformConfigMap=function(){return n.platformConfigMap},this.deleteApiConfig=function(e,t){var r=n.invokeAPIConfigMapByMethod[e];r&&delete r[t]},this.invokeAPI=function(e,t,i){void 0===t&&(t={}),void 0===i&&(i=!0),n.customLog(o.LogLevel.INFO,['==> \"'+e+'\" params: ',t]);var a=+new Date,s=a+\"_\"+Math.floor(1e3*Math.random());if(n.devConfig.onBeforeInvokeAPI)try{n.devConfig.onBeforeInvokeAPI({invokeId:s,method:e,params:t,startTime:a})}catch(e){n.customLog(o.LogLevel.ERROR,[\"call Hook:onBeforeInvokeAPI failed, reason:\",e])}return!1===n.devConfig.isAuthApi&&(i=!1),n.bridgeInitFn().then(function(d){var u=n.invokeAPIConfigMapByMethod[e],c=n.devConfig.forceEnableDealApiFnMap&&n.devConfig.forceEnableDealApiFnMap[e]&&!0===n.devConfig.forceEnableDealApiFnMap[e](t),l=!c&&(!0===n.devConfig.isDisableDeal||n.devConfig.disbaleDealApiWhiteList&&-1!==n.devConfig.disbaleDealApiWhiteList.indexOf(e));if(u||!i){var f;if(u&&(f=u[n.env.platform]),f||!i){var v={};v=!l&&f&&f.paramsDeal&&o.isFunction(f.paramsDeal)?f.paramsDeal(t):Object.assign({},t);var p=function(e){return!l&&f&&f.resultDeal&&o.isFunction(f.resultDeal)?f.resultDeal(e):e};if(o.isFunction(v.onSuccess)){var _=v.onSuccess;v.onSuccess=function(e){_(p(e))}}return d(e,v).then(p,function(t){var a=n.hadConfig&&void 0===n.isReady&&-1!==n.configJsApiList.indexOf(e),s=\"object\"==typeof t&&\"string\"==typeof t.errorCode&&t.errorCode===o.ERROR_CODE.no_permission,u=\"object\"==typeof t&&\"string\"==typeof t.errorCode&&t.errorCode===o.ERROR_CODE.cancel,c=r(f,n.env),l=c&&n.env.version&&o.compareVersion(n.env.version,c),_=(n.env.platform===o.ENV_ENUM.ios||n.env.platform===o.ENV_ENUM.android)&&a&&s,E=n.env.platform===o.ENV_ENUM.pc&&a&&(l&&!u&&i||s);return _||E?n.config$.then(function(){return d(e,v).then(p)}):Promise.reject(t)}).then(function(r){if(n.devConfig.onAfterInvokeAPI)try{n.devConfig.onAfterInvokeAPI({invokeId:s,method:e,params:t,payload:r,isSuccess:!0,startTime:a,duration:+new Date-a})}catch(e){n.customLog(o.LogLevel.ERROR,[\"call Hook:onAfterInvokeAPI failed, reason:\",e])}return n.customLog(o.LogLevel.INFO,['<== \"'+e+'\" success result: ',r]),r},function(r){if(n.devConfig.onAfterInvokeAPI)try{n.devConfig.onAfterInvokeAPI({invokeId:s,method:e,params:t,payload:r,startTime:a,duration:+new Date-a,isSuccess:!1})}catch(r){n.customLog(o.LogLevel.ERROR,[\"call Hook:onAfterInvokeAPI failed, reason:\",r])}return n.customLog(o.LogLevel.WARNING,['<== \"'+e+'\" fail result: ',r]),Promise.reject(r)})}var E='\"'+e+'\" do not support the current platform ('+n.env.platform+\")\";return n.customLog(o.LogLevel.ERROR,[E]),Promise.reject({errorCode:o.ERROR_CODE.jsapi_internal_error,errorMessage:E})}var E=\"This API method is not configured for the platform (\"+n.env.platform+\")\";return n.customLog(o.LogLevel.ERROR,[E]),Promise.reject({errorCode:o.ERROR_CODE.jsapi_internal_error,errorMessage:E})})},this.customLog=function(e,t){var r={level:e,text:t,time:new Date};if(!0===n.devConfig.debug)n.customLogInstance(r);else{n.logQueue.push(r);n.logQueue.length>10&&(n.logQueue=n.logQueue.slice(n.logQueue.length-10))}},this.clearLogQueue=function(){n.logQueue.forEach(function(e){n.customLogInstance(e)}),n.logQueue=[]},this.customLogInstance=t,this.env=e,this.bridgeInitFn=function(){if(n.bridgeInitFnPromise&&!n.isBridgeDrity)return n.bridgeInitFnPromise;n.isBridgeDrity=!1;var t=n.platformConfigMap[e.platform];if(t)n.bridgeInitFnPromise=t.bridgeInit().catch(function(e){return n.customLog(o.LogLevel.ERROR,[\"\\b\\b\\b\\b\\bJsBridge initialization fails, jsapi will not work\"]),Promise.reject(e)});else{var r=\"Do not support the current environmentï¼š\"+e.platform;n.customLog(o.LogLevel.WARNING,[r]),n.bridgeInitFnPromise=Promise.reject(new Error(r))}return n.bridgeInitFnPromise};var i=function(e){void 0===e&&(e={}),n.devConfig=Object.assign(n.devConfig,e),!0===e.debug&&n.clearLogQueue(),e.extraPlatform&&n.setPlatform(e.extraPlatform)};this.exportSdk={config:function(t){void 0===t&&(t={});var r=!0;Object.keys(t).forEach(function(e){-1===[\"debug\",\"usePromise\"].indexOf(e)&&(r=!1)}),r?(n.customLog(o.LogLevel.WARNING,[\"This is a deprecated feature, recommend use dd.devConfig\"]),i(t)):n.hadConfig?n.customLog(o.LogLevel.WARNING,[\"Config has been executed\"]):(t.jsApiList&&(n.configJsApiList=t.jsApiList),n.hadConfig=!0,n.bridgeInitFn().then(function(r){var o=n.platformConfigMap[e.platform],i=t;o.authParamsDeal&&(i=o.authParamsDeal(i)),r(o.authMethod,i).then(function(e){n.isReady=!0,n.p.resolve(e)}).catch(function(e){n.isReady=!1,n.p.reject(e)})},function(){n.customLog(o.LogLevel.ERROR,['\\b\\b\\b\\b\\bJsBridge initialization failed and \"dd.config\" failed to call'])}))},devConfig:i,ready:function(e){!1===n.hadConfig?(n.customLog(o.LogLevel.WARNING,[\"You don 't use a dd.config, so you don't need to wrap dd.ready, recommend remove dd.ready\"]),n.bridgeInitFn().then(function(){e()})):n.config$.then(function(t){e()})},error:function(e){n.config$.catch(function(t){e(t)})},on:function(t,r){n.bridgeInitFn().then(function(){n.platformConfigMap[e.platform].event.on(t,r)})},off:function(t,r){n.bridgeInitFn().then(function(){n.platformConfigMap[e.platform].event.off(t,r)})},env:e,checkJsApi:function(t){void 0===t&&(t={});var i={};return t.jsApiList&&t.jsApiList.forEach(function(t){var a=n.invokeAPIConfigMapByMethod[t];if(a){var s=a[e.platform],d=r(s,e);d&&e.version&&o.compareVersion(e.version,d)&&(i[t]=!0)}i[t]||(i[t]=!1)}),Promise.resolve(i)},_invoke:function(e,t){return void 0===t&&(t={}),n.invokeAPI(e,t,!1)}}}return e}();t.Sdk=i},function(e,t,n){(function(t,n){e.exports=n()})(0,function(){return function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var n={};return t.m=e,t.c=n,t.i=function(e){return e},t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,\"a\",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p=\"\",t(t.s=579)}({179:function(e,t,n){\"use strict\";var r=n(181);e.exports=r},181:function(e,t,n){\"use strict\";var r=n(183),o=n(184),i=n(182),a=n(185),s=new i,d=!1,u=\"\",c=null,l={},f=/{.*}/;try{var v=window.name.match(f);if(v&&v[0])var l=JSON.parse(v[0])}catch(e){l={}}l.hostOrigin&&\".dingtalk.com\"===l.hostOrigin.split(\":\")[1].slice(0-\".dingtalk.com\".length)&&l.containerId&&(d=!0,u=l.hostOrigin,c=l.containerId);var p={},_=new Promise(function(e,t){p._resolve=e,p._reject=t}),E={},N=null;window.top!==window&&(N=window.top,p._resolve()),E[a.SYS_INIT]=function(e){N=e.frameWindow,p._resolve(),e.respond({})},window.addEventListener(\"message\",function(e){var t=e.data,n=e.origin;if(n===u)if(\"response\"===t.type&&t.msgId){var r=t.msgId,i=s.getMsyById(r);i&&i.receiveResponse(t.body,!t.success)}else if(\"event\"===t.type&&t.msgId){var r=t.msgId,i=s.getMsyById(r);i&&i.receiveEvent(t.eventName,t.body)}else if(\"request\"===t.type&&t.msgId){var i=new o(e.source,n,t);E[i.methodName]&&E[i.methodName](i)}}),t.invokeAPI=function(e,t){var n=new r(c,e,t);return d&&_.then(function(){N&&N.postMessage(n.getPayload(),u),s.addPending(n)}),n};var P=null;t.addEventListener=function(e,n){P||(P=t.invokeAPI(a.SYS_EVENT,{})),P.addEventListener(e,n)},t.removeEventListener=function(e,t){P&&P.removeEventListener(e,t)}},182:function(e,t,n){\"use strict\";var r=function(){this.pendingMsgs={}};r.prototype.addPending=function(e){this.pendingMsgs[e.id]=e;var t=function(){delete this.pendingMsgs[e.id],e.removeEventListener(\"_finish\",t)}.bind(this);e.addEventListener(\"_finish\",t)},r.prototype.getMsyById=function(e){return this.pendingMsgs[e]},e.exports=r},183:function(e,t,n){\"use strict\";var r=n(574),o=n(573),i=0,a=Math.floor(1e3*Math.random()),s=function(){return 1e3*(1e3*a+Math.floor(1e3*Math.random()))+ ++i%1e3},d={code:408,reason:\"timeout\"},u={TIMEOUT:\"_timeout\",FINISH:\"_finish\"},c={timeout:-1},l=function(e,t,n,r){this.id=s(),this.methodName=t,this.containerId=e,this.option=o({},c,r);var n=n||{};this._p={},this.result=new Promise(function(e,t){this._p._resolve=e,this._p._reject=t}.bind(this)),this.callbacks={},this.plainMsg=this._handleMsg(n),this._eventsHandle={},this._timeoutTimer=null,this._initTimeout(),this.isFinish=!1};l.prototype._initTimeout=function(){this._clearTimeout(),this.option.timeout>0&&(this._timeoutTimer=setTimeout(function(){this.receiveEvent(u.TIMEOUT),this.receiveResponse(d,!0)}.bind(this),this.option.timeout))},l.prototype._clearTimeout=function(){clearTimeout(this._timeoutTimer)},l.prototype._handleMsg=function(e){var t={};return Object.keys(e).forEach(function(n){var o=e[n];\"function\"==typeof o&&\"on\"===n.slice(0,2)?this.callbacks[n]=o:t[n]=r(o)}.bind(this)),t},l.prototype.getPayload=function(){return{msgId:this.id,containerId:this.containerId,methodName:this.methodName,body:this.plainMsg,type:\"request\"}},l.prototype.receiveEvent=function(e,t){if(this.isFinish&&e!==u.FINISH)return!1;e!==u.FINISH&&e!==u.TIMEOUT&&this._initTimeout(),Array.isArray(this._eventsHandle[e])&&this._eventsHandle[e].forEach(function(e){try{e(t)}catch(e){console.error(t)}});var n=\"on\"+e.charAt(0).toUpperCase()+e.slice(1);return this.callbacks[n]&&this.callbacks[n](t),!0},l.prototype.addEventListener=function(e,t){if(!e||\"function\"!=typeof t)throw\"eventName is null or handle is not a function, addEventListener fail\";Array.isArray(this._eventsHandle[e])||(this._eventsHandle[e]=[]),this._eventsHandle[e].push(t)},l.prototype.removeEventListener=function(e,t){if(!e||!t)throw\"eventName is null or handle is null, invoke removeEventListener fail\";if(Array.isArray(this._eventsHandle[e])){var n=this._eventsHandle[e].indexOf(t);-1!==n&&this._eventsHandle[e].splice(n,1)}},l.prototype.receiveResponse=function(e,t){if(!0===this.isFinish)return!1;this._clearTimeout();var t=!!t;return t?this._p._reject(e):this._p._resolve(e),setTimeout(function(){this.receiveEvent(u.FINISH)}.bind(this),0),this.isFinish=!0,!0},e.exports=l},184:function(e,t,n){\"use strict\";var r=function(e,t,n){if(this._msgId=n.msgId,this.frameWindow=e,this.methodName=n.methodName,this.clientOrigin=t,this.containerId=n.containerId,this.params=n.body,!this._msgId)throw\"msgId not exist\";if(!this.frameWindow)throw\"frameWindow not exist\";if(!this.methodName)throw\"methodName not exits\";if(!this.clientOrigin)throw\"clientOrigin not exist\";this.hasResponded=!1};r.prototype.respond=function(e,t){var t=!!t;if(!0!==this.hasResponded){var n={type:\"response\",success:!t,body:e,msgId:this._msgId};this.frameWindow.postMessage(n,this.clientOrigin),this.hasResponded=!0}},r.prototype.emit=function(e,t){var n={type:\"event\",eventName:e,body:t,msgId:this._msgId};this.frameWindow.postMessage(n,this.clientOrigin)},e.exports=r},185:function(e,t,n){\"use strict\";e.exports={SYS_EVENT:\"SYS_openAPIContainerInitEvent\",SYS_INIT:\"SYS_openAPIContainerInit\"}},4:function(e,t){var n;n=function(){return this}();try{n=n||Function(\"return this\")()||(0,eval)(\"this\")}catch(e){\"object\"==typeof window&&(n=window)}e.exports=n},572:function(e,t,n){(function(e,n){function r(e,t){return e.set(t[0],t[1]),e}function o(e,t){return e.add(t),e}function i(e,t){for(var n=-1,r=e.length;++n<r&&!1!==t(e[n],n,e););return e}function a(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}function s(e,t,n,r){var o=-1,i=e.length;for(r&&i&&(n=e[++o]);++o<i;)n=t(n,e[o],o,e);return n}function d(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}function u(e){return e&&e.Object===Object?e:null}function c(e){var t=!1;if(null!=e&&\"function\"!=typeof e.toString)try{t=!!(e+\"\")}catch(e){}return t}function l(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}function f(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}function v(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function p(){this.__data__=$t?$t(null):{}}function _(e){return this.has(e)&&delete this.__data__[e]}function E(e){var t=this.__data__;if($t){var n=t[e];return n===Se?void 0:n}return Et.call(t,e)?t[e]:void 0}function N(e){var t=this.__data__;return $t?void 0!==t[e]:Et.call(t,e)}function P(e,t){return this.__data__[e]=$t&&void 0===t?Se:t,this}function M(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function h(){this.__data__=[]}function m(e){var t=this.__data__,n=W(t,e);return!(n<0||(n==t.length-1?t.pop():It.call(t,n,1),0))}function k(e){var t=this.__data__,n=W(t,e);return n<0?void 0:t[n][1]}function b(e){return W(this.__data__,e)>-1}function g(e,t){var n=this.__data__,r=W(n,e);return r<0?n.push([e,t]):n[r][1]=t,this}function I(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function y(){this.__data__={hash:new v,map:new(Vt||M),string:new v}}function A(e){return re(this,e).delete(e)}function S(e){return re(this,e).get(e)}function V(e){return re(this,e).has(e)}function U(e,t){return re(this,e).set(e,t),this}function O(e){this.__data__=new M(e)}function j(){this.__data__=new M}function $(e){return this.__data__.delete(e)}function w(e){return this.__data__.get(e)}function D(e){return this.__data__.has(e)}function C(e,t){var n=this.__data__;return n instanceof M&&n.__data__.length==Ae&&(n=this.__data__=new I(n.__data__)),n.set(e,t),this}function T(e,t,n){var r=e[t];Et.call(e,t)&&Ee(r,n)&&(void 0!==n||t in e)||(e[t]=n)}function W(e,t){for(var n=e.length;n--;)if(Ee(e[n][0],t))return n;return-1}function R(e,t){return e&&ee(t,ye(t),e)}function x(e,t,n,r,o,a,s){var d;if(r&&(d=a?r(e,o,a,s):r(e)),void 0!==d)return d;if(!ke(e))return e;var u=Lt(e);if(u){if(d=de(e),!t)return Z(e,d)}else{var l=se(e),f=l==$e||l==we;if(Bt(e))return q(e,t);if(l==Te||l==Ue||f&&!a){if(c(e))return a?e:{};if(d=ue(f?{}:e),!t)return te(e,R(d,e))}else{if(!rt[l])return a?e:{};d=ce(e,l,x,t)}}s||(s=new O);var v=s.get(e);if(v)return v;if(s.set(e,d),!u)var p=n?ne(e):ye(e);return i(p||e,function(o,i){p&&(i=o,o=e[i]),T(d,i,x(o,t,n,r,i,e,s))}),d}function F(e){return ke(e)?bt(e):{}}function L(e,t,n){var r=t(e);return Lt(e)?r:a(r,n(e))}function B(e,t){return Et.call(e,t)||\"object\"==typeof e&&t in e&&null===ie(e)}function z(e){return At(Object(e))}function q(e,t){if(t)return e.slice();var n=new e.constructor(e.length);return e.copy(n),n}function Y(e){var t=new e.constructor(e.byteLength);return new mt(t).set(new mt(e)),t}function J(e,t){var n=t?Y(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}function G(e,t,n){return s(t?n(l(e),!0):l(e),r,new e.constructor)}function H(e){var t=new e.constructor(e.source,et.exec(e));return t.lastIndex=e.lastIndex,t}function X(e,t,n){return s(t?n(f(e),!0):f(e),o,new e.constructor)}function K(e){return xt?Object(xt.call(e)):{}}function Q(e,t){var n=t?Y(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function Z(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}function ee(e,t,n,r){n||(n={});for(var o=-1,i=t.length;++o<i;){var a=t[o];T(n,a,r?r(n[a],e[a],a,n,e):e[a])}return n}function te(e,t){return ee(e,ae(e),t)}function ne(e){return L(e,ye,ae)}function re(e,t){var n=e.__data__;return ve(t)?n[\"string\"==typeof t?\"string\":\"hash\"]:n.map}function oe(e,t){var n=e[t];return ge(n)?n:void 0}function ie(e){return yt(Object(e))}function ae(e){return kt(Object(e))}function se(e){return Nt.call(e)}function de(e){var t=e.length,n=e.constructor(t);return t&&\"string\"==typeof e[0]&&Et.call(e,\"index\")&&(n.index=e.index,n.input=e.input),n}function ue(e){return\"function\"!=typeof e.constructor||pe(e)?{}:F(ie(e))}function ce(e,t,n,r){var o=e.constructor;switch(t){case Le:return Y(e);case Oe:case je:return new o(+e);case Be:return J(e,r);case ze:case qe:case Ye:case Je:case Ge:case He:case Xe:case Ke:case Qe:return Q(e,r);case De:return G(e,r,n);case Ce:case xe:return new o(e);case We:return H(e);case Re:return X(e,r,n);case Fe:return K(e)}}function le(e){var t=e?e.length:void 0;return me(t)&&(Lt(e)||Ie(e)||Ne(e))?d(t,String):null}function fe(e,t){return!!(t=null==t?Ve:t)&&(\"number\"==typeof e||nt.test(e))&&e>-1&&e%1==0&&e<t}function ve(e){var t=typeof e;return\"string\"==t||\"number\"==t||\"symbol\"==t||\"boolean\"==t?\"__proto__\"!==e:null===e}function pe(e){var t=e&&e.constructor;return e===(\"function\"==typeof t&&t.prototype||pt)}function _e(e){if(null!=e){try{return _t.call(e)}catch(e){}try{return e+\"\"}catch(e){}}return\"\"}function Ee(e,t){return e===t||e!==e&&t!==t}function Ne(e){return Me(e)&&Et.call(e,\"callee\")&&(!gt.call(e,\"callee\")||Nt.call(e)==Ue)}function Pe(e){return null!=e&&me(Ft(e))&&!he(e)}function Me(e){return be(e)&&Pe(e)}function he(e){var t=ke(e)?Nt.call(e):\"\";return t==$e||t==we}function me(e){return\"number\"==typeof e&&e>-1&&e%1==0&&e<=Ve}function ke(e){var t=typeof e;return!!e&&(\"object\"==t||\"function\"==t)}function be(e){return!!e&&\"object\"==typeof e}function ge(e){return!!ke(e)&&(he(e)||c(e)?Pt:tt).test(_e(e))}function Ie(e){return\"string\"==typeof e||!Lt(e)&&be(e)&&Nt.call(e)==xe}function ye(e){var t=pe(e);if(!t&&!Pe(e))return z(e);var n=le(e),r=!!n,o=n||[],i=o.length;for(var a in e)!B(e,a)||r&&(\"length\"==a||fe(a,i))||t&&\"constructor\"==a||o.push(a);return o}var Ae=200,Se=\"__lodash_hash_undefined__\",Ve=9007199254740991,Ue=\"[object Arguments]\",Oe=\"[object Boolean]\",je=\"[object Date]\",$e=\"[object Function]\",we=\"[object GeneratorFunction]\",De=\"[object Map]\",Ce=\"[object Number]\",Te=\"[object Object]\",We=\"[object RegExp]\",Re=\"[object Set]\",xe=\"[object String]\",Fe=\"[object Symbol]\",Le=\"[object ArrayBuffer]\",Be=\"[object DataView]\",ze=\"[object Float32Array]\",qe=\"[object Float64Array]\",Ye=\"[object Int8Array]\",Je=\"[object Int16Array]\",Ge=\"[object Int32Array]\",He=\"[object Uint8Array]\",Xe=\"[object Uint8ClampedArray]\",Ke=\"[object Uint16Array]\",Qe=\"[object Uint32Array]\",Ze=/[\\\\^$.*+?()[\\]{}|]/g,et=/\\w*$/,tt=/^\\[object .+?Constructor\\]$/,nt=/^(?:0|[1-9]\\d*)$/,rt={};rt[Ue]=rt[\"[object Array]\"]=rt[Le]=rt[Be]=rt[Oe]=rt[je]=rt[ze]=rt[qe]=rt[Ye]=rt[Je]=rt[Ge]=rt[De]=rt[Ce]=rt[Te]=rt[We]=rt[Re]=rt[xe]=rt[Fe]=rt[He]=rt[Xe]=rt[Ke]=rt[Qe]=!0,rt[\"[object Error]\"]=rt[$e]=rt[\"[object WeakMap]\"]=!1;var ot={function:!0,object:!0},it=ot[typeof t]&&t&&!t.nodeType?t:void 0,at=ot[typeof e]&&e&&!e.nodeType?e:void 0,st=at&&at.exports===it?it:void 0,dt=u(it&&at&&\"object\"==typeof n&&n),ut=u(ot[typeof self]&&self),ct=u(ot[typeof window]&&window),lt=u(ot[typeof this]&&this),ft=dt||ct!==(lt&&lt.window)&&ct||ut||lt||Function(\"return this\")(),vt=Array.prototype,pt=Object.prototype,_t=Function.prototype.toString,Et=pt.hasOwnProperty,Nt=pt.toString,Pt=RegExp(\"^\"+_t.call(Et).replace(Ze,\"\\\\$&\").replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g,\"$1.*?\")+\"$\"),Mt=st?ft.Buffer:void 0,ht=ft.Symbol,mt=ft.Uint8Array,kt=Object.getOwnPropertySymbols,bt=Object.create,gt=pt.propertyIsEnumerable,It=vt.splice,yt=Object.getPrototypeOf,At=Object.keys,St=oe(ft,\"DataView\"),Vt=oe(ft,\"Map\"),Ut=oe(ft,\"Promise\"),Ot=oe(ft,\"Set\"),jt=oe(ft,\"WeakMap\"),$t=oe(Object,\"create\"),wt=_e(St),Dt=_e(Vt),Ct=_e(Ut),Tt=_e(Ot),Wt=_e(jt),Rt=ht?ht.prototype:void 0,xt=Rt?Rt.valueOf:void 0;v.prototype.clear=p,v.prototype.delete=_,v.prototype.get=E,v.prototype.has=N,v.prototype.set=P,M.prototype.clear=h,M.prototype.delete=m,M.prototype.get=k,M.prototype.has=b,M.prototype.set=g,I.prototype.clear=y,I.prototype.delete=A,I.prototype.get=S,I.prototype.has=V,I.prototype.set=U,O.prototype.clear=j,O.prototype.delete=$,O.prototype.get=w,O.prototype.has=D,O.prototype.set=C;var Ft=function(e){return function(e){return null==e?void 0:e.length}}();kt||(ae=function(){return[]}),(St&&se(new St(new ArrayBuffer(1)))!=Be||Vt&&se(new Vt)!=De||Ut&&\"[object Promise]\"!=se(Ut.resolve())||Ot&&se(new Ot)!=Re||jt&&\"[object WeakMap]\"!=se(new jt))&&(se=function(e){var t=Nt.call(e),n=t==Te?e.constructor:void 0,r=n?_e(n):void 0;if(r)switch(r){case wt:return Be;case Dt:return De;case Ct:return\"[object Promise]\";case Tt:return Re;case Wt:return\"[object WeakMap]\"}return t});var Lt=Array.isArray,Bt=Mt?function(e){return e instanceof Mt}:function(e){return function(){return!1}}();e.exports=x}).call(t,n(577)(e),n(4))},573:function(e,t,n){function r(e,t,n){var r=e[t];h.call(e,t)&&d(r,n)&&(void 0!==n||t in e)||(e[t]=n)}function o(e,t,n,o){n||(n={});for(var i=-1,a=t.length;++i<a;){var s=t[i];r(n,s,o?o(n[s],e[s],s,n,e):e[s])}return n}function i(e,t){return!!(t=null==t?_:t)&&(\"number\"==typeof e||P.test(e))&&e>-1&&e%1==0&&e<t}function a(e,t,n){if(!f(n))return!1;var r=typeof t;return!!(\"number\"==r?u(n)&&i(t,n.length):\"string\"==r&&t in n)&&d(n[t],e)}function s(e){var t=e&&e.constructor;return e===(\"function\"==typeof t&&t.prototype||M)}function d(e,t){return e===t||e!==e&&t!==t}function u(e){return null!=e&&l(g(e))&&!c(e)}function c(e){var t=f(e)?m.call(e):\"\";return t==E||t==N}function l(e){return\"number\"==typeof e&&e>-1&&e%1==0&&e<=_}function f(e){var t=typeof e;return!!e&&(\"object\"==t||\"function\"==t)}var v=n(575),p=n(576),_=9007199254740991,E=\"[object Function]\",N=\"[object GeneratorFunction]\",P=/^(?:0|[1-9]\\d*)$/,M=Object.prototype,h=M.hasOwnProperty,m=M.toString,k=M.propertyIsEnumerable,b=!k.call({valueOf:1},\"valueOf\"),g=function(e){return function(e){return null==e?void 0:e.length}}(),I=function(e){return p(function(t,n){var r=-1,o=n.length,i=o>1?n[o-1]:void 0,s=o>2?n[2]:void 0;for(i=e.length>3&&\"function\"==typeof i?(o--,i):void 0,s&&a(n[0],n[1],s)&&(i=o<3?void 0:i,o=1),t=Object(t);++r<o;){var d=n[r];d&&e(t,d)}return t})}(function(e,t){if(b||s(t)||u(t))return void o(t,v(t),e);for(var n in t)h.call(t,n)&&r(e,n,t[n])});e.exports=I},574:function(e,t,n){function r(e){return o(e,!0,!0)}var o=n(572);e.exports=r},575:function(e,t){function n(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}function r(e,t){var r=I(e)||s(e)?n(e.length,String):[],o=r.length,a=!!o;for(var d in e)!t&&!m.call(e,d)||a&&(\"length\"==d||i(d,o))||r.push(d);return r}function o(e){if(!a(e))return g(e);var t=[];for(var n in Object(e))m.call(e,n)&&\"constructor\"!=n&&t.push(n);return t}function i(e,t){return!!(t=null==t?_:t)&&(\"number\"==typeof e||M.test(e))&&e>-1&&e%1==0&&e<t}function a(e){var t=e&&e.constructor;return e===(\"function\"==typeof t&&t.prototype||h)}function s(e){return u(e)&&m.call(e,\"callee\")&&(!b.call(e,\"callee\")||k.call(e)==E)}function d(e){return null!=e&&l(e.length)&&!c(e)}function u(e){return v(e)&&d(e)}function c(e){var t=f(e)?k.call(e):\"\";return t==N||t==P}function l(e){return\"number\"==typeof e&&e>-1&&e%1==0&&e<=_}function f(e){var t=typeof e;return!!e&&(\"object\"==t||\"function\"==t)}function v(e){return!!e&&\"object\"==typeof e}function p(e){return d(e)?r(e):o(e)}var _=9007199254740991,E=\"[object Arguments]\",N=\"[object Function]\",P=\"[object GeneratorFunction]\",M=/^(?:0|[1-9]\\d*)$/,h=Object.prototype,m=h.hasOwnProperty,k=h.toString,b=h.propertyIsEnumerable,g=function(e,t){return function(n){return e(t(n))}}(Object.keys,Object),I=Array.isArray;e.exports=p},576:function(e,t){function n(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 r(e,t){return t=b(void 0===t?e.length-1:t,0),function(){for(var r=arguments,o=-1,i=b(r.length-t,0),a=Array(i);++o<i;)a[o]=r[t+o];o=-1;for(var s=Array(t+1);++o<t;)s[o]=r[o];return s[t]=a,n(e,this,s)}}function o(e,t){if(\"function\"!=typeof e)throw new TypeError(l);return t=void 0===t?t:u(t),r(e,t)}function i(e){var t=typeof e;return!!e&&(\"object\"==t||\"function\"==t)}function a(e){return!!e&&\"object\"==typeof e}function s(e){return\"symbol\"==typeof e||a(e)&&k.call(e)==_}function d(e){return e?(e=c(e))===f||e===-f?(e<0?-1:1)*v:e===e?e:0:0===e?e:0}function u(e){var t=d(e),n=t%1;return t===t?n?t-n:t:0}function c(e){if(\"number\"==typeof e)return e;if(s(e))return p;if(i(e)){var t=\"function\"==typeof e.valueOf?e.valueOf():e;e=i(t)?t+\"\":t}if(\"string\"!=typeof e)return 0===e?e:+e;e=e.replace(E,\"\");var n=P.test(e);return n||M.test(e)?h(e.slice(2),n?2:8):N.test(e)?p:+e}var l=\"Expected a function\",f=1/0,v=1.7976931348623157e308,p=NaN,_=\"[object Symbol]\",E=/^\\s+|\\s+$/g,N=/^[-+]0x[0-9a-f]+$/i,P=/^0b[01]+$/i,M=/^0o[0-7]+$/i,h=parseInt,m=Object.prototype,k=m.toString,b=Math.max;e.exports=o},577: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}},579:function(e,t,n){e.exports=n(179)}})})},function(e,t,n){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0});var r=function(e,t){return new Promise(function(n,r){dd.dtBridge({m:e,args:t,onSuccess:function(e){\"function\"==typeof t.onSuccess&&t.onSuccess(e),n(e)},onFail:function(e){\"function\"==typeof t.onFail&&t.onFail(e),r(e)}})})};t.default=r},function(e,t,n){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0});t.requireModule=function(e){return\"undefined\"!=typeof __weex_require__?__weex_require__(\"@weex-module/\"+e):\"undefined\"!=typeof weex?weex.requireModule(e):void 0},t.iosWeexBridge=function(){return Promise.resolve(function(e,n){return new Promise(function(r,o){var i=t.requireModule(\"nuvajs-exec\"),a=e.split(\".\"),s=a.pop(),d=a.join(\".\");i.exec({plugin:d,action:s,args:n},function(e){e&&\"0\"===e.errorCode?(\"function\"==typeof n.onSuccess&&n.onSuccess(e.result),r(e.result)):(\"function\"==typeof n.onFail&&n.onFail(e.result),o(e.result))})})})},t.androidWeexBridge=function(){return Promise.resolve(function(e,n){return new Promise(function(r,o){var i=t.requireModule(\"nuvajs-exec\"),a=e.split(\".\"),s=a.pop(),d=a.join(\".\");i.exec({plugin:d,action:s,args:n},function(e){var t={};try{if(e&&e.__message__)if(\"object\"==typeof e.__message__)t=e.__message__;else try{t=JSON.parse(e.__message__)}catch(n){\"string\"==typeof e.__message__&&(t=e.__message__)}}catch(e){}e&&1===parseInt(e.__status__+\"\",10)?(\"function\"==typeof n.onSuccess&&n.onSuccess(t),r(t)):(\"function\"==typeof n.onFail&&n.onFail(t),o(t))})})})}},function(e,t){var n;n=function(){return this}();try{n=n||Function(\"return this\")()||(0,eval)(\"this\")}catch(e){\"object\"==typeof window&&(n=window)}e.exports=n},function(e,t,n){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.on=function(e,t){document.addEventListener(e,t)},t.off=function(e,t){document.removeEventListener(e,t)}},function(e,t,n){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0});var r=function(){},o=function(e,t){return new Promise(function(n,o){var i=t.onSuccess||r,a=t.onFail||r;if(delete t.onSuccess,delete t.onFail,AlipayJSBridge){var s=e.split(\".\"),d=s.pop()||\"\",u=s.join(\".\");AlipayJSBridge.call.apply(null,[\"webDdExec\",{serviceName:u,actionName:d,args:t},function(e){var t={},r=e.content;if(r)try{t=JSON.parse(r)}catch(e){console.error(\"parse dt api result error\",r,e)}e.success?(i.apply(null,[t]),n(t)):(a.apply(null,[t]),o(t))}])}else{var c=new Error(\"Fatal error, cannot find bridge ,current env is WebView in MiniApp\");a(c),o(c)}})};t.default=o},function(e,t,n){\"use strict\";var r=this;Object.defineProperty(t,\"__esModule\",{value:!0});var o=n(6);t.on=function(e,t){o.requireModule(\"globalEvent\").addEventListener(e,function(e){var n={preventDefault:function(){throw new Error(\"does not support preventDefault\")},detail:e};t.call(r,n)})},t.off=function(e,t){o.requireModule(\"globalEvent\").removeEventListener(e,t)}},function(e,t,n){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.RUNTIME={WEB:\"Web\",WEEX:\"Weex\",UNKNOWN:\"Unknown\"},t.PLATFORM={MAC:\"Mac\",WINDOWS:\"Windows\",IOS:\"iOS\",ANDROID:\"Android\",IPAD:\"iPad\",BROWSER:\"Browser\",UNKNOWN:\"Unknown\"},t.FRAMEWORK={VUE:\"Vue\",RAX:\"Rax\",UNKNOWN:\"Unknown\"}},function(e,t,n){\"use strict\";function r(e){return i.ddSdk.invokeAPI(a,e)}var o;Object.defineProperty(t,\"__esModule\",{value:!0});var i=n(0),a=\"biz.ATMBle.beaconPicker\";i.ddSdk.setAPI(a,(o={},o[i.ENV_ENUM.ios]={vs:\"5.0.7\"},o[i.ENV_ENUM.android]={vs:\"5.0.7\"},o)),t.beaconPicker$=r,t.default=r},function(e,t,n){\"use strict\";function r(e){return i.ddSdk.invokeAPI(a,e)}var o;Object.defineProperty(t,\"__esModule\",{value:!0});var i=n(0),a=\"biz.ATMBle.faceManager\";i.ddSdk.setAPI(a,(o={},o[i.ENV_ENUM.ios]={vs:\"5.0.7\"},o[i.ENV_ENUM.android]={vs:\"5.0.7\"},o)),t.faceManager$=r,t.default=r},function(e,t,n){\"use strict\";function r(e){return i.ddSdk.invokeAPI(a,e)}var o;Object.defineProperty(t,\"__esModule\",{value:!0});var i=n(0),a=\"biz.ATMBle.punchModePicker\";i.ddSdk.setAPI(a,(o={},o[i.ENV_ENUM.ios]={vs:\"5.0.7\"},o[i.ENV_ENUM.android]={vs:\"5.0.7\"},o)),t.punchModePicker$=r,t.default=r},function(e,t,n){\"use strict\";function r(e){return i.ddSdk.invokeAPI(a,e)}var o;Object.defineProperty(t,\"__esModule\",{value:!0});var i=n(0),a=\"biz.alipay.pay\";i.ddSdk.setAPI(a,(o={},o[i.ENV_ENUM.ios]={vs:\"2.8.0\"},o[i.ENV_ENUM.android]={vs:\"2.8.0\"},o)),t.pay$=r,t.default=r},function(e,t,n){\"use strict\";function r(e){return i.ddSdk.invokeAPI(s,e)}var o;Object.defineProperty(t,\"__esModule\",{value:!0});var i=n(0),a=n(1),s=\"biz.calendar.chooseDateTime\";i.ddSdk.setAPI(s,(o={},o[i.ENV_ENUM.ios]={vs:\"3.5.0\",paramsDeal:a.addDefaultCorpIdParamsDeal},o[i.ENV_ENUM.android]={vs:\"3.5.0\",paramsDeal:a.addDefaultCorpIdParamsDeal},o)),t.chooseDateTime$=r,t.default=r},function(e,t,n){\"use strict\";function r(e){return i.ddSdk.invokeAPI(s,e)}var o;Object.defineProperty(t,\"__esModule\",{value:!0});var i=n(0),a=n(1),s=\"biz.calendar.chooseHalfDay\";i.ddSdk.setAPI(s,(o={},o[i.ENV_ENUM.ios]={vs:\"3.5.0\",paramsDeal:a.addDefaultCorpIdParamsDeal},o[i.ENV_ENUM.android]={vs:\"3.5.0\",paramsDeal:a.addDefaultCorpIdParamsDeal},o)),t.chooseHalfDay$=r,t.default=r},function(e,t,n){\"use strict\";function r(e){return i.ddSdk.invokeAPI(s,e)}var o;Object.defineProperty(t,\"__esModule\",{value:!0});var i=n(0),a=n(1),s=\"biz.calendar.chooseInterval\";i.ddSdk.setAPI(s,(o={},o[i.ENV_ENUM.ios]={vs:\"3.5.0\",paramsDeal:a.addDefaultCorpIdParamsDeal},o[i.ENV_ENUM.android]={vs:\"3.5.0\",paramsDeal:a.addDefaultCorpIdParamsDeal},o)),t.chooseInterval$=r,t.default=r},function(e,t,n){\"use strict\";function r(e){return i.ddSdk.invokeAPI(s,e)}var o;Object.defineProperty(t,\"__esModule\",{value:!0});var i=n(0),a=n(1),s=\"biz.calendar.chooseOneDay\";i.ddSdk.setAPI(s,(o={},o[i.ENV_ENUM.ios]={vs:\"3.5.0\",paramsDeal:a.addDefaultCorpIdParamsDeal},o[i.ENV_ENUM.android]={vs:\"3.5.0\",paramsDeal:a.addDefaultCorpIdParamsDeal},o)),t.chooseOneDay$=r,t.default=r},function(e,t,n){\"use strict\";function r(e){return i.ddSdk.invokeAPI(s,e)}var o;Object.defineProperty(t,\"__esModule\",{value:!0});var i=n(0),a=n(1),s=\"biz.chat.chooseConversationByCorpId\",d=a.genDefaultParamsDealFn({max:50});i.ddSdk.setAPI(s,(o={},o[i.ENV_ENUM.ios]={vs:\"2.6.0\",paramsDeal:d},o[i.ENV_ENUM.android]={vs:\"2.6.0\",paramsDeal:d},o[i.ENV_ENUM.pc]={vs:\"4.7.11\",paramsDeal:d},o)),t.chooseConversationByCorpId$=r,t.default=r},function(e,t,n){\"use strict\";function r(e){return i.ddSdk.invokeAPI(a,e)}var o;Object.defineProperty(t,\"__esModule\",{value:!0});var i=n(0),a=\"biz.chat.collectSticker\";i.ddSdk.setAPI(a,(o={},o[i.ENV_ENUM.ios]={vs:\"4.6.25\"},o[i.ENV_ENUM.android]={vs:\"4.6.25\"},o)),t.collectSticker$=r,t.default=r},function(e,t,n){\"use strict\";function r(e){return i.ddSdk.invokeAPI(a,e)}var o;Object.defineProperty(t,\"__esModule\",{value:!0});var i=n(0),a=\"biz.chat.createSceneGroup\";i.ddSdk.setAPI(a,(o={},o[i.ENV_ENUM.ios]={vs:\"4.7.17\"},o[i.ENV_ENUM.android]={vs:\"4.7.17\"},o[i.ENV_ENUM.pc]={vs:\"4.7.17\"},o)),t.createSceneGroup$=r,t.default=r},function(e,t,n){\"use strict\";function r(e){return i.ddSdk.invokeAPI(a,e)}var o;Object.defineProperty(t,\"__esModule\",{value:!0});var i=n(0),a=\"biz.chat.getRealmCid\";i.ddSdk.setAPI(a,(o={},o[i.ENV_ENUM.ios]={vs:\"4.7.12\"},o[i.ENV_ENUM.android]={vs:\"4.7.12\"},o[i.ENV_ENUM.pc]={vs:\"4.7.12\"},o)),t.getRealmCid$=r,t.default=r},function(e,t,n){\"use strict\";function r(e){return i.ddSdk.invokeAPI(a,e)}var o;Object.defineProperty(t,\"__esModule\",{value:!0});var i=n(0),a=\"biz.chat.locationChatMessage\";i.ddSdk.setAPI(a,(o={},o[i.ENV_ENUM.ios]={vs:\"2.7.6\"},o[i.ENV_ENUM.android]={vs:\"2.7.6\"},o)),t.locationChatMessage$=r,t.default=r},function(e,t,n){\"use strict\";function r(e){return i.ddSdk.invokeAPI(a,e)}var o;Object.defineProperty(t,\"__esModule\",{value:!0});var i=n(0),a=\"biz.chat.openSingleChat\";i.ddSdk.setAPI(a,(o={},o[i.ENV_ENUM.ios]={vs:\"3.4.10\"},o[i.ENV_ENUM.android]={vs:\"3.4.10\"},o)),t.openSingleChat$=r,t.default=r},function(e,t,n){\"use strict\";function r(e){return i.ddSdk.invokeAPI(a,e)}var o;Object.defineProperty(t,\"__esModule\",{value:!0});var i=n(0),a=\"biz.chat.pickConversation\";i.ddSdk.setAPI(a,(o={},o[i.ENV_ENUM.ios]={vs:\"2.4.2\"},o[i.ENV_ENUM.android]={vs:\"2.4.2\"},o[i.ENV_ENUM.pc]={vs:\"4.7.9\"},o)),t.pickConversation$=r,t.default=r},function(e,t,n){\"use strict\";function r(e){return i.ddSdk.invokeAPI(a,e)}var o;Object.defineProperty(t,\"__esModule\",{value:!0});var i=n(0),a=\"biz.chat.sendEmotion\";i.ddSdk.setAPI(a,(o={},o[i.ENV_ENUM.ios]={vs:\"4.6.12\"},o[i.ENV_ENUM.android]={vs:\"4.6.12\"},o)),t.sendEmotion$=r,t.default=r},function(e,t,n){\"use strict\";function r(e){return i.ddSdk.invokeAPI(a,e)}var o;Object.defineProperty(t,\"__esModule\",{value:!0});var i=n(0),a=\"biz.chat.toConversation\";i.ddSdk.setAPI(a,(o={},o[i.ENV_ENUM.ios]={vs:\"2.6.0\"},o[i.ENV_ENUM.android]={vs:\"2.6.0\"},o)),t.toConversation$=r,t.default=r},function(e,t,n){\"use strict\";function r(e){return i.ddSdk.invokeAPI(a,e)}var o;Object.defineProperty(t,\"__esModule\",{value:!0});var i=n(0),a=\"biz.clipboardData.setData\";i.ddSdk.setAPI(a,(o={},o[i.ENV_ENUM.ios]={vs:\"2.7.0\"},o[i.ENV_ENUM.android]={vs:\"2.7.0\"},o[i.ENV_ENUM.pc]={vs:\"4.6.1\"},o)),t.setData$=r,t.default=r},function(e,t,n){\"use strict\";function r(e){return i.ddSdk.invokeAPI(a,e)}var o;Object.defineProperty(t,\"__esModule\",{value:!0});var i=n(0),a=\"biz.conference.videoConfCall\";i.ddSdk.setAPI(a,(o={},o[i.ENV_ENUM.ios]={vs:\"5.0.8\"},o[i.ENV_ENUM.android]={vs:\"5.0.8\"},o)),t.videoConfCall$=r,t.default=r},function(e,t,n){\"use strict\";function r(e){return i.ddSdk.invokeAPI(s,e)}var o;Object.defineProperty(t,\"__esModule\",{value:!0});var i=n(0),a=n(1),s=\"biz.contact.choose\",d=a.genDefaultParamsDealFn({multiple:!0,startWithDepartmentId:0,users:[]});i.ddSdk.setAPI(s,(o={},o[i.ENV_ENUM.pc]={vs:\"2.5.0\"},o[i.ENV_ENUM.ios]={vs:\"2.4.0\",paramsDeal:d},o[i.ENV_ENUM.android]={vs:\"2.4.0\",paramsDeal:d},o)),t.choose$=r,t.default=r},function(e,t,n){\"use strict\";function r(e){return i.ddSdk.invokeAPI(a,e)}var o;Object.defineProperty(t,\"__esModule\",{value:!0});var i=n(0),a=\"biz.contact.chooseMobileContacts\";i.ddSdk.setAPI(a,(o={},o[i.ENV_ENUM.ios]={vs:\"3.1\"},o[i.ENV_ENUM.android]={vs:\"3.1\"},o)),t.chooseMobileContacts$=r,t.default=r},function(e,t,n){\"use strict\";function r(e){return i.ddSdk.invokeAPI(a,e)}var o;Object.defineProperty(t,\"__esModule\",{value:!0});var i=n(0),a=\"biz.contact.complexPicker\";i.ddSdk.setAPI(a,(o={},o[i.ENV_ENUM.ios]={vs:\"2.9.0\"},o[i.ENV_ENUM.android]={vs:\"2.9.0\"},o[i.ENV_ENUM.pc]={vs:\"4.3.5\"},o)),t.complexPicker$=r,t.default=r},function(e,t,n){\"use strict\";function r(e){return i.ddSdk.invokeAPI(a,e)}var o;Object.defineProperty(t,\"__esModule\",{value:!0});var i=n(0),a=\"biz.contact.createGroup\";i.ddSdk.setAPI(a,(o={},o[i.ENV_ENUM.ios]={vs:\"2.4.0\"},o[i.ENV_ENUM.android]={vs:\"2.4.0\"},o[i.ENV_ENUM.pc]={vs:\"4.6.1\"},o)),t.createGroup$=r,t.default=r},function(e,t,n){\"use strict\";function r(e){return i.ddSdk.invokeAPI(a,e)}var o;Object.defineProperty(t,\"__esModule\",{value:!0});var i=n(0),a=\"biz.contact.departmentsPicker\";i.ddSdk.setAPI(a,(o={},o[i.ENV_ENUM.pc]={vs:\"4.2.5\"},o[i.ENV_ENUM.ios]={vs:\"3.0\"},o[i.ENV_ENUM.android]={vs:\"3.0\"},o)),t.departmentsPicker$=r,t.default=r},function(e,t,n){\"use strict\";function r(e){return i.ddSdk.invokeAPI(a,e)}var o;Object.defineProperty(t,\"__esModule\",{value:!0});var i=n(0),a=\"biz.contact.externalComplexPicker\";i.ddSdk.setAPI(a,(o={},o[i.ENV_ENUM.pc]={vs:\"3.0.0\"},o[i.ENV_ENUM.ios]={vs:\"3.0\"},o[i.ENV_ENUM.android]={vs:\"3.0\"},o)),t.externalComplexPicker$=r,t.default=r},function(e,t,n){\"use strict\";function r(e){return i.ddSdk.invokeAPI(a,e)}var o;Object.defineProperty(t,\"__esModule\",{value:!0});var i=n(0),a=\"biz.contact.externalEditForm\";i.ddSdk.setAPI(a,(o={},o[i.ENV_ENUM.ios]={vs:\"3.0\"},o[i.ENV_ENUM.android]={vs:\"3.0\"},o)),t.externalEditForm$=r,t.default=r},function(e,t,n){\"use strict\";function r(e){return i.ddSdk.invokeAPI(a,e)}var o;Object.defineProperty(t,\"__esModule\",{value:!0});var i=n(0),a=\"biz.contact.setRule\";i.ddSdk.setAPI(a,(o={},o[i.ENV_ENUM.ios]={vs:\"2.15\"},o[i.ENV_ENUM.android]={vs:\"2.15\"},o)),t.setRule$=r,t.default=r},function(e,t,n){\"use strict\";function r(e){return i.ddSdk.invokeAPI(a,e)}var o;Object.defineProperty(t,\"__esModule\",{value:!0});var i=n(0),a=\"biz.cspace.chooseSpaceDir\";i.ddSdk.setAPI(a,(o={},o[i.ENV_ENUM.ios]={vs:\"3.5.6\"},o[i.ENV_ENUM.android]={vs:\"3.5.6\"},o)),t.chooseSpaceDir$=r,t.default=r},function(e,t,n){\"use strict\";function r(e){return i.ddSdk.invokeAPI(a,e)}var o;Object.defineProperty(t,\"__esModule\",{value:!0});var i=n(0),a=\"biz.cspace.delete\";i.ddSdk.setAPI(a,(o={},o[i.ENV_ENUM.ios]={vs:\"4.5.21\"},o[i.ENV_ENUM.android]={vs:\"4.5.21\"},o[i.ENV_ENUM.pc]={vs:\"4.5.21\"},o)),t.delete$=r,t.default=r},function(e,t,n){\"use strict\";function r(e){return i.ddSdk.invokeAPI(a,e)}var o;Object.defineProperty(t,\"__esModule\",{value:!0});var i=n(0),a=\"biz.cspace.preview\";i.ddSdk.setAPI(a,(o={},o[i.ENV_ENUM.pc]={vs:\"3.0.0\"},o[i.ENV_ENUM.ios]={vs:\"2.7.0\"},o[i.ENV_ENUM.android]={vs:\"2.7.0\"},o)),t.preview$=r,t.default=r},function(e,t,n){\"use strict\";function r(e){return i.ddSdk.invokeAPI(a,e)}var o;Object.defineProperty(t,\"__esModule\",{value:!0});var i=n(0),a=\"biz.cspace.saveFile\";i.ddSdk.setAPI(a,(o={},o[i.ENV_ENUM.ios]={vs:\"2.7.6\"},o[i.ENV_ENUM.android]={vs:\"2.7.6\"},o)),t.saveFile$=r,t.default=r},function(e,t,n){\"use strict\";function r(e){return i.ddSdk.invokeAPI(s,e)}var o;Object.defineProperty(t,\"__esModule\",{value:!0});var i=n(0),a=n(1),s=\"biz.customContact.choose\",d=a.genDefaultParamsDealFn({isShowCompanyName:!1,max:50});i.ddSdk.setAPI(s,(o={},o[i.ENV_ENUM.pc]={vs:\"3.0.0\"},o[i.ENV_ENUM.ios]={vs:\"2.5.2\",paramsDeal:d},o[i.ENV_ENUM.android]={vs:\"2.5.2\",paramsDeal:d},o)),t.choose$=r,t.default=r},function(e,t,n){\"use strict\";function r(e){return i.ddSdk.invokeAPI(s,e)}var o;Object.defineProperty(t,\"__esModule\",{value:!0});var i=n(0),a=n(1),s=\"biz.customContact.multipleChoose\",d=a.genDefaultParamsDealFn({isShowCompanyName:!1,max:50});i.ddSdk.setAPI(s,(o={},o[i.ENV_ENUM.pc]={vs:\"3.0.0\"},o[i.ENV_ENUM.ios]={vs:\"2.4.0\",paramsDeal:d},o[i.ENV_ENUM.android]={vs:\"2.4.0\",paramsDeal:d},o)),t.multipleChoose$=r,t.default=r},function(e,t,n){\"use strict\";function r(e){return i.ddSdk.invokeAPI(a,e)}var o;Object.defineProperty(t,\"__esModule\",{value:!0});var i=n(0),a=\"biz.ding.create\";i.ddSdk.setAPI(a,(o={},o[i.ENV_ENUM.ios]={vs:\"3.5.1\",resultDeal:function(e){return\"\"===e?e={dingCreateResult:!1}:\"object\"==typeof e&&(e.dingCreateResult=!!e.dingCreateResult),e}},o[i.ENV_ENUM.android]={vs:\"3.5.1\"},o[i.ENV_ENUM.pc]={vs:\"4.5.9\"},o)),t.create$=r,t.default=r},function(e,t,n){\"use strict\";function r(e){return i.ddSdk.invokeAPI(a,e)}var o;Object.defineProperty(t,\"__esModule\",{value:!0});var i=n(0),a=\"biz.ding.post\";i.ddSdk.setAPI(a,(o={},o[i.ENV_ENUM.pc]={vs:\"3.0.0\"},o[i.ENV_ENUM.ios]={vs:\"2.4.0\"},o[i.ENV_ENUM.android]={vs:\"2.4.0\"},o)),t.post$=r,t.default=r},function(e,t,n){\"use strict\";function r(e){return i.ddSdk.invokeAPI(a,e)}var o;Object.defineProperty(t,\"__esModule\",{value:!0});var i=n(0),a=\"biz.event.notifyWeex\";i.ddSdk.setAPI(a,(o={},o[i.ENV_ENUM.ios]={vs:\"4.5.0\"},o)),t.notifyWeex$=r,t.default=r},function(e,t,n){\"use strict\";function r(e){return i.ddSdk.invokeAPI(a,e)}var o;Object.defineProperty(t,\"__esModule\",{value:!0});var i=n(0),a=\"biz.intent.fetchData\";i.ddSdk.setAPI(a,(o={},o[i.ENV_ENUM.ios]={vs:\"2.7.6\"},o[i.ENV_ENUM.android]={vs:\"2.7.6\"},o)),t.fetchData$=r,t.default=r},function(e,t,n){\"use strict\";function r(e){return i.ddSdk.invokeAPI(a,e)}var o;Object.defineProperty(t,\"__esModule\",{value:!0});var i=n(0),a=\"biz.iot.bind\";i.ddSdk.setAPI(a,(o={},o[i.ENV_ENUM.ios]={vs:\"4.6.34\"},o[i.ENV_ENUM.android]={vs:\"4.6.34\"},o)),t.bind$=r,t.default=r},function(e,t,n){\"use strict\";function r(e){return i.ddSdk.invokeAPI(a,e)}var o;Object.defineProperty(t,\"__esModule\",{value:!0});var i=n(0),a=\"biz.iot.bindMeetingRoom\";i.ddSdk.setAPI(a,(o={},o[i.ENV_ENUM.ios]={vs:\"4.6.34\"},o[i.ENV_ENUM.android]={vs:\"4.6.34\"},o)),t.bindMeetingRoom$=r,t.default=r},function(e,t,n){\"use strict\";function r(e){return i.ddSdk.invokeAPI(a,e)}var o;Object.defineProperty(t,\"__esModule\",{value:!0});var i=n(0),a=\"biz.iot.getDeviceProperties\";i.ddSdk.setAPI(a,(o={},o[i.ENV_ENUM.ios]={vs:\"4.6.42\"},o[i.ENV_ENUM.android]={vs:\"4.6.42\"},o)),t.getDeviceProperties$=r,t.default=r},function(e,t,n){\"use strict\";function r(e){return i.ddSdk.invokeAPI(a,e)}var o;Object.defineProperty(t,\"__esModule\",{value:!0});var i=n(0),a=\"biz.iot.invokeThingService\";i.ddSdk.setAPI(a,(o={},o[i.ENV_ENUM.ios]={vs:\"4.6.42\"},o[i.ENV_ENUM.android]={vs:\"4.6.42\"},o)),t.invokeThingService$=r,t.default=r},function(e,t,n){\"use strict\";function r(e){return i.ddSdk.invokeAPI(a,e)}var o;Object.defineProperty(t,\"__esModule\",{value:!0});var i=n(0),a=\"biz.iot.queryMeetingRoomList\";i.ddSdk.setAPI(a,(o={},o[i.ENV_ENUM.ios]={vs:\"4.6.34\"},o[i.ENV_ENUM.android]={vs:\"4.6.34\"},o)),t.queryMeetingRoomList$=r,t.default=r},function(e,t,n){\"use strict\";function r(e){return i.ddSdk.invokeAPI(a,e)}var o;Object.defineProperty(t,\"__esModule\",{value:!0});var i=n(0),a=\"biz.iot.setDeviceProperties\";i.ddSdk.setAPI(a,(o={},o[i.ENV_ENUM.ios]={vs:\"4.6.42\"},o[i.ENV_ENUM.android]={vs:\"4.6.42\"},o)),t.setDeviceProperties$=r,t.default=r},function(e,t,n){\"use strict\";function r(e){return i.ddSdk.invokeAPI(a,e)}var o;Object.defineProperty(t,\"__esModule\",{value:!0});var i=n(0),a=\"biz.iot.unbind\";i.ddSdk.setAPI(a,(o={},o[i.ENV_ENUM.ios]={vs:\"4.6.34\"},o[i.ENV_ENUM.android]={vs:\"4.6.34\"},o)),t.unbind$=r,t.default=r},function(e,t,n){\"use strict\";function r(e){return i.ddSdk.invokeAPI(a,e)}var o;Object.defineProperty(t,\"__esModule\",{value:!0});var i=n(0),a=\"biz.map.locate\";i.ddSdk.setAPI(a,(o={},o[i.ENV_ENUM.ios]={vs:\"2.4.0\"},o[i.ENV_ENUM.android]={vs:\"2.4.0\"},o)),t.locate$=r,t.default=r},function(e,t,n){\"use strict\";function r(e){return i.ddSdk.invokeAPI(s,e)}var o;Object.defineProperty(t,\"__esModule\",{value:!0});var i=n(0),a=n(1),s=\"biz.map.search\",d=a.genDefaultParamsDealFn({scope:500});i.ddSdk.setAPI(s,(o={},o[i.ENV_ENUM.ios]={vs:\"2.4.0\",paramsDeal:d},o[i.ENV_ENUM.android]={vs:\"2.4.0\",paramsDeal:d},o)),t.search$=r,t.default=r},function(e,t,n){\"use strict\";function r(e){return i.ddSdk.invokeAPI(a,e)}var o;Object.defineProperty(t,\"__esModule\",{value:!0});var i=n(0),a=\"biz.map.view\";i.ddSdk.setAPI(a,(o={},o[i.ENV_ENUM.ios]={vs:\"2.8.0\"},o[i.ENV_ENUM.android]={vs:\"2.8.0\"},o)),t.view$=r,t.default=r},function(e,t,n){\"use strict\";function r(e){return i.ddSdk.invokeAPI(a,e)}var o;Object.defineProperty(t,\"__esModule\",{value:!0});var i=n(0),a=\"biz.media.compressVideo\";i.ddSdk.setAPI(a,(o={},o[i.ENV_ENUM.ios]={vs:\"4.6.37\"},o[i.ENV_ENUM.android]={vs:\"4.6.37\"},o)),t.compressVideo$=r,t.default=r},function(e,t,n){\"use strict\";function r(e){return i.ddSdk.invokeAPI(a,e)}var o;Object.defineProperty(t,\"__esModule\",{value:!0});var i=n(0),a=\"biz.microApp.openApp\";i.ddSdk.setAPI(a,(o={},o[i.ENV_ENUM.ios]={vs:\"4.5.6\"},o[i.ENV_ENUM.android]={vs:\"4.5.6\"},o)),t.openApp$=r,t.default=r},function(e,t,n){\"use strict\";function r(e){return i.ddSdk.invokeAPI(a,e)}var o;Object.defineProperty(t,\"__esModule\",{value:!0});var i=n(0),a=\"biz.navigation.close\";i.ddSdk.setAPI(a,(o={},o[i.ENV_ENUM.ios]={vs:\"2.4.0\"},o[i.ENV_ENUM.android]={vs:\"2.4.0\"},o[i.ENV_ENUM.pc]={vs:\"4.3.5\"},o)),t.close$=r,t.default=r},function(e,t,n){\"use strict\";function r(e){return i.ddSdk.invokeAPI(a,e)}var o;Object.defineProperty(t,\"__esModule\",{value:!0});var i=n(0),a=\"biz.navigation.goBack\";i.ddSdk.setAPI(a,(o={},o[i.ENV_ENUM.ios]={vs:\"2.6.0\"},o[i.ENV_ENUM.android]={vs:\"2.6.0\"},o)),t.goBack$=r,t.default=r},function(e,t,n){\"use strict\";function r(e){return i.ddSdk.invokeAPI(a,e)}var o;Object.defineProperty(t,\"__esModule\",{value:!0});var i=n(0),a=\"biz.navigation.hideBar\";i.ddSdk.setAPI(a,(o={},o[i.ENV_ENUM.ios]={vs:\"3.5.6\"},o[i.ENV_ENUM.android]={vs:\"3.5.6\"},o)),t.hideBar$=r,t.default=r},function(e,t,n){\"use strict\";function r(e){return i.ddSdk.invokeAPI(a,e)}var o;Object.defineProperty(t,\"__esModule\",{value:!0});var i=n(0),a=\"biz.navigation.quit\";i.ddSdk.setAPI(a,(o={},o[i.ENV_ENUM.pc]={vs:\"2.5.0\"},o)),t.quit$=r,t.default=r},function(e,t,n){\"use strict\";function r(e){return i.ddSdk.invokeAPI(a,e)}var o;Object.defineProperty(t,\"__esModule\",{value:!0});var i=n(0),a=\"biz.navigation.replace\";i.ddSdk.setAPI(a,(o={},o[i.ENV_ENUM.ios]={vs:\"3.4.6\"},o[i.ENV_ENUM.android]={vs:\"3.4.6\"},o)),t.replace$=r,t.default=r},function(e,t,n){\"use strict\";function r(e){return i.ddSdk.invokeAPI(s,e)}var o;Object.defineProperty(t,\"__esModule\",{value:!0});var i=n(0),a=n(1),s=\"biz.navigation.setIcon\",d=a.genDefaultParamsDealFn({watch:!0,showIcon:!0,iconIndex:1});i.ddSdk.setAPI(s,(o={},o[i.ENV_ENUM.ios]={vs:\"2.4.0\",paramsDeal:d},o[i.ENV_ENUM.android]={vs:\"2.4.0\",paramsDeal:d},o)),t.setIcon$=r,t.default=r},function(e,t,n){\"use strict\";function r(e){return i.ddSdk.invokeAPI(s,e)}var o;Object.defineProperty(t,\"__esModule\",{value:!0});var i=n(0),a=n(1),s=\"biz.navigation.setLeft\",d=a.genDefaultParamsDealFn({watch:!0,show:!0,control:!1,showIcon:!0,text:\"\"});i.ddSdk.setAPI(s,(o={},o[i.ENV_ENUM.pc]={vs:\"2.5.0\"},o[i.ENV_ENUM.ios]={vs:\"2.4.0\",paramsDeal:d},o[i.ENV_ENUM.android]={vs:\"2.4.0\",paramsDeal:d},o)),t.setLeft$=r,t.default=r},function(e,t,n){\"use strict\";function r(e){return i.ddSdk.invokeAPI(s,e)}var o;Object.defineProperty(t,\"__esModule\",{value:!0});var i=n(0),a=n(1),s=\"biz.navigation.setMenu\";i.ddSdk.setAPI(s,(o={},o[i.ENV_ENUM.ios]={vs:\"2.6.0\",paramsDeal:a.addWatchParamsDeal},o[i.ENV_ENUM.android]={vs:\"2.6.0\",paramsDeal:a.addWatchParamsDeal},o)),t.setMenu$=r,t.default=r},function(e,t,n){\"use strict\";function r(e){return i.ddSdk.invokeAPI(s,e)}var o;Object.defineProperty(t,\"__esModule\",{value:!0});var i=n(0),a=n(1),s=\"biz.navigation.setRight\",d=a.genDefaultParamsDealFn({watch:!0,show:!0,control:!1,showIcon:!0,text:\"\"});i.ddSdk.setAPI(s,(o={},o[i.ENV_ENUM.ios]={vs:\"2.4.0\",paramsDeal:d},o[i.ENV_ENUM.android]={vs:\"2.4.0\",paramsDeal:d},o)),t.setRight$=r,t.default=r},function(e,t,n){\"use strict\";function r(e){return i.ddSdk.invokeAPI(a,e)}var o;Object.defineProperty(t,\"__esModule\",{value:!0});var i=n(0),a=\"biz.navigation.setTitle\";i.ddSdk.setAPI(a,(o={},o[i.ENV_ENUM.pc]={vs:\"2.5.0\"},o[i.ENV_ENUM.ios]={vs:\"2.4.0\"},o[i.ENV_ENUM.android]={vs:\"2.4.0\"},o)),t.setTitle$=r,t.default=r},function(e,t,n){\"use strict\";function r(e){return i.ddSdk.invokeAPI(a,e)}var o;Object.defineProperty(t,\"__esModule\",{value:!0});var i=n(0),a=\"biz.realm.subscribe\";i.ddSdk.setAPI(a,(o={},o[i.ENV_ENUM.ios]={vs:\"4.7.18\"},o[i.ENV_ENUM.android]={vs:\"4.7.18\"},o)),t.subscribe$=r,t.default=r},function(e,t,n){\"use strict\";function r(e){return i.ddSdk.invokeAPI(a,e)}var o;Object.defineProperty(t,\"__esModule\",{value:!0});var i=n(0),a=\"biz.realm.unsubscribe\";i.ddSdk.setAPI(a,(o={},o[i.ENV_ENUM.ios]={vs:\"4.7.18\"},o[i.ENV_ENUM.android]={vs:\"4.7.18\"},o)),t.unsubscribe$=r,t.default=r},function(e,t,n){\"use strict\";function r(e){return i.ddSdk.invokeAPI(a,e)}var o;Object.defineProperty(t,\"__esModule\",{value:!0});var i=n(0),a=\"biz.shortCut.addShortCut\";i.ddSdk.setAPI(a,(o={},o[i.ENV_ENUM.android]={vs:\"4.7.32\"},o)),t.addShortCut$=r,t.default=r},function(e,t,n){\"use strict\";function r(e){return i.ddSdk.invokeAPI(s,e)}var o;Object.defineProperty(t,\"__esModule\",{value:!0});var i=n(0),a=n(1),s=\"biz.store.closeUnpayOrder\";i.ddSdk.setAPI(s,(o={},o[i.ENV_ENUM.ios]={vs:\"4.3.7\",paramsDeal:a.genBizStoreParamsDealFn},o[i.ENV_ENUM.android]={vs:\"4.3.7\",paramsDeal:a.genBizStoreParamsDealFn},o[i.ENV_ENUM.pc]={vs:\"4.5.3\",paramsDeal:a.genBizStoreParamsDealFn},o)),t.closeUnpayOrder$=r,t.default=r},function(e,t,n){\"use strict\";function r(e){return i.ddSdk.invokeAPI(s,e)}var o;Object.defineProperty(t,\"__esModule\",{value:!0});var i=n(0),a=n(1),s=\"biz.store.createOrder\";i.ddSdk.setAPI(s,(o={},o[i.ENV_ENUM.ios]={vs:\"4.3.7\",paramsDeal:a.genBizStoreParamsDealFn},o[i.ENV_ENUM.android]={vs:\"4.3.7\",paramsDeal:a.genBizStoreParamsDealFn},o[i.ENV_ENUM.pc]={vs:\"4.5.3\",paramsDeal:a.genBizStoreParamsDealFn},o)),t.createOrder$=r,t.default=r},function(e,t,n){\"use strict\";function r(e){return i.ddSdk.invokeAPI(s,e)}var o;Object.defineProperty(t,\"__esModule\",{value:!0});var i=n(0),a=n(1),s=\"biz.store.getPayUrl\";i.ddSdk.setAPI(s,(o={},o[i.ENV_ENUM.ios]={vs:\"4.3.7\",paramsDeal:a.genBizStoreParamsDealFn},o[i.ENV_ENUM.android]={vs:\"4.3.7\",paramsDeal:a.genBizStoreParamsDealFn},o[i.ENV_ENUM.pc]={vs:\"4.5.3\",paramsDeal:a.genBizStoreParamsDealFn},o)),t.getPayUrl$=r,t.default=r},function(e,t,n){\"use strict\";function r(e){return i.ddSdk.invokeAPI(s,e)}var o;Object.defineProperty(t,\"__esModule\",{value:!0});var i=n(0),a=n(1),s=\"biz.store.inquiry\";i.ddSdk.setAPI(s,(o={},o[i.ENV_ENUM.ios]={vs:\"4.3.7\",paramsDeal:a.genBizStoreParamsDealFn},o[i.ENV_ENUM.android]={vs:\"4.3.7\",paramsDeal:a.genBizStoreParamsDealFn},o[i.ENV_ENUM.pc]={vs:\"4.5.3\",paramsDeal:a.genBizStoreParamsDealFn},o)),t.inquiry$=r,t.default=r},function(e,t,n){\"use strict\";function r(e){return i.ddSdk.invokeAPI(a,e)}var o;Object.defineProperty(t,\"__esModule\",{value:!0});var i=n(0),a=\"biz.telephone.call\";i.ddSdk.setAPI(a,(o={},o[i.ENV_ENUM.ios]={vs:\"2.4.0\"},o[i.ENV_ENUM.android]={vs:\"2.4.0\"},o)),t.call$=r,t.default=r},function(e,t,n){\"use strict\";function r(e){return i.ddSdk.invokeAPI(a,e)}var o;Object.defineProperty(t,\"__esModule\",{value:!0});var i=n(0),a=\"biz.telephone.checkBizCall\";i.ddSdk.setAPI(a,(o={},o[i.ENV_ENUM.pc]={vs:\"4.0.0\"},o[i.ENV_ENUM.ios]={vs:\"3.5.6\"},o[i.ENV_ENUM.android]={vs:\"3.5.6\"},o)),t.checkBizCall$=r,t.default=r},function(e,t,n){\"use strict\";function r(e){return i.ddSdk.invokeAPI(a,e)}var o;Object.defineProperty(t,\"__esModule\",{value:!0});var i=n(0),a=\"biz.telephone.quickCallList\";i.ddSdk.setAPI(a,(o={},o[i.ENV_ENUM.pc]={vs:\"3.5.6\"},o[i.ENV_ENUM.ios]={vs:\"3.5.6\"},o[i.ENV_ENUM.android]={vs:\"3.5.6\"},o)),t.quickCallList$=r,t.default=r},function(e,t,n){\"use strict\";function r(e){return i.ddSdk.invokeAPI(a,e)}var o;Object.defineProperty(t,\"__esModule\",{value:!0});var i=n(0),a=\"biz.telephone.showCallMenu\";i.ddSdk.setAPI(a,(o={},o[i.ENV_ENUM.ios]={vs:\"2.8.0\"},o[i.ENV_ENUM.android]={vs:\"2.8.0\"},o)),t.showCallMenu$=r,t.default=r},function(e,t,n){\"use strict\";function r(e){return i.ddSdk.invokeAPI(a,e)}var o;Object.defineProperty(t,\"__esModule\",{value:!0});var i=n(0),a=\"biz.user.checkPassword\";i.ddSdk.setAPI(a,(o={},o[i.ENV_ENUM.ios]={vs:\"4.5.8\"},o[i.ENV_ENUM.android]={vs:\"4.5.8\"},o)),t.checkPassword$=r,t.default=r},function(e,t,n){\"use strict\";function r(e){return i.ddSdk.invokeAPI(a,e)}var o;Object.defineProperty(t,\"__esModule\",{value:!0});var i=n(0),a=\"biz.user.get\";i.ddSdk.setAPI(a,(o={},o[i.ENV_ENUM.pc]={vs:\"3.0.0\"},o[i.ENV_ENUM.ios]={vs:\"2.4.0\"},o[i.ENV_ENUM.android]={vs:\"2.4.0\"},o)),t.get$=r,t.default=r},function(e,t,n){\"use strict\";function r(e){return i.ddSdk.invokeAPI(a,e)}var o;Object.defineProperty(t,\"__esModule\",{value:!0});var i=n(0),a=\"biz.util.chosen\";i.ddSdk.setAPI(a,(o={},o[i.ENV_ENUM.ios]={vs:\"2.4.0\"},o[i.ENV_ENUM.android]={vs:\"2.4.0\"},o)),t.chosen$=r,t.default=r},function(e,t,n){\"use strict\";function r(e){return i.ddSdk.invokeAPI(a,e)}var o;Object.defineProperty(t,\"__esModule\",{value:!0});var i=n(0),a=\"biz.util.datepicker\";i.ddSdk.setAPI(a,(o={},o[i.ENV_ENUM.ios]={vs:\"2.4.0\"},o[i.ENV_ENUM.android]={vs:\"2.4.0\"},o)),t.datepicker$=r,t.default=r},function(e,t,n){\"use strict\";function r(e){return i.ddSdk.invokeAPI(a,e)}var o;Object.defineProperty(t,\"__esModule\",{value:!0});var i=n(0),a=\"biz.util.datetimepicker\";i.ddSdk.setAPI(a,(o={},o[i.ENV_ENUM.ios]={vs:\"2.4.0\"},o[i.ENV_ENUM.android]={vs:\"2.4.0\"},o)),t.datetimepicker$=r,t.default=r},function(e,t,n){\"use strict\";function r(e){return i.ddSdk.invokeAPI(a,e)}var o;Object.defineProperty(t,\"__esModule\",{value:!0});var i=n(0),a=\"biz.util.decrypt\";i.ddSdk.setAPI(a,(o={},o[i.ENV_ENUM.pc]={vs:\"3.0.0\"},o[i.ENV_ENUM.ios]={vs:\"2.9.1\"},o[i.ENV_ENUM.android]={vs:\"2.9.1\"},o)),t.decrypt$=r,t.default=r},function(e,t,n){\"use strict\";function r(e){return i.ddSdk.invokeAPI(a,e)}var o;Object.defineProperty(t,\"__esModule\",{value:!0});var i=n(0),a=\"biz.util.downloadFile\";i.ddSdk.setAPI(a,(o={},o[i.ENV_ENUM.pc]={vs:\"2.5.0\"},o)),t.downloadFile$=r,t.default=r},function(e,t,n){\"use strict\";function r(e){return i.ddSdk.invokeAPI(a,e)}var o;Object.defineProperty(t,\"__esModule\",{value:!0});var i=n(0),a=\"biz.util.encrypt\";i.ddSdk.setAPI(a,(o={},o[i.ENV_ENUM.pc]={vs:\"3.0.0\"},o[i.ENV_ENUM.ios]={vs:\"2.9.1\"},o[i.ENV_ENUM.android]={vs:\"2.9.1\"},o)),t.encrypt$=r,t.default=r},function(e,t,n){\"use strict\";function r(e){return i.ddSdk.invokeAPI(a,e)}var o;Object.defineProperty(t,\"__esModule\",{value:!0});var i=n(0),a=\"biz.util.isLocalFileExist\";i.ddSdk.setAPI(a,(o={},o[i.ENV_ENUM.pc]={vs:\"2.5.0\"},o)),t.isLocalFileExist$=r,t.default=r},function(e,t,n){\"use strict\";function r(e){return i.ddSdk.invokeAPI(a,e)}var o;Object.defineProperty(t,\"__esModule\",{value:!0});var i=n(0),a=\"biz.util.multiSelect\";i.ddSdk.setAPI(a,(o={},o[i.ENV_ENUM.ios]={vs:\"3.0.0\"},o[i.ENV_ENUM.android]={vs:\"3.0.0\"},o)),t.multiSelect$=r,t.default=r},function(e,t,n){\"use strict\";function r(e){return i.ddSdk.invokeAPI(a,e)}var o;Object.defineProperty(t,\"__esModule\",{value:!0});var i=n(0),a=\"biz.util.open\";i.ddSdk.setAPI(a,(o={},o[i.ENV_ENUM.pc]={vs:\"2.7.0\"},o[i.ENV_ENUM.ios]={vs:\"2.4.0\"},o[i.ENV_ENUM.android]={vs:\"2.4.0\"},o)),t.open$=r,t.default=r},function(e,t,n){\"use strict\";function r(e){return i.ddSdk.invokeAPI(s,e)}var o;Object.defineProperty(t,\"__esModule\",{value:!0});var i=n(0),a=n(1),s=\"biz.util.openLink\",d=a.genDefaultParamsDealFn({credible:!0,showMenuBar:!0});i.ddSdk.setAPI(s,(o={},o[i.ENV_ENUM.pc]={vs:\"2.7.0\"},o[i.ENV_ENUM.ios]={vs:\"2.4.0\",paramsDeal:d},o[i.ENV_ENUM.android]={vs:\"2.4.0\",paramsDeal:d},o)),t.openLink$=r,t.default=r},function(e,t,n){\"use strict\";function r(e){return i.ddSdk.invokeAPI(a,e)}var o;Object.defineProperty(t,\"__esModule\",{value:!0});var i=n(0),a=\"biz.util.openLocalFile\";i.ddSdk.setAPI(a,(o={},o[i.ENV_ENUM.pc]={vs:\"2.5.0\"},o)),t.openLocalFile$=r,t.default=r},function(e,t,n){\"use strict\";function r(e){return i.ddSdk.invokeAPI(a,e)}var o;Object.defineProperty(t,\"__esModule\",{value:!0});var i=n(0),a=\"biz.util.openModal\";i.ddSdk.setAPI(a,(o={},o[i.ENV_ENUM.pc]={vs:\"2.5.0\"},o)),t.openModal$=r,t.default=r},function(e,t,n){\"use strict\";function r(e){return i.ddSdk.invokeAPI(a,e)}var o;Object.defineProperty(t,\"__esModule\",{value:!0});var i=n(0),a=\"biz.util.openSlidePanel\";i.ddSdk.setAPI(a,(o={},o[i.ENV_ENUM.pc]={vs:\"2.5.0\"},o)),t.openSlidePanel$=r,t.default=r},function(e,t,n){\"use strict\";function r(e){return i.ddSdk.invokeAPI(a,e)}var o;Object.defineProperty(t,\"__esModule\",{value:!0});var i=n(0),a=\"biz.util.presentWindow\";i.ddSdk.setAPI(a,(o={},o[i.ENV_ENUM.ios]={vs:\"2.8.0\"},o[i.ENV_ENUM.android]={vs:\"2.8.0\"},o)),t.presentWindow$=r,t.default=r},function(e,t,n){\"use strict\";function r(e){return i.ddSdk.invokeAPI(a,e)}var o;Object.defineProperty(t,\"__esModule\",{value:!0});var i=n(0),a=\"biz.util.previewImage\";i.ddSdk.setAPI(a,(o={},o[i.ENV_ENUM.pc]={vs:\"2.7.0\"},o[i.ENV_ENUM.ios]={vs:\"2.4.0\"},o[i.ENV_ENUM.android]={vs:\"2.4.0\"},o)),t.previewImage$=r,t.default=r},function(e,t,n){\"use strict\";function r(e){return i.ddSdk.invokeAPI(a,e)}var o;Object.defineProperty(t,\"__esModule\",{value:!0});var i=n(0),a=\"biz.util.previewVideo\";i.ddSdk.setAPI(a,(o={},o[i.ENV_ENUM.ios]={vs:\"4.3.7\"},o[i.ENV_ENUM.android]={vs:\"4.3.7\"},o[i.ENV_ENUM.pc]={vs:\"4.6.33\"},o)),t.previewVideo$=r,t.default=r},function(e,t,n){\"use strict\";function r(e){return i.ddSdk.invokeAPI(s,e)}var o;Object.defineProperty(t,\"__esModule\",{value:!0});var i=n(0),a=n(1),s=\"biz.util.scan\",d=a.genDefaultParamsDealFn({type:\"qrCode\"});i.ddSdk.setAPI(s,(o={},o[i.ENV_ENUM.ios]={vs:\"2.4.0\",paramsDeal:d},o[i.ENV_ENUM.android]={vs:\"2.4.0\",paramsDeal:d},o)),t.scan$=r,t.default=r},function(e,t,n){\"use strict\";function r(e){return i.ddSdk.invokeAPI(a,e)}var o;Object.defineProperty(t,\"__esModule\",{value:!0});var i=n(0),a=\"biz.util.scanCard\";i.ddSdk.setAPI(a,(o={},o[i.ENV_ENUM.ios]={vs:\"2.8.0\"},o[i.ENV_ENUM.android]={vs:\"2.8.0\"},o)),t.scanCard$=r,t.default=r},function(e,t,n){\"use strict\";function r(e){return i.ddSdk.invokeAPI(a,e)}var o;Object.defineProperty(t,\"__esModule\",{value:!0});var i=n(0),a=\"biz.util.setScreenBrightnessAndKeepOn\";i.ddSdk.setAPI(a,(o={},o[i.ENV_ENUM.ios]={vs:\"4.6.37\"},o[i.ENV_ENUM.android]={vs:\"4.3.3\"},o)),t.setScreenBrightnessAndKeepOn$=r,t.default=r},function(e,t,n){\"use strict\";function r(e){return i.ddSdk.invokeAPI(s,e)}var o;Object.defineProperty(t,\"__esModule\",{value:!0});var i=n(0),a=n(1),s=\"biz.util.share\",d=a.genDefaultParamsDealFn({title:\"\",buttonName:\"ç¡®å®š\"});i.ddSdk.setAPI(s,(o={},o[i.ENV_ENUM.ios]={vs:\"2.4.0\",paramsDeal:d},o[i.ENV_ENUM.android]={vs:\"2.4.0\",paramsDeal:d},o[i.ENV_ENUM.pc]={vs:\"4.6.37\",paramsDeal:d},o)),t.share$=r,t.default=r},function(e,t,n){\"use strict\";function r(e){return i.ddSdk.invokeAPI(a,e)}var o;Object.defineProperty(t,\"__esModule\",{value:!0});var i=n(0),a=\"biz.util.startDocSign\";i.ddSdk.setAPI(a,(o={},o[i.ENV_ENUM.android]={vs:\"4.6.33\"},o)),t.startDocSign$=r,t.default=r},function(e,t,n){\"use strict\";function r(e){return i.ddSdk.invokeAPI(a,e)}var o;Object.defineProperty(t,\"__esModule\",{value:!0});var i=n(0),a=\"biz.util.systemShare\";i.ddSdk.setAPI(a,(o={},o[i.ENV_ENUM.ios]={vs:\"4.5.11\"},o[i.ENV_ENUM.android]={vs:\"4.5.11\"},o)),t.systemShare$=r,t.default=r},function(e,t,n){\"use strict\";function r(e){return i.ddSdk.invokeAPI(a,e)}var o;Object.defineProperty(t,\"__esModule\",{value:!0});var i=n(0),a=\"biz.util.timepicker\";i.ddSdk.setAPI(a,(o={},o[i.ENV_ENUM.ios]={vs:\"2.4.0\"},o[i.ENV_ENUM.android]={vs:\"2.4.0\"},o)),t.timepicker$=r,t.default=r},function(e,t,n){\"use strict\";function r(e){return i.ddSdk.invokeAPI(a,e)}var o;Object.defineProperty(t,\"__esModule\",{value:!0});var i=n(0),a=\"biz.util.uploadAttachment\";i.ddSdk.setAPI(a,(o={},o[i.ENV_ENUM.pc]={vs:\"3.0.0\"},o[i.ENV_ENUM.ios]={vs:\"2.7.0\"},o[i.ENV_ENUM.android]={vs:\"2.7.0\"},o)),t.uploadAttachment$=r,t.default=r},function(e,t,n){\"use strict\";function r(e){return i.ddSdk.invokeAPI(s,e)}var o;Object.defineProperty(t,\"__esModule\",{value:!0});var i=n(0),a=n(1),s=\"biz.util.uploadImage\",d=a.genDefaultParamsDealFn({multiple:!1});i.ddSdk.setAPI(s,(o={},o[i.ENV_ENUM.pc]={vs:\"2.5.0\"},o[i.ENV_ENUM.ios]={vs:\"2.4.0\",paramsDeal:d},o[i.ENV_ENUM.android]={vs:\"2.4.0\",paramsDeal:d},o)),t.uploadImage$=r,t.default=r},function(e,t,n){\"use strict\";function r(e){return i.ddSdk.invokeAPI(a,e)}var o;Object.defineProperty(t,\"__esModule\",{value:!0});var i=n(0),a=\"biz.util.uploadImageFromCamera\";i.ddSdk.setAPI(a,(o={},o[i.ENV_ENUM.ios]={vs:\"2.4.0\"},o[i.ENV_ENUM.android]={vs:\"2.4.0\"},o)),t.uploadImageFromCamera$=r,t.default=r},function(e,t,n){\"use strict\";function r(e){return i.ddSdk.invokeAPI(a,e)}var o;Object.defineProperty(t,\"__esModule\",{value:!0});var i=n(0),a=\"biz.util.ut\",s=function(e){var t=Object.assign({},e),n=t.value,r=[];if(n&&\"object\"==typeof n){for(var o in n)n[o]&&r.push(o+\"=\"+n[o]);n=r.join(\",\")}return t.value=n||\"\",t};i.ddSdk.setAPI(a,(o={},o[i.ENV_ENUM.pc]={vs:\"3.5.0\",paramsDeal:s},o[i.ENV_ENUM.ios]={vs:\"2.4.0\",paramsDeal:function(e){var t=Object.assign({},e),n=t.value;return n&&\"object\"==typeof n&&(n=JSON.stringify(n)),t.value=n,t}},o[i.ENV_ENUM.android]={vs:\"2.4.0\",paramsDeal:s},o)),t.ut$=r,t.default=r},function(e,t,n){\"use strict\";function r(e){return i.ddSdk.invokeAPI(a,e)}var o;Object.defineProperty(t,\"__esModule\",{value:!0});var i=n(0),a=\"biz.verify.openBindIDCard\";i.ddSdk.setAPI(a,(o={},o[i.ENV_ENUM.ios]={vs:\"4.5.21\"},o[i.ENV_ENUM.android]={vs:\"4.5.21\"},o)),t.openBindIDCard$=r,t.default=r},function(e,t,n){\"use strict\";function r(e){return i.ddSdk.invokeAPI(a,e)}var o;Object.defineProperty(t,\"__esModule\",{value:!0});var i=n(0),a=\"biz.verify.startAuth\";i.ddSdk.setAPI(a,(o={},o[i.ENV_ENUM.ios]={vs:\"4.5.21\"},o[i.ENV_ENUM.android]={vs:\"4.5.21\"},o)),t.startAuth$=r,t.default=r},function(e,t,n){\"use strict\";function r(e){return i.ddSdk.invokeAPI(a,e)}var o;Object.defineProperty(t,\"__esModule\",{value:!0});var i=n(0),a=\"channel.permission.requestAuthCode\";i.ddSdk.setAPI(a,(o={},o[i.ENV_ENUM.ios]={vs:\"3.0.0\"},o[i.ENV_ENUM.android]={vs:\"3.0.0\"},o)),t.requestAuthCode$=r,t.default=r},function(e,t,n){\"use strict\";function r(e){return i.ddSdk.invokeAPI(a,e)}var o;Object.defineProperty(t,\"__esModule\",{value:!0});var i=n(0),a=\"device.accelerometer.clearShake\";i.ddSdk.setAPI(a,(o={},o[i.ENV_ENUM.ios]={vs:\"2.4.0\"},o[i.ENV_ENUM.android]={vs:\"2.4.0\"},o)),t.clearShake$=r,t.default=r},function(e,t,n){\"use strict\";function r(e){return i.ddSdk.invokeAPI(s,e)}var o;Object.defineProperty(t,\"__esModule\",{value:!0});var i=n(0),a=n(1),s=\"device.accelerometer.watchShake\";i.ddSdk.setAPI(s,(o={},o[i.ENV_ENUM.ios]={vs:\"2.4.0\",paramsDeal:function(e){return a.forceChangeParamsDealFn({sensitivity:3.2})(a.addWatchParamsDeal(e))}},o[i.ENV_ENUM.android]={vs:\"2.4.0\",paramsDeal:a.addWatchParamsDeal},o)),t.watchShake$=r,t.default=r},function(e,t,n){\"use strict\";function r(e){return i.ddSdk.invokeAPI(a,e)}var o;Object.defineProperty(t,\"__esModule\",{value:!0});var i=n(0),a=\"device.audio.download\";i.ddSdk.setAPI(a,(o={},o[i.ENV_ENUM.ios]={vs:\"2.8.0\"},o[i.ENV_ENUM.android]={vs:\"2.8.0\"},o)),t.download$=r,t.default=r},function(e,t,n){\"use strict\";function r(e){return i.ddSdk.invokeAPI(a,e)}var o;Object.defineProperty(t,\"__esModule\",{value:!0});var i=n(0),a=\"device.audio.onPlayEnd\";i.ddSdk.setAPI(a,(o={},o[i.ENV_ENUM.ios]={vs:\"2.8.0\"},o[i.ENV_ENUM.android]={vs:\"2.8.0\"},o)),t.onPlayEnd$=r,t.default=r},function(e,t,n){\"use strict\";function r(e){return i.ddSdk.invokeAPI(a,e)}var o;Object.defineProperty(t,\"__esModule\",{value:!0});var i=n(0),a=\"device.audio.onRecordEnd\";i.ddSdk.setAPI(a,(o={},o[i.ENV_ENUM.ios]={vs:\"2.8.0\"},o[i.ENV_ENUM.android]={vs:\"2.8.0\"},o)),t.onRecordEnd$=r,t.default=r},function(e,t,n){\"use strict\";function r(e){return i.ddSdk.invokeAPI(a,e)}var o;Object.defineProperty(t,\"__esModule\",{value:!0});var i=n(0),a=\"device.audio.pause\";i.ddSdk.setAPI(a,(o={},o[i.ENV_ENUM.ios]={vs:\"2.8.0\"},o[i.ENV_ENUM.android]={vs:\"2.8.0\"},o)),t.pause$=r,t.default=r},function(e,t,n){\"use strict\";function r(e){return i.ddSdk.invokeAPI(a,e)}var o;Object.defineProperty(t,\"__esModule\",{value:!0});var i=n(0),a=\"device.audio.play\";i.ddSdk.setAPI(a,(o={},o[i.ENV_ENUM.ios]={vs:\"2.8.0\"},o[i.ENV_ENUM.android]={vs:\"2.8.0\"},o)),t.play$=r,t.default=r},function(e,t,n){\"use strict\";function r(e){return i.ddSdk.invokeAPI(a,e)}var o;Object.defineProperty(t,\"__esModule\",{value:!0});var i=n(0),a=\"device.audio.resume\";i.ddSdk.setAPI(a,(o={},o[i.ENV_ENUM.ios]={vs:\"2.8.0\"},o[i.ENV_ENUM.android]={vs:\"2.8.0\"},o)),t.resume$=r,t.default=r},function(e,t,n){\"use strict\";function r(e){return i.ddSdk.invokeAPI(a,e)}var o;Object.defineProperty(t,\"__esModule\",{value:!0});var i=n(0),a=\"device.audio.startRecord\";i.ddSdk.setAPI(a,(o={},o[i.ENV_ENUM.ios]={vs:\"2.8.0\"},o[i.ENV_ENUM.android]={vs:\"2.8.0\"},o)),t.startRecord$=r,t.default=r},function(e,t,n){\"use strict\";function r(e){return i.ddSdk.invokeAPI(a,e)}var o;Object.defineProperty(t,\"__esModule\",{value:!0});var i=n(0),a=\"device.audio.stop\";i.ddSdk.setAPI(a,(o={},o[i.ENV_ENUM.ios]={vs:\"2.8.0\"},o[i.ENV_ENUM.android]={vs:\"2.8.0\"},o)),t.stop$=r,t.default=r},function(e,t,n){\"use strict\";function r(e){return i.ddSdk.invokeAPI(a,e)}var o;Object.defineProperty(t,\"__esModule\",{value:!0});var i=n(0),a=\"device.audio.stopRecord\";i.ddSdk.setAPI(a,(o={},o[i.ENV_ENUM.ios]={vs:\"2.8.0\"},o[i.ENV_ENUM.android]={vs:\"2.8.0\"},o)),t.stopRecord$=r,t.default=r},function(e,t,n){\"use strict\";function r(e){return i.ddSdk.invokeAPI(a,e)}var o;Object.defineProperty(t,\"__esModule\",{value:!0});var i=n(0),a=\"device.audio.translateVoice\";i.ddSdk.setAPI(a,(o={},o[i.ENV_ENUM.ios]={vs:\"2.8.0\"},o[i.ENV_ENUM.android]={vs:\"2.8.0\"},o)),t.translateVoice$=r,t.default=r},function(e,t,n){\"use strict\";function r(e){return i.ddSdk.invokeAPI(a,e)}var o;Object.defineProperty(t,\"__esModule\",{value:!0});var i=n(0),a=\"device.base.getInterface\";i.ddSdk.setAPI(a,(o={},o[i.ENV_ENUM.ios]={vs:\"2.4.0\"},o[i.ENV_ENUM.android]={vs:\"2.4.0\"},o)),t.getInterface$=r,t.default=r},function(e,t,n){\"use strict\";function r(e){return i.ddSdk.invokeAPI(a,e)}var o;Object.defineProperty(t,\"__esModule\",{value:!0});var i=n(0),a=\"device.base.getPhoneInfo\";i.ddSdk.setAPI(a,(o={},o[i.ENV_ENUM.ios]={vs:\"3.5.0\"},o[i.ENV_ENUM.android]={vs:\"3.5.0\"},o)),t.getPhoneInfo$=r,t.default=r},function(e,t,n){\"use strict\";function r(e){return i.ddSdk.invokeAPI(a,e)}var o;Object.defineProperty(t,\"__esModule\",{value:!0});var i=n(0),a=\"device.base.getUUID\";i.ddSdk.setAPI(a,(o={},o[i.ENV_ENUM.ios]={vs:\"2.4.0\"},o[i.ENV_ENUM.android]={vs:\"2.4.0\"},o[i.ENV_ENUM.pc]={vs:\"4.7.6\"},o)),t.getUUID$=r,t.default=r},function(e,t,n){\"use strict\";function r(e){return i.ddSdk.invokeAPI(a,e)}var o;Object.defineProperty(t,\"__esModule\",{value:!0});var i=n(0),a=\"device.base.getWifiStatus\";i.ddSdk.setAPI(a,(o={},o[i.ENV_ENUM.ios]={vs:\"2.11.0\"},o[i.ENV_ENUM.android]={vs:\"2.11.0\"},o)),t.getWifiStatus$=r,t.default=r},function(e,t,n){\"use strict\";function r(e){return i.ddSdk.invokeAPI(a,e)}var o;Object.defineProperty(t,\"__esModule\",{value:!0});var i=n(0),a=\"device.connection.getNetworkType\";i.ddSdk.setAPI(a,(o={},o[i.ENV_ENUM.ios]={vs:\"2.4.0\"},o[i.ENV_ENUM.android]={vs:\"2.4.0\"},o)),t.getNetworkType$=r,t.default=r},function(e,t,n){\"use strict\";function r(e){return i.ddSdk.invokeAPI(a,e)}var o;Object.defineProperty(t,\"__esModule\",{value:!0});var i=n(0),a=\"device.geolocation.checkPermission\";i.ddSdk.setAPI(a,(o={},o[i.ENV_ENUM.android]={vs:\"4.5.0\"},o)),t.checkPermission$=r,t.default=r},function(e,t,n){\"use strict\";function r(e){return i.ddSdk.invokeAPI(a,e)}var o;Object.defineProperty(t,\"__esModule\",{value:!0});var i=n(0),a=\"device.geolocation.get\";i.ddSdk.setAPI(a,(o={},o[i.ENV_ENUM.ios]={vs:\"2.4.0\"},o[i.ENV_ENUM.android]={vs:\"2.4.0\"},o)),t.get$=r,t.default=r},function(e,t,n){\"use strict\";function r(e){return i.ddSdk.invokeAPI(a,e)}var o;Object.defineProperty(t,\"__esModule\",{value:!0});var i=n(0),a=\"device.geolocation.start\";i.ddSdk.setAPI(a,(o={},o[i.ENV_ENUM.ios]={vs:\"3.4.7\"},o[i.ENV_ENUM.android]={vs:\"3.4.7\"},o)),t.start$=r,t.default=r},function(e,t,n){\"use strict\";function r(e){return i.ddSdk.invokeAPI(a,e)}var o;Object.defineProperty(t,\"__esModule\",{value:!0});var i=n(0),a=\"device.geolocation.status\";i.ddSdk.setAPI(a,(o={},o[i.ENV_ENUM.ios]={vs:\"3.4.8\"},o[i.ENV_ENUM.android]={vs:\"3.4.8\"},o)),t.status$=r,t.default=r},function(e,t,n){\"use strict\";function r(e){return i.ddSdk.invokeAPI(a,e)}var o;Object.defineProperty(t,\"__esModule\",{value:!0});var i=n(0),a=\"device.geolocation.stop\";i.ddSdk.setAPI(a,(o={},o[i.ENV_ENUM.ios]={vs:\"3.4.7\"},o[i.ENV_ENUM.android]={vs:\"3.4.7\"},o)),t.stop$=r,t.default=r},function(e,t,n){\"use strict\";function r(e){return i.ddSdk.invokeAPI(a,e)}var o;Object.defineProperty(t,\"__esModule\",{value:!0});var i=n(0),a=\"device.launcher.checkInstalledApps\";i.ddSdk.setAPI(a,(o={},o[i.ENV_ENUM.ios]={vs:\"2.4.0\"},o[i.ENV_ENUM.android]={vs:\"2.4.0\"},o)),t.checkInstalledApps$=r,t.default=r},function(e,t,n){\"use strict\";function r(e){return i.ddSdk.invokeAPI(a,e)}var o;Object.defineProperty(t,\"__esModule\",{value:!0});var i=n(0),a=\"device.launcher.launchApp\";i.ddSdk.setAPI(a,(o={},o[i.ENV_ENUM.ios]={vs:\"2.4.0\"},o[i.ENV_ENUM.android]={vs:\"2.4.0\"},o)),t.launchApp$=r,t.default=r},function(e,t,n){\"use strict\";function r(e){return i.ddSdk.invokeAPI(a,e)}var o;Object.defineProperty(t,\"__esModule\",{value:!0});var i=n(0),a=\"device.nfc.nfcRead\";i.ddSdk.setAPI(a,(o={},o[i.ENV_ENUM.ios]={vs:\"2.11.0\"},o[i.ENV_ENUM.android]={vs:\"2.11.0\"},o)),t.nfcRead$=r,t.default=r},function(e,t,n){\"use strict\";function r(e){return i.ddSdk.invokeAPI(a,e)}var o;Object.defineProperty(t,\"__esModule\",{value:!0});var i=n(0),a=\"device.nfc.nfcStop\";i.ddSdk.setAPI(a,(o={},o[i.ENV_ENUM.ios]={vs:\"4.3.9\"},o[i.ENV_ENUM.android]={vs:\"4.3.9\"},o)),t.nfcStop$=r,t.default=r},function(e,t,n){\"use strict\";function r(e){return i.ddSdk.invokeAPI(a,e)}var o;Object.defineProperty(t,\"__esModule\",{value:!0});var i=n(0),a=\"device.nfc.nfcWrite\";i.ddSdk.setAPI(a,(o={},o[i.ENV_ENUM.ios]={vs:\"2.11.0\"},o[i.ENV_ENUM.android]={vs:\"2.11.0\"},o)),t.nfcWrite$=r,t.default=r},function(e,t,n){\"use strict\";function r(e){return i.ddSdk.invokeAPI(a,e)}var o;Object.defineProperty(t,\"__esModule\",{value:!0});var i=n(0),a=\"device.notification.actionSheet\";i.ddSdk.setAPI(a,(o={},o[i.ENV_ENUM.pc]={vs:\"3.0.0\"},o[i.ENV_ENUM.ios]={vs:\"2.4.0\"},o[i.ENV_ENUM.android]={vs:\"2.4.0\"},o)),t.actionSheet$=r,t.default=r},function(e,t,n){\"use strict\";function r(e){return i.ddSdk.invokeAPI(s,e)}var o;Object.defineProperty(t,\"__esModule\",{value:!0});var i=n(0),a=n(1),s=\"device.notification.alert\",d=a.genDefaultParamsDealFn({title:\"\",buttonName:\"ç¡®å®š\"});i.ddSdk.setAPI(s,(o={},o[i.ENV_ENUM.pc]={vs:\"2.5.0\"},o[i.ENV_ENUM.ios]={vs:\"2.4.0\",paramsDeal:d},o[i.ENV_ENUM.android]={vs:\"2.4.0\",paramsDeal:d},o)),t.alert$=r,t.default=r},function(e,t,n){\"use strict\";function r(e){return i.ddSdk.invokeAPI(s,e)}var o;Object.defineProperty(t,\"__esModule\",{value:!0});var i=n(0),a=n(1),s=\"device.notification.confirm\",d=a.genDefaultParamsDealFn({title:\"\",buttonLabels:[\"ç¡®å®š\",\"å–æ¶ˆ\"]});i.ddSdk.setAPI(s,(o={},o[i.ENV_ENUM.pc]={vs:\"2.5.0\"},o[i.ENV_ENUM.ios]={vs:\"2.4.0\",paramsDeal:d},o[i.ENV_ENUM.android]={vs:\"2.4.0\",paramsDeal:d},o)),t.confirm$=r,t.default=r},function(e,t,n){\"use strict\";function r(e){return i.ddSdk.invokeAPI(a,e)}var o;Object.defineProperty(t,\"__esModule\",{value:!0});var i=n(0),a=\"device.notification.extendModal\";i.ddSdk.setAPI(a,(o={},o[i.ENV_ENUM.ios]={vs:\"2.5.0\"},o[i.ENV_ENUM.android]={vs:\"2.5.0\"},o)),t.extendModal$=r,t.default=r},function(e,t,n){\"use strict\";function r(e){return i.ddSdk.invokeAPI(a,e)}var o;Object.defineProperty(t,\"__esModule\",{value:!0});var i=n(0),a=\"device.notification.hidePreloader\";i.ddSdk.setAPI(a,(o={},o[i.ENV_ENUM.ios]={vs:\"2.4.0\"},o[i.ENV_ENUM.android]={vs:\"2.4.0\"},o)),t.hidePreloader$=r,t.default=r},function(e,t,n){\"use strict\";function r(e){return i.ddSdk.invokeAPI(a,e)}var o;Object.defineProperty(t,\"__esModule\",{value:!0});var i=n(0),a=\"device.notification.modal\";i.ddSdk.setAPI(a,(o={},o[i.ENV_ENUM.pc]={vs:\"4.2.5\"},o[i.ENV_ENUM.ios]={vs:\"2.4.0\"},o[i.ENV_ENUM.android]={vs:\"2.4.0\"},o)),t.modal$=r,t.default=r},function(e,t,n){\"use strict\";function r(e){return i.ddSdk.invokeAPI(s,e)}var o;Object.defineProperty(t,\"__esModule\",{value:!0});var i=n(0),a=n(1),s=\"device.notification.prompt\",d=a.genDefaultParamsDealFn({title:\"\",buttonLabels:[\"ç¡®å®š\",\"å–æ¶ˆ\"]});i.ddSdk.setAPI(s,(o={},o[i.ENV_ENUM.pc]={vs:\"2.7.0\"},o[i.ENV_ENUM.ios]={vs:\"2.4.0\",paramsDeal:d},o[i.ENV_ENUM.android]={vs:\"2.4.0\",paramsDeal:d},o)),t.prompt$=r,t.default=r},function(e,t,n){\"use strict\";function r(e){return i.ddSdk.invokeAPI(s,e)}var o;Object.defineProperty(t,\"__esModule\",{value:!0});var i=n(0),a=n(1),s=\"device.notification.showPreloader\",d=a.genDefaultParamsDealFn({text:\"åŠ è½½ä¸­...\",showIcon:!0});i.ddSdk.setAPI(s,(o={},o[i.ENV_ENUM.ios]={vs:\"2.4.0\",paramsDeal:d},o[i.ENV_ENUM.android]={vs:\"2.4.0\",paramsDeal:d},o)),t.showPreloader$=r,t.default=r},function(e,t,n){\"use strict\";function r(e){return i.ddSdk.invokeAPI(s,e)}var o;Object.defineProperty(t,\"__esModule\",{value:!0});var i=n(0),a=n(1),s=\"device.notification.toast\",d=a.genDefaultParamsDealFn({text:\"toast\",duration:3,delay:0});i.ddSdk.setAPI(s,(o={},o[i.ENV_ENUM.pc]={vs:\"2.5.0\",paramsDeal:function(e){return e.icon&&!e.type&&(\"success\"===e.icon?e.type=\"success\":\"error\"===e.icon&&(e.type=\"error\")),e}},o[i.ENV_ENUM.ios]={vs:\"2.4.0\",paramsDeal:d},o[i.ENV_ENUM.android]={vs:\"2.4.0\",paramsDeal:d},o)),t.toast$=r,t.default=r},function(e,t,n){\"use strict\";function r(e){return i.ddSdk.invokeAPI(s,e)}var o;Object.defineProperty(t,\"__esModule\",{value:!0});var i=n(0),a=n(1),s=\"device.notification.vibrate\",d=a.genDefaultParamsDealFn({duration:300});i.ddSdk.setAPI(s,(o={},o[i.ENV_ENUM.ios]={vs:\"2.4.0\",paramsDeal:d},o[i.ENV_ENUM.android]={vs:\"2.4.0\",paramsDeal:d},o)),t.vibrate$=r,t.default=r},function(e,t,n){\"use strict\";function r(e){return i.ddSdk.invokeAPI(a,e)}var o;Object.defineProperty(t,\"__esModule\",{value:!0});var i=n(0),a=\"device.screen.insetAdjust\";i.ddSdk.setAPI(a,(o={},o[i.ENV_ENUM.ios]={vs:\"4.6.18\"},o)),t.insetAdjust$=r,t.default=r},function(e,t,n){\"use strict\";function r(e){return i.ddSdk.invokeAPI(a,e)}var o;Object.defineProperty(t,\"__esModule\",{value:!0});var i=n(0),a=\"device.screen.resetView\";i.ddSdk.setAPI(a,(o={},o[i.ENV_ENUM.android]={vs:\"4.0.0\"},o[i.ENV_ENUM.ios]={vs:\"4.0.0\"},o)),t.resetView$=r,t.default=r},function(e,t,n){\"use strict\";function r(e){return i.ddSdk.invokeAPI(a,e)}var o;Object.defineProperty(t,\"__esModule\",{value:!0});var i=n(0),a=\"device.screen.rotateView\";i.ddSdk.setAPI(a,(o={},o[i.ENV_ENUM.android]={vs:\"4.0.0\"},o[i.ENV_ENUM.ios]={vs:\"4.0.0\"},o)),t.rotateView$=r,t.default=r},function(e,t,n){\"use strict\";function r(e){return i.ddSdk.invokeAPI(a,e)}var o;Object.defineProperty(t,\"__esModule\",{value:!0});var i=n(0),a=\"net.bjGovApn.loginGovNet\";i.ddSdk.setAPI(a,(o={},o[i.ENV_ENUM.android]={vs:\"4.5.16\"},o)),t.loginGovNet$=r,t.default=r},function(e,t,n){\"use strict\";function r(e){return i.ddSdk.invokeAPI(a,e)}var o;Object.defineProperty(t,\"__esModule\",{value:!0});var i=n(0),a=\"runtime.message.fetch\";i.ddSdk.setAPI(a,(o={},o[i.ENV_ENUM.ios]={vs:\"2.6.0\"},o[i.ENV_ENUM.android]={vs:\"2.6.0\"},o)),t.fetch$=r,t.default=r},function(e,t,n){\"use strict\";function r(e){return i.ddSdk.invokeAPI(a,e)}var o;Object.defineProperty(t,\"__esModule\",{value:!0});var i=n(0),a=\"runtime.message.post\";i.ddSdk.setAPI(a,(o={},o[i.ENV_ENUM.ios]={vs:\"2.6.0\"},o[i.ENV_ENUM.android]={vs:\"2.6.0\"},o)),t.post$=r,t.default=r},function(e,t,n){\"use strict\";function r(e){return i.ddSdk.invokeAPI(a,e)}var o;Object.defineProperty(t,\"__esModule\",{value:!0});var i=n(0),a=\"runtime.permission.requestAuthCode\",s=function(e){return Object.assign(e,{url:location.href.split(\"#\")[0]})};i.ddSdk.setAPI(a,(o={},o[i.ENV_ENUM.pc]={vs:\"3.0.0\",paramsDeal:s},o[i.ENV_ENUM.ios]={vs:\"2.4.0\"},o[i.ENV_ENUM.android]={vs:\"2.4.0\"},o)),t.requestAuthCode$=r,t.default=r},function(e,t,n){\"use strict\";function r(e){return i.ddSdk.invokeAPI(a,e)}var o;Object.defineProperty(t,\"__esModule\",{value:!0});var i=n(0),a=\"runtime.permission.requestOperateAuthCode\",s=function(e){return Object.assign(e,{url:location.href.split(\"#\")[0]})};i.ddSdk.setAPI(a,(o={},o[i.ENV_ENUM.pc]={vs:\"3.3.0\",paramsDeal:s},o[i.ENV_ENUM.ios]={vs:\"3.3.0\"},o[i.ENV_ENUM.android]={vs:\"3.3.0\"},o)),t.requestOperateAuthCode$=r,t.default=r},function(e,t,n){\"use strict\";function r(e){return i.ddSdk.invokeAPI(a,e)}var o;Object.defineProperty(t,\"__esModule\",{value:!0});var i=n(0),a=\"ui.input.plain\";i.ddSdk.setAPI(a,(o={},o[i.ENV_ENUM.ios]={vs:\"2.4.0\"},o[i.ENV_ENUM.android]={vs:\"2.4.0\"},o)),t.plain$=r,t.default=r},function(e,t,n){\"use strict\";function r(e){return i.ddSdk.invokeAPI(a,e)}var o;Object.defineProperty(t,\"__esModule\",{value:!0});var i=n(0),a=\"ui.nav.close\";i.ddSdk.setAPI(a,(o={},o[i.ENV_ENUM.ios]={vs:\"2.6.0\"},o[i.ENV_ENUM.android]={vs:\"2.6.0\"},o)),t.close$=r,t.default=r},function(e,t,n){\"use strict\";function r(e){return i.ddSdk.invokeAPI(a,e)}var o;Object.defineProperty(t,\"__esModule\",{value:!0});var i=n(0),a=\"ui.nav.getCurrentId\";i.ddSdk.setAPI(a,(o={},o[i.ENV_ENUM.ios]={vs:\"2.6.0\"},o[i.ENV_ENUM.android]={vs:\"2.6.0\"},o)),t.getCurrentId$=r,t.default=r},function(e,t,n){\"use strict\";function r(e){return i.ddSdk.invokeAPI(a,e)}var o;Object.defineProperty(t,\"__esModule\",{value:!0});var i=n(0),a=\"ui.nav.go\";i.ddSdk.setAPI(a,(o={},o[i.ENV_ENUM.ios]={vs:\"2.6.0\"},o[i.ENV_ENUM.android]={vs:\"2.6.0\"},o)),t.go$=r,t.default=r},function(e,t,n){\"use strict\";function r(e){return i.ddSdk.invokeAPI(a,e)}var o;Object.defineProperty(t,\"__esModule\",{value:!0});var i=n(0),a=\"ui.nav.preload\";i.ddSdk.setAPI(a,(o={},o[i.ENV_ENUM.ios]={vs:\"2.6.0\"},o[i.ENV_ENUM.android]={vs:\"2.6.0\"},o)),t.preload$=r,t.default=r},function(e,t,n){\"use strict\";function r(e){return i.ddSdk.invokeAPI(a,e)}var o;Object.defineProperty(t,\"__esModule\",{value:!0});var i=n(0),a=\"ui.nav.recycle\";i.ddSdk.setAPI(a,(o={},o[i.ENV_ENUM.ios]={vs:\"2.6.0\"},o[i.ENV_ENUM.android]={vs:\"2.6.0\"},o)),t.recycle$=r,t.default=r},function(e,t,n){\"use strict\";function r(e){return i.ddSdk.invokeAPI(a,e)}var o;Object.defineProperty(t,\"__esModule\",{value:!0});var i=n(0),a=\"ui.progressBar.setColors\";i.ddSdk.setAPI(a,(o={},o[i.ENV_ENUM.ios]={vs:\"2.4.0\"},o[i.ENV_ENUM.android]={vs:\"2.4.0\"},o)),t.setColors$=r,t.default=r},function(e,t,n){\"use strict\";function r(e){return i.ddSdk.invokeAPI(a,e)}var o;Object.defineProperty(t,\"__esModule\",{value:!0});var i=n(0),a=\"ui.pullToRefresh.disable\";i.ddSdk.setAPI(a,(o={},o[i.ENV_ENUM.ios]={vs:\"2.4.0\"},o[i.ENV_ENUM.android]={vs:\"2.4.0\"},o)),t.disable$=r,t.default=r},function(e,t,n){\"use strict\";function r(e){return i.ddSdk.invokeAPI(s,e)}var o;Object.defineProperty(t,\"__esModule\",{value:!0});var i=n(0),a=n(1),s=\"ui.pullToRefresh.enable\";i.ddSdk.setAPI(s,(o={},o[i.ENV_ENUM.ios]={vs:\"2.4.0\",paramsDeal:a.addWatchParamsDeal},o[i.ENV_ENUM.android]={vs:\"2.4.0\",paramsDeal:a.addWatchParamsDeal},o)),t.enable$=r,t.default=r},function(e,t,n){\"use strict\";function r(e){return i.ddSdk.invokeAPI(a,e)}var o;Object.defineProperty(t,\"__esModule\",{value:!0});var i=n(0),a=\"ui.pullToRefresh.stop\";i.ddSdk.setAPI(a,(o={},o[i.ENV_ENUM.ios]={vs:\"2.4.0\"},o[i.ENV_ENUM.android]={vs:\"2.4.0\"},o)),t.stop$=r,t.default=r},function(e,t,n){\"use strict\";function r(e){return i.ddSdk.invokeAPI(a,e)}var o;Object.defineProperty(t,\"__esModule\",{value:!0});var i=n(0),a=\"ui.webViewBounce.disable\";i.ddSdk.setAPI(a,(o={},o[i.ENV_ENUM.ios]={vs:\"2.4.0\"},o[i.ENV_ENUM.android]={vs:\"2.4.0\"},o)),t.disable$=r,t.default=r},function(e,t,n){\"use strict\";function r(e){return i.ddSdk.invokeAPI(a,e)}var o;Object.defineProperty(t,\"__esModule\",{value:!0});var i=n(0),a=\"ui.webViewBounce.enable\";i.ddSdk.setAPI(a,(o={},o[i.ENV_ENUM.ios]={vs:\"2.4.0\"},o[i.ENV_ENUM.android]={vs:\"2.4.0\"},o)),t.enable$=r,t.default=r},function(e,t,n){\"use strict\";function r(e){return i.ddSdk.invokeAPI(a,e)}var o;Object.defineProperty(t,\"__esModule\",{value:!0});var i=n(0),a=\"util.domainStorage.getItem\";i.ddSdk.setAPI(a,(o={},o[i.ENV_ENUM.ios]={vs:\"2.9.0\"},o[i.ENV_ENUM.android]={vs:\"2.9.0\"},o[i.ENV_ENUM.pc]={vs:\"4.6.29\"},o)),t.getItem$=r,t.default=r},function(e,t,n){\"use strict\";function r(e){return i.ddSdk.invokeAPI(a,e)}var o;Object.defineProperty(t,\"__esModule\",{value:!0});var i=n(0),a=\"util.domainStorage.removeItem\";i.ddSdk.setAPI(a,(o={},o[i.ENV_ENUM.ios]={vs:\"2.9.0\"},o[i.ENV_ENUM.android]={vs:\"2.9.0\"},o[i.ENV_ENUM.pc]={vs:\"4.6.29\"},o)),t.removeItem$=r,t.default=r},function(e,t,n){\"use strict\";function r(e){return i.ddSdk.invokeAPI(a,e)}var o;Object.defineProperty(t,\"__esModule\",{value:!0});var i=n(0),a=\"util.domainStorage.setItem\";i.ddSdk.setAPI(a,(o={},o[i.ENV_ENUM.ios]={vs:\"2.9.0\"},o[i.ENV_ENUM.android]={vs:\"2.9.0\"},o[i.ENV_ENUM.pc]={vs:\"4.6.9\"},o)),t.setItem$=r,t.default=r},function(e,t,n){\"use strict\";var r=n(0),o=n(181),i=Object.assign({},o,r.ddSdk.getExportSdk());e.exports=i},function(e,t,n){\"use strict\";var r=n(174);n(191),e.exports=r},function(e,t,n){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0});var r;t.h5AndroidbridgeInit=function(){return r||(r=new Promise(function(e,t){var n=function(){try{window.WebViewJavascriptBridgeAndroid=window.nuva&&window.nuva.require(),e()}catch(e){t(e)}};window.nuva&&(void 0===window.nuva.isReady||window.nuva.isReady)?n():document.addEventListener(\"runtimeready\",function(){n()},!1)})),r};var o=function(e,n){return r||(r=t.h5AndroidbridgeInit()),r.then(function(){return new Promise(function(t,r){var o=e.split(\".\"),i=o.pop()||\"\",a=o.join(\".\"),s=function(e){\"function\"==typeof n.onSuccess&&n.onSuccess(e),t(e)},d=function(e){\"function\"==typeof n.onFail&&n.onFail(e),r(e)};\"function\"==typeof window.WebViewJavascriptBridgeAndroid&&window.WebViewJavascriptBridgeAndroid(s,d,a,i,n)})})};t.default=o},function(e,t,n){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0});var r;t.h5IosBridgeInit=function(){return r||(r=new Promise(function(e,t){if(\"undefined\"!=typeof WebViewJavascriptBridge){try{WebViewJavascriptBridge.init(function(e,t){})}catch(e){return t()}return e()}document.addEventListener(\"WebViewJavascriptBridgeReady\",function(){if(\"undefined\"==typeof WebViewJavascriptBridge)return t();try{WebViewJavascriptBridge.init(function(e,t){})}catch(e){return t()}return e()},!1)})),r};var o=function(e,n){return r||(r=t.h5IosBridgeInit()),r.then(function(){var t=Object.assign({},n);return new Promise(function(n,r){if(!0===t.watch){var o=t.onSuccess;delete t.onSuccess,\"undefined\"!=typeof WebViewJavascriptBridge&&WebViewJavascriptBridge.registerHandler(e,function(e,t){\"function\"==typeof o&&o.call(null,e),t&&t({errorCode:\"0\",errorMessage:\"success\"})})}void 0!==window.WebViewJavascriptBridge&&window.WebViewJavascriptBridge.callHandler(e,Object.assign({},t),function(e){var o=e||{};\"0\"===o.errorCode?(\"function\"==typeof t.onSuccess&&t.onSuccess.call(null,o.result),n(o.result)):(\"-1\"===o.errorCode&&\"function\"==typeof t.onCancel?t.onCancel.call(null,o.result,o.errorCode):\"function\"==typeof t.onFail&&t.onFail.call(null,o.result,o.errorCode),r(o.result))})})})};t.default=o},function(e,t,n){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.h5PcBridgeInit=function(){return Promise.resolve(n(4))};var r=function(e,t){return new Promise(function(r,o){return n(4).invokeAPI(e,t).result.then(function(e){return\"function\"==typeof t.onSuccess&&t.onSuccess.call(null,e),r(e)},function(e){return\"function\"==typeof t.onFail&&t.onFail.call(null,e),o(e)})})};t.default=r},function(e,t,n){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.on=function(e,t){n(4).addEventListener(e,t)},t.off=function(e,t){n(4).removeEventListener(e,t)}},function(e,t,n){\"use strict\";function r(e){return e=\"00\"+e,e.substring(e.length-2,e.length)}var o=this&&this.__spreadArrays||function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;for(var r=Array(e),o=0,t=0;t<n;t++)for(var i=arguments[t],a=0,s=i.length;a<s;a++,o++)r[o]=i[a];return r};Object.defineProperty(t,\"__esModule\",{value:!0}),t.log=function(e){console.log.apply(console,o([r(e.time.getHours())+\":\"+r(e.time.getMinutes())+\":\"+r(e.time.getSeconds())],e.text))}},function(e,t,n){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0});var r=n(2),o=r.getENV();t.ios=o.platform===r.ENV_ENUM.ios,t.android=o.platform===r.ENV_ENUM.android,t.pc=o.platform===r.ENV_ENUM.pc,t.other=o.platform===r.ENV_ENUM.notInDingTalk,t.compareVersion=function(e,t,n){function r(e){return parseInt(e,10)||0}if(\"string\"!=typeof e||\"string\"!=typeof t)return!1;for(var o,i,a=e.split(\"-\")[0].split(\".\").map(r),s=t.split(\"-\")[0].split(\".\").map(r);o===i&&s.length>0;)o=a.shift(),i=s.shift();return n?(i||0)>=(o||0):(i||0)>(o||0)},t.language=o.language,t.version=o.version},function(e,t,n){\"use strict\";function r(e,t,n){var r=\"Web\"===n.platform,i=\"iOS\"===n.platform,a=\"android\"===n.platform,s=a||i,d=function(){return r?window.navigator.userAgent.toLowerCase():\"\"}(),u=function(){var e={};if(r){var t=window.name;try{var n=JSON.parse(t);e.containerId=n.containerId,e.version=n.hostVersion,e.language=n.language||\"*\"}catch(e){}}return e}(),c=function(){return s?\"DingTalk\"===n.appName||\"com.alibaba.android.rimet\"===n.appName:d.indexOf(\"dingtalk\")>-1||!!u.containerId}(),l=function(){if(r){if(u.version)return u.version;var e=d.match(/aliapp\\(\\w+\\/([a-zA-Z0-9.-]+)\\)/);null===e&&(e=d.match(/dingtalk\\/([a-zA-Z0-9.-]+)/));return e&&e[1]||\"Unknown\"}return n.appVersion}(),f=!!u.containerId,v=/iphone|ipod|ios/.test(d),p=/ipad/.test(d),_=d.indexOf(\"android\")>-1,E=d.indexOf(\"mac\")>-1&&f,N=d.indexOf(\"win\")>-1&&f,P=!E&&!N&&f,M=f,h=\"\";return h=c?v||i?o.PLATFORM.IOS:_||a?o.PLATFORM.ANDROID:p?o.PLATFORM.IPAD:E?o.PLATFORM.MAC:N?o.PLATFORM.WINDOWS:P?o.PLATFORM.BROWSER:o.PLATFORM.UNKNOWN:o.PLATFORM.UNKNOWN,{isDingTalk:c,isWebiOS:v,isWebAndroid:_,isWeexiOS:i,isWeexAndroid:a,isDingTalkPCMac:E,isDingTalkPCWeb:P,isDingTalkPCWindows:N,isDingTalkPC:M,runtime:e,framework:t,platform:h,version:l,isWeex:s}}Object.defineProperty(t,\"__esModule\",{value:!0});var o=n(11);t.default=r},function(e,t,n){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0});var r=n(184),o=n(182),i=n(11),a=r.default().split(\".\"),s=a[0],d=a[1],u=function(){var e={};switch(d){case i.FRAMEWORK.VUE:var t=weex.config,n=t.env;e.platform=n.platform,i.RUNTIME.WEEX===s&&(e.appVersion=n.appVersion,e.appName=n.appName);break;case i.FRAMEWORK.RAX:i.RUNTIME.WEEX===s&&(e.platform=navigator.platform,e.appName=navigator.appName,e.appVersion=navigator.appVersion);break;case i.FRAMEWORK.UNKNOWN:i.RUNTIME.WEB===s&&(e.platform=i.RUNTIME.WEB),i.RUNTIME.UNKNOWN===s&&(e.platform=i.RUNTIME.UNKNOWN)}return e}(),c=o.default(s,d,u);t.default=c},function(e,t,n){\"use strict\";function r(e,t){for(var n=e.length,r=0,o=!0;r<n;r++)try{if(!(e[r]in t)){o=!1;break}}catch(e){o=!1;break}return o}function o(){return i&&a?r(c,weex)?\"Web.Vue\":\"Web.Unknown\":!i&&a?r(c,weex)?\"Weex.Vue\":\"Weex.Unknown\":i&&s&&!a?r(d,window)?\"Weex.Rax\":\"Weex.Unknown\":i&&r(u,window)?\"Web.Unknown\":\"Unknown.Unknown\"}Object.defineProperty(t,\"__esModule\",{value:!0});var i=\"undefined\"!=typeof window,a=\"undefined\"!=typeof weex,s=\"undefined\"!=typeof callNative,d=[\"__weex_config__\",\"__weex_options__\",\"__weex_require__\"],u=[\"localStorage\",\"location\",\"navigator\",\"XMLHttpRequest\"],c=[\"config\",\"requireModule\",\"document\"];t.default=o},function(e,t,n){\"function\"!=typeof Promise&&n(195)},function(e,t,n){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),n(185),n(187),n(188)},function(e,t){\"function\"!=typeof Object.assign&&Object.defineProperty(Object,\"assign\",{value:function(e,t){\"use strict\";if(null==e)throw new TypeError(\"Cannot convert undefined or null to object\");for(var n=Object(e),r=1;r<arguments.length;r++){var o=arguments[r];if(null!=o)for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(n[i]=o[i])}return n},writable:!0,configurable:!0})},function(e,t){Object.keys||(Object.keys=function(e){if(e!==Object(e))throw new TypeError(\"Object.keys called on a non-object\");var t,n=[];for(t in e)Object.prototype.hasOwnProperty.call(e,t)&&n.push(t);return n})},function(e,t,n){\"use strict\";function r(e){return\"function\"==typeof e}function o(e,t){function n(e){return parseInt(e,10)||0}for(var r=e.split(\".\").map(n),o=t.split(\".\").map(n),i=0;i<r.length;i++){if(void 0===o[i])return!1;if(r[i]<o[i])return!1;if(r[i]>o[i])return!0}return!0}Object.defineProperty(t,\"__esModule\",{value:!0}),t.isFunction=r,t.compareVersion=o;(function(e){e.cancel=\"-1\",e.not_exist=\"1\",e.no_permission=\"7\",e.jsapi_internal_error=\"22\"})(t.ERROR_CODE||(t.ERROR_CODE={}));(function(e){e.pc=\"pc\",e.android=\"android\",e.ios=\"ios\",e.notInDingTalk=\"notInDingTalk\"})(t.ENV_ENUM||(t.ENV_ENUM={}));(function(e){e.mac=\"mac\",e.win=\"win\",e.noSub=\"noSub\"})(t.ENV_ENUM_SUB||(t.ENV_ENUM_SUB={}));(function(e){e.WEB=\"WEB\",e.MINI_APP=\"MINI_APP\",e.WEEX=\"WEEX\",e.WEBVIEW_IN_MINIAPP=\"WEBVIEW_IN_MINIAPP\",e.WEEX_WIDGET=\"WEEX_WIDGET\"})(t.APP_TYPE||(t.APP_TYPE={}));(function(e){e[e.INFO=1]=\"INFO\",e[e.WARNING=2]=\"WARNING\",e[e.ERROR=3]=\"ERROR\"})(t.LogLevel||(t.LogLevel={}))},function(e,t,n){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0});var r=n(0),o=n(2),i=n(3),a=n(5),s=n(9),d=n(176),u=n(6),c=n(8),l=n(10);r.ddSdk.setPlatform({platform:o.ENV_ENUM.android,bridgeInit:function(){var e=o.getENV();return e.appType===i.APP_TYPE.MINI_APP?Promise.resolve(a.default):e.appType===i.APP_TYPE.WEBVIEW_IN_MINIAPP?Promise.resolve(s.default):e.appType===i.APP_TYPE.WEEX?u.androidWeexBridge():d.h5AndroidbridgeInit().then(function(){return d.default})},authMethod:\"runtime.permission.requestJsApis\",event:{on:function(e,t){var n=o.getENV();switch(n.appType){case i.APP_TYPE.WEB:case i.APP_TYPE.WEBVIEW_IN_MINIAPP:c.on(e,t);break;case i.APP_TYPE.WEEX:l.on(e,t);break;default:throw new Error(\"Not support global event in the platfrom: \"+n.appType)}},off:function(e,t){var n=o.getENV();switch(n.appType){case i.APP_TYPE.WEB:case i.APP_TYPE.WEBVIEW_IN_MINIAPP:c.off(e,t);break;case i.APP_TYPE.WEEX:l.off(e,t);break;default:throw new Error(\"Not support global event in the platfrom: \"+n.appType)}}}})},function(e,t,n){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),n(193),n(190),n(192)},function(e,t,n){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0});var r=n(0),o=n(2),i=n(3),a=n(5),s=n(9),d=n(177),u=n(6),c=n(8),l=n(10);r.ddSdk.setPlatform({platform:o.ENV_ENUM.ios,bridgeInit:function(){var e=o.getENV();return e.appType===i.APP_TYPE.MINI_APP?Promise.resolve(a.default):e.appType===i.APP_TYPE.WEBVIEW_IN_MINIAPP?Promise.resolve(s.default):e.appType===i.APP_TYPE.WEEX?u.iosWeexBridge():d.h5IosBridgeInit().then(function(){return d.default})},authMethod:\"runtime.permission.requestJsApis\",event:{on:function(e,t){var n=o.getENV();switch(n.appType){case i.APP_TYPE.WEB:case i.APP_TYPE.WEBVIEW_IN_MINIAPP:c.on(e,t);break;case i.APP_TYPE.WEEX:l.on(e,t);break;default:throw new Error(\"Not support global event in the platfrom: \"+n.appType)}},off:function(e,t){var n=o.getENV();switch(n.appType){case i.APP_TYPE.WEB:case i.APP_TYPE.WEBVIEW_IN_MINIAPP:c.off(e,t);break;case i.APP_TYPE.WEEX:l.off(e,t);break;default:throw new Error(\"Not support global event in the platfrom: \"+n.appType)}}}})},function(e,t,n){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0});var r=n(0),o=n(2),i=n(178),a=n(5),s=n(3),d=n(179);r.ddSdk.setPlatform({platform:o.ENV_ENUM.pc,bridgeInit:function(){switch(o.getENV().appType){case s.APP_TYPE.MINI_APP:return Promise.resolve(a.default);default:return i.h5PcBridgeInit().then(function(){return i.default})}},authMethod:\"config\",authParamsDeal:function(e){var t=Object.assign({},e);return t.url=window.location.href.split(\"#\")[0],t},event:{on:function(e,t){if(o.getENV().appType===s.APP_TYPE.WEB)return d.on(e,t)},off:function(e,t){if(o.getENV().appType===s.APP_TYPE.WEB)return d.off(e,t)}}})},function(e,t){function n(){throw new Error(\"setTimeout has not been defined\")}function r(){throw new Error(\"clearTimeout has not been defined\")}function o(e){if(c===setTimeout)return setTimeout(e,0);if((c===n||!c)&&setTimeout)return c=setTimeout,setTimeout(e,0);try{return c(e,0)}catch(t){try{return c.call(null,e,0)}catch(t){return c.call(this,e,0)}}}function i(e){if(l===clearTimeout)return clearTimeout(e);if((l===r||!l)&&clearTimeout)return l=clearTimeout,clearTimeout(e);try{return l(e)}catch(t){try{return l.call(null,e)}catch(t){return l.call(this,e)}}}function a(){_&&v&&(_=!1,v.length?p=v.concat(p):E=-1,p.length&&s())}function s(){if(!_){var e=o(a);_=!0;for(var t=p.length;t;){for(v=p,p=[];++E<t;)v&&v[E].run();E=-1,t=p.length}v=null,_=!1,i(e)}}function d(e,t){this.fun=e,this.array=t}function u(){}var c,l,f=e.exports={};(function(){try{c=\"function\"==typeof setTimeout?setTimeout:n}catch(e){c=n}try{l=\"function\"==typeof clearTimeout?clearTimeout:r}catch(e){l=r}})();var v,p=[],_=!1,E=-1;f.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];p.push(new d(e,t)),1!==p.length||_||o(s)},d.prototype.run=function(){this.fun.apply(null,this.array)},f.title=\"browser\",f.browser=!0,f.env={},f.argv=[],f.version=\"\",f.versions={},f.on=u,f.addListener=u,f.once=u,f.off=u,f.removeListener=u,f.removeAllListeners=u,f.emit=u,f.prependListener=u,f.prependOnceListener=u,f.listeners=function(e){return[]},f.binding=function(e){throw new Error(\"process.binding is not supported\")},f.cwd=function(){return\"/\"},f.chdir=function(e){throw new Error(\"process.chdir is not supported\")},f.umask=function(){return 0}},function(e,t,n){(function(e,t){(function(e,t){t()})(0,function(){\"use strict\";function n(){}function r(e,t){return function(){e.apply(t,arguments)}}function o(e){if(!(this instanceof o))throw new TypeError(\"Promises must be constructed via new\");if(\"function\"!=typeof e)throw new TypeError(\"not a function\");this._state=0,this._handled=!1,this._value=void 0,this._deferreds=[],c(e,this)}function i(e,t){for(;3===e._state;)e=e._value;if(0===e._state)return void e._deferreds.push(t);e._handled=!0,o._immediateFn(function(){var n=1===e._state?t.onFulfilled:t.onRejected;if(null===n)return void(1===e._state?a:s)(t.promise,e._value);var r;try{r=n(e._value)}catch(e){return void s(t.promise,e)}a(t.promise,r)})}function a(e,t){try{if(t===e)throw new TypeError(\"A promise cannot be resolved with itself.\");if(t&&(\"object\"==typeof t||\"function\"==typeof t)){var n=t.then;if(t instanceof o)return e._state=3,e._value=t,void d(e);if(\"function\"==typeof n)return void c(r(n,t),e)}e._state=1,e._value=t,d(e)}catch(t){s(e,t)}}function s(e,t){e._state=2,e._value=t,d(e)}function d(e){2===e._state&&0===e._deferreds.length&&o._immediateFn(function(){e._handled||o._unhandledRejectionFn(e._value)});for(var t=0,n=e._deferreds.length;t<n;t++)i(e,e._deferreds[t]);e._deferreds=null}function u(e,t,n){this.onFulfilled=\"function\"==typeof e?e:null,this.onRejected=\"function\"==typeof t?t:null,this.promise=n}function c(e,t){var n=!1;try{e(function(e){n||(n=!0,a(t,e))},function(e){n||(n=!0,s(t,e))})}catch(e){if(n)return;n=!0,s(t,e)}}var l=setTimeout;o.prototype.catch=function(e){return this.then(null,e)},o.prototype.then=function(e,t){var r=new this.constructor(n);return i(this,new u(e,t,r)),r},o.prototype.finally=function(e){var t=this.constructor;return this.then(function(n){return t.resolve(e()).then(function(){return n})},function(n){return t.resolve(e()).then(function(){return t.reject(n)})})},o.all=function(e){return new o(function(t,n){function r(e,a){try{if(a&&(\"object\"==typeof a||\"function\"==typeof a)){var s=a.then;if(\"function\"==typeof s)return void s.call(a,function(t){r(e,t)},n)}o[e]=a,0==--i&&t(o)}catch(e){n(e)}}if(!e||void 0===e.length)throw new TypeError(\"Promise.all accepts an array\");var o=Array.prototype.slice.call(e);if(0===o.length)return t([]);for(var i=o.length,a=0;a<o.length;a++)r(a,o[a])})},o.resolve=function(e){return e&&\"object\"==typeof e&&e.constructor===o?e:new o(function(t){t(e)})},o.reject=function(e){return new o(function(t,n){n(e)})},o.race=function(e){return new o(function(t,n){for(var r=0,o=e.length;r<o;r++)e[r].then(t,n)})},o._immediateFn=\"function\"==typeof e&&function(t){e(t)}||function(e){l(e,0)},o._unhandledRejectionFn=function(e){\"undefined\"!=typeof console&&console&&console.warn(\"Possible Unhandled Promise Rejection:\",e)};var f=function(){if(\"undefined\"!=typeof self)return self;if(\"undefined\"!=typeof window)return window;if(void 0!==t)return t;throw new Error(\"unable to locate global object\")}();f.Promise||(f.Promise=o)})}).call(t,n(197).setImmediate,n(7))},function(e,t,n){(function(e,t){(function(e,n){\"use strict\";function r(e){\"function\"!=typeof e&&(e=new Function(\"\"+e));for(var t=new Array(arguments.length-1),n=0;n<t.length;n++)t[n]=arguments[n+1];var r={callback:e,args:t};return u[d]=r,s(d),d++}function o(e){delete u[e]}function i(e){var t=e.callback,r=e.args;switch(r.length){case 0:t();break;case 1:t(r[0]);break;case 2:t(r[0],r[1]);break;case 3:t(r[0],r[1],r[2]);break;default:t.apply(n,r)}}function a(e){if(c)setTimeout(a,0,e);else{var t=u[e];if(t){c=!0;try{i(t)}finally{o(e),c=!1}}}}if(!e.setImmediate){var s,d=1,u={},c=!1,l=e.document,f=Object.getPrototypeOf&&Object.getPrototypeOf(e);f=f&&f.setTimeout?f:e,\"[object process]\"==={}.toString.call(e.process)?function(){s=function(e){t.nextTick(function(){a(e)})}}():!function(){if(e.postMessage&&!e.importScripts){var t=!0,n=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage(\"\",\"*\"),e.onmessage=n,t}}()?e.MessageChannel?function(){var e=new MessageChannel;e.port1.onmessage=function(e){a(e.data)},s=function(t){e.port2.postMessage(t)}}():l&&\"onreadystatechange\"in l.createElement(\"script\")?function(){var e=l.documentElement;s=function(t){var n=l.createElement(\"script\");n.onreadystatechange=function(){a(t),n.onreadystatechange=null,e.removeChild(n),n=null},e.appendChild(n)}}():function(){s=function(e){setTimeout(a,0,e)}}():function(){var t=\"setImmediate$\"+Math.random()+\"$\",n=function(n){n.source===e&&\"string\"==typeof n.data&&0===n.data.indexOf(t)&&a(+n.data.slice(t.length))};e.addEventListener?e.addEventListener(\"message\",n,!1):e.attachEvent(\"onmessage\",n),s=function(n){e.postMessage(t+n,\"*\")}}(),f.setImmediate=r,f.clearImmediate=o}})(\"undefined\"==typeof self?void 0===e?this:e:self)}).call(t,n(7),n(194))},function(e,t,n){(function(e){function r(e,t){this._id=e,this._clearFn=t}var o=void 0!==e&&e||\"undefined\"!=typeof self&&self||window,i=Function.prototype.apply;t.setTimeout=function(){return new r(i.call(setTimeout,o,arguments),clearTimeout)},t.setInterval=function(){return new r(i.call(setInterval,o,arguments),clearInterval)},t.clearTimeout=t.clearInterval=function(e){e&&e.close()},r.prototype.unref=r.prototype.ref=function(){},r.prototype.close=function(){this._clearFn.call(o,this._id)},t.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},t.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},t._unrefActive=t.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout(function(){e._onTimeout&&e._onTimeout()},t))},n(196),t.setImmediate=\"undefined\"!=typeof self&&self.setImmediate||void 0!==e&&e.setImmediate||this&&this.setImmediate,t.clearImmediate=\"undefined\"!=typeof self&&self.clearImmediate||void 0!==e&&e.clearImmediate||this&&this.clearImmediate}).call(t,n(7))},,function(e,t,n){\"use strict\";var r=n(175),o=n(665),i=Object.assign(r,o.apiObj);e.exports=i},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0});var r=n(12),o=n(13),i=n(14),a=n(15),s=n(16),d=n(17),u=n(18),c=n(19),l=n(20),f=n(21),v=n(22),p=n(23),_=n(24),E=n(25),N=n(26),P=n(27),M=n(28),h=n(29),m=n(30),k=n(31),b=n(32),g=n(33),I=n(34),y=n(35),A=n(36),S=n(37),V=n(38),U=n(39),O=n(40),j=n(41),$=n(42),w=n(43),D=n(44),C=n(45),T=n(46),W=n(47),R=n(48),x=n(49),F=n(50),L=n(51),B=n(52),z=n(53),q=n(54),Y=n(55),J=n(56),G=n(57),H=n(58),X=n(59),K=n(60),Q=n(61),Z=n(62),ee=n(63),te=n(64),ne=n(65),re=n(66),oe=n(67),ie=n(68),ae=n(69),se=n(70),de=n(71),ue=n(72),ce=n(73),le=n(74),fe=n(75),ve=n(76),pe=n(77),_e=n(78),Ee=n(79),Ne=n(80),Pe=n(81),Me=n(82),he=n(83),me=n(84),ke=n(85),be=n(86),ge=n(87),Ie=n(88),ye=n(89),Ae=n(90),Se=n(91),Ve=n(92),Ue=n(93),Oe=n(94),je=n(95),$e=n(96),we=n(97),De=n(98),Ce=n(99),Te=n(100),We=n(101),Re=n(102),xe=n(103),Fe=n(104),Le=n(105),Be=n(106),ze=n(107),qe=n(108),Ye=n(109),Je=n(110),Ge=n(111),He=n(112),Xe=n(113),Ke=n(114),Qe=n(115),Ze=n(116),et=n(117),tt=n(118),nt=n(119),rt=n(120),ot=n(121),it=n(122),at=n(123),st=n(124),dt=n(125),ut=n(126),ct=n(127),lt=n(128),ft=n(129),vt=n(130),pt=n(131),_t=n(132),Et=n(133),Nt=n(134),Pt=n(135),Mt=n(136),ht=n(137),mt=n(138),kt=n(139),bt=n(140),gt=n(141),It=n(142),yt=n(143),At=n(144),St=n(145),Vt=n(146),Ut=n(147),Ot=n(148),jt=n(149),$t=n(150),wt=n(151),Dt=n(152),Ct=n(153),Tt=n(154),Wt=n(155),Rt=n(156),xt=n(157),Ft=n(158),Lt=n(159),Bt=n(160),zt=n(161),qt=n(162),Yt=n(163),Jt=n(164),Gt=n(165),Ht=n(166),Xt=n(167),Kt=n(168),Qt=n(169),Zt=n(170),en=n(171),tn=n(172),nn=n(173);t.apiObj={biz:{ATMBle:{beaconPicker:r.beaconPicker$,faceManager:o.faceManager$,punchModePicker:i.punchModePicker$},alipay:{pay:a.pay$},calendar:{chooseDateTime:s.chooseDateTime$,chooseHalfDay:d.chooseHalfDay$,chooseInterval:u.chooseInterval$,chooseOneDay:c.chooseOneDay$},chat:{chooseConversationByCorpId:l.chooseConversationByCorpId$,collectSticker:f.collectSticker$,createSceneGroup:v.createSceneGroup$,getRealmCid:p.getRealmCid$,locationChatMessage:_.locationChatMessage$,openSingleChat:E.openSingleChat$,pickConversation:N.pickConversation$,sendEmotion:P.sendEmotion$,toConversation:M.toConversation$},clipboardData:{setData:h.setData$},conference:{videoConfCall:m.videoConfCall$},contact:{choose:k.choose$,chooseMobileContacts:b.chooseMobileContacts$,complexPicker:g.complexPicker$,createGroup:I.createGroup$,departmentsPicker:y.departmentsPicker$,externalComplexPicker:A.externalComplexPicker$,externalEditForm:S.externalEditForm$,setRule:V.setRule$},cspace:{chooseSpaceDir:U.chooseSpaceDir$,delete:O.delete$,preview:j.preview$,saveFile:$.saveFile$},customContact:{choose:w.choose$,multipleChoose:D.multipleChoose$},ding:{create:C.create$,post:T.post$},event:{notifyWeex:W.notifyWeex$},intent:{fetchData:R.fetchData$},iot:{bind:x.bind$,bindMeetingRoom:F.bindMeetingRoom$,getDeviceProperties:L.getDeviceProperties$,invokeThingService:B.invokeThingService$,queryMeetingRoomList:z.queryMeetingRoomList$,setDeviceProperties:q.setDeviceProperties$,unbind:Y.unbind$},map:{locate:J.locate$,search:G.search$,view:H.view$},media:{compressVideo:X.compressVideo$},microApp:{openApp:K.openApp$},navigation:{close:Q.close$,goBack:Z.goBack$,hideBar:ee.hideBar$,quit:te.quit$,replace:ne.replace$,setIcon:re.setIcon$,setLeft:oe.setLeft$,setMenu:ie.setMenu$,setRight:ae.setRight$,setTitle:se.setTitle$},realm:{subscribe:de.subscribe$,unsubscribe:ue.unsubscribe$},shortCut:{addShortCut:ce.addShortCut$},store:{closeUnpayOrder:le.closeUnpayOrder$,createOrder:fe.createOrder$,getPayUrl:ve.getPayUrl$,inquiry:pe.inquiry$},telephone:{call:_e.call$,checkBizCall:Ee.checkBizCall$,quickCallList:Ne.quickCallList$,showCallMenu:Pe.showCallMenu$},user:{checkPassword:Me.checkPassword$,get:he.get$},util:{chosen:me.chosen$,datepicker:ke.datepicker$,datetimepicker:be.datetimepicker$,decrypt:ge.decrypt$,downloadFile:Ie.downloadFile$,encrypt:ye.encrypt$,isLocalFileExist:Ae.isLocalFileExist$,multiSelect:Se.multiSelect$,open:Ve.open$,openLink:Ue.openLink$,openLocalFile:Oe.openLocalFile$,openModal:je.openModal$,openSlidePanel:$e.openSlidePanel$,presentWindow:we.presentWindow$,previewImage:De.previewImage$,previewVideo:Ce.previewVideo$,scan:Te.scan$,scanCard:We.scanCard$,setScreenBrightnessAndKeepOn:Re.setScreenBrightnessAndKeepOn$,share:xe.share$,startDocSign:Fe.startDocSign$,systemShare:Le.systemShare$,timepicker:Be.timepicker$,uploadAttachment:ze.uploadAttachment$,uploadImage:qe.uploadImage$,uploadImageFromCamera:Ye.uploadImageFromCamera$,ut:Je.ut$},verify:{openBindIDCard:Ge.openBindIDCard$,startAuth:He.startAuth$}},channel:{permission:{requestAuthCode:Xe.requestAuthCode$}},device:{accelerometer:{clearShake:Ke.clearShake$,watchShake:Qe.watchShake$},audio:{download:Ze.download$,onPlayEnd:et.onPlayEnd$,onRecordEnd:tt.onRecordEnd$,pause:nt.pause$,play:rt.play$,resume:ot.resume$,startRecord:it.startRecord$,stop:at.stop$,stopRecord:st.stopRecord$,translateVoice:dt.translateVoice$},base:{getInterface:ut.getInterface$,getPhoneInfo:ct.getPhoneInfo$,getUUID:lt.getUUID$,getWifiStatus:ft.getWifiStatus$},connection:{getNetworkType:vt.getNetworkType$},geolocation:{checkPermission:pt.checkPermission$,get:_t.get$,start:Et.start$,status:Nt.status$,stop:Pt.stop$},launcher:{checkInstalledApps:Mt.checkInstalledApps$,launchApp:ht.launchApp$},nfc:{nfcRead:mt.nfcRead$,nfcStop:kt.nfcStop$,nfcWrite:bt.nfcWrite$},notification:{actionSheet:gt.actionSheet$,alert:It.alert$,confirm:yt.confirm$,extendModal:At.extendModal$,hidePreloader:St.hidePreloader$,modal:Vt.modal$,prompt:Ut.prompt$,showPreloader:Ot.showPreloader$,toast:jt.toast$,vibrate:$t.vibrate$},screen:{insetAdjust:wt.insetAdjust$,resetView:Dt.resetView$,rotateView:Ct.rotateView$}},net:{bjGovApn:{loginGovNet:Tt.loginGovNet$}},runtime:{message:{fetch:Wt.fetch$,post:Rt.post$},permission:{requestAuthCode:xt.requestAuthCode$,requestOperateAuthCode:Ft.requestOperateAuthCode$}},ui:{input:{plain:Lt.plain$},nav:{close:Bt.close$,getCurrentId:zt.getCurrentId$,go:qt.go$,preload:Yt.preload$,recycle:Jt.recycle$},progressBar:{setColors:Gt.setColors$},pullToRefresh:{disable:Ht.disable$,enable:Xt.enable$,stop:Kt.stop$},webViewBounce:{disable:Qt.disable$,enable:Zt.enable$}},util:{domainStorage:{getItem:en.getItem$,removeItem:tn.removeItem$,setItem:nn.setItem$}}}},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){e.exports=n(199)}])});"
  },
  {
    "path": "static/js/editor.js",
    "content": "/**\n * Created by lifei6671 on 2017/4/29 0029.\n */\n\n/**\n * 打开最后选中的节点\n */\n function openLastSelectedNode() {\n    //如果文档树或编辑器没有准备好则不加载文档\n    if (window.treeCatalog == null || window.editor == null) {\n        return false;\n    }\n    var $isSelected = false;\n    if (window.localStorage) {\n        var $selectedNodeId = window.sessionStorage.getItem(\"MinDoc::LastLoadDocument:\" + window.book.identify);\n        try {\n            if ($selectedNodeId) {\n                //遍历文档树判断是否存在节点\n                $.each(window.documentCategory, function (i, n) {\n                    if (n.id == $selectedNodeId && !$isSelected) {\n                        var $node = {\"id\": n.id};\n                        window.treeCatalog.deselect_all();\n                        window.treeCatalog.select_node($node);\n                        $isSelected = true;\n                    }\n                });\n\n            }\n        } catch ($ex) {\n            console.log($ex)\n        }\n    }\n\n    //如果节点不存在，则默认选中第一个节点\n    if (!$isSelected && window.documentCategory.length > 0) {\n        var doc = window.documentCategory[0];\n\n        if (doc && doc.id > 0) {\n            var node = {\"id\": doc.id};\n            $(\"#sidebar\").jstree(true).select_node(node);\n            $isSelected = true;\n        }\n    }\n    return $isSelected;\n}\n\n/**\n * 设置最后选中的文档\n * @param $node\n */\nfunction setLastSelectNode($node) {\n    if (window.localStorage) {\n        if (typeof $node === \"undefined\" || !$node) {\n            window.sessionStorage.removeItem(\"MinDoc::LastLoadDocument:\" + window.book.identify);\n        } else {\n            var nodeId = $node.id ? $node.id : $node.node.id;\n            window.sessionStorage.setItem(\"MinDoc::LastLoadDocument:\" + window.book.identify, nodeId);\n        }\n    }\n}\n\n/**\n * 保存排序\n * @param node\n * @param parent\n */\nfunction jstree_save(node, parent) {\n\n    var parentNode = window.treeCatalog.get_node(parent.parent);\n\n    var nodeData = window.getSiblingSort(parentNode);\n\n    if (parent.parent !== parent.old_parent) {\n        parentNode = window.treeCatalog.get_node(parent.old_parent);\n        var newNodeData = window.getSiblingSort(parentNode);\n        if (newNodeData.length > 0) {\n            nodeData = nodeData.concat(newNodeData);\n        }\n    }\n\n    var index = layer.load(1, {\n        shade: [0.1, '#fff'] //0.1透明度的白色背景\n    });\n    locales = {\n        'zh-CN': {\n            saveSortSucc: '保存排序成功',\n        },\n        'en': {\n            saveSortSucc: 'Save sort success',\n        }\n    }\n    $.ajax({\n        url: window.sortURL,\n        type: \"post\",\n        data: JSON.stringify(nodeData),\n        success: function (res) {\n            layer.close(index);\n            if (res.errcode === 0) {\n                layer.msg(locales[lang].saveSortSucc);\n            } else {\n                layer.msg(res.message);\n            }\n        }\n    })\n}\n\n/**\n * 创建文档\n */\nfunction openCreateCatalogDialog($node) {\n    var $then = $(\"#addDocumentModal\");\n\n    var doc_id = $node ? $node.id : 0;\n\n    $then.find(\"input[name='parent_id']\").val(doc_id);\n    $then.find(\"input[name='doc_id']\").val('');\n    $then.find(\"input[name='doc_name']\").val('');\n\n    $then.modal(\"show\");\n}\n\n/**\n * 处理排序\n * @param node\n * @returns {Array}\n */\nfunction getSiblingSort(node) {\n    var data = [];\n\n    for (var key in node.children) {\n        var index = data.length;\n\n        data[index] = {\n            \"id\": parseInt(node.children[key]),\n            \"sort\": parseInt(key),\n            \"parent\": Number(node.id) ? Number(node.id) : 0\n        };\n    }\n    return data;\n}\n\n\n/**\n * 删除一个文档\n * @param $node\n */\nfunction openDeleteDocumentDialog($node) {\n    locales = {\n        'zh-CN': {\n            saveSortSucc: '保存排序成功',\n            confirmDeleteDoc: '你确定要删除该文档吗？',\n            confirm: '确定',\n            cancel: '取消',\n            deleteFailed: '删除失败',\n            confirmLeave: '您输入的内容尚未保存，确定离开此页面吗？'\n        },\n        'en': {\n            saveSortSucc: 'Save sort success',\n            confirmDeleteDoc: 'Are you sure you want to delete this document?',\n            confirm: 'Confirm',\n            cancel: 'Cancel',\n            deleteFailed: 'Delete Failed',\n            confirmLeave: 'The content you entered has not been saved. Are you sure you want to leave this page?'\n        }\n    }\n    langs = locales[lang];\n    var index = layer.confirm(langs.confirmDeleteDoc, {\n        btn: [langs.confirm, langs.cancel] //按钮\n    }, function () {\n\n        $.post(window.deleteURL, {\"identify\": window.book.identify, \"doc_id\": $node.id}).done(function (res) {\n            layer.close(index);\n            if (res.errcode === 0) {\n                window.treeCatalog.delete_node($node);\n                window.documentCategory.remove(function (item) {\n                    return item.id == $node.id;\n                });\n\n\n                // console.log(window.documentCategory)\n                setLastSelectNode();\n            } else {\n                layer.msg(lang.deleteFailed, {icon: 2})\n            }\n        }).fail(function () {\n            layer.close(index);\n            layer.msg(lang.deleteFailed, {icon: 2})\n        });\n\n    });\n}\n\n/**\n * 打开文档编辑界面\n * @param $node\n */\nfunction openEditCatalogDialog($node) {\n    var $then = $(\"#addDocumentModal\");\n    var doc_id = parseInt($node ? $node.id : 0);\n    var text = $node ? $node.text : '';\n    var parentId = $node && $node.parent !== '#' ? $node.parent : 0;\n\n\n    $then.find(\"input[name='doc_id']\").val(doc_id);\n    $then.find(\"input[name='parent_id']\").val(parentId);\n    $then.find(\"input[name='doc_name']\").val(text);\n\n    var open = $node.a_attr && $node.a_attr.opened ? $node.a_attr.opened  : 0;\n\n\n    console.log($node)\n    $then.find(\"input[name='is_open'][value='\" + open + \"']\").prop(\"checked\", \"checked\");\n\n    for (var index in window.documentCategory) {\n        var item = window.documentCategory[index];\n        if (item.id === doc_id) {\n            $then.find(\"input[name='doc_identify']\").val(item.identify);\n            break;\n        }\n    }\n\n    $then.modal({show: true});\n}\n\n/**\n * 将一个节点推送到现有数组中\n * @param $node\n */\nfunction pushDocumentCategory($node) {\n    for (var index in window.documentCategory) {\n        var item = window.documentCategory[index];\n        if (item.id === $node.id) {\n\n            window.documentCategory[index] = $node;\n            return;\n        }\n    }\n    window.documentCategory.push($node);\n}\n\n/**\n * 将数据重置到Vue列表中\n * @param $lists\n */\nfunction pushVueLists($lists) {\n\n    window.vueApp.lists = [];\n    $.each($lists, function (i, item) {\n        window.vueApp.lists.push(item);\n    });\n}\n\n/**\n * 发布项目\n */\nfunction releaseBook() {\n    locales = {\n        'zh-CN': {\n            publishToQueue: '发布任务已推送到任务队列，稍后将在后台执行。',\n        },\n        'en': {\n            publishToQueue: 'The publish task has been pushed to the queue</br> and will be executed soon.',\n        }\n    }\n    $.ajax({\n        url: window.releaseURL,\n        data: {\"identify\": window.book.identify},\n        type: \"post\",\n        dataType: \"json\",\n        success: function (res) {\n            if (res.errcode === 0) {\n                layer.msg(locales[lang].publishToQueue);\n            } else {\n                layer.msg(res.message);\n            }\n        }\n    });\n}\n\n//实现小提示\n$(\"[data-toggle='tooltip']\").hover(function () {\n    var title = $(this).attr('data-title');\n    var direction = $(this).attr(\"data-direction\");\n    var tips = 3;\n    if (direction === \"top\") {\n        tips = 1;\n    } else if (direction === \"right\") {\n        tips = 2;\n    } else if (direction === \"bottom\") {\n        tips = 3;\n    } else if (direction === \"left\") {\n        tips = 4;\n    }\n    index = layer.tips(title, this, {\n        tips: tips\n    });\n}, function () {\n    layer.close(index);\n});\n//弹出创建文档的遮罩层\n$(\"#btnAddDocument\").on(\"click\", function () {\n    $(\"#addDocumentModal\").modal(\"show\");\n});\n//用于还原创建文档的遮罩层\n$(\"#addDocumentModal\").on(\"hidden.bs.modal\", function () {\n    $(this).find(\"form\").html(window.sessionStorage.getItem(\"MinDoc::addDocumentModal\"));\n    var $then = $(\"#addDocumentModal\");\n\n    $then.find(\"input[name='parent_id']\").val('');\n    $then.find(\"input[name='doc_id']\").val('');\n    $then.find(\"input[name='doc_name']\").val('');\n}).on(\"shown.bs.modal\", function () {\n    $(this).find(\"input[name='doc_name']\").focus();\n}).on(\"show.bs.modal\", function () {\n    window.sessionStorage.setItem(\"MinDoc::addDocumentModal\", $(this).find(\"form\").html())\n});\n\nfunction showError($msg, $id) {\n    if (!$id) {\n        $id = \"#form-error-message\"\n    }\n    $($id).addClass(\"error-message\").removeClass(\"success-message\").text($msg);\n    return false;\n}\n\nfunction showSuccess($msg, $id) {\n    if (!$id) {\n        $id = \"#form-error-message\"\n    }\n    $($id).addClass(\"success-message\").removeClass(\"error-message\").text($msg);\n    return true;\n}\n\nwindow.documentHistory = function () {\n    locales = {\n        'zh-CN': {\n            hisVer: '历史版本',\n        },\n        'en': {\n            hisVer: 'Historic version',\n        }\n    }\n    layer.open({\n        type: 2,\n        title: locales[lang].hisVer,\n        shadeClose: true,\n        shade: 0.8,\n        area: ['700px', '80%'],\n        content: window.historyURL + \"?identify=\" + window.book.identify + \"&doc_id=\" + window.selectNode.id,\n        end: function () {\n            if (window.SelectedId) {\n                var selected = {\n                    node: {\n                        id: window.SelectedId\n                    }\n                };\n                window.loadDocument(selected);\n                window.SelectedId = null;\n            }\n        }\n    });\n};\n\nfunction uploadImage($id, $callback) {\n    locales = {\n        'zh-CN': {\n            unsupportType: '不支持的图片格式',\n            uploadFailed: '图片上传失败'\n        },\n        'en': {\n            unsupportType: 'Unsupport image type',\n            uploadFailed: 'Upload image failed'\n        }\n    }\n    /** 粘贴上传图片 **/\n    document.getElementById($id).addEventListener('paste', function (e) {\n        if (e.clipboardData && e.clipboardData.items) {\n            var clipboard = e.clipboardData;\n            for (var i = 0, len = clipboard.items.length; i < len; i++) {\n                if (clipboard.items[i].kind === 'file' || clipboard.items[i].type.indexOf('image') > -1) {\n\n                    var imageFile = clipboard.items[i].getAsFile();\n\n                    var fileName = String((new Date()).valueOf());\n\n                    switch (imageFile.type) {\n                        case \"image/png\" :\n                            fileName += \".png\";\n                            break;\n                        case \"image/jpg\" :\n                            fileName += \".jpg\";\n                            break;\n                        case \"image/jpeg\" :\n                            fileName += \".jpeg\";\n                            break;\n                        case \"image/gif\" :\n                            fileName += \".gif\";\n                            break;\n                        default :\n                            layer.msg(locales[lang].unsupportType);\n                            return;\n                    }\n                    var form = new FormData();\n\n                    form.append('editormd-image-file', imageFile, fileName);\n\n                    var layerIndex = 0;\n\n                    $.ajax({\n                        url: window.imageUploadURL,\n                        type: \"POST\",\n                        dataType: \"json\",\n                        data: form,\n                        processData: false,\n                        contentType: false,\n                        beforeSend: function () {\n                            layerIndex = $callback('before');\n                        },\n                        error: function () {\n                            layer.close(layerIndex);\n                            $callback('error');\n                            layer.msg(locales[lang].uploadFailed);\n                        },\n                        success: function (data) {\n                            layer.close(layerIndex);\n                            $callback('success', data);\n                            if (data.errcode !== 0) {\n                                layer.msg(data.message);\n                            }\n\n                        }\n                    });\n                    e.preventDefault();\n                }\n            }\n        }\n    });\n}\n\n\nfunction uploadResource($id, $callback) {\n    locales = {\n        'zh-CN': {\n            unsupportType: '不支持的图片/视频格式',\n            uploadFailed: '图片/视频上传失败'\n        },\n        'en': {\n            unsupportType: 'Unsupport image/video type',\n            uploadFailed: 'Upload image/video failed'\n        }\n    }\n    /** 粘贴上传的资源 **/\n    document.getElementById($id).addEventListener('paste', function (e) {\n        if (e.clipboardData && e.clipboardData.items) {\n            var clipboard = e.clipboardData;\n            for (var i = 0, len = clipboard.items.length; i < len; i++) {\n                if (clipboard.items[i].kind === 'file' || clipboard.items[i].type.indexOf('image') > -1) {\n\n                    var resource = clipboard.items[i].getAsFile();\n\n                    var fileName = String((new Date()).valueOf());\n                    console.log(resource.type)\n                    switch (resource.type) {\n                        case \"image/png\" :\n                            fileName += \".png\";\n                            break;\n                        case \"image/jpg\" :\n                            fileName += \".jpg\";\n                            break;\n                        case \"image/jpeg\" :\n                            fileName += \".jpeg\";\n                            break;\n                        case \"image/gif\" :\n                            fileName += \".gif\";\n                            break;\n                        case \"video/mp4\":\n                            fileName += \".mp4\";\n                            break;\n                        case \"video/webm\":\n                            fileName += \".webm\";\n                            break;\n                        default :\n                            layer.msg(locales[lang].unsupportType);\n                            return;\n                    }\n                    var form = new FormData();\n\n                    form.append('editormd-resource-file', resource, fileName);\n\n                    var layerIndex = 0;\n\n                    $.ajax({\n                        url: window.imageUploadURL,\n                        type: \"POST\",\n                        dataType: \"json\",\n                        data: form,\n                        processData: false,\n                        contentType: false,\n                        beforeSend: function () {\n                            layerIndex = $callback('before');\n                        },\n                        error: function () {\n                            layer.close(layerIndex);\n                            $callback('error');\n                            layer.msg(locales[lang].uploadFailed);\n                        },\n                        success: function (data) {\n                            layer.close(layerIndex);\n                            $callback('success', data);\n                        }\n                    });\n                    e.preventDefault();\n                }\n            }\n        }\n    });\n}\n\n/**\n * 初始化代码高亮\n */\nfunction initHighlighting() {\n    $('pre code,pre.ql-syntax').each(function (i, block) {\n        hljs.highlightBlock(block);\n    });\n}\n\n$(function () {\n    locales = {\n        'zh-CN': {\n            attachments: ' 个附件',\n        },\n        'en': {\n            attachments: ' attachments',\n        }\n    }\n    window.vueApp = new Vue({\n        el: \"#attachList\",\n        data: {\n            lists: []\n        },\n        delimiters: ['${', '}'],\n        methods: {\n            removeAttach: function ($attach_id) {\n                var $this = this;\n                var item = $this.lists.filter(function ($item) {\n                    return $item.attachment_id == $attach_id;\n                });\n\n                if (item && item[0].hasOwnProperty(\"state\")) {\n                    $this.lists = $this.lists.filter(function ($item) {\n                        return $item.attachment_id != $attach_id;\n                    });\n                    return;\n                }\n                $.ajax({\n                    url: window.removeAttachURL,\n                    type: \"post\",\n                    data: {\"attach_id\": $attach_id},\n                    success: function (res) {\n                        if (res.errcode === 0) {\n                            $this.lists = $this.lists.filter(function ($item) {\n                                return $item.attachment_id != $attach_id;\n                            });\n                        } else {\n                            layer.msg(res.message);\n                        }\n                    }\n                });\n            }\n        },\n        watch: {\n            lists: function ($lists) {\n                $(\"#attachInfo\").text(\" \" + $lists.length + locales[lang].attachments)\n            }\n        }\n    });\n    /**\n     * 启动自动保存，默认30s自动保存一次\n     */\n    if (window.book && window.book.auto_save) {\n        setTimeout(function () {\n            setInterval(function () {\n                var $then = $(\"#markdown-save\");\n                if (!window.saveing && $then.hasClass(\"change\")) {\n                    $then.trigger(\"click\");\n                }\n            }, 30000);\n        }, 30000);\n    }\n    /**\n     * 当离开窗口时存在未保存的文档会提示保存\n     */\n    $(window).on(\"beforeunload\", function () {\n        if ($(\"#markdown-save\").hasClass(\"change\")) {\n            return '您输入的内容尚未保存，确定离开此页面吗？';\n        }\n    });\n});\n\n"
  },
  {
    "path": "static/js/froala-editor.js",
    "content": "$(function () {\n    //超大屏幕\n    var toolbarButtons = ['fullscreen', 'bold', 'italic', 'underline', 'strikeThrough', 'subscript', 'superscript', 'fontFamily', 'fontSize', '|', 'color', 'emoticons', 'inlineStyle', 'paragraphStyle', '|', 'paragraphFormat', 'align', 'formatOL', 'formatUL', 'outdent', 'indent', 'quote', 'insertHR', '-', 'insertLink', 'insertImage', 'insertVideo', 'insertFile', 'insertTable', 'undo', 'redo', 'clearFormatting', 'selectAll', 'html'];\n    //大屏幕\n    var toolbarButtonsMD = ['fullscreen', 'bold', 'italic', 'underline', 'fontFamily', 'fontSize', 'color', 'paragraphStyle', 'paragraphFormat', 'align', 'formatOL', 'formatUL', 'outdent', 'indent', 'quote', 'insertHR', 'insertLink', 'insertImage', 'insertVideo', 'insertFile', 'insertTable', 'undo', 'redo', 'clearFormatting'];\n    //小屏幕\n    var toolbarButtonsSM = ['fullscreen', 'bold', 'italic', 'underline', 'fontFamily', 'fontSize', 'insertLink', 'insertImage', 'insertTable', 'undo', 'redo'];\n    //手机\n    var toolbarButtonsXS = ['bold', 'italic', 'fontFamily', 'fontSize', 'undo', 'redo'];\n\n    window.addDocumentModalFormHtml = $(this).find(\"form\").html();\n    window.editor = new FroalaEditor(\"#froalaEditor\", {\n      // enter: $.FroalaEditor.ENTER_P,\n      placeholderText: '请输入内容',\n      charCounterCount: true, //默认\n      // charCounterMax         : -1,//默认\n      saveInterval: 0, //不自动保存，默认10000\n      // theme                    : \"red\",\n      height: \"100%\",\n      toolbarBottom: false, //默认\n      toolbarButtonsMD: toolbarButtonsMD,\n      toolbarButtonsSM: toolbarButtonsSM,\n      toolbarButtonsXS: toolbarButtonsXS,\n      toolbarInline: false, //true选中设置样式,默认false\n      imageUploadMethod: 'POST',\n      // heightMin: 450,\n      charCounterMax: 3000,\n      // imageUploadURL: \"uploadImgEditor\",\n      // imageParams: { postId: \"123\" },\n      params: {\n        // acl: '01',\n        // AWSAccessKeyId: '02',\n        // policy: '03',\n        // signature: '04',\n        editor : \"froalaEditor\",\n      },\n      autosave: true,\n      autosaveInterval: 2500,\n      // saveURL: 'hander/FroalaHandler.ashx',\n      saveParams: { postId: '1' },\n      spellcheck: false,\n      imageUploadURL: window.imageUploadURL, //'/uploadimg', //上传到本地服务器\n      // imageUploadParams: { pid: '{{.product.ProjectId}}' },\n      // imageDeleteURL: 'lib/delete_image.php', //删除图片\n      // imagesLoadURL: 'lib/load_images.php', //管理图片\n      videoUploadURL: window.imageUploadURL,\n      // videoUploadParams: { pid: '{{.product.ProjectId}}' },\n      fileUploadURL: window.imageUploadURL,\n      // fileUploadParams: { pid: '{{.product.ProjectId}}' },\n      // enter: $.FroalaEditor.ENTER_BR,\n      language: 'zh_cn',\n        // Add the custom buttons in the toolbarButtons list, after the separator.\n      toolbarButtons: [toolbarButtons, ['saveIcon', 'insert','alert']]\n      // toolbarButtons: ['bold', 'italic', 'underline', 'paragraphFormat', 'align','color','fontSize','insertImage','insertTable','undo', 'redo']\n    });\n\n    FroalaEditor.DefineIcon('alert', {NAME: 'info', SVG_KEY: 'user'});\n    FroalaEditor.RegisterCommand('alert', {\n      title: 'Hello',\n      focus: false,\n      undo: false,\n      refreshAfterCallback: false,\n      callback: function () {\n        alert('Hello!');\n      }\n    });\n\n    // FroalaEditor.DefineIcon('magicIcon', {NAME: 'magic'});\n    FroalaEditor.DefineIcon('saveIcon', {NAME: 'plus', SVG_KEY: 'cogs'});\n    FroalaEditor.RegisterCommand('saveIcon', {\n      title: '保存',\n      focus: false,\n      undo: true,\n      refreshAfterCallback: true,\n      callback: function () {\n        saveDocument();\n      }\n    });\n    \n    FroalaEditor.DefineIcon('insert', {NAME: 'plus', SVG_KEY: 'add'});\n    FroalaEditor.RegisterCommand('insert', {\n      title: '发布',\n      focus: true,\n      undo: true,\n      refreshAfterCallback: true,\n      callback: function () {\n        // this.html.insert('My New HTML');\n        // saveDocument(true,callback);\n        releaseBook();\n      }\n    });\n    \n    // new FroalaEditor('div#froala-editor', {\n    //   // Add the custom buttons in the toolbarButtons list, after the separator.\n    //   toolbarButtons: [['undo', 'redo' , 'bold'], ['alert', 'clear', 'insert']]\n    // })\n\n    // editor.config.mapAk = window.baiduMapKey;\n    // editor.config.printLog = false;\n    // editor.config.showMenuTooltips = true\n    // editor.config.menuTooltipPosition = 'down'\n    // editor.config.uploadImgUrl = window.imageUploadURL;\n    // editor.config.uploadImgFileName = \"editormd-image-file\";\n    // editor.config.uploadParams = {\n    //     \"editor\" : \"froalaEditor\"\n    // };\n    // editor.config.uploadImgServer = window.imageUploadURL;\n    // editor.config.customUploadImg = function (resultFiles, insertImgFn) {\n    //     // resultFiles 是 input 中选中的文件列表\n    //     // insertImgFn 是获取图片 url 后，插入到编辑器的方法\n    //     var file = resultFiles[0];\n    //     // file type is only image.\n    //     if (/^image\\//.test(file.type)) {\n    //         var form = new FormData();\n    //         form.append('editormd-image-file', file, file.name);\n\n    //         var layerIndex = 0;\n\n    //         $.ajax({\n    //             url: window.imageUploadURL,\n    //             type: \"POST\",\n    //             dataType: \"json\",\n    //             data: form,\n    //             processData: false,\n    //             contentType: false,\n    //             error: function() {\n    //                 layer.close(layerIndex);\n    //                 layer.msg(\"图片上传失败\");\n    //             },\n    //             success: function(data) {\n    //                 layer.close(layerIndex);\n    //                 if(data.errcode !== 0){\n    //                     layer.msg(data.message);\n    //                 }else{\n    //                     insertImgFn(data.url);\n    //                 }\n    //             }\n    //         });\n    //     } else {\n    //         console.warn('You could only upload images.');\n    //     }\n    // };\n    // editor.config.lang = window.lang;\n    // editor.i18next = window.i18next;\n    // editor.config.languages['en']['froalaEditor']['menus']['title']['保存'] = 'save';\n    // editor.config.languages['en']['froalaEditor']['menus']['title']['发布'] = 'publish';\n    // editor.config.languages['en']['froalaEditor']['menus']['title']['附件'] = 'attachment';\n    // editor.config.languages['en']['froalaEditor']['menus']['title']['history'] = 'history';\n\n    window.editormdLocales = {\n        'zh-CN': {\n            placeholder: '本编辑器支持 Markdown 编辑，左边编写，右边预览。',\n            contentUnsaved: '编辑内容未保存，需要保存吗？',\n            noDocNeedPublish: '没有需要发布的文档',\n            loadDocFailed: '文档加载失败',\n            fetchDocFailed: '获取当前文档信息失败',\n            cannotAddToEmptyNode: '空节点不能添加内容',\n            overrideModified: '文档已被其他人修改确定覆盖已存在的文档吗？',\n            confirm: '确定',\n            cancel: '取消',\n            contentsNameEmpty: '目录名称不能为空',\n            addDoc: '添加文档',\n            edit: '编辑',\n            delete: '删除',\n            loadFailed: '加载失败请重试',\n            tplNameEmpty: '模板名称不能为空',\n            tplContentEmpty: '模板内容不能为空',\n            saveSucc: '保存成功',\n            serverExcept: '服务器异常',\n            paramName: '参数名称',\n            paramType: '参数类型',\n            example: '示例值',\n            remark: '备注',\n        },\n        'en': {\n            placeholder: 'This editor supports Markdown editing, writing on the left and previewing on the right.',\n            contentUnsaved: 'The edited content is not saved, need to save it?',\n            noDocNeedPublish: 'No Document need to be publish',\n            loadDocFailed: 'Load Document failed',\n            fetchDocFailed: 'Fetch Document info failed',\n            cannotAddToEmptyNode: 'Cannot add content to empty node',\n            overrideModified: 'The document has been modified by someone else, are you sure to overwrite the document?',\n            confirm: 'Confirm',\n            cancel: 'Cancel',\n            contentsNameEmpty: 'Document Name cannot be empty',\n            addDoc: 'Add Document',\n            edit: 'Edit',\n            delete: 'Delete',\n            loadFailed: 'Failed to load, please try again',\n            tplNameEmpty: 'Template name cannot be empty',\n            tplContentEmpty: 'Template content cannot be empty',\n            saveSucc: 'Save success',\n            serverExcept: 'Server Exception',\n            paramName: 'Parameter',\n            paramType: 'Type',\n            example: 'Example',\n            remark: 'Remark',\n        }\n    };\n\n    // window.editor.config.onchange = function (newHtml) {\n    //     var saveMenu = window.editor.menus.menuList.find((item) => item.key == 'save');\n    //     // 判断内容是否改变\n    //     if (window.source !== window.editor.txt.html()) {\n    //         saveMenu.$elem.addClass('selected');\n    //     } else {\n    //         saveMenu.$elem.removeClass('selected');\n    //     }\n    // };\n\n    // window.editor.create();\n\n    // $(\"#froalaEditor\").css(\"height\",\"100%\");\n\n    if(window.documentCategory.length > 0){\n        var item =  window.documentCategory[0];\n        var $select_node = { node : {id : item.id}};\n        loadDocument($select_node);\n    }\n\n    /***\n     * 加载指定的文档到编辑器中\n     * @param $node\n     */\n    function loadDocument($node) {\n        var index = layer.load(1, {\n            shade: [0.1,'#fff'] //0.1透明度的白色背景\n        });\n\n        $.get(window.editURL + $node.node.id ).done(function (res) {\n            layer.close(index);\n\n            if(res.errcode === 0){\n                window.isLoad = true;\n\n                // window.editor.txt.clear();\n                // window.editor.txt.html(res.data.content);\n                window.editor.html.set('');\n                window.editor.events.focus();\n                window.editor.html.set(res.data.content);\n                // 将原始内容备份\n                window.source = res.data.content;\n                var node = { \"id\" : res.data.doc_id,'parent' : res.data.parent_id === 0 ? '#' : res.data.parent_id ,\"text\" : res.data.doc_name,\"identify\" : res.data.identify,\"version\" : res.data.version};\n                pushDocumentCategory(node);\n                window.selectNode = node;\n\n                pushVueLists(res.data.attach);\n\n            }else{\n                layer.msg(\"文档加载失败\");\n            }\n        }).fail(function () {\n            layer.close(index);\n            layer.msg(\"文档加载失败\");\n        });\n    }\n\n    /**\n     * 保存文档到服务器\n     * @param $is_cover 是否强制覆盖\n     */\n    function saveDocument($is_cover,callback) {\n        var index = null;\n        var node = window.selectNode;\n\n        // var html = window.editor.txt.html() ;\n        var html = window.editor.html.get();\n\n        var content = \"\";\n        if($.trim(html) !== \"\"){\n            content = toMarkdown(html, { gfm: true });\n        }\n        var version = \"\";\n\n        if (!node) {\n            layer.msg(editormdLocales[lang].fetchDocFailed);\n            return;\n        }\n        var doc_id = parseInt(node.id);\n\n        for(var i in window.documentCategory){\n            var item = window.documentCategory[i];\n\n            if(item.id === doc_id){\n                version = item.version;\n                break;\n            }\n        }\n        $.ajax({\n            beforeSend  : function () {\n                index = layer.load(1, {shade: [0.1,'#fff'] });\n            },\n            url :  window.editURL,\n            data : {\"identify\" : window.book.identify,\"doc_id\" : doc_id,\"markdown\" : content,\"html\" : html,\"cover\" : $is_cover ? \"yes\":\"no\",\"version\": version},\n            type :\"post\",\n            dataType :\"json\",\n            success : function (res) {\n                layer.close(index);\n                if(res.errcode === 0){\n                    for(var i in window.documentCategory){\n                        var item = window.documentCategory[i];\n\n                        if(item.id === doc_id){\n                            window.documentCategory[i].version = res.data.version;\n                            break;\n                        }\n                    }\n                    // 更新内容备份\n                    window.source = res.data.content;\n                    // 触发编辑器 onchange 回调函数\n                    // window.editor.config.onchange();\n                    // window.editor.onchange();\n                    // window.editor.events: {\n                    //     'contentChanged': function () {\n                    //       // Do something here.\n                    //       // this is the editor instance.\n                    //       console.log(this);\n                    //     }\n                    // }\n                    if(typeof callback === \"function\"){\n                        callback();\n                    }\n                }else if(res.errcode === 6005){\n                    var confirmIndex = layer.confirm(editormdLocales[lang].overrideModified, {\n                        btn: [editormdLocales[lang].confirm, editormdLocales[lang].cancel] // 按钮\n                    }, function () {\n                        layer.close(confirmIndex);\n                        saveDocument(true,callback);\n                    });\n                }else{\n                    layer.msg(res.message);\n                }\n            }\n        });\n    }\n\n\n\n    /**\n     * 添加顶级文档\n     */\n    $(\"#addDocumentForm\").ajaxForm({\n        beforeSubmit : function () {\n            var doc_name = $.trim($(\"#documentName\").val());\n            if (doc_name === \"\"){\n                return showError(\"目录名称不能为空\",\"#add-error-message\")\n            }\n            window.addDocumentFormIndex = layer.load(1, { shade: [0.1,'#fff']  });\n            return true;\n        },\n        success : function (res) {\n            if(res.errcode === 0){\n\n                var data = { \"id\" : res.data.doc_id,'parent' : res.data.parent_id === 0 ? '#' : res.data.parent_id ,\"text\" : res.data.doc_name,\"identify\" : res.data.identify,\"version\" : res.data.version};\n\n                var node = window.treeCatalog.get_node(data.id);\n                if(node){\n                    window.treeCatalog.rename_node({\"id\":data.id},data.text);\n\n                }else {\n                    window.treeCatalog.create_node(data.parent, data);\n                    window.treeCatalog.deselect_all();\n                    window.treeCatalog.select_node(data);\n                }\n                pushDocumentCategory(data);\n                $(\"#markdown-save\").removeClass('change').addClass('disabled');\n                $(\"#addDocumentModal\").modal('hide');\n            }else{\n                showError(res.message,\"#add-error-message\")\n            }\n            layer.close(window.addDocumentFormIndex);\n        }\n    });\n\n    /**\n     * 文档目录树\n     */\n    $(\"#sidebar\").jstree({\n        'plugins': [\"wholerow\", \"types\", 'dnd', 'contextmenu'],\n        \"types\": {\n            \"default\": {\n                \"icon\": false  // 删除默认图标\n            }\n        },\n        'core': {\n            'check_callback': true,\n            \"multiple\": false,\n            'animation': 0,\n            \"data\": window.documentCategory\n        },\n        \"contextmenu\": {\n            show_at_node: false,\n            select_node: false,\n            \"items\": {\n                \"添加文档\": {\n                    \"separator_before\": false,\n                    \"separator_after\": true,\n                    \"_disabled\": false,\n                    \"label\": window.editormdLocales[window.lang].addDoc,//\"添加文档\",\n                    \"icon\": \"fa fa-plus\",\n                    \"action\": function (data) {\n\n                        var inst = $.jstree.reference(data.reference),\n                            node = inst.get_node(data.reference);\n\n                        openCreateCatalogDialog(node);\n                    }\n                },\n                \"编辑\": {\n                    \"separator_before\": false,\n                    \"separator_after\": true,\n                    \"_disabled\": false,\n                    \"label\": window.editormdLocales[window.lang].edit,\n                    \"icon\": \"fa fa-edit\",\n                    \"action\": function (data) {\n                        var inst = $.jstree.reference(data.reference);\n                        var node = inst.get_node(data.reference);\n                        openEditCatalogDialog(node);\n                    }\n                },\n                \"删除\": {\n                    \"separator_before\": false,\n                    \"separator_after\": true,\n                    \"_disabled\": false,\n                    \"label\": window.editormdLocales[window.lang].delete,\n                    \"icon\": \"fa fa-trash-o\",\n                    \"action\": function (data) {\n                        var inst = $.jstree.reference(data.reference);\n                        var node = inst.get_node(data.reference);\n                        openDeleteDocumentDialog(node);\n                    }\n                }\n            }\n        }\n    }).on('loaded.jstree', function () {\n        window.treeCatalog = $(this).jstree();\n    }).on('select_node.jstree', function (node, selected, event) {\n        // if(window.editor.menus.menuList.find((item) => item.key == 'save').$elem.hasClass('selected')) {\n        //      if (confirm(window.editormdLocales[window.lang].contentUnsaved)) {\n        //         saveDocument(false,function () {\n        //             loadDocument(selected);\n        //         });\n        //         return true;\n        //     }\n        // }\n        loadDocument(selected);\n\n    }).on(\"move_node.jstree\", jstree_save);\n\n    window.saveDocument = saveDocument;\n\n    window.releaseBook = function () {\n        // if(Object.prototype.toString.call(window.documentCategory) === '[object Array]' && window.documentCategory.length > 0){\n        //     if(window.editor.menus.menuList.find((item) => item.key == 'save').$elem.hasClass('selected')) {\n        //         if(confirm(editormdLocales[lang].contentUnsaved)) {\n        //             saveDocument();\n        //         }\n        //     }\n            locales = {\n                'zh-CN': {\n                    publishToQueue: '发布任务已推送到任务队列，稍后将在后台执行。',\n                },\n                'en': {\n                    publishToQueue: 'The publish task has been pushed to the queue</br> and will be executed soon.',\n                }\n            }\n            $.ajax({\n                url: window.releaseURL,\n                data: {\"identify\": window.book.identify},\n                type: \"post\",\n                dataType: \"json\",\n                success: function (res) {\n                    if (res.errcode === 0) {\n                        layer.msg(locales[lang].publishToQueue);\n                    } else {\n                        layer.msg(res.message);\n                    }\n                }\n            });\n        // }else{\n        //     layer.msg(editormdLocales[lang].noDocNeedPublish)\n        // }\n    };\n\n    // $(window).resize(function(e) {\n    //   var $container = $(editor.$textContainerElem.elems[0]);\n    //   var $manual = $container.closest('.manual-froalaEditor');\n    //   var maxHeight = $manual.closest('.manual-editor-container').innerHeight();\n    //   var statusHeight = $manual.siblings('.manual-editor-status').outerHeight(true);\n    //   var manualHeihgt = maxHeight - statusHeight;\n    //   $manual.height(manualHeihgt);\n    //   var toolbarHeight = $container.siblings('.w-e-toolbar').outerHeight(true);\n    //   $container.height($container.parent().innerHeight() - toolbarHeight);\n    // });\n    // $(window).trigger('resize');\n});"
  },
  {
    "path": "static/js/html-editor.js",
    "content": "$(function () {\n    window.addDocumentModalFormHtml = $(this).find(\"form\").html();\n    window.editor = new wangEditor('#htmlEditor');\n    editor.config.mapAk = window.baiduMapKey;\n    editor.config.printLog = false;\n    editor.config.showMenuTooltips = true\n    editor.config.menuTooltipPosition = 'down'\n    editor.config.uploadImgUrl = window.imageUploadURL;\n    editor.config.uploadImgFileName = \"editormd-image-file\";\n    editor.config.uploadParams = {\n        \"editor\" : \"wangEditor\"\n    };\n    editor.config.uploadImgServer = window.imageUploadURL;\n    editor.config.customUploadImg = function (resultFiles, insertImgFn) {\n        // resultFiles 是 input 中选中的文件列表\n        // insertImgFn 是获取图片 url 后，插入到编辑器的方法\n        var file = resultFiles[0];\n        // file type is only image.\n        if (/^image\\//.test(file.type)) {\n            var form = new FormData();\n            form.append('editormd-image-file', file, file.name);\n\n            var layerIndex = 0;\n\n            $.ajax({\n                url: window.imageUploadURL,\n                type: \"POST\",\n                dataType: \"json\",\n                data: form,\n                processData: false,\n                contentType: false,\n                error: function() {\n                    layer.close(layerIndex);\n                    layer.msg(\"图片上传失败\");\n                },\n                success: function(data) {\n                    layer.close(layerIndex);\n                    if(data.errcode !== 0){\n                        layer.msg(data.message);\n                    }else{\n                        insertImgFn(data.url);\n                    }\n                }\n            });\n        } else {\n            console.warn('You could only upload images.');\n        }\n    };\n    editor.config.lang = window.lang;\n    editor.i18next = window.i18next;\n    editor.config.languages['en']['wangEditor']['menus']['title']['保存'] = 'save';\n    editor.config.languages['en']['wangEditor']['menus']['title']['发布'] = 'publish';\n    editor.config.languages['en']['wangEditor']['menus']['title']['附件'] = 'attachment';\n    editor.config.languages['en']['wangEditor']['menus']['title']['history'] = 'history';\n    /*\n    editor.config.menus.splice(0,0,\"|\");\n    editor.config.menus.splice(0,0,\"history\");\n    editor.config.menus.splice(0,0,\"save\");\n    editor.config.menus.splice(0,0,\"release\");\n    editor.config.menus.splice(29,0,\"attach\")\n\n    //移除地图、背景色\n    editor.config.menus = $.map(editor.config.menus, function(item, key) {\n\n        if (item === 'fullscreen') {\n            return null;\n        }\n\n        return item;\n    });\n    */\n    /*\n    window.editor.config.uploadImgFns.onload = function (resultText, xhr) {\n        // resultText 服务器端返回的text\n        // xhr 是 xmlHttpRequest 对象，IE8、9中不支持\n\n        // 上传图片时，已经将图片的名字存在 editor.uploadImgOriginalName\n        var originalName = editor.uploadImgOriginalName || '';\n\n        var res = jQuery.parseJSON(resultText);\n        if (res.errcode === 0){\n            editor.command(null, 'insertHtml', '<img src=\"' + res.url + '\" alt=\"' + res.alt + '\" style=\"max-width:100%;\"/>');\n        }else{\n            layer.msg(res.message);\n        }\n    };\n    */\n\n    window.editormdLocales = {\n        'zh-CN': {\n            placeholder: '本编辑器支持 Markdown 编辑，左边编写，右边预览。',\n            contentUnsaved: '编辑内容未保存，需要保存吗？',\n            noDocNeedPublish: '没有需要发布的文档',\n            loadDocFailed: '文档加载失败',\n            fetchDocFailed: '获取当前文档信息失败',\n            cannotAddToEmptyNode: '空节点不能添加内容',\n            overrideModified: '文档已被其他人修改确定覆盖已存在的文档吗？',\n            confirm: '确定',\n            cancel: '取消',\n            contentsNameEmpty: '目录名称不能为空',\n            addDoc: '添加文档',\n            edit: '编辑',\n            delete: '删除',\n            loadFailed: '加载失败请重试',\n            tplNameEmpty: '模板名称不能为空',\n            tplContentEmpty: '模板内容不能为空',\n            saveSucc: '保存成功',\n            serverExcept: '服务器异常',\n            paramName: '参数名称',\n            paramType: '参数类型',\n            example: '示例值',\n            remark: '备注',\n        },\n        'en': {\n            placeholder: 'This editor supports Markdown editing, writing on the left and previewing on the right.',\n            contentUnsaved: 'The edited content is not saved, need to save it?',\n            noDocNeedPublish: 'No Document need to be publish',\n            loadDocFailed: 'Load Document failed',\n            fetchDocFailed: 'Fetch Document info failed',\n            cannotAddToEmptyNode: 'Cannot add content to empty node',\n            overrideModified: 'The document has been modified by someone else, are you sure to overwrite the document?',\n            confirm: 'Confirm',\n            cancel: 'Cancel',\n            contentsNameEmpty: 'Document Name cannot be empty',\n            addDoc: 'Add Document',\n            edit: 'Edit',\n            delete: 'Delete',\n            loadFailed: 'Failed to load, please try again',\n            tplNameEmpty: 'Template name cannot be empty',\n            tplContentEmpty: 'Template content cannot be empty',\n            saveSucc: 'Save success',\n            serverExcept: 'Server Exception',\n            paramName: 'Parameter',\n            paramType: 'Type',\n            example: 'Example',\n            remark: 'Remark',\n        }\n    };\n\n    window.editor.config.onchange = function (newHtml) {\n        var saveMenu = window.editor.menus.menuList.find((item) => item.key == 'save');\n        // 判断内容是否改变\n        if (window.source !== window.editor.txt.html()) {\n            saveMenu.$elem.addClass('selected');\n        } else {\n            saveMenu.$elem.removeClass('selected');\n        }\n    };\n\n    window.editor.create();\n\n\n    $(\"#htmlEditor\").css(\"height\",\"100%\");\n\n    if(window.documentCategory.length > 0){\n        var item =  window.documentCategory[0];\n        var $select_node = { node : {id : item.id}};\n        loadDocument($select_node);\n    }\n\n    /***\n     * 加载指定的文档到编辑器中\n     * @param $node\n     */\n    function loadDocument($node) {\n        var index = layer.load(1, {\n            shade: [0.1,'#fff'] //0.1透明度的白色背景\n        });\n\n        $.get(window.editURL + $node.node.id ).done(function (res) {\n            layer.close(index);\n\n            if(res.errcode === 0){\n                window.isLoad = true;\n                window.editor.txt.clear();\n                window.editor.txt.html(res.data.content);\n                // 将原始内容备份\n                window.source = res.data.content;\n                var node = { \"id\" : res.data.doc_id,'parent' : res.data.parent_id === 0 ? '#' : res.data.parent_id ,\"text\" : res.data.doc_name,\"identify\" : res.data.identify,\"version\" : res.data.version};\n                pushDocumentCategory(node);\n                window.selectNode = node;\n\n                pushVueLists(res.data.attach);\n\n            }else{\n                layer.msg(\"文档加载失败\");\n            }\n        }).fail(function () {\n            layer.close(index);\n            layer.msg(\"文档加载失败\");\n        });\n    }\n\n    /**\n     * 保存文档到服务器\n     * @param $is_cover 是否强制覆盖\n     */\n    function saveDocument($is_cover,callback) {\n        var index = null;\n        var node = window.selectNode;\n\n        var html = window.editor.txt.html() ;\n\n        var content = \"\";\n        if($.trim(html) !== \"\"){\n            content = toMarkdown(html, { gfm: true });\n        }\n        var version = \"\";\n\n        if (!node) {\n            layer.msg(editormdLocales[lang].fetchDocFailed);\n            return;\n        }\n        var doc_id = parseInt(node.id);\n\n        for(var i in window.documentCategory){\n            var item = window.documentCategory[i];\n\n            if(item.id === doc_id){\n                version = item.version;\n                break;\n            }\n        }\n        $.ajax({\n            beforeSend  : function () {\n                index = layer.load(1, {shade: [0.1,'#fff'] });\n            },\n            url :  window.editURL,\n            data : {\"identify\" : window.book.identify,\"doc_id\" : doc_id,\"markdown\" : content,\"html\" : html,\"cover\" : $is_cover ? \"yes\":\"no\",\"version\": version},\n            type :\"post\",\n            dataType :\"json\",\n            success : function (res) {\n                layer.close(index);\n                if(res.errcode === 0){\n                    for(var i in window.documentCategory){\n                        var item = window.documentCategory[i];\n\n                        if(item.id === doc_id){\n                            window.documentCategory[i].version = res.data.version;\n                            break;\n                        }\n                    }\n                    // 更新内容备份\n                    window.source = res.data.content;\n                    // 触发编辑器 onchange 回调函数\n                    window.editor.config.onchange();\n                    if(typeof callback === \"function\"){\n                        callback();\n                    }\n                }else if(res.errcode === 6005){\n                    var confirmIndex = layer.confirm(editormdLocales[lang].overrideModified, {\n                        btn: [editormdLocales[lang].confirm, editormdLocales[lang].cancel] // 按钮\n                    }, function () {\n                        layer.close(confirmIndex);\n                        saveDocument(true,callback);\n                    });\n                }else{\n                    layer.msg(res.message);\n                }\n            }\n        });\n    }\n\n\n\n    /**\n     * 添加顶级文档\n     */\n    $(\"#addDocumentForm\").ajaxForm({\n        beforeSubmit : function () {\n            var doc_name = $.trim($(\"#documentName\").val());\n            if (doc_name === \"\"){\n                return showError(\"目录名称不能为空\",\"#add-error-message\")\n            }\n            window.addDocumentFormIndex = layer.load(1, { shade: [0.1,'#fff']  });\n            return true;\n        },\n        success : function (res) {\n            if(res.errcode === 0){\n\n                var data = { \"id\" : res.data.doc_id,'parent' : res.data.parent_id === 0 ? '#' : res.data.parent_id ,\"text\" : res.data.doc_name,\"identify\" : res.data.identify,\"version\" : res.data.version};\n\n                var node = window.treeCatalog.get_node(data.id);\n                if(node){\n                    window.treeCatalog.rename_node({\"id\":data.id},data.text);\n\n                }else {\n                    window.treeCatalog.create_node(data.parent, data);\n                    window.treeCatalog.deselect_all();\n                    window.treeCatalog.select_node(data);\n                }\n                pushDocumentCategory(data);\n                $(\"#markdown-save\").removeClass('change').addClass('disabled');\n                $(\"#addDocumentModal\").modal('hide');\n            }else{\n                showError(res.message,\"#add-error-message\")\n            }\n            layer.close(window.addDocumentFormIndex);\n        }\n    });\n\n    /**\n     * 文档目录树\n     */\n    $(\"#sidebar\").jstree({\n        'plugins': [\"wholerow\", \"types\", 'dnd', 'contextmenu'],\n        \"types\": {\n            \"default\": {\n                \"icon\": false  // 删除默认图标\n            }\n        },\n        'core': {\n            'check_callback': true,\n            \"multiple\": false,\n            'animation': 0,\n            \"data\": window.documentCategory\n        },\n        \"contextmenu\": {\n            show_at_node: false,\n            select_node: false,\n            \"items\": {\n                \"添加文档\": {\n                    \"separator_before\": false,\n                    \"separator_after\": true,\n                    \"_disabled\": false,\n                    \"label\": window.editormdLocales[window.lang].addDoc,//\"添加文档\",\n                    \"icon\": \"fa fa-plus\",\n                    \"action\": function (data) {\n\n                        var inst = $.jstree.reference(data.reference),\n                            node = inst.get_node(data.reference);\n\n                        openCreateCatalogDialog(node);\n                    }\n                },\n                \"编辑\": {\n                    \"separator_before\": false,\n                    \"separator_after\": true,\n                    \"_disabled\": false,\n                    \"label\": window.editormdLocales[window.lang].edit,\n                    \"icon\": \"fa fa-edit\",\n                    \"action\": function (data) {\n                        var inst = $.jstree.reference(data.reference);\n                        var node = inst.get_node(data.reference);\n                        openEditCatalogDialog(node);\n                    }\n                },\n                \"删除\": {\n                    \"separator_before\": false,\n                    \"separator_after\": true,\n                    \"_disabled\": false,\n                    \"label\": window.editormdLocales[window.lang].delete,\n                    \"icon\": \"fa fa-trash-o\",\n                    \"action\": function (data) {\n                        var inst = $.jstree.reference(data.reference);\n                        var node = inst.get_node(data.reference);\n                        openDeleteDocumentDialog(node);\n                    }\n                }\n            }\n        }\n    }).on('loaded.jstree', function () {\n        window.treeCatalog = $(this).jstree();\n    }).on('select_node.jstree', function (node, selected, event) {\n        if(window.editor.menus.menuList.find((item) => item.key == 'save').$elem.hasClass('selected')) {\n             if (confirm(window.editormdLocales[window.lang].contentUnsaved)) {\n                saveDocument(false,function () {\n                    loadDocument(selected);\n                });\n                return true;\n            }\n        }\n        loadDocument(selected);\n\n    }).on(\"move_node.jstree\", jstree_save);\n\n    window.saveDocument = saveDocument;\n\n    window.releaseBook = function () {\n        if(Object.prototype.toString.call(window.documentCategory) === '[object Array]' && window.documentCategory.length > 0){\n            if(window.editor.menus.menuList.find((item) => item.key == 'save').$elem.hasClass('selected')) {\n                if(confirm(editormdLocales[lang].contentUnsaved)) {\n                    saveDocument();\n                }\n            }\n            locales = {\n                'zh-CN': {\n                    publishToQueue: '发布任务已推送到任务队列，稍后将在后台执行。',\n                },\n                'en': {\n                    publishToQueue: 'The publish task has been pushed to the queue</br> and will be executed soon.',\n                }\n            }\n            $.ajax({\n                url: window.releaseURL,\n                data: {\"identify\": window.book.identify},\n                type: \"post\",\n                dataType: \"json\",\n                success: function (res) {\n                    if (res.errcode === 0) {\n                        layer.msg(locales[lang].publishToQueue);\n                    } else {\n                        layer.msg(res.message);\n                    }\n                }\n            });\n        }else{\n            layer.msg(editormdLocales[lang].noDocNeedPublish)\n        }\n    };\n\n    $(window).resize(function(e) {\n      var $container = $(editor.$textContainerElem.elems[0]);\n      var $manual = $container.closest('.manual-wangEditor');\n      var maxHeight = $manual.closest('.manual-editor-container').innerHeight();\n      var statusHeight = $manual.siblings('.manual-editor-status').outerHeight(true);\n      var manualHeihgt = maxHeight - statusHeight;\n      $manual.height(manualHeihgt);\n      var toolbarHeight = $container.siblings('.w-e-toolbar').outerHeight(true);\n      $container.height($container.parent().innerHeight() - toolbarHeight);\n    });\n    $(window).trigger('resize');\n});"
  },
  {
    "path": "static/js/html-to-markdown.js",
    "content": "\nclass HtmlToMarkdownConverter {\n\n    handleFileSelect(callback, accept = '.html,.htm') {\n        let input = document.createElement('input');\n        input.type = 'file';\n        input.accept = accept;\n        input.onchange = (e)=>{\n            let file = e.target.files[0];\n            if (!file) {\n                return;\n            }\n            let reader = new FileReader();\n            reader.onload = (e)=>{\n                let text = e.target.result;\n                let markdown = this.convertToMarkdown(text);\n                callback(markdown);\n            };\n            reader.readAsText(file);\n        };\n        input.click();\n    }\n\n\n    convertToMarkdown(html) {\n        let turndownService = new TurndownService()\n        return turndownService.turndown(html)\n    }\n}"
  },
  {
    "path": "static/js/jquery.form.js",
    "content": "/*!\n * jQuery Form Plugin\n * version: 3.51.0-2014.06.20\n * Requires jQuery v1.5 or later\n * Copyright (c) 2014 M. Alsup\n * Examples and documentation at: http://malsup.com/jquery/form/\n * Project repository: https://github.com/malsup/form\n * Dual licensed under the MIT and GPL licenses.\n * https://github.com/malsup/form#copyright-and-license\n */\n/*global ActiveXObject */\n\n// AMD support\n(function (factory) {\n    \"use strict\";\n    if (typeof define === 'function' && define.amd) {\n        // using AMD; register as anon module\n        define(['jquery'], factory);\n    } else {\n        // no AMD; invoke directly\n        factory( (typeof(jQuery) != 'undefined') ? jQuery : window.Zepto );\n    }\n}\n\n(function($) {\n    \"use strict\";\n\n    /*\n     Usage Note:\n     -----------\n     Do not use both ajaxSubmit and ajaxForm on the same form.  These\n     functions are mutually exclusive.  Use ajaxSubmit if you want\n     to bind your own submit handler to the form.  For example,\n     $(document).ready(function() {\n     $('#myForm').on('submit', function(e) {\n     e.preventDefault(); // <-- important\n     $(this).ajaxSubmit({\n     target: '#output'\n     });\n     });\n     });\n     Use ajaxForm when you want the plugin to manage all the event binding\n     for you.  For example,\n     $(document).ready(function() {\n     $('#myForm').ajaxForm({\n     target: '#output'\n     });\n     });\n     You can also use ajaxForm with delegation (requires jQuery v1.7+), so the\n     form does not have to exist when you invoke ajaxForm:\n     $('#myForm').ajaxForm({\n     delegation: true,\n     target: '#output'\n     });\n     When using ajaxForm, the ajaxSubmit function will be invoked for you\n     at the appropriate time.\n     */\n\n    /**\n     * Feature detection\n     */\n    var feature = {};\n    feature.fileapi = $(\"<input type='file'/>\").get(0).files !== undefined;\n    feature.formdata = window.FormData !== undefined;\n\n    var hasProp = !!$.fn.prop;\n\n// attr2 uses prop when it can but checks the return type for\n// an expected string.  this accounts for the case where a form\n// contains inputs with names like \"action\" or \"method\"; in those\n// cases \"prop\" returns the element\n    $.fn.attr2 = function() {\n        if ( ! hasProp ) {\n            return this.attr.apply(this, arguments);\n        }\n        var val = this.prop.apply(this, arguments);\n        if ( ( val && val.jquery ) || typeof val === 'string' ) {\n            return val;\n        }\n        return this.attr.apply(this, arguments);\n    };\n\n    /**\n     * ajaxSubmit() provides a mechanism for immediately submitting\n     * an HTML form using AJAX.\n     */\n    $.fn.ajaxSubmit = function(options) {\n        /*jshint scripturl:true */\n\n        // fast fail if nothing selected (http://dev.jquery.com/ticket/2752)\n        if (!this.length) {\n            log('ajaxSubmit: skipping submit process - no element selected');\n            return this;\n        }\n\n        var method, action, url, $form = this;\n\n        if (typeof options == 'function') {\n            options = { success: options };\n        }\n        else if ( options === undefined ) {\n            options = {};\n        }\n\n        method = options.type || this.attr2('method');\n        action = options.url  || this.attr2('action');\n\n        url = (typeof action === 'string') ? $.trim(action) : '';\n        url = url || window.location.href || '';\n        if (url) {\n            // clean url (don't include hash vaue)\n            url = (url.match(/^([^#]+)/)||[])[1];\n        }\n\n        options = $.extend(true, {\n            url:  url,\n            success: $.ajaxSettings.success,\n            type: method || $.ajaxSettings.type,\n            iframeSrc: /^https/i.test(window.location.href || '') ? 'javascript:false' : 'about:blank'\n        }, options);\n\n        // hook for manipulating the form data before it is extracted;\n        // convenient for use with rich editors like tinyMCE or FCKEditor\n        var veto = {};\n        this.trigger('form-pre-serialize', [this, options, veto]);\n        if (veto.veto) {\n            log('ajaxSubmit: submit vetoed via form-pre-serialize trigger');\n            return this;\n        }\n\n        // provide opportunity to alter form data before it is serialized\n        if (options.beforeSerialize && options.beforeSerialize(this, options) === false) {\n            log('ajaxSubmit: submit aborted via beforeSerialize callback');\n            return this;\n        }\n\n        var traditional = options.traditional;\n        if ( traditional === undefined ) {\n            traditional = $.ajaxSettings.traditional;\n        }\n\n        var elements = [];\n        var qx, a = this.formToArray(options.semantic, elements);\n        if (options.data) {\n            options.extraData = options.data;\n            qx = $.param(options.data, traditional);\n        }\n\n        // give pre-submit callback an opportunity to abort the submit\n        if (options.beforeSubmit && options.beforeSubmit(a, this, options) === false) {\n            log('ajaxSubmit: submit aborted via beforeSubmit callback');\n            return this;\n        }\n\n        // fire vetoable 'validate' event\n        this.trigger('form-submit-validate', [a, this, options, veto]);\n        if (veto.veto) {\n            log('ajaxSubmit: submit vetoed via form-submit-validate trigger');\n            return this;\n        }\n\n        var q = $.param(a, traditional);\n        if (qx) {\n            q = ( q ? (q + '&' + qx) : qx );\n        }\n        if (options.type.toUpperCase() == 'GET') {\n            options.url += (options.url.indexOf('?') >= 0 ? '&' : '?') + q;\n            options.data = null;  // data is null for 'get'\n        }\n        else {\n            options.data = q; // data is the query string for 'post'\n        }\n\n        var callbacks = [];\n        if (options.resetForm) {\n            callbacks.push(function() { $form.resetForm(); });\n        }\n        if (options.clearForm) {\n            callbacks.push(function() { $form.clearForm(options.includeHidden); });\n        }\n\n        // perform a load on the target only if dataType is not provided\n        if (!options.dataType && options.target) {\n            var oldSuccess = options.success || function(){};\n            callbacks.push(function(data) {\n                var fn = options.replaceTarget ? 'replaceWith' : 'html';\n                $(options.target)[fn](data).each(oldSuccess, arguments);\n            });\n        }\n        else if (options.success) {\n            callbacks.push(options.success);\n        }\n\n        options.success = function(data, status, xhr) { // jQuery 1.4+ passes xhr as 3rd arg\n            var context = options.context || this ;    // jQuery 1.4+ supports scope context\n            for (var i=0, max=callbacks.length; i < max; i++) {\n                callbacks[i].apply(context, [data, status, xhr || $form, $form]);\n            }\n        };\n\n        if (options.error) {\n            var oldError = options.error;\n            options.error = function(xhr, status, error) {\n                var context = options.context || this;\n                oldError.apply(context, [xhr, status, error, $form]);\n            };\n        }\n\n        if (options.complete) {\n            var oldComplete = options.complete;\n            options.complete = function(xhr, status) {\n                var context = options.context || this;\n                oldComplete.apply(context, [xhr, status, $form]);\n            };\n        }\n\n        // are there files to upload?\n\n        // [value] (issue #113), also see comment:\n        // https://github.com/malsup/form/commit/588306aedba1de01388032d5f42a60159eea9228#commitcomment-2180219\n        var fileInputs = $('input[type=file]:enabled', this).filter(function() { return $(this).val() !== ''; });\n\n        var hasFileInputs = fileInputs.length > 0;\n        var mp = 'multipart/form-data';\n        var multipart = ($form.attr('enctype') == mp || $form.attr('encoding') == mp);\n\n        var fileAPI = feature.fileapi && feature.formdata;\n        log(\"fileAPI :\" + fileAPI);\n        var shouldUseFrame = (hasFileInputs || multipart) && !fileAPI;\n\n        var jqxhr;\n\n        // options.iframe allows user to force iframe mode\n        // 06-NOV-09: now defaulting to iframe mode if file input is detected\n        if (options.iframe !== false && (options.iframe || shouldUseFrame)) {\n            // hack to fix Safari hang (thanks to Tim Molendijk for this)\n            // see:  http://groups.google.com/group/jquery-dev/browse_thread/thread/36395b7ab510dd5d\n            if (options.closeKeepAlive) {\n                $.get(options.closeKeepAlive, function() {\n                    jqxhr = fileUploadIframe(a);\n                });\n            }\n            else {\n                jqxhr = fileUploadIframe(a);\n            }\n        }\n        else if ((hasFileInputs || multipart) && fileAPI) {\n            jqxhr = fileUploadXhr(a);\n        }\n        else {\n            jqxhr = $.ajax(options);\n        }\n\n        $form.removeData('jqxhr').data('jqxhr', jqxhr);\n\n        // clear element array\n        for (var k=0; k < elements.length; k++) {\n            elements[k] = null;\n        }\n\n        // fire 'notify' event\n        this.trigger('form-submit-notify', [this, options]);\n        return this;\n\n        // utility fn for deep serialization\n        function deepSerialize(extraData){\n            var serialized = $.param(extraData, options.traditional).split('&');\n            var len = serialized.length;\n            var result = [];\n            var i, part;\n            for (i=0; i < len; i++) {\n                // #252; undo param space replacement\n                serialized[i] = serialized[i].replace(/\\+/g,' ');\n                part = serialized[i].split('=');\n                // #278; use array instead of object storage, favoring array serializations\n                result.push([decodeURIComponent(part[0]), decodeURIComponent(part[1])]);\n            }\n            return result;\n        }\n\n        // XMLHttpRequest Level 2 file uploads (big hat tip to francois2metz)\n        function fileUploadXhr(a) {\n            var formdata = new FormData();\n\n            for (var i=0; i < a.length; i++) {\n                formdata.append(a[i].name, a[i].value);\n            }\n\n            if (options.extraData) {\n                var serializedData = deepSerialize(options.extraData);\n                for (i=0; i < serializedData.length; i++) {\n                    if (serializedData[i]) {\n                        formdata.append(serializedData[i][0], serializedData[i][1]);\n                    }\n                }\n            }\n\n            options.data = null;\n\n            var s = $.extend(true, {}, $.ajaxSettings, options, {\n                contentType: false,\n                processData: false,\n                cache: false,\n                type: method || 'POST'\n            });\n\n            if (options.uploadProgress) {\n                // workaround because jqXHR does not expose upload property\n                s.xhr = function() {\n                    var xhr = $.ajaxSettings.xhr();\n                    if (xhr.upload) {\n                        xhr.upload.addEventListener('progress', function(event) {\n                            var percent = 0;\n                            var position = event.loaded || event.position; /*event.position is deprecated*/\n                            var total = event.total;\n                            if (event.lengthComputable) {\n                                percent = Math.ceil(position / total * 100);\n                            }\n                            options.uploadProgress(event, position, total, percent);\n                        }, false);\n                    }\n                    return xhr;\n                };\n            }\n\n            s.data = null;\n            var beforeSend = s.beforeSend;\n            s.beforeSend = function(xhr, o) {\n                //Send FormData() provided by user\n                if (options.formData) {\n                    o.data = options.formData;\n                }\n                else {\n                    o.data = formdata;\n                }\n                if(beforeSend) {\n                    beforeSend.call(this, xhr, o);\n                }\n            };\n            return $.ajax(s);\n        }\n\n        // private function for handling file uploads (hat tip to YAHOO!)\n        function fileUploadIframe(a) {\n            var form = $form[0], el, i, s, g, id, $io, io, xhr, sub, n, timedOut, timeoutHandle;\n            var deferred = $.Deferred();\n\n            // #341\n            deferred.abort = function(status) {\n                xhr.abort(status);\n            };\n\n            if (a) {\n                // ensure that every serialized input is still enabled\n                for (i=0; i < elements.length; i++) {\n                    el = $(elements[i]);\n                    if ( hasProp ) {\n                        el.prop('disabled', false);\n                    }\n                    else {\n                        el.removeAttr('disabled');\n                    }\n                }\n            }\n\n            s = $.extend(true, {}, $.ajaxSettings, options);\n            s.context = s.context || s;\n            id = 'jqFormIO' + (new Date().getTime());\n            if (s.iframeTarget) {\n                $io = $(s.iframeTarget);\n                n = $io.attr2('name');\n                if (!n) {\n                    $io.attr2('name', id);\n                }\n                else {\n                    id = n;\n                }\n            }\n            else {\n                $io = $('<iframe name=\"' + id + '\" src=\"'+ s.iframeSrc +'\" />');\n                $io.css({ position: 'absolute', top: '-1000px', left: '-1000px' });\n            }\n            io = $io[0];\n\n\n            xhr = { // mock object\n                aborted: 0,\n                responseText: null,\n                responseXML: null,\n                status: 0,\n                statusText: 'n/a',\n                getAllResponseHeaders: function() {},\n                getResponseHeader: function() {},\n                setRequestHeader: function() {},\n                abort: function(status) {\n                    var e = (status === 'timeout' ? 'timeout' : 'aborted');\n                    log('aborting upload... ' + e);\n                    this.aborted = 1;\n\n                    try { // #214, #257\n                        if (io.contentWindow.document.execCommand) {\n                            io.contentWindow.document.execCommand('Stop');\n                        }\n                    }\n                    catch(ignore) {}\n\n                    $io.attr('src', s.iframeSrc); // abort op in progress\n                    xhr.error = e;\n                    if (s.error) {\n                        s.error.call(s.context, xhr, e, status);\n                    }\n                    if (g) {\n                        $.event.trigger(\"ajaxError\", [xhr, s, e]);\n                    }\n                    if (s.complete) {\n                        s.complete.call(s.context, xhr, e);\n                    }\n                }\n            };\n\n            g = s.global;\n            // trigger ajax global events so that activity/block indicators work like normal\n            if (g && 0 === $.active++) {\n                $.event.trigger(\"ajaxStart\");\n            }\n            if (g) {\n                $.event.trigger(\"ajaxSend\", [xhr, s]);\n            }\n\n            if (s.beforeSend && s.beforeSend.call(s.context, xhr, s) === false) {\n                if (s.global) {\n                    $.active--;\n                }\n                deferred.reject();\n                return deferred;\n            }\n            if (xhr.aborted) {\n                deferred.reject();\n                return deferred;\n            }\n\n            // add submitting element to data if we know it\n            sub = form.clk;\n            if (sub) {\n                n = sub.name;\n                if (n && !sub.disabled) {\n                    s.extraData = s.extraData || {};\n                    s.extraData[n] = sub.value;\n                    if (sub.type == \"image\") {\n                        s.extraData[n+'.x'] = form.clk_x;\n                        s.extraData[n+'.y'] = form.clk_y;\n                    }\n                }\n            }\n\n            var CLIENT_TIMEOUT_ABORT = 1;\n            var SERVER_ABORT = 2;\n\n            function getDoc(frame) {\n                /* it looks like contentWindow or contentDocument do not\n                 * carry the protocol property in ie8, when running under ssl\n                 * frame.document is the only valid response document, since\n                 * the protocol is know but not on the other two objects. strange?\n                 * \"Same origin policy\" http://en.wikipedia.org/wiki/Same_origin_policy\n                 */\n\n                var doc = null;\n\n                // IE8 cascading access check\n                try {\n                    if (frame.contentWindow) {\n                        doc = frame.contentWindow.document;\n                    }\n                } catch(err) {\n                    // IE8 access denied under ssl & missing protocol\n                    log('cannot get iframe.contentWindow document: ' + err);\n                }\n\n                if (doc) { // successful getting content\n                    return doc;\n                }\n\n                try { // simply checking may throw in ie8 under ssl or mismatched protocol\n                    doc = frame.contentDocument ? frame.contentDocument : frame.document;\n                } catch(err) {\n                    // last attempt\n                    log('cannot get iframe.contentDocument: ' + err);\n                    doc = frame.document;\n                }\n                return doc;\n            }\n\n            // Rails CSRF hack (thanks to Yvan Barthelemy)\n            var csrf_token = $('meta[name=csrf-token]').attr('content');\n            var csrf_param = $('meta[name=csrf-param]').attr('content');\n            if (csrf_param && csrf_token) {\n                s.extraData = s.extraData || {};\n                s.extraData[csrf_param] = csrf_token;\n            }\n\n            // take a breath so that pending repaints get some cpu time before the upload starts\n            function doSubmit() {\n                // make sure form attrs are set\n                var t = $form.attr2('target'),\n                    a = $form.attr2('action'),\n                    mp = 'multipart/form-data',\n                    et = $form.attr('enctype') || $form.attr('encoding') || mp;\n\n                // update form attrs in IE friendly way\n                form.setAttribute('target',id);\n                if (!method || /post/i.test(method) ) {\n                    form.setAttribute('method', 'POST');\n                }\n                if (a != s.url) {\n                    form.setAttribute('action', s.url);\n                }\n\n                // ie borks in some cases when setting encoding\n                if (! s.skipEncodingOverride && (!method || /post/i.test(method))) {\n                    $form.attr({\n                        encoding: 'multipart/form-data',\n                        enctype:  'multipart/form-data'\n                    });\n                }\n\n                // support timout\n                if (s.timeout) {\n                    timeoutHandle = setTimeout(function() { timedOut = true; cb(CLIENT_TIMEOUT_ABORT); }, s.timeout);\n                }\n\n                // look for server aborts\n                function checkState() {\n                    try {\n                        var state = getDoc(io).readyState;\n                        log('state = ' + state);\n                        if (state && state.toLowerCase() == 'uninitialized') {\n                            setTimeout(checkState,50);\n                        }\n                    }\n                    catch(e) {\n                        log('Server abort: ' , e, ' (', e.name, ')');\n                        cb(SERVER_ABORT);\n                        if (timeoutHandle) {\n                            clearTimeout(timeoutHandle);\n                        }\n                        timeoutHandle = undefined;\n                    }\n                }\n\n                // add \"extra\" data to form if provided in options\n                var extraInputs = [];\n                try {\n                    if (s.extraData) {\n                        for (var n in s.extraData) {\n                            if (s.extraData.hasOwnProperty(n)) {\n                                // if using the $.param format that allows for multiple values with the same name\n                                if($.isPlainObject(s.extraData[n]) && s.extraData[n].hasOwnProperty('name') && s.extraData[n].hasOwnProperty('value')) {\n                                    extraInputs.push(\n                                        $('<input type=\"hidden\" name=\"'+s.extraData[n].name+'\">').val(s.extraData[n].value)\n                                            .appendTo(form)[0]);\n                                } else {\n                                    extraInputs.push(\n                                        $('<input type=\"hidden\" name=\"'+n+'\">').val(s.extraData[n])\n                                            .appendTo(form)[0]);\n                                }\n                            }\n                        }\n                    }\n\n                    if (!s.iframeTarget) {\n                        // add iframe to doc and submit the form\n                        $io.appendTo('body');\n                    }\n                    if (io.attachEvent) {\n                        io.attachEvent('onload', cb);\n                    }\n                    else {\n                        io.addEventListener('load', cb, false);\n                    }\n                    setTimeout(checkState,15);\n\n                    try {\n                        form.submit();\n                    } catch(err) {\n                        // just in case form has element with name/id of 'submit'\n                        var submitFn = document.createElement('form').submit;\n                        submitFn.apply(form);\n                    }\n                }\n                finally {\n                    // reset attrs and remove \"extra\" input elements\n                    form.setAttribute('action',a);\n                    form.setAttribute('enctype', et); // #380\n                    if(t) {\n                        form.setAttribute('target', t);\n                    } else {\n                        $form.removeAttr('target');\n                    }\n                    $(extraInputs).remove();\n                }\n            }\n\n            if (s.forceSync) {\n                doSubmit();\n            }\n            else {\n                setTimeout(doSubmit, 10); // this lets dom updates render\n            }\n\n            var data, doc, domCheckCount = 50, callbackProcessed;\n\n            function cb(e) {\n                if (xhr.aborted || callbackProcessed) {\n                    return;\n                }\n\n                doc = getDoc(io);\n                if(!doc) {\n                    log('cannot access response document');\n                    e = SERVER_ABORT;\n                }\n                if (e === CLIENT_TIMEOUT_ABORT && xhr) {\n                    xhr.abort('timeout');\n                    deferred.reject(xhr, 'timeout');\n                    return;\n                }\n                else if (e == SERVER_ABORT && xhr) {\n                    xhr.abort('server abort');\n                    deferred.reject(xhr, 'error', 'server abort');\n                    return;\n                }\n\n                if (!doc || doc.location.href == s.iframeSrc) {\n                    // response not received yet\n                    if (!timedOut) {\n                        return;\n                    }\n                }\n                if (io.detachEvent) {\n                    io.detachEvent('onload', cb);\n                }\n                else {\n                    io.removeEventListener('load', cb, false);\n                }\n\n                var status = 'success', errMsg;\n                try {\n                    if (timedOut) {\n                        throw 'timeout';\n                    }\n\n                    var isXml = s.dataType == 'xml' || doc.XMLDocument || $.isXMLDoc(doc);\n                    log('isXml='+isXml);\n                    if (!isXml && window.opera && (doc.body === null || !doc.body.innerHTML)) {\n                        if (--domCheckCount) {\n                            // in some browsers (Opera) the iframe DOM is not always traversable when\n                            // the onload callback fires, so we loop a bit to accommodate\n                            log('requeing onLoad callback, DOM not available');\n                            setTimeout(cb, 250);\n                            return;\n                        }\n                        // let this fall through because server response could be an empty document\n                        //log('Could not access iframe DOM after mutiple tries.');\n                        //throw 'DOMException: not available';\n                    }\n\n                    //log('response detected');\n                    var docRoot = doc.body ? doc.body : doc.documentElement;\n                    xhr.responseText = docRoot ? docRoot.innerHTML : null;\n                    xhr.responseXML = doc.XMLDocument ? doc.XMLDocument : doc;\n                    if (isXml) {\n                        s.dataType = 'xml';\n                    }\n                    xhr.getResponseHeader = function(header){\n                        var headers = {'content-type': s.dataType};\n                        return headers[header.toLowerCase()];\n                    };\n                    // support for XHR 'status' & 'statusText' emulation :\n                    if (docRoot) {\n                        xhr.status = Number( docRoot.getAttribute('status') ) || xhr.status;\n                        xhr.statusText = docRoot.getAttribute('statusText') || xhr.statusText;\n                    }\n\n                    var dt = (s.dataType || '').toLowerCase();\n                    var scr = /(json|script|text)/.test(dt);\n                    if (scr || s.textarea) {\n                        // see if user embedded response in textarea\n                        var ta = doc.getElementsByTagName('textarea')[0];\n                        if (ta) {\n                            xhr.responseText = ta.value;\n                            // support for XHR 'status' & 'statusText' emulation :\n                            xhr.status = Number( ta.getAttribute('status') ) || xhr.status;\n                            xhr.statusText = ta.getAttribute('statusText') || xhr.statusText;\n                        }\n                        else if (scr) {\n                            // account for browsers injecting pre around json response\n                            var pre = doc.getElementsByTagName('pre')[0];\n                            var b = doc.getElementsByTagName('body')[0];\n                            if (pre) {\n                                xhr.responseText = pre.textContent ? pre.textContent : pre.innerText;\n                            }\n                            else if (b) {\n                                xhr.responseText = b.textContent ? b.textContent : b.innerText;\n                            }\n                        }\n                    }\n                    else if (dt == 'xml' && !xhr.responseXML && xhr.responseText) {\n                        xhr.responseXML = toXml(xhr.responseText);\n                    }\n\n                    try {\n                        data = httpData(xhr, dt, s);\n                    }\n                    catch (err) {\n                        status = 'parsererror';\n                        xhr.error = errMsg = (err || status);\n                    }\n                }\n                catch (err) {\n                    log('error caught: ',err);\n                    status = 'error';\n                    xhr.error = errMsg = (err || status);\n                }\n\n                if (xhr.aborted) {\n                    log('upload aborted');\n                    status = null;\n                }\n\n                if (xhr.status) { // we've set xhr.status\n                    status = (xhr.status >= 200 && xhr.status < 300 || xhr.status === 304) ? 'success' : 'error';\n                }\n\n                // ordering of these callbacks/triggers is odd, but that's how $.ajax does it\n                if (status === 'success') {\n                    if (s.success) {\n                        s.success.call(s.context, data, 'success', xhr);\n                    }\n                    deferred.resolve(xhr.responseText, 'success', xhr);\n                    if (g) {\n                        $.event.trigger(\"ajaxSuccess\", [xhr, s]);\n                    }\n                }\n                else if (status) {\n                    if (errMsg === undefined) {\n                        errMsg = xhr.statusText;\n                    }\n                    if (s.error) {\n                        s.error.call(s.context, xhr, status, errMsg);\n                    }\n                    deferred.reject(xhr, 'error', errMsg);\n                    if (g) {\n                        $.event.trigger(\"ajaxError\", [xhr, s, errMsg]);\n                    }\n                }\n\n                if (g) {\n                    $.event.trigger(\"ajaxComplete\", [xhr, s]);\n                }\n\n                if (g && ! --$.active) {\n                    $.event.trigger(\"ajaxStop\");\n                }\n\n                if (s.complete) {\n                    s.complete.call(s.context, xhr, status);\n                }\n\n                callbackProcessed = true;\n                if (s.timeout) {\n                    clearTimeout(timeoutHandle);\n                }\n\n                // clean up\n                setTimeout(function() {\n                    if (!s.iframeTarget) {\n                        $io.remove();\n                    }\n                    else { //adding else to clean up existing iframe response.\n                        $io.attr('src', s.iframeSrc);\n                    }\n                    xhr.responseXML = null;\n                }, 100);\n            }\n\n            var toXml = $.parseXML || function(s, doc) { // use parseXML if available (jQuery 1.5+)\n                    if (window.ActiveXObject) {\n                        doc = new ActiveXObject('Microsoft.XMLDOM');\n                        doc.async = 'false';\n                        doc.loadXML(s);\n                    }\n                    else {\n                        doc = (new DOMParser()).parseFromString(s, 'text/xml');\n                    }\n                    return (doc && doc.documentElement && doc.documentElement.nodeName != 'parsererror') ? doc : null;\n                };\n            var parseJSON = $.parseJSON || function(s) {\n                    /*jslint evil:true */\n                    return window['eval']('(' + s + ')');\n                };\n\n            var httpData = function( xhr, type, s ) { // mostly lifted from jq1.4.4\n\n                var ct = xhr.getResponseHeader('content-type') || '',\n                    xml = type === 'xml' || !type && ct.indexOf('xml') >= 0,\n                    data = xml ? xhr.responseXML : xhr.responseText;\n\n                if (xml && data.documentElement.nodeName === 'parsererror') {\n                    if ($.error) {\n                        $.error('parsererror');\n                    }\n                }\n                if (s && s.dataFilter) {\n                    data = s.dataFilter(data, type);\n                }\n                if (typeof data === 'string') {\n                    if (type === 'json' || !type && ct.indexOf('json') >= 0) {\n                        data = parseJSON(data);\n                    } else if (type === \"script\" || !type && ct.indexOf(\"javascript\") >= 0) {\n                        $.globalEval(data);\n                    }\n                }\n                return data;\n            };\n\n            return deferred;\n        }\n    };\n\n    /**\n     * ajaxForm() provides a mechanism for fully automating form submission.\n     *\n     * The advantages of using this method instead of ajaxSubmit() are:\n     *\n     * 1: This method will include coordinates for <input type=\"image\" /> elements (if the element\n     *    is used to submit the form).\n     * 2. This method will include the submit element's name/value data (for the element that was\n     *    used to submit the form).\n     * 3. This method binds the submit() method to the form for you.\n     *\n     * The options argument for ajaxForm works exactly as it does for ajaxSubmit.  ajaxForm merely\n     * passes the options argument along after properly binding events for submit elements and\n     * the form itself.\n     */\n    $.fn.ajaxForm = function(options) {\n        options = options || {};\n        options.delegation = options.delegation && $.isFunction($.fn.on);\n\n        // in jQuery 1.3+ we can fix mistakes with the ready state\n        if (!options.delegation && this.length === 0) {\n            var o = { s: this.selector, c: this.context };\n            if (!$.isReady && o.s) {\n                log('DOM not ready, queuing ajaxForm');\n                $(function() {\n                    $(o.s,o.c).ajaxForm(options);\n                });\n                return this;\n            }\n            // is your DOM ready?  http://docs.jquery.com/Tutorials:Introducing_$(document).ready()\n            log('terminating; zero elements found by selector' + ($.isReady ? '' : ' (DOM not ready)'));\n            return this;\n        }\n\n        if ( options.delegation ) {\n            $(document)\n                .off('submit.form-plugin', this.selector, doAjaxSubmit)\n                .off('click.form-plugin', this.selector, captureSubmittingElement)\n                .on('submit.form-plugin', this.selector, options, doAjaxSubmit)\n                .on('click.form-plugin', this.selector, options, captureSubmittingElement);\n            return this;\n        }\n\n        return this.ajaxFormUnbind()\n            .bind('submit.form-plugin', options, doAjaxSubmit)\n            .bind('click.form-plugin', options, captureSubmittingElement);\n    };\n\n// private event handlers\n    function doAjaxSubmit(e) {\n        /*jshint validthis:true */\n        var options = e.data;\n        if (!e.isDefaultPrevented()) { // if event has been canceled, don't proceed\n            e.preventDefault();\n            $(e.target).ajaxSubmit(options); // #365\n        }\n    }\n\n    function captureSubmittingElement(e) {\n        /*jshint validthis:true */\n        var target = e.target;\n        var $el = $(target);\n        if (!($el.is(\"[type=submit],[type=image]\"))) {\n            // is this a child element of the submit el?  (ex: a span within a button)\n            var t = $el.closest('[type=submit]');\n            if (t.length === 0) {\n                return;\n            }\n            target = t[0];\n        }\n        var form = this;\n        form.clk = target;\n        if (target.type == 'image') {\n            if (e.offsetX !== undefined) {\n                form.clk_x = e.offsetX;\n                form.clk_y = e.offsetY;\n            } else if (typeof $.fn.offset == 'function') {\n                var offset = $el.offset();\n                form.clk_x = e.pageX - offset.left;\n                form.clk_y = e.pageY - offset.top;\n            } else {\n                form.clk_x = e.pageX - target.offsetLeft;\n                form.clk_y = e.pageY - target.offsetTop;\n            }\n        }\n        // clear form vars\n        setTimeout(function() { form.clk = form.clk_x = form.clk_y = null; }, 100);\n    }\n\n\n// ajaxFormUnbind unbinds the event handlers that were bound by ajaxForm\n    $.fn.ajaxFormUnbind = function() {\n        return this.unbind('submit.form-plugin click.form-plugin');\n    };\n\n    /**\n     * formToArray() gathers form element data into an array of objects that can\n     * be passed to any of the following ajax functions: $.get, $.post, or load.\n     * Each object in the array has both a 'name' and 'value' property.  An example of\n     * an array for a simple login form might be:\n     *\n     * [ { name: 'username', value: 'jresig' }, { name: 'password', value: 'secret' } ]\n     *\n     * It is this array that is passed to pre-submit callback functions provided to the\n     * ajaxSubmit() and ajaxForm() methods.\n     */\n    $.fn.formToArray = function(semantic, elements) {\n        var a = [];\n        if (this.length === 0) {\n            return a;\n        }\n\n        var form = this[0];\n        var formId = this.attr('id');\n        var els = semantic ? form.getElementsByTagName('*') : form.elements;\n        var els2;\n\n        if (els && !/MSIE [678]/.test(navigator.userAgent)) { // #390\n            els = $(els).get();  // convert to standard array\n        }\n\n        // #386; account for inputs outside the form which use the 'form' attribute\n        if ( formId ) {\n            els2 = $(':input[form=\"' + formId + '\"]').get(); // hat tip @thet\n            if ( els2.length ) {\n                els = (els || []).concat(els2);\n            }\n        }\n\n        if (!els || !els.length) {\n            return a;\n        }\n\n        var i,j,n,v,el,max,jmax;\n        for(i=0, max=els.length; i < max; i++) {\n            el = els[i];\n            n = el.name;\n            if (!n || el.disabled) {\n                continue;\n            }\n\n            if (semantic && form.clk && el.type == \"image\") {\n                // handle image inputs on the fly when semantic == true\n                if(form.clk == el) {\n                    a.push({name: n, value: $(el).val(), type: el.type });\n                    a.push({name: n+'.x', value: form.clk_x}, {name: n+'.y', value: form.clk_y});\n                }\n                continue;\n            }\n\n            v = $.fieldValue(el, true);\n            if (v && v.constructor == Array) {\n                if (elements) {\n                    elements.push(el);\n                }\n                for(j=0, jmax=v.length; j < jmax; j++) {\n                    a.push({name: n, value: v[j]});\n                }\n            }\n            else if (feature.fileapi && el.type == 'file') {\n                if (elements) {\n                    elements.push(el);\n                }\n                var files = el.files;\n                if (files.length) {\n                    for (j=0; j < files.length; j++) {\n                        a.push({name: n, value: files[j], type: el.type});\n                    }\n                }\n                else {\n                    // #180\n                    a.push({ name: n, value: '', type: el.type });\n                }\n            }\n            else if (v !== null && typeof v != 'undefined') {\n                if (elements) {\n                    elements.push(el);\n                }\n                a.push({name: n, value: v, type: el.type, required: el.required});\n            }\n        }\n\n        if (!semantic && form.clk) {\n            // input type=='image' are not found in elements array! handle it here\n            var $input = $(form.clk), input = $input[0];\n            n = input.name;\n            if (n && !input.disabled && input.type == 'image') {\n                a.push({name: n, value: $input.val()});\n                a.push({name: n+'.x', value: form.clk_x}, {name: n+'.y', value: form.clk_y});\n            }\n        }\n        return a;\n    };\n\n    /**\n     * Serializes form data into a 'submittable' string. This method will return a string\n     * in the format: name1=value1&amp;name2=value2\n     */\n    $.fn.formSerialize = function(semantic) {\n        //hand off to jQuery.param for proper encoding\n        return $.param(this.formToArray(semantic));\n    };\n\n    /**\n     * Serializes all field elements in the jQuery object into a query string.\n     * This method will return a string in the format: name1=value1&amp;name2=value2\n     */\n    $.fn.fieldSerialize = function(successful) {\n        var a = [];\n        this.each(function() {\n            var n = this.name;\n            if (!n) {\n                return;\n            }\n            var v = $.fieldValue(this, successful);\n            if (v && v.constructor == Array) {\n                for (var i=0,max=v.length; i < max; i++) {\n                    a.push({name: n, value: v[i]});\n                }\n            }\n            else if (v !== null && typeof v != 'undefined') {\n                a.push({name: this.name, value: v});\n            }\n        });\n        //hand off to jQuery.param for proper encoding\n        return $.param(a);\n    };\n\n    /**\n     * Returns the value(s) of the element in the matched set.  For example, consider the following form:\n     *\n     *  <form><fieldset>\n     *      <input name=\"A\" type=\"text\" />\n     *      <input name=\"A\" type=\"text\" />\n     *      <input name=\"B\" type=\"checkbox\" value=\"B1\" />\n     *      <input name=\"B\" type=\"checkbox\" value=\"B2\"/>\n     *      <input name=\"C\" type=\"radio\" value=\"C1\" />\n     *      <input name=\"C\" type=\"radio\" value=\"C2\" />\n     *  </fieldset></form>\n     *\n     *  var v = $('input[type=text]').fieldValue();\n     *  // if no values are entered into the text inputs\n     *  v == ['','']\n     *  // if values entered into the text inputs are 'foo' and 'bar'\n     *  v == ['foo','bar']\n     *\n     *  var v = $('input[type=checkbox]').fieldValue();\n     *  // if neither checkbox is checked\n     *  v === undefined\n     *  // if both checkboxes are checked\n     *  v == ['B1', 'B2']\n     *\n     *  var v = $('input[type=radio]').fieldValue();\n     *  // if neither radio is checked\n     *  v === undefined\n     *  // if first radio is checked\n     *  v == ['C1']\n     *\n     * The successful argument controls whether or not the field element must be 'successful'\n     * (per http://www.w3.org/TR/html4/interact/forms.html#successful-controls).\n     * The default value of the successful argument is true.  If this value is false the value(s)\n     * for each element is returned.\n     *\n     * Note: This method *always* returns an array.  If no valid value can be determined the\n     *    array will be empty, otherwise it will contain one or more values.\n     */\n    $.fn.fieldValue = function(successful) {\n        for (var val=[], i=0, max=this.length; i < max; i++) {\n            var el = this[i];\n            var v = $.fieldValue(el, successful);\n            if (v === null || typeof v == 'undefined' || (v.constructor == Array && !v.length)) {\n                continue;\n            }\n            if (v.constructor == Array) {\n                $.merge(val, v);\n            }\n            else {\n                val.push(v);\n            }\n        }\n        return val;\n    };\n\n    /**\n     * Returns the value of the field element.\n     */\n    $.fieldValue = function(el, successful) {\n        var n = el.name, t = el.type, tag = el.tagName.toLowerCase();\n        if (successful === undefined) {\n            successful = true;\n        }\n\n        if (successful && (!n || el.disabled || t == 'reset' || t == 'button' ||\n            (t == 'checkbox' || t == 'radio') && !el.checked ||\n            (t == 'submit' || t == 'image') && el.form && el.form.clk != el ||\n            tag == 'select' && el.selectedIndex == -1)) {\n            return null;\n        }\n\n        if (tag == 'select') {\n            var index = el.selectedIndex;\n            if (index < 0) {\n                return null;\n            }\n            var a = [], ops = el.options;\n            var one = (t == 'select-one');\n            var max = (one ? index+1 : ops.length);\n            for(var i=(one ? index : 0); i < max; i++) {\n                var op = ops[i];\n                if (op.selected) {\n                    var v = op.value;\n                    if (!v) { // extra pain for IE...\n                        v = (op.attributes && op.attributes.value && !(op.attributes.value.specified)) ? op.text : op.value;\n                    }\n                    if (one) {\n                        return v;\n                    }\n                    a.push(v);\n                }\n            }\n            return a;\n        }\n        return $(el).val();\n    };\n\n    /**\n     * Clears the form data.  Takes the following actions on the form's input fields:\n     *  - input text fields will have their 'value' property set to the empty string\n     *  - select elements will have their 'selectedIndex' property set to -1\n     *  - checkbox and radio inputs will have their 'checked' property set to false\n     *  - inputs of type submit, button, reset, and hidden will *not* be effected\n     *  - button elements will *not* be effected\n     */\n    $.fn.clearForm = function(includeHidden) {\n        return this.each(function() {\n            $('input,select,textarea', this).clearFields(includeHidden);\n        });\n    };\n\n    /**\n     * Clears the selected form elements.\n     */\n    $.fn.clearFields = $.fn.clearInputs = function(includeHidden) {\n        var re = /^(?:color|date|datetime|email|month|number|password|range|search|tel|text|time|url|week)$/i; // 'hidden' is not in this list\n        return this.each(function() {\n            var t = this.type, tag = this.tagName.toLowerCase();\n            if (re.test(t) || tag == 'textarea') {\n                this.value = '';\n            }\n            else if (t == 'checkbox' || t == 'radio') {\n                this.checked = false;\n            }\n            else if (tag == 'select') {\n                this.selectedIndex = -1;\n            }\n            else if (t == \"file\") {\n                if (/MSIE/.test(navigator.userAgent)) {\n                    $(this).replaceWith($(this).clone(true));\n                } else {\n                    $(this).val('');\n                }\n            }\n            else if (includeHidden) {\n                // includeHidden can be the value true, or it can be a selector string\n                // indicating a special test; for example:\n                //  $('#myForm').clearForm('.special:hidden')\n                // the above would clean hidden inputs that have the class of 'special'\n                if ( (includeHidden === true && /hidden/.test(t)) ||\n                    (typeof includeHidden == 'string' && $(this).is(includeHidden)) ) {\n                    this.value = '';\n                }\n            }\n        });\n    };\n\n    /**\n     * Resets the form data.  Causes all form elements to be reset to their original value.\n     */\n    $.fn.resetForm = function() {\n        return this.each(function() {\n            // guard against an input with the name of 'reset'\n            // note that IE reports the reset function as an 'object'\n            if (typeof this.reset == 'function' || (typeof this.reset == 'object' && !this.reset.nodeType)) {\n                this.reset();\n            }\n        });\n    };\n\n    /**\n     * Enables or disables any matching elements.\n     */\n    $.fn.enable = function(b) {\n        if (b === undefined) {\n            b = true;\n        }\n        return this.each(function() {\n            this.disabled = !b;\n        });\n    };\n\n    /**\n     * Checks/unchecks any matching checkboxes or radio buttons and\n     * selects/deselects and matching option elements.\n     */\n    $.fn.selected = function(select) {\n        if (select === undefined) {\n            select = true;\n        }\n        return this.each(function() {\n            var t = this.type;\n            if (t == 'checkbox' || t == 'radio') {\n                this.checked = select;\n            }\n            else if (this.tagName.toLowerCase() == 'option') {\n                var $sel = $(this).parent('select');\n                if (select && $sel[0] && $sel[0].type == 'select-one') {\n                    // deselect all other options\n                    $sel.find('option').selected(false);\n                }\n                this.selected = select;\n            }\n        });\n    };\n\n// expose debug var\n    $.fn.ajaxSubmit.debug = false;\n\n// helper fn for console logging\n    function log() {\n        if (!$.fn.ajaxSubmit.debug) {\n            return;\n        }\n        var msg = '[jquery.form] ' + Array.prototype.join.call(arguments,'');\n        if (window.console && window.console.log) {\n            window.console.log(msg);\n        }\n        else if (window.opera && window.opera.postError) {\n            window.opera.postError(msg);\n        }\n    }\n}));\n\n"
  },
  {
    "path": "static/js/jquery.highlight.js",
    "content": "jQuery.fn.highlight = function(pat) {\n    function innerHighlight(node, pat) {\n        var skip = 0;\n        if (node.nodeType === 3) {\n            var pos = node.data.toUpperCase().indexOf(pat);\n            if (pos >= 0) {\n                var spannode = document.createElement('em');\n                spannode.className = 'search-highlight';\n                var middlebit = node.splitText(pos);\n                var endbit = middlebit.splitText(pat.length);\n                var middleclone = middlebit.cloneNode(true);\n                spannode.appendChild(middleclone);\n                middlebit.parentNode.replaceChild(spannode, middlebit);\n                skip = 1;\n            }\n        }\n        else if (node.nodeType === 1 && node.childNodes && !/(script|style)/i.test(node.tagName)) {\n            for (var i = 0; i < node.childNodes.length; ++i) {\n                i += innerHighlight(node.childNodes[i], pat);\n            }\n        }\n        return skip;\n    }\n    return this.each(function() {\n        innerHighlight(this, pat.toUpperCase());\n    });\n};"
  },
  {
    "path": "static/js/kancloud.js",
    "content": "var events = function () {\n    var articleOpen = function (event, $param) {\n        //当打开文档时，将文档ID加入到本地缓存。\n        window.sessionStorage && window.sessionStorage.setItem(\"MinDoc::LastLoadDocument:\" + window.book.identify, $param.$id);\n        var prevState = window.history.state || {};\n        if ('pushState' in history) {\n            if ($param.$id) {\n                prevState.$id === $param.$id || window.history.pushState($param, $param.$id, $param.$url);\n            } else {\n                window.history.pushState($param, $param.$id, $param.$url);\n                window.history.replaceState($param, $param.$id, $param.$url);\n            }\n        } else {\n            window.location.hash = $param.$url;\n        }\n\n        initHighlighting();\n        $(window).resize();\n\n        $(\".manual-right\").scrollTop(0);\n        //使用layer相册功能查看图片\n        layer.photos({ photos: \"#page-content\" });\n    };\n\n    return {\n        data: function ($key, $value) {\n            $key = \"MinDoc::Document:\" + $key;\n            if (typeof $value === \"undefined\") {\n                return $(\"body\").data($key);\n            } else {\n                return $('body').data($key, $value);\n            }\n        },\n        trigger: function ($e, $obj) {\n            if ($e === \"article.open\") {\n                articleOpen($e, $obj);\n            } else {\n                $('body').trigger('article.open', $obj);\n            }\n        }\n    }\n\n}();\n\nfunction format($d) {\n    return $d < 10 ? \"0\" + $d : \"\" + $d;\n}\n\nfunction timeFormat($time) {\n    var span = Date.parse($time)\n    var date = new Date(span)\n    var year = date.getFullYear();\n    var month = format(date.getMonth() + 1);\n    var day = format(date.getDate());\n    var hour = format(date.getHours());\n    var min = format(date.getMinutes());\n    var sec = format(date.getSeconds());\n    return year + \"-\" + month + \"-\" + day + \" \" + hour + \":\" + min + \":\" + sec;\n}\n\n// 点击翻页\nfunction pageClicked($page, $docid) {\n    if (!window.IS_DISPLAY_COMMENT) {\n        return;\n    }\n    $(\"#articleComment\").removeClass('not-show-comment');\n    $.ajax({\n        url: \"/comment/lists?page=\" + $page + \"&docid=\" + $docid,\n        type: \"GET\",\n        success: function ($res) {\n            console.log($res.data);\n            loadComment($res.data.page, $res.data.doc_id);\n        },\n        error: function () {\n            layer.msg(\"加载失败\");\n        }\n    });\n}\n\nfunction renderOperateSection(comment) {\n    const deleteIcon = comment.show_del == 1\n        ? `<i class=\"delete e-delete glyphicon glyphicon-remove\" onclick=\"onDelComment(${comment.comment_id})\"></i>`\n        : '';\n\n    return `\n        <span class=\"operate ${comment.show_del == 1 ? 'toggle' : ''}\">\n            <span class=\"number\">${comment.index}#</span>\n            ${deleteIcon}\n        </span>`;\n}\n\n// 加载评论\nfunction loadComment($page, $docid) {\n    $(\"#commentList\").empty();\n    let html = \"\"\n    let c = $page.List;\n    for (let i = 0; c && i < c.length; i++) {\n        const comment = c[i];\n        html += `\n        <div class=\"comment-item\" data-id=\"${comment.comment_id}\">\n            <p class=\"info\">\n                <img src=\"${comment.avatar}\" alt=\"\">\n                <a class=\"name\">${comment.author}</a>\n                <span class=\"date\">${timeFormat(comment.comment_date)}</span>\n            </p>\n            <div class=\"content\">${comment.content}</div>\n            <p class=\"util\">\n                ${renderOperateSection(comment)}\n            </p>\n        </div>`;\n    }\n    $(\"#commentList\").append(html);\n    if ($page.TotalPage > 1) {\n        $(\"#page\").bootstrapPaginator({\n            currentPage: $page.PageNo,\n            totalPages: $page.TotalPage,\n            bootstrapMajorVersion: 3,\n            size: \"middle\",\n            onPageClicked: function (e, originalEvent, type, page) {\n                pageClicked(page, $docid);\n            }\n        });\n    } else {\n        $(\"#page\").find(\"li\").remove();\n    }\n}\n\n// 删除评论\nfunction onDelComment($id) {\n    $.ajax({\n        url: \"/comment/delete\",\n        data: { \"id\": $id },\n        type: \"POST\",\n        success: function ($res) {\n            if ($res.errcode == 0) {\n                layer.msg(\"删除成功\");\n                $(\"div[data-id=\" + $id + \"]\").remove();\n            } else {\n                layer.msg($res.message);\n            }\n        },\n        error: function () {\n            layer.msg(\"删除失败\");\n        }\n    });\n}\n\n// 重新渲染页面\nfunction renderPage($data) {\n    $(\"#page-content\").html($data.body);\n    $(\"title\").text($data.title);\n    $(\"#article-title\").text($data.doc_title);\n    $(\"#article-info\").text($data.doc_info);\n    $(\"#view_count\").text(\"阅读次数：\" + $data.view_count);\n    $(\"#doc_id\").val($data.doc_id);\n    checkMarkdownTocElement();\n    if ($data.page) {\n        loadComment($data.page, $data.doc_id);\n    } else {\n        pageClicked(-1, $data.doc_id);\n    }\n\n    if ($data.is_markdown) {\n        if ($(\"#view_container\").hasClass($data.markdown_theme)) {\n            return\n        }\n        $(\"#view_container\").removeClass(\"theme__dark theme__green theme__light theme__red theme__default\")\n        $(\"#view_container\").addClass($data.markdown_theme)\n    }\n\n}\n\n/***\n * 加载文档到阅读区\n * @param $url\n * @param $id\n * @param $callback\n */\nfunction loadDocument($url, $id, $callback) {\n    $.ajax({\n        url: $url,\n        type: \"GET\",\n        beforeSend: function () {\n            var data = events.data($id);\n            if (data) {\n                if (typeof $callback === \"function\") {\n                    data.body = $callback(data.body);\n                } else if (data.version && data.version != $callback) {\n                    return true;\n                }\n                renderPage(data);\n\n                loadCopySnippets();\n                events.trigger('article.open', { $url: $url, $id: $id });\n\n                return false;\n\n            }\n\n            NProgress.start();\n        },\n        success: function ($res) {\n            if ($res.errcode === 0) {\n                var data = $res.data;\n                if (typeof $callback === \"function\") {\n                    data.body = $callback(data.body);\n                }\n                renderPage(data);\n                loadCopySnippets();\n                events.data($id, data);\n                events.trigger('article.open', { $url: $url, $id: $id });\n            } else if ($res.errcode === 6000) {\n                window.location.href = \"/\";\n            } else {\n                layer.msg(\"加载失败\");\n            }\n        },\n        complete: function () {\n            NProgress.done();\n        },\n        error: function () {\n            layer.msg(\"加载失败\");\n        }\n    });\n}\n\n/**\n * 初始化代码高亮\n */\nfunction initHighlighting() {\n    try {\n        $('pre,pre.ql-syntax').each(function (i, block) {\n            if ($(this).hasClass('prettyprinted') || $(this).hasClass('hljs')) {\n                return;\n            }\n            hljs.highlightBlock(block);\n        });\n        // hljs.initLineNumbersOnLoad();\n    } catch (e) {\n        console.log(e);\n    }\n}\n\nfunction handleEvent(event) {\n    // 如果焦点在输入框、textarea或可编辑元素中，不执行快捷键操作\n    var target = event.target;\n    var tagName = target.tagName.toLowerCase();\n    var isInputElement = tagName === 'input' || tagName === 'textarea' || tagName === 'select';\n    var isContentEditable = target.isContentEditable || target.contentEditable === 'true';\n    \n    if (isInputElement || isContentEditable) {\n        return;\n    }\n    \n    switch (event.keyCode) {\n        case 70: // ctrl + f 打开搜索面板 并获取焦点\n            $(\".navg-item[data-mode='search']\").click();\n            document.getElementById('searchForm').querySelector('input').focus();\n            event.preventDefault();\n            break;\n        case 27: // esc 关闭搜索面板\n            $(\".navg-item[data-mode='view']\").click();\n            event.preventDefault();\n            break;\n    }\n}\n\n$(function () {\n    window.addEventListener('keydown', handleEvent)\n\n    checkMarkdownTocElement();\n    $(\".view-backtop\").on(\"click\", function () {\n        $('.manual-right').animate({ scrollTop: '0px' }, 200);\n    });\n    $(\".manual-right\").scroll(function () {\n        try {\n            var top = $(\".manual-right\").scrollTop();\n            if (top > 100) {\n                $(\".view-backtop\").addClass(\"active\");\n            } else {\n                $(\".view-backtop\").removeClass(\"active\");\n            }\n        } catch (e) {\n            console.log(e);\n        }\n\n        try {\n            var scrollTop = $(\"body\").scrollTop();\n            var oItem = $(\".markdown-heading\").find(\".reference-link\");\n            var oName = \"\";\n            $.each(oItem, function () {\n                var oneItem = $(this);\n                var offsetTop = oneItem.offset().top;\n\n                if (offsetTop - scrollTop < 100) {\n                    oName = \"#\" + oneItem.attr(\"name\");\n                }\n            });\n            $(\".markdown-toc-list a\").each(function () {\n                if (oName === $(this).attr(\"href\")) {\n                    $(this).parents(\"li\").addClass(\"directory-item-active\");\n                } else {\n                    $(this).parents(\"li\").removeClass(\"directory-item-active\");\n                }\n            });\n            if (!$(\".markdown-toc-list li\").hasClass('directory-item-active')) {\n                $(\".markdown-toc-list li:eq(0)\").addClass(\"directory-item-active\");\n            }\n        } catch (e) {\n            console.log(e);\n        }\n    }).on(\"click\", \".markdown-toc-list a\", function () {\n        var $this = $(this);\n        setTimeout(function () {\n            $(\".markdown-toc-list li\").removeClass(\"directory-item-active\");\n            $this.parents(\"li\").addClass(\"directory-item-active\");\n        }, 10);\n    }).find(\".markdown-toc-list li:eq(0)\").addClass(\"directory-item-active\");\n\n\n    $(window).resize(function (e) {\n        var h = $(\".manual-catalog\").innerHeight() - 50;\n        $(\".markdown-toc\").height(h);\n    }).resize();\n\n    window.isFullScreen = false;\n\n    initHighlighting();\n    window.jsTree = $(\"#sidebar\").jstree({\n        'plugins': [\"wholerow\", \"types\"],\n        \"types\": {\n            \"default\": {\n                \"icon\": false  // 删除默认图标\n            }\n        },\n        'core': {\n            'check_callback': true,\n            \"multiple\": false,\n            'animation': 0\n        }\n    }).on('select_node.jstree', function (node, selected) {\n        //如果是空目录则直接出发展开下一级功能\n        if (selected.node.a_attr && selected.node.a_attr.disabled) {\n            selected.instance.toggle_node(selected.node);\n            return false\n        }\n        $(\".m-manual\").removeClass('manual-mobile-show-left');\n        loadDocument(selected.node.a_attr.href, selected.node.id, selected.node.a_attr['data-version']);\n    });\n\n    $(\"#slidebar\").on(\"click\", function () {\n        $(\".m-manual\").addClass('manual-mobile-show-left');\n    });\n    $(\".manual-mask\").on(\"click\", function () {\n        $(\".m-manual\").removeClass('manual-mobile-show-left');\n    });\n\n    /**\n     * 关闭侧边栏\n     */\n    $(\".manual-fullscreen-switch\").on(\"click\", function () {\n        isFullScreen = !isFullScreen;\n        if (isFullScreen) {\n            $(\".m-manual\").addClass('manual-fullscreen-active');\n        } else {\n            $(\".m-manual\").removeClass('manual-fullscreen-active');\n        }\n    });\n\n    $(\".navg-item[data-mode]\").on(\"click\", function () {\n        var mode = $(this).data('mode');\n        $(this).siblings().removeClass('active').end().addClass('active');\n        $(\".m-manual\").removeClass(\"manual-mode-view manual-mode-collect manual-mode-search\").addClass(\"manual-mode-\" + mode);\n    });\n\n    const input = document.getElementById('searchForm').querySelector('input');\n    input.addEventListener('input', function() {\n        $(\"#btnSearch\").click();\n    });\n\n    /**\n     * 项目内搜索\n     */\n    $(\"#searchForm\").ajaxForm({\n        beforeSubmit: function () {\n            var keyword = $.trim($(\"#searchForm\").find(\"input[name='keyword']\").val());\n            if (keyword === \"\") {\n                $(\".search-empty\").show();\n                $(\"#searchList\").html(\"\");\n                return false;\n            }\n            $(\"#btnSearch\").attr(\"disabled\", \"disabled\").find(\"i\").removeClass(\"fa-search\").addClass(\"loading\");\n            window.keyword = keyword;\n        },\n        success: function (res) {\n            var html = \"\";\n            if (res.errcode === 0) {\n                for (var i in res.data) {\n                    var item = res.data[i];\n                    html += '<li><a href=\"javascript:;\" title=\"' + item.doc_name + '\" data-id=\"' + item.doc_id + '\"> ' + item.doc_name + ' </a></li>';\n                }\n            }\n            if (html !== \"\") {\n                $(\".search-empty\").hide();\n            } else {\n                $(\".search-empty\").show();\n            }\n            $(\"#searchList\").html(html);\n        },\n        complete: function () {\n            $(\"#btnSearch\").removeAttr(\"disabled\").find(\"i\").removeClass(\"loading\").addClass(\"fa-search\");\n        }\n    });\n\n    window.onpopstate = function (e) {\n        var $param = e.state;\n        if (!$param) return;\n        if ($param.hasOwnProperty(\"$url\")) {\n            window.jsTree.jstree().deselect_all();\n\n            if ($param.$id) {\n                window.jsTree.jstree().select_node({ id: $param.$id });\n            } else {\n                window.location.assign($param.$url);\n            }\n            // events.trigger('article.open', $param);\n        } else {\n            console.log($param);\n        }\n    };\n\n    // 提交评论\n    $(\"#commentForm\").ajaxForm({\n        beforeSubmit: function () {\n            $(\"#btnSubmitComment\").button(\"loading\");\n        },\n        success: function (res) {\n            if (res.errcode === 0) {\n                layer.msg(\"保存成功\");\n            } else {\n                layer.msg(res.message);\n            }\n            $(\"#btnSubmitComment\").button(\"reset\");\n            $(\"#commentContent\").val(\"\");\n            pageClicked(-1, res.data.doc_id); // -1 表示请求最后一页\n        },\n        error: function () {\n            layer.msg(\"服务错误\");\n            $(\"#btnSubmitComment\").button(\"reset\");\n        }\n    });\n    loadCopySnippets();\n});\n\nfunction loadCopySnippets() {\n    $(\"pre\").addClass(\"line-numbers language-bash\");\n    $(\"pre\").attr('data-prismjs-copy', '复制');\n    $(\"pre\").attr('data-prismjs-copy-error', '按Ctrl+C复制');\n    $(\"pre\").attr('data-prismjs-copy-success', '代码已复制！');\n    var snippets = document.querySelectorAll('pre code');\n    [].forEach.call(snippets, function (snippet) {\n        Prism.highlightElement(snippet);\n    });\n}\n\nfunction checkMarkdownTocElement() {\n    let toc = $(\".markdown-toc-list\");\n    if ($(\".toc\").length) {\n        toc = $(\".toc\");\n    }\n    let articleComment = $(\"#articleComment\");\n    if (toc.length) {\n        $(\".wiki-bottom-left\").css(\"width\", \"calc(100% - 260px)\");\n        articleComment.css(\"width\", \"calc(100% - 260px)\");\n        articleComment.css(\"margin\", \"30px 0 70px 0\");\n    } else {\n        $(\".wiki-bottom-left\").css(\"width\", \"100%\");\n        articleComment.css(\"width\", \"100%\");\n        articleComment.css(\"margin\", \"30px auto 70px auto;\");\n    }\n}"
  },
  {
    "path": "static/js/main.js",
    "content": "(function () {\n    $(\"[data-toggle='tooltip']\").tooltip();\n})();\n\nfunction showError($msg,$id) {\n    if(!$id){\n        $id = \"#form-error-message\"\n    }\n    $($id).addClass(\"error-message\").removeClass(\"success-message\").text($msg).show();\n    return false;\n}\n\nfunction showSuccess($msg,$id) {\n    if(!$id){\n        $id = \"#form-error-message\"\n    }\n    $($id).addClass(\"success-message\").removeClass(\"error-message\").text($msg).show();\n    return true;\n}\n\nDate.prototype.format = function(fmt) {\n    var o = {\n        \"M+\" : this.getMonth()+1,                 //月份\n        \"d+\" : this.getDate(),                    //日\n        \"h+\" : this.getHours(),                   //小时\n        \"m+\" : this.getMinutes(),                 //分\n        \"s+\" : this.getSeconds(),                 //秒\n        \"q+\" : Math.floor((this.getMonth()+3)/3), //季度\n        \"S\"  : this.getMilliseconds()             //毫秒\n    };\n    if(/(y+)/.test(fmt)) {\n        fmt=fmt.replace(RegExp.$1, (this.getFullYear()+\"\").substr(4 - RegExp.$1.length));\n    }\n    for(var k in o) {\n        if(new RegExp(\"(\"+ k +\")\").test(fmt)){\n            fmt = fmt.replace(RegExp.$1, (RegExp.$1.length==1) ? (o[k]) : ((\"00\"+ o[k]).substr((\"\"+ o[k]).length)));\n        }\n    }\n    return fmt;\n};\n\nfunction formatBytes($size) {\n    var $units = [\" B\", \" KB\", \" MB\", \" GB\", \" TB\"];\n\n    for ($i = 0; $size >= 1024 && $i < 4; $i++) $size /= 1024;\n\n    return $size.toFixed(2) + $units[$i];\n}"
  },
  {
    "path": "static/js/markdown.js",
    "content": "$(function () {\n    editormd.katexURL = {\n        js: window.katex.js,\n        css: window.katex.css\n    };\n    var drawio = new Object()\n\n    drawio.processMarkers = function (from, to) {\n        var _this = this\n        var found = null\n        var foundStart = 0\n        var cm = window.editor.cm;\n        cm.doc.getAllMarks().forEach(mk => {\n            if (mk.__kind) {\n                mk.clear()\n            }\n        })\n        cm.eachLine(from, to, function (ln) {\n            const line = ln.lineNo()\n\n            if (ln.text.startsWith('```drawio')) {\n                found = 'drawio'\n                foundStart = line\n            } else if (ln.text === '```' && found) {\n                switch (found) {\n                    // -> DRAWIO\n                    case 'drawio': {\n                        if (line - foundStart !== 2) {\n                            return\n                        }\n                        _this.addMarker({\n                            kind: 'drawio',\n                            from: { line: foundStart, ch: 3 },\n                            to: { line: foundStart, ch: 10 },\n                            text: 'drawio',\n                            action: (function (start, end) {\n                                return function (ev) {\n                                    cm.doc.setSelection({ line: start, ch: 0 }, { line: end, ch: 3 })\n                                    try {\n                                        // save state data\n                                        const raw = cm.doc.getLine(end - 1)\n                                        window.sessionStorage.setItem(\"drawio\", raw);\n                                        _this.show()\n                                    } catch (err) {\n                                        console.log(err)\n                                    }\n                                }\n                            })(foundStart, line)\n                        })\n\n                        if (ln.height > 0) {\n                            cm.foldCode(foundStart)\n                        }\n                        break;\n                    }\n                }\n                found = null\n            }\n        })\n    }\n\n    drawio.addMarker = function ({ kind, from, to, text, action }) {\n\n        const markerElm = document.createElement('span')\n        markerElm.appendChild(document.createTextNode(text))\n        markerElm.className = 'CodeMirror-buttonmarker'\n        markerElm.addEventListener('click', action)\n\n        var cm = window.editor.cm;\n        cm.markText(from, to, { replacedWith: markerElm, __kind: kind })\n    }\n\n    drawio.show = function () {\n\n        const drawUrl = 'https://embed.diagrams.net/?embed=1&libraries=1&proto=json&spin=1&saveAndExit=1&noSaveBtn=1&noExitBtn=0'; // TODO: with Tomcat & https://github.com/jgraph/drawio\n        this.div = document.createElement('div');\n        this.div.id = 'diagram';\n        this.gXml = '';\n        this.div.innerHTML = '';\n        this.iframe = document.createElement('iframe');\n        this.iframe.setAttribute('frameborder', '0');\n        this.iframe.style.zIndex = 9999;\n        this.iframe.style.width = \"100%\";\n        this.iframe.style.height = \"100%\";\n        this.iframe.style.position = \"absolute\";\n        this.iframe.style.top = window.scrollY + \"px\";\n        binded = this.postMessage.bind(this);\n        window.addEventListener(\"message\", binded, false);\n        this.iframe.setAttribute('src', drawUrl);\n        document.body.appendChild(this.iframe);\n    }\n\n    drawio.postMessage = function (evt) {\n        if (evt.data.length < 1) return\n        var msg = JSON.parse(evt.data)\n        var svg = '';\n\n        switch (msg.event) {\n            case \"configure\":\n                this.iframe.contentWindow.postMessage(\n                    JSON.stringify({\n                        action: \"configure\",\n                        config: {\n                            defaultFonts: [\"Humor Sans\", \"Helvetica\", \"Times New Roman\"],\n                        },\n                    }),\n                    \"*\"\n                );\n                break;\n            case \"init\":\n                code = window.sessionStorage.getItem(\"drawio\")\n                svg = decodeURIComponent(escape(window.atob(code)))\n                this.iframe.contentWindow.postMessage(\n                    JSON.stringify({ action: \"load\", autosave: 1, xml: svg }),\n                    \"*\"\n                );\n                break;\n            case \"autosave\":\n                window.sessionStorage.setItem(\"drawio\", svg);\n                break;\n            case \"save\":\n                this.iframe.contentWindow.postMessage(\n                    JSON.stringify({\n                        action: \"export\",\n                        format: \"xmlsvg\",\n                        xml: msg.xml,\n                        spin: \"Updating page\",\n                    }),\n                    \"*\"\n                );\n                break;\n            case \"export\":\n                svgData = msg.data.substring(msg.data.indexOf(',') + 1);\n                // clean event bind\n                window.removeEventListener(\"message\", this.binded);\n                document.body.removeChild(this.iframe);\n\n                // write back svg data\n                var cm = window.editor.cm;\n                cm.doc.replaceSelection('```drawio\\n' + svgData + '\\n```', 'start')\n                // clean state data\n                window.sessionStorage.setItem(\"drawio\", '');\n                break;\n            case \"exit\":\n                window.removeEventListener(\"message\", this.binded);\n                document.body.removeChild(this.iframe);\n                break;\n        }\n    }\n\n    window.editormdLocales = {\n        'zh-CN': {\n            placeholder: '本编辑器支持 Markdown 编辑，左边编写，右边预览。',\n            contentUnsaved: '编辑内容未保存，需要保存吗？',\n            noDocNeedPublish: '没有需要发布的文档',\n            loadDocFailed: '文档加载失败',\n            fetchDocFailed: '获取当前文档信息失败',\n            cannotAddToEmptyNode: '空节点不能添加内容',\n            overrideModified: '文档已被其他人修改确定覆盖已存在的文档吗？',\n            confirm: '确定',\n            cancel: '取消',\n            contentsNameEmpty: '目录名称不能为空',\n            addDoc: '添加文档',\n            edit: '编辑',\n            delete: '删除',\n            loadFailed: '加载失败请重试',\n            tplNameEmpty: '模板名称不能为空',\n            tplContentEmpty: '模板内容不能为空',\n            saveSucc: '保存成功',\n            serverExcept: '服务器异常',\n            paramName: '参数名称',\n            paramType: '参数类型',\n            example: '示例值',\n            remark: '备注',\n        },\n        'en': {\n            placeholder: 'This editor supports Markdown editing, writing on the left and previewing on the right.',\n            contentUnsaved: 'The edited content is not saved, need to save it?',\n            noDocNeedPublish: 'No Document need to be publish',\n            loadDocFailed: 'Load Document failed',\n            fetchDocFailed: 'Fetch Document info failed',\n            cannotAddToEmptyNode: 'Cannot add content to empty node',\n            overrideModified: 'The document has been modified by someone else, are you sure to overwrite the document?',\n            confirm: 'Confirm',\n            cancel: 'Cancel',\n            contentsNameEmpty: 'Document Name cannot be empty',\n            addDoc: 'Add Document',\n            edit: 'Edit',\n            delete: 'Delete',\n            loadFailed: 'Failed to load, please try again',\n            tplNameEmpty: 'Template name cannot be empty',\n            tplContentEmpty: 'Template content cannot be empty',\n            saveSucc: 'Save success',\n            serverExcept: 'Server Exception',\n            paramName: 'Parameter',\n            paramType: 'Type',\n            example: 'Example',\n            remark: 'Remark',\n        }\n    };\n    var htmlDecodeList = [\"style\", \"script\", \"title\", \"onmouseover\", \"onmouseout\", \"style\"];\n    if (!window.IS_ENABLE_IFRAME) {\n        htmlDecodeList.unshift(\"iframe\");\n    }\n    window.editor = editormd(\"docEditor\", {\n        width: \"100%\",\n        height: \"100%\",\n        path: window.editormdLib,\n        toolbar: true,\n        placeholder: window.editormdLocales[window.lang].placeholder,\n        imageUpload: true,\n        imageFormats: [\"jpg\", \"jpeg\", \"gif\", \"png\", \"svg\", \"JPG\", \"JPEG\", \"GIF\", \"PNG\", \"SVG\"],\n        imageUploadURL: window.imageUploadURL,\n        toolbarModes: \"full\",\n        fileUpload: true,\n        fileUploadURL: window.fileUploadURL,\n        taskList: true,\n        flowChart: true,\n        htmlDecode: htmlDecodeList.join(','),\n        lineNumbers: true,\n        sequenceDiagram: true,\n        tocStartLevel: 1,\n        tocm: true,\n        previewCodeHighlight: 1,\n        highlightStyle: window.highlightStyle ? window.highlightStyle : \"github\",\n        tex: true,\n        saveHTMLToTextarea: true,\n        codeFold: true,\n\n        onload: function() {\n            this.registerHelper()\n            this.hideToolbar();\n            var keyMap = {\n                \"Ctrl-S\": function (cm) {\n                    saveDocument(false);\n                },\n                \"Cmd-S\": function (cm) {\n                    saveDocument(false);\n                },\n                \"Ctrl-A\": function (cm) {\n                    cm.execCommand(\"selectAll\");\n                }\n            };\n            this.addKeyMap(keyMap);\n\n            //如果没有选中节点则选中默认节点\n            openLastSelectedNode();\n            uploadResource(\"docEditor\", function ($state, $res) {\n                if ($state === \"before\") {\n                    return layer.load(1, {\n                        shade: [0.1, '#fff'] // 0.1 透明度的白色背景\n                    });\n                } else if ($state === \"success\") {\n                    if ($res.errcode === 0) {\n                        if ($res.resource_type === 'video') {\n                            let value = `<video controls><source src=\"${$res.url}\" type=\"video/mp4\"></video>`;\n                            window.editor.insertValue(value);\n                        } else {\n                            let value = '![](' + $res.url + ')';\n                            window.editor.insertValue(value);\n                        }\n                    } else {\n                        layer.msg(\"上传失败：\" + $res.message);\n                    }\n                }\n            });\n\n            window.isLoad = true;\n            this.tableEditor = TableEditor.initTableEditor(this.cm)\n        },\n        onchange: function () {\n            /**\n             * 实现画图的事件注入\n             * \n             * 1. 分析文本，添加点击编辑事件，processMarkers\n             * 2. 获取内容，存储状态数据\n             * 3. 打开编辑画面\n             * 4. 推出触发变更事件，并回写数据\n             */\n\n            var cm = window.editor.cm;\n            drawio.processMarkers(cm.firstLine(), cm.lastLine() + 1)\n\n            resetEditorChanged(true);\n        }\n    });\n\n    editormd.fn.registerHelper = function () {\n\n        const maxDepth = 100\n        const codeBlockStartMatch = /^`{3}[a-zA-Z0-9]+$/\n        const codeBlockEndMatch = /^`{3}$/\n\n\n        editormd.$CodeMirror.registerHelper('fold', 'markdown', function (cm, start) {\n            const firstLine = cm.getLine(start.line)\n            const lastLineNo = cm.lastLine()\n            let end\n\n            function isHeader(lineNo) {\n                const tokentype = cm.getTokenTypeAt(CodeMirror.Pos(lineNo, 0))\n                return tokentype && /\\bheader\\b/.test(tokentype)\n            }\n\n            function headerLevel(lineNo, line, nextLine) {\n                let match = line && line.match(/^#+/)\n                if (match && isHeader(lineNo)) return match[0].length\n                match = nextLine && nextLine.match(/^[=-]+\\s*$/)\n                if (match && isHeader(lineNo + 1)) return nextLine[0] === '=' ? 1 : 2\n                return maxDepth\n            }\n\n            // -> CODE BLOCK\n\n            if (codeBlockStartMatch.test(cm.getLine(start.line))) {\n                end = start.line\n                let nextNextLine = cm.getLine(end + 1)\n                while (end < lastLineNo) {\n                    if (codeBlockEndMatch.test(nextNextLine)) {\n                        end++\n                        break\n                    }\n                    end++\n                    nextNextLine = cm.getLine(end + 1)\n                }\n            } else {\n                // -> HEADER\n\n                let nextLine = cm.getLine(start.line + 1)\n                const level = headerLevel(start.line, firstLine, nextLine)\n                if (level === maxDepth) return undefined\n\n                end = start.line\n                let nextNextLine = cm.getLine(end + 2)\n                while (end < lastLineNo) {\n                    if (headerLevel(end + 1, nextLine, nextNextLine) <= level) break\n                    ++end\n                    nextLine = nextNextLine\n                    nextNextLine = cm.getLine(end + 2)\n                }\n            }\n\n            return {\n                from: CodeMirror.Pos(start.line, firstLine.length),\n                to: CodeMirror.Pos(end, cm.getLine(end).length)\n            }\n        })\n    }\n\n    function insertToMarkdown(body) {\n        window.isLoad = true;\n        window.editor.insertValue(body);\n        window.editor.setCursor({ line: 0, ch: 0 });\n        resetEditorChanged(true);\n    }\n    function insertAndClearToMarkdown(body) {\n        window.isLoad = true;\n        window.editor.clear();\n        window.editor.insertValue(body);\n        window.editor.setCursor({ line: 0, ch: 0 });\n        resetEditorChanged(true);\n    }\n\n    /**\n     * 实现标题栏操作\n     */\n    $(\"#editormd-tools\").on(\"click\", \"a[class!='disabled']\", function () {\n        var name = $(this).find(\"i\").attr(\"name\");\n        if (name === \"attachment\") {\n            $(\"#uploadAttachModal\").modal(\"show\");\n        } else if (name === \"history\") {\n            window.documentHistory();\n        } else if (name === \"save\") {\n            saveDocument(false);\n        } else if (name === \"template\") {\n            $(\"#documentTemplateModal\").modal(\"show\");\n        } else if (name === \"save-template\") {\n            $(\"#saveTemplateModal\").modal(\"show\");\n        } else if (name === 'json') {\n            $(\"#convertJsonToTableModal\").modal(\"show\");\n        } else if (name === \"sidebar\") {\n            $(\"#manualCategory\").toggle(0, \"swing\", function () {\n                var $then = $(\"#manualEditorContainer\");\n                var left = parseInt($then.css(\"left\"));\n                if (left > 0) {\n                    window.editorContainerLeft = left;\n                    $then.css(\"left\", \"0\");\n                } else {\n                    $then.css(\"left\", window.editorContainerLeft + \"px\");\n                }\n                window.editor.resize();\n            });\n        } else if (name === \"release\") {\n            if (Object.prototype.toString.call(window.documentCategory) === '[object Array]' && window.documentCategory.length > 0) {\n                if ($(\"#markdown-save\").hasClass('change')) {\n                    var confirm_result = confirm(editormdLocales[lang].contentUnsaved);\n                    if (confirm_result) {\n                        saveDocument(false, releaseBook);\n                        return;\n                    }\n                }\n\n                releaseBook();\n            } else {\n                layer.msg(editormdLocales[lang].noDocNeedPublish)\n            }\n        } else if (name === \"tasks\") {\n            // 插入 GFM 任务列表\n            var cm = window.editor.cm;\n            var selection = cm.getSelection();\n            var cursor = cm.getCursor();\n            if (selection === \"\") {\n                cm.setCursor(cursor.line, 0);\n                cm.replaceSelection(\"- [x] \" + selection);\n                cm.setCursor(cursor.line, cursor.ch + 6);\n            } else {\n                var selectionText = selection.split(\"\\n\");\n\n                for (var i = 0, len = selectionText.length; i < len; i++) {\n                    selectionText[i] = (selectionText[i] === \"\") ? \"\" : \"- [x] \" + selectionText[i];\n                }\n                cm.replaceSelection(selectionText.join(\"\\n\"));\n            }\n        } else if (name === \"drawio\") {\n            /**\n             * TODO: 画图功能实现\n             * \n             * 1. 获取光标处数据，存储数据\n             * 2. 打开画图页面，初始化数据（获取数据）\n             */\n            window.sessionStorage.setItem(\"drawio\", '');\n\n            var cm = window.editor.cm;\n            const selStartLine = cm.getCursor('from').line\n            const selEndLine = cm.getCursor('to').line + 1\n\n            drawio.processMarkers(selStartLine, selEndLine)\n            drawio.show()\n        } else if (name === 'wordToContent') {\n            let converter = new WordToHtmlConverter();\n            converter.handleFileSelect(function (response) {\n                if (response.messages.length) {\n                    let messages = response.messages.map((item)=>{\n                        return item.message + \"<br/>\";\n                    }).join('\\n');\n                    layer.msg(messages);\n                }\n                converter.replaceHtmlBase64(response.value).then((html)=>{\n                    let cm = window.editor.cm;\n                    cm.replaceSelection(html);\n                });\n            })\n        } else if (name === 'htmlToMarkdown') {\n            let converter = new HtmlToMarkdownConverter();\n            converter.handleFileSelect(function (response) {\n                let cm = window.editor.cm;\n                cm.replaceSelection(response);\n            })\n        } else {\n            var action = window.editor.toolbarHandlers[name];\n\n            if (!!action && action !== \"undefined\") {\n                $.proxy(action, window.editor)();\n                window.editor.focus();\n            }\n        }\n    });\n\n    /***\n     * 加载指定的文档到编辑器中\n     * @param $node\n     */\n    window.loadDocument = function ($node) {\n        var index = layer.load(1, {\n            shade: [0.1, '#fff'] // 0.1 透明度的白色背景\n        });\n\n        $.get(window.editURL + $node.node.id).done(function (res) {\n            layer.close(index);\n\n            if (res.errcode === 0) {\n                window.isLoad = true;\n                try {\n                    window.editor.clear();\n                    window.editor.insertValue(res.data.markdown);\n                    window.editor.setCursor({ line: 0, ch: 0 });\n                } catch (e) {\n                    console.log(e);\n                }\n                var node = { \"id\": res.data.doc_id, 'parent': res.data.parent_id === 0 ? '#' : res.data.parent_id, \"text\": res.data.doc_name, \"identify\": res.data.identify, \"version\": res.data.version };\n                pushDocumentCategory(node);\n                window.selectNode = node;\n                pushVueLists(res.data.attach);\n                setLastSelectNode($node);\n            } else {\n                layer.msg(editormdLocales[lang].loadDocFailed);\n            }\n        }).fail(function () {\n            layer.close(index);\n            layer.msg(editormdLocales[lang].loadDocFailed);\n        });\n    };\n\n    /**\n     * 保存文档到服务器\n     * @param $is_cover 是否强制覆盖\n     */\n    function saveDocument($is_cover, callback) {\n        var index = null;\n        var node = window.selectNode;\n        var content = window.editor.getMarkdown();\n        var html = window.editor.getPreviewedHTML();\n        var version = \"\";\n\n        if (!node) {\n            layer.msg(editormdLocales[lang].fetchDocFailed);\n            return;\n        }\n        if (node.a_attr && node.a_attr.disabled) {\n            layer.msg(editormdLocales[lang].cannotAddToEmptyNode);\n            return;\n        }\n\n        var doc_id = parseInt(node.id);\n\n        for (var i in window.documentCategory) {\n            var item = window.documentCategory[i];\n\n            if (item.id === doc_id) {\n                version = item.version;\n                break;\n            }\n        }\n        $.ajax({\n            beforeSend: function () {\n                index = layer.load(1, { shade: [0.1, '#fff'] });\n                window.saveing = true;\n            },\n            url: window.editURL,\n            data: { \"identify\": window.book.identify, \"doc_id\": doc_id, \"markdown\": content, \"html\": html, \"cover\": $is_cover ? \"yes\" : \"no\", \"version\": version },\n            type: \"post\",\n            timeout: 30000,\n            dataType: \"json\",\n            success: function (res) {\n                if (res.errcode === 0) {\n                    resetEditorChanged(false);\n                    for (var i in window.documentCategory) {\n                        var item = window.documentCategory[i];\n\n                        if (item.id === doc_id) {\n                            window.documentCategory[i].version = res.data.version;\n                            break;\n                        }\n                    }\n                    $.each(window.documentCategory, function (i, item) {\n                        var $item = window.documentCategory[i];\n\n                        if (item.id === doc_id) {\n                            window.documentCategory[i].version = res.data.version;\n                        }\n                    });\n                    if (typeof callback === \"function\") {\n                        callback();\n                    }\n\n                } else if (res.errcode === 6005) {\n                    var confirmIndex = layer.confirm(editormdLocales[lang].overrideModified, {\n                        btn: [editormdLocales[lang].confirm, editormdLocales[lang].cancel] // 按钮\n                    }, function () {\n                        layer.close(confirmIndex);\n                        saveDocument(true, callback);\n                    });\n                } else {\n                    layer.msg(res.message);\n                }\n            },\n            error: function (XMLHttpRequest, textStatus, errorThrown) {\n                layer.msg(window.editormdLocales[window.lang].serverExcept + errorThrown);\n            },\n            complete: function () {\n                layer.close(index);\n                window.saveing = false;\n            }\n        });\n    }\n\n\n    /**\n     * 设置编辑器变更状态\n     * @param $is_change\n     */\n    function resetEditorChanged($is_change) {\n        if ($is_change && !window.isLoad) {\n            $(\"#markdown-save\").removeClass('disabled').addClass('change');\n        } else {\n            $(\"#markdown-save\").removeClass('change').addClass('disabled');\n        }\n        window.isLoad = false;\n    }\n\n    /**\n     * 添加文档\n     */\n    $(\"#addDocumentForm\").ajaxForm({\n        beforeSubmit: function () {\n            var doc_name = $.trim($(\"#documentName\").val());\n            if (doc_name === \"\") {\n                return showError(editormdLocales[lang].contentsNameEmpty, \"#add-error-message\")\n            }\n            $(\"#btnSaveDocument\").button(\"loading\");\n            return true;\n        },\n        success: function (res) {\n            if (res.errcode === 0) {\n                var data = {\n                    \"id\": res.data.doc_id,\n                    'parent': res.data.parent_id === 0 ? '#' : res.data.parent_id,\n                    \"text\": res.data.doc_name,\n                    \"identify\": res.data.identify,\n                    \"version\": res.data.version,\n                    state: { opened: res.data.is_open == 1 },\n                    a_attr: { is_open: res.data.is_open == 1 }\n                };\n\n                var node = window.treeCatalog.get_node(data.id);\n                if (node) {\n                    window.treeCatalog.rename_node({ \"id\": data.id }, data.text);\n                    $(\"#sidebar\").jstree(true).get_node(data.id).a_attr.is_open = data.state.opened;\n                } else {\n                    window.treeCatalog.create_node(data.parent, data);\n                    window.treeCatalog.deselect_all();\n                    window.treeCatalog.select_node(data);\n                }\n                pushDocumentCategory(data);\n                $(\"#markdown-save\").removeClass('change').addClass('disabled');\n                $(\"#addDocumentModal\").modal('hide');\n            } else {\n                showError(res.message, \"#add-error-message\");\n            }\n            $(\"#btnSaveDocument\").button(\"reset\");\n        }\n    });\n\n    /**\n     * 文档目录树\n     */\n    $(\"#sidebar\").jstree({\n        'plugins': [\"wholerow\", \"types\", 'dnd', 'contextmenu'],\n        \"types\": {\n            \"default\": {\n                \"icon\": false  // 删除默认图标\n            }\n        },\n        'core': {\n            'check_callback': true,\n            \"multiple\": false,\n            'animation': 0,\n            \"data\": window.documentCategory\n        },\n        \"contextmenu\": {\n            show_at_node: false,\n            select_node: false,\n            \"items\": {\n                \"添加文档\": {\n                    \"separator_before\": false,\n                    \"separator_after\": true,\n                    \"_disabled\": false,\n                    \"label\": window.editormdLocales[window.lang].addDoc,//\"添加文档\",\n                    \"icon\": \"fa fa-plus\",\n                    \"action\": function (data) {\n                        var inst = $.jstree.reference(data.reference),\n                            node = inst.get_node(data.reference);\n\n                        openCreateCatalogDialog(node);\n                    }\n                },\n                \"编辑\": {\n                    \"separator_before\": false,\n                    \"separator_after\": true,\n                    \"_disabled\": false,\n                    \"label\": window.editormdLocales[window.lang].edit,\n                    \"icon\": \"fa fa-edit\",\n                    \"action\": function (data) {\n                        var inst = $.jstree.reference(data.reference);\n                        var node = inst.get_node(data.reference);\n                        openEditCatalogDialog(node);\n                    }\n                },\n                \"删除\": {\n                    \"separator_before\": false,\n                    \"separator_after\": true,\n                    \"_disabled\": false,\n                    \"label\": window.editormdLocales[window.lang].delete,\n                    \"icon\": \"fa fa-trash-o\",\n                    \"action\": function (data) {\n                        var inst = $.jstree.reference(data.reference);\n                        var node = inst.get_node(data.reference);\n                        openDeleteDocumentDialog(node);\n                    }\n                }\n            }\n        }\n    }).on(\"ready.jstree\", function () {\n        window.treeCatalog = $(\"#sidebar\").jstree(true);\n\n        //如果没有选中节点则选中默认节点\n        // openLastSelectedNode();\n    }).on('select_node.jstree', function (node, selected) {\n\n        if ($(\"#markdown-save\").hasClass('change')) {\n            if (confirm(window.editormdLocales[window.lang].contentUnsaved)) {\n                saveDocument(false, function () {\n                    loadDocument(selected);\n                });\n                return true;\n            }\n        }\n        //如果是空目录则直接出发展开下一级功能\n        if (selected.node.a_attr && selected.node.a_attr.disabled) {\n            selected.instance.toggle_node(selected.node);\n            return false\n        }\n\n\n        loadDocument(selected);\n    }).on(\"move_node.jstree\", jstree_save).on(\"delete_node.jstree\", function ($node, $parent) {\n        openLastSelectedNode();\n    });\n    /**\n     * 打开文档模板\n     */\n    $(\"#documentTemplateModal\").on(\"click\", \".section>a[data-type]\", function () {\n        var $this = $(this).attr(\"data-type\");\n        if ($this === \"customs\") {\n            $(\"#displayCustomsTemplateModal\").modal(\"show\");\n            return;\n        }\n        var body = $(\"#template-\" + $this).html();\n        if (body) {\n            window.isLoad = true;\n            window.editor.clear();\n            window.editor.insertValue(body);\n            window.editor.setCursor({ line: 0, ch: 0 });\n            resetEditorChanged(true);\n        }\n        $(\"#documentTemplateModal\").modal('hide');\n    });\n    /**\n     * 展示自定义模板列表\n     */\n    $(\"#displayCustomsTemplateModal\").on(\"show.bs.modal\", function () {\n        window.sessionStorage.setItem(\"displayCustomsTemplateList\", $(\"#displayCustomsTemplateList\").html());\n\n        var index;\n        $.ajax({\n            beforeSend: function () {\n                index = layer.load(1, { shade: [0.1, '#fff'] });\n            },\n            url: window.template.listUrl,\n            data: { \"identify\": window.book.identify },\n            type: \"POST\",\n            dataType: \"html\",\n            success: function ($res) {\n                $(\"#displayCustomsTemplateList\").html($res);\n            },\n            error: function () {\n                layer.msg(window.editormdLocales[window.lang].loadFailed);\n            },\n            complete: function () {\n                layer.close(index);\n            }\n        });\n        $(\"#documentTemplateModal\").modal(\"hide\");\n    }).on(\"hidden.bs.modal\", function () {\n        var cache = window.sessionStorage.getItem(\"displayCustomsTemplateList\");\n        $(\"#displayCustomsTemplateList\").html(cache);\n    });\n    /**\n     * 添加模板\n     */\n    $(\"#saveTemplateForm\").ajaxForm({\n        beforeSubmit: function () {\n            var doc_name = $.trim($(\"#templateName\").val());\n            if (doc_name === \"\") {\n                return showError(window.editormdLocales[window.lang].tplNameEmpty, \"#saveTemplateForm .show-error-message\");\n            }\n            var content = $(\"#saveTemplateForm\").find(\"input[name='content']\").val();\n            if (content === \"\") {\n                return showError(window.editormdLocales[window.lang].tplContentEmpty, \"#saveTemplateForm .show-error-message\");\n            }\n\n            $(\"#btnSaveTemplate\").button(\"loading\");\n\n            return true;\n        },\n        success: function ($res) {\n            if ($res.errcode === 0) {\n                $(\"#saveTemplateModal\").modal(\"hide\");\n                layer.msg(window.editormdLocales[window.lang].saveSucc);\n            } else {\n                return showError($res.message, \"#saveTemplateForm .show-error-message\");\n            }\n        },\n        complete: function () {\n            $(\"#btnSaveTemplate\").button(\"reset\");\n        }\n    });\n    /**\n     * 当添加模板弹窗事件发生\n     */\n    $(\"#saveTemplateModal\").on(\"show.bs.modal\", function () {\n        window.sessionStorage.setItem(\"saveTemplateModal\", $(this).find(\".modal-body\").html());\n        var content = window.editor.getMarkdown();\n        $(\"#saveTemplateForm\").find(\"input[name='content']\").val(content);\n        $(\"#saveTemplateForm .show-error-message\").html(\"\");\n    }).on(\"hidden.bs.modal\", function () {\n        $(this).find(\".modal-body\").html(window.sessionStorage.getItem(\"saveTemplateModal\"));\n    });\n    /**\n     * 插入自定义模板内容\n     */\n    $(\"#displayCustomsTemplateList\").on(\"click\", \".btn-insert\", function () {\n        var templateId = $(this).attr(\"data-id\");\n\n        $.ajax({\n            url: window.template.getUrl,\n            data: { \"identify\": window.book.identify, \"template_id\": templateId },\n            dataType: \"json\",\n            type: \"get\",\n            success: function ($res) {\n                if ($res.errcode !== 0) {\n                    layer.msg($res.message);\n                    return;\n                }\n                window.isLoad = true;\n                window.editor.clear();\n                window.editor.insertValue($res.data.template_content);\n                window.editor.setCursor({ line: 0, ch: 0 });\n                resetEditorChanged(true);\n                $(\"#displayCustomsTemplateModal\").modal(\"hide\");\n            }, error: function () {\n                layer.msg(window.editormdLocales[window.lang].serverExcept);\n            }\n        });\n    }).on(\"click\", \".btn-delete\", function () {\n        var $then = $(this);\n        var templateId = $then.attr(\"data-id\");\n        $then.button(\"loading\");\n\n        $.ajax({\n            url: window.template.deleteUrl,\n            data: { \"identify\": window.book.identify, \"template_id\": templateId },\n            dataType: \"json\",\n            type: \"post\",\n            success: function ($res) {\n                if ($res.errcode !== 0) {\n                    layer.msg($res.message);\n                } else {\n                    $then.parents(\"tr\").empty().remove();\n                }\n            }, error: function () {\n                layer.msg(window.editormdLocales[window.lang].serverExcept);\n            },\n            complete: function () {\n                $then.button(\"reset\");\n            }\n        })\n    });\n\n    $(\"#btnInsertTable\").on(\"click\", function () {\n        var content = $(\"#jsonContent\").val();\n        if (content !== \"\") {\n            try {\n                var jsonObj = $.parseJSON(content);\n                var data = foreachJson(jsonObj, \"\");\n                var table = \"| \" + window.editormdLocales[window.lang].paramName\n                    + \"  | \" + window.editormdLocales[window.lang].paramType\n                    + \" | \" + window.editormdLocales[window.lang].example\n                    + \"  |  \" + window.editormdLocales[window.lang].remark\n                    + \" |\\n| ------------ | ------------ | ------------ | ------------ |\\n\";\n                $.each(data, function (i, item) {\n                    table += \"|\" + item.key + \"|\" + item.type + \"|\" + item.value + \"| |\\n\";\n                });\n                insertToMarkdown(table);\n            } catch (e) {\n                showError(\"Json 格式错误:\" + e.toString(), \"#json-error-message\");\n                return;\n            }\n        }\n        $(\"#convertJsonToTableModal\").modal(\"hide\");\n    });\n    $(\"#convertJsonToTableModal\").on(\"hidden.bs.modal\", function () {\n        $(\"#jsonContent\").val(\"\");\n    }).on(\"shown.bs.modal\", function () {\n        $(\"#jsonContent\").focus();\n    });\n});\n"
  },
  {
    "path": "static/js/quill.js",
    "content": "$(function () {\n    window.editormdLocales = {\n        'zh-CN': {\n            placeholder: '本编辑器支持 Markdown 编辑，左边编写，右边预览。',\n            contentUnsaved: '编辑内容未保存，需要保存吗？',\n            noDocNeedPublish: '没有需要发布的文档',\n            loadDocFailed: '文档加载失败',\n            fetchDocFailed: '获取当前文档信息失败',\n            cannotAddToEmptyNode: '空节点不能添加内容',\n            overrideModified: '文档已被其他人修改确定覆盖已存在的文档吗？',\n            confirm: '确定',\n            cancel: '取消',\n            contentsNameEmpty: '目录名称不能为空',\n            addDoc: '添加文档',\n            edit: '编辑',\n            delete: '删除',\n            loadFailed: '加载失败请重试',\n            tplNameEmpty: '模板名称不能为空',\n            tplContentEmpty: '模板内容不能为空',\n            saveSucc: '保存成功',\n            serverExcept: '服务器异常',\n            paramName: '参数名称',\n            paramType: '参数类型',\n            example: '示例值',\n            remark: '备注',\n        },\n        'en': {\n            placeholder: 'This editor supports Markdown editing, writing on the left and previewing on the right.',\n            contentUnsaved: 'The edited content is not saved, need to save it?',\n            noDocNeedPublish: 'No Document need to be publish',\n            loadDocFailed: 'Load Document failed',\n            fetchDocFailed: 'Fetch Document info failed',\n            cannotAddToEmptyNode: 'Cannot add content to empty node',\n            overrideModified: 'The document has been modified by someone else, are you sure to overwrite the document?',\n            confirm: 'Confirm',\n            cancel: 'Cancel',\n            contentsNameEmpty: 'Document Name cannot be empty',\n            addDoc: 'Add Document',\n            edit: 'Edit',\n            delete: 'Delete',\n            loadFailed: 'Failed to load, please try again',\n            tplNameEmpty: 'Template name cannot be empty',\n            tplContentEmpty: 'Template content cannot be empty',\n            saveSucc: 'Save success',\n            serverExcept: 'Server Exception',\n            paramName: 'Parameter',\n            paramType: 'Type',\n            example: 'Example',\n            remark: 'Remark',\n        }\n    };\n    window.addDocumentModalFormHtml = $(this).find(\"form\").html();\n    window.menu_save = $(\"#markdown-save\");\n    window.uploader = null;\n    window.editor = new Quill('#docEditor', {\n        theme: 'snow',\n        syntax: true,\n        modules : {\n            toolbar :\"#editormd-tools\"\n        }\n    });\n    window.editor.on(\"text-change\",function () {\n        resetEditorChanged(true);\n    });\n    var $editorEle =  $(\"#editormd-tools\");\n\n    $editorEle.find(\".ql-undo\").on(\"click\",function () {\n        window.editor.history.undo();\n    });\n    $editorEle.find(\".ql-redo\").on(\"click\",function () {\n        window.editor.history.redo();\n    });\n\n    uploadImage(\"docEditor\", function ($state, $res) {\n        if ($state === \"before\") {\n            return layer.load(1, {\n                shade: [0.1, '#fff'] // 0.1 透明度的白色背景\n            });\n        } else if ($state === \"success\") {\n            // if ($res.errcode === 0) {\n            if ($res[0].errcode === 0) {\n                var range = window.editor.getSelection();\n                // window.editor.insertEmbed(range.index, 'image', $res.url);\n                window.editor.insertEmbed(range.index, 'image', $res[0].url);\n            }\n        }\n    });\n\n    $(\"#btnRelease\").on(\"click\",function () {\n        if (Object.prototype.toString.call(window.documentCategory) === '[object Array]' && window.documentCategory.length > 0) {\n            if ($(\"#markdown-save\").hasClass('change')) {\n                var comfirm_result = confirm(\"编辑内容未保存，需要保存吗？\")\n                if (comfirm_result) {\n                    saveDocument(false, releaseBook);\n                    return;\n                }\n            }\n\n            releaseBook();\n        } else {\n            layer.msg(\"没有需要发布的文档\")\n        }\n    });\n\n    /**\n     * 实现自定义图片上传\n     */\n    window.editor.getModule('toolbar').addHandler('image',function () {\n        var input = document.createElement('input');\n        input.setAttribute('type', 'file');\n        input.click();\n\n        // Listen upload local image and save to server\n        input.onchange = function () {\n            var file = input.files[0];\n\n            // file type is only image.\n            if (/^image\\//.test(file.type)) {\n                var form = new FormData();\n                form.append('editormd-image-file', file, file.name);\n\n                var layerIndex = 0;\n\n                $.ajax({\n                    url: window.imageUploadURL,\n                    type: \"POST\",\n                    dataType: \"json\",\n                    data: form,\n                    processData: false,\n                    contentType: false,\n                    error: function() {\n                        layer.close(layerIndex);\n                        layer.msg(\"图片上传失败\");\n                    },\n                    success: function(data) {\n                        layer.close(layerIndex);\n                        if(data.errcode !== 0){\n                            layer.msg(data.message);\n                        }else{\n                            var range = window.editor.getSelection();\n                            window.editor.insertEmbed(range.index, 'image', data.url);\n                        }\n                    }\n                });\n            } else {\n                console.warn('You could only upload images.');\n            }\n        };\n    });\n    /**\n     * 实现保存\n     */\n    window.menu_save.on(\"click\",function () {if($(this).hasClass('change')){saveDocument();}});\n    /**\n     * 设置编辑器变更状态\n     * @param $is_change\n     */\n    function resetEditorChanged($is_change) {\n        if ($is_change && !window.isLoad) {\n            $(\"#markdown-save\").removeClass('disabled').addClass('change');\n        } else {\n            $(\"#markdown-save\").removeClass('change').addClass('disabled');\n        }\n        window.isLoad = false;\n    }\n\n    /***\n     * 加载指定的文档到编辑器中\n     * @param $node\n     */\n    function loadDocument($node) {\n        var index = layer.load(1, {\n            shade: [0.1,'#fff'] //0.1透明度的白色背景\n        });\n\n        $.get(window.editURL + $node.node.id ).done(function (res) {\n            layer.close(index);\n\n            if(res.errcode === 0){\n                window.isLoad = true;\n                window.editor.root.innerHTML = res.data.content;\n\n                // 将原始内容备份\n                window.source = res.data.content;\n                var node = { \"id\" : res.data.doc_id,'parent' : res.data.parent_id === 0 ? '#' : res.data.parent_id ,\"text\" : res.data.doc_name,\"identify\" : res.data.identify,\"version\" : res.data.version};\n                pushDocumentCategory(node);\n                window.selectNode = node;\n                window.isLoad = true;\n\n                pushVueLists(res.data.attach);\n                initHighlighting();\n                setLastSelectNode($node);\n            }else{\n                layer.msg(\"文档加载失败\");\n            }\n        }).fail(function () {\n            layer.close(index);\n            layer.msg(\"文档加载失败\");\n        });\n    }\n\n    /**\n     * 保存文档到服务器\n     * @param $is_cover 是否强制覆盖\n     * @param callback\n     */\n    function saveDocument($is_cover,callback) {\n        var index = null;\n        var node = window.selectNode;\n\n        var html = window.editor.root.innerHTML;\n\n        var content = \"\";\n        if($.trim(html) !== \"\"){\n            content = toMarkdown(html, { gfm: true });\n        }\n        var version = \"\";\n\n        if(!node){\n            layer.msg(\"获取当前文档信息失败\");\n            return;\n        }\n        var doc_id = parseInt(node.id);\n\n        for(var i in window.documentCategory){\n            var item = window.documentCategory[i];\n\n            if(item.id === doc_id){\n                version = item.version;\n                break;\n            }\n        }\n        $.ajax({\n            beforeSend  : function () {\n                index = layer.load(1, {shade: [0.1,'#fff'] });\n                window.saveing = true;\n            },\n            url :  window.editURL,\n            data : {\"identify\" : window.book.identify,\"doc_id\" : doc_id,\"markdown\" : content,\"html\" : html,\"cover\" : $is_cover ? \"yes\":\"no\",\"version\": version},\n            type :\"post\",\n            dataType :\"json\",\n            success : function (res) {\n                if(res.errcode === 0){\n                    for(var i in window.documentCategory){\n                        var item = window.documentCategory[i];\n\n                        if(item.id === doc_id){\n                            window.documentCategory[i].version = res.data.version;\n                            break;\n                        }\n                    }\n                    resetEditorChanged(false);\n                    // 更新内容备份\n                    window.source = res.data.content;\n                    if(typeof callback === \"function\"){\n                        callback();\n                    }\n                }else if(res.errcode === 6005){\n                    var confirmIndex = layer.confirm('文档已被其他人修改确定覆盖已存在的文档吗？', {\n                        btn: ['确定','取消'] //按钮\n                    }, function(){\n                        layer.close(confirmIndex);\n                        saveDocument(true,callback);\n                    });\n                }else{\n                    layer.msg(res.message);\n                }\n            },\n            error : function (XMLHttpRequest, textStatus, errorThrown) {\n                layer.msg(\"服务器错误：\" +  errorThrown);\n            },\n            complete :function () {\n                layer.close(index);\n                window.saveing = false;\n            }\n        });\n    }\n\n\n    /**\n     * 添加顶级文档\n     */\n    $(\"#addDocumentForm\").ajaxForm({\n        beforeSubmit : function () {\n            var doc_name = $.trim($(\"#documentName\").val());\n            if (doc_name === \"\"){\n                return showError(\"目录名称不能为空\",\"#add-error-message\")\n            }\n            window.addDocumentFormIndex = layer.load(1, { shade: [0.1,'#fff']  });\n            return true;\n        },\n        success : function (res) {\n            if(res.errcode === 0){\n\n                var data = { \"id\" : res.data.doc_id,'parent' : res.data.parent_id === 0 ? '#' : res.data.parent_id ,\"text\" : res.data.doc_name,\"identify\" : res.data.identify,\"version\" : res.data.version};\n\n                var node = window.treeCatalog.get_node(data.id);\n                if(node){\n                    window.treeCatalog.rename_node({\"id\":data.id},data.text);\n\n                }else {\n                    window.treeCatalog.create_node(data.parent, data);\n                    window.treeCatalog.deselect_all();\n                    window.treeCatalog.select_node(data);\n                }\n                pushDocumentCategory(data);\n                $(\"#markdown-save\").removeClass('change').addClass('disabled');\n                $(\"#addDocumentModal\").modal('hide');\n            }else{\n                showError(res.message,\"#add-error-message\")\n            }\n            layer.close(window.addDocumentFormIndex);\n        }\n    });\n\n    /**\n     * 文档目录树\n     */\n    $(\"#sidebar\").jstree({\n        'plugins': [\"wholerow\", \"types\", 'dnd', 'contextmenu'],\n        \"types\": {\n            \"default\": {\n                \"icon\": false  // 删除默认图标\n            }\n        },\n        'core': {\n            'check_callback': true,\n            \"multiple\": false,\n            'animation': 0,\n            \"data\": window.documentCategory\n        },\n        \"contextmenu\": {\n            show_at_node: false,\n            select_node: false,\n            \"items\": {\n                \"添加文档\": {\n                    \"separator_before\": false,\n                    \"separator_after\": true,\n                    \"_disabled\": false,\n                    \"label\": window.editormdLocales[window.lang].addDoc,//\"添加文档\",\n                    \"icon\": \"fa fa-plus\",\n                    \"action\": function (data) {\n\n                        var inst = $.jstree.reference(data.reference),\n                            node = inst.get_node(data.reference);\n\n                        openCreateCatalogDialog(node);\n                    }\n                },\n                \"编辑\": {\n                    \"separator_before\": false,\n                    \"separator_after\": true,\n                    \"_disabled\": false,\n                    \"label\": window.editormdLocales[window.lang].edit,\n                    \"icon\": \"fa fa-edit\",\n                    \"action\": function (data) {\n                        var inst = $.jstree.reference(data.reference);\n                        var node = inst.get_node(data.reference);\n                        openEditCatalogDialog(node);\n                    }\n                },\n                \"删除\": {\n                    \"separator_before\": false,\n                    \"separator_after\": true,\n                    \"_disabled\": false,\n                    \"label\": window.editormdLocales[window.lang].delete,\n                    \"icon\": \"fa fa-trash-o\",\n                    \"action\": function (data) {\n                        var inst = $.jstree.reference(data.reference);\n                        var node = inst.get_node(data.reference);\n                        openDeleteDocumentDialog(node);\n                    }\n                }\n            }\n        }\n    }).on('ready.jstree', function () {\n        window.treeCatalog = $(this).jstree();\n        //如果没有选中节点则选中默认节点\n        openLastSelectedNode();\n\n    }).on('select_node.jstree', function (node, selected, event) {\n        if(window.menu_save.hasClass('change')) {\n            if (confirm(window.editormdLocales[window.lang].contentUnsaved)) {\n                saveDocument(false,function () {\n                    loadDocument(selected);\n                });\n                return true;\n            }\n        }\n        loadDocument(selected);\n\n    }).on(\"move_node.jstree\", jstree_save)\n      .on(\"delete_node.jstree\",function (node,parent) {\n          window.isLoad = true;\n          window.editor.root.innerHTML ='';\n      });\n\n\n    window.saveDocument = saveDocument;\n\n    window.releaseBook = function () {\n        if(Object.prototype.toString.call(window.documentCategory) === '[object Array]' && window.documentCategory.length > 0){\n            if(window.menu_save.hasClass('selected')) {\n                if(confirm(\"编辑内容未保存，需要保存吗？\")) {\n                    saveDocument();\n                }\n            }\n            $.ajax({\n                url : window.releaseURL,\n                data :{\"identify\" : window.book.identify },\n                type : \"post\",\n                dataType : \"json\",\n                success : function (res) {\n                    if(res.errcode === 0){\n                        layer.msg(\"发布任务已推送到任务队列，稍后将在后台执行。\");\n                    }else{\n                        layer.msg(res.message);\n                    }\n                }\n            });\n        }else{\n            layer.msg(\"没有需要发布的文档\")\n        }\n    };\n});"
  },
  {
    "path": "static/js/sort.js",
    "content": "let draggedItem = null;\nlet draggedItemIndex = null;\n\ndocument.querySelectorAll('.list-item').forEach(item => {\n    item.addEventListener('mousedown', function() {\n        draggedItem = item;\n        // 获取当前item在list-item中的索引\n        const parentNode = item.parentNode;\n        draggedItemIndex = Array.from(parentNode.children).indexOf(draggedItem);\n        item.setAttribute('draggable', true);\n    });\n\n    item.addEventListener('dragstart', function() {\n    });\n\n    item.addEventListener('dragover', function(e) {\n        e.preventDefault();\n        if (draggedItem !== item) {\n            item.style.border = '1px dashed #d4d4d5';\n        }\n    });\n\n    item.addEventListener('dragleave', function() {\n        item.style.border = '';\n    });\n\n    item.addEventListener('drop', function() {\n        item.style.border = '';\n        if (draggedItem !== null) {\n            const parentNode = item.parentNode;\n            const draggedIndex = Array.from(parentNode.children).indexOf(draggedItem);\n            const targetIndex = Array.from(parentNode.children).indexOf(item);\n\n            if (draggedIndex < targetIndex) {\n                parentNode.insertBefore(draggedItem, item.nextSibling);\n            } else {\n                parentNode.insertBefore(draggedItem, item);\n            }\n            // 获取当前最新的data-id属性列表 去除null\n            const newSortList = Array.from(parentNode.children).map(item => item.getAttribute('data-id')).filter(item => item !== null);\n            const newSortListStr = newSortList.join(',');\n            // 更新排序\n            $.ajax({\n                url: window.updateBookOrder,\n                type: 'POST',\n                data: {\n                    ids: newSortListStr,\n                },\n                success: function (res) {\n                    if (res.errcode === 0) {\n                        layer.msg(\"排序成功\", {icon: 1});\n                        draggedItem = null;\n                    } else {\n                        layer.msg(res.message, {icon: 2});\n                        const parentNode = item.parentNode;\n                        // 在parentNode中找到当前拖拽的item\n                        const draggedIndex = Array.from(parentNode.children).indexOf(draggedItem);\n                        console.log('draggedIndex:', draggedIndex);\n                        // 移除当前拖拽的item\n                        parentNode.removeChild(draggedItem);\n                        // 将draggedItem放到原来的位置\n                        parentNode.insertBefore(draggedItem, parentNode.children[draggedItemIndex]);\n                        draggedItem = null;\n                    }\n                },\n                error: function (err) {\n                    console.log('error:', err)\n                    draggedItem = null;\n                }\n            })\n        }\n    });\n});"
  },
  {
    "path": "static/js/splitbar.js",
    "content": "$(function () {\n    var splitBar = {\n        // 设置当前屏幕为 840px 时将分割条隐藏\n        maxWidth: 840,\n\n        // 父元素选择器\n        parentSelector: '.manual-body',\n\n        /**\n         * 初始化分割条\n         */\n        init: function () {\n            var self = this;\n            $(self.parentSelector)\n            .append(\n                $('\\\n                    <div id=\"manual-vsplitbar\" unselectable=\"on\"\\\n                    style=\"\\\n                        z-index:301;\\\n                        position: absolute;\\\n                        user-select: none;\\\n                        cursor: col-resize;\\\n                        left: 275px;\\\n                        height: 100%;\\\n                        display: block;\\\n                        width: 3px;\">\\\n                        <a href=\"javascript:void(0)\" accesskey=\"\" tabindex=\"0\" title=\"vsplitbar\"></a>\\\n                    </div>\\\n                ')\n                .hover(\n                    function (event) {\n                        event.target.style.background = '#8f949ad8';\n                    },\n                    function (event) {\n                        event.target.style.background = '';\n                    }\n                )\n            );\n\n            self.loadingHtml();\n\n            // 设置媒体查询\n            mediaMatcher.set();\n        },\n\n        /**\n         * 加载页面时设置分割条是否显示\n         */ \n        loadingHtml: function () {\n            var self = this;\n            var htmlWidth = document.body.clientWidth;\n            if (htmlWidth <= self.maxWidth) $('#manual-vsplitbar').css('display', 'none');\n        },\n\n        /**\n         * 在打开关闭菜单事初始化左右窗口和分割条\n         */\n        reset: function () {\n            if (isFullScreen) {\n                // 关闭菜单时，初始化左右窗口\n                $('#manual-vsplitbar').css('display', 'none');\n                splitBar.inMaxWidthReset();\n                $('.manual-left').css('width', '0px');\n            } else {\n                 // 打开菜单时，初始化左右窗口\n                $('#manual-vsplitbar').css('display', 'block');\n                splitBar.outMaxWidthReset();\n            }\n        },\n\n        /**\n         * 屏幕小于等于 840px，重置左右窗口\n         */\n        inMaxWidthReset: function () {\n            $('#manual-vsplitbar').css('display', 'none');\n            $('.m-manual.manual-reader .manual-right').css('left', '0');\n            $('.manual-left').css('width', '280px');\n        },\n\n        /**\n         * 屏幕大于 840px，重置左右窗口\n         */\n        outMaxWidthReset: function () {\n            $('.manual-right').css('left', '279px');\n            $('.manual-left').css('width', '279px');\n            $('#manual-vsplitbar').css('left', '275px').css('display', 'block');\n        }\n    }\n\n    /**\n     * 设置媒体查询\n     * 分割条隐藏\n     */\n    var mediaMatcher = {\n        mql: window.matchMedia('(max-width:' + splitBar.maxWidth + 'px)'),\n\n        /**\n         * 添加媒体查询监听事件\n         */ \n        set: function () {\n            var self = this;\n            self.mql.addListener(self.mqCallback);\n        },\n\n        /**\n         * 删除媒体查询监听事件\n         */\n        remove: function () {\n            var self = this;\n            self.mql.removeListener(self.mqCallback);\n        },\n\n        /**\n         * 媒体查询回调函数\n         */\n        mqCallback: function (event) {\n            if (event.target.matches) { // 宽度小于等于 840 像素\n                $(\".m-manual\").removeClass('manual-fullscreen-active');\n                splitBar.inMaxWidthReset();\n            } else {                    // 宽度大于 840 像素\n                splitBar.outMaxWidthReset();\n            }\n        }\n    }\n\n    // 初始化分割条\n    splitBar.init();\n    \n    /**\n     * 控制菜单宽度\n     * 最小为 140px\n     */\n    $('#manual-vsplitbar').on('mousedown', function (e) {\n        var bodyEle = $('.manual-body')[0];\n\n        var leftPane = $('.manual-left')[0];\n        var splitBar = $('#manual-vsplitbar')[0];\n        var rightPane = $('.manual-right')[0];\n\n        var disX = (e || event).clientX;\n\n        splitBar.left = splitBar.offsetLeft;\n\n        var docMouseMove = document.onmousemove;\n        var docMouseUp = document.onmouseup;\n\n        document.onmousemove = function (e) {\n            var curPos = splitBar.left + ((e || event).clientX - disX);\n            var maxPos = bodyEle.clientWidth - splitBar.offsetWidth;\n\n            curPos > maxPos && (curPos = maxPos);\n            curPos < 140 && (curPos = 140);\n\n            leftPane.style.width = curPos + \"px\";\n            splitBar.style.left = curPos - 3 + \"px\";\n            rightPane.style.left = curPos + 3 + \"px\";\n\n            return false;\n        }\n\n        document.onmouseup = function () {\n            document.onmousemove = docMouseMove;\n            document.onmouseup = docMouseUp;\n            splitBar.releaseCapture && splitBar.releaseCapture();\n        };\n\n        splitBar.setCapture && splitBar.setCapture();\n        return false;\n    });\n\n    /**\n     * 关闭侧边栏时，同步分割条；\n     */\n    $(\".manual-fullscreen-switch\").on(\"click\", splitBar.reset);\n});\n"
  },
  {
    "path": "static/js/wangEditor-plugins/attach-menu.js",
    "content": "(function () {\n\n    // 获取 wangEditor 构造函数和 jquery\n    var E = window.wangEditor;\n    var $ = window.jQuery;\n\n    let AttachMenu = (function (_BtnMenu) {\n      c2b_inherits(AttachMenu, _BtnMenu);\n\n      var _super = c2b_createSuper(AttachMenu);\n\n      function AttachMenu(editor) {\n        c2b_classCallCheck(this, AttachMenu);\n\n        const $elem = E.$(`<div class=\"w-e-menu\" data-title=\"附件\">\n                    <i class=\"fa fa-paperclip\" aria-hidden=\"true\"></i>\n                </div>`);\n        return _super.call(this, $elem, editor);\n      }\n\n      c2b_createClass(AttachMenu, [\n        {\n          key: \"clickHandler\",\n          value: function clickHandler() {\n            $(\"#uploadAttachModal\").modal(\"show\");\n          }\n        },\n        {\n          key: \"tryChangeActive\",\n          value: function tryChangeActive() {\n            // this.active();\n          }\n        }\n      ]);\n\n      return AttachMenu;\n    })(E.BtnMenu);\n\n\n    var menuKey = 'attach';\n    E.registerMenu(menuKey, AttachMenu);\n})();"
  },
  {
    "path": "static/js/wangEditor-plugins/history-menu.js",
    "content": "(function () {\n\n    // 获取 wangEditor 构造函数和 jquery\n    var E = window.wangEditor;\n    var $ = window.jQuery;\n\n    let HistoryMenu = (function (_BtnMenu) {\n      c2b_inherits(HistoryMenu, _BtnMenu);\n\n      var _super = c2b_createSuper(HistoryMenu);\n\n      function HistoryMenu(editor) {\n        c2b_classCallCheck(this, HistoryMenu);\n\n        const $elem = E.$(`<div class=\"w-e-menu\" data-title=\"history\">\n                    <i class=\"fa fa-history\" aria-hidden=\"true\"></i>\n                </div>`);\n        return _super.call(this, $elem, editor);\n      }\n\n      c2b_createClass(HistoryMenu, [\n        {\n          key: \"clickHandler\",\n          value: function clickHandler() {\n            window.documentHistory();\n          }\n        },\n        {\n          key: \"tryChangeActive\",\n          value: function tryChangeActive() {\n            // this.active();\n          }\n        }\n      ]);\n\n      return HistoryMenu;\n    })(E.BtnMenu);\n\n\n    var menuKey = '历史';\n    E.registerMenu(menuKey, HistoryMenu);\n})();"
  },
  {
    "path": "static/js/wangEditor-plugins/release-menu.js",
    "content": "(function () {\n\n    // 获取 wangEditor 构造函数和 jquery\n    var E = window.wangEditor;\n    var $ = window.jQuery;\n\n    let ReleaseMenu = (function (_BtnMenu) {\n      c2b_inherits(ReleaseMenu, _BtnMenu);\n\n      var _super = c2b_createSuper(ReleaseMenu);\n\n      function ReleaseMenu(editor) {\n        c2b_classCallCheck(this, ReleaseMenu);\n\n        const $elem = E.$(`<div class=\"w-e-menu\" data-title=\"发布\">\n                    <i class=\"fa fa-cloud-upload\" aria-hidden=\"true\"></i>\n                </div>`);\n        return _super.call(this, $elem, editor);\n      }\n\n      c2b_createClass(ReleaseMenu, [\n        {\n          key: \"clickHandler\",\n          value: function clickHandler() {\n            window.releaseBook();\n          }\n        },\n        {\n          key: \"tryChangeActive\",\n          value: function tryChangeActive() {\n            // this.active();\n          }\n        }\n      ]);\n\n      return ReleaseMenu;\n    })(E.BtnMenu);\n\n\n    var menuKey = 'release';\n    E.registerMenu(menuKey, ReleaseMenu);\n})();"
  },
  {
    "path": "static/js/wangEditor-plugins/save-menu.js",
    "content": "(function () {\n\n    // 获取 wangEditor 构造函数和 jquery\n    var E = window.wangEditor;\n    var $ = window.jQuery;\n\n    let SaveMenu = (function (_BtnMenu) {\n      c2b_inherits(SaveMenu, _BtnMenu);\n\n      var _super = c2b_createSuper(SaveMenu);\n\n      function SaveMenu(editor) {\n        c2b_classCallCheck(this, SaveMenu);\n\n        const $elem = E.$(`<div class=\"w-e-menu\" data-title=\"保存\">\n                    <i class=\"fa fa-floppy-o\" aria-hidden=\"true\"></i>\n                </div>`);\n        return _super.call(this, $elem, editor);\n      }\n\n      c2b_createClass(SaveMenu, [\n        {\n          key: \"clickHandler\",\n          value: function clickHandler() {\n            window.saveDocument();\n          }\n        },\n        {\n          key: \"tryChangeActive\",\n          value: function tryChangeActive() {\n            // this.active();\n          }\n        }\n      ]);\n\n      return SaveMenu;\n    })(E.BtnMenu);\n\n\n    var menuKey = 'save';\n    E.registerMenu(menuKey, SaveMenu);\n})();"
  },
  {
    "path": "static/js/word-to-html.js",
    "content": "\nclass WordToHtmlConverter {\n\n    handleFileSelect(callback, accept = '.doc,.docx') {\n        let input = document.createElement('input');\n        input.type = 'file';\n        input.accept = accept;\n        input.onchange = (e)=>{\n            let file = e.target.files[0];\n            if (!file) {\n                return;\n            }\n            let reader = new FileReader();\n            reader.onload = (e)=>{\n                let arrayBuffer = e.target.result;\n                this.convertToHtml(arrayBuffer, (html)=>{\n                    callback(html);\n                });\n            };\n            reader.readAsArrayBuffer(file);\n        };\n        input.click();\n    }\n\n\n\n    convertToHtml(arrayBuffer, callback) {\n        try {\n            mammoth.convertToHtml({arrayBuffer: arrayBuffer}).then(callback, function(error) {\n                layer.msg('Error: ' + error);\n                return\n            });\n        } catch (error) {\n            layer.msg('Error: ' + error);\n            return\n        }\n    }\n\n    replaceHtmlBase64(html) {\n        let regex = /<img\\s+src=\"data:image\\/[^;]*;base64,([^\"]*)\"/g;\n        let matches = [];\n        let match;\n\n        while ((match = regex.exec(html)) !== null) {\n            matches.push(match[1]);\n        }\n\n        if (matches.length === 0) {\n            return new Promise((resolve, reject) => {\n                resolve(html);\n            });\n        }\n\n        // 将base64转为blob\n        let promises = matches.map((base64)=>{\n            return new Promise((resolve, reject)=>{\n                let blob = this.base64ToBlob(base64);\n                let reader = new FileReader();\n                reader.onload = (e)=>{\n                    resolve({base64, blob, url: e.target.result});\n                };\n                reader.readAsDataURL(blob);\n            });\n        });\n\n        return Promise.all(promises).then((results)=>{\n            let htmlCopy = html;\n            return Promise.all(results.map((result) => {\n                return this.uploadFile(result.blob).then((data) => {\n                    htmlCopy = htmlCopy.replace(`data:image/png;base64,${result.base64}`, data.url);\n                });\n            })).then(() => {\n                return htmlCopy;\n            });\n        });\n    }\n\n    uploadFile(blob) {\n        let file = new File([blob], 'image.jpg', { type: 'image/jpeg' });\n        let formData = new FormData();\n        formData.append('editormd-file-file', file);\n        return fetch(window.fileUploadURL, {\n            method: 'POST',\n            body: formData\n        })\n            .then(response => response.json())\n            .then(data => {return data})\n            .catch(error => {return error});\n    }\n\n\n    base64ToBlob(base64, type) {\n        let binary = atob(base64);\n        let array = [];\n        for (let i = 0; i < binary.length; i++) {\n            array.push(binary.charCodeAt(i));\n        }\n        return new Blob([new Uint8Array(array)], {type: type});\n    }\n}"
  },
  {
    "path": "static/js/x-frame-bypass-1.0.2.js",
    "content": "customElements.define('x-frame-bypass', class extends HTMLIFrameElement {\n\tstatic get observedAttributes() {\n\t\treturn ['src']\n\t}\n\tconstructor () {\n\t\tsuper()\n\t}\n\tattributeChangedCallback () {\n\t\tthis.load(this.src)\n\t}\n\tconnectedCallback () {\n\t\tthis.sandbox = '' + this.sandbox || 'allow-forms allow-modals allow-pointer-lock allow-popups allow-popups-to-escape-sandbox allow-presentation allow-same-origin allow-scripts allow-top-navigation-by-user-activation' // all except allow-top-navigation\n\t}\n\tload (url, options) {\n\t\tif (!url || !url.startsWith('http'))\n\t\t\tthrow new Error(`X-Frame-Bypass src ${url} does not start with http(s)://`)\n\t\tconsole.log('X-Frame-Bypass loading:', url)\n\t\tthis.srcdoc = `<html>\n<head>\n\t<style>\n\t.loader {\n\t\tposition: absolute;\n\t\ttop: calc(50% - 25px);\n\t\tleft: calc(50% - 25px);\n\t\twidth: 50px;\n\t\theight: 50px;\n\t\tbackground-color: #333;\n\t\tborder-radius: 50%;  \n\t\tanimation: loader 1s infinite ease-in-out;\n\t}\n\t@keyframes loader {\n\t\t0% {\n\t\ttransform: scale(0);\n\t\t}\n\t\t100% {\n\t\ttransform: scale(1);\n\t\topacity: 0;\n\t\t}\n\t}\n\t</style>\n</head>\n<body>\n\t<div class=\"loader\"></div>\n</body>\n</html>`\n\t\tthis.fetchProxy(url, options, 0).then(res => res.text()).then(data => {\n\t\t\tif (data)\n\t\t\t\tthis.srcdoc = data.replace(/<head([^>]*)>/i, `<head$1>\n\t<base href=\"${url}\">\n\t<script>\n\t// X-Frame-Bypass navigation event handlers\n\tdocument.addEventListener('click', e => {\n\t\tif (frameElement && document.activeElement && document.activeElement.href) {\n\t\t\te.preventDefault()\n\t\t\tframeElement.load(document.activeElement.href)\n\t\t}\n\t})\n\tdocument.addEventListener('submit', e => {\n\t\tif (frameElement && document.activeElement && document.activeElement.form && document.activeElement.form.action) {\n\t\t\te.preventDefault()\n\t\t\tif (document.activeElement.form.method === 'post')\n\t\t\t\tframeElement.load(document.activeElement.form.action, {method: 'post', body: new FormData(document.activeElement.form)})\n\t\t\telse\n\t\t\t\tframeElement.load(document.activeElement.form.action + '?' + new URLSearchParams(new FormData(document.activeElement.form)))\n\t\t}\n\t})\n\t</script>`)\n\t\t}).catch(e => console.error('Cannot load X-Frame-Bypass:', e))\n\t}\n\tfetchProxy (url, options, i) {\n\t\tconst proxies = (options || {}).proxies || [\n\t\t    window.BASE_URL + 'cors-anywhere?url=',\n\t\t\t'https://cors-anywhere.herokuapp.com/',\n\t\t\t'https://yacdn.org/proxy/',\n\t\t\t'https://api.codetabs.com/v1/proxy/?quest='\n\t\t]\n\t\treturn fetch(proxies[i] + url, options).then(res => {\n\t\t\tif (!res.ok)\n\t\t\t\tthrow new Error(`${res.status} ${res.statusText}`);\n\t\t\treturn res\n\t\t}).catch(error => {\n\t\t\tif (i === proxies.length - 1)\n\t\t\t\tthrow error\n\t\t\treturn this.fetchProxy(url, options, i + 1)\n\t\t})\n\t}\n}, {extends: 'iframe'})"
  },
  {
    "path": "static/jstree/3.3.4/jstree.js",
    "content": "/*globals jQuery, define, module, exports, require, window, document, postMessage */\n(function (factory) {\n\t\"use strict\";\n\tif (typeof define === 'function' && define.amd) {\n\t\tdefine(['jquery'], factory);\n\t}\n\telse if(typeof module !== 'undefined' && module.exports) {\n\t\tmodule.exports = factory(require('jquery'));\n\t}\n\telse {\n\t\tfactory(jQuery);\n\t}\n}(function ($, undefined) {\n\t\"use strict\";\n/*!\n * jsTree 3.3.4\n * http://jstree.com/\n *\n * Copyright (c) 2014 Ivan Bozhanov (http://vakata.com)\n *\n * Licensed same as jquery - under the terms of the MIT License\n *   http://www.opensource.org/licenses/mit-license.php\n */\n/*!\n * if using jslint please allow for the jQuery global and use following options:\n * jslint: loopfunc: true, browser: true, ass: true, bitwise: true, continue: true, nomen: true, plusplus: true, regexp: true, unparam: true, todo: true, white: true\n */\n/*jshint -W083 */\n\n\t// prevent another load? maybe there is a better way?\n\tif($.jstree) {\n\t\treturn;\n\t}\n\n\t/**\n\t * ### jsTree core functionality\n\t */\n\n\t// internal variables\n\tvar instance_counter = 0,\n\t\tccp_node = false,\n\t\tccp_mode = false,\n\t\tccp_inst = false,\n\t\tthemes_loaded = [],\n\t\tsrc = $('script:last').attr('src'),\n\t\tdocument = window.document; // local variable is always faster to access then a global\n\n\t/**\n\t * holds all jstree related functions and variables, including the actual class and methods to create, access and manipulate instances.\n\t * @name $.jstree\n\t */\n\t$.jstree = {\n\t\t/**\n\t\t * specifies the jstree version in use\n\t\t * @name $.jstree.version\n\t\t */\n\t\tversion : '3.3.4',\n\t\t/**\n\t\t * holds all the default options used when creating new instances\n\t\t * @name $.jstree.defaults\n\t\t */\n\t\tdefaults : {\n\t\t\t/**\n\t\t\t * configure which plugins will be active on an instance. Should be an array of strings, where each element is a plugin name. The default is `[]`\n\t\t\t * @name $.jstree.defaults.plugins\n\t\t\t */\n\t\t\tplugins : []\n\t\t},\n\t\t/**\n\t\t * stores all loaded jstree plugins (used internally)\n\t\t * @name $.jstree.plugins\n\t\t */\n\t\tplugins : {},\n\t\tpath : src && src.indexOf('/') !== -1 ? src.replace(/\\/[^\\/]+$/,'') : '',\n\t\tidregex : /[\\\\:&!^|()\\[\\]<>@*'+~#\";.,=\\- \\/${}%?`]/g,\n\t\troot : '#'\n\t};\n\t\n\t/**\n\t * creates a jstree instance\n\t * @name $.jstree.create(el [, options])\n\t * @param {DOMElement|jQuery|String} el the element to create the instance on, can be jQuery extended or a selector\n\t * @param {Object} options options for this instance (extends `$.jstree.defaults`)\n\t * @return {jsTree} the new instance\n\t */\n\t$.jstree.create = function (el, options) {\n\t\tvar tmp = new $.jstree.core(++instance_counter),\n\t\t\topt = options;\n\t\toptions = $.extend(true, {}, $.jstree.defaults, options);\n\t\tif(opt && opt.plugins) {\n\t\t\toptions.plugins = opt.plugins;\n\t\t}\n\t\t$.each(options.plugins, function (i, k) {\n\t\t\tif(i !== 'core') {\n\t\t\t\ttmp = tmp.plugin(k, options[k]);\n\t\t\t}\n\t\t});\n\t\t$(el).data('jstree', tmp);\n\t\ttmp.init(el, options);\n\t\treturn tmp;\n\t};\n\t/**\n\t * remove all traces of jstree from the DOM and destroy all instances\n\t * @name $.jstree.destroy()\n\t */\n\t$.jstree.destroy = function () {\n\t\t$('.jstree:jstree').jstree('destroy');\n\t\t$(document).off('.jstree');\n\t};\n\t/**\n\t * the jstree class constructor, used only internally\n\t * @private\n\t * @name $.jstree.core(id)\n\t * @param {Number} id this instance's index\n\t */\n\t$.jstree.core = function (id) {\n\t\tthis._id = id;\n\t\tthis._cnt = 0;\n\t\tthis._wrk = null;\n\t\tthis._data = {\n\t\t\tcore : {\n\t\t\t\tthemes : {\n\t\t\t\t\tname : false,\n\t\t\t\t\tdots : false,\n\t\t\t\t\ticons : false,\n\t\t\t\t\tellipsis : false\n\t\t\t\t},\n\t\t\t\tselected : [],\n\t\t\t\tlast_error : {},\n\t\t\t\tworking : false,\n\t\t\t\tworker_queue : [],\n\t\t\t\tfocused : null\n\t\t\t}\n\t\t};\n\t};\n\t/**\n\t * get a reference to an existing instance\n\t *\n\t * __Examples__\n\t *\n\t *\t// provided a container with an ID of \"tree\", and a nested node with an ID of \"branch\"\n\t *\t// all of there will return the same instance\n\t *\t$.jstree.reference('tree');\n\t *\t$.jstree.reference('#tree');\n\t *\t$.jstree.reference($('#tree'));\n\t *\t$.jstree.reference(document.getElementByID('tree'));\n\t *\t$.jstree.reference('branch');\n\t *\t$.jstree.reference('#branch');\n\t *\t$.jstree.reference($('#branch'));\n\t *\t$.jstree.reference(document.getElementByID('branch'));\n\t *\n\t * @name $.jstree.reference(needle)\n\t * @param {DOMElement|jQuery|String} needle\n\t * @return {jsTree|null} the instance or `null` if not found\n\t */\n\t$.jstree.reference = function (needle) {\n\t\tvar tmp = null,\n\t\t\tobj = null;\n\t\tif(needle && needle.id && (!needle.tagName || !needle.nodeType)) { needle = needle.id; }\n\n\t\tif(!obj || !obj.length) {\n\t\t\ttry { obj = $(needle); } catch (ignore) { }\n\t\t}\n\t\tif(!obj || !obj.length) {\n\t\t\ttry { obj = $('#' + needle.replace($.jstree.idregex,'\\\\$&')); } catch (ignore) { }\n\t\t}\n\t\tif(obj && obj.length && (obj = obj.closest('.jstree')).length && (obj = obj.data('jstree'))) {\n\t\t\ttmp = obj;\n\t\t}\n\t\telse {\n\t\t\t$('.jstree').each(function () {\n\t\t\t\tvar inst = $(this).data('jstree');\n\t\t\t\tif(inst && inst._model.data[needle]) {\n\t\t\t\t\ttmp = inst;\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t\treturn tmp;\n\t};\n\t/**\n\t * Create an instance, get an instance or invoke a command on a instance.\n\t *\n\t * If there is no instance associated with the current node a new one is created and `arg` is used to extend `$.jstree.defaults` for this new instance. There would be no return value (chaining is not broken).\n\t *\n\t * If there is an existing instance and `arg` is a string the command specified by `arg` is executed on the instance, with any additional arguments passed to the function. If the function returns a value it will be returned (chaining could break depending on function).\n\t *\n\t * If there is an existing instance and `arg` is not a string the instance itself is returned (similar to `$.jstree.reference`).\n\t *\n\t * In any other case - nothing is returned and chaining is not broken.\n\t *\n\t * __Examples__\n\t *\n\t *\t$('#tree1').jstree(); // creates an instance\n\t *\t$('#tree2').jstree({ plugins : [] }); // create an instance with some options\n\t *\t$('#tree1').jstree('open_node', '#branch_1'); // call a method on an existing instance, passing additional arguments\n\t *\t$('#tree2').jstree(); // get an existing instance (or create an instance)\n\t *\t$('#tree2').jstree(true); // get an existing instance (will not create new instance)\n\t *\t$('#branch_1').jstree().select_node('#branch_1'); // get an instance (using a nested element and call a method)\n\t *\n\t * @name $().jstree([arg])\n\t * @param {String|Object} arg\n\t * @return {Mixed}\n\t */\n\t$.fn.jstree = function (arg) {\n\t\t// check for string argument\n\t\tvar is_method\t= (typeof arg === 'string'),\n\t\t\targs\t\t= Array.prototype.slice.call(arguments, 1),\n\t\t\tresult\t\t= null;\n\t\tif(arg === true && !this.length) { return false; }\n\t\tthis.each(function () {\n\t\t\t// get the instance (if there is one) and method (if it exists)\n\t\t\tvar instance = $.jstree.reference(this),\n\t\t\t\tmethod = is_method && instance ? instance[arg] : null;\n\t\t\t// if calling a method, and method is available - execute on the instance\n\t\t\tresult = is_method && method ?\n\t\t\t\tmethod.apply(instance, args) :\n\t\t\t\tnull;\n\t\t\t// if there is no instance and no method is being called - create one\n\t\t\tif(!instance && !is_method && (arg === undefined || $.isPlainObject(arg))) {\n\t\t\t\t$.jstree.create(this, arg);\n\t\t\t}\n\t\t\t// if there is an instance and no method is called - return the instance\n\t\t\tif( (instance && !is_method) || arg === true ) {\n\t\t\t\tresult = instance || false;\n\t\t\t}\n\t\t\t// if there was a method call which returned a result - break and return the value\n\t\t\tif(result !== null && result !== undefined) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t});\n\t\t// if there was a method call with a valid return value - return that, otherwise continue the chain\n\t\treturn result !== null && result !== undefined ?\n\t\t\tresult : this;\n\t};\n\t/**\n\t * used to find elements containing an instance\n\t *\n\t * __Examples__\n\t *\n\t *\t$('div:jstree').each(function () {\n\t *\t\t$(this).jstree('destroy');\n\t *\t});\n\t *\n\t * @name $(':jstree')\n\t * @return {jQuery}\n\t */\n\t$.expr.pseudos.jstree = $.expr.createPseudo(function(search) {\n\t\treturn function(a) {\n\t\t\treturn $(a).hasClass('jstree') &&\n\t\t\t\t$(a).data('jstree') !== undefined;\n\t\t};\n\t});\n\n\t/**\n\t * stores all defaults for the core\n\t * @name $.jstree.defaults.core\n\t */\n\t$.jstree.defaults.core = {\n\t\t/**\n\t\t * data configuration\n\t\t *\n\t\t * If left as `false` the HTML inside the jstree container element is used to populate the tree (that should be an unordered list with list items).\n\t\t *\n\t\t * You can also pass in a HTML string or a JSON array here.\n\t\t *\n\t\t * It is possible to pass in a standard jQuery-like AJAX config and jstree will automatically determine if the response is JSON or HTML and use that to populate the tree.\n\t\t * In addition to the standard jQuery ajax options here you can suppy functions for `data` and `url`, the functions will be run in the current instance's scope and a param will be passed indicating which node is being loaded, the return value of those functions will be used.\n\t\t *\n\t\t * The last option is to specify a function, that function will receive the node being loaded as argument and a second param which is a function which should be called with the result.\n\t\t *\n\t\t * __Examples__\n\t\t *\n\t\t *\t// AJAX\n\t\t *\t$('#tree').jstree({\n\t\t *\t\t'core' : {\n\t\t *\t\t\t'data' : {\n\t\t *\t\t\t\t'url' : '/get/children/',\n\t\t *\t\t\t\t'data' : function (node) {\n\t\t *\t\t\t\t\treturn { 'id' : node.id };\n\t\t *\t\t\t\t}\n\t\t *\t\t\t}\n\t\t *\t\t});\n\t\t *\n\t\t *\t// direct data\n\t\t *\t$('#tree').jstree({\n\t\t *\t\t'core' : {\n\t\t *\t\t\t'data' : [\n\t\t *\t\t\t\t'Simple root node',\n\t\t *\t\t\t\t{\n\t\t *\t\t\t\t\t'id' : 'node_2',\n\t\t *\t\t\t\t\t'text' : 'Root node with options',\n\t\t *\t\t\t\t\t'state' : { 'opened' : true, 'selected' : true },\n\t\t *\t\t\t\t\t'children' : [ { 'text' : 'Child 1' }, 'Child 2']\n\t\t *\t\t\t\t}\n\t\t *\t\t\t]\n\t\t *\t\t}\n\t\t *\t});\n\t\t *\n\t\t *\t// function\n\t\t *\t$('#tree').jstree({\n\t\t *\t\t'core' : {\n\t\t *\t\t\t'data' : function (obj, callback) {\n\t\t *\t\t\t\tcallback.call(this, ['Root 1', 'Root 2']);\n\t\t *\t\t\t}\n\t\t *\t\t});\n\t\t *\n\t\t * @name $.jstree.defaults.core.data\n\t\t */\n\t\tdata\t\t\t: false,\n\t\t/**\n\t\t * configure the various strings used throughout the tree\n\t\t *\n\t\t * You can use an object where the key is the string you need to replace and the value is your replacement.\n\t\t * Another option is to specify a function which will be called with an argument of the needed string and should return the replacement.\n\t\t * If left as `false` no replacement is made.\n\t\t *\n\t\t * __Examples__\n\t\t *\n\t\t *\t$('#tree').jstree({\n\t\t *\t\t'core' : {\n\t\t *\t\t\t'strings' : {\n\t\t *\t\t\t\t'Loading ...' : 'Please wait ...'\n\t\t *\t\t\t}\n\t\t *\t\t}\n\t\t *\t});\n\t\t *\n\t\t * @name $.jstree.defaults.core.strings\n\t\t */\n\t\tstrings\t\t\t: false,\n\t\t/**\n\t\t * determines what happens when a user tries to modify the structure of the tree\n\t\t * If left as `false` all operations like create, rename, delete, move or copy are prevented.\n\t\t * You can set this to `true` to allow all interactions or use a function to have better control.\n\t\t *\n\t\t * __Examples__\n\t\t *\n\t\t *\t$('#tree').jstree({\n\t\t *\t\t'core' : {\n\t\t *\t\t\t'check_callback' : function (operation, node, node_parent, node_position, more) {\n\t\t *\t\t\t\t// operation can be 'create_node', 'rename_node', 'delete_node', 'move_node', 'copy_node' or 'edit'\n\t\t *\t\t\t\t// in case of 'rename_node' node_position is filled with the new node name\n\t\t *\t\t\t\treturn operation === 'rename_node' ? true : false;\n\t\t *\t\t\t}\n\t\t *\t\t}\n\t\t *\t});\n\t\t *\n\t\t * @name $.jstree.defaults.core.check_callback\n\t\t */\n\t\tcheck_callback\t: false,\n\t\t/**\n\t\t * a callback called with a single object parameter in the instance's scope when something goes wrong (operation prevented, ajax failed, etc)\n\t\t * @name $.jstree.defaults.core.error\n\t\t */\n\t\terror\t\t\t: $.noop,\n\t\t/**\n\t\t * the open / close animation duration in milliseconds - set this to `false` to disable the animation (default is `200`)\n\t\t * @name $.jstree.defaults.core.animation\n\t\t */\n\t\tanimation\t\t: 200,\n\t\t/**\n\t\t * a boolean indicating if multiple nodes can be selected\n\t\t * @name $.jstree.defaults.core.multiple\n\t\t */\n\t\tmultiple\t\t: true,\n\t\t/**\n\t\t * theme configuration object\n\t\t * @name $.jstree.defaults.core.themes\n\t\t */\n\t\tthemes\t\t\t: {\n\t\t\t/**\n\t\t\t * the name of the theme to use (if left as `false` the default theme is used)\n\t\t\t * @name $.jstree.defaults.core.themes.name\n\t\t\t */\n\t\t\tname\t\t\t: false,\n\t\t\t/**\n\t\t\t * the URL of the theme's CSS file, leave this as `false` if you have manually included the theme CSS (recommended). You can set this to `true` too which will try to autoload the theme.\n\t\t\t * @name $.jstree.defaults.core.themes.url\n\t\t\t */\n\t\t\turl\t\t\t\t: false,\n\t\t\t/**\n\t\t\t * the location of all jstree themes - only used if `url` is set to `true`\n\t\t\t * @name $.jstree.defaults.core.themes.dir\n\t\t\t */\n\t\t\tdir\t\t\t\t: false,\n\t\t\t/**\n\t\t\t * a boolean indicating if connecting dots are shown\n\t\t\t * @name $.jstree.defaults.core.themes.dots\n\t\t\t */\n\t\t\tdots\t\t\t: true,\n\t\t\t/**\n\t\t\t * a boolean indicating if node icons are shown\n\t\t\t * @name $.jstree.defaults.core.themes.icons\n\t\t\t */\n\t\t\ticons\t\t\t: true,\n\t\t\t/**\n\t\t\t * a boolean indicating if node ellipsis should be shown - this only works with a fixed with on the container\n\t\t\t * @name $.jstree.defaults.core.themes.ellipsis\n\t\t\t */\n\t\t\tellipsis\t\t: false,\n\t\t\t/**\n\t\t\t * a boolean indicating if the tree background is striped\n\t\t\t * @name $.jstree.defaults.core.themes.stripes\n\t\t\t */\n\t\t\tstripes\t\t\t: false,\n\t\t\t/**\n\t\t\t * a string (or boolean `false`) specifying the theme variant to use (if the theme supports variants)\n\t\t\t * @name $.jstree.defaults.core.themes.variant\n\t\t\t */\n\t\t\tvariant\t\t\t: false,\n\t\t\t/**\n\t\t\t * a boolean specifying if a reponsive version of the theme should kick in on smaller screens (if the theme supports it). Defaults to `false`.\n\t\t\t * @name $.jstree.defaults.core.themes.responsive\n\t\t\t */\n\t\t\tresponsive\t\t: false\n\t\t},\n\t\t/**\n\t\t * if left as `true` all parents of all selected nodes will be opened once the tree loads (so that all selected nodes are visible to the user)\n\t\t * @name $.jstree.defaults.core.expand_selected_onload\n\t\t */\n\t\texpand_selected_onload : true,\n\t\t/**\n\t\t * if left as `true` web workers will be used to parse incoming JSON data where possible, so that the UI will not be blocked by large requests. Workers are however about 30% slower. Defaults to `true`\n\t\t * @name $.jstree.defaults.core.worker\n\t\t */\n\t\tworker : true,\n\t\t/**\n\t\t * Force node text to plain text (and escape HTML). Defaults to `false`\n\t\t * @name $.jstree.defaults.core.force_text\n\t\t */\n\t\tforce_text : false,\n\t\t/**\n\t\t * Should the node should be toggled if the text is double clicked . Defaults to `true`\n\t\t * @name $.jstree.defaults.core.dblclick_toggle\n\t\t */\n\t\tdblclick_toggle : true\n\t};\n\t$.jstree.core.prototype = {\n\t\t/**\n\t\t * used to decorate an instance with a plugin. Used internally.\n\t\t * @private\n\t\t * @name plugin(deco [, opts])\n\t\t * @param  {String} deco the plugin to decorate with\n\t\t * @param  {Object} opts options for the plugin\n\t\t * @return {jsTree}\n\t\t */\n\t\tplugin : function (deco, opts) {\n\t\t\tvar Child = $.jstree.plugins[deco];\n\t\t\tif(Child) {\n\t\t\t\tthis._data[deco] = {};\n\t\t\t\tChild.prototype = this;\n\t\t\t\treturn new Child(opts, this);\n\t\t\t}\n\t\t\treturn this;\n\t\t},\n\t\t/**\n\t\t * initialize the instance. Used internally.\n\t\t * @private\n\t\t * @name init(el, optons)\n\t\t * @param {DOMElement|jQuery|String} el the element we are transforming\n\t\t * @param {Object} options options for this instance\n\t\t * @trigger init.jstree, loading.jstree, loaded.jstree, ready.jstree, changed.jstree\n\t\t */\n\t\tinit : function (el, options) {\n\t\t\tthis._model = {\n\t\t\t\tdata : {},\n\t\t\t\tchanged : [],\n\t\t\t\tforce_full_redraw : false,\n\t\t\t\tredraw_timeout : false,\n\t\t\t\tdefault_state : {\n\t\t\t\t\tloaded : true,\n\t\t\t\t\topened : false,\n\t\t\t\t\tselected : false,\n\t\t\t\t\tdisabled : false\n\t\t\t\t}\n\t\t\t};\n\t\t\tthis._model.data[$.jstree.root] = {\n\t\t\t\tid : $.jstree.root,\n\t\t\t\tparent : null,\n\t\t\t\tparents : [],\n\t\t\t\tchildren : [],\n\t\t\t\tchildren_d : [],\n\t\t\t\tstate : { loaded : false }\n\t\t\t};\n\n\t\t\tthis.element = $(el).addClass('jstree jstree-' + this._id);\n\t\t\tthis.settings = options;\n\n\t\t\tthis._data.core.ready = false;\n\t\t\tthis._data.core.loaded = false;\n\t\t\tthis._data.core.rtl = (this.element.css(\"direction\") === \"rtl\");\n\t\t\tthis.element[this._data.core.rtl ? 'addClass' : 'removeClass'](\"jstree-rtl\");\n\t\t\tthis.element.attr('role','tree');\n\t\t\tif(this.settings.core.multiple) {\n\t\t\t\tthis.element.attr('aria-multiselectable', true);\n\t\t\t}\n\t\t\tif(!this.element.attr('tabindex')) {\n\t\t\t\tthis.element.attr('tabindex','0');\n\t\t\t}\n\n\t\t\tthis.bind();\n\t\t\t/**\n\t\t\t * triggered after all events are bound\n\t\t\t * @event\n\t\t\t * @name init.jstree\n\t\t\t */\n\t\t\tthis.trigger(\"init\");\n\n\t\t\tthis._data.core.original_container_html = this.element.find(\" > ul > li\").clone(true);\n\t\t\tthis._data.core.original_container_html\n\t\t\t\t.find(\"li\").addBack()\n\t\t\t\t.contents().filter(function() {\n\t\t\t\t\treturn this.nodeType === 3 && (!this.nodeValue || /^\\s+$/.test(this.nodeValue));\n\t\t\t\t})\n\t\t\t\t.remove();\n\t\t\tthis.element.html(\"<\"+\"ul class='jstree-container-ul jstree-children' role='group'><\"+\"li id='j\"+this._id+\"_loading' class='jstree-initial-node jstree-loading jstree-leaf jstree-last' role='tree-item'><i class='jstree-icon jstree-ocl'></i><\"+\"a class='jstree-anchor' href='#'><i class='jstree-icon jstree-themeicon-hidden'></i>\" + this.get_string(\"Loading ...\") + \"</a></li></ul>\");\n\t\t\tthis.element.attr('aria-activedescendant','j' + this._id + '_loading');\n\t\t\tthis._data.core.li_height = this.get_container_ul().children(\"li\").first().outerHeight() || 24;\n\t\t\tthis._data.core.node = this._create_prototype_node();\n\t\t\t/**\n\t\t\t * triggered after the loading text is shown and before loading starts\n\t\t\t * @event\n\t\t\t * @name loading.jstree\n\t\t\t */\n\t\t\tthis.trigger(\"loading\");\n\t\t\tthis.load_node($.jstree.root);\n\t\t},\n\t\t/**\n\t\t * destroy an instance\n\t\t * @name destroy()\n\t\t * @param  {Boolean} keep_html if not set to `true` the container will be emptied, otherwise the current DOM elements will be kept intact\n\t\t */\n\t\tdestroy : function (keep_html) {\n\t\t\t/**\n\t\t\t * triggered before the tree is destroyed\n\t\t\t * @event\n\t\t\t * @name destroy.jstree\n\t\t\t */\n\t\t\tthis.trigger(\"destroy\");\n\t\t\tif(this._wrk) {\n\t\t\t\ttry {\n\t\t\t\t\twindow.URL.revokeObjectURL(this._wrk);\n\t\t\t\t\tthis._wrk = null;\n\t\t\t\t}\n\t\t\t\tcatch (ignore) { }\n\t\t\t}\n\t\t\tif(!keep_html) { this.element.empty(); }\n\t\t\tthis.teardown();\n\t\t},\n\t\t/**\n\t\t * Create prototype node\n\t\t */\n\t\t_create_prototype_node : function () {\n\t\t\tvar _node = document.createElement('LI'), _temp1, _temp2;\n\t\t\t_node.setAttribute('role', 'treeitem');\n\t\t\t_temp1 = document.createElement('I');\n\t\t\t_temp1.className = 'jstree-icon jstree-ocl';\n\t\t\t_temp1.setAttribute('role', 'presentation');\n\t\t\t_node.appendChild(_temp1);\n\t\t\t_temp1 = document.createElement('A');\n\t\t\t_temp1.className = 'jstree-anchor';\n\t\t\t_temp1.setAttribute('href','#');\n\t\t\t_temp1.setAttribute('tabindex','-1');\n\t\t\t_temp2 = document.createElement('I');\n\t\t\t_temp2.className = 'jstree-icon jstree-themeicon';\n\t\t\t_temp2.setAttribute('role', 'presentation');\n\t\t\t_temp1.appendChild(_temp2);\n\t\t\t_node.appendChild(_temp1);\n\t\t\t_temp1 = _temp2 = null;\n\n\t\t\treturn _node;\n\t\t},\n\t\t/**\n\t\t * part of the destroying of an instance. Used internally.\n\t\t * @private\n\t\t * @name teardown()\n\t\t */\n\t\tteardown : function () {\n\t\t\tthis.unbind();\n\t\t\tthis.element\n\t\t\t\t.removeClass('jstree')\n\t\t\t\t.removeData('jstree')\n\t\t\t\t.find(\"[class^='jstree']\")\n\t\t\t\t\t.addBack()\n\t\t\t\t\t.attr(\"class\", function () { return this.className.replace(/jstree[^ ]*|$/ig,''); });\n\t\t\tthis.element = null;\n\t\t},\n\t\t/**\n\t\t * bind all events. Used internally.\n\t\t * @private\n\t\t * @name bind()\n\t\t */\n\t\tbind : function () {\n\t\t\tvar word = '',\n\t\t\t\ttout = null,\n\t\t\t\twas_click = 0;\n\t\t\tthis.element\n\t\t\t\t.on(\"dblclick.jstree\", function (e) {\n\t\t\t\t\t\tif(e.target.tagName && e.target.tagName.toLowerCase() === \"input\") { return true; }\n\t\t\t\t\t\tif(document.selection && document.selection.empty) {\n\t\t\t\t\t\t\tdocument.selection.empty();\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tif(window.getSelection) {\n\t\t\t\t\t\t\t\tvar sel = window.getSelection();\n\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\tsel.removeAllRanges();\n\t\t\t\t\t\t\t\t\tsel.collapse();\n\t\t\t\t\t\t\t\t} catch (ignore) { }\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t})\n\t\t\t\t.on(\"mousedown.jstree\", $.proxy(function (e) {\n\t\t\t\t\t\tif(e.target === this.element[0]) {\n\t\t\t\t\t\t\te.preventDefault(); // prevent losing focus when clicking scroll arrows (FF, Chrome)\n\t\t\t\t\t\t\twas_click = +(new Date()); // ie does not allow to prevent losing focus\n\t\t\t\t\t\t}\n\t\t\t\t\t}, this))\n\t\t\t\t.on(\"mousedown.jstree\", \".jstree-ocl\", function (e) {\n\t\t\t\t\t\te.preventDefault(); // prevent any node inside from losing focus when clicking the open/close icon\n\t\t\t\t\t})\n\t\t\t\t.on(\"click.jstree\", \".jstree-ocl\", $.proxy(function (e) {\n\t\t\t\t\t\tthis.toggle_node(e.target);\n\t\t\t\t\t}, this))\n\t\t\t\t.on(\"dblclick.jstree\", \".jstree-anchor\", $.proxy(function (e) {\n\t\t\t\t\t\tif(e.target.tagName && e.target.tagName.toLowerCase() === \"input\") { return true; }\n\t\t\t\t\t\tif(this.settings.core.dblclick_toggle) {\n\t\t\t\t\t\t\tthis.toggle_node(e.target);\n\t\t\t\t\t\t}\n\t\t\t\t\t}, this))\n\t\t\t\t.on(\"click.jstree\", \".jstree-anchor\", $.proxy(function (e) {\n\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t\tif(e.currentTarget !== document.activeElement) { $(e.currentTarget).focus(); }\n\t\t\t\t\t\tthis.activate_node(e.currentTarget, e);\n\t\t\t\t\t}, this))\n\t\t\t\t.on('keydown.jstree', '.jstree-anchor', $.proxy(function (e) {\n\t\t\t\t\t\tif(e.target.tagName && e.target.tagName.toLowerCase() === \"input\") { return true; }\n\t\t\t\t\t\tif(e.which !== 32 && e.which !== 13 && (e.shiftKey || e.ctrlKey || e.altKey || e.metaKey)) { return true; }\n\t\t\t\t\t\tvar o = null;\n\t\t\t\t\t\tif(this._data.core.rtl) {\n\t\t\t\t\t\t\tif(e.which === 37) { e.which = 39; }\n\t\t\t\t\t\t\telse if(e.which === 39) { e.which = 37; }\n\t\t\t\t\t\t}\n\t\t\t\t\t\tswitch(e.which) {\n\t\t\t\t\t\t\tcase 32: // aria defines space only with Ctrl\n\t\t\t\t\t\t\t\tif(e.ctrlKey) {\n\t\t\t\t\t\t\t\t\te.type = \"click\";\n\t\t\t\t\t\t\t\t\t$(e.currentTarget).trigger(e);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase 13: // enter\n\t\t\t\t\t\t\t\te.type = \"click\";\n\t\t\t\t\t\t\t\t$(e.currentTarget).trigger(e);\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase 37: // left\n\t\t\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t\t\t\tif(this.is_open(e.currentTarget)) {\n\t\t\t\t\t\t\t\t\tthis.close_node(e.currentTarget);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\to = this.get_parent(e.currentTarget);\n\t\t\t\t\t\t\t\t\tif(o && o.id !== $.jstree.root) { this.get_node(o, true).children('.jstree-anchor').focus(); }\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase 38: // up\n\t\t\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t\t\t\to = this.get_prev_dom(e.currentTarget);\n\t\t\t\t\t\t\t\tif(o && o.length) { o.children('.jstree-anchor').focus(); }\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase 39: // right\n\t\t\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t\t\t\tif(this.is_closed(e.currentTarget)) {\n\t\t\t\t\t\t\t\t\tthis.open_node(e.currentTarget, function (o) { this.get_node(o, true).children('.jstree-anchor').focus(); });\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse if (this.is_open(e.currentTarget)) {\n\t\t\t\t\t\t\t\t\to = this.get_node(e.currentTarget, true).children('.jstree-children')[0];\n\t\t\t\t\t\t\t\t\tif(o) { $(this._firstChild(o)).children('.jstree-anchor').focus(); }\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase 40: // down\n\t\t\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t\t\t\to = this.get_next_dom(e.currentTarget);\n\t\t\t\t\t\t\t\tif(o && o.length) { o.children('.jstree-anchor').focus(); }\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase 106: // aria defines * on numpad as open_all - not very common\n\t\t\t\t\t\t\t\tthis.open_all();\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase 36: // home\n\t\t\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t\t\t\to = this._firstChild(this.get_container_ul()[0]);\n\t\t\t\t\t\t\t\tif(o) { $(o).children('.jstree-anchor').filter(':visible').focus(); }\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase 35: // end\n\t\t\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t\t\t\tthis.element.find('.jstree-anchor').filter(':visible').last().focus();\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase 113: // f2 - safe to include - if check_callback is false it will fail\n\t\t\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t\t\t\tthis.edit(e.currentTarget);\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t/*!\n\t\t\t\t\t\t\t// delete\n\t\t\t\t\t\t\tcase 46:\n\t\t\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t\t\t\to = this.get_node(e.currentTarget);\n\t\t\t\t\t\t\t\tif(o && o.id && o.id !== $.jstree.root) {\n\t\t\t\t\t\t\t\t\to = this.is_selected(o) ? this.get_selected() : o;\n\t\t\t\t\t\t\t\t\tthis.delete_node(o);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\t*/\n\t\t\t\t\t\t}\n\t\t\t\t\t}, this))\n\t\t\t\t.on(\"load_node.jstree\", $.proxy(function (e, data) {\n\t\t\t\t\t\tif(data.status) {\n\t\t\t\t\t\t\tif(data.node.id === $.jstree.root && !this._data.core.loaded) {\n\t\t\t\t\t\t\t\tthis._data.core.loaded = true;\n\t\t\t\t\t\t\t\tif(this._firstChild(this.get_container_ul()[0])) {\n\t\t\t\t\t\t\t\t\tthis.element.attr('aria-activedescendant',this._firstChild(this.get_container_ul()[0]).id);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t/**\n\t\t\t\t\t\t\t\t * triggered after the root node is loaded for the first time\n\t\t\t\t\t\t\t\t * @event\n\t\t\t\t\t\t\t\t * @name loaded.jstree\n\t\t\t\t\t\t\t\t */\n\t\t\t\t\t\t\t\tthis.trigger(\"loaded\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif(!this._data.core.ready) {\n\t\t\t\t\t\t\t\tsetTimeout($.proxy(function() {\n\t\t\t\t\t\t\t\t\tif(this.element && !this.get_container_ul().find('.jstree-loading').length) {\n\t\t\t\t\t\t\t\t\t\tthis._data.core.ready = true;\n\t\t\t\t\t\t\t\t\t\tif(this._data.core.selected.length) {\n\t\t\t\t\t\t\t\t\t\t\tif(this.settings.core.expand_selected_onload) {\n\t\t\t\t\t\t\t\t\t\t\t\tvar tmp = [], i, j;\n\t\t\t\t\t\t\t\t\t\t\t\tfor(i = 0, j = this._data.core.selected.length; i < j; i++) {\n\t\t\t\t\t\t\t\t\t\t\t\t\ttmp = tmp.concat(this._model.data[this._data.core.selected[i]].parents);\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\ttmp = $.vakata.array_unique(tmp);\n\t\t\t\t\t\t\t\t\t\t\t\tfor(i = 0, j = tmp.length; i < j; i++) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tthis.open_node(tmp[i], false, 0);\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tthis.trigger('changed', { 'action' : 'ready', 'selected' : this._data.core.selected });\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t/**\n\t\t\t\t\t\t\t\t\t\t * triggered after all nodes are finished loading\n\t\t\t\t\t\t\t\t\t\t * @event\n\t\t\t\t\t\t\t\t\t\t * @name ready.jstree\n\t\t\t\t\t\t\t\t\t\t */\n\t\t\t\t\t\t\t\t\t\tthis.trigger(\"ready\");\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}, this), 0);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}, this))\n\t\t\t\t// quick searching when the tree is focused\n\t\t\t\t.on('keypress.jstree', $.proxy(function (e) {\n\t\t\t\t\t\tif(e.target.tagName && e.target.tagName.toLowerCase() === \"input\") { return true; }\n\t\t\t\t\t\tif(tout) { clearTimeout(tout); }\n\t\t\t\t\t\ttout = setTimeout(function () {\n\t\t\t\t\t\t\tword = '';\n\t\t\t\t\t\t}, 500);\n\n\t\t\t\t\t\tvar chr = String.fromCharCode(e.which).toLowerCase(),\n\t\t\t\t\t\t\tcol = this.element.find('.jstree-anchor').filter(':visible'),\n\t\t\t\t\t\t\tind = col.index(document.activeElement) || 0,\n\t\t\t\t\t\t\tend = false;\n\t\t\t\t\t\tword += chr;\n\n\t\t\t\t\t\t// match for whole word from current node down (including the current node)\n\t\t\t\t\t\tif(word.length > 1) {\n\t\t\t\t\t\t\tcol.slice(ind).each($.proxy(function (i, v) {\n\t\t\t\t\t\t\t\tif($(v).text().toLowerCase().indexOf(word) === 0) {\n\t\t\t\t\t\t\t\t\t$(v).focus();\n\t\t\t\t\t\t\t\t\tend = true;\n\t\t\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}, this));\n\t\t\t\t\t\t\tif(end) { return; }\n\n\t\t\t\t\t\t\t// match for whole word from the beginning of the tree\n\t\t\t\t\t\t\tcol.slice(0, ind).each($.proxy(function (i, v) {\n\t\t\t\t\t\t\t\tif($(v).text().toLowerCase().indexOf(word) === 0) {\n\t\t\t\t\t\t\t\t\t$(v).focus();\n\t\t\t\t\t\t\t\t\tend = true;\n\t\t\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}, this));\n\t\t\t\t\t\t\tif(end) { return; }\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// list nodes that start with that letter (only if word consists of a single char)\n\t\t\t\t\t\tif(new RegExp('^' + chr.replace(/[-\\/\\\\^$*+?.()|[\\]{}]/g, '\\\\$&') + '+$').test(word)) {\n\t\t\t\t\t\t\t// search for the next node starting with that letter\n\t\t\t\t\t\t\tcol.slice(ind + 1).each($.proxy(function (i, v) {\n\t\t\t\t\t\t\t\tif($(v).text().toLowerCase().charAt(0) === chr) {\n\t\t\t\t\t\t\t\t\t$(v).focus();\n\t\t\t\t\t\t\t\t\tend = true;\n\t\t\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}, this));\n\t\t\t\t\t\t\tif(end) { return; }\n\n\t\t\t\t\t\t\t// search from the beginning\n\t\t\t\t\t\t\tcol.slice(0, ind + 1).each($.proxy(function (i, v) {\n\t\t\t\t\t\t\t\tif($(v).text().toLowerCase().charAt(0) === chr) {\n\t\t\t\t\t\t\t\t\t$(v).focus();\n\t\t\t\t\t\t\t\t\tend = true;\n\t\t\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}, this));\n\t\t\t\t\t\t\tif(end) { return; }\n\t\t\t\t\t\t}\n\t\t\t\t\t}, this))\n\t\t\t\t// THEME RELATED\n\t\t\t\t.on(\"init.jstree\", $.proxy(function () {\n\t\t\t\t\t\tvar s = this.settings.core.themes;\n\t\t\t\t\t\tthis._data.core.themes.dots\t\t\t= s.dots;\n\t\t\t\t\t\tthis._data.core.themes.stripes\t\t= s.stripes;\n\t\t\t\t\t\tthis._data.core.themes.icons\t\t= s.icons;\n\t\t\t\t\t\tthis._data.core.themes.ellipsis\t\t= s.ellipsis;\n\t\t\t\t\t\tthis.set_theme(s.name || \"default\", s.url);\n\t\t\t\t\t\tthis.set_theme_variant(s.variant);\n\t\t\t\t\t}, this))\n\t\t\t\t.on(\"loading.jstree\", $.proxy(function () {\n\t\t\t\t\t\tthis[ this._data.core.themes.dots ? \"show_dots\" : \"hide_dots\" ]();\n\t\t\t\t\t\tthis[ this._data.core.themes.icons ? \"show_icons\" : \"hide_icons\" ]();\n\t\t\t\t\t\tthis[ this._data.core.themes.stripes ? \"show_stripes\" : \"hide_stripes\" ]();\n\t\t\t\t\t\tthis[ this._data.core.themes.ellipsis ? \"show_ellipsis\" : \"hide_ellipsis\" ]();\n\t\t\t\t\t}, this))\n\t\t\t\t.on('blur.jstree', '.jstree-anchor', $.proxy(function (e) {\n\t\t\t\t\t\tthis._data.core.focused = null;\n\t\t\t\t\t\t$(e.currentTarget).filter('.jstree-hovered').mouseleave();\n\t\t\t\t\t\tthis.element.attr('tabindex', '0');\n\t\t\t\t\t}, this))\n\t\t\t\t.on('focus.jstree', '.jstree-anchor', $.proxy(function (e) {\n\t\t\t\t\t\tvar tmp = this.get_node(e.currentTarget);\n\t\t\t\t\t\tif(tmp && tmp.id) {\n\t\t\t\t\t\t\tthis._data.core.focused = tmp.id;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tthis.element.find('.jstree-hovered').not(e.currentTarget).mouseleave();\n\t\t\t\t\t\t$(e.currentTarget).mouseenter();\n\t\t\t\t\t\tthis.element.attr('tabindex', '-1');\n\t\t\t\t\t}, this))\n\t\t\t\t.on('focus.jstree', $.proxy(function () {\n\t\t\t\t\t\tif(+(new Date()) - was_click > 500 && !this._data.core.focused) {\n\t\t\t\t\t\t\twas_click = 0;\n\t\t\t\t\t\t\tvar act = this.get_node(this.element.attr('aria-activedescendant'), true);\n\t\t\t\t\t\t\tif(act) {\n\t\t\t\t\t\t\t\tact.find('> .jstree-anchor').focus();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}, this))\n\t\t\t\t.on('mouseenter.jstree', '.jstree-anchor', $.proxy(function (e) {\n\t\t\t\t\t\tthis.hover_node(e.currentTarget);\n\t\t\t\t\t}, this))\n\t\t\t\t.on('mouseleave.jstree', '.jstree-anchor', $.proxy(function (e) {\n\t\t\t\t\t\tthis.dehover_node(e.currentTarget);\n\t\t\t\t\t}, this));\n\t\t},\n\t\t/**\n\t\t * part of the destroying of an instance. Used internally.\n\t\t * @private\n\t\t * @name unbind()\n\t\t */\n\t\tunbind : function () {\n\t\t\tthis.element.off('.jstree');\n\t\t\t$(document).off('.jstree-' + this._id);\n\t\t},\n\t\t/**\n\t\t * trigger an event. Used internally.\n\t\t * @private\n\t\t * @name trigger(ev [, data])\n\t\t * @param  {String} ev the name of the event to trigger\n\t\t * @param  {Object} data additional data to pass with the event\n\t\t */\n\t\ttrigger : function (ev, data) {\n\t\t\tif(!data) {\n\t\t\t\tdata = {};\n\t\t\t}\n\t\t\tdata.instance = this;\n\t\t\tthis.element.triggerHandler(ev.replace('.jstree','') + '.jstree', data);\n\t\t},\n\t\t/**\n\t\t * returns the jQuery extended instance container\n\t\t * @name get_container()\n\t\t * @return {jQuery}\n\t\t */\n\t\tget_container : function () {\n\t\t\treturn this.element;\n\t\t},\n\t\t/**\n\t\t * returns the jQuery extended main UL node inside the instance container. Used internally.\n\t\t * @private\n\t\t * @name get_container_ul()\n\t\t * @return {jQuery}\n\t\t */\n\t\tget_container_ul : function () {\n\t\t\treturn this.element.children(\".jstree-children\").first();\n\t\t},\n\t\t/**\n\t\t * gets string replacements (localization). Used internally.\n\t\t * @private\n\t\t * @name get_string(key)\n\t\t * @param  {String} key\n\t\t * @return {String}\n\t\t */\n\t\tget_string : function (key) {\n\t\t\tvar a = this.settings.core.strings;\n\t\t\tif($.isFunction(a)) { return a.call(this, key); }\n\t\t\tif(a && a[key]) { return a[key]; }\n\t\t\treturn key;\n\t\t},\n\t\t/**\n\t\t * gets the first child of a DOM node. Used internally.\n\t\t * @private\n\t\t * @name _firstChild(dom)\n\t\t * @param  {DOMElement} dom\n\t\t * @return {DOMElement}\n\t\t */\n\t\t_firstChild : function (dom) {\n\t\t\tdom = dom ? dom.firstChild : null;\n\t\t\twhile(dom !== null && dom.nodeType !== 1) {\n\t\t\t\tdom = dom.nextSibling;\n\t\t\t}\n\t\t\treturn dom;\n\t\t},\n\t\t/**\n\t\t * gets the next sibling of a DOM node. Used internally.\n\t\t * @private\n\t\t * @name _nextSibling(dom)\n\t\t * @param  {DOMElement} dom\n\t\t * @return {DOMElement}\n\t\t */\n\t\t_nextSibling : function (dom) {\n\t\t\tdom = dom ? dom.nextSibling : null;\n\t\t\twhile(dom !== null && dom.nodeType !== 1) {\n\t\t\t\tdom = dom.nextSibling;\n\t\t\t}\n\t\t\treturn dom;\n\t\t},\n\t\t/**\n\t\t * gets the previous sibling of a DOM node. Used internally.\n\t\t * @private\n\t\t * @name _previousSibling(dom)\n\t\t * @param  {DOMElement} dom\n\t\t * @return {DOMElement}\n\t\t */\n\t\t_previousSibling : function (dom) {\n\t\t\tdom = dom ? dom.previousSibling : null;\n\t\t\twhile(dom !== null && dom.nodeType !== 1) {\n\t\t\t\tdom = dom.previousSibling;\n\t\t\t}\n\t\t\treturn dom;\n\t\t},\n\t\t/**\n\t\t * get the JSON representation of a node (or the actual jQuery extended DOM node) by using any input (child DOM element, ID string, selector, etc)\n\t\t * @name get_node(obj [, as_dom])\n\t\t * @param  {mixed} obj\n\t\t * @param  {Boolean} as_dom\n\t\t * @return {Object|jQuery}\n\t\t */\n\t\tget_node : function (obj, as_dom) {\n\t\t\tif(obj && obj.id) {\n\t\t\t\tobj = obj.id;\n\t\t\t}\n\t\t\tvar dom;\n\t\t\ttry {\n\t\t\t\tif(this._model.data[obj]) {\n\t\t\t\t\tobj = this._model.data[obj];\n\t\t\t\t}\n\t\t\t\telse if(typeof obj === \"string\" && this._model.data[obj.replace(/^#/, '')]) {\n\t\t\t\t\tobj = this._model.data[obj.replace(/^#/, '')];\n\t\t\t\t}\n\t\t\t\telse if(typeof obj === \"string\" && (dom = $('#' + obj.replace($.jstree.idregex,'\\\\$&'), this.element)).length && this._model.data[dom.closest('.jstree-node').attr('id')]) {\n\t\t\t\t\tobj = this._model.data[dom.closest('.jstree-node').attr('id')];\n\t\t\t\t}\n\t\t\t\telse if((dom = $(obj, this.element)).length && this._model.data[dom.closest('.jstree-node').attr('id')]) {\n\t\t\t\t\tobj = this._model.data[dom.closest('.jstree-node').attr('id')];\n\t\t\t\t}\n\t\t\t\telse if((dom = $(obj, this.element)).length && dom.hasClass('jstree')) {\n\t\t\t\t\tobj = this._model.data[$.jstree.root];\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\tif(as_dom) {\n\t\t\t\t\tobj = obj.id === $.jstree.root ? this.element : $('#' + obj.id.replace($.jstree.idregex,'\\\\$&'), this.element);\n\t\t\t\t}\n\t\t\t\treturn obj;\n\t\t\t} catch (ex) { return false; }\n\t\t},\n\t\t/**\n\t\t * get the path to a node, either consisting of node texts, or of node IDs, optionally glued together (otherwise an array)\n\t\t * @name get_path(obj [, glue, ids])\n\t\t * @param  {mixed} obj the node\n\t\t * @param  {String} glue if you want the path as a string - pass the glue here (for example '/'), if a falsy value is supplied here, an array is returned\n\t\t * @param  {Boolean} ids if set to true build the path using ID, otherwise node text is used\n\t\t * @return {mixed}\n\t\t */\n\t\tget_path : function (obj, glue, ids) {\n\t\t\tobj = obj.parents ? obj : this.get_node(obj);\n\t\t\tif(!obj || obj.id === $.jstree.root || !obj.parents) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tvar i, j, p = [];\n\t\t\tp.push(ids ? obj.id : obj.text);\n\t\t\tfor(i = 0, j = obj.parents.length; i < j; i++) {\n\t\t\t\tp.push(ids ? obj.parents[i] : this.get_text(obj.parents[i]));\n\t\t\t}\n\t\t\tp = p.reverse().slice(1);\n\t\t\treturn glue ? p.join(glue) : p;\n\t\t},\n\t\t/**\n\t\t * get the next visible node that is below the `obj` node. If `strict` is set to `true` only sibling nodes are returned.\n\t\t * @name get_next_dom(obj [, strict])\n\t\t * @param  {mixed} obj\n\t\t * @param  {Boolean} strict\n\t\t * @return {jQuery}\n\t\t */\n\t\tget_next_dom : function (obj, strict) {\n\t\t\tvar tmp;\n\t\t\tobj = this.get_node(obj, true);\n\t\t\tif(obj[0] === this.element[0]) {\n\t\t\t\ttmp = this._firstChild(this.get_container_ul()[0]);\n\t\t\t\twhile (tmp && tmp.offsetHeight === 0) {\n\t\t\t\t\ttmp = this._nextSibling(tmp);\n\t\t\t\t}\n\t\t\t\treturn tmp ? $(tmp) : false;\n\t\t\t}\n\t\t\tif(!obj || !obj.length) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tif(strict) {\n\t\t\t\ttmp = obj[0];\n\t\t\t\tdo {\n\t\t\t\t\ttmp = this._nextSibling(tmp);\n\t\t\t\t} while (tmp && tmp.offsetHeight === 0);\n\t\t\t\treturn tmp ? $(tmp) : false;\n\t\t\t}\n\t\t\tif(obj.hasClass(\"jstree-open\")) {\n\t\t\t\ttmp = this._firstChild(obj.children('.jstree-children')[0]);\n\t\t\t\twhile (tmp && tmp.offsetHeight === 0) {\n\t\t\t\t\ttmp = this._nextSibling(tmp);\n\t\t\t\t}\n\t\t\t\tif(tmp !== null) {\n\t\t\t\t\treturn $(tmp);\n\t\t\t\t}\n\t\t\t}\n\t\t\ttmp = obj[0];\n\t\t\tdo {\n\t\t\t\ttmp = this._nextSibling(tmp);\n\t\t\t} while (tmp && tmp.offsetHeight === 0);\n\t\t\tif(tmp !== null) {\n\t\t\t\treturn $(tmp);\n\t\t\t}\n\t\t\treturn obj.parentsUntil(\".jstree\",\".jstree-node\").nextAll(\".jstree-node:visible\").first();\n\t\t},\n\t\t/**\n\t\t * get the previous visible node that is above the `obj` node. If `strict` is set to `true` only sibling nodes are returned.\n\t\t * @name get_prev_dom(obj [, strict])\n\t\t * @param  {mixed} obj\n\t\t * @param  {Boolean} strict\n\t\t * @return {jQuery}\n\t\t */\n\t\tget_prev_dom : function (obj, strict) {\n\t\t\tvar tmp;\n\t\t\tobj = this.get_node(obj, true);\n\t\t\tif(obj[0] === this.element[0]) {\n\t\t\t\ttmp = this.get_container_ul()[0].lastChild;\n\t\t\t\twhile (tmp && tmp.offsetHeight === 0) {\n\t\t\t\t\ttmp = this._previousSibling(tmp);\n\t\t\t\t}\n\t\t\t\treturn tmp ? $(tmp) : false;\n\t\t\t}\n\t\t\tif(!obj || !obj.length) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tif(strict) {\n\t\t\t\ttmp = obj[0];\n\t\t\t\tdo {\n\t\t\t\t\ttmp = this._previousSibling(tmp);\n\t\t\t\t} while (tmp && tmp.offsetHeight === 0);\n\t\t\t\treturn tmp ? $(tmp) : false;\n\t\t\t}\n\t\t\ttmp = obj[0];\n\t\t\tdo {\n\t\t\t\ttmp = this._previousSibling(tmp);\n\t\t\t} while (tmp && tmp.offsetHeight === 0);\n\t\t\tif(tmp !== null) {\n\t\t\t\tobj = $(tmp);\n\t\t\t\twhile(obj.hasClass(\"jstree-open\")) {\n\t\t\t\t\tobj = obj.children(\".jstree-children\").first().children(\".jstree-node:visible:last\");\n\t\t\t\t}\n\t\t\t\treturn obj;\n\t\t\t}\n\t\t\ttmp = obj[0].parentNode.parentNode;\n\t\t\treturn tmp && tmp.className && tmp.className.indexOf('jstree-node') !== -1 ? $(tmp) : false;\n\t\t},\n\t\t/**\n\t\t * get the parent ID of a node\n\t\t * @name get_parent(obj)\n\t\t * @param  {mixed} obj\n\t\t * @return {String}\n\t\t */\n\t\tget_parent : function (obj) {\n\t\t\tobj = this.get_node(obj);\n\t\t\tif(!obj || obj.id === $.jstree.root) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\treturn obj.parent;\n\t\t},\n\t\t/**\n\t\t * get a jQuery collection of all the children of a node (node must be rendered)\n\t\t * @name get_children_dom(obj)\n\t\t * @param  {mixed} obj\n\t\t * @return {jQuery}\n\t\t */\n\t\tget_children_dom : function (obj) {\n\t\t\tobj = this.get_node(obj, true);\n\t\t\tif(obj[0] === this.element[0]) {\n\t\t\t\treturn this.get_container_ul().children(\".jstree-node\");\n\t\t\t}\n\t\t\tif(!obj || !obj.length) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\treturn obj.children(\".jstree-children\").children(\".jstree-node\");\n\t\t},\n\t\t/**\n\t\t * checks if a node has children\n\t\t * @name is_parent(obj)\n\t\t * @param  {mixed} obj\n\t\t * @return {Boolean}\n\t\t */\n\t\tis_parent : function (obj) {\n\t\t\tobj = this.get_node(obj);\n\t\t\treturn obj && (obj.state.loaded === false || obj.children.length > 0);\n\t\t},\n\t\t/**\n\t\t * checks if a node is loaded (its children are available)\n\t\t * @name is_loaded(obj)\n\t\t * @param  {mixed} obj\n\t\t * @return {Boolean}\n\t\t */\n\t\tis_loaded : function (obj) {\n\t\t\tobj = this.get_node(obj);\n\t\t\treturn obj && obj.state.loaded;\n\t\t},\n\t\t/**\n\t\t * check if a node is currently loading (fetching children)\n\t\t * @name is_loading(obj)\n\t\t * @param  {mixed} obj\n\t\t * @return {Boolean}\n\t\t */\n\t\tis_loading : function (obj) {\n\t\t\tobj = this.get_node(obj);\n\t\t\treturn obj && obj.state && obj.state.loading;\n\t\t},\n\t\t/**\n\t\t * check if a node is opened\n\t\t * @name is_open(obj)\n\t\t * @param  {mixed} obj\n\t\t * @return {Boolean}\n\t\t */\n\t\tis_open : function (obj) {\n\t\t\tobj = this.get_node(obj);\n\t\t\treturn obj && obj.state.opened;\n\t\t},\n\t\t/**\n\t\t * check if a node is in a closed state\n\t\t * @name is_closed(obj)\n\t\t * @param  {mixed} obj\n\t\t * @return {Boolean}\n\t\t */\n\t\tis_closed : function (obj) {\n\t\t\tobj = this.get_node(obj);\n\t\t\treturn obj && this.is_parent(obj) && !obj.state.opened;\n\t\t},\n\t\t/**\n\t\t * check if a node has no children\n\t\t * @name is_leaf(obj)\n\t\t * @param  {mixed} obj\n\t\t * @return {Boolean}\n\t\t */\n\t\tis_leaf : function (obj) {\n\t\t\treturn !this.is_parent(obj);\n\t\t},\n\t\t/**\n\t\t * loads a node (fetches its children using the `core.data` setting). Multiple nodes can be passed to by using an array.\n\t\t * @name load_node(obj [, callback])\n\t\t * @param  {mixed} obj\n\t\t * @param  {function} callback a function to be executed once loading is complete, the function is executed in the instance's scope and receives two arguments - the node and a boolean status\n\t\t * @return {Boolean}\n\t\t * @trigger load_node.jstree\n\t\t */\n\t\tload_node : function (obj, callback) {\n\t\t\tvar k, l, i, j, c;\n\t\t\tif($.isArray(obj)) {\n\t\t\t\tthis._load_nodes(obj.slice(), callback);\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\tobj = this.get_node(obj);\n\t\t\tif(!obj) {\n\t\t\t\tif(callback) { callback.call(this, obj, false); }\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t// if(obj.state.loading) { } // the node is already loading - just wait for it to load and invoke callback? but if called implicitly it should be loaded again?\n\t\t\tif(obj.state.loaded) {\n\t\t\t\tobj.state.loaded = false;\n\t\t\t\tfor(i = 0, j = obj.parents.length; i < j; i++) {\n\t\t\t\t\tthis._model.data[obj.parents[i]].children_d = $.vakata.array_filter(this._model.data[obj.parents[i]].children_d, function (v) {\n\t\t\t\t\t\treturn $.inArray(v, obj.children_d) === -1;\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\tfor(k = 0, l = obj.children_d.length; k < l; k++) {\n\t\t\t\t\tif(this._model.data[obj.children_d[k]].state.selected) {\n\t\t\t\t\t\tc = true;\n\t\t\t\t\t}\n\t\t\t\t\tdelete this._model.data[obj.children_d[k]];\n\t\t\t\t}\n\t\t\t\tif (c) {\n\t\t\t\t\tthis._data.core.selected = $.vakata.array_filter(this._data.core.selected, function (v) {\n\t\t\t\t\t\treturn $.inArray(v, obj.children_d) === -1;\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\tobj.children = [];\n\t\t\t\tobj.children_d = [];\n\t\t\t\tif(c) {\n\t\t\t\t\tthis.trigger('changed', { 'action' : 'load_node', 'node' : obj, 'selected' : this._data.core.selected });\n\t\t\t\t}\n\t\t\t}\n\t\t\tobj.state.failed = false;\n\t\t\tobj.state.loading = true;\n\t\t\tthis.get_node(obj, true).addClass(\"jstree-loading\").attr('aria-busy',true);\n\t\t\tthis._load_node(obj, $.proxy(function (status) {\n\t\t\t\tobj = this._model.data[obj.id];\n\t\t\t\tobj.state.loading = false;\n\t\t\t\tobj.state.loaded = status;\n\t\t\t\tobj.state.failed = !obj.state.loaded;\n\t\t\t\tvar dom = this.get_node(obj, true), i = 0, j = 0, m = this._model.data, has_children = false;\n\t\t\t\tfor(i = 0, j = obj.children.length; i < j; i++) {\n\t\t\t\t\tif(m[obj.children[i]] && !m[obj.children[i]].state.hidden) {\n\t\t\t\t\t\thas_children = true;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(obj.state.loaded && dom && dom.length) {\n\t\t\t\t\tdom.removeClass('jstree-closed jstree-open jstree-leaf');\n\t\t\t\t\tif (!has_children) {\n\t\t\t\t\t\tdom.addClass('jstree-leaf');\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tif (obj.id !== '#') {\n\t\t\t\t\t\t\tdom.addClass(obj.state.opened ? 'jstree-open' : 'jstree-closed');\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tdom.removeClass(\"jstree-loading\").attr('aria-busy',false);\n\t\t\t\t/**\n\t\t\t\t * triggered after a node is loaded\n\t\t\t\t * @event\n\t\t\t\t * @name load_node.jstree\n\t\t\t\t * @param {Object} node the node that was loading\n\t\t\t\t * @param {Boolean} status was the node loaded successfully\n\t\t\t\t */\n\t\t\t\tthis.trigger('load_node', { \"node\" : obj, \"status\" : status });\n\t\t\t\tif(callback) {\n\t\t\t\t\tcallback.call(this, obj, status);\n\t\t\t\t}\n\t\t\t}, this));\n\t\t\treturn true;\n\t\t},\n\t\t/**\n\t\t * load an array of nodes (will also load unavailable nodes as soon as the appear in the structure). Used internally.\n\t\t * @private\n\t\t * @name _load_nodes(nodes [, callback])\n\t\t * @param  {array} nodes\n\t\t * @param  {function} callback a function to be executed once loading is complete, the function is executed in the instance's scope and receives one argument - the array passed to _load_nodes\n\t\t */\n\t\t_load_nodes : function (nodes, callback, is_callback, force_reload) {\n\t\t\tvar r = true,\n\t\t\t\tc = function () { this._load_nodes(nodes, callback, true); },\n\t\t\t\tm = this._model.data, i, j, tmp = [];\n\t\t\tfor(i = 0, j = nodes.length; i < j; i++) {\n\t\t\t\tif(m[nodes[i]] && ( (!m[nodes[i]].state.loaded && !m[nodes[i]].state.failed) || (!is_callback && force_reload) )) {\n\t\t\t\t\tif(!this.is_loading(nodes[i])) {\n\t\t\t\t\t\tthis.load_node(nodes[i], c);\n\t\t\t\t\t}\n\t\t\t\t\tr = false;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(r) {\n\t\t\t\tfor(i = 0, j = nodes.length; i < j; i++) {\n\t\t\t\t\tif(m[nodes[i]] && m[nodes[i]].state.loaded) {\n\t\t\t\t\t\ttmp.push(nodes[i]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(callback && !callback.done) {\n\t\t\t\t\tcallback.call(this, tmp);\n\t\t\t\t\tcallback.done = true;\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t/**\n\t\t * loads all unloaded nodes\n\t\t * @name load_all([obj, callback])\n\t\t * @param {mixed} obj the node to load recursively, omit to load all nodes in the tree\n\t\t * @param {function} callback a function to be executed once loading all the nodes is complete,\n\t\t * @trigger load_all.jstree\n\t\t */\n\t\tload_all : function (obj, callback) {\n\t\t\tif(!obj) { obj = $.jstree.root; }\n\t\t\tobj = this.get_node(obj);\n\t\t\tif(!obj) { return false; }\n\t\t\tvar to_load = [],\n\t\t\t\tm = this._model.data,\n\t\t\t\tc = m[obj.id].children_d,\n\t\t\t\ti, j;\n\t\t\tif(obj.state && !obj.state.loaded) {\n\t\t\t\tto_load.push(obj.id);\n\t\t\t}\n\t\t\tfor(i = 0, j = c.length; i < j; i++) {\n\t\t\t\tif(m[c[i]] && m[c[i]].state && !m[c[i]].state.loaded) {\n\t\t\t\t\tto_load.push(c[i]);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(to_load.length) {\n\t\t\t\tthis._load_nodes(to_load, function () {\n\t\t\t\t\tthis.load_all(obj, callback);\n\t\t\t\t});\n\t\t\t}\n\t\t\telse {\n\t\t\t\t/**\n\t\t\t\t * triggered after a load_all call completes\n\t\t\t\t * @event\n\t\t\t\t * @name load_all.jstree\n\t\t\t\t * @param {Object} node the recursively loaded node\n\t\t\t\t */\n\t\t\t\tif(callback) { callback.call(this, obj); }\n\t\t\t\tthis.trigger('load_all', { \"node\" : obj });\n\t\t\t}\n\t\t},\n\t\t/**\n\t\t * handles the actual loading of a node. Used only internally.\n\t\t * @private\n\t\t * @name _load_node(obj [, callback])\n\t\t * @param  {mixed} obj\n\t\t * @param  {function} callback a function to be executed once loading is complete, the function is executed in the instance's scope and receives one argument - a boolean status\n\t\t * @return {Boolean}\n\t\t */\n\t\t_load_node : function (obj, callback) {\n\t\t\tvar s = this.settings.core.data, t;\n\t\t\tvar notTextOrCommentNode = function notTextOrCommentNode () {\n\t\t\t\treturn this.nodeType !== 3 && this.nodeType !== 8;\n\t\t\t};\n\t\t\t// use original HTML\n\t\t\tif(!s) {\n\t\t\t\tif(obj.id === $.jstree.root) {\n\t\t\t\t\treturn this._append_html_data(obj, this._data.core.original_container_html.clone(true), function (status) {\n\t\t\t\t\t\tcallback.call(this, status);\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\treturn callback.call(this, false);\n\t\t\t\t}\n\t\t\t\t// return callback.call(this, obj.id === $.jstree.root ? this._append_html_data(obj, this._data.core.original_container_html.clone(true)) : false);\n\t\t\t}\n\t\t\tif($.isFunction(s)) {\n\t\t\t\treturn s.call(this, obj, $.proxy(function (d) {\n\t\t\t\t\tif(d === false) {\n\t\t\t\t\t\tcallback.call(this, false);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tthis[typeof d === 'string' ? '_append_html_data' : '_append_json_data'](obj, typeof d === 'string' ? $($.parseHTML(d)).filter(notTextOrCommentNode) : d, function (status) {\n\t\t\t\t\t\t\tcallback.call(this, status);\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t\t// return d === false ? callback.call(this, false) : callback.call(this, this[typeof d === 'string' ? '_append_html_data' : '_append_json_data'](obj, typeof d === 'string' ? $(d) : d));\n\t\t\t\t}, this));\n\t\t\t}\n\t\t\tif(typeof s === 'object') {\n\t\t\t\tif(s.url) {\n\t\t\t\t\ts = $.extend(true, {}, s);\n\t\t\t\t\tif($.isFunction(s.url)) {\n\t\t\t\t\t\ts.url = s.url.call(this, obj);\n\t\t\t\t\t}\n\t\t\t\t\tif($.isFunction(s.data)) {\n\t\t\t\t\t\ts.data = s.data.call(this, obj);\n\t\t\t\t\t}\n\t\t\t\t\treturn $.ajax(s)\n\t\t\t\t\t\t.done($.proxy(function (d,t,x) {\n\t\t\t\t\t\t\t\tvar type = x.getResponseHeader('Content-Type');\n\t\t\t\t\t\t\t\tif((type && type.indexOf('json') !== -1) || typeof d === \"object\") {\n\t\t\t\t\t\t\t\t\treturn this._append_json_data(obj, d, function (status) { callback.call(this, status); });\n\t\t\t\t\t\t\t\t\t//return callback.call(this, this._append_json_data(obj, d));\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif((type && type.indexOf('html') !== -1) || typeof d === \"string\") {\n\t\t\t\t\t\t\t\t\treturn this._append_html_data(obj, $($.parseHTML(d)).filter(notTextOrCommentNode), function (status) { callback.call(this, status); });\n\t\t\t\t\t\t\t\t\t// return callback.call(this, this._append_html_data(obj, $(d)));\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tthis._data.core.last_error = { 'error' : 'ajax', 'plugin' : 'core', 'id' : 'core_04', 'reason' : 'Could not load node', 'data' : JSON.stringify({ 'id' : obj.id, 'xhr' : x }) };\n\t\t\t\t\t\t\t\tthis.settings.core.error.call(this, this._data.core.last_error);\n\t\t\t\t\t\t\t\treturn callback.call(this, false);\n\t\t\t\t\t\t\t}, this))\n\t\t\t\t\t\t.fail($.proxy(function (f) {\n\t\t\t\t\t\t\t\tthis._data.core.last_error = { 'error' : 'ajax', 'plugin' : 'core', 'id' : 'core_04', 'reason' : 'Could not load node', 'data' : JSON.stringify({ 'id' : obj.id, 'xhr' : f }) };\n\t\t\t\t\t\t\t\tcallback.call(this, false);\n\t\t\t\t\t\t\t\tthis.settings.core.error.call(this, this._data.core.last_error);\n\t\t\t\t\t\t\t}, this));\n\t\t\t\t}\n\t\t\t\tif ($.isArray(s)) {\n\t\t\t\t\tt = $.extend(true, [], s);\n\t\t\t\t} else if ($.isPlainObject(s)) {\n\t\t\t\t\tt = $.extend(true, {}, s);\n\t\t\t\t} else {\n\t\t\t\t\tt = s;\n\t\t\t\t}\n\t\t\t\tif(obj.id === $.jstree.root) {\n\t\t\t\t\treturn this._append_json_data(obj, t, function (status) {\n\t\t\t\t\t\tcallback.call(this, status);\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tthis._data.core.last_error = { 'error' : 'nodata', 'plugin' : 'core', 'id' : 'core_05', 'reason' : 'Could not load node', 'data' : JSON.stringify({ 'id' : obj.id }) };\n\t\t\t\t\tthis.settings.core.error.call(this, this._data.core.last_error);\n\t\t\t\t\treturn callback.call(this, false);\n\t\t\t\t}\n\t\t\t\t//return callback.call(this, (obj.id === $.jstree.root ? this._append_json_data(obj, t) : false) );\n\t\t\t}\n\t\t\tif(typeof s === 'string') {\n\t\t\t\tif(obj.id === $.jstree.root) {\n\t\t\t\t\treturn this._append_html_data(obj, $($.parseHTML(s)).filter(notTextOrCommentNode), function (status) {\n\t\t\t\t\t\tcallback.call(this, status);\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tthis._data.core.last_error = { 'error' : 'nodata', 'plugin' : 'core', 'id' : 'core_06', 'reason' : 'Could not load node', 'data' : JSON.stringify({ 'id' : obj.id }) };\n\t\t\t\t\tthis.settings.core.error.call(this, this._data.core.last_error);\n\t\t\t\t\treturn callback.call(this, false);\n\t\t\t\t}\n\t\t\t\t//return callback.call(this, (obj.id === $.jstree.root ? this._append_html_data(obj, $(s)) : false) );\n\t\t\t}\n\t\t\treturn callback.call(this, false);\n\t\t},\n\t\t/**\n\t\t * adds a node to the list of nodes to redraw. Used only internally.\n\t\t * @private\n\t\t * @name _node_changed(obj [, callback])\n\t\t * @param  {mixed} obj\n\t\t */\n\t\t_node_changed : function (obj) {\n\t\t\tobj = this.get_node(obj);\n\t\t\tif(obj) {\n\t\t\t\tthis._model.changed.push(obj.id);\n\t\t\t}\n\t\t},\n\t\t/**\n\t\t * appends HTML content to the tree. Used internally.\n\t\t * @private\n\t\t * @name _append_html_data(obj, data)\n\t\t * @param  {mixed} obj the node to append to\n\t\t * @param  {String} data the HTML string to parse and append\n\t\t * @trigger model.jstree, changed.jstree\n\t\t */\n\t\t_append_html_data : function (dom, data, cb) {\n\t\t\tdom = this.get_node(dom);\n\t\t\tdom.children = [];\n\t\t\tdom.children_d = [];\n\t\t\tvar dat = data.is('ul') ? data.children() : data,\n\t\t\t\tpar = dom.id,\n\t\t\t\tchd = [],\n\t\t\t\tdpc = [],\n\t\t\t\tm = this._model.data,\n\t\t\t\tp = m[par],\n\t\t\t\ts = this._data.core.selected.length,\n\t\t\t\ttmp, i, j;\n\t\t\tdat.each($.proxy(function (i, v) {\n\t\t\t\ttmp = this._parse_model_from_html($(v), par, p.parents.concat());\n\t\t\t\tif(tmp) {\n\t\t\t\t\tchd.push(tmp);\n\t\t\t\t\tdpc.push(tmp);\n\t\t\t\t\tif(m[tmp].children_d.length) {\n\t\t\t\t\t\tdpc = dpc.concat(m[tmp].children_d);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}, this));\n\t\t\tp.children = chd;\n\t\t\tp.children_d = dpc;\n\t\t\tfor(i = 0, j = p.parents.length; i < j; i++) {\n\t\t\t\tm[p.parents[i]].children_d = m[p.parents[i]].children_d.concat(dpc);\n\t\t\t}\n\t\t\t/**\n\t\t\t * triggered when new data is inserted to the tree model\n\t\t\t * @event\n\t\t\t * @name model.jstree\n\t\t\t * @param {Array} nodes an array of node IDs\n\t\t\t * @param {String} parent the parent ID of the nodes\n\t\t\t */\n\t\t\tthis.trigger('model', { \"nodes\" : dpc, 'parent' : par });\n\t\t\tif(par !== $.jstree.root) {\n\t\t\t\tthis._node_changed(par);\n\t\t\t\tthis.redraw();\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthis.get_container_ul().children('.jstree-initial-node').remove();\n\t\t\t\tthis.redraw(true);\n\t\t\t}\n\t\t\tif(this._data.core.selected.length !== s) {\n\t\t\t\tthis.trigger('changed', { 'action' : 'model', 'selected' : this._data.core.selected });\n\t\t\t}\n\t\t\tcb.call(this, true);\n\t\t},\n\t\t/**\n\t\t * appends JSON content to the tree. Used internally.\n\t\t * @private\n\t\t * @name _append_json_data(obj, data)\n\t\t * @param  {mixed} obj the node to append to\n\t\t * @param  {String} data the JSON object to parse and append\n\t\t * @param  {Boolean} force_processing internal param - do not set\n\t\t * @trigger model.jstree, changed.jstree\n\t\t */\n\t\t_append_json_data : function (dom, data, cb, force_processing) {\n\t\t\tif(this.element === null) { return; }\n\t\t\tdom = this.get_node(dom);\n\t\t\tdom.children = [];\n\t\t\tdom.children_d = [];\n\t\t\t// *%$@!!!\n\t\t\tif(data.d) {\n\t\t\t\tdata = data.d;\n\t\t\t\tif(typeof data === \"string\") {\n\t\t\t\t\tdata = JSON.parse(data);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(!$.isArray(data)) { data = [data]; }\n\t\t\tvar w = null,\n\t\t\t\targs = {\n\t\t\t\t\t'df'\t: this._model.default_state,\n\t\t\t\t\t'dat'\t: data,\n\t\t\t\t\t'par'\t: dom.id,\n\t\t\t\t\t'm'\t\t: this._model.data,\n\t\t\t\t\t't_id'\t: this._id,\n\t\t\t\t\t't_cnt'\t: this._cnt,\n\t\t\t\t\t'sel'\t: this._data.core.selected\n\t\t\t\t},\n\t\t\t\tfunc = function (data, undefined) {\n\t\t\t\t\tif(data.data) { data = data.data; }\n\t\t\t\t\tvar dat = data.dat,\n\t\t\t\t\t\tpar = data.par,\n\t\t\t\t\t\tchd = [],\n\t\t\t\t\t\tdpc = [],\n\t\t\t\t\t\tadd = [],\n\t\t\t\t\t\tdf = data.df,\n\t\t\t\t\t\tt_id = data.t_id,\n\t\t\t\t\t\tt_cnt = data.t_cnt,\n\t\t\t\t\t\tm = data.m,\n\t\t\t\t\t\tp = m[par],\n\t\t\t\t\t\tsel = data.sel,\n\t\t\t\t\t\ttmp, i, j, rslt,\n\t\t\t\t\t\tparse_flat = function (d, p, ps) {\n\t\t\t\t\t\t\tif(!ps) { ps = []; }\n\t\t\t\t\t\t\telse { ps = ps.concat(); }\n\t\t\t\t\t\t\tif(p) { ps.unshift(p); }\n\t\t\t\t\t\t\tvar tid = d.id.toString(),\n\t\t\t\t\t\t\t\ti, j, c, e,\n\t\t\t\t\t\t\t\ttmp = {\n\t\t\t\t\t\t\t\t\tid\t\t\t: tid,\n\t\t\t\t\t\t\t\t\ttext\t\t: d.text || '',\n\t\t\t\t\t\t\t\t\ticon\t\t: d.icon !== undefined ? d.icon : true,\n\t\t\t\t\t\t\t\t\tparent\t\t: p,\n\t\t\t\t\t\t\t\t\tparents\t\t: ps,\n\t\t\t\t\t\t\t\t\tchildren\t: d.children || [],\n\t\t\t\t\t\t\t\t\tchildren_d\t: d.children_d || [],\n\t\t\t\t\t\t\t\t\tdata\t\t: d.data,\n\t\t\t\t\t\t\t\t\tstate\t\t: { },\n\t\t\t\t\t\t\t\t\tli_attr\t\t: { id : false },\n\t\t\t\t\t\t\t\t\ta_attr\t\t: { href : '#' },\n\t\t\t\t\t\t\t\t\toriginal\t: false\n\t\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\tfor(i in df) {\n\t\t\t\t\t\t\t\tif(df.hasOwnProperty(i)) {\n\t\t\t\t\t\t\t\t\ttmp.state[i] = df[i];\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif(d && d.data && d.data.jstree && d.data.jstree.icon) {\n\t\t\t\t\t\t\t\ttmp.icon = d.data.jstree.icon;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif(tmp.icon === undefined || tmp.icon === null || tmp.icon === \"\") {\n\t\t\t\t\t\t\t\ttmp.icon = true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif(d && d.data) {\n\t\t\t\t\t\t\t\ttmp.data = d.data;\n\t\t\t\t\t\t\t\tif(d.data.jstree) {\n\t\t\t\t\t\t\t\t\tfor(i in d.data.jstree) {\n\t\t\t\t\t\t\t\t\t\tif(d.data.jstree.hasOwnProperty(i)) {\n\t\t\t\t\t\t\t\t\t\t\ttmp.state[i] = d.data.jstree[i];\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif(d && typeof d.state === 'object') {\n\t\t\t\t\t\t\t\tfor (i in d.state) {\n\t\t\t\t\t\t\t\t\tif(d.state.hasOwnProperty(i)) {\n\t\t\t\t\t\t\t\t\t\ttmp.state[i] = d.state[i];\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif(d && typeof d.li_attr === 'object') {\n\t\t\t\t\t\t\t\tfor (i in d.li_attr) {\n\t\t\t\t\t\t\t\t\tif(d.li_attr.hasOwnProperty(i)) {\n\t\t\t\t\t\t\t\t\t\ttmp.li_attr[i] = d.li_attr[i];\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif(!tmp.li_attr.id) {\n\t\t\t\t\t\t\t\ttmp.li_attr.id = tid;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif(d && typeof d.a_attr === 'object') {\n\t\t\t\t\t\t\t\tfor (i in d.a_attr) {\n\t\t\t\t\t\t\t\t\tif(d.a_attr.hasOwnProperty(i)) {\n\t\t\t\t\t\t\t\t\t\ttmp.a_attr[i] = d.a_attr[i];\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif(d && d.children && d.children === true) {\n\t\t\t\t\t\t\t\ttmp.state.loaded = false;\n\t\t\t\t\t\t\t\ttmp.children = [];\n\t\t\t\t\t\t\t\ttmp.children_d = [];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tm[tmp.id] = tmp;\n\t\t\t\t\t\t\tfor(i = 0, j = tmp.children.length; i < j; i++) {\n\t\t\t\t\t\t\t\tc = parse_flat(m[tmp.children[i]], tmp.id, ps);\n\t\t\t\t\t\t\t\te = m[c];\n\t\t\t\t\t\t\t\ttmp.children_d.push(c);\n\t\t\t\t\t\t\t\tif(e.children_d.length) {\n\t\t\t\t\t\t\t\t\ttmp.children_d = tmp.children_d.concat(e.children_d);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tdelete d.data;\n\t\t\t\t\t\t\tdelete d.children;\n\t\t\t\t\t\t\tm[tmp.id].original = d;\n\t\t\t\t\t\t\tif(tmp.state.selected) {\n\t\t\t\t\t\t\t\tadd.push(tmp.id);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\treturn tmp.id;\n\t\t\t\t\t\t},\n\t\t\t\t\t\tparse_nest = function (d, p, ps) {\n\t\t\t\t\t\t\tif(!ps) { ps = []; }\n\t\t\t\t\t\t\telse { ps = ps.concat(); }\n\t\t\t\t\t\t\tif(p) { ps.unshift(p); }\n\t\t\t\t\t\t\tvar tid = false, i, j, c, e, tmp;\n\t\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\t\ttid = 'j' + t_id + '_' + (++t_cnt);\n\t\t\t\t\t\t\t} while(m[tid]);\n\n\t\t\t\t\t\t\ttmp = {\n\t\t\t\t\t\t\t\tid\t\t\t: false,\n\t\t\t\t\t\t\t\ttext\t\t: typeof d === 'string' ? d : '',\n\t\t\t\t\t\t\t\ticon\t\t: typeof d === 'object' && d.icon !== undefined ? d.icon : true,\n\t\t\t\t\t\t\t\tparent\t\t: p,\n\t\t\t\t\t\t\t\tparents\t\t: ps,\n\t\t\t\t\t\t\t\tchildren\t: [],\n\t\t\t\t\t\t\t\tchildren_d\t: [],\n\t\t\t\t\t\t\t\tdata\t\t: null,\n\t\t\t\t\t\t\t\tstate\t\t: { },\n\t\t\t\t\t\t\t\tli_attr\t\t: { id : false },\n\t\t\t\t\t\t\t\ta_attr\t\t: { href : '#' },\n\t\t\t\t\t\t\t\toriginal\t: false\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\tfor(i in df) {\n\t\t\t\t\t\t\t\tif(df.hasOwnProperty(i)) {\n\t\t\t\t\t\t\t\t\ttmp.state[i] = df[i];\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif(d && d.id) { tmp.id = d.id.toString(); }\n\t\t\t\t\t\t\tif(d && d.text) { tmp.text = d.text; }\n\t\t\t\t\t\t\tif(d && d.data && d.data.jstree && d.data.jstree.icon) {\n\t\t\t\t\t\t\t\ttmp.icon = d.data.jstree.icon;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif(tmp.icon === undefined || tmp.icon === null || tmp.icon === \"\") {\n\t\t\t\t\t\t\t\ttmp.icon = true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif(d && d.data) {\n\t\t\t\t\t\t\t\ttmp.data = d.data;\n\t\t\t\t\t\t\t\tif(d.data.jstree) {\n\t\t\t\t\t\t\t\t\tfor(i in d.data.jstree) {\n\t\t\t\t\t\t\t\t\t\tif(d.data.jstree.hasOwnProperty(i)) {\n\t\t\t\t\t\t\t\t\t\t\ttmp.state[i] = d.data.jstree[i];\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif(d && typeof d.state === 'object') {\n\t\t\t\t\t\t\t\tfor (i in d.state) {\n\t\t\t\t\t\t\t\t\tif(d.state.hasOwnProperty(i)) {\n\t\t\t\t\t\t\t\t\t\ttmp.state[i] = d.state[i];\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif(d && typeof d.li_attr === 'object') {\n\t\t\t\t\t\t\t\tfor (i in d.li_attr) {\n\t\t\t\t\t\t\t\t\tif(d.li_attr.hasOwnProperty(i)) {\n\t\t\t\t\t\t\t\t\t\ttmp.li_attr[i] = d.li_attr[i];\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif(tmp.li_attr.id && !tmp.id) {\n\t\t\t\t\t\t\t\ttmp.id = tmp.li_attr.id.toString();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif(!tmp.id) {\n\t\t\t\t\t\t\t\ttmp.id = tid;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif(!tmp.li_attr.id) {\n\t\t\t\t\t\t\t\ttmp.li_attr.id = tmp.id;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif(d && typeof d.a_attr === 'object') {\n\t\t\t\t\t\t\t\tfor (i in d.a_attr) {\n\t\t\t\t\t\t\t\t\tif(d.a_attr.hasOwnProperty(i)) {\n\t\t\t\t\t\t\t\t\t\ttmp.a_attr[i] = d.a_attr[i];\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif(d && d.children && d.children.length) {\n\t\t\t\t\t\t\t\tfor(i = 0, j = d.children.length; i < j; i++) {\n\t\t\t\t\t\t\t\t\tc = parse_nest(d.children[i], tmp.id, ps);\n\t\t\t\t\t\t\t\t\te = m[c];\n\t\t\t\t\t\t\t\t\ttmp.children.push(c);\n\t\t\t\t\t\t\t\t\tif(e.children_d.length) {\n\t\t\t\t\t\t\t\t\t\ttmp.children_d = tmp.children_d.concat(e.children_d);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\ttmp.children_d = tmp.children_d.concat(tmp.children);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif(d && d.children && d.children === true) {\n\t\t\t\t\t\t\t\ttmp.state.loaded = false;\n\t\t\t\t\t\t\t\ttmp.children = [];\n\t\t\t\t\t\t\t\ttmp.children_d = [];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tdelete d.data;\n\t\t\t\t\t\t\tdelete d.children;\n\t\t\t\t\t\t\ttmp.original = d;\n\t\t\t\t\t\t\tm[tmp.id] = tmp;\n\t\t\t\t\t\t\tif(tmp.state.selected) {\n\t\t\t\t\t\t\t\tadd.push(tmp.id);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\treturn tmp.id;\n\t\t\t\t\t\t};\n\n\t\t\t\t\tif(dat.length && dat[0].id !== undefined && dat[0].parent !== undefined) {\n\t\t\t\t\t\t// Flat JSON support (for easy import from DB):\n\t\t\t\t\t\t// 1) convert to object (foreach)\n\t\t\t\t\t\tfor(i = 0, j = dat.length; i < j; i++) {\n\t\t\t\t\t\t\tif(!dat[i].children) {\n\t\t\t\t\t\t\t\tdat[i].children = [];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tm[dat[i].id.toString()] = dat[i];\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// 2) populate children (foreach)\n\t\t\t\t\t\tfor(i = 0, j = dat.length; i < j; i++) {\n\t\t\t\t\t\t\tm[dat[i].parent.toString()].children.push(dat[i].id.toString());\n\t\t\t\t\t\t\t// populate parent.children_d\n\t\t\t\t\t\t\tp.children_d.push(dat[i].id.toString());\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// 3) normalize && populate parents and children_d with recursion\n\t\t\t\t\t\tfor(i = 0, j = p.children.length; i < j; i++) {\n\t\t\t\t\t\t\ttmp = parse_flat(m[p.children[i]], par, p.parents.concat());\n\t\t\t\t\t\t\tdpc.push(tmp);\n\t\t\t\t\t\t\tif(m[tmp].children_d.length) {\n\t\t\t\t\t\t\t\tdpc = dpc.concat(m[tmp].children_d);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfor(i = 0, j = p.parents.length; i < j; i++) {\n\t\t\t\t\t\t\tm[p.parents[i]].children_d = m[p.parents[i]].children_d.concat(dpc);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// ?) three_state selection - p.state.selected && t - (if three_state foreach(dat => ch) -> foreach(parents) if(parent.selected) child.selected = true;\n\t\t\t\t\t\trslt = {\n\t\t\t\t\t\t\t'cnt' : t_cnt,\n\t\t\t\t\t\t\t'mod' : m,\n\t\t\t\t\t\t\t'sel' : sel,\n\t\t\t\t\t\t\t'par' : par,\n\t\t\t\t\t\t\t'dpc' : dpc,\n\t\t\t\t\t\t\t'add' : add\n\t\t\t\t\t\t};\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tfor(i = 0, j = dat.length; i < j; i++) {\n\t\t\t\t\t\t\ttmp = parse_nest(dat[i], par, p.parents.concat());\n\t\t\t\t\t\t\tif(tmp) {\n\t\t\t\t\t\t\t\tchd.push(tmp);\n\t\t\t\t\t\t\t\tdpc.push(tmp);\n\t\t\t\t\t\t\t\tif(m[tmp].children_d.length) {\n\t\t\t\t\t\t\t\t\tdpc = dpc.concat(m[tmp].children_d);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tp.children = chd;\n\t\t\t\t\t\tp.children_d = dpc;\n\t\t\t\t\t\tfor(i = 0, j = p.parents.length; i < j; i++) {\n\t\t\t\t\t\t\tm[p.parents[i]].children_d = m[p.parents[i]].children_d.concat(dpc);\n\t\t\t\t\t\t}\n\t\t\t\t\t\trslt = {\n\t\t\t\t\t\t\t'cnt' : t_cnt,\n\t\t\t\t\t\t\t'mod' : m,\n\t\t\t\t\t\t\t'sel' : sel,\n\t\t\t\t\t\t\t'par' : par,\n\t\t\t\t\t\t\t'dpc' : dpc,\n\t\t\t\t\t\t\t'add' : add\n\t\t\t\t\t\t};\n\t\t\t\t\t}\n\t\t\t\t\tif(typeof window === 'undefined' || typeof window.document === 'undefined') {\n\t\t\t\t\t\tpostMessage(rslt);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\treturn rslt;\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\trslt = function (rslt, worker) {\n\t\t\t\t\tif(this.element === null) { return; }\n\t\t\t\t\tthis._cnt = rslt.cnt;\n\t\t\t\t\tvar i, m = this._model.data;\n\t\t\t\t\tfor (i in m) {\n\t\t\t\t\t\tif (m.hasOwnProperty(i) && m[i].state && m[i].state.loading && rslt.mod[i]) {\n\t\t\t\t\t\t\trslt.mod[i].state.loading = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tthis._model.data = rslt.mod; // breaks the reference in load_node - careful\n\n\t\t\t\t\tif(worker) {\n\t\t\t\t\t\tvar j, a = rslt.add, r = rslt.sel, s = this._data.core.selected.slice();\n\t\t\t\t\t\tm = this._model.data;\n\t\t\t\t\t\t// if selection was changed while calculating in worker\n\t\t\t\t\t\tif(r.length !== s.length || $.vakata.array_unique(r.concat(s)).length !== r.length) {\n\t\t\t\t\t\t\t// deselect nodes that are no longer selected\n\t\t\t\t\t\t\tfor(i = 0, j = r.length; i < j; i++) {\n\t\t\t\t\t\t\t\tif($.inArray(r[i], a) === -1 && $.inArray(r[i], s) === -1) {\n\t\t\t\t\t\t\t\t\tm[r[i]].state.selected = false;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t// select nodes that were selected in the mean time\n\t\t\t\t\t\t\tfor(i = 0, j = s.length; i < j; i++) {\n\t\t\t\t\t\t\t\tif($.inArray(s[i], r) === -1) {\n\t\t\t\t\t\t\t\t\tm[s[i]].state.selected = true;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif(rslt.add.length) {\n\t\t\t\t\t\tthis._data.core.selected = this._data.core.selected.concat(rslt.add);\n\t\t\t\t\t}\n\n\t\t\t\t\tthis.trigger('model', { \"nodes\" : rslt.dpc, 'parent' : rslt.par });\n\n\t\t\t\t\tif(rslt.par !== $.jstree.root) {\n\t\t\t\t\t\tthis._node_changed(rslt.par);\n\t\t\t\t\t\tthis.redraw();\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\t// this.get_container_ul().children('.jstree-initial-node').remove();\n\t\t\t\t\t\tthis.redraw(true);\n\t\t\t\t\t}\n\t\t\t\t\tif(rslt.add.length) {\n\t\t\t\t\t\tthis.trigger('changed', { 'action' : 'model', 'selected' : this._data.core.selected });\n\t\t\t\t\t}\n\t\t\t\t\tcb.call(this, true);\n\t\t\t\t};\n\t\t\tif(this.settings.core.worker && window.Blob && window.URL && window.Worker) {\n\t\t\t\ttry {\n\t\t\t\t\tif(this._wrk === null) {\n\t\t\t\t\t\tthis._wrk = window.URL.createObjectURL(\n\t\t\t\t\t\t\tnew window.Blob(\n\t\t\t\t\t\t\t\t['self.onmessage = ' + func.toString()],\n\t\t\t\t\t\t\t\t{type:\"text/javascript\"}\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t\tif(!this._data.core.working || force_processing) {\n\t\t\t\t\t\tthis._data.core.working = true;\n\t\t\t\t\t\tw = new window.Worker(this._wrk);\n\t\t\t\t\t\tw.onmessage = $.proxy(function (e) {\n\t\t\t\t\t\t\trslt.call(this, e.data, true);\n\t\t\t\t\t\t\ttry { w.terminate(); w = null; } catch(ignore) { }\n\t\t\t\t\t\t\tif(this._data.core.worker_queue.length) {\n\t\t\t\t\t\t\t\tthis._append_json_data.apply(this, this._data.core.worker_queue.shift());\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\tthis._data.core.working = false;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}, this);\n\t\t\t\t\t\tif(!args.par) {\n\t\t\t\t\t\t\tif(this._data.core.worker_queue.length) {\n\t\t\t\t\t\t\t\tthis._append_json_data.apply(this, this._data.core.worker_queue.shift());\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\tthis._data.core.working = false;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tw.postMessage(args);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tthis._data.core.worker_queue.push([dom, data, cb, true]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcatch(e) {\n\t\t\t\t\trslt.call(this, func(args), false);\n\t\t\t\t\tif(this._data.core.worker_queue.length) {\n\t\t\t\t\t\tthis._append_json_data.apply(this, this._data.core.worker_queue.shift());\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tthis._data.core.working = false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\trslt.call(this, func(args), false);\n\t\t\t}\n\t\t},\n\t\t/**\n\t\t * parses a node from a jQuery object and appends them to the in memory tree model. Used internally.\n\t\t * @private\n\t\t * @name _parse_model_from_html(d [, p, ps])\n\t\t * @param  {jQuery} d the jQuery object to parse\n\t\t * @param  {String} p the parent ID\n\t\t * @param  {Array} ps list of all parents\n\t\t * @return {String} the ID of the object added to the model\n\t\t */\n\t\t_parse_model_from_html : function (d, p, ps) {\n\t\t\tif(!ps) { ps = []; }\n\t\t\telse { ps = [].concat(ps); }\n\t\t\tif(p) { ps.unshift(p); }\n\t\t\tvar c, e, m = this._model.data,\n\t\t\t\tdata = {\n\t\t\t\t\tid\t\t\t: false,\n\t\t\t\t\ttext\t\t: false,\n\t\t\t\t\ticon\t\t: true,\n\t\t\t\t\tparent\t\t: p,\n\t\t\t\t\tparents\t\t: ps,\n\t\t\t\t\tchildren\t: [],\n\t\t\t\t\tchildren_d\t: [],\n\t\t\t\t\tdata\t\t: null,\n\t\t\t\t\tstate\t\t: { },\n\t\t\t\t\tli_attr\t\t: { id : false },\n\t\t\t\t\ta_attr\t\t: { href : '#' },\n\t\t\t\t\toriginal\t: false\n\t\t\t\t}, i, tmp, tid;\n\t\t\tfor(i in this._model.default_state) {\n\t\t\t\tif(this._model.default_state.hasOwnProperty(i)) {\n\t\t\t\t\tdata.state[i] = this._model.default_state[i];\n\t\t\t\t}\n\t\t\t}\n\t\t\ttmp = $.vakata.attributes(d, true);\n\t\t\t$.each(tmp, function (i, v) {\n\t\t\t\tv = $.trim(v);\n\t\t\t\tif(!v.length) { return true; }\n\t\t\t\tdata.li_attr[i] = v;\n\t\t\t\tif(i === 'id') {\n\t\t\t\t\tdata.id = v.toString();\n\t\t\t\t}\n\t\t\t});\n\t\t\ttmp = d.children('a').first();\n\t\t\tif(tmp.length) {\n\t\t\t\ttmp = $.vakata.attributes(tmp, true);\n\t\t\t\t$.each(tmp, function (i, v) {\n\t\t\t\t\tv = $.trim(v);\n\t\t\t\t\tif(v.length) {\n\t\t\t\t\t\tdata.a_attr[i] = v;\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t\ttmp = d.children(\"a\").first().length ? d.children(\"a\").first().clone() : d.clone();\n\t\t\ttmp.children(\"ins, i, ul\").remove();\n\t\t\ttmp = tmp.html();\n\t\t\ttmp = $('<div />').html(tmp);\n\t\t\tdata.text = this.settings.core.force_text ? tmp.text() : tmp.html();\n\t\t\ttmp = d.data();\n\t\t\tdata.data = tmp ? $.extend(true, {}, tmp) : null;\n\t\t\tdata.state.opened = d.hasClass('jstree-open');\n\t\t\tdata.state.selected = d.children('a').hasClass('jstree-clicked');\n\t\t\tdata.state.disabled = d.children('a').hasClass('jstree-disabled');\n\t\t\tif(data.data && data.data.jstree) {\n\t\t\t\tfor(i in data.data.jstree) {\n\t\t\t\t\tif(data.data.jstree.hasOwnProperty(i)) {\n\t\t\t\t\t\tdata.state[i] = data.data.jstree[i];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\ttmp = d.children(\"a\").children(\".jstree-themeicon\");\n\t\t\tif(tmp.length) {\n\t\t\t\tdata.icon = tmp.hasClass('jstree-themeicon-hidden') ? false : tmp.attr('rel');\n\t\t\t}\n\t\t\tif(data.state.icon !== undefined) {\n\t\t\t\tdata.icon = data.state.icon;\n\t\t\t}\n\t\t\tif(data.icon === undefined || data.icon === null || data.icon === \"\") {\n\t\t\t\tdata.icon = true;\n\t\t\t}\n\t\t\ttmp = d.children(\"ul\").children(\"li\");\n\t\t\tdo {\n\t\t\t\ttid = 'j' + this._id + '_' + (++this._cnt);\n\t\t\t} while(m[tid]);\n\t\t\tdata.id = data.li_attr.id ? data.li_attr.id.toString() : tid;\n\t\t\tif(tmp.length) {\n\t\t\t\ttmp.each($.proxy(function (i, v) {\n\t\t\t\t\tc = this._parse_model_from_html($(v), data.id, ps);\n\t\t\t\t\te = this._model.data[c];\n\t\t\t\t\tdata.children.push(c);\n\t\t\t\t\tif(e.children_d.length) {\n\t\t\t\t\t\tdata.children_d = data.children_d.concat(e.children_d);\n\t\t\t\t\t}\n\t\t\t\t}, this));\n\t\t\t\tdata.children_d = data.children_d.concat(data.children);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif(d.hasClass('jstree-closed')) {\n\t\t\t\t\tdata.state.loaded = false;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(data.li_attr['class']) {\n\t\t\t\tdata.li_attr['class'] = data.li_attr['class'].replace('jstree-closed','').replace('jstree-open','');\n\t\t\t}\n\t\t\tif(data.a_attr['class']) {\n\t\t\t\tdata.a_attr['class'] = data.a_attr['class'].replace('jstree-clicked','').replace('jstree-disabled','');\n\t\t\t}\n\t\t\tm[data.id] = data;\n\t\t\tif(data.state.selected) {\n\t\t\t\tthis._data.core.selected.push(data.id);\n\t\t\t}\n\t\t\treturn data.id;\n\t\t},\n\t\t/**\n\t\t * parses a node from a JSON object (used when dealing with flat data, which has no nesting of children, but has id and parent properties) and appends it to the in memory tree model. Used internally.\n\t\t * @private\n\t\t * @name _parse_model_from_flat_json(d [, p, ps])\n\t\t * @param  {Object} d the JSON object to parse\n\t\t * @param  {String} p the parent ID\n\t\t * @param  {Array} ps list of all parents\n\t\t * @return {String} the ID of the object added to the model\n\t\t */\n\t\t_parse_model_from_flat_json : function (d, p, ps) {\n\t\t\tif(!ps) { ps = []; }\n\t\t\telse { ps = ps.concat(); }\n\t\t\tif(p) { ps.unshift(p); }\n\t\t\tvar tid = d.id.toString(),\n\t\t\t\tm = this._model.data,\n\t\t\t\tdf = this._model.default_state,\n\t\t\t\ti, j, c, e,\n\t\t\t\ttmp = {\n\t\t\t\t\tid\t\t\t: tid,\n\t\t\t\t\ttext\t\t: d.text || '',\n\t\t\t\t\ticon\t\t: d.icon !== undefined ? d.icon : true,\n\t\t\t\t\tparent\t\t: p,\n\t\t\t\t\tparents\t\t: ps,\n\t\t\t\t\tchildren\t: d.children || [],\n\t\t\t\t\tchildren_d\t: d.children_d || [],\n\t\t\t\t\tdata\t\t: d.data,\n\t\t\t\t\tstate\t\t: { },\n\t\t\t\t\tli_attr\t\t: { id : false },\n\t\t\t\t\ta_attr\t\t: { href : '#' },\n\t\t\t\t\toriginal\t: false\n\t\t\t\t};\n\t\t\tfor(i in df) {\n\t\t\t\tif(df.hasOwnProperty(i)) {\n\t\t\t\t\ttmp.state[i] = df[i];\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(d && d.data && d.data.jstree && d.data.jstree.icon) {\n\t\t\t\ttmp.icon = d.data.jstree.icon;\n\t\t\t}\n\t\t\tif(tmp.icon === undefined || tmp.icon === null || tmp.icon === \"\") {\n\t\t\t\ttmp.icon = true;\n\t\t\t}\n\t\t\tif(d && d.data) {\n\t\t\t\ttmp.data = d.data;\n\t\t\t\tif(d.data.jstree) {\n\t\t\t\t\tfor(i in d.data.jstree) {\n\t\t\t\t\t\tif(d.data.jstree.hasOwnProperty(i)) {\n\t\t\t\t\t\t\ttmp.state[i] = d.data.jstree[i];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(d && typeof d.state === 'object') {\n\t\t\t\tfor (i in d.state) {\n\t\t\t\t\tif(d.state.hasOwnProperty(i)) {\n\t\t\t\t\t\ttmp.state[i] = d.state[i];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(d && typeof d.li_attr === 'object') {\n\t\t\t\tfor (i in d.li_attr) {\n\t\t\t\t\tif(d.li_attr.hasOwnProperty(i)) {\n\t\t\t\t\t\ttmp.li_attr[i] = d.li_attr[i];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(!tmp.li_attr.id) {\n\t\t\t\ttmp.li_attr.id = tid;\n\t\t\t}\n\t\t\tif(d && typeof d.a_attr === 'object') {\n\t\t\t\tfor (i in d.a_attr) {\n\t\t\t\t\tif(d.a_attr.hasOwnProperty(i)) {\n\t\t\t\t\t\ttmp.a_attr[i] = d.a_attr[i];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(d && d.children && d.children === true) {\n\t\t\t\ttmp.state.loaded = false;\n\t\t\t\ttmp.children = [];\n\t\t\t\ttmp.children_d = [];\n\t\t\t}\n\t\t\tm[tmp.id] = tmp;\n\t\t\tfor(i = 0, j = tmp.children.length; i < j; i++) {\n\t\t\t\tc = this._parse_model_from_flat_json(m[tmp.children[i]], tmp.id, ps);\n\t\t\t\te = m[c];\n\t\t\t\ttmp.children_d.push(c);\n\t\t\t\tif(e.children_d.length) {\n\t\t\t\t\ttmp.children_d = tmp.children_d.concat(e.children_d);\n\t\t\t\t}\n\t\t\t}\n\t\t\tdelete d.data;\n\t\t\tdelete d.children;\n\t\t\tm[tmp.id].original = d;\n\t\t\tif(tmp.state.selected) {\n\t\t\t\tthis._data.core.selected.push(tmp.id);\n\t\t\t}\n\t\t\treturn tmp.id;\n\t\t},\n\t\t/**\n\t\t * parses a node from a JSON object and appends it to the in memory tree model. Used internally.\n\t\t * @private\n\t\t * @name _parse_model_from_json(d [, p, ps])\n\t\t * @param  {Object} d the JSON object to parse\n\t\t * @param  {String} p the parent ID\n\t\t * @param  {Array} ps list of all parents\n\t\t * @return {String} the ID of the object added to the model\n\t\t */\n\t\t_parse_model_from_json : function (d, p, ps) {\n\t\t\tif(!ps) { ps = []; }\n\t\t\telse { ps = ps.concat(); }\n\t\t\tif(p) { ps.unshift(p); }\n\t\t\tvar tid = false, i, j, c, e, m = this._model.data, df = this._model.default_state, tmp;\n\t\t\tdo {\n\t\t\t\ttid = 'j' + this._id + '_' + (++this._cnt);\n\t\t\t} while(m[tid]);\n\n\t\t\ttmp = {\n\t\t\t\tid\t\t\t: false,\n\t\t\t\ttext\t\t: typeof d === 'string' ? d : '',\n\t\t\t\ticon\t\t: typeof d === 'object' && d.icon !== undefined ? d.icon : true,\n\t\t\t\tparent\t\t: p,\n\t\t\t\tparents\t\t: ps,\n\t\t\t\tchildren\t: [],\n\t\t\t\tchildren_d\t: [],\n\t\t\t\tdata\t\t: null,\n\t\t\t\tstate\t\t: { },\n\t\t\t\tli_attr\t\t: { id : false },\n\t\t\t\ta_attr\t\t: { href : '#' },\n\t\t\t\toriginal\t: false\n\t\t\t};\n\t\t\tfor(i in df) {\n\t\t\t\tif(df.hasOwnProperty(i)) {\n\t\t\t\t\ttmp.state[i] = df[i];\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(d && d.id) { tmp.id = d.id.toString(); }\n\t\t\tif(d && d.text) { tmp.text = d.text; }\n\t\t\tif(d && d.data && d.data.jstree && d.data.jstree.icon) {\n\t\t\t\ttmp.icon = d.data.jstree.icon;\n\t\t\t}\n\t\t\tif(tmp.icon === undefined || tmp.icon === null || tmp.icon === \"\") {\n\t\t\t\ttmp.icon = true;\n\t\t\t}\n\t\t\tif(d && d.data) {\n\t\t\t\ttmp.data = d.data;\n\t\t\t\tif(d.data.jstree) {\n\t\t\t\t\tfor(i in d.data.jstree) {\n\t\t\t\t\t\tif(d.data.jstree.hasOwnProperty(i)) {\n\t\t\t\t\t\t\ttmp.state[i] = d.data.jstree[i];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(d && typeof d.state === 'object') {\n\t\t\t\tfor (i in d.state) {\n\t\t\t\t\tif(d.state.hasOwnProperty(i)) {\n\t\t\t\t\t\ttmp.state[i] = d.state[i];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(d && typeof d.li_attr === 'object') {\n\t\t\t\tfor (i in d.li_attr) {\n\t\t\t\t\tif(d.li_attr.hasOwnProperty(i)) {\n\t\t\t\t\t\ttmp.li_attr[i] = d.li_attr[i];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(tmp.li_attr.id && !tmp.id) {\n\t\t\t\ttmp.id = tmp.li_attr.id.toString();\n\t\t\t}\n\t\t\tif(!tmp.id) {\n\t\t\t\ttmp.id = tid;\n\t\t\t}\n\t\t\tif(!tmp.li_attr.id) {\n\t\t\t\ttmp.li_attr.id = tmp.id;\n\t\t\t}\n\t\t\tif(d && typeof d.a_attr === 'object') {\n\t\t\t\tfor (i in d.a_attr) {\n\t\t\t\t\tif(d.a_attr.hasOwnProperty(i)) {\n\t\t\t\t\t\ttmp.a_attr[i] = d.a_attr[i];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(d && d.children && d.children.length) {\n\t\t\t\tfor(i = 0, j = d.children.length; i < j; i++) {\n\t\t\t\t\tc = this._parse_model_from_json(d.children[i], tmp.id, ps);\n\t\t\t\t\te = m[c];\n\t\t\t\t\ttmp.children.push(c);\n\t\t\t\t\tif(e.children_d.length) {\n\t\t\t\t\t\ttmp.children_d = tmp.children_d.concat(e.children_d);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\ttmp.children_d = tmp.children_d.concat(tmp.children);\n\t\t\t}\n\t\t\tif(d && d.children && d.children === true) {\n\t\t\t\ttmp.state.loaded = false;\n\t\t\t\ttmp.children = [];\n\t\t\t\ttmp.children_d = [];\n\t\t\t}\n\t\t\tdelete d.data;\n\t\t\tdelete d.children;\n\t\t\ttmp.original = d;\n\t\t\tm[tmp.id] = tmp;\n\t\t\tif(tmp.state.selected) {\n\t\t\t\tthis._data.core.selected.push(tmp.id);\n\t\t\t}\n\t\t\treturn tmp.id;\n\t\t},\n\t\t/**\n\t\t * redraws all nodes that need to be redrawn. Used internally.\n\t\t * @private\n\t\t * @name _redraw()\n\t\t * @trigger redraw.jstree\n\t\t */\n\t\t_redraw : function () {\n\t\t\tvar nodes = this._model.force_full_redraw ? this._model.data[$.jstree.root].children.concat([]) : this._model.changed.concat([]),\n\t\t\t\tf = document.createElement('UL'), tmp, i, j, fe = this._data.core.focused;\n\t\t\tfor(i = 0, j = nodes.length; i < j; i++) {\n\t\t\t\ttmp = this.redraw_node(nodes[i], true, this._model.force_full_redraw);\n\t\t\t\tif(tmp && this._model.force_full_redraw) {\n\t\t\t\t\tf.appendChild(tmp);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(this._model.force_full_redraw) {\n\t\t\t\tf.className = this.get_container_ul()[0].className;\n\t\t\t\tf.setAttribute('role','group');\n\t\t\t\tthis.element.empty().append(f);\n\t\t\t\t//this.get_container_ul()[0].appendChild(f);\n\t\t\t}\n\t\t\tif(fe !== null) {\n\t\t\t\ttmp = this.get_node(fe, true);\n\t\t\t\tif(tmp && tmp.length && tmp.children('.jstree-anchor')[0] !== document.activeElement) {\n\t\t\t\t\ttmp.children('.jstree-anchor').focus();\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tthis._data.core.focused = null;\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis._model.force_full_redraw = false;\n\t\t\tthis._model.changed = [];\n\t\t\t/**\n\t\t\t * triggered after nodes are redrawn\n\t\t\t * @event\n\t\t\t * @name redraw.jstree\n\t\t\t * @param {array} nodes the redrawn nodes\n\t\t\t */\n\t\t\tthis.trigger('redraw', { \"nodes\" : nodes });\n\t\t},\n\t\t/**\n\t\t * redraws all nodes that need to be redrawn or optionally - the whole tree\n\t\t * @name redraw([full])\n\t\t * @param {Boolean} full if set to `true` all nodes are redrawn.\n\t\t */\n\t\tredraw : function (full) {\n\t\t\tif(full) {\n\t\t\t\tthis._model.force_full_redraw = true;\n\t\t\t}\n\t\t\t//if(this._model.redraw_timeout) {\n\t\t\t//\tclearTimeout(this._model.redraw_timeout);\n\t\t\t//}\n\t\t\t//this._model.redraw_timeout = setTimeout($.proxy(this._redraw, this),0);\n\t\t\tthis._redraw();\n\t\t},\n\t\t/**\n\t\t * redraws a single node's children. Used internally.\n\t\t * @private\n\t\t * @name draw_children(node)\n\t\t * @param {mixed} node the node whose children will be redrawn\n\t\t */\n\t\tdraw_children : function (node) {\n\t\t\tvar obj = this.get_node(node),\n\t\t\t\ti = false,\n\t\t\t\tj = false,\n\t\t\t\tk = false,\n\t\t\t\td = document;\n\t\t\tif(!obj) { return false; }\n\t\t\tif(obj.id === $.jstree.root) { return this.redraw(true); }\n\t\t\tnode = this.get_node(node, true);\n\t\t\tif(!node || !node.length) { return false; } // TODO: quick toggle\n\n\t\t\tnode.children('.jstree-children').remove();\n\t\t\tnode = node[0];\n\t\t\tif(obj.children.length && obj.state.loaded) {\n\t\t\t\tk = d.createElement('UL');\n\t\t\t\tk.setAttribute('role', 'group');\n\t\t\t\tk.className = 'jstree-children';\n\t\t\t\tfor(i = 0, j = obj.children.length; i < j; i++) {\n\t\t\t\t\tk.appendChild(this.redraw_node(obj.children[i], true, true));\n\t\t\t\t}\n\t\t\t\tnode.appendChild(k);\n\t\t\t}\n\t\t},\n\t\t/**\n\t\t * redraws a single node. Used internally.\n\t\t * @private\n\t\t * @name redraw_node(node, deep, is_callback, force_render)\n\t\t * @param {mixed} node the node to redraw\n\t\t * @param {Boolean} deep should child nodes be redrawn too\n\t\t * @param {Boolean} is_callback is this a recursion call\n\t\t * @param {Boolean} force_render should children of closed parents be drawn anyway\n\t\t */\n\t\tredraw_node : function (node, deep, is_callback, force_render) {\n\t\t\tvar obj = this.get_node(node),\n\t\t\t\tpar = false,\n\t\t\t\tind = false,\n\t\t\t\told = false,\n\t\t\t\ti = false,\n\t\t\t\tj = false,\n\t\t\t\tk = false,\n\t\t\t\tc = '',\n\t\t\t\td = document,\n\t\t\t\tm = this._model.data,\n\t\t\t\tf = false,\n\t\t\t\ts = false,\n\t\t\t\ttmp = null,\n\t\t\t\tt = 0,\n\t\t\t\tl = 0,\n\t\t\t\thas_children = false,\n\t\t\t\tlast_sibling = false;\n\t\t\tif(!obj) { return false; }\n\t\t\tif(obj.id === $.jstree.root) {  return this.redraw(true); }\n\t\t\tdeep = deep || obj.children.length === 0;\n\t\t\tnode = !document.querySelector ? document.getElementById(obj.id) : this.element[0].querySelector('#' + (\"0123456789\".indexOf(obj.id[0]) !== -1 ? '\\\\3' + obj.id[0] + ' ' + obj.id.substr(1).replace($.jstree.idregex,'\\\\$&') : obj.id.replace($.jstree.idregex,'\\\\$&')) ); //, this.element);\n\t\t\tif(!node) {\n\t\t\t\tdeep = true;\n\t\t\t\t//node = d.createElement('LI');\n\t\t\t\tif(!is_callback) {\n\t\t\t\t\tpar = obj.parent !== $.jstree.root ? $('#' + obj.parent.replace($.jstree.idregex,'\\\\$&'), this.element)[0] : null;\n\t\t\t\t\tif(par !== null && (!par || !m[obj.parent].state.opened)) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t\tind = $.inArray(obj.id, par === null ? m[$.jstree.root].children : m[obj.parent].children);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tnode = $(node);\n\t\t\t\tif(!is_callback) {\n\t\t\t\t\tpar = node.parent().parent()[0];\n\t\t\t\t\tif(par === this.element[0]) {\n\t\t\t\t\t\tpar = null;\n\t\t\t\t\t}\n\t\t\t\t\tind = node.index();\n\t\t\t\t}\n\t\t\t\t// m[obj.id].data = node.data(); // use only node's data, no need to touch jquery storage\n\t\t\t\tif(!deep && obj.children.length && !node.children('.jstree-children').length) {\n\t\t\t\t\tdeep = true;\n\t\t\t\t}\n\t\t\t\tif(!deep) {\n\t\t\t\t\told = node.children('.jstree-children')[0];\n\t\t\t\t}\n\t\t\t\tf = node.children('.jstree-anchor')[0] === document.activeElement;\n\t\t\t\tnode.remove();\n\t\t\t\t//node = d.createElement('LI');\n\t\t\t\t//node = node[0];\n\t\t\t}\n\t\t\tnode = this._data.core.node.cloneNode(true);\n\t\t\t// node is DOM, deep is boolean\n\n\t\t\tc = 'jstree-node ';\n\t\t\tfor(i in obj.li_attr) {\n\t\t\t\tif(obj.li_attr.hasOwnProperty(i)) {\n\t\t\t\t\tif(i === 'id') { continue; }\n\t\t\t\t\tif(i !== 'class') {\n\t\t\t\t\t\tnode.setAttribute(i, obj.li_attr[i]);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tc += obj.li_attr[i];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(!obj.a_attr.id) {\n\t\t\t\tobj.a_attr.id = obj.id + '_anchor';\n\t\t\t}\n\t\t\tnode.setAttribute('aria-selected', !!obj.state.selected);\n\t\t\tnode.setAttribute('aria-level', obj.parents.length);\n\t\t\tnode.setAttribute('aria-labelledby', obj.a_attr.id);\n\t\t\tif(obj.state.disabled) {\n\t\t\t\tnode.setAttribute('aria-disabled', true);\n\t\t\t}\n\n\t\t\tfor(i = 0, j = obj.children.length; i < j; i++) {\n\t\t\t\tif(!m[obj.children[i]].state.hidden) {\n\t\t\t\t\thas_children = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(obj.parent !== null && m[obj.parent] && !obj.state.hidden) {\n\t\t\t\ti = $.inArray(obj.id, m[obj.parent].children);\n\t\t\t\tlast_sibling = obj.id;\n\t\t\t\tif(i !== -1) {\n\t\t\t\t\ti++;\n\t\t\t\t\tfor(j = m[obj.parent].children.length; i < j; i++) {\n\t\t\t\t\t\tif(!m[m[obj.parent].children[i]].state.hidden) {\n\t\t\t\t\t\t\tlast_sibling = m[obj.parent].children[i];\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(last_sibling !== obj.id) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif(obj.state.hidden) {\n\t\t\t\tc += ' jstree-hidden';\n\t\t\t}\n\t\t\tif(obj.state.loaded && !has_children) {\n\t\t\t\tc += ' jstree-leaf';\n\t\t\t}\n\t\t\telse {\n\t\t\t\tc += obj.state.opened && obj.state.loaded ? ' jstree-open' : ' jstree-closed';\n\t\t\t\tnode.setAttribute('aria-expanded', (obj.state.opened && obj.state.loaded) );\n\t\t\t}\n\t\t\tif(last_sibling === obj.id) {\n\t\t\t\tc += ' jstree-last';\n\t\t\t}\n\t\t\tnode.id = obj.id;\n\t\t\tnode.className = c;\n\t\t\tc = ( obj.state.selected ? ' jstree-clicked' : '') + ( obj.state.disabled ? ' jstree-disabled' : '');\n\t\t\tfor(j in obj.a_attr) {\n\t\t\t\tif(obj.a_attr.hasOwnProperty(j)) {\n\t\t\t\t\tif(j === 'href' && obj.a_attr[j] === '#') { continue; }\n\t\t\t\t\tif(j !== 'class') {\n\t\t\t\t\t\tnode.childNodes[1].setAttribute(j, obj.a_attr[j]);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tc += ' ' + obj.a_attr[j];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(c.length) {\n\t\t\t\tnode.childNodes[1].className = 'jstree-anchor ' + c;\n\t\t\t}\n\t\t\tif((obj.icon && obj.icon !== true) || obj.icon === false) {\n\t\t\t\tif(obj.icon === false) {\n\t\t\t\t\tnode.childNodes[1].childNodes[0].className += ' jstree-themeicon-hidden';\n\t\t\t\t}\n\t\t\t\telse if(obj.icon.indexOf('/') === -1 && obj.icon.indexOf('.') === -1) {\n\t\t\t\t\tnode.childNodes[1].childNodes[0].className += ' ' + obj.icon + ' jstree-themeicon-custom';\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tnode.childNodes[1].childNodes[0].style.backgroundImage = 'url(\"'+obj.icon+'\")';\n\t\t\t\t\tnode.childNodes[1].childNodes[0].style.backgroundPosition = 'center center';\n\t\t\t\t\tnode.childNodes[1].childNodes[0].style.backgroundSize = 'auto';\n\t\t\t\t\tnode.childNodes[1].childNodes[0].className += ' jstree-themeicon-custom';\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif(this.settings.core.force_text) {\n\t\t\t\tnode.childNodes[1].appendChild(d.createTextNode(obj.text));\n\t\t\t}\n\t\t\telse {\n\t\t\t\tnode.childNodes[1].innerHTML += obj.text;\n\t\t\t}\n\n\n\t\t\tif(deep && obj.children.length && (obj.state.opened || force_render) && obj.state.loaded) {\n\t\t\t\tk = d.createElement('UL');\n\t\t\t\tk.setAttribute('role', 'group');\n\t\t\t\tk.className = 'jstree-children';\n\t\t\t\tfor(i = 0, j = obj.children.length; i < j; i++) {\n\t\t\t\t\tk.appendChild(this.redraw_node(obj.children[i], deep, true));\n\t\t\t\t}\n\t\t\t\tnode.appendChild(k);\n\t\t\t}\n\t\t\tif(old) {\n\t\t\t\tnode.appendChild(old);\n\t\t\t}\n\t\t\tif(!is_callback) {\n\t\t\t\t// append back using par / ind\n\t\t\t\tif(!par) {\n\t\t\t\t\tpar = this.element[0];\n\t\t\t\t}\n\t\t\t\tfor(i = 0, j = par.childNodes.length; i < j; i++) {\n\t\t\t\t\tif(par.childNodes[i] && par.childNodes[i].className && par.childNodes[i].className.indexOf('jstree-children') !== -1) {\n\t\t\t\t\t\ttmp = par.childNodes[i];\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(!tmp) {\n\t\t\t\t\ttmp = d.createElement('UL');\n\t\t\t\t\ttmp.setAttribute('role', 'group');\n\t\t\t\t\ttmp.className = 'jstree-children';\n\t\t\t\t\tpar.appendChild(tmp);\n\t\t\t\t}\n\t\t\t\tpar = tmp;\n\n\t\t\t\tif(ind < par.childNodes.length) {\n\t\t\t\t\tpar.insertBefore(node, par.childNodes[ind]);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tpar.appendChild(node);\n\t\t\t\t}\n\t\t\t\tif(f) {\n\t\t\t\t\tt = this.element[0].scrollTop;\n\t\t\t\t\tl = this.element[0].scrollLeft;\n\t\t\t\t\tnode.childNodes[1].focus();\n\t\t\t\t\tthis.element[0].scrollTop = t;\n\t\t\t\t\tthis.element[0].scrollLeft = l;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(obj.state.opened && !obj.state.loaded) {\n\t\t\t\tobj.state.opened = false;\n\t\t\t\tsetTimeout($.proxy(function () {\n\t\t\t\t\tthis.open_node(obj.id, false, 0);\n\t\t\t\t}, this), 0);\n\t\t\t}\n\t\t\treturn node;\n\t\t},\n\t\t/**\n\t\t * opens a node, revaling its children. If the node is not loaded it will be loaded and opened once ready.\n\t\t * @name open_node(obj [, callback, animation])\n\t\t * @param {mixed} obj the node to open\n\t\t * @param {Function} callback a function to execute once the node is opened\n\t\t * @param {Number} animation the animation duration in milliseconds when opening the node (overrides the `core.animation` setting). Use `false` for no animation.\n\t\t * @trigger open_node.jstree, after_open.jstree, before_open.jstree\n\t\t */\n\t\topen_node : function (obj, callback, animation) {\n\t\t\tvar t1, t2, d, t;\n\t\t\tif($.isArray(obj)) {\n\t\t\t\tobj = obj.slice();\n\t\t\t\tfor(t1 = 0, t2 = obj.length; t1 < t2; t1++) {\n\t\t\t\t\tthis.open_node(obj[t1], callback, animation);\n\t\t\t\t}\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\tobj = this.get_node(obj);\n\t\t\tif(!obj || obj.id === $.jstree.root) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tanimation = animation === undefined ? this.settings.core.animation : animation;\n\t\t\tif(!this.is_closed(obj)) {\n\t\t\t\tif(callback) {\n\t\t\t\t\tcallback.call(this, obj, false);\n\t\t\t\t}\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tif(!this.is_loaded(obj)) {\n\t\t\t\tif(this.is_loading(obj)) {\n\t\t\t\t\treturn setTimeout($.proxy(function () {\n\t\t\t\t\t\tthis.open_node(obj, callback, animation);\n\t\t\t\t\t}, this), 500);\n\t\t\t\t}\n\t\t\t\tthis.load_node(obj, function (o, ok) {\n\t\t\t\t\treturn ok ? this.open_node(o, callback, animation) : (callback ? callback.call(this, o, false) : false);\n\t\t\t\t});\n\t\t\t}\n\t\t\telse {\n\t\t\t\td = this.get_node(obj, true);\n\t\t\t\tt = this;\n\t\t\t\tif(d.length) {\n\t\t\t\t\tif(animation && d.children(\".jstree-children\").length) {\n\t\t\t\t\t\td.children(\".jstree-children\").stop(true, true);\n\t\t\t\t\t}\n\t\t\t\t\tif(obj.children.length && !this._firstChild(d.children('.jstree-children')[0])) {\n\t\t\t\t\t\tthis.draw_children(obj);\n\t\t\t\t\t\t//d = this.get_node(obj, true);\n\t\t\t\t\t}\n\t\t\t\t\tif(!animation) {\n\t\t\t\t\t\tthis.trigger('before_open', { \"node\" : obj });\n\t\t\t\t\t\td[0].className = d[0].className.replace('jstree-closed', 'jstree-open');\n\t\t\t\t\t\td[0].setAttribute(\"aria-expanded\", true);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tthis.trigger('before_open', { \"node\" : obj });\n\t\t\t\t\t\td\n\t\t\t\t\t\t\t.children(\".jstree-children\").css(\"display\",\"none\").end()\n\t\t\t\t\t\t\t.removeClass(\"jstree-closed\").addClass(\"jstree-open\").attr(\"aria-expanded\", true)\n\t\t\t\t\t\t\t.children(\".jstree-children\").stop(true, true)\n\t\t\t\t\t\t\t\t.slideDown(animation, function () {\n\t\t\t\t\t\t\t\t\tthis.style.display = \"\";\n\t\t\t\t\t\t\t\t\tif (t.element) {\n\t\t\t\t\t\t\t\t\t\tt.trigger(\"after_open\", { \"node\" : obj });\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tobj.state.opened = true;\n\t\t\t\tif(callback) {\n\t\t\t\t\tcallback.call(this, obj, true);\n\t\t\t\t}\n\t\t\t\tif(!d.length) {\n\t\t\t\t\t/**\n\t\t\t\t\t * triggered when a node is about to be opened (if the node is supposed to be in the DOM, it will be, but it won't be visible yet)\n\t\t\t\t\t * @event\n\t\t\t\t\t * @name before_open.jstree\n\t\t\t\t\t * @param {Object} node the opened node\n\t\t\t\t\t */\n\t\t\t\t\tthis.trigger('before_open', { \"node\" : obj });\n\t\t\t\t}\n\t\t\t\t/**\n\t\t\t\t * triggered when a node is opened (if there is an animation it will not be completed yet)\n\t\t\t\t * @event\n\t\t\t\t * @name open_node.jstree\n\t\t\t\t * @param {Object} node the opened node\n\t\t\t\t */\n\t\t\t\tthis.trigger('open_node', { \"node\" : obj });\n\t\t\t\tif(!animation || !d.length) {\n\t\t\t\t\t/**\n\t\t\t\t\t * triggered when a node is opened and the animation is complete\n\t\t\t\t\t * @event\n\t\t\t\t\t * @name after_open.jstree\n\t\t\t\t\t * @param {Object} node the opened node\n\t\t\t\t\t */\n\t\t\t\t\tthis.trigger(\"after_open\", { \"node\" : obj });\n\t\t\t\t}\n\t\t\t\treturn true;\n\t\t\t}\n\t\t},\n\t\t/**\n\t\t * opens every parent of a node (node should be loaded)\n\t\t * @name _open_to(obj)\n\t\t * @param {mixed} obj the node to reveal\n\t\t * @private\n\t\t */\n\t\t_open_to : function (obj) {\n\t\t\tobj = this.get_node(obj);\n\t\t\tif(!obj || obj.id === $.jstree.root) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tvar i, j, p = obj.parents;\n\t\t\tfor(i = 0, j = p.length; i < j; i+=1) {\n\t\t\t\tif(i !== $.jstree.root) {\n\t\t\t\t\tthis.open_node(p[i], false, 0);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn $('#' + obj.id.replace($.jstree.idregex,'\\\\$&'), this.element);\n\t\t},\n\t\t/**\n\t\t * closes a node, hiding its children\n\t\t * @name close_node(obj [, animation])\n\t\t * @param {mixed} obj the node to close\n\t\t * @param {Number} animation the animation duration in milliseconds when closing the node (overrides the `core.animation` setting). Use `false` for no animation.\n\t\t * @trigger close_node.jstree, after_close.jstree\n\t\t */\n\t\tclose_node : function (obj, animation) {\n\t\t\tvar t1, t2, t, d;\n\t\t\tif($.isArray(obj)) {\n\t\t\t\tobj = obj.slice();\n\t\t\t\tfor(t1 = 0, t2 = obj.length; t1 < t2; t1++) {\n\t\t\t\t\tthis.close_node(obj[t1], animation);\n\t\t\t\t}\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\tobj = this.get_node(obj);\n\t\t\tif(!obj || obj.id === $.jstree.root) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tif(this.is_closed(obj)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tanimation = animation === undefined ? this.settings.core.animation : animation;\n\t\t\tt = this;\n\t\t\td = this.get_node(obj, true);\n\n\t\t\tobj.state.opened = false;\n\t\t\t/**\n\t\t\t * triggered when a node is closed (if there is an animation it will not be complete yet)\n\t\t\t * @event\n\t\t\t * @name close_node.jstree\n\t\t\t * @param {Object} node the closed node\n\t\t\t */\n\t\t\tthis.trigger('close_node',{ \"node\" : obj });\n\t\t\tif(!d.length) {\n\t\t\t\t/**\n\t\t\t\t * triggered when a node is closed and the animation is complete\n\t\t\t\t * @event\n\t\t\t\t * @name after_close.jstree\n\t\t\t\t * @param {Object} node the closed node\n\t\t\t\t */\n\t\t\t\tthis.trigger(\"after_close\", { \"node\" : obj });\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif(!animation) {\n\t\t\t\t\td[0].className = d[0].className.replace('jstree-open', 'jstree-closed');\n\t\t\t\t\td.attr(\"aria-expanded\", false).children('.jstree-children').remove();\n\t\t\t\t\tthis.trigger(\"after_close\", { \"node\" : obj });\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\td\n\t\t\t\t\t\t.children(\".jstree-children\").attr(\"style\",\"display:block !important\").end()\n\t\t\t\t\t\t.removeClass(\"jstree-open\").addClass(\"jstree-closed\").attr(\"aria-expanded\", false)\n\t\t\t\t\t\t.children(\".jstree-children\").stop(true, true).slideUp(animation, function () {\n\t\t\t\t\t\t\tthis.style.display = \"\";\n\t\t\t\t\t\t\td.children('.jstree-children').remove();\n\t\t\t\t\t\t\tif (t.element) {\n\t\t\t\t\t\t\t\tt.trigger(\"after_close\", { \"node\" : obj });\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t/**\n\t\t * toggles a node - closing it if it is open, opening it if it is closed\n\t\t * @name toggle_node(obj)\n\t\t * @param {mixed} obj the node to toggle\n\t\t */\n\t\ttoggle_node : function (obj) {\n\t\t\tvar t1, t2;\n\t\t\tif($.isArray(obj)) {\n\t\t\t\tobj = obj.slice();\n\t\t\t\tfor(t1 = 0, t2 = obj.length; t1 < t2; t1++) {\n\t\t\t\t\tthis.toggle_node(obj[t1]);\n\t\t\t\t}\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\tif(this.is_closed(obj)) {\n\t\t\t\treturn this.open_node(obj);\n\t\t\t}\n\t\t\tif(this.is_open(obj)) {\n\t\t\t\treturn this.close_node(obj);\n\t\t\t}\n\t\t},\n\t\t/**\n\t\t * opens all nodes within a node (or the tree), revaling their children. If the node is not loaded it will be loaded and opened once ready.\n\t\t * @name open_all([obj, animation, original_obj])\n\t\t * @param {mixed} obj the node to open recursively, omit to open all nodes in the tree\n\t\t * @param {Number} animation the animation duration in milliseconds when opening the nodes, the default is no animation\n\t\t * @param {jQuery} reference to the node that started the process (internal use)\n\t\t * @trigger open_all.jstree\n\t\t */\n\t\topen_all : function (obj, animation, original_obj) {\n\t\t\tif(!obj) { obj = $.jstree.root; }\n\t\t\tobj = this.get_node(obj);\n\t\t\tif(!obj) { return false; }\n\t\t\tvar dom = obj.id === $.jstree.root ? this.get_container_ul() : this.get_node(obj, true), i, j, _this;\n\t\t\tif(!dom.length) {\n\t\t\t\tfor(i = 0, j = obj.children_d.length; i < j; i++) {\n\t\t\t\t\tif(this.is_closed(this._model.data[obj.children_d[i]])) {\n\t\t\t\t\t\tthis._model.data[obj.children_d[i]].state.opened = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn this.trigger('open_all', { \"node\" : obj });\n\t\t\t}\n\t\t\toriginal_obj = original_obj || dom;\n\t\t\t_this = this;\n\t\t\tdom = this.is_closed(obj) ? dom.find('.jstree-closed').addBack() : dom.find('.jstree-closed');\n\t\t\tdom.each(function () {\n\t\t\t\t_this.open_node(\n\t\t\t\t\tthis,\n\t\t\t\t\tfunction(node, status) { if(status && this.is_parent(node)) { this.open_all(node, animation, original_obj); } },\n\t\t\t\t\tanimation || 0\n\t\t\t\t);\n\t\t\t});\n\t\t\tif(original_obj.find('.jstree-closed').length === 0) {\n\t\t\t\t/**\n\t\t\t\t * triggered when an `open_all` call completes\n\t\t\t\t * @event\n\t\t\t\t * @name open_all.jstree\n\t\t\t\t * @param {Object} node the opened node\n\t\t\t\t */\n\t\t\t\tthis.trigger('open_all', { \"node\" : this.get_node(original_obj) });\n\t\t\t}\n\t\t},\n\t\t/**\n\t\t * closes all nodes within a node (or the tree), revaling their children\n\t\t * @name close_all([obj, animation])\n\t\t * @param {mixed} obj the node to close recursively, omit to close all nodes in the tree\n\t\t * @param {Number} animation the animation duration in milliseconds when closing the nodes, the default is no animation\n\t\t * @trigger close_all.jstree\n\t\t */\n\t\tclose_all : function (obj, animation) {\n\t\t\tif(!obj) { obj = $.jstree.root; }\n\t\t\tobj = this.get_node(obj);\n\t\t\tif(!obj) { return false; }\n\t\t\tvar dom = obj.id === $.jstree.root ? this.get_container_ul() : this.get_node(obj, true),\n\t\t\t\t_this = this, i, j;\n\t\t\tif(dom.length) {\n\t\t\t\tdom = this.is_open(obj) ? dom.find('.jstree-open').addBack() : dom.find('.jstree-open');\n\t\t\t\t$(dom.get().reverse()).each(function () { _this.close_node(this, animation || 0); });\n\t\t\t}\n\t\t\tfor(i = 0, j = obj.children_d.length; i < j; i++) {\n\t\t\t\tthis._model.data[obj.children_d[i]].state.opened = false;\n\t\t\t}\n\t\t\t/**\n\t\t\t * triggered when an `close_all` call completes\n\t\t\t * @event\n\t\t\t * @name close_all.jstree\n\t\t\t * @param {Object} node the closed node\n\t\t\t */\n\t\t\tthis.trigger('close_all', { \"node\" : obj });\n\t\t},\n\t\t/**\n\t\t * checks if a node is disabled (not selectable)\n\t\t * @name is_disabled(obj)\n\t\t * @param  {mixed} obj\n\t\t * @return {Boolean}\n\t\t */\n\t\tis_disabled : function (obj) {\n\t\t\tobj = this.get_node(obj);\n\t\t\treturn obj && obj.state && obj.state.disabled;\n\t\t},\n\t\t/**\n\t\t * enables a node - so that it can be selected\n\t\t * @name enable_node(obj)\n\t\t * @param {mixed} obj the node to enable\n\t\t * @trigger enable_node.jstree\n\t\t */\n\t\tenable_node : function (obj) {\n\t\t\tvar t1, t2;\n\t\t\tif($.isArray(obj)) {\n\t\t\t\tobj = obj.slice();\n\t\t\t\tfor(t1 = 0, t2 = obj.length; t1 < t2; t1++) {\n\t\t\t\t\tthis.enable_node(obj[t1]);\n\t\t\t\t}\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\tobj = this.get_node(obj);\n\t\t\tif(!obj || obj.id === $.jstree.root) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tobj.state.disabled = false;\n\t\t\tthis.get_node(obj,true).children('.jstree-anchor').removeClass('jstree-disabled').attr('aria-disabled', false);\n\t\t\t/**\n\t\t\t * triggered when an node is enabled\n\t\t\t * @event\n\t\t\t * @name enable_node.jstree\n\t\t\t * @param {Object} node the enabled node\n\t\t\t */\n\t\t\tthis.trigger('enable_node', { 'node' : obj });\n\t\t},\n\t\t/**\n\t\t * disables a node - so that it can not be selected\n\t\t * @name disable_node(obj)\n\t\t * @param {mixed} obj the node to disable\n\t\t * @trigger disable_node.jstree\n\t\t */\n\t\tdisable_node : function (obj) {\n\t\t\tvar t1, t2;\n\t\t\tif($.isArray(obj)) {\n\t\t\t\tobj = obj.slice();\n\t\t\t\tfor(t1 = 0, t2 = obj.length; t1 < t2; t1++) {\n\t\t\t\t\tthis.disable_node(obj[t1]);\n\t\t\t\t}\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\tobj = this.get_node(obj);\n\t\t\tif(!obj || obj.id === $.jstree.root) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tobj.state.disabled = true;\n\t\t\tthis.get_node(obj,true).children('.jstree-anchor').addClass('jstree-disabled').attr('aria-disabled', true);\n\t\t\t/**\n\t\t\t * triggered when an node is disabled\n\t\t\t * @event\n\t\t\t * @name disable_node.jstree\n\t\t\t * @param {Object} node the disabled node\n\t\t\t */\n\t\t\tthis.trigger('disable_node', { 'node' : obj });\n\t\t},\n\t\t/**\n\t\t * determines if a node is hidden\n\t\t * @name is_hidden(obj)\n\t\t * @param {mixed} obj the node\n\t\t */\n\t\tis_hidden : function (obj) {\n\t\t\tobj = this.get_node(obj);\n\t\t\treturn obj.state.hidden === true;\n\t\t},\n\t\t/**\n\t\t * hides a node - it is still in the structure but will not be visible\n\t\t * @name hide_node(obj)\n\t\t * @param {mixed} obj the node to hide\n\t\t * @param {Boolean} skip_redraw internal parameter controlling if redraw is called\n\t\t * @trigger hide_node.jstree\n\t\t */\n\t\thide_node : function (obj, skip_redraw) {\n\t\t\tvar t1, t2;\n\t\t\tif($.isArray(obj)) {\n\t\t\t\tobj = obj.slice();\n\t\t\t\tfor(t1 = 0, t2 = obj.length; t1 < t2; t1++) {\n\t\t\t\t\tthis.hide_node(obj[t1], true);\n\t\t\t\t}\n\t\t\t\tif (!skip_redraw) {\n\t\t\t\t\tthis.redraw();\n\t\t\t\t}\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\tobj = this.get_node(obj);\n\t\t\tif(!obj || obj.id === $.jstree.root) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tif(!obj.state.hidden) {\n\t\t\t\tobj.state.hidden = true;\n\t\t\t\tthis._node_changed(obj.parent);\n\t\t\t\tif(!skip_redraw) {\n\t\t\t\t\tthis.redraw();\n\t\t\t\t}\n\t\t\t\t/**\n\t\t\t\t * triggered when an node is hidden\n\t\t\t\t * @event\n\t\t\t\t * @name hide_node.jstree\n\t\t\t\t * @param {Object} node the hidden node\n\t\t\t\t */\n\t\t\t\tthis.trigger('hide_node', { 'node' : obj });\n\t\t\t}\n\t\t},\n\t\t/**\n\t\t * shows a node\n\t\t * @name show_node(obj)\n\t\t * @param {mixed} obj the node to show\n\t\t * @param {Boolean} skip_redraw internal parameter controlling if redraw is called\n\t\t * @trigger show_node.jstree\n\t\t */\n\t\tshow_node : function (obj, skip_redraw) {\n\t\t\tvar t1, t2;\n\t\t\tif($.isArray(obj)) {\n\t\t\t\tobj = obj.slice();\n\t\t\t\tfor(t1 = 0, t2 = obj.length; t1 < t2; t1++) {\n\t\t\t\t\tthis.show_node(obj[t1], true);\n\t\t\t\t}\n\t\t\t\tif (!skip_redraw) {\n\t\t\t\t\tthis.redraw();\n\t\t\t\t}\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\tobj = this.get_node(obj);\n\t\t\tif(!obj || obj.id === $.jstree.root) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tif(obj.state.hidden) {\n\t\t\t\tobj.state.hidden = false;\n\t\t\t\tthis._node_changed(obj.parent);\n\t\t\t\tif(!skip_redraw) {\n\t\t\t\t\tthis.redraw();\n\t\t\t\t}\n\t\t\t\t/**\n\t\t\t\t * triggered when an node is shown\n\t\t\t\t * @event\n\t\t\t\t * @name show_node.jstree\n\t\t\t\t * @param {Object} node the shown node\n\t\t\t\t */\n\t\t\t\tthis.trigger('show_node', { 'node' : obj });\n\t\t\t}\n\t\t},\n\t\t/**\n\t\t * hides all nodes\n\t\t * @name hide_all()\n\t\t * @trigger hide_all.jstree\n\t\t */\n\t\thide_all : function (skip_redraw) {\n\t\t\tvar i, m = this._model.data, ids = [];\n\t\t\tfor(i in m) {\n\t\t\t\tif(m.hasOwnProperty(i) && i !== $.jstree.root && !m[i].state.hidden) {\n\t\t\t\t\tm[i].state.hidden = true;\n\t\t\t\t\tids.push(i);\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis._model.force_full_redraw = true;\n\t\t\tif(!skip_redraw) {\n\t\t\t\tthis.redraw();\n\t\t\t}\n\t\t\t/**\n\t\t\t * triggered when all nodes are hidden\n\t\t\t * @event\n\t\t\t * @name hide_all.jstree\n\t\t\t * @param {Array} nodes the IDs of all hidden nodes\n\t\t\t */\n\t\t\tthis.trigger('hide_all', { 'nodes' : ids });\n\t\t\treturn ids;\n\t\t},\n\t\t/**\n\t\t * shows all nodes\n\t\t * @name show_all()\n\t\t * @trigger show_all.jstree\n\t\t */\n\t\tshow_all : function (skip_redraw) {\n\t\t\tvar i, m = this._model.data, ids = [];\n\t\t\tfor(i in m) {\n\t\t\t\tif(m.hasOwnProperty(i) && i !== $.jstree.root && m[i].state.hidden) {\n\t\t\t\t\tm[i].state.hidden = false;\n\t\t\t\t\tids.push(i);\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis._model.force_full_redraw = true;\n\t\t\tif(!skip_redraw) {\n\t\t\t\tthis.redraw();\n\t\t\t}\n\t\t\t/**\n\t\t\t * triggered when all nodes are shown\n\t\t\t * @event\n\t\t\t * @name show_all.jstree\n\t\t\t * @param {Array} nodes the IDs of all shown nodes\n\t\t\t */\n\t\t\tthis.trigger('show_all', { 'nodes' : ids });\n\t\t\treturn ids;\n\t\t},\n\t\t/**\n\t\t * called when a node is selected by the user. Used internally.\n\t\t * @private\n\t\t * @name activate_node(obj, e)\n\t\t * @param {mixed} obj the node\n\t\t * @param {Object} e the related event\n\t\t * @trigger activate_node.jstree, changed.jstree\n\t\t */\n\t\tactivate_node : function (obj, e) {\n\t\t\tif(this.is_disabled(obj)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tif(!e || typeof e !== 'object') {\n\t\t\t\te = {};\n\t\t\t}\n\n\t\t\t// ensure last_clicked is still in the DOM, make it fresh (maybe it was moved?) and make sure it is still selected, if not - make last_clicked the last selected node\n\t\t\tthis._data.core.last_clicked = this._data.core.last_clicked && this._data.core.last_clicked.id !== undefined ? this.get_node(this._data.core.last_clicked.id) : null;\n\t\t\tif(this._data.core.last_clicked && !this._data.core.last_clicked.state.selected) { this._data.core.last_clicked = null; }\n\t\t\tif(!this._data.core.last_clicked && this._data.core.selected.length) { this._data.core.last_clicked = this.get_node(this._data.core.selected[this._data.core.selected.length - 1]); }\n\n\t\t\tif(!this.settings.core.multiple || (!e.metaKey && !e.ctrlKey && !e.shiftKey) || (e.shiftKey && (!this._data.core.last_clicked || !this.get_parent(obj) || this.get_parent(obj) !== this._data.core.last_clicked.parent ) )) {\n\t\t\t\tif(!this.settings.core.multiple && (e.metaKey || e.ctrlKey || e.shiftKey) && this.is_selected(obj)) {\n\t\t\t\t\tthis.deselect_node(obj, false, e);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tthis.deselect_all(true);\n\t\t\t\t\tthis.select_node(obj, false, false, e);\n\t\t\t\t\tthis._data.core.last_clicked = this.get_node(obj);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif(e.shiftKey) {\n\t\t\t\t\tvar o = this.get_node(obj).id,\n\t\t\t\t\t\tl = this._data.core.last_clicked.id,\n\t\t\t\t\t\tp = this.get_node(this._data.core.last_clicked.parent).children,\n\t\t\t\t\t\tc = false,\n\t\t\t\t\t\ti, j;\n\t\t\t\t\tfor(i = 0, j = p.length; i < j; i += 1) {\n\t\t\t\t\t\t// separate IFs work whem o and l are the same\n\t\t\t\t\t\tif(p[i] === o) {\n\t\t\t\t\t\t\tc = !c;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(p[i] === l) {\n\t\t\t\t\t\t\tc = !c;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(!this.is_disabled(p[i]) && (c || p[i] === o || p[i] === l)) {\n\t\t\t\t\t\t\tif (!this.is_hidden(p[i])) {\n\t\t\t\t\t\t\t\tthis.select_node(p[i], true, false, e);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tthis.deselect_node(p[i], true, e);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tthis.trigger('changed', { 'action' : 'select_node', 'node' : this.get_node(obj), 'selected' : this._data.core.selected, 'event' : e });\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tif(!this.is_selected(obj)) {\n\t\t\t\t\t\tthis.select_node(obj, false, false, e);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tthis.deselect_node(obj, false, e);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t/**\n\t\t\t * triggered when an node is clicked or intercated with by the user\n\t\t\t * @event\n\t\t\t * @name activate_node.jstree\n\t\t\t * @param {Object} node\n\t\t\t * @param {Object} event the ooriginal event (if any) which triggered the call (may be an empty object)\n\t\t\t */\n\t\t\tthis.trigger('activate_node', { 'node' : this.get_node(obj), 'event' : e });\n\t\t},\n\t\t/**\n\t\t * applies the hover state on a node, called when a node is hovered by the user. Used internally.\n\t\t * @private\n\t\t * @name hover_node(obj)\n\t\t * @param {mixed} obj\n\t\t * @trigger hover_node.jstree\n\t\t */\n\t\thover_node : function (obj) {\n\t\t\tobj = this.get_node(obj, true);\n\t\t\tif(!obj || !obj.length || obj.children('.jstree-hovered').length) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tvar o = this.element.find('.jstree-hovered'), t = this.element;\n\t\t\tif(o && o.length) { this.dehover_node(o); }\n\n\t\t\tobj.children('.jstree-anchor').addClass('jstree-hovered');\n\t\t\t/**\n\t\t\t * triggered when an node is hovered\n\t\t\t * @event\n\t\t\t * @name hover_node.jstree\n\t\t\t * @param {Object} node\n\t\t\t */\n\t\t\tthis.trigger('hover_node', { 'node' : this.get_node(obj) });\n\t\t\tsetTimeout(function () { t.attr('aria-activedescendant', obj[0].id); }, 0);\n\t\t},\n\t\t/**\n\t\t * removes the hover state from a nodecalled when a node is no longer hovered by the user. Used internally.\n\t\t * @private\n\t\t * @name dehover_node(obj)\n\t\t * @param {mixed} obj\n\t\t * @trigger dehover_node.jstree\n\t\t */\n\t\tdehover_node : function (obj) {\n\t\t\tobj = this.get_node(obj, true);\n\t\t\tif(!obj || !obj.length || !obj.children('.jstree-hovered').length) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tobj.children('.jstree-anchor').removeClass('jstree-hovered');\n\t\t\t/**\n\t\t\t * triggered when an node is no longer hovered\n\t\t\t * @event\n\t\t\t * @name dehover_node.jstree\n\t\t\t * @param {Object} node\n\t\t\t */\n\t\t\tthis.trigger('dehover_node', { 'node' : this.get_node(obj) });\n\t\t},\n\t\t/**\n\t\t * select a node\n\t\t * @name select_node(obj [, supress_event, prevent_open])\n\t\t * @param {mixed} obj an array can be used to select multiple nodes\n\t\t * @param {Boolean} supress_event if set to `true` the `changed.jstree` event won't be triggered\n\t\t * @param {Boolean} prevent_open if set to `true` parents of the selected node won't be opened\n\t\t * @trigger select_node.jstree, changed.jstree\n\t\t */\n\t\tselect_node : function (obj, supress_event, prevent_open, e) {\n\t\t\tvar dom, t1, t2, th;\n\t\t\tif($.isArray(obj)) {\n\t\t\t\tobj = obj.slice();\n\t\t\t\tfor(t1 = 0, t2 = obj.length; t1 < t2; t1++) {\n\t\t\t\t\tthis.select_node(obj[t1], supress_event, prevent_open, e);\n\t\t\t\t}\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\tobj = this.get_node(obj);\n\t\t\tif(!obj || obj.id === $.jstree.root) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tdom = this.get_node(obj, true);\n\t\t\tif(!obj.state.selected) {\n\t\t\t\tobj.state.selected = true;\n\t\t\t\tthis._data.core.selected.push(obj.id);\n\t\t\t\tif(!prevent_open) {\n\t\t\t\t\tdom = this._open_to(obj);\n\t\t\t\t}\n\t\t\t\tif(dom && dom.length) {\n\t\t\t\t\tdom.attr('aria-selected', true).children('.jstree-anchor').addClass('jstree-clicked');\n\t\t\t\t}\n\t\t\t\t/**\n\t\t\t\t * triggered when an node is selected\n\t\t\t\t * @event\n\t\t\t\t * @name select_node.jstree\n\t\t\t\t * @param {Object} node\n\t\t\t\t * @param {Array} selected the current selection\n\t\t\t\t * @param {Object} event the event (if any) that triggered this select_node\n\t\t\t\t */\n\t\t\t\tthis.trigger('select_node', { 'node' : obj, 'selected' : this._data.core.selected, 'event' : e });\n\t\t\t\tif(!supress_event) {\n\t\t\t\t\t/**\n\t\t\t\t\t * triggered when selection changes\n\t\t\t\t\t * @event\n\t\t\t\t\t * @name changed.jstree\n\t\t\t\t\t * @param {Object} node\n\t\t\t\t\t * @param {Object} action the action that caused the selection to change\n\t\t\t\t\t * @param {Array} selected the current selection\n\t\t\t\t\t * @param {Object} event the event (if any) that triggered this changed event\n\t\t\t\t\t */\n\t\t\t\t\tthis.trigger('changed', { 'action' : 'select_node', 'node' : obj, 'selected' : this._data.core.selected, 'event' : e });\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t/**\n\t\t * deselect a node\n\t\t * @name deselect_node(obj [, supress_event])\n\t\t * @param {mixed} obj an array can be used to deselect multiple nodes\n\t\t * @param {Boolean} supress_event if set to `true` the `changed.jstree` event won't be triggered\n\t\t * @trigger deselect_node.jstree, changed.jstree\n\t\t */\n\t\tdeselect_node : function (obj, supress_event, e) {\n\t\t\tvar t1, t2, dom;\n\t\t\tif($.isArray(obj)) {\n\t\t\t\tobj = obj.slice();\n\t\t\t\tfor(t1 = 0, t2 = obj.length; t1 < t2; t1++) {\n\t\t\t\t\tthis.deselect_node(obj[t1], supress_event, e);\n\t\t\t\t}\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\tobj = this.get_node(obj);\n\t\t\tif(!obj || obj.id === $.jstree.root) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tdom = this.get_node(obj, true);\n\t\t\tif(obj.state.selected) {\n\t\t\t\tobj.state.selected = false;\n\t\t\t\tthis._data.core.selected = $.vakata.array_remove_item(this._data.core.selected, obj.id);\n\t\t\t\tif(dom.length) {\n\t\t\t\t\tdom.attr('aria-selected', false).children('.jstree-anchor').removeClass('jstree-clicked');\n\t\t\t\t}\n\t\t\t\t/**\n\t\t\t\t * triggered when an node is deselected\n\t\t\t\t * @event\n\t\t\t\t * @name deselect_node.jstree\n\t\t\t\t * @param {Object} node\n\t\t\t\t * @param {Array} selected the current selection\n\t\t\t\t * @param {Object} event the event (if any) that triggered this deselect_node\n\t\t\t\t */\n\t\t\t\tthis.trigger('deselect_node', { 'node' : obj, 'selected' : this._data.core.selected, 'event' : e });\n\t\t\t\tif(!supress_event) {\n\t\t\t\t\tthis.trigger('changed', { 'action' : 'deselect_node', 'node' : obj, 'selected' : this._data.core.selected, 'event' : e });\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t/**\n\t\t * select all nodes in the tree\n\t\t * @name select_all([supress_event])\n\t\t * @param {Boolean} supress_event if set to `true` the `changed.jstree` event won't be triggered\n\t\t * @trigger select_all.jstree, changed.jstree\n\t\t */\n\t\tselect_all : function (supress_event) {\n\t\t\tvar tmp = this._data.core.selected.concat([]), i, j;\n\t\t\tthis._data.core.selected = this._model.data[$.jstree.root].children_d.concat();\n\t\t\tfor(i = 0, j = this._data.core.selected.length; i < j; i++) {\n\t\t\t\tif(this._model.data[this._data.core.selected[i]]) {\n\t\t\t\t\tthis._model.data[this._data.core.selected[i]].state.selected = true;\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis.redraw(true);\n\t\t\t/**\n\t\t\t * triggered when all nodes are selected\n\t\t\t * @event\n\t\t\t * @name select_all.jstree\n\t\t\t * @param {Array} selected the current selection\n\t\t\t */\n\t\t\tthis.trigger('select_all', { 'selected' : this._data.core.selected });\n\t\t\tif(!supress_event) {\n\t\t\t\tthis.trigger('changed', { 'action' : 'select_all', 'selected' : this._data.core.selected, 'old_selection' : tmp });\n\t\t\t}\n\t\t},\n\t\t/**\n\t\t * deselect all selected nodes\n\t\t * @name deselect_all([supress_event])\n\t\t * @param {Boolean} supress_event if set to `true` the `changed.jstree` event won't be triggered\n\t\t * @trigger deselect_all.jstree, changed.jstree\n\t\t */\n\t\tdeselect_all : function (supress_event) {\n\t\t\tvar tmp = this._data.core.selected.concat([]), i, j;\n\t\t\tfor(i = 0, j = this._data.core.selected.length; i < j; i++) {\n\t\t\t\tif(this._model.data[this._data.core.selected[i]]) {\n\t\t\t\t\tthis._model.data[this._data.core.selected[i]].state.selected = false;\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis._data.core.selected = [];\n\t\t\tthis.element.find('.jstree-clicked').removeClass('jstree-clicked').parent().attr('aria-selected', false);\n\t\t\t/**\n\t\t\t * triggered when all nodes are deselected\n\t\t\t * @event\n\t\t\t * @name deselect_all.jstree\n\t\t\t * @param {Object} node the previous selection\n\t\t\t * @param {Array} selected the current selection\n\t\t\t */\n\t\t\tthis.trigger('deselect_all', { 'selected' : this._data.core.selected, 'node' : tmp });\n\t\t\tif(!supress_event) {\n\t\t\t\tthis.trigger('changed', { 'action' : 'deselect_all', 'selected' : this._data.core.selected, 'old_selection' : tmp });\n\t\t\t}\n\t\t},\n\t\t/**\n\t\t * checks if a node is selected\n\t\t * @name is_selected(obj)\n\t\t * @param  {mixed}  obj\n\t\t * @return {Boolean}\n\t\t */\n\t\tis_selected : function (obj) {\n\t\t\tobj = this.get_node(obj);\n\t\t\tif(!obj || obj.id === $.jstree.root) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\treturn obj.state.selected;\n\t\t},\n\t\t/**\n\t\t * get an array of all selected nodes\n\t\t * @name get_selected([full])\n\t\t * @param  {mixed}  full if set to `true` the returned array will consist of the full node objects, otherwise - only IDs will be returned\n\t\t * @return {Array}\n\t\t */\n\t\tget_selected : function (full) {\n\t\t\treturn full ? $.map(this._data.core.selected, $.proxy(function (i) { return this.get_node(i); }, this)) : this._data.core.selected.slice();\n\t\t},\n\t\t/**\n\t\t * get an array of all top level selected nodes (ignoring children of selected nodes)\n\t\t * @name get_top_selected([full])\n\t\t * @param  {mixed}  full if set to `true` the returned array will consist of the full node objects, otherwise - only IDs will be returned\n\t\t * @return {Array}\n\t\t */\n\t\tget_top_selected : function (full) {\n\t\t\tvar tmp = this.get_selected(true),\n\t\t\t\tobj = {}, i, j, k, l;\n\t\t\tfor(i = 0, j = tmp.length; i < j; i++) {\n\t\t\t\tobj[tmp[i].id] = tmp[i];\n\t\t\t}\n\t\t\tfor(i = 0, j = tmp.length; i < j; i++) {\n\t\t\t\tfor(k = 0, l = tmp[i].children_d.length; k < l; k++) {\n\t\t\t\t\tif(obj[tmp[i].children_d[k]]) {\n\t\t\t\t\t\tdelete obj[tmp[i].children_d[k]];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\ttmp = [];\n\t\t\tfor(i in obj) {\n\t\t\t\tif(obj.hasOwnProperty(i)) {\n\t\t\t\t\ttmp.push(i);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn full ? $.map(tmp, $.proxy(function (i) { return this.get_node(i); }, this)) : tmp;\n\t\t},\n\t\t/**\n\t\t * get an array of all bottom level selected nodes (ignoring selected parents)\n\t\t * @name get_bottom_selected([full])\n\t\t * @param  {mixed}  full if set to `true` the returned array will consist of the full node objects, otherwise - only IDs will be returned\n\t\t * @return {Array}\n\t\t */\n\t\tget_bottom_selected : function (full) {\n\t\t\tvar tmp = this.get_selected(true),\n\t\t\t\tobj = [], i, j;\n\t\t\tfor(i = 0, j = tmp.length; i < j; i++) {\n\t\t\t\tif(!tmp[i].children.length) {\n\t\t\t\t\tobj.push(tmp[i].id);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn full ? $.map(obj, $.proxy(function (i) { return this.get_node(i); }, this)) : obj;\n\t\t},\n\t\t/**\n\t\t * gets the current state of the tree so that it can be restored later with `set_state(state)`. Used internally.\n\t\t * @name get_state()\n\t\t * @private\n\t\t * @return {Object}\n\t\t */\n\t\tget_state : function () {\n\t\t\tvar state\t= {\n\t\t\t\t'core' : {\n\t\t\t\t\t'open' : [],\n\t\t\t\t\t'scroll' : {\n\t\t\t\t\t\t'left' : this.element.scrollLeft(),\n\t\t\t\t\t\t'top' : this.element.scrollTop()\n\t\t\t\t\t},\n\t\t\t\t\t/*!\n\t\t\t\t\t'themes' : {\n\t\t\t\t\t\t'name' : this.get_theme(),\n\t\t\t\t\t\t'icons' : this._data.core.themes.icons,\n\t\t\t\t\t\t'dots' : this._data.core.themes.dots\n\t\t\t\t\t},\n\t\t\t\t\t*/\n\t\t\t\t\t'selected' : []\n\t\t\t\t}\n\t\t\t}, i;\n\t\t\tfor(i in this._model.data) {\n\t\t\t\tif(this._model.data.hasOwnProperty(i)) {\n\t\t\t\t\tif(i !== $.jstree.root) {\n\t\t\t\t\t\tif(this._model.data[i].state.opened) {\n\t\t\t\t\t\t\tstate.core.open.push(i);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(this._model.data[i].state.selected) {\n\t\t\t\t\t\t\tstate.core.selected.push(i);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn state;\n\t\t},\n\t\t/**\n\t\t * sets the state of the tree. Used internally.\n\t\t * @name set_state(state [, callback])\n\t\t * @private\n\t\t * @param {Object} state the state to restore. Keep in mind this object is passed by reference and jstree will modify it.\n\t\t * @param {Function} callback an optional function to execute once the state is restored.\n\t\t * @trigger set_state.jstree\n\t\t */\n\t\tset_state : function (state, callback) {\n\t\t\tif(state) {\n\t\t\t\tif(state.core && state.core.selected && state.core.initial_selection === undefined) {\n\t\t\t\t\tstate.core.initial_selection = this._data.core.selected.concat([]).sort().join(',');\n\t\t\t\t}\n\t\t\t\tif(state.core) {\n\t\t\t\t\tvar res, n, t, _this, i;\n\t\t\t\t\tif(state.core.open) {\n\t\t\t\t\t\tif(!$.isArray(state.core.open) || !state.core.open.length) {\n\t\t\t\t\t\t\tdelete state.core.open;\n\t\t\t\t\t\t\tthis.set_state(state, callback);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tthis._load_nodes(state.core.open, function (nodes) {\n\t\t\t\t\t\t\t\tthis.open_node(nodes, false, 0);\n\t\t\t\t\t\t\t\tdelete state.core.open;\n\t\t\t\t\t\t\t\tthis.set_state(state, callback);\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t\tif(state.core.scroll) {\n\t\t\t\t\t\tif(state.core.scroll && state.core.scroll.left !== undefined) {\n\t\t\t\t\t\t\tthis.element.scrollLeft(state.core.scroll.left);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(state.core.scroll && state.core.scroll.top !== undefined) {\n\t\t\t\t\t\t\tthis.element.scrollTop(state.core.scroll.top);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdelete state.core.scroll;\n\t\t\t\t\t\tthis.set_state(state, callback);\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t\tif(state.core.selected) {\n\t\t\t\t\t\t_this = this;\n\t\t\t\t\t\tif (state.core.initial_selection === undefined ||\n\t\t\t\t\t\t\tstate.core.initial_selection === this._data.core.selected.concat([]).sort().join(',')\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\tthis.deselect_all();\n\t\t\t\t\t\t\t$.each(state.core.selected, function (i, v) {\n\t\t\t\t\t\t\t\t_this.select_node(v, false, true);\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdelete state.core.initial_selection;\n\t\t\t\t\t\tdelete state.core.selected;\n\t\t\t\t\t\tthis.set_state(state, callback);\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t\tfor(i in state) {\n\t\t\t\t\t\tif(state.hasOwnProperty(i) && i !== \"core\" && $.inArray(i, this.settings.plugins) === -1) {\n\t\t\t\t\t\t\tdelete state[i];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif($.isEmptyObject(state.core)) {\n\t\t\t\t\t\tdelete state.core;\n\t\t\t\t\t\tthis.set_state(state, callback);\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif($.isEmptyObject(state)) {\n\t\t\t\t\tstate = null;\n\t\t\t\t\tif(callback) { callback.call(this); }\n\t\t\t\t\t/**\n\t\t\t\t\t * triggered when a `set_state` call completes\n\t\t\t\t\t * @event\n\t\t\t\t\t * @name set_state.jstree\n\t\t\t\t\t */\n\t\t\t\t\tthis.trigger('set_state');\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\treturn false;\n\t\t},\n\t\t/**\n\t\t * refreshes the tree - all nodes are reloaded with calls to `load_node`.\n\t\t * @name refresh()\n\t\t * @param {Boolean} skip_loading an option to skip showing the loading indicator\n\t\t * @param {Mixed} forget_state if set to `true` state will not be reapplied, if set to a function (receiving the current state as argument) the result of that function will be used as state\n\t\t * @trigger refresh.jstree\n\t\t */\n\t\trefresh : function (skip_loading, forget_state) {\n\t\t\tthis._data.core.state = forget_state === true ? {} : this.get_state();\n\t\t\tif(forget_state && $.isFunction(forget_state)) { this._data.core.state = forget_state.call(this, this._data.core.state); }\n\t\t\tthis._cnt = 0;\n\t\t\tthis._model.data = {};\n\t\t\tthis._model.data[$.jstree.root] = {\n\t\t\t\tid : $.jstree.root,\n\t\t\t\tparent : null,\n\t\t\t\tparents : [],\n\t\t\t\tchildren : [],\n\t\t\t\tchildren_d : [],\n\t\t\t\tstate : { loaded : false }\n\t\t\t};\n\t\t\tthis._data.core.selected = [];\n\t\t\tthis._data.core.last_clicked = null;\n\t\t\tthis._data.core.focused = null;\n\n\t\t\tvar c = this.get_container_ul()[0].className;\n\t\t\tif(!skip_loading) {\n\t\t\t\tthis.element.html(\"<\"+\"ul class='\"+c+\"' role='group'><\"+\"li class='jstree-initial-node jstree-loading jstree-leaf jstree-last' role='treeitem' id='j\"+this._id+\"_loading'><i class='jstree-icon jstree-ocl'></i><\"+\"a class='jstree-anchor' href='#'><i class='jstree-icon jstree-themeicon-hidden'></i>\" + this.get_string(\"Loading ...\") + \"</a></li></ul>\");\n\t\t\t\tthis.element.attr('aria-activedescendant','j'+this._id+'_loading');\n\t\t\t}\n\t\t\tthis.load_node($.jstree.root, function (o, s) {\n\t\t\t\tif(s) {\n\t\t\t\t\tthis.get_container_ul()[0].className = c;\n\t\t\t\t\tif(this._firstChild(this.get_container_ul()[0])) {\n\t\t\t\t\t\tthis.element.attr('aria-activedescendant',this._firstChild(this.get_container_ul()[0]).id);\n\t\t\t\t\t}\n\t\t\t\t\tthis.set_state($.extend(true, {}, this._data.core.state), function () {\n\t\t\t\t\t\t/**\n\t\t\t\t\t\t * triggered when a `refresh` call completes\n\t\t\t\t\t\t * @event\n\t\t\t\t\t\t * @name refresh.jstree\n\t\t\t\t\t\t */\n\t\t\t\t\t\tthis.trigger('refresh');\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\tthis._data.core.state = null;\n\t\t\t});\n\t\t},\n\t\t/**\n\t\t * refreshes a node in the tree (reload its children) all opened nodes inside that node are reloaded with calls to `load_node`.\n\t\t * @name refresh_node(obj)\n\t\t * @param  {mixed} obj the node\n\t\t * @trigger refresh_node.jstree\n\t\t */\n\t\trefresh_node : function (obj) {\n\t\t\tobj = this.get_node(obj);\n\t\t\tif(!obj || obj.id === $.jstree.root) { return false; }\n\t\t\tvar opened = [], to_load = [], s = this._data.core.selected.concat([]);\n\t\t\tto_load.push(obj.id);\n\t\t\tif(obj.state.opened === true) { opened.push(obj.id); }\n\t\t\tthis.get_node(obj, true).find('.jstree-open').each(function() { to_load.push(this.id); opened.push(this.id); });\n\t\t\tthis._load_nodes(to_load, $.proxy(function (nodes) {\n\t\t\t\tthis.open_node(opened, false, 0);\n\t\t\t\tthis.select_node(s);\n\t\t\t\t/**\n\t\t\t\t * triggered when a node is refreshed\n\t\t\t\t * @event\n\t\t\t\t * @name refresh_node.jstree\n\t\t\t\t * @param {Object} node - the refreshed node\n\t\t\t\t * @param {Array} nodes - an array of the IDs of the nodes that were reloaded\n\t\t\t\t */\n\t\t\t\tthis.trigger('refresh_node', { 'node' : obj, 'nodes' : nodes });\n\t\t\t}, this), false, true);\n\t\t},\n\t\t/**\n\t\t * set (change) the ID of a node\n\t\t * @name set_id(obj, id)\n\t\t * @param  {mixed} obj the node\n\t\t * @param  {String} id the new ID\n\t\t * @return {Boolean}\n\t\t * @trigger set_id.jstree\n\t\t */\n\t\tset_id : function (obj, id) {\n\t\t\tobj = this.get_node(obj);\n\t\t\tif(!obj || obj.id === $.jstree.root) { return false; }\n\t\t\tvar i, j, m = this._model.data, old = obj.id;\n\t\t\tid = id.toString();\n\t\t\t// update parents (replace current ID with new one in children and children_d)\n\t\t\tm[obj.parent].children[$.inArray(obj.id, m[obj.parent].children)] = id;\n\t\t\tfor(i = 0, j = obj.parents.length; i < j; i++) {\n\t\t\t\tm[obj.parents[i]].children_d[$.inArray(obj.id, m[obj.parents[i]].children_d)] = id;\n\t\t\t}\n\t\t\t// update children (replace current ID with new one in parent and parents)\n\t\t\tfor(i = 0, j = obj.children.length; i < j; i++) {\n\t\t\t\tm[obj.children[i]].parent = id;\n\t\t\t}\n\t\t\tfor(i = 0, j = obj.children_d.length; i < j; i++) {\n\t\t\t\tm[obj.children_d[i]].parents[$.inArray(obj.id, m[obj.children_d[i]].parents)] = id;\n\t\t\t}\n\t\t\ti = $.inArray(obj.id, this._data.core.selected);\n\t\t\tif(i !== -1) { this._data.core.selected[i] = id; }\n\t\t\t// update model and obj itself (obj.id, this._model.data[KEY])\n\t\t\ti = this.get_node(obj.id, true);\n\t\t\tif(i) {\n\t\t\t\ti.attr('id', id); //.children('.jstree-anchor').attr('id', id + '_anchor').end().attr('aria-labelledby', id + '_anchor');\n\t\t\t\tif(this.element.attr('aria-activedescendant') === obj.id) {\n\t\t\t\t\tthis.element.attr('aria-activedescendant', id);\n\t\t\t\t}\n\t\t\t}\n\t\t\tdelete m[obj.id];\n\t\t\tobj.id = id;\n\t\t\tobj.li_attr.id = id;\n\t\t\tm[id] = obj;\n\t\t\t/**\n\t\t\t * triggered when a node id value is changed\n\t\t\t * @event\n\t\t\t * @name set_id.jstree\n\t\t\t * @param {Object} node\n\t\t\t * @param {String} old the old id\n\t\t\t */\n\t\t\tthis.trigger('set_id',{ \"node\" : obj, \"new\" : obj.id, \"old\" : old });\n\t\t\treturn true;\n\t\t},\n\t\t/**\n\t\t * get the text value of a node\n\t\t * @name get_text(obj)\n\t\t * @param  {mixed} obj the node\n\t\t * @return {String}\n\t\t */\n\t\tget_text : function (obj) {\n\t\t\tobj = this.get_node(obj);\n\t\t\treturn (!obj || obj.id === $.jstree.root) ? false : obj.text;\n\t\t},\n\t\t/**\n\t\t * set the text value of a node. Used internally, please use `rename_node(obj, val)`.\n\t\t * @private\n\t\t * @name set_text(obj, val)\n\t\t * @param  {mixed} obj the node, you can pass an array to set the text on multiple nodes\n\t\t * @param  {String} val the new text value\n\t\t * @return {Boolean}\n\t\t * @trigger set_text.jstree\n\t\t */\n\t\tset_text : function (obj, val) {\n\t\t\tvar t1, t2;\n\t\t\tif($.isArray(obj)) {\n\t\t\t\tobj = obj.slice();\n\t\t\t\tfor(t1 = 0, t2 = obj.length; t1 < t2; t1++) {\n\t\t\t\t\tthis.set_text(obj[t1], val);\n\t\t\t\t}\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\tobj = this.get_node(obj);\n\t\t\tif(!obj || obj.id === $.jstree.root) { return false; }\n\t\t\tobj.text = val;\n\t\t\tif(this.get_node(obj, true).length) {\n\t\t\t\tthis.redraw_node(obj.id);\n\t\t\t}\n\t\t\t/**\n\t\t\t * triggered when a node text value is changed\n\t\t\t * @event\n\t\t\t * @name set_text.jstree\n\t\t\t * @param {Object} obj\n\t\t\t * @param {String} text the new value\n\t\t\t */\n\t\t\tthis.trigger('set_text',{ \"obj\" : obj, \"text\" : val });\n\t\t\treturn true;\n\t\t},\n\t\t/**\n\t\t * gets a JSON representation of a node (or the whole tree)\n\t\t * @name get_json([obj, options])\n\t\t * @param  {mixed} obj\n\t\t * @param  {Object} options\n\t\t * @param  {Boolean} options.no_state do not return state information\n\t\t * @param  {Boolean} options.no_id do not return ID\n\t\t * @param  {Boolean} options.no_children do not include children\n\t\t * @param  {Boolean} options.no_data do not include node data\n\t\t * @param  {Boolean} options.no_li_attr do not include LI attributes\n\t\t * @param  {Boolean} options.no_a_attr do not include A attributes\n\t\t * @param  {Boolean} options.flat return flat JSON instead of nested\n\t\t * @return {Object}\n\t\t */\n\t\tget_json : function (obj, options, flat) {\n\t\t\tobj = this.get_node(obj || $.jstree.root);\n\t\t\tif(!obj) { return false; }\n\t\t\tif(options && options.flat && !flat) { flat = []; }\n\t\t\tvar tmp = {\n\t\t\t\t'id' : obj.id,\n\t\t\t\t'text' : obj.text,\n\t\t\t\t'icon' : this.get_icon(obj),\n\t\t\t\t'li_attr' : $.extend(true, {}, obj.li_attr),\n\t\t\t\t'a_attr' : $.extend(true, {}, obj.a_attr),\n\t\t\t\t'state' : {},\n\t\t\t\t'data' : options && options.no_data ? false : $.extend(true, $.isArray(obj.data)?[]:{}, obj.data)\n\t\t\t\t//( this.get_node(obj, true).length ? this.get_node(obj, true).data() : obj.data ),\n\t\t\t}, i, j;\n\t\t\tif(options && options.flat) {\n\t\t\t\ttmp.parent = obj.parent;\n\t\t\t}\n\t\t\telse {\n\t\t\t\ttmp.children = [];\n\t\t\t}\n\t\t\tif(!options || !options.no_state) {\n\t\t\t\tfor(i in obj.state) {\n\t\t\t\t\tif(obj.state.hasOwnProperty(i)) {\n\t\t\t\t\t\ttmp.state[i] = obj.state[i];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tdelete tmp.state;\n\t\t\t}\n\t\t\tif(options && options.no_li_attr) {\n\t\t\t\tdelete tmp.li_attr;\n\t\t\t}\n\t\t\tif(options && options.no_a_attr) {\n\t\t\t\tdelete tmp.a_attr;\n\t\t\t}\n\t\t\tif(options && options.no_id) {\n\t\t\t\tdelete tmp.id;\n\t\t\t\tif(tmp.li_attr && tmp.li_attr.id) {\n\t\t\t\t\tdelete tmp.li_attr.id;\n\t\t\t\t}\n\t\t\t\tif(tmp.a_attr && tmp.a_attr.id) {\n\t\t\t\t\tdelete tmp.a_attr.id;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(options && options.flat && obj.id !== $.jstree.root) {\n\t\t\t\tflat.push(tmp);\n\t\t\t}\n\t\t\tif(!options || !options.no_children) {\n\t\t\t\tfor(i = 0, j = obj.children.length; i < j; i++) {\n\t\t\t\t\tif(options && options.flat) {\n\t\t\t\t\t\tthis.get_json(obj.children[i], options, flat);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\ttmp.children.push(this.get_json(obj.children[i], options));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn options && options.flat ? flat : (obj.id === $.jstree.root ? tmp.children : tmp);\n\t\t},\n\t\t/**\n\t\t * create a new node (do not confuse with load_node)\n\t\t * @name create_node([par, node, pos, callback, is_loaded])\n\t\t * @param  {mixed}   par       the parent node (to create a root node use either \"#\" (string) or `null`)\n\t\t * @param  {mixed}   node      the data for the new node (a valid JSON object, or a simple string with the name)\n\t\t * @param  {mixed}   pos       the index at which to insert the node, \"first\" and \"last\" are also supported, default is \"last\"\n\t\t * @param  {Function} callback a function to be called once the node is created\n\t\t * @param  {Boolean} is_loaded internal argument indicating if the parent node was succesfully loaded\n\t\t * @return {String}            the ID of the newly create node\n\t\t * @trigger model.jstree, create_node.jstree\n\t\t */\n\t\tcreate_node : function (par, node, pos, callback, is_loaded) {\n\t\t\tif(par === null) { par = $.jstree.root; }\n\t\t\tpar = this.get_node(par);\n\t\t\tif(!par) { return false; }\n\t\t\tpos = pos === undefined ? \"last\" : pos;\n\t\t\tif(!pos.toString().match(/^(before|after)$/) && !is_loaded && !this.is_loaded(par)) {\n\t\t\t\treturn this.load_node(par, function () { this.create_node(par, node, pos, callback, true); });\n\t\t\t}\n\t\t\tif(!node) { node = { \"text\" : this.get_string('New node') }; }\n\t\t\tif(typeof node === \"string\") {\n\t\t\t\tnode = { \"text\" : node };\n\t\t\t} else {\n\t\t\t\tnode = $.extend(true, {}, node);\n\t\t\t}\n\t\t\tif(node.text === undefined) { node.text = this.get_string('New node'); }\n\t\t\tvar tmp, dpc, i, j;\n\n\t\t\tif(par.id === $.jstree.root) {\n\t\t\t\tif(pos === \"before\") { pos = \"first\"; }\n\t\t\t\tif(pos === \"after\") { pos = \"last\"; }\n\t\t\t}\n\t\t\tswitch(pos) {\n\t\t\t\tcase \"before\":\n\t\t\t\t\ttmp = this.get_node(par.parent);\n\t\t\t\t\tpos = $.inArray(par.id, tmp.children);\n\t\t\t\t\tpar = tmp;\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"after\" :\n\t\t\t\t\ttmp = this.get_node(par.parent);\n\t\t\t\t\tpos = $.inArray(par.id, tmp.children) + 1;\n\t\t\t\t\tpar = tmp;\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"inside\":\n\t\t\t\tcase \"first\":\n\t\t\t\t\tpos = 0;\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"last\":\n\t\t\t\t\tpos = par.children.length;\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tif(!pos) { pos = 0; }\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif(pos > par.children.length) { pos = par.children.length; }\n\t\t\tif(!node.id) { node.id = true; }\n\t\t\tif(!this.check(\"create_node\", node, par, pos)) {\n\t\t\t\tthis.settings.core.error.call(this, this._data.core.last_error);\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tif(node.id === true) { delete node.id; }\n\t\t\tnode = this._parse_model_from_json(node, par.id, par.parents.concat());\n\t\t\tif(!node) { return false; }\n\t\t\ttmp = this.get_node(node);\n\t\t\tdpc = [];\n\t\t\tdpc.push(node);\n\t\t\tdpc = dpc.concat(tmp.children_d);\n\t\t\tthis.trigger('model', { \"nodes\" : dpc, \"parent\" : par.id });\n\n\t\t\tpar.children_d = par.children_d.concat(dpc);\n\t\t\tfor(i = 0, j = par.parents.length; i < j; i++) {\n\t\t\t\tthis._model.data[par.parents[i]].children_d = this._model.data[par.parents[i]].children_d.concat(dpc);\n\t\t\t}\n\t\t\tnode = tmp;\n\t\t\ttmp = [];\n\t\t\tfor(i = 0, j = par.children.length; i < j; i++) {\n\t\t\t\ttmp[i >= pos ? i+1 : i] = par.children[i];\n\t\t\t}\n\t\t\ttmp[pos] = node.id;\n\t\t\tpar.children = tmp;\n\n\t\t\tthis.redraw_node(par, true);\n\t\t\t/**\n\t\t\t * triggered when a node is created\n\t\t\t * @event\n\t\t\t * @name create_node.jstree\n\t\t\t * @param {Object} node\n\t\t\t * @param {String} parent the parent's ID\n\t\t\t * @param {Number} position the position of the new node among the parent's children\n\t\t\t */\n\t\t\tthis.trigger('create_node', { \"node\" : this.get_node(node), \"parent\" : par.id, \"position\" : pos });\n\t\t\tif(callback) { callback.call(this, this.get_node(node)); }\n\t\t\treturn node.id;\n\t\t},\n\t\t/**\n\t\t * set the text value of a node\n\t\t * @name rename_node(obj, val)\n\t\t * @param  {mixed} obj the node, you can pass an array to rename multiple nodes to the same name\n\t\t * @param  {String} val the new text value\n\t\t * @return {Boolean}\n\t\t * @trigger rename_node.jstree\n\t\t */\n\t\trename_node : function (obj, val) {\n\t\t\tvar t1, t2, old;\n\t\t\tif($.isArray(obj)) {\n\t\t\t\tobj = obj.slice();\n\t\t\t\tfor(t1 = 0, t2 = obj.length; t1 < t2; t1++) {\n\t\t\t\t\tthis.rename_node(obj[t1], val);\n\t\t\t\t}\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\tobj = this.get_node(obj);\n\t\t\tif(!obj || obj.id === $.jstree.root) { return false; }\n\t\t\told = obj.text;\n\t\t\tif(!this.check(\"rename_node\", obj, this.get_parent(obj), val)) {\n\t\t\t\tthis.settings.core.error.call(this, this._data.core.last_error);\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tthis.set_text(obj, val); // .apply(this, Array.prototype.slice.call(arguments))\n\t\t\t/**\n\t\t\t * triggered when a node is renamed\n\t\t\t * @event\n\t\t\t * @name rename_node.jstree\n\t\t\t * @param {Object} node\n\t\t\t * @param {String} text the new value\n\t\t\t * @param {String} old the old value\n\t\t\t */\n\t\t\tthis.trigger('rename_node', { \"node\" : obj, \"text\" : val, \"old\" : old });\n\t\t\treturn true;\n\t\t},\n\t\t/**\n\t\t * remove a node\n\t\t * @name delete_node(obj)\n\t\t * @param  {mixed} obj the node, you can pass an array to delete multiple nodes\n\t\t * @return {Boolean}\n\t\t * @trigger delete_node.jstree, changed.jstree\n\t\t */\n\t\tdelete_node : function (obj) {\n\t\t\tvar t1, t2, par, pos, tmp, i, j, k, l, c, top, lft;\n\t\t\tif($.isArray(obj)) {\n\t\t\t\tobj = obj.slice();\n\t\t\t\tfor(t1 = 0, t2 = obj.length; t1 < t2; t1++) {\n\t\t\t\t\tthis.delete_node(obj[t1]);\n\t\t\t\t}\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\tobj = this.get_node(obj);\n\t\t\tif(!obj || obj.id === $.jstree.root) { return false; }\n\t\t\tpar = this.get_node(obj.parent);\n\t\t\tpos = $.inArray(obj.id, par.children);\n\t\t\tc = false;\n\t\t\tif(!this.check(\"delete_node\", obj, par, pos)) {\n\t\t\t\tthis.settings.core.error.call(this, this._data.core.last_error);\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tif(pos !== -1) {\n\t\t\t\tpar.children = $.vakata.array_remove(par.children, pos);\n\t\t\t}\n\t\t\ttmp = obj.children_d.concat([]);\n\t\t\ttmp.push(obj.id);\n\t\t\tfor(i = 0, j = obj.parents.length; i < j; i++) {\n\t\t\t\tthis._model.data[obj.parents[i]].children_d = $.vakata.array_filter(this._model.data[obj.parents[i]].children_d, function (v) {\n\t\t\t\t\treturn $.inArray(v, tmp) === -1;\n\t\t\t\t});\n\t\t\t}\n\t\t\tfor(k = 0, l = tmp.length; k < l; k++) {\n\t\t\t\tif(this._model.data[tmp[k]].state.selected) {\n\t\t\t\t\tc = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (c) {\n\t\t\t\tthis._data.core.selected = $.vakata.array_filter(this._data.core.selected, function (v) {\n\t\t\t\t\treturn $.inArray(v, tmp) === -1;\n\t\t\t\t});\n\t\t\t}\n\t\t\t/**\n\t\t\t * triggered when a node is deleted\n\t\t\t * @event\n\t\t\t * @name delete_node.jstree\n\t\t\t * @param {Object} node\n\t\t\t * @param {String} parent the parent's ID\n\t\t\t */\n\t\t\tthis.trigger('delete_node', { \"node\" : obj, \"parent\" : par.id });\n\t\t\tif(c) {\n\t\t\t\tthis.trigger('changed', { 'action' : 'delete_node', 'node' : obj, 'selected' : this._data.core.selected, 'parent' : par.id });\n\t\t\t}\n\t\t\tfor(k = 0, l = tmp.length; k < l; k++) {\n\t\t\t\tdelete this._model.data[tmp[k]];\n\t\t\t}\n\t\t\tif($.inArray(this._data.core.focused, tmp) !== -1) {\n\t\t\t\tthis._data.core.focused = null;\n\t\t\t\ttop = this.element[0].scrollTop;\n\t\t\t\tlft = this.element[0].scrollLeft;\n\t\t\t\tif(par.id === $.jstree.root) {\n\t\t\t\t\tif (this._model.data[$.jstree.root].children[0]) {\n\t\t\t\t\t\tthis.get_node(this._model.data[$.jstree.root].children[0], true).children('.jstree-anchor').focus();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tthis.get_node(par, true).children('.jstree-anchor').focus();\n\t\t\t\t}\n\t\t\t\tthis.element[0].scrollTop  = top;\n\t\t\t\tthis.element[0].scrollLeft = lft;\n\t\t\t}\n\t\t\tthis.redraw_node(par, true);\n\t\t\treturn true;\n\t\t},\n\t\t/**\n\t\t * check if an operation is premitted on the tree. Used internally.\n\t\t * @private\n\t\t * @name check(chk, obj, par, pos)\n\t\t * @param  {String} chk the operation to check, can be \"create_node\", \"rename_node\", \"delete_node\", \"copy_node\" or \"move_node\"\n\t\t * @param  {mixed} obj the node\n\t\t * @param  {mixed} par the parent\n\t\t * @param  {mixed} pos the position to insert at, or if \"rename_node\" - the new name\n\t\t * @param  {mixed} more some various additional information, for example if a \"move_node\" operations is triggered by DND this will be the hovered node\n\t\t * @return {Boolean}\n\t\t */\n\t\tcheck : function (chk, obj, par, pos, more) {\n\t\t\tobj = obj && obj.id ? obj : this.get_node(obj);\n\t\t\tpar = par && par.id ? par : this.get_node(par);\n\t\t\tvar tmp = chk.match(/^move_node|copy_node|create_node$/i) ? par : obj,\n\t\t\t\tchc = this.settings.core.check_callback;\n\t\t\tif(chk === \"move_node\" || chk === \"copy_node\") {\n\t\t\t\tif((!more || !more.is_multi) && (obj.id === par.id || (chk === \"move_node\" && $.inArray(obj.id, par.children) === pos) || $.inArray(par.id, obj.children_d) !== -1)) {\n\t\t\t\t\tthis._data.core.last_error = { 'error' : 'check', 'plugin' : 'core', 'id' : 'core_01', 'reason' : 'Moving parent inside child', 'data' : JSON.stringify({ 'chk' : chk, 'pos' : pos, 'obj' : obj && obj.id ? obj.id : false, 'par' : par && par.id ? par.id : false }) };\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(tmp && tmp.data) { tmp = tmp.data; }\n\t\t\tif(tmp && tmp.functions && (tmp.functions[chk] === false || tmp.functions[chk] === true)) {\n\t\t\t\tif(tmp.functions[chk] === false) {\n\t\t\t\t\tthis._data.core.last_error = { 'error' : 'check', 'plugin' : 'core', 'id' : 'core_02', 'reason' : 'Node data prevents function: ' + chk, 'data' : JSON.stringify({ 'chk' : chk, 'pos' : pos, 'obj' : obj && obj.id ? obj.id : false, 'par' : par && par.id ? par.id : false }) };\n\t\t\t\t}\n\t\t\t\treturn tmp.functions[chk];\n\t\t\t}\n\t\t\tif(chc === false || ($.isFunction(chc) && chc.call(this, chk, obj, par, pos, more) === false) || (chc && chc[chk] === false)) {\n\t\t\t\tthis._data.core.last_error = { 'error' : 'check', 'plugin' : 'core', 'id' : 'core_03', 'reason' : 'User config for core.check_callback prevents function: ' + chk, 'data' : JSON.stringify({ 'chk' : chk, 'pos' : pos, 'obj' : obj && obj.id ? obj.id : false, 'par' : par && par.id ? par.id : false }) };\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\treturn true;\n\t\t},\n\t\t/**\n\t\t * get the last error\n\t\t * @name last_error()\n\t\t * @return {Object}\n\t\t */\n\t\tlast_error : function () {\n\t\t\treturn this._data.core.last_error;\n\t\t},\n\t\t/**\n\t\t * move a node to a new parent\n\t\t * @name move_node(obj, par [, pos, callback, is_loaded])\n\t\t * @param  {mixed} obj the node to move, pass an array to move multiple nodes\n\t\t * @param  {mixed} par the new parent\n\t\t * @param  {mixed} pos the position to insert at (besides integer values, \"first\" and \"last\" are supported, as well as \"before\" and \"after\"), defaults to integer `0`\n\t\t * @param  {function} callback a function to call once the move is completed, receives 3 arguments - the node, the new parent and the position\n\t\t * @param  {Boolean} is_loaded internal parameter indicating if the parent node has been loaded\n\t\t * @param  {Boolean} skip_redraw internal parameter indicating if the tree should be redrawn\n\t\t * @param  {Boolean} instance internal parameter indicating if the node comes from another instance\n\t\t * @trigger move_node.jstree\n\t\t */\n\t\tmove_node : function (obj, par, pos, callback, is_loaded, skip_redraw, origin) {\n\t\t\tvar t1, t2, old_par, old_pos, new_par, old_ins, is_multi, dpc, tmp, i, j, k, l, p;\n\n\t\t\tpar = this.get_node(par);\n\t\t\tpos = pos === undefined ? 0 : pos;\n\t\t\tif(!par) { return false; }\n\t\t\tif(!pos.toString().match(/^(before|after)$/) && !is_loaded && !this.is_loaded(par)) {\n\t\t\t\treturn this.load_node(par, function () { this.move_node(obj, par, pos, callback, true, false, origin); });\n\t\t\t}\n\n\t\t\tif($.isArray(obj)) {\n\t\t\t\tif(obj.length === 1) {\n\t\t\t\t\tobj = obj[0];\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t//obj = obj.slice();\n\t\t\t\t\tfor(t1 = 0, t2 = obj.length; t1 < t2; t1++) {\n\t\t\t\t\t\tif((tmp = this.move_node(obj[t1], par, pos, callback, is_loaded, false, origin))) {\n\t\t\t\t\t\t\tpar = tmp;\n\t\t\t\t\t\t\tpos = \"after\";\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tthis.redraw();\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t\tobj = obj && obj.id ? obj : this.get_node(obj);\n\n\t\t\tif(!obj || obj.id === $.jstree.root) { return false; }\n\n\t\t\told_par = (obj.parent || $.jstree.root).toString();\n\t\t\tnew_par = (!pos.toString().match(/^(before|after)$/) || par.id === $.jstree.root) ? par : this.get_node(par.parent);\n\t\t\told_ins = origin ? origin : (this._model.data[obj.id] ? this : $.jstree.reference(obj.id));\n\t\t\tis_multi = !old_ins || !old_ins._id || (this._id !== old_ins._id);\n\t\t\told_pos = old_ins && old_ins._id && old_par && old_ins._model.data[old_par] && old_ins._model.data[old_par].children ? $.inArray(obj.id, old_ins._model.data[old_par].children) : -1;\n\t\t\tif(old_ins && old_ins._id) {\n\t\t\t\tobj = old_ins._model.data[obj.id];\n\t\t\t}\n\n\t\t\tif(is_multi) {\n\t\t\t\tif((tmp = this.copy_node(obj, par, pos, callback, is_loaded, false, origin))) {\n\t\t\t\t\tif(old_ins) { old_ins.delete_node(obj); }\n\t\t\t\t\treturn tmp;\n\t\t\t\t}\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t//var m = this._model.data;\n\t\t\tif(par.id === $.jstree.root) {\n\t\t\t\tif(pos === \"before\") { pos = \"first\"; }\n\t\t\t\tif(pos === \"after\") { pos = \"last\"; }\n\t\t\t}\n\t\t\tswitch(pos) {\n\t\t\t\tcase \"before\":\n\t\t\t\t\tpos = $.inArray(par.id, new_par.children);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"after\" :\n\t\t\t\t\tpos = $.inArray(par.id, new_par.children) + 1;\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"inside\":\n\t\t\t\tcase \"first\":\n\t\t\t\t\tpos = 0;\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"last\":\n\t\t\t\t\tpos = new_par.children.length;\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tif(!pos) { pos = 0; }\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif(pos > new_par.children.length) { pos = new_par.children.length; }\n\t\t\tif(!this.check(\"move_node\", obj, new_par, pos, { 'core' : true, 'origin' : origin, 'is_multi' : (old_ins && old_ins._id && old_ins._id !== this._id), 'is_foreign' : (!old_ins || !old_ins._id) })) {\n\t\t\t\tthis.settings.core.error.call(this, this._data.core.last_error);\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tif(obj.parent === new_par.id) {\n\t\t\t\tdpc = new_par.children.concat();\n\t\t\t\ttmp = $.inArray(obj.id, dpc);\n\t\t\t\tif(tmp !== -1) {\n\t\t\t\t\tdpc = $.vakata.array_remove(dpc, tmp);\n\t\t\t\t\tif(pos > tmp) { pos--; }\n\t\t\t\t}\n\t\t\t\ttmp = [];\n\t\t\t\tfor(i = 0, j = dpc.length; i < j; i++) {\n\t\t\t\t\ttmp[i >= pos ? i+1 : i] = dpc[i];\n\t\t\t\t}\n\t\t\t\ttmp[pos] = obj.id;\n\t\t\t\tnew_par.children = tmp;\n\t\t\t\tthis._node_changed(new_par.id);\n\t\t\t\tthis.redraw(new_par.id === $.jstree.root);\n\t\t\t}\n\t\t\telse {\n\t\t\t\t// clean old parent and up\n\t\t\t\ttmp = obj.children_d.concat();\n\t\t\t\ttmp.push(obj.id);\n\t\t\t\tfor(i = 0, j = obj.parents.length; i < j; i++) {\n\t\t\t\t\tdpc = [];\n\t\t\t\t\tp = old_ins._model.data[obj.parents[i]].children_d;\n\t\t\t\t\tfor(k = 0, l = p.length; k < l; k++) {\n\t\t\t\t\t\tif($.inArray(p[k], tmp) === -1) {\n\t\t\t\t\t\t\tdpc.push(p[k]);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\told_ins._model.data[obj.parents[i]].children_d = dpc;\n\t\t\t\t}\n\t\t\t\told_ins._model.data[old_par].children = $.vakata.array_remove_item(old_ins._model.data[old_par].children, obj.id);\n\n\t\t\t\t// insert into new parent and up\n\t\t\t\tfor(i = 0, j = new_par.parents.length; i < j; i++) {\n\t\t\t\t\tthis._model.data[new_par.parents[i]].children_d = this._model.data[new_par.parents[i]].children_d.concat(tmp);\n\t\t\t\t}\n\t\t\t\tdpc = [];\n\t\t\t\tfor(i = 0, j = new_par.children.length; i < j; i++) {\n\t\t\t\t\tdpc[i >= pos ? i+1 : i] = new_par.children[i];\n\t\t\t\t}\n\t\t\t\tdpc[pos] = obj.id;\n\t\t\t\tnew_par.children = dpc;\n\t\t\t\tnew_par.children_d.push(obj.id);\n\t\t\t\tnew_par.children_d = new_par.children_d.concat(obj.children_d);\n\n\t\t\t\t// update object\n\t\t\t\tobj.parent = new_par.id;\n\t\t\t\ttmp = new_par.parents.concat();\n\t\t\t\ttmp.unshift(new_par.id);\n\t\t\t\tp = obj.parents.length;\n\t\t\t\tobj.parents = tmp;\n\n\t\t\t\t// update object children\n\t\t\t\ttmp = tmp.concat();\n\t\t\t\tfor(i = 0, j = obj.children_d.length; i < j; i++) {\n\t\t\t\t\tthis._model.data[obj.children_d[i]].parents = this._model.data[obj.children_d[i]].parents.slice(0,p*-1);\n\t\t\t\t\tArray.prototype.push.apply(this._model.data[obj.children_d[i]].parents, tmp);\n\t\t\t\t}\n\n\t\t\t\tif(old_par === $.jstree.root || new_par.id === $.jstree.root) {\n\t\t\t\t\tthis._model.force_full_redraw = true;\n\t\t\t\t}\n\t\t\t\tif(!this._model.force_full_redraw) {\n\t\t\t\t\tthis._node_changed(old_par);\n\t\t\t\t\tthis._node_changed(new_par.id);\n\t\t\t\t}\n\t\t\t\tif(!skip_redraw) {\n\t\t\t\t\tthis.redraw();\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(callback) { callback.call(this, obj, new_par, pos); }\n\t\t\t/**\n\t\t\t * triggered when a node is moved\n\t\t\t * @event\n\t\t\t * @name move_node.jstree\n\t\t\t * @param {Object} node\n\t\t\t * @param {String} parent the parent's ID\n\t\t\t * @param {Number} position the position of the node among the parent's children\n\t\t\t * @param {String} old_parent the old parent of the node\n\t\t\t * @param {Number} old_position the old position of the node\n\t\t\t * @param {Boolean} is_multi do the node and new parent belong to different instances\n\t\t\t * @param {jsTree} old_instance the instance the node came from\n\t\t\t * @param {jsTree} new_instance the instance of the new parent\n\t\t\t */\n\t\t\tthis.trigger('move_node', { \"node\" : obj, \"parent\" : new_par.id, \"position\" : pos, \"old_parent\" : old_par, \"old_position\" : old_pos, 'is_multi' : (old_ins && old_ins._id && old_ins._id !== this._id), 'is_foreign' : (!old_ins || !old_ins._id), 'old_instance' : old_ins, 'new_instance' : this });\n\t\t\treturn obj.id;\n\t\t},\n\t\t/**\n\t\t * copy a node to a new parent\n\t\t * @name copy_node(obj, par [, pos, callback, is_loaded])\n\t\t * @param  {mixed} obj the node to copy, pass an array to copy multiple nodes\n\t\t * @param  {mixed} par the new parent\n\t\t * @param  {mixed} pos the position to insert at (besides integer values, \"first\" and \"last\" are supported, as well as \"before\" and \"after\"), defaults to integer `0`\n\t\t * @param  {function} callback a function to call once the move is completed, receives 3 arguments - the node, the new parent and the position\n\t\t * @param  {Boolean} is_loaded internal parameter indicating if the parent node has been loaded\n\t\t * @param  {Boolean} skip_redraw internal parameter indicating if the tree should be redrawn\n\t\t * @param  {Boolean} instance internal parameter indicating if the node comes from another instance\n\t\t * @trigger model.jstree copy_node.jstree\n\t\t */\n\t\tcopy_node : function (obj, par, pos, callback, is_loaded, skip_redraw, origin) {\n\t\t\tvar t1, t2, dpc, tmp, i, j, node, old_par, new_par, old_ins, is_multi;\n\n\t\t\tpar = this.get_node(par);\n\t\t\tpos = pos === undefined ? 0 : pos;\n\t\t\tif(!par) { return false; }\n\t\t\tif(!pos.toString().match(/^(before|after)$/) && !is_loaded && !this.is_loaded(par)) {\n\t\t\t\treturn this.load_node(par, function () { this.copy_node(obj, par, pos, callback, true, false, origin); });\n\t\t\t}\n\n\t\t\tif($.isArray(obj)) {\n\t\t\t\tif(obj.length === 1) {\n\t\t\t\t\tobj = obj[0];\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t//obj = obj.slice();\n\t\t\t\t\tfor(t1 = 0, t2 = obj.length; t1 < t2; t1++) {\n\t\t\t\t\t\tif((tmp = this.copy_node(obj[t1], par, pos, callback, is_loaded, true, origin))) {\n\t\t\t\t\t\t\tpar = tmp;\n\t\t\t\t\t\t\tpos = \"after\";\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tthis.redraw();\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t\tobj = obj && obj.id ? obj : this.get_node(obj);\n\t\t\tif(!obj || obj.id === $.jstree.root) { return false; }\n\n\t\t\told_par = (obj.parent || $.jstree.root).toString();\n\t\t\tnew_par = (!pos.toString().match(/^(before|after)$/) || par.id === $.jstree.root) ? par : this.get_node(par.parent);\n\t\t\told_ins = origin ? origin : (this._model.data[obj.id] ? this : $.jstree.reference(obj.id));\n\t\t\tis_multi = !old_ins || !old_ins._id || (this._id !== old_ins._id);\n\n\t\t\tif(old_ins && old_ins._id) {\n\t\t\t\tobj = old_ins._model.data[obj.id];\n\t\t\t}\n\n\t\t\tif(par.id === $.jstree.root) {\n\t\t\t\tif(pos === \"before\") { pos = \"first\"; }\n\t\t\t\tif(pos === \"after\") { pos = \"last\"; }\n\t\t\t}\n\t\t\tswitch(pos) {\n\t\t\t\tcase \"before\":\n\t\t\t\t\tpos = $.inArray(par.id, new_par.children);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"after\" :\n\t\t\t\t\tpos = $.inArray(par.id, new_par.children) + 1;\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"inside\":\n\t\t\t\tcase \"first\":\n\t\t\t\t\tpos = 0;\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"last\":\n\t\t\t\t\tpos = new_par.children.length;\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tif(!pos) { pos = 0; }\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif(pos > new_par.children.length) { pos = new_par.children.length; }\n\t\t\tif(!this.check(\"copy_node\", obj, new_par, pos, { 'core' : true, 'origin' : origin, 'is_multi' : (old_ins && old_ins._id && old_ins._id !== this._id), 'is_foreign' : (!old_ins || !old_ins._id) })) {\n\t\t\t\tthis.settings.core.error.call(this, this._data.core.last_error);\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tnode = old_ins ? old_ins.get_json(obj, { no_id : true, no_data : true, no_state : true }) : obj;\n\t\t\tif(!node) { return false; }\n\t\t\tif(node.id === true) { delete node.id; }\n\t\t\tnode = this._parse_model_from_json(node, new_par.id, new_par.parents.concat());\n\t\t\tif(!node) { return false; }\n\t\t\ttmp = this.get_node(node);\n\t\t\tif(obj && obj.state && obj.state.loaded === false) { tmp.state.loaded = false; }\n\t\t\tdpc = [];\n\t\t\tdpc.push(node);\n\t\t\tdpc = dpc.concat(tmp.children_d);\n\t\t\tthis.trigger('model', { \"nodes\" : dpc, \"parent\" : new_par.id });\n\n\t\t\t// insert into new parent and up\n\t\t\tfor(i = 0, j = new_par.parents.length; i < j; i++) {\n\t\t\t\tthis._model.data[new_par.parents[i]].children_d = this._model.data[new_par.parents[i]].children_d.concat(dpc);\n\t\t\t}\n\t\t\tdpc = [];\n\t\t\tfor(i = 0, j = new_par.children.length; i < j; i++) {\n\t\t\t\tdpc[i >= pos ? i+1 : i] = new_par.children[i];\n\t\t\t}\n\t\t\tdpc[pos] = tmp.id;\n\t\t\tnew_par.children = dpc;\n\t\t\tnew_par.children_d.push(tmp.id);\n\t\t\tnew_par.children_d = new_par.children_d.concat(tmp.children_d);\n\n\t\t\tif(new_par.id === $.jstree.root) {\n\t\t\t\tthis._model.force_full_redraw = true;\n\t\t\t}\n\t\t\tif(!this._model.force_full_redraw) {\n\t\t\t\tthis._node_changed(new_par.id);\n\t\t\t}\n\t\t\tif(!skip_redraw) {\n\t\t\t\tthis.redraw(new_par.id === $.jstree.root);\n\t\t\t}\n\t\t\tif(callback) { callback.call(this, tmp, new_par, pos); }\n\t\t\t/**\n\t\t\t * triggered when a node is copied\n\t\t\t * @event\n\t\t\t * @name copy_node.jstree\n\t\t\t * @param {Object} node the copied node\n\t\t\t * @param {Object} original the original node\n\t\t\t * @param {String} parent the parent's ID\n\t\t\t * @param {Number} position the position of the node among the parent's children\n\t\t\t * @param {String} old_parent the old parent of the node\n\t\t\t * @param {Number} old_position the position of the original node\n\t\t\t * @param {Boolean} is_multi do the node and new parent belong to different instances\n\t\t\t * @param {jsTree} old_instance the instance the node came from\n\t\t\t * @param {jsTree} new_instance the instance of the new parent\n\t\t\t */\n\t\t\tthis.trigger('copy_node', { \"node\" : tmp, \"original\" : obj, \"parent\" : new_par.id, \"position\" : pos, \"old_parent\" : old_par, \"old_position\" : old_ins && old_ins._id && old_par && old_ins._model.data[old_par] && old_ins._model.data[old_par].children ? $.inArray(obj.id, old_ins._model.data[old_par].children) : -1,'is_multi' : (old_ins && old_ins._id && old_ins._id !== this._id), 'is_foreign' : (!old_ins || !old_ins._id), 'old_instance' : old_ins, 'new_instance' : this });\n\t\t\treturn tmp.id;\n\t\t},\n\t\t/**\n\t\t * cut a node (a later call to `paste(obj)` would move the node)\n\t\t * @name cut(obj)\n\t\t * @param  {mixed} obj multiple objects can be passed using an array\n\t\t * @trigger cut.jstree\n\t\t */\n\t\tcut : function (obj) {\n\t\t\tif(!obj) { obj = this._data.core.selected.concat(); }\n\t\t\tif(!$.isArray(obj)) { obj = [obj]; }\n\t\t\tif(!obj.length) { return false; }\n\t\t\tvar tmp = [], o, t1, t2;\n\t\t\tfor(t1 = 0, t2 = obj.length; t1 < t2; t1++) {\n\t\t\t\to = this.get_node(obj[t1]);\n\t\t\t\tif(o && o.id && o.id !== $.jstree.root) { tmp.push(o); }\n\t\t\t}\n\t\t\tif(!tmp.length) { return false; }\n\t\t\tccp_node = tmp;\n\t\t\tccp_inst = this;\n\t\t\tccp_mode = 'move_node';\n\t\t\t/**\n\t\t\t * triggered when nodes are added to the buffer for moving\n\t\t\t * @event\n\t\t\t * @name cut.jstree\n\t\t\t * @param {Array} node\n\t\t\t */\n\t\t\tthis.trigger('cut', { \"node\" : obj });\n\t\t},\n\t\t/**\n\t\t * copy a node (a later call to `paste(obj)` would copy the node)\n\t\t * @name copy(obj)\n\t\t * @param  {mixed} obj multiple objects can be passed using an array\n\t\t * @trigger copy.jstree\n\t\t */\n\t\tcopy : function (obj) {\n\t\t\tif(!obj) { obj = this._data.core.selected.concat(); }\n\t\t\tif(!$.isArray(obj)) { obj = [obj]; }\n\t\t\tif(!obj.length) { return false; }\n\t\t\tvar tmp = [], o, t1, t2;\n\t\t\tfor(t1 = 0, t2 = obj.length; t1 < t2; t1++) {\n\t\t\t\to = this.get_node(obj[t1]);\n\t\t\t\tif(o && o.id && o.id !== $.jstree.root) { tmp.push(o); }\n\t\t\t}\n\t\t\tif(!tmp.length) { return false; }\n\t\t\tccp_node = tmp;\n\t\t\tccp_inst = this;\n\t\t\tccp_mode = 'copy_node';\n\t\t\t/**\n\t\t\t * triggered when nodes are added to the buffer for copying\n\t\t\t * @event\n\t\t\t * @name copy.jstree\n\t\t\t * @param {Array} node\n\t\t\t */\n\t\t\tthis.trigger('copy', { \"node\" : obj });\n\t\t},\n\t\t/**\n\t\t * get the current buffer (any nodes that are waiting for a paste operation)\n\t\t * @name get_buffer()\n\t\t * @return {Object} an object consisting of `mode` (\"copy_node\" or \"move_node\"), `node` (an array of objects) and `inst` (the instance)\n\t\t */\n\t\tget_buffer : function () {\n\t\t\treturn { 'mode' : ccp_mode, 'node' : ccp_node, 'inst' : ccp_inst };\n\t\t},\n\t\t/**\n\t\t * check if there is something in the buffer to paste\n\t\t * @name can_paste()\n\t\t * @return {Boolean}\n\t\t */\n\t\tcan_paste : function () {\n\t\t\treturn ccp_mode !== false && ccp_node !== false; // && ccp_inst._model.data[ccp_node];\n\t\t},\n\t\t/**\n\t\t * copy or move the previously cut or copied nodes to a new parent\n\t\t * @name paste(obj [, pos])\n\t\t * @param  {mixed} obj the new parent\n\t\t * @param  {mixed} pos the position to insert at (besides integer, \"first\" and \"last\" are supported), defaults to integer `0`\n\t\t * @trigger paste.jstree\n\t\t */\n\t\tpaste : function (obj, pos) {\n\t\t\tobj = this.get_node(obj);\n\t\t\tif(!obj || !ccp_mode || !ccp_mode.match(/^(copy_node|move_node)$/) || !ccp_node) { return false; }\n\t\t\tif(this[ccp_mode](ccp_node, obj, pos, false, false, false, ccp_inst)) {\n\t\t\t\t/**\n\t\t\t\t * triggered when paste is invoked\n\t\t\t\t * @event\n\t\t\t\t * @name paste.jstree\n\t\t\t\t * @param {String} parent the ID of the receiving node\n\t\t\t\t * @param {Array} node the nodes in the buffer\n\t\t\t\t * @param {String} mode the performed operation - \"copy_node\" or \"move_node\"\n\t\t\t\t */\n\t\t\t\tthis.trigger('paste', { \"parent\" : obj.id, \"node\" : ccp_node, \"mode\" : ccp_mode });\n\t\t\t}\n\t\t\tccp_node = false;\n\t\t\tccp_mode = false;\n\t\t\tccp_inst = false;\n\t\t},\n\t\t/**\n\t\t * clear the buffer of previously copied or cut nodes\n\t\t * @name clear_buffer()\n\t\t * @trigger clear_buffer.jstree\n\t\t */\n\t\tclear_buffer : function () {\n\t\t\tccp_node = false;\n\t\t\tccp_mode = false;\n\t\t\tccp_inst = false;\n\t\t\t/**\n\t\t\t * triggered when the copy / cut buffer is cleared\n\t\t\t * @event\n\t\t\t * @name clear_buffer.jstree\n\t\t\t */\n\t\t\tthis.trigger('clear_buffer');\n\t\t},\n\t\t/**\n\t\t * put a node in edit mode (input field to rename the node)\n\t\t * @name edit(obj [, default_text, callback])\n\t\t * @param  {mixed} obj\n\t\t * @param  {String} default_text the text to populate the input with (if omitted or set to a non-string value the node's text value is used)\n\t\t * @param  {Function} callback a function to be called once the text box is blurred, it is called in the instance's scope and receives the node, a status parameter (true if the rename is successful, false otherwise) and a boolean indicating if the user cancelled the edit. You can access the node's title using .text\n\t\t */\n\t\tedit : function (obj, default_text, callback) {\n\t\t\tvar rtl, w, a, s, t, h1, h2, fn, tmp, cancel = false;\n\t\t\tobj = this.get_node(obj);\n\t\t\tif(!obj) { return false; }\n\t\t\tif(!this.check(\"edit\", obj, this.get_parent(obj))) {\n\t\t\t\tthis.settings.core.error.call(this, this._data.core.last_error);\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\ttmp = obj;\n\t\t\tdefault_text = typeof default_text === 'string' ? default_text : obj.text;\n\t\t\tthis.set_text(obj, \"\");\n\t\t\tobj = this._open_to(obj);\n\t\t\ttmp.text = default_text;\n\n\t\t\trtl = this._data.core.rtl;\n\t\t\tw  = this.element.width();\n\t\t\tthis._data.core.focused = tmp.id;\n\t\t\ta  = obj.children('.jstree-anchor').focus();\n\t\t\ts  = $('<span>');\n\t\t\t/*!\n\t\t\toi = obj.children(\"i:visible\"),\n\t\t\tai = a.children(\"i:visible\"),\n\t\t\tw1 = oi.width() * oi.length,\n\t\t\tw2 = ai.width() * ai.length,\n\t\t\t*/\n\t\t\tt  = default_text;\n\t\t\th1 = $(\"<\"+\"div />\", { css : { \"position\" : \"absolute\", \"top\" : \"-200px\", \"left\" : (rtl ? \"0px\" : \"-1000px\"), \"visibility\" : \"hidden\" } }).appendTo(\"body\");\n\t\t\th2 = $(\"<\"+\"input />\", {\n\t\t\t\t\t\t\"value\" : t,\n\t\t\t\t\t\t\"class\" : \"jstree-rename-input\",\n\t\t\t\t\t\t// \"size\" : t.length,\n\t\t\t\t\t\t\"css\" : {\n\t\t\t\t\t\t\t\"padding\" : \"0\",\n\t\t\t\t\t\t\t\"border\" : \"1px solid silver\",\n\t\t\t\t\t\t\t\"box-sizing\" : \"border-box\",\n\t\t\t\t\t\t\t\"display\" : \"inline-block\",\n\t\t\t\t\t\t\t\"height\" : (this._data.core.li_height) + \"px\",\n\t\t\t\t\t\t\t\"lineHeight\" : (this._data.core.li_height) + \"px\",\n\t\t\t\t\t\t\t\"width\" : \"150px\" // will be set a bit further down\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\"blur\" : $.proxy(function (e) {\n\t\t\t\t\t\t\te.stopImmediatePropagation();\n\t\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t\t\tvar i = s.children(\".jstree-rename-input\"),\n\t\t\t\t\t\t\t\tv = i.val(),\n\t\t\t\t\t\t\t\tf = this.settings.core.force_text,\n\t\t\t\t\t\t\t\tnv;\n\t\t\t\t\t\t\tif(v === \"\") { v = t; }\n\t\t\t\t\t\t\th1.remove();\n\t\t\t\t\t\t\ts.replaceWith(a);\n\t\t\t\t\t\t\ts.remove();\n\t\t\t\t\t\t\tt = f ? t : $('<div></div>').append($.parseHTML(t)).html();\n\t\t\t\t\t\t\tthis.set_text(obj, t);\n\t\t\t\t\t\t\tnv = !!this.rename_node(obj, f ? $('<div></div>').text(v).text() : $('<div></div>').append($.parseHTML(v)).html());\n\t\t\t\t\t\t\tif(!nv) {\n\t\t\t\t\t\t\t\tthis.set_text(obj, t); // move this up? and fix #483\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tthis._data.core.focused = tmp.id;\n\t\t\t\t\t\t\tsetTimeout($.proxy(function () {\n\t\t\t\t\t\t\t\tvar node = this.get_node(tmp.id, true);\n\t\t\t\t\t\t\t\tif(node.length) {\n\t\t\t\t\t\t\t\t\tthis._data.core.focused = tmp.id;\n\t\t\t\t\t\t\t\t\tnode.children('.jstree-anchor').focus();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}, this), 0);\n\t\t\t\t\t\t\tif(callback) {\n\t\t\t\t\t\t\t\tcallback.call(this, tmp, nv, cancel);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\th2 = null;\n\t\t\t\t\t\t}, this),\n\t\t\t\t\t\t\"keydown\" : function (e) {\n\t\t\t\t\t\t\tvar key = e.which;\n\t\t\t\t\t\t\tif(key === 27) {\n\t\t\t\t\t\t\t\tcancel = true;\n\t\t\t\t\t\t\t\tthis.value = t;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif(key === 27 || key === 13 || key === 37 || key === 38 || key === 39 || key === 40 || key === 32) {\n\t\t\t\t\t\t\t\te.stopImmediatePropagation();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif(key === 27 || key === 13) {\n\t\t\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t\t\t\tthis.blur();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\"click\" : function (e) { e.stopImmediatePropagation(); },\n\t\t\t\t\t\t\"mousedown\" : function (e) { e.stopImmediatePropagation(); },\n\t\t\t\t\t\t\"keyup\" : function (e) {\n\t\t\t\t\t\t\th2.width(Math.min(h1.text(\"pW\" + this.value).width(),w));\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\"keypress\" : function(e) {\n\t\t\t\t\t\t\tif(e.which === 13) { return false; }\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\tfn = {\n\t\t\t\t\t\tfontFamily\t\t: a.css('fontFamily')\t\t|| '',\n\t\t\t\t\t\tfontSize\t\t: a.css('fontSize')\t\t\t|| '',\n\t\t\t\t\t\tfontWeight\t\t: a.css('fontWeight')\t\t|| '',\n\t\t\t\t\t\tfontStyle\t\t: a.css('fontStyle')\t\t|| '',\n\t\t\t\t\t\tfontStretch\t\t: a.css('fontStretch')\t\t|| '',\n\t\t\t\t\t\tfontVariant\t\t: a.css('fontVariant')\t\t|| '',\n\t\t\t\t\t\tletterSpacing\t: a.css('letterSpacing')\t|| '',\n\t\t\t\t\t\twordSpacing\t\t: a.css('wordSpacing')\t\t|| ''\n\t\t\t\t};\n\t\t\ts.attr('class', a.attr('class')).append(a.contents().clone()).append(h2);\n\t\t\ta.replaceWith(s);\n\t\t\th1.css(fn);\n\t\t\th2.css(fn).width(Math.min(h1.text(\"pW\" + h2[0].value).width(),w))[0].select();\n\t\t\t$(document).one('mousedown.jstree touchstart.jstree dnd_start.vakata', function (e) {\n\t\t\t\tif (h2 && e.target !== h2) {\n\t\t\t\t\t$(h2).blur();\n\t\t\t\t}\n\t\t\t});\n\t\t},\n\n\n\t\t/**\n\t\t * changes the theme\n\t\t * @name set_theme(theme_name [, theme_url])\n\t\t * @param {String} theme_name the name of the new theme to apply\n\t\t * @param {mixed} theme_url  the location of the CSS file for this theme. Omit or set to `false` if you manually included the file. Set to `true` to autoload from the `core.themes.dir` directory.\n\t\t * @trigger set_theme.jstree\n\t\t */\n\t\tset_theme : function (theme_name, theme_url) {\n\t\t\tif(!theme_name) { return false; }\n\t\t\tif(theme_url === true) {\n\t\t\t\tvar dir = this.settings.core.themes.dir;\n\t\t\t\tif(!dir) { dir = $.jstree.path + '/themes'; }\n\t\t\t\ttheme_url = dir + '/' + theme_name + '/style.css';\n\t\t\t}\n\t\t\tif(theme_url && $.inArray(theme_url, themes_loaded) === -1) {\n\t\t\t\t$('head').append('<'+'link rel=\"stylesheet\" href=\"' + theme_url + '\" type=\"text/css\" />');\n\t\t\t\tthemes_loaded.push(theme_url);\n\t\t\t}\n\t\t\tif(this._data.core.themes.name) {\n\t\t\t\tthis.element.removeClass('jstree-' + this._data.core.themes.name);\n\t\t\t}\n\t\t\tthis._data.core.themes.name = theme_name;\n\t\t\tthis.element.addClass('jstree-' + theme_name);\n\t\t\tthis.element[this.settings.core.themes.responsive ? 'addClass' : 'removeClass' ]('jstree-' + theme_name + '-responsive');\n\t\t\t/**\n\t\t\t * triggered when a theme is set\n\t\t\t * @event\n\t\t\t * @name set_theme.jstree\n\t\t\t * @param {String} theme the new theme\n\t\t\t */\n\t\t\tthis.trigger('set_theme', { 'theme' : theme_name });\n\t\t},\n\t\t/**\n\t\t * gets the name of the currently applied theme name\n\t\t * @name get_theme()\n\t\t * @return {String}\n\t\t */\n\t\tget_theme : function () { return this._data.core.themes.name; },\n\t\t/**\n\t\t * changes the theme variant (if the theme has variants)\n\t\t * @name set_theme_variant(variant_name)\n\t\t * @param {String|Boolean} variant_name the variant to apply (if `false` is used the current variant is removed)\n\t\t */\n\t\tset_theme_variant : function (variant_name) {\n\t\t\tif(this._data.core.themes.variant) {\n\t\t\t\tthis.element.removeClass('jstree-' + this._data.core.themes.name + '-' + this._data.core.themes.variant);\n\t\t\t}\n\t\t\tthis._data.core.themes.variant = variant_name;\n\t\t\tif(variant_name) {\n\t\t\t\tthis.element.addClass('jstree-' + this._data.core.themes.name + '-' + this._data.core.themes.variant);\n\t\t\t}\n\t\t},\n\t\t/**\n\t\t * gets the name of the currently applied theme variant\n\t\t * @name get_theme()\n\t\t * @return {String}\n\t\t */\n\t\tget_theme_variant : function () { return this._data.core.themes.variant; },\n\t\t/**\n\t\t * shows a striped background on the container (if the theme supports it)\n\t\t * @name show_stripes()\n\t\t */\n\t\tshow_stripes : function () {\n\t\t\tthis._data.core.themes.stripes = true;\n\t\t\tthis.get_container_ul().addClass(\"jstree-striped\");\n\t\t\t/**\n\t\t\t * triggered when stripes are shown\n\t\t\t * @event\n\t\t\t * @name show_stripes.jstree\n\t\t\t */\n\t\t\tthis.trigger('show_stripes');\n\t\t},\n\t\t/**\n\t\t * hides the striped background on the container\n\t\t * @name hide_stripes()\n\t\t */\n\t\thide_stripes : function () {\n\t\t\tthis._data.core.themes.stripes = false;\n\t\t\tthis.get_container_ul().removeClass(\"jstree-striped\");\n\t\t\t/**\n\t\t\t * triggered when stripes are hidden\n\t\t\t * @event\n\t\t\t * @name hide_stripes.jstree\n\t\t\t */\n\t\t\tthis.trigger('hide_stripes');\n\t\t},\n\t\t/**\n\t\t * toggles the striped background on the container\n\t\t * @name toggle_stripes()\n\t\t */\n\t\ttoggle_stripes : function () { if(this._data.core.themes.stripes) { this.hide_stripes(); } else { this.show_stripes(); } },\n\t\t/**\n\t\t * shows the connecting dots (if the theme supports it)\n\t\t * @name show_dots()\n\t\t */\n\t\tshow_dots : function () {\n\t\t\tthis._data.core.themes.dots = true;\n\t\t\tthis.get_container_ul().removeClass(\"jstree-no-dots\");\n\t\t\t/**\n\t\t\t * triggered when dots are shown\n\t\t\t * @event\n\t\t\t * @name show_dots.jstree\n\t\t\t */\n\t\t\tthis.trigger('show_dots');\n\t\t},\n\t\t/**\n\t\t * hides the connecting dots\n\t\t * @name hide_dots()\n\t\t */\n\t\thide_dots : function () {\n\t\t\tthis._data.core.themes.dots = false;\n\t\t\tthis.get_container_ul().addClass(\"jstree-no-dots\");\n\t\t\t/**\n\t\t\t * triggered when dots are hidden\n\t\t\t * @event\n\t\t\t * @name hide_dots.jstree\n\t\t\t */\n\t\t\tthis.trigger('hide_dots');\n\t\t},\n\t\t/**\n\t\t * toggles the connecting dots\n\t\t * @name toggle_dots()\n\t\t */\n\t\ttoggle_dots : function () { if(this._data.core.themes.dots) { this.hide_dots(); } else { this.show_dots(); } },\n\t\t/**\n\t\t * show the node icons\n\t\t * @name show_icons()\n\t\t */\n\t\tshow_icons : function () {\n\t\t\tthis._data.core.themes.icons = true;\n\t\t\tthis.get_container_ul().removeClass(\"jstree-no-icons\");\n\t\t\t/**\n\t\t\t * triggered when icons are shown\n\t\t\t * @event\n\t\t\t * @name show_icons.jstree\n\t\t\t */\n\t\t\tthis.trigger('show_icons');\n\t\t},\n\t\t/**\n\t\t * hide the node icons\n\t\t * @name hide_icons()\n\t\t */\n\t\thide_icons : function () {\n\t\t\tthis._data.core.themes.icons = false;\n\t\t\tthis.get_container_ul().addClass(\"jstree-no-icons\");\n\t\t\t/**\n\t\t\t * triggered when icons are hidden\n\t\t\t * @event\n\t\t\t * @name hide_icons.jstree\n\t\t\t */\n\t\t\tthis.trigger('hide_icons');\n\t\t},\n\t\t/**\n\t\t * toggle the node icons\n\t\t * @name toggle_icons()\n\t\t */\n\t\ttoggle_icons : function () { if(this._data.core.themes.icons) { this.hide_icons(); } else { this.show_icons(); } },\n\t\t/**\n\t\t * show the node ellipsis\n\t\t * @name show_icons()\n\t\t */\n\t\tshow_ellipsis : function () {\n\t\t\tthis._data.core.themes.ellipsis = true;\n\t\t\tthis.get_container_ul().addClass(\"jstree-ellipsis\");\n\t\t\t/**\n\t\t\t * triggered when ellisis is shown\n\t\t\t * @event\n\t\t\t * @name show_ellipsis.jstree\n\t\t\t */\n\t\t\tthis.trigger('show_ellipsis');\n\t\t},\n\t\t/**\n\t\t * hide the node ellipsis\n\t\t * @name hide_ellipsis()\n\t\t */\n\t\thide_ellipsis : function () {\n\t\t\tthis._data.core.themes.ellipsis = false;\n\t\t\tthis.get_container_ul().removeClass(\"jstree-ellipsis\");\n\t\t\t/**\n\t\t\t * triggered when ellisis is hidden\n\t\t\t * @event\n\t\t\t * @name hide_ellipsis.jstree\n\t\t\t */\n\t\t\tthis.trigger('hide_ellipsis');\n\t\t},\n\t\t/**\n\t\t * toggle the node ellipsis\n\t\t * @name toggle_icons()\n\t\t */\n\t\ttoggle_ellipsis : function () { if(this._data.core.themes.ellipsis) { this.hide_ellipsis(); } else { this.show_ellipsis(); } },\n\t\t/**\n\t\t * set the node icon for a node\n\t\t * @name set_icon(obj, icon)\n\t\t * @param {mixed} obj\n\t\t * @param {String} icon the new icon - can be a path to an icon or a className, if using an image that is in the current directory use a `./` prefix, otherwise it will be detected as a class\n\t\t */\n\t\tset_icon : function (obj, icon) {\n\t\t\tvar t1, t2, dom, old;\n\t\t\tif($.isArray(obj)) {\n\t\t\t\tobj = obj.slice();\n\t\t\t\tfor(t1 = 0, t2 = obj.length; t1 < t2; t1++) {\n\t\t\t\t\tthis.set_icon(obj[t1], icon);\n\t\t\t\t}\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\tobj = this.get_node(obj);\n\t\t\tif(!obj || obj.id === $.jstree.root) { return false; }\n\t\t\told = obj.icon;\n\t\t\tobj.icon = icon === true || icon === null || icon === undefined || icon === '' ? true : icon;\n\t\t\tdom = this.get_node(obj, true).children(\".jstree-anchor\").children(\".jstree-themeicon\");\n\t\t\tif(icon === false) {\n\t\t\t\tthis.hide_icon(obj);\n\t\t\t}\n\t\t\telse if(icon === true || icon === null || icon === undefined || icon === '') {\n\t\t\t\tdom.removeClass('jstree-themeicon-custom ' + old).css(\"background\",\"\").removeAttr(\"rel\");\n\t\t\t\tif(old === false) { this.show_icon(obj); }\n\t\t\t}\n\t\t\telse if(icon.indexOf(\"/\") === -1 && icon.indexOf(\".\") === -1) {\n\t\t\t\tdom.removeClass(old).css(\"background\",\"\");\n\t\t\t\tdom.addClass(icon + ' jstree-themeicon-custom').attr(\"rel\",icon);\n\t\t\t\tif(old === false) { this.show_icon(obj); }\n\t\t\t}\n\t\t\telse {\n\t\t\t\tdom.removeClass(old).css(\"background\",\"\");\n\t\t\t\tdom.addClass('jstree-themeicon-custom').css(\"background\", \"url('\" + icon + \"') center center no-repeat\").attr(\"rel\",icon);\n\t\t\t\tif(old === false) { this.show_icon(obj); }\n\t\t\t}\n\t\t\treturn true;\n\t\t},\n\t\t/**\n\t\t * get the node icon for a node\n\t\t * @name get_icon(obj)\n\t\t * @param {mixed} obj\n\t\t * @return {String}\n\t\t */\n\t\tget_icon : function (obj) {\n\t\t\tobj = this.get_node(obj);\n\t\t\treturn (!obj || obj.id === $.jstree.root) ? false : obj.icon;\n\t\t},\n\t\t/**\n\t\t * hide the icon on an individual node\n\t\t * @name hide_icon(obj)\n\t\t * @param {mixed} obj\n\t\t */\n\t\thide_icon : function (obj) {\n\t\t\tvar t1, t2;\n\t\t\tif($.isArray(obj)) {\n\t\t\t\tobj = obj.slice();\n\t\t\t\tfor(t1 = 0, t2 = obj.length; t1 < t2; t1++) {\n\t\t\t\t\tthis.hide_icon(obj[t1]);\n\t\t\t\t}\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\tobj = this.get_node(obj);\n\t\t\tif(!obj || obj === $.jstree.root) { return false; }\n\t\t\tobj.icon = false;\n\t\t\tthis.get_node(obj, true).children(\".jstree-anchor\").children(\".jstree-themeicon\").addClass('jstree-themeicon-hidden');\n\t\t\treturn true;\n\t\t},\n\t\t/**\n\t\t * show the icon on an individual node\n\t\t * @name show_icon(obj)\n\t\t * @param {mixed} obj\n\t\t */\n\t\tshow_icon : function (obj) {\n\t\t\tvar t1, t2, dom;\n\t\t\tif($.isArray(obj)) {\n\t\t\t\tobj = obj.slice();\n\t\t\t\tfor(t1 = 0, t2 = obj.length; t1 < t2; t1++) {\n\t\t\t\t\tthis.show_icon(obj[t1]);\n\t\t\t\t}\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\tobj = this.get_node(obj);\n\t\t\tif(!obj || obj === $.jstree.root) { return false; }\n\t\t\tdom = this.get_node(obj, true);\n\t\t\tobj.icon = dom.length ? dom.children(\".jstree-anchor\").children(\".jstree-themeicon\").attr('rel') : true;\n\t\t\tif(!obj.icon) { obj.icon = true; }\n\t\t\tdom.children(\".jstree-anchor\").children(\".jstree-themeicon\").removeClass('jstree-themeicon-hidden');\n\t\t\treturn true;\n\t\t}\n\t};\n\n\t// helpers\n\t$.vakata = {};\n\t// collect attributes\n\t$.vakata.attributes = function(node, with_values) {\n\t\tnode = $(node)[0];\n\t\tvar attr = with_values ? {} : [];\n\t\tif(node && node.attributes) {\n\t\t\t$.each(node.attributes, function (i, v) {\n\t\t\t\tif($.inArray(v.name.toLowerCase(),['style','contenteditable','hasfocus','tabindex']) !== -1) { return; }\n\t\t\t\tif(v.value !== null && $.trim(v.value) !== '') {\n\t\t\t\t\tif(with_values) { attr[v.name] = v.value; }\n\t\t\t\t\telse { attr.push(v.name); }\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t\treturn attr;\n\t};\n\t$.vakata.array_unique = function(array) {\n\t\tvar a = [], i, j, l, o = {};\n\t\tfor(i = 0, l = array.length; i < l; i++) {\n\t\t\tif(o[array[i]] === undefined) {\n\t\t\t\ta.push(array[i]);\n\t\t\t\to[array[i]] = true;\n\t\t\t}\n\t\t}\n\t\treturn a;\n\t};\n\t// remove item from array\n\t$.vakata.array_remove = function(array, from) {\n\t\tarray.splice(from, 1);\n\t\treturn array;\n\t\t//var rest = array.slice((to || from) + 1 || array.length);\n\t\t//array.length = from < 0 ? array.length + from : from;\n\t\t//array.push.apply(array, rest);\n\t\t//return array;\n\t};\n\t// remove item from array\n\t$.vakata.array_remove_item = function(array, item) {\n\t\tvar tmp = $.inArray(item, array);\n\t\treturn tmp !== -1 ? $.vakata.array_remove(array, tmp) : array;\n\t};\n\t$.vakata.array_filter = function(c,a,b,d,e) {\n\t\tif (c.filter) {\n\t\t\treturn c.filter(a, b);\n\t\t}\n\t\td=[];\n\t\tfor (e in c) {\n\t\t\tif (~~e+''===e+'' && e>=0 && a.call(b,c[e],+e,c)) {\n\t\t\t\td.push(c[e]);\n\t\t\t}\n\t\t}\n\t\treturn d;\n\t};\n\n\n/**\n * ### Changed plugin\n *\n * This plugin adds more information to the `changed.jstree` event. The new data is contained in the `changed` event data property, and contains a lists of `selected` and `deselected` nodes.\n */\n\n\t$.jstree.plugins.changed = function (options, parent) {\n\t\tvar last = [];\n\t\tthis.trigger = function (ev, data) {\n\t\t\tvar i, j;\n\t\t\tif(!data) {\n\t\t\t\tdata = {};\n\t\t\t}\n\t\t\tif(ev.replace('.jstree','') === 'changed') {\n\t\t\t\tdata.changed = { selected : [], deselected : [] };\n\t\t\t\tvar tmp = {};\n\t\t\t\tfor(i = 0, j = last.length; i < j; i++) {\n\t\t\t\t\ttmp[last[i]] = 1;\n\t\t\t\t}\n\t\t\t\tfor(i = 0, j = data.selected.length; i < j; i++) {\n\t\t\t\t\tif(!tmp[data.selected[i]]) {\n\t\t\t\t\t\tdata.changed.selected.push(data.selected[i]);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\ttmp[data.selected[i]] = 2;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tfor(i = 0, j = last.length; i < j; i++) {\n\t\t\t\t\tif(tmp[last[i]] === 1) {\n\t\t\t\t\t\tdata.changed.deselected.push(last[i]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tlast = data.selected.slice();\n\t\t\t}\n\t\t\t/**\n\t\t\t * triggered when selection changes (the \"changed\" plugin enhances the original event with more data)\n\t\t\t * @event\n\t\t\t * @name changed.jstree\n\t\t\t * @param {Object} node\n\t\t\t * @param {Object} action the action that caused the selection to change\n\t\t\t * @param {Array} selected the current selection\n\t\t\t * @param {Object} changed an object containing two properties `selected` and `deselected` - both arrays of node IDs, which were selected or deselected since the last changed event\n\t\t\t * @param {Object} event the event (if any) that triggered this changed event\n\t\t\t * @plugin changed\n\t\t\t */\n\t\t\tparent.trigger.call(this, ev, data);\n\t\t};\n\t\tthis.refresh = function (skip_loading, forget_state) {\n\t\t\tlast = [];\n\t\t\treturn parent.refresh.apply(this, arguments);\n\t\t};\n\t};\n\n/**\n * ### Checkbox plugin\n *\n * This plugin renders checkbox icons in front of each node, making multiple selection much easier.\n * It also supports tri-state behavior, meaning that if a node has a few of its children checked it will be rendered as undetermined, and state will be propagated up.\n */\n\n\tvar _i = document.createElement('I');\n\t_i.className = 'jstree-icon jstree-checkbox';\n\t_i.setAttribute('role', 'presentation');\n\t/**\n\t * stores all defaults for the checkbox plugin\n\t * @name $.jstree.defaults.checkbox\n\t * @plugin checkbox\n\t */\n\t$.jstree.defaults.checkbox = {\n\t\t/**\n\t\t * a boolean indicating if checkboxes should be visible (can be changed at a later time using `show_checkboxes()` and `hide_checkboxes`). Defaults to `true`.\n\t\t * @name $.jstree.defaults.checkbox.visible\n\t\t * @plugin checkbox\n\t\t */\n\t\tvisible\t\t\t\t: true,\n\t\t/**\n\t\t * a boolean indicating if checkboxes should cascade down and have an undetermined state. Defaults to `true`.\n\t\t * @name $.jstree.defaults.checkbox.three_state\n\t\t * @plugin checkbox\n\t\t */\n\t\tthree_state\t\t\t: true,\n\t\t/**\n\t\t * a boolean indicating if clicking anywhere on the node should act as clicking on the checkbox. Defaults to `true`.\n\t\t * @name $.jstree.defaults.checkbox.whole_node\n\t\t * @plugin checkbox\n\t\t */\n\t\twhole_node\t\t\t: true,\n\t\t/**\n\t\t * a boolean indicating if the selected style of a node should be kept, or removed. Defaults to `true`.\n\t\t * @name $.jstree.defaults.checkbox.keep_selected_style\n\t\t * @plugin checkbox\n\t\t */\n\t\tkeep_selected_style\t: true,\n\t\t/**\n\t\t * This setting controls how cascading and undetermined nodes are applied.\n\t\t * If 'up' is in the string - cascading up is enabled, if 'down' is in the string - cascading down is enabled, if 'undetermined' is in the string - undetermined nodes will be used.\n\t\t * If `three_state` is set to `true` this setting is automatically set to 'up+down+undetermined'. Defaults to ''.\n\t\t * @name $.jstree.defaults.checkbox.cascade\n\t\t * @plugin checkbox\n\t\t */\n\t\tcascade\t\t\t\t: '',\n\t\t/**\n\t\t * This setting controls if checkbox are bound to the general tree selection or to an internal array maintained by the checkbox plugin. Defaults to `true`, only set to `false` if you know exactly what you are doing.\n\t\t * @name $.jstree.defaults.checkbox.tie_selection\n\t\t * @plugin checkbox\n\t\t */\n\t\ttie_selection\t\t: true,\n\n\t\t/**\n\t\t * This setting controls if cascading down affects disabled checkboxes\n\t\t * @name $.jstree.defaults.checkbox.cascade_to_disabled\n\t\t * @plugin checkbox\n\t\t */\n\t\tcascade_to_disabled : true,\n\n\t\t/**\n\t\t * This setting controls if cascading down affects hidden checkboxes\n\t\t * @name $.jstree.defaults.checkbox.cascade_to_hidden\n\t\t * @plugin checkbox\n\t\t */\n\t\tcascade_to_hidden : true\n\t};\n\t$.jstree.plugins.checkbox = function (options, parent) {\n\t\tthis.bind = function () {\n\t\t\tparent.bind.call(this);\n\t\t\tthis._data.checkbox.uto = false;\n\t\t\tthis._data.checkbox.selected = [];\n\t\t\tif(this.settings.checkbox.three_state) {\n\t\t\t\tthis.settings.checkbox.cascade = 'up+down+undetermined';\n\t\t\t}\n\t\t\tthis.element\n\t\t\t\t.on(\"init.jstree\", $.proxy(function () {\n\t\t\t\t\t\tthis._data.checkbox.visible = this.settings.checkbox.visible;\n\t\t\t\t\t\tif(!this.settings.checkbox.keep_selected_style) {\n\t\t\t\t\t\t\tthis.element.addClass('jstree-checkbox-no-clicked');\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(this.settings.checkbox.tie_selection) {\n\t\t\t\t\t\t\tthis.element.addClass('jstree-checkbox-selection');\n\t\t\t\t\t\t}\n\t\t\t\t\t}, this))\n\t\t\t\t.on(\"loading.jstree\", $.proxy(function () {\n\t\t\t\t\t\tthis[ this._data.checkbox.visible ? 'show_checkboxes' : 'hide_checkboxes' ]();\n\t\t\t\t\t}, this));\n\t\t\tif(this.settings.checkbox.cascade.indexOf('undetermined') !== -1) {\n\t\t\t\tthis.element\n\t\t\t\t\t.on('changed.jstree uncheck_node.jstree check_node.jstree uncheck_all.jstree check_all.jstree move_node.jstree copy_node.jstree redraw.jstree open_node.jstree', $.proxy(function () {\n\t\t\t\t\t\t\t// only if undetermined is in setting\n\t\t\t\t\t\t\tif(this._data.checkbox.uto) { clearTimeout(this._data.checkbox.uto); }\n\t\t\t\t\t\t\tthis._data.checkbox.uto = setTimeout($.proxy(this._undetermined, this), 50);\n\t\t\t\t\t\t}, this));\n\t\t\t}\n\t\t\tif(!this.settings.checkbox.tie_selection) {\n\t\t\t\tthis.element\n\t\t\t\t\t.on('model.jstree', $.proxy(function (e, data) {\n\t\t\t\t\t\tvar m = this._model.data,\n\t\t\t\t\t\t\tp = m[data.parent],\n\t\t\t\t\t\t\tdpc = data.nodes,\n\t\t\t\t\t\t\ti, j;\n\t\t\t\t\t\tfor(i = 0, j = dpc.length; i < j; i++) {\n\t\t\t\t\t\t\tm[dpc[i]].state.checked = m[dpc[i]].state.checked || (m[dpc[i]].original && m[dpc[i]].original.state && m[dpc[i]].original.state.checked);\n\t\t\t\t\t\t\tif(m[dpc[i]].state.checked) {\n\t\t\t\t\t\t\t\tthis._data.checkbox.selected.push(dpc[i]);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}, this));\n\t\t\t}\n\t\t\tif(this.settings.checkbox.cascade.indexOf('up') !== -1 || this.settings.checkbox.cascade.indexOf('down') !== -1) {\n\t\t\t\tthis.element\n\t\t\t\t\t.on('model.jstree', $.proxy(function (e, data) {\n\t\t\t\t\t\t\tvar m = this._model.data,\n\t\t\t\t\t\t\t\tp = m[data.parent],\n\t\t\t\t\t\t\t\tdpc = data.nodes,\n\t\t\t\t\t\t\t\tchd = [],\n\t\t\t\t\t\t\t\tc, i, j, k, l, tmp, s = this.settings.checkbox.cascade, t = this.settings.checkbox.tie_selection;\n\n\t\t\t\t\t\t\tif(s.indexOf('down') !== -1) {\n\t\t\t\t\t\t\t\t// apply down\n\t\t\t\t\t\t\t\tif(p.state[ t ? 'selected' : 'checked' ]) {\n\t\t\t\t\t\t\t\t\tfor(i = 0, j = dpc.length; i < j; i++) {\n\t\t\t\t\t\t\t\t\t\tm[dpc[i]].state[ t ? 'selected' : 'checked' ] = true;\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\tthis._data[ t ? 'core' : 'checkbox' ].selected = this._data[ t ? 'core' : 'checkbox' ].selected.concat(dpc);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\tfor(i = 0, j = dpc.length; i < j; i++) {\n\t\t\t\t\t\t\t\t\t\tif(m[dpc[i]].state[ t ? 'selected' : 'checked' ]) {\n\t\t\t\t\t\t\t\t\t\t\tfor(k = 0, l = m[dpc[i]].children_d.length; k < l; k++) {\n\t\t\t\t\t\t\t\t\t\t\t\tm[m[dpc[i]].children_d[k]].state[ t ? 'selected' : 'checked' ] = true;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tthis._data[ t ? 'core' : 'checkbox' ].selected = this._data[ t ? 'core' : 'checkbox' ].selected.concat(m[dpc[i]].children_d);\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif(s.indexOf('up') !== -1) {\n\t\t\t\t\t\t\t\t// apply up\n\t\t\t\t\t\t\t\tfor(i = 0, j = p.children_d.length; i < j; i++) {\n\t\t\t\t\t\t\t\t\tif(!m[p.children_d[i]].children.length) {\n\t\t\t\t\t\t\t\t\t\tchd.push(m[p.children_d[i]].parent);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tchd = $.vakata.array_unique(chd);\n\t\t\t\t\t\t\t\tfor(k = 0, l = chd.length; k < l; k++) {\n\t\t\t\t\t\t\t\t\tp = m[chd[k]];\n\t\t\t\t\t\t\t\t\twhile(p && p.id !== $.jstree.root) {\n\t\t\t\t\t\t\t\t\t\tc = 0;\n\t\t\t\t\t\t\t\t\t\tfor(i = 0, j = p.children.length; i < j; i++) {\n\t\t\t\t\t\t\t\t\t\t\tc += m[p.children[i]].state[ t ? 'selected' : 'checked' ];\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tif(c === j) {\n\t\t\t\t\t\t\t\t\t\t\tp.state[ t ? 'selected' : 'checked' ] = true;\n\t\t\t\t\t\t\t\t\t\t\tthis._data[ t ? 'core' : 'checkbox' ].selected.push(p.id);\n\t\t\t\t\t\t\t\t\t\t\ttmp = this.get_node(p, true);\n\t\t\t\t\t\t\t\t\t\t\tif(tmp && tmp.length) {\n\t\t\t\t\t\t\t\t\t\t\t\ttmp.attr('aria-selected', true).children('.jstree-anchor').addClass( t ? 'jstree-clicked' : 'jstree-checked');\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tp = this.get_node(p.parent);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tthis._data[ t ? 'core' : 'checkbox' ].selected = $.vakata.array_unique(this._data[ t ? 'core' : 'checkbox' ].selected);\n\t\t\t\t\t\t}, this))\n\t\t\t\t\t.on(this.settings.checkbox.tie_selection ? 'select_node.jstree' : 'check_node.jstree', $.proxy(function (e, data) {\n\t\t\t\t\t\t\tvar self = this,\n\t\t\t\t\t\t\t\tobj = data.node,\n\t\t\t\t\t\t\t\tm = this._model.data,\n\t\t\t\t\t\t\t\tpar = this.get_node(obj.parent),\n\t\t\t\t\t\t\t\ti, j, c, tmp, s = this.settings.checkbox.cascade, t = this.settings.checkbox.tie_selection,\n\t\t\t\t\t\t\t\tsel = {}, cur = this._data[ t ? 'core' : 'checkbox' ].selected;\n\n\t\t\t\t\t\t\tfor (i = 0, j = cur.length; i < j; i++) {\n\t\t\t\t\t\t\t\tsel[cur[i]] = true;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// apply down\n\t\t\t\t\t\t\tif(s.indexOf('down') !== -1) {\n\t\t\t\t\t\t\t\t//this._data[ t ? 'core' : 'checkbox' ].selected = $.vakata.array_unique(this._data[ t ? 'core' : 'checkbox' ].selected.concat(obj.children_d));\n\t\t\t\t\t\t\t\tvar selectedIds = this._cascade_new_checked_state(obj.id, true);\n                                obj.children_d.concat(obj.id).forEach(function(id) {\n                                    if (selectedIds.indexOf(id) > -1) {\n                                        sel[id] = true;\n                                    }\n                                    else {\n                                        delete sel[id];\n                                    }\n                                });\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// apply up\n\t\t\t\t\t\t\tif(s.indexOf('up') !== -1) {\n\t\t\t\t\t\t\t\twhile(par && par.id !== $.jstree.root) {\n\t\t\t\t\t\t\t\t\tc = 0;\n\t\t\t\t\t\t\t\t\tfor(i = 0, j = par.children.length; i < j; i++) {\n\t\t\t\t\t\t\t\t\t\tc += m[par.children[i]].state[ t ? 'selected' : 'checked' ];\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tif(c === j) {\n\t\t\t\t\t\t\t\t\t\tpar.state[ t ? 'selected' : 'checked' ] = true;\n\t\t\t\t\t\t\t\t\t\tsel[par.id] = true;\n\t\t\t\t\t\t\t\t\t\t//this._data[ t ? 'core' : 'checkbox' ].selected.push(par.id);\n\t\t\t\t\t\t\t\t\t\ttmp = this.get_node(par, true);\n\t\t\t\t\t\t\t\t\t\tif(tmp && tmp.length) {\n\t\t\t\t\t\t\t\t\t\t\ttmp.attr('aria-selected', true).children('.jstree-anchor').addClass(t ? 'jstree-clicked' : 'jstree-checked');\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tpar = this.get_node(par.parent);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tcur = [];\n\t\t\t\t\t\t\tfor (i in sel) {\n\t\t\t\t\t\t\t\tif (sel.hasOwnProperty(i)) {\n\t\t\t\t\t\t\t\t\tcur.push(i);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tthis._data[ t ? 'core' : 'checkbox' ].selected = cur;\n\t\t\t\t\t\t}, this))\n\t\t\t\t\t.on(this.settings.checkbox.tie_selection ? 'deselect_all.jstree' : 'uncheck_all.jstree', $.proxy(function (e, data) {\n\t\t\t\t\t\t\tvar obj = this.get_node($.jstree.root),\n\t\t\t\t\t\t\t\tm = this._model.data,\n\t\t\t\t\t\t\t\ti, j, tmp;\n\t\t\t\t\t\t\tfor(i = 0, j = obj.children_d.length; i < j; i++) {\n\t\t\t\t\t\t\t\ttmp = m[obj.children_d[i]];\n\t\t\t\t\t\t\t\tif(tmp && tmp.original && tmp.original.state && tmp.original.state.undetermined) {\n\t\t\t\t\t\t\t\t\ttmp.original.state.undetermined = false;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}, this))\n\t\t\t\t\t.on(this.settings.checkbox.tie_selection ? 'deselect_node.jstree' : 'uncheck_node.jstree', $.proxy(function (e, data) {\n\t\t\t\t\t\t\tvar self = this,\n\t\t\t\t\t\t\t\tobj = data.node,\n\t\t\t\t\t\t\t\tdom = this.get_node(obj, true),\n\t\t\t\t\t\t\t\ti, j, tmp, s = this.settings.checkbox.cascade, t = this.settings.checkbox.tie_selection,\n\t\t\t\t\t\t\t\tcur = this._data[ t ? 'core' : 'checkbox' ].selected, sel = {},\n\t\t\t\t\t\t\t\tstillSelectedIds = [],\n\t\t\t\t\t\t\t\tallIds = obj.children_d.concat(obj.id);\n\n\t\t\t\t\t\t\t// apply down\n\t\t\t\t\t\t\tif(s.indexOf('down') !== -1) {\n\t\t\t\t\t\t\t\tvar selectedIds = this._cascade_new_checked_state(obj.id, false);\n\n\t\t\t\t\t\t\t\tcur = cur.filter(function(id) {\n\t\t\t\t\t\t\t\t\treturn allIds.indexOf(id) === -1 || selectedIds.indexOf(id) > -1;\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// only apply up if cascade up is enabled and if this node is not selected\n\t\t\t\t\t\t\t// (if all child nodes are disabled and cascade_to_disabled === false then this node will till be selected).\n\t\t\t\t\t\t\tif(s.indexOf('up') !== -1 && cur.indexOf(obj.id) === -1) {\n\t\t\t\t\t\t\t\tfor(i = 0, j = obj.parents.length; i < j; i++) {\n\t\t\t\t\t\t\t\t\ttmp = this._model.data[obj.parents[i]];\n\t\t\t\t\t\t\t\t\ttmp.state[ t ? 'selected' : 'checked' ] = false;\n\t\t\t\t\t\t\t\t\tif(tmp && tmp.original && tmp.original.state && tmp.original.state.undetermined) {\n\t\t\t\t\t\t\t\t\t\ttmp.original.state.undetermined = false;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\ttmp = this.get_node(obj.parents[i], true);\n\t\t\t\t\t\t\t\t\tif(tmp && tmp.length) {\n\t\t\t\t\t\t\t\t\t\ttmp.attr('aria-selected', false).children('.jstree-anchor').removeClass(t ? 'jstree-clicked' : 'jstree-checked');\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tcur = cur.filter(function(id) {\n\t\t\t\t\t\t\t\t\treturn obj.parents.indexOf(id) === -1;\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tthis._data[ t ? 'core' : 'checkbox' ].selected = cur;\n\t\t\t\t\t\t}, this));\n\t\t\t}\n\t\t\tif(this.settings.checkbox.cascade.indexOf('up') !== -1) {\n\t\t\t\tthis.element\n\t\t\t\t\t.on('delete_node.jstree', $.proxy(function (e, data) {\n\t\t\t\t\t\t\t// apply up (whole handler)\n\t\t\t\t\t\t\tvar p = this.get_node(data.parent),\n\t\t\t\t\t\t\t\tm = this._model.data,\n\t\t\t\t\t\t\t\ti, j, c, tmp, t = this.settings.checkbox.tie_selection;\n\t\t\t\t\t\t\twhile(p && p.id !== $.jstree.root && !p.state[ t ? 'selected' : 'checked' ]) {\n\t\t\t\t\t\t\t\tc = 0;\n\t\t\t\t\t\t\t\tfor(i = 0, j = p.children.length; i < j; i++) {\n\t\t\t\t\t\t\t\t\tc += m[p.children[i]].state[ t ? 'selected' : 'checked' ];\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif(j > 0 && c === j) {\n\t\t\t\t\t\t\t\t\tp.state[ t ? 'selected' : 'checked' ] = true;\n\t\t\t\t\t\t\t\t\tthis._data[ t ? 'core' : 'checkbox' ].selected.push(p.id);\n\t\t\t\t\t\t\t\t\ttmp = this.get_node(p, true);\n\t\t\t\t\t\t\t\t\tif(tmp && tmp.length) {\n\t\t\t\t\t\t\t\t\t\ttmp.attr('aria-selected', true).children('.jstree-anchor').addClass(t ? 'jstree-clicked' : 'jstree-checked');\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tp = this.get_node(p.parent);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}, this))\n\t\t\t\t\t.on('move_node.jstree', $.proxy(function (e, data) {\n\t\t\t\t\t\t\t// apply up (whole handler)\n\t\t\t\t\t\t\tvar is_multi = data.is_multi,\n\t\t\t\t\t\t\t\told_par = data.old_parent,\n\t\t\t\t\t\t\t\tnew_par = this.get_node(data.parent),\n\t\t\t\t\t\t\t\tm = this._model.data,\n\t\t\t\t\t\t\t\tp, c, i, j, tmp, t = this.settings.checkbox.tie_selection;\n\t\t\t\t\t\t\tif(!is_multi) {\n\t\t\t\t\t\t\t\tp = this.get_node(old_par);\n\t\t\t\t\t\t\t\twhile(p && p.id !== $.jstree.root && !p.state[ t ? 'selected' : 'checked' ]) {\n\t\t\t\t\t\t\t\t\tc = 0;\n\t\t\t\t\t\t\t\t\tfor(i = 0, j = p.children.length; i < j; i++) {\n\t\t\t\t\t\t\t\t\t\tc += m[p.children[i]].state[ t ? 'selected' : 'checked' ];\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tif(j > 0 && c === j) {\n\t\t\t\t\t\t\t\t\t\tp.state[ t ? 'selected' : 'checked' ] = true;\n\t\t\t\t\t\t\t\t\t\tthis._data[ t ? 'core' : 'checkbox' ].selected.push(p.id);\n\t\t\t\t\t\t\t\t\t\ttmp = this.get_node(p, true);\n\t\t\t\t\t\t\t\t\t\tif(tmp && tmp.length) {\n\t\t\t\t\t\t\t\t\t\t\ttmp.attr('aria-selected', true).children('.jstree-anchor').addClass(t ? 'jstree-clicked' : 'jstree-checked');\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tp = this.get_node(p.parent);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tp = new_par;\n\t\t\t\t\t\t\twhile(p && p.id !== $.jstree.root) {\n\t\t\t\t\t\t\t\tc = 0;\n\t\t\t\t\t\t\t\tfor(i = 0, j = p.children.length; i < j; i++) {\n\t\t\t\t\t\t\t\t\tc += m[p.children[i]].state[ t ? 'selected' : 'checked' ];\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif(c === j) {\n\t\t\t\t\t\t\t\t\tif(!p.state[ t ? 'selected' : 'checked' ]) {\n\t\t\t\t\t\t\t\t\t\tp.state[ t ? 'selected' : 'checked' ] = true;\n\t\t\t\t\t\t\t\t\t\tthis._data[ t ? 'core' : 'checkbox' ].selected.push(p.id);\n\t\t\t\t\t\t\t\t\t\ttmp = this.get_node(p, true);\n\t\t\t\t\t\t\t\t\t\tif(tmp && tmp.length) {\n\t\t\t\t\t\t\t\t\t\t\ttmp.attr('aria-selected', true).children('.jstree-anchor').addClass(t ? 'jstree-clicked' : 'jstree-checked');\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\tif(p.state[ t ? 'selected' : 'checked' ]) {\n\t\t\t\t\t\t\t\t\t\tp.state[ t ? 'selected' : 'checked' ] = false;\n\t\t\t\t\t\t\t\t\t\tthis._data[ t ? 'core' : 'checkbox' ].selected = $.vakata.array_remove_item(this._data[ t ? 'core' : 'checkbox' ].selected, p.id);\n\t\t\t\t\t\t\t\t\t\ttmp = this.get_node(p, true);\n\t\t\t\t\t\t\t\t\t\tif(tmp && tmp.length) {\n\t\t\t\t\t\t\t\t\t\t\ttmp.attr('aria-selected', false).children('.jstree-anchor').removeClass(t ? 'jstree-clicked' : 'jstree-checked');\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tp = this.get_node(p.parent);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}, this));\n\t\t\t}\n\t\t};\n\n\t\t/**\n\t\t * set the undetermined state where and if necessary. Used internally.\n\t\t * @private\n\t\t * @name _undetermined()\n\t\t * @plugin checkbox\n\t\t */\n\t\tthis._undetermined = function () {\n\t\t\tif(this.element === null) { return; }\n\t\t\tvar i, j, k, l, o = {}, m = this._model.data, t = this.settings.checkbox.tie_selection, s = this._data[ t ? 'core' : 'checkbox' ].selected, p = [], tt = this;\n\t\t\tfor(i = 0, j = s.length; i < j; i++) {\n\t\t\t\tif(m[s[i]] && m[s[i]].parents) {\n\t\t\t\t\tfor(k = 0, l = m[s[i]].parents.length; k < l; k++) {\n\t\t\t\t\t\tif(o[m[s[i]].parents[k]] !== undefined) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(m[s[i]].parents[k] !== $.jstree.root) {\n\t\t\t\t\t\t\to[m[s[i]].parents[k]] = true;\n\t\t\t\t\t\t\tp.push(m[s[i]].parents[k]);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t// attempt for server side undetermined state\n\t\t\tthis.element.find('.jstree-closed').not(':has(.jstree-children)')\n\t\t\t\t.each(function () {\n\t\t\t\t\tvar tmp = tt.get_node(this), tmp2;\n\t\t\t\t\t\n\t\t\t\t\tif(!tmp) { return; }\n\t\t\t\t\t\n\t\t\t\t\tif(!tmp.state.loaded) {\n\t\t\t\t\t\tif(tmp.original && tmp.original.state && tmp.original.state.undetermined && tmp.original.state.undetermined === true) {\n\t\t\t\t\t\t\tif(o[tmp.id] === undefined && tmp.id !== $.jstree.root) {\n\t\t\t\t\t\t\t\to[tmp.id] = true;\n\t\t\t\t\t\t\t\tp.push(tmp.id);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tfor(k = 0, l = tmp.parents.length; k < l; k++) {\n\t\t\t\t\t\t\t\tif(o[tmp.parents[k]] === undefined && tmp.parents[k] !== $.jstree.root) {\n\t\t\t\t\t\t\t\t\to[tmp.parents[k]] = true;\n\t\t\t\t\t\t\t\t\tp.push(tmp.parents[k]);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tfor(i = 0, j = tmp.children_d.length; i < j; i++) {\n\t\t\t\t\t\t\ttmp2 = m[tmp.children_d[i]];\n\t\t\t\t\t\t\tif(!tmp2.state.loaded && tmp2.original && tmp2.original.state && tmp2.original.state.undetermined && tmp2.original.state.undetermined === true) {\n\t\t\t\t\t\t\t\tif(o[tmp2.id] === undefined && tmp2.id !== $.jstree.root) {\n\t\t\t\t\t\t\t\t\to[tmp2.id] = true;\n\t\t\t\t\t\t\t\t\tp.push(tmp2.id);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tfor(k = 0, l = tmp2.parents.length; k < l; k++) {\n\t\t\t\t\t\t\t\t\tif(o[tmp2.parents[k]] === undefined && tmp2.parents[k] !== $.jstree.root) {\n\t\t\t\t\t\t\t\t\t\to[tmp2.parents[k]] = true;\n\t\t\t\t\t\t\t\t\t\tp.push(tmp2.parents[k]);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\tthis.element.find('.jstree-undetermined').removeClass('jstree-undetermined');\n\t\t\tfor(i = 0, j = p.length; i < j; i++) {\n\t\t\t\tif(!m[p[i]].state[ t ? 'selected' : 'checked' ]) {\n\t\t\t\t\ts = this.get_node(p[i], true);\n\t\t\t\t\tif(s && s.length) {\n\t\t\t\t\t\ts.children('.jstree-anchor').children('.jstree-checkbox').addClass('jstree-undetermined');\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\tthis.redraw_node = function(obj, deep, is_callback, force_render) {\n\t\t\tobj = parent.redraw_node.apply(this, arguments);\n\t\t\tif(obj) {\n\t\t\t\tvar i, j, tmp = null, icon = null;\n\t\t\t\tfor(i = 0, j = obj.childNodes.length; i < j; i++) {\n\t\t\t\t\tif(obj.childNodes[i] && obj.childNodes[i].className && obj.childNodes[i].className.indexOf(\"jstree-anchor\") !== -1) {\n\t\t\t\t\t\ttmp = obj.childNodes[i];\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(tmp) {\n\t\t\t\t\tif(!this.settings.checkbox.tie_selection && this._model.data[obj.id].state.checked) { tmp.className += ' jstree-checked'; }\n\t\t\t\t\ticon = _i.cloneNode(false);\n\t\t\t\t\tif(this._model.data[obj.id].state.checkbox_disabled) { icon.className += ' jstree-checkbox-disabled'; }\n\t\t\t\t\ttmp.insertBefore(icon, tmp.childNodes[0]);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(!is_callback && this.settings.checkbox.cascade.indexOf('undetermined') !== -1) {\n\t\t\t\tif(this._data.checkbox.uto) { clearTimeout(this._data.checkbox.uto); }\n\t\t\t\tthis._data.checkbox.uto = setTimeout($.proxy(this._undetermined, this), 50);\n\t\t\t}\n\t\t\treturn obj;\n\t\t};\n\t\t/**\n\t\t * show the node checkbox icons\n\t\t * @name show_checkboxes()\n\t\t * @plugin checkbox\n\t\t */\n\t\tthis.show_checkboxes = function () { this._data.core.themes.checkboxes = true; this.get_container_ul().removeClass(\"jstree-no-checkboxes\"); };\n\t\t/**\n\t\t * hide the node checkbox icons\n\t\t * @name hide_checkboxes()\n\t\t * @plugin checkbox\n\t\t */\n\t\tthis.hide_checkboxes = function () { this._data.core.themes.checkboxes = false; this.get_container_ul().addClass(\"jstree-no-checkboxes\"); };\n\t\t/**\n\t\t * toggle the node icons\n\t\t * @name toggle_checkboxes()\n\t\t * @plugin checkbox\n\t\t */\n\t\tthis.toggle_checkboxes = function () { if(this._data.core.themes.checkboxes) { this.hide_checkboxes(); } else { this.show_checkboxes(); } };\n\t\t/**\n\t\t * checks if a node is in an undetermined state\n\t\t * @name is_undetermined(obj)\n\t\t * @param  {mixed} obj\n\t\t * @return {Boolean}\n\t\t */\n\t\tthis.is_undetermined = function (obj) {\n\t\t\tobj = this.get_node(obj);\n\t\t\tvar s = this.settings.checkbox.cascade, i, j, t = this.settings.checkbox.tie_selection, d = this._data[ t ? 'core' : 'checkbox' ].selected, m = this._model.data;\n\t\t\tif(!obj || obj.state[ t ? 'selected' : 'checked' ] === true || s.indexOf('undetermined') === -1 || (s.indexOf('down') === -1 && s.indexOf('up') === -1)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tif(!obj.state.loaded && obj.original.state.undetermined === true) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\tfor(i = 0, j = obj.children_d.length; i < j; i++) {\n\t\t\t\tif($.inArray(obj.children_d[i], d) !== -1 || (!m[obj.children_d[i]].state.loaded && m[obj.children_d[i]].original.state.undetermined)) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false;\n\t\t};\n\t\t/**\n\t\t * disable a node's checkbox\n\t\t * @name disable_checkbox(obj)\n\t\t * @param {mixed} obj an array can be used too\n\t\t * @trigger disable_checkbox.jstree\n\t\t * @plugin checkbox\n\t\t */\n\t\tthis.disable_checkbox = function (obj) {\n\t\t\tvar t1, t2, dom;\n\t\t\tif($.isArray(obj)) {\n\t\t\t\tobj = obj.slice();\n\t\t\t\tfor(t1 = 0, t2 = obj.length; t1 < t2; t1++) {\n\t\t\t\t\tthis.disable_checkbox(obj[t1]);\n\t\t\t\t}\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\tobj = this.get_node(obj);\n\t\t\tif(!obj || obj.id === $.jstree.root) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tdom = this.get_node(obj, true);\n\t\t\tif(!obj.state.checkbox_disabled) {\n\t\t\t\tobj.state.checkbox_disabled = true;\n\t\t\t\tif(dom && dom.length) {\n\t\t\t\t\tdom.children('.jstree-anchor').children('.jstree-checkbox').addClass('jstree-checkbox-disabled');\n\t\t\t\t}\n\t\t\t\t/**\n\t\t\t\t * triggered when an node's checkbox is disabled\n\t\t\t\t * @event\n\t\t\t\t * @name disable_checkbox.jstree\n\t\t\t\t * @param {Object} node\n\t\t\t\t * @plugin checkbox\n\t\t\t\t */\n\t\t\t\tthis.trigger('disable_checkbox', { 'node' : obj });\n\t\t\t}\n\t\t};\n\t\t/**\n\t\t * enable a node's checkbox\n\t\t * @name disable_checkbox(obj)\n\t\t * @param {mixed} obj an array can be used too\n\t\t * @trigger enable_checkbox.jstree\n\t\t * @plugin checkbox\n\t\t */\n\t\tthis.enable_checkbox = function (obj) {\n\t\t\tvar t1, t2, dom;\n\t\t\tif($.isArray(obj)) {\n\t\t\t\tobj = obj.slice();\n\t\t\t\tfor(t1 = 0, t2 = obj.length; t1 < t2; t1++) {\n\t\t\t\t\tthis.enable_checkbox(obj[t1]);\n\t\t\t\t}\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\tobj = this.get_node(obj);\n\t\t\tif(!obj || obj.id === $.jstree.root) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tdom = this.get_node(obj, true);\n\t\t\tif(obj.state.checkbox_disabled) {\n\t\t\t\tobj.state.checkbox_disabled = false;\n\t\t\t\tif(dom && dom.length) {\n\t\t\t\t\tdom.children('.jstree-anchor').children('.jstree-checkbox').removeClass('jstree-checkbox-disabled');\n\t\t\t\t}\n\t\t\t\t/**\n\t\t\t\t * triggered when an node's checkbox is enabled\n\t\t\t\t * @event\n\t\t\t\t * @name enable_checkbox.jstree\n\t\t\t\t * @param {Object} node\n\t\t\t\t * @plugin checkbox\n\t\t\t\t */\n\t\t\t\tthis.trigger('enable_checkbox', { 'node' : obj });\n\t\t\t}\n\t\t};\n\n\t\tthis.activate_node = function (obj, e) {\n\t\t\tif($(e.target).hasClass('jstree-checkbox-disabled')) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tif(this.settings.checkbox.tie_selection && (this.settings.checkbox.whole_node || $(e.target).hasClass('jstree-checkbox'))) {\n\t\t\t\te.ctrlKey = true;\n\t\t\t}\n\t\t\tif(this.settings.checkbox.tie_selection || (!this.settings.checkbox.whole_node && !$(e.target).hasClass('jstree-checkbox'))) {\n\t\t\t\treturn parent.activate_node.call(this, obj, e);\n\t\t\t}\n\t\t\tif(this.is_disabled(obj)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tif(this.is_checked(obj)) {\n\t\t\t\tthis.uncheck_node(obj, e);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthis.check_node(obj, e);\n\t\t\t}\n\t\t\tthis.trigger('activate_node', { 'node' : this.get_node(obj) });\n\t\t};\n\n\t\t/**\n\t\t * Unchecks a node and all its descendants. This function does NOT affect hidden and disabled nodes (or their descendants).\n\t\t * However if these unaffected nodes are already selected their ids will be included in the returned array.\n\t\t * @param id\n\t\t * @param checkedState\n\t\t * @returns {Array} Array of all node id's (in this tree branch) that are checked.\n\t\t */\n\t\tthis._cascade_new_checked_state = function(id, checkedState) {\n\t\t\tvar self = this;\n\t\t\tvar t = this.settings.checkbox.tie_selection;\n\t\t\tvar node = this._model.data[id];\n\t\t\tvar selectedNodeIds = [];\n\t\t\tvar selectedChildrenIds = [];\n\n\t\t\tif (\n\t\t\t\t(this.settings.checkbox.cascade_to_disabled || !node.state.disabled) &&\n\t\t\t\t(this.settings.checkbox.cascade_to_hidden || !node.state.hidden)\n\t\t\t) {\n                //First try and check/uncheck the children\n                if (node.children) {\n\t\t\t\t\tnode.children.forEach(function(childId) {\n\t\t\t\t\t\tvar selectedChildIds = self._cascade_new_checked_state(childId, checkedState);\n\t\t\t\t\t\tselectedNodeIds = selectedNodeIds.concat(selectedChildIds);\n\t\t\t\t\t\tif (selectedChildIds.indexOf(childId) > -1) {\n\t\t\t\t\t\t\tselectedChildrenIds.push(childId);\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\n\t\t\t\tvar dom = self.get_node(node, true);\n\n                //A node's state is undetermined if some but not all of it's children are checked/selected .\n\t\t\t\tvar undetermined = selectedChildrenIds.length > 0 && selectedChildrenIds.length < node.children.length;\n\n\t\t\t\tif(node.original && node.original.state && node.original.state.undetermined) {\n\t\t\t\t\tnode.original.state.undetermined = undetermined;\n\t\t\t\t}\n\n                //If a node is undetermined then remove selected class\n\t\t\t\tif (undetermined) {\n                    node.state[ t ? 'selected' : 'checked' ] = false;\n                    dom.attr('aria-selected', false).children('.jstree-anchor').removeClass(t ? 'jstree-clicked' : 'jstree-checked');\n\t\t\t\t}\n                //Otherwise, if the checkedState === true (i.e. the node is being checked now) and all of the node's children are checked (if it has any children),\n                //check the node and style it correctly.\n\t\t\t\telse if (checkedState && selectedChildrenIds.length === node.children.length) {\n                    node.state[ t ? 'selected' : 'checked' ] = checkedState;\n\t\t\t\t\tselectedNodeIds.push(node.id);\n\n\t\t\t\t\tdom.attr('aria-selected', true).children('.jstree-anchor').addClass(t ? 'jstree-clicked' : 'jstree-checked');\n\t\t\t\t}\n\t\t\t\telse {\n                    node.state[ t ? 'selected' : 'checked' ] = false;\n\t\t\t\t\tdom.attr('aria-selected', false).children('.jstree-anchor').removeClass(t ? 'jstree-clicked' : 'jstree-checked');\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tvar selectedChildIds = this.get_checked_descendants(id);\n\n\t\t\t\tif (node.state[ t ? 'selected' : 'checked' ]) {\n\t\t\t\t\tselectedChildIds.push(node.id);\n\t\t\t\t}\n\n\t\t\t\tselectedNodeIds = selectedNodeIds.concat(selectedChildIds);\n\t\t\t}\n\n\t\t\treturn selectedNodeIds;\n\t\t};\n\n\t\t/**\n\t\t * Gets ids of nodes selected in branch (of tree) specified by id (does not include the node specified by id)\n\t\t * @param id\n\t\t */\n\t\tthis.get_checked_descendants = function(id) {\n\t\t\tvar self = this;\n\t\t\tvar t = self.settings.checkbox.tie_selection;\n\t\t\tvar node = self._model.data[id];\n\n\t\t\treturn node.children_d.filter(function(_id) {\n\t\t\t\treturn self._model.data[_id].state[ t ? 'selected' : 'checked' ];\n\t\t\t});\n\t\t};\n\n\t\t/**\n\t\t * check a node (only if tie_selection in checkbox settings is false, otherwise select_node will be called internally)\n\t\t * @name check_node(obj)\n\t\t * @param {mixed} obj an array can be used to check multiple nodes\n\t\t * @trigger check_node.jstree\n\t\t * @plugin checkbox\n\t\t */\n\t\tthis.check_node = function (obj, e) {\n\t\t\tif(this.settings.checkbox.tie_selection) { return this.select_node(obj, false, true, e); }\n\t\t\tvar dom, t1, t2, th;\n\t\t\tif($.isArray(obj)) {\n\t\t\t\tobj = obj.slice();\n\t\t\t\tfor(t1 = 0, t2 = obj.length; t1 < t2; t1++) {\n\t\t\t\t\tthis.check_node(obj[t1], e);\n\t\t\t\t}\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\tobj = this.get_node(obj);\n\t\t\tif(!obj || obj.id === $.jstree.root) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tdom = this.get_node(obj, true);\n\t\t\tif(!obj.state.checked) {\n\t\t\t\tobj.state.checked = true;\n\t\t\t\tthis._data.checkbox.selected.push(obj.id);\n\t\t\t\tif(dom && dom.length) {\n\t\t\t\t\tdom.children('.jstree-anchor').addClass('jstree-checked');\n\t\t\t\t}\n\t\t\t\t/**\n\t\t\t\t * triggered when an node is checked (only if tie_selection in checkbox settings is false)\n\t\t\t\t * @event\n\t\t\t\t * @name check_node.jstree\n\t\t\t\t * @param {Object} node\n\t\t\t\t * @param {Array} selected the current selection\n\t\t\t\t * @param {Object} event the event (if any) that triggered this check_node\n\t\t\t\t * @plugin checkbox\n\t\t\t\t */\n\t\t\t\tthis.trigger('check_node', { 'node' : obj, 'selected' : this._data.checkbox.selected, 'event' : e });\n\t\t\t}\n\t\t};\n\t\t/**\n\t\t * uncheck a node (only if tie_selection in checkbox settings is false, otherwise deselect_node will be called internally)\n\t\t * @name uncheck_node(obj)\n\t\t * @param {mixed} obj an array can be used to uncheck multiple nodes\n\t\t * @trigger uncheck_node.jstree\n\t\t * @plugin checkbox\n\t\t */\n\t\tthis.uncheck_node = function (obj, e) {\n\t\t\tif(this.settings.checkbox.tie_selection) { return this.deselect_node(obj, false, e); }\n\t\t\tvar t1, t2, dom;\n\t\t\tif($.isArray(obj)) {\n\t\t\t\tobj = obj.slice();\n\t\t\t\tfor(t1 = 0, t2 = obj.length; t1 < t2; t1++) {\n\t\t\t\t\tthis.uncheck_node(obj[t1], e);\n\t\t\t\t}\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\tobj = this.get_node(obj);\n\t\t\tif(!obj || obj.id === $.jstree.root) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tdom = this.get_node(obj, true);\n\t\t\tif(obj.state.checked) {\n\t\t\t\tobj.state.checked = false;\n\t\t\t\tthis._data.checkbox.selected = $.vakata.array_remove_item(this._data.checkbox.selected, obj.id);\n\t\t\t\tif(dom.length) {\n\t\t\t\t\tdom.children('.jstree-anchor').removeClass('jstree-checked');\n\t\t\t\t}\n\t\t\t\t/**\n\t\t\t\t * triggered when an node is unchecked (only if tie_selection in checkbox settings is false)\n\t\t\t\t * @event\n\t\t\t\t * @name uncheck_node.jstree\n\t\t\t\t * @param {Object} node\n\t\t\t\t * @param {Array} selected the current selection\n\t\t\t\t * @param {Object} event the event (if any) that triggered this uncheck_node\n\t\t\t\t * @plugin checkbox\n\t\t\t\t */\n\t\t\t\tthis.trigger('uncheck_node', { 'node' : obj, 'selected' : this._data.checkbox.selected, 'event' : e });\n\t\t\t}\n\t\t};\n\t\t\n\t\t/**\n\t\t * checks all nodes in the tree (only if tie_selection in checkbox settings is false, otherwise select_all will be called internally)\n\t\t * @name check_all()\n\t\t * @trigger check_all.jstree, changed.jstree\n\t\t * @plugin checkbox\n\t\t */\n\t\tthis.check_all = function () {\n\t\t\tif(this.settings.checkbox.tie_selection) { return this.select_all(); }\n\t\t\tvar tmp = this._data.checkbox.selected.concat([]), i, j;\n\t\t\tthis._data.checkbox.selected = this._model.data[$.jstree.root].children_d.concat();\n\t\t\tfor(i = 0, j = this._data.checkbox.selected.length; i < j; i++) {\n\t\t\t\tif(this._model.data[this._data.checkbox.selected[i]]) {\n\t\t\t\t\tthis._model.data[this._data.checkbox.selected[i]].state.checked = true;\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis.redraw(true);\n\t\t\t/**\n\t\t\t * triggered when all nodes are checked (only if tie_selection in checkbox settings is false)\n\t\t\t * @event\n\t\t\t * @name check_all.jstree\n\t\t\t * @param {Array} selected the current selection\n\t\t\t * @plugin checkbox\n\t\t\t */\n\t\t\tthis.trigger('check_all', { 'selected' : this._data.checkbox.selected });\n\t\t};\n\t\t/**\n\t\t * uncheck all checked nodes (only if tie_selection in checkbox settings is false, otherwise deselect_all will be called internally)\n\t\t * @name uncheck_all()\n\t\t * @trigger uncheck_all.jstree\n\t\t * @plugin checkbox\n\t\t */\n\t\tthis.uncheck_all = function () {\n\t\t\tif(this.settings.checkbox.tie_selection) { return this.deselect_all(); }\n\t\t\tvar tmp = this._data.checkbox.selected.concat([]), i, j;\n\t\t\tfor(i = 0, j = this._data.checkbox.selected.length; i < j; i++) {\n\t\t\t\tif(this._model.data[this._data.checkbox.selected[i]]) {\n\t\t\t\t\tthis._model.data[this._data.checkbox.selected[i]].state.checked = false;\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis._data.checkbox.selected = [];\n\t\t\tthis.element.find('.jstree-checked').removeClass('jstree-checked');\n\t\t\t/**\n\t\t\t * triggered when all nodes are unchecked (only if tie_selection in checkbox settings is false)\n\t\t\t * @event\n\t\t\t * @name uncheck_all.jstree\n\t\t\t * @param {Object} node the previous selection\n\t\t\t * @param {Array} selected the current selection\n\t\t\t * @plugin checkbox\n\t\t\t */\n\t\t\tthis.trigger('uncheck_all', { 'selected' : this._data.checkbox.selected, 'node' : tmp });\n\t\t};\n\t\t/**\n\t\t * checks if a node is checked (if tie_selection is on in the settings this function will return the same as is_selected)\n\t\t * @name is_checked(obj)\n\t\t * @param  {mixed}  obj\n\t\t * @return {Boolean}\n\t\t * @plugin checkbox\n\t\t */\n\t\tthis.is_checked = function (obj) {\n\t\t\tif(this.settings.checkbox.tie_selection) { return this.is_selected(obj); }\n\t\t\tobj = this.get_node(obj);\n\t\t\tif(!obj || obj.id === $.jstree.root) { return false; }\n\t\t\treturn obj.state.checked;\n\t\t};\n\t\t/**\n\t\t * get an array of all checked nodes (if tie_selection is on in the settings this function will return the same as get_selected)\n\t\t * @name get_checked([full])\n\t\t * @param  {mixed}  full if set to `true` the returned array will consist of the full node objects, otherwise - only IDs will be returned\n\t\t * @return {Array}\n\t\t * @plugin checkbox\n\t\t */\n\t\tthis.get_checked = function (full) {\n\t\t\tif(this.settings.checkbox.tie_selection) { return this.get_selected(full); }\n\t\t\treturn full ? $.map(this._data.checkbox.selected, $.proxy(function (i) { return this.get_node(i); }, this)) : this._data.checkbox.selected;\n\t\t};\n\t\t/**\n\t\t * get an array of all top level checked nodes (ignoring children of checked nodes) (if tie_selection is on in the settings this function will return the same as get_top_selected)\n\t\t * @name get_top_checked([full])\n\t\t * @param  {mixed}  full if set to `true` the returned array will consist of the full node objects, otherwise - only IDs will be returned\n\t\t * @return {Array}\n\t\t * @plugin checkbox\n\t\t */\n\t\tthis.get_top_checked = function (full) {\n\t\t\tif(this.settings.checkbox.tie_selection) { return this.get_top_selected(full); }\n\t\t\tvar tmp = this.get_checked(true),\n\t\t\t\tobj = {}, i, j, k, l;\n\t\t\tfor(i = 0, j = tmp.length; i < j; i++) {\n\t\t\t\tobj[tmp[i].id] = tmp[i];\n\t\t\t}\n\t\t\tfor(i = 0, j = tmp.length; i < j; i++) {\n\t\t\t\tfor(k = 0, l = tmp[i].children_d.length; k < l; k++) {\n\t\t\t\t\tif(obj[tmp[i].children_d[k]]) {\n\t\t\t\t\t\tdelete obj[tmp[i].children_d[k]];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\ttmp = [];\n\t\t\tfor(i in obj) {\n\t\t\t\tif(obj.hasOwnProperty(i)) {\n\t\t\t\t\ttmp.push(i);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn full ? $.map(tmp, $.proxy(function (i) { return this.get_node(i); }, this)) : tmp;\n\t\t};\n\t\t/**\n\t\t * get an array of all bottom level checked nodes (ignoring selected parents) (if tie_selection is on in the settings this function will return the same as get_bottom_selected)\n\t\t * @name get_bottom_checked([full])\n\t\t * @param  {mixed}  full if set to `true` the returned array will consist of the full node objects, otherwise - only IDs will be returned\n\t\t * @return {Array}\n\t\t * @plugin checkbox\n\t\t */\n\t\tthis.get_bottom_checked = function (full) {\n\t\t\tif(this.settings.checkbox.tie_selection) { return this.get_bottom_selected(full); }\n\t\t\tvar tmp = this.get_checked(true),\n\t\t\t\tobj = [], i, j;\n\t\t\tfor(i = 0, j = tmp.length; i < j; i++) {\n\t\t\t\tif(!tmp[i].children.length) {\n\t\t\t\t\tobj.push(tmp[i].id);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn full ? $.map(obj, $.proxy(function (i) { return this.get_node(i); }, this)) : obj;\n\t\t};\n\t\tthis.load_node = function (obj, callback) {\n\t\t\tvar k, l, i, j, c, tmp;\n\t\t\tif(!$.isArray(obj) && !this.settings.checkbox.tie_selection) {\n\t\t\t\ttmp = this.get_node(obj);\n\t\t\t\tif(tmp && tmp.state.loaded) {\n\t\t\t\t\tfor(k = 0, l = tmp.children_d.length; k < l; k++) {\n\t\t\t\t\t\tif(this._model.data[tmp.children_d[k]].state.checked) {\n\t\t\t\t\t\t\tc = true;\n\t\t\t\t\t\t\tthis._data.checkbox.selected = $.vakata.array_remove_item(this._data.checkbox.selected, tmp.children_d[k]);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn parent.load_node.apply(this, arguments);\n\t\t};\n\t\tthis.get_state = function () {\n\t\t\tvar state = parent.get_state.apply(this, arguments);\n\t\t\tif(this.settings.checkbox.tie_selection) { return state; }\n\t\t\tstate.checkbox = this._data.checkbox.selected.slice();\n\t\t\treturn state;\n\t\t};\n\t\tthis.set_state = function (state, callback) {\n\t\t\tvar res = parent.set_state.apply(this, arguments);\n\t\t\tif(res && state.checkbox) {\n\t\t\t\tif(!this.settings.checkbox.tie_selection) {\n\t\t\t\t\tthis.uncheck_all();\n\t\t\t\t\tvar _this = this;\n\t\t\t\t\t$.each(state.checkbox, function (i, v) {\n\t\t\t\t\t\t_this.check_node(v);\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\tdelete state.checkbox;\n\t\t\t\tthis.set_state(state, callback);\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\treturn res;\n\t\t};\n\t\tthis.refresh = function (skip_loading, forget_state) {\n\t\t\tif(!this.settings.checkbox.tie_selection) {\n\t\t\t\tthis._data.checkbox.selected = [];\n\t\t\t}\n\t\t\treturn parent.refresh.apply(this, arguments);\n\t\t};\n\t};\n\n\t// include the checkbox plugin by default\n\t// $.jstree.defaults.plugins.push(\"checkbox\");\n\n\n/**\n * ### Conditionalselect plugin\n *\n * This plugin allows defining a callback to allow or deny node selection by user input (activate node method).\n */\n\n\t/**\n\t * a callback (function) which is invoked in the instance's scope and receives two arguments - the node and the event that triggered the `activate_node` call. Returning false prevents working with the node, returning true allows invoking activate_node. Defaults to returning `true`.\n\t * @name $.jstree.defaults.checkbox.visible\n\t * @plugin checkbox\n\t */\n\t$.jstree.defaults.conditionalselect = function () { return true; };\n\t$.jstree.plugins.conditionalselect = function (options, parent) {\n\t\t// own function\n\t\tthis.activate_node = function (obj, e) {\n\t\t\tif(this.settings.conditionalselect.call(this, this.get_node(obj), e)) {\n\t\t\t\tparent.activate_node.call(this, obj, e);\n\t\t\t}\n\t\t};\n\t};\n\n\n/**\n * ### Contextmenu plugin\n *\n * Shows a context menu when a node is right-clicked.\n */\n\n\t/**\n\t * stores all defaults for the contextmenu plugin\n\t * @name $.jstree.defaults.contextmenu\n\t * @plugin contextmenu\n\t */\n\t$.jstree.defaults.contextmenu = {\n\t\t/**\n\t\t * a boolean indicating if the node should be selected when the context menu is invoked on it. Defaults to `true`.\n\t\t * @name $.jstree.defaults.contextmenu.select_node\n\t\t * @plugin contextmenu\n\t\t */\n\t\tselect_node : true,\n\t\t/**\n\t\t * a boolean indicating if the menu should be shown aligned with the node. Defaults to `true`, otherwise the mouse coordinates are used.\n\t\t * @name $.jstree.defaults.contextmenu.show_at_node\n\t\t * @plugin contextmenu\n\t\t */\n\t\tshow_at_node : true,\n\t\t/**\n\t\t * an object of actions, or a function that accepts a node and a callback function and calls the callback function with an object of actions available for that node (you can also return the items too).\n\t\t *\n\t\t * Each action consists of a key (a unique name) and a value which is an object with the following properties (only label and action are required). Once a menu item is activated the `action` function will be invoked with an object containing the following keys: item - the contextmenu item definition as seen below, reference - the DOM node that was used (the tree node), element - the contextmenu DOM element, position - an object with x/y properties indicating the position of the menu.\n\t\t *\n\t\t * * `separator_before` - a boolean indicating if there should be a separator before this item\n\t\t * * `separator_after` - a boolean indicating if there should be a separator after this item\n\t\t * * `_disabled` - a boolean indicating if this action should be disabled\n\t\t * * `label` - a string - the name of the action (could be a function returning a string)\n\t\t * * `title` - a string - an optional tooltip for the item\n\t\t * * `action` - a function to be executed if this item is chosen, the function will receive \n\t\t * * `icon` - a string, can be a path to an icon or a className, if using an image that is in the current directory use a `./` prefix, otherwise it will be detected as a class\n\t\t * * `shortcut` - keyCode which will trigger the action if the menu is open (for example `113` for rename, which equals F2)\n\t\t * * `shortcut_label` - shortcut label (like for example `F2` for rename)\n\t\t * * `submenu` - an object with the same structure as $.jstree.defaults.contextmenu.items which can be used to create a submenu - each key will be rendered as a separate option in a submenu that will appear once the current item is hovered\n\t\t *\n\t\t * @name $.jstree.defaults.contextmenu.items\n\t\t * @plugin contextmenu\n\t\t */\n\t\titems : function (o, cb) { // Could be an object directly\n\t\t\treturn {\n\t\t\t\t\"create\" : {\n\t\t\t\t\t\"separator_before\"\t: false,\n\t\t\t\t\t\"separator_after\"\t: true,\n\t\t\t\t\t\"_disabled\"\t\t\t: false, //(this.check(\"create_node\", data.reference, {}, \"last\")),\n\t\t\t\t\t\"label\"\t\t\t\t: \"Create\",\n\t\t\t\t\t\"action\"\t\t\t: function (data) {\n\t\t\t\t\t\tvar inst = $.jstree.reference(data.reference),\n\t\t\t\t\t\t\tobj = inst.get_node(data.reference);\n\t\t\t\t\t\tinst.create_node(obj, {}, \"last\", function (new_node) {\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tinst.edit(new_node);\n\t\t\t\t\t\t\t} catch (ex) {\n\t\t\t\t\t\t\t\tsetTimeout(function () { inst.edit(new_node); },0);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t\"rename\" : {\n\t\t\t\t\t\"separator_before\"\t: false,\n\t\t\t\t\t\"separator_after\"\t: false,\n\t\t\t\t\t\"_disabled\"\t\t\t: false, //(this.check(\"rename_node\", data.reference, this.get_parent(data.reference), \"\")),\n\t\t\t\t\t\"label\"\t\t\t\t: \"Rename\",\n\t\t\t\t\t/*!\n\t\t\t\t\t\"shortcut\"\t\t\t: 113,\n\t\t\t\t\t\"shortcut_label\"\t: 'F2',\n\t\t\t\t\t\"icon\"\t\t\t\t: \"glyphicon glyphicon-leaf\",\n\t\t\t\t\t*/\n\t\t\t\t\t\"action\"\t\t\t: function (data) {\n\t\t\t\t\t\tvar inst = $.jstree.reference(data.reference),\n\t\t\t\t\t\t\tobj = inst.get_node(data.reference);\n\t\t\t\t\t\tinst.edit(obj);\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t\"remove\" : {\n\t\t\t\t\t\"separator_before\"\t: false,\n\t\t\t\t\t\"icon\"\t\t\t\t: false,\n\t\t\t\t\t\"separator_after\"\t: false,\n\t\t\t\t\t\"_disabled\"\t\t\t: false, //(this.check(\"delete_node\", data.reference, this.get_parent(data.reference), \"\")),\n\t\t\t\t\t\"label\"\t\t\t\t: \"Delete\",\n\t\t\t\t\t\"action\"\t\t\t: function (data) {\n\t\t\t\t\t\tvar inst = $.jstree.reference(data.reference),\n\t\t\t\t\t\t\tobj = inst.get_node(data.reference);\n\t\t\t\t\t\tif(inst.is_selected(obj)) {\n\t\t\t\t\t\t\tinst.delete_node(inst.get_selected());\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tinst.delete_node(obj);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t\"ccp\" : {\n\t\t\t\t\t\"separator_before\"\t: true,\n\t\t\t\t\t\"icon\"\t\t\t\t: false,\n\t\t\t\t\t\"separator_after\"\t: false,\n\t\t\t\t\t\"label\"\t\t\t\t: \"Edit\",\n\t\t\t\t\t\"action\"\t\t\t: false,\n\t\t\t\t\t\"submenu\" : {\n\t\t\t\t\t\t\"cut\" : {\n\t\t\t\t\t\t\t\"separator_before\"\t: false,\n\t\t\t\t\t\t\t\"separator_after\"\t: false,\n\t\t\t\t\t\t\t\"label\"\t\t\t\t: \"Cut\",\n\t\t\t\t\t\t\t\"action\"\t\t\t: function (data) {\n\t\t\t\t\t\t\t\tvar inst = $.jstree.reference(data.reference),\n\t\t\t\t\t\t\t\t\tobj = inst.get_node(data.reference);\n\t\t\t\t\t\t\t\tif(inst.is_selected(obj)) {\n\t\t\t\t\t\t\t\t\tinst.cut(inst.get_top_selected());\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\tinst.cut(obj);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\"copy\" : {\n\t\t\t\t\t\t\t\"separator_before\"\t: false,\n\t\t\t\t\t\t\t\"icon\"\t\t\t\t: false,\n\t\t\t\t\t\t\t\"separator_after\"\t: false,\n\t\t\t\t\t\t\t\"label\"\t\t\t\t: \"Copy\",\n\t\t\t\t\t\t\t\"action\"\t\t\t: function (data) {\n\t\t\t\t\t\t\t\tvar inst = $.jstree.reference(data.reference),\n\t\t\t\t\t\t\t\t\tobj = inst.get_node(data.reference);\n\t\t\t\t\t\t\t\tif(inst.is_selected(obj)) {\n\t\t\t\t\t\t\t\t\tinst.copy(inst.get_top_selected());\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\tinst.copy(obj);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\"paste\" : {\n\t\t\t\t\t\t\t\"separator_before\"\t: false,\n\t\t\t\t\t\t\t\"icon\"\t\t\t\t: false,\n\t\t\t\t\t\t\t\"_disabled\"\t\t\t: function (data) {\n\t\t\t\t\t\t\t\treturn !$.jstree.reference(data.reference).can_paste();\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"separator_after\"\t: false,\n\t\t\t\t\t\t\t\"label\"\t\t\t\t: \"Paste\",\n\t\t\t\t\t\t\t\"action\"\t\t\t: function (data) {\n\t\t\t\t\t\t\t\tvar inst = $.jstree.reference(data.reference),\n\t\t\t\t\t\t\t\t\tobj = inst.get_node(data.reference);\n\t\t\t\t\t\t\t\tinst.paste(obj);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t};\n\t\t}\n\t};\n\n\t$.jstree.plugins.contextmenu = function (options, parent) {\n\t\tthis.bind = function () {\n\t\t\tparent.bind.call(this);\n\n\t\t\tvar last_ts = 0, cto = null, ex, ey;\n\t\t\tthis.element\n\t\t\t\t.on(\"init.jstree loading.jstree ready.jstree\", $.proxy(function () {\n\t\t\t\t\t\tthis.get_container_ul().addClass('jstree-contextmenu');\n\t\t\t\t\t}, this))\n\t\t\t\t.on(\"contextmenu.jstree\", \".jstree-anchor\", $.proxy(function (e, data) {\n\t\t\t\t\t\tif (e.target.tagName.toLowerCase() === 'input') {\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t\tlast_ts = e.ctrlKey ? +new Date() : 0;\n\t\t\t\t\t\tif(data || cto) {\n\t\t\t\t\t\t\tlast_ts = (+new Date()) + 10000;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(cto) {\n\t\t\t\t\t\t\tclearTimeout(cto);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(!this.is_loading(e.currentTarget)) {\n\t\t\t\t\t\t\tthis.show_contextmenu(e.currentTarget, e.pageX, e.pageY, e);\n\t\t\t\t\t\t}\n\t\t\t\t\t}, this))\n\t\t\t\t.on(\"click.jstree\", \".jstree-anchor\", $.proxy(function (e) {\n\t\t\t\t\t\tif(this._data.contextmenu.visible && (!last_ts || (+new Date()) - last_ts > 250)) { // work around safari & macOS ctrl+click\n\t\t\t\t\t\t\t$.vakata.context.hide();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tlast_ts = 0;\n\t\t\t\t\t}, this))\n\t\t\t\t.on(\"touchstart.jstree\", \".jstree-anchor\", function (e) {\n\t\t\t\t\t\tif(!e.originalEvent || !e.originalEvent.changedTouches || !e.originalEvent.changedTouches[0]) {\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tex = e.originalEvent.changedTouches[0].clientX;\n\t\t\t\t\t\tey = e.originalEvent.changedTouches[0].clientY;\n\t\t\t\t\t\tcto = setTimeout(function () {\n\t\t\t\t\t\t\t$(e.currentTarget).trigger('contextmenu', true);\n\t\t\t\t\t\t}, 750);\n\t\t\t\t\t})\n\t\t\t\t.on('touchmove.vakata.jstree', function (e) {\n\t\t\t\t\t\tif(cto && e.originalEvent && e.originalEvent.changedTouches && e.originalEvent.changedTouches[0] && (Math.abs(ex - e.originalEvent.changedTouches[0].clientX) > 50 || Math.abs(ey - e.originalEvent.changedTouches[0].clientY) > 50)) {\n\t\t\t\t\t\t\tclearTimeout(cto);\n\t\t\t\t\t\t}\n\t\t\t\t\t})\n\t\t\t\t.on('touchend.vakata.jstree', function (e) {\n\t\t\t\t\t\tif(cto) {\n\t\t\t\t\t\t\tclearTimeout(cto);\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\n\t\t\t/*!\n\t\t\tif(!('oncontextmenu' in document.body) && ('ontouchstart' in document.body)) {\n\t\t\t\tvar el = null, tm = null;\n\t\t\t\tthis.element\n\t\t\t\t\t.on(\"touchstart\", \".jstree-anchor\", function (e) {\n\t\t\t\t\t\tel = e.currentTarget;\n\t\t\t\t\t\ttm = +new Date();\n\t\t\t\t\t\t$(document).one(\"touchend\", function (e) {\n\t\t\t\t\t\t\te.target = document.elementFromPoint(e.originalEvent.targetTouches[0].pageX - window.pageXOffset, e.originalEvent.targetTouches[0].pageY - window.pageYOffset);\n\t\t\t\t\t\t\te.currentTarget = e.target;\n\t\t\t\t\t\t\ttm = ((+(new Date())) - tm);\n\t\t\t\t\t\t\tif(e.target === el && tm > 600 && tm < 1000) {\n\t\t\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t\t\t\t$(el).trigger('contextmenu', e);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tel = null;\n\t\t\t\t\t\t\ttm = null;\n\t\t\t\t\t\t});\n\t\t\t\t\t});\n\t\t\t}\n\t\t\t*/\n\t\t\t$(document).on(\"context_hide.vakata.jstree\", $.proxy(function (e, data) {\n\t\t\t\tthis._data.contextmenu.visible = false;\n\t\t\t\t$(data.reference).removeClass('jstree-context');\n\t\t\t}, this));\n\t\t};\n\t\tthis.teardown = function () {\n\t\t\tif(this._data.contextmenu.visible) {\n\t\t\t\t$.vakata.context.hide();\n\t\t\t}\n\t\t\tparent.teardown.call(this);\n\t\t};\n\n\t\t/**\n\t\t * prepare and show the context menu for a node\n\t\t * @name show_contextmenu(obj [, x, y])\n\t\t * @param {mixed} obj the node\n\t\t * @param {Number} x the x-coordinate relative to the document to show the menu at\n\t\t * @param {Number} y the y-coordinate relative to the document to show the menu at\n\t\t * @param {Object} e the event if available that triggered the contextmenu\n\t\t * @plugin contextmenu\n\t\t * @trigger show_contextmenu.jstree\n\t\t */\n\t\tthis.show_contextmenu = function (obj, x, y, e) {\n\t\t\tobj = this.get_node(obj);\n\t\t\tif(!obj || obj.id === $.jstree.root) { return false; }\n\t\t\tvar s = this.settings.contextmenu,\n\t\t\t\td = this.get_node(obj, true),\n\t\t\t\ta = d.children(\".jstree-anchor\"),\n\t\t\t\to = false,\n\t\t\t\ti = false;\n\t\t\tif(s.show_at_node || x === undefined || y === undefined) {\n\t\t\t\to = a.offset();\n\t\t\t\tx = o.left;\n\t\t\t\ty = o.top + this._data.core.li_height;\n\t\t\t}\n\t\t\tif(this.settings.contextmenu.select_node && !this.is_selected(obj)) {\n\t\t\t\tthis.activate_node(obj, e);\n\t\t\t}\n\n\t\t\ti = s.items;\n\t\t\tif($.isFunction(i)) {\n\t\t\t\ti = i.call(this, obj, $.proxy(function (i) {\n\t\t\t\t\tthis._show_contextmenu(obj, x, y, i);\n\t\t\t\t}, this));\n\t\t\t}\n\t\t\tif($.isPlainObject(i)) {\n\t\t\t\tthis._show_contextmenu(obj, x, y, i);\n\t\t\t}\n\t\t};\n\t\t/**\n\t\t * show the prepared context menu for a node\n\t\t * @name _show_contextmenu(obj, x, y, i)\n\t\t * @param {mixed} obj the node\n\t\t * @param {Number} x the x-coordinate relative to the document to show the menu at\n\t\t * @param {Number} y the y-coordinate relative to the document to show the menu at\n\t\t * @param {Number} i the object of items to show\n\t\t * @plugin contextmenu\n\t\t * @trigger show_contextmenu.jstree\n\t\t * @private\n\t\t */\n\t\tthis._show_contextmenu = function (obj, x, y, i) {\n\t\t\tvar d = this.get_node(obj, true),\n\t\t\t\ta = d.children(\".jstree-anchor\");\n\t\t\t$(document).one(\"context_show.vakata.jstree\", $.proxy(function (e, data) {\n\t\t\t\tvar cls = 'jstree-contextmenu jstree-' + this.get_theme() + '-contextmenu';\n\t\t\t\t$(data.element).addClass(cls);\n\t\t\t\ta.addClass('jstree-context');\n\t\t\t}, this));\n\t\t\tthis._data.contextmenu.visible = true;\n\t\t\t$.vakata.context.show(a, { 'x' : x, 'y' : y }, i);\n\t\t\t/**\n\t\t\t * triggered when the contextmenu is shown for a node\n\t\t\t * @event\n\t\t\t * @name show_contextmenu.jstree\n\t\t\t * @param {Object} node the node\n\t\t\t * @param {Number} x the x-coordinate of the menu relative to the document\n\t\t\t * @param {Number} y the y-coordinate of the menu relative to the document\n\t\t\t * @plugin contextmenu\n\t\t\t */\n\t\t\tthis.trigger('show_contextmenu', { \"node\" : obj, \"x\" : x, \"y\" : y });\n\t\t};\n\t};\n\n\t// contextmenu helper\n\t(function ($) {\n\t\tvar right_to_left = false,\n\t\t\tvakata_context = {\n\t\t\t\telement\t\t: false,\n\t\t\t\treference\t: false,\n\t\t\t\tposition_x\t: 0,\n\t\t\t\tposition_y\t: 0,\n\t\t\t\titems\t\t: [],\n\t\t\t\thtml\t\t: \"\",\n\t\t\t\tis_visible\t: false\n\t\t\t};\n\n\t\t$.vakata.context = {\n\t\t\tsettings : {\n\t\t\t\thide_onmouseleave\t: 0,\n\t\t\t\ticons\t\t\t\t: true\n\t\t\t},\n\t\t\t_trigger : function (event_name) {\n\t\t\t\t$(document).triggerHandler(\"context_\" + event_name + \".vakata\", {\n\t\t\t\t\t\"reference\"\t: vakata_context.reference,\n\t\t\t\t\t\"element\"\t: vakata_context.element,\n\t\t\t\t\t\"position\"\t: {\n\t\t\t\t\t\t\"x\" : vakata_context.position_x,\n\t\t\t\t\t\t\"y\" : vakata_context.position_y\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t},\n\t\t\t_execute : function (i) {\n\t\t\t\ti = vakata_context.items[i];\n\t\t\t\treturn i && (!i._disabled || ($.isFunction(i._disabled) && !i._disabled({ \"item\" : i, \"reference\" : vakata_context.reference, \"element\" : vakata_context.element }))) && i.action ? i.action.call(null, {\n\t\t\t\t\t\t\t\"item\"\t\t: i,\n\t\t\t\t\t\t\t\"reference\"\t: vakata_context.reference,\n\t\t\t\t\t\t\t\"element\"\t: vakata_context.element,\n\t\t\t\t\t\t\t\"position\"\t: {\n\t\t\t\t\t\t\t\t\"x\" : vakata_context.position_x,\n\t\t\t\t\t\t\t\t\"y\" : vakata_context.position_y\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}) : false;\n\t\t\t},\n\t\t\t_parse : function (o, is_callback) {\n\t\t\t\tif(!o) { return false; }\n\t\t\t\tif(!is_callback) {\n\t\t\t\t\tvakata_context.html\t\t= \"\";\n\t\t\t\t\tvakata_context.items\t= [];\n\t\t\t\t}\n\t\t\t\tvar str = \"\",\n\t\t\t\t\tsep = false,\n\t\t\t\t\ttmp;\n\n\t\t\t\tif(is_callback) { str += \"<\"+\"ul>\"; }\n\t\t\t\t$.each(o, function (i, val) {\n\t\t\t\t\tif(!val) { return true; }\n\t\t\t\t\tvakata_context.items.push(val);\n\t\t\t\t\tif(!sep && val.separator_before) {\n\t\t\t\t\t\tstr += \"<\"+\"li class='vakata-context-separator'><\"+\"a href='#' \" + ($.vakata.context.settings.icons ? '' : 'style=\"margin-left:0px;\"') + \">&#160;<\"+\"/a><\"+\"/li>\";\n\t\t\t\t\t}\n\t\t\t\t\tsep = false;\n\t\t\t\t\tstr += \"<\"+\"li class='\" + (val._class || \"\") + (val._disabled === true || ($.isFunction(val._disabled) && val._disabled({ \"item\" : val, \"reference\" : vakata_context.reference, \"element\" : vakata_context.element })) ? \" vakata-contextmenu-disabled \" : \"\") + \"' \"+(val.shortcut?\" data-shortcut='\"+val.shortcut+\"' \":'')+\">\";\n\t\t\t\t\tstr += \"<\"+\"a href='#' rel='\" + (vakata_context.items.length - 1) + \"' \" + (val.title ? \"title='\" + val.title + \"'\" : \"\") + \">\";\n\t\t\t\t\tif($.vakata.context.settings.icons) {\n\t\t\t\t\t\tstr += \"<\"+\"i \";\n\t\t\t\t\t\tif(val.icon) {\n\t\t\t\t\t\t\tif(val.icon.indexOf(\"/\") !== -1 || val.icon.indexOf(\".\") !== -1) { str += \" style='background:url(\\\"\" + val.icon + \"\\\") center center no-repeat' \"; }\n\t\t\t\t\t\t\telse { str += \" class='\" + val.icon + \"' \"; }\n\t\t\t\t\t\t}\n\t\t\t\t\t\tstr += \"><\"+\"/i><\"+\"span class='vakata-contextmenu-sep'>&#160;<\"+\"/span>\";\n\t\t\t\t\t}\n\t\t\t\t\tstr += ($.isFunction(val.label) ? val.label({ \"item\" : i, \"reference\" : vakata_context.reference, \"element\" : vakata_context.element }) : val.label) + (val.shortcut?' <span class=\"vakata-contextmenu-shortcut vakata-contextmenu-shortcut-'+val.shortcut+'\">'+ (val.shortcut_label || '') +'</span>':'') + \"<\"+\"/a>\";\n\t\t\t\t\tif(val.submenu) {\n\t\t\t\t\t\ttmp = $.vakata.context._parse(val.submenu, true);\n\t\t\t\t\t\tif(tmp) { str += tmp; }\n\t\t\t\t\t}\n\t\t\t\t\tstr += \"<\"+\"/li>\";\n\t\t\t\t\tif(val.separator_after) {\n\t\t\t\t\t\tstr += \"<\"+\"li class='vakata-context-separator'><\"+\"a href='#' \" + ($.vakata.context.settings.icons ? '' : 'style=\"margin-left:0px;\"') + \">&#160;<\"+\"/a><\"+\"/li>\";\n\t\t\t\t\t\tsep = true;\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\tstr  = str.replace(/<li class\\='vakata-context-separator'\\><\\/li\\>$/,\"\");\n\t\t\t\tif(is_callback) { str += \"</ul>\"; }\n\t\t\t\t/**\n\t\t\t\t * triggered on the document when the contextmenu is parsed (HTML is built)\n\t\t\t\t * @event\n\t\t\t\t * @plugin contextmenu\n\t\t\t\t * @name context_parse.vakata\n\t\t\t\t * @param {jQuery} reference the element that was right clicked\n\t\t\t\t * @param {jQuery} element the DOM element of the menu itself\n\t\t\t\t * @param {Object} position the x & y coordinates of the menu\n\t\t\t\t */\n\t\t\t\tif(!is_callback) { vakata_context.html = str; $.vakata.context._trigger(\"parse\"); }\n\t\t\t\treturn str.length > 10 ? str : false;\n\t\t\t},\n\t\t\t_show_submenu : function (o) {\n\t\t\t\to = $(o);\n\t\t\t\tif(!o.length || !o.children(\"ul\").length) { return; }\n\t\t\t\tvar e = o.children(\"ul\"),\n\t\t\t\t\txl = o.offset().left,\n\t\t\t\t\tx = xl + o.outerWidth(),\n\t\t\t\t\ty = o.offset().top,\n\t\t\t\t\tw = e.width(),\n\t\t\t\t\th = e.height(),\n\t\t\t\t\tdw = $(window).width() + $(window).scrollLeft(),\n\t\t\t\t\tdh = $(window).height() + $(window).scrollTop();\n\t\t\t\t// може да се спести е една проверка - дали няма някой от класовете вече нагоре\n\t\t\t\tif(right_to_left) {\n\t\t\t\t\to[x - (w + 10 + o.outerWidth()) < 0 ? \"addClass\" : \"removeClass\"](\"vakata-context-left\");\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\to[x + w > dw  && xl > dw - x ? \"addClass\" : \"removeClass\"](\"vakata-context-right\");\n\t\t\t\t}\n\t\t\t\tif(y + h + 10 > dh) {\n\t\t\t\t\te.css(\"bottom\",\"-1px\");\n\t\t\t\t}\n\n\t\t\t\t//if does not fit - stick it to the side\n\t\t\t\tif (o.hasClass('vakata-context-right')) {\n\t\t\t\t\tif (xl < w) {\n\t\t\t\t\t\te.css(\"margin-right\", xl - w);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif (dw - x < w) {\n\t\t\t\t\t\te.css(\"margin-left\", dw - x - w);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\te.show();\n\t\t\t},\n\t\t\tshow : function (reference, position, data) {\n\t\t\t\tvar o, e, x, y, w, h, dw, dh, cond = true;\n\t\t\t\tif(vakata_context.element && vakata_context.element.length) {\n\t\t\t\t\tvakata_context.element.width('');\n\t\t\t\t}\n\t\t\t\tswitch(cond) {\n\t\t\t\t\tcase (!position && !reference):\n\t\t\t\t\t\treturn false;\n\t\t\t\t\tcase (!!position && !!reference):\n\t\t\t\t\t\tvakata_context.reference\t= reference;\n\t\t\t\t\t\tvakata_context.position_x\t= position.x;\n\t\t\t\t\t\tvakata_context.position_y\t= position.y;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase (!position && !!reference):\n\t\t\t\t\t\tvakata_context.reference\t= reference;\n\t\t\t\t\t\to = reference.offset();\n\t\t\t\t\t\tvakata_context.position_x\t= o.left + reference.outerHeight();\n\t\t\t\t\t\tvakata_context.position_y\t= o.top;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase (!!position && !reference):\n\t\t\t\t\t\tvakata_context.position_x\t= position.x;\n\t\t\t\t\t\tvakata_context.position_y\t= position.y;\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tif(!!reference && !data && $(reference).data('vakata_contextmenu')) {\n\t\t\t\t\tdata = $(reference).data('vakata_contextmenu');\n\t\t\t\t}\n\t\t\t\tif($.vakata.context._parse(data)) {\n\t\t\t\t\tvakata_context.element.html(vakata_context.html);\n\t\t\t\t}\n\t\t\t\tif(vakata_context.items.length) {\n\t\t\t\t\tvakata_context.element.appendTo(\"body\");\n\t\t\t\t\te = vakata_context.element;\n\t\t\t\t\tx = vakata_context.position_x;\n\t\t\t\t\ty = vakata_context.position_y;\n\t\t\t\t\tw = e.width();\n\t\t\t\t\th = e.height();\n\t\t\t\t\tdw = $(window).width() + $(window).scrollLeft();\n\t\t\t\t\tdh = $(window).height() + $(window).scrollTop();\n\t\t\t\t\tif(right_to_left) {\n\t\t\t\t\t\tx -= (e.outerWidth() - $(reference).outerWidth());\n\t\t\t\t\t\tif(x < $(window).scrollLeft() + 20) {\n\t\t\t\t\t\t\tx = $(window).scrollLeft() + 20;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif(x + w + 20 > dw) {\n\t\t\t\t\t\tx = dw - (w + 20);\n\t\t\t\t\t}\n\t\t\t\t\tif(y + h + 20 > dh) {\n\t\t\t\t\t\ty = dh - (h + 20);\n\t\t\t\t\t}\n\n\t\t\t\t\tvakata_context.element\n\t\t\t\t\t\t.css({ \"left\" : x, \"top\" : y })\n\t\t\t\t\t\t.show()\n\t\t\t\t\t\t.find('a').first().focus().parent().addClass(\"vakata-context-hover\");\n\t\t\t\t\tvakata_context.is_visible = true;\n\t\t\t\t\t/**\n\t\t\t\t\t * triggered on the document when the contextmenu is shown\n\t\t\t\t\t * @event\n\t\t\t\t\t * @plugin contextmenu\n\t\t\t\t\t * @name context_show.vakata\n\t\t\t\t\t * @param {jQuery} reference the element that was right clicked\n\t\t\t\t\t * @param {jQuery} element the DOM element of the menu itself\n\t\t\t\t\t * @param {Object} position the x & y coordinates of the menu\n\t\t\t\t\t */\n\t\t\t\t\t$.vakata.context._trigger(\"show\");\n\t\t\t\t}\n\t\t\t},\n\t\t\thide : function () {\n\t\t\t\tif(vakata_context.is_visible) {\n\t\t\t\t\tvakata_context.element.hide().find(\"ul\").hide().end().find(':focus').blur().end().detach();\n\t\t\t\t\tvakata_context.is_visible = false;\n\t\t\t\t\t/**\n\t\t\t\t\t * triggered on the document when the contextmenu is hidden\n\t\t\t\t\t * @event\n\t\t\t\t\t * @plugin contextmenu\n\t\t\t\t\t * @name context_hide.vakata\n\t\t\t\t\t * @param {jQuery} reference the element that was right clicked\n\t\t\t\t\t * @param {jQuery} element the DOM element of the menu itself\n\t\t\t\t\t * @param {Object} position the x & y coordinates of the menu\n\t\t\t\t\t */\n\t\t\t\t\t$.vakata.context._trigger(\"hide\");\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\t$(function () {\n\t\t\tright_to_left = $(\"body\").css(\"direction\") === \"rtl\";\n\t\t\tvar to = false;\n\n\t\t\tvakata_context.element = $(\"<ul class='vakata-context'></ul>\");\n\t\t\tvakata_context.element\n\t\t\t\t.on(\"mouseenter\", \"li\", function (e) {\n\t\t\t\t\te.stopImmediatePropagation();\n\n\t\t\t\t\tif($.contains(this, e.relatedTarget)) {\n\t\t\t\t\t\t// премахнато заради delegate mouseleave по-долу\n\t\t\t\t\t\t// $(this).find(\".vakata-context-hover\").removeClass(\"vakata-context-hover\");\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tif(to) { clearTimeout(to); }\n\t\t\t\t\tvakata_context.element.find(\".vakata-context-hover\").removeClass(\"vakata-context-hover\").end();\n\n\t\t\t\t\t$(this)\n\t\t\t\t\t\t.siblings().find(\"ul\").hide().end().end()\n\t\t\t\t\t\t.parentsUntil(\".vakata-context\", \"li\").addBack().addClass(\"vakata-context-hover\");\n\t\t\t\t\t$.vakata.context._show_submenu(this);\n\t\t\t\t})\n\t\t\t\t// тестово - дали не натоварва?\n\t\t\t\t.on(\"mouseleave\", \"li\", function (e) {\n\t\t\t\t\tif($.contains(this, e.relatedTarget)) { return; }\n\t\t\t\t\t$(this).find(\".vakata-context-hover\").addBack().removeClass(\"vakata-context-hover\");\n\t\t\t\t})\n\t\t\t\t.on(\"mouseleave\", function (e) {\n\t\t\t\t\t$(this).find(\".vakata-context-hover\").removeClass(\"vakata-context-hover\");\n\t\t\t\t\tif($.vakata.context.settings.hide_onmouseleave) {\n\t\t\t\t\t\tto = setTimeout(\n\t\t\t\t\t\t\t(function (t) {\n\t\t\t\t\t\t\t\treturn function () { $.vakata.context.hide(); };\n\t\t\t\t\t\t\t}(this)), $.vakata.context.settings.hide_onmouseleave);\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t\t.on(\"click\", \"a\", function (e) {\n\t\t\t\t\te.preventDefault();\n\t\t\t\t//})\n\t\t\t\t//.on(\"mouseup\", \"a\", function (e) {\n\t\t\t\t\tif(!$(this).blur().parent().hasClass(\"vakata-context-disabled\") && $.vakata.context._execute($(this).attr(\"rel\")) !== false) {\n\t\t\t\t\t\t$.vakata.context.hide();\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t\t.on('keydown', 'a', function (e) {\n\t\t\t\t\t\tvar o = null;\n\t\t\t\t\t\tswitch(e.which) {\n\t\t\t\t\t\t\tcase 13:\n\t\t\t\t\t\t\tcase 32:\n\t\t\t\t\t\t\t\te.type = \"click\";\n\t\t\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t\t\t\t$(e.currentTarget).trigger(e);\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase 37:\n\t\t\t\t\t\t\t\tif(vakata_context.is_visible) {\n\t\t\t\t\t\t\t\t\tvakata_context.element.find(\".vakata-context-hover\").last().closest(\"li\").first().find(\"ul\").hide().find(\".vakata-context-hover\").removeClass(\"vakata-context-hover\").end().end().children('a').focus();\n\t\t\t\t\t\t\t\t\te.stopImmediatePropagation();\n\t\t\t\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase 38:\n\t\t\t\t\t\t\t\tif(vakata_context.is_visible) {\n\t\t\t\t\t\t\t\t\to = vakata_context.element.find(\"ul:visible\").addBack().last().children(\".vakata-context-hover\").removeClass(\"vakata-context-hover\").prevAll(\"li:not(.vakata-context-separator)\").first();\n\t\t\t\t\t\t\t\t\tif(!o.length) { o = vakata_context.element.find(\"ul:visible\").addBack().last().children(\"li:not(.vakata-context-separator)\").last(); }\n\t\t\t\t\t\t\t\t\to.addClass(\"vakata-context-hover\").children('a').focus();\n\t\t\t\t\t\t\t\t\te.stopImmediatePropagation();\n\t\t\t\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase 39:\n\t\t\t\t\t\t\t\tif(vakata_context.is_visible) {\n\t\t\t\t\t\t\t\t\tvakata_context.element.find(\".vakata-context-hover\").last().children(\"ul\").show().children(\"li:not(.vakata-context-separator)\").removeClass(\"vakata-context-hover\").first().addClass(\"vakata-context-hover\").children('a').focus();\n\t\t\t\t\t\t\t\t\te.stopImmediatePropagation();\n\t\t\t\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase 40:\n\t\t\t\t\t\t\t\tif(vakata_context.is_visible) {\n\t\t\t\t\t\t\t\t\to = vakata_context.element.find(\"ul:visible\").addBack().last().children(\".vakata-context-hover\").removeClass(\"vakata-context-hover\").nextAll(\"li:not(.vakata-context-separator)\").first();\n\t\t\t\t\t\t\t\t\tif(!o.length) { o = vakata_context.element.find(\"ul:visible\").addBack().last().children(\"li:not(.vakata-context-separator)\").first(); }\n\t\t\t\t\t\t\t\t\to.addClass(\"vakata-context-hover\").children('a').focus();\n\t\t\t\t\t\t\t\t\te.stopImmediatePropagation();\n\t\t\t\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase 27:\n\t\t\t\t\t\t\t\t$.vakata.context.hide();\n\t\t\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t\t//console.log(e.which);\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t})\n\t\t\t\t.on('keydown', function (e) {\n\t\t\t\t\te.preventDefault();\n\t\t\t\t\tvar a = vakata_context.element.find('.vakata-contextmenu-shortcut-' + e.which).parent();\n\t\t\t\t\tif(a.parent().not('.vakata-context-disabled')) {\n\t\t\t\t\t\ta.click();\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t$(document)\n\t\t\t\t.on(\"mousedown.vakata.jstree\", function (e) {\n\t\t\t\t\tif(vakata_context.is_visible && vakata_context.element[0] !== e.target  && !$.contains(vakata_context.element[0], e.target)) {\n\t\t\t\t\t\t$.vakata.context.hide();\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t\t.on(\"context_show.vakata.jstree\", function (e, data) {\n\t\t\t\t\tvakata_context.element.find(\"li:has(ul)\").children(\"a\").addClass(\"vakata-context-parent\");\n\t\t\t\t\tif(right_to_left) {\n\t\t\t\t\t\tvakata_context.element.addClass(\"vakata-context-rtl\").css(\"direction\", \"rtl\");\n\t\t\t\t\t}\n\t\t\t\t\t// also apply a RTL class?\n\t\t\t\t\tvakata_context.element.find(\"ul\").hide().end();\n\t\t\t\t});\n\t\t});\n\t}($));\n\t// $.jstree.defaults.plugins.push(\"contextmenu\");\n\n\n/**\n * ### Drag'n'drop plugin\n *\n * Enables dragging and dropping of nodes in the tree, resulting in a move or copy operations.\n */\n\n\t/**\n\t * stores all defaults for the drag'n'drop plugin\n\t * @name $.jstree.defaults.dnd\n\t * @plugin dnd\n\t */\n\t$.jstree.defaults.dnd = {\n\t\t/**\n\t\t * a boolean indicating if a copy should be possible while dragging (by pressint the meta key or Ctrl). Defaults to `true`.\n\t\t * @name $.jstree.defaults.dnd.copy\n\t\t * @plugin dnd\n\t\t */\n\t\tcopy : true,\n\t\t/**\n\t\t * a number indicating how long a node should remain hovered while dragging to be opened. Defaults to `500`.\n\t\t * @name $.jstree.defaults.dnd.open_timeout\n\t\t * @plugin dnd\n\t\t */\n\t\topen_timeout : 500,\n\t\t/**\n\t\t * a function invoked each time a node is about to be dragged, invoked in the tree's scope and receives the nodes about to be dragged as an argument (array) and the event that started the drag - return `false` to prevent dragging\n\t\t * @name $.jstree.defaults.dnd.is_draggable\n\t\t * @plugin dnd\n\t\t */\n\t\tis_draggable : true,\n\t\t/**\n\t\t * a boolean indicating if checks should constantly be made while the user is dragging the node (as opposed to checking only on drop), default is `true`\n\t\t * @name $.jstree.defaults.dnd.check_while_dragging\n\t\t * @plugin dnd\n\t\t */\n\t\tcheck_while_dragging : true,\n\t\t/**\n\t\t * a boolean indicating if nodes from this tree should only be copied with dnd (as opposed to moved), default is `false`\n\t\t * @name $.jstree.defaults.dnd.always_copy\n\t\t * @plugin dnd\n\t\t */\n\t\talways_copy : false,\n\t\t/**\n\t\t * when dropping a node \"inside\", this setting indicates the position the node should go to - it can be an integer or a string: \"first\" (same as 0) or \"last\", default is `0`\n\t\t * @name $.jstree.defaults.dnd.inside_pos\n\t\t * @plugin dnd\n\t\t */\n\t\tinside_pos : 0,\n\t\t/**\n\t\t * when starting the drag on a node that is selected this setting controls if all selected nodes are dragged or only the single node, default is `true`, which means all selected nodes are dragged when the drag is started on a selected node\n\t\t * @name $.jstree.defaults.dnd.drag_selection\n\t\t * @plugin dnd\n\t\t */\n\t\tdrag_selection : true,\n\t\t/**\n\t\t * controls whether dnd works on touch devices. If left as boolean true dnd will work the same as in desktop browsers, which in some cases may impair scrolling. If set to boolean false dnd will not work on touch devices. There is a special third option - string \"selected\" which means only selected nodes can be dragged on touch devices.\n\t\t * @name $.jstree.defaults.dnd.touch\n\t\t * @plugin dnd\n\t\t */\n\t\ttouch : true,\n\t\t/**\n\t\t * controls whether items can be dropped anywhere on the node, not just on the anchor, by default only the node anchor is a valid drop target. Works best with the wholerow plugin. If enabled on mobile depending on the interface it might be hard for the user to cancel the drop, since the whole tree container will be a valid drop target.\n\t\t * @name $.jstree.defaults.dnd.large_drop_target\n\t\t * @plugin dnd\n\t\t */\n\t\tlarge_drop_target : false,\n\t\t/**\n\t\t * controls whether a drag can be initiated from any part of the node and not just the text/icon part, works best with the wholerow plugin. Keep in mind it can cause problems with tree scrolling on mobile depending on the interface - in that case set the touch option to \"selected\".\n\t\t * @name $.jstree.defaults.dnd.large_drag_target\n\t\t * @plugin dnd\n\t\t */\n\t\tlarge_drag_target : false,\n\t\t/**\n\t\t * controls whether use HTML5 dnd api instead of classical. That will allow better integration of dnd events with other HTML5 controls.\n\t\t * @reference http://caniuse.com/#feat=dragndrop\n\t\t * @name $.jstree.defaults.dnd.use_html5\n\t\t * @plugin dnd\n\t\t */\n\t\tuse_html5: false\n\t};\n\tvar drg, elm;\n\t// TODO: now check works by checking for each node individually, how about max_children, unique, etc?\n\t$.jstree.plugins.dnd = function (options, parent) {\n\t\tthis.init = function (el, options) {\n\t\t\tparent.init.call(this, el, options);\n\t\t\tthis.settings.dnd.use_html5 = this.settings.dnd.use_html5 && ('draggable' in document.createElement('span'));\n\t\t};\n\t\tthis.bind = function () {\n\t\t\tparent.bind.call(this);\n\n\t\t\tthis.element\n\t\t\t\t.on(this.settings.dnd.use_html5 ? 'dragstart.jstree' : 'mousedown.jstree touchstart.jstree', this.settings.dnd.large_drag_target ? '.jstree-node' : '.jstree-anchor', $.proxy(function (e) {\n\t\t\t\t\t\tif(this.settings.dnd.large_drag_target && $(e.target).closest('.jstree-node')[0] !== e.currentTarget) {\n\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(e.type === \"touchstart\" && (!this.settings.dnd.touch || (this.settings.dnd.touch === 'selected' && !$(e.currentTarget).closest('.jstree-node').children('.jstree-anchor').hasClass('jstree-clicked')))) {\n\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tvar obj = this.get_node(e.target),\n\t\t\t\t\t\t\tmlt = this.is_selected(obj) && this.settings.dnd.drag_selection ? this.get_top_selected().length : 1,\n\t\t\t\t\t\t\ttxt = (mlt > 1 ? mlt + ' ' + this.get_string('nodes') : this.get_text(e.currentTarget));\n\t\t\t\t\t\tif(this.settings.core.force_text) {\n\t\t\t\t\t\t\ttxt = $.vakata.html.escape(txt);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(obj && obj.id && obj.id !== $.jstree.root && (e.which === 1 || e.type === \"touchstart\" || e.type === \"dragstart\") &&\n\t\t\t\t\t\t\t(this.settings.dnd.is_draggable === true || ($.isFunction(this.settings.dnd.is_draggable) && this.settings.dnd.is_draggable.call(this, (mlt > 1 ? this.get_top_selected(true) : [obj]), e)))\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\tdrg = { 'jstree' : true, 'origin' : this, 'obj' : this.get_node(obj,true), 'nodes' : mlt > 1 ? this.get_top_selected() : [obj.id] };\n\t\t\t\t\t\t\telm = e.currentTarget;\n\t\t\t\t\t\t\tif (this.settings.dnd.use_html5) {\n\t\t\t\t\t\t\t\t$.vakata.dnd._trigger('start', e, { 'helper': $(), 'element': elm, 'data': drg });\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tthis.element.trigger('mousedown.jstree');\n\t\t\t\t\t\t\t\treturn $.vakata.dnd.start(e, drg, '<div id=\"jstree-dnd\" class=\"jstree-' + this.get_theme() + ' jstree-' + this.get_theme() + '-' + this.get_theme_variant() + ' ' + ( this.settings.core.themes.responsive ? ' jstree-dnd-responsive' : '' ) + '\"><i class=\"jstree-icon jstree-er\"></i>' + txt + '<ins class=\"jstree-copy\" style=\"display:none;\">+</ins></div>');\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}, this));\n\t\t\tif (this.settings.dnd.use_html5) {\n\t\t\t\tthis.element\n\t\t\t\t\t.on('dragover.jstree', function (e) {\n\t\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t\t\t$.vakata.dnd._trigger('move', e, { 'helper': $(), 'element': elm, 'data': drg });\n\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t})\n\t\t\t\t\t//.on('dragenter.jstree', this.settings.dnd.large_drop_target ? '.jstree-node' : '.jstree-anchor', $.proxy(function (e) {\n\t\t\t\t\t//\t\te.preventDefault();\n\t\t\t\t\t//\t\t$.vakata.dnd._trigger('move', e, { 'helper': $(), 'element': elm, 'data': drg });\n\t\t\t\t\t//\t\treturn false;\n\t\t\t\t\t//\t}, this))\n\t\t\t\t\t.on('drop.jstree', $.proxy(function (e) {\n\t\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t\t\t$.vakata.dnd._trigger('stop', e, { 'helper': $(), 'element': elm, 'data': drg });\n\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t}, this));\n\t\t\t}\n\t\t};\n\t\tthis.redraw_node = function(obj, deep, callback, force_render) {\n\t\t\tobj = parent.redraw_node.apply(this, arguments);\n\t\t\tif (obj && this.settings.dnd.use_html5) {\n\t\t\t\tif (this.settings.dnd.large_drag_target) {\n\t\t\t\t\tobj.setAttribute('draggable', true);\n\t\t\t\t} else {\n\t\t\t\t\tvar i, j, tmp = null;\n\t\t\t\t\tfor(i = 0, j = obj.childNodes.length; i < j; i++) {\n\t\t\t\t\t\tif(obj.childNodes[i] && obj.childNodes[i].className && obj.childNodes[i].className.indexOf(\"jstree-anchor\") !== -1) {\n\t\t\t\t\t\t\ttmp = obj.childNodes[i];\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif(tmp) {\n\t\t\t\t\t\ttmp.setAttribute('draggable', true);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn obj;\n\t\t};\n\t};\n\n\t$(function() {\n\t\t// bind only once for all instances\n\t\tvar lastmv = false,\n\t\t\tlaster = false,\n\t\t\tlastev = false,\n\t\t\topento = false,\n\t\t\tmarker = $('<div id=\"jstree-marker\">&#160;</div>').hide(); //.appendTo('body');\n\n\t\t$(document)\n\t\t\t.on('dnd_start.vakata.jstree', function (e, data) {\n\t\t\t\tlastmv = false;\n\t\t\t\tlastev = false;\n\t\t\t\tif(!data || !data.data || !data.data.jstree) { return; }\n\t\t\t\tmarker.appendTo('body'); //.show();\n\t\t\t})\n\t\t\t.on('dnd_move.vakata.jstree', function (e, data) {\n\t\t\t\tvar isDifferentNode = data.event.target !== lastev.target;\n\t\t\t\tif(opento) {\n\t\t\t\t\tif (!data.event || data.event.type !== 'dragover' || isDifferentNode) {\n\t\t\t\t\t\tclearTimeout(opento);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(!data || !data.data || !data.data.jstree) { return; }\n\n\t\t\t\t// if we are hovering the marker image do nothing (can happen on \"inside\" drags)\n\t\t\t\tif(data.event.target.id && data.event.target.id === 'jstree-marker') {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tlastev = data.event;\n\n\t\t\t\tvar ins = $.jstree.reference(data.event.target),\n\t\t\t\t\tref = false,\n\t\t\t\t\toff = false,\n\t\t\t\t\trel = false,\n\t\t\t\t\ttmp, l, t, h, p, i, o, ok, t1, t2, op, ps, pr, ip, tm, is_copy, pn;\n\t\t\t\t// if we are over an instance\n\t\t\t\tif(ins && ins._data && ins._data.dnd) {\n\t\t\t\t\tmarker.attr('class', 'jstree-' + ins.get_theme() + ( ins.settings.core.themes.responsive ? ' jstree-dnd-responsive' : '' ));\n\t\t\t\t\tis_copy = data.data.origin && (data.data.origin.settings.dnd.always_copy || (data.data.origin.settings.dnd.copy && (data.event.metaKey || data.event.ctrlKey)));\n\t\t\t\t\tdata.helper\n\t\t\t\t\t\t.children().attr('class', 'jstree-' + ins.get_theme() + ' jstree-' + ins.get_theme() + '-' + ins.get_theme_variant() + ' ' + ( ins.settings.core.themes.responsive ? ' jstree-dnd-responsive' : '' ))\n\t\t\t\t\t\t.find('.jstree-copy').first()[ is_copy ? 'show' : 'hide' ]();\n\n\t\t\t\t\t// if are hovering the container itself add a new root node\n\t\t\t\t\t//console.log(data.event);\n\t\t\t\t\tif( (data.event.target === ins.element[0] || data.event.target === ins.get_container_ul()[0]) && ins.get_container_ul().children().length === 0) {\n\t\t\t\t\t\tok = true;\n\t\t\t\t\t\tfor(t1 = 0, t2 = data.data.nodes.length; t1 < t2; t1++) {\n\t\t\t\t\t\t\tok = ok && ins.check( (data.data.origin && (data.data.origin.settings.dnd.always_copy || (data.data.origin.settings.dnd.copy && (data.event.metaKey || data.event.ctrlKey)) ) ? \"copy_node\" : \"move_node\"), (data.data.origin && data.data.origin !== ins ? data.data.origin.get_node(data.data.nodes[t1]) : data.data.nodes[t1]), $.jstree.root, 'last', { 'dnd' : true, 'ref' : ins.get_node($.jstree.root), 'pos' : 'i', 'origin' : data.data.origin, 'is_multi' : (data.data.origin && data.data.origin !== ins), 'is_foreign' : (!data.data.origin) });\n\t\t\t\t\t\t\tif(!ok) { break; }\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(ok) {\n\t\t\t\t\t\t\tlastmv = { 'ins' : ins, 'par' : $.jstree.root, 'pos' : 'last' };\n\t\t\t\t\t\t\tmarker.hide();\n\t\t\t\t\t\t\tdata.helper.find('.jstree-icon').first().removeClass('jstree-er').addClass('jstree-ok');\n\t\t\t\t\t\t\tif (data.event.originalEvent && data.event.originalEvent.dataTransfer) {\n\t\t\t\t\t\t\t\tdata.event.originalEvent.dataTransfer.dropEffect = is_copy ? 'copy' : 'move';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\t// if we are hovering a tree node\n\t\t\t\t\t\tref = ins.settings.dnd.large_drop_target ? $(data.event.target).closest('.jstree-node').children('.jstree-anchor') : $(data.event.target).closest('.jstree-anchor');\n\t\t\t\t\t\tif(ref && ref.length && ref.parent().is('.jstree-closed, .jstree-open, .jstree-leaf')) {\n\t\t\t\t\t\t\toff = ref.offset();\n\t\t\t\t\t\t\trel = (data.event.pageY !== undefined ? data.event.pageY : data.event.originalEvent.pageY) - off.top;\n\t\t\t\t\t\t\th = ref.outerHeight();\n\t\t\t\t\t\t\tif(rel < h / 3) {\n\t\t\t\t\t\t\t\to = ['b', 'i', 'a'];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse if(rel > h - h / 3) {\n\t\t\t\t\t\t\t\to = ['a', 'i', 'b'];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\to = rel > h / 2 ? ['i', 'a', 'b'] : ['i', 'b', 'a'];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$.each(o, function (j, v) {\n\t\t\t\t\t\t\t\tswitch(v) {\n\t\t\t\t\t\t\t\t\tcase 'b':\n\t\t\t\t\t\t\t\t\t\tl = off.left - 6;\n\t\t\t\t\t\t\t\t\t\tt = off.top;\n\t\t\t\t\t\t\t\t\t\tp = ins.get_parent(ref);\n\t\t\t\t\t\t\t\t\t\ti = ref.parent().index();\n\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\tcase 'i':\n\t\t\t\t\t\t\t\t\t\tip = ins.settings.dnd.inside_pos;\n\t\t\t\t\t\t\t\t\t\ttm = ins.get_node(ref.parent());\n\t\t\t\t\t\t\t\t\t\tl = off.left - 2;\n\t\t\t\t\t\t\t\t\t\tt = off.top + h / 2 + 1;\n\t\t\t\t\t\t\t\t\t\tp = tm.id;\n\t\t\t\t\t\t\t\t\t\ti = ip === 'first' ? 0 : (ip === 'last' ? tm.children.length : Math.min(ip, tm.children.length));\n\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\tcase 'a':\n\t\t\t\t\t\t\t\t\t\tl = off.left - 6;\n\t\t\t\t\t\t\t\t\t\tt = off.top + h;\n\t\t\t\t\t\t\t\t\t\tp = ins.get_parent(ref);\n\t\t\t\t\t\t\t\t\t\ti = ref.parent().index() + 1;\n\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tok = true;\n\t\t\t\t\t\t\t\tfor(t1 = 0, t2 = data.data.nodes.length; t1 < t2; t1++) {\n\t\t\t\t\t\t\t\t\top = data.data.origin && (data.data.origin.settings.dnd.always_copy || (data.data.origin.settings.dnd.copy && (data.event.metaKey || data.event.ctrlKey))) ? \"copy_node\" : \"move_node\";\n\t\t\t\t\t\t\t\t\tps = i;\n\t\t\t\t\t\t\t\t\tif(op === \"move_node\" && v === 'a' && (data.data.origin && data.data.origin === ins) && p === ins.get_parent(data.data.nodes[t1])) {\n\t\t\t\t\t\t\t\t\t\tpr = ins.get_node(p);\n\t\t\t\t\t\t\t\t\t\tif(ps > $.inArray(data.data.nodes[t1], pr.children)) {\n\t\t\t\t\t\t\t\t\t\t\tps -= 1;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tok = ok && ( (ins && ins.settings && ins.settings.dnd && ins.settings.dnd.check_while_dragging === false) || ins.check(op, (data.data.origin && data.data.origin !== ins ? data.data.origin.get_node(data.data.nodes[t1]) : data.data.nodes[t1]), p, ps, { 'dnd' : true, 'ref' : ins.get_node(ref.parent()), 'pos' : v, 'origin' : data.data.origin, 'is_multi' : (data.data.origin && data.data.origin !== ins), 'is_foreign' : (!data.data.origin) }) );\n\t\t\t\t\t\t\t\t\tif(!ok) {\n\t\t\t\t\t\t\t\t\t\tif(ins && ins.last_error) { laster = ins.last_error(); }\n\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif(v === 'i' && ref.parent().is('.jstree-closed') && ins.settings.dnd.open_timeout) {\n\t\t\t\t\t\t\t\t\tif (!data.event || data.event.type !== 'dragover' || isDifferentNode) {\n\t\t\t\t\t\t\t\t\t\tif (opento) { clearTimeout(opento); }\n\t\t\t\t\t\t\t\t\t\topento = setTimeout((function (x, z) { return function () { x.open_node(z); }; }(ins, ref)), ins.settings.dnd.open_timeout);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif(ok) {\n\t\t\t\t\t\t\t\t\tpn = ins.get_node(p, true);\n\t\t\t\t\t\t\t\t\tif (!pn.hasClass('.jstree-dnd-parent')) {\n\t\t\t\t\t\t\t\t\t\t$('.jstree-dnd-parent').removeClass('jstree-dnd-parent');\n\t\t\t\t\t\t\t\t\t\tpn.addClass('jstree-dnd-parent');\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tlastmv = { 'ins' : ins, 'par' : p, 'pos' : v === 'i' && ip === 'last' && i === 0 && !ins.is_loaded(tm) ? 'last' : i };\n\t\t\t\t\t\t\t\t\tmarker.css({ 'left' : l + 'px', 'top' : t + 'px' }).show();\n\t\t\t\t\t\t\t\t\tdata.helper.find('.jstree-icon').first().removeClass('jstree-er').addClass('jstree-ok');\n\t\t\t\t\t\t\t\t\tif (data.event.originalEvent && data.event.originalEvent.dataTransfer) {\n\t\t\t\t\t\t\t\t\t\tdata.event.originalEvent.dataTransfer.dropEffect = is_copy ? 'copy' : 'move';\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tlaster = {};\n\t\t\t\t\t\t\t\t\to = true;\n\t\t\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\tif(o === true) { return; }\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$('.jstree-dnd-parent').removeClass('jstree-dnd-parent');\n\t\t\t\tlastmv = false;\n\t\t\t\tdata.helper.find('.jstree-icon').removeClass('jstree-ok').addClass('jstree-er');\n\t\t\t\tif (data.event.originalEvent && data.event.originalEvent.dataTransfer) {\n\t\t\t\t\tdata.event.originalEvent.dataTransfer.dropEffect = 'none';\n\t\t\t\t}\n\t\t\t\tmarker.hide();\n\t\t\t})\n\t\t\t.on('dnd_scroll.vakata.jstree', function (e, data) {\n\t\t\t\tif(!data || !data.data || !data.data.jstree) { return; }\n\t\t\t\tmarker.hide();\n\t\t\t\tlastmv = false;\n\t\t\t\tlastev = false;\n\t\t\t\tdata.helper.find('.jstree-icon').first().removeClass('jstree-ok').addClass('jstree-er');\n\t\t\t})\n\t\t\t.on('dnd_stop.vakata.jstree', function (e, data) {\n\t\t\t\t$('.jstree-dnd-parent').removeClass('jstree-dnd-parent');\n\t\t\t\tif(opento) { clearTimeout(opento); }\n\t\t\t\tif(!data || !data.data || !data.data.jstree) { return; }\n\t\t\t\tmarker.hide().detach();\n\t\t\t\tvar i, j, nodes = [];\n\t\t\t\tif(lastmv) {\n\t\t\t\t\tfor(i = 0, j = data.data.nodes.length; i < j; i++) {\n\t\t\t\t\t\tnodes[i] = data.data.origin ? data.data.origin.get_node(data.data.nodes[i]) : data.data.nodes[i];\n\t\t\t\t\t}\n\t\t\t\t\tlastmv.ins[ data.data.origin && (data.data.origin.settings.dnd.always_copy || (data.data.origin.settings.dnd.copy && (data.event.metaKey || data.event.ctrlKey))) ? 'copy_node' : 'move_node' ](nodes, lastmv.par, lastmv.pos, false, false, false, data.data.origin);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\ti = $(data.event.target).closest('.jstree');\n\t\t\t\t\tif(i.length && laster && laster.error && laster.error === 'check') {\n\t\t\t\t\t\ti = i.jstree(true);\n\t\t\t\t\t\tif(i) {\n\t\t\t\t\t\t\ti.settings.core.error.call(this, laster);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tlastev = false;\n\t\t\t\tlastmv = false;\n\t\t\t})\n\t\t\t.on('keyup.jstree keydown.jstree', function (e, data) {\n\t\t\t\tdata = $.vakata.dnd._get();\n\t\t\t\tif(data && data.data && data.data.jstree) {\n\t\t\t\t\tif (e.type === \"keyup\" && e.which === 27) {\n\t\t\t\t\t\tif (opento) { clearTimeout(opento); }\n\t\t\t\t\t\tlastmv = false;\n\t\t\t\t\t\tlaster = false;\n\t\t\t\t\t\tlastev = false;\n\t\t\t\t\t\topento = false;\n\t\t\t\t\t\tmarker.hide().detach();\n\t\t\t\t\t\t$.vakata.dnd._clean();\n\t\t\t\t\t} else {\n\t\t\t\t\t\tdata.helper.find('.jstree-copy').first()[ data.data.origin && (data.data.origin.settings.dnd.always_copy || (data.data.origin.settings.dnd.copy && (e.metaKey || e.ctrlKey))) ? 'show' : 'hide' ]();\n\t\t\t\t\t\tif(lastev) {\n\t\t\t\t\t\t\tlastev.metaKey = e.metaKey;\n\t\t\t\t\t\t\tlastev.ctrlKey = e.ctrlKey;\n\t\t\t\t\t\t\t$.vakata.dnd._trigger('move', lastev);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t});\n\n\t// helpers\n\t(function ($) {\n\t\t$.vakata.html = {\n\t\t\tdiv : $('<div />'),\n\t\t\tescape : function (str) {\n\t\t\t\treturn $.vakata.html.div.text(str).html();\n\t\t\t},\n\t\t\tstrip : function (str) {\n\t\t\t\treturn $.vakata.html.div.empty().append($.parseHTML(str)).text();\n\t\t\t}\n\t\t};\n\t\t// private variable\n\t\tvar vakata_dnd = {\n\t\t\telement\t: false,\n\t\t\ttarget\t: false,\n\t\t\tis_down\t: false,\n\t\t\tis_drag\t: false,\n\t\t\thelper\t: false,\n\t\t\thelper_w: 0,\n\t\t\tdata\t: false,\n\t\t\tinit_x\t: 0,\n\t\t\tinit_y\t: 0,\n\t\t\tscroll_l: 0,\n\t\t\tscroll_t: 0,\n\t\t\tscroll_e: false,\n\t\t\tscroll_i: false,\n\t\t\tis_touch: false\n\t\t};\n\t\t$.vakata.dnd = {\n\t\t\tsettings : {\n\t\t\t\tscroll_speed\t\t: 10,\n\t\t\t\tscroll_proximity\t: 20,\n\t\t\t\thelper_left\t\t\t: 5,\n\t\t\t\thelper_top\t\t\t: 10,\n\t\t\t\tthreshold\t\t\t: 5,\n\t\t\t\tthreshold_touch\t\t: 50\n\t\t\t},\n\t\t\t_trigger : function (event_name, e, data) {\n\t\t\t\tif (data === undefined) {\n\t\t\t\t\tdata = $.vakata.dnd._get();\n\t\t\t\t}\n\t\t\t\tdata.event = e;\n\t\t\t\t$(document).triggerHandler(\"dnd_\" + event_name + \".vakata\", data);\n\t\t\t},\n\t\t\t_get : function () {\n\t\t\t\treturn {\n\t\t\t\t\t\"data\"\t\t: vakata_dnd.data,\n\t\t\t\t\t\"element\"\t: vakata_dnd.element,\n\t\t\t\t\t\"helper\"\t: vakata_dnd.helper\n\t\t\t\t};\n\t\t\t},\n\t\t\t_clean : function () {\n\t\t\t\tif(vakata_dnd.helper) { vakata_dnd.helper.remove(); }\n\t\t\t\tif(vakata_dnd.scroll_i) { clearInterval(vakata_dnd.scroll_i); vakata_dnd.scroll_i = false; }\n\t\t\t\tvakata_dnd = {\n\t\t\t\t\telement\t: false,\n\t\t\t\t\ttarget\t: false,\n\t\t\t\t\tis_down\t: false,\n\t\t\t\t\tis_drag\t: false,\n\t\t\t\t\thelper\t: false,\n\t\t\t\t\thelper_w: 0,\n\t\t\t\t\tdata\t: false,\n\t\t\t\t\tinit_x\t: 0,\n\t\t\t\t\tinit_y\t: 0,\n\t\t\t\t\tscroll_l: 0,\n\t\t\t\t\tscroll_t: 0,\n\t\t\t\t\tscroll_e: false,\n\t\t\t\t\tscroll_i: false,\n\t\t\t\t\tis_touch: false\n\t\t\t\t};\n\t\t\t\t$(document).off(\"mousemove.vakata.jstree touchmove.vakata.jstree\", $.vakata.dnd.drag);\n\t\t\t\t$(document).off(\"mouseup.vakata.jstree touchend.vakata.jstree\", $.vakata.dnd.stop);\n\t\t\t},\n\t\t\t_scroll : function (init_only) {\n\t\t\t\tif(!vakata_dnd.scroll_e || (!vakata_dnd.scroll_l && !vakata_dnd.scroll_t)) {\n\t\t\t\t\tif(vakata_dnd.scroll_i) { clearInterval(vakata_dnd.scroll_i); vakata_dnd.scroll_i = false; }\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\tif(!vakata_dnd.scroll_i) {\n\t\t\t\t\tvakata_dnd.scroll_i = setInterval($.vakata.dnd._scroll, 100);\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\tif(init_only === true) { return false; }\n\n\t\t\t\tvar i = vakata_dnd.scroll_e.scrollTop(),\n\t\t\t\t\tj = vakata_dnd.scroll_e.scrollLeft();\n\t\t\t\tvakata_dnd.scroll_e.scrollTop(i + vakata_dnd.scroll_t * $.vakata.dnd.settings.scroll_speed);\n\t\t\t\tvakata_dnd.scroll_e.scrollLeft(j + vakata_dnd.scroll_l * $.vakata.dnd.settings.scroll_speed);\n\t\t\t\tif(i !== vakata_dnd.scroll_e.scrollTop() || j !== vakata_dnd.scroll_e.scrollLeft()) {\n\t\t\t\t\t/**\n\t\t\t\t\t * triggered on the document when a drag causes an element to scroll\n\t\t\t\t\t * @event\n\t\t\t\t\t * @plugin dnd\n\t\t\t\t\t * @name dnd_scroll.vakata\n\t\t\t\t\t * @param {Mixed} data any data supplied with the call to $.vakata.dnd.start\n\t\t\t\t\t * @param {DOM} element the DOM element being dragged\n\t\t\t\t\t * @param {jQuery} helper the helper shown next to the mouse\n\t\t\t\t\t * @param {jQuery} event the element that is scrolling\n\t\t\t\t\t */\n\t\t\t\t\t$.vakata.dnd._trigger(\"scroll\", vakata_dnd.scroll_e);\n\t\t\t\t}\n\t\t\t},\n\t\t\tstart : function (e, data, html) {\n\t\t\t\tif(e.type === \"touchstart\" && e.originalEvent && e.originalEvent.changedTouches && e.originalEvent.changedTouches[0]) {\n\t\t\t\t\te.pageX = e.originalEvent.changedTouches[0].pageX;\n\t\t\t\t\te.pageY = e.originalEvent.changedTouches[0].pageY;\n\t\t\t\t\te.target = document.elementFromPoint(e.originalEvent.changedTouches[0].pageX - window.pageXOffset, e.originalEvent.changedTouches[0].pageY - window.pageYOffset);\n\t\t\t\t}\n\t\t\t\tif(vakata_dnd.is_drag) { $.vakata.dnd.stop({}); }\n\t\t\t\ttry {\n\t\t\t\t\te.currentTarget.unselectable = \"on\";\n\t\t\t\t\te.currentTarget.onselectstart = function() { return false; };\n\t\t\t\t\tif(e.currentTarget.style) {\n\t\t\t\t\t\te.currentTarget.style.touchAction = \"none\";\n\t\t\t\t\t\te.currentTarget.style.msTouchAction = \"none\";\n\t\t\t\t\t\te.currentTarget.style.MozUserSelect = \"none\";\n\t\t\t\t\t}\n\t\t\t\t} catch(ignore) { }\n\t\t\t\tvakata_dnd.init_x\t= e.pageX;\n\t\t\t\tvakata_dnd.init_y\t= e.pageY;\n\t\t\t\tvakata_dnd.data\t\t= data;\n\t\t\t\tvakata_dnd.is_down\t= true;\n\t\t\t\tvakata_dnd.element\t= e.currentTarget;\n\t\t\t\tvakata_dnd.target\t= e.target;\n\t\t\t\tvakata_dnd.is_touch\t= e.type === \"touchstart\";\n\t\t\t\tif(html !== false) {\n\t\t\t\t\tvakata_dnd.helper = $(\"<div id='vakata-dnd'></div>\").html(html).css({\n\t\t\t\t\t\t\"display\"\t\t: \"block\",\n\t\t\t\t\t\t\"margin\"\t\t: \"0\",\n\t\t\t\t\t\t\"padding\"\t\t: \"0\",\n\t\t\t\t\t\t\"position\"\t\t: \"absolute\",\n\t\t\t\t\t\t\"top\"\t\t\t: \"-2000px\",\n\t\t\t\t\t\t\"lineHeight\"\t: \"16px\",\n\t\t\t\t\t\t\"zIndex\"\t\t: \"10000\"\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\t$(document).on(\"mousemove.vakata.jstree touchmove.vakata.jstree\", $.vakata.dnd.drag);\n\t\t\t\t$(document).on(\"mouseup.vakata.jstree touchend.vakata.jstree\", $.vakata.dnd.stop);\n\t\t\t\treturn false;\n\t\t\t},\n\t\t\tdrag : function (e) {\n\t\t\t\tif(e.type === \"touchmove\" && e.originalEvent && e.originalEvent.changedTouches && e.originalEvent.changedTouches[0]) {\n\t\t\t\t\te.pageX = e.originalEvent.changedTouches[0].pageX;\n\t\t\t\t\te.pageY = e.originalEvent.changedTouches[0].pageY;\n\t\t\t\t\te.target = document.elementFromPoint(e.originalEvent.changedTouches[0].pageX - window.pageXOffset, e.originalEvent.changedTouches[0].pageY - window.pageYOffset);\n\t\t\t\t}\n\t\t\t\tif(!vakata_dnd.is_down) { return; }\n\t\t\t\tif(!vakata_dnd.is_drag) {\n\t\t\t\t\tif(\n\t\t\t\t\t\tMath.abs(e.pageX - vakata_dnd.init_x) > (vakata_dnd.is_touch ? $.vakata.dnd.settings.threshold_touch : $.vakata.dnd.settings.threshold) ||\n\t\t\t\t\t\tMath.abs(e.pageY - vakata_dnd.init_y) > (vakata_dnd.is_touch ? $.vakata.dnd.settings.threshold_touch : $.vakata.dnd.settings.threshold)\n\t\t\t\t\t) {\n\t\t\t\t\t\tif(vakata_dnd.helper) {\n\t\t\t\t\t\t\tvakata_dnd.helper.appendTo(\"body\");\n\t\t\t\t\t\t\tvakata_dnd.helper_w = vakata_dnd.helper.outerWidth();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tvakata_dnd.is_drag = true;\n\t\t\t\t\t\t$(vakata_dnd.target).one('click.vakata', false);\n\t\t\t\t\t\t/**\n\t\t\t\t\t\t * triggered on the document when a drag starts\n\t\t\t\t\t\t * @event\n\t\t\t\t\t\t * @plugin dnd\n\t\t\t\t\t\t * @name dnd_start.vakata\n\t\t\t\t\t\t * @param {Mixed} data any data supplied with the call to $.vakata.dnd.start\n\t\t\t\t\t\t * @param {DOM} element the DOM element being dragged\n\t\t\t\t\t\t * @param {jQuery} helper the helper shown next to the mouse\n\t\t\t\t\t\t * @param {Object} event the event that caused the start (probably mousemove)\n\t\t\t\t\t\t */\n\t\t\t\t\t\t$.vakata.dnd._trigger(\"start\", e);\n\t\t\t\t\t}\n\t\t\t\t\telse { return; }\n\t\t\t\t}\n\n\t\t\t\tvar d  = false, w  = false,\n\t\t\t\t\tdh = false, wh = false,\n\t\t\t\t\tdw = false, ww = false,\n\t\t\t\t\tdt = false, dl = false,\n\t\t\t\t\tht = false, hl = false;\n\n\t\t\t\tvakata_dnd.scroll_t = 0;\n\t\t\t\tvakata_dnd.scroll_l = 0;\n\t\t\t\tvakata_dnd.scroll_e = false;\n\t\t\t\t$($(e.target).parentsUntil(\"body\").addBack().get().reverse())\n\t\t\t\t\t.filter(function () {\n\t\t\t\t\t\treturn\t(/^auto|scroll$/).test($(this).css(\"overflow\")) &&\n\t\t\t\t\t\t\t\t(this.scrollHeight > this.offsetHeight || this.scrollWidth > this.offsetWidth);\n\t\t\t\t\t})\n\t\t\t\t\t.each(function () {\n\t\t\t\t\t\tvar t = $(this), o = t.offset();\n\t\t\t\t\t\tif(this.scrollHeight > this.offsetHeight) {\n\t\t\t\t\t\t\tif(o.top + t.height() - e.pageY < $.vakata.dnd.settings.scroll_proximity)\t{ vakata_dnd.scroll_t = 1; }\n\t\t\t\t\t\t\tif(e.pageY - o.top < $.vakata.dnd.settings.scroll_proximity)\t\t\t\t{ vakata_dnd.scroll_t = -1; }\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(this.scrollWidth > this.offsetWidth) {\n\t\t\t\t\t\t\tif(o.left + t.width() - e.pageX < $.vakata.dnd.settings.scroll_proximity)\t{ vakata_dnd.scroll_l = 1; }\n\t\t\t\t\t\t\tif(e.pageX - o.left < $.vakata.dnd.settings.scroll_proximity)\t\t\t\t{ vakata_dnd.scroll_l = -1; }\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(vakata_dnd.scroll_t || vakata_dnd.scroll_l) {\n\t\t\t\t\t\t\tvakata_dnd.scroll_e = $(this);\n\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\n\t\t\t\tif(!vakata_dnd.scroll_e) {\n\t\t\t\t\td  = $(document); w = $(window);\n\t\t\t\t\tdh = d.height(); wh = w.height();\n\t\t\t\t\tdw = d.width(); ww = w.width();\n\t\t\t\t\tdt = d.scrollTop(); dl = d.scrollLeft();\n\t\t\t\t\tif(dh > wh && e.pageY - dt < $.vakata.dnd.settings.scroll_proximity)\t\t{ vakata_dnd.scroll_t = -1;  }\n\t\t\t\t\tif(dh > wh && wh - (e.pageY - dt) < $.vakata.dnd.settings.scroll_proximity)\t{ vakata_dnd.scroll_t = 1; }\n\t\t\t\t\tif(dw > ww && e.pageX - dl < $.vakata.dnd.settings.scroll_proximity)\t\t{ vakata_dnd.scroll_l = -1; }\n\t\t\t\t\tif(dw > ww && ww - (e.pageX - dl) < $.vakata.dnd.settings.scroll_proximity)\t{ vakata_dnd.scroll_l = 1; }\n\t\t\t\t\tif(vakata_dnd.scroll_t || vakata_dnd.scroll_l) {\n\t\t\t\t\t\tvakata_dnd.scroll_e = d;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(vakata_dnd.scroll_e) { $.vakata.dnd._scroll(true); }\n\n\t\t\t\tif(vakata_dnd.helper) {\n\t\t\t\t\tht = parseInt(e.pageY + $.vakata.dnd.settings.helper_top, 10);\n\t\t\t\t\thl = parseInt(e.pageX + $.vakata.dnd.settings.helper_left, 10);\n\t\t\t\t\tif(dh && ht + 25 > dh) { ht = dh - 50; }\n\t\t\t\t\tif(dw && hl + vakata_dnd.helper_w > dw) { hl = dw - (vakata_dnd.helper_w + 2); }\n\t\t\t\t\tvakata_dnd.helper.css({\n\t\t\t\t\t\tleft\t: hl + \"px\",\n\t\t\t\t\t\ttop\t\t: ht + \"px\"\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\t/**\n\t\t\t\t * triggered on the document when a drag is in progress\n\t\t\t\t * @event\n\t\t\t\t * @plugin dnd\n\t\t\t\t * @name dnd_move.vakata\n\t\t\t\t * @param {Mixed} data any data supplied with the call to $.vakata.dnd.start\n\t\t\t\t * @param {DOM} element the DOM element being dragged\n\t\t\t\t * @param {jQuery} helper the helper shown next to the mouse\n\t\t\t\t * @param {Object} event the event that caused this to trigger (most likely mousemove)\n\t\t\t\t */\n\t\t\t\t$.vakata.dnd._trigger(\"move\", e);\n\t\t\t\treturn false;\n\t\t\t},\n\t\t\tstop : function (e) {\n\t\t\t\tif(e.type === \"touchend\" && e.originalEvent && e.originalEvent.changedTouches && e.originalEvent.changedTouches[0]) {\n\t\t\t\t\te.pageX = e.originalEvent.changedTouches[0].pageX;\n\t\t\t\t\te.pageY = e.originalEvent.changedTouches[0].pageY;\n\t\t\t\t\te.target = document.elementFromPoint(e.originalEvent.changedTouches[0].pageX - window.pageXOffset, e.originalEvent.changedTouches[0].pageY - window.pageYOffset);\n\t\t\t\t}\n\t\t\t\tif(vakata_dnd.is_drag) {\n\t\t\t\t\t/**\n\t\t\t\t\t * triggered on the document when a drag stops (the dragged element is dropped)\n\t\t\t\t\t * @event\n\t\t\t\t\t * @plugin dnd\n\t\t\t\t\t * @name dnd_stop.vakata\n\t\t\t\t\t * @param {Mixed} data any data supplied with the call to $.vakata.dnd.start\n\t\t\t\t\t * @param {DOM} element the DOM element being dragged\n\t\t\t\t\t * @param {jQuery} helper the helper shown next to the mouse\n\t\t\t\t\t * @param {Object} event the event that caused the stop\n\t\t\t\t\t */\n\t\t\t\t\tif (e.target !== vakata_dnd.target) {\n\t\t\t\t\t\t$(vakata_dnd.target).off('click.vakata');\n\t\t\t\t\t}\n\t\t\t\t\t$.vakata.dnd._trigger(\"stop\", e);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tif(e.type === \"touchend\" && e.target === vakata_dnd.target) {\n\t\t\t\t\t\tvar to = setTimeout(function () { $(e.target).click(); }, 100);\n\t\t\t\t\t\t$(e.target).one('click', function() { if(to) { clearTimeout(to); } });\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$.vakata.dnd._clean();\n\t\t\t\treturn false;\n\t\t\t}\n\t\t};\n\t}($));\n\n\t// include the dnd plugin by default\n\t// $.jstree.defaults.plugins.push(\"dnd\");\n\n\n/**\n * ### Massload plugin\n *\n * Adds massload functionality to jsTree, so that multiple nodes can be loaded in a single request (only useful with lazy loading).\n */\n\n\t/**\n\t * massload configuration\n\t *\n\t * It is possible to set this to a standard jQuery-like AJAX config.\n\t * In addition to the standard jQuery ajax options here you can supply functions for `data` and `url`, the functions will be run in the current instance's scope and a param will be passed indicating which node IDs need to be loaded, the return value of those functions will be used.\n\t *\n\t * You can also set this to a function, that function will receive the node IDs being loaded as argument and a second param which is a function (callback) which should be called with the result.\n\t *\n\t * Both the AJAX and the function approach rely on the same return value - an object where the keys are the node IDs, and the value is the children of that node as an array.\n\t *\n\t *\t{\n\t *\t\t\"id1\" : [{ \"text\" : \"Child of ID1\", \"id\" : \"c1\" }, { \"text\" : \"Another child of ID1\", \"id\" : \"c2\" }],\n\t *\t\t\"id2\" : [{ \"text\" : \"Child of ID2\", \"id\" : \"c3\" }]\n\t *\t}\n\t * \n\t * @name $.jstree.defaults.massload\n\t * @plugin massload\n\t */\n\t$.jstree.defaults.massload = null;\n\t$.jstree.plugins.massload = function (options, parent) {\n\t\tthis.init = function (el, options) {\n\t\t\tthis._data.massload = {};\n\t\t\tparent.init.call(this, el, options);\n\t\t};\n\t\tthis._load_nodes = function (nodes, callback, is_callback, force_reload) {\n\t\t\tvar s = this.settings.massload,\n\t\t\t\tnodesString = JSON.stringify(nodes),\n\t\t\t\ttoLoad = [],\n\t\t\t\tm = this._model.data,\n\t\t\t\ti, j, dom;\n\t\t\tif (!is_callback) {\n\t\t\t\tfor(i = 0, j = nodes.length; i < j; i++) {\n\t\t\t\t\tif(!m[nodes[i]] || ( (!m[nodes[i]].state.loaded && !m[nodes[i]].state.failed) || force_reload) ) {\n\t\t\t\t\t\ttoLoad.push(nodes[i]);\n\t\t\t\t\t\tdom = this.get_node(nodes[i], true);\n\t\t\t\t\t\tif (dom && dom.length) {\n\t\t\t\t\t\t\tdom.addClass(\"jstree-loading\").attr('aria-busy',true);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tthis._data.massload = {};\n\t\t\t\tif (toLoad.length) {\n\t\t\t\t\tif($.isFunction(s)) {\n\t\t\t\t\t\treturn s.call(this, toLoad, $.proxy(function (data) {\n\t\t\t\t\t\t\tvar i, j;\n\t\t\t\t\t\t\tif(data) {\n\t\t\t\t\t\t\t\tfor(i in data) {\n\t\t\t\t\t\t\t\t\tif(data.hasOwnProperty(i)) {\n\t\t\t\t\t\t\t\t\t\tthis._data.massload[i] = data[i];\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tfor(i = 0, j = nodes.length; i < j; i++) {\n\t\t\t\t\t\t\t\tdom = this.get_node(nodes[i], true);\n\t\t\t\t\t\t\t\tif (dom && dom.length) {\n\t\t\t\t\t\t\t\t\tdom.removeClass(\"jstree-loading\").attr('aria-busy',false);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tparent._load_nodes.call(this, nodes, callback, is_callback, force_reload);\n\t\t\t\t\t\t}, this));\n\t\t\t\t\t}\n\t\t\t\t\tif(typeof s === 'object' && s && s.url) {\n\t\t\t\t\t\ts = $.extend(true, {}, s);\n\t\t\t\t\t\tif($.isFunction(s.url)) {\n\t\t\t\t\t\t\ts.url = s.url.call(this, toLoad);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif($.isFunction(s.data)) {\n\t\t\t\t\t\t\ts.data = s.data.call(this, toLoad);\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn $.ajax(s)\n\t\t\t\t\t\t\t.done($.proxy(function (data,t,x) {\n\t\t\t\t\t\t\t\t\tvar i, j;\n\t\t\t\t\t\t\t\t\tif(data) {\n\t\t\t\t\t\t\t\t\t\tfor(i in data) {\n\t\t\t\t\t\t\t\t\t\t\tif(data.hasOwnProperty(i)) {\n\t\t\t\t\t\t\t\t\t\t\t\tthis._data.massload[i] = data[i];\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tfor(i = 0, j = nodes.length; i < j; i++) {\n\t\t\t\t\t\t\t\t\t\tdom = this.get_node(nodes[i], true);\n\t\t\t\t\t\t\t\t\t\tif (dom && dom.length) {\n\t\t\t\t\t\t\t\t\t\t\tdom.removeClass(\"jstree-loading\").attr('aria-busy',false);\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tparent._load_nodes.call(this, nodes, callback, is_callback, force_reload);\n\t\t\t\t\t\t\t\t}, this))\n\t\t\t\t\t\t\t.fail($.proxy(function (f) {\n\t\t\t\t\t\t\t\t\tparent._load_nodes.call(this, nodes, callback, is_callback, force_reload);\n\t\t\t\t\t\t\t\t}, this));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn parent._load_nodes.call(this, nodes, callback, is_callback, force_reload);\n\t\t};\n\t\tthis._load_node = function (obj, callback) {\n\t\t\tvar data = this._data.massload[obj.id],\n\t\t\t\trslt = null, dom;\n\t\t\tif(data) {\n\t\t\t\trslt = this[typeof data === 'string' ? '_append_html_data' : '_append_json_data'](\n\t\t\t\t\tobj,\n\t\t\t\t\ttypeof data === 'string' ? $($.parseHTML(data)).filter(function () { return this.nodeType !== 3; }) : data,\n\t\t\t\t\tfunction (status) { callback.call(this, status); }\n\t\t\t\t);\n\t\t\t\tdom = this.get_node(obj.id, true);\n\t\t\t\tif (dom && dom.length) {\n\t\t\t\t\tdom.removeClass(\"jstree-loading\").attr('aria-busy',false);\n\t\t\t\t}\n\t\t\t\tdelete this._data.massload[obj.id];\n\t\t\t\treturn rslt;\n\t\t\t}\n\t\t\treturn parent._load_node.call(this, obj, callback);\n\t\t};\n\t};\n\n/**\n * ### Search plugin\n *\n * Adds search functionality to jsTree.\n */\n\n\t/**\n\t * stores all defaults for the search plugin\n\t * @name $.jstree.defaults.search\n\t * @plugin search\n\t */\n\t$.jstree.defaults.search = {\n\t\t/**\n\t\t * a jQuery-like AJAX config, which jstree uses if a server should be queried for results.\n\t\t *\n\t\t * A `str` (which is the search string) parameter will be added with the request, an optional `inside` parameter will be added if the search is limited to a node id. The expected result is a JSON array with nodes that need to be opened so that matching nodes will be revealed.\n\t\t * Leave this setting as `false` to not query the server. You can also set this to a function, which will be invoked in the instance's scope and receive 3 parameters - the search string, the callback to call with the array of nodes to load, and the optional node ID to limit the search to\n\t\t * @name $.jstree.defaults.search.ajax\n\t\t * @plugin search\n\t\t */\n\t\tajax : false,\n\t\t/**\n\t\t * Indicates if the search should be fuzzy or not (should `chnd3` match `child node 3`). Default is `false`.\n\t\t * @name $.jstree.defaults.search.fuzzy\n\t\t * @plugin search\n\t\t */\n\t\tfuzzy : false,\n\t\t/**\n\t\t * Indicates if the search should be case sensitive. Default is `false`.\n\t\t * @name $.jstree.defaults.search.case_sensitive\n\t\t * @plugin search\n\t\t */\n\t\tcase_sensitive : false,\n\t\t/**\n\t\t * Indicates if the tree should be filtered (by default) to show only matching nodes (keep in mind this can be a heavy on large trees in old browsers).\n\t\t * This setting can be changed at runtime when calling the search method. Default is `false`.\n\t\t * @name $.jstree.defaults.search.show_only_matches\n\t\t * @plugin search\n\t\t */\n\t\tshow_only_matches : false,\n\t\t/**\n\t\t * Indicates if the children of matched element are shown (when show_only_matches is true)\n\t\t * This setting can be changed at runtime when calling the search method. Default is `false`.\n\t\t * @name $.jstree.defaults.search.show_only_matches_children\n\t\t * @plugin search\n\t\t */\n\t\tshow_only_matches_children : false,\n\t\t/**\n\t\t * Indicates if all nodes opened to reveal the search result, should be closed when the search is cleared or a new search is performed. Default is `true`.\n\t\t * @name $.jstree.defaults.search.close_opened_onclear\n\t\t * @plugin search\n\t\t */\n\t\tclose_opened_onclear : true,\n\t\t/**\n\t\t * Indicates if only leaf nodes should be included in search results. Default is `false`.\n\t\t * @name $.jstree.defaults.search.search_leaves_only\n\t\t * @plugin search\n\t\t */\n\t\tsearch_leaves_only : false,\n\t\t/**\n\t\t * If set to a function it wil be called in the instance's scope with two arguments - search string and node (where node will be every node in the structure, so use with caution).\n\t\t * If the function returns a truthy value the node will be considered a match (it might not be displayed if search_only_leaves is set to true and the node is not a leaf). Default is `false`.\n\t\t * @name $.jstree.defaults.search.search_callback\n\t\t * @plugin search\n\t\t */\n\t\tsearch_callback : false\n\t};\n\n\t$.jstree.plugins.search = function (options, parent) {\n\t\tthis.bind = function () {\n\t\t\tparent.bind.call(this);\n\n\t\t\tthis._data.search.str = \"\";\n\t\t\tthis._data.search.dom = $();\n\t\t\tthis._data.search.res = [];\n\t\t\tthis._data.search.opn = [];\n\t\t\tthis._data.search.som = false;\n\t\t\tthis._data.search.smc = false;\n\t\t\tthis._data.search.hdn = [];\n\n\t\t\tthis.element\n\t\t\t\t.on(\"search.jstree\", $.proxy(function (e, data) {\n\t\t\t\t\t\tif(this._data.search.som && data.res.length) {\n\t\t\t\t\t\t\tvar m = this._model.data, i, j, p = [], k, l;\n\t\t\t\t\t\t\tfor(i = 0, j = data.res.length; i < j; i++) {\n\t\t\t\t\t\t\t\tif(m[data.res[i]] && !m[data.res[i]].state.hidden) {\n\t\t\t\t\t\t\t\t\tp.push(data.res[i]);\n\t\t\t\t\t\t\t\t\tp = p.concat(m[data.res[i]].parents);\n\t\t\t\t\t\t\t\t\tif(this._data.search.smc) {\n\t\t\t\t\t\t\t\t\t\tfor (k = 0, l = m[data.res[i]].children_d.length; k < l; k++) {\n\t\t\t\t\t\t\t\t\t\t\tif (m[m[data.res[i]].children_d[k]] && !m[m[data.res[i]].children_d[k]].state.hidden) {\n\t\t\t\t\t\t\t\t\t\t\t\tp.push(m[data.res[i]].children_d[k]);\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tp = $.vakata.array_remove_item($.vakata.array_unique(p), $.jstree.root);\n\t\t\t\t\t\t\tthis._data.search.hdn = this.hide_all(true);\n\t\t\t\t\t\t\tthis.show_node(p, true);\n\t\t\t\t\t\t\tthis.redraw(true);\n\t\t\t\t\t\t}\n\t\t\t\t\t}, this))\n\t\t\t\t.on(\"clear_search.jstree\", $.proxy(function (e, data) {\n\t\t\t\t\t\tif(this._data.search.som && data.res.length) {\n\t\t\t\t\t\t\tthis.show_node(this._data.search.hdn, true);\n\t\t\t\t\t\t\tthis.redraw(true);\n\t\t\t\t\t\t}\n\t\t\t\t\t}, this));\n\t\t};\n\t\t/**\n\t\t * used to search the tree nodes for a given string\n\t\t * @name search(str [, skip_async])\n\t\t * @param {String} str the search string\n\t\t * @param {Boolean} skip_async if set to true server will not be queried even if configured\n\t\t * @param {Boolean} show_only_matches if set to true only matching nodes will be shown (keep in mind this can be very slow on large trees or old browsers)\n\t\t * @param {mixed} inside an optional node to whose children to limit the search\n\t\t * @param {Boolean} append if set to true the results of this search are appended to the previous search\n\t\t * @plugin search\n\t\t * @trigger search.jstree\n\t\t */\n\t\tthis.search = function (str, skip_async, show_only_matches, inside, append, show_only_matches_children) {\n\t\t\tif(str === false || $.trim(str.toString()) === \"\") {\n\t\t\t\treturn this.clear_search();\n\t\t\t}\n\t\t\tinside = this.get_node(inside);\n\t\t\tinside = inside && inside.id ? inside.id : null;\n\t\t\tstr = str.toString();\n\t\t\tvar s = this.settings.search,\n\t\t\t\ta = s.ajax ? s.ajax : false,\n\t\t\t\tm = this._model.data,\n\t\t\t\tf = null,\n\t\t\t\tr = [],\n\t\t\t\tp = [], i, j;\n\t\t\tif(this._data.search.res.length && !append) {\n\t\t\t\tthis.clear_search();\n\t\t\t}\n\t\t\tif(show_only_matches === undefined) {\n\t\t\t\tshow_only_matches = s.show_only_matches;\n\t\t\t}\n\t\t\tif(show_only_matches_children === undefined) {\n\t\t\t\tshow_only_matches_children = s.show_only_matches_children;\n\t\t\t}\n\t\t\tif(!skip_async && a !== false) {\n\t\t\t\tif($.isFunction(a)) {\n\t\t\t\t\treturn a.call(this, str, $.proxy(function (d) {\n\t\t\t\t\t\t\tif(d && d.d) { d = d.d; }\n\t\t\t\t\t\t\tthis._load_nodes(!$.isArray(d) ? [] : $.vakata.array_unique(d), function () {\n\t\t\t\t\t\t\t\tthis.search(str, true, show_only_matches, inside, append, show_only_matches_children);\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}, this), inside);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\ta = $.extend({}, a);\n\t\t\t\t\tif(!a.data) { a.data = {}; }\n\t\t\t\t\ta.data.str = str;\n\t\t\t\t\tif(inside) {\n\t\t\t\t\t\ta.data.inside = inside;\n\t\t\t\t\t}\n\t\t\t\t\tif (this._data.search.lastRequest) {\n\t\t\t\t\t\tthis._data.search.lastRequest.abort();\n\t\t\t\t\t}\n\t\t\t\t\tthis._data.search.lastRequest = $.ajax(a)\n\t\t\t\t\t\t.fail($.proxy(function () {\n\t\t\t\t\t\t\tthis._data.core.last_error = { 'error' : 'ajax', 'plugin' : 'search', 'id' : 'search_01', 'reason' : 'Could not load search parents', 'data' : JSON.stringify(a) };\n\t\t\t\t\t\t\tthis.settings.core.error.call(this, this._data.core.last_error);\n\t\t\t\t\t\t}, this))\n\t\t\t\t\t\t.done($.proxy(function (d) {\n\t\t\t\t\t\t\tif(d && d.d) { d = d.d; }\n\t\t\t\t\t\t\tthis._load_nodes(!$.isArray(d) ? [] : $.vakata.array_unique(d), function () {\n\t\t\t\t\t\t\t\tthis.search(str, true, show_only_matches, inside, append, show_only_matches_children);\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}, this));\n\t\t\t\t\treturn this._data.search.lastRequest;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(!append) {\n\t\t\t\tthis._data.search.str = str;\n\t\t\t\tthis._data.search.dom = $();\n\t\t\t\tthis._data.search.res = [];\n\t\t\t\tthis._data.search.opn = [];\n\t\t\t\tthis._data.search.som = show_only_matches;\n\t\t\t\tthis._data.search.smc = show_only_matches_children;\n\t\t\t}\n\n\t\t\tf = new $.vakata.search(str, true, { caseSensitive : s.case_sensitive, fuzzy : s.fuzzy });\n\t\t\t$.each(m[inside ? inside : $.jstree.root].children_d, function (ii, i) {\n\t\t\t\tvar v = m[i];\n\t\t\t\tif(v.text && !v.state.hidden && (!s.search_leaves_only || (v.state.loaded && v.children.length === 0)) && ( (s.search_callback && s.search_callback.call(this, str, v)) || (!s.search_callback && f.search(v.text).isMatch) ) ) {\n\t\t\t\t\tr.push(i);\n\t\t\t\t\tp = p.concat(v.parents);\n\t\t\t\t}\n\t\t\t});\n\t\t\tif(r.length) {\n\t\t\t\tp = $.vakata.array_unique(p);\n\t\t\t\tfor(i = 0, j = p.length; i < j; i++) {\n\t\t\t\t\tif(p[i] !== $.jstree.root && m[p[i]] && this.open_node(p[i], null, 0) === true) {\n\t\t\t\t\t\tthis._data.search.opn.push(p[i]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(!append) {\n\t\t\t\t\tthis._data.search.dom = $(this.element[0].querySelectorAll('#' + $.map(r, function (v) { return \"0123456789\".indexOf(v[0]) !== -1 ? '\\\\3' + v[0] + ' ' + v.substr(1).replace($.jstree.idregex,'\\\\$&') : v.replace($.jstree.idregex,'\\\\$&'); }).join(', #')));\n\t\t\t\t\tthis._data.search.res = r;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tthis._data.search.dom = this._data.search.dom.add($(this.element[0].querySelectorAll('#' + $.map(r, function (v) { return \"0123456789\".indexOf(v[0]) !== -1 ? '\\\\3' + v[0] + ' ' + v.substr(1).replace($.jstree.idregex,'\\\\$&') : v.replace($.jstree.idregex,'\\\\$&'); }).join(', #'))));\n\t\t\t\t\tthis._data.search.res = $.vakata.array_unique(this._data.search.res.concat(r));\n\t\t\t\t}\n\t\t\t\tthis._data.search.dom.children(\".jstree-anchor\").addClass('jstree-search');\n\t\t\t}\n\t\t\t/**\n\t\t\t * triggered after search is complete\n\t\t\t * @event\n\t\t\t * @name search.jstree\n\t\t\t * @param {jQuery} nodes a jQuery collection of matching nodes\n\t\t\t * @param {String} str the search string\n\t\t\t * @param {Array} res a collection of objects represeing the matching nodes\n\t\t\t * @plugin search\n\t\t\t */\n\t\t\tthis.trigger('search', { nodes : this._data.search.dom, str : str, res : this._data.search.res, show_only_matches : show_only_matches });\n\t\t};\n\t\t/**\n\t\t * used to clear the last search (removes classes and shows all nodes if filtering is on)\n\t\t * @name clear_search()\n\t\t * @plugin search\n\t\t * @trigger clear_search.jstree\n\t\t */\n\t\tthis.clear_search = function () {\n\t\t\tif(this.settings.search.close_opened_onclear) {\n\t\t\t\tthis.close_node(this._data.search.opn, 0);\n\t\t\t}\n\t\t\t/**\n\t\t\t * triggered after search is complete\n\t\t\t * @event\n\t\t\t * @name clear_search.jstree\n\t\t\t * @param {jQuery} nodes a jQuery collection of matching nodes (the result from the last search)\n\t\t\t * @param {String} str the search string (the last search string)\n\t\t\t * @param {Array} res a collection of objects represeing the matching nodes (the result from the last search)\n\t\t\t * @plugin search\n\t\t\t */\n\t\t\tthis.trigger('clear_search', { 'nodes' : this._data.search.dom, str : this._data.search.str, res : this._data.search.res });\n\t\t\tif(this._data.search.res.length) {\n\t\t\t\tthis._data.search.dom = $(this.element[0].querySelectorAll('#' + $.map(this._data.search.res, function (v) {\n\t\t\t\t\treturn \"0123456789\".indexOf(v[0]) !== -1 ? '\\\\3' + v[0] + ' ' + v.substr(1).replace($.jstree.idregex,'\\\\$&') : v.replace($.jstree.idregex,'\\\\$&');\n\t\t\t\t}).join(', #')));\n\t\t\t\tthis._data.search.dom.children(\".jstree-anchor\").removeClass(\"jstree-search\");\n\t\t\t}\n\t\t\tthis._data.search.str = \"\";\n\t\t\tthis._data.search.res = [];\n\t\t\tthis._data.search.opn = [];\n\t\t\tthis._data.search.dom = $();\n\t\t};\n\n\t\tthis.redraw_node = function(obj, deep, callback, force_render) {\n\t\t\tobj = parent.redraw_node.apply(this, arguments);\n\t\t\tif(obj) {\n\t\t\t\tif($.inArray(obj.id, this._data.search.res) !== -1) {\n\t\t\t\t\tvar i, j, tmp = null;\n\t\t\t\t\tfor(i = 0, j = obj.childNodes.length; i < j; i++) {\n\t\t\t\t\t\tif(obj.childNodes[i] && obj.childNodes[i].className && obj.childNodes[i].className.indexOf(\"jstree-anchor\") !== -1) {\n\t\t\t\t\t\t\ttmp = obj.childNodes[i];\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif(tmp) {\n\t\t\t\t\t\ttmp.className += ' jstree-search';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn obj;\n\t\t};\n\t};\n\n\t// helpers\n\t(function ($) {\n\t\t// from http://kiro.me/projects/fuse.html\n\t\t$.vakata.search = function(pattern, txt, options) {\n\t\t\toptions = options || {};\n\t\t\toptions = $.extend({}, $.vakata.search.defaults, options);\n\t\t\tif(options.fuzzy !== false) {\n\t\t\t\toptions.fuzzy = true;\n\t\t\t}\n\t\t\tpattern = options.caseSensitive ? pattern : pattern.toLowerCase();\n\t\t\tvar MATCH_LOCATION\t= options.location,\n\t\t\t\tMATCH_DISTANCE\t= options.distance,\n\t\t\t\tMATCH_THRESHOLD\t= options.threshold,\n\t\t\t\tpatternLen = pattern.length,\n\t\t\t\tmatchmask, pattern_alphabet, match_bitapScore, search;\n\t\t\tif(patternLen > 32) {\n\t\t\t\toptions.fuzzy = false;\n\t\t\t}\n\t\t\tif(options.fuzzy) {\n\t\t\t\tmatchmask = 1 << (patternLen - 1);\n\t\t\t\tpattern_alphabet = (function () {\n\t\t\t\t\tvar mask = {},\n\t\t\t\t\t\ti = 0;\n\t\t\t\t\tfor (i = 0; i < patternLen; i++) {\n\t\t\t\t\t\tmask[pattern.charAt(i)] = 0;\n\t\t\t\t\t}\n\t\t\t\t\tfor (i = 0; i < patternLen; i++) {\n\t\t\t\t\t\tmask[pattern.charAt(i)] |= 1 << (patternLen - i - 1);\n\t\t\t\t\t}\n\t\t\t\t\treturn mask;\n\t\t\t\t}());\n\t\t\t\tmatch_bitapScore = function (e, x) {\n\t\t\t\t\tvar accuracy = e / patternLen,\n\t\t\t\t\t\tproximity = Math.abs(MATCH_LOCATION - x);\n\t\t\t\t\tif(!MATCH_DISTANCE) {\n\t\t\t\t\t\treturn proximity ? 1.0 : accuracy;\n\t\t\t\t\t}\n\t\t\t\t\treturn accuracy + (proximity / MATCH_DISTANCE);\n\t\t\t\t};\n\t\t\t}\n\t\t\tsearch = function (text) {\n\t\t\t\ttext = options.caseSensitive ? text : text.toLowerCase();\n\t\t\t\tif(pattern === text || text.indexOf(pattern) !== -1) {\n\t\t\t\t\treturn {\n\t\t\t\t\t\tisMatch: true,\n\t\t\t\t\t\tscore: 0\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t\tif(!options.fuzzy) {\n\t\t\t\t\treturn {\n\t\t\t\t\t\tisMatch: false,\n\t\t\t\t\t\tscore: 1\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t\tvar i, j,\n\t\t\t\t\ttextLen = text.length,\n\t\t\t\t\tscoreThreshold = MATCH_THRESHOLD,\n\t\t\t\t\tbestLoc = text.indexOf(pattern, MATCH_LOCATION),\n\t\t\t\t\tbinMin, binMid,\n\t\t\t\t\tbinMax = patternLen + textLen,\n\t\t\t\t\tlastRd, start, finish, rd, charMatch,\n\t\t\t\t\tscore = 1,\n\t\t\t\t\tlocations = [];\n\t\t\t\tif (bestLoc !== -1) {\n\t\t\t\t\tscoreThreshold = Math.min(match_bitapScore(0, bestLoc), scoreThreshold);\n\t\t\t\t\tbestLoc = text.lastIndexOf(pattern, MATCH_LOCATION + patternLen);\n\t\t\t\t\tif (bestLoc !== -1) {\n\t\t\t\t\t\tscoreThreshold = Math.min(match_bitapScore(0, bestLoc), scoreThreshold);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbestLoc = -1;\n\t\t\t\tfor (i = 0; i < patternLen; i++) {\n\t\t\t\t\tbinMin = 0;\n\t\t\t\t\tbinMid = binMax;\n\t\t\t\t\twhile (binMin < binMid) {\n\t\t\t\t\t\tif (match_bitapScore(i, MATCH_LOCATION + binMid) <= scoreThreshold) {\n\t\t\t\t\t\t\tbinMin = binMid;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tbinMax = binMid;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbinMid = Math.floor((binMax - binMin) / 2 + binMin);\n\t\t\t\t\t}\n\t\t\t\t\tbinMax = binMid;\n\t\t\t\t\tstart = Math.max(1, MATCH_LOCATION - binMid + 1);\n\t\t\t\t\tfinish = Math.min(MATCH_LOCATION + binMid, textLen) + patternLen;\n\t\t\t\t\trd = new Array(finish + 2);\n\t\t\t\t\trd[finish + 1] = (1 << i) - 1;\n\t\t\t\t\tfor (j = finish; j >= start; j--) {\n\t\t\t\t\t\tcharMatch = pattern_alphabet[text.charAt(j - 1)];\n\t\t\t\t\t\tif (i === 0) {\n\t\t\t\t\t\t\trd[j] = ((rd[j + 1] << 1) | 1) & charMatch;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\trd[j] = ((rd[j + 1] << 1) | 1) & charMatch | (((lastRd[j + 1] | lastRd[j]) << 1) | 1) | lastRd[j + 1];\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (rd[j] & matchmask) {\n\t\t\t\t\t\t\tscore = match_bitapScore(i, j - 1);\n\t\t\t\t\t\t\tif (score <= scoreThreshold) {\n\t\t\t\t\t\t\t\tscoreThreshold = score;\n\t\t\t\t\t\t\t\tbestLoc = j - 1;\n\t\t\t\t\t\t\t\tlocations.push(bestLoc);\n\t\t\t\t\t\t\t\tif (bestLoc > MATCH_LOCATION) {\n\t\t\t\t\t\t\t\t\tstart = Math.max(1, 2 * MATCH_LOCATION - bestLoc);\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif (match_bitapScore(i + 1, MATCH_LOCATION) > scoreThreshold) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tlastRd = rd;\n\t\t\t\t}\n\t\t\t\treturn {\n\t\t\t\t\tisMatch: bestLoc >= 0,\n\t\t\t\t\tscore: score\n\t\t\t\t};\n\t\t\t};\n\t\t\treturn txt === true ? { 'search' : search } : search(txt);\n\t\t};\n\t\t$.vakata.search.defaults = {\n\t\t\tlocation : 0,\n\t\t\tdistance : 100,\n\t\t\tthreshold : 0.6,\n\t\t\tfuzzy : false,\n\t\t\tcaseSensitive : false\n\t\t};\n\t}($));\n\n\t// include the search plugin by default\n\t// $.jstree.defaults.plugins.push(\"search\");\n\n\n/**\n * ### Sort plugin\n *\n * Automatically sorts all siblings in the tree according to a sorting function.\n */\n\n\t/**\n\t * the settings function used to sort the nodes.\n\t * It is executed in the tree's context, accepts two nodes as arguments and should return `1` or `-1`.\n\t * @name $.jstree.defaults.sort\n\t * @plugin sort\n\t */\n\t$.jstree.defaults.sort = function (a, b) {\n\t\t//return this.get_type(a) === this.get_type(b) ? (this.get_text(a) > this.get_text(b) ? 1 : -1) : this.get_type(a) >= this.get_type(b);\n\t\treturn this.get_text(a) > this.get_text(b) ? 1 : -1;\n\t};\n\t$.jstree.plugins.sort = function (options, parent) {\n\t\tthis.bind = function () {\n\t\t\tparent.bind.call(this);\n\t\t\tthis.element\n\t\t\t\t.on(\"model.jstree\", $.proxy(function (e, data) {\n\t\t\t\t\t\tthis.sort(data.parent, true);\n\t\t\t\t\t}, this))\n\t\t\t\t.on(\"rename_node.jstree create_node.jstree\", $.proxy(function (e, data) {\n\t\t\t\t\t\tthis.sort(data.parent || data.node.parent, false);\n\t\t\t\t\t\tthis.redraw_node(data.parent || data.node.parent, true);\n\t\t\t\t\t}, this))\n\t\t\t\t.on(\"move_node.jstree copy_node.jstree\", $.proxy(function (e, data) {\n\t\t\t\t\t\tthis.sort(data.parent, false);\n\t\t\t\t\t\tthis.redraw_node(data.parent, true);\n\t\t\t\t\t}, this));\n\t\t};\n\t\t/**\n\t\t * used to sort a node's children\n\t\t * @private\n\t\t * @name sort(obj [, deep])\n\t\t * @param  {mixed} obj the node\n\t\t * @param {Boolean} deep if set to `true` nodes are sorted recursively.\n\t\t * @plugin sort\n\t\t * @trigger search.jstree\n\t\t */\n\t\tthis.sort = function (obj, deep) {\n\t\t\tvar i, j;\n\t\t\tobj = this.get_node(obj);\n\t\t\tif(obj && obj.children && obj.children.length) {\n\t\t\t\tobj.children.sort($.proxy(this.settings.sort, this));\n\t\t\t\tif(deep) {\n\t\t\t\t\tfor(i = 0, j = obj.children_d.length; i < j; i++) {\n\t\t\t\t\t\tthis.sort(obj.children_d[i], false);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t};\n\n\t// include the sort plugin by default\n\t// $.jstree.defaults.plugins.push(\"sort\");\n\n/**\n * ### State plugin\n *\n * Saves the state of the tree (selected nodes, opened nodes) on the user's computer using available options (localStorage, cookies, etc)\n */\n\n\tvar to = false;\n\t/**\n\t * stores all defaults for the state plugin\n\t * @name $.jstree.defaults.state\n\t * @plugin state\n\t */\n\t$.jstree.defaults.state = {\n\t\t/**\n\t\t * A string for the key to use when saving the current tree (change if using multiple trees in your project). Defaults to `jstree`.\n\t\t * @name $.jstree.defaults.state.key\n\t\t * @plugin state\n\t\t */\n\t\tkey\t\t: 'jstree',\n\t\t/**\n\t\t * A space separated list of events that trigger a state save. Defaults to `changed.jstree open_node.jstree close_node.jstree`.\n\t\t * @name $.jstree.defaults.state.events\n\t\t * @plugin state\n\t\t */\n\t\tevents\t: 'changed.jstree open_node.jstree close_node.jstree check_node.jstree uncheck_node.jstree',\n\t\t/**\n\t\t * Time in milliseconds after which the state will expire. Defaults to 'false' meaning - no expire.\n\t\t * @name $.jstree.defaults.state.ttl\n\t\t * @plugin state\n\t\t */\n\t\tttl\t\t: false,\n\t\t/**\n\t\t * A function that will be executed prior to restoring state with one argument - the state object. Can be used to clear unwanted parts of the state.\n\t\t * @name $.jstree.defaults.state.filter\n\t\t * @plugin state\n\t\t */\n\t\tfilter\t: false\n\t};\n\t$.jstree.plugins.state = function (options, parent) {\n\t\tthis.bind = function () {\n\t\t\tparent.bind.call(this);\n\t\t\tvar bind = $.proxy(function () {\n\t\t\t\tthis.element.on(this.settings.state.events, $.proxy(function () {\n\t\t\t\t\tif(to) { clearTimeout(to); }\n\t\t\t\t\tto = setTimeout($.proxy(function () { this.save_state(); }, this), 100);\n\t\t\t\t}, this));\n\t\t\t\t/**\n\t\t\t\t * triggered when the state plugin is finished restoring the state (and immediately after ready if there is no state to restore).\n\t\t\t\t * @event\n\t\t\t\t * @name state_ready.jstree\n\t\t\t\t * @plugin state\n\t\t\t\t */\n\t\t\t\tthis.trigger('state_ready');\n\t\t\t}, this);\n\t\t\tthis.element\n\t\t\t\t.on(\"ready.jstree\", $.proxy(function (e, data) {\n\t\t\t\t\t\tthis.element.one(\"restore_state.jstree\", bind);\n\t\t\t\t\t\tif(!this.restore_state()) { bind(); }\n\t\t\t\t\t}, this));\n\t\t};\n\t\t/**\n\t\t * save the state\n\t\t * @name save_state()\n\t\t * @plugin state\n\t\t */\n\t\tthis.save_state = function () {\n\t\t\tvar st = { 'state' : this.get_state(), 'ttl' : this.settings.state.ttl, 'sec' : +(new Date()) };\n\t\t\t$.vakata.storage.set(this.settings.state.key, JSON.stringify(st));\n\t\t};\n\t\t/**\n\t\t * restore the state from the user's computer\n\t\t * @name restore_state()\n\t\t * @plugin state\n\t\t */\n\t\tthis.restore_state = function () {\n\t\t\tvar k = $.vakata.storage.get(this.settings.state.key);\n\t\t\tif(!!k) { try { k = JSON.parse(k); } catch(ex) { return false; } }\n\t\t\tif(!!k && k.ttl && k.sec && +(new Date()) - k.sec > k.ttl) { return false; }\n\t\t\tif(!!k && k.state) { k = k.state; }\n\t\t\tif(!!k && $.isFunction(this.settings.state.filter)) { k = this.settings.state.filter.call(this, k); }\n\t\t\tif(!!k) {\n\t\t\t\tthis.element.one(\"set_state.jstree\", function (e, data) { data.instance.trigger('restore_state', { 'state' : $.extend(true, {}, k) }); });\n\t\t\t\tthis.set_state(k);\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\treturn false;\n\t\t};\n\t\t/**\n\t\t * clear the state on the user's computer\n\t\t * @name clear_state()\n\t\t * @plugin state\n\t\t */\n\t\tthis.clear_state = function () {\n\t\t\treturn $.vakata.storage.del(this.settings.state.key);\n\t\t};\n\t};\n\n\t(function ($, undefined) {\n\t\t$.vakata.storage = {\n\t\t\t// simply specifying the functions in FF throws an error\n\t\t\tset : function (key, val) { return window.localStorage.setItem(key, val); },\n\t\t\tget : function (key) { return window.localStorage.getItem(key); },\n\t\t\tdel : function (key) { return window.localStorage.removeItem(key); }\n\t\t};\n\t}($));\n\n\t// include the state plugin by default\n\t// $.jstree.defaults.plugins.push(\"state\");\n\n/**\n * ### Types plugin\n *\n * Makes it possible to add predefined types for groups of nodes, which make it possible to easily control nesting rules and icon for each group.\n */\n\n\t/**\n\t * An object storing all types as key value pairs, where the key is the type name and the value is an object that could contain following keys (all optional).\n\t *\n\t * * `max_children` the maximum number of immediate children this node type can have. Do not specify or set to `-1` for unlimited.\n\t * * `max_depth` the maximum number of nesting this node type can have. A value of `1` would mean that the node can have children, but no grandchildren. Do not specify or set to `-1` for unlimited.\n\t * * `valid_children` an array of node type strings, that nodes of this type can have as children. Do not specify or set to `-1` for no limits.\n\t * * `icon` a string - can be a path to an icon or a className, if using an image that is in the current directory use a `./` prefix, otherwise it will be detected as a class. Omit to use the default icon from your theme.\n\t * * `li_attr` an object of values which will be used to add HTML attributes on the resulting LI DOM node (merged with the node's own data)\n\t * * `a_attr` an object of values which will be used to add HTML attributes on the resulting A DOM node (merged with the node's own data)\n\t *\n\t * There are two predefined types:\n\t *\n\t * * `#` represents the root of the tree, for example `max_children` would control the maximum number of root nodes.\n\t * * `default` represents the default node - any settings here will be applied to all nodes that do not have a type specified.\n\t *\n\t * @name $.jstree.defaults.types\n\t * @plugin types\n\t */\n\t$.jstree.defaults.types = {\n\t\t'default' : {}\n\t};\n\t$.jstree.defaults.types[$.jstree.root] = {};\n\n\t$.jstree.plugins.types = function (options, parent) {\n\t\tthis.init = function (el, options) {\n\t\t\tvar i, j;\n\t\t\tif(options && options.types && options.types['default']) {\n\t\t\t\tfor(i in options.types) {\n\t\t\t\t\tif(i !== \"default\" && i !== $.jstree.root && options.types.hasOwnProperty(i)) {\n\t\t\t\t\t\tfor(j in options.types['default']) {\n\t\t\t\t\t\t\tif(options.types['default'].hasOwnProperty(j) && options.types[i][j] === undefined) {\n\t\t\t\t\t\t\t\toptions.types[i][j] = options.types['default'][j];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tparent.init.call(this, el, options);\n\t\t\tthis._model.data[$.jstree.root].type = $.jstree.root;\n\t\t};\n\t\tthis.refresh = function (skip_loading, forget_state) {\n\t\t\tparent.refresh.call(this, skip_loading, forget_state);\n\t\t\tthis._model.data[$.jstree.root].type = $.jstree.root;\n\t\t};\n\t\tthis.bind = function () {\n\t\t\tthis.element\n\t\t\t\t.on('model.jstree', $.proxy(function (e, data) {\n\t\t\t\t\t\tvar m = this._model.data,\n\t\t\t\t\t\t\tdpc = data.nodes,\n\t\t\t\t\t\t\tt = this.settings.types,\n\t\t\t\t\t\t\ti, j, c = 'default', k;\n\t\t\t\t\t\tfor(i = 0, j = dpc.length; i < j; i++) {\n\t\t\t\t\t\t\tc = 'default';\n\t\t\t\t\t\t\tif(m[dpc[i]].original && m[dpc[i]].original.type && t[m[dpc[i]].original.type]) {\n\t\t\t\t\t\t\t\tc = m[dpc[i]].original.type;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif(m[dpc[i]].data && m[dpc[i]].data.jstree && m[dpc[i]].data.jstree.type && t[m[dpc[i]].data.jstree.type]) {\n\t\t\t\t\t\t\t\tc = m[dpc[i]].data.jstree.type;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tm[dpc[i]].type = c;\n\t\t\t\t\t\t\tif(m[dpc[i]].icon === true && t[c].icon !== undefined) {\n\t\t\t\t\t\t\t\tm[dpc[i]].icon = t[c].icon;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif(t[c].li_attr !== undefined && typeof t[c].li_attr === 'object') {\n\t\t\t\t\t\t\t\tfor (k in t[c].li_attr) {\n\t\t\t\t\t\t\t\t\tif (t[c].li_attr.hasOwnProperty(k)) {\n\t\t\t\t\t\t\t\t\t\tif (k === 'id') {\n\t\t\t\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\telse if (m[dpc[i]].li_attr[k] === undefined) {\n\t\t\t\t\t\t\t\t\t\t\tm[dpc[i]].li_attr[k] = t[c].li_attr[k];\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\telse if (k === 'class') {\n\t\t\t\t\t\t\t\t\t\t\tm[dpc[i]].li_attr['class'] = t[c].li_attr['class'] + ' ' + m[dpc[i]].li_attr['class'];\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif(t[c].a_attr !== undefined && typeof t[c].a_attr === 'object') {\n\t\t\t\t\t\t\t\tfor (k in t[c].a_attr) {\n\t\t\t\t\t\t\t\t\tif (t[c].a_attr.hasOwnProperty(k)) {\n\t\t\t\t\t\t\t\t\t\tif (k === 'id') {\n\t\t\t\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\telse if (m[dpc[i]].a_attr[k] === undefined) {\n\t\t\t\t\t\t\t\t\t\t\tm[dpc[i]].a_attr[k] = t[c].a_attr[k];\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\telse if (k === 'href' && m[dpc[i]].a_attr[k] === '#') {\n\t\t\t\t\t\t\t\t\t\t\tm[dpc[i]].a_attr['href'] = t[c].a_attr['href'];\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\telse if (k === 'class') {\n\t\t\t\t\t\t\t\t\t\t\tm[dpc[i]].a_attr['class'] = t[c].a_attr['class'] + ' ' + m[dpc[i]].a_attr['class'];\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tm[$.jstree.root].type = $.jstree.root;\n\t\t\t\t\t}, this));\n\t\t\tparent.bind.call(this);\n\t\t};\n\t\tthis.get_json = function (obj, options, flat) {\n\t\t\tvar i, j,\n\t\t\t\tm = this._model.data,\n\t\t\t\topt = options ? $.extend(true, {}, options, {no_id:false}) : {},\n\t\t\t\ttmp = parent.get_json.call(this, obj, opt, flat);\n\t\t\tif(tmp === false) { return false; }\n\t\t\tif($.isArray(tmp)) {\n\t\t\t\tfor(i = 0, j = tmp.length; i < j; i++) {\n\t\t\t\t\ttmp[i].type = tmp[i].id && m[tmp[i].id] && m[tmp[i].id].type ? m[tmp[i].id].type : \"default\";\n\t\t\t\t\tif(options && options.no_id) {\n\t\t\t\t\t\tdelete tmp[i].id;\n\t\t\t\t\t\tif(tmp[i].li_attr && tmp[i].li_attr.id) {\n\t\t\t\t\t\t\tdelete tmp[i].li_attr.id;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(tmp[i].a_attr && tmp[i].a_attr.id) {\n\t\t\t\t\t\t\tdelete tmp[i].a_attr.id;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\ttmp.type = tmp.id && m[tmp.id] && m[tmp.id].type ? m[tmp.id].type : \"default\";\n\t\t\t\tif(options && options.no_id) {\n\t\t\t\t\ttmp = this._delete_ids(tmp);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn tmp;\n\t\t};\n\t\tthis._delete_ids = function (tmp) {\n\t\t\tif($.isArray(tmp)) {\n\t\t\t\tfor(var i = 0, j = tmp.length; i < j; i++) {\n\t\t\t\t\ttmp[i] = this._delete_ids(tmp[i]);\n\t\t\t\t}\n\t\t\t\treturn tmp;\n\t\t\t}\n\t\t\tdelete tmp.id;\n\t\t\tif(tmp.li_attr && tmp.li_attr.id) {\n\t\t\t\tdelete tmp.li_attr.id;\n\t\t\t}\n\t\t\tif(tmp.a_attr && tmp.a_attr.id) {\n\t\t\t\tdelete tmp.a_attr.id;\n\t\t\t}\n\t\t\tif(tmp.children && $.isArray(tmp.children)) {\n\t\t\t\ttmp.children = this._delete_ids(tmp.children);\n\t\t\t}\n\t\t\treturn tmp;\n\t\t};\n\t\tthis.check = function (chk, obj, par, pos, more) {\n\t\t\tif(parent.check.call(this, chk, obj, par, pos, more) === false) { return false; }\n\t\t\tobj = obj && obj.id ? obj : this.get_node(obj);\n\t\t\tpar = par && par.id ? par : this.get_node(par);\n\t\t\tvar m = obj && obj.id ? (more && more.origin ? more.origin : $.jstree.reference(obj.id)) : null, tmp, d, i, j;\n\t\t\tm = m && m._model && m._model.data ? m._model.data : null;\n\t\t\tswitch(chk) {\n\t\t\t\tcase \"create_node\":\n\t\t\t\tcase \"move_node\":\n\t\t\t\tcase \"copy_node\":\n\t\t\t\t\tif(chk !== 'move_node' || $.inArray(obj.id, par.children) === -1) {\n\t\t\t\t\t\ttmp = this.get_rules(par);\n\t\t\t\t\t\tif(tmp.max_children !== undefined && tmp.max_children !== -1 && tmp.max_children === par.children.length) {\n\t\t\t\t\t\t\tthis._data.core.last_error = { 'error' : 'check', 'plugin' : 'types', 'id' : 'types_01', 'reason' : 'max_children prevents function: ' + chk, 'data' : JSON.stringify({ 'chk' : chk, 'pos' : pos, 'obj' : obj && obj.id ? obj.id : false, 'par' : par && par.id ? par.id : false }) };\n\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(tmp.valid_children !== undefined && tmp.valid_children !== -1 && $.inArray((obj.type || 'default'), tmp.valid_children) === -1) {\n\t\t\t\t\t\t\tthis._data.core.last_error = { 'error' : 'check', 'plugin' : 'types', 'id' : 'types_02', 'reason' : 'valid_children prevents function: ' + chk, 'data' : JSON.stringify({ 'chk' : chk, 'pos' : pos, 'obj' : obj && obj.id ? obj.id : false, 'par' : par && par.id ? par.id : false }) };\n\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(m && obj.children_d && obj.parents) {\n\t\t\t\t\t\t\td = 0;\n\t\t\t\t\t\t\tfor(i = 0, j = obj.children_d.length; i < j; i++) {\n\t\t\t\t\t\t\t\td = Math.max(d, m[obj.children_d[i]].parents.length);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\td = d - obj.parents.length + 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(d <= 0 || d === undefined) { d = 1; }\n\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\tif(tmp.max_depth !== undefined && tmp.max_depth !== -1 && tmp.max_depth < d) {\n\t\t\t\t\t\t\t\tthis._data.core.last_error = { 'error' : 'check', 'plugin' : 'types', 'id' : 'types_03', 'reason' : 'max_depth prevents function: ' + chk, 'data' : JSON.stringify({ 'chk' : chk, 'pos' : pos, 'obj' : obj && obj.id ? obj.id : false, 'par' : par && par.id ? par.id : false }) };\n\t\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tpar = this.get_node(par.parent);\n\t\t\t\t\t\t\ttmp = this.get_rules(par);\n\t\t\t\t\t\t\td++;\n\t\t\t\t\t\t} while(par);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\treturn true;\n\t\t};\n\t\t/**\n\t\t * used to retrieve the type settings object for a node\n\t\t * @name get_rules(obj)\n\t\t * @param {mixed} obj the node to find the rules for\n\t\t * @return {Object}\n\t\t * @plugin types\n\t\t */\n\t\tthis.get_rules = function (obj) {\n\t\t\tobj = this.get_node(obj);\n\t\t\tif(!obj) { return false; }\n\t\t\tvar tmp = this.get_type(obj, true);\n\t\t\tif(tmp.max_depth === undefined) { tmp.max_depth = -1; }\n\t\t\tif(tmp.max_children === undefined) { tmp.max_children = -1; }\n\t\t\tif(tmp.valid_children === undefined) { tmp.valid_children = -1; }\n\t\t\treturn tmp;\n\t\t};\n\t\t/**\n\t\t * used to retrieve the type string or settings object for a node\n\t\t * @name get_type(obj [, rules])\n\t\t * @param {mixed} obj the node to find the rules for\n\t\t * @param {Boolean} rules if set to `true` instead of a string the settings object will be returned\n\t\t * @return {String|Object}\n\t\t * @plugin types\n\t\t */\n\t\tthis.get_type = function (obj, rules) {\n\t\t\tobj = this.get_node(obj);\n\t\t\treturn (!obj) ? false : ( rules ? $.extend({ 'type' : obj.type }, this.settings.types[obj.type]) : obj.type);\n\t\t};\n\t\t/**\n\t\t * used to change a node's type\n\t\t * @name set_type(obj, type)\n\t\t * @param {mixed} obj the node to change\n\t\t * @param {String} type the new type\n\t\t * @plugin types\n\t\t */\n\t\tthis.set_type = function (obj, type) {\n\t\t\tvar m = this._model.data, t, t1, t2, old_type, old_icon, k, d, a;\n\t\t\tif($.isArray(obj)) {\n\t\t\t\tobj = obj.slice();\n\t\t\t\tfor(t1 = 0, t2 = obj.length; t1 < t2; t1++) {\n\t\t\t\t\tthis.set_type(obj[t1], type);\n\t\t\t\t}\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\tt = this.settings.types;\n\t\t\tobj = this.get_node(obj);\n\t\t\tif(!t[type] || !obj) { return false; }\n\t\t\td = this.get_node(obj, true);\n\t\t\tif (d && d.length) {\n\t\t\t\ta = d.children('.jstree-anchor');\n\t\t\t}\n\t\t\told_type = obj.type;\n\t\t\told_icon = this.get_icon(obj);\n\t\t\tobj.type = type;\n\t\t\tif(old_icon === true || !t[old_type] || (t[old_type].icon !== undefined && old_icon === t[old_type].icon)) {\n\t\t\t\tthis.set_icon(obj, t[type].icon !== undefined ? t[type].icon : true);\n\t\t\t}\n\n\t\t\t// remove old type props\n\t\t\tif(t[old_type] && t[old_type].li_attr !== undefined && typeof t[old_type].li_attr === 'object') {\n\t\t\t\tfor (k in t[old_type].li_attr) {\n\t\t\t\t\tif (t[old_type].li_attr.hasOwnProperty(k)) {\n\t\t\t\t\t\tif (k === 'id') {\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if (k === 'class') {\n\t\t\t\t\t\t\tm[obj.id].li_attr['class'] = (m[obj.id].li_attr['class'] || '').replace(t[old_type].li_attr[k], '');\n\t\t\t\t\t\t\tif (d) { d.removeClass(t[old_type].li_attr[k]); }\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if (m[obj.id].li_attr[k] === t[old_type].li_attr[k]) {\n\t\t\t\t\t\t\tm[obj.id].li_attr[k] = null;\n\t\t\t\t\t\t\tif (d) { d.removeAttr(k); }\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(t[old_type] && t[old_type].a_attr !== undefined && typeof t[old_type].a_attr === 'object') {\n\t\t\t\tfor (k in t[old_type].a_attr) {\n\t\t\t\t\tif (t[old_type].a_attr.hasOwnProperty(k)) {\n\t\t\t\t\t\tif (k === 'id') {\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if (k === 'class') {\n\t\t\t\t\t\t\tm[obj.id].a_attr['class'] = (m[obj.id].a_attr['class'] || '').replace(t[old_type].a_attr[k], '');\n\t\t\t\t\t\t\tif (a) { a.removeClass(t[old_type].a_attr[k]); }\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if (m[obj.id].a_attr[k] === t[old_type].a_attr[k]) {\n\t\t\t\t\t\t\tif (k === 'href') {\n\t\t\t\t\t\t\t\tm[obj.id].a_attr[k] = '#';\n\t\t\t\t\t\t\t\tif (a) { a.attr('href', '#'); }\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\tdelete m[obj.id].a_attr[k];\n\t\t\t\t\t\t\t\tif (a) { a.removeAttr(k); }\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// add new props\n\t\t\tif(t[type].li_attr !== undefined && typeof t[type].li_attr === 'object') {\n\t\t\t\tfor (k in t[type].li_attr) {\n\t\t\t\t\tif (t[type].li_attr.hasOwnProperty(k)) {\n\t\t\t\t\t\tif (k === 'id') {\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if (m[obj.id].li_attr[k] === undefined) {\n\t\t\t\t\t\t\tm[obj.id].li_attr[k] = t[type].li_attr[k];\n\t\t\t\t\t\t\tif (d) {\n\t\t\t\t\t\t\t\tif (k === 'class') {\n\t\t\t\t\t\t\t\t\td.addClass(t[type].li_attr[k]);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\td.attr(k, t[type].li_attr[k]);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if (k === 'class') {\n\t\t\t\t\t\t\tm[obj.id].li_attr['class'] = t[type].li_attr[k] + ' ' + m[obj.id].li_attr['class'];\n\t\t\t\t\t\t\tif (d) { d.addClass(t[type].li_attr[k]); }\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(t[type].a_attr !== undefined && typeof t[type].a_attr === 'object') {\n\t\t\t\tfor (k in t[type].a_attr) {\n\t\t\t\t\tif (t[type].a_attr.hasOwnProperty(k)) {\n\t\t\t\t\t\tif (k === 'id') {\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if (m[obj.id].a_attr[k] === undefined) {\n\t\t\t\t\t\t\tm[obj.id].a_attr[k] = t[type].a_attr[k];\n\t\t\t\t\t\t\tif (a) {\n\t\t\t\t\t\t\t\tif (k === 'class') {\n\t\t\t\t\t\t\t\t\ta.addClass(t[type].a_attr[k]);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\ta.attr(k, t[type].a_attr[k]);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if (k === 'href' && m[obj.id].a_attr[k] === '#') {\n\t\t\t\t\t\t\tm[obj.id].a_attr['href'] = t[type].a_attr['href'];\n\t\t\t\t\t\t\tif (a) { a.attr('href', t[type].a_attr['href']); }\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if (k === 'class') {\n\t\t\t\t\t\t\tm[obj.id].a_attr['class'] = t[type].a_attr['class'] + ' ' + m[obj.id].a_attr['class'];\n\t\t\t\t\t\t\tif (a) { a.addClass(t[type].a_attr[k]); }\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn true;\n\t\t};\n\t};\n\t// include the types plugin by default\n\t// $.jstree.defaults.plugins.push(\"types\");\n\n\n/**\n * ### Unique plugin\n *\n * Enforces that no nodes with the same name can coexist as siblings.\n */\n\n\t/**\n\t * stores all defaults for the unique plugin\n\t * @name $.jstree.defaults.unique\n\t * @plugin unique\n\t */\n\t$.jstree.defaults.unique = {\n\t\t/**\n\t\t * Indicates if the comparison should be case sensitive. Default is `false`.\n\t\t * @name $.jstree.defaults.unique.case_sensitive\n\t\t * @plugin unique\n\t\t */\n\t\tcase_sensitive : false,\n\t\t/**\n\t\t * A callback executed in the instance's scope when a new node is created and the name is already taken, the two arguments are the conflicting name and the counter. The default will produce results like `New node (2)`.\n\t\t * @name $.jstree.defaults.unique.duplicate\n\t\t * @plugin unique\n\t\t */\n\t\tduplicate : function (name, counter) {\n\t\t\treturn name + ' (' + counter + ')';\n\t\t}\n\t};\n\n\t$.jstree.plugins.unique = function (options, parent) {\n\t\tthis.check = function (chk, obj, par, pos, more) {\n\t\t\tif(parent.check.call(this, chk, obj, par, pos, more) === false) { return false; }\n\t\t\tobj = obj && obj.id ? obj : this.get_node(obj);\n\t\t\tpar = par && par.id ? par : this.get_node(par);\n\t\t\tif(!par || !par.children) { return true; }\n\t\t\tvar n = chk === \"rename_node\" ? pos : obj.text,\n\t\t\t\tc = [],\n\t\t\t\ts = this.settings.unique.case_sensitive,\n\t\t\t\tm = this._model.data, i, j;\n\t\t\tfor(i = 0, j = par.children.length; i < j; i++) {\n\t\t\t\tc.push(s ? m[par.children[i]].text : m[par.children[i]].text.toLowerCase());\n\t\t\t}\n\t\t\tif(!s) { n = n.toLowerCase(); }\n\t\t\tswitch(chk) {\n\t\t\t\tcase \"delete_node\":\n\t\t\t\t\treturn true;\n\t\t\t\tcase \"rename_node\":\n\t\t\t\t\ti = ($.inArray(n, c) === -1 || (obj.text && obj.text[ s ? 'toString' : 'toLowerCase']() === n));\n\t\t\t\t\tif(!i) {\n\t\t\t\t\t\tthis._data.core.last_error = { 'error' : 'check', 'plugin' : 'unique', 'id' : 'unique_01', 'reason' : 'Child with name ' + n + ' already exists. Preventing: ' + chk, 'data' : JSON.stringify({ 'chk' : chk, 'pos' : pos, 'obj' : obj && obj.id ? obj.id : false, 'par' : par && par.id ? par.id : false }) };\n\t\t\t\t\t}\n\t\t\t\t\treturn i;\n\t\t\t\tcase \"create_node\":\n\t\t\t\t\ti = ($.inArray(n, c) === -1);\n\t\t\t\t\tif(!i) {\n\t\t\t\t\t\tthis._data.core.last_error = { 'error' : 'check', 'plugin' : 'unique', 'id' : 'unique_04', 'reason' : 'Child with name ' + n + ' already exists. Preventing: ' + chk, 'data' : JSON.stringify({ 'chk' : chk, 'pos' : pos, 'obj' : obj && obj.id ? obj.id : false, 'par' : par && par.id ? par.id : false }) };\n\t\t\t\t\t}\n\t\t\t\t\treturn i;\n\t\t\t\tcase \"copy_node\":\n\t\t\t\t\ti = ($.inArray(n, c) === -1);\n\t\t\t\t\tif(!i) {\n\t\t\t\t\t\tthis._data.core.last_error = { 'error' : 'check', 'plugin' : 'unique', 'id' : 'unique_02', 'reason' : 'Child with name ' + n + ' already exists. Preventing: ' + chk, 'data' : JSON.stringify({ 'chk' : chk, 'pos' : pos, 'obj' : obj && obj.id ? obj.id : false, 'par' : par && par.id ? par.id : false }) };\n\t\t\t\t\t}\n\t\t\t\t\treturn i;\n\t\t\t\tcase \"move_node\":\n\t\t\t\t\ti = ( (obj.parent === par.id && (!more || !more.is_multi)) || $.inArray(n, c) === -1);\n\t\t\t\t\tif(!i) {\n\t\t\t\t\t\tthis._data.core.last_error = { 'error' : 'check', 'plugin' : 'unique', 'id' : 'unique_03', 'reason' : 'Child with name ' + n + ' already exists. Preventing: ' + chk, 'data' : JSON.stringify({ 'chk' : chk, 'pos' : pos, 'obj' : obj && obj.id ? obj.id : false, 'par' : par && par.id ? par.id : false }) };\n\t\t\t\t\t}\n\t\t\t\t\treturn i;\n\t\t\t}\n\t\t\treturn true;\n\t\t};\n\t\tthis.create_node = function (par, node, pos, callback, is_loaded) {\n\t\t\tif(!node || node.text === undefined) {\n\t\t\t\tif(par === null) {\n\t\t\t\t\tpar = $.jstree.root;\n\t\t\t\t}\n\t\t\t\tpar = this.get_node(par);\n\t\t\t\tif(!par) {\n\t\t\t\t\treturn parent.create_node.call(this, par, node, pos, callback, is_loaded);\n\t\t\t\t}\n\t\t\t\tpos = pos === undefined ? \"last\" : pos;\n\t\t\t\tif(!pos.toString().match(/^(before|after)$/) && !is_loaded && !this.is_loaded(par)) {\n\t\t\t\t\treturn parent.create_node.call(this, par, node, pos, callback, is_loaded);\n\t\t\t\t}\n\t\t\t\tif(!node) { node = {}; }\n\t\t\t\tvar tmp, n, dpc, i, j, m = this._model.data, s = this.settings.unique.case_sensitive, cb = this.settings.unique.duplicate;\n\t\t\t\tn = tmp = this.get_string('New node');\n\t\t\t\tdpc = [];\n\t\t\t\tfor(i = 0, j = par.children.length; i < j; i++) {\n\t\t\t\t\tdpc.push(s ? m[par.children[i]].text : m[par.children[i]].text.toLowerCase());\n\t\t\t\t}\n\t\t\t\ti = 1;\n\t\t\t\twhile($.inArray(s ? n : n.toLowerCase(), dpc) !== -1) {\n\t\t\t\t\tn = cb.call(this, tmp, (++i)).toString();\n\t\t\t\t}\n\t\t\t\tnode.text = n;\n\t\t\t}\n\t\t\treturn parent.create_node.call(this, par, node, pos, callback, is_loaded);\n\t\t};\n\t};\n\n\t// include the unique plugin by default\n\t// $.jstree.defaults.plugins.push(\"unique\");\n\n\n/**\n * ### Wholerow plugin\n *\n * Makes each node appear block level. Making selection easier. May cause slow down for large trees in old browsers.\n */\n\n\tvar div = document.createElement('DIV');\n\tdiv.setAttribute('unselectable','on');\n\tdiv.setAttribute('role','presentation');\n\tdiv.className = 'jstree-wholerow';\n\tdiv.innerHTML = '&#160;';\n\t$.jstree.plugins.wholerow = function (options, parent) {\n\t\tthis.bind = function () {\n\t\t\tparent.bind.call(this);\n\n\t\t\tthis.element\n\t\t\t\t.on('ready.jstree set_state.jstree', $.proxy(function () {\n\t\t\t\t\t\tthis.hide_dots();\n\t\t\t\t\t}, this))\n\t\t\t\t.on(\"init.jstree loading.jstree ready.jstree\", $.proxy(function () {\n\t\t\t\t\t\t//div.style.height = this._data.core.li_height + 'px';\n\t\t\t\t\t\tthis.get_container_ul().addClass('jstree-wholerow-ul');\n\t\t\t\t\t}, this))\n\t\t\t\t.on(\"deselect_all.jstree\", $.proxy(function (e, data) {\n\t\t\t\t\t\tthis.element.find('.jstree-wholerow-clicked').removeClass('jstree-wholerow-clicked');\n\t\t\t\t\t}, this))\n\t\t\t\t.on(\"changed.jstree\", $.proxy(function (e, data) {\n\t\t\t\t\t\tthis.element.find('.jstree-wholerow-clicked').removeClass('jstree-wholerow-clicked');\n\t\t\t\t\t\tvar tmp = false, i, j;\n\t\t\t\t\t\tfor(i = 0, j = data.selected.length; i < j; i++) {\n\t\t\t\t\t\t\ttmp = this.get_node(data.selected[i], true);\n\t\t\t\t\t\t\tif(tmp && tmp.length) {\n\t\t\t\t\t\t\t\ttmp.children('.jstree-wholerow').addClass('jstree-wholerow-clicked');\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}, this))\n\t\t\t\t.on(\"open_node.jstree\", $.proxy(function (e, data) {\n\t\t\t\t\t\tthis.get_node(data.node, true).find('.jstree-clicked').parent().children('.jstree-wholerow').addClass('jstree-wholerow-clicked');\n\t\t\t\t\t}, this))\n\t\t\t\t.on(\"hover_node.jstree dehover_node.jstree\", $.proxy(function (e, data) {\n\t\t\t\t\t\tif(e.type === \"hover_node\" && this.is_disabled(data.node)) { return; }\n\t\t\t\t\t\tthis.get_node(data.node, true).children('.jstree-wholerow')[e.type === \"hover_node\"?\"addClass\":\"removeClass\"]('jstree-wholerow-hovered');\n\t\t\t\t\t}, this))\n\t\t\t\t.on(\"contextmenu.jstree\", \".jstree-wholerow\", $.proxy(function (e) {\n\t\t\t\t\t\tif (this._data.contextmenu) {\n\t\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t\t\tvar tmp = $.Event('contextmenu', { metaKey : e.metaKey, ctrlKey : e.ctrlKey, altKey : e.altKey, shiftKey : e.shiftKey, pageX : e.pageX, pageY : e.pageY });\n\t\t\t\t\t\t\t$(e.currentTarget).closest(\".jstree-node\").children(\".jstree-anchor\").first().trigger(tmp);\n\t\t\t\t\t\t}\n\t\t\t\t\t}, this))\n\t\t\t\t/*!\n\t\t\t\t.on(\"mousedown.jstree touchstart.jstree\", \".jstree-wholerow\", function (e) {\n\t\t\t\t\t\tif(e.target === e.currentTarget) {\n\t\t\t\t\t\t\tvar a = $(e.currentTarget).closest(\".jstree-node\").children(\".jstree-anchor\");\n\t\t\t\t\t\t\te.target = a[0];\n\t\t\t\t\t\t\ta.trigger(e);\n\t\t\t\t\t\t}\n\t\t\t\t\t})\n\t\t\t\t*/\n\t\t\t\t.on(\"click.jstree\", \".jstree-wholerow\", function (e) {\n\t\t\t\t\t\te.stopImmediatePropagation();\n\t\t\t\t\t\tvar tmp = $.Event('click', { metaKey : e.metaKey, ctrlKey : e.ctrlKey, altKey : e.altKey, shiftKey : e.shiftKey });\n\t\t\t\t\t\t$(e.currentTarget).closest(\".jstree-node\").children(\".jstree-anchor\").first().trigger(tmp).focus();\n\t\t\t\t\t})\n\t\t\t\t.on(\"dblclick.jstree\", \".jstree-wholerow\", function (e) {\n\t\t\t\t\t\te.stopImmediatePropagation();\n\t\t\t\t\t\tvar tmp = $.Event('dblclick', { metaKey : e.metaKey, ctrlKey : e.ctrlKey, altKey : e.altKey, shiftKey : e.shiftKey });\n\t\t\t\t\t\t$(e.currentTarget).closest(\".jstree-node\").children(\".jstree-anchor\").first().trigger(tmp).focus();\n\t\t\t\t\t})\n\t\t\t\t.on(\"click.jstree\", \".jstree-leaf > .jstree-ocl\", $.proxy(function (e) {\n\t\t\t\t\t\te.stopImmediatePropagation();\n\t\t\t\t\t\tvar tmp = $.Event('click', { metaKey : e.metaKey, ctrlKey : e.ctrlKey, altKey : e.altKey, shiftKey : e.shiftKey });\n\t\t\t\t\t\t$(e.currentTarget).closest(\".jstree-node\").children(\".jstree-anchor\").first().trigger(tmp).focus();\n\t\t\t\t\t}, this))\n\t\t\t\t.on(\"mouseover.jstree\", \".jstree-wholerow, .jstree-icon\", $.proxy(function (e) {\n\t\t\t\t\t\te.stopImmediatePropagation();\n\t\t\t\t\t\tif(!this.is_disabled(e.currentTarget)) {\n\t\t\t\t\t\t\tthis.hover_node(e.currentTarget);\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}, this))\n\t\t\t\t.on(\"mouseleave.jstree\", \".jstree-node\", $.proxy(function (e) {\n\t\t\t\t\t\tthis.dehover_node(e.currentTarget);\n\t\t\t\t\t}, this));\n\t\t};\n\t\tthis.teardown = function () {\n\t\t\tif(this.settings.wholerow) {\n\t\t\t\tthis.element.find(\".jstree-wholerow\").remove();\n\t\t\t}\n\t\t\tparent.teardown.call(this);\n\t\t};\n\t\tthis.redraw_node = function(obj, deep, callback, force_render) {\n\t\t\tobj = parent.redraw_node.apply(this, arguments);\n\t\t\tif(obj) {\n\t\t\t\tvar tmp = div.cloneNode(true);\n\t\t\t\t//tmp.style.height = this._data.core.li_height + 'px';\n\t\t\t\tif($.inArray(obj.id, this._data.core.selected) !== -1) { tmp.className += ' jstree-wholerow-clicked'; }\n\t\t\t\tif(this._data.core.focused && this._data.core.focused === obj.id) { tmp.className += ' jstree-wholerow-hovered'; }\n\t\t\t\tobj.insertBefore(tmp, obj.childNodes[0]);\n\t\t\t}\n\t\t\treturn obj;\n\t\t};\n\t};\n\t// include the wholerow plugin by default\n\t// $.jstree.defaults.plugins.push(\"wholerow\");\n\tif(document.registerElement && Object && Object.create) {\n\t\tvar proto = Object.create(HTMLElement.prototype);\n\t\tproto.createdCallback = function () {\n\t\t\tvar c = { core : {}, plugins : [] }, i;\n\t\t\tfor(i in $.jstree.plugins) {\n\t\t\t\tif($.jstree.plugins.hasOwnProperty(i) && this.attributes[i]) {\n\t\t\t\t\tc.plugins.push(i);\n\t\t\t\t\tif(this.getAttribute(i) && JSON.parse(this.getAttribute(i))) {\n\t\t\t\t\t\tc[i] = JSON.parse(this.getAttribute(i));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor(i in $.jstree.defaults.core) {\n\t\t\t\tif($.jstree.defaults.core.hasOwnProperty(i) && this.attributes[i]) {\n\t\t\t\t\tc.core[i] = JSON.parse(this.getAttribute(i)) || this.getAttribute(i);\n\t\t\t\t}\n\t\t\t}\n\t\t\t$(this).jstree(c);\n\t\t};\n\t\t// proto.attributeChangedCallback = function (name, previous, value) { };\n\t\ttry {\n\t\t\tdocument.registerElement(\"vakata-jstree\", { prototype: proto });\n\t\t} catch(ignore) { }\n\t}\n\n}));"
  },
  {
    "path": "static/jstree/3.3.4/themes/default/style.css",
    "content": "/* jsTree default theme */\n.jstree-node,\n.jstree-children,\n.jstree-container-ul {\n  display: block;\n  margin: 0;\n  padding: 0;\n  list-style-type: none;\n  list-style-image: none;\n}\n.jstree-node {\n  white-space: nowrap;\n}\n.jstree-anchor {\n  display: inline-block;\n  color: black;\n  white-space: nowrap;\n  padding: 0 4px 0 1px;\n  margin: 0;\n  vertical-align: top;\n}\n.jstree-anchor:focus {\n  outline: 0;\n}\n.jstree-anchor,\n.jstree-anchor:link,\n.jstree-anchor:visited,\n.jstree-anchor:hover,\n.jstree-anchor:active {\n  text-decoration: none;\n  color: inherit;\n}\n.jstree-icon {\n  display: inline-block;\n  text-decoration: none;\n  margin: 0;\n  padding: 0;\n  vertical-align: top;\n  text-align: center;\n}\n.jstree-icon:empty {\n  display: inline-block;\n  text-decoration: none;\n  margin: 0;\n  padding: 0;\n  vertical-align: top;\n  text-align: center;\n}\n.jstree-ocl {\n  cursor: pointer;\n}\n.jstree-leaf > .jstree-ocl {\n  cursor: default;\n}\n.jstree .jstree-open > .jstree-children {\n  display: block;\n}\n.jstree .jstree-closed > .jstree-children,\n.jstree .jstree-leaf > .jstree-children {\n  display: none;\n}\n.jstree-anchor > .jstree-themeicon {\n  margin-right: 2px;\n}\n.jstree-no-icons .jstree-themeicon,\n.jstree-anchor > .jstree-themeicon-hidden {\n  display: none;\n}\n.jstree-hidden,\n.jstree-node.jstree-hidden {\n  display: none;\n}\n.jstree-rtl .jstree-anchor {\n  padding: 0 1px 0 4px;\n}\n.jstree-rtl .jstree-anchor > .jstree-themeicon {\n  margin-left: 2px;\n  margin-right: 0;\n}\n.jstree-rtl .jstree-node {\n  margin-left: 0;\n}\n.jstree-rtl .jstree-container-ul > .jstree-node {\n  margin-right: 0;\n}\n.jstree-wholerow-ul {\n  position: relative;\n  display: inline-block;\n  width: 100%;\n}\n.jstree-wholerow-ul .jstree-leaf > .jstree-ocl {\n  cursor: pointer;\n}\n.jstree-wholerow-ul .jstree-anchor,\n.jstree-wholerow-ul .jstree-icon {\n  position: relative;\n}\n.jstree-wholerow-ul .jstree-wholerow {\n  width: 100%;\n  cursor: pointer;\n  position: absolute;\n  left: 0;\n  -webkit-user-select: none;\n  -moz-user-select: none;\n  -ms-user-select: none;\n  user-select: none;\n}\n.jstree-contextmenu .jstree-anchor {\n  -webkit-user-select: none;\n  /* disable selection/Copy of UIWebView */\n  -webkit-touch-callout: none;\n  /* disable the IOS popup when long-press on a link */\n}\n.vakata-context {\n  display: none;\n}\n.vakata-context,\n.vakata-context ul {\n  margin: 0;\n  padding: 2px;\n  position: absolute;\n  background: #f5f5f5;\n  border: 1px solid #979797;\n  box-shadow: 2px 2px 2px #999999;\n}\n.vakata-context ul {\n  list-style: none;\n  left: 100%;\n  margin-top: -2.7em;\n  margin-left: -4px;\n}\n.vakata-context .vakata-context-right ul {\n  left: auto;\n  right: 100%;\n  margin-left: auto;\n  margin-right: -4px;\n}\n.vakata-context li {\n  list-style: none;\n}\n.vakata-context li > a {\n  display: block;\n  padding: 0 2em 0 2em;\n  text-decoration: none;\n  width: auto;\n  color: black;\n  white-space: nowrap;\n  line-height: 2.4em;\n  text-shadow: 1px 1px 0 white;\n  border-radius: 1px;\n}\n.vakata-context li > a:hover {\n  position: relative;\n  background-color: #e8eff7;\n  box-shadow: 0 0 2px #0a6aa1;\n}\n.vakata-context li > a.vakata-context-parent {\n  background-image: url(\"data:image/gif;base64,R0lGODlhCwAHAIAAACgoKP///yH5BAEAAAEALAAAAAALAAcAAAIORI4JlrqN1oMSnmmZDQUAOw==\");\n  background-position: right center;\n  background-repeat: no-repeat;\n}\n.vakata-context li > a:focus {\n  outline: 0;\n}\n.vakata-context .vakata-context-hover > a {\n  position: relative;\n  background-color: #e8eff7;\n  box-shadow: 0 0 2px #0a6aa1;\n}\n.vakata-context .vakata-context-separator > a,\n.vakata-context .vakata-context-separator > a:hover {\n  background: white;\n  border: 0;\n  border-top: 1px solid #e2e3e3;\n  height: 1px;\n  min-height: 1px;\n  max-height: 1px;\n  padding: 0;\n  margin: 0 0 0 2.4em;\n  border-left: 1px solid #e0e0e0;\n  text-shadow: 0 0 0 transparent;\n  box-shadow: 0 0 0 transparent;\n  border-radius: 0;\n}\n.vakata-context .vakata-contextmenu-disabled a,\n.vakata-context .vakata-contextmenu-disabled a:hover {\n  color: silver;\n  background-color: transparent;\n  border: 0;\n  box-shadow: 0 0 0;\n}\n.vakata-context li > a > i {\n  text-decoration: none;\n  display: inline-block;\n  width: 2.4em;\n  height: 2.4em;\n  background: transparent;\n  margin: 0 0 0 -2em;\n  vertical-align: top;\n  text-align: center;\n  line-height: 2.4em;\n}\n.vakata-context li > a > i:empty {\n  width: 2.4em;\n  line-height: 2.4em;\n}\n.vakata-context li > a .vakata-contextmenu-sep {\n  display: inline-block;\n  width: 1px;\n  height: 2.4em;\n  background: white;\n  margin: 0 0.5em 0 0;\n  border-left: 1px solid #e2e3e3;\n}\n.vakata-context .vakata-contextmenu-shortcut {\n  font-size: 0.8em;\n  color: silver;\n  opacity: 0.5;\n  display: none;\n}\n.vakata-context-rtl ul {\n  left: auto;\n  right: 100%;\n  margin-left: auto;\n  margin-right: -4px;\n}\n.vakata-context-rtl li > a.vakata-context-parent {\n  background-image: url(\"data:image/gif;base64,R0lGODlhCwAHAIAAACgoKP///yH5BAEAAAEALAAAAAALAAcAAAINjI+AC7rWHIsPtmoxLAA7\");\n  background-position: left center;\n  background-repeat: no-repeat;\n}\n.vakata-context-rtl .vakata-context-separator > a {\n  margin: 0 2.4em 0 0;\n  border-left: 0;\n  border-right: 1px solid #e2e3e3;\n}\n.vakata-context-rtl .vakata-context-left ul {\n  right: auto;\n  left: 100%;\n  margin-left: -4px;\n  margin-right: auto;\n}\n.vakata-context-rtl li > a > i {\n  margin: 0 -2em 0 0;\n}\n.vakata-context-rtl li > a .vakata-contextmenu-sep {\n  margin: 0 0 0 0.5em;\n  border-left-color: white;\n  background: #e2e3e3;\n}\n#jstree-marker {\n  position: absolute;\n  top: 0;\n  left: 0;\n  margin: -5px 0 0 0;\n  padding: 0;\n  border-right: 0;\n  border-top: 5px solid transparent;\n  border-bottom: 5px solid transparent;\n  border-left: 5px solid;\n  width: 0;\n  height: 0;\n  font-size: 0;\n  line-height: 0;\n}\n#jstree-dnd {\n  line-height: 16px;\n  margin: 0;\n  padding: 4px;\n}\n#jstree-dnd .jstree-icon,\n#jstree-dnd .jstree-copy {\n  display: inline-block;\n  text-decoration: none;\n  margin: 0 2px 0 0;\n  padding: 0;\n  width: 16px;\n  height: 16px;\n}\n#jstree-dnd .jstree-ok {\n  background: green;\n}\n#jstree-dnd .jstree-er {\n  background: red;\n}\n#jstree-dnd .jstree-copy {\n  margin: 0 2px 0 2px;\n}\n.jstree-default .jstree-node,\n.jstree-default .jstree-icon {\n  background-repeat: no-repeat;\n  background-color: transparent;\n}\n.jstree-default .jstree-anchor,\n.jstree-default .jstree-animated,\n.jstree-default .jstree-wholerow {\n  transition: background-color 0.15s, box-shadow 0.15s;\n}\n.jstree-default .jstree-hovered {\n  background: #e7f4f9;\n  border-radius: 2px;\n  box-shadow: inset 0 0 1px #cccccc;\n}\n.jstree-default .jstree-context {\n  background: #e7f4f9;\n  border-radius: 2px;\n  box-shadow: inset 0 0 1px #cccccc;\n}\n.jstree-default .jstree-clicked {\n  background: #beebff;\n  border-radius: 2px;\n  box-shadow: inset 0 0 1px #999999;\n}\n.jstree-default .jstree-no-icons .jstree-anchor > .jstree-themeicon {\n  display: none;\n}\n.jstree-default .jstree-disabled {\n  background: transparent;\n  color: #666666;\n}\n.jstree-default .jstree-disabled.jstree-hovered {\n  background: transparent;\n  box-shadow: none;\n}\n.jstree-default .jstree-disabled.jstree-clicked {\n  background: #efefef;\n}\n.jstree-default .jstree-disabled > .jstree-icon {\n  opacity: 0.8;\n  filter: url(\"data:image/svg+xml;utf8,<svg xmlns=\\'http://www.w3.org/2000/svg\\'><filter id=\\'jstree-grayscale\\'><feColorMatrix type=\\'matrix\\' values=\\'0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0\\'/></filter></svg>#jstree-grayscale\");\n  /* Firefox 10+ */\n  filter: gray;\n  /* IE6-9 */\n  -webkit-filter: grayscale(100%);\n  /* Chrome 19+ & Safari 6+ */\n}\n.jstree-default .jstree-search {\n  font-style: italic;\n  color: #8b0000;\n  font-weight: bold;\n}\n.jstree-default .jstree-no-checkboxes .jstree-checkbox {\n  display: none !important;\n}\n.jstree-default.jstree-checkbox-no-clicked .jstree-clicked {\n  background: transparent;\n  box-shadow: none;\n}\n.jstree-default.jstree-checkbox-no-clicked .jstree-clicked.jstree-hovered {\n  background: #e7f4f9;\n}\n.jstree-default.jstree-checkbox-no-clicked > .jstree-wholerow-ul .jstree-wholerow-clicked {\n  background: transparent;\n}\n.jstree-default.jstree-checkbox-no-clicked > .jstree-wholerow-ul .jstree-wholerow-clicked.jstree-wholerow-hovered {\n  background: #e7f4f9;\n}\n.jstree-default > .jstree-striped {\n  min-width: 100%;\n  display: inline-block;\n  background: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAkCAMAAAB/qqA+AAAABlBMVEUAAAAAAAClZ7nPAAAAAnRSTlMNAMM9s3UAAAAXSURBVHjajcEBAQAAAIKg/H/aCQZ70AUBjAATb6YPDgAAAABJRU5ErkJggg==\") left top repeat;\n}\n.jstree-default > .jstree-wholerow-ul .jstree-hovered,\n.jstree-default > .jstree-wholerow-ul .jstree-clicked {\n  background: transparent;\n  box-shadow: none;\n  border-radius: 0;\n}\n.jstree-default .jstree-wholerow {\n  -moz-box-sizing: border-box;\n  -webkit-box-sizing: border-box;\n  box-sizing: border-box;\n}\n.jstree-default .jstree-wholerow-hovered {\n  background: #e7f4f9;\n}\n.jstree-default .jstree-wholerow-clicked {\n  background: #beebff;\n  background: -webkit-linear-gradient(top, #beebff 0%, #a8e4ff 100%);\n  background: linear-gradient(to bottom, #beebff 0%, #a8e4ff 100%);\n}\n.jstree-default .jstree-node {\n  min-height: 24px;\n  line-height: 24px;\n  margin-left: 24px;\n  min-width: 24px;\n}\n.jstree-default .jstree-anchor {\n  line-height: 24px;\n  height: 24px;\n}\n.jstree-default .jstree-icon {\n  width: 24px;\n  height: 24px;\n  line-height: 24px;\n}\n.jstree-default .jstree-icon:empty {\n  width: 24px;\n  height: 24px;\n  line-height: 24px;\n}\n.jstree-default.jstree-rtl .jstree-node {\n  margin-right: 24px;\n}\n.jstree-default .jstree-wholerow {\n  height: 24px;\n}\n.jstree-default .jstree-node,\n.jstree-default .jstree-icon {\n  background-image: url(\"32px.png\");\n}\n.jstree-default .jstree-node {\n  background-position: -292px -4px;\n  background-repeat: repeat-y;\n}\n.jstree-default .jstree-last {\n  background: transparent;\n}\n.jstree-default .jstree-open > .jstree-ocl {\n  background-position: -132px -4px;\n}\n.jstree-default .jstree-closed > .jstree-ocl {\n  background-position: -100px -4px;\n}\n.jstree-default .jstree-leaf > .jstree-ocl {\n  background-position: -68px -4px;\n}\n.jstree-default .jstree-themeicon {\n  background-position: -260px -4px;\n}\n.jstree-default > .jstree-no-dots .jstree-node,\n.jstree-default > .jstree-no-dots .jstree-leaf > .jstree-ocl {\n  background: transparent;\n}\n.jstree-default > .jstree-no-dots .jstree-open > .jstree-ocl {\n  background-position: -36px -4px;\n}\n.jstree-default > .jstree-no-dots .jstree-closed > .jstree-ocl {\n  background-position: -4px -4px;\n}\n.jstree-default .jstree-disabled {\n  background: transparent;\n}\n.jstree-default .jstree-disabled.jstree-hovered {\n  background: transparent;\n}\n.jstree-default .jstree-disabled.jstree-clicked {\n  background: #efefef;\n}\n.jstree-default .jstree-checkbox {\n  background-position: -164px -4px;\n}\n.jstree-default .jstree-checkbox:hover {\n  background-position: -164px -36px;\n}\n.jstree-default.jstree-checkbox-selection .jstree-clicked > .jstree-checkbox,\n.jstree-default .jstree-checked > .jstree-checkbox {\n  background-position: -228px -4px;\n}\n.jstree-default.jstree-checkbox-selection .jstree-clicked > .jstree-checkbox:hover,\n.jstree-default .jstree-checked > .jstree-checkbox:hover {\n  background-position: -228px -36px;\n}\n.jstree-default .jstree-anchor > .jstree-undetermined {\n  background-position: -196px -4px;\n}\n.jstree-default .jstree-anchor > .jstree-undetermined:hover {\n  background-position: -196px -36px;\n}\n.jstree-default .jstree-checkbox-disabled {\n  opacity: 0.8;\n  filter: url(\"data:image/svg+xml;utf8,<svg xmlns=\\'http://www.w3.org/2000/svg\\'><filter id=\\'jstree-grayscale\\'><feColorMatrix type=\\'matrix\\' values=\\'0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0\\'/></filter></svg>#jstree-grayscale\");\n  /* Firefox 10+ */\n  filter: gray;\n  /* IE6-9 */\n  -webkit-filter: grayscale(100%);\n  /* Chrome 19+ & Safari 6+ */\n}\n.jstree-default > .jstree-striped {\n  background-size: auto 48px;\n}\n.jstree-default.jstree-rtl .jstree-node {\n  background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAACAQMAAAB49I5GAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMOBgAAGAAJMwQHdQAAAABJRU5ErkJggg==\");\n  background-position: 100% 1px;\n  background-repeat: repeat-y;\n}\n.jstree-default.jstree-rtl .jstree-last {\n  background: transparent;\n}\n.jstree-default.jstree-rtl .jstree-open > .jstree-ocl {\n  background-position: -132px -36px;\n}\n.jstree-default.jstree-rtl .jstree-closed > .jstree-ocl {\n  background-position: -100px -36px;\n}\n.jstree-default.jstree-rtl .jstree-leaf > .jstree-ocl {\n  background-position: -68px -36px;\n}\n.jstree-default.jstree-rtl > .jstree-no-dots .jstree-node,\n.jstree-default.jstree-rtl > .jstree-no-dots .jstree-leaf > .jstree-ocl {\n  background: transparent;\n}\n.jstree-default.jstree-rtl > .jstree-no-dots .jstree-open > .jstree-ocl {\n  background-position: -36px -36px;\n}\n.jstree-default.jstree-rtl > .jstree-no-dots .jstree-closed > .jstree-ocl {\n  background-position: -4px -36px;\n}\n.jstree-default .jstree-themeicon-custom {\n  background-color: transparent;\n  background-image: none;\n  background-position: 0 0;\n}\n.jstree-default > .jstree-container-ul .jstree-loading > .jstree-ocl {\n  background: url(\"throbber.gif\") center center no-repeat;\n}\n.jstree-default .jstree-file {\n  background: url(\"32px.png\") -100px -68px no-repeat;\n}\n.jstree-default .jstree-folder {\n  background: url(\"32px.png\") -260px -4px no-repeat;\n}\n.jstree-default > .jstree-container-ul > .jstree-node {\n  margin-left: 0;\n  margin-right: 0;\n}\n#jstree-dnd.jstree-default {\n  line-height: 24px;\n  padding: 0 4px;\n}\n#jstree-dnd.jstree-default .jstree-ok,\n#jstree-dnd.jstree-default .jstree-er {\n  background-image: url(\"32px.png\");\n  background-repeat: no-repeat;\n  background-color: transparent;\n}\n#jstree-dnd.jstree-default i {\n  background: transparent;\n  width: 24px;\n  height: 24px;\n  line-height: 24px;\n}\n#jstree-dnd.jstree-default .jstree-ok {\n  background-position: -4px -68px;\n}\n#jstree-dnd.jstree-default .jstree-er {\n  background-position: -36px -68px;\n}\n.jstree-default .jstree-ellipsis {\n  overflow: hidden;\n}\n.jstree-default .jstree-ellipsis .jstree-anchor {\n  width: calc(100% - 29px);\n  text-overflow: ellipsis;\n  overflow: hidden;\n}\n.jstree-default .jstree-ellipsis.jstree-no-icons .jstree-anchor {\n  width: calc(100% - 5px);\n}\n.jstree-default.jstree-rtl .jstree-node {\n  background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAACAQMAAAB49I5GAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMOBgAAGAAJMwQHdQAAAABJRU5ErkJggg==\");\n}\n.jstree-default.jstree-rtl .jstree-last {\n  background: transparent;\n}\n.jstree-default-small .jstree-node {\n  min-height: 18px;\n  line-height: 18px;\n  margin-left: 18px;\n  min-width: 18px;\n}\n.jstree-default-small .jstree-anchor {\n  line-height: 18px;\n  height: 18px;\n}\n.jstree-default-small .jstree-icon {\n  width: 18px;\n  height: 18px;\n  line-height: 18px;\n}\n.jstree-default-small .jstree-icon:empty {\n  width: 18px;\n  height: 18px;\n  line-height: 18px;\n}\n.jstree-default-small.jstree-rtl .jstree-node {\n  margin-right: 18px;\n}\n.jstree-default-small .jstree-wholerow {\n  height: 18px;\n}\n.jstree-default-small .jstree-node,\n.jstree-default-small .jstree-icon {\n  background-image: url(\"32px.png\");\n}\n.jstree-default-small .jstree-node {\n  background-position: -295px -7px;\n  background-repeat: repeat-y;\n}\n.jstree-default-small .jstree-last {\n  background: transparent;\n}\n.jstree-default-small .jstree-open > .jstree-ocl {\n  background-position: -135px -7px;\n}\n.jstree-default-small .jstree-closed > .jstree-ocl {\n  background-position: -103px -7px;\n}\n.jstree-default-small .jstree-leaf > .jstree-ocl {\n  background-position: -71px -7px;\n}\n.jstree-default-small .jstree-themeicon {\n  background-position: -263px -7px;\n}\n.jstree-default-small > .jstree-no-dots .jstree-node,\n.jstree-default-small > .jstree-no-dots .jstree-leaf > .jstree-ocl {\n  background: transparent;\n}\n.jstree-default-small > .jstree-no-dots .jstree-open > .jstree-ocl {\n  background-position: -39px -7px;\n}\n.jstree-default-small > .jstree-no-dots .jstree-closed > .jstree-ocl {\n  background-position: -7px -7px;\n}\n.jstree-default-small .jstree-disabled {\n  background: transparent;\n}\n.jstree-default-small .jstree-disabled.jstree-hovered {\n  background: transparent;\n}\n.jstree-default-small .jstree-disabled.jstree-clicked {\n  background: #efefef;\n}\n.jstree-default-small .jstree-checkbox {\n  background-position: -167px -7px;\n}\n.jstree-default-small .jstree-checkbox:hover {\n  background-position: -167px -39px;\n}\n.jstree-default-small.jstree-checkbox-selection .jstree-clicked > .jstree-checkbox,\n.jstree-default-small .jstree-checked > .jstree-checkbox {\n  background-position: -231px -7px;\n}\n.jstree-default-small.jstree-checkbox-selection .jstree-clicked > .jstree-checkbox:hover,\n.jstree-default-small .jstree-checked > .jstree-checkbox:hover {\n  background-position: -231px -39px;\n}\n.jstree-default-small .jstree-anchor > .jstree-undetermined {\n  background-position: -199px -7px;\n}\n.jstree-default-small .jstree-anchor > .jstree-undetermined:hover {\n  background-position: -199px -39px;\n}\n.jstree-default-small .jstree-checkbox-disabled {\n  opacity: 0.8;\n  filter: url(\"data:image/svg+xml;utf8,<svg xmlns=\\'http://www.w3.org/2000/svg\\'><filter id=\\'jstree-grayscale\\'><feColorMatrix type=\\'matrix\\' values=\\'0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0\\'/></filter></svg>#jstree-grayscale\");\n  /* Firefox 10+ */\n  filter: gray;\n  /* IE6-9 */\n  -webkit-filter: grayscale(100%);\n  /* Chrome 19+ & Safari 6+ */\n}\n.jstree-default-small > .jstree-striped {\n  background-size: auto 36px;\n}\n.jstree-default-small.jstree-rtl .jstree-node {\n  background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAACAQMAAAB49I5GAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMOBgAAGAAJMwQHdQAAAABJRU5ErkJggg==\");\n  background-position: 100% 1px;\n  background-repeat: repeat-y;\n}\n.jstree-default-small.jstree-rtl .jstree-last {\n  background: transparent;\n}\n.jstree-default-small.jstree-rtl .jstree-open > .jstree-ocl {\n  background-position: -135px -39px;\n}\n.jstree-default-small.jstree-rtl .jstree-closed > .jstree-ocl {\n  background-position: -103px -39px;\n}\n.jstree-default-small.jstree-rtl .jstree-leaf > .jstree-ocl {\n  background-position: -71px -39px;\n}\n.jstree-default-small.jstree-rtl > .jstree-no-dots .jstree-node,\n.jstree-default-small.jstree-rtl > .jstree-no-dots .jstree-leaf > .jstree-ocl {\n  background: transparent;\n}\n.jstree-default-small.jstree-rtl > .jstree-no-dots .jstree-open > .jstree-ocl {\n  background-position: -39px -39px;\n}\n.jstree-default-small.jstree-rtl > .jstree-no-dots .jstree-closed > .jstree-ocl {\n  background-position: -7px -39px;\n}\n.jstree-default-small .jstree-themeicon-custom {\n  background-color: transparent;\n  background-image: none;\n  background-position: 0 0;\n}\n.jstree-default-small > .jstree-container-ul .jstree-loading > .jstree-ocl {\n  background: url(\"throbber.gif\") center center no-repeat;\n}\n.jstree-default-small .jstree-file {\n  background: url(\"32px.png\") -103px -71px no-repeat;\n}\n.jstree-default-small .jstree-folder {\n  background: url(\"32px.png\") -263px -7px no-repeat;\n}\n.jstree-default-small > .jstree-container-ul > .jstree-node {\n  margin-left: 0;\n  margin-right: 0;\n}\n#jstree-dnd.jstree-default-small {\n  line-height: 18px;\n  padding: 0 4px;\n}\n#jstree-dnd.jstree-default-small .jstree-ok,\n#jstree-dnd.jstree-default-small .jstree-er {\n  background-image: url(\"32px.png\");\n  background-repeat: no-repeat;\n  background-color: transparent;\n}\n#jstree-dnd.jstree-default-small i {\n  background: transparent;\n  width: 18px;\n  height: 18px;\n  line-height: 18px;\n}\n#jstree-dnd.jstree-default-small .jstree-ok {\n  background-position: -7px -71px;\n}\n#jstree-dnd.jstree-default-small .jstree-er {\n  background-position: -39px -71px;\n}\n.jstree-default-small .jstree-ellipsis {\n  overflow: hidden;\n}\n.jstree-default-small .jstree-ellipsis .jstree-anchor {\n  width: calc(100% - 23px);\n  text-overflow: ellipsis;\n  overflow: hidden;\n}\n.jstree-default-small .jstree-ellipsis.jstree-no-icons .jstree-anchor {\n  width: calc(100% - 5px);\n}\n.jstree-default-small.jstree-rtl .jstree-node {\n  background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAACAQMAAABv1h6PAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMHBgAAiABBI4gz9AAAAABJRU5ErkJggg==\");\n}\n.jstree-default-small.jstree-rtl .jstree-last {\n  background: transparent;\n}\n.jstree-default-large .jstree-node {\n  min-height: 32px;\n  line-height: 32px;\n  margin-left: 32px;\n  min-width: 32px;\n}\n.jstree-default-large .jstree-anchor {\n  line-height: 32px;\n  height: 32px;\n}\n.jstree-default-large .jstree-icon {\n  width: 32px;\n  height: 32px;\n  line-height: 32px;\n}\n.jstree-default-large .jstree-icon:empty {\n  width: 32px;\n  height: 32px;\n  line-height: 32px;\n}\n.jstree-default-large.jstree-rtl .jstree-node {\n  margin-right: 32px;\n}\n.jstree-default-large .jstree-wholerow {\n  height: 32px;\n}\n.jstree-default-large .jstree-node,\n.jstree-default-large .jstree-icon {\n  background-image: url(\"32px.png\");\n}\n.jstree-default-large .jstree-node {\n  background-position: -288px 0px;\n  background-repeat: repeat-y;\n}\n.jstree-default-large .jstree-last {\n  background: transparent;\n}\n.jstree-default-large .jstree-open > .jstree-ocl {\n  background-position: -128px 0px;\n}\n.jstree-default-large .jstree-closed > .jstree-ocl {\n  background-position: -96px 0px;\n}\n.jstree-default-large .jstree-leaf > .jstree-ocl {\n  background-position: -64px 0px;\n}\n.jstree-default-large .jstree-themeicon {\n  background-position: -256px 0px;\n}\n.jstree-default-large > .jstree-no-dots .jstree-node,\n.jstree-default-large > .jstree-no-dots .jstree-leaf > .jstree-ocl {\n  background: transparent;\n}\n.jstree-default-large > .jstree-no-dots .jstree-open > .jstree-ocl {\n  background-position: -32px 0px;\n}\n.jstree-default-large > .jstree-no-dots .jstree-closed > .jstree-ocl {\n  background-position: 0px 0px;\n}\n.jstree-default-large .jstree-disabled {\n  background: transparent;\n}\n.jstree-default-large .jstree-disabled.jstree-hovered {\n  background: transparent;\n}\n.jstree-default-large .jstree-disabled.jstree-clicked {\n  background: #efefef;\n}\n.jstree-default-large .jstree-checkbox {\n  background-position: -160px 0px;\n}\n.jstree-default-large .jstree-checkbox:hover {\n  background-position: -160px -32px;\n}\n.jstree-default-large.jstree-checkbox-selection .jstree-clicked > .jstree-checkbox,\n.jstree-default-large .jstree-checked > .jstree-checkbox {\n  background-position: -224px 0px;\n}\n.jstree-default-large.jstree-checkbox-selection .jstree-clicked > .jstree-checkbox:hover,\n.jstree-default-large .jstree-checked > .jstree-checkbox:hover {\n  background-position: -224px -32px;\n}\n.jstree-default-large .jstree-anchor > .jstree-undetermined {\n  background-position: -192px 0px;\n}\n.jstree-default-large .jstree-anchor > .jstree-undetermined:hover {\n  background-position: -192px -32px;\n}\n.jstree-default-large .jstree-checkbox-disabled {\n  opacity: 0.8;\n  filter: url(\"data:image/svg+xml;utf8,<svg xmlns=\\'http://www.w3.org/2000/svg\\'><filter id=\\'jstree-grayscale\\'><feColorMatrix type=\\'matrix\\' values=\\'0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0\\'/></filter></svg>#jstree-grayscale\");\n  /* Firefox 10+ */\n  filter: gray;\n  /* IE6-9 */\n  -webkit-filter: grayscale(100%);\n  /* Chrome 19+ & Safari 6+ */\n}\n.jstree-default-large > .jstree-striped {\n  background-size: auto 64px;\n}\n.jstree-default-large.jstree-rtl .jstree-node {\n  background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAACAQMAAAB49I5GAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMOBgAAGAAJMwQHdQAAAABJRU5ErkJggg==\");\n  background-position: 100% 1px;\n  background-repeat: repeat-y;\n}\n.jstree-default-large.jstree-rtl .jstree-last {\n  background: transparent;\n}\n.jstree-default-large.jstree-rtl .jstree-open > .jstree-ocl {\n  background-position: -128px -32px;\n}\n.jstree-default-large.jstree-rtl .jstree-closed > .jstree-ocl {\n  background-position: -96px -32px;\n}\n.jstree-default-large.jstree-rtl .jstree-leaf > .jstree-ocl {\n  background-position: -64px -32px;\n}\n.jstree-default-large.jstree-rtl > .jstree-no-dots .jstree-node,\n.jstree-default-large.jstree-rtl > .jstree-no-dots .jstree-leaf > .jstree-ocl {\n  background: transparent;\n}\n.jstree-default-large.jstree-rtl > .jstree-no-dots .jstree-open > .jstree-ocl {\n  background-position: -32px -32px;\n}\n.jstree-default-large.jstree-rtl > .jstree-no-dots .jstree-closed > .jstree-ocl {\n  background-position: 0px -32px;\n}\n.jstree-default-large .jstree-themeicon-custom {\n  background-color: transparent;\n  background-image: none;\n  background-position: 0 0;\n}\n.jstree-default-large > .jstree-container-ul .jstree-loading > .jstree-ocl {\n  background: url(\"throbber.gif\") center center no-repeat;\n}\n.jstree-default-large .jstree-file {\n  background: url(\"32px.png\") -96px -64px no-repeat;\n}\n.jstree-default-large .jstree-folder {\n  background: url(\"32px.png\") -256px 0px no-repeat;\n}\n.jstree-default-large > .jstree-container-ul > .jstree-node {\n  margin-left: 0;\n  margin-right: 0;\n}\n#jstree-dnd.jstree-default-large {\n  line-height: 32px;\n  padding: 0 4px;\n}\n#jstree-dnd.jstree-default-large .jstree-ok,\n#jstree-dnd.jstree-default-large .jstree-er {\n  background-image: url(\"32px.png\");\n  background-repeat: no-repeat;\n  background-color: transparent;\n}\n#jstree-dnd.jstree-default-large i {\n  background: transparent;\n  width: 32px;\n  height: 32px;\n  line-height: 32px;\n}\n#jstree-dnd.jstree-default-large .jstree-ok {\n  background-position: 0px -64px;\n}\n#jstree-dnd.jstree-default-large .jstree-er {\n  background-position: -32px -64px;\n}\n.jstree-default-large .jstree-ellipsis {\n  overflow: hidden;\n}\n.jstree-default-large .jstree-ellipsis .jstree-anchor {\n  width: calc(100% - 37px);\n  text-overflow: ellipsis;\n  overflow: hidden;\n}\n.jstree-default-large .jstree-ellipsis.jstree-no-icons .jstree-anchor {\n  width: calc(100% - 5px);\n}\n.jstree-default-large.jstree-rtl .jstree-node {\n  background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAACAQMAAAAD0EyKAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjgIIGBgABCgCBvVLXcAAAAABJRU5ErkJggg==\");\n}\n.jstree-default-large.jstree-rtl .jstree-last {\n  background: transparent;\n}\n@media (max-width: 768px) {\n  #jstree-dnd.jstree-dnd-responsive {\n    line-height: 40px;\n    font-weight: bold;\n    font-size: 1.1em;\n    text-shadow: 1px 1px white;\n  }\n  #jstree-dnd.jstree-dnd-responsive > i {\n    background: transparent;\n    width: 40px;\n    height: 40px;\n  }\n  #jstree-dnd.jstree-dnd-responsive > .jstree-ok {\n    background-image: url(\"40px.png\");\n    background-position: 0 -200px;\n    background-size: 120px 240px;\n  }\n  #jstree-dnd.jstree-dnd-responsive > .jstree-er {\n    background-image: url(\"40px.png\");\n    background-position: -40px -200px;\n    background-size: 120px 240px;\n  }\n  #jstree-marker.jstree-dnd-responsive {\n    border-left-width: 10px;\n    border-top-width: 10px;\n    border-bottom-width: 10px;\n    margin-top: -10px;\n  }\n}\n@media (max-width: 768px) {\n  .jstree-default-responsive {\n    /*\n\t.jstree-open > .jstree-ocl,\n\t.jstree-closed > .jstree-ocl { border-radius:20px; background-color:white; }\n\t*/\n  }\n  .jstree-default-responsive .jstree-icon {\n    background-image: url(\"40px.png\");\n  }\n  .jstree-default-responsive .jstree-node,\n  .jstree-default-responsive .jstree-leaf > .jstree-ocl {\n    background: transparent;\n  }\n  .jstree-default-responsive .jstree-node {\n    min-height: 40px;\n    line-height: 40px;\n    margin-left: 40px;\n    min-width: 40px;\n    white-space: nowrap;\n  }\n  .jstree-default-responsive .jstree-anchor {\n    line-height: 40px;\n    height: 40px;\n  }\n  .jstree-default-responsive .jstree-icon,\n  .jstree-default-responsive .jstree-icon:empty {\n    width: 40px;\n    height: 40px;\n    line-height: 40px;\n  }\n  .jstree-default-responsive > .jstree-container-ul > .jstree-node {\n    margin-left: 0;\n  }\n  .jstree-default-responsive.jstree-rtl .jstree-node {\n    margin-left: 0;\n    margin-right: 40px;\n    background: transparent;\n  }\n  .jstree-default-responsive.jstree-rtl .jstree-container-ul > .jstree-node {\n    margin-right: 0;\n  }\n  .jstree-default-responsive .jstree-ocl,\n  .jstree-default-responsive .jstree-themeicon,\n  .jstree-default-responsive .jstree-checkbox {\n    background-size: 120px 240px;\n  }\n  .jstree-default-responsive .jstree-leaf > .jstree-ocl,\n  .jstree-default-responsive.jstree-rtl .jstree-leaf > .jstree-ocl {\n    background: transparent;\n  }\n  .jstree-default-responsive .jstree-open > .jstree-ocl {\n    background-position: 0 0px !important;\n  }\n  .jstree-default-responsive .jstree-closed > .jstree-ocl {\n    background-position: 0 -40px !important;\n  }\n  .jstree-default-responsive.jstree-rtl .jstree-closed > .jstree-ocl {\n    background-position: -40px 0px !important;\n  }\n  .jstree-default-responsive .jstree-themeicon {\n    background-position: -40px -40px;\n  }\n  .jstree-default-responsive .jstree-checkbox,\n  .jstree-default-responsive .jstree-checkbox:hover {\n    background-position: -40px -80px;\n  }\n  .jstree-default-responsive.jstree-checkbox-selection .jstree-clicked > .jstree-checkbox,\n  .jstree-default-responsive.jstree-checkbox-selection .jstree-clicked > .jstree-checkbox:hover,\n  .jstree-default-responsive .jstree-checked > .jstree-checkbox,\n  .jstree-default-responsive .jstree-checked > .jstree-checkbox:hover {\n    background-position: 0 -80px;\n  }\n  .jstree-default-responsive .jstree-anchor > .jstree-undetermined,\n  .jstree-default-responsive .jstree-anchor > .jstree-undetermined:hover {\n    background-position: 0 -120px;\n  }\n  .jstree-default-responsive .jstree-anchor {\n    font-weight: bold;\n    font-size: 1.1em;\n    text-shadow: 1px 1px white;\n  }\n  .jstree-default-responsive > .jstree-striped {\n    background: transparent;\n  }\n  .jstree-default-responsive .jstree-wholerow {\n    border-top: 1px solid rgba(255, 255, 255, 0.7);\n    border-bottom: 1px solid rgba(64, 64, 64, 0.2);\n    background: #ebebeb;\n    height: 40px;\n  }\n  .jstree-default-responsive .jstree-wholerow-hovered {\n    background: #e7f4f9;\n  }\n  .jstree-default-responsive .jstree-wholerow-clicked {\n    background: #beebff;\n  }\n  .jstree-default-responsive .jstree-children .jstree-last > .jstree-wholerow {\n    box-shadow: inset 0 -6px 3px -5px #666666;\n  }\n  .jstree-default-responsive .jstree-children .jstree-open > .jstree-wholerow {\n    box-shadow: inset 0 6px 3px -5px #666666;\n    border-top: 0;\n  }\n  .jstree-default-responsive .jstree-children .jstree-open + .jstree-open {\n    box-shadow: none;\n  }\n  .jstree-default-responsive .jstree-node,\n  .jstree-default-responsive .jstree-icon,\n  .jstree-default-responsive .jstree-node > .jstree-ocl,\n  .jstree-default-responsive .jstree-themeicon,\n  .jstree-default-responsive .jstree-checkbox {\n    background-image: url(\"40px.png\");\n    background-size: 120px 240px;\n  }\n  .jstree-default-responsive .jstree-node {\n    background-position: -80px 0;\n    background-repeat: repeat-y;\n  }\n  .jstree-default-responsive .jstree-last {\n    background: transparent;\n  }\n  .jstree-default-responsive .jstree-leaf > .jstree-ocl {\n    background-position: -40px -120px;\n  }\n  .jstree-default-responsive .jstree-last > .jstree-ocl {\n    background-position: -40px -160px;\n  }\n  .jstree-default-responsive .jstree-themeicon-custom {\n    background-color: transparent;\n    background-image: none;\n    background-position: 0 0;\n  }\n  .jstree-default-responsive .jstree-file {\n    background: url(\"40px.png\") 0 -160px no-repeat;\n    background-size: 120px 240px;\n  }\n  .jstree-default-responsive .jstree-folder {\n    background: url(\"40px.png\") -40px -40px no-repeat;\n    background-size: 120px 240px;\n  }\n  .jstree-default-responsive > .jstree-container-ul > .jstree-node {\n    margin-left: 0;\n    margin-right: 0;\n  }\n}\n"
  },
  {
    "path": "static/jstree/3.3.4/themes/default-dark/style.css",
    "content": "/* jsTree default dark theme */\n.jstree-node,\n.jstree-children,\n.jstree-container-ul {\n  display: block;\n  margin: 0;\n  padding: 0;\n  list-style-type: none;\n  list-style-image: none;\n}\n.jstree-node {\n  white-space: nowrap;\n}\n.jstree-anchor {\n  display: inline-block;\n  color: black;\n  white-space: nowrap;\n  padding: 0 4px 0 1px;\n  margin: 0;\n  vertical-align: top;\n}\n.jstree-anchor:focus {\n  outline: 0;\n}\n.jstree-anchor,\n.jstree-anchor:link,\n.jstree-anchor:visited,\n.jstree-anchor:hover,\n.jstree-anchor:active {\n  text-decoration: none;\n  color: inherit;\n}\n.jstree-icon {\n  display: inline-block;\n  text-decoration: none;\n  margin: 0;\n  padding: 0;\n  vertical-align: top;\n  text-align: center;\n}\n.jstree-icon:empty {\n  display: inline-block;\n  text-decoration: none;\n  margin: 0;\n  padding: 0;\n  vertical-align: top;\n  text-align: center;\n}\n.jstree-ocl {\n  cursor: pointer;\n}\n.jstree-leaf > .jstree-ocl {\n  cursor: default;\n}\n.jstree .jstree-open > .jstree-children {\n  display: block;\n}\n.jstree .jstree-closed > .jstree-children,\n.jstree .jstree-leaf > .jstree-children {\n  display: none;\n}\n.jstree-anchor > .jstree-themeicon {\n  margin-right: 2px;\n}\n.jstree-no-icons .jstree-themeicon,\n.jstree-anchor > .jstree-themeicon-hidden {\n  display: none;\n}\n.jstree-hidden,\n.jstree-node.jstree-hidden {\n  display: none;\n}\n.jstree-rtl .jstree-anchor {\n  padding: 0 1px 0 4px;\n}\n.jstree-rtl .jstree-anchor > .jstree-themeicon {\n  margin-left: 2px;\n  margin-right: 0;\n}\n.jstree-rtl .jstree-node {\n  margin-left: 0;\n}\n.jstree-rtl .jstree-container-ul > .jstree-node {\n  margin-right: 0;\n}\n.jstree-wholerow-ul {\n  position: relative;\n  display: inline-block;\n  min-width: 100%;\n}\n.jstree-wholerow-ul .jstree-leaf > .jstree-ocl {\n  cursor: pointer;\n}\n.jstree-wholerow-ul .jstree-anchor,\n.jstree-wholerow-ul .jstree-icon {\n  position: relative;\n}\n.jstree-wholerow-ul .jstree-wholerow {\n  width: 100%;\n  cursor: pointer;\n  position: absolute;\n  left: 0;\n  -webkit-user-select: none;\n  -moz-user-select: none;\n  -ms-user-select: none;\n  user-select: none;\n}\n.jstree-contextmenu .jstree-anchor {\n  -webkit-user-select: none;\n  /* disable selection/Copy of UIWebView */\n  -webkit-touch-callout: none;\n  /* disable the IOS popup when long-press on a link */\n}\n.vakata-context {\n  display: none;\n}\n.vakata-context,\n.vakata-context ul {\n  margin: 0;\n  padding: 2px;\n  position: absolute;\n  background: #f5f5f5;\n  border: 1px solid #979797;\n  box-shadow: 2px 2px 2px #999999;\n}\n.vakata-context ul {\n  list-style: none;\n  left: 100%;\n  margin-top: -2.7em;\n  margin-left: -4px;\n}\n.vakata-context .vakata-context-right ul {\n  left: auto;\n  right: 100%;\n  margin-left: auto;\n  margin-right: -4px;\n}\n.vakata-context li {\n  list-style: none;\n}\n.vakata-context li > a {\n  display: block;\n  padding: 0 2em 0 2em;\n  text-decoration: none;\n  width: auto;\n  color: black;\n  white-space: nowrap;\n  line-height: 2.4em;\n  text-shadow: 1px 1px 0 white;\n  border-radius: 1px;\n}\n.vakata-context li > a:hover {\n  position: relative;\n  background-color: #e8eff7;\n  box-shadow: 0 0 2px #0a6aa1;\n}\n.vakata-context li > a.vakata-context-parent {\n  background-image: url(\"data:image/gif;base64,R0lGODlhCwAHAIAAACgoKP///yH5BAEAAAEALAAAAAALAAcAAAIORI4JlrqN1oMSnmmZDQUAOw==\");\n  background-position: right center;\n  background-repeat: no-repeat;\n}\n.vakata-context li > a:focus {\n  outline: 0;\n}\n.vakata-context .vakata-context-hover > a {\n  position: relative;\n  background-color: #e8eff7;\n  box-shadow: 0 0 2px #0a6aa1;\n}\n.vakata-context .vakata-context-separator > a,\n.vakata-context .vakata-context-separator > a:hover {\n  background: white;\n  border: 0;\n  border-top: 1px solid #e2e3e3;\n  height: 1px;\n  min-height: 1px;\n  max-height: 1px;\n  padding: 0;\n  margin: 0 0 0 2.4em;\n  border-left: 1px solid #e0e0e0;\n  text-shadow: 0 0 0 transparent;\n  box-shadow: 0 0 0 transparent;\n  border-radius: 0;\n}\n.vakata-context .vakata-contextmenu-disabled a,\n.vakata-context .vakata-contextmenu-disabled a:hover {\n  color: silver;\n  background-color: transparent;\n  border: 0;\n  box-shadow: 0 0 0;\n}\n.vakata-context li > a > i {\n  text-decoration: none;\n  display: inline-block;\n  width: 2.4em;\n  height: 2.4em;\n  background: transparent;\n  margin: 0 0 0 -2em;\n  vertical-align: top;\n  text-align: center;\n  line-height: 2.4em;\n}\n.vakata-context li > a > i:empty {\n  width: 2.4em;\n  line-height: 2.4em;\n}\n.vakata-context li > a .vakata-contextmenu-sep {\n  display: inline-block;\n  width: 1px;\n  height: 2.4em;\n  background: white;\n  margin: 0 0.5em 0 0;\n  border-left: 1px solid #e2e3e3;\n}\n.vakata-context .vakata-contextmenu-shortcut {\n  font-size: 0.8em;\n  color: silver;\n  opacity: 0.5;\n  display: none;\n}\n.vakata-context-rtl ul {\n  left: auto;\n  right: 100%;\n  margin-left: auto;\n  margin-right: -4px;\n}\n.vakata-context-rtl li > a.vakata-context-parent {\n  background-image: url(\"data:image/gif;base64,R0lGODlhCwAHAIAAACgoKP///yH5BAEAAAEALAAAAAALAAcAAAINjI+AC7rWHIsPtmoxLAA7\");\n  background-position: left center;\n  background-repeat: no-repeat;\n}\n.vakata-context-rtl .vakata-context-separator > a {\n  margin: 0 2.4em 0 0;\n  border-left: 0;\n  border-right: 1px solid #e2e3e3;\n}\n.vakata-context-rtl .vakata-context-left ul {\n  right: auto;\n  left: 100%;\n  margin-left: -4px;\n  margin-right: auto;\n}\n.vakata-context-rtl li > a > i {\n  margin: 0 -2em 0 0;\n}\n.vakata-context-rtl li > a .vakata-contextmenu-sep {\n  margin: 0 0 0 0.5em;\n  border-left-color: white;\n  background: #e2e3e3;\n}\n#jstree-marker {\n  position: absolute;\n  top: 0;\n  left: 0;\n  margin: -5px 0 0 0;\n  padding: 0;\n  border-right: 0;\n  border-top: 5px solid transparent;\n  border-bottom: 5px solid transparent;\n  border-left: 5px solid;\n  width: 0;\n  height: 0;\n  font-size: 0;\n  line-height: 0;\n}\n#jstree-dnd {\n  line-height: 16px;\n  margin: 0;\n  padding: 4px;\n}\n#jstree-dnd .jstree-icon,\n#jstree-dnd .jstree-copy {\n  display: inline-block;\n  text-decoration: none;\n  margin: 0 2px 0 0;\n  padding: 0;\n  width: 16px;\n  height: 16px;\n}\n#jstree-dnd .jstree-ok {\n  background: green;\n}\n#jstree-dnd .jstree-er {\n  background: red;\n}\n#jstree-dnd .jstree-copy {\n  margin: 0 2px 0 2px;\n}\n.jstree-default-dark .jstree-node,\n.jstree-default-dark .jstree-icon {\n  background-repeat: no-repeat;\n  background-color: transparent;\n}\n.jstree-default-dark .jstree-anchor,\n.jstree-default-dark .jstree-animated,\n.jstree-default-dark .jstree-wholerow {\n  transition: background-color 0.15s, box-shadow 0.15s;\n}\n.jstree-default-dark .jstree-hovered {\n  background: #555555;\n  border-radius: 2px;\n  box-shadow: inset 0 0 1px #555555;\n}\n.jstree-default-dark .jstree-context {\n  background: #555555;\n  border-radius: 2px;\n  box-shadow: inset 0 0 1px #555555;\n}\n.jstree-default-dark .jstree-clicked {\n  background: #5fa2db;\n  border-radius: 2px;\n  box-shadow: inset 0 0 1px #666666;\n}\n.jstree-default-dark .jstree-no-icons .jstree-anchor > .jstree-themeicon {\n  display: none;\n}\n.jstree-default-dark .jstree-disabled {\n  background: transparent;\n  color: #666666;\n}\n.jstree-default-dark .jstree-disabled.jstree-hovered {\n  background: transparent;\n  box-shadow: none;\n}\n.jstree-default-dark .jstree-disabled.jstree-clicked {\n  background: #333333;\n}\n.jstree-default-dark .jstree-disabled > .jstree-icon {\n  opacity: 0.8;\n  filter: url(\"data:image/svg+xml;utf8,<svg xmlns=\\'http://www.w3.org/2000/svg\\'><filter id=\\'jstree-grayscale\\'><feColorMatrix type=\\'matrix\\' values=\\'0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0\\'/></filter></svg>#jstree-grayscale\");\n  /* Firefox 10+ */\n  filter: gray;\n  /* IE6-9 */\n  -webkit-filter: grayscale(100%);\n  /* Chrome 19+ & Safari 6+ */\n}\n.jstree-default-dark .jstree-search {\n  font-style: italic;\n  color: #ffffff;\n  font-weight: bold;\n}\n.jstree-default-dark .jstree-no-checkboxes .jstree-checkbox {\n  display: none !important;\n}\n.jstree-default-dark.jstree-checkbox-no-clicked .jstree-clicked {\n  background: transparent;\n  box-shadow: none;\n}\n.jstree-default-dark.jstree-checkbox-no-clicked .jstree-clicked.jstree-hovered {\n  background: #555555;\n}\n.jstree-default-dark.jstree-checkbox-no-clicked > .jstree-wholerow-ul .jstree-wholerow-clicked {\n  background: transparent;\n}\n.jstree-default-dark.jstree-checkbox-no-clicked > .jstree-wholerow-ul .jstree-wholerow-clicked.jstree-wholerow-hovered {\n  background: #555555;\n}\n.jstree-default-dark > .jstree-striped {\n  min-width: 100%;\n  display: inline-block;\n  background: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAkCAMAAAB/qqA+AAAABlBMVEUAAAAAAAClZ7nPAAAAAnRSTlMNAMM9s3UAAAAXSURBVHjajcEBAQAAAIKg/H/aCQZ70AUBjAATb6YPDgAAAABJRU5ErkJggg==\") left top repeat;\n}\n.jstree-default-dark > .jstree-wholerow-ul .jstree-hovered,\n.jstree-default-dark > .jstree-wholerow-ul .jstree-clicked {\n  background: transparent;\n  box-shadow: none;\n  border-radius: 0;\n}\n.jstree-default-dark .jstree-wholerow {\n  -moz-box-sizing: border-box;\n  -webkit-box-sizing: border-box;\n  box-sizing: border-box;\n}\n.jstree-default-dark .jstree-wholerow-hovered {\n  background: #555555;\n}\n.jstree-default-dark .jstree-wholerow-clicked {\n  background: #5fa2db;\n  background: -webkit-linear-gradient(top, #5fa2db 0%, #5fa2db 100%);\n  background: linear-gradient(to bottom, #5fa2db 0%, #5fa2db 100%);\n}\n.jstree-default-dark .jstree-node {\n  min-height: 24px;\n  line-height: 24px;\n  margin-left: 24px;\n  min-width: 24px;\n}\n.jstree-default-dark .jstree-anchor {\n  line-height: 24px;\n  height: 24px;\n}\n.jstree-default-dark .jstree-icon {\n  width: 24px;\n  height: 24px;\n  line-height: 24px;\n}\n.jstree-default-dark .jstree-icon:empty {\n  width: 24px;\n  height: 24px;\n  line-height: 24px;\n}\n.jstree-default-dark.jstree-rtl .jstree-node {\n  margin-right: 24px;\n}\n.jstree-default-dark .jstree-wholerow {\n  height: 24px;\n}\n.jstree-default-dark .jstree-node,\n.jstree-default-dark .jstree-icon {\n  background-image: url(\"32px.png\");\n}\n.jstree-default-dark .jstree-node {\n  background-position: -292px -4px;\n  background-repeat: repeat-y;\n}\n.jstree-default-dark .jstree-last {\n  background: transparent;\n}\n.jstree-default-dark .jstree-open > .jstree-ocl {\n  background-position: -132px -4px;\n}\n.jstree-default-dark .jstree-closed > .jstree-ocl {\n  background-position: -100px -4px;\n}\n.jstree-default-dark .jstree-leaf > .jstree-ocl {\n  background-position: -68px -4px;\n}\n.jstree-default-dark .jstree-themeicon {\n  background-position: -260px -4px;\n}\n.jstree-default-dark > .jstree-no-dots .jstree-node,\n.jstree-default-dark > .jstree-no-dots .jstree-leaf > .jstree-ocl {\n  background: transparent;\n}\n.jstree-default-dark > .jstree-no-dots .jstree-open > .jstree-ocl {\n  background-position: -36px -4px;\n}\n.jstree-default-dark > .jstree-no-dots .jstree-closed > .jstree-ocl {\n  background-position: -4px -4px;\n}\n.jstree-default-dark .jstree-disabled {\n  background: transparent;\n}\n.jstree-default-dark .jstree-disabled.jstree-hovered {\n  background: transparent;\n}\n.jstree-default-dark .jstree-disabled.jstree-clicked {\n  background: #efefef;\n}\n.jstree-default-dark .jstree-checkbox {\n  background-position: -164px -4px;\n}\n.jstree-default-dark .jstree-checkbox:hover {\n  background-position: -164px -36px;\n}\n.jstree-default-dark.jstree-checkbox-selection .jstree-clicked > .jstree-checkbox,\n.jstree-default-dark .jstree-checked > .jstree-checkbox {\n  background-position: -228px -4px;\n}\n.jstree-default-dark.jstree-checkbox-selection .jstree-clicked > .jstree-checkbox:hover,\n.jstree-default-dark .jstree-checked > .jstree-checkbox:hover {\n  background-position: -228px -36px;\n}\n.jstree-default-dark .jstree-anchor > .jstree-undetermined {\n  background-position: -196px -4px;\n}\n.jstree-default-dark .jstree-anchor > .jstree-undetermined:hover {\n  background-position: -196px -36px;\n}\n.jstree-default-dark .jstree-checkbox-disabled {\n  opacity: 0.8;\n  filter: url(\"data:image/svg+xml;utf8,<svg xmlns=\\'http://www.w3.org/2000/svg\\'><filter id=\\'jstree-grayscale\\'><feColorMatrix type=\\'matrix\\' values=\\'0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0\\'/></filter></svg>#jstree-grayscale\");\n  /* Firefox 10+ */\n  filter: gray;\n  /* IE6-9 */\n  -webkit-filter: grayscale(100%);\n  /* Chrome 19+ & Safari 6+ */\n}\n.jstree-default-dark > .jstree-striped {\n  background-size: auto 48px;\n}\n.jstree-default-dark.jstree-rtl .jstree-node {\n  background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAACAQMAAAB49I5GAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMOBgAAGAAJMwQHdQAAAABJRU5ErkJggg==\");\n  background-position: 100% 1px;\n  background-repeat: repeat-y;\n}\n.jstree-default-dark.jstree-rtl .jstree-last {\n  background: transparent;\n}\n.jstree-default-dark.jstree-rtl .jstree-open > .jstree-ocl {\n  background-position: -132px -36px;\n}\n.jstree-default-dark.jstree-rtl .jstree-closed > .jstree-ocl {\n  background-position: -100px -36px;\n}\n.jstree-default-dark.jstree-rtl .jstree-leaf > .jstree-ocl {\n  background-position: -68px -36px;\n}\n.jstree-default-dark.jstree-rtl > .jstree-no-dots .jstree-node,\n.jstree-default-dark.jstree-rtl > .jstree-no-dots .jstree-leaf > .jstree-ocl {\n  background: transparent;\n}\n.jstree-default-dark.jstree-rtl > .jstree-no-dots .jstree-open > .jstree-ocl {\n  background-position: -36px -36px;\n}\n.jstree-default-dark.jstree-rtl > .jstree-no-dots .jstree-closed > .jstree-ocl {\n  background-position: -4px -36px;\n}\n.jstree-default-dark .jstree-themeicon-custom {\n  background-color: transparent;\n  background-image: none;\n  background-position: 0 0;\n}\n.jstree-default-dark > .jstree-container-ul .jstree-loading > .jstree-ocl {\n  background: url(\"throbber.gif\") center center no-repeat;\n}\n.jstree-default-dark .jstree-file {\n  background: url(\"32px.png\") -100px -68px no-repeat;\n}\n.jstree-default-dark .jstree-folder {\n  background: url(\"32px.png\") -260px -4px no-repeat;\n}\n.jstree-default-dark > .jstree-container-ul > .jstree-node {\n  margin-left: 0;\n  margin-right: 0;\n}\n#jstree-dnd.jstree-default-dark {\n  line-height: 24px;\n  padding: 0 4px;\n}\n#jstree-dnd.jstree-default-dark .jstree-ok,\n#jstree-dnd.jstree-default-dark .jstree-er {\n  background-image: url(\"32px.png\");\n  background-repeat: no-repeat;\n  background-color: transparent;\n}\n#jstree-dnd.jstree-default-dark i {\n  background: transparent;\n  width: 24px;\n  height: 24px;\n  line-height: 24px;\n}\n#jstree-dnd.jstree-default-dark .jstree-ok {\n  background-position: -4px -68px;\n}\n#jstree-dnd.jstree-default-dark .jstree-er {\n  background-position: -36px -68px;\n}\n.jstree-default-dark .jstree-ellipsis {\n  overflow: hidden;\n}\n.jstree-default-dark .jstree-ellipsis .jstree-anchor {\n  width: calc(100% - 29px);\n  text-overflow: ellipsis;\n  overflow: hidden;\n}\n.jstree-default-dark .jstree-ellipsis.jstree-no-icons .jstree-anchor {\n  width: calc(100% - 5px);\n}\n.jstree-default-dark.jstree-rtl .jstree-node {\n  background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAACAQMAAAB49I5GAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMOBgAAGAAJMwQHdQAAAABJRU5ErkJggg==\");\n}\n.jstree-default-dark.jstree-rtl .jstree-last {\n  background: transparent;\n}\n.jstree-default-dark-small .jstree-node {\n  min-height: 18px;\n  line-height: 18px;\n  margin-left: 18px;\n  min-width: 18px;\n}\n.jstree-default-dark-small .jstree-anchor {\n  line-height: 18px;\n  height: 18px;\n}\n.jstree-default-dark-small .jstree-icon {\n  width: 18px;\n  height: 18px;\n  line-height: 18px;\n}\n.jstree-default-dark-small .jstree-icon:empty {\n  width: 18px;\n  height: 18px;\n  line-height: 18px;\n}\n.jstree-default-dark-small.jstree-rtl .jstree-node {\n  margin-right: 18px;\n}\n.jstree-default-dark-small .jstree-wholerow {\n  height: 18px;\n}\n.jstree-default-dark-small .jstree-node,\n.jstree-default-dark-small .jstree-icon {\n  background-image: url(\"32px.png\");\n}\n.jstree-default-dark-small .jstree-node {\n  background-position: -295px -7px;\n  background-repeat: repeat-y;\n}\n.jstree-default-dark-small .jstree-last {\n  background: transparent;\n}\n.jstree-default-dark-small .jstree-open > .jstree-ocl {\n  background-position: -135px -7px;\n}\n.jstree-default-dark-small .jstree-closed > .jstree-ocl {\n  background-position: -103px -7px;\n}\n.jstree-default-dark-small .jstree-leaf > .jstree-ocl {\n  background-position: -71px -7px;\n}\n.jstree-default-dark-small .jstree-themeicon {\n  background-position: -263px -7px;\n}\n.jstree-default-dark-small > .jstree-no-dots .jstree-node,\n.jstree-default-dark-small > .jstree-no-dots .jstree-leaf > .jstree-ocl {\n  background: transparent;\n}\n.jstree-default-dark-small > .jstree-no-dots .jstree-open > .jstree-ocl {\n  background-position: -39px -7px;\n}\n.jstree-default-dark-small > .jstree-no-dots .jstree-closed > .jstree-ocl {\n  background-position: -7px -7px;\n}\n.jstree-default-dark-small .jstree-disabled {\n  background: transparent;\n}\n.jstree-default-dark-small .jstree-disabled.jstree-hovered {\n  background: transparent;\n}\n.jstree-default-dark-small .jstree-disabled.jstree-clicked {\n  background: #efefef;\n}\n.jstree-default-dark-small .jstree-checkbox {\n  background-position: -167px -7px;\n}\n.jstree-default-dark-small .jstree-checkbox:hover {\n  background-position: -167px -39px;\n}\n.jstree-default-dark-small.jstree-checkbox-selection .jstree-clicked > .jstree-checkbox,\n.jstree-default-dark-small .jstree-checked > .jstree-checkbox {\n  background-position: -231px -7px;\n}\n.jstree-default-dark-small.jstree-checkbox-selection .jstree-clicked > .jstree-checkbox:hover,\n.jstree-default-dark-small .jstree-checked > .jstree-checkbox:hover {\n  background-position: -231px -39px;\n}\n.jstree-default-dark-small .jstree-anchor > .jstree-undetermined {\n  background-position: -199px -7px;\n}\n.jstree-default-dark-small .jstree-anchor > .jstree-undetermined:hover {\n  background-position: -199px -39px;\n}\n.jstree-default-dark-small .jstree-checkbox-disabled {\n  opacity: 0.8;\n  filter: url(\"data:image/svg+xml;utf8,<svg xmlns=\\'http://www.w3.org/2000/svg\\'><filter id=\\'jstree-grayscale\\'><feColorMatrix type=\\'matrix\\' values=\\'0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0\\'/></filter></svg>#jstree-grayscale\");\n  /* Firefox 10+ */\n  filter: gray;\n  /* IE6-9 */\n  -webkit-filter: grayscale(100%);\n  /* Chrome 19+ & Safari 6+ */\n}\n.jstree-default-dark-small > .jstree-striped {\n  background-size: auto 36px;\n}\n.jstree-default-dark-small.jstree-rtl .jstree-node {\n  background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAACAQMAAAB49I5GAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMOBgAAGAAJMwQHdQAAAABJRU5ErkJggg==\");\n  background-position: 100% 1px;\n  background-repeat: repeat-y;\n}\n.jstree-default-dark-small.jstree-rtl .jstree-last {\n  background: transparent;\n}\n.jstree-default-dark-small.jstree-rtl .jstree-open > .jstree-ocl {\n  background-position: -135px -39px;\n}\n.jstree-default-dark-small.jstree-rtl .jstree-closed > .jstree-ocl {\n  background-position: -103px -39px;\n}\n.jstree-default-dark-small.jstree-rtl .jstree-leaf > .jstree-ocl {\n  background-position: -71px -39px;\n}\n.jstree-default-dark-small.jstree-rtl > .jstree-no-dots .jstree-node,\n.jstree-default-dark-small.jstree-rtl > .jstree-no-dots .jstree-leaf > .jstree-ocl {\n  background: transparent;\n}\n.jstree-default-dark-small.jstree-rtl > .jstree-no-dots .jstree-open > .jstree-ocl {\n  background-position: -39px -39px;\n}\n.jstree-default-dark-small.jstree-rtl > .jstree-no-dots .jstree-closed > .jstree-ocl {\n  background-position: -7px -39px;\n}\n.jstree-default-dark-small .jstree-themeicon-custom {\n  background-color: transparent;\n  background-image: none;\n  background-position: 0 0;\n}\n.jstree-default-dark-small > .jstree-container-ul .jstree-loading > .jstree-ocl {\n  background: url(\"throbber.gif\") center center no-repeat;\n}\n.jstree-default-dark-small .jstree-file {\n  background: url(\"32px.png\") -103px -71px no-repeat;\n}\n.jstree-default-dark-small .jstree-folder {\n  background: url(\"32px.png\") -263px -7px no-repeat;\n}\n.jstree-default-dark-small > .jstree-container-ul > .jstree-node {\n  margin-left: 0;\n  margin-right: 0;\n}\n#jstree-dnd.jstree-default-dark-small {\n  line-height: 18px;\n  padding: 0 4px;\n}\n#jstree-dnd.jstree-default-dark-small .jstree-ok,\n#jstree-dnd.jstree-default-dark-small .jstree-er {\n  background-image: url(\"32px.png\");\n  background-repeat: no-repeat;\n  background-color: transparent;\n}\n#jstree-dnd.jstree-default-dark-small i {\n  background: transparent;\n  width: 18px;\n  height: 18px;\n  line-height: 18px;\n}\n#jstree-dnd.jstree-default-dark-small .jstree-ok {\n  background-position: -7px -71px;\n}\n#jstree-dnd.jstree-default-dark-small .jstree-er {\n  background-position: -39px -71px;\n}\n.jstree-default-dark-small .jstree-ellipsis {\n  overflow: hidden;\n}\n.jstree-default-dark-small .jstree-ellipsis .jstree-anchor {\n  width: calc(100% - 23px);\n  text-overflow: ellipsis;\n  overflow: hidden;\n}\n.jstree-default-dark-small .jstree-ellipsis.jstree-no-icons .jstree-anchor {\n  width: calc(100% - 5px);\n}\n.jstree-default-dark-small.jstree-rtl .jstree-node {\n  background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAACAQMAAABv1h6PAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMHBgAAiABBI4gz9AAAAABJRU5ErkJggg==\");\n}\n.jstree-default-dark-small.jstree-rtl .jstree-last {\n  background: transparent;\n}\n.jstree-default-dark-large .jstree-node {\n  min-height: 32px;\n  line-height: 32px;\n  margin-left: 32px;\n  min-width: 32px;\n}\n.jstree-default-dark-large .jstree-anchor {\n  line-height: 32px;\n  height: 32px;\n}\n.jstree-default-dark-large .jstree-icon {\n  width: 32px;\n  height: 32px;\n  line-height: 32px;\n}\n.jstree-default-dark-large .jstree-icon:empty {\n  width: 32px;\n  height: 32px;\n  line-height: 32px;\n}\n.jstree-default-dark-large.jstree-rtl .jstree-node {\n  margin-right: 32px;\n}\n.jstree-default-dark-large .jstree-wholerow {\n  height: 32px;\n}\n.jstree-default-dark-large .jstree-node,\n.jstree-default-dark-large .jstree-icon {\n  background-image: url(\"32px.png\");\n}\n.jstree-default-dark-large .jstree-node {\n  background-position: -288px 0px;\n  background-repeat: repeat-y;\n}\n.jstree-default-dark-large .jstree-last {\n  background: transparent;\n}\n.jstree-default-dark-large .jstree-open > .jstree-ocl {\n  background-position: -128px 0px;\n}\n.jstree-default-dark-large .jstree-closed > .jstree-ocl {\n  background-position: -96px 0px;\n}\n.jstree-default-dark-large .jstree-leaf > .jstree-ocl {\n  background-position: -64px 0px;\n}\n.jstree-default-dark-large .jstree-themeicon {\n  background-position: -256px 0px;\n}\n.jstree-default-dark-large > .jstree-no-dots .jstree-node,\n.jstree-default-dark-large > .jstree-no-dots .jstree-leaf > .jstree-ocl {\n  background: transparent;\n}\n.jstree-default-dark-large > .jstree-no-dots .jstree-open > .jstree-ocl {\n  background-position: -32px 0px;\n}\n.jstree-default-dark-large > .jstree-no-dots .jstree-closed > .jstree-ocl {\n  background-position: 0px 0px;\n}\n.jstree-default-dark-large .jstree-disabled {\n  background: transparent;\n}\n.jstree-default-dark-large .jstree-disabled.jstree-hovered {\n  background: transparent;\n}\n.jstree-default-dark-large .jstree-disabled.jstree-clicked {\n  background: #efefef;\n}\n.jstree-default-dark-large .jstree-checkbox {\n  background-position: -160px 0px;\n}\n.jstree-default-dark-large .jstree-checkbox:hover {\n  background-position: -160px -32px;\n}\n.jstree-default-dark-large.jstree-checkbox-selection .jstree-clicked > .jstree-checkbox,\n.jstree-default-dark-large .jstree-checked > .jstree-checkbox {\n  background-position: -224px 0px;\n}\n.jstree-default-dark-large.jstree-checkbox-selection .jstree-clicked > .jstree-checkbox:hover,\n.jstree-default-dark-large .jstree-checked > .jstree-checkbox:hover {\n  background-position: -224px -32px;\n}\n.jstree-default-dark-large .jstree-anchor > .jstree-undetermined {\n  background-position: -192px 0px;\n}\n.jstree-default-dark-large .jstree-anchor > .jstree-undetermined:hover {\n  background-position: -192px -32px;\n}\n.jstree-default-dark-large .jstree-checkbox-disabled {\n  opacity: 0.8;\n  filter: url(\"data:image/svg+xml;utf8,<svg xmlns=\\'http://www.w3.org/2000/svg\\'><filter id=\\'jstree-grayscale\\'><feColorMatrix type=\\'matrix\\' values=\\'0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0\\'/></filter></svg>#jstree-grayscale\");\n  /* Firefox 10+ */\n  filter: gray;\n  /* IE6-9 */\n  -webkit-filter: grayscale(100%);\n  /* Chrome 19+ & Safari 6+ */\n}\n.jstree-default-dark-large > .jstree-striped {\n  background-size: auto 64px;\n}\n.jstree-default-dark-large.jstree-rtl .jstree-node {\n  background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAACAQMAAAB49I5GAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMOBgAAGAAJMwQHdQAAAABJRU5ErkJggg==\");\n  background-position: 100% 1px;\n  background-repeat: repeat-y;\n}\n.jstree-default-dark-large.jstree-rtl .jstree-last {\n  background: transparent;\n}\n.jstree-default-dark-large.jstree-rtl .jstree-open > .jstree-ocl {\n  background-position: -128px -32px;\n}\n.jstree-default-dark-large.jstree-rtl .jstree-closed > .jstree-ocl {\n  background-position: -96px -32px;\n}\n.jstree-default-dark-large.jstree-rtl .jstree-leaf > .jstree-ocl {\n  background-position: -64px -32px;\n}\n.jstree-default-dark-large.jstree-rtl > .jstree-no-dots .jstree-node,\n.jstree-default-dark-large.jstree-rtl > .jstree-no-dots .jstree-leaf > .jstree-ocl {\n  background: transparent;\n}\n.jstree-default-dark-large.jstree-rtl > .jstree-no-dots .jstree-open > .jstree-ocl {\n  background-position: -32px -32px;\n}\n.jstree-default-dark-large.jstree-rtl > .jstree-no-dots .jstree-closed > .jstree-ocl {\n  background-position: 0px -32px;\n}\n.jstree-default-dark-large .jstree-themeicon-custom {\n  background-color: transparent;\n  background-image: none;\n  background-position: 0 0;\n}\n.jstree-default-dark-large > .jstree-container-ul .jstree-loading > .jstree-ocl {\n  background: url(\"throbber.gif\") center center no-repeat;\n}\n.jstree-default-dark-large .jstree-file {\n  background: url(\"32px.png\") -96px -64px no-repeat;\n}\n.jstree-default-dark-large .jstree-folder {\n  background: url(\"32px.png\") -256px 0px no-repeat;\n}\n.jstree-default-dark-large > .jstree-container-ul > .jstree-node {\n  margin-left: 0;\n  margin-right: 0;\n}\n#jstree-dnd.jstree-default-dark-large {\n  line-height: 32px;\n  padding: 0 4px;\n}\n#jstree-dnd.jstree-default-dark-large .jstree-ok,\n#jstree-dnd.jstree-default-dark-large .jstree-er {\n  background-image: url(\"32px.png\");\n  background-repeat: no-repeat;\n  background-color: transparent;\n}\n#jstree-dnd.jstree-default-dark-large i {\n  background: transparent;\n  width: 32px;\n  height: 32px;\n  line-height: 32px;\n}\n#jstree-dnd.jstree-default-dark-large .jstree-ok {\n  background-position: 0px -64px;\n}\n#jstree-dnd.jstree-default-dark-large .jstree-er {\n  background-position: -32px -64px;\n}\n.jstree-default-dark-large .jstree-ellipsis {\n  overflow: hidden;\n}\n.jstree-default-dark-large .jstree-ellipsis .jstree-anchor {\n  width: calc(100% - 37px);\n  text-overflow: ellipsis;\n  overflow: hidden;\n}\n.jstree-default-dark-large .jstree-ellipsis.jstree-no-icons .jstree-anchor {\n  width: calc(100% - 5px);\n}\n.jstree-default-dark-large.jstree-rtl .jstree-node {\n  background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAACAQMAAAAD0EyKAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjgIIGBgABCgCBvVLXcAAAAABJRU5ErkJggg==\");\n}\n.jstree-default-dark-large.jstree-rtl .jstree-last {\n  background: transparent;\n}\n@media (max-width: 768px) {\n  #jstree-dnd.jstree-dnd-responsive {\n    line-height: 40px;\n    font-weight: bold;\n    font-size: 1.1em;\n    text-shadow: 1px 1px white;\n  }\n  #jstree-dnd.jstree-dnd-responsive > i {\n    background: transparent;\n    width: 40px;\n    height: 40px;\n  }\n  #jstree-dnd.jstree-dnd-responsive > .jstree-ok {\n    background-image: url(\"40px.png\");\n    background-position: 0 -200px;\n    background-size: 120px 240px;\n  }\n  #jstree-dnd.jstree-dnd-responsive > .jstree-er {\n    background-image: url(\"40px.png\");\n    background-position: -40px -200px;\n    background-size: 120px 240px;\n  }\n  #jstree-marker.jstree-dnd-responsive {\n    border-left-width: 10px;\n    border-top-width: 10px;\n    border-bottom-width: 10px;\n    margin-top: -10px;\n  }\n}\n@media (max-width: 768px) {\n  .jstree-default-dark-responsive {\n    /*\n\t.jstree-open > .jstree-ocl,\n\t.jstree-closed > .jstree-ocl { border-radius:20px; background-color:white; }\n\t*/\n  }\n  .jstree-default-dark-responsive .jstree-icon {\n    background-image: url(\"40px.png\");\n  }\n  .jstree-default-dark-responsive .jstree-node,\n  .jstree-default-dark-responsive .jstree-leaf > .jstree-ocl {\n    background: transparent;\n  }\n  .jstree-default-dark-responsive .jstree-node {\n    min-height: 40px;\n    line-height: 40px;\n    margin-left: 40px;\n    min-width: 40px;\n    white-space: nowrap;\n  }\n  .jstree-default-dark-responsive .jstree-anchor {\n    line-height: 40px;\n    height: 40px;\n  }\n  .jstree-default-dark-responsive .jstree-icon,\n  .jstree-default-dark-responsive .jstree-icon:empty {\n    width: 40px;\n    height: 40px;\n    line-height: 40px;\n  }\n  .jstree-default-dark-responsive > .jstree-container-ul > .jstree-node {\n    margin-left: 0;\n  }\n  .jstree-default-dark-responsive.jstree-rtl .jstree-node {\n    margin-left: 0;\n    margin-right: 40px;\n    background: transparent;\n  }\n  .jstree-default-dark-responsive.jstree-rtl .jstree-container-ul > .jstree-node {\n    margin-right: 0;\n  }\n  .jstree-default-dark-responsive .jstree-ocl,\n  .jstree-default-dark-responsive .jstree-themeicon,\n  .jstree-default-dark-responsive .jstree-checkbox {\n    background-size: 120px 240px;\n  }\n  .jstree-default-dark-responsive .jstree-leaf > .jstree-ocl,\n  .jstree-default-dark-responsive.jstree-rtl .jstree-leaf > .jstree-ocl {\n    background: transparent;\n  }\n  .jstree-default-dark-responsive .jstree-open > .jstree-ocl {\n    background-position: 0 0px !important;\n  }\n  .jstree-default-dark-responsive .jstree-closed > .jstree-ocl {\n    background-position: 0 -40px !important;\n  }\n  .jstree-default-dark-responsive.jstree-rtl .jstree-closed > .jstree-ocl {\n    background-position: -40px 0px !important;\n  }\n  .jstree-default-dark-responsive .jstree-themeicon {\n    background-position: -40px -40px;\n  }\n  .jstree-default-dark-responsive .jstree-checkbox,\n  .jstree-default-dark-responsive .jstree-checkbox:hover {\n    background-position: -40px -80px;\n  }\n  .jstree-default-dark-responsive.jstree-checkbox-selection .jstree-clicked > .jstree-checkbox,\n  .jstree-default-dark-responsive.jstree-checkbox-selection .jstree-clicked > .jstree-checkbox:hover,\n  .jstree-default-dark-responsive .jstree-checked > .jstree-checkbox,\n  .jstree-default-dark-responsive .jstree-checked > .jstree-checkbox:hover {\n    background-position: 0 -80px;\n  }\n  .jstree-default-dark-responsive .jstree-anchor > .jstree-undetermined,\n  .jstree-default-dark-responsive .jstree-anchor > .jstree-undetermined:hover {\n    background-position: 0 -120px;\n  }\n  .jstree-default-dark-responsive .jstree-anchor {\n    font-weight: bold;\n    font-size: 1.1em;\n    text-shadow: 1px 1px white;\n  }\n  .jstree-default-dark-responsive > .jstree-striped {\n    background: transparent;\n  }\n  .jstree-default-dark-responsive .jstree-wholerow {\n    border-top: 1px solid #666666;\n    border-bottom: 1px solid #000000;\n    background: #333333;\n    height: 40px;\n  }\n  .jstree-default-dark-responsive .jstree-wholerow-hovered {\n    background: #555555;\n  }\n  .jstree-default-dark-responsive .jstree-wholerow-clicked {\n    background: #5fa2db;\n  }\n  .jstree-default-dark-responsive .jstree-children .jstree-last > .jstree-wholerow {\n    box-shadow: inset 0 -6px 3px -5px #111111;\n  }\n  .jstree-default-dark-responsive .jstree-children .jstree-open > .jstree-wholerow {\n    box-shadow: inset 0 6px 3px -5px #111111;\n    border-top: 0;\n  }\n  .jstree-default-dark-responsive .jstree-children .jstree-open + .jstree-open {\n    box-shadow: none;\n  }\n  .jstree-default-dark-responsive .jstree-node,\n  .jstree-default-dark-responsive .jstree-icon,\n  .jstree-default-dark-responsive .jstree-node > .jstree-ocl,\n  .jstree-default-dark-responsive .jstree-themeicon,\n  .jstree-default-dark-responsive .jstree-checkbox {\n    background-image: url(\"40px.png\");\n    background-size: 120px 240px;\n  }\n  .jstree-default-dark-responsive .jstree-node {\n    background-position: -80px 0;\n    background-repeat: repeat-y;\n  }\n  .jstree-default-dark-responsive .jstree-last {\n    background: transparent;\n  }\n  .jstree-default-dark-responsive .jstree-leaf > .jstree-ocl {\n    background-position: -40px -120px;\n  }\n  .jstree-default-dark-responsive .jstree-last > .jstree-ocl {\n    background-position: -40px -160px;\n  }\n  .jstree-default-dark-responsive .jstree-themeicon-custom {\n    background-color: transparent;\n    background-image: none;\n    background-position: 0 0;\n  }\n  .jstree-default-dark-responsive .jstree-file {\n    background: url(\"40px.png\") 0 -160px no-repeat;\n    background-size: 120px 240px;\n  }\n  .jstree-default-dark-responsive .jstree-folder {\n    background: url(\"40px.png\") -40px -40px no-repeat;\n    background-size: 120px 240px;\n  }\n  .jstree-default-dark-responsive > .jstree-container-ul > .jstree-node {\n    margin-left: 0;\n    margin-right: 0;\n  }\n}\n.jstree-default-dark {\n  background: #333;\n}\n.jstree-default-dark .jstree-anchor {\n  color: #999;\n  text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.5);\n}\n.jstree-default-dark .jstree-clicked,\n.jstree-default-dark .jstree-checked {\n  color: white;\n}\n.jstree-default-dark .jstree-hovered {\n  color: white;\n}\n#jstree-marker.jstree-default-dark {\n  border-left-color: #999;\n  background: transparent;\n}\n.jstree-default-dark .jstree-anchor > .jstree-icon {\n  opacity: 0.75;\n}\n.jstree-default-dark .jstree-clicked > .jstree-icon,\n.jstree-default-dark .jstree-hovered > .jstree-icon,\n.jstree-default-dark .jstree-checked > .jstree-icon {\n  opacity: 1;\n}\n.jstree-default-dark.jstree-rtl .jstree-node {\n  background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAACAQMAAAB49I5GAAAABlBMVEUAAACZmZl+9SADAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMOBgAAGAAJMwQHdQAAAABJRU5ErkJggg==\");\n}\n.jstree-default-dark.jstree-rtl .jstree-last {\n  background: transparent;\n}\n.jstree-default-dark-small.jstree-rtl .jstree-node {\n  background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAACAQMAAABv1h6PAAAABlBMVEUAAACZmZl+9SADAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMHBgAAiABBI4gz9AAAAABJRU5ErkJggg==\");\n}\n.jstree-default-dark-small.jstree-rtl .jstree-last {\n  background: transparent;\n}\n.jstree-default-dark-large.jstree-rtl .jstree-node {\n  background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAACAQMAAAAD0EyKAAAABlBMVEUAAACZmZl+9SADAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjgIIGBgABCgCBvVLXcAAAAABJRU5ErkJggg==\");\n}\n.jstree-default-dark-large.jstree-rtl .jstree-last {\n  background: transparent;\n}\n"
  },
  {
    "path": "static/katex/README.md",
    "content": "# [<img src=\"https://khan.github.io/KaTeX/katex-logo.svg\" width=\"130\" alt=\"KaTeX\">](https://khan.github.io/KaTeX/) [![Build Status](https://travis-ci.org/Khan/KaTeX.svg?branch=master)](https://travis-ci.org/Khan/KaTeX)\n\n[![Join the chat at https://gitter.im/Khan/KaTeX](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/Khan/KaTeX?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)\n\nKaTeX is a fast, easy-to-use JavaScript library for TeX math rendering on the web.\n\n * **Fast:** KaTeX renders its math synchronously and doesn't need to reflow the page. See how it compares to a competitor in [this speed test](http://www.intmath.com/cg5/katex-mathjax-comparison.php).\n * **Print quality:** KaTeX’s layout is based on Donald Knuth’s TeX, the gold standard for math typesetting.\n * **Self contained:** KaTeX has no dependencies and can easily be bundled with your website resources.\n * **Server side rendering:** KaTeX produces the same output regardless of browser or environment, so you can pre-render expressions using Node.js and send them as plain HTML.\n\nKaTeX supports all major browsers, including Chrome, Safari, Firefox, Opera, Edge, and IE 9 - IE 11. A list of supported commands can be found on the [wiki](https://github.com/Khan/KaTeX/wiki/Function-Support-in-KaTeX).\n\n## Usage\n\nYou can [download KaTeX](https://github.com/khan/katex/releases) and host it on your server or include the `katex.min.js` and `katex.min.css` files on your page directly from a CDN:\n\n```html\n<link rel=\"stylesheet\" href=\"https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.8.3/katex.min.css\" integrity=\"sha384-B41nY7vEWuDrE9Mr+J2nBL0Liu+nl/rBXTdpQal730oTHdlrlXHzYMOhDU60cwde\" crossorigin=\"anonymous\">\n<script src=\"https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.8.3/katex.min.js\" integrity=\"sha384-L9gv4ooDLrYwW0QCM6zY3EKSSPrsuUncpx26+erN0pJX4wv1B1FzVW1SvpcJPx/8\" crossorigin=\"anonymous\"></script>\n```\n\n#### In-browser rendering\n\nCall `katex.render` with a TeX expression and a DOM element to render into:\n\n```js\nkatex.render(\"c = \\\\pm\\\\sqrt{a^2 + b^2}\", element);\n```\n\nIf KaTeX can't parse the expression, it throws a `katex.ParseError` error.\n\n#### Server side rendering or rendering to a string\n\nTo generate HTML on the server or to generate an HTML string of the rendered math, you can use `katex.renderToString`:\n\n```js\nvar html = katex.renderToString(\"c = \\\\pm\\\\sqrt{a^2 + b^2}\");\n// '<span class=\"katex\">...</span>'\n```\n\nMake sure to include the CSS and font files, but there is no need to include the JavaScript. Like `render`, `renderToString` throws if it can't parse the expression.\n\n#### Rendering options\n\nYou can provide an object of options as the last argument to `katex.render` and `katex.renderToString`. Available options are:\n\n- `displayMode`: `boolean`. If `true` the math will be rendered in display mode, which will put the math in display style (so `\\int` and `\\sum` are large, for example), and will center the math on the page on its own line. If `false` the math will be rendered in inline mode. (default: `false`)\n- `throwOnError`: `boolean`. If `true`, KaTeX will throw a `ParseError` when it encounters an unsupported command. If `false`, KaTeX will render the unsupported command as text in the color given by `errorColor`. (default: `true`)\n- `errorColor`: `string`. A color string given in the format `\"#XXX\"` or `\"#XXXXXX\"`. This option determines the color which unsupported commands are rendered in. (default: `#cc0000`)\n- `macros`: `object`. A collection of custom macros. Each macro is a property with a name like `\\name` (written `\"\\\\name\"` in JavaScript) which maps to a string that describes the expansion of the macro.\n- `colorIsTextColor`: `boolean`. If `true`, `\\color` will work like LaTeX's `\\textcolor`, and take two arguments (e.g., `\\color{blue}{hello}`), which restores the old behavior of KaTeX (pre-0.8.0). If `false` (the default), `\\color` will work like LaTeX's `\\color`, and take one argument (e.g., `\\color{blue}hello`).  In both cases, `\\textcolor` works as in LaTeX (e.g., `\\textcolor{blue}{hello}`).\n\nFor example:\n\n```js\nkatex.render(\"c = \\\\pm\\\\sqrt{a^2 + b^2}\\\\in\\\\RR\", element, {\n  displayMode: true,\n  macros: {\n    \"\\\\RR\": \"\\\\mathbb{R}\"\n  }\n});\n```\n\n#### Automatic rendering of math on a page\n\nMath on the page can be automatically rendered using the auto-render extension. See [the Auto-render README](contrib/auto-render/README.md) for more information.\n\n#### Font size and lengths\n\nBy default, KaTeX math is rendered in a 1.21× larger font than the surrounding\ncontext, which makes super- and subscripts easier to read. You can control\nthis using CSS, for example:\n\n```css\n.katex { font-size: 1.1em; }\n```\n\nKaTeX supports all TeX units, including absolute units like `cm` and `in`.\nAbsolute units are currently scaled relative to the default TeX font size of\n10pt, so that `\\kern1cm` produces the same results as `\\kern2.845275em`.\nAs a result, relative and absolute units are both uniformly scaled relative\nto LaTeX with a 10pt font; for example, the rectangle `\\rule{1cm}{1em}` has\nthe same aspect ratio in KaTeX as in LaTeX.  However, because most browsers\ndefault to a larger font size, this typically means that a 1cm kern in KaTeX\nwill appear larger than 1cm in browser units.\n\n## Contributing\n\nSee [CONTRIBUTING.md](CONTRIBUTING.md)\n\n## License\n\nKaTeX is licensed under the [MIT License](http://opensource.org/licenses/MIT).\n"
  },
  {
    "path": "static/katex/katex.css",
    "content": "@font-face {\n  font-family: 'KaTeX_AMS';\n  src: url('fonts/KaTeX_AMS-Regular.eot');\n  src: url('fonts/KaTeX_AMS-Regular.eot#iefix') format('embedded-opentype'), url('fonts/KaTeX_AMS-Regular.woff2') format('woff2'), url('fonts/KaTeX_AMS-Regular.woff') format('woff'), url('fonts/KaTeX_AMS-Regular.ttf') format('truetype');\n  font-weight: normal;\n  font-style: normal;\n}\n@font-face {\n  font-family: 'KaTeX_Caligraphic';\n  src: url('fonts/KaTeX_Caligraphic-Bold.eot');\n  src: url('fonts/KaTeX_Caligraphic-Bold.eot#iefix') format('embedded-opentype'), url('fonts/KaTeX_Caligraphic-Bold.woff2') format('woff2'), url('fonts/KaTeX_Caligraphic-Bold.woff') format('woff'), url('fonts/KaTeX_Caligraphic-Bold.ttf') format('truetype');\n  font-weight: bold;\n  font-style: normal;\n}\n@font-face {\n  font-family: 'KaTeX_Caligraphic';\n  src: url('fonts/KaTeX_Caligraphic-Regular.eot');\n  src: url('fonts/KaTeX_Caligraphic-Regular.eot#iefix') format('embedded-opentype'), url('fonts/KaTeX_Caligraphic-Regular.woff2') format('woff2'), url('fonts/KaTeX_Caligraphic-Regular.woff') format('woff'), url('fonts/KaTeX_Caligraphic-Regular.ttf') format('truetype');\n  font-weight: normal;\n  font-style: normal;\n}\n@font-face {\n  font-family: 'KaTeX_Fraktur';\n  src: url('fonts/KaTeX_Fraktur-Bold.eot');\n  src: url('fonts/KaTeX_Fraktur-Bold.eot#iefix') format('embedded-opentype'), url('fonts/KaTeX_Fraktur-Bold.woff2') format('woff2'), url('fonts/KaTeX_Fraktur-Bold.woff') format('woff'), url('fonts/KaTeX_Fraktur-Bold.ttf') format('truetype');\n  font-weight: bold;\n  font-style: normal;\n}\n@font-face {\n  font-family: 'KaTeX_Fraktur';\n  src: url('fonts/KaTeX_Fraktur-Regular.eot');\n  src: url('fonts/KaTeX_Fraktur-Regular.eot#iefix') format('embedded-opentype'), url('fonts/KaTeX_Fraktur-Regular.woff2') format('woff2'), url('fonts/KaTeX_Fraktur-Regular.woff') format('woff'), url('fonts/KaTeX_Fraktur-Regular.ttf') format('truetype');\n  font-weight: normal;\n  font-style: normal;\n}\n@font-face {\n  font-family: 'KaTeX_Main';\n  src: url('fonts/KaTeX_Main-Bold.eot');\n  src: url('fonts/KaTeX_Main-Bold.eot#iefix') format('embedded-opentype'), url('fonts/KaTeX_Main-Bold.woff2') format('woff2'), url('fonts/KaTeX_Main-Bold.woff') format('woff'), url('fonts/KaTeX_Main-Bold.ttf') format('truetype');\n  font-weight: bold;\n  font-style: normal;\n}\n@font-face {\n  font-family: 'KaTeX_Main';\n  src: url('fonts/KaTeX_Main-Italic.eot');\n  src: url('fonts/KaTeX_Main-Italic.eot#iefix') format('embedded-opentype'), url('fonts/KaTeX_Main-Italic.woff2') format('woff2'), url('fonts/KaTeX_Main-Italic.woff') format('woff'), url('fonts/KaTeX_Main-Italic.ttf') format('truetype');\n  font-weight: normal;\n  font-style: italic;\n}\n@font-face {\n  font-family: 'KaTeX_Main';\n  src: url('fonts/KaTeX_Main-Regular.eot');\n  src: url('fonts/KaTeX_Main-Regular.eot#iefix') format('embedded-opentype'), url('fonts/KaTeX_Main-Regular.woff2') format('woff2'), url('fonts/KaTeX_Main-Regular.woff') format('woff'), url('fonts/KaTeX_Main-Regular.ttf') format('truetype');\n  font-weight: normal;\n  font-style: normal;\n}\n@font-face {\n  font-family: 'KaTeX_Math';\n  src: url('fonts/KaTeX_Math-Italic.eot');\n  src: url('fonts/KaTeX_Math-Italic.eot#iefix') format('embedded-opentype'), url('fonts/KaTeX_Math-Italic.woff2') format('woff2'), url('fonts/KaTeX_Math-Italic.woff') format('woff'), url('fonts/KaTeX_Math-Italic.ttf') format('truetype');\n  font-weight: normal;\n  font-style: italic;\n}\n@font-face {\n  font-family: 'KaTeX_SansSerif';\n  src: url('fonts/KaTeX_SansSerif-Regular.eot');\n  src: url('fonts/KaTeX_SansSerif-Regular.eot#iefix') format('embedded-opentype'), url('fonts/KaTeX_SansSerif-Regular.woff2') format('woff2'), url('fonts/KaTeX_SansSerif-Regular.woff') format('woff'), url('fonts/KaTeX_SansSerif-Regular.ttf') format('truetype');\n  font-weight: normal;\n  font-style: normal;\n}\n@font-face {\n  font-family: 'KaTeX_Script';\n  src: url('fonts/KaTeX_Script-Regular.eot');\n  src: url('fonts/KaTeX_Script-Regular.eot#iefix') format('embedded-opentype'), url('fonts/KaTeX_Script-Regular.woff2') format('woff2'), url('fonts/KaTeX_Script-Regular.woff') format('woff'), url('fonts/KaTeX_Script-Regular.ttf') format('truetype');\n  font-weight: normal;\n  font-style: normal;\n}\n@font-face {\n  font-family: 'KaTeX_Size1';\n  src: url('fonts/KaTeX_Size1-Regular.eot');\n  src: url('fonts/KaTeX_Size1-Regular.eot#iefix') format('embedded-opentype'), url('fonts/KaTeX_Size1-Regular.woff2') format('woff2'), url('fonts/KaTeX_Size1-Regular.woff') format('woff'), url('fonts/KaTeX_Size1-Regular.ttf') format('truetype');\n  font-weight: normal;\n  font-style: normal;\n}\n@font-face {\n  font-family: 'KaTeX_Size2';\n  src: url('fonts/KaTeX_Size2-Regular.eot');\n  src: url('fonts/KaTeX_Size2-Regular.eot#iefix') format('embedded-opentype'), url('fonts/KaTeX_Size2-Regular.woff2') format('woff2'), url('fonts/KaTeX_Size2-Regular.woff') format('woff'), url('fonts/KaTeX_Size2-Regular.ttf') format('truetype');\n  font-weight: normal;\n  font-style: normal;\n}\n@font-face {\n  font-family: 'KaTeX_Size3';\n  src: url('fonts/KaTeX_Size3-Regular.eot');\n  src: url('fonts/KaTeX_Size3-Regular.eot#iefix') format('embedded-opentype'), url('fonts/KaTeX_Size3-Regular.woff2') format('woff2'), url('fonts/KaTeX_Size3-Regular.woff') format('woff'), url('fonts/KaTeX_Size3-Regular.ttf') format('truetype');\n  font-weight: normal;\n  font-style: normal;\n}\n@font-face {\n  font-family: 'KaTeX_Size4';\n  src: url('fonts/KaTeX_Size4-Regular.eot');\n  src: url('fonts/KaTeX_Size4-Regular.eot#iefix') format('embedded-opentype'), url('fonts/KaTeX_Size4-Regular.woff2') format('woff2'), url('fonts/KaTeX_Size4-Regular.woff') format('woff'), url('fonts/KaTeX_Size4-Regular.ttf') format('truetype');\n  font-weight: normal;\n  font-style: normal;\n}\n@font-face {\n  font-family: 'KaTeX_Typewriter';\n  src: url('fonts/KaTeX_Typewriter-Regular.eot');\n  src: url('fonts/KaTeX_Typewriter-Regular.eot#iefix') format('embedded-opentype'), url('fonts/KaTeX_Typewriter-Regular.woff2') format('woff2'), url('fonts/KaTeX_Typewriter-Regular.woff') format('woff'), url('fonts/KaTeX_Typewriter-Regular.ttf') format('truetype');\n  font-weight: normal;\n  font-style: normal;\n}\n.katex-display {\n  display: block;\n  margin: 1em 0;\n  text-align: center;\n}\n.katex-display > .katex {\n  display: inline-block;\n  text-align: initial;\n}\n.katex {\n  font: normal 1.21em KaTeX_Main, Times New Roman, serif;\n  line-height: 1.2;\n  white-space: nowrap;\n  text-indent: 0;\n  text-rendering: auto;\n}\n.katex * {\n  -ms-high-contrast-adjust: none !important;\n}\n.katex .katex-html {\n  display: inline-block;\n}\n.katex .katex-mathml {\n  position: absolute;\n  clip: rect(1px, 1px, 1px, 1px);\n  padding: 0;\n  border: 0;\n  height: 1px;\n  width: 1px;\n  overflow: hidden;\n}\n.katex .base {\n  position: relative;\n  display: inline-block;\n}\n.katex .strut {\n  display: inline-block;\n}\n.katex .mathrm {\n  font-style: normal;\n}\n.katex .textit {\n  font-style: italic;\n}\n.katex .mathit {\n  font-family: KaTeX_Math;\n  font-style: italic;\n}\n.katex .mathbf {\n  font-family: KaTeX_Main;\n  font-weight: bold;\n}\n.katex .amsrm {\n  font-family: KaTeX_AMS;\n}\n.katex .mathbb {\n  font-family: KaTeX_AMS;\n}\n.katex .mathcal {\n  font-family: KaTeX_Caligraphic;\n}\n.katex .mathfrak {\n  font-family: KaTeX_Fraktur;\n}\n.katex .mathtt {\n  font-family: KaTeX_Typewriter;\n}\n.katex .mathscr {\n  font-family: KaTeX_Script;\n}\n.katex .mathsf {\n  font-family: KaTeX_SansSerif;\n}\n.katex .mainit {\n  font-family: KaTeX_Main;\n  font-style: italic;\n}\n.katex .mainrm {\n  font-family: KaTeX_Main;\n  font-style: normal;\n}\n.katex .mord + .mop {\n  margin-left: 0.16667em;\n}\n.katex .mord + .mbin {\n  margin-left: 0.22222em;\n}\n.katex .mord + .mrel {\n  margin-left: 0.27778em;\n}\n.katex .mord + .minner {\n  margin-left: 0.16667em;\n}\n.katex .mop + .mord {\n  margin-left: 0.16667em;\n}\n.katex .mop + .mop {\n  margin-left: 0.16667em;\n}\n.katex .mop + .mrel {\n  margin-left: 0.27778em;\n}\n.katex .mop + .minner {\n  margin-left: 0.16667em;\n}\n.katex .mbin + .mord {\n  margin-left: 0.22222em;\n}\n.katex .mbin + .mop {\n  margin-left: 0.22222em;\n}\n.katex .mbin + .mopen {\n  margin-left: 0.22222em;\n}\n.katex .mbin + .minner {\n  margin-left: 0.22222em;\n}\n.katex .mrel + .mord {\n  margin-left: 0.27778em;\n}\n.katex .mrel + .mop {\n  margin-left: 0.27778em;\n}\n.katex .mrel + .mopen {\n  margin-left: 0.27778em;\n}\n.katex .mrel + .minner {\n  margin-left: 0.27778em;\n}\n.katex .mclose + .mop {\n  margin-left: 0.16667em;\n}\n.katex .mclose + .mbin {\n  margin-left: 0.22222em;\n}\n.katex .mclose + .mrel {\n  margin-left: 0.27778em;\n}\n.katex .mclose + .minner {\n  margin-left: 0.16667em;\n}\n.katex .mpunct + .mord {\n  margin-left: 0.16667em;\n}\n.katex .mpunct + .mop {\n  margin-left: 0.16667em;\n}\n.katex .mpunct + .mrel {\n  margin-left: 0.16667em;\n}\n.katex .mpunct + .mopen {\n  margin-left: 0.16667em;\n}\n.katex .mpunct + .mclose {\n  margin-left: 0.16667em;\n}\n.katex .mpunct + .mpunct {\n  margin-left: 0.16667em;\n}\n.katex .mpunct + .minner {\n  margin-left: 0.16667em;\n}\n.katex .minner + .mord {\n  margin-left: 0.16667em;\n}\n.katex .minner + .mop {\n  margin-left: 0.16667em;\n}\n.katex .minner + .mbin {\n  margin-left: 0.22222em;\n}\n.katex .minner + .mrel {\n  margin-left: 0.27778em;\n}\n.katex .minner + .mopen {\n  margin-left: 0.16667em;\n}\n.katex .minner + .mpunct {\n  margin-left: 0.16667em;\n}\n.katex .minner + .minner {\n  margin-left: 0.16667em;\n}\n.katex .mord.mtight {\n  margin-left: 0;\n}\n.katex .mop.mtight {\n  margin-left: 0;\n}\n.katex .mbin.mtight {\n  margin-left: 0;\n}\n.katex .mrel.mtight {\n  margin-left: 0;\n}\n.katex .mopen.mtight {\n  margin-left: 0;\n}\n.katex .mclose.mtight {\n  margin-left: 0;\n}\n.katex .mpunct.mtight {\n  margin-left: 0;\n}\n.katex .minner.mtight {\n  margin-left: 0;\n}\n.katex .mord + .mop.mtight {\n  margin-left: 0.16667em;\n}\n.katex .mop + .mord.mtight {\n  margin-left: 0.16667em;\n}\n.katex .mop + .mop.mtight {\n  margin-left: 0.16667em;\n}\n.katex .mclose + .mop.mtight {\n  margin-left: 0.16667em;\n}\n.katex .minner + .mop.mtight {\n  margin-left: 0.16667em;\n}\n.katex .vlist-t {\n  display: inline-table;\n  table-layout: fixed;\n}\n.katex .vlist-r {\n  display: table-row;\n}\n.katex .vlist {\n  display: table-cell;\n  vertical-align: bottom;\n  position: relative;\n}\n.katex .vlist > span {\n  display: block;\n  height: 0;\n  position: relative;\n}\n.katex .vlist > span > span {\n  display: inline-block;\n}\n.katex .vlist > span > .pstrut {\n  overflow: hidden;\n  width: 0;\n}\n.katex .vlist-t2 {\n  margin-right: -2px;\n}\n.katex .vlist-s {\n  display: table-cell;\n  vertical-align: bottom;\n  font-size: 1px;\n  width: 2px;\n}\n.katex .msupsub {\n  text-align: left;\n}\n.katex .mfrac > span > span {\n  text-align: center;\n}\n.katex .mfrac .frac-line {\n  display: inline-block;\n  width: 100%;\n  border-bottom-style: solid;\n}\n.katex .mspace {\n  display: inline-block;\n}\n.katex .mspace.negativethinspace {\n  margin-left: -0.16667em;\n}\n.katex .mspace.thinspace {\n  width: 0.16667em;\n}\n.katex .mspace.negativemediumspace {\n  margin-left: -0.22222em;\n}\n.katex .mspace.mediumspace {\n  width: 0.22222em;\n}\n.katex .mspace.thickspace {\n  width: 0.27778em;\n}\n.katex .mspace.sixmuspace {\n  width: 0.333333em;\n}\n.katex .mspace.eightmuspace {\n  width: 0.444444em;\n}\n.katex .mspace.enspace {\n  width: 0.5em;\n}\n.katex .mspace.twelvemuspace {\n  width: 0.666667em;\n}\n.katex .mspace.quad {\n  width: 1em;\n}\n.katex .mspace.qquad {\n  width: 2em;\n}\n.katex .llap,\n.katex .rlap {\n  width: 0;\n  position: relative;\n}\n.katex .llap > .inner,\n.katex .rlap > .inner {\n  position: absolute;\n}\n.katex .llap > .fix,\n.katex .rlap > .fix {\n  display: inline-block;\n}\n.katex .llap > .inner {\n  right: 0;\n}\n.katex .rlap > .inner {\n  left: 0;\n}\n.katex .katex-logo .a {\n  font-size: 0.75em;\n  margin-left: -0.32em;\n  position: relative;\n  top: -0.2em;\n}\n.katex .katex-logo .t {\n  margin-left: -0.23em;\n}\n.katex .katex-logo .e {\n  margin-left: -0.1667em;\n  position: relative;\n  top: 0.2155em;\n}\n.katex .katex-logo .x {\n  margin-left: -0.125em;\n}\n.katex .rule {\n  display: inline-block;\n  border: solid 0;\n  position: relative;\n}\n.katex .overline .overline-line,\n.katex .underline .underline-line {\n  display: inline-block;\n  width: 100%;\n  border-bottom-style: solid;\n}\n.katex .sqrt > .root {\n  margin-left: 0.27777778em;\n  margin-right: -0.55555556em;\n}\n.katex .sizing,\n.katex .fontsize-ensurer {\n  display: inline-block;\n}\n.katex .sizing.reset-size1.size1,\n.katex .fontsize-ensurer.reset-size1.size1 {\n  font-size: 1em;\n}\n.katex .sizing.reset-size1.size2,\n.katex .fontsize-ensurer.reset-size1.size2 {\n  font-size: 1.2em;\n}\n.katex .sizing.reset-size1.size3,\n.katex .fontsize-ensurer.reset-size1.size3 {\n  font-size: 1.4em;\n}\n.katex .sizing.reset-size1.size4,\n.katex .fontsize-ensurer.reset-size1.size4 {\n  font-size: 1.6em;\n}\n.katex .sizing.reset-size1.size5,\n.katex .fontsize-ensurer.reset-size1.size5 {\n  font-size: 1.8em;\n}\n.katex .sizing.reset-size1.size6,\n.katex .fontsize-ensurer.reset-size1.size6 {\n  font-size: 2em;\n}\n.katex .sizing.reset-size1.size7,\n.katex .fontsize-ensurer.reset-size1.size7 {\n  font-size: 2.4em;\n}\n.katex .sizing.reset-size1.size8,\n.katex .fontsize-ensurer.reset-size1.size8 {\n  font-size: 2.88em;\n}\n.katex .sizing.reset-size1.size9,\n.katex .fontsize-ensurer.reset-size1.size9 {\n  font-size: 3.456em;\n}\n.katex .sizing.reset-size1.size10,\n.katex .fontsize-ensurer.reset-size1.size10 {\n  font-size: 4.148em;\n}\n.katex .sizing.reset-size1.size11,\n.katex .fontsize-ensurer.reset-size1.size11 {\n  font-size: 4.976em;\n}\n.katex .sizing.reset-size2.size1,\n.katex .fontsize-ensurer.reset-size2.size1 {\n  font-size: 0.83333333em;\n}\n.katex .sizing.reset-size2.size2,\n.katex .fontsize-ensurer.reset-size2.size2 {\n  font-size: 1em;\n}\n.katex .sizing.reset-size2.size3,\n.katex .fontsize-ensurer.reset-size2.size3 {\n  font-size: 1.16666667em;\n}\n.katex .sizing.reset-size2.size4,\n.katex .fontsize-ensurer.reset-size2.size4 {\n  font-size: 1.33333333em;\n}\n.katex .sizing.reset-size2.size5,\n.katex .fontsize-ensurer.reset-size2.size5 {\n  font-size: 1.5em;\n}\n.katex .sizing.reset-size2.size6,\n.katex .fontsize-ensurer.reset-size2.size6 {\n  font-size: 1.66666667em;\n}\n.katex .sizing.reset-size2.size7,\n.katex .fontsize-ensurer.reset-size2.size7 {\n  font-size: 2em;\n}\n.katex .sizing.reset-size2.size8,\n.katex .fontsize-ensurer.reset-size2.size8 {\n  font-size: 2.4em;\n}\n.katex .sizing.reset-size2.size9,\n.katex .fontsize-ensurer.reset-size2.size9 {\n  font-size: 2.88em;\n}\n.katex .sizing.reset-size2.size10,\n.katex .fontsize-ensurer.reset-size2.size10 {\n  font-size: 3.45666667em;\n}\n.katex .sizing.reset-size2.size11,\n.katex .fontsize-ensurer.reset-size2.size11 {\n  font-size: 4.14666667em;\n}\n.katex .sizing.reset-size3.size1,\n.katex .fontsize-ensurer.reset-size3.size1 {\n  font-size: 0.71428571em;\n}\n.katex .sizing.reset-size3.size2,\n.katex .fontsize-ensurer.reset-size3.size2 {\n  font-size: 0.85714286em;\n}\n.katex .sizing.reset-size3.size3,\n.katex .fontsize-ensurer.reset-size3.size3 {\n  font-size: 1em;\n}\n.katex .sizing.reset-size3.size4,\n.katex .fontsize-ensurer.reset-size3.size4 {\n  font-size: 1.14285714em;\n}\n.katex .sizing.reset-size3.size5,\n.katex .fontsize-ensurer.reset-size3.size5 {\n  font-size: 1.28571429em;\n}\n.katex .sizing.reset-size3.size6,\n.katex .fontsize-ensurer.reset-size3.size6 {\n  font-size: 1.42857143em;\n}\n.katex .sizing.reset-size3.size7,\n.katex .fontsize-ensurer.reset-size3.size7 {\n  font-size: 1.71428571em;\n}\n.katex .sizing.reset-size3.size8,\n.katex .fontsize-ensurer.reset-size3.size8 {\n  font-size: 2.05714286em;\n}\n.katex .sizing.reset-size3.size9,\n.katex .fontsize-ensurer.reset-size3.size9 {\n  font-size: 2.46857143em;\n}\n.katex .sizing.reset-size3.size10,\n.katex .fontsize-ensurer.reset-size3.size10 {\n  font-size: 2.96285714em;\n}\n.katex .sizing.reset-size3.size11,\n.katex .fontsize-ensurer.reset-size3.size11 {\n  font-size: 3.55428571em;\n}\n.katex .sizing.reset-size4.size1,\n.katex .fontsize-ensurer.reset-size4.size1 {\n  font-size: 0.625em;\n}\n.katex .sizing.reset-size4.size2,\n.katex .fontsize-ensurer.reset-size4.size2 {\n  font-size: 0.75em;\n}\n.katex .sizing.reset-size4.size3,\n.katex .fontsize-ensurer.reset-size4.size3 {\n  font-size: 0.875em;\n}\n.katex .sizing.reset-size4.size4,\n.katex .fontsize-ensurer.reset-size4.size4 {\n  font-size: 1em;\n}\n.katex .sizing.reset-size4.size5,\n.katex .fontsize-ensurer.reset-size4.size5 {\n  font-size: 1.125em;\n}\n.katex .sizing.reset-size4.size6,\n.katex .fontsize-ensurer.reset-size4.size6 {\n  font-size: 1.25em;\n}\n.katex .sizing.reset-size4.size7,\n.katex .fontsize-ensurer.reset-size4.size7 {\n  font-size: 1.5em;\n}\n.katex .sizing.reset-size4.size8,\n.katex .fontsize-ensurer.reset-size4.size8 {\n  font-size: 1.8em;\n}\n.katex .sizing.reset-size4.size9,\n.katex .fontsize-ensurer.reset-size4.size9 {\n  font-size: 2.16em;\n}\n.katex .sizing.reset-size4.size10,\n.katex .fontsize-ensurer.reset-size4.size10 {\n  font-size: 2.5925em;\n}\n.katex .sizing.reset-size4.size11,\n.katex .fontsize-ensurer.reset-size4.size11 {\n  font-size: 3.11em;\n}\n.katex .sizing.reset-size5.size1,\n.katex .fontsize-ensurer.reset-size5.size1 {\n  font-size: 0.55555556em;\n}\n.katex .sizing.reset-size5.size2,\n.katex .fontsize-ensurer.reset-size5.size2 {\n  font-size: 0.66666667em;\n}\n.katex .sizing.reset-size5.size3,\n.katex .fontsize-ensurer.reset-size5.size3 {\n  font-size: 0.77777778em;\n}\n.katex .sizing.reset-size5.size4,\n.katex .fontsize-ensurer.reset-size5.size4 {\n  font-size: 0.88888889em;\n}\n.katex .sizing.reset-size5.size5,\n.katex .fontsize-ensurer.reset-size5.size5 {\n  font-size: 1em;\n}\n.katex .sizing.reset-size5.size6,\n.katex .fontsize-ensurer.reset-size5.size6 {\n  font-size: 1.11111111em;\n}\n.katex .sizing.reset-size5.size7,\n.katex .fontsize-ensurer.reset-size5.size7 {\n  font-size: 1.33333333em;\n}\n.katex .sizing.reset-size5.size8,\n.katex .fontsize-ensurer.reset-size5.size8 {\n  font-size: 1.6em;\n}\n.katex .sizing.reset-size5.size9,\n.katex .fontsize-ensurer.reset-size5.size9 {\n  font-size: 1.92em;\n}\n.katex .sizing.reset-size5.size10,\n.katex .fontsize-ensurer.reset-size5.size10 {\n  font-size: 2.30444444em;\n}\n.katex .sizing.reset-size5.size11,\n.katex .fontsize-ensurer.reset-size5.size11 {\n  font-size: 2.76444444em;\n}\n.katex .sizing.reset-size6.size1,\n.katex .fontsize-ensurer.reset-size6.size1 {\n  font-size: 0.5em;\n}\n.katex .sizing.reset-size6.size2,\n.katex .fontsize-ensurer.reset-size6.size2 {\n  font-size: 0.6em;\n}\n.katex .sizing.reset-size6.size3,\n.katex .fontsize-ensurer.reset-size6.size3 {\n  font-size: 0.7em;\n}\n.katex .sizing.reset-size6.size4,\n.katex .fontsize-ensurer.reset-size6.size4 {\n  font-size: 0.8em;\n}\n.katex .sizing.reset-size6.size5,\n.katex .fontsize-ensurer.reset-size6.size5 {\n  font-size: 0.9em;\n}\n.katex .sizing.reset-size6.size6,\n.katex .fontsize-ensurer.reset-size6.size6 {\n  font-size: 1em;\n}\n.katex .sizing.reset-size6.size7,\n.katex .fontsize-ensurer.reset-size6.size7 {\n  font-size: 1.2em;\n}\n.katex .sizing.reset-size6.size8,\n.katex .fontsize-ensurer.reset-size6.size8 {\n  font-size: 1.44em;\n}\n.katex .sizing.reset-size6.size9,\n.katex .fontsize-ensurer.reset-size6.size9 {\n  font-size: 1.728em;\n}\n.katex .sizing.reset-size6.size10,\n.katex .fontsize-ensurer.reset-size6.size10 {\n  font-size: 2.074em;\n}\n.katex .sizing.reset-size6.size11,\n.katex .fontsize-ensurer.reset-size6.size11 {\n  font-size: 2.488em;\n}\n.katex .sizing.reset-size7.size1,\n.katex .fontsize-ensurer.reset-size7.size1 {\n  font-size: 0.41666667em;\n}\n.katex .sizing.reset-size7.size2,\n.katex .fontsize-ensurer.reset-size7.size2 {\n  font-size: 0.5em;\n}\n.katex .sizing.reset-size7.size3,\n.katex .fontsize-ensurer.reset-size7.size3 {\n  font-size: 0.58333333em;\n}\n.katex .sizing.reset-size7.size4,\n.katex .fontsize-ensurer.reset-size7.size4 {\n  font-size: 0.66666667em;\n}\n.katex .sizing.reset-size7.size5,\n.katex .fontsize-ensurer.reset-size7.size5 {\n  font-size: 0.75em;\n}\n.katex .sizing.reset-size7.size6,\n.katex .fontsize-ensurer.reset-size7.size6 {\n  font-size: 0.83333333em;\n}\n.katex .sizing.reset-size7.size7,\n.katex .fontsize-ensurer.reset-size7.size7 {\n  font-size: 1em;\n}\n.katex .sizing.reset-size7.size8,\n.katex .fontsize-ensurer.reset-size7.size8 {\n  font-size: 1.2em;\n}\n.katex .sizing.reset-size7.size9,\n.katex .fontsize-ensurer.reset-size7.size9 {\n  font-size: 1.44em;\n}\n.katex .sizing.reset-size7.size10,\n.katex .fontsize-ensurer.reset-size7.size10 {\n  font-size: 1.72833333em;\n}\n.katex .sizing.reset-size7.size11,\n.katex .fontsize-ensurer.reset-size7.size11 {\n  font-size: 2.07333333em;\n}\n.katex .sizing.reset-size8.size1,\n.katex .fontsize-ensurer.reset-size8.size1 {\n  font-size: 0.34722222em;\n}\n.katex .sizing.reset-size8.size2,\n.katex .fontsize-ensurer.reset-size8.size2 {\n  font-size: 0.41666667em;\n}\n.katex .sizing.reset-size8.size3,\n.katex .fontsize-ensurer.reset-size8.size3 {\n  font-size: 0.48611111em;\n}\n.katex .sizing.reset-size8.size4,\n.katex .fontsize-ensurer.reset-size8.size4 {\n  font-size: 0.55555556em;\n}\n.katex .sizing.reset-size8.size5,\n.katex .fontsize-ensurer.reset-size8.size5 {\n  font-size: 0.625em;\n}\n.katex .sizing.reset-size8.size6,\n.katex .fontsize-ensurer.reset-size8.size6 {\n  font-size: 0.69444444em;\n}\n.katex .sizing.reset-size8.size7,\n.katex .fontsize-ensurer.reset-size8.size7 {\n  font-size: 0.83333333em;\n}\n.katex .sizing.reset-size8.size8,\n.katex .fontsize-ensurer.reset-size8.size8 {\n  font-size: 1em;\n}\n.katex .sizing.reset-size8.size9,\n.katex .fontsize-ensurer.reset-size8.size9 {\n  font-size: 1.2em;\n}\n.katex .sizing.reset-size8.size10,\n.katex .fontsize-ensurer.reset-size8.size10 {\n  font-size: 1.44027778em;\n}\n.katex .sizing.reset-size8.size11,\n.katex .fontsize-ensurer.reset-size8.size11 {\n  font-size: 1.72777778em;\n}\n.katex .sizing.reset-size9.size1,\n.katex .fontsize-ensurer.reset-size9.size1 {\n  font-size: 0.28935185em;\n}\n.katex .sizing.reset-size9.size2,\n.katex .fontsize-ensurer.reset-size9.size2 {\n  font-size: 0.34722222em;\n}\n.katex .sizing.reset-size9.size3,\n.katex .fontsize-ensurer.reset-size9.size3 {\n  font-size: 0.40509259em;\n}\n.katex .sizing.reset-size9.size4,\n.katex .fontsize-ensurer.reset-size9.size4 {\n  font-size: 0.46296296em;\n}\n.katex .sizing.reset-size9.size5,\n.katex .fontsize-ensurer.reset-size9.size5 {\n  font-size: 0.52083333em;\n}\n.katex .sizing.reset-size9.size6,\n.katex .fontsize-ensurer.reset-size9.size6 {\n  font-size: 0.5787037em;\n}\n.katex .sizing.reset-size9.size7,\n.katex .fontsize-ensurer.reset-size9.size7 {\n  font-size: 0.69444444em;\n}\n.katex .sizing.reset-size9.size8,\n.katex .fontsize-ensurer.reset-size9.size8 {\n  font-size: 0.83333333em;\n}\n.katex .sizing.reset-size9.size9,\n.katex .fontsize-ensurer.reset-size9.size9 {\n  font-size: 1em;\n}\n.katex .sizing.reset-size9.size10,\n.katex .fontsize-ensurer.reset-size9.size10 {\n  font-size: 1.20023148em;\n}\n.katex .sizing.reset-size9.size11,\n.katex .fontsize-ensurer.reset-size9.size11 {\n  font-size: 1.43981481em;\n}\n.katex .sizing.reset-size10.size1,\n.katex .fontsize-ensurer.reset-size10.size1 {\n  font-size: 0.24108004em;\n}\n.katex .sizing.reset-size10.size2,\n.katex .fontsize-ensurer.reset-size10.size2 {\n  font-size: 0.28929605em;\n}\n.katex .sizing.reset-size10.size3,\n.katex .fontsize-ensurer.reset-size10.size3 {\n  font-size: 0.33751205em;\n}\n.katex .sizing.reset-size10.size4,\n.katex .fontsize-ensurer.reset-size10.size4 {\n  font-size: 0.38572806em;\n}\n.katex .sizing.reset-size10.size5,\n.katex .fontsize-ensurer.reset-size10.size5 {\n  font-size: 0.43394407em;\n}\n.katex .sizing.reset-size10.size6,\n.katex .fontsize-ensurer.reset-size10.size6 {\n  font-size: 0.48216008em;\n}\n.katex .sizing.reset-size10.size7,\n.katex .fontsize-ensurer.reset-size10.size7 {\n  font-size: 0.57859209em;\n}\n.katex .sizing.reset-size10.size8,\n.katex .fontsize-ensurer.reset-size10.size8 {\n  font-size: 0.69431051em;\n}\n.katex .sizing.reset-size10.size9,\n.katex .fontsize-ensurer.reset-size10.size9 {\n  font-size: 0.83317261em;\n}\n.katex .sizing.reset-size10.size10,\n.katex .fontsize-ensurer.reset-size10.size10 {\n  font-size: 1em;\n}\n.katex .sizing.reset-size10.size11,\n.katex .fontsize-ensurer.reset-size10.size11 {\n  font-size: 1.19961427em;\n}\n.katex .sizing.reset-size11.size1,\n.katex .fontsize-ensurer.reset-size11.size1 {\n  font-size: 0.20096463em;\n}\n.katex .sizing.reset-size11.size2,\n.katex .fontsize-ensurer.reset-size11.size2 {\n  font-size: 0.24115756em;\n}\n.katex .sizing.reset-size11.size3,\n.katex .fontsize-ensurer.reset-size11.size3 {\n  font-size: 0.28135048em;\n}\n.katex .sizing.reset-size11.size4,\n.katex .fontsize-ensurer.reset-size11.size4 {\n  font-size: 0.32154341em;\n}\n.katex .sizing.reset-size11.size5,\n.katex .fontsize-ensurer.reset-size11.size5 {\n  font-size: 0.36173633em;\n}\n.katex .sizing.reset-size11.size6,\n.katex .fontsize-ensurer.reset-size11.size6 {\n  font-size: 0.40192926em;\n}\n.katex .sizing.reset-size11.size7,\n.katex .fontsize-ensurer.reset-size11.size7 {\n  font-size: 0.48231511em;\n}\n.katex .sizing.reset-size11.size8,\n.katex .fontsize-ensurer.reset-size11.size8 {\n  font-size: 0.57877814em;\n}\n.katex .sizing.reset-size11.size9,\n.katex .fontsize-ensurer.reset-size11.size9 {\n  font-size: 0.69453376em;\n}\n.katex .sizing.reset-size11.size10,\n.katex .fontsize-ensurer.reset-size11.size10 {\n  font-size: 0.83360129em;\n}\n.katex .sizing.reset-size11.size11,\n.katex .fontsize-ensurer.reset-size11.size11 {\n  font-size: 1em;\n}\n.katex .delimsizing.size1 {\n  font-family: KaTeX_Size1;\n}\n.katex .delimsizing.size2 {\n  font-family: KaTeX_Size2;\n}\n.katex .delimsizing.size3 {\n  font-family: KaTeX_Size3;\n}\n.katex .delimsizing.size4 {\n  font-family: KaTeX_Size4;\n}\n.katex .delimsizing.mult .delim-size1 > span {\n  font-family: KaTeX_Size1;\n}\n.katex .delimsizing.mult .delim-size4 > span {\n  font-family: KaTeX_Size4;\n}\n.katex .nulldelimiter {\n  display: inline-block;\n  width: 0.12em;\n}\n.katex .delimcenter {\n  position: relative;\n}\n.katex .op-symbol {\n  position: relative;\n}\n.katex .op-symbol.small-op {\n  font-family: KaTeX_Size1;\n}\n.katex .op-symbol.large-op {\n  font-family: KaTeX_Size2;\n}\n.katex .op-limits > .vlist-t {\n  text-align: center;\n}\n.katex .accent > .vlist-t {\n  text-align: center;\n}\n.katex .accent .accent-body > span {\n  width: 0;\n}\n.katex .accent .accent-body.accent-vec > span {\n  position: relative;\n  left: 0.326em;\n}\n.katex .accent .accent-body.accent-hungarian > span {\n  position: relative;\n  left: 0.250em;\n}\n.katex .mtable .vertical-separator {\n  display: inline-block;\n  margin: 0 -0.025em;\n  border-right: 0.05em solid black;\n}\n.katex .mtable .arraycolsep {\n  display: inline-block;\n}\n.katex .mtable .col-align-c > .vlist-t {\n  text-align: center;\n}\n.katex .mtable .col-align-l > .vlist-t {\n  text-align: left;\n}\n.katex .mtable .col-align-r > .vlist-t {\n  text-align: right;\n}\n.katex .svg-align {\n  text-align: left;\n}\n.katex svg {\n  display: block;\n  position: absolute;\n  width: 100%;\n}\n.katex svg path {\n  fill: currentColor;\n}\n.katex svg line {\n  stroke: currentColor;\n}\n.katex .stretchy {\n  width: 100%;\n  display: block;\n}\n.katex .stretchy:before,\n.katex .stretchy:after {\n  content: \"\";\n}\n.katex .x-arrow-pad {\n  padding: 0 0.5em;\n}\n.katex .x-arrow,\n.katex .mover,\n.katex .munder {\n  text-align: center;\n}\n.katex .boxpad {\n  padding: 0 0.3em 0 0.3em;\n}\n.katex .fbox {\n  box-sizing: border-box;\n  border: 0.04em solid black;\n}\n.katex .cancel-pad {\n  padding: 0 0.2em 0 0.2em;\n}\n.katex .mord + .cancel-lap,\n.katex .mbin + .cancel-lap {\n  margin-left: -0.2em;\n}\n.katex .cancel-lap + .mord,\n.katex .cancel-lap + .mbin,\n.katex .cancel-lap + .msupsub {\n  margin-left: -0.2em;\n}\n.katex .sout {\n  border-bottom-style: solid;\n  border-bottom-width: 0.08em;\n}\n"
  },
  {
    "path": "static/katex/katex.js",
    "content": "(function(f){if(typeof exports===\"object\"&&typeof module!==\"undefined\"){module.exports=f()}else if(typeof define===\"function\"&&define.amd){define([],f)}else{var g;if(typeof window!==\"undefined\"){g=window}else if(typeof global!==\"undefined\"){g=global}else if(typeof self!==\"undefined\"){g=self}else{g=this}g.katex = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require==\"function\"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error(\"Cannot find module '\"+o+\"'\");throw f.code=\"MODULE_NOT_FOUND\",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require==\"function\"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){\n\"use strict\";\n\nvar _ParseError = require(\"./src/ParseError\");\n\nvar _ParseError2 = _interopRequireDefault(_ParseError);\n\nvar _Settings = require(\"./src/Settings\");\n\nvar _Settings2 = _interopRequireDefault(_Settings);\n\nvar _buildTree = require(\"./src/buildTree\");\n\nvar _buildTree2 = _interopRequireDefault(_buildTree);\n\nvar _parseTree = require(\"./src/parseTree\");\n\nvar _parseTree2 = _interopRequireDefault(_parseTree);\n\nvar _utils = require(\"./src/utils\");\n\nvar _utils2 = _interopRequireDefault(_utils);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/**\n * Parse and build an expression, and place that expression in the DOM node\n * given.\n */\nvar render = function render(expression, baseNode, options) {\n    _utils2.default.clearNode(baseNode);\n\n    var settings = new _Settings2.default(options);\n\n    var tree = (0, _parseTree2.default)(expression, settings);\n    var node = (0, _buildTree2.default)(tree, expression, settings).toNode();\n\n    baseNode.appendChild(node);\n};\n\n// KaTeX's styles don't work properly in quirks mode. Print out an error, and\n// disable rendering.\n/* eslint no-console:0 */\n/**\n * This is the main entry point for KaTeX. Here, we expose functions for\n * rendering expressions either to DOM nodes or to markup strings.\n *\n * We also expose the ParseError class to check if errors thrown from KaTeX are\n * errors in the expression, or errors in javascript handling.\n */\n\nif (typeof document !== \"undefined\") {\n    if (document.compatMode !== \"CSS1Compat\") {\n        typeof console !== \"undefined\" && console.warn(\"Warning: KaTeX doesn't work in quirks mode. Make sure your \" + \"website has a suitable doctype.\");\n\n        render = function render() {\n            throw new _ParseError2.default(\"KaTeX doesn't work in quirks mode.\");\n        };\n    }\n}\n\n/**\n * Parse and build an expression, and return the markup for that.\n */\nvar renderToString = function renderToString(expression, options) {\n    var settings = new _Settings2.default(options);\n\n    var tree = (0, _parseTree2.default)(expression, settings);\n    return (0, _buildTree2.default)(tree, expression, settings).toMarkup();\n};\n\n/**\n * Parse an expression and return the parse tree.\n */\nvar generateParseTree = function generateParseTree(expression, options) {\n    var settings = new _Settings2.default(options);\n    return (0, _parseTree2.default)(expression, settings);\n};\n\nmodule.exports = {\n    render: render,\n    renderToString: renderToString,\n    /**\n     * NOTE: This method is not currently recommended for public use.\n     * The internal tree representation is unstable and is very likely\n     * to change. Use at your own risk.\n     */\n    __parse: generateParseTree,\n    ParseError: _ParseError2.default\n};\n\n},{\"./src/ParseError\":29,\"./src/Settings\":32,\"./src/buildTree\":37,\"./src/parseTree\":46,\"./src/utils\":51}],2:[function(require,module,exports){\nmodule.exports = { \"default\": require(\"core-js/library/fn/json/stringify\"), __esModule: true };\n},{\"core-js/library/fn/json/stringify\":6}],3:[function(require,module,exports){\nmodule.exports = { \"default\": require(\"core-js/library/fn/object/define-property\"), __esModule: true };\n},{\"core-js/library/fn/object/define-property\":7}],4:[function(require,module,exports){\n\"use strict\";\n\nexports.__esModule = true;\n\nexports.default = function (instance, Constructor) {\n  if (!(instance instanceof Constructor)) {\n    throw new TypeError(\"Cannot call a class as a function\");\n  }\n};\n},{}],5:[function(require,module,exports){\n\"use strict\";\n\nexports.__esModule = true;\n\nvar _defineProperty = require(\"../core-js/object/define-property\");\n\nvar _defineProperty2 = _interopRequireDefault(_defineProperty);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = function () {\n  function defineProperties(target, props) {\n    for (var i = 0; i < props.length; i++) {\n      var descriptor = props[i];\n      descriptor.enumerable = descriptor.enumerable || false;\n      descriptor.configurable = true;\n      if (\"value\" in descriptor) descriptor.writable = true;\n      (0, _defineProperty2.default)(target, descriptor.key, descriptor);\n    }\n  }\n\n  return function (Constructor, protoProps, staticProps) {\n    if (protoProps) defineProperties(Constructor.prototype, protoProps);\n    if (staticProps) defineProperties(Constructor, staticProps);\n    return Constructor;\n  };\n}();\n},{\"../core-js/object/define-property\":3}],6:[function(require,module,exports){\nvar core  = require('../../modules/_core')\n  , $JSON = core.JSON || (core.JSON = {stringify: JSON.stringify});\nmodule.exports = function stringify(it){ // eslint-disable-line no-unused-vars\n  return $JSON.stringify.apply($JSON, arguments);\n};\n},{\"../../modules/_core\":10}],7:[function(require,module,exports){\nrequire('../../modules/es6.object.define-property');\nvar $Object = require('../../modules/_core').Object;\nmodule.exports = function defineProperty(it, key, desc){\n  return $Object.defineProperty(it, key, desc);\n};\n},{\"../../modules/_core\":10,\"../../modules/es6.object.define-property\":23}],8:[function(require,module,exports){\nmodule.exports = function(it){\n  if(typeof it != 'function')throw TypeError(it + ' is not a function!');\n  return it;\n};\n},{}],9:[function(require,module,exports){\nvar isObject = require('./_is-object');\nmodule.exports = function(it){\n  if(!isObject(it))throw TypeError(it + ' is not an object!');\n  return it;\n};\n},{\"./_is-object\":19}],10:[function(require,module,exports){\nvar core = module.exports = {version: '2.4.0'};\nif(typeof __e == 'number')__e = core; // eslint-disable-line no-undef\n},{}],11:[function(require,module,exports){\n// optional / simple context binding\nvar aFunction = require('./_a-function');\nmodule.exports = function(fn, that, length){\n  aFunction(fn);\n  if(that === undefined)return fn;\n  switch(length){\n    case 1: return function(a){\n      return fn.call(that, a);\n    };\n    case 2: return function(a, b){\n      return fn.call(that, a, b);\n    };\n    case 3: return function(a, b, c){\n      return fn.call(that, a, b, c);\n    };\n  }\n  return function(/* ...args */){\n    return fn.apply(that, arguments);\n  };\n};\n},{\"./_a-function\":8}],12:[function(require,module,exports){\n// Thank's IE8 for his funny defineProperty\nmodule.exports = !require('./_fails')(function(){\n  return Object.defineProperty({}, 'a', {get: function(){ return 7; }}).a != 7;\n});\n},{\"./_fails\":15}],13:[function(require,module,exports){\nvar isObject = require('./_is-object')\n  , document = require('./_global').document\n  // in old IE typeof document.createElement is 'object'\n  , is = isObject(document) && isObject(document.createElement);\nmodule.exports = function(it){\n  return is ? document.createElement(it) : {};\n};\n},{\"./_global\":16,\"./_is-object\":19}],14:[function(require,module,exports){\nvar global    = require('./_global')\n  , core      = require('./_core')\n  , ctx       = require('./_ctx')\n  , hide      = require('./_hide')\n  , PROTOTYPE = 'prototype';\n\nvar $export = function(type, name, source){\n  var IS_FORCED = type & $export.F\n    , IS_GLOBAL = type & $export.G\n    , IS_STATIC = type & $export.S\n    , IS_PROTO  = type & $export.P\n    , IS_BIND   = type & $export.B\n    , IS_WRAP   = type & $export.W\n    , exports   = IS_GLOBAL ? core : core[name] || (core[name] = {})\n    , expProto  = exports[PROTOTYPE]\n    , target    = IS_GLOBAL ? global : IS_STATIC ? global[name] : (global[name] || {})[PROTOTYPE]\n    , key, own, out;\n  if(IS_GLOBAL)source = name;\n  for(key in source){\n    // contains in native\n    own = !IS_FORCED && target && target[key] !== undefined;\n    if(own && key in exports)continue;\n    // export native or passed\n    out = own ? target[key] : source[key];\n    // prevent global pollution for namespaces\n    exports[key] = IS_GLOBAL && typeof target[key] != 'function' ? source[key]\n    // bind timers to global for call from export context\n    : IS_BIND && own ? ctx(out, global)\n    // wrap global constructors for prevent change them in library\n    : IS_WRAP && target[key] == out ? (function(C){\n      var F = function(a, b, c){\n        if(this instanceof C){\n          switch(arguments.length){\n            case 0: return new C;\n            case 1: return new C(a);\n            case 2: return new C(a, b);\n          } return new C(a, b, c);\n        } return C.apply(this, arguments);\n      };\n      F[PROTOTYPE] = C[PROTOTYPE];\n      return F;\n    // make static versions for prototype methods\n    })(out) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out;\n    // export proto methods to core.%CONSTRUCTOR%.methods.%NAME%\n    if(IS_PROTO){\n      (exports.virtual || (exports.virtual = {}))[key] = out;\n      // export proto methods to core.%CONSTRUCTOR%.prototype.%NAME%\n      if(type & $export.R && expProto && !expProto[key])hide(expProto, key, out);\n    }\n  }\n};\n// type bitmap\n$export.F = 1;   // forced\n$export.G = 2;   // global\n$export.S = 4;   // static\n$export.P = 8;   // proto\n$export.B = 16;  // bind\n$export.W = 32;  // wrap\n$export.U = 64;  // safe\n$export.R = 128; // real proto method for `library` \nmodule.exports = $export;\n},{\"./_core\":10,\"./_ctx\":11,\"./_global\":16,\"./_hide\":17}],15:[function(require,module,exports){\nmodule.exports = function(exec){\n  try {\n    return !!exec();\n  } catch(e){\n    return true;\n  }\n};\n},{}],16:[function(require,module,exports){\n// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028\nvar global = module.exports = typeof window != 'undefined' && window.Math == Math\n  ? window : typeof self != 'undefined' && self.Math == Math ? self : Function('return this')();\nif(typeof __g == 'number')__g = global; // eslint-disable-line no-undef\n},{}],17:[function(require,module,exports){\nvar dP         = require('./_object-dp')\n  , createDesc = require('./_property-desc');\nmodule.exports = require('./_descriptors') ? function(object, key, value){\n  return dP.f(object, key, createDesc(1, value));\n} : function(object, key, value){\n  object[key] = value;\n  return object;\n};\n},{\"./_descriptors\":12,\"./_object-dp\":20,\"./_property-desc\":21}],18:[function(require,module,exports){\nmodule.exports = !require('./_descriptors') && !require('./_fails')(function(){\n  return Object.defineProperty(require('./_dom-create')('div'), 'a', {get: function(){ return 7; }}).a != 7;\n});\n},{\"./_descriptors\":12,\"./_dom-create\":13,\"./_fails\":15}],19:[function(require,module,exports){\nmodule.exports = function(it){\n  return typeof it === 'object' ? it !== null : typeof it === 'function';\n};\n},{}],20:[function(require,module,exports){\nvar anObject       = require('./_an-object')\n  , IE8_DOM_DEFINE = require('./_ie8-dom-define')\n  , toPrimitive    = require('./_to-primitive')\n  , dP             = Object.defineProperty;\n\nexports.f = require('./_descriptors') ? Object.defineProperty : function defineProperty(O, P, Attributes){\n  anObject(O);\n  P = toPrimitive(P, true);\n  anObject(Attributes);\n  if(IE8_DOM_DEFINE)try {\n    return dP(O, P, Attributes);\n  } catch(e){ /* empty */ }\n  if('get' in Attributes || 'set' in Attributes)throw TypeError('Accessors not supported!');\n  if('value' in Attributes)O[P] = Attributes.value;\n  return O;\n};\n},{\"./_an-object\":9,\"./_descriptors\":12,\"./_ie8-dom-define\":18,\"./_to-primitive\":22}],21:[function(require,module,exports){\nmodule.exports = function(bitmap, value){\n  return {\n    enumerable  : !(bitmap & 1),\n    configurable: !(bitmap & 2),\n    writable    : !(bitmap & 4),\n    value       : value\n  };\n};\n},{}],22:[function(require,module,exports){\n// 7.1.1 ToPrimitive(input [, PreferredType])\nvar isObject = require('./_is-object');\n// instead of the ES6 spec version, we didn't implement @@toPrimitive case\n// and the second argument - flag - preferred type is a string\nmodule.exports = function(it, S){\n  if(!isObject(it))return it;\n  var fn, val;\n  if(S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it)))return val;\n  if(typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it)))return val;\n  if(!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it)))return val;\n  throw TypeError(\"Can't convert object to primitive value\");\n};\n},{\"./_is-object\":19}],23:[function(require,module,exports){\nvar $export = require('./_export');\n// 19.1.2.4 / 15.2.3.6 Object.defineProperty(O, P, Attributes)\n$export($export.S + $export.F * !require('./_descriptors'), 'Object', {defineProperty: require('./_object-dp').f});\n},{\"./_descriptors\":12,\"./_export\":14,\"./_object-dp\":20}],24:[function(require,module,exports){\n/** @flow */\n\n\"use strict\";\n\nfunction getRelocatable(re) {\n  // In the future, this could use a WeakMap instead of an expando.\n  if (!re.__matchAtRelocatable) {\n    // Disjunctions are the lowest-precedence operator, so we can make any\n    // pattern match the empty string by appending `|()` to it:\n    // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-patterns\n    var source = re.source + \"|()\";\n\n    // We always make the new regex global.\n    var flags = \"g\" + (re.ignoreCase ? \"i\" : \"\") + (re.multiline ? \"m\" : \"\") + (re.unicode ? \"u\" : \"\")\n    // sticky (/.../y) doesn't make sense in conjunction with our relocation\n    // logic, so we ignore it here.\n    ;\n\n    re.__matchAtRelocatable = new RegExp(source, flags);\n  }\n  return re.__matchAtRelocatable;\n}\n\nfunction matchAt(re, str, pos) {\n  if (re.global || re.sticky) {\n    throw new Error(\"matchAt(...): Only non-global regexes are supported\");\n  }\n  var reloc = getRelocatable(re);\n  reloc.lastIndex = pos;\n  var match = reloc.exec(str);\n  // Last capturing group is our sentinel that indicates whether the regex\n  // matched at the given location.\n  if (match[match.length - 1] == null) {\n    // Original regex matched.\n    match.length = match.length - 1;\n    return match;\n  } else {\n    return null;\n  }\n}\n\nmodule.exports = matchAt;\n},{}],25:[function(require,module,exports){\n'use strict';\n/* eslint-disable no-unused-vars */\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nvar propIsEnumerable = Object.prototype.propertyIsEnumerable;\n\nfunction toObject(val) {\n\tif (val === null || val === undefined) {\n\t\tthrow new TypeError('Object.assign cannot be called with null or undefined');\n\t}\n\n\treturn Object(val);\n}\n\nfunction shouldUseNative() {\n\ttry {\n\t\tif (!Object.assign) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Detect buggy property enumeration order in older V8 versions.\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=4118\n\t\tvar test1 = new String('abc');  // eslint-disable-line\n\t\ttest1[5] = 'de';\n\t\tif (Object.getOwnPropertyNames(test1)[0] === '5') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test2 = {};\n\t\tfor (var i = 0; i < 10; i++) {\n\t\t\ttest2['_' + String.fromCharCode(i)] = i;\n\t\t}\n\t\tvar order2 = Object.getOwnPropertyNames(test2).map(function (n) {\n\t\t\treturn test2[n];\n\t\t});\n\t\tif (order2.join('') !== '0123456789') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test3 = {};\n\t\t'abcdefghijklmnopqrst'.split('').forEach(function (letter) {\n\t\t\ttest3[letter] = letter;\n\t\t});\n\t\tif (Object.keys(Object.assign({}, test3)).join('') !==\n\t\t\t\t'abcdefghijklmnopqrst') {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t} catch (e) {\n\t\t// We don't expect any of the above to throw, but better to be safe.\n\t\treturn false;\n\t}\n}\n\nmodule.exports = shouldUseNative() ? Object.assign : function (target, source) {\n\tvar from;\n\tvar to = toObject(target);\n\tvar symbols;\n\n\tfor (var s = 1; s < arguments.length; s++) {\n\t\tfrom = Object(arguments[s]);\n\n\t\tfor (var key in from) {\n\t\t\tif (hasOwnProperty.call(from, key)) {\n\t\t\t\tto[key] = from[key];\n\t\t\t}\n\t\t}\n\n\t\tif (Object.getOwnPropertySymbols) {\n\t\t\tsymbols = Object.getOwnPropertySymbols(from);\n\t\t\tfor (var i = 0; i < symbols.length; i++) {\n\t\t\t\tif (propIsEnumerable.call(from, symbols[i])) {\n\t\t\t\t\tto[symbols[i]] = from[symbols[i]];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn to;\n};\n\n},{}],26:[function(require,module,exports){\n\"use strict\";\n\nvar _classCallCheck2 = require(\"babel-runtime/helpers/classCallCheck\");\n\nvar _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\nvar _createClass2 = require(\"babel-runtime/helpers/createClass\");\n\nvar _createClass3 = _interopRequireDefault(_createClass2);\n\nvar _matchAt = require(\"match-at\");\n\nvar _matchAt2 = _interopRequireDefault(_matchAt);\n\nvar _ParseError = require(\"./ParseError\");\n\nvar _ParseError2 = _interopRequireDefault(_ParseError);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/**\n * The resulting token returned from `lex`.\n *\n * It consists of the token text plus some position information.\n * The position information is essentially a range in an input string,\n * but instead of referencing the bare input string, we refer to the lexer.\n * That way it is possible to attach extra metadata to the input string,\n * like for example a file name or similar.\n *\n * The position information (all three parameters) is optional,\n * so it is OK to construct synthetic tokens if appropriate.\n * Not providing available position information may lead to\n * degraded error reporting, though.\n *\n * @param {string}  text   the text of this token\n * @param {number=} start  the start offset, zero-based inclusive\n * @param {number=} end    the end offset, zero-based exclusive\n * @param {Lexer=}  lexer  the lexer which in turn holds the input string\n */\n/**\n * The Lexer class handles tokenizing the input in various ways. Since our\n * parser expects us to be able to backtrack, the lexer allows lexing from any\n * given starting point.\n *\n * Its main exposed function is the `lex` function, which takes a position to\n * lex from and a type of token to lex. It defers to the appropriate `_innerLex`\n * function.\n *\n * The various `_innerLex` functions perform the actual lexing of different\n * kinds.\n */\n\nvar Token = function () {\n    function Token(text, start, end, lexer) {\n        (0, _classCallCheck3.default)(this, Token);\n\n        this.text = text;\n        this.start = start;\n        this.end = end;\n        this.lexer = lexer;\n    }\n\n    /**\n     * Given a pair of tokens (this and endToken), compute a “Token” encompassing\n     * the whole input range enclosed by these two.\n     *\n     * @param {Token}  endToken  last token of the range, inclusive\n     * @param {string} text      the text of the newly constructed token\n     */\n\n\n    (0, _createClass3.default)(Token, [{\n        key: \"range\",\n        value: function range(endToken, text) {\n            if (endToken.lexer !== this.lexer) {\n                return new Token(text); // sorry, no position information available\n            }\n            return new Token(text, this.start, endToken.end, this.lexer);\n        }\n    }]);\n    return Token;\n}();\n\n/* The following tokenRegex\n * - matches typical whitespace (but not NBSP etc.) using its first group\n * - does not match any control character \\x00-\\x1f except whitespace\n * - does not match a bare backslash\n * - matches any ASCII character except those just mentioned\n * - does not match the BMP private use area \\uE000-\\uF8FF\n * - does not match bare surrogate code units\n * - matches any BMP character except for those just described\n * - matches any valid Unicode surrogate pair\n * - matches a backslash followed by one or more letters\n * - matches a backslash followed by any BMP character, including newline\n * Just because the Lexer matches something doesn't mean it's valid input:\n * If there is no matching function or symbol definition, the Parser will\n * still reject the input.\n */\n\n\nvar tokenRegex = new RegExp(\"([ \\r\\n\\t]+)|\" + // whitespace\n\"([!-\\\\[\\\\]-\\u2027\\u202A-\\uD7FF\\uF900-\\uFFFF]\" + // single codepoint\n\"|[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]\" + // surrogate pair\n\"|\\\\\\\\(?:[a-zA-Z]+|[^\\uD800-\\uDFFF])\" + // function name\n\")\");\n\n/*\n * Main Lexer class\n */\n\nvar Lexer = function () {\n    function Lexer(input) {\n        (0, _classCallCheck3.default)(this, Lexer);\n\n        this.input = input;\n        this.pos = 0;\n    }\n\n    /**\n     * This function lexes a single token.\n     */\n\n\n    (0, _createClass3.default)(Lexer, [{\n        key: \"lex\",\n        value: function lex() {\n            var input = this.input;\n            var pos = this.pos;\n            if (pos === input.length) {\n                return new Token(\"EOF\", pos, pos, this);\n            }\n            var match = (0, _matchAt2.default)(tokenRegex, input, pos);\n            if (match === null) {\n                throw new _ParseError2.default(\"Unexpected character: '\" + input[pos] + \"'\", new Token(input[pos], pos, pos + 1, this));\n            }\n            var text = match[2] || \" \";\n            var start = this.pos;\n            this.pos += match[0].length;\n            var end = this.pos;\n            return new Token(text, start, end, this);\n        }\n    }]);\n    return Lexer;\n}();\n\nmodule.exports = Lexer;\n\n},{\"./ParseError\":29,\"babel-runtime/helpers/classCallCheck\":4,\"babel-runtime/helpers/createClass\":5,\"match-at\":24}],27:[function(require,module,exports){\n\"use strict\";\n\nvar _classCallCheck2 = require(\"babel-runtime/helpers/classCallCheck\");\n\nvar _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\nvar _createClass2 = require(\"babel-runtime/helpers/createClass\");\n\nvar _createClass3 = _interopRequireDefault(_createClass2);\n\nvar _Lexer = require(\"./Lexer\");\n\nvar _Lexer2 = _interopRequireDefault(_Lexer);\n\nvar _macros = require(\"./macros\");\n\nvar _macros2 = _interopRequireDefault(_macros);\n\nvar _ParseError = require(\"./ParseError\");\n\nvar _ParseError2 = _interopRequireDefault(_ParseError);\n\nvar _objectAssign = require(\"object-assign\");\n\nvar _objectAssign2 = _interopRequireDefault(_objectAssign);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/**\n * This file contains the “gullet” where macros are expanded\n * until only non-macro tokens remain.\n */\n\nvar MacroExpander = function () {\n    function MacroExpander(input, macros) {\n        (0, _classCallCheck3.default)(this, MacroExpander);\n\n        this.lexer = new _Lexer2.default(input);\n        this.macros = (0, _objectAssign2.default)({}, _macros2.default, macros);\n        this.stack = []; // contains tokens in REVERSE order\n        this.discardedWhiteSpace = [];\n    }\n\n    /**\n     * Recursively expand first token, then return first non-expandable token.\n     *\n     * At the moment, macro expansion doesn't handle delimited macros,\n     * i.e. things like those defined by \\def\\foo#1\\end{…}.\n     * See the TeX book page 202ff. for details on how those should behave.\n     */\n\n\n    (0, _createClass3.default)(MacroExpander, [{\n        key: \"nextToken\",\n        value: function nextToken() {\n            for (;;) {\n                if (this.stack.length === 0) {\n                    this.stack.push(this.lexer.lex());\n                }\n                var topToken = this.stack.pop();\n                var name = topToken.text;\n                if (!(name.charAt(0) === \"\\\\\" && this.macros.hasOwnProperty(name))) {\n                    return topToken;\n                }\n                var tok = void 0;\n                var expansion = this.macros[name];\n                if (typeof expansion === \"string\") {\n                    var numArgs = 0;\n                    if (expansion.indexOf(\"#\") !== -1) {\n                        var stripped = expansion.replace(/##/g, \"\");\n                        while (stripped.indexOf(\"#\" + (numArgs + 1)) !== -1) {\n                            ++numArgs;\n                        }\n                    }\n                    var bodyLexer = new _Lexer2.default(expansion);\n                    expansion = [];\n                    tok = bodyLexer.lex();\n                    while (tok.text !== \"EOF\") {\n                        expansion.push(tok);\n                        tok = bodyLexer.lex();\n                    }\n                    expansion.reverse(); // to fit in with stack using push and pop\n                    expansion.numArgs = numArgs;\n                    this.macros[name] = expansion;\n                }\n                if (expansion.numArgs) {\n                    var args = [];\n                    var i = void 0;\n                    // obtain arguments, either single token or balanced {…} group\n                    for (i = 0; i < expansion.numArgs; ++i) {\n                        var startOfArg = this.get(true);\n                        if (startOfArg.text === \"{\") {\n                            var arg = [];\n                            var depth = 1;\n                            while (depth !== 0) {\n                                tok = this.get(false);\n                                arg.push(tok);\n                                if (tok.text === \"{\") {\n                                    ++depth;\n                                } else if (tok.text === \"}\") {\n                                    --depth;\n                                } else if (tok.text === \"EOF\") {\n                                    throw new _ParseError2.default(\"End of input in macro argument\", startOfArg);\n                                }\n                            }\n                            arg.pop(); // remove last }\n                            arg.reverse(); // like above, to fit in with stack order\n                            args[i] = arg;\n                        } else if (startOfArg.text === \"EOF\") {\n                            throw new _ParseError2.default(\"End of input expecting macro argument\", topToken);\n                        } else {\n                            args[i] = [startOfArg];\n                        }\n                    }\n                    // paste arguments in place of the placeholders\n                    expansion = expansion.slice(); // make a shallow copy\n                    for (i = expansion.length - 1; i >= 0; --i) {\n                        tok = expansion[i];\n                        if (tok.text === \"#\") {\n                            if (i === 0) {\n                                throw new _ParseError2.default(\"Incomplete placeholder at end of macro body\", tok);\n                            }\n                            tok = expansion[--i]; // next token on stack\n                            if (tok.text === \"#\") {\n                                // ## → #\n                                expansion.splice(i + 1, 1); // drop first #\n                            } else if (/^[1-9]$/.test(tok.text)) {\n                                // expansion.splice(i, 2, arg[0], arg[1], …)\n                                // to replace placeholder with the indicated argument.\n                                // TODO: use spread once we move to ES2015\n                                expansion.splice.apply(expansion, [i, 2].concat(args[tok.text - 1]));\n                            } else {\n                                throw new _ParseError2.default(\"Not a valid argument number\", tok);\n                            }\n                        }\n                    }\n                }\n                this.stack = this.stack.concat(expansion);\n            }\n        }\n    }, {\n        key: \"get\",\n        value: function get(ignoreSpace) {\n            this.discardedWhiteSpace = [];\n            var token = this.nextToken();\n            if (ignoreSpace) {\n                while (token.text === \" \") {\n                    this.discardedWhiteSpace.push(token);\n                    token = this.nextToken();\n                }\n            }\n            return token;\n        }\n\n        /**\n         * Undo the effect of the preceding call to the get method.\n         * A call to this method MUST be immediately preceded and immediately followed\n         * by a call to get.  Only used during mode switching, i.e. after one token\n         * was got in the old mode but should get got again in a new mode\n         * with possibly different whitespace handling.\n         */\n\n    }, {\n        key: \"unget\",\n        value: function unget(token) {\n            this.stack.push(token);\n            while (this.discardedWhiteSpace.length !== 0) {\n                this.stack.push(this.discardedWhiteSpace.pop());\n            }\n        }\n    }]);\n    return MacroExpander;\n}();\n\nmodule.exports = MacroExpander;\n\n},{\"./Lexer\":26,\"./ParseError\":29,\"./macros\":44,\"babel-runtime/helpers/classCallCheck\":4,\"babel-runtime/helpers/createClass\":5,\"object-assign\":25}],28:[function(require,module,exports){\n\"use strict\";\n\nvar _classCallCheck2 = require(\"babel-runtime/helpers/classCallCheck\");\n\nvar _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\nvar _createClass2 = require(\"babel-runtime/helpers/createClass\");\n\nvar _createClass3 = _interopRequireDefault(_createClass2);\n\nvar _fontMetrics2 = require(\"./fontMetrics\");\n\nvar _fontMetrics3 = _interopRequireDefault(_fontMetrics2);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar BASESIZE = 6; /**\n                   * This file contains information about the options that the Parser carries\n                   * around with it while parsing. Data is held in an `Options` object, and when\n                   * recursing, a new `Options` object can be created with the `.with*` and\n                   * `.reset` functions.\n                   */\n\nvar sizeStyleMap = [\n// Each element contains [textsize, scriptsize, scriptscriptsize].\n// The size mappings are taken from TeX with \\normalsize=10pt.\n[1, 1, 1], // size1: [5, 5, 5]              \\tiny\n[2, 1, 1], // size2: [6, 5, 5]\n[3, 1, 1], // size3: [7, 5, 5]              \\scriptsize\n[4, 2, 1], // size4: [8, 6, 5]              \\footnotesize\n[5, 2, 1], // size5: [9, 6, 5]              \\small\n[6, 3, 1], // size6: [10, 7, 5]             \\normalsize\n[7, 4, 2], // size7: [12, 8, 6]             \\large\n[8, 6, 3], // size8: [14.4, 10, 7]          \\Large\n[9, 7, 6], // size9: [17.28, 12, 10]        \\LARGE\n[10, 8, 7], // size10: [20.74, 14.4, 12]     \\huge\n[11, 10, 9]];\n\nvar sizeMultipliers = [\n// fontMetrics.js:getFontMetrics also uses size indexes, so if\n// you change size indexes, change that function.\n0.5, 0.6, 0.7, 0.8, 0.9, 1.0, 1.2, 1.44, 1.728, 2.074, 2.488];\n\nvar sizeAtStyle = function sizeAtStyle(size, style) {\n    return style.size < 2 ? size : sizeStyleMap[size - 1][style.size - 1];\n};\n\n/**\n * This is the main options class. It contains the current style, size, color,\n * and font.\n *\n * Options objects should not be modified. To create a new Options with\n * different properties, call a `.having*` method.\n */\n\nvar Options = function () {\n    function Options(data) {\n        (0, _classCallCheck3.default)(this, Options);\n\n        this.style = data.style;\n        this.color = data.color;\n        this.size = data.size || BASESIZE;\n        this.textSize = data.textSize || this.size;\n        this.phantom = data.phantom;\n        this.font = data.font;\n        this.sizeMultiplier = sizeMultipliers[this.size - 1];\n        this._fontMetrics = null;\n    }\n\n    /**\n     * Returns a new options object with the same properties as \"this\".  Properties\n     * from \"extension\" will be copied to the new options object.\n     */\n\n\n    (0, _createClass3.default)(Options, [{\n        key: \"extend\",\n        value: function extend(extension) {\n            var data = {\n                style: this.style,\n                size: this.size,\n                textSize: this.textSize,\n                color: this.color,\n                phantom: this.phantom,\n                font: this.font\n            };\n\n            for (var key in extension) {\n                if (extension.hasOwnProperty(key)) {\n                    data[key] = extension[key];\n                }\n            }\n\n            return new Options(data);\n        }\n\n        /**\n         * Return an options object with the given style. If `this.style === style`,\n         * returns `this`.\n         */\n\n    }, {\n        key: \"havingStyle\",\n        value: function havingStyle(style) {\n            if (this.style === style) {\n                return this;\n            } else {\n                return this.extend({\n                    style: style,\n                    size: sizeAtStyle(this.textSize, style)\n                });\n            }\n        }\n\n        /**\n         * Return an options object with a cramped version of the current style. If\n         * the current style is cramped, returns `this`.\n         */\n\n    }, {\n        key: \"havingCrampedStyle\",\n        value: function havingCrampedStyle() {\n            return this.havingStyle(this.style.cramp());\n        }\n\n        /**\n         * Return an options object with the given size and in at least `\\textstyle`.\n         * Returns `this` if appropriate.\n         */\n\n    }, {\n        key: \"havingSize\",\n        value: function havingSize(size) {\n            if (this.size === size && this.textSize === size) {\n                return this;\n            } else {\n                return this.extend({\n                    style: this.style.text(),\n                    size: size,\n                    textSize: size\n                });\n            }\n        }\n\n        /**\n         * Like `this.havingSize(BASESIZE).havingStyle(style)`. If `style` is omitted,\n         * changes to at least `\\textstyle`.\n         */\n\n    }, {\n        key: \"havingBaseStyle\",\n        value: function havingBaseStyle(style) {\n            style = style || this.style.text();\n            var wantSize = sizeAtStyle(BASESIZE, style);\n            if (this.size === wantSize && this.textSize === BASESIZE && this.style === style) {\n                return this;\n            } else {\n                return this.extend({\n                    style: style,\n                    size: wantSize,\n                    baseSize: BASESIZE\n                });\n            }\n        }\n\n        /**\n         * Create a new options object with the given color.\n         */\n\n    }, {\n        key: \"withColor\",\n        value: function withColor(color) {\n            return this.extend({\n                color: color\n            });\n        }\n\n        /**\n         * Create a new options object with \"phantom\" set to true.\n         */\n\n    }, {\n        key: \"withPhantom\",\n        value: function withPhantom() {\n            return this.extend({\n                phantom: true\n            });\n        }\n\n        /**\n         * Create a new options objects with the give font.\n         */\n\n    }, {\n        key: \"withFont\",\n        value: function withFont(font) {\n            return this.extend({\n                font: font || this.font\n            });\n        }\n\n        /**\n         * Return the CSS sizing classes required to switch from enclosing options\n         * `oldOptions` to `this`. Returns an array of classes.\n         */\n\n    }, {\n        key: \"sizingClasses\",\n        value: function sizingClasses(oldOptions) {\n            if (oldOptions.size !== this.size) {\n                return [\"sizing\", \"reset-size\" + oldOptions.size, \"size\" + this.size];\n            } else {\n                return [];\n            }\n        }\n\n        /**\n         * Return the CSS sizing classes required to switch to the base size. Like\n         * `this.havingSize(BASESIZE).sizingClasses(this)`.\n         */\n\n    }, {\n        key: \"baseSizingClasses\",\n        value: function baseSizingClasses() {\n            if (this.size !== BASESIZE) {\n                return [\"sizing\", \"reset-size\" + this.size, \"size\" + BASESIZE];\n            } else {\n                return [];\n            }\n        }\n\n        /**\n         * Return the font metrics for this size.\n         */\n\n    }, {\n        key: \"fontMetrics\",\n        value: function fontMetrics() {\n            if (!this._fontMetrics) {\n                this._fontMetrics = _fontMetrics3.default.getFontMetrics(this.size);\n            }\n            return this._fontMetrics;\n        }\n\n        /**\n         * A map of color names to CSS colors.\n         * TODO(emily): Remove this when we have real macros\n         */\n\n    }, {\n        key: \"getColor\",\n\n\n        /**\n         * Gets the CSS color of the current options object, accounting for the\n         * `colorMap`.\n         */\n        value: function getColor() {\n            if (this.phantom) {\n                return \"transparent\";\n            } else {\n                return Options.colorMap[this.color] || this.color;\n            }\n        }\n    }]);\n    return Options;\n}();\n\n/**\n * The base size index.\n */\n\n\nOptions.colorMap = {\n    \"katex-blue\": \"#6495ed\",\n    \"katex-orange\": \"#ffa500\",\n    \"katex-pink\": \"#ff00af\",\n    \"katex-red\": \"#df0030\",\n    \"katex-green\": \"#28ae7b\",\n    \"katex-gray\": \"gray\",\n    \"katex-purple\": \"#9d38bd\",\n    \"katex-blueA\": \"#ccfaff\",\n    \"katex-blueB\": \"#80f6ff\",\n    \"katex-blueC\": \"#63d9ea\",\n    \"katex-blueD\": \"#11accd\",\n    \"katex-blueE\": \"#0c7f99\",\n    \"katex-tealA\": \"#94fff5\",\n    \"katex-tealB\": \"#26edd5\",\n    \"katex-tealC\": \"#01d1c1\",\n    \"katex-tealD\": \"#01a995\",\n    \"katex-tealE\": \"#208170\",\n    \"katex-greenA\": \"#b6ffb0\",\n    \"katex-greenB\": \"#8af281\",\n    \"katex-greenC\": \"#74cf70\",\n    \"katex-greenD\": \"#1fab54\",\n    \"katex-greenE\": \"#0d923f\",\n    \"katex-goldA\": \"#ffd0a9\",\n    \"katex-goldB\": \"#ffbb71\",\n    \"katex-goldC\": \"#ff9c39\",\n    \"katex-goldD\": \"#e07d10\",\n    \"katex-goldE\": \"#a75a05\",\n    \"katex-redA\": \"#fca9a9\",\n    \"katex-redB\": \"#ff8482\",\n    \"katex-redC\": \"#f9685d\",\n    \"katex-redD\": \"#e84d39\",\n    \"katex-redE\": \"#bc2612\",\n    \"katex-maroonA\": \"#ffbde0\",\n    \"katex-maroonB\": \"#ff92c6\",\n    \"katex-maroonC\": \"#ed5fa6\",\n    \"katex-maroonD\": \"#ca337c\",\n    \"katex-maroonE\": \"#9e034e\",\n    \"katex-purpleA\": \"#ddd7ff\",\n    \"katex-purpleB\": \"#c6b9fc\",\n    \"katex-purpleC\": \"#aa87ff\",\n    \"katex-purpleD\": \"#7854ab\",\n    \"katex-purpleE\": \"#543b78\",\n    \"katex-mintA\": \"#f5f9e8\",\n    \"katex-mintB\": \"#edf2df\",\n    \"katex-mintC\": \"#e0e5cc\",\n    \"katex-grayA\": \"#f6f7f7\",\n    \"katex-grayB\": \"#f0f1f2\",\n    \"katex-grayC\": \"#e3e5e6\",\n    \"katex-grayD\": \"#d6d8da\",\n    \"katex-grayE\": \"#babec2\",\n    \"katex-grayF\": \"#888d93\",\n    \"katex-grayG\": \"#626569\",\n    \"katex-grayH\": \"#3b3e40\",\n    \"katex-grayI\": \"#21242c\",\n    \"katex-kaBlue\": \"#314453\",\n    \"katex-kaGreen\": \"#71B307\"\n};\nOptions.BASESIZE = BASESIZE;\n\nmodule.exports = Options;\n\n},{\"./fontMetrics\":41,\"babel-runtime/helpers/classCallCheck\":4,\"babel-runtime/helpers/createClass\":5}],29:[function(require,module,exports){\n\"use strict\";\n\nvar _classCallCheck2 = require(\"babel-runtime/helpers/classCallCheck\");\n\nvar _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/**\n * This is the ParseError class, which is the main error thrown by KaTeX\n * functions when something has gone wrong. This is used to distinguish internal\n * errors from errors in the expression that the user provided.\n *\n * If possible, a caller should provide a Token or ParseNode with information\n * about where in the source string the problem occurred.\n *\n * @param {string} message  The error message\n * @param {(Token|ParseNode)=} token  An object providing position information\n */\nvar ParseError = function ParseError(message, token) {\n    (0, _classCallCheck3.default)(this, ParseError);\n\n    var error = \"KaTeX parse error: \" + message;\n    var start = void 0;\n    var end = void 0;\n\n    if (token && token.lexer && token.start <= token.end) {\n        // If we have the input and a position, make the error a bit fancier\n\n        // Get the input\n        var input = token.lexer.input;\n\n        // Prepend some information\n        start = token.start;\n        end = token.end;\n        if (start === input.length) {\n            error += \" at end of input: \";\n        } else {\n            error += \" at position \" + (start + 1) + \": \";\n        }\n\n        // Underline token in question using combining underscores\n        var underlined = input.slice(start, end).replace(/[^]/g, \"$&\\u0332\");\n\n        // Extract some context from the input and add it to the error\n        var left = void 0;\n        if (start > 15) {\n            left = \"…\" + input.slice(start - 15, start);\n        } else {\n            left = input.slice(0, start);\n        }\n        var right = void 0;\n        if (end + 15 < input.length) {\n            right = input.slice(end, end + 15) + \"…\";\n        } else {\n            right = input.slice(end);\n        }\n        error += left + underlined + right;\n    }\n\n    // Some hackery to make ParseError a prototype of Error\n    // See http://stackoverflow.com/a/8460753\n    var self = new Error(error);\n    self.name = \"ParseError\";\n    self.__proto__ = ParseError.prototype;\n\n    self.position = start;\n    return self;\n};\n\n// More hackery\n\n\nParseError.prototype.__proto__ = Error.prototype;\n\nmodule.exports = ParseError;\n\n},{\"babel-runtime/helpers/classCallCheck\":4}],30:[function(require,module,exports){\n\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n    value: true\n});\n\nvar _classCallCheck2 = require(\"babel-runtime/helpers/classCallCheck\");\n\nvar _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/**\n * The resulting parse tree nodes of the parse tree.\n *\n * It is possible to provide position information, so that a ParseNode can\n * fulfil a role similar to a Token in error reporting.\n * For details on the corresponding properties see Token constructor.\n * Providing such information can lead to better error reporting.\n *\n * @param {string}  type       type of node, like e.g. \"ordgroup\"\n * @param {?object} value      type-specific representation of the node\n * @param {string}  mode       parse mode in action for this node,\n *                             \"math\" or \"text\"\n * @param {Token=} firstToken  first token of the input for this node,\n *                             will omit position information if unset\n * @param {Token=} lastToken   last token of the input for this node,\n *                             will default to firstToken if unset\n */\nvar ParseNode = function ParseNode(type, value, mode, firstToken, lastToken) {\n    (0, _classCallCheck3.default)(this, ParseNode);\n\n    this.type = type;\n    this.value = value;\n    this.mode = mode;\n    if (firstToken && (!lastToken || lastToken.lexer === firstToken.lexer)) {\n        this.lexer = firstToken.lexer;\n        this.start = firstToken.start;\n        this.end = (lastToken || firstToken).end;\n    }\n};\n\nexports.default = ParseNode;\n\n},{\"babel-runtime/helpers/classCallCheck\":4}],31:[function(require,module,exports){\n\"use strict\";\n\nvar _classCallCheck2 = require(\"babel-runtime/helpers/classCallCheck\");\n\nvar _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\nvar _createClass2 = require(\"babel-runtime/helpers/createClass\");\n\nvar _createClass3 = _interopRequireDefault(_createClass2);\n\nvar _functions = require(\"./functions\");\n\nvar _functions2 = _interopRequireDefault(_functions);\n\nvar _environments = require(\"./environments\");\n\nvar _environments2 = _interopRequireDefault(_environments);\n\nvar _MacroExpander = require(\"./MacroExpander\");\n\nvar _MacroExpander2 = _interopRequireDefault(_MacroExpander);\n\nvar _symbols = require(\"./symbols\");\n\nvar _symbols2 = _interopRequireDefault(_symbols);\n\nvar _utils = require(\"./utils\");\n\nvar _utils2 = _interopRequireDefault(_utils);\n\nvar _units = require(\"./units\");\n\nvar _units2 = _interopRequireDefault(_units);\n\nvar _unicodeRegexes = require(\"./unicodeRegexes\");\n\nvar _ParseNode = require(\"./ParseNode\");\n\nvar _ParseNode2 = _interopRequireDefault(_ParseNode);\n\nvar _ParseError = require(\"./ParseError\");\n\nvar _ParseError2 = _interopRequireDefault(_ParseError);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/**\n * This file contains the parser used to parse out a TeX expression from the\n * input. Since TeX isn't context-free, standard parsers don't work particularly\n * well.\n *\n * The strategy of this parser is as such:\n *\n * The main functions (the `.parse...` ones) take a position in the current\n * parse string to parse tokens from. The lexer (found in Lexer.js, stored at\n * this.lexer) also supports pulling out tokens at arbitrary places. When\n * individual tokens are needed at a position, the lexer is called to pull out a\n * token, which is then used.\n *\n * The parser has a property called \"mode\" indicating the mode that\n * the parser is currently in. Currently it has to be one of \"math\" or\n * \"text\", which denotes whether the current environment is a math-y\n * one or a text-y one (e.g. inside \\text). Currently, this serves to\n * limit the functions which can be used in text mode.\n *\n * The main functions then return an object which contains the useful data that\n * was parsed at its given point, and a new position at the end of the parsed\n * data. The main functions can call each other and continue the parsing by\n * using the returned position as a new starting point.\n *\n * There are also extra `.handle...` functions, which pull out some reused\n * functionality into self-contained functions.\n *\n * The earlier functions return ParseNodes.\n * The later functions (which are called deeper in the parse) sometimes return\n * ParseFuncOrArgument, which contain a ParseNode as well as some data about\n * whether the parsed object is a function which is missing some arguments, or a\n * standalone object which can be used as an argument to another function.\n */\n\n/**\n * An initial function (without its arguments), or an argument to a function.\n * The `result` argument should be a ParseNode.\n */\nfunction ParseFuncOrArgument(result, isFunction, token) {\n    this.result = result;\n    // Is this a function (i.e. is it something defined in functions.js)?\n    this.isFunction = isFunction;\n    this.token = token;\n} /* eslint no-constant-condition:0 */\n\nvar Parser = function () {\n    function Parser(input, settings) {\n        (0, _classCallCheck3.default)(this, Parser);\n\n        // Create a new macro expander (gullet) and (indirectly via that) also a\n        // new lexer (mouth) for this parser (stomach, in the language of TeX)\n        this.gullet = new _MacroExpander2.default(input, settings.macros);\n        // Use old \\color behavior (same as LaTeX's \\textcolor) if requested.\n        // We do this after the macros object has been copied by MacroExpander.\n        if (settings.colorIsTextColor) {\n            this.gullet.macros[\"\\\\color\"] = \"\\\\textcolor\";\n        }\n        // Store the settings for use in parsing\n        this.settings = settings;\n        // Count leftright depth (for \\middle errors)\n        this.leftrightDepth = 0;\n    }\n\n    /**\n     * Checks a result to make sure it has the right type, and throws an\n     * appropriate error otherwise.\n     *\n     * @param {boolean=} consume whether to consume the expected token,\n     *                           defaults to true\n     */\n\n\n    (0, _createClass3.default)(Parser, [{\n        key: \"expect\",\n        value: function expect(text, consume) {\n            if (this.nextToken.text !== text) {\n                throw new _ParseError2.default(\"Expected '\" + text + \"', got '\" + this.nextToken.text + \"'\", this.nextToken);\n            }\n            if (consume !== false) {\n                this.consume();\n            }\n        }\n\n        /**\n         * Considers the current look ahead token as consumed,\n         * and fetches the one after that as the new look ahead.\n         */\n\n    }, {\n        key: \"consume\",\n        value: function consume() {\n            this.nextToken = this.gullet.get(this.mode === \"math\");\n        }\n    }, {\n        key: \"switchMode\",\n        value: function switchMode(newMode) {\n            this.gullet.unget(this.nextToken);\n            this.mode = newMode;\n            this.consume();\n        }\n\n        /**\n         * Main parsing function, which parses an entire input.\n         *\n         * @return {?Array.<ParseNode>}\n         */\n\n    }, {\n        key: \"parse\",\n        value: function parse() {\n            // Try to parse the input\n            this.mode = \"math\";\n            this.consume();\n            var parse = this.parseInput();\n            return parse;\n        }\n\n        /**\n         * Parses an entire input tree.\n         */\n\n    }, {\n        key: \"parseInput\",\n        value: function parseInput() {\n            // Parse an expression\n            var expression = this.parseExpression(false);\n            // If we succeeded, make sure there's an EOF at the end\n            this.expect(\"EOF\", false);\n            return expression;\n        }\n    }, {\n        key: \"parseExpression\",\n\n\n        /**\n         * Parses an \"expression\", which is a list of atoms.\n         *\n         * @param {boolean} breakOnInfix  Should the parsing stop when we hit infix\n         *                  nodes? This happens when functions have higher precendence\n         *                  than infix nodes in implicit parses.\n         *\n         * @param {?string} breakOnTokenText  The text of the token that the expression\n         *                  should end with, or `null` if something else should end the\n         *                  expression.\n         *\n         * @return {ParseNode}\n         */\n        value: function parseExpression(breakOnInfix, breakOnTokenText) {\n            var body = [];\n            // Keep adding atoms to the body until we can't parse any more atoms (either\n            // we reached the end, a }, or a \\right)\n            while (true) {\n                var lex = this.nextToken;\n                if (Parser.endOfExpression.indexOf(lex.text) !== -1) {\n                    break;\n                }\n                if (breakOnTokenText && lex.text === breakOnTokenText) {\n                    break;\n                }\n                if (breakOnInfix && _functions2.default[lex.text] && _functions2.default[lex.text].infix) {\n                    break;\n                }\n                var atom = this.parseAtom();\n                if (!atom) {\n                    if (!this.settings.throwOnError && lex.text[0] === \"\\\\\") {\n                        var errorNode = this.handleUnsupportedCmd();\n                        body.push(errorNode);\n                        continue;\n                    }\n\n                    break;\n                }\n                body.push(atom);\n            }\n            return this.handleInfixNodes(body);\n        }\n\n        /**\n         * Rewrites infix operators such as \\over with corresponding commands such\n         * as \\frac.\n         *\n         * There can only be one infix operator per group.  If there's more than one\n         * then the expression is ambiguous.  This can be resolved by adding {}.\n         *\n         * @returns {Array}\n         */\n\n    }, {\n        key: \"handleInfixNodes\",\n        value: function handleInfixNodes(body) {\n            var overIndex = -1;\n            var funcName = void 0;\n\n            for (var i = 0; i < body.length; i++) {\n                var node = body[i];\n                if (node.type === \"infix\") {\n                    if (overIndex !== -1) {\n                        throw new _ParseError2.default(\"only one infix operator per group\", node.value.token);\n                    }\n                    overIndex = i;\n                    funcName = node.value.replaceWith;\n                }\n            }\n\n            if (overIndex !== -1) {\n                var numerNode = void 0;\n                var denomNode = void 0;\n\n                var numerBody = body.slice(0, overIndex);\n                var denomBody = body.slice(overIndex + 1);\n\n                if (numerBody.length === 1 && numerBody[0].type === \"ordgroup\") {\n                    numerNode = numerBody[0];\n                } else {\n                    numerNode = new _ParseNode2.default(\"ordgroup\", numerBody, this.mode);\n                }\n\n                if (denomBody.length === 1 && denomBody[0].type === \"ordgroup\") {\n                    denomNode = denomBody[0];\n                } else {\n                    denomNode = new _ParseNode2.default(\"ordgroup\", denomBody, this.mode);\n                }\n\n                var value = this.callFunction(funcName, [numerNode, denomNode], null);\n                return [new _ParseNode2.default(value.type, value, this.mode)];\n            } else {\n                return body;\n            }\n        }\n\n        // The greediness of a superscript or subscript\n\n    }, {\n        key: \"handleSupSubscript\",\n\n\n        /**\n         * Handle a subscript or superscript with nice errors.\n         */\n        value: function handleSupSubscript(name) {\n            var symbolToken = this.nextToken;\n            var symbol = symbolToken.text;\n            this.consume();\n            var group = this.parseGroup();\n\n            if (!group) {\n                if (!this.settings.throwOnError && this.nextToken.text[0] === \"\\\\\") {\n                    return this.handleUnsupportedCmd();\n                } else {\n                    throw new _ParseError2.default(\"Expected group after '\" + symbol + \"'\", symbolToken);\n                }\n            } else if (group.isFunction) {\n                // ^ and _ have a greediness, so handle interactions with functions'\n                // greediness\n                var funcGreediness = _functions2.default[group.result].greediness;\n                if (funcGreediness > Parser.SUPSUB_GREEDINESS) {\n                    return this.parseFunction(group);\n                } else {\n                    throw new _ParseError2.default(\"Got function '\" + group.result + \"' with no arguments \" + \"as \" + name, symbolToken);\n                }\n            } else {\n                return group.result;\n            }\n        }\n\n        /**\n         * Converts the textual input of an unsupported command into a text node\n         * contained within a color node whose color is determined by errorColor\n         */\n\n    }, {\n        key: \"handleUnsupportedCmd\",\n        value: function handleUnsupportedCmd() {\n            var text = this.nextToken.text;\n            var textordArray = [];\n\n            for (var i = 0; i < text.length; i++) {\n                textordArray.push(new _ParseNode2.default(\"textord\", text[i], \"text\"));\n            }\n\n            var textNode = new _ParseNode2.default(\"text\", {\n                body: textordArray,\n                type: \"text\"\n            }, this.mode);\n\n            var colorNode = new _ParseNode2.default(\"color\", {\n                color: this.settings.errorColor,\n                value: [textNode],\n                type: \"color\"\n            }, this.mode);\n\n            this.consume();\n            return colorNode;\n        }\n\n        /**\n         * Parses a group with optional super/subscripts.\n         *\n         * @return {?ParseNode}\n         */\n\n    }, {\n        key: \"parseAtom\",\n        value: function parseAtom() {\n            // The body of an atom is an implicit group, so that things like\n            // \\left(x\\right)^2 work correctly.\n            var base = this.parseImplicitGroup();\n\n            // In text mode, we don't have superscripts or subscripts\n            if (this.mode === \"text\") {\n                return base;\n            }\n\n            // Note that base may be empty (i.e. null) at this point.\n\n            var superscript = void 0;\n            var subscript = void 0;\n            while (true) {\n                // Lex the first token\n                var lex = this.nextToken;\n\n                if (lex.text === \"\\\\limits\" || lex.text === \"\\\\nolimits\") {\n                    // We got a limit control\n                    if (!base || base.type !== \"op\") {\n                        throw new _ParseError2.default(\"Limit controls must follow a math operator\", lex);\n                    } else {\n                        var limits = lex.text === \"\\\\limits\";\n                        base.value.limits = limits;\n                        base.value.alwaysHandleSupSub = true;\n                    }\n                    this.consume();\n                } else if (lex.text === \"^\") {\n                    // We got a superscript start\n                    if (superscript) {\n                        throw new _ParseError2.default(\"Double superscript\", lex);\n                    }\n                    superscript = this.handleSupSubscript(\"superscript\");\n                } else if (lex.text === \"_\") {\n                    // We got a subscript start\n                    if (subscript) {\n                        throw new _ParseError2.default(\"Double subscript\", lex);\n                    }\n                    subscript = this.handleSupSubscript(\"subscript\");\n                } else if (lex.text === \"'\") {\n                    // We got a prime\n                    if (superscript) {\n                        throw new _ParseError2.default(\"Double superscript\", lex);\n                    }\n                    var prime = new _ParseNode2.default(\"textord\", \"\\\\prime\", this.mode);\n\n                    // Many primes can be grouped together, so we handle this here\n                    var primes = [prime];\n                    this.consume();\n                    // Keep lexing tokens until we get something that's not a prime\n                    while (this.nextToken.text === \"'\") {\n                        // For each one, add another prime to the list\n                        primes.push(prime);\n                        this.consume();\n                    }\n                    // If there's a superscript following the primes, combine that\n                    // superscript in with the primes.\n                    if (this.nextToken.text === \"^\") {\n                        primes.push(this.handleSupSubscript(\"superscript\"));\n                    }\n                    // Put everything into an ordgroup as the superscript\n                    superscript = new _ParseNode2.default(\"ordgroup\", primes, this.mode);\n                } else {\n                    // If it wasn't ^, _, or ', stop parsing super/subscripts\n                    break;\n                }\n            }\n\n            if (superscript || subscript) {\n                // If we got either a superscript or subscript, create a supsub\n                return new _ParseNode2.default(\"supsub\", {\n                    base: base,\n                    sup: superscript,\n                    sub: subscript\n                }, this.mode);\n            } else {\n                // Otherwise return the original body\n                return base;\n            }\n        }\n\n        // A list of the size-changing functions, for use in parseImplicitGroup\n\n\n        // A list of the style-changing functions, for use in parseImplicitGroup\n\n\n        // Old font functions\n\n    }, {\n        key: \"parseImplicitGroup\",\n\n\n        /**\n         * Parses an implicit group, which is a group that starts at the end of a\n         * specified, and ends right before a higher explicit group ends, or at EOL. It\n         * is used for functions that appear to affect the current style, like \\Large or\n         * \\textrm, where instead of keeping a style we just pretend that there is an\n         * implicit grouping after it until the end of the group. E.g.\n         *   small text {\\Large large text} small text again\n         * It is also used for \\left and \\right to get the correct grouping.\n         *\n         * @return {?ParseNode}\n         */\n        value: function parseImplicitGroup() {\n            var start = this.parseSymbol();\n\n            if (start == null) {\n                // If we didn't get anything we handle, fall back to parseFunction\n                return this.parseFunction();\n            }\n\n            var func = start.result;\n\n            if (func === \"\\\\left\") {\n                // If we see a left:\n                // Parse the entire left function (including the delimiter)\n                var left = this.parseFunction(start);\n                // Parse out the implicit body\n                ++this.leftrightDepth;\n                var body = this.parseExpression(false);\n                --this.leftrightDepth;\n                // Check the next token\n                this.expect(\"\\\\right\", false);\n                var right = this.parseFunction();\n                return new _ParseNode2.default(\"leftright\", {\n                    body: body,\n                    left: left.value.value,\n                    right: right.value.value\n                }, this.mode);\n            } else if (func === \"\\\\begin\") {\n                // begin...end is similar to left...right\n                var begin = this.parseFunction(start);\n                var envName = begin.value.name;\n                if (!_environments2.default.hasOwnProperty(envName)) {\n                    throw new _ParseError2.default(\"No such environment: \" + envName, begin.value.nameGroup);\n                }\n                // Build the environment object. Arguments and other information will\n                // be made available to the begin and end methods using properties.\n                var env = _environments2.default[envName];\n                var args = this.parseArguments(\"\\\\begin{\" + envName + \"}\", env);\n                var context = {\n                    mode: this.mode,\n                    envName: envName,\n                    parser: this,\n                    positions: args.pop()\n                };\n                var result = env.handler(context, args);\n                this.expect(\"\\\\end\", false);\n                var endNameToken = this.nextToken;\n                var end = this.parseFunction();\n                if (end.value.name !== envName) {\n                    throw new _ParseError2.default(\"Mismatch: \\\\begin{\" + envName + \"} matched \" + \"by \\\\end{\" + end.value.name + \"}\", endNameToken);\n                }\n                result.position = end.position;\n                return result;\n            } else if (_utils2.default.contains(Parser.sizeFuncs, func)) {\n                // If we see a sizing function, parse out the implicit body\n                this.consumeSpaces();\n                var _body = this.parseExpression(false);\n                return new _ParseNode2.default(\"sizing\", {\n                    // Figure out what size to use based on the list of functions above\n                    size: _utils2.default.indexOf(Parser.sizeFuncs, func) + 1,\n                    value: _body\n                }, this.mode);\n            } else if (_utils2.default.contains(Parser.styleFuncs, func)) {\n                // If we see a styling function, parse out the implicit body\n                this.consumeSpaces();\n                var _body2 = this.parseExpression(true);\n                return new _ParseNode2.default(\"styling\", {\n                    // Figure out what style to use by pulling out the style from\n                    // the function name\n                    style: func.slice(1, func.length - 5),\n                    value: _body2\n                }, this.mode);\n            } else if (func in Parser.oldFontFuncs) {\n                var style = Parser.oldFontFuncs[func];\n                // If we see an old font function, parse out the implicit body\n                this.consumeSpaces();\n                var _body3 = this.parseExpression(true);\n                if (style.slice(0, 4) === 'text') {\n                    return new _ParseNode2.default(\"text\", {\n                        style: style,\n                        body: new _ParseNode2.default(\"ordgroup\", _body3, this.mode)\n                    }, this.mode);\n                } else {\n                    return new _ParseNode2.default(\"font\", {\n                        font: style,\n                        body: new _ParseNode2.default(\"ordgroup\", _body3, this.mode)\n                    }, this.mode);\n                }\n            } else if (func === \"\\\\color\") {\n                // If we see a styling function, parse out the implicit body\n                var color = this.parseColorGroup(false);\n                if (!color) {\n                    throw new _ParseError2.default(\"\\\\color not followed by color\");\n                }\n                var _body4 = this.parseExpression(true);\n                return new _ParseNode2.default(\"color\", {\n                    type: \"color\",\n                    color: color.result.value,\n                    value: _body4\n                }, this.mode);\n            } else if (func === \"$\") {\n                if (this.mode === \"math\") {\n                    throw new _ParseError2.default(\"$ within math mode\");\n                }\n                this.consume();\n                var outerMode = this.mode;\n                this.switchMode(\"math\");\n                var _body5 = this.parseExpression(false, \"$\");\n                this.expect(\"$\", true);\n                this.switchMode(outerMode);\n                return new _ParseNode2.default(\"styling\", {\n                    style: \"text\",\n                    value: _body5\n                }, \"math\");\n            } else {\n                // Defer to parseFunction if it's not a function we handle\n                return this.parseFunction(start);\n            }\n        }\n\n        /**\n         * Parses an entire function, including its base and all of its arguments.\n         * The base might either have been parsed already, in which case\n         * it is provided as an argument, or it's the next group in the input.\n         *\n         * @param {ParseFuncOrArgument=} baseGroup optional as described above\n         * @return {?ParseNode}\n         */\n\n    }, {\n        key: \"parseFunction\",\n        value: function parseFunction(baseGroup) {\n            if (!baseGroup) {\n                baseGroup = this.parseGroup();\n            }\n\n            if (baseGroup) {\n                if (baseGroup.isFunction) {\n                    var func = baseGroup.result;\n                    var funcData = _functions2.default[func];\n                    if (this.mode === \"text\" && !funcData.allowedInText) {\n                        throw new _ParseError2.default(\"Can't use function '\" + func + \"' in text mode\", baseGroup.token);\n                    } else if (this.mode === \"math\" && funcData.allowedInMath === false) {\n                        throw new _ParseError2.default(\"Can't use function '\" + func + \"' in math mode\", baseGroup.token);\n                    }\n\n                    var args = this.parseArguments(func, funcData);\n                    var token = baseGroup.token;\n                    var result = this.callFunction(func, args, args.pop(), token);\n                    return new _ParseNode2.default(result.type, result, this.mode);\n                } else {\n                    return baseGroup.result;\n                }\n            } else {\n                return null;\n            }\n        }\n\n        /**\n         * Call a function handler with a suitable context and arguments.\n         */\n\n    }, {\n        key: \"callFunction\",\n        value: function callFunction(name, args, positions, token) {\n            var context = {\n                funcName: name,\n                parser: this,\n                positions: positions,\n                token: token\n            };\n            return _functions2.default[name].handler(context, args);\n        }\n\n        /**\n         * Parses the arguments of a function or environment\n         *\n         * @param {string} func  \"\\name\" or \"\\begin{name}\"\n         * @param {{numArgs:number,numOptionalArgs:number|undefined}} funcData\n         * @return the array of arguments, with the list of positions as last element\n         */\n\n    }, {\n        key: \"parseArguments\",\n        value: function parseArguments(func, funcData) {\n            var totalArgs = funcData.numArgs + funcData.numOptionalArgs;\n            if (totalArgs === 0) {\n                return [[this.pos]];\n            }\n\n            var baseGreediness = funcData.greediness;\n            var positions = [this.pos];\n            var args = [];\n\n            for (var i = 0; i < totalArgs; i++) {\n                var nextToken = this.nextToken;\n                var argType = funcData.argTypes && funcData.argTypes[i];\n                var arg = void 0;\n                if (i < funcData.numOptionalArgs) {\n                    if (argType) {\n                        arg = this.parseGroupOfType(argType, true);\n                    } else {\n                        arg = this.parseGroup(true);\n                    }\n                    if (!arg) {\n                        args.push(null);\n                        positions.push(this.pos);\n                        continue;\n                    }\n                } else {\n                    if (argType) {\n                        arg = this.parseGroupOfType(argType);\n                    } else {\n                        arg = this.parseGroup();\n                    }\n                    if (!arg) {\n                        if (!this.settings.throwOnError && this.nextToken.text[0] === \"\\\\\") {\n                            arg = new ParseFuncOrArgument(this.handleUnsupportedCmd(this.nextToken.text), false);\n                        } else {\n                            throw new _ParseError2.default(\"Expected group after '\" + func + \"'\", nextToken);\n                        }\n                    }\n                }\n                var argNode = void 0;\n                if (arg.isFunction) {\n                    var argGreediness = _functions2.default[arg.result].greediness;\n                    if (argGreediness > baseGreediness) {\n                        argNode = this.parseFunction(arg);\n                    } else {\n                        throw new _ParseError2.default(\"Got function '\" + arg.result + \"' as \" + \"argument to '\" + func + \"'\", nextToken);\n                    }\n                } else {\n                    argNode = arg.result;\n                }\n                args.push(argNode);\n                positions.push(this.pos);\n            }\n\n            args.push(positions);\n\n            return args;\n        }\n\n        /**\n         * Parses a group when the mode is changing.\n         *\n         * @return {?ParseFuncOrArgument}\n         */\n\n    }, {\n        key: \"parseGroupOfType\",\n        value: function parseGroupOfType(innerMode, optional) {\n            var outerMode = this.mode;\n            // Handle `original` argTypes\n            if (innerMode === \"original\") {\n                innerMode = outerMode;\n            }\n\n            if (innerMode === \"color\") {\n                return this.parseColorGroup(optional);\n            }\n            if (innerMode === \"size\") {\n                return this.parseSizeGroup(optional);\n            }\n\n            this.switchMode(innerMode);\n            if (innerMode === \"text\") {\n                // text mode is special because it should ignore the whitespace before\n                // it\n                this.consumeSpaces();\n            }\n            // By the time we get here, innerMode is one of \"text\" or \"math\".\n            // We switch the mode of the parser, recurse, then restore the old mode.\n            var res = this.parseGroup(optional);\n            this.switchMode(outerMode);\n            return res;\n        }\n    }, {\n        key: \"consumeSpaces\",\n        value: function consumeSpaces() {\n            while (this.nextToken.text === \" \") {\n                this.consume();\n            }\n        }\n\n        /**\n         * Parses a group, essentially returning the string formed by the\n         * brace-enclosed tokens plus some position information.\n         *\n         * @param {string} modeName  Used to describe the mode in error messages\n         * @param {boolean=} optional  Whether the group is optional or required\n         */\n\n    }, {\n        key: \"parseStringGroup\",\n        value: function parseStringGroup(modeName, optional) {\n            if (optional && this.nextToken.text !== \"[\") {\n                return null;\n            }\n            var outerMode = this.mode;\n            this.mode = \"text\";\n            this.expect(optional ? \"[\" : \"{\");\n            var str = \"\";\n            var firstToken = this.nextToken;\n            var lastToken = firstToken;\n            while (this.nextToken.text !== (optional ? \"]\" : \"}\")) {\n                if (this.nextToken.text === \"EOF\") {\n                    throw new _ParseError2.default(\"Unexpected end of input in \" + modeName, firstToken.range(this.nextToken, str));\n                }\n                lastToken = this.nextToken;\n                str += lastToken.text;\n                this.consume();\n            }\n            this.mode = outerMode;\n            this.expect(optional ? \"]\" : \"}\");\n            return firstToken.range(lastToken, str);\n        }\n\n        /**\n         * Parses a regex-delimited group: the largest sequence of tokens\n         * whose concatenated strings match `regex`. Returns the string\n         * formed by the tokens plus some position information.\n         *\n         * @param {RegExp} regex\n         * @param {string} modeName  Used to describe the mode in error messages\n         */\n\n    }, {\n        key: \"parseRegexGroup\",\n        value: function parseRegexGroup(regex, modeName) {\n            var outerMode = this.mode;\n            this.mode = \"text\";\n            var firstToken = this.nextToken;\n            var lastToken = firstToken;\n            var str = \"\";\n            while (this.nextToken.text !== \"EOF\" && regex.test(str + this.nextToken.text)) {\n                lastToken = this.nextToken;\n                str += lastToken.text;\n                this.consume();\n            }\n            if (str === \"\") {\n                throw new _ParseError2.default(\"Invalid \" + modeName + \": '\" + firstToken.text + \"'\", firstToken);\n            }\n            this.mode = outerMode;\n            return firstToken.range(lastToken, str);\n        }\n\n        /**\n         * Parses a color description.\n         */\n\n    }, {\n        key: \"parseColorGroup\",\n        value: function parseColorGroup(optional) {\n            var res = this.parseStringGroup(\"color\", optional);\n            if (!res) {\n                return null;\n            }\n            var match = /^(#[a-z0-9]+|[a-z]+)$/i.exec(res.text);\n            if (!match) {\n                throw new _ParseError2.default(\"Invalid color: '\" + res.text + \"'\", res);\n            }\n            return new ParseFuncOrArgument(new _ParseNode2.default(\"color\", match[0], this.mode), false);\n        }\n\n        /**\n         * Parses a size specification, consisting of magnitude and unit.\n         */\n\n    }, {\n        key: \"parseSizeGroup\",\n        value: function parseSizeGroup(optional) {\n            var res = void 0;\n            if (!optional && this.nextToken.text !== \"{\") {\n                res = this.parseRegexGroup(/^[-+]? *(?:$|\\d+|\\d+\\.\\d*|\\.\\d*) *[a-z]{0,2} *$/, \"size\");\n            } else {\n                res = this.parseStringGroup(\"size\", optional);\n            }\n            if (!res) {\n                return null;\n            }\n            var match = /([-+]?) *(\\d+(?:\\.\\d*)?|\\.\\d+) *([a-z]{2})/.exec(res.text);\n            if (!match) {\n                throw new _ParseError2.default(\"Invalid size: '\" + res.text + \"'\", res);\n            }\n            var data = {\n                number: +(match[1] + match[2]), // sign + magnitude, cast to number\n                unit: match[3]\n            };\n            if (!_units2.default.validUnit(data)) {\n                throw new _ParseError2.default(\"Invalid unit: '\" + data.unit + \"'\", res);\n            }\n            return new ParseFuncOrArgument(new _ParseNode2.default(\"size\", data, this.mode), false);\n        }\n\n        /**\n         * If the argument is false or absent, this parses an ordinary group,\n         * which is either a single nucleus (like \"x\") or an expression\n         * in braces (like \"{x+y}\").\n         * If the argument is true, it parses either a bracket-delimited expression\n         * (like \"[x+y]\") or returns null to indicate the absence of a\n         * bracket-enclosed group.\n         *\n         * @param {boolean=} optional  Whether the group is optional or required\n         * @return {?ParseFuncOrArgument}\n         */\n\n    }, {\n        key: \"parseGroup\",\n        value: function parseGroup(optional) {\n            var firstToken = this.nextToken;\n            // Try to parse an open brace\n            if (this.nextToken.text === (optional ? \"[\" : \"{\")) {\n                // If we get a brace, parse an expression\n                this.consume();\n                var expression = this.parseExpression(false, optional ? \"]\" : null);\n                var lastToken = this.nextToken;\n                // Make sure we get a close brace\n                this.expect(optional ? \"]\" : \"}\");\n                if (this.mode === \"text\") {\n                    this.formLigatures(expression);\n                }\n                return new ParseFuncOrArgument(new _ParseNode2.default(\"ordgroup\", expression, this.mode, firstToken, lastToken), false);\n            } else {\n                // Otherwise, just return a nucleus, or nothing for an optional group\n                return optional ? null : this.parseSymbol();\n            }\n        }\n\n        /**\n         * Form ligature-like combinations of characters for text mode.\n         * This includes inputs like \"--\", \"---\", \"``\" and \"''\".\n         * The result will simply replace multiple textord nodes with a single\n         * character in each value by a single textord node having multiple\n         * characters in its value.  The representation is still ASCII source.\n         *\n         * @param {Array.<ParseNode>} group  the nodes of this group,\n         *                                   list will be moified in place\n         */\n\n    }, {\n        key: \"formLigatures\",\n        value: function formLigatures(group) {\n            var n = group.length - 1;\n            for (var i = 0; i < n; ++i) {\n                var a = group[i];\n                var v = a.value;\n                if (v === \"-\" && group[i + 1].value === \"-\") {\n                    if (i + 1 < n && group[i + 2].value === \"-\") {\n                        group.splice(i, 3, new _ParseNode2.default(\"textord\", \"---\", \"text\", a, group[i + 2]));\n                        n -= 2;\n                    } else {\n                        group.splice(i, 2, new _ParseNode2.default(\"textord\", \"--\", \"text\", a, group[i + 1]));\n                        n -= 1;\n                    }\n                }\n                if ((v === \"'\" || v === \"`\") && group[i + 1].value === v) {\n                    group.splice(i, 2, new _ParseNode2.default(\"textord\", v + v, \"text\", a, group[i + 1]));\n                    n -= 1;\n                }\n            }\n        }\n\n        /**\n         * Parse a single symbol out of the string. Here, we handle both the functions\n         * we have defined, as well as the single character symbols\n         *\n         * @return {?ParseFuncOrArgument}\n         */\n\n    }, {\n        key: \"parseSymbol\",\n        value: function parseSymbol() {\n            var nucleus = this.nextToken;\n\n            if (_functions2.default[nucleus.text]) {\n                this.consume();\n                // If there exists a function with this name, we return the function and\n                // say that it is a function.\n                return new ParseFuncOrArgument(nucleus.text, true, nucleus);\n            } else if (_symbols2.default[this.mode][nucleus.text]) {\n                this.consume();\n                // Otherwise if this is a no-argument function, find the type it\n                // corresponds to in the symbols map\n                return new ParseFuncOrArgument(new _ParseNode2.default(_symbols2.default[this.mode][nucleus.text].group, nucleus.text, this.mode, nucleus), false, nucleus);\n            } else if (this.mode === \"text\" && _unicodeRegexes.cjkRegex.test(nucleus.text)) {\n                this.consume();\n                return new ParseFuncOrArgument(new _ParseNode2.default(\"textord\", nucleus.text, this.mode, nucleus), false, nucleus);\n            } else if (nucleus.text === \"$\") {\n                return new ParseFuncOrArgument(nucleus.text, false, nucleus);\n            } else {\n                return null;\n            }\n        }\n    }]);\n    return Parser;\n}();\n\nParser.endOfExpression = [\"}\", \"\\\\end\", \"\\\\right\", \"&\", \"\\\\\\\\\", \"\\\\cr\"];\nParser.SUPSUB_GREEDINESS = 1;\nParser.sizeFuncs = [\"\\\\tiny\", \"\\\\sixptsize\", \"\\\\scriptsize\", \"\\\\footnotesize\", \"\\\\small\", \"\\\\normalsize\", \"\\\\large\", \"\\\\Large\", \"\\\\LARGE\", \"\\\\huge\", \"\\\\Huge\"];\nParser.styleFuncs = [\"\\\\displaystyle\", \"\\\\textstyle\", \"\\\\scriptstyle\", \"\\\\scriptscriptstyle\"];\nParser.oldFontFuncs = {\n    \"\\\\rm\": \"mathrm\",\n    \"\\\\sf\": \"mathsf\",\n    \"\\\\tt\": \"mathtt\",\n    \"\\\\bf\": \"mathbf\",\n    \"\\\\it\": \"mathit\"\n};\n\n\nParser.prototype.ParseNode = _ParseNode2.default;\n\nmodule.exports = Parser;\n\n},{\"./MacroExpander\":27,\"./ParseError\":29,\"./ParseNode\":30,\"./environments\":40,\"./functions\":43,\"./symbols\":48,\"./unicodeRegexes\":49,\"./units\":50,\"./utils\":51,\"babel-runtime/helpers/classCallCheck\":4,\"babel-runtime/helpers/createClass\":5}],32:[function(require,module,exports){\n\"use strict\";\n\nvar _classCallCheck2 = require(\"babel-runtime/helpers/classCallCheck\");\n\nvar _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\nvar _utils = require(\"./utils\");\n\nvar _utils2 = _interopRequireDefault(_utils);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/**\n * The main Settings object\n *\n * The current options stored are:\n *  - displayMode: Whether the expression should be typeset as inline math\n *                 (false, the default), meaning that the math starts in\n *                 \\textstyle and is placed in an inline-block); or as display\n *                 math (true), meaning that the math starts in \\displaystyle\n *                 and is placed in a block with vertical margin.\n */\nvar Settings = function Settings(options) {\n  (0, _classCallCheck3.default)(this, Settings);\n\n  // allow null options\n  options = options || {};\n  this.displayMode = _utils2.default.deflt(options.displayMode, false);\n  this.throwOnError = _utils2.default.deflt(options.throwOnError, true);\n  this.errorColor = _utils2.default.deflt(options.errorColor, \"#cc0000\");\n  this.macros = options.macros || {};\n  this.colorIsTextColor = _utils2.default.deflt(options.colorIsTextColor, false);\n}; /**\n    * This is a module for storing settings passed into KaTeX. It correctly handles\n    * default settings.\n    */\n\nmodule.exports = Settings;\n\n},{\"./utils\":51,\"babel-runtime/helpers/classCallCheck\":4}],33:[function(require,module,exports){\n\"use strict\";\n\nvar _classCallCheck2 = require(\"babel-runtime/helpers/classCallCheck\");\n\nvar _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\nvar _createClass2 = require(\"babel-runtime/helpers/createClass\");\n\nvar _createClass3 = _interopRequireDefault(_createClass2);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/**\n * This file contains information and classes for the various kinds of styles\n * used in TeX. It provides a generic `Style` class, which holds information\n * about a specific style. It then provides instances of all the different kinds\n * of styles possible, and provides functions to move between them and get\n * information about them.\n */\n\n/**\n * The main style class. Contains a unique id for the style, a size (which is\n * the same for cramped and uncramped version of a style), and a cramped flag.\n */\nvar Style = function () {\n    function Style(id, size, cramped) {\n        (0, _classCallCheck3.default)(this, Style);\n\n        this.id = id;\n        this.size = size;\n        this.cramped = cramped;\n    }\n\n    /**\n     * Get the style of a superscript given a base in the current style.\n     */\n\n\n    (0, _createClass3.default)(Style, [{\n        key: \"sup\",\n        value: function sup() {\n            return styles[_sup[this.id]];\n        }\n\n        /**\n         * Get the style of a subscript given a base in the current style.\n         */\n\n    }, {\n        key: \"sub\",\n        value: function sub() {\n            return styles[_sub[this.id]];\n        }\n\n        /**\n         * Get the style of a fraction numerator given the fraction in the current\n         * style.\n         */\n\n    }, {\n        key: \"fracNum\",\n        value: function fracNum() {\n            return styles[_fracNum[this.id]];\n        }\n\n        /**\n         * Get the style of a fraction denominator given the fraction in the current\n         * style.\n         */\n\n    }, {\n        key: \"fracDen\",\n        value: function fracDen() {\n            return styles[_fracDen[this.id]];\n        }\n\n        /**\n         * Get the cramped version of a style (in particular, cramping a cramped style\n         * doesn't change the style).\n         */\n\n    }, {\n        key: \"cramp\",\n        value: function cramp() {\n            return styles[_cramp[this.id]];\n        }\n\n        /**\n         * Get a text or display version of this style.\n         */\n\n    }, {\n        key: \"text\",\n        value: function text() {\n            return styles[_text[this.id]];\n        }\n\n        /**\n         * Return if this style is tightly spaced (scriptstyle/scriptscriptstyle)\n         */\n\n    }, {\n        key: \"isTight\",\n        value: function isTight() {\n            return this.size >= 2;\n        }\n    }]);\n    return Style;\n}();\n\n// IDs of the different styles\n\n\nvar D = 0;\nvar Dc = 1;\nvar T = 2;\nvar Tc = 3;\nvar S = 4;\nvar Sc = 5;\nvar SS = 6;\nvar SSc = 7;\n\n// Instances of the different styles\nvar styles = [new Style(D, 0, false), new Style(Dc, 0, true), new Style(T, 1, false), new Style(Tc, 1, true), new Style(S, 2, false), new Style(Sc, 2, true), new Style(SS, 3, false), new Style(SSc, 3, true)];\n\n// Lookup tables for switching from one style to another\nvar _sup = [S, Sc, S, Sc, SS, SSc, SS, SSc];\nvar _sub = [Sc, Sc, Sc, Sc, SSc, SSc, SSc, SSc];\nvar _fracNum = [T, Tc, S, Sc, SS, SSc, SS, SSc];\nvar _fracDen = [Tc, Tc, Sc, Sc, SSc, SSc, SSc, SSc];\nvar _cramp = [Dc, Dc, Tc, Tc, Sc, Sc, SSc, SSc];\nvar _text = [D, Dc, T, Tc, T, Tc, T, Tc];\n\n// We only export some of the styles. Also, we don't export the `Style` class so\n// no more styles can be generated.\nmodule.exports = {\n    DISPLAY: styles[D],\n    TEXT: styles[T],\n    SCRIPT: styles[S],\n    SCRIPTSCRIPT: styles[SS]\n};\n\n},{\"babel-runtime/helpers/classCallCheck\":4,\"babel-runtime/helpers/createClass\":5}],34:[function(require,module,exports){\n\"use strict\";\n\nvar _domTree = require(\"./domTree\");\n\nvar _domTree2 = _interopRequireDefault(_domTree);\n\nvar _fontMetrics = require(\"./fontMetrics\");\n\nvar _fontMetrics2 = _interopRequireDefault(_fontMetrics);\n\nvar _symbols = require(\"./symbols\");\n\nvar _symbols2 = _interopRequireDefault(_symbols);\n\nvar _utils = require(\"./utils\");\n\nvar _utils2 = _interopRequireDefault(_utils);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n// The following have to be loaded from Main-Italic font, using class mainit\n/* eslint no-console:0 */\n/**\n * This module contains general functions that can be used for building\n * different kinds of domTree nodes in a consistent manner.\n */\n\nvar mainitLetters = [\"\\\\imath\", // dotless i\n\"\\\\jmath\", // dotless j\n\"\\\\pounds\"];\n\n/**\n * Looks up the given symbol in fontMetrics, after applying any symbol\n * replacements defined in symbol.js\n */\nvar lookupSymbol = function lookupSymbol(value, fontFamily, mode) {\n    // Replace the value with its replaced value from symbol.js\n    if (_symbols2.default[mode][value] && _symbols2.default[mode][value].replace) {\n        value = _symbols2.default[mode][value].replace;\n    }\n    return {\n        value: value,\n        metrics: _fontMetrics2.default.getCharacterMetrics(value, fontFamily)\n    };\n};\n\n/**\n * Makes a symbolNode after translation via the list of symbols in symbols.js.\n * Correctly pulls out metrics for the character, and optionally takes a list of\n * classes to be attached to the node.\n *\n * TODO: make argument order closer to makeSpan\n * TODO: add a separate argument for math class (e.g. `mop`, `mbin`), which\n * should if present come first in `classes`.\n */\nvar makeSymbol = function makeSymbol(value, fontFamily, mode, options, classes) {\n    var lookup = lookupSymbol(value, fontFamily, mode);\n    var metrics = lookup.metrics;\n    value = lookup.value;\n\n    var symbolNode = void 0;\n    if (metrics) {\n        var italic = metrics.italic;\n        if (mode === \"text\") {\n            italic = 0;\n        }\n        symbolNode = new _domTree2.default.symbolNode(value, metrics.height, metrics.depth, italic, metrics.skew, classes);\n    } else {\n        // TODO(emily): Figure out a good way to only print this in development\n        typeof console !== \"undefined\" && console.warn(\"No character metrics for '\" + value + \"' in style '\" + fontFamily + \"'\");\n        symbolNode = new _domTree2.default.symbolNode(value, 0, 0, 0, 0, classes);\n    }\n\n    if (options) {\n        symbolNode.maxFontSize = options.sizeMultiplier;\n        if (options.style.isTight()) {\n            symbolNode.classes.push(\"mtight\");\n        }\n        if (options.getColor()) {\n            symbolNode.style.color = options.getColor();\n        }\n    }\n\n    return symbolNode;\n};\n\n/**\n * Makes a symbol in Main-Regular or AMS-Regular.\n * Used for rel, bin, open, close, inner, and punct.\n */\nvar mathsym = function mathsym(value, mode, options, classes) {\n    // Decide what font to render the symbol in by its entry in the symbols\n    // table.\n    // Have a special case for when the value = \\ because the \\ is used as a\n    // textord in unsupported command errors but cannot be parsed as a regular\n    // text ordinal and is therefore not present as a symbol in the symbols\n    // table for text\n    if (value === \"\\\\\" || _symbols2.default[mode][value].font === \"main\") {\n        return makeSymbol(value, \"Main-Regular\", mode, options, classes);\n    } else {\n        return makeSymbol(value, \"AMS-Regular\", mode, options, classes.concat([\"amsrm\"]));\n    }\n};\n\n/**\n * Makes a symbol in the default font for mathords and textords.\n */\nvar mathDefault = function mathDefault(value, mode, options, classes, type) {\n    if (type === \"mathord\") {\n        var fontLookup = mathit(value, mode, options, classes);\n        return makeSymbol(value, fontLookup.fontName, mode, options, classes.concat([fontLookup.fontClass]));\n    } else if (type === \"textord\") {\n        var font = _symbols2.default[mode][value] && _symbols2.default[mode][value].font;\n        if (font === \"ams\") {\n            return makeSymbol(value, \"AMS-Regular\", mode, options, classes.concat([\"amsrm\"]));\n        } else {\n            // if (font === \"main\") {\n            return makeSymbol(value, \"Main-Regular\", mode, options, classes.concat([\"mathrm\"]));\n        }\n    } else {\n        throw new Error(\"unexpected type: \" + type + \" in mathDefault\");\n    }\n};\n\n/**\n * Determines which of the two font names (Main-Italic and Math-Italic) and\n * corresponding style tags (mainit or mathit) to use for font \"mathit\",\n * depending on the symbol.  Use this function instead of fontMap for font\n * \"mathit\".\n */\nvar mathit = function mathit(value, mode, options, classes) {\n    if (/[0-9]/.test(value.charAt(0)) ||\n    // glyphs for \\imath and \\jmath do not exist in Math-Italic so we\n    // need to use Main-Italic instead\n    _utils2.default.contains(mainitLetters, value)) {\n        return {\n            fontName: \"Main-Italic\",\n            fontClass: \"mainit\"\n        };\n    } else {\n        return {\n            fontName: \"Math-Italic\",\n            fontClass: \"mathit\"\n        };\n    }\n};\n\n/**\n * Makes either a mathord or textord in the correct font and color.\n */\nvar makeOrd = function makeOrd(group, options, type) {\n    var mode = group.mode;\n    var value = group.value;\n\n    var classes = [\"mord\"];\n\n    var font = options.font;\n    if (font) {\n        var fontLookup = void 0;\n        if (font === \"mathit\" || _utils2.default.contains(mainitLetters, value)) {\n            fontLookup = mathit(value, mode, options, classes);\n        } else {\n            fontLookup = fontMap[font];\n        }\n        if (lookupSymbol(value, fontLookup.fontName, mode).metrics) {\n            return makeSymbol(value, fontLookup.fontName, mode, options, classes.concat([fontLookup.fontClass || font]));\n        } else {\n            return mathDefault(value, mode, options, classes, type);\n        }\n    } else {\n        return mathDefault(value, mode, options, classes, type);\n    }\n};\n\n/**\n * Calculate the height, depth, and maxFontSize of an element based on its\n * children.\n */\nvar sizeElementFromChildren = function sizeElementFromChildren(elem) {\n    var height = 0;\n    var depth = 0;\n    var maxFontSize = 0;\n\n    if (elem.children) {\n        for (var i = 0; i < elem.children.length; i++) {\n            if (elem.children[i].height > height) {\n                height = elem.children[i].height;\n            }\n            if (elem.children[i].depth > depth) {\n                depth = elem.children[i].depth;\n            }\n            if (elem.children[i].maxFontSize > maxFontSize) {\n                maxFontSize = elem.children[i].maxFontSize;\n            }\n        }\n    }\n\n    elem.height = height;\n    elem.depth = depth;\n    elem.maxFontSize = maxFontSize;\n};\n\n/**\n * Makes a span with the given list of classes, list of children, and options.\n *\n * TODO: Ensure that `options` is always provided (currently some call sites\n * don't pass it).\n * TODO: add a separate argument for math class (e.g. `mop`, `mbin`), which\n * should if present come first in `classes`.\n */\nvar makeSpan = function makeSpan(classes, children, options) {\n    var span = new _domTree2.default.span(classes, children, options);\n\n    sizeElementFromChildren(span);\n\n    return span;\n};\n\n/**\n * Prepends the given children to the given span, updating height, depth, and\n * maxFontSize.\n */\nvar prependChildren = function prependChildren(span, children) {\n    span.children = children.concat(span.children);\n\n    sizeElementFromChildren(span);\n};\n\n/**\n * Makes a document fragment with the given list of children.\n */\nvar makeFragment = function makeFragment(children) {\n    var fragment = new _domTree2.default.documentFragment(children);\n\n    sizeElementFromChildren(fragment);\n\n    return fragment;\n};\n\n/**\n * Makes a vertical list by stacking elements and kerns on top of each other.\n * Allows for many different ways of specifying the positioning method.\n *\n * Arguments:\n *  - children: A list of child or kern nodes to be stacked on top of each other\n *              (i.e. the first element will be at the bottom, and the last at\n *              the top). Element nodes are specified as\n *                {type: \"elem\", elem: node}\n *              while kern nodes are specified as\n *                {type: \"kern\", size: size}\n *  - positionType: The method by which the vlist should be positioned. Valid\n *                  values are:\n *                   - \"individualShift\": The children list only contains elem\n *                                        nodes, and each node contains an extra\n *                                        \"shift\" value of how much it should be\n *                                        shifted (note that shifting is always\n *                                        moving downwards). positionData is\n *                                        ignored.\n *                   - \"top\": The positionData specifies the topmost point of\n *                            the vlist (note this is expected to be a height,\n *                            so positive values move up)\n *                   - \"bottom\": The positionData specifies the bottommost point\n *                               of the vlist (note this is expected to be a\n *                               depth, so positive values move down\n *                   - \"shift\": The vlist will be positioned such that its\n *                              baseline is positionData away from the baseline\n *                              of the first child. Positive values move\n *                              downwards.\n *                   - \"firstBaseline\": The vlist will be positioned such that\n *                                      its baseline is aligned with the\n *                                      baseline of the first child.\n *                                      positionData is ignored. (this is\n *                                      equivalent to \"shift\" with\n *                                      positionData=0)\n *  - positionData: Data used in different ways depending on positionType\n *  - options: An Options object\n *\n */\nvar makeVList = function makeVList(children, positionType, positionData, options) {\n    var depth = void 0;\n    var currPos = void 0;\n    var i = void 0;\n    if (positionType === \"individualShift\") {\n        var oldChildren = children;\n        children = [oldChildren[0]];\n\n        // Add in kerns to the list of children to get each element to be\n        // shifted to the correct specified shift\n        depth = -oldChildren[0].shift - oldChildren[0].elem.depth;\n        currPos = depth;\n        for (i = 1; i < oldChildren.length; i++) {\n            var diff = -oldChildren[i].shift - currPos - oldChildren[i].elem.depth;\n            var size = diff - (oldChildren[i - 1].elem.height + oldChildren[i - 1].elem.depth);\n\n            currPos = currPos + diff;\n\n            children.push({ type: \"kern\", size: size });\n            children.push(oldChildren[i]);\n        }\n    } else if (positionType === \"top\") {\n        // We always start at the bottom, so calculate the bottom by adding up\n        // all the sizes\n        var bottom = positionData;\n        for (i = 0; i < children.length; i++) {\n            if (children[i].type === \"kern\") {\n                bottom -= children[i].size;\n            } else {\n                bottom -= children[i].elem.height + children[i].elem.depth;\n            }\n        }\n        depth = bottom;\n    } else if (positionType === \"bottom\") {\n        depth = -positionData;\n    } else if (positionType === \"shift\") {\n        depth = -children[0].elem.depth - positionData;\n    } else if (positionType === \"firstBaseline\") {\n        depth = -children[0].elem.depth;\n    } else {\n        depth = 0;\n    }\n\n    // Create a strut that is taller than any list item. The strut is added to\n    // each item, where it will determine the item's baseline. Since it has\n    // `overflow:hidden`, the strut's top edge will sit on the item's line box's\n    // top edge and the strut's bottom edge will sit on the item's baseline,\n    // with no additional line-height spacing. This allows the item baseline to\n    // be positioned precisely without worrying about font ascent and\n    // line-height.\n    var pstrutSize = 0;\n    for (i = 0; i < children.length; i++) {\n        if (children[i].type === \"elem\") {\n            var child = children[i].elem;\n            pstrutSize = Math.max(pstrutSize, child.maxFontSize, child.height);\n        }\n    }\n    pstrutSize += 2;\n    var pstrut = makeSpan([\"pstrut\"], []);\n    pstrut.style.height = pstrutSize + \"em\";\n\n    // Create a new list of actual children at the correct offsets\n    var realChildren = [];\n    var minPos = depth;\n    var maxPos = depth;\n    currPos = depth;\n    for (i = 0; i < children.length; i++) {\n        if (children[i].type === \"kern\") {\n            currPos += children[i].size;\n        } else {\n            var _child = children[i].elem;\n\n            var childWrap = makeSpan([], [pstrut, _child]);\n            childWrap.style.top = -pstrutSize - currPos - _child.depth + \"em\";\n            if (children[i].marginLeft) {\n                childWrap.style.marginLeft = children[i].marginLeft;\n            }\n            if (children[i].marginRight) {\n                childWrap.style.marginRight = children[i].marginRight;\n            }\n\n            realChildren.push(childWrap);\n            currPos += _child.height + _child.depth;\n        }\n        minPos = Math.min(minPos, currPos);\n        maxPos = Math.max(maxPos, currPos);\n    }\n\n    // The vlist contents go in a table-cell with `vertical-align:bottom`.\n    // This cell's bottom edge will determine the containing table's baseline\n    // without overly expanding the containing line-box.\n    var vlist = makeSpan([\"vlist\"], realChildren);\n    vlist.style.height = maxPos + \"em\";\n\n    // A second row is used if necessary to represent the vlist's depth.\n    var rows = void 0;\n    if (minPos < 0) {\n        var depthStrut = makeSpan([\"vlist\"], []);\n        depthStrut.style.height = -minPos + \"em\";\n\n        // Safari wants the first row to have inline content; otherwise it\n        // puts the bottom of the *second* row on the baseline.\n        var topStrut = makeSpan([\"vlist-s\"], [new _domTree2.default.symbolNode(\"\\u200B\")]);\n\n        rows = [makeSpan([\"vlist-r\"], [vlist, topStrut]), makeSpan([\"vlist-r\"], [depthStrut])];\n    } else {\n        rows = [makeSpan([\"vlist-r\"], [vlist])];\n    }\n\n    var vtable = makeSpan([\"vlist-t\"], rows);\n    if (rows.length === 2) {\n        vtable.classes.push(\"vlist-t2\");\n    }\n    vtable.height = maxPos;\n    vtable.depth = -minPos;\n    return vtable;\n};\n\n// A map of spacing functions to their attributes, like size and corresponding\n// CSS class\nvar spacingFunctions = {\n    \"\\\\qquad\": {\n        size: \"2em\",\n        className: \"qquad\"\n    },\n    \"\\\\quad\": {\n        size: \"1em\",\n        className: \"quad\"\n    },\n    \"\\\\enspace\": {\n        size: \"0.5em\",\n        className: \"enspace\"\n    },\n    \"\\\\;\": {\n        size: \"0.277778em\",\n        className: \"thickspace\"\n    },\n    \"\\\\:\": {\n        size: \"0.22222em\",\n        className: \"mediumspace\"\n    },\n    \"\\\\,\": {\n        size: \"0.16667em\",\n        className: \"thinspace\"\n    },\n    \"\\\\!\": {\n        size: \"-0.16667em\",\n        className: \"negativethinspace\"\n    }\n};\n\n/**\n * Maps TeX font commands to objects containing:\n * - variant: string used for \"mathvariant\" attribute in buildMathML.js\n * - fontName: the \"style\" parameter to fontMetrics.getCharacterMetrics\n */\n// A map between tex font commands an MathML mathvariant attribute values\nvar fontMap = {\n    // styles\n    \"mathbf\": {\n        variant: \"bold\",\n        fontName: \"Main-Bold\"\n    },\n    \"mathrm\": {\n        variant: \"normal\",\n        fontName: \"Main-Regular\"\n    },\n    \"textit\": {\n        variant: \"italic\",\n        fontName: \"Main-Italic\"\n    },\n\n    // \"mathit\" is missing because it requires the use of two fonts: Main-Italic\n    // and Math-Italic.  This is handled by a special case in makeOrd which ends\n    // up calling mathit.\n\n    // families\n    \"mathbb\": {\n        variant: \"double-struck\",\n        fontName: \"AMS-Regular\"\n    },\n    \"mathcal\": {\n        variant: \"script\",\n        fontName: \"Caligraphic-Regular\"\n    },\n    \"mathfrak\": {\n        variant: \"fraktur\",\n        fontName: \"Fraktur-Regular\"\n    },\n    \"mathscr\": {\n        variant: \"script\",\n        fontName: \"Script-Regular\"\n    },\n    \"mathsf\": {\n        variant: \"sans-serif\",\n        fontName: \"SansSerif-Regular\"\n    },\n    \"mathtt\": {\n        variant: \"monospace\",\n        fontName: \"Typewriter-Regular\"\n    }\n};\n\nmodule.exports = {\n    fontMap: fontMap,\n    makeSymbol: makeSymbol,\n    mathsym: mathsym,\n    makeSpan: makeSpan,\n    makeFragment: makeFragment,\n    makeVList: makeVList,\n    makeOrd: makeOrd,\n    prependChildren: prependChildren,\n    spacingFunctions: spacingFunctions\n};\n\n},{\"./domTree\":39,\"./fontMetrics\":41,\"./symbols\":48,\"./utils\":51}],35:[function(require,module,exports){\n\"use strict\";\n\nvar _stringify = require(\"babel-runtime/core-js/json/stringify\");\n\nvar _stringify2 = _interopRequireDefault(_stringify);\n\nvar _ParseError = require(\"./ParseError\");\n\nvar _ParseError2 = _interopRequireDefault(_ParseError);\n\nvar _Style = require(\"./Style\");\n\nvar _Style2 = _interopRequireDefault(_Style);\n\nvar _buildCommon = require(\"./buildCommon\");\n\nvar _buildCommon2 = _interopRequireDefault(_buildCommon);\n\nvar _delimiter = require(\"./delimiter\");\n\nvar _delimiter2 = _interopRequireDefault(_delimiter);\n\nvar _domTree = require(\"./domTree\");\n\nvar _domTree2 = _interopRequireDefault(_domTree);\n\nvar _units = require(\"./units\");\n\nvar _units2 = _interopRequireDefault(_units);\n\nvar _utils = require(\"./utils\");\n\nvar _utils2 = _interopRequireDefault(_utils);\n\nvar _stretchy = require(\"./stretchy\");\n\nvar _stretchy2 = _interopRequireDefault(_stretchy);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/* eslint no-console:0 */\n/**\n * This file does the main work of building a domTree structure from a parse\n * tree. The entry point is the `buildHTML` function, which takes a parse tree.\n * Then, the buildExpression, buildGroup, and various groupTypes functions are\n * called, to produce a final HTML tree.\n */\n\nvar isSpace = function isSpace(node) {\n    return node instanceof _domTree2.default.span && node.classes[0] === \"mspace\";\n};\n\n// Binary atoms (first class `mbin`) change into ordinary atoms (`mord`)\n// depending on their surroundings. See TeXbook pg. 442-446, Rules 5 and 6,\n// and the text before Rule 19.\nvar isBin = function isBin(node) {\n    return node && node.classes[0] === \"mbin\";\n};\n\nvar isBinLeftCanceller = function isBinLeftCanceller(node, isRealGroup) {\n    // TODO: This code assumes that a node's math class is the first element\n    // of its `classes` array. A later cleanup should ensure this, for\n    // instance by changing the signature of `makeSpan`.\n    if (node) {\n        return _utils2.default.contains([\"mbin\", \"mopen\", \"mrel\", \"mop\", \"mpunct\"], node.classes[0]);\n    } else {\n        return isRealGroup;\n    }\n};\n\nvar isBinRightCanceller = function isBinRightCanceller(node, isRealGroup) {\n    if (node) {\n        return _utils2.default.contains([\"mrel\", \"mclose\", \"mpunct\"], node.classes[0]);\n    } else {\n        return isRealGroup;\n    }\n};\n\n/**\n * Splice out any spaces from `children` starting at position `i`, and return\n * the spliced-out array. Returns null if `children[i]` does not exist or is not\n * a space.\n */\nvar spliceSpaces = function spliceSpaces(children, i) {\n    var j = i;\n    while (j < children.length && isSpace(children[j])) {\n        j++;\n    }\n    if (j === i) {\n        return null;\n    } else {\n        return children.splice(i, j - i);\n    }\n};\n\n/**\n * Take a list of nodes, build them in order, and return a list of the built\n * nodes. documentFragments are flattened into their contents, so the\n * returned list contains no fragments. `isRealGroup` is true if `expression`\n * is a real group (no atoms will be added on either side), as opposed to\n * a partial group (e.g. one created by \\color).\n */\nvar buildExpression = function buildExpression(expression, options, isRealGroup) {\n    // Parse expressions into `groups`.\n    var groups = [];\n    for (var i = 0; i < expression.length; i++) {\n        var group = expression[i];\n        var output = buildGroup(group, options);\n        if (output instanceof _domTree2.default.documentFragment) {\n            Array.prototype.push.apply(groups, output.children);\n        } else {\n            groups.push(output);\n        }\n    }\n    // At this point `groups` consists entirely of `symbolNode`s and `span`s.\n\n    // Explicit spaces (e.g., \\;, \\,) should be ignored with respect to atom\n    // spacing (e.g., \"add thick space between mord and mrel\"). Since CSS\n    // adjacency rules implement atom spacing, spaces should be invisible to\n    // CSS. So we splice them out of `groups` and into the atoms themselves.\n    for (var _i = 0; _i < groups.length; _i++) {\n        var spaces = spliceSpaces(groups, _i);\n        if (spaces) {\n            // Splicing of spaces may have removed all remaining groups.\n            if (_i < groups.length) {\n                // If there is a following group, move space within it.\n                if (groups[_i] instanceof _domTree2.default.symbolNode) {\n                    groups[_i] = (0, _buildCommon.makeSpan)([].concat(groups[_i].classes), [groups[_i]]);\n                }\n                _buildCommon2.default.prependChildren(groups[_i], spaces);\n            } else {\n                // Otherwise, put any spaces back at the end of the groups.\n                Array.prototype.push.apply(groups, spaces);\n                break;\n            }\n        }\n    }\n\n    // Binary operators change to ordinary symbols in some contexts.\n    for (var _i2 = 0; _i2 < groups.length; _i2++) {\n        if (isBin(groups[_i2]) && (isBinLeftCanceller(groups[_i2 - 1], isRealGroup) || isBinRightCanceller(groups[_i2 + 1], isRealGroup))) {\n            groups[_i2].classes[0] = \"mord\";\n        }\n    }\n\n    // Process \\\\not commands within the group.\n    // TODO(kevinb): Handle multiple \\\\not commands in a row.\n    // TODO(kevinb): Handle \\\\not{abc} correctly.  The \\\\not should appear over\n    // the 'a' instead of the 'c'.\n    for (var _i3 = 0; _i3 < groups.length; _i3++) {\n        if (groups[_i3].value === \"\\u0338\" && _i3 + 1 < groups.length) {\n            var children = groups.slice(_i3, _i3 + 2);\n\n            children[0].classes = [\"mainrm\"];\n            // \\u0338 is a combining glyph so we could reorder the children so\n            // that it comes after the other glyph.  This works correctly on\n            // most browsers except for Safari.  Instead we absolutely position\n            // the glyph and set its right side to match that of the other\n            // glyph which is visually equivalent.\n            children[0].style.position = \"absolute\";\n            children[0].style.right = \"0\";\n\n            // Copy the classes from the second glyph to the new container.\n            // This is so it behaves the same as though there was no \\\\not.\n            var classes = groups[_i3 + 1].classes;\n            var container = (0, _buildCommon.makeSpan)(classes, children);\n\n            // LaTeX adds a space between ords separated by a \\\\not.\n            if (classes.indexOf(\"mord\") !== -1) {\n                // \\glue(\\thickmuskip) 2.77771 plus 2.77771\n                container.style.paddingLeft = \"0.277771em\";\n            }\n\n            // Ensure that the \\u0338 is positioned relative to the container.\n            container.style.position = \"relative\";\n            groups.splice(_i3, 2, container);\n        }\n    }\n\n    return groups;\n};\n\n// Return math atom class (mclass) of a domTree.\nvar getTypeOfDomTree = function getTypeOfDomTree(node) {\n    if (node instanceof _domTree2.default.documentFragment) {\n        if (node.children.length) {\n            return getTypeOfDomTree(node.children[node.children.length - 1]);\n        }\n    } else {\n        if (_utils2.default.contains([\"mord\", \"mop\", \"mbin\", \"mrel\", \"mopen\", \"mclose\", \"mpunct\", \"minner\"], node.classes[0])) {\n            return node.classes[0];\n        }\n    }\n    return null;\n};\n\n/**\n * Sometimes, groups perform special rules when they have superscripts or\n * subscripts attached to them. This function lets the `supsub` group know that\n * its inner element should handle the superscripts and subscripts instead of\n * handling them itself.\n */\nvar shouldHandleSupSub = function shouldHandleSupSub(group, options) {\n    if (!group.value.base) {\n        return false;\n    } else {\n        var base = group.value.base;\n        if (base.type === \"op\") {\n            // Operators handle supsubs differently when they have limits\n            // (e.g. `\\displaystyle\\sum_2^3`)\n            return base.value.limits && (options.style.size === _Style2.default.DISPLAY.size || base.value.alwaysHandleSupSub);\n        } else if (base.type === \"accent\") {\n            return isCharacterBox(base.value.base);\n        } else if (base.type === \"horizBrace\") {\n            var isSup = group.value.sub ? false : true;\n            return isSup === base.value.isOver;\n        } else {\n            return null;\n        }\n    }\n};\n\n/**\n * Sometimes we want to pull out the innermost element of a group. In most\n * cases, this will just be the group itself, but when ordgroups and colors have\n * a single element, we want to pull that out.\n */\nvar getBaseElem = function getBaseElem(group) {\n    if (!group) {\n        return false;\n    } else if (group.type === \"ordgroup\") {\n        if (group.value.length === 1) {\n            return getBaseElem(group.value[0]);\n        } else {\n            return group;\n        }\n    } else if (group.type === \"color\") {\n        if (group.value.value.length === 1) {\n            return getBaseElem(group.value.value[0]);\n        } else {\n            return group;\n        }\n    } else if (group.type === \"font\") {\n        return getBaseElem(group.value.body);\n    } else {\n        return group;\n    }\n};\n\n/**\n * TeXbook algorithms often reference \"character boxes\", which are simply groups\n * with a single character in them. To decide if something is a character box,\n * we find its innermost group, and see if it is a single character.\n */\nvar isCharacterBox = function isCharacterBox(group) {\n    var baseElem = getBaseElem(group);\n\n    // These are all they types of groups which hold single characters\n    return baseElem.type === \"mathord\" || baseElem.type === \"textord\" || baseElem.type === \"bin\" || baseElem.type === \"rel\" || baseElem.type === \"inner\" || baseElem.type === \"open\" || baseElem.type === \"close\" || baseElem.type === \"punct\";\n};\n\nvar makeNullDelimiter = function makeNullDelimiter(options, classes) {\n    var moreClasses = [\"nulldelimiter\"].concat(options.baseSizingClasses());\n    return (0, _buildCommon.makeSpan)(classes.concat(moreClasses));\n};\n\n/**\n * This is a map of group types to the function used to handle that type.\n * Simpler types come at the beginning, while complicated types come afterwards.\n */\nvar groupTypes = {};\n\ngroupTypes.mathord = function (group, options) {\n    return _buildCommon2.default.makeOrd(group, options, \"mathord\");\n};\n\ngroupTypes.textord = function (group, options) {\n    return _buildCommon2.default.makeOrd(group, options, \"textord\");\n};\n\ngroupTypes.bin = function (group, options) {\n    return _buildCommon2.default.mathsym(group.value, group.mode, options, [\"mbin\"]);\n};\n\ngroupTypes.rel = function (group, options) {\n    return _buildCommon2.default.mathsym(group.value, group.mode, options, [\"mrel\"]);\n};\n\ngroupTypes.open = function (group, options) {\n    return _buildCommon2.default.mathsym(group.value, group.mode, options, [\"mopen\"]);\n};\n\ngroupTypes.close = function (group, options) {\n    return _buildCommon2.default.mathsym(group.value, group.mode, options, [\"mclose\"]);\n};\n\ngroupTypes.inner = function (group, options) {\n    return _buildCommon2.default.mathsym(group.value, group.mode, options, [\"minner\"]);\n};\n\ngroupTypes.punct = function (group, options) {\n    return _buildCommon2.default.mathsym(group.value, group.mode, options, [\"mpunct\"]);\n};\n\ngroupTypes.ordgroup = function (group, options) {\n    return (0, _buildCommon.makeSpan)([\"mord\"], buildExpression(group.value, options, true), options);\n};\n\ngroupTypes.text = function (group, options) {\n    var newOptions = options.withFont(group.value.style);\n    var inner = buildExpression(group.value.body, newOptions, true);\n    for (var i = 0; i < inner.length - 1; i++) {\n        if (inner[i].tryCombine(inner[i + 1])) {\n            inner.splice(i + 1, 1);\n            i--;\n        }\n    }\n    return (0, _buildCommon.makeSpan)([\"mord\", \"text\"], inner, newOptions);\n};\n\ngroupTypes.color = function (group, options) {\n    var elements = buildExpression(group.value.value, options.withColor(group.value.color), false);\n\n    // \\color isn't supposed to affect the type of the elements it contains.\n    // To accomplish this, we wrap the results in a fragment, so the inner\n    // elements will be able to directly interact with their neighbors. For\n    // example, `\\color{red}{2 +} 3` has the same spacing as `2 + 3`\n    return new _buildCommon2.default.makeFragment(elements);\n};\n\ngroupTypes.supsub = function (group, options) {\n    // Superscript and subscripts are handled in the TeXbook on page\n    // 445-446, rules 18(a-f).\n\n    // Here is where we defer to the inner group if it should handle\n    // superscripts and subscripts itself.\n    if (shouldHandleSupSub(group, options)) {\n        return groupTypes[group.value.base.type](group, options);\n    }\n\n    var base = buildGroup(group.value.base, options);\n    var supm = void 0;\n    var subm = void 0;\n\n    var metrics = options.fontMetrics();\n    var newOptions = void 0;\n\n    // Rule 18a\n    var supShift = 0;\n    var subShift = 0;\n\n    if (group.value.sup) {\n        newOptions = options.havingStyle(options.style.sup());\n        supm = buildGroup(group.value.sup, newOptions, options);\n        if (!isCharacterBox(group.value.base)) {\n            supShift = base.height - newOptions.fontMetrics().supDrop * newOptions.sizeMultiplier / options.sizeMultiplier;\n        }\n    }\n\n    if (group.value.sub) {\n        newOptions = options.havingStyle(options.style.sub());\n        subm = buildGroup(group.value.sub, newOptions, options);\n        if (!isCharacterBox(group.value.base)) {\n            subShift = base.depth + newOptions.fontMetrics().subDrop * newOptions.sizeMultiplier / options.sizeMultiplier;\n        }\n    }\n\n    // Rule 18c\n    var minSupShift = void 0;\n    if (options.style === _Style2.default.DISPLAY) {\n        minSupShift = metrics.sup1;\n    } else if (options.style.cramped) {\n        minSupShift = metrics.sup3;\n    } else {\n        minSupShift = metrics.sup2;\n    }\n\n    // scriptspace is a font-size-independent size, so scale it\n    // appropriately\n    var multiplier = options.sizeMultiplier;\n    var scriptspace = 0.5 / metrics.ptPerEm / multiplier + \"em\";\n\n    var supsub = void 0;\n    if (!group.value.sup) {\n        // Rule 18b\n        subShift = Math.max(subShift, metrics.sub1, subm.height - 0.8 * metrics.xHeight);\n\n        var vlistElem = [{ type: \"elem\", elem: subm, marginRight: scriptspace }];\n        // Subscripts shouldn't be shifted by the base's italic correction.\n        // Account for that by shifting the subscript back the appropriate\n        // amount. Note we only do this when the base is a single symbol.\n        if (base instanceof _domTree2.default.symbolNode) {\n            vlistElem[0].marginLeft = -base.italic + \"em\";\n        }\n\n        supsub = _buildCommon2.default.makeVList(vlistElem, \"shift\", subShift, options);\n    } else if (!group.value.sub) {\n        // Rule 18c, d\n        supShift = Math.max(supShift, minSupShift, supm.depth + 0.25 * metrics.xHeight);\n\n        supsub = _buildCommon2.default.makeVList([{ type: \"elem\", elem: supm, marginRight: scriptspace }], \"shift\", -supShift, options);\n    } else {\n        supShift = Math.max(supShift, minSupShift, supm.depth + 0.25 * metrics.xHeight);\n        subShift = Math.max(subShift, metrics.sub2);\n\n        var ruleWidth = metrics.defaultRuleThickness;\n\n        // Rule 18e\n        if (supShift - supm.depth - (subm.height - subShift) < 4 * ruleWidth) {\n            subShift = 4 * ruleWidth - (supShift - supm.depth) + subm.height;\n            var psi = 0.8 * metrics.xHeight - (supShift - supm.depth);\n            if (psi > 0) {\n                supShift += psi;\n                subShift -= psi;\n            }\n        }\n\n        var _vlistElem = [{ type: \"elem\", elem: subm, shift: subShift, marginRight: scriptspace }, { type: \"elem\", elem: supm, shift: -supShift, marginRight: scriptspace }];\n        // See comment above about subscripts not being shifted\n        if (base instanceof _domTree2.default.symbolNode) {\n            _vlistElem[0].marginLeft = -base.italic + \"em\";\n        }\n\n        supsub = _buildCommon2.default.makeVList(_vlistElem, \"individualShift\", null, options);\n    }\n\n    // We ensure to wrap the supsub vlist in a span.msupsub to reset text-align\n    var mclass = getTypeOfDomTree(base) || \"mord\";\n    return (0, _buildCommon.makeSpan)([mclass], [base, (0, _buildCommon.makeSpan)([\"msupsub\"], [supsub])], options);\n};\n\ngroupTypes.genfrac = function (group, options) {\n    // Fractions are handled in the TeXbook on pages 444-445, rules 15(a-e).\n    // Figure out what style this fraction should be in based on the\n    // function used\n    var style = options.style;\n    if (group.value.size === \"display\") {\n        style = _Style2.default.DISPLAY;\n    } else if (group.value.size === \"text\") {\n        style = _Style2.default.TEXT;\n    }\n\n    var nstyle = style.fracNum();\n    var dstyle = style.fracDen();\n    var newOptions = void 0;\n\n    newOptions = options.havingStyle(nstyle);\n    var numerm = buildGroup(group.value.numer, newOptions, options);\n\n    newOptions = options.havingStyle(dstyle);\n    var denomm = buildGroup(group.value.denom, newOptions, options);\n\n    var rule = void 0;\n    var ruleWidth = void 0;\n    var ruleSpacing = void 0;\n    if (group.value.hasBarLine) {\n        rule = makeLineSpan(\"frac-line\", options);\n        ruleWidth = rule.height;\n        ruleSpacing = rule.height;\n    } else {\n        rule = null;\n        ruleWidth = 0;\n        ruleSpacing = options.fontMetrics().defaultRuleThickness;\n    }\n\n    // Rule 15b\n    var numShift = void 0;\n    var clearance = void 0;\n    var denomShift = void 0;\n    if (style.size === _Style2.default.DISPLAY.size) {\n        numShift = options.fontMetrics().num1;\n        if (ruleWidth > 0) {\n            clearance = 3 * ruleSpacing;\n        } else {\n            clearance = 7 * ruleSpacing;\n        }\n        denomShift = options.fontMetrics().denom1;\n    } else {\n        if (ruleWidth > 0) {\n            numShift = options.fontMetrics().num2;\n            clearance = ruleSpacing;\n        } else {\n            numShift = options.fontMetrics().num3;\n            clearance = 3 * ruleSpacing;\n        }\n        denomShift = options.fontMetrics().denom2;\n    }\n\n    var frac = void 0;\n    if (ruleWidth === 0) {\n        // Rule 15c\n        var candidateClearance = numShift - numerm.depth - (denomm.height - denomShift);\n        if (candidateClearance < clearance) {\n            numShift += 0.5 * (clearance - candidateClearance);\n            denomShift += 0.5 * (clearance - candidateClearance);\n        }\n\n        frac = _buildCommon2.default.makeVList([{ type: \"elem\", elem: denomm, shift: denomShift }, { type: \"elem\", elem: numerm, shift: -numShift }], \"individualShift\", null, options);\n    } else {\n        // Rule 15d\n        var axisHeight = options.fontMetrics().axisHeight;\n\n        if (numShift - numerm.depth - (axisHeight + 0.5 * ruleWidth) < clearance) {\n            numShift += clearance - (numShift - numerm.depth - (axisHeight + 0.5 * ruleWidth));\n        }\n\n        if (axisHeight - 0.5 * ruleWidth - (denomm.height - denomShift) < clearance) {\n            denomShift += clearance - (axisHeight - 0.5 * ruleWidth - (denomm.height - denomShift));\n        }\n\n        var midShift = -(axisHeight - 0.5 * ruleWidth);\n\n        frac = _buildCommon2.default.makeVList([{ type: \"elem\", elem: denomm, shift: denomShift }, { type: \"elem\", elem: rule, shift: midShift }, { type: \"elem\", elem: numerm, shift: -numShift }], \"individualShift\", null, options);\n    }\n\n    // Since we manually change the style sometimes (with \\dfrac or \\tfrac),\n    // account for the possible size change here.\n    newOptions = options.havingStyle(style);\n    frac.height *= newOptions.sizeMultiplier / options.sizeMultiplier;\n    frac.depth *= newOptions.sizeMultiplier / options.sizeMultiplier;\n\n    // Rule 15e\n    var delimSize = void 0;\n    if (style.size === _Style2.default.DISPLAY.size) {\n        delimSize = options.fontMetrics().delim1;\n    } else {\n        delimSize = options.fontMetrics().delim2;\n    }\n\n    var leftDelim = void 0;\n    var rightDelim = void 0;\n    if (group.value.leftDelim == null) {\n        leftDelim = makeNullDelimiter(options, [\"mopen\"]);\n    } else {\n        leftDelim = _delimiter2.default.customSizedDelim(group.value.leftDelim, delimSize, true, options.havingStyle(style), group.mode, [\"mopen\"]);\n    }\n    if (group.value.rightDelim == null) {\n        rightDelim = makeNullDelimiter(options, [\"mclose\"]);\n    } else {\n        rightDelim = _delimiter2.default.customSizedDelim(group.value.rightDelim, delimSize, true, options.havingStyle(style), group.mode, [\"mclose\"]);\n    }\n\n    return (0, _buildCommon.makeSpan)([\"mord\"].concat(newOptions.sizingClasses(options)), [leftDelim, (0, _buildCommon.makeSpan)([\"mfrac\"], [frac]), rightDelim], options);\n};\n\ngroupTypes.array = function (group, options) {\n    var r = void 0;\n    var c = void 0;\n    var nr = group.value.body.length;\n    var nc = 0;\n    var body = new Array(nr);\n\n    // Horizontal spacing\n    var pt = 1 / options.fontMetrics().ptPerEm;\n    var arraycolsep = 5 * pt; // \\arraycolsep in article.cls\n\n    // Vertical spacing\n    var baselineskip = 12 * pt; // see size10.clo\n    // Default \\jot from ltmath.dtx\n    // TODO(edemaine): allow overriding \\jot via \\setlength (#687)\n    var jot = 3 * pt;\n    // Default \\arraystretch from lttab.dtx\n    // TODO(gagern): may get redefined once we have user-defined macros\n    var arraystretch = _utils2.default.deflt(group.value.arraystretch, 1);\n    var arrayskip = arraystretch * baselineskip;\n    var arstrutHeight = 0.7 * arrayskip; // \\strutbox in ltfsstrc.dtx and\n    var arstrutDepth = 0.3 * arrayskip; // \\@arstrutbox in lttab.dtx\n\n    var totalHeight = 0;\n    for (r = 0; r < group.value.body.length; ++r) {\n        var inrow = group.value.body[r];\n        var height = arstrutHeight; // \\@array adds an \\@arstrut\n        var depth = arstrutDepth; // to each tow (via the template)\n\n        if (nc < inrow.length) {\n            nc = inrow.length;\n        }\n\n        var outrow = new Array(inrow.length);\n        for (c = 0; c < inrow.length; ++c) {\n            var elt = buildGroup(inrow[c], options);\n            if (depth < elt.depth) {\n                depth = elt.depth;\n            }\n            if (height < elt.height) {\n                height = elt.height;\n            }\n            outrow[c] = elt;\n        }\n\n        var gap = 0;\n        if (group.value.rowGaps[r]) {\n            gap = _units2.default.calculateSize(group.value.rowGaps[r].value, options);\n            if (gap > 0) {\n                // \\@argarraycr\n                gap += arstrutDepth;\n                if (depth < gap) {\n                    depth = gap; // \\@xargarraycr\n                }\n                gap = 0;\n            }\n        }\n        // In AMS multiline environments such as aligned and gathered, rows\n        // correspond to lines that have additional \\jot added to the\n        // \\baselineskip via \\openup.\n        if (group.value.addJot) {\n            depth += jot;\n        }\n\n        outrow.height = height;\n        outrow.depth = depth;\n        totalHeight += height;\n        outrow.pos = totalHeight;\n        totalHeight += depth + gap; // \\@yargarraycr\n        body[r] = outrow;\n    }\n\n    var offset = totalHeight / 2 + options.fontMetrics().axisHeight;\n    var colDescriptions = group.value.cols || [];\n    var cols = [];\n    var colSep = void 0;\n    var colDescrNum = void 0;\n    for (c = 0, colDescrNum = 0;\n    // Continue while either there are more columns or more column\n    // descriptions, so trailing separators don't get lost.\n    c < nc || colDescrNum < colDescriptions.length; ++c, ++colDescrNum) {\n\n        var colDescr = colDescriptions[colDescrNum] || {};\n\n        var firstSeparator = true;\n        while (colDescr.type === \"separator\") {\n            // If there is more than one separator in a row, add a space\n            // between them.\n            if (!firstSeparator) {\n                colSep = (0, _buildCommon.makeSpan)([\"arraycolsep\"], []);\n                colSep.style.width = options.fontMetrics().doubleRuleSep + \"em\";\n                cols.push(colSep);\n            }\n\n            if (colDescr.separator === \"|\") {\n                var separator = (0, _buildCommon.makeSpan)([\"vertical-separator\"], []);\n                separator.style.height = totalHeight + \"em\";\n                separator.style.verticalAlign = -(totalHeight - offset) + \"em\";\n\n                cols.push(separator);\n            } else {\n                throw new _ParseError2.default(\"Invalid separator type: \" + colDescr.separator);\n            }\n\n            colDescrNum++;\n            colDescr = colDescriptions[colDescrNum] || {};\n            firstSeparator = false;\n        }\n\n        if (c >= nc) {\n            continue;\n        }\n\n        var sepwidth = void 0;\n        if (c > 0 || group.value.hskipBeforeAndAfter) {\n            sepwidth = _utils2.default.deflt(colDescr.pregap, arraycolsep);\n            if (sepwidth !== 0) {\n                colSep = (0, _buildCommon.makeSpan)([\"arraycolsep\"], []);\n                colSep.style.width = sepwidth + \"em\";\n                cols.push(colSep);\n            }\n        }\n\n        var col = [];\n        for (r = 0; r < nr; ++r) {\n            var row = body[r];\n            var elem = row[c];\n            if (!elem) {\n                continue;\n            }\n            var shift = row.pos - offset;\n            elem.depth = row.depth;\n            elem.height = row.height;\n            col.push({ type: \"elem\", elem: elem, shift: shift });\n        }\n\n        col = _buildCommon2.default.makeVList(col, \"individualShift\", null, options);\n        col = (0, _buildCommon.makeSpan)([\"col-align-\" + (colDescr.align || \"c\")], [col]);\n        cols.push(col);\n\n        if (c < nc - 1 || group.value.hskipBeforeAndAfter) {\n            sepwidth = _utils2.default.deflt(colDescr.postgap, arraycolsep);\n            if (sepwidth !== 0) {\n                colSep = (0, _buildCommon.makeSpan)([\"arraycolsep\"], []);\n                colSep.style.width = sepwidth + \"em\";\n                cols.push(colSep);\n            }\n        }\n    }\n    body = (0, _buildCommon.makeSpan)([\"mtable\"], cols);\n    return (0, _buildCommon.makeSpan)([\"mord\"], [body], options);\n};\n\ngroupTypes.spacing = function (group, options) {\n    if (group.value === \"\\\\ \" || group.value === \"\\\\space\" || group.value === \" \" || group.value === \"~\") {\n        // Spaces are generated by adding an actual space. Each of these\n        // things has an entry in the symbols table, so these will be turned\n        // into appropriate outputs.\n        if (group.mode === \"text\") {\n            return _buildCommon2.default.makeOrd(group, options, \"textord\");\n        } else {\n            return (0, _buildCommon.makeSpan)([\"mspace\"], [_buildCommon2.default.mathsym(group.value, group.mode, options)], options);\n        }\n    } else {\n        // Other kinds of spaces are of arbitrary width. We use CSS to\n        // generate these.\n        return (0, _buildCommon.makeSpan)([\"mspace\", _buildCommon2.default.spacingFunctions[group.value].className], [], options);\n    }\n};\n\ngroupTypes.llap = function (group, options) {\n    var inner = (0, _buildCommon.makeSpan)([\"inner\"], [buildGroup(group.value.body, options)]);\n    var fix = (0, _buildCommon.makeSpan)([\"fix\"], []);\n    return (0, _buildCommon.makeSpan)([\"mord\", \"llap\"], [inner, fix], options);\n};\n\ngroupTypes.rlap = function (group, options) {\n    var inner = (0, _buildCommon.makeSpan)([\"inner\"], [buildGroup(group.value.body, options)]);\n    var fix = (0, _buildCommon.makeSpan)([\"fix\"], []);\n    return (0, _buildCommon.makeSpan)([\"mord\", \"rlap\"], [inner, fix], options);\n};\n\ngroupTypes.op = function (group, options) {\n    // Operators are handled in the TeXbook pg. 443-444, rule 13(a).\n    var supGroup = void 0;\n    var subGroup = void 0;\n    var hasLimits = false;\n    if (group.type === \"supsub\") {\n        // If we have limits, supsub will pass us its group to handle. Pull\n        // out the superscript and subscript and set the group to the op in\n        // its base.\n        supGroup = group.value.sup;\n        subGroup = group.value.sub;\n        group = group.value.base;\n        hasLimits = true;\n    }\n\n    var style = options.style;\n\n    // Most operators have a large successor symbol, but these don't.\n    var noSuccessor = [\"\\\\smallint\"];\n\n    var large = false;\n    if (style.size === _Style2.default.DISPLAY.size && group.value.symbol && !_utils2.default.contains(noSuccessor, group.value.body)) {\n\n        // Most symbol operators get larger in displaystyle (rule 13)\n        large = true;\n    }\n\n    var base = void 0;\n    if (group.value.symbol) {\n        // If this is a symbol, create the symbol.\n        var fontName = large ? \"Size2-Regular\" : \"Size1-Regular\";\n        base = _buildCommon2.default.makeSymbol(group.value.body, fontName, \"math\", options, [\"mop\", \"op-symbol\", large ? \"large-op\" : \"small-op\"]);\n    } else if (group.value.value) {\n        // If this is a list, compose that list.\n        var inner = buildExpression(group.value.value, options, true);\n        if (inner.length === 1 && inner[0] instanceof _domTree2.default.symbolNode) {\n            base = inner[0];\n            base.classes[0] = \"mop\"; // replace old mclass\n        } else {\n            base = (0, _buildCommon.makeSpan)([\"mop\"], inner, options);\n        }\n    } else {\n        // Otherwise, this is a text operator. Build the text from the\n        // operator's name.\n        // TODO(emily): Add a space in the middle of some of these\n        // operators, like \\limsup\n        var output = [];\n        for (var i = 1; i < group.value.body.length; i++) {\n            output.push(_buildCommon2.default.mathsym(group.value.body[i], group.mode));\n        }\n        base = (0, _buildCommon.makeSpan)([\"mop\"], output, options);\n    }\n\n    // If content of op is a single symbol, shift it vertically.\n    var baseShift = 0;\n    var slant = 0;\n    if (base instanceof _domTree2.default.symbolNode) {\n        // Shift the symbol so its center lies on the axis (rule 13). It\n        // appears that our fonts have the centers of the symbols already\n        // almost on the axis, so these numbers are very small. Note we\n        // don't actually apply this here, but instead it is used either in\n        // the vlist creation or separately when there are no limits.\n        baseShift = (base.height - base.depth) / 2 - options.fontMetrics().axisHeight;\n\n        // The slant of the symbol is just its italic correction.\n        slant = base.italic;\n    }\n\n    if (hasLimits) {\n        // IE 8 clips \\int if it is in a display: inline-block. We wrap it\n        // in a new span so it is an inline, and works.\n        base = (0, _buildCommon.makeSpan)([], [base]);\n\n        var supm = void 0;\n        var supKern = void 0;\n        var subm = void 0;\n        var subKern = void 0;\n        var newOptions = void 0;\n        // We manually have to handle the superscripts and subscripts. This,\n        // aside from the kern calculations, is copied from supsub.\n        if (supGroup) {\n            newOptions = options.havingStyle(style.sup());\n            supm = buildGroup(supGroup, newOptions, options);\n\n            supKern = Math.max(options.fontMetrics().bigOpSpacing1, options.fontMetrics().bigOpSpacing3 - supm.depth);\n        }\n\n        if (subGroup) {\n            newOptions = options.havingStyle(style.sub());\n            subm = buildGroup(subGroup, newOptions, options);\n\n            subKern = Math.max(options.fontMetrics().bigOpSpacing2, options.fontMetrics().bigOpSpacing4 - subm.height);\n        }\n\n        // Build the final group as a vlist of the possible subscript, base,\n        // and possible superscript.\n        var finalGroup = void 0;\n        var top = void 0;\n        var bottom = void 0;\n        if (!supGroup) {\n            top = base.height - baseShift;\n\n            // Shift the limits by the slant of the symbol. Note\n            // that we are supposed to shift the limits by 1/2 of the slant,\n            // but since we are centering the limits adding a full slant of\n            // margin will shift by 1/2 that.\n            finalGroup = _buildCommon2.default.makeVList([{ type: \"kern\", size: options.fontMetrics().bigOpSpacing5 }, { type: \"elem\", elem: subm, marginLeft: -slant + \"em\" }, { type: \"kern\", size: subKern }, { type: \"elem\", elem: base }], \"top\", top, options);\n        } else if (!subGroup) {\n            bottom = base.depth + baseShift;\n\n            finalGroup = _buildCommon2.default.makeVList([{ type: \"elem\", elem: base }, { type: \"kern\", size: supKern }, { type: \"elem\", elem: supm, marginLeft: slant + \"em\" }, { type: \"kern\", size: options.fontMetrics().bigOpSpacing5 }], \"bottom\", bottom, options);\n        } else if (!supGroup && !subGroup) {\n            // This case probably shouldn't occur (this would mean the\n            // supsub was sending us a group with no superscript or\n            // subscript) but be safe.\n            return base;\n        } else {\n            bottom = options.fontMetrics().bigOpSpacing5 + subm.height + subm.depth + subKern + base.depth + baseShift;\n\n            finalGroup = _buildCommon2.default.makeVList([{ type: \"kern\", size: options.fontMetrics().bigOpSpacing5 }, { type: \"elem\", elem: subm, marginLeft: -slant + \"em\" }, { type: \"kern\", size: subKern }, { type: \"elem\", elem: base }, { type: \"kern\", size: supKern }, { type: \"elem\", elem: supm, marginLeft: slant + \"em\" }, { type: \"kern\", size: options.fontMetrics().bigOpSpacing5 }], \"bottom\", bottom, options);\n        }\n\n        return (0, _buildCommon.makeSpan)([\"mop\", \"op-limits\"], [finalGroup], options);\n    } else {\n        if (baseShift) {\n            base.style.position = \"relative\";\n            base.style.top = baseShift + \"em\";\n        }\n\n        return base;\n    }\n};\n\ngroupTypes.mod = function (group, options) {\n    var inner = [];\n\n    if (group.value.modType === \"bmod\") {\n        // “\\nonscript\\mskip-\\medmuskip\\mkern5mu”\n        if (!options.style.isTight()) {\n            inner.push((0, _buildCommon.makeSpan)([\"mspace\", \"negativemediumspace\"], [], options));\n        }\n        inner.push((0, _buildCommon.makeSpan)([\"mspace\", \"thickspace\"], [], options));\n    } else if (options.style.size === _Style2.default.DISPLAY.size) {\n        inner.push((0, _buildCommon.makeSpan)([\"mspace\", \"quad\"], [], options));\n    } else if (group.value.modType === \"mod\") {\n        inner.push((0, _buildCommon.makeSpan)([\"mspace\", \"twelvemuspace\"], [], options));\n    } else {\n        inner.push((0, _buildCommon.makeSpan)([\"mspace\", \"eightmuspace\"], [], options));\n    }\n\n    if (group.value.modType === \"pod\" || group.value.modType === \"pmod\") {\n        inner.push(_buildCommon2.default.mathsym(\"(\", group.mode));\n    }\n\n    if (group.value.modType !== \"pod\") {\n        var modInner = [_buildCommon2.default.mathsym(\"m\", group.mode), _buildCommon2.default.mathsym(\"o\", group.mode), _buildCommon2.default.mathsym(\"d\", group.mode)];\n        if (group.value.modType === \"bmod\") {\n            inner.push((0, _buildCommon.makeSpan)([\"mbin\"], modInner, options));\n            // “\\mkern5mu\\nonscript\\mskip-\\medmuskip”\n            inner.push((0, _buildCommon.makeSpan)([\"mspace\", \"thickspace\"], [], options));\n            if (!options.style.isTight()) {\n                inner.push((0, _buildCommon.makeSpan)([\"mspace\", \"negativemediumspace\"], [], options));\n            }\n        } else {\n            Array.prototype.push.apply(inner, modInner);\n            inner.push((0, _buildCommon.makeSpan)([\"mspace\", \"sixmuspace\"], [], options));\n        }\n    }\n\n    if (group.value.value) {\n        Array.prototype.push.apply(inner, buildExpression(group.value.value, options, false));\n    }\n\n    if (group.value.modType === \"pod\" || group.value.modType === \"pmod\") {\n        inner.push(_buildCommon2.default.mathsym(\")\", group.mode));\n    }\n\n    return _buildCommon2.default.makeFragment(inner);\n};\n\ngroupTypes.katex = function (group, options) {\n    // The KaTeX logo. The offsets for the K and a were chosen to look\n    // good, but the offsets for the T, E, and X were taken from the\n    // definition of \\TeX in TeX (see TeXbook pg. 356)\n    var k = (0, _buildCommon.makeSpan)([\"k\"], [_buildCommon2.default.mathsym(\"K\", group.mode)], options);\n    var a = (0, _buildCommon.makeSpan)([\"a\"], [_buildCommon2.default.mathsym(\"A\", group.mode)], options);\n\n    a.height = (a.height + 0.2) * 0.75;\n    a.depth = (a.height - 0.2) * 0.75;\n\n    var t = (0, _buildCommon.makeSpan)([\"t\"], [_buildCommon2.default.mathsym(\"T\", group.mode)], options);\n    var e = (0, _buildCommon.makeSpan)([\"e\"], [_buildCommon2.default.mathsym(\"E\", group.mode)], options);\n\n    e.height = e.height - 0.2155;\n    e.depth = e.depth + 0.2155;\n\n    var x = (0, _buildCommon.makeSpan)([\"x\"], [_buildCommon2.default.mathsym(\"X\", group.mode)], options);\n\n    return (0, _buildCommon.makeSpan)([\"mord\", \"katex-logo\"], [k, a, t, e, x], options);\n};\n\nvar makeLineSpan = function makeLineSpan(className, options, thickness) {\n    var line = (0, _buildCommon.makeSpan)([className], [], options);\n    line.height = thickness || options.fontMetrics().defaultRuleThickness;\n    line.style.borderBottomWidth = line.height + \"em\";\n    line.maxFontSize = 1.0;\n    return line;\n};\n\ngroupTypes.overline = function (group, options) {\n    // Overlines are handled in the TeXbook pg 443, Rule 9.\n\n    // Build the inner group in the cramped style.\n    var innerGroup = buildGroup(group.value.body, options.havingCrampedStyle());\n\n    // Create the line above the body\n    var line = makeLineSpan(\"overline-line\", options);\n\n    // Generate the vlist, with the appropriate kerns\n    var vlist = _buildCommon2.default.makeVList([{ type: \"elem\", elem: innerGroup }, { type: \"kern\", size: 3 * line.height }, { type: \"elem\", elem: line }, { type: \"kern\", size: line.height }], \"firstBaseline\", null, options);\n\n    return (0, _buildCommon.makeSpan)([\"mord\", \"overline\"], [vlist], options);\n};\n\ngroupTypes.underline = function (group, options) {\n    // Underlines are handled in the TeXbook pg 443, Rule 10.\n    // Build the inner group.\n    var innerGroup = buildGroup(group.value.body, options);\n\n    // Create the line above the body\n    var line = makeLineSpan(\"underline-line\", options);\n\n    // Generate the vlist, with the appropriate kerns\n    var vlist = _buildCommon2.default.makeVList([{ type: \"kern\", size: line.height }, { type: \"elem\", elem: line }, { type: \"kern\", size: 3 * line.height }, { type: \"elem\", elem: innerGroup }], \"top\", innerGroup.height, options);\n\n    return (0, _buildCommon.makeSpan)([\"mord\", \"underline\"], [vlist], options);\n};\n\ngroupTypes.sqrt = function (group, options) {\n    // Square roots are handled in the TeXbook pg. 443, Rule 11.\n\n    // First, we do the same steps as in overline to build the inner group\n    // and line\n    var inner = buildGroup(group.value.body, options.havingCrampedStyle());\n\n    // Some groups can return document fragments.  Handle those by wrapping\n    // them in a span.\n    if (inner instanceof _domTree2.default.documentFragment) {\n        inner = (0, _buildCommon.makeSpan)([], [inner], options);\n    }\n\n    // Calculate the minimum size for the \\surd delimiter\n    var metrics = options.fontMetrics();\n    var theta = metrics.defaultRuleThickness;\n\n    var phi = theta;\n    if (options.style.id < _Style2.default.TEXT.id) {\n        phi = options.fontMetrics().xHeight;\n    }\n\n    // Calculate the clearance between the body and line\n    var lineClearance = theta + phi / 4;\n\n    var minDelimiterHeight = (inner.height + inner.depth + lineClearance + theta) * options.sizeMultiplier;\n\n    // Create a sqrt SVG of the required minimum size\n    var img = _delimiter2.default.customSizedDelim(\"\\\\surd\", minDelimiterHeight, false, options, group.mode);\n\n    // Calculate the actual line width.\n    // This actually should depend on the chosen font -- e.g. \\boldmath\n    // should use the thicker surd symbols from e.g. KaTeX_Main-Bold, and\n    // have thicker rules.\n    var ruleWidth = options.fontMetrics().sqrtRuleThickness * img.sizeMultiplier;\n\n    var delimDepth = img.height - ruleWidth;\n\n    // Adjust the clearance based on the delimiter size\n    if (delimDepth > inner.height + inner.depth + lineClearance) {\n        lineClearance = (lineClearance + delimDepth - inner.height - inner.depth) / 2;\n    }\n\n    // Shift the sqrt image\n    var imgShift = img.height - inner.height - lineClearance - ruleWidth;\n\n    // We add a special case here, because even when `inner` is empty, we\n    // still get a line. So, we use a simple heuristic to decide if we\n    // should omit the body entirely. (note this doesn't work for something\n    // like `\\sqrt{\\rlap{x}}`, but if someone is doing that they deserve for\n    // it not to work.\n    var body = void 0;\n    if (inner.height === 0 && inner.depth === 0) {\n        body = (0, _buildCommon.makeSpan)();\n    } else {\n        inner.style.paddingLeft = img.surdWidth + \"em\";\n\n        // Overlay the image and the argument.\n        body = _buildCommon2.default.makeVList([{ type: \"elem\", elem: inner }, { type: \"kern\", size: -(inner.height + imgShift) }, { type: \"elem\", elem: img }, { type: \"kern\", size: ruleWidth }], \"firstBaseline\", null, options);\n        body.children[0].children[0].classes.push(\"svg-align\");\n    }\n\n    if (!group.value.index) {\n        return (0, _buildCommon.makeSpan)([\"mord\", \"sqrt\"], [body], options);\n    } else {\n        // Handle the optional root index\n\n        // The index is always in scriptscript style\n        var newOptions = options.havingStyle(_Style2.default.SCRIPTSCRIPT);\n        var rootm = buildGroup(group.value.index, newOptions, options);\n\n        // The amount the index is shifted by. This is taken from the TeX\n        // source, in the definition of `\\r@@t`.\n        var toShift = 0.6 * (body.height - body.depth);\n\n        // Build a VList with the superscript shifted up correctly\n        var rootVList = _buildCommon2.default.makeVList([{ type: \"elem\", elem: rootm }], \"shift\", -toShift, options);\n        // Add a class surrounding it so we can add on the appropriate\n        // kerning\n        var rootVListWrap = (0, _buildCommon.makeSpan)([\"root\"], [rootVList]);\n\n        return (0, _buildCommon.makeSpan)([\"mord\", \"sqrt\"], [rootVListWrap, body], options);\n    }\n};\n\nfunction sizingGroup(value, options, baseOptions) {\n    var inner = buildExpression(value, options, false);\n    var multiplier = options.sizeMultiplier / baseOptions.sizeMultiplier;\n\n    // Add size-resetting classes to the inner list and set maxFontSize\n    // manually. Handle nested size changes.\n    for (var i = 0; i < inner.length; i++) {\n        var pos = _utils2.default.indexOf(inner[i].classes, \"sizing\");\n        if (pos < 0) {\n            Array.prototype.push.apply(inner[i].classes, options.sizingClasses(baseOptions));\n        } else if (inner[i].classes[pos + 1] === \"reset-size\" + options.size) {\n            // This is a nested size change: e.g., inner[i] is the \"b\" in\n            // `\\Huge a \\small b`. Override the old size (the `reset-` class)\n            // but not the new size.\n            inner[i].classes[pos + 1] = \"reset-size\" + baseOptions.size;\n        }\n\n        inner[i].height *= multiplier;\n        inner[i].depth *= multiplier;\n    }\n\n    return _buildCommon2.default.makeFragment(inner);\n}\n\ngroupTypes.sizing = function (group, options) {\n    // Handle sizing operators like \\Huge. Real TeX doesn't actually allow\n    // these functions inside of math expressions, so we do some special\n    // handling.\n    var newOptions = options.havingSize(group.value.size);\n    return sizingGroup(group.value.value, newOptions, options);\n};\n\ngroupTypes.styling = function (group, options) {\n    // Style changes are handled in the TeXbook on pg. 442, Rule 3.\n\n    // Figure out what style we're changing to.\n    var styleMap = {\n        \"display\": _Style2.default.DISPLAY,\n        \"text\": _Style2.default.TEXT,\n        \"script\": _Style2.default.SCRIPT,\n        \"scriptscript\": _Style2.default.SCRIPTSCRIPT\n    };\n\n    var newStyle = styleMap[group.value.style];\n    var newOptions = options.havingStyle(newStyle);\n    return sizingGroup(group.value.value, newOptions, options);\n};\n\ngroupTypes.font = function (group, options) {\n    var font = group.value.font;\n    return buildGroup(group.value.body, options.withFont(font));\n};\n\ngroupTypes.delimsizing = function (group, options) {\n    var delim = group.value.value;\n\n    if (delim === \".\") {\n        // Empty delimiters still count as elements, even though they don't\n        // show anything.\n        return (0, _buildCommon.makeSpan)([group.value.mclass]);\n    }\n\n    // Use delimiter.sizedDelim to generate the delimiter.\n    return _delimiter2.default.sizedDelim(delim, group.value.size, options, group.mode, [group.value.mclass]);\n};\n\ngroupTypes.leftright = function (group, options) {\n    // Build the inner expression\n    var inner = buildExpression(group.value.body, options, true);\n\n    var innerHeight = 0;\n    var innerDepth = 0;\n    var hadMiddle = false;\n\n    // Calculate its height and depth\n    for (var i = 0; i < inner.length; i++) {\n        if (inner[i].isMiddle) {\n            hadMiddle = true;\n        } else {\n            innerHeight = Math.max(inner[i].height, innerHeight);\n            innerDepth = Math.max(inner[i].depth, innerDepth);\n        }\n    }\n\n    // The size of delimiters is the same, regardless of what style we are\n    // in. Thus, to correctly calculate the size of delimiter we need around\n    // a group, we scale down the inner size based on the size.\n    innerHeight *= options.sizeMultiplier;\n    innerDepth *= options.sizeMultiplier;\n\n    var leftDelim = void 0;\n    if (group.value.left === \".\") {\n        // Empty delimiters in \\left and \\right make null delimiter spaces.\n        leftDelim = makeNullDelimiter(options, [\"mopen\"]);\n    } else {\n        // Otherwise, use leftRightDelim to generate the correct sized\n        // delimiter.\n        leftDelim = _delimiter2.default.leftRightDelim(group.value.left, innerHeight, innerDepth, options, group.mode, [\"mopen\"]);\n    }\n    // Add it to the beginning of the expression\n    inner.unshift(leftDelim);\n\n    // Handle middle delimiters\n    if (hadMiddle) {\n        for (var _i4 = 1; _i4 < inner.length; _i4++) {\n            var middleDelim = inner[_i4];\n            if (middleDelim.isMiddle) {\n                // Apply the options that were active when \\middle was called\n                inner[_i4] = _delimiter2.default.leftRightDelim(middleDelim.isMiddle.value, innerHeight, innerDepth, middleDelim.isMiddle.options, group.mode, []);\n                // Add back spaces shifted into the delimiter\n                var spaces = spliceSpaces(middleDelim.children, 0);\n                if (spaces) {\n                    _buildCommon2.default.prependChildren(inner[_i4], spaces);\n                }\n            }\n        }\n    }\n\n    var rightDelim = void 0;\n    // Same for the right delimiter\n    if (group.value.right === \".\") {\n        rightDelim = makeNullDelimiter(options, [\"mclose\"]);\n    } else {\n        rightDelim = _delimiter2.default.leftRightDelim(group.value.right, innerHeight, innerDepth, options, group.mode, [\"mclose\"]);\n    }\n    // Add it to the end of the expression.\n    inner.push(rightDelim);\n\n    return (0, _buildCommon.makeSpan)([\"minner\"], inner, options);\n};\n\ngroupTypes.middle = function (group, options) {\n    var middleDelim = void 0;\n    if (group.value.value === \".\") {\n        middleDelim = makeNullDelimiter(options, []);\n    } else {\n        middleDelim = _delimiter2.default.sizedDelim(group.value.value, 1, options, group.mode, []);\n        middleDelim.isMiddle = { value: group.value.value, options: options };\n    }\n    return middleDelim;\n};\n\ngroupTypes.rule = function (group, options) {\n    // Make an empty span for the rule\n    var rule = (0, _buildCommon.makeSpan)([\"mord\", \"rule\"], [], options);\n\n    // Calculate the shift, width, and height of the rule, and account for units\n    var shift = 0;\n    if (group.value.shift) {\n        shift = _units2.default.calculateSize(group.value.shift, options);\n    }\n\n    var width = _units2.default.calculateSize(group.value.width, options);\n    var height = _units2.default.calculateSize(group.value.height, options);\n\n    // Style the rule to the right size\n    rule.style.borderRightWidth = width + \"em\";\n    rule.style.borderTopWidth = height + \"em\";\n    rule.style.bottom = shift + \"em\";\n\n    // Record the height and width\n    rule.width = width;\n    rule.height = height + shift;\n    rule.depth = -shift;\n    // Font size is the number large enough that the browser will\n    // reserve at least `absHeight` space above the baseline.\n    // The 1.125 factor was empirically determined\n    rule.maxFontSize = height * 1.125 * options.sizeMultiplier;\n\n    return rule;\n};\n\ngroupTypes.kern = function (group, options) {\n    // Make an empty span for the rule\n    var rule = (0, _buildCommon.makeSpan)([\"mord\", \"rule\"], [], options);\n\n    if (group.value.dimension) {\n        var dimension = _units2.default.calculateSize(group.value.dimension, options);\n        rule.style.marginLeft = dimension + \"em\";\n    }\n\n    return rule;\n};\n\ngroupTypes.accent = function (group, options) {\n    // Accents are handled in the TeXbook pg. 443, rule 12.\n    var base = group.value.base;\n\n    var supsubGroup = void 0;\n    if (group.type === \"supsub\") {\n        // If our base is a character box, and we have superscripts and\n        // subscripts, the supsub will defer to us. In particular, we want\n        // to attach the superscripts and subscripts to the inner body (so\n        // that the position of the superscripts and subscripts won't be\n        // affected by the height of the accent). We accomplish this by\n        // sticking the base of the accent into the base of the supsub, and\n        // rendering that, while keeping track of where the accent is.\n\n        // The supsub group is the group that was passed in\n        var supsub = group;\n        // The real accent group is the base of the supsub group\n        group = supsub.value.base;\n        // The character box is the base of the accent group\n        base = group.value.base;\n        // Stick the character box into the base of the supsub group\n        supsub.value.base = base;\n\n        // Rerender the supsub group with its new base, and store that\n        // result.\n        supsubGroup = buildGroup(supsub, options);\n    }\n\n    // Build the base group\n    var body = buildGroup(base, options.havingCrampedStyle());\n\n    // Does the accent need to shift for the skew of a character?\n    var mustShift = group.value.isShifty && isCharacterBox(base);\n\n    // Calculate the skew of the accent. This is based on the line \"If the\n    // nucleus is not a single character, let s = 0; otherwise set s to the\n    // kern amount for the nucleus followed by the \\skewchar of its font.\"\n    // Note that our skew metrics are just the kern between each character\n    // and the skewchar.\n    var skew = 0;\n    if (mustShift) {\n        // If the base is a character box, then we want the skew of the\n        // innermost character. To do that, we find the innermost character:\n        var baseChar = getBaseElem(base);\n        // Then, we render its group to get the symbol inside it\n        var baseGroup = buildGroup(baseChar, options.havingCrampedStyle());\n        // Finally, we pull the skew off of the symbol.\n        skew = baseGroup.skew;\n        // Note that we now throw away baseGroup, because the layers we\n        // removed with getBaseElem might contain things like \\color which\n        // we can't get rid of.\n        // TODO(emily): Find a better way to get the skew\n    }\n\n    // calculate the amount of space between the body and the accent\n    var clearance = Math.min(body.height, options.fontMetrics().xHeight);\n\n    // Build the accent\n    var accentBody = void 0;\n    if (!group.value.isStretchy) {\n        var accent = _buildCommon2.default.makeSymbol(group.value.label, \"Main-Regular\", group.mode, options);\n        // Remove the italic correction of the accent, because it only serves to\n        // shift the accent over to a place we don't want.\n        accent.italic = 0;\n\n        // The \\vec character that the fonts use is a combining character, and\n        // thus shows up much too far to the left. To account for this, we add a\n        // specific class which shifts the accent over to where we want it.\n        // TODO(emily): Fix this in a better way, like by changing the font\n        // Similarly, text accent \\H is a combining character and\n        // requires a different adjustment.\n        var accentClass = null;\n        if (group.value.label === \"\\\\vec\") {\n            accentClass = \"accent-vec\";\n        } else if (group.value.label === '\\\\H') {\n            accentClass = \"accent-hungarian\";\n        }\n\n        accentBody = (0, _buildCommon.makeSpan)([], [accent]);\n        accentBody = (0, _buildCommon.makeSpan)([\"accent-body\", accentClass], [accentBody]);\n\n        // Shift the accent over by the skew. Note we shift by twice the skew\n        // because we are centering the accent, so by adding 2*skew to the left,\n        // we shift it to the right by 1*skew.\n        accentBody.style.marginLeft = 2 * skew + \"em\";\n\n        accentBody = _buildCommon2.default.makeVList([{ type: \"elem\", elem: body }, { type: \"kern\", size: -clearance }, { type: \"elem\", elem: accentBody }], \"firstBaseline\", null, options);\n    } else {\n        accentBody = _stretchy2.default.svgSpan(group, options);\n\n        accentBody = _buildCommon2.default.makeVList([{ type: \"elem\", elem: body }, { type: \"elem\", elem: accentBody }], \"firstBaseline\", null, options);\n\n        var styleSpan = accentBody.children[0].children[0].children[1];\n        styleSpan.classes.push(\"svg-align\"); // text-align: left;\n        if (skew > 0) {\n            // Shorten the accent and nudge it to the right.\n            styleSpan.style.width = \"calc(100% - \" + 2 * skew + \"em)\";\n            styleSpan.style.marginLeft = 2 * skew + \"em\";\n        }\n    }\n\n    var accentWrap = (0, _buildCommon.makeSpan)([\"mord\", \"accent\"], [accentBody], options);\n\n    if (supsubGroup) {\n        // Here, we replace the \"base\" child of the supsub with our newly\n        // generated accent.\n        supsubGroup.children[0] = accentWrap;\n\n        // Since we don't rerun the height calculation after replacing the\n        // accent, we manually recalculate height.\n        supsubGroup.height = Math.max(accentWrap.height, supsubGroup.height);\n\n        // Accents should always be ords, even when their innards are not.\n        supsubGroup.classes[0] = \"mord\";\n\n        return supsubGroup;\n    } else {\n        return accentWrap;\n    }\n};\n\ngroupTypes.horizBrace = function (group, options) {\n    var style = options.style;\n\n    var hasSupSub = group.type === \"supsub\";\n    var supSubGroup = void 0;\n    var newOptions = void 0;\n    if (hasSupSub) {\n        // Ref: LaTeX source2e: }}}}\\limits}\n        // i.e. LaTeX treats the brace similar to an op and passes it\n        // with \\limits, so we need to assign supsub style.\n        if (group.value.sup) {\n            newOptions = options.havingStyle(style.sup());\n            supSubGroup = buildGroup(group.value.sup, newOptions, options);\n        } else {\n            newOptions = options.havingStyle(style.sub());\n            supSubGroup = buildGroup(group.value.sub, newOptions, options);\n        }\n        group = group.value.base;\n    }\n\n    // Build the base group\n    var body = buildGroup(group.value.base, options.havingBaseStyle(_Style2.default.DISPLAY));\n\n    // Create the stretchy element\n    var braceBody = _stretchy2.default.svgSpan(group, options);\n\n    // Generate the vlist, with the appropriate kerns               ┏━━━━━━━━┓\n    // This first vlist contains the subject matter and the brace:   equation\n    var vlist = void 0;\n    if (group.value.isOver) {\n        vlist = _buildCommon2.default.makeVList([{ type: \"elem\", elem: body }, { type: \"kern\", size: 0.1 }, { type: \"elem\", elem: braceBody }], \"firstBaseline\", null, options);\n        vlist.children[0].children[0].children[1].classes.push(\"svg-align\");\n    } else {\n        vlist = _buildCommon2.default.makeVList([{ type: \"elem\", elem: braceBody }, { type: \"kern\", size: 0.1 }, { type: \"elem\", elem: body }], \"bottom\", body.depth + 0.1 + braceBody.height, options);\n        vlist.children[0].children[0].children[0].classes.push(\"svg-align\");\n    }\n\n    if (hasSupSub) {\n        // In order to write the supsub, wrap the first vlist in another vlist:\n        // They can't all go in the same vlist, because the note might be wider\n        // than the equation. We want the equation to control the brace width.\n\n        //      note          long note           long note\n        //   ┏━━━━━━━━┓   or    ┏━━━┓     not    ┏━━━━━━━━━┓\n        //    equation           eqn                 eqn\n\n        var vSpan = (0, _buildCommon.makeSpan)([\"mord\", group.value.isOver ? \"mover\" : \"munder\"], [vlist], options);\n\n        if (group.value.isOver) {\n            vlist = _buildCommon2.default.makeVList([{ type: \"elem\", elem: vSpan }, { type: \"kern\", size: 0.2 }, { type: \"elem\", elem: supSubGroup }], \"firstBaseline\", null, options);\n        } else {\n            vlist = _buildCommon2.default.makeVList([{ type: \"elem\", elem: supSubGroup }, { type: \"kern\", size: 0.2 }, { type: \"elem\", elem: vSpan }], \"bottom\", vSpan.depth + 0.2 + supSubGroup.height, options);\n        }\n    }\n\n    return (0, _buildCommon.makeSpan)([\"mord\", group.value.isOver ? \"mover\" : \"munder\"], [vlist], options);\n};\n\ngroupTypes.accentUnder = function (group, options) {\n    // Treat under accents much like underlines.\n    var innerGroup = buildGroup(group.value.body, options);\n\n    var accentBody = _stretchy2.default.svgSpan(group, options);\n    var kern = /tilde/.test(group.value.label) ? 0.12 : 0;\n\n    // Generate the vlist, with the appropriate kerns\n    var vlist = _buildCommon2.default.makeVList([{ type: \"elem\", elem: accentBody }, { type: \"kern\", size: kern }, { type: \"elem\", elem: innerGroup }], \"bottom\", accentBody.height + kern, options);\n\n    vlist.children[0].children[0].children[0].classes.push(\"svg-align\");\n\n    return (0, _buildCommon.makeSpan)([\"mord\", \"accentunder\"], [vlist], options);\n};\n\ngroupTypes.enclose = function (group, options) {\n    // \\cancel, \\bcancel, \\xcancel, \\sout, \\fbox\n    var inner = buildGroup(group.value.body, options);\n\n    var label = group.value.label.substr(1);\n    var scale = options.sizeMultiplier;\n    var img = void 0;\n    var pad = 0;\n    var imgShift = 0;\n\n    if (label === \"sout\") {\n        img = (0, _buildCommon.makeSpan)([\"stretchy\", \"sout\"]);\n        img.height = options.fontMetrics().defaultRuleThickness / scale;\n        imgShift = -0.5 * options.fontMetrics().xHeight;\n    } else {\n        // Add horizontal padding\n        inner.classes.push(label === \"fbox\" ? \"boxpad\" : \"cancel-pad\");\n\n        // Add vertical padding\n        var isCharBox = isCharacterBox(group.value.body);\n        // ref: LaTeX source2e: \\fboxsep = 3pt;  \\fboxrule = .4pt\n        // ref: cancel package: \\advance\\totalheight2\\p@ % \"+2\"\n        pad = label === \"fbox\" ? 0.34 : isCharBox ? 0.2 : 0;\n        imgShift = inner.depth + pad;\n\n        img = _stretchy2.default.encloseSpan(inner, label, pad, options);\n    }\n\n    var vlist = _buildCommon2.default.makeVList([{ type: \"elem\", elem: inner, shift: 0 }, { type: \"elem\", elem: img, shift: imgShift }], \"individualShift\", null, options);\n\n    if (label !== \"fbox\") {\n        vlist.children[0].children[0].children[1].classes.push(\"svg-align\");\n    }\n\n    if (/cancel/.test(label)) {\n        // cancel does not create horiz space for its line extension.\n        // That is, not when adjacent to a mord.\n        return (0, _buildCommon.makeSpan)([\"mord\", \"cancel-lap\"], [vlist], options);\n    } else {\n        return (0, _buildCommon.makeSpan)([\"mord\"], [vlist], options);\n    }\n};\n\ngroupTypes.xArrow = function (group, options) {\n    var style = options.style;\n\n    // Build the argument groups in the appropriate style.\n    // Ref: amsmath.dtx:   \\hbox{$\\scriptstyle\\mkern#3mu{#6}\\mkern#4mu$}%\n\n    var newOptions = options.havingStyle(style.sup());\n    var upperGroup = buildGroup(group.value.body, newOptions, options);\n    upperGroup.classes.push(\"x-arrow-pad\");\n\n    var lowerGroup = void 0;\n    if (group.value.below) {\n        // Build the lower group\n        newOptions = options.havingStyle(style.sub());\n        lowerGroup = buildGroup(group.value.below, newOptions, options);\n        lowerGroup.classes.push(\"x-arrow-pad\");\n    }\n\n    var arrowBody = _stretchy2.default.svgSpan(group, options);\n\n    var arrowShift = -options.fontMetrics().axisHeight + arrowBody.depth;\n    var upperShift = -options.fontMetrics().axisHeight - arrowBody.height - 0.111; // 2 mu. Ref: amsmath.dtx: #7\\if0#2\\else\\mkern#2mu\\fi\n\n    // Generate the vlist\n    var vlist = void 0;\n    if (group.value.below) {\n        var lowerShift = -options.fontMetrics().axisHeight + lowerGroup.height + arrowBody.height + 0.111;\n        vlist = _buildCommon2.default.makeVList([{ type: \"elem\", elem: upperGroup, shift: upperShift }, { type: \"elem\", elem: arrowBody, shift: arrowShift }, { type: \"elem\", elem: lowerGroup, shift: lowerShift }], \"individualShift\", null, options);\n    } else {\n        vlist = _buildCommon2.default.makeVList([{ type: \"elem\", elem: upperGroup, shift: upperShift }, { type: \"elem\", elem: arrowBody, shift: arrowShift }], \"individualShift\", null, options);\n    }\n\n    vlist.children[0].children[0].children[1].classes.push(\"svg-align\");\n\n    return (0, _buildCommon.makeSpan)([\"mrel\", \"x-arrow\"], [vlist], options);\n};\n\ngroupTypes.phantom = function (group, options) {\n    var elements = buildExpression(group.value.value, options.withPhantom(), false);\n\n    // \\phantom isn't supposed to affect the elements it contains.\n    // See \"color\" for more details.\n    return new _buildCommon2.default.makeFragment(elements);\n};\n\ngroupTypes.mclass = function (group, options) {\n    var elements = buildExpression(group.value.value, options, true);\n\n    return (0, _buildCommon.makeSpan)([group.value.mclass], elements, options);\n};\n\n/**\n * buildGroup is the function that takes a group and calls the correct groupType\n * function for it. It also handles the interaction of size and style changes\n * between parents and children.\n */\nvar buildGroup = function buildGroup(group, options, baseOptions) {\n    if (!group) {\n        return (0, _buildCommon.makeSpan)();\n    }\n\n    if (groupTypes[group.type]) {\n        // Call the groupTypes function\n        var groupNode = groupTypes[group.type](group, options);\n\n        // If the size changed between the parent and the current group, account\n        // for that size difference.\n        if (baseOptions && options.size !== baseOptions.size) {\n            groupNode = (0, _buildCommon.makeSpan)(options.sizingClasses(baseOptions), [groupNode], options);\n\n            var multiplier = options.sizeMultiplier / baseOptions.sizeMultiplier;\n\n            groupNode.height *= multiplier;\n            groupNode.depth *= multiplier;\n        }\n\n        return groupNode;\n    } else {\n        throw new _ParseError2.default(\"Got group of unknown type: '\" + group.type + \"'\");\n    }\n};\n\n/**\n * Take an entire parse tree, and build it into an appropriate set of HTML\n * nodes.\n */\nvar buildHTML = function buildHTML(tree, options) {\n    // buildExpression is destructive, so we need to make a clone\n    // of the incoming tree so that it isn't accidentally changed\n    tree = JSON.parse((0, _stringify2.default)(tree));\n\n    // Build the expression contained in the tree\n    var expression = buildExpression(tree, options, true);\n    var body = (0, _buildCommon.makeSpan)([\"base\"], expression, options);\n\n    // Add struts, which ensure that the top of the HTML element falls at the\n    // height of the expression, and the bottom of the HTML element falls at the\n    // depth of the expression.\n    var topStrut = (0, _buildCommon.makeSpan)([\"strut\"]);\n    var bottomStrut = (0, _buildCommon.makeSpan)([\"strut\", \"bottom\"]);\n\n    topStrut.style.height = body.height + \"em\";\n    bottomStrut.style.height = body.height + body.depth + \"em\";\n    // We'd like to use `vertical-align: top` but in IE 9 this lowers the\n    // baseline of the box to the bottom of this strut (instead staying in the\n    // normal place) so we use an absolute value for vertical-align instead\n    bottomStrut.style.verticalAlign = -body.depth + \"em\";\n\n    // Wrap the struts and body together\n    var htmlNode = (0, _buildCommon.makeSpan)([\"katex-html\"], [topStrut, bottomStrut, body]);\n\n    htmlNode.setAttribute(\"aria-hidden\", \"true\");\n\n    return htmlNode;\n};\n\nmodule.exports = buildHTML;\n\n},{\"./ParseError\":29,\"./Style\":33,\"./buildCommon\":34,\"./delimiter\":38,\"./domTree\":39,\"./stretchy\":47,\"./units\":50,\"./utils\":51,\"babel-runtime/core-js/json/stringify\":2}],36:[function(require,module,exports){\n\"use strict\";\n\nvar _buildCommon = require(\"./buildCommon\");\n\nvar _buildCommon2 = _interopRequireDefault(_buildCommon);\n\nvar _fontMetrics = require(\"./fontMetrics\");\n\nvar _fontMetrics2 = _interopRequireDefault(_fontMetrics);\n\nvar _mathMLTree = require(\"./mathMLTree\");\n\nvar _mathMLTree2 = _interopRequireDefault(_mathMLTree);\n\nvar _ParseError = require(\"./ParseError\");\n\nvar _ParseError2 = _interopRequireDefault(_ParseError);\n\nvar _Style = require(\"./Style\");\n\nvar _Style2 = _interopRequireDefault(_Style);\n\nvar _symbols = require(\"./symbols\");\n\nvar _symbols2 = _interopRequireDefault(_symbols);\n\nvar _utils = require(\"./utils\");\n\nvar _utils2 = _interopRequireDefault(_utils);\n\nvar _stretchy = require(\"./stretchy\");\n\nvar _stretchy2 = _interopRequireDefault(_stretchy);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/**\n * Takes a symbol and converts it into a MathML text node after performing\n * optional replacement from symbols.js.\n */\n/**\n * This file converts a parse tree into a cooresponding MathML tree. The main\n * entry point is the `buildMathML` function, which takes a parse tree from the\n * parser.\n */\n\nvar makeText = function makeText(text, mode) {\n    if (_symbols2.default[mode][text] && _symbols2.default[mode][text].replace) {\n        text = _symbols2.default[mode][text].replace;\n    }\n\n    return new _mathMLTree2.default.TextNode(text);\n};\n\n/**\n * Returns the math variant as a string or null if none is required.\n */\nvar getVariant = function getVariant(group, options) {\n    var font = options.font;\n    if (!font) {\n        return null;\n    }\n\n    var mode = group.mode;\n    if (font === \"mathit\") {\n        return \"italic\";\n    }\n\n    var value = group.value;\n    if (_utils2.default.contains([\"\\\\imath\", \"\\\\jmath\"], value)) {\n        return null;\n    }\n\n    if (_symbols2.default[mode][value] && _symbols2.default[mode][value].replace) {\n        value = _symbols2.default[mode][value].replace;\n    }\n\n    var fontName = _buildCommon.fontMap[font].fontName;\n    if (_fontMetrics2.default.getCharacterMetrics(value, fontName)) {\n        return _buildCommon.fontMap[options.font].variant;\n    }\n\n    return null;\n};\n\n/**\n * Functions for handling the different types of groups found in the parse\n * tree. Each function should take a parse group and return a MathML node.\n */\nvar groupTypes = {};\n\nvar defaultVariant = {\n    \"mi\": \"italic\",\n    \"mn\": \"normal\",\n    \"mtext\": \"normal\"\n};\n\ngroupTypes.mathord = function (group, options) {\n    var node = new _mathMLTree2.default.MathNode(\"mi\", [makeText(group.value, group.mode)]);\n\n    var variant = getVariant(group, options) || \"italic\";\n    if (variant !== defaultVariant[node.type]) {\n        node.setAttribute(\"mathvariant\", variant);\n    }\n    return node;\n};\n\ngroupTypes.textord = function (group, options) {\n    var text = makeText(group.value, group.mode);\n\n    var variant = getVariant(group, options) || \"normal\";\n\n    var node = void 0;\n    if (group.mode === 'text') {\n        node = new _mathMLTree2.default.MathNode(\"mtext\", [text]);\n    } else if (/[0-9]/.test(group.value)) {\n        // TODO(kevinb) merge adjacent <mn> nodes\n        // do it as a post processing step\n        node = new _mathMLTree2.default.MathNode(\"mn\", [text]);\n    } else if (group.value === \"\\\\prime\") {\n        node = new _mathMLTree2.default.MathNode(\"mo\", [text]);\n    } else {\n        node = new _mathMLTree2.default.MathNode(\"mi\", [text]);\n    }\n    if (variant !== defaultVariant[node.type]) {\n        node.setAttribute(\"mathvariant\", variant);\n    }\n\n    return node;\n};\n\ngroupTypes.bin = function (group) {\n    var node = new _mathMLTree2.default.MathNode(\"mo\", [makeText(group.value, group.mode)]);\n\n    return node;\n};\n\ngroupTypes.rel = function (group) {\n    var node = new _mathMLTree2.default.MathNode(\"mo\", [makeText(group.value, group.mode)]);\n\n    return node;\n};\n\ngroupTypes.open = function (group) {\n    var node = new _mathMLTree2.default.MathNode(\"mo\", [makeText(group.value, group.mode)]);\n\n    return node;\n};\n\ngroupTypes.close = function (group) {\n    var node = new _mathMLTree2.default.MathNode(\"mo\", [makeText(group.value, group.mode)]);\n\n    return node;\n};\n\ngroupTypes.inner = function (group) {\n    var node = new _mathMLTree2.default.MathNode(\"mo\", [makeText(group.value, group.mode)]);\n\n    return node;\n};\n\ngroupTypes.punct = function (group) {\n    var node = new _mathMLTree2.default.MathNode(\"mo\", [makeText(group.value, group.mode)]);\n\n    node.setAttribute(\"separator\", \"true\");\n\n    return node;\n};\n\ngroupTypes.ordgroup = function (group, options) {\n    var inner = buildExpression(group.value, options);\n\n    var node = new _mathMLTree2.default.MathNode(\"mrow\", inner);\n\n    return node;\n};\n\ngroupTypes.text = function (group, options) {\n    var body = group.value.body;\n\n    // Convert each element of the body into MathML, and combine consecutive\n    // <mtext> outputs into a single <mtext> tag.  In this way, we don't\n    // nest non-text items (e.g., $nested-math$) within an <mtext>.\n    var inner = [];\n    var currentText = null;\n    for (var i = 0; i < body.length; i++) {\n        var _group = buildGroup(body[i], options);\n        if (_group.type === 'mtext' && currentText != null) {\n            Array.prototype.push.apply(currentText.children, _group.children);\n        } else {\n            inner.push(_group);\n            if (_group.type === 'mtext') {\n                currentText = _group;\n            }\n        }\n    }\n\n    // If there is a single tag in the end (presumably <mtext>),\n    // just return it.  Otherwise, wrap them in an <mrow>.\n    if (inner.length === 1) {\n        return inner[0];\n    } else {\n        return new _mathMLTree2.default.MathNode(\"mrow\", inner);\n    }\n};\n\ngroupTypes.color = function (group, options) {\n    var inner = buildExpression(group.value.value, options);\n\n    var node = new _mathMLTree2.default.MathNode(\"mstyle\", inner);\n\n    node.setAttribute(\"mathcolor\", group.value.color);\n\n    return node;\n};\n\ngroupTypes.supsub = function (group, options) {\n    // Is the inner group a relevant horizonal brace?\n    var isBrace = false;\n    var isOver = void 0;\n    var isSup = void 0;\n    if (group.value.base) {\n        if (group.value.base.value.type === \"horizBrace\") {\n            isSup = group.value.sup ? true : false;\n            if (isSup === group.value.base.value.isOver) {\n                isBrace = true;\n                isOver = group.value.base.value.isOver;\n            }\n        }\n    }\n\n    var removeUnnecessaryRow = true;\n    var children = [buildGroup(group.value.base, options, removeUnnecessaryRow)];\n\n    if (group.value.sub) {\n        children.push(buildGroup(group.value.sub, options, removeUnnecessaryRow));\n    }\n\n    if (group.value.sup) {\n        children.push(buildGroup(group.value.sup, options, removeUnnecessaryRow));\n    }\n\n    var nodeType = void 0;\n    if (isBrace) {\n        nodeType = isOver ? \"mover\" : \"munder\";\n    } else if (!group.value.sub) {\n        nodeType = \"msup\";\n    } else if (!group.value.sup) {\n        nodeType = \"msub\";\n    } else {\n        var base = group.value.base;\n        if (base && base.value.limits && options.style === _Style2.default.DISPLAY) {\n            nodeType = \"munderover\";\n        } else {\n            nodeType = \"msubsup\";\n        }\n    }\n\n    var node = new _mathMLTree2.default.MathNode(nodeType, children);\n\n    return node;\n};\n\ngroupTypes.genfrac = function (group, options) {\n    var node = new _mathMLTree2.default.MathNode(\"mfrac\", [buildGroup(group.value.numer, options), buildGroup(group.value.denom, options)]);\n\n    if (!group.value.hasBarLine) {\n        node.setAttribute(\"linethickness\", \"0px\");\n    }\n\n    if (group.value.leftDelim != null || group.value.rightDelim != null) {\n        var withDelims = [];\n\n        if (group.value.leftDelim != null) {\n            var leftOp = new _mathMLTree2.default.MathNode(\"mo\", [new _mathMLTree2.default.TextNode(group.value.leftDelim)]);\n\n            leftOp.setAttribute(\"fence\", \"true\");\n\n            withDelims.push(leftOp);\n        }\n\n        withDelims.push(node);\n\n        if (group.value.rightDelim != null) {\n            var rightOp = new _mathMLTree2.default.MathNode(\"mo\", [new _mathMLTree2.default.TextNode(group.value.rightDelim)]);\n\n            rightOp.setAttribute(\"fence\", \"true\");\n\n            withDelims.push(rightOp);\n        }\n\n        var outerNode = new _mathMLTree2.default.MathNode(\"mrow\", withDelims);\n\n        return outerNode;\n    }\n\n    return node;\n};\n\ngroupTypes.array = function (group, options) {\n    return new _mathMLTree2.default.MathNode(\"mtable\", group.value.body.map(function (row) {\n        return new _mathMLTree2.default.MathNode(\"mtr\", row.map(function (cell) {\n            return new _mathMLTree2.default.MathNode(\"mtd\", [buildGroup(cell, options)]);\n        }));\n    }));\n};\n\ngroupTypes.sqrt = function (group, options) {\n    var node = void 0;\n    if (group.value.index) {\n        node = new _mathMLTree2.default.MathNode(\"mroot\", [buildGroup(group.value.body, options), buildGroup(group.value.index, options)]);\n    } else {\n        node = new _mathMLTree2.default.MathNode(\"msqrt\", [buildGroup(group.value.body, options)]);\n    }\n\n    return node;\n};\n\ngroupTypes.leftright = function (group, options) {\n    var inner = buildExpression(group.value.body, options);\n\n    if (group.value.left !== \".\") {\n        var leftNode = new _mathMLTree2.default.MathNode(\"mo\", [makeText(group.value.left, group.mode)]);\n\n        leftNode.setAttribute(\"fence\", \"true\");\n\n        inner.unshift(leftNode);\n    }\n\n    if (group.value.right !== \".\") {\n        var rightNode = new _mathMLTree2.default.MathNode(\"mo\", [makeText(group.value.right, group.mode)]);\n\n        rightNode.setAttribute(\"fence\", \"true\");\n\n        inner.push(rightNode);\n    }\n\n    var outerNode = new _mathMLTree2.default.MathNode(\"mrow\", inner);\n\n    return outerNode;\n};\n\ngroupTypes.middle = function (group, options) {\n    var middleNode = new _mathMLTree2.default.MathNode(\"mo\", [makeText(group.value.middle, group.mode)]);\n    middleNode.setAttribute(\"fence\", \"true\");\n    return middleNode;\n};\n\ngroupTypes.accent = function (group, options) {\n    var accentNode = void 0;\n    if (group.value.isStretchy) {\n        accentNode = _stretchy2.default.mathMLnode(group.value.label);\n    } else {\n        accentNode = new _mathMLTree2.default.MathNode(\"mo\", [makeText(group.value.label, group.mode)]);\n    }\n\n    var node = new _mathMLTree2.default.MathNode(\"mover\", [buildGroup(group.value.base, options), accentNode]);\n\n    node.setAttribute(\"accent\", \"true\");\n\n    return node;\n};\n\ngroupTypes.spacing = function (group) {\n    var node = void 0;\n\n    if (group.value === \"\\\\ \" || group.value === \"\\\\space\" || group.value === \" \" || group.value === \"~\") {\n        node = new _mathMLTree2.default.MathNode(\"mtext\", [new _mathMLTree2.default.TextNode(\"\\xA0\")]);\n    } else {\n        node = new _mathMLTree2.default.MathNode(\"mspace\");\n\n        node.setAttribute(\"width\", _buildCommon2.default.spacingFunctions[group.value].size);\n    }\n\n    return node;\n};\n\ngroupTypes.op = function (group, options) {\n    var node = void 0;\n\n    // TODO(emily): handle big operators using the `largeop` attribute\n\n    if (group.value.symbol) {\n        // This is a symbol. Just add the symbol.\n        node = new _mathMLTree2.default.MathNode(\"mo\", [makeText(group.value.body, group.mode)]);\n    } else if (group.value.value) {\n        // This is an operator with children. Add them.\n        node = new _mathMLTree2.default.MathNode(\"mo\", buildExpression(group.value.value, options));\n    } else {\n        // This is a text operator. Add all of the characters from the\n        // operator's name.\n        // TODO(emily): Add a space in the middle of some of these\n        // operators, like \\limsup.\n        node = new _mathMLTree2.default.MathNode(\"mi\", [new _mathMLTree2.default.TextNode(group.value.body.slice(1))]);\n    }\n\n    return node;\n};\n\ngroupTypes.mod = function (group, options) {\n    var inner = [];\n\n    if (group.value.modType === \"pod\" || group.value.modType === \"pmod\") {\n        inner.push(new _mathMLTree2.default.MathNode(\"mo\", [makeText(\"(\", group.mode)]));\n    }\n    if (group.value.modType !== \"pod\") {\n        inner.push(new _mathMLTree2.default.MathNode(\"mo\", [makeText(\"mod\", group.mode)]));\n    }\n    if (group.value.value) {\n        var space = new _mathMLTree2.default.MathNode(\"mspace\");\n        space.setAttribute(\"width\", \"0.333333em\");\n        inner.push(space);\n        inner = inner.concat(buildExpression(group.value.value, options));\n    }\n    if (group.value.modType === \"pod\" || group.value.modType === \"pmod\") {\n        inner.push(new _mathMLTree2.default.MathNode(\"mo\", [makeText(\")\", group.mode)]));\n    }\n\n    return new _mathMLTree2.default.MathNode(\"mo\", inner);\n};\n\ngroupTypes.katex = function (group) {\n    var node = new _mathMLTree2.default.MathNode(\"mtext\", [new _mathMLTree2.default.TextNode(\"KaTeX\")]);\n\n    return node;\n};\n\ngroupTypes.font = function (group, options) {\n    var font = group.value.font;\n    return buildGroup(group.value.body, options.withFont(font));\n};\n\ngroupTypes.delimsizing = function (group) {\n    var children = [];\n\n    if (group.value.value !== \".\") {\n        children.push(makeText(group.value.value, group.mode));\n    }\n\n    var node = new _mathMLTree2.default.MathNode(\"mo\", children);\n\n    if (group.value.mclass === \"mopen\" || group.value.mclass === \"mclose\") {\n        // Only some of the delimsizing functions act as fences, and they\n        // return \"mopen\" or \"mclose\" mclass.\n        node.setAttribute(\"fence\", \"true\");\n    } else {\n        // Explicitly disable fencing if it's not a fence, to override the\n        // defaults.\n        node.setAttribute(\"fence\", \"false\");\n    }\n\n    return node;\n};\n\ngroupTypes.styling = function (group, options) {\n    // Figure out what style we're changing to.\n    // TODO(kevinb): dedupe this with buildHTML.js\n    // This will be easier of handling of styling nodes is in the same file.\n    var styleMap = {\n        \"display\": _Style2.default.DISPLAY,\n        \"text\": _Style2.default.TEXT,\n        \"script\": _Style2.default.SCRIPT,\n        \"scriptscript\": _Style2.default.SCRIPTSCRIPT\n    };\n\n    var newStyle = styleMap[group.value.style];\n    var newOptions = options.havingStyle(newStyle);\n\n    var inner = buildExpression(group.value.value, newOptions);\n\n    var node = new _mathMLTree2.default.MathNode(\"mstyle\", inner);\n\n    var styleAttributes = {\n        \"display\": [\"0\", \"true\"],\n        \"text\": [\"0\", \"false\"],\n        \"script\": [\"1\", \"false\"],\n        \"scriptscript\": [\"2\", \"false\"]\n    };\n\n    var attr = styleAttributes[group.value.style];\n\n    node.setAttribute(\"scriptlevel\", attr[0]);\n    node.setAttribute(\"displaystyle\", attr[1]);\n\n    return node;\n};\n\ngroupTypes.sizing = function (group, options) {\n    var newOptions = options.havingSize(group.value.size);\n    var inner = buildExpression(group.value.value, newOptions);\n\n    var node = new _mathMLTree2.default.MathNode(\"mstyle\", inner);\n\n    // TODO(emily): This doesn't produce the correct size for nested size\n    // changes, because we don't keep state of what style we're currently\n    // in, so we can't reset the size to normal before changing it.  Now\n    // that we're passing an options parameter we should be able to fix\n    // this.\n    node.setAttribute(\"mathsize\", newOptions.sizeMultiplier + \"em\");\n\n    return node;\n};\n\ngroupTypes.overline = function (group, options) {\n    var operator = new _mathMLTree2.default.MathNode(\"mo\", [new _mathMLTree2.default.TextNode(\"\\u203E\")]);\n    operator.setAttribute(\"stretchy\", \"true\");\n\n    var node = new _mathMLTree2.default.MathNode(\"mover\", [buildGroup(group.value.body, options), operator]);\n    node.setAttribute(\"accent\", \"true\");\n\n    return node;\n};\n\ngroupTypes.underline = function (group, options) {\n    var operator = new _mathMLTree2.default.MathNode(\"mo\", [new _mathMLTree2.default.TextNode(\"\\u203E\")]);\n    operator.setAttribute(\"stretchy\", \"true\");\n\n    var node = new _mathMLTree2.default.MathNode(\"munder\", [buildGroup(group.value.body, options), operator]);\n    node.setAttribute(\"accentunder\", \"true\");\n\n    return node;\n};\n\ngroupTypes.accentUnder = function (group, options) {\n    var accentNode = _stretchy2.default.mathMLnode(group.value.label);\n    var node = new _mathMLTree2.default.MathNode(\"munder\", [buildGroup(group.value.body, options), accentNode]);\n    node.setAttribute(\"accentunder\", \"true\");\n    return node;\n};\n\ngroupTypes.enclose = function (group, options) {\n    var node = new _mathMLTree2.default.MathNode(\"menclose\", [buildGroup(group.value.body, options)]);\n    var notation = \"\";\n    switch (group.value.label) {\n        case \"\\\\bcancel\":\n            notation = \"downdiagonalstrike\";\n            break;\n        case \"\\\\sout\":\n            notation = \"horizontalstrike\";\n            break;\n        case \"\\\\fbox\":\n            notation = \"box\";\n            break;\n        default:\n            notation = \"updiagonalstrike\";\n    }\n    node.setAttribute(\"notation\", notation);\n    return node;\n};\n\ngroupTypes.horizBrace = function (group, options) {\n    var accentNode = _stretchy2.default.mathMLnode(group.value.label);\n    return new _mathMLTree2.default.MathNode(group.value.isOver ? \"mover\" : \"munder\", [buildGroup(group.value.base, options), accentNode]);\n};\n\ngroupTypes.xArrow = function (group, options) {\n    var arrowNode = _stretchy2.default.mathMLnode(group.value.label);\n    var node = void 0;\n    var lowerNode = void 0;\n\n    if (group.value.body) {\n        var upperNode = buildGroup(group.value.body, options);\n        if (group.value.below) {\n            lowerNode = buildGroup(group.value.below, options);\n            node = new _mathMLTree2.default.MathNode(\"munderover\", [arrowNode, lowerNode, upperNode]);\n        } else {\n            node = new _mathMLTree2.default.MathNode(\"mover\", [arrowNode, upperNode]);\n        }\n    } else if (group.value.below) {\n        lowerNode = buildGroup(group.value.below, options);\n        node = new _mathMLTree2.default.MathNode(\"munder\", [arrowNode, lowerNode]);\n    } else {\n        node = new _mathMLTree2.default.MathNode(\"mover\", [arrowNode]);\n    }\n    return node;\n};\n\ngroupTypes.rule = function (group) {\n    // TODO(emily): Figure out if there's an actual way to draw black boxes\n    // in MathML.\n    var node = new _mathMLTree2.default.MathNode(\"mrow\");\n\n    return node;\n};\n\ngroupTypes.kern = function (group) {\n    // TODO(kevin): Figure out if there's a way to add space in MathML\n    var node = new _mathMLTree2.default.MathNode(\"mrow\");\n\n    return node;\n};\n\ngroupTypes.llap = function (group, options) {\n    var node = new _mathMLTree2.default.MathNode(\"mpadded\", [buildGroup(group.value.body, options)]);\n\n    node.setAttribute(\"lspace\", \"-1width\");\n    node.setAttribute(\"width\", \"0px\");\n\n    return node;\n};\n\ngroupTypes.rlap = function (group, options) {\n    var node = new _mathMLTree2.default.MathNode(\"mpadded\", [buildGroup(group.value.body, options)]);\n\n    node.setAttribute(\"width\", \"0px\");\n\n    return node;\n};\n\ngroupTypes.phantom = function (group, options) {\n    var inner = buildExpression(group.value.value, options);\n    return new _mathMLTree2.default.MathNode(\"mphantom\", inner);\n};\n\ngroupTypes.mclass = function (group, options) {\n    var inner = buildExpression(group.value.value, options);\n    return new _mathMLTree2.default.MathNode(\"mstyle\", inner);\n};\n\n/**\n * Takes a list of nodes, builds them, and returns a list of the generated\n * MathML nodes. A little simpler than the HTML version because we don't do any\n * previous-node handling.\n */\nvar buildExpression = function buildExpression(expression, options) {\n    var groups = [];\n    for (var i = 0; i < expression.length; i++) {\n        var group = expression[i];\n        groups.push(buildGroup(group, options));\n    }\n\n    // TODO(kevinb): combine \\\\not with mrels and mords\n\n    return groups;\n};\n\n/**\n * Takes a group from the parser and calls the appropriate groupTypes function\n * on it to produce a MathML node.\n */\n// TODO(kevinb): determine if removeUnnecessaryRow should always be true\nvar buildGroup = function buildGroup(group, options) {\n    var removeUnnecessaryRow = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n\n    if (!group) {\n        return new _mathMLTree2.default.MathNode(\"mrow\");\n    }\n\n    if (groupTypes[group.type]) {\n        // Call the groupTypes function\n        var result = groupTypes[group.type](group, options);\n        if (removeUnnecessaryRow) {\n            if (result.type === \"mrow\" && result.children.length === 1) {\n                return result.children[0];\n            }\n        }\n        return result;\n    } else {\n        throw new _ParseError2.default(\"Got group of unknown type: '\" + group.type + \"'\");\n    }\n};\n\n/**\n * Takes a full parse tree and settings and builds a MathML representation of\n * it. In particular, we put the elements from building the parse tree into a\n * <semantics> tag so we can also include that TeX source as an annotation.\n *\n * Note that we actually return a domTree element with a `<math>` inside it so\n * we can do appropriate styling.\n */\nvar buildMathML = function buildMathML(tree, texExpression, options) {\n    var expression = buildExpression(tree, options);\n\n    // Wrap up the expression in an mrow so it is presented in the semantics\n    // tag correctly.\n    var wrapper = new _mathMLTree2.default.MathNode(\"mrow\", expression);\n\n    // Build a TeX annotation of the source\n    var annotation = new _mathMLTree2.default.MathNode(\"annotation\", [new _mathMLTree2.default.TextNode(texExpression)]);\n\n    annotation.setAttribute(\"encoding\", \"application/x-tex\");\n\n    var semantics = new _mathMLTree2.default.MathNode(\"semantics\", [wrapper, annotation]);\n\n    var math = new _mathMLTree2.default.MathNode(\"math\", [semantics]);\n\n    // You can't style <math> nodes, so we wrap the node in a span.\n    return (0, _buildCommon.makeSpan)([\"katex-mathml\"], [math]);\n};\n\nmodule.exports = buildMathML;\n\n},{\"./ParseError\":29,\"./Style\":33,\"./buildCommon\":34,\"./fontMetrics\":41,\"./mathMLTree\":45,\"./stretchy\":47,\"./symbols\":48,\"./utils\":51}],37:[function(require,module,exports){\n\"use strict\";\n\nvar _buildHTML = require(\"./buildHTML\");\n\nvar _buildHTML2 = _interopRequireDefault(_buildHTML);\n\nvar _buildMathML = require(\"./buildMathML\");\n\nvar _buildMathML2 = _interopRequireDefault(_buildMathML);\n\nvar _buildCommon = require(\"./buildCommon\");\n\nvar _Options = require(\"./Options\");\n\nvar _Options2 = _interopRequireDefault(_Options);\n\nvar _Settings = require(\"./Settings\");\n\nvar _Settings2 = _interopRequireDefault(_Settings);\n\nvar _Style = require(\"./Style\");\n\nvar _Style2 = _interopRequireDefault(_Style);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar buildTree = function buildTree(tree, expression, settings) {\n    settings = settings || new _Settings2.default({});\n\n    var startStyle = _Style2.default.TEXT;\n    if (settings.displayMode) {\n        startStyle = _Style2.default.DISPLAY;\n    }\n\n    // Setup the default options\n    var options = new _Options2.default({\n        style: startStyle\n    });\n\n    // `buildHTML` sometimes messes with the parse tree (like turning bins ->\n    // ords), so we build the MathML version first.\n    var mathMLNode = (0, _buildMathML2.default)(tree, expression, options);\n    var htmlNode = (0, _buildHTML2.default)(tree, options);\n\n    var katexNode = (0, _buildCommon.makeSpan)([\"katex\"], [mathMLNode, htmlNode]);\n\n    if (settings.displayMode) {\n        return (0, _buildCommon.makeSpan)([\"katex-display\"], [katexNode]);\n    } else {\n        return katexNode;\n    }\n};\n\nmodule.exports = buildTree;\n\n},{\"./Options\":28,\"./Settings\":32,\"./Style\":33,\"./buildCommon\":34,\"./buildHTML\":35,\"./buildMathML\":36}],38:[function(require,module,exports){\n\"use strict\";\n\nvar _ParseError = require(\"./ParseError\");\n\nvar _ParseError2 = _interopRequireDefault(_ParseError);\n\nvar _Style = require(\"./Style\");\n\nvar _Style2 = _interopRequireDefault(_Style);\n\nvar _buildCommon = require(\"./buildCommon\");\n\nvar _buildCommon2 = _interopRequireDefault(_buildCommon);\n\nvar _fontMetrics = require(\"./fontMetrics\");\n\nvar _fontMetrics2 = _interopRequireDefault(_fontMetrics);\n\nvar _symbols = require(\"./symbols\");\n\nvar _symbols2 = _interopRequireDefault(_symbols);\n\nvar _utils = require(\"./utils\");\n\nvar _utils2 = _interopRequireDefault(_utils);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/**\n * Get the metrics for a given symbol and font, after transformation (i.e.\n * after following replacement from symbols.js)\n */\n/**\n * This file deals with creating delimiters of various sizes. The TeXbook\n * discusses these routines on page 441-442, in the \"Another subroutine sets box\n * x to a specified variable delimiter\" paragraph.\n *\n * There are three main routines here. `makeSmallDelim` makes a delimiter in the\n * normal font, but in either text, script, or scriptscript style.\n * `makeLargeDelim` makes a delimiter in textstyle, but in one of the Size1,\n * Size2, Size3, or Size4 fonts. `makeStackedDelim` makes a delimiter out of\n * smaller pieces that are stacked on top of one another.\n *\n * The functions take a parameter `center`, which determines if the delimiter\n * should be centered around the axis.\n *\n * Then, there are three exposed functions. `sizedDelim` makes a delimiter in\n * one of the given sizes. This is used for things like `\\bigl`.\n * `customSizedDelim` makes a delimiter with a given total height+depth. It is\n * called in places like `\\sqrt`. `leftRightDelim` makes an appropriate\n * delimiter which surrounds an expression of a given height an depth. It is\n * used in `\\left` and `\\right`.\n */\n\nvar getMetrics = function getMetrics(symbol, font) {\n    if (_symbols2.default.math[symbol] && _symbols2.default.math[symbol].replace) {\n        return _fontMetrics2.default.getCharacterMetrics(_symbols2.default.math[symbol].replace, font);\n    } else {\n        return _fontMetrics2.default.getCharacterMetrics(symbol, font);\n    }\n};\n\n/**\n * Puts a delimiter span in a given style, and adds appropriate height, depth,\n * and maxFontSizes.\n */\nvar styleWrap = function styleWrap(delim, toStyle, options, classes) {\n    var newOptions = options.havingBaseStyle(toStyle);\n\n    var span = (0, _buildCommon.makeSpan)((classes || []).concat(newOptions.sizingClasses(options)), [delim], options);\n\n    span.delimSizeMultiplier = newOptions.sizeMultiplier / options.sizeMultiplier;\n    span.height *= span.delimSizeMultiplier;\n    span.depth *= span.delimSizeMultiplier;\n    span.maxFontSize = newOptions.sizeMultiplier;\n\n    return span;\n};\n\nvar centerSpan = function centerSpan(span, options, style) {\n    var newOptions = options.havingBaseStyle(style);\n    var shift = (1 - options.sizeMultiplier / newOptions.sizeMultiplier) * options.fontMetrics().axisHeight;\n\n    span.classes.push(\"delimcenter\");\n    span.style.top = shift + \"em\";\n    span.height -= shift;\n    span.depth += shift;\n};\n\n/**\n * Makes a small delimiter. This is a delimiter that comes in the Main-Regular\n * font, but is restyled to either be in textstyle, scriptstyle, or\n * scriptscriptstyle.\n */\nvar makeSmallDelim = function makeSmallDelim(delim, style, center, options, mode, classes) {\n    var text = _buildCommon2.default.makeSymbol(delim, \"Main-Regular\", mode, options);\n    var span = styleWrap(text, style, options, classes);\n    if (center) {\n        centerSpan(span, options, style);\n    }\n    return span;\n};\n\n/**\n * Builds a symbol in the given font size (note size is an integer)\n */\nvar mathrmSize = function mathrmSize(value, size, mode, options) {\n    return _buildCommon2.default.makeSymbol(value, \"Size\" + size + \"-Regular\", mode, options);\n};\n\n/**\n * Makes a large delimiter. This is a delimiter that comes in the Size1, Size2,\n * Size3, or Size4 fonts. It is always rendered in textstyle.\n */\nvar makeLargeDelim = function makeLargeDelim(delim, size, center, options, mode, classes) {\n    var inner = mathrmSize(delim, size, mode, options);\n    var span = styleWrap((0, _buildCommon.makeSpan)([\"delimsizing\", \"size\" + size], [inner], options), _Style2.default.TEXT, options, classes);\n    if (center) {\n        centerSpan(span, options, _Style2.default.TEXT);\n    }\n    return span;\n};\n\n/**\n * Make an inner span with the given offset and in the given font. This is used\n * in `makeStackedDelim` to make the stacking pieces for the delimiter.\n */\nvar makeInner = function makeInner(symbol, font, mode) {\n    var sizeClass = void 0;\n    // Apply the correct CSS class to choose the right font.\n    if (font === \"Size1-Regular\") {\n        sizeClass = \"delim-size1\";\n    } else if (font === \"Size4-Regular\") {\n        sizeClass = \"delim-size4\";\n    }\n\n    var inner = (0, _buildCommon.makeSpan)([\"delimsizinginner\", sizeClass], [(0, _buildCommon.makeSpan)([], [_buildCommon2.default.makeSymbol(symbol, font, mode)])]);\n\n    // Since this will be passed into `makeVList` in the end, wrap the element\n    // in the appropriate tag that VList uses.\n    return { type: \"elem\", elem: inner };\n};\n\n/**\n * Make a stacked delimiter out of a given delimiter, with the total height at\n * least `heightTotal`. This routine is mentioned on page 442 of the TeXbook.\n */\nvar makeStackedDelim = function makeStackedDelim(delim, heightTotal, center, options, mode, classes) {\n    // There are four parts, the top, an optional middle, a repeated part, and a\n    // bottom.\n    var top = void 0;\n    var middle = void 0;\n    var repeat = void 0;\n    var bottom = void 0;\n    top = repeat = bottom = delim;\n    middle = null;\n    // Also keep track of what font the delimiters are in\n    var font = \"Size1-Regular\";\n\n    // We set the parts and font based on the symbol. Note that we use\n    // '\\u23d0' instead of '|' and '\\u2016' instead of '\\\\|' for the\n    // repeats of the arrows\n    if (delim === \"\\\\uparrow\") {\n        repeat = bottom = \"\\u23D0\";\n    } else if (delim === \"\\\\Uparrow\") {\n        repeat = bottom = \"\\u2016\";\n    } else if (delim === \"\\\\downarrow\") {\n        top = repeat = \"\\u23D0\";\n    } else if (delim === \"\\\\Downarrow\") {\n        top = repeat = \"\\u2016\";\n    } else if (delim === \"\\\\updownarrow\") {\n        top = \"\\\\uparrow\";\n        repeat = \"\\u23D0\";\n        bottom = \"\\\\downarrow\";\n    } else if (delim === \"\\\\Updownarrow\") {\n        top = \"\\\\Uparrow\";\n        repeat = \"\\u2016\";\n        bottom = \"\\\\Downarrow\";\n    } else if (delim === \"[\" || delim === \"\\\\lbrack\") {\n        top = \"\\u23A1\";\n        repeat = \"\\u23A2\";\n        bottom = \"\\u23A3\";\n        font = \"Size4-Regular\";\n    } else if (delim === \"]\" || delim === \"\\\\rbrack\") {\n        top = \"\\u23A4\";\n        repeat = \"\\u23A5\";\n        bottom = \"\\u23A6\";\n        font = \"Size4-Regular\";\n    } else if (delim === \"\\\\lfloor\") {\n        repeat = top = \"\\u23A2\";\n        bottom = \"\\u23A3\";\n        font = \"Size4-Regular\";\n    } else if (delim === \"\\\\lceil\") {\n        top = \"\\u23A1\";\n        repeat = bottom = \"\\u23A2\";\n        font = \"Size4-Regular\";\n    } else if (delim === \"\\\\rfloor\") {\n        repeat = top = \"\\u23A5\";\n        bottom = \"\\u23A6\";\n        font = \"Size4-Regular\";\n    } else if (delim === \"\\\\rceil\") {\n        top = \"\\u23A4\";\n        repeat = bottom = \"\\u23A5\";\n        font = \"Size4-Regular\";\n    } else if (delim === \"(\") {\n        top = \"\\u239B\";\n        repeat = \"\\u239C\";\n        bottom = \"\\u239D\";\n        font = \"Size4-Regular\";\n    } else if (delim === \")\") {\n        top = \"\\u239E\";\n        repeat = \"\\u239F\";\n        bottom = \"\\u23A0\";\n        font = \"Size4-Regular\";\n    } else if (delim === \"\\\\{\" || delim === \"\\\\lbrace\") {\n        top = \"\\u23A7\";\n        middle = \"\\u23A8\";\n        bottom = \"\\u23A9\";\n        repeat = \"\\u23AA\";\n        font = \"Size4-Regular\";\n    } else if (delim === \"\\\\}\" || delim === \"\\\\rbrace\") {\n        top = \"\\u23AB\";\n        middle = \"\\u23AC\";\n        bottom = \"\\u23AD\";\n        repeat = \"\\u23AA\";\n        font = \"Size4-Regular\";\n    } else if (delim === \"\\\\lgroup\") {\n        top = \"\\u23A7\";\n        bottom = \"\\u23A9\";\n        repeat = \"\\u23AA\";\n        font = \"Size4-Regular\";\n    } else if (delim === \"\\\\rgroup\") {\n        top = \"\\u23AB\";\n        bottom = \"\\u23AD\";\n        repeat = \"\\u23AA\";\n        font = \"Size4-Regular\";\n    } else if (delim === \"\\\\lmoustache\") {\n        top = \"\\u23A7\";\n        bottom = \"\\u23AD\";\n        repeat = \"\\u23AA\";\n        font = \"Size4-Regular\";\n    } else if (delim === \"\\\\rmoustache\") {\n        top = \"\\u23AB\";\n        bottom = \"\\u23A9\";\n        repeat = \"\\u23AA\";\n        font = \"Size4-Regular\";\n    }\n\n    // Get the metrics of the four sections\n    var topMetrics = getMetrics(top, font);\n    var topHeightTotal = topMetrics.height + topMetrics.depth;\n    var repeatMetrics = getMetrics(repeat, font);\n    var repeatHeightTotal = repeatMetrics.height + repeatMetrics.depth;\n    var bottomMetrics = getMetrics(bottom, font);\n    var bottomHeightTotal = bottomMetrics.height + bottomMetrics.depth;\n    var middleHeightTotal = 0;\n    var middleFactor = 1;\n    if (middle !== null) {\n        var middleMetrics = getMetrics(middle, font);\n        middleHeightTotal = middleMetrics.height + middleMetrics.depth;\n        middleFactor = 2; // repeat symmetrically above and below middle\n    }\n\n    // Calcuate the minimal height that the delimiter can have.\n    // It is at least the size of the top, bottom, and optional middle combined.\n    var minHeight = topHeightTotal + bottomHeightTotal + middleHeightTotal;\n\n    // Compute the number of copies of the repeat symbol we will need\n    var repeatCount = Math.ceil((heightTotal - minHeight) / (middleFactor * repeatHeightTotal));\n\n    // Compute the total height of the delimiter including all the symbols\n    var realHeightTotal = minHeight + repeatCount * middleFactor * repeatHeightTotal;\n\n    // The center of the delimiter is placed at the center of the axis. Note\n    // that in this context, \"center\" means that the delimiter should be\n    // centered around the axis in the current style, while normally it is\n    // centered around the axis in textstyle.\n    var axisHeight = options.fontMetrics().axisHeight;\n    if (center) {\n        axisHeight *= options.sizeMultiplier;\n    }\n    // Calculate the depth\n    var depth = realHeightTotal / 2 - axisHeight;\n\n    // Now, we start building the pieces that will go into the vlist\n\n    // Keep a list of the inner pieces\n    var inners = [];\n\n    // Add the bottom symbol\n    inners.push(makeInner(bottom, font, mode));\n\n    if (middle === null) {\n        // Add that many symbols\n        for (var i = 0; i < repeatCount; i++) {\n            inners.push(makeInner(repeat, font, mode));\n        }\n    } else {\n        // When there is a middle bit, we need the middle part and two repeated\n        // sections\n        for (var _i = 0; _i < repeatCount; _i++) {\n            inners.push(makeInner(repeat, font, mode));\n        }\n        inners.push(makeInner(middle, font, mode));\n        for (var _i2 = 0; _i2 < repeatCount; _i2++) {\n            inners.push(makeInner(repeat, font, mode));\n        }\n    }\n\n    // Add the top symbol\n    inners.push(makeInner(top, font, mode));\n\n    // Finally, build the vlist\n    var newOptions = options.havingBaseStyle(_Style2.default.TEXT);\n    var inner = _buildCommon2.default.makeVList(inners, \"bottom\", depth, newOptions);\n\n    return styleWrap((0, _buildCommon.makeSpan)([\"delimsizing\", \"mult\"], [inner], newOptions), _Style2.default.TEXT, options, classes);\n};\n\nvar sqrtInnerSVG = {\n    // The main path geometry is from glyph U221A in the font KaTeX Main\n    main: \"<svg viewBox='0 0 400000 1000' preserveAspectRatio='xMinYMin\\nslice'><path d='M95 622c-2.667 0-7.167-2.667-13.5\\n-8S72 604 72 600c0-2 .333-3.333 1-4 1.333-2.667 23.833-20.667 67.5-54s\\n65.833-50.333 66.5-51c1.333-1.333 3-2 5-2 4.667 0 8.667 3.333 12 10l173\\n378c.667 0 35.333-71 104-213s137.5-285 206.5-429S812 17.333 812 14c5.333\\n-9.333 12-14 20-14h399166v40H845.272L620 507 385 993c-2.667 4.667-9 7-19\\n7-6 0-10-1-12-3L160 575l-65 47zM834 0h399166v40H845z'/></svg>\",\n\n    // size1 is from glyph U221A in the font KaTeX_Size1-Regular\n    1: \"<svg viewBox='0 0 400000 1200' preserveAspectRatio='xMinYMin\\nslice'><path d='M263 601c.667 0 18 39.667 52 119s68.167\\n 158.667 102.5 238 51.833 119.333 52.5 120C810 373.333 980.667 17.667 982 11\\nc4.667-7.333 11-11 19-11h398999v40H1012.333L741 607c-38.667 80.667-84 175-136\\n 283s-89.167 185.333-111.5 232-33.833 70.333-34.5 71c-4.667 4.667-12.333 7-23\\n 7l-12-1-109-253c-72.667-168-109.333-252-110-252-10.667 8-22 16.667-34 26-22\\n 17.333-33.333 26-34 26l-26-26 76-59 76-60zM1001 0h398999v40H1012z'/></svg>\",\n\n    // size2 is from glyph U221A in the font KaTeX_Size2-Regular\n    2: \"<svg viewBox='0 0 400000 1800' preserveAspectRatio='xMinYMin\\nslice'><path d='M1001 0h398999v40H1013.084S929.667 308 749\\n 880s-277 876.333-289 913c-4.667 4.667-12.667 7-24 7h-12c-1.333-3.333-3.667\\n-11.667-7-25-35.333-125.333-106.667-373.333-214-744-10 12-21 25-33 39l-32 39\\nc-6-5.333-15-14-27-26l25-30c26.667-32.667 52-63 76-91l52-60 208 722c56-175.333\\n 126.333-397.333 211-666s153.833-488.167 207.5-658.5C944.167 129.167 975 32.667\\n 983 10c4-6.667 10-10 18-10zm0 0h398999v40H1013z'/></svg>\",\n\n    // size3 is from glyph U221A in the font KaTeX_Size3-Regular\n    3: \"<svg viewBox='0 0 400000 2400' preserveAspectRatio='xMinYMin\\nslice'><path d='M424 2398c-1.333-.667-38.5-172-111.5-514\\nS202.667 1370.667 202 1370c0-2-10.667 14.333-32 49-4.667 7.333-9.833 15.667\\n-15.5 25s-9.833 16-12.5 20l-5 7c-4-3.333-8.333-7.667-13-13l-13-13 76-122 77-121\\n 209 968c0-2 84.667-361.667 254-1079C896.333 373.667 981.667 13.333 983 10\\nc4-6.667 10-10 18-10h398999v40H1014.622S927.332 418.667 742 1206c-185.333\\n 787.333-279.333 1182.333-282 1185-2 6-10 9-24 9-8 0-12-.667-12-2z\\nM1001 0h398999v40H1014z'/></svg>\",\n\n    // size4 is from glyph U221A in the font KaTeX_Size4-Regular\n    4: \"<svg viewBox='0 0 400000 3000' preserveAspectRatio='xMinYMin\\nslice'><path d='M473 2713C812.333 913.667 982.333 13 983 11\\nc3.333-7.333 9.333-11 18-11h399110v40H1017.698S927.168 518 741.5 1506C555.833\\n 2494 462 2989 460 2991c-2 6-10 9-24 9-8 0-12-.667-12-2s-5.333-32-16-92c-50.667\\n-293.333-119.667-693.333-207-1200 0-1.333-5.333 8.667-16 30l-32 64-16 33-26-26\\n 76-153 77-151c.667.667 35.667 202 105 604 67.333 400.667 102 602.667 104 606z\\nM1001 0h398999v40H1017z'/></svg>\",\n\n    // tall is from glyph U23B7 in the font KaTeX_Size4-Regular\n    tall: \"l-4 4-4 4c-.667.667-2 1.5-4 2.5s-4.167 1.833-6.5 2.5-5.5 1-9.5 1h\\n-12l-28-84c-16.667-52-96.667 -294.333-240-727l-212 -643 -85 170c-4-3.333-8.333\\n-7.667-13 -13l-13-13l77-155 77-156c66 199.333 139 419.667 219 661 l218 661z\\nM702 0H400000v40H742z'/></svg>\"\n};\n\nvar sqrtSpan = function sqrtSpan(height, delim, options) {\n    // Create a span containing an SVG image of a sqrt symbol.\n    var span = _buildCommon2.default.makeSpan([], [], options);\n    var sizeMultiplier = options.sizeMultiplier; // default\n\n    if (delim.type === \"small\") {\n        // Get an SVG that is derived from glyph U+221A in font KaTeX-Main.\n        var newOptions = options.havingBaseStyle(delim.style);\n        sizeMultiplier = newOptions.sizeMultiplier / options.sizeMultiplier;\n\n        span.height = 1 * sizeMultiplier;\n        span.style.height = span.height + \"em\";\n        span.surdWidth = 0.833 * sizeMultiplier; // from the font.\n        //In the font, the glyph is 1000 units tall. The font scale is 1:1000.\n\n        span.innerHTML = \"<svg width='100%' height='\" + span.height + \"em'>\\n            \" + sqrtInnerSVG['main'] + \"</svg>\";\n    } else if (delim.type === \"large\") {\n        // These SVGs come from fonts: KaTeX_Size1, _Size2, etc.\n        // Get sqrt height from font data\n        span.height = sizeToMaxHeight[delim.size] / sizeMultiplier;\n        span.style.height = span.height + \"em\";\n        span.surdWidth = 1.0 / sizeMultiplier; // from the font\n\n        span.innerHTML = \"<svg width=\\\"100%\\\" height=\\\"\" + span.height + \"em\\\">\\n            \" + sqrtInnerSVG[delim.size] + \"</svg>\";\n    } else {\n        // Tall sqrt. In TeX, this would be stacked using multiple glyphs.\n        // We'll use a single SVG to accomplish the same thing.\n        span.height = height / sizeMultiplier;\n        span.style.height = span.height + \"em\";\n        span.surdWidth = 1.056 / sizeMultiplier;\n        var viewBoxHeight = Math.floor(span.height * 1000); // scale = 1:1000\n        var vertSegment = viewBoxHeight - 54;\n\n        // This \\sqrt is customized in both height and width. We set the\n        // height now. Then CSS will stretch the image to the correct width.\n        // This SVG path comes from glyph U+23B7, font KaTeX_Size4-Regular.\n        span.innerHTML = \"<svg width='100%' height='\" + span.height + \"em'>\\n            <svg viewBox='0 0 400000 \" + viewBoxHeight + \"'\\n            preserveAspectRatio='xMinYMax slice'>\\n            <path d='M702 0H400000v40H742v\" + vertSegment + \"\\n            \" + sqrtInnerSVG['tall'] + \"</svg>\";\n    }\n\n    span.sizeMultiplier = sizeMultiplier;\n\n    return span;\n};\n\n// There are three kinds of delimiters, delimiters that stack when they become\n// too large\nvar stackLargeDelimiters = [\"(\", \")\", \"[\", \"\\\\lbrack\", \"]\", \"\\\\rbrack\", \"\\\\{\", \"\\\\lbrace\", \"\\\\}\", \"\\\\rbrace\", \"\\\\lfloor\", \"\\\\rfloor\", \"\\\\lceil\", \"\\\\rceil\", \"\\\\surd\"];\n\n// delimiters that always stack\nvar stackAlwaysDelimiters = [\"\\\\uparrow\", \"\\\\downarrow\", \"\\\\updownarrow\", \"\\\\Uparrow\", \"\\\\Downarrow\", \"\\\\Updownarrow\", \"|\", \"\\\\|\", \"\\\\vert\", \"\\\\Vert\", \"\\\\lvert\", \"\\\\rvert\", \"\\\\lVert\", \"\\\\rVert\", \"\\\\lgroup\", \"\\\\rgroup\", \"\\\\lmoustache\", \"\\\\rmoustache\"];\n\n// and delimiters that never stack\nvar stackNeverDelimiters = [\"<\", \">\", \"\\\\langle\", \"\\\\rangle\", \"/\", \"\\\\backslash\", \"\\\\lt\", \"\\\\gt\"];\n\n// Metrics of the different sizes. Found by looking at TeX's output of\n// $\\bigl| // \\Bigl| \\biggl| \\Biggl| \\showlists$\n// Used to create stacked delimiters of appropriate sizes in makeSizedDelim.\nvar sizeToMaxHeight = [0, 1.2, 1.8, 2.4, 3.0];\n\n/**\n * Used to create a delimiter of a specific size, where `size` is 1, 2, 3, or 4.\n */\nvar makeSizedDelim = function makeSizedDelim(delim, size, options, mode, classes) {\n    // < and > turn into \\langle and \\rangle in delimiters\n    if (delim === \"<\" || delim === \"\\\\lt\") {\n        delim = \"\\\\langle\";\n    } else if (delim === \">\" || delim === \"\\\\gt\") {\n        delim = \"\\\\rangle\";\n    }\n\n    // Sized delimiters are never centered.\n    if (_utils2.default.contains(stackLargeDelimiters, delim) || _utils2.default.contains(stackNeverDelimiters, delim)) {\n        return makeLargeDelim(delim, size, false, options, mode, classes);\n    } else if (_utils2.default.contains(stackAlwaysDelimiters, delim)) {\n        return makeStackedDelim(delim, sizeToMaxHeight[size], false, options, mode, classes);\n    } else {\n        throw new _ParseError2.default(\"Illegal delimiter: '\" + delim + \"'\");\n    }\n};\n\n/**\n * There are three different sequences of delimiter sizes that the delimiters\n * follow depending on the kind of delimiter. This is used when creating custom\n * sized delimiters to decide whether to create a small, large, or stacked\n * delimiter.\n *\n * In real TeX, these sequences aren't explicitly defined, but are instead\n * defined inside the font metrics. Since there are only three sequences that\n * are possible for the delimiters that TeX defines, it is easier to just encode\n * them explicitly here.\n */\n\n// Delimiters that never stack try small delimiters and large delimiters only\nvar stackNeverDelimiterSequence = [{ type: \"small\", style: _Style2.default.SCRIPTSCRIPT }, { type: \"small\", style: _Style2.default.SCRIPT }, { type: \"small\", style: _Style2.default.TEXT }, { type: \"large\", size: 1 }, { type: \"large\", size: 2 }, { type: \"large\", size: 3 }, { type: \"large\", size: 4 }];\n\n// Delimiters that always stack try the small delimiters first, then stack\nvar stackAlwaysDelimiterSequence = [{ type: \"small\", style: _Style2.default.SCRIPTSCRIPT }, { type: \"small\", style: _Style2.default.SCRIPT }, { type: \"small\", style: _Style2.default.TEXT }, { type: \"stack\" }];\n\n// Delimiters that stack when large try the small and then large delimiters, and\n// stack afterwards\nvar stackLargeDelimiterSequence = [{ type: \"small\", style: _Style2.default.SCRIPTSCRIPT }, { type: \"small\", style: _Style2.default.SCRIPT }, { type: \"small\", style: _Style2.default.TEXT }, { type: \"large\", size: 1 }, { type: \"large\", size: 2 }, { type: \"large\", size: 3 }, { type: \"large\", size: 4 }, { type: \"stack\" }];\n\n/**\n * Get the font used in a delimiter based on what kind of delimiter it is.\n */\nvar delimTypeToFont = function delimTypeToFont(type) {\n    if (type.type === \"small\") {\n        return \"Main-Regular\";\n    } else if (type.type === \"large\") {\n        return \"Size\" + type.size + \"-Regular\";\n    } else if (type.type === \"stack\") {\n        return \"Size4-Regular\";\n    }\n};\n\n/**\n * Traverse a sequence of types of delimiters to decide what kind of delimiter\n * should be used to create a delimiter of the given height+depth.\n */\nvar traverseSequence = function traverseSequence(delim, height, sequence, options) {\n    // Here, we choose the index we should start at in the sequences. In smaller\n    // sizes (which correspond to larger numbers in style.size) we start earlier\n    // in the sequence. Thus, scriptscript starts at index 3-3=0, script starts\n    // at index 3-2=1, text starts at 3-1=2, and display starts at min(2,3-0)=2\n    var start = Math.min(2, 3 - options.style.size);\n    for (var i = start; i < sequence.length; i++) {\n        if (sequence[i].type === \"stack\") {\n            // This is always the last delimiter, so we just break the loop now.\n            break;\n        }\n\n        var metrics = getMetrics(delim, delimTypeToFont(sequence[i]));\n        var heightDepth = metrics.height + metrics.depth;\n\n        // Small delimiters are scaled down versions of the same font, so we\n        // account for the style change size.\n\n        if (sequence[i].type === \"small\") {\n            var newOptions = options.havingBaseStyle(sequence[i].style);\n            heightDepth *= newOptions.sizeMultiplier;\n        }\n\n        // Check if the delimiter at this size works for the given height.\n        if (heightDepth > height) {\n            return sequence[i];\n        }\n    }\n\n    // If we reached the end of the sequence, return the last sequence element.\n    return sequence[sequence.length - 1];\n};\n\n/**\n * Make a delimiter of a given height+depth, with optional centering. Here, we\n * traverse the sequences, and create a delimiter that the sequence tells us to.\n */\nvar makeCustomSizedDelim = function makeCustomSizedDelim(delim, height, center, options, mode, classes) {\n    if (delim === \"<\" || delim === \"\\\\lt\") {\n        delim = \"\\\\langle\";\n    } else if (delim === \">\" || delim === \"\\\\gt\") {\n        delim = \"\\\\rangle\";\n    }\n\n    // Decide what sequence to use\n    var sequence = void 0;\n    if (_utils2.default.contains(stackNeverDelimiters, delim)) {\n        sequence = stackNeverDelimiterSequence;\n    } else if (_utils2.default.contains(stackLargeDelimiters, delim)) {\n        sequence = stackLargeDelimiterSequence;\n    } else {\n        sequence = stackAlwaysDelimiterSequence;\n    }\n\n    // Look through the sequence\n    var delimType = traverseSequence(delim, height, sequence, options);\n\n    if (delim === \"\\\\surd\") {\n        // Get an SVG image for\n        return sqrtSpan(height, delimType, options);\n    } else {\n        // Get the delimiter from font glyphs.\n        // Depending on the sequence element we decided on, call the\n        // appropriate function.\n        if (delimType.type === \"small\") {\n            return makeSmallDelim(delim, delimType.style, center, options, mode, classes);\n        } else if (delimType.type === \"large\") {\n            return makeLargeDelim(delim, delimType.size, center, options, mode, classes);\n        } else if (delimType.type === \"stack\") {\n            return makeStackedDelim(delim, height, center, options, mode, classes);\n        }\n    }\n};\n\n/**\n * Make a delimiter for use with `\\left` and `\\right`, given a height and depth\n * of an expression that the delimiters surround.\n */\nvar makeLeftRightDelim = function makeLeftRightDelim(delim, height, depth, options, mode, classes) {\n    // We always center \\left/\\right delimiters, so the axis is always shifted\n    var axisHeight = options.fontMetrics().axisHeight * options.sizeMultiplier;\n\n    // Taken from TeX source, tex.web, function make_left_right\n    var delimiterFactor = 901;\n    var delimiterExtend = 5.0 / options.fontMetrics().ptPerEm;\n\n    var maxDistFromAxis = Math.max(height - axisHeight, depth + axisHeight);\n\n    var totalHeight = Math.max(\n    // In real TeX, calculations are done using integral values which are\n    // 65536 per pt, or 655360 per em. So, the division here truncates in\n    // TeX but doesn't here, producing different results. If we wanted to\n    // exactly match TeX's calculation, we could do\n    //   Math.floor(655360 * maxDistFromAxis / 500) *\n    //    delimiterFactor / 655360\n    // (To see the difference, compare\n    //    x^{x^{\\left(\\rule{0.1em}{0.68em}\\right)}}\n    // in TeX and KaTeX)\n    maxDistFromAxis / 500 * delimiterFactor, 2 * maxDistFromAxis - delimiterExtend);\n\n    // Finally, we defer to `makeCustomSizedDelim` with our calculated total\n    // height\n    return makeCustomSizedDelim(delim, totalHeight, true, options, mode, classes);\n};\n\nmodule.exports = {\n    sizedDelim: makeSizedDelim,\n    customSizedDelim: makeCustomSizedDelim,\n    leftRightDelim: makeLeftRightDelim\n};\n\n},{\"./ParseError\":29,\"./Style\":33,\"./buildCommon\":34,\"./fontMetrics\":41,\"./symbols\":48,\"./utils\":51}],39:[function(require,module,exports){\n\"use strict\";\n\nvar _classCallCheck2 = require(\"babel-runtime/helpers/classCallCheck\");\n\nvar _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\nvar _createClass2 = require(\"babel-runtime/helpers/createClass\");\n\nvar _createClass3 = _interopRequireDefault(_createClass2);\n\nvar _unicodeRegexes = require(\"./unicodeRegexes\");\n\nvar _unicodeRegexes2 = _interopRequireDefault(_unicodeRegexes);\n\nvar _utils = require(\"./utils\");\n\nvar _utils2 = _interopRequireDefault(_utils);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/**\n * Create an HTML className based on a list of classes. In addition to joining\n * with spaces, we also remove null or empty classes.\n */\n/**\n * These objects store the data about the DOM nodes we create, as well as some\n * extra data. They can then be transformed into real DOM nodes with the\n * `toNode` function or HTML markup using `toMarkup`. They are useful for both\n * storing extra properties on the nodes, as well as providing a way to easily\n * work with the DOM.\n *\n * Similar functions for working with MathML nodes exist in mathMLTree.js.\n */\nvar createClass = function createClass(classes) {\n    classes = classes.slice();\n    for (var i = classes.length - 1; i >= 0; i--) {\n        if (!classes[i]) {\n            classes.splice(i, 1);\n        }\n    }\n\n    return classes.join(\" \");\n};\n\n/**\n * This node represents a span node, with a className, a list of children, and\n * an inline style. It also contains information about its height, depth, and\n * maxFontSize.\n */\n\nvar span = function () {\n    function span(classes, children, options) {\n        (0, _classCallCheck3.default)(this, span);\n\n        this.classes = classes || [];\n        this.children = children || [];\n        this.height = 0;\n        this.depth = 0;\n        this.maxFontSize = 0;\n        this.style = {};\n        this.attributes = {};\n        this.innerHTML; // used for inline SVG code.\n        if (options) {\n            if (options.style.isTight()) {\n                this.classes.push(\"mtight\");\n            }\n            if (options.getColor()) {\n                this.style.color = options.getColor();\n            }\n        }\n    }\n\n    /**\n     * Sets an arbitrary attribute on the span. Warning: use this wisely. Not all\n     * browsers support attributes the same, and having too many custom attributes\n     * is probably bad.\n     */\n\n\n    (0, _createClass3.default)(span, [{\n        key: \"setAttribute\",\n        value: function setAttribute(attribute, value) {\n            this.attributes[attribute] = value;\n        }\n    }, {\n        key: \"tryCombine\",\n        value: function tryCombine(sibling) {\n            return false;\n        }\n\n        /**\n         * Convert the span into an HTML node\n         */\n\n    }, {\n        key: \"toNode\",\n        value: function toNode() {\n            var span = document.createElement(\"span\");\n\n            // Apply the class\n            span.className = createClass(this.classes);\n\n            // Apply inline styles\n            for (var style in this.style) {\n                if (Object.prototype.hasOwnProperty.call(this.style, style)) {\n                    span.style[style] = this.style[style];\n                }\n            }\n\n            // Apply attributes\n            for (var attr in this.attributes) {\n                if (Object.prototype.hasOwnProperty.call(this.attributes, attr)) {\n                    span.setAttribute(attr, this.attributes[attr]);\n                }\n            }\n\n            if (this.innerHTML) {\n                span.innerHTML = this.innerHTML;\n            }\n\n            // Append the children, also as HTML nodes\n            for (var i = 0; i < this.children.length; i++) {\n                span.appendChild(this.children[i].toNode());\n            }\n\n            return span;\n        }\n\n        /**\n         * Convert the span into an HTML markup string\n         */\n\n    }, {\n        key: \"toMarkup\",\n        value: function toMarkup() {\n            var markup = \"<span\";\n\n            // Add the class\n            if (this.classes.length) {\n                markup += \" class=\\\"\";\n                markup += _utils2.default.escape(createClass(this.classes));\n                markup += \"\\\"\";\n            }\n\n            var styles = \"\";\n\n            // Add the styles, after hyphenation\n            for (var style in this.style) {\n                if (this.style.hasOwnProperty(style)) {\n                    styles += _utils2.default.hyphenate(style) + \":\" + this.style[style] + \";\";\n                }\n            }\n\n            if (styles) {\n                markup += \" style=\\\"\" + _utils2.default.escape(styles) + \"\\\"\";\n            }\n\n            // Add the attributes\n            for (var attr in this.attributes) {\n                if (Object.prototype.hasOwnProperty.call(this.attributes, attr)) {\n                    markup += \" \" + attr + \"=\\\"\";\n                    markup += _utils2.default.escape(this.attributes[attr]);\n                    markup += \"\\\"\";\n                }\n            }\n\n            markup += \">\";\n\n            if (this.innerHTML) {\n                markup += this.innerHTML;\n            }\n\n            // Add the markup of the children, also as markup\n            for (var i = 0; i < this.children.length; i++) {\n                markup += this.children[i].toMarkup();\n            }\n\n            markup += \"</span>\";\n\n            return markup;\n        }\n    }]);\n    return span;\n}();\n\n/**\n * This node represents a document fragment, which contains elements, but when\n * placed into the DOM doesn't have any representation itself. Thus, it only\n * contains children and doesn't have any HTML properties. It also keeps track\n * of a height, depth, and maxFontSize.\n */\n\n\nvar documentFragment = function () {\n    function documentFragment(children) {\n        (0, _classCallCheck3.default)(this, documentFragment);\n\n        this.children = children || [];\n        this.height = 0;\n        this.depth = 0;\n        this.maxFontSize = 0;\n    }\n\n    /**\n     * Convert the fragment into a node\n     */\n\n\n    (0, _createClass3.default)(documentFragment, [{\n        key: \"toNode\",\n        value: function toNode() {\n            // Create a fragment\n            var frag = document.createDocumentFragment();\n\n            // Append the children\n            for (var i = 0; i < this.children.length; i++) {\n                frag.appendChild(this.children[i].toNode());\n            }\n\n            return frag;\n        }\n\n        /**\n         * Convert the fragment into HTML markup\n         */\n\n    }, {\n        key: \"toMarkup\",\n        value: function toMarkup() {\n            var markup = \"\";\n\n            // Simply concatenate the markup for the children together\n            for (var i = 0; i < this.children.length; i++) {\n                markup += this.children[i].toMarkup();\n            }\n\n            return markup;\n        }\n    }]);\n    return documentFragment;\n}();\n\nvar iCombinations = {\n    'î': \"\\u0131\\u0302\",\n    'ï': \"\\u0131\\u0308\",\n    'í': \"\\u0131\\u0301\",\n    // 'ī': '\\u0131\\u0304', // enable when we add Extended Latin\n    'ì': \"\\u0131\\u0300\"\n};\n\n/**\n * A symbol node contains information about a single symbol. It either renders\n * to a single text node, or a span with a single text node in it, depending on\n * whether it has CSS classes, styles, or needs italic correction.\n */\n\nvar symbolNode = function () {\n    function symbolNode(value, height, depth, italic, skew, classes, style) {\n        (0, _classCallCheck3.default)(this, symbolNode);\n\n        this.value = value || \"\";\n        this.height = height || 0;\n        this.depth = depth || 0;\n        this.italic = italic || 0;\n        this.skew = skew || 0;\n        this.classes = classes || [];\n        this.style = style || {};\n        this.maxFontSize = 0;\n\n        // Mark CJK characters with specific classes so that we can specify which\n        // fonts to use.  This allows us to render these characters with a serif\n        // font in situations where the browser would either default to a sans serif\n        // or render a placeholder character.\n        if (_unicodeRegexes2.default.cjkRegex.test(value)) {\n            // I couldn't find any fonts that contained Hangul as well as all of\n            // the other characters we wanted to test there for it gets its own\n            // CSS class.\n            if (_unicodeRegexes2.default.hangulRegex.test(value)) {\n                this.classes.push('hangul_fallback');\n            } else {\n                this.classes.push('cjk_fallback');\n            }\n        }\n\n        if (/[îïíì]/.test(this.value)) {\n            // add ī when we add Extended Latin\n            this.value = iCombinations[this.value];\n        }\n    }\n\n    (0, _createClass3.default)(symbolNode, [{\n        key: \"tryCombine\",\n        value: function tryCombine(sibling) {\n            if (!sibling || !(sibling instanceof symbolNode) || this.italic > 0 || createClass(this.classes) !== createClass(sibling.classes) || this.skew !== sibling.skew || this.maxFontSize !== sibling.maxFontSize) {\n                return false;\n            }\n            for (var style in this.style) {\n                if (this.style.hasOwnProperty(style) && this.style[style] !== sibling.style[style]) {\n                    return false;\n                }\n            }\n            for (var _style in sibling.style) {\n                if (sibling.style.hasOwnProperty(_style) && this.style[_style] !== sibling.style[_style]) {\n                    return false;\n                }\n            }\n            this.value += sibling.value;\n            this.height = Math.max(this.height, sibling.height);\n            this.depth = Math.max(this.depth, sibling.depth);\n            this.italic = sibling.italic;\n            return true;\n        }\n\n        /**\n         * Creates a text node or span from a symbol node. Note that a span is only\n         * created if it is needed.\n         */\n\n    }, {\n        key: \"toNode\",\n        value: function toNode() {\n            var node = document.createTextNode(this.value);\n            var span = null;\n\n            if (this.italic > 0) {\n                span = document.createElement(\"span\");\n                span.style.marginRight = this.italic + \"em\";\n            }\n\n            if (this.classes.length > 0) {\n                span = span || document.createElement(\"span\");\n                span.className = createClass(this.classes);\n            }\n\n            for (var style in this.style) {\n                if (this.style.hasOwnProperty(style)) {\n                    span = span || document.createElement(\"span\");\n                    span.style[style] = this.style[style];\n                }\n            }\n\n            if (span) {\n                span.appendChild(node);\n                return span;\n            } else {\n                return node;\n            }\n        }\n\n        /**\n         * Creates markup for a symbol node.\n         */\n\n    }, {\n        key: \"toMarkup\",\n        value: function toMarkup() {\n            // TODO(alpert): More duplication than I'd like from\n            // span.prototype.toMarkup and symbolNode.prototype.toNode...\n            var needsSpan = false;\n\n            var markup = \"<span\";\n\n            if (this.classes.length) {\n                needsSpan = true;\n                markup += \" class=\\\"\";\n                markup += _utils2.default.escape(createClass(this.classes));\n                markup += \"\\\"\";\n            }\n\n            var styles = \"\";\n\n            if (this.italic > 0) {\n                styles += \"margin-right:\" + this.italic + \"em;\";\n            }\n            for (var style in this.style) {\n                if (this.style.hasOwnProperty(style)) {\n                    styles += _utils2.default.hyphenate(style) + \":\" + this.style[style] + \";\";\n                }\n            }\n\n            if (styles) {\n                needsSpan = true;\n                markup += \" style=\\\"\" + _utils2.default.escape(styles) + \"\\\"\";\n            }\n\n            var escaped = _utils2.default.escape(this.value);\n            if (needsSpan) {\n                markup += \">\";\n                markup += escaped;\n                markup += \"</span>\";\n                return markup;\n            } else {\n                return escaped;\n            }\n        }\n    }]);\n    return symbolNode;\n}();\n\nmodule.exports = {\n    span: span,\n    documentFragment: documentFragment,\n    symbolNode: symbolNode\n};\n\n},{\"./unicodeRegexes\":49,\"./utils\":51,\"babel-runtime/helpers/classCallCheck\":4,\"babel-runtime/helpers/createClass\":5}],40:[function(require,module,exports){\n\"use strict\";\n\nvar _ParseNode = require(\"./ParseNode\");\n\nvar _ParseNode2 = _interopRequireDefault(_ParseNode);\n\nvar _ParseError = require(\"./ParseError\");\n\nvar _ParseError2 = _interopRequireDefault(_ParseError);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/**\n * Parse the body of the environment, with rows delimited by \\\\ and\n * columns delimited by &, and create a nested list in row-major order\n * with one group per cell.  If given an optional argument style\n * (\"text\", \"display\", etc.), then each cell is cast into that style.\n */\n/* eslint no-constant-condition:0 */\nfunction parseArray(parser, result, style) {\n    var row = [];\n    var body = [row];\n    var rowGaps = [];\n    while (true) {\n        var cell = parser.parseExpression(false, null);\n        cell = new _ParseNode2.default(\"ordgroup\", cell, parser.mode);\n        if (style) {\n            cell = new _ParseNode2.default(\"styling\", {\n                style: style,\n                value: [cell]\n            }, parser.mode);\n        }\n        row.push(cell);\n        var next = parser.nextToken.text;\n        if (next === \"&\") {\n            parser.consume();\n        } else if (next === \"\\\\end\") {\n            break;\n        } else if (next === \"\\\\\\\\\" || next === \"\\\\cr\") {\n            var cr = parser.parseFunction();\n            rowGaps.push(cr.value.size);\n            row = [];\n            body.push(row);\n        } else {\n            throw new _ParseError2.default(\"Expected & or \\\\\\\\ or \\\\end\", parser.nextToken);\n        }\n    }\n    result.body = body;\n    result.rowGaps = rowGaps;\n    return new _ParseNode2.default(result.type, result, parser.mode);\n}\n\n/*\n * An environment definition is very similar to a function definition:\n * it is declared with a name or a list of names, a set of properties\n * and a handler containing the actual implementation.\n *\n * The properties include:\n *  - numArgs: The number of arguments after the \\begin{name} function.\n *  - argTypes: (optional) Just like for a function\n *  - allowedInText: (optional) Whether or not the environment is allowed inside\n *                   text mode (default false) (not enforced yet)\n *  - numOptionalArgs: (optional) Just like for a function\n * A bare number instead of that object indicates the numArgs value.\n *\n * The handler function will receive two arguments\n *  - context: information and references provided by the parser\n *  - args: an array of arguments passed to \\begin{name}\n * The context contains the following properties:\n *  - envName: the name of the environment, one of the listed names.\n *  - parser: the parser object\n *  - lexer: the lexer object\n *  - positions: the positions associated with these arguments from args.\n * The handler must return a ParseResult.\n */\nfunction defineEnvironment(names, props, handler) {\n    if (typeof names === \"string\") {\n        names = [names];\n    }\n    if (typeof props === \"number\") {\n        props = { numArgs: props };\n    }\n    // Set default values of environments\n    var data = {\n        numArgs: props.numArgs || 0,\n        argTypes: props.argTypes,\n        greediness: 1,\n        allowedInText: !!props.allowedInText,\n        numOptionalArgs: props.numOptionalArgs || 0,\n        handler: handler\n    };\n    for (var i = 0; i < names.length; ++i) {\n        module.exports[names[i]] = data;\n    }\n}\n\n// Decides on a style for cells in an array according to whether the given\n// environment name starts with the letter 'd'.\nfunction dCellStyle(envName) {\n    if (envName.substr(0, 1) === \"d\") {\n        return \"display\";\n    } else {\n        return \"text\";\n    }\n}\n\n// Arrays are part of LaTeX, defined in lttab.dtx so its documentation\n// is part of the source2e.pdf file of LaTeX2e source documentation.\n// {darray} is an {array} environment where cells are set in \\displaystyle,\n// as defined in nccmath.sty.\ndefineEnvironment([\"array\", \"darray\"], {\n    numArgs: 1\n}, function (context, args) {\n    var colalign = args[0];\n    colalign = colalign.value.map ? colalign.value : [colalign];\n    var cols = colalign.map(function (node) {\n        var ca = node.value;\n        if (\"lcr\".indexOf(ca) !== -1) {\n            return {\n                type: \"align\",\n                align: ca\n            };\n        } else if (ca === \"|\") {\n            return {\n                type: \"separator\",\n                separator: \"|\"\n            };\n        }\n        throw new _ParseError2.default(\"Unknown column alignment: \" + node.value, node);\n    });\n    var res = {\n        type: \"array\",\n        cols: cols,\n        hskipBeforeAndAfter: true };\n    res = parseArray(context.parser, res, dCellStyle(context.envName));\n    return res;\n});\n\n// The matrix environments of amsmath builds on the array environment\n// of LaTeX, which is discussed above.\ndefineEnvironment([\"matrix\", \"pmatrix\", \"bmatrix\", \"Bmatrix\", \"vmatrix\", \"Vmatrix\"], {}, function (context) {\n    var delimiters = {\n        \"matrix\": null,\n        \"pmatrix\": [\"(\", \")\"],\n        \"bmatrix\": [\"[\", \"]\"],\n        \"Bmatrix\": [\"\\\\{\", \"\\\\}\"],\n        \"vmatrix\": [\"|\", \"|\"],\n        \"Vmatrix\": [\"\\\\Vert\", \"\\\\Vert\"]\n    }[context.envName];\n    var res = {\n        type: \"array\",\n        hskipBeforeAndAfter: false };\n    res = parseArray(context.parser, res, dCellStyle(context.envName));\n    if (delimiters) {\n        res = new _ParseNode2.default(\"leftright\", {\n            body: [res],\n            left: delimiters[0],\n            right: delimiters[1]\n        }, context.mode);\n    }\n    return res;\n});\n\n// A cases environment (in amsmath.sty) is almost equivalent to\n// \\def\\arraystretch{1.2}%\n// \\left\\{\\begin{array}{@{}l@{\\quad}l@{}} … \\end{array}\\right.\n// {dcases} is a {cases} environment where cells are set in \\displaystyle,\n// as defined in mathtools.sty.\ndefineEnvironment([\"cases\", \"dcases\"], {}, function (context) {\n    var res = {\n        type: \"array\",\n        arraystretch: 1.2,\n        cols: [{\n            type: \"align\",\n            align: \"l\",\n            pregap: 0,\n            // TODO(kevinb) get the current style.\n            // For now we use the metrics for TEXT style which is what we were\n            // doing before.  Before attempting to get the current style we\n            // should look at TeX's behavior especially for \\over and matrices.\n            postgap: 1.0 }, {\n            type: \"align\",\n            align: \"l\",\n            pregap: 0,\n            postgap: 0\n        }]\n    };\n    res = parseArray(context.parser, res, dCellStyle(context.envName));\n    res = new _ParseNode2.default(\"leftright\", {\n        body: [res],\n        left: \"\\\\{\",\n        right: \".\"\n    }, context.mode);\n    return res;\n});\n\n// An aligned environment is like the align* environment\n// except it operates within math mode.\n// Note that we assume \\nomallineskiplimit to be zero,\n// so that \\strut@ is the same as \\strut.\ndefineEnvironment(\"aligned\", {}, function (context) {\n    var res = {\n        type: \"array\",\n        cols: [],\n        addJot: true\n    };\n    res = parseArray(context.parser, res, \"display\");\n    // Count number of columns = maximum number of cells in each row.\n    // At the same time, prepend empty group {} at beginning of every second\n    // cell in each row (starting with second cell) so that operators become\n    // binary.  This behavior is implemented in amsmath's \\start@aligned.\n    var emptyGroup = new _ParseNode2.default(\"ordgroup\", [], context.mode);\n    var numCols = 0;\n    res.value.body.forEach(function (row) {\n        for (var i = 1; i < row.length; i += 2) {\n            // Modify ordgroup node within styling node\n            var ordgroup = row[i].value.value[0];\n            ordgroup.value.unshift(emptyGroup);\n        }\n        if (numCols < row.length) {\n            numCols = row.length;\n        }\n    });\n    for (var i = 0; i < numCols; ++i) {\n        var align = \"r\";\n        var pregap = 0;\n        if (i % 2 === 1) {\n            align = \"l\";\n        } else if (i > 0) {\n            pregap = 2; // one \\qquad between columns\n        }\n        res.value.cols[i] = {\n            type: \"align\",\n            align: align,\n            pregap: pregap,\n            postgap: 0\n        };\n    }\n    return res;\n});\n\n// A gathered environment is like an array environment with one centered\n// column, but where rows are considered lines so get \\jot line spacing\n// and contents are set in \\displaystyle.\ndefineEnvironment(\"gathered\", {}, function (context) {\n    var res = {\n        type: \"array\",\n        cols: [{\n            type: \"align\",\n            align: \"c\"\n        }],\n        addJot: true\n    };\n    res = parseArray(context.parser, res, \"display\");\n    return res;\n});\n\n},{\"./ParseError\":29,\"./ParseNode\":30}],41:[function(require,module,exports){\n\"use strict\";\n\nvar _unicodeRegexes = require(\"./unicodeRegexes\");\n\nvar _fontMetricsData = require(\"./fontMetricsData\");\n\nvar _fontMetricsData2 = _interopRequireDefault(_fontMetricsData);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/**\n * This file contains metrics regarding fonts and individual symbols. The sigma\n * and xi variables, as well as the metricMap map contain data extracted from\n * TeX, TeX font metrics, and the TTF files. These data are then exposed via the\n * `metrics` variable and the getCharacterMetrics function.\n */\n\n// In TeX, there are actually three sets of dimensions, one for each of\n// textstyle (size index 5 and higher: >=9pt), scriptstyle (size index 3 and 4:\n// 7-8pt), and scriptscriptstyle (size index 1 and 2: 5-6pt).  These are\n// provided in the the arrays below, in that order.\n//\n// The font metrics are stored in fonts cmsy10, cmsy7, and cmsy5 respsectively.\n// This was determined by running the following script:\n//\n//     latex -interaction=nonstopmode \\\n//     '\\documentclass{article}\\usepackage{amsmath}\\begin{document}' \\\n//     '$a$ \\expandafter\\show\\the\\textfont2' \\\n//     '\\expandafter\\show\\the\\scriptfont2' \\\n//     '\\expandafter\\show\\the\\scriptscriptfont2' \\\n//     '\\stop'\n//\n// The metrics themselves were retreived using the following commands:\n//\n//     tftopl cmsy10\n//     tftopl cmsy7\n//     tftopl cmsy5\n//\n// The output of each of these commands is quite lengthy.  The only part we\n// care about is the FONTDIMEN section. Each value is measured in EMs.\nvar sigmasAndXis = {\n    slant: [0.250, 0.250, 0.250], // sigma1\n    space: [0.000, 0.000, 0.000], // sigma2\n    stretch: [0.000, 0.000, 0.000], // sigma3\n    shrink: [0.000, 0.000, 0.000], // sigma4\n    xHeight: [0.431, 0.431, 0.431], // sigma5\n    quad: [1.000, 1.171, 1.472], // sigma6\n    extraSpace: [0.000, 0.000, 0.000], // sigma7\n    num1: [0.677, 0.732, 0.925], // sigma8\n    num2: [0.394, 0.384, 0.387], // sigma9\n    num3: [0.444, 0.471, 0.504], // sigma10\n    denom1: [0.686, 0.752, 1.025], // sigma11\n    denom2: [0.345, 0.344, 0.532], // sigma12\n    sup1: [0.413, 0.503, 0.504], // sigma13\n    sup2: [0.363, 0.431, 0.404], // sigma14\n    sup3: [0.289, 0.286, 0.294], // sigma15\n    sub1: [0.150, 0.143, 0.200], // sigma16\n    sub2: [0.247, 0.286, 0.400], // sigma17\n    supDrop: [0.386, 0.353, 0.494], // sigma18\n    subDrop: [0.050, 0.071, 0.100], // sigma19\n    delim1: [2.390, 1.700, 1.980], // sigma20\n    delim2: [1.010, 1.157, 1.420], // sigma21\n    axisHeight: [0.250, 0.250, 0.250], // sigma22\n\n    // These font metrics are extracted from TeX by using tftopl on cmex10.tfm;\n    // they correspond to the font parameters of the extension fonts (family 3).\n    // See the TeXbook, page 441. In AMSTeX, the extension fonts scale; to\n    // match cmex7, we'd use cmex7.tfm values for script and scriptscript\n    // values.\n    defaultRuleThickness: [0.04, 0.049, 0.049], // xi8; cmex7: 0.049\n    bigOpSpacing1: [0.111, 0.111, 0.111], // xi9\n    bigOpSpacing2: [0.166, 0.166, 0.166], // xi10\n    bigOpSpacing3: [0.2, 0.2, 0.2], // xi11\n    bigOpSpacing4: [0.6, 0.611, 0.611], // xi12; cmex7: 0.611\n    bigOpSpacing5: [0.1, 0.143, 0.143], // xi13; cmex7: 0.143\n\n    // The \\sqrt rule width is taken from the height of the surd character.\n    // Since we use the same font at all sizes, this thickness doesn't scale.\n    sqrtRuleThickness: [0.04, 0.04, 0.04],\n\n    // This value determines how large a pt is, for metrics which are defined\n    // in terms of pts.\n    // This value is also used in katex.less; if you change it make sure the\n    // values match.\n    ptPerEm: [10.0, 10.0, 10.0],\n\n    // The space between adjacent `|` columns in an array definition. From\n    // `\\showthe\\doublerulesep` in LaTeX. Equals 2.0 / ptPerEm.\n    doubleRuleSep: [0.2, 0.2, 0.2]\n};\n\n// This map contains a mapping from font name and character code to character\n// metrics, including height, depth, italic correction, and skew (kern from the\n// character to the corresponding \\skewchar)\n// This map is generated via `make metrics`. It should not be changed manually.\n\n\n// These are very rough approximations.  We default to Times New Roman which\n// should have Latin-1 and Cyrillic characters, but may not depending on the\n// operating system.  The metrics do not account for extra height from the\n// accents.  In the case of Cyrillic characters which have both ascenders and\n// descenders we prefer approximations with ascenders, primarily to prevent\n// the fraction bar or root line from intersecting the glyph.\n// TODO(kevinb) allow union of multiple glyph metrics for better accuracy.\nvar extraCharacterMap = {\n    // Latin-1\n    'À': 'A',\n    'Á': 'A',\n    'Â': 'A',\n    'Ã': 'A',\n    'Ä': 'A',\n    'Å': 'A',\n    'Æ': 'A',\n    'Ç': 'C',\n    'È': 'E',\n    'É': 'E',\n    'Ê': 'E',\n    'Ë': 'E',\n    'Ì': 'I',\n    'Í': 'I',\n    'Î': 'I',\n    'Ï': 'I',\n    'Ð': 'D',\n    'Ñ': 'N',\n    'Ò': 'O',\n    'Ó': 'O',\n    'Ô': 'O',\n    'Õ': 'O',\n    'Ö': 'O',\n    'Ø': 'O',\n    'Ù': 'U',\n    'Ú': 'U',\n    'Û': 'U',\n    'Ü': 'U',\n    'Ý': 'Y',\n    'Þ': 'o',\n    'ß': 'B',\n    'à': 'a',\n    'á': 'a',\n    'â': 'a',\n    'ã': 'a',\n    'ä': 'a',\n    'å': 'a',\n    'æ': 'a',\n    'ç': 'c',\n    'è': 'e',\n    'é': 'e',\n    'ê': 'e',\n    'ë': 'e',\n    'ì': 'i',\n    'í': 'i',\n    'î': 'i',\n    'ï': 'i',\n    'ð': 'd',\n    'ñ': 'n',\n    'ò': 'o',\n    'ó': 'o',\n    'ô': 'o',\n    'õ': 'o',\n    'ö': 'o',\n    'ø': 'o',\n    'ù': 'u',\n    'ú': 'u',\n    'û': 'u',\n    'ü': 'u',\n    'ý': 'y',\n    'þ': 'o',\n    'ÿ': 'y',\n\n    // Cyrillic\n    'А': 'A',\n    'Б': 'B',\n    'В': 'B',\n    'Г': 'F',\n    'Д': 'A',\n    'Е': 'E',\n    'Ж': 'K',\n    'З': '3',\n    'И': 'N',\n    'Й': 'N',\n    'К': 'K',\n    'Л': 'N',\n    'М': 'M',\n    'Н': 'H',\n    'О': 'O',\n    'П': 'N',\n    'Р': 'P',\n    'С': 'C',\n    'Т': 'T',\n    'У': 'y',\n    'Ф': 'O',\n    'Х': 'X',\n    'Ц': 'U',\n    'Ч': 'h',\n    'Ш': 'W',\n    'Щ': 'W',\n    'Ъ': 'B',\n    'Ы': 'X',\n    'Ь': 'B',\n    'Э': '3',\n    'Ю': 'X',\n    'Я': 'R',\n    'а': 'a',\n    'б': 'b',\n    'в': 'a',\n    'г': 'r',\n    'д': 'y',\n    'е': 'e',\n    'ж': 'm',\n    'з': 'e',\n    'и': 'n',\n    'й': 'n',\n    'к': 'n',\n    'л': 'n',\n    'м': 'm',\n    'н': 'n',\n    'о': 'o',\n    'п': 'n',\n    'р': 'p',\n    'с': 'c',\n    'т': 'o',\n    'у': 'y',\n    'ф': 'b',\n    'х': 'x',\n    'ц': 'n',\n    'ч': 'n',\n    'ш': 'w',\n    'щ': 'w',\n    'ъ': 'a',\n    'ы': 'm',\n    'ь': 'a',\n    'э': 'e',\n    'ю': 'm',\n    'я': 'r'\n};\n\n/**\n * This function is a convenience function for looking up information in the\n * metricMap table. It takes a character as a string, and a style.\n *\n * Note: the `width` property may be undefined if fontMetricsData.js wasn't\n * built using `Make extended_metrics`.\n */\nvar getCharacterMetrics = function getCharacterMetrics(character, style) {\n    var ch = character.charCodeAt(0);\n    if (character[0] in extraCharacterMap) {\n        ch = extraCharacterMap[character[0]].charCodeAt(0);\n    } else if (_unicodeRegexes.cjkRegex.test(character[0])) {\n        ch = 'M'.charCodeAt(0);\n    }\n    var metrics = _fontMetricsData2.default[style][ch];\n    if (metrics) {\n        return {\n            depth: metrics[0],\n            height: metrics[1],\n            italic: metrics[2],\n            skew: metrics[3],\n            width: metrics[4]\n        };\n    }\n};\n\nvar fontMetricsBySizeIndex = {};\n\n/**\n * Get the font metrics for a given size.\n */\nvar getFontMetrics = function getFontMetrics(size) {\n    var sizeIndex = void 0;\n    if (size >= 5) {\n        sizeIndex = 0;\n    } else if (size >= 3) {\n        sizeIndex = 1;\n    } else {\n        sizeIndex = 2;\n    }\n    if (!fontMetricsBySizeIndex[sizeIndex]) {\n        var metrics = fontMetricsBySizeIndex[sizeIndex] = {};\n        for (var key in sigmasAndXis) {\n            if (sigmasAndXis.hasOwnProperty(key)) {\n                metrics[key] = sigmasAndXis[key][sizeIndex];\n            }\n        }\n        metrics.cssEmPerMu = metrics.quad / 18;\n    }\n    return fontMetricsBySizeIndex[sizeIndex];\n};\n\nmodule.exports = {\n    getFontMetrics: getFontMetrics,\n    getCharacterMetrics: getCharacterMetrics\n};\n\n},{\"./fontMetricsData\":42,\"./unicodeRegexes\":49}],42:[function(require,module,exports){\n\"use strict\";\n\nmodule.exports = {\n    \"AMS-Regular\": {\n        \"65\": [0, 0.68889, 0, 0],\n        \"66\": [0, 0.68889, 0, 0],\n        \"67\": [0, 0.68889, 0, 0],\n        \"68\": [0, 0.68889, 0, 0],\n        \"69\": [0, 0.68889, 0, 0],\n        \"70\": [0, 0.68889, 0, 0],\n        \"71\": [0, 0.68889, 0, 0],\n        \"72\": [0, 0.68889, 0, 0],\n        \"73\": [0, 0.68889, 0, 0],\n        \"74\": [0.16667, 0.68889, 0, 0],\n        \"75\": [0, 0.68889, 0, 0],\n        \"76\": [0, 0.68889, 0, 0],\n        \"77\": [0, 0.68889, 0, 0],\n        \"78\": [0, 0.68889, 0, 0],\n        \"79\": [0.16667, 0.68889, 0, 0],\n        \"80\": [0, 0.68889, 0, 0],\n        \"81\": [0.16667, 0.68889, 0, 0],\n        \"82\": [0, 0.68889, 0, 0],\n        \"83\": [0, 0.68889, 0, 0],\n        \"84\": [0, 0.68889, 0, 0],\n        \"85\": [0, 0.68889, 0, 0],\n        \"86\": [0, 0.68889, 0, 0],\n        \"87\": [0, 0.68889, 0, 0],\n        \"88\": [0, 0.68889, 0, 0],\n        \"89\": [0, 0.68889, 0, 0],\n        \"90\": [0, 0.68889, 0, 0],\n        \"107\": [0, 0.68889, 0, 0],\n        \"165\": [0, 0.675, 0.025, 0],\n        \"174\": [0.15559, 0.69224, 0, 0],\n        \"240\": [0, 0.68889, 0, 0],\n        \"295\": [0, 0.68889, 0, 0],\n        \"710\": [0, 0.825, 0, 0],\n        \"732\": [0, 0.9, 0, 0],\n        \"770\": [0, 0.825, 0, 0],\n        \"771\": [0, 0.9, 0, 0],\n        \"989\": [0.08167, 0.58167, 0, 0],\n        \"1008\": [0, 0.43056, 0.04028, 0],\n        \"8245\": [0, 0.54986, 0, 0],\n        \"8463\": [0, 0.68889, 0, 0],\n        \"8487\": [0, 0.68889, 0, 0],\n        \"8498\": [0, 0.68889, 0, 0],\n        \"8502\": [0, 0.68889, 0, 0],\n        \"8503\": [0, 0.68889, 0, 0],\n        \"8504\": [0, 0.68889, 0, 0],\n        \"8513\": [0, 0.68889, 0, 0],\n        \"8592\": [-0.03598, 0.46402, 0, 0],\n        \"8594\": [-0.03598, 0.46402, 0, 0],\n        \"8602\": [-0.13313, 0.36687, 0, 0],\n        \"8603\": [-0.13313, 0.36687, 0, 0],\n        \"8606\": [0.01354, 0.52239, 0, 0],\n        \"8608\": [0.01354, 0.52239, 0, 0],\n        \"8610\": [0.01354, 0.52239, 0, 0],\n        \"8611\": [0.01354, 0.52239, 0, 0],\n        \"8619\": [0, 0.54986, 0, 0],\n        \"8620\": [0, 0.54986, 0, 0],\n        \"8621\": [-0.13313, 0.37788, 0, 0],\n        \"8622\": [-0.13313, 0.36687, 0, 0],\n        \"8624\": [0, 0.69224, 0, 0],\n        \"8625\": [0, 0.69224, 0, 0],\n        \"8630\": [0, 0.43056, 0, 0],\n        \"8631\": [0, 0.43056, 0, 0],\n        \"8634\": [0.08198, 0.58198, 0, 0],\n        \"8635\": [0.08198, 0.58198, 0, 0],\n        \"8638\": [0.19444, 0.69224, 0, 0],\n        \"8639\": [0.19444, 0.69224, 0, 0],\n        \"8642\": [0.19444, 0.69224, 0, 0],\n        \"8643\": [0.19444, 0.69224, 0, 0],\n        \"8644\": [0.1808, 0.675, 0, 0],\n        \"8646\": [0.1808, 0.675, 0, 0],\n        \"8647\": [0.1808, 0.675, 0, 0],\n        \"8648\": [0.19444, 0.69224, 0, 0],\n        \"8649\": [0.1808, 0.675, 0, 0],\n        \"8650\": [0.19444, 0.69224, 0, 0],\n        \"8651\": [0.01354, 0.52239, 0, 0],\n        \"8652\": [0.01354, 0.52239, 0, 0],\n        \"8653\": [-0.13313, 0.36687, 0, 0],\n        \"8654\": [-0.13313, 0.36687, 0, 0],\n        \"8655\": [-0.13313, 0.36687, 0, 0],\n        \"8666\": [0.13667, 0.63667, 0, 0],\n        \"8667\": [0.13667, 0.63667, 0, 0],\n        \"8669\": [-0.13313, 0.37788, 0, 0],\n        \"8672\": [-0.064, 0.437, 0, 0],\n        \"8674\": [-0.064, 0.437, 0, 0],\n        \"8705\": [0, 0.825, 0, 0],\n        \"8708\": [0, 0.68889, 0, 0],\n        \"8709\": [0.08167, 0.58167, 0, 0],\n        \"8717\": [0, 0.43056, 0, 0],\n        \"8722\": [-0.03598, 0.46402, 0, 0],\n        \"8724\": [0.08198, 0.69224, 0, 0],\n        \"8726\": [0.08167, 0.58167, 0, 0],\n        \"8733\": [0, 0.69224, 0, 0],\n        \"8736\": [0, 0.69224, 0, 0],\n        \"8737\": [0, 0.69224, 0, 0],\n        \"8738\": [0.03517, 0.52239, 0, 0],\n        \"8739\": [0.08167, 0.58167, 0, 0],\n        \"8740\": [0.25142, 0.74111, 0, 0],\n        \"8741\": [0.08167, 0.58167, 0, 0],\n        \"8742\": [0.25142, 0.74111, 0, 0],\n        \"8756\": [0, 0.69224, 0, 0],\n        \"8757\": [0, 0.69224, 0, 0],\n        \"8764\": [-0.13313, 0.36687, 0, 0],\n        \"8765\": [-0.13313, 0.37788, 0, 0],\n        \"8769\": [-0.13313, 0.36687, 0, 0],\n        \"8770\": [-0.03625, 0.46375, 0, 0],\n        \"8774\": [0.30274, 0.79383, 0, 0],\n        \"8776\": [-0.01688, 0.48312, 0, 0],\n        \"8778\": [0.08167, 0.58167, 0, 0],\n        \"8782\": [0.06062, 0.54986, 0, 0],\n        \"8783\": [0.06062, 0.54986, 0, 0],\n        \"8785\": [0.08198, 0.58198, 0, 0],\n        \"8786\": [0.08198, 0.58198, 0, 0],\n        \"8787\": [0.08198, 0.58198, 0, 0],\n        \"8790\": [0, 0.69224, 0, 0],\n        \"8791\": [0.22958, 0.72958, 0, 0],\n        \"8796\": [0.08198, 0.91667, 0, 0],\n        \"8806\": [0.25583, 0.75583, 0, 0],\n        \"8807\": [0.25583, 0.75583, 0, 0],\n        \"8808\": [0.25142, 0.75726, 0, 0],\n        \"8809\": [0.25142, 0.75726, 0, 0],\n        \"8812\": [0.25583, 0.75583, 0, 0],\n        \"8814\": [0.20576, 0.70576, 0, 0],\n        \"8815\": [0.20576, 0.70576, 0, 0],\n        \"8816\": [0.30274, 0.79383, 0, 0],\n        \"8817\": [0.30274, 0.79383, 0, 0],\n        \"8818\": [0.22958, 0.72958, 0, 0],\n        \"8819\": [0.22958, 0.72958, 0, 0],\n        \"8822\": [0.1808, 0.675, 0, 0],\n        \"8823\": [0.1808, 0.675, 0, 0],\n        \"8828\": [0.13667, 0.63667, 0, 0],\n        \"8829\": [0.13667, 0.63667, 0, 0],\n        \"8830\": [0.22958, 0.72958, 0, 0],\n        \"8831\": [0.22958, 0.72958, 0, 0],\n        \"8832\": [0.20576, 0.70576, 0, 0],\n        \"8833\": [0.20576, 0.70576, 0, 0],\n        \"8840\": [0.30274, 0.79383, 0, 0],\n        \"8841\": [0.30274, 0.79383, 0, 0],\n        \"8842\": [0.13597, 0.63597, 0, 0],\n        \"8843\": [0.13597, 0.63597, 0, 0],\n        \"8847\": [0.03517, 0.54986, 0, 0],\n        \"8848\": [0.03517, 0.54986, 0, 0],\n        \"8858\": [0.08198, 0.58198, 0, 0],\n        \"8859\": [0.08198, 0.58198, 0, 0],\n        \"8861\": [0.08198, 0.58198, 0, 0],\n        \"8862\": [0, 0.675, 0, 0],\n        \"8863\": [0, 0.675, 0, 0],\n        \"8864\": [0, 0.675, 0, 0],\n        \"8865\": [0, 0.675, 0, 0],\n        \"8872\": [0, 0.69224, 0, 0],\n        \"8873\": [0, 0.69224, 0, 0],\n        \"8874\": [0, 0.69224, 0, 0],\n        \"8876\": [0, 0.68889, 0, 0],\n        \"8877\": [0, 0.68889, 0, 0],\n        \"8878\": [0, 0.68889, 0, 0],\n        \"8879\": [0, 0.68889, 0, 0],\n        \"8882\": [0.03517, 0.54986, 0, 0],\n        \"8883\": [0.03517, 0.54986, 0, 0],\n        \"8884\": [0.13667, 0.63667, 0, 0],\n        \"8885\": [0.13667, 0.63667, 0, 0],\n        \"8888\": [0, 0.54986, 0, 0],\n        \"8890\": [0.19444, 0.43056, 0, 0],\n        \"8891\": [0.19444, 0.69224, 0, 0],\n        \"8892\": [0.19444, 0.69224, 0, 0],\n        \"8901\": [0, 0.54986, 0, 0],\n        \"8903\": [0.08167, 0.58167, 0, 0],\n        \"8905\": [0.08167, 0.58167, 0, 0],\n        \"8906\": [0.08167, 0.58167, 0, 0],\n        \"8907\": [0, 0.69224, 0, 0],\n        \"8908\": [0, 0.69224, 0, 0],\n        \"8909\": [-0.03598, 0.46402, 0, 0],\n        \"8910\": [0, 0.54986, 0, 0],\n        \"8911\": [0, 0.54986, 0, 0],\n        \"8912\": [0.03517, 0.54986, 0, 0],\n        \"8913\": [0.03517, 0.54986, 0, 0],\n        \"8914\": [0, 0.54986, 0, 0],\n        \"8915\": [0, 0.54986, 0, 0],\n        \"8916\": [0, 0.69224, 0, 0],\n        \"8918\": [0.0391, 0.5391, 0, 0],\n        \"8919\": [0.0391, 0.5391, 0, 0],\n        \"8920\": [0.03517, 0.54986, 0, 0],\n        \"8921\": [0.03517, 0.54986, 0, 0],\n        \"8922\": [0.38569, 0.88569, 0, 0],\n        \"8923\": [0.38569, 0.88569, 0, 0],\n        \"8926\": [0.13667, 0.63667, 0, 0],\n        \"8927\": [0.13667, 0.63667, 0, 0],\n        \"8928\": [0.30274, 0.79383, 0, 0],\n        \"8929\": [0.30274, 0.79383, 0, 0],\n        \"8934\": [0.23222, 0.74111, 0, 0],\n        \"8935\": [0.23222, 0.74111, 0, 0],\n        \"8936\": [0.23222, 0.74111, 0, 0],\n        \"8937\": [0.23222, 0.74111, 0, 0],\n        \"8938\": [0.20576, 0.70576, 0, 0],\n        \"8939\": [0.20576, 0.70576, 0, 0],\n        \"8940\": [0.30274, 0.79383, 0, 0],\n        \"8941\": [0.30274, 0.79383, 0, 0],\n        \"8994\": [0.19444, 0.69224, 0, 0],\n        \"8995\": [0.19444, 0.69224, 0, 0],\n        \"9416\": [0.15559, 0.69224, 0, 0],\n        \"9484\": [0, 0.69224, 0, 0],\n        \"9488\": [0, 0.69224, 0, 0],\n        \"9492\": [0, 0.37788, 0, 0],\n        \"9496\": [0, 0.37788, 0, 0],\n        \"9585\": [0.19444, 0.68889, 0, 0],\n        \"9586\": [0.19444, 0.74111, 0, 0],\n        \"9632\": [0, 0.675, 0, 0],\n        \"9633\": [0, 0.675, 0, 0],\n        \"9650\": [0, 0.54986, 0, 0],\n        \"9651\": [0, 0.54986, 0, 0],\n        \"9654\": [0.03517, 0.54986, 0, 0],\n        \"9660\": [0, 0.54986, 0, 0],\n        \"9661\": [0, 0.54986, 0, 0],\n        \"9664\": [0.03517, 0.54986, 0, 0],\n        \"9674\": [0.11111, 0.69224, 0, 0],\n        \"9733\": [0.19444, 0.69224, 0, 0],\n        \"10003\": [0, 0.69224, 0, 0],\n        \"10016\": [0, 0.69224, 0, 0],\n        \"10731\": [0.11111, 0.69224, 0, 0],\n        \"10846\": [0.19444, 0.75583, 0, 0],\n        \"10877\": [0.13667, 0.63667, 0, 0],\n        \"10878\": [0.13667, 0.63667, 0, 0],\n        \"10885\": [0.25583, 0.75583, 0, 0],\n        \"10886\": [0.25583, 0.75583, 0, 0],\n        \"10887\": [0.13597, 0.63597, 0, 0],\n        \"10888\": [0.13597, 0.63597, 0, 0],\n        \"10889\": [0.26167, 0.75726, 0, 0],\n        \"10890\": [0.26167, 0.75726, 0, 0],\n        \"10891\": [0.48256, 0.98256, 0, 0],\n        \"10892\": [0.48256, 0.98256, 0, 0],\n        \"10901\": [0.13667, 0.63667, 0, 0],\n        \"10902\": [0.13667, 0.63667, 0, 0],\n        \"10933\": [0.25142, 0.75726, 0, 0],\n        \"10934\": [0.25142, 0.75726, 0, 0],\n        \"10935\": [0.26167, 0.75726, 0, 0],\n        \"10936\": [0.26167, 0.75726, 0, 0],\n        \"10937\": [0.26167, 0.75726, 0, 0],\n        \"10938\": [0.26167, 0.75726, 0, 0],\n        \"10949\": [0.25583, 0.75583, 0, 0],\n        \"10950\": [0.25583, 0.75583, 0, 0],\n        \"10955\": [0.28481, 0.79383, 0, 0],\n        \"10956\": [0.28481, 0.79383, 0, 0],\n        \"57350\": [0.08167, 0.58167, 0, 0],\n        \"57351\": [0.08167, 0.58167, 0, 0],\n        \"57352\": [0.08167, 0.58167, 0, 0],\n        \"57353\": [0, 0.43056, 0.04028, 0],\n        \"57356\": [0.25142, 0.75726, 0, 0],\n        \"57357\": [0.25142, 0.75726, 0, 0],\n        \"57358\": [0.41951, 0.91951, 0, 0],\n        \"57359\": [0.30274, 0.79383, 0, 0],\n        \"57360\": [0.30274, 0.79383, 0, 0],\n        \"57361\": [0.41951, 0.91951, 0, 0],\n        \"57366\": [0.25142, 0.75726, 0, 0],\n        \"57367\": [0.25142, 0.75726, 0, 0],\n        \"57368\": [0.25142, 0.75726, 0, 0],\n        \"57369\": [0.25142, 0.75726, 0, 0],\n        \"57370\": [0.13597, 0.63597, 0, 0],\n        \"57371\": [0.13597, 0.63597, 0, 0]\n    },\n    \"Caligraphic-Regular\": {\n        \"48\": [0, 0.43056, 0, 0],\n        \"49\": [0, 0.43056, 0, 0],\n        \"50\": [0, 0.43056, 0, 0],\n        \"51\": [0.19444, 0.43056, 0, 0],\n        \"52\": [0.19444, 0.43056, 0, 0],\n        \"53\": [0.19444, 0.43056, 0, 0],\n        \"54\": [0, 0.64444, 0, 0],\n        \"55\": [0.19444, 0.43056, 0, 0],\n        \"56\": [0, 0.64444, 0, 0],\n        \"57\": [0.19444, 0.43056, 0, 0],\n        \"65\": [0, 0.68333, 0, 0.19445],\n        \"66\": [0, 0.68333, 0.03041, 0.13889],\n        \"67\": [0, 0.68333, 0.05834, 0.13889],\n        \"68\": [0, 0.68333, 0.02778, 0.08334],\n        \"69\": [0, 0.68333, 0.08944, 0.11111],\n        \"70\": [0, 0.68333, 0.09931, 0.11111],\n        \"71\": [0.09722, 0.68333, 0.0593, 0.11111],\n        \"72\": [0, 0.68333, 0.00965, 0.11111],\n        \"73\": [0, 0.68333, 0.07382, 0],\n        \"74\": [0.09722, 0.68333, 0.18472, 0.16667],\n        \"75\": [0, 0.68333, 0.01445, 0.05556],\n        \"76\": [0, 0.68333, 0, 0.13889],\n        \"77\": [0, 0.68333, 0, 0.13889],\n        \"78\": [0, 0.68333, 0.14736, 0.08334],\n        \"79\": [0, 0.68333, 0.02778, 0.11111],\n        \"80\": [0, 0.68333, 0.08222, 0.08334],\n        \"81\": [0.09722, 0.68333, 0, 0.11111],\n        \"82\": [0, 0.68333, 0, 0.08334],\n        \"83\": [0, 0.68333, 0.075, 0.13889],\n        \"84\": [0, 0.68333, 0.25417, 0],\n        \"85\": [0, 0.68333, 0.09931, 0.08334],\n        \"86\": [0, 0.68333, 0.08222, 0],\n        \"87\": [0, 0.68333, 0.08222, 0.08334],\n        \"88\": [0, 0.68333, 0.14643, 0.13889],\n        \"89\": [0.09722, 0.68333, 0.08222, 0.08334],\n        \"90\": [0, 0.68333, 0.07944, 0.13889]\n    },\n    \"Fraktur-Regular\": {\n        \"33\": [0, 0.69141, 0, 0],\n        \"34\": [0, 0.69141, 0, 0],\n        \"38\": [0, 0.69141, 0, 0],\n        \"39\": [0, 0.69141, 0, 0],\n        \"40\": [0.24982, 0.74947, 0, 0],\n        \"41\": [0.24982, 0.74947, 0, 0],\n        \"42\": [0, 0.62119, 0, 0],\n        \"43\": [0.08319, 0.58283, 0, 0],\n        \"44\": [0, 0.10803, 0, 0],\n        \"45\": [0.08319, 0.58283, 0, 0],\n        \"46\": [0, 0.10803, 0, 0],\n        \"47\": [0.24982, 0.74947, 0, 0],\n        \"48\": [0, 0.47534, 0, 0],\n        \"49\": [0, 0.47534, 0, 0],\n        \"50\": [0, 0.47534, 0, 0],\n        \"51\": [0.18906, 0.47534, 0, 0],\n        \"52\": [0.18906, 0.47534, 0, 0],\n        \"53\": [0.18906, 0.47534, 0, 0],\n        \"54\": [0, 0.69141, 0, 0],\n        \"55\": [0.18906, 0.47534, 0, 0],\n        \"56\": [0, 0.69141, 0, 0],\n        \"57\": [0.18906, 0.47534, 0, 0],\n        \"58\": [0, 0.47534, 0, 0],\n        \"59\": [0.12604, 0.47534, 0, 0],\n        \"61\": [-0.13099, 0.36866, 0, 0],\n        \"63\": [0, 0.69141, 0, 0],\n        \"65\": [0, 0.69141, 0, 0],\n        \"66\": [0, 0.69141, 0, 0],\n        \"67\": [0, 0.69141, 0, 0],\n        \"68\": [0, 0.69141, 0, 0],\n        \"69\": [0, 0.69141, 0, 0],\n        \"70\": [0.12604, 0.69141, 0, 0],\n        \"71\": [0, 0.69141, 0, 0],\n        \"72\": [0.06302, 0.69141, 0, 0],\n        \"73\": [0, 0.69141, 0, 0],\n        \"74\": [0.12604, 0.69141, 0, 0],\n        \"75\": [0, 0.69141, 0, 0],\n        \"76\": [0, 0.69141, 0, 0],\n        \"77\": [0, 0.69141, 0, 0],\n        \"78\": [0, 0.69141, 0, 0],\n        \"79\": [0, 0.69141, 0, 0],\n        \"80\": [0.18906, 0.69141, 0, 0],\n        \"81\": [0.03781, 0.69141, 0, 0],\n        \"82\": [0, 0.69141, 0, 0],\n        \"83\": [0, 0.69141, 0, 0],\n        \"84\": [0, 0.69141, 0, 0],\n        \"85\": [0, 0.69141, 0, 0],\n        \"86\": [0, 0.69141, 0, 0],\n        \"87\": [0, 0.69141, 0, 0],\n        \"88\": [0, 0.69141, 0, 0],\n        \"89\": [0.18906, 0.69141, 0, 0],\n        \"90\": [0.12604, 0.69141, 0, 0],\n        \"91\": [0.24982, 0.74947, 0, 0],\n        \"93\": [0.24982, 0.74947, 0, 0],\n        \"94\": [0, 0.69141, 0, 0],\n        \"97\": [0, 0.47534, 0, 0],\n        \"98\": [0, 0.69141, 0, 0],\n        \"99\": [0, 0.47534, 0, 0],\n        \"100\": [0, 0.62119, 0, 0],\n        \"101\": [0, 0.47534, 0, 0],\n        \"102\": [0.18906, 0.69141, 0, 0],\n        \"103\": [0.18906, 0.47534, 0, 0],\n        \"104\": [0.18906, 0.69141, 0, 0],\n        \"105\": [0, 0.69141, 0, 0],\n        \"106\": [0, 0.69141, 0, 0],\n        \"107\": [0, 0.69141, 0, 0],\n        \"108\": [0, 0.69141, 0, 0],\n        \"109\": [0, 0.47534, 0, 0],\n        \"110\": [0, 0.47534, 0, 0],\n        \"111\": [0, 0.47534, 0, 0],\n        \"112\": [0.18906, 0.52396, 0, 0],\n        \"113\": [0.18906, 0.47534, 0, 0],\n        \"114\": [0, 0.47534, 0, 0],\n        \"115\": [0, 0.47534, 0, 0],\n        \"116\": [0, 0.62119, 0, 0],\n        \"117\": [0, 0.47534, 0, 0],\n        \"118\": [0, 0.52396, 0, 0],\n        \"119\": [0, 0.52396, 0, 0],\n        \"120\": [0.18906, 0.47534, 0, 0],\n        \"121\": [0.18906, 0.47534, 0, 0],\n        \"122\": [0.18906, 0.47534, 0, 0],\n        \"8216\": [0, 0.69141, 0, 0],\n        \"8217\": [0, 0.69141, 0, 0],\n        \"58112\": [0, 0.62119, 0, 0],\n        \"58113\": [0, 0.62119, 0, 0],\n        \"58114\": [0.18906, 0.69141, 0, 0],\n        \"58115\": [0.18906, 0.69141, 0, 0],\n        \"58116\": [0.18906, 0.47534, 0, 0],\n        \"58117\": [0, 0.69141, 0, 0],\n        \"58118\": [0, 0.62119, 0, 0],\n        \"58119\": [0, 0.47534, 0, 0]\n    },\n    \"Main-Bold\": {\n        \"33\": [0, 0.69444, 0, 0],\n        \"34\": [0, 0.69444, 0, 0],\n        \"35\": [0.19444, 0.69444, 0, 0],\n        \"36\": [0.05556, 0.75, 0, 0],\n        \"37\": [0.05556, 0.75, 0, 0],\n        \"38\": [0, 0.69444, 0, 0],\n        \"39\": [0, 0.69444, 0, 0],\n        \"40\": [0.25, 0.75, 0, 0],\n        \"41\": [0.25, 0.75, 0, 0],\n        \"42\": [0, 0.75, 0, 0],\n        \"43\": [0.13333, 0.63333, 0, 0],\n        \"44\": [0.19444, 0.15556, 0, 0],\n        \"45\": [0, 0.44444, 0, 0],\n        \"46\": [0, 0.15556, 0, 0],\n        \"47\": [0.25, 0.75, 0, 0],\n        \"48\": [0, 0.64444, 0, 0],\n        \"49\": [0, 0.64444, 0, 0],\n        \"50\": [0, 0.64444, 0, 0],\n        \"51\": [0, 0.64444, 0, 0],\n        \"52\": [0, 0.64444, 0, 0],\n        \"53\": [0, 0.64444, 0, 0],\n        \"54\": [0, 0.64444, 0, 0],\n        \"55\": [0, 0.64444, 0, 0],\n        \"56\": [0, 0.64444, 0, 0],\n        \"57\": [0, 0.64444, 0, 0],\n        \"58\": [0, 0.44444, 0, 0],\n        \"59\": [0.19444, 0.44444, 0, 0],\n        \"60\": [0.08556, 0.58556, 0, 0],\n        \"61\": [-0.10889, 0.39111, 0, 0],\n        \"62\": [0.08556, 0.58556, 0, 0],\n        \"63\": [0, 0.69444, 0, 0],\n        \"64\": [0, 0.69444, 0, 0],\n        \"65\": [0, 0.68611, 0, 0],\n        \"66\": [0, 0.68611, 0, 0],\n        \"67\": [0, 0.68611, 0, 0],\n        \"68\": [0, 0.68611, 0, 0],\n        \"69\": [0, 0.68611, 0, 0],\n        \"70\": [0, 0.68611, 0, 0],\n        \"71\": [0, 0.68611, 0, 0],\n        \"72\": [0, 0.68611, 0, 0],\n        \"73\": [0, 0.68611, 0, 0],\n        \"74\": [0, 0.68611, 0, 0],\n        \"75\": [0, 0.68611, 0, 0],\n        \"76\": [0, 0.68611, 0, 0],\n        \"77\": [0, 0.68611, 0, 0],\n        \"78\": [0, 0.68611, 0, 0],\n        \"79\": [0, 0.68611, 0, 0],\n        \"80\": [0, 0.68611, 0, 0],\n        \"81\": [0.19444, 0.68611, 0, 0],\n        \"82\": [0, 0.68611, 0, 0],\n        \"83\": [0, 0.68611, 0, 0],\n        \"84\": [0, 0.68611, 0, 0],\n        \"85\": [0, 0.68611, 0, 0],\n        \"86\": [0, 0.68611, 0.01597, 0],\n        \"87\": [0, 0.68611, 0.01597, 0],\n        \"88\": [0, 0.68611, 0, 0],\n        \"89\": [0, 0.68611, 0.02875, 0],\n        \"90\": [0, 0.68611, 0, 0],\n        \"91\": [0.25, 0.75, 0, 0],\n        \"92\": [0.25, 0.75, 0, 0],\n        \"93\": [0.25, 0.75, 0, 0],\n        \"94\": [0, 0.69444, 0, 0],\n        \"95\": [0.31, 0.13444, 0.03194, 0],\n        \"96\": [0, 0.69444, 0, 0],\n        \"97\": [0, 0.44444, 0, 0],\n        \"98\": [0, 0.69444, 0, 0],\n        \"99\": [0, 0.44444, 0, 0],\n        \"100\": [0, 0.69444, 0, 0],\n        \"101\": [0, 0.44444, 0, 0],\n        \"102\": [0, 0.69444, 0.10903, 0],\n        \"103\": [0.19444, 0.44444, 0.01597, 0],\n        \"104\": [0, 0.69444, 0, 0],\n        \"105\": [0, 0.69444, 0, 0],\n        \"106\": [0.19444, 0.69444, 0, 0],\n        \"107\": [0, 0.69444, 0, 0],\n        \"108\": [0, 0.69444, 0, 0],\n        \"109\": [0, 0.44444, 0, 0],\n        \"110\": [0, 0.44444, 0, 0],\n        \"111\": [0, 0.44444, 0, 0],\n        \"112\": [0.19444, 0.44444, 0, 0],\n        \"113\": [0.19444, 0.44444, 0, 0],\n        \"114\": [0, 0.44444, 0, 0],\n        \"115\": [0, 0.44444, 0, 0],\n        \"116\": [0, 0.63492, 0, 0],\n        \"117\": [0, 0.44444, 0, 0],\n        \"118\": [0, 0.44444, 0.01597, 0],\n        \"119\": [0, 0.44444, 0.01597, 0],\n        \"120\": [0, 0.44444, 0, 0],\n        \"121\": [0.19444, 0.44444, 0.01597, 0],\n        \"122\": [0, 0.44444, 0, 0],\n        \"123\": [0.25, 0.75, 0, 0],\n        \"124\": [0.25, 0.75, 0, 0],\n        \"125\": [0.25, 0.75, 0, 0],\n        \"126\": [0.35, 0.34444, 0, 0],\n        \"168\": [0, 0.69444, 0, 0],\n        \"172\": [0, 0.44444, 0, 0],\n        \"175\": [0, 0.59611, 0, 0],\n        \"176\": [0, 0.69444, 0, 0],\n        \"177\": [0.13333, 0.63333, 0, 0],\n        \"180\": [0, 0.69444, 0, 0],\n        \"215\": [0.13333, 0.63333, 0, 0],\n        \"247\": [0.13333, 0.63333, 0, 0],\n        \"305\": [0, 0.44444, 0, 0],\n        \"567\": [0.19444, 0.44444, 0, 0],\n        \"710\": [0, 0.69444, 0, 0],\n        \"711\": [0, 0.63194, 0, 0],\n        \"713\": [0, 0.59611, 0, 0],\n        \"714\": [0, 0.69444, 0, 0],\n        \"715\": [0, 0.69444, 0, 0],\n        \"728\": [0, 0.69444, 0, 0],\n        \"729\": [0, 0.69444, 0, 0],\n        \"730\": [0, 0.69444, 0, 0],\n        \"732\": [0, 0.69444, 0, 0],\n        \"768\": [0, 0.69444, 0, 0],\n        \"769\": [0, 0.69444, 0, 0],\n        \"770\": [0, 0.69444, 0, 0],\n        \"771\": [0, 0.69444, 0, 0],\n        \"772\": [0, 0.59611, 0, 0],\n        \"774\": [0, 0.69444, 0, 0],\n        \"775\": [0, 0.69444, 0, 0],\n        \"776\": [0, 0.69444, 0, 0],\n        \"778\": [0, 0.69444, 0, 0],\n        \"779\": [0, 0.69444, 0, 0],\n        \"780\": [0, 0.63194, 0, 0],\n        \"824\": [0.19444, 0.69444, 0, 0],\n        \"915\": [0, 0.68611, 0, 0],\n        \"916\": [0, 0.68611, 0, 0],\n        \"920\": [0, 0.68611, 0, 0],\n        \"923\": [0, 0.68611, 0, 0],\n        \"926\": [0, 0.68611, 0, 0],\n        \"928\": [0, 0.68611, 0, 0],\n        \"931\": [0, 0.68611, 0, 0],\n        \"933\": [0, 0.68611, 0, 0],\n        \"934\": [0, 0.68611, 0, 0],\n        \"936\": [0, 0.68611, 0, 0],\n        \"937\": [0, 0.68611, 0, 0],\n        \"8211\": [0, 0.44444, 0.03194, 0],\n        \"8212\": [0, 0.44444, 0.03194, 0],\n        \"8216\": [0, 0.69444, 0, 0],\n        \"8217\": [0, 0.69444, 0, 0],\n        \"8220\": [0, 0.69444, 0, 0],\n        \"8221\": [0, 0.69444, 0, 0],\n        \"8224\": [0.19444, 0.69444, 0, 0],\n        \"8225\": [0.19444, 0.69444, 0, 0],\n        \"8242\": [0, 0.55556, 0, 0],\n        \"8407\": [0, 0.72444, 0.15486, 0],\n        \"8463\": [0, 0.69444, 0, 0],\n        \"8465\": [0, 0.69444, 0, 0],\n        \"8467\": [0, 0.69444, 0, 0],\n        \"8472\": [0.19444, 0.44444, 0, 0],\n        \"8476\": [0, 0.69444, 0, 0],\n        \"8501\": [0, 0.69444, 0, 0],\n        \"8592\": [-0.10889, 0.39111, 0, 0],\n        \"8593\": [0.19444, 0.69444, 0, 0],\n        \"8594\": [-0.10889, 0.39111, 0, 0],\n        \"8595\": [0.19444, 0.69444, 0, 0],\n        \"8596\": [-0.10889, 0.39111, 0, 0],\n        \"8597\": [0.25, 0.75, 0, 0],\n        \"8598\": [0.19444, 0.69444, 0, 0],\n        \"8599\": [0.19444, 0.69444, 0, 0],\n        \"8600\": [0.19444, 0.69444, 0, 0],\n        \"8601\": [0.19444, 0.69444, 0, 0],\n        \"8636\": [-0.10889, 0.39111, 0, 0],\n        \"8637\": [-0.10889, 0.39111, 0, 0],\n        \"8640\": [-0.10889, 0.39111, 0, 0],\n        \"8641\": [-0.10889, 0.39111, 0, 0],\n        \"8656\": [-0.10889, 0.39111, 0, 0],\n        \"8657\": [0.19444, 0.69444, 0, 0],\n        \"8658\": [-0.10889, 0.39111, 0, 0],\n        \"8659\": [0.19444, 0.69444, 0, 0],\n        \"8660\": [-0.10889, 0.39111, 0, 0],\n        \"8661\": [0.25, 0.75, 0, 0],\n        \"8704\": [0, 0.69444, 0, 0],\n        \"8706\": [0, 0.69444, 0.06389, 0],\n        \"8707\": [0, 0.69444, 0, 0],\n        \"8709\": [0.05556, 0.75, 0, 0],\n        \"8711\": [0, 0.68611, 0, 0],\n        \"8712\": [0.08556, 0.58556, 0, 0],\n        \"8715\": [0.08556, 0.58556, 0, 0],\n        \"8722\": [0.13333, 0.63333, 0, 0],\n        \"8723\": [0.13333, 0.63333, 0, 0],\n        \"8725\": [0.25, 0.75, 0, 0],\n        \"8726\": [0.25, 0.75, 0, 0],\n        \"8727\": [-0.02778, 0.47222, 0, 0],\n        \"8728\": [-0.02639, 0.47361, 0, 0],\n        \"8729\": [-0.02639, 0.47361, 0, 0],\n        \"8730\": [0.18, 0.82, 0, 0],\n        \"8733\": [0, 0.44444, 0, 0],\n        \"8734\": [0, 0.44444, 0, 0],\n        \"8736\": [0, 0.69224, 0, 0],\n        \"8739\": [0.25, 0.75, 0, 0],\n        \"8741\": [0.25, 0.75, 0, 0],\n        \"8743\": [0, 0.55556, 0, 0],\n        \"8744\": [0, 0.55556, 0, 0],\n        \"8745\": [0, 0.55556, 0, 0],\n        \"8746\": [0, 0.55556, 0, 0],\n        \"8747\": [0.19444, 0.69444, 0.12778, 0],\n        \"8764\": [-0.10889, 0.39111, 0, 0],\n        \"8768\": [0.19444, 0.69444, 0, 0],\n        \"8771\": [0.00222, 0.50222, 0, 0],\n        \"8776\": [0.02444, 0.52444, 0, 0],\n        \"8781\": [0.00222, 0.50222, 0, 0],\n        \"8801\": [0.00222, 0.50222, 0, 0],\n        \"8804\": [0.19667, 0.69667, 0, 0],\n        \"8805\": [0.19667, 0.69667, 0, 0],\n        \"8810\": [0.08556, 0.58556, 0, 0],\n        \"8811\": [0.08556, 0.58556, 0, 0],\n        \"8826\": [0.08556, 0.58556, 0, 0],\n        \"8827\": [0.08556, 0.58556, 0, 0],\n        \"8834\": [0.08556, 0.58556, 0, 0],\n        \"8835\": [0.08556, 0.58556, 0, 0],\n        \"8838\": [0.19667, 0.69667, 0, 0],\n        \"8839\": [0.19667, 0.69667, 0, 0],\n        \"8846\": [0, 0.55556, 0, 0],\n        \"8849\": [0.19667, 0.69667, 0, 0],\n        \"8850\": [0.19667, 0.69667, 0, 0],\n        \"8851\": [0, 0.55556, 0, 0],\n        \"8852\": [0, 0.55556, 0, 0],\n        \"8853\": [0.13333, 0.63333, 0, 0],\n        \"8854\": [0.13333, 0.63333, 0, 0],\n        \"8855\": [0.13333, 0.63333, 0, 0],\n        \"8856\": [0.13333, 0.63333, 0, 0],\n        \"8857\": [0.13333, 0.63333, 0, 0],\n        \"8866\": [0, 0.69444, 0, 0],\n        \"8867\": [0, 0.69444, 0, 0],\n        \"8868\": [0, 0.69444, 0, 0],\n        \"8869\": [0, 0.69444, 0, 0],\n        \"8900\": [-0.02639, 0.47361, 0, 0],\n        \"8901\": [-0.02639, 0.47361, 0, 0],\n        \"8902\": [-0.02778, 0.47222, 0, 0],\n        \"8968\": [0.25, 0.75, 0, 0],\n        \"8969\": [0.25, 0.75, 0, 0],\n        \"8970\": [0.25, 0.75, 0, 0],\n        \"8971\": [0.25, 0.75, 0, 0],\n        \"8994\": [-0.13889, 0.36111, 0, 0],\n        \"8995\": [-0.13889, 0.36111, 0, 0],\n        \"9651\": [0.19444, 0.69444, 0, 0],\n        \"9657\": [-0.02778, 0.47222, 0, 0],\n        \"9661\": [0.19444, 0.69444, 0, 0],\n        \"9667\": [-0.02778, 0.47222, 0, 0],\n        \"9711\": [0.19444, 0.69444, 0, 0],\n        \"9824\": [0.12963, 0.69444, 0, 0],\n        \"9825\": [0.12963, 0.69444, 0, 0],\n        \"9826\": [0.12963, 0.69444, 0, 0],\n        \"9827\": [0.12963, 0.69444, 0, 0],\n        \"9837\": [0, 0.75, 0, 0],\n        \"9838\": [0.19444, 0.69444, 0, 0],\n        \"9839\": [0.19444, 0.69444, 0, 0],\n        \"10216\": [0.25, 0.75, 0, 0],\n        \"10217\": [0.25, 0.75, 0, 0],\n        \"10815\": [0, 0.68611, 0, 0],\n        \"10927\": [0.19667, 0.69667, 0, 0],\n        \"10928\": [0.19667, 0.69667, 0, 0]\n    },\n    \"Main-Italic\": {\n        \"33\": [0, 0.69444, 0.12417, 0],\n        \"34\": [0, 0.69444, 0.06961, 0],\n        \"35\": [0.19444, 0.69444, 0.06616, 0],\n        \"37\": [0.05556, 0.75, 0.13639, 0],\n        \"38\": [0, 0.69444, 0.09694, 0],\n        \"39\": [0, 0.69444, 0.12417, 0],\n        \"40\": [0.25, 0.75, 0.16194, 0],\n        \"41\": [0.25, 0.75, 0.03694, 0],\n        \"42\": [0, 0.75, 0.14917, 0],\n        \"43\": [0.05667, 0.56167, 0.03694, 0],\n        \"44\": [0.19444, 0.10556, 0, 0],\n        \"45\": [0, 0.43056, 0.02826, 0],\n        \"46\": [0, 0.10556, 0, 0],\n        \"47\": [0.25, 0.75, 0.16194, 0],\n        \"48\": [0, 0.64444, 0.13556, 0],\n        \"49\": [0, 0.64444, 0.13556, 0],\n        \"50\": [0, 0.64444, 0.13556, 0],\n        \"51\": [0, 0.64444, 0.13556, 0],\n        \"52\": [0.19444, 0.64444, 0.13556, 0],\n        \"53\": [0, 0.64444, 0.13556, 0],\n        \"54\": [0, 0.64444, 0.13556, 0],\n        \"55\": [0.19444, 0.64444, 0.13556, 0],\n        \"56\": [0, 0.64444, 0.13556, 0],\n        \"57\": [0, 0.64444, 0.13556, 0],\n        \"58\": [0, 0.43056, 0.0582, 0],\n        \"59\": [0.19444, 0.43056, 0.0582, 0],\n        \"61\": [-0.13313, 0.36687, 0.06616, 0],\n        \"63\": [0, 0.69444, 0.1225, 0],\n        \"64\": [0, 0.69444, 0.09597, 0],\n        \"65\": [0, 0.68333, 0, 0],\n        \"66\": [0, 0.68333, 0.10257, 0],\n        \"67\": [0, 0.68333, 0.14528, 0],\n        \"68\": [0, 0.68333, 0.09403, 0],\n        \"69\": [0, 0.68333, 0.12028, 0],\n        \"70\": [0, 0.68333, 0.13305, 0],\n        \"71\": [0, 0.68333, 0.08722, 0],\n        \"72\": [0, 0.68333, 0.16389, 0],\n        \"73\": [0, 0.68333, 0.15806, 0],\n        \"74\": [0, 0.68333, 0.14028, 0],\n        \"75\": [0, 0.68333, 0.14528, 0],\n        \"76\": [0, 0.68333, 0, 0],\n        \"77\": [0, 0.68333, 0.16389, 0],\n        \"78\": [0, 0.68333, 0.16389, 0],\n        \"79\": [0, 0.68333, 0.09403, 0],\n        \"80\": [0, 0.68333, 0.10257, 0],\n        \"81\": [0.19444, 0.68333, 0.09403, 0],\n        \"82\": [0, 0.68333, 0.03868, 0],\n        \"83\": [0, 0.68333, 0.11972, 0],\n        \"84\": [0, 0.68333, 0.13305, 0],\n        \"85\": [0, 0.68333, 0.16389, 0],\n        \"86\": [0, 0.68333, 0.18361, 0],\n        \"87\": [0, 0.68333, 0.18361, 0],\n        \"88\": [0, 0.68333, 0.15806, 0],\n        \"89\": [0, 0.68333, 0.19383, 0],\n        \"90\": [0, 0.68333, 0.14528, 0],\n        \"91\": [0.25, 0.75, 0.1875, 0],\n        \"93\": [0.25, 0.75, 0.10528, 0],\n        \"94\": [0, 0.69444, 0.06646, 0],\n        \"95\": [0.31, 0.12056, 0.09208, 0],\n        \"97\": [0, 0.43056, 0.07671, 0],\n        \"98\": [0, 0.69444, 0.06312, 0],\n        \"99\": [0, 0.43056, 0.05653, 0],\n        \"100\": [0, 0.69444, 0.10333, 0],\n        \"101\": [0, 0.43056, 0.07514, 0],\n        \"102\": [0.19444, 0.69444, 0.21194, 0],\n        \"103\": [0.19444, 0.43056, 0.08847, 0],\n        \"104\": [0, 0.69444, 0.07671, 0],\n        \"105\": [0, 0.65536, 0.1019, 0],\n        \"106\": [0.19444, 0.65536, 0.14467, 0],\n        \"107\": [0, 0.69444, 0.10764, 0],\n        \"108\": [0, 0.69444, 0.10333, 0],\n        \"109\": [0, 0.43056, 0.07671, 0],\n        \"110\": [0, 0.43056, 0.07671, 0],\n        \"111\": [0, 0.43056, 0.06312, 0],\n        \"112\": [0.19444, 0.43056, 0.06312, 0],\n        \"113\": [0.19444, 0.43056, 0.08847, 0],\n        \"114\": [0, 0.43056, 0.10764, 0],\n        \"115\": [0, 0.43056, 0.08208, 0],\n        \"116\": [0, 0.61508, 0.09486, 0],\n        \"117\": [0, 0.43056, 0.07671, 0],\n        \"118\": [0, 0.43056, 0.10764, 0],\n        \"119\": [0, 0.43056, 0.10764, 0],\n        \"120\": [0, 0.43056, 0.12042, 0],\n        \"121\": [0.19444, 0.43056, 0.08847, 0],\n        \"122\": [0, 0.43056, 0.12292, 0],\n        \"126\": [0.35, 0.31786, 0.11585, 0],\n        \"163\": [0, 0.69444, 0, 0],\n        \"305\": [0, 0.43056, 0, 0.02778],\n        \"567\": [0.19444, 0.43056, 0, 0.08334],\n        \"768\": [0, 0.69444, 0, 0],\n        \"769\": [0, 0.69444, 0.09694, 0],\n        \"770\": [0, 0.69444, 0.06646, 0],\n        \"771\": [0, 0.66786, 0.11585, 0],\n        \"772\": [0, 0.56167, 0.10333, 0],\n        \"774\": [0, 0.69444, 0.10806, 0],\n        \"775\": [0, 0.66786, 0.11752, 0],\n        \"776\": [0, 0.66786, 0.10474, 0],\n        \"778\": [0, 0.69444, 0, 0],\n        \"779\": [0, 0.69444, 0.1225, 0],\n        \"780\": [0, 0.62847, 0.08295, 0],\n        \"915\": [0, 0.68333, 0.13305, 0],\n        \"916\": [0, 0.68333, 0, 0],\n        \"920\": [0, 0.68333, 0.09403, 0],\n        \"923\": [0, 0.68333, 0, 0],\n        \"926\": [0, 0.68333, 0.15294, 0],\n        \"928\": [0, 0.68333, 0.16389, 0],\n        \"931\": [0, 0.68333, 0.12028, 0],\n        \"933\": [0, 0.68333, 0.11111, 0],\n        \"934\": [0, 0.68333, 0.05986, 0],\n        \"936\": [0, 0.68333, 0.11111, 0],\n        \"937\": [0, 0.68333, 0.10257, 0],\n        \"8211\": [0, 0.43056, 0.09208, 0],\n        \"8212\": [0, 0.43056, 0.09208, 0],\n        \"8216\": [0, 0.69444, 0.12417, 0],\n        \"8217\": [0, 0.69444, 0.12417, 0],\n        \"8220\": [0, 0.69444, 0.1685, 0],\n        \"8221\": [0, 0.69444, 0.06961, 0],\n        \"8463\": [0, 0.68889, 0, 0]\n    },\n    \"Main-Regular\": {\n        \"32\": [0, 0, 0, 0],\n        \"33\": [0, 0.69444, 0, 0],\n        \"34\": [0, 0.69444, 0, 0],\n        \"35\": [0.19444, 0.69444, 0, 0],\n        \"36\": [0.05556, 0.75, 0, 0],\n        \"37\": [0.05556, 0.75, 0, 0],\n        \"38\": [0, 0.69444, 0, 0],\n        \"39\": [0, 0.69444, 0, 0],\n        \"40\": [0.25, 0.75, 0, 0],\n        \"41\": [0.25, 0.75, 0, 0],\n        \"42\": [0, 0.75, 0, 0],\n        \"43\": [0.08333, 0.58333, 0, 0],\n        \"44\": [0.19444, 0.10556, 0, 0],\n        \"45\": [0, 0.43056, 0, 0],\n        \"46\": [0, 0.10556, 0, 0],\n        \"47\": [0.25, 0.75, 0, 0],\n        \"48\": [0, 0.64444, 0, 0],\n        \"49\": [0, 0.64444, 0, 0],\n        \"50\": [0, 0.64444, 0, 0],\n        \"51\": [0, 0.64444, 0, 0],\n        \"52\": [0, 0.64444, 0, 0],\n        \"53\": [0, 0.64444, 0, 0],\n        \"54\": [0, 0.64444, 0, 0],\n        \"55\": [0, 0.64444, 0, 0],\n        \"56\": [0, 0.64444, 0, 0],\n        \"57\": [0, 0.64444, 0, 0],\n        \"58\": [0, 0.43056, 0, 0],\n        \"59\": [0.19444, 0.43056, 0, 0],\n        \"60\": [0.0391, 0.5391, 0, 0],\n        \"61\": [-0.13313, 0.36687, 0, 0],\n        \"62\": [0.0391, 0.5391, 0, 0],\n        \"63\": [0, 0.69444, 0, 0],\n        \"64\": [0, 0.69444, 0, 0],\n        \"65\": [0, 0.68333, 0, 0],\n        \"66\": [0, 0.68333, 0, 0],\n        \"67\": [0, 0.68333, 0, 0],\n        \"68\": [0, 0.68333, 0, 0],\n        \"69\": [0, 0.68333, 0, 0],\n        \"70\": [0, 0.68333, 0, 0],\n        \"71\": [0, 0.68333, 0, 0],\n        \"72\": [0, 0.68333, 0, 0],\n        \"73\": [0, 0.68333, 0, 0],\n        \"74\": [0, 0.68333, 0, 0],\n        \"75\": [0, 0.68333, 0, 0],\n        \"76\": [0, 0.68333, 0, 0],\n        \"77\": [0, 0.68333, 0, 0],\n        \"78\": [0, 0.68333, 0, 0],\n        \"79\": [0, 0.68333, 0, 0],\n        \"80\": [0, 0.68333, 0, 0],\n        \"81\": [0.19444, 0.68333, 0, 0],\n        \"82\": [0, 0.68333, 0, 0],\n        \"83\": [0, 0.68333, 0, 0],\n        \"84\": [0, 0.68333, 0, 0],\n        \"85\": [0, 0.68333, 0, 0],\n        \"86\": [0, 0.68333, 0.01389, 0],\n        \"87\": [0, 0.68333, 0.01389, 0],\n        \"88\": [0, 0.68333, 0, 0],\n        \"89\": [0, 0.68333, 0.025, 0],\n        \"90\": [0, 0.68333, 0, 0],\n        \"91\": [0.25, 0.75, 0, 0],\n        \"92\": [0.25, 0.75, 0, 0],\n        \"93\": [0.25, 0.75, 0, 0],\n        \"94\": [0, 0.69444, 0, 0],\n        \"95\": [0.31, 0.12056, 0.02778, 0],\n        \"96\": [0, 0.69444, 0, 0],\n        \"97\": [0, 0.43056, 0, 0],\n        \"98\": [0, 0.69444, 0, 0],\n        \"99\": [0, 0.43056, 0, 0],\n        \"100\": [0, 0.69444, 0, 0],\n        \"101\": [0, 0.43056, 0, 0],\n        \"102\": [0, 0.69444, 0.07778, 0],\n        \"103\": [0.19444, 0.43056, 0.01389, 0],\n        \"104\": [0, 0.69444, 0, 0],\n        \"105\": [0, 0.66786, 0, 0],\n        \"106\": [0.19444, 0.66786, 0, 0],\n        \"107\": [0, 0.69444, 0, 0],\n        \"108\": [0, 0.69444, 0, 0],\n        \"109\": [0, 0.43056, 0, 0],\n        \"110\": [0, 0.43056, 0, 0],\n        \"111\": [0, 0.43056, 0, 0],\n        \"112\": [0.19444, 0.43056, 0, 0],\n        \"113\": [0.19444, 0.43056, 0, 0],\n        \"114\": [0, 0.43056, 0, 0],\n        \"115\": [0, 0.43056, 0, 0],\n        \"116\": [0, 0.61508, 0, 0],\n        \"117\": [0, 0.43056, 0, 0],\n        \"118\": [0, 0.43056, 0.01389, 0],\n        \"119\": [0, 0.43056, 0.01389, 0],\n        \"120\": [0, 0.43056, 0, 0],\n        \"121\": [0.19444, 0.43056, 0.01389, 0],\n        \"122\": [0, 0.43056, 0, 0],\n        \"123\": [0.25, 0.75, 0, 0],\n        \"124\": [0.25, 0.75, 0, 0],\n        \"125\": [0.25, 0.75, 0, 0],\n        \"126\": [0.35, 0.31786, 0, 0],\n        \"160\": [0, 0, 0, 0],\n        \"168\": [0, 0.66786, 0, 0],\n        \"172\": [0, 0.43056, 0, 0],\n        \"175\": [0, 0.56778, 0, 0],\n        \"176\": [0, 0.69444, 0, 0],\n        \"177\": [0.08333, 0.58333, 0, 0],\n        \"180\": [0, 0.69444, 0, 0],\n        \"215\": [0.08333, 0.58333, 0, 0],\n        \"247\": [0.08333, 0.58333, 0, 0],\n        \"305\": [0, 0.43056, 0, 0],\n        \"567\": [0.19444, 0.43056, 0, 0],\n        \"710\": [0, 0.69444, 0, 0],\n        \"711\": [0, 0.62847, 0, 0],\n        \"713\": [0, 0.56778, 0, 0],\n        \"714\": [0, 0.69444, 0, 0],\n        \"715\": [0, 0.69444, 0, 0],\n        \"728\": [0, 0.69444, 0, 0],\n        \"729\": [0, 0.66786, 0, 0],\n        \"730\": [0, 0.69444, 0, 0],\n        \"732\": [0, 0.66786, 0, 0],\n        \"768\": [0, 0.69444, 0, 0],\n        \"769\": [0, 0.69444, 0, 0],\n        \"770\": [0, 0.69444, 0, 0],\n        \"771\": [0, 0.66786, 0, 0],\n        \"772\": [0, 0.56778, 0, 0],\n        \"774\": [0, 0.69444, 0, 0],\n        \"775\": [0, 0.66786, 0, 0],\n        \"776\": [0, 0.66786, 0, 0],\n        \"778\": [0, 0.69444, 0, 0],\n        \"779\": [0, 0.69444, 0, 0],\n        \"780\": [0, 0.62847, 0, 0],\n        \"824\": [0.19444, 0.69444, 0, 0],\n        \"915\": [0, 0.68333, 0, 0],\n        \"916\": [0, 0.68333, 0, 0],\n        \"920\": [0, 0.68333, 0, 0],\n        \"923\": [0, 0.68333, 0, 0],\n        \"926\": [0, 0.68333, 0, 0],\n        \"928\": [0, 0.68333, 0, 0],\n        \"931\": [0, 0.68333, 0, 0],\n        \"933\": [0, 0.68333, 0, 0],\n        \"934\": [0, 0.68333, 0, 0],\n        \"936\": [0, 0.68333, 0, 0],\n        \"937\": [0, 0.68333, 0, 0],\n        \"8211\": [0, 0.43056, 0.02778, 0],\n        \"8212\": [0, 0.43056, 0.02778, 0],\n        \"8216\": [0, 0.69444, 0, 0],\n        \"8217\": [0, 0.69444, 0, 0],\n        \"8220\": [0, 0.69444, 0, 0],\n        \"8221\": [0, 0.69444, 0, 0],\n        \"8224\": [0.19444, 0.69444, 0, 0],\n        \"8225\": [0.19444, 0.69444, 0, 0],\n        \"8230\": [0, 0.12, 0, 0],\n        \"8242\": [0, 0.55556, 0, 0],\n        \"8407\": [0, 0.71444, 0.15382, 0],\n        \"8463\": [0, 0.68889, 0, 0],\n        \"8465\": [0, 0.69444, 0, 0],\n        \"8467\": [0, 0.69444, 0, 0.11111],\n        \"8472\": [0.19444, 0.43056, 0, 0.11111],\n        \"8476\": [0, 0.69444, 0, 0],\n        \"8501\": [0, 0.69444, 0, 0],\n        \"8592\": [-0.13313, 0.36687, 0, 0],\n        \"8593\": [0.19444, 0.69444, 0, 0],\n        \"8594\": [-0.13313, 0.36687, 0, 0],\n        \"8595\": [0.19444, 0.69444, 0, 0],\n        \"8596\": [-0.13313, 0.36687, 0, 0],\n        \"8597\": [0.25, 0.75, 0, 0],\n        \"8598\": [0.19444, 0.69444, 0, 0],\n        \"8599\": [0.19444, 0.69444, 0, 0],\n        \"8600\": [0.19444, 0.69444, 0, 0],\n        \"8601\": [0.19444, 0.69444, 0, 0],\n        \"8614\": [0.011, 0.511, 0, 0],\n        \"8617\": [0.011, 0.511, 0, 0],\n        \"8618\": [0.011, 0.511, 0, 0],\n        \"8636\": [-0.13313, 0.36687, 0, 0],\n        \"8637\": [-0.13313, 0.36687, 0, 0],\n        \"8640\": [-0.13313, 0.36687, 0, 0],\n        \"8641\": [-0.13313, 0.36687, 0, 0],\n        \"8652\": [0.011, 0.671, 0, 0],\n        \"8656\": [-0.13313, 0.36687, 0, 0],\n        \"8657\": [0.19444, 0.69444, 0, 0],\n        \"8658\": [-0.13313, 0.36687, 0, 0],\n        \"8659\": [0.19444, 0.69444, 0, 0],\n        \"8660\": [-0.13313, 0.36687, 0, 0],\n        \"8661\": [0.25, 0.75, 0, 0],\n        \"8704\": [0, 0.69444, 0, 0],\n        \"8706\": [0, 0.69444, 0.05556, 0.08334],\n        \"8707\": [0, 0.69444, 0, 0],\n        \"8709\": [0.05556, 0.75, 0, 0],\n        \"8711\": [0, 0.68333, 0, 0],\n        \"8712\": [0.0391, 0.5391, 0, 0],\n        \"8715\": [0.0391, 0.5391, 0, 0],\n        \"8722\": [0.08333, 0.58333, 0, 0],\n        \"8723\": [0.08333, 0.58333, 0, 0],\n        \"8725\": [0.25, 0.75, 0, 0],\n        \"8726\": [0.25, 0.75, 0, 0],\n        \"8727\": [-0.03472, 0.46528, 0, 0],\n        \"8728\": [-0.05555, 0.44445, 0, 0],\n        \"8729\": [-0.05555, 0.44445, 0, 0],\n        \"8730\": [0.2, 0.8, 0, 0],\n        \"8733\": [0, 0.43056, 0, 0],\n        \"8734\": [0, 0.43056, 0, 0],\n        \"8736\": [0, 0.69224, 0, 0],\n        \"8739\": [0.25, 0.75, 0, 0],\n        \"8741\": [0.25, 0.75, 0, 0],\n        \"8743\": [0, 0.55556, 0, 0],\n        \"8744\": [0, 0.55556, 0, 0],\n        \"8745\": [0, 0.55556, 0, 0],\n        \"8746\": [0, 0.55556, 0, 0],\n        \"8747\": [0.19444, 0.69444, 0.11111, 0],\n        \"8764\": [-0.13313, 0.36687, 0, 0],\n        \"8768\": [0.19444, 0.69444, 0, 0],\n        \"8771\": [-0.03625, 0.46375, 0, 0],\n        \"8773\": [-0.022, 0.589, 0, 0],\n        \"8776\": [-0.01688, 0.48312, 0, 0],\n        \"8781\": [-0.03625, 0.46375, 0, 0],\n        \"8784\": [-0.133, 0.67, 0, 0],\n        \"8800\": [0.215, 0.716, 0, 0],\n        \"8801\": [-0.03625, 0.46375, 0, 0],\n        \"8804\": [0.13597, 0.63597, 0, 0],\n        \"8805\": [0.13597, 0.63597, 0, 0],\n        \"8810\": [0.0391, 0.5391, 0, 0],\n        \"8811\": [0.0391, 0.5391, 0, 0],\n        \"8826\": [0.0391, 0.5391, 0, 0],\n        \"8827\": [0.0391, 0.5391, 0, 0],\n        \"8834\": [0.0391, 0.5391, 0, 0],\n        \"8835\": [0.0391, 0.5391, 0, 0],\n        \"8838\": [0.13597, 0.63597, 0, 0],\n        \"8839\": [0.13597, 0.63597, 0, 0],\n        \"8846\": [0, 0.55556, 0, 0],\n        \"8849\": [0.13597, 0.63597, 0, 0],\n        \"8850\": [0.13597, 0.63597, 0, 0],\n        \"8851\": [0, 0.55556, 0, 0],\n        \"8852\": [0, 0.55556, 0, 0],\n        \"8853\": [0.08333, 0.58333, 0, 0],\n        \"8854\": [0.08333, 0.58333, 0, 0],\n        \"8855\": [0.08333, 0.58333, 0, 0],\n        \"8856\": [0.08333, 0.58333, 0, 0],\n        \"8857\": [0.08333, 0.58333, 0, 0],\n        \"8866\": [0, 0.69444, 0, 0],\n        \"8867\": [0, 0.69444, 0, 0],\n        \"8868\": [0, 0.69444, 0, 0],\n        \"8869\": [0, 0.69444, 0, 0],\n        \"8872\": [0.249, 0.75, 0, 0],\n        \"8900\": [-0.05555, 0.44445, 0, 0],\n        \"8901\": [-0.05555, 0.44445, 0, 0],\n        \"8902\": [-0.03472, 0.46528, 0, 0],\n        \"8904\": [0.005, 0.505, 0, 0],\n        \"8942\": [0.03, 0.9, 0, 0],\n        \"8943\": [-0.19, 0.31, 0, 0],\n        \"8945\": [-0.1, 0.82, 0, 0],\n        \"8968\": [0.25, 0.75, 0, 0],\n        \"8969\": [0.25, 0.75, 0, 0],\n        \"8970\": [0.25, 0.75, 0, 0],\n        \"8971\": [0.25, 0.75, 0, 0],\n        \"8994\": [-0.14236, 0.35764, 0, 0],\n        \"8995\": [-0.14236, 0.35764, 0, 0],\n        \"9136\": [0.244, 0.744, 0, 0],\n        \"9137\": [0.244, 0.744, 0, 0],\n        \"9651\": [0.19444, 0.69444, 0, 0],\n        \"9657\": [-0.03472, 0.46528, 0, 0],\n        \"9661\": [0.19444, 0.69444, 0, 0],\n        \"9667\": [-0.03472, 0.46528, 0, 0],\n        \"9711\": [0.19444, 0.69444, 0, 0],\n        \"9824\": [0.12963, 0.69444, 0, 0],\n        \"9825\": [0.12963, 0.69444, 0, 0],\n        \"9826\": [0.12963, 0.69444, 0, 0],\n        \"9827\": [0.12963, 0.69444, 0, 0],\n        \"9837\": [0, 0.75, 0, 0],\n        \"9838\": [0.19444, 0.69444, 0, 0],\n        \"9839\": [0.19444, 0.69444, 0, 0],\n        \"10216\": [0.25, 0.75, 0, 0],\n        \"10217\": [0.25, 0.75, 0, 0],\n        \"10222\": [0.244, 0.744, 0, 0],\n        \"10223\": [0.244, 0.744, 0, 0],\n        \"10229\": [0.011, 0.511, 0, 0],\n        \"10230\": [0.011, 0.511, 0, 0],\n        \"10231\": [0.011, 0.511, 0, 0],\n        \"10232\": [0.024, 0.525, 0, 0],\n        \"10233\": [0.024, 0.525, 0, 0],\n        \"10234\": [0.024, 0.525, 0, 0],\n        \"10236\": [0.011, 0.511, 0, 0],\n        \"10815\": [0, 0.68333, 0, 0],\n        \"10927\": [0.13597, 0.63597, 0, 0],\n        \"10928\": [0.13597, 0.63597, 0, 0]\n    },\n    \"Math-BoldItalic\": {\n        \"47\": [0.19444, 0.69444, 0, 0],\n        \"65\": [0, 0.68611, 0, 0],\n        \"66\": [0, 0.68611, 0.04835, 0],\n        \"67\": [0, 0.68611, 0.06979, 0],\n        \"68\": [0, 0.68611, 0.03194, 0],\n        \"69\": [0, 0.68611, 0.05451, 0],\n        \"70\": [0, 0.68611, 0.15972, 0],\n        \"71\": [0, 0.68611, 0, 0],\n        \"72\": [0, 0.68611, 0.08229, 0],\n        \"73\": [0, 0.68611, 0.07778, 0],\n        \"74\": [0, 0.68611, 0.10069, 0],\n        \"75\": [0, 0.68611, 0.06979, 0],\n        \"76\": [0, 0.68611, 0, 0],\n        \"77\": [0, 0.68611, 0.11424, 0],\n        \"78\": [0, 0.68611, 0.11424, 0],\n        \"79\": [0, 0.68611, 0.03194, 0],\n        \"80\": [0, 0.68611, 0.15972, 0],\n        \"81\": [0.19444, 0.68611, 0, 0],\n        \"82\": [0, 0.68611, 0.00421, 0],\n        \"83\": [0, 0.68611, 0.05382, 0],\n        \"84\": [0, 0.68611, 0.15972, 0],\n        \"85\": [0, 0.68611, 0.11424, 0],\n        \"86\": [0, 0.68611, 0.25555, 0],\n        \"87\": [0, 0.68611, 0.15972, 0],\n        \"88\": [0, 0.68611, 0.07778, 0],\n        \"89\": [0, 0.68611, 0.25555, 0],\n        \"90\": [0, 0.68611, 0.06979, 0],\n        \"97\": [0, 0.44444, 0, 0],\n        \"98\": [0, 0.69444, 0, 0],\n        \"99\": [0, 0.44444, 0, 0],\n        \"100\": [0, 0.69444, 0, 0],\n        \"101\": [0, 0.44444, 0, 0],\n        \"102\": [0.19444, 0.69444, 0.11042, 0],\n        \"103\": [0.19444, 0.44444, 0.03704, 0],\n        \"104\": [0, 0.69444, 0, 0],\n        \"105\": [0, 0.69326, 0, 0],\n        \"106\": [0.19444, 0.69326, 0.0622, 0],\n        \"107\": [0, 0.69444, 0.01852, 0],\n        \"108\": [0, 0.69444, 0.0088, 0],\n        \"109\": [0, 0.44444, 0, 0],\n        \"110\": [0, 0.44444, 0, 0],\n        \"111\": [0, 0.44444, 0, 0],\n        \"112\": [0.19444, 0.44444, 0, 0],\n        \"113\": [0.19444, 0.44444, 0.03704, 0],\n        \"114\": [0, 0.44444, 0.03194, 0],\n        \"115\": [0, 0.44444, 0, 0],\n        \"116\": [0, 0.63492, 0, 0],\n        \"117\": [0, 0.44444, 0, 0],\n        \"118\": [0, 0.44444, 0.03704, 0],\n        \"119\": [0, 0.44444, 0.02778, 0],\n        \"120\": [0, 0.44444, 0, 0],\n        \"121\": [0.19444, 0.44444, 0.03704, 0],\n        \"122\": [0, 0.44444, 0.04213, 0],\n        \"915\": [0, 0.68611, 0.15972, 0],\n        \"916\": [0, 0.68611, 0, 0],\n        \"920\": [0, 0.68611, 0.03194, 0],\n        \"923\": [0, 0.68611, 0, 0],\n        \"926\": [0, 0.68611, 0.07458, 0],\n        \"928\": [0, 0.68611, 0.08229, 0],\n        \"931\": [0, 0.68611, 0.05451, 0],\n        \"933\": [0, 0.68611, 0.15972, 0],\n        \"934\": [0, 0.68611, 0, 0],\n        \"936\": [0, 0.68611, 0.11653, 0],\n        \"937\": [0, 0.68611, 0.04835, 0],\n        \"945\": [0, 0.44444, 0, 0],\n        \"946\": [0.19444, 0.69444, 0.03403, 0],\n        \"947\": [0.19444, 0.44444, 0.06389, 0],\n        \"948\": [0, 0.69444, 0.03819, 0],\n        \"949\": [0, 0.44444, 0, 0],\n        \"950\": [0.19444, 0.69444, 0.06215, 0],\n        \"951\": [0.19444, 0.44444, 0.03704, 0],\n        \"952\": [0, 0.69444, 0.03194, 0],\n        \"953\": [0, 0.44444, 0, 0],\n        \"954\": [0, 0.44444, 0, 0],\n        \"955\": [0, 0.69444, 0, 0],\n        \"956\": [0.19444, 0.44444, 0, 0],\n        \"957\": [0, 0.44444, 0.06898, 0],\n        \"958\": [0.19444, 0.69444, 0.03021, 0],\n        \"959\": [0, 0.44444, 0, 0],\n        \"960\": [0, 0.44444, 0.03704, 0],\n        \"961\": [0.19444, 0.44444, 0, 0],\n        \"962\": [0.09722, 0.44444, 0.07917, 0],\n        \"963\": [0, 0.44444, 0.03704, 0],\n        \"964\": [0, 0.44444, 0.13472, 0],\n        \"965\": [0, 0.44444, 0.03704, 0],\n        \"966\": [0.19444, 0.44444, 0, 0],\n        \"967\": [0.19444, 0.44444, 0, 0],\n        \"968\": [0.19444, 0.69444, 0.03704, 0],\n        \"969\": [0, 0.44444, 0.03704, 0],\n        \"977\": [0, 0.69444, 0, 0],\n        \"981\": [0.19444, 0.69444, 0, 0],\n        \"982\": [0, 0.44444, 0.03194, 0],\n        \"1009\": [0.19444, 0.44444, 0, 0],\n        \"1013\": [0, 0.44444, 0, 0]\n    },\n    \"Math-Italic\": {\n        \"47\": [0.19444, 0.69444, 0, 0],\n        \"65\": [0, 0.68333, 0, 0.13889],\n        \"66\": [0, 0.68333, 0.05017, 0.08334],\n        \"67\": [0, 0.68333, 0.07153, 0.08334],\n        \"68\": [0, 0.68333, 0.02778, 0.05556],\n        \"69\": [0, 0.68333, 0.05764, 0.08334],\n        \"70\": [0, 0.68333, 0.13889, 0.08334],\n        \"71\": [0, 0.68333, 0, 0.08334],\n        \"72\": [0, 0.68333, 0.08125, 0.05556],\n        \"73\": [0, 0.68333, 0.07847, 0.11111],\n        \"74\": [0, 0.68333, 0.09618, 0.16667],\n        \"75\": [0, 0.68333, 0.07153, 0.05556],\n        \"76\": [0, 0.68333, 0, 0.02778],\n        \"77\": [0, 0.68333, 0.10903, 0.08334],\n        \"78\": [0, 0.68333, 0.10903, 0.08334],\n        \"79\": [0, 0.68333, 0.02778, 0.08334],\n        \"80\": [0, 0.68333, 0.13889, 0.08334],\n        \"81\": [0.19444, 0.68333, 0, 0.08334],\n        \"82\": [0, 0.68333, 0.00773, 0.08334],\n        \"83\": [0, 0.68333, 0.05764, 0.08334],\n        \"84\": [0, 0.68333, 0.13889, 0.08334],\n        \"85\": [0, 0.68333, 0.10903, 0.02778],\n        \"86\": [0, 0.68333, 0.22222, 0],\n        \"87\": [0, 0.68333, 0.13889, 0],\n        \"88\": [0, 0.68333, 0.07847, 0.08334],\n        \"89\": [0, 0.68333, 0.22222, 0],\n        \"90\": [0, 0.68333, 0.07153, 0.08334],\n        \"97\": [0, 0.43056, 0, 0],\n        \"98\": [0, 0.69444, 0, 0],\n        \"99\": [0, 0.43056, 0, 0.05556],\n        \"100\": [0, 0.69444, 0, 0.16667],\n        \"101\": [0, 0.43056, 0, 0.05556],\n        \"102\": [0.19444, 0.69444, 0.10764, 0.16667],\n        \"103\": [0.19444, 0.43056, 0.03588, 0.02778],\n        \"104\": [0, 0.69444, 0, 0],\n        \"105\": [0, 0.65952, 0, 0],\n        \"106\": [0.19444, 0.65952, 0.05724, 0],\n        \"107\": [0, 0.69444, 0.03148, 0],\n        \"108\": [0, 0.69444, 0.01968, 0.08334],\n        \"109\": [0, 0.43056, 0, 0],\n        \"110\": [0, 0.43056, 0, 0],\n        \"111\": [0, 0.43056, 0, 0.05556],\n        \"112\": [0.19444, 0.43056, 0, 0.08334],\n        \"113\": [0.19444, 0.43056, 0.03588, 0.08334],\n        \"114\": [0, 0.43056, 0.02778, 0.05556],\n        \"115\": [0, 0.43056, 0, 0.05556],\n        \"116\": [0, 0.61508, 0, 0.08334],\n        \"117\": [0, 0.43056, 0, 0.02778],\n        \"118\": [0, 0.43056, 0.03588, 0.02778],\n        \"119\": [0, 0.43056, 0.02691, 0.08334],\n        \"120\": [0, 0.43056, 0, 0.02778],\n        \"121\": [0.19444, 0.43056, 0.03588, 0.05556],\n        \"122\": [0, 0.43056, 0.04398, 0.05556],\n        \"915\": [0, 0.68333, 0.13889, 0.08334],\n        \"916\": [0, 0.68333, 0, 0.16667],\n        \"920\": [0, 0.68333, 0.02778, 0.08334],\n        \"923\": [0, 0.68333, 0, 0.16667],\n        \"926\": [0, 0.68333, 0.07569, 0.08334],\n        \"928\": [0, 0.68333, 0.08125, 0.05556],\n        \"931\": [0, 0.68333, 0.05764, 0.08334],\n        \"933\": [0, 0.68333, 0.13889, 0.05556],\n        \"934\": [0, 0.68333, 0, 0.08334],\n        \"936\": [0, 0.68333, 0.11, 0.05556],\n        \"937\": [0, 0.68333, 0.05017, 0.08334],\n        \"945\": [0, 0.43056, 0.0037, 0.02778],\n        \"946\": [0.19444, 0.69444, 0.05278, 0.08334],\n        \"947\": [0.19444, 0.43056, 0.05556, 0],\n        \"948\": [0, 0.69444, 0.03785, 0.05556],\n        \"949\": [0, 0.43056, 0, 0.08334],\n        \"950\": [0.19444, 0.69444, 0.07378, 0.08334],\n        \"951\": [0.19444, 0.43056, 0.03588, 0.05556],\n        \"952\": [0, 0.69444, 0.02778, 0.08334],\n        \"953\": [0, 0.43056, 0, 0.05556],\n        \"954\": [0, 0.43056, 0, 0],\n        \"955\": [0, 0.69444, 0, 0],\n        \"956\": [0.19444, 0.43056, 0, 0.02778],\n        \"957\": [0, 0.43056, 0.06366, 0.02778],\n        \"958\": [0.19444, 0.69444, 0.04601, 0.11111],\n        \"959\": [0, 0.43056, 0, 0.05556],\n        \"960\": [0, 0.43056, 0.03588, 0],\n        \"961\": [0.19444, 0.43056, 0, 0.08334],\n        \"962\": [0.09722, 0.43056, 0.07986, 0.08334],\n        \"963\": [0, 0.43056, 0.03588, 0],\n        \"964\": [0, 0.43056, 0.1132, 0.02778],\n        \"965\": [0, 0.43056, 0.03588, 0.02778],\n        \"966\": [0.19444, 0.43056, 0, 0.08334],\n        \"967\": [0.19444, 0.43056, 0, 0.05556],\n        \"968\": [0.19444, 0.69444, 0.03588, 0.11111],\n        \"969\": [0, 0.43056, 0.03588, 0],\n        \"977\": [0, 0.69444, 0, 0.08334],\n        \"981\": [0.19444, 0.69444, 0, 0.08334],\n        \"982\": [0, 0.43056, 0.02778, 0],\n        \"1009\": [0.19444, 0.43056, 0, 0.08334],\n        \"1013\": [0, 0.43056, 0, 0.05556]\n    },\n    \"Math-Regular\": {\n        \"65\": [0, 0.68333, 0, 0.13889],\n        \"66\": [0, 0.68333, 0.05017, 0.08334],\n        \"67\": [0, 0.68333, 0.07153, 0.08334],\n        \"68\": [0, 0.68333, 0.02778, 0.05556],\n        \"69\": [0, 0.68333, 0.05764, 0.08334],\n        \"70\": [0, 0.68333, 0.13889, 0.08334],\n        \"71\": [0, 0.68333, 0, 0.08334],\n        \"72\": [0, 0.68333, 0.08125, 0.05556],\n        \"73\": [0, 0.68333, 0.07847, 0.11111],\n        \"74\": [0, 0.68333, 0.09618, 0.16667],\n        \"75\": [0, 0.68333, 0.07153, 0.05556],\n        \"76\": [0, 0.68333, 0, 0.02778],\n        \"77\": [0, 0.68333, 0.10903, 0.08334],\n        \"78\": [0, 0.68333, 0.10903, 0.08334],\n        \"79\": [0, 0.68333, 0.02778, 0.08334],\n        \"80\": [0, 0.68333, 0.13889, 0.08334],\n        \"81\": [0.19444, 0.68333, 0, 0.08334],\n        \"82\": [0, 0.68333, 0.00773, 0.08334],\n        \"83\": [0, 0.68333, 0.05764, 0.08334],\n        \"84\": [0, 0.68333, 0.13889, 0.08334],\n        \"85\": [0, 0.68333, 0.10903, 0.02778],\n        \"86\": [0, 0.68333, 0.22222, 0],\n        \"87\": [0, 0.68333, 0.13889, 0],\n        \"88\": [0, 0.68333, 0.07847, 0.08334],\n        \"89\": [0, 0.68333, 0.22222, 0],\n        \"90\": [0, 0.68333, 0.07153, 0.08334],\n        \"97\": [0, 0.43056, 0, 0],\n        \"98\": [0, 0.69444, 0, 0],\n        \"99\": [0, 0.43056, 0, 0.05556],\n        \"100\": [0, 0.69444, 0, 0.16667],\n        \"101\": [0, 0.43056, 0, 0.05556],\n        \"102\": [0.19444, 0.69444, 0.10764, 0.16667],\n        \"103\": [0.19444, 0.43056, 0.03588, 0.02778],\n        \"104\": [0, 0.69444, 0, 0],\n        \"105\": [0, 0.65952, 0, 0],\n        \"106\": [0.19444, 0.65952, 0.05724, 0],\n        \"107\": [0, 0.69444, 0.03148, 0],\n        \"108\": [0, 0.69444, 0.01968, 0.08334],\n        \"109\": [0, 0.43056, 0, 0],\n        \"110\": [0, 0.43056, 0, 0],\n        \"111\": [0, 0.43056, 0, 0.05556],\n        \"112\": [0.19444, 0.43056, 0, 0.08334],\n        \"113\": [0.19444, 0.43056, 0.03588, 0.08334],\n        \"114\": [0, 0.43056, 0.02778, 0.05556],\n        \"115\": [0, 0.43056, 0, 0.05556],\n        \"116\": [0, 0.61508, 0, 0.08334],\n        \"117\": [0, 0.43056, 0, 0.02778],\n        \"118\": [0, 0.43056, 0.03588, 0.02778],\n        \"119\": [0, 0.43056, 0.02691, 0.08334],\n        \"120\": [0, 0.43056, 0, 0.02778],\n        \"121\": [0.19444, 0.43056, 0.03588, 0.05556],\n        \"122\": [0, 0.43056, 0.04398, 0.05556],\n        \"915\": [0, 0.68333, 0.13889, 0.08334],\n        \"916\": [0, 0.68333, 0, 0.16667],\n        \"920\": [0, 0.68333, 0.02778, 0.08334],\n        \"923\": [0, 0.68333, 0, 0.16667],\n        \"926\": [0, 0.68333, 0.07569, 0.08334],\n        \"928\": [0, 0.68333, 0.08125, 0.05556],\n        \"931\": [0, 0.68333, 0.05764, 0.08334],\n        \"933\": [0, 0.68333, 0.13889, 0.05556],\n        \"934\": [0, 0.68333, 0, 0.08334],\n        \"936\": [0, 0.68333, 0.11, 0.05556],\n        \"937\": [0, 0.68333, 0.05017, 0.08334],\n        \"945\": [0, 0.43056, 0.0037, 0.02778],\n        \"946\": [0.19444, 0.69444, 0.05278, 0.08334],\n        \"947\": [0.19444, 0.43056, 0.05556, 0],\n        \"948\": [0, 0.69444, 0.03785, 0.05556],\n        \"949\": [0, 0.43056, 0, 0.08334],\n        \"950\": [0.19444, 0.69444, 0.07378, 0.08334],\n        \"951\": [0.19444, 0.43056, 0.03588, 0.05556],\n        \"952\": [0, 0.69444, 0.02778, 0.08334],\n        \"953\": [0, 0.43056, 0, 0.05556],\n        \"954\": [0, 0.43056, 0, 0],\n        \"955\": [0, 0.69444, 0, 0],\n        \"956\": [0.19444, 0.43056, 0, 0.02778],\n        \"957\": [0, 0.43056, 0.06366, 0.02778],\n        \"958\": [0.19444, 0.69444, 0.04601, 0.11111],\n        \"959\": [0, 0.43056, 0, 0.05556],\n        \"960\": [0, 0.43056, 0.03588, 0],\n        \"961\": [0.19444, 0.43056, 0, 0.08334],\n        \"962\": [0.09722, 0.43056, 0.07986, 0.08334],\n        \"963\": [0, 0.43056, 0.03588, 0],\n        \"964\": [0, 0.43056, 0.1132, 0.02778],\n        \"965\": [0, 0.43056, 0.03588, 0.02778],\n        \"966\": [0.19444, 0.43056, 0, 0.08334],\n        \"967\": [0.19444, 0.43056, 0, 0.05556],\n        \"968\": [0.19444, 0.69444, 0.03588, 0.11111],\n        \"969\": [0, 0.43056, 0.03588, 0],\n        \"977\": [0, 0.69444, 0, 0.08334],\n        \"981\": [0.19444, 0.69444, 0, 0.08334],\n        \"982\": [0, 0.43056, 0.02778, 0],\n        \"1009\": [0.19444, 0.43056, 0, 0.08334],\n        \"1013\": [0, 0.43056, 0, 0.05556]\n    },\n    \"SansSerif-Regular\": {\n        \"33\": [0, 0.69444, 0, 0],\n        \"34\": [0, 0.69444, 0, 0],\n        \"35\": [0.19444, 0.69444, 0, 0],\n        \"36\": [0.05556, 0.75, 0, 0],\n        \"37\": [0.05556, 0.75, 0, 0],\n        \"38\": [0, 0.69444, 0, 0],\n        \"39\": [0, 0.69444, 0, 0],\n        \"40\": [0.25, 0.75, 0, 0],\n        \"41\": [0.25, 0.75, 0, 0],\n        \"42\": [0, 0.75, 0, 0],\n        \"43\": [0.08333, 0.58333, 0, 0],\n        \"44\": [0.125, 0.08333, 0, 0],\n        \"45\": [0, 0.44444, 0, 0],\n        \"46\": [0, 0.08333, 0, 0],\n        \"47\": [0.25, 0.75, 0, 0],\n        \"48\": [0, 0.65556, 0, 0],\n        \"49\": [0, 0.65556, 0, 0],\n        \"50\": [0, 0.65556, 0, 0],\n        \"51\": [0, 0.65556, 0, 0],\n        \"52\": [0, 0.65556, 0, 0],\n        \"53\": [0, 0.65556, 0, 0],\n        \"54\": [0, 0.65556, 0, 0],\n        \"55\": [0, 0.65556, 0, 0],\n        \"56\": [0, 0.65556, 0, 0],\n        \"57\": [0, 0.65556, 0, 0],\n        \"58\": [0, 0.44444, 0, 0],\n        \"59\": [0.125, 0.44444, 0, 0],\n        \"61\": [-0.13, 0.37, 0, 0],\n        \"63\": [0, 0.69444, 0, 0],\n        \"64\": [0, 0.69444, 0, 0],\n        \"65\": [0, 0.69444, 0, 0],\n        \"66\": [0, 0.69444, 0, 0],\n        \"67\": [0, 0.69444, 0, 0],\n        \"68\": [0, 0.69444, 0, 0],\n        \"69\": [0, 0.69444, 0, 0],\n        \"70\": [0, 0.69444, 0, 0],\n        \"71\": [0, 0.69444, 0, 0],\n        \"72\": [0, 0.69444, 0, 0],\n        \"73\": [0, 0.69444, 0, 0],\n        \"74\": [0, 0.69444, 0, 0],\n        \"75\": [0, 0.69444, 0, 0],\n        \"76\": [0, 0.69444, 0, 0],\n        \"77\": [0, 0.69444, 0, 0],\n        \"78\": [0, 0.69444, 0, 0],\n        \"79\": [0, 0.69444, 0, 0],\n        \"80\": [0, 0.69444, 0, 0],\n        \"81\": [0.125, 0.69444, 0, 0],\n        \"82\": [0, 0.69444, 0, 0],\n        \"83\": [0, 0.69444, 0, 0],\n        \"84\": [0, 0.69444, 0, 0],\n        \"85\": [0, 0.69444, 0, 0],\n        \"86\": [0, 0.69444, 0.01389, 0],\n        \"87\": [0, 0.69444, 0.01389, 0],\n        \"88\": [0, 0.69444, 0, 0],\n        \"89\": [0, 0.69444, 0.025, 0],\n        \"90\": [0, 0.69444, 0, 0],\n        \"91\": [0.25, 0.75, 0, 0],\n        \"93\": [0.25, 0.75, 0, 0],\n        \"94\": [0, 0.69444, 0, 0],\n        \"95\": [0.35, 0.09444, 0.02778, 0],\n        \"97\": [0, 0.44444, 0, 0],\n        \"98\": [0, 0.69444, 0, 0],\n        \"99\": [0, 0.44444, 0, 0],\n        \"100\": [0, 0.69444, 0, 0],\n        \"101\": [0, 0.44444, 0, 0],\n        \"102\": [0, 0.69444, 0.06944, 0],\n        \"103\": [0.19444, 0.44444, 0.01389, 0],\n        \"104\": [0, 0.69444, 0, 0],\n        \"105\": [0, 0.67937, 0, 0],\n        \"106\": [0.19444, 0.67937, 0, 0],\n        \"107\": [0, 0.69444, 0, 0],\n        \"108\": [0, 0.69444, 0, 0],\n        \"109\": [0, 0.44444, 0, 0],\n        \"110\": [0, 0.44444, 0, 0],\n        \"111\": [0, 0.44444, 0, 0],\n        \"112\": [0.19444, 0.44444, 0, 0],\n        \"113\": [0.19444, 0.44444, 0, 0],\n        \"114\": [0, 0.44444, 0.01389, 0],\n        \"115\": [0, 0.44444, 0, 0],\n        \"116\": [0, 0.57143, 0, 0],\n        \"117\": [0, 0.44444, 0, 0],\n        \"118\": [0, 0.44444, 0.01389, 0],\n        \"119\": [0, 0.44444, 0.01389, 0],\n        \"120\": [0, 0.44444, 0, 0],\n        \"121\": [0.19444, 0.44444, 0.01389, 0],\n        \"122\": [0, 0.44444, 0, 0],\n        \"126\": [0.35, 0.32659, 0, 0],\n        \"305\": [0, 0.44444, 0, 0],\n        \"567\": [0.19444, 0.44444, 0, 0],\n        \"768\": [0, 0.69444, 0, 0],\n        \"769\": [0, 0.69444, 0, 0],\n        \"770\": [0, 0.69444, 0, 0],\n        \"771\": [0, 0.67659, 0, 0],\n        \"772\": [0, 0.60889, 0, 0],\n        \"774\": [0, 0.69444, 0, 0],\n        \"775\": [0, 0.67937, 0, 0],\n        \"776\": [0, 0.67937, 0, 0],\n        \"778\": [0, 0.69444, 0, 0],\n        \"779\": [0, 0.69444, 0, 0],\n        \"780\": [0, 0.63194, 0, 0],\n        \"915\": [0, 0.69444, 0, 0],\n        \"916\": [0, 0.69444, 0, 0],\n        \"920\": [0, 0.69444, 0, 0],\n        \"923\": [0, 0.69444, 0, 0],\n        \"926\": [0, 0.69444, 0, 0],\n        \"928\": [0, 0.69444, 0, 0],\n        \"931\": [0, 0.69444, 0, 0],\n        \"933\": [0, 0.69444, 0, 0],\n        \"934\": [0, 0.69444, 0, 0],\n        \"936\": [0, 0.69444, 0, 0],\n        \"937\": [0, 0.69444, 0, 0],\n        \"8211\": [0, 0.44444, 0.02778, 0],\n        \"8212\": [0, 0.44444, 0.02778, 0],\n        \"8216\": [0, 0.69444, 0, 0],\n        \"8217\": [0, 0.69444, 0, 0],\n        \"8220\": [0, 0.69444, 0, 0],\n        \"8221\": [0, 0.69444, 0, 0]\n    },\n    \"Script-Regular\": {\n        \"65\": [0, 0.7, 0.22925, 0],\n        \"66\": [0, 0.7, 0.04087, 0],\n        \"67\": [0, 0.7, 0.1689, 0],\n        \"68\": [0, 0.7, 0.09371, 0],\n        \"69\": [0, 0.7, 0.18583, 0],\n        \"70\": [0, 0.7, 0.13634, 0],\n        \"71\": [0, 0.7, 0.17322, 0],\n        \"72\": [0, 0.7, 0.29694, 0],\n        \"73\": [0, 0.7, 0.19189, 0],\n        \"74\": [0.27778, 0.7, 0.19189, 0],\n        \"75\": [0, 0.7, 0.31259, 0],\n        \"76\": [0, 0.7, 0.19189, 0],\n        \"77\": [0, 0.7, 0.15981, 0],\n        \"78\": [0, 0.7, 0.3525, 0],\n        \"79\": [0, 0.7, 0.08078, 0],\n        \"80\": [0, 0.7, 0.08078, 0],\n        \"81\": [0, 0.7, 0.03305, 0],\n        \"82\": [0, 0.7, 0.06259, 0],\n        \"83\": [0, 0.7, 0.19189, 0],\n        \"84\": [0, 0.7, 0.29087, 0],\n        \"85\": [0, 0.7, 0.25815, 0],\n        \"86\": [0, 0.7, 0.27523, 0],\n        \"87\": [0, 0.7, 0.27523, 0],\n        \"88\": [0, 0.7, 0.26006, 0],\n        \"89\": [0, 0.7, 0.2939, 0],\n        \"90\": [0, 0.7, 0.24037, 0]\n    },\n    \"Size1-Regular\": {\n        \"40\": [0.35001, 0.85, 0, 0],\n        \"41\": [0.35001, 0.85, 0, 0],\n        \"47\": [0.35001, 0.85, 0, 0],\n        \"91\": [0.35001, 0.85, 0, 0],\n        \"92\": [0.35001, 0.85, 0, 0],\n        \"93\": [0.35001, 0.85, 0, 0],\n        \"123\": [0.35001, 0.85, 0, 0],\n        \"125\": [0.35001, 0.85, 0, 0],\n        \"710\": [0, 0.72222, 0, 0],\n        \"732\": [0, 0.72222, 0, 0],\n        \"770\": [0, 0.72222, 0, 0],\n        \"771\": [0, 0.72222, 0, 0],\n        \"8214\": [-0.00099, 0.601, 0, 0],\n        \"8593\": [1e-05, 0.6, 0, 0],\n        \"8595\": [1e-05, 0.6, 0, 0],\n        \"8657\": [1e-05, 0.6, 0, 0],\n        \"8659\": [1e-05, 0.6, 0, 0],\n        \"8719\": [0.25001, 0.75, 0, 0],\n        \"8720\": [0.25001, 0.75, 0, 0],\n        \"8721\": [0.25001, 0.75, 0, 0],\n        \"8730\": [0.35001, 0.85, 0, 0],\n        \"8739\": [-0.00599, 0.606, 0, 0],\n        \"8741\": [-0.00599, 0.606, 0, 0],\n        \"8747\": [0.30612, 0.805, 0.19445, 0],\n        \"8748\": [0.306, 0.805, 0.19445, 0],\n        \"8749\": [0.306, 0.805, 0.19445, 0],\n        \"8750\": [0.30612, 0.805, 0.19445, 0],\n        \"8896\": [0.25001, 0.75, 0, 0],\n        \"8897\": [0.25001, 0.75, 0, 0],\n        \"8898\": [0.25001, 0.75, 0, 0],\n        \"8899\": [0.25001, 0.75, 0, 0],\n        \"8968\": [0.35001, 0.85, 0, 0],\n        \"8969\": [0.35001, 0.85, 0, 0],\n        \"8970\": [0.35001, 0.85, 0, 0],\n        \"8971\": [0.35001, 0.85, 0, 0],\n        \"9168\": [-0.00099, 0.601, 0, 0],\n        \"10216\": [0.35001, 0.85, 0, 0],\n        \"10217\": [0.35001, 0.85, 0, 0],\n        \"10752\": [0.25001, 0.75, 0, 0],\n        \"10753\": [0.25001, 0.75, 0, 0],\n        \"10754\": [0.25001, 0.75, 0, 0],\n        \"10756\": [0.25001, 0.75, 0, 0],\n        \"10758\": [0.25001, 0.75, 0, 0]\n    },\n    \"Size2-Regular\": {\n        \"40\": [0.65002, 1.15, 0, 0],\n        \"41\": [0.65002, 1.15, 0, 0],\n        \"47\": [0.65002, 1.15, 0, 0],\n        \"91\": [0.65002, 1.15, 0, 0],\n        \"92\": [0.65002, 1.15, 0, 0],\n        \"93\": [0.65002, 1.15, 0, 0],\n        \"123\": [0.65002, 1.15, 0, 0],\n        \"125\": [0.65002, 1.15, 0, 0],\n        \"710\": [0, 0.75, 0, 0],\n        \"732\": [0, 0.75, 0, 0],\n        \"770\": [0, 0.75, 0, 0],\n        \"771\": [0, 0.75, 0, 0],\n        \"8719\": [0.55001, 1.05, 0, 0],\n        \"8720\": [0.55001, 1.05, 0, 0],\n        \"8721\": [0.55001, 1.05, 0, 0],\n        \"8730\": [0.65002, 1.15, 0, 0],\n        \"8747\": [0.86225, 1.36, 0.44445, 0],\n        \"8748\": [0.862, 1.36, 0.44445, 0],\n        \"8749\": [0.862, 1.36, 0.44445, 0],\n        \"8750\": [0.86225, 1.36, 0.44445, 0],\n        \"8896\": [0.55001, 1.05, 0, 0],\n        \"8897\": [0.55001, 1.05, 0, 0],\n        \"8898\": [0.55001, 1.05, 0, 0],\n        \"8899\": [0.55001, 1.05, 0, 0],\n        \"8968\": [0.65002, 1.15, 0, 0],\n        \"8969\": [0.65002, 1.15, 0, 0],\n        \"8970\": [0.65002, 1.15, 0, 0],\n        \"8971\": [0.65002, 1.15, 0, 0],\n        \"10216\": [0.65002, 1.15, 0, 0],\n        \"10217\": [0.65002, 1.15, 0, 0],\n        \"10752\": [0.55001, 1.05, 0, 0],\n        \"10753\": [0.55001, 1.05, 0, 0],\n        \"10754\": [0.55001, 1.05, 0, 0],\n        \"10756\": [0.55001, 1.05, 0, 0],\n        \"10758\": [0.55001, 1.05, 0, 0]\n    },\n    \"Size3-Regular\": {\n        \"40\": [0.95003, 1.45, 0, 0],\n        \"41\": [0.95003, 1.45, 0, 0],\n        \"47\": [0.95003, 1.45, 0, 0],\n        \"91\": [0.95003, 1.45, 0, 0],\n        \"92\": [0.95003, 1.45, 0, 0],\n        \"93\": [0.95003, 1.45, 0, 0],\n        \"123\": [0.95003, 1.45, 0, 0],\n        \"125\": [0.95003, 1.45, 0, 0],\n        \"710\": [0, 0.75, 0, 0],\n        \"732\": [0, 0.75, 0, 0],\n        \"770\": [0, 0.75, 0, 0],\n        \"771\": [0, 0.75, 0, 0],\n        \"8730\": [0.95003, 1.45, 0, 0],\n        \"8968\": [0.95003, 1.45, 0, 0],\n        \"8969\": [0.95003, 1.45, 0, 0],\n        \"8970\": [0.95003, 1.45, 0, 0],\n        \"8971\": [0.95003, 1.45, 0, 0],\n        \"10216\": [0.95003, 1.45, 0, 0],\n        \"10217\": [0.95003, 1.45, 0, 0]\n    },\n    \"Size4-Regular\": {\n        \"40\": [1.25003, 1.75, 0, 0],\n        \"41\": [1.25003, 1.75, 0, 0],\n        \"47\": [1.25003, 1.75, 0, 0],\n        \"91\": [1.25003, 1.75, 0, 0],\n        \"92\": [1.25003, 1.75, 0, 0],\n        \"93\": [1.25003, 1.75, 0, 0],\n        \"123\": [1.25003, 1.75, 0, 0],\n        \"125\": [1.25003, 1.75, 0, 0],\n        \"710\": [0, 0.825, 0, 0],\n        \"732\": [0, 0.825, 0, 0],\n        \"770\": [0, 0.825, 0, 0],\n        \"771\": [0, 0.825, 0, 0],\n        \"8730\": [1.25003, 1.75, 0, 0],\n        \"8968\": [1.25003, 1.75, 0, 0],\n        \"8969\": [1.25003, 1.75, 0, 0],\n        \"8970\": [1.25003, 1.75, 0, 0],\n        \"8971\": [1.25003, 1.75, 0, 0],\n        \"9115\": [0.64502, 1.155, 0, 0],\n        \"9116\": [1e-05, 0.6, 0, 0],\n        \"9117\": [0.64502, 1.155, 0, 0],\n        \"9118\": [0.64502, 1.155, 0, 0],\n        \"9119\": [1e-05, 0.6, 0, 0],\n        \"9120\": [0.64502, 1.155, 0, 0],\n        \"9121\": [0.64502, 1.155, 0, 0],\n        \"9122\": [-0.00099, 0.601, 0, 0],\n        \"9123\": [0.64502, 1.155, 0, 0],\n        \"9124\": [0.64502, 1.155, 0, 0],\n        \"9125\": [-0.00099, 0.601, 0, 0],\n        \"9126\": [0.64502, 1.155, 0, 0],\n        \"9127\": [1e-05, 0.9, 0, 0],\n        \"9128\": [0.65002, 1.15, 0, 0],\n        \"9129\": [0.90001, 0, 0, 0],\n        \"9130\": [0, 0.3, 0, 0],\n        \"9131\": [1e-05, 0.9, 0, 0],\n        \"9132\": [0.65002, 1.15, 0, 0],\n        \"9133\": [0.90001, 0, 0, 0],\n        \"9143\": [0.88502, 0.915, 0, 0],\n        \"10216\": [1.25003, 1.75, 0, 0],\n        \"10217\": [1.25003, 1.75, 0, 0],\n        \"57344\": [-0.00499, 0.605, 0, 0],\n        \"57345\": [-0.00499, 0.605, 0, 0],\n        \"57680\": [0, 0.12, 0, 0],\n        \"57681\": [0, 0.12, 0, 0],\n        \"57682\": [0, 0.12, 0, 0],\n        \"57683\": [0, 0.12, 0, 0]\n    },\n    \"Typewriter-Regular\": {\n        \"33\": [0, 0.61111, 0, 0],\n        \"34\": [0, 0.61111, 0, 0],\n        \"35\": [0, 0.61111, 0, 0],\n        \"36\": [0.08333, 0.69444, 0, 0],\n        \"37\": [0.08333, 0.69444, 0, 0],\n        \"38\": [0, 0.61111, 0, 0],\n        \"39\": [0, 0.61111, 0, 0],\n        \"40\": [0.08333, 0.69444, 0, 0],\n        \"41\": [0.08333, 0.69444, 0, 0],\n        \"42\": [0, 0.52083, 0, 0],\n        \"43\": [-0.08056, 0.53055, 0, 0],\n        \"44\": [0.13889, 0.125, 0, 0],\n        \"45\": [-0.08056, 0.53055, 0, 0],\n        \"46\": [0, 0.125, 0, 0],\n        \"47\": [0.08333, 0.69444, 0, 0],\n        \"48\": [0, 0.61111, 0, 0],\n        \"49\": [0, 0.61111, 0, 0],\n        \"50\": [0, 0.61111, 0, 0],\n        \"51\": [0, 0.61111, 0, 0],\n        \"52\": [0, 0.61111, 0, 0],\n        \"53\": [0, 0.61111, 0, 0],\n        \"54\": [0, 0.61111, 0, 0],\n        \"55\": [0, 0.61111, 0, 0],\n        \"56\": [0, 0.61111, 0, 0],\n        \"57\": [0, 0.61111, 0, 0],\n        \"58\": [0, 0.43056, 0, 0],\n        \"59\": [0.13889, 0.43056, 0, 0],\n        \"60\": [-0.05556, 0.55556, 0, 0],\n        \"61\": [-0.19549, 0.41562, 0, 0],\n        \"62\": [-0.05556, 0.55556, 0, 0],\n        \"63\": [0, 0.61111, 0, 0],\n        \"64\": [0, 0.61111, 0, 0],\n        \"65\": [0, 0.61111, 0, 0],\n        \"66\": [0, 0.61111, 0, 0],\n        \"67\": [0, 0.61111, 0, 0],\n        \"68\": [0, 0.61111, 0, 0],\n        \"69\": [0, 0.61111, 0, 0],\n        \"70\": [0, 0.61111, 0, 0],\n        \"71\": [0, 0.61111, 0, 0],\n        \"72\": [0, 0.61111, 0, 0],\n        \"73\": [0, 0.61111, 0, 0],\n        \"74\": [0, 0.61111, 0, 0],\n        \"75\": [0, 0.61111, 0, 0],\n        \"76\": [0, 0.61111, 0, 0],\n        \"77\": [0, 0.61111, 0, 0],\n        \"78\": [0, 0.61111, 0, 0],\n        \"79\": [0, 0.61111, 0, 0],\n        \"80\": [0, 0.61111, 0, 0],\n        \"81\": [0.13889, 0.61111, 0, 0],\n        \"82\": [0, 0.61111, 0, 0],\n        \"83\": [0, 0.61111, 0, 0],\n        \"84\": [0, 0.61111, 0, 0],\n        \"85\": [0, 0.61111, 0, 0],\n        \"86\": [0, 0.61111, 0, 0],\n        \"87\": [0, 0.61111, 0, 0],\n        \"88\": [0, 0.61111, 0, 0],\n        \"89\": [0, 0.61111, 0, 0],\n        \"90\": [0, 0.61111, 0, 0],\n        \"91\": [0.08333, 0.69444, 0, 0],\n        \"92\": [0.08333, 0.69444, 0, 0],\n        \"93\": [0.08333, 0.69444, 0, 0],\n        \"94\": [0, 0.61111, 0, 0],\n        \"95\": [0.09514, 0, 0, 0],\n        \"96\": [0, 0.61111, 0, 0],\n        \"97\": [0, 0.43056, 0, 0],\n        \"98\": [0, 0.61111, 0, 0],\n        \"99\": [0, 0.43056, 0, 0],\n        \"100\": [0, 0.61111, 0, 0],\n        \"101\": [0, 0.43056, 0, 0],\n        \"102\": [0, 0.61111, 0, 0],\n        \"103\": [0.22222, 0.43056, 0, 0],\n        \"104\": [0, 0.61111, 0, 0],\n        \"105\": [0, 0.61111, 0, 0],\n        \"106\": [0.22222, 0.61111, 0, 0],\n        \"107\": [0, 0.61111, 0, 0],\n        \"108\": [0, 0.61111, 0, 0],\n        \"109\": [0, 0.43056, 0, 0],\n        \"110\": [0, 0.43056, 0, 0],\n        \"111\": [0, 0.43056, 0, 0],\n        \"112\": [0.22222, 0.43056, 0, 0],\n        \"113\": [0.22222, 0.43056, 0, 0],\n        \"114\": [0, 0.43056, 0, 0],\n        \"115\": [0, 0.43056, 0, 0],\n        \"116\": [0, 0.55358, 0, 0],\n        \"117\": [0, 0.43056, 0, 0],\n        \"118\": [0, 0.43056, 0, 0],\n        \"119\": [0, 0.43056, 0, 0],\n        \"120\": [0, 0.43056, 0, 0],\n        \"121\": [0.22222, 0.43056, 0, 0],\n        \"122\": [0, 0.43056, 0, 0],\n        \"123\": [0.08333, 0.69444, 0, 0],\n        \"124\": [0.08333, 0.69444, 0, 0],\n        \"125\": [0.08333, 0.69444, 0, 0],\n        \"126\": [0, 0.61111, 0, 0],\n        \"127\": [0, 0.61111, 0, 0],\n        \"305\": [0, 0.43056, 0, 0],\n        \"567\": [0.22222, 0.43056, 0, 0],\n        \"768\": [0, 0.61111, 0, 0],\n        \"769\": [0, 0.61111, 0, 0],\n        \"770\": [0, 0.61111, 0, 0],\n        \"771\": [0, 0.61111, 0, 0],\n        \"772\": [0, 0.56555, 0, 0],\n        \"774\": [0, 0.61111, 0, 0],\n        \"776\": [0, 0.61111, 0, 0],\n        \"778\": [0, 0.61111, 0, 0],\n        \"780\": [0, 0.56597, 0, 0],\n        \"915\": [0, 0.61111, 0, 0],\n        \"916\": [0, 0.61111, 0, 0],\n        \"920\": [0, 0.61111, 0, 0],\n        \"923\": [0, 0.61111, 0, 0],\n        \"926\": [0, 0.61111, 0, 0],\n        \"928\": [0, 0.61111, 0, 0],\n        \"931\": [0, 0.61111, 0, 0],\n        \"933\": [0, 0.61111, 0, 0],\n        \"934\": [0, 0.61111, 0, 0],\n        \"936\": [0, 0.61111, 0, 0],\n        \"937\": [0, 0.61111, 0, 0],\n        \"2018\": [0, 0.61111, 0, 0],\n        \"2019\": [0, 0.61111, 0, 0],\n        \"8242\": [0, 0.61111, 0, 0]\n    }\n};\n\n},{}],43:[function(require,module,exports){\n\"use strict\";\n\nvar _utils = require(\"./utils\");\n\nvar _utils2 = _interopRequireDefault(_utils);\n\nvar _ParseError = require(\"./ParseError\");\n\nvar _ParseError2 = _interopRequireDefault(_ParseError);\n\nvar _ParseNode = require(\"./ParseNode\");\n\nvar _ParseNode2 = _interopRequireDefault(_ParseNode);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/* This file contains a list of functions that we parse, identified by\n * the calls to defineFunction.\n *\n * The first argument to defineFunction is a single name or a list of names.\n * All functions named in such a list will share a single implementation.\n *\n * Each declared function can have associated properties, which\n * include the following:\n *\n *  - numArgs: The number of arguments the function takes.\n *             If this is the only property, it can be passed as a number\n *             instead of an element of a properties object.\n *  - argTypes: (optional) An array corresponding to each argument of the\n *              function, giving the type of argument that should be parsed. Its\n *              length should be equal to `numArgs + numOptionalArgs`. Valid\n *              types:\n *               - \"size\": A size-like thing, such as \"1em\" or \"5ex\"\n *               - \"color\": An html color, like \"#abc\" or \"blue\"\n *               - \"original\": The same type as the environment that the\n *                             function being parsed is in (e.g. used for the\n *                             bodies of functions like \\textcolor where the\n *                             first argument is special and the second\n *                             argument is parsed normally)\n *              Other possible types (probably shouldn't be used)\n *               - \"text\": Text-like (e.g. \\text)\n *               - \"math\": Normal math\n *              If undefined, this will be treated as an appropriate length\n *              array of \"original\" strings\n *  - greediness: (optional) The greediness of the function to use ungrouped\n *                arguments.\n *\n *                E.g. if you have an expression\n *                  \\sqrt \\frac 1 2\n *                since \\frac has greediness=2 vs \\sqrt's greediness=1, \\frac\n *                will use the two arguments '1' and '2' as its two arguments,\n *                then that whole function will be used as the argument to\n *                \\sqrt. On the other hand, the expressions\n *                  \\frac \\frac 1 2 3\n *                and\n *                  \\frac \\sqrt 1 2\n *                will fail because \\frac and \\frac have equal greediness\n *                and \\sqrt has a lower greediness than \\frac respectively. To\n *                make these parse, we would have to change them to:\n *                  \\frac {\\frac 1 2} 3\n *                and\n *                  \\frac {\\sqrt 1} 2\n *\n *                The default value is `1`\n *  - allowedInText: (optional) Whether or not the function is allowed inside\n *                   text mode (default false)\n *  - numOptionalArgs: (optional) The number of optional arguments the function\n *                     should parse. If the optional arguments aren't found,\n *                     `null` will be passed to the handler in their place.\n *                     (default 0)\n *  - infix: (optional) Must be true if the function is an infix operator.\n *\n * The last argument is that implementation, the handler for the function(s).\n * It is called to handle these functions and their arguments.\n * It receives two arguments:\n *  - context contains information and references provided by the parser\n *  - args is an array of arguments obtained from TeX input\n * The context contains the following properties:\n *  - funcName: the text (i.e. name) of the function, including \\\n *  - parser: the parser object\n *  - lexer: the lexer object\n *  - positions: the positions in the overall string of the function\n *               and the arguments.\n * The latter three should only be used to produce error messages.\n *\n * The function should return an object with the following keys:\n *  - type: The type of element that this is. This is then used in\n *          buildHTML/buildMathML to determine which function\n *          should be called to build this node into a DOM node\n * Any other data can be added to the object, which will be passed\n * in to the function in buildHTML/buildMathML as `group.value`.\n */\n\nfunction defineFunction(names, props, handler) {\n    if (typeof names === \"string\") {\n        names = [names];\n    }\n    if (typeof props === \"number\") {\n        props = { numArgs: props };\n    }\n    // Set default values of functions\n    var data = {\n        numArgs: props.numArgs,\n        argTypes: props.argTypes,\n        greediness: props.greediness === undefined ? 1 : props.greediness,\n        allowedInText: !!props.allowedInText,\n        allowedInMath: props.allowedInMath,\n        numOptionalArgs: props.numOptionalArgs || 0,\n        infix: !!props.infix,\n        handler: handler\n    };\n    for (var i = 0; i < names.length; ++i) {\n        module.exports[names[i]] = data;\n    }\n}\n\n// Since the corresponding buildHTML/buildMathML function expects a\n// list of elements, we normalize for different kinds of arguments\nvar ordargument = function ordargument(arg) {\n    if (arg.type === \"ordgroup\") {\n        return arg.value;\n    } else {\n        return [arg];\n    }\n};\n\n// A normal square root\ndefineFunction(\"\\\\sqrt\", {\n    numArgs: 1,\n    numOptionalArgs: 1\n}, function (context, args) {\n    var index = args[0];\n    var body = args[1];\n    return {\n        type: \"sqrt\",\n        body: body,\n        index: index\n    };\n});\n\n// Non-mathy text, possibly in a font\nvar textFunctionStyles = {\n    \"\\\\text\": undefined, \"\\\\textrm\": \"mathrm\", \"\\\\textsf\": \"mathsf\",\n    \"\\\\texttt\": \"mathtt\", \"\\\\textnormal\": \"mathrm\", \"\\\\textbf\": \"mathbf\",\n    \"\\\\textit\": \"textit\"\n};\n\ndefineFunction([\"\\\\text\", \"\\\\textrm\", \"\\\\textsf\", \"\\\\texttt\", \"\\\\textnormal\", \"\\\\textbf\", \"\\\\textit\"], {\n    numArgs: 1,\n    argTypes: [\"text\"],\n    greediness: 2,\n    allowedInText: true\n}, function (context, args) {\n    var body = args[0];\n    return {\n        type: \"text\",\n        body: ordargument(body),\n        style: textFunctionStyles[context.funcName]\n    };\n});\n\n// A two-argument custom color\ndefineFunction(\"\\\\textcolor\", {\n    numArgs: 2,\n    allowedInText: true,\n    greediness: 3,\n    argTypes: [\"color\", \"original\"]\n}, function (context, args) {\n    var color = args[0];\n    var body = args[1];\n    return {\n        type: \"color\",\n        color: color.value,\n        value: ordargument(body)\n    };\n});\n\n// \\color is handled in Parser.js's parseImplicitGroup\ndefineFunction(\"\\\\color\", {\n    numArgs: 1,\n    allowedInText: true,\n    greediness: 3,\n    argTypes: [\"color\"]\n}, null);\n\n// An overline\ndefineFunction(\"\\\\overline\", {\n    numArgs: 1\n}, function (context, args) {\n    var body = args[0];\n    return {\n        type: \"overline\",\n        body: body\n    };\n});\n\n// An underline\ndefineFunction(\"\\\\underline\", {\n    numArgs: 1\n}, function (context, args) {\n    var body = args[0];\n    return {\n        type: \"underline\",\n        body: body\n    };\n});\n\n// A box of the width and height\ndefineFunction(\"\\\\rule\", {\n    numArgs: 2,\n    numOptionalArgs: 1,\n    argTypes: [\"size\", \"size\", \"size\"]\n}, function (context, args) {\n    var shift = args[0];\n    var width = args[1];\n    var height = args[2];\n    return {\n        type: \"rule\",\n        shift: shift && shift.value,\n        width: width.value,\n        height: height.value\n    };\n});\n\n// TODO: In TeX, \\mkern only accepts mu-units, and \\kern does not accept\n// mu-units. In current KaTeX we relax this; both commands accept any unit.\ndefineFunction([\"\\\\kern\", \"\\\\mkern\"], {\n    numArgs: 1,\n    argTypes: [\"size\"]\n}, function (context, args) {\n    return {\n        type: \"kern\",\n        dimension: args[0].value\n    };\n});\n\n// A KaTeX logo\ndefineFunction(\"\\\\KaTeX\", {\n    numArgs: 0\n}, function (context) {\n    return {\n        type: \"katex\"\n    };\n});\n\ndefineFunction(\"\\\\phantom\", {\n    numArgs: 1\n}, function (context, args) {\n    var body = args[0];\n    return {\n        type: \"phantom\",\n        value: ordargument(body)\n    };\n});\n\n// Math class commands except \\mathop\ndefineFunction([\"\\\\mathord\", \"\\\\mathbin\", \"\\\\mathrel\", \"\\\\mathopen\", \"\\\\mathclose\", \"\\\\mathpunct\", \"\\\\mathinner\"], {\n    numArgs: 1\n}, function (context, args) {\n    var body = args[0];\n    return {\n        type: \"mclass\",\n        mclass: \"m\" + context.funcName.substr(5),\n        value: ordargument(body)\n    };\n});\n\n// Build a relation by placing one symbol on top of another\ndefineFunction(\"\\\\stackrel\", {\n    numArgs: 2\n}, function (context, args) {\n    var top = args[0];\n    var bottom = args[1];\n\n    var bottomop = new _ParseNode2.default(\"op\", {\n        type: \"op\",\n        limits: true,\n        alwaysHandleSupSub: true,\n        symbol: false,\n        value: ordargument(bottom)\n    }, bottom.mode);\n\n    var supsub = new _ParseNode2.default(\"supsub\", {\n        base: bottomop,\n        sup: top,\n        sub: null\n    }, top.mode);\n\n    return {\n        type: \"mclass\",\n        mclass: \"mrel\",\n        value: [supsub]\n    };\n});\n\n// \\mod-type functions\ndefineFunction(\"\\\\bmod\", {\n    numArgs: 0\n}, function (context, args) {\n    return {\n        type: \"mod\",\n        modType: \"bmod\",\n        value: null\n    };\n});\n\ndefineFunction([\"\\\\pod\", \"\\\\pmod\", \"\\\\mod\"], {\n    numArgs: 1\n}, function (context, args) {\n    var body = args[0];\n    return {\n        type: \"mod\",\n        modType: context.funcName.substr(1),\n        value: ordargument(body)\n    };\n});\n\n// Extra data needed for the delimiter handler down below\nvar delimiterSizes = {\n    \"\\\\bigl\": { mclass: \"mopen\", size: 1 },\n    \"\\\\Bigl\": { mclass: \"mopen\", size: 2 },\n    \"\\\\biggl\": { mclass: \"mopen\", size: 3 },\n    \"\\\\Biggl\": { mclass: \"mopen\", size: 4 },\n    \"\\\\bigr\": { mclass: \"mclose\", size: 1 },\n    \"\\\\Bigr\": { mclass: \"mclose\", size: 2 },\n    \"\\\\biggr\": { mclass: \"mclose\", size: 3 },\n    \"\\\\Biggr\": { mclass: \"mclose\", size: 4 },\n    \"\\\\bigm\": { mclass: \"mrel\", size: 1 },\n    \"\\\\Bigm\": { mclass: \"mrel\", size: 2 },\n    \"\\\\biggm\": { mclass: \"mrel\", size: 3 },\n    \"\\\\Biggm\": { mclass: \"mrel\", size: 4 },\n    \"\\\\big\": { mclass: \"mord\", size: 1 },\n    \"\\\\Big\": { mclass: \"mord\", size: 2 },\n    \"\\\\bigg\": { mclass: \"mord\", size: 3 },\n    \"\\\\Bigg\": { mclass: \"mord\", size: 4 }\n};\n\nvar delimiters = [\"(\", \")\", \"[\", \"\\\\lbrack\", \"]\", \"\\\\rbrack\", \"\\\\{\", \"\\\\lbrace\", \"\\\\}\", \"\\\\rbrace\", \"\\\\lfloor\", \"\\\\rfloor\", \"\\\\lceil\", \"\\\\rceil\", \"<\", \">\", \"\\\\langle\", \"\\\\rangle\", \"\\\\lt\", \"\\\\gt\", \"\\\\lvert\", \"\\\\rvert\", \"\\\\lVert\", \"\\\\rVert\", \"\\\\lgroup\", \"\\\\rgroup\", \"\\\\lmoustache\", \"\\\\rmoustache\", \"/\", \"\\\\backslash\", \"|\", \"\\\\vert\", \"\\\\|\", \"\\\\Vert\", \"\\\\uparrow\", \"\\\\Uparrow\", \"\\\\downarrow\", \"\\\\Downarrow\", \"\\\\updownarrow\", \"\\\\Updownarrow\", \".\"];\n\nvar fontAliases = {\n    \"\\\\Bbb\": \"\\\\mathbb\",\n    \"\\\\bold\": \"\\\\mathbf\",\n    \"\\\\frak\": \"\\\\mathfrak\"\n};\n\n// Single-argument color functions\ndefineFunction([\"\\\\blue\", \"\\\\orange\", \"\\\\pink\", \"\\\\red\", \"\\\\green\", \"\\\\gray\", \"\\\\purple\", \"\\\\blueA\", \"\\\\blueB\", \"\\\\blueC\", \"\\\\blueD\", \"\\\\blueE\", \"\\\\tealA\", \"\\\\tealB\", \"\\\\tealC\", \"\\\\tealD\", \"\\\\tealE\", \"\\\\greenA\", \"\\\\greenB\", \"\\\\greenC\", \"\\\\greenD\", \"\\\\greenE\", \"\\\\goldA\", \"\\\\goldB\", \"\\\\goldC\", \"\\\\goldD\", \"\\\\goldE\", \"\\\\redA\", \"\\\\redB\", \"\\\\redC\", \"\\\\redD\", \"\\\\redE\", \"\\\\maroonA\", \"\\\\maroonB\", \"\\\\maroonC\", \"\\\\maroonD\", \"\\\\maroonE\", \"\\\\purpleA\", \"\\\\purpleB\", \"\\\\purpleC\", \"\\\\purpleD\", \"\\\\purpleE\", \"\\\\mintA\", \"\\\\mintB\", \"\\\\mintC\", \"\\\\grayA\", \"\\\\grayB\", \"\\\\grayC\", \"\\\\grayD\", \"\\\\grayE\", \"\\\\grayF\", \"\\\\grayG\", \"\\\\grayH\", \"\\\\grayI\", \"\\\\kaBlue\", \"\\\\kaGreen\"], {\n    numArgs: 1,\n    allowedInText: true,\n    greediness: 3\n}, function (context, args) {\n    var body = args[0];\n    return {\n        type: \"color\",\n        color: \"katex-\" + context.funcName.slice(1),\n        value: ordargument(body)\n    };\n});\n\n// There are 2 flags for operators; whether they produce limits in\n// displaystyle, and whether they are symbols and should grow in\n// displaystyle. These four groups cover the four possible choices.\n\n// No limits, not symbols\ndefineFunction([\"\\\\arcsin\", \"\\\\arccos\", \"\\\\arctan\", \"\\\\arctg\", \"\\\\arcctg\", \"\\\\arg\", \"\\\\ch\", \"\\\\cos\", \"\\\\cosec\", \"\\\\cosh\", \"\\\\cot\", \"\\\\cotg\", \"\\\\coth\", \"\\\\csc\", \"\\\\ctg\", \"\\\\cth\", \"\\\\deg\", \"\\\\dim\", \"\\\\exp\", \"\\\\hom\", \"\\\\ker\", \"\\\\lg\", \"\\\\ln\", \"\\\\log\", \"\\\\sec\", \"\\\\sin\", \"\\\\sinh\", \"\\\\sh\", \"\\\\tan\", \"\\\\tanh\", \"\\\\tg\", \"\\\\th\"], {\n    numArgs: 0\n}, function (context) {\n    return {\n        type: \"op\",\n        limits: false,\n        symbol: false,\n        body: context.funcName\n    };\n});\n\n// Limits, not symbols\ndefineFunction([\"\\\\det\", \"\\\\gcd\", \"\\\\inf\", \"\\\\lim\", \"\\\\liminf\", \"\\\\limsup\", \"\\\\max\", \"\\\\min\", \"\\\\Pr\", \"\\\\sup\"], {\n    numArgs: 0\n}, function (context) {\n    return {\n        type: \"op\",\n        limits: true,\n        symbol: false,\n        body: context.funcName\n    };\n});\n\n// No limits, symbols\ndefineFunction([\"\\\\int\", \"\\\\iint\", \"\\\\iiint\", \"\\\\oint\"], {\n    numArgs: 0\n}, function (context) {\n    return {\n        type: \"op\",\n        limits: false,\n        symbol: true,\n        body: context.funcName\n    };\n});\n\n// Limits, symbols\ndefineFunction([\"\\\\coprod\", \"\\\\bigvee\", \"\\\\bigwedge\", \"\\\\biguplus\", \"\\\\bigcap\", \"\\\\bigcup\", \"\\\\intop\", \"\\\\prod\", \"\\\\sum\", \"\\\\bigotimes\", \"\\\\bigoplus\", \"\\\\bigodot\", \"\\\\bigsqcup\", \"\\\\smallint\"], {\n    numArgs: 0\n}, function (context) {\n    return {\n        type: \"op\",\n        limits: true,\n        symbol: true,\n        body: context.funcName\n    };\n});\n\n// \\mathop class command\ndefineFunction(\"\\\\mathop\", {\n    numArgs: 1\n}, function (context, args) {\n    var body = args[0];\n    return {\n        type: \"op\",\n        limits: false,\n        symbol: false,\n        value: ordargument(body)\n    };\n});\n\n// Fractions\ndefineFunction([\"\\\\dfrac\", \"\\\\frac\", \"\\\\tfrac\", \"\\\\dbinom\", \"\\\\binom\", \"\\\\tbinom\", \"\\\\\\\\atopfrac\"], {\n    numArgs: 2,\n    greediness: 2\n}, function (context, args) {\n    var numer = args[0];\n    var denom = args[1];\n    var hasBarLine = void 0;\n    var leftDelim = null;\n    var rightDelim = null;\n    var size = \"auto\";\n\n    switch (context.funcName) {\n        case \"\\\\dfrac\":\n        case \"\\\\frac\":\n        case \"\\\\tfrac\":\n            hasBarLine = true;\n            break;\n        case \"\\\\\\\\atopfrac\":\n            hasBarLine = false;\n            break;\n        case \"\\\\dbinom\":\n        case \"\\\\binom\":\n        case \"\\\\tbinom\":\n            hasBarLine = false;\n            leftDelim = \"(\";\n            rightDelim = \")\";\n            break;\n        default:\n            throw new Error(\"Unrecognized genfrac command\");\n    }\n\n    switch (context.funcName) {\n        case \"\\\\dfrac\":\n        case \"\\\\dbinom\":\n            size = \"display\";\n            break;\n        case \"\\\\tfrac\":\n        case \"\\\\tbinom\":\n            size = \"text\";\n            break;\n    }\n\n    return {\n        type: \"genfrac\",\n        numer: numer,\n        denom: denom,\n        hasBarLine: hasBarLine,\n        leftDelim: leftDelim,\n        rightDelim: rightDelim,\n        size: size\n    };\n});\n\n// Left and right overlap functions\ndefineFunction([\"\\\\llap\", \"\\\\rlap\"], {\n    numArgs: 1,\n    allowedInText: true\n}, function (context, args) {\n    var body = args[0];\n    return {\n        type: context.funcName.slice(1),\n        body: body\n    };\n});\n\n// Delimiter functions\nvar checkDelimiter = function checkDelimiter(delim, context) {\n    if (_utils2.default.contains(delimiters, delim.value)) {\n        return delim;\n    } else {\n        throw new _ParseError2.default(\"Invalid delimiter: '\" + delim.value + \"' after '\" + context.funcName + \"'\", delim);\n    }\n};\n\ndefineFunction([\"\\\\bigl\", \"\\\\Bigl\", \"\\\\biggl\", \"\\\\Biggl\", \"\\\\bigr\", \"\\\\Bigr\", \"\\\\biggr\", \"\\\\Biggr\", \"\\\\bigm\", \"\\\\Bigm\", \"\\\\biggm\", \"\\\\Biggm\", \"\\\\big\", \"\\\\Big\", \"\\\\bigg\", \"\\\\Bigg\"], {\n    numArgs: 1\n}, function (context, args) {\n    var delim = checkDelimiter(args[0], context);\n\n    return {\n        type: \"delimsizing\",\n        size: delimiterSizes[context.funcName].size,\n        mclass: delimiterSizes[context.funcName].mclass,\n        value: delim.value\n    };\n});\n\ndefineFunction([\"\\\\left\", \"\\\\right\"], {\n    numArgs: 1\n}, function (context, args) {\n    var delim = checkDelimiter(args[0], context);\n\n    // \\left and \\right are caught somewhere in Parser.js, which is\n    // why this data doesn't match what is in buildHTML.\n    return {\n        type: \"leftright\",\n        value: delim.value\n    };\n});\n\ndefineFunction(\"\\\\middle\", {\n    numArgs: 1\n}, function (context, args) {\n    var delim = checkDelimiter(args[0], context);\n    if (!context.parser.leftrightDepth) {\n        throw new _ParseError2.default(\"\\\\middle without preceding \\\\left\", delim);\n    }\n\n    return {\n        type: \"middle\",\n        value: delim.value\n    };\n});\n\n// Sizing functions (handled in Parser.js explicitly, hence no handler)\ndefineFunction([\"\\\\tiny\", \"\\\\scriptsize\", \"\\\\footnotesize\", \"\\\\small\", \"\\\\normalsize\", \"\\\\large\", \"\\\\Large\", \"\\\\LARGE\", \"\\\\huge\", \"\\\\Huge\"], 0, null);\n\n// Style changing functions (handled in Parser.js explicitly, hence no\n// handler)\ndefineFunction([\"\\\\displaystyle\", \"\\\\textstyle\", \"\\\\scriptstyle\", \"\\\\scriptscriptstyle\"], 0, null);\n\n// Old font changing functions\ndefineFunction([\"\\\\rm\", \"\\\\sf\", \"\\\\tt\", \"\\\\bf\", \"\\\\it\"], 0, null);\n\ndefineFunction([\n// styles\n\"\\\\mathrm\", \"\\\\mathit\", \"\\\\mathbf\",\n\n// families\n\"\\\\mathbb\", \"\\\\mathcal\", \"\\\\mathfrak\", \"\\\\mathscr\", \"\\\\mathsf\", \"\\\\mathtt\",\n\n// aliases\n\"\\\\Bbb\", \"\\\\bold\", \"\\\\frak\"], {\n    numArgs: 1,\n    greediness: 2\n}, function (context, args) {\n    var body = args[0];\n    var func = context.funcName;\n    if (func in fontAliases) {\n        func = fontAliases[func];\n    }\n    return {\n        type: \"font\",\n        font: func.slice(1),\n        body: body\n    };\n});\n\n// Accents\ndefineFunction([\"\\\\acute\", \"\\\\grave\", \"\\\\ddot\", \"\\\\tilde\", \"\\\\bar\", \"\\\\breve\", \"\\\\check\", \"\\\\hat\", \"\\\\vec\", \"\\\\dot\", \"\\\\widehat\", \"\\\\widetilde\", \"\\\\overrightarrow\", \"\\\\overleftarrow\", \"\\\\Overrightarrow\", \"\\\\overleftrightarrow\", \"\\\\overgroup\", \"\\\\overlinesegment\", \"\\\\overleftharpoon\", \"\\\\overrightharpoon\"], {\n    numArgs: 1\n}, function (context, args) {\n    var base = args[0];\n\n    var isStretchy = !_utils2.default.contains([\"\\\\acute\", \"\\\\grave\", \"\\\\ddot\", \"\\\\tilde\", \"\\\\bar\", \"\\\\breve\", \"\\\\check\", \"\\\\hat\", \"\\\\vec\", \"\\\\dot\"], context.funcName);\n\n    var isShifty = !isStretchy || _utils2.default.contains([\"\\\\widehat\", \"\\\\widetilde\"], context.funcName);\n\n    return {\n        type: \"accent\",\n        label: context.funcName,\n        isStretchy: isStretchy,\n        isShifty: isShifty,\n        value: ordargument(base),\n        base: base\n    };\n});\n\n// Text-mode accents\ndefineFunction([\"\\\\'\", \"\\\\`\", \"\\\\^\", \"\\\\~\", \"\\\\=\", \"\\\\u\", \"\\\\.\", '\\\\\"', \"\\\\r\", \"\\\\H\", \"\\\\v\"], {\n    numArgs: 1,\n    allowedInText: true,\n    allowedInMath: false\n}, function (context, args) {\n    var base = args[0];\n\n    return {\n        type: \"accent\",\n        label: context.funcName,\n        isStretchy: false,\n        isShifty: true,\n        value: ordargument(base),\n        base: base\n    };\n});\n\n// Horizontal stretchy braces\ndefineFunction([\"\\\\overbrace\", \"\\\\underbrace\"], {\n    numArgs: 1\n}, function (context, args) {\n    var base = args[0];\n    return {\n        type: \"horizBrace\",\n        label: context.funcName,\n        isOver: /^\\\\over/.test(context.funcName),\n        base: base\n    };\n});\n\n// Stretchy accents under the body\ndefineFunction([\"\\\\underleftarrow\", \"\\\\underrightarrow\", \"\\\\underleftrightarrow\", \"\\\\undergroup\", \"\\\\underlinesegment\", \"\\\\undertilde\"], {\n    numArgs: 1\n}, function (context, args) {\n    var body = args[0];\n    return {\n        type: \"accentUnder\",\n        label: context.funcName,\n        value: ordargument(body),\n        body: body\n    };\n});\n\n// Stretchy arrows with an optional argument\ndefineFunction([\"\\\\xleftarrow\", \"\\\\xrightarrow\", \"\\\\xLeftarrow\", \"\\\\xRightarrow\", \"\\\\xleftrightarrow\", \"\\\\xLeftrightarrow\", \"\\\\xhookleftarrow\", \"\\\\xhookrightarrow\", \"\\\\xmapsto\", \"\\\\xrightharpoondown\", \"\\\\xrightharpoonup\", \"\\\\xleftharpoondown\", \"\\\\xleftharpoonup\", \"\\\\xrightleftharpoons\", \"\\\\xleftrightharpoons\", \"\\\\xLongequal\", \"\\\\xtwoheadrightarrow\", \"\\\\xtwoheadleftarrow\", \"\\\\xLongequal\", \"\\\\xtofrom\"], {\n    numArgs: 1,\n    numOptionalArgs: 1\n}, function (context, args) {\n    var below = args[0];\n    var body = args[1];\n    return {\n        type: \"xArrow\", // x for extensible\n        label: context.funcName,\n        body: body,\n        below: below\n    };\n});\n\n// enclose\ndefineFunction([\"\\\\cancel\", \"\\\\bcancel\", \"\\\\xcancel\", \"\\\\sout\", \"\\\\fbox\"], {\n    numArgs: 1\n}, function (context, args) {\n    var body = args[0];\n    return {\n        type: \"enclose\",\n        label: context.funcName,\n        body: body\n    };\n});\n\n// Infix generalized fractions\ndefineFunction([\"\\\\over\", \"\\\\choose\", \"\\\\atop\"], {\n    numArgs: 0,\n    infix: true\n}, function (context) {\n    var replaceWith = void 0;\n    switch (context.funcName) {\n        case \"\\\\over\":\n            replaceWith = \"\\\\frac\";\n            break;\n        case \"\\\\choose\":\n            replaceWith = \"\\\\binom\";\n            break;\n        case \"\\\\atop\":\n            replaceWith = \"\\\\\\\\atopfrac\";\n            break;\n        default:\n            throw new Error(\"Unrecognized infix genfrac command\");\n    }\n    return {\n        type: \"infix\",\n        replaceWith: replaceWith,\n        token: context.token\n    };\n});\n\n// Row breaks for aligned data\ndefineFunction([\"\\\\\\\\\", \"\\\\cr\"], {\n    numArgs: 0,\n    numOptionalArgs: 1,\n    argTypes: [\"size\"]\n}, function (context, args) {\n    var size = args[0];\n    return {\n        type: \"cr\",\n        size: size\n    };\n});\n\n// Environment delimiters\ndefineFunction([\"\\\\begin\", \"\\\\end\"], {\n    numArgs: 1,\n    argTypes: [\"text\"]\n}, function (context, args) {\n    var nameGroup = args[0];\n    if (nameGroup.type !== \"ordgroup\") {\n        throw new _ParseError2.default(\"Invalid environment name\", nameGroup);\n    }\n    var name = \"\";\n    for (var i = 0; i < nameGroup.value.length; ++i) {\n        name += nameGroup.value[i].value;\n    }\n    return {\n        type: \"environment\",\n        name: name,\n        nameGroup: nameGroup\n    };\n});\n\n},{\"./ParseError\":29,\"./ParseNode\":30,\"./utils\":51}],44:[function(require,module,exports){\n\"use strict\";\n\n/**\n * Predefined macros for KaTeX.\n * This can be used to define some commands in terms of others.\n */\n\n// This function might one day accept additional argument and do more things.\nfunction defineMacro(name, body) {\n  module.exports[name] = body;\n}\n\n//////////////////////////////////////////////////////////////////////\n// basics\ndefineMacro(\"\\\\bgroup\", \"{\");\ndefineMacro(\"\\\\egroup\", \"}\");\ndefineMacro(\"\\\\begingroup\", \"{\");\ndefineMacro(\"\\\\endgroup\", \"}\");\n\n// We don't distinguish between math and nonmath kerns.\n// (In TeX, the mu unit works only with \\mkern.)\ndefineMacro(\"\\\\mkern\", \"\\\\kern\");\n\n//////////////////////////////////////////////////////////////////////\n// amsmath.sty\n\n// \\def\\overset#1#2{\\binrel@{#2}\\binrel@@{\\mathop{\\kern\\z@#2}\\limits^{#1}}}\ndefineMacro(\"\\\\overset\", \"\\\\mathop{#2}\\\\limits^{#1}\");\ndefineMacro(\"\\\\underset\", \"\\\\mathop{#2}\\\\limits_{#1}\");\n\n// \\newcommand{\\boxed}[1]{\\fbox{\\m@th$\\displaystyle#1$}}\ndefineMacro(\"\\\\boxed\", \"\\\\fbox{\\\\displaystyle{#1}}\");\n\n//TODO: When implementing \\dots, should ideally add the \\DOTSB indicator\n//      into the macro, to indicate these are binary operators.\n// \\def\\iff{\\DOTSB\\;\\Longleftrightarrow\\;}\n// \\def\\implies{\\DOTSB\\;\\Longrightarrow\\;}\n// \\def\\impliedby{\\DOTSB\\;\\Longleftarrow\\;}\ndefineMacro(\"\\\\iff\", \"\\\\;\\\\Longleftrightarrow\\\\;\");\ndefineMacro(\"\\\\implies\", \"\\\\;\\\\Longrightarrow\\\\;\");\ndefineMacro(\"\\\\impliedby\", \"\\\\;\\\\Longleftarrow\\\\;\");\n\n//////////////////////////////////////////////////////////////////////\n// mathtools.sty\n\n//\\providecommand\\ordinarycolon{:}\ndefineMacro(\"\\\\ordinarycolon\", \":\");\n//\\def\\vcentcolon{\\mathrel{\\mathop\\ordinarycolon}}\n//TODO(edemaine): Not yet centered. Fix via \\raisebox or #726\ndefineMacro(\"\\\\vcentcolon\", \"\\\\mathrel{\\\\mathop\\\\ordinarycolon}\");\n// \\providecommand*\\dblcolon{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}\ndefineMacro(\"\\\\dblcolon\", \"\\\\vcentcolon\\\\mathrel{\\\\mkern-.9mu}\\\\vcentcolon\");\n// \\providecommand*\\coloneqq{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}\ndefineMacro(\"\\\\coloneqq\", \"\\\\vcentcolon\\\\mathrel{\\\\mkern-1.2mu}=\");\n// \\providecommand*\\Coloneqq{\\dblcolon\\mathrel{\\mkern-1.2mu}=}\ndefineMacro(\"\\\\Coloneqq\", \"\\\\dblcolon\\\\mathrel{\\\\mkern-1.2mu}=\");\n// \\providecommand*\\coloneq{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}\ndefineMacro(\"\\\\coloneq\", \"\\\\vcentcolon\\\\mathrel{\\\\mkern-1.2mu}\\\\mathrel{-}\");\n// \\providecommand*\\Coloneq{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}\ndefineMacro(\"\\\\Coloneq\", \"\\\\dblcolon\\\\mathrel{\\\\mkern-1.2mu}\\\\mathrel{-}\");\n// \\providecommand*\\eqqcolon{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}\ndefineMacro(\"\\\\eqqcolon\", \"=\\\\mathrel{\\\\mkern-1.2mu}\\\\vcentcolon\");\n// \\providecommand*\\Eqqcolon{=\\mathrel{\\mkern-1.2mu}\\dblcolon}\ndefineMacro(\"\\\\Eqqcolon\", \"=\\\\mathrel{\\\\mkern-1.2mu}\\\\dblcolon\");\n// \\providecommand*\\eqcolon{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}\ndefineMacro(\"\\\\eqcolon\", \"\\\\mathrel{-}\\\\mathrel{\\\\mkern-1.2mu}\\\\vcentcolon\");\n// \\providecommand*\\Eqcolon{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}\ndefineMacro(\"\\\\Eqcolon\", \"\\\\mathrel{-}\\\\mathrel{\\\\mkern-1.2mu}\\\\dblcolon\");\n// \\providecommand*\\colonapprox{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}\ndefineMacro(\"\\\\colonapprox\", \"\\\\vcentcolon\\\\mathrel{\\\\mkern-1.2mu}\\\\approx\");\n// \\providecommand*\\Colonapprox{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}\ndefineMacro(\"\\\\Colonapprox\", \"\\\\dblcolon\\\\mathrel{\\\\mkern-1.2mu}\\\\approx\");\n// \\providecommand*\\colonsim{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}\ndefineMacro(\"\\\\colonsim\", \"\\\\vcentcolon\\\\mathrel{\\\\mkern-1.2mu}\\\\sim\");\n// \\providecommand*\\Colonsim{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}\ndefineMacro(\"\\\\Colonsim\", \"\\\\dblcolon\\\\mathrel{\\\\mkern-1.2mu}\\\\sim\");\n\n//////////////////////////////////////////////////////////////////////\n// colonequals.sty\n\n// Alternate names for mathtools's macros:\ndefineMacro(\"\\\\ratio\", \"\\\\vcentcolon\");\ndefineMacro(\"\\\\coloncolon\", \"\\\\dblcolon\");\ndefineMacro(\"\\\\colonequals\", \"\\\\coloneqq\");\ndefineMacro(\"\\\\coloncolonequals\", \"\\\\Coloneqq\");\ndefineMacro(\"\\\\equalscolon\", \"\\\\eqqcolon\");\ndefineMacro(\"\\\\equalscoloncolon\", \"\\\\Eqqcolon\");\ndefineMacro(\"\\\\colonminus\", \"\\\\coloneq\");\ndefineMacro(\"\\\\coloncolonminus\", \"\\\\Coloneq\");\ndefineMacro(\"\\\\minuscolon\", \"\\\\eqcolon\");\ndefineMacro(\"\\\\minuscoloncolon\", \"\\\\Eqcolon\");\n// \\colonapprox name is same in mathtools and colonequals.\ndefineMacro(\"\\\\coloncolonapprox\", \"\\\\Colonapprox\");\n// \\colonsim name is same in mathtools and colonequals.\ndefineMacro(\"\\\\coloncolonsim\", \"\\\\Colonsim\");\n\n// Additional macros, implemented by analogy with mathtools definitions:\ndefineMacro(\"\\\\simcolon\", \"\\\\sim\\\\mathrel{\\\\mkern-1.2mu}\\\\vcentcolon\");\ndefineMacro(\"\\\\simcoloncolon\", \"\\\\sim\\\\mathrel{\\\\mkern-1.2mu}\\\\dblcolon\");\ndefineMacro(\"\\\\approxcolon\", \"\\\\approx\\\\mathrel{\\\\mkern-1.2mu}\\\\vcentcolon\");\ndefineMacro(\"\\\\approxcoloncolon\", \"\\\\approx\\\\mathrel{\\\\mkern-1.2mu}\\\\dblcolon\");\n\n},{}],45:[function(require,module,exports){\n\"use strict\";\n\nvar _classCallCheck2 = require(\"babel-runtime/helpers/classCallCheck\");\n\nvar _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\nvar _createClass2 = require(\"babel-runtime/helpers/createClass\");\n\nvar _createClass3 = _interopRequireDefault(_createClass2);\n\nvar _utils = require(\"./utils\");\n\nvar _utils2 = _interopRequireDefault(_utils);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/**\n * This node represents a general purpose MathML node of any type. The\n * constructor requires the type of node to create (for example, `\"mo\"` or\n * `\"mspace\"`, corresponding to `<mo>` and `<mspace>` tags).\n */\nvar MathNode = function () {\n    function MathNode(type, children) {\n        (0, _classCallCheck3.default)(this, MathNode);\n\n        this.type = type;\n        this.attributes = {};\n        this.children = children || [];\n    }\n\n    /**\n     * Sets an attribute on a MathML node. MathML depends on attributes to convey a\n     * semantic content, so this is used heavily.\n     */\n\n\n    (0, _createClass3.default)(MathNode, [{\n        key: \"setAttribute\",\n        value: function setAttribute(name, value) {\n            this.attributes[name] = value;\n        }\n\n        /**\n         * Converts the math node into a MathML-namespaced DOM element.\n         */\n\n    }, {\n        key: \"toNode\",\n        value: function toNode() {\n            var node = document.createElementNS(\"http://www.w3.org/1998/Math/MathML\", this.type);\n\n            for (var attr in this.attributes) {\n                if (Object.prototype.hasOwnProperty.call(this.attributes, attr)) {\n                    node.setAttribute(attr, this.attributes[attr]);\n                }\n            }\n\n            for (var i = 0; i < this.children.length; i++) {\n                node.appendChild(this.children[i].toNode());\n            }\n\n            return node;\n        }\n\n        /**\n         * Converts the math node into an HTML markup string.\n         */\n\n    }, {\n        key: \"toMarkup\",\n        value: function toMarkup() {\n            var markup = \"<\" + this.type;\n\n            // Add the attributes\n            for (var attr in this.attributes) {\n                if (Object.prototype.hasOwnProperty.call(this.attributes, attr)) {\n                    markup += \" \" + attr + \"=\\\"\";\n                    markup += _utils2.default.escape(this.attributes[attr]);\n                    markup += \"\\\"\";\n                }\n            }\n\n            markup += \">\";\n\n            for (var i = 0; i < this.children.length; i++) {\n                markup += this.children[i].toMarkup();\n            }\n\n            markup += \"</\" + this.type + \">\";\n\n            return markup;\n        }\n    }]);\n    return MathNode;\n}();\n\n/**\n * This node represents a piece of text.\n */\n/**\n * These objects store data about MathML nodes. This is the MathML equivalent\n * of the types in domTree.js. Since MathML handles its own rendering, and\n * since we're mainly using MathML to improve accessibility, we don't manage\n * any of the styling state that the plain DOM nodes do.\n *\n * The `toNode` and `toMarkup` functions work simlarly to how they do in\n * domTree.js, creating namespaced DOM nodes and HTML text markup respectively.\n */\n\nvar TextNode = function () {\n    function TextNode(text) {\n        (0, _classCallCheck3.default)(this, TextNode);\n\n        this.text = text;\n    }\n\n    /**\n     * Converts the text node into a DOM text node.\n     */\n\n\n    (0, _createClass3.default)(TextNode, [{\n        key: \"toNode\",\n        value: function toNode() {\n            return document.createTextNode(this.text);\n        }\n\n        /**\n         * Converts the text node into HTML markup (which is just the text itself).\n         */\n\n    }, {\n        key: \"toMarkup\",\n        value: function toMarkup() {\n            return _utils2.default.escape(this.text);\n        }\n    }]);\n    return TextNode;\n}();\n\nmodule.exports = {\n    MathNode: MathNode,\n    TextNode: TextNode\n};\n\n},{\"./utils\":51,\"babel-runtime/helpers/classCallCheck\":4,\"babel-runtime/helpers/createClass\":5}],46:[function(require,module,exports){\n'use strict';\n\nvar _Parser = require('./Parser');\n\nvar _Parser2 = _interopRequireDefault(_Parser);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/**\n * Parses an expression using a Parser, then returns the parsed result.\n */\nvar parseTree = function parseTree(toParse, settings) {\n  if (!(typeof toParse === 'string' || toParse instanceof String)) {\n    throw new TypeError('KaTeX can only parse string typed expression');\n  }\n  var parser = new _Parser2.default(toParse, settings);\n\n  return parser.parse();\n}; /**\n    * Provides a single function for parsing an expression using a Parser\n    * TODO(emily): Remove this\n    */\n\nmodule.exports = parseTree;\n\n},{\"./Parser\":31}],47:[function(require,module,exports){\n\"use strict\";\n\n/**\n * This file provides support to buildMathML.js and buildHTML.js\n * for stretchy wide elements rendered from SVG files\n * and other CSS trickery.\n */\n\nvar buildCommon = require(\"./buildCommon\");\nvar mathMLTree = require(\"./mathMLTree\");\nvar utils = require(\"./utils\");\n\nvar stretchyCodePoint = {\n    widehat: \"^\",\n    widetilde: \"~\",\n    undertilde: \"~\",\n    overleftarrow: \"\\u2190\",\n    underleftarrow: \"\\u2190\",\n    xleftarrow: \"\\u2190\",\n    overrightarrow: \"\\u2192\",\n    underrightarrow: \"\\u2192\",\n    xrightarrow: \"\\u2192\",\n    underbrace: \"\\u23B5\",\n    overbrace: \"\\u23DE\",\n    overleftrightarrow: \"\\u2194\",\n    underleftrightarrow: \"\\u2194\",\n    xleftrightarrow: \"\\u2194\",\n    Overrightarrow: \"\\u21D2\",\n    xRightarrow: \"\\u21D2\",\n    overleftharpoon: \"\\u21BC\",\n    xleftharpoonup: \"\\u21BC\",\n    overrightharpoon: \"\\u21C0\",\n    xrightharpoonup: \"\\u21C0\",\n    xLeftarrow: \"\\u21D0\",\n    xLeftrightarrow: \"\\u21D4\",\n    xhookleftarrow: \"\\u21A9\",\n    xhookrightarrow: \"\\u21AA\",\n    xmapsto: \"\\u21A6\",\n    xrightharpoondown: \"\\u21C1\",\n    xleftharpoondown: \"\\u21BD\",\n    xrightleftharpoons: \"\\u21CC\",\n    xleftrightharpoons: \"\\u21CB\",\n    xtwoheadleftarrow: \"\\u219E\",\n    xtwoheadrightarrow: \"\\u21A0\",\n    xLongequal: \"=\",\n    xtofrom: \"\\u21C4\"\n};\n\nvar mathMLnode = function mathMLnode(label) {\n    var node = new mathMLTree.MathNode(\"mo\", [new mathMLTree.TextNode(stretchyCodePoint[label.substr(1)])]);\n    node.setAttribute(\"stretchy\", \"true\");\n    return node;\n};\n\n// In the katexImagesData object just below, the dimensions all\n// correspond to path geometry inside the relevant SVG.\n// For example, \\rightarrow uses the same arrowhead as glyph U+2192\n// from the KaTeX Main font. The scaling factor is 1000.\n// That is, inside the font, that arrowhead is 522 units tall, which\n// corresponds to 0.522 em inside the document.\n// And for extensible arrows, we split that distance around the math axis.\n\nvar katexImagesData = {\n    // height, depth, imageName, minWidth\n    overleftarrow: [0.522, 0, \"leftarrow\", 0.5],\n    underleftarrow: [0.522, 0, \"leftarrow\", 0.5],\n    xleftarrow: [0.261, 0.261, \"leftarrow\", 0.783],\n    overrightarrow: [0.522, 0, \"rightarrow\", 0.5],\n    underrightarrow: [0.522, 0, \"rightarrow\", 0.5],\n    xrightarrow: [0.261, 0.261, \"rightarrow\", 0.783],\n    overbrace: [0.548, 0, \"overbrace\", 1.6],\n    underbrace: [0.548, 0, \"underbrace\", 1.6],\n    overleftrightarrow: [0.522, 0, \"leftrightarrow\", 0.5],\n    underleftrightarrow: [0.522, 0, \"leftrightarrow\", 0.5],\n    xleftrightarrow: [0.261, 0.261, \"leftrightarrow\", 0.783],\n    Overrightarrow: [0.56, 0, \"doublerightarrow\", 0.5],\n    xLeftarrow: [0.28, 0.28, \"doubleleftarrow\", 0.783],\n    xRightarrow: [0.28, 0.28, \"doublerightarrow\", 0.783],\n    xLeftrightarrow: [0.28, 0.28, \"doubleleftrightarrow\", 0.955],\n    overleftharpoon: [0.522, 0, \"leftharpoon\", 0.5],\n    overrightharpoon: [0.522, 0, \"rightharpoon\", 0.5],\n    xleftharpoonup: [0.261, 0.261, \"leftharpoon\", 0.783],\n    xrightharpoonup: [0.261, 0.261, \"rightharpoon\", 0.783],\n    xhookleftarrow: [0.261, 0.261, \"hookleftarrow\", 0.87],\n    xhookrightarrow: [0.261, 0.261, \"hookrightarrow\", 0.87],\n    overlinesegment: [0.414, 0, \"linesegment\", 0.5],\n    underlinesegment: [0.414, 0, \"linesegment\", 0.5],\n    xmapsto: [0.261, 0.261, \"mapsto\", 0.783],\n    xrightharpoondown: [0.261, 0.261, \"rightharpoondown\", 0.783],\n    xleftharpoondown: [0.261, 0.261, \"leftharpoondown\", 0.783],\n    xrightleftharpoons: [0.358, 0.358, \"rightleftharpoons\", 0.716],\n    xleftrightharpoons: [0.358, 0.358, \"leftrightharpoons\", 0.716],\n    overgroup: [0.342, 0, \"overgroup\", 0.87],\n    undergroup: [0.342, 0, \"undergroup\", 0.87],\n    xtwoheadleftarrow: [0.167, 0.167, \"twoheadleftarrow\", 0.86],\n    xtwoheadrightarrow: [0.167, 0.167, \"twoheadrightarrow\", 0.86],\n    xLongequal: [0.167, 0.167, \"longequal\", 0.5],\n    xtofrom: [0.264, 0.264, \"tofrom\", 0.86]\n};\n\n// Many of the KaTeX SVG images have been adapted from glyphs in KaTeX fonts.\n// Copyright (c) 2009-2010, Design Science, Inc. (<www.mathjax.org>)\n// Copyright (c) 2014-2017 Khan Academy (<www.khanacademy.org>)\n// Licensed under the SIL Open Font License, Version 1.1.\n// See \\nhttp://scripts.sil.org/OFL\n\n// Nested SVGs\n//    Many of the KaTeX SVG images contain a nested SVG. This is done to\n//    achieve a stretchy image while avoiding distortion of arrowheads or\n//    brace corners.\n\n//    The inner SVG typically contains a very long (400 em) arrow.\n\n//    The outer SVG acts like a window that exposes only part of the inner SVG.\n//    The outer SVG will grow or shrink to match the dimensions set by CSS.\n\n//    The inner SVG always has a longer, thinner aspect ratio than the outer\n//    SVG. After the inner SVG fills 100% of the height of the outer SVG,\n//    there is a long arrow shaft left over. That left-over shaft is not shown.\n//    Instead, it is sliced off because the inner SVG is set to\n//    \"preserveAspectRatio='... slice'\".\n\n//    Thus, the reader sees an arrow that matches the subject matter width\n//    without distortion.\n\n//    Some functions, such as \\cancel, need to vary their aspect ratio. These\n//    functions do not get the nested SVG treatment.\n\n// Second Brush Stroke\n//    Low resolution monitors struggle to display images in fine detail.\n//    So browsers apply anti-aliasing. A long straight arrow shaft therefore\n//    will sometimes appear as if it has a blurred edge.\n\n//    To mitigate this, these SVG files contain a second \"brush-stroke\" on the\n//    arrow shafts. That is, a second long thin rectangular SVG path has been\n//    written directly on top of each arrow shaft. This reinforcement causes\n//    some of the screen pixels to display as black instead of the anti-aliased\n//    gray pixel that a  single path would generate. So we get arrow shafts\n//    whose edges appear to be sharper.\n\nvar svgPath = {\n    doubleleftarrow: \"<path d='M262 157\\nl10-10c34-36 62.7-77 86-123 3.3-8 5-13.3 5-16 0-5.3-6.7-8-20-8-7.3\\n 0-12.2.5-14.5 1.5-2.3 1-4.8 4.5-7.5 10.5-49.3 97.3-121.7 169.3-217 216-28\\n 14-57.3 25-88 33-6.7 2-11 3.8-13 5.5-2 1.7-3 4.2-3 7.5s1 5.8 3 7.5\\nc2 1.7 6.3 3.5 13 5.5 68 17.3 128.2 47.8 180.5 91.5 52.3 43.7 93.8 96.2 124.5\\n 157.5 9.3 8 15.3 12.3 18 13h6c12-.7 18-4 18-10 0-2-1.7-7-5-15-23.3-46-52-87\\n-86-123l-10-10h399738v-40H218c328 0 0 0 0 0l-10-8c-26.7-20-65.7-43-117-69 2.7\\n-2 6-3.7 10-5 36.7-16 72.3-37.3 107-64l10-8h399782v-40z\\nm8 0v40h399730v-40zm0 194v40h399730v-40z'/>\",\n\n    doublerightarrow: \"<path d='M399738 392l\\n-10 10c-34 36-62.7 77-86 123-3.3 8-5 13.3-5 16 0 5.3 6.7 8 20 8 7.3 0 12.2-.5\\n 14.5-1.5 2.3-1 4.8-4.5 7.5-10.5 49.3-97.3 121.7-169.3 217-216 28-14 57.3-25 88\\n-33 6.7-2 11-3.8 13-5.5 2-1.7 3-4.2 3-7.5s-1-5.8-3-7.5c-2-1.7-6.3-3.5-13-5.5-68\\n-17.3-128.2-47.8-180.5-91.5-52.3-43.7-93.8-96.2-124.5-157.5-9.3-8-15.3-12.3-18\\n-13h-6c-12 .7-18 4-18 10 0 2 1.7 7 5 15 23.3 46 52 87 86 123l10 10H0v40h399782\\nc-328 0 0 0 0 0l10 8c26.7 20 65.7 43 117 69-2.7 2-6 3.7-10 5-36.7 16-72.3 37.3\\n-107 64l-10 8H0v40zM0 157v40h399730v-40zm0 194v40h399730v-40z'/>\",\n\n    leftarrow: \"<path d='M400000 241H110l3-3c68.7-52.7 113.7-120\\n 135-202 4-14.7 6-23 6-25 0-7.3-7-11-21-11-8 0-13.2.8-15.5 2.5-2.3 1.7-4.2 5.8\\n-5.5 12.5-1.3 4.7-2.7 10.3-4 17-12 48.7-34.8 92-68.5 130S65.3 228.3 18 247\\nc-10 4-16 7.7-18 11 0 8.7 6 14.3 18 17 47.3 18.7 87.8 47 121.5 85S196 441.3 208\\n 490c.7 2 1.3 5 2 9s1.2 6.7 1.5 8c.3 1.3 1 3.3 2 6s2.2 4.5 3.5 5.5c1.3 1 3.3\\n 1.8 6 2.5s6 1 10 1c14 0 21-3.7 21-11 0-2-2-10.3-6-25-20-79.3-65-146.7-135-202\\n l-3-3h399890zM100 241v40h399900v-40z'/>\",\n\n    rightarrow: \"<path d='M0 241v40h399891c-47.3 35.3-84 78-110 128\\n-16.7 32-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20\\n 11 8 0 13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7\\n 39-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85\\n-40.5-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5\\n-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67\\n 151.7 139 205zm0 0v40h399900v-40z'/>\"\n};\n\nvar innerSVG = {\n    // Since bcancel's SVG is inline and it omits the viewBox attribute,\n    // it's stroke-width will not vary with span area.\n    bcancel: \"<line x1='0' y1='0' x2='100%' y2='100%' stroke-width='0.046em'/>\",\n\n    cancel: \"<line x1='0' y1='100%' x2='100%' y2='0' stroke-width='0.046em'/>\",\n\n    // The doubleleftarrow geometry is from glyph U+21D0 in the font KaTeX Main\n    doubleleftarrow: \"><svg viewBox='0 0 400000 549'\\npreserveAspectRatio='xMinYMin slice'>\" + svgPath[\"doubleleftarrow\"] + \"</svg>\",\n\n    // doubleleftrightarrow is from glyph U+21D4 in font KaTeX Main\n    doubleleftrightarrow: \"><svg width='50.1%' viewBox='0 0 400000 549'\\npreserveAspectRatio='xMinYMin slice'>\" + svgPath[\"doubleleftarrow\"] + \"</svg>\\n<svg x='50%' width='50%' viewBox='0 0 400000 549' preserveAspectRatio='xMaxYMin\\n slice'>\" + svgPath[\"doublerightarrow\"] + \"</svg>\",\n\n    // doublerightarrow is from glyph U+21D2 in font KaTeX Main\n    doublerightarrow: \"><svg viewBox='0 0 400000 549'\\npreserveAspectRatio='xMaxYMin slice'>\" + svgPath[\"doublerightarrow\"] + \"</svg>\",\n\n    // hookleftarrow is from glyph U+21A9 in font KaTeX Main\n    hookleftarrow: \"><svg width='50.1%' viewBox='0 0 400000 522'\\npreserveAspectRatio='xMinYMin slice'>\" + svgPath[\"leftarrow\"] + \"</svg>\\n<svg x='50%' width='50%' viewBox='0 0 400000 522' preserveAspectRatio='xMaxYMin\\n slice'><path d='M399859 241c-764 0 0 0 0 0 40-3.3 68.7\\n -15.7 86-37 10-12 15-25.3 15-40 0-22.7-9.8-40.7-29.5-54-19.7-13.3-43.5-21-71.5\\n -23-17.3-1.3-26-8-26-20 0-13.3 8.7-20 26-20 38 0 71 11.2 99 33.5 0 0 7 5.6 21\\n 16.7 14 11.2 21 33.5 21 66.8s-14 61.2-42 83.5c-28 22.3-61 33.5-99 33.5L0 241z\\n M0 281v-40h399859v40z'/></svg>\",\n\n    // hookrightarrow is from glyph U+21AA in font KaTeX Main\n    hookrightarrow: \"><svg width='50.1%' viewBox='0 0 400000 522'\\npreserveAspectRatio='xMinYMin slice'><path d='M400000 281\\nH103s-33-11.2-61-33.5S0 197.3 0 164s14.2-61.2 42.5-83.5C70.8 58.2 104 47 142 47\\nc16.7 0 25 6.7 25 20 0 12-8.7 18.7-26 20-40 3.3-68.7 15.7-86 37-10 12-15 25.3\\n-15 40 0 22.7 9.8 40.7 29.5 54 19.7 13.3 43.5 21 71.5 23h399859zM103 281v-40\\nh399897v40z'/></svg><svg x='50%' width='50%' viewBox='0 0 400000 522'\\npreserveAspectRatio='xMaxYMin slice'>\" + svgPath[\"rightarrow\"] + \"</svg>\",\n\n    // leftarrow is from glyph U+2190 in font KaTeX Main\n    leftarrow: \"><svg viewBox='0 0 400000 522' preserveAspectRatio='xMinYMin\\n slice'>\" + svgPath[\"leftarrow\"] + \"</svg>\",\n\n    // leftharpoon is from glyph U+21BD in font KaTeX Main\n    leftharpoon: \"><svg viewBox='0 0 400000 522' preserveAspectRatio='xMinYMin\\n slice'><path d='M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3\\n-3.3 10.2-9.5 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5\\n-18.3 3-21-1.3-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7\\n-196 228-6.7 4.7-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40z'/></svg>\",\n\n    // leftharpoondown is from glyph U+21BD in font KaTeX Main\n    leftharpoondown: \"><svg viewBox='0 0 400000 522'\\npreserveAspectRatio='xMinYMin slice'><path d=\\\"M7 241c-4 4-6.333 8.667-7 14\\n 0 5.333.667 9 2 11s5.333 5.333 12 10c90.667 54 156 130 196 228 3.333 10.667\\n 6.333 16.333 9 17 2 .667 5 1 9 1h5c10.667 0 16.667-2 18-6 2-2.667 1-9.667-3-21\\n -32-87.333-82.667-157.667-152-211l-3-3h399907v-40z\\nM93 281 H400000 v-40L7 241z\\\"/></svg>\",\n\n    // leftrightarrow is from glyph U+2194 in font KaTeX Main\n    leftrightarrow: \"><svg width='50.1%' viewBox='0 0 400000 522'\\npreserveAspectRatio='xMinYMin slice'>\" + svgPath[\"leftarrow\"] + \"</svg>\\n<svg x='50%' width='50%' viewBox='0 0 400000 522' preserveAspectRatio='xMaxYMin\\n slice'>\" + svgPath[\"rightarrow\"] + \"</svg>\",\n\n    // leftrightharpoons is from glyphs U+21BC/21B1 in font KaTeX Main\n    leftrightharpoons: \"><svg width='50.1%' viewBox='0 0 400000 716'\\npreserveAspectRatio='xMinYMin slice'><path d='M0 267c.7 5.3\\n 3 10 7 14h399993v-40H93c3.3-3.3 10.2-9.5 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52\\n 88-110.3 112-175 4-11.3 5-18.3 3-21-1.3-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8\\n 16c-42 98.7-107.3 174.7-196 228-6.7 4.7-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26\\nv40h399900v-40zM0 435v40h400000v-40zm0 0v40h400000v-40z'/></svg>\\n<svg x='50%' width='50%' viewBox='0 0 400000 716' preserveAspectRatio='xMaxYMin\\n slice'><path d='M399747 705c0 7.3 6.7 11 20 11 8 0 13-.8\\n 15-2.5s4.7-6.8 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3\\n 8.5-5.8 9.5-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3\\n-64.7 57-92 95-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 435v40h399900v-40z\\nm0-194v40h400000v-40zm0 0v40h400000v-40z'/></svg>\",\n\n    linesegment: \"><svg width='50.1%' viewBox='0 0 400000 414'\\npreserveAspectRatio='xMinYMin slice'><path d='M40 187V40H0\\nv334h40V227h399960v-40zm0 0V40H0v334h40V227h399960v-40z'/></svg><svg x='50%'\\nwidth='50%' viewBox='0 0 400000 414' preserveAspectRatio='xMaxYMin slice'>\\n<path d='M0 187v40h399960v147h40V40h-40v147zm0\\n 0v40h399960v147h40V40h-40v147z'/></svg>\",\n\n    longequal: \" viewBox='0 0 100 334' preserveAspectRatio='none'>\\n<path d='M0 50h100v40H0zm0 194h100v40H0z'/>\",\n\n    // mapsto is from glyph U+21A6 in font KaTeX Main\n    mapsto: \"><svg width='50.1%' viewBox='0 0 400000 522'\\npreserveAspectRatio='xMinYMin slice'><path d='M40 241c740\\n 0 0 0 0 0v-75c0-40.7-.2-64.3-.5-71-.3-6.7-2.2-11.7-5.5-15-4-4-8.7-6-14-6-5.3 0\\n-10 2-14 6C2.7 83.3.8 91.3.5 104 .2 116.7 0 169 0 261c0 114 .7 172.3 2 175 4 8\\n 10 12 18 12 5.3 0 10-2 14-6 3.3-3.3 5.2-8.3 5.5-15 .3-6.7.5-30.3.5-71v-75\\nh399960zm0 0v40h399960v-40z'/></svg><svg x='50%' width='50%' viewBox='0 0\\n 400000 522' preserveAspectRatio='xMaxYMin slice'>\" + svgPath[\"rightarrow\"] + \"</svg>\",\n\n    // overbrace is from glyphs U+23A9/23A8/23A7 in font KaTeX_Size4-Regular\n    overbrace: \"><svg width='25.5%' viewBox='0 0 400000 548'\\npreserveAspectRatio='xMinYMin slice'><path d='M6 548l-6-6\\nv-35l6-11c56-104 135.3-181.3 238-232 57.3-28.7 117-45 179-50h399577v120H403\\nc-43.3 7-81 15-113 26-100.7 33-179.7 91-237 174-2.7 5-6 9-10 13-.7 1-7.3 1-20 1\\nH6z'/></svg><svg x='25%' width='50%' viewBox='0 0 400000 548'\\npreserveAspectRatio='xMidYMin slice'><path d='M200428 334\\nc-100.7-8.3-195.3-44-280-108-55.3-42-101.7-93-139-153l-9-14c-2.7 4-5.7 8.7-9 14\\n-53.3 86.7-123.7 153-211 199-66.7 36-137.3 56.3-212 62H0V214h199568c178.3-11.7\\n 311.7-78.3 403-201 6-8 9.7-12 11-12 .7-.7 6.7-1 18-1s17.3.3 18 1c1.3 0 5 4 11\\n 12 44.7 59.3 101.3 106.3 170 141s145.3 54.3 229 60h199572v120z'/></svg>\\n<svg x='74.9%' width='24.1%' viewBox='0 0 400000 548'\\npreserveAspectRatio='xMaxYMin slice'><path d='M400000 542l\\n-6 6h-17c-12.7 0-19.3-.3-20-1-4-4-7.3-8.3-10-13-35.3-51.3-80.8-93.8-136.5-127.5\\ns-117.2-55.8-184.5-66.5c-.7 0-2-.3-4-1-18.7-2.7-76-4.3-172-5H0V214h399571l6 1\\nc124.7 8 235 61.7 331 161 31.3 33.3 59.7 72.7 85 118l7 13v35z'/></svg>\",\n\n    // overgroup is from the MnSymbol package (public domain)\n    overgroup: \"><svg width='50.1%' viewBox='0 0 400000 342'\\npreserveAspectRatio='xMinYMin slice'><path d='M400000 80\\nH435C64 80 168.3 229.4 21 260c-5.9 1.2-18 0-18 0-2 0-3-1-3-3v-38C76 61 257 0\\n 435 0h399565z'/></svg><svg x='50%' width='50%' viewBox='0 0 400000 342'\\npreserveAspectRatio='xMaxYMin slice'><path d='M0 80h399565\\nc371 0 266.7 149.4 414 180 5.9 1.2 18 0 18 0 2 0 3-1 3-3v-38\\nc-76-158-257-219-435-219H0z'/></svg>\",\n\n    // rightarrow is from glyph U+2192 in font KaTeX Main\n    rightarrow: \"><svg viewBox='0 0 400000 522' preserveAspectRatio='xMaxYMin\\n slice'>\" + svgPath[\"rightarrow\"] + \"</svg>\",\n\n    // rightharpoon is from glyph U+21C0 in font KaTeX Main\n    rightharpoon: \"><svg viewBox='0 0 400000 522' preserveAspectRatio='xMaxYMin\\n slice'><path d='M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3\\n-3.7-15.3-11-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2\\n-10.7 0-16.7 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58\\n 69.2 92 94.5zm0 0v40h399900v-40z'/></svg>\",\n\n    // rightharpoondown is from glyph U+21C1 in font KaTeX Main\n    rightharpoondown: \"><svg viewBox='0 0 400000 522'\\npreserveAspectRatio='xMaxYMin slice'><path d='M399747 511\\nc0 7.3 6.7 11 20 11 8 0 13-.8 15-2.5s4.7-6.8 8-15.5c40-94 99.3-166.3 178-217\\n 13.3-8 20.3-12.3 21-13 5.3-3.3 8.5-5.8 9.5-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3\\n -10.3-7-15H0v40h399908c-34 25.3-64.7 57-92 95-27.3 38-48.7 77.7-64 119-3.3\\n 8.7-5 14-5 16zM0 241v40h399900v-40z'/></svg>\",\n\n    // rightleftharpoons is from glyph U+21CC in font KaTeX Main\n    rightleftharpoons: \"><svg width='50%' viewBox='0 0 400000 716'\\npreserveAspectRatio='xMinYMin slice'><path d='M7 435c-4 4\\n-6.3 8.7-7 14 0 5.3.7 9 2 11s5.3 5.3 12 10c90.7 54 156 130 196 228 3.3 10.7 6.3\\n 16.3 9 17 2 .7 5 1 9 1h5c10.7 0 16.7-2 18-6 2-2.7 1-9.7-3-21-32-87.3-82.7\\n-157.7-152-211l-3-3h399907v-40H7zm93 0v40h399900v-40zM0 241v40h399900v-40z\\nm0 0v40h399900v-40z'/></svg><svg x='50%' width='50%' viewBox='0 0 400000 716'\\npreserveAspectRatio='xMaxYMin slice'><path d='M0 241v40\\nh399993c4.7-4.7 7-9.3 7-14 0-9.3-3.7-15.3-11-18-92.7-56.7-159-133.7-199-231-3.3\\n-9.3-6-14.7-8-16-2-1.3-7-2-15-2-10.7 0-16.7 2-18 6-2 2.7-1 9.7 3 21 15.3 42\\n 36.7 81.8 64 119.5 27.3 37.7 58 69.2 92 94.5zm0 0v40h399900v-40z\\n m100 194v40h399900v-40zm0 0v40h399900v-40z'/></svg>\",\n\n    // tilde1 is a modified version of a glyph from the MnSymbol package\n    tilde1: \" viewBox='0 0 600 260' preserveAspectRatio='none'>\\n<path d='M200 55.538c-77 0-168 73.953-177 73.953-3 0-7\\n-2.175-9-5.437L2 97c-1-2-2-4-2-6 0-4 2-7 5-9l20-12C116 12 171 0 207 0c86 0\\n 114 68 191 68 78 0 168-68 177-68 4 0 7 2 9 5l12 19c1 2.175 2 4.35 2 6.525 0\\n 4.35-2 7.613-5 9.788l-19 13.05c-92 63.077-116.937 75.308-183 76.128\\n-68.267.847-113-73.952-191-73.952z'/>\",\n\n    // Ditto tilde2, tilde3, and tilde 4\n    tilde2: \" viewBox='0 0 1033 286' preserveAspectRatio='none'>\\n<path d='M344 55.266c-142 0-300.638 81.316-311.5 86.418\\n-8.01 3.762-22.5 10.91-23.5 5.562L1 120c-1-2-1-3-1-4 0-5 3-9 8-10l18.4-9C160.9\\n 31.9 283 0 358 0c148 0 188 122 331 122s314-97 326-97c4 0 8 2 10 7l7 21.114\\nc1 2.14 1 3.21 1 4.28 0 5.347-3 9.626-7 10.696l-22.3 12.622C852.6 158.372 751\\n 181.476 676 181.476c-149 0-189-126.21-332-126.21z'/>\",\n\n    tilde3: \" viewBox='0 0 2339 306' preserveAspectRatio='none'>\\n<path d='M786 59C457 59 32 175.242 13 175.242c-6 0-10-3.457\\n-11-10.37L.15 138c-1-7 3-12 10-13l19.2-6.4C378.4 40.7 634.3 0 804.3 0c337 0\\n 411.8 157 746.8 157 328 0 754-112 773-112 5 0 10 3 11 9l1 14.075c1 8.066-.697\\n 16.595-6.697 17.492l-21.052 7.31c-367.9 98.146-609.15 122.696-778.15 122.696\\n -338 0-409-156.573-744-156.573z'/>\",\n\n    tilde4: \" viewBox='0 0 2340 312' preserveAspectRatio='none'>\\n<path d='M786 58C457 58 32 177.487 13 177.487c-6 0-10-3.345\\n-11-10.035L.15 143c-1-7 3-12 10-13l22-6.7C381.2 35 637.15 0 807.15 0c337 0 409\\n 177 744 177 328 0 754-127 773-127 5 0 10 3 11 9l1 14.794c1 7.805-3 13.38-9\\n 14.495l-20.7 5.574c-366.85 99.79-607.3 139.372-776.3 139.372-338 0-409\\n -175.236-744-175.236z'/>\",\n\n    // tofrom is from glyph U+21C4 in font KaTeX AMS Regular\n    tofrom: \"><svg width='50.1%' viewBox='0 0 400000 528'\\npreserveAspectRatio='xMinYMin slice'><path d='M0 147h400000\\nv40H0zm0 214c68 40 115.7 95.7 143 167h22c15.3 0 23-.3 23-1 0-1.3-5.3-13.7-16-37\\n-18-35.3-41.3-69-70-101l-7-8h399905v-40H95l7-8c28.7-32 52-65.7 70-101 10.7-23.3\\n 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 265.3 68 321 0 361zm0-174v-40h399900\\nv40zm100 154v40h399900v-40z'/></svg><svg x='50%' width='50%' viewBox='0 0\\n 400000 528' preserveAspectRatio='xMaxYMin slice'><path\\nd='M400000 167c-70.7-42-118-97.7-142-167h-23c-15.3 0-23 .3-23 1 0 1.3 5.3 13.7\\n 16 37 18 35.3 41.3 69 70 101l7 8H0v40h399905l-7 8c-28.7 32-52 65.7-70 101-10.7\\n 23.3-16 35.7-16 37 0 .7 7.7 1 23 1h23c24-69.3 71.3-125 142-167z\\n M100 147v40h399900v-40zM0 341v40h399900v-40z'/></svg>\",\n\n    // twoheadleftarrow is from glyph U+219E in font KaTeX AMS Regular\n    twoheadleftarrow: \"><svg viewBox='0 0 400000 334'\\npreserveAspectRatio='xMinYMin slice'><path d='M0 167c68 40\\n 115.7 95.7 143 167h22c15.3 0 23-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69\\n-70-101l-7-8h125l9 7c50.7 39.3 85 86 103 140h46c0-4.7-6.3-18.7-19-42-18-35.3\\n-40-67.3-66-96l-9-9h399716v-40H284l9-9c26-28.7 48-60.7 66-96 12.7-23.333 19\\n-37.333 19-42h-46c-18 54-52.3 100.7-103 140l-9 7H95l7-8c28.7-32 52-65.7 70-101\\n 10.7-23.333 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 71.3 68 127 0 167z'/>\\n</svg>\",\n\n    // twoheadrightarrow is from glyph U+21A0 in font KaTeX AMS Regular\n    twoheadrightarrow: \"><svg viewBox='0 0 400000 334'\\npreserveAspectRatio='xMaxYMin slice'><path d='M400000 167\\nc-68-40-115.7-95.7-143-167h-22c-15.3 0-23 .3-23 1 0 1.3 5.3 13.7 16 37 18 35.3\\n 41.3 69 70 101l7 8h-125l-9-7c-50.7-39.3-85-86-103-140h-46c0 4.7 6.3 18.7 19 42\\n 18 35.3 40 67.3 66 96l9 9H0v40h399716l-9 9c-26 28.7-48 60.7-66 96-12.7 23.333\\n-19 37.333-19 42h46c18-54 52.3-100.7 103-140l9-7h125l-7 8c-28.7 32-52 65.7-70\\n 101-10.7 23.333-16 35.7-16 37 0 .7 7.7 1 23 1h22c27.3-71.3 75-127 143-167z'/>\\n</svg>\",\n\n    // underbrace is from glyphs U+23A9/23A8/23A7 in font KaTeX_Size4-Regular\n    underbrace: \"><svg width='25.1%' viewBox='0 0 400000 548'\\npreserveAspectRatio='xMinYMin slice'><path d='M0 6l6-6h17\\nc12.688 0 19.313.3 20 1 4 4 7.313 8.3 10 13 35.313 51.3 80.813 93.8 136.5 127.5\\n 55.688 33.7 117.188 55.8 184.5 66.5.688 0 2 .3 4 1 18.688 2.7 76 4.3 172 5\\nh399450v120H429l-6-1c-124.688-8-235-61.7-331-161C60.687 138.7 32.312 99.3 7 54\\nL0 41V6z'/></svg><svg x='25%' width='50%' viewBox='0 0 400000 548'\\npreserveAspectRatio='xMidYMin slice'><path d='M199572 214\\nc100.7 8.3 195.3 44 280 108 55.3 42 101.7 93 139 153l9 14c2.7-4 5.7-8.7 9-14\\n 53.3-86.7 123.7-153 211-199 66.7-36 137.3-56.3 212-62h199568v120H200432c-178.3\\n 11.7-311.7 78.3-403 201-6 8-9.7 12-11 12-.7.7-6.7 1-18 1s-17.3-.3-18-1c-1.3 0\\n-5-4-11-12-44.7-59.3-101.3-106.3-170-141s-145.3-54.3-229-60H0V214z'/></svg>\\n<svg x='74.9%' width='25.1%' viewBox='0 0 400000 548'\\npreserveAspectRatio='xMaxYMin slice'><path d='M399994 0l6 6\\nv35l-6 11c-56 104-135.3 181.3-238 232-57.3 28.7-117 45-179 50H-300V214h399897\\nc43.3-7 81-15 113-26 100.7-33 179.7-91 237-174 2.7-5 6-9 10-13 .7-1 7.3-1 20-1\\nh17z'/></svg>\",\n\n    // undergroup is from the MnSymbol package (public domain)\n    undergroup: \"><svg width='50.1%' viewBox='0 0 400000 342'\\npreserveAspectRatio='xMinYMin slice'><path d='M400000 262\\nH435C64 262 168.3 112.6 21 82c-5.9-1.2-18 0-18 0-2 0-3 1-3 3v38c76 158 257 219\\n 435 219h399565z'/></svg><svg x='50%' width='50%' viewBox='0 0 400000 342'\\npreserveAspectRatio='xMaxYMin slice'><path d='M0 262h399565\\nc371 0 266.7-149.4 414-180 5.9-1.2 18 0 18 0 2 0 3 1 3 3v38c-76 158-257\\n 219-435 219H0z'/></svg>\",\n\n    // widehat1 is a modified version of a glyph from the MnSymbol package\n    widehat1: \" viewBox='0 0 1062 239' preserveAspectRatio='none'>\\n<path d='M529 0h5l519 115c5 1 9 5 9 10 0 1-1 2-1 3l-4 22\\nc-1 5-5 9-11 9h-2L532 67 19 159h-2c-5 0-9-4-11-9l-5-22c-1-6 2-12 8-13z'/>\",\n\n    // Ditto widehat2, widehat3, and widehat4\n    widehat2: \" viewBox='0 0 2364 300' preserveAspectRatio='none'>\\n<path d='M1181 0h2l1171 176c6 0 10 5 10 11l-2 23c-1 6-5 10\\n-11 10h-1L1182 67 15 220h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z'/>\",\n\n    widehat3: \" viewBox='0 0 2364 360' preserveAspectRatio='none'>\\n<path d='M1181 0h2l1171 236c6 0 10 5 10 11l-2 23c-1 6-5 10\\n-11 10h-1L1182 67 15 280h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z'/>\",\n\n    widehat4: \" viewBox='0 0 2364 420' preserveAspectRatio='none'>\\n<path d='M1181 0h2l1171 296c6 0 10 5 10 11l-2 23c-1 6-5 10\\n-11 10h-1L1182 67 15 340h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z'/>\",\n\n    xcancel: \"<line x1='0' y1='0' x2='100%' y2='100%' stroke-width='0.046em'/>\\n<line x1='0' y1='100%' x2='100%' y2='0' stroke-width='0.046em'/>\"\n};\n\nvar svgSpan = function svgSpan(group, options) {\n    // Create a span with inline SVG for the element.\n    var label = group.value.label.substr(1);\n    var height = 0;\n    var depth = 0;\n    var imageName = \"\";\n    var minWidth = 0;\n\n    if (utils.contains([\"widehat\", \"widetilde\", \"undertilde\"], label)) {\n        // There are four SVG images available for each function.\n        // Choose a taller image when there are more characters.\n        var numChars = group.value.value.length;\n        if (numChars > 5) {\n            height = 0.312;\n            imageName = (label === \"widehat\" ? \"widehat\" : \"tilde\") + \"4\";\n        } else {\n            var imgIndex = [1, 1, 2, 2, 3, 3][numChars];\n            if (label === \"widehat\") {\n                height = [0, 0.24, 0.30, 0.30, 0.36, 0.36][numChars];\n                imageName = \"widehat\" + imgIndex;\n            } else {\n                height = [0, 0.26, 0.30, 0.30, 0.34, 0.34][numChars];\n                imageName = \"tilde\" + imgIndex;\n            }\n        }\n    } else {\n        var imgData = katexImagesData[label];\n        height = imgData[0];\n        depth = imgData[1];\n        imageName = imgData[2];\n        minWidth = imgData[3];\n    }\n\n    var span = buildCommon.makeSpan([], [], options);\n    span.height = height;\n    span.depth = depth;\n    var totalHeight = height + depth;\n    span.style.height = totalHeight + \"em\";\n    if (minWidth > 0) {\n        span.style.minWidth = minWidth + \"em\";\n    }\n\n    span.innerHTML = \"<svg width='100%' height='\" + totalHeight + \"em'\" + innerSVG[imageName] + \"</svg>\";\n\n    return span;\n};\n\nvar encloseSpan = function encloseSpan(inner, label, pad, options) {\n    // Return an image span for \\cancel, \\bcancel, \\xcancel, or \\fbox\n    var img = void 0;\n    var totalHeight = inner.height + inner.depth + 2 * pad;\n\n    if (label === \"fbox\") {\n        img = buildCommon.makeSpan([\"stretchy\", label], [], options);\n        if (options.color) {\n            img.style.borderColor = options.getColor();\n        }\n    } else {\n        img = buildCommon.makeSpan([], [], options);\n        img.innerHTML = \"<svg width='100%' height='\" + totalHeight + \"em'>\" + innerSVG[label] + \"</svg>\";\n    }\n\n    img.height = totalHeight;\n    img.style.height = totalHeight + \"em\";\n\n    return img;\n};\n\nmodule.exports = {\n    encloseSpan: encloseSpan,\n    mathMLnode: mathMLnode,\n    svgSpan: svgSpan\n};\n\n},{\"./buildCommon\":34,\"./mathMLTree\":45,\"./utils\":51}],48:[function(require,module,exports){\n\"use strict\";\n\n/**\n * This file holds a list of all no-argument functions and single-character\n * symbols (like 'a' or ';').\n *\n * For each of the symbols, there are three properties they can have:\n * - font (required): the font to be used for this symbol. Either \"main\" (the\n     normal font), or \"ams\" (the ams fonts).\n * - group (required): the ParseNode group type the symbol should have (i.e.\n     \"textord\", \"mathord\", etc).\n     See https://github.com/Khan/KaTeX/wiki/Examining-TeX#group-types\n * - replace: the character that this symbol or function should be\n *   replaced with (i.e. \"\\phi\" has a replace value of \"\\u03d5\", the phi\n *   character in the main font).\n *\n * The outermost map in the table indicates what mode the symbols should be\n * accepted in (e.g. \"math\" or \"text\").\n */\n\nmodule.exports = {\n    math: {},\n    text: {}\n};\n\nfunction defineSymbol(mode, font, group, replace, name, acceptUnicodeChar) {\n    module.exports[mode][name] = {\n        font: font,\n        group: group,\n        replace: replace\n    };\n\n    if (acceptUnicodeChar) {\n        module.exports[mode][replace] = module.exports[mode][name];\n    }\n}\n\n// Some abbreviations for commonly used strings.\n// This helps minify the code, and also spotting typos using jshint.\n\n// modes:\nvar math = \"math\";\nvar text = \"text\";\n\n// fonts:\nvar main = \"main\";\nvar ams = \"ams\";\n\n// groups:\nvar accent = \"accent\";\nvar bin = \"bin\";\nvar close = \"close\";\nvar inner = \"inner\";\nvar mathord = \"mathord\";\nvar op = \"op\";\nvar open = \"open\";\nvar punct = \"punct\";\nvar rel = \"rel\";\nvar spacing = \"spacing\";\nvar textord = \"textord\";\n\n// Now comes the symbol table\n\n// Relation Symbols\ndefineSymbol(math, main, rel, \"\\u2261\", \"\\\\equiv\");\ndefineSymbol(math, main, rel, \"\\u227A\", \"\\\\prec\");\ndefineSymbol(math, main, rel, \"\\u227B\", \"\\\\succ\");\ndefineSymbol(math, main, rel, \"\\u223C\", \"\\\\sim\");\ndefineSymbol(math, main, rel, \"\\u22A5\", \"\\\\perp\");\ndefineSymbol(math, main, rel, \"\\u2AAF\", \"\\\\preceq\");\ndefineSymbol(math, main, rel, \"\\u2AB0\", \"\\\\succeq\");\ndefineSymbol(math, main, rel, \"\\u2243\", \"\\\\simeq\");\ndefineSymbol(math, main, rel, \"\\u2223\", \"\\\\mid\");\ndefineSymbol(math, main, rel, \"\\u226A\", \"\\\\ll\");\ndefineSymbol(math, main, rel, \"\\u226B\", \"\\\\gg\");\ndefineSymbol(math, main, rel, \"\\u224D\", \"\\\\asymp\");\ndefineSymbol(math, main, rel, \"\\u2225\", \"\\\\parallel\");\ndefineSymbol(math, main, rel, \"\\u22C8\", \"\\\\bowtie\");\ndefineSymbol(math, main, rel, \"\\u2323\", \"\\\\smile\");\ndefineSymbol(math, main, rel, \"\\u2291\", \"\\\\sqsubseteq\");\ndefineSymbol(math, main, rel, \"\\u2292\", \"\\\\sqsupseteq\");\ndefineSymbol(math, main, rel, \"\\u2250\", \"\\\\doteq\");\ndefineSymbol(math, main, rel, \"\\u2322\", \"\\\\frown\");\ndefineSymbol(math, main, rel, \"\\u220B\", \"\\\\ni\");\ndefineSymbol(math, main, rel, \"\\u221D\", \"\\\\propto\");\ndefineSymbol(math, main, rel, \"\\u22A2\", \"\\\\vdash\");\ndefineSymbol(math, main, rel, \"\\u22A3\", \"\\\\dashv\");\ndefineSymbol(math, main, rel, \"\\u220B\", \"\\\\owns\");\n\n// Punctuation\ndefineSymbol(math, main, punct, \".\", \"\\\\ldotp\");\ndefineSymbol(math, main, punct, \"\\u22C5\", \"\\\\cdotp\");\n\n// Misc Symbols\ndefineSymbol(math, main, textord, \"#\", \"\\\\#\");\ndefineSymbol(text, main, textord, \"#\", \"\\\\#\");\ndefineSymbol(math, main, textord, \"&\", \"\\\\&\");\ndefineSymbol(text, main, textord, \"&\", \"\\\\&\");\ndefineSymbol(math, main, textord, \"\\u2135\", \"\\\\aleph\");\ndefineSymbol(math, main, textord, \"\\u2200\", \"\\\\forall\");\ndefineSymbol(math, main, textord, \"\\u210F\", \"\\\\hbar\");\ndefineSymbol(math, main, textord, \"\\u2203\", \"\\\\exists\");\ndefineSymbol(math, main, textord, \"\\u2207\", \"\\\\nabla\");\ndefineSymbol(math, main, textord, \"\\u266D\", \"\\\\flat\");\ndefineSymbol(math, main, textord, \"\\u2113\", \"\\\\ell\");\ndefineSymbol(math, main, textord, \"\\u266E\", \"\\\\natural\");\ndefineSymbol(math, main, textord, \"\\u2663\", \"\\\\clubsuit\");\ndefineSymbol(math, main, textord, \"\\u2118\", \"\\\\wp\");\ndefineSymbol(math, main, textord, \"\\u266F\", \"\\\\sharp\");\ndefineSymbol(math, main, textord, \"\\u2662\", \"\\\\diamondsuit\");\ndefineSymbol(math, main, textord, \"\\u211C\", \"\\\\Re\");\ndefineSymbol(math, main, textord, \"\\u2661\", \"\\\\heartsuit\");\ndefineSymbol(math, main, textord, \"\\u2111\", \"\\\\Im\");\ndefineSymbol(math, main, textord, \"\\u2660\", \"\\\\spadesuit\");\n\n// Math and Text\ndefineSymbol(math, main, textord, \"\\u2020\", \"\\\\dag\");\ndefineSymbol(text, main, textord, \"\\u2020\", \"\\\\dag\");\ndefineSymbol(text, main, textord, \"\\u2020\", \"\\\\textdagger\");\ndefineSymbol(math, main, textord, \"\\u2021\", \"\\\\ddag\");\ndefineSymbol(text, main, textord, \"\\u2021\", \"\\\\ddag\");\ndefineSymbol(text, main, textord, \"\\u2020\", \"\\\\textdaggerdbl\");\n\n// Large Delimiters\ndefineSymbol(math, main, close, \"\\u23B1\", \"\\\\rmoustache\");\ndefineSymbol(math, main, open, \"\\u23B0\", \"\\\\lmoustache\");\ndefineSymbol(math, main, close, \"\\u27EF\", \"\\\\rgroup\");\ndefineSymbol(math, main, open, \"\\u27EE\", \"\\\\lgroup\");\n\n// Binary Operators\ndefineSymbol(math, main, bin, \"\\u2213\", \"\\\\mp\");\ndefineSymbol(math, main, bin, \"\\u2296\", \"\\\\ominus\");\ndefineSymbol(math, main, bin, \"\\u228E\", \"\\\\uplus\");\ndefineSymbol(math, main, bin, \"\\u2293\", \"\\\\sqcap\");\ndefineSymbol(math, main, bin, \"\\u2217\", \"\\\\ast\");\ndefineSymbol(math, main, bin, \"\\u2294\", \"\\\\sqcup\");\ndefineSymbol(math, main, bin, \"\\u25EF\", \"\\\\bigcirc\");\ndefineSymbol(math, main, bin, \"\\u2219\", \"\\\\bullet\");\ndefineSymbol(math, main, bin, \"\\u2021\", \"\\\\ddagger\");\ndefineSymbol(math, main, bin, \"\\u2240\", \"\\\\wr\");\ndefineSymbol(math, main, bin, \"\\u2A3F\", \"\\\\amalg\");\n\n// Arrow Symbols\ndefineSymbol(math, main, rel, \"\\u27F5\", \"\\\\longleftarrow\");\ndefineSymbol(math, main, rel, \"\\u21D0\", \"\\\\Leftarrow\");\ndefineSymbol(math, main, rel, \"\\u27F8\", \"\\\\Longleftarrow\");\ndefineSymbol(math, main, rel, \"\\u27F6\", \"\\\\longrightarrow\");\ndefineSymbol(math, main, rel, \"\\u21D2\", \"\\\\Rightarrow\");\ndefineSymbol(math, main, rel, \"\\u27F9\", \"\\\\Longrightarrow\");\ndefineSymbol(math, main, rel, \"\\u2194\", \"\\\\leftrightarrow\");\ndefineSymbol(math, main, rel, \"\\u27F7\", \"\\\\longleftrightarrow\");\ndefineSymbol(math, main, rel, \"\\u21D4\", \"\\\\Leftrightarrow\");\ndefineSymbol(math, main, rel, \"\\u27FA\", \"\\\\Longleftrightarrow\");\ndefineSymbol(math, main, rel, \"\\u21A6\", \"\\\\mapsto\");\ndefineSymbol(math, main, rel, \"\\u27FC\", \"\\\\longmapsto\");\ndefineSymbol(math, main, rel, \"\\u2197\", \"\\\\nearrow\");\ndefineSymbol(math, main, rel, \"\\u21A9\", \"\\\\hookleftarrow\");\ndefineSymbol(math, main, rel, \"\\u21AA\", \"\\\\hookrightarrow\");\ndefineSymbol(math, main, rel, \"\\u2198\", \"\\\\searrow\");\ndefineSymbol(math, main, rel, \"\\u21BC\", \"\\\\leftharpoonup\");\ndefineSymbol(math, main, rel, \"\\u21C0\", \"\\\\rightharpoonup\");\ndefineSymbol(math, main, rel, \"\\u2199\", \"\\\\swarrow\");\ndefineSymbol(math, main, rel, \"\\u21BD\", \"\\\\leftharpoondown\");\ndefineSymbol(math, main, rel, \"\\u21C1\", \"\\\\rightharpoondown\");\ndefineSymbol(math, main, rel, \"\\u2196\", \"\\\\nwarrow\");\ndefineSymbol(math, main, rel, \"\\u21CC\", \"\\\\rightleftharpoons\");\n\n// AMS Negated Binary Relations\ndefineSymbol(math, ams, rel, \"\\u226E\", \"\\\\nless\");\ndefineSymbol(math, ams, rel, \"\\uE010\", \"\\\\nleqslant\");\ndefineSymbol(math, ams, rel, \"\\uE011\", \"\\\\nleqq\");\ndefineSymbol(math, ams, rel, \"\\u2A87\", \"\\\\lneq\");\ndefineSymbol(math, ams, rel, \"\\u2268\", \"\\\\lneqq\");\ndefineSymbol(math, ams, rel, \"\\uE00C\", \"\\\\lvertneqq\");\ndefineSymbol(math, ams, rel, \"\\u22E6\", \"\\\\lnsim\");\ndefineSymbol(math, ams, rel, \"\\u2A89\", \"\\\\lnapprox\");\ndefineSymbol(math, ams, rel, \"\\u2280\", \"\\\\nprec\");\ndefineSymbol(math, ams, rel, \"\\u22E0\", \"\\\\npreceq\");\ndefineSymbol(math, ams, rel, \"\\u22E8\", \"\\\\precnsim\");\ndefineSymbol(math, ams, rel, \"\\u2AB9\", \"\\\\precnapprox\");\ndefineSymbol(math, ams, rel, \"\\u2241\", \"\\\\nsim\");\ndefineSymbol(math, ams, rel, \"\\uE006\", \"\\\\nshortmid\");\ndefineSymbol(math, ams, rel, \"\\u2224\", \"\\\\nmid\");\ndefineSymbol(math, ams, rel, \"\\u22AC\", \"\\\\nvdash\");\ndefineSymbol(math, ams, rel, \"\\u22AD\", \"\\\\nvDash\");\ndefineSymbol(math, ams, rel, \"\\u22EA\", \"\\\\ntriangleleft\");\ndefineSymbol(math, ams, rel, \"\\u22EC\", \"\\\\ntrianglelefteq\");\ndefineSymbol(math, ams, rel, \"\\u228A\", \"\\\\subsetneq\");\ndefineSymbol(math, ams, rel, \"\\uE01A\", \"\\\\varsubsetneq\");\ndefineSymbol(math, ams, rel, \"\\u2ACB\", \"\\\\subsetneqq\");\ndefineSymbol(math, ams, rel, \"\\uE017\", \"\\\\varsubsetneqq\");\ndefineSymbol(math, ams, rel, \"\\u226F\", \"\\\\ngtr\");\ndefineSymbol(math, ams, rel, \"\\uE00F\", \"\\\\ngeqslant\");\ndefineSymbol(math, ams, rel, \"\\uE00E\", \"\\\\ngeqq\");\ndefineSymbol(math, ams, rel, \"\\u2A88\", \"\\\\gneq\");\ndefineSymbol(math, ams, rel, \"\\u2269\", \"\\\\gneqq\");\ndefineSymbol(math, ams, rel, \"\\uE00D\", \"\\\\gvertneqq\");\ndefineSymbol(math, ams, rel, \"\\u22E7\", \"\\\\gnsim\");\ndefineSymbol(math, ams, rel, \"\\u2A8A\", \"\\\\gnapprox\");\ndefineSymbol(math, ams, rel, \"\\u2281\", \"\\\\nsucc\");\ndefineSymbol(math, ams, rel, \"\\u22E1\", \"\\\\nsucceq\");\ndefineSymbol(math, ams, rel, \"\\u22E9\", \"\\\\succnsim\");\ndefineSymbol(math, ams, rel, \"\\u2ABA\", \"\\\\succnapprox\");\ndefineSymbol(math, ams, rel, \"\\u2246\", \"\\\\ncong\");\ndefineSymbol(math, ams, rel, \"\\uE007\", \"\\\\nshortparallel\");\ndefineSymbol(math, ams, rel, \"\\u2226\", \"\\\\nparallel\");\ndefineSymbol(math, ams, rel, \"\\u22AF\", \"\\\\nVDash\");\ndefineSymbol(math, ams, rel, \"\\u22EB\", \"\\\\ntriangleright\");\ndefineSymbol(math, ams, rel, \"\\u22ED\", \"\\\\ntrianglerighteq\");\ndefineSymbol(math, ams, rel, \"\\uE018\", \"\\\\nsupseteqq\");\ndefineSymbol(math, ams, rel, \"\\u228B\", \"\\\\supsetneq\");\ndefineSymbol(math, ams, rel, \"\\uE01B\", \"\\\\varsupsetneq\");\ndefineSymbol(math, ams, rel, \"\\u2ACC\", \"\\\\supsetneqq\");\ndefineSymbol(math, ams, rel, \"\\uE019\", \"\\\\varsupsetneqq\");\ndefineSymbol(math, ams, rel, \"\\u22AE\", \"\\\\nVdash\");\ndefineSymbol(math, ams, rel, \"\\u2AB5\", \"\\\\precneqq\");\ndefineSymbol(math, ams, rel, \"\\u2AB6\", \"\\\\succneqq\");\ndefineSymbol(math, ams, rel, \"\\uE016\", \"\\\\nsubseteqq\");\ndefineSymbol(math, ams, bin, \"\\u22B4\", \"\\\\unlhd\");\ndefineSymbol(math, ams, bin, \"\\u22B5\", \"\\\\unrhd\");\n\n// AMS Negated Arrows\ndefineSymbol(math, ams, rel, \"\\u219A\", \"\\\\nleftarrow\");\ndefineSymbol(math, ams, rel, \"\\u219B\", \"\\\\nrightarrow\");\ndefineSymbol(math, ams, rel, \"\\u21CD\", \"\\\\nLeftarrow\");\ndefineSymbol(math, ams, rel, \"\\u21CF\", \"\\\\nRightarrow\");\ndefineSymbol(math, ams, rel, \"\\u21AE\", \"\\\\nleftrightarrow\");\ndefineSymbol(math, ams, rel, \"\\u21CE\", \"\\\\nLeftrightarrow\");\n\n// AMS Misc\ndefineSymbol(math, ams, rel, \"\\u25B3\", \"\\\\vartriangle\");\ndefineSymbol(math, ams, textord, \"\\u210F\", \"\\\\hslash\");\ndefineSymbol(math, ams, textord, \"\\u25BD\", \"\\\\triangledown\");\ndefineSymbol(math, ams, textord, \"\\u25CA\", \"\\\\lozenge\");\ndefineSymbol(math, ams, textord, \"\\u24C8\", \"\\\\circledS\");\ndefineSymbol(math, ams, textord, \"\\xAE\", \"\\\\circledR\");\ndefineSymbol(text, ams, textord, \"\\xAE\", \"\\\\circledR\");\ndefineSymbol(math, ams, textord, \"\\u2221\", \"\\\\measuredangle\");\ndefineSymbol(math, ams, textord, \"\\u2204\", \"\\\\nexists\");\ndefineSymbol(math, ams, textord, \"\\u2127\", \"\\\\mho\");\ndefineSymbol(math, ams, textord, \"\\u2132\", \"\\\\Finv\");\ndefineSymbol(math, ams, textord, \"\\u2141\", \"\\\\Game\");\ndefineSymbol(math, ams, textord, \"k\", \"\\\\Bbbk\");\ndefineSymbol(math, ams, textord, \"\\u2035\", \"\\\\backprime\");\ndefineSymbol(math, ams, textord, \"\\u25B2\", \"\\\\blacktriangle\");\ndefineSymbol(math, ams, textord, \"\\u25BC\", \"\\\\blacktriangledown\");\ndefineSymbol(math, ams, textord, \"\\u25A0\", \"\\\\blacksquare\");\ndefineSymbol(math, ams, textord, \"\\u29EB\", \"\\\\blacklozenge\");\ndefineSymbol(math, ams, textord, \"\\u2605\", \"\\\\bigstar\");\ndefineSymbol(math, ams, textord, \"\\u2222\", \"\\\\sphericalangle\");\ndefineSymbol(math, ams, textord, \"\\u2201\", \"\\\\complement\");\ndefineSymbol(math, ams, textord, \"\\xF0\", \"\\\\eth\");\ndefineSymbol(math, ams, textord, \"\\u2571\", \"\\\\diagup\");\ndefineSymbol(math, ams, textord, \"\\u2572\", \"\\\\diagdown\");\ndefineSymbol(math, ams, textord, \"\\u25A1\", \"\\\\square\");\ndefineSymbol(math, ams, textord, \"\\u25A1\", \"\\\\Box\");\ndefineSymbol(math, ams, textord, \"\\u25CA\", \"\\\\Diamond\");\ndefineSymbol(math, ams, textord, \"\\xA5\", \"\\\\yen\");\ndefineSymbol(math, ams, textord, \"\\u2713\", \"\\\\checkmark\");\ndefineSymbol(text, ams, textord, \"\\u2713\", \"\\\\checkmark\");\n\n// AMS Hebrew\ndefineSymbol(math, ams, textord, \"\\u2136\", \"\\\\beth\");\ndefineSymbol(math, ams, textord, \"\\u2138\", \"\\\\daleth\");\ndefineSymbol(math, ams, textord, \"\\u2137\", \"\\\\gimel\");\n\n// AMS Greek\ndefineSymbol(math, ams, textord, \"\\u03DD\", \"\\\\digamma\");\ndefineSymbol(math, ams, textord, \"\\u03F0\", \"\\\\varkappa\");\n\n// AMS Delimiters\ndefineSymbol(math, ams, open, \"\\u250C\", \"\\\\ulcorner\");\ndefineSymbol(math, ams, close, \"\\u2510\", \"\\\\urcorner\");\ndefineSymbol(math, ams, open, \"\\u2514\", \"\\\\llcorner\");\ndefineSymbol(math, ams, close, \"\\u2518\", \"\\\\lrcorner\");\n\n// AMS Binary Relations\ndefineSymbol(math, ams, rel, \"\\u2266\", \"\\\\leqq\");\ndefineSymbol(math, ams, rel, \"\\u2A7D\", \"\\\\leqslant\");\ndefineSymbol(math, ams, rel, \"\\u2A95\", \"\\\\eqslantless\");\ndefineSymbol(math, ams, rel, \"\\u2272\", \"\\\\lesssim\");\ndefineSymbol(math, ams, rel, \"\\u2A85\", \"\\\\lessapprox\");\ndefineSymbol(math, ams, rel, \"\\u224A\", \"\\\\approxeq\");\ndefineSymbol(math, ams, bin, \"\\u22D6\", \"\\\\lessdot\");\ndefineSymbol(math, ams, rel, \"\\u22D8\", \"\\\\lll\");\ndefineSymbol(math, ams, rel, \"\\u2276\", \"\\\\lessgtr\");\ndefineSymbol(math, ams, rel, \"\\u22DA\", \"\\\\lesseqgtr\");\ndefineSymbol(math, ams, rel, \"\\u2A8B\", \"\\\\lesseqqgtr\");\ndefineSymbol(math, ams, rel, \"\\u2251\", \"\\\\doteqdot\");\ndefineSymbol(math, ams, rel, \"\\u2253\", \"\\\\risingdotseq\");\ndefineSymbol(math, ams, rel, \"\\u2252\", \"\\\\fallingdotseq\");\ndefineSymbol(math, ams, rel, \"\\u223D\", \"\\\\backsim\");\ndefineSymbol(math, ams, rel, \"\\u22CD\", \"\\\\backsimeq\");\ndefineSymbol(math, ams, rel, \"\\u2AC5\", \"\\\\subseteqq\");\ndefineSymbol(math, ams, rel, \"\\u22D0\", \"\\\\Subset\");\ndefineSymbol(math, ams, rel, \"\\u228F\", \"\\\\sqsubset\");\ndefineSymbol(math, ams, rel, \"\\u227C\", \"\\\\preccurlyeq\");\ndefineSymbol(math, ams, rel, \"\\u22DE\", \"\\\\curlyeqprec\");\ndefineSymbol(math, ams, rel, \"\\u227E\", \"\\\\precsim\");\ndefineSymbol(math, ams, rel, \"\\u2AB7\", \"\\\\precapprox\");\ndefineSymbol(math, ams, rel, \"\\u22B2\", \"\\\\vartriangleleft\");\ndefineSymbol(math, ams, rel, \"\\u22B4\", \"\\\\trianglelefteq\");\ndefineSymbol(math, ams, rel, \"\\u22A8\", \"\\\\vDash\");\ndefineSymbol(math, ams, rel, \"\\u22AA\", \"\\\\Vvdash\");\ndefineSymbol(math, ams, rel, \"\\u2323\", \"\\\\smallsmile\");\ndefineSymbol(math, ams, rel, \"\\u2322\", \"\\\\smallfrown\");\ndefineSymbol(math, ams, rel, \"\\u224F\", \"\\\\bumpeq\");\ndefineSymbol(math, ams, rel, \"\\u224E\", \"\\\\Bumpeq\");\ndefineSymbol(math, ams, rel, \"\\u2267\", \"\\\\geqq\");\ndefineSymbol(math, ams, rel, \"\\u2A7E\", \"\\\\geqslant\");\ndefineSymbol(math, ams, rel, \"\\u2A96\", \"\\\\eqslantgtr\");\ndefineSymbol(math, ams, rel, \"\\u2273\", \"\\\\gtrsim\");\ndefineSymbol(math, ams, rel, \"\\u2A86\", \"\\\\gtrapprox\");\ndefineSymbol(math, ams, bin, \"\\u22D7\", \"\\\\gtrdot\");\ndefineSymbol(math, ams, rel, \"\\u22D9\", \"\\\\ggg\");\ndefineSymbol(math, ams, rel, \"\\u2277\", \"\\\\gtrless\");\ndefineSymbol(math, ams, rel, \"\\u22DB\", \"\\\\gtreqless\");\ndefineSymbol(math, ams, rel, \"\\u2A8C\", \"\\\\gtreqqless\");\ndefineSymbol(math, ams, rel, \"\\u2256\", \"\\\\eqcirc\");\ndefineSymbol(math, ams, rel, \"\\u2257\", \"\\\\circeq\");\ndefineSymbol(math, ams, rel, \"\\u225C\", \"\\\\triangleq\");\ndefineSymbol(math, ams, rel, \"\\u223C\", \"\\\\thicksim\");\ndefineSymbol(math, ams, rel, \"\\u2248\", \"\\\\thickapprox\");\ndefineSymbol(math, ams, rel, \"\\u2AC6\", \"\\\\supseteqq\");\ndefineSymbol(math, ams, rel, \"\\u22D1\", \"\\\\Supset\");\ndefineSymbol(math, ams, rel, \"\\u2290\", \"\\\\sqsupset\");\ndefineSymbol(math, ams, rel, \"\\u227D\", \"\\\\succcurlyeq\");\ndefineSymbol(math, ams, rel, \"\\u22DF\", \"\\\\curlyeqsucc\");\ndefineSymbol(math, ams, rel, \"\\u227F\", \"\\\\succsim\");\ndefineSymbol(math, ams, rel, \"\\u2AB8\", \"\\\\succapprox\");\ndefineSymbol(math, ams, rel, \"\\u22B3\", \"\\\\vartriangleright\");\ndefineSymbol(math, ams, rel, \"\\u22B5\", \"\\\\trianglerighteq\");\ndefineSymbol(math, ams, rel, \"\\u22A9\", \"\\\\Vdash\");\ndefineSymbol(math, ams, rel, \"\\u2223\", \"\\\\shortmid\");\ndefineSymbol(math, ams, rel, \"\\u2225\", \"\\\\shortparallel\");\ndefineSymbol(math, ams, rel, \"\\u226C\", \"\\\\between\");\ndefineSymbol(math, ams, rel, \"\\u22D4\", \"\\\\pitchfork\");\ndefineSymbol(math, ams, rel, \"\\u221D\", \"\\\\varpropto\");\ndefineSymbol(math, ams, rel, \"\\u25C0\", \"\\\\blacktriangleleft\");\ndefineSymbol(math, ams, rel, \"\\u2234\", \"\\\\therefore\");\ndefineSymbol(math, ams, rel, \"\\u220D\", \"\\\\backepsilon\");\ndefineSymbol(math, ams, rel, \"\\u25B6\", \"\\\\blacktriangleright\");\ndefineSymbol(math, ams, rel, \"\\u2235\", \"\\\\because\");\ndefineSymbol(math, ams, rel, \"\\u22D8\", \"\\\\llless\");\ndefineSymbol(math, ams, rel, \"\\u22D9\", \"\\\\gggtr\");\ndefineSymbol(math, ams, bin, \"\\u22B2\", \"\\\\lhd\");\ndefineSymbol(math, ams, bin, \"\\u22B3\", \"\\\\rhd\");\ndefineSymbol(math, ams, rel, \"\\u2242\", \"\\\\eqsim\");\ndefineSymbol(math, main, rel, \"\\u22C8\", \"\\\\Join\");\ndefineSymbol(math, ams, rel, \"\\u2251\", \"\\\\Doteq\");\n\n// AMS Binary Operators\ndefineSymbol(math, ams, bin, \"\\u2214\", \"\\\\dotplus\");\ndefineSymbol(math, ams, bin, \"\\u2216\", \"\\\\smallsetminus\");\ndefineSymbol(math, ams, bin, \"\\u22D2\", \"\\\\Cap\");\ndefineSymbol(math, ams, bin, \"\\u22D3\", \"\\\\Cup\");\ndefineSymbol(math, ams, bin, \"\\u2A5E\", \"\\\\doublebarwedge\");\ndefineSymbol(math, ams, bin, \"\\u229F\", \"\\\\boxminus\");\ndefineSymbol(math, ams, bin, \"\\u229E\", \"\\\\boxplus\");\ndefineSymbol(math, ams, bin, \"\\u22C7\", \"\\\\divideontimes\");\ndefineSymbol(math, ams, bin, \"\\u22C9\", \"\\\\ltimes\");\ndefineSymbol(math, ams, bin, \"\\u22CA\", \"\\\\rtimes\");\ndefineSymbol(math, ams, bin, \"\\u22CB\", \"\\\\leftthreetimes\");\ndefineSymbol(math, ams, bin, \"\\u22CC\", \"\\\\rightthreetimes\");\ndefineSymbol(math, ams, bin, \"\\u22CF\", \"\\\\curlywedge\");\ndefineSymbol(math, ams, bin, \"\\u22CE\", \"\\\\curlyvee\");\ndefineSymbol(math, ams, bin, \"\\u229D\", \"\\\\circleddash\");\ndefineSymbol(math, ams, bin, \"\\u229B\", \"\\\\circledast\");\ndefineSymbol(math, ams, bin, \"\\u22C5\", \"\\\\centerdot\");\ndefineSymbol(math, ams, bin, \"\\u22BA\", \"\\\\intercal\");\ndefineSymbol(math, ams, bin, \"\\u22D2\", \"\\\\doublecap\");\ndefineSymbol(math, ams, bin, \"\\u22D3\", \"\\\\doublecup\");\ndefineSymbol(math, ams, bin, \"\\u22A0\", \"\\\\boxtimes\");\n\n// AMS Arrows\ndefineSymbol(math, ams, rel, \"\\u21E2\", \"\\\\dashrightarrow\");\ndefineSymbol(math, ams, rel, \"\\u21E0\", \"\\\\dashleftarrow\");\ndefineSymbol(math, ams, rel, \"\\u21C7\", \"\\\\leftleftarrows\");\ndefineSymbol(math, ams, rel, \"\\u21C6\", \"\\\\leftrightarrows\");\ndefineSymbol(math, ams, rel, \"\\u21DA\", \"\\\\Lleftarrow\");\ndefineSymbol(math, ams, rel, \"\\u219E\", \"\\\\twoheadleftarrow\");\ndefineSymbol(math, ams, rel, \"\\u21A2\", \"\\\\leftarrowtail\");\ndefineSymbol(math, ams, rel, \"\\u21AB\", \"\\\\looparrowleft\");\ndefineSymbol(math, ams, rel, \"\\u21CB\", \"\\\\leftrightharpoons\");\ndefineSymbol(math, ams, rel, \"\\u21B6\", \"\\\\curvearrowleft\");\ndefineSymbol(math, ams, rel, \"\\u21BA\", \"\\\\circlearrowleft\");\ndefineSymbol(math, ams, rel, \"\\u21B0\", \"\\\\Lsh\");\ndefineSymbol(math, ams, rel, \"\\u21C8\", \"\\\\upuparrows\");\ndefineSymbol(math, ams, rel, \"\\u21BF\", \"\\\\upharpoonleft\");\ndefineSymbol(math, ams, rel, \"\\u21C3\", \"\\\\downharpoonleft\");\ndefineSymbol(math, ams, rel, \"\\u22B8\", \"\\\\multimap\");\ndefineSymbol(math, ams, rel, \"\\u21AD\", \"\\\\leftrightsquigarrow\");\ndefineSymbol(math, ams, rel, \"\\u21C9\", \"\\\\rightrightarrows\");\ndefineSymbol(math, ams, rel, \"\\u21C4\", \"\\\\rightleftarrows\");\ndefineSymbol(math, ams, rel, \"\\u21A0\", \"\\\\twoheadrightarrow\");\ndefineSymbol(math, ams, rel, \"\\u21A3\", \"\\\\rightarrowtail\");\ndefineSymbol(math, ams, rel, \"\\u21AC\", \"\\\\looparrowright\");\ndefineSymbol(math, ams, rel, \"\\u21B7\", \"\\\\curvearrowright\");\ndefineSymbol(math, ams, rel, \"\\u21BB\", \"\\\\circlearrowright\");\ndefineSymbol(math, ams, rel, \"\\u21B1\", \"\\\\Rsh\");\ndefineSymbol(math, ams, rel, \"\\u21CA\", \"\\\\downdownarrows\");\ndefineSymbol(math, ams, rel, \"\\u21BE\", \"\\\\upharpoonright\");\ndefineSymbol(math, ams, rel, \"\\u21C2\", \"\\\\downharpoonright\");\ndefineSymbol(math, ams, rel, \"\\u21DD\", \"\\\\rightsquigarrow\");\ndefineSymbol(math, ams, rel, \"\\u21DD\", \"\\\\leadsto\");\ndefineSymbol(math, ams, rel, \"\\u21DB\", \"\\\\Rrightarrow\");\ndefineSymbol(math, ams, rel, \"\\u21BE\", \"\\\\restriction\");\n\ndefineSymbol(math, main, textord, \"\\u2018\", \"`\");\ndefineSymbol(math, main, textord, \"$\", \"\\\\$\");\ndefineSymbol(text, main, textord, \"$\", \"\\\\$\");\ndefineSymbol(text, main, textord, \"$\", \"\\\\textdollar\");\ndefineSymbol(math, main, textord, \"%\", \"\\\\%\");\ndefineSymbol(text, main, textord, \"%\", \"\\\\%\");\ndefineSymbol(math, main, textord, \"_\", \"\\\\_\");\ndefineSymbol(text, main, textord, \"_\", \"\\\\_\");\ndefineSymbol(text, main, textord, \"_\", \"\\\\textunderscore\");\ndefineSymbol(math, main, textord, \"\\u2220\", \"\\\\angle\");\ndefineSymbol(math, main, textord, \"\\u221E\", \"\\\\infty\");\ndefineSymbol(math, main, textord, \"\\u2032\", \"\\\\prime\");\ndefineSymbol(math, main, textord, \"\\u25B3\", \"\\\\triangle\");\ndefineSymbol(math, main, textord, \"\\u0393\", \"\\\\Gamma\", true);\ndefineSymbol(math, main, textord, \"\\u0394\", \"\\\\Delta\", true);\ndefineSymbol(math, main, textord, \"\\u0398\", \"\\\\Theta\", true);\ndefineSymbol(math, main, textord, \"\\u039B\", \"\\\\Lambda\", true);\ndefineSymbol(math, main, textord, \"\\u039E\", \"\\\\Xi\", true);\ndefineSymbol(math, main, textord, \"\\u03A0\", \"\\\\Pi\", true);\ndefineSymbol(math, main, textord, \"\\u03A3\", \"\\\\Sigma\", true);\ndefineSymbol(math, main, textord, \"\\u03A5\", \"\\\\Upsilon\", true);\ndefineSymbol(math, main, textord, \"\\u03A6\", \"\\\\Phi\", true);\ndefineSymbol(math, main, textord, \"\\u03A8\", \"\\\\Psi\", true);\ndefineSymbol(math, main, textord, \"\\u03A9\", \"\\\\Omega\", true);\ndefineSymbol(math, main, textord, \"\\xAC\", \"\\\\neg\");\ndefineSymbol(math, main, textord, \"\\xAC\", \"\\\\lnot\");\ndefineSymbol(math, main, textord, \"\\u22A4\", \"\\\\top\");\ndefineSymbol(math, main, textord, \"\\u22A5\", \"\\\\bot\");\ndefineSymbol(math, main, textord, \"\\u2205\", \"\\\\emptyset\");\ndefineSymbol(math, ams, textord, \"\\u2205\", \"\\\\varnothing\");\ndefineSymbol(math, main, mathord, \"\\u03B1\", \"\\\\alpha\", true);\ndefineSymbol(math, main, mathord, \"\\u03B2\", \"\\\\beta\", true);\ndefineSymbol(math, main, mathord, \"\\u03B3\", \"\\\\gamma\", true);\ndefineSymbol(math, main, mathord, \"\\u03B4\", \"\\\\delta\", true);\ndefineSymbol(math, main, mathord, \"\\u03F5\", \"\\\\epsilon\", true);\ndefineSymbol(math, main, mathord, \"\\u03B6\", \"\\\\zeta\", true);\ndefineSymbol(math, main, mathord, \"\\u03B7\", \"\\\\eta\", true);\ndefineSymbol(math, main, mathord, \"\\u03B8\", \"\\\\theta\", true);\ndefineSymbol(math, main, mathord, \"\\u03B9\", \"\\\\iota\", true);\ndefineSymbol(math, main, mathord, \"\\u03BA\", \"\\\\kappa\", true);\ndefineSymbol(math, main, mathord, \"\\u03BB\", \"\\\\lambda\", true);\ndefineSymbol(math, main, mathord, \"\\u03BC\", \"\\\\mu\", true);\ndefineSymbol(math, main, mathord, \"\\u03BD\", \"\\\\nu\", true);\ndefineSymbol(math, main, mathord, \"\\u03BE\", \"\\\\xi\", true);\ndefineSymbol(math, main, mathord, \"\\u03BF\", \"\\\\omicron\", true);\ndefineSymbol(math, main, mathord, \"\\u03C0\", \"\\\\pi\", true);\ndefineSymbol(math, main, mathord, \"\\u03C1\", \"\\\\rho\", true);\ndefineSymbol(math, main, mathord, \"\\u03C3\", \"\\\\sigma\", true);\ndefineSymbol(math, main, mathord, \"\\u03C4\", \"\\\\tau\", true);\ndefineSymbol(math, main, mathord, \"\\u03C5\", \"\\\\upsilon\", true);\ndefineSymbol(math, main, mathord, \"\\u03D5\", \"\\\\phi\", true);\ndefineSymbol(math, main, mathord, \"\\u03C7\", \"\\\\chi\", true);\ndefineSymbol(math, main, mathord, \"\\u03C8\", \"\\\\psi\", true);\ndefineSymbol(math, main, mathord, \"\\u03C9\", \"\\\\omega\", true);\ndefineSymbol(math, main, mathord, \"\\u03B5\", \"\\\\varepsilon\", true);\ndefineSymbol(math, main, mathord, \"\\u03D1\", \"\\\\vartheta\", true);\ndefineSymbol(math, main, mathord, \"\\u03D6\", \"\\\\varpi\", true);\ndefineSymbol(math, main, mathord, \"\\u03F1\", \"\\\\varrho\", true);\ndefineSymbol(math, main, mathord, \"\\u03C2\", \"\\\\varsigma\", true);\ndefineSymbol(math, main, mathord, \"\\u03C6\", \"\\\\varphi\", true);\ndefineSymbol(math, main, bin, \"\\u2217\", \"*\");\ndefineSymbol(math, main, bin, \"+\", \"+\");\ndefineSymbol(math, main, bin, \"\\u2212\", \"-\");\ndefineSymbol(math, main, bin, \"\\u22C5\", \"\\\\cdot\");\ndefineSymbol(math, main, bin, \"\\u2218\", \"\\\\circ\");\ndefineSymbol(math, main, bin, \"\\xF7\", \"\\\\div\");\ndefineSymbol(math, main, bin, \"\\xB1\", \"\\\\pm\");\ndefineSymbol(math, main, bin, \"\\xD7\", \"\\\\times\");\ndefineSymbol(math, main, bin, \"\\u2229\", \"\\\\cap\");\ndefineSymbol(math, main, bin, \"\\u222A\", \"\\\\cup\");\ndefineSymbol(math, main, bin, \"\\u2216\", \"\\\\setminus\");\ndefineSymbol(math, main, bin, \"\\u2227\", \"\\\\land\");\ndefineSymbol(math, main, bin, \"\\u2228\", \"\\\\lor\");\ndefineSymbol(math, main, bin, \"\\u2227\", \"\\\\wedge\");\ndefineSymbol(math, main, bin, \"\\u2228\", \"\\\\vee\");\ndefineSymbol(math, main, textord, \"\\u221A\", \"\\\\surd\");\ndefineSymbol(math, main, open, \"(\", \"(\");\ndefineSymbol(math, main, open, \"[\", \"[\");\ndefineSymbol(math, main, open, \"\\u27E8\", \"\\\\langle\");\ndefineSymbol(math, main, open, \"\\u2223\", \"\\\\lvert\");\ndefineSymbol(math, main, open, \"\\u2225\", \"\\\\lVert\");\ndefineSymbol(math, main, close, \")\", \")\");\ndefineSymbol(math, main, close, \"]\", \"]\");\ndefineSymbol(math, main, close, \"?\", \"?\");\ndefineSymbol(math, main, close, \"!\", \"!\");\ndefineSymbol(math, main, close, \"\\u27E9\", \"\\\\rangle\");\ndefineSymbol(math, main, close, \"\\u2223\", \"\\\\rvert\");\ndefineSymbol(math, main, close, \"\\u2225\", \"\\\\rVert\");\ndefineSymbol(math, main, rel, \"=\", \"=\");\ndefineSymbol(math, main, rel, \"<\", \"<\");\ndefineSymbol(math, main, rel, \">\", \">\");\ndefineSymbol(math, main, rel, \":\", \":\");\ndefineSymbol(math, main, rel, \"\\u2248\", \"\\\\approx\");\ndefineSymbol(math, main, rel, \"\\u2245\", \"\\\\cong\");\ndefineSymbol(math, main, rel, \"\\u2265\", \"\\\\ge\");\ndefineSymbol(math, main, rel, \"\\u2265\", \"\\\\geq\");\ndefineSymbol(math, main, rel, \"\\u2190\", \"\\\\gets\");\ndefineSymbol(math, main, rel, \">\", \"\\\\gt\");\ndefineSymbol(math, main, rel, \"\\u2208\", \"\\\\in\");\ndefineSymbol(math, main, rel, \"\\u2209\", \"\\\\notin\");\ndefineSymbol(math, main, rel, \"\\u0338\", \"\\\\not\");\ndefineSymbol(math, main, rel, \"\\u2282\", \"\\\\subset\");\ndefineSymbol(math, main, rel, \"\\u2283\", \"\\\\supset\");\ndefineSymbol(math, main, rel, \"\\u2286\", \"\\\\subseteq\");\ndefineSymbol(math, main, rel, \"\\u2287\", \"\\\\supseteq\");\ndefineSymbol(math, ams, rel, \"\\u2288\", \"\\\\nsubseteq\");\ndefineSymbol(math, ams, rel, \"\\u2289\", \"\\\\nsupseteq\");\ndefineSymbol(math, main, rel, \"\\u22A8\", \"\\\\models\");\ndefineSymbol(math, main, rel, \"\\u2190\", \"\\\\leftarrow\");\ndefineSymbol(math, main, rel, \"\\u2264\", \"\\\\le\");\ndefineSymbol(math, main, rel, \"\\u2264\", \"\\\\leq\");\ndefineSymbol(math, main, rel, \"<\", \"\\\\lt\");\ndefineSymbol(math, main, rel, \"\\u2260\", \"\\\\ne\");\ndefineSymbol(math, main, rel, \"\\u2260\", \"\\\\neq\");\ndefineSymbol(math, main, rel, \"\\u2192\", \"\\\\rightarrow\");\ndefineSymbol(math, main, rel, \"\\u2192\", \"\\\\to\");\ndefineSymbol(math, ams, rel, \"\\u2271\", \"\\\\ngeq\");\ndefineSymbol(math, ams, rel, \"\\u2270\", \"\\\\nleq\");\ndefineSymbol(math, main, spacing, null, \"\\\\!\");\ndefineSymbol(math, main, spacing, \"\\xA0\", \"\\\\ \");\ndefineSymbol(math, main, spacing, \"\\xA0\", \"~\");\ndefineSymbol(math, main, spacing, null, \"\\\\,\");\ndefineSymbol(math, main, spacing, null, \"\\\\:\");\ndefineSymbol(math, main, spacing, null, \"\\\\;\");\ndefineSymbol(math, main, spacing, null, \"\\\\enspace\");\ndefineSymbol(math, main, spacing, null, \"\\\\qquad\");\ndefineSymbol(math, main, spacing, null, \"\\\\quad\");\ndefineSymbol(math, main, spacing, \"\\xA0\", \"\\\\space\");\ndefineSymbol(math, main, punct, \",\", \",\");\ndefineSymbol(math, main, punct, \";\", \";\");\ndefineSymbol(math, main, punct, \":\", \"\\\\colon\");\ndefineSymbol(math, ams, bin, \"\\u22BC\", \"\\\\barwedge\");\ndefineSymbol(math, ams, bin, \"\\u22BB\", \"\\\\veebar\");\ndefineSymbol(math, main, bin, \"\\u2299\", \"\\\\odot\");\ndefineSymbol(math, main, bin, \"\\u2295\", \"\\\\oplus\");\ndefineSymbol(math, main, bin, \"\\u2297\", \"\\\\otimes\");\ndefineSymbol(math, main, textord, \"\\u2202\", \"\\\\partial\");\ndefineSymbol(math, main, bin, \"\\u2298\", \"\\\\oslash\");\ndefineSymbol(math, ams, bin, \"\\u229A\", \"\\\\circledcirc\");\ndefineSymbol(math, ams, bin, \"\\u22A1\", \"\\\\boxdot\");\ndefineSymbol(math, main, bin, \"\\u25B3\", \"\\\\bigtriangleup\");\ndefineSymbol(math, main, bin, \"\\u25BD\", \"\\\\bigtriangledown\");\ndefineSymbol(math, main, bin, \"\\u2020\", \"\\\\dagger\");\ndefineSymbol(math, main, bin, \"\\u22C4\", \"\\\\diamond\");\ndefineSymbol(math, main, bin, \"\\u22C6\", \"\\\\star\");\ndefineSymbol(math, main, bin, \"\\u25C3\", \"\\\\triangleleft\");\ndefineSymbol(math, main, bin, \"\\u25B9\", \"\\\\triangleright\");\ndefineSymbol(math, main, open, \"{\", \"\\\\{\");\ndefineSymbol(text, main, textord, \"{\", \"\\\\{\");\ndefineSymbol(text, main, textord, \"{\", \"\\\\textbraceleft\");\ndefineSymbol(math, main, close, \"}\", \"\\\\}\");\ndefineSymbol(text, main, textord, \"}\", \"\\\\}\");\ndefineSymbol(text, main, textord, \"}\", \"\\\\textbraceright\");\ndefineSymbol(math, main, open, \"{\", \"\\\\lbrace\");\ndefineSymbol(math, main, close, \"}\", \"\\\\rbrace\");\ndefineSymbol(math, main, open, \"[\", \"\\\\lbrack\");\ndefineSymbol(math, main, close, \"]\", \"\\\\rbrack\");\ndefineSymbol(text, main, textord, \"<\", \"\\\\textless\"); // in T1 fontenc\ndefineSymbol(text, main, textord, \">\", \"\\\\textgreater\"); // in T1 fontenc\ndefineSymbol(math, main, open, \"\\u230A\", \"\\\\lfloor\");\ndefineSymbol(math, main, close, \"\\u230B\", \"\\\\rfloor\");\ndefineSymbol(math, main, open, \"\\u2308\", \"\\\\lceil\");\ndefineSymbol(math, main, close, \"\\u2309\", \"\\\\rceil\");\ndefineSymbol(math, main, textord, \"\\\\\", \"\\\\backslash\");\ndefineSymbol(math, main, textord, \"\\u2223\", \"|\");\ndefineSymbol(math, main, textord, \"\\u2223\", \"\\\\vert\");\ndefineSymbol(text, main, textord, \"|\", \"\\\\textbar\"); // in T1 fontenc\ndefineSymbol(math, main, textord, \"\\u2225\", \"\\\\|\");\ndefineSymbol(math, main, textord, \"\\u2225\", \"\\\\Vert\");\ndefineSymbol(text, main, textord, \"\\u2225\", \"\\\\textbardbl\");\ndefineSymbol(math, main, rel, \"\\u2191\", \"\\\\uparrow\");\ndefineSymbol(math, main, rel, \"\\u21D1\", \"\\\\Uparrow\");\ndefineSymbol(math, main, rel, \"\\u2193\", \"\\\\downarrow\");\ndefineSymbol(math, main, rel, \"\\u21D3\", \"\\\\Downarrow\");\ndefineSymbol(math, main, rel, \"\\u2195\", \"\\\\updownarrow\");\ndefineSymbol(math, main, rel, \"\\u21D5\", \"\\\\Updownarrow\");\ndefineSymbol(math, main, op, \"\\u2210\", \"\\\\coprod\");\ndefineSymbol(math, main, op, \"\\u22C1\", \"\\\\bigvee\");\ndefineSymbol(math, main, op, \"\\u22C0\", \"\\\\bigwedge\");\ndefineSymbol(math, main, op, \"\\u2A04\", \"\\\\biguplus\");\ndefineSymbol(math, main, op, \"\\u22C2\", \"\\\\bigcap\");\ndefineSymbol(math, main, op, \"\\u22C3\", \"\\\\bigcup\");\ndefineSymbol(math, main, op, \"\\u222B\", \"\\\\int\");\ndefineSymbol(math, main, op, \"\\u222B\", \"\\\\intop\");\ndefineSymbol(math, main, op, \"\\u222C\", \"\\\\iint\");\ndefineSymbol(math, main, op, \"\\u222D\", \"\\\\iiint\");\ndefineSymbol(math, main, op, \"\\u220F\", \"\\\\prod\");\ndefineSymbol(math, main, op, \"\\u2211\", \"\\\\sum\");\ndefineSymbol(math, main, op, \"\\u2A02\", \"\\\\bigotimes\");\ndefineSymbol(math, main, op, \"\\u2A01\", \"\\\\bigoplus\");\ndefineSymbol(math, main, op, \"\\u2A00\", \"\\\\bigodot\");\ndefineSymbol(math, main, op, \"\\u222E\", \"\\\\oint\");\ndefineSymbol(math, main, op, \"\\u2A06\", \"\\\\bigsqcup\");\ndefineSymbol(math, main, op, \"\\u222B\", \"\\\\smallint\");\ndefineSymbol(text, main, inner, \"\\u2026\", \"\\\\textellipsis\");\ndefineSymbol(math, main, inner, \"\\u2026\", \"\\\\mathellipsis\");\ndefineSymbol(text, main, inner, \"\\u2026\", \"\\\\ldots\", true);\ndefineSymbol(math, main, inner, \"\\u2026\", \"\\\\ldots\", true);\ndefineSymbol(math, main, inner, \"\\u22EF\", \"\\\\cdots\", true);\ndefineSymbol(math, main, inner, \"\\u22F1\", \"\\\\ddots\", true);\ndefineSymbol(math, main, textord, \"\\u22EE\", \"\\\\vdots\", true);\ndefineSymbol(math, main, accent, \"\\xB4\", \"\\\\acute\");\ndefineSymbol(math, main, accent, \"`\", \"\\\\grave\");\ndefineSymbol(math, main, accent, \"\\xA8\", \"\\\\ddot\");\ndefineSymbol(math, main, accent, \"~\", \"\\\\tilde\");\ndefineSymbol(math, main, accent, \"\\xAF\", \"\\\\bar\");\ndefineSymbol(math, main, accent, \"\\u02D8\", \"\\\\breve\");\ndefineSymbol(math, main, accent, \"\\u02C7\", \"\\\\check\");\ndefineSymbol(math, main, accent, \"^\", \"\\\\hat\");\ndefineSymbol(math, main, accent, \"\\u20D7\", \"\\\\vec\");\ndefineSymbol(math, main, accent, \"\\u02D9\", \"\\\\dot\");\ndefineSymbol(math, main, mathord, \"\\u0131\", \"\\\\imath\");\ndefineSymbol(math, main, mathord, \"\\u0237\", \"\\\\jmath\");\ndefineSymbol(text, main, accent, \"\\u02CA\", \"\\\\'\"); // acute\ndefineSymbol(text, main, accent, \"\\u02CB\", \"\\\\`\"); // grave\ndefineSymbol(text, main, accent, \"\\u02C6\", \"\\\\^\"); // circumflex\ndefineSymbol(text, main, accent, \"\\u02DC\", \"\\\\~\"); // tilde\ndefineSymbol(text, main, accent, \"\\u02C9\", \"\\\\=\"); // macron\ndefineSymbol(text, main, accent, \"\\u02D8\", \"\\\\u\"); // breve\ndefineSymbol(text, main, accent, \"\\u02D9\", \"\\\\.\"); // dot above\ndefineSymbol(text, main, accent, \"\\u02DA\", \"\\\\r\"); // ring above\ndefineSymbol(text, main, accent, \"\\u02C7\", \"\\\\v\"); // caron\ndefineSymbol(text, main, accent, \"\\xA8\", '\\\\\"'); // diaresis\ndefineSymbol(text, main, accent, \"\\u030B\", \"\\\\H\"); // double acute\n\ndefineSymbol(text, main, textord, \"\\u2013\", \"--\");\ndefineSymbol(text, main, textord, \"\\u2013\", \"\\\\textendash\");\ndefineSymbol(text, main, textord, \"\\u2014\", \"---\");\ndefineSymbol(text, main, textord, \"\\u2014\", \"\\\\textemdash\");\ndefineSymbol(text, main, textord, \"\\u2018\", \"`\");\ndefineSymbol(text, main, textord, \"\\u2018\", \"\\\\textquoteleft\");\ndefineSymbol(text, main, textord, \"\\u2019\", \"'\");\ndefineSymbol(text, main, textord, \"\\u2019\", \"\\\\textquoteright\");\ndefineSymbol(text, main, textord, \"\\u201C\", \"``\");\ndefineSymbol(text, main, textord, \"\\u201C\", \"\\\\textquotedblleft\");\ndefineSymbol(text, main, textord, \"\\u201D\", \"''\");\ndefineSymbol(text, main, textord, \"\\u201D\", \"\\\\textquotedblright\");\ndefineSymbol(math, main, textord, \"\\xB0\", \"\\\\degree\");\ndefineSymbol(text, main, textord, \"\\xB0\", \"\\\\degree\");\n// TODO: In LaTeX, \\pounds can generate a different character in text and math\n// mode, but among our fonts, only Main-Italic defines this character \"163\".\ndefineSymbol(math, main, mathord, \"\\xA3\", \"\\\\pounds\");\ndefineSymbol(math, main, mathord, \"\\xA3\", \"\\\\mathsterling\");\ndefineSymbol(text, main, mathord, \"\\xA3\", \"\\\\pounds\");\ndefineSymbol(text, main, mathord, \"\\xA3\", \"\\\\textsterling\");\ndefineSymbol(math, ams, textord, \"\\u2720\", \"\\\\maltese\");\ndefineSymbol(text, ams, textord, \"\\u2720\", \"\\\\maltese\");\n\ndefineSymbol(text, main, spacing, \"\\xA0\", \"\\\\ \");\ndefineSymbol(text, main, spacing, \"\\xA0\", \" \");\ndefineSymbol(text, main, spacing, \"\\xA0\", \"~\");\n\n// There are lots of symbols which are the same, so we add them in afterwards.\n\n// All of these are textords in math mode\nvar mathTextSymbols = \"0123456789/@.\\\"\";\nfor (var i = 0; i < mathTextSymbols.length; i++) {\n    var ch = mathTextSymbols.charAt(i);\n    defineSymbol(math, main, textord, ch, ch);\n}\n\n// All of these are textords in text mode\nvar textSymbols = \"0123456789!@*()-=+[]<>|\\\";:?/.,\";\nfor (var _i = 0; _i < textSymbols.length; _i++) {\n    var _ch = textSymbols.charAt(_i);\n    defineSymbol(text, main, textord, _ch, _ch);\n}\n\n// All of these are textords in text mode, and mathords in math mode\nvar letters = \"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ\";\nfor (var _i2 = 0; _i2 < letters.length; _i2++) {\n    var _ch2 = letters.charAt(_i2);\n    defineSymbol(math, main, mathord, _ch2, _ch2);\n    defineSymbol(text, main, textord, _ch2, _ch2);\n}\n\n// Latin-1 letters\nfor (var _i3 = 0x00C0; _i3 <= 0x00D6; _i3++) {\n    var _ch3 = String.fromCharCode(_i3);\n    defineSymbol(math, main, mathord, _ch3, _ch3);\n    defineSymbol(text, main, textord, _ch3, _ch3);\n}\n\nfor (var _i4 = 0x00D8; _i4 <= 0x00F6; _i4++) {\n    var _ch4 = String.fromCharCode(_i4);\n    defineSymbol(math, main, mathord, _ch4, _ch4);\n    defineSymbol(text, main, textord, _ch4, _ch4);\n}\n\nfor (var _i5 = 0x00F8; _i5 <= 0x00FF; _i5++) {\n    var _ch5 = String.fromCharCode(_i5);\n    defineSymbol(math, main, mathord, _ch5, _ch5);\n    defineSymbol(text, main, textord, _ch5, _ch5);\n}\n\n// Cyrillic\nfor (var _i6 = 0x0410; _i6 <= 0x044F; _i6++) {\n    var _ch6 = String.fromCharCode(_i6);\n    defineSymbol(text, main, textord, _ch6, _ch6);\n}\n\n// Unicode versions of existing characters\ndefineSymbol(text, main, textord, \"\\u2013\", \"–\");\ndefineSymbol(text, main, textord, \"\\u2014\", \"—\");\ndefineSymbol(text, main, textord, \"\\u2018\", \"‘\");\ndefineSymbol(text, main, textord, \"\\u2019\", \"’\");\ndefineSymbol(text, main, textord, \"\\u201C\", \"“\");\ndefineSymbol(text, main, textord, \"\\u201D\", \"”\");\n\n},{}],49:[function(require,module,exports){\n\"use strict\";\n\nvar hangulRegex = /[\\uAC00-\\uD7AF]/;\n\n// This regex combines\n// - CJK symbols and punctuation: [\\u3000-\\u303F]\n// - Hiragana: [\\u3040-\\u309F]\n// - Katakana: [\\u30A0-\\u30FF]\n// - CJK ideograms: [\\u4E00-\\u9FAF]\n// - Hangul syllables: [\\uAC00-\\uD7AF]\n// - Fullwidth punctuation: [\\uFF00-\\uFF60]\n// Notably missing are halfwidth Katakana and Romanji glyphs.\nvar cjkRegex = /[\\u3000-\\u30FF\\u4E00-\\u9FAF\\uAC00-\\uD7AF\\uFF00-\\uFF60]/;\n\nmodule.exports = {\n    cjkRegex: cjkRegex,\n    hangulRegex: hangulRegex\n};\n\n},{}],50:[function(require,module,exports){\n\"use strict\";\n\nvar _ParseError = require(\"./ParseError\");\n\nvar _ParseError2 = _interopRequireDefault(_ParseError);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n// This table gives the number of TeX pts in one of each *absolute* TeX unit.\n// Thus, multiplying a length by this number converts the length from units\n// into pts.  Dividing the result by ptPerEm gives the number of ems\n// *assuming* a font size of ptPerEm (normal size, normal style).\nvar ptPerUnit = {\n    // https://en.wikibooks.org/wiki/LaTeX/Lengths and\n    // https://tex.stackexchange.com/a/8263\n    \"pt\": 1, // TeX point\n    \"mm\": 7227 / 2540, // millimeter\n    \"cm\": 7227 / 254, // centimeter\n    \"in\": 72.27, // inch\n    \"bp\": 803 / 800, // big (PostScript) points\n    \"pc\": 12, // pica\n    \"dd\": 1238 / 1157, // didot\n    \"cc\": 14856 / 1157, // cicero (12 didot)\n    \"nd\": 685 / 642, // new didot\n    \"nc\": 1370 / 107, // new cicero (12 new didot)\n    \"sp\": 1 / 65536, // scaled point (TeX's internal smallest unit)\n    // https://tex.stackexchange.com/a/41371\n    \"px\": 803 / 800 };\n\n// Dictionary of relative units, for fast validity testing.\n/* eslint no-console:0 */\n\n/**\n * This file does conversion between units.  In particular, it provides\n * calculateSize to convert other units into ems.\n */\n\nvar relativeUnit = {\n    \"ex\": true,\n    \"em\": true,\n    \"mu\": true\n};\n\n/**\n * Determine whether the specified unit (either a string defining the unit\n * or a \"size\" parse node containing a unit field) is valid.\n */\nvar validUnit = function validUnit(unit) {\n    if (unit.unit) {\n        unit = unit.unit;\n    }\n    return unit in ptPerUnit || unit in relativeUnit || unit === \"ex\";\n};\n\n/*\n * Convert a \"size\" parse node (with numeric \"number\" and string \"unit\" fields,\n * as parsed by functions.js argType \"size\") into a CSS em value for the\n * current style/scale.  `options` gives the current options.\n */\nvar calculateSize = function calculateSize(sizeValue, options) {\n    var scale = void 0;\n    if (sizeValue.unit in ptPerUnit) {\n        // Absolute units\n        scale = ptPerUnit[sizeValue.unit] // Convert unit to pt\n        / options.fontMetrics().ptPerEm // Convert pt to CSS em\n        / options.sizeMultiplier; // Unscale to make absolute units\n    } else if (sizeValue.unit === \"mu\") {\n        // `mu` units scale with scriptstyle/scriptscriptstyle.\n        scale = options.fontMetrics().cssEmPerMu;\n    } else {\n        // Other relative units always refer to the *textstyle* font\n        // in the current size.\n        var unitOptions = void 0;\n        if (options.style.isTight()) {\n            // isTight() means current style is script/scriptscript.\n            unitOptions = options.havingStyle(options.style.text());\n        } else {\n            unitOptions = options;\n        }\n        // TODO: In TeX these units are relative to the quad of the current\n        // *text* font, e.g. cmr10. KaTeX instead uses values from the\n        // comparably-sized *Computer Modern symbol* font. At 10pt, these\n        // match. At 7pt and 5pt, they differ: cmr7=1.138894, cmsy7=1.170641;\n        // cmr5=1.361133, cmsy5=1.472241. Consider $\\scriptsize a\\kern1emb$.\n        // TeX \\showlists shows a kern of 1.13889 * fontsize;\n        // KaTeX shows a kern of 1.171 * fontsize.\n        if (sizeValue.unit === \"ex\") {\n            scale = unitOptions.fontMetrics().xHeight;\n        } else if (sizeValue.unit === \"em\") {\n            scale = unitOptions.fontMetrics().quad;\n        } else {\n            throw new _ParseError2.default(\"Invalid unit: '\" + sizeValue.unit + \"'\");\n        }\n        if (unitOptions !== options) {\n            scale *= unitOptions.sizeMultiplier / options.sizeMultiplier;\n        }\n    }\n    return sizeValue.number * scale;\n};\n\nmodule.exports = {\n    validUnit: validUnit,\n    calculateSize: calculateSize\n};\n\n},{\"./ParseError\":29}],51:[function(require,module,exports){\n\"use strict\";\n\n/**\n * This file contains a list of utility functions which are useful in other\n * files.\n */\n\n/**\n * Provide an `indexOf` function which works in IE8, but defers to native if\n * possible.\n */\nvar nativeIndexOf = Array.prototype.indexOf;\nvar indexOf = function indexOf(list, elem) {\n    if (list == null) {\n        return -1;\n    }\n    if (nativeIndexOf && list.indexOf === nativeIndexOf) {\n        return list.indexOf(elem);\n    }\n    var l = list.length;\n    for (var i = 0; i < l; i++) {\n        if (list[i] === elem) {\n            return i;\n        }\n    }\n    return -1;\n};\n\n/**\n * Return whether an element is contained in a list\n */\nvar contains = function contains(list, elem) {\n    return indexOf(list, elem) !== -1;\n};\n\n/**\n * Provide a default value if a setting is undefined\n */\nvar deflt = function deflt(setting, defaultIfUndefined) {\n    return setting === undefined ? defaultIfUndefined : setting;\n};\n\n// hyphenate and escape adapted from Facebook's React under Apache 2 license\n\nvar uppercase = /([A-Z])/g;\nvar hyphenate = function hyphenate(str) {\n    return str.replace(uppercase, \"-$1\").toLowerCase();\n};\n\nvar ESCAPE_LOOKUP = {\n    \"&\": \"&amp;\",\n    \">\": \"&gt;\",\n    \"<\": \"&lt;\",\n    \"\\\"\": \"&quot;\",\n    \"'\": \"&#x27;\"\n};\n\nvar ESCAPE_REGEX = /[&><\"']/g;\n\nfunction escaper(match) {\n    return ESCAPE_LOOKUP[match];\n}\n\n/**\n * Escapes text to prevent scripting attacks.\n *\n * @param {*} text Text value to escape.\n * @return {string} An escaped string.\n */\nfunction escape(text) {\n    return (\"\" + text).replace(ESCAPE_REGEX, escaper);\n}\n\n/**\n * A function to set the text content of a DOM element in all supported\n * browsers. Note that we don't define this if there is no document.\n */\nvar setTextContent = void 0;\nif (typeof document !== \"undefined\") {\n    var testNode = document.createElement(\"span\");\n    if (\"textContent\" in testNode) {\n        setTextContent = function setTextContent(node, text) {\n            node.textContent = text;\n        };\n    } else {\n        setTextContent = function setTextContent(node, text) {\n            node.innerText = text;\n        };\n    }\n}\n\n/**\n * A function to clear a node.\n */\nfunction clearNode(node) {\n    setTextContent(node, \"\");\n}\n\nmodule.exports = {\n    contains: contains,\n    deflt: deflt,\n    escape: escape,\n    hyphenate: hyphenate,\n    indexOf: indexOf,\n    setTextContent: setTextContent,\n    clearNode: clearNode\n};\n\n},{}]},{},[1])(1)\n});"
  },
  {
    "path": "static/layer/layer.js",
    "content": "﻿/*! layer-v3.0.3 Web弹层组件 MIT License  http://layer.layui.com/  By 贤心 */\n ;!function(e,t){\"use strict\";var i,n,a=e.layui&&layui.define,o={getPath:function(){var e=document.scripts,t=e[e.length-1],i=t.src;if(!t.getAttribute(\"merge\"))return i.substring(0,i.lastIndexOf(\"/\")+1)}(),config:{},end:{},minIndex:0,minLeft:[],btn:[\"&#x786E;&#x5B9A;\",\"&#x53D6;&#x6D88;\"],type:[\"dialog\",\"page\",\"iframe\",\"loading\",\"tips\"]},r={v:\"3.0.3\",ie:function(){var t=navigator.userAgent.toLowerCase();return!!(e.ActiveXObject||\"ActiveXObject\"in e)&&((t.match(/msie\\s(\\d+)/)||[])[1]||\"11\")}(),index:e.layer&&e.layer.v?1e5:0,path:o.getPath,config:function(e,t){return e=e||{},r.cache=o.config=i.extend({},o.config,e),r.path=o.config.path||r.path,\"string\"==typeof e.extend&&(e.extend=[e.extend]),o.config.path&&r.ready(),e.extend?(a?layui.addcss(\"modules/layer/\"+e.extend):r.link(\"skin/\"+e.extend),this):this},link:function(t,n,a){if(r.path){var o=i(\"head\")[0],s=document.createElement(\"link\");\"string\"==typeof n&&(a=n);var l=(a||t).replace(/\\.|\\//g,\"\"),f=\"layuicss-\"+l,c=0;s.rel=\"stylesheet\",s.href=r.path+t,s.id=f,i(\"#\"+f)[0]||o.appendChild(s),\"function\"==typeof n&&!function u(){return++c>80?e.console&&console.error(\"layer.css: Invalid\"):void(1989===parseInt(i(\"#\"+f).css(\"width\"))?n():setTimeout(u,100))}()}},ready:function(e){var t=\"skinlayercss\",i=\"303\";return a?layui.addcss(\"modules/layer/default/layer.css?v=\"+r.v+i,e,t):r.link(\"skin/default/layer.css?v=\"+r.v+i,e,t),this},alert:function(e,t,n){var a=\"function\"==typeof t;return a&&(n=t),r.open(i.extend({content:e,yes:n},a?{}:t))},confirm:function(e,t,n,a){var s=\"function\"==typeof t;return s&&(a=n,n=t),r.open(i.extend({content:e,btn:o.btn,yes:n,btn2:a},s?{}:t))},msg:function(e,n,a){var s=\"function\"==typeof n,f=o.config.skin,c=(f?f+\" \"+f+\"-msg\":\"\")||\"layui-layer-msg\",u=l.anim.length-1;return s&&(a=n),r.open(i.extend({content:e,time:3e3,shade:!1,skin:c,title:!1,closeBtn:!1,btn:!1,resize:!1,end:a},s&&!o.config.skin?{skin:c+\" layui-layer-hui\",anim:u}:function(){return n=n||{},(n.icon===-1||n.icon===t&&!o.config.skin)&&(n.skin=c+\" \"+(n.skin||\"layui-layer-hui\")),n}()))},load:function(e,t){return r.open(i.extend({type:3,icon:e||0,resize:!1,shade:.01},t))},tips:function(e,t,n){return r.open(i.extend({type:4,content:[e,t],closeBtn:!1,time:3e3,shade:!1,resize:!1,fixed:!1,maxWidth:210},n))}},s=function(e){var t=this;t.index=++r.index,t.config=i.extend({},t.config,o.config,e),document.body?t.creat():setTimeout(function(){t.creat()},30)};s.pt=s.prototype;var l=[\"layui-layer\",\".layui-layer-title\",\".layui-layer-main\",\".layui-layer-dialog\",\"layui-layer-iframe\",\"layui-layer-content\",\"layui-layer-btn\",\"layui-layer-close\"];l.anim=[\"layer-anim\",\"layer-anim-01\",\"layer-anim-02\",\"layer-anim-03\",\"layer-anim-04\",\"layer-anim-05\",\"layer-anim-06\"],s.pt.config={type:0,shade:.3,fixed:!0,move:l[1],title:\"&#x4FE1;&#x606F;\",offset:\"auto\",area:\"auto\",closeBtn:1,time:0,zIndex:19891014,maxWidth:360,anim:0,isOutAnim:!0,icon:-1,moveType:1,resize:!0,scrollbar:!0,tips:2},s.pt.vessel=function(e,t){var n=this,a=n.index,r=n.config,s=r.zIndex+a,f=\"object\"==typeof r.title,c=r.maxmin&&(1===r.type||2===r.type),u=r.title?'<div class=\"layui-layer-title\" style=\"'+(f?r.title[1]:\"\")+'\">'+(f?r.title[0]:r.title)+\"</div>\":\"\";return r.zIndex=s,t([r.shade?'<div class=\"layui-layer-shade\" id=\"layui-layer-shade'+a+'\" times=\"'+a+'\" style=\"'+(\"z-index:\"+(s-1)+\"; background-color:\"+(r.shade[1]||\"#000\")+\"; opacity:\"+(r.shade[0]||r.shade)+\"; filter:alpha(opacity=\"+(100*r.shade[0]||100*r.shade)+\");\")+'\"></div>':\"\",'<div class=\"'+l[0]+(\" layui-layer-\"+o.type[r.type])+(0!=r.type&&2!=r.type||r.shade?\"\":\" layui-layer-border\")+\" \"+(r.skin||\"\")+'\" id=\"'+l[0]+a+'\" type=\"'+o.type[r.type]+'\" times=\"'+a+'\" showtime=\"'+r.time+'\" conType=\"'+(e?\"object\":\"string\")+'\" style=\"z-index: '+s+\"; width:\"+r.area[0]+\";height:\"+r.area[1]+(r.fixed?\"\":\";position:absolute;\")+'\">'+(e&&2!=r.type?\"\":u)+'<div id=\"'+(r.id||\"\")+'\" class=\"layui-layer-content'+(0==r.type&&r.icon!==-1?\" layui-layer-padding\":\"\")+(3==r.type?\" layui-layer-loading\"+r.icon:\"\")+'\">'+(0==r.type&&r.icon!==-1?'<i class=\"layui-layer-ico layui-layer-ico'+r.icon+'\"></i>':\"\")+(1==r.type&&e?\"\":r.content||\"\")+'</div><span class=\"layui-layer-setwin\">'+function(){var e=c?'<a class=\"layui-layer-min\" href=\"javascript:;\"><cite></cite></a><a class=\"layui-layer-ico layui-layer-max\" href=\"javascript:;\"></a>':\"\";return r.closeBtn&&(e+='<a class=\"layui-layer-ico '+l[7]+\" \"+l[7]+(r.title?r.closeBtn:4==r.type?\"1\":\"2\")+'\" href=\"javascript:;\"></a>'),e}()+\"</span>\"+(r.btn?function(){var e=\"\";\"string\"==typeof r.btn&&(r.btn=[r.btn]);for(var t=0,i=r.btn.length;t<i;t++)e+='<a class=\"'+l[6]+t+'\">'+r.btn[t]+\"</a>\";return'<div class=\"'+l[6]+\" layui-layer-btn-\"+(r.btnAlign||\"\")+'\">'+e+\"</div>\"}():\"\")+(r.resize?'<span class=\"layui-layer-resize\"></span>':\"\")+\"</div>\"],u,i('<div class=\"layui-layer-move\"></div>')),n},s.pt.creat=function(){var e=this,t=e.config,a=e.index,s=t.content,f=\"object\"==typeof s,c=i(\"body\");if(!t.id||!i(\"#\"+t.id)[0]){switch(\"string\"==typeof t.area&&(t.area=\"auto\"===t.area?[\"\",\"\"]:[t.area,\"\"]),t.shift&&(t.anim=t.shift),6==r.ie&&(t.fixed=!1),t.type){case 0:t.btn=\"btn\"in t?t.btn:o.btn[0],r.closeAll(\"dialog\");break;case 2:var s=t.content=f?t.content:[t.content,\"auto\"];t.content='<iframe scrolling=\"'+(t.content[1]||\"auto\")+'\" allowtransparency=\"true\" id=\"'+l[4]+a+'\" name=\"'+l[4]+a+'\" onload=\"this.className=\\'\\';\" class=\"layui-layer-load\" frameborder=\"0\" src=\"'+t.content[0]+'\"></iframe>';break;case 3:delete t.title,delete t.closeBtn,t.icon===-1&&0===t.icon,r.closeAll(\"loading\");break;case 4:f||(t.content=[t.content,\"body\"]),t.follow=t.content[1],t.content=t.content[0]+'<i class=\"layui-layer-TipsG\"></i>',delete t.title,t.tips=\"object\"==typeof t.tips?t.tips:[t.tips,!0],t.tipsMore||r.closeAll(\"tips\")}e.vessel(f,function(n,r,u){c.append(n[0]),f?function(){2==t.type||4==t.type?function(){i(\"body\").append(n[1])}():function(){s.parents(\".\"+l[0])[0]||(s.data(\"display\",s.css(\"display\")).show().addClass(\"layui-layer-wrap\").wrap(n[1]),i(\"#\"+l[0]+a).find(\".\"+l[5]).before(r))}()}():c.append(n[1]),i(\".layui-layer-move\")[0]||c.append(o.moveElem=u),e.layero=i(\"#\"+l[0]+a),t.scrollbar||l.html.css(\"overflow\",\"hidden\").attr(\"layer-full\",a)}).auto(a),2==t.type&&6==r.ie&&e.layero.find(\"iframe\").attr(\"src\",s[0]),4==t.type?e.tips():e.offset(),t.fixed&&n.on(\"resize\",function(){e.offset(),(/^\\d+%$/.test(t.area[0])||/^\\d+%$/.test(t.area[1]))&&e.auto(a),4==t.type&&e.tips()}),t.time<=0||setTimeout(function(){r.close(e.index)},t.time),e.move().callback(),l.anim[t.anim]&&e.layero.addClass(l.anim[t.anim]),t.isOutAnim&&e.layero.data(\"isOutAnim\",!0)}},s.pt.auto=function(e){function t(e){e=s.find(e),e.height(f[1]-c-u-2*(0|parseFloat(e.css(\"padding-top\"))))}var a=this,o=a.config,s=i(\"#\"+l[0]+e);\"\"===o.area[0]&&o.maxWidth>0&&(r.ie&&r.ie<8&&o.btn&&s.width(s.innerWidth()),s.outerWidth()>o.maxWidth&&s.width(o.maxWidth));var f=[s.innerWidth(),s.innerHeight()],c=s.find(l[1]).outerHeight()||0,u=s.find(\".\"+l[6]).outerHeight()||0;switch(o.type){case 2:t(\"iframe\");break;default:\"\"===o.area[1]?o.fixed&&f[1]>=n.height()&&(f[1]=n.height(),t(\".\"+l[5])):t(\".\"+l[5])}return a},s.pt.offset=function(){var e=this,t=e.config,i=e.layero,a=[i.outerWidth(),i.outerHeight()],o=\"object\"==typeof t.offset;e.offsetTop=(n.height()-a[1])/2,e.offsetLeft=(n.width()-a[0])/2,o?(e.offsetTop=t.offset[0],e.offsetLeft=t.offset[1]||e.offsetLeft):\"auto\"!==t.offset&&(\"t\"===t.offset?e.offsetTop=0:\"r\"===t.offset?e.offsetLeft=n.width()-a[0]:\"b\"===t.offset?e.offsetTop=n.height()-a[1]:\"l\"===t.offset?e.offsetLeft=0:\"lt\"===t.offset?(e.offsetTop=0,e.offsetLeft=0):\"lb\"===t.offset?(e.offsetTop=n.height()-a[1],e.offsetLeft=0):\"rt\"===t.offset?(e.offsetTop=0,e.offsetLeft=n.width()-a[0]):\"rb\"===t.offset?(e.offsetTop=n.height()-a[1],e.offsetLeft=n.width()-a[0]):e.offsetTop=t.offset),t.fixed||(e.offsetTop=/%$/.test(e.offsetTop)?n.height()*parseFloat(e.offsetTop)/100:parseFloat(e.offsetTop),e.offsetLeft=/%$/.test(e.offsetLeft)?n.width()*parseFloat(e.offsetLeft)/100:parseFloat(e.offsetLeft),e.offsetTop+=n.scrollTop(),e.offsetLeft+=n.scrollLeft()),i.attr(\"minLeft\")&&(e.offsetTop=n.height()-(i.find(l[1]).outerHeight()||0),e.offsetLeft=i.css(\"left\")),i.css({top:e.offsetTop,left:e.offsetLeft})},s.pt.tips=function(){var e=this,t=e.config,a=e.layero,o=[a.outerWidth(),a.outerHeight()],r=i(t.follow);r[0]||(r=i(\"body\"));var s={width:r.outerWidth(),height:r.outerHeight(),top:r.offset().top,left:r.offset().left},f=a.find(\".layui-layer-TipsG\"),c=t.tips[0];t.tips[1]||f.remove(),s.autoLeft=function(){s.left+o[0]-n.width()>0?(s.tipLeft=s.left+s.width-o[0],f.css({right:12,left:\"auto\"})):s.tipLeft=s.left},s.where=[function(){s.autoLeft(),s.tipTop=s.top-o[1]-10,f.removeClass(\"layui-layer-TipsB\").addClass(\"layui-layer-TipsT\").css(\"border-right-color\",t.tips[1])},function(){s.tipLeft=s.left+s.width+10,s.tipTop=s.top,f.removeClass(\"layui-layer-TipsL\").addClass(\"layui-layer-TipsR\").css(\"border-bottom-color\",t.tips[1])},function(){s.autoLeft(),s.tipTop=s.top+s.height+10,f.removeClass(\"layui-layer-TipsT\").addClass(\"layui-layer-TipsB\").css(\"border-right-color\",t.tips[1])},function(){s.tipLeft=s.left-o[0]-10,s.tipTop=s.top,f.removeClass(\"layui-layer-TipsR\").addClass(\"layui-layer-TipsL\").css(\"border-bottom-color\",t.tips[1])}],s.where[c-1](),1===c?s.top-(n.scrollTop()+o[1]+16)<0&&s.where[2]():2===c?n.width()-(s.left+s.width+o[0]+16)>0||s.where[3]():3===c?s.top-n.scrollTop()+s.height+o[1]+16-n.height()>0&&s.where[0]():4===c&&o[0]+16-s.left>0&&s.where[1](),a.find(\".\"+l[5]).css({\"background-color\":t.tips[1],\"padding-right\":t.closeBtn?\"30px\":\"\"}),a.css({left:s.tipLeft-(t.fixed?n.scrollLeft():0),top:s.tipTop-(t.fixed?n.scrollTop():0)})},s.pt.move=function(){var e=this,t=e.config,a=i(document),s=e.layero,l=s.find(t.move),f=s.find(\".layui-layer-resize\"),c={};return t.move&&l.css(\"cursor\",\"move\"),l.on(\"mousedown\",function(e){e.preventDefault(),t.move&&(c.moveStart=!0,c.offset=[e.clientX-parseFloat(s.css(\"left\")),e.clientY-parseFloat(s.css(\"top\"))],o.moveElem.css(\"cursor\",\"move\").show())}),f.on(\"mousedown\",function(e){e.preventDefault(),c.resizeStart=!0,c.offset=[e.clientX,e.clientY],c.area=[s.outerWidth(),s.outerHeight()],o.moveElem.css(\"cursor\",\"se-resize\").show()}),a.on(\"mousemove\",function(i){if(c.moveStart){var a=i.clientX-c.offset[0],o=i.clientY-c.offset[1],l=\"fixed\"===s.css(\"position\");if(i.preventDefault(),c.stX=l?0:n.scrollLeft(),c.stY=l?0:n.scrollTop(),!t.moveOut){var f=n.width()-s.outerWidth()+c.stX,u=n.height()-s.outerHeight()+c.stY;a<c.stX&&(a=c.stX),a>f&&(a=f),o<c.stY&&(o=c.stY),o>u&&(o=u)}s.css({left:a,top:o})}if(t.resize&&c.resizeStart){var a=i.clientX-c.offset[0],o=i.clientY-c.offset[1];i.preventDefault(),r.style(e.index,{width:c.area[0]+a,height:c.area[1]+o}),c.isResize=!0,t.resizing&&t.resizing(s)}}).on(\"mouseup\",function(e){c.moveStart&&(delete c.moveStart,o.moveElem.hide(),t.moveEnd&&t.moveEnd(s)),c.resizeStart&&(delete c.resizeStart,o.moveElem.hide())}),e},s.pt.callback=function(){function e(){var e=a.cancel&&a.cancel(t.index,n);e===!1||r.close(t.index)}var t=this,n=t.layero,a=t.config;t.openLayer(),a.success&&(2==a.type?n.find(\"iframe\").on(\"load\",function(){a.success(n,t.index)}):a.success(n,t.index)),6==r.ie&&t.IE6(n),n.find(\".\"+l[6]).children(\"a\").on(\"click\",function(){var e=i(this).index();if(0===e)a.yes?a.yes(t.index,n):a.btn1?a.btn1(t.index,n):r.close(t.index);else{var o=a[\"btn\"+(e+1)]&&a[\"btn\"+(e+1)](t.index,n);o===!1||r.close(t.index)}}),n.find(\".\"+l[7]).on(\"click\",e),a.shadeClose&&i(\"#layui-layer-shade\"+t.index).on(\"click\",function(){r.close(t.index)}),n.find(\".layui-layer-min\").on(\"click\",function(){var e=a.min&&a.min(n);e===!1||r.min(t.index,a)}),n.find(\".layui-layer-max\").on(\"click\",function(){i(this).hasClass(\"layui-layer-maxmin\")?(r.restore(t.index),a.restore&&a.restore(n)):(r.full(t.index,a),setTimeout(function(){a.full&&a.full(n)},100))}),a.end&&(o.end[t.index]=a.end)},o.reselect=function(){i.each(i(\"select\"),function(e,t){var n=i(this);n.parents(\".\"+l[0])[0]||1==n.attr(\"layer\")&&i(\".\"+l[0]).length<1&&n.removeAttr(\"layer\").show(),n=null})},s.pt.IE6=function(e){i(\"select\").each(function(e,t){var n=i(this);n.parents(\".\"+l[0])[0]||\"none\"===n.css(\"display\")||n.attr({layer:\"1\"}).hide(),n=null})},s.pt.openLayer=function(){var e=this;r.zIndex=e.config.zIndex,r.setTop=function(e){var t=function(){r.zIndex++,e.css(\"z-index\",r.zIndex+1)};return r.zIndex=parseInt(e[0].style.zIndex),e.on(\"mousedown\",t),r.zIndex}},o.record=function(e){var t=[e.width(),e.height(),e.position().top,e.position().left+parseFloat(e.css(\"margin-left\"))];e.find(\".layui-layer-max\").addClass(\"layui-layer-maxmin\"),e.attr({area:t})},o.rescollbar=function(e){l.html.attr(\"layer-full\")==e&&(l.html[0].style.removeProperty?l.html[0].style.removeProperty(\"overflow\"):l.html[0].style.removeAttribute(\"overflow\"),l.html.removeAttr(\"layer-full\"))},e.layer=r,r.getChildFrame=function(e,t){return t=t||i(\".\"+l[4]).attr(\"times\"),i(\"#\"+l[0]+t).find(\"iframe\").contents().find(e)},r.getFrameIndex=function(e){return i(\"#\"+e).parents(\".\"+l[4]).attr(\"times\")},r.iframeAuto=function(e){if(e){var t=r.getChildFrame(\"html\",e).outerHeight(),n=i(\"#\"+l[0]+e),a=n.find(l[1]).outerHeight()||0,o=n.find(\".\"+l[6]).outerHeight()||0;n.css({height:t+a+o}),n.find(\"iframe\").css({height:t})}},r.iframeSrc=function(e,t){i(\"#\"+l[0]+e).find(\"iframe\").attr(\"src\",t)},r.style=function(e,t,n){var a=i(\"#\"+l[0]+e),r=a.find(\".layui-layer-content\"),s=a.attr(\"type\"),f=a.find(l[1]).outerHeight()||0,c=a.find(\".\"+l[6]).outerHeight()||0;a.attr(\"minLeft\");s!==o.type[3]&&s!==o.type[4]&&(n||(parseFloat(t.width)<=260&&(t.width=260),parseFloat(t.height)-f-c<=64&&(t.height=64+f+c)),a.css(t),c=a.find(\".\"+l[6]).outerHeight(),s===o.type[2]?a.find(\"iframe\").css({height:parseFloat(t.height)-f-c}):r.css({height:parseFloat(t.height)-f-c-parseFloat(r.css(\"padding-top\"))-parseFloat(r.css(\"padding-bottom\"))}))},r.min=function(e,t){var a=i(\"#\"+l[0]+e),s=a.find(l[1]).outerHeight()||0,f=a.attr(\"minLeft\")||181*o.minIndex+\"px\",c=a.css(\"position\");o.record(a),o.minLeft[0]&&(f=o.minLeft[0],o.minLeft.shift()),a.attr(\"position\",c),r.style(e,{width:180,height:s,left:f,top:n.height()-s,position:\"fixed\",overflow:\"hidden\"},!0),a.find(\".layui-layer-min\").hide(),\"page\"===a.attr(\"type\")&&a.find(l[4]).hide(),o.rescollbar(e),a.attr(\"minLeft\")||o.minIndex++,a.attr(\"minLeft\",f)},r.restore=function(e){var t=i(\"#\"+l[0]+e),n=t.attr(\"area\").split(\",\");t.attr(\"type\");r.style(e,{width:parseFloat(n[0]),height:parseFloat(n[1]),top:parseFloat(n[2]),left:parseFloat(n[3]),position:t.attr(\"position\"),overflow:\"visible\"},!0),t.find(\".layui-layer-max\").removeClass(\"layui-layer-maxmin\"),t.find(\".layui-layer-min\").show(),\"page\"===t.attr(\"type\")&&t.find(l[4]).show(),o.rescollbar(e)},r.full=function(e){var t,a=i(\"#\"+l[0]+e);o.record(a),l.html.attr(\"layer-full\")||l.html.css(\"overflow\",\"hidden\").attr(\"layer-full\",e),clearTimeout(t),t=setTimeout(function(){var t=\"fixed\"===a.css(\"position\");r.style(e,{top:t?0:n.scrollTop(),left:t?0:n.scrollLeft(),width:n.width(),height:n.height()},!0),a.find(\".layui-layer-min\").hide()},100)},r.title=function(e,t){var n=i(\"#\"+l[0]+(t||r.index)).find(l[1]);n.html(e)},r.close=function(e){var t=i(\"#\"+l[0]+e),n=t.attr(\"type\"),a=\"layer-anim-close\";if(t[0]){var s=\"layui-layer-wrap\",f=function(){if(n===o.type[1]&&\"object\"===t.attr(\"conType\")){t.children(\":not(.\"+l[5]+\")\").remove();for(var a=t.find(\".\"+s),r=0;r<2;r++)a.unwrap();a.css(\"display\",a.data(\"display\")).removeClass(s)}else{if(n===o.type[2])try{var f=i(\"#\"+l[4]+e)[0];f.contentWindow.document.write(\"\"),f.contentWindow.close(),t.find(\".\"+l[5])[0].removeChild(f)}catch(c){}t[0].innerHTML=\"\",t.remove()}\"function\"==typeof o.end[e]&&o.end[e](),delete o.end[e]};t.data(\"isOutAnim\")&&t.addClass(a),i(\"#layui-layer-moves, #layui-layer-shade\"+e).remove(),6==r.ie&&o.reselect(),o.rescollbar(e),t.attr(\"minLeft\")&&(o.minIndex--,o.minLeft.push(t.attr(\"minLeft\"))),r.ie&&r.ie<10||!t.data(\"isOutAnim\")?f():setTimeout(function(){f()},200)}},r.closeAll=function(e){i.each(i(\".\"+l[0]),function(){var t=i(this),n=e?t.attr(\"type\")===e:1;n&&r.close(t.attr(\"times\")),n=null})};var f=r.cache||{},c=function(e){return f.skin?\" \"+f.skin+\" \"+f.skin+\"-\"+e:\"\"};r.prompt=function(e,t){var a=\"\";if(e=e||{},\"function\"==typeof e&&(t=e),e.area){var o=e.area;a='style=\"width: '+o[0]+\"; height: \"+o[1]+';\"',delete e.area}var s,l=2==e.formType?'<textarea class=\"layui-layer-input\"'+a+\">\"+(e.value||\"\")+\"</textarea>\":function(){return'<input type=\"'+(1==e.formType?\"password\":\"text\")+'\" class=\"layui-layer-input\" value=\"'+(e.value||\"\")+'\">'}(),f=e.success;return delete e.success,r.open(i.extend({type:1,btn:[\"&#x786E;&#x5B9A;\",\"&#x53D6;&#x6D88;\"],content:l,skin:\"layui-layer-prompt\"+c(\"prompt\"),maxWidth:n.width(),success:function(e){s=e.find(\".layui-layer-input\"),s.focus(),\"function\"==typeof f&&f(e)},resize:!1,yes:function(i){var n=s.val();\"\"===n?s.focus():n.length>(e.maxlength||500)?r.tips(\"&#x6700;&#x591A;&#x8F93;&#x5165;\"+(e.maxlength||500)+\"&#x4E2A;&#x5B57;&#x6570;\",s,{tips:1}):t&&t(n,i,s)}},e))},r.tab=function(e){e=e||{};var t=e.tab||{},n=e.success;return delete e.success,r.open(i.extend({type:1,skin:\"layui-layer-tab\"+c(\"tab\"),resize:!1,title:function(){var e=t.length,i=1,n=\"\";if(e>0)for(n='<span class=\"layui-layer-tabnow\">'+t[0].title+\"</span>\";i<e;i++)n+=\"<span>\"+t[i].title+\"</span>\";return n}(),content:'<ul class=\"layui-layer-tabmain\">'+function(){var e=t.length,i=1,n=\"\";if(e>0)for(n='<li class=\"layui-layer-tabli xubox_tab_layer\">'+(t[0].content||\"no content\")+\"</li>\";i<e;i++)n+='<li class=\"layui-layer-tabli\">'+(t[i].content||\"no  content\")+\"</li>\";return n}()+\"</ul>\",success:function(t){var a=t.find(\".layui-layer-title\").children(),o=t.find(\".layui-layer-tabmain\").children();a.on(\"mousedown\",function(t){t.stopPropagation?t.stopPropagation():t.cancelBubble=!0;var n=i(this),a=n.index();n.addClass(\"layui-layer-tabnow\").siblings().removeClass(\"layui-layer-tabnow\"),o.eq(a).show().siblings().hide(),\"function\"==typeof e.change&&e.change(a)}),\"function\"==typeof n&&n(t)}},e))},r.photos=function(t,n,a){function o(e,t,i){var n=new Image;return n.src=e,n.complete?t(n):(n.onload=function(){n.onload=null,t(n)},void(n.onerror=function(e){n.onerror=null,i(e)}))}var s={};if(t=t||{},t.photos){var l=t.photos.constructor===Object,f=l?t.photos:{},u=f.data||[],d=f.start||0;s.imgIndex=(0|d)+1,t.img=t.img||\"img\";var y=t.success;if(delete t.success,l){if(0===u.length)return r.msg(\"&#x6CA1;&#x6709;&#x56FE;&#x7247;\")}else{var p=i(t.photos),h=function(){u=[],p.find(t.img).each(function(e){var t=i(this);t.attr(\"layer-index\",e),u.push({alt:t.attr(\"alt\"),pid:t.attr(\"layer-pid\"),src:t.attr(\"layer-src\")||t.attr(\"src\"),thumb:t.attr(\"src\")})})};if(h(),0===u.length)return;if(n||p.on(\"click\",t.img,function(){var e=i(this),n=e.attr(\"layer-index\");r.photos(i.extend(t,{photos:{start:n,data:u,tab:t.tab},full:t.full}),!0),h()}),!n)return}s.imgprev=function(e){s.imgIndex--,s.imgIndex<1&&(s.imgIndex=u.length),s.tabimg(e)},s.imgnext=function(e,t){s.imgIndex++,s.imgIndex>u.length&&(s.imgIndex=1,t)||s.tabimg(e)},s.keyup=function(e){if(!s.end){var t=e.keyCode;e.preventDefault(),37===t?s.imgprev(!0):39===t?s.imgnext(!0):27===t&&r.close(s.index)}},s.tabimg=function(e){if(!(u.length<=1))return f.start=s.imgIndex-1,r.close(s.index),r.photos(t,!0,e)},s.event=function(){s.bigimg.hover(function(){s.imgsee.show()},function(){s.imgsee.hide()}),s.bigimg.find(\".layui-layer-imgprev\").on(\"click\",function(e){e.preventDefault(),s.imgprev()}),s.bigimg.find(\".layui-layer-imgnext\").on(\"click\",function(e){e.preventDefault(),s.imgnext()}),i(document).on(\"keyup\",s.keyup)},s.loadi=r.load(1,{shade:!(\"shade\"in t)&&.9,scrollbar:!1}),o(u[d].src,function(n){r.close(s.loadi),s.index=r.open(i.extend({type:1,id:\"layui-layer-photos\",area:function(){var a=[n.width,n.height],o=[i(e).width()-100,i(e).height()-100];if(!t.full&&(a[0]>o[0]||a[1]>o[1])){var r=[a[0]/o[0],a[1]/o[1]];r[0]>r[1]?(a[0]=a[0]/r[0],a[1]=a[1]/r[0]):r[0]<r[1]&&(a[0]=a[0]/r[1],a[1]=a[1]/r[1])}return[a[0]+\"px\",a[1]+\"px\"]}(),title:!1,shade:.9,shadeClose:!0,closeBtn:!1,move:\".layui-layer-phimg img\",moveType:1,scrollbar:!1,moveOut:!0,isOutAnim:!1,skin:\"layui-layer-photos\"+c(\"photos\"),content:'<div class=\"layui-layer-phimg\"><img src=\"'+u[d].src+'\" alt=\"'+(u[d].alt||\"\")+'\" layer-pid=\"'+u[d].pid+'\"><div class=\"layui-layer-imgsee\">'+(u.length>1?'<span class=\"layui-layer-imguide\"><a href=\"javascript:;\" class=\"layui-layer-iconext layui-layer-imgprev\"></a><a href=\"javascript:;\" class=\"layui-layer-iconext layui-layer-imgnext\"></a></span>':\"\")+'<div class=\"layui-layer-imgbar\" style=\"display:'+(a?\"block\":\"\")+'\"><span class=\"layui-layer-imgtit\"><a href=\"javascript:;\">'+(u[d].alt||\"\")+\"</a><em>\"+s.imgIndex+\"/\"+u.length+\"</em></span></div></div></div>\",success:function(e,i){s.bigimg=e.find(\".layui-layer-phimg\"),s.imgsee=e.find(\".layui-layer-imguide,.layui-layer-imgbar\"),s.event(e),t.tab&&t.tab(u[d],e),\"function\"==typeof y&&y(e)},end:function(){s.end=!0,i(document).off(\"keyup\",s.keyup)}},t))},function(){r.close(s.loadi),r.msg(\"&#x5F53;&#x524D;&#x56FE;&#x7247;&#x5730;&#x5740;&#x5F02;&#x5E38;<br>&#x662F;&#x5426;&#x7EE7;&#x7EED;&#x67E5;&#x770B;&#x4E0B;&#x4E00;&#x5F20;&#xFF1F;\",{time:3e4,btn:[\"&#x4E0B;&#x4E00;&#x5F20;\",\"&#x4E0D;&#x770B;&#x4E86;\"],yes:function(){u.length>1&&s.imgnext(!0,!0)}})})}},o.run=function(t){i=t,n=i(e),l.html=i(\"html\"),r.open=function(e){var t=new s(e);return t.index}},e.layui&&layui.define?(r.ready(),layui.define(\"jquery\",function(t){r.path=layui.cache.dir,o.run(layui.jquery),e.layer=r,t(\"layer\",r)})):\"function\"==typeof define&&define.amd?define([\"jquery\"],function(){return o.run(e.jQuery),r}):function(){o.run(e.jQuery),r.ready()}()}(window);"
  },
  {
    "path": "static/layer/mobile/layer.js",
    "content": "/*! layer mobile-v2.0.0 Web弹层组件 MIT License  http://layer.layui.com/mobile  By 贤心 */\n ;!function(e){\"use strict\";var t=document,n=\"querySelectorAll\",i=\"getElementsByClassName\",a=function(e){return t[n](e)},s={type:0,shade:!0,shadeClose:!0,fixed:!0,anim:\"scale\"},l={extend:function(e){var t=JSON.parse(JSON.stringify(s));for(var n in e)t[n]=e[n];return t},timer:{},end:{}};l.touch=function(e,t){e.addEventListener(\"click\",function(e){t.call(this,e)},!1)};var r=0,o=[\"layui-m-layer\"],c=function(e){var t=this;t.config=l.extend(e),t.view()};c.prototype.view=function(){var e=this,n=e.config,s=t.createElement(\"div\");e.id=s.id=o[0]+r,s.setAttribute(\"class\",o[0]+\" \"+o[0]+(n.type||0)),s.setAttribute(\"index\",r);var l=function(){var e=\"object\"==typeof n.title;return n.title?'<h3 style=\"'+(e?n.title[1]:\"\")+'\">'+(e?n.title[0]:n.title)+\"</h3>\":\"\"}(),c=function(){\"string\"==typeof n.btn&&(n.btn=[n.btn]);var e,t=(n.btn||[]).length;return 0!==t&&n.btn?(e='<span yes type=\"1\">'+n.btn[0]+\"</span>\",2===t&&(e='<span no type=\"0\">'+n.btn[1]+\"</span>\"+e),'<div class=\"layui-m-layerbtn\">'+e+\"</div>\"):\"\"}();if(n.fixed||(n.top=n.hasOwnProperty(\"top\")?n.top:100,n.style=n.style||\"\",n.style+=\" top:\"+(t.body.scrollTop+n.top)+\"px\"),2===n.type&&(n.content='<i></i><i class=\"layui-m-layerload\"></i><i></i><p>'+(n.content||\"\")+\"</p>\"),n.skin&&(n.anim=\"up\"),\"msg\"===n.skin&&(n.shade=!1),s.innerHTML=(n.shade?\"<div \"+(\"string\"==typeof n.shade?'style=\"'+n.shade+'\"':\"\")+' class=\"layui-m-layershade\"></div>':\"\")+'<div class=\"layui-m-layermain\" '+(n.fixed?\"\":'style=\"position:static;\"')+'><div class=\"layui-m-layersection\"><div class=\"layui-m-layerchild '+(n.skin?\"layui-m-layer-\"+n.skin+\" \":\"\")+(n.className?n.className:\"\")+\" \"+(n.anim?\"layui-m-anim-\"+n.anim:\"\")+'\" '+(n.style?'style=\"'+n.style+'\"':\"\")+\">\"+l+'<div class=\"layui-m-layercont\">'+n.content+\"</div>\"+c+\"</div></div></div>\",!n.type||2===n.type){var d=t[i](o[0]+n.type),y=d.length;y>=1&&layer.close(d[0].getAttribute(\"index\"))}document.body.appendChild(s);var u=e.elem=a(\"#\"+e.id)[0];n.success&&n.success(u),e.index=r++,e.action(n,u)},c.prototype.action=function(e,t){var n=this;e.time&&(l.timer[n.index]=setTimeout(function(){layer.close(n.index)},1e3*e.time));var a=function(){var t=this.getAttribute(\"type\");0==t?(e.no&&e.no(),layer.close(n.index)):e.yes?e.yes(n.index):layer.close(n.index)};if(e.btn)for(var s=t[i](\"layui-m-layerbtn\")[0].children,r=s.length,o=0;o<r;o++)l.touch(s[o],a);if(e.shade&&e.shadeClose){var c=t[i](\"layui-m-layershade\")[0];l.touch(c,function(){layer.close(n.index,e.end)})}e.end&&(l.end[n.index]=e.end)},e.layer={v:\"2.0\",index:r,open:function(e){var t=new c(e||{});return t.index},close:function(e){var n=a(\"#\"+o[0]+e)[0];n&&(n.innerHTML=\"\",t.body.removeChild(n),clearTimeout(l.timer[e]),delete l.timer[e],\"function\"==typeof l.end[e]&&l.end[e](),delete l.end[e])},closeAll:function(){for(var e=t[i](o[0]),n=0,a=e.length;n<a;n++)layer.close(0|e[0].getAttribute(\"index\"))}},\"function\"==typeof define?define(function(){return layer}):function(){var e=document.scripts,n=e[e.length-1],i=n.src,a=i.substring(0,i.lastIndexOf(\"/\")+1);n.getAttribute(\"merge\")||document.head.appendChild(function(){var e=t.createElement(\"link\");return e.href=a+\"need/layer.css?2.0\",e.type=\"text/css\",e.rel=\"styleSheet\",e.id=\"layermcss\",e}())}()}(window);"
  },
  {
    "path": "static/layer/mobile/need/layer.css",
    "content": ".layui-m-layer{position:relative;z-index:19891014}.layui-m-layer *{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}.layui-m-layermain,.layui-m-layershade{position:fixed;left:0;top:0;width:100%;height:100%}.layui-m-layershade{background-color:rgba(0,0,0,.7);pointer-events:auto}.layui-m-layermain{display:table;font-family:Helvetica,arial,sans-serif;pointer-events:none}.layui-m-layermain .layui-m-layersection{display:table-cell;vertical-align:middle;text-align:center}.layui-m-layerchild{position:relative;display:inline-block;text-align:left;background-color:#fff;font-size:14px;border-radius:5px;box-shadow:0 0 8px rgba(0,0,0,.1);pointer-events:auto;-webkit-overflow-scrolling:touch;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-duration:.2s;animation-duration:.2s}@-webkit-keyframes layui-m-anim-scale{0%{opacity:0;-webkit-transform:scale(.5);transform:scale(.5)}100%{opacity:1;-webkit-transform:scale(1);transform:scale(1)}}@keyframes layui-m-anim-scale{0%{opacity:0;-webkit-transform:scale(.5);transform:scale(.5)}100%{opacity:1;-webkit-transform:scale(1);transform:scale(1)}}.layui-m-anim-scale{animation-name:layui-m-anim-scale;-webkit-animation-name:layui-m-anim-scale}@-webkit-keyframes layui-m-anim-up{0%{opacity:0;-webkit-transform:translateY(800px);transform:translateY(800px)}100%{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}}@keyframes layui-m-anim-up{0%{opacity:0;-webkit-transform:translateY(800px);transform:translateY(800px)}100%{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}}.layui-m-anim-up{-webkit-animation-name:layui-m-anim-up;animation-name:layui-m-anim-up}.layui-m-layer0 .layui-m-layerchild{width:90%;max-width:640px}.layui-m-layer1 .layui-m-layerchild{border:none;border-radius:0}.layui-m-layer2 .layui-m-layerchild{width:auto;max-width:260px;min-width:40px;border:none;background:0 0;box-shadow:none;color:#fff}.layui-m-layerchild h3{padding:0 10px;height:60px;line-height:60px;font-size:16px;font-weight:400;border-radius:5px 5px 0 0;text-align:center}.layui-m-layerbtn span,.layui-m-layerchild h3{text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.layui-m-layercont{padding:50px 30px;line-height:22px;text-align:center}.layui-m-layer1 .layui-m-layercont{padding:0;text-align:left}.layui-m-layer2 .layui-m-layercont{text-align:center;padding:0;line-height:0}.layui-m-layer2 .layui-m-layercont i{width:25px;height:25px;margin-left:8px;display:inline-block;background-color:#fff;border-radius:100%;-webkit-animation:layui-m-anim-loading 1.4s infinite ease-in-out;animation:layui-m-anim-loading 1.4s infinite ease-in-out;-webkit-animation-fill-mode:both;animation-fill-mode:both}.layui-m-layerbtn,.layui-m-layerbtn span{position:relative;text-align:center;border-radius:0 0 5px 5px}.layui-m-layer2 .layui-m-layercont p{margin-top:20px}@-webkit-keyframes layui-m-anim-loading{0%,100%,80%{transform:scale(0);-webkit-transform:scale(0)}40%{transform:scale(1);-webkit-transform:scale(1)}}@keyframes layui-m-anim-loading{0%,100%,80%{transform:scale(0);-webkit-transform:scale(0)}40%{transform:scale(1);-webkit-transform:scale(1)}}.layui-m-layer2 .layui-m-layercont i:first-child{margin-left:0;-webkit-animation-delay:-.32s;animation-delay:-.32s}.layui-m-layer2 .layui-m-layercont i.layui-m-layerload{-webkit-animation-delay:-.16s;animation-delay:-.16s}.layui-m-layer2 .layui-m-layercont>div{line-height:22px;padding-top:7px;margin-bottom:20px;font-size:14px}.layui-m-layerbtn{display:box;display:-moz-box;display:-webkit-box;width:100%;height:50px;line-height:50px;font-size:0;border-top:1px solid #D0D0D0;background-color:#F2F2F2}.layui-m-layerbtn span{display:block;-moz-box-flex:1;box-flex:1;-webkit-box-flex:1;font-size:14px;cursor:pointer}.layui-m-layerbtn span[yes]{color:#40AFFE}.layui-m-layerbtn span[no]{border-right:1px solid #D0D0D0;border-radius:0 0 0 5px}.layui-m-layerbtn span:active{background-color:#F6F6F6}.layui-m-layerend{position:absolute;right:7px;top:10px;width:30px;height:30px;border:0;font-weight:400;background:0 0;cursor:pointer;-webkit-appearance:none;font-size:30px}.layui-m-layerend::after,.layui-m-layerend::before{position:absolute;left:5px;top:15px;content:'';width:18px;height:1px;background-color:#999;transform:rotate(45deg);-webkit-transform:rotate(45deg);border-radius:3px}.layui-m-layerend::after{transform:rotate(-45deg);-webkit-transform:rotate(-45deg)}body .layui-m-layer .layui-m-layer-footer{position:fixed;width:95%;max-width:100%;margin:0 auto;left:0;right:0;bottom:10px;background:0 0}.layui-m-layer-footer .layui-m-layercont{padding:20px;border-radius:5px 5px 0 0;background-color:rgba(255,255,255,.8)}.layui-m-layer-footer .layui-m-layerbtn{display:block;height:auto;background:0 0;border-top:none}.layui-m-layer-footer .layui-m-layerbtn span{background-color:rgba(255,255,255,.8)}.layui-m-layer-footer .layui-m-layerbtn span[no]{color:#FD482C;border-top:1px solid #c2c2c2;border-radius:0 0 5px 5px}.layui-m-layer-footer .layui-m-layerbtn span[yes]{margin-top:10px;border-radius:5px}body .layui-m-layer .layui-m-layer-msg{width:auto;max-width:90%;margin:0 auto;bottom:-150px;background-color:rgba(0,0,0,.7);color:#fff}.layui-m-layer-msg .layui-m-layercont{padding:10px 20px}"
  },
  {
    "path": "static/layer/skin/default/layer.css",
    "content": ".layui-layer-imgbar,.layui-layer-imgtit a,.layui-layer-tab .layui-layer-title span,.layui-layer-title{text-overflow:ellipsis;white-space:nowrap}*html{background-image:url(about:blank);background-attachment:fixed}html #layuicss-skinlayercss{display:none;position:absolute;width:1989px}.layui-layer,.layui-layer-shade{position:fixed;_position:absolute;pointer-events:auto}.layui-layer-shade{top:0;left:0;width:100%;height:100%;_height:expression(document.body.offsetHeight+\"px\")}.layui-layer{-webkit-overflow-scrolling:touch;top:150px;left:0;margin:0;padding:0;background-color:#fff;-webkit-background-clip:content;box-shadow:1px 1px 50px rgba(0,0,0,.3)}.layui-layer-close{position:absolute}.layui-layer-content{position:relative}.layui-layer-border{border:1px solid #B2B2B2;border:1px solid rgba(0,0,0,.1);box-shadow:1px 1px 5px rgba(0,0,0,.2)}.layui-layer-load{background:url(loading-1.gif) center center no-repeat #eee}.layui-layer-ico{background:url(icon.png) no-repeat}.layui-layer-btn a,.layui-layer-dialog .layui-layer-ico,.layui-layer-setwin a{display:inline-block;*display:inline;*zoom:1;vertical-align:top}.layui-layer-move{display:none;position:fixed;*position:absolute;left:0;top:0;width:100%;height:100%;cursor:move;opacity:0;filter:alpha(opacity=0);background-color:#fff;z-index:2147483647}.layui-layer-resize{position:absolute;width:15px;height:15px;right:0;bottom:0;cursor:se-resize}.layui-layer{border-radius:2px;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-duration:.3s;animation-duration:.3s}@-webkit-keyframes layer-bounceIn{0%{opacity:0;-webkit-transform:scale(.5);transform:scale(.5)}100%{opacity:1;-webkit-transform:scale(1);transform:scale(1)}}@keyframes layer-bounceIn{0%{opacity:0;-webkit-transform:scale(.5);-ms-transform:scale(.5);transform:scale(.5)}100%{opacity:1;-webkit-transform:scale(1);-ms-transform:scale(1);transform:scale(1)}}.layer-anim{-webkit-animation-name:layer-bounceIn;animation-name:layer-bounceIn}@-webkit-keyframes layer-zoomInDown{0%{opacity:0;-webkit-transform:scale(.1) translateY(-2000px);transform:scale(.1) translateY(-2000px);-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}60%{opacity:1;-webkit-transform:scale(.475) translateY(60px);transform:scale(.475) translateY(60px);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}}@keyframes layer-zoomInDown{0%{opacity:0;-webkit-transform:scale(.1) translateY(-2000px);-ms-transform:scale(.1) translateY(-2000px);transform:scale(.1) translateY(-2000px);-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}60%{opacity:1;-webkit-transform:scale(.475) translateY(60px);-ms-transform:scale(.475) translateY(60px);transform:scale(.475) translateY(60px);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}}.layer-anim-01{-webkit-animation-name:layer-zoomInDown;animation-name:layer-zoomInDown}@-webkit-keyframes layer-fadeInUpBig{0%{opacity:0;-webkit-transform:translateY(2000px);transform:translateY(2000px)}100%{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}}@keyframes layer-fadeInUpBig{0%{opacity:0;-webkit-transform:translateY(2000px);-ms-transform:translateY(2000px);transform:translateY(2000px)}100%{opacity:1;-webkit-transform:translateY(0);-ms-transform:translateY(0);transform:translateY(0)}}.layer-anim-02{-webkit-animation-name:layer-fadeInUpBig;animation-name:layer-fadeInUpBig}@-webkit-keyframes layer-zoomInLeft{0%{opacity:0;-webkit-transform:scale(.1) translateX(-2000px);transform:scale(.1) translateX(-2000px);-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}60%{opacity:1;-webkit-transform:scale(.475) translateX(48px);transform:scale(.475) translateX(48px);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}}@keyframes layer-zoomInLeft{0%{opacity:0;-webkit-transform:scale(.1) translateX(-2000px);-ms-transform:scale(.1) translateX(-2000px);transform:scale(.1) translateX(-2000px);-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}60%{opacity:1;-webkit-transform:scale(.475) translateX(48px);-ms-transform:scale(.475) translateX(48px);transform:scale(.475) translateX(48px);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}}.layer-anim-03{-webkit-animation-name:layer-zoomInLeft;animation-name:layer-zoomInLeft}@-webkit-keyframes layer-rollIn{0%{opacity:0;-webkit-transform:translateX(-100%) rotate(-120deg);transform:translateX(-100%) rotate(-120deg)}100%{opacity:1;-webkit-transform:translateX(0) rotate(0);transform:translateX(0) rotate(0)}}@keyframes layer-rollIn{0%{opacity:0;-webkit-transform:translateX(-100%) rotate(-120deg);-ms-transform:translateX(-100%) rotate(-120deg);transform:translateX(-100%) rotate(-120deg)}100%{opacity:1;-webkit-transform:translateX(0) rotate(0);-ms-transform:translateX(0) rotate(0);transform:translateX(0) rotate(0)}}.layer-anim-04{-webkit-animation-name:layer-rollIn;animation-name:layer-rollIn}@keyframes layer-fadeIn{0%{opacity:0}100%{opacity:1}}.layer-anim-05{-webkit-animation-name:layer-fadeIn;animation-name:layer-fadeIn}@-webkit-keyframes layer-shake{0%,100%{-webkit-transform:translateX(0);transform:translateX(0)}10%,30%,50%,70%,90%{-webkit-transform:translateX(-10px);transform:translateX(-10px)}20%,40%,60%,80%{-webkit-transform:translateX(10px);transform:translateX(10px)}}@keyframes layer-shake{0%,100%{-webkit-transform:translateX(0);-ms-transform:translateX(0);transform:translateX(0)}10%,30%,50%,70%,90%{-webkit-transform:translateX(-10px);-ms-transform:translateX(-10px);transform:translateX(-10px)}20%,40%,60%,80%{-webkit-transform:translateX(10px);-ms-transform:translateX(10px);transform:translateX(10px)}}.layer-anim-06{-webkit-animation-name:layer-shake;animation-name:layer-shake}@-webkit-keyframes fadeIn{0%{opacity:0}100%{opacity:1}}.layui-layer-title{padding:0 80px 0 20px;height:42px;line-height:42px;border-bottom:1px solid #eee;font-size:14px;color:#333;overflow:hidden;background-color:#F8F8F8;border-radius:2px 2px 0 0}.layui-layer-setwin{position:absolute;right:15px;*right:0;top:15px;font-size:0;line-height:initial}.layui-layer-setwin a{position:relative;width:16px;height:16px;margin-left:10px;font-size:12px;_overflow:hidden}.layui-layer-setwin .layui-layer-min cite{position:absolute;width:14px;height:2px;left:0;top:50%;margin-top:-1px;background-color:#2E2D3C;cursor:pointer;_overflow:hidden}.layui-layer-setwin .layui-layer-min:hover cite{background-color:#2D93CA}.layui-layer-setwin .layui-layer-max{background-position:-32px -40px}.layui-layer-setwin .layui-layer-max:hover{background-position:-16px -40px}.layui-layer-setwin .layui-layer-maxmin{background-position:-65px -40px}.layui-layer-setwin .layui-layer-maxmin:hover{background-position:-49px -40px}.layui-layer-setwin .layui-layer-close1{background-position:1px -40px;cursor:pointer}.layui-layer-setwin .layui-layer-close1:hover{opacity:.7}.layui-layer-setwin .layui-layer-close2{position:absolute;right:-28px;top:-28px;width:30px;height:30px;margin-left:0;background-position:-149px -31px;*right:-18px;_display:none}.layui-layer-setwin .layui-layer-close2:hover{background-position:-180px -31px}.layui-layer-btn{text-align:right;padding:0 10px 12px;pointer-events:auto;user-select:none;-webkit-user-select:none}.layui-layer-btn a{height:28px;line-height:28px;margin:6px 6px 0;padding:0 15px;border:1px solid #dedede;background-color:#f1f1f1;color:#333;border-radius:2px;font-weight:400;cursor:pointer;text-decoration:none}.layui-layer-btn a:hover{opacity:.9;text-decoration:none}.layui-layer-btn a:active{opacity:.8}.layui-layer-btn .layui-layer-btn0{border-color:#4898d5;background-color:#2e8ded;color:#fff}.layui-layer-btn-l{text-align:left}.layui-layer-btn-c{text-align:center}.layui-layer-dialog{min-width:260px}.layui-layer-dialog .layui-layer-content{position:relative;padding:20px;line-height:24px;word-break:break-all;overflow:hidden;font-size:14px;overflow-x:hidden;overflow-y:auto}.layui-layer-dialog .layui-layer-content .layui-layer-ico{position:absolute;top:16px;left:15px;_left:-40px;width:30px;height:30px}.layui-layer-ico1{background-position:-30px 0}.layui-layer-ico2{background-position:-60px 0}.layui-layer-ico3{background-position:-90px 0}.layui-layer-ico4{background-position:-120px 0}.layui-layer-ico5{background-position:-150px 0}.layui-layer-ico6{background-position:-180px 0}.layui-layer-rim{border:6px solid #8D8D8D;border:6px solid rgba(0,0,0,.3);border-radius:5px;box-shadow:none}.layui-layer-msg{min-width:180px;border:1px solid #D3D4D3;box-shadow:none}.layui-layer-hui{min-width:100px;background-color:#000;filter:alpha(opacity=60);background-color:rgba(0,0,0,.6);color:#fff;border:none}.layui-layer-hui .layui-layer-content{padding:12px 25px;text-align:center}.layui-layer-dialog .layui-layer-padding{padding:20px 20px 20px 55px;text-align:left}.layui-layer-page .layui-layer-content{position:relative;overflow:auto}.layui-layer-iframe .layui-layer-btn,.layui-layer-page .layui-layer-btn{padding-top:10px}.layui-layer-nobg{background:0 0}.layui-layer-iframe iframe{display:block;width:100%}.layui-layer-loading{border-radius:100%;background:0 0;box-shadow:none;border:none}.layui-layer-loading .layui-layer-content{width:60px;height:24px;background:url(loading-0.gif) no-repeat}.layui-layer-loading .layui-layer-loading1{width:37px;height:37px;background:url(loading-1.gif) no-repeat}.layui-layer-ico16,.layui-layer-loading .layui-layer-loading2{width:32px;height:32px;background:url(loading-2.gif) no-repeat}.layui-layer-tips{background:0 0;box-shadow:none;border:none}.layui-layer-tips .layui-layer-content{position:relative;line-height:22px;min-width:12px;padding:5px 10px;font-size:12px;_float:left;border-radius:2px;box-shadow:1px 1px 3px rgba(0,0,0,.2);background-color:#000;color:#fff}.layui-layer-tips .layui-layer-close{right:-2px;top:-1px}.layui-layer-tips i.layui-layer-TipsG{position:absolute;width:0;height:0;border-width:8px;border-color:transparent;border-style:dashed;*overflow:hidden}.layui-layer-tips i.layui-layer-TipsB,.layui-layer-tips i.layui-layer-TipsT{left:5px;border-right-style:solid;border-right-color:#000}.layui-layer-tips i.layui-layer-TipsT{bottom:-8px}.layui-layer-tips i.layui-layer-TipsB{top:-8px}.layui-layer-tips i.layui-layer-TipsL,.layui-layer-tips i.layui-layer-TipsR{top:1px;border-bottom-style:solid;border-bottom-color:#000}.layui-layer-tips i.layui-layer-TipsR{left:-8px}.layui-layer-tips i.layui-layer-TipsL{right:-8px}.layui-layer-lan[type=dialog]{min-width:280px}.layui-layer-lan .layui-layer-title{background:#4476A7;color:#fff;border:none}.layui-layer-lan .layui-layer-btn{padding:5px 10px 10px;text-align:right;border-top:1px solid #E9E7E7}.layui-layer-lan .layui-layer-btn a{background:#BBB5B5;border:none}.layui-layer-lan .layui-layer-btn .layui-layer-btn1{background:#C9C5C5}.layui-layer-molv .layui-layer-title{background:#009f95;color:#fff;border:none}.layui-layer-molv .layui-layer-btn a{background:#009f95}.layui-layer-molv .layui-layer-btn .layui-layer-btn1{background:#92B8B1}.layui-layer-iconext{background:url(icon-ext.png) no-repeat}.layui-layer-prompt .layui-layer-input{display:block;width:220px;height:30px;margin:0 auto;line-height:30px;padding:0 5px;border:1px solid #ccc;box-shadow:1px 1px 5px rgba(0,0,0,.1) inset;color:#333}.layui-layer-prompt textarea.layui-layer-input{width:300px;height:100px;line-height:20px}.layui-layer-prompt .layui-layer-content{padding:20px}.layui-layer-prompt .layui-layer-btn{padding-top:0}.layui-layer-tab{box-shadow:1px 1px 50px rgba(0,0,0,.4)}.layui-layer-tab .layui-layer-title{padding-left:0;border-bottom:1px solid #ccc;background-color:#eee;overflow:visible}.layui-layer-tab .layui-layer-title span{position:relative;float:left;min-width:80px;max-width:260px;padding:0 20px;text-align:center;cursor:default;overflow:hidden}.layui-layer-tab .layui-layer-title span.layui-layer-tabnow{height:43px;border-left:1px solid #ccc;border-right:1px solid #ccc;background-color:#fff;z-index:10}.layui-layer-tab .layui-layer-title span:first-child{border-left:none}.layui-layer-tabmain{line-height:24px;clear:both}.layui-layer-tabmain .layui-layer-tabli{display:none}.layui-layer-tabmain .layui-layer-tabli.xubox_tab_layer{display:block}.xubox_tabclose{position:absolute;right:10px;top:5px;cursor:pointer}.layui-layer-photos{-webkit-animation-duration:.8s;animation-duration:.8s}.layui-layer-photos .layui-layer-content{overflow:hidden;text-align:center}.layui-layer-photos .layui-layer-phimg img{position:relative;width:100%;display:inline-block;*display:inline;*zoom:1;vertical-align:top}.layui-layer-imgbar,.layui-layer-imguide{display:none}.layui-layer-imgnext,.layui-layer-imgprev{position:absolute;top:50%;width:27px;_width:44px;height:44px;margin-top:-22px;outline:0;blr:expression(this.onFocus=this.blur())}.layui-layer-imgprev{left:10px;background-position:-5px -5px;_background-position:-70px -5px}.layui-layer-imgprev:hover{background-position:-33px -5px;_background-position:-120px -5px}.layui-layer-imgnext{right:10px;_right:8px;background-position:-5px -50px;_background-position:-70px -50px}.layui-layer-imgnext:hover{background-position:-33px -50px;_background-position:-120px -50px}.layui-layer-imgbar{position:absolute;left:0;bottom:0;width:100%;height:32px;line-height:32px;background-color:rgba(0,0,0,.8);background-color:#000\\9;filter:Alpha(opacity=80);color:#fff;overflow:hidden;font-size:0}.layui-layer-imgtit *{display:inline-block;*display:inline;*zoom:1;vertical-align:top;font-size:12px}.layui-layer-imgtit a{max-width:65%;overflow:hidden;color:#fff}.layui-layer-imgtit a:hover{color:#fff;text-decoration:underline}.layui-layer-imgtit em{padding-left:10px;font-style:normal}@-webkit-keyframes layer-bounceOut{100%{opacity:0;-webkit-transform:scale(.7);transform:scale(.7)}30%{-webkit-transform:scale(1.05);transform:scale(1.05)}0%{-webkit-transform:scale(1);transform:scale(1)}}@keyframes layer-bounceOut{100%{opacity:0;-webkit-transform:scale(.7);-ms-transform:scale(.7);transform:scale(.7)}30%{-webkit-transform:scale(1.05);-ms-transform:scale(1.05);transform:scale(1.05)}0%{-webkit-transform:scale(1);-ms-transform:scale(1);transform:scale(1)}}.layer-anim-close{-webkit-animation-name:layer-bounceOut;animation-name:layer-bounceOut;-webkit-animation-duration:.2s;animation-duration:.2s}@media screen and (max-width:1100px){.layui-layer-iframe{overflow-y:auto;-webkit-overflow-scrolling:touch}}"
  },
  {
    "path": "static/mammoth/mammoth.browser.js",
    "content": "// Module: base64-js@1.1.2\n// License: MIT\n//\n// Module: bluebird@3.4.1\n// License: MIT\n//\n// Module: buffer-shims@1.0.0\n// License: MIT\n//\n// Module: buffer@4.6.0\n// License: MIT\n//\n// Module: core-util-is@1.0.2\n// License: MIT\n//\n// Module: events@1.1.0\n// License: MIT\n//\n// Module: ieee754@1.1.6\n// License: MIT\n//\n// Module: inherits@2.0.1\n// License: ISC\n//\n// Module: isarray@1.0.0\n// License: MIT\n//\n// Module: isarray@1.0.0\n// License: MIT\n//\n// Module: jszip@2.5.0\n// License: MIT or GPLv3\n//\n// Module: lodash@3.10.1\n// License: MIT\n//\n// Module: lop@0.4.0\n// License: BSD\n//\n// Module: mammoth@1.2.5\n// License: BSD-2-Clause\n//\n// Module: option@0.2.3\n// License: BSD\n//\n// Module: pako@0.2.7\n// License: MIT\n//\n// Module: path-browserify@0.0.0\n// License: MIT\n//\n// Module: process-nextick-args@1.0.7\n// License: MIT\n//\n// Module: process@0.11.5\n// License: MIT\n//\n// Module: readable-stream@2.1.4\n// License: MIT\n//\n// Module: sax@1.1.4\n// License: ISC\n//\n// Module: stream-browserify@2.0.1\n// License: MIT\n//\n// Module: string_decoder@0.10.31\n// License: MIT\n//\n// Module: underscore@1.4.4\n// License: MIT\n//\n// Module: underscore@1.6.0\n// License: MIT\n//\n// Module: util-deprecate@1.0.2\n// License: MIT\n//\n// Module: util@0.10.3\n// License: MIT\n//\n// Module: xmlbuilder@2.6.5\n// License: MIT\n//\n(function(f){if(typeof exports===\"object\"&&typeof module!==\"undefined\"){module.exports=f()}else if(typeof define===\"function\"&&define.amd){define([],f)}else{var g;if(typeof window!==\"undefined\"){g=window}else if(typeof global!==\"undefined\"){g=global}else if(typeof self!==\"undefined\"){g=self}else{g=this}g.mammoth = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require==\"function\"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error(\"Cannot find module '\"+o+\"'\");throw f.code=\"MODULE_NOT_FOUND\",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require==\"function\"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){\nvar promises = require(\"../../lib/promises\");\n\nexports.Files = Files;\n\n\nfunction Files() {\n    function read(uri) {\n        return promises.reject(new Error(\"could not open external image: '\" + uri + \"'\\ncannot open linked files from a web browser\"));\n    }\n    \n    return {\n        read: read\n    };\n}\n\n},{\"../../lib/promises\":24}],2:[function(require,module,exports){\nvar promises = require(\"../lib/promises\");\nvar zipfile = require(\"../lib/zipfile\");\n\nexports.openZip = openZip;\n\nfunction openZip(options) {\n    if (options.arrayBuffer) {\n        return promises.resolve(zipfile.openArrayBuffer(options.arrayBuffer));\n    } else {\n        return promises.reject(new Error(\"Could not find file in options\"));\n    }\n}\n\n},{\"../lib/promises\":24,\"../lib/zipfile\":36}],3:[function(require,module,exports){\nexports.paragraph = paragraph;\nexports.run = run;\nexports.bold = new Matcher(\"bold\");\nexports.italic = new Matcher(\"italic\");\nexports.underline = new Matcher(\"underline\");\nexports.strikethrough = new Matcher(\"strikethrough\");\nexports.commentReference = new Matcher(\"commentReference\");\n\n\nfunction paragraph(options) {\n    return new Matcher(\"paragraph\", options);\n}\n\nfunction run(options) {\n    return new Matcher(\"run\", options);\n}\n\nfunction Matcher(elementType, options) {\n    options = options || {};\n    this._elementType = elementType;\n    this._styleId = options.styleId;\n    this._styleName = options.styleName;\n    if (options.list) {\n        this._listIndex = options.list.levelIndex;\n        this._listIsOrdered = options.list.isOrdered;\n    }\n}\n\nMatcher.prototype.matches = function(element) {\n    return element.type === this._elementType &&\n        (this._styleId === undefined || element.styleId === this._styleId) &&\n        (this._styleName === undefined || (element.styleName && element.styleName.toUpperCase() === this._styleName.toUpperCase())) &&\n        (this._listIndex === undefined || isList(element, this._listIndex, this._listIsOrdered));\n};\n\nfunction isList(element, levelIndex, isOrdered) {\n    return element.numbering &&\n        element.numbering.level == levelIndex &&\n        element.numbering.isOrdered == isOrdered;\n}\n\n},{}],4:[function(require,module,exports){\nvar _ = require(\"underscore\");\n\nvar promises = require(\"./promises\");\nvar documents = require(\"./documents\");\nvar htmlPaths = require(\"./html-paths\");\nvar results = require(\"./results\");\nvar images = require(\"./images\");\nvar Html = require(\"./html\");\nvar writers = require(\"./writers\");\n\nexports.DocumentConverter = DocumentConverter;\n\n\nfunction DocumentConverter(options) {\n    return {\n        convertToHtml: function(element) {\n            var comments = _.indexBy(\n                element.type === documents.types.document ? element.comments : [],\n                \"commentId\"\n            );\n            var conversion = new DocumentConversion(options, comments);\n            return conversion.convertToHtml(element);\n        }\n    };\n}\n\nfunction DocumentConversion(options, comments) {\n    var noteNumber = 1;\n    \n    var noteReferences = [];\n    \n    var referencedComments = [];\n    \n    options = _.extend({ignoreEmptyParagraphs: true}, options);\n    var idPrefix = options.idPrefix === undefined ? \"\" : options.idPrefix;\n    \n    var defaultParagraphStyle = htmlPaths.topLevelElement(\"p\");\n    \n    var styleMap = options.styleMap || [];\n    \n    function convertToHtml(document) {\n        var messages = [];\n        \n        var html = elementToHtml(document, messages);\n        \n        var deferredNodes = [];\n        walkHtml(html, function(node) {\n            if (node.type === \"deferred\") {\n                deferredNodes.push(node);\n            }\n        });\n        var deferredValues = {};\n        return promises.mapSeries(deferredNodes, function(deferred) {\n            return deferred.value().then(function(value) {\n                deferredValues[deferred.id] = value;\n            });\n        }).then(function() {\n            function replaceDeferred(nodes) {\n                return flatMap(nodes, function(node) {\n                    if (node.type === \"deferred\") {\n                        return deferredValues[node.id];\n                    } else if (node.children) {\n                        return [\n                            _.extend({}, node, {\n                                children: replaceDeferred(node.children)\n                            })\n                        ];\n                    } else {\n                        return [node];\n                    }\n                });\n            }\n            var writer = writers.writer({\n                prettyPrint: options.prettyPrint,\n                outputFormat: options.outputFormat\n            });\n            Html.write(writer, Html.simplify(replaceDeferred(html)));\n            return new results.Result(writer.asString(), messages);\n        });\n    }\n    \n    function convertElements(elements, messages) {\n        return flatMap(elements, function(element) {\n            return elementToHtml(element, messages);\n        });\n    }\n\n    function elementToHtml(element, messages) {\n        var handler = elementConverters[element.type];\n        if (handler) {\n            return handler(element, messages);\n        } else {\n            return [];\n        }\n    }\n    \n    function convertParagraph(element, messages) {\n        return htmlPathForParagraph(element, messages).wrap(function() {\n            var content = convertElements(element.children, messages);\n            if (options.ignoreEmptyParagraphs) {\n                return content;\n            } else {\n                return [Html.forceWrite].concat(content);\n            }\n        });\n    }\n    \n    function htmlPathForParagraph(element, messages) {\n        var style = findStyle(element);\n        \n        if (style) {\n            return style.to;\n        } else {\n            if (element.styleId) {\n                messages.push(unrecognisedStyleWarning(\"paragraph\", element));\n            }\n            return defaultParagraphStyle;\n        }\n    }\n    \n    function convertRun(run, messages) {\n        var nodes = function() {\n            return convertElements(run.children, messages);\n        };\n        var paths = [];\n        if (run.isStrikethrough) {\n            paths.push(findHtmlPathForRunProperty(\"strikethrough\", \"s\"));\n        }\n        if (run.isUnderline) {\n            paths.push(findHtmlPathForRunProperty(\"underline\"));\n        }\n        if (run.verticalAlignment === documents.verticalAlignment.subscript) {\n            paths.push(htmlPaths.element(\"sub\", {}, {fresh: false}));\n        }\n        if (run.verticalAlignment === documents.verticalAlignment.superscript) {\n            paths.push(htmlPaths.element(\"sup\", {}, {fresh: false}));\n        }\n        if (run.isItalic) {\n            paths.push(findHtmlPathForRunProperty(\"italic\", \"em\"));\n        }\n        if (run.isBold) {\n            paths.push(findHtmlPathForRunProperty(\"bold\", \"strong\"));\n        }\n        var stylePath = htmlPaths.empty;\n        if (run.styleId) {\n            var style = findStyle(run);\n            if (style) {\n                stylePath = style.to;\n            } else {\n                messages.push(unrecognisedStyleWarning(\"run\", run));\n            }\n        }\n        paths.push(stylePath);\n            \n        paths.forEach(function(path) {\n            nodes = path.wrap.bind(path, nodes);\n        });\n        \n        return nodes();\n    }\n    \n    function findHtmlPathForRunProperty(elementType, defaultTagName) {\n        var path = findHtmlPath({type: elementType});\n        if (path) {\n            return path;\n        } else if (defaultTagName) {\n            return htmlPaths.element(defaultTagName, {}, {fresh: false});\n        } else {\n            return htmlPaths.empty;\n        }\n    }\n    \n    function findHtmlPath(element, defaultPath) {\n        var style = findStyle(element);\n        return style ? style.to : defaultPath;\n    }\n    \n    function findStyle(element) {\n        for (var i = 0; i < styleMap.length; i++) {\n            if (styleMap[i].from.matches(element)) {\n                return styleMap[i];\n            }\n        }\n    }\n    \n    var defaultConvertImage = images.imgElement(function(element) {\n        return element.read(\"base64\").then(function(imageBuffer) {\n            return {\n                src: \"data:\" + element.contentType + \";base64,\" + imageBuffer\n            };\n        });\n    });\n    \n    function recoveringConvertImage(convertImage) {\n        return function(image, messages) {\n            return promises.attempt(function() {\n                return convertImage(image, messages);\n            }).caught(function(error) {\n                messages.push(results.error(error));\n                return [];\n            });\n        };\n    }\n\n    function noteHtmlId(note) {\n        return referentHtmlId(note.noteType, note.noteId);\n    }\n    \n    function noteRefHtmlId(note) {\n        return referenceHtmlId(note.noteType, note.noteId);\n    }\n    \n    function referentHtmlId(referenceType, referenceId) {\n        return htmlId(referenceType + \"-\" + referenceId);\n    }\n    \n    function referenceHtmlId(referenceType, referenceId) {\n        return htmlId(referenceType + \"-ref-\" + referenceId);\n    }\n    \n    function htmlId(suffix) {\n        return idPrefix + suffix;\n    }\n    \n    function convertTable(element, messages) {\n        return wrapChildrenInFreshElement(element, \"table\", messages);\n    }\n    \n    function convertTableRow(element, messages) {\n        return wrapChildrenInFreshElement(element, \"tr\", messages);\n    }\n    \n    function convertTableCell(element, messages) {\n        var children = convertElements(element.children, messages);\n        var attributes = {};\n        if (element.colSpan !== 1) {\n            attributes.colspan = element.colSpan.toString();\n        }\n        if (element.rowSpan !== 1) {\n            attributes.rowspan = element.rowSpan.toString();\n        }\n            \n        return [\n            Html.freshElement(\"td\", attributes, [Html.forceWrite].concat(children))\n        ];\n    }\n    \n    function convertCommentReference(reference, messages) {\n        return findHtmlPath(reference, htmlPaths.ignore).wrap(function() {\n            var comment = comments[reference.commentId];\n            var count = referencedComments.length + 1;\n            var label = \"[\" + commentAuthorLabel(comment) + count + \"]\";\n            referencedComments.push({label: label, comment: comment});\n            // TODO: remove duplication with note references\n            return [\n                Html.freshElement(\"a\", {\n                    href: \"#\" + referentHtmlId(\"comment\", reference.commentId),\n                    id: referenceHtmlId(\"comment\", reference.commentId)\n                }, [Html.text(label)])\n            ];\n        });\n    }\n    \n    function convertComment(referencedComment, messages) {\n        // TODO: remove duplication with note references\n        \n        var label = referencedComment.label;\n        var comment = referencedComment.comment;\n        var body = convertElements(comment.body).concat([\n            Html.nonFreshElement(\"p\", {}, [\n                Html.text(\" \"),\n                Html.freshElement(\"a\", {\"href\": \"#\" + referenceHtmlId(\"comment\", comment.commentId)}, [\n                    Html.text(\"↑\")\n                ])\n            ])\n        ]);\n        \n        return [\n            Html.freshElement(\n                \"dt\",\n                {\"id\": referentHtmlId(\"comment\", comment.commentId)},\n                [Html.text(\"Comment \" + label)]\n            ),\n            Html.freshElement(\"dd\", {}, body)\n        ];\n    }\n    \n    function wrapChildrenInFreshElement(element, wrapElementName, messages) {\n        var children = convertElements(element.children, messages);\n        return [\n            Html.freshElement(wrapElementName, {}, [Html.forceWrite].concat(children))\n        ];\n    }\n\n    var elementConverters = {\n        \"document\": function(document, messages) {\n            var children = convertElements(document.children, messages);\n            var notes = noteReferences.map(function(noteReference) {\n                return document.notes.resolve(noteReference);\n            });\n            var notesNodes = convertElements(notes, messages);\n            return children.concat([\n                Html.freshElement(\"ol\", {}, notesNodes),\n                Html.freshElement(\"dl\", {}, flatMap(referencedComments, function(referencedComment) {\n                    return convertComment(referencedComment, messages);\n                }))\n            ]);\n        },\n        \"paragraph\": convertParagraph,\n        \"run\": convertRun,\n        \"text\": function(element, messages) {\n            return [Html.text(element.value)];\n        },\n        \"tab\": function(element, messages) {\n            return [Html.text(\"\\t\")];\n        },\n        \"hyperlink\": function(element, messages) {\n            var href = element.anchor ? \"#\" + htmlId(element.anchor) : element.href;\n\n            var children = convertElements(element.children, messages);\n            return [Html.freshElement(\"a\", {href: href}, children)];\n        },\n        \"bookmarkStart\": function(element, messages) {\n            var anchor = Html.freshElement(\"a\", {\n                id: htmlId(element.name)\n            }, [Html.forceWrite]);\n            return [anchor];\n        },\n        \"noteReference\": function(element, messages) {\n            noteReferences.push(element);\n            var anchor = Html.freshElement(\"a\", {\n                href: \"#\" + noteHtmlId(element),\n                id: noteRefHtmlId(element)\n            }, [Html.text(\"[\" + (noteNumber++) + \"]\")]);\n            \n            return [Html.freshElement(\"sup\", {}, [anchor])];\n        },\n        \"note\": function(element, messages) {\n            var children = convertElements(element.body, messages);\n            var backLink = Html.elementWithTag(htmlPaths.element(\"p\", {}, {fresh: false}), [\n                Html.text(\" \"),\n                Html.freshElement(\"a\", {href: \"#\" + noteRefHtmlId(element)}, [Html.text(\"↑\")])\n            ]);\n            var body = children.concat([backLink]);\n            \n            return Html.freshElement(\"li\", {id: noteHtmlId(element)}, body);\n        },\n        \"commentReference\": convertCommentReference,\n        \"comment\": convertComment,\n        \"image\": deferredConversion(recoveringConvertImage(options.convertImage || defaultConvertImage)),\n        \"table\": convertTable,\n        \"tableRow\": convertTableRow,\n        \"tableCell\": convertTableCell,\n        \"lineBreak\": function(element, messages) {\n            return [Html.selfClosingElement(\"br\")];\n        }\n    };\n    return {\n        convertToHtml: convertToHtml\n    };\n}\n\nvar deferredId = 1;\n\nfunction deferredConversion(func) {\n    return function(element, messages) {\n        return [\n            {\n                type: \"deferred\",\n                id: deferredId++,\n                value: function() {\n                    return func(element, messages);\n                }\n            }\n        ];\n    };\n}\n\nfunction unrecognisedStyleWarning(type, element) {\n    return results.warning(\n        \"Unrecognised \" + type + \" style: '\" + element.styleName + \"'\" +\n        \" (Style ID: \" + element.styleId + \")\"\n    );\n}\n\nfunction flatMap(values, func) {\n    return _.flatten(values.map(func), true);\n}\n\nfunction walkHtml(nodes, callback) {\n    nodes.forEach(function(node) {\n        callback(node);\n        if (node.children) {\n            walkHtml(node.children, callback);\n        }\n    });\n}\n\nvar commentAuthorLabel = exports.commentAuthorLabel = function commentAuthorLabel(comment) {\n    return comment.authorInitials || \"\";\n};\n\n},{\"./documents\":5,\"./html\":19,\"./html-paths\":17,\"./images\":21,\"./promises\":24,\"./results\":25,\"./writers\":30,\"underscore\":154}],5:[function(require,module,exports){\nvar _ = require(\"underscore\");\n\nvar types = exports.types = {\n    document: \"document\",\n    paragraph: \"paragraph\",\n    run: \"run\",\n    text: \"text\",\n    tab: \"tab\",\n    hyperlink: \"hyperlink\",\n    noteReference: \"noteReference\",\n    image: \"image\",\n    note: \"note\",\n    commentReference: \"commentReference\",\n    comment: \"comment\",\n    table: \"table\",\n    tableRow: \"tableRow\",\n    tableCell: \"tableCell\",\n    lineBreak: \"lineBreak\",\n    bookmarkStart: \"bookmarkStart\"\n};\n\nfunction Document(children, options) {\n    options = options || {};\n    return {\n        type: types.document,\n        children: children,\n        notes: options.notes || new Notes({}),\n        comments: options.comments || []\n    };\n}\n\nfunction Paragraph(children, properties) {\n    properties = properties || {};\n    return {\n        type: types.paragraph,\n        children: children,\n        styleId: properties.styleId || null,\n        styleName: properties.styleName || null,\n        numbering: properties.numbering || null,\n        alignment: properties.alignment || null\n    };\n}\n\nfunction Run(children, properties) {\n    properties = properties || {};\n    return {\n        type: types.run,\n        children: children,\n        styleId: properties.styleId || null,\n        styleName: properties.styleName || null,\n        isBold: properties.isBold,\n        isUnderline: properties.isUnderline,\n        isItalic: properties.isItalic,\n        isStrikethrough: properties.isStrikethrough,\n        verticalAlignment: properties.verticalAlignment || verticalAlignment.baseline\n    };\n}\n\nvar verticalAlignment = {\n    baseline: \"baseline\",\n    superscript: \"superscript\",\n    subscript: \"subscript\"\n};\n\nfunction Text(value) {\n    return {\n        type: types.text,\n        value: value\n    };\n}\n\nfunction Tab() {\n    return {\n        type: types.tab\n    };\n}\n\nfunction Hyperlink(children, options) {\n    return {\n        type: types.hyperlink,\n        children: children,\n        href: options.href,\n        anchor: options.anchor\n    };\n}\n\nfunction NoteReference(options) {\n    return {\n        type: types.noteReference,\n        noteType: options.noteType,\n        noteId: options.noteId\n    };\n}\n\nfunction Notes(notes) {\n    this._notes = _.indexBy(notes, function(note) {\n        return noteKey(note.noteType, note.noteId);\n    });\n}\n\nNotes.prototype.resolve = function(reference) {\n    return this.findNoteByKey(noteKey(reference.noteType, reference.noteId));\n};\n\nNotes.prototype.findNoteByKey = function(key) {\n    return this._notes[key] || null;\n};\n\nfunction Note(options) {\n    return {\n        type: types.note,\n        noteType: options.noteType,\n        noteId: options.noteId,\n        body: options.body\n    };\n}\n\nfunction commentReference(options) {\n    return {\n        type: types.commentReference,\n        commentId: options.commentId\n    };\n}\n\nfunction comment(options) {\n    return {\n        type: types.comment,\n        commentId: options.commentId,\n        body: options.body,\n        authorName: options.authorName,\n        authorInitials: options.authorInitials\n    };\n}\n\nfunction noteKey(noteType, id) {\n    return noteType + \"-\" + id;\n}\n\nfunction Image(options) {\n    return {\n        type: types.image,\n        read: options.readImage,\n        altText: options.altText,\n        contentType: options.contentType\n    };\n}\n\nfunction Table(children) {\n    return {\n        type: types.table,\n        children: children\n    };\n}\n\nfunction TableRow(children) {\n    return {\n        type: types.tableRow,\n        children: children\n    };\n}\n\nfunction TableCell(children, options) {\n    options = options || {};\n    return {\n        type: types.tableCell,\n        children: children,\n        colSpan: options.colSpan == null ? 1 : options.colSpan,\n        rowSpan: options.rowSpan == null ? 1 : options.rowSpan\n    };\n}\n\nfunction LineBreak() {\n    return {\n        type: types.lineBreak\n    };\n}\n\nfunction BookmarkStart(options) {\n    return {\n        type: types.bookmarkStart,\n        name: options.name\n    };\n}\n\nexports.document = exports.Document = Document;\nexports.paragraph = exports.Paragraph = Paragraph;\nexports.run = exports.Run = Run;\nexports.Text = Text;\nexports.Tab = Tab;\nexports.Hyperlink = Hyperlink;\nexports.noteReference = exports.NoteReference = NoteReference;\nexports.Notes = Notes;\nexports.Note = Note;\nexports.commentReference = commentReference;\nexports.comment = comment;\nexports.Image = Image;\nexports.Table = Table;\nexports.TableRow = TableRow;\nexports.TableCell = TableCell;\nexports.LineBreak = LineBreak;\nexports.BookmarkStart = BookmarkStart;\n\nexports.verticalAlignment = verticalAlignment;\n\n},{\"underscore\":154}],6:[function(require,module,exports){\nexports.BodyReader = BodyReader;\n\nvar _ = require(\"underscore\");\n\nvar documents = require(\"../documents\");\nvar Result = require(\"../results\").Result;\nvar warning = require(\"../results\").warning;\n\n\nfunction BodyReader(options) {\n    var relationships = options.relationships;\n    var contentTypes = options.contentTypes;\n    var docxFile = options.docxFile;\n    var files = options.files;\n    var numbering = options.numbering;\n    var styles = options.styles;\n\n    function readXmlElements(elements) {\n        var results = elements.map(readXmlElement);\n        return combineResults(results);\n    }\n\n    function readXmlElement(element) {\n        if (element.type === \"element\") {\n            var handler = xmlElementReaders[element.name];\n            if (handler) {\n                return handler(element);\n            } else if (!Object.prototype.hasOwnProperty.call(ignoreElements, element.name)) {\n                var message = warning(\"An unrecognised element was ignored: \" + element.name);\n                return emptyResultWithMessages([message]);\n            }\n        }\n        return emptyResult();\n    }\n    \n    function readRunProperties(element) {\n        var properties = {\n            type: \"runProperties\"\n        };\n        \n        var verticalAlignmentElement = element.first(\"w:vertAlign\");\n        if (verticalAlignmentElement) {\n            properties.verticalAlignment = verticalAlignmentElement.attributes[\"w:val\"];\n        }\n        \n        properties.isBold = readBooleanElement(element.first(\"w:b\"));\n        properties.isUnderline = readBooleanElement(element.first(\"w:u\"));\n        properties.isItalic = readBooleanElement(element.first(\"w:i\"));\n        properties.isStrikethrough = readBooleanElement(element.first(\"w:strike\"));\n        \n        return readRunStyle(element).map(function(style) {\n            properties.styleId = style.styleId;\n            properties.styleName = style.name;\n            return properties;\n        });\n    }\n    \n    function readBooleanElement(element) {\n        if (element) {\n            var value = element.attributes[\"w:val\"];\n            return value !== \"false\" && value !== \"0\";\n        } else {\n            return false;\n        }\n    }\n    \n    function readParagraphStyle(element) {\n        return readStyle(element, \"w:pStyle\", \"Paragraph\", styles.findParagraphStyleById);\n    }\n    \n    function readRunStyle(element) {\n        return readStyle(element, \"w:rStyle\", \"Run\", styles.findCharacterStyleById);\n    }\n    \n    function readStyle(element, styleTagName, styleType, findStyleById) {\n        var messages = [];\n        var styleElement = element.first(styleTagName);\n        var styleId = null;\n        var name = null;\n        if (styleElement) {\n            styleId = styleElement.attributes[\"w:val\"];\n            if (styleId) {\n                var style = findStyleById(styleId);\n                if (style) {\n                    name = style.name;\n                } else {\n                    messages.push(undefinedStyleWarning(styleType, styleId));\n                }\n            }\n        }\n        return elementResultWithMessages({styleId: styleId, name: name}, messages);\n    }\n    \n    function noteReferenceReader(noteType) {\n        return function(element) {\n            var noteId = element.attributes[\"w:id\"];\n            return elementResult(new documents.NoteReference({\n                noteType: noteType,\n                noteId: noteId\n            }));\n        };\n    }\n    \n    function readCommentReference(element) {\n        return elementResult(documents.commentReference({\n            commentId: element.attributes[\"w:id\"]\n        }));\n    }\n    \n    function readChildElements(element) {\n        return readXmlElements(element.children);\n    }\n    \n    var xmlElementReaders = {\n        \"w:p\": function(element) {\n            return readXmlElements(element.children)\n                .map(function(children) {\n                    var properties = _.find(children, isParagraphProperties);\n                    return new documents.Paragraph(\n                        children.filter(negate(isParagraphProperties)),\n                        properties\n                    );\n                })\n                .insertExtra();\n        },\n        \"w:pPr\": function(element) {\n            var properties = {\n                type: \"paragraphProperties\"\n            };\n            \n            var alignElement = element.first(\"w:jc\");\n            if (alignElement) {\n                properties.alignment = alignElement.attributes[\"w:val\"];\n            }\n            properties.numbering = readNumberingProperties(element.firstOrEmpty(\"w:numPr\"));\n            \n            return readParagraphStyle(element).map(function(style) {\n                properties.styleId = style.styleId;\n                properties.styleName = style.name;\n                return properties;\n            });\n        },\n        \"w:r\": function(element) {\n            return readXmlElements(element.children)\n                .map(function(children) {\n                    var properties = _.find(children, isRunProperties);\n                    \n                    return new documents.Run(\n                        children.filter(negate(isRunProperties)),\n                        properties\n                    );\n                });\n        },\n        \"w:rPr\": readRunProperties,\n        \"w:t\": function(element) {\n            return elementResult(new documents.Text(element.text()));\n        },\n        \"w:tab\": function(element) {\n            return elementResult(new documents.Tab());\n        },\n        \"w:hyperlink\": function(element) {\n            var relationshipId = element.attributes[\"r:id\"];\n            var anchor = element.attributes[\"w:anchor\"];\n            return readXmlElements(element.children).map(function(children) {\n                if (relationshipId) {\n                    var href = relationships[relationshipId].target;\n                    return new documents.Hyperlink(children, {href: href});\n                } else if (anchor) {\n                    return new documents.Hyperlink(children, {anchor: anchor});\n                } else {\n                    return children;\n                }\n            });\n        },\n        \"w:tbl\": readTable,\n        \"w:tr\": readTableRow,\n        \"w:tc\": readTableCell,\n        \"w:footnoteReference\": noteReferenceReader(\"footnote\"),\n        \"w:endnoteReference\": noteReferenceReader(\"endnote\"),\n        \"w:commentReference\": readCommentReference,\n        \"w:br\": function(element) {\n            var breakType = element.attributes[\"w:type\"];\n            if (breakType) {\n                return emptyResultWithMessages([warning(\"Unsupported break type: \" + breakType)]);\n            } else {\n                return elementResult(new documents.LineBreak());\n            }\n        },\n        \"w:bookmarkStart\": function(element){\n            var name = element.attributes[\"w:name\"];\n            if (name === \"_GoBack\") {\n                return emptyResult();\n            } else {\n                return elementResult(new documents.BookmarkStart({name: name}));\n            }\n        },\n        \n        \"mc:AlternateContent\": function(element) {\n            return readChildElements(element.first(\"mc:Fallback\"));\n        },\n        \n        \"w:sdt\": function(element) {\n            return readXmlElements(element.firstOrEmpty(\"w:sdtContent\").children);\n        },\n\n        \"w:ins\": readChildElements,\n        \"w:smartTag\": readChildElements,\n        \"w:drawing\": readChildElements,\n        \"w:pict\": function(element) {\n            return readChildElements(element).toExtra();\n        },\n        \"v:roundrect\": readChildElements,\n        \"v:shape\": readChildElements,\n        \"v:textbox\": readChildElements,\n        \"w:txbxContent\": readChildElements,\n        \"wp:inline\": readDrawingElement,\n        \"wp:anchor\": readDrawingElement,\n        \"v:imagedata\": readImageData\n    };\n    return {\n        readXmlElement: readXmlElement,\n        readXmlElements: readXmlElements,\n        _readNumberingProperties: readNumberingProperties\n    };\n\n    function readNumberingProperties(element) {\n        var level = element.firstOrEmpty(\"w:ilvl\").attributes[\"w:val\"];\n        var numId = element.firstOrEmpty(\"w:numId\").attributes[\"w:val\"];\n        if (level === undefined || numId === undefined) {\n            return null;\n        } else {\n            return numbering.findLevel(numId, level);\n        }\n    }\n    \n    function readTable(element) {\n        return readXmlElements(element.children)\n            .flatMap(calculateRowSpans)\n            .map(documents.Table);\n    }\n    \n    function readTableRow(element) {\n        return readXmlElements(element.children).map(documents.TableRow);\n    }\n    \n    function readTableCell(element) {\n        return readXmlElements(element.children).map(function(children) {\n            var properties = element.firstOrEmpty(\"w:tcPr\");\n            \n            var gridSpan = properties.firstOrEmpty(\"w:gridSpan\").attributes[\"w:val\"];\n            var colSpan = gridSpan ? parseInt(gridSpan, 10) : 1;\n            \n            var cell = documents.TableCell(children, {colSpan: colSpan});\n            cell._vMerge = readVMerge(properties);\n            return cell;\n        });\n    }\n    \n    function readVMerge(properties) {\n        var element = properties.first(\"w:vMerge\");\n        if (element) {\n            var val = element.attributes[\"w:val\"];\n            return val === \"continue\" || !val;\n        } else {\n            return null;\n        }\n    }\n    \n    function calculateRowSpans(rows) {\n        var unexpectedNonRows = _.any(rows, function(row) {\n            return row.type !== documents.types.tableRow;\n        });\n        if (unexpectedNonRows) {\n            return elementResultWithMessages(rows, [warning(\n                \"unexpected non-row element in table, cell merging may be incorrect\"\n            )]);\n        }\n        var unexpectedNonCells = _.any(rows, function(row) {\n            return _.any(row.children, function(cell) {\n                return cell.type !== documents.types.tableCell;\n            });\n        });\n        if (unexpectedNonCells) {\n            return elementResultWithMessages(rows, [warning(\n                \"unexpected non-cell element in table row, cell merging may be incorrect\"\n            )]);\n        }\n        \n        var columns = {};\n        \n        rows.forEach(function(row) {\n            var cellIndex = 0;\n            row.children.forEach(function(cell) {\n                if (cell._vMerge && columns[cellIndex]) {\n                    columns[cellIndex].rowSpan++;\n                } else {\n                    columns[cellIndex] = cell;\n                    cell._vMerge = false;\n                }\n                cellIndex += cell.colSpan;\n            });\n        });\n        \n        rows.forEach(function(row) {\n            row.children = row.children.filter(function(cell) {\n                return !cell._vMerge;\n            });\n            row.children.forEach(function(cell) {\n                delete cell._vMerge;\n            });\n        });\n        \n        return elementResult(rows);\n    }\n\n    function readDrawingElement(element) {\n        var blips = element\n            .getElementsByTagName(\"a:graphic\")\n            .getElementsByTagName(\"a:graphicData\")\n            .getElementsByTagName(\"pic:pic\")\n            .getElementsByTagName(\"pic:blipFill\")\n            .getElementsByTagName(\"a:blip\");\n        \n        return combineResults(blips.map(readBlip.bind(null, element)));\n    }\n    \n    function readBlip(element, blip) {\n        var properties = element.first(\"wp:docPr\").attributes;\n        var altText = isBlank(properties.descr) ? properties.title : properties.descr;\n        return readImage(findBlipImageFile(blip), altText);\n    }\n    \n    function isBlank(value) {\n        return value == null || /^\\s*$/.test(value);\n    }\n    \n    function findBlipImageFile(blip) {\n        var embedRelationshipId = blip.attributes[\"r:embed\"];\n        var linkRelationshipid = blip.attributes[\"r:link\"];\n        if (embedRelationshipId) {\n            return findEmbeddedImageFile(embedRelationshipId);\n        } else {\n            var imagePath = relationships[linkRelationshipid].target;\n            return {\n                path: imagePath,\n                read: files.read.bind(files, imagePath)\n            };\n        }\n    }\n    \n    function readImageData(element) {\n        var relationshipId = element.attributes['r:id'];\n        \n        if (relationshipId) {\n            return readImage(\n                findEmbeddedImageFile(relationshipId),\n                element.attributes[\"o:title\"]);\n        } else {\n            return emptyResultWithMessages([warning(\"A v:imagedata element without a relationship ID was ignored\")]);\n        }\n    }\n    \n    function findEmbeddedImageFile(relationshipId) {\n        var path = joinZipPath(\"word\", relationships[relationshipId].target);\n        return {\n            path: path,\n            read: docxFile.read.bind(docxFile, path)\n        };\n    }\n    \n    function readImage(imageFile, altText) {\n        var contentType = contentTypes.findContentType(imageFile.path);\n        \n        var image = documents.Image({\n            readImage: imageFile.read,\n            altText: altText,\n            contentType: contentType\n        });\n        var warnings = supportedImageTypes[contentType] ?\n            [] : warning(\"Image of type \" + contentType + \" is unlikely to display in web browsers\");\n        return elementResultWithMessages(image, warnings);\n    }\n    \n    function undefinedStyleWarning(type, styleId) {\n        return warning(\n            type + \" style with ID \" + styleId + \" was referenced but not defined in the document\");\n    }\n}\n    \nvar supportedImageTypes = {\n    \"image/png\": true,\n    \"image/gif\": true,\n    \"image/jpeg\": true,\n    \"image/svg+xml\": true,\n    \"image/tiff\": true\n};\n\nvar ignoreElements = {\n    \"office-word:wrap\": true,\n    \"v:shadow\": true,\n    \"v:shapetype\": true,\n    \"w:annotationRef\": true,\n    \"w:bookmarkEnd\": true,\n    \"w:sectPr\": true,\n    \"w:proofErr\": true,\n    \"w:lastRenderedPageBreak\": true,\n    \"w:commentRangeStart\": true,\n    \"w:commentRangeEnd\": true,\n    \"w:del\": true,\n    \"w:footnoteRef\": true,\n    \"w:endnoteRef\": true,\n    \"w:tblPr\": true,\n    \"w:tblGrid\": true,\n    \"w:tcPr\": true\n};\n\nfunction isParagraphProperties(element) {\n    return element.type === \"paragraphProperties\";\n}\n\nfunction isRunProperties(element) {\n    return element.type === \"runProperties\";\n}\n\nfunction negate(predicate) {\n    return function(value) {\n        return !predicate(value);\n    };\n}\n\nfunction joinZipPath(first, second) {\n    // In general, we should check first and second for trailing and leading slashes,\n    // but in our specific case this seems to be sufficient\n    return first + \"/\" + second;\n}\n\n\nfunction emptyResultWithMessages(messages) {\n    return new ReadResult(null, null, messages);\n}\n\nfunction emptyResult() {\n    return new ReadResult(null);\n}\n\nfunction elementResult(element) {\n    return new ReadResult(element);\n}\n\nfunction elementResultWithMessages(element, messages) {\n    return new ReadResult(element, null, messages);\n}\n\nfunction ReadResult(element, extra, messages) {\n    this.value = element || [];\n    this.extra = extra;\n    this._result = new Result({\n        element: this.value,\n        extra: extra\n    }, messages);\n    this.messages = this._result.messages;\n}\n\nReadResult.prototype.toExtra = function() {\n    return new ReadResult(null, joinElements(this.extra, this.value), this.messages);\n};\n\nReadResult.prototype.insertExtra = function() {\n    var extra = this.extra;\n    if (extra && extra.length) {\n        return new ReadResult(joinElements(this.value, extra), null, this.messages);\n    } else {\n        return this;\n    }\n};\n\nReadResult.prototype.map = function(func) {\n    var result = this._result.map(function(value) {\n        return func(value.element);\n    });\n    return new ReadResult(result.value, this.extra, result.messages);\n};\n\nReadResult.prototype.flatMap = function(func) {\n    var result = this._result.flatMap(function(value) {\n        return func(value.element)._result;\n    });\n    return new ReadResult(result.value.element, joinElements(this.extra, result.value.extra), result.messages);\n};\n\nfunction combineResults(results) {\n    var result = Result.combine(_.pluck(results, \"_result\"));\n    return new ReadResult(\n        _.flatten(_.pluck(result.value, \"element\")),\n        _.filter(_.flatten(_.pluck(result.value, \"extra\")), identity),\n        result.messages\n    );\n}\n\nfunction joinElements(first, second) {\n    return _.flatten([first, second]);\n}\n\nfunction identity(value) {\n    return value;\n}\n\n},{\"../documents\":5,\"../results\":25,\"underscore\":154}],7:[function(require,module,exports){\nvar documents = require(\"../documents\");\nvar Result = require(\"../results\").Result;\n\nfunction createCommentsReader(bodyReader) {\n    function readCommentsXml(element) {\n        return Result.combine(element.getElementsByTagName(\"w:comment\")\n            .map(readCommentElement));\n    }\n\n    function readCommentElement(element) {\n        var id = element.attributes[\"w:id\"];\n\n        function readOptionalAttribute(name) {\n            return (element.attributes[name] || \"\").trim() || null;\n        }\n\n        return bodyReader.readXmlElements(element.children)\n            .map(function(body) {\n                return documents.comment({\n                    commentId: id,\n                    body: body,\n                    authorName: readOptionalAttribute(\"w:author\"),\n                    authorInitials: readOptionalAttribute(\"w:initials\")\n                });\n            });\n    }\n    \n    return readCommentsXml;\n}\n\nexports.createCommentsReader = createCommentsReader;\n\n},{\"../documents\":5,\"../results\":25}],8:[function(require,module,exports){\nexports.readContentTypesFromXml = readContentTypesFromXml;\n\nvar fallbackContentTypes = {\n    \"png\": \"png\",\n    \"gif\": \"gif\",\n    \"jpeg\": \"jpeg\",\n    \"jpg\": \"jpeg\",\n    \"tif\": \"tiff\",\n    \"tiff\": \"tiff\",\n    \"bmp\": \"bmp\"\n};\n\nexports.defaultContentTypes = contentTypes({}, {});\n\n\nfunction readContentTypesFromXml(element) {\n    var extensionDefaults = {};\n    var overrides = {};\n    \n    element.children.forEach(function(child) {\n        if (child.name === \"content-types:Default\") {\n            extensionDefaults[child.attributes.Extension] = child.attributes.ContentType;\n        }\n        if (child.name === \"content-types:Override\") {\n            var name = child.attributes.PartName;\n            if (name.charAt(0) === \"/\") {\n                name = name.substring(1);\n            }\n            overrides[name] = child.attributes.ContentType;\n        }\n    });\n    return contentTypes(overrides, extensionDefaults);\n}\n\nfunction contentTypes(overrides, extensionDefaults) {\n    return {\n        findContentType: function(path) {\n            var overrideContentType = overrides[path];\n            if (overrideContentType) {\n                return overrideContentType;\n            } else {\n                var pathParts = path.split(\".\");\n                var extension = pathParts[pathParts.length - 1];\n                if (extensionDefaults.hasOwnProperty(extension)) {\n                    return extensionDefaults[extension];\n                } else {\n                    var fallback = fallbackContentTypes[extension.toLowerCase()];\n                    if (fallback) {\n                        return \"image/\" + fallback;\n                    } else {\n                        return null;\n                    }\n                }\n            }\n        }\n    };\n    \n}\n\n},{}],9:[function(require,module,exports){\nexports.DocumentXmlReader = DocumentXmlReader;\n\nvar documents = require(\"../documents\");\nvar Result = require(\"../results\").Result;\n\n\nfunction DocumentXmlReader(options) {\n    var bodyReader = options.bodyReader;\n    \n    function convertXmlToDocument(element) {\n        var body = element.first(\"w:body\");\n        \n        var result = bodyReader.readXmlElements(body.children)\n            .map(function(children) {\n                return new documents.Document(children, {\n                    notes: options.notes,\n                    comments: options.comments\n                });\n            });\n        return new Result(result.value, result.messages);\n    }\n    \n    return {\n        convertXmlToDocument: convertXmlToDocument\n    };\n}\n\n},{\"../documents\":5,\"../results\":25}],10:[function(require,module,exports){\nexports.read = read;\n\nvar path = require(\"path\");\n\nvar promises = require(\"../promises\");\nvar documents = require(\"../documents\");\nvar Result = require(\"../results\").Result;\n\nvar readXmlFromZipFile = require(\"./office-xml-reader\").readXmlFromZipFile;\nvar BodyReader = require(\"./body-reader\").BodyReader;\nvar DocumentXmlReader = require(\"./document-xml-reader\").DocumentXmlReader;\nvar relationshipsReader = require(\"./relationships-reader\");\nvar contentTypesReader = require(\"./content-types-reader\");\nvar numberingXml = require(\"./numbering-xml\");\nvar stylesReader = require(\"./styles-reader\");\nvar notesReader = require(\"./notes-reader\");\nvar commentsReader = require(\"./comments-reader\");\nvar Files = require(\"./files\").Files;\n\n\nfunction read(docxFile, input) {\n    input = input || {};\n    return promises.props({\n        contentTypes: readContentTypesFromZipFile(docxFile),\n        numbering: readNumberingFromZipFile(docxFile),\n        styles: readStylesFromZipFile(docxFile),\n        docxFile: docxFile,\n        files: new Files(input.path ? path.dirname(input.path) : null)\n    }).also(function(result) {\n        return {\n            footnotes: readXmlFileWithBody(\"footnotes\", result, function(bodyReader, xml) {\n                if (xml) {\n                    return notesReader.createFootnotesReader(bodyReader)(xml);\n                } else {\n                    return new Result([]);\n                }\n            }),\n            endnotes: readXmlFileWithBody(\"endnotes\", result, function(bodyReader, xml) {\n                if (xml) {\n                    return notesReader.createEndnotesReader(bodyReader)(xml);\n                } else {\n                    return new Result([]);\n                }\n            }),\n            comments: readXmlFileWithBody(\"comments\", result, function(bodyReader, xml) {\n                if (xml) {\n                    return commentsReader.createCommentsReader(bodyReader)(xml);\n                } else {\n                    return new Result([]);\n                }\n            })\n        };\n    }).also(function(result) {\n        return {\n            notes: result.footnotes.flatMap(function(footnotes) {\n                return result.endnotes.map(function(endnotes) {\n                    return new documents.Notes(footnotes.concat(endnotes));\n                });\n            })\n        };\n    }).then(function(result) {\n        return readXmlFileWithBody(\"document\", result, function(bodyReader, xml) {\n            if (xml) {\n                return result.notes.flatMap(function(notes) {\n                    return result.comments.flatMap(function(comments) {\n                        var reader = new DocumentXmlReader({\n                            bodyReader: bodyReader,\n                            notes: notes,\n                            comments: comments\n                        });\n                        return reader.convertXmlToDocument(xml);\n                    });\n                });\n            } else {\n                throw new Error(\"Could not find word/document.xml in ZIP file. Are you sure this is a valid .docx file?\");\n            }\n        });\n    });\n}\n\nfunction xmlFileReader(options) {\n    return function(zipFile) {\n        return readXmlFromZipFile(zipFile, options.filename)\n            .then(function(element) {\n                return element ? options.readElement(element) : options.defaultValue;\n            });\n    };\n}\n\nfunction readXmlFileWithBody(name, options, func) {\n    var readRelationshipsFromZipFile = xmlFileReader({\n        filename: \"word/_rels/\" + name + \".xml.rels\",\n        readElement: relationshipsReader.readRelationships,\n        defaultValue: {}\n    });\n    \n    return readRelationshipsFromZipFile(options.docxFile).then(function(relationships) {\n        var bodyReader = new BodyReader({\n            relationships: relationships,\n            contentTypes: options.contentTypes,\n            docxFile: options.docxFile,\n            numbering: options.numbering,\n            styles: options.styles,\n            files: options.files\n        });\n        return readXmlFromZipFile(options.docxFile, \"word/\" + name + \".xml\")\n            .then(function(xml) {\n                return func(bodyReader, xml);\n            });\n    });\n}\n\nvar readContentTypesFromZipFile = xmlFileReader({\n    filename: \"[Content_Types].xml\",\n    readElement: contentTypesReader.readContentTypesFromXml,\n    defaultValue: contentTypesReader.defaultContentTypes\n});\n\nvar readNumberingFromZipFile = xmlFileReader({\n    filename: \"word/numbering.xml\",\n    readElement: numberingXml.readNumberingXml,\n    defaultValue: numberingXml.defaultNumbering\n});\n\nvar readStylesFromZipFile = xmlFileReader({\n    filename: \"word/styles.xml\",\n    readElement: stylesReader.readStylesXml,\n    defaultValue: stylesReader.defaultStyles\n});\n\n},{\"../documents\":5,\"../promises\":24,\"../results\":25,\"./body-reader\":6,\"./comments-reader\":7,\"./content-types-reader\":8,\"./document-xml-reader\":9,\"./files\":1,\"./notes-reader\":11,\"./numbering-xml\":12,\"./office-xml-reader\":13,\"./relationships-reader\":14,\"./styles-reader\":16,\"path\":80}],11:[function(require,module,exports){\nvar documents = require(\"../documents\");\nvar Result = require(\"../results\").Result;\n\nexports.createFootnotesReader = createReader.bind(this, \"footnote\");\nexports.createEndnotesReader = createReader.bind(this, \"endnote\");\n\nfunction createReader(noteType, bodyReader) {\n    function readNotesXml(element) {\n        return Result.combine(element.getElementsByTagName(\"w:\" + noteType)\n            .filter(isFootnoteElement)\n            .map(readFootnoteElement));\n    }\n\n    function isFootnoteElement(element) {\n        var type = element.attributes[\"w:type\"];\n        return type !== \"continuationSeparator\" && type !== \"separator\";\n    }\n\n    function readFootnoteElement(footnoteElement) {\n        var id = footnoteElement.attributes[\"w:id\"];\n        return bodyReader.readXmlElements(footnoteElement.children)\n            .map(function(body) {\n                return documents.Note({noteType: noteType, noteId: id, body: body});\n            });\n    }\n    \n    return readNotesXml;\n}\n\n},{\"../documents\":5,\"../results\":25}],12:[function(require,module,exports){\nexports.readNumberingXml = readNumberingXml;\nexports.Numbering = Numbering;\nexports.defaultNumbering = new Numbering({});\n\nfunction Numbering(nums) {\n    return {\n        findLevel: function(numId, level) {\n            var num = nums[numId];\n            if (num) {\n                return num[level];\n            } else {\n                return null;\n            }\n        }\n    };\n}\n\nfunction readNumberingXml(root) {\n    var abstractNums = readAbstractNums(root);\n    var nums = readNums(root, abstractNums);\n    return new Numbering(nums);\n}\n\nfunction readAbstractNums(root) {\n    var abstractNums = {};\n    root.getElementsByTagName(\"w:abstractNum\").forEach(function(element) {\n        var id = element.attributes[\"w:abstractNumId\"];\n        abstractNums[id] = readAbstractNum(element);\n    });\n    return abstractNums;\n}\n\nfunction readAbstractNum(element) {\n    var levels = {};\n    element.getElementsByTagName(\"w:lvl\").forEach(function(levelElement) {\n        var levelIndex = levelElement.attributes[\"w:ilvl\"];\n        var numFmt = levelElement.first(\"w:numFmt\").attributes[\"w:val\"];\n        levels[levelIndex] = {\n            isOrdered: numFmt !== \"bullet\",\n            level: levelIndex\n        };\n    });\n    return levels;\n}\n\nfunction readNums(root, abstractNums) {\n    var nums = {};\n    root.getElementsByTagName(\"w:num\").forEach(function(element) {\n        var id = element.attributes[\"w:numId\"];\n        var abstractNumId = element.first(\"w:abstractNumId\").attributes[\"w:val\"];\n        nums[id] = abstractNums[abstractNumId];\n    });\n    return nums;\n}\n\n},{}],13:[function(require,module,exports){\nvar _ = require(\"underscore\");\n\nvar promises = require(\"../promises\");\nvar xml = require(\"../xml\");\n\n\nexports.read = read;\nexports.readXmlFromZipFile = readXmlFromZipFile;\n\nvar xmlNamespaceMap = {\n    \"http://schemas.openxmlformats.org/wordprocessingml/2006/main\": \"w\",\n    \"http://schemas.openxmlformats.org/officeDocument/2006/relationships\": \"r\",\n    \"http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing\": \"wp\",\n    \"http://schemas.openxmlformats.org/drawingml/2006/main\": \"a\",\n    \"http://schemas.openxmlformats.org/drawingml/2006/picture\": \"pic\",\n    \"http://schemas.openxmlformats.org/package/2006/content-types\": \"content-types\",\n    \"urn:schemas-microsoft-com:vml\": \"v\",\n    \"http://schemas.openxmlformats.org/markup-compatibility/2006\": \"mc\",\n    \"urn:schemas-microsoft-com:office:word\": \"office-word\"\n};\n\n\nfunction read(xmlString) {\n    return xml.readString(xmlString, xmlNamespaceMap)\n        .then(function(document) {\n            return collapseAlternateContent(document)[0];\n        });\n}\n\n\nfunction readXmlFromZipFile(docxFile, path) {\n    if (docxFile.exists(path)) {\n        return docxFile.read(path, \"utf-8\")\n            .then(stripUtf8Bom)\n            .then(read);\n    } else {\n        return promises.resolve(null);\n    }\n}\n\n\nfunction stripUtf8Bom(xmlString) {\n    return xmlString.replace(/^\\uFEFF/g, '');\n}\n\n\nfunction collapseAlternateContent(node) {\n    if (node.type === \"element\") {\n        if (node.name === \"mc:AlternateContent\") {\n            return node.first(\"mc:Fallback\").children;\n        } else {\n            node.children = _.flatten(node.children.map(collapseAlternateContent, true));\n            return [node];\n        }\n    } else {\n        return [node];\n    }\n}\n\n},{\"../promises\":24,\"../xml\":32,\"underscore\":154}],14:[function(require,module,exports){\nexports.readRelationships = readRelationships;\n\n\nfunction readRelationships(element) {\n    var relationships = {};\n    element.children.forEach(function(child) {\n        if (child.name === \"{http://schemas.openxmlformats.org/package/2006/relationships}Relationship\") {\n            relationships[child.attributes.Id] = {\n                target: child.attributes.Target\n            };\n        }\n    });\n    return relationships;\n}\n\n},{}],15:[function(require,module,exports){\nvar _ = require(\"underscore\");\n\nvar promises = require(\"../promises\");\nvar xml = require(\"../xml\");\n\nexports.writeStyleMap = writeStyleMap;\nexports.readStyleMap = readStyleMap;\n\n\nvar schema = \"http://schemas.zwobble.org/mammoth/style-map\";\nvar styleMapPath = \"mammoth/style-map\";\nvar styleMapAbsolutePath = \"/\" + styleMapPath;\n\nfunction writeStyleMap(docxFile, styleMap) {\n    docxFile.write(styleMapPath, styleMap);\n    return updateRelationships(docxFile).then(function() {\n        return updateContentTypes(docxFile);\n    });\n}\n\nfunction updateRelationships(docxFile) {\n    var path = \"word/_rels/document.xml.rels\";\n    var relationshipsUri = \"http://schemas.openxmlformats.org/package/2006/relationships\";\n    var relationshipElementName = \"{\" + relationshipsUri + \"}Relationship\";\n    return docxFile.read(path, \"utf8\")\n        .then(xml.readString)\n        .then(function(relationshipsContainer) {\n            var relationships = relationshipsContainer.children;\n            addOrUpdateElement(relationships, relationshipElementName, \"Id\", {\n                \"Id\": \"rMammothStyleMap\",\n                \"Type\": schema,\n                \"Target\": styleMapAbsolutePath\n            });\n            \n            var namespaces = {\"\": relationshipsUri};\n            return docxFile.write(path, xml.writeString(relationshipsContainer, namespaces));\n        });\n}\n\nfunction updateContentTypes(docxFile) {\n    var path = \"[Content_Types].xml\";\n    var contentTypesUri = \"http://schemas.openxmlformats.org/package/2006/content-types\";\n    var overrideName = \"{\" + contentTypesUri + \"}Override\";\n    return docxFile.read(path, \"utf8\")\n        .then(xml.readString)\n        .then(function(typesElement) {\n            var children = typesElement.children;\n            addOrUpdateElement(children, overrideName, \"PartName\", {\n                \"PartName\": styleMapAbsolutePath,\n                \"ContentType\": \"text/prs.mammoth.style-map\"\n            });\n            var namespaces = {\"\": contentTypesUri};\n            return docxFile.write(path, xml.writeString(typesElement, namespaces));\n        });\n}\n\nfunction addOrUpdateElement(elements, name, identifyingAttribute, attributes) {\n    var existingElement = _.find(elements, function(element) {\n        return element.name === name &&\n            element.attributes[identifyingAttribute] === attributes[identifyingAttribute];\n    });\n    if (existingElement) {\n        existingElement.attributes = attributes;\n    } else {\n        elements.push(xml.element(name, attributes));\n    }\n}\n\nfunction readStyleMap(docxFile) {\n    if (docxFile.exists(styleMapPath)) {\n        return docxFile.read(styleMapPath, \"utf8\");\n    } else {\n        return promises.resolve(null);\n    }\n}\n\n},{\"../promises\":24,\"../xml\":32,\"underscore\":154}],16:[function(require,module,exports){\nexports.readStylesXml = readStylesXml;\nexports.Styles = Styles;\nexports.defaultStyles = new Styles({}, {});\n\nfunction Styles(paragraphStyles, characterStyles) {\n    return {\n        findParagraphStyleById: function(styleId) {\n            return paragraphStyles[styleId];\n        },\n        findCharacterStyleById: function(styleId) {\n            return characterStyles[styleId];\n        }\n    };\n}\n\nfunction readStylesXml(root) {\n    var paragraphStyles = {};\n    var characterStyles = {};\n    \n    var styles = {\n        \"paragraph\": paragraphStyles,\n        \"character\": characterStyles\n    };\n    \n    root.getElementsByTagName(\"w:style\").forEach(function(styleElement) {\n        var style = readStyleElement(styleElement);\n        var styleSet = styles[style.type];\n        if (styleSet) {\n            styleSet[style.styleId] = style;\n        }\n    });\n    \n    return new Styles(paragraphStyles, characterStyles);\n}\n\nfunction readStyleElement(styleElement) {\n    var type = styleElement.attributes[\"w:type\"];\n    var styleId = styleElement.attributes[\"w:styleId\"];\n    var name = styleName(styleElement);\n    return {type: type, styleId: styleId, name: name};\n}\n\nfunction styleName(styleElement) {\n    var nameElement = styleElement.first(\"w:name\");\n    return nameElement ? nameElement.attributes[\"w:val\"] : null;\n}\n\n},{}],17:[function(require,module,exports){\nvar _ = require(\"underscore\");\n\nvar html = require(\"./html\");\n\nexports.topLevelElement = topLevelElement;\nexports.elements = elements;\nexports.element = element;\n\nfunction topLevelElement(tagName, attributes) {\n    return elements([element(tagName, attributes, {fresh: true})]);\n}\n\nfunction elements(elementStyles) {\n    return new HtmlPath(elementStyles.map(function(elementStyle) {\n        if (_.isString(elementStyle)) {\n            return element(elementStyle);\n        } else {\n            return elementStyle;\n        }\n    }));\n}\n\nfunction HtmlPath(elements) {\n    this._elements = elements;\n}\n\nHtmlPath.prototype.wrap = function wrap(children) {\n    var result = children();\n    for (var index = this._elements.length - 1; index >= 0; index--) {\n        result = this._elements[index].wrapNodes(result);\n    }\n    return result;\n};\n\nfunction element(tagName, attributes, options) {\n    options = options || {};\n    return new Element(tagName, attributes, options);\n}\n\nfunction Element(tagName, attributes, options) {\n    var tagNames = {};\n    if (_.isArray(tagName)) {\n        tagName.forEach(function(tagName) {\n            tagNames[tagName] = true;\n        });\n        tagName = tagName[0];\n    } else {\n        tagNames[tagName] = true;\n    }\n    \n    this.tagName = tagName;\n    this.tagNames = tagNames;\n    this.attributes = attributes || {};\n    this.fresh = options.fresh;\n}\n\nElement.prototype.matchesElement = function(element) {\n    return this.tagNames[element.tagName] && _.isEqual(this.attributes || {}, element.attributes || {});\n};\n\nElement.prototype.wrap = function wrap(generateNodes) {\n    return this.wrapNodes(generateNodes());\n};\n\nElement.prototype.wrapNodes = function wrapNodes(nodes) {\n    return [html.elementWithTag(this, nodes)];\n};\n\nexports.empty = elements([]);\nexports.ignore = {\n    wrap: function() {\n        return [];\n    }\n};\n\n},{\"./html\":19,\"underscore\":154}],18:[function(require,module,exports){\nvar htmlPaths = require(\"../html-paths\");\n\n\nfunction nonFreshElement(tagName, attributes, children) {\n    return elementWithTag(\n        htmlPaths.element(tagName, attributes, {fresh: false}),\n        children);\n}\n\nfunction freshElement(tagName, attributes, children) {\n    return elementWithTag(\n        htmlPaths.element(tagName, attributes, {fresh: true}),\n        children);\n}\n\nfunction elementWithTag(tag, children) {\n    return {\n        type: \"element\",\n        tag: tag,\n        children: children || []\n    };\n}\n\nfunction selfClosingElement(tagName, attributes) {\n    return {\n        type: \"selfClosingElement\",\n        tagName: tagName,\n        attributes: attributes\n    };\n}\n\nfunction text(value) {\n    return {\n        type: \"text\",\n        value: value\n    };\n}\n\nvar forceWrite = {\n    type: \"forceWrite\"\n};\n\nexports.freshElement = freshElement;\nexports.nonFreshElement = nonFreshElement;\nexports.elementWithTag = elementWithTag;\nexports.selfClosingElement = selfClosingElement;\nexports.text = text;\nexports.forceWrite = forceWrite;\n\n},{\"../html-paths\":17}],19:[function(require,module,exports){\nvar ast = require(\"./ast\");\n\nexports.freshElement = ast.freshElement;\nexports.nonFreshElement = ast.nonFreshElement;\nexports.elementWithTag = ast.elementWithTag;\nexports.selfClosingElement = ast.selfClosingElement;\nexports.text = ast.text;\nexports.forceWrite = ast.forceWrite;\n\nexports.simplify = require(\"./simplify\");\n\nfunction write(writer, nodes) {\n    nodes.forEach(function(node) {\n        writeNode(writer, node);\n    });\n}\n\nfunction writeNode(writer, node) {\n    toStrings[node.type](writer, node);\n}\n\nvar toStrings = {\n    element: generateElementString,\n    selfClosingElement: generateSelfClosingElementString,\n    text: generateTextString,\n    forceWrite: function() { }\n};\n\nfunction generateElementString(writer, node) {\n    writer.open(node.tag.tagName, node.tag.attributes);\n    write(writer, node.children);\n    writer.close(node.tag.tagName);\n}\n\nfunction generateSelfClosingElementString(writer, node) {\n    writer.selfClosing(node.tagName, node.attributes);\n}\n\nfunction generateTextString(writer, node) {\n    writer.text(node.value);\n}\n\nexports.write = write;\n\n},{\"./ast\":18,\"./simplify\":20}],20:[function(require,module,exports){\nvar _ = require(\"underscore\");\n\nvar ast = require(\"./ast\");\n\nfunction simplify(nodes) {\n    return collapse(removeEmpty(nodes));\n}\n\nfunction collapse(nodes) {\n    var children = [];\n    \n    nodes.map(collapseNode).forEach(function(child) {\n        appendChild(children, child);\n    });\n    return children;\n}\n\nfunction collapseNode(node) {\n    return collapsers[node.type](node);\n}\n\nvar collapsers = {\n    element: collapseElement,\n    selfClosingElement: identity,\n    text: identity,\n    forceWrite: identity\n};\n\nfunction collapseElement(node) {\n    return ast.elementWithTag(node.tag, collapse(node.children));\n}\n\nfunction identity(value) {\n    return value;\n}\n\nfunction appendChild(children, child) {\n    var lastChild = children[children.length - 1];\n    if (child.type === \"element\" && !child.tag.fresh && lastChild && lastChild.type === \"element\" && child.tag.matchesElement(lastChild.tag)) {\n        child.children.forEach(function(grandChild) {\n            // Mutation is fine since simplifying elements create a copy of the children.\n            appendChild(lastChild.children, grandChild);\n        });\n    } else {\n        children.push(child);\n    }\n}\n\nfunction removeEmpty(nodes) {\n    return flatMap(nodes, function(node) {\n        return emptiers[node.type](node);\n    });\n}\n\nfunction flatMap(values, func) {\n    return _.flatten(_.map(values, func), true);\n}\n\nvar emptiers = {\n    element: elementEmptier,\n    selfClosingElement: neverEmpty,\n    text: textEmptier,\n    forceWrite: neverEmpty\n};\n\nfunction neverEmpty(node) {\n    return [node];\n}\n\nfunction elementEmptier(element) {\n    var children = removeEmpty(element.children);\n    if (children.length === 0) {\n        return [];\n    } else {\n        return ast.elementWithTag(element.tag, children);\n    }\n}\n\nfunction textEmptier(node) {\n    if (node.value.length === 0) {\n        return [];\n    } else {\n        return [node];\n    }\n}\n\nmodule.exports = simplify;\n\n},{\"./ast\":18,\"underscore\":154}],21:[function(require,module,exports){\nvar _ = require(\"underscore\");\n\nvar promises = require(\"./promises\");\nvar Html = require(\"./html\");\n\nexports.imgElement = function(func) {\n    return function(element, messages) {\n        return promises.when(func(element)).then(function(result) {\n            var attributes = _.clone(result);\n            if (element.altText) {\n                attributes.alt = element.altText;\n            }\n            return [Html.selfClosingElement(\"img\", attributes)];\n        });\n    };\n};\n\n// Undocumented, but retained for backwards-compatibility with 0.3.x\nexports.inline = exports.imgElement;\n\n},{\"./html\":19,\"./promises\":24,\"underscore\":154}],22:[function(require,module,exports){\nvar docxReader = require(\"./docx/docx-reader\");\nvar docxStyleMap = require(\"./docx/style-map\");\nvar DocumentConverter = require(\"./document-to-html\").DocumentConverter;\nvar readStyle = require(\"./style-reader\").readStyle;\nvar readOptions = require(\"./options-reader\").readOptions;\nvar unzip = require(\"./unzip\");\nvar Result = require(\"./results\").Result;\n\nexports.convertToHtml = convertToHtml;\nexports.convertToMarkdown = convertToMarkdown;\nexports.convert = convert;\nexports.extractRawText = extractRawText;\nexports.images = require(\"./images\");\nexports.transforms = require(\"./transforms\");\nexports.underline = require(\"./underline\");\nexports.embedStyleMap = embedStyleMap;\nexports.readEmbeddedStyleMap = readEmbeddedStyleMap;\n\nfunction convertToHtml(input, options) {\n    return convert(input, options);\n}\n\nfunction convertToMarkdown(input, options) {\n    var markdownOptions = Object.create(options || {});\n    markdownOptions.outputFormat = \"markdown\";\n    return convert(input, markdownOptions);\n}\n\nfunction convert(input, options) {\n    options = Object.create(options || {});\n    \n    return unzip.openZip(input)\n        .tap(function(docxFile) {\n            if (!options.styleMap) {\n                return docxStyleMap.readStyleMap(docxFile).then(function(styleMap) {\n                    options.styleMap = styleMap || \"\";\n                });\n            }\n        })\n        .then(function(docxFile) {\n            var fullOptions = readOptions(options);\n            return docxReader.read(docxFile, input)\n                .then(function(documentResult) {\n                    return documentResult.map(fullOptions.transformDocument);\n                })\n                .then(function(documentResult) {\n                    return convertDocumentToHtml(documentResult, fullOptions);\n                });\n        });\n}\n\nfunction readEmbeddedStyleMap(input) {\n    return unzip.openZip(input)\n        .then(docxStyleMap.readStyleMap);\n}\n\nfunction convertDocumentToHtml(documentResult, options) {\n    var parsedOptions = Object.create(options);\n    var styleMapResult = parseStyleMap(options.styleMap);\n    parsedOptions.styleMap = styleMapResult.value;\n    var documentConverter = new DocumentConverter(parsedOptions);\n    \n    return documentResult.flatMapThen(function(document) {\n        return styleMapResult.flatMapThen(function(styleMap) {\n            return documentConverter.convertToHtml(document);\n        });\n    });\n}\n\nfunction parseStyleMap(styleMap) {\n    return Result.combine((styleMap || []).map(readStyle))\n        .map(function(styleMap) {\n            return styleMap.filter(function(styleMapping) {\n                return !!styleMapping;\n            });\n        });\n}\n\n\nfunction extractRawText(input) {\n    return unzip.openZip(input)\n        .then(docxReader.read)\n        .then(function(documentResult) {\n            return documentResult.map(convertElementToRawText);\n        });\n}\n\nfunction convertElementToRawText(element) {\n    if (element.type === \"text\") {\n        return element.value;\n    } else {\n        var tail = element.type === \"paragraph\" ? \"\\n\\n\" : \"\";\n        return (element.children || []).map(convertElementToRawText).join(\"\") + tail;\n    }\n}\n\nfunction embedStyleMap(input, styleMap) {\n    return unzip.openZip(input)\n        .tap(function(docxFile) {\n            return docxStyleMap.writeStyleMap(docxFile, styleMap);\n        })\n        .then(function(docxFile) {\n            return {\n                toBuffer: docxFile.toBuffer\n            };\n        });\n}\n\nexports.styleMapping = function() {\n    throw new Error('Use a raw string instead of mammoth.styleMapping e.g. \"p[style-name=\\'Title\\'] => h1\" instead of mammoth.styleMapping(\"p[style-name=\\'Title\\'] => h1\")');\n};\n\n},{\"./document-to-html\":4,\"./docx/docx-reader\":10,\"./docx/style-map\":15,\"./images\":21,\"./options-reader\":23,\"./results\":25,\"./style-reader\":26,\"./transforms\":27,\"./underline\":28,\"./unzip\":2}],23:[function(require,module,exports){\nexports.readOptions = readOptions;\n\n\nvar _ = require(\"underscore\");\n\n\nvar standardOptions = exports._standardOptions = {\n    styleMap: [\n        \"p.Heading1 => h1:fresh\",\n        \"p.Heading2 => h2:fresh\",\n        \"p.Heading3 => h3:fresh\",\n        \"p.Heading4 => h4:fresh\",\n        \"p[style-name='Heading 1'] => h1:fresh\",\n        \"p[style-name='Heading 2'] => h2:fresh\",\n        \"p[style-name='Heading 3'] => h3:fresh\",\n        \"p[style-name='Heading 4'] => h4:fresh\",\n        \"p[style-name='heading 1'] => h1:fresh\",\n        \"p[style-name='heading 2'] => h2:fresh\",\n        \"p[style-name='heading 3'] => h3:fresh\",\n        \"p[style-name='heading 4'] => h4:fresh\",\n        \"p[style-name='heading 4'] => h4:fresh\",\n        \n        \"r[style-name='Strong'] => strong\",\n        \n        \"p[style-name='footnote text'] => p\",\n        \"r[style-name='footnote reference'] =>\",\n        \"p[style-name='endnote text'] => p\",\n        \"r[style-name='endnote reference'] =>\",\n        \"p[style-name='annotation text'] => p\",\n        \"r[style-name='annotation reference'] =>\",\n        \n        // LibreOffice\n        \"p[style-name='Footnote'] => p\",\n        \"r[style-name='Footnote anchor'] =>\",\n        \"p[style-name='Endnote'] => p\",\n        \"r[style-name='Endnote anchor'] =>\",\n        \n        \"p:unordered-list(1) => ul > li:fresh\",\n        \"p:unordered-list(2) => ul|ol > li > ul > li:fresh\",\n        \"p:unordered-list(3) => ul|ol > li > ul|ol > li > ul > li:fresh\",\n        \"p:unordered-list(4) => ul|ol > li > ul|ol > li > ul|ol > li > ul > li:fresh\",\n        \"p:unordered-list(5) => ul|ol > li > ul|ol > li > ul|ol > li > ul|ol > li > ul > li:fresh\",\n        \"p:ordered-list(1) => ol > li:fresh\",\n        \"p:ordered-list(2) => ul|ol > li > ol > li:fresh\",\n        \"p:ordered-list(3) => ul|ol > li > ul|ol > li > ol > li:fresh\",\n        \"p:ordered-list(4) => ul|ol > li > ul|ol > li > ul|ol > li > ol > li:fresh\",\n        \"p:ordered-list(5) => ul|ol > li > ul|ol > li > ul|ol > li > ul|ol > li > ol > li:fresh\",\n        \n        \"r[style-name='Hyperlink'] =>\",\n        \n        \"p[style-name='Normal'] => p:fresh\"\n    \n    ],\n    transformDocument: identity,\n    includeDefaultStyleMap: true\n};\n\nfunction readOptions(options) {\n    options = options || {};\n    var fullOptions = {};\n    _.extend(fullOptions, standardOptions, options);\n    \n    fullOptions.styleMap = readStyleMap(options.styleMap, fullOptions);\n    \n    return fullOptions;\n}\n\nfunction readStyleMap(styleMap, options) {\n    var customStyleMap = readCustomStyleMap(styleMap);\n    return customStyleMap.concat(options.includeDefaultStyleMap ? standardOptions.styleMap : []);\n}\n\nfunction readCustomStyleMap(styleMap) {\n    if (!styleMap) {\n        return [];\n    } else if (_.isString(styleMap)) {\n        return styleMap.split(\"\\n\")\n            .map(function(line) {\n                return line.trim();\n            })\n            .filter(function(line) {\n                return line !== \"\" && line.charAt(0) !== \"#\";\n            });\n    } else {\n        return styleMap;\n    }\n}\n\n\nfunction identity(value) {\n    return value;\n}\n\n},{\"underscore\":154}],24:[function(require,module,exports){\nvar _ = require(\"underscore\");\nvar bluebird = require(\"bluebird/js/release/promise\")();\n\nexports.defer = bluebird.defer;\nexports.when = bluebird.resolve;\nexports.resolve = bluebird.resolve;\nexports.all = bluebird.all;\nexports.props = bluebird.props;\nexports.reject = bluebird.reject;\nexports.promisify = bluebird.promisify;\nexports.mapSeries = bluebird.mapSeries;\nexports.attempt = bluebird.attempt;\n\nexports.nfcall = function(func) {\n    var args = Array.prototype.slice.call(arguments, 1);\n    var promisedFunc = bluebird.promisify(func);\n    return promisedFunc.apply(null, args);\n};\n\nbluebird.prototype.fail = bluebird.prototype.caught;\n\nbluebird.prototype.also = function(func) {\n    return this.then(function(value) {\n        var returnValue = _.extend({}, value, func(value));\n        return bluebird.props(returnValue);\n    });\n};\n\n},{\"bluebird/js/release/promise\":57,\"underscore\":154}],25:[function(require,module,exports){\nvar _ = require(\"underscore\");\n\n\nexports.Result = Result;\nexports.success = success;\nexports.warning = warning;\nexports.error = error;\n\n\nfunction Result(value, messages) {\n    this.value = value;\n    this.messages = messages || [];\n}\n\nResult.prototype.map = function(func) {\n    return new Result(func(this.value), this.messages);\n};\n\nResult.prototype.flatMap = function(func) {\n    var funcResult = func(this.value);\n    return new Result(funcResult.value, combineMessages([this, funcResult]));\n};\n\nResult.prototype.flatMapThen = function(func) {\n    var that = this;\n    return func(this.value).then(function(otherResult) {\n        return new Result(otherResult.value, combineMessages([that, otherResult]));\n    });\n};\n\nResult.combine = function(results) {\n    var values = _.flatten(_.pluck(results, \"value\"));\n    var messages = combineMessages(results);\n    return new Result(values, messages);\n};\n\nfunction success(value) {\n    return new Result(value, []);\n}\n\nfunction warning(message) {\n    return {\n        type: \"warning\",\n        message: message\n    };\n}\n\nfunction error(exception) {\n    return {\n        type: \"error\",\n        message: exception.message,\n        error: exception\n    };\n}\n\nfunction combineMessages(results) {\n    var messages = [];\n    _.flatten(_.pluck(results, \"messages\"), true).forEach(function(message) {\n        if (!containsMessage(messages, message)) {\n            messages.push(message);\n        }\n    });\n    return messages;\n}\n\nfunction containsMessage(messages, message) {\n    return _.find(messages, isSameMessage.bind(null, message)) !== undefined;\n}\n\nfunction isSameMessage(first, second) {\n    return first.type === second.type && first.message === second.message;\n}\n\n},{\"underscore\":154}],26:[function(require,module,exports){\nvar _ = require(\"underscore\");\nvar lop = require(\"lop\");\nvar RegexTokeniser = lop.RegexTokeniser;\n\nvar documentMatchers = require(\"./document-matchers\");\nvar htmlPaths = require(\"./html-paths\");\nvar results = require(\"../lib/results\");\n\nexports.readHtmlPath = readHtmlPath;\nexports.readDocumentMatcher = readDocumentMatcher;\nexports.readStyle = readStyle;\n\n\nfunction readStyle(string) {\n    return parseString(styleRule, string);\n}\n\nfunction createStyleRule() {\n    return lop.rules.sequence(\n        lop.rules.sequence.capture(documentMatcherRule()),\n        lop.rules.tokenOfType(\"whitespace\"),\n        lop.rules.tokenOfType(\"arrow\"),\n        lop.rules.sequence.capture(lop.rules.optional(lop.rules.sequence(\n            lop.rules.tokenOfType(\"whitespace\"),\n            lop.rules.sequence.capture(htmlPathRule())\n        ).head())),\n        lop.rules.tokenOfType(\"end\")\n    ).map(function(documentMatcher, htmlPath) {\n        return {\n            from: documentMatcher,\n            to: htmlPath.valueOrElse(htmlPaths.empty)\n        };\n    });\n}\n\nfunction readDocumentMatcher(string) {\n    return parseString(documentMatcherRule(), string);\n}\n\nfunction documentMatcherRule() {\n    var sequence = lop.rules.sequence;\n    \n    var identifierToConstant = function(identifier, constant) {\n        return lop.rules.then(\n            lop.rules.token(\"identifier\", identifier),\n            function() {\n                return constant;\n            }\n        );\n    };\n    \n    var paragraphRule = identifierToConstant(\"p\", documentMatchers.paragraph);\n    var runRule = identifierToConstant(\"r\", documentMatchers.run);\n    \n    var elementTypeRule = lop.rules.firstOf(\"p or r\",\n        paragraphRule,\n        runRule\n    );\n    \n    var styleIdRule = lop.rules.then(\n        classRule,\n        function(styleId) {\n            return {styleId: styleId};\n        }\n    );\n    \n    var stringRule = lop.rules.then(\n        lop.rules.tokenOfType(\"string\"),\n        function(value) {\n            return value;\n        }\n    );\n    \n    var styleNameRule = lop.rules.then(\n        lop.rules.sequence(\n            lop.rules.tokenOfType(\"open-square-bracket\"),\n            lop.rules.token(\"identifier\", \"style-name\"),\n            lop.rules.tokenOfType(\"equals\"),\n            lop.rules.sequence.capture(stringRule),\n            lop.rules.tokenOfType(\"close-square-bracket\")\n        ).head(),\n        function(styleName) {\n            return {styleName: styleName};\n        }\n    );\n    \n    \n    var listTypeRule = lop.rules.firstOf(\"list type\",\n        identifierToConstant(\"ordered-list\", {isOrdered: true}),\n        identifierToConstant(\"unordered-list\", {isOrdered: false})\n    );\n    var listRule = sequence(\n        lop.rules.tokenOfType(\"colon\"),\n        sequence.capture(listTypeRule),\n        sequence.cut(),\n        lop.rules.tokenOfType(\"open-paren\"),\n        sequence.capture(integerRule),\n        lop.rules.tokenOfType(\"close-paren\")\n    ).map(function(listType, levelNumber) {\n        return {\n            list: {\n                isOrdered: listType.isOrdered,\n                levelIndex: levelNumber - 1\n            }\n        };\n    });\n    var matcherSuffix = lop.rules.firstOf(\"matcher suffix\",\n        styleIdRule,\n        styleNameRule,\n        listRule\n    );\n    var matcherSuffixes = lop.rules.zeroOrMore(matcherSuffix);\n    \n    var paragraphOrRun = sequence(\n        sequence.capture(elementTypeRule),\n        sequence.capture(matcherSuffixes)\n    ).map(function(createMatcher, suffixes) {\n        var matcherOptions = {};\n        suffixes.forEach(function(suffix) {\n            _.extend(matcherOptions, suffix);\n        });\n        return createMatcher(matcherOptions);\n    });\n    \n    var bold = identifierToConstant(\"b\", documentMatchers.bold);\n    var italic = identifierToConstant(\"i\", documentMatchers.italic);\n    var underline = identifierToConstant(\"u\", documentMatchers.underline);\n    var strikethrough = identifierToConstant(\"strike\", documentMatchers.strikethrough);\n    var commentReference = identifierToConstant(\"comment-reference\", documentMatchers.commentReference);\n    \n    return lop.rules.firstOf(\"element type\",\n        paragraphOrRun,\n        bold,\n        italic,\n        underline,\n        strikethrough,\n        commentReference\n    );\n}\n\nfunction readHtmlPath(string) {\n    return parseString(htmlPathRule(), string);\n}\n\nfunction htmlPathRule() {\n    var capture = lop.rules.sequence.capture;\n    var whitespaceRule = lop.rules.tokenOfType(\"whitespace\");\n    var freshRule = lop.rules.then(\n        lop.rules.optional(lop.rules.sequence(\n            lop.rules.tokenOfType(\"colon\"),\n            lop.rules.token(\"identifier\", \"fresh\")\n        )),\n        function(option) {\n            return option.map(function() {\n                return true;\n            }).valueOrElse(false);\n        }\n    );\n    \n    var tagNamesRule = lop.rules.oneOrMoreWithSeparator(\n        identifierRule,\n        lop.rules.tokenOfType(\"choice\")\n    );\n    \n    var styleElementRule = lop.rules.sequence(\n        capture(tagNamesRule),\n        capture(lop.rules.zeroOrMore(classRule)),\n        capture(freshRule)\n    ).map(function(tagName, classNames, fresh) {\n        var attributes = {};\n        var options = {};\n        if (classNames.length > 0) {\n            attributes[\"class\"] = classNames.join(\" \");\n        }\n        if (fresh) {\n            options.fresh = true;\n        }\n        return htmlPaths.element(tagName, attributes, options);\n    });\n    \n    return lop.rules.firstOf(\"html path\",\n        lop.rules.then(lop.rules.tokenOfType(\"bang\"), function() {\n            return htmlPaths.ignore;\n        }),\n        lop.rules.then(\n            lop.rules.zeroOrMoreWithSeparator(\n                styleElementRule,\n                lop.rules.sequence(\n                    whitespaceRule,\n                    lop.rules.tokenOfType(\"gt\"),\n                    whitespaceRule\n                )\n            ),\n            htmlPaths.elements\n        )\n    );\n}\n    \nvar identifierRule = lop.rules.tokenOfType(\"identifier\");\nvar integerRule = lop.rules.tokenOfType(\"integer\");\n    \nvar classRule = lop.rules.sequence(\n    lop.rules.tokenOfType(\"dot\"),\n    lop.rules.sequence.capture(identifierRule)\n).head();\n\nfunction parseString(rule, string) {\n    var tokens = tokenise(string);\n    var parser = lop.Parser();\n    var parseResult = parser.parseTokens(rule, tokens);\n    if (parseResult.isSuccess()) {\n        return results.success(parseResult.value());\n    } else {\n        return new results.Result(null, [results.warning(describeFailure(string, parseResult))]);\n    }\n}\n\nfunction describeFailure(input, parseResult) {\n    return \"Did not understand this style mapping, so ignored it: \" + input + \"\\n\" +\n        parseResult.errors().map(describeError).join(\"\\n\");\n}\n\nfunction describeError(error) {\n    return \"Error was at character number \" + error.characterNumber() + \": \" +\n        \"Expected \" + error.expected + \" but got \" + error.actual;\n}\n\nfunction tokenise(string) {\n    var tokeniser = new RegexTokeniser([\n        {name: \"identifier\", regex: /([a-zA-Z][a-zA-Z0-9\\-]*)/},\n        {name: \"dot\", regex: /\\./},\n        {name: \"colon\", regex: /:/},\n        {name: \"gt\", regex: />/},\n        {name: \"whitespace\", regex: /\\s+/},\n        {name: \"arrow\", regex: /=>/},\n        {name: \"equals\", regex: /=/},\n        {name: \"open-paren\", regex: /\\(/},\n        {name: \"close-paren\", regex: /\\)/},\n        {name: \"open-square-bracket\", regex: /\\[/},\n        {name: \"close-square-bracket\", regex: /\\]/},\n        {name: \"string\", regex: /'([^']*)'/},\n        {name: \"integer\", regex: /([0-9]+)/},\n        {name: \"choice\", regex: /\\|/},\n        {name: \"bang\", regex: /(!)/}\n    ]);\n    return tokeniser.tokenise(string);\n}\n\n\nvar styleRule = createStyleRule();\n\n},{\"../lib/results\":25,\"./document-matchers\":3,\"./html-paths\":17,\"lop\":140,\"underscore\":154}],27:[function(require,module,exports){\nvar _ = require(\"underscore\");\n\nexports.paragraph = function(transform) {\n    function transformElement(element) {\n        if (element.children) {\n            var children = _.map(element.children, transformElement);\n            element = _.extend(element, {children: children});\n        }\n        \n        if (element.type === \"paragraph\") {\n            element = transform(element);\n        }\n        \n        return element;\n    }\n    return transformElement;\n};\n\n},{\"underscore\":154}],28:[function(require,module,exports){\nvar htmlPaths = require(\"./html-paths\");\nvar Html = require(\"./html\");\n\n\nexports.element = element;\n\nfunction element(name) {\n    return function(html) {\n        return Html.elementWithTag(htmlPaths.element(name), [html]);\n    };\n}\n\n},{\"./html\":19,\"./html-paths\":17}],29:[function(require,module,exports){\nvar util = require(\"util\");\nvar _ = require(\"underscore\");\n\nexports.writer = writer;\n\nfunction writer(options) {\n    options = options || {};\n    if (options.prettyPrint) {\n        return prettyWriter();\n    } else {\n        return simpleWriter();\n    }\n}\n\n\nvar indentedElements = {\n    div: true,\n    p: true,\n    ul: true,\n    li: true\n};\n\n\nfunction prettyWriter() {\n    var indentationLevel = 0;\n    var indentation = \"  \";\n    var stack = [];\n    var start = true;\n    var inText = false;\n    \n    var writer = simpleWriter();\n    \n    function open(tagName, attributes) {\n        if (indentedElements[tagName]) {\n            indent();\n        }\n        stack.push(tagName);\n        writer.open(tagName, attributes);\n        if (indentedElements[tagName]) {\n            indentationLevel++;\n        }\n        start = false;\n    }\n    \n    function close(tagName) {\n        if (indentedElements[tagName]) {\n            indentationLevel--;\n            indent();\n        }\n        stack.pop();\n        writer.close(tagName);\n    }\n    \n    function text(value) {\n        startText();\n        writer.text(value.replace(\"\\n\", \"\\n\" + indentation));\n    }\n    \n    function selfClosing(tagName, attributes) {\n        indent();\n        writer.selfClosing(tagName, attributes);\n    }\n    \n    function append(html) {\n        startText();\n        writer.append(html.replace(\"\\n\", \"\\n\" + indentation));\n    }\n    \n    function insideIndentedElement() {\n        return stack.length === 0 || indentedElements[stack[stack.length - 1]];\n    }\n    \n    function startText() {\n        if (!inText) {\n            indent();\n            inText = true;\n        }\n    }\n    \n    function indent() {\n        inText = false;\n        if (!start && insideIndentedElement()) {\n            writer.append(\"\\n\");\n            for (var i = 0; i < indentationLevel; i++) {\n                writer.append(indentation);\n            }\n        }\n    }\n    \n    return {\n        asString: writer.asString,\n        open: open,\n        close: close,\n        text: text,\n        selfClosing: selfClosing,\n        append: append\n    };\n}\n\n\nfunction simpleWriter() {\n    var fragments = [];\n    \n    function open(tagName, attributes) {\n        var attributeString = generateAttributeString(attributes);\n        fragments.push(util.format(\"<%s%s>\", tagName, attributeString));\n    }\n    \n    function close(tagName) {\n        fragments.push(util.format(\"</%s>\", tagName));\n    }\n    \n    function selfClosing(tagName, attributes) {\n        var attributeString = generateAttributeString(attributes);\n        fragments.push(util.format(\"<%s%s />\", tagName, attributeString));\n    }\n    \n    function generateAttributeString(attributes) {\n        return _.map(attributes, function(value, key) {\n            return util.format(' %s=\"%s\"', key, escapeHtmlAttribute(value));\n        }).join(\"\");\n    }\n    \n    function text(value) {\n        fragments.push(escapeHtmlText(value));\n    }\n    \n    function append(html) {\n        fragments.push(html);\n    }\n    \n    function asString() {\n        return fragments.join(\"\");\n    }\n    \n    return {\n        asString: asString,\n        open: open,\n        close: close,\n        text: text,\n        selfClosing: selfClosing,\n        append: append\n    };\n}\n\nfunction escapeHtmlText(value) {\n    return value\n        .replace(/&/g, '&amp;')\n        .replace(/</g, '&lt;')\n        .replace(/>/g, '&gt;');\n}\n\nfunction escapeHtmlAttribute(value) {\n    return value\n        .replace(/&/g, '&amp;')\n        .replace(/\"/g, '&quot;')\n        .replace(/</g, '&lt;')\n        .replace(/>/g, '&gt;');\n}\n\n},{\"underscore\":154,\"util\":100}],30:[function(require,module,exports){\nvar htmlWriter = require(\"./html-writer\");\nvar markdownWriter = require(\"./markdown-writer\");\n\nexports.writer = writer;\n\n\nfunction writer(options) {\n    options = options || {};\n    if (options.outputFormat === \"markdown\") {\n        return markdownWriter.writer();\n    } else {\n        return htmlWriter.writer(options);\n    }\n}\n\n},{\"./html-writer\":29,\"./markdown-writer\":31}],31:[function(require,module,exports){\nvar _ = require(\"underscore\");\n\n\nfunction symmetricMarkdownElement(end) {\n    return markdownElement(end, end);\n}\n\nfunction markdownElement(start, end) {\n    return function() {\n        return {start: start, end: end};\n    };\n}\n\nfunction markdownLink(attributes) {\n    var href = attributes.href || \"\";\n    if (href) {\n        return {\n            start: \"[\",\n            end: \"](\" + href + \")\",\n            anchorPosition: \"before\"\n        };\n    } else {\n        return {};\n    }\n}\n\nfunction markdownImage(attributes) {\n    var src = attributes.src || \"\";\n    var altText = attributes.alt || \"\";\n    if (src || altText) {\n        return {start: \"![\" + altText + \"](\" + src + \")\"};\n    } else {\n        return {};\n    }\n}\n\nfunction markdownList(options) {\n    return function(attributes, list) {\n        return {\n            start: list ? \"\\n\" : \"\",\n            end: list ? \"\" : \"\\n\",\n            list: {\n                isOrdered: options.isOrdered,\n                indent: list ? list.indent + 1 : 0,\n                count: 0\n            }\n        };\n    };\n}\n\nfunction markdownListItem(attributes, list, listItem) {\n    list = list || {indent: 0, isOrdered: false, count: 0};\n    list.count++;\n    listItem.hasClosed = false;\n    \n    var bullet = list.isOrdered ? list.count + \".\" : \"-\";\n    var start = repeatString(\"\\t\", list.indent) + bullet + \" \";\n        \n    return {\n        start: start,\n        end: function() {\n            if (!listItem.hasClosed) {\n                listItem.hasClosed = true;\n                return \"\\n\";\n            }\n        }\n    };\n}\n\nvar htmlToMarkdown = {\n    \"p\": markdownElement(\"\", \"\\n\\n\"),\n    \"br\": markdownElement(\"\", \"  \\n\"),\n    \"ul\": markdownList({isOrdered: false}),\n    \"ol\": markdownList({isOrdered: true}),\n    \"li\": markdownListItem,\n    \"strong\": symmetricMarkdownElement(\"__\"),\n    \"em\": symmetricMarkdownElement(\"*\"),\n    \"a\": markdownLink,\n    \"img\": markdownImage\n};\n\n(function() {\n    for (var i = 1; i <= 6; i++) {\n        htmlToMarkdown[\"h\" + i] = markdownElement(repeatString(\"#\", i) + \" \", \"\\n\\n\");\n    }\n})();\n\nfunction repeatString(value, count) {\n    return new Array(count + 1).join(value);\n}\n\nfunction markdownWriter() {\n    var fragments = [];\n    var elementStack = [];\n    var list = null;\n    var listItem = {};\n    \n    function open(tagName, attributes) {\n        attributes = attributes || {};\n        \n        var createElement = htmlToMarkdown[tagName] || function() {\n            return {};\n        };\n        var element = createElement(attributes, list, listItem);\n        elementStack.push({end: element.end, list: list});\n        \n        if (element.list) {\n            list = element.list;\n        }\n        \n        var anchorBeforeStart = element.anchorPosition === \"before\";\n        if (anchorBeforeStart) {\n            writeAnchor(attributes);\n        }\n\n        fragments.push(element.start || \"\");\n        if (!anchorBeforeStart) {\n            writeAnchor(attributes);\n        }\n    }\n    \n    function writeAnchor(attributes) {\n        if (attributes.id) {\n            fragments.push('<a id=\"' + attributes.id + '\"></a>');\n        }\n    }\n    \n    function close(tagName) {\n        var element = elementStack.pop();\n        list = element.list;\n        var end = _.isFunction(element.end) ? element.end() : element.end;\n        fragments.push(end || \"\");\n    }\n    \n    function selfClosing(tagName, attributes) {\n        open(tagName, attributes);\n        close(tagName);\n    }\n    \n    function text(value) {\n        fragments.push(escapeMarkdown(value));\n    }\n    \n    function append(html) {\n        fragments.push(html);\n    }\n    \n    function asString() {\n        return fragments.join(\"\");\n    }\n\n    return {\n        asString: asString,\n        open: open,\n        close: close,\n        text: text,\n        selfClosing: selfClosing,\n        append: append\n    };\n}\n\nexports.writer = markdownWriter;\n\nfunction escapeMarkdown(value) {\n    return value\n        .replace(/\\\\/g, '\\\\\\\\')\n        .replace(/([\\`\\*_\\{\\}\\[\\]\\(\\)\\#\\+\\-\\.\\!])/g, '\\\\$1');\n}\n\n},{\"underscore\":154}],32:[function(require,module,exports){\nvar nodes = require(\"./nodes\");\n\nexports.Element = nodes.Element;\nexports.element = nodes.element;\nexports.text = nodes.text;\nexports.readString = require(\"./reader\").readString;\nexports.writeString = require(\"./writer\").writeString;\n\n},{\"./nodes\":33,\"./reader\":34,\"./writer\":35}],33:[function(require,module,exports){\nvar _ = require(\"underscore\");\n\n\nexports.Element = Element;\nexports.element = function(name, attributes, children) {\n    return new Element(name, attributes, children);\n};\nexports.text = function(value) {\n    return {\n        type: \"text\",\n        value: value\n    };\n};\n\n\nvar emptyElement = {\n    first: function() {\n        return null;\n    },\n    firstOrEmpty: function() {\n        return emptyElement;\n    },\n    attributes: {}\n};\n\nfunction Element(name, attributes, children) {\n    this.type = \"element\";\n    this.name = name;\n    this.attributes = attributes || {};\n    this.children = children || [];\n}\n\nElement.prototype.first = function(name) {\n    return _.find(this.children, function(child) {\n        return child.name === name;\n    });\n};\n\nElement.prototype.firstOrEmpty = function(name) {\n    return this.first(name) || emptyElement;\n};\n\nElement.prototype.getElementsByTagName = function(name) {\n    var elements = _.filter(this.children, function(child) {\n        return child.name === name;\n    });\n    return toElementList(elements);\n};\n\nElement.prototype.text = function() {\n    if (this.children.length === 0) {\n        return \"\";\n    } else if (this.children.length !== 1 || this.children[0].type !== \"text\") {\n        throw new Error(\"Not implemented\");\n    }\n    return this.children[0].value;\n};\n\nvar elementListPrototype = {\n    getElementsByTagName: function(name) {\n        return toElementList(_.flatten(this.map(function(element) {\n            return element.getElementsByTagName(name);\n        }, true)));\n    }\n};\n\nfunction toElementList(array) {\n    return _.extend(array, elementListPrototype);\n}\n\n},{\"underscore\":154}],34:[function(require,module,exports){\nvar promises = require(\"../promises\");\nvar sax = require(\"sax\");\nvar _ = require(\"underscore\");\n\nvar nodes = require(\"./nodes\");\nvar Element = nodes.Element;\n\nexports.readString = readString;\n\nfunction readString(xmlString, namespaceMap) {\n    namespaceMap = namespaceMap || {};\n    \n    var finished = false;\n    var parser = sax.parser(true, {xmlns: true, position: false});\n    \n    var rootElement = {children: []};\n    var currentElement = rootElement;\n    var stack = [];\n    \n    var deferred = promises.defer();\n    \n    parser.onopentag = function(node) {\n        var attributes = mapObject(node.attributes, function(attribute) {\n            return attribute.value;\n        }, mapName);\n        \n        var element = new Element(mapName(node), attributes);\n        currentElement.children.push(element);\n        stack.push(currentElement);\n        currentElement = element;\n    };\n    \n    function mapName(node) {\n        if (node.uri) {\n            var mappedPrefix = namespaceMap[node.uri];\n            var prefix;\n            if (mappedPrefix) {\n                prefix = mappedPrefix + \":\";\n            } else {\n                prefix = \"{\" + node.uri + \"}\";\n            }\n            return prefix + node.local;\n        } else {\n            return node.local;\n        }\n    }\n    \n    parser.onclosetag = function(node) {\n        currentElement = stack.pop();\n    };\n    \n    parser.ontext = function(text) {\n        if (currentElement !== rootElement) {\n            currentElement.children.push(nodes.text(text));\n        }\n    };\n    \n    parser.onend = function() {\n        if (!finished) {\n            finished = true;\n            deferred.resolve(rootElement.children[0]);\n        }\n    };\n    \n    parser.onerror = function(error) {\n        if (!finished) {\n            finished = true;\n            deferred.reject(error);\n        }\n    };\n    \n    parser.write(xmlString).close();\n    \n    return deferred.promise;\n}\n\nfunction mapObject(input, valueFunc, keyFunc) {\n    return _.reduce(input, function(result, value, key) {\n        var mappedKey = keyFunc(value, key, input);\n        result[mappedKey] = valueFunc(value, key, input);\n        return result;\n    }, {});\n}\n\n},{\"../promises\":24,\"./nodes\":33,\"sax\":153,\"underscore\":154}],35:[function(require,module,exports){\nvar _ = require(\"underscore\");\nvar xmlbuilder = require(\"xmlbuilder\");\n\n\nexports.writeString = writeString;\n\n\nfunction writeString(root, namespaces) {\n    var uriToPrefix = _.invert(namespaces);\n    \n    var nodeWriters = {\n        element: writeElement,\n        text: writeTextNode\n    };\n\n    function writeNode(builder, node) {\n        return nodeWriters[node.type](builder, node);\n    }\n\n    function writeElement(builder, element) {\n        var elementBuilder = builder.element(mapElementName(element.name), element.attributes);\n        element.children.forEach(function(child) {\n            writeNode(elementBuilder, child);\n        });\n    }\n    \n    function mapElementName(name) {\n        var longFormMatch = /^\\{(.*)\\}(.*)$/.exec(name);\n        if (longFormMatch) {\n            var prefix = uriToPrefix[longFormMatch[1]];\n            return prefix + (prefix === \"\" ? \"\" : \":\") + longFormMatch[2];\n        } else {\n            return name;\n        }\n    }\n    \n    function writeDocument(root) {\n        var builder = xmlbuilder\n            .create(mapElementName(root.name), {\n                version: '1.0',\n                encoding: 'UTF-8',\n                standalone: true\n            });\n        \n        _.forEach(namespaces, function(uri, prefix) {\n            var key = \"xmlns\" + (prefix === \"\" ? \"\" : \":\" + prefix);\n            builder.attribute(key, uri);\n        });\n        \n        root.children.forEach(function(child) {\n            writeNode(builder, child);\n        });\n        return builder.end();\n    }\n\n    return writeDocument(root);\n}\n\nfunction writeTextNode(builder, node) {\n    builder.text(node.value);\n}\n\n},{\"underscore\":154,\"xmlbuilder\":171}],36:[function(require,module,exports){\n(function (Buffer){\nvar JSZip = require(\"jszip\");\n\nvar promises = require(\"./promises\");\n\nexports.openArrayBuffer = openArrayBuffer;\n\nfunction openArrayBuffer(arrayBuffer) {\n    var zipFile = new JSZip(arrayBuffer);\n    function exists(name) {\n        return zipFile.file(name) !== null;\n    }\n    \n    function read(name, encoding) {\n        var array = zipFile.file(name).asUint8Array();\n        var buffer = new Buffer(array);\n        if (encoding) {\n            return promises.when(buffer.toString(encoding));\n        } else {\n            return promises.when(buffer);\n        }\n    }\n    \n    function write(name, contents) {\n        zipFile.file(name, contents);\n    }\n    \n    function toBuffer() {\n        return zipFile.generate({type: \"nodebuffer\"});\n    }\n    \n    return {\n        exists: exists,\n        read: read,\n        write: write,\n        toBuffer: toBuffer\n    };\n}\n\n\n}).call(this,require(\"buffer\").Buffer)\n},{\"./promises\":24,\"buffer\":73,\"jszip\":109}],37:[function(require,module,exports){\n\"use strict\";\nmodule.exports = function(Promise) {\nvar SomePromiseArray = Promise._SomePromiseArray;\nfunction any(promises) {\n    var ret = new SomePromiseArray(promises);\n    var promise = ret.promise();\n    ret.setHowMany(1);\n    ret.setUnwrap();\n    ret.init();\n    return promise;\n}\n\nPromise.any = function (promises) {\n    return any(promises);\n};\n\nPromise.prototype.any = function () {\n    return any(this);\n};\n\n};\n\n},{}],38:[function(require,module,exports){\n(function (process){\n\"use strict\";\nvar firstLineError;\ntry {throw new Error(); } catch (e) {firstLineError = e;}\nvar schedule = require(\"./schedule\");\nvar Queue = require(\"./queue\");\nvar util = require(\"./util\");\n\nfunction Async() {\n    this._customScheduler = false;\n    this._isTickUsed = false;\n    this._lateQueue = new Queue(16);\n    this._normalQueue = new Queue(16);\n    this._haveDrainedQueues = false;\n    this._trampolineEnabled = true;\n    var self = this;\n    this.drainQueues = function () {\n        self._drainQueues();\n    };\n    this._schedule = schedule;\n}\n\nAsync.prototype.setScheduler = function(fn) {\n    var prev = this._schedule;\n    this._schedule = fn;\n    this._customScheduler = true;\n    return prev;\n};\n\nAsync.prototype.hasCustomScheduler = function() {\n    return this._customScheduler;\n};\n\nAsync.prototype.enableTrampoline = function() {\n    this._trampolineEnabled = true;\n};\n\nAsync.prototype.disableTrampolineIfNecessary = function() {\n    if (util.hasDevTools) {\n        this._trampolineEnabled = false;\n    }\n};\n\nAsync.prototype.haveItemsQueued = function () {\n    return this._isTickUsed || this._haveDrainedQueues;\n};\n\n\nAsync.prototype.fatalError = function(e, isNode) {\n    if (isNode) {\n        process.stderr.write(\"Fatal \" + (e instanceof Error ? e.stack : e) +\n            \"\\n\");\n        process.exit(2);\n    } else {\n        this.throwLater(e);\n    }\n};\n\nAsync.prototype.throwLater = function(fn, arg) {\n    if (arguments.length === 1) {\n        arg = fn;\n        fn = function () { throw arg; };\n    }\n    if (typeof setTimeout !== \"undefined\") {\n        setTimeout(function() {\n            fn(arg);\n        }, 0);\n    } else try {\n        this._schedule(function() {\n            fn(arg);\n        });\n    } catch (e) {\n        throw new Error(\"No async scheduler available\\u000a\\u000a    See http://goo.gl/MqrFmX\\u000a\");\n    }\n};\n\nfunction AsyncInvokeLater(fn, receiver, arg) {\n    this._lateQueue.push(fn, receiver, arg);\n    this._queueTick();\n}\n\nfunction AsyncInvoke(fn, receiver, arg) {\n    this._normalQueue.push(fn, receiver, arg);\n    this._queueTick();\n}\n\nfunction AsyncSettlePromises(promise) {\n    this._normalQueue._pushOne(promise);\n    this._queueTick();\n}\n\nif (!util.hasDevTools) {\n    Async.prototype.invokeLater = AsyncInvokeLater;\n    Async.prototype.invoke = AsyncInvoke;\n    Async.prototype.settlePromises = AsyncSettlePromises;\n} else {\n    Async.prototype.invokeLater = function (fn, receiver, arg) {\n        if (this._trampolineEnabled) {\n            AsyncInvokeLater.call(this, fn, receiver, arg);\n        } else {\n            this._schedule(function() {\n                setTimeout(function() {\n                    fn.call(receiver, arg);\n                }, 100);\n            });\n        }\n    };\n\n    Async.prototype.invoke = function (fn, receiver, arg) {\n        if (this._trampolineEnabled) {\n            AsyncInvoke.call(this, fn, receiver, arg);\n        } else {\n            this._schedule(function() {\n                fn.call(receiver, arg);\n            });\n        }\n    };\n\n    Async.prototype.settlePromises = function(promise) {\n        if (this._trampolineEnabled) {\n            AsyncSettlePromises.call(this, promise);\n        } else {\n            this._schedule(function() {\n                promise._settlePromises();\n            });\n        }\n    };\n}\n\nAsync.prototype.invokeFirst = function (fn, receiver, arg) {\n    this._normalQueue.unshift(fn, receiver, arg);\n    this._queueTick();\n};\n\nAsync.prototype._drainQueue = function(queue) {\n    while (queue.length() > 0) {\n        var fn = queue.shift();\n        if (typeof fn !== \"function\") {\n            fn._settlePromises();\n            continue;\n        }\n        var receiver = queue.shift();\n        var arg = queue.shift();\n        fn.call(receiver, arg);\n    }\n};\n\nAsync.prototype._drainQueues = function () {\n    this._drainQueue(this._normalQueue);\n    this._reset();\n    this._haveDrainedQueues = true;\n    this._drainQueue(this._lateQueue);\n};\n\nAsync.prototype._queueTick = function () {\n    if (!this._isTickUsed) {\n        this._isTickUsed = true;\n        this._schedule(this.drainQueues);\n    }\n};\n\nAsync.prototype._reset = function () {\n    this._isTickUsed = false;\n};\n\nmodule.exports = Async;\nmodule.exports.firstLineError = firstLineError;\n\n}).call(this,require('_process'))\n},{\"./queue\":61,\"./schedule\":64,\"./util\":71,\"_process\":81}],39:[function(require,module,exports){\n\"use strict\";\nmodule.exports = function(Promise, INTERNAL, tryConvertToPromise, debug) {\nvar calledBind = false;\nvar rejectThis = function(_, e) {\n    this._reject(e);\n};\n\nvar targetRejected = function(e, context) {\n    context.promiseRejectionQueued = true;\n    context.bindingPromise._then(rejectThis, rejectThis, null, this, e);\n};\n\nvar bindingResolved = function(thisArg, context) {\n    if (((this._bitField & 50397184) === 0)) {\n        this._resolveCallback(context.target);\n    }\n};\n\nvar bindingRejected = function(e, context) {\n    if (!context.promiseRejectionQueued) this._reject(e);\n};\n\nPromise.prototype.bind = function (thisArg) {\n    if (!calledBind) {\n        calledBind = true;\n        Promise.prototype._propagateFrom = debug.propagateFromFunction();\n        Promise.prototype._boundValue = debug.boundValueFunction();\n    }\n    var maybePromise = tryConvertToPromise(thisArg);\n    var ret = new Promise(INTERNAL);\n    ret._propagateFrom(this, 1);\n    var target = this._target();\n    ret._setBoundTo(maybePromise);\n    if (maybePromise instanceof Promise) {\n        var context = {\n            promiseRejectionQueued: false,\n            promise: ret,\n            target: target,\n            bindingPromise: maybePromise\n        };\n        target._then(INTERNAL, targetRejected, undefined, ret, context);\n        maybePromise._then(\n            bindingResolved, bindingRejected, undefined, ret, context);\n        ret._setOnCancel(maybePromise);\n    } else {\n        ret._resolveCallback(target);\n    }\n    return ret;\n};\n\nPromise.prototype._setBoundTo = function (obj) {\n    if (obj !== undefined) {\n        this._bitField = this._bitField | 2097152;\n        this._boundTo = obj;\n    } else {\n        this._bitField = this._bitField & (~2097152);\n    }\n};\n\nPromise.prototype._isBound = function () {\n    return (this._bitField & 2097152) === 2097152;\n};\n\nPromise.bind = function (thisArg, value) {\n    return Promise.resolve(value).bind(thisArg);\n};\n};\n\n},{}],40:[function(require,module,exports){\n\"use strict\";\nvar cr = Object.create;\nif (cr) {\n    var callerCache = cr(null);\n    var getterCache = cr(null);\n    callerCache[\" size\"] = getterCache[\" size\"] = 0;\n}\n\nmodule.exports = function(Promise) {\nvar util = require(\"./util\");\nvar canEvaluate = util.canEvaluate;\nvar isIdentifier = util.isIdentifier;\n\nvar getMethodCaller;\nvar getGetter;\nif (!false) {\nvar makeMethodCaller = function (methodName) {\n    return new Function(\"ensureMethod\", \"                                    \\n\\\n        return function(obj) {                                               \\n\\\n            'use strict'                                                     \\n\\\n            var len = this.length;                                           \\n\\\n            ensureMethod(obj, 'methodName');                                 \\n\\\n            switch(len) {                                                    \\n\\\n                case 1: return obj.methodName(this[0]);                      \\n\\\n                case 2: return obj.methodName(this[0], this[1]);             \\n\\\n                case 3: return obj.methodName(this[0], this[1], this[2]);    \\n\\\n                case 0: return obj.methodName();                             \\n\\\n                default:                                                     \\n\\\n                    return obj.methodName.apply(obj, this);                  \\n\\\n            }                                                                \\n\\\n        };                                                                   \\n\\\n        \".replace(/methodName/g, methodName))(ensureMethod);\n};\n\nvar makeGetter = function (propertyName) {\n    return new Function(\"obj\", \"                                             \\n\\\n        'use strict';                                                        \\n\\\n        return obj.propertyName;                                             \\n\\\n        \".replace(\"propertyName\", propertyName));\n};\n\nvar getCompiled = function(name, compiler, cache) {\n    var ret = cache[name];\n    if (typeof ret !== \"function\") {\n        if (!isIdentifier(name)) {\n            return null;\n        }\n        ret = compiler(name);\n        cache[name] = ret;\n        cache[\" size\"]++;\n        if (cache[\" size\"] > 512) {\n            var keys = Object.keys(cache);\n            for (var i = 0; i < 256; ++i) delete cache[keys[i]];\n            cache[\" size\"] = keys.length - 256;\n        }\n    }\n    return ret;\n};\n\ngetMethodCaller = function(name) {\n    return getCompiled(name, makeMethodCaller, callerCache);\n};\n\ngetGetter = function(name) {\n    return getCompiled(name, makeGetter, getterCache);\n};\n}\n\nfunction ensureMethod(obj, methodName) {\n    var fn;\n    if (obj != null) fn = obj[methodName];\n    if (typeof fn !== \"function\") {\n        var message = \"Object \" + util.classString(obj) + \" has no method '\" +\n            util.toString(methodName) + \"'\";\n        throw new Promise.TypeError(message);\n    }\n    return fn;\n}\n\nfunction caller(obj) {\n    var methodName = this.pop();\n    var fn = ensureMethod(obj, methodName);\n    return fn.apply(obj, this);\n}\nPromise.prototype.call = function (methodName) {\n    var $_len = arguments.length;var args = new Array(Math.max($_len - 1, 0)); for(var $_i = 1; $_i < $_len; ++$_i) {args[$_i - 1] = arguments[$_i];};\n    if (!false) {\n        if (canEvaluate) {\n            var maybeCaller = getMethodCaller(methodName);\n            if (maybeCaller !== null) {\n                return this._then(\n                    maybeCaller, undefined, undefined, args, undefined);\n            }\n        }\n    }\n    args.push(methodName);\n    return this._then(caller, undefined, undefined, args, undefined);\n};\n\nfunction namedGetter(obj) {\n    return obj[this];\n}\nfunction indexedGetter(obj) {\n    var index = +this;\n    if (index < 0) index = Math.max(0, index + obj.length);\n    return obj[index];\n}\nPromise.prototype.get = function (propertyName) {\n    var isIndex = (typeof propertyName === \"number\");\n    var getter;\n    if (!isIndex) {\n        if (canEvaluate) {\n            var maybeGetter = getGetter(propertyName);\n            getter = maybeGetter !== null ? maybeGetter : namedGetter;\n        } else {\n            getter = namedGetter;\n        }\n    } else {\n        getter = indexedGetter;\n    }\n    return this._then(getter, undefined, undefined, propertyName, undefined);\n};\n};\n\n},{\"./util\":71}],41:[function(require,module,exports){\n\"use strict\";\nmodule.exports = function(Promise, PromiseArray, apiRejection, debug) {\nvar util = require(\"./util\");\nvar tryCatch = util.tryCatch;\nvar errorObj = util.errorObj;\nvar async = Promise._async;\n\nPromise.prototype[\"break\"] = Promise.prototype.cancel = function() {\n    if (!debug.cancellation()) return this._warn(\"cancellation is disabled\");\n\n    var promise = this;\n    var child = promise;\n    while (promise.isCancellable()) {\n        if (!promise._cancelBy(child)) {\n            if (child._isFollowing()) {\n                child._followee().cancel();\n            } else {\n                child._cancelBranched();\n            }\n            break;\n        }\n\n        var parent = promise._cancellationParent;\n        if (parent == null || !parent.isCancellable()) {\n            if (promise._isFollowing()) {\n                promise._followee().cancel();\n            } else {\n                promise._cancelBranched();\n            }\n            break;\n        } else {\n            if (promise._isFollowing()) promise._followee().cancel();\n            child = promise;\n            promise = parent;\n        }\n    }\n};\n\nPromise.prototype._branchHasCancelled = function() {\n    this._branchesRemainingToCancel--;\n};\n\nPromise.prototype._enoughBranchesHaveCancelled = function() {\n    return this._branchesRemainingToCancel === undefined ||\n           this._branchesRemainingToCancel <= 0;\n};\n\nPromise.prototype._cancelBy = function(canceller) {\n    if (canceller === this) {\n        this._branchesRemainingToCancel = 0;\n        this._invokeOnCancel();\n        return true;\n    } else {\n        this._branchHasCancelled();\n        if (this._enoughBranchesHaveCancelled()) {\n            this._invokeOnCancel();\n            return true;\n        }\n    }\n    return false;\n};\n\nPromise.prototype._cancelBranched = function() {\n    if (this._enoughBranchesHaveCancelled()) {\n        this._cancel();\n    }\n};\n\nPromise.prototype._cancel = function() {\n    if (!this.isCancellable()) return;\n\n    this._setCancelled();\n    async.invoke(this._cancelPromises, this, undefined);\n};\n\nPromise.prototype._cancelPromises = function() {\n    if (this._length() > 0) this._settlePromises();\n};\n\nPromise.prototype._unsetOnCancel = function() {\n    this._onCancelField = undefined;\n};\n\nPromise.prototype.isCancellable = function() {\n    return this.isPending() && !this.isCancelled();\n};\n\nPromise.prototype._doInvokeOnCancel = function(onCancelCallback, internalOnly) {\n    if (util.isArray(onCancelCallback)) {\n        for (var i = 0; i < onCancelCallback.length; ++i) {\n            this._doInvokeOnCancel(onCancelCallback[i], internalOnly);\n        }\n    } else if (onCancelCallback !== undefined) {\n        if (typeof onCancelCallback === \"function\") {\n            if (!internalOnly) {\n                var e = tryCatch(onCancelCallback).call(this._boundValue());\n                if (e === errorObj) {\n                    this._attachExtraTrace(e.e);\n                    async.throwLater(e.e);\n                }\n            }\n        } else {\n            onCancelCallback._resultCancelled(this);\n        }\n    }\n};\n\nPromise.prototype._invokeOnCancel = function() {\n    var onCancelCallback = this._onCancel();\n    this._unsetOnCancel();\n    async.invoke(this._doInvokeOnCancel, this, onCancelCallback);\n};\n\nPromise.prototype._invokeInternalOnCancel = function() {\n    if (this.isCancellable()) {\n        this._doInvokeOnCancel(this._onCancel(), true);\n        this._unsetOnCancel();\n    }\n};\n\nPromise.prototype._resultCancelled = function() {\n    this.cancel();\n};\n\n};\n\n},{\"./util\":71}],42:[function(require,module,exports){\n\"use strict\";\nmodule.exports = function(NEXT_FILTER) {\nvar util = require(\"./util\");\nvar getKeys = require(\"./es5\").keys;\nvar tryCatch = util.tryCatch;\nvar errorObj = util.errorObj;\n\nfunction catchFilter(instances, cb, promise) {\n    return function(e) {\n        var boundTo = promise._boundValue();\n        predicateLoop: for (var i = 0; i < instances.length; ++i) {\n            var item = instances[i];\n\n            if (item === Error ||\n                (item != null && item.prototype instanceof Error)) {\n                if (e instanceof item) {\n                    return tryCatch(cb).call(boundTo, e);\n                }\n            } else if (typeof item === \"function\") {\n                var matchesPredicate = tryCatch(item).call(boundTo, e);\n                if (matchesPredicate === errorObj) {\n                    return matchesPredicate;\n                } else if (matchesPredicate) {\n                    return tryCatch(cb).call(boundTo, e);\n                }\n            } else if (util.isObject(e)) {\n                var keys = getKeys(item);\n                for (var j = 0; j < keys.length; ++j) {\n                    var key = keys[j];\n                    if (item[key] != e[key]) {\n                        continue predicateLoop;\n                    }\n                }\n                return tryCatch(cb).call(boundTo, e);\n            }\n        }\n        return NEXT_FILTER;\n    };\n}\n\nreturn catchFilter;\n};\n\n},{\"./es5\":48,\"./util\":71}],43:[function(require,module,exports){\n\"use strict\";\nmodule.exports = function(Promise) {\nvar longStackTraces = false;\nvar contextStack = [];\n\nPromise.prototype._promiseCreated = function() {};\nPromise.prototype._pushContext = function() {};\nPromise.prototype._popContext = function() {return null;};\nPromise._peekContext = Promise.prototype._peekContext = function() {};\n\nfunction Context() {\n    this._trace = new Context.CapturedTrace(peekContext());\n}\nContext.prototype._pushContext = function () {\n    if (this._trace !== undefined) {\n        this._trace._promiseCreated = null;\n        contextStack.push(this._trace);\n    }\n};\n\nContext.prototype._popContext = function () {\n    if (this._trace !== undefined) {\n        var trace = contextStack.pop();\n        var ret = trace._promiseCreated;\n        trace._promiseCreated = null;\n        return ret;\n    }\n    return null;\n};\n\nfunction createContext() {\n    if (longStackTraces) return new Context();\n}\n\nfunction peekContext() {\n    var lastIndex = contextStack.length - 1;\n    if (lastIndex >= 0) {\n        return contextStack[lastIndex];\n    }\n    return undefined;\n}\nContext.CapturedTrace = null;\nContext.create = createContext;\nContext.deactivateLongStackTraces = function() {};\nContext.activateLongStackTraces = function() {\n    var Promise_pushContext = Promise.prototype._pushContext;\n    var Promise_popContext = Promise.prototype._popContext;\n    var Promise_PeekContext = Promise._peekContext;\n    var Promise_peekContext = Promise.prototype._peekContext;\n    var Promise_promiseCreated = Promise.prototype._promiseCreated;\n    Context.deactivateLongStackTraces = function() {\n        Promise.prototype._pushContext = Promise_pushContext;\n        Promise.prototype._popContext = Promise_popContext;\n        Promise._peekContext = Promise_PeekContext;\n        Promise.prototype._peekContext = Promise_peekContext;\n        Promise.prototype._promiseCreated = Promise_promiseCreated;\n        longStackTraces = false;\n    };\n    longStackTraces = true;\n    Promise.prototype._pushContext = Context.prototype._pushContext;\n    Promise.prototype._popContext = Context.prototype._popContext;\n    Promise._peekContext = Promise.prototype._peekContext = peekContext;\n    Promise.prototype._promiseCreated = function() {\n        var ctx = this._peekContext();\n        if (ctx && ctx._promiseCreated == null) ctx._promiseCreated = this;\n    };\n};\nreturn Context;\n};\n\n},{}],44:[function(require,module,exports){\n(function (process){\n\"use strict\";\nmodule.exports = function(Promise, Context) {\nvar getDomain = Promise._getDomain;\nvar async = Promise._async;\nvar Warning = require(\"./errors\").Warning;\nvar util = require(\"./util\");\nvar canAttachTrace = util.canAttachTrace;\nvar unhandledRejectionHandled;\nvar possiblyUnhandledRejection;\nvar bluebirdFramePattern =\n    /[\\\\\\/]bluebird[\\\\\\/]js[\\\\\\/](release|debug|instrumented)/;\nvar stackFramePattern = null;\nvar formatStack = null;\nvar indentStackFrames = false;\nvar printWarning;\nvar debugging = !!(util.env(\"BLUEBIRD_DEBUG\") != 0 &&\n                        (false ||\n                         util.env(\"BLUEBIRD_DEBUG\") ||\n                         util.env(\"NODE_ENV\") === \"development\"));\n\nvar warnings = !!(util.env(\"BLUEBIRD_WARNINGS\") != 0 &&\n    (debugging || util.env(\"BLUEBIRD_WARNINGS\")));\n\nvar longStackTraces = !!(util.env(\"BLUEBIRD_LONG_STACK_TRACES\") != 0 &&\n    (debugging || util.env(\"BLUEBIRD_LONG_STACK_TRACES\")));\n\nvar wForgottenReturn = util.env(\"BLUEBIRD_W_FORGOTTEN_RETURN\") != 0 &&\n    (warnings || !!util.env(\"BLUEBIRD_W_FORGOTTEN_RETURN\"));\n\nPromise.prototype.suppressUnhandledRejections = function() {\n    var target = this._target();\n    target._bitField = ((target._bitField & (~1048576)) |\n                      524288);\n};\n\nPromise.prototype._ensurePossibleRejectionHandled = function () {\n    if ((this._bitField & 524288) !== 0) return;\n    this._setRejectionIsUnhandled();\n    async.invokeLater(this._notifyUnhandledRejection, this, undefined);\n};\n\nPromise.prototype._notifyUnhandledRejectionIsHandled = function () {\n    fireRejectionEvent(\"rejectionHandled\",\n                                  unhandledRejectionHandled, undefined, this);\n};\n\nPromise.prototype._setReturnedNonUndefined = function() {\n    this._bitField = this._bitField | 268435456;\n};\n\nPromise.prototype._returnedNonUndefined = function() {\n    return (this._bitField & 268435456) !== 0;\n};\n\nPromise.prototype._notifyUnhandledRejection = function () {\n    if (this._isRejectionUnhandled()) {\n        var reason = this._settledValue();\n        this._setUnhandledRejectionIsNotified();\n        fireRejectionEvent(\"unhandledRejection\",\n                                      possiblyUnhandledRejection, reason, this);\n    }\n};\n\nPromise.prototype._setUnhandledRejectionIsNotified = function () {\n    this._bitField = this._bitField | 262144;\n};\n\nPromise.prototype._unsetUnhandledRejectionIsNotified = function () {\n    this._bitField = this._bitField & (~262144);\n};\n\nPromise.prototype._isUnhandledRejectionNotified = function () {\n    return (this._bitField & 262144) > 0;\n};\n\nPromise.prototype._setRejectionIsUnhandled = function () {\n    this._bitField = this._bitField | 1048576;\n};\n\nPromise.prototype._unsetRejectionIsUnhandled = function () {\n    this._bitField = this._bitField & (~1048576);\n    if (this._isUnhandledRejectionNotified()) {\n        this._unsetUnhandledRejectionIsNotified();\n        this._notifyUnhandledRejectionIsHandled();\n    }\n};\n\nPromise.prototype._isRejectionUnhandled = function () {\n    return (this._bitField & 1048576) > 0;\n};\n\nPromise.prototype._warn = function(message, shouldUseOwnTrace, promise) {\n    return warn(message, shouldUseOwnTrace, promise || this);\n};\n\nPromise.onPossiblyUnhandledRejection = function (fn) {\n    var domain = getDomain();\n    possiblyUnhandledRejection =\n        typeof fn === \"function\" ? (domain === null ? fn : domain.bind(fn))\n                                 : undefined;\n};\n\nPromise.onUnhandledRejectionHandled = function (fn) {\n    var domain = getDomain();\n    unhandledRejectionHandled =\n        typeof fn === \"function\" ? (domain === null ? fn : domain.bind(fn))\n                                 : undefined;\n};\n\nvar disableLongStackTraces = function() {};\nPromise.longStackTraces = function () {\n    if (async.haveItemsQueued() && !config.longStackTraces) {\n        throw new Error(\"cannot enable long stack traces after promises have been created\\u000a\\u000a    See http://goo.gl/MqrFmX\\u000a\");\n    }\n    if (!config.longStackTraces && longStackTracesIsSupported()) {\n        var Promise_captureStackTrace = Promise.prototype._captureStackTrace;\n        var Promise_attachExtraTrace = Promise.prototype._attachExtraTrace;\n        config.longStackTraces = true;\n        disableLongStackTraces = function() {\n            if (async.haveItemsQueued() && !config.longStackTraces) {\n                throw new Error(\"cannot enable long stack traces after promises have been created\\u000a\\u000a    See http://goo.gl/MqrFmX\\u000a\");\n            }\n            Promise.prototype._captureStackTrace = Promise_captureStackTrace;\n            Promise.prototype._attachExtraTrace = Promise_attachExtraTrace;\n            Context.deactivateLongStackTraces();\n            async.enableTrampoline();\n            config.longStackTraces = false;\n        };\n        Promise.prototype._captureStackTrace = longStackTracesCaptureStackTrace;\n        Promise.prototype._attachExtraTrace = longStackTracesAttachExtraTrace;\n        Context.activateLongStackTraces();\n        async.disableTrampolineIfNecessary();\n    }\n};\n\nPromise.hasLongStackTraces = function () {\n    return config.longStackTraces && longStackTracesIsSupported();\n};\n\nvar fireDomEvent = (function() {\n    try {\n        var event = document.createEvent(\"CustomEvent\");\n        event.initCustomEvent(\"testingtheevent\", false, true, {});\n        util.global.dispatchEvent(event);\n        return function(name, event) {\n            var domEvent = document.createEvent(\"CustomEvent\");\n            domEvent.initCustomEvent(name.toLowerCase(), false, true, event);\n            return !util.global.dispatchEvent(domEvent);\n        };\n    } catch (e) {}\n    return function() {\n        return false;\n    };\n})();\n\nvar fireGlobalEvent = (function() {\n    if (util.isNode) {\n        return function() {\n            return process.emit.apply(process, arguments);\n        };\n    } else {\n        if (!util.global) {\n            return function() {\n                return false;\n            };\n        }\n        return function(name) {\n            var methodName = \"on\" + name.toLowerCase();\n            var method = util.global[methodName];\n            if (!method) return false;\n            method.apply(util.global, [].slice.call(arguments, 1));\n            return true;\n        };\n    }\n})();\n\nfunction generatePromiseLifecycleEventObject(name, promise) {\n    return {promise: promise};\n}\n\nvar eventToObjectGenerator = {\n    promiseCreated: generatePromiseLifecycleEventObject,\n    promiseFulfilled: generatePromiseLifecycleEventObject,\n    promiseRejected: generatePromiseLifecycleEventObject,\n    promiseResolved: generatePromiseLifecycleEventObject,\n    promiseCancelled: generatePromiseLifecycleEventObject,\n    promiseChained: function(name, promise, child) {\n        return {promise: promise, child: child};\n    },\n    warning: function(name, warning) {\n        return {warning: warning};\n    },\n    unhandledRejection: function (name, reason, promise) {\n        return {reason: reason, promise: promise};\n    },\n    rejectionHandled: generatePromiseLifecycleEventObject\n};\n\nvar activeFireEvent = function (name) {\n    var globalEventFired = false;\n    try {\n        globalEventFired = fireGlobalEvent.apply(null, arguments);\n    } catch (e) {\n        async.throwLater(e);\n        globalEventFired = true;\n    }\n\n    var domEventFired = false;\n    try {\n        domEventFired = fireDomEvent(name,\n                    eventToObjectGenerator[name].apply(null, arguments));\n    } catch (e) {\n        async.throwLater(e);\n        domEventFired = true;\n    }\n\n    return domEventFired || globalEventFired;\n};\n\nPromise.config = function(opts) {\n    opts = Object(opts);\n    if (\"longStackTraces\" in opts) {\n        if (opts.longStackTraces) {\n            Promise.longStackTraces();\n        } else if (!opts.longStackTraces && Promise.hasLongStackTraces()) {\n            disableLongStackTraces();\n        }\n    }\n    if (\"warnings\" in opts) {\n        var warningsOption = opts.warnings;\n        config.warnings = !!warningsOption;\n        wForgottenReturn = config.warnings;\n\n        if (util.isObject(warningsOption)) {\n            if (\"wForgottenReturn\" in warningsOption) {\n                wForgottenReturn = !!warningsOption.wForgottenReturn;\n            }\n        }\n    }\n    if (\"cancellation\" in opts && opts.cancellation && !config.cancellation) {\n        if (async.haveItemsQueued()) {\n            throw new Error(\n                \"cannot enable cancellation after promises are in use\");\n        }\n        Promise.prototype._clearCancellationData =\n            cancellationClearCancellationData;\n        Promise.prototype._propagateFrom = cancellationPropagateFrom;\n        Promise.prototype._onCancel = cancellationOnCancel;\n        Promise.prototype._setOnCancel = cancellationSetOnCancel;\n        Promise.prototype._attachCancellationCallback =\n            cancellationAttachCancellationCallback;\n        Promise.prototype._execute = cancellationExecute;\n        propagateFromFunction = cancellationPropagateFrom;\n        config.cancellation = true;\n    }\n    if (\"monitoring\" in opts) {\n        if (opts.monitoring && !config.monitoring) {\n            config.monitoring = true;\n            Promise.prototype._fireEvent = activeFireEvent;\n        } else if (!opts.monitoring && config.monitoring) {\n            config.monitoring = false;\n            Promise.prototype._fireEvent = defaultFireEvent;\n        }\n    }\n};\n\nfunction defaultFireEvent() { return false; }\n\nPromise.prototype._fireEvent = defaultFireEvent;\nPromise.prototype._execute = function(executor, resolve, reject) {\n    try {\n        executor(resolve, reject);\n    } catch (e) {\n        return e;\n    }\n};\nPromise.prototype._onCancel = function () {};\nPromise.prototype._setOnCancel = function (handler) { ; };\nPromise.prototype._attachCancellationCallback = function(onCancel) {\n    ;\n};\nPromise.prototype._captureStackTrace = function () {};\nPromise.prototype._attachExtraTrace = function () {};\nPromise.prototype._clearCancellationData = function() {};\nPromise.prototype._propagateFrom = function (parent, flags) {\n    ;\n    ;\n};\n\nfunction cancellationExecute(executor, resolve, reject) {\n    var promise = this;\n    try {\n        executor(resolve, reject, function(onCancel) {\n            if (typeof onCancel !== \"function\") {\n                throw new TypeError(\"onCancel must be a function, got: \" +\n                                    util.toString(onCancel));\n            }\n            promise._attachCancellationCallback(onCancel);\n        });\n    } catch (e) {\n        return e;\n    }\n}\n\nfunction cancellationAttachCancellationCallback(onCancel) {\n    if (!this.isCancellable()) return this;\n\n    var previousOnCancel = this._onCancel();\n    if (previousOnCancel !== undefined) {\n        if (util.isArray(previousOnCancel)) {\n            previousOnCancel.push(onCancel);\n        } else {\n            this._setOnCancel([previousOnCancel, onCancel]);\n        }\n    } else {\n        this._setOnCancel(onCancel);\n    }\n}\n\nfunction cancellationOnCancel() {\n    return this._onCancelField;\n}\n\nfunction cancellationSetOnCancel(onCancel) {\n    this._onCancelField = onCancel;\n}\n\nfunction cancellationClearCancellationData() {\n    this._cancellationParent = undefined;\n    this._onCancelField = undefined;\n}\n\nfunction cancellationPropagateFrom(parent, flags) {\n    if ((flags & 1) !== 0) {\n        this._cancellationParent = parent;\n        var branchesRemainingToCancel = parent._branchesRemainingToCancel;\n        if (branchesRemainingToCancel === undefined) {\n            branchesRemainingToCancel = 0;\n        }\n        parent._branchesRemainingToCancel = branchesRemainingToCancel + 1;\n    }\n    if ((flags & 2) !== 0 && parent._isBound()) {\n        this._setBoundTo(parent._boundTo);\n    }\n}\n\nfunction bindingPropagateFrom(parent, flags) {\n    if ((flags & 2) !== 0 && parent._isBound()) {\n        this._setBoundTo(parent._boundTo);\n    }\n}\nvar propagateFromFunction = bindingPropagateFrom;\n\nfunction boundValueFunction() {\n    var ret = this._boundTo;\n    if (ret !== undefined) {\n        if (ret instanceof Promise) {\n            if (ret.isFulfilled()) {\n                return ret.value();\n            } else {\n                return undefined;\n            }\n        }\n    }\n    return ret;\n}\n\nfunction longStackTracesCaptureStackTrace() {\n    this._trace = new CapturedTrace(this._peekContext());\n}\n\nfunction longStackTracesAttachExtraTrace(error, ignoreSelf) {\n    if (canAttachTrace(error)) {\n        var trace = this._trace;\n        if (trace !== undefined) {\n            if (ignoreSelf) trace = trace._parent;\n        }\n        if (trace !== undefined) {\n            trace.attachExtraTrace(error);\n        } else if (!error.__stackCleaned__) {\n            var parsed = parseStackAndMessage(error);\n            util.notEnumerableProp(error, \"stack\",\n                parsed.message + \"\\n\" + parsed.stack.join(\"\\n\"));\n            util.notEnumerableProp(error, \"__stackCleaned__\", true);\n        }\n    }\n}\n\nfunction checkForgottenReturns(returnValue, promiseCreated, name, promise,\n                               parent) {\n    if (returnValue === undefined && promiseCreated !== null &&\n        wForgottenReturn) {\n        if (parent !== undefined && parent._returnedNonUndefined()) return;\n        if ((promise._bitField & 65535) === 0) return;\n\n        if (name) name = name + \" \";\n        var msg = \"a promise was created in a \" + name +\n            \"handler but was not returned from it\";\n        promise._warn(msg, true, promiseCreated);\n    }\n}\n\nfunction deprecated(name, replacement) {\n    var message = name +\n        \" is deprecated and will be removed in a future version.\";\n    if (replacement) message += \" Use \" + replacement + \" instead.\";\n    return warn(message);\n}\n\nfunction warn(message, shouldUseOwnTrace, promise) {\n    if (!config.warnings) return;\n    var warning = new Warning(message);\n    var ctx;\n    if (shouldUseOwnTrace) {\n        promise._attachExtraTrace(warning);\n    } else if (config.longStackTraces && (ctx = Promise._peekContext())) {\n        ctx.attachExtraTrace(warning);\n    } else {\n        var parsed = parseStackAndMessage(warning);\n        warning.stack = parsed.message + \"\\n\" + parsed.stack.join(\"\\n\");\n    }\n\n    if (!activeFireEvent(\"warning\", warning)) {\n        formatAndLogError(warning, \"\", true);\n    }\n}\n\nfunction reconstructStack(message, stacks) {\n    for (var i = 0; i < stacks.length - 1; ++i) {\n        stacks[i].push(\"From previous event:\");\n        stacks[i] = stacks[i].join(\"\\n\");\n    }\n    if (i < stacks.length) {\n        stacks[i] = stacks[i].join(\"\\n\");\n    }\n    return message + \"\\n\" + stacks.join(\"\\n\");\n}\n\nfunction removeDuplicateOrEmptyJumps(stacks) {\n    for (var i = 0; i < stacks.length; ++i) {\n        if (stacks[i].length === 0 ||\n            ((i + 1 < stacks.length) && stacks[i][0] === stacks[i+1][0])) {\n            stacks.splice(i, 1);\n            i--;\n        }\n    }\n}\n\nfunction removeCommonRoots(stacks) {\n    var current = stacks[0];\n    for (var i = 1; i < stacks.length; ++i) {\n        var prev = stacks[i];\n        var currentLastIndex = current.length - 1;\n        var currentLastLine = current[currentLastIndex];\n        var commonRootMeetPoint = -1;\n\n        for (var j = prev.length - 1; j >= 0; --j) {\n            if (prev[j] === currentLastLine) {\n                commonRootMeetPoint = j;\n                break;\n            }\n        }\n\n        for (var j = commonRootMeetPoint; j >= 0; --j) {\n            var line = prev[j];\n            if (current[currentLastIndex] === line) {\n                current.pop();\n                currentLastIndex--;\n            } else {\n                break;\n            }\n        }\n        current = prev;\n    }\n}\n\nfunction cleanStack(stack) {\n    var ret = [];\n    for (var i = 0; i < stack.length; ++i) {\n        var line = stack[i];\n        var isTraceLine = \"    (No stack trace)\" === line ||\n            stackFramePattern.test(line);\n        var isInternalFrame = isTraceLine && shouldIgnore(line);\n        if (isTraceLine && !isInternalFrame) {\n            if (indentStackFrames && line.charAt(0) !== \" \") {\n                line = \"    \" + line;\n            }\n            ret.push(line);\n        }\n    }\n    return ret;\n}\n\nfunction stackFramesAsArray(error) {\n    var stack = error.stack.replace(/\\s+$/g, \"\").split(\"\\n\");\n    for (var i = 0; i < stack.length; ++i) {\n        var line = stack[i];\n        if (\"    (No stack trace)\" === line || stackFramePattern.test(line)) {\n            break;\n        }\n    }\n    if (i > 0) {\n        stack = stack.slice(i);\n    }\n    return stack;\n}\n\nfunction parseStackAndMessage(error) {\n    var stack = error.stack;\n    var message = error.toString();\n    stack = typeof stack === \"string\" && stack.length > 0\n                ? stackFramesAsArray(error) : [\"    (No stack trace)\"];\n    return {\n        message: message,\n        stack: cleanStack(stack)\n    };\n}\n\nfunction formatAndLogError(error, title, isSoft) {\n    if (typeof console !== \"undefined\") {\n        var message;\n        if (util.isObject(error)) {\n            var stack = error.stack;\n            message = title + formatStack(stack, error);\n        } else {\n            message = title + String(error);\n        }\n        if (typeof printWarning === \"function\") {\n            printWarning(message, isSoft);\n        } else if (typeof console.log === \"function\" ||\n            typeof console.log === \"object\") {\n            console.log(message);\n        }\n    }\n}\n\nfunction fireRejectionEvent(name, localHandler, reason, promise) {\n    var localEventFired = false;\n    try {\n        if (typeof localHandler === \"function\") {\n            localEventFired = true;\n            if (name === \"rejectionHandled\") {\n                localHandler(promise);\n            } else {\n                localHandler(reason, promise);\n            }\n        }\n    } catch (e) {\n        async.throwLater(e);\n    }\n\n    if (name === \"unhandledRejection\") {\n        if (!activeFireEvent(name, reason, promise) && !localEventFired) {\n            formatAndLogError(reason, \"Unhandled rejection \");\n        }\n    } else {\n        activeFireEvent(name, promise);\n    }\n}\n\nfunction formatNonError(obj) {\n    var str;\n    if (typeof obj === \"function\") {\n        str = \"[function \" +\n            (obj.name || \"anonymous\") +\n            \"]\";\n    } else {\n        str = obj && typeof obj.toString === \"function\"\n            ? obj.toString() : util.toString(obj);\n        var ruselessToString = /\\[object [a-zA-Z0-9$_]+\\]/;\n        if (ruselessToString.test(str)) {\n            try {\n                var newStr = JSON.stringify(obj);\n                str = newStr;\n            }\n            catch(e) {\n\n            }\n        }\n        if (str.length === 0) {\n            str = \"(empty array)\";\n        }\n    }\n    return (\"(<\" + snip(str) + \">, no stack trace)\");\n}\n\nfunction snip(str) {\n    var maxChars = 41;\n    if (str.length < maxChars) {\n        return str;\n    }\n    return str.substr(0, maxChars - 3) + \"...\";\n}\n\nfunction longStackTracesIsSupported() {\n    return typeof captureStackTrace === \"function\";\n}\n\nvar shouldIgnore = function() { return false; };\nvar parseLineInfoRegex = /[\\/<\\(]([^:\\/]+):(\\d+):(?:\\d+)\\)?\\s*$/;\nfunction parseLineInfo(line) {\n    var matches = line.match(parseLineInfoRegex);\n    if (matches) {\n        return {\n            fileName: matches[1],\n            line: parseInt(matches[2], 10)\n        };\n    }\n}\n\nfunction setBounds(firstLineError, lastLineError) {\n    if (!longStackTracesIsSupported()) return;\n    var firstStackLines = firstLineError.stack.split(\"\\n\");\n    var lastStackLines = lastLineError.stack.split(\"\\n\");\n    var firstIndex = -1;\n    var lastIndex = -1;\n    var firstFileName;\n    var lastFileName;\n    for (var i = 0; i < firstStackLines.length; ++i) {\n        var result = parseLineInfo(firstStackLines[i]);\n        if (result) {\n            firstFileName = result.fileName;\n            firstIndex = result.line;\n            break;\n        }\n    }\n    for (var i = 0; i < lastStackLines.length; ++i) {\n        var result = parseLineInfo(lastStackLines[i]);\n        if (result) {\n            lastFileName = result.fileName;\n            lastIndex = result.line;\n            break;\n        }\n    }\n    if (firstIndex < 0 || lastIndex < 0 || !firstFileName || !lastFileName ||\n        firstFileName !== lastFileName || firstIndex >= lastIndex) {\n        return;\n    }\n\n    shouldIgnore = function(line) {\n        if (bluebirdFramePattern.test(line)) return true;\n        var info = parseLineInfo(line);\n        if (info) {\n            if (info.fileName === firstFileName &&\n                (firstIndex <= info.line && info.line <= lastIndex)) {\n                return true;\n            }\n        }\n        return false;\n    };\n}\n\nfunction CapturedTrace(parent) {\n    this._parent = parent;\n    this._promisesCreated = 0;\n    var length = this._length = 1 + (parent === undefined ? 0 : parent._length);\n    captureStackTrace(this, CapturedTrace);\n    if (length > 32) this.uncycle();\n}\nutil.inherits(CapturedTrace, Error);\nContext.CapturedTrace = CapturedTrace;\n\nCapturedTrace.prototype.uncycle = function() {\n    var length = this._length;\n    if (length < 2) return;\n    var nodes = [];\n    var stackToIndex = {};\n\n    for (var i = 0, node = this; node !== undefined; ++i) {\n        nodes.push(node);\n        node = node._parent;\n    }\n    length = this._length = i;\n    for (var i = length - 1; i >= 0; --i) {\n        var stack = nodes[i].stack;\n        if (stackToIndex[stack] === undefined) {\n            stackToIndex[stack] = i;\n        }\n    }\n    for (var i = 0; i < length; ++i) {\n        var currentStack = nodes[i].stack;\n        var index = stackToIndex[currentStack];\n        if (index !== undefined && index !== i) {\n            if (index > 0) {\n                nodes[index - 1]._parent = undefined;\n                nodes[index - 1]._length = 1;\n            }\n            nodes[i]._parent = undefined;\n            nodes[i]._length = 1;\n            var cycleEdgeNode = i > 0 ? nodes[i - 1] : this;\n\n            if (index < length - 1) {\n                cycleEdgeNode._parent = nodes[index + 1];\n                cycleEdgeNode._parent.uncycle();\n                cycleEdgeNode._length =\n                    cycleEdgeNode._parent._length + 1;\n            } else {\n                cycleEdgeNode._parent = undefined;\n                cycleEdgeNode._length = 1;\n            }\n            var currentChildLength = cycleEdgeNode._length + 1;\n            for (var j = i - 2; j >= 0; --j) {\n                nodes[j]._length = currentChildLength;\n                currentChildLength++;\n            }\n            return;\n        }\n    }\n};\n\nCapturedTrace.prototype.attachExtraTrace = function(error) {\n    if (error.__stackCleaned__) return;\n    this.uncycle();\n    var parsed = parseStackAndMessage(error);\n    var message = parsed.message;\n    var stacks = [parsed.stack];\n\n    var trace = this;\n    while (trace !== undefined) {\n        stacks.push(cleanStack(trace.stack.split(\"\\n\")));\n        trace = trace._parent;\n    }\n    removeCommonRoots(stacks);\n    removeDuplicateOrEmptyJumps(stacks);\n    util.notEnumerableProp(error, \"stack\", reconstructStack(message, stacks));\n    util.notEnumerableProp(error, \"__stackCleaned__\", true);\n};\n\nvar captureStackTrace = (function stackDetection() {\n    var v8stackFramePattern = /^\\s*at\\s*/;\n    var v8stackFormatter = function(stack, error) {\n        if (typeof stack === \"string\") return stack;\n\n        if (error.name !== undefined &&\n            error.message !== undefined) {\n            return error.toString();\n        }\n        return formatNonError(error);\n    };\n\n    if (typeof Error.stackTraceLimit === \"number\" &&\n        typeof Error.captureStackTrace === \"function\") {\n        Error.stackTraceLimit += 6;\n        stackFramePattern = v8stackFramePattern;\n        formatStack = v8stackFormatter;\n        var captureStackTrace = Error.captureStackTrace;\n\n        shouldIgnore = function(line) {\n            return bluebirdFramePattern.test(line);\n        };\n        return function(receiver, ignoreUntil) {\n            Error.stackTraceLimit += 6;\n            captureStackTrace(receiver, ignoreUntil);\n            Error.stackTraceLimit -= 6;\n        };\n    }\n    var err = new Error();\n\n    if (typeof err.stack === \"string\" &&\n        err.stack.split(\"\\n\")[0].indexOf(\"stackDetection@\") >= 0) {\n        stackFramePattern = /@/;\n        formatStack = v8stackFormatter;\n        indentStackFrames = true;\n        return function captureStackTrace(o) {\n            o.stack = new Error().stack;\n        };\n    }\n\n    var hasStackAfterThrow;\n    try { throw new Error(); }\n    catch(e) {\n        hasStackAfterThrow = (\"stack\" in e);\n    }\n    if (!(\"stack\" in err) && hasStackAfterThrow &&\n        typeof Error.stackTraceLimit === \"number\") {\n        stackFramePattern = v8stackFramePattern;\n        formatStack = v8stackFormatter;\n        return function captureStackTrace(o) {\n            Error.stackTraceLimit += 6;\n            try { throw new Error(); }\n            catch(e) { o.stack = e.stack; }\n            Error.stackTraceLimit -= 6;\n        };\n    }\n\n    formatStack = function(stack, error) {\n        if (typeof stack === \"string\") return stack;\n\n        if ((typeof error === \"object\" ||\n            typeof error === \"function\") &&\n            error.name !== undefined &&\n            error.message !== undefined) {\n            return error.toString();\n        }\n        return formatNonError(error);\n    };\n\n    return null;\n\n})([]);\n\nif (typeof console !== \"undefined\" && typeof console.warn !== \"undefined\") {\n    printWarning = function (message) {\n        console.warn(message);\n    };\n    if (util.isNode && process.stderr.isTTY) {\n        printWarning = function(message, isSoft) {\n            var color = isSoft ? \"\\u001b[33m\" : \"\\u001b[31m\";\n            console.warn(color + message + \"\\u001b[0m\\n\");\n        };\n    } else if (!util.isNode && typeof (new Error().stack) === \"string\") {\n        printWarning = function(message, isSoft) {\n            console.warn(\"%c\" + message,\n                        isSoft ? \"color: darkorange\" : \"color: red\");\n        };\n    }\n}\n\nvar config = {\n    warnings: warnings,\n    longStackTraces: false,\n    cancellation: false,\n    monitoring: false\n};\n\nif (longStackTraces) Promise.longStackTraces();\n\nreturn {\n    longStackTraces: function() {\n        return config.longStackTraces;\n    },\n    warnings: function() {\n        return config.warnings;\n    },\n    cancellation: function() {\n        return config.cancellation;\n    },\n    monitoring: function() {\n        return config.monitoring;\n    },\n    propagateFromFunction: function() {\n        return propagateFromFunction;\n    },\n    boundValueFunction: function() {\n        return boundValueFunction;\n    },\n    checkForgottenReturns: checkForgottenReturns,\n    setBounds: setBounds,\n    warn: warn,\n    deprecated: deprecated,\n    CapturedTrace: CapturedTrace,\n    fireDomEvent: fireDomEvent,\n    fireGlobalEvent: fireGlobalEvent\n};\n};\n\n}).call(this,require('_process'))\n},{\"./errors\":47,\"./util\":71,\"_process\":81}],45:[function(require,module,exports){\n\"use strict\";\nmodule.exports = function(Promise) {\nfunction returner() {\n    return this.value;\n}\nfunction thrower() {\n    throw this.reason;\n}\n\nPromise.prototype[\"return\"] =\nPromise.prototype.thenReturn = function (value) {\n    if (value instanceof Promise) value.suppressUnhandledRejections();\n    return this._then(\n        returner, undefined, undefined, {value: value}, undefined);\n};\n\nPromise.prototype[\"throw\"] =\nPromise.prototype.thenThrow = function (reason) {\n    return this._then(\n        thrower, undefined, undefined, {reason: reason}, undefined);\n};\n\nPromise.prototype.catchThrow = function (reason) {\n    if (arguments.length <= 1) {\n        return this._then(\n            undefined, thrower, undefined, {reason: reason}, undefined);\n    } else {\n        var _reason = arguments[1];\n        var handler = function() {throw _reason;};\n        return this.caught(reason, handler);\n    }\n};\n\nPromise.prototype.catchReturn = function (value) {\n    if (arguments.length <= 1) {\n        if (value instanceof Promise) value.suppressUnhandledRejections();\n        return this._then(\n            undefined, returner, undefined, {value: value}, undefined);\n    } else {\n        var _value = arguments[1];\n        if (_value instanceof Promise) _value.suppressUnhandledRejections();\n        var handler = function() {return _value;};\n        return this.caught(value, handler);\n    }\n};\n};\n\n},{}],46:[function(require,module,exports){\n\"use strict\";\nmodule.exports = function(Promise, INTERNAL) {\nvar PromiseReduce = Promise.reduce;\nvar PromiseAll = Promise.all;\n\nfunction promiseAllThis() {\n    return PromiseAll(this);\n}\n\nfunction PromiseMapSeries(promises, fn) {\n    return PromiseReduce(promises, fn, INTERNAL, INTERNAL);\n}\n\nPromise.prototype.each = function (fn) {\n    return this.mapSeries(fn)\n            ._then(promiseAllThis, undefined, undefined, this, undefined);\n};\n\nPromise.prototype.mapSeries = function (fn) {\n    return PromiseReduce(this, fn, INTERNAL, INTERNAL);\n};\n\nPromise.each = function (promises, fn) {\n    return PromiseMapSeries(promises, fn)\n            ._then(promiseAllThis, undefined, undefined, promises, undefined);\n};\n\nPromise.mapSeries = PromiseMapSeries;\n};\n\n},{}],47:[function(require,module,exports){\n\"use strict\";\nvar es5 = require(\"./es5\");\nvar Objectfreeze = es5.freeze;\nvar util = require(\"./util\");\nvar inherits = util.inherits;\nvar notEnumerableProp = util.notEnumerableProp;\n\nfunction subError(nameProperty, defaultMessage) {\n    function SubError(message) {\n        if (!(this instanceof SubError)) return new SubError(message);\n        notEnumerableProp(this, \"message\",\n            typeof message === \"string\" ? message : defaultMessage);\n        notEnumerableProp(this, \"name\", nameProperty);\n        if (Error.captureStackTrace) {\n            Error.captureStackTrace(this, this.constructor);\n        } else {\n            Error.call(this);\n        }\n    }\n    inherits(SubError, Error);\n    return SubError;\n}\n\nvar _TypeError, _RangeError;\nvar Warning = subError(\"Warning\", \"warning\");\nvar CancellationError = subError(\"CancellationError\", \"cancellation error\");\nvar TimeoutError = subError(\"TimeoutError\", \"timeout error\");\nvar AggregateError = subError(\"AggregateError\", \"aggregate error\");\ntry {\n    _TypeError = TypeError;\n    _RangeError = RangeError;\n} catch(e) {\n    _TypeError = subError(\"TypeError\", \"type error\");\n    _RangeError = subError(\"RangeError\", \"range error\");\n}\n\nvar methods = (\"join pop push shift unshift slice filter forEach some \" +\n    \"every map indexOf lastIndexOf reduce reduceRight sort reverse\").split(\" \");\n\nfor (var i = 0; i < methods.length; ++i) {\n    if (typeof Array.prototype[methods[i]] === \"function\") {\n        AggregateError.prototype[methods[i]] = Array.prototype[methods[i]];\n    }\n}\n\nes5.defineProperty(AggregateError.prototype, \"length\", {\n    value: 0,\n    configurable: false,\n    writable: true,\n    enumerable: true\n});\nAggregateError.prototype[\"isOperational\"] = true;\nvar level = 0;\nAggregateError.prototype.toString = function() {\n    var indent = Array(level * 4 + 1).join(\" \");\n    var ret = \"\\n\" + indent + \"AggregateError of:\" + \"\\n\";\n    level++;\n    indent = Array(level * 4 + 1).join(\" \");\n    for (var i = 0; i < this.length; ++i) {\n        var str = this[i] === this ? \"[Circular AggregateError]\" : this[i] + \"\";\n        var lines = str.split(\"\\n\");\n        for (var j = 0; j < lines.length; ++j) {\n            lines[j] = indent + lines[j];\n        }\n        str = lines.join(\"\\n\");\n        ret += str + \"\\n\";\n    }\n    level--;\n    return ret;\n};\n\nfunction OperationalError(message) {\n    if (!(this instanceof OperationalError))\n        return new OperationalError(message);\n    notEnumerableProp(this, \"name\", \"OperationalError\");\n    notEnumerableProp(this, \"message\", message);\n    this.cause = message;\n    this[\"isOperational\"] = true;\n\n    if (message instanceof Error) {\n        notEnumerableProp(this, \"message\", message.message);\n        notEnumerableProp(this, \"stack\", message.stack);\n    } else if (Error.captureStackTrace) {\n        Error.captureStackTrace(this, this.constructor);\n    }\n\n}\ninherits(OperationalError, Error);\n\nvar errorTypes = Error[\"__BluebirdErrorTypes__\"];\nif (!errorTypes) {\n    errorTypes = Objectfreeze({\n        CancellationError: CancellationError,\n        TimeoutError: TimeoutError,\n        OperationalError: OperationalError,\n        RejectionError: OperationalError,\n        AggregateError: AggregateError\n    });\n    es5.defineProperty(Error, \"__BluebirdErrorTypes__\", {\n        value: errorTypes,\n        writable: false,\n        enumerable: false,\n        configurable: false\n    });\n}\n\nmodule.exports = {\n    Error: Error,\n    TypeError: _TypeError,\n    RangeError: _RangeError,\n    CancellationError: errorTypes.CancellationError,\n    OperationalError: errorTypes.OperationalError,\n    TimeoutError: errorTypes.TimeoutError,\n    AggregateError: errorTypes.AggregateError,\n    Warning: Warning\n};\n\n},{\"./es5\":48,\"./util\":71}],48:[function(require,module,exports){\nvar isES5 = (function(){\n    \"use strict\";\n    return this === undefined;\n})();\n\nif (isES5) {\n    module.exports = {\n        freeze: Object.freeze,\n        defineProperty: Object.defineProperty,\n        getDescriptor: Object.getOwnPropertyDescriptor,\n        keys: Object.keys,\n        names: Object.getOwnPropertyNames,\n        getPrototypeOf: Object.getPrototypeOf,\n        isArray: Array.isArray,\n        isES5: isES5,\n        propertyIsWritable: function(obj, prop) {\n            var descriptor = Object.getOwnPropertyDescriptor(obj, prop);\n            return !!(!descriptor || descriptor.writable || descriptor.set);\n        }\n    };\n} else {\n    var has = {}.hasOwnProperty;\n    var str = {}.toString;\n    var proto = {}.constructor.prototype;\n\n    var ObjectKeys = function (o) {\n        var ret = [];\n        for (var key in o) {\n            if (has.call(o, key)) {\n                ret.push(key);\n            }\n        }\n        return ret;\n    };\n\n    var ObjectGetDescriptor = function(o, key) {\n        return {value: o[key]};\n    };\n\n    var ObjectDefineProperty = function (o, key, desc) {\n        o[key] = desc.value;\n        return o;\n    };\n\n    var ObjectFreeze = function (obj) {\n        return obj;\n    };\n\n    var ObjectGetPrototypeOf = function (obj) {\n        try {\n            return Object(obj).constructor.prototype;\n        }\n        catch (e) {\n            return proto;\n        }\n    };\n\n    var ArrayIsArray = function (obj) {\n        try {\n            return str.call(obj) === \"[object Array]\";\n        }\n        catch(e) {\n            return false;\n        }\n    };\n\n    module.exports = {\n        isArray: ArrayIsArray,\n        keys: ObjectKeys,\n        names: ObjectKeys,\n        defineProperty: ObjectDefineProperty,\n        getDescriptor: ObjectGetDescriptor,\n        freeze: ObjectFreeze,\n        getPrototypeOf: ObjectGetPrototypeOf,\n        isES5: isES5,\n        propertyIsWritable: function() {\n            return true;\n        }\n    };\n}\n\n},{}],49:[function(require,module,exports){\n\"use strict\";\nmodule.exports = function(Promise, INTERNAL) {\nvar PromiseMap = Promise.map;\n\nPromise.prototype.filter = function (fn, options) {\n    return PromiseMap(this, fn, options, INTERNAL);\n};\n\nPromise.filter = function (promises, fn, options) {\n    return PromiseMap(promises, fn, options, INTERNAL);\n};\n};\n\n},{}],50:[function(require,module,exports){\n\"use strict\";\nmodule.exports = function(Promise, tryConvertToPromise) {\nvar util = require(\"./util\");\nvar CancellationError = Promise.CancellationError;\nvar errorObj = util.errorObj;\n\nfunction PassThroughHandlerContext(promise, type, handler) {\n    this.promise = promise;\n    this.type = type;\n    this.handler = handler;\n    this.called = false;\n    this.cancelPromise = null;\n}\n\nPassThroughHandlerContext.prototype.isFinallyHandler = function() {\n    return this.type === 0;\n};\n\nfunction FinallyHandlerCancelReaction(finallyHandler) {\n    this.finallyHandler = finallyHandler;\n}\n\nFinallyHandlerCancelReaction.prototype._resultCancelled = function() {\n    checkCancel(this.finallyHandler);\n};\n\nfunction checkCancel(ctx, reason) {\n    if (ctx.cancelPromise != null) {\n        if (arguments.length > 1) {\n            ctx.cancelPromise._reject(reason);\n        } else {\n            ctx.cancelPromise._cancel();\n        }\n        ctx.cancelPromise = null;\n        return true;\n    }\n    return false;\n}\n\nfunction succeed() {\n    return finallyHandler.call(this, this.promise._target()._settledValue());\n}\nfunction fail(reason) {\n    if (checkCancel(this, reason)) return;\n    errorObj.e = reason;\n    return errorObj;\n}\nfunction finallyHandler(reasonOrValue) {\n    var promise = this.promise;\n    var handler = this.handler;\n\n    if (!this.called) {\n        this.called = true;\n        var ret = this.isFinallyHandler()\n            ? handler.call(promise._boundValue())\n            : handler.call(promise._boundValue(), reasonOrValue);\n        if (ret !== undefined) {\n            promise._setReturnedNonUndefined();\n            var maybePromise = tryConvertToPromise(ret, promise);\n            if (maybePromise instanceof Promise) {\n                if (this.cancelPromise != null) {\n                    if (maybePromise.isCancelled()) {\n                        var reason =\n                            new CancellationError(\"late cancellation observer\");\n                        promise._attachExtraTrace(reason);\n                        errorObj.e = reason;\n                        return errorObj;\n                    } else if (maybePromise.isPending()) {\n                        maybePromise._attachCancellationCallback(\n                            new FinallyHandlerCancelReaction(this));\n                    }\n                }\n                return maybePromise._then(\n                    succeed, fail, undefined, this, undefined);\n            }\n        }\n    }\n\n    if (promise.isRejected()) {\n        checkCancel(this);\n        errorObj.e = reasonOrValue;\n        return errorObj;\n    } else {\n        checkCancel(this);\n        return reasonOrValue;\n    }\n}\n\nPromise.prototype._passThrough = function(handler, type, success, fail) {\n    if (typeof handler !== \"function\") return this.then();\n    return this._then(success,\n                      fail,\n                      undefined,\n                      new PassThroughHandlerContext(this, type, handler),\n                      undefined);\n};\n\nPromise.prototype.lastly =\nPromise.prototype[\"finally\"] = function (handler) {\n    return this._passThrough(handler,\n                             0,\n                             finallyHandler,\n                             finallyHandler);\n};\n\nPromise.prototype.tap = function (handler) {\n    return this._passThrough(handler, 1, finallyHandler);\n};\n\nreturn PassThroughHandlerContext;\n};\n\n},{\"./util\":71}],51:[function(require,module,exports){\n\"use strict\";\nmodule.exports = function(Promise,\n                          apiRejection,\n                          INTERNAL,\n                          tryConvertToPromise,\n                          Proxyable,\n                          debug) {\nvar errors = require(\"./errors\");\nvar TypeError = errors.TypeError;\nvar util = require(\"./util\");\nvar errorObj = util.errorObj;\nvar tryCatch = util.tryCatch;\nvar yieldHandlers = [];\n\nfunction promiseFromYieldHandler(value, yieldHandlers, traceParent) {\n    for (var i = 0; i < yieldHandlers.length; ++i) {\n        traceParent._pushContext();\n        var result = tryCatch(yieldHandlers[i])(value);\n        traceParent._popContext();\n        if (result === errorObj) {\n            traceParent._pushContext();\n            var ret = Promise.reject(errorObj.e);\n            traceParent._popContext();\n            return ret;\n        }\n        var maybePromise = tryConvertToPromise(result, traceParent);\n        if (maybePromise instanceof Promise) return maybePromise;\n    }\n    return null;\n}\n\nfunction PromiseSpawn(generatorFunction, receiver, yieldHandler, stack) {\n    if (debug.cancellation()) {\n        var internal = new Promise(INTERNAL);\n        var _finallyPromise = this._finallyPromise = new Promise(INTERNAL);\n        this._promise = internal.lastly(function() {\n            return _finallyPromise;\n        });\n        internal._captureStackTrace();\n        internal._setOnCancel(this);\n    } else {\n        var promise = this._promise = new Promise(INTERNAL);\n        promise._captureStackTrace();\n    }\n    this._stack = stack;\n    this._generatorFunction = generatorFunction;\n    this._receiver = receiver;\n    this._generator = undefined;\n    this._yieldHandlers = typeof yieldHandler === \"function\"\n        ? [yieldHandler].concat(yieldHandlers)\n        : yieldHandlers;\n    this._yieldedPromise = null;\n    this._cancellationPhase = false;\n}\nutil.inherits(PromiseSpawn, Proxyable);\n\nPromiseSpawn.prototype._isResolved = function() {\n    return this._promise === null;\n};\n\nPromiseSpawn.prototype._cleanup = function() {\n    this._promise = this._generator = null;\n    if (debug.cancellation() && this._finallyPromise !== null) {\n        this._finallyPromise._fulfill();\n        this._finallyPromise = null;\n    }\n};\n\nPromiseSpawn.prototype._promiseCancelled = function() {\n    if (this._isResolved()) return;\n    var implementsReturn = typeof this._generator[\"return\"] !== \"undefined\";\n\n    var result;\n    if (!implementsReturn) {\n        var reason = new Promise.CancellationError(\n            \"generator .return() sentinel\");\n        Promise.coroutine.returnSentinel = reason;\n        this._promise._attachExtraTrace(reason);\n        this._promise._pushContext();\n        result = tryCatch(this._generator[\"throw\"]).call(this._generator,\n                                                         reason);\n        this._promise._popContext();\n    } else {\n        this._promise._pushContext();\n        result = tryCatch(this._generator[\"return\"]).call(this._generator,\n                                                          undefined);\n        this._promise._popContext();\n    }\n    this._cancellationPhase = true;\n    this._yieldedPromise = null;\n    this._continue(result);\n};\n\nPromiseSpawn.prototype._promiseFulfilled = function(value) {\n    this._yieldedPromise = null;\n    this._promise._pushContext();\n    var result = tryCatch(this._generator.next).call(this._generator, value);\n    this._promise._popContext();\n    this._continue(result);\n};\n\nPromiseSpawn.prototype._promiseRejected = function(reason) {\n    this._yieldedPromise = null;\n    this._promise._attachExtraTrace(reason);\n    this._promise._pushContext();\n    var result = tryCatch(this._generator[\"throw\"])\n        .call(this._generator, reason);\n    this._promise._popContext();\n    this._continue(result);\n};\n\nPromiseSpawn.prototype._resultCancelled = function() {\n    if (this._yieldedPromise instanceof Promise) {\n        var promise = this._yieldedPromise;\n        this._yieldedPromise = null;\n        promise.cancel();\n    }\n};\n\nPromiseSpawn.prototype.promise = function () {\n    return this._promise;\n};\n\nPromiseSpawn.prototype._run = function () {\n    this._generator = this._generatorFunction.call(this._receiver);\n    this._receiver =\n        this._generatorFunction = undefined;\n    this._promiseFulfilled(undefined);\n};\n\nPromiseSpawn.prototype._continue = function (result) {\n    var promise = this._promise;\n    if (result === errorObj) {\n        this._cleanup();\n        if (this._cancellationPhase) {\n            return promise.cancel();\n        } else {\n            return promise._rejectCallback(result.e, false);\n        }\n    }\n\n    var value = result.value;\n    if (result.done === true) {\n        this._cleanup();\n        if (this._cancellationPhase) {\n            return promise.cancel();\n        } else {\n            return promise._resolveCallback(value);\n        }\n    } else {\n        var maybePromise = tryConvertToPromise(value, this._promise);\n        if (!(maybePromise instanceof Promise)) {\n            maybePromise =\n                promiseFromYieldHandler(maybePromise,\n                                        this._yieldHandlers,\n                                        this._promise);\n            if (maybePromise === null) {\n                this._promiseRejected(\n                    new TypeError(\n                        \"A value %s was yielded that could not be treated as a promise\\u000a\\u000a    See http://goo.gl/MqrFmX\\u000a\\u000a\".replace(\"%s\", value) +\n                        \"From coroutine:\\u000a\" +\n                        this._stack.split(\"\\n\").slice(1, -7).join(\"\\n\")\n                    )\n                );\n                return;\n            }\n        }\n        maybePromise = maybePromise._target();\n        var bitField = maybePromise._bitField;\n        ;\n        if (((bitField & 50397184) === 0)) {\n            this._yieldedPromise = maybePromise;\n            maybePromise._proxy(this, null);\n        } else if (((bitField & 33554432) !== 0)) {\n            this._promiseFulfilled(maybePromise._value());\n        } else if (((bitField & 16777216) !== 0)) {\n            this._promiseRejected(maybePromise._reason());\n        } else {\n            this._promiseCancelled();\n        }\n    }\n};\n\nPromise.coroutine = function (generatorFunction, options) {\n    if (typeof generatorFunction !== \"function\") {\n        throw new TypeError(\"generatorFunction must be a function\\u000a\\u000a    See http://goo.gl/MqrFmX\\u000a\");\n    }\n    var yieldHandler = Object(options).yieldHandler;\n    var PromiseSpawn$ = PromiseSpawn;\n    var stack = new Error().stack;\n    return function () {\n        var generator = generatorFunction.apply(this, arguments);\n        var spawn = new PromiseSpawn$(undefined, undefined, yieldHandler,\n                                      stack);\n        var ret = spawn.promise();\n        spawn._generator = generator;\n        spawn._promiseFulfilled(undefined);\n        return ret;\n    };\n};\n\nPromise.coroutine.addYieldHandler = function(fn) {\n    if (typeof fn !== \"function\") {\n        throw new TypeError(\"expecting a function but got \" + util.classString(fn));\n    }\n    yieldHandlers.push(fn);\n};\n\nPromise.spawn = function (generatorFunction) {\n    debug.deprecated(\"Promise.spawn()\", \"Promise.coroutine()\");\n    if (typeof generatorFunction !== \"function\") {\n        return apiRejection(\"generatorFunction must be a function\\u000a\\u000a    See http://goo.gl/MqrFmX\\u000a\");\n    }\n    var spawn = new PromiseSpawn(generatorFunction, this);\n    var ret = spawn.promise();\n    spawn._run(Promise.spawn);\n    return ret;\n};\n};\n\n},{\"./errors\":47,\"./util\":71}],52:[function(require,module,exports){\n\"use strict\";\nmodule.exports =\nfunction(Promise, PromiseArray, tryConvertToPromise, INTERNAL) {\nvar util = require(\"./util\");\nvar canEvaluate = util.canEvaluate;\nvar tryCatch = util.tryCatch;\nvar errorObj = util.errorObj;\nvar reject;\n\nif (!false) {\nif (canEvaluate) {\n    var thenCallback = function(i) {\n        return new Function(\"value\", \"holder\", \"                             \\n\\\n            'use strict';                                                    \\n\\\n            holder.pIndex = value;                                           \\n\\\n            holder.checkFulfillment(this);                                   \\n\\\n            \".replace(/Index/g, i));\n    };\n\n    var promiseSetter = function(i) {\n        return new Function(\"promise\", \"holder\", \"                           \\n\\\n            'use strict';                                                    \\n\\\n            holder.pIndex = promise;                                         \\n\\\n            \".replace(/Index/g, i));\n    };\n\n    var generateHolderClass = function(total) {\n        var props = new Array(total);\n        for (var i = 0; i < props.length; ++i) {\n            props[i] = \"this.p\" + (i+1);\n        }\n        var assignment = props.join(\" = \") + \" = null;\";\n        var cancellationCode= \"var promise;\\n\" + props.map(function(prop) {\n            return \"                                                         \\n\\\n                promise = \" + prop + \";                                      \\n\\\n                if (promise instanceof Promise) {                            \\n\\\n                    promise.cancel();                                        \\n\\\n                }                                                            \\n\\\n            \";\n        }).join(\"\\n\");\n        var passedArguments = props.join(\", \");\n        var name = \"Holder$\" + total;\n\n\n        var code = \"return function(tryCatch, errorObj, Promise) {           \\n\\\n            'use strict';                                                    \\n\\\n            function [TheName](fn) {                                         \\n\\\n                [TheProperties]                                              \\n\\\n                this.fn = fn;                                                \\n\\\n                this.now = 0;                                                \\n\\\n            }                                                                \\n\\\n            [TheName].prototype.checkFulfillment = function(promise) {       \\n\\\n                var now = ++this.now;                                        \\n\\\n                if (now === [TheTotal]) {                                    \\n\\\n                    promise._pushContext();                                  \\n\\\n                    var callback = this.fn;                                  \\n\\\n                    var ret = tryCatch(callback)([ThePassedArguments]);      \\n\\\n                    promise._popContext();                                   \\n\\\n                    if (ret === errorObj) {                                  \\n\\\n                        promise._rejectCallback(ret.e, false);               \\n\\\n                    } else {                                                 \\n\\\n                        promise._resolveCallback(ret);                       \\n\\\n                    }                                                        \\n\\\n                }                                                            \\n\\\n            };                                                               \\n\\\n                                                                             \\n\\\n            [TheName].prototype._resultCancelled = function() {              \\n\\\n                [CancellationCode]                                           \\n\\\n            };                                                               \\n\\\n                                                                             \\n\\\n            return [TheName];                                                \\n\\\n        }(tryCatch, errorObj, Promise);                                      \\n\\\n        \";\n\n        code = code.replace(/\\[TheName\\]/g, name)\n            .replace(/\\[TheTotal\\]/g, total)\n            .replace(/\\[ThePassedArguments\\]/g, passedArguments)\n            .replace(/\\[TheProperties\\]/g, assignment)\n            .replace(/\\[CancellationCode\\]/g, cancellationCode);\n\n        return new Function(\"tryCatch\", \"errorObj\", \"Promise\", code)\n                           (tryCatch, errorObj, Promise);\n    };\n\n    var holderClasses = [];\n    var thenCallbacks = [];\n    var promiseSetters = [];\n\n    for (var i = 0; i < 8; ++i) {\n        holderClasses.push(generateHolderClass(i + 1));\n        thenCallbacks.push(thenCallback(i + 1));\n        promiseSetters.push(promiseSetter(i + 1));\n    }\n\n    reject = function (reason) {\n        this._reject(reason);\n    };\n}}\n\nPromise.join = function () {\n    var last = arguments.length - 1;\n    var fn;\n    if (last > 0 && typeof arguments[last] === \"function\") {\n        fn = arguments[last];\n        if (!false) {\n            if (last <= 8 && canEvaluate) {\n                var ret = new Promise(INTERNAL);\n                ret._captureStackTrace();\n                var HolderClass = holderClasses[last - 1];\n                var holder = new HolderClass(fn);\n                var callbacks = thenCallbacks;\n\n                for (var i = 0; i < last; ++i) {\n                    var maybePromise = tryConvertToPromise(arguments[i], ret);\n                    if (maybePromise instanceof Promise) {\n                        maybePromise = maybePromise._target();\n                        var bitField = maybePromise._bitField;\n                        ;\n                        if (((bitField & 50397184) === 0)) {\n                            maybePromise._then(callbacks[i], reject,\n                                               undefined, ret, holder);\n                            promiseSetters[i](maybePromise, holder);\n                        } else if (((bitField & 33554432) !== 0)) {\n                            callbacks[i].call(ret,\n                                              maybePromise._value(), holder);\n                        } else if (((bitField & 16777216) !== 0)) {\n                            ret._reject(maybePromise._reason());\n                        } else {\n                            ret._cancel();\n                        }\n                    } else {\n                        callbacks[i].call(ret, maybePromise, holder);\n                    }\n                }\n                if (!ret._isFateSealed()) {\n                    ret._setAsyncGuaranteed();\n                    ret._setOnCancel(holder);\n                }\n                return ret;\n            }\n        }\n    }\n    var $_len = arguments.length;var args = new Array($_len); for(var $_i = 0; $_i < $_len; ++$_i) {args[$_i] = arguments[$_i];};\n    if (fn) args.pop();\n    var ret = new PromiseArray(args).promise();\n    return fn !== undefined ? ret.spread(fn) : ret;\n};\n\n};\n\n},{\"./util\":71}],53:[function(require,module,exports){\n\"use strict\";\nmodule.exports = function(Promise,\n                          PromiseArray,\n                          apiRejection,\n                          tryConvertToPromise,\n                          INTERNAL,\n                          debug) {\nvar getDomain = Promise._getDomain;\nvar util = require(\"./util\");\nvar tryCatch = util.tryCatch;\nvar errorObj = util.errorObj;\nvar EMPTY_ARRAY = [];\n\nfunction MappingPromiseArray(promises, fn, limit, _filter) {\n    this.constructor$(promises);\n    this._promise._captureStackTrace();\n    var domain = getDomain();\n    this._callback = domain === null ? fn : domain.bind(fn);\n    this._preservedValues = _filter === INTERNAL\n        ? new Array(this.length())\n        : null;\n    this._limit = limit;\n    this._inFlight = 0;\n    this._queue = limit >= 1 ? [] : EMPTY_ARRAY;\n    this._init$(undefined, -2);\n}\nutil.inherits(MappingPromiseArray, PromiseArray);\n\nMappingPromiseArray.prototype._init = function () {};\n\nMappingPromiseArray.prototype._promiseFulfilled = function (value, index) {\n    var values = this._values;\n    var length = this.length();\n    var preservedValues = this._preservedValues;\n    var limit = this._limit;\n\n    if (index < 0) {\n        index = (index * -1) - 1;\n        values[index] = value;\n        if (limit >= 1) {\n            this._inFlight--;\n            this._drainQueue();\n            if (this._isResolved()) return true;\n        }\n    } else {\n        if (limit >= 1 && this._inFlight >= limit) {\n            values[index] = value;\n            this._queue.push(index);\n            return false;\n        }\n        if (preservedValues !== null) preservedValues[index] = value;\n\n        var promise = this._promise;\n        var callback = this._callback;\n        var receiver = promise._boundValue();\n        promise._pushContext();\n        var ret = tryCatch(callback).call(receiver, value, index, length);\n        var promiseCreated = promise._popContext();\n        debug.checkForgottenReturns(\n            ret,\n            promiseCreated,\n            preservedValues !== null ? \"Promise.filter\" : \"Promise.map\",\n            promise\n        );\n        if (ret === errorObj) {\n            this._reject(ret.e);\n            return true;\n        }\n\n        var maybePromise = tryConvertToPromise(ret, this._promise);\n        if (maybePromise instanceof Promise) {\n            maybePromise = maybePromise._target();\n            var bitField = maybePromise._bitField;\n            ;\n            if (((bitField & 50397184) === 0)) {\n                if (limit >= 1) this._inFlight++;\n                values[index] = maybePromise;\n                maybePromise._proxy(this, (index + 1) * -1);\n                return false;\n            } else if (((bitField & 33554432) !== 0)) {\n                ret = maybePromise._value();\n            } else if (((bitField & 16777216) !== 0)) {\n                this._reject(maybePromise._reason());\n                return true;\n            } else {\n                this._cancel();\n                return true;\n            }\n        }\n        values[index] = ret;\n    }\n    var totalResolved = ++this._totalResolved;\n    if (totalResolved >= length) {\n        if (preservedValues !== null) {\n            this._filter(values, preservedValues);\n        } else {\n            this._resolve(values);\n        }\n        return true;\n    }\n    return false;\n};\n\nMappingPromiseArray.prototype._drainQueue = function () {\n    var queue = this._queue;\n    var limit = this._limit;\n    var values = this._values;\n    while (queue.length > 0 && this._inFlight < limit) {\n        if (this._isResolved()) return;\n        var index = queue.pop();\n        this._promiseFulfilled(values[index], index);\n    }\n};\n\nMappingPromiseArray.prototype._filter = function (booleans, values) {\n    var len = values.length;\n    var ret = new Array(len);\n    var j = 0;\n    for (var i = 0; i < len; ++i) {\n        if (booleans[i]) ret[j++] = values[i];\n    }\n    ret.length = j;\n    this._resolve(ret);\n};\n\nMappingPromiseArray.prototype.preservedValues = function () {\n    return this._preservedValues;\n};\n\nfunction map(promises, fn, options, _filter) {\n    if (typeof fn !== \"function\") {\n        return apiRejection(\"expecting a function but got \" + util.classString(fn));\n    }\n\n    var limit = 0;\n    if (options !== undefined) {\n        if (typeof options === \"object\" && options !== null) {\n            if (typeof options.concurrency !== \"number\") {\n                return Promise.reject(\n                    new TypeError(\"'concurrency' must be a number but it is \" +\n                                    util.classString(options.concurrency)));\n            }\n            limit = options.concurrency;\n        } else {\n            return Promise.reject(new TypeError(\n                            \"options argument must be an object but it is \" +\n                             util.classString(options)));\n        }\n    }\n    limit = typeof limit === \"number\" &&\n        isFinite(limit) && limit >= 1 ? limit : 0;\n    return new MappingPromiseArray(promises, fn, limit, _filter).promise();\n}\n\nPromise.prototype.map = function (fn, options) {\n    return map(this, fn, options, null);\n};\n\nPromise.map = function (promises, fn, options, _filter) {\n    return map(promises, fn, options, _filter);\n};\n\n\n};\n\n},{\"./util\":71}],54:[function(require,module,exports){\n\"use strict\";\nmodule.exports =\nfunction(Promise, INTERNAL, tryConvertToPromise, apiRejection, debug) {\nvar util = require(\"./util\");\nvar tryCatch = util.tryCatch;\n\nPromise.method = function (fn) {\n    if (typeof fn !== \"function\") {\n        throw new Promise.TypeError(\"expecting a function but got \" + util.classString(fn));\n    }\n    return function () {\n        var ret = new Promise(INTERNAL);\n        ret._captureStackTrace();\n        ret._pushContext();\n        var value = tryCatch(fn).apply(this, arguments);\n        var promiseCreated = ret._popContext();\n        debug.checkForgottenReturns(\n            value, promiseCreated, \"Promise.method\", ret);\n        ret._resolveFromSyncValue(value);\n        return ret;\n    };\n};\n\nPromise.attempt = Promise[\"try\"] = function (fn) {\n    if (typeof fn !== \"function\") {\n        return apiRejection(\"expecting a function but got \" + util.classString(fn));\n    }\n    var ret = new Promise(INTERNAL);\n    ret._captureStackTrace();\n    ret._pushContext();\n    var value;\n    if (arguments.length > 1) {\n        debug.deprecated(\"calling Promise.try with more than 1 argument\");\n        var arg = arguments[1];\n        var ctx = arguments[2];\n        value = util.isArray(arg) ? tryCatch(fn).apply(ctx, arg)\n                                  : tryCatch(fn).call(ctx, arg);\n    } else {\n        value = tryCatch(fn)();\n    }\n    var promiseCreated = ret._popContext();\n    debug.checkForgottenReturns(\n        value, promiseCreated, \"Promise.try\", ret);\n    ret._resolveFromSyncValue(value);\n    return ret;\n};\n\nPromise.prototype._resolveFromSyncValue = function (value) {\n    if (value === util.errorObj) {\n        this._rejectCallback(value.e, false);\n    } else {\n        this._resolveCallback(value, true);\n    }\n};\n};\n\n},{\"./util\":71}],55:[function(require,module,exports){\n\"use strict\";\nvar util = require(\"./util\");\nvar maybeWrapAsError = util.maybeWrapAsError;\nvar errors = require(\"./errors\");\nvar OperationalError = errors.OperationalError;\nvar es5 = require(\"./es5\");\n\nfunction isUntypedError(obj) {\n    return obj instanceof Error &&\n        es5.getPrototypeOf(obj) === Error.prototype;\n}\n\nvar rErrorKey = /^(?:name|message|stack|cause)$/;\nfunction wrapAsOperationalError(obj) {\n    var ret;\n    if (isUntypedError(obj)) {\n        ret = new OperationalError(obj);\n        ret.name = obj.name;\n        ret.message = obj.message;\n        ret.stack = obj.stack;\n        var keys = es5.keys(obj);\n        for (var i = 0; i < keys.length; ++i) {\n            var key = keys[i];\n            if (!rErrorKey.test(key)) {\n                ret[key] = obj[key];\n            }\n        }\n        return ret;\n    }\n    util.markAsOriginatingFromRejection(obj);\n    return obj;\n}\n\nfunction nodebackForPromise(promise, multiArgs) {\n    return function(err, value) {\n        if (promise === null) return;\n        if (err) {\n            var wrapped = wrapAsOperationalError(maybeWrapAsError(err));\n            promise._attachExtraTrace(wrapped);\n            promise._reject(wrapped);\n        } else if (!multiArgs) {\n            promise._fulfill(value);\n        } else {\n            var $_len = arguments.length;var args = new Array(Math.max($_len - 1, 0)); for(var $_i = 1; $_i < $_len; ++$_i) {args[$_i - 1] = arguments[$_i];};\n            promise._fulfill(args);\n        }\n        promise = null;\n    };\n}\n\nmodule.exports = nodebackForPromise;\n\n},{\"./errors\":47,\"./es5\":48,\"./util\":71}],56:[function(require,module,exports){\n\"use strict\";\nmodule.exports = function(Promise) {\nvar util = require(\"./util\");\nvar async = Promise._async;\nvar tryCatch = util.tryCatch;\nvar errorObj = util.errorObj;\n\nfunction spreadAdapter(val, nodeback) {\n    var promise = this;\n    if (!util.isArray(val)) return successAdapter.call(promise, val, nodeback);\n    var ret =\n        tryCatch(nodeback).apply(promise._boundValue(), [null].concat(val));\n    if (ret === errorObj) {\n        async.throwLater(ret.e);\n    }\n}\n\nfunction successAdapter(val, nodeback) {\n    var promise = this;\n    var receiver = promise._boundValue();\n    var ret = val === undefined\n        ? tryCatch(nodeback).call(receiver, null)\n        : tryCatch(nodeback).call(receiver, null, val);\n    if (ret === errorObj) {\n        async.throwLater(ret.e);\n    }\n}\nfunction errorAdapter(reason, nodeback) {\n    var promise = this;\n    if (!reason) {\n        var newReason = new Error(reason + \"\");\n        newReason.cause = reason;\n        reason = newReason;\n    }\n    var ret = tryCatch(nodeback).call(promise._boundValue(), reason);\n    if (ret === errorObj) {\n        async.throwLater(ret.e);\n    }\n}\n\nPromise.prototype.asCallback = Promise.prototype.nodeify = function (nodeback,\n                                                                     options) {\n    if (typeof nodeback == \"function\") {\n        var adapter = successAdapter;\n        if (options !== undefined && Object(options).spread) {\n            adapter = spreadAdapter;\n        }\n        this._then(\n            adapter,\n            errorAdapter,\n            undefined,\n            this,\n            nodeback\n        );\n    }\n    return this;\n};\n};\n\n},{\"./util\":71}],57:[function(require,module,exports){\n(function (process){\n\"use strict\";\nmodule.exports = function() {\nvar makeSelfResolutionError = function () {\n    return new TypeError(\"circular promise resolution chain\\u000a\\u000a    See http://goo.gl/MqrFmX\\u000a\");\n};\nvar reflectHandler = function() {\n    return new Promise.PromiseInspection(this._target());\n};\nvar apiRejection = function(msg) {\n    return Promise.reject(new TypeError(msg));\n};\nfunction Proxyable() {}\nvar UNDEFINED_BINDING = {};\nvar util = require(\"./util\");\n\nvar getDomain;\nif (util.isNode) {\n    getDomain = function() {\n        var ret = process.domain;\n        if (ret === undefined) ret = null;\n        return ret;\n    };\n} else {\n    getDomain = function() {\n        return null;\n    };\n}\nutil.notEnumerableProp(Promise, \"_getDomain\", getDomain);\n\nvar es5 = require(\"./es5\");\nvar Async = require(\"./async\");\nvar async = new Async();\nes5.defineProperty(Promise, \"_async\", {value: async});\nvar errors = require(\"./errors\");\nvar TypeError = Promise.TypeError = errors.TypeError;\nPromise.RangeError = errors.RangeError;\nvar CancellationError = Promise.CancellationError = errors.CancellationError;\nPromise.TimeoutError = errors.TimeoutError;\nPromise.OperationalError = errors.OperationalError;\nPromise.RejectionError = errors.OperationalError;\nPromise.AggregateError = errors.AggregateError;\nvar INTERNAL = function(){};\nvar APPLY = {};\nvar NEXT_FILTER = {};\nvar tryConvertToPromise = require(\"./thenables\")(Promise, INTERNAL);\nvar PromiseArray =\n    require(\"./promise_array\")(Promise, INTERNAL,\n                               tryConvertToPromise, apiRejection, Proxyable);\nvar Context = require(\"./context\")(Promise);\n /*jshint unused:false*/\nvar createContext = Context.create;\nvar debug = require(\"./debuggability\")(Promise, Context);\nvar CapturedTrace = debug.CapturedTrace;\nvar PassThroughHandlerContext =\n    require(\"./finally\")(Promise, tryConvertToPromise);\nvar catchFilter = require(\"./catch_filter\")(NEXT_FILTER);\nvar nodebackForPromise = require(\"./nodeback\");\nvar errorObj = util.errorObj;\nvar tryCatch = util.tryCatch;\nfunction check(self, executor) {\n    if (typeof executor !== \"function\") {\n        throw new TypeError(\"expecting a function but got \" + util.classString(executor));\n    }\n    if (self.constructor !== Promise) {\n        throw new TypeError(\"the promise constructor cannot be invoked directly\\u000a\\u000a    See http://goo.gl/MqrFmX\\u000a\");\n    }\n}\n\nfunction Promise(executor) {\n    this._bitField = 0;\n    this._fulfillmentHandler0 = undefined;\n    this._rejectionHandler0 = undefined;\n    this._promise0 = undefined;\n    this._receiver0 = undefined;\n    if (executor !== INTERNAL) {\n        check(this, executor);\n        this._resolveFromExecutor(executor);\n    }\n    this._promiseCreated();\n    this._fireEvent(\"promiseCreated\", this);\n}\n\nPromise.prototype.toString = function () {\n    return \"[object Promise]\";\n};\n\nPromise.prototype.caught = Promise.prototype[\"catch\"] = function (fn) {\n    var len = arguments.length;\n    if (len > 1) {\n        var catchInstances = new Array(len - 1),\n            j = 0, i;\n        for (i = 0; i < len - 1; ++i) {\n            var item = arguments[i];\n            if (util.isObject(item)) {\n                catchInstances[j++] = item;\n            } else {\n                return apiRejection(\"expecting an object but got \" + util.classString(item));\n            }\n        }\n        catchInstances.length = j;\n        fn = arguments[i];\n        return this.then(undefined, catchFilter(catchInstances, fn, this));\n    }\n    return this.then(undefined, fn);\n};\n\nPromise.prototype.reflect = function () {\n    return this._then(reflectHandler,\n        reflectHandler, undefined, this, undefined);\n};\n\nPromise.prototype.then = function (didFulfill, didReject) {\n    if (debug.warnings() && arguments.length > 0 &&\n        typeof didFulfill !== \"function\" &&\n        typeof didReject !== \"function\") {\n        var msg = \".then() only accepts functions but was passed: \" +\n                util.classString(didFulfill);\n        if (arguments.length > 1) {\n            msg += \", \" + util.classString(didReject);\n        }\n        this._warn(msg);\n    }\n    return this._then(didFulfill, didReject, undefined, undefined, undefined);\n};\n\nPromise.prototype.done = function (didFulfill, didReject) {\n    var promise =\n        this._then(didFulfill, didReject, undefined, undefined, undefined);\n    promise._setIsFinal();\n};\n\nPromise.prototype.spread = function (fn) {\n    if (typeof fn !== \"function\") {\n        return apiRejection(\"expecting a function but got \" + util.classString(fn));\n    }\n    return this.all()._then(fn, undefined, undefined, APPLY, undefined);\n};\n\nPromise.prototype.toJSON = function () {\n    var ret = {\n        isFulfilled: false,\n        isRejected: false,\n        fulfillmentValue: undefined,\n        rejectionReason: undefined\n    };\n    if (this.isFulfilled()) {\n        ret.fulfillmentValue = this.value();\n        ret.isFulfilled = true;\n    } else if (this.isRejected()) {\n        ret.rejectionReason = this.reason();\n        ret.isRejected = true;\n    }\n    return ret;\n};\n\nPromise.prototype.all = function () {\n    if (arguments.length > 0) {\n        this._warn(\".all() was passed arguments but it does not take any\");\n    }\n    return new PromiseArray(this).promise();\n};\n\nPromise.prototype.error = function (fn) {\n    return this.caught(util.originatesFromRejection, fn);\n};\n\nPromise.getNewLibraryCopy = module.exports;\n\nPromise.is = function (val) {\n    return val instanceof Promise;\n};\n\nPromise.fromNode = Promise.fromCallback = function(fn) {\n    var ret = new Promise(INTERNAL);\n    ret._captureStackTrace();\n    var multiArgs = arguments.length > 1 ? !!Object(arguments[1]).multiArgs\n                                         : false;\n    var result = tryCatch(fn)(nodebackForPromise(ret, multiArgs));\n    if (result === errorObj) {\n        ret._rejectCallback(result.e, true);\n    }\n    if (!ret._isFateSealed()) ret._setAsyncGuaranteed();\n    return ret;\n};\n\nPromise.all = function (promises) {\n    return new PromiseArray(promises).promise();\n};\n\nPromise.cast = function (obj) {\n    var ret = tryConvertToPromise(obj);\n    if (!(ret instanceof Promise)) {\n        ret = new Promise(INTERNAL);\n        ret._captureStackTrace();\n        ret._setFulfilled();\n        ret._rejectionHandler0 = obj;\n    }\n    return ret;\n};\n\nPromise.resolve = Promise.fulfilled = Promise.cast;\n\nPromise.reject = Promise.rejected = function (reason) {\n    var ret = new Promise(INTERNAL);\n    ret._captureStackTrace();\n    ret._rejectCallback(reason, true);\n    return ret;\n};\n\nPromise.setScheduler = function(fn) {\n    if (typeof fn !== \"function\") {\n        throw new TypeError(\"expecting a function but got \" + util.classString(fn));\n    }\n    return async.setScheduler(fn);\n};\n\nPromise.prototype._then = function (\n    didFulfill,\n    didReject,\n    _,    receiver,\n    internalData\n) {\n    var haveInternalData = internalData !== undefined;\n    var promise = haveInternalData ? internalData : new Promise(INTERNAL);\n    var target = this._target();\n    var bitField = target._bitField;\n\n    if (!haveInternalData) {\n        promise._propagateFrom(this, 3);\n        promise._captureStackTrace();\n        if (receiver === undefined &&\n            ((this._bitField & 2097152) !== 0)) {\n            if (!((bitField & 50397184) === 0)) {\n                receiver = this._boundValue();\n            } else {\n                receiver = target === this ? undefined : this._boundTo;\n            }\n        }\n        this._fireEvent(\"promiseChained\", this, promise);\n    }\n\n    var domain = getDomain();\n    if (!((bitField & 50397184) === 0)) {\n        var handler, value, settler = target._settlePromiseCtx;\n        if (((bitField & 33554432) !== 0)) {\n            value = target._rejectionHandler0;\n            handler = didFulfill;\n        } else if (((bitField & 16777216) !== 0)) {\n            value = target._fulfillmentHandler0;\n            handler = didReject;\n            target._unsetRejectionIsUnhandled();\n        } else {\n            settler = target._settlePromiseLateCancellationObserver;\n            value = new CancellationError(\"late cancellation observer\");\n            target._attachExtraTrace(value);\n            handler = didReject;\n        }\n\n        async.invoke(settler, target, {\n            handler: domain === null ? handler\n                : (typeof handler === \"function\" && domain.bind(handler)),\n            promise: promise,\n            receiver: receiver,\n            value: value\n        });\n    } else {\n        target._addCallbacks(didFulfill, didReject, promise, receiver, domain);\n    }\n\n    return promise;\n};\n\nPromise.prototype._length = function () {\n    return this._bitField & 65535;\n};\n\nPromise.prototype._isFateSealed = function () {\n    return (this._bitField & 117506048) !== 0;\n};\n\nPromise.prototype._isFollowing = function () {\n    return (this._bitField & 67108864) === 67108864;\n};\n\nPromise.prototype._setLength = function (len) {\n    this._bitField = (this._bitField & -65536) |\n        (len & 65535);\n};\n\nPromise.prototype._setFulfilled = function () {\n    this._bitField = this._bitField | 33554432;\n    this._fireEvent(\"promiseFulfilled\", this);\n};\n\nPromise.prototype._setRejected = function () {\n    this._bitField = this._bitField | 16777216;\n    this._fireEvent(\"promiseRejected\", this);\n};\n\nPromise.prototype._setFollowing = function () {\n    this._bitField = this._bitField | 67108864;\n    this._fireEvent(\"promiseResolved\", this);\n};\n\nPromise.prototype._setIsFinal = function () {\n    this._bitField = this._bitField | 4194304;\n};\n\nPromise.prototype._isFinal = function () {\n    return (this._bitField & 4194304) > 0;\n};\n\nPromise.prototype._unsetCancelled = function() {\n    this._bitField = this._bitField & (~65536);\n};\n\nPromise.prototype._setCancelled = function() {\n    this._bitField = this._bitField | 65536;\n    this._fireEvent(\"promiseCancelled\", this);\n};\n\nPromise.prototype._setAsyncGuaranteed = function() {\n    if (async.hasCustomScheduler()) return;\n    this._bitField = this._bitField | 134217728;\n};\n\nPromise.prototype._receiverAt = function (index) {\n    var ret = index === 0 ? this._receiver0 : this[\n            index * 4 - 4 + 3];\n    if (ret === UNDEFINED_BINDING) {\n        return undefined;\n    } else if (ret === undefined && this._isBound()) {\n        return this._boundValue();\n    }\n    return ret;\n};\n\nPromise.prototype._promiseAt = function (index) {\n    return this[\n            index * 4 - 4 + 2];\n};\n\nPromise.prototype._fulfillmentHandlerAt = function (index) {\n    return this[\n            index * 4 - 4 + 0];\n};\n\nPromise.prototype._rejectionHandlerAt = function (index) {\n    return this[\n            index * 4 - 4 + 1];\n};\n\nPromise.prototype._boundValue = function() {};\n\nPromise.prototype._migrateCallback0 = function (follower) {\n    var bitField = follower._bitField;\n    var fulfill = follower._fulfillmentHandler0;\n    var reject = follower._rejectionHandler0;\n    var promise = follower._promise0;\n    var receiver = follower._receiverAt(0);\n    if (receiver === undefined) receiver = UNDEFINED_BINDING;\n    this._addCallbacks(fulfill, reject, promise, receiver, null);\n};\n\nPromise.prototype._migrateCallbackAt = function (follower, index) {\n    var fulfill = follower._fulfillmentHandlerAt(index);\n    var reject = follower._rejectionHandlerAt(index);\n    var promise = follower._promiseAt(index);\n    var receiver = follower._receiverAt(index);\n    if (receiver === undefined) receiver = UNDEFINED_BINDING;\n    this._addCallbacks(fulfill, reject, promise, receiver, null);\n};\n\nPromise.prototype._addCallbacks = function (\n    fulfill,\n    reject,\n    promise,\n    receiver,\n    domain\n) {\n    var index = this._length();\n\n    if (index >= 65535 - 4) {\n        index = 0;\n        this._setLength(0);\n    }\n\n    if (index === 0) {\n        this._promise0 = promise;\n        this._receiver0 = receiver;\n        if (typeof fulfill === \"function\") {\n            this._fulfillmentHandler0 =\n                domain === null ? fulfill : domain.bind(fulfill);\n        }\n        if (typeof reject === \"function\") {\n            this._rejectionHandler0 =\n                domain === null ? reject : domain.bind(reject);\n        }\n    } else {\n        var base = index * 4 - 4;\n        this[base + 2] = promise;\n        this[base + 3] = receiver;\n        if (typeof fulfill === \"function\") {\n            this[base + 0] =\n                domain === null ? fulfill : domain.bind(fulfill);\n        }\n        if (typeof reject === \"function\") {\n            this[base + 1] =\n                domain === null ? reject : domain.bind(reject);\n        }\n    }\n    this._setLength(index + 1);\n    return index;\n};\n\nPromise.prototype._proxy = function (proxyable, arg) {\n    this._addCallbacks(undefined, undefined, arg, proxyable, null);\n};\n\nPromise.prototype._resolveCallback = function(value, shouldBind) {\n    if (((this._bitField & 117506048) !== 0)) return;\n    if (value === this)\n        return this._rejectCallback(makeSelfResolutionError(), false);\n    var maybePromise = tryConvertToPromise(value, this);\n    if (!(maybePromise instanceof Promise)) return this._fulfill(value);\n\n    if (shouldBind) this._propagateFrom(maybePromise, 2);\n\n    var promise = maybePromise._target();\n\n    if (promise === this) {\n        this._reject(makeSelfResolutionError());\n        return;\n    }\n\n    var bitField = promise._bitField;\n    if (((bitField & 50397184) === 0)) {\n        var len = this._length();\n        if (len > 0) promise._migrateCallback0(this);\n        for (var i = 1; i < len; ++i) {\n            promise._migrateCallbackAt(this, i);\n        }\n        this._setFollowing();\n        this._setLength(0);\n        this._setFollowee(promise);\n    } else if (((bitField & 33554432) !== 0)) {\n        this._fulfill(promise._value());\n    } else if (((bitField & 16777216) !== 0)) {\n        this._reject(promise._reason());\n    } else {\n        var reason = new CancellationError(\"late cancellation observer\");\n        promise._attachExtraTrace(reason);\n        this._reject(reason);\n    }\n};\n\nPromise.prototype._rejectCallback =\nfunction(reason, synchronous, ignoreNonErrorWarnings) {\n    var trace = util.ensureErrorObject(reason);\n    var hasStack = trace === reason;\n    if (!hasStack && !ignoreNonErrorWarnings && debug.warnings()) {\n        var message = \"a promise was rejected with a non-error: \" +\n            util.classString(reason);\n        this._warn(message, true);\n    }\n    this._attachExtraTrace(trace, synchronous ? hasStack : false);\n    this._reject(reason);\n};\n\nPromise.prototype._resolveFromExecutor = function (executor) {\n    var promise = this;\n    this._captureStackTrace();\n    this._pushContext();\n    var synchronous = true;\n    var r = this._execute(executor, function(value) {\n        promise._resolveCallback(value);\n    }, function (reason) {\n        promise._rejectCallback(reason, synchronous);\n    });\n    synchronous = false;\n    this._popContext();\n\n    if (r !== undefined) {\n        promise._rejectCallback(r, true);\n    }\n};\n\nPromise.prototype._settlePromiseFromHandler = function (\n    handler, receiver, value, promise\n) {\n    var bitField = promise._bitField;\n    if (((bitField & 65536) !== 0)) return;\n    promise._pushContext();\n    var x;\n    if (receiver === APPLY) {\n        if (!value || typeof value.length !== \"number\") {\n            x = errorObj;\n            x.e = new TypeError(\"cannot .spread() a non-array: \" +\n                                    util.classString(value));\n        } else {\n            x = tryCatch(handler).apply(this._boundValue(), value);\n        }\n    } else {\n        x = tryCatch(handler).call(receiver, value);\n    }\n    var promiseCreated = promise._popContext();\n    bitField = promise._bitField;\n    if (((bitField & 65536) !== 0)) return;\n\n    if (x === NEXT_FILTER) {\n        promise._reject(value);\n    } else if (x === errorObj) {\n        promise._rejectCallback(x.e, false);\n    } else {\n        debug.checkForgottenReturns(x, promiseCreated, \"\",  promise, this);\n        promise._resolveCallback(x);\n    }\n};\n\nPromise.prototype._target = function() {\n    var ret = this;\n    while (ret._isFollowing()) ret = ret._followee();\n    return ret;\n};\n\nPromise.prototype._followee = function() {\n    return this._rejectionHandler0;\n};\n\nPromise.prototype._setFollowee = function(promise) {\n    this._rejectionHandler0 = promise;\n};\n\nPromise.prototype._settlePromise = function(promise, handler, receiver, value) {\n    var isPromise = promise instanceof Promise;\n    var bitField = this._bitField;\n    var asyncGuaranteed = ((bitField & 134217728) !== 0);\n    if (((bitField & 65536) !== 0)) {\n        if (isPromise) promise._invokeInternalOnCancel();\n\n        if (receiver instanceof PassThroughHandlerContext &&\n            receiver.isFinallyHandler()) {\n            receiver.cancelPromise = promise;\n            if (tryCatch(handler).call(receiver, value) === errorObj) {\n                promise._reject(errorObj.e);\n            }\n        } else if (handler === reflectHandler) {\n            promise._fulfill(reflectHandler.call(receiver));\n        } else if (receiver instanceof Proxyable) {\n            receiver._promiseCancelled(promise);\n        } else if (isPromise || promise instanceof PromiseArray) {\n            promise._cancel();\n        } else {\n            receiver.cancel();\n        }\n    } else if (typeof handler === \"function\") {\n        if (!isPromise) {\n            handler.call(receiver, value, promise);\n        } else {\n            if (asyncGuaranteed) promise._setAsyncGuaranteed();\n            this._settlePromiseFromHandler(handler, receiver, value, promise);\n        }\n    } else if (receiver instanceof Proxyable) {\n        if (!receiver._isResolved()) {\n            if (((bitField & 33554432) !== 0)) {\n                receiver._promiseFulfilled(value, promise);\n            } else {\n                receiver._promiseRejected(value, promise);\n            }\n        }\n    } else if (isPromise) {\n        if (asyncGuaranteed) promise._setAsyncGuaranteed();\n        if (((bitField & 33554432) !== 0)) {\n            promise._fulfill(value);\n        } else {\n            promise._reject(value);\n        }\n    }\n};\n\nPromise.prototype._settlePromiseLateCancellationObserver = function(ctx) {\n    var handler = ctx.handler;\n    var promise = ctx.promise;\n    var receiver = ctx.receiver;\n    var value = ctx.value;\n    if (typeof handler === \"function\") {\n        if (!(promise instanceof Promise)) {\n            handler.call(receiver, value, promise);\n        } else {\n            this._settlePromiseFromHandler(handler, receiver, value, promise);\n        }\n    } else if (promise instanceof Promise) {\n        promise._reject(value);\n    }\n};\n\nPromise.prototype._settlePromiseCtx = function(ctx) {\n    this._settlePromise(ctx.promise, ctx.handler, ctx.receiver, ctx.value);\n};\n\nPromise.prototype._settlePromise0 = function(handler, value, bitField) {\n    var promise = this._promise0;\n    var receiver = this._receiverAt(0);\n    this._promise0 = undefined;\n    this._receiver0 = undefined;\n    this._settlePromise(promise, handler, receiver, value);\n};\n\nPromise.prototype._clearCallbackDataAtIndex = function(index) {\n    var base = index * 4 - 4;\n    this[base + 2] =\n    this[base + 3] =\n    this[base + 0] =\n    this[base + 1] = undefined;\n};\n\nPromise.prototype._fulfill = function (value) {\n    var bitField = this._bitField;\n    if (((bitField & 117506048) >>> 16)) return;\n    if (value === this) {\n        var err = makeSelfResolutionError();\n        this._attachExtraTrace(err);\n        return this._reject(err);\n    }\n    this._setFulfilled();\n    this._rejectionHandler0 = value;\n\n    if ((bitField & 65535) > 0) {\n        if (((bitField & 134217728) !== 0)) {\n            this._settlePromises();\n        } else {\n            async.settlePromises(this);\n        }\n    }\n};\n\nPromise.prototype._reject = function (reason) {\n    var bitField = this._bitField;\n    if (((bitField & 117506048) >>> 16)) return;\n    this._setRejected();\n    this._fulfillmentHandler0 = reason;\n\n    if (this._isFinal()) {\n        return async.fatalError(reason, util.isNode);\n    }\n\n    if ((bitField & 65535) > 0) {\n        async.settlePromises(this);\n    } else {\n        this._ensurePossibleRejectionHandled();\n    }\n};\n\nPromise.prototype._fulfillPromises = function (len, value) {\n    for (var i = 1; i < len; i++) {\n        var handler = this._fulfillmentHandlerAt(i);\n        var promise = this._promiseAt(i);\n        var receiver = this._receiverAt(i);\n        this._clearCallbackDataAtIndex(i);\n        this._settlePromise(promise, handler, receiver, value);\n    }\n};\n\nPromise.prototype._rejectPromises = function (len, reason) {\n    for (var i = 1; i < len; i++) {\n        var handler = this._rejectionHandlerAt(i);\n        var promise = this._promiseAt(i);\n        var receiver = this._receiverAt(i);\n        this._clearCallbackDataAtIndex(i);\n        this._settlePromise(promise, handler, receiver, reason);\n    }\n};\n\nPromise.prototype._settlePromises = function () {\n    var bitField = this._bitField;\n    var len = (bitField & 65535);\n\n    if (len > 0) {\n        if (((bitField & 16842752) !== 0)) {\n            var reason = this._fulfillmentHandler0;\n            this._settlePromise0(this._rejectionHandler0, reason, bitField);\n            this._rejectPromises(len, reason);\n        } else {\n            var value = this._rejectionHandler0;\n            this._settlePromise0(this._fulfillmentHandler0, value, bitField);\n            this._fulfillPromises(len, value);\n        }\n        this._setLength(0);\n    }\n    this._clearCancellationData();\n};\n\nPromise.prototype._settledValue = function() {\n    var bitField = this._bitField;\n    if (((bitField & 33554432) !== 0)) {\n        return this._rejectionHandler0;\n    } else if (((bitField & 16777216) !== 0)) {\n        return this._fulfillmentHandler0;\n    }\n};\n\nfunction deferResolve(v) {this.promise._resolveCallback(v);}\nfunction deferReject(v) {this.promise._rejectCallback(v, false);}\n\nPromise.defer = Promise.pending = function() {\n    debug.deprecated(\"Promise.defer\", \"new Promise\");\n    var promise = new Promise(INTERNAL);\n    return {\n        promise: promise,\n        resolve: deferResolve,\n        reject: deferReject\n    };\n};\n\nutil.notEnumerableProp(Promise,\n                       \"_makeSelfResolutionError\",\n                       makeSelfResolutionError);\n\nrequire(\"./method\")(Promise, INTERNAL, tryConvertToPromise, apiRejection,\n    debug);\nrequire(\"./bind\")(Promise, INTERNAL, tryConvertToPromise, debug);\nrequire(\"./cancel\")(Promise, PromiseArray, apiRejection, debug);\nrequire(\"./direct_resolve\")(Promise);\nrequire(\"./synchronous_inspection\")(Promise);\nrequire(\"./join\")(\n    Promise, PromiseArray, tryConvertToPromise, INTERNAL, debug);\nPromise.Promise = Promise;\nPromise.version = \"3.4.0\";\nrequire('./map.js')(Promise, PromiseArray, apiRejection, tryConvertToPromise, INTERNAL, debug);\nrequire('./call_get.js')(Promise);\nrequire('./using.js')(Promise, apiRejection, tryConvertToPromise, createContext, INTERNAL, debug);\nrequire('./timers.js')(Promise, INTERNAL, debug);\nrequire('./generators.js')(Promise, apiRejection, INTERNAL, tryConvertToPromise, Proxyable, debug);\nrequire('./nodeify.js')(Promise);\nrequire('./promisify.js')(Promise, INTERNAL);\nrequire('./props.js')(Promise, PromiseArray, tryConvertToPromise, apiRejection);\nrequire('./race.js')(Promise, INTERNAL, tryConvertToPromise, apiRejection);\nrequire('./reduce.js')(Promise, PromiseArray, apiRejection, tryConvertToPromise, INTERNAL, debug);\nrequire('./settle.js')(Promise, PromiseArray, debug);\nrequire('./some.js')(Promise, PromiseArray, apiRejection);\nrequire('./filter.js')(Promise, INTERNAL);\nrequire('./each.js')(Promise, INTERNAL);\nrequire('./any.js')(Promise);\n                                                         \n    util.toFastProperties(Promise);                                          \n    util.toFastProperties(Promise.prototype);                                \n    function fillTypes(value) {                                              \n        var p = new Promise(INTERNAL);                                       \n        p._fulfillmentHandler0 = value;                                      \n        p._rejectionHandler0 = value;                                        \n        p._promise0 = value;                                                 \n        p._receiver0 = value;                                                \n    }                                                                        \n    // Complete slack tracking, opt out of field-type tracking and           \n    // stabilize map                                                         \n    fillTypes({a: 1});                                                       \n    fillTypes({b: 2});                                                       \n    fillTypes({c: 3});                                                       \n    fillTypes(1);                                                            \n    fillTypes(function(){});                                                 \n    fillTypes(undefined);                                                    \n    fillTypes(false);                                                        \n    fillTypes(new Promise(INTERNAL));                                        \n    debug.setBounds(Async.firstLineError, util.lastLineError);               \n    return Promise;                                                          \n\n};\n\n}).call(this,require('_process'))\n},{\"./any.js\":37,\"./async\":38,\"./bind\":39,\"./call_get.js\":40,\"./cancel\":41,\"./catch_filter\":42,\"./context\":43,\"./debuggability\":44,\"./direct_resolve\":45,\"./each.js\":46,\"./errors\":47,\"./es5\":48,\"./filter.js\":49,\"./finally\":50,\"./generators.js\":51,\"./join\":52,\"./map.js\":53,\"./method\":54,\"./nodeback\":55,\"./nodeify.js\":56,\"./promise_array\":58,\"./promisify.js\":59,\"./props.js\":60,\"./race.js\":62,\"./reduce.js\":63,\"./settle.js\":65,\"./some.js\":66,\"./synchronous_inspection\":67,\"./thenables\":68,\"./timers.js\":69,\"./using.js\":70,\"./util\":71,\"_process\":81}],58:[function(require,module,exports){\n\"use strict\";\nmodule.exports = function(Promise, INTERNAL, tryConvertToPromise,\n    apiRejection, Proxyable) {\nvar util = require(\"./util\");\nvar isArray = util.isArray;\n\nfunction toResolutionValue(val) {\n    switch(val) {\n    case -2: return [];\n    case -3: return {};\n    }\n}\n\nfunction PromiseArray(values) {\n    var promise = this._promise = new Promise(INTERNAL);\n    if (values instanceof Promise) {\n        promise._propagateFrom(values, 3);\n    }\n    promise._setOnCancel(this);\n    this._values = values;\n    this._length = 0;\n    this._totalResolved = 0;\n    this._init(undefined, -2);\n}\nutil.inherits(PromiseArray, Proxyable);\n\nPromiseArray.prototype.length = function () {\n    return this._length;\n};\n\nPromiseArray.prototype.promise = function () {\n    return this._promise;\n};\n\nPromiseArray.prototype._init = function init(_, resolveValueIfEmpty) {\n    var values = tryConvertToPromise(this._values, this._promise);\n    if (values instanceof Promise) {\n        values = values._target();\n        var bitField = values._bitField;\n        ;\n        this._values = values;\n\n        if (((bitField & 50397184) === 0)) {\n            this._promise._setAsyncGuaranteed();\n            return values._then(\n                init,\n                this._reject,\n                undefined,\n                this,\n                resolveValueIfEmpty\n           );\n        } else if (((bitField & 33554432) !== 0)) {\n            values = values._value();\n        } else if (((bitField & 16777216) !== 0)) {\n            return this._reject(values._reason());\n        } else {\n            return this._cancel();\n        }\n    }\n    values = util.asArray(values);\n    if (values === null) {\n        var err = apiRejection(\n            \"expecting an array or an iterable object but got \" + util.classString(values)).reason();\n        this._promise._rejectCallback(err, false);\n        return;\n    }\n\n    if (values.length === 0) {\n        if (resolveValueIfEmpty === -5) {\n            this._resolveEmptyArray();\n        }\n        else {\n            this._resolve(toResolutionValue(resolveValueIfEmpty));\n        }\n        return;\n    }\n    this._iterate(values);\n};\n\nPromiseArray.prototype._iterate = function(values) {\n    var len = this.getActualLength(values.length);\n    this._length = len;\n    this._values = this.shouldCopyValues() ? new Array(len) : this._values;\n    var result = this._promise;\n    var isResolved = false;\n    var bitField = null;\n    for (var i = 0; i < len; ++i) {\n        var maybePromise = tryConvertToPromise(values[i], result);\n\n        if (maybePromise instanceof Promise) {\n            maybePromise = maybePromise._target();\n            bitField = maybePromise._bitField;\n        } else {\n            bitField = null;\n        }\n\n        if (isResolved) {\n            if (bitField !== null) {\n                maybePromise.suppressUnhandledRejections();\n            }\n        } else if (bitField !== null) {\n            if (((bitField & 50397184) === 0)) {\n                maybePromise._proxy(this, i);\n                this._values[i] = maybePromise;\n            } else if (((bitField & 33554432) !== 0)) {\n                isResolved = this._promiseFulfilled(maybePromise._value(), i);\n            } else if (((bitField & 16777216) !== 0)) {\n                isResolved = this._promiseRejected(maybePromise._reason(), i);\n            } else {\n                isResolved = this._promiseCancelled(i);\n            }\n        } else {\n            isResolved = this._promiseFulfilled(maybePromise, i);\n        }\n    }\n    if (!isResolved) result._setAsyncGuaranteed();\n};\n\nPromiseArray.prototype._isResolved = function () {\n    return this._values === null;\n};\n\nPromiseArray.prototype._resolve = function (value) {\n    this._values = null;\n    this._promise._fulfill(value);\n};\n\nPromiseArray.prototype._cancel = function() {\n    if (this._isResolved() || !this._promise.isCancellable()) return;\n    this._values = null;\n    this._promise._cancel();\n};\n\nPromiseArray.prototype._reject = function (reason) {\n    this._values = null;\n    this._promise._rejectCallback(reason, false);\n};\n\nPromiseArray.prototype._promiseFulfilled = function (value, index) {\n    this._values[index] = value;\n    var totalResolved = ++this._totalResolved;\n    if (totalResolved >= this._length) {\n        this._resolve(this._values);\n        return true;\n    }\n    return false;\n};\n\nPromiseArray.prototype._promiseCancelled = function() {\n    this._cancel();\n    return true;\n};\n\nPromiseArray.prototype._promiseRejected = function (reason) {\n    this._totalResolved++;\n    this._reject(reason);\n    return true;\n};\n\nPromiseArray.prototype._resultCancelled = function() {\n    if (this._isResolved()) return;\n    var values = this._values;\n    this._cancel();\n    if (values instanceof Promise) {\n        values.cancel();\n    } else {\n        for (var i = 0; i < values.length; ++i) {\n            if (values[i] instanceof Promise) {\n                values[i].cancel();\n            }\n        }\n    }\n};\n\nPromiseArray.prototype.shouldCopyValues = function () {\n    return true;\n};\n\nPromiseArray.prototype.getActualLength = function (len) {\n    return len;\n};\n\nreturn PromiseArray;\n};\n\n},{\"./util\":71}],59:[function(require,module,exports){\n\"use strict\";\nmodule.exports = function(Promise, INTERNAL) {\nvar THIS = {};\nvar util = require(\"./util\");\nvar nodebackForPromise = require(\"./nodeback\");\nvar withAppended = util.withAppended;\nvar maybeWrapAsError = util.maybeWrapAsError;\nvar canEvaluate = util.canEvaluate;\nvar TypeError = require(\"./errors\").TypeError;\nvar defaultSuffix = \"Async\";\nvar defaultPromisified = {__isPromisified__: true};\nvar noCopyProps = [\n    \"arity\",    \"length\",\n    \"name\",\n    \"arguments\",\n    \"caller\",\n    \"callee\",\n    \"prototype\",\n    \"__isPromisified__\"\n];\nvar noCopyPropsPattern = new RegExp(\"^(?:\" + noCopyProps.join(\"|\") + \")$\");\n\nvar defaultFilter = function(name) {\n    return util.isIdentifier(name) &&\n        name.charAt(0) !== \"_\" &&\n        name !== \"constructor\";\n};\n\nfunction propsFilter(key) {\n    return !noCopyPropsPattern.test(key);\n}\n\nfunction isPromisified(fn) {\n    try {\n        return fn.__isPromisified__ === true;\n    }\n    catch (e) {\n        return false;\n    }\n}\n\nfunction hasPromisified(obj, key, suffix) {\n    var val = util.getDataPropertyOrDefault(obj, key + suffix,\n                                            defaultPromisified);\n    return val ? isPromisified(val) : false;\n}\nfunction checkValid(ret, suffix, suffixRegexp) {\n    for (var i = 0; i < ret.length; i += 2) {\n        var key = ret[i];\n        if (suffixRegexp.test(key)) {\n            var keyWithoutAsyncSuffix = key.replace(suffixRegexp, \"\");\n            for (var j = 0; j < ret.length; j += 2) {\n                if (ret[j] === keyWithoutAsyncSuffix) {\n                    throw new TypeError(\"Cannot promisify an API that has normal methods with '%s'-suffix\\u000a\\u000a    See http://goo.gl/MqrFmX\\u000a\"\n                        .replace(\"%s\", suffix));\n                }\n            }\n        }\n    }\n}\n\nfunction promisifiableMethods(obj, suffix, suffixRegexp, filter) {\n    var keys = util.inheritedDataKeys(obj);\n    var ret = [];\n    for (var i = 0; i < keys.length; ++i) {\n        var key = keys[i];\n        var value = obj[key];\n        var passesDefaultFilter = filter === defaultFilter\n            ? true : defaultFilter(key, value, obj);\n        if (typeof value === \"function\" &&\n            !isPromisified(value) &&\n            !hasPromisified(obj, key, suffix) &&\n            filter(key, value, obj, passesDefaultFilter)) {\n            ret.push(key, value);\n        }\n    }\n    checkValid(ret, suffix, suffixRegexp);\n    return ret;\n}\n\nvar escapeIdentRegex = function(str) {\n    return str.replace(/([$])/, \"\\\\$\");\n};\n\nvar makeNodePromisifiedEval;\nif (!false) {\nvar switchCaseArgumentOrder = function(likelyArgumentCount) {\n    var ret = [likelyArgumentCount];\n    var min = Math.max(0, likelyArgumentCount - 1 - 3);\n    for(var i = likelyArgumentCount - 1; i >= min; --i) {\n        ret.push(i);\n    }\n    for(var i = likelyArgumentCount + 1; i <= 3; ++i) {\n        ret.push(i);\n    }\n    return ret;\n};\n\nvar argumentSequence = function(argumentCount) {\n    return util.filledRange(argumentCount, \"_arg\", \"\");\n};\n\nvar parameterDeclaration = function(parameterCount) {\n    return util.filledRange(\n        Math.max(parameterCount, 3), \"_arg\", \"\");\n};\n\nvar parameterCount = function(fn) {\n    if (typeof fn.length === \"number\") {\n        return Math.max(Math.min(fn.length, 1023 + 1), 0);\n    }\n    return 0;\n};\n\nmakeNodePromisifiedEval =\nfunction(callback, receiver, originalName, fn, _, multiArgs) {\n    var newParameterCount = Math.max(0, parameterCount(fn) - 1);\n    var argumentOrder = switchCaseArgumentOrder(newParameterCount);\n    var shouldProxyThis = typeof callback === \"string\" || receiver === THIS;\n\n    function generateCallForArgumentCount(count) {\n        var args = argumentSequence(count).join(\", \");\n        var comma = count > 0 ? \", \" : \"\";\n        var ret;\n        if (shouldProxyThis) {\n            ret = \"ret = callback.call(this, {{args}}, nodeback); break;\\n\";\n        } else {\n            ret = receiver === undefined\n                ? \"ret = callback({{args}}, nodeback); break;\\n\"\n                : \"ret = callback.call(receiver, {{args}}, nodeback); break;\\n\";\n        }\n        return ret.replace(\"{{args}}\", args).replace(\", \", comma);\n    }\n\n    function generateArgumentSwitchCase() {\n        var ret = \"\";\n        for (var i = 0; i < argumentOrder.length; ++i) {\n            ret += \"case \" + argumentOrder[i] +\":\" +\n                generateCallForArgumentCount(argumentOrder[i]);\n        }\n\n        ret += \"                                                             \\n\\\n        default:                                                             \\n\\\n            var args = new Array(len + 1);                                   \\n\\\n            var i = 0;                                                       \\n\\\n            for (var i = 0; i < len; ++i) {                                  \\n\\\n               args[i] = arguments[i];                                       \\n\\\n            }                                                                \\n\\\n            args[i] = nodeback;                                              \\n\\\n            [CodeForCall]                                                    \\n\\\n            break;                                                           \\n\\\n        \".replace(\"[CodeForCall]\", (shouldProxyThis\n                                ? \"ret = callback.apply(this, args);\\n\"\n                                : \"ret = callback.apply(receiver, args);\\n\"));\n        return ret;\n    }\n\n    var getFunctionCode = typeof callback === \"string\"\n                                ? (\"this != null ? this['\"+callback+\"'] : fn\")\n                                : \"fn\";\n    var body = \"'use strict';                                                \\n\\\n        var ret = function (Parameters) {                                    \\n\\\n            'use strict';                                                    \\n\\\n            var len = arguments.length;                                      \\n\\\n            var promise = new Promise(INTERNAL);                             \\n\\\n            promise._captureStackTrace();                                    \\n\\\n            var nodeback = nodebackForPromise(promise, \" + multiArgs + \");   \\n\\\n            var ret;                                                         \\n\\\n            var callback = tryCatch([GetFunctionCode]);                      \\n\\\n            switch(len) {                                                    \\n\\\n                [CodeForSwitchCase]                                          \\n\\\n            }                                                                \\n\\\n            if (ret === errorObj) {                                          \\n\\\n                promise._rejectCallback(maybeWrapAsError(ret.e), true, true);\\n\\\n            }                                                                \\n\\\n            if (!promise._isFateSealed()) promise._setAsyncGuaranteed();     \\n\\\n            return promise;                                                  \\n\\\n        };                                                                   \\n\\\n        notEnumerableProp(ret, '__isPromisified__', true);                   \\n\\\n        return ret;                                                          \\n\\\n    \".replace(\"[CodeForSwitchCase]\", generateArgumentSwitchCase())\n        .replace(\"[GetFunctionCode]\", getFunctionCode);\n    body = body.replace(\"Parameters\", parameterDeclaration(newParameterCount));\n    return new Function(\"Promise\",\n                        \"fn\",\n                        \"receiver\",\n                        \"withAppended\",\n                        \"maybeWrapAsError\",\n                        \"nodebackForPromise\",\n                        \"tryCatch\",\n                        \"errorObj\",\n                        \"notEnumerableProp\",\n                        \"INTERNAL\",\n                        body)(\n                    Promise,\n                    fn,\n                    receiver,\n                    withAppended,\n                    maybeWrapAsError,\n                    nodebackForPromise,\n                    util.tryCatch,\n                    util.errorObj,\n                    util.notEnumerableProp,\n                    INTERNAL);\n};\n}\n\nfunction makeNodePromisifiedClosure(callback, receiver, _, fn, __, multiArgs) {\n    var defaultThis = (function() {return this;})();\n    var method = callback;\n    if (typeof method === \"string\") {\n        callback = fn;\n    }\n    function promisified() {\n        var _receiver = receiver;\n        if (receiver === THIS) _receiver = this;\n        var promise = new Promise(INTERNAL);\n        promise._captureStackTrace();\n        var cb = typeof method === \"string\" && this !== defaultThis\n            ? this[method] : callback;\n        var fn = nodebackForPromise(promise, multiArgs);\n        try {\n            cb.apply(_receiver, withAppended(arguments, fn));\n        } catch(e) {\n            promise._rejectCallback(maybeWrapAsError(e), true, true);\n        }\n        if (!promise._isFateSealed()) promise._setAsyncGuaranteed();\n        return promise;\n    }\n    util.notEnumerableProp(promisified, \"__isPromisified__\", true);\n    return promisified;\n}\n\nvar makeNodePromisified = canEvaluate\n    ? makeNodePromisifiedEval\n    : makeNodePromisifiedClosure;\n\nfunction promisifyAll(obj, suffix, filter, promisifier, multiArgs) {\n    var suffixRegexp = new RegExp(escapeIdentRegex(suffix) + \"$\");\n    var methods =\n        promisifiableMethods(obj, suffix, suffixRegexp, filter);\n\n    for (var i = 0, len = methods.length; i < len; i+= 2) {\n        var key = methods[i];\n        var fn = methods[i+1];\n        var promisifiedKey = key + suffix;\n        if (promisifier === makeNodePromisified) {\n            obj[promisifiedKey] =\n                makeNodePromisified(key, THIS, key, fn, suffix, multiArgs);\n        } else {\n            var promisified = promisifier(fn, function() {\n                return makeNodePromisified(key, THIS, key,\n                                           fn, suffix, multiArgs);\n            });\n            util.notEnumerableProp(promisified, \"__isPromisified__\", true);\n            obj[promisifiedKey] = promisified;\n        }\n    }\n    util.toFastProperties(obj);\n    return obj;\n}\n\nfunction promisify(callback, receiver, multiArgs) {\n    return makeNodePromisified(callback, receiver, undefined,\n                                callback, null, multiArgs);\n}\n\nPromise.promisify = function (fn, options) {\n    if (typeof fn !== \"function\") {\n        throw new TypeError(\"expecting a function but got \" + util.classString(fn));\n    }\n    if (isPromisified(fn)) {\n        return fn;\n    }\n    options = Object(options);\n    var receiver = options.context === undefined ? THIS : options.context;\n    var multiArgs = !!options.multiArgs;\n    var ret = promisify(fn, receiver, multiArgs);\n    util.copyDescriptors(fn, ret, propsFilter);\n    return ret;\n};\n\nPromise.promisifyAll = function (target, options) {\n    if (typeof target !== \"function\" && typeof target !== \"object\") {\n        throw new TypeError(\"the target of promisifyAll must be an object or a function\\u000a\\u000a    See http://goo.gl/MqrFmX\\u000a\");\n    }\n    options = Object(options);\n    var multiArgs = !!options.multiArgs;\n    var suffix = options.suffix;\n    if (typeof suffix !== \"string\") suffix = defaultSuffix;\n    var filter = options.filter;\n    if (typeof filter !== \"function\") filter = defaultFilter;\n    var promisifier = options.promisifier;\n    if (typeof promisifier !== \"function\") promisifier = makeNodePromisified;\n\n    if (!util.isIdentifier(suffix)) {\n        throw new RangeError(\"suffix must be a valid identifier\\u000a\\u000a    See http://goo.gl/MqrFmX\\u000a\");\n    }\n\n    var keys = util.inheritedDataKeys(target);\n    for (var i = 0; i < keys.length; ++i) {\n        var value = target[keys[i]];\n        if (keys[i] !== \"constructor\" &&\n            util.isClass(value)) {\n            promisifyAll(value.prototype, suffix, filter, promisifier,\n                multiArgs);\n            promisifyAll(value, suffix, filter, promisifier, multiArgs);\n        }\n    }\n\n    return promisifyAll(target, suffix, filter, promisifier, multiArgs);\n};\n};\n\n\n},{\"./errors\":47,\"./nodeback\":55,\"./util\":71}],60:[function(require,module,exports){\n\"use strict\";\nmodule.exports = function(\n    Promise, PromiseArray, tryConvertToPromise, apiRejection) {\nvar util = require(\"./util\");\nvar isObject = util.isObject;\nvar es5 = require(\"./es5\");\nvar Es6Map;\nif (typeof Map === \"function\") Es6Map = Map;\n\nvar mapToEntries = (function() {\n    var index = 0;\n    var size = 0;\n\n    function extractEntry(value, key) {\n        this[index] = value;\n        this[index + size] = key;\n        index++;\n    }\n\n    return function mapToEntries(map) {\n        size = map.size;\n        index = 0;\n        var ret = new Array(map.size * 2);\n        map.forEach(extractEntry, ret);\n        return ret;\n    };\n})();\n\nvar entriesToMap = function(entries) {\n    var ret = new Es6Map();\n    var length = entries.length / 2 | 0;\n    for (var i = 0; i < length; ++i) {\n        var key = entries[length + i];\n        var value = entries[i];\n        ret.set(key, value);\n    }\n    return ret;\n};\n\nfunction PropertiesPromiseArray(obj) {\n    var isMap = false;\n    var entries;\n    if (Es6Map !== undefined && obj instanceof Es6Map) {\n        entries = mapToEntries(obj);\n        isMap = true;\n    } else {\n        var keys = es5.keys(obj);\n        var len = keys.length;\n        entries = new Array(len * 2);\n        for (var i = 0; i < len; ++i) {\n            var key = keys[i];\n            entries[i] = obj[key];\n            entries[i + len] = key;\n        }\n    }\n    this.constructor$(entries);\n    this._isMap = isMap;\n    this._init$(undefined, -3);\n}\nutil.inherits(PropertiesPromiseArray, PromiseArray);\n\nPropertiesPromiseArray.prototype._init = function () {};\n\nPropertiesPromiseArray.prototype._promiseFulfilled = function (value, index) {\n    this._values[index] = value;\n    var totalResolved = ++this._totalResolved;\n    if (totalResolved >= this._length) {\n        var val;\n        if (this._isMap) {\n            val = entriesToMap(this._values);\n        } else {\n            val = {};\n            var keyOffset = this.length();\n            for (var i = 0, len = this.length(); i < len; ++i) {\n                val[this._values[i + keyOffset]] = this._values[i];\n            }\n        }\n        this._resolve(val);\n        return true;\n    }\n    return false;\n};\n\nPropertiesPromiseArray.prototype.shouldCopyValues = function () {\n    return false;\n};\n\nPropertiesPromiseArray.prototype.getActualLength = function (len) {\n    return len >> 1;\n};\n\nfunction props(promises) {\n    var ret;\n    var castValue = tryConvertToPromise(promises);\n\n    if (!isObject(castValue)) {\n        return apiRejection(\"cannot await properties of a non-object\\u000a\\u000a    See http://goo.gl/MqrFmX\\u000a\");\n    } else if (castValue instanceof Promise) {\n        ret = castValue._then(\n            Promise.props, undefined, undefined, undefined, undefined);\n    } else {\n        ret = new PropertiesPromiseArray(castValue).promise();\n    }\n\n    if (castValue instanceof Promise) {\n        ret._propagateFrom(castValue, 2);\n    }\n    return ret;\n}\n\nPromise.prototype.props = function () {\n    return props(this);\n};\n\nPromise.props = function (promises) {\n    return props(promises);\n};\n};\n\n},{\"./es5\":48,\"./util\":71}],61:[function(require,module,exports){\n\"use strict\";\nfunction arrayMove(src, srcIndex, dst, dstIndex, len) {\n    for (var j = 0; j < len; ++j) {\n        dst[j + dstIndex] = src[j + srcIndex];\n        src[j + srcIndex] = void 0;\n    }\n}\n\nfunction Queue(capacity) {\n    this._capacity = capacity;\n    this._length = 0;\n    this._front = 0;\n}\n\nQueue.prototype._willBeOverCapacity = function (size) {\n    return this._capacity < size;\n};\n\nQueue.prototype._pushOne = function (arg) {\n    var length = this.length();\n    this._checkCapacity(length + 1);\n    var i = (this._front + length) & (this._capacity - 1);\n    this[i] = arg;\n    this._length = length + 1;\n};\n\nQueue.prototype._unshiftOne = function(value) {\n    var capacity = this._capacity;\n    this._checkCapacity(this.length() + 1);\n    var front = this._front;\n    var i = (((( front - 1 ) &\n                    ( capacity - 1) ) ^ capacity ) - capacity );\n    this[i] = value;\n    this._front = i;\n    this._length = this.length() + 1;\n};\n\nQueue.prototype.unshift = function(fn, receiver, arg) {\n    this._unshiftOne(arg);\n    this._unshiftOne(receiver);\n    this._unshiftOne(fn);\n};\n\nQueue.prototype.push = function (fn, receiver, arg) {\n    var length = this.length() + 3;\n    if (this._willBeOverCapacity(length)) {\n        this._pushOne(fn);\n        this._pushOne(receiver);\n        this._pushOne(arg);\n        return;\n    }\n    var j = this._front + length - 3;\n    this._checkCapacity(length);\n    var wrapMask = this._capacity - 1;\n    this[(j + 0) & wrapMask] = fn;\n    this[(j + 1) & wrapMask] = receiver;\n    this[(j + 2) & wrapMask] = arg;\n    this._length = length;\n};\n\nQueue.prototype.shift = function () {\n    var front = this._front,\n        ret = this[front];\n\n    this[front] = undefined;\n    this._front = (front + 1) & (this._capacity - 1);\n    this._length--;\n    return ret;\n};\n\nQueue.prototype.length = function () {\n    return this._length;\n};\n\nQueue.prototype._checkCapacity = function (size) {\n    if (this._capacity < size) {\n        this._resizeTo(this._capacity << 1);\n    }\n};\n\nQueue.prototype._resizeTo = function (capacity) {\n    var oldCapacity = this._capacity;\n    this._capacity = capacity;\n    var front = this._front;\n    var length = this._length;\n    var moveItemsCount = (front + length) & (oldCapacity - 1);\n    arrayMove(this, 0, this, oldCapacity, moveItemsCount);\n};\n\nmodule.exports = Queue;\n\n},{}],62:[function(require,module,exports){\n\"use strict\";\nmodule.exports = function(\n    Promise, INTERNAL, tryConvertToPromise, apiRejection) {\nvar util = require(\"./util\");\n\nvar raceLater = function (promise) {\n    return promise.then(function(array) {\n        return race(array, promise);\n    });\n};\n\nfunction race(promises, parent) {\n    var maybePromise = tryConvertToPromise(promises);\n\n    if (maybePromise instanceof Promise) {\n        return raceLater(maybePromise);\n    } else {\n        promises = util.asArray(promises);\n        if (promises === null)\n            return apiRejection(\"expecting an array or an iterable object but got \" + util.classString(promises));\n    }\n\n    var ret = new Promise(INTERNAL);\n    if (parent !== undefined) {\n        ret._propagateFrom(parent, 3);\n    }\n    var fulfill = ret._fulfill;\n    var reject = ret._reject;\n    for (var i = 0, len = promises.length; i < len; ++i) {\n        var val = promises[i];\n\n        if (val === undefined && !(i in promises)) {\n            continue;\n        }\n\n        Promise.cast(val)._then(fulfill, reject, undefined, ret, null);\n    }\n    return ret;\n}\n\nPromise.race = function (promises) {\n    return race(promises, undefined);\n};\n\nPromise.prototype.race = function () {\n    return race(this, undefined);\n};\n\n};\n\n},{\"./util\":71}],63:[function(require,module,exports){\n\"use strict\";\nmodule.exports = function(Promise,\n                          PromiseArray,\n                          apiRejection,\n                          tryConvertToPromise,\n                          INTERNAL,\n                          debug) {\nvar getDomain = Promise._getDomain;\nvar util = require(\"./util\");\nvar tryCatch = util.tryCatch;\n\nfunction ReductionPromiseArray(promises, fn, initialValue, _each) {\n    this.constructor$(promises);\n    var domain = getDomain();\n    this._fn = domain === null ? fn : domain.bind(fn);\n    if (initialValue !== undefined) {\n        initialValue = Promise.resolve(initialValue);\n        initialValue._attachCancellationCallback(this);\n    }\n    this._initialValue = initialValue;\n    this._currentCancellable = null;\n    this._eachValues = _each === INTERNAL ? [] : undefined;\n    this._promise._captureStackTrace();\n    this._init$(undefined, -5);\n}\nutil.inherits(ReductionPromiseArray, PromiseArray);\n\nReductionPromiseArray.prototype._gotAccum = function(accum) {\n    if (this._eachValues !== undefined && accum !== INTERNAL) {\n        this._eachValues.push(accum);\n    }\n};\n\nReductionPromiseArray.prototype._eachComplete = function(value) {\n    this._eachValues.push(value);\n    return this._eachValues;\n};\n\nReductionPromiseArray.prototype._init = function() {};\n\nReductionPromiseArray.prototype._resolveEmptyArray = function() {\n    this._resolve(this._eachValues !== undefined ? this._eachValues\n                                                 : this._initialValue);\n};\n\nReductionPromiseArray.prototype.shouldCopyValues = function () {\n    return false;\n};\n\nReductionPromiseArray.prototype._resolve = function(value) {\n    this._promise._resolveCallback(value);\n    this._values = null;\n};\n\nReductionPromiseArray.prototype._resultCancelled = function(sender) {\n    if (sender === this._initialValue) return this._cancel();\n    if (this._isResolved()) return;\n    this._resultCancelled$();\n    if (this._currentCancellable instanceof Promise) {\n        this._currentCancellable.cancel();\n    }\n    if (this._initialValue instanceof Promise) {\n        this._initialValue.cancel();\n    }\n};\n\nReductionPromiseArray.prototype._iterate = function (values) {\n    this._values = values;\n    var value;\n    var i;\n    var length = values.length;\n    if (this._initialValue !== undefined) {\n        value = this._initialValue;\n        i = 0;\n    } else {\n        value = Promise.resolve(values[0]);\n        i = 1;\n    }\n\n    this._currentCancellable = value;\n\n    if (!value.isRejected()) {\n        for (; i < length; ++i) {\n            var ctx = {\n                accum: null,\n                value: values[i],\n                index: i,\n                length: length,\n                array: this\n            };\n            value = value._then(gotAccum, undefined, undefined, ctx, undefined);\n        }\n    }\n\n    if (this._eachValues !== undefined) {\n        value = value\n            ._then(this._eachComplete, undefined, undefined, this, undefined);\n    }\n    value._then(completed, completed, undefined, value, this);\n};\n\nPromise.prototype.reduce = function (fn, initialValue) {\n    return reduce(this, fn, initialValue, null);\n};\n\nPromise.reduce = function (promises, fn, initialValue, _each) {\n    return reduce(promises, fn, initialValue, _each);\n};\n\nfunction completed(valueOrReason, array) {\n    if (this.isFulfilled()) {\n        array._resolve(valueOrReason);\n    } else {\n        array._reject(valueOrReason);\n    }\n}\n\nfunction reduce(promises, fn, initialValue, _each) {\n    if (typeof fn !== \"function\") {\n        return apiRejection(\"expecting a function but got \" + util.classString(fn));\n    }\n    var array = new ReductionPromiseArray(promises, fn, initialValue, _each);\n    return array.promise();\n}\n\nfunction gotAccum(accum) {\n    this.accum = accum;\n    this.array._gotAccum(accum);\n    var value = tryConvertToPromise(this.value, this.array._promise);\n    if (value instanceof Promise) {\n        this.array._currentCancellable = value;\n        return value._then(gotValue, undefined, undefined, this, undefined);\n    } else {\n        return gotValue.call(this, value);\n    }\n}\n\nfunction gotValue(value) {\n    var array = this.array;\n    var promise = array._promise;\n    var fn = tryCatch(array._fn);\n    promise._pushContext();\n    var ret;\n    if (array._eachValues !== undefined) {\n        ret = fn.call(promise._boundValue(), value, this.index, this.length);\n    } else {\n        ret = fn.call(promise._boundValue(),\n                              this.accum, value, this.index, this.length);\n    }\n    if (ret instanceof Promise) {\n        array._currentCancellable = ret;\n    }\n    var promiseCreated = promise._popContext();\n    debug.checkForgottenReturns(\n        ret,\n        promiseCreated,\n        array._eachValues !== undefined ? \"Promise.each\" : \"Promise.reduce\",\n        promise\n    );\n    return ret;\n}\n};\n\n},{\"./util\":71}],64:[function(require,module,exports){\n(function (process,global){\n\"use strict\";\nvar util = require(\"./util\");\nvar schedule;\nvar noAsyncScheduler = function() {\n    throw new Error(\"No async scheduler available\\u000a\\u000a    See http://goo.gl/MqrFmX\\u000a\");\n};\nvar NativePromise = util.getNativePromise();\nif (util.isNode && typeof MutationObserver === \"undefined\") {\n    var GlobalSetImmediate = global.setImmediate;\n    var ProcessNextTick = process.nextTick;\n    schedule = util.isRecentNode\n                ? function(fn) { GlobalSetImmediate.call(global, fn); }\n                : function(fn) { ProcessNextTick.call(process, fn); };\n} else if (typeof NativePromise === \"function\") {\n    var nativePromise = NativePromise.resolve();\n    schedule = function(fn) {\n        nativePromise.then(fn);\n    };\n} else if ((typeof MutationObserver !== \"undefined\") &&\n          !(typeof window !== \"undefined\" &&\n            window.navigator &&\n            window.navigator.standalone)) {\n    schedule = (function() {\n        var div = document.createElement(\"div\");\n        var opts = {attributes: true};\n        var toggleScheduled = false;\n        var div2 = document.createElement(\"div\");\n        var o2 = new MutationObserver(function() {\n            div.classList.toggle(\"foo\");\n            toggleScheduled = false;\n        });\n        o2.observe(div2, opts);\n\n        var scheduleToggle = function() {\n            if (toggleScheduled) return;\n                toggleScheduled = true;\n                div2.classList.toggle(\"foo\");\n            };\n\n            return function schedule(fn) {\n            var o = new MutationObserver(function() {\n                o.disconnect();\n                fn();\n            });\n            o.observe(div, opts);\n            scheduleToggle();\n        };\n    })();\n} else if (typeof setImmediate !== \"undefined\") {\n    schedule = function (fn) {\n        setImmediate(fn);\n    };\n} else if (typeof setTimeout !== \"undefined\") {\n    schedule = function (fn) {\n        setTimeout(fn, 0);\n    };\n} else {\n    schedule = noAsyncScheduler;\n}\nmodule.exports = schedule;\n\n}).call(this,require('_process'),typeof global !== \"undefined\" ? global : typeof self !== \"undefined\" ? self : typeof window !== \"undefined\" ? window : {})\n},{\"./util\":71,\"_process\":81}],65:[function(require,module,exports){\n\"use strict\";\nmodule.exports =\n    function(Promise, PromiseArray, debug) {\nvar PromiseInspection = Promise.PromiseInspection;\nvar util = require(\"./util\");\n\nfunction SettledPromiseArray(values) {\n    this.constructor$(values);\n}\nutil.inherits(SettledPromiseArray, PromiseArray);\n\nSettledPromiseArray.prototype._promiseResolved = function (index, inspection) {\n    this._values[index] = inspection;\n    var totalResolved = ++this._totalResolved;\n    if (totalResolved >= this._length) {\n        this._resolve(this._values);\n        return true;\n    }\n    return false;\n};\n\nSettledPromiseArray.prototype._promiseFulfilled = function (value, index) {\n    var ret = new PromiseInspection();\n    ret._bitField = 33554432;\n    ret._settledValueField = value;\n    return this._promiseResolved(index, ret);\n};\nSettledPromiseArray.prototype._promiseRejected = function (reason, index) {\n    var ret = new PromiseInspection();\n    ret._bitField = 16777216;\n    ret._settledValueField = reason;\n    return this._promiseResolved(index, ret);\n};\n\nPromise.settle = function (promises) {\n    debug.deprecated(\".settle()\", \".reflect()\");\n    return new SettledPromiseArray(promises).promise();\n};\n\nPromise.prototype.settle = function () {\n    return Promise.settle(this);\n};\n};\n\n},{\"./util\":71}],66:[function(require,module,exports){\n\"use strict\";\nmodule.exports =\nfunction(Promise, PromiseArray, apiRejection) {\nvar util = require(\"./util\");\nvar RangeError = require(\"./errors\").RangeError;\nvar AggregateError = require(\"./errors\").AggregateError;\nvar isArray = util.isArray;\nvar CANCELLATION = {};\n\n\nfunction SomePromiseArray(values) {\n    this.constructor$(values);\n    this._howMany = 0;\n    this._unwrap = false;\n    this._initialized = false;\n}\nutil.inherits(SomePromiseArray, PromiseArray);\n\nSomePromiseArray.prototype._init = function () {\n    if (!this._initialized) {\n        return;\n    }\n    if (this._howMany === 0) {\n        this._resolve([]);\n        return;\n    }\n    this._init$(undefined, -5);\n    var isArrayResolved = isArray(this._values);\n    if (!this._isResolved() &&\n        isArrayResolved &&\n        this._howMany > this._canPossiblyFulfill()) {\n        this._reject(this._getRangeError(this.length()));\n    }\n};\n\nSomePromiseArray.prototype.init = function () {\n    this._initialized = true;\n    this._init();\n};\n\nSomePromiseArray.prototype.setUnwrap = function () {\n    this._unwrap = true;\n};\n\nSomePromiseArray.prototype.howMany = function () {\n    return this._howMany;\n};\n\nSomePromiseArray.prototype.setHowMany = function (count) {\n    this._howMany = count;\n};\n\nSomePromiseArray.prototype._promiseFulfilled = function (value) {\n    this._addFulfilled(value);\n    if (this._fulfilled() === this.howMany()) {\n        this._values.length = this.howMany();\n        if (this.howMany() === 1 && this._unwrap) {\n            this._resolve(this._values[0]);\n        } else {\n            this._resolve(this._values);\n        }\n        return true;\n    }\n    return false;\n\n};\nSomePromiseArray.prototype._promiseRejected = function (reason) {\n    this._addRejected(reason);\n    return this._checkOutcome();\n};\n\nSomePromiseArray.prototype._promiseCancelled = function () {\n    if (this._values instanceof Promise || this._values == null) {\n        return this._cancel();\n    }\n    this._addRejected(CANCELLATION);\n    return this._checkOutcome();\n};\n\nSomePromiseArray.prototype._checkOutcome = function() {\n    if (this.howMany() > this._canPossiblyFulfill()) {\n        var e = new AggregateError();\n        for (var i = this.length(); i < this._values.length; ++i) {\n            if (this._values[i] !== CANCELLATION) {\n                e.push(this._values[i]);\n            }\n        }\n        if (e.length > 0) {\n            this._reject(e);\n        } else {\n            this._cancel();\n        }\n        return true;\n    }\n    return false;\n};\n\nSomePromiseArray.prototype._fulfilled = function () {\n    return this._totalResolved;\n};\n\nSomePromiseArray.prototype._rejected = function () {\n    return this._values.length - this.length();\n};\n\nSomePromiseArray.prototype._addRejected = function (reason) {\n    this._values.push(reason);\n};\n\nSomePromiseArray.prototype._addFulfilled = function (value) {\n    this._values[this._totalResolved++] = value;\n};\n\nSomePromiseArray.prototype._canPossiblyFulfill = function () {\n    return this.length() - this._rejected();\n};\n\nSomePromiseArray.prototype._getRangeError = function (count) {\n    var message = \"Input array must contain at least \" +\n            this._howMany + \" items but contains only \" + count + \" items\";\n    return new RangeError(message);\n};\n\nSomePromiseArray.prototype._resolveEmptyArray = function () {\n    this._reject(this._getRangeError(0));\n};\n\nfunction some(promises, howMany) {\n    if ((howMany | 0) !== howMany || howMany < 0) {\n        return apiRejection(\"expecting a positive integer\\u000a\\u000a    See http://goo.gl/MqrFmX\\u000a\");\n    }\n    var ret = new SomePromiseArray(promises);\n    var promise = ret.promise();\n    ret.setHowMany(howMany);\n    ret.init();\n    return promise;\n}\n\nPromise.some = function (promises, howMany) {\n    return some(promises, howMany);\n};\n\nPromise.prototype.some = function (howMany) {\n    return some(this, howMany);\n};\n\nPromise._SomePromiseArray = SomePromiseArray;\n};\n\n},{\"./errors\":47,\"./util\":71}],67:[function(require,module,exports){\n\"use strict\";\nmodule.exports = function(Promise) {\nfunction PromiseInspection(promise) {\n    if (promise !== undefined) {\n        promise = promise._target();\n        this._bitField = promise._bitField;\n        this._settledValueField = promise._isFateSealed()\n            ? promise._settledValue() : undefined;\n    }\n    else {\n        this._bitField = 0;\n        this._settledValueField = undefined;\n    }\n}\n\nPromiseInspection.prototype._settledValue = function() {\n    return this._settledValueField;\n};\n\nvar value = PromiseInspection.prototype.value = function () {\n    if (!this.isFulfilled()) {\n        throw new TypeError(\"cannot get fulfillment value of a non-fulfilled promise\\u000a\\u000a    See http://goo.gl/MqrFmX\\u000a\");\n    }\n    return this._settledValue();\n};\n\nvar reason = PromiseInspection.prototype.error =\nPromiseInspection.prototype.reason = function () {\n    if (!this.isRejected()) {\n        throw new TypeError(\"cannot get rejection reason of a non-rejected promise\\u000a\\u000a    See http://goo.gl/MqrFmX\\u000a\");\n    }\n    return this._settledValue();\n};\n\nvar isFulfilled = PromiseInspection.prototype.isFulfilled = function() {\n    return (this._bitField & 33554432) !== 0;\n};\n\nvar isRejected = PromiseInspection.prototype.isRejected = function () {\n    return (this._bitField & 16777216) !== 0;\n};\n\nvar isPending = PromiseInspection.prototype.isPending = function () {\n    return (this._bitField & 50397184) === 0;\n};\n\nvar isResolved = PromiseInspection.prototype.isResolved = function () {\n    return (this._bitField & 50331648) !== 0;\n};\n\nPromiseInspection.prototype.isCancelled =\nPromise.prototype._isCancelled = function() {\n    return (this._bitField & 65536) === 65536;\n};\n\nPromise.prototype.isCancelled = function() {\n    return this._target()._isCancelled();\n};\n\nPromise.prototype.isPending = function() {\n    return isPending.call(this._target());\n};\n\nPromise.prototype.isRejected = function() {\n    return isRejected.call(this._target());\n};\n\nPromise.prototype.isFulfilled = function() {\n    return isFulfilled.call(this._target());\n};\n\nPromise.prototype.isResolved = function() {\n    return isResolved.call(this._target());\n};\n\nPromise.prototype.value = function() {\n    return value.call(this._target());\n};\n\nPromise.prototype.reason = function() {\n    var target = this._target();\n    target._unsetRejectionIsUnhandled();\n    return reason.call(target);\n};\n\nPromise.prototype._value = function() {\n    return this._settledValue();\n};\n\nPromise.prototype._reason = function() {\n    this._unsetRejectionIsUnhandled();\n    return this._settledValue();\n};\n\nPromise.PromiseInspection = PromiseInspection;\n};\n\n},{}],68:[function(require,module,exports){\n\"use strict\";\nmodule.exports = function(Promise, INTERNAL) {\nvar util = require(\"./util\");\nvar errorObj = util.errorObj;\nvar isObject = util.isObject;\n\nfunction tryConvertToPromise(obj, context) {\n    if (isObject(obj)) {\n        if (obj instanceof Promise) return obj;\n        var then = getThen(obj);\n        if (then === errorObj) {\n            if (context) context._pushContext();\n            var ret = Promise.reject(then.e);\n            if (context) context._popContext();\n            return ret;\n        } else if (typeof then === \"function\") {\n            if (isAnyBluebirdPromise(obj)) {\n                var ret = new Promise(INTERNAL);\n                obj._then(\n                    ret._fulfill,\n                    ret._reject,\n                    undefined,\n                    ret,\n                    null\n                );\n                return ret;\n            }\n            return doThenable(obj, then, context);\n        }\n    }\n    return obj;\n}\n\nfunction doGetThen(obj) {\n    return obj.then;\n}\n\nfunction getThen(obj) {\n    try {\n        return doGetThen(obj);\n    } catch (e) {\n        errorObj.e = e;\n        return errorObj;\n    }\n}\n\nvar hasProp = {}.hasOwnProperty;\nfunction isAnyBluebirdPromise(obj) {\n    try {\n        return hasProp.call(obj, \"_promise0\");\n    } catch (e) {\n        return false;\n    }\n}\n\nfunction doThenable(x, then, context) {\n    var promise = new Promise(INTERNAL);\n    var ret = promise;\n    if (context) context._pushContext();\n    promise._captureStackTrace();\n    if (context) context._popContext();\n    var synchronous = true;\n    var result = util.tryCatch(then).call(x, resolve, reject);\n    synchronous = false;\n\n    if (promise && result === errorObj) {\n        promise._rejectCallback(result.e, true, true);\n        promise = null;\n    }\n\n    function resolve(value) {\n        if (!promise) return;\n        promise._resolveCallback(value);\n        promise = null;\n    }\n\n    function reject(reason) {\n        if (!promise) return;\n        promise._rejectCallback(reason, synchronous, true);\n        promise = null;\n    }\n    return ret;\n}\n\nreturn tryConvertToPromise;\n};\n\n},{\"./util\":71}],69:[function(require,module,exports){\n\"use strict\";\nmodule.exports = function(Promise, INTERNAL, debug) {\nvar util = require(\"./util\");\nvar TimeoutError = Promise.TimeoutError;\n\nfunction HandleWrapper(handle)  {\n    this.handle = handle;\n}\n\nHandleWrapper.prototype._resultCancelled = function() {\n    clearTimeout(this.handle);\n};\n\nvar afterValue = function(value) { return delay(+this).thenReturn(value); };\nvar delay = Promise.delay = function (ms, value) {\n    var ret;\n    var handle;\n    if (value !== undefined) {\n        ret = Promise.resolve(value)\n                ._then(afterValue, null, null, ms, undefined);\n        if (debug.cancellation() && value instanceof Promise) {\n            ret._setOnCancel(value);\n        }\n    } else {\n        ret = new Promise(INTERNAL);\n        handle = setTimeout(function() { ret._fulfill(); }, +ms);\n        if (debug.cancellation()) {\n            ret._setOnCancel(new HandleWrapper(handle));\n        }\n    }\n    ret._setAsyncGuaranteed();\n    return ret;\n};\n\nPromise.prototype.delay = function (ms) {\n    return delay(ms, this);\n};\n\nvar afterTimeout = function (promise, message, parent) {\n    var err;\n    if (typeof message !== \"string\") {\n        if (message instanceof Error) {\n            err = message;\n        } else {\n            err = new TimeoutError(\"operation timed out\");\n        }\n    } else {\n        err = new TimeoutError(message);\n    }\n    util.markAsOriginatingFromRejection(err);\n    promise._attachExtraTrace(err);\n    promise._reject(err);\n\n    if (parent != null) {\n        parent.cancel();\n    }\n};\n\nfunction successClear(value) {\n    clearTimeout(this.handle);\n    return value;\n}\n\nfunction failureClear(reason) {\n    clearTimeout(this.handle);\n    throw reason;\n}\n\nPromise.prototype.timeout = function (ms, message) {\n    ms = +ms;\n    var ret, parent;\n\n    var handleWrapper = new HandleWrapper(setTimeout(function timeoutTimeout() {\n        if (ret.isPending()) {\n            afterTimeout(ret, message, parent);\n        }\n    }, ms));\n\n    if (debug.cancellation()) {\n        parent = this.then();\n        ret = parent._then(successClear, failureClear,\n                            undefined, handleWrapper, undefined);\n        ret._setOnCancel(handleWrapper);\n    } else {\n        ret = this._then(successClear, failureClear,\n                            undefined, handleWrapper, undefined);\n    }\n\n    return ret;\n};\n\n};\n\n},{\"./util\":71}],70:[function(require,module,exports){\n\"use strict\";\nmodule.exports = function (Promise, apiRejection, tryConvertToPromise,\n    createContext, INTERNAL, debug) {\n    var util = require(\"./util\");\n    var TypeError = require(\"./errors\").TypeError;\n    var inherits = require(\"./util\").inherits;\n    var errorObj = util.errorObj;\n    var tryCatch = util.tryCatch;\n    var NULL = {};\n\n    function thrower(e) {\n        setTimeout(function(){throw e;}, 0);\n    }\n\n    function castPreservingDisposable(thenable) {\n        var maybePromise = tryConvertToPromise(thenable);\n        if (maybePromise !== thenable &&\n            typeof thenable._isDisposable === \"function\" &&\n            typeof thenable._getDisposer === \"function\" &&\n            thenable._isDisposable()) {\n            maybePromise._setDisposable(thenable._getDisposer());\n        }\n        return maybePromise;\n    }\n    function dispose(resources, inspection) {\n        var i = 0;\n        var len = resources.length;\n        var ret = new Promise(INTERNAL);\n        function iterator() {\n            if (i >= len) return ret._fulfill();\n            var maybePromise = castPreservingDisposable(resources[i++]);\n            if (maybePromise instanceof Promise &&\n                maybePromise._isDisposable()) {\n                try {\n                    maybePromise = tryConvertToPromise(\n                        maybePromise._getDisposer().tryDispose(inspection),\n                        resources.promise);\n                } catch (e) {\n                    return thrower(e);\n                }\n                if (maybePromise instanceof Promise) {\n                    return maybePromise._then(iterator, thrower,\n                                              null, null, null);\n                }\n            }\n            iterator();\n        }\n        iterator();\n        return ret;\n    }\n\n    function Disposer(data, promise, context) {\n        this._data = data;\n        this._promise = promise;\n        this._context = context;\n    }\n\n    Disposer.prototype.data = function () {\n        return this._data;\n    };\n\n    Disposer.prototype.promise = function () {\n        return this._promise;\n    };\n\n    Disposer.prototype.resource = function () {\n        if (this.promise().isFulfilled()) {\n            return this.promise().value();\n        }\n        return NULL;\n    };\n\n    Disposer.prototype.tryDispose = function(inspection) {\n        var resource = this.resource();\n        var context = this._context;\n        if (context !== undefined) context._pushContext();\n        var ret = resource !== NULL\n            ? this.doDispose(resource, inspection) : null;\n        if (context !== undefined) context._popContext();\n        this._promise._unsetDisposable();\n        this._data = null;\n        return ret;\n    };\n\n    Disposer.isDisposer = function (d) {\n        return (d != null &&\n                typeof d.resource === \"function\" &&\n                typeof d.tryDispose === \"function\");\n    };\n\n    function FunctionDisposer(fn, promise, context) {\n        this.constructor$(fn, promise, context);\n    }\n    inherits(FunctionDisposer, Disposer);\n\n    FunctionDisposer.prototype.doDispose = function (resource, inspection) {\n        var fn = this.data();\n        return fn.call(resource, resource, inspection);\n    };\n\n    function maybeUnwrapDisposer(value) {\n        if (Disposer.isDisposer(value)) {\n            this.resources[this.index]._setDisposable(value);\n            return value.promise();\n        }\n        return value;\n    }\n\n    function ResourceList(length) {\n        this.length = length;\n        this.promise = null;\n        this[length-1] = null;\n    }\n\n    ResourceList.prototype._resultCancelled = function() {\n        var len = this.length;\n        for (var i = 0; i < len; ++i) {\n            var item = this[i];\n            if (item instanceof Promise) {\n                item.cancel();\n            }\n        }\n    };\n\n    Promise.using = function () {\n        var len = arguments.length;\n        if (len < 2) return apiRejection(\n                        \"you must pass at least 2 arguments to Promise.using\");\n        var fn = arguments[len - 1];\n        if (typeof fn !== \"function\") {\n            return apiRejection(\"expecting a function but got \" + util.classString(fn));\n        }\n        var input;\n        var spreadArgs = true;\n        if (len === 2 && Array.isArray(arguments[0])) {\n            input = arguments[0];\n            len = input.length;\n            spreadArgs = false;\n        } else {\n            input = arguments;\n            len--;\n        }\n        var resources = new ResourceList(len);\n        for (var i = 0; i < len; ++i) {\n            var resource = input[i];\n            if (Disposer.isDisposer(resource)) {\n                var disposer = resource;\n                resource = resource.promise();\n                resource._setDisposable(disposer);\n            } else {\n                var maybePromise = tryConvertToPromise(resource);\n                if (maybePromise instanceof Promise) {\n                    resource =\n                        maybePromise._then(maybeUnwrapDisposer, null, null, {\n                            resources: resources,\n                            index: i\n                    }, undefined);\n                }\n            }\n            resources[i] = resource;\n        }\n\n        var reflectedResources = new Array(resources.length);\n        for (var i = 0; i < reflectedResources.length; ++i) {\n            reflectedResources[i] = Promise.resolve(resources[i]).reflect();\n        }\n\n        var resultPromise = Promise.all(reflectedResources)\n            .then(function(inspections) {\n                for (var i = 0; i < inspections.length; ++i) {\n                    var inspection = inspections[i];\n                    if (inspection.isRejected()) {\n                        errorObj.e = inspection.error();\n                        return errorObj;\n                    } else if (!inspection.isFulfilled()) {\n                        resultPromise.cancel();\n                        return;\n                    }\n                    inspections[i] = inspection.value();\n                }\n                promise._pushContext();\n\n                fn = tryCatch(fn);\n                var ret = spreadArgs\n                    ? fn.apply(undefined, inspections) : fn(inspections);\n                var promiseCreated = promise._popContext();\n                debug.checkForgottenReturns(\n                    ret, promiseCreated, \"Promise.using\", promise);\n                return ret;\n            });\n\n        var promise = resultPromise.lastly(function() {\n            var inspection = new Promise.PromiseInspection(resultPromise);\n            return dispose(resources, inspection);\n        });\n        resources.promise = promise;\n        promise._setOnCancel(resources);\n        return promise;\n    };\n\n    Promise.prototype._setDisposable = function (disposer) {\n        this._bitField = this._bitField | 131072;\n        this._disposer = disposer;\n    };\n\n    Promise.prototype._isDisposable = function () {\n        return (this._bitField & 131072) > 0;\n    };\n\n    Promise.prototype._getDisposer = function () {\n        return this._disposer;\n    };\n\n    Promise.prototype._unsetDisposable = function () {\n        this._bitField = this._bitField & (~131072);\n        this._disposer = undefined;\n    };\n\n    Promise.prototype.disposer = function (fn) {\n        if (typeof fn === \"function\") {\n            return new FunctionDisposer(fn, this, createContext());\n        }\n        throw new TypeError();\n    };\n\n};\n\n},{\"./errors\":47,\"./util\":71}],71:[function(require,module,exports){\n(function (process,global){\n\"use strict\";\nvar es5 = require(\"./es5\");\nvar canEvaluate = typeof navigator == \"undefined\";\n\nvar errorObj = {e: {}};\nvar tryCatchTarget;\nvar globalObject = typeof self !== \"undefined\" ? self :\n    typeof window !== \"undefined\" ? window :\n    typeof global !== \"undefined\" ? global :\n    this !== undefined ? this : null;\n\nfunction tryCatcher() {\n    try {\n        var target = tryCatchTarget;\n        tryCatchTarget = null;\n        return target.apply(this, arguments);\n    } catch (e) {\n        errorObj.e = e;\n        return errorObj;\n    }\n}\nfunction tryCatch(fn) {\n    tryCatchTarget = fn;\n    return tryCatcher;\n}\n\nvar inherits = function(Child, Parent) {\n    var hasProp = {}.hasOwnProperty;\n\n    function T() {\n        this.constructor = Child;\n        this.constructor$ = Parent;\n        for (var propertyName in Parent.prototype) {\n            if (hasProp.call(Parent.prototype, propertyName) &&\n                propertyName.charAt(propertyName.length-1) !== \"$\"\n           ) {\n                this[propertyName + \"$\"] = Parent.prototype[propertyName];\n            }\n        }\n    }\n    T.prototype = Parent.prototype;\n    Child.prototype = new T();\n    return Child.prototype;\n};\n\n\nfunction isPrimitive(val) {\n    return val == null || val === true || val === false ||\n        typeof val === \"string\" || typeof val === \"number\";\n\n}\n\nfunction isObject(value) {\n    return typeof value === \"function\" ||\n           typeof value === \"object\" && value !== null;\n}\n\nfunction maybeWrapAsError(maybeError) {\n    if (!isPrimitive(maybeError)) return maybeError;\n\n    return new Error(safeToString(maybeError));\n}\n\nfunction withAppended(target, appendee) {\n    var len = target.length;\n    var ret = new Array(len + 1);\n    var i;\n    for (i = 0; i < len; ++i) {\n        ret[i] = target[i];\n    }\n    ret[i] = appendee;\n    return ret;\n}\n\nfunction getDataPropertyOrDefault(obj, key, defaultValue) {\n    if (es5.isES5) {\n        var desc = Object.getOwnPropertyDescriptor(obj, key);\n\n        if (desc != null) {\n            return desc.get == null && desc.set == null\n                    ? desc.value\n                    : defaultValue;\n        }\n    } else {\n        return {}.hasOwnProperty.call(obj, key) ? obj[key] : undefined;\n    }\n}\n\nfunction notEnumerableProp(obj, name, value) {\n    if (isPrimitive(obj)) return obj;\n    var descriptor = {\n        value: value,\n        configurable: true,\n        enumerable: false,\n        writable: true\n    };\n    es5.defineProperty(obj, name, descriptor);\n    return obj;\n}\n\nfunction thrower(r) {\n    throw r;\n}\n\nvar inheritedDataKeys = (function() {\n    var excludedPrototypes = [\n        Array.prototype,\n        Object.prototype,\n        Function.prototype\n    ];\n\n    var isExcludedProto = function(val) {\n        for (var i = 0; i < excludedPrototypes.length; ++i) {\n            if (excludedPrototypes[i] === val) {\n                return true;\n            }\n        }\n        return false;\n    };\n\n    if (es5.isES5) {\n        var getKeys = Object.getOwnPropertyNames;\n        return function(obj) {\n            var ret = [];\n            var visitedKeys = Object.create(null);\n            while (obj != null && !isExcludedProto(obj)) {\n                var keys;\n                try {\n                    keys = getKeys(obj);\n                } catch (e) {\n                    return ret;\n                }\n                for (var i = 0; i < keys.length; ++i) {\n                    var key = keys[i];\n                    if (visitedKeys[key]) continue;\n                    visitedKeys[key] = true;\n                    var desc = Object.getOwnPropertyDescriptor(obj, key);\n                    if (desc != null && desc.get == null && desc.set == null) {\n                        ret.push(key);\n                    }\n                }\n                obj = es5.getPrototypeOf(obj);\n            }\n            return ret;\n        };\n    } else {\n        var hasProp = {}.hasOwnProperty;\n        return function(obj) {\n            if (isExcludedProto(obj)) return [];\n            var ret = [];\n\n            /*jshint forin:false */\n            enumeration: for (var key in obj) {\n                if (hasProp.call(obj, key)) {\n                    ret.push(key);\n                } else {\n                    for (var i = 0; i < excludedPrototypes.length; ++i) {\n                        if (hasProp.call(excludedPrototypes[i], key)) {\n                            continue enumeration;\n                        }\n                    }\n                    ret.push(key);\n                }\n            }\n            return ret;\n        };\n    }\n\n})();\n\nvar thisAssignmentPattern = /this\\s*\\.\\s*\\S+\\s*=/;\nfunction isClass(fn) {\n    try {\n        if (typeof fn === \"function\") {\n            var keys = es5.names(fn.prototype);\n\n            var hasMethods = es5.isES5 && keys.length > 1;\n            var hasMethodsOtherThanConstructor = keys.length > 0 &&\n                !(keys.length === 1 && keys[0] === \"constructor\");\n            var hasThisAssignmentAndStaticMethods =\n                thisAssignmentPattern.test(fn + \"\") && es5.names(fn).length > 0;\n\n            if (hasMethods || hasMethodsOtherThanConstructor ||\n                hasThisAssignmentAndStaticMethods) {\n                return true;\n            }\n        }\n        return false;\n    } catch (e) {\n        return false;\n    }\n}\n\nfunction toFastProperties(obj) {\n    /*jshint -W027,-W055,-W031*/\n    function FakeConstructor() {}\n    FakeConstructor.prototype = obj;\n    var l = 8;\n    while (l--) new FakeConstructor();\n    return obj;\n    eval(obj);\n}\n\nvar rident = /^[a-z$_][a-z$_0-9]*$/i;\nfunction isIdentifier(str) {\n    return rident.test(str);\n}\n\nfunction filledRange(count, prefix, suffix) {\n    var ret = new Array(count);\n    for(var i = 0; i < count; ++i) {\n        ret[i] = prefix + i + suffix;\n    }\n    return ret;\n}\n\nfunction safeToString(obj) {\n    try {\n        return obj + \"\";\n    } catch (e) {\n        return \"[no string representation]\";\n    }\n}\n\nfunction isError(obj) {\n    return obj !== null &&\n           typeof obj === \"object\" &&\n           typeof obj.message === \"string\" &&\n           typeof obj.name === \"string\";\n}\n\nfunction markAsOriginatingFromRejection(e) {\n    try {\n        notEnumerableProp(e, \"isOperational\", true);\n    }\n    catch(ignore) {}\n}\n\nfunction originatesFromRejection(e) {\n    if (e == null) return false;\n    return ((e instanceof Error[\"__BluebirdErrorTypes__\"].OperationalError) ||\n        e[\"isOperational\"] === true);\n}\n\nfunction canAttachTrace(obj) {\n    return isError(obj) && es5.propertyIsWritable(obj, \"stack\");\n}\n\nvar ensureErrorObject = (function() {\n    if (!(\"stack\" in new Error())) {\n        return function(value) {\n            if (canAttachTrace(value)) return value;\n            try {throw new Error(safeToString(value));}\n            catch(err) {return err;}\n        };\n    } else {\n        return function(value) {\n            if (canAttachTrace(value)) return value;\n            return new Error(safeToString(value));\n        };\n    }\n})();\n\nfunction classString(obj) {\n    return {}.toString.call(obj);\n}\n\nfunction copyDescriptors(from, to, filter) {\n    var keys = es5.names(from);\n    for (var i = 0; i < keys.length; ++i) {\n        var key = keys[i];\n        if (filter(key)) {\n            try {\n                es5.defineProperty(to, key, es5.getDescriptor(from, key));\n            } catch (ignore) {}\n        }\n    }\n}\n\nvar asArray = function(v) {\n    if (es5.isArray(v)) {\n        return v;\n    }\n    return null;\n};\n\nif (typeof Symbol !== \"undefined\" && Symbol.iterator) {\n    var ArrayFrom = typeof Array.from === \"function\" ? function(v) {\n        return Array.from(v);\n    } : function(v) {\n        var ret = [];\n        var it = v[Symbol.iterator]();\n        var itResult;\n        while (!((itResult = it.next()).done)) {\n            ret.push(itResult.value);\n        }\n        return ret;\n    };\n\n    asArray = function(v) {\n        if (es5.isArray(v)) {\n            return v;\n        } else if (v != null && typeof v[Symbol.iterator] === \"function\") {\n            return ArrayFrom(v);\n        }\n        return null;\n    };\n}\n\nvar isNode = typeof process !== \"undefined\" &&\n        classString(process).toLowerCase() === \"[object process]\";\n\nfunction env(key, def) {\n    return isNode ? process.env[key] : def;\n}\n\nfunction getNativePromise() {\n    if (typeof Promise === \"function\") {\n        try {\n            var promise = new Promise(function(){});\n            if ({}.toString.call(promise) === \"[object Promise]\") {\n                return Promise;\n            }\n        } catch (e) {}\n    }\n}\n\nvar ret = {\n    isClass: isClass,\n    isIdentifier: isIdentifier,\n    inheritedDataKeys: inheritedDataKeys,\n    getDataPropertyOrDefault: getDataPropertyOrDefault,\n    thrower: thrower,\n    isArray: es5.isArray,\n    asArray: asArray,\n    notEnumerableProp: notEnumerableProp,\n    isPrimitive: isPrimitive,\n    isObject: isObject,\n    isError: isError,\n    canEvaluate: canEvaluate,\n    errorObj: errorObj,\n    tryCatch: tryCatch,\n    inherits: inherits,\n    withAppended: withAppended,\n    maybeWrapAsError: maybeWrapAsError,\n    toFastProperties: toFastProperties,\n    filledRange: filledRange,\n    toString: safeToString,\n    canAttachTrace: canAttachTrace,\n    ensureErrorObject: ensureErrorObject,\n    originatesFromRejection: originatesFromRejection,\n    markAsOriginatingFromRejection: markAsOriginatingFromRejection,\n    classString: classString,\n    copyDescriptors: copyDescriptors,\n    hasDevTools: typeof chrome !== \"undefined\" && chrome &&\n                 typeof chrome.loadTimes === \"function\",\n    isNode: isNode,\n    env: env,\n    global: globalObject,\n    getNativePromise: getNativePromise\n};\nret.isRecentNode = ret.isNode && (function() {\n    var version = process.versions.node.split(\".\").map(Number);\n    return (version[0] === 0 && version[1] > 10) || (version[0] > 0);\n})();\n\nif (ret.isNode) ret.toFastProperties(process);\n\ntry {throw new Error(); } catch (e) {ret.lastLineError = e;}\nmodule.exports = ret;\n\n}).call(this,require('_process'),typeof global !== \"undefined\" ? global : typeof self !== \"undefined\" ? self : typeof window !== \"undefined\" ? window : {})\n},{\"./es5\":48,\"_process\":81}],72:[function(require,module,exports){\n\n},{}],73:[function(require,module,exports){\n(function (global){\n/*!\n * The buffer module from node.js, for the browser.\n *\n * @author   Feross Aboukhadijeh <feross@feross.org> <http://feross.org>\n * @license  MIT\n */\n/* eslint-disable no-proto */\n\n'use strict'\n\nvar base64 = require('base64-js')\nvar ieee754 = require('ieee754')\nvar isArray = require('isarray')\n\nexports.Buffer = Buffer\nexports.SlowBuffer = SlowBuffer\nexports.INSPECT_MAX_BYTES = 50\n\n/**\n * If `Buffer.TYPED_ARRAY_SUPPORT`:\n *   === true    Use Uint8Array implementation (fastest)\n *   === false   Use Object implementation (most compatible, even IE6)\n *\n * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,\n * Opera 11.6+, iOS 4.2+.\n *\n * Due to various browser bugs, sometimes the Object implementation will be used even\n * when the browser supports typed arrays.\n *\n * Note:\n *\n *   - Firefox 4-29 lacks support for adding new properties to `Uint8Array` instances,\n *     See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438.\n *\n *   - Chrome 9-10 is missing the `TypedArray.prototype.subarray` function.\n *\n *   - IE10 has a broken `TypedArray.prototype.subarray` function which returns arrays of\n *     incorrect length in some situations.\n\n * We detect these buggy browsers and set `Buffer.TYPED_ARRAY_SUPPORT` to `false` so they\n * get the Object implementation, which is slower but behaves correctly.\n */\nBuffer.TYPED_ARRAY_SUPPORT = global.TYPED_ARRAY_SUPPORT !== undefined\n  ? global.TYPED_ARRAY_SUPPORT\n  : typedArraySupport()\n\n/*\n * Export kMaxLength after typed array support is determined.\n */\nexports.kMaxLength = kMaxLength()\n\nfunction typedArraySupport () {\n  try {\n    var arr = new Uint8Array(1)\n    arr.foo = function () { return 42 }\n    return arr.foo() === 42 && // typed array instances can be augmented\n        typeof arr.subarray === 'function' && // chrome 9-10 lack `subarray`\n        arr.subarray(1, 1).byteLength === 0 // ie10 has broken `subarray`\n  } catch (e) {\n    return false\n  }\n}\n\nfunction kMaxLength () {\n  return Buffer.TYPED_ARRAY_SUPPORT\n    ? 0x7fffffff\n    : 0x3fffffff\n}\n\nfunction createBuffer (that, length) {\n  if (kMaxLength() < length) {\n    throw new RangeError('Invalid typed array length')\n  }\n  if (Buffer.TYPED_ARRAY_SUPPORT) {\n    // Return an augmented `Uint8Array` instance, for best performance\n    that = new Uint8Array(length)\n    that.__proto__ = Buffer.prototype\n  } else {\n    // Fallback: Return an object instance of the Buffer class\n    if (that === null) {\n      that = new Buffer(length)\n    }\n    that.length = length\n  }\n\n  return that\n}\n\n/**\n * The Buffer constructor returns instances of `Uint8Array` that have their\n * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of\n * `Uint8Array`, so the returned instances will have all the node `Buffer` methods\n * and the `Uint8Array` methods. Square bracket notation works as expected -- it\n * returns a single octet.\n *\n * The `Uint8Array` prototype remains unmodified.\n */\n\nfunction Buffer (arg, encodingOrOffset, length) {\n  if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {\n    return new Buffer(arg, encodingOrOffset, length)\n  }\n\n  // Common case.\n  if (typeof arg === 'number') {\n    if (typeof encodingOrOffset === 'string') {\n      throw new Error(\n        'If encoding is specified then the first argument must be a string'\n      )\n    }\n    return allocUnsafe(this, arg)\n  }\n  return from(this, arg, encodingOrOffset, length)\n}\n\nBuffer.poolSize = 8192 // not used by this implementation\n\n// TODO: Legacy, not needed anymore. Remove in next major version.\nBuffer._augment = function (arr) {\n  arr.__proto__ = Buffer.prototype\n  return arr\n}\n\nfunction from (that, value, encodingOrOffset, length) {\n  if (typeof value === 'number') {\n    throw new TypeError('\"value\" argument must not be a number')\n  }\n\n  if (typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer) {\n    return fromArrayBuffer(that, value, encodingOrOffset, length)\n  }\n\n  if (typeof value === 'string') {\n    return fromString(that, value, encodingOrOffset)\n  }\n\n  return fromObject(that, value)\n}\n\n/**\n * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError\n * if value is a number.\n * Buffer.from(str[, encoding])\n * Buffer.from(array)\n * Buffer.from(buffer)\n * Buffer.from(arrayBuffer[, byteOffset[, length]])\n **/\nBuffer.from = function (value, encodingOrOffset, length) {\n  return from(null, value, encodingOrOffset, length)\n}\n\nif (Buffer.TYPED_ARRAY_SUPPORT) {\n  Buffer.prototype.__proto__ = Uint8Array.prototype\n  Buffer.__proto__ = Uint8Array\n  if (typeof Symbol !== 'undefined' && Symbol.species &&\n      Buffer[Symbol.species] === Buffer) {\n    // Fix subarray() in ES2016. See: https://github.com/feross/buffer/pull/97\n    Object.defineProperty(Buffer, Symbol.species, {\n      value: null,\n      configurable: true\n    })\n  }\n}\n\nfunction assertSize (size) {\n  if (typeof size !== 'number') {\n    throw new TypeError('\"size\" argument must be a number')\n  }\n}\n\nfunction alloc (that, size, fill, encoding) {\n  assertSize(size)\n  if (size <= 0) {\n    return createBuffer(that, size)\n  }\n  if (fill !== undefined) {\n    // Only pay attention to encoding if it's a string. This\n    // prevents accidentally sending in a number that would\n    // be interpretted as a start offset.\n    return typeof encoding === 'string'\n      ? createBuffer(that, size).fill(fill, encoding)\n      : createBuffer(that, size).fill(fill)\n  }\n  return createBuffer(that, size)\n}\n\n/**\n * Creates a new filled Buffer instance.\n * alloc(size[, fill[, encoding]])\n **/\nBuffer.alloc = function (size, fill, encoding) {\n  return alloc(null, size, fill, encoding)\n}\n\nfunction allocUnsafe (that, size) {\n  assertSize(size)\n  that = createBuffer(that, size < 0 ? 0 : checked(size) | 0)\n  if (!Buffer.TYPED_ARRAY_SUPPORT) {\n    for (var i = 0; i < size; i++) {\n      that[i] = 0\n    }\n  }\n  return that\n}\n\n/**\n * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.\n * */\nBuffer.allocUnsafe = function (size) {\n  return allocUnsafe(null, size)\n}\n/**\n * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.\n */\nBuffer.allocUnsafeSlow = function (size) {\n  return allocUnsafe(null, size)\n}\n\nfunction fromString (that, string, encoding) {\n  if (typeof encoding !== 'string' || encoding === '') {\n    encoding = 'utf8'\n  }\n\n  if (!Buffer.isEncoding(encoding)) {\n    throw new TypeError('\"encoding\" must be a valid string encoding')\n  }\n\n  var length = byteLength(string, encoding) | 0\n  that = createBuffer(that, length)\n\n  that.write(string, encoding)\n  return that\n}\n\nfunction fromArrayLike (that, array) {\n  var length = checked(array.length) | 0\n  that = createBuffer(that, length)\n  for (var i = 0; i < length; i += 1) {\n    that[i] = array[i] & 255\n  }\n  return that\n}\n\nfunction fromArrayBuffer (that, array, byteOffset, length) {\n  array.byteLength // this throws if `array` is not a valid ArrayBuffer\n\n  if (byteOffset < 0 || array.byteLength < byteOffset) {\n    throw new RangeError('\\'offset\\' is out of bounds')\n  }\n\n  if (array.byteLength < byteOffset + (length || 0)) {\n    throw new RangeError('\\'length\\' is out of bounds')\n  }\n\n  if (length === undefined) {\n    array = new Uint8Array(array, byteOffset)\n  } else {\n    array = new Uint8Array(array, byteOffset, length)\n  }\n\n  if (Buffer.TYPED_ARRAY_SUPPORT) {\n    // Return an augmented `Uint8Array` instance, for best performance\n    that = array\n    that.__proto__ = Buffer.prototype\n  } else {\n    // Fallback: Return an object instance of the Buffer class\n    that = fromArrayLike(that, array)\n  }\n  return that\n}\n\nfunction fromObject (that, obj) {\n  if (Buffer.isBuffer(obj)) {\n    var len = checked(obj.length) | 0\n    that = createBuffer(that, len)\n\n    if (that.length === 0) {\n      return that\n    }\n\n    obj.copy(that, 0, 0, len)\n    return that\n  }\n\n  if (obj) {\n    if ((typeof ArrayBuffer !== 'undefined' &&\n        obj.buffer instanceof ArrayBuffer) || 'length' in obj) {\n      if (typeof obj.length !== 'number' || isnan(obj.length)) {\n        return createBuffer(that, 0)\n      }\n      return fromArrayLike(that, obj)\n    }\n\n    if (obj.type === 'Buffer' && isArray(obj.data)) {\n      return fromArrayLike(that, obj.data)\n    }\n  }\n\n  throw new TypeError('First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.')\n}\n\nfunction checked (length) {\n  // Note: cannot use `length < kMaxLength` here because that fails when\n  // length is NaN (which is otherwise coerced to zero.)\n  if (length >= kMaxLength()) {\n    throw new RangeError('Attempt to allocate Buffer larger than maximum ' +\n                         'size: 0x' + kMaxLength().toString(16) + ' bytes')\n  }\n  return length | 0\n}\n\nfunction SlowBuffer (length) {\n  if (+length != length) { // eslint-disable-line eqeqeq\n    length = 0\n  }\n  return Buffer.alloc(+length)\n}\n\nBuffer.isBuffer = function isBuffer (b) {\n  return !!(b != null && b._isBuffer)\n}\n\nBuffer.compare = function compare (a, b) {\n  if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {\n    throw new TypeError('Arguments must be Buffers')\n  }\n\n  if (a === b) return 0\n\n  var x = a.length\n  var y = b.length\n\n  for (var i = 0, len = Math.min(x, y); i < len; ++i) {\n    if (a[i] !== b[i]) {\n      x = a[i]\n      y = b[i]\n      break\n    }\n  }\n\n  if (x < y) return -1\n  if (y < x) return 1\n  return 0\n}\n\nBuffer.isEncoding = function isEncoding (encoding) {\n  switch (String(encoding).toLowerCase()) {\n    case 'hex':\n    case 'utf8':\n    case 'utf-8':\n    case 'ascii':\n    case 'binary':\n    case 'base64':\n    case 'raw':\n    case 'ucs2':\n    case 'ucs-2':\n    case 'utf16le':\n    case 'utf-16le':\n      return true\n    default:\n      return false\n  }\n}\n\nBuffer.concat = function concat (list, length) {\n  if (!isArray(list)) {\n    throw new TypeError('\"list\" argument must be an Array of Buffers')\n  }\n\n  if (list.length === 0) {\n    return Buffer.alloc(0)\n  }\n\n  var i\n  if (length === undefined) {\n    length = 0\n    for (i = 0; i < list.length; i++) {\n      length += list[i].length\n    }\n  }\n\n  var buffer = Buffer.allocUnsafe(length)\n  var pos = 0\n  for (i = 0; i < list.length; i++) {\n    var buf = list[i]\n    if (!Buffer.isBuffer(buf)) {\n      throw new TypeError('\"list\" argument must be an Array of Buffers')\n    }\n    buf.copy(buffer, pos)\n    pos += buf.length\n  }\n  return buffer\n}\n\nfunction byteLength (string, encoding) {\n  if (Buffer.isBuffer(string)) {\n    return string.length\n  }\n  if (typeof ArrayBuffer !== 'undefined' && typeof ArrayBuffer.isView === 'function' &&\n      (ArrayBuffer.isView(string) || string instanceof ArrayBuffer)) {\n    return string.byteLength\n  }\n  if (typeof string !== 'string') {\n    string = '' + string\n  }\n\n  var len = string.length\n  if (len === 0) return 0\n\n  // Use a for loop to avoid recursion\n  var loweredCase = false\n  for (;;) {\n    switch (encoding) {\n      case 'ascii':\n      case 'binary':\n      // Deprecated\n      case 'raw':\n      case 'raws':\n        return len\n      case 'utf8':\n      case 'utf-8':\n      case undefined:\n        return utf8ToBytes(string).length\n      case 'ucs2':\n      case 'ucs-2':\n      case 'utf16le':\n      case 'utf-16le':\n        return len * 2\n      case 'hex':\n        return len >>> 1\n      case 'base64':\n        return base64ToBytes(string).length\n      default:\n        if (loweredCase) return utf8ToBytes(string).length // assume utf8\n        encoding = ('' + encoding).toLowerCase()\n        loweredCase = true\n    }\n  }\n}\nBuffer.byteLength = byteLength\n\nfunction slowToString (encoding, start, end) {\n  var loweredCase = false\n\n  // No need to verify that \"this.length <= MAX_UINT32\" since it's a read-only\n  // property of a typed array.\n\n  // This behaves neither like String nor Uint8Array in that we set start/end\n  // to their upper/lower bounds if the value passed is out of range.\n  // undefined is handled specially as per ECMA-262 6th Edition,\n  // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.\n  if (start === undefined || start < 0) {\n    start = 0\n  }\n  // Return early if start > this.length. Done here to prevent potential uint32\n  // coercion fail below.\n  if (start > this.length) {\n    return ''\n  }\n\n  if (end === undefined || end > this.length) {\n    end = this.length\n  }\n\n  if (end <= 0) {\n    return ''\n  }\n\n  // Force coersion to uint32. This will also coerce falsey/NaN values to 0.\n  end >>>= 0\n  start >>>= 0\n\n  if (end <= start) {\n    return ''\n  }\n\n  if (!encoding) encoding = 'utf8'\n\n  while (true) {\n    switch (encoding) {\n      case 'hex':\n        return hexSlice(this, start, end)\n\n      case 'utf8':\n      case 'utf-8':\n        return utf8Slice(this, start, end)\n\n      case 'ascii':\n        return asciiSlice(this, start, end)\n\n      case 'binary':\n        return binarySlice(this, start, end)\n\n      case 'base64':\n        return base64Slice(this, start, end)\n\n      case 'ucs2':\n      case 'ucs-2':\n      case 'utf16le':\n      case 'utf-16le':\n        return utf16leSlice(this, start, end)\n\n      default:\n        if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n        encoding = (encoding + '').toLowerCase()\n        loweredCase = true\n    }\n  }\n}\n\n// The property is used by `Buffer.isBuffer` and `is-buffer` (in Safari 5-7) to detect\n// Buffer instances.\nBuffer.prototype._isBuffer = true\n\nfunction swap (b, n, m) {\n  var i = b[n]\n  b[n] = b[m]\n  b[m] = i\n}\n\nBuffer.prototype.swap16 = function swap16 () {\n  var len = this.length\n  if (len % 2 !== 0) {\n    throw new RangeError('Buffer size must be a multiple of 16-bits')\n  }\n  for (var i = 0; i < len; i += 2) {\n    swap(this, i, i + 1)\n  }\n  return this\n}\n\nBuffer.prototype.swap32 = function swap32 () {\n  var len = this.length\n  if (len % 4 !== 0) {\n    throw new RangeError('Buffer size must be a multiple of 32-bits')\n  }\n  for (var i = 0; i < len; i += 4) {\n    swap(this, i, i + 3)\n    swap(this, i + 1, i + 2)\n  }\n  return this\n}\n\nBuffer.prototype.toString = function toString () {\n  var length = this.length | 0\n  if (length === 0) return ''\n  if (arguments.length === 0) return utf8Slice(this, 0, length)\n  return slowToString.apply(this, arguments)\n}\n\nBuffer.prototype.equals = function equals (b) {\n  if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer')\n  if (this === b) return true\n  return Buffer.compare(this, b) === 0\n}\n\nBuffer.prototype.inspect = function inspect () {\n  var str = ''\n  var max = exports.INSPECT_MAX_BYTES\n  if (this.length > 0) {\n    str = this.toString('hex', 0, max).match(/.{2}/g).join(' ')\n    if (this.length > max) str += ' ... '\n  }\n  return '<Buffer ' + str + '>'\n}\n\nBuffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) {\n  if (!Buffer.isBuffer(target)) {\n    throw new TypeError('Argument must be a Buffer')\n  }\n\n  if (start === undefined) {\n    start = 0\n  }\n  if (end === undefined) {\n    end = target ? target.length : 0\n  }\n  if (thisStart === undefined) {\n    thisStart = 0\n  }\n  if (thisEnd === undefined) {\n    thisEnd = this.length\n  }\n\n  if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {\n    throw new RangeError('out of range index')\n  }\n\n  if (thisStart >= thisEnd && start >= end) {\n    return 0\n  }\n  if (thisStart >= thisEnd) {\n    return -1\n  }\n  if (start >= end) {\n    return 1\n  }\n\n  start >>>= 0\n  end >>>= 0\n  thisStart >>>= 0\n  thisEnd >>>= 0\n\n  if (this === target) return 0\n\n  var x = thisEnd - thisStart\n  var y = end - start\n  var len = Math.min(x, y)\n\n  var thisCopy = this.slice(thisStart, thisEnd)\n  var targetCopy = target.slice(start, end)\n\n  for (var i = 0; i < len; ++i) {\n    if (thisCopy[i] !== targetCopy[i]) {\n      x = thisCopy[i]\n      y = targetCopy[i]\n      break\n    }\n  }\n\n  if (x < y) return -1\n  if (y < x) return 1\n  return 0\n}\n\nfunction arrayIndexOf (arr, val, byteOffset, encoding) {\n  var indexSize = 1\n  var arrLength = arr.length\n  var valLength = val.length\n\n  if (encoding !== undefined) {\n    encoding = String(encoding).toLowerCase()\n    if (encoding === 'ucs2' || encoding === 'ucs-2' ||\n        encoding === 'utf16le' || encoding === 'utf-16le') {\n      if (arr.length < 2 || val.length < 2) {\n        return -1\n      }\n      indexSize = 2\n      arrLength /= 2\n      valLength /= 2\n      byteOffset /= 2\n    }\n  }\n\n  function read (buf, i) {\n    if (indexSize === 1) {\n      return buf[i]\n    } else {\n      return buf.readUInt16BE(i * indexSize)\n    }\n  }\n\n  var foundIndex = -1\n  for (var i = 0; byteOffset + i < arrLength; i++) {\n    if (read(arr, byteOffset + i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {\n      if (foundIndex === -1) foundIndex = i\n      if (i - foundIndex + 1 === valLength) return (byteOffset + foundIndex) * indexSize\n    } else {\n      if (foundIndex !== -1) i -= i - foundIndex\n      foundIndex = -1\n    }\n  }\n  return -1\n}\n\nBuffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) {\n  if (typeof byteOffset === 'string') {\n    encoding = byteOffset\n    byteOffset = 0\n  } else if (byteOffset > 0x7fffffff) {\n    byteOffset = 0x7fffffff\n  } else if (byteOffset < -0x80000000) {\n    byteOffset = -0x80000000\n  }\n  byteOffset >>= 0\n\n  if (this.length === 0) return -1\n  if (byteOffset >= this.length) return -1\n\n  // Negative offsets start from the end of the buffer\n  if (byteOffset < 0) byteOffset = Math.max(this.length + byteOffset, 0)\n\n  if (typeof val === 'string') {\n    val = Buffer.from(val, encoding)\n  }\n\n  if (Buffer.isBuffer(val)) {\n    // special case: looking for empty string/buffer always fails\n    if (val.length === 0) {\n      return -1\n    }\n    return arrayIndexOf(this, val, byteOffset, encoding)\n  }\n  if (typeof val === 'number') {\n    if (Buffer.TYPED_ARRAY_SUPPORT && Uint8Array.prototype.indexOf === 'function') {\n      return Uint8Array.prototype.indexOf.call(this, val, byteOffset)\n    }\n    return arrayIndexOf(this, [ val ], byteOffset, encoding)\n  }\n\n  throw new TypeError('val must be string, number or Buffer')\n}\n\nBuffer.prototype.includes = function includes (val, byteOffset, encoding) {\n  return this.indexOf(val, byteOffset, encoding) !== -1\n}\n\nfunction hexWrite (buf, string, offset, length) {\n  offset = Number(offset) || 0\n  var remaining = buf.length - offset\n  if (!length) {\n    length = remaining\n  } else {\n    length = Number(length)\n    if (length > remaining) {\n      length = remaining\n    }\n  }\n\n  // must be an even number of digits\n  var strLen = string.length\n  if (strLen % 2 !== 0) throw new Error('Invalid hex string')\n\n  if (length > strLen / 2) {\n    length = strLen / 2\n  }\n  for (var i = 0; i < length; i++) {\n    var parsed = parseInt(string.substr(i * 2, 2), 16)\n    if (isNaN(parsed)) return i\n    buf[offset + i] = parsed\n  }\n  return i\n}\n\nfunction utf8Write (buf, string, offset, length) {\n  return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nfunction asciiWrite (buf, string, offset, length) {\n  return blitBuffer(asciiToBytes(string), buf, offset, length)\n}\n\nfunction binaryWrite (buf, string, offset, length) {\n  return asciiWrite(buf, string, offset, length)\n}\n\nfunction base64Write (buf, string, offset, length) {\n  return blitBuffer(base64ToBytes(string), buf, offset, length)\n}\n\nfunction ucs2Write (buf, string, offset, length) {\n  return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nBuffer.prototype.write = function write (string, offset, length, encoding) {\n  // Buffer#write(string)\n  if (offset === undefined) {\n    encoding = 'utf8'\n    length = this.length\n    offset = 0\n  // Buffer#write(string, encoding)\n  } else if (length === undefined && typeof offset === 'string') {\n    encoding = offset\n    length = this.length\n    offset = 0\n  // Buffer#write(string, offset[, length][, encoding])\n  } else if (isFinite(offset)) {\n    offset = offset | 0\n    if (isFinite(length)) {\n      length = length | 0\n      if (encoding === undefined) encoding = 'utf8'\n    } else {\n      encoding = length\n      length = undefined\n    }\n  // legacy write(string, encoding, offset, length) - remove in v0.13\n  } else {\n    throw new Error(\n      'Buffer.write(string, encoding, offset[, length]) is no longer supported'\n    )\n  }\n\n  var remaining = this.length - offset\n  if (length === undefined || length > remaining) length = remaining\n\n  if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) {\n    throw new RangeError('Attempt to write outside buffer bounds')\n  }\n\n  if (!encoding) encoding = 'utf8'\n\n  var loweredCase = false\n  for (;;) {\n    switch (encoding) {\n      case 'hex':\n        return hexWrite(this, string, offset, length)\n\n      case 'utf8':\n      case 'utf-8':\n        return utf8Write(this, string, offset, length)\n\n      case 'ascii':\n        return asciiWrite(this, string, offset, length)\n\n      case 'binary':\n        return binaryWrite(this, string, offset, length)\n\n      case 'base64':\n        // Warning: maxLength not taken into account in base64Write\n        return base64Write(this, string, offset, length)\n\n      case 'ucs2':\n      case 'ucs-2':\n      case 'utf16le':\n      case 'utf-16le':\n        return ucs2Write(this, string, offset, length)\n\n      default:\n        if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n        encoding = ('' + encoding).toLowerCase()\n        loweredCase = true\n    }\n  }\n}\n\nBuffer.prototype.toJSON = function toJSON () {\n  return {\n    type: 'Buffer',\n    data: Array.prototype.slice.call(this._arr || this, 0)\n  }\n}\n\nfunction base64Slice (buf, start, end) {\n  if (start === 0 && end === buf.length) {\n    return base64.fromByteArray(buf)\n  } else {\n    return base64.fromByteArray(buf.slice(start, end))\n  }\n}\n\nfunction utf8Slice (buf, start, end) {\n  end = Math.min(buf.length, end)\n  var res = []\n\n  var i = start\n  while (i < end) {\n    var firstByte = buf[i]\n    var codePoint = null\n    var bytesPerSequence = (firstByte > 0xEF) ? 4\n      : (firstByte > 0xDF) ? 3\n      : (firstByte > 0xBF) ? 2\n      : 1\n\n    if (i + bytesPerSequence <= end) {\n      var secondByte, thirdByte, fourthByte, tempCodePoint\n\n      switch (bytesPerSequence) {\n        case 1:\n          if (firstByte < 0x80) {\n            codePoint = firstByte\n          }\n          break\n        case 2:\n          secondByte = buf[i + 1]\n          if ((secondByte & 0xC0) === 0x80) {\n            tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F)\n            if (tempCodePoint > 0x7F) {\n              codePoint = tempCodePoint\n            }\n          }\n          break\n        case 3:\n          secondByte = buf[i + 1]\n          thirdByte = buf[i + 2]\n          if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {\n            tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F)\n            if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {\n              codePoint = tempCodePoint\n            }\n          }\n          break\n        case 4:\n          secondByte = buf[i + 1]\n          thirdByte = buf[i + 2]\n          fourthByte = buf[i + 3]\n          if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {\n            tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F)\n            if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {\n              codePoint = tempCodePoint\n            }\n          }\n      }\n    }\n\n    if (codePoint === null) {\n      // we did not generate a valid codePoint so insert a\n      // replacement char (U+FFFD) and advance only 1 byte\n      codePoint = 0xFFFD\n      bytesPerSequence = 1\n    } else if (codePoint > 0xFFFF) {\n      // encode to utf16 (surrogate pair dance)\n      codePoint -= 0x10000\n      res.push(codePoint >>> 10 & 0x3FF | 0xD800)\n      codePoint = 0xDC00 | codePoint & 0x3FF\n    }\n\n    res.push(codePoint)\n    i += bytesPerSequence\n  }\n\n  return decodeCodePointsArray(res)\n}\n\n// Based on http://stackoverflow.com/a/22747272/680742, the browser with\n// the lowest limit is Chrome, with 0x10000 args.\n// We go 1 magnitude less, for safety\nvar MAX_ARGUMENTS_LENGTH = 0x1000\n\nfunction decodeCodePointsArray (codePoints) {\n  var len = codePoints.length\n  if (len <= MAX_ARGUMENTS_LENGTH) {\n    return String.fromCharCode.apply(String, codePoints) // avoid extra slice()\n  }\n\n  // Decode in chunks to avoid \"call stack size exceeded\".\n  var res = ''\n  var i = 0\n  while (i < len) {\n    res += String.fromCharCode.apply(\n      String,\n      codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)\n    )\n  }\n  return res\n}\n\nfunction asciiSlice (buf, start, end) {\n  var ret = ''\n  end = Math.min(buf.length, end)\n\n  for (var i = start; i < end; i++) {\n    ret += String.fromCharCode(buf[i] & 0x7F)\n  }\n  return ret\n}\n\nfunction binarySlice (buf, start, end) {\n  var ret = ''\n  end = Math.min(buf.length, end)\n\n  for (var i = start; i < end; i++) {\n    ret += String.fromCharCode(buf[i])\n  }\n  return ret\n}\n\nfunction hexSlice (buf, start, end) {\n  var len = buf.length\n\n  if (!start || start < 0) start = 0\n  if (!end || end < 0 || end > len) end = len\n\n  var out = ''\n  for (var i = start; i < end; i++) {\n    out += toHex(buf[i])\n  }\n  return out\n}\n\nfunction utf16leSlice (buf, start, end) {\n  var bytes = buf.slice(start, end)\n  var res = ''\n  for (var i = 0; i < bytes.length; i += 2) {\n    res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256)\n  }\n  return res\n}\n\nBuffer.prototype.slice = function slice (start, end) {\n  var len = this.length\n  start = ~~start\n  end = end === undefined ? len : ~~end\n\n  if (start < 0) {\n    start += len\n    if (start < 0) start = 0\n  } else if (start > len) {\n    start = len\n  }\n\n  if (end < 0) {\n    end += len\n    if (end < 0) end = 0\n  } else if (end > len) {\n    end = len\n  }\n\n  if (end < start) end = start\n\n  var newBuf\n  if (Buffer.TYPED_ARRAY_SUPPORT) {\n    newBuf = this.subarray(start, end)\n    newBuf.__proto__ = Buffer.prototype\n  } else {\n    var sliceLen = end - start\n    newBuf = new Buffer(sliceLen, undefined)\n    for (var i = 0; i < sliceLen; i++) {\n      newBuf[i] = this[i + start]\n    }\n  }\n\n  return newBuf\n}\n\n/*\n * Need to make sure that buffer isn't trying to write out of bounds.\n */\nfunction checkOffset (offset, ext, length) {\n  if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n  if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n}\n\nBuffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) {\n  offset = offset | 0\n  byteLength = byteLength | 0\n  if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n  var val = this[offset]\n  var mul = 1\n  var i = 0\n  while (++i < byteLength && (mul *= 0x100)) {\n    val += this[offset + i] * mul\n  }\n\n  return val\n}\n\nBuffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) {\n  offset = offset | 0\n  byteLength = byteLength | 0\n  if (!noAssert) {\n    checkOffset(offset, byteLength, this.length)\n  }\n\n  var val = this[offset + --byteLength]\n  var mul = 1\n  while (byteLength > 0 && (mul *= 0x100)) {\n    val += this[offset + --byteLength] * mul\n  }\n\n  return val\n}\n\nBuffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) {\n  if (!noAssert) checkOffset(offset, 1, this.length)\n  return this[offset]\n}\n\nBuffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) {\n  if (!noAssert) checkOffset(offset, 2, this.length)\n  return this[offset] | (this[offset + 1] << 8)\n}\n\nBuffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) {\n  if (!noAssert) checkOffset(offset, 2, this.length)\n  return (this[offset] << 8) | this[offset + 1]\n}\n\nBuffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) {\n  if (!noAssert) checkOffset(offset, 4, this.length)\n\n  return ((this[offset]) |\n      (this[offset + 1] << 8) |\n      (this[offset + 2] << 16)) +\n      (this[offset + 3] * 0x1000000)\n}\n\nBuffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) {\n  if (!noAssert) checkOffset(offset, 4, this.length)\n\n  return (this[offset] * 0x1000000) +\n    ((this[offset + 1] << 16) |\n    (this[offset + 2] << 8) |\n    this[offset + 3])\n}\n\nBuffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) {\n  offset = offset | 0\n  byteLength = byteLength | 0\n  if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n  var val = this[offset]\n  var mul = 1\n  var i = 0\n  while (++i < byteLength && (mul *= 0x100)) {\n    val += this[offset + i] * mul\n  }\n  mul *= 0x80\n\n  if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n  return val\n}\n\nBuffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) {\n  offset = offset | 0\n  byteLength = byteLength | 0\n  if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n  var i = byteLength\n  var mul = 1\n  var val = this[offset + --i]\n  while (i > 0 && (mul *= 0x100)) {\n    val += this[offset + --i] * mul\n  }\n  mul *= 0x80\n\n  if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n  return val\n}\n\nBuffer.prototype.readInt8 = function readInt8 (offset, noAssert) {\n  if (!noAssert) checkOffset(offset, 1, this.length)\n  if (!(this[offset] & 0x80)) return (this[offset])\n  return ((0xff - this[offset] + 1) * -1)\n}\n\nBuffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) {\n  if (!noAssert) checkOffset(offset, 2, this.length)\n  var val = this[offset] | (this[offset + 1] << 8)\n  return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) {\n  if (!noAssert) checkOffset(offset, 2, this.length)\n  var val = this[offset + 1] | (this[offset] << 8)\n  return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) {\n  if (!noAssert) checkOffset(offset, 4, this.length)\n\n  return (this[offset]) |\n    (this[offset + 1] << 8) |\n    (this[offset + 2] << 16) |\n    (this[offset + 3] << 24)\n}\n\nBuffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) {\n  if (!noAssert) checkOffset(offset, 4, this.length)\n\n  return (this[offset] << 24) |\n    (this[offset + 1] << 16) |\n    (this[offset + 2] << 8) |\n    (this[offset + 3])\n}\n\nBuffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) {\n  if (!noAssert) checkOffset(offset, 4, this.length)\n  return ieee754.read(this, offset, true, 23, 4)\n}\n\nBuffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) {\n  if (!noAssert) checkOffset(offset, 4, this.length)\n  return ieee754.read(this, offset, false, 23, 4)\n}\n\nBuffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) {\n  if (!noAssert) checkOffset(offset, 8, this.length)\n  return ieee754.read(this, offset, true, 52, 8)\n}\n\nBuffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) {\n  if (!noAssert) checkOffset(offset, 8, this.length)\n  return ieee754.read(this, offset, false, 52, 8)\n}\n\nfunction checkInt (buf, value, offset, ext, max, min) {\n  if (!Buffer.isBuffer(buf)) throw new TypeError('\"buffer\" argument must be a Buffer instance')\n  if (value > max || value < min) throw new RangeError('\"value\" argument is out of bounds')\n  if (offset + ext > buf.length) throw new RangeError('Index out of range')\n}\n\nBuffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) {\n  value = +value\n  offset = offset | 0\n  byteLength = byteLength | 0\n  if (!noAssert) {\n    var maxBytes = Math.pow(2, 8 * byteLength) - 1\n    checkInt(this, value, offset, byteLength, maxBytes, 0)\n  }\n\n  var mul = 1\n  var i = 0\n  this[offset] = value & 0xFF\n  while (++i < byteLength && (mul *= 0x100)) {\n    this[offset + i] = (value / mul) & 0xFF\n  }\n\n  return offset + byteLength\n}\n\nBuffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) {\n  value = +value\n  offset = offset | 0\n  byteLength = byteLength | 0\n  if (!noAssert) {\n    var maxBytes = Math.pow(2, 8 * byteLength) - 1\n    checkInt(this, value, offset, byteLength, maxBytes, 0)\n  }\n\n  var i = byteLength - 1\n  var mul = 1\n  this[offset + i] = value & 0xFF\n  while (--i >= 0 && (mul *= 0x100)) {\n    this[offset + i] = (value / mul) & 0xFF\n  }\n\n  return offset + byteLength\n}\n\nBuffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) {\n  value = +value\n  offset = offset | 0\n  if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0)\n  if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)\n  this[offset] = (value & 0xff)\n  return offset + 1\n}\n\nfunction objectWriteUInt16 (buf, value, offset, littleEndian) {\n  if (value < 0) value = 0xffff + value + 1\n  for (var i = 0, j = Math.min(buf.length - offset, 2); i < j; i++) {\n    buf[offset + i] = (value & (0xff << (8 * (littleEndian ? i : 1 - i)))) >>>\n      (littleEndian ? i : 1 - i) * 8\n  }\n}\n\nBuffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) {\n  value = +value\n  offset = offset | 0\n  if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n  if (Buffer.TYPED_ARRAY_SUPPORT) {\n    this[offset] = (value & 0xff)\n    this[offset + 1] = (value >>> 8)\n  } else {\n    objectWriteUInt16(this, value, offset, true)\n  }\n  return offset + 2\n}\n\nBuffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) {\n  value = +value\n  offset = offset | 0\n  if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n  if (Buffer.TYPED_ARRAY_SUPPORT) {\n    this[offset] = (value >>> 8)\n    this[offset + 1] = (value & 0xff)\n  } else {\n    objectWriteUInt16(this, value, offset, false)\n  }\n  return offset + 2\n}\n\nfunction objectWriteUInt32 (buf, value, offset, littleEndian) {\n  if (value < 0) value = 0xffffffff + value + 1\n  for (var i = 0, j = Math.min(buf.length - offset, 4); i < j; i++) {\n    buf[offset + i] = (value >>> (littleEndian ? i : 3 - i) * 8) & 0xff\n  }\n}\n\nBuffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) {\n  value = +value\n  offset = offset | 0\n  if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n  if (Buffer.TYPED_ARRAY_SUPPORT) {\n    this[offset + 3] = (value >>> 24)\n    this[offset + 2] = (value >>> 16)\n    this[offset + 1] = (value >>> 8)\n    this[offset] = (value & 0xff)\n  } else {\n    objectWriteUInt32(this, value, offset, true)\n  }\n  return offset + 4\n}\n\nBuffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) {\n  value = +value\n  offset = offset | 0\n  if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n  if (Buffer.TYPED_ARRAY_SUPPORT) {\n    this[offset] = (value >>> 24)\n    this[offset + 1] = (value >>> 16)\n    this[offset + 2] = (value >>> 8)\n    this[offset + 3] = (value & 0xff)\n  } else {\n    objectWriteUInt32(this, value, offset, false)\n  }\n  return offset + 4\n}\n\nBuffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) {\n  value = +value\n  offset = offset | 0\n  if (!noAssert) {\n    var limit = Math.pow(2, 8 * byteLength - 1)\n\n    checkInt(this, value, offset, byteLength, limit - 1, -limit)\n  }\n\n  var i = 0\n  var mul = 1\n  var sub = 0\n  this[offset] = value & 0xFF\n  while (++i < byteLength && (mul *= 0x100)) {\n    if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {\n      sub = 1\n    }\n    this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n  }\n\n  return offset + byteLength\n}\n\nBuffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) {\n  value = +value\n  offset = offset | 0\n  if (!noAssert) {\n    var limit = Math.pow(2, 8 * byteLength - 1)\n\n    checkInt(this, value, offset, byteLength, limit - 1, -limit)\n  }\n\n  var i = byteLength - 1\n  var mul = 1\n  var sub = 0\n  this[offset + i] = value & 0xFF\n  while (--i >= 0 && (mul *= 0x100)) {\n    if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {\n      sub = 1\n    }\n    this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n  }\n\n  return offset + byteLength\n}\n\nBuffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) {\n  value = +value\n  offset = offset | 0\n  if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80)\n  if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)\n  if (value < 0) value = 0xff + value + 1\n  this[offset] = (value & 0xff)\n  return offset + 1\n}\n\nBuffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) {\n  value = +value\n  offset = offset | 0\n  if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n  if (Buffer.TYPED_ARRAY_SUPPORT) {\n    this[offset] = (value & 0xff)\n    this[offset + 1] = (value >>> 8)\n  } else {\n    objectWriteUInt16(this, value, offset, true)\n  }\n  return offset + 2\n}\n\nBuffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) {\n  value = +value\n  offset = offset | 0\n  if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n  if (Buffer.TYPED_ARRAY_SUPPORT) {\n    this[offset] = (value >>> 8)\n    this[offset + 1] = (value & 0xff)\n  } else {\n    objectWriteUInt16(this, value, offset, false)\n  }\n  return offset + 2\n}\n\nBuffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) {\n  value = +value\n  offset = offset | 0\n  if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n  if (Buffer.TYPED_ARRAY_SUPPORT) {\n    this[offset] = (value & 0xff)\n    this[offset + 1] = (value >>> 8)\n    this[offset + 2] = (value >>> 16)\n    this[offset + 3] = (value >>> 24)\n  } else {\n    objectWriteUInt32(this, value, offset, true)\n  }\n  return offset + 4\n}\n\nBuffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) {\n  value = +value\n  offset = offset | 0\n  if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n  if (value < 0) value = 0xffffffff + value + 1\n  if (Buffer.TYPED_ARRAY_SUPPORT) {\n    this[offset] = (value >>> 24)\n    this[offset + 1] = (value >>> 16)\n    this[offset + 2] = (value >>> 8)\n    this[offset + 3] = (value & 0xff)\n  } else {\n    objectWriteUInt32(this, value, offset, false)\n  }\n  return offset + 4\n}\n\nfunction checkIEEE754 (buf, value, offset, ext, max, min) {\n  if (offset + ext > buf.length) throw new RangeError('Index out of range')\n  if (offset < 0) throw new RangeError('Index out of range')\n}\n\nfunction writeFloat (buf, value, offset, littleEndian, noAssert) {\n  if (!noAssert) {\n    checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38)\n  }\n  ieee754.write(buf, value, offset, littleEndian, 23, 4)\n  return offset + 4\n}\n\nBuffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) {\n  return writeFloat(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) {\n  return writeFloat(this, value, offset, false, noAssert)\n}\n\nfunction writeDouble (buf, value, offset, littleEndian, noAssert) {\n  if (!noAssert) {\n    checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308)\n  }\n  ieee754.write(buf, value, offset, littleEndian, 52, 8)\n  return offset + 8\n}\n\nBuffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) {\n  return writeDouble(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) {\n  return writeDouble(this, value, offset, false, noAssert)\n}\n\n// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)\nBuffer.prototype.copy = function copy (target, targetStart, start, end) {\n  if (!start) start = 0\n  if (!end && end !== 0) end = this.length\n  if (targetStart >= target.length) targetStart = target.length\n  if (!targetStart) targetStart = 0\n  if (end > 0 && end < start) end = start\n\n  // Copy 0 bytes; we're done\n  if (end === start) return 0\n  if (target.length === 0 || this.length === 0) return 0\n\n  // Fatal error conditions\n  if (targetStart < 0) {\n    throw new RangeError('targetStart out of bounds')\n  }\n  if (start < 0 || start >= this.length) throw new RangeError('sourceStart out of bounds')\n  if (end < 0) throw new RangeError('sourceEnd out of bounds')\n\n  // Are we oob?\n  if (end > this.length) end = this.length\n  if (target.length - targetStart < end - start) {\n    end = target.length - targetStart + start\n  }\n\n  var len = end - start\n  var i\n\n  if (this === target && start < targetStart && targetStart < end) {\n    // descending copy from end\n    for (i = len - 1; i >= 0; i--) {\n      target[i + targetStart] = this[i + start]\n    }\n  } else if (len < 1000 || !Buffer.TYPED_ARRAY_SUPPORT) {\n    // ascending copy from start\n    for (i = 0; i < len; i++) {\n      target[i + targetStart] = this[i + start]\n    }\n  } else {\n    Uint8Array.prototype.set.call(\n      target,\n      this.subarray(start, start + len),\n      targetStart\n    )\n  }\n\n  return len\n}\n\n// Usage:\n//    buffer.fill(number[, offset[, end]])\n//    buffer.fill(buffer[, offset[, end]])\n//    buffer.fill(string[, offset[, end]][, encoding])\nBuffer.prototype.fill = function fill (val, start, end, encoding) {\n  // Handle string cases:\n  if (typeof val === 'string') {\n    if (typeof start === 'string') {\n      encoding = start\n      start = 0\n      end = this.length\n    } else if (typeof end === 'string') {\n      encoding = end\n      end = this.length\n    }\n    if (val.length === 1) {\n      var code = val.charCodeAt(0)\n      if (code < 256) {\n        val = code\n      }\n    }\n    if (encoding !== undefined && typeof encoding !== 'string') {\n      throw new TypeError('encoding must be a string')\n    }\n    if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {\n      throw new TypeError('Unknown encoding: ' + encoding)\n    }\n  } else if (typeof val === 'number') {\n    val = val & 255\n  }\n\n  // Invalid ranges are not set to a default, so can range check early.\n  if (start < 0 || this.length < start || this.length < end) {\n    throw new RangeError('Out of range index')\n  }\n\n  if (end <= start) {\n    return this\n  }\n\n  start = start >>> 0\n  end = end === undefined ? this.length : end >>> 0\n\n  if (!val) val = 0\n\n  var i\n  if (typeof val === 'number') {\n    for (i = start; i < end; i++) {\n      this[i] = val\n    }\n  } else {\n    var bytes = Buffer.isBuffer(val)\n      ? val\n      : utf8ToBytes(new Buffer(val, encoding).toString())\n    var len = bytes.length\n    for (i = 0; i < end - start; i++) {\n      this[i + start] = bytes[i % len]\n    }\n  }\n\n  return this\n}\n\n// HELPER FUNCTIONS\n// ================\n\nvar INVALID_BASE64_RE = /[^+\\/0-9A-Za-z-_]/g\n\nfunction base64clean (str) {\n  // Node strips out invalid characters like \\n and \\t from the string, base64-js does not\n  str = stringtrim(str).replace(INVALID_BASE64_RE, '')\n  // Node converts strings with length < 2 to ''\n  if (str.length < 2) return ''\n  // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not\n  while (str.length % 4 !== 0) {\n    str = str + '='\n  }\n  return str\n}\n\nfunction stringtrim (str) {\n  if (str.trim) return str.trim()\n  return str.replace(/^\\s+|\\s+$/g, '')\n}\n\nfunction toHex (n) {\n  if (n < 16) return '0' + n.toString(16)\n  return n.toString(16)\n}\n\nfunction utf8ToBytes (string, units) {\n  units = units || Infinity\n  var codePoint\n  var length = string.length\n  var leadSurrogate = null\n  var bytes = []\n\n  for (var i = 0; i < length; i++) {\n    codePoint = string.charCodeAt(i)\n\n    // is surrogate component\n    if (codePoint > 0xD7FF && codePoint < 0xE000) {\n      // last char was a lead\n      if (!leadSurrogate) {\n        // no lead yet\n        if (codePoint > 0xDBFF) {\n          // unexpected trail\n          if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n          continue\n        } else if (i + 1 === length) {\n          // unpaired lead\n          if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n          continue\n        }\n\n        // valid lead\n        leadSurrogate = codePoint\n\n        continue\n      }\n\n      // 2 leads in a row\n      if (codePoint < 0xDC00) {\n        if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n        leadSurrogate = codePoint\n        continue\n      }\n\n      // valid surrogate pair\n      codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000\n    } else if (leadSurrogate) {\n      // valid bmp char, but last char was a lead\n      if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n    }\n\n    leadSurrogate = null\n\n    // encode utf8\n    if (codePoint < 0x80) {\n      if ((units -= 1) < 0) break\n      bytes.push(codePoint)\n    } else if (codePoint < 0x800) {\n      if ((units -= 2) < 0) break\n      bytes.push(\n        codePoint >> 0x6 | 0xC0,\n        codePoint & 0x3F | 0x80\n      )\n    } else if (codePoint < 0x10000) {\n      if ((units -= 3) < 0) break\n      bytes.push(\n        codePoint >> 0xC | 0xE0,\n        codePoint >> 0x6 & 0x3F | 0x80,\n        codePoint & 0x3F | 0x80\n      )\n    } else if (codePoint < 0x110000) {\n      if ((units -= 4) < 0) break\n      bytes.push(\n        codePoint >> 0x12 | 0xF0,\n        codePoint >> 0xC & 0x3F | 0x80,\n        codePoint >> 0x6 & 0x3F | 0x80,\n        codePoint & 0x3F | 0x80\n      )\n    } else {\n      throw new Error('Invalid code point')\n    }\n  }\n\n  return bytes\n}\n\nfunction asciiToBytes (str) {\n  var byteArray = []\n  for (var i = 0; i < str.length; i++) {\n    // Node's code seems to be doing this and not & 0x7F..\n    byteArray.push(str.charCodeAt(i) & 0xFF)\n  }\n  return byteArray\n}\n\nfunction utf16leToBytes (str, units) {\n  var c, hi, lo\n  var byteArray = []\n  for (var i = 0; i < str.length; i++) {\n    if ((units -= 2) < 0) break\n\n    c = str.charCodeAt(i)\n    hi = c >> 8\n    lo = c % 256\n    byteArray.push(lo)\n    byteArray.push(hi)\n  }\n\n  return byteArray\n}\n\nfunction base64ToBytes (str) {\n  return base64.toByteArray(base64clean(str))\n}\n\nfunction blitBuffer (src, dst, offset, length) {\n  for (var i = 0; i < length; i++) {\n    if ((i + offset >= dst.length) || (i >= src.length)) break\n    dst[i + offset] = src[i]\n  }\n  return i\n}\n\nfunction isnan (val) {\n  return val !== val // eslint-disable-line no-self-compare\n}\n\n}).call(this,typeof global !== \"undefined\" ? global : typeof self !== \"undefined\" ? self : typeof window !== \"undefined\" ? window : {})\n},{\"base64-js\":74,\"ieee754\":75,\"isarray\":76}],74:[function(require,module,exports){\n'use strict'\n\nexports.toByteArray = toByteArray\nexports.fromByteArray = fromByteArray\n\nvar lookup = []\nvar revLookup = []\nvar Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array\n\nfunction init () {\n  var code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'\n  for (var i = 0, len = code.length; i < len; ++i) {\n    lookup[i] = code[i]\n    revLookup[code.charCodeAt(i)] = i\n  }\n\n  revLookup['-'.charCodeAt(0)] = 62\n  revLookup['_'.charCodeAt(0)] = 63\n}\n\ninit()\n\nfunction toByteArray (b64) {\n  var i, j, l, tmp, placeHolders, arr\n  var len = b64.length\n\n  if (len % 4 > 0) {\n    throw new Error('Invalid string. Length must be a multiple of 4')\n  }\n\n  // the number of equal signs (place holders)\n  // if there are two placeholders, than the two characters before it\n  // represent one byte\n  // if there is only one, then the three characters before it represent 2 bytes\n  // this is just a cheap hack to not do indexOf twice\n  placeHolders = b64[len - 2] === '=' ? 2 : b64[len - 1] === '=' ? 1 : 0\n\n  // base64 is 4/3 + up to two characters of the original data\n  arr = new Arr(len * 3 / 4 - placeHolders)\n\n  // if there are placeholders, only get up to the last complete 4 chars\n  l = placeHolders > 0 ? len - 4 : len\n\n  var L = 0\n\n  for (i = 0, j = 0; i < l; i += 4, j += 3) {\n    tmp = (revLookup[b64.charCodeAt(i)] << 18) | (revLookup[b64.charCodeAt(i + 1)] << 12) | (revLookup[b64.charCodeAt(i + 2)] << 6) | revLookup[b64.charCodeAt(i + 3)]\n    arr[L++] = (tmp >> 16) & 0xFF\n    arr[L++] = (tmp >> 8) & 0xFF\n    arr[L++] = tmp & 0xFF\n  }\n\n  if (placeHolders === 2) {\n    tmp = (revLookup[b64.charCodeAt(i)] << 2) | (revLookup[b64.charCodeAt(i + 1)] >> 4)\n    arr[L++] = tmp & 0xFF\n  } else if (placeHolders === 1) {\n    tmp = (revLookup[b64.charCodeAt(i)] << 10) | (revLookup[b64.charCodeAt(i + 1)] << 4) | (revLookup[b64.charCodeAt(i + 2)] >> 2)\n    arr[L++] = (tmp >> 8) & 0xFF\n    arr[L++] = tmp & 0xFF\n  }\n\n  return arr\n}\n\nfunction tripletToBase64 (num) {\n  return lookup[num >> 18 & 0x3F] + lookup[num >> 12 & 0x3F] + lookup[num >> 6 & 0x3F] + lookup[num & 0x3F]\n}\n\nfunction encodeChunk (uint8, start, end) {\n  var tmp\n  var output = []\n  for (var i = start; i < end; i += 3) {\n    tmp = (uint8[i] << 16) + (uint8[i + 1] << 8) + (uint8[i + 2])\n    output.push(tripletToBase64(tmp))\n  }\n  return output.join('')\n}\n\nfunction fromByteArray (uint8) {\n  var tmp\n  var len = uint8.length\n  var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes\n  var output = ''\n  var parts = []\n  var maxChunkLength = 16383 // must be multiple of 3\n\n  // go through the array every three bytes, we'll deal with trailing stuff later\n  for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {\n    parts.push(encodeChunk(uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)))\n  }\n\n  // pad the end with zeros, but make sure to not forget the extra bytes\n  if (extraBytes === 1) {\n    tmp = uint8[len - 1]\n    output += lookup[tmp >> 2]\n    output += lookup[(tmp << 4) & 0x3F]\n    output += '=='\n  } else if (extraBytes === 2) {\n    tmp = (uint8[len - 2] << 8) + (uint8[len - 1])\n    output += lookup[tmp >> 10]\n    output += lookup[(tmp >> 4) & 0x3F]\n    output += lookup[(tmp << 2) & 0x3F]\n    output += '='\n  }\n\n  parts.push(output)\n\n  return parts.join('')\n}\n\n},{}],75:[function(require,module,exports){\nexports.read = function (buffer, offset, isLE, mLen, nBytes) {\n  var e, m\n  var eLen = nBytes * 8 - mLen - 1\n  var eMax = (1 << eLen) - 1\n  var eBias = eMax >> 1\n  var nBits = -7\n  var i = isLE ? (nBytes - 1) : 0\n  var d = isLE ? -1 : 1\n  var s = buffer[offset + i]\n\n  i += d\n\n  e = s & ((1 << (-nBits)) - 1)\n  s >>= (-nBits)\n  nBits += eLen\n  for (; nBits > 0; e = e * 256 + buffer[offset + i], i += d, nBits -= 8) {}\n\n  m = e & ((1 << (-nBits)) - 1)\n  e >>= (-nBits)\n  nBits += mLen\n  for (; nBits > 0; m = m * 256 + buffer[offset + i], i += d, nBits -= 8) {}\n\n  if (e === 0) {\n    e = 1 - eBias\n  } else if (e === eMax) {\n    return m ? NaN : ((s ? -1 : 1) * Infinity)\n  } else {\n    m = m + Math.pow(2, mLen)\n    e = e - eBias\n  }\n  return (s ? -1 : 1) * m * Math.pow(2, e - mLen)\n}\n\nexports.write = function (buffer, value, offset, isLE, mLen, nBytes) {\n  var e, m, c\n  var eLen = nBytes * 8 - mLen - 1\n  var eMax = (1 << eLen) - 1\n  var eBias = eMax >> 1\n  var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0)\n  var i = isLE ? 0 : (nBytes - 1)\n  var d = isLE ? 1 : -1\n  var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0\n\n  value = Math.abs(value)\n\n  if (isNaN(value) || value === Infinity) {\n    m = isNaN(value) ? 1 : 0\n    e = eMax\n  } else {\n    e = Math.floor(Math.log(value) / Math.LN2)\n    if (value * (c = Math.pow(2, -e)) < 1) {\n      e--\n      c *= 2\n    }\n    if (e + eBias >= 1) {\n      value += rt / c\n    } else {\n      value += rt * Math.pow(2, 1 - eBias)\n    }\n    if (value * c >= 2) {\n      e++\n      c /= 2\n    }\n\n    if (e + eBias >= eMax) {\n      m = 0\n      e = eMax\n    } else if (e + eBias >= 1) {\n      m = (value * c - 1) * Math.pow(2, mLen)\n      e = e + eBias\n    } else {\n      m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen)\n      e = 0\n    }\n  }\n\n  for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}\n\n  e = (e << mLen) | m\n  eLen += mLen\n  for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}\n\n  buffer[offset + i - d] |= s * 128\n}\n\n},{}],76:[function(require,module,exports){\nvar toString = {}.toString;\n\nmodule.exports = Array.isArray || function (arr) {\n  return toString.call(arr) == '[object Array]';\n};\n\n},{}],77:[function(require,module,exports){\n// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\nfunction EventEmitter() {\n  this._events = this._events || {};\n  this._maxListeners = this._maxListeners || undefined;\n}\nmodule.exports = EventEmitter;\n\n// Backwards-compat with node 0.10.x\nEventEmitter.EventEmitter = EventEmitter;\n\nEventEmitter.prototype._events = undefined;\nEventEmitter.prototype._maxListeners = undefined;\n\n// By default EventEmitters will print a warning if more than 10 listeners are\n// added to it. This is a useful default which helps finding memory leaks.\nEventEmitter.defaultMaxListeners = 10;\n\n// Obviously not all Emitters should be limited to 10. This function allows\n// that to be increased. Set to zero for unlimited.\nEventEmitter.prototype.setMaxListeners = function(n) {\n  if (!isNumber(n) || n < 0 || isNaN(n))\n    throw TypeError('n must be a positive number');\n  this._maxListeners = n;\n  return this;\n};\n\nEventEmitter.prototype.emit = function(type) {\n  var er, handler, len, args, i, listeners;\n\n  if (!this._events)\n    this._events = {};\n\n  // If there is no 'error' event listener then throw.\n  if (type === 'error') {\n    if (!this._events.error ||\n        (isObject(this._events.error) && !this._events.error.length)) {\n      er = arguments[1];\n      if (er instanceof Error) {\n        throw er; // Unhandled 'error' event\n      }\n      throw TypeError('Uncaught, unspecified \"error\" event.');\n    }\n  }\n\n  handler = this._events[type];\n\n  if (isUndefined(handler))\n    return false;\n\n  if (isFunction(handler)) {\n    switch (arguments.length) {\n      // fast cases\n      case 1:\n        handler.call(this);\n        break;\n      case 2:\n        handler.call(this, arguments[1]);\n        break;\n      case 3:\n        handler.call(this, arguments[1], arguments[2]);\n        break;\n      // slower\n      default:\n        args = Array.prototype.slice.call(arguments, 1);\n        handler.apply(this, args);\n    }\n  } else if (isObject(handler)) {\n    args = Array.prototype.slice.call(arguments, 1);\n    listeners = handler.slice();\n    len = listeners.length;\n    for (i = 0; i < len; i++)\n      listeners[i].apply(this, args);\n  }\n\n  return true;\n};\n\nEventEmitter.prototype.addListener = function(type, listener) {\n  var m;\n\n  if (!isFunction(listener))\n    throw TypeError('listener must be a function');\n\n  if (!this._events)\n    this._events = {};\n\n  // To avoid recursion in the case that type === \"newListener\"! Before\n  // adding it to the listeners, first emit \"newListener\".\n  if (this._events.newListener)\n    this.emit('newListener', type,\n              isFunction(listener.listener) ?\n              listener.listener : listener);\n\n  if (!this._events[type])\n    // Optimize the case of one listener. Don't need the extra array object.\n    this._events[type] = listener;\n  else if (isObject(this._events[type]))\n    // If we've already got an array, just append.\n    this._events[type].push(listener);\n  else\n    // Adding the second element, need to change to array.\n    this._events[type] = [this._events[type], listener];\n\n  // Check for listener leak\n  if (isObject(this._events[type]) && !this._events[type].warned) {\n    if (!isUndefined(this._maxListeners)) {\n      m = this._maxListeners;\n    } else {\n      m = EventEmitter.defaultMaxListeners;\n    }\n\n    if (m && m > 0 && this._events[type].length > m) {\n      this._events[type].warned = true;\n      console.error('(node) warning: possible EventEmitter memory ' +\n                    'leak detected. %d listeners added. ' +\n                    'Use emitter.setMaxListeners() to increase limit.',\n                    this._events[type].length);\n      if (typeof console.trace === 'function') {\n        // not supported in IE 10\n        console.trace();\n      }\n    }\n  }\n\n  return this;\n};\n\nEventEmitter.prototype.on = EventEmitter.prototype.addListener;\n\nEventEmitter.prototype.once = function(type, listener) {\n  if (!isFunction(listener))\n    throw TypeError('listener must be a function');\n\n  var fired = false;\n\n  function g() {\n    this.removeListener(type, g);\n\n    if (!fired) {\n      fired = true;\n      listener.apply(this, arguments);\n    }\n  }\n\n  g.listener = listener;\n  this.on(type, g);\n\n  return this;\n};\n\n// emits a 'removeListener' event iff the listener was removed\nEventEmitter.prototype.removeListener = function(type, listener) {\n  var list, position, length, i;\n\n  if (!isFunction(listener))\n    throw TypeError('listener must be a function');\n\n  if (!this._events || !this._events[type])\n    return this;\n\n  list = this._events[type];\n  length = list.length;\n  position = -1;\n\n  if (list === listener ||\n      (isFunction(list.listener) && list.listener === listener)) {\n    delete this._events[type];\n    if (this._events.removeListener)\n      this.emit('removeListener', type, listener);\n\n  } else if (isObject(list)) {\n    for (i = length; i-- > 0;) {\n      if (list[i] === listener ||\n          (list[i].listener && list[i].listener === listener)) {\n        position = i;\n        break;\n      }\n    }\n\n    if (position < 0)\n      return this;\n\n    if (list.length === 1) {\n      list.length = 0;\n      delete this._events[type];\n    } else {\n      list.splice(position, 1);\n    }\n\n    if (this._events.removeListener)\n      this.emit('removeListener', type, listener);\n  }\n\n  return this;\n};\n\nEventEmitter.prototype.removeAllListeners = function(type) {\n  var key, listeners;\n\n  if (!this._events)\n    return this;\n\n  // not listening for removeListener, no need to emit\n  if (!this._events.removeListener) {\n    if (arguments.length === 0)\n      this._events = {};\n    else if (this._events[type])\n      delete this._events[type];\n    return this;\n  }\n\n  // emit removeListener for all listeners on all events\n  if (arguments.length === 0) {\n    for (key in this._events) {\n      if (key === 'removeListener') continue;\n      this.removeAllListeners(key);\n    }\n    this.removeAllListeners('removeListener');\n    this._events = {};\n    return this;\n  }\n\n  listeners = this._events[type];\n\n  if (isFunction(listeners)) {\n    this.removeListener(type, listeners);\n  } else if (listeners) {\n    // LIFO order\n    while (listeners.length)\n      this.removeListener(type, listeners[listeners.length - 1]);\n  }\n  delete this._events[type];\n\n  return this;\n};\n\nEventEmitter.prototype.listeners = function(type) {\n  var ret;\n  if (!this._events || !this._events[type])\n    ret = [];\n  else if (isFunction(this._events[type]))\n    ret = [this._events[type]];\n  else\n    ret = this._events[type].slice();\n  return ret;\n};\n\nEventEmitter.prototype.listenerCount = function(type) {\n  if (this._events) {\n    var evlistener = this._events[type];\n\n    if (isFunction(evlistener))\n      return 1;\n    else if (evlistener)\n      return evlistener.length;\n  }\n  return 0;\n};\n\nEventEmitter.listenerCount = function(emitter, type) {\n  return emitter.listenerCount(type);\n};\n\nfunction isFunction(arg) {\n  return typeof arg === 'function';\n}\n\nfunction isNumber(arg) {\n  return typeof arg === 'number';\n}\n\nfunction isObject(arg) {\n  return typeof arg === 'object' && arg !== null;\n}\n\nfunction isUndefined(arg) {\n  return arg === void 0;\n}\n\n},{}],78:[function(require,module,exports){\nif (typeof Object.create === 'function') {\n  // implementation from standard node.js 'util' module\n  module.exports = function inherits(ctor, superCtor) {\n    ctor.super_ = superCtor\n    ctor.prototype = Object.create(superCtor.prototype, {\n      constructor: {\n        value: ctor,\n        enumerable: false,\n        writable: true,\n        configurable: true\n      }\n    });\n  };\n} else {\n  // old school shim for old browsers\n  module.exports = function inherits(ctor, superCtor) {\n    ctor.super_ = superCtor\n    var TempCtor = function () {}\n    TempCtor.prototype = superCtor.prototype\n    ctor.prototype = new TempCtor()\n    ctor.prototype.constructor = ctor\n  }\n}\n\n},{}],79:[function(require,module,exports){\n/**\n * Determine if an object is Buffer\n *\n * Author:   Feross Aboukhadijeh <feross@feross.org> <http://feross.org>\n * License:  MIT\n *\n * `npm install is-buffer`\n */\n\nmodule.exports = function (obj) {\n  return !!(obj != null &&\n    (obj._isBuffer || // For Safari 5-7 (missing Object.prototype.constructor)\n      (obj.constructor &&\n      typeof obj.constructor.isBuffer === 'function' &&\n      obj.constructor.isBuffer(obj))\n    ))\n}\n\n},{}],80:[function(require,module,exports){\n(function (process){\n// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n// resolves . and .. elements in a path array with directory names there\n// must be no slashes, empty elements, or device names (c:\\) in the array\n// (so also no leading and trailing slashes - it does not distinguish\n// relative and absolute paths)\nfunction normalizeArray(parts, allowAboveRoot) {\n  // if the path tries to go above the root, `up` ends up > 0\n  var up = 0;\n  for (var i = parts.length - 1; i >= 0; i--) {\n    var last = parts[i];\n    if (last === '.') {\n      parts.splice(i, 1);\n    } else if (last === '..') {\n      parts.splice(i, 1);\n      up++;\n    } else if (up) {\n      parts.splice(i, 1);\n      up--;\n    }\n  }\n\n  // if the path is allowed to go above the root, restore leading ..s\n  if (allowAboveRoot) {\n    for (; up--; up) {\n      parts.unshift('..');\n    }\n  }\n\n  return parts;\n}\n\n// Split a filename into [root, dir, basename, ext], unix version\n// 'root' is just a slash, or nothing.\nvar splitPathRe =\n    /^(\\/?|)([\\s\\S]*?)((?:\\.{1,2}|[^\\/]+?|)(\\.[^.\\/]*|))(?:[\\/]*)$/;\nvar splitPath = function(filename) {\n  return splitPathRe.exec(filename).slice(1);\n};\n\n// path.resolve([from ...], to)\n// posix version\nexports.resolve = function() {\n  var resolvedPath = '',\n      resolvedAbsolute = false;\n\n  for (var i = arguments.length - 1; i >= -1 && !resolvedAbsolute; i--) {\n    var path = (i >= 0) ? arguments[i] : process.cwd();\n\n    // Skip empty and invalid entries\n    if (typeof path !== 'string') {\n      throw new TypeError('Arguments to path.resolve must be strings');\n    } else if (!path) {\n      continue;\n    }\n\n    resolvedPath = path + '/' + resolvedPath;\n    resolvedAbsolute = path.charAt(0) === '/';\n  }\n\n  // At this point the path should be resolved to a full absolute path, but\n  // handle relative paths to be safe (might happen when process.cwd() fails)\n\n  // Normalize the path\n  resolvedPath = normalizeArray(filter(resolvedPath.split('/'), function(p) {\n    return !!p;\n  }), !resolvedAbsolute).join('/');\n\n  return ((resolvedAbsolute ? '/' : '') + resolvedPath) || '.';\n};\n\n// path.normalize(path)\n// posix version\nexports.normalize = function(path) {\n  var isAbsolute = exports.isAbsolute(path),\n      trailingSlash = substr(path, -1) === '/';\n\n  // Normalize the path\n  path = normalizeArray(filter(path.split('/'), function(p) {\n    return !!p;\n  }), !isAbsolute).join('/');\n\n  if (!path && !isAbsolute) {\n    path = '.';\n  }\n  if (path && trailingSlash) {\n    path += '/';\n  }\n\n  return (isAbsolute ? '/' : '') + path;\n};\n\n// posix version\nexports.isAbsolute = function(path) {\n  return path.charAt(0) === '/';\n};\n\n// posix version\nexports.join = function() {\n  var paths = Array.prototype.slice.call(arguments, 0);\n  return exports.normalize(filter(paths, function(p, index) {\n    if (typeof p !== 'string') {\n      throw new TypeError('Arguments to path.join must be strings');\n    }\n    return p;\n  }).join('/'));\n};\n\n\n// path.relative(from, to)\n// posix version\nexports.relative = function(from, to) {\n  from = exports.resolve(from).substr(1);\n  to = exports.resolve(to).substr(1);\n\n  function trim(arr) {\n    var start = 0;\n    for (; start < arr.length; start++) {\n      if (arr[start] !== '') break;\n    }\n\n    var end = arr.length - 1;\n    for (; end >= 0; end--) {\n      if (arr[end] !== '') break;\n    }\n\n    if (start > end) return [];\n    return arr.slice(start, end - start + 1);\n  }\n\n  var fromParts = trim(from.split('/'));\n  var toParts = trim(to.split('/'));\n\n  var length = Math.min(fromParts.length, toParts.length);\n  var samePartsLength = length;\n  for (var i = 0; i < length; i++) {\n    if (fromParts[i] !== toParts[i]) {\n      samePartsLength = i;\n      break;\n    }\n  }\n\n  var outputParts = [];\n  for (var i = samePartsLength; i < fromParts.length; i++) {\n    outputParts.push('..');\n  }\n\n  outputParts = outputParts.concat(toParts.slice(samePartsLength));\n\n  return outputParts.join('/');\n};\n\nexports.sep = '/';\nexports.delimiter = ':';\n\nexports.dirname = function(path) {\n  var result = splitPath(path),\n      root = result[0],\n      dir = result[1];\n\n  if (!root && !dir) {\n    // No dirname whatsoever\n    return '.';\n  }\n\n  if (dir) {\n    // It has a dirname, strip trailing slash\n    dir = dir.substr(0, dir.length - 1);\n  }\n\n  return root + dir;\n};\n\n\nexports.basename = function(path, ext) {\n  var f = splitPath(path)[2];\n  // TODO: make this comparison case-insensitive on windows?\n  if (ext && f.substr(-1 * ext.length) === ext) {\n    f = f.substr(0, f.length - ext.length);\n  }\n  return f;\n};\n\n\nexports.extname = function(path) {\n  return splitPath(path)[3];\n};\n\nfunction filter (xs, f) {\n    if (xs.filter) return xs.filter(f);\n    var res = [];\n    for (var i = 0; i < xs.length; i++) {\n        if (f(xs[i], i, xs)) res.push(xs[i]);\n    }\n    return res;\n}\n\n// String.prototype.substr - negative index don't work in IE8\nvar substr = 'ab'.substr(-1) === 'b'\n    ? function (str, start, len) { return str.substr(start, len) }\n    : function (str, start, len) {\n        if (start < 0) start = str.length + start;\n        return str.substr(start, len);\n    }\n;\n\n}).call(this,require('_process'))\n},{\"_process\":81}],81:[function(require,module,exports){\n// shim for using process in browser\n\nvar process = module.exports = {};\n\n// cached from whatever global is present so that test runners that stub it\n// don't break things.  But we need to wrap it in a try catch in case it is\n// wrapped in strict mode code which doesn't define any globals.  It's inside a\n// function because try/catches deoptimize in certain engines.\n\nvar cachedSetTimeout;\nvar cachedClearTimeout;\n\n(function () {\n  try {\n    cachedSetTimeout = setTimeout;\n  } catch (e) {\n    cachedSetTimeout = function () {\n      throw new Error('setTimeout is not defined');\n    }\n  }\n  try {\n    cachedClearTimeout = clearTimeout;\n  } catch (e) {\n    cachedClearTimeout = function () {\n      throw new Error('clearTimeout is not defined');\n    }\n  }\n} ())\nvar queue = [];\nvar draining = false;\nvar currentQueue;\nvar queueIndex = -1;\n\nfunction cleanUpNextTick() {\n    if (!draining || !currentQueue) {\n        return;\n    }\n    draining = false;\n    if (currentQueue.length) {\n        queue = currentQueue.concat(queue);\n    } else {\n        queueIndex = -1;\n    }\n    if (queue.length) {\n        drainQueue();\n    }\n}\n\nfunction drainQueue() {\n    if (draining) {\n        return;\n    }\n    var timeout = cachedSetTimeout(cleanUpNextTick);\n    draining = true;\n\n    var len = queue.length;\n    while(len) {\n        currentQueue = queue;\n        queue = [];\n        while (++queueIndex < len) {\n            if (currentQueue) {\n                currentQueue[queueIndex].run();\n            }\n        }\n        queueIndex = -1;\n        len = queue.length;\n    }\n    currentQueue = null;\n    draining = false;\n    cachedClearTimeout(timeout);\n}\n\nprocess.nextTick = function (fun) {\n    var args = new Array(arguments.length - 1);\n    if (arguments.length > 1) {\n        for (var i = 1; i < arguments.length; i++) {\n            args[i - 1] = arguments[i];\n        }\n    }\n    queue.push(new Item(fun, args));\n    if (queue.length === 1 && !draining) {\n        cachedSetTimeout(drainQueue, 0);\n    }\n};\n\n// v8 likes predictible objects\nfunction Item(fun, array) {\n    this.fun = fun;\n    this.array = array;\n}\nItem.prototype.run = function () {\n    this.fun.apply(null, this.array);\n};\nprocess.title = 'browser';\nprocess.browser = true;\nprocess.env = {};\nprocess.argv = [];\nprocess.version = ''; // empty string to avoid regexp issues\nprocess.versions = {};\n\nfunction noop() {}\n\nprocess.on = noop;\nprocess.addListener = noop;\nprocess.once = noop;\nprocess.off = noop;\nprocess.removeListener = noop;\nprocess.removeAllListeners = noop;\nprocess.emit = noop;\n\nprocess.binding = function (name) {\n    throw new Error('process.binding is not supported');\n};\n\nprocess.cwd = function () { return '/' };\nprocess.chdir = function (dir) {\n    throw new Error('process.chdir is not supported');\n};\nprocess.umask = function() { return 0; };\n\n},{}],82:[function(require,module,exports){\nmodule.exports = require(\"./lib/_stream_duplex.js\")\n\n},{\"./lib/_stream_duplex.js\":83}],83:[function(require,module,exports){\n// a duplex stream is just a stream that is both readable and writable.\n// Since JS doesn't have multiple prototypal inheritance, this class\n// prototypally inherits from Readable, and then parasitically from\n// Writable.\n\n'use strict';\n\n/*<replacement>*/\n\nvar objectKeys = Object.keys || function (obj) {\n  var keys = [];\n  for (var key in obj) {\n    keys.push(key);\n  }return keys;\n};\n/*</replacement>*/\n\nmodule.exports = Duplex;\n\n/*<replacement>*/\nvar processNextTick = require('process-nextick-args');\n/*</replacement>*/\n\n/*<replacement>*/\nvar util = require('core-util-is');\nutil.inherits = require('inherits');\n/*</replacement>*/\n\nvar Readable = require('./_stream_readable');\nvar Writable = require('./_stream_writable');\n\nutil.inherits(Duplex, Readable);\n\nvar keys = objectKeys(Writable.prototype);\nfor (var v = 0; v < keys.length; v++) {\n  var method = keys[v];\n  if (!Duplex.prototype[method]) Duplex.prototype[method] = Writable.prototype[method];\n}\n\nfunction Duplex(options) {\n  if (!(this instanceof Duplex)) return new Duplex(options);\n\n  Readable.call(this, options);\n  Writable.call(this, options);\n\n  if (options && options.readable === false) this.readable = false;\n\n  if (options && options.writable === false) this.writable = false;\n\n  this.allowHalfOpen = true;\n  if (options && options.allowHalfOpen === false) this.allowHalfOpen = false;\n\n  this.once('end', onend);\n}\n\n// the no-half-open enforcer\nfunction onend() {\n  // if we allow half-open state, or if the writable side ended,\n  // then we're ok.\n  if (this.allowHalfOpen || this._writableState.ended) return;\n\n  // no more data can be written.\n  // But allow more writes to happen in this tick.\n  processNextTick(onEndNT, this);\n}\n\nfunction onEndNT(self) {\n  self.end();\n}\n\nfunction forEach(xs, f) {\n  for (var i = 0, l = xs.length; i < l; i++) {\n    f(xs[i], i);\n  }\n}\n},{\"./_stream_readable\":85,\"./_stream_writable\":87,\"core-util-is\":89,\"inherits\":78,\"process-nextick-args\":91}],84:[function(require,module,exports){\n// a passthrough stream.\n// basically just the most minimal sort of Transform stream.\n// Every written chunk gets output as-is.\n\n'use strict';\n\nmodule.exports = PassThrough;\n\nvar Transform = require('./_stream_transform');\n\n/*<replacement>*/\nvar util = require('core-util-is');\nutil.inherits = require('inherits');\n/*</replacement>*/\n\nutil.inherits(PassThrough, Transform);\n\nfunction PassThrough(options) {\n  if (!(this instanceof PassThrough)) return new PassThrough(options);\n\n  Transform.call(this, options);\n}\n\nPassThrough.prototype._transform = function (chunk, encoding, cb) {\n  cb(null, chunk);\n};\n},{\"./_stream_transform\":86,\"core-util-is\":89,\"inherits\":78}],85:[function(require,module,exports){\n(function (process){\n'use strict';\n\nmodule.exports = Readable;\n\n/*<replacement>*/\nvar processNextTick = require('process-nextick-args');\n/*</replacement>*/\n\n/*<replacement>*/\nvar isArray = require('isarray');\n/*</replacement>*/\n\nReadable.ReadableState = ReadableState;\n\n/*<replacement>*/\nvar EE = require('events').EventEmitter;\n\nvar EElistenerCount = function (emitter, type) {\n  return emitter.listeners(type).length;\n};\n/*</replacement>*/\n\n/*<replacement>*/\nvar Stream;\n(function () {\n  try {\n    Stream = require('st' + 'ream');\n  } catch (_) {} finally {\n    if (!Stream) Stream = require('events').EventEmitter;\n  }\n})();\n/*</replacement>*/\n\nvar Buffer = require('buffer').Buffer;\n/*<replacement>*/\nvar bufferShim = require('buffer-shims');\n/*</replacement>*/\n\n/*<replacement>*/\nvar util = require('core-util-is');\nutil.inherits = require('inherits');\n/*</replacement>*/\n\n/*<replacement>*/\nvar debugUtil = require('util');\nvar debug = void 0;\nif (debugUtil && debugUtil.debuglog) {\n  debug = debugUtil.debuglog('stream');\n} else {\n  debug = function () {};\n}\n/*</replacement>*/\n\nvar StringDecoder;\n\nutil.inherits(Readable, Stream);\n\nvar hasPrependListener = typeof EE.prototype.prependListener === 'function';\n\nfunction prependListener(emitter, event, fn) {\n  if (hasPrependListener) return emitter.prependListener(event, fn);\n\n  // This is a brutally ugly hack to make sure that our error handler\n  // is attached before any userland ones.  NEVER DO THIS. This is here\n  // only because this code needs to continue to work with older versions\n  // of Node.js that do not include the prependListener() method. The goal\n  // is to eventually remove this hack.\n  if (!emitter._events || !emitter._events[event]) emitter.on(event, fn);else if (isArray(emitter._events[event])) emitter._events[event].unshift(fn);else emitter._events[event] = [fn, emitter._events[event]];\n}\n\nvar Duplex;\nfunction ReadableState(options, stream) {\n  Duplex = Duplex || require('./_stream_duplex');\n\n  options = options || {};\n\n  // object stream flag. Used to make read(n) ignore n and to\n  // make all the buffer merging and length checks go away\n  this.objectMode = !!options.objectMode;\n\n  if (stream instanceof Duplex) this.objectMode = this.objectMode || !!options.readableObjectMode;\n\n  // the point at which it stops calling _read() to fill the buffer\n  // Note: 0 is a valid value, means \"don't call _read preemptively ever\"\n  var hwm = options.highWaterMark;\n  var defaultHwm = this.objectMode ? 16 : 16 * 1024;\n  this.highWaterMark = hwm || hwm === 0 ? hwm : defaultHwm;\n\n  // cast to ints.\n  this.highWaterMark = ~ ~this.highWaterMark;\n\n  this.buffer = [];\n  this.length = 0;\n  this.pipes = null;\n  this.pipesCount = 0;\n  this.flowing = null;\n  this.ended = false;\n  this.endEmitted = false;\n  this.reading = false;\n\n  // a flag to be able to tell if the onwrite cb is called immediately,\n  // or on a later tick.  We set this to true at first, because any\n  // actions that shouldn't happen until \"later\" should generally also\n  // not happen before the first write call.\n  this.sync = true;\n\n  // whenever we return null, then we set a flag to say\n  // that we're awaiting a 'readable' event emission.\n  this.needReadable = false;\n  this.emittedReadable = false;\n  this.readableListening = false;\n  this.resumeScheduled = false;\n\n  // Crypto is kind of old and crusty.  Historically, its default string\n  // encoding is 'binary' so we have to make this configurable.\n  // Everything else in the universe uses 'utf8', though.\n  this.defaultEncoding = options.defaultEncoding || 'utf8';\n\n  // when piping, we only care about 'readable' events that happen\n  // after read()ing all the bytes and not getting any pushback.\n  this.ranOut = false;\n\n  // the number of writers that are awaiting a drain event in .pipe()s\n  this.awaitDrain = 0;\n\n  // if true, a maybeReadMore has been scheduled\n  this.readingMore = false;\n\n  this.decoder = null;\n  this.encoding = null;\n  if (options.encoding) {\n    if (!StringDecoder) StringDecoder = require('string_decoder/').StringDecoder;\n    this.decoder = new StringDecoder(options.encoding);\n    this.encoding = options.encoding;\n  }\n}\n\nvar Duplex;\nfunction Readable(options) {\n  Duplex = Duplex || require('./_stream_duplex');\n\n  if (!(this instanceof Readable)) return new Readable(options);\n\n  this._readableState = new ReadableState(options, this);\n\n  // legacy\n  this.readable = true;\n\n  if (options && typeof options.read === 'function') this._read = options.read;\n\n  Stream.call(this);\n}\n\n// Manually shove something into the read() buffer.\n// This returns true if the highWaterMark has not been hit yet,\n// similar to how Writable.write() returns true if you should\n// write() some more.\nReadable.prototype.push = function (chunk, encoding) {\n  var state = this._readableState;\n\n  if (!state.objectMode && typeof chunk === 'string') {\n    encoding = encoding || state.defaultEncoding;\n    if (encoding !== state.encoding) {\n      chunk = bufferShim.from(chunk, encoding);\n      encoding = '';\n    }\n  }\n\n  return readableAddChunk(this, state, chunk, encoding, false);\n};\n\n// Unshift should *always* be something directly out of read()\nReadable.prototype.unshift = function (chunk) {\n  var state = this._readableState;\n  return readableAddChunk(this, state, chunk, '', true);\n};\n\nReadable.prototype.isPaused = function () {\n  return this._readableState.flowing === false;\n};\n\nfunction readableAddChunk(stream, state, chunk, encoding, addToFront) {\n  var er = chunkInvalid(state, chunk);\n  if (er) {\n    stream.emit('error', er);\n  } else if (chunk === null) {\n    state.reading = false;\n    onEofChunk(stream, state);\n  } else if (state.objectMode || chunk && chunk.length > 0) {\n    if (state.ended && !addToFront) {\n      var e = new Error('stream.push() after EOF');\n      stream.emit('error', e);\n    } else if (state.endEmitted && addToFront) {\n      var _e = new Error('stream.unshift() after end event');\n      stream.emit('error', _e);\n    } else {\n      var skipAdd;\n      if (state.decoder && !addToFront && !encoding) {\n        chunk = state.decoder.write(chunk);\n        skipAdd = !state.objectMode && chunk.length === 0;\n      }\n\n      if (!addToFront) state.reading = false;\n\n      // Don't add to the buffer if we've decoded to an empty string chunk and\n      // we're not in object mode\n      if (!skipAdd) {\n        // if we want the data now, just emit it.\n        if (state.flowing && state.length === 0 && !state.sync) {\n          stream.emit('data', chunk);\n          stream.read(0);\n        } else {\n          // update the buffer info.\n          state.length += state.objectMode ? 1 : chunk.length;\n          if (addToFront) state.buffer.unshift(chunk);else state.buffer.push(chunk);\n\n          if (state.needReadable) emitReadable(stream);\n        }\n      }\n\n      maybeReadMore(stream, state);\n    }\n  } else if (!addToFront) {\n    state.reading = false;\n  }\n\n  return needMoreData(state);\n}\n\n// if it's past the high water mark, we can push in some more.\n// Also, if we have no data yet, we can stand some\n// more bytes.  This is to work around cases where hwm=0,\n// such as the repl.  Also, if the push() triggered a\n// readable event, and the user called read(largeNumber) such that\n// needReadable was set, then we ought to push more, so that another\n// 'readable' event will be triggered.\nfunction needMoreData(state) {\n  return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0);\n}\n\n// backwards compatibility.\nReadable.prototype.setEncoding = function (enc) {\n  if (!StringDecoder) StringDecoder = require('string_decoder/').StringDecoder;\n  this._readableState.decoder = new StringDecoder(enc);\n  this._readableState.encoding = enc;\n  return this;\n};\n\n// Don't raise the hwm > 8MB\nvar MAX_HWM = 0x800000;\nfunction computeNewHighWaterMark(n) {\n  if (n >= MAX_HWM) {\n    n = MAX_HWM;\n  } else {\n    // Get the next highest power of 2\n    n--;\n    n |= n >>> 1;\n    n |= n >>> 2;\n    n |= n >>> 4;\n    n |= n >>> 8;\n    n |= n >>> 16;\n    n++;\n  }\n  return n;\n}\n\nfunction howMuchToRead(n, state) {\n  if (state.length === 0 && state.ended) return 0;\n\n  if (state.objectMode) return n === 0 ? 0 : 1;\n\n  if (n === null || isNaN(n)) {\n    // only flow one buffer at a time\n    if (state.flowing && state.buffer.length) return state.buffer[0].length;else return state.length;\n  }\n\n  if (n <= 0) return 0;\n\n  // If we're asking for more than the target buffer level,\n  // then raise the water mark.  Bump up to the next highest\n  // power of 2, to prevent increasing it excessively in tiny\n  // amounts.\n  if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n);\n\n  // don't have that much.  return null, unless we've ended.\n  if (n > state.length) {\n    if (!state.ended) {\n      state.needReadable = true;\n      return 0;\n    } else {\n      return state.length;\n    }\n  }\n\n  return n;\n}\n\n// you can override either this method, or the async _read(n) below.\nReadable.prototype.read = function (n) {\n  debug('read', n);\n  var state = this._readableState;\n  var nOrig = n;\n\n  if (typeof n !== 'number' || n > 0) state.emittedReadable = false;\n\n  // if we're doing read(0) to trigger a readable event, but we\n  // already have a bunch of data in the buffer, then just trigger\n  // the 'readable' event and move on.\n  if (n === 0 && state.needReadable && (state.length >= state.highWaterMark || state.ended)) {\n    debug('read: emitReadable', state.length, state.ended);\n    if (state.length === 0 && state.ended) endReadable(this);else emitReadable(this);\n    return null;\n  }\n\n  n = howMuchToRead(n, state);\n\n  // if we've ended, and we're now clear, then finish it up.\n  if (n === 0 && state.ended) {\n    if (state.length === 0) endReadable(this);\n    return null;\n  }\n\n  // All the actual chunk generation logic needs to be\n  // *below* the call to _read.  The reason is that in certain\n  // synthetic stream cases, such as passthrough streams, _read\n  // may be a completely synchronous operation which may change\n  // the state of the read buffer, providing enough data when\n  // before there was *not* enough.\n  //\n  // So, the steps are:\n  // 1. Figure out what the state of things will be after we do\n  // a read from the buffer.\n  //\n  // 2. If that resulting state will trigger a _read, then call _read.\n  // Note that this may be asynchronous, or synchronous.  Yes, it is\n  // deeply ugly to write APIs this way, but that still doesn't mean\n  // that the Readable class should behave improperly, as streams are\n  // designed to be sync/async agnostic.\n  // Take note if the _read call is sync or async (ie, if the read call\n  // has returned yet), so that we know whether or not it's safe to emit\n  // 'readable' etc.\n  //\n  // 3. Actually pull the requested chunks out of the buffer and return.\n\n  // if we need a readable event, then we need to do some reading.\n  var doRead = state.needReadable;\n  debug('need readable', doRead);\n\n  // if we currently have less than the highWaterMark, then also read some\n  if (state.length === 0 || state.length - n < state.highWaterMark) {\n    doRead = true;\n    debug('length less than watermark', doRead);\n  }\n\n  // however, if we've ended, then there's no point, and if we're already\n  // reading, then it's unnecessary.\n  if (state.ended || state.reading) {\n    doRead = false;\n    debug('reading or ended', doRead);\n  }\n\n  if (doRead) {\n    debug('do read');\n    state.reading = true;\n    state.sync = true;\n    // if the length is currently zero, then we *need* a readable event.\n    if (state.length === 0) state.needReadable = true;\n    // call internal read method\n    this._read(state.highWaterMark);\n    state.sync = false;\n  }\n\n  // If _read pushed data synchronously, then `reading` will be false,\n  // and we need to re-evaluate how much data we can return to the user.\n  if (doRead && !state.reading) n = howMuchToRead(nOrig, state);\n\n  var ret;\n  if (n > 0) ret = fromList(n, state);else ret = null;\n\n  if (ret === null) {\n    state.needReadable = true;\n    n = 0;\n  }\n\n  state.length -= n;\n\n  // If we have nothing in the buffer, then we want to know\n  // as soon as we *do* get something into the buffer.\n  if (state.length === 0 && !state.ended) state.needReadable = true;\n\n  // If we tried to read() past the EOF, then emit end on the next tick.\n  if (nOrig !== n && state.ended && state.length === 0) endReadable(this);\n\n  if (ret !== null) this.emit('data', ret);\n\n  return ret;\n};\n\nfunction chunkInvalid(state, chunk) {\n  var er = null;\n  if (!Buffer.isBuffer(chunk) && typeof chunk !== 'string' && chunk !== null && chunk !== undefined && !state.objectMode) {\n    er = new TypeError('Invalid non-string/buffer chunk');\n  }\n  return er;\n}\n\nfunction onEofChunk(stream, state) {\n  if (state.ended) return;\n  if (state.decoder) {\n    var chunk = state.decoder.end();\n    if (chunk && chunk.length) {\n      state.buffer.push(chunk);\n      state.length += state.objectMode ? 1 : chunk.length;\n    }\n  }\n  state.ended = true;\n\n  // emit 'readable' now to make sure it gets picked up.\n  emitReadable(stream);\n}\n\n// Don't emit readable right away in sync mode, because this can trigger\n// another read() call => stack overflow.  This way, it might trigger\n// a nextTick recursion warning, but that's not so bad.\nfunction emitReadable(stream) {\n  var state = stream._readableState;\n  state.needReadable = false;\n  if (!state.emittedReadable) {\n    debug('emitReadable', state.flowing);\n    state.emittedReadable = true;\n    if (state.sync) processNextTick(emitReadable_, stream);else emitReadable_(stream);\n  }\n}\n\nfunction emitReadable_(stream) {\n  debug('emit readable');\n  stream.emit('readable');\n  flow(stream);\n}\n\n// at this point, the user has presumably seen the 'readable' event,\n// and called read() to consume some data.  that may have triggered\n// in turn another _read(n) call, in which case reading = true if\n// it's in progress.\n// However, if we're not ended, or reading, and the length < hwm,\n// then go ahead and try to read some more preemptively.\nfunction maybeReadMore(stream, state) {\n  if (!state.readingMore) {\n    state.readingMore = true;\n    processNextTick(maybeReadMore_, stream, state);\n  }\n}\n\nfunction maybeReadMore_(stream, state) {\n  var len = state.length;\n  while (!state.reading && !state.flowing && !state.ended && state.length < state.highWaterMark) {\n    debug('maybeReadMore read 0');\n    stream.read(0);\n    if (len === state.length)\n      // didn't get any data, stop spinning.\n      break;else len = state.length;\n  }\n  state.readingMore = false;\n}\n\n// abstract method.  to be overridden in specific implementation classes.\n// call cb(er, data) where data is <= n in length.\n// for virtual (non-string, non-buffer) streams, \"length\" is somewhat\n// arbitrary, and perhaps not very meaningful.\nReadable.prototype._read = function (n) {\n  this.emit('error', new Error('not implemented'));\n};\n\nReadable.prototype.pipe = function (dest, pipeOpts) {\n  var src = this;\n  var state = this._readableState;\n\n  switch (state.pipesCount) {\n    case 0:\n      state.pipes = dest;\n      break;\n    case 1:\n      state.pipes = [state.pipes, dest];\n      break;\n    default:\n      state.pipes.push(dest);\n      break;\n  }\n  state.pipesCount += 1;\n  debug('pipe count=%d opts=%j', state.pipesCount, pipeOpts);\n\n  var doEnd = (!pipeOpts || pipeOpts.end !== false) && dest !== process.stdout && dest !== process.stderr;\n\n  var endFn = doEnd ? onend : cleanup;\n  if (state.endEmitted) processNextTick(endFn);else src.once('end', endFn);\n\n  dest.on('unpipe', onunpipe);\n  function onunpipe(readable) {\n    debug('onunpipe');\n    if (readable === src) {\n      cleanup();\n    }\n  }\n\n  function onend() {\n    debug('onend');\n    dest.end();\n  }\n\n  // when the dest drains, it reduces the awaitDrain counter\n  // on the source.  This would be more elegant with a .once()\n  // handler in flow(), but adding and removing repeatedly is\n  // too slow.\n  var ondrain = pipeOnDrain(src);\n  dest.on('drain', ondrain);\n\n  var cleanedUp = false;\n  function cleanup() {\n    debug('cleanup');\n    // cleanup event handlers once the pipe is broken\n    dest.removeListener('close', onclose);\n    dest.removeListener('finish', onfinish);\n    dest.removeListener('drain', ondrain);\n    dest.removeListener('error', onerror);\n    dest.removeListener('unpipe', onunpipe);\n    src.removeListener('end', onend);\n    src.removeListener('end', cleanup);\n    src.removeListener('data', ondata);\n\n    cleanedUp = true;\n\n    // if the reader is waiting for a drain event from this\n    // specific writer, then it would cause it to never start\n    // flowing again.\n    // So, if this is awaiting a drain, then we just call it now.\n    // If we don't know, then assume that we are waiting for one.\n    if (state.awaitDrain && (!dest._writableState || dest._writableState.needDrain)) ondrain();\n  }\n\n  src.on('data', ondata);\n  function ondata(chunk) {\n    debug('ondata');\n    var ret = dest.write(chunk);\n    if (false === ret) {\n      // If the user unpiped during `dest.write()`, it is possible\n      // to get stuck in a permanently paused state if that write\n      // also returned false.\n      // => Check whether `dest` is still a piping destination.\n      if ((state.pipesCount === 1 && state.pipes === dest || state.pipesCount > 1 && indexOf(state.pipes, dest) !== -1) && !cleanedUp) {\n        debug('false write response, pause', src._readableState.awaitDrain);\n        src._readableState.awaitDrain++;\n      }\n      src.pause();\n    }\n  }\n\n  // if the dest has an error, then stop piping into it.\n  // however, don't suppress the throwing behavior for this.\n  function onerror(er) {\n    debug('onerror', er);\n    unpipe();\n    dest.removeListener('error', onerror);\n    if (EElistenerCount(dest, 'error') === 0) dest.emit('error', er);\n  }\n\n  // Make sure our error handler is attached before userland ones.\n  prependListener(dest, 'error', onerror);\n\n  // Both close and finish should trigger unpipe, but only once.\n  function onclose() {\n    dest.removeListener('finish', onfinish);\n    unpipe();\n  }\n  dest.once('close', onclose);\n  function onfinish() {\n    debug('onfinish');\n    dest.removeListener('close', onclose);\n    unpipe();\n  }\n  dest.once('finish', onfinish);\n\n  function unpipe() {\n    debug('unpipe');\n    src.unpipe(dest);\n  }\n\n  // tell the dest that it's being piped to\n  dest.emit('pipe', src);\n\n  // start the flow if it hasn't been started already.\n  if (!state.flowing) {\n    debug('pipe resume');\n    src.resume();\n  }\n\n  return dest;\n};\n\nfunction pipeOnDrain(src) {\n  return function () {\n    var state = src._readableState;\n    debug('pipeOnDrain', state.awaitDrain);\n    if (state.awaitDrain) state.awaitDrain--;\n    if (state.awaitDrain === 0 && EElistenerCount(src, 'data')) {\n      state.flowing = true;\n      flow(src);\n    }\n  };\n}\n\nReadable.prototype.unpipe = function (dest) {\n  var state = this._readableState;\n\n  // if we're not piping anywhere, then do nothing.\n  if (state.pipesCount === 0) return this;\n\n  // just one destination.  most common case.\n  if (state.pipesCount === 1) {\n    // passed in one, but it's not the right one.\n    if (dest && dest !== state.pipes) return this;\n\n    if (!dest) dest = state.pipes;\n\n    // got a match.\n    state.pipes = null;\n    state.pipesCount = 0;\n    state.flowing = false;\n    if (dest) dest.emit('unpipe', this);\n    return this;\n  }\n\n  // slow case. multiple pipe destinations.\n\n  if (!dest) {\n    // remove all.\n    var dests = state.pipes;\n    var len = state.pipesCount;\n    state.pipes = null;\n    state.pipesCount = 0;\n    state.flowing = false;\n\n    for (var _i = 0; _i < len; _i++) {\n      dests[_i].emit('unpipe', this);\n    }return this;\n  }\n\n  // try to find the right one.\n  var i = indexOf(state.pipes, dest);\n  if (i === -1) return this;\n\n  state.pipes.splice(i, 1);\n  state.pipesCount -= 1;\n  if (state.pipesCount === 1) state.pipes = state.pipes[0];\n\n  dest.emit('unpipe', this);\n\n  return this;\n};\n\n// set up data events if they are asked for\n// Ensure readable listeners eventually get something\nReadable.prototype.on = function (ev, fn) {\n  var res = Stream.prototype.on.call(this, ev, fn);\n\n  // If listening to data, and it has not explicitly been paused,\n  // then call resume to start the flow of data on the next tick.\n  if (ev === 'data' && false !== this._readableState.flowing) {\n    this.resume();\n  }\n\n  if (ev === 'readable' && !this._readableState.endEmitted) {\n    var state = this._readableState;\n    if (!state.readableListening) {\n      state.readableListening = true;\n      state.emittedReadable = false;\n      state.needReadable = true;\n      if (!state.reading) {\n        processNextTick(nReadingNextTick, this);\n      } else if (state.length) {\n        emitReadable(this, state);\n      }\n    }\n  }\n\n  return res;\n};\nReadable.prototype.addListener = Readable.prototype.on;\n\nfunction nReadingNextTick(self) {\n  debug('readable nexttick read 0');\n  self.read(0);\n}\n\n// pause() and resume() are remnants of the legacy readable stream API\n// If the user uses them, then switch into old mode.\nReadable.prototype.resume = function () {\n  var state = this._readableState;\n  if (!state.flowing) {\n    debug('resume');\n    state.flowing = true;\n    resume(this, state);\n  }\n  return this;\n};\n\nfunction resume(stream, state) {\n  if (!state.resumeScheduled) {\n    state.resumeScheduled = true;\n    processNextTick(resume_, stream, state);\n  }\n}\n\nfunction resume_(stream, state) {\n  if (!state.reading) {\n    debug('resume read 0');\n    stream.read(0);\n  }\n\n  state.resumeScheduled = false;\n  stream.emit('resume');\n  flow(stream);\n  if (state.flowing && !state.reading) stream.read(0);\n}\n\nReadable.prototype.pause = function () {\n  debug('call pause flowing=%j', this._readableState.flowing);\n  if (false !== this._readableState.flowing) {\n    debug('pause');\n    this._readableState.flowing = false;\n    this.emit('pause');\n  }\n  return this;\n};\n\nfunction flow(stream) {\n  var state = stream._readableState;\n  debug('flow', state.flowing);\n  if (state.flowing) {\n    do {\n      var chunk = stream.read();\n    } while (null !== chunk && state.flowing);\n  }\n}\n\n// wrap an old-style stream as the async data source.\n// This is *not* part of the readable stream interface.\n// It is an ugly unfortunate mess of history.\nReadable.prototype.wrap = function (stream) {\n  var state = this._readableState;\n  var paused = false;\n\n  var self = this;\n  stream.on('end', function () {\n    debug('wrapped end');\n    if (state.decoder && !state.ended) {\n      var chunk = state.decoder.end();\n      if (chunk && chunk.length) self.push(chunk);\n    }\n\n    self.push(null);\n  });\n\n  stream.on('data', function (chunk) {\n    debug('wrapped data');\n    if (state.decoder) chunk = state.decoder.write(chunk);\n\n    // don't skip over falsy values in objectMode\n    if (state.objectMode && (chunk === null || chunk === undefined)) return;else if (!state.objectMode && (!chunk || !chunk.length)) return;\n\n    var ret = self.push(chunk);\n    if (!ret) {\n      paused = true;\n      stream.pause();\n    }\n  });\n\n  // proxy all the other methods.\n  // important when wrapping filters and duplexes.\n  for (var i in stream) {\n    if (this[i] === undefined && typeof stream[i] === 'function') {\n      this[i] = function (method) {\n        return function () {\n          return stream[method].apply(stream, arguments);\n        };\n      }(i);\n    }\n  }\n\n  // proxy certain important events.\n  var events = ['error', 'close', 'destroy', 'pause', 'resume'];\n  forEach(events, function (ev) {\n    stream.on(ev, self.emit.bind(self, ev));\n  });\n\n  // when we try to consume some more bytes, simply unpause the\n  // underlying stream.\n  self._read = function (n) {\n    debug('wrapped _read', n);\n    if (paused) {\n      paused = false;\n      stream.resume();\n    }\n  };\n\n  return self;\n};\n\n// exposed for testing purposes only.\nReadable._fromList = fromList;\n\n// Pluck off n bytes from an array of buffers.\n// Length is the combined lengths of all the buffers in the list.\nfunction fromList(n, state) {\n  var list = state.buffer;\n  var length = state.length;\n  var stringMode = !!state.decoder;\n  var objectMode = !!state.objectMode;\n  var ret;\n\n  // nothing in the list, definitely empty.\n  if (list.length === 0) return null;\n\n  if (length === 0) ret = null;else if (objectMode) ret = list.shift();else if (!n || n >= length) {\n    // read it all, truncate the array.\n    if (stringMode) ret = list.join('');else if (list.length === 1) ret = list[0];else ret = Buffer.concat(list, length);\n    list.length = 0;\n  } else {\n    // read just some of it.\n    if (n < list[0].length) {\n      // just take a part of the first list item.\n      // slice is the same for buffers and strings.\n      var buf = list[0];\n      ret = buf.slice(0, n);\n      list[0] = buf.slice(n);\n    } else if (n === list[0].length) {\n      // first list is a perfect match\n      ret = list.shift();\n    } else {\n      // complex case.\n      // we have enough to cover it, but it spans past the first buffer.\n      if (stringMode) ret = '';else ret = bufferShim.allocUnsafe(n);\n\n      var c = 0;\n      for (var i = 0, l = list.length; i < l && c < n; i++) {\n        var _buf = list[0];\n        var cpy = Math.min(n - c, _buf.length);\n\n        if (stringMode) ret += _buf.slice(0, cpy);else _buf.copy(ret, c, 0, cpy);\n\n        if (cpy < _buf.length) list[0] = _buf.slice(cpy);else list.shift();\n\n        c += cpy;\n      }\n    }\n  }\n\n  return ret;\n}\n\nfunction endReadable(stream) {\n  var state = stream._readableState;\n\n  // If we get here before consuming all the bytes, then that is a\n  // bug in node.  Should never happen.\n  if (state.length > 0) throw new Error('\"endReadable()\" called on non-empty stream');\n\n  if (!state.endEmitted) {\n    state.ended = true;\n    processNextTick(endReadableNT, state, stream);\n  }\n}\n\nfunction endReadableNT(state, stream) {\n  // Check that we didn't get one last unshift.\n  if (!state.endEmitted && state.length === 0) {\n    state.endEmitted = true;\n    stream.readable = false;\n    stream.emit('end');\n  }\n}\n\nfunction forEach(xs, f) {\n  for (var i = 0, l = xs.length; i < l; i++) {\n    f(xs[i], i);\n  }\n}\n\nfunction indexOf(xs, x) {\n  for (var i = 0, l = xs.length; i < l; i++) {\n    if (xs[i] === x) return i;\n  }\n  return -1;\n}\n}).call(this,require('_process'))\n},{\"./_stream_duplex\":83,\"_process\":81,\"buffer\":73,\"buffer-shims\":88,\"core-util-is\":89,\"events\":77,\"inherits\":78,\"isarray\":90,\"process-nextick-args\":91,\"string_decoder/\":98,\"util\":72}],86:[function(require,module,exports){\n// a transform stream is a readable/writable stream where you do\n// something with the data.  Sometimes it's called a \"filter\",\n// but that's not a great name for it, since that implies a thing where\n// some bits pass through, and others are simply ignored.  (That would\n// be a valid example of a transform, of course.)\n//\n// While the output is causally related to the input, it's not a\n// necessarily symmetric or synchronous transformation.  For example,\n// a zlib stream might take multiple plain-text writes(), and then\n// emit a single compressed chunk some time in the future.\n//\n// Here's how this works:\n//\n// The Transform stream has all the aspects of the readable and writable\n// stream classes.  When you write(chunk), that calls _write(chunk,cb)\n// internally, and returns false if there's a lot of pending writes\n// buffered up.  When you call read(), that calls _read(n) until\n// there's enough pending readable data buffered up.\n//\n// In a transform stream, the written data is placed in a buffer.  When\n// _read(n) is called, it transforms the queued up data, calling the\n// buffered _write cb's as it consumes chunks.  If consuming a single\n// written chunk would result in multiple output chunks, then the first\n// outputted bit calls the readcb, and subsequent chunks just go into\n// the read buffer, and will cause it to emit 'readable' if necessary.\n//\n// This way, back-pressure is actually determined by the reading side,\n// since _read has to be called to start processing a new chunk.  However,\n// a pathological inflate type of transform can cause excessive buffering\n// here.  For example, imagine a stream where every byte of input is\n// interpreted as an integer from 0-255, and then results in that many\n// bytes of output.  Writing the 4 bytes {ff,ff,ff,ff} would result in\n// 1kb of data being output.  In this case, you could write a very small\n// amount of input, and end up with a very large amount of output.  In\n// such a pathological inflating mechanism, there'd be no way to tell\n// the system to stop doing the transform.  A single 4MB write could\n// cause the system to run out of memory.\n//\n// However, even in such a pathological case, only a single written chunk\n// would be consumed, and then the rest would wait (un-transformed) until\n// the results of the previous transformed chunk were consumed.\n\n'use strict';\n\nmodule.exports = Transform;\n\nvar Duplex = require('./_stream_duplex');\n\n/*<replacement>*/\nvar util = require('core-util-is');\nutil.inherits = require('inherits');\n/*</replacement>*/\n\nutil.inherits(Transform, Duplex);\n\nfunction TransformState(stream) {\n  this.afterTransform = function (er, data) {\n    return afterTransform(stream, er, data);\n  };\n\n  this.needTransform = false;\n  this.transforming = false;\n  this.writecb = null;\n  this.writechunk = null;\n  this.writeencoding = null;\n}\n\nfunction afterTransform(stream, er, data) {\n  var ts = stream._transformState;\n  ts.transforming = false;\n\n  var cb = ts.writecb;\n\n  if (!cb) return stream.emit('error', new Error('no writecb in Transform class'));\n\n  ts.writechunk = null;\n  ts.writecb = null;\n\n  if (data !== null && data !== undefined) stream.push(data);\n\n  cb(er);\n\n  var rs = stream._readableState;\n  rs.reading = false;\n  if (rs.needReadable || rs.length < rs.highWaterMark) {\n    stream._read(rs.highWaterMark);\n  }\n}\n\nfunction Transform(options) {\n  if (!(this instanceof Transform)) return new Transform(options);\n\n  Duplex.call(this, options);\n\n  this._transformState = new TransformState(this);\n\n  // when the writable side finishes, then flush out anything remaining.\n  var stream = this;\n\n  // start out asking for a readable event once data is transformed.\n  this._readableState.needReadable = true;\n\n  // we have implemented the _read method, and done the other things\n  // that Readable wants before the first _read call, so unset the\n  // sync guard flag.\n  this._readableState.sync = false;\n\n  if (options) {\n    if (typeof options.transform === 'function') this._transform = options.transform;\n\n    if (typeof options.flush === 'function') this._flush = options.flush;\n  }\n\n  this.once('prefinish', function () {\n    if (typeof this._flush === 'function') this._flush(function (er) {\n      done(stream, er);\n    });else done(stream);\n  });\n}\n\nTransform.prototype.push = function (chunk, encoding) {\n  this._transformState.needTransform = false;\n  return Duplex.prototype.push.call(this, chunk, encoding);\n};\n\n// This is the part where you do stuff!\n// override this function in implementation classes.\n// 'chunk' is an input chunk.\n//\n// Call `push(newChunk)` to pass along transformed output\n// to the readable side.  You may call 'push' zero or more times.\n//\n// Call `cb(err)` when you are done with this chunk.  If you pass\n// an error, then that'll put the hurt on the whole operation.  If you\n// never call cb(), then you'll never get another chunk.\nTransform.prototype._transform = function (chunk, encoding, cb) {\n  throw new Error('Not implemented');\n};\n\nTransform.prototype._write = function (chunk, encoding, cb) {\n  var ts = this._transformState;\n  ts.writecb = cb;\n  ts.writechunk = chunk;\n  ts.writeencoding = encoding;\n  if (!ts.transforming) {\n    var rs = this._readableState;\n    if (ts.needTransform || rs.needReadable || rs.length < rs.highWaterMark) this._read(rs.highWaterMark);\n  }\n};\n\n// Doesn't matter what the args are here.\n// _transform does all the work.\n// That we got here means that the readable side wants more data.\nTransform.prototype._read = function (n) {\n  var ts = this._transformState;\n\n  if (ts.writechunk !== null && ts.writecb && !ts.transforming) {\n    ts.transforming = true;\n    this._transform(ts.writechunk, ts.writeencoding, ts.afterTransform);\n  } else {\n    // mark that we need a transform, so that any data that comes in\n    // will get processed, now that we've asked for it.\n    ts.needTransform = true;\n  }\n};\n\nfunction done(stream, er) {\n  if (er) return stream.emit('error', er);\n\n  // if there's nothing in the write buffer, then that means\n  // that nothing more will ever be provided\n  var ws = stream._writableState;\n  var ts = stream._transformState;\n\n  if (ws.length) throw new Error('Calling transform done when ws.length != 0');\n\n  if (ts.transforming) throw new Error('Calling transform done when still transforming');\n\n  return stream.push(null);\n}\n},{\"./_stream_duplex\":83,\"core-util-is\":89,\"inherits\":78}],87:[function(require,module,exports){\n(function (process){\n// A bit simpler than readable streams.\n// Implement an async ._write(chunk, encoding, cb), and it'll handle all\n// the drain event emission and buffering.\n\n'use strict';\n\nmodule.exports = Writable;\n\n/*<replacement>*/\nvar processNextTick = require('process-nextick-args');\n/*</replacement>*/\n\n/*<replacement>*/\nvar asyncWrite = !process.browser && ['v0.10', 'v0.9.'].indexOf(process.version.slice(0, 5)) > -1 ? setImmediate : processNextTick;\n/*</replacement>*/\n\nWritable.WritableState = WritableState;\n\n/*<replacement>*/\nvar util = require('core-util-is');\nutil.inherits = require('inherits');\n/*</replacement>*/\n\n/*<replacement>*/\nvar internalUtil = {\n  deprecate: require('util-deprecate')\n};\n/*</replacement>*/\n\n/*<replacement>*/\nvar Stream;\n(function () {\n  try {\n    Stream = require('st' + 'ream');\n  } catch (_) {} finally {\n    if (!Stream) Stream = require('events').EventEmitter;\n  }\n})();\n/*</replacement>*/\n\nvar Buffer = require('buffer').Buffer;\n/*<replacement>*/\nvar bufferShim = require('buffer-shims');\n/*</replacement>*/\n\nutil.inherits(Writable, Stream);\n\nfunction nop() {}\n\nfunction WriteReq(chunk, encoding, cb) {\n  this.chunk = chunk;\n  this.encoding = encoding;\n  this.callback = cb;\n  this.next = null;\n}\n\nvar Duplex;\nfunction WritableState(options, stream) {\n  Duplex = Duplex || require('./_stream_duplex');\n\n  options = options || {};\n\n  // object stream flag to indicate whether or not this stream\n  // contains buffers or objects.\n  this.objectMode = !!options.objectMode;\n\n  if (stream instanceof Duplex) this.objectMode = this.objectMode || !!options.writableObjectMode;\n\n  // the point at which write() starts returning false\n  // Note: 0 is a valid value, means that we always return false if\n  // the entire buffer is not flushed immediately on write()\n  var hwm = options.highWaterMark;\n  var defaultHwm = this.objectMode ? 16 : 16 * 1024;\n  this.highWaterMark = hwm || hwm === 0 ? hwm : defaultHwm;\n\n  // cast to ints.\n  this.highWaterMark = ~ ~this.highWaterMark;\n\n  this.needDrain = false;\n  // at the start of calling end()\n  this.ending = false;\n  // when end() has been called, and returned\n  this.ended = false;\n  // when 'finish' is emitted\n  this.finished = false;\n\n  // should we decode strings into buffers before passing to _write?\n  // this is here so that some node-core streams can optimize string\n  // handling at a lower level.\n  var noDecode = options.decodeStrings === false;\n  this.decodeStrings = !noDecode;\n\n  // Crypto is kind of old and crusty.  Historically, its default string\n  // encoding is 'binary' so we have to make this configurable.\n  // Everything else in the universe uses 'utf8', though.\n  this.defaultEncoding = options.defaultEncoding || 'utf8';\n\n  // not an actual buffer we keep track of, but a measurement\n  // of how much we're waiting to get pushed to some underlying\n  // socket or file.\n  this.length = 0;\n\n  // a flag to see when we're in the middle of a write.\n  this.writing = false;\n\n  // when true all writes will be buffered until .uncork() call\n  this.corked = 0;\n\n  // a flag to be able to tell if the onwrite cb is called immediately,\n  // or on a later tick.  We set this to true at first, because any\n  // actions that shouldn't happen until \"later\" should generally also\n  // not happen before the first write call.\n  this.sync = true;\n\n  // a flag to know if we're processing previously buffered items, which\n  // may call the _write() callback in the same tick, so that we don't\n  // end up in an overlapped onwrite situation.\n  this.bufferProcessing = false;\n\n  // the callback that's passed to _write(chunk,cb)\n  this.onwrite = function (er) {\n    onwrite(stream, er);\n  };\n\n  // the callback that the user supplies to write(chunk,encoding,cb)\n  this.writecb = null;\n\n  // the amount that is being written when _write is called.\n  this.writelen = 0;\n\n  this.bufferedRequest = null;\n  this.lastBufferedRequest = null;\n\n  // number of pending user-supplied write callbacks\n  // this must be 0 before 'finish' can be emitted\n  this.pendingcb = 0;\n\n  // emit prefinish if the only thing we're waiting for is _write cbs\n  // This is relevant for synchronous Transform streams\n  this.prefinished = false;\n\n  // True if the error was already emitted and should not be thrown again\n  this.errorEmitted = false;\n\n  // count buffered requests\n  this.bufferedRequestCount = 0;\n\n  // allocate the first CorkedRequest, there is always\n  // one allocated and free to use, and we maintain at most two\n  this.corkedRequestsFree = new CorkedRequest(this);\n}\n\nWritableState.prototype.getBuffer = function writableStateGetBuffer() {\n  var current = this.bufferedRequest;\n  var out = [];\n  while (current) {\n    out.push(current);\n    current = current.next;\n  }\n  return out;\n};\n\n(function () {\n  try {\n    Object.defineProperty(WritableState.prototype, 'buffer', {\n      get: internalUtil.deprecate(function () {\n        return this.getBuffer();\n      }, '_writableState.buffer is deprecated. Use _writableState.getBuffer ' + 'instead.')\n    });\n  } catch (_) {}\n})();\n\nvar Duplex;\nfunction Writable(options) {\n  Duplex = Duplex || require('./_stream_duplex');\n\n  // Writable ctor is applied to Duplexes, though they're not\n  // instanceof Writable, they're instanceof Readable.\n  if (!(this instanceof Writable) && !(this instanceof Duplex)) return new Writable(options);\n\n  this._writableState = new WritableState(options, this);\n\n  // legacy.\n  this.writable = true;\n\n  if (options) {\n    if (typeof options.write === 'function') this._write = options.write;\n\n    if (typeof options.writev === 'function') this._writev = options.writev;\n  }\n\n  Stream.call(this);\n}\n\n// Otherwise people can pipe Writable streams, which is just wrong.\nWritable.prototype.pipe = function () {\n  this.emit('error', new Error('Cannot pipe, not readable'));\n};\n\nfunction writeAfterEnd(stream, cb) {\n  var er = new Error('write after end');\n  // TODO: defer error events consistently everywhere, not just the cb\n  stream.emit('error', er);\n  processNextTick(cb, er);\n}\n\n// If we get something that is not a buffer, string, null, or undefined,\n// and we're not in objectMode, then that's an error.\n// Otherwise stream chunks are all considered to be of length=1, and the\n// watermarks determine how many objects to keep in the buffer, rather than\n// how many bytes or characters.\nfunction validChunk(stream, state, chunk, cb) {\n  var valid = true;\n  var er = false;\n  // Always throw error if a null is written\n  // if we are not in object mode then throw\n  // if it is not a buffer, string, or undefined.\n  if (chunk === null) {\n    er = new TypeError('May not write null values to stream');\n  } else if (!Buffer.isBuffer(chunk) && typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) {\n    er = new TypeError('Invalid non-string/buffer chunk');\n  }\n  if (er) {\n    stream.emit('error', er);\n    processNextTick(cb, er);\n    valid = false;\n  }\n  return valid;\n}\n\nWritable.prototype.write = function (chunk, encoding, cb) {\n  var state = this._writableState;\n  var ret = false;\n\n  if (typeof encoding === 'function') {\n    cb = encoding;\n    encoding = null;\n  }\n\n  if (Buffer.isBuffer(chunk)) encoding = 'buffer';else if (!encoding) encoding = state.defaultEncoding;\n\n  if (typeof cb !== 'function') cb = nop;\n\n  if (state.ended) writeAfterEnd(this, cb);else if (validChunk(this, state, chunk, cb)) {\n    state.pendingcb++;\n    ret = writeOrBuffer(this, state, chunk, encoding, cb);\n  }\n\n  return ret;\n};\n\nWritable.prototype.cork = function () {\n  var state = this._writableState;\n\n  state.corked++;\n};\n\nWritable.prototype.uncork = function () {\n  var state = this._writableState;\n\n  if (state.corked) {\n    state.corked--;\n\n    if (!state.writing && !state.corked && !state.finished && !state.bufferProcessing && state.bufferedRequest) clearBuffer(this, state);\n  }\n};\n\nWritable.prototype.setDefaultEncoding = function setDefaultEncoding(encoding) {\n  // node::ParseEncoding() requires lower case.\n  if (typeof encoding === 'string') encoding = encoding.toLowerCase();\n  if (!(['hex', 'utf8', 'utf-8', 'ascii', 'binary', 'base64', 'ucs2', 'ucs-2', 'utf16le', 'utf-16le', 'raw'].indexOf((encoding + '').toLowerCase()) > -1)) throw new TypeError('Unknown encoding: ' + encoding);\n  this._writableState.defaultEncoding = encoding;\n  return this;\n};\n\nfunction decodeChunk(state, chunk, encoding) {\n  if (!state.objectMode && state.decodeStrings !== false && typeof chunk === 'string') {\n    chunk = bufferShim.from(chunk, encoding);\n  }\n  return chunk;\n}\n\n// if we're already writing something, then just put this\n// in the queue, and wait our turn.  Otherwise, call _write\n// If we return false, then we need a drain event, so set that flag.\nfunction writeOrBuffer(stream, state, chunk, encoding, cb) {\n  chunk = decodeChunk(state, chunk, encoding);\n\n  if (Buffer.isBuffer(chunk)) encoding = 'buffer';\n  var len = state.objectMode ? 1 : chunk.length;\n\n  state.length += len;\n\n  var ret = state.length < state.highWaterMark;\n  // we must ensure that previous needDrain will not be reset to false.\n  if (!ret) state.needDrain = true;\n\n  if (state.writing || state.corked) {\n    var last = state.lastBufferedRequest;\n    state.lastBufferedRequest = new WriteReq(chunk, encoding, cb);\n    if (last) {\n      last.next = state.lastBufferedRequest;\n    } else {\n      state.bufferedRequest = state.lastBufferedRequest;\n    }\n    state.bufferedRequestCount += 1;\n  } else {\n    doWrite(stream, state, false, len, chunk, encoding, cb);\n  }\n\n  return ret;\n}\n\nfunction doWrite(stream, state, writev, len, chunk, encoding, cb) {\n  state.writelen = len;\n  state.writecb = cb;\n  state.writing = true;\n  state.sync = true;\n  if (writev) stream._writev(chunk, state.onwrite);else stream._write(chunk, encoding, state.onwrite);\n  state.sync = false;\n}\n\nfunction onwriteError(stream, state, sync, er, cb) {\n  --state.pendingcb;\n  if (sync) processNextTick(cb, er);else cb(er);\n\n  stream._writableState.errorEmitted = true;\n  stream.emit('error', er);\n}\n\nfunction onwriteStateUpdate(state) {\n  state.writing = false;\n  state.writecb = null;\n  state.length -= state.writelen;\n  state.writelen = 0;\n}\n\nfunction onwrite(stream, er) {\n  var state = stream._writableState;\n  var sync = state.sync;\n  var cb = state.writecb;\n\n  onwriteStateUpdate(state);\n\n  if (er) onwriteError(stream, state, sync, er, cb);else {\n    // Check if we're actually ready to finish, but don't emit yet\n    var finished = needFinish(state);\n\n    if (!finished && !state.corked && !state.bufferProcessing && state.bufferedRequest) {\n      clearBuffer(stream, state);\n    }\n\n    if (sync) {\n      /*<replacement>*/\n      asyncWrite(afterWrite, stream, state, finished, cb);\n      /*</replacement>*/\n    } else {\n        afterWrite(stream, state, finished, cb);\n      }\n  }\n}\n\nfunction afterWrite(stream, state, finished, cb) {\n  if (!finished) onwriteDrain(stream, state);\n  state.pendingcb--;\n  cb();\n  finishMaybe(stream, state);\n}\n\n// Must force callback to be called on nextTick, so that we don't\n// emit 'drain' before the write() consumer gets the 'false' return\n// value, and has a chance to attach a 'drain' listener.\nfunction onwriteDrain(stream, state) {\n  if (state.length === 0 && state.needDrain) {\n    state.needDrain = false;\n    stream.emit('drain');\n  }\n}\n\n// if there's something in the buffer waiting, then process it\nfunction clearBuffer(stream, state) {\n  state.bufferProcessing = true;\n  var entry = state.bufferedRequest;\n\n  if (stream._writev && entry && entry.next) {\n    // Fast case, write everything using _writev()\n    var l = state.bufferedRequestCount;\n    var buffer = new Array(l);\n    var holder = state.corkedRequestsFree;\n    holder.entry = entry;\n\n    var count = 0;\n    while (entry) {\n      buffer[count] = entry;\n      entry = entry.next;\n      count += 1;\n    }\n\n    doWrite(stream, state, true, state.length, buffer, '', holder.finish);\n\n    // doWrite is almost always async, defer these to save a bit of time\n    // as the hot path ends with doWrite\n    state.pendingcb++;\n    state.lastBufferedRequest = null;\n    if (holder.next) {\n      state.corkedRequestsFree = holder.next;\n      holder.next = null;\n    } else {\n      state.corkedRequestsFree = new CorkedRequest(state);\n    }\n  } else {\n    // Slow case, write chunks one-by-one\n    while (entry) {\n      var chunk = entry.chunk;\n      var encoding = entry.encoding;\n      var cb = entry.callback;\n      var len = state.objectMode ? 1 : chunk.length;\n\n      doWrite(stream, state, false, len, chunk, encoding, cb);\n      entry = entry.next;\n      // if we didn't call the onwrite immediately, then\n      // it means that we need to wait until it does.\n      // also, that means that the chunk and cb are currently\n      // being processed, so move the buffer counter past them.\n      if (state.writing) {\n        break;\n      }\n    }\n\n    if (entry === null) state.lastBufferedRequest = null;\n  }\n\n  state.bufferedRequestCount = 0;\n  state.bufferedRequest = entry;\n  state.bufferProcessing = false;\n}\n\nWritable.prototype._write = function (chunk, encoding, cb) {\n  cb(new Error('not implemented'));\n};\n\nWritable.prototype._writev = null;\n\nWritable.prototype.end = function (chunk, encoding, cb) {\n  var state = this._writableState;\n\n  if (typeof chunk === 'function') {\n    cb = chunk;\n    chunk = null;\n    encoding = null;\n  } else if (typeof encoding === 'function') {\n    cb = encoding;\n    encoding = null;\n  }\n\n  if (chunk !== null && chunk !== undefined) this.write(chunk, encoding);\n\n  // .end() fully uncorks\n  if (state.corked) {\n    state.corked = 1;\n    this.uncork();\n  }\n\n  // ignore unnecessary end() calls.\n  if (!state.ending && !state.finished) endWritable(this, state, cb);\n};\n\nfunction needFinish(state) {\n  return state.ending && state.length === 0 && state.bufferedRequest === null && !state.finished && !state.writing;\n}\n\nfunction prefinish(stream, state) {\n  if (!state.prefinished) {\n    state.prefinished = true;\n    stream.emit('prefinish');\n  }\n}\n\nfunction finishMaybe(stream, state) {\n  var need = needFinish(state);\n  if (need) {\n    if (state.pendingcb === 0) {\n      prefinish(stream, state);\n      state.finished = true;\n      stream.emit('finish');\n    } else {\n      prefinish(stream, state);\n    }\n  }\n  return need;\n}\n\nfunction endWritable(stream, state, cb) {\n  state.ending = true;\n  finishMaybe(stream, state);\n  if (cb) {\n    if (state.finished) processNextTick(cb);else stream.once('finish', cb);\n  }\n  state.ended = true;\n  stream.writable = false;\n}\n\n// It seems a linked list but it is not\n// there will be only 2 of these for each stream\nfunction CorkedRequest(state) {\n  var _this = this;\n\n  this.next = null;\n  this.entry = null;\n\n  this.finish = function (err) {\n    var entry = _this.entry;\n    _this.entry = null;\n    while (entry) {\n      var cb = entry.callback;\n      state.pendingcb--;\n      cb(err);\n      entry = entry.next;\n    }\n    if (state.corkedRequestsFree) {\n      state.corkedRequestsFree.next = _this;\n    } else {\n      state.corkedRequestsFree = _this;\n    }\n  };\n}\n}).call(this,require('_process'))\n},{\"./_stream_duplex\":83,\"_process\":81,\"buffer\":73,\"buffer-shims\":88,\"core-util-is\":89,\"events\":77,\"inherits\":78,\"process-nextick-args\":91,\"util-deprecate\":92}],88:[function(require,module,exports){\n(function (global){\n'use strict';\n\nvar buffer = require('buffer');\nvar Buffer = buffer.Buffer;\nvar SlowBuffer = buffer.SlowBuffer;\nvar MAX_LEN = buffer.kMaxLength || 2147483647;\nexports.alloc = function alloc(size, fill, encoding) {\n  if (typeof Buffer.alloc === 'function') {\n    return Buffer.alloc(size, fill, encoding);\n  }\n  if (typeof encoding === 'number') {\n    throw new TypeError('encoding must not be number');\n  }\n  if (typeof size !== 'number') {\n    throw new TypeError('size must be a number');\n  }\n  if (size > MAX_LEN) {\n    throw new RangeError('size is too large');\n  }\n  var enc = encoding;\n  var _fill = fill;\n  if (_fill === undefined) {\n    enc = undefined;\n    _fill = 0;\n  }\n  var buf = new Buffer(size);\n  if (typeof _fill === 'string') {\n    var fillBuf = new Buffer(_fill, enc);\n    var flen = fillBuf.length;\n    var i = -1;\n    while (++i < size) {\n      buf[i] = fillBuf[i % flen];\n    }\n  } else {\n    buf.fill(_fill);\n  }\n  return buf;\n}\nexports.allocUnsafe = function allocUnsafe(size) {\n  if (typeof Buffer.allocUnsafe === 'function') {\n    return Buffer.allocUnsafe(size);\n  }\n  if (typeof size !== 'number') {\n    throw new TypeError('size must be a number');\n  }\n  if (size > MAX_LEN) {\n    throw new RangeError('size is too large');\n  }\n  return new Buffer(size);\n}\nexports.from = function from(value, encodingOrOffset, length) {\n  if (typeof Buffer.from === 'function' && (!global.Uint8Array || Uint8Array.from !== Buffer.from)) {\n    return Buffer.from(value, encodingOrOffset, length);\n  }\n  if (typeof value === 'number') {\n    throw new TypeError('\"value\" argument must not be a number');\n  }\n  if (typeof value === 'string') {\n    return new Buffer(value, encodingOrOffset);\n  }\n  if (typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer) {\n    var offset = encodingOrOffset;\n    if (arguments.length === 1) {\n      return new Buffer(value);\n    }\n    if (typeof offset === 'undefined') {\n      offset = 0;\n    }\n    var len = length;\n    if (typeof len === 'undefined') {\n      len = value.byteLength - offset;\n    }\n    if (offset >= value.byteLength) {\n      throw new RangeError('\\'offset\\' is out of bounds');\n    }\n    if (len > value.byteLength - offset) {\n      throw new RangeError('\\'length\\' is out of bounds');\n    }\n    return new Buffer(value.slice(offset, offset + len));\n  }\n  if (Buffer.isBuffer(value)) {\n    var out = new Buffer(value.length);\n    value.copy(out, 0, 0, value.length);\n    return out;\n  }\n  if (value) {\n    if (Array.isArray(value) || (typeof ArrayBuffer !== 'undefined' && value.buffer instanceof ArrayBuffer) || 'length' in value) {\n      return new Buffer(value);\n    }\n    if (value.type === 'Buffer' && Array.isArray(value.data)) {\n      return new Buffer(value.data);\n    }\n  }\n\n  throw new TypeError('First argument must be a string, Buffer, ' + 'ArrayBuffer, Array, or array-like object.');\n}\nexports.allocUnsafeSlow = function allocUnsafeSlow(size) {\n  if (typeof Buffer.allocUnsafeSlow === 'function') {\n    return Buffer.allocUnsafeSlow(size);\n  }\n  if (typeof size !== 'number') {\n    throw new TypeError('size must be a number');\n  }\n  if (size >= MAX_LEN) {\n    throw new RangeError('size is too large');\n  }\n  return new SlowBuffer(size);\n}\n\n}).call(this,typeof global !== \"undefined\" ? global : typeof self !== \"undefined\" ? self : typeof window !== \"undefined\" ? window : {})\n},{\"buffer\":73}],89:[function(require,module,exports){\n(function (Buffer){\n// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n// NOTE: These type checking functions intentionally don't use `instanceof`\n// because it is fragile and can be easily faked with `Object.create()`.\n\nfunction isArray(arg) {\n  if (Array.isArray) {\n    return Array.isArray(arg);\n  }\n  return objectToString(arg) === '[object Array]';\n}\nexports.isArray = isArray;\n\nfunction isBoolean(arg) {\n  return typeof arg === 'boolean';\n}\nexports.isBoolean = isBoolean;\n\nfunction isNull(arg) {\n  return arg === null;\n}\nexports.isNull = isNull;\n\nfunction isNullOrUndefined(arg) {\n  return arg == null;\n}\nexports.isNullOrUndefined = isNullOrUndefined;\n\nfunction isNumber(arg) {\n  return typeof arg === 'number';\n}\nexports.isNumber = isNumber;\n\nfunction isString(arg) {\n  return typeof arg === 'string';\n}\nexports.isString = isString;\n\nfunction isSymbol(arg) {\n  return typeof arg === 'symbol';\n}\nexports.isSymbol = isSymbol;\n\nfunction isUndefined(arg) {\n  return arg === void 0;\n}\nexports.isUndefined = isUndefined;\n\nfunction isRegExp(re) {\n  return objectToString(re) === '[object RegExp]';\n}\nexports.isRegExp = isRegExp;\n\nfunction isObject(arg) {\n  return typeof arg === 'object' && arg !== null;\n}\nexports.isObject = isObject;\n\nfunction isDate(d) {\n  return objectToString(d) === '[object Date]';\n}\nexports.isDate = isDate;\n\nfunction isError(e) {\n  return (objectToString(e) === '[object Error]' || e instanceof Error);\n}\nexports.isError = isError;\n\nfunction isFunction(arg) {\n  return typeof arg === 'function';\n}\nexports.isFunction = isFunction;\n\nfunction isPrimitive(arg) {\n  return arg === null ||\n         typeof arg === 'boolean' ||\n         typeof arg === 'number' ||\n         typeof arg === 'string' ||\n         typeof arg === 'symbol' ||  // ES6 symbol\n         typeof arg === 'undefined';\n}\nexports.isPrimitive = isPrimitive;\n\nexports.isBuffer = Buffer.isBuffer;\n\nfunction objectToString(o) {\n  return Object.prototype.toString.call(o);\n}\n\n}).call(this,{\"isBuffer\":require(\"../../../../insert-module-globals/node_modules/is-buffer/index.js\")})\n},{\"../../../../insert-module-globals/node_modules/is-buffer/index.js\":79}],90:[function(require,module,exports){\narguments[4][76][0].apply(exports,arguments)\n},{\"dup\":76}],91:[function(require,module,exports){\n(function (process){\n'use strict';\n\nif (!process.version ||\n    process.version.indexOf('v0.') === 0 ||\n    process.version.indexOf('v1.') === 0 && process.version.indexOf('v1.8.') !== 0) {\n  module.exports = nextTick;\n} else {\n  module.exports = process.nextTick;\n}\n\nfunction nextTick(fn, arg1, arg2, arg3) {\n  if (typeof fn !== 'function') {\n    throw new TypeError('\"callback\" argument must be a function');\n  }\n  var len = arguments.length;\n  var args, i;\n  switch (len) {\n  case 0:\n  case 1:\n    return process.nextTick(fn);\n  case 2:\n    return process.nextTick(function afterTickOne() {\n      fn.call(null, arg1);\n    });\n  case 3:\n    return process.nextTick(function afterTickTwo() {\n      fn.call(null, arg1, arg2);\n    });\n  case 4:\n    return process.nextTick(function afterTickThree() {\n      fn.call(null, arg1, arg2, arg3);\n    });\n  default:\n    args = new Array(len - 1);\n    i = 0;\n    while (i < args.length) {\n      args[i++] = arguments[i];\n    }\n    return process.nextTick(function afterTick() {\n      fn.apply(null, args);\n    });\n  }\n}\n\n}).call(this,require('_process'))\n},{\"_process\":81}],92:[function(require,module,exports){\n(function (global){\n\n/**\n * Module exports.\n */\n\nmodule.exports = deprecate;\n\n/**\n * Mark that a method should not be used.\n * Returns a modified function which warns once by default.\n *\n * If `localStorage.noDeprecation = true` is set, then it is a no-op.\n *\n * If `localStorage.throwDeprecation = true` is set, then deprecated functions\n * will throw an Error when invoked.\n *\n * If `localStorage.traceDeprecation = true` is set, then deprecated functions\n * will invoke `console.trace()` instead of `console.error()`.\n *\n * @param {Function} fn - the function to deprecate\n * @param {String} msg - the string to print to the console when `fn` is invoked\n * @returns {Function} a new \"deprecated\" version of `fn`\n * @api public\n */\n\nfunction deprecate (fn, msg) {\n  if (config('noDeprecation')) {\n    return fn;\n  }\n\n  var warned = false;\n  function deprecated() {\n    if (!warned) {\n      if (config('throwDeprecation')) {\n        throw new Error(msg);\n      } else if (config('traceDeprecation')) {\n        console.trace(msg);\n      } else {\n        console.warn(msg);\n      }\n      warned = true;\n    }\n    return fn.apply(this, arguments);\n  }\n\n  return deprecated;\n}\n\n/**\n * Checks `localStorage` for boolean values for the given `name`.\n *\n * @param {String} name\n * @returns {Boolean}\n * @api private\n */\n\nfunction config (name) {\n  // accessing global.localStorage can trigger a DOMException in sandboxed iframes\n  try {\n    if (!global.localStorage) return false;\n  } catch (_) {\n    return false;\n  }\n  var val = global.localStorage[name];\n  if (null == val) return false;\n  return String(val).toLowerCase() === 'true';\n}\n\n}).call(this,typeof global !== \"undefined\" ? global : typeof self !== \"undefined\" ? self : typeof window !== \"undefined\" ? window : {})\n},{}],93:[function(require,module,exports){\nmodule.exports = require(\"./lib/_stream_passthrough.js\")\n\n},{\"./lib/_stream_passthrough.js\":84}],94:[function(require,module,exports){\n(function (process){\nvar Stream = (function (){\n  try {\n    return require('st' + 'ream'); // hack to fix a circular dependency issue when used with browserify\n  } catch(_){}\n}());\nexports = module.exports = require('./lib/_stream_readable.js');\nexports.Stream = Stream || exports;\nexports.Readable = exports;\nexports.Writable = require('./lib/_stream_writable.js');\nexports.Duplex = require('./lib/_stream_duplex.js');\nexports.Transform = require('./lib/_stream_transform.js');\nexports.PassThrough = require('./lib/_stream_passthrough.js');\n\nif (!process.browser && process.env.READABLE_STREAM === 'disable' && Stream) {\n  module.exports = Stream;\n}\n\n}).call(this,require('_process'))\n},{\"./lib/_stream_duplex.js\":83,\"./lib/_stream_passthrough.js\":84,\"./lib/_stream_readable.js\":85,\"./lib/_stream_transform.js\":86,\"./lib/_stream_writable.js\":87,\"_process\":81}],95:[function(require,module,exports){\nmodule.exports = require(\"./lib/_stream_transform.js\")\n\n},{\"./lib/_stream_transform.js\":86}],96:[function(require,module,exports){\nmodule.exports = require(\"./lib/_stream_writable.js\")\n\n},{\"./lib/_stream_writable.js\":87}],97:[function(require,module,exports){\n// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\nmodule.exports = Stream;\n\nvar EE = require('events').EventEmitter;\nvar inherits = require('inherits');\n\ninherits(Stream, EE);\nStream.Readable = require('readable-stream/readable.js');\nStream.Writable = require('readable-stream/writable.js');\nStream.Duplex = require('readable-stream/duplex.js');\nStream.Transform = require('readable-stream/transform.js');\nStream.PassThrough = require('readable-stream/passthrough.js');\n\n// Backwards-compat with node 0.4.x\nStream.Stream = Stream;\n\n\n\n// old-style streams.  Note that the pipe method (the only relevant\n// part of this class) is overridden in the Readable class.\n\nfunction Stream() {\n  EE.call(this);\n}\n\nStream.prototype.pipe = function(dest, options) {\n  var source = this;\n\n  function ondata(chunk) {\n    if (dest.writable) {\n      if (false === dest.write(chunk) && source.pause) {\n        source.pause();\n      }\n    }\n  }\n\n  source.on('data', ondata);\n\n  function ondrain() {\n    if (source.readable && source.resume) {\n      source.resume();\n    }\n  }\n\n  dest.on('drain', ondrain);\n\n  // If the 'end' option is not supplied, dest.end() will be called when\n  // source gets the 'end' or 'close' events.  Only dest.end() once.\n  if (!dest._isStdio && (!options || options.end !== false)) {\n    source.on('end', onend);\n    source.on('close', onclose);\n  }\n\n  var didOnEnd = false;\n  function onend() {\n    if (didOnEnd) return;\n    didOnEnd = true;\n\n    dest.end();\n  }\n\n\n  function onclose() {\n    if (didOnEnd) return;\n    didOnEnd = true;\n\n    if (typeof dest.destroy === 'function') dest.destroy();\n  }\n\n  // don't leave dangling pipes when there are errors.\n  function onerror(er) {\n    cleanup();\n    if (EE.listenerCount(this, 'error') === 0) {\n      throw er; // Unhandled stream error in pipe.\n    }\n  }\n\n  source.on('error', onerror);\n  dest.on('error', onerror);\n\n  // remove all the event listeners that were added.\n  function cleanup() {\n    source.removeListener('data', ondata);\n    dest.removeListener('drain', ondrain);\n\n    source.removeListener('end', onend);\n    source.removeListener('close', onclose);\n\n    source.removeListener('error', onerror);\n    dest.removeListener('error', onerror);\n\n    source.removeListener('end', cleanup);\n    source.removeListener('close', cleanup);\n\n    dest.removeListener('close', cleanup);\n  }\n\n  source.on('end', cleanup);\n  source.on('close', cleanup);\n\n  dest.on('close', cleanup);\n\n  dest.emit('pipe', source);\n\n  // Allow for unix-like usage: A.pipe(B).pipe(C)\n  return dest;\n};\n\n},{\"events\":77,\"inherits\":78,\"readable-stream/duplex.js\":82,\"readable-stream/passthrough.js\":93,\"readable-stream/readable.js\":94,\"readable-stream/transform.js\":95,\"readable-stream/writable.js\":96}],98:[function(require,module,exports){\n// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\nvar Buffer = require('buffer').Buffer;\n\nvar isBufferEncoding = Buffer.isEncoding\n  || function(encoding) {\n       switch (encoding && encoding.toLowerCase()) {\n         case 'hex': case 'utf8': case 'utf-8': case 'ascii': case 'binary': case 'base64': case 'ucs2': case 'ucs-2': case 'utf16le': case 'utf-16le': case 'raw': return true;\n         default: return false;\n       }\n     }\n\n\nfunction assertEncoding(encoding) {\n  if (encoding && !isBufferEncoding(encoding)) {\n    throw new Error('Unknown encoding: ' + encoding);\n  }\n}\n\n// StringDecoder provides an interface for efficiently splitting a series of\n// buffers into a series of JS strings without breaking apart multi-byte\n// characters. CESU-8 is handled as part of the UTF-8 encoding.\n//\n// @TODO Handling all encodings inside a single object makes it very difficult\n// to reason about this code, so it should be split up in the future.\n// @TODO There should be a utf8-strict encoding that rejects invalid UTF-8 code\n// points as used by CESU-8.\nvar StringDecoder = exports.StringDecoder = function(encoding) {\n  this.encoding = (encoding || 'utf8').toLowerCase().replace(/[-_]/, '');\n  assertEncoding(encoding);\n  switch (this.encoding) {\n    case 'utf8':\n      // CESU-8 represents each of Surrogate Pair by 3-bytes\n      this.surrogateSize = 3;\n      break;\n    case 'ucs2':\n    case 'utf16le':\n      // UTF-16 represents each of Surrogate Pair by 2-bytes\n      this.surrogateSize = 2;\n      this.detectIncompleteChar = utf16DetectIncompleteChar;\n      break;\n    case 'base64':\n      // Base-64 stores 3 bytes in 4 chars, and pads the remainder.\n      this.surrogateSize = 3;\n      this.detectIncompleteChar = base64DetectIncompleteChar;\n      break;\n    default:\n      this.write = passThroughWrite;\n      return;\n  }\n\n  // Enough space to store all bytes of a single character. UTF-8 needs 4\n  // bytes, but CESU-8 may require up to 6 (3 bytes per surrogate).\n  this.charBuffer = new Buffer(6);\n  // Number of bytes received for the current incomplete multi-byte character.\n  this.charReceived = 0;\n  // Number of bytes expected for the current incomplete multi-byte character.\n  this.charLength = 0;\n};\n\n\n// write decodes the given buffer and returns it as JS string that is\n// guaranteed to not contain any partial multi-byte characters. Any partial\n// character found at the end of the buffer is buffered up, and will be\n// returned when calling write again with the remaining bytes.\n//\n// Note: Converting a Buffer containing an orphan surrogate to a String\n// currently works, but converting a String to a Buffer (via `new Buffer`, or\n// Buffer#write) will replace incomplete surrogates with the unicode\n// replacement character. See https://codereview.chromium.org/121173009/ .\nStringDecoder.prototype.write = function(buffer) {\n  var charStr = '';\n  // if our last write ended with an incomplete multibyte character\n  while (this.charLength) {\n    // determine how many remaining bytes this buffer has to offer for this char\n    var available = (buffer.length >= this.charLength - this.charReceived) ?\n        this.charLength - this.charReceived :\n        buffer.length;\n\n    // add the new bytes to the char buffer\n    buffer.copy(this.charBuffer, this.charReceived, 0, available);\n    this.charReceived += available;\n\n    if (this.charReceived < this.charLength) {\n      // still not enough chars in this buffer? wait for more ...\n      return '';\n    }\n\n    // remove bytes belonging to the current character from the buffer\n    buffer = buffer.slice(available, buffer.length);\n\n    // get the character that was split\n    charStr = this.charBuffer.slice(0, this.charLength).toString(this.encoding);\n\n    // CESU-8: lead surrogate (D800-DBFF) is also the incomplete character\n    var charCode = charStr.charCodeAt(charStr.length - 1);\n    if (charCode >= 0xD800 && charCode <= 0xDBFF) {\n      this.charLength += this.surrogateSize;\n      charStr = '';\n      continue;\n    }\n    this.charReceived = this.charLength = 0;\n\n    // if there are no more bytes in this buffer, just emit our char\n    if (buffer.length === 0) {\n      return charStr;\n    }\n    break;\n  }\n\n  // determine and set charLength / charReceived\n  this.detectIncompleteChar(buffer);\n\n  var end = buffer.length;\n  if (this.charLength) {\n    // buffer the incomplete character bytes we got\n    buffer.copy(this.charBuffer, 0, buffer.length - this.charReceived, end);\n    end -= this.charReceived;\n  }\n\n  charStr += buffer.toString(this.encoding, 0, end);\n\n  var end = charStr.length - 1;\n  var charCode = charStr.charCodeAt(end);\n  // CESU-8: lead surrogate (D800-DBFF) is also the incomplete character\n  if (charCode >= 0xD800 && charCode <= 0xDBFF) {\n    var size = this.surrogateSize;\n    this.charLength += size;\n    this.charReceived += size;\n    this.charBuffer.copy(this.charBuffer, size, 0, size);\n    buffer.copy(this.charBuffer, 0, 0, size);\n    return charStr.substring(0, end);\n  }\n\n  // or just emit the charStr\n  return charStr;\n};\n\n// detectIncompleteChar determines if there is an incomplete UTF-8 character at\n// the end of the given buffer. If so, it sets this.charLength to the byte\n// length that character, and sets this.charReceived to the number of bytes\n// that are available for this character.\nStringDecoder.prototype.detectIncompleteChar = function(buffer) {\n  // determine how many bytes we have to check at the end of this buffer\n  var i = (buffer.length >= 3) ? 3 : buffer.length;\n\n  // Figure out if one of the last i bytes of our buffer announces an\n  // incomplete char.\n  for (; i > 0; i--) {\n    var c = buffer[buffer.length - i];\n\n    // See http://en.wikipedia.org/wiki/UTF-8#Description\n\n    // 110XXXXX\n    if (i == 1 && c >> 5 == 0x06) {\n      this.charLength = 2;\n      break;\n    }\n\n    // 1110XXXX\n    if (i <= 2 && c >> 4 == 0x0E) {\n      this.charLength = 3;\n      break;\n    }\n\n    // 11110XXX\n    if (i <= 3 && c >> 3 == 0x1E) {\n      this.charLength = 4;\n      break;\n    }\n  }\n  this.charReceived = i;\n};\n\nStringDecoder.prototype.end = function(buffer) {\n  var res = '';\n  if (buffer && buffer.length)\n    res = this.write(buffer);\n\n  if (this.charReceived) {\n    var cr = this.charReceived;\n    var buf = this.charBuffer;\n    var enc = this.encoding;\n    res += buf.slice(0, cr).toString(enc);\n  }\n\n  return res;\n};\n\nfunction passThroughWrite(buffer) {\n  return buffer.toString(this.encoding);\n}\n\nfunction utf16DetectIncompleteChar(buffer) {\n  this.charReceived = buffer.length % 2;\n  this.charLength = this.charReceived ? 2 : 0;\n}\n\nfunction base64DetectIncompleteChar(buffer) {\n  this.charReceived = buffer.length % 3;\n  this.charLength = this.charReceived ? 3 : 0;\n}\n\n},{\"buffer\":73}],99:[function(require,module,exports){\nmodule.exports = function isBuffer(arg) {\n  return arg && typeof arg === 'object'\n    && typeof arg.copy === 'function'\n    && typeof arg.fill === 'function'\n    && typeof arg.readUInt8 === 'function';\n}\n},{}],100:[function(require,module,exports){\n(function (process,global){\n// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\nvar formatRegExp = /%[sdj%]/g;\nexports.format = function(f) {\n  if (!isString(f)) {\n    var objects = [];\n    for (var i = 0; i < arguments.length; i++) {\n      objects.push(inspect(arguments[i]));\n    }\n    return objects.join(' ');\n  }\n\n  var i = 1;\n  var args = arguments;\n  var len = args.length;\n  var str = String(f).replace(formatRegExp, function(x) {\n    if (x === '%%') return '%';\n    if (i >= len) return x;\n    switch (x) {\n      case '%s': return String(args[i++]);\n      case '%d': return Number(args[i++]);\n      case '%j':\n        try {\n          return JSON.stringify(args[i++]);\n        } catch (_) {\n          return '[Circular]';\n        }\n      default:\n        return x;\n    }\n  });\n  for (var x = args[i]; i < len; x = args[++i]) {\n    if (isNull(x) || !isObject(x)) {\n      str += ' ' + x;\n    } else {\n      str += ' ' + inspect(x);\n    }\n  }\n  return str;\n};\n\n\n// Mark that a method should not be used.\n// Returns a modified function which warns once by default.\n// If --no-deprecation is set, then it is a no-op.\nexports.deprecate = function(fn, msg) {\n  // Allow for deprecating things in the process of starting up.\n  if (isUndefined(global.process)) {\n    return function() {\n      return exports.deprecate(fn, msg).apply(this, arguments);\n    };\n  }\n\n  if (process.noDeprecation === true) {\n    return fn;\n  }\n\n  var warned = false;\n  function deprecated() {\n    if (!warned) {\n      if (process.throwDeprecation) {\n        throw new Error(msg);\n      } else if (process.traceDeprecation) {\n        console.trace(msg);\n      } else {\n        console.error(msg);\n      }\n      warned = true;\n    }\n    return fn.apply(this, arguments);\n  }\n\n  return deprecated;\n};\n\n\nvar debugs = {};\nvar debugEnviron;\nexports.debuglog = function(set) {\n  if (isUndefined(debugEnviron))\n    debugEnviron = process.env.NODE_DEBUG || '';\n  set = set.toUpperCase();\n  if (!debugs[set]) {\n    if (new RegExp('\\\\b' + set + '\\\\b', 'i').test(debugEnviron)) {\n      var pid = process.pid;\n      debugs[set] = function() {\n        var msg = exports.format.apply(exports, arguments);\n        console.error('%s %d: %s', set, pid, msg);\n      };\n    } else {\n      debugs[set] = function() {};\n    }\n  }\n  return debugs[set];\n};\n\n\n/**\n * Echos the value of a value. Trys to print the value out\n * in the best way possible given the different types.\n *\n * @param {Object} obj The object to print out.\n * @param {Object} opts Optional options object that alters the output.\n */\n/* legacy: obj, showHidden, depth, colors*/\nfunction inspect(obj, opts) {\n  // default options\n  var ctx = {\n    seen: [],\n    stylize: stylizeNoColor\n  };\n  // legacy...\n  if (arguments.length >= 3) ctx.depth = arguments[2];\n  if (arguments.length >= 4) ctx.colors = arguments[3];\n  if (isBoolean(opts)) {\n    // legacy...\n    ctx.showHidden = opts;\n  } else if (opts) {\n    // got an \"options\" object\n    exports._extend(ctx, opts);\n  }\n  // set default options\n  if (isUndefined(ctx.showHidden)) ctx.showHidden = false;\n  if (isUndefined(ctx.depth)) ctx.depth = 2;\n  if (isUndefined(ctx.colors)) ctx.colors = false;\n  if (isUndefined(ctx.customInspect)) ctx.customInspect = true;\n  if (ctx.colors) ctx.stylize = stylizeWithColor;\n  return formatValue(ctx, obj, ctx.depth);\n}\nexports.inspect = inspect;\n\n\n// http://en.wikipedia.org/wiki/ANSI_escape_code#graphics\ninspect.colors = {\n  'bold' : [1, 22],\n  'italic' : [3, 23],\n  'underline' : [4, 24],\n  'inverse' : [7, 27],\n  'white' : [37, 39],\n  'grey' : [90, 39],\n  'black' : [30, 39],\n  'blue' : [34, 39],\n  'cyan' : [36, 39],\n  'green' : [32, 39],\n  'magenta' : [35, 39],\n  'red' : [31, 39],\n  'yellow' : [33, 39]\n};\n\n// Don't use 'blue' not visible on cmd.exe\ninspect.styles = {\n  'special': 'cyan',\n  'number': 'yellow',\n  'boolean': 'yellow',\n  'undefined': 'grey',\n  'null': 'bold',\n  'string': 'green',\n  'date': 'magenta',\n  // \"name\": intentionally not styling\n  'regexp': 'red'\n};\n\n\nfunction stylizeWithColor(str, styleType) {\n  var style = inspect.styles[styleType];\n\n  if (style) {\n    return '\\u001b[' + inspect.colors[style][0] + 'm' + str +\n           '\\u001b[' + inspect.colors[style][1] + 'm';\n  } else {\n    return str;\n  }\n}\n\n\nfunction stylizeNoColor(str, styleType) {\n  return str;\n}\n\n\nfunction arrayToHash(array) {\n  var hash = {};\n\n  array.forEach(function(val, idx) {\n    hash[val] = true;\n  });\n\n  return hash;\n}\n\n\nfunction formatValue(ctx, value, recurseTimes) {\n  // Provide a hook for user-specified inspect functions.\n  // Check that value is an object with an inspect function on it\n  if (ctx.customInspect &&\n      value &&\n      isFunction(value.inspect) &&\n      // Filter out the util module, it's inspect function is special\n      value.inspect !== exports.inspect &&\n      // Also filter out any prototype objects using the circular check.\n      !(value.constructor && value.constructor.prototype === value)) {\n    var ret = value.inspect(recurseTimes, ctx);\n    if (!isString(ret)) {\n      ret = formatValue(ctx, ret, recurseTimes);\n    }\n    return ret;\n  }\n\n  // Primitive types cannot have properties\n  var primitive = formatPrimitive(ctx, value);\n  if (primitive) {\n    return primitive;\n  }\n\n  // Look up the keys of the object.\n  var keys = Object.keys(value);\n  var visibleKeys = arrayToHash(keys);\n\n  if (ctx.showHidden) {\n    keys = Object.getOwnPropertyNames(value);\n  }\n\n  // IE doesn't make error fields non-enumerable\n  // http://msdn.microsoft.com/en-us/library/ie/dww52sbt(v=vs.94).aspx\n  if (isError(value)\n      && (keys.indexOf('message') >= 0 || keys.indexOf('description') >= 0)) {\n    return formatError(value);\n  }\n\n  // Some type of object without properties can be shortcutted.\n  if (keys.length === 0) {\n    if (isFunction(value)) {\n      var name = value.name ? ': ' + value.name : '';\n      return ctx.stylize('[Function' + name + ']', 'special');\n    }\n    if (isRegExp(value)) {\n      return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');\n    }\n    if (isDate(value)) {\n      return ctx.stylize(Date.prototype.toString.call(value), 'date');\n    }\n    if (isError(value)) {\n      return formatError(value);\n    }\n  }\n\n  var base = '', array = false, braces = ['{', '}'];\n\n  // Make Array say that they are Array\n  if (isArray(value)) {\n    array = true;\n    braces = ['[', ']'];\n  }\n\n  // Make functions say that they are functions\n  if (isFunction(value)) {\n    var n = value.name ? ': ' + value.name : '';\n    base = ' [Function' + n + ']';\n  }\n\n  // Make RegExps say that they are RegExps\n  if (isRegExp(value)) {\n    base = ' ' + RegExp.prototype.toString.call(value);\n  }\n\n  // Make dates with properties first say the date\n  if (isDate(value)) {\n    base = ' ' + Date.prototype.toUTCString.call(value);\n  }\n\n  // Make error with message first say the error\n  if (isError(value)) {\n    base = ' ' + formatError(value);\n  }\n\n  if (keys.length === 0 && (!array || value.length == 0)) {\n    return braces[0] + base + braces[1];\n  }\n\n  if (recurseTimes < 0) {\n    if (isRegExp(value)) {\n      return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');\n    } else {\n      return ctx.stylize('[Object]', 'special');\n    }\n  }\n\n  ctx.seen.push(value);\n\n  var output;\n  if (array) {\n    output = formatArray(ctx, value, recurseTimes, visibleKeys, keys);\n  } else {\n    output = keys.map(function(key) {\n      return formatProperty(ctx, value, recurseTimes, visibleKeys, key, array);\n    });\n  }\n\n  ctx.seen.pop();\n\n  return reduceToSingleString(output, base, braces);\n}\n\n\nfunction formatPrimitive(ctx, value) {\n  if (isUndefined(value))\n    return ctx.stylize('undefined', 'undefined');\n  if (isString(value)) {\n    var simple = '\\'' + JSON.stringify(value).replace(/^\"|\"$/g, '')\n                                             .replace(/'/g, \"\\\\'\")\n                                             .replace(/\\\\\"/g, '\"') + '\\'';\n    return ctx.stylize(simple, 'string');\n  }\n  if (isNumber(value))\n    return ctx.stylize('' + value, 'number');\n  if (isBoolean(value))\n    return ctx.stylize('' + value, 'boolean');\n  // For some reason typeof null is \"object\", so special case here.\n  if (isNull(value))\n    return ctx.stylize('null', 'null');\n}\n\n\nfunction formatError(value) {\n  return '[' + Error.prototype.toString.call(value) + ']';\n}\n\n\nfunction formatArray(ctx, value, recurseTimes, visibleKeys, keys) {\n  var output = [];\n  for (var i = 0, l = value.length; i < l; ++i) {\n    if (hasOwnProperty(value, String(i))) {\n      output.push(formatProperty(ctx, value, recurseTimes, visibleKeys,\n          String(i), true));\n    } else {\n      output.push('');\n    }\n  }\n  keys.forEach(function(key) {\n    if (!key.match(/^\\d+$/)) {\n      output.push(formatProperty(ctx, value, recurseTimes, visibleKeys,\n          key, true));\n    }\n  });\n  return output;\n}\n\n\nfunction formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) {\n  var name, str, desc;\n  desc = Object.getOwnPropertyDescriptor(value, key) || { value: value[key] };\n  if (desc.get) {\n    if (desc.set) {\n      str = ctx.stylize('[Getter/Setter]', 'special');\n    } else {\n      str = ctx.stylize('[Getter]', 'special');\n    }\n  } else {\n    if (desc.set) {\n      str = ctx.stylize('[Setter]', 'special');\n    }\n  }\n  if (!hasOwnProperty(visibleKeys, key)) {\n    name = '[' + key + ']';\n  }\n  if (!str) {\n    if (ctx.seen.indexOf(desc.value) < 0) {\n      if (isNull(recurseTimes)) {\n        str = formatValue(ctx, desc.value, null);\n      } else {\n        str = formatValue(ctx, desc.value, recurseTimes - 1);\n      }\n      if (str.indexOf('\\n') > -1) {\n        if (array) {\n          str = str.split('\\n').map(function(line) {\n            return '  ' + line;\n          }).join('\\n').substr(2);\n        } else {\n          str = '\\n' + str.split('\\n').map(function(line) {\n            return '   ' + line;\n          }).join('\\n');\n        }\n      }\n    } else {\n      str = ctx.stylize('[Circular]', 'special');\n    }\n  }\n  if (isUndefined(name)) {\n    if (array && key.match(/^\\d+$/)) {\n      return str;\n    }\n    name = JSON.stringify('' + key);\n    if (name.match(/^\"([a-zA-Z_][a-zA-Z_0-9]*)\"$/)) {\n      name = name.substr(1, name.length - 2);\n      name = ctx.stylize(name, 'name');\n    } else {\n      name = name.replace(/'/g, \"\\\\'\")\n                 .replace(/\\\\\"/g, '\"')\n                 .replace(/(^\"|\"$)/g, \"'\");\n      name = ctx.stylize(name, 'string');\n    }\n  }\n\n  return name + ': ' + str;\n}\n\n\nfunction reduceToSingleString(output, base, braces) {\n  var numLinesEst = 0;\n  var length = output.reduce(function(prev, cur) {\n    numLinesEst++;\n    if (cur.indexOf('\\n') >= 0) numLinesEst++;\n    return prev + cur.replace(/\\u001b\\[\\d\\d?m/g, '').length + 1;\n  }, 0);\n\n  if (length > 60) {\n    return braces[0] +\n           (base === '' ? '' : base + '\\n ') +\n           ' ' +\n           output.join(',\\n  ') +\n           ' ' +\n           braces[1];\n  }\n\n  return braces[0] + base + ' ' + output.join(', ') + ' ' + braces[1];\n}\n\n\n// NOTE: These type checking functions intentionally don't use `instanceof`\n// because it is fragile and can be easily faked with `Object.create()`.\nfunction isArray(ar) {\n  return Array.isArray(ar);\n}\nexports.isArray = isArray;\n\nfunction isBoolean(arg) {\n  return typeof arg === 'boolean';\n}\nexports.isBoolean = isBoolean;\n\nfunction isNull(arg) {\n  return arg === null;\n}\nexports.isNull = isNull;\n\nfunction isNullOrUndefined(arg) {\n  return arg == null;\n}\nexports.isNullOrUndefined = isNullOrUndefined;\n\nfunction isNumber(arg) {\n  return typeof arg === 'number';\n}\nexports.isNumber = isNumber;\n\nfunction isString(arg) {\n  return typeof arg === 'string';\n}\nexports.isString = isString;\n\nfunction isSymbol(arg) {\n  return typeof arg === 'symbol';\n}\nexports.isSymbol = isSymbol;\n\nfunction isUndefined(arg) {\n  return arg === void 0;\n}\nexports.isUndefined = isUndefined;\n\nfunction isRegExp(re) {\n  return isObject(re) && objectToString(re) === '[object RegExp]';\n}\nexports.isRegExp = isRegExp;\n\nfunction isObject(arg) {\n  return typeof arg === 'object' && arg !== null;\n}\nexports.isObject = isObject;\n\nfunction isDate(d) {\n  return isObject(d) && objectToString(d) === '[object Date]';\n}\nexports.isDate = isDate;\n\nfunction isError(e) {\n  return isObject(e) &&\n      (objectToString(e) === '[object Error]' || e instanceof Error);\n}\nexports.isError = isError;\n\nfunction isFunction(arg) {\n  return typeof arg === 'function';\n}\nexports.isFunction = isFunction;\n\nfunction isPrimitive(arg) {\n  return arg === null ||\n         typeof arg === 'boolean' ||\n         typeof arg === 'number' ||\n         typeof arg === 'string' ||\n         typeof arg === 'symbol' ||  // ES6 symbol\n         typeof arg === 'undefined';\n}\nexports.isPrimitive = isPrimitive;\n\nexports.isBuffer = require('./support/isBuffer');\n\nfunction objectToString(o) {\n  return Object.prototype.toString.call(o);\n}\n\n\nfunction pad(n) {\n  return n < 10 ? '0' + n.toString(10) : n.toString(10);\n}\n\n\nvar months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep',\n              'Oct', 'Nov', 'Dec'];\n\n// 26 Feb 16:19:34\nfunction timestamp() {\n  var d = new Date();\n  var time = [pad(d.getHours()),\n              pad(d.getMinutes()),\n              pad(d.getSeconds())].join(':');\n  return [d.getDate(), months[d.getMonth()], time].join(' ');\n}\n\n\n// log is just a thin wrapper to console.log that prepends a timestamp\nexports.log = function() {\n  console.log('%s - %s', timestamp(), exports.format.apply(exports, arguments));\n};\n\n\n/**\n * Inherit the prototype methods from one constructor into another.\n *\n * The Function.prototype.inherits from lang.js rewritten as a standalone\n * function (not on Function.prototype). NOTE: If this file is to be loaded\n * during bootstrapping this function needs to be rewritten using some native\n * functions as prototype setup using normal JavaScript does not work as\n * expected during bootstrapping (see mirror.js in r114903).\n *\n * @param {function} ctor Constructor function which needs to inherit the\n *     prototype.\n * @param {function} superCtor Constructor function to inherit prototype from.\n */\nexports.inherits = require('inherits');\n\nexports._extend = function(origin, add) {\n  // Don't do anything if add isn't an object\n  if (!add || !isObject(add)) return origin;\n\n  var keys = Object.keys(add);\n  var i = keys.length;\n  while (i--) {\n    origin[keys[i]] = add[keys[i]];\n  }\n  return origin;\n};\n\nfunction hasOwnProperty(obj, prop) {\n  return Object.prototype.hasOwnProperty.call(obj, prop);\n}\n\n}).call(this,require('_process'),typeof global !== \"undefined\" ? global : typeof self !== \"undefined\" ? self : typeof window !== \"undefined\" ? window : {})\n},{\"./support/isBuffer\":99,\"_process\":81,\"inherits\":78}],101:[function(require,module,exports){\n'use strict';\n// private property\nvar _keyStr = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\";\n\n\n// public method for encoding\nexports.encode = function(input, utf8) {\n    var output = \"\";\n    var chr1, chr2, chr3, enc1, enc2, enc3, enc4;\n    var i = 0;\n\n    while (i < input.length) {\n\n        chr1 = input.charCodeAt(i++);\n        chr2 = input.charCodeAt(i++);\n        chr3 = input.charCodeAt(i++);\n\n        enc1 = chr1 >> 2;\n        enc2 = ((chr1 & 3) << 4) | (chr2 >> 4);\n        enc3 = ((chr2 & 15) << 2) | (chr3 >> 6);\n        enc4 = chr3 & 63;\n\n        if (isNaN(chr2)) {\n            enc3 = enc4 = 64;\n        }\n        else if (isNaN(chr3)) {\n            enc4 = 64;\n        }\n\n        output = output + _keyStr.charAt(enc1) + _keyStr.charAt(enc2) + _keyStr.charAt(enc3) + _keyStr.charAt(enc4);\n\n    }\n\n    return output;\n};\n\n// public method for decoding\nexports.decode = function(input, utf8) {\n    var output = \"\";\n    var chr1, chr2, chr3;\n    var enc1, enc2, enc3, enc4;\n    var i = 0;\n\n    input = input.replace(/[^A-Za-z0-9\\+\\/\\=]/g, \"\");\n\n    while (i < input.length) {\n\n        enc1 = _keyStr.indexOf(input.charAt(i++));\n        enc2 = _keyStr.indexOf(input.charAt(i++));\n        enc3 = _keyStr.indexOf(input.charAt(i++));\n        enc4 = _keyStr.indexOf(input.charAt(i++));\n\n        chr1 = (enc1 << 2) | (enc2 >> 4);\n        chr2 = ((enc2 & 15) << 4) | (enc3 >> 2);\n        chr3 = ((enc3 & 3) << 6) | enc4;\n\n        output = output + String.fromCharCode(chr1);\n\n        if (enc3 != 64) {\n            output = output + String.fromCharCode(chr2);\n        }\n        if (enc4 != 64) {\n            output = output + String.fromCharCode(chr3);\n        }\n\n    }\n\n    return output;\n\n};\n\n},{}],102:[function(require,module,exports){\n'use strict';\nfunction CompressedObject() {\n    this.compressedSize = 0;\n    this.uncompressedSize = 0;\n    this.crc32 = 0;\n    this.compressionMethod = null;\n    this.compressedContent = null;\n}\n\nCompressedObject.prototype = {\n    /**\n     * Return the decompressed content in an unspecified format.\n     * The format will depend on the decompressor.\n     * @return {Object} the decompressed content.\n     */\n    getContent: function() {\n        return null; // see implementation\n    },\n    /**\n     * Return the compressed content in an unspecified format.\n     * The format will depend on the compressed conten source.\n     * @return {Object} the compressed content.\n     */\n    getCompressedContent: function() {\n        return null; // see implementation\n    }\n};\nmodule.exports = CompressedObject;\n\n},{}],103:[function(require,module,exports){\n'use strict';\nexports.STORE = {\n    magic: \"\\x00\\x00\",\n    compress: function(content, compressionOptions) {\n        return content; // no compression\n    },\n    uncompress: function(content) {\n        return content; // no compression\n    },\n    compressInputType: null,\n    uncompressInputType: null\n};\nexports.DEFLATE = require('./flate');\n\n},{\"./flate\":108}],104:[function(require,module,exports){\n'use strict';\n\nvar utils = require('./utils');\n\nvar table = [\n    0x00000000, 0x77073096, 0xEE0E612C, 0x990951BA,\n    0x076DC419, 0x706AF48F, 0xE963A535, 0x9E6495A3,\n    0x0EDB8832, 0x79DCB8A4, 0xE0D5E91E, 0x97D2D988,\n    0x09B64C2B, 0x7EB17CBD, 0xE7B82D07, 0x90BF1D91,\n    0x1DB71064, 0x6AB020F2, 0xF3B97148, 0x84BE41DE,\n    0x1ADAD47D, 0x6DDDE4EB, 0xF4D4B551, 0x83D385C7,\n    0x136C9856, 0x646BA8C0, 0xFD62F97A, 0x8A65C9EC,\n    0x14015C4F, 0x63066CD9, 0xFA0F3D63, 0x8D080DF5,\n    0x3B6E20C8, 0x4C69105E, 0xD56041E4, 0xA2677172,\n    0x3C03E4D1, 0x4B04D447, 0xD20D85FD, 0xA50AB56B,\n    0x35B5A8FA, 0x42B2986C, 0xDBBBC9D6, 0xACBCF940,\n    0x32D86CE3, 0x45DF5C75, 0xDCD60DCF, 0xABD13D59,\n    0x26D930AC, 0x51DE003A, 0xC8D75180, 0xBFD06116,\n    0x21B4F4B5, 0x56B3C423, 0xCFBA9599, 0xB8BDA50F,\n    0x2802B89E, 0x5F058808, 0xC60CD9B2, 0xB10BE924,\n    0x2F6F7C87, 0x58684C11, 0xC1611DAB, 0xB6662D3D,\n    0x76DC4190, 0x01DB7106, 0x98D220BC, 0xEFD5102A,\n    0x71B18589, 0x06B6B51F, 0x9FBFE4A5, 0xE8B8D433,\n    0x7807C9A2, 0x0F00F934, 0x9609A88E, 0xE10E9818,\n    0x7F6A0DBB, 0x086D3D2D, 0x91646C97, 0xE6635C01,\n    0x6B6B51F4, 0x1C6C6162, 0x856530D8, 0xF262004E,\n    0x6C0695ED, 0x1B01A57B, 0x8208F4C1, 0xF50FC457,\n    0x65B0D9C6, 0x12B7E950, 0x8BBEB8EA, 0xFCB9887C,\n    0x62DD1DDF, 0x15DA2D49, 0x8CD37CF3, 0xFBD44C65,\n    0x4DB26158, 0x3AB551CE, 0xA3BC0074, 0xD4BB30E2,\n    0x4ADFA541, 0x3DD895D7, 0xA4D1C46D, 0xD3D6F4FB,\n    0x4369E96A, 0x346ED9FC, 0xAD678846, 0xDA60B8D0,\n    0x44042D73, 0x33031DE5, 0xAA0A4C5F, 0xDD0D7CC9,\n    0x5005713C, 0x270241AA, 0xBE0B1010, 0xC90C2086,\n    0x5768B525, 0x206F85B3, 0xB966D409, 0xCE61E49F,\n    0x5EDEF90E, 0x29D9C998, 0xB0D09822, 0xC7D7A8B4,\n    0x59B33D17, 0x2EB40D81, 0xB7BD5C3B, 0xC0BA6CAD,\n    0xEDB88320, 0x9ABFB3B6, 0x03B6E20C, 0x74B1D29A,\n    0xEAD54739, 0x9DD277AF, 0x04DB2615, 0x73DC1683,\n    0xE3630B12, 0x94643B84, 0x0D6D6A3E, 0x7A6A5AA8,\n    0xE40ECF0B, 0x9309FF9D, 0x0A00AE27, 0x7D079EB1,\n    0xF00F9344, 0x8708A3D2, 0x1E01F268, 0x6906C2FE,\n    0xF762575D, 0x806567CB, 0x196C3671, 0x6E6B06E7,\n    0xFED41B76, 0x89D32BE0, 0x10DA7A5A, 0x67DD4ACC,\n    0xF9B9DF6F, 0x8EBEEFF9, 0x17B7BE43, 0x60B08ED5,\n    0xD6D6A3E8, 0xA1D1937E, 0x38D8C2C4, 0x4FDFF252,\n    0xD1BB67F1, 0xA6BC5767, 0x3FB506DD, 0x48B2364B,\n    0xD80D2BDA, 0xAF0A1B4C, 0x36034AF6, 0x41047A60,\n    0xDF60EFC3, 0xA867DF55, 0x316E8EEF, 0x4669BE79,\n    0xCB61B38C, 0xBC66831A, 0x256FD2A0, 0x5268E236,\n    0xCC0C7795, 0xBB0B4703, 0x220216B9, 0x5505262F,\n    0xC5BA3BBE, 0xB2BD0B28, 0x2BB45A92, 0x5CB36A04,\n    0xC2D7FFA7, 0xB5D0CF31, 0x2CD99E8B, 0x5BDEAE1D,\n    0x9B64C2B0, 0xEC63F226, 0x756AA39C, 0x026D930A,\n    0x9C0906A9, 0xEB0E363F, 0x72076785, 0x05005713,\n    0x95BF4A82, 0xE2B87A14, 0x7BB12BAE, 0x0CB61B38,\n    0x92D28E9B, 0xE5D5BE0D, 0x7CDCEFB7, 0x0BDBDF21,\n    0x86D3D2D4, 0xF1D4E242, 0x68DDB3F8, 0x1FDA836E,\n    0x81BE16CD, 0xF6B9265B, 0x6FB077E1, 0x18B74777,\n    0x88085AE6, 0xFF0F6A70, 0x66063BCA, 0x11010B5C,\n    0x8F659EFF, 0xF862AE69, 0x616BFFD3, 0x166CCF45,\n    0xA00AE278, 0xD70DD2EE, 0x4E048354, 0x3903B3C2,\n    0xA7672661, 0xD06016F7, 0x4969474D, 0x3E6E77DB,\n    0xAED16A4A, 0xD9D65ADC, 0x40DF0B66, 0x37D83BF0,\n    0xA9BCAE53, 0xDEBB9EC5, 0x47B2CF7F, 0x30B5FFE9,\n    0xBDBDF21C, 0xCABAC28A, 0x53B39330, 0x24B4A3A6,\n    0xBAD03605, 0xCDD70693, 0x54DE5729, 0x23D967BF,\n    0xB3667A2E, 0xC4614AB8, 0x5D681B02, 0x2A6F2B94,\n    0xB40BBE37, 0xC30C8EA1, 0x5A05DF1B, 0x2D02EF8D\n];\n\n/**\n *\n *  Javascript crc32\n *  http://www.webtoolkit.info/\n *\n */\nmodule.exports = function crc32(input, crc) {\n    if (typeof input === \"undefined\" || !input.length) {\n        return 0;\n    }\n\n    var isArray = utils.getTypeOf(input) !== \"string\";\n\n    if (typeof(crc) == \"undefined\") {\n        crc = 0;\n    }\n    var x = 0;\n    var y = 0;\n    var b = 0;\n\n    crc = crc ^ (-1);\n    for (var i = 0, iTop = input.length; i < iTop; i++) {\n        b = isArray ? input[i] : input.charCodeAt(i);\n        y = (crc ^ b) & 0xFF;\n        x = table[y];\n        crc = (crc >>> 8) ^ x;\n    }\n\n    return crc ^ (-1);\n};\n// vim: set shiftwidth=4 softtabstop=4:\n\n},{\"./utils\":121}],105:[function(require,module,exports){\n'use strict';\nvar utils = require('./utils');\n\nfunction DataReader(data) {\n    this.data = null; // type : see implementation\n    this.length = 0;\n    this.index = 0;\n}\nDataReader.prototype = {\n    /**\n     * Check that the offset will not go too far.\n     * @param {string} offset the additional offset to check.\n     * @throws {Error} an Error if the offset is out of bounds.\n     */\n    checkOffset: function(offset) {\n        this.checkIndex(this.index + offset);\n    },\n    /**\n     * Check that the specifed index will not be too far.\n     * @param {string} newIndex the index to check.\n     * @throws {Error} an Error if the index is out of bounds.\n     */\n    checkIndex: function(newIndex) {\n        if (this.length < newIndex || newIndex < 0) {\n            throw new Error(\"End of data reached (data length = \" + this.length + \", asked index = \" + (newIndex) + \"). Corrupted zip ?\");\n        }\n    },\n    /**\n     * Change the index.\n     * @param {number} newIndex The new index.\n     * @throws {Error} if the new index is out of the data.\n     */\n    setIndex: function(newIndex) {\n        this.checkIndex(newIndex);\n        this.index = newIndex;\n    },\n    /**\n     * Skip the next n bytes.\n     * @param {number} n the number of bytes to skip.\n     * @throws {Error} if the new index is out of the data.\n     */\n    skip: function(n) {\n        this.setIndex(this.index + n);\n    },\n    /**\n     * Get the byte at the specified index.\n     * @param {number} i the index to use.\n     * @return {number} a byte.\n     */\n    byteAt: function(i) {\n        // see implementations\n    },\n    /**\n     * Get the next number with a given byte size.\n     * @param {number} size the number of bytes to read.\n     * @return {number} the corresponding number.\n     */\n    readInt: function(size) {\n        var result = 0,\n            i;\n        this.checkOffset(size);\n        for (i = this.index + size - 1; i >= this.index; i--) {\n            result = (result << 8) + this.byteAt(i);\n        }\n        this.index += size;\n        return result;\n    },\n    /**\n     * Get the next string with a given byte size.\n     * @param {number} size the number of bytes to read.\n     * @return {string} the corresponding string.\n     */\n    readString: function(size) {\n        return utils.transformTo(\"string\", this.readData(size));\n    },\n    /**\n     * Get raw data without conversion, <size> bytes.\n     * @param {number} size the number of bytes to read.\n     * @return {Object} the raw data, implementation specific.\n     */\n    readData: function(size) {\n        // see implementations\n    },\n    /**\n     * Find the last occurence of a zip signature (4 bytes).\n     * @param {string} sig the signature to find.\n     * @return {number} the index of the last occurence, -1 if not found.\n     */\n    lastIndexOfSignature: function(sig) {\n        // see implementations\n    },\n    /**\n     * Get the next date.\n     * @return {Date} the date.\n     */\n    readDate: function() {\n        var dostime = this.readInt(4);\n        return new Date(\n        ((dostime >> 25) & 0x7f) + 1980, // year\n        ((dostime >> 21) & 0x0f) - 1, // month\n        (dostime >> 16) & 0x1f, // day\n        (dostime >> 11) & 0x1f, // hour\n        (dostime >> 5) & 0x3f, // minute\n        (dostime & 0x1f) << 1); // second\n    }\n};\nmodule.exports = DataReader;\n\n},{\"./utils\":121}],106:[function(require,module,exports){\n'use strict';\nexports.base64 = false;\nexports.binary = false;\nexports.dir = false;\nexports.createFolders = false;\nexports.date = null;\nexports.compression = null;\nexports.compressionOptions = null;\nexports.comment = null;\nexports.unixPermissions = null;\nexports.dosPermissions = null;\n\n},{}],107:[function(require,module,exports){\n'use strict';\nvar utils = require('./utils');\n\n/**\n * @deprecated\n * This function will be removed in a future version without replacement.\n */\nexports.string2binary = function(str) {\n    return utils.string2binary(str);\n};\n\n/**\n * @deprecated\n * This function will be removed in a future version without replacement.\n */\nexports.string2Uint8Array = function(str) {\n    return utils.transformTo(\"uint8array\", str);\n};\n\n/**\n * @deprecated\n * This function will be removed in a future version without replacement.\n */\nexports.uint8Array2String = function(array) {\n    return utils.transformTo(\"string\", array);\n};\n\n/**\n * @deprecated\n * This function will be removed in a future version without replacement.\n */\nexports.string2Blob = function(str) {\n    var buffer = utils.transformTo(\"arraybuffer\", str);\n    return utils.arrayBuffer2Blob(buffer);\n};\n\n/**\n * @deprecated\n * This function will be removed in a future version without replacement.\n */\nexports.arrayBuffer2Blob = function(buffer) {\n    return utils.arrayBuffer2Blob(buffer);\n};\n\n/**\n * @deprecated\n * This function will be removed in a future version without replacement.\n */\nexports.transformTo = function(outputType, input) {\n    return utils.transformTo(outputType, input);\n};\n\n/**\n * @deprecated\n * This function will be removed in a future version without replacement.\n */\nexports.getTypeOf = function(input) {\n    return utils.getTypeOf(input);\n};\n\n/**\n * @deprecated\n * This function will be removed in a future version without replacement.\n */\nexports.checkSupport = function(type) {\n    return utils.checkSupport(type);\n};\n\n/**\n * @deprecated\n * This value will be removed in a future version without replacement.\n */\nexports.MAX_VALUE_16BITS = utils.MAX_VALUE_16BITS;\n\n/**\n * @deprecated\n * This value will be removed in a future version without replacement.\n */\nexports.MAX_VALUE_32BITS = utils.MAX_VALUE_32BITS;\n\n\n/**\n * @deprecated\n * This function will be removed in a future version without replacement.\n */\nexports.pretty = function(str) {\n    return utils.pretty(str);\n};\n\n/**\n * @deprecated\n * This function will be removed in a future version without replacement.\n */\nexports.findCompression = function(compressionMethod) {\n    return utils.findCompression(compressionMethod);\n};\n\n/**\n * @deprecated\n * This function will be removed in a future version without replacement.\n */\nexports.isRegExp = function (object) {\n    return utils.isRegExp(object);\n};\n\n\n},{\"./utils\":121}],108:[function(require,module,exports){\n'use strict';\nvar USE_TYPEDARRAY = (typeof Uint8Array !== 'undefined') && (typeof Uint16Array !== 'undefined') && (typeof Uint32Array !== 'undefined');\n\nvar pako = require(\"pako\");\nexports.uncompressInputType = USE_TYPEDARRAY ? \"uint8array\" : \"array\";\nexports.compressInputType = USE_TYPEDARRAY ? \"uint8array\" : \"array\";\n\nexports.magic = \"\\x08\\x00\";\nexports.compress = function(input, compressionOptions) {\n    return pako.deflateRaw(input, {\n        level : compressionOptions.level || -1 // default compression\n    });\n};\nexports.uncompress =  function(input) {\n    return pako.inflateRaw(input);\n};\n\n},{\"pako\":124}],109:[function(require,module,exports){\n'use strict';\n\nvar base64 = require('./base64');\n\n/**\nUsage:\n   zip = new JSZip();\n   zip.file(\"hello.txt\", \"Hello, World!\").file(\"tempfile\", \"nothing\");\n   zip.folder(\"images\").file(\"smile.gif\", base64Data, {base64: true});\n   zip.file(\"Xmas.txt\", \"Ho ho ho !\", {date : new Date(\"December 25, 2007 00:00:01\")});\n   zip.remove(\"tempfile\");\n\n   base64zip = zip.generate();\n\n**/\n\n/**\n * Representation a of zip file in js\n * @constructor\n * @param {String=|ArrayBuffer=|Uint8Array=} data the data to load, if any (optional).\n * @param {Object=} options the options for creating this objects (optional).\n */\nfunction JSZip(data, options) {\n    // if this constructor is used without `new`, it adds `new` before itself:\n    if(!(this instanceof JSZip)) return new JSZip(data, options);\n\n    // object containing the files :\n    // {\n    //   \"folder/\" : {...},\n    //   \"folder/data.txt\" : {...}\n    // }\n    this.files = {};\n\n    this.comment = null;\n\n    // Where we are in the hierarchy\n    this.root = \"\";\n    if (data) {\n        this.load(data, options);\n    }\n    this.clone = function() {\n        var newObj = new JSZip();\n        for (var i in this) {\n            if (typeof this[i] !== \"function\") {\n                newObj[i] = this[i];\n            }\n        }\n        return newObj;\n    };\n}\nJSZip.prototype = require('./object');\nJSZip.prototype.load = require('./load');\nJSZip.support = require('./support');\nJSZip.defaults = require('./defaults');\n\n/**\n * @deprecated\n * This namespace will be removed in a future version without replacement.\n */\nJSZip.utils = require('./deprecatedPublicUtils');\n\nJSZip.base64 = {\n    /**\n     * @deprecated\n     * This method will be removed in a future version without replacement.\n     */\n    encode : function(input) {\n        return base64.encode(input);\n    },\n    /**\n     * @deprecated\n     * This method will be removed in a future version without replacement.\n     */\n    decode : function(input) {\n        return base64.decode(input);\n    }\n};\nJSZip.compressions = require('./compressions');\nmodule.exports = JSZip;\n\n},{\"./base64\":101,\"./compressions\":103,\"./defaults\":106,\"./deprecatedPublicUtils\":107,\"./load\":110,\"./object\":113,\"./support\":117}],110:[function(require,module,exports){\n'use strict';\nvar base64 = require('./base64');\nvar ZipEntries = require('./zipEntries');\nmodule.exports = function(data, options) {\n    var files, zipEntries, i, input;\n    options = options || {};\n    if (options.base64) {\n        data = base64.decode(data);\n    }\n\n    zipEntries = new ZipEntries(data, options);\n    files = zipEntries.files;\n    for (i = 0; i < files.length; i++) {\n        input = files[i];\n        this.file(input.fileName, input.decompressed, {\n            binary: true,\n            optimizedBinaryString: true,\n            date: input.date,\n            dir: input.dir,\n            comment : input.fileComment.length ? input.fileComment : null,\n            unixPermissions : input.unixPermissions,\n            dosPermissions : input.dosPermissions,\n            createFolders: options.createFolders\n        });\n    }\n    if (zipEntries.zipComment.length) {\n        this.comment = zipEntries.zipComment;\n    }\n\n    return this;\n};\n\n},{\"./base64\":101,\"./zipEntries\":122}],111:[function(require,module,exports){\n(function (Buffer){\n'use strict';\nmodule.exports = function(data, encoding){\n    return new Buffer(data, encoding);\n};\nmodule.exports.test = function(b){\n    return Buffer.isBuffer(b);\n};\n\n}).call(this,require(\"buffer\").Buffer)\n},{\"buffer\":73}],112:[function(require,module,exports){\n'use strict';\nvar Uint8ArrayReader = require('./uint8ArrayReader');\n\nfunction NodeBufferReader(data) {\n    this.data = data;\n    this.length = this.data.length;\n    this.index = 0;\n}\nNodeBufferReader.prototype = new Uint8ArrayReader();\n\n/**\n * @see DataReader.readData\n */\nNodeBufferReader.prototype.readData = function(size) {\n    this.checkOffset(size);\n    var result = this.data.slice(this.index, this.index + size);\n    this.index += size;\n    return result;\n};\nmodule.exports = NodeBufferReader;\n\n},{\"./uint8ArrayReader\":118}],113:[function(require,module,exports){\n'use strict';\nvar support = require('./support');\nvar utils = require('./utils');\nvar crc32 = require('./crc32');\nvar signature = require('./signature');\nvar defaults = require('./defaults');\nvar base64 = require('./base64');\nvar compressions = require('./compressions');\nvar CompressedObject = require('./compressedObject');\nvar nodeBuffer = require('./nodeBuffer');\nvar utf8 = require('./utf8');\nvar StringWriter = require('./stringWriter');\nvar Uint8ArrayWriter = require('./uint8ArrayWriter');\n\n/**\n * Returns the raw data of a ZipObject, decompress the content if necessary.\n * @param {ZipObject} file the file to use.\n * @return {String|ArrayBuffer|Uint8Array|Buffer} the data.\n */\nvar getRawData = function(file) {\n    if (file._data instanceof CompressedObject) {\n        file._data = file._data.getContent();\n        file.options.binary = true;\n        file.options.base64 = false;\n\n        if (utils.getTypeOf(file._data) === \"uint8array\") {\n            var copy = file._data;\n            // when reading an arraybuffer, the CompressedObject mechanism will keep it and subarray() a Uint8Array.\n            // if we request a file in the same format, we might get the same Uint8Array or its ArrayBuffer (the original zip file).\n            file._data = new Uint8Array(copy.length);\n            // with an empty Uint8Array, Opera fails with a \"Offset larger than array size\"\n            if (copy.length !== 0) {\n                file._data.set(copy, 0);\n            }\n        }\n    }\n    return file._data;\n};\n\n/**\n * Returns the data of a ZipObject in a binary form. If the content is an unicode string, encode it.\n * @param {ZipObject} file the file to use.\n * @return {String|ArrayBuffer|Uint8Array|Buffer} the data.\n */\nvar getBinaryData = function(file) {\n    var result = getRawData(file),\n        type = utils.getTypeOf(result);\n    if (type === \"string\") {\n        if (!file.options.binary) {\n            // unicode text !\n            // unicode string => binary string is a painful process, check if we can avoid it.\n            if (support.nodebuffer) {\n                return nodeBuffer(result, \"utf-8\");\n            }\n        }\n        return file.asBinary();\n    }\n    return result;\n};\n\n/**\n * Transform this._data into a string.\n * @param {function} filter a function String -> String, applied if not null on the result.\n * @return {String} the string representing this._data.\n */\nvar dataToString = function(asUTF8) {\n    var result = getRawData(this);\n    if (result === null || typeof result === \"undefined\") {\n        return \"\";\n    }\n    // if the data is a base64 string, we decode it before checking the encoding !\n    if (this.options.base64) {\n        result = base64.decode(result);\n    }\n    if (asUTF8 && this.options.binary) {\n        // JSZip.prototype.utf8decode supports arrays as input\n        // skip to array => string step, utf8decode will do it.\n        result = out.utf8decode(result);\n    }\n    else {\n        // no utf8 transformation, do the array => string step.\n        result = utils.transformTo(\"string\", result);\n    }\n\n    if (!asUTF8 && !this.options.binary) {\n        result = utils.transformTo(\"string\", out.utf8encode(result));\n    }\n    return result;\n};\n/**\n * A simple object representing a file in the zip file.\n * @constructor\n * @param {string} name the name of the file\n * @param {String|ArrayBuffer|Uint8Array|Buffer} data the data\n * @param {Object} options the options of the file\n */\nvar ZipObject = function(name, data, options) {\n    this.name = name;\n    this.dir = options.dir;\n    this.date = options.date;\n    this.comment = options.comment;\n    this.unixPermissions = options.unixPermissions;\n    this.dosPermissions = options.dosPermissions;\n\n    this._data = data;\n    this.options = options;\n\n    /*\n     * This object contains initial values for dir and date.\n     * With them, we can check if the user changed the deprecated metadata in\n     * `ZipObject#options` or not.\n     */\n    this._initialMetadata = {\n      dir : options.dir,\n      date : options.date\n    };\n};\n\nZipObject.prototype = {\n    /**\n     * Return the content as UTF8 string.\n     * @return {string} the UTF8 string.\n     */\n    asText: function() {\n        return dataToString.call(this, true);\n    },\n    /**\n     * Returns the binary content.\n     * @return {string} the content as binary.\n     */\n    asBinary: function() {\n        return dataToString.call(this, false);\n    },\n    /**\n     * Returns the content as a nodejs Buffer.\n     * @return {Buffer} the content as a Buffer.\n     */\n    asNodeBuffer: function() {\n        var result = getBinaryData(this);\n        return utils.transformTo(\"nodebuffer\", result);\n    },\n    /**\n     * Returns the content as an Uint8Array.\n     * @return {Uint8Array} the content as an Uint8Array.\n     */\n    asUint8Array: function() {\n        var result = getBinaryData(this);\n        return utils.transformTo(\"uint8array\", result);\n    },\n    /**\n     * Returns the content as an ArrayBuffer.\n     * @return {ArrayBuffer} the content as an ArrayBufer.\n     */\n    asArrayBuffer: function() {\n        return this.asUint8Array().buffer;\n    }\n};\n\n/**\n * Transform an integer into a string in hexadecimal.\n * @private\n * @param {number} dec the number to convert.\n * @param {number} bytes the number of bytes to generate.\n * @returns {string} the result.\n */\nvar decToHex = function(dec, bytes) {\n    var hex = \"\",\n        i;\n    for (i = 0; i < bytes; i++) {\n        hex += String.fromCharCode(dec & 0xff);\n        dec = dec >>> 8;\n    }\n    return hex;\n};\n\n/**\n * Merge the objects passed as parameters into a new one.\n * @private\n * @param {...Object} var_args All objects to merge.\n * @return {Object} a new object with the data of the others.\n */\nvar extend = function() {\n    var result = {}, i, attr;\n    for (i = 0; i < arguments.length; i++) { // arguments is not enumerable in some browsers\n        for (attr in arguments[i]) {\n            if (arguments[i].hasOwnProperty(attr) && typeof result[attr] === \"undefined\") {\n                result[attr] = arguments[i][attr];\n            }\n        }\n    }\n    return result;\n};\n\n/**\n * Transforms the (incomplete) options from the user into the complete\n * set of options to create a file.\n * @private\n * @param {Object} o the options from the user.\n * @return {Object} the complete set of options.\n */\nvar prepareFileAttrs = function(o) {\n    o = o || {};\n    if (o.base64 === true && (o.binary === null || o.binary === undefined)) {\n        o.binary = true;\n    }\n    o = extend(o, defaults);\n    o.date = o.date || new Date();\n    if (o.compression !== null) o.compression = o.compression.toUpperCase();\n\n    return o;\n};\n\n/**\n * Add a file in the current folder.\n * @private\n * @param {string} name the name of the file\n * @param {String|ArrayBuffer|Uint8Array|Buffer} data the data of the file\n * @param {Object} o the options of the file\n * @return {Object} the new file.\n */\nvar fileAdd = function(name, data, o) {\n    // be sure sub folders exist\n    var dataType = utils.getTypeOf(data),\n        parent;\n\n    o = prepareFileAttrs(o);\n\n    if (typeof o.unixPermissions === \"string\") {\n        o.unixPermissions = parseInt(o.unixPermissions, 8);\n    }\n\n    // UNX_IFDIR  0040000 see zipinfo.c\n    if (o.unixPermissions && (o.unixPermissions & 0x4000)) {\n        o.dir = true;\n    }\n    // Bit 4    Directory\n    if (o.dosPermissions && (o.dosPermissions & 0x0010)) {\n        o.dir = true;\n    }\n\n    if (o.dir) {\n        name = forceTrailingSlash(name);\n    }\n\n    if (o.createFolders && (parent = parentFolder(name))) {\n        folderAdd.call(this, parent, true);\n    }\n\n    if (o.dir || data === null || typeof data === \"undefined\") {\n        o.base64 = false;\n        o.binary = false;\n        data = null;\n        dataType = null;\n    }\n    else if (dataType === \"string\") {\n        if (o.binary && !o.base64) {\n            // optimizedBinaryString == true means that the file has already been filtered with a 0xFF mask\n            if (o.optimizedBinaryString !== true) {\n                // this is a string, not in a base64 format.\n                // Be sure that this is a correct \"binary string\"\n                data = utils.string2binary(data);\n            }\n        }\n    }\n    else { // arraybuffer, uint8array, ...\n        o.base64 = false;\n        o.binary = true;\n\n        if (!dataType && !(data instanceof CompressedObject)) {\n            throw new Error(\"The data of '\" + name + \"' is in an unsupported format !\");\n        }\n\n        // special case : it's way easier to work with Uint8Array than with ArrayBuffer\n        if (dataType === \"arraybuffer\") {\n            data = utils.transformTo(\"uint8array\", data);\n        }\n    }\n\n    var object = new ZipObject(name, data, o);\n    this.files[name] = object;\n    return object;\n};\n\n/**\n * Find the parent folder of the path.\n * @private\n * @param {string} path the path to use\n * @return {string} the parent folder, or \"\"\n */\nvar parentFolder = function (path) {\n    if (path.slice(-1) == '/') {\n        path = path.substring(0, path.length - 1);\n    }\n    var lastSlash = path.lastIndexOf('/');\n    return (lastSlash > 0) ? path.substring(0, lastSlash) : \"\";\n};\n\n\n/**\n * Returns the path with a slash at the end.\n * @private\n * @param {String} path the path to check.\n * @return {String} the path with a trailing slash.\n */\nvar forceTrailingSlash = function(path) {\n    // Check the name ends with a /\n    if (path.slice(-1) != \"/\") {\n        path += \"/\"; // IE doesn't like substr(-1)\n    }\n    return path;\n};\n/**\n * Add a (sub) folder in the current folder.\n * @private\n * @param {string} name the folder's name\n * @param {boolean=} [createFolders] If true, automatically create sub\n *  folders. Defaults to false.\n * @return {Object} the new folder.\n */\nvar folderAdd = function(name, createFolders) {\n    createFolders = (typeof createFolders !== 'undefined') ? createFolders : false;\n\n    name = forceTrailingSlash(name);\n\n    // Does this folder already exist?\n    if (!this.files[name]) {\n        fileAdd.call(this, name, null, {\n            dir: true,\n            createFolders: createFolders\n        });\n    }\n    return this.files[name];\n};\n\n/**\n * Generate a JSZip.CompressedObject for a given zipOject.\n * @param {ZipObject} file the object to read.\n * @param {JSZip.compression} compression the compression to use.\n * @param {Object} compressionOptions the options to use when compressing.\n * @return {JSZip.CompressedObject} the compressed result.\n */\nvar generateCompressedObjectFrom = function(file, compression, compressionOptions) {\n    var result = new CompressedObject(),\n        content;\n\n    // the data has not been decompressed, we might reuse things !\n    if (file._data instanceof CompressedObject) {\n        result.uncompressedSize = file._data.uncompressedSize;\n        result.crc32 = file._data.crc32;\n\n        if (result.uncompressedSize === 0 || file.dir) {\n            compression = compressions['STORE'];\n            result.compressedContent = \"\";\n            result.crc32 = 0;\n        }\n        else if (file._data.compressionMethod === compression.magic) {\n            result.compressedContent = file._data.getCompressedContent();\n        }\n        else {\n            content = file._data.getContent();\n            // need to decompress / recompress\n            result.compressedContent = compression.compress(utils.transformTo(compression.compressInputType, content), compressionOptions);\n        }\n    }\n    else {\n        // have uncompressed data\n        content = getBinaryData(file);\n        if (!content || content.length === 0 || file.dir) {\n            compression = compressions['STORE'];\n            content = \"\";\n        }\n        result.uncompressedSize = content.length;\n        result.crc32 = crc32(content);\n        result.compressedContent = compression.compress(utils.transformTo(compression.compressInputType, content), compressionOptions);\n    }\n\n    result.compressedSize = result.compressedContent.length;\n    result.compressionMethod = compression.magic;\n\n    return result;\n};\n\n\n\n\n/**\n * Generate the UNIX part of the external file attributes.\n * @param {Object} unixPermissions the unix permissions or null.\n * @param {Boolean} isDir true if the entry is a directory, false otherwise.\n * @return {Number} a 32 bit integer.\n *\n * adapted from http://unix.stackexchange.com/questions/14705/the-zip-formats-external-file-attribute :\n *\n * TTTTsstrwxrwxrwx0000000000ADVSHR\n * ^^^^____________________________ file type, see zipinfo.c (UNX_*)\n *     ^^^_________________________ setuid, setgid, sticky\n *        ^^^^^^^^^________________ permissions\n *                 ^^^^^^^^^^______ not used ?\n *                           ^^^^^^ DOS attribute bits : Archive, Directory, Volume label, System file, Hidden, Read only\n */\nvar generateUnixExternalFileAttr = function (unixPermissions, isDir) {\n\n    var result = unixPermissions;\n    if (!unixPermissions) {\n        // I can't use octal values in strict mode, hence the hexa.\n        //  040775 => 0x41fd\n        // 0100664 => 0x81b4\n        result = isDir ? 0x41fd : 0x81b4;\n    }\n\n    return (result & 0xFFFF) << 16;\n};\n\n/**\n * Generate the DOS part of the external file attributes.\n * @param {Object} dosPermissions the dos permissions or null.\n * @param {Boolean} isDir true if the entry is a directory, false otherwise.\n * @return {Number} a 32 bit integer.\n *\n * Bit 0     Read-Only\n * Bit 1     Hidden\n * Bit 2     System\n * Bit 3     Volume Label\n * Bit 4     Directory\n * Bit 5     Archive\n */\nvar generateDosExternalFileAttr = function (dosPermissions, isDir) {\n\n    // the dir flag is already set for compatibility\n\n    return (dosPermissions || 0)  & 0x3F;\n};\n\n/**\n * Generate the various parts used in the construction of the final zip file.\n * @param {string} name the file name.\n * @param {ZipObject} file the file content.\n * @param {JSZip.CompressedObject} compressedObject the compressed object.\n * @param {number} offset the current offset from the start of the zip file.\n * @param {String} platform let's pretend we are this platform (change platform dependents fields)\n * @return {object} the zip parts.\n */\nvar generateZipParts = function(name, file, compressedObject, offset, platform) {\n    var data = compressedObject.compressedContent,\n        utfEncodedFileName = utils.transformTo(\"string\", utf8.utf8encode(file.name)),\n        comment = file.comment || \"\",\n        utfEncodedComment = utils.transformTo(\"string\", utf8.utf8encode(comment)),\n        useUTF8ForFileName = utfEncodedFileName.length !== file.name.length,\n        useUTF8ForComment = utfEncodedComment.length !== comment.length,\n        o = file.options,\n        dosTime,\n        dosDate,\n        extraFields = \"\",\n        unicodePathExtraField = \"\",\n        unicodeCommentExtraField = \"\",\n        dir, date;\n\n\n    // handle the deprecated options.dir\n    if (file._initialMetadata.dir !== file.dir) {\n        dir = file.dir;\n    } else {\n        dir = o.dir;\n    }\n\n    // handle the deprecated options.date\n    if(file._initialMetadata.date !== file.date) {\n        date = file.date;\n    } else {\n        date = o.date;\n    }\n\n    var extFileAttr = 0;\n    var versionMadeBy = 0;\n    if (dir) {\n        // dos or unix, we set the dos dir flag\n        extFileAttr |= 0x00010;\n    }\n    if(platform === \"UNIX\") {\n        versionMadeBy = 0x031E; // UNIX, version 3.0\n        extFileAttr |= generateUnixExternalFileAttr(file.unixPermissions, dir);\n    } else { // DOS or other, fallback to DOS\n        versionMadeBy = 0x0014; // DOS, version 2.0\n        extFileAttr |= generateDosExternalFileAttr(file.dosPermissions, dir);\n    }\n\n    // date\n    // @see http://www.delorie.com/djgpp/doc/rbinter/it/52/13.html\n    // @see http://www.delorie.com/djgpp/doc/rbinter/it/65/16.html\n    // @see http://www.delorie.com/djgpp/doc/rbinter/it/66/16.html\n\n    dosTime = date.getHours();\n    dosTime = dosTime << 6;\n    dosTime = dosTime | date.getMinutes();\n    dosTime = dosTime << 5;\n    dosTime = dosTime | date.getSeconds() / 2;\n\n    dosDate = date.getFullYear() - 1980;\n    dosDate = dosDate << 4;\n    dosDate = dosDate | (date.getMonth() + 1);\n    dosDate = dosDate << 5;\n    dosDate = dosDate | date.getDate();\n\n    if (useUTF8ForFileName) {\n        // set the unicode path extra field. unzip needs at least one extra\n        // field to correctly handle unicode path, so using the path is as good\n        // as any other information. This could improve the situation with\n        // other archive managers too.\n        // This field is usually used without the utf8 flag, with a non\n        // unicode path in the header (winrar, winzip). This helps (a bit)\n        // with the messy Windows' default compressed folders feature but\n        // breaks on p7zip which doesn't seek the unicode path extra field.\n        // So for now, UTF-8 everywhere !\n        unicodePathExtraField =\n            // Version\n            decToHex(1, 1) +\n            // NameCRC32\n            decToHex(crc32(utfEncodedFileName), 4) +\n            // UnicodeName\n            utfEncodedFileName;\n\n        extraFields +=\n            // Info-ZIP Unicode Path Extra Field\n            \"\\x75\\x70\" +\n            // size\n            decToHex(unicodePathExtraField.length, 2) +\n            // content\n            unicodePathExtraField;\n    }\n\n    if(useUTF8ForComment) {\n\n        unicodeCommentExtraField =\n            // Version\n            decToHex(1, 1) +\n            // CommentCRC32\n            decToHex(this.crc32(utfEncodedComment), 4) +\n            // UnicodeName\n            utfEncodedComment;\n\n        extraFields +=\n            // Info-ZIP Unicode Path Extra Field\n            \"\\x75\\x63\" +\n            // size\n            decToHex(unicodeCommentExtraField.length, 2) +\n            // content\n            unicodeCommentExtraField;\n    }\n\n    var header = \"\";\n\n    // version needed to extract\n    header += \"\\x0A\\x00\";\n    // general purpose bit flag\n    // set bit 11 if utf8\n    header += (useUTF8ForFileName || useUTF8ForComment) ? \"\\x00\\x08\" : \"\\x00\\x00\";\n    // compression method\n    header += compressedObject.compressionMethod;\n    // last mod file time\n    header += decToHex(dosTime, 2);\n    // last mod file date\n    header += decToHex(dosDate, 2);\n    // crc-32\n    header += decToHex(compressedObject.crc32, 4);\n    // compressed size\n    header += decToHex(compressedObject.compressedSize, 4);\n    // uncompressed size\n    header += decToHex(compressedObject.uncompressedSize, 4);\n    // file name length\n    header += decToHex(utfEncodedFileName.length, 2);\n    // extra field length\n    header += decToHex(extraFields.length, 2);\n\n\n    var fileRecord = signature.LOCAL_FILE_HEADER + header + utfEncodedFileName + extraFields;\n\n    var dirRecord = signature.CENTRAL_FILE_HEADER +\n    // version made by (00: DOS)\n    decToHex(versionMadeBy, 2) +\n    // file header (common to file and central directory)\n    header +\n    // file comment length\n    decToHex(utfEncodedComment.length, 2) +\n    // disk number start\n    \"\\x00\\x00\" +\n    // internal file attributes TODO\n    \"\\x00\\x00\" +\n    // external file attributes\n    decToHex(extFileAttr, 4) +\n    // relative offset of local header\n    decToHex(offset, 4) +\n    // file name\n    utfEncodedFileName +\n    // extra field\n    extraFields +\n    // file comment\n    utfEncodedComment;\n\n    return {\n        fileRecord: fileRecord,\n        dirRecord: dirRecord,\n        compressedObject: compressedObject\n    };\n};\n\n\n// return the actual prototype of JSZip\nvar out = {\n    /**\n     * Read an existing zip and merge the data in the current JSZip object.\n     * The implementation is in jszip-load.js, don't forget to include it.\n     * @param {String|ArrayBuffer|Uint8Array|Buffer} stream  The stream to load\n     * @param {Object} options Options for loading the stream.\n     *  options.base64 : is the stream in base64 ? default : false\n     * @return {JSZip} the current JSZip object\n     */\n    load: function(stream, options) {\n        throw new Error(\"Load method is not defined. Is the file jszip-load.js included ?\");\n    },\n\n    /**\n     * Filter nested files/folders with the specified function.\n     * @param {Function} search the predicate to use :\n     * function (relativePath, file) {...}\n     * It takes 2 arguments : the relative path and the file.\n     * @return {Array} An array of matching elements.\n     */\n    filter: function(search) {\n        var result = [],\n            filename, relativePath, file, fileClone;\n        for (filename in this.files) {\n            if (!this.files.hasOwnProperty(filename)) {\n                continue;\n            }\n            file = this.files[filename];\n            // return a new object, don't let the user mess with our internal objects :)\n            fileClone = new ZipObject(file.name, file._data, extend(file.options));\n            relativePath = filename.slice(this.root.length, filename.length);\n            if (filename.slice(0, this.root.length) === this.root && // the file is in the current root\n            search(relativePath, fileClone)) { // and the file matches the function\n                result.push(fileClone);\n            }\n        }\n        return result;\n    },\n\n    /**\n     * Add a file to the zip file, or search a file.\n     * @param   {string|RegExp} name The name of the file to add (if data is defined),\n     * the name of the file to find (if no data) or a regex to match files.\n     * @param   {String|ArrayBuffer|Uint8Array|Buffer} data  The file data, either raw or base64 encoded\n     * @param   {Object} o     File options\n     * @return  {JSZip|Object|Array} this JSZip object (when adding a file),\n     * a file (when searching by string) or an array of files (when searching by regex).\n     */\n    file: function(name, data, o) {\n        if (arguments.length === 1) {\n            if (utils.isRegExp(name)) {\n                var regexp = name;\n                return this.filter(function(relativePath, file) {\n                    return !file.dir && regexp.test(relativePath);\n                });\n            }\n            else { // text\n                return this.filter(function(relativePath, file) {\n                    return !file.dir && relativePath === name;\n                })[0] || null;\n            }\n        }\n        else { // more than one argument : we have data !\n            name = this.root + name;\n            fileAdd.call(this, name, data, o);\n        }\n        return this;\n    },\n\n    /**\n     * Add a directory to the zip file, or search.\n     * @param   {String|RegExp} arg The name of the directory to add, or a regex to search folders.\n     * @return  {JSZip} an object with the new directory as the root, or an array containing matching folders.\n     */\n    folder: function(arg) {\n        if (!arg) {\n            return this;\n        }\n\n        if (utils.isRegExp(arg)) {\n            return this.filter(function(relativePath, file) {\n                return file.dir && arg.test(relativePath);\n            });\n        }\n\n        // else, name is a new folder\n        var name = this.root + arg;\n        var newFolder = folderAdd.call(this, name);\n\n        // Allow chaining by returning a new object with this folder as the root\n        var ret = this.clone();\n        ret.root = newFolder.name;\n        return ret;\n    },\n\n    /**\n     * Delete a file, or a directory and all sub-files, from the zip\n     * @param {string} name the name of the file to delete\n     * @return {JSZip} this JSZip object\n     */\n    remove: function(name) {\n        name = this.root + name;\n        var file = this.files[name];\n        if (!file) {\n            // Look for any folders\n            if (name.slice(-1) != \"/\") {\n                name += \"/\";\n            }\n            file = this.files[name];\n        }\n\n        if (file && !file.dir) {\n            // file\n            delete this.files[name];\n        } else {\n            // maybe a folder, delete recursively\n            var kids = this.filter(function(relativePath, file) {\n                return file.name.slice(0, name.length) === name;\n            });\n            for (var i = 0; i < kids.length; i++) {\n                delete this.files[kids[i].name];\n            }\n        }\n\n        return this;\n    },\n\n    /**\n     * Generate the complete zip file\n     * @param {Object} options the options to generate the zip file :\n     * - base64, (deprecated, use type instead) true to generate base64.\n     * - compression, \"STORE\" by default.\n     * - type, \"base64\" by default. Values are : string, base64, uint8array, arraybuffer, blob.\n     * @return {String|Uint8Array|ArrayBuffer|Buffer|Blob} the zip file\n     */\n    generate: function(options) {\n        options = extend(options || {}, {\n            base64: true,\n            compression: \"STORE\",\n            compressionOptions : null,\n            type: \"base64\",\n            platform: \"DOS\",\n            comment: null,\n            mimeType: 'application/zip'\n        });\n\n        utils.checkSupport(options.type);\n\n        // accept nodejs `process.platform`\n        if(\n          options.platform === 'darwin' ||\n          options.platform === 'freebsd' ||\n          options.platform === 'linux' ||\n          options.platform === 'sunos'\n        ) {\n          options.platform = \"UNIX\";\n        }\n        if (options.platform === 'win32') {\n          options.platform = \"DOS\";\n        }\n\n        var zipData = [],\n            localDirLength = 0,\n            centralDirLength = 0,\n            writer, i,\n            utfEncodedComment = utils.transformTo(\"string\", this.utf8encode(options.comment || this.comment || \"\"));\n\n        // first, generate all the zip parts.\n        for (var name in this.files) {\n            if (!this.files.hasOwnProperty(name)) {\n                continue;\n            }\n            var file = this.files[name];\n\n            var compressionName = file.options.compression || options.compression.toUpperCase();\n            var compression = compressions[compressionName];\n            if (!compression) {\n                throw new Error(compressionName + \" is not a valid compression method !\");\n            }\n            var compressionOptions = file.options.compressionOptions || options.compressionOptions || {};\n\n            var compressedObject = generateCompressedObjectFrom.call(this, file, compression, compressionOptions);\n\n            var zipPart = generateZipParts.call(this, name, file, compressedObject, localDirLength, options.platform);\n            localDirLength += zipPart.fileRecord.length + compressedObject.compressedSize;\n            centralDirLength += zipPart.dirRecord.length;\n            zipData.push(zipPart);\n        }\n\n        var dirEnd = \"\";\n\n        // end of central dir signature\n        dirEnd = signature.CENTRAL_DIRECTORY_END +\n        // number of this disk\n        \"\\x00\\x00\" +\n        // number of the disk with the start of the central directory\n        \"\\x00\\x00\" +\n        // total number of entries in the central directory on this disk\n        decToHex(zipData.length, 2) +\n        // total number of entries in the central directory\n        decToHex(zipData.length, 2) +\n        // size of the central directory   4 bytes\n        decToHex(centralDirLength, 4) +\n        // offset of start of central directory with respect to the starting disk number\n        decToHex(localDirLength, 4) +\n        // .ZIP file comment length\n        decToHex(utfEncodedComment.length, 2) +\n        // .ZIP file comment\n        utfEncodedComment;\n\n\n        // we have all the parts (and the total length)\n        // time to create a writer !\n        var typeName = options.type.toLowerCase();\n        if(typeName===\"uint8array\"||typeName===\"arraybuffer\"||typeName===\"blob\"||typeName===\"nodebuffer\") {\n            writer = new Uint8ArrayWriter(localDirLength + centralDirLength + dirEnd.length);\n        }else{\n            writer = new StringWriter(localDirLength + centralDirLength + dirEnd.length);\n        }\n\n        for (i = 0; i < zipData.length; i++) {\n            writer.append(zipData[i].fileRecord);\n            writer.append(zipData[i].compressedObject.compressedContent);\n        }\n        for (i = 0; i < zipData.length; i++) {\n            writer.append(zipData[i].dirRecord);\n        }\n\n        writer.append(dirEnd);\n\n        var zip = writer.finalize();\n\n\n\n        switch(options.type.toLowerCase()) {\n            // case \"zip is an Uint8Array\"\n            case \"uint8array\" :\n            case \"arraybuffer\" :\n            case \"nodebuffer\" :\n               return utils.transformTo(options.type.toLowerCase(), zip);\n            case \"blob\" :\n               return utils.arrayBuffer2Blob(utils.transformTo(\"arraybuffer\", zip), options.mimeType);\n            // case \"zip is a string\"\n            case \"base64\" :\n               return (options.base64) ? base64.encode(zip) : zip;\n            default : // case \"string\" :\n               return zip;\n         }\n\n    },\n\n    /**\n     * @deprecated\n     * This method will be removed in a future version without replacement.\n     */\n    crc32: function (input, crc) {\n        return crc32(input, crc);\n    },\n\n    /**\n     * @deprecated\n     * This method will be removed in a future version without replacement.\n     */\n    utf8encode: function (string) {\n        return utils.transformTo(\"string\", utf8.utf8encode(string));\n    },\n\n    /**\n     * @deprecated\n     * This method will be removed in a future version without replacement.\n     */\n    utf8decode: function (input) {\n        return utf8.utf8decode(input);\n    }\n};\nmodule.exports = out;\n\n},{\"./base64\":101,\"./compressedObject\":102,\"./compressions\":103,\"./crc32\":104,\"./defaults\":106,\"./nodeBuffer\":111,\"./signature\":114,\"./stringWriter\":116,\"./support\":117,\"./uint8ArrayWriter\":119,\"./utf8\":120,\"./utils\":121}],114:[function(require,module,exports){\n'use strict';\nexports.LOCAL_FILE_HEADER = \"PK\\x03\\x04\";\nexports.CENTRAL_FILE_HEADER = \"PK\\x01\\x02\";\nexports.CENTRAL_DIRECTORY_END = \"PK\\x05\\x06\";\nexports.ZIP64_CENTRAL_DIRECTORY_LOCATOR = \"PK\\x06\\x07\";\nexports.ZIP64_CENTRAL_DIRECTORY_END = \"PK\\x06\\x06\";\nexports.DATA_DESCRIPTOR = \"PK\\x07\\x08\";\n\n},{}],115:[function(require,module,exports){\n'use strict';\nvar DataReader = require('./dataReader');\nvar utils = require('./utils');\n\nfunction StringReader(data, optimizedBinaryString) {\n    this.data = data;\n    if (!optimizedBinaryString) {\n        this.data = utils.string2binary(this.data);\n    }\n    this.length = this.data.length;\n    this.index = 0;\n}\nStringReader.prototype = new DataReader();\n/**\n * @see DataReader.byteAt\n */\nStringReader.prototype.byteAt = function(i) {\n    return this.data.charCodeAt(i);\n};\n/**\n * @see DataReader.lastIndexOfSignature\n */\nStringReader.prototype.lastIndexOfSignature = function(sig) {\n    return this.data.lastIndexOf(sig);\n};\n/**\n * @see DataReader.readData\n */\nStringReader.prototype.readData = function(size) {\n    this.checkOffset(size);\n    // this will work because the constructor applied the \"& 0xff\" mask.\n    var result = this.data.slice(this.index, this.index + size);\n    this.index += size;\n    return result;\n};\nmodule.exports = StringReader;\n\n},{\"./dataReader\":105,\"./utils\":121}],116:[function(require,module,exports){\n'use strict';\n\nvar utils = require('./utils');\n\n/**\n * An object to write any content to a string.\n * @constructor\n */\nvar StringWriter = function() {\n    this.data = [];\n};\nStringWriter.prototype = {\n    /**\n     * Append any content to the current string.\n     * @param {Object} input the content to add.\n     */\n    append: function(input) {\n        input = utils.transformTo(\"string\", input);\n        this.data.push(input);\n    },\n    /**\n     * Finalize the construction an return the result.\n     * @return {string} the generated string.\n     */\n    finalize: function() {\n        return this.data.join(\"\");\n    }\n};\n\nmodule.exports = StringWriter;\n\n},{\"./utils\":121}],117:[function(require,module,exports){\n(function (Buffer){\n'use strict';\nexports.base64 = true;\nexports.array = true;\nexports.string = true;\nexports.arraybuffer = typeof ArrayBuffer !== \"undefined\" && typeof Uint8Array !== \"undefined\";\n// contains true if JSZip can read/generate nodejs Buffer, false otherwise.\n// Browserify will provide a Buffer implementation for browsers, which is\n// an augmented Uint8Array (i.e., can be used as either Buffer or U8).\nexports.nodebuffer = typeof Buffer !== \"undefined\";\n// contains true if JSZip can read/generate Uint8Array, false otherwise.\nexports.uint8array = typeof Uint8Array !== \"undefined\";\n\nif (typeof ArrayBuffer === \"undefined\") {\n    exports.blob = false;\n}\nelse {\n    var buffer = new ArrayBuffer(0);\n    try {\n        exports.blob = new Blob([buffer], {\n            type: \"application/zip\"\n        }).size === 0;\n    }\n    catch (e) {\n        try {\n            var Builder = window.BlobBuilder || window.WebKitBlobBuilder || window.MozBlobBuilder || window.MSBlobBuilder;\n            var builder = new Builder();\n            builder.append(buffer);\n            exports.blob = builder.getBlob('application/zip').size === 0;\n        }\n        catch (e) {\n            exports.blob = false;\n        }\n    }\n}\n\n}).call(this,require(\"buffer\").Buffer)\n},{\"buffer\":73}],118:[function(require,module,exports){\n'use strict';\nvar DataReader = require('./dataReader');\n\nfunction Uint8ArrayReader(data) {\n    if (data) {\n        this.data = data;\n        this.length = this.data.length;\n        this.index = 0;\n    }\n}\nUint8ArrayReader.prototype = new DataReader();\n/**\n * @see DataReader.byteAt\n */\nUint8ArrayReader.prototype.byteAt = function(i) {\n    return this.data[i];\n};\n/**\n * @see DataReader.lastIndexOfSignature\n */\nUint8ArrayReader.prototype.lastIndexOfSignature = function(sig) {\n    var sig0 = sig.charCodeAt(0),\n        sig1 = sig.charCodeAt(1),\n        sig2 = sig.charCodeAt(2),\n        sig3 = sig.charCodeAt(3);\n    for (var i = this.length - 4; i >= 0; --i) {\n        if (this.data[i] === sig0 && this.data[i + 1] === sig1 && this.data[i + 2] === sig2 && this.data[i + 3] === sig3) {\n            return i;\n        }\n    }\n\n    return -1;\n};\n/**\n * @see DataReader.readData\n */\nUint8ArrayReader.prototype.readData = function(size) {\n    this.checkOffset(size);\n    if(size === 0) {\n        // in IE10, when using subarray(idx, idx), we get the array [0x00] instead of [].\n        return new Uint8Array(0);\n    }\n    var result = this.data.subarray(this.index, this.index + size);\n    this.index += size;\n    return result;\n};\nmodule.exports = Uint8ArrayReader;\n\n},{\"./dataReader\":105}],119:[function(require,module,exports){\n'use strict';\n\nvar utils = require('./utils');\n\n/**\n * An object to write any content to an Uint8Array.\n * @constructor\n * @param {number} length The length of the array.\n */\nvar Uint8ArrayWriter = function(length) {\n    this.data = new Uint8Array(length);\n    this.index = 0;\n};\nUint8ArrayWriter.prototype = {\n    /**\n     * Append any content to the current array.\n     * @param {Object} input the content to add.\n     */\n    append: function(input) {\n        if (input.length !== 0) {\n            // with an empty Uint8Array, Opera fails with a \"Offset larger than array size\"\n            input = utils.transformTo(\"uint8array\", input);\n            this.data.set(input, this.index);\n            this.index += input.length;\n        }\n    },\n    /**\n     * Finalize the construction an return the result.\n     * @return {Uint8Array} the generated array.\n     */\n    finalize: function() {\n        return this.data;\n    }\n};\n\nmodule.exports = Uint8ArrayWriter;\n\n},{\"./utils\":121}],120:[function(require,module,exports){\n'use strict';\n\nvar utils = require('./utils');\nvar support = require('./support');\nvar nodeBuffer = require('./nodeBuffer');\n\n/**\n * The following functions come from pako, from pako/lib/utils/strings\n * released under the MIT license, see pako https://github.com/nodeca/pako/\n */\n\n// Table with utf8 lengths (calculated by first byte of sequence)\n// Note, that 5 & 6-byte values and some 4-byte values can not be represented in JS,\n// because max possible codepoint is 0x10ffff\nvar _utf8len = new Array(256);\nfor (var i=0; i<256; i++) {\n  _utf8len[i] = (i >= 252 ? 6 : i >= 248 ? 5 : i >= 240 ? 4 : i >= 224 ? 3 : i >= 192 ? 2 : 1);\n}\n_utf8len[254]=_utf8len[254]=1; // Invalid sequence start\n\n// convert string to array (typed, when possible)\nvar string2buf = function (str) {\n    var buf, c, c2, m_pos, i, str_len = str.length, buf_len = 0;\n\n    // count binary size\n    for (m_pos = 0; m_pos < str_len; m_pos++) {\n        c = str.charCodeAt(m_pos);\n        if ((c & 0xfc00) === 0xd800 && (m_pos+1 < str_len)) {\n            c2 = str.charCodeAt(m_pos+1);\n            if ((c2 & 0xfc00) === 0xdc00) {\n                c = 0x10000 + ((c - 0xd800) << 10) + (c2 - 0xdc00);\n                m_pos++;\n            }\n        }\n        buf_len += c < 0x80 ? 1 : c < 0x800 ? 2 : c < 0x10000 ? 3 : 4;\n    }\n\n    // allocate buffer\n    if (support.uint8array) {\n        buf = new Uint8Array(buf_len);\n    } else {\n        buf = new Array(buf_len);\n    }\n\n    // convert\n    for (i=0, m_pos = 0; i < buf_len; m_pos++) {\n        c = str.charCodeAt(m_pos);\n        if ((c & 0xfc00) === 0xd800 && (m_pos+1 < str_len)) {\n            c2 = str.charCodeAt(m_pos+1);\n            if ((c2 & 0xfc00) === 0xdc00) {\n                c = 0x10000 + ((c - 0xd800) << 10) + (c2 - 0xdc00);\n                m_pos++;\n            }\n        }\n        if (c < 0x80) {\n            /* one byte */\n            buf[i++] = c;\n        } else if (c < 0x800) {\n            /* two bytes */\n            buf[i++] = 0xC0 | (c >>> 6);\n            buf[i++] = 0x80 | (c & 0x3f);\n        } else if (c < 0x10000) {\n            /* three bytes */\n            buf[i++] = 0xE0 | (c >>> 12);\n            buf[i++] = 0x80 | (c >>> 6 & 0x3f);\n            buf[i++] = 0x80 | (c & 0x3f);\n        } else {\n            /* four bytes */\n            buf[i++] = 0xf0 | (c >>> 18);\n            buf[i++] = 0x80 | (c >>> 12 & 0x3f);\n            buf[i++] = 0x80 | (c >>> 6 & 0x3f);\n            buf[i++] = 0x80 | (c & 0x3f);\n        }\n    }\n\n    return buf;\n};\n\n// Calculate max possible position in utf8 buffer,\n// that will not break sequence. If that's not possible\n// - (very small limits) return max size as is.\n//\n// buf[] - utf8 bytes array\n// max   - length limit (mandatory);\nvar utf8border = function(buf, max) {\n    var pos;\n\n    max = max || buf.length;\n    if (max > buf.length) { max = buf.length; }\n\n    // go back from last position, until start of sequence found\n    pos = max-1;\n    while (pos >= 0 && (buf[pos] & 0xC0) === 0x80) { pos--; }\n\n    // Fuckup - very small and broken sequence,\n    // return max, because we should return something anyway.\n    if (pos < 0) { return max; }\n\n    // If we came to start of buffer - that means vuffer is too small,\n    // return max too.\n    if (pos === 0) { return max; }\n\n    return (pos + _utf8len[buf[pos]] > max) ? pos : max;\n};\n\n// convert array to string\nvar buf2string = function (buf) {\n    var str, i, out, c, c_len;\n    var len = buf.length;\n\n    // Reserve max possible length (2 words per char)\n    // NB: by unknown reasons, Array is significantly faster for\n    //     String.fromCharCode.apply than Uint16Array.\n    var utf16buf = new Array(len*2);\n\n    for (out=0, i=0; i<len;) {\n        c = buf[i++];\n        // quick process ascii\n        if (c < 0x80) { utf16buf[out++] = c; continue; }\n\n        c_len = _utf8len[c];\n        // skip 5 & 6 byte codes\n        if (c_len > 4) { utf16buf[out++] = 0xfffd; i += c_len-1; continue; }\n\n        // apply mask on first byte\n        c &= c_len === 2 ? 0x1f : c_len === 3 ? 0x0f : 0x07;\n        // join the rest\n        while (c_len > 1 && i < len) {\n            c = (c << 6) | (buf[i++] & 0x3f);\n            c_len--;\n        }\n\n        // terminated by end of string?\n        if (c_len > 1) { utf16buf[out++] = 0xfffd; continue; }\n\n        if (c < 0x10000) {\n            utf16buf[out++] = c;\n        } else {\n            c -= 0x10000;\n            utf16buf[out++] = 0xd800 | ((c >> 10) & 0x3ff);\n            utf16buf[out++] = 0xdc00 | (c & 0x3ff);\n        }\n    }\n\n    // shrinkBuf(utf16buf, out)\n    if (utf16buf.length !== out) {\n        if(utf16buf.subarray) {\n            utf16buf = utf16buf.subarray(0, out);\n        } else {\n            utf16buf.length = out;\n        }\n    }\n\n    // return String.fromCharCode.apply(null, utf16buf);\n    return utils.applyFromCharCode(utf16buf);\n};\n\n\n// That's all for the pako functions.\n\n\n/**\n * Transform a javascript string into an array (typed if possible) of bytes,\n * UTF-8 encoded.\n * @param {String} str the string to encode\n * @return {Array|Uint8Array|Buffer} the UTF-8 encoded string.\n */\nexports.utf8encode = function utf8encode(str) {\n    if (support.nodebuffer) {\n        return nodeBuffer(str, \"utf-8\");\n    }\n\n    return string2buf(str);\n};\n\n\n/**\n * Transform a bytes array (or a representation) representing an UTF-8 encoded\n * string into a javascript string.\n * @param {Array|Uint8Array|Buffer} buf the data de decode\n * @return {String} the decoded string.\n */\nexports.utf8decode = function utf8decode(buf) {\n    if (support.nodebuffer) {\n        return utils.transformTo(\"nodebuffer\", buf).toString(\"utf-8\");\n    }\n\n    buf = utils.transformTo(support.uint8array ? \"uint8array\" : \"array\", buf);\n\n    // return buf2string(buf);\n    // Chrome prefers to work with \"small\" chunks of data\n    // for the method buf2string.\n    // Firefox and Chrome has their own shortcut, IE doesn't seem to really care.\n    var result = [], k = 0, len = buf.length, chunk = 65536;\n    while (k < len) {\n        var nextBoundary = utf8border(buf, Math.min(k + chunk, len));\n        if (support.uint8array) {\n            result.push(buf2string(buf.subarray(k, nextBoundary)));\n        } else {\n            result.push(buf2string(buf.slice(k, nextBoundary)));\n        }\n        k = nextBoundary;\n    }\n    return result.join(\"\");\n\n};\n// vim: set shiftwidth=4 softtabstop=4:\n\n},{\"./nodeBuffer\":111,\"./support\":117,\"./utils\":121}],121:[function(require,module,exports){\n'use strict';\nvar support = require('./support');\nvar compressions = require('./compressions');\nvar nodeBuffer = require('./nodeBuffer');\n/**\n * Convert a string to a \"binary string\" : a string containing only char codes between 0 and 255.\n * @param {string} str the string to transform.\n * @return {String} the binary string.\n */\nexports.string2binary = function(str) {\n    var result = \"\";\n    for (var i = 0; i < str.length; i++) {\n        result += String.fromCharCode(str.charCodeAt(i) & 0xff);\n    }\n    return result;\n};\nexports.arrayBuffer2Blob = function(buffer, mimeType) {\n    exports.checkSupport(\"blob\");\n\tmimeType = mimeType || 'application/zip';\n\n    try {\n        // Blob constructor\n        return new Blob([buffer], {\n            type: mimeType\n        });\n    }\n    catch (e) {\n\n        try {\n            // deprecated, browser only, old way\n            var Builder = window.BlobBuilder || window.WebKitBlobBuilder || window.MozBlobBuilder || window.MSBlobBuilder;\n            var builder = new Builder();\n            builder.append(buffer);\n            return builder.getBlob(mimeType);\n        }\n        catch (e) {\n\n            // well, fuck ?!\n            throw new Error(\"Bug : can't construct the Blob.\");\n        }\n    }\n\n\n};\n/**\n * The identity function.\n * @param {Object} input the input.\n * @return {Object} the same input.\n */\nfunction identity(input) {\n    return input;\n}\n\n/**\n * Fill in an array with a string.\n * @param {String} str the string to use.\n * @param {Array|ArrayBuffer|Uint8Array|Buffer} array the array to fill in (will be mutated).\n * @return {Array|ArrayBuffer|Uint8Array|Buffer} the updated array.\n */\nfunction stringToArrayLike(str, array) {\n    for (var i = 0; i < str.length; ++i) {\n        array[i] = str.charCodeAt(i) & 0xFF;\n    }\n    return array;\n}\n\n/**\n * Transform an array-like object to a string.\n * @param {Array|ArrayBuffer|Uint8Array|Buffer} array the array to transform.\n * @return {String} the result.\n */\nfunction arrayLikeToString(array) {\n    // Performances notes :\n    // --------------------\n    // String.fromCharCode.apply(null, array) is the fastest, see\n    // see http://jsperf.com/converting-a-uint8array-to-a-string/2\n    // but the stack is limited (and we can get huge arrays !).\n    //\n    // result += String.fromCharCode(array[i]); generate too many strings !\n    //\n    // This code is inspired by http://jsperf.com/arraybuffer-to-string-apply-performance/2\n    var chunk = 65536;\n    var result = [],\n        len = array.length,\n        type = exports.getTypeOf(array),\n        k = 0,\n        canUseApply = true;\n      try {\n         switch(type) {\n            case \"uint8array\":\n               String.fromCharCode.apply(null, new Uint8Array(0));\n               break;\n            case \"nodebuffer\":\n               String.fromCharCode.apply(null, nodeBuffer(0));\n               break;\n         }\n      } catch(e) {\n         canUseApply = false;\n      }\n\n      // no apply : slow and painful algorithm\n      // default browser on android 4.*\n      if (!canUseApply) {\n         var resultStr = \"\";\n         for(var i = 0; i < array.length;i++) {\n            resultStr += String.fromCharCode(array[i]);\n         }\n    return resultStr;\n    }\n    while (k < len && chunk > 1) {\n        try {\n            if (type === \"array\" || type === \"nodebuffer\") {\n                result.push(String.fromCharCode.apply(null, array.slice(k, Math.min(k + chunk, len))));\n            }\n            else {\n                result.push(String.fromCharCode.apply(null, array.subarray(k, Math.min(k + chunk, len))));\n            }\n            k += chunk;\n        }\n        catch (e) {\n            chunk = Math.floor(chunk / 2);\n        }\n    }\n    return result.join(\"\");\n}\n\nexports.applyFromCharCode = arrayLikeToString;\n\n\n/**\n * Copy the data from an array-like to an other array-like.\n * @param {Array|ArrayBuffer|Uint8Array|Buffer} arrayFrom the origin array.\n * @param {Array|ArrayBuffer|Uint8Array|Buffer} arrayTo the destination array which will be mutated.\n * @return {Array|ArrayBuffer|Uint8Array|Buffer} the updated destination array.\n */\nfunction arrayLikeToArrayLike(arrayFrom, arrayTo) {\n    for (var i = 0; i < arrayFrom.length; i++) {\n        arrayTo[i] = arrayFrom[i];\n    }\n    return arrayTo;\n}\n\n// a matrix containing functions to transform everything into everything.\nvar transform = {};\n\n// string to ?\ntransform[\"string\"] = {\n    \"string\": identity,\n    \"array\": function(input) {\n        return stringToArrayLike(input, new Array(input.length));\n    },\n    \"arraybuffer\": function(input) {\n        return transform[\"string\"][\"uint8array\"](input).buffer;\n    },\n    \"uint8array\": function(input) {\n        return stringToArrayLike(input, new Uint8Array(input.length));\n    },\n    \"nodebuffer\": function(input) {\n        return stringToArrayLike(input, nodeBuffer(input.length));\n    }\n};\n\n// array to ?\ntransform[\"array\"] = {\n    \"string\": arrayLikeToString,\n    \"array\": identity,\n    \"arraybuffer\": function(input) {\n        return (new Uint8Array(input)).buffer;\n    },\n    \"uint8array\": function(input) {\n        return new Uint8Array(input);\n    },\n    \"nodebuffer\": function(input) {\n        return nodeBuffer(input);\n    }\n};\n\n// arraybuffer to ?\ntransform[\"arraybuffer\"] = {\n    \"string\": function(input) {\n        return arrayLikeToString(new Uint8Array(input));\n    },\n    \"array\": function(input) {\n        return arrayLikeToArrayLike(new Uint8Array(input), new Array(input.byteLength));\n    },\n    \"arraybuffer\": identity,\n    \"uint8array\": function(input) {\n        return new Uint8Array(input);\n    },\n    \"nodebuffer\": function(input) {\n        return nodeBuffer(new Uint8Array(input));\n    }\n};\n\n// uint8array to ?\ntransform[\"uint8array\"] = {\n    \"string\": arrayLikeToString,\n    \"array\": function(input) {\n        return arrayLikeToArrayLike(input, new Array(input.length));\n    },\n    \"arraybuffer\": function(input) {\n        return input.buffer;\n    },\n    \"uint8array\": identity,\n    \"nodebuffer\": function(input) {\n        return nodeBuffer(input);\n    }\n};\n\n// nodebuffer to ?\ntransform[\"nodebuffer\"] = {\n    \"string\": arrayLikeToString,\n    \"array\": function(input) {\n        return arrayLikeToArrayLike(input, new Array(input.length));\n    },\n    \"arraybuffer\": function(input) {\n        return transform[\"nodebuffer\"][\"uint8array\"](input).buffer;\n    },\n    \"uint8array\": function(input) {\n        return arrayLikeToArrayLike(input, new Uint8Array(input.length));\n    },\n    \"nodebuffer\": identity\n};\n\n/**\n * Transform an input into any type.\n * The supported output type are : string, array, uint8array, arraybuffer, nodebuffer.\n * If no output type is specified, the unmodified input will be returned.\n * @param {String} outputType the output type.\n * @param {String|Array|ArrayBuffer|Uint8Array|Buffer} input the input to convert.\n * @throws {Error} an Error if the browser doesn't support the requested output type.\n */\nexports.transformTo = function(outputType, input) {\n    if (!input) {\n        // undefined, null, etc\n        // an empty string won't harm.\n        input = \"\";\n    }\n    if (!outputType) {\n        return input;\n    }\n    exports.checkSupport(outputType);\n    var inputType = exports.getTypeOf(input);\n    var result = transform[inputType][outputType](input);\n    return result;\n};\n\n/**\n * Return the type of the input.\n * The type will be in a format valid for JSZip.utils.transformTo : string, array, uint8array, arraybuffer.\n * @param {Object} input the input to identify.\n * @return {String} the (lowercase) type of the input.\n */\nexports.getTypeOf = function(input) {\n    if (typeof input === \"string\") {\n        return \"string\";\n    }\n    if (Object.prototype.toString.call(input) === \"[object Array]\") {\n        return \"array\";\n    }\n    if (support.nodebuffer && nodeBuffer.test(input)) {\n        return \"nodebuffer\";\n    }\n    if (support.uint8array && input instanceof Uint8Array) {\n        return \"uint8array\";\n    }\n    if (support.arraybuffer && input instanceof ArrayBuffer) {\n        return \"arraybuffer\";\n    }\n};\n\n/**\n * Throw an exception if the type is not supported.\n * @param {String} type the type to check.\n * @throws {Error} an Error if the browser doesn't support the requested type.\n */\nexports.checkSupport = function(type) {\n    var supported = support[type.toLowerCase()];\n    if (!supported) {\n        throw new Error(type + \" is not supported by this browser\");\n    }\n};\nexports.MAX_VALUE_16BITS = 65535;\nexports.MAX_VALUE_32BITS = -1; // well, \"\\xFF\\xFF\\xFF\\xFF\\xFF\\xFF\\xFF\\xFF\" is parsed as -1\n\n/**\n * Prettify a string read as binary.\n * @param {string} str the string to prettify.\n * @return {string} a pretty string.\n */\nexports.pretty = function(str) {\n    var res = '',\n        code, i;\n    for (i = 0; i < (str || \"\").length; i++) {\n        code = str.charCodeAt(i);\n        res += '\\\\x' + (code < 16 ? \"0\" : \"\") + code.toString(16).toUpperCase();\n    }\n    return res;\n};\n\n/**\n * Find a compression registered in JSZip.\n * @param {string} compressionMethod the method magic to find.\n * @return {Object|null} the JSZip compression object, null if none found.\n */\nexports.findCompression = function(compressionMethod) {\n    for (var method in compressions) {\n        if (!compressions.hasOwnProperty(method)) {\n            continue;\n        }\n        if (compressions[method].magic === compressionMethod) {\n            return compressions[method];\n        }\n    }\n    return null;\n};\n/**\n* Cross-window, cross-Node-context regular expression detection\n* @param  {Object}  object Anything\n* @return {Boolean}        true if the object is a regular expression,\n* false otherwise\n*/\nexports.isRegExp = function (object) {\n    return Object.prototype.toString.call(object) === \"[object RegExp]\";\n};\n\n\n},{\"./compressions\":103,\"./nodeBuffer\":111,\"./support\":117}],122:[function(require,module,exports){\n'use strict';\nvar StringReader = require('./stringReader');\nvar NodeBufferReader = require('./nodeBufferReader');\nvar Uint8ArrayReader = require('./uint8ArrayReader');\nvar utils = require('./utils');\nvar sig = require('./signature');\nvar ZipEntry = require('./zipEntry');\nvar support = require('./support');\nvar jszipProto = require('./object');\n//  class ZipEntries {{{\n/**\n * All the entries in the zip file.\n * @constructor\n * @param {String|ArrayBuffer|Uint8Array} data the binary stream to load.\n * @param {Object} loadOptions Options for loading the stream.\n */\nfunction ZipEntries(data, loadOptions) {\n    this.files = [];\n    this.loadOptions = loadOptions;\n    if (data) {\n        this.load(data);\n    }\n}\nZipEntries.prototype = {\n    /**\n     * Check that the reader is on the speficied signature.\n     * @param {string} expectedSignature the expected signature.\n     * @throws {Error} if it is an other signature.\n     */\n    checkSignature: function(expectedSignature) {\n        var signature = this.reader.readString(4);\n        if (signature !== expectedSignature) {\n            throw new Error(\"Corrupted zip or bug : unexpected signature \" + \"(\" + utils.pretty(signature) + \", expected \" + utils.pretty(expectedSignature) + \")\");\n        }\n    },\n    /**\n     * Read the end of the central directory.\n     */\n    readBlockEndOfCentral: function() {\n        this.diskNumber = this.reader.readInt(2);\n        this.diskWithCentralDirStart = this.reader.readInt(2);\n        this.centralDirRecordsOnThisDisk = this.reader.readInt(2);\n        this.centralDirRecords = this.reader.readInt(2);\n        this.centralDirSize = this.reader.readInt(4);\n        this.centralDirOffset = this.reader.readInt(4);\n\n        this.zipCommentLength = this.reader.readInt(2);\n        // warning : the encoding depends of the system locale\n        // On a linux machine with LANG=en_US.utf8, this field is utf8 encoded.\n        // On a windows machine, this field is encoded with the localized windows code page.\n        this.zipComment = this.reader.readString(this.zipCommentLength);\n        // To get consistent behavior with the generation part, we will assume that\n        // this is utf8 encoded.\n        this.zipComment = jszipProto.utf8decode(this.zipComment);\n    },\n    /**\n     * Read the end of the Zip 64 central directory.\n     * Not merged with the method readEndOfCentral :\n     * The end of central can coexist with its Zip64 brother,\n     * I don't want to read the wrong number of bytes !\n     */\n    readBlockZip64EndOfCentral: function() {\n        this.zip64EndOfCentralSize = this.reader.readInt(8);\n        this.versionMadeBy = this.reader.readString(2);\n        this.versionNeeded = this.reader.readInt(2);\n        this.diskNumber = this.reader.readInt(4);\n        this.diskWithCentralDirStart = this.reader.readInt(4);\n        this.centralDirRecordsOnThisDisk = this.reader.readInt(8);\n        this.centralDirRecords = this.reader.readInt(8);\n        this.centralDirSize = this.reader.readInt(8);\n        this.centralDirOffset = this.reader.readInt(8);\n\n        this.zip64ExtensibleData = {};\n        var extraDataSize = this.zip64EndOfCentralSize - 44,\n            index = 0,\n            extraFieldId,\n            extraFieldLength,\n            extraFieldValue;\n        while (index < extraDataSize) {\n            extraFieldId = this.reader.readInt(2);\n            extraFieldLength = this.reader.readInt(4);\n            extraFieldValue = this.reader.readString(extraFieldLength);\n            this.zip64ExtensibleData[extraFieldId] = {\n                id: extraFieldId,\n                length: extraFieldLength,\n                value: extraFieldValue\n            };\n        }\n    },\n    /**\n     * Read the end of the Zip 64 central directory locator.\n     */\n    readBlockZip64EndOfCentralLocator: function() {\n        this.diskWithZip64CentralDirStart = this.reader.readInt(4);\n        this.relativeOffsetEndOfZip64CentralDir = this.reader.readInt(8);\n        this.disksCount = this.reader.readInt(4);\n        if (this.disksCount > 1) {\n            throw new Error(\"Multi-volumes zip are not supported\");\n        }\n    },\n    /**\n     * Read the local files, based on the offset read in the central part.\n     */\n    readLocalFiles: function() {\n        var i, file;\n        for (i = 0; i < this.files.length; i++) {\n            file = this.files[i];\n            this.reader.setIndex(file.localHeaderOffset);\n            this.checkSignature(sig.LOCAL_FILE_HEADER);\n            file.readLocalPart(this.reader);\n            file.handleUTF8();\n            file.processAttributes();\n        }\n    },\n    /**\n     * Read the central directory.\n     */\n    readCentralDir: function() {\n        var file;\n\n        this.reader.setIndex(this.centralDirOffset);\n        while (this.reader.readString(4) === sig.CENTRAL_FILE_HEADER) {\n            file = new ZipEntry({\n                zip64: this.zip64\n            }, this.loadOptions);\n            file.readCentralPart(this.reader);\n            this.files.push(file);\n        }\n    },\n    /**\n     * Read the end of central directory.\n     */\n    readEndOfCentral: function() {\n        var offset = this.reader.lastIndexOfSignature(sig.CENTRAL_DIRECTORY_END);\n        if (offset === -1) {\n            // Check if the content is a truncated zip or complete garbage.\n            // A \"LOCAL_FILE_HEADER\" is not required at the beginning (auto\n            // extractible zip for example) but it can give a good hint.\n            // If an ajax request was used without responseType, we will also\n            // get unreadable data.\n            var isGarbage = true;\n            try {\n                this.reader.setIndex(0);\n                this.checkSignature(sig.LOCAL_FILE_HEADER);\n                isGarbage = false;\n            } catch (e) {}\n\n            if (isGarbage) {\n                throw new Error(\"Can't find end of central directory : is this a zip file ? \" +\n                                \"If it is, see http://stuk.github.io/jszip/documentation/howto/read_zip.html\");\n            } else {\n                throw new Error(\"Corrupted zip : can't find end of central directory\");\n            }\n        }\n        this.reader.setIndex(offset);\n        this.checkSignature(sig.CENTRAL_DIRECTORY_END);\n        this.readBlockEndOfCentral();\n\n\n        /* extract from the zip spec :\n            4)  If one of the fields in the end of central directory\n                record is too small to hold required data, the field\n                should be set to -1 (0xFFFF or 0xFFFFFFFF) and the\n                ZIP64 format record should be created.\n            5)  The end of central directory record and the\n                Zip64 end of central directory locator record must\n                reside on the same disk when splitting or spanning\n                an archive.\n         */\n        if (this.diskNumber === utils.MAX_VALUE_16BITS || this.diskWithCentralDirStart === utils.MAX_VALUE_16BITS || this.centralDirRecordsOnThisDisk === utils.MAX_VALUE_16BITS || this.centralDirRecords === utils.MAX_VALUE_16BITS || this.centralDirSize === utils.MAX_VALUE_32BITS || this.centralDirOffset === utils.MAX_VALUE_32BITS) {\n            this.zip64 = true;\n\n            /*\n            Warning : the zip64 extension is supported, but ONLY if the 64bits integer read from\n            the zip file can fit into a 32bits integer. This cannot be solved : Javascript represents\n            all numbers as 64-bit double precision IEEE 754 floating point numbers.\n            So, we have 53bits for integers and bitwise operations treat everything as 32bits.\n            see https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Operators/Bitwise_Operators\n            and http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-262.pdf section 8.5\n            */\n\n            // should look for a zip64 EOCD locator\n            offset = this.reader.lastIndexOfSignature(sig.ZIP64_CENTRAL_DIRECTORY_LOCATOR);\n            if (offset === -1) {\n                throw new Error(\"Corrupted zip : can't find the ZIP64 end of central directory locator\");\n            }\n            this.reader.setIndex(offset);\n            this.checkSignature(sig.ZIP64_CENTRAL_DIRECTORY_LOCATOR);\n            this.readBlockZip64EndOfCentralLocator();\n\n            // now the zip64 EOCD record\n            this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir);\n            this.checkSignature(sig.ZIP64_CENTRAL_DIRECTORY_END);\n            this.readBlockZip64EndOfCentral();\n        }\n    },\n    prepareReader: function(data) {\n        var type = utils.getTypeOf(data);\n        if (type === \"string\" && !support.uint8array) {\n            this.reader = new StringReader(data, this.loadOptions.optimizedBinaryString);\n        }\n        else if (type === \"nodebuffer\") {\n            this.reader = new NodeBufferReader(data);\n        }\n        else {\n            this.reader = new Uint8ArrayReader(utils.transformTo(\"uint8array\", data));\n        }\n    },\n    /**\n     * Read a zip file and create ZipEntries.\n     * @param {String|ArrayBuffer|Uint8Array|Buffer} data the binary string representing a zip file.\n     */\n    load: function(data) {\n        this.prepareReader(data);\n        this.readEndOfCentral();\n        this.readCentralDir();\n        this.readLocalFiles();\n    }\n};\n// }}} end of ZipEntries\nmodule.exports = ZipEntries;\n\n},{\"./nodeBufferReader\":112,\"./object\":113,\"./signature\":114,\"./stringReader\":115,\"./support\":117,\"./uint8ArrayReader\":118,\"./utils\":121,\"./zipEntry\":123}],123:[function(require,module,exports){\n'use strict';\nvar StringReader = require('./stringReader');\nvar utils = require('./utils');\nvar CompressedObject = require('./compressedObject');\nvar jszipProto = require('./object');\n\nvar MADE_BY_DOS = 0x00;\nvar MADE_BY_UNIX = 0x03;\n\n// class ZipEntry {{{\n/**\n * An entry in the zip file.\n * @constructor\n * @param {Object} options Options of the current file.\n * @param {Object} loadOptions Options for loading the stream.\n */\nfunction ZipEntry(options, loadOptions) {\n    this.options = options;\n    this.loadOptions = loadOptions;\n}\nZipEntry.prototype = {\n    /**\n     * say if the file is encrypted.\n     * @return {boolean} true if the file is encrypted, false otherwise.\n     */\n    isEncrypted: function() {\n        // bit 1 is set\n        return (this.bitFlag & 0x0001) === 0x0001;\n    },\n    /**\n     * say if the file has utf-8 filename/comment.\n     * @return {boolean} true if the filename/comment is in utf-8, false otherwise.\n     */\n    useUTF8: function() {\n        // bit 11 is set\n        return (this.bitFlag & 0x0800) === 0x0800;\n    },\n    /**\n     * Prepare the function used to generate the compressed content from this ZipFile.\n     * @param {DataReader} reader the reader to use.\n     * @param {number} from the offset from where we should read the data.\n     * @param {number} length the length of the data to read.\n     * @return {Function} the callback to get the compressed content (the type depends of the DataReader class).\n     */\n    prepareCompressedContent: function(reader, from, length) {\n        return function() {\n            var previousIndex = reader.index;\n            reader.setIndex(from);\n            var compressedFileData = reader.readData(length);\n            reader.setIndex(previousIndex);\n\n            return compressedFileData;\n        };\n    },\n    /**\n     * Prepare the function used to generate the uncompressed content from this ZipFile.\n     * @param {DataReader} reader the reader to use.\n     * @param {number} from the offset from where we should read the data.\n     * @param {number} length the length of the data to read.\n     * @param {JSZip.compression} compression the compression used on this file.\n     * @param {number} uncompressedSize the uncompressed size to expect.\n     * @return {Function} the callback to get the uncompressed content (the type depends of the DataReader class).\n     */\n    prepareContent: function(reader, from, length, compression, uncompressedSize) {\n        return function() {\n\n            var compressedFileData = utils.transformTo(compression.uncompressInputType, this.getCompressedContent());\n            var uncompressedFileData = compression.uncompress(compressedFileData);\n\n            if (uncompressedFileData.length !== uncompressedSize) {\n                throw new Error(\"Bug : uncompressed data size mismatch\");\n            }\n\n            return uncompressedFileData;\n        };\n    },\n    /**\n     * Read the local part of a zip file and add the info in this object.\n     * @param {DataReader} reader the reader to use.\n     */\n    readLocalPart: function(reader) {\n        var compression, localExtraFieldsLength;\n\n        // we already know everything from the central dir !\n        // If the central dir data are false, we are doomed.\n        // On the bright side, the local part is scary  : zip64, data descriptors, both, etc.\n        // The less data we get here, the more reliable this should be.\n        // Let's skip the whole header and dash to the data !\n        reader.skip(22);\n        // in some zip created on windows, the filename stored in the central dir contains \\ instead of /.\n        // Strangely, the filename here is OK.\n        // I would love to treat these zip files as corrupted (see http://www.info-zip.org/FAQ.html#backslashes\n        // or APPNOTE#4.4.17.1, \"All slashes MUST be forward slashes '/'\") but there are a lot of bad zip generators...\n        // Search \"unzip mismatching \"local\" filename continuing with \"central\" filename version\" on\n        // the internet.\n        //\n        // I think I see the logic here : the central directory is used to display\n        // content and the local directory is used to extract the files. Mixing / and \\\n        // may be used to display \\ to windows users and use / when extracting the files.\n        // Unfortunately, this lead also to some issues : http://seclists.org/fulldisclosure/2009/Sep/394\n        this.fileNameLength = reader.readInt(2);\n        localExtraFieldsLength = reader.readInt(2); // can't be sure this will be the same as the central dir\n        this.fileName = reader.readString(this.fileNameLength);\n        reader.skip(localExtraFieldsLength);\n\n        if (this.compressedSize == -1 || this.uncompressedSize == -1) {\n            throw new Error(\"Bug or corrupted zip : didn't get enough informations from the central directory \" + \"(compressedSize == -1 || uncompressedSize == -1)\");\n        }\n\n        compression = utils.findCompression(this.compressionMethod);\n        if (compression === null) { // no compression found\n            throw new Error(\"Corrupted zip : compression \" + utils.pretty(this.compressionMethod) + \" unknown (inner file : \" + this.fileName + \")\");\n        }\n        this.decompressed = new CompressedObject();\n        this.decompressed.compressedSize = this.compressedSize;\n        this.decompressed.uncompressedSize = this.uncompressedSize;\n        this.decompressed.crc32 = this.crc32;\n        this.decompressed.compressionMethod = this.compressionMethod;\n        this.decompressed.getCompressedContent = this.prepareCompressedContent(reader, reader.index, this.compressedSize, compression);\n        this.decompressed.getContent = this.prepareContent(reader, reader.index, this.compressedSize, compression, this.uncompressedSize);\n\n        // we need to compute the crc32...\n        if (this.loadOptions.checkCRC32) {\n            this.decompressed = utils.transformTo(\"string\", this.decompressed.getContent());\n            if (jszipProto.crc32(this.decompressed) !== this.crc32) {\n                throw new Error(\"Corrupted zip : CRC32 mismatch\");\n            }\n        }\n    },\n\n    /**\n     * Read the central part of a zip file and add the info in this object.\n     * @param {DataReader} reader the reader to use.\n     */\n    readCentralPart: function(reader) {\n        this.versionMadeBy = reader.readInt(2);\n        this.versionNeeded = reader.readInt(2);\n        this.bitFlag = reader.readInt(2);\n        this.compressionMethod = reader.readString(2);\n        this.date = reader.readDate();\n        this.crc32 = reader.readInt(4);\n        this.compressedSize = reader.readInt(4);\n        this.uncompressedSize = reader.readInt(4);\n        this.fileNameLength = reader.readInt(2);\n        this.extraFieldsLength = reader.readInt(2);\n        this.fileCommentLength = reader.readInt(2);\n        this.diskNumberStart = reader.readInt(2);\n        this.internalFileAttributes = reader.readInt(2);\n        this.externalFileAttributes = reader.readInt(4);\n        this.localHeaderOffset = reader.readInt(4);\n\n        if (this.isEncrypted()) {\n            throw new Error(\"Encrypted zip are not supported\");\n        }\n\n        this.fileName = reader.readString(this.fileNameLength);\n        this.readExtraFields(reader);\n        this.parseZIP64ExtraField(reader);\n        this.fileComment = reader.readString(this.fileCommentLength);\n    },\n\n    /**\n     * Parse the external file attributes and get the unix/dos permissions.\n     */\n    processAttributes: function () {\n        this.unixPermissions = null;\n        this.dosPermissions = null;\n        var madeBy = this.versionMadeBy >> 8;\n\n        // Check if we have the DOS directory flag set.\n        // We look for it in the DOS and UNIX permissions\n        // but some unknown platform could set it as a compatibility flag.\n        this.dir = this.externalFileAttributes & 0x0010 ? true : false;\n\n        if(madeBy === MADE_BY_DOS) {\n            // first 6 bits (0 to 5)\n            this.dosPermissions = this.externalFileAttributes & 0x3F;\n        }\n\n        if(madeBy === MADE_BY_UNIX) {\n            this.unixPermissions = (this.externalFileAttributes >> 16) & 0xFFFF;\n            // the octal permissions are in (this.unixPermissions & 0x01FF).toString(8);\n        }\n\n        // fail safe : if the name ends with a / it probably means a folder\n        if (!this.dir && this.fileName.slice(-1) === '/') {\n            this.dir = true;\n        }\n    },\n\n    /**\n     * Parse the ZIP64 extra field and merge the info in the current ZipEntry.\n     * @param {DataReader} reader the reader to use.\n     */\n    parseZIP64ExtraField: function(reader) {\n\n        if (!this.extraFields[0x0001]) {\n            return;\n        }\n\n        // should be something, preparing the extra reader\n        var extraReader = new StringReader(this.extraFields[0x0001].value);\n\n        // I really hope that these 64bits integer can fit in 32 bits integer, because js\n        // won't let us have more.\n        if (this.uncompressedSize === utils.MAX_VALUE_32BITS) {\n            this.uncompressedSize = extraReader.readInt(8);\n        }\n        if (this.compressedSize === utils.MAX_VALUE_32BITS) {\n            this.compressedSize = extraReader.readInt(8);\n        }\n        if (this.localHeaderOffset === utils.MAX_VALUE_32BITS) {\n            this.localHeaderOffset = extraReader.readInt(8);\n        }\n        if (this.diskNumberStart === utils.MAX_VALUE_32BITS) {\n            this.diskNumberStart = extraReader.readInt(4);\n        }\n    },\n    /**\n     * Read the central part of a zip file and add the info in this object.\n     * @param {DataReader} reader the reader to use.\n     */\n    readExtraFields: function(reader) {\n        var start = reader.index,\n            extraFieldId,\n            extraFieldLength,\n            extraFieldValue;\n\n        this.extraFields = this.extraFields || {};\n\n        while (reader.index < start + this.extraFieldsLength) {\n            extraFieldId = reader.readInt(2);\n            extraFieldLength = reader.readInt(2);\n            extraFieldValue = reader.readString(extraFieldLength);\n\n            this.extraFields[extraFieldId] = {\n                id: extraFieldId,\n                length: extraFieldLength,\n                value: extraFieldValue\n            };\n        }\n    },\n    /**\n     * Apply an UTF8 transformation if needed.\n     */\n    handleUTF8: function() {\n        if (this.useUTF8()) {\n            this.fileName = jszipProto.utf8decode(this.fileName);\n            this.fileComment = jszipProto.utf8decode(this.fileComment);\n        } else {\n            var upath = this.findExtraFieldUnicodePath();\n            if (upath !== null) {\n                this.fileName = upath;\n            }\n            var ucomment = this.findExtraFieldUnicodeComment();\n            if (ucomment !== null) {\n                this.fileComment = ucomment;\n            }\n        }\n    },\n\n    /**\n     * Find the unicode path declared in the extra field, if any.\n     * @return {String} the unicode path, null otherwise.\n     */\n    findExtraFieldUnicodePath: function() {\n        var upathField = this.extraFields[0x7075];\n        if (upathField) {\n            var extraReader = new StringReader(upathField.value);\n\n            // wrong version\n            if (extraReader.readInt(1) !== 1) {\n                return null;\n            }\n\n            // the crc of the filename changed, this field is out of date.\n            if (jszipProto.crc32(this.fileName) !== extraReader.readInt(4)) {\n                return null;\n            }\n\n            return jszipProto.utf8decode(extraReader.readString(upathField.length - 5));\n        }\n        return null;\n    },\n\n    /**\n     * Find the unicode comment declared in the extra field, if any.\n     * @return {String} the unicode comment, null otherwise.\n     */\n    findExtraFieldUnicodeComment: function() {\n        var ucommentField = this.extraFields[0x6375];\n        if (ucommentField) {\n            var extraReader = new StringReader(ucommentField.value);\n\n            // wrong version\n            if (extraReader.readInt(1) !== 1) {\n                return null;\n            }\n\n            // the crc of the comment changed, this field is out of date.\n            if (jszipProto.crc32(this.fileComment) !== extraReader.readInt(4)) {\n                return null;\n            }\n\n            return jszipProto.utf8decode(extraReader.readString(ucommentField.length - 5));\n        }\n        return null;\n    }\n};\nmodule.exports = ZipEntry;\n\n},{\"./compressedObject\":102,\"./object\":113,\"./stringReader\":115,\"./utils\":121}],124:[function(require,module,exports){\n// Top level file is just a mixin of submodules & constants\n'use strict';\n\nvar assign    = require('./lib/utils/common').assign;\n\nvar deflate   = require('./lib/deflate');\nvar inflate   = require('./lib/inflate');\nvar constants = require('./lib/zlib/constants');\n\nvar pako = {};\n\nassign(pako, deflate, inflate, constants);\n\nmodule.exports = pako;\n\n},{\"./lib/deflate\":125,\"./lib/inflate\":126,\"./lib/utils/common\":127,\"./lib/zlib/constants\":130}],125:[function(require,module,exports){\n'use strict';\n\n\nvar zlib_deflate = require('./zlib/deflate.js');\nvar utils = require('./utils/common');\nvar strings = require('./utils/strings');\nvar msg = require('./zlib/messages');\nvar zstream = require('./zlib/zstream');\n\nvar toString = Object.prototype.toString;\n\n/* Public constants ==========================================================*/\n/* ===========================================================================*/\n\nvar Z_NO_FLUSH      = 0;\nvar Z_FINISH        = 4;\n\nvar Z_OK            = 0;\nvar Z_STREAM_END    = 1;\nvar Z_SYNC_FLUSH    = 2;\n\nvar Z_DEFAULT_COMPRESSION = -1;\n\nvar Z_DEFAULT_STRATEGY    = 0;\n\nvar Z_DEFLATED  = 8;\n\n/* ===========================================================================*/\n\n\n/**\n * class Deflate\n *\n * Generic JS-style wrapper for zlib calls. If you don't need\n * streaming behaviour - use more simple functions: [[deflate]],\n * [[deflateRaw]] and [[gzip]].\n **/\n\n/* internal\n * Deflate.chunks -> Array\n *\n * Chunks of output data, if [[Deflate#onData]] not overriden.\n **/\n\n/**\n * Deflate.result -> Uint8Array|Array\n *\n * Compressed result, generated by default [[Deflate#onData]]\n * and [[Deflate#onEnd]] handlers. Filled after you push last chunk\n * (call [[Deflate#push]] with `Z_FINISH` / `true` param)  or if you\n * push a chunk with explicit flush (call [[Deflate#push]] with\n * `Z_SYNC_FLUSH` param).\n **/\n\n/**\n * Deflate.err -> Number\n *\n * Error code after deflate finished. 0 (Z_OK) on success.\n * You will not need it in real life, because deflate errors\n * are possible only on wrong options or bad `onData` / `onEnd`\n * custom handlers.\n **/\n\n/**\n * Deflate.msg -> String\n *\n * Error message, if [[Deflate.err]] != 0\n **/\n\n\n/**\n * new Deflate(options)\n * - options (Object): zlib deflate options.\n *\n * Creates new deflator instance with specified params. Throws exception\n * on bad params. Supported options:\n *\n * - `level`\n * - `windowBits`\n * - `memLevel`\n * - `strategy`\n *\n * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced)\n * for more information on these.\n *\n * Additional options, for internal needs:\n *\n * - `chunkSize` - size of generated data chunks (16K by default)\n * - `raw` (Boolean) - do raw deflate\n * - `gzip` (Boolean) - create gzip wrapper\n * - `to` (String) - if equal to 'string', then result will be \"binary string\"\n *    (each char code [0..255])\n * - `header` (Object) - custom header for gzip\n *   - `text` (Boolean) - true if compressed data believed to be text\n *   - `time` (Number) - modification time, unix timestamp\n *   - `os` (Number) - operation system code\n *   - `extra` (Array) - array of bytes with extra data (max 65536)\n *   - `name` (String) - file name (binary string)\n *   - `comment` (String) - comment (binary string)\n *   - `hcrc` (Boolean) - true if header crc should be added\n *\n * ##### Example:\n *\n * ```javascript\n * var pako = require('pako')\n *   , chunk1 = Uint8Array([1,2,3,4,5,6,7,8,9])\n *   , chunk2 = Uint8Array([10,11,12,13,14,15,16,17,18,19]);\n *\n * var deflate = new pako.Deflate({ level: 3});\n *\n * deflate.push(chunk1, false);\n * deflate.push(chunk2, true);  // true -> last chunk\n *\n * if (deflate.err) { throw new Error(deflate.err); }\n *\n * console.log(deflate.result);\n * ```\n **/\nvar Deflate = function(options) {\n\n  this.options = utils.assign({\n    level: Z_DEFAULT_COMPRESSION,\n    method: Z_DEFLATED,\n    chunkSize: 16384,\n    windowBits: 15,\n    memLevel: 8,\n    strategy: Z_DEFAULT_STRATEGY,\n    to: ''\n  }, options || {});\n\n  var opt = this.options;\n\n  if (opt.raw && (opt.windowBits > 0)) {\n    opt.windowBits = -opt.windowBits;\n  }\n\n  else if (opt.gzip && (opt.windowBits > 0) && (opt.windowBits < 16)) {\n    opt.windowBits += 16;\n  }\n\n  this.err    = 0;      // error code, if happens (0 = Z_OK)\n  this.msg    = '';     // error message\n  this.ended  = false;  // used to avoid multiple onEnd() calls\n  this.chunks = [];     // chunks of compressed data\n\n  this.strm = new zstream();\n  this.strm.avail_out = 0;\n\n  var status = zlib_deflate.deflateInit2(\n    this.strm,\n    opt.level,\n    opt.method,\n    opt.windowBits,\n    opt.memLevel,\n    opt.strategy\n  );\n\n  if (status !== Z_OK) {\n    throw new Error(msg[status]);\n  }\n\n  if (opt.header) {\n    zlib_deflate.deflateSetHeader(this.strm, opt.header);\n  }\n};\n\n/**\n * Deflate#push(data[, mode]) -> Boolean\n * - data (Uint8Array|Array|ArrayBuffer|String): input data. Strings will be\n *   converted to utf8 byte sequence.\n * - mode (Number|Boolean): 0..6 for corresponding Z_NO_FLUSH..Z_TREE modes.\n *   See constants. Skipped or `false` means Z_NO_FLUSH, `true` meansh Z_FINISH.\n *\n * Sends input data to deflate pipe, generating [[Deflate#onData]] calls with\n * new compressed chunks. Returns `true` on success. The last data block must have\n * mode Z_FINISH (or `true`). That will flush internal pending buffers and call\n * [[Deflate#onEnd]]. For interim explicit flushes (without ending the stream) you\n * can use mode Z_SYNC_FLUSH, keeping the compression context.\n *\n * On fail call [[Deflate#onEnd]] with error code and return false.\n *\n * We strongly recommend to use `Uint8Array` on input for best speed (output\n * array format is detected automatically). Also, don't skip last param and always\n * use the same type in your code (boolean or number). That will improve JS speed.\n *\n * For regular `Array`-s make sure all elements are [0..255].\n *\n * ##### Example\n *\n * ```javascript\n * push(chunk, false); // push one of data chunks\n * ...\n * push(chunk, true);  // push last chunk\n * ```\n **/\nDeflate.prototype.push = function(data, mode) {\n  var strm = this.strm;\n  var chunkSize = this.options.chunkSize;\n  var status, _mode;\n\n  if (this.ended) { return false; }\n\n  _mode = (mode === ~~mode) ? mode : ((mode === true) ? Z_FINISH : Z_NO_FLUSH);\n\n  // Convert data if needed\n  if (typeof data === 'string') {\n    // If we need to compress text, change encoding to utf8.\n    strm.input = strings.string2buf(data);\n  } else if (toString.call(data) === '[object ArrayBuffer]') {\n    strm.input = new Uint8Array(data);\n  } else {\n    strm.input = data;\n  }\n\n  strm.next_in = 0;\n  strm.avail_in = strm.input.length;\n\n  do {\n    if (strm.avail_out === 0) {\n      strm.output = new utils.Buf8(chunkSize);\n      strm.next_out = 0;\n      strm.avail_out = chunkSize;\n    }\n    status = zlib_deflate.deflate(strm, _mode);    /* no bad return value */\n\n    if (status !== Z_STREAM_END && status !== Z_OK) {\n      this.onEnd(status);\n      this.ended = true;\n      return false;\n    }\n    if (strm.avail_out === 0 || (strm.avail_in === 0 && (_mode === Z_FINISH || _mode === Z_SYNC_FLUSH))) {\n      if (this.options.to === 'string') {\n        this.onData(strings.buf2binstring(utils.shrinkBuf(strm.output, strm.next_out)));\n      } else {\n        this.onData(utils.shrinkBuf(strm.output, strm.next_out));\n      }\n    }\n  } while ((strm.avail_in > 0 || strm.avail_out === 0) && status !== Z_STREAM_END);\n\n  // Finalize on the last chunk.\n  if (_mode === Z_FINISH) {\n    status = zlib_deflate.deflateEnd(this.strm);\n    this.onEnd(status);\n    this.ended = true;\n    return status === Z_OK;\n  }\n\n  // callback interim results if Z_SYNC_FLUSH.\n  if (_mode === Z_SYNC_FLUSH) {\n    this.onEnd(Z_OK);\n    strm.avail_out = 0;\n    return true;\n  }\n\n  return true;\n};\n\n\n/**\n * Deflate#onData(chunk) -> Void\n * - chunk (Uint8Array|Array|String): ouput data. Type of array depends\n *   on js engine support. When string output requested, each chunk\n *   will be string.\n *\n * By default, stores data blocks in `chunks[]` property and glue\n * those in `onEnd`. Override this handler, if you need another behaviour.\n **/\nDeflate.prototype.onData = function(chunk) {\n  this.chunks.push(chunk);\n};\n\n\n/**\n * Deflate#onEnd(status) -> Void\n * - status (Number): deflate status. 0 (Z_OK) on success,\n *   other if not.\n *\n * Called once after you tell deflate that the input stream is\n * complete (Z_FINISH) or should be flushed (Z_SYNC_FLUSH)\n * or if an error happened. By default - join collected chunks,\n * free memory and fill `results` / `err` properties.\n **/\nDeflate.prototype.onEnd = function(status) {\n  // On success - join\n  if (status === Z_OK) {\n    if (this.options.to === 'string') {\n      this.result = this.chunks.join('');\n    } else {\n      this.result = utils.flattenChunks(this.chunks);\n    }\n  }\n  this.chunks = [];\n  this.err = status;\n  this.msg = this.strm.msg;\n};\n\n\n/**\n * deflate(data[, options]) -> Uint8Array|Array|String\n * - data (Uint8Array|Array|String): input data to compress.\n * - options (Object): zlib deflate options.\n *\n * Compress `data` with deflate alrorythm and `options`.\n *\n * Supported options are:\n *\n * - level\n * - windowBits\n * - memLevel\n * - strategy\n *\n * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced)\n * for more information on these.\n *\n * Sugar (options):\n *\n * - `raw` (Boolean) - say that we work with raw stream, if you don't wish to specify\n *   negative windowBits implicitly.\n * - `to` (String) - if equal to 'string', then result will be \"binary string\"\n *    (each char code [0..255])\n *\n * ##### Example:\n *\n * ```javascript\n * var pako = require('pako')\n *   , data = Uint8Array([1,2,3,4,5,6,7,8,9]);\n *\n * console.log(pako.deflate(data));\n * ```\n **/\nfunction deflate(input, options) {\n  var deflator = new Deflate(options);\n\n  deflator.push(input, true);\n\n  // That will never happens, if you don't cheat with options :)\n  if (deflator.err) { throw deflator.msg; }\n\n  return deflator.result;\n}\n\n\n/**\n * deflateRaw(data[, options]) -> Uint8Array|Array|String\n * - data (Uint8Array|Array|String): input data to compress.\n * - options (Object): zlib deflate options.\n *\n * The same as [[deflate]], but creates raw data, without wrapper\n * (header and adler32 crc).\n **/\nfunction deflateRaw(input, options) {\n  options = options || {};\n  options.raw = true;\n  return deflate(input, options);\n}\n\n\n/**\n * gzip(data[, options]) -> Uint8Array|Array|String\n * - data (Uint8Array|Array|String): input data to compress.\n * - options (Object): zlib deflate options.\n *\n * The same as [[deflate]], but create gzip wrapper instead of\n * deflate one.\n **/\nfunction gzip(input, options) {\n  options = options || {};\n  options.gzip = true;\n  return deflate(input, options);\n}\n\n\nexports.Deflate = Deflate;\nexports.deflate = deflate;\nexports.deflateRaw = deflateRaw;\nexports.gzip = gzip;\n\n},{\"./utils/common\":127,\"./utils/strings\":128,\"./zlib/deflate.js\":132,\"./zlib/messages\":137,\"./zlib/zstream\":139}],126:[function(require,module,exports){\n'use strict';\n\n\nvar zlib_inflate = require('./zlib/inflate.js');\nvar utils = require('./utils/common');\nvar strings = require('./utils/strings');\nvar c = require('./zlib/constants');\nvar msg = require('./zlib/messages');\nvar zstream = require('./zlib/zstream');\nvar gzheader = require('./zlib/gzheader');\n\nvar toString = Object.prototype.toString;\n\n/**\n * class Inflate\n *\n * Generic JS-style wrapper for zlib calls. If you don't need\n * streaming behaviour - use more simple functions: [[inflate]]\n * and [[inflateRaw]].\n **/\n\n/* internal\n * inflate.chunks -> Array\n *\n * Chunks of output data, if [[Inflate#onData]] not overriden.\n **/\n\n/**\n * Inflate.result -> Uint8Array|Array|String\n *\n * Uncompressed result, generated by default [[Inflate#onData]]\n * and [[Inflate#onEnd]] handlers. Filled after you push last chunk\n * (call [[Inflate#push]] with `Z_FINISH` / `true` param) or if you\n * push a chunk with explicit flush (call [[Inflate#push]] with\n * `Z_SYNC_FLUSH` param).\n **/\n\n/**\n * Inflate.err -> Number\n *\n * Error code after inflate finished. 0 (Z_OK) on success.\n * Should be checked if broken data possible.\n **/\n\n/**\n * Inflate.msg -> String\n *\n * Error message, if [[Inflate.err]] != 0\n **/\n\n\n/**\n * new Inflate(options)\n * - options (Object): zlib inflate options.\n *\n * Creates new inflator instance with specified params. Throws exception\n * on bad params. Supported options:\n *\n * - `windowBits`\n *\n * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced)\n * for more information on these.\n *\n * Additional options, for internal needs:\n *\n * - `chunkSize` - size of generated data chunks (16K by default)\n * - `raw` (Boolean) - do raw inflate\n * - `to` (String) - if equal to 'string', then result will be converted\n *   from utf8 to utf16 (javascript) string. When string output requested,\n *   chunk length can differ from `chunkSize`, depending on content.\n *\n * By default, when no options set, autodetect deflate/gzip data format via\n * wrapper header.\n *\n * ##### Example:\n *\n * ```javascript\n * var pako = require('pako')\n *   , chunk1 = Uint8Array([1,2,3,4,5,6,7,8,9])\n *   , chunk2 = Uint8Array([10,11,12,13,14,15,16,17,18,19]);\n *\n * var inflate = new pako.Inflate({ level: 3});\n *\n * inflate.push(chunk1, false);\n * inflate.push(chunk2, true);  // true -> last chunk\n *\n * if (inflate.err) { throw new Error(inflate.err); }\n *\n * console.log(inflate.result);\n * ```\n **/\nvar Inflate = function(options) {\n\n  this.options = utils.assign({\n    chunkSize: 16384,\n    windowBits: 0,\n    to: ''\n  }, options || {});\n\n  var opt = this.options;\n\n  // Force window size for `raw` data, if not set directly,\n  // because we have no header for autodetect.\n  if (opt.raw && (opt.windowBits >= 0) && (opt.windowBits < 16)) {\n    opt.windowBits = -opt.windowBits;\n    if (opt.windowBits === 0) { opt.windowBits = -15; }\n  }\n\n  // If `windowBits` not defined (and mode not raw) - set autodetect flag for gzip/deflate\n  if ((opt.windowBits >= 0) && (opt.windowBits < 16) &&\n      !(options && options.windowBits)) {\n    opt.windowBits += 32;\n  }\n\n  // Gzip header has no info about windows size, we can do autodetect only\n  // for deflate. So, if window size not set, force it to max when gzip possible\n  if ((opt.windowBits > 15) && (opt.windowBits < 48)) {\n    // bit 3 (16) -> gzipped data\n    // bit 4 (32) -> autodetect gzip/deflate\n    if ((opt.windowBits & 15) === 0) {\n      opt.windowBits |= 15;\n    }\n  }\n\n  this.err    = 0;      // error code, if happens (0 = Z_OK)\n  this.msg    = '';     // error message\n  this.ended  = false;  // used to avoid multiple onEnd() calls\n  this.chunks = [];     // chunks of compressed data\n\n  this.strm   = new zstream();\n  this.strm.avail_out = 0;\n\n  var status  = zlib_inflate.inflateInit2(\n    this.strm,\n    opt.windowBits\n  );\n\n  if (status !== c.Z_OK) {\n    throw new Error(msg[status]);\n  }\n\n  this.header = new gzheader();\n\n  zlib_inflate.inflateGetHeader(this.strm, this.header);\n};\n\n/**\n * Inflate#push(data[, mode]) -> Boolean\n * - data (Uint8Array|Array|ArrayBuffer|String): input data\n * - mode (Number|Boolean): 0..6 for corresponding Z_NO_FLUSH..Z_TREE modes.\n *   See constants. Skipped or `false` means Z_NO_FLUSH, `true` meansh Z_FINISH.\n *\n * Sends input data to inflate pipe, generating [[Inflate#onData]] calls with\n * new output chunks. Returns `true` on success. The last data block must have\n * mode Z_FINISH (or `true`). That will flush internal pending buffers and call\n * [[Inflate#onEnd]]. For interim explicit flushes (without ending the stream) you\n * can use mode Z_SYNC_FLUSH, keeping the decompression context.\n *\n * On fail call [[Inflate#onEnd]] with error code and return false.\n *\n * We strongly recommend to use `Uint8Array` on input for best speed (output\n * format is detected automatically). Also, don't skip last param and always\n * use the same type in your code (boolean or number). That will improve JS speed.\n *\n * For regular `Array`-s make sure all elements are [0..255].\n *\n * ##### Example\n *\n * ```javascript\n * push(chunk, false); // push one of data chunks\n * ...\n * push(chunk, true);  // push last chunk\n * ```\n **/\nInflate.prototype.push = function(data, mode) {\n  var strm = this.strm;\n  var chunkSize = this.options.chunkSize;\n  var status, _mode;\n  var next_out_utf8, tail, utf8str;\n\n  if (this.ended) { return false; }\n  _mode = (mode === ~~mode) ? mode : ((mode === true) ? c.Z_FINISH : c.Z_NO_FLUSH);\n\n  // Convert data if needed\n  if (typeof data === 'string') {\n    // Only binary strings can be decompressed on practice\n    strm.input = strings.binstring2buf(data);\n  } else if (toString.call(data) === '[object ArrayBuffer]') {\n    strm.input = new Uint8Array(data);\n  } else {\n    strm.input = data;\n  }\n\n  strm.next_in = 0;\n  strm.avail_in = strm.input.length;\n\n  do {\n    if (strm.avail_out === 0) {\n      strm.output = new utils.Buf8(chunkSize);\n      strm.next_out = 0;\n      strm.avail_out = chunkSize;\n    }\n\n    status = zlib_inflate.inflate(strm, c.Z_NO_FLUSH);    /* no bad return value */\n\n    if (status !== c.Z_STREAM_END && status !== c.Z_OK) {\n      this.onEnd(status);\n      this.ended = true;\n      return false;\n    }\n\n    if (strm.next_out) {\n      if (strm.avail_out === 0 || status === c.Z_STREAM_END || (strm.avail_in === 0 && (_mode === c.Z_FINISH || _mode === c.Z_SYNC_FLUSH))) {\n\n        if (this.options.to === 'string') {\n\n          next_out_utf8 = strings.utf8border(strm.output, strm.next_out);\n\n          tail = strm.next_out - next_out_utf8;\n          utf8str = strings.buf2string(strm.output, next_out_utf8);\n\n          // move tail\n          strm.next_out = tail;\n          strm.avail_out = chunkSize - tail;\n          if (tail) { utils.arraySet(strm.output, strm.output, next_out_utf8, tail, 0); }\n\n          this.onData(utf8str);\n\n        } else {\n          this.onData(utils.shrinkBuf(strm.output, strm.next_out));\n        }\n      }\n    }\n  } while ((strm.avail_in > 0) && status !== c.Z_STREAM_END);\n\n  if (status === c.Z_STREAM_END) {\n    _mode = c.Z_FINISH;\n  }\n\n  // Finalize on the last chunk.\n  if (_mode === c.Z_FINISH) {\n    status = zlib_inflate.inflateEnd(this.strm);\n    this.onEnd(status);\n    this.ended = true;\n    return status === c.Z_OK;\n  }\n\n  // callback interim results if Z_SYNC_FLUSH.\n  if (_mode === c.Z_SYNC_FLUSH) {\n    this.onEnd(c.Z_OK);\n    strm.avail_out = 0;\n    return true;\n  }\n\n  return true;\n};\n\n\n/**\n * Inflate#onData(chunk) -> Void\n * - chunk (Uint8Array|Array|String): ouput data. Type of array depends\n *   on js engine support. When string output requested, each chunk\n *   will be string.\n *\n * By default, stores data blocks in `chunks[]` property and glue\n * those in `onEnd`. Override this handler, if you need another behaviour.\n **/\nInflate.prototype.onData = function(chunk) {\n  this.chunks.push(chunk);\n};\n\n\n/**\n * Inflate#onEnd(status) -> Void\n * - status (Number): inflate status. 0 (Z_OK) on success,\n *   other if not.\n *\n * Called either after you tell inflate that the input stream is\n * complete (Z_FINISH) or should be flushed (Z_SYNC_FLUSH)\n * or if an error happened. By default - join collected chunks,\n * free memory and fill `results` / `err` properties.\n **/\nInflate.prototype.onEnd = function(status) {\n  // On success - join\n  if (status === c.Z_OK) {\n    if (this.options.to === 'string') {\n      // Glue & convert here, until we teach pako to send\n      // utf8 alligned strings to onData\n      this.result = this.chunks.join('');\n    } else {\n      this.result = utils.flattenChunks(this.chunks);\n    }\n  }\n  this.chunks = [];\n  this.err = status;\n  this.msg = this.strm.msg;\n};\n\n\n/**\n * inflate(data[, options]) -> Uint8Array|Array|String\n * - data (Uint8Array|Array|String): input data to decompress.\n * - options (Object): zlib inflate options.\n *\n * Decompress `data` with inflate/ungzip and `options`. Autodetect\n * format via wrapper header by default. That's why we don't provide\n * separate `ungzip` method.\n *\n * Supported options are:\n *\n * - windowBits\n *\n * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced)\n * for more information.\n *\n * Sugar (options):\n *\n * - `raw` (Boolean) - say that we work with raw stream, if you don't wish to specify\n *   negative windowBits implicitly.\n * - `to` (String) - if equal to 'string', then result will be converted\n *   from utf8 to utf16 (javascript) string. When string output requested,\n *   chunk length can differ from `chunkSize`, depending on content.\n *\n *\n * ##### Example:\n *\n * ```javascript\n * var pako = require('pako')\n *   , input = pako.deflate([1,2,3,4,5,6,7,8,9])\n *   , output;\n *\n * try {\n *   output = pako.inflate(input);\n * } catch (err)\n *   console.log(err);\n * }\n * ```\n **/\nfunction inflate(input, options) {\n  var inflator = new Inflate(options);\n\n  inflator.push(input, true);\n\n  // That will never happens, if you don't cheat with options :)\n  if (inflator.err) { throw inflator.msg; }\n\n  return inflator.result;\n}\n\n\n/**\n * inflateRaw(data[, options]) -> Uint8Array|Array|String\n * - data (Uint8Array|Array|String): input data to decompress.\n * - options (Object): zlib inflate options.\n *\n * The same as [[inflate]], but creates raw data, without wrapper\n * (header and adler32 crc).\n **/\nfunction inflateRaw(input, options) {\n  options = options || {};\n  options.raw = true;\n  return inflate(input, options);\n}\n\n\n/**\n * ungzip(data[, options]) -> Uint8Array|Array|String\n * - data (Uint8Array|Array|String): input data to decompress.\n * - options (Object): zlib inflate options.\n *\n * Just shortcut to [[inflate]], because it autodetects format\n * by header.content. Done for convenience.\n **/\n\n\nexports.Inflate = Inflate;\nexports.inflate = inflate;\nexports.inflateRaw = inflateRaw;\nexports.ungzip  = inflate;\n\n},{\"./utils/common\":127,\"./utils/strings\":128,\"./zlib/constants\":130,\"./zlib/gzheader\":133,\"./zlib/inflate.js\":135,\"./zlib/messages\":137,\"./zlib/zstream\":139}],127:[function(require,module,exports){\n'use strict';\n\n\nvar TYPED_OK =  (typeof Uint8Array !== 'undefined') &&\n                (typeof Uint16Array !== 'undefined') &&\n                (typeof Int32Array !== 'undefined');\n\n\nexports.assign = function (obj /*from1, from2, from3, ...*/) {\n  var sources = Array.prototype.slice.call(arguments, 1);\n  while (sources.length) {\n    var source = sources.shift();\n    if (!source) { continue; }\n\n    if (typeof source !== 'object') {\n      throw new TypeError(source + 'must be non-object');\n    }\n\n    for (var p in source) {\n      if (source.hasOwnProperty(p)) {\n        obj[p] = source[p];\n      }\n    }\n  }\n\n  return obj;\n};\n\n\n// reduce buffer size, avoiding mem copy\nexports.shrinkBuf = function (buf, size) {\n  if (buf.length === size) { return buf; }\n  if (buf.subarray) { return buf.subarray(0, size); }\n  buf.length = size;\n  return buf;\n};\n\n\nvar fnTyped = {\n  arraySet: function (dest, src, src_offs, len, dest_offs) {\n    if (src.subarray && dest.subarray) {\n      dest.set(src.subarray(src_offs, src_offs+len), dest_offs);\n      return;\n    }\n    // Fallback to ordinary array\n    for (var i=0; i<len; i++) {\n      dest[dest_offs + i] = src[src_offs + i];\n    }\n  },\n  // Join array of chunks to single array.\n  flattenChunks: function(chunks) {\n    var i, l, len, pos, chunk, result;\n\n    // calculate data length\n    len = 0;\n    for (i=0, l=chunks.length; i<l; i++) {\n      len += chunks[i].length;\n    }\n\n    // join chunks\n    result = new Uint8Array(len);\n    pos = 0;\n    for (i=0, l=chunks.length; i<l; i++) {\n      chunk = chunks[i];\n      result.set(chunk, pos);\n      pos += chunk.length;\n    }\n\n    return result;\n  }\n};\n\nvar fnUntyped = {\n  arraySet: function (dest, src, src_offs, len, dest_offs) {\n    for (var i=0; i<len; i++) {\n      dest[dest_offs + i] = src[src_offs + i];\n    }\n  },\n  // Join array of chunks to single array.\n  flattenChunks: function(chunks) {\n    return [].concat.apply([], chunks);\n  }\n};\n\n\n// Enable/Disable typed arrays use, for testing\n//\nexports.setTyped = function (on) {\n  if (on) {\n    exports.Buf8  = Uint8Array;\n    exports.Buf16 = Uint16Array;\n    exports.Buf32 = Int32Array;\n    exports.assign(exports, fnTyped);\n  } else {\n    exports.Buf8  = Array;\n    exports.Buf16 = Array;\n    exports.Buf32 = Array;\n    exports.assign(exports, fnUntyped);\n  }\n};\n\nexports.setTyped(TYPED_OK);\n\n},{}],128:[function(require,module,exports){\n// String encode/decode helpers\n'use strict';\n\n\nvar utils = require('./common');\n\n\n// Quick check if we can use fast array to bin string conversion\n//\n// - apply(Array) can fail on Android 2.2\n// - apply(Uint8Array) can fail on iOS 5.1 Safary\n//\nvar STR_APPLY_OK = true;\nvar STR_APPLY_UIA_OK = true;\n\ntry { String.fromCharCode.apply(null, [0]); } catch(__) { STR_APPLY_OK = false; }\ntry { String.fromCharCode.apply(null, new Uint8Array(1)); } catch(__) { STR_APPLY_UIA_OK = false; }\n\n\n// Table with utf8 lengths (calculated by first byte of sequence)\n// Note, that 5 & 6-byte values and some 4-byte values can not be represented in JS,\n// because max possible codepoint is 0x10ffff\nvar _utf8len = new utils.Buf8(256);\nfor (var q=0; q<256; q++) {\n  _utf8len[q] = (q >= 252 ? 6 : q >= 248 ? 5 : q >= 240 ? 4 : q >= 224 ? 3 : q >= 192 ? 2 : 1);\n}\n_utf8len[254]=_utf8len[254]=1; // Invalid sequence start\n\n\n// convert string to array (typed, when possible)\nexports.string2buf = function (str) {\n  var buf, c, c2, m_pos, i, str_len = str.length, buf_len = 0;\n\n  // count binary size\n  for (m_pos = 0; m_pos < str_len; m_pos++) {\n    c = str.charCodeAt(m_pos);\n    if ((c & 0xfc00) === 0xd800 && (m_pos+1 < str_len)) {\n      c2 = str.charCodeAt(m_pos+1);\n      if ((c2 & 0xfc00) === 0xdc00) {\n        c = 0x10000 + ((c - 0xd800) << 10) + (c2 - 0xdc00);\n        m_pos++;\n      }\n    }\n    buf_len += c < 0x80 ? 1 : c < 0x800 ? 2 : c < 0x10000 ? 3 : 4;\n  }\n\n  // allocate buffer\n  buf = new utils.Buf8(buf_len);\n\n  // convert\n  for (i=0, m_pos = 0; i < buf_len; m_pos++) {\n    c = str.charCodeAt(m_pos);\n    if ((c & 0xfc00) === 0xd800 && (m_pos+1 < str_len)) {\n      c2 = str.charCodeAt(m_pos+1);\n      if ((c2 & 0xfc00) === 0xdc00) {\n        c = 0x10000 + ((c - 0xd800) << 10) + (c2 - 0xdc00);\n        m_pos++;\n      }\n    }\n    if (c < 0x80) {\n      /* one byte */\n      buf[i++] = c;\n    } else if (c < 0x800) {\n      /* two bytes */\n      buf[i++] = 0xC0 | (c >>> 6);\n      buf[i++] = 0x80 | (c & 0x3f);\n    } else if (c < 0x10000) {\n      /* three bytes */\n      buf[i++] = 0xE0 | (c >>> 12);\n      buf[i++] = 0x80 | (c >>> 6 & 0x3f);\n      buf[i++] = 0x80 | (c & 0x3f);\n    } else {\n      /* four bytes */\n      buf[i++] = 0xf0 | (c >>> 18);\n      buf[i++] = 0x80 | (c >>> 12 & 0x3f);\n      buf[i++] = 0x80 | (c >>> 6 & 0x3f);\n      buf[i++] = 0x80 | (c & 0x3f);\n    }\n  }\n\n  return buf;\n};\n\n// Helper (used in 2 places)\nfunction buf2binstring(buf, len) {\n  // use fallback for big arrays to avoid stack overflow\n  if (len < 65537) {\n    if ((buf.subarray && STR_APPLY_UIA_OK) || (!buf.subarray && STR_APPLY_OK)) {\n      return String.fromCharCode.apply(null, utils.shrinkBuf(buf, len));\n    }\n  }\n\n  var result = '';\n  for (var i=0; i < len; i++) {\n    result += String.fromCharCode(buf[i]);\n  }\n  return result;\n}\n\n\n// Convert byte array to binary string\nexports.buf2binstring = function(buf) {\n  return buf2binstring(buf, buf.length);\n};\n\n\n// Convert binary string (typed, when possible)\nexports.binstring2buf = function(str) {\n  var buf = new utils.Buf8(str.length);\n  for (var i=0, len=buf.length; i < len; i++) {\n    buf[i] = str.charCodeAt(i);\n  }\n  return buf;\n};\n\n\n// convert array to string\nexports.buf2string = function (buf, max) {\n  var i, out, c, c_len;\n  var len = max || buf.length;\n\n  // Reserve max possible length (2 words per char)\n  // NB: by unknown reasons, Array is significantly faster for\n  //     String.fromCharCode.apply than Uint16Array.\n  var utf16buf = new Array(len*2);\n\n  for (out=0, i=0; i<len;) {\n    c = buf[i++];\n    // quick process ascii\n    if (c < 0x80) { utf16buf[out++] = c; continue; }\n\n    c_len = _utf8len[c];\n    // skip 5 & 6 byte codes\n    if (c_len > 4) { utf16buf[out++] = 0xfffd; i += c_len-1; continue; }\n\n    // apply mask on first byte\n    c &= c_len === 2 ? 0x1f : c_len === 3 ? 0x0f : 0x07;\n    // join the rest\n    while (c_len > 1 && i < len) {\n      c = (c << 6) | (buf[i++] & 0x3f);\n      c_len--;\n    }\n\n    // terminated by end of string?\n    if (c_len > 1) { utf16buf[out++] = 0xfffd; continue; }\n\n    if (c < 0x10000) {\n      utf16buf[out++] = c;\n    } else {\n      c -= 0x10000;\n      utf16buf[out++] = 0xd800 | ((c >> 10) & 0x3ff);\n      utf16buf[out++] = 0xdc00 | (c & 0x3ff);\n    }\n  }\n\n  return buf2binstring(utf16buf, out);\n};\n\n\n// Calculate max possible position in utf8 buffer,\n// that will not break sequence. If that's not possible\n// - (very small limits) return max size as is.\n//\n// buf[] - utf8 bytes array\n// max   - length limit (mandatory);\nexports.utf8border = function(buf, max) {\n  var pos;\n\n  max = max || buf.length;\n  if (max > buf.length) { max = buf.length; }\n\n  // go back from last position, until start of sequence found\n  pos = max-1;\n  while (pos >= 0 && (buf[pos] & 0xC0) === 0x80) { pos--; }\n\n  // Fuckup - very small and broken sequence,\n  // return max, because we should return something anyway.\n  if (pos < 0) { return max; }\n\n  // If we came to start of buffer - that means vuffer is too small,\n  // return max too.\n  if (pos === 0) { return max; }\n\n  return (pos + _utf8len[buf[pos]] > max) ? pos : max;\n};\n\n},{\"./common\":127}],129:[function(require,module,exports){\n'use strict';\n\n// Note: adler32 takes 12% for level 0 and 2% for level 6.\n// It doesn't worth to make additional optimizationa as in original.\n// Small size is preferable.\n\nfunction adler32(adler, buf, len, pos) {\n  var s1 = (adler & 0xffff) |0,\n      s2 = ((adler >>> 16) & 0xffff) |0,\n      n = 0;\n\n  while (len !== 0) {\n    // Set limit ~ twice less than 5552, to keep\n    // s2 in 31-bits, because we force signed ints.\n    // in other case %= will fail.\n    n = len > 2000 ? 2000 : len;\n    len -= n;\n\n    do {\n      s1 = (s1 + buf[pos++]) |0;\n      s2 = (s2 + s1) |0;\n    } while (--n);\n\n    s1 %= 65521;\n    s2 %= 65521;\n  }\n\n  return (s1 | (s2 << 16)) |0;\n}\n\n\nmodule.exports = adler32;\n\n},{}],130:[function(require,module,exports){\nmodule.exports = {\n\n  /* Allowed flush values; see deflate() and inflate() below for details */\n  Z_NO_FLUSH:         0,\n  Z_PARTIAL_FLUSH:    1,\n  Z_SYNC_FLUSH:       2,\n  Z_FULL_FLUSH:       3,\n  Z_FINISH:           4,\n  Z_BLOCK:            5,\n  Z_TREES:            6,\n\n  /* Return codes for the compression/decompression functions. Negative values\n  * are errors, positive values are used for special but normal events.\n  */\n  Z_OK:               0,\n  Z_STREAM_END:       1,\n  Z_NEED_DICT:        2,\n  Z_ERRNO:           -1,\n  Z_STREAM_ERROR:    -2,\n  Z_DATA_ERROR:      -3,\n  //Z_MEM_ERROR:     -4,\n  Z_BUF_ERROR:       -5,\n  //Z_VERSION_ERROR: -6,\n\n  /* compression levels */\n  Z_NO_COMPRESSION:         0,\n  Z_BEST_SPEED:             1,\n  Z_BEST_COMPRESSION:       9,\n  Z_DEFAULT_COMPRESSION:   -1,\n\n\n  Z_FILTERED:               1,\n  Z_HUFFMAN_ONLY:           2,\n  Z_RLE:                    3,\n  Z_FIXED:                  4,\n  Z_DEFAULT_STRATEGY:       0,\n\n  /* Possible values of the data_type field (though see inflate()) */\n  Z_BINARY:                 0,\n  Z_TEXT:                   1,\n  //Z_ASCII:                1, // = Z_TEXT (deprecated)\n  Z_UNKNOWN:                2,\n\n  /* The deflate compression method */\n  Z_DEFLATED:               8\n  //Z_NULL:                 null // Use -1 or null inline, depending on var type\n};\n\n},{}],131:[function(require,module,exports){\n'use strict';\n\n// Note: we can't get significant speed boost here.\n// So write code to minimize size - no pregenerated tables\n// and array tools dependencies.\n\n\n// Use ordinary array, since untyped makes no boost here\nfunction makeTable() {\n  var c, table = [];\n\n  for (var n =0; n < 256; n++) {\n    c = n;\n    for (var k =0; k < 8; k++) {\n      c = ((c&1) ? (0xEDB88320 ^ (c >>> 1)) : (c >>> 1));\n    }\n    table[n] = c;\n  }\n\n  return table;\n}\n\n// Create table on load. Just 255 signed longs. Not a problem.\nvar crcTable = makeTable();\n\n\nfunction crc32(crc, buf, len, pos) {\n  var t = crcTable,\n      end = pos + len;\n\n  crc = crc ^ (-1);\n\n  for (var i = pos; i < end; i++) {\n    crc = (crc >>> 8) ^ t[(crc ^ buf[i]) & 0xFF];\n  }\n\n  return (crc ^ (-1)); // >>> 0;\n}\n\n\nmodule.exports = crc32;\n\n},{}],132:[function(require,module,exports){\n'use strict';\n\nvar utils   = require('../utils/common');\nvar trees   = require('./trees');\nvar adler32 = require('./adler32');\nvar crc32   = require('./crc32');\nvar msg   = require('./messages');\n\n/* Public constants ==========================================================*/\n/* ===========================================================================*/\n\n\n/* Allowed flush values; see deflate() and inflate() below for details */\nvar Z_NO_FLUSH      = 0;\nvar Z_PARTIAL_FLUSH = 1;\n//var Z_SYNC_FLUSH    = 2;\nvar Z_FULL_FLUSH    = 3;\nvar Z_FINISH        = 4;\nvar Z_BLOCK         = 5;\n//var Z_TREES         = 6;\n\n\n/* Return codes for the compression/decompression functions. Negative values\n * are errors, positive values are used for special but normal events.\n */\nvar Z_OK            = 0;\nvar Z_STREAM_END    = 1;\n//var Z_NEED_DICT     = 2;\n//var Z_ERRNO         = -1;\nvar Z_STREAM_ERROR  = -2;\nvar Z_DATA_ERROR    = -3;\n//var Z_MEM_ERROR     = -4;\nvar Z_BUF_ERROR     = -5;\n//var Z_VERSION_ERROR = -6;\n\n\n/* compression levels */\n//var Z_NO_COMPRESSION      = 0;\n//var Z_BEST_SPEED          = 1;\n//var Z_BEST_COMPRESSION    = 9;\nvar Z_DEFAULT_COMPRESSION = -1;\n\n\nvar Z_FILTERED            = 1;\nvar Z_HUFFMAN_ONLY        = 2;\nvar Z_RLE                 = 3;\nvar Z_FIXED               = 4;\nvar Z_DEFAULT_STRATEGY    = 0;\n\n/* Possible values of the data_type field (though see inflate()) */\n//var Z_BINARY              = 0;\n//var Z_TEXT                = 1;\n//var Z_ASCII               = 1; // = Z_TEXT\nvar Z_UNKNOWN             = 2;\n\n\n/* The deflate compression method */\nvar Z_DEFLATED  = 8;\n\n/*============================================================================*/\n\n\nvar MAX_MEM_LEVEL = 9;\n/* Maximum value for memLevel in deflateInit2 */\nvar MAX_WBITS = 15;\n/* 32K LZ77 window */\nvar DEF_MEM_LEVEL = 8;\n\n\nvar LENGTH_CODES  = 29;\n/* number of length codes, not counting the special END_BLOCK code */\nvar LITERALS      = 256;\n/* number of literal bytes 0..255 */\nvar L_CODES       = LITERALS + 1 + LENGTH_CODES;\n/* number of Literal or Length codes, including the END_BLOCK code */\nvar D_CODES       = 30;\n/* number of distance codes */\nvar BL_CODES      = 19;\n/* number of codes used to transfer the bit lengths */\nvar HEAP_SIZE     = 2*L_CODES + 1;\n/* maximum heap size */\nvar MAX_BITS  = 15;\n/* All codes must not exceed MAX_BITS bits */\n\nvar MIN_MATCH = 3;\nvar MAX_MATCH = 258;\nvar MIN_LOOKAHEAD = (MAX_MATCH + MIN_MATCH + 1);\n\nvar PRESET_DICT = 0x20;\n\nvar INIT_STATE = 42;\nvar EXTRA_STATE = 69;\nvar NAME_STATE = 73;\nvar COMMENT_STATE = 91;\nvar HCRC_STATE = 103;\nvar BUSY_STATE = 113;\nvar FINISH_STATE = 666;\n\nvar BS_NEED_MORE      = 1; /* block not completed, need more input or more output */\nvar BS_BLOCK_DONE     = 2; /* block flush performed */\nvar BS_FINISH_STARTED = 3; /* finish started, need only more output at next deflate */\nvar BS_FINISH_DONE    = 4; /* finish done, accept no more input or output */\n\nvar OS_CODE = 0x03; // Unix :) . Don't detect, use this default.\n\nfunction err(strm, errorCode) {\n  strm.msg = msg[errorCode];\n  return errorCode;\n}\n\nfunction rank(f) {\n  return ((f) << 1) - ((f) > 4 ? 9 : 0);\n}\n\nfunction zero(buf) { var len = buf.length; while (--len >= 0) { buf[len] = 0; } }\n\n\n/* =========================================================================\n * Flush as much pending output as possible. All deflate() output goes\n * through this function so some applications may wish to modify it\n * to avoid allocating a large strm->output buffer and copying into it.\n * (See also read_buf()).\n */\nfunction flush_pending(strm) {\n  var s = strm.state;\n\n  //_tr_flush_bits(s);\n  var len = s.pending;\n  if (len > strm.avail_out) {\n    len = strm.avail_out;\n  }\n  if (len === 0) { return; }\n\n  utils.arraySet(strm.output, s.pending_buf, s.pending_out, len, strm.next_out);\n  strm.next_out += len;\n  s.pending_out += len;\n  strm.total_out += len;\n  strm.avail_out -= len;\n  s.pending -= len;\n  if (s.pending === 0) {\n    s.pending_out = 0;\n  }\n}\n\n\nfunction flush_block_only (s, last) {\n  trees._tr_flush_block(s, (s.block_start >= 0 ? s.block_start : -1), s.strstart - s.block_start, last);\n  s.block_start = s.strstart;\n  flush_pending(s.strm);\n}\n\n\nfunction put_byte(s, b) {\n  s.pending_buf[s.pending++] = b;\n}\n\n\n/* =========================================================================\n * Put a short in the pending buffer. The 16-bit value is put in MSB order.\n * IN assertion: the stream state is correct and there is enough room in\n * pending_buf.\n */\nfunction putShortMSB(s, b) {\n//  put_byte(s, (Byte)(b >> 8));\n//  put_byte(s, (Byte)(b & 0xff));\n  s.pending_buf[s.pending++] = (b >>> 8) & 0xff;\n  s.pending_buf[s.pending++] = b & 0xff;\n}\n\n\n/* ===========================================================================\n * Read a new buffer from the current input stream, update the adler32\n * and total number of bytes read.  All deflate() input goes through\n * this function so some applications may wish to modify it to avoid\n * allocating a large strm->input buffer and copying from it.\n * (See also flush_pending()).\n */\nfunction read_buf(strm, buf, start, size) {\n  var len = strm.avail_in;\n\n  if (len > size) { len = size; }\n  if (len === 0) { return 0; }\n\n  strm.avail_in -= len;\n\n  utils.arraySet(buf, strm.input, strm.next_in, len, start);\n  if (strm.state.wrap === 1) {\n    strm.adler = adler32(strm.adler, buf, len, start);\n  }\n\n  else if (strm.state.wrap === 2) {\n    strm.adler = crc32(strm.adler, buf, len, start);\n  }\n\n  strm.next_in += len;\n  strm.total_in += len;\n\n  return len;\n}\n\n\n/* ===========================================================================\n * Set match_start to the longest match starting at the given string and\n * return its length. Matches shorter or equal to prev_length are discarded,\n * in which case the result is equal to prev_length and match_start is\n * garbage.\n * IN assertions: cur_match is the head of the hash chain for the current\n *   string (strstart) and its distance is <= MAX_DIST, and prev_length >= 1\n * OUT assertion: the match length is not greater than s->lookahead.\n */\nfunction longest_match(s, cur_match) {\n  var chain_length = s.max_chain_length;      /* max hash chain length */\n  var scan = s.strstart; /* current string */\n  var match;                       /* matched string */\n  var len;                           /* length of current match */\n  var best_len = s.prev_length;              /* best match length so far */\n  var nice_match = s.nice_match;             /* stop if match long enough */\n  var limit = (s.strstart > (s.w_size - MIN_LOOKAHEAD)) ?\n      s.strstart - (s.w_size - MIN_LOOKAHEAD) : 0/*NIL*/;\n\n  var _win = s.window; // shortcut\n\n  var wmask = s.w_mask;\n  var prev  = s.prev;\n\n  /* Stop when cur_match becomes <= limit. To simplify the code,\n   * we prevent matches with the string of window index 0.\n   */\n\n  var strend = s.strstart + MAX_MATCH;\n  var scan_end1  = _win[scan + best_len - 1];\n  var scan_end   = _win[scan + best_len];\n\n  /* The code is optimized for HASH_BITS >= 8 and MAX_MATCH-2 multiple of 16.\n   * It is easy to get rid of this optimization if necessary.\n   */\n  // Assert(s->hash_bits >= 8 && MAX_MATCH == 258, \"Code too clever\");\n\n  /* Do not waste too much time if we already have a good match: */\n  if (s.prev_length >= s.good_match) {\n    chain_length >>= 2;\n  }\n  /* Do not look for matches beyond the end of the input. This is necessary\n   * to make deflate deterministic.\n   */\n  if (nice_match > s.lookahead) { nice_match = s.lookahead; }\n\n  // Assert((ulg)s->strstart <= s->window_size-MIN_LOOKAHEAD, \"need lookahead\");\n\n  do {\n    // Assert(cur_match < s->strstart, \"no future\");\n    match = cur_match;\n\n    /* Skip to next match if the match length cannot increase\n     * or if the match length is less than 2.  Note that the checks below\n     * for insufficient lookahead only occur occasionally for performance\n     * reasons.  Therefore uninitialized memory will be accessed, and\n     * conditional jumps will be made that depend on those values.\n     * However the length of the match is limited to the lookahead, so\n     * the output of deflate is not affected by the uninitialized values.\n     */\n\n    if (_win[match + best_len]     !== scan_end  ||\n        _win[match + best_len - 1] !== scan_end1 ||\n        _win[match]                !== _win[scan] ||\n        _win[++match]              !== _win[scan + 1]) {\n      continue;\n    }\n\n    /* The check at best_len-1 can be removed because it will be made\n     * again later. (This heuristic is not always a win.)\n     * It is not necessary to compare scan[2] and match[2] since they\n     * are always equal when the other bytes match, given that\n     * the hash keys are equal and that HASH_BITS >= 8.\n     */\n    scan += 2;\n    match++;\n    // Assert(*scan == *match, \"match[2]?\");\n\n    /* We check for insufficient lookahead only every 8th comparison;\n     * the 256th check will be made at strstart+258.\n     */\n    do {\n      /*jshint noempty:false*/\n    } while (_win[++scan] === _win[++match] && _win[++scan] === _win[++match] &&\n             _win[++scan] === _win[++match] && _win[++scan] === _win[++match] &&\n             _win[++scan] === _win[++match] && _win[++scan] === _win[++match] &&\n             _win[++scan] === _win[++match] && _win[++scan] === _win[++match] &&\n             scan < strend);\n\n    // Assert(scan <= s->window+(unsigned)(s->window_size-1), \"wild scan\");\n\n    len = MAX_MATCH - (strend - scan);\n    scan = strend - MAX_MATCH;\n\n    if (len > best_len) {\n      s.match_start = cur_match;\n      best_len = len;\n      if (len >= nice_match) {\n        break;\n      }\n      scan_end1  = _win[scan + best_len - 1];\n      scan_end   = _win[scan + best_len];\n    }\n  } while ((cur_match = prev[cur_match & wmask]) > limit && --chain_length !== 0);\n\n  if (best_len <= s.lookahead) {\n    return best_len;\n  }\n  return s.lookahead;\n}\n\n\n/* ===========================================================================\n * Fill the window when the lookahead becomes insufficient.\n * Updates strstart and lookahead.\n *\n * IN assertion: lookahead < MIN_LOOKAHEAD\n * OUT assertions: strstart <= window_size-MIN_LOOKAHEAD\n *    At least one byte has been read, or avail_in == 0; reads are\n *    performed for at least two bytes (required for the zip translate_eol\n *    option -- not supported here).\n */\nfunction fill_window(s) {\n  var _w_size = s.w_size;\n  var p, n, m, more, str;\n\n  //Assert(s->lookahead < MIN_LOOKAHEAD, \"already enough lookahead\");\n\n  do {\n    more = s.window_size - s.lookahead - s.strstart;\n\n    // JS ints have 32 bit, block below not needed\n    /* Deal with !@#$% 64K limit: */\n    //if (sizeof(int) <= 2) {\n    //    if (more == 0 && s->strstart == 0 && s->lookahead == 0) {\n    //        more = wsize;\n    //\n    //  } else if (more == (unsigned)(-1)) {\n    //        /* Very unlikely, but possible on 16 bit machine if\n    //         * strstart == 0 && lookahead == 1 (input done a byte at time)\n    //         */\n    //        more--;\n    //    }\n    //}\n\n\n    /* If the window is almost full and there is insufficient lookahead,\n     * move the upper half to the lower one to make room in the upper half.\n     */\n    if (s.strstart >= _w_size + (_w_size - MIN_LOOKAHEAD)) {\n\n      utils.arraySet(s.window, s.window, _w_size, _w_size, 0);\n      s.match_start -= _w_size;\n      s.strstart -= _w_size;\n      /* we now have strstart >= MAX_DIST */\n      s.block_start -= _w_size;\n\n      /* Slide the hash table (could be avoided with 32 bit values\n       at the expense of memory usage). We slide even when level == 0\n       to keep the hash table consistent if we switch back to level > 0\n       later. (Using level 0 permanently is not an optimal usage of\n       zlib, so we don't care about this pathological case.)\n       */\n\n      n = s.hash_size;\n      p = n;\n      do {\n        m = s.head[--p];\n        s.head[p] = (m >= _w_size ? m - _w_size : 0);\n      } while (--n);\n\n      n = _w_size;\n      p = n;\n      do {\n        m = s.prev[--p];\n        s.prev[p] = (m >= _w_size ? m - _w_size : 0);\n        /* If n is not on any hash chain, prev[n] is garbage but\n         * its value will never be used.\n         */\n      } while (--n);\n\n      more += _w_size;\n    }\n    if (s.strm.avail_in === 0) {\n      break;\n    }\n\n    /* If there was no sliding:\n     *    strstart <= WSIZE+MAX_DIST-1 && lookahead <= MIN_LOOKAHEAD - 1 &&\n     *    more == window_size - lookahead - strstart\n     * => more >= window_size - (MIN_LOOKAHEAD-1 + WSIZE + MAX_DIST-1)\n     * => more >= window_size - 2*WSIZE + 2\n     * In the BIG_MEM or MMAP case (not yet supported),\n     *   window_size == input_size + MIN_LOOKAHEAD  &&\n     *   strstart + s->lookahead <= input_size => more >= MIN_LOOKAHEAD.\n     * Otherwise, window_size == 2*WSIZE so more >= 2.\n     * If there was sliding, more >= WSIZE. So in all cases, more >= 2.\n     */\n    //Assert(more >= 2, \"more < 2\");\n    n = read_buf(s.strm, s.window, s.strstart + s.lookahead, more);\n    s.lookahead += n;\n\n    /* Initialize the hash value now that we have some input: */\n    if (s.lookahead + s.insert >= MIN_MATCH) {\n      str = s.strstart - s.insert;\n      s.ins_h = s.window[str];\n\n      /* UPDATE_HASH(s, s->ins_h, s->window[str + 1]); */\n      s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[str + 1]) & s.hash_mask;\n//#if MIN_MATCH != 3\n//        Call update_hash() MIN_MATCH-3 more times\n//#endif\n      while (s.insert) {\n        /* UPDATE_HASH(s, s->ins_h, s->window[str + MIN_MATCH-1]); */\n        s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[str + MIN_MATCH-1]) & s.hash_mask;\n\n        s.prev[str & s.w_mask] = s.head[s.ins_h];\n        s.head[s.ins_h] = str;\n        str++;\n        s.insert--;\n        if (s.lookahead + s.insert < MIN_MATCH) {\n          break;\n        }\n      }\n    }\n    /* If the whole input has less than MIN_MATCH bytes, ins_h is garbage,\n     * but this is not important since only literal bytes will be emitted.\n     */\n\n  } while (s.lookahead < MIN_LOOKAHEAD && s.strm.avail_in !== 0);\n\n  /* If the WIN_INIT bytes after the end of the current data have never been\n   * written, then zero those bytes in order to avoid memory check reports of\n   * the use of uninitialized (or uninitialised as Julian writes) bytes by\n   * the longest match routines.  Update the high water mark for the next\n   * time through here.  WIN_INIT is set to MAX_MATCH since the longest match\n   * routines allow scanning to strstart + MAX_MATCH, ignoring lookahead.\n   */\n//  if (s.high_water < s.window_size) {\n//    var curr = s.strstart + s.lookahead;\n//    var init = 0;\n//\n//    if (s.high_water < curr) {\n//      /* Previous high water mark below current data -- zero WIN_INIT\n//       * bytes or up to end of window, whichever is less.\n//       */\n//      init = s.window_size - curr;\n//      if (init > WIN_INIT)\n//        init = WIN_INIT;\n//      zmemzero(s->window + curr, (unsigned)init);\n//      s->high_water = curr + init;\n//    }\n//    else if (s->high_water < (ulg)curr + WIN_INIT) {\n//      /* High water mark at or above current data, but below current data\n//       * plus WIN_INIT -- zero out to current data plus WIN_INIT, or up\n//       * to end of window, whichever is less.\n//       */\n//      init = (ulg)curr + WIN_INIT - s->high_water;\n//      if (init > s->window_size - s->high_water)\n//        init = s->window_size - s->high_water;\n//      zmemzero(s->window + s->high_water, (unsigned)init);\n//      s->high_water += init;\n//    }\n//  }\n//\n//  Assert((ulg)s->strstart <= s->window_size - MIN_LOOKAHEAD,\n//    \"not enough room for search\");\n}\n\n/* ===========================================================================\n * Copy without compression as much as possible from the input stream, return\n * the current block state.\n * This function does not insert new strings in the dictionary since\n * uncompressible data is probably not useful. This function is used\n * only for the level=0 compression option.\n * NOTE: this function should be optimized to avoid extra copying from\n * window to pending_buf.\n */\nfunction deflate_stored(s, flush) {\n  /* Stored blocks are limited to 0xffff bytes, pending_buf is limited\n   * to pending_buf_size, and each stored block has a 5 byte header:\n   */\n  var max_block_size = 0xffff;\n\n  if (max_block_size > s.pending_buf_size - 5) {\n    max_block_size = s.pending_buf_size - 5;\n  }\n\n  /* Copy as much as possible from input to output: */\n  for (;;) {\n    /* Fill the window as much as possible: */\n    if (s.lookahead <= 1) {\n\n      //Assert(s->strstart < s->w_size+MAX_DIST(s) ||\n      //  s->block_start >= (long)s->w_size, \"slide too late\");\n//      if (!(s.strstart < s.w_size + (s.w_size - MIN_LOOKAHEAD) ||\n//        s.block_start >= s.w_size)) {\n//        throw  new Error(\"slide too late\");\n//      }\n\n      fill_window(s);\n      if (s.lookahead === 0 && flush === Z_NO_FLUSH) {\n        return BS_NEED_MORE;\n      }\n\n      if (s.lookahead === 0) {\n        break;\n      }\n      /* flush the current block */\n    }\n    //Assert(s->block_start >= 0L, \"block gone\");\n//    if (s.block_start < 0) throw new Error(\"block gone\");\n\n    s.strstart += s.lookahead;\n    s.lookahead = 0;\n\n    /* Emit a stored block if pending_buf will be full: */\n    var max_start = s.block_start + max_block_size;\n\n    if (s.strstart === 0 || s.strstart >= max_start) {\n      /* strstart == 0 is possible when wraparound on 16-bit machine */\n      s.lookahead = s.strstart - max_start;\n      s.strstart = max_start;\n      /*** FLUSH_BLOCK(s, 0); ***/\n      flush_block_only(s, false);\n      if (s.strm.avail_out === 0) {\n        return BS_NEED_MORE;\n      }\n      /***/\n\n\n    }\n    /* Flush if we may have to slide, otherwise block_start may become\n     * negative and the data will be gone:\n     */\n    if (s.strstart - s.block_start >= (s.w_size - MIN_LOOKAHEAD)) {\n      /*** FLUSH_BLOCK(s, 0); ***/\n      flush_block_only(s, false);\n      if (s.strm.avail_out === 0) {\n        return BS_NEED_MORE;\n      }\n      /***/\n    }\n  }\n\n  s.insert = 0;\n\n  if (flush === Z_FINISH) {\n    /*** FLUSH_BLOCK(s, 1); ***/\n    flush_block_only(s, true);\n    if (s.strm.avail_out === 0) {\n      return BS_FINISH_STARTED;\n    }\n    /***/\n    return BS_FINISH_DONE;\n  }\n\n  if (s.strstart > s.block_start) {\n    /*** FLUSH_BLOCK(s, 0); ***/\n    flush_block_only(s, false);\n    if (s.strm.avail_out === 0) {\n      return BS_NEED_MORE;\n    }\n    /***/\n  }\n\n  return BS_NEED_MORE;\n}\n\n/* ===========================================================================\n * Compress as much as possible from the input stream, return the current\n * block state.\n * This function does not perform lazy evaluation of matches and inserts\n * new strings in the dictionary only for unmatched strings or for short\n * matches. It is used only for the fast compression options.\n */\nfunction deflate_fast(s, flush) {\n  var hash_head;        /* head of the hash chain */\n  var bflush;           /* set if current block must be flushed */\n\n  for (;;) {\n    /* Make sure that we always have enough lookahead, except\n     * at the end of the input file. We need MAX_MATCH bytes\n     * for the next match, plus MIN_MATCH bytes to insert the\n     * string following the next match.\n     */\n    if (s.lookahead < MIN_LOOKAHEAD) {\n      fill_window(s);\n      if (s.lookahead < MIN_LOOKAHEAD && flush === Z_NO_FLUSH) {\n        return BS_NEED_MORE;\n      }\n      if (s.lookahead === 0) {\n        break; /* flush the current block */\n      }\n    }\n\n    /* Insert the string window[strstart .. strstart+2] in the\n     * dictionary, and set hash_head to the head of the hash chain:\n     */\n    hash_head = 0/*NIL*/;\n    if (s.lookahead >= MIN_MATCH) {\n      /*** INSERT_STRING(s, s.strstart, hash_head); ***/\n      s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask;\n      hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h];\n      s.head[s.ins_h] = s.strstart;\n      /***/\n    }\n\n    /* Find the longest match, discarding those <= prev_length.\n     * At this point we have always match_length < MIN_MATCH\n     */\n    if (hash_head !== 0/*NIL*/ && ((s.strstart - hash_head) <= (s.w_size - MIN_LOOKAHEAD))) {\n      /* To simplify the code, we prevent matches with the string\n       * of window index 0 (in particular we have to avoid a match\n       * of the string with itself at the start of the input file).\n       */\n      s.match_length = longest_match(s, hash_head);\n      /* longest_match() sets match_start */\n    }\n    if (s.match_length >= MIN_MATCH) {\n      // check_match(s, s.strstart, s.match_start, s.match_length); // for debug only\n\n      /*** _tr_tally_dist(s, s.strstart - s.match_start,\n                     s.match_length - MIN_MATCH, bflush); ***/\n      bflush = trees._tr_tally(s, s.strstart - s.match_start, s.match_length - MIN_MATCH);\n\n      s.lookahead -= s.match_length;\n\n      /* Insert new strings in the hash table only if the match length\n       * is not too large. This saves time but degrades compression.\n       */\n      if (s.match_length <= s.max_lazy_match/*max_insert_length*/ && s.lookahead >= MIN_MATCH) {\n        s.match_length--; /* string at strstart already in table */\n        do {\n          s.strstart++;\n          /*** INSERT_STRING(s, s.strstart, hash_head); ***/\n          s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask;\n          hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h];\n          s.head[s.ins_h] = s.strstart;\n          /***/\n          /* strstart never exceeds WSIZE-MAX_MATCH, so there are\n           * always MIN_MATCH bytes ahead.\n           */\n        } while (--s.match_length !== 0);\n        s.strstart++;\n      } else\n      {\n        s.strstart += s.match_length;\n        s.match_length = 0;\n        s.ins_h = s.window[s.strstart];\n        /* UPDATE_HASH(s, s.ins_h, s.window[s.strstart+1]); */\n        s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + 1]) & s.hash_mask;\n\n//#if MIN_MATCH != 3\n//                Call UPDATE_HASH() MIN_MATCH-3 more times\n//#endif\n        /* If lookahead < MIN_MATCH, ins_h is garbage, but it does not\n         * matter since it will be recomputed at next deflate call.\n         */\n      }\n    } else {\n      /* No match, output a literal byte */\n      //Tracevv((stderr,\"%c\", s.window[s.strstart]));\n      /*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/\n      bflush = trees._tr_tally(s, 0, s.window[s.strstart]);\n\n      s.lookahead--;\n      s.strstart++;\n    }\n    if (bflush) {\n      /*** FLUSH_BLOCK(s, 0); ***/\n      flush_block_only(s, false);\n      if (s.strm.avail_out === 0) {\n        return BS_NEED_MORE;\n      }\n      /***/\n    }\n  }\n  s.insert = ((s.strstart < (MIN_MATCH-1)) ? s.strstart : MIN_MATCH-1);\n  if (flush === Z_FINISH) {\n    /*** FLUSH_BLOCK(s, 1); ***/\n    flush_block_only(s, true);\n    if (s.strm.avail_out === 0) {\n      return BS_FINISH_STARTED;\n    }\n    /***/\n    return BS_FINISH_DONE;\n  }\n  if (s.last_lit) {\n    /*** FLUSH_BLOCK(s, 0); ***/\n    flush_block_only(s, false);\n    if (s.strm.avail_out === 0) {\n      return BS_NEED_MORE;\n    }\n    /***/\n  }\n  return BS_BLOCK_DONE;\n}\n\n/* ===========================================================================\n * Same as above, but achieves better compression. We use a lazy\n * evaluation for matches: a match is finally adopted only if there is\n * no better match at the next window position.\n */\nfunction deflate_slow(s, flush) {\n  var hash_head;          /* head of hash chain */\n  var bflush;              /* set if current block must be flushed */\n\n  var max_insert;\n\n  /* Process the input block. */\n  for (;;) {\n    /* Make sure that we always have enough lookahead, except\n     * at the end of the input file. We need MAX_MATCH bytes\n     * for the next match, plus MIN_MATCH bytes to insert the\n     * string following the next match.\n     */\n    if (s.lookahead < MIN_LOOKAHEAD) {\n      fill_window(s);\n      if (s.lookahead < MIN_LOOKAHEAD && flush === Z_NO_FLUSH) {\n        return BS_NEED_MORE;\n      }\n      if (s.lookahead === 0) { break; } /* flush the current block */\n    }\n\n    /* Insert the string window[strstart .. strstart+2] in the\n     * dictionary, and set hash_head to the head of the hash chain:\n     */\n    hash_head = 0/*NIL*/;\n    if (s.lookahead >= MIN_MATCH) {\n      /*** INSERT_STRING(s, s.strstart, hash_head); ***/\n      s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask;\n      hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h];\n      s.head[s.ins_h] = s.strstart;\n      /***/\n    }\n\n    /* Find the longest match, discarding those <= prev_length.\n     */\n    s.prev_length = s.match_length;\n    s.prev_match = s.match_start;\n    s.match_length = MIN_MATCH-1;\n\n    if (hash_head !== 0/*NIL*/ && s.prev_length < s.max_lazy_match &&\n        s.strstart - hash_head <= (s.w_size-MIN_LOOKAHEAD)/*MAX_DIST(s)*/) {\n      /* To simplify the code, we prevent matches with the string\n       * of window index 0 (in particular we have to avoid a match\n       * of the string with itself at the start of the input file).\n       */\n      s.match_length = longest_match(s, hash_head);\n      /* longest_match() sets match_start */\n\n      if (s.match_length <= 5 &&\n         (s.strategy === Z_FILTERED || (s.match_length === MIN_MATCH && s.strstart - s.match_start > 4096/*TOO_FAR*/))) {\n\n        /* If prev_match is also MIN_MATCH, match_start is garbage\n         * but we will ignore the current match anyway.\n         */\n        s.match_length = MIN_MATCH-1;\n      }\n    }\n    /* If there was a match at the previous step and the current\n     * match is not better, output the previous match:\n     */\n    if (s.prev_length >= MIN_MATCH && s.match_length <= s.prev_length) {\n      max_insert = s.strstart + s.lookahead - MIN_MATCH;\n      /* Do not insert strings in hash table beyond this. */\n\n      //check_match(s, s.strstart-1, s.prev_match, s.prev_length);\n\n      /***_tr_tally_dist(s, s.strstart - 1 - s.prev_match,\n                     s.prev_length - MIN_MATCH, bflush);***/\n      bflush = trees._tr_tally(s, s.strstart - 1- s.prev_match, s.prev_length - MIN_MATCH);\n      /* Insert in hash table all strings up to the end of the match.\n       * strstart-1 and strstart are already inserted. If there is not\n       * enough lookahead, the last two strings are not inserted in\n       * the hash table.\n       */\n      s.lookahead -= s.prev_length-1;\n      s.prev_length -= 2;\n      do {\n        if (++s.strstart <= max_insert) {\n          /*** INSERT_STRING(s, s.strstart, hash_head); ***/\n          s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask;\n          hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h];\n          s.head[s.ins_h] = s.strstart;\n          /***/\n        }\n      } while (--s.prev_length !== 0);\n      s.match_available = 0;\n      s.match_length = MIN_MATCH-1;\n      s.strstart++;\n\n      if (bflush) {\n        /*** FLUSH_BLOCK(s, 0); ***/\n        flush_block_only(s, false);\n        if (s.strm.avail_out === 0) {\n          return BS_NEED_MORE;\n        }\n        /***/\n      }\n\n    } else if (s.match_available) {\n      /* If there was no match at the previous position, output a\n       * single literal. If there was a match but the current match\n       * is longer, truncate the previous match to a single literal.\n       */\n      //Tracevv((stderr,\"%c\", s->window[s->strstart-1]));\n      /*** _tr_tally_lit(s, s.window[s.strstart-1], bflush); ***/\n      bflush = trees._tr_tally(s, 0, s.window[s.strstart-1]);\n\n      if (bflush) {\n        /*** FLUSH_BLOCK_ONLY(s, 0) ***/\n        flush_block_only(s, false);\n        /***/\n      }\n      s.strstart++;\n      s.lookahead--;\n      if (s.strm.avail_out === 0) {\n        return BS_NEED_MORE;\n      }\n    } else {\n      /* There is no previous match to compare with, wait for\n       * the next step to decide.\n       */\n      s.match_available = 1;\n      s.strstart++;\n      s.lookahead--;\n    }\n  }\n  //Assert (flush != Z_NO_FLUSH, \"no flush?\");\n  if (s.match_available) {\n    //Tracevv((stderr,\"%c\", s->window[s->strstart-1]));\n    /*** _tr_tally_lit(s, s.window[s.strstart-1], bflush); ***/\n    bflush = trees._tr_tally(s, 0, s.window[s.strstart-1]);\n\n    s.match_available = 0;\n  }\n  s.insert = s.strstart < MIN_MATCH-1 ? s.strstart : MIN_MATCH-1;\n  if (flush === Z_FINISH) {\n    /*** FLUSH_BLOCK(s, 1); ***/\n    flush_block_only(s, true);\n    if (s.strm.avail_out === 0) {\n      return BS_FINISH_STARTED;\n    }\n    /***/\n    return BS_FINISH_DONE;\n  }\n  if (s.last_lit) {\n    /*** FLUSH_BLOCK(s, 0); ***/\n    flush_block_only(s, false);\n    if (s.strm.avail_out === 0) {\n      return BS_NEED_MORE;\n    }\n    /***/\n  }\n\n  return BS_BLOCK_DONE;\n}\n\n\n/* ===========================================================================\n * For Z_RLE, simply look for runs of bytes, generate matches only of distance\n * one.  Do not maintain a hash table.  (It will be regenerated if this run of\n * deflate switches away from Z_RLE.)\n */\nfunction deflate_rle(s, flush) {\n  var bflush;            /* set if current block must be flushed */\n  var prev;              /* byte at distance one to match */\n  var scan, strend;      /* scan goes up to strend for length of run */\n\n  var _win = s.window;\n\n  for (;;) {\n    /* Make sure that we always have enough lookahead, except\n     * at the end of the input file. We need MAX_MATCH bytes\n     * for the longest run, plus one for the unrolled loop.\n     */\n    if (s.lookahead <= MAX_MATCH) {\n      fill_window(s);\n      if (s.lookahead <= MAX_MATCH && flush === Z_NO_FLUSH) {\n        return BS_NEED_MORE;\n      }\n      if (s.lookahead === 0) { break; } /* flush the current block */\n    }\n\n    /* See how many times the previous byte repeats */\n    s.match_length = 0;\n    if (s.lookahead >= MIN_MATCH && s.strstart > 0) {\n      scan = s.strstart - 1;\n      prev = _win[scan];\n      if (prev === _win[++scan] && prev === _win[++scan] && prev === _win[++scan]) {\n        strend = s.strstart + MAX_MATCH;\n        do {\n          /*jshint noempty:false*/\n        } while (prev === _win[++scan] && prev === _win[++scan] &&\n                 prev === _win[++scan] && prev === _win[++scan] &&\n                 prev === _win[++scan] && prev === _win[++scan] &&\n                 prev === _win[++scan] && prev === _win[++scan] &&\n                 scan < strend);\n        s.match_length = MAX_MATCH - (strend - scan);\n        if (s.match_length > s.lookahead) {\n          s.match_length = s.lookahead;\n        }\n      }\n      //Assert(scan <= s->window+(uInt)(s->window_size-1), \"wild scan\");\n    }\n\n    /* Emit match if have run of MIN_MATCH or longer, else emit literal */\n    if (s.match_length >= MIN_MATCH) {\n      //check_match(s, s.strstart, s.strstart - 1, s.match_length);\n\n      /*** _tr_tally_dist(s, 1, s.match_length - MIN_MATCH, bflush); ***/\n      bflush = trees._tr_tally(s, 1, s.match_length - MIN_MATCH);\n\n      s.lookahead -= s.match_length;\n      s.strstart += s.match_length;\n      s.match_length = 0;\n    } else {\n      /* No match, output a literal byte */\n      //Tracevv((stderr,\"%c\", s->window[s->strstart]));\n      /*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/\n      bflush = trees._tr_tally(s, 0, s.window[s.strstart]);\n\n      s.lookahead--;\n      s.strstart++;\n    }\n    if (bflush) {\n      /*** FLUSH_BLOCK(s, 0); ***/\n      flush_block_only(s, false);\n      if (s.strm.avail_out === 0) {\n        return BS_NEED_MORE;\n      }\n      /***/\n    }\n  }\n  s.insert = 0;\n  if (flush === Z_FINISH) {\n    /*** FLUSH_BLOCK(s, 1); ***/\n    flush_block_only(s, true);\n    if (s.strm.avail_out === 0) {\n      return BS_FINISH_STARTED;\n    }\n    /***/\n    return BS_FINISH_DONE;\n  }\n  if (s.last_lit) {\n    /*** FLUSH_BLOCK(s, 0); ***/\n    flush_block_only(s, false);\n    if (s.strm.avail_out === 0) {\n      return BS_NEED_MORE;\n    }\n    /***/\n  }\n  return BS_BLOCK_DONE;\n}\n\n/* ===========================================================================\n * For Z_HUFFMAN_ONLY, do not look for matches.  Do not maintain a hash table.\n * (It will be regenerated if this run of deflate switches away from Huffman.)\n */\nfunction deflate_huff(s, flush) {\n  var bflush;             /* set if current block must be flushed */\n\n  for (;;) {\n    /* Make sure that we have a literal to write. */\n    if (s.lookahead === 0) {\n      fill_window(s);\n      if (s.lookahead === 0) {\n        if (flush === Z_NO_FLUSH) {\n          return BS_NEED_MORE;\n        }\n        break;      /* flush the current block */\n      }\n    }\n\n    /* Output a literal byte */\n    s.match_length = 0;\n    //Tracevv((stderr,\"%c\", s->window[s->strstart]));\n    /*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/\n    bflush = trees._tr_tally(s, 0, s.window[s.strstart]);\n    s.lookahead--;\n    s.strstart++;\n    if (bflush) {\n      /*** FLUSH_BLOCK(s, 0); ***/\n      flush_block_only(s, false);\n      if (s.strm.avail_out === 0) {\n        return BS_NEED_MORE;\n      }\n      /***/\n    }\n  }\n  s.insert = 0;\n  if (flush === Z_FINISH) {\n    /*** FLUSH_BLOCK(s, 1); ***/\n    flush_block_only(s, true);\n    if (s.strm.avail_out === 0) {\n      return BS_FINISH_STARTED;\n    }\n    /***/\n    return BS_FINISH_DONE;\n  }\n  if (s.last_lit) {\n    /*** FLUSH_BLOCK(s, 0); ***/\n    flush_block_only(s, false);\n    if (s.strm.avail_out === 0) {\n      return BS_NEED_MORE;\n    }\n    /***/\n  }\n  return BS_BLOCK_DONE;\n}\n\n/* Values for max_lazy_match, good_match and max_chain_length, depending on\n * the desired pack level (0..9). The values given below have been tuned to\n * exclude worst case performance for pathological files. Better values may be\n * found for specific files.\n */\nvar Config = function (good_length, max_lazy, nice_length, max_chain, func) {\n  this.good_length = good_length;\n  this.max_lazy = max_lazy;\n  this.nice_length = nice_length;\n  this.max_chain = max_chain;\n  this.func = func;\n};\n\nvar configuration_table;\n\nconfiguration_table = [\n  /*      good lazy nice chain */\n  new Config(0, 0, 0, 0, deflate_stored),          /* 0 store only */\n  new Config(4, 4, 8, 4, deflate_fast),            /* 1 max speed, no lazy matches */\n  new Config(4, 5, 16, 8, deflate_fast),           /* 2 */\n  new Config(4, 6, 32, 32, deflate_fast),          /* 3 */\n\n  new Config(4, 4, 16, 16, deflate_slow),          /* 4 lazy matches */\n  new Config(8, 16, 32, 32, deflate_slow),         /* 5 */\n  new Config(8, 16, 128, 128, deflate_slow),       /* 6 */\n  new Config(8, 32, 128, 256, deflate_slow),       /* 7 */\n  new Config(32, 128, 258, 1024, deflate_slow),    /* 8 */\n  new Config(32, 258, 258, 4096, deflate_slow)     /* 9 max compression */\n];\n\n\n/* ===========================================================================\n * Initialize the \"longest match\" routines for a new zlib stream\n */\nfunction lm_init(s) {\n  s.window_size = 2 * s.w_size;\n\n  /*** CLEAR_HASH(s); ***/\n  zero(s.head); // Fill with NIL (= 0);\n\n  /* Set the default configuration parameters:\n   */\n  s.max_lazy_match = configuration_table[s.level].max_lazy;\n  s.good_match = configuration_table[s.level].good_length;\n  s.nice_match = configuration_table[s.level].nice_length;\n  s.max_chain_length = configuration_table[s.level].max_chain;\n\n  s.strstart = 0;\n  s.block_start = 0;\n  s.lookahead = 0;\n  s.insert = 0;\n  s.match_length = s.prev_length = MIN_MATCH - 1;\n  s.match_available = 0;\n  s.ins_h = 0;\n}\n\n\nfunction DeflateState() {\n  this.strm = null;            /* pointer back to this zlib stream */\n  this.status = 0;            /* as the name implies */\n  this.pending_buf = null;      /* output still pending */\n  this.pending_buf_size = 0;  /* size of pending_buf */\n  this.pending_out = 0;       /* next pending byte to output to the stream */\n  this.pending = 0;           /* nb of bytes in the pending buffer */\n  this.wrap = 0;              /* bit 0 true for zlib, bit 1 true for gzip */\n  this.gzhead = null;         /* gzip header information to write */\n  this.gzindex = 0;           /* where in extra, name, or comment */\n  this.method = Z_DEFLATED; /* can only be DEFLATED */\n  this.last_flush = -1;   /* value of flush param for previous deflate call */\n\n  this.w_size = 0;  /* LZ77 window size (32K by default) */\n  this.w_bits = 0;  /* log2(w_size)  (8..16) */\n  this.w_mask = 0;  /* w_size - 1 */\n\n  this.window = null;\n  /* Sliding window. Input bytes are read into the second half of the window,\n   * and move to the first half later to keep a dictionary of at least wSize\n   * bytes. With this organization, matches are limited to a distance of\n   * wSize-MAX_MATCH bytes, but this ensures that IO is always\n   * performed with a length multiple of the block size.\n   */\n\n  this.window_size = 0;\n  /* Actual size of window: 2*wSize, except when the user input buffer\n   * is directly used as sliding window.\n   */\n\n  this.prev = null;\n  /* Link to older string with same hash index. To limit the size of this\n   * array to 64K, this link is maintained only for the last 32K strings.\n   * An index in this array is thus a window index modulo 32K.\n   */\n\n  this.head = null;   /* Heads of the hash chains or NIL. */\n\n  this.ins_h = 0;       /* hash index of string to be inserted */\n  this.hash_size = 0;   /* number of elements in hash table */\n  this.hash_bits = 0;   /* log2(hash_size) */\n  this.hash_mask = 0;   /* hash_size-1 */\n\n  this.hash_shift = 0;\n  /* Number of bits by which ins_h must be shifted at each input\n   * step. It must be such that after MIN_MATCH steps, the oldest\n   * byte no longer takes part in the hash key, that is:\n   *   hash_shift * MIN_MATCH >= hash_bits\n   */\n\n  this.block_start = 0;\n  /* Window position at the beginning of the current output block. Gets\n   * negative when the window is moved backwards.\n   */\n\n  this.match_length = 0;      /* length of best match */\n  this.prev_match = 0;        /* previous match */\n  this.match_available = 0;   /* set if previous match exists */\n  this.strstart = 0;          /* start of string to insert */\n  this.match_start = 0;       /* start of matching string */\n  this.lookahead = 0;         /* number of valid bytes ahead in window */\n\n  this.prev_length = 0;\n  /* Length of the best match at previous step. Matches not greater than this\n   * are discarded. This is used in the lazy match evaluation.\n   */\n\n  this.max_chain_length = 0;\n  /* To speed up deflation, hash chains are never searched beyond this\n   * length.  A higher limit improves compression ratio but degrades the\n   * speed.\n   */\n\n  this.max_lazy_match = 0;\n  /* Attempt to find a better match only when the current match is strictly\n   * smaller than this value. This mechanism is used only for compression\n   * levels >= 4.\n   */\n  // That's alias to max_lazy_match, don't use directly\n  //this.max_insert_length = 0;\n  /* Insert new strings in the hash table only if the match length is not\n   * greater than this length. This saves time but degrades compression.\n   * max_insert_length is used only for compression levels <= 3.\n   */\n\n  this.level = 0;     /* compression level (1..9) */\n  this.strategy = 0;  /* favor or force Huffman coding*/\n\n  this.good_match = 0;\n  /* Use a faster search when the previous match is longer than this */\n\n  this.nice_match = 0; /* Stop searching when current match exceeds this */\n\n              /* used by trees.c: */\n\n  /* Didn't use ct_data typedef below to suppress compiler warning */\n\n  // struct ct_data_s dyn_ltree[HEAP_SIZE];   /* literal and length tree */\n  // struct ct_data_s dyn_dtree[2*D_CODES+1]; /* distance tree */\n  // struct ct_data_s bl_tree[2*BL_CODES+1];  /* Huffman tree for bit lengths */\n\n  // Use flat array of DOUBLE size, with interleaved fata,\n  // because JS does not support effective\n  this.dyn_ltree  = new utils.Buf16(HEAP_SIZE * 2);\n  this.dyn_dtree  = new utils.Buf16((2*D_CODES+1) * 2);\n  this.bl_tree    = new utils.Buf16((2*BL_CODES+1) * 2);\n  zero(this.dyn_ltree);\n  zero(this.dyn_dtree);\n  zero(this.bl_tree);\n\n  this.l_desc   = null;         /* desc. for literal tree */\n  this.d_desc   = null;         /* desc. for distance tree */\n  this.bl_desc  = null;         /* desc. for bit length tree */\n\n  //ush bl_count[MAX_BITS+1];\n  this.bl_count = new utils.Buf16(MAX_BITS+1);\n  /* number of codes at each bit length for an optimal tree */\n\n  //int heap[2*L_CODES+1];      /* heap used to build the Huffman trees */\n  this.heap = new utils.Buf16(2*L_CODES+1);  /* heap used to build the Huffman trees */\n  zero(this.heap);\n\n  this.heap_len = 0;               /* number of elements in the heap */\n  this.heap_max = 0;               /* element of largest frequency */\n  /* The sons of heap[n] are heap[2*n] and heap[2*n+1]. heap[0] is not used.\n   * The same heap array is used to build all trees.\n   */\n\n  this.depth = new utils.Buf16(2*L_CODES+1); //uch depth[2*L_CODES+1];\n  zero(this.depth);\n  /* Depth of each subtree used as tie breaker for trees of equal frequency\n   */\n\n  this.l_buf = 0;          /* buffer index for literals or lengths */\n\n  this.lit_bufsize = 0;\n  /* Size of match buffer for literals/lengths.  There are 4 reasons for\n   * limiting lit_bufsize to 64K:\n   *   - frequencies can be kept in 16 bit counters\n   *   - if compression is not successful for the first block, all input\n   *     data is still in the window so we can still emit a stored block even\n   *     when input comes from standard input.  (This can also be done for\n   *     all blocks if lit_bufsize is not greater than 32K.)\n   *   - if compression is not successful for a file smaller than 64K, we can\n   *     even emit a stored file instead of a stored block (saving 5 bytes).\n   *     This is applicable only for zip (not gzip or zlib).\n   *   - creating new Huffman trees less frequently may not provide fast\n   *     adaptation to changes in the input data statistics. (Take for\n   *     example a binary file with poorly compressible code followed by\n   *     a highly compressible string table.) Smaller buffer sizes give\n   *     fast adaptation but have of course the overhead of transmitting\n   *     trees more frequently.\n   *   - I can't count above 4\n   */\n\n  this.last_lit = 0;      /* running index in l_buf */\n\n  this.d_buf = 0;\n  /* Buffer index for distances. To simplify the code, d_buf and l_buf have\n   * the same number of elements. To use different lengths, an extra flag\n   * array would be necessary.\n   */\n\n  this.opt_len = 0;       /* bit length of current block with optimal trees */\n  this.static_len = 0;    /* bit length of current block with static trees */\n  this.matches = 0;       /* number of string matches in current block */\n  this.insert = 0;        /* bytes at end of window left to insert */\n\n\n  this.bi_buf = 0;\n  /* Output buffer. bits are inserted starting at the bottom (least\n   * significant bits).\n   */\n  this.bi_valid = 0;\n  /* Number of valid bits in bi_buf.  All bits above the last valid bit\n   * are always zero.\n   */\n\n  // Used for window memory init. We safely ignore it for JS. That makes\n  // sense only for pointers and memory check tools.\n  //this.high_water = 0;\n  /* High water mark offset in window for initialized bytes -- bytes above\n   * this are set to zero in order to avoid memory check warnings when\n   * longest match routines access bytes past the input.  This is then\n   * updated to the new high water mark.\n   */\n}\n\n\nfunction deflateResetKeep(strm) {\n  var s;\n\n  if (!strm || !strm.state) {\n    return err(strm, Z_STREAM_ERROR);\n  }\n\n  strm.total_in = strm.total_out = 0;\n  strm.data_type = Z_UNKNOWN;\n\n  s = strm.state;\n  s.pending = 0;\n  s.pending_out = 0;\n\n  if (s.wrap < 0) {\n    s.wrap = -s.wrap;\n    /* was made negative by deflate(..., Z_FINISH); */\n  }\n  s.status = (s.wrap ? INIT_STATE : BUSY_STATE);\n  strm.adler = (s.wrap === 2) ?\n    0  // crc32(0, Z_NULL, 0)\n  :\n    1; // adler32(0, Z_NULL, 0)\n  s.last_flush = Z_NO_FLUSH;\n  trees._tr_init(s);\n  return Z_OK;\n}\n\n\nfunction deflateReset(strm) {\n  var ret = deflateResetKeep(strm);\n  if (ret === Z_OK) {\n    lm_init(strm.state);\n  }\n  return ret;\n}\n\n\nfunction deflateSetHeader(strm, head) {\n  if (!strm || !strm.state) { return Z_STREAM_ERROR; }\n  if (strm.state.wrap !== 2) { return Z_STREAM_ERROR; }\n  strm.state.gzhead = head;\n  return Z_OK;\n}\n\n\nfunction deflateInit2(strm, level, method, windowBits, memLevel, strategy) {\n  if (!strm) { // === Z_NULL\n    return Z_STREAM_ERROR;\n  }\n  var wrap = 1;\n\n  if (level === Z_DEFAULT_COMPRESSION) {\n    level = 6;\n  }\n\n  if (windowBits < 0) { /* suppress zlib wrapper */\n    wrap = 0;\n    windowBits = -windowBits;\n  }\n\n  else if (windowBits > 15) {\n    wrap = 2;           /* write gzip wrapper instead */\n    windowBits -= 16;\n  }\n\n\n  if (memLevel < 1 || memLevel > MAX_MEM_LEVEL || method !== Z_DEFLATED ||\n    windowBits < 8 || windowBits > 15 || level < 0 || level > 9 ||\n    strategy < 0 || strategy > Z_FIXED) {\n    return err(strm, Z_STREAM_ERROR);\n  }\n\n\n  if (windowBits === 8) {\n    windowBits = 9;\n  }\n  /* until 256-byte window bug fixed */\n\n  var s = new DeflateState();\n\n  strm.state = s;\n  s.strm = strm;\n\n  s.wrap = wrap;\n  s.gzhead = null;\n  s.w_bits = windowBits;\n  s.w_size = 1 << s.w_bits;\n  s.w_mask = s.w_size - 1;\n\n  s.hash_bits = memLevel + 7;\n  s.hash_size = 1 << s.hash_bits;\n  s.hash_mask = s.hash_size - 1;\n  s.hash_shift = ~~((s.hash_bits + MIN_MATCH - 1) / MIN_MATCH);\n\n  s.window = new utils.Buf8(s.w_size * 2);\n  s.head = new utils.Buf16(s.hash_size);\n  s.prev = new utils.Buf16(s.w_size);\n\n  // Don't need mem init magic for JS.\n  //s.high_water = 0;  /* nothing written to s->window yet */\n\n  s.lit_bufsize = 1 << (memLevel + 6); /* 16K elements by default */\n\n  s.pending_buf_size = s.lit_bufsize * 4;\n  s.pending_buf = new utils.Buf8(s.pending_buf_size);\n\n  s.d_buf = s.lit_bufsize >> 1;\n  s.l_buf = (1 + 2) * s.lit_bufsize;\n\n  s.level = level;\n  s.strategy = strategy;\n  s.method = method;\n\n  return deflateReset(strm);\n}\n\nfunction deflateInit(strm, level) {\n  return deflateInit2(strm, level, Z_DEFLATED, MAX_WBITS, DEF_MEM_LEVEL, Z_DEFAULT_STRATEGY);\n}\n\n\nfunction deflate(strm, flush) {\n  var old_flush, s;\n  var beg, val; // for gzip header write only\n\n  if (!strm || !strm.state ||\n    flush > Z_BLOCK || flush < 0) {\n    return strm ? err(strm, Z_STREAM_ERROR) : Z_STREAM_ERROR;\n  }\n\n  s = strm.state;\n\n  if (!strm.output ||\n      (!strm.input && strm.avail_in !== 0) ||\n      (s.status === FINISH_STATE && flush !== Z_FINISH)) {\n    return err(strm, (strm.avail_out === 0) ? Z_BUF_ERROR : Z_STREAM_ERROR);\n  }\n\n  s.strm = strm; /* just in case */\n  old_flush = s.last_flush;\n  s.last_flush = flush;\n\n  /* Write the header */\n  if (s.status === INIT_STATE) {\n\n    if (s.wrap === 2) { // GZIP header\n      strm.adler = 0;  //crc32(0L, Z_NULL, 0);\n      put_byte(s, 31);\n      put_byte(s, 139);\n      put_byte(s, 8);\n      if (!s.gzhead) { // s->gzhead == Z_NULL\n        put_byte(s, 0);\n        put_byte(s, 0);\n        put_byte(s, 0);\n        put_byte(s, 0);\n        put_byte(s, 0);\n        put_byte(s, s.level === 9 ? 2 :\n                    (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2 ?\n                     4 : 0));\n        put_byte(s, OS_CODE);\n        s.status = BUSY_STATE;\n      }\n      else {\n        put_byte(s, (s.gzhead.text ? 1 : 0) +\n                    (s.gzhead.hcrc ? 2 : 0) +\n                    (!s.gzhead.extra ? 0 : 4) +\n                    (!s.gzhead.name ? 0 : 8) +\n                    (!s.gzhead.comment ? 0 : 16)\n                );\n        put_byte(s, s.gzhead.time & 0xff);\n        put_byte(s, (s.gzhead.time >> 8) & 0xff);\n        put_byte(s, (s.gzhead.time >> 16) & 0xff);\n        put_byte(s, (s.gzhead.time >> 24) & 0xff);\n        put_byte(s, s.level === 9 ? 2 :\n                    (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2 ?\n                     4 : 0));\n        put_byte(s, s.gzhead.os & 0xff);\n        if (s.gzhead.extra && s.gzhead.extra.length) {\n          put_byte(s, s.gzhead.extra.length & 0xff);\n          put_byte(s, (s.gzhead.extra.length >> 8) & 0xff);\n        }\n        if (s.gzhead.hcrc) {\n          strm.adler = crc32(strm.adler, s.pending_buf, s.pending, 0);\n        }\n        s.gzindex = 0;\n        s.status = EXTRA_STATE;\n      }\n    }\n    else // DEFLATE header\n    {\n      var header = (Z_DEFLATED + ((s.w_bits - 8) << 4)) << 8;\n      var level_flags = -1;\n\n      if (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2) {\n        level_flags = 0;\n      } else if (s.level < 6) {\n        level_flags = 1;\n      } else if (s.level === 6) {\n        level_flags = 2;\n      } else {\n        level_flags = 3;\n      }\n      header |= (level_flags << 6);\n      if (s.strstart !== 0) { header |= PRESET_DICT; }\n      header += 31 - (header % 31);\n\n      s.status = BUSY_STATE;\n      putShortMSB(s, header);\n\n      /* Save the adler32 of the preset dictionary: */\n      if (s.strstart !== 0) {\n        putShortMSB(s, strm.adler >>> 16);\n        putShortMSB(s, strm.adler & 0xffff);\n      }\n      strm.adler = 1; // adler32(0L, Z_NULL, 0);\n    }\n  }\n\n//#ifdef GZIP\n  if (s.status === EXTRA_STATE) {\n    if (s.gzhead.extra/* != Z_NULL*/) {\n      beg = s.pending;  /* start of bytes to update crc */\n\n      while (s.gzindex < (s.gzhead.extra.length & 0xffff)) {\n        if (s.pending === s.pending_buf_size) {\n          if (s.gzhead.hcrc && s.pending > beg) {\n            strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);\n          }\n          flush_pending(strm);\n          beg = s.pending;\n          if (s.pending === s.pending_buf_size) {\n            break;\n          }\n        }\n        put_byte(s, s.gzhead.extra[s.gzindex] & 0xff);\n        s.gzindex++;\n      }\n      if (s.gzhead.hcrc && s.pending > beg) {\n        strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);\n      }\n      if (s.gzindex === s.gzhead.extra.length) {\n        s.gzindex = 0;\n        s.status = NAME_STATE;\n      }\n    }\n    else {\n      s.status = NAME_STATE;\n    }\n  }\n  if (s.status === NAME_STATE) {\n    if (s.gzhead.name/* != Z_NULL*/) {\n      beg = s.pending;  /* start of bytes to update crc */\n      //int val;\n\n      do {\n        if (s.pending === s.pending_buf_size) {\n          if (s.gzhead.hcrc && s.pending > beg) {\n            strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);\n          }\n          flush_pending(strm);\n          beg = s.pending;\n          if (s.pending === s.pending_buf_size) {\n            val = 1;\n            break;\n          }\n        }\n        // JS specific: little magic to add zero terminator to end of string\n        if (s.gzindex < s.gzhead.name.length) {\n          val = s.gzhead.name.charCodeAt(s.gzindex++) & 0xff;\n        } else {\n          val = 0;\n        }\n        put_byte(s, val);\n      } while (val !== 0);\n\n      if (s.gzhead.hcrc && s.pending > beg) {\n        strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);\n      }\n      if (val === 0) {\n        s.gzindex = 0;\n        s.status = COMMENT_STATE;\n      }\n    }\n    else {\n      s.status = COMMENT_STATE;\n    }\n  }\n  if (s.status === COMMENT_STATE) {\n    if (s.gzhead.comment/* != Z_NULL*/) {\n      beg = s.pending;  /* start of bytes to update crc */\n      //int val;\n\n      do {\n        if (s.pending === s.pending_buf_size) {\n          if (s.gzhead.hcrc && s.pending > beg) {\n            strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);\n          }\n          flush_pending(strm);\n          beg = s.pending;\n          if (s.pending === s.pending_buf_size) {\n            val = 1;\n            break;\n          }\n        }\n        // JS specific: little magic to add zero terminator to end of string\n        if (s.gzindex < s.gzhead.comment.length) {\n          val = s.gzhead.comment.charCodeAt(s.gzindex++) & 0xff;\n        } else {\n          val = 0;\n        }\n        put_byte(s, val);\n      } while (val !== 0);\n\n      if (s.gzhead.hcrc && s.pending > beg) {\n        strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);\n      }\n      if (val === 0) {\n        s.status = HCRC_STATE;\n      }\n    }\n    else {\n      s.status = HCRC_STATE;\n    }\n  }\n  if (s.status === HCRC_STATE) {\n    if (s.gzhead.hcrc) {\n      if (s.pending + 2 > s.pending_buf_size) {\n        flush_pending(strm);\n      }\n      if (s.pending + 2 <= s.pending_buf_size) {\n        put_byte(s, strm.adler & 0xff);\n        put_byte(s, (strm.adler >> 8) & 0xff);\n        strm.adler = 0; //crc32(0L, Z_NULL, 0);\n        s.status = BUSY_STATE;\n      }\n    }\n    else {\n      s.status = BUSY_STATE;\n    }\n  }\n//#endif\n\n  /* Flush as much pending output as possible */\n  if (s.pending !== 0) {\n    flush_pending(strm);\n    if (strm.avail_out === 0) {\n      /* Since avail_out is 0, deflate will be called again with\n       * more output space, but possibly with both pending and\n       * avail_in equal to zero. There won't be anything to do,\n       * but this is not an error situation so make sure we\n       * return OK instead of BUF_ERROR at next call of deflate:\n       */\n      s.last_flush = -1;\n      return Z_OK;\n    }\n\n    /* Make sure there is something to do and avoid duplicate consecutive\n     * flushes. For repeated and useless calls with Z_FINISH, we keep\n     * returning Z_STREAM_END instead of Z_BUF_ERROR.\n     */\n  } else if (strm.avail_in === 0 && rank(flush) <= rank(old_flush) &&\n    flush !== Z_FINISH) {\n    return err(strm, Z_BUF_ERROR);\n  }\n\n  /* User must not provide more input after the first FINISH: */\n  if (s.status === FINISH_STATE && strm.avail_in !== 0) {\n    return err(strm, Z_BUF_ERROR);\n  }\n\n  /* Start a new block or continue the current one.\n   */\n  if (strm.avail_in !== 0 || s.lookahead !== 0 ||\n    (flush !== Z_NO_FLUSH && s.status !== FINISH_STATE)) {\n    var bstate = (s.strategy === Z_HUFFMAN_ONLY) ? deflate_huff(s, flush) :\n      (s.strategy === Z_RLE ? deflate_rle(s, flush) :\n        configuration_table[s.level].func(s, flush));\n\n    if (bstate === BS_FINISH_STARTED || bstate === BS_FINISH_DONE) {\n      s.status = FINISH_STATE;\n    }\n    if (bstate === BS_NEED_MORE || bstate === BS_FINISH_STARTED) {\n      if (strm.avail_out === 0) {\n        s.last_flush = -1;\n        /* avoid BUF_ERROR next call, see above */\n      }\n      return Z_OK;\n      /* If flush != Z_NO_FLUSH && avail_out == 0, the next call\n       * of deflate should use the same flush parameter to make sure\n       * that the flush is complete. So we don't have to output an\n       * empty block here, this will be done at next call. This also\n       * ensures that for a very small output buffer, we emit at most\n       * one empty block.\n       */\n    }\n    if (bstate === BS_BLOCK_DONE) {\n      if (flush === Z_PARTIAL_FLUSH) {\n        trees._tr_align(s);\n      }\n      else if (flush !== Z_BLOCK) { /* FULL_FLUSH or SYNC_FLUSH */\n\n        trees._tr_stored_block(s, 0, 0, false);\n        /* For a full flush, this empty block will be recognized\n         * as a special marker by inflate_sync().\n         */\n        if (flush === Z_FULL_FLUSH) {\n          /*** CLEAR_HASH(s); ***/             /* forget history */\n          zero(s.head); // Fill with NIL (= 0);\n\n          if (s.lookahead === 0) {\n            s.strstart = 0;\n            s.block_start = 0;\n            s.insert = 0;\n          }\n        }\n      }\n      flush_pending(strm);\n      if (strm.avail_out === 0) {\n        s.last_flush = -1; /* avoid BUF_ERROR at next call, see above */\n        return Z_OK;\n      }\n    }\n  }\n  //Assert(strm->avail_out > 0, \"bug2\");\n  //if (strm.avail_out <= 0) { throw new Error(\"bug2\");}\n\n  if (flush !== Z_FINISH) { return Z_OK; }\n  if (s.wrap <= 0) { return Z_STREAM_END; }\n\n  /* Write the trailer */\n  if (s.wrap === 2) {\n    put_byte(s, strm.adler & 0xff);\n    put_byte(s, (strm.adler >> 8) & 0xff);\n    put_byte(s, (strm.adler >> 16) & 0xff);\n    put_byte(s, (strm.adler >> 24) & 0xff);\n    put_byte(s, strm.total_in & 0xff);\n    put_byte(s, (strm.total_in >> 8) & 0xff);\n    put_byte(s, (strm.total_in >> 16) & 0xff);\n    put_byte(s, (strm.total_in >> 24) & 0xff);\n  }\n  else\n  {\n    putShortMSB(s, strm.adler >>> 16);\n    putShortMSB(s, strm.adler & 0xffff);\n  }\n\n  flush_pending(strm);\n  /* If avail_out is zero, the application will call deflate again\n   * to flush the rest.\n   */\n  if (s.wrap > 0) { s.wrap = -s.wrap; }\n  /* write the trailer only once! */\n  return s.pending !== 0 ? Z_OK : Z_STREAM_END;\n}\n\nfunction deflateEnd(strm) {\n  var status;\n\n  if (!strm/*== Z_NULL*/ || !strm.state/*== Z_NULL*/) {\n    return Z_STREAM_ERROR;\n  }\n\n  status = strm.state.status;\n  if (status !== INIT_STATE &&\n    status !== EXTRA_STATE &&\n    status !== NAME_STATE &&\n    status !== COMMENT_STATE &&\n    status !== HCRC_STATE &&\n    status !== BUSY_STATE &&\n    status !== FINISH_STATE\n  ) {\n    return err(strm, Z_STREAM_ERROR);\n  }\n\n  strm.state = null;\n\n  return status === BUSY_STATE ? err(strm, Z_DATA_ERROR) : Z_OK;\n}\n\n/* =========================================================================\n * Copy the source state to the destination state\n */\n//function deflateCopy(dest, source) {\n//\n//}\n\nexports.deflateInit = deflateInit;\nexports.deflateInit2 = deflateInit2;\nexports.deflateReset = deflateReset;\nexports.deflateResetKeep = deflateResetKeep;\nexports.deflateSetHeader = deflateSetHeader;\nexports.deflate = deflate;\nexports.deflateEnd = deflateEnd;\nexports.deflateInfo = 'pako deflate (from Nodeca project)';\n\n/* Not implemented\nexports.deflateBound = deflateBound;\nexports.deflateCopy = deflateCopy;\nexports.deflateSetDictionary = deflateSetDictionary;\nexports.deflateParams = deflateParams;\nexports.deflatePending = deflatePending;\nexports.deflatePrime = deflatePrime;\nexports.deflateTune = deflateTune;\n*/\n\n},{\"../utils/common\":127,\"./adler32\":129,\"./crc32\":131,\"./messages\":137,\"./trees\":138}],133:[function(require,module,exports){\n'use strict';\n\n\nfunction GZheader() {\n  /* true if compressed data believed to be text */\n  this.text       = 0;\n  /* modification time */\n  this.time       = 0;\n  /* extra flags (not used when writing a gzip file) */\n  this.xflags     = 0;\n  /* operating system */\n  this.os         = 0;\n  /* pointer to extra field or Z_NULL if none */\n  this.extra      = null;\n  /* extra field length (valid if extra != Z_NULL) */\n  this.extra_len  = 0; // Actually, we don't need it in JS,\n                       // but leave for few code modifications\n\n  //\n  // Setup limits is not necessary because in js we should not preallocate memory\n  // for inflate use constant limit in 65536 bytes\n  //\n\n  /* space at extra (only when reading header) */\n  // this.extra_max  = 0;\n  /* pointer to zero-terminated file name or Z_NULL */\n  this.name       = '';\n  /* space at name (only when reading header) */\n  // this.name_max   = 0;\n  /* pointer to zero-terminated comment or Z_NULL */\n  this.comment    = '';\n  /* space at comment (only when reading header) */\n  // this.comm_max   = 0;\n  /* true if there was or will be a header crc */\n  this.hcrc       = 0;\n  /* true when done reading gzip header (not used when writing a gzip file) */\n  this.done       = false;\n}\n\nmodule.exports = GZheader;\n\n},{}],134:[function(require,module,exports){\n'use strict';\n\n// See state defs from inflate.js\nvar BAD = 30;       /* got a data error -- remain here until reset */\nvar TYPE = 12;      /* i: waiting for type bits, including last-flag bit */\n\n/*\n   Decode literal, length, and distance codes and write out the resulting\n   literal and match bytes until either not enough input or output is\n   available, an end-of-block is encountered, or a data error is encountered.\n   When large enough input and output buffers are supplied to inflate(), for\n   example, a 16K input buffer and a 64K output buffer, more than 95% of the\n   inflate execution time is spent in this routine.\n\n   Entry assumptions:\n\n        state.mode === LEN\n        strm.avail_in >= 6\n        strm.avail_out >= 258\n        start >= strm.avail_out\n        state.bits < 8\n\n   On return, state.mode is one of:\n\n        LEN -- ran out of enough output space or enough available input\n        TYPE -- reached end of block code, inflate() to interpret next block\n        BAD -- error in block data\n\n   Notes:\n\n    - The maximum input bits used by a length/distance pair is 15 bits for the\n      length code, 5 bits for the length extra, 15 bits for the distance code,\n      and 13 bits for the distance extra.  This totals 48 bits, or six bytes.\n      Therefore if strm.avail_in >= 6, then there is enough input to avoid\n      checking for available input while decoding.\n\n    - The maximum bytes that a single length/distance pair can output is 258\n      bytes, which is the maximum length that can be coded.  inflate_fast()\n      requires strm.avail_out >= 258 for each loop to avoid checking for\n      output space.\n */\nmodule.exports = function inflate_fast(strm, start) {\n  var state;\n  var _in;                    /* local strm.input */\n  var last;                   /* have enough input while in < last */\n  var _out;                   /* local strm.output */\n  var beg;                    /* inflate()'s initial strm.output */\n  var end;                    /* while out < end, enough space available */\n//#ifdef INFLATE_STRICT\n  var dmax;                   /* maximum distance from zlib header */\n//#endif\n  var wsize;                  /* window size or zero if not using window */\n  var whave;                  /* valid bytes in the window */\n  var wnext;                  /* window write index */\n  var window;                 /* allocated sliding window, if wsize != 0 */\n  var hold;                   /* local strm.hold */\n  var bits;                   /* local strm.bits */\n  var lcode;                  /* local strm.lencode */\n  var dcode;                  /* local strm.distcode */\n  var lmask;                  /* mask for first level of length codes */\n  var dmask;                  /* mask for first level of distance codes */\n  var here;                   /* retrieved table entry */\n  var op;                     /* code bits, operation, extra bits, or */\n                              /*  window position, window bytes to copy */\n  var len;                    /* match length, unused bytes */\n  var dist;                   /* match distance */\n  var from;                   /* where to copy match from */\n  var from_source;\n\n\n  var input, output; // JS specific, because we have no pointers\n\n  /* copy state to local variables */\n  state = strm.state;\n  //here = state.here;\n  _in = strm.next_in;\n  input = strm.input;\n  last = _in + (strm.avail_in - 5);\n  _out = strm.next_out;\n  output = strm.output;\n  beg = _out - (start - strm.avail_out);\n  end = _out + (strm.avail_out - 257);\n//#ifdef INFLATE_STRICT\n  dmax = state.dmax;\n//#endif\n  wsize = state.wsize;\n  whave = state.whave;\n  wnext = state.wnext;\n  window = state.window;\n  hold = state.hold;\n  bits = state.bits;\n  lcode = state.lencode;\n  dcode = state.distcode;\n  lmask = (1 << state.lenbits) - 1;\n  dmask = (1 << state.distbits) - 1;\n\n\n  /* decode literals and length/distances until end-of-block or not enough\n     input data or output space */\n\n  top:\n  do {\n    if (bits < 15) {\n      hold += input[_in++] << bits;\n      bits += 8;\n      hold += input[_in++] << bits;\n      bits += 8;\n    }\n\n    here = lcode[hold & lmask];\n\n    dolen:\n    for (;;) { // Goto emulation\n      op = here >>> 24/*here.bits*/;\n      hold >>>= op;\n      bits -= op;\n      op = (here >>> 16) & 0xff/*here.op*/;\n      if (op === 0) {                          /* literal */\n        //Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ?\n        //        \"inflate:         literal '%c'\\n\" :\n        //        \"inflate:         literal 0x%02x\\n\", here.val));\n        output[_out++] = here & 0xffff/*here.val*/;\n      }\n      else if (op & 16) {                     /* length base */\n        len = here & 0xffff/*here.val*/;\n        op &= 15;                           /* number of extra bits */\n        if (op) {\n          if (bits < op) {\n            hold += input[_in++] << bits;\n            bits += 8;\n          }\n          len += hold & ((1 << op) - 1);\n          hold >>>= op;\n          bits -= op;\n        }\n        //Tracevv((stderr, \"inflate:         length %u\\n\", len));\n        if (bits < 15) {\n          hold += input[_in++] << bits;\n          bits += 8;\n          hold += input[_in++] << bits;\n          bits += 8;\n        }\n        here = dcode[hold & dmask];\n\n        dodist:\n        for (;;) { // goto emulation\n          op = here >>> 24/*here.bits*/;\n          hold >>>= op;\n          bits -= op;\n          op = (here >>> 16) & 0xff/*here.op*/;\n\n          if (op & 16) {                      /* distance base */\n            dist = here & 0xffff/*here.val*/;\n            op &= 15;                       /* number of extra bits */\n            if (bits < op) {\n              hold += input[_in++] << bits;\n              bits += 8;\n              if (bits < op) {\n                hold += input[_in++] << bits;\n                bits += 8;\n              }\n            }\n            dist += hold & ((1 << op) - 1);\n//#ifdef INFLATE_STRICT\n            if (dist > dmax) {\n              strm.msg = 'invalid distance too far back';\n              state.mode = BAD;\n              break top;\n            }\n//#endif\n            hold >>>= op;\n            bits -= op;\n            //Tracevv((stderr, \"inflate:         distance %u\\n\", dist));\n            op = _out - beg;                /* max distance in output */\n            if (dist > op) {                /* see if copy from window */\n              op = dist - op;               /* distance back in window */\n              if (op > whave) {\n                if (state.sane) {\n                  strm.msg = 'invalid distance too far back';\n                  state.mode = BAD;\n                  break top;\n                }\n\n// (!) This block is disabled in zlib defailts,\n// don't enable it for binary compatibility\n//#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR\n//                if (len <= op - whave) {\n//                  do {\n//                    output[_out++] = 0;\n//                  } while (--len);\n//                  continue top;\n//                }\n//                len -= op - whave;\n//                do {\n//                  output[_out++] = 0;\n//                } while (--op > whave);\n//                if (op === 0) {\n//                  from = _out - dist;\n//                  do {\n//                    output[_out++] = output[from++];\n//                  } while (--len);\n//                  continue top;\n//                }\n//#endif\n              }\n              from = 0; // window index\n              from_source = window;\n              if (wnext === 0) {           /* very common case */\n                from += wsize - op;\n                if (op < len) {         /* some from window */\n                  len -= op;\n                  do {\n                    output[_out++] = window[from++];\n                  } while (--op);\n                  from = _out - dist;  /* rest from output */\n                  from_source = output;\n                }\n              }\n              else if (wnext < op) {      /* wrap around window */\n                from += wsize + wnext - op;\n                op -= wnext;\n                if (op < len) {         /* some from end of window */\n                  len -= op;\n                  do {\n                    output[_out++] = window[from++];\n                  } while (--op);\n                  from = 0;\n                  if (wnext < len) {  /* some from start of window */\n                    op = wnext;\n                    len -= op;\n                    do {\n                      output[_out++] = window[from++];\n                    } while (--op);\n                    from = _out - dist;      /* rest from output */\n                    from_source = output;\n                  }\n                }\n              }\n              else {                      /* contiguous in window */\n                from += wnext - op;\n                if (op < len) {         /* some from window */\n                  len -= op;\n                  do {\n                    output[_out++] = window[from++];\n                  } while (--op);\n                  from = _out - dist;  /* rest from output */\n                  from_source = output;\n                }\n              }\n              while (len > 2) {\n                output[_out++] = from_source[from++];\n                output[_out++] = from_source[from++];\n                output[_out++] = from_source[from++];\n                len -= 3;\n              }\n              if (len) {\n                output[_out++] = from_source[from++];\n                if (len > 1) {\n                  output[_out++] = from_source[from++];\n                }\n              }\n            }\n            else {\n              from = _out - dist;          /* copy direct from output */\n              do {                        /* minimum length is three */\n                output[_out++] = output[from++];\n                output[_out++] = output[from++];\n                output[_out++] = output[from++];\n                len -= 3;\n              } while (len > 2);\n              if (len) {\n                output[_out++] = output[from++];\n                if (len > 1) {\n                  output[_out++] = output[from++];\n                }\n              }\n            }\n          }\n          else if ((op & 64) === 0) {          /* 2nd level distance code */\n            here = dcode[(here & 0xffff)/*here.val*/ + (hold & ((1 << op) - 1))];\n            continue dodist;\n          }\n          else {\n            strm.msg = 'invalid distance code';\n            state.mode = BAD;\n            break top;\n          }\n\n          break; // need to emulate goto via \"continue\"\n        }\n      }\n      else if ((op & 64) === 0) {              /* 2nd level length code */\n        here = lcode[(here & 0xffff)/*here.val*/ + (hold & ((1 << op) - 1))];\n        continue dolen;\n      }\n      else if (op & 32) {                     /* end-of-block */\n        //Tracevv((stderr, \"inflate:         end of block\\n\"));\n        state.mode = TYPE;\n        break top;\n      }\n      else {\n        strm.msg = 'invalid literal/length code';\n        state.mode = BAD;\n        break top;\n      }\n\n      break; // need to emulate goto via \"continue\"\n    }\n  } while (_in < last && _out < end);\n\n  /* return unused bytes (on entry, bits < 8, so in won't go too far back) */\n  len = bits >> 3;\n  _in -= len;\n  bits -= len << 3;\n  hold &= (1 << bits) - 1;\n\n  /* update state and return */\n  strm.next_in = _in;\n  strm.next_out = _out;\n  strm.avail_in = (_in < last ? 5 + (last - _in) : 5 - (_in - last));\n  strm.avail_out = (_out < end ? 257 + (end - _out) : 257 - (_out - end));\n  state.hold = hold;\n  state.bits = bits;\n  return;\n};\n\n},{}],135:[function(require,module,exports){\n'use strict';\n\n\nvar utils = require('../utils/common');\nvar adler32 = require('./adler32');\nvar crc32   = require('./crc32');\nvar inflate_fast = require('./inffast');\nvar inflate_table = require('./inftrees');\n\nvar CODES = 0;\nvar LENS = 1;\nvar DISTS = 2;\n\n/* Public constants ==========================================================*/\n/* ===========================================================================*/\n\n\n/* Allowed flush values; see deflate() and inflate() below for details */\n//var Z_NO_FLUSH      = 0;\n//var Z_PARTIAL_FLUSH = 1;\n//var Z_SYNC_FLUSH    = 2;\n//var Z_FULL_FLUSH    = 3;\nvar Z_FINISH        = 4;\nvar Z_BLOCK         = 5;\nvar Z_TREES         = 6;\n\n\n/* Return codes for the compression/decompression functions. Negative values\n * are errors, positive values are used for special but normal events.\n */\nvar Z_OK            = 0;\nvar Z_STREAM_END    = 1;\nvar Z_NEED_DICT     = 2;\n//var Z_ERRNO         = -1;\nvar Z_STREAM_ERROR  = -2;\nvar Z_DATA_ERROR    = -3;\nvar Z_MEM_ERROR     = -4;\nvar Z_BUF_ERROR     = -5;\n//var Z_VERSION_ERROR = -6;\n\n/* The deflate compression method */\nvar Z_DEFLATED  = 8;\n\n\n/* STATES ====================================================================*/\n/* ===========================================================================*/\n\n\nvar    HEAD = 1;       /* i: waiting for magic header */\nvar    FLAGS = 2;      /* i: waiting for method and flags (gzip) */\nvar    TIME = 3;       /* i: waiting for modification time (gzip) */\nvar    OS = 4;         /* i: waiting for extra flags and operating system (gzip) */\nvar    EXLEN = 5;      /* i: waiting for extra length (gzip) */\nvar    EXTRA = 6;      /* i: waiting for extra bytes (gzip) */\nvar    NAME = 7;       /* i: waiting for end of file name (gzip) */\nvar    COMMENT = 8;    /* i: waiting for end of comment (gzip) */\nvar    HCRC = 9;       /* i: waiting for header crc (gzip) */\nvar    DICTID = 10;    /* i: waiting for dictionary check value */\nvar    DICT = 11;      /* waiting for inflateSetDictionary() call */\nvar        TYPE = 12;      /* i: waiting for type bits, including last-flag bit */\nvar        TYPEDO = 13;    /* i: same, but skip check to exit inflate on new block */\nvar        STORED = 14;    /* i: waiting for stored size (length and complement) */\nvar        COPY_ = 15;     /* i/o: same as COPY below, but only first time in */\nvar        COPY = 16;      /* i/o: waiting for input or output to copy stored block */\nvar        TABLE = 17;     /* i: waiting for dynamic block table lengths */\nvar        LENLENS = 18;   /* i: waiting for code length code lengths */\nvar        CODELENS = 19;  /* i: waiting for length/lit and distance code lengths */\nvar            LEN_ = 20;      /* i: same as LEN below, but only first time in */\nvar            LEN = 21;       /* i: waiting for length/lit/eob code */\nvar            LENEXT = 22;    /* i: waiting for length extra bits */\nvar            DIST = 23;      /* i: waiting for distance code */\nvar            DISTEXT = 24;   /* i: waiting for distance extra bits */\nvar            MATCH = 25;     /* o: waiting for output space to copy string */\nvar            LIT = 26;       /* o: waiting for output space to write literal */\nvar    CHECK = 27;     /* i: waiting for 32-bit check value */\nvar    LENGTH = 28;    /* i: waiting for 32-bit length (gzip) */\nvar    DONE = 29;      /* finished check, done -- remain here until reset */\nvar    BAD = 30;       /* got a data error -- remain here until reset */\nvar    MEM = 31;       /* got an inflate() memory error -- remain here until reset */\nvar    SYNC = 32;      /* looking for synchronization bytes to restart inflate() */\n\n/* ===========================================================================*/\n\n\n\nvar ENOUGH_LENS = 852;\nvar ENOUGH_DISTS = 592;\n//var ENOUGH =  (ENOUGH_LENS+ENOUGH_DISTS);\n\nvar MAX_WBITS = 15;\n/* 32K LZ77 window */\nvar DEF_WBITS = MAX_WBITS;\n\n\nfunction ZSWAP32(q) {\n  return  (((q >>> 24) & 0xff) +\n          ((q >>> 8) & 0xff00) +\n          ((q & 0xff00) << 8) +\n          ((q & 0xff) << 24));\n}\n\n\nfunction InflateState() {\n  this.mode = 0;             /* current inflate mode */\n  this.last = false;          /* true if processing last block */\n  this.wrap = 0;              /* bit 0 true for zlib, bit 1 true for gzip */\n  this.havedict = false;      /* true if dictionary provided */\n  this.flags = 0;             /* gzip header method and flags (0 if zlib) */\n  this.dmax = 0;              /* zlib header max distance (INFLATE_STRICT) */\n  this.check = 0;             /* protected copy of check value */\n  this.total = 0;             /* protected copy of output count */\n  // TODO: may be {}\n  this.head = null;           /* where to save gzip header information */\n\n  /* sliding window */\n  this.wbits = 0;             /* log base 2 of requested window size */\n  this.wsize = 0;             /* window size or zero if not using window */\n  this.whave = 0;             /* valid bytes in the window */\n  this.wnext = 0;             /* window write index */\n  this.window = null;         /* allocated sliding window, if needed */\n\n  /* bit accumulator */\n  this.hold = 0;              /* input bit accumulator */\n  this.bits = 0;              /* number of bits in \"in\" */\n\n  /* for string and stored block copying */\n  this.length = 0;            /* literal or length of data to copy */\n  this.offset = 0;            /* distance back to copy string from */\n\n  /* for table and code decoding */\n  this.extra = 0;             /* extra bits needed */\n\n  /* fixed and dynamic code tables */\n  this.lencode = null;          /* starting table for length/literal codes */\n  this.distcode = null;         /* starting table for distance codes */\n  this.lenbits = 0;           /* index bits for lencode */\n  this.distbits = 0;          /* index bits for distcode */\n\n  /* dynamic table building */\n  this.ncode = 0;             /* number of code length code lengths */\n  this.nlen = 0;              /* number of length code lengths */\n  this.ndist = 0;             /* number of distance code lengths */\n  this.have = 0;              /* number of code lengths in lens[] */\n  this.next = null;              /* next available space in codes[] */\n\n  this.lens = new utils.Buf16(320); /* temporary storage for code lengths */\n  this.work = new utils.Buf16(288); /* work area for code table building */\n\n  /*\n   because we don't have pointers in js, we use lencode and distcode directly\n   as buffers so we don't need codes\n  */\n  //this.codes = new utils.Buf32(ENOUGH);       /* space for code tables */\n  this.lendyn = null;              /* dynamic table for length/literal codes (JS specific) */\n  this.distdyn = null;             /* dynamic table for distance codes (JS specific) */\n  this.sane = 0;                   /* if false, allow invalid distance too far */\n  this.back = 0;                   /* bits back of last unprocessed length/lit */\n  this.was = 0;                    /* initial length of match */\n}\n\nfunction inflateResetKeep(strm) {\n  var state;\n\n  if (!strm || !strm.state) { return Z_STREAM_ERROR; }\n  state = strm.state;\n  strm.total_in = strm.total_out = state.total = 0;\n  strm.msg = ''; /*Z_NULL*/\n  if (state.wrap) {       /* to support ill-conceived Java test suite */\n    strm.adler = state.wrap & 1;\n  }\n  state.mode = HEAD;\n  state.last = 0;\n  state.havedict = 0;\n  state.dmax = 32768;\n  state.head = null/*Z_NULL*/;\n  state.hold = 0;\n  state.bits = 0;\n  //state.lencode = state.distcode = state.next = state.codes;\n  state.lencode = state.lendyn = new utils.Buf32(ENOUGH_LENS);\n  state.distcode = state.distdyn = new utils.Buf32(ENOUGH_DISTS);\n\n  state.sane = 1;\n  state.back = -1;\n  //Tracev((stderr, \"inflate: reset\\n\"));\n  return Z_OK;\n}\n\nfunction inflateReset(strm) {\n  var state;\n\n  if (!strm || !strm.state) { return Z_STREAM_ERROR; }\n  state = strm.state;\n  state.wsize = 0;\n  state.whave = 0;\n  state.wnext = 0;\n  return inflateResetKeep(strm);\n\n}\n\nfunction inflateReset2(strm, windowBits) {\n  var wrap;\n  var state;\n\n  /* get the state */\n  if (!strm || !strm.state) { return Z_STREAM_ERROR; }\n  state = strm.state;\n\n  /* extract wrap request from windowBits parameter */\n  if (windowBits < 0) {\n    wrap = 0;\n    windowBits = -windowBits;\n  }\n  else {\n    wrap = (windowBits >> 4) + 1;\n    if (windowBits < 48) {\n      windowBits &= 15;\n    }\n  }\n\n  /* set number of window bits, free window if different */\n  if (windowBits && (windowBits < 8 || windowBits > 15)) {\n    return Z_STREAM_ERROR;\n  }\n  if (state.window !== null && state.wbits !== windowBits) {\n    state.window = null;\n  }\n\n  /* update state and reset the rest of it */\n  state.wrap = wrap;\n  state.wbits = windowBits;\n  return inflateReset(strm);\n}\n\nfunction inflateInit2(strm, windowBits) {\n  var ret;\n  var state;\n\n  if (!strm) { return Z_STREAM_ERROR; }\n  //strm.msg = Z_NULL;                 /* in case we return an error */\n\n  state = new InflateState();\n\n  //if (state === Z_NULL) return Z_MEM_ERROR;\n  //Tracev((stderr, \"inflate: allocated\\n\"));\n  strm.state = state;\n  state.window = null/*Z_NULL*/;\n  ret = inflateReset2(strm, windowBits);\n  if (ret !== Z_OK) {\n    strm.state = null/*Z_NULL*/;\n  }\n  return ret;\n}\n\nfunction inflateInit(strm) {\n  return inflateInit2(strm, DEF_WBITS);\n}\n\n\n/*\n Return state with length and distance decoding tables and index sizes set to\n fixed code decoding.  Normally this returns fixed tables from inffixed.h.\n If BUILDFIXED is defined, then instead this routine builds the tables the\n first time it's called, and returns those tables the first time and\n thereafter.  This reduces the size of the code by about 2K bytes, in\n exchange for a little execution time.  However, BUILDFIXED should not be\n used for threaded applications, since the rewriting of the tables and virgin\n may not be thread-safe.\n */\nvar virgin = true;\n\nvar lenfix, distfix; // We have no pointers in JS, so keep tables separate\n\nfunction fixedtables(state) {\n  /* build fixed huffman tables if first call (may not be thread safe) */\n  if (virgin) {\n    var sym;\n\n    lenfix = new utils.Buf32(512);\n    distfix = new utils.Buf32(32);\n\n    /* literal/length table */\n    sym = 0;\n    while (sym < 144) { state.lens[sym++] = 8; }\n    while (sym < 256) { state.lens[sym++] = 9; }\n    while (sym < 280) { state.lens[sym++] = 7; }\n    while (sym < 288) { state.lens[sym++] = 8; }\n\n    inflate_table(LENS,  state.lens, 0, 288, lenfix,   0, state.work, {bits: 9});\n\n    /* distance table */\n    sym = 0;\n    while (sym < 32) { state.lens[sym++] = 5; }\n\n    inflate_table(DISTS, state.lens, 0, 32,   distfix, 0, state.work, {bits: 5});\n\n    /* do this just once */\n    virgin = false;\n  }\n\n  state.lencode = lenfix;\n  state.lenbits = 9;\n  state.distcode = distfix;\n  state.distbits = 5;\n}\n\n\n/*\n Update the window with the last wsize (normally 32K) bytes written before\n returning.  If window does not exist yet, create it.  This is only called\n when a window is already in use, or when output has been written during this\n inflate call, but the end of the deflate stream has not been reached yet.\n It is also called to create a window for dictionary data when a dictionary\n is loaded.\n\n Providing output buffers larger than 32K to inflate() should provide a speed\n advantage, since only the last 32K of output is copied to the sliding window\n upon return from inflate(), and since all distances after the first 32K of\n output will fall in the output data, making match copies simpler and faster.\n The advantage may be dependent on the size of the processor's data caches.\n */\nfunction updatewindow(strm, src, end, copy) {\n  var dist;\n  var state = strm.state;\n\n  /* if it hasn't been done already, allocate space for the window */\n  if (state.window === null) {\n    state.wsize = 1 << state.wbits;\n    state.wnext = 0;\n    state.whave = 0;\n\n    state.window = new utils.Buf8(state.wsize);\n  }\n\n  /* copy state->wsize or less output bytes into the circular window */\n  if (copy >= state.wsize) {\n    utils.arraySet(state.window,src, end - state.wsize, state.wsize, 0);\n    state.wnext = 0;\n    state.whave = state.wsize;\n  }\n  else {\n    dist = state.wsize - state.wnext;\n    if (dist > copy) {\n      dist = copy;\n    }\n    //zmemcpy(state->window + state->wnext, end - copy, dist);\n    utils.arraySet(state.window,src, end - copy, dist, state.wnext);\n    copy -= dist;\n    if (copy) {\n      //zmemcpy(state->window, end - copy, copy);\n      utils.arraySet(state.window,src, end - copy, copy, 0);\n      state.wnext = copy;\n      state.whave = state.wsize;\n    }\n    else {\n      state.wnext += dist;\n      if (state.wnext === state.wsize) { state.wnext = 0; }\n      if (state.whave < state.wsize) { state.whave += dist; }\n    }\n  }\n  return 0;\n}\n\nfunction inflate(strm, flush) {\n  var state;\n  var input, output;          // input/output buffers\n  var next;                   /* next input INDEX */\n  var put;                    /* next output INDEX */\n  var have, left;             /* available input and output */\n  var hold;                   /* bit buffer */\n  var bits;                   /* bits in bit buffer */\n  var _in, _out;              /* save starting available input and output */\n  var copy;                   /* number of stored or match bytes to copy */\n  var from;                   /* where to copy match bytes from */\n  var from_source;\n  var here = 0;               /* current decoding table entry */\n  var here_bits, here_op, here_val; // paked \"here\" denormalized (JS specific)\n  //var last;                   /* parent table entry */\n  var last_bits, last_op, last_val; // paked \"last\" denormalized (JS specific)\n  var len;                    /* length to copy for repeats, bits to drop */\n  var ret;                    /* return code */\n  var hbuf = new utils.Buf8(4);    /* buffer for gzip header crc calculation */\n  var opts;\n\n  var n; // temporary var for NEED_BITS\n\n  var order = /* permutation of code lengths */\n    [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15];\n\n\n  if (!strm || !strm.state || !strm.output ||\n      (!strm.input && strm.avail_in !== 0)) {\n    return Z_STREAM_ERROR;\n  }\n\n  state = strm.state;\n  if (state.mode === TYPE) { state.mode = TYPEDO; }    /* skip check */\n\n\n  //--- LOAD() ---\n  put = strm.next_out;\n  output = strm.output;\n  left = strm.avail_out;\n  next = strm.next_in;\n  input = strm.input;\n  have = strm.avail_in;\n  hold = state.hold;\n  bits = state.bits;\n  //---\n\n  _in = have;\n  _out = left;\n  ret = Z_OK;\n\n  inf_leave: // goto emulation\n  for (;;) {\n    switch (state.mode) {\n    case HEAD:\n      if (state.wrap === 0) {\n        state.mode = TYPEDO;\n        break;\n      }\n      //=== NEEDBITS(16);\n      while (bits < 16) {\n        if (have === 0) { break inf_leave; }\n        have--;\n        hold += input[next++] << bits;\n        bits += 8;\n      }\n      //===//\n      if ((state.wrap & 2) && hold === 0x8b1f) {  /* gzip header */\n        state.check = 0/*crc32(0L, Z_NULL, 0)*/;\n        //=== CRC2(state.check, hold);\n        hbuf[0] = hold & 0xff;\n        hbuf[1] = (hold >>> 8) & 0xff;\n        state.check = crc32(state.check, hbuf, 2, 0);\n        //===//\n\n        //=== INITBITS();\n        hold = 0;\n        bits = 0;\n        //===//\n        state.mode = FLAGS;\n        break;\n      }\n      state.flags = 0;           /* expect zlib header */\n      if (state.head) {\n        state.head.done = false;\n      }\n      if (!(state.wrap & 1) ||   /* check if zlib header allowed */\n        (((hold & 0xff)/*BITS(8)*/ << 8) + (hold >> 8)) % 31) {\n        strm.msg = 'incorrect header check';\n        state.mode = BAD;\n        break;\n      }\n      if ((hold & 0x0f)/*BITS(4)*/ !== Z_DEFLATED) {\n        strm.msg = 'unknown compression method';\n        state.mode = BAD;\n        break;\n      }\n      //--- DROPBITS(4) ---//\n      hold >>>= 4;\n      bits -= 4;\n      //---//\n      len = (hold & 0x0f)/*BITS(4)*/ + 8;\n      if (state.wbits === 0) {\n        state.wbits = len;\n      }\n      else if (len > state.wbits) {\n        strm.msg = 'invalid window size';\n        state.mode = BAD;\n        break;\n      }\n      state.dmax = 1 << len;\n      //Tracev((stderr, \"inflate:   zlib header ok\\n\"));\n      strm.adler = state.check = 1/*adler32(0L, Z_NULL, 0)*/;\n      state.mode = hold & 0x200 ? DICTID : TYPE;\n      //=== INITBITS();\n      hold = 0;\n      bits = 0;\n      //===//\n      break;\n    case FLAGS:\n      //=== NEEDBITS(16); */\n      while (bits < 16) {\n        if (have === 0) { break inf_leave; }\n        have--;\n        hold += input[next++] << bits;\n        bits += 8;\n      }\n      //===//\n      state.flags = hold;\n      if ((state.flags & 0xff) !== Z_DEFLATED) {\n        strm.msg = 'unknown compression method';\n        state.mode = BAD;\n        break;\n      }\n      if (state.flags & 0xe000) {\n        strm.msg = 'unknown header flags set';\n        state.mode = BAD;\n        break;\n      }\n      if (state.head) {\n        state.head.text = ((hold >> 8) & 1);\n      }\n      if (state.flags & 0x0200) {\n        //=== CRC2(state.check, hold);\n        hbuf[0] = hold & 0xff;\n        hbuf[1] = (hold >>> 8) & 0xff;\n        state.check = crc32(state.check, hbuf, 2, 0);\n        //===//\n      }\n      //=== INITBITS();\n      hold = 0;\n      bits = 0;\n      //===//\n      state.mode = TIME;\n      /* falls through */\n    case TIME:\n      //=== NEEDBITS(32); */\n      while (bits < 32) {\n        if (have === 0) { break inf_leave; }\n        have--;\n        hold += input[next++] << bits;\n        bits += 8;\n      }\n      //===//\n      if (state.head) {\n        state.head.time = hold;\n      }\n      if (state.flags & 0x0200) {\n        //=== CRC4(state.check, hold)\n        hbuf[0] = hold & 0xff;\n        hbuf[1] = (hold >>> 8) & 0xff;\n        hbuf[2] = (hold >>> 16) & 0xff;\n        hbuf[3] = (hold >>> 24) & 0xff;\n        state.check = crc32(state.check, hbuf, 4, 0);\n        //===\n      }\n      //=== INITBITS();\n      hold = 0;\n      bits = 0;\n      //===//\n      state.mode = OS;\n      /* falls through */\n    case OS:\n      //=== NEEDBITS(16); */\n      while (bits < 16) {\n        if (have === 0) { break inf_leave; }\n        have--;\n        hold += input[next++] << bits;\n        bits += 8;\n      }\n      //===//\n      if (state.head) {\n        state.head.xflags = (hold & 0xff);\n        state.head.os = (hold >> 8);\n      }\n      if (state.flags & 0x0200) {\n        //=== CRC2(state.check, hold);\n        hbuf[0] = hold & 0xff;\n        hbuf[1] = (hold >>> 8) & 0xff;\n        state.check = crc32(state.check, hbuf, 2, 0);\n        //===//\n      }\n      //=== INITBITS();\n      hold = 0;\n      bits = 0;\n      //===//\n      state.mode = EXLEN;\n      /* falls through */\n    case EXLEN:\n      if (state.flags & 0x0400) {\n        //=== NEEDBITS(16); */\n        while (bits < 16) {\n          if (have === 0) { break inf_leave; }\n          have--;\n          hold += input[next++] << bits;\n          bits += 8;\n        }\n        //===//\n        state.length = hold;\n        if (state.head) {\n          state.head.extra_len = hold;\n        }\n        if (state.flags & 0x0200) {\n          //=== CRC2(state.check, hold);\n          hbuf[0] = hold & 0xff;\n          hbuf[1] = (hold >>> 8) & 0xff;\n          state.check = crc32(state.check, hbuf, 2, 0);\n          //===//\n        }\n        //=== INITBITS();\n        hold = 0;\n        bits = 0;\n        //===//\n      }\n      else if (state.head) {\n        state.head.extra = null/*Z_NULL*/;\n      }\n      state.mode = EXTRA;\n      /* falls through */\n    case EXTRA:\n      if (state.flags & 0x0400) {\n        copy = state.length;\n        if (copy > have) { copy = have; }\n        if (copy) {\n          if (state.head) {\n            len = state.head.extra_len - state.length;\n            if (!state.head.extra) {\n              // Use untyped array for more conveniend processing later\n              state.head.extra = new Array(state.head.extra_len);\n            }\n            utils.arraySet(\n              state.head.extra,\n              input,\n              next,\n              // extra field is limited to 65536 bytes\n              // - no need for additional size check\n              copy,\n              /*len + copy > state.head.extra_max - len ? state.head.extra_max : copy,*/\n              len\n            );\n            //zmemcpy(state.head.extra + len, next,\n            //        len + copy > state.head.extra_max ?\n            //        state.head.extra_max - len : copy);\n          }\n          if (state.flags & 0x0200) {\n            state.check = crc32(state.check, input, copy, next);\n          }\n          have -= copy;\n          next += copy;\n          state.length -= copy;\n        }\n        if (state.length) { break inf_leave; }\n      }\n      state.length = 0;\n      state.mode = NAME;\n      /* falls through */\n    case NAME:\n      if (state.flags & 0x0800) {\n        if (have === 0) { break inf_leave; }\n        copy = 0;\n        do {\n          // TODO: 2 or 1 bytes?\n          len = input[next + copy++];\n          /* use constant limit because in js we should not preallocate memory */\n          if (state.head && len &&\n              (state.length < 65536 /*state.head.name_max*/)) {\n            state.head.name += String.fromCharCode(len);\n          }\n        } while (len && copy < have);\n\n        if (state.flags & 0x0200) {\n          state.check = crc32(state.check, input, copy, next);\n        }\n        have -= copy;\n        next += copy;\n        if (len) { break inf_leave; }\n      }\n      else if (state.head) {\n        state.head.name = null;\n      }\n      state.length = 0;\n      state.mode = COMMENT;\n      /* falls through */\n    case COMMENT:\n      if (state.flags & 0x1000) {\n        if (have === 0) { break inf_leave; }\n        copy = 0;\n        do {\n          len = input[next + copy++];\n          /* use constant limit because in js we should not preallocate memory */\n          if (state.head && len &&\n              (state.length < 65536 /*state.head.comm_max*/)) {\n            state.head.comment += String.fromCharCode(len);\n          }\n        } while (len && copy < have);\n        if (state.flags & 0x0200) {\n          state.check = crc32(state.check, input, copy, next);\n        }\n        have -= copy;\n        next += copy;\n        if (len) { break inf_leave; }\n      }\n      else if (state.head) {\n        state.head.comment = null;\n      }\n      state.mode = HCRC;\n      /* falls through */\n    case HCRC:\n      if (state.flags & 0x0200) {\n        //=== NEEDBITS(16); */\n        while (bits < 16) {\n          if (have === 0) { break inf_leave; }\n          have--;\n          hold += input[next++] << bits;\n          bits += 8;\n        }\n        //===//\n        if (hold !== (state.check & 0xffff)) {\n          strm.msg = 'header crc mismatch';\n          state.mode = BAD;\n          break;\n        }\n        //=== INITBITS();\n        hold = 0;\n        bits = 0;\n        //===//\n      }\n      if (state.head) {\n        state.head.hcrc = ((state.flags >> 9) & 1);\n        state.head.done = true;\n      }\n      strm.adler = state.check = 0 /*crc32(0L, Z_NULL, 0)*/;\n      state.mode = TYPE;\n      break;\n    case DICTID:\n      //=== NEEDBITS(32); */\n      while (bits < 32) {\n        if (have === 0) { break inf_leave; }\n        have--;\n        hold += input[next++] << bits;\n        bits += 8;\n      }\n      //===//\n      strm.adler = state.check = ZSWAP32(hold);\n      //=== INITBITS();\n      hold = 0;\n      bits = 0;\n      //===//\n      state.mode = DICT;\n      /* falls through */\n    case DICT:\n      if (state.havedict === 0) {\n        //--- RESTORE() ---\n        strm.next_out = put;\n        strm.avail_out = left;\n        strm.next_in = next;\n        strm.avail_in = have;\n        state.hold = hold;\n        state.bits = bits;\n        //---\n        return Z_NEED_DICT;\n      }\n      strm.adler = state.check = 1/*adler32(0L, Z_NULL, 0)*/;\n      state.mode = TYPE;\n      /* falls through */\n    case TYPE:\n      if (flush === Z_BLOCK || flush === Z_TREES) { break inf_leave; }\n      /* falls through */\n    case TYPEDO:\n      if (state.last) {\n        //--- BYTEBITS() ---//\n        hold >>>= bits & 7;\n        bits -= bits & 7;\n        //---//\n        state.mode = CHECK;\n        break;\n      }\n      //=== NEEDBITS(3); */\n      while (bits < 3) {\n        if (have === 0) { break inf_leave; }\n        have--;\n        hold += input[next++] << bits;\n        bits += 8;\n      }\n      //===//\n      state.last = (hold & 0x01)/*BITS(1)*/;\n      //--- DROPBITS(1) ---//\n      hold >>>= 1;\n      bits -= 1;\n      //---//\n\n      switch ((hold & 0x03)/*BITS(2)*/) {\n      case 0:                             /* stored block */\n        //Tracev((stderr, \"inflate:     stored block%s\\n\",\n        //        state.last ? \" (last)\" : \"\"));\n        state.mode = STORED;\n        break;\n      case 1:                             /* fixed block */\n        fixedtables(state);\n        //Tracev((stderr, \"inflate:     fixed codes block%s\\n\",\n        //        state.last ? \" (last)\" : \"\"));\n        state.mode = LEN_;             /* decode codes */\n        if (flush === Z_TREES) {\n          //--- DROPBITS(2) ---//\n          hold >>>= 2;\n          bits -= 2;\n          //---//\n          break inf_leave;\n        }\n        break;\n      case 2:                             /* dynamic block */\n        //Tracev((stderr, \"inflate:     dynamic codes block%s\\n\",\n        //        state.last ? \" (last)\" : \"\"));\n        state.mode = TABLE;\n        break;\n      case 3:\n        strm.msg = 'invalid block type';\n        state.mode = BAD;\n      }\n      //--- DROPBITS(2) ---//\n      hold >>>= 2;\n      bits -= 2;\n      //---//\n      break;\n    case STORED:\n      //--- BYTEBITS() ---// /* go to byte boundary */\n      hold >>>= bits & 7;\n      bits -= bits & 7;\n      //---//\n      //=== NEEDBITS(32); */\n      while (bits < 32) {\n        if (have === 0) { break inf_leave; }\n        have--;\n        hold += input[next++] << bits;\n        bits += 8;\n      }\n      //===//\n      if ((hold & 0xffff) !== ((hold >>> 16) ^ 0xffff)) {\n        strm.msg = 'invalid stored block lengths';\n        state.mode = BAD;\n        break;\n      }\n      state.length = hold & 0xffff;\n      //Tracev((stderr, \"inflate:       stored length %u\\n\",\n      //        state.length));\n      //=== INITBITS();\n      hold = 0;\n      bits = 0;\n      //===//\n      state.mode = COPY_;\n      if (flush === Z_TREES) { break inf_leave; }\n      /* falls through */\n    case COPY_:\n      state.mode = COPY;\n      /* falls through */\n    case COPY:\n      copy = state.length;\n      if (copy) {\n        if (copy > have) { copy = have; }\n        if (copy > left) { copy = left; }\n        if (copy === 0) { break inf_leave; }\n        //--- zmemcpy(put, next, copy); ---\n        utils.arraySet(output, input, next, copy, put);\n        //---//\n        have -= copy;\n        next += copy;\n        left -= copy;\n        put += copy;\n        state.length -= copy;\n        break;\n      }\n      //Tracev((stderr, \"inflate:       stored end\\n\"));\n      state.mode = TYPE;\n      break;\n    case TABLE:\n      //=== NEEDBITS(14); */\n      while (bits < 14) {\n        if (have === 0) { break inf_leave; }\n        have--;\n        hold += input[next++] << bits;\n        bits += 8;\n      }\n      //===//\n      state.nlen = (hold & 0x1f)/*BITS(5)*/ + 257;\n      //--- DROPBITS(5) ---//\n      hold >>>= 5;\n      bits -= 5;\n      //---//\n      state.ndist = (hold & 0x1f)/*BITS(5)*/ + 1;\n      //--- DROPBITS(5) ---//\n      hold >>>= 5;\n      bits -= 5;\n      //---//\n      state.ncode = (hold & 0x0f)/*BITS(4)*/ + 4;\n      //--- DROPBITS(4) ---//\n      hold >>>= 4;\n      bits -= 4;\n      //---//\n//#ifndef PKZIP_BUG_WORKAROUND\n      if (state.nlen > 286 || state.ndist > 30) {\n        strm.msg = 'too many length or distance symbols';\n        state.mode = BAD;\n        break;\n      }\n//#endif\n      //Tracev((stderr, \"inflate:       table sizes ok\\n\"));\n      state.have = 0;\n      state.mode = LENLENS;\n      /* falls through */\n    case LENLENS:\n      while (state.have < state.ncode) {\n        //=== NEEDBITS(3);\n        while (bits < 3) {\n          if (have === 0) { break inf_leave; }\n          have--;\n          hold += input[next++] << bits;\n          bits += 8;\n        }\n        //===//\n        state.lens[order[state.have++]] = (hold & 0x07);//BITS(3);\n        //--- DROPBITS(3) ---//\n        hold >>>= 3;\n        bits -= 3;\n        //---//\n      }\n      while (state.have < 19) {\n        state.lens[order[state.have++]] = 0;\n      }\n      // We have separate tables & no pointers. 2 commented lines below not needed.\n      //state.next = state.codes;\n      //state.lencode = state.next;\n      // Switch to use dynamic table\n      state.lencode = state.lendyn;\n      state.lenbits = 7;\n\n      opts = {bits: state.lenbits};\n      ret = inflate_table(CODES, state.lens, 0, 19, state.lencode, 0, state.work, opts);\n      state.lenbits = opts.bits;\n\n      if (ret) {\n        strm.msg = 'invalid code lengths set';\n        state.mode = BAD;\n        break;\n      }\n      //Tracev((stderr, \"inflate:       code lengths ok\\n\"));\n      state.have = 0;\n      state.mode = CODELENS;\n      /* falls through */\n    case CODELENS:\n      while (state.have < state.nlen + state.ndist) {\n        for (;;) {\n          here = state.lencode[hold & ((1 << state.lenbits) - 1)];/*BITS(state.lenbits)*/\n          here_bits = here >>> 24;\n          here_op = (here >>> 16) & 0xff;\n          here_val = here & 0xffff;\n\n          if ((here_bits) <= bits) { break; }\n          //--- PULLBYTE() ---//\n          if (have === 0) { break inf_leave; }\n          have--;\n          hold += input[next++] << bits;\n          bits += 8;\n          //---//\n        }\n        if (here_val < 16) {\n          //--- DROPBITS(here.bits) ---//\n          hold >>>= here_bits;\n          bits -= here_bits;\n          //---//\n          state.lens[state.have++] = here_val;\n        }\n        else {\n          if (here_val === 16) {\n            //=== NEEDBITS(here.bits + 2);\n            n = here_bits + 2;\n            while (bits < n) {\n              if (have === 0) { break inf_leave; }\n              have--;\n              hold += input[next++] << bits;\n              bits += 8;\n            }\n            //===//\n            //--- DROPBITS(here.bits) ---//\n            hold >>>= here_bits;\n            bits -= here_bits;\n            //---//\n            if (state.have === 0) {\n              strm.msg = 'invalid bit length repeat';\n              state.mode = BAD;\n              break;\n            }\n            len = state.lens[state.have - 1];\n            copy = 3 + (hold & 0x03);//BITS(2);\n            //--- DROPBITS(2) ---//\n            hold >>>= 2;\n            bits -= 2;\n            //---//\n          }\n          else if (here_val === 17) {\n            //=== NEEDBITS(here.bits + 3);\n            n = here_bits + 3;\n            while (bits < n) {\n              if (have === 0) { break inf_leave; }\n              have--;\n              hold += input[next++] << bits;\n              bits += 8;\n            }\n            //===//\n            //--- DROPBITS(here.bits) ---//\n            hold >>>= here_bits;\n            bits -= here_bits;\n            //---//\n            len = 0;\n            copy = 3 + (hold & 0x07);//BITS(3);\n            //--- DROPBITS(3) ---//\n            hold >>>= 3;\n            bits -= 3;\n            //---//\n          }\n          else {\n            //=== NEEDBITS(here.bits + 7);\n            n = here_bits + 7;\n            while (bits < n) {\n              if (have === 0) { break inf_leave; }\n              have--;\n              hold += input[next++] << bits;\n              bits += 8;\n            }\n            //===//\n            //--- DROPBITS(here.bits) ---//\n            hold >>>= here_bits;\n            bits -= here_bits;\n            //---//\n            len = 0;\n            copy = 11 + (hold & 0x7f);//BITS(7);\n            //--- DROPBITS(7) ---//\n            hold >>>= 7;\n            bits -= 7;\n            //---//\n          }\n          if (state.have + copy > state.nlen + state.ndist) {\n            strm.msg = 'invalid bit length repeat';\n            state.mode = BAD;\n            break;\n          }\n          while (copy--) {\n            state.lens[state.have++] = len;\n          }\n        }\n      }\n\n      /* handle error breaks in while */\n      if (state.mode === BAD) { break; }\n\n      /* check for end-of-block code (better have one) */\n      if (state.lens[256] === 0) {\n        strm.msg = 'invalid code -- missing end-of-block';\n        state.mode = BAD;\n        break;\n      }\n\n      /* build code tables -- note: do not change the lenbits or distbits\n         values here (9 and 6) without reading the comments in inftrees.h\n         concerning the ENOUGH constants, which depend on those values */\n      state.lenbits = 9;\n\n      opts = {bits: state.lenbits};\n      ret = inflate_table(LENS, state.lens, 0, state.nlen, state.lencode, 0, state.work, opts);\n      // We have separate tables & no pointers. 2 commented lines below not needed.\n      // state.next_index = opts.table_index;\n      state.lenbits = opts.bits;\n      // state.lencode = state.next;\n\n      if (ret) {\n        strm.msg = 'invalid literal/lengths set';\n        state.mode = BAD;\n        break;\n      }\n\n      state.distbits = 6;\n      //state.distcode.copy(state.codes);\n      // Switch to use dynamic table\n      state.distcode = state.distdyn;\n      opts = {bits: state.distbits};\n      ret = inflate_table(DISTS, state.lens, state.nlen, state.ndist, state.distcode, 0, state.work, opts);\n      // We have separate tables & no pointers. 2 commented lines below not needed.\n      // state.next_index = opts.table_index;\n      state.distbits = opts.bits;\n      // state.distcode = state.next;\n\n      if (ret) {\n        strm.msg = 'invalid distances set';\n        state.mode = BAD;\n        break;\n      }\n      //Tracev((stderr, 'inflate:       codes ok\\n'));\n      state.mode = LEN_;\n      if (flush === Z_TREES) { break inf_leave; }\n      /* falls through */\n    case LEN_:\n      state.mode = LEN;\n      /* falls through */\n    case LEN:\n      if (have >= 6 && left >= 258) {\n        //--- RESTORE() ---\n        strm.next_out = put;\n        strm.avail_out = left;\n        strm.next_in = next;\n        strm.avail_in = have;\n        state.hold = hold;\n        state.bits = bits;\n        //---\n        inflate_fast(strm, _out);\n        //--- LOAD() ---\n        put = strm.next_out;\n        output = strm.output;\n        left = strm.avail_out;\n        next = strm.next_in;\n        input = strm.input;\n        have = strm.avail_in;\n        hold = state.hold;\n        bits = state.bits;\n        //---\n\n        if (state.mode === TYPE) {\n          state.back = -1;\n        }\n        break;\n      }\n      state.back = 0;\n      for (;;) {\n        here = state.lencode[hold & ((1 << state.lenbits) -1)];  /*BITS(state.lenbits)*/\n        here_bits = here >>> 24;\n        here_op = (here >>> 16) & 0xff;\n        here_val = here & 0xffff;\n\n        if (here_bits <= bits) { break; }\n        //--- PULLBYTE() ---//\n        if (have === 0) { break inf_leave; }\n        have--;\n        hold += input[next++] << bits;\n        bits += 8;\n        //---//\n      }\n      if (here_op && (here_op & 0xf0) === 0) {\n        last_bits = here_bits;\n        last_op = here_op;\n        last_val = here_val;\n        for (;;) {\n          here = state.lencode[last_val +\n                  ((hold & ((1 << (last_bits + last_op)) -1))/*BITS(last.bits + last.op)*/ >> last_bits)];\n          here_bits = here >>> 24;\n          here_op = (here >>> 16) & 0xff;\n          here_val = here & 0xffff;\n\n          if ((last_bits + here_bits) <= bits) { break; }\n          //--- PULLBYTE() ---//\n          if (have === 0) { break inf_leave; }\n          have--;\n          hold += input[next++] << bits;\n          bits += 8;\n          //---//\n        }\n        //--- DROPBITS(last.bits) ---//\n        hold >>>= last_bits;\n        bits -= last_bits;\n        //---//\n        state.back += last_bits;\n      }\n      //--- DROPBITS(here.bits) ---//\n      hold >>>= here_bits;\n      bits -= here_bits;\n      //---//\n      state.back += here_bits;\n      state.length = here_val;\n      if (here_op === 0) {\n        //Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ?\n        //        \"inflate:         literal '%c'\\n\" :\n        //        \"inflate:         literal 0x%02x\\n\", here.val));\n        state.mode = LIT;\n        break;\n      }\n      if (here_op & 32) {\n        //Tracevv((stderr, \"inflate:         end of block\\n\"));\n        state.back = -1;\n        state.mode = TYPE;\n        break;\n      }\n      if (here_op & 64) {\n        strm.msg = 'invalid literal/length code';\n        state.mode = BAD;\n        break;\n      }\n      state.extra = here_op & 15;\n      state.mode = LENEXT;\n      /* falls through */\n    case LENEXT:\n      if (state.extra) {\n        //=== NEEDBITS(state.extra);\n        n = state.extra;\n        while (bits < n) {\n          if (have === 0) { break inf_leave; }\n          have--;\n          hold += input[next++] << bits;\n          bits += 8;\n        }\n        //===//\n        state.length += hold & ((1 << state.extra) -1)/*BITS(state.extra)*/;\n        //--- DROPBITS(state.extra) ---//\n        hold >>>= state.extra;\n        bits -= state.extra;\n        //---//\n        state.back += state.extra;\n      }\n      //Tracevv((stderr, \"inflate:         length %u\\n\", state.length));\n      state.was = state.length;\n      state.mode = DIST;\n      /* falls through */\n    case DIST:\n      for (;;) {\n        here = state.distcode[hold & ((1 << state.distbits) -1)];/*BITS(state.distbits)*/\n        here_bits = here >>> 24;\n        here_op = (here >>> 16) & 0xff;\n        here_val = here & 0xffff;\n\n        if ((here_bits) <= bits) { break; }\n        //--- PULLBYTE() ---//\n        if (have === 0) { break inf_leave; }\n        have--;\n        hold += input[next++] << bits;\n        bits += 8;\n        //---//\n      }\n      if ((here_op & 0xf0) === 0) {\n        last_bits = here_bits;\n        last_op = here_op;\n        last_val = here_val;\n        for (;;) {\n          here = state.distcode[last_val +\n                  ((hold & ((1 << (last_bits + last_op)) -1))/*BITS(last.bits + last.op)*/ >> last_bits)];\n          here_bits = here >>> 24;\n          here_op = (here >>> 16) & 0xff;\n          here_val = here & 0xffff;\n\n          if ((last_bits + here_bits) <= bits) { break; }\n          //--- PULLBYTE() ---//\n          if (have === 0) { break inf_leave; }\n          have--;\n          hold += input[next++] << bits;\n          bits += 8;\n          //---//\n        }\n        //--- DROPBITS(last.bits) ---//\n        hold >>>= last_bits;\n        bits -= last_bits;\n        //---//\n        state.back += last_bits;\n      }\n      //--- DROPBITS(here.bits) ---//\n      hold >>>= here_bits;\n      bits -= here_bits;\n      //---//\n      state.back += here_bits;\n      if (here_op & 64) {\n        strm.msg = 'invalid distance code';\n        state.mode = BAD;\n        break;\n      }\n      state.offset = here_val;\n      state.extra = (here_op) & 15;\n      state.mode = DISTEXT;\n      /* falls through */\n    case DISTEXT:\n      if (state.extra) {\n        //=== NEEDBITS(state.extra);\n        n = state.extra;\n        while (bits < n) {\n          if (have === 0) { break inf_leave; }\n          have--;\n          hold += input[next++] << bits;\n          bits += 8;\n        }\n        //===//\n        state.offset += hold & ((1 << state.extra) -1)/*BITS(state.extra)*/;\n        //--- DROPBITS(state.extra) ---//\n        hold >>>= state.extra;\n        bits -= state.extra;\n        //---//\n        state.back += state.extra;\n      }\n//#ifdef INFLATE_STRICT\n      if (state.offset > state.dmax) {\n        strm.msg = 'invalid distance too far back';\n        state.mode = BAD;\n        break;\n      }\n//#endif\n      //Tracevv((stderr, \"inflate:         distance %u\\n\", state.offset));\n      state.mode = MATCH;\n      /* falls through */\n    case MATCH:\n      if (left === 0) { break inf_leave; }\n      copy = _out - left;\n      if (state.offset > copy) {         /* copy from window */\n        copy = state.offset - copy;\n        if (copy > state.whave) {\n          if (state.sane) {\n            strm.msg = 'invalid distance too far back';\n            state.mode = BAD;\n            break;\n          }\n// (!) This block is disabled in zlib defailts,\n// don't enable it for binary compatibility\n//#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR\n//          Trace((stderr, \"inflate.c too far\\n\"));\n//          copy -= state.whave;\n//          if (copy > state.length) { copy = state.length; }\n//          if (copy > left) { copy = left; }\n//          left -= copy;\n//          state.length -= copy;\n//          do {\n//            output[put++] = 0;\n//          } while (--copy);\n//          if (state.length === 0) { state.mode = LEN; }\n//          break;\n//#endif\n        }\n        if (copy > state.wnext) {\n          copy -= state.wnext;\n          from = state.wsize - copy;\n        }\n        else {\n          from = state.wnext - copy;\n        }\n        if (copy > state.length) { copy = state.length; }\n        from_source = state.window;\n      }\n      else {                              /* copy from output */\n        from_source = output;\n        from = put - state.offset;\n        copy = state.length;\n      }\n      if (copy > left) { copy = left; }\n      left -= copy;\n      state.length -= copy;\n      do {\n        output[put++] = from_source[from++];\n      } while (--copy);\n      if (state.length === 0) { state.mode = LEN; }\n      break;\n    case LIT:\n      if (left === 0) { break inf_leave; }\n      output[put++] = state.length;\n      left--;\n      state.mode = LEN;\n      break;\n    case CHECK:\n      if (state.wrap) {\n        //=== NEEDBITS(32);\n        while (bits < 32) {\n          if (have === 0) { break inf_leave; }\n          have--;\n          // Use '|' insdead of '+' to make sure that result is signed\n          hold |= input[next++] << bits;\n          bits += 8;\n        }\n        //===//\n        _out -= left;\n        strm.total_out += _out;\n        state.total += _out;\n        if (_out) {\n          strm.adler = state.check =\n              /*UPDATE(state.check, put - _out, _out);*/\n              (state.flags ? crc32(state.check, output, _out, put - _out) : adler32(state.check, output, _out, put - _out));\n\n        }\n        _out = left;\n        // NB: crc32 stored as signed 32-bit int, ZSWAP32 returns signed too\n        if ((state.flags ? hold : ZSWAP32(hold)) !== state.check) {\n          strm.msg = 'incorrect data check';\n          state.mode = BAD;\n          break;\n        }\n        //=== INITBITS();\n        hold = 0;\n        bits = 0;\n        //===//\n        //Tracev((stderr, \"inflate:   check matches trailer\\n\"));\n      }\n      state.mode = LENGTH;\n      /* falls through */\n    case LENGTH:\n      if (state.wrap && state.flags) {\n        //=== NEEDBITS(32);\n        while (bits < 32) {\n          if (have === 0) { break inf_leave; }\n          have--;\n          hold += input[next++] << bits;\n          bits += 8;\n        }\n        //===//\n        if (hold !== (state.total & 0xffffffff)) {\n          strm.msg = 'incorrect length check';\n          state.mode = BAD;\n          break;\n        }\n        //=== INITBITS();\n        hold = 0;\n        bits = 0;\n        //===//\n        //Tracev((stderr, \"inflate:   length matches trailer\\n\"));\n      }\n      state.mode = DONE;\n      /* falls through */\n    case DONE:\n      ret = Z_STREAM_END;\n      break inf_leave;\n    case BAD:\n      ret = Z_DATA_ERROR;\n      break inf_leave;\n    case MEM:\n      return Z_MEM_ERROR;\n    case SYNC:\n      /* falls through */\n    default:\n      return Z_STREAM_ERROR;\n    }\n  }\n\n  // inf_leave <- here is real place for \"goto inf_leave\", emulated via \"break inf_leave\"\n\n  /*\n     Return from inflate(), updating the total counts and the check value.\n     If there was no progress during the inflate() call, return a buffer\n     error.  Call updatewindow() to create and/or update the window state.\n     Note: a memory error from inflate() is non-recoverable.\n   */\n\n  //--- RESTORE() ---\n  strm.next_out = put;\n  strm.avail_out = left;\n  strm.next_in = next;\n  strm.avail_in = have;\n  state.hold = hold;\n  state.bits = bits;\n  //---\n\n  if (state.wsize || (_out !== strm.avail_out && state.mode < BAD &&\n                      (state.mode < CHECK || flush !== Z_FINISH))) {\n    if (updatewindow(strm, strm.output, strm.next_out, _out - strm.avail_out)) {\n      state.mode = MEM;\n      return Z_MEM_ERROR;\n    }\n  }\n  _in -= strm.avail_in;\n  _out -= strm.avail_out;\n  strm.total_in += _in;\n  strm.total_out += _out;\n  state.total += _out;\n  if (state.wrap && _out) {\n    strm.adler = state.check = /*UPDATE(state.check, strm.next_out - _out, _out);*/\n      (state.flags ? crc32(state.check, output, _out, strm.next_out - _out) : adler32(state.check, output, _out, strm.next_out - _out));\n  }\n  strm.data_type = state.bits + (state.last ? 64 : 0) +\n                    (state.mode === TYPE ? 128 : 0) +\n                    (state.mode === LEN_ || state.mode === COPY_ ? 256 : 0);\n  if (((_in === 0 && _out === 0) || flush === Z_FINISH) && ret === Z_OK) {\n    ret = Z_BUF_ERROR;\n  }\n  return ret;\n}\n\nfunction inflateEnd(strm) {\n\n  if (!strm || !strm.state /*|| strm->zfree == (free_func)0*/) {\n    return Z_STREAM_ERROR;\n  }\n\n  var state = strm.state;\n  if (state.window) {\n    state.window = null;\n  }\n  strm.state = null;\n  return Z_OK;\n}\n\nfunction inflateGetHeader(strm, head) {\n  var state;\n\n  /* check state */\n  if (!strm || !strm.state) { return Z_STREAM_ERROR; }\n  state = strm.state;\n  if ((state.wrap & 2) === 0) { return Z_STREAM_ERROR; }\n\n  /* save header structure */\n  state.head = head;\n  head.done = false;\n  return Z_OK;\n}\n\n\nexports.inflateReset = inflateReset;\nexports.inflateReset2 = inflateReset2;\nexports.inflateResetKeep = inflateResetKeep;\nexports.inflateInit = inflateInit;\nexports.inflateInit2 = inflateInit2;\nexports.inflate = inflate;\nexports.inflateEnd = inflateEnd;\nexports.inflateGetHeader = inflateGetHeader;\nexports.inflateInfo = 'pako inflate (from Nodeca project)';\n\n/* Not implemented\nexports.inflateCopy = inflateCopy;\nexports.inflateGetDictionary = inflateGetDictionary;\nexports.inflateMark = inflateMark;\nexports.inflatePrime = inflatePrime;\nexports.inflateSetDictionary = inflateSetDictionary;\nexports.inflateSync = inflateSync;\nexports.inflateSyncPoint = inflateSyncPoint;\nexports.inflateUndermine = inflateUndermine;\n*/\n\n},{\"../utils/common\":127,\"./adler32\":129,\"./crc32\":131,\"./inffast\":134,\"./inftrees\":136}],136:[function(require,module,exports){\n'use strict';\n\n\nvar utils = require('../utils/common');\n\nvar MAXBITS = 15;\nvar ENOUGH_LENS = 852;\nvar ENOUGH_DISTS = 592;\n//var ENOUGH = (ENOUGH_LENS+ENOUGH_DISTS);\n\nvar CODES = 0;\nvar LENS = 1;\nvar DISTS = 2;\n\nvar lbase = [ /* Length codes 257..285 base */\n  3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31,\n  35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0\n];\n\nvar lext = [ /* Length codes 257..285 extra */\n  16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18,\n  19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 72, 78\n];\n\nvar dbase = [ /* Distance codes 0..29 base */\n  1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193,\n  257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145,\n  8193, 12289, 16385, 24577, 0, 0\n];\n\nvar dext = [ /* Distance codes 0..29 extra */\n  16, 16, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 22, 22,\n  23, 23, 24, 24, 25, 25, 26, 26, 27, 27,\n  28, 28, 29, 29, 64, 64\n];\n\nmodule.exports = function inflate_table(type, lens, lens_index, codes, table, table_index, work, opts)\n{\n  var bits = opts.bits;\n      //here = opts.here; /* table entry for duplication */\n\n  var len = 0;               /* a code's length in bits */\n  var sym = 0;               /* index of code symbols */\n  var min = 0, max = 0;          /* minimum and maximum code lengths */\n  var root = 0;              /* number of index bits for root table */\n  var curr = 0;              /* number of index bits for current table */\n  var drop = 0;              /* code bits to drop for sub-table */\n  var left = 0;                   /* number of prefix codes available */\n  var used = 0;              /* code entries in table used */\n  var huff = 0;              /* Huffman code */\n  var incr;              /* for incrementing code, index */\n  var fill;              /* index for replicating entries */\n  var low;               /* low bits for current root entry */\n  var mask;              /* mask for low root bits */\n  var next;             /* next available space in table */\n  var base = null;     /* base value table to use */\n  var base_index = 0;\n//  var shoextra;    /* extra bits table to use */\n  var end;                    /* use base and extra for symbol > end */\n  var count = new utils.Buf16(MAXBITS+1); //[MAXBITS+1];    /* number of codes of each length */\n  var offs = new utils.Buf16(MAXBITS+1); //[MAXBITS+1];     /* offsets in table for each length */\n  var extra = null;\n  var extra_index = 0;\n\n  var here_bits, here_op, here_val;\n\n  /*\n   Process a set of code lengths to create a canonical Huffman code.  The\n   code lengths are lens[0..codes-1].  Each length corresponds to the\n   symbols 0..codes-1.  The Huffman code is generated by first sorting the\n   symbols by length from short to long, and retaining the symbol order\n   for codes with equal lengths.  Then the code starts with all zero bits\n   for the first code of the shortest length, and the codes are integer\n   increments for the same length, and zeros are appended as the length\n   increases.  For the deflate format, these bits are stored backwards\n   from their more natural integer increment ordering, and so when the\n   decoding tables are built in the large loop below, the integer codes\n   are incremented backwards.\n\n   This routine assumes, but does not check, that all of the entries in\n   lens[] are in the range 0..MAXBITS.  The caller must assure this.\n   1..MAXBITS is interpreted as that code length.  zero means that that\n   symbol does not occur in this code.\n\n   The codes are sorted by computing a count of codes for each length,\n   creating from that a table of starting indices for each length in the\n   sorted table, and then entering the symbols in order in the sorted\n   table.  The sorted table is work[], with that space being provided by\n   the caller.\n\n   The length counts are used for other purposes as well, i.e. finding\n   the minimum and maximum length codes, determining if there are any\n   codes at all, checking for a valid set of lengths, and looking ahead\n   at length counts to determine sub-table sizes when building the\n   decoding tables.\n   */\n\n  /* accumulate lengths for codes (assumes lens[] all in 0..MAXBITS) */\n  for (len = 0; len <= MAXBITS; len++) {\n    count[len] = 0;\n  }\n  for (sym = 0; sym < codes; sym++) {\n    count[lens[lens_index + sym]]++;\n  }\n\n  /* bound code lengths, force root to be within code lengths */\n  root = bits;\n  for (max = MAXBITS; max >= 1; max--) {\n    if (count[max] !== 0) { break; }\n  }\n  if (root > max) {\n    root = max;\n  }\n  if (max === 0) {                     /* no symbols to code at all */\n    //table.op[opts.table_index] = 64;  //here.op = (var char)64;    /* invalid code marker */\n    //table.bits[opts.table_index] = 1;   //here.bits = (var char)1;\n    //table.val[opts.table_index++] = 0;   //here.val = (var short)0;\n    table[table_index++] = (1 << 24) | (64 << 16) | 0;\n\n\n    //table.op[opts.table_index] = 64;\n    //table.bits[opts.table_index] = 1;\n    //table.val[opts.table_index++] = 0;\n    table[table_index++] = (1 << 24) | (64 << 16) | 0;\n\n    opts.bits = 1;\n    return 0;     /* no symbols, but wait for decoding to report error */\n  }\n  for (min = 1; min < max; min++) {\n    if (count[min] !== 0) { break; }\n  }\n  if (root < min) {\n    root = min;\n  }\n\n  /* check for an over-subscribed or incomplete set of lengths */\n  left = 1;\n  for (len = 1; len <= MAXBITS; len++) {\n    left <<= 1;\n    left -= count[len];\n    if (left < 0) {\n      return -1;\n    }        /* over-subscribed */\n  }\n  if (left > 0 && (type === CODES || max !== 1)) {\n    return -1;                      /* incomplete set */\n  }\n\n  /* generate offsets into symbol table for each length for sorting */\n  offs[1] = 0;\n  for (len = 1; len < MAXBITS; len++) {\n    offs[len + 1] = offs[len] + count[len];\n  }\n\n  /* sort symbols by length, by symbol order within each length */\n  for (sym = 0; sym < codes; sym++) {\n    if (lens[lens_index + sym] !== 0) {\n      work[offs[lens[lens_index + sym]]++] = sym;\n    }\n  }\n\n  /*\n   Create and fill in decoding tables.  In this loop, the table being\n   filled is at next and has curr index bits.  The code being used is huff\n   with length len.  That code is converted to an index by dropping drop\n   bits off of the bottom.  For codes where len is less than drop + curr,\n   those top drop + curr - len bits are incremented through all values to\n   fill the table with replicated entries.\n\n   root is the number of index bits for the root table.  When len exceeds\n   root, sub-tables are created pointed to by the root entry with an index\n   of the low root bits of huff.  This is saved in low to check for when a\n   new sub-table should be started.  drop is zero when the root table is\n   being filled, and drop is root when sub-tables are being filled.\n\n   When a new sub-table is needed, it is necessary to look ahead in the\n   code lengths to determine what size sub-table is needed.  The length\n   counts are used for this, and so count[] is decremented as codes are\n   entered in the tables.\n\n   used keeps track of how many table entries have been allocated from the\n   provided *table space.  It is checked for LENS and DIST tables against\n   the constants ENOUGH_LENS and ENOUGH_DISTS to guard against changes in\n   the initial root table size constants.  See the comments in inftrees.h\n   for more information.\n\n   sym increments through all symbols, and the loop terminates when\n   all codes of length max, i.e. all codes, have been processed.  This\n   routine permits incomplete codes, so another loop after this one fills\n   in the rest of the decoding tables with invalid code markers.\n   */\n\n  /* set up for code type */\n  // poor man optimization - use if-else instead of switch,\n  // to avoid deopts in old v8\n  if (type === CODES) {\n    base = extra = work;    /* dummy value--not used */\n    end = 19;\n\n  } else if (type === LENS) {\n    base = lbase;\n    base_index -= 257;\n    extra = lext;\n    extra_index -= 257;\n    end = 256;\n\n  } else {                    /* DISTS */\n    base = dbase;\n    extra = dext;\n    end = -1;\n  }\n\n  /* initialize opts for loop */\n  huff = 0;                   /* starting code */\n  sym = 0;                    /* starting code symbol */\n  len = min;                  /* starting code length */\n  next = table_index;              /* current table to fill in */\n  curr = root;                /* current table index bits */\n  drop = 0;                   /* current bits to drop from code for index */\n  low = -1;                   /* trigger new sub-table when len > root */\n  used = 1 << root;          /* use root table entries */\n  mask = used - 1;            /* mask for comparing low */\n\n  /* check available table space */\n  if ((type === LENS && used > ENOUGH_LENS) ||\n    (type === DISTS && used > ENOUGH_DISTS)) {\n    return 1;\n  }\n\n  var i=0;\n  /* process all codes and make table entries */\n  for (;;) {\n    i++;\n    /* create table entry */\n    here_bits = len - drop;\n    if (work[sym] < end) {\n      here_op = 0;\n      here_val = work[sym];\n    }\n    else if (work[sym] > end) {\n      here_op = extra[extra_index + work[sym]];\n      here_val = base[base_index + work[sym]];\n    }\n    else {\n      here_op = 32 + 64;         /* end of block */\n      here_val = 0;\n    }\n\n    /* replicate for those indices with low len bits equal to huff */\n    incr = 1 << (len - drop);\n    fill = 1 << curr;\n    min = fill;                 /* save offset to next table */\n    do {\n      fill -= incr;\n      table[next + (huff >> drop) + fill] = (here_bits << 24) | (here_op << 16) | here_val |0;\n    } while (fill !== 0);\n\n    /* backwards increment the len-bit code huff */\n    incr = 1 << (len - 1);\n    while (huff & incr) {\n      incr >>= 1;\n    }\n    if (incr !== 0) {\n      huff &= incr - 1;\n      huff += incr;\n    } else {\n      huff = 0;\n    }\n\n    /* go to next symbol, update count, len */\n    sym++;\n    if (--count[len] === 0) {\n      if (len === max) { break; }\n      len = lens[lens_index + work[sym]];\n    }\n\n    /* create new sub-table if needed */\n    if (len > root && (huff & mask) !== low) {\n      /* if first time, transition to sub-tables */\n      if (drop === 0) {\n        drop = root;\n      }\n\n      /* increment past last table */\n      next += min;            /* here min is 1 << curr */\n\n      /* determine length of next table */\n      curr = len - drop;\n      left = 1 << curr;\n      while (curr + drop < max) {\n        left -= count[curr + drop];\n        if (left <= 0) { break; }\n        curr++;\n        left <<= 1;\n      }\n\n      /* check for enough space */\n      used += 1 << curr;\n      if ((type === LENS && used > ENOUGH_LENS) ||\n        (type === DISTS && used > ENOUGH_DISTS)) {\n        return 1;\n      }\n\n      /* point entry in root table to sub-table */\n      low = huff & mask;\n      /*table.op[low] = curr;\n      table.bits[low] = root;\n      table.val[low] = next - opts.table_index;*/\n      table[low] = (root << 24) | (curr << 16) | (next - table_index) |0;\n    }\n  }\n\n  /* fill in remaining table entry if code is incomplete (guaranteed to have\n   at most one remaining entry, since if the code is incomplete, the\n   maximum code length that was allowed to get this far is one bit) */\n  if (huff !== 0) {\n    //table.op[next + huff] = 64;            /* invalid code marker */\n    //table.bits[next + huff] = len - drop;\n    //table.val[next + huff] = 0;\n    table[next + huff] = ((len - drop) << 24) | (64 << 16) |0;\n  }\n\n  /* set return parameters */\n  //opts.table_index += used;\n  opts.bits = root;\n  return 0;\n};\n\n},{\"../utils/common\":127}],137:[function(require,module,exports){\n'use strict';\n\nmodule.exports = {\n  '2':    'need dictionary',     /* Z_NEED_DICT       2  */\n  '1':    'stream end',          /* Z_STREAM_END      1  */\n  '0':    '',                    /* Z_OK              0  */\n  '-1':   'file error',          /* Z_ERRNO         (-1) */\n  '-2':   'stream error',        /* Z_STREAM_ERROR  (-2) */\n  '-3':   'data error',          /* Z_DATA_ERROR    (-3) */\n  '-4':   'insufficient memory', /* Z_MEM_ERROR     (-4) */\n  '-5':   'buffer error',        /* Z_BUF_ERROR     (-5) */\n  '-6':   'incompatible version' /* Z_VERSION_ERROR (-6) */\n};\n\n},{}],138:[function(require,module,exports){\n'use strict';\n\n\nvar utils = require('../utils/common');\n\n/* Public constants ==========================================================*/\n/* ===========================================================================*/\n\n\n//var Z_FILTERED          = 1;\n//var Z_HUFFMAN_ONLY      = 2;\n//var Z_RLE               = 3;\nvar Z_FIXED               = 4;\n//var Z_DEFAULT_STRATEGY  = 0;\n\n/* Possible values of the data_type field (though see inflate()) */\nvar Z_BINARY              = 0;\nvar Z_TEXT                = 1;\n//var Z_ASCII             = 1; // = Z_TEXT\nvar Z_UNKNOWN             = 2;\n\n/*============================================================================*/\n\n\nfunction zero(buf) { var len = buf.length; while (--len >= 0) { buf[len] = 0; } }\n\n// From zutil.h\n\nvar STORED_BLOCK = 0;\nvar STATIC_TREES = 1;\nvar DYN_TREES    = 2;\n/* The three kinds of block type */\n\nvar MIN_MATCH    = 3;\nvar MAX_MATCH    = 258;\n/* The minimum and maximum match lengths */\n\n// From deflate.h\n/* ===========================================================================\n * Internal compression state.\n */\n\nvar LENGTH_CODES  = 29;\n/* number of length codes, not counting the special END_BLOCK code */\n\nvar LITERALS      = 256;\n/* number of literal bytes 0..255 */\n\nvar L_CODES       = LITERALS + 1 + LENGTH_CODES;\n/* number of Literal or Length codes, including the END_BLOCK code */\n\nvar D_CODES       = 30;\n/* number of distance codes */\n\nvar BL_CODES      = 19;\n/* number of codes used to transfer the bit lengths */\n\nvar HEAP_SIZE     = 2*L_CODES + 1;\n/* maximum heap size */\n\nvar MAX_BITS      = 15;\n/* All codes must not exceed MAX_BITS bits */\n\nvar Buf_size      = 16;\n/* size of bit buffer in bi_buf */\n\n\n/* ===========================================================================\n * Constants\n */\n\nvar MAX_BL_BITS = 7;\n/* Bit length codes must not exceed MAX_BL_BITS bits */\n\nvar END_BLOCK   = 256;\n/* end of block literal code */\n\nvar REP_3_6     = 16;\n/* repeat previous bit length 3-6 times (2 bits of repeat count) */\n\nvar REPZ_3_10   = 17;\n/* repeat a zero length 3-10 times  (3 bits of repeat count) */\n\nvar REPZ_11_138 = 18;\n/* repeat a zero length 11-138 times  (7 bits of repeat count) */\n\nvar extra_lbits =   /* extra bits for each length code */\n  [0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0];\n\nvar extra_dbits =   /* extra bits for each distance code */\n  [0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13];\n\nvar extra_blbits =  /* extra bits for each bit length code */\n  [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7];\n\nvar bl_order =\n  [16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];\n/* The lengths of the bit length codes are sent in order of decreasing\n * probability, to avoid transmitting the lengths for unused bit length codes.\n */\n\n/* ===========================================================================\n * Local data. These are initialized only once.\n */\n\n// We pre-fill arrays with 0 to avoid uninitialized gaps\n\nvar DIST_CODE_LEN = 512; /* see definition of array dist_code below */\n\n// !!!! Use flat array insdead of structure, Freq = i*2, Len = i*2+1\nvar static_ltree  = new Array((L_CODES+2) * 2);\nzero(static_ltree);\n/* The static literal tree. Since the bit lengths are imposed, there is no\n * need for the L_CODES extra codes used during heap construction. However\n * The codes 286 and 287 are needed to build a canonical tree (see _tr_init\n * below).\n */\n\nvar static_dtree  = new Array(D_CODES * 2);\nzero(static_dtree);\n/* The static distance tree. (Actually a trivial tree since all codes use\n * 5 bits.)\n */\n\nvar _dist_code    = new Array(DIST_CODE_LEN);\nzero(_dist_code);\n/* Distance codes. The first 256 values correspond to the distances\n * 3 .. 258, the last 256 values correspond to the top 8 bits of\n * the 15 bit distances.\n */\n\nvar _length_code  = new Array(MAX_MATCH-MIN_MATCH+1);\nzero(_length_code);\n/* length code for each normalized match length (0 == MIN_MATCH) */\n\nvar base_length   = new Array(LENGTH_CODES);\nzero(base_length);\n/* First normalized length for each code (0 = MIN_MATCH) */\n\nvar base_dist     = new Array(D_CODES);\nzero(base_dist);\n/* First normalized distance for each code (0 = distance of 1) */\n\n\nvar StaticTreeDesc = function (static_tree, extra_bits, extra_base, elems, max_length) {\n\n  this.static_tree  = static_tree;  /* static tree or NULL */\n  this.extra_bits   = extra_bits;   /* extra bits for each code or NULL */\n  this.extra_base   = extra_base;   /* base index for extra_bits */\n  this.elems        = elems;        /* max number of elements in the tree */\n  this.max_length   = max_length;   /* max bit length for the codes */\n\n  // show if `static_tree` has data or dummy - needed for monomorphic objects\n  this.has_stree    = static_tree && static_tree.length;\n};\n\n\nvar static_l_desc;\nvar static_d_desc;\nvar static_bl_desc;\n\n\nvar TreeDesc = function(dyn_tree, stat_desc) {\n  this.dyn_tree = dyn_tree;     /* the dynamic tree */\n  this.max_code = 0;            /* largest code with non zero frequency */\n  this.stat_desc = stat_desc;   /* the corresponding static tree */\n};\n\n\n\nfunction d_code(dist) {\n  return dist < 256 ? _dist_code[dist] : _dist_code[256 + (dist >>> 7)];\n}\n\n\n/* ===========================================================================\n * Output a short LSB first on the stream.\n * IN assertion: there is enough room in pendingBuf.\n */\nfunction put_short (s, w) {\n//    put_byte(s, (uch)((w) & 0xff));\n//    put_byte(s, (uch)((ush)(w) >> 8));\n  s.pending_buf[s.pending++] = (w) & 0xff;\n  s.pending_buf[s.pending++] = (w >>> 8) & 0xff;\n}\n\n\n/* ===========================================================================\n * Send a value on a given number of bits.\n * IN assertion: length <= 16 and value fits in length bits.\n */\nfunction send_bits(s, value, length) {\n  if (s.bi_valid > (Buf_size - length)) {\n    s.bi_buf |= (value << s.bi_valid) & 0xffff;\n    put_short(s, s.bi_buf);\n    s.bi_buf = value >> (Buf_size - s.bi_valid);\n    s.bi_valid += length - Buf_size;\n  } else {\n    s.bi_buf |= (value << s.bi_valid) & 0xffff;\n    s.bi_valid += length;\n  }\n}\n\n\nfunction send_code(s, c, tree) {\n  send_bits(s, tree[c*2]/*.Code*/, tree[c*2 + 1]/*.Len*/);\n}\n\n\n/* ===========================================================================\n * Reverse the first len bits of a code, using straightforward code (a faster\n * method would use a table)\n * IN assertion: 1 <= len <= 15\n */\nfunction bi_reverse(code, len) {\n  var res = 0;\n  do {\n    res |= code & 1;\n    code >>>= 1;\n    res <<= 1;\n  } while (--len > 0);\n  return res >>> 1;\n}\n\n\n/* ===========================================================================\n * Flush the bit buffer, keeping at most 7 bits in it.\n */\nfunction bi_flush(s) {\n  if (s.bi_valid === 16) {\n    put_short(s, s.bi_buf);\n    s.bi_buf = 0;\n    s.bi_valid = 0;\n\n  } else if (s.bi_valid >= 8) {\n    s.pending_buf[s.pending++] = s.bi_buf & 0xff;\n    s.bi_buf >>= 8;\n    s.bi_valid -= 8;\n  }\n}\n\n\n/* ===========================================================================\n * Compute the optimal bit lengths for a tree and update the total bit length\n * for the current block.\n * IN assertion: the fields freq and dad are set, heap[heap_max] and\n *    above are the tree nodes sorted by increasing frequency.\n * OUT assertions: the field len is set to the optimal bit length, the\n *     array bl_count contains the frequencies for each bit length.\n *     The length opt_len is updated; static_len is also updated if stree is\n *     not null.\n */\nfunction gen_bitlen(s, desc)\n//    deflate_state *s;\n//    tree_desc *desc;    /* the tree descriptor */\n{\n  var tree            = desc.dyn_tree;\n  var max_code        = desc.max_code;\n  var stree           = desc.stat_desc.static_tree;\n  var has_stree       = desc.stat_desc.has_stree;\n  var extra           = desc.stat_desc.extra_bits;\n  var base            = desc.stat_desc.extra_base;\n  var max_length      = desc.stat_desc.max_length;\n  var h;              /* heap index */\n  var n, m;           /* iterate over the tree elements */\n  var bits;           /* bit length */\n  var xbits;          /* extra bits */\n  var f;              /* frequency */\n  var overflow = 0;   /* number of elements with bit length too large */\n\n  for (bits = 0; bits <= MAX_BITS; bits++) {\n    s.bl_count[bits] = 0;\n  }\n\n  /* In a first pass, compute the optimal bit lengths (which may\n   * overflow in the case of the bit length tree).\n   */\n  tree[s.heap[s.heap_max]*2 + 1]/*.Len*/ = 0; /* root of the heap */\n\n  for (h = s.heap_max+1; h < HEAP_SIZE; h++) {\n    n = s.heap[h];\n    bits = tree[tree[n*2 +1]/*.Dad*/ * 2 + 1]/*.Len*/ + 1;\n    if (bits > max_length) {\n      bits = max_length;\n      overflow++;\n    }\n    tree[n*2 + 1]/*.Len*/ = bits;\n    /* We overwrite tree[n].Dad which is no longer needed */\n\n    if (n > max_code) { continue; } /* not a leaf node */\n\n    s.bl_count[bits]++;\n    xbits = 0;\n    if (n >= base) {\n      xbits = extra[n-base];\n    }\n    f = tree[n * 2]/*.Freq*/;\n    s.opt_len += f * (bits + xbits);\n    if (has_stree) {\n      s.static_len += f * (stree[n*2 + 1]/*.Len*/ + xbits);\n    }\n  }\n  if (overflow === 0) { return; }\n\n  // Trace((stderr,\"\\nbit length overflow\\n\"));\n  /* This happens for example on obj2 and pic of the Calgary corpus */\n\n  /* Find the first bit length which could increase: */\n  do {\n    bits = max_length-1;\n    while (s.bl_count[bits] === 0) { bits--; }\n    s.bl_count[bits]--;      /* move one leaf down the tree */\n    s.bl_count[bits+1] += 2; /* move one overflow item as its brother */\n    s.bl_count[max_length]--;\n    /* The brother of the overflow item also moves one step up,\n     * but this does not affect bl_count[max_length]\n     */\n    overflow -= 2;\n  } while (overflow > 0);\n\n  /* Now recompute all bit lengths, scanning in increasing frequency.\n   * h is still equal to HEAP_SIZE. (It is simpler to reconstruct all\n   * lengths instead of fixing only the wrong ones. This idea is taken\n   * from 'ar' written by Haruhiko Okumura.)\n   */\n  for (bits = max_length; bits !== 0; bits--) {\n    n = s.bl_count[bits];\n    while (n !== 0) {\n      m = s.heap[--h];\n      if (m > max_code) { continue; }\n      if (tree[m*2 + 1]/*.Len*/ !== bits) {\n        // Trace((stderr,\"code %d bits %d->%d\\n\", m, tree[m].Len, bits));\n        s.opt_len += (bits - tree[m*2 + 1]/*.Len*/)*tree[m*2]/*.Freq*/;\n        tree[m*2 + 1]/*.Len*/ = bits;\n      }\n      n--;\n    }\n  }\n}\n\n\n/* ===========================================================================\n * Generate the codes for a given tree and bit counts (which need not be\n * optimal).\n * IN assertion: the array bl_count contains the bit length statistics for\n * the given tree and the field len is set for all tree elements.\n * OUT assertion: the field code is set for all tree elements of non\n *     zero code length.\n */\nfunction gen_codes(tree, max_code, bl_count)\n//    ct_data *tree;             /* the tree to decorate */\n//    int max_code;              /* largest code with non zero frequency */\n//    ushf *bl_count;            /* number of codes at each bit length */\n{\n  var next_code = new Array(MAX_BITS+1); /* next code value for each bit length */\n  var code = 0;              /* running code value */\n  var bits;                  /* bit index */\n  var n;                     /* code index */\n\n  /* The distribution counts are first used to generate the code values\n   * without bit reversal.\n   */\n  for (bits = 1; bits <= MAX_BITS; bits++) {\n    next_code[bits] = code = (code + bl_count[bits-1]) << 1;\n  }\n  /* Check that the bit counts in bl_count are consistent. The last code\n   * must be all ones.\n   */\n  //Assert (code + bl_count[MAX_BITS]-1 == (1<<MAX_BITS)-1,\n  //        \"inconsistent bit counts\");\n  //Tracev((stderr,\"\\ngen_codes: max_code %d \", max_code));\n\n  for (n = 0;  n <= max_code; n++) {\n    var len = tree[n*2 + 1]/*.Len*/;\n    if (len === 0) { continue; }\n    /* Now reverse the bits */\n    tree[n*2]/*.Code*/ = bi_reverse(next_code[len]++, len);\n\n    //Tracecv(tree != static_ltree, (stderr,\"\\nn %3d %c l %2d c %4x (%x) \",\n    //     n, (isgraph(n) ? n : ' '), len, tree[n].Code, next_code[len]-1));\n  }\n}\n\n\n/* ===========================================================================\n * Initialize the various 'constant' tables.\n */\nfunction tr_static_init() {\n  var n;        /* iterates over tree elements */\n  var bits;     /* bit counter */\n  var length;   /* length value */\n  var code;     /* code value */\n  var dist;     /* distance index */\n  var bl_count = new Array(MAX_BITS+1);\n  /* number of codes at each bit length for an optimal tree */\n\n  // do check in _tr_init()\n  //if (static_init_done) return;\n\n  /* For some embedded targets, global variables are not initialized: */\n/*#ifdef NO_INIT_GLOBAL_POINTERS\n  static_l_desc.static_tree = static_ltree;\n  static_l_desc.extra_bits = extra_lbits;\n  static_d_desc.static_tree = static_dtree;\n  static_d_desc.extra_bits = extra_dbits;\n  static_bl_desc.extra_bits = extra_blbits;\n#endif*/\n\n  /* Initialize the mapping length (0..255) -> length code (0..28) */\n  length = 0;\n  for (code = 0; code < LENGTH_CODES-1; code++) {\n    base_length[code] = length;\n    for (n = 0; n < (1<<extra_lbits[code]); n++) {\n      _length_code[length++] = code;\n    }\n  }\n  //Assert (length == 256, \"tr_static_init: length != 256\");\n  /* Note that the length 255 (match length 258) can be represented\n   * in two different ways: code 284 + 5 bits or code 285, so we\n   * overwrite length_code[255] to use the best encoding:\n   */\n  _length_code[length-1] = code;\n\n  /* Initialize the mapping dist (0..32K) -> dist code (0..29) */\n  dist = 0;\n  for (code = 0 ; code < 16; code++) {\n    base_dist[code] = dist;\n    for (n = 0; n < (1<<extra_dbits[code]); n++) {\n      _dist_code[dist++] = code;\n    }\n  }\n  //Assert (dist == 256, \"tr_static_init: dist != 256\");\n  dist >>= 7; /* from now on, all distances are divided by 128 */\n  for (; code < D_CODES; code++) {\n    base_dist[code] = dist << 7;\n    for (n = 0; n < (1<<(extra_dbits[code]-7)); n++) {\n      _dist_code[256 + dist++] = code;\n    }\n  }\n  //Assert (dist == 256, \"tr_static_init: 256+dist != 512\");\n\n  /* Construct the codes of the static literal tree */\n  for (bits = 0; bits <= MAX_BITS; bits++) {\n    bl_count[bits] = 0;\n  }\n\n  n = 0;\n  while (n <= 143) {\n    static_ltree[n*2 + 1]/*.Len*/ = 8;\n    n++;\n    bl_count[8]++;\n  }\n  while (n <= 255) {\n    static_ltree[n*2 + 1]/*.Len*/ = 9;\n    n++;\n    bl_count[9]++;\n  }\n  while (n <= 279) {\n    static_ltree[n*2 + 1]/*.Len*/ = 7;\n    n++;\n    bl_count[7]++;\n  }\n  while (n <= 287) {\n    static_ltree[n*2 + 1]/*.Len*/ = 8;\n    n++;\n    bl_count[8]++;\n  }\n  /* Codes 286 and 287 do not exist, but we must include them in the\n   * tree construction to get a canonical Huffman tree (longest code\n   * all ones)\n   */\n  gen_codes(static_ltree, L_CODES+1, bl_count);\n\n  /* The static distance tree is trivial: */\n  for (n = 0; n < D_CODES; n++) {\n    static_dtree[n*2 + 1]/*.Len*/ = 5;\n    static_dtree[n*2]/*.Code*/ = bi_reverse(n, 5);\n  }\n\n  // Now data ready and we can init static trees\n  static_l_desc = new StaticTreeDesc(static_ltree, extra_lbits, LITERALS+1, L_CODES, MAX_BITS);\n  static_d_desc = new StaticTreeDesc(static_dtree, extra_dbits, 0,          D_CODES, MAX_BITS);\n  static_bl_desc =new StaticTreeDesc(new Array(0), extra_blbits, 0,         BL_CODES, MAX_BL_BITS);\n\n  //static_init_done = true;\n}\n\n\n/* ===========================================================================\n * Initialize a new block.\n */\nfunction init_block(s) {\n  var n; /* iterates over tree elements */\n\n  /* Initialize the trees. */\n  for (n = 0; n < L_CODES;  n++) { s.dyn_ltree[n*2]/*.Freq*/ = 0; }\n  for (n = 0; n < D_CODES;  n++) { s.dyn_dtree[n*2]/*.Freq*/ = 0; }\n  for (n = 0; n < BL_CODES; n++) { s.bl_tree[n*2]/*.Freq*/ = 0; }\n\n  s.dyn_ltree[END_BLOCK*2]/*.Freq*/ = 1;\n  s.opt_len = s.static_len = 0;\n  s.last_lit = s.matches = 0;\n}\n\n\n/* ===========================================================================\n * Flush the bit buffer and align the output on a byte boundary\n */\nfunction bi_windup(s)\n{\n  if (s.bi_valid > 8) {\n    put_short(s, s.bi_buf);\n  } else if (s.bi_valid > 0) {\n    //put_byte(s, (Byte)s->bi_buf);\n    s.pending_buf[s.pending++] = s.bi_buf;\n  }\n  s.bi_buf = 0;\n  s.bi_valid = 0;\n}\n\n/* ===========================================================================\n * Copy a stored block, storing first the length and its\n * one's complement if requested.\n */\nfunction copy_block(s, buf, len, header)\n//DeflateState *s;\n//charf    *buf;    /* the input data */\n//unsigned len;     /* its length */\n//int      header;  /* true if block header must be written */\n{\n  bi_windup(s);        /* align on byte boundary */\n\n  if (header) {\n    put_short(s, len);\n    put_short(s, ~len);\n  }\n//  while (len--) {\n//    put_byte(s, *buf++);\n//  }\n  utils.arraySet(s.pending_buf, s.window, buf, len, s.pending);\n  s.pending += len;\n}\n\n/* ===========================================================================\n * Compares to subtrees, using the tree depth as tie breaker when\n * the subtrees have equal frequency. This minimizes the worst case length.\n */\nfunction smaller(tree, n, m, depth) {\n  var _n2 = n*2;\n  var _m2 = m*2;\n  return (tree[_n2]/*.Freq*/ < tree[_m2]/*.Freq*/ ||\n         (tree[_n2]/*.Freq*/ === tree[_m2]/*.Freq*/ && depth[n] <= depth[m]));\n}\n\n/* ===========================================================================\n * Restore the heap property by moving down the tree starting at node k,\n * exchanging a node with the smallest of its two sons if necessary, stopping\n * when the heap property is re-established (each father smaller than its\n * two sons).\n */\nfunction pqdownheap(s, tree, k)\n//    deflate_state *s;\n//    ct_data *tree;  /* the tree to restore */\n//    int k;               /* node to move down */\n{\n  var v = s.heap[k];\n  var j = k << 1;  /* left son of k */\n  while (j <= s.heap_len) {\n    /* Set j to the smallest of the two sons: */\n    if (j < s.heap_len &&\n      smaller(tree, s.heap[j+1], s.heap[j], s.depth)) {\n      j++;\n    }\n    /* Exit if v is smaller than both sons */\n    if (smaller(tree, v, s.heap[j], s.depth)) { break; }\n\n    /* Exchange v with the smallest son */\n    s.heap[k] = s.heap[j];\n    k = j;\n\n    /* And continue down the tree, setting j to the left son of k */\n    j <<= 1;\n  }\n  s.heap[k] = v;\n}\n\n\n// inlined manually\n// var SMALLEST = 1;\n\n/* ===========================================================================\n * Send the block data compressed using the given Huffman trees\n */\nfunction compress_block(s, ltree, dtree)\n//    deflate_state *s;\n//    const ct_data *ltree; /* literal tree */\n//    const ct_data *dtree; /* distance tree */\n{\n  var dist;           /* distance of matched string */\n  var lc;             /* match length or unmatched char (if dist == 0) */\n  var lx = 0;         /* running index in l_buf */\n  var code;           /* the code to send */\n  var extra;          /* number of extra bits to send */\n\n  if (s.last_lit !== 0) {\n    do {\n      dist = (s.pending_buf[s.d_buf + lx*2] << 8) | (s.pending_buf[s.d_buf + lx*2 + 1]);\n      lc = s.pending_buf[s.l_buf + lx];\n      lx++;\n\n      if (dist === 0) {\n        send_code(s, lc, ltree); /* send a literal byte */\n        //Tracecv(isgraph(lc), (stderr,\" '%c' \", lc));\n      } else {\n        /* Here, lc is the match length - MIN_MATCH */\n        code = _length_code[lc];\n        send_code(s, code+LITERALS+1, ltree); /* send the length code */\n        extra = extra_lbits[code];\n        if (extra !== 0) {\n          lc -= base_length[code];\n          send_bits(s, lc, extra);       /* send the extra length bits */\n        }\n        dist--; /* dist is now the match distance - 1 */\n        code = d_code(dist);\n        //Assert (code < D_CODES, \"bad d_code\");\n\n        send_code(s, code, dtree);       /* send the distance code */\n        extra = extra_dbits[code];\n        if (extra !== 0) {\n          dist -= base_dist[code];\n          send_bits(s, dist, extra);   /* send the extra distance bits */\n        }\n      } /* literal or match pair ? */\n\n      /* Check that the overlay between pending_buf and d_buf+l_buf is ok: */\n      //Assert((uInt)(s->pending) < s->lit_bufsize + 2*lx,\n      //       \"pendingBuf overflow\");\n\n    } while (lx < s.last_lit);\n  }\n\n  send_code(s, END_BLOCK, ltree);\n}\n\n\n/* ===========================================================================\n * Construct one Huffman tree and assigns the code bit strings and lengths.\n * Update the total bit length for the current block.\n * IN assertion: the field freq is set for all tree elements.\n * OUT assertions: the fields len and code are set to the optimal bit length\n *     and corresponding code. The length opt_len is updated; static_len is\n *     also updated if stree is not null. The field max_code is set.\n */\nfunction build_tree(s, desc)\n//    deflate_state *s;\n//    tree_desc *desc; /* the tree descriptor */\n{\n  var tree     = desc.dyn_tree;\n  var stree    = desc.stat_desc.static_tree;\n  var has_stree = desc.stat_desc.has_stree;\n  var elems    = desc.stat_desc.elems;\n  var n, m;          /* iterate over heap elements */\n  var max_code = -1; /* largest code with non zero frequency */\n  var node;          /* new node being created */\n\n  /* Construct the initial heap, with least frequent element in\n   * heap[SMALLEST]. The sons of heap[n] are heap[2*n] and heap[2*n+1].\n   * heap[0] is not used.\n   */\n  s.heap_len = 0;\n  s.heap_max = HEAP_SIZE;\n\n  for (n = 0; n < elems; n++) {\n    if (tree[n * 2]/*.Freq*/ !== 0) {\n      s.heap[++s.heap_len] = max_code = n;\n      s.depth[n] = 0;\n\n    } else {\n      tree[n*2 + 1]/*.Len*/ = 0;\n    }\n  }\n\n  /* The pkzip format requires that at least one distance code exists,\n   * and that at least one bit should be sent even if there is only one\n   * possible code. So to avoid special checks later on we force at least\n   * two codes of non zero frequency.\n   */\n  while (s.heap_len < 2) {\n    node = s.heap[++s.heap_len] = (max_code < 2 ? ++max_code : 0);\n    tree[node * 2]/*.Freq*/ = 1;\n    s.depth[node] = 0;\n    s.opt_len--;\n\n    if (has_stree) {\n      s.static_len -= stree[node*2 + 1]/*.Len*/;\n    }\n    /* node is 0 or 1 so it does not have extra bits */\n  }\n  desc.max_code = max_code;\n\n  /* The elements heap[heap_len/2+1 .. heap_len] are leaves of the tree,\n   * establish sub-heaps of increasing lengths:\n   */\n  for (n = (s.heap_len >> 1/*int /2*/); n >= 1; n--) { pqdownheap(s, tree, n); }\n\n  /* Construct the Huffman tree by repeatedly combining the least two\n   * frequent nodes.\n   */\n  node = elems;              /* next internal node of the tree */\n  do {\n    //pqremove(s, tree, n);  /* n = node of least frequency */\n    /*** pqremove ***/\n    n = s.heap[1/*SMALLEST*/];\n    s.heap[1/*SMALLEST*/] = s.heap[s.heap_len--];\n    pqdownheap(s, tree, 1/*SMALLEST*/);\n    /***/\n\n    m = s.heap[1/*SMALLEST*/]; /* m = node of next least frequency */\n\n    s.heap[--s.heap_max] = n; /* keep the nodes sorted by frequency */\n    s.heap[--s.heap_max] = m;\n\n    /* Create a new node father of n and m */\n    tree[node * 2]/*.Freq*/ = tree[n * 2]/*.Freq*/ + tree[m * 2]/*.Freq*/;\n    s.depth[node] = (s.depth[n] >= s.depth[m] ? s.depth[n] : s.depth[m]) + 1;\n    tree[n*2 + 1]/*.Dad*/ = tree[m*2 + 1]/*.Dad*/ = node;\n\n    /* and insert the new node in the heap */\n    s.heap[1/*SMALLEST*/] = node++;\n    pqdownheap(s, tree, 1/*SMALLEST*/);\n\n  } while (s.heap_len >= 2);\n\n  s.heap[--s.heap_max] = s.heap[1/*SMALLEST*/];\n\n  /* At this point, the fields freq and dad are set. We can now\n   * generate the bit lengths.\n   */\n  gen_bitlen(s, desc);\n\n  /* The field len is now set, we can generate the bit codes */\n  gen_codes(tree, max_code, s.bl_count);\n}\n\n\n/* ===========================================================================\n * Scan a literal or distance tree to determine the frequencies of the codes\n * in the bit length tree.\n */\nfunction scan_tree(s, tree, max_code)\n//    deflate_state *s;\n//    ct_data *tree;   /* the tree to be scanned */\n//    int max_code;    /* and its largest code of non zero frequency */\n{\n  var n;                     /* iterates over all tree elements */\n  var prevlen = -1;          /* last emitted length */\n  var curlen;                /* length of current code */\n\n  var nextlen = tree[0*2 + 1]/*.Len*/; /* length of next code */\n\n  var count = 0;             /* repeat count of the current code */\n  var max_count = 7;         /* max repeat count */\n  var min_count = 4;         /* min repeat count */\n\n  if (nextlen === 0) {\n    max_count = 138;\n    min_count = 3;\n  }\n  tree[(max_code+1)*2 + 1]/*.Len*/ = 0xffff; /* guard */\n\n  for (n = 0; n <= max_code; n++) {\n    curlen = nextlen;\n    nextlen = tree[(n+1)*2 + 1]/*.Len*/;\n\n    if (++count < max_count && curlen === nextlen) {\n      continue;\n\n    } else if (count < min_count) {\n      s.bl_tree[curlen * 2]/*.Freq*/ += count;\n\n    } else if (curlen !== 0) {\n\n      if (curlen !== prevlen) { s.bl_tree[curlen * 2]/*.Freq*/++; }\n      s.bl_tree[REP_3_6*2]/*.Freq*/++;\n\n    } else if (count <= 10) {\n      s.bl_tree[REPZ_3_10*2]/*.Freq*/++;\n\n    } else {\n      s.bl_tree[REPZ_11_138*2]/*.Freq*/++;\n    }\n\n    count = 0;\n    prevlen = curlen;\n\n    if (nextlen === 0) {\n      max_count = 138;\n      min_count = 3;\n\n    } else if (curlen === nextlen) {\n      max_count = 6;\n      min_count = 3;\n\n    } else {\n      max_count = 7;\n      min_count = 4;\n    }\n  }\n}\n\n\n/* ===========================================================================\n * Send a literal or distance tree in compressed form, using the codes in\n * bl_tree.\n */\nfunction send_tree(s, tree, max_code)\n//    deflate_state *s;\n//    ct_data *tree; /* the tree to be scanned */\n//    int max_code;       /* and its largest code of non zero frequency */\n{\n  var n;                     /* iterates over all tree elements */\n  var prevlen = -1;          /* last emitted length */\n  var curlen;                /* length of current code */\n\n  var nextlen = tree[0*2 + 1]/*.Len*/; /* length of next code */\n\n  var count = 0;             /* repeat count of the current code */\n  var max_count = 7;         /* max repeat count */\n  var min_count = 4;         /* min repeat count */\n\n  /* tree[max_code+1].Len = -1; */  /* guard already set */\n  if (nextlen === 0) {\n    max_count = 138;\n    min_count = 3;\n  }\n\n  for (n = 0; n <= max_code; n++) {\n    curlen = nextlen;\n    nextlen = tree[(n+1)*2 + 1]/*.Len*/;\n\n    if (++count < max_count && curlen === nextlen) {\n      continue;\n\n    } else if (count < min_count) {\n      do { send_code(s, curlen, s.bl_tree); } while (--count !== 0);\n\n    } else if (curlen !== 0) {\n      if (curlen !== prevlen) {\n        send_code(s, curlen, s.bl_tree);\n        count--;\n      }\n      //Assert(count >= 3 && count <= 6, \" 3_6?\");\n      send_code(s, REP_3_6, s.bl_tree);\n      send_bits(s, count-3, 2);\n\n    } else if (count <= 10) {\n      send_code(s, REPZ_3_10, s.bl_tree);\n      send_bits(s, count-3, 3);\n\n    } else {\n      send_code(s, REPZ_11_138, s.bl_tree);\n      send_bits(s, count-11, 7);\n    }\n\n    count = 0;\n    prevlen = curlen;\n    if (nextlen === 0) {\n      max_count = 138;\n      min_count = 3;\n\n    } else if (curlen === nextlen) {\n      max_count = 6;\n      min_count = 3;\n\n    } else {\n      max_count = 7;\n      min_count = 4;\n    }\n  }\n}\n\n\n/* ===========================================================================\n * Construct the Huffman tree for the bit lengths and return the index in\n * bl_order of the last bit length code to send.\n */\nfunction build_bl_tree(s) {\n  var max_blindex;  /* index of last bit length code of non zero freq */\n\n  /* Determine the bit length frequencies for literal and distance trees */\n  scan_tree(s, s.dyn_ltree, s.l_desc.max_code);\n  scan_tree(s, s.dyn_dtree, s.d_desc.max_code);\n\n  /* Build the bit length tree: */\n  build_tree(s, s.bl_desc);\n  /* opt_len now includes the length of the tree representations, except\n   * the lengths of the bit lengths codes and the 5+5+4 bits for the counts.\n   */\n\n  /* Determine the number of bit length codes to send. The pkzip format\n   * requires that at least 4 bit length codes be sent. (appnote.txt says\n   * 3 but the actual value used is 4.)\n   */\n  for (max_blindex = BL_CODES-1; max_blindex >= 3; max_blindex--) {\n    if (s.bl_tree[bl_order[max_blindex]*2 + 1]/*.Len*/ !== 0) {\n      break;\n    }\n  }\n  /* Update opt_len to include the bit length tree and counts */\n  s.opt_len += 3*(max_blindex+1) + 5+5+4;\n  //Tracev((stderr, \"\\ndyn trees: dyn %ld, stat %ld\",\n  //        s->opt_len, s->static_len));\n\n  return max_blindex;\n}\n\n\n/* ===========================================================================\n * Send the header for a block using dynamic Huffman trees: the counts, the\n * lengths of the bit length codes, the literal tree and the distance tree.\n * IN assertion: lcodes >= 257, dcodes >= 1, blcodes >= 4.\n */\nfunction send_all_trees(s, lcodes, dcodes, blcodes)\n//    deflate_state *s;\n//    int lcodes, dcodes, blcodes; /* number of codes for each tree */\n{\n  var rank;                    /* index in bl_order */\n\n  //Assert (lcodes >= 257 && dcodes >= 1 && blcodes >= 4, \"not enough codes\");\n  //Assert (lcodes <= L_CODES && dcodes <= D_CODES && blcodes <= BL_CODES,\n  //        \"too many codes\");\n  //Tracev((stderr, \"\\nbl counts: \"));\n  send_bits(s, lcodes-257, 5); /* not +255 as stated in appnote.txt */\n  send_bits(s, dcodes-1,   5);\n  send_bits(s, blcodes-4,  4); /* not -3 as stated in appnote.txt */\n  for (rank = 0; rank < blcodes; rank++) {\n    //Tracev((stderr, \"\\nbl code %2d \", bl_order[rank]));\n    send_bits(s, s.bl_tree[bl_order[rank]*2 + 1]/*.Len*/, 3);\n  }\n  //Tracev((stderr, \"\\nbl tree: sent %ld\", s->bits_sent));\n\n  send_tree(s, s.dyn_ltree, lcodes-1); /* literal tree */\n  //Tracev((stderr, \"\\nlit tree: sent %ld\", s->bits_sent));\n\n  send_tree(s, s.dyn_dtree, dcodes-1); /* distance tree */\n  //Tracev((stderr, \"\\ndist tree: sent %ld\", s->bits_sent));\n}\n\n\n/* ===========================================================================\n * Check if the data type is TEXT or BINARY, using the following algorithm:\n * - TEXT if the two conditions below are satisfied:\n *    a) There are no non-portable control characters belonging to the\n *       \"black list\" (0..6, 14..25, 28..31).\n *    b) There is at least one printable character belonging to the\n *       \"white list\" (9 {TAB}, 10 {LF}, 13 {CR}, 32..255).\n * - BINARY otherwise.\n * - The following partially-portable control characters form a\n *   \"gray list\" that is ignored in this detection algorithm:\n *   (7 {BEL}, 8 {BS}, 11 {VT}, 12 {FF}, 26 {SUB}, 27 {ESC}).\n * IN assertion: the fields Freq of dyn_ltree are set.\n */\nfunction detect_data_type(s) {\n  /* black_mask is the bit mask of black-listed bytes\n   * set bits 0..6, 14..25, and 28..31\n   * 0xf3ffc07f = binary 11110011111111111100000001111111\n   */\n  var black_mask = 0xf3ffc07f;\n  var n;\n\n  /* Check for non-textual (\"black-listed\") bytes. */\n  for (n = 0; n <= 31; n++, black_mask >>>= 1) {\n    if ((black_mask & 1) && (s.dyn_ltree[n*2]/*.Freq*/ !== 0)) {\n      return Z_BINARY;\n    }\n  }\n\n  /* Check for textual (\"white-listed\") bytes. */\n  if (s.dyn_ltree[9 * 2]/*.Freq*/ !== 0 || s.dyn_ltree[10 * 2]/*.Freq*/ !== 0 ||\n      s.dyn_ltree[13 * 2]/*.Freq*/ !== 0) {\n    return Z_TEXT;\n  }\n  for (n = 32; n < LITERALS; n++) {\n    if (s.dyn_ltree[n * 2]/*.Freq*/ !== 0) {\n      return Z_TEXT;\n    }\n  }\n\n  /* There are no \"black-listed\" or \"white-listed\" bytes:\n   * this stream either is empty or has tolerated (\"gray-listed\") bytes only.\n   */\n  return Z_BINARY;\n}\n\n\nvar static_init_done = false;\n\n/* ===========================================================================\n * Initialize the tree data structures for a new zlib stream.\n */\nfunction _tr_init(s)\n{\n\n  if (!static_init_done) {\n    tr_static_init();\n    static_init_done = true;\n  }\n\n  s.l_desc  = new TreeDesc(s.dyn_ltree, static_l_desc);\n  s.d_desc  = new TreeDesc(s.dyn_dtree, static_d_desc);\n  s.bl_desc = new TreeDesc(s.bl_tree, static_bl_desc);\n\n  s.bi_buf = 0;\n  s.bi_valid = 0;\n\n  /* Initialize the first block of the first file: */\n  init_block(s);\n}\n\n\n/* ===========================================================================\n * Send a stored block\n */\nfunction _tr_stored_block(s, buf, stored_len, last)\n//DeflateState *s;\n//charf *buf;       /* input block */\n//ulg stored_len;   /* length of input block */\n//int last;         /* one if this is the last block for a file */\n{\n  send_bits(s, (STORED_BLOCK<<1)+(last ? 1 : 0), 3);    /* send block type */\n  copy_block(s, buf, stored_len, true); /* with header */\n}\n\n\n/* ===========================================================================\n * Send one empty static block to give enough lookahead for inflate.\n * This takes 10 bits, of which 7 may remain in the bit buffer.\n */\nfunction _tr_align(s) {\n  send_bits(s, STATIC_TREES<<1, 3);\n  send_code(s, END_BLOCK, static_ltree);\n  bi_flush(s);\n}\n\n\n/* ===========================================================================\n * Determine the best encoding for the current block: dynamic trees, static\n * trees or store, and output the encoded block to the zip file.\n */\nfunction _tr_flush_block(s, buf, stored_len, last)\n//DeflateState *s;\n//charf *buf;       /* input block, or NULL if too old */\n//ulg stored_len;   /* length of input block */\n//int last;         /* one if this is the last block for a file */\n{\n  var opt_lenb, static_lenb;  /* opt_len and static_len in bytes */\n  var max_blindex = 0;        /* index of last bit length code of non zero freq */\n\n  /* Build the Huffman trees unless a stored block is forced */\n  if (s.level > 0) {\n\n    /* Check if the file is binary or text */\n    if (s.strm.data_type === Z_UNKNOWN) {\n      s.strm.data_type = detect_data_type(s);\n    }\n\n    /* Construct the literal and distance trees */\n    build_tree(s, s.l_desc);\n    // Tracev((stderr, \"\\nlit data: dyn %ld, stat %ld\", s->opt_len,\n    //        s->static_len));\n\n    build_tree(s, s.d_desc);\n    // Tracev((stderr, \"\\ndist data: dyn %ld, stat %ld\", s->opt_len,\n    //        s->static_len));\n    /* At this point, opt_len and static_len are the total bit lengths of\n     * the compressed block data, excluding the tree representations.\n     */\n\n    /* Build the bit length tree for the above two trees, and get the index\n     * in bl_order of the last bit length code to send.\n     */\n    max_blindex = build_bl_tree(s);\n\n    /* Determine the best encoding. Compute the block lengths in bytes. */\n    opt_lenb = (s.opt_len+3+7) >>> 3;\n    static_lenb = (s.static_len+3+7) >>> 3;\n\n    // Tracev((stderr, \"\\nopt %lu(%lu) stat %lu(%lu) stored %lu lit %u \",\n    //        opt_lenb, s->opt_len, static_lenb, s->static_len, stored_len,\n    //        s->last_lit));\n\n    if (static_lenb <= opt_lenb) { opt_lenb = static_lenb; }\n\n  } else {\n    // Assert(buf != (char*)0, \"lost buf\");\n    opt_lenb = static_lenb = stored_len + 5; /* force a stored block */\n  }\n\n  if ((stored_len+4 <= opt_lenb) && (buf !== -1)) {\n    /* 4: two words for the lengths */\n\n    /* The test buf != NULL is only necessary if LIT_BUFSIZE > WSIZE.\n     * Otherwise we can't have processed more than WSIZE input bytes since\n     * the last block flush, because compression would have been\n     * successful. If LIT_BUFSIZE <= WSIZE, it is never too late to\n     * transform a block into a stored block.\n     */\n    _tr_stored_block(s, buf, stored_len, last);\n\n  } else if (s.strategy === Z_FIXED || static_lenb === opt_lenb) {\n\n    send_bits(s, (STATIC_TREES<<1) + (last ? 1 : 0), 3);\n    compress_block(s, static_ltree, static_dtree);\n\n  } else {\n    send_bits(s, (DYN_TREES<<1) + (last ? 1 : 0), 3);\n    send_all_trees(s, s.l_desc.max_code+1, s.d_desc.max_code+1, max_blindex+1);\n    compress_block(s, s.dyn_ltree, s.dyn_dtree);\n  }\n  // Assert (s->compressed_len == s->bits_sent, \"bad compressed size\");\n  /* The above check is made mod 2^32, for files larger than 512 MB\n   * and uLong implemented on 32 bits.\n   */\n  init_block(s);\n\n  if (last) {\n    bi_windup(s);\n  }\n  // Tracev((stderr,\"\\ncomprlen %lu(%lu) \", s->compressed_len>>3,\n  //       s->compressed_len-7*last));\n}\n\n/* ===========================================================================\n * Save the match info and tally the frequency counts. Return true if\n * the current block must be flushed.\n */\nfunction _tr_tally(s, dist, lc)\n//    deflate_state *s;\n//    unsigned dist;  /* distance of matched string */\n//    unsigned lc;    /* match length-MIN_MATCH or unmatched char (if dist==0) */\n{\n  //var out_length, in_length, dcode;\n\n  s.pending_buf[s.d_buf + s.last_lit * 2]     = (dist >>> 8) & 0xff;\n  s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff;\n\n  s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff;\n  s.last_lit++;\n\n  if (dist === 0) {\n    /* lc is the unmatched char */\n    s.dyn_ltree[lc*2]/*.Freq*/++;\n  } else {\n    s.matches++;\n    /* Here, lc is the match length - MIN_MATCH */\n    dist--;             /* dist = match distance - 1 */\n    //Assert((ush)dist < (ush)MAX_DIST(s) &&\n    //       (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&\n    //       (ush)d_code(dist) < (ush)D_CODES,  \"_tr_tally: bad match\");\n\n    s.dyn_ltree[(_length_code[lc]+LITERALS+1) * 2]/*.Freq*/++;\n    s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++;\n  }\n\n// (!) This block is disabled in zlib defailts,\n// don't enable it for binary compatibility\n\n//#ifdef TRUNCATE_BLOCK\n//  /* Try to guess if it is profitable to stop the current block here */\n//  if ((s.last_lit & 0x1fff) === 0 && s.level > 2) {\n//    /* Compute an upper bound for the compressed length */\n//    out_length = s.last_lit*8;\n//    in_length = s.strstart - s.block_start;\n//\n//    for (dcode = 0; dcode < D_CODES; dcode++) {\n//      out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]);\n//    }\n//    out_length >>>= 3;\n//    //Tracev((stderr,\"\\nlast_lit %u, in %ld, out ~%ld(%ld%%) \",\n//    //       s->last_lit, in_length, out_length,\n//    //       100L - out_length*100L/in_length));\n//    if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) {\n//      return true;\n//    }\n//  }\n//#endif\n\n  return (s.last_lit === s.lit_bufsize-1);\n  /* We avoid equality with lit_bufsize because of wraparound at 64K\n   * on 16 bit machines and because stored blocks are restricted to\n   * 64K-1 bytes.\n   */\n}\n\nexports._tr_init  = _tr_init;\nexports._tr_stored_block = _tr_stored_block;\nexports._tr_flush_block  = _tr_flush_block;\nexports._tr_tally = _tr_tally;\nexports._tr_align = _tr_align;\n\n},{\"../utils/common\":127}],139:[function(require,module,exports){\n'use strict';\n\n\nfunction ZStream() {\n  /* next input byte */\n  this.input = null; // JS specific, because we have no pointers\n  this.next_in = 0;\n  /* number of bytes available at input */\n  this.avail_in = 0;\n  /* total number of input bytes read so far */\n  this.total_in = 0;\n  /* next output byte should be put there */\n  this.output = null; // JS specific, because we have no pointers\n  this.next_out = 0;\n  /* remaining free space at output */\n  this.avail_out = 0;\n  /* total number of bytes output so far */\n  this.total_out = 0;\n  /* last error message, NULL if no error */\n  this.msg = ''/*Z_NULL*/;\n  /* not visible by applications */\n  this.state = null;\n  /* best guess about the data type: binary or text */\n  this.data_type = 2/*Z_UNKNOWN*/;\n  /* adler32 value of the uncompressed data */\n  this.adler = 0;\n}\n\nmodule.exports = ZStream;\n\n},{}],140:[function(require,module,exports){\nexports.Parser = require(\"./lib/parser\").Parser;\nexports.rules = require(\"./lib/rules\");\nexports.errors = require(\"./lib/errors\");\nexports.results = require(\"./lib/parsing-results\");\nexports.StringSource = require(\"./lib/StringSource\");\nexports.Token = require(\"./lib/Token\");\nexports.bottomUp = require(\"./lib/bottom-up\");\nexports.RegexTokeniser = require(\"./lib/regex-tokeniser\").RegexTokeniser;\n\nexports.rule = function(ruleBuilder) {\n    var rule;\n    return function(input) {\n        if (!rule) {\n            rule = ruleBuilder();\n        }\n        return rule(input);\n    };\n};\n\n},{\"./lib/StringSource\":141,\"./lib/Token\":142,\"./lib/bottom-up\":144,\"./lib/errors\":145,\"./lib/parser\":147,\"./lib/parsing-results\":148,\"./lib/regex-tokeniser\":149,\"./lib/rules\":150}],141:[function(require,module,exports){\nvar util = require(\"util\");\n\nvar StringSource = module.exports = function(string, description) {\n    var self = {\n        asString: function() {\n            return string;\n        },\n        range: function(startIndex, endIndex) {\n            return new StringSourceRange(string, description, startIndex, endIndex);\n        }\n    };\n    return self;\n};\n\nvar StringSourceRange = function(string, description, startIndex, endIndex) {\n    this._string = string;\n    this._description = description;\n    this._startIndex = startIndex;\n    this._endIndex = endIndex;\n};\n\nStringSourceRange.prototype.to = function(otherRange) {\n    // TODO: Assert that tokens are the same across both iterators\n    return new StringSourceRange(this._string, this._description, this._startIndex, otherRange._endIndex);\n};\n\nStringSourceRange.prototype.describe = function() {\n    var position = this._position();\n    var description = this._description ? this._description + \"\\n\" : \"\";\n    return util.format(\"%sLine number: %s\\nCharacter number: %s\",\n        description, position.lineNumber, position.characterNumber);\n};\n\nStringSourceRange.prototype.lineNumber = function() {\n    return this._position().lineNumber;\n};\n\nStringSourceRange.prototype.characterNumber = function() {\n    return this._position().characterNumber;\n};\n\nStringSourceRange.prototype._position = function() {\n    var self = this;\n    var index = 0;\n    var nextNewLine = function() {\n        return self._string.indexOf(\"\\n\", index);\n    };\n    \n    var lineNumber = 1;\n    while (nextNewLine() !== -1 && nextNewLine() < this._startIndex) {\n        index = nextNewLine() + 1;\n        lineNumber += 1;\n    }\n    var characterNumber = this._startIndex - index + 1;\n    return {lineNumber: lineNumber, characterNumber: characterNumber};\n};\n\n},{\"util\":100}],142:[function(require,module,exports){\nmodule.exports = function(name, value, source) {\n    this.name = name;\n    this.value = value;\n    if (source) {\n        this.source = source;\n    }\n};\n\n},{}],143:[function(require,module,exports){\nvar TokenIterator = module.exports = function(tokens, startIndex) {\n    this._tokens = tokens;\n    this._startIndex = startIndex || 0;\n};\n\nTokenIterator.prototype.head = function() {\n    return this._tokens[this._startIndex];\n};\n\nTokenIterator.prototype.tail = function(startIndex) {\n    return new TokenIterator(this._tokens, this._startIndex + 1);\n};\n\nTokenIterator.prototype.toArray = function() {\n    return this._tokens.slice(this._startIndex);\n};\n\nTokenIterator.prototype.end = function() {\n    return this._tokens[this._tokens.length - 1];\n};\n\n// TODO: doesn't need to be a method, can be a separate function,\n// which simplifies implementation of the TokenIterator interface\nTokenIterator.prototype.to = function(end) {\n    var start = this.head().source;\n    var endToken = end.head() || end.end();\n    return start.to(endToken.source);\n};\n\n},{}],144:[function(require,module,exports){\nvar rules = require(\"./rules\");\nvar results = require(\"./parsing-results\");\n\nexports.parser = function(name, prefixRules, infixRuleBuilders) {\n    var self = {\n        rule: rule,\n        leftAssociative: leftAssociative,\n        rightAssociative: rightAssociative\n    };\n    \n    var infixRules = new InfixRules(infixRuleBuilders.map(createInfixRule));\n    var prefixRule = rules.firstOf(name, prefixRules);\n    \n    function createInfixRule(infixRuleBuilder) {\n        return {\n            name: infixRuleBuilder.name,\n            rule: lazyRule(infixRuleBuilder.ruleBuilder.bind(null, self))\n        };\n    }\n    \n    function rule() {\n        return createRule(infixRules);\n    }\n    \n    function leftAssociative(name) {\n        return createRule(infixRules.untilExclusive(name));\n    }\n    \n    function rightAssociative(name) {\n        return createRule(infixRules.untilInclusive(name));\n    }\n    \n    function createRule(infixRules) {\n        return apply.bind(null, infixRules);\n    }\n    \n    function apply(infixRules, tokens) {\n        var leftResult = prefixRule(tokens);\n        if (leftResult.isSuccess()) {\n            return infixRules.apply(leftResult);\n        } else {\n            return leftResult;\n        }\n    }\n    \n    return self;\n};\n\nfunction InfixRules(infixRules) {\n    function untilExclusive(name) {\n        return new InfixRules(infixRules.slice(0, ruleNames().indexOf(name)));\n    }\n    \n    function untilInclusive(name) {\n        return new InfixRules(infixRules.slice(0, ruleNames().indexOf(name) + 1));\n    }\n    \n    function ruleNames() {\n        return infixRules.map(function(rule) {\n            return rule.name;\n        });\n    }\n    \n    function apply(leftResult) {\n        var currentResult;\n        var source;\n        while (true) {\n            currentResult = applyToTokens(leftResult.remaining());\n            if (currentResult.isSuccess()) {\n                source = leftResult.source().to(currentResult.source());\n                leftResult = results.success(\n                    currentResult.value()(leftResult.value(), source),\n                    currentResult.remaining(),\n                    source\n                )\n            } else if (currentResult.isFailure()) {\n                return leftResult;\n            } else {\n                return currentResult;\n            }\n        }\n    }\n    \n    function applyToTokens(tokens) {\n        return rules.firstOf(\"infix\", infixRules.map(function(infix) {\n            return infix.rule;\n        }))(tokens);\n    }\n    \n    return {\n        apply: apply,\n        untilExclusive: untilExclusive,\n        untilInclusive: untilInclusive\n    }\n}\n\nexports.infix = function(name, ruleBuilder) {\n    function map(func) {\n        return exports.infix(name, function(parser) {\n            var rule = ruleBuilder(parser);\n            return function(tokens) {\n                var result = rule(tokens);\n                return result.map(function(right) {\n                    return function(left, source) {\n                        return func(left, right, source);\n                    };\n                });\n            };\n        });\n    }\n    \n    return {\n        name: name,\n        ruleBuilder: ruleBuilder,\n        map: map\n    };\n}\n\n// TODO: move into a sensible place and remove duplication\nvar lazyRule = function(ruleBuilder) {\n    var rule;\n    return function(input) {\n        if (!rule) {\n            rule = ruleBuilder();\n        }\n        return rule(input);\n    };\n};\n\n},{\"./parsing-results\":148,\"./rules\":150}],145:[function(require,module,exports){\nexports.error = function(options) {\n    return new Error(options);\n};\n\nvar Error = function(options) {\n    this.expected = options.expected;\n    this.actual = options.actual;\n    this._location = options.location;\n};\n\nError.prototype.describe = function() {\n    var locationDescription = this._location ? this._location.describe() + \":\\n\" : \"\";\n    return locationDescription + \"Expected \" + this.expected + \"\\nbut got \" + this.actual;\n};\n\nError.prototype.lineNumber = function() {\n    return this._location.lineNumber();\n};\n\nError.prototype.characterNumber = function() {\n    return this._location.characterNumber();\n};\n\n},{}],146:[function(require,module,exports){\nvar fromArray = exports.fromArray = function(array) {\n    var index = 0;\n    var hasNext = function() {\n        return index < array.length;\n    };\n    return new LazyIterator({\n        hasNext: hasNext,\n        next: function() {\n            if (!hasNext()) {\n                throw new Error(\"No more elements\");\n            } else {\n                return array[index++];\n            }\n        }\n    });\n};\n\nvar LazyIterator = function(iterator) {\n    this._iterator = iterator;\n};\n\nLazyIterator.prototype.map = function(func) {\n    var iterator = this._iterator;\n    return new LazyIterator({\n        hasNext: function() {\n            return iterator.hasNext();\n        },\n        next: function() {\n            return func(iterator.next());\n        }\n    });\n};\n\nLazyIterator.prototype.filter = function(condition) {\n    var iterator = this._iterator;\n    \n    var moved = false;\n    var hasNext = false;\n    var next;\n    var moveIfNecessary = function() {\n        if (moved) {\n            return;\n        }\n        moved = true;\n        hasNext = false;\n        while (iterator.hasNext() && !hasNext) {\n            next = iterator.next();\n            hasNext = condition(next);\n        }\n    };\n    \n    return new LazyIterator({\n        hasNext: function() {\n            moveIfNecessary();\n            return hasNext;\n        },\n        next: function() {\n            moveIfNecessary();\n            var toReturn = next;\n            moved = false;\n            return toReturn;\n        }\n    });\n};\n\nLazyIterator.prototype.first = function() {\n    var iterator = this._iterator;\n    if (this._iterator.hasNext()) {\n        return iterator.next();\n    } else {\n        return null;\n    }\n};\n\nLazyIterator.prototype.toArray = function() {\n    var result = [];\n    while (this._iterator.hasNext()) {\n        result.push(this._iterator.next());\n    }\n    return result;\n};\n\n},{}],147:[function(require,module,exports){\nvar TokenIterator = require(\"./TokenIterator\");\n\nexports.Parser = function(options) {\n    var parseTokens = function(parser, tokens) {\n        return parser(new TokenIterator(tokens));\n    };\n    \n    return {\n        parseTokens: parseTokens\n    };\n};\n\n},{\"./TokenIterator\":143}],148:[function(require,module,exports){\nmodule.exports = {\n    failure: function(errors, remaining) {\n        if (errors.length < 1) {\n            throw new Error(\"Failure must have errors\");\n        }\n        return new Result({\n            status: \"failure\",\n            remaining: remaining,\n            errors: errors\n        });\n    },\n    error: function(errors, remaining) {\n        if (errors.length < 1) {\n            throw new Error(\"Failure must have errors\");\n        }\n        return new Result({\n            status: \"error\",\n            remaining: remaining,\n            errors: errors\n        });\n    },\n    success: function(value, remaining, source) {\n        return new Result({\n            status: \"success\",\n            value: value,\n            source: source,\n            remaining: remaining,\n            errors: []\n        });\n    },\n    cut: function(remaining) {\n        return new Result({\n            status: \"cut\",\n            remaining: remaining,\n            errors: []\n        });\n    }\n};\n\nvar Result = function(options) {\n    this._value = options.value;\n    this._status = options.status;\n    this._hasValue = options.value !== undefined;\n    this._remaining = options.remaining;\n    this._source = options.source;\n    this._errors = options.errors;\n};\n\nResult.prototype.map = function(func) {\n    if (this._hasValue) {\n        return new Result({\n            value: func(this._value, this._source),\n            status: this._status,\n            remaining: this._remaining,\n            source: this._source,\n            errors: this._errors\n        });\n    } else {\n        return this;\n    }\n};\n\nResult.prototype.changeRemaining = function(remaining) {\n    return new Result({\n        value: this._value,\n        status: this._status,\n        remaining: remaining,\n        source: this._source,\n        errors: this._errors\n    });\n};\n\nResult.prototype.isSuccess = function() {\n    return this._status === \"success\" || this._status === \"cut\";\n};\n\nResult.prototype.isFailure = function() {\n    return this._status === \"failure\";\n};\n\nResult.prototype.isError = function() {\n    return this._status === \"error\";\n};\n\nResult.prototype.isCut = function() {\n    return this._status === \"cut\";\n};\n\nResult.prototype.value = function() {\n    return this._value;\n};\n\nResult.prototype.remaining = function() {\n    return this._remaining;\n};\n\nResult.prototype.source = function() {\n    return this._source;\n};\n\nResult.prototype.errors = function() {\n    return this._errors;\n};\n\n},{}],149:[function(require,module,exports){\nvar Token = require(\"./Token\");\nvar StringSource = require(\"./StringSource\");\n\nexports.RegexTokeniser = RegexTokeniser;\n\nfunction RegexTokeniser(rules) {\n    rules = rules.map(function(rule) {\n        return {\n            name: rule.name,\n            regex: new RegExp(rule.regex.source, \"g\")\n        };\n    });\n    \n    function tokenise(input, description) {\n        var source = new StringSource(input, description);\n        var index = 0;\n        var tokens = [];\n    \n        while (index < input.length) {\n            var result = readNextToken(input, index, source);\n            index = result.endIndex;\n            tokens.push(result.token);\n        }\n        \n        tokens.push(endToken(input, source));\n        return tokens;\n    }\n\n    function readNextToken(string, startIndex, source) {\n        for (var i = 0; i < rules.length; i++) {\n            var regex = rules[i].regex;\n            regex.lastIndex = startIndex;\n            var result = regex.exec(string);\n            \n            if (result) {\n                var endIndex = startIndex + result[0].length;\n                if (result.index === startIndex && endIndex > startIndex) {\n                    var value = result[1];\n                    var token = new Token(\n                        rules[i].name,\n                        value,\n                        source.range(startIndex, endIndex)\n                    );\n                    return {token: token, endIndex: endIndex};\n                }\n            }\n        }\n        var endIndex = startIndex + 1;\n        var token = new Token(\n            \"unrecognisedCharacter\",\n            string.substring(startIndex, endIndex),\n            source.range(startIndex, endIndex)\n        );\n        return {token: token, endIndex: endIndex};\n    }\n    \n    function endToken(input, source) {\n        return new Token(\n            \"end\",\n            null,\n            source.range(input.length, input.length)\n        );\n    }\n    \n    return {\n        tokenise: tokenise\n    }\n}\n\n\n\n},{\"./StringSource\":141,\"./Token\":142}],150:[function(require,module,exports){\nvar _ = require(\"underscore\");\nvar options = require(\"option\");\nvar results = require(\"./parsing-results\");\nvar errors = require(\"./errors\");\nvar lazyIterators = require(\"./lazy-iterators\");\n\nexports.token = function(tokenType, value) {\n    var matchValue = value !== undefined;\n    return function(input) {\n        var token = input.head();\n        if (token && token.name === tokenType && (!matchValue || token.value === value)) {\n            return results.success(token.value, input.tail(), token.source);\n        } else {\n            var expected = describeToken({name: tokenType, value: value});\n            return describeTokenMismatch(input, expected);\n        }\n    };\n};\n\nexports.tokenOfType = function(tokenType) {\n    return exports.token(tokenType);\n};\n\nexports.firstOf = function(name, parsers) {\n    if (!_.isArray(parsers)) {\n        parsers = Array.prototype.slice.call(arguments, 1);\n    }\n    return function(input) {\n        return lazyIterators\n            .fromArray(parsers)\n            .map(function(parser) {\n                return parser(input);\n            })\n            .filter(function(result) {\n                return result.isSuccess() || result.isError();\n            })\n            .first() || describeTokenMismatch(input, name);\n    };\n};\n\nexports.then = function(parser, func) {\n    return function(input) {\n        var result = parser(input);\n        if (!result.map) {\n            console.log(result);\n        }\n        return result.map(func);\n    };\n};\n\nexports.sequence = function() {\n    var parsers = Array.prototype.slice.call(arguments, 0);\n    var rule = function(input) {\n        var result = _.foldl(parsers, function(memo, parser) {\n            var result = memo.result;\n            var hasCut = memo.hasCut;\n            if (!result.isSuccess()) {\n                return {result: result, hasCut: hasCut};\n            }\n            var subResult = parser(result.remaining());\n            if (subResult.isCut()) {\n                return {result: result, hasCut: true};\n            } else if (subResult.isSuccess()) {\n                var values;\n                if (parser.isCaptured) {\n                    values = result.value().withValue(parser, subResult.value());\n                } else {\n                    values = result.value();\n                }\n                var remaining = subResult.remaining();\n                var source = input.to(remaining);\n                return {\n                    result: results.success(values, remaining, source),\n                    hasCut: hasCut\n                };\n            } else if (hasCut) {\n                return {result: results.error(subResult.errors(), subResult.remaining()), hasCut: hasCut};\n            } else {\n                return {result: subResult, hasCut: hasCut};\n            }\n        }, {result: results.success(new SequenceValues(), input), hasCut: false}).result;\n        var source = input.to(result.remaining());\n        return result.map(function(values) {\n            return values.withValue(exports.sequence.source, source);\n        });\n    };\n    rule.head = function() {\n        var firstCapture = _.find(parsers, isCapturedRule);\n        return exports.then(\n            rule,\n            exports.sequence.extract(firstCapture)\n        );\n    };\n    rule.map = function(func) {\n        return exports.then(\n            rule,\n            function(result) {\n                return func.apply(this, result.toArray());\n            }\n        );\n    };\n    \n    function isCapturedRule(subRule) {\n        return subRule.isCaptured;\n    }\n    \n    return rule;\n};\n\nvar SequenceValues = function(values, valuesArray) {\n    this._values = values || {};\n    this._valuesArray = valuesArray || [];\n};\n\nSequenceValues.prototype.withValue = function(rule, value) {\n    if (rule.captureName && rule.captureName in this._values) {\n        throw new Error(\"Cannot add second value for capture \\\"\" + rule.captureName + \"\\\"\");\n    } else {\n        var newValues = _.clone(this._values);\n        newValues[rule.captureName] = value;\n        var newValuesArray = this._valuesArray.concat([value]);\n        return new SequenceValues(newValues, newValuesArray);\n    }\n};\n\nSequenceValues.prototype.get = function(rule) {\n    if (rule.captureName in this._values) {\n        return this._values[rule.captureName];\n    } else {\n        throw new Error(\"No value for capture \\\"\" + rule.captureName + \"\\\"\");\n    }\n};\n\nSequenceValues.prototype.toArray = function() {\n    return this._valuesArray;\n};\n\nexports.sequence.capture = function(rule, name) {\n    var captureRule = function() {\n        return rule.apply(this, arguments);\n    };\n    captureRule.captureName = name;\n    captureRule.isCaptured = true;\n    return captureRule;\n};\n\nexports.sequence.extract = function(rule) {\n    return function(result) {\n        return result.get(rule);\n    };\n};\n\nexports.sequence.applyValues = function(func) {\n    // TODO: check captureName doesn't conflict with source or other captures\n    var rules = Array.prototype.slice.call(arguments, 1);\n    return function(result) {\n        var values = rules.map(function(rule) {\n            return result.get(rule);\n        });\n        return func.apply(this, values);\n    };\n};\n\nexports.sequence.source = {\n    captureName: \"☃source☃\"\n};\n\nexports.sequence.cut = function() {\n    return function(input) {\n        return results.cut(input);\n    };\n};\n\nexports.optional = function(rule) {\n    return function(input) {\n        var result = rule(input);\n        if (result.isSuccess()) {\n            return result.map(options.some);\n        } else if (result.isFailure()) {\n            return results.success(options.none, input);\n        } else {\n            return result;\n        }\n    };\n};\n\nexports.zeroOrMoreWithSeparator = function(rule, separator) {\n    return repeatedWithSeparator(rule, separator, false);\n};\n\nexports.oneOrMoreWithSeparator = function(rule, separator) {\n    return repeatedWithSeparator(rule, separator, true);\n};\n\nvar zeroOrMore = exports.zeroOrMore = function(rule) {\n    return function(input) {\n        var values = [];\n        var result;\n        while ((result = rule(input)) && result.isSuccess()) {\n            input = result.remaining();\n            values.push(result.value());\n        }\n        if (result.isError()) {\n            return result;\n        } else {\n            return results.success(values, input);\n        }\n    };\n};\n\nexports.oneOrMore = function(rule) {\n    return exports.oneOrMoreWithSeparator(rule, noOpRule);\n};\n\nfunction noOpRule(input) {\n    return results.success(null, input);\n}\n\nvar repeatedWithSeparator = function(rule, separator, isOneOrMore) {\n    return function(input) {\n        var result = rule(input);\n        if (result.isSuccess()) {\n            var mainRule = exports.sequence.capture(rule, \"main\");\n            var remainingRule = zeroOrMore(exports.then(\n                exports.sequence(separator, mainRule),\n                exports.sequence.extract(mainRule)\n            ));\n            var remainingResult = remainingRule(result.remaining());\n            return results.success([result.value()].concat(remainingResult.value()), remainingResult.remaining());\n        } else if (isOneOrMore || result.isError()) {\n            return result;\n        } else {\n            return results.success([], input);\n        }\n    };\n};\n\nexports.leftAssociative = function(leftRule, rightRule, func) {\n    var rights;\n    if (func) {\n        rights = [{func: func, rule: rightRule}];\n    } else {\n        rights = rightRule;\n    }\n    rights = rights.map(function(right) {\n        return exports.then(right.rule, function(rightValue) {\n            return function(leftValue, source) {\n                return right.func(leftValue, rightValue, source);\n            };\n        });\n    });\n    var repeatedRule = exports.firstOf.apply(null, [\"rules\"].concat(rights));\n    \n    return function(input) {\n        var start = input;\n        var leftResult = leftRule(input);\n        if (!leftResult.isSuccess()) {\n            return leftResult;\n        }\n        var repeatedResult = repeatedRule(leftResult.remaining());\n        while (repeatedResult.isSuccess()) {\n            var remaining = repeatedResult.remaining();\n            var source = start.to(repeatedResult.remaining());\n            var right = repeatedResult.value();\n            leftResult = results.success(\n                right(leftResult.value(), source),\n                remaining,\n                source\n            );\n            repeatedResult = repeatedRule(leftResult.remaining());\n        }\n        if (repeatedResult.isError()) {\n            return repeatedResult;\n        }\n        return leftResult;\n    };\n};\n\nexports.leftAssociative.firstOf = function() {\n    return Array.prototype.slice.call(arguments, 0);\n};\n\nexports.nonConsuming = function(rule) {\n    return function(input) {\n        return rule(input).changeRemaining(input);\n    };\n};\n\nvar describeToken = function(token) {\n    if (token.value) {\n        return token.name + \" \\\"\" + token.value + \"\\\"\";\n    } else {\n        return token.name;\n    }\n};\n\nfunction describeTokenMismatch(input, expected) {\n    var error;\n    var token = input.head();\n    if (token) {\n        error = errors.error({\n            expected: expected,\n            actual: describeToken(token),\n            location: token.source\n        });\n    } else {\n        error = errors.error({\n            expected: expected,\n            actual: \"end of tokens\"\n        });\n    }\n    return results.failure([error], input);\n}\n\n},{\"./errors\":145,\"./lazy-iterators\":146,\"./parsing-results\":148,\"option\":151,\"underscore\":152}],151:[function(require,module,exports){\nexports.none = Object.create({\n    value: function() {\n        throw new Error('Called value on none');\n    },\n    isNone: function() {\n        return true;\n    },\n    isSome: function() {\n        return false;\n    },\n    map: function() {\n        return exports.none;\n    },\n    flatMap: function() {\n        return exports.none;\n    },\n    toArray: function() {\n        return [];\n    },\n    orElse: callOrReturn,\n    valueOrElse: callOrReturn\n});\n\nfunction callOrReturn(value) {\n    if (typeof(value) == \"function\") {\n        return value();\n    } else {\n        return value;\n    }\n}\n\nexports.some = function(value) {\n    return new Some(value);\n};\n\nvar Some = function(value) {\n    this._value = value;\n};\n\nSome.prototype.value = function() {\n    return this._value;\n};\n\nSome.prototype.isNone = function() {\n    return false;\n};\n\nSome.prototype.isSome = function() {\n    return true;\n};\n\nSome.prototype.map = function(func) {\n    return new Some(func(this._value));\n};\n\nSome.prototype.flatMap = function(func) {\n    return func(this._value);\n};\n\nSome.prototype.toArray = function() {\n    return [this._value];\n};\n\nSome.prototype.orElse = function(value) {\n    return this;\n};\n\nSome.prototype.valueOrElse = function(value) {\n    return this._value;\n};\n\nexports.isOption = function(value) {\n    return value === exports.none || value instanceof Some;\n};\n\nexports.fromNullable = function(value) {\n    if (value == null) {\n        return exports.none;\n    }\n    return new Some(value);\n}\n\n},{}],152:[function(require,module,exports){\n//     Underscore.js 1.4.4\n//     http://underscorejs.org\n//     (c) 2009-2013 Jeremy Ashkenas, DocumentCloud Inc.\n//     Underscore may be freely distributed under the MIT license.\n\n(function() {\n\n  // Baseline setup\n  // --------------\n\n  // Establish the root object, `window` in the browser, or `global` on the server.\n  var root = this;\n\n  // Save the previous value of the `_` variable.\n  var previousUnderscore = root._;\n\n  // Establish the object that gets returned to break out of a loop iteration.\n  var breaker = {};\n\n  // Save bytes in the minified (but not gzipped) version:\n  var ArrayProto = Array.prototype, ObjProto = Object.prototype, FuncProto = Function.prototype;\n\n  // Create quick reference variables for speed access to core prototypes.\n  var push             = ArrayProto.push,\n      slice            = ArrayProto.slice,\n      concat           = ArrayProto.concat,\n      toString         = ObjProto.toString,\n      hasOwnProperty   = ObjProto.hasOwnProperty;\n\n  // All **ECMAScript 5** native function implementations that we hope to use\n  // are declared here.\n  var\n    nativeForEach      = ArrayProto.forEach,\n    nativeMap          = ArrayProto.map,\n    nativeReduce       = ArrayProto.reduce,\n    nativeReduceRight  = ArrayProto.reduceRight,\n    nativeFilter       = ArrayProto.filter,\n    nativeEvery        = ArrayProto.every,\n    nativeSome         = ArrayProto.some,\n    nativeIndexOf      = ArrayProto.indexOf,\n    nativeLastIndexOf  = ArrayProto.lastIndexOf,\n    nativeIsArray      = Array.isArray,\n    nativeKeys         = Object.keys,\n    nativeBind         = FuncProto.bind;\n\n  // Create a safe reference to the Underscore object for use below.\n  var _ = function(obj) {\n    if (obj instanceof _) return obj;\n    if (!(this instanceof _)) return new _(obj);\n    this._wrapped = obj;\n  };\n\n  // Export the Underscore object for **Node.js**, with\n  // backwards-compatibility for the old `require()` API. If we're in\n  // the browser, add `_` as a global object via a string identifier,\n  // for Closure Compiler \"advanced\" mode.\n  if (typeof exports !== 'undefined') {\n    if (typeof module !== 'undefined' && module.exports) {\n      exports = module.exports = _;\n    }\n    exports._ = _;\n  } else {\n    root._ = _;\n  }\n\n  // Current version.\n  _.VERSION = '1.4.4';\n\n  // Collection Functions\n  // --------------------\n\n  // The cornerstone, an `each` implementation, aka `forEach`.\n  // Handles objects with the built-in `forEach`, arrays, and raw objects.\n  // Delegates to **ECMAScript 5**'s native `forEach` if available.\n  var each = _.each = _.forEach = function(obj, iterator, context) {\n    if (obj == null) return;\n    if (nativeForEach && obj.forEach === nativeForEach) {\n      obj.forEach(iterator, context);\n    } else if (obj.length === +obj.length) {\n      for (var i = 0, l = obj.length; i < l; i++) {\n        if (iterator.call(context, obj[i], i, obj) === breaker) return;\n      }\n    } else {\n      for (var key in obj) {\n        if (_.has(obj, key)) {\n          if (iterator.call(context, obj[key], key, obj) === breaker) return;\n        }\n      }\n    }\n  };\n\n  // Return the results of applying the iterator to each element.\n  // Delegates to **ECMAScript 5**'s native `map` if available.\n  _.map = _.collect = function(obj, iterator, context) {\n    var results = [];\n    if (obj == null) return results;\n    if (nativeMap && obj.map === nativeMap) return obj.map(iterator, context);\n    each(obj, function(value, index, list) {\n      results[results.length] = iterator.call(context, value, index, list);\n    });\n    return results;\n  };\n\n  var reduceError = 'Reduce of empty array with no initial value';\n\n  // **Reduce** builds up a single result from a list of values, aka `inject`,\n  // or `foldl`. Delegates to **ECMAScript 5**'s native `reduce` if available.\n  _.reduce = _.foldl = _.inject = function(obj, iterator, memo, context) {\n    var initial = arguments.length > 2;\n    if (obj == null) obj = [];\n    if (nativeReduce && obj.reduce === nativeReduce) {\n      if (context) iterator = _.bind(iterator, context);\n      return initial ? obj.reduce(iterator, memo) : obj.reduce(iterator);\n    }\n    each(obj, function(value, index, list) {\n      if (!initial) {\n        memo = value;\n        initial = true;\n      } else {\n        memo = iterator.call(context, memo, value, index, list);\n      }\n    });\n    if (!initial) throw new TypeError(reduceError);\n    return memo;\n  };\n\n  // The right-associative version of reduce, also known as `foldr`.\n  // Delegates to **ECMAScript 5**'s native `reduceRight` if available.\n  _.reduceRight = _.foldr = function(obj, iterator, memo, context) {\n    var initial = arguments.length > 2;\n    if (obj == null) obj = [];\n    if (nativeReduceRight && obj.reduceRight === nativeReduceRight) {\n      if (context) iterator = _.bind(iterator, context);\n      return initial ? obj.reduceRight(iterator, memo) : obj.reduceRight(iterator);\n    }\n    var length = obj.length;\n    if (length !== +length) {\n      var keys = _.keys(obj);\n      length = keys.length;\n    }\n    each(obj, function(value, index, list) {\n      index = keys ? keys[--length] : --length;\n      if (!initial) {\n        memo = obj[index];\n        initial = true;\n      } else {\n        memo = iterator.call(context, memo, obj[index], index, list);\n      }\n    });\n    if (!initial) throw new TypeError(reduceError);\n    return memo;\n  };\n\n  // Return the first value which passes a truth test. Aliased as `detect`.\n  _.find = _.detect = function(obj, iterator, context) {\n    var result;\n    any(obj, function(value, index, list) {\n      if (iterator.call(context, value, index, list)) {\n        result = value;\n        return true;\n      }\n    });\n    return result;\n  };\n\n  // Return all the elements that pass a truth test.\n  // Delegates to **ECMAScript 5**'s native `filter` if available.\n  // Aliased as `select`.\n  _.filter = _.select = function(obj, iterator, context) {\n    var results = [];\n    if (obj == null) return results;\n    if (nativeFilter && obj.filter === nativeFilter) return obj.filter(iterator, context);\n    each(obj, function(value, index, list) {\n      if (iterator.call(context, value, index, list)) results[results.length] = value;\n    });\n    return results;\n  };\n\n  // Return all the elements for which a truth test fails.\n  _.reject = function(obj, iterator, context) {\n    return _.filter(obj, function(value, index, list) {\n      return !iterator.call(context, value, index, list);\n    }, context);\n  };\n\n  // Determine whether all of the elements match a truth test.\n  // Delegates to **ECMAScript 5**'s native `every` if available.\n  // Aliased as `all`.\n  _.every = _.all = function(obj, iterator, context) {\n    iterator || (iterator = _.identity);\n    var result = true;\n    if (obj == null) return result;\n    if (nativeEvery && obj.every === nativeEvery) return obj.every(iterator, context);\n    each(obj, function(value, index, list) {\n      if (!(result = result && iterator.call(context, value, index, list))) return breaker;\n    });\n    return !!result;\n  };\n\n  // Determine if at least one element in the object matches a truth test.\n  // Delegates to **ECMAScript 5**'s native `some` if available.\n  // Aliased as `any`.\n  var any = _.some = _.any = function(obj, iterator, context) {\n    iterator || (iterator = _.identity);\n    var result = false;\n    if (obj == null) return result;\n    if (nativeSome && obj.some === nativeSome) return obj.some(iterator, context);\n    each(obj, function(value, index, list) {\n      if (result || (result = iterator.call(context, value, index, list))) return breaker;\n    });\n    return !!result;\n  };\n\n  // Determine if the array or object contains a given value (using `===`).\n  // Aliased as `include`.\n  _.contains = _.include = function(obj, target) {\n    if (obj == null) return false;\n    if (nativeIndexOf && obj.indexOf === nativeIndexOf) return obj.indexOf(target) != -1;\n    return any(obj, function(value) {\n      return value === target;\n    });\n  };\n\n  // Invoke a method (with arguments) on every item in a collection.\n  _.invoke = function(obj, method) {\n    var args = slice.call(arguments, 2);\n    var isFunc = _.isFunction(method);\n    return _.map(obj, function(value) {\n      return (isFunc ? method : value[method]).apply(value, args);\n    });\n  };\n\n  // Convenience version of a common use case of `map`: fetching a property.\n  _.pluck = function(obj, key) {\n    return _.map(obj, function(value){ return value[key]; });\n  };\n\n  // Convenience version of a common use case of `filter`: selecting only objects\n  // containing specific `key:value` pairs.\n  _.where = function(obj, attrs, first) {\n    if (_.isEmpty(attrs)) return first ? null : [];\n    return _[first ? 'find' : 'filter'](obj, function(value) {\n      for (var key in attrs) {\n        if (attrs[key] !== value[key]) return false;\n      }\n      return true;\n    });\n  };\n\n  // Convenience version of a common use case of `find`: getting the first object\n  // containing specific `key:value` pairs.\n  _.findWhere = function(obj, attrs) {\n    return _.where(obj, attrs, true);\n  };\n\n  // Return the maximum element or (element-based computation).\n  // Can't optimize arrays of integers longer than 65,535 elements.\n  // See: https://bugs.webkit.org/show_bug.cgi?id=80797\n  _.max = function(obj, iterator, context) {\n    if (!iterator && _.isArray(obj) && obj[0] === +obj[0] && obj.length < 65535) {\n      return Math.max.apply(Math, obj);\n    }\n    if (!iterator && _.isEmpty(obj)) return -Infinity;\n    var result = {computed : -Infinity, value: -Infinity};\n    each(obj, function(value, index, list) {\n      var computed = iterator ? iterator.call(context, value, index, list) : value;\n      computed >= result.computed && (result = {value : value, computed : computed});\n    });\n    return result.value;\n  };\n\n  // Return the minimum element (or element-based computation).\n  _.min = function(obj, iterator, context) {\n    if (!iterator && _.isArray(obj) && obj[0] === +obj[0] && obj.length < 65535) {\n      return Math.min.apply(Math, obj);\n    }\n    if (!iterator && _.isEmpty(obj)) return Infinity;\n    var result = {computed : Infinity, value: Infinity};\n    each(obj, function(value, index, list) {\n      var computed = iterator ? iterator.call(context, value, index, list) : value;\n      computed < result.computed && (result = {value : value, computed : computed});\n    });\n    return result.value;\n  };\n\n  // Shuffle an array.\n  _.shuffle = function(obj) {\n    var rand;\n    var index = 0;\n    var shuffled = [];\n    each(obj, function(value) {\n      rand = _.random(index++);\n      shuffled[index - 1] = shuffled[rand];\n      shuffled[rand] = value;\n    });\n    return shuffled;\n  };\n\n  // An internal function to generate lookup iterators.\n  var lookupIterator = function(value) {\n    return _.isFunction(value) ? value : function(obj){ return obj[value]; };\n  };\n\n  // Sort the object's values by a criterion produced by an iterator.\n  _.sortBy = function(obj, value, context) {\n    var iterator = lookupIterator(value);\n    return _.pluck(_.map(obj, function(value, index, list) {\n      return {\n        value : value,\n        index : index,\n        criteria : iterator.call(context, value, index, list)\n      };\n    }).sort(function(left, right) {\n      var a = left.criteria;\n      var b = right.criteria;\n      if (a !== b) {\n        if (a > b || a === void 0) return 1;\n        if (a < b || b === void 0) return -1;\n      }\n      return left.index < right.index ? -1 : 1;\n    }), 'value');\n  };\n\n  // An internal function used for aggregate \"group by\" operations.\n  var group = function(obj, value, context, behavior) {\n    var result = {};\n    var iterator = lookupIterator(value || _.identity);\n    each(obj, function(value, index) {\n      var key = iterator.call(context, value, index, obj);\n      behavior(result, key, value);\n    });\n    return result;\n  };\n\n  // Groups the object's values by a criterion. Pass either a string attribute\n  // to group by, or a function that returns the criterion.\n  _.groupBy = function(obj, value, context) {\n    return group(obj, value, context, function(result, key, value) {\n      (_.has(result, key) ? result[key] : (result[key] = [])).push(value);\n    });\n  };\n\n  // Counts instances of an object that group by a certain criterion. Pass\n  // either a string attribute to count by, or a function that returns the\n  // criterion.\n  _.countBy = function(obj, value, context) {\n    return group(obj, value, context, function(result, key) {\n      if (!_.has(result, key)) result[key] = 0;\n      result[key]++;\n    });\n  };\n\n  // Use a comparator function to figure out the smallest index at which\n  // an object should be inserted so as to maintain order. Uses binary search.\n  _.sortedIndex = function(array, obj, iterator, context) {\n    iterator = iterator == null ? _.identity : lookupIterator(iterator);\n    var value = iterator.call(context, obj);\n    var low = 0, high = array.length;\n    while (low < high) {\n      var mid = (low + high) >>> 1;\n      iterator.call(context, array[mid]) < value ? low = mid + 1 : high = mid;\n    }\n    return low;\n  };\n\n  // Safely convert anything iterable into a real, live array.\n  _.toArray = function(obj) {\n    if (!obj) return [];\n    if (_.isArray(obj)) return slice.call(obj);\n    if (obj.length === +obj.length) return _.map(obj, _.identity);\n    return _.values(obj);\n  };\n\n  // Return the number of elements in an object.\n  _.size = function(obj) {\n    if (obj == null) return 0;\n    return (obj.length === +obj.length) ? obj.length : _.keys(obj).length;\n  };\n\n  // Array Functions\n  // ---------------\n\n  // Get the first element of an array. Passing **n** will return the first N\n  // values in the array. Aliased as `head` and `take`. The **guard** check\n  // allows it to work with `_.map`.\n  _.first = _.head = _.take = function(array, n, guard) {\n    if (array == null) return void 0;\n    return (n != null) && !guard ? slice.call(array, 0, n) : array[0];\n  };\n\n  // Returns everything but the last entry of the array. Especially useful on\n  // the arguments object. Passing **n** will return all the values in\n  // the array, excluding the last N. The **guard** check allows it to work with\n  // `_.map`.\n  _.initial = function(array, n, guard) {\n    return slice.call(array, 0, array.length - ((n == null) || guard ? 1 : n));\n  };\n\n  // Get the last element of an array. Passing **n** will return the last N\n  // values in the array. The **guard** check allows it to work with `_.map`.\n  _.last = function(array, n, guard) {\n    if (array == null) return void 0;\n    if ((n != null) && !guard) {\n      return slice.call(array, Math.max(array.length - n, 0));\n    } else {\n      return array[array.length - 1];\n    }\n  };\n\n  // Returns everything but the first entry of the array. Aliased as `tail` and `drop`.\n  // Especially useful on the arguments object. Passing an **n** will return\n  // the rest N values in the array. The **guard**\n  // check allows it to work with `_.map`.\n  _.rest = _.tail = _.drop = function(array, n, guard) {\n    return slice.call(array, (n == null) || guard ? 1 : n);\n  };\n\n  // Trim out all falsy values from an array.\n  _.compact = function(array) {\n    return _.filter(array, _.identity);\n  };\n\n  // Internal implementation of a recursive `flatten` function.\n  var flatten = function(input, shallow, output) {\n    each(input, function(value) {\n      if (_.isArray(value)) {\n        shallow ? push.apply(output, value) : flatten(value, shallow, output);\n      } else {\n        output.push(value);\n      }\n    });\n    return output;\n  };\n\n  // Return a completely flattened version of an array.\n  _.flatten = function(array, shallow) {\n    return flatten(array, shallow, []);\n  };\n\n  // Return a version of the array that does not contain the specified value(s).\n  _.without = function(array) {\n    return _.difference(array, slice.call(arguments, 1));\n  };\n\n  // Produce a duplicate-free version of the array. If the array has already\n  // been sorted, you have the option of using a faster algorithm.\n  // Aliased as `unique`.\n  _.uniq = _.unique = function(array, isSorted, iterator, context) {\n    if (_.isFunction(isSorted)) {\n      context = iterator;\n      iterator = isSorted;\n      isSorted = false;\n    }\n    var initial = iterator ? _.map(array, iterator, context) : array;\n    var results = [];\n    var seen = [];\n    each(initial, function(value, index) {\n      if (isSorted ? (!index || seen[seen.length - 1] !== value) : !_.contains(seen, value)) {\n        seen.push(value);\n        results.push(array[index]);\n      }\n    });\n    return results;\n  };\n\n  // Produce an array that contains the union: each distinct element from all of\n  // the passed-in arrays.\n  _.union = function() {\n    return _.uniq(concat.apply(ArrayProto, arguments));\n  };\n\n  // Produce an array that contains every item shared between all the\n  // passed-in arrays.\n  _.intersection = function(array) {\n    var rest = slice.call(arguments, 1);\n    return _.filter(_.uniq(array), function(item) {\n      return _.every(rest, function(other) {\n        return _.indexOf(other, item) >= 0;\n      });\n    });\n  };\n\n  // Take the difference between one array and a number of other arrays.\n  // Only the elements present in just the first array will remain.\n  _.difference = function(array) {\n    var rest = concat.apply(ArrayProto, slice.call(arguments, 1));\n    return _.filter(array, function(value){ return !_.contains(rest, value); });\n  };\n\n  // Zip together multiple lists into a single array -- elements that share\n  // an index go together.\n  _.zip = function() {\n    var args = slice.call(arguments);\n    var length = _.max(_.pluck(args, 'length'));\n    var results = new Array(length);\n    for (var i = 0; i < length; i++) {\n      results[i] = _.pluck(args, \"\" + i);\n    }\n    return results;\n  };\n\n  // Converts lists into objects. Pass either a single array of `[key, value]`\n  // pairs, or two parallel arrays of the same length -- one of keys, and one of\n  // the corresponding values.\n  _.object = function(list, values) {\n    if (list == null) return {};\n    var result = {};\n    for (var i = 0, l = list.length; i < l; i++) {\n      if (values) {\n        result[list[i]] = values[i];\n      } else {\n        result[list[i][0]] = list[i][1];\n      }\n    }\n    return result;\n  };\n\n  // If the browser doesn't supply us with indexOf (I'm looking at you, **MSIE**),\n  // we need this function. Return the position of the first occurrence of an\n  // item in an array, or -1 if the item is not included in the array.\n  // Delegates to **ECMAScript 5**'s native `indexOf` if available.\n  // If the array is large and already in sort order, pass `true`\n  // for **isSorted** to use binary search.\n  _.indexOf = function(array, item, isSorted) {\n    if (array == null) return -1;\n    var i = 0, l = array.length;\n    if (isSorted) {\n      if (typeof isSorted == 'number') {\n        i = (isSorted < 0 ? Math.max(0, l + isSorted) : isSorted);\n      } else {\n        i = _.sortedIndex(array, item);\n        return array[i] === item ? i : -1;\n      }\n    }\n    if (nativeIndexOf && array.indexOf === nativeIndexOf) return array.indexOf(item, isSorted);\n    for (; i < l; i++) if (array[i] === item) return i;\n    return -1;\n  };\n\n  // Delegates to **ECMAScript 5**'s native `lastIndexOf` if available.\n  _.lastIndexOf = function(array, item, from) {\n    if (array == null) return -1;\n    var hasIndex = from != null;\n    if (nativeLastIndexOf && array.lastIndexOf === nativeLastIndexOf) {\n      return hasIndex ? array.lastIndexOf(item, from) : array.lastIndexOf(item);\n    }\n    var i = (hasIndex ? from : array.length);\n    while (i--) if (array[i] === item) return i;\n    return -1;\n  };\n\n  // Generate an integer Array containing an arithmetic progression. A port of\n  // the native Python `range()` function. See\n  // [the Python documentation](http://docs.python.org/library/functions.html#range).\n  _.range = function(start, stop, step) {\n    if (arguments.length <= 1) {\n      stop = start || 0;\n      start = 0;\n    }\n    step = arguments[2] || 1;\n\n    var len = Math.max(Math.ceil((stop - start) / step), 0);\n    var idx = 0;\n    var range = new Array(len);\n\n    while(idx < len) {\n      range[idx++] = start;\n      start += step;\n    }\n\n    return range;\n  };\n\n  // Function (ahem) Functions\n  // ------------------\n\n  // Create a function bound to a given object (assigning `this`, and arguments,\n  // optionally). Delegates to **ECMAScript 5**'s native `Function.bind` if\n  // available.\n  _.bind = function(func, context) {\n    if (func.bind === nativeBind && nativeBind) return nativeBind.apply(func, slice.call(arguments, 1));\n    var args = slice.call(arguments, 2);\n    return function() {\n      return func.apply(context, args.concat(slice.call(arguments)));\n    };\n  };\n\n  // Partially apply a function by creating a version that has had some of its\n  // arguments pre-filled, without changing its dynamic `this` context.\n  _.partial = function(func) {\n    var args = slice.call(arguments, 1);\n    return function() {\n      return func.apply(this, args.concat(slice.call(arguments)));\n    };\n  };\n\n  // Bind all of an object's methods to that object. Useful for ensuring that\n  // all callbacks defined on an object belong to it.\n  _.bindAll = function(obj) {\n    var funcs = slice.call(arguments, 1);\n    if (funcs.length === 0) funcs = _.functions(obj);\n    each(funcs, function(f) { obj[f] = _.bind(obj[f], obj); });\n    return obj;\n  };\n\n  // Memoize an expensive function by storing its results.\n  _.memoize = function(func, hasher) {\n    var memo = {};\n    hasher || (hasher = _.identity);\n    return function() {\n      var key = hasher.apply(this, arguments);\n      return _.has(memo, key) ? memo[key] : (memo[key] = func.apply(this, arguments));\n    };\n  };\n\n  // Delays a function for the given number of milliseconds, and then calls\n  // it with the arguments supplied.\n  _.delay = function(func, wait) {\n    var args = slice.call(arguments, 2);\n    return setTimeout(function(){ return func.apply(null, args); }, wait);\n  };\n\n  // Defers a function, scheduling it to run after the current call stack has\n  // cleared.\n  _.defer = function(func) {\n    return _.delay.apply(_, [func, 1].concat(slice.call(arguments, 1)));\n  };\n\n  // Returns a function, that, when invoked, will only be triggered at most once\n  // during a given window of time.\n  _.throttle = function(func, wait) {\n    var context, args, timeout, result;\n    var previous = 0;\n    var later = function() {\n      previous = new Date;\n      timeout = null;\n      result = func.apply(context, args);\n    };\n    return function() {\n      var now = new Date;\n      var remaining = wait - (now - previous);\n      context = this;\n      args = arguments;\n      if (remaining <= 0) {\n        clearTimeout(timeout);\n        timeout = null;\n        previous = now;\n        result = func.apply(context, args);\n      } else if (!timeout) {\n        timeout = setTimeout(later, remaining);\n      }\n      return result;\n    };\n  };\n\n  // Returns a function, that, as long as it continues to be invoked, will not\n  // be triggered. The function will be called after it stops being called for\n  // N milliseconds. If `immediate` is passed, trigger the function on the\n  // leading edge, instead of the trailing.\n  _.debounce = function(func, wait, immediate) {\n    var timeout, result;\n    return function() {\n      var context = this, args = arguments;\n      var later = function() {\n        timeout = null;\n        if (!immediate) result = func.apply(context, args);\n      };\n      var callNow = immediate && !timeout;\n      clearTimeout(timeout);\n      timeout = setTimeout(later, wait);\n      if (callNow) result = func.apply(context, args);\n      return result;\n    };\n  };\n\n  // Returns a function that will be executed at most one time, no matter how\n  // often you call it. Useful for lazy initialization.\n  _.once = function(func) {\n    var ran = false, memo;\n    return function() {\n      if (ran) return memo;\n      ran = true;\n      memo = func.apply(this, arguments);\n      func = null;\n      return memo;\n    };\n  };\n\n  // Returns the first function passed as an argument to the second,\n  // allowing you to adjust arguments, run code before and after, and\n  // conditionally execute the original function.\n  _.wrap = function(func, wrapper) {\n    return function() {\n      var args = [func];\n      push.apply(args, arguments);\n      return wrapper.apply(this, args);\n    };\n  };\n\n  // Returns a function that is the composition of a list of functions, each\n  // consuming the return value of the function that follows.\n  _.compose = function() {\n    var funcs = arguments;\n    return function() {\n      var args = arguments;\n      for (var i = funcs.length - 1; i >= 0; i--) {\n        args = [funcs[i].apply(this, args)];\n      }\n      return args[0];\n    };\n  };\n\n  // Returns a function that will only be executed after being called N times.\n  _.after = function(times, func) {\n    if (times <= 0) return func();\n    return function() {\n      if (--times < 1) {\n        return func.apply(this, arguments);\n      }\n    };\n  };\n\n  // Object Functions\n  // ----------------\n\n  // Retrieve the names of an object's properties.\n  // Delegates to **ECMAScript 5**'s native `Object.keys`\n  _.keys = nativeKeys || function(obj) {\n    if (obj !== Object(obj)) throw new TypeError('Invalid object');\n    var keys = [];\n    for (var key in obj) if (_.has(obj, key)) keys[keys.length] = key;\n    return keys;\n  };\n\n  // Retrieve the values of an object's properties.\n  _.values = function(obj) {\n    var values = [];\n    for (var key in obj) if (_.has(obj, key)) values.push(obj[key]);\n    return values;\n  };\n\n  // Convert an object into a list of `[key, value]` pairs.\n  _.pairs = function(obj) {\n    var pairs = [];\n    for (var key in obj) if (_.has(obj, key)) pairs.push([key, obj[key]]);\n    return pairs;\n  };\n\n  // Invert the keys and values of an object. The values must be serializable.\n  _.invert = function(obj) {\n    var result = {};\n    for (var key in obj) if (_.has(obj, key)) result[obj[key]] = key;\n    return result;\n  };\n\n  // Return a sorted list of the function names available on the object.\n  // Aliased as `methods`\n  _.functions = _.methods = function(obj) {\n    var names = [];\n    for (var key in obj) {\n      if (_.isFunction(obj[key])) names.push(key);\n    }\n    return names.sort();\n  };\n\n  // Extend a given object with all the properties in passed-in object(s).\n  _.extend = function(obj) {\n    each(slice.call(arguments, 1), function(source) {\n      if (source) {\n        for (var prop in source) {\n          obj[prop] = source[prop];\n        }\n      }\n    });\n    return obj;\n  };\n\n  // Return a copy of the object only containing the whitelisted properties.\n  _.pick = function(obj) {\n    var copy = {};\n    var keys = concat.apply(ArrayProto, slice.call(arguments, 1));\n    each(keys, function(key) {\n      if (key in obj) copy[key] = obj[key];\n    });\n    return copy;\n  };\n\n   // Return a copy of the object without the blacklisted properties.\n  _.omit = function(obj) {\n    var copy = {};\n    var keys = concat.apply(ArrayProto, slice.call(arguments, 1));\n    for (var key in obj) {\n      if (!_.contains(keys, key)) copy[key] = obj[key];\n    }\n    return copy;\n  };\n\n  // Fill in a given object with default properties.\n  _.defaults = function(obj) {\n    each(slice.call(arguments, 1), function(source) {\n      if (source) {\n        for (var prop in source) {\n          if (obj[prop] == null) obj[prop] = source[prop];\n        }\n      }\n    });\n    return obj;\n  };\n\n  // Create a (shallow-cloned) duplicate of an object.\n  _.clone = function(obj) {\n    if (!_.isObject(obj)) return obj;\n    return _.isArray(obj) ? obj.slice() : _.extend({}, obj);\n  };\n\n  // Invokes interceptor with the obj, and then returns obj.\n  // The primary purpose of this method is to \"tap into\" a method chain, in\n  // order to perform operations on intermediate results within the chain.\n  _.tap = function(obj, interceptor) {\n    interceptor(obj);\n    return obj;\n  };\n\n  // Internal recursive comparison function for `isEqual`.\n  var eq = function(a, b, aStack, bStack) {\n    // Identical objects are equal. `0 === -0`, but they aren't identical.\n    // See the Harmony `egal` proposal: http://wiki.ecmascript.org/doku.php?id=harmony:egal.\n    if (a === b) return a !== 0 || 1 / a == 1 / b;\n    // A strict comparison is necessary because `null == undefined`.\n    if (a == null || b == null) return a === b;\n    // Unwrap any wrapped objects.\n    if (a instanceof _) a = a._wrapped;\n    if (b instanceof _) b = b._wrapped;\n    // Compare `[[Class]]` names.\n    var className = toString.call(a);\n    if (className != toString.call(b)) return false;\n    switch (className) {\n      // Strings, numbers, dates, and booleans are compared by value.\n      case '[object String]':\n        // Primitives and their corresponding object wrappers are equivalent; thus, `\"5\"` is\n        // equivalent to `new String(\"5\")`.\n        return a == String(b);\n      case '[object Number]':\n        // `NaN`s are equivalent, but non-reflexive. An `egal` comparison is performed for\n        // other numeric values.\n        return a != +a ? b != +b : (a == 0 ? 1 / a == 1 / b : a == +b);\n      case '[object Date]':\n      case '[object Boolean]':\n        // Coerce dates and booleans to numeric primitive values. Dates are compared by their\n        // millisecond representations. Note that invalid dates with millisecond representations\n        // of `NaN` are not equivalent.\n        return +a == +b;\n      // RegExps are compared by their source patterns and flags.\n      case '[object RegExp]':\n        return a.source == b.source &&\n               a.global == b.global &&\n               a.multiline == b.multiline &&\n               a.ignoreCase == b.ignoreCase;\n    }\n    if (typeof a != 'object' || typeof b != 'object') return false;\n    // Assume equality for cyclic structures. The algorithm for detecting cyclic\n    // structures is adapted from ES 5.1 section 15.12.3, abstract operation `JO`.\n    var length = aStack.length;\n    while (length--) {\n      // Linear search. Performance is inversely proportional to the number of\n      // unique nested structures.\n      if (aStack[length] == a) return bStack[length] == b;\n    }\n    // Add the first object to the stack of traversed objects.\n    aStack.push(a);\n    bStack.push(b);\n    var size = 0, result = true;\n    // Recursively compare objects and arrays.\n    if (className == '[object Array]') {\n      // Compare array lengths to determine if a deep comparison is necessary.\n      size = a.length;\n      result = size == b.length;\n      if (result) {\n        // Deep compare the contents, ignoring non-numeric properties.\n        while (size--) {\n          if (!(result = eq(a[size], b[size], aStack, bStack))) break;\n        }\n      }\n    } else {\n      // Objects with different constructors are not equivalent, but `Object`s\n      // from different frames are.\n      var aCtor = a.constructor, bCtor = b.constructor;\n      if (aCtor !== bCtor && !(_.isFunction(aCtor) && (aCtor instanceof aCtor) &&\n                               _.isFunction(bCtor) && (bCtor instanceof bCtor))) {\n        return false;\n      }\n      // Deep compare objects.\n      for (var key in a) {\n        if (_.has(a, key)) {\n          // Count the expected number of properties.\n          size++;\n          // Deep compare each member.\n          if (!(result = _.has(b, key) && eq(a[key], b[key], aStack, bStack))) break;\n        }\n      }\n      // Ensure that both objects contain the same number of properties.\n      if (result) {\n        for (key in b) {\n          if (_.has(b, key) && !(size--)) break;\n        }\n        result = !size;\n      }\n    }\n    // Remove the first object from the stack of traversed objects.\n    aStack.pop();\n    bStack.pop();\n    return result;\n  };\n\n  // Perform a deep comparison to check if two objects are equal.\n  _.isEqual = function(a, b) {\n    return eq(a, b, [], []);\n  };\n\n  // Is a given array, string, or object empty?\n  // An \"empty\" object has no enumerable own-properties.\n  _.isEmpty = function(obj) {\n    if (obj == null) return true;\n    if (_.isArray(obj) || _.isString(obj)) return obj.length === 0;\n    for (var key in obj) if (_.has(obj, key)) return false;\n    return true;\n  };\n\n  // Is a given value a DOM element?\n  _.isElement = function(obj) {\n    return !!(obj && obj.nodeType === 1);\n  };\n\n  // Is a given value an array?\n  // Delegates to ECMA5's native Array.isArray\n  _.isArray = nativeIsArray || function(obj) {\n    return toString.call(obj) == '[object Array]';\n  };\n\n  // Is a given variable an object?\n  _.isObject = function(obj) {\n    return obj === Object(obj);\n  };\n\n  // Add some isType methods: isArguments, isFunction, isString, isNumber, isDate, isRegExp.\n  each(['Arguments', 'Function', 'String', 'Number', 'Date', 'RegExp'], function(name) {\n    _['is' + name] = function(obj) {\n      return toString.call(obj) == '[object ' + name + ']';\n    };\n  });\n\n  // Define a fallback version of the method in browsers (ahem, IE), where\n  // there isn't any inspectable \"Arguments\" type.\n  if (!_.isArguments(arguments)) {\n    _.isArguments = function(obj) {\n      return !!(obj && _.has(obj, 'callee'));\n    };\n  }\n\n  // Optimize `isFunction` if appropriate.\n  if (typeof (/./) !== 'function') {\n    _.isFunction = function(obj) {\n      return typeof obj === 'function';\n    };\n  }\n\n  // Is a given object a finite number?\n  _.isFinite = function(obj) {\n    return isFinite(obj) && !isNaN(parseFloat(obj));\n  };\n\n  // Is the given value `NaN`? (NaN is the only number which does not equal itself).\n  _.isNaN = function(obj) {\n    return _.isNumber(obj) && obj != +obj;\n  };\n\n  // Is a given value a boolean?\n  _.isBoolean = function(obj) {\n    return obj === true || obj === false || toString.call(obj) == '[object Boolean]';\n  };\n\n  // Is a given value equal to null?\n  _.isNull = function(obj) {\n    return obj === null;\n  };\n\n  // Is a given variable undefined?\n  _.isUndefined = function(obj) {\n    return obj === void 0;\n  };\n\n  // Shortcut function for checking if an object has a given property directly\n  // on itself (in other words, not on a prototype).\n  _.has = function(obj, key) {\n    return hasOwnProperty.call(obj, key);\n  };\n\n  // Utility Functions\n  // -----------------\n\n  // Run Underscore.js in *noConflict* mode, returning the `_` variable to its\n  // previous owner. Returns a reference to the Underscore object.\n  _.noConflict = function() {\n    root._ = previousUnderscore;\n    return this;\n  };\n\n  // Keep the identity function around for default iterators.\n  _.identity = function(value) {\n    return value;\n  };\n\n  // Run a function **n** times.\n  _.times = function(n, iterator, context) {\n    var accum = Array(n);\n    for (var i = 0; i < n; i++) accum[i] = iterator.call(context, i);\n    return accum;\n  };\n\n  // Return a random integer between min and max (inclusive).\n  _.random = function(min, max) {\n    if (max == null) {\n      max = min;\n      min = 0;\n    }\n    return min + Math.floor(Math.random() * (max - min + 1));\n  };\n\n  // List of HTML entities for escaping.\n  var entityMap = {\n    escape: {\n      '&': '&amp;',\n      '<': '&lt;',\n      '>': '&gt;',\n      '\"': '&quot;',\n      \"'\": '&#x27;',\n      '/': '&#x2F;'\n    }\n  };\n  entityMap.unescape = _.invert(entityMap.escape);\n\n  // Regexes containing the keys and values listed immediately above.\n  var entityRegexes = {\n    escape:   new RegExp('[' + _.keys(entityMap.escape).join('') + ']', 'g'),\n    unescape: new RegExp('(' + _.keys(entityMap.unescape).join('|') + ')', 'g')\n  };\n\n  // Functions for escaping and unescaping strings to/from HTML interpolation.\n  _.each(['escape', 'unescape'], function(method) {\n    _[method] = function(string) {\n      if (string == null) return '';\n      return ('' + string).replace(entityRegexes[method], function(match) {\n        return entityMap[method][match];\n      });\n    };\n  });\n\n  // If the value of the named property is a function then invoke it;\n  // otherwise, return it.\n  _.result = function(object, property) {\n    if (object == null) return null;\n    var value = object[property];\n    return _.isFunction(value) ? value.call(object) : value;\n  };\n\n  // Add your own custom functions to the Underscore object.\n  _.mixin = function(obj) {\n    each(_.functions(obj), function(name){\n      var func = _[name] = obj[name];\n      _.prototype[name] = function() {\n        var args = [this._wrapped];\n        push.apply(args, arguments);\n        return result.call(this, func.apply(_, args));\n      };\n    });\n  };\n\n  // Generate a unique integer id (unique within the entire client session).\n  // Useful for temporary DOM ids.\n  var idCounter = 0;\n  _.uniqueId = function(prefix) {\n    var id = ++idCounter + '';\n    return prefix ? prefix + id : id;\n  };\n\n  // By default, Underscore uses ERB-style template delimiters, change the\n  // following template settings to use alternative delimiters.\n  _.templateSettings = {\n    evaluate    : /<%([\\s\\S]+?)%>/g,\n    interpolate : /<%=([\\s\\S]+?)%>/g,\n    escape      : /<%-([\\s\\S]+?)%>/g\n  };\n\n  // When customizing `templateSettings`, if you don't want to define an\n  // interpolation, evaluation or escaping regex, we need one that is\n  // guaranteed not to match.\n  var noMatch = /(.)^/;\n\n  // Certain characters need to be escaped so that they can be put into a\n  // string literal.\n  var escapes = {\n    \"'\":      \"'\",\n    '\\\\':     '\\\\',\n    '\\r':     'r',\n    '\\n':     'n',\n    '\\t':     't',\n    '\\u2028': 'u2028',\n    '\\u2029': 'u2029'\n  };\n\n  var escaper = /\\\\|'|\\r|\\n|\\t|\\u2028|\\u2029/g;\n\n  // JavaScript micro-templating, similar to John Resig's implementation.\n  // Underscore templating handles arbitrary delimiters, preserves whitespace,\n  // and correctly escapes quotes within interpolated code.\n  _.template = function(text, data, settings) {\n    var render;\n    settings = _.defaults({}, settings, _.templateSettings);\n\n    // Combine delimiters into one regular expression via alternation.\n    var matcher = new RegExp([\n      (settings.escape || noMatch).source,\n      (settings.interpolate || noMatch).source,\n      (settings.evaluate || noMatch).source\n    ].join('|') + '|$', 'g');\n\n    // Compile the template source, escaping string literals appropriately.\n    var index = 0;\n    var source = \"__p+='\";\n    text.replace(matcher, function(match, escape, interpolate, evaluate, offset) {\n      source += text.slice(index, offset)\n        .replace(escaper, function(match) { return '\\\\' + escapes[match]; });\n\n      if (escape) {\n        source += \"'+\\n((__t=(\" + escape + \"))==null?'':_.escape(__t))+\\n'\";\n      }\n      if (interpolate) {\n        source += \"'+\\n((__t=(\" + interpolate + \"))==null?'':__t)+\\n'\";\n      }\n      if (evaluate) {\n        source += \"';\\n\" + evaluate + \"\\n__p+='\";\n      }\n      index = offset + match.length;\n      return match;\n    });\n    source += \"';\\n\";\n\n    // If a variable is not specified, place data values in local scope.\n    if (!settings.variable) source = 'with(obj||{}){\\n' + source + '}\\n';\n\n    source = \"var __t,__p='',__j=Array.prototype.join,\" +\n      \"print=function(){__p+=__j.call(arguments,'');};\\n\" +\n      source + \"return __p;\\n\";\n\n    try {\n      render = new Function(settings.variable || 'obj', '_', source);\n    } catch (e) {\n      e.source = source;\n      throw e;\n    }\n\n    if (data) return render(data, _);\n    var template = function(data) {\n      return render.call(this, data, _);\n    };\n\n    // Provide the compiled function source as a convenience for precompilation.\n    template.source = 'function(' + (settings.variable || 'obj') + '){\\n' + source + '}';\n\n    return template;\n  };\n\n  // Add a \"chain\" function, which will delegate to the wrapper.\n  _.chain = function(obj) {\n    return _(obj).chain();\n  };\n\n  // OOP\n  // ---------------\n  // If Underscore is called as a function, it returns a wrapped object that\n  // can be used OO-style. This wrapper holds altered versions of all the\n  // underscore functions. Wrapped objects may be chained.\n\n  // Helper function to continue chaining intermediate results.\n  var result = function(obj) {\n    return this._chain ? _(obj).chain() : obj;\n  };\n\n  // Add all of the Underscore functions to the wrapper object.\n  _.mixin(_);\n\n  // Add all mutator Array functions to the wrapper.\n  each(['pop', 'push', 'reverse', 'shift', 'sort', 'splice', 'unshift'], function(name) {\n    var method = ArrayProto[name];\n    _.prototype[name] = function() {\n      var obj = this._wrapped;\n      method.apply(obj, arguments);\n      if ((name == 'shift' || name == 'splice') && obj.length === 0) delete obj[0];\n      return result.call(this, obj);\n    };\n  });\n\n  // Add all accessor Array functions to the wrapper.\n  each(['concat', 'join', 'slice'], function(name) {\n    var method = ArrayProto[name];\n    _.prototype[name] = function() {\n      return result.call(this, method.apply(this._wrapped, arguments));\n    };\n  });\n\n  _.extend(_.prototype, {\n\n    // Start chaining a wrapped Underscore object.\n    chain: function() {\n      this._chain = true;\n      return this;\n    },\n\n    // Extracts the result from a wrapped and chained object.\n    value: function() {\n      return this._wrapped;\n    }\n\n  });\n\n}).call(this);\n\n},{}],153:[function(require,module,exports){\n(function (Buffer){\n;(function (sax) { // wrapper for non-node envs\n  sax.parser = function (strict, opt) { return new SAXParser(strict, opt) }\n  sax.SAXParser = SAXParser\n  sax.SAXStream = SAXStream\n  sax.createStream = createStream\n\n  // When we pass the MAX_BUFFER_LENGTH position, start checking for buffer overruns.\n  // When we check, schedule the next check for MAX_BUFFER_LENGTH - (max(buffer lengths)),\n  // since that's the earliest that a buffer overrun could occur.  This way, checks are\n  // as rare as required, but as often as necessary to ensure never crossing this bound.\n  // Furthermore, buffers are only tested at most once per write(), so passing a very\n  // large string into write() might have undesirable effects, but this is manageable by\n  // the caller, so it is assumed to be safe.  Thus, a call to write() may, in the extreme\n  // edge case, result in creating at most one complete copy of the string passed in.\n  // Set to Infinity to have unlimited buffers.\n  sax.MAX_BUFFER_LENGTH = 64 * 1024\n\n  var buffers = [\n    'comment', 'sgmlDecl', 'textNode', 'tagName', 'doctype',\n    'procInstName', 'procInstBody', 'entity', 'attribName',\n    'attribValue', 'cdata', 'script'\n  ]\n\n  sax.EVENTS = [\n    'text',\n    'processinginstruction',\n    'sgmldeclaration',\n    'doctype',\n    'comment',\n    'attribute',\n    'opentag',\n    'closetag',\n    'opencdata',\n    'cdata',\n    'closecdata',\n    'error',\n    'end',\n    'ready',\n    'script',\n    'opennamespace',\n    'closenamespace'\n  ]\n\n  function SAXParser (strict, opt) {\n    if (!(this instanceof SAXParser)) {\n      return new SAXParser(strict, opt)\n    }\n\n    var parser = this\n    clearBuffers(parser)\n    parser.q = parser.c = ''\n    parser.bufferCheckPosition = sax.MAX_BUFFER_LENGTH\n    parser.opt = opt || {}\n    parser.opt.lowercase = parser.opt.lowercase || parser.opt.lowercasetags\n    parser.looseCase = parser.opt.lowercase ? 'toLowerCase' : 'toUpperCase'\n    parser.tags = []\n    parser.closed = parser.closedRoot = parser.sawRoot = false\n    parser.tag = parser.error = null\n    parser.strict = !!strict\n    parser.noscript = !!(strict || parser.opt.noscript)\n    parser.state = S.BEGIN\n    parser.strictEntities = parser.opt.strictEntities\n    parser.ENTITIES = parser.strictEntities ? Object.create(sax.XML_ENTITIES) : Object.create(sax.ENTITIES)\n    parser.attribList = []\n\n    // namespaces form a prototype chain.\n    // it always points at the current tag,\n    // which protos to its parent tag.\n    if (parser.opt.xmlns) {\n      parser.ns = Object.create(rootNS)\n    }\n\n    // mostly just for error reporting\n    parser.trackPosition = parser.opt.position !== false\n    if (parser.trackPosition) {\n      parser.position = parser.line = parser.column = 0\n    }\n    emit(parser, 'onready')\n  }\n\n  if (!Object.create) {\n    Object.create = function (o) {\n      function F () {}\n      F.prototype = o\n      var newf = new F()\n      return newf\n    }\n  }\n\n  if (!Object.keys) {\n    Object.keys = function (o) {\n      var a = []\n      for (var i in o) if (o.hasOwnProperty(i)) a.push(i)\n      return a\n    }\n  }\n\n  function checkBufferLength (parser) {\n    var maxAllowed = Math.max(sax.MAX_BUFFER_LENGTH, 10)\n    var maxActual = 0\n    for (var i = 0, l = buffers.length; i < l; i++) {\n      var len = parser[buffers[i]].length\n      if (len > maxAllowed) {\n        // Text/cdata nodes can get big, and since they're buffered,\n        // we can get here under normal conditions.\n        // Avoid issues by emitting the text node now,\n        // so at least it won't get any bigger.\n        switch (buffers[i]) {\n          case 'textNode':\n            closeText(parser)\n            break\n\n          case 'cdata':\n            emitNode(parser, 'oncdata', parser.cdata)\n            parser.cdata = ''\n            break\n\n          case 'script':\n            emitNode(parser, 'onscript', parser.script)\n            parser.script = ''\n            break\n\n          default:\n            error(parser, 'Max buffer length exceeded: ' + buffers[i])\n        }\n      }\n      maxActual = Math.max(maxActual, len)\n    }\n    // schedule the next check for the earliest possible buffer overrun.\n    var m = sax.MAX_BUFFER_LENGTH - maxActual\n    parser.bufferCheckPosition = m + parser.position\n  }\n\n  function clearBuffers (parser) {\n    for (var i = 0, l = buffers.length; i < l; i++) {\n      parser[buffers[i]] = ''\n    }\n  }\n\n  function flushBuffers (parser) {\n    closeText(parser)\n    if (parser.cdata !== '') {\n      emitNode(parser, 'oncdata', parser.cdata)\n      parser.cdata = ''\n    }\n    if (parser.script !== '') {\n      emitNode(parser, 'onscript', parser.script)\n      parser.script = ''\n    }\n  }\n\n  SAXParser.prototype = {\n    end: function () { end(this) },\n    write: write,\n    resume: function () { this.error = null; return this },\n    close: function () { return this.write(null) },\n    flush: function () { flushBuffers(this) }\n  }\n\n  var Stream\n  try {\n    Stream = require('stream').Stream\n  } catch (ex) {\n    Stream = function () {}\n  }\n\n  var streamWraps = sax.EVENTS.filter(function (ev) {\n    return ev !== 'error' && ev !== 'end'\n  })\n\n  function createStream (strict, opt) {\n    return new SAXStream(strict, opt)\n  }\n\n  function SAXStream (strict, opt) {\n    if (!(this instanceof SAXStream)) {\n      return new SAXStream(strict, opt)\n    }\n\n    Stream.apply(this)\n\n    this._parser = new SAXParser(strict, opt)\n    this.writable = true\n    this.readable = true\n\n    var me = this\n\n    this._parser.onend = function () {\n      me.emit('end')\n    }\n\n    this._parser.onerror = function (er) {\n      me.emit('error', er)\n\n      // if didn't throw, then means error was handled.\n      // go ahead and clear error, so we can write again.\n      me._parser.error = null\n    }\n\n    this._decoder = null\n\n    streamWraps.forEach(function (ev) {\n      Object.defineProperty(me, 'on' + ev, {\n        get: function () {\n          return me._parser['on' + ev]\n        },\n        set: function (h) {\n          if (!h) {\n            me.removeAllListeners(ev)\n            me._parser['on' + ev] = h\n            return h\n          }\n          me.on(ev, h)\n        },\n        enumerable: true,\n        configurable: false\n      })\n    })\n  }\n\n  SAXStream.prototype = Object.create(Stream.prototype, {\n    constructor: {\n      value: SAXStream\n    }\n  })\n\n  SAXStream.prototype.write = function (data) {\n    if (typeof Buffer === 'function' &&\n      typeof Buffer.isBuffer === 'function' &&\n      Buffer.isBuffer(data)) {\n      if (!this._decoder) {\n        var SD = require('string_decoder').StringDecoder\n        this._decoder = new SD('utf8')\n      }\n      data = this._decoder.write(data)\n    }\n\n    this._parser.write(data.toString())\n    this.emit('data', data)\n    return true\n  }\n\n  SAXStream.prototype.end = function (chunk) {\n    if (chunk && chunk.length) {\n      this.write(chunk)\n    }\n    this._parser.end()\n    return true\n  }\n\n  SAXStream.prototype.on = function (ev, handler) {\n    var me = this\n    if (!me._parser['on' + ev] && streamWraps.indexOf(ev) !== -1) {\n      me._parser['on' + ev] = function () {\n        var args = arguments.length === 1 ? [arguments[0]] : Array.apply(null, arguments)\n        args.splice(0, 0, ev)\n        me.emit.apply(me, args)\n      }\n    }\n\n    return Stream.prototype.on.call(me, ev, handler)\n  }\n\n  // character classes and tokens\n  var whitespace = '\\r\\n\\t '\n\n  // this really needs to be replaced with character classes.\n  // XML allows all manner of ridiculous numbers and digits.\n  var number = '0124356789'\n  var letter = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'\n\n  // (Letter | \"_\" | \":\")\n  var quote = '\\'\"'\n  var attribEnd = whitespace + '>'\n  var CDATA = '[CDATA['\n  var DOCTYPE = 'DOCTYPE'\n  var XML_NAMESPACE = 'http://www.w3.org/XML/1998/namespace'\n  var XMLNS_NAMESPACE = 'http://www.w3.org/2000/xmlns/'\n  var rootNS = { xml: XML_NAMESPACE, xmlns: XMLNS_NAMESPACE }\n\n  // turn all the string character sets into character class objects.\n  whitespace = charClass(whitespace)\n  number = charClass(number)\n  letter = charClass(letter)\n\n  // http://www.w3.org/TR/REC-xml/#NT-NameStartChar\n  // This implementation works on strings, a single character at a time\n  // as such, it cannot ever support astral-plane characters (10000-EFFFF)\n  // without a significant breaking change to either this  parser, or the\n  // JavaScript language.  Implementation of an emoji-capable xml parser\n  // is left as an exercise for the reader.\n  var nameStart = /[:_A-Za-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD]/\n\n  var nameBody = /[:_A-Za-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\u00B7\\u0300-\\u036F\\u203F-\\u2040\\.\\d-]/\n\n  var entityStart = /[#:_A-Za-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD]/\n  var entityBody = /[#:_A-Za-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\u00B7\\u0300-\\u036F\\u203F-\\u2040\\.\\d-]/\n\n  quote = charClass(quote)\n  attribEnd = charClass(attribEnd)\n\n  function charClass (str) {\n    return str.split('').reduce(function (s, c) {\n      s[c] = true\n      return s\n    }, {})\n  }\n\n  function isRegExp (c) {\n    return Object.prototype.toString.call(c) === '[object RegExp]'\n  }\n\n  function is (charclass, c) {\n    return isRegExp(charclass) ? !!c.match(charclass) : charclass[c]\n  }\n\n  function not (charclass, c) {\n    return !is(charclass, c)\n  }\n\n  var S = 0\n  sax.STATE = {\n    BEGIN: S++, // leading byte order mark or whitespace\n    BEGIN_WHITESPACE: S++, // leading whitespace\n    TEXT: S++, // general stuff\n    TEXT_ENTITY: S++, // &amp and such.\n    OPEN_WAKA: S++, // <\n    SGML_DECL: S++, // <!BLARG\n    SGML_DECL_QUOTED: S++, // <!BLARG foo \"bar\n    DOCTYPE: S++, // <!DOCTYPE\n    DOCTYPE_QUOTED: S++, // <!DOCTYPE \"//blah\n    DOCTYPE_DTD: S++, // <!DOCTYPE \"//blah\" [ ...\n    DOCTYPE_DTD_QUOTED: S++, // <!DOCTYPE \"//blah\" [ \"foo\n    COMMENT_STARTING: S++, // <!-\n    COMMENT: S++, // <!--\n    COMMENT_ENDING: S++, // <!-- blah -\n    COMMENT_ENDED: S++, // <!-- blah --\n    CDATA: S++, // <![CDATA[ something\n    CDATA_ENDING: S++, // ]\n    CDATA_ENDING_2: S++, // ]]\n    PROC_INST: S++, // <?hi\n    PROC_INST_BODY: S++, // <?hi there\n    PROC_INST_ENDING: S++, // <?hi \"there\" ?\n    OPEN_TAG: S++, // <strong\n    OPEN_TAG_SLASH: S++, // <strong /\n    ATTRIB: S++, // <a\n    ATTRIB_NAME: S++, // <a foo\n    ATTRIB_NAME_SAW_WHITE: S++, // <a foo _\n    ATTRIB_VALUE: S++, // <a foo=\n    ATTRIB_VALUE_QUOTED: S++, // <a foo=\"bar\n    ATTRIB_VALUE_CLOSED: S++, // <a foo=\"bar\"\n    ATTRIB_VALUE_UNQUOTED: S++, // <a foo=bar\n    ATTRIB_VALUE_ENTITY_Q: S++, // <foo bar=\"&quot;\"\n    ATTRIB_VALUE_ENTITY_U: S++, // <foo bar=&quot\n    CLOSE_TAG: S++, // </a\n    CLOSE_TAG_SAW_WHITE: S++, // </a   >\n    SCRIPT: S++, // <script> ...\n    SCRIPT_ENDING: S++ // <script> ... <\n  }\n\n  sax.XML_ENTITIES = {\n    'amp': '&',\n    'gt': '>',\n    'lt': '<',\n    'quot': '\"',\n    'apos': \"'\"\n  }\n\n  sax.ENTITIES = {\n    'amp': '&',\n    'gt': '>',\n    'lt': '<',\n    'quot': '\"',\n    'apos': \"'\",\n    'AElig': 198,\n    'Aacute': 193,\n    'Acirc': 194,\n    'Agrave': 192,\n    'Aring': 197,\n    'Atilde': 195,\n    'Auml': 196,\n    'Ccedil': 199,\n    'ETH': 208,\n    'Eacute': 201,\n    'Ecirc': 202,\n    'Egrave': 200,\n    'Euml': 203,\n    'Iacute': 205,\n    'Icirc': 206,\n    'Igrave': 204,\n    'Iuml': 207,\n    'Ntilde': 209,\n    'Oacute': 211,\n    'Ocirc': 212,\n    'Ograve': 210,\n    'Oslash': 216,\n    'Otilde': 213,\n    'Ouml': 214,\n    'THORN': 222,\n    'Uacute': 218,\n    'Ucirc': 219,\n    'Ugrave': 217,\n    'Uuml': 220,\n    'Yacute': 221,\n    'aacute': 225,\n    'acirc': 226,\n    'aelig': 230,\n    'agrave': 224,\n    'aring': 229,\n    'atilde': 227,\n    'auml': 228,\n    'ccedil': 231,\n    'eacute': 233,\n    'ecirc': 234,\n    'egrave': 232,\n    'eth': 240,\n    'euml': 235,\n    'iacute': 237,\n    'icirc': 238,\n    'igrave': 236,\n    'iuml': 239,\n    'ntilde': 241,\n    'oacute': 243,\n    'ocirc': 244,\n    'ograve': 242,\n    'oslash': 248,\n    'otilde': 245,\n    'ouml': 246,\n    'szlig': 223,\n    'thorn': 254,\n    'uacute': 250,\n    'ucirc': 251,\n    'ugrave': 249,\n    'uuml': 252,\n    'yacute': 253,\n    'yuml': 255,\n    'copy': 169,\n    'reg': 174,\n    'nbsp': 160,\n    'iexcl': 161,\n    'cent': 162,\n    'pound': 163,\n    'curren': 164,\n    'yen': 165,\n    'brvbar': 166,\n    'sect': 167,\n    'uml': 168,\n    'ordf': 170,\n    'laquo': 171,\n    'not': 172,\n    'shy': 173,\n    'macr': 175,\n    'deg': 176,\n    'plusmn': 177,\n    'sup1': 185,\n    'sup2': 178,\n    'sup3': 179,\n    'acute': 180,\n    'micro': 181,\n    'para': 182,\n    'middot': 183,\n    'cedil': 184,\n    'ordm': 186,\n    'raquo': 187,\n    'frac14': 188,\n    'frac12': 189,\n    'frac34': 190,\n    'iquest': 191,\n    'times': 215,\n    'divide': 247,\n    'OElig': 338,\n    'oelig': 339,\n    'Scaron': 352,\n    'scaron': 353,\n    'Yuml': 376,\n    'fnof': 402,\n    'circ': 710,\n    'tilde': 732,\n    'Alpha': 913,\n    'Beta': 914,\n    'Gamma': 915,\n    'Delta': 916,\n    'Epsilon': 917,\n    'Zeta': 918,\n    'Eta': 919,\n    'Theta': 920,\n    'Iota': 921,\n    'Kappa': 922,\n    'Lambda': 923,\n    'Mu': 924,\n    'Nu': 925,\n    'Xi': 926,\n    'Omicron': 927,\n    'Pi': 928,\n    'Rho': 929,\n    'Sigma': 931,\n    'Tau': 932,\n    'Upsilon': 933,\n    'Phi': 934,\n    'Chi': 935,\n    'Psi': 936,\n    'Omega': 937,\n    'alpha': 945,\n    'beta': 946,\n    'gamma': 947,\n    'delta': 948,\n    'epsilon': 949,\n    'zeta': 950,\n    'eta': 951,\n    'theta': 952,\n    'iota': 953,\n    'kappa': 954,\n    'lambda': 955,\n    'mu': 956,\n    'nu': 957,\n    'xi': 958,\n    'omicron': 959,\n    'pi': 960,\n    'rho': 961,\n    'sigmaf': 962,\n    'sigma': 963,\n    'tau': 964,\n    'upsilon': 965,\n    'phi': 966,\n    'chi': 967,\n    'psi': 968,\n    'omega': 969,\n    'thetasym': 977,\n    'upsih': 978,\n    'piv': 982,\n    'ensp': 8194,\n    'emsp': 8195,\n    'thinsp': 8201,\n    'zwnj': 8204,\n    'zwj': 8205,\n    'lrm': 8206,\n    'rlm': 8207,\n    'ndash': 8211,\n    'mdash': 8212,\n    'lsquo': 8216,\n    'rsquo': 8217,\n    'sbquo': 8218,\n    'ldquo': 8220,\n    'rdquo': 8221,\n    'bdquo': 8222,\n    'dagger': 8224,\n    'Dagger': 8225,\n    'bull': 8226,\n    'hellip': 8230,\n    'permil': 8240,\n    'prime': 8242,\n    'Prime': 8243,\n    'lsaquo': 8249,\n    'rsaquo': 8250,\n    'oline': 8254,\n    'frasl': 8260,\n    'euro': 8364,\n    'image': 8465,\n    'weierp': 8472,\n    'real': 8476,\n    'trade': 8482,\n    'alefsym': 8501,\n    'larr': 8592,\n    'uarr': 8593,\n    'rarr': 8594,\n    'darr': 8595,\n    'harr': 8596,\n    'crarr': 8629,\n    'lArr': 8656,\n    'uArr': 8657,\n    'rArr': 8658,\n    'dArr': 8659,\n    'hArr': 8660,\n    'forall': 8704,\n    'part': 8706,\n    'exist': 8707,\n    'empty': 8709,\n    'nabla': 8711,\n    'isin': 8712,\n    'notin': 8713,\n    'ni': 8715,\n    'prod': 8719,\n    'sum': 8721,\n    'minus': 8722,\n    'lowast': 8727,\n    'radic': 8730,\n    'prop': 8733,\n    'infin': 8734,\n    'ang': 8736,\n    'and': 8743,\n    'or': 8744,\n    'cap': 8745,\n    'cup': 8746,\n    'int': 8747,\n    'there4': 8756,\n    'sim': 8764,\n    'cong': 8773,\n    'asymp': 8776,\n    'ne': 8800,\n    'equiv': 8801,\n    'le': 8804,\n    'ge': 8805,\n    'sub': 8834,\n    'sup': 8835,\n    'nsub': 8836,\n    'sube': 8838,\n    'supe': 8839,\n    'oplus': 8853,\n    'otimes': 8855,\n    'perp': 8869,\n    'sdot': 8901,\n    'lceil': 8968,\n    'rceil': 8969,\n    'lfloor': 8970,\n    'rfloor': 8971,\n    'lang': 9001,\n    'rang': 9002,\n    'loz': 9674,\n    'spades': 9824,\n    'clubs': 9827,\n    'hearts': 9829,\n    'diams': 9830\n  }\n\n  Object.keys(sax.ENTITIES).forEach(function (key) {\n    var e = sax.ENTITIES[key]\n    var s = typeof e === 'number' ? String.fromCharCode(e) : e\n    sax.ENTITIES[key] = s\n  })\n\n  for (var s in sax.STATE) {\n    sax.STATE[sax.STATE[s]] = s\n  }\n\n  // shorthand\n  S = sax.STATE\n\n  function emit (parser, event, data) {\n    parser[event] && parser[event](data)\n  }\n\n  function emitNode (parser, nodeType, data) {\n    if (parser.textNode) closeText(parser)\n    emit(parser, nodeType, data)\n  }\n\n  function closeText (parser) {\n    parser.textNode = textopts(parser.opt, parser.textNode)\n    if (parser.textNode) emit(parser, 'ontext', parser.textNode)\n    parser.textNode = ''\n  }\n\n  function textopts (opt, text) {\n    if (opt.trim) text = text.trim()\n    if (opt.normalize) text = text.replace(/\\s+/g, ' ')\n    return text\n  }\n\n  function error (parser, er) {\n    closeText(parser)\n    if (parser.trackPosition) {\n      er += '\\nLine: ' + parser.line +\n        '\\nColumn: ' + parser.column +\n        '\\nChar: ' + parser.c\n    }\n    er = new Error(er)\n    parser.error = er\n    emit(parser, 'onerror', er)\n    return parser\n  }\n\n  function end (parser) {\n    if (parser.sawRoot && !parser.closedRoot) strictFail(parser, 'Unclosed root tag')\n    if ((parser.state !== S.BEGIN) &&\n      (parser.state !== S.BEGIN_WHITESPACE) &&\n      (parser.state !== S.TEXT)) {\n      error(parser, 'Unexpected end')\n    }\n    closeText(parser)\n    parser.c = ''\n    parser.closed = true\n    emit(parser, 'onend')\n    SAXParser.call(parser, parser.strict, parser.opt)\n    return parser\n  }\n\n  function strictFail (parser, message) {\n    if (typeof parser !== 'object' || !(parser instanceof SAXParser)) {\n      throw new Error('bad call to strictFail')\n    }\n    if (parser.strict) {\n      error(parser, message)\n    }\n  }\n\n  function newTag (parser) {\n    if (!parser.strict) parser.tagName = parser.tagName[parser.looseCase]()\n    var parent = parser.tags[parser.tags.length - 1] || parser\n    var tag = parser.tag = { name: parser.tagName, attributes: {} }\n\n    // will be overridden if tag contails an xmlns=\"foo\" or xmlns:foo=\"bar\"\n    if (parser.opt.xmlns) {\n      tag.ns = parent.ns\n    }\n    parser.attribList.length = 0\n  }\n\n  function qname (name, attribute) {\n    var i = name.indexOf(':')\n    var qualName = i < 0 ? [ '', name ] : name.split(':')\n    var prefix = qualName[0]\n    var local = qualName[1]\n\n    // <x \"xmlns\"=\"http://foo\">\n    if (attribute && name === 'xmlns') {\n      prefix = 'xmlns'\n      local = ''\n    }\n\n    return { prefix: prefix, local: local }\n  }\n\n  function attrib (parser) {\n    if (!parser.strict) {\n      parser.attribName = parser.attribName[parser.looseCase]()\n    }\n\n    if (parser.attribList.indexOf(parser.attribName) !== -1 ||\n      parser.tag.attributes.hasOwnProperty(parser.attribName)) {\n      parser.attribName = parser.attribValue = ''\n      return\n    }\n\n    if (parser.opt.xmlns) {\n      var qn = qname(parser.attribName, true)\n      var prefix = qn.prefix\n      var local = qn.local\n\n      if (prefix === 'xmlns') {\n        // namespace binding attribute. push the binding into scope\n        if (local === 'xml' && parser.attribValue !== XML_NAMESPACE) {\n          strictFail(parser,\n            'xml: prefix must be bound to ' + XML_NAMESPACE + '\\n' +\n            'Actual: ' + parser.attribValue)\n        } else if (local === 'xmlns' && parser.attribValue !== XMLNS_NAMESPACE) {\n          strictFail(parser,\n            'xmlns: prefix must be bound to ' + XMLNS_NAMESPACE + '\\n' +\n            'Actual: ' + parser.attribValue)\n        } else {\n          var tag = parser.tag\n          var parent = parser.tags[parser.tags.length - 1] || parser\n          if (tag.ns === parent.ns) {\n            tag.ns = Object.create(parent.ns)\n          }\n          tag.ns[local] = parser.attribValue\n        }\n      }\n\n      // defer onattribute events until all attributes have been seen\n      // so any new bindings can take effect. preserve attribute order\n      // so deferred events can be emitted in document order\n      parser.attribList.push([parser.attribName, parser.attribValue])\n    } else {\n      // in non-xmlns mode, we can emit the event right away\n      parser.tag.attributes[parser.attribName] = parser.attribValue\n      emitNode(parser, 'onattribute', {\n        name: parser.attribName,\n        value: parser.attribValue\n      })\n    }\n\n    parser.attribName = parser.attribValue = ''\n  }\n\n  function openTag (parser, selfClosing) {\n    if (parser.opt.xmlns) {\n      // emit namespace binding events\n      var tag = parser.tag\n\n      // add namespace info to tag\n      var qn = qname(parser.tagName)\n      tag.prefix = qn.prefix\n      tag.local = qn.local\n      tag.uri = tag.ns[qn.prefix] || ''\n\n      if (tag.prefix && !tag.uri) {\n        strictFail(parser, 'Unbound namespace prefix: ' +\n          JSON.stringify(parser.tagName))\n        tag.uri = qn.prefix\n      }\n\n      var parent = parser.tags[parser.tags.length - 1] || parser\n      if (tag.ns && parent.ns !== tag.ns) {\n        Object.keys(tag.ns).forEach(function (p) {\n          emitNode(parser, 'onopennamespace', {\n            prefix: p,\n            uri: tag.ns[p]\n          })\n        })\n      }\n\n      // handle deferred onattribute events\n      // Note: do not apply default ns to attributes:\n      //   http://www.w3.org/TR/REC-xml-names/#defaulting\n      for (var i = 0, l = parser.attribList.length; i < l; i++) {\n        var nv = parser.attribList[i]\n        var name = nv[0]\n        var value = nv[1]\n        var qualName = qname(name, true)\n        var prefix = qualName.prefix\n        var local = qualName.local\n        var uri = prefix === '' ? '' : (tag.ns[prefix] || '')\n        var a = {\n          name: name,\n          value: value,\n          prefix: prefix,\n          local: local,\n          uri: uri\n        }\n\n        // if there's any attributes with an undefined namespace,\n        // then fail on them now.\n        if (prefix && prefix !== 'xmlns' && !uri) {\n          strictFail(parser, 'Unbound namespace prefix: ' +\n            JSON.stringify(prefix))\n          a.uri = prefix\n        }\n        parser.tag.attributes[name] = a\n        emitNode(parser, 'onattribute', a)\n      }\n      parser.attribList.length = 0\n    }\n\n    parser.tag.isSelfClosing = !!selfClosing\n\n    // process the tag\n    parser.sawRoot = true\n    parser.tags.push(parser.tag)\n    emitNode(parser, 'onopentag', parser.tag)\n    if (!selfClosing) {\n      // special case for <script> in non-strict mode.\n      if (!parser.noscript && parser.tagName.toLowerCase() === 'script') {\n        parser.state = S.SCRIPT\n      } else {\n        parser.state = S.TEXT\n      }\n      parser.tag = null\n      parser.tagName = ''\n    }\n    parser.attribName = parser.attribValue = ''\n    parser.attribList.length = 0\n  }\n\n  function closeTag (parser) {\n    if (!parser.tagName) {\n      strictFail(parser, 'Weird empty close tag.')\n      parser.textNode += '</>'\n      parser.state = S.TEXT\n      return\n    }\n\n    if (parser.script) {\n      if (parser.tagName !== 'script') {\n        parser.script += '</' + parser.tagName + '>'\n        parser.tagName = ''\n        parser.state = S.SCRIPT\n        return\n      }\n      emitNode(parser, 'onscript', parser.script)\n      parser.script = ''\n    }\n\n    // first make sure that the closing tag actually exists.\n    // <a><b></c></b></a> will close everything, otherwise.\n    var t = parser.tags.length\n    var tagName = parser.tagName\n    if (!parser.strict) {\n      tagName = tagName[parser.looseCase]()\n    }\n    var closeTo = tagName\n    while (t--) {\n      var close = parser.tags[t]\n      if (close.name !== closeTo) {\n        // fail the first time in strict mode\n        strictFail(parser, 'Unexpected close tag')\n      } else {\n        break\n      }\n    }\n\n    // didn't find it.  we already failed for strict, so just abort.\n    if (t < 0) {\n      strictFail(parser, 'Unmatched closing tag: ' + parser.tagName)\n      parser.textNode += '</' + parser.tagName + '>'\n      parser.state = S.TEXT\n      return\n    }\n    parser.tagName = tagName\n    var s = parser.tags.length\n    while (s-- > t) {\n      var tag = parser.tag = parser.tags.pop()\n      parser.tagName = parser.tag.name\n      emitNode(parser, 'onclosetag', parser.tagName)\n\n      var x = {}\n      for (var i in tag.ns) {\n        x[i] = tag.ns[i]\n      }\n\n      var parent = parser.tags[parser.tags.length - 1] || parser\n      if (parser.opt.xmlns && tag.ns !== parent.ns) {\n        // remove namespace bindings introduced by tag\n        Object.keys(tag.ns).forEach(function (p) {\n          var n = tag.ns[p]\n          emitNode(parser, 'onclosenamespace', { prefix: p, uri: n })\n        })\n      }\n    }\n    if (t === 0) parser.closedRoot = true\n    parser.tagName = parser.attribValue = parser.attribName = ''\n    parser.attribList.length = 0\n    parser.state = S.TEXT\n  }\n\n  function parseEntity (parser) {\n    var entity = parser.entity\n    var entityLC = entity.toLowerCase()\n    var num\n    var numStr = ''\n\n    if (parser.ENTITIES[entity]) {\n      return parser.ENTITIES[entity]\n    }\n    if (parser.ENTITIES[entityLC]) {\n      return parser.ENTITIES[entityLC]\n    }\n    entity = entityLC\n    if (entity.charAt(0) === '#') {\n      if (entity.charAt(1) === 'x') {\n        entity = entity.slice(2)\n        num = parseInt(entity, 16)\n        numStr = num.toString(16)\n      } else {\n        entity = entity.slice(1)\n        num = parseInt(entity, 10)\n        numStr = num.toString(10)\n      }\n    }\n    entity = entity.replace(/^0+/, '')\n    if (numStr.toLowerCase() !== entity) {\n      strictFail(parser, 'Invalid character entity')\n      return '&' + parser.entity + ';'\n    }\n\n    return String.fromCodePoint(num)\n  }\n\n  function beginWhiteSpace (parser, c) {\n    if (c === '<') {\n      parser.state = S.OPEN_WAKA\n      parser.startTagPosition = parser.position\n    } else if (not(whitespace, c)) {\n      // have to process this as a text node.\n      // weird, but happens.\n      strictFail(parser, 'Non-whitespace before first tag.')\n      parser.textNode = c\n      parser.state = S.TEXT\n    }\n  }\n\n  function write (chunk) {\n    var parser = this\n    if (this.error) {\n      throw this.error\n    }\n    if (parser.closed) {\n      return error(parser,\n        'Cannot write after close. Assign an onready handler.')\n    }\n    if (chunk === null) {\n      return end(parser)\n    }\n    var i = 0\n    var c = ''\n    while (true) {\n      c = chunk.charAt(i++)\n      parser.c = c\n      if (!c) {\n        break\n      }\n      if (parser.trackPosition) {\n        parser.position++\n        if (c === '\\n') {\n          parser.line++\n          parser.column = 0\n        } else {\n          parser.column++\n        }\n      }\n      switch (parser.state) {\n        case S.BEGIN:\n          parser.state = S.BEGIN_WHITESPACE\n          if (c === '\\uFEFF') {\n            continue\n          }\n          beginWhiteSpace(parser, c)\n          continue\n\n        case S.BEGIN_WHITESPACE:\n          beginWhiteSpace(parser, c)\n          continue\n\n        case S.TEXT:\n          if (parser.sawRoot && !parser.closedRoot) {\n            var starti = i - 1\n            while (c && c !== '<' && c !== '&') {\n              c = chunk.charAt(i++)\n              if (c && parser.trackPosition) {\n                parser.position++\n                if (c === '\\n') {\n                  parser.line++\n                  parser.column = 0\n                } else {\n                  parser.column++\n                }\n              }\n            }\n            parser.textNode += chunk.substring(starti, i - 1)\n          }\n          if (c === '<' && !(parser.sawRoot && parser.closedRoot && !parser.strict)) {\n            parser.state = S.OPEN_WAKA\n            parser.startTagPosition = parser.position\n          } else {\n            if (not(whitespace, c) && (!parser.sawRoot || parser.closedRoot)) {\n              strictFail(parser, 'Text data outside of root node.')\n            }\n            if (c === '&') {\n              parser.state = S.TEXT_ENTITY\n            } else {\n              parser.textNode += c\n            }\n          }\n          continue\n\n        case S.SCRIPT:\n          // only non-strict\n          if (c === '<') {\n            parser.state = S.SCRIPT_ENDING\n          } else {\n            parser.script += c\n          }\n          continue\n\n        case S.SCRIPT_ENDING:\n          if (c === '/') {\n            parser.state = S.CLOSE_TAG\n          } else {\n            parser.script += '<' + c\n            parser.state = S.SCRIPT\n          }\n          continue\n\n        case S.OPEN_WAKA:\n          // either a /, ?, !, or text is coming next.\n          if (c === '!') {\n            parser.state = S.SGML_DECL\n            parser.sgmlDecl = ''\n          } else if (is(whitespace, c)) {\n            // wait for it...\n          } else if (is(nameStart, c)) {\n            parser.state = S.OPEN_TAG\n            parser.tagName = c\n          } else if (c === '/') {\n            parser.state = S.CLOSE_TAG\n            parser.tagName = ''\n          } else if (c === '?') {\n            parser.state = S.PROC_INST\n            parser.procInstName = parser.procInstBody = ''\n          } else {\n            strictFail(parser, 'Unencoded <')\n            // if there was some whitespace, then add that in.\n            if (parser.startTagPosition + 1 < parser.position) {\n              var pad = parser.position - parser.startTagPosition\n              c = new Array(pad).join(' ') + c\n            }\n            parser.textNode += '<' + c\n            parser.state = S.TEXT\n          }\n          continue\n\n        case S.SGML_DECL:\n          if ((parser.sgmlDecl + c).toUpperCase() === CDATA) {\n            emitNode(parser, 'onopencdata')\n            parser.state = S.CDATA\n            parser.sgmlDecl = ''\n            parser.cdata = ''\n          } else if (parser.sgmlDecl + c === '--') {\n            parser.state = S.COMMENT\n            parser.comment = ''\n            parser.sgmlDecl = ''\n          } else if ((parser.sgmlDecl + c).toUpperCase() === DOCTYPE) {\n            parser.state = S.DOCTYPE\n            if (parser.doctype || parser.sawRoot) {\n              strictFail(parser,\n                'Inappropriately located doctype declaration')\n            }\n            parser.doctype = ''\n            parser.sgmlDecl = ''\n          } else if (c === '>') {\n            emitNode(parser, 'onsgmldeclaration', parser.sgmlDecl)\n            parser.sgmlDecl = ''\n            parser.state = S.TEXT\n          } else if (is(quote, c)) {\n            parser.state = S.SGML_DECL_QUOTED\n            parser.sgmlDecl += c\n          } else {\n            parser.sgmlDecl += c\n          }\n          continue\n\n        case S.SGML_DECL_QUOTED:\n          if (c === parser.q) {\n            parser.state = S.SGML_DECL\n            parser.q = ''\n          }\n          parser.sgmlDecl += c\n          continue\n\n        case S.DOCTYPE:\n          if (c === '>') {\n            parser.state = S.TEXT\n            emitNode(parser, 'ondoctype', parser.doctype)\n            parser.doctype = true // just remember that we saw it.\n          } else {\n            parser.doctype += c\n            if (c === '[') {\n              parser.state = S.DOCTYPE_DTD\n            } else if (is(quote, c)) {\n              parser.state = S.DOCTYPE_QUOTED\n              parser.q = c\n            }\n          }\n          continue\n\n        case S.DOCTYPE_QUOTED:\n          parser.doctype += c\n          if (c === parser.q) {\n            parser.q = ''\n            parser.state = S.DOCTYPE\n          }\n          continue\n\n        case S.DOCTYPE_DTD:\n          parser.doctype += c\n          if (c === ']') {\n            parser.state = S.DOCTYPE\n          } else if (is(quote, c)) {\n            parser.state = S.DOCTYPE_DTD_QUOTED\n            parser.q = c\n          }\n          continue\n\n        case S.DOCTYPE_DTD_QUOTED:\n          parser.doctype += c\n          if (c === parser.q) {\n            parser.state = S.DOCTYPE_DTD\n            parser.q = ''\n          }\n          continue\n\n        case S.COMMENT:\n          if (c === '-') {\n            parser.state = S.COMMENT_ENDING\n          } else {\n            parser.comment += c\n          }\n          continue\n\n        case S.COMMENT_ENDING:\n          if (c === '-') {\n            parser.state = S.COMMENT_ENDED\n            parser.comment = textopts(parser.opt, parser.comment)\n            if (parser.comment) {\n              emitNode(parser, 'oncomment', parser.comment)\n            }\n            parser.comment = ''\n          } else {\n            parser.comment += '-' + c\n            parser.state = S.COMMENT\n          }\n          continue\n\n        case S.COMMENT_ENDED:\n          if (c !== '>') {\n            strictFail(parser, 'Malformed comment')\n            // allow <!-- blah -- bloo --> in non-strict mode,\n            // which is a comment of \" blah -- bloo \"\n            parser.comment += '--' + c\n            parser.state = S.COMMENT\n          } else {\n            parser.state = S.TEXT\n          }\n          continue\n\n        case S.CDATA:\n          if (c === ']') {\n            parser.state = S.CDATA_ENDING\n          } else {\n            parser.cdata += c\n          }\n          continue\n\n        case S.CDATA_ENDING:\n          if (c === ']') {\n            parser.state = S.CDATA_ENDING_2\n          } else {\n            parser.cdata += ']' + c\n            parser.state = S.CDATA\n          }\n          continue\n\n        case S.CDATA_ENDING_2:\n          if (c === '>') {\n            if (parser.cdata) {\n              emitNode(parser, 'oncdata', parser.cdata)\n            }\n            emitNode(parser, 'onclosecdata')\n            parser.cdata = ''\n            parser.state = S.TEXT\n          } else if (c === ']') {\n            parser.cdata += ']'\n          } else {\n            parser.cdata += ']]' + c\n            parser.state = S.CDATA\n          }\n          continue\n\n        case S.PROC_INST:\n          if (c === '?') {\n            parser.state = S.PROC_INST_ENDING\n          } else if (is(whitespace, c)) {\n            parser.state = S.PROC_INST_BODY\n          } else {\n            parser.procInstName += c\n          }\n          continue\n\n        case S.PROC_INST_BODY:\n          if (!parser.procInstBody && is(whitespace, c)) {\n            continue\n          } else if (c === '?') {\n            parser.state = S.PROC_INST_ENDING\n          } else {\n            parser.procInstBody += c\n          }\n          continue\n\n        case S.PROC_INST_ENDING:\n          if (c === '>') {\n            emitNode(parser, 'onprocessinginstruction', {\n              name: parser.procInstName,\n              body: parser.procInstBody\n            })\n            parser.procInstName = parser.procInstBody = ''\n            parser.state = S.TEXT\n          } else {\n            parser.procInstBody += '?' + c\n            parser.state = S.PROC_INST_BODY\n          }\n          continue\n\n        case S.OPEN_TAG:\n          if (is(nameBody, c)) {\n            parser.tagName += c\n          } else {\n            newTag(parser)\n            if (c === '>') {\n              openTag(parser)\n            } else if (c === '/') {\n              parser.state = S.OPEN_TAG_SLASH\n            } else {\n              if (not(whitespace, c)) {\n                strictFail(parser, 'Invalid character in tag name')\n              }\n              parser.state = S.ATTRIB\n            }\n          }\n          continue\n\n        case S.OPEN_TAG_SLASH:\n          if (c === '>') {\n            openTag(parser, true)\n            closeTag(parser)\n          } else {\n            strictFail(parser, 'Forward-slash in opening tag not followed by >')\n            parser.state = S.ATTRIB\n          }\n          continue\n\n        case S.ATTRIB:\n          // haven't read the attribute name yet.\n          if (is(whitespace, c)) {\n            continue\n          } else if (c === '>') {\n            openTag(parser)\n          } else if (c === '/') {\n            parser.state = S.OPEN_TAG_SLASH\n          } else if (is(nameStart, c)) {\n            parser.attribName = c\n            parser.attribValue = ''\n            parser.state = S.ATTRIB_NAME\n          } else {\n            strictFail(parser, 'Invalid attribute name')\n          }\n          continue\n\n        case S.ATTRIB_NAME:\n          if (c === '=') {\n            parser.state = S.ATTRIB_VALUE\n          } else if (c === '>') {\n            strictFail(parser, 'Attribute without value')\n            parser.attribValue = parser.attribName\n            attrib(parser)\n            openTag(parser)\n          } else if (is(whitespace, c)) {\n            parser.state = S.ATTRIB_NAME_SAW_WHITE\n          } else if (is(nameBody, c)) {\n            parser.attribName += c\n          } else {\n            strictFail(parser, 'Invalid attribute name')\n          }\n          continue\n\n        case S.ATTRIB_NAME_SAW_WHITE:\n          if (c === '=') {\n            parser.state = S.ATTRIB_VALUE\n          } else if (is(whitespace, c)) {\n            continue\n          } else {\n            strictFail(parser, 'Attribute without value')\n            parser.tag.attributes[parser.attribName] = ''\n            parser.attribValue = ''\n            emitNode(parser, 'onattribute', {\n              name: parser.attribName,\n              value: ''\n            })\n            parser.attribName = ''\n            if (c === '>') {\n              openTag(parser)\n            } else if (is(nameStart, c)) {\n              parser.attribName = c\n              parser.state = S.ATTRIB_NAME\n            } else {\n              strictFail(parser, 'Invalid attribute name')\n              parser.state = S.ATTRIB\n            }\n          }\n          continue\n\n        case S.ATTRIB_VALUE:\n          if (is(whitespace, c)) {\n            continue\n          } else if (is(quote, c)) {\n            parser.q = c\n            parser.state = S.ATTRIB_VALUE_QUOTED\n          } else {\n            strictFail(parser, 'Unquoted attribute value')\n            parser.state = S.ATTRIB_VALUE_UNQUOTED\n            parser.attribValue = c\n          }\n          continue\n\n        case S.ATTRIB_VALUE_QUOTED:\n          if (c !== parser.q) {\n            if (c === '&') {\n              parser.state = S.ATTRIB_VALUE_ENTITY_Q\n            } else {\n              parser.attribValue += c\n            }\n            continue\n          }\n          attrib(parser)\n          parser.q = ''\n          parser.state = S.ATTRIB_VALUE_CLOSED\n          continue\n\n        case S.ATTRIB_VALUE_CLOSED:\n          if (is(whitespace, c)) {\n            parser.state = S.ATTRIB\n          } else if (c === '>') {\n            openTag(parser)\n          } else if (c === '/') {\n            parser.state = S.OPEN_TAG_SLASH\n          } else if (is(nameStart, c)) {\n            strictFail(parser, 'No whitespace between attributes')\n            parser.attribName = c\n            parser.attribValue = ''\n            parser.state = S.ATTRIB_NAME\n          } else {\n            strictFail(parser, 'Invalid attribute name')\n          }\n          continue\n\n        case S.ATTRIB_VALUE_UNQUOTED:\n          if (not(attribEnd, c)) {\n            if (c === '&') {\n              parser.state = S.ATTRIB_VALUE_ENTITY_U\n            } else {\n              parser.attribValue += c\n            }\n            continue\n          }\n          attrib(parser)\n          if (c === '>') {\n            openTag(parser)\n          } else {\n            parser.state = S.ATTRIB\n          }\n          continue\n\n        case S.CLOSE_TAG:\n          if (!parser.tagName) {\n            if (is(whitespace, c)) {\n              continue\n            } else if (not(nameStart, c)) {\n              if (parser.script) {\n                parser.script += '</' + c\n                parser.state = S.SCRIPT\n              } else {\n                strictFail(parser, 'Invalid tagname in closing tag.')\n              }\n            } else {\n              parser.tagName = c\n            }\n          } else if (c === '>') {\n            closeTag(parser)\n          } else if (is(nameBody, c)) {\n            parser.tagName += c\n          } else if (parser.script) {\n            parser.script += '</' + parser.tagName\n            parser.tagName = ''\n            parser.state = S.SCRIPT\n          } else {\n            if (not(whitespace, c)) {\n              strictFail(parser, 'Invalid tagname in closing tag')\n            }\n            parser.state = S.CLOSE_TAG_SAW_WHITE\n          }\n          continue\n\n        case S.CLOSE_TAG_SAW_WHITE:\n          if (is(whitespace, c)) {\n            continue\n          }\n          if (c === '>') {\n            closeTag(parser)\n          } else {\n            strictFail(parser, 'Invalid characters in closing tag')\n          }\n          continue\n\n        case S.TEXT_ENTITY:\n        case S.ATTRIB_VALUE_ENTITY_Q:\n        case S.ATTRIB_VALUE_ENTITY_U:\n          var returnState\n          var buffer\n          switch (parser.state) {\n            case S.TEXT_ENTITY:\n              returnState = S.TEXT\n              buffer = 'textNode'\n              break\n\n            case S.ATTRIB_VALUE_ENTITY_Q:\n              returnState = S.ATTRIB_VALUE_QUOTED\n              buffer = 'attribValue'\n              break\n\n            case S.ATTRIB_VALUE_ENTITY_U:\n              returnState = S.ATTRIB_VALUE_UNQUOTED\n              buffer = 'attribValue'\n              break\n          }\n\n          if (c === ';') {\n            parser[buffer] += parseEntity(parser)\n            parser.entity = ''\n            parser.state = returnState\n          } else if (is(parser.entity.length ? entityBody : entityStart, c)) {\n            parser.entity += c\n          } else {\n            strictFail(parser, 'Invalid character in entity name')\n            parser[buffer] += '&' + parser.entity + c\n            parser.entity = ''\n            parser.state = returnState\n          }\n\n          continue\n\n        default:\n          throw new Error(parser, 'Unknown state: ' + parser.state)\n      }\n    } // while\n\n    if (parser.position >= parser.bufferCheckPosition) {\n      checkBufferLength(parser)\n    }\n    return parser\n  }\n\n  /*! http://mths.be/fromcodepoint v0.1.0 by @mathias */\n  if (!String.fromCodePoint) {\n    (function () {\n      var stringFromCharCode = String.fromCharCode\n      var floor = Math.floor\n      var fromCodePoint = function () {\n        var MAX_SIZE = 0x4000\n        var codeUnits = []\n        var highSurrogate\n        var lowSurrogate\n        var index = -1\n        var length = arguments.length\n        if (!length) {\n          return ''\n        }\n        var result = ''\n        while (++index < length) {\n          var codePoint = Number(arguments[index])\n          if (\n            !isFinite(codePoint) || // `NaN`, `+Infinity`, or `-Infinity`\n            codePoint < 0 || // not a valid Unicode code point\n            codePoint > 0x10FFFF || // not a valid Unicode code point\n            floor(codePoint) !== codePoint // not an integer\n          ) {\n            throw RangeError('Invalid code point: ' + codePoint)\n          }\n          if (codePoint <= 0xFFFF) { // BMP code point\n            codeUnits.push(codePoint)\n          } else { // Astral code point; split in surrogate halves\n            // http://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae\n            codePoint -= 0x10000\n            highSurrogate = (codePoint >> 10) + 0xD800\n            lowSurrogate = (codePoint % 0x400) + 0xDC00\n            codeUnits.push(highSurrogate, lowSurrogate)\n          }\n          if (index + 1 === length || codeUnits.length > MAX_SIZE) {\n            result += stringFromCharCode.apply(null, codeUnits)\n            codeUnits.length = 0\n          }\n        }\n        return result\n      }\n      if (Object.defineProperty) {\n        Object.defineProperty(String, 'fromCodePoint', {\n          value: fromCodePoint,\n          configurable: true,\n          writable: true\n        })\n      } else {\n        String.fromCodePoint = fromCodePoint\n      }\n    }())\n  }\n})(typeof exports === 'undefined' ? this.sax = {} : exports)\n\n}).call(this,require(\"buffer\").Buffer)\n},{\"buffer\":73,\"stream\":97,\"string_decoder\":98}],154:[function(require,module,exports){\n//     Underscore.js 1.6.0\n//     http://underscorejs.org\n//     (c) 2009-2014 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n//     Underscore may be freely distributed under the MIT license.\n\n(function() {\n\n  // Baseline setup\n  // --------------\n\n  // Establish the root object, `window` in the browser, or `exports` on the server.\n  var root = this;\n\n  // Save the previous value of the `_` variable.\n  var previousUnderscore = root._;\n\n  // Establish the object that gets returned to break out of a loop iteration.\n  var breaker = {};\n\n  // Save bytes in the minified (but not gzipped) version:\n  var ArrayProto = Array.prototype, ObjProto = Object.prototype, FuncProto = Function.prototype;\n\n  // Create quick reference variables for speed access to core prototypes.\n  var\n    push             = ArrayProto.push,\n    slice            = ArrayProto.slice,\n    concat           = ArrayProto.concat,\n    toString         = ObjProto.toString,\n    hasOwnProperty   = ObjProto.hasOwnProperty;\n\n  // All **ECMAScript 5** native function implementations that we hope to use\n  // are declared here.\n  var\n    nativeForEach      = ArrayProto.forEach,\n    nativeMap          = ArrayProto.map,\n    nativeReduce       = ArrayProto.reduce,\n    nativeReduceRight  = ArrayProto.reduceRight,\n    nativeFilter       = ArrayProto.filter,\n    nativeEvery        = ArrayProto.every,\n    nativeSome         = ArrayProto.some,\n    nativeIndexOf      = ArrayProto.indexOf,\n    nativeLastIndexOf  = ArrayProto.lastIndexOf,\n    nativeIsArray      = Array.isArray,\n    nativeKeys         = Object.keys,\n    nativeBind         = FuncProto.bind;\n\n  // Create a safe reference to the Underscore object for use below.\n  var _ = function(obj) {\n    if (obj instanceof _) return obj;\n    if (!(this instanceof _)) return new _(obj);\n    this._wrapped = obj;\n  };\n\n  // Export the Underscore object for **Node.js**, with\n  // backwards-compatibility for the old `require()` API. If we're in\n  // the browser, add `_` as a global object via a string identifier,\n  // for Closure Compiler \"advanced\" mode.\n  if (typeof exports !== 'undefined') {\n    if (typeof module !== 'undefined' && module.exports) {\n      exports = module.exports = _;\n    }\n    exports._ = _;\n  } else {\n    root._ = _;\n  }\n\n  // Current version.\n  _.VERSION = '1.6.0';\n\n  // Collection Functions\n  // --------------------\n\n  // The cornerstone, an `each` implementation, aka `forEach`.\n  // Handles objects with the built-in `forEach`, arrays, and raw objects.\n  // Delegates to **ECMAScript 5**'s native `forEach` if available.\n  var each = _.each = _.forEach = function(obj, iterator, context) {\n    if (obj == null) return obj;\n    if (nativeForEach && obj.forEach === nativeForEach) {\n      obj.forEach(iterator, context);\n    } else if (obj.length === +obj.length) {\n      for (var i = 0, length = obj.length; i < length; i++) {\n        if (iterator.call(context, obj[i], i, obj) === breaker) return;\n      }\n    } else {\n      var keys = _.keys(obj);\n      for (var i = 0, length = keys.length; i < length; i++) {\n        if (iterator.call(context, obj[keys[i]], keys[i], obj) === breaker) return;\n      }\n    }\n    return obj;\n  };\n\n  // Return the results of applying the iterator to each element.\n  // Delegates to **ECMAScript 5**'s native `map` if available.\n  _.map = _.collect = function(obj, iterator, context) {\n    var results = [];\n    if (obj == null) return results;\n    if (nativeMap && obj.map === nativeMap) return obj.map(iterator, context);\n    each(obj, function(value, index, list) {\n      results.push(iterator.call(context, value, index, list));\n    });\n    return results;\n  };\n\n  var reduceError = 'Reduce of empty array with no initial value';\n\n  // **Reduce** builds up a single result from a list of values, aka `inject`,\n  // or `foldl`. Delegates to **ECMAScript 5**'s native `reduce` if available.\n  _.reduce = _.foldl = _.inject = function(obj, iterator, memo, context) {\n    var initial = arguments.length > 2;\n    if (obj == null) obj = [];\n    if (nativeReduce && obj.reduce === nativeReduce) {\n      if (context) iterator = _.bind(iterator, context);\n      return initial ? obj.reduce(iterator, memo) : obj.reduce(iterator);\n    }\n    each(obj, function(value, index, list) {\n      if (!initial) {\n        memo = value;\n        initial = true;\n      } else {\n        memo = iterator.call(context, memo, value, index, list);\n      }\n    });\n    if (!initial) throw new TypeError(reduceError);\n    return memo;\n  };\n\n  // The right-associative version of reduce, also known as `foldr`.\n  // Delegates to **ECMAScript 5**'s native `reduceRight` if available.\n  _.reduceRight = _.foldr = function(obj, iterator, memo, context) {\n    var initial = arguments.length > 2;\n    if (obj == null) obj = [];\n    if (nativeReduceRight && obj.reduceRight === nativeReduceRight) {\n      if (context) iterator = _.bind(iterator, context);\n      return initial ? obj.reduceRight(iterator, memo) : obj.reduceRight(iterator);\n    }\n    var length = obj.length;\n    if (length !== +length) {\n      var keys = _.keys(obj);\n      length = keys.length;\n    }\n    each(obj, function(value, index, list) {\n      index = keys ? keys[--length] : --length;\n      if (!initial) {\n        memo = obj[index];\n        initial = true;\n      } else {\n        memo = iterator.call(context, memo, obj[index], index, list);\n      }\n    });\n    if (!initial) throw new TypeError(reduceError);\n    return memo;\n  };\n\n  // Return the first value which passes a truth test. Aliased as `detect`.\n  _.find = _.detect = function(obj, predicate, context) {\n    var result;\n    any(obj, function(value, index, list) {\n      if (predicate.call(context, value, index, list)) {\n        result = value;\n        return true;\n      }\n    });\n    return result;\n  };\n\n  // Return all the elements that pass a truth test.\n  // Delegates to **ECMAScript 5**'s native `filter` if available.\n  // Aliased as `select`.\n  _.filter = _.select = function(obj, predicate, context) {\n    var results = [];\n    if (obj == null) return results;\n    if (nativeFilter && obj.filter === nativeFilter) return obj.filter(predicate, context);\n    each(obj, function(value, index, list) {\n      if (predicate.call(context, value, index, list)) results.push(value);\n    });\n    return results;\n  };\n\n  // Return all the elements for which a truth test fails.\n  _.reject = function(obj, predicate, context) {\n    return _.filter(obj, function(value, index, list) {\n      return !predicate.call(context, value, index, list);\n    }, context);\n  };\n\n  // Determine whether all of the elements match a truth test.\n  // Delegates to **ECMAScript 5**'s native `every` if available.\n  // Aliased as `all`.\n  _.every = _.all = function(obj, predicate, context) {\n    predicate || (predicate = _.identity);\n    var result = true;\n    if (obj == null) return result;\n    if (nativeEvery && obj.every === nativeEvery) return obj.every(predicate, context);\n    each(obj, function(value, index, list) {\n      if (!(result = result && predicate.call(context, value, index, list))) return breaker;\n    });\n    return !!result;\n  };\n\n  // Determine if at least one element in the object matches a truth test.\n  // Delegates to **ECMAScript 5**'s native `some` if available.\n  // Aliased as `any`.\n  var any = _.some = _.any = function(obj, predicate, context) {\n    predicate || (predicate = _.identity);\n    var result = false;\n    if (obj == null) return result;\n    if (nativeSome && obj.some === nativeSome) return obj.some(predicate, context);\n    each(obj, function(value, index, list) {\n      if (result || (result = predicate.call(context, value, index, list))) return breaker;\n    });\n    return !!result;\n  };\n\n  // Determine if the array or object contains a given value (using `===`).\n  // Aliased as `include`.\n  _.contains = _.include = function(obj, target) {\n    if (obj == null) return false;\n    if (nativeIndexOf && obj.indexOf === nativeIndexOf) return obj.indexOf(target) != -1;\n    return any(obj, function(value) {\n      return value === target;\n    });\n  };\n\n  // Invoke a method (with arguments) on every item in a collection.\n  _.invoke = function(obj, method) {\n    var args = slice.call(arguments, 2);\n    var isFunc = _.isFunction(method);\n    return _.map(obj, function(value) {\n      return (isFunc ? method : value[method]).apply(value, args);\n    });\n  };\n\n  // Convenience version of a common use case of `map`: fetching a property.\n  _.pluck = function(obj, key) {\n    return _.map(obj, _.property(key));\n  };\n\n  // Convenience version of a common use case of `filter`: selecting only objects\n  // containing specific `key:value` pairs.\n  _.where = function(obj, attrs) {\n    return _.filter(obj, _.matches(attrs));\n  };\n\n  // Convenience version of a common use case of `find`: getting the first object\n  // containing specific `key:value` pairs.\n  _.findWhere = function(obj, attrs) {\n    return _.find(obj, _.matches(attrs));\n  };\n\n  // Return the maximum element or (element-based computation).\n  // Can't optimize arrays of integers longer than 65,535 elements.\n  // See [WebKit Bug 80797](https://bugs.webkit.org/show_bug.cgi?id=80797)\n  _.max = function(obj, iterator, context) {\n    if (!iterator && _.isArray(obj) && obj[0] === +obj[0] && obj.length < 65535) {\n      return Math.max.apply(Math, obj);\n    }\n    var result = -Infinity, lastComputed = -Infinity;\n    each(obj, function(value, index, list) {\n      var computed = iterator ? iterator.call(context, value, index, list) : value;\n      if (computed > lastComputed) {\n        result = value;\n        lastComputed = computed;\n      }\n    });\n    return result;\n  };\n\n  // Return the minimum element (or element-based computation).\n  _.min = function(obj, iterator, context) {\n    if (!iterator && _.isArray(obj) && obj[0] === +obj[0] && obj.length < 65535) {\n      return Math.min.apply(Math, obj);\n    }\n    var result = Infinity, lastComputed = Infinity;\n    each(obj, function(value, index, list) {\n      var computed = iterator ? iterator.call(context, value, index, list) : value;\n      if (computed < lastComputed) {\n        result = value;\n        lastComputed = computed;\n      }\n    });\n    return result;\n  };\n\n  // Shuffle an array, using the modern version of the\n  // [Fisher-Yates shuffle](http://en.wikipedia.org/wiki/Fisher–Yates_shuffle).\n  _.shuffle = function(obj) {\n    var rand;\n    var index = 0;\n    var shuffled = [];\n    each(obj, function(value) {\n      rand = _.random(index++);\n      shuffled[index - 1] = shuffled[rand];\n      shuffled[rand] = value;\n    });\n    return shuffled;\n  };\n\n  // Sample **n** random values from a collection.\n  // If **n** is not specified, returns a single random element.\n  // The internal `guard` argument allows it to work with `map`.\n  _.sample = function(obj, n, guard) {\n    if (n == null || guard) {\n      if (obj.length !== +obj.length) obj = _.values(obj);\n      return obj[_.random(obj.length - 1)];\n    }\n    return _.shuffle(obj).slice(0, Math.max(0, n));\n  };\n\n  // An internal function to generate lookup iterators.\n  var lookupIterator = function(value) {\n    if (value == null) return _.identity;\n    if (_.isFunction(value)) return value;\n    return _.property(value);\n  };\n\n  // Sort the object's values by a criterion produced by an iterator.\n  _.sortBy = function(obj, iterator, context) {\n    iterator = lookupIterator(iterator);\n    return _.pluck(_.map(obj, function(value, index, list) {\n      return {\n        value: value,\n        index: index,\n        criteria: iterator.call(context, value, index, list)\n      };\n    }).sort(function(left, right) {\n      var a = left.criteria;\n      var b = right.criteria;\n      if (a !== b) {\n        if (a > b || a === void 0) return 1;\n        if (a < b || b === void 0) return -1;\n      }\n      return left.index - right.index;\n    }), 'value');\n  };\n\n  // An internal function used for aggregate \"group by\" operations.\n  var group = function(behavior) {\n    return function(obj, iterator, context) {\n      var result = {};\n      iterator = lookupIterator(iterator);\n      each(obj, function(value, index) {\n        var key = iterator.call(context, value, index, obj);\n        behavior(result, key, value);\n      });\n      return result;\n    };\n  };\n\n  // Groups the object's values by a criterion. Pass either a string attribute\n  // to group by, or a function that returns the criterion.\n  _.groupBy = group(function(result, key, value) {\n    _.has(result, key) ? result[key].push(value) : result[key] = [value];\n  });\n\n  // Indexes the object's values by a criterion, similar to `groupBy`, but for\n  // when you know that your index values will be unique.\n  _.indexBy = group(function(result, key, value) {\n    result[key] = value;\n  });\n\n  // Counts instances of an object that group by a certain criterion. Pass\n  // either a string attribute to count by, or a function that returns the\n  // criterion.\n  _.countBy = group(function(result, key) {\n    _.has(result, key) ? result[key]++ : result[key] = 1;\n  });\n\n  // Use a comparator function to figure out the smallest index at which\n  // an object should be inserted so as to maintain order. Uses binary search.\n  _.sortedIndex = function(array, obj, iterator, context) {\n    iterator = lookupIterator(iterator);\n    var value = iterator.call(context, obj);\n    var low = 0, high = array.length;\n    while (low < high) {\n      var mid = (low + high) >>> 1;\n      iterator.call(context, array[mid]) < value ? low = mid + 1 : high = mid;\n    }\n    return low;\n  };\n\n  // Safely create a real, live array from anything iterable.\n  _.toArray = function(obj) {\n    if (!obj) return [];\n    if (_.isArray(obj)) return slice.call(obj);\n    if (obj.length === +obj.length) return _.map(obj, _.identity);\n    return _.values(obj);\n  };\n\n  // Return the number of elements in an object.\n  _.size = function(obj) {\n    if (obj == null) return 0;\n    return (obj.length === +obj.length) ? obj.length : _.keys(obj).length;\n  };\n\n  // Array Functions\n  // ---------------\n\n  // Get the first element of an array. Passing **n** will return the first N\n  // values in the array. Aliased as `head` and `take`. The **guard** check\n  // allows it to work with `_.map`.\n  _.first = _.head = _.take = function(array, n, guard) {\n    if (array == null) return void 0;\n    if ((n == null) || guard) return array[0];\n    if (n < 0) return [];\n    return slice.call(array, 0, n);\n  };\n\n  // Returns everything but the last entry of the array. Especially useful on\n  // the arguments object. Passing **n** will return all the values in\n  // the array, excluding the last N. The **guard** check allows it to work with\n  // `_.map`.\n  _.initial = function(array, n, guard) {\n    return slice.call(array, 0, array.length - ((n == null) || guard ? 1 : n));\n  };\n\n  // Get the last element of an array. Passing **n** will return the last N\n  // values in the array. The **guard** check allows it to work with `_.map`.\n  _.last = function(array, n, guard) {\n    if (array == null) return void 0;\n    if ((n == null) || guard) return array[array.length - 1];\n    return slice.call(array, Math.max(array.length - n, 0));\n  };\n\n  // Returns everything but the first entry of the array. Aliased as `tail` and `drop`.\n  // Especially useful on the arguments object. Passing an **n** will return\n  // the rest N values in the array. The **guard**\n  // check allows it to work with `_.map`.\n  _.rest = _.tail = _.drop = function(array, n, guard) {\n    return slice.call(array, (n == null) || guard ? 1 : n);\n  };\n\n  // Trim out all falsy values from an array.\n  _.compact = function(array) {\n    return _.filter(array, _.identity);\n  };\n\n  // Internal implementation of a recursive `flatten` function.\n  var flatten = function(input, shallow, output) {\n    if (shallow && _.every(input, _.isArray)) {\n      return concat.apply(output, input);\n    }\n    each(input, function(value) {\n      if (_.isArray(value) || _.isArguments(value)) {\n        shallow ? push.apply(output, value) : flatten(value, shallow, output);\n      } else {\n        output.push(value);\n      }\n    });\n    return output;\n  };\n\n  // Flatten out an array, either recursively (by default), or just one level.\n  _.flatten = function(array, shallow) {\n    return flatten(array, shallow, []);\n  };\n\n  // Return a version of the array that does not contain the specified value(s).\n  _.without = function(array) {\n    return _.difference(array, slice.call(arguments, 1));\n  };\n\n  // Split an array into two arrays: one whose elements all satisfy the given\n  // predicate, and one whose elements all do not satisfy the predicate.\n  _.partition = function(array, predicate) {\n    var pass = [], fail = [];\n    each(array, function(elem) {\n      (predicate(elem) ? pass : fail).push(elem);\n    });\n    return [pass, fail];\n  };\n\n  // Produce a duplicate-free version of the array. If the array has already\n  // been sorted, you have the option of using a faster algorithm.\n  // Aliased as `unique`.\n  _.uniq = _.unique = function(array, isSorted, iterator, context) {\n    if (_.isFunction(isSorted)) {\n      context = iterator;\n      iterator = isSorted;\n      isSorted = false;\n    }\n    var initial = iterator ? _.map(array, iterator, context) : array;\n    var results = [];\n    var seen = [];\n    each(initial, function(value, index) {\n      if (isSorted ? (!index || seen[seen.length - 1] !== value) : !_.contains(seen, value)) {\n        seen.push(value);\n        results.push(array[index]);\n      }\n    });\n    return results;\n  };\n\n  // Produce an array that contains the union: each distinct element from all of\n  // the passed-in arrays.\n  _.union = function() {\n    return _.uniq(_.flatten(arguments, true));\n  };\n\n  // Produce an array that contains every item shared between all the\n  // passed-in arrays.\n  _.intersection = function(array) {\n    var rest = slice.call(arguments, 1);\n    return _.filter(_.uniq(array), function(item) {\n      return _.every(rest, function(other) {\n        return _.contains(other, item);\n      });\n    });\n  };\n\n  // Take the difference between one array and a number of other arrays.\n  // Only the elements present in just the first array will remain.\n  _.difference = function(array) {\n    var rest = concat.apply(ArrayProto, slice.call(arguments, 1));\n    return _.filter(array, function(value){ return !_.contains(rest, value); });\n  };\n\n  // Zip together multiple lists into a single array -- elements that share\n  // an index go together.\n  _.zip = function() {\n    var length = _.max(_.pluck(arguments, 'length').concat(0));\n    var results = new Array(length);\n    for (var i = 0; i < length; i++) {\n      results[i] = _.pluck(arguments, '' + i);\n    }\n    return results;\n  };\n\n  // Converts lists into objects. Pass either a single array of `[key, value]`\n  // pairs, or two parallel arrays of the same length -- one of keys, and one of\n  // the corresponding values.\n  _.object = function(list, values) {\n    if (list == null) return {};\n    var result = {};\n    for (var i = 0, length = list.length; i < length; i++) {\n      if (values) {\n        result[list[i]] = values[i];\n      } else {\n        result[list[i][0]] = list[i][1];\n      }\n    }\n    return result;\n  };\n\n  // If the browser doesn't supply us with indexOf (I'm looking at you, **MSIE**),\n  // we need this function. Return the position of the first occurrence of an\n  // item in an array, or -1 if the item is not included in the array.\n  // Delegates to **ECMAScript 5**'s native `indexOf` if available.\n  // If the array is large and already in sort order, pass `true`\n  // for **isSorted** to use binary search.\n  _.indexOf = function(array, item, isSorted) {\n    if (array == null) return -1;\n    var i = 0, length = array.length;\n    if (isSorted) {\n      if (typeof isSorted == 'number') {\n        i = (isSorted < 0 ? Math.max(0, length + isSorted) : isSorted);\n      } else {\n        i = _.sortedIndex(array, item);\n        return array[i] === item ? i : -1;\n      }\n    }\n    if (nativeIndexOf && array.indexOf === nativeIndexOf) return array.indexOf(item, isSorted);\n    for (; i < length; i++) if (array[i] === item) return i;\n    return -1;\n  };\n\n  // Delegates to **ECMAScript 5**'s native `lastIndexOf` if available.\n  _.lastIndexOf = function(array, item, from) {\n    if (array == null) return -1;\n    var hasIndex = from != null;\n    if (nativeLastIndexOf && array.lastIndexOf === nativeLastIndexOf) {\n      return hasIndex ? array.lastIndexOf(item, from) : array.lastIndexOf(item);\n    }\n    var i = (hasIndex ? from : array.length);\n    while (i--) if (array[i] === item) return i;\n    return -1;\n  };\n\n  // Generate an integer Array containing an arithmetic progression. A port of\n  // the native Python `range()` function. See\n  // [the Python documentation](http://docs.python.org/library/functions.html#range).\n  _.range = function(start, stop, step) {\n    if (arguments.length <= 1) {\n      stop = start || 0;\n      start = 0;\n    }\n    step = arguments[2] || 1;\n\n    var length = Math.max(Math.ceil((stop - start) / step), 0);\n    var idx = 0;\n    var range = new Array(length);\n\n    while(idx < length) {\n      range[idx++] = start;\n      start += step;\n    }\n\n    return range;\n  };\n\n  // Function (ahem) Functions\n  // ------------------\n\n  // Reusable constructor function for prototype setting.\n  var ctor = function(){};\n\n  // Create a function bound to a given object (assigning `this`, and arguments,\n  // optionally). Delegates to **ECMAScript 5**'s native `Function.bind` if\n  // available.\n  _.bind = function(func, context) {\n    var args, bound;\n    if (nativeBind && func.bind === nativeBind) return nativeBind.apply(func, slice.call(arguments, 1));\n    if (!_.isFunction(func)) throw new TypeError;\n    args = slice.call(arguments, 2);\n    return bound = function() {\n      if (!(this instanceof bound)) return func.apply(context, args.concat(slice.call(arguments)));\n      ctor.prototype = func.prototype;\n      var self = new ctor;\n      ctor.prototype = null;\n      var result = func.apply(self, args.concat(slice.call(arguments)));\n      if (Object(result) === result) return result;\n      return self;\n    };\n  };\n\n  // Partially apply a function by creating a version that has had some of its\n  // arguments pre-filled, without changing its dynamic `this` context. _ acts\n  // as a placeholder, allowing any combination of arguments to be pre-filled.\n  _.partial = function(func) {\n    var boundArgs = slice.call(arguments, 1);\n    return function() {\n      var position = 0;\n      var args = boundArgs.slice();\n      for (var i = 0, length = args.length; i < length; i++) {\n        if (args[i] === _) args[i] = arguments[position++];\n      }\n      while (position < arguments.length) args.push(arguments[position++]);\n      return func.apply(this, args);\n    };\n  };\n\n  // Bind a number of an object's methods to that object. Remaining arguments\n  // are the method names to be bound. Useful for ensuring that all callbacks\n  // defined on an object belong to it.\n  _.bindAll = function(obj) {\n    var funcs = slice.call(arguments, 1);\n    if (funcs.length === 0) throw new Error('bindAll must be passed function names');\n    each(funcs, function(f) { obj[f] = _.bind(obj[f], obj); });\n    return obj;\n  };\n\n  // Memoize an expensive function by storing its results.\n  _.memoize = function(func, hasher) {\n    var memo = {};\n    hasher || (hasher = _.identity);\n    return function() {\n      var key = hasher.apply(this, arguments);\n      return _.has(memo, key) ? memo[key] : (memo[key] = func.apply(this, arguments));\n    };\n  };\n\n  // Delays a function for the given number of milliseconds, and then calls\n  // it with the arguments supplied.\n  _.delay = function(func, wait) {\n    var args = slice.call(arguments, 2);\n    return setTimeout(function(){ return func.apply(null, args); }, wait);\n  };\n\n  // Defers a function, scheduling it to run after the current call stack has\n  // cleared.\n  _.defer = function(func) {\n    return _.delay.apply(_, [func, 1].concat(slice.call(arguments, 1)));\n  };\n\n  // Returns a function, that, when invoked, will only be triggered at most once\n  // during a given window of time. Normally, the throttled function will run\n  // as much as it can, without ever going more than once per `wait` duration;\n  // but if you'd like to disable the execution on the leading edge, pass\n  // `{leading: false}`. To disable execution on the trailing edge, ditto.\n  _.throttle = function(func, wait, options) {\n    var context, args, result;\n    var timeout = null;\n    var previous = 0;\n    options || (options = {});\n    var later = function() {\n      previous = options.leading === false ? 0 : _.now();\n      timeout = null;\n      result = func.apply(context, args);\n      context = args = null;\n    };\n    return function() {\n      var now = _.now();\n      if (!previous && options.leading === false) previous = now;\n      var remaining = wait - (now - previous);\n      context = this;\n      args = arguments;\n      if (remaining <= 0) {\n        clearTimeout(timeout);\n        timeout = null;\n        previous = now;\n        result = func.apply(context, args);\n        context = args = null;\n      } else if (!timeout && options.trailing !== false) {\n        timeout = setTimeout(later, remaining);\n      }\n      return result;\n    };\n  };\n\n  // Returns a function, that, as long as it continues to be invoked, will not\n  // be triggered. The function will be called after it stops being called for\n  // N milliseconds. If `immediate` is passed, trigger the function on the\n  // leading edge, instead of the trailing.\n  _.debounce = function(func, wait, immediate) {\n    var timeout, args, context, timestamp, result;\n\n    var later = function() {\n      var last = _.now() - timestamp;\n      if (last < wait) {\n        timeout = setTimeout(later, wait - last);\n      } else {\n        timeout = null;\n        if (!immediate) {\n          result = func.apply(context, args);\n          context = args = null;\n        }\n      }\n    };\n\n    return function() {\n      context = this;\n      args = arguments;\n      timestamp = _.now();\n      var callNow = immediate && !timeout;\n      if (!timeout) {\n        timeout = setTimeout(later, wait);\n      }\n      if (callNow) {\n        result = func.apply(context, args);\n        context = args = null;\n      }\n\n      return result;\n    };\n  };\n\n  // Returns a function that will be executed at most one time, no matter how\n  // often you call it. Useful for lazy initialization.\n  _.once = function(func) {\n    var ran = false, memo;\n    return function() {\n      if (ran) return memo;\n      ran = true;\n      memo = func.apply(this, arguments);\n      func = null;\n      return memo;\n    };\n  };\n\n  // Returns the first function passed as an argument to the second,\n  // allowing you to adjust arguments, run code before and after, and\n  // conditionally execute the original function.\n  _.wrap = function(func, wrapper) {\n    return _.partial(wrapper, func);\n  };\n\n  // Returns a function that is the composition of a list of functions, each\n  // consuming the return value of the function that follows.\n  _.compose = function() {\n    var funcs = arguments;\n    return function() {\n      var args = arguments;\n      for (var i = funcs.length - 1; i >= 0; i--) {\n        args = [funcs[i].apply(this, args)];\n      }\n      return args[0];\n    };\n  };\n\n  // Returns a function that will only be executed after being called N times.\n  _.after = function(times, func) {\n    return function() {\n      if (--times < 1) {\n        return func.apply(this, arguments);\n      }\n    };\n  };\n\n  // Object Functions\n  // ----------------\n\n  // Retrieve the names of an object's properties.\n  // Delegates to **ECMAScript 5**'s native `Object.keys`\n  _.keys = function(obj) {\n    if (!_.isObject(obj)) return [];\n    if (nativeKeys) return nativeKeys(obj);\n    var keys = [];\n    for (var key in obj) if (_.has(obj, key)) keys.push(key);\n    return keys;\n  };\n\n  // Retrieve the values of an object's properties.\n  _.values = function(obj) {\n    var keys = _.keys(obj);\n    var length = keys.length;\n    var values = new Array(length);\n    for (var i = 0; i < length; i++) {\n      values[i] = obj[keys[i]];\n    }\n    return values;\n  };\n\n  // Convert an object into a list of `[key, value]` pairs.\n  _.pairs = function(obj) {\n    var keys = _.keys(obj);\n    var length = keys.length;\n    var pairs = new Array(length);\n    for (var i = 0; i < length; i++) {\n      pairs[i] = [keys[i], obj[keys[i]]];\n    }\n    return pairs;\n  };\n\n  // Invert the keys and values of an object. The values must be serializable.\n  _.invert = function(obj) {\n    var result = {};\n    var keys = _.keys(obj);\n    for (var i = 0, length = keys.length; i < length; i++) {\n      result[obj[keys[i]]] = keys[i];\n    }\n    return result;\n  };\n\n  // Return a sorted list of the function names available on the object.\n  // Aliased as `methods`\n  _.functions = _.methods = function(obj) {\n    var names = [];\n    for (var key in obj) {\n      if (_.isFunction(obj[key])) names.push(key);\n    }\n    return names.sort();\n  };\n\n  // Extend a given object with all the properties in passed-in object(s).\n  _.extend = function(obj) {\n    each(slice.call(arguments, 1), function(source) {\n      if (source) {\n        for (var prop in source) {\n          obj[prop] = source[prop];\n        }\n      }\n    });\n    return obj;\n  };\n\n  // Return a copy of the object only containing the whitelisted properties.\n  _.pick = function(obj) {\n    var copy = {};\n    var keys = concat.apply(ArrayProto, slice.call(arguments, 1));\n    each(keys, function(key) {\n      if (key in obj) copy[key] = obj[key];\n    });\n    return copy;\n  };\n\n   // Return a copy of the object without the blacklisted properties.\n  _.omit = function(obj) {\n    var copy = {};\n    var keys = concat.apply(ArrayProto, slice.call(arguments, 1));\n    for (var key in obj) {\n      if (!_.contains(keys, key)) copy[key] = obj[key];\n    }\n    return copy;\n  };\n\n  // Fill in a given object with default properties.\n  _.defaults = function(obj) {\n    each(slice.call(arguments, 1), function(source) {\n      if (source) {\n        for (var prop in source) {\n          if (obj[prop] === void 0) obj[prop] = source[prop];\n        }\n      }\n    });\n    return obj;\n  };\n\n  // Create a (shallow-cloned) duplicate of an object.\n  _.clone = function(obj) {\n    if (!_.isObject(obj)) return obj;\n    return _.isArray(obj) ? obj.slice() : _.extend({}, obj);\n  };\n\n  // Invokes interceptor with the obj, and then returns obj.\n  // The primary purpose of this method is to \"tap into\" a method chain, in\n  // order to perform operations on intermediate results within the chain.\n  _.tap = function(obj, interceptor) {\n    interceptor(obj);\n    return obj;\n  };\n\n  // Internal recursive comparison function for `isEqual`.\n  var eq = function(a, b, aStack, bStack) {\n    // Identical objects are equal. `0 === -0`, but they aren't identical.\n    // See the [Harmony `egal` proposal](http://wiki.ecmascript.org/doku.php?id=harmony:egal).\n    if (a === b) return a !== 0 || 1 / a == 1 / b;\n    // A strict comparison is necessary because `null == undefined`.\n    if (a == null || b == null) return a === b;\n    // Unwrap any wrapped objects.\n    if (a instanceof _) a = a._wrapped;\n    if (b instanceof _) b = b._wrapped;\n    // Compare `[[Class]]` names.\n    var className = toString.call(a);\n    if (className != toString.call(b)) return false;\n    switch (className) {\n      // Strings, numbers, dates, and booleans are compared by value.\n      case '[object String]':\n        // Primitives and their corresponding object wrappers are equivalent; thus, `\"5\"` is\n        // equivalent to `new String(\"5\")`.\n        return a == String(b);\n      case '[object Number]':\n        // `NaN`s are equivalent, but non-reflexive. An `egal` comparison is performed for\n        // other numeric values.\n        return a != +a ? b != +b : (a == 0 ? 1 / a == 1 / b : a == +b);\n      case '[object Date]':\n      case '[object Boolean]':\n        // Coerce dates and booleans to numeric primitive values. Dates are compared by their\n        // millisecond representations. Note that invalid dates with millisecond representations\n        // of `NaN` are not equivalent.\n        return +a == +b;\n      // RegExps are compared by their source patterns and flags.\n      case '[object RegExp]':\n        return a.source == b.source &&\n               a.global == b.global &&\n               a.multiline == b.multiline &&\n               a.ignoreCase == b.ignoreCase;\n    }\n    if (typeof a != 'object' || typeof b != 'object') return false;\n    // Assume equality for cyclic structures. The algorithm for detecting cyclic\n    // structures is adapted from ES 5.1 section 15.12.3, abstract operation `JO`.\n    var length = aStack.length;\n    while (length--) {\n      // Linear search. Performance is inversely proportional to the number of\n      // unique nested structures.\n      if (aStack[length] == a) return bStack[length] == b;\n    }\n    // Objects with different constructors are not equivalent, but `Object`s\n    // from different frames are.\n    var aCtor = a.constructor, bCtor = b.constructor;\n    if (aCtor !== bCtor && !(_.isFunction(aCtor) && (aCtor instanceof aCtor) &&\n                             _.isFunction(bCtor) && (bCtor instanceof bCtor))\n                        && ('constructor' in a && 'constructor' in b)) {\n      return false;\n    }\n    // Add the first object to the stack of traversed objects.\n    aStack.push(a);\n    bStack.push(b);\n    var size = 0, result = true;\n    // Recursively compare objects and arrays.\n    if (className == '[object Array]') {\n      // Compare array lengths to determine if a deep comparison is necessary.\n      size = a.length;\n      result = size == b.length;\n      if (result) {\n        // Deep compare the contents, ignoring non-numeric properties.\n        while (size--) {\n          if (!(result = eq(a[size], b[size], aStack, bStack))) break;\n        }\n      }\n    } else {\n      // Deep compare objects.\n      for (var key in a) {\n        if (_.has(a, key)) {\n          // Count the expected number of properties.\n          size++;\n          // Deep compare each member.\n          if (!(result = _.has(b, key) && eq(a[key], b[key], aStack, bStack))) break;\n        }\n      }\n      // Ensure that both objects contain the same number of properties.\n      if (result) {\n        for (key in b) {\n          if (_.has(b, key) && !(size--)) break;\n        }\n        result = !size;\n      }\n    }\n    // Remove the first object from the stack of traversed objects.\n    aStack.pop();\n    bStack.pop();\n    return result;\n  };\n\n  // Perform a deep comparison to check if two objects are equal.\n  _.isEqual = function(a, b) {\n    return eq(a, b, [], []);\n  };\n\n  // Is a given array, string, or object empty?\n  // An \"empty\" object has no enumerable own-properties.\n  _.isEmpty = function(obj) {\n    if (obj == null) return true;\n    if (_.isArray(obj) || _.isString(obj)) return obj.length === 0;\n    for (var key in obj) if (_.has(obj, key)) return false;\n    return true;\n  };\n\n  // Is a given value a DOM element?\n  _.isElement = function(obj) {\n    return !!(obj && obj.nodeType === 1);\n  };\n\n  // Is a given value an array?\n  // Delegates to ECMA5's native Array.isArray\n  _.isArray = nativeIsArray || function(obj) {\n    return toString.call(obj) == '[object Array]';\n  };\n\n  // Is a given variable an object?\n  _.isObject = function(obj) {\n    return obj === Object(obj);\n  };\n\n  // Add some isType methods: isArguments, isFunction, isString, isNumber, isDate, isRegExp.\n  each(['Arguments', 'Function', 'String', 'Number', 'Date', 'RegExp'], function(name) {\n    _['is' + name] = function(obj) {\n      return toString.call(obj) == '[object ' + name + ']';\n    };\n  });\n\n  // Define a fallback version of the method in browsers (ahem, IE), where\n  // there isn't any inspectable \"Arguments\" type.\n  if (!_.isArguments(arguments)) {\n    _.isArguments = function(obj) {\n      return !!(obj && _.has(obj, 'callee'));\n    };\n  }\n\n  // Optimize `isFunction` if appropriate.\n  if (typeof (/./) !== 'function') {\n    _.isFunction = function(obj) {\n      return typeof obj === 'function';\n    };\n  }\n\n  // Is a given object a finite number?\n  _.isFinite = function(obj) {\n    return isFinite(obj) && !isNaN(parseFloat(obj));\n  };\n\n  // Is the given value `NaN`? (NaN is the only number which does not equal itself).\n  _.isNaN = function(obj) {\n    return _.isNumber(obj) && obj != +obj;\n  };\n\n  // Is a given value a boolean?\n  _.isBoolean = function(obj) {\n    return obj === true || obj === false || toString.call(obj) == '[object Boolean]';\n  };\n\n  // Is a given value equal to null?\n  _.isNull = function(obj) {\n    return obj === null;\n  };\n\n  // Is a given variable undefined?\n  _.isUndefined = function(obj) {\n    return obj === void 0;\n  };\n\n  // Shortcut function for checking if an object has a given property directly\n  // on itself (in other words, not on a prototype).\n  _.has = function(obj, key) {\n    return hasOwnProperty.call(obj, key);\n  };\n\n  // Utility Functions\n  // -----------------\n\n  // Run Underscore.js in *noConflict* mode, returning the `_` variable to its\n  // previous owner. Returns a reference to the Underscore object.\n  _.noConflict = function() {\n    root._ = previousUnderscore;\n    return this;\n  };\n\n  // Keep the identity function around for default iterators.\n  _.identity = function(value) {\n    return value;\n  };\n\n  _.constant = function(value) {\n    return function () {\n      return value;\n    };\n  };\n\n  _.property = function(key) {\n    return function(obj) {\n      return obj[key];\n    };\n  };\n\n  // Returns a predicate for checking whether an object has a given set of `key:value` pairs.\n  _.matches = function(attrs) {\n    return function(obj) {\n      if (obj === attrs) return true; //avoid comparing an object to itself.\n      for (var key in attrs) {\n        if (attrs[key] !== obj[key])\n          return false;\n      }\n      return true;\n    }\n  };\n\n  // Run a function **n** times.\n  _.times = function(n, iterator, context) {\n    var accum = Array(Math.max(0, n));\n    for (var i = 0; i < n; i++) accum[i] = iterator.call(context, i);\n    return accum;\n  };\n\n  // Return a random integer between min and max (inclusive).\n  _.random = function(min, max) {\n    if (max == null) {\n      max = min;\n      min = 0;\n    }\n    return min + Math.floor(Math.random() * (max - min + 1));\n  };\n\n  // A (possibly faster) way to get the current timestamp as an integer.\n  _.now = Date.now || function() { return new Date().getTime(); };\n\n  // List of HTML entities for escaping.\n  var entityMap = {\n    escape: {\n      '&': '&amp;',\n      '<': '&lt;',\n      '>': '&gt;',\n      '\"': '&quot;',\n      \"'\": '&#x27;'\n    }\n  };\n  entityMap.unescape = _.invert(entityMap.escape);\n\n  // Regexes containing the keys and values listed immediately above.\n  var entityRegexes = {\n    escape:   new RegExp('[' + _.keys(entityMap.escape).join('') + ']', 'g'),\n    unescape: new RegExp('(' + _.keys(entityMap.unescape).join('|') + ')', 'g')\n  };\n\n  // Functions for escaping and unescaping strings to/from HTML interpolation.\n  _.each(['escape', 'unescape'], function(method) {\n    _[method] = function(string) {\n      if (string == null) return '';\n      return ('' + string).replace(entityRegexes[method], function(match) {\n        return entityMap[method][match];\n      });\n    };\n  });\n\n  // If the value of the named `property` is a function then invoke it with the\n  // `object` as context; otherwise, return it.\n  _.result = function(object, property) {\n    if (object == null) return void 0;\n    var value = object[property];\n    return _.isFunction(value) ? value.call(object) : value;\n  };\n\n  // Add your own custom functions to the Underscore object.\n  _.mixin = function(obj) {\n    each(_.functions(obj), function(name) {\n      var func = _[name] = obj[name];\n      _.prototype[name] = function() {\n        var args = [this._wrapped];\n        push.apply(args, arguments);\n        return result.call(this, func.apply(_, args));\n      };\n    });\n  };\n\n  // Generate a unique integer id (unique within the entire client session).\n  // Useful for temporary DOM ids.\n  var idCounter = 0;\n  _.uniqueId = function(prefix) {\n    var id = ++idCounter + '';\n    return prefix ? prefix + id : id;\n  };\n\n  // By default, Underscore uses ERB-style template delimiters, change the\n  // following template settings to use alternative delimiters.\n  _.templateSettings = {\n    evaluate    : /<%([\\s\\S]+?)%>/g,\n    interpolate : /<%=([\\s\\S]+?)%>/g,\n    escape      : /<%-([\\s\\S]+?)%>/g\n  };\n\n  // When customizing `templateSettings`, if you don't want to define an\n  // interpolation, evaluation or escaping regex, we need one that is\n  // guaranteed not to match.\n  var noMatch = /(.)^/;\n\n  // Certain characters need to be escaped so that they can be put into a\n  // string literal.\n  var escapes = {\n    \"'\":      \"'\",\n    '\\\\':     '\\\\',\n    '\\r':     'r',\n    '\\n':     'n',\n    '\\t':     't',\n    '\\u2028': 'u2028',\n    '\\u2029': 'u2029'\n  };\n\n  var escaper = /\\\\|'|\\r|\\n|\\t|\\u2028|\\u2029/g;\n\n  // JavaScript micro-templating, similar to John Resig's implementation.\n  // Underscore templating handles arbitrary delimiters, preserves whitespace,\n  // and correctly escapes quotes within interpolated code.\n  _.template = function(text, data, settings) {\n    var render;\n    settings = _.defaults({}, settings, _.templateSettings);\n\n    // Combine delimiters into one regular expression via alternation.\n    var matcher = new RegExp([\n      (settings.escape || noMatch).source,\n      (settings.interpolate || noMatch).source,\n      (settings.evaluate || noMatch).source\n    ].join('|') + '|$', 'g');\n\n    // Compile the template source, escaping string literals appropriately.\n    var index = 0;\n    var source = \"__p+='\";\n    text.replace(matcher, function(match, escape, interpolate, evaluate, offset) {\n      source += text.slice(index, offset)\n        .replace(escaper, function(match) { return '\\\\' + escapes[match]; });\n\n      if (escape) {\n        source += \"'+\\n((__t=(\" + escape + \"))==null?'':_.escape(__t))+\\n'\";\n      }\n      if (interpolate) {\n        source += \"'+\\n((__t=(\" + interpolate + \"))==null?'':__t)+\\n'\";\n      }\n      if (evaluate) {\n        source += \"';\\n\" + evaluate + \"\\n__p+='\";\n      }\n      index = offset + match.length;\n      return match;\n    });\n    source += \"';\\n\";\n\n    // If a variable is not specified, place data values in local scope.\n    if (!settings.variable) source = 'with(obj||{}){\\n' + source + '}\\n';\n\n    source = \"var __t,__p='',__j=Array.prototype.join,\" +\n      \"print=function(){__p+=__j.call(arguments,'');};\\n\" +\n      source + \"return __p;\\n\";\n\n    try {\n      render = new Function(settings.variable || 'obj', '_', source);\n    } catch (e) {\n      e.source = source;\n      throw e;\n    }\n\n    if (data) return render(data, _);\n    var template = function(data) {\n      return render.call(this, data, _);\n    };\n\n    // Provide the compiled function source as a convenience for precompilation.\n    template.source = 'function(' + (settings.variable || 'obj') + '){\\n' + source + '}';\n\n    return template;\n  };\n\n  // Add a \"chain\" function, which will delegate to the wrapper.\n  _.chain = function(obj) {\n    return _(obj).chain();\n  };\n\n  // OOP\n  // ---------------\n  // If Underscore is called as a function, it returns a wrapped object that\n  // can be used OO-style. This wrapper holds altered versions of all the\n  // underscore functions. Wrapped objects may be chained.\n\n  // Helper function to continue chaining intermediate results.\n  var result = function(obj) {\n    return this._chain ? _(obj).chain() : obj;\n  };\n\n  // Add all of the Underscore functions to the wrapper object.\n  _.mixin(_);\n\n  // Add all mutator Array functions to the wrapper.\n  each(['pop', 'push', 'reverse', 'shift', 'sort', 'splice', 'unshift'], function(name) {\n    var method = ArrayProto[name];\n    _.prototype[name] = function() {\n      var obj = this._wrapped;\n      method.apply(obj, arguments);\n      if ((name == 'shift' || name == 'splice') && obj.length === 0) delete obj[0];\n      return result.call(this, obj);\n    };\n  });\n\n  // Add all accessor Array functions to the wrapper.\n  each(['concat', 'join', 'slice'], function(name) {\n    var method = ArrayProto[name];\n    _.prototype[name] = function() {\n      return result.call(this, method.apply(this._wrapped, arguments));\n    };\n  });\n\n  _.extend(_.prototype, {\n\n    // Start chaining a wrapped Underscore object.\n    chain: function() {\n      this._chain = true;\n      return this;\n    },\n\n    // Extracts the result from a wrapped and chained object.\n    value: function() {\n      return this._wrapped;\n    }\n\n  });\n\n  // AMD registration happens at the end for compatibility with AMD loaders\n  // that may not enforce next-turn semantics on modules. Even though general\n  // practice for AMD registration is to be anonymous, underscore registers\n  // as a named module because, like jQuery, it is a base library that is\n  // popular enough to be bundled in a third party lib, but not be part of\n  // an AMD load request. Those cases could generate an error when an\n  // anonymous define() is called outside of a loader request.\n  if (typeof define === 'function' && define.amd) {\n    define('underscore', [], function() {\n      return _;\n    });\n  }\n}).call(this);\n\n},{}],155:[function(require,module,exports){\n// Generated by CoffeeScript 1.9.1\n(function() {\n  var XMLAttribute, create;\n\n  create = require('lodash/object/create');\n\n  module.exports = XMLAttribute = (function() {\n    function XMLAttribute(parent, name, value) {\n      this.stringify = parent.stringify;\n      if (name == null) {\n        throw new Error(\"Missing attribute name of element \" + parent.name);\n      }\n      if (value == null) {\n        throw new Error(\"Missing attribute value for attribute \" + name + \" of element \" + parent.name);\n      }\n      this.name = this.stringify.attName(name);\n      this.value = this.stringify.attValue(value);\n    }\n\n    XMLAttribute.prototype.clone = function() {\n      return create(XMLAttribute.prototype, this);\n    };\n\n    XMLAttribute.prototype.toString = function(options, level) {\n      return ' ' + this.name + '=\"' + this.value + '\"';\n    };\n\n    return XMLAttribute;\n\n  })();\n\n}).call(this);\n\n},{\"lodash/object/create\":225}],156:[function(require,module,exports){\n// Generated by CoffeeScript 1.9.1\n(function() {\n  var XMLBuilder, XMLDeclaration, XMLDocType, XMLElement, XMLStringifier;\n\n  XMLStringifier = require('./XMLStringifier');\n\n  XMLDeclaration = require('./XMLDeclaration');\n\n  XMLDocType = require('./XMLDocType');\n\n  XMLElement = require('./XMLElement');\n\n  module.exports = XMLBuilder = (function() {\n    function XMLBuilder(name, options) {\n      var root, temp;\n      if (name == null) {\n        throw new Error(\"Root element needs a name\");\n      }\n      if (options == null) {\n        options = {};\n      }\n      this.options = options;\n      this.stringify = new XMLStringifier(options);\n      temp = new XMLElement(this, 'doc');\n      root = temp.element(name);\n      root.isRoot = true;\n      root.documentObject = this;\n      this.rootObject = root;\n      if (!options.headless) {\n        root.declaration(options);\n        if ((options.pubID != null) || (options.sysID != null)) {\n          root.doctype(options);\n        }\n      }\n    }\n\n    XMLBuilder.prototype.root = function() {\n      return this.rootObject;\n    };\n\n    XMLBuilder.prototype.end = function(options) {\n      return this.toString(options);\n    };\n\n    XMLBuilder.prototype.toString = function(options) {\n      var indent, newline, offset, pretty, r, ref, ref1, ref2;\n      pretty = (options != null ? options.pretty : void 0) || false;\n      indent = (ref = options != null ? options.indent : void 0) != null ? ref : '  ';\n      offset = (ref1 = options != null ? options.offset : void 0) != null ? ref1 : 0;\n      newline = (ref2 = options != null ? options.newline : void 0) != null ? ref2 : '\\n';\n      r = '';\n      if (this.xmldec != null) {\n        r += this.xmldec.toString(options);\n      }\n      if (this.doctype != null) {\n        r += this.doctype.toString(options);\n      }\n      r += this.rootObject.toString(options);\n      if (pretty && r.slice(-newline.length) === newline) {\n        r = r.slice(0, -newline.length);\n      }\n      return r;\n    };\n\n    return XMLBuilder;\n\n  })();\n\n}).call(this);\n\n},{\"./XMLDeclaration\":163,\"./XMLDocType\":164,\"./XMLElement\":165,\"./XMLStringifier\":169}],157:[function(require,module,exports){\n// Generated by CoffeeScript 1.9.1\n(function() {\n  var XMLCData, XMLNode, create,\n    extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },\n    hasProp = {}.hasOwnProperty;\n\n  create = require('lodash/object/create');\n\n  XMLNode = require('./XMLNode');\n\n  module.exports = XMLCData = (function(superClass) {\n    extend(XMLCData, superClass);\n\n    function XMLCData(parent, text) {\n      XMLCData.__super__.constructor.call(this, parent);\n      if (text == null) {\n        throw new Error(\"Missing CDATA text\");\n      }\n      this.text = this.stringify.cdata(text);\n    }\n\n    XMLCData.prototype.clone = function() {\n      return create(XMLCData.prototype, this);\n    };\n\n    XMLCData.prototype.toString = function(options, level) {\n      var indent, newline, offset, pretty, r, ref, ref1, ref2, space;\n      pretty = (options != null ? options.pretty : void 0) || false;\n      indent = (ref = options != null ? options.indent : void 0) != null ? ref : '  ';\n      offset = (ref1 = options != null ? options.offset : void 0) != null ? ref1 : 0;\n      newline = (ref2 = options != null ? options.newline : void 0) != null ? ref2 : '\\n';\n      level || (level = 0);\n      space = new Array(level + offset + 1).join(indent);\n      r = '';\n      if (pretty) {\n        r += space;\n      }\n      r += '<![CDATA[' + this.text + ']]>';\n      if (pretty) {\n        r += newline;\n      }\n      return r;\n    };\n\n    return XMLCData;\n\n  })(XMLNode);\n\n}).call(this);\n\n},{\"./XMLNode\":166,\"lodash/object/create\":225}],158:[function(require,module,exports){\n// Generated by CoffeeScript 1.9.1\n(function() {\n  var XMLComment, XMLNode, create,\n    extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },\n    hasProp = {}.hasOwnProperty;\n\n  create = require('lodash/object/create');\n\n  XMLNode = require('./XMLNode');\n\n  module.exports = XMLComment = (function(superClass) {\n    extend(XMLComment, superClass);\n\n    function XMLComment(parent, text) {\n      XMLComment.__super__.constructor.call(this, parent);\n      if (text == null) {\n        throw new Error(\"Missing comment text\");\n      }\n      this.text = this.stringify.comment(text);\n    }\n\n    XMLComment.prototype.clone = function() {\n      return create(XMLComment.prototype, this);\n    };\n\n    XMLComment.prototype.toString = function(options, level) {\n      var indent, newline, offset, pretty, r, ref, ref1, ref2, space;\n      pretty = (options != null ? options.pretty : void 0) || false;\n      indent = (ref = options != null ? options.indent : void 0) != null ? ref : '  ';\n      offset = (ref1 = options != null ? options.offset : void 0) != null ? ref1 : 0;\n      newline = (ref2 = options != null ? options.newline : void 0) != null ? ref2 : '\\n';\n      level || (level = 0);\n      space = new Array(level + offset + 1).join(indent);\n      r = '';\n      if (pretty) {\n        r += space;\n      }\n      r += '<!-- ' + this.text + ' -->';\n      if (pretty) {\n        r += newline;\n      }\n      return r;\n    };\n\n    return XMLComment;\n\n  })(XMLNode);\n\n}).call(this);\n\n},{\"./XMLNode\":166,\"lodash/object/create\":225}],159:[function(require,module,exports){\n// Generated by CoffeeScript 1.9.1\n(function() {\n  var XMLDTDAttList, create;\n\n  create = require('lodash/object/create');\n\n  module.exports = XMLDTDAttList = (function() {\n    function XMLDTDAttList(parent, elementName, attributeName, attributeType, defaultValueType, defaultValue) {\n      this.stringify = parent.stringify;\n      if (elementName == null) {\n        throw new Error(\"Missing DTD element name\");\n      }\n      if (attributeName == null) {\n        throw new Error(\"Missing DTD attribute name\");\n      }\n      if (!attributeType) {\n        throw new Error(\"Missing DTD attribute type\");\n      }\n      if (!defaultValueType) {\n        throw new Error(\"Missing DTD attribute default\");\n      }\n      if (defaultValueType.indexOf('#') !== 0) {\n        defaultValueType = '#' + defaultValueType;\n      }\n      if (!defaultValueType.match(/^(#REQUIRED|#IMPLIED|#FIXED|#DEFAULT)$/)) {\n        throw new Error(\"Invalid default value type; expected: #REQUIRED, #IMPLIED, #FIXED or #DEFAULT\");\n      }\n      if (defaultValue && !defaultValueType.match(/^(#FIXED|#DEFAULT)$/)) {\n        throw new Error(\"Default value only applies to #FIXED or #DEFAULT\");\n      }\n      this.elementName = this.stringify.eleName(elementName);\n      this.attributeName = this.stringify.attName(attributeName);\n      this.attributeType = this.stringify.dtdAttType(attributeType);\n      this.defaultValue = this.stringify.dtdAttDefault(defaultValue);\n      this.defaultValueType = defaultValueType;\n    }\n\n    XMLDTDAttList.prototype.clone = function() {\n      return create(XMLDTDAttList.prototype, this);\n    };\n\n    XMLDTDAttList.prototype.toString = function(options, level) {\n      var indent, newline, offset, pretty, r, ref, ref1, ref2, space;\n      pretty = (options != null ? options.pretty : void 0) || false;\n      indent = (ref = options != null ? options.indent : void 0) != null ? ref : '  ';\n      offset = (ref1 = options != null ? options.offset : void 0) != null ? ref1 : 0;\n      newline = (ref2 = options != null ? options.newline : void 0) != null ? ref2 : '\\n';\n      level || (level = 0);\n      space = new Array(level + offset + 1).join(indent);\n      r = '';\n      if (pretty) {\n        r += space;\n      }\n      r += '<!ATTLIST ' + this.elementName + ' ' + this.attributeName + ' ' + this.attributeType;\n      if (this.defaultValueType !== '#DEFAULT') {\n        r += ' ' + this.defaultValueType;\n      }\n      if (this.defaultValue) {\n        r += ' \"' + this.defaultValue + '\"';\n      }\n      r += '>';\n      if (pretty) {\n        r += newline;\n      }\n      return r;\n    };\n\n    return XMLDTDAttList;\n\n  })();\n\n}).call(this);\n\n},{\"lodash/object/create\":225}],160:[function(require,module,exports){\n// Generated by CoffeeScript 1.9.1\n(function() {\n  var XMLDTDElement, create;\n\n  create = require('lodash/object/create');\n\n  module.exports = XMLDTDElement = (function() {\n    function XMLDTDElement(parent, name, value) {\n      this.stringify = parent.stringify;\n      if (name == null) {\n        throw new Error(\"Missing DTD element name\");\n      }\n      if (!value) {\n        value = '(#PCDATA)';\n      }\n      if (Array.isArray(value)) {\n        value = '(' + value.join(',') + ')';\n      }\n      this.name = this.stringify.eleName(name);\n      this.value = this.stringify.dtdElementValue(value);\n    }\n\n    XMLDTDElement.prototype.clone = function() {\n      return create(XMLDTDElement.prototype, this);\n    };\n\n    XMLDTDElement.prototype.toString = function(options, level) {\n      var indent, newline, offset, pretty, r, ref, ref1, ref2, space;\n      pretty = (options != null ? options.pretty : void 0) || false;\n      indent = (ref = options != null ? options.indent : void 0) != null ? ref : '  ';\n      offset = (ref1 = options != null ? options.offset : void 0) != null ? ref1 : 0;\n      newline = (ref2 = options != null ? options.newline : void 0) != null ? ref2 : '\\n';\n      level || (level = 0);\n      space = new Array(level + offset + 1).join(indent);\n      r = '';\n      if (pretty) {\n        r += space;\n      }\n      r += '<!ELEMENT ' + this.name + ' ' + this.value + '>';\n      if (pretty) {\n        r += newline;\n      }\n      return r;\n    };\n\n    return XMLDTDElement;\n\n  })();\n\n}).call(this);\n\n},{\"lodash/object/create\":225}],161:[function(require,module,exports){\n// Generated by CoffeeScript 1.9.1\n(function() {\n  var XMLDTDEntity, create, isObject;\n\n  create = require('lodash/object/create');\n\n  isObject = require('lodash/lang/isObject');\n\n  module.exports = XMLDTDEntity = (function() {\n    function XMLDTDEntity(parent, pe, name, value) {\n      this.stringify = parent.stringify;\n      if (name == null) {\n        throw new Error(\"Missing entity name\");\n      }\n      if (value == null) {\n        throw new Error(\"Missing entity value\");\n      }\n      this.pe = !!pe;\n      this.name = this.stringify.eleName(name);\n      if (!isObject(value)) {\n        this.value = this.stringify.dtdEntityValue(value);\n      } else {\n        if (!value.pubID && !value.sysID) {\n          throw new Error(\"Public and/or system identifiers are required for an external entity\");\n        }\n        if (value.pubID && !value.sysID) {\n          throw new Error(\"System identifier is required for a public external entity\");\n        }\n        if (value.pubID != null) {\n          this.pubID = this.stringify.dtdPubID(value.pubID);\n        }\n        if (value.sysID != null) {\n          this.sysID = this.stringify.dtdSysID(value.sysID);\n        }\n        if (value.nData != null) {\n          this.nData = this.stringify.dtdNData(value.nData);\n        }\n        if (this.pe && this.nData) {\n          throw new Error(\"Notation declaration is not allowed in a parameter entity\");\n        }\n      }\n    }\n\n    XMLDTDEntity.prototype.clone = function() {\n      return create(XMLDTDEntity.prototype, this);\n    };\n\n    XMLDTDEntity.prototype.toString = function(options, level) {\n      var indent, newline, offset, pretty, r, ref, ref1, ref2, space;\n      pretty = (options != null ? options.pretty : void 0) || false;\n      indent = (ref = options != null ? options.indent : void 0) != null ? ref : '  ';\n      offset = (ref1 = options != null ? options.offset : void 0) != null ? ref1 : 0;\n      newline = (ref2 = options != null ? options.newline : void 0) != null ? ref2 : '\\n';\n      level || (level = 0);\n      space = new Array(level + offset + 1).join(indent);\n      r = '';\n      if (pretty) {\n        r += space;\n      }\n      r += '<!ENTITY';\n      if (this.pe) {\n        r += ' %';\n      }\n      r += ' ' + this.name;\n      if (this.value) {\n        r += ' \"' + this.value + '\"';\n      } else {\n        if (this.pubID && this.sysID) {\n          r += ' PUBLIC \"' + this.pubID + '\" \"' + this.sysID + '\"';\n        } else if (this.sysID) {\n          r += ' SYSTEM \"' + this.sysID + '\"';\n        }\n        if (this.nData) {\n          r += ' NDATA ' + this.nData;\n        }\n      }\n      r += '>';\n      if (pretty) {\n        r += newline;\n      }\n      return r;\n    };\n\n    return XMLDTDEntity;\n\n  })();\n\n}).call(this);\n\n},{\"lodash/lang/isObject\":221,\"lodash/object/create\":225}],162:[function(require,module,exports){\n// Generated by CoffeeScript 1.9.1\n(function() {\n  var XMLDTDNotation, create;\n\n  create = require('lodash/object/create');\n\n  module.exports = XMLDTDNotation = (function() {\n    function XMLDTDNotation(parent, name, value) {\n      this.stringify = parent.stringify;\n      if (name == null) {\n        throw new Error(\"Missing notation name\");\n      }\n      if (!value.pubID && !value.sysID) {\n        throw new Error(\"Public or system identifiers are required for an external entity\");\n      }\n      this.name = this.stringify.eleName(name);\n      if (value.pubID != null) {\n        this.pubID = this.stringify.dtdPubID(value.pubID);\n      }\n      if (value.sysID != null) {\n        this.sysID = this.stringify.dtdSysID(value.sysID);\n      }\n    }\n\n    XMLDTDNotation.prototype.clone = function() {\n      return create(XMLDTDNotation.prototype, this);\n    };\n\n    XMLDTDNotation.prototype.toString = function(options, level) {\n      var indent, newline, offset, pretty, r, ref, ref1, ref2, space;\n      pretty = (options != null ? options.pretty : void 0) || false;\n      indent = (ref = options != null ? options.indent : void 0) != null ? ref : '  ';\n      offset = (ref1 = options != null ? options.offset : void 0) != null ? ref1 : 0;\n      newline = (ref2 = options != null ? options.newline : void 0) != null ? ref2 : '\\n';\n      level || (level = 0);\n      space = new Array(level + offset + 1).join(indent);\n      r = '';\n      if (pretty) {\n        r += space;\n      }\n      r += '<!NOTATION ' + this.name;\n      if (this.pubID && this.sysID) {\n        r += ' PUBLIC \"' + this.pubID + '\" \"' + this.sysID + '\"';\n      } else if (this.pubID) {\n        r += ' PUBLIC \"' + this.pubID + '\"';\n      } else if (this.sysID) {\n        r += ' SYSTEM \"' + this.sysID + '\"';\n      }\n      r += '>';\n      if (pretty) {\n        r += newline;\n      }\n      return r;\n    };\n\n    return XMLDTDNotation;\n\n  })();\n\n}).call(this);\n\n},{\"lodash/object/create\":225}],163:[function(require,module,exports){\n// Generated by CoffeeScript 1.9.1\n(function() {\n  var XMLDeclaration, XMLNode, create, isObject,\n    extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },\n    hasProp = {}.hasOwnProperty;\n\n  create = require('lodash/object/create');\n\n  isObject = require('lodash/lang/isObject');\n\n  XMLNode = require('./XMLNode');\n\n  module.exports = XMLDeclaration = (function(superClass) {\n    extend(XMLDeclaration, superClass);\n\n    function XMLDeclaration(parent, version, encoding, standalone) {\n      var ref;\n      XMLDeclaration.__super__.constructor.call(this, parent);\n      if (isObject(version)) {\n        ref = version, version = ref.version, encoding = ref.encoding, standalone = ref.standalone;\n      }\n      if (!version) {\n        version = '1.0';\n      }\n      if (version != null) {\n        this.version = this.stringify.xmlVersion(version);\n      }\n      if (encoding != null) {\n        this.encoding = this.stringify.xmlEncoding(encoding);\n      }\n      if (standalone != null) {\n        this.standalone = this.stringify.xmlStandalone(standalone);\n      }\n    }\n\n    XMLDeclaration.prototype.clone = function() {\n      return create(XMLDeclaration.prototype, this);\n    };\n\n    XMLDeclaration.prototype.toString = function(options, level) {\n      var indent, newline, offset, pretty, r, ref, ref1, ref2, space;\n      pretty = (options != null ? options.pretty : void 0) || false;\n      indent = (ref = options != null ? options.indent : void 0) != null ? ref : '  ';\n      offset = (ref1 = options != null ? options.offset : void 0) != null ? ref1 : 0;\n      newline = (ref2 = options != null ? options.newline : void 0) != null ? ref2 : '\\n';\n      level || (level = 0);\n      space = new Array(level + offset + 1).join(indent);\n      r = '';\n      if (pretty) {\n        r += space;\n      }\n      r += '<?xml';\n      if (this.version != null) {\n        r += ' version=\"' + this.version + '\"';\n      }\n      if (this.encoding != null) {\n        r += ' encoding=\"' + this.encoding + '\"';\n      }\n      if (this.standalone != null) {\n        r += ' standalone=\"' + this.standalone + '\"';\n      }\n      r += '?>';\n      if (pretty) {\n        r += newline;\n      }\n      return r;\n    };\n\n    return XMLDeclaration;\n\n  })(XMLNode);\n\n}).call(this);\n\n},{\"./XMLNode\":166,\"lodash/lang/isObject\":221,\"lodash/object/create\":225}],164:[function(require,module,exports){\n// Generated by CoffeeScript 1.9.1\n(function() {\n  var XMLCData, XMLComment, XMLDTDAttList, XMLDTDElement, XMLDTDEntity, XMLDTDNotation, XMLDocType, XMLProcessingInstruction, create, isObject;\n\n  create = require('lodash/object/create');\n\n  isObject = require('lodash/lang/isObject');\n\n  XMLCData = require('./XMLCData');\n\n  XMLComment = require('./XMLComment');\n\n  XMLDTDAttList = require('./XMLDTDAttList');\n\n  XMLDTDEntity = require('./XMLDTDEntity');\n\n  XMLDTDElement = require('./XMLDTDElement');\n\n  XMLDTDNotation = require('./XMLDTDNotation');\n\n  XMLProcessingInstruction = require('./XMLProcessingInstruction');\n\n  module.exports = XMLDocType = (function() {\n    function XMLDocType(parent, pubID, sysID) {\n      var ref, ref1;\n      this.documentObject = parent;\n      this.stringify = this.documentObject.stringify;\n      this.children = [];\n      if (isObject(pubID)) {\n        ref = pubID, pubID = ref.pubID, sysID = ref.sysID;\n      }\n      if (sysID == null) {\n        ref1 = [pubID, sysID], sysID = ref1[0], pubID = ref1[1];\n      }\n      if (pubID != null) {\n        this.pubID = this.stringify.dtdPubID(pubID);\n      }\n      if (sysID != null) {\n        this.sysID = this.stringify.dtdSysID(sysID);\n      }\n    }\n\n    XMLDocType.prototype.clone = function() {\n      return create(XMLDocType.prototype, this);\n    };\n\n    XMLDocType.prototype.element = function(name, value) {\n      var child;\n      child = new XMLDTDElement(this, name, value);\n      this.children.push(child);\n      return this;\n    };\n\n    XMLDocType.prototype.attList = function(elementName, attributeName, attributeType, defaultValueType, defaultValue) {\n      var child;\n      child = new XMLDTDAttList(this, elementName, attributeName, attributeType, defaultValueType, defaultValue);\n      this.children.push(child);\n      return this;\n    };\n\n    XMLDocType.prototype.entity = function(name, value) {\n      var child;\n      child = new XMLDTDEntity(this, false, name, value);\n      this.children.push(child);\n      return this;\n    };\n\n    XMLDocType.prototype.pEntity = function(name, value) {\n      var child;\n      child = new XMLDTDEntity(this, true, name, value);\n      this.children.push(child);\n      return this;\n    };\n\n    XMLDocType.prototype.notation = function(name, value) {\n      var child;\n      child = new XMLDTDNotation(this, name, value);\n      this.children.push(child);\n      return this;\n    };\n\n    XMLDocType.prototype.cdata = function(value) {\n      var child;\n      child = new XMLCData(this, value);\n      this.children.push(child);\n      return this;\n    };\n\n    XMLDocType.prototype.comment = function(value) {\n      var child;\n      child = new XMLComment(this, value);\n      this.children.push(child);\n      return this;\n    };\n\n    XMLDocType.prototype.instruction = function(target, value) {\n      var child;\n      child = new XMLProcessingInstruction(this, target, value);\n      this.children.push(child);\n      return this;\n    };\n\n    XMLDocType.prototype.root = function() {\n      return this.documentObject.root();\n    };\n\n    XMLDocType.prototype.document = function() {\n      return this.documentObject;\n    };\n\n    XMLDocType.prototype.toString = function(options, level) {\n      var child, i, indent, len, newline, offset, pretty, r, ref, ref1, ref2, ref3, space;\n      pretty = (options != null ? options.pretty : void 0) || false;\n      indent = (ref = options != null ? options.indent : void 0) != null ? ref : '  ';\n      offset = (ref1 = options != null ? options.offset : void 0) != null ? ref1 : 0;\n      newline = (ref2 = options != null ? options.newline : void 0) != null ? ref2 : '\\n';\n      level || (level = 0);\n      space = new Array(level + offset + 1).join(indent);\n      r = '';\n      if (pretty) {\n        r += space;\n      }\n      r += '<!DOCTYPE ' + this.root().name;\n      if (this.pubID && this.sysID) {\n        r += ' PUBLIC \"' + this.pubID + '\" \"' + this.sysID + '\"';\n      } else if (this.sysID) {\n        r += ' SYSTEM \"' + this.sysID + '\"';\n      }\n      if (this.children.length > 0) {\n        r += ' [';\n        if (pretty) {\n          r += newline;\n        }\n        ref3 = this.children;\n        for (i = 0, len = ref3.length; i < len; i++) {\n          child = ref3[i];\n          r += child.toString(options, level + 1);\n        }\n        r += ']';\n      }\n      r += '>';\n      if (pretty) {\n        r += newline;\n      }\n      return r;\n    };\n\n    XMLDocType.prototype.ele = function(name, value) {\n      return this.element(name, value);\n    };\n\n    XMLDocType.prototype.att = function(elementName, attributeName, attributeType, defaultValueType, defaultValue) {\n      return this.attList(elementName, attributeName, attributeType, defaultValueType, defaultValue);\n    };\n\n    XMLDocType.prototype.ent = function(name, value) {\n      return this.entity(name, value);\n    };\n\n    XMLDocType.prototype.pent = function(name, value) {\n      return this.pEntity(name, value);\n    };\n\n    XMLDocType.prototype.not = function(name, value) {\n      return this.notation(name, value);\n    };\n\n    XMLDocType.prototype.dat = function(value) {\n      return this.cdata(value);\n    };\n\n    XMLDocType.prototype.com = function(value) {\n      return this.comment(value);\n    };\n\n    XMLDocType.prototype.ins = function(target, value) {\n      return this.instruction(target, value);\n    };\n\n    XMLDocType.prototype.up = function() {\n      return this.root();\n    };\n\n    XMLDocType.prototype.doc = function() {\n      return this.document();\n    };\n\n    return XMLDocType;\n\n  })();\n\n}).call(this);\n\n},{\"./XMLCData\":157,\"./XMLComment\":158,\"./XMLDTDAttList\":159,\"./XMLDTDElement\":160,\"./XMLDTDEntity\":161,\"./XMLDTDNotation\":162,\"./XMLProcessingInstruction\":167,\"lodash/lang/isObject\":221,\"lodash/object/create\":225}],165:[function(require,module,exports){\n// Generated by CoffeeScript 1.9.1\n(function() {\n  var XMLAttribute, XMLElement, XMLNode, XMLProcessingInstruction, create, every, isFunction, isObject,\n    extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },\n    hasProp = {}.hasOwnProperty;\n\n  create = require('lodash/object/create');\n\n  isObject = require('lodash/lang/isObject');\n\n  isFunction = require('lodash/lang/isFunction');\n\n  every = require('lodash/collection/every');\n\n  XMLNode = require('./XMLNode');\n\n  XMLAttribute = require('./XMLAttribute');\n\n  XMLProcessingInstruction = require('./XMLProcessingInstruction');\n\n  module.exports = XMLElement = (function(superClass) {\n    extend(XMLElement, superClass);\n\n    function XMLElement(parent, name, attributes) {\n      XMLElement.__super__.constructor.call(this, parent);\n      if (name == null) {\n        throw new Error(\"Missing element name\");\n      }\n      this.name = this.stringify.eleName(name);\n      this.children = [];\n      this.instructions = [];\n      this.attributes = {};\n      if (attributes != null) {\n        this.attribute(attributes);\n      }\n    }\n\n    XMLElement.prototype.clone = function() {\n      var att, attName, clonedSelf, i, len, pi, ref, ref1;\n      clonedSelf = create(XMLElement.prototype, this);\n      if (clonedSelf.isRoot) {\n        clonedSelf.documentObject = null;\n      }\n      clonedSelf.attributes = {};\n      ref = this.attributes;\n      for (attName in ref) {\n        if (!hasProp.call(ref, attName)) continue;\n        att = ref[attName];\n        clonedSelf.attributes[attName] = att.clone();\n      }\n      clonedSelf.instructions = [];\n      ref1 = this.instructions;\n      for (i = 0, len = ref1.length; i < len; i++) {\n        pi = ref1[i];\n        clonedSelf.instructions.push(pi.clone());\n      }\n      clonedSelf.children = [];\n      this.children.forEach(function(child) {\n        var clonedChild;\n        clonedChild = child.clone();\n        clonedChild.parent = clonedSelf;\n        return clonedSelf.children.push(clonedChild);\n      });\n      return clonedSelf;\n    };\n\n    XMLElement.prototype.attribute = function(name, value) {\n      var attName, attValue;\n      if (name != null) {\n        name = name.valueOf();\n      }\n      if (isObject(name)) {\n        for (attName in name) {\n          if (!hasProp.call(name, attName)) continue;\n          attValue = name[attName];\n          this.attribute(attName, attValue);\n        }\n      } else {\n        if (isFunction(value)) {\n          value = value.apply();\n        }\n        if (!this.options.skipNullAttributes || (value != null)) {\n          this.attributes[name] = new XMLAttribute(this, name, value);\n        }\n      }\n      return this;\n    };\n\n    XMLElement.prototype.removeAttribute = function(name) {\n      var attName, i, len;\n      if (name == null) {\n        throw new Error(\"Missing attribute name\");\n      }\n      name = name.valueOf();\n      if (Array.isArray(name)) {\n        for (i = 0, len = name.length; i < len; i++) {\n          attName = name[i];\n          delete this.attributes[attName];\n        }\n      } else {\n        delete this.attributes[name];\n      }\n      return this;\n    };\n\n    XMLElement.prototype.instruction = function(target, value) {\n      var i, insTarget, insValue, instruction, len;\n      if (target != null) {\n        target = target.valueOf();\n      }\n      if (value != null) {\n        value = value.valueOf();\n      }\n      if (Array.isArray(target)) {\n        for (i = 0, len = target.length; i < len; i++) {\n          insTarget = target[i];\n          this.instruction(insTarget);\n        }\n      } else if (isObject(target)) {\n        for (insTarget in target) {\n          if (!hasProp.call(target, insTarget)) continue;\n          insValue = target[insTarget];\n          this.instruction(insTarget, insValue);\n        }\n      } else {\n        if (isFunction(value)) {\n          value = value.apply();\n        }\n        instruction = new XMLProcessingInstruction(this, target, value);\n        this.instructions.push(instruction);\n      }\n      return this;\n    };\n\n    XMLElement.prototype.toString = function(options, level) {\n      var att, child, i, indent, instruction, j, len, len1, name, newline, offset, pretty, r, ref, ref1, ref2, ref3, ref4, ref5, space;\n      pretty = (options != null ? options.pretty : void 0) || false;\n      indent = (ref = options != null ? options.indent : void 0) != null ? ref : '  ';\n      offset = (ref1 = options != null ? options.offset : void 0) != null ? ref1 : 0;\n      newline = (ref2 = options != null ? options.newline : void 0) != null ? ref2 : '\\n';\n      level || (level = 0);\n      space = new Array(level + offset + 1).join(indent);\n      r = '';\n      ref3 = this.instructions;\n      for (i = 0, len = ref3.length; i < len; i++) {\n        instruction = ref3[i];\n        r += instruction.toString(options, level);\n      }\n      if (pretty) {\n        r += space;\n      }\n      r += '<' + this.name;\n      ref4 = this.attributes;\n      for (name in ref4) {\n        if (!hasProp.call(ref4, name)) continue;\n        att = ref4[name];\n        r += att.toString(options);\n      }\n      if (this.children.length === 0 || every(this.children, function(e) {\n        return e.value === '';\n      })) {\n        r += '/>';\n        if (pretty) {\n          r += newline;\n        }\n      } else if (pretty && this.children.length === 1 && (this.children[0].value != null)) {\n        r += '>';\n        r += this.children[0].value;\n        r += '</' + this.name + '>';\n        r += newline;\n      } else {\n        r += '>';\n        if (pretty) {\n          r += newline;\n        }\n        ref5 = this.children;\n        for (j = 0, len1 = ref5.length; j < len1; j++) {\n          child = ref5[j];\n          r += child.toString(options, level + 1);\n        }\n        if (pretty) {\n          r += space;\n        }\n        r += '</' + this.name + '>';\n        if (pretty) {\n          r += newline;\n        }\n      }\n      return r;\n    };\n\n    XMLElement.prototype.att = function(name, value) {\n      return this.attribute(name, value);\n    };\n\n    XMLElement.prototype.ins = function(target, value) {\n      return this.instruction(target, value);\n    };\n\n    XMLElement.prototype.a = function(name, value) {\n      return this.attribute(name, value);\n    };\n\n    XMLElement.prototype.i = function(target, value) {\n      return this.instruction(target, value);\n    };\n\n    return XMLElement;\n\n  })(XMLNode);\n\n}).call(this);\n\n},{\"./XMLAttribute\":155,\"./XMLNode\":166,\"./XMLProcessingInstruction\":167,\"lodash/collection/every\":173,\"lodash/lang/isFunction\":219,\"lodash/lang/isObject\":221,\"lodash/object/create\":225}],166:[function(require,module,exports){\n// Generated by CoffeeScript 1.9.1\n(function() {\n  var XMLCData, XMLComment, XMLDeclaration, XMLDocType, XMLElement, XMLNode, XMLRaw, XMLText, isEmpty, isFunction, isObject,\n    hasProp = {}.hasOwnProperty;\n\n  isObject = require('lodash/lang/isObject');\n\n  isFunction = require('lodash/lang/isFunction');\n\n  isEmpty = require('lodash/lang/isEmpty');\n\n  XMLElement = null;\n\n  XMLCData = null;\n\n  XMLComment = null;\n\n  XMLDeclaration = null;\n\n  XMLDocType = null;\n\n  XMLRaw = null;\n\n  XMLText = null;\n\n  module.exports = XMLNode = (function() {\n    function XMLNode(parent) {\n      this.parent = parent;\n      this.options = this.parent.options;\n      this.stringify = this.parent.stringify;\n      if (XMLElement === null) {\n        XMLElement = require('./XMLElement');\n        XMLCData = require('./XMLCData');\n        XMLComment = require('./XMLComment');\n        XMLDeclaration = require('./XMLDeclaration');\n        XMLDocType = require('./XMLDocType');\n        XMLRaw = require('./XMLRaw');\n        XMLText = require('./XMLText');\n      }\n    }\n\n    XMLNode.prototype.clone = function() {\n      throw new Error(\"Cannot clone generic XMLNode\");\n    };\n\n    XMLNode.prototype.element = function(name, attributes, text) {\n      var item, j, key, lastChild, len, ref, val;\n      lastChild = null;\n      if (attributes == null) {\n        attributes = {};\n      }\n      attributes = attributes.valueOf();\n      if (!isObject(attributes)) {\n        ref = [attributes, text], text = ref[0], attributes = ref[1];\n      }\n      if (name != null) {\n        name = name.valueOf();\n      }\n      if (Array.isArray(name)) {\n        for (j = 0, len = name.length; j < len; j++) {\n          item = name[j];\n          lastChild = this.element(item);\n        }\n      } else if (isFunction(name)) {\n        lastChild = this.element(name.apply());\n      } else if (isObject(name)) {\n        for (key in name) {\n          if (!hasProp.call(name, key)) continue;\n          val = name[key];\n          if (isFunction(val)) {\n            val = val.apply();\n          }\n          if ((isObject(val)) && (isEmpty(val))) {\n            val = null;\n          }\n          if (!this.options.ignoreDecorators && this.stringify.convertAttKey && key.indexOf(this.stringify.convertAttKey) === 0) {\n            lastChild = this.attribute(key.substr(this.stringify.convertAttKey.length), val);\n          } else if (!this.options.ignoreDecorators && this.stringify.convertPIKey && key.indexOf(this.stringify.convertPIKey) === 0) {\n            lastChild = this.instruction(key.substr(this.stringify.convertPIKey.length), val);\n          } else if (isObject(val)) {\n            if (!this.options.ignoreDecorators && this.stringify.convertListKey && key.indexOf(this.stringify.convertListKey) === 0 && Array.isArray(val)) {\n              lastChild = this.element(val);\n            } else {\n              lastChild = this.element(key);\n              lastChild.element(val);\n            }\n          } else {\n            lastChild = this.element(key, val);\n          }\n        }\n      } else {\n        if (!this.options.ignoreDecorators && this.stringify.convertTextKey && name.indexOf(this.stringify.convertTextKey) === 0) {\n          lastChild = this.text(text);\n        } else if (!this.options.ignoreDecorators && this.stringify.convertCDataKey && name.indexOf(this.stringify.convertCDataKey) === 0) {\n          lastChild = this.cdata(text);\n        } else if (!this.options.ignoreDecorators && this.stringify.convertCommentKey && name.indexOf(this.stringify.convertCommentKey) === 0) {\n          lastChild = this.comment(text);\n        } else if (!this.options.ignoreDecorators && this.stringify.convertRawKey && name.indexOf(this.stringify.convertRawKey) === 0) {\n          lastChild = this.raw(text);\n        } else {\n          lastChild = this.node(name, attributes, text);\n        }\n      }\n      if (lastChild == null) {\n        throw new Error(\"Could not create any elements with: \" + name);\n      }\n      return lastChild;\n    };\n\n    XMLNode.prototype.insertBefore = function(name, attributes, text) {\n      var child, i, removed;\n      if (this.isRoot) {\n        throw new Error(\"Cannot insert elements at root level\");\n      }\n      i = this.parent.children.indexOf(this);\n      removed = this.parent.children.splice(i);\n      child = this.parent.element(name, attributes, text);\n      Array.prototype.push.apply(this.parent.children, removed);\n      return child;\n    };\n\n    XMLNode.prototype.insertAfter = function(name, attributes, text) {\n      var child, i, removed;\n      if (this.isRoot) {\n        throw new Error(\"Cannot insert elements at root level\");\n      }\n      i = this.parent.children.indexOf(this);\n      removed = this.parent.children.splice(i + 1);\n      child = this.parent.element(name, attributes, text);\n      Array.prototype.push.apply(this.parent.children, removed);\n      return child;\n    };\n\n    XMLNode.prototype.remove = function() {\n      var i, ref;\n      if (this.isRoot) {\n        throw new Error(\"Cannot remove the root element\");\n      }\n      i = this.parent.children.indexOf(this);\n      [].splice.apply(this.parent.children, [i, i - i + 1].concat(ref = [])), ref;\n      return this.parent;\n    };\n\n    XMLNode.prototype.node = function(name, attributes, text) {\n      var child, ref;\n      if (name != null) {\n        name = name.valueOf();\n      }\n      if (attributes == null) {\n        attributes = {};\n      }\n      attributes = attributes.valueOf();\n      if (!isObject(attributes)) {\n        ref = [attributes, text], text = ref[0], attributes = ref[1];\n      }\n      child = new XMLElement(this, name, attributes);\n      if (text != null) {\n        child.text(text);\n      }\n      this.children.push(child);\n      return child;\n    };\n\n    XMLNode.prototype.text = function(value) {\n      var child;\n      child = new XMLText(this, value);\n      this.children.push(child);\n      return this;\n    };\n\n    XMLNode.prototype.cdata = function(value) {\n      var child;\n      child = new XMLCData(this, value);\n      this.children.push(child);\n      return this;\n    };\n\n    XMLNode.prototype.comment = function(value) {\n      var child;\n      child = new XMLComment(this, value);\n      this.children.push(child);\n      return this;\n    };\n\n    XMLNode.prototype.raw = function(value) {\n      var child;\n      child = new XMLRaw(this, value);\n      this.children.push(child);\n      return this;\n    };\n\n    XMLNode.prototype.declaration = function(version, encoding, standalone) {\n      var doc, xmldec;\n      doc = this.document();\n      xmldec = new XMLDeclaration(doc, version, encoding, standalone);\n      doc.xmldec = xmldec;\n      return doc.root();\n    };\n\n    XMLNode.prototype.doctype = function(pubID, sysID) {\n      var doc, doctype;\n      doc = this.document();\n      doctype = new XMLDocType(doc, pubID, sysID);\n      doc.doctype = doctype;\n      return doctype;\n    };\n\n    XMLNode.prototype.up = function() {\n      if (this.isRoot) {\n        throw new Error(\"The root node has no parent. Use doc() if you need to get the document object.\");\n      }\n      return this.parent;\n    };\n\n    XMLNode.prototype.root = function() {\n      var child;\n      if (this.isRoot) {\n        return this;\n      }\n      child = this.parent;\n      while (!child.isRoot) {\n        child = child.parent;\n      }\n      return child;\n    };\n\n    XMLNode.prototype.document = function() {\n      return this.root().documentObject;\n    };\n\n    XMLNode.prototype.end = function(options) {\n      return this.document().toString(options);\n    };\n\n    XMLNode.prototype.prev = function() {\n      var i;\n      if (this.isRoot) {\n        throw new Error(\"Root node has no siblings\");\n      }\n      i = this.parent.children.indexOf(this);\n      if (i < 1) {\n        throw new Error(\"Already at the first node\");\n      }\n      return this.parent.children[i - 1];\n    };\n\n    XMLNode.prototype.next = function() {\n      var i;\n      if (this.isRoot) {\n        throw new Error(\"Root node has no siblings\");\n      }\n      i = this.parent.children.indexOf(this);\n      if (i === -1 || i === this.parent.children.length - 1) {\n        throw new Error(\"Already at the last node\");\n      }\n      return this.parent.children[i + 1];\n    };\n\n    XMLNode.prototype.importXMLBuilder = function(xmlbuilder) {\n      var clonedRoot;\n      clonedRoot = xmlbuilder.root().clone();\n      clonedRoot.parent = this;\n      clonedRoot.isRoot = false;\n      this.children.push(clonedRoot);\n      return this;\n    };\n\n    XMLNode.prototype.ele = function(name, attributes, text) {\n      return this.element(name, attributes, text);\n    };\n\n    XMLNode.prototype.nod = function(name, attributes, text) {\n      return this.node(name, attributes, text);\n    };\n\n    XMLNode.prototype.txt = function(value) {\n      return this.text(value);\n    };\n\n    XMLNode.prototype.dat = function(value) {\n      return this.cdata(value);\n    };\n\n    XMLNode.prototype.com = function(value) {\n      return this.comment(value);\n    };\n\n    XMLNode.prototype.doc = function() {\n      return this.document();\n    };\n\n    XMLNode.prototype.dec = function(version, encoding, standalone) {\n      return this.declaration(version, encoding, standalone);\n    };\n\n    XMLNode.prototype.dtd = function(pubID, sysID) {\n      return this.doctype(pubID, sysID);\n    };\n\n    XMLNode.prototype.e = function(name, attributes, text) {\n      return this.element(name, attributes, text);\n    };\n\n    XMLNode.prototype.n = function(name, attributes, text) {\n      return this.node(name, attributes, text);\n    };\n\n    XMLNode.prototype.t = function(value) {\n      return this.text(value);\n    };\n\n    XMLNode.prototype.d = function(value) {\n      return this.cdata(value);\n    };\n\n    XMLNode.prototype.c = function(value) {\n      return this.comment(value);\n    };\n\n    XMLNode.prototype.r = function(value) {\n      return this.raw(value);\n    };\n\n    XMLNode.prototype.u = function() {\n      return this.up();\n    };\n\n    return XMLNode;\n\n  })();\n\n}).call(this);\n\n},{\"./XMLCData\":157,\"./XMLComment\":158,\"./XMLDeclaration\":163,\"./XMLDocType\":164,\"./XMLElement\":165,\"./XMLRaw\":168,\"./XMLText\":170,\"lodash/lang/isEmpty\":218,\"lodash/lang/isFunction\":219,\"lodash/lang/isObject\":221}],167:[function(require,module,exports){\n// Generated by CoffeeScript 1.9.1\n(function() {\n  var XMLProcessingInstruction, create;\n\n  create = require('lodash/object/create');\n\n  module.exports = XMLProcessingInstruction = (function() {\n    function XMLProcessingInstruction(parent, target, value) {\n      this.stringify = parent.stringify;\n      if (target == null) {\n        throw new Error(\"Missing instruction target\");\n      }\n      this.target = this.stringify.insTarget(target);\n      if (value) {\n        this.value = this.stringify.insValue(value);\n      }\n    }\n\n    XMLProcessingInstruction.prototype.clone = function() {\n      return create(XMLProcessingInstruction.prototype, this);\n    };\n\n    XMLProcessingInstruction.prototype.toString = function(options, level) {\n      var indent, newline, offset, pretty, r, ref, ref1, ref2, space;\n      pretty = (options != null ? options.pretty : void 0) || false;\n      indent = (ref = options != null ? options.indent : void 0) != null ? ref : '  ';\n      offset = (ref1 = options != null ? options.offset : void 0) != null ? ref1 : 0;\n      newline = (ref2 = options != null ? options.newline : void 0) != null ? ref2 : '\\n';\n      level || (level = 0);\n      space = new Array(level + offset + 1).join(indent);\n      r = '';\n      if (pretty) {\n        r += space;\n      }\n      r += '<?';\n      r += this.target;\n      if (this.value) {\n        r += ' ' + this.value;\n      }\n      r += '?>';\n      if (pretty) {\n        r += newline;\n      }\n      return r;\n    };\n\n    return XMLProcessingInstruction;\n\n  })();\n\n}).call(this);\n\n},{\"lodash/object/create\":225}],168:[function(require,module,exports){\n// Generated by CoffeeScript 1.9.1\n(function() {\n  var XMLNode, XMLRaw, create,\n    extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },\n    hasProp = {}.hasOwnProperty;\n\n  create = require('lodash/object/create');\n\n  XMLNode = require('./XMLNode');\n\n  module.exports = XMLRaw = (function(superClass) {\n    extend(XMLRaw, superClass);\n\n    function XMLRaw(parent, text) {\n      XMLRaw.__super__.constructor.call(this, parent);\n      if (text == null) {\n        throw new Error(\"Missing raw text\");\n      }\n      this.value = this.stringify.raw(text);\n    }\n\n    XMLRaw.prototype.clone = function() {\n      return create(XMLRaw.prototype, this);\n    };\n\n    XMLRaw.prototype.toString = function(options, level) {\n      var indent, newline, offset, pretty, r, ref, ref1, ref2, space;\n      pretty = (options != null ? options.pretty : void 0) || false;\n      indent = (ref = options != null ? options.indent : void 0) != null ? ref : '  ';\n      offset = (ref1 = options != null ? options.offset : void 0) != null ? ref1 : 0;\n      newline = (ref2 = options != null ? options.newline : void 0) != null ? ref2 : '\\n';\n      level || (level = 0);\n      space = new Array(level + offset + 1).join(indent);\n      r = '';\n      if (pretty) {\n        r += space;\n      }\n      r += this.value;\n      if (pretty) {\n        r += newline;\n      }\n      return r;\n    };\n\n    return XMLRaw;\n\n  })(XMLNode);\n\n}).call(this);\n\n},{\"./XMLNode\":166,\"lodash/object/create\":225}],169:[function(require,module,exports){\n// Generated by CoffeeScript 1.9.1\n(function() {\n  var XMLStringifier,\n    bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; },\n    hasProp = {}.hasOwnProperty;\n\n  module.exports = XMLStringifier = (function() {\n    function XMLStringifier(options) {\n      this.assertLegalChar = bind(this.assertLegalChar, this);\n      var key, ref, value;\n      this.allowSurrogateChars = options != null ? options.allowSurrogateChars : void 0;\n      ref = (options != null ? options.stringify : void 0) || {};\n      for (key in ref) {\n        if (!hasProp.call(ref, key)) continue;\n        value = ref[key];\n        this[key] = value;\n      }\n    }\n\n    XMLStringifier.prototype.eleName = function(val) {\n      val = '' + val || '';\n      return this.assertLegalChar(val);\n    };\n\n    XMLStringifier.prototype.eleText = function(val) {\n      val = '' + val || '';\n      return this.assertLegalChar(this.elEscape(val));\n    };\n\n    XMLStringifier.prototype.cdata = function(val) {\n      val = '' + val || '';\n      if (val.match(/]]>/)) {\n        throw new Error(\"Invalid CDATA text: \" + val);\n      }\n      return this.assertLegalChar(val);\n    };\n\n    XMLStringifier.prototype.comment = function(val) {\n      val = '' + val || '';\n      if (val.match(/--/)) {\n        throw new Error(\"Comment text cannot contain double-hypen: \" + val);\n      }\n      return this.assertLegalChar(val);\n    };\n\n    XMLStringifier.prototype.raw = function(val) {\n      return '' + val || '';\n    };\n\n    XMLStringifier.prototype.attName = function(val) {\n      return '' + val || '';\n    };\n\n    XMLStringifier.prototype.attValue = function(val) {\n      val = '' + val || '';\n      return this.attEscape(val);\n    };\n\n    XMLStringifier.prototype.insTarget = function(val) {\n      return '' + val || '';\n    };\n\n    XMLStringifier.prototype.insValue = function(val) {\n      val = '' + val || '';\n      if (val.match(/\\?>/)) {\n        throw new Error(\"Invalid processing instruction value: \" + val);\n      }\n      return val;\n    };\n\n    XMLStringifier.prototype.xmlVersion = function(val) {\n      val = '' + val || '';\n      if (!val.match(/1\\.[0-9]+/)) {\n        throw new Error(\"Invalid version number: \" + val);\n      }\n      return val;\n    };\n\n    XMLStringifier.prototype.xmlEncoding = function(val) {\n      val = '' + val || '';\n      if (!val.match(/[A-Za-z](?:[A-Za-z0-9._-]|-)*/)) {\n        throw new Error(\"Invalid encoding: \" + val);\n      }\n      return val;\n    };\n\n    XMLStringifier.prototype.xmlStandalone = function(val) {\n      if (val) {\n        return \"yes\";\n      } else {\n        return \"no\";\n      }\n    };\n\n    XMLStringifier.prototype.dtdPubID = function(val) {\n      return '' + val || '';\n    };\n\n    XMLStringifier.prototype.dtdSysID = function(val) {\n      return '' + val || '';\n    };\n\n    XMLStringifier.prototype.dtdElementValue = function(val) {\n      return '' + val || '';\n    };\n\n    XMLStringifier.prototype.dtdAttType = function(val) {\n      return '' + val || '';\n    };\n\n    XMLStringifier.prototype.dtdAttDefault = function(val) {\n      if (val != null) {\n        return '' + val || '';\n      } else {\n        return val;\n      }\n    };\n\n    XMLStringifier.prototype.dtdEntityValue = function(val) {\n      return '' + val || '';\n    };\n\n    XMLStringifier.prototype.dtdNData = function(val) {\n      return '' + val || '';\n    };\n\n    XMLStringifier.prototype.convertAttKey = '@';\n\n    XMLStringifier.prototype.convertPIKey = '?';\n\n    XMLStringifier.prototype.convertTextKey = '#text';\n\n    XMLStringifier.prototype.convertCDataKey = '#cdata';\n\n    XMLStringifier.prototype.convertCommentKey = '#comment';\n\n    XMLStringifier.prototype.convertRawKey = '#raw';\n\n    XMLStringifier.prototype.convertListKey = '#list';\n\n    XMLStringifier.prototype.assertLegalChar = function(str) {\n      var chars, chr;\n      if (this.allowSurrogateChars) {\n        chars = /[\\u0000-\\u0008\\u000B-\\u000C\\u000E-\\u001F\\uFFFE-\\uFFFF]/;\n      } else {\n        chars = /[\\u0000-\\u0008\\u000B-\\u000C\\u000E-\\u001F\\uD800-\\uDFFF\\uFFFE-\\uFFFF]/;\n      }\n      chr = str.match(chars);\n      if (chr) {\n        throw new Error(\"Invalid character (\" + chr + \") in string: \" + str + \" at index \" + chr.index);\n      }\n      return str;\n    };\n\n    XMLStringifier.prototype.elEscape = function(str) {\n      return str.replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;').replace(/\\r/g, '&#xD;');\n    };\n\n    XMLStringifier.prototype.attEscape = function(str) {\n      return str.replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/\"/g, '&quot;').replace(/\\t/g, '&#x9;').replace(/\\n/g, '&#xA;').replace(/\\r/g, '&#xD;');\n    };\n\n    return XMLStringifier;\n\n  })();\n\n}).call(this);\n\n},{}],170:[function(require,module,exports){\n// Generated by CoffeeScript 1.9.1\n(function() {\n  var XMLNode, XMLText, create,\n    extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },\n    hasProp = {}.hasOwnProperty;\n\n  create = require('lodash/object/create');\n\n  XMLNode = require('./XMLNode');\n\n  module.exports = XMLText = (function(superClass) {\n    extend(XMLText, superClass);\n\n    function XMLText(parent, text) {\n      XMLText.__super__.constructor.call(this, parent);\n      if (text == null) {\n        throw new Error(\"Missing element text\");\n      }\n      this.value = this.stringify.eleText(text);\n    }\n\n    XMLText.prototype.clone = function() {\n      return create(XMLText.prototype, this);\n    };\n\n    XMLText.prototype.toString = function(options, level) {\n      var indent, newline, offset, pretty, r, ref, ref1, ref2, space;\n      pretty = (options != null ? options.pretty : void 0) || false;\n      indent = (ref = options != null ? options.indent : void 0) != null ? ref : '  ';\n      offset = (ref1 = options != null ? options.offset : void 0) != null ? ref1 : 0;\n      newline = (ref2 = options != null ? options.newline : void 0) != null ? ref2 : '\\n';\n      level || (level = 0);\n      space = new Array(level + offset + 1).join(indent);\n      r = '';\n      if (pretty) {\n        r += space;\n      }\n      r += this.value;\n      if (pretty) {\n        r += newline;\n      }\n      return r;\n    };\n\n    return XMLText;\n\n  })(XMLNode);\n\n}).call(this);\n\n},{\"./XMLNode\":166,\"lodash/object/create\":225}],171:[function(require,module,exports){\n// Generated by CoffeeScript 1.9.1\n(function() {\n  var XMLBuilder, assign;\n\n  assign = require('lodash/object/assign');\n\n  XMLBuilder = require('./XMLBuilder');\n\n  module.exports.create = function(name, xmldec, doctype, options) {\n    options = assign({}, xmldec, doctype, options);\n    return new XMLBuilder(name, options).root();\n  };\n\n}).call(this);\n\n},{\"./XMLBuilder\":156,\"lodash/object/assign\":224}],172:[function(require,module,exports){\n/**\n * Gets the last element of `array`.\n *\n * @static\n * @memberOf _\n * @category Array\n * @param {Array} array The array to query.\n * @returns {*} Returns the last element of `array`.\n * @example\n *\n * _.last([1, 2, 3]);\n * // => 3\n */\nfunction last(array) {\n  var length = array ? array.length : 0;\n  return length ? array[length - 1] : undefined;\n}\n\nmodule.exports = last;\n\n},{}],173:[function(require,module,exports){\nvar arrayEvery = require('../internal/arrayEvery'),\n    baseCallback = require('../internal/baseCallback'),\n    baseEvery = require('../internal/baseEvery'),\n    isArray = require('../lang/isArray'),\n    isIterateeCall = require('../internal/isIterateeCall');\n\n/**\n * Checks if `predicate` returns truthy for **all** elements of `collection`.\n * The predicate is bound to `thisArg` and invoked with three arguments:\n * (value, index|key, collection).\n *\n * If a property name is provided for `predicate` the created `_.property`\n * style callback returns the property value of the given element.\n *\n * If a value is also provided for `thisArg` the created `_.matchesProperty`\n * style callback returns `true` for elements that have a matching property\n * value, else `false`.\n *\n * If an object is provided for `predicate` the created `_.matches` style\n * callback returns `true` for elements that have the properties of the given\n * object, else `false`.\n *\n * @static\n * @memberOf _\n * @alias all\n * @category Collection\n * @param {Array|Object|string} collection The collection to iterate over.\n * @param {Function|Object|string} [predicate=_.identity] The function invoked\n *  per iteration.\n * @param {*} [thisArg] The `this` binding of `predicate`.\n * @returns {boolean} Returns `true` if all elements pass the predicate check,\n *  else `false`.\n * @example\n *\n * _.every([true, 1, null, 'yes'], Boolean);\n * // => false\n *\n * var users = [\n *   { 'user': 'barney', 'active': false },\n *   { 'user': 'fred',   'active': false }\n * ];\n *\n * // using the `_.matches` callback shorthand\n * _.every(users, { 'user': 'barney', 'active': false });\n * // => false\n *\n * // using the `_.matchesProperty` callback shorthand\n * _.every(users, 'active', false);\n * // => true\n *\n * // using the `_.property` callback shorthand\n * _.every(users, 'active');\n * // => false\n */\nfunction every(collection, predicate, thisArg) {\n  var func = isArray(collection) ? arrayEvery : baseEvery;\n  if (thisArg && isIterateeCall(collection, predicate, thisArg)) {\n    predicate = undefined;\n  }\n  if (typeof predicate != 'function' || thisArg !== undefined) {\n    predicate = baseCallback(predicate, thisArg, 3);\n  }\n  return func(collection, predicate);\n}\n\nmodule.exports = every;\n\n},{\"../internal/arrayEvery\":175,\"../internal/baseCallback\":179,\"../internal/baseEvery\":183,\"../internal/isIterateeCall\":208,\"../lang/isArray\":217}],174:[function(require,module,exports){\n/** Used as the `TypeError` message for \"Functions\" methods. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/* Native method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max;\n\n/**\n * Creates a function that invokes `func` with the `this` binding of the\n * created function and arguments from `start` and beyond provided as an array.\n *\n * **Note:** This method is based on the [rest parameter](https://developer.mozilla.org/Web/JavaScript/Reference/Functions/rest_parameters).\n *\n * @static\n * @memberOf _\n * @category Function\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @returns {Function} Returns the new function.\n * @example\n *\n * var say = _.restParam(function(what, names) {\n *   return what + ' ' + _.initial(names).join(', ') +\n *     (_.size(names) > 1 ? ', & ' : '') + _.last(names);\n * });\n *\n * say('hello', 'fred', 'barney', 'pebbles');\n * // => 'hello fred, barney, & pebbles'\n */\nfunction restParam(func, start) {\n  if (typeof func != 'function') {\n    throw new TypeError(FUNC_ERROR_TEXT);\n  }\n  start = nativeMax(start === undefined ? (func.length - 1) : (+start || 0), 0);\n  return function() {\n    var args = arguments,\n        index = -1,\n        length = nativeMax(args.length - start, 0),\n        rest = Array(length);\n\n    while (++index < length) {\n      rest[index] = args[start + index];\n    }\n    switch (start) {\n      case 0: return func.call(this, rest);\n      case 1: return func.call(this, args[0], rest);\n      case 2: return func.call(this, args[0], args[1], rest);\n    }\n    var otherArgs = Array(start + 1);\n    index = -1;\n    while (++index < start) {\n      otherArgs[index] = args[index];\n    }\n    otherArgs[start] = rest;\n    return func.apply(this, otherArgs);\n  };\n}\n\nmodule.exports = restParam;\n\n},{}],175:[function(require,module,exports){\n/**\n * A specialized version of `_.every` for arrays without support for callback\n * shorthands and `this` binding.\n *\n * @private\n * @param {Array} array The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if all elements pass the predicate check,\n *  else `false`.\n */\nfunction arrayEvery(array, predicate) {\n  var index = -1,\n      length = array.length;\n\n  while (++index < length) {\n    if (!predicate(array[index], index, array)) {\n      return false;\n    }\n  }\n  return true;\n}\n\nmodule.exports = arrayEvery;\n\n},{}],176:[function(require,module,exports){\n/**\n * A specialized version of `_.some` for arrays without support for callback\n * shorthands and `this` binding.\n *\n * @private\n * @param {Array} array The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if any element passes the predicate check,\n *  else `false`.\n */\nfunction arraySome(array, predicate) {\n  var index = -1,\n      length = array.length;\n\n  while (++index < length) {\n    if (predicate(array[index], index, array)) {\n      return true;\n    }\n  }\n  return false;\n}\n\nmodule.exports = arraySome;\n\n},{}],177:[function(require,module,exports){\nvar keys = require('../object/keys');\n\n/**\n * A specialized version of `_.assign` for customizing assigned values without\n * support for argument juggling, multiple sources, and `this` binding `customizer`\n * functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @param {Function} customizer The function to customize assigned values.\n * @returns {Object} Returns `object`.\n */\nfunction assignWith(object, source, customizer) {\n  var index = -1,\n      props = keys(source),\n      length = props.length;\n\n  while (++index < length) {\n    var key = props[index],\n        value = object[key],\n        result = customizer(value, source[key], key, object, source);\n\n    if ((result === result ? (result !== value) : (value === value)) ||\n        (value === undefined && !(key in object))) {\n      object[key] = result;\n    }\n  }\n  return object;\n}\n\nmodule.exports = assignWith;\n\n},{\"../object/keys\":226}],178:[function(require,module,exports){\nvar baseCopy = require('./baseCopy'),\n    keys = require('../object/keys');\n\n/**\n * The base implementation of `_.assign` without support for argument juggling,\n * multiple sources, and `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @returns {Object} Returns `object`.\n */\nfunction baseAssign(object, source) {\n  return source == null\n    ? object\n    : baseCopy(source, keys(source), object);\n}\n\nmodule.exports = baseAssign;\n\n},{\"../object/keys\":226,\"./baseCopy\":180}],179:[function(require,module,exports){\nvar baseMatches = require('./baseMatches'),\n    baseMatchesProperty = require('./baseMatchesProperty'),\n    bindCallback = require('./bindCallback'),\n    identity = require('../utility/identity'),\n    property = require('../utility/property');\n\n/**\n * The base implementation of `_.callback` which supports specifying the\n * number of arguments to provide to `func`.\n *\n * @private\n * @param {*} [func=_.identity] The value to convert to a callback.\n * @param {*} [thisArg] The `this` binding of `func`.\n * @param {number} [argCount] The number of arguments to provide to `func`.\n * @returns {Function} Returns the callback.\n */\nfunction baseCallback(func, thisArg, argCount) {\n  var type = typeof func;\n  if (type == 'function') {\n    return thisArg === undefined\n      ? func\n      : bindCallback(func, thisArg, argCount);\n  }\n  if (func == null) {\n    return identity;\n  }\n  if (type == 'object') {\n    return baseMatches(func);\n  }\n  return thisArg === undefined\n    ? property(func)\n    : baseMatchesProperty(func, thisArg);\n}\n\nmodule.exports = baseCallback;\n\n},{\"../utility/identity\":229,\"../utility/property\":230,\"./baseMatches\":190,\"./baseMatchesProperty\":191,\"./bindCallback\":196}],180:[function(require,module,exports){\n/**\n * Copies properties of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy properties from.\n * @param {Array} props The property names to copy.\n * @param {Object} [object={}] The object to copy properties to.\n * @returns {Object} Returns `object`.\n */\nfunction baseCopy(source, props, object) {\n  object || (object = {});\n\n  var index = -1,\n      length = props.length;\n\n  while (++index < length) {\n    var key = props[index];\n    object[key] = source[key];\n  }\n  return object;\n}\n\nmodule.exports = baseCopy;\n\n},{}],181:[function(require,module,exports){\nvar isObject = require('../lang/isObject');\n\n/**\n * The base implementation of `_.create` without support for assigning\n * properties to the created object.\n *\n * @private\n * @param {Object} prototype The object to inherit from.\n * @returns {Object} Returns the new object.\n */\nvar baseCreate = (function() {\n  function object() {}\n  return function(prototype) {\n    if (isObject(prototype)) {\n      object.prototype = prototype;\n      var result = new object;\n      object.prototype = undefined;\n    }\n    return result || {};\n  };\n}());\n\nmodule.exports = baseCreate;\n\n},{\"../lang/isObject\":221}],182:[function(require,module,exports){\nvar baseForOwn = require('./baseForOwn'),\n    createBaseEach = require('./createBaseEach');\n\n/**\n * The base implementation of `_.forEach` without support for callback\n * shorthands and `this` binding.\n *\n * @private\n * @param {Array|Object|string} collection The collection to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array|Object|string} Returns `collection`.\n */\nvar baseEach = createBaseEach(baseForOwn);\n\nmodule.exports = baseEach;\n\n},{\"./baseForOwn\":185,\"./createBaseEach\":198}],183:[function(require,module,exports){\nvar baseEach = require('./baseEach');\n\n/**\n * The base implementation of `_.every` without support for callback\n * shorthands and `this` binding.\n *\n * @private\n * @param {Array|Object|string} collection The collection to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if all elements pass the predicate check,\n *  else `false`\n */\nfunction baseEvery(collection, predicate) {\n  var result = true;\n  baseEach(collection, function(value, index, collection) {\n    result = !!predicate(value, index, collection);\n    return result;\n  });\n  return result;\n}\n\nmodule.exports = baseEvery;\n\n},{\"./baseEach\":182}],184:[function(require,module,exports){\nvar createBaseFor = require('./createBaseFor');\n\n/**\n * The base implementation of `baseForIn` and `baseForOwn` which iterates\n * over `object` properties returned by `keysFunc` invoking `iteratee` for\n * each property. Iteratee functions may exit iteration early by explicitly\n * returning `false`.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @returns {Object} Returns `object`.\n */\nvar baseFor = createBaseFor();\n\nmodule.exports = baseFor;\n\n},{\"./createBaseFor\":199}],185:[function(require,module,exports){\nvar baseFor = require('./baseFor'),\n    keys = require('../object/keys');\n\n/**\n * The base implementation of `_.forOwn` without support for callback\n * shorthands and `this` binding.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Object} Returns `object`.\n */\nfunction baseForOwn(object, iteratee) {\n  return baseFor(object, iteratee, keys);\n}\n\nmodule.exports = baseForOwn;\n\n},{\"../object/keys\":226,\"./baseFor\":184}],186:[function(require,module,exports){\nvar toObject = require('./toObject');\n\n/**\n * The base implementation of `get` without support for string paths\n * and default values.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array} path The path of the property to get.\n * @param {string} [pathKey] The key representation of path.\n * @returns {*} Returns the resolved value.\n */\nfunction baseGet(object, path, pathKey) {\n  if (object == null) {\n    return;\n  }\n  if (pathKey !== undefined && pathKey in toObject(object)) {\n    path = [pathKey];\n  }\n  var index = 0,\n      length = path.length;\n\n  while (object != null && index < length) {\n    object = object[path[index++]];\n  }\n  return (index && index == length) ? object : undefined;\n}\n\nmodule.exports = baseGet;\n\n},{\"./toObject\":214}],187:[function(require,module,exports){\nvar baseIsEqualDeep = require('./baseIsEqualDeep'),\n    isObject = require('../lang/isObject'),\n    isObjectLike = require('./isObjectLike');\n\n/**\n * The base implementation of `_.isEqual` without support for `this` binding\n * `customizer` functions.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @param {Function} [customizer] The function to customize comparing values.\n * @param {boolean} [isLoose] Specify performing partial comparisons.\n * @param {Array} [stackA] Tracks traversed `value` objects.\n * @param {Array} [stackB] Tracks traversed `other` objects.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n */\nfunction baseIsEqual(value, other, customizer, isLoose, stackA, stackB) {\n  if (value === other) {\n    return true;\n  }\n  if (value == null || other == null || (!isObject(value) && !isObjectLike(other))) {\n    return value !== value && other !== other;\n  }\n  return baseIsEqualDeep(value, other, baseIsEqual, customizer, isLoose, stackA, stackB);\n}\n\nmodule.exports = baseIsEqual;\n\n},{\"../lang/isObject\":221,\"./baseIsEqualDeep\":188,\"./isObjectLike\":211}],188:[function(require,module,exports){\nvar equalArrays = require('./equalArrays'),\n    equalByTag = require('./equalByTag'),\n    equalObjects = require('./equalObjects'),\n    isArray = require('../lang/isArray'),\n    isTypedArray = require('../lang/isTypedArray');\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n    arrayTag = '[object Array]',\n    objectTag = '[object Object]';\n\n/** Used for native method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar objToString = objectProto.toString;\n\n/**\n * A specialized version of `baseIsEqual` for arrays and objects which performs\n * deep comparisons and tracks traversed objects enabling objects with circular\n * references to be compared.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Function} [customizer] The function to customize comparing objects.\n * @param {boolean} [isLoose] Specify performing partial comparisons.\n * @param {Array} [stackA=[]] Tracks traversed `value` objects.\n * @param {Array} [stackB=[]] Tracks traversed `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction baseIsEqualDeep(object, other, equalFunc, customizer, isLoose, stackA, stackB) {\n  var objIsArr = isArray(object),\n      othIsArr = isArray(other),\n      objTag = arrayTag,\n      othTag = arrayTag;\n\n  if (!objIsArr) {\n    objTag = objToString.call(object);\n    if (objTag == argsTag) {\n      objTag = objectTag;\n    } else if (objTag != objectTag) {\n      objIsArr = isTypedArray(object);\n    }\n  }\n  if (!othIsArr) {\n    othTag = objToString.call(other);\n    if (othTag == argsTag) {\n      othTag = objectTag;\n    } else if (othTag != objectTag) {\n      othIsArr = isTypedArray(other);\n    }\n  }\n  var objIsObj = objTag == objectTag,\n      othIsObj = othTag == objectTag,\n      isSameTag = objTag == othTag;\n\n  if (isSameTag && !(objIsArr || objIsObj)) {\n    return equalByTag(object, other, objTag);\n  }\n  if (!isLoose) {\n    var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),\n        othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');\n\n    if (objIsWrapped || othIsWrapped) {\n      return equalFunc(objIsWrapped ? object.value() : object, othIsWrapped ? other.value() : other, customizer, isLoose, stackA, stackB);\n    }\n  }\n  if (!isSameTag) {\n    return false;\n  }\n  // Assume cyclic values are equal.\n  // For more information on detecting circular references see https://es5.github.io/#JO.\n  stackA || (stackA = []);\n  stackB || (stackB = []);\n\n  var length = stackA.length;\n  while (length--) {\n    if (stackA[length] == object) {\n      return stackB[length] == other;\n    }\n  }\n  // Add `object` and `other` to the stack of traversed objects.\n  stackA.push(object);\n  stackB.push(other);\n\n  var result = (objIsArr ? equalArrays : equalObjects)(object, other, equalFunc, customizer, isLoose, stackA, stackB);\n\n  stackA.pop();\n  stackB.pop();\n\n  return result;\n}\n\nmodule.exports = baseIsEqualDeep;\n\n},{\"../lang/isArray\":217,\"../lang/isTypedArray\":223,\"./equalArrays\":200,\"./equalByTag\":201,\"./equalObjects\":202}],189:[function(require,module,exports){\nvar baseIsEqual = require('./baseIsEqual'),\n    toObject = require('./toObject');\n\n/**\n * The base implementation of `_.isMatch` without support for callback\n * shorthands and `this` binding.\n *\n * @private\n * @param {Object} object The object to inspect.\n * @param {Array} matchData The propery names, values, and compare flags to match.\n * @param {Function} [customizer] The function to customize comparing objects.\n * @returns {boolean} Returns `true` if `object` is a match, else `false`.\n */\nfunction baseIsMatch(object, matchData, customizer) {\n  var index = matchData.length,\n      length = index,\n      noCustomizer = !customizer;\n\n  if (object == null) {\n    return !length;\n  }\n  object = toObject(object);\n  while (index--) {\n    var data = matchData[index];\n    if ((noCustomizer && data[2])\n          ? data[1] !== object[data[0]]\n          : !(data[0] in object)\n        ) {\n      return false;\n    }\n  }\n  while (++index < length) {\n    data = matchData[index];\n    var key = data[0],\n        objValue = object[key],\n        srcValue = data[1];\n\n    if (noCustomizer && data[2]) {\n      if (objValue === undefined && !(key in object)) {\n        return false;\n      }\n    } else {\n      var result = customizer ? customizer(objValue, srcValue, key) : undefined;\n      if (!(result === undefined ? baseIsEqual(srcValue, objValue, customizer, true) : result)) {\n        return false;\n      }\n    }\n  }\n  return true;\n}\n\nmodule.exports = baseIsMatch;\n\n},{\"./baseIsEqual\":187,\"./toObject\":214}],190:[function(require,module,exports){\nvar baseIsMatch = require('./baseIsMatch'),\n    getMatchData = require('./getMatchData'),\n    toObject = require('./toObject');\n\n/**\n * The base implementation of `_.matches` which does not clone `source`.\n *\n * @private\n * @param {Object} source The object of property values to match.\n * @returns {Function} Returns the new function.\n */\nfunction baseMatches(source) {\n  var matchData = getMatchData(source);\n  if (matchData.length == 1 && matchData[0][2]) {\n    var key = matchData[0][0],\n        value = matchData[0][1];\n\n    return function(object) {\n      if (object == null) {\n        return false;\n      }\n      return object[key] === value && (value !== undefined || (key in toObject(object)));\n    };\n  }\n  return function(object) {\n    return baseIsMatch(object, matchData);\n  };\n}\n\nmodule.exports = baseMatches;\n\n},{\"./baseIsMatch\":189,\"./getMatchData\":204,\"./toObject\":214}],191:[function(require,module,exports){\nvar baseGet = require('./baseGet'),\n    baseIsEqual = require('./baseIsEqual'),\n    baseSlice = require('./baseSlice'),\n    isArray = require('../lang/isArray'),\n    isKey = require('./isKey'),\n    isStrictComparable = require('./isStrictComparable'),\n    last = require('../array/last'),\n    toObject = require('./toObject'),\n    toPath = require('./toPath');\n\n/**\n * The base implementation of `_.matchesProperty` which does not clone `srcValue`.\n *\n * @private\n * @param {string} path The path of the property to get.\n * @param {*} srcValue The value to compare.\n * @returns {Function} Returns the new function.\n */\nfunction baseMatchesProperty(path, srcValue) {\n  var isArr = isArray(path),\n      isCommon = isKey(path) && isStrictComparable(srcValue),\n      pathKey = (path + '');\n\n  path = toPath(path);\n  return function(object) {\n    if (object == null) {\n      return false;\n    }\n    var key = pathKey;\n    object = toObject(object);\n    if ((isArr || !isCommon) && !(key in object)) {\n      object = path.length == 1 ? object : baseGet(object, baseSlice(path, 0, -1));\n      if (object == null) {\n        return false;\n      }\n      key = last(path);\n      object = toObject(object);\n    }\n    return object[key] === srcValue\n      ? (srcValue !== undefined || (key in object))\n      : baseIsEqual(srcValue, object[key], undefined, true);\n  };\n}\n\nmodule.exports = baseMatchesProperty;\n\n},{\"../array/last\":172,\"../lang/isArray\":217,\"./baseGet\":186,\"./baseIsEqual\":187,\"./baseSlice\":194,\"./isKey\":209,\"./isStrictComparable\":212,\"./toObject\":214,\"./toPath\":215}],192:[function(require,module,exports){\n/**\n * The base implementation of `_.property` without support for deep paths.\n *\n * @private\n * @param {string} key The key of the property to get.\n * @returns {Function} Returns the new function.\n */\nfunction baseProperty(key) {\n  return function(object) {\n    return object == null ? undefined : object[key];\n  };\n}\n\nmodule.exports = baseProperty;\n\n},{}],193:[function(require,module,exports){\nvar baseGet = require('./baseGet'),\n    toPath = require('./toPath');\n\n/**\n * A specialized version of `baseProperty` which supports deep paths.\n *\n * @private\n * @param {Array|string} path The path of the property to get.\n * @returns {Function} Returns the new function.\n */\nfunction basePropertyDeep(path) {\n  var pathKey = (path + '');\n  path = toPath(path);\n  return function(object) {\n    return baseGet(object, path, pathKey);\n  };\n}\n\nmodule.exports = basePropertyDeep;\n\n},{\"./baseGet\":186,\"./toPath\":215}],194:[function(require,module,exports){\n/**\n * The base implementation of `_.slice` without an iteratee call guard.\n *\n * @private\n * @param {Array} array The array to slice.\n * @param {number} [start=0] The start position.\n * @param {number} [end=array.length] The end position.\n * @returns {Array} Returns the slice of `array`.\n */\nfunction baseSlice(array, start, end) {\n  var index = -1,\n      length = array.length;\n\n  start = start == null ? 0 : (+start || 0);\n  if (start < 0) {\n    start = -start > length ? 0 : (length + start);\n  }\n  end = (end === undefined || end > length) ? length : (+end || 0);\n  if (end < 0) {\n    end += length;\n  }\n  length = start > end ? 0 : ((end - start) >>> 0);\n  start >>>= 0;\n\n  var result = Array(length);\n  while (++index < length) {\n    result[index] = array[index + start];\n  }\n  return result;\n}\n\nmodule.exports = baseSlice;\n\n},{}],195:[function(require,module,exports){\n/**\n * Converts `value` to a string if it's not one. An empty string is returned\n * for `null` or `undefined` values.\n *\n * @private\n * @param {*} value The value to process.\n * @returns {string} Returns the string.\n */\nfunction baseToString(value) {\n  return value == null ? '' : (value + '');\n}\n\nmodule.exports = baseToString;\n\n},{}],196:[function(require,module,exports){\nvar identity = require('../utility/identity');\n\n/**\n * A specialized version of `baseCallback` which only supports `this` binding\n * and specifying the number of arguments to provide to `func`.\n *\n * @private\n * @param {Function} func The function to bind.\n * @param {*} thisArg The `this` binding of `func`.\n * @param {number} [argCount] The number of arguments to provide to `func`.\n * @returns {Function} Returns the callback.\n */\nfunction bindCallback(func, thisArg, argCount) {\n  if (typeof func != 'function') {\n    return identity;\n  }\n  if (thisArg === undefined) {\n    return func;\n  }\n  switch (argCount) {\n    case 1: return function(value) {\n      return func.call(thisArg, value);\n    };\n    case 3: return function(value, index, collection) {\n      return func.call(thisArg, value, index, collection);\n    };\n    case 4: return function(accumulator, value, index, collection) {\n      return func.call(thisArg, accumulator, value, index, collection);\n    };\n    case 5: return function(value, other, key, object, source) {\n      return func.call(thisArg, value, other, key, object, source);\n    };\n  }\n  return function() {\n    return func.apply(thisArg, arguments);\n  };\n}\n\nmodule.exports = bindCallback;\n\n},{\"../utility/identity\":229}],197:[function(require,module,exports){\nvar bindCallback = require('./bindCallback'),\n    isIterateeCall = require('./isIterateeCall'),\n    restParam = require('../function/restParam');\n\n/**\n * Creates a `_.assign`, `_.defaults`, or `_.merge` function.\n *\n * @private\n * @param {Function} assigner The function to assign values.\n * @returns {Function} Returns the new assigner function.\n */\nfunction createAssigner(assigner) {\n  return restParam(function(object, sources) {\n    var index = -1,\n        length = object == null ? 0 : sources.length,\n        customizer = length > 2 ? sources[length - 2] : undefined,\n        guard = length > 2 ? sources[2] : undefined,\n        thisArg = length > 1 ? sources[length - 1] : undefined;\n\n    if (typeof customizer == 'function') {\n      customizer = bindCallback(customizer, thisArg, 5);\n      length -= 2;\n    } else {\n      customizer = typeof thisArg == 'function' ? thisArg : undefined;\n      length -= (customizer ? 1 : 0);\n    }\n    if (guard && isIterateeCall(sources[0], sources[1], guard)) {\n      customizer = length < 3 ? undefined : customizer;\n      length = 1;\n    }\n    while (++index < length) {\n      var source = sources[index];\n      if (source) {\n        assigner(object, source, customizer);\n      }\n    }\n    return object;\n  });\n}\n\nmodule.exports = createAssigner;\n\n},{\"../function/restParam\":174,\"./bindCallback\":196,\"./isIterateeCall\":208}],198:[function(require,module,exports){\nvar getLength = require('./getLength'),\n    isLength = require('./isLength'),\n    toObject = require('./toObject');\n\n/**\n * Creates a `baseEach` or `baseEachRight` function.\n *\n * @private\n * @param {Function} eachFunc The function to iterate over a collection.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new base function.\n */\nfunction createBaseEach(eachFunc, fromRight) {\n  return function(collection, iteratee) {\n    var length = collection ? getLength(collection) : 0;\n    if (!isLength(length)) {\n      return eachFunc(collection, iteratee);\n    }\n    var index = fromRight ? length : -1,\n        iterable = toObject(collection);\n\n    while ((fromRight ? index-- : ++index < length)) {\n      if (iteratee(iterable[index], index, iterable) === false) {\n        break;\n      }\n    }\n    return collection;\n  };\n}\n\nmodule.exports = createBaseEach;\n\n},{\"./getLength\":203,\"./isLength\":210,\"./toObject\":214}],199:[function(require,module,exports){\nvar toObject = require('./toObject');\n\n/**\n * Creates a base function for `_.forIn` or `_.forInRight`.\n *\n * @private\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new base function.\n */\nfunction createBaseFor(fromRight) {\n  return function(object, iteratee, keysFunc) {\n    var iterable = toObject(object),\n        props = keysFunc(object),\n        length = props.length,\n        index = fromRight ? length : -1;\n\n    while ((fromRight ? index-- : ++index < length)) {\n      var key = props[index];\n      if (iteratee(iterable[key], key, iterable) === false) {\n        break;\n      }\n    }\n    return object;\n  };\n}\n\nmodule.exports = createBaseFor;\n\n},{\"./toObject\":214}],200:[function(require,module,exports){\nvar arraySome = require('./arraySome');\n\n/**\n * A specialized version of `baseIsEqualDeep` for arrays with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Array} array The array to compare.\n * @param {Array} other The other array to compare.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Function} [customizer] The function to customize comparing arrays.\n * @param {boolean} [isLoose] Specify performing partial comparisons.\n * @param {Array} [stackA] Tracks traversed `value` objects.\n * @param {Array} [stackB] Tracks traversed `other` objects.\n * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.\n */\nfunction equalArrays(array, other, equalFunc, customizer, isLoose, stackA, stackB) {\n  var index = -1,\n      arrLength = array.length,\n      othLength = other.length;\n\n  if (arrLength != othLength && !(isLoose && othLength > arrLength)) {\n    return false;\n  }\n  // Ignore non-index properties.\n  while (++index < arrLength) {\n    var arrValue = array[index],\n        othValue = other[index],\n        result = customizer ? customizer(isLoose ? othValue : arrValue, isLoose ? arrValue : othValue, index) : undefined;\n\n    if (result !== undefined) {\n      if (result) {\n        continue;\n      }\n      return false;\n    }\n    // Recursively compare arrays (susceptible to call stack limits).\n    if (isLoose) {\n      if (!arraySome(other, function(othValue) {\n            return arrValue === othValue || equalFunc(arrValue, othValue, customizer, isLoose, stackA, stackB);\n          })) {\n        return false;\n      }\n    } else if (!(arrValue === othValue || equalFunc(arrValue, othValue, customizer, isLoose, stackA, stackB))) {\n      return false;\n    }\n  }\n  return true;\n}\n\nmodule.exports = equalArrays;\n\n},{\"./arraySome\":176}],201:[function(require,module,exports){\n/** `Object#toString` result references. */\nvar boolTag = '[object Boolean]',\n    dateTag = '[object Date]',\n    errorTag = '[object Error]',\n    numberTag = '[object Number]',\n    regexpTag = '[object RegExp]',\n    stringTag = '[object String]';\n\n/**\n * A specialized version of `baseIsEqualDeep` for comparing objects of\n * the same `toStringTag`.\n *\n * **Note:** This function only supports comparing values with tags of\n * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {string} tag The `toStringTag` of the objects to compare.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalByTag(object, other, tag) {\n  switch (tag) {\n    case boolTag:\n    case dateTag:\n      // Coerce dates and booleans to numbers, dates to milliseconds and booleans\n      // to `1` or `0` treating invalid dates coerced to `NaN` as not equal.\n      return +object == +other;\n\n    case errorTag:\n      return object.name == other.name && object.message == other.message;\n\n    case numberTag:\n      // Treat `NaN` vs. `NaN` as equal.\n      return (object != +object)\n        ? other != +other\n        : object == +other;\n\n    case regexpTag:\n    case stringTag:\n      // Coerce regexes to strings and treat strings primitives and string\n      // objects as equal. See https://es5.github.io/#x15.10.6.4 for more details.\n      return object == (other + '');\n  }\n  return false;\n}\n\nmodule.exports = equalByTag;\n\n},{}],202:[function(require,module,exports){\nvar keys = require('../object/keys');\n\n/** Used for native method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * A specialized version of `baseIsEqualDeep` for objects with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Function} [customizer] The function to customize comparing values.\n * @param {boolean} [isLoose] Specify performing partial comparisons.\n * @param {Array} [stackA] Tracks traversed `value` objects.\n * @param {Array} [stackB] Tracks traversed `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalObjects(object, other, equalFunc, customizer, isLoose, stackA, stackB) {\n  var objProps = keys(object),\n      objLength = objProps.length,\n      othProps = keys(other),\n      othLength = othProps.length;\n\n  if (objLength != othLength && !isLoose) {\n    return false;\n  }\n  var index = objLength;\n  while (index--) {\n    var key = objProps[index];\n    if (!(isLoose ? key in other : hasOwnProperty.call(other, key))) {\n      return false;\n    }\n  }\n  var skipCtor = isLoose;\n  while (++index < objLength) {\n    key = objProps[index];\n    var objValue = object[key],\n        othValue = other[key],\n        result = customizer ? customizer(isLoose ? othValue : objValue, isLoose? objValue : othValue, key) : undefined;\n\n    // Recursively compare objects (susceptible to call stack limits).\n    if (!(result === undefined ? equalFunc(objValue, othValue, customizer, isLoose, stackA, stackB) : result)) {\n      return false;\n    }\n    skipCtor || (skipCtor = key == 'constructor');\n  }\n  if (!skipCtor) {\n    var objCtor = object.constructor,\n        othCtor = other.constructor;\n\n    // Non `Object` object instances with different constructors are not equal.\n    if (objCtor != othCtor &&\n        ('constructor' in object && 'constructor' in other) &&\n        !(typeof objCtor == 'function' && objCtor instanceof objCtor &&\n          typeof othCtor == 'function' && othCtor instanceof othCtor)) {\n      return false;\n    }\n  }\n  return true;\n}\n\nmodule.exports = equalObjects;\n\n},{\"../object/keys\":226}],203:[function(require,module,exports){\nvar baseProperty = require('./baseProperty');\n\n/**\n * Gets the \"length\" property value of `object`.\n *\n * **Note:** This function is used to avoid a [JIT bug](https://bugs.webkit.org/show_bug.cgi?id=142792)\n * that affects Safari on at least iOS 8.1-8.3 ARM64.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {*} Returns the \"length\" value.\n */\nvar getLength = baseProperty('length');\n\nmodule.exports = getLength;\n\n},{\"./baseProperty\":192}],204:[function(require,module,exports){\nvar isStrictComparable = require('./isStrictComparable'),\n    pairs = require('../object/pairs');\n\n/**\n * Gets the propery names, values, and compare flags of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the match data of `object`.\n */\nfunction getMatchData(object) {\n  var result = pairs(object),\n      length = result.length;\n\n  while (length--) {\n    result[length][2] = isStrictComparable(result[length][1]);\n  }\n  return result;\n}\n\nmodule.exports = getMatchData;\n\n},{\"../object/pairs\":228,\"./isStrictComparable\":212}],205:[function(require,module,exports){\nvar isNative = require('../lang/isNative');\n\n/**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\nfunction getNative(object, key) {\n  var value = object == null ? undefined : object[key];\n  return isNative(value) ? value : undefined;\n}\n\nmodule.exports = getNative;\n\n},{\"../lang/isNative\":220}],206:[function(require,module,exports){\nvar getLength = require('./getLength'),\n    isLength = require('./isLength');\n\n/**\n * Checks if `value` is array-like.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n */\nfunction isArrayLike(value) {\n  return value != null && isLength(getLength(value));\n}\n\nmodule.exports = isArrayLike;\n\n},{\"./getLength\":203,\"./isLength\":210}],207:[function(require,module,exports){\n/** Used to detect unsigned integer values. */\nvar reIsUint = /^\\d+$/;\n\n/**\n * Used as the [maximum length](http://ecma-international.org/ecma-262/6.0/#sec-number.max_safe_integer)\n * of an array-like value.\n */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/**\n * Checks if `value` is a valid array-like index.\n *\n * @private\n * @param {*} value The value to check.\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n */\nfunction isIndex(value, length) {\n  value = (typeof value == 'number' || reIsUint.test(value)) ? +value : -1;\n  length = length == null ? MAX_SAFE_INTEGER : length;\n  return value > -1 && value % 1 == 0 && value < length;\n}\n\nmodule.exports = isIndex;\n\n},{}],208:[function(require,module,exports){\nvar isArrayLike = require('./isArrayLike'),\n    isIndex = require('./isIndex'),\n    isObject = require('../lang/isObject');\n\n/**\n * Checks if the provided arguments are from an iteratee call.\n *\n * @private\n * @param {*} value The potential iteratee value argument.\n * @param {*} index The potential iteratee index or key argument.\n * @param {*} object The potential iteratee object argument.\n * @returns {boolean} Returns `true` if the arguments are from an iteratee call, else `false`.\n */\nfunction isIterateeCall(value, index, object) {\n  if (!isObject(object)) {\n    return false;\n  }\n  var type = typeof index;\n  if (type == 'number'\n      ? (isArrayLike(object) && isIndex(index, object.length))\n      : (type == 'string' && index in object)) {\n    var other = object[index];\n    return value === value ? (value === other) : (other !== other);\n  }\n  return false;\n}\n\nmodule.exports = isIterateeCall;\n\n},{\"../lang/isObject\":221,\"./isArrayLike\":206,\"./isIndex\":207}],209:[function(require,module,exports){\nvar isArray = require('../lang/isArray'),\n    toObject = require('./toObject');\n\n/** Used to match property names within property paths. */\nvar reIsDeepProp = /\\.|\\[(?:[^[\\]]*|([\"'])(?:(?!\\1)[^\\n\\\\]|\\\\.)*?\\1)\\]/,\n    reIsPlainProp = /^\\w*$/;\n\n/**\n * Checks if `value` is a property name and not a property path.\n *\n * @private\n * @param {*} value The value to check.\n * @param {Object} [object] The object to query keys on.\n * @returns {boolean} Returns `true` if `value` is a property name, else `false`.\n */\nfunction isKey(value, object) {\n  var type = typeof value;\n  if ((type == 'string' && reIsPlainProp.test(value)) || type == 'number') {\n    return true;\n  }\n  if (isArray(value)) {\n    return false;\n  }\n  var result = !reIsDeepProp.test(value);\n  return result || (object != null && value in toObject(object));\n}\n\nmodule.exports = isKey;\n\n},{\"../lang/isArray\":217,\"./toObject\":214}],210:[function(require,module,exports){\n/**\n * Used as the [maximum length](http://ecma-international.org/ecma-262/6.0/#sec-number.max_safe_integer)\n * of an array-like value.\n */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This function is based on [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength).\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n */\nfunction isLength(value) {\n  return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n}\n\nmodule.exports = isLength;\n\n},{}],211:[function(require,module,exports){\n/**\n * Checks if `value` is object-like.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n */\nfunction isObjectLike(value) {\n  return !!value && typeof value == 'object';\n}\n\nmodule.exports = isObjectLike;\n\n},{}],212:[function(require,module,exports){\nvar isObject = require('../lang/isObject');\n\n/**\n * Checks if `value` is suitable for strict equality comparisons, i.e. `===`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` if suitable for strict\n *  equality comparisons, else `false`.\n */\nfunction isStrictComparable(value) {\n  return value === value && !isObject(value);\n}\n\nmodule.exports = isStrictComparable;\n\n},{\"../lang/isObject\":221}],213:[function(require,module,exports){\nvar isArguments = require('../lang/isArguments'),\n    isArray = require('../lang/isArray'),\n    isIndex = require('./isIndex'),\n    isLength = require('./isLength'),\n    keysIn = require('../object/keysIn');\n\n/** Used for native method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * A fallback implementation of `Object.keys` which creates an array of the\n * own enumerable property names of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction shimKeys(object) {\n  var props = keysIn(object),\n      propsLength = props.length,\n      length = propsLength && object.length;\n\n  var allowIndexes = !!length && isLength(length) &&\n    (isArray(object) || isArguments(object));\n\n  var index = -1,\n      result = [];\n\n  while (++index < propsLength) {\n    var key = props[index];\n    if ((allowIndexes && isIndex(key, length)) || hasOwnProperty.call(object, key)) {\n      result.push(key);\n    }\n  }\n  return result;\n}\n\nmodule.exports = shimKeys;\n\n},{\"../lang/isArguments\":216,\"../lang/isArray\":217,\"../object/keysIn\":227,\"./isIndex\":207,\"./isLength\":210}],214:[function(require,module,exports){\nvar isObject = require('../lang/isObject');\n\n/**\n * Converts `value` to an object if it's not one.\n *\n * @private\n * @param {*} value The value to process.\n * @returns {Object} Returns the object.\n */\nfunction toObject(value) {\n  return isObject(value) ? value : Object(value);\n}\n\nmodule.exports = toObject;\n\n},{\"../lang/isObject\":221}],215:[function(require,module,exports){\nvar baseToString = require('./baseToString'),\n    isArray = require('../lang/isArray');\n\n/** Used to match property names within property paths. */\nvar rePropName = /[^.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\n\\\\]|\\\\.)*?)\\2)\\]/g;\n\n/** Used to match backslashes in property paths. */\nvar reEscapeChar = /\\\\(\\\\)?/g;\n\n/**\n * Converts `value` to property path array if it's not one.\n *\n * @private\n * @param {*} value The value to process.\n * @returns {Array} Returns the property path array.\n */\nfunction toPath(value) {\n  if (isArray(value)) {\n    return value;\n  }\n  var result = [];\n  baseToString(value).replace(rePropName, function(match, number, quote, string) {\n    result.push(quote ? string.replace(reEscapeChar, '$1') : (number || match));\n  });\n  return result;\n}\n\nmodule.exports = toPath;\n\n},{\"../lang/isArray\":217,\"./baseToString\":195}],216:[function(require,module,exports){\nvar isArrayLike = require('../internal/isArrayLike'),\n    isObjectLike = require('../internal/isObjectLike');\n\n/** Used for native method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Native method references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/**\n * Checks if `value` is classified as an `arguments` object.\n *\n * @static\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.\n * @example\n *\n * _.isArguments(function() { return arguments; }());\n * // => true\n *\n * _.isArguments([1, 2, 3]);\n * // => false\n */\nfunction isArguments(value) {\n  return isObjectLike(value) && isArrayLike(value) &&\n    hasOwnProperty.call(value, 'callee') && !propertyIsEnumerable.call(value, 'callee');\n}\n\nmodule.exports = isArguments;\n\n},{\"../internal/isArrayLike\":206,\"../internal/isObjectLike\":211}],217:[function(require,module,exports){\nvar getNative = require('../internal/getNative'),\n    isLength = require('../internal/isLength'),\n    isObjectLike = require('../internal/isObjectLike');\n\n/** `Object#toString` result references. */\nvar arrayTag = '[object Array]';\n\n/** Used for native method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar objToString = objectProto.toString;\n\n/* Native method references for those with the same name as other `lodash` methods. */\nvar nativeIsArray = getNative(Array, 'isArray');\n\n/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(function() { return arguments; }());\n * // => false\n */\nvar isArray = nativeIsArray || function(value) {\n  return isObjectLike(value) && isLength(value.length) && objToString.call(value) == arrayTag;\n};\n\nmodule.exports = isArray;\n\n},{\"../internal/getNative\":205,\"../internal/isLength\":210,\"../internal/isObjectLike\":211}],218:[function(require,module,exports){\nvar isArguments = require('./isArguments'),\n    isArray = require('./isArray'),\n    isArrayLike = require('../internal/isArrayLike'),\n    isFunction = require('./isFunction'),\n    isObjectLike = require('../internal/isObjectLike'),\n    isString = require('./isString'),\n    keys = require('../object/keys');\n\n/**\n * Checks if `value` is empty. A value is considered empty unless it's an\n * `arguments` object, array, string, or jQuery-like collection with a length\n * greater than `0` or an object with own enumerable properties.\n *\n * @static\n * @memberOf _\n * @category Lang\n * @param {Array|Object|string} value The value to inspect.\n * @returns {boolean} Returns `true` if `value` is empty, else `false`.\n * @example\n *\n * _.isEmpty(null);\n * // => true\n *\n * _.isEmpty(true);\n * // => true\n *\n * _.isEmpty(1);\n * // => true\n *\n * _.isEmpty([1, 2, 3]);\n * // => false\n *\n * _.isEmpty({ 'a': 1 });\n * // => false\n */\nfunction isEmpty(value) {\n  if (value == null) {\n    return true;\n  }\n  if (isArrayLike(value) && (isArray(value) || isString(value) || isArguments(value) ||\n      (isObjectLike(value) && isFunction(value.splice)))) {\n    return !value.length;\n  }\n  return !keys(value).length;\n}\n\nmodule.exports = isEmpty;\n\n},{\"../internal/isArrayLike\":206,\"../internal/isObjectLike\":211,\"../object/keys\":226,\"./isArguments\":216,\"./isArray\":217,\"./isFunction\":219,\"./isString\":222}],219:[function(require,module,exports){\nvar isObject = require('./isObject');\n\n/** `Object#toString` result references. */\nvar funcTag = '[object Function]';\n\n/** Used for native method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar objToString = objectProto.toString;\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n  // The use of `Object#toString` avoids issues with the `typeof` operator\n  // in older versions of Chrome and Safari which return 'function' for regexes\n  // and Safari 8 which returns 'object' for typed array constructors.\n  return isObject(value) && objToString.call(value) == funcTag;\n}\n\nmodule.exports = isFunction;\n\n},{\"./isObject\":221}],220:[function(require,module,exports){\nvar isFunction = require('./isFunction'),\n    isObjectLike = require('../internal/isObjectLike');\n\n/** Used to detect host constructors (Safari > 5). */\nvar reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n/** Used for native method references. */\nvar objectProto = Object.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar fnToString = Function.prototype.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Used to detect if a method is native. */\nvar reIsNative = RegExp('^' +\n  fnToString.call(hasOwnProperty).replace(/[\\\\^$.*+?()[\\]{}|]/g, '\\\\$&')\n  .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n);\n\n/**\n * Checks if `value` is a native function.\n *\n * @static\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function, else `false`.\n * @example\n *\n * _.isNative(Array.prototype.push);\n * // => true\n *\n * _.isNative(_);\n * // => false\n */\nfunction isNative(value) {\n  if (value == null) {\n    return false;\n  }\n  if (isFunction(value)) {\n    return reIsNative.test(fnToString.call(value));\n  }\n  return isObjectLike(value) && reIsHostCtor.test(value);\n}\n\nmodule.exports = isNative;\n\n},{\"../internal/isObjectLike\":211,\"./isFunction\":219}],221:[function(require,module,exports){\n/**\n * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`.\n * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(1);\n * // => false\n */\nfunction isObject(value) {\n  // Avoid a V8 JIT bug in Chrome 19-20.\n  // See https://code.google.com/p/v8/issues/detail?id=2291 for more details.\n  var type = typeof value;\n  return !!value && (type == 'object' || type == 'function');\n}\n\nmodule.exports = isObject;\n\n},{}],222:[function(require,module,exports){\nvar isObjectLike = require('../internal/isObjectLike');\n\n/** `Object#toString` result references. */\nvar stringTag = '[object String]';\n\n/** Used for native method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar objToString = objectProto.toString;\n\n/**\n * Checks if `value` is classified as a `String` primitive or object.\n *\n * @static\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.\n * @example\n *\n * _.isString('abc');\n * // => true\n *\n * _.isString(1);\n * // => false\n */\nfunction isString(value) {\n  return typeof value == 'string' || (isObjectLike(value) && objToString.call(value) == stringTag);\n}\n\nmodule.exports = isString;\n\n},{\"../internal/isObjectLike\":211}],223:[function(require,module,exports){\nvar isLength = require('../internal/isLength'),\n    isObjectLike = require('../internal/isObjectLike');\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n    arrayTag = '[object Array]',\n    boolTag = '[object Boolean]',\n    dateTag = '[object Date]',\n    errorTag = '[object Error]',\n    funcTag = '[object Function]',\n    mapTag = '[object Map]',\n    numberTag = '[object Number]',\n    objectTag = '[object Object]',\n    regexpTag = '[object RegExp]',\n    setTag = '[object Set]',\n    stringTag = '[object String]',\n    weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n    float32Tag = '[object Float32Array]',\n    float64Tag = '[object Float64Array]',\n    int8Tag = '[object Int8Array]',\n    int16Tag = '[object Int16Array]',\n    int32Tag = '[object Int32Array]',\n    uint8Tag = '[object Uint8Array]',\n    uint8ClampedTag = '[object Uint8ClampedArray]',\n    uint16Tag = '[object Uint16Array]',\n    uint32Tag = '[object Uint32Array]';\n\n/** Used to identify `toStringTag` values of typed arrays. */\nvar typedArrayTags = {};\ntypedArrayTags[float32Tag] = typedArrayTags[float64Tag] =\ntypedArrayTags[int8Tag] = typedArrayTags[int16Tag] =\ntypedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =\ntypedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =\ntypedArrayTags[uint32Tag] = true;\ntypedArrayTags[argsTag] = typedArrayTags[arrayTag] =\ntypedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =\ntypedArrayTags[dateTag] = typedArrayTags[errorTag] =\ntypedArrayTags[funcTag] = typedArrayTags[mapTag] =\ntypedArrayTags[numberTag] = typedArrayTags[objectTag] =\ntypedArrayTags[regexpTag] = typedArrayTags[setTag] =\ntypedArrayTags[stringTag] = typedArrayTags[weakMapTag] = false;\n\n/** Used for native method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar objToString = objectProto.toString;\n\n/**\n * Checks if `value` is classified as a typed array.\n *\n * @static\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.\n * @example\n *\n * _.isTypedArray(new Uint8Array);\n * // => true\n *\n * _.isTypedArray([]);\n * // => false\n */\nfunction isTypedArray(value) {\n  return isObjectLike(value) && isLength(value.length) && !!typedArrayTags[objToString.call(value)];\n}\n\nmodule.exports = isTypedArray;\n\n},{\"../internal/isLength\":210,\"../internal/isObjectLike\":211}],224:[function(require,module,exports){\nvar assignWith = require('../internal/assignWith'),\n    baseAssign = require('../internal/baseAssign'),\n    createAssigner = require('../internal/createAssigner');\n\n/**\n * Assigns own enumerable properties of source object(s) to the destination\n * object. Subsequent sources overwrite property assignments of previous sources.\n * If `customizer` is provided it's invoked to produce the assigned values.\n * The `customizer` is bound to `thisArg` and invoked with five arguments:\n * (objectValue, sourceValue, key, object, source).\n *\n * **Note:** This method mutates `object` and is based on\n * [`Object.assign`](http://ecma-international.org/ecma-262/6.0/#sec-object.assign).\n *\n * @static\n * @memberOf _\n * @alias extend\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} [sources] The source objects.\n * @param {Function} [customizer] The function to customize assigned values.\n * @param {*} [thisArg] The `this` binding of `customizer`.\n * @returns {Object} Returns `object`.\n * @example\n *\n * _.assign({ 'user': 'barney' }, { 'age': 40 }, { 'user': 'fred' });\n * // => { 'user': 'fred', 'age': 40 }\n *\n * // using a customizer callback\n * var defaults = _.partialRight(_.assign, function(value, other) {\n *   return _.isUndefined(value) ? other : value;\n * });\n *\n * defaults({ 'user': 'barney' }, { 'age': 36 }, { 'user': 'fred' });\n * // => { 'user': 'barney', 'age': 36 }\n */\nvar assign = createAssigner(function(object, source, customizer) {\n  return customizer\n    ? assignWith(object, source, customizer)\n    : baseAssign(object, source);\n});\n\nmodule.exports = assign;\n\n},{\"../internal/assignWith\":177,\"../internal/baseAssign\":178,\"../internal/createAssigner\":197}],225:[function(require,module,exports){\nvar baseAssign = require('../internal/baseAssign'),\n    baseCreate = require('../internal/baseCreate'),\n    isIterateeCall = require('../internal/isIterateeCall');\n\n/**\n * Creates an object that inherits from the given `prototype` object. If a\n * `properties` object is provided its own enumerable properties are assigned\n * to the created object.\n *\n * @static\n * @memberOf _\n * @category Object\n * @param {Object} prototype The object to inherit from.\n * @param {Object} [properties] The properties to assign to the object.\n * @param- {Object} [guard] Enables use as a callback for functions like `_.map`.\n * @returns {Object} Returns the new object.\n * @example\n *\n * function Shape() {\n *   this.x = 0;\n *   this.y = 0;\n * }\n *\n * function Circle() {\n *   Shape.call(this);\n * }\n *\n * Circle.prototype = _.create(Shape.prototype, {\n *   'constructor': Circle\n * });\n *\n * var circle = new Circle;\n * circle instanceof Circle;\n * // => true\n *\n * circle instanceof Shape;\n * // => true\n */\nfunction create(prototype, properties, guard) {\n  var result = baseCreate(prototype);\n  if (guard && isIterateeCall(prototype, properties, guard)) {\n    properties = undefined;\n  }\n  return properties ? baseAssign(result, properties) : result;\n}\n\nmodule.exports = create;\n\n},{\"../internal/baseAssign\":178,\"../internal/baseCreate\":181,\"../internal/isIterateeCall\":208}],226:[function(require,module,exports){\nvar getNative = require('../internal/getNative'),\n    isArrayLike = require('../internal/isArrayLike'),\n    isObject = require('../lang/isObject'),\n    shimKeys = require('../internal/shimKeys');\n\n/* Native method references for those with the same name as other `lodash` methods. */\nvar nativeKeys = getNative(Object, 'keys');\n\n/**\n * Creates an array of the own enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects. See the\n * [ES spec](http://ecma-international.org/ecma-262/6.0/#sec-object.keys)\n * for more details.\n *\n * @static\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n *   this.a = 1;\n *   this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keys(new Foo);\n * // => ['a', 'b'] (iteration order is not guaranteed)\n *\n * _.keys('hi');\n * // => ['0', '1']\n */\nvar keys = !nativeKeys ? shimKeys : function(object) {\n  var Ctor = object == null ? undefined : object.constructor;\n  if ((typeof Ctor == 'function' && Ctor.prototype === object) ||\n      (typeof object != 'function' && isArrayLike(object))) {\n    return shimKeys(object);\n  }\n  return isObject(object) ? nativeKeys(object) : [];\n};\n\nmodule.exports = keys;\n\n},{\"../internal/getNative\":205,\"../internal/isArrayLike\":206,\"../internal/shimKeys\":213,\"../lang/isObject\":221}],227:[function(require,module,exports){\nvar isArguments = require('../lang/isArguments'),\n    isArray = require('../lang/isArray'),\n    isIndex = require('../internal/isIndex'),\n    isLength = require('../internal/isLength'),\n    isObject = require('../lang/isObject');\n\n/** Used for native method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Creates an array of the own and inherited enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects.\n *\n * @static\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n *   this.a = 1;\n *   this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keysIn(new Foo);\n * // => ['a', 'b', 'c'] (iteration order is not guaranteed)\n */\nfunction keysIn(object) {\n  if (object == null) {\n    return [];\n  }\n  if (!isObject(object)) {\n    object = Object(object);\n  }\n  var length = object.length;\n  length = (length && isLength(length) &&\n    (isArray(object) || isArguments(object)) && length) || 0;\n\n  var Ctor = object.constructor,\n      index = -1,\n      isProto = typeof Ctor == 'function' && Ctor.prototype === object,\n      result = Array(length),\n      skipIndexes = length > 0;\n\n  while (++index < length) {\n    result[index] = (index + '');\n  }\n  for (var key in object) {\n    if (!(skipIndexes && isIndex(key, length)) &&\n        !(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {\n      result.push(key);\n    }\n  }\n  return result;\n}\n\nmodule.exports = keysIn;\n\n},{\"../internal/isIndex\":207,\"../internal/isLength\":210,\"../lang/isArguments\":216,\"../lang/isArray\":217,\"../lang/isObject\":221}],228:[function(require,module,exports){\nvar keys = require('./keys'),\n    toObject = require('../internal/toObject');\n\n/**\n * Creates a two dimensional array of the key-value pairs for `object`,\n * e.g. `[[key1, value1], [key2, value2]]`.\n *\n * @static\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the new array of key-value pairs.\n * @example\n *\n * _.pairs({ 'barney': 36, 'fred': 40 });\n * // => [['barney', 36], ['fred', 40]] (iteration order is not guaranteed)\n */\nfunction pairs(object) {\n  object = toObject(object);\n\n  var index = -1,\n      props = keys(object),\n      length = props.length,\n      result = Array(length);\n\n  while (++index < length) {\n    var key = props[index];\n    result[index] = [key, object[key]];\n  }\n  return result;\n}\n\nmodule.exports = pairs;\n\n},{\"../internal/toObject\":214,\"./keys\":226}],229:[function(require,module,exports){\n/**\n * This method returns the first argument provided to it.\n *\n * @static\n * @memberOf _\n * @category Utility\n * @param {*} value Any value.\n * @returns {*} Returns `value`.\n * @example\n *\n * var object = { 'user': 'fred' };\n *\n * _.identity(object) === object;\n * // => true\n */\nfunction identity(value) {\n  return value;\n}\n\nmodule.exports = identity;\n\n},{}],230:[function(require,module,exports){\nvar baseProperty = require('../internal/baseProperty'),\n    basePropertyDeep = require('../internal/basePropertyDeep'),\n    isKey = require('../internal/isKey');\n\n/**\n * Creates a function that returns the property value at `path` on a\n * given object.\n *\n * @static\n * @memberOf _\n * @category Utility\n * @param {Array|string} path The path of the property to get.\n * @returns {Function} Returns the new function.\n * @example\n *\n * var objects = [\n *   { 'a': { 'b': { 'c': 2 } } },\n *   { 'a': { 'b': { 'c': 1 } } }\n * ];\n *\n * _.map(objects, _.property('a.b.c'));\n * // => [2, 1]\n *\n * _.pluck(_.sortBy(objects, _.property(['a', 'b', 'c'])), 'a.b.c');\n * // => [1, 2]\n */\nfunction property(path) {\n  return isKey(path) ? baseProperty(path) : basePropertyDeep(path);\n}\n\nmodule.exports = property;\n\n},{\"../internal/baseProperty\":192,\"../internal/basePropertyDeep\":193,\"../internal/isKey\":209}]},{},[22])(22)\n});"
  },
  {
    "path": "static/mergely/editor/editor.css",
    "content": "body { margin: 0; }\n#banner { background: transparent url(images/banner.png); width: 33px; height: 30px; position: absolute; left: 3px; top: 3px; }\n.wicked-menu { font-family: 'Noto Sans', sans-serif; margin: 2px 0 2px 40px; }\n.wicked-menu a.link { margin-left: 10px; }\n.ui-widget { font-size:13px; }\n\n/* color dialog */\n#dialog-colors { }\n#dialog-colors label { width: 85px; display: inline-block; font-weight: bold; padding: 5px; }\n#dialog-colors input[type=text] { width: 70px; border: 1px solid #444; float:right; }\n#dialog-colors fieldset { -webkit-border-radius: 2px; -moz-border-radius: 2px; border-radius: 2px; border: 1px solid #ccc; width: 222px; padding-right: 15px; }\n\n/* import dialog */\n#dialog-upload label { font-weight: bold; display: inline-block; width: 80px; line-height: 1.5em; }\n.no-title .ui-dialog-titlebar { display:none; }\n.no-title .ui-dialog-content { padding: 0; }\n#file-lhs-progress,\n#file-rhs-progress { height: 22px; width: 240px; vertical-align: middle; line-height: 1.5em; display: none; }\n.progress-label { float: left; width: 100%; color: #fff; font-weight: bold; font-size: .8em; padding-left: 10px; }\n\n/* icons */        \n.icon-undo { background-image: url(images/undo.png); }\n.icon-redo { background-image: url(images/redo.png); }\n.icon-save { background-image: url(images/download.png); }\n.icon-check { background-image: url(images/check.png); }\n.icon-import { background-image: url(images/upload.png); }\n.icon-swap { background-image: url(images/swap.png); }\n.icon-arrow-right { background-image: url(images/arrow-right.png); }\n.icon-arrow-right-v { background-image: url(images/arrow-right-v.png); }\n.icon-arrow-right-vv { background-image: url(images/arrow-right-vv.png); }\n.icon-arrow-left-v { background-image: url(images/arrow-left-v.png); }\n.icon-arrow-left-vv { background-image: url(images/arrow-left-vv.png); }\n.icon-arrow-up { background-image: url(images/arrow-up-v.png); }\n.icon-arrow-down { background-image: url(images/arrow-down-v.png); }\n.icon-x-mark { background-image: url(images/x-mark.png); }\n.icon-share { background-image: url(images/share.png); }\n\n\n.tipsy-inner {\n\tpadding: 8px;\n\ttext-align: center;\n\tmax-width: 250px;\n\tfont-family: arial, sans-serif;\n\tfont-weight: bold;\n\tfont-size: 1.2em;\n}\n\n.find {\n\tposition: absolute;\n\ttop: 0px;\n\tright: 0px;\n\tz-index: 4;\n\tpadding: 10px 20px 10px 10px;\n\tbackground-color: #f5f5f5;\n\tfloat: right;\n\tborder-left: 1px solid #ccc;\n\tborder-bottom: 1px solid #ccc;\n\tborder-bottom-left-radius: 10px;\n\tmax-height: 26px;\n\t-webkit-box-shadow: rgba(0, 0, 0, .2) 0 2px 4px 0;\n\t-moz-box-shadow: rgba(0, 0, 0, .2) 0 2px 4px 0;\n\tbox-shadow: rgba(0, 0, 0, .2) 0 2px 4px 0;\n\tdisplay: none;\n}\n.find > button {\n\tpadding: 3px 0px;\n\tborder: 1px solid #ccc;\n\tborder-radius: 3px;\n\theight: 25px;\n\twidth: 26px;\n\tvertical-align: top;\n\tcursor: pointer;\n}\n.find > button:hover {\n\tbackground-color: #f5f5f5;\n\tborder: 1px solid #aaa;\n}\n\n.find > button > span.icon {\n\twidth: 16px;\n\theight: 16px;\n\tdisplay: inline-block;\n\ttext-align: center;\n\tbackground-position: center center;\n}\n"
  },
  {
    "path": "static/mergely/editor/editor.js",
    "content": "$(document).ready(function() {\n\tfunction getParameters() {\n\t\tvar parameters = {};\n\t\twindow.location.search.substr(1).split('&').forEach(function(pair) {\n\t\t\tif (pair === '') return;\n\t\t\tvar parts = pair.split('=');\n\t\t\tif (parts.length === 2 && parts[1].search(/^(true|1)$/i) >= 0) {\n\t\t\t\tparameters[parts[0]] = true;\n\t\t\t}\n\t\t\telse if (parts.length === 2 && parts[1].search(/^(false|0)$/i) >= 0) {\n\t\t\t\tparameters[parts[0]] = false;\n\t\t\t}\n\t\t\telse parameters[parts[0]] = parts[1] && decodeURIComponent(parts[1].replace(/\\+/g, ' '));\n\t\t});\n\t\treturn {\n\t\t\tget: function(name, defaultValue) {\n\t\t\t\tif (parameters.hasOwnProperty(name)) return parameters[name];\n\t\t\t\treturn defaultValue;\n\t\t\t}\n\t\t};\n\t}\n\tvar parameters = getParameters();\n\tif (parameters.get('test', false)) {\n\t\tvar li = $('<li>Tests</li>');\n\t\tvar ul = $('<ul>');\n\t\tfor (var i = 1; i <= 8; ++i) {\n\t\t\tul.append($('<li id=\"examples-test' + i + '\">Test ' + i + '</li>'));\n\t\t}\n\t\tli.append(ul);\n\t\t$('#main-menu').append(li);\n\t}\n\t\n\tfunction handleFind(column) {\n\t\tif (!column.length) {\n\t\t\treturn false;\n\t\t}\n\t\tvar ed = $('#mergely');\n\t\tvar find = column.find('.find');\n\t\tvar input = find.find('input[type=\"text\"]');\n\t\tvar side = column.attr('id').indexOf('-lhs') > 0 ? 'lhs' : 'rhs';\n\t\tvar origautoupdate = ed.mergely('options').autoupdate;\n\t\tfind.slideDown('fast', function() {\n\t\t\tinput.focus();\n\t\t\t// disable autoupdate, clear both sides of diff\n\t\t\ted.mergely('options', {autoupdate: false});\n\t\t\ted.mergely('unmarkup');\n\t\t});\n\t\tfind.find('.find-prev').click(function() {\n\t\t\ted.mergely('search', side, input.val(), 'prev');\n\t\t});\n\t\tfind.find('.find-next').click(function() {\n\t\t\ted.mergely('search', side, input.val(), 'next');\n\t\t});\n\t\tfind.find('.find-close').click(function() {\n\t\t\tfind.css('display', 'none')\n\t\t\ted.mergely('options', {autoupdate: origautoupdate});\n\t\t});\n\t\t\n\t\tinput.keydown(function(evt) {\n\t\t\tif (evt.which != 13 && evt.which != 27) return true;\n\t\t\tif (evt.which == 27) {\n\t\t\t\tfind.css('display', 'none');\n\t\t\t\ted.mergely('options', {autoupdate: origautoupdate});\n\t\t\t}\n\t\t\ted.mergely('search', side, input.val());\n\t\t\treturn false;\n\t\t});\n\t}\n\n\t$(document).keydown(function(event) {\n\t\tif (!( String.fromCharCode(event.which).toLowerCase() == 'f' && event.ctrlKey)) return true;\n\t\tevent.preventDefault();\n\t\tvar range = window.getSelection().getRangeAt(0);\n\t\tvar column = $(range.commonAncestorContainer).parents('.mergely-column');\n\t\thandleFind(column);\n\t\treturn false;\n\t});\n\n\tString.prototype.random = function(length) {\n\t\tvar chars = \"0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz\";\n\t\tvar randomstring = ''\n\t\tfor (var i=0; i<length; i++) {\n\t\t\tvar rnum = Math.floor(Math.random() * chars.length);\n\t\t\trandomstring += chars.substring(rnum,rnum+1);\n\t\t}\n\t\treturn randomstring;\n\t}\n\n\t// body is pre-hidden for better rendering\n\t$('body').css(\"visibility\", \"\");\n\n\tvar ed = $('#mergely');\n\tvar menu = $('#main-menu');\n\tvar toolbar = $('#toolbar');\n\ted.mergely({\n\t\twidth: 'auto',\n\t\theight: 'auto',\n\t\tcmsettings: {\n\t\t\tlineNumbers: true,\n\t\t\treadOnly: false\n\t\t}\n\t});\n\n    ed.mergely(\"lhs\", $(\"#historyContent\").html());\n    ed.mergely(\"rhs\", $(\"#documentContent\").html());\n\t// if (parameters.get('lhs', null)) {\n\t// \tvar url = parameters.get('lhs');\n\t// \tcrossdomainGET(ed, 'lhs', url);\n\t// }\n\t// if (parameters.get('rhs', null)) {\n\t// \tvar url = parameters.get('rhs');\n\t// \tcrossdomainGET(ed, 'rhs', url);\n\t// }\n\n\t// set query string options\n\tvar urloptions = {};\n\tvar optmap = {\n\t\tau: 'autoupdate',\n\t\tws: 'ignorews',\n\t\tcs: 'ignorecase',\n\t\tsb: 'sidebar',\n\t\tvp: 'viewport',\n\t\twl: 'wrap_lines',\n\t\tln: 'line_numbers'\n\t};\n\tvar doopt = false;\n\tfor (var name in optmap) {\n\t\tif (!optmap.hasOwnProperty(name)) continue;\n\t\tif (parameters.get(name, null) !== null) {\n\t\t\turloptions[optmap[name]] = parameters.get(name);\n\t\t\tdoopt = true;\n\t\t}\n\t}\n\tif (parameters.get('rm', null) !== null) {\n\t\t// special-case url property\n\t\turloptions.rhs_margin = parameters.get('rm') ? 'left' : 'right';\n\t}\n\tif (doopt) {\n\t\t// apply query-string options\n\t\ted.mergely('options', urloptions);\n\t}\n\n\t// set query string colors\n\t// cb: change border\n\t// cg: change background\n\t// ab: added border\n\t// ag: added background\n\t// db: deleted border\n\t// dg: deleted background\n\tvar color_defaults = {\n\t\tcb: 'cccccc', cg: 'fafafa',\n\t\tab: 'a3d1ff', ag: 'ddeeff',\n\t\tdb: 'ff7f7f', dg: 'ffe9e9'\n\t};\n\tapplyParameterCss(false);\n\n\t//history.pushState({}, null, '');\n\n\twindow.addEventListener('popstate', function(ev) {\n\t\tif (ev.state) {\n\t\t\tparameters = getParameters();\n\t\t\tapplyParameterCss(false);\n\t\t}\n\t});\n\t\n\t// Load\n\tif (key.length === 8) {\n\t\t$.when(\n\t\t\t$.ajax({\n\t\t\t\ttype: 'GET', async: true, dataType: 'text',\n\t\t\t\tdata: { 'key':key, 'name': 'lhs' },\n\t\t\t\turl: '/ajax/handle_get.php',\n\t\t\t\tsuccess: function (response) {\n\t\t\t\t\ted.mergely('lhs', response);\n\t\t\t\t},\n\t\t\t\terror: function(xhr, ajaxOptions, thrownError){\n\t\t\t\t}\n\t\t\t}),\n\t\t\t$.ajax({\n\t\t\t\ttype: 'GET', async: true, dataType: 'text',\n\t\t\t\tdata: { 'key':key, 'name': 'rhs' },\n\t\t\t\turl: '/ajax/handle_get.php',\n\t\t\t\tsuccess: function (response) {\n\t\t\t\t\ted.mergely('rhs', response);\n\t\t\t\t},\n\t\t\t\terror: function(xhr, ajaxOptions, thrownError){\n\t\t\t\t}\n\t\t\t})\n\t\t).done(function() {\n\t\t\tvar anchor = window.location.hash.substring(1);\n\t\t\tif (anchor) {\n\t\t\t\t// if an anchor has been provided, then parse the anchor in the\n\t\t\t\t// form of: 'lhs' or 'rhs', followed by a line, e.g: lhs100.\n\t\t\t\tvar m = anchor.match(/([lr]hs)([0-9]+)/);\n\t\t\t\tif (m && m.length == 3) {\n\t\t\t\t\tconsole.log(m);\n\t\t\t\t\ted.mergely('scrollTo', m[1], parseInt(m[2],10));\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n\n\t// find\n\tvar find = $('.find');\n\tvar flhs = find.clone().attr('id', 'mergely-editor-lhs-find');\n\tvar frhs = find.clone().attr('id', 'mergely-editor-rhs-find');\n\t$('#mergely-editor-lhs').append(flhs);\n\t$('#mergely-editor-rhs').append(frhs);\n\tfind.remove();\n\t\n\tvar iconconf = {\n\t\t'options-autodiff': {\n\t\t\tget: function() { return ed.mergely('options').autoupdate },\n\t\t\tset: function(value) {\n\t\t\t\tvar au = !ed.mergely('options').autoupdate;\n\t\t\t\ted.mergely('options', {autoupdate: au});\n\t\t\t\tvar params = updateQueryStringParam('au', au ? 1 : 0, 1);\n\t\t\t\tupdateHistory(params);\n\t\t\t}\n\t\t},\n\t\t'options-ignorews': {\n\t\t\tget: function() { return ed.mergely('options').ignorews },\n\t\t\tset: function(value) {\n\t\t\t\tvar ws = !ed.mergely('options').ignorews;\n\t\t\t\ted.mergely('options', {ignorews: ws});\n\t\t\t\tvar params = updateQueryStringParam('ws', ws ? 1 : 0, 0);\n\t\t\t\tupdateHistory(params);\n\t\t\t}\n\t\t},\n\t\t'options-ignorecase': {\n\t\t\tget: function() { return ed.mergely('options').ignorecase },\n\t\t\tset: function(value) {\n\t\t\t\tvar cs = !ed.mergely('options').ignorecase;\n\t\t\t\ted.mergely('options', {ignorecase: cs});\n\t\t\t\tvar params = updateQueryStringParam('cs', cs ? 1 : 0, 0);\n\t\t\t\tupdateHistory(params);\n\t\t\t}\n\t\t},\n\t\t'options-sidebars': {\n\t\t\tget: function() { console.log('sidebar', this); return ed.mergely('options').sidebar },\n\t\t\tset: function(value) {\n\t\t\t\tvar sb = !ed.mergely('options').sidebar;\n\t\t\t\ted.mergely('options', {sidebar: sb});\n\t\t\t\tvar params = updateQueryStringParam('sb', sb ? 1 : 0, 1);\n\t\t\t\tupdateHistory(params);\n\t\t\t}\n\t\t},\n\t\t'options-viewport': {\n\t\t\tget: function() { console.log('viewport', this); return ed.mergely('options').viewport },\n\t\t\tset: function(value) {\n\t\t\t\tvar vp = !ed.mergely('options').viewport;\n\t\t\t\ted.mergely('options', {viewport: vp});\n\t\t\t\tvar params = updateQueryStringParam('vp', vp ? 1 : 0, 0);\n\t\t\t\tupdateHistory(params);\n\t\t\t}\n\t\t},\n\t\t'options-swapmargin': {\n\t\t\tget: function() { return (ed.mergely('options').rhs_margin == 'left'); },\n\t\t\tset: function(value) {\n\t\t\t\tvar rm = ed.mergely('options').rhs_margin == 'left' ? 'right' : 'left';\n\t\t\t\ted.mergely('options', {rhs_margin: rm });\n\t\t\t\tvar params = updateQueryStringParam('rm', rm == 'left' ? 1 : 0, 0);\n\t\t\t\tupdateHistory(params);\n\t\t\t}\n\t\t},\n\t\t'options-linenumbers': {\n\t\t\tget: function() { console.log('wrap', this); return ed.mergely('options').line_numbers },\n\t\t\tset: function(value) {\n\t\t\t\tvar ln = !ed.mergely('options').line_numbers;\n\t\t\t\ted.mergely('options', {line_numbers: ln});\n\t\t\t\tvar params = updateQueryStringParam('ln', ln ? 1 : 0, 1);\n\t\t\t\tupdateHistory(params);\n\t\t\t}\n\t\t},\n\t\t'options-wrap': {\n\t\t\tget: function() { console.log('wrap', this); return ed.mergely('options').wrap_lines },\n\t\t\tset: function(value) {\n\t\t\t\tvar wl = !ed.mergely('options').wrap_lines;\n\t\t\t\ted.mergely('options', {wrap_lines: wl});\n\t\t\t\tvar params = updateQueryStringParam('wl', wl ? 1 : 0, 0);\n\t\t\t\tupdateHistory(params);\n\t\t\t}\n\t\t},\n\t\t'edit-left-readonly': {\n\t\t\tget: function() { return ed.mergely('cm', 'lhs').getOption('readOnly'); },\n\t\t\tset: function(value) { ed.mergely('cm', 'lhs').setOption('readOnly', value); }\n\t\t},\n\t\t'edit-right-readonly': {\n\t\t\tget: function() { return ed.mergely('cm', 'rhs').getOption('readOnly'); },\n\t\t\tset: function(value) { ed.mergely('cm', 'rhs').setOption('readOnly', value); }\n\t\t}\n\t}\n\n\tvar menu_opts = {\n\t\thasIcon: function(id) {\n\t\t\treturn iconconf.hasOwnProperty(id);\n\t\t},\n\t\tgetIcon: function(id) {\n\t\t\tif (iconconf[id].get()) return 'icon-check';\n\t\t}\n\t};\n\n\tfunction handle_operation(id) {\n\t\tif (id == 'file-new') {\n\t\t\twindow.location = '/editor';\n\t\t}\n\t\telse if (id === 'file-save') {\n\t\t\tvar rhs = ed.mergely('get', 'rhs');\n\n\t\t\tif(window.top.hasOwnProperty(\"editor\")){\n                if(window.top.editor.hasOwnProperty(\"$txt\")){\n                    window.top.editor.$txt.html(rhs);\n\t\t\t\t}else{\n\n                    window.top.editor.clear();\n                    window.top.editor.insertValue(rhs);\n\t\t\t\t}\n\n                window.top.layer.closeAll();\n\t\t\t}\n\n\t\t}else if (id == 'file-share') {\n\t\t\thandleShare(ed);\n\t\t}\n\t\telse if (id == 'file-import') {\n\t\t\timportFiles(ed);\n\t\t}\n\t\telse if (id == 'edit-left-undo') {\n\t\t\ted.mergely('cm', 'lhs').getDoc().undo();\n\t\t}\n\t\telse if (id == 'edit-left-redo') {\n\t\t\ted.mergely('cm', 'lhs').getDoc().redo();\n\t\t}\n\t\telse if (id == 'edit-right-undo') {\n\t\t\ted.mergely('cm', 'rhs').getDoc().undo();\n\t\t}\n\t\telse if (id == 'edit-right-redo') {\n\t\t\ted.mergely('cm', 'rhs').getDoc().redo();\n\t\t}\n\t\telse if (id == 'edit-left-find') {\n\t\t\thandleFind(ed.find('#mergely-editor-lhs'));\n\t\t}\n\t\telse if (id == 'edit-left-merge-right') {\n\t\t\ted.mergely('mergeCurrentChange', 'rhs');\n\t\t}\n\t\telse if (id == 'edit-left-merge-right-file') {\n\t\t\ted.mergely('merge', 'rhs');\n\t\t}\n\t\telse if ([\n\t\t\t'edit-left-readonly', \n\t\t\t'edit-right-readonly',\n\t\t\t'options-autodiff',\n\t\t\t'options-sidebars',\n\t\t\t'options-swapmargin',\n\t\t\t'options-viewport',\n\t\t\t'options-ignorews',\n\t\t\t'options-ignorecase',\n\t\t\t'options-wrap',\n\t\t\t'options-linenumbers',\n\t\t\t].indexOf(id) >= 0) {\n\t\t\ticonconf[id].set(!iconconf[id].get());\n\t\t\tmenu.wickedmenu('update', id);\n\t\t}\n\t\telse if (id == 'edit-left-clear') {\n\t\t\ted.mergely('clear', 'lhs');\n\t\t}\n\t\telse if (id == 'edit-right-find') {\n\t\t\thandleFind(ed.find('#mergely-editor-rhs'));\n\t\t}\n\t\telse if (id == 'edit-right-merge-left') {\n\t\t\ted.mergely('mergeCurrentChange', 'lhs');\n\t\t}\n\t\telse if (id == 'edit-right-merge-left-file') {\n\t\t\ted.mergely('merge', 'lhs');\n\t\t}\n\t\telse if (id == 'edit-right-clear') {\n\t\t\ted.mergely('clear', 'rhs');\n\t\t}\n\t\telse if (id == 'options-colors') {\n\t\t\tcolorSettings(ed);\n\t\t}\n\t\telse if (id == 'view-swap') {\n\t\t\ted.mergely('swap');\n\t\t}\n\t\telse if (id == 'view-refresh') {\n\t\t\ted.mergely('update');\n\t\t}\n\t\telse if (id == 'view-change-next') {\n\t\t\ted.mergely('scrollToDiff', 'next');\n\t\t}\n\t\telse if (id == 'view-change-prev') {\n\t\t\ted.mergely('scrollToDiff', 'prev');\n\t\t}\n\t\telse if (id == 'view-clear') {\n\t\t\ted.mergely('unmarkup');\n\t\t}\n\t\telse if (id.indexOf('examples-') == 0) {\n\t\t\tvar test_config = {\n\t\t\t\ttest1: {lhs: 'one\\ntwo\\nthree', rhs: 'two\\nthree'},\n\t\t\t\ttest2: {lhs: 'two\\nthree', rhs: 'one\\ntwo\\nthree'},\n\t\t\t\ttest3: {lhs: 'one\\nthree', rhs: 'one\\ntwo\\nthree'},\n\t\t\t\ttest4: {lhs: 'one\\ntwo\\nthree', rhs: 'one\\nthree'},\n\t\t\t\ttest5: {lhs: 'to bee, or not to be', rhs: 'to be, or not to bee'},\n\t\t\t\ttest6: {lhs: 'to be, or not to be z', rhs: 'to be, to be'},\n\t\t\t\ttest7: {lhs: 'remained, & to assume', rhs: 'and to assume'},\n\t\t\t\ttest8: {lhs: 'to be, or not to be', rhs: 'to  be,  or  not  to  be'}\n\t\t\t};\n\t\t\tvar test = id.split('examples-')[1];\n\t\t\ted.mergely('lhs', test_config[test]['lhs']);\n\t\t\ted.mergely('rhs', test_config[test]['rhs']);\n\t\t}\n\t\treturn false;\n\t}\n\n\tmenu.wickedmenu(menu_opts).bind('selected', function(ev, id) {\n\t\treturn handle_operation(id);\n\t});\n\t\n\ttoolbar.wickedtoolbar({}).bind('selected', function(ev, id) {\n\t\tif (!id) return false;\n\t\treturn handle_operation(id.replace(/^tb-/, ''));\n\t});\n\n\ttoolbar.find('li[title]').tipsy({opacity: 1});\n\tmenu.find('li[title]').tipsy({opacity: 1, delayIn: 1000, gravity: 'w'});\n\n\tfunction handleShare(ed) {\n\t\tvar fork = $(this).attr('id') == 'fork';\n\t\tif (key == '') key = ''.random(8);\n\t\tvar count = 0;\n\t\tfunction post_save(side, text) {\n\t\t\t$.ajax({\n\t\t\t\ttype: 'POST', async: true, dataType: 'text',\n\t\t\t\turl: '/ajax/handle_file.php',\n\t\t\t\tdata: { 'key': key,  'name': side, 'content': text },\n\t\t\t\tsuccess: function (nkey) {\n\t\t\t\t\t++count;\n\t\t\t\t\tif (count == 2) {\n\t\t\t\t\t\tvar url = '/ajax/handle_save.php?key=' + key;\n\t\t\t\t\t\tif (fork) url += '&nkey=' + ''.random(8);\n\t\t\t\t\t\t$.ajax({\n\t\t\t\t\t\t\ttype: 'GET', async: false, dataType: 'text',\n\t\t\t\t\t\t\turl: url,\n\t\t\t\t\t\t\tsuccess: function (nkey) {\n\t\t\t\t\t\t\t\t// redirect\n\t\t\t\t\t\t\t\tif (nkey.length) window.location.href = '/' + $.trim(nkey) + '/';\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\terror: function(xhr, ajaxOptions, thrownError){\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\terror: function(xhr, ajaxOptions, thrownError){\n\t\t\t\t\talert(thrownError);\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t\tfunction save_files() {\n\t\t\tvar lhs = ed.mergely('get', 'lhs');\n\t\t\tvar rhs = ed.mergely('get', 'rhs');\n\t\t\tpost_save('lhs', lhs);\n\t\t\tpost_save('rhs', rhs);\n\t\t}\n\t\n\t\t$( '#dialog-confirm' ).dialog({\n\t\t\tresizable: false, width: 350, modal: true,\n\t\t\tbuttons: {\n\t\t\t\t'Save for Sharing': function() {\n\t\t\t\t\t$( this ).dialog( 'close' );\n\t\t\t\t\tsave_files();\n\t\t\t\t},\n\t\t\t\tCancel: function() {\n\t\t\t\t\t$( this ).dialog( 'close' );\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n\t\n\tfunction crossdomainGET(ed, side, url) {\n\t\t$.ajax({\n\t\t\ttype: 'GET', dataType: 'text',\n\t\t\tdata: {url: url},\n\t\t\turl: '/ajax/handle_crossdomain.php',\n\t\t\tcontentType: 'text/plain',\n\t\t\tsuccess: function (response) {\n\t\t\t\ted.mergely(side, response);\n\t\t\t},\n\t\t\terror: function(xhr, ajaxOptions, thrownError){\n\t\t\t\tconsole.error('error', xhr, ajaxOptions, thrownError);\n\t\t\t}\n\t\t});\n\t}\n\t\n\tfunction importFiles(ed) {\n\t\t// -------------\n\t\t// file uploader - html5 file upload to browser\n\t\tfunction file_load(target, side) {\n\t\t\tvar file = target.files[0];\n\t\t\tvar reader = new FileReader();\n\t\t\tvar $target = $(target);\n\t\t\tfunction trigger(name, event) { $target.trigger(name, event); }\n\t\t\treader.onloadstart = function(evt) { trigger('start'); }\n\t\t\treader.onprogress = function(evt) { trigger('progress', evt); }\n\t\t\treader.onload = function(evt) { trigger('loaded', evt.target.result); }\n\t\t\treader.onerror = function (evt) {\n\t\t\t\talert(evt.target.error.name);\n\t\t\t}\n\t\t\ttry {\n\t\t\t\treader.readAsText(file, 'UTF-8');\n\t\t\t}\n\t\t\tcatch (e) {\n\t\t\t\tconsole.error(e);\n\t\t\t\talert(e);\n\t\t\t}\n\t\t}\n\t\tvar file_data = {};\n\t\t$('#file-lhs, #file-rhs').change(function (evt) {\n\t\t\tvar re = new RegExp('.*[\\\\\\\\/](.*)$');\n\t\t\tvar match = re.exec($(this).val());\n\t\t\tvar fname = match ? match[1] : 'unknown';\n\t\t\t\n\t\t\tvar progressbar = $('#' + evt.target.id + '-progress');\n\t\t\t\n\t\t\tfile_load(evt.target);\n\t\t\t$(evt.target).bind('start', function(ev){\n\t\t\t\t$(evt.target).css('display', 'none');\n\t\t\t\tprogressbar.css('display', 'inline-block');\n\t\t\t});\n\t\t\t$(evt.target).bind('progress', function(ev, progress){\n\t\t\t\tvar loaded = (progress.loaded / progress.total) * 100;\n\t\t\t\tprogressbar.find('> .progress-label').text(loaded + '%');\n\t\t\t\tprogressbar.progressbar('value', loaded);\n\t\t\t});\n\t\t\t$(evt.target).bind('loaded', function(ev, file){\n\t\t\t\tprogressbar.progressbar('value', 100);\n\t\t\t\tprogressbar.find('> .progress-label').text(fname);\n\t\t\t\tfile_data[evt.target.id] = file;\n\t\t\t});\n\t\t});\n\t\t\n\t\t$('#file-lhs-progress').progressbar({value: 0});\n\t\t$('#file-rhs-progress').progressbar({value: 0});\n\t\t$('#dialog-upload .tabs').tabs();\n\t\tfunction callbackName(data) {\n\t\t\tconsole.log('callbackName', data);\n\t\t}\n\t\t$('#dialog-upload').dialog({\n\t\t\tdialogClass: 'no-title',\n\t\t\tresizable: false,\n\t\t\twidth: '450px',\n\t\t\tmodal: true,\n\t\t\tbuttons: {\n\t\t\t\tImport: function() {\n\t\t\t\t\t$(this).dialog('close');\n\t\t\t\t\t\n\t\t\t\t\tvar urls = { lhs: $('#url-lhs').val(), rhs: $('#url-rhs').val() };\n\t\t\t\t\tfor (var side in urls) {\n\t\t\t\t\t\tvar url = urls[side];\n\t\t\t\t\t\tif (!url) continue;\n\t\t\t\t\t\tcrossdomainGET(ed, side, url);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif (file_data.hasOwnProperty('file-lhs')) {\n\t\t\t\t\t\ted.mergely('lhs', file_data['file-lhs']);\n\t\t\t\t\t}\n\t\t\t\t\tif (file_data.hasOwnProperty('file-rhs')) {\n\t\t\t\t\t\ted.mergely('rhs', file_data['file-rhs']);\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\tCancel: function() {\n\t\t\t\t\t$(this).dialog('close');\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n\tfunction colorSettings(ed) {\n\t\t// get current settings\n\t\tvar sd = $('<span style=\"display:none\" class=\"mergely ch d lhs start end\">C</span>');\n\t\tvar sa = $('<span style=\"display:none\" class=\"mergely bg a rhs start end\">C</span>');\n\t\tvar sc = $('<span style=\"display:none\" class=\"mergely c rhs start end\">C</span>');\n\t\t$('body').append(sd);\n\t\t$('body').append(sa);\n\t\t$('body').append(sc);\n\t\tvar conf = {\n\t\t\t'c-border': {id: '#c-border', getColor: function() { return sc.css('border-top-color'); }, setColor: function(color) { $('#'+this.id).val(color) }},\n\t\t\t'c-bg': \t{id: '#c-bg', \t  getColor: function() { return sc.css('background-color'); }, setColor: function(color) { $('#'+this.id).val(color) }},\n\t\t\t'a-border': {id: '#a-border', getColor: function() { return sa.css('border-top-color'); }, setColor: function(color) { $('#'+this.id).val(color) }},\n\t\t\t'a-bg': \t{id: '#a-bg', \t  getColor: function() { return sa.css('background-color'); }, setColor: function(color) { $('#'+this.id).val(color) }},\n\t\t\t'd-border': {id: '#d-border', getColor: function() { return sd.css('border-top-color'); }, setColor: function(color) { $('#'+this.id).val(color) }},\n\t\t\t'd-bg': \t{id: '#d-bg', \t  getColor: function() { return sd.css('background-color'); }, setColor: function(color) { $('#'+this.id).val(color) }}\n\t\t};\n\t\t$.each(conf, function(key, item){$(item.id).val(item.getColor()); });\n\t\tvar f = $.farbtastic('#picker');\n\t\t$('.colorwell').each(function(){ f.linkTo(this); }).focus(function(){\n\t\t\tvar tthis = $(this);\n\t\t\tf.linkTo(this);\n\t\t\tvar item = conf[tthis.attr('id')];\n\t\t\tf.setColor(item.getColor());\n\t\t});\n\t\n\t\t$('#dialog-colors').dialog({\n\t\t\twidth: 490, modal: true,\n\t\t\tbuttons: {\n\t\t\t\tApply: function() {\n\t\t\t\t\tvar cborder = $('#c-border').val();\n\t\t\t\t\tvar aborder = $('#a-border').val();\n\t\t\t\t\tvar dborder = $('#d-border').val();\n\t\t\t\t\tvar abg = $('#a-bg').val();\n\t\t\t\t\tvar dbg = $('#d-bg').val();\n\t\t\t\t\tvar cbg = $('#c-bg').val();\n\t\t\t\t\tvar textCss = makeColorCss(cborder, cbg, aborder, abg, dborder, dbg);\n\t\t\t\t\tapplyColorCss(textCss, cborder, cbg, aborder, abg, dborder, dbg, true);\n\t\t\t\t},\n\t\t\t\tReset: function() {\n\t\t\t\t},\n\t\t\t\tClose: function() {\n\t\t\t\t\t$(this).dialog('close');\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n\tfunction makeColorCss(changeBorder, changeBackground, addedBorder, addedBackground, deletedBorder, deletedBackground) {\n\t\tvar text =\n\t\t\t'.mergely.a.rhs.start{border-top-color:' + addedBorder + ';}\\n\\\n\t\t\t.mergely.a.lhs.start.end,\\n\\\n\t\t\t.mergely.a.rhs.end{border-bottom-color:' + addedBorder + ';}\\n\\\n\t\t\t.mergely.a.rhs{background-color:' + addedBackground + ';}\\n\\\n\t\t\t.mergely.d.lhs{background-color:' + deletedBackground + ';}\\n\\\n\t\t\t.mergely.d.lhs.end,\\n\\\n\t\t\t.mergely.d.rhs.start.end{border-bottom-color:' + deletedBorder + ';}\\n\\\n\t\t\t.mergely.d.rhs.start.end.first{border-top-color:' + deletedBorder + ';}\\n\\\n\t\t\t.mergely.d.lhs.start{border-top-color:' + deletedBorder + ';}\\n\\\n\t\t\t.mergely.c.lhs,\\n\\\n\t\t\t.mergely.c.rhs{background-color:' + changeBackground + ';}\\n\\\n\t\t\t.mergely.c.lhs.start,\\n\\\n\t\t\t.mergely.c.rhs.start{border-top-color:' + changeBorder + ';}\\n\\\n\t\t\t.mergely.c.lhs.end,\\n\\\n\t\t\t.mergely.c.rhs.end{border-bottom-color:' + changeBorder + ';}\\n\\\n\t\t\t.mergely.ch.a.rhs{background-color:' + addedBackground + ';}\\n\\\n\t\t\t.mergely.ch.d.lhs{background-color:' + deletedBackground + ';color: #888;}';\n\t\treturn text;\n\t}\n\tfunction applyParameterCss(saveState) {\n\t\tvar cb = '#' + parameters.get('cb',color_defaults.cb),\n\t\t\tcg = '#' + parameters.get('cg',color_defaults.cg),\n\t\t\tab = '#' + parameters.get('ab',color_defaults.ab),\n\t\t\tag = '#' + parameters.get('ag',color_defaults.ag),\n\t\t\tdb = '#' + parameters.get('db',color_defaults.db),\n\t\t\tdg = '#' + parameters.get('dg',color_defaults.dg);\n\t\tapplyColorCss(makeColorCss(cb, cg, ab, ag, db, dg), cb, cg, ab, ag, db, dg, saveState);\n\t}\n\tfunction applyColorCss(cssText, changeBorder, changeBackground, addedBorder, addedBackground, deletedBorder, deletedBackground, saveState) {\n\t\t$('<style type=\"text/css\">' + cssText + '</style>').appendTo('head');\n\t\ted.mergely('options', {\n\t\t\tfgcolor:{a:addedBorder,c:changeBorder,d:deletedBorder}\n\t\t});\n\t\tvar params = updateQueryStringParam('cb', changeBorder.replace(/#/g, ''), color_defaults.cb);\n\t\tparams = updateQueryStringParam('cg', changeBackground.replace(/#/g, ''), color_defaults.cg, params);\n\t\tparams = updateQueryStringParam('ab', addedBorder.replace(/#/g, ''), color_defaults.ab, params);\n\t\tparams = updateQueryStringParam('ag', addedBackground.replace(/#/g, ''), color_defaults.ag, params);\n\t\tparams = updateQueryStringParam('db', deletedBorder.replace(/#/g, ''), color_defaults.db, params);\n\t\tparams = updateQueryStringParam('dg', deletedBackground.replace(/#/g, ''), color_defaults.dg, params);\n\n\t\tif (saveState) {\n\t\t\tupdateHistory(params);\n\t\t}\n\t}\n\tfunction updateHistory(params) {\n\t\tvar baseUrl = [location.protocol, '//', location.host, location.pathname].join('');\n\t\twindow.history.pushState({}, null, baseUrl + params);\n\t}\n\t// Explicitly save/update a url parameter using HTML5's replaceState().\n\tfunction updateQueryStringParam(key, value, defaultValue, urlQueryString) {\n\t\turlQueryString = urlQueryString || document.location.search;\n\t\tvar parts = urlQueryString.replace(/^\\?/, '').split(/&/), found = false;\n\t\tfor (var i in parts) {\n\t\t\tif (parts[i].startsWith(key + '=')) {\n\t\t\t\tfound = true;\n\t\t\t\tif (value === defaultValue) {\n\t\t\t\t\t// value is default value, remove option\n\t\t\t\t\tparts.splice(i, 1);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t// make new value\n\t\t\t\t\tparts[i] = key + '=' + value;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\telse if (parts[i].length === 0) {\n\t\t\t\tparts.splice(i, 1);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif (!found) {\n\t\t\tparts.push(key + '=' + value);\n\t\t}\n\t\treturn (parts.length) ? '?' + parts.join('&') : '';\n\t}\n});\n"
  },
  {
    "path": "static/mergely/editor/editor.php",
    "content": "<?php\n$key = '';\n$debug = False;\nif (isset($_GET['key'])) {\n\t$key = $_GET['key'];\n}\nif (isset($_GET['debug'])) {\n    $debug = filter_var($_GET['debug'], FILTER_VALIDATE_BOOLEAN);\n}\n?>\n<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n\t<meta charset=\"utf-8\" /><title>Mergely - Diff online, merge documents</title>\n\t<meta http-equiv=\"content-type\" content=\"text/html; charset=UTF-8\" />\n\t<meta name=\"description\" content=\"Merge and Diff your documents with diff online and share\" />\n\t<meta name=\"keywords\" content=\"diff,merge,compare,jsdiff,comparison,difference,file,text,unix,patch,algorithm,saas,longest common subsequence,diff online\" />\n\t<meta name=\"author\" content=\"Jamie Peabody\" />\n\t<link rel=\"shortcut icon\" href=\"/favicon.ico\" />\n\t<link rel=\"canonical\" href=\"http://www.mergely.com\" />\n    <link href='http://fonts.googleapis.com/css?family=Noto+Sans:400,700' rel='stylesheet' type='text/css' />\n    <script type=\"text/javascript\" src=\"https://ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js\"></script>\n    <script type=\"text/javascript\" src=\"https://ajax.googleapis.com/ajax/libs/jqueryui/1.10.1/jquery-ui.min.js\"></script>\n\n\t<link type=\"text/css\" rel=\"stylesheet\" href=\"/style/mergely-theme/jquery-ui-1.10.1.custom.css\" />\n    <link type='text/css' rel='stylesheet' href='/Mergely/editor/lib/wicked-ui.css' />\n\t<script type=\"text/javascript\" src=\"/Mergely/editor/lib/wicked-ui.js\"></script>\n\n    <link type='text/css' rel='stylesheet' href='/Mergely/editor/lib/tipsy/tipsy.css' />\n\t<script type=\"text/javascript\" src=\"/Mergely/editor/lib/tipsy/jquery.tipsy.js\"></script>\n\t<script type=\"text/javascript\" src=\"/Mergely/editor/lib/farbtastic/farbtastic.js\"></script>\n\t<link type=\"text/css\" rel=\"stylesheet\" href=\"/Mergely/editor/lib/farbtastic/farbtastic.css\" />\n<?php\n    if ($debug) {\n?>\n    <script type=\"text/javascript\" src=\"/Mergely/lib/codemirror.js\"></script>\n    <script type=\"text/javascript\" src=\"/Mergely/lib/mergely.js\"></script>\n    <script type=\"text/javascript\" src=\"/Mergely/editor/editor.js\"></script>\n<?php\n    }\n    else {\n?>\n    <script type=\"text/javascript\" src=\"/Mergely/lib/codemirror.min.js\"></script>\n    <script type=\"text/javascript\" src=\"/Mergely/lib/mergely.min.js\"></script>\n    <script type=\"text/javascript\" src=\"/Mergely/editor/editor.min.js\"></script>\n<?php\n    }\n?>\n    <link type=\"text/css\" rel=\"stylesheet\" href=\"/Mergely/lib/codemirror.css\" />\n\t<link type=\"text/css\" rel=\"stylesheet\" href=\"/Mergely/lib/mergely.css\" />\n    <link type='text/css' rel='stylesheet' href='/Mergely/editor/editor.css' />\n\t<script type=\"text/javascript\" src=\"/Mergely/lib/searchcursor.js\"></script>\n\n\t<script type=\"text/javascript\">\n        var key = '<?php echo htmlspecialchars($key, ENT_QUOTES, 'UTF-8'); ?>';\n        var isSample = key == 'usaindep';\n    </script>\n    \n    <!-- analytics -->\n    <script type=\"text/javascript\">\n        var _gaq = _gaq || [];\n        _gaq.push(['_setAccount', 'UA-85576-5']);\n        _gaq.push(['_trackPageview']);\n        (function() {\n            var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;\n            ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';\n            var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);\n        })();\n    </script>\n    \n    <!-- google +1 -->\n\t<script type=\"text/javascript\" src=\"https://apis.google.com/js/plusone.js\"></script>\n</head>\n<body style=\"visibility:hidden\">\n<div id=\"fb-root\"></div><script>(function(d, s, id) {\n  var js, fjs = d.getElementsByTagName(s)[0];\n  if (d.getElementById(id)) return;\n  js = d.createElement(s); js.id = id;\n  js.src = \"//connect.facebook.net/en_US/all.js#xfbml=1\";\n  fjs.parentNode.insertBefore(js, fjs);\n}(document, 'script', 'facebook-jssdk'));</script>\n\n\n    <a href=\"/\"><div id=\"banner\"></div></a>\n    \n    <!-- menu -->\n    <ul id=\"main-menu\">\n        <li accesskey=\"f\">\n            File\n            <ul>\n                <li id=\"file-new\" accesskey=\"n\" data-hotkey=\"Alt+N\">New</li>\n                <li id=\"file-import\" data-icon=\"icon-import\">Import...</li>\n                <li id=\"file-save\" accesskey=\"s\" data-hotkey=\"Alt+S\" data-icon=\"icon-save\">Save .diff</li>\n                <li class=\"separator\"></li>\n                <li id=\"file-share\" data-icon=\"icon-share\">Share</li>\n            </ul>\n        </li>\n        <li accesskey=\"l\">\n            Left\n            <ul>\n                <li id=\"edit-left-undo\" accesskey=\"z\" data-hotkey=\"Ctrl+Z\" data-icon=\"icon-undo\">Undo</li>\n                <li id=\"edit-left-redo\" accesskey=\"y\" data-hotkey=\"Ctrl+Y\" data-icon=\"icon-redo\">Redo</li>\n                <li id=\"edit-left-find\">Find</li>\n                <li class=\"separator\"></li>\n                <li id=\"edit-left-merge-right\" data-hotkey=\"Alt+&rarr;\" data-icon=\"icon-arrow-right-v\">Merge change right</li>\n                <li id=\"edit-left-merge-right-file\" data-icon=\"icon-arrow-right-vv\">Merge file right</li>\n                <li id=\"edit-left-readonly\">Read only</li>\n                <li class=\"separator\"></li>\n                <li id=\"edit-left-clear\">Clear</li>\n            </ul>\n        </li>\n        <li accesskey=\"r\">\n            Right\n            <ul>\n                <li id=\"edit-right-undo\" accesskey=\"z\" data-hotkey=\"Ctrl+Z\" data-icon=\"icon-undo\">Undo</li>\n                <li id=\"edit-right-redo\" accesskey=\"y\" data-hotkey=\"Ctrl+Y\" data-icon=\"icon-redo\">Redo</li>\n                <li id=\"edit-right-find\">Find</li>\n                <li class=\"separator\"></li>\n                <li id=\"edit-right-merge-left\" data-hotkey=\"Alt+&larr;\" data-icon=\"icon-arrow-left-v\">Merge change left</li>\n                <li id=\"edit-right-merge-left-file\" data-icon=\"icon-arrow-left-vv\">Merge file left</li>\n                <li id=\"edit-right-readonly\">Read only</li>\n                <li class=\"separator\"></li>\n                <li id=\"edit-right-clear\">Clear</li>\n            </ul>\n        </li>\n        <li accesskey=\"v\">\n            View\n            <ul>\n                <li id=\"view-swap\" data-icon=\"icon-swap\">Swap sides</li>\n                <li class=\"separator\"></li>\n                <li id=\"view-refresh\" accesskey=\"v\" data-hotkey=\"Alt+V\" title=\"Generates diff markup\">Render diff view</li>\n                <li id=\"view-clear\" accesskey=\"c\" data-hotkey=\"Alt+C\" title=\"Clears diff markup\">Clear render</li>\n                <li class=\"separator\"></li>\n                <li id=\"view-change-prev\" data-hotkey=\"Alt+&uarr;\" title=\"View previous change\">View prev change</li>\n                <li id=\"view-change-next\" data-hotkey=\"Alt+&darr;\" title=\"View next change\">View next change</li>\n            </ul>\n        </li>\n        <li accesskey=\"o\">\n            Options\n            <ul>\n                <li id=\"options-wrap\">Wrap lines</li>\n                <li id=\"options-ignorews\">Ignore white space</li>\n                <li id=\"options-ignorecase\">Ignore case</li>\n                <li class=\"separator\"></li>\n                <li id=\"options-viewport\" title=\"Improves performance for large files\">Enable viewport</li>\n                <li id=\"options-sidebars\" title=\"Improves performance for large files\">Enable side bars</li>\n                <li id=\"options-swapmargin\">Swap right margin</li>\n                <li id=\"options-linenumbers\">Enable line numbers</li>\n                <li class=\"separator\"></li>\n                <li id=\"options-autodiff\" title=\"Diffs are computed automatically\">Enable auto-diff</li>\n                <li class=\"separator\"></li>\n                <li id=\"options-colors\">Colors...</li>\n            </ul>\n        </li>\n        <li accesskey=\"m\">\n            Mergely\n            <ul>\n                <li><a class=\"link\" href=\"/\" target=\"site\">Home</a></li>\n                <li><a class=\"link\" href=\"/about\" target=\"site\">About</a></li>\n                <li><a class=\"link\" href=\"/license\" target=\"site\">License</a></li>\n                <li><a class=\"link\" href=\"/download\" target=\"site\">Download</a></li>\n                <li><a class=\"link\" href=\"/doc\" target=\"site\">Mergely development guide</a></li>\n                <li class=\"separator\"></li>\n                <li><a class=\"link\" href=\"/united-states-declaration-of-independence?wl=1\" target=\"_blank\">United States Declaration of Independence Draft</a></li>\n            </ul>\n        </li>\n<?php\n    if (!$debug) {\n?>\n        <li accesskey=\"s\">\n            Social\n            <ul>\n                <li id=\"social-twitter\">\n                    <div style=\"padding: 10px 10px 5px 10px\" title=\"Twitter\">\n                        <a href=\"https://twitter.com/share\" class=\"twitter-share-button\" data-via=\"jamiepeabody\">Tweet</a>\n                        <script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>\n                    </div>\n                </li>\n                <li id=\"social-facebook\">\n                    <div style=\"padding: 10px 10px 5px 10px\" title=\"Facebook\">\n                        <div class=\"fb-like\" data-href=\"http://www.mergely.com\" data-send=\"true\" data-width=\"200\" data-show-faces=\"true\"></div>\n                    </div>\n                </li>\n                <li id=\"social-google\">\n                    <div style=\"padding: 10px 10px 5px 10px\" title=\"Google+\"><g:plusone></g:plusone></div>\n                </li>\n                <li id=\"social-reddit\">\n                    <div style=\"padding: 10px 10px 5px 10px\" title=\"Reddit\">\n                        <a target=\"_blank\" href=\"http://www.reddit.com/submit\" onclick=\"window.location = 'http://www.reddit.com/submit?url=' + encodeURIComponent(window.location); return false\" style=\"color:black;text-decoration:none;\"><img src=\"http://www.reddit.com/static/spreddit1.gif\" alt=\"submit to reddit\" border=\"0\" />\n                            <span>Reddit</span>\n                        </a>\n                    </div>\n                </li>\n            </ul>\n        </li>\n<?php\n    }\n?>\n    </ul>\n\n    <!-- toolbar -->\n    <ul id=\"toolbar\">\n        <li id=\"tb-file-share\" data-icon=\"icon-share\" title=\"Share\">Share</li>\n        <li class=\"separator\"></li>\n        <li id=\"tb-file-import\" data-icon=\"icon-import\" title=\"Import\">Import</li>\n        <li id=\"tb-file-save\" data-icon=\"icon-save\" title=\"Save .diff\">Save .diff</li>\n        <li class=\"separator\"></li>\n        <li id=\"tb-view-change-prev\" data-icon=\"icon-arrow-up\" title=\"Previous change\">Previous change</li>\n        <li id=\"tb-view-change-next\" data-icon=\"icon-arrow-down\" title=\"Next change\">Next change</li>\n        <li class=\"separator\"></li>\n        <li id=\"tb-edit-right-merge-left\" data-icon=\"icon-arrow-left-v\" title=\"Merge change left\">Merge change left</li>\n        <li id=\"tb-edit-left-merge-right\" data-icon=\"icon-arrow-right-v\" title=\"Merge change right\">Merge change right</li>\n        <li id=\"tb-view-swap\" data-icon=\"icon-swap\" title=\"Swap sides\">Swap sides</li>\n    </ul>\n\n    <!-- dialog upload -->\n    <div id=\"dialog-upload\" title=\"File import\" style=\"display:none\">\n        <div class=\"tabs\">\n            <ul>\n                <li><a href=\"#tabs-1\">Import File</a></li>\n                <li><a href=\"#tabs-2\">Import URL</a></li>\n            </ul>\n            <div id=\"tabs-1\">\n                <p>\n                    Files are imported directly into your browser.  They are <em>not</em> uploaded to the server.\n                </p>\n                <label for=\"file-lhs\">Left file</label> <input id=\"file-lhs\" style=\"display:inline-block\" type=\"file\"><div id=\"file-lhs-progress\"><div class=\"progress-label\">Loading...</div></div><br />\n                <label for=\"file-rhs\">Right file</label> <input id=\"file-rhs\" style=\"display:inline-block\" type=\"file\"><div id=\"file-rhs-progress\"><div class=\"progress-label\">Loading...</div></div><br />\n            </div>\n            <div id=\"tabs-2\">\n                <p>\n                    Files are imported directly into your browser.  They are <em>not</em> uploaded to the server.\n                </p>\n                <label for=\"url-lhs\">Left URL</label> <input id=\"url-lhs\" type=\"input\" size=\"40\"><div id=\"file-lhs-progress\"><div class=\"progress-label\">Loading...</div></div><br />\n                <label for=\"url-rhs\">Right URL</label> <input id=\"url-rhs\" type=\"input\" size=\"40\"><div id=\"file-rhs-progress\"><div class=\"progress-label\">Loading...</div></div><br />\n            </div>\n        </div>\n    </div>\n    \n    <!-- dialog colors -->\n\t<div id=\"dialog-colors\" title=\"Mergely Color Settings\" style=\"display:none\">\n\t\t<div id=\"picker\" style=\"float: right;\"></div>\n\t\t<fieldset>\n\t\t\t<legend>Changed</legend>\n\t\t\t<label for=\"c-border\">Border:</label><input type=\"text\" id=\"c-border\" name=\"c-border\" class=\"colorwell\" />\n\t\t\t<br />\n\t\t\t<label for=\"c-bg\">Background:</label><input type=\"text\" id=\"c-bg\" name=\"c-bg\" class=\"colorwell\" />\n\t\t\t<br />\n\t\t</fieldset>\n\t\t<fieldset>\n\t\t\t<legend>Added</legend>\n\t\t\t<label for=\"a-border\">Border:</label><input type=\"text\" id=\"a-border\" name=\"a-border\" class=\"colorwell\" />\n\t\t\t<br />\n\t\t\t<label for=\"a-bg\">Background:</label><input type=\"text\" id=\"a-bg\" name=\"a-bg\" class=\"colorwell\" />\n\t\t\t<br />\n\t\t</fieldset>\n\t\t<fieldset>\n\t\t\t<legend>Deleted</legend>\n\t\t\t<label for=\"d-border\">Border:</label><input type=\"text\" id=\"d-border\" name=\"d-border\" class=\"colorwell\" />\n\t\t\t<br />\n\t\t\t<label for=\"d-bg\">Background:</label><input type=\"text\" id=\"d-bg\" name=\"d-bg\" class=\"colorwell\" />\n\t\t\t<br />\n\t\t</fieldset>\n\t</div>\n\n    <!-- dialog confirm -->\n\t<div id=\"dialog-confirm\" title=\"Save a Permanent Copy?\" style=\"display:none;\">\n\t\t<p>\n\t\t\tAre you sure you want to save? A permanent copy will be\n\t\t\tcreated at the server and a link will be provided for you to share the URL \n            in an email, blog, twitter, etc.\n\t\t</p>\n\t</div>\n    \n    <!-- find -->\n    <div class=\"find\">\n        <input type=\"text\" />\n        <button class=\"find-prev\"><span class=\"icon icon-arrow-up\"></span></button>\n        <button class=\"find-next\"><span class=\"icon icon-arrow-down\"></span></button>\n        <button class=\"find-close\"><span class=\"icon icon-x-mark\"></span></button>\n    </div>\n    \n    <!-- editor -->\n    <div style=\"position: absolute;top: 73px;bottom: 10px;left: 5px;right: 5px;overflow-y: hidden;padding-bottom: 2px;\">\n        <div id=\"mergely\">\n        </div>\n    </div>\n    \n</body>\n</html>\n"
  },
  {
    "path": "static/mergely/editor/lib/farbtastic/LICENSE.txt",
    "content": "\n        GNU GENERAL PUBLIC LICENSE\n           Version 2, June 1991\n\n Copyright (C) 1989, 1991 Free Software Foundation, Inc.\n 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA\n Everyone is permitted to copy and distribute verbatim copies\n of this license document, but changing it is not allowed.\n\n          Preamble\n\n  The licenses for most software are designed to take away your\nfreedom to share and change it.  By contrast, the GNU General Public\nLicense is intended to guarantee your freedom to share and change free\nsoftware--to make sure the software is free for all its users.  This\nGeneral Public License applies to most of the Free Software\nFoundation's software and to any other program whose authors commit to\nusing it.  (Some other Free Software Foundation software is covered by\nthe GNU Lesser General Public License instead.)  You can apply it to\nyour programs, too.\n\n  When we speak of free software, we are referring to freedom, not\nprice.  Our General Public Licenses are designed to make sure that you\nhave the freedom to distribute copies of free software (and charge for\nthis service if you wish), that you receive source code or can get it\nif you want it, that you can change the software or use pieces of it\nin new free programs; and that you know you can do these things.\n\n  To protect your rights, we need to make restrictions that forbid\nanyone to deny you these rights or to ask you to surrender the rights.\nThese restrictions translate to certain responsibilities for you if you\ndistribute copies of the software, or if you modify it.\n\n  For example, if you distribute copies of such a program, whether\ngratis or for a fee, you must give the recipients all the rights that\nyou have.  You must make sure that they, too, receive or can get the\nsource code.  And you must show them these terms so they know their\nrights.\n\n  We protect your rights with two steps: (1) copyright the software, and\n(2) offer you this license which gives you legal permission to copy,\ndistribute and/or modify the software.\n\n  Also, for each author's protection and ours, we want to make certain\nthat everyone understands that there is no warranty for this free\nsoftware.  If the software is modified by someone else and passed on, we\nwant its recipients to know that what they have is not the original, so\nthat any problems introduced by others will not reflect on the original\nauthors' reputations.\n\n  Finally, any free program is threatened constantly by software\npatents.  We wish to avoid the danger that redistributors of a free\nprogram will individually obtain patent licenses, in effect making the\nprogram proprietary.  To prevent this, we have made it clear that any\npatent must be licensed for everyone's free use or not licensed at all.\n\n  The precise terms and conditions for copying, distribution and\nmodification follow.\n\n        GNU GENERAL PUBLIC LICENSE\n   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION\n\n  0. This License applies to any program or other work which contains\na notice placed by the copyright holder saying it may be distributed\nunder the terms of this General Public License.  The \"Program\", below,\nrefers to any such program or work, and a \"work based on the Program\"\nmeans either the Program or any derivative work under copyright law:\nthat is to say, a work containing the Program or a portion of it,\neither verbatim or with modifications and/or translated into another\nlanguage.  (Hereinafter, translation is included without limitation in\nthe term \"modification\".)  Each licensee is addressed as \"you\".\n\nActivities other than copying, distribution and modification are not\ncovered by this License; they are outside its scope.  The act of\nrunning the Program is not restricted, and the output from the Program\nis covered only if its contents constitute a work based on the\nProgram (independent of having been made by running the Program).\nWhether that is true depends on what the Program does.\n\n  1. You may copy and distribute verbatim copies of the Program's\nsource code as you receive it, in any medium, provided that you\nconspicuously and appropriately publish on each copy an appropriate\ncopyright notice and disclaimer of warranty; keep intact all the\nnotices that refer to this License and to the absence of any warranty;\nand give any other recipients of the Program a copy of this License\nalong with the Program.\n\nYou may charge a fee for the physical act of transferring a copy, and\nyou may at your option offer warranty protection in exchange for a fee.\n\n  2. You may modify your copy or copies of the Program or any portion\nof it, thus forming a work based on the Program, and copy and\ndistribute such modifications or work under the terms of Section 1\nabove, provided that you also meet all of these conditions:\n\n    a) You must cause the modified files to carry prominent notices\n    stating that you changed the files and the date of any change.\n\n    b) You must cause any work that you distribute or publish, that in\n    whole or in part contains or is derived from the Program or any\n    part thereof, to be licensed as a whole at no charge to all third\n    parties under the terms of this License.\n\n    c) If the modified program normally reads commands interactively\n    when run, you must cause it, when started running for such\n    interactive use in the most ordinary way, to print or display an\n    announcement including an appropriate copyright notice and a\n    notice that there is no warranty (or else, saying that you provide\n    a warranty) and that users may redistribute the program under\n    these conditions, and telling the user how to view a copy of this\n    License.  (Exception: if the Program itself is interactive but\n    does not normally print such an announcement, your work based on\n    the Program is not required to print an announcement.)\n\nThese requirements apply to the modified work as a whole.  If\nidentifiable sections of that work are not derived from the Program,\nand can be reasonably considered independent and separate works in\nthemselves, then this License, and its terms, do not apply to those\nsections when you distribute them as separate works.  But when you\ndistribute the same sections as part of a whole which is a work based\non the Program, the distribution of the whole must be on the terms of\nthis License, whose permissions for other licensees extend to the\nentire whole, and thus to each and every part regardless of who wrote it.\n\nThus, it is not the intent of this section to claim rights or contest\nyour rights to work written entirely by you; rather, the intent is to\nexercise the right to control the distribution of derivative or\ncollective works based on the Program.\n\nIn addition, mere aggregation of another work not based on the Program\nwith the Program (or with a work based on the Program) on a volume of\na storage or distribution medium does not bring the other work under\nthe scope of this License.\n\n  3. You may copy and distribute the Program (or a work based on it,\nunder Section 2) in object code or executable form under the terms of\nSections 1 and 2 above provided that you also do one of the following:\n\n    a) Accompany it with the complete corresponding machine-readable\n    source code, which must be distributed under the terms of Sections\n    1 and 2 above on a medium customarily used for software interchange; or,\n\n    b) Accompany it with a written offer, valid for at least three\n    years, to give any third party, for a charge no more than your\n    cost of physically performing source distribution, a complete\n    machine-readable copy of the corresponding source code, to be\n    distributed under the terms of Sections 1 and 2 above on a medium\n    customarily used for software interchange; or,\n\n    c) Accompany it with the information you received as to the offer\n    to distribute corresponding source code.  (This alternative is\n    allowed only for noncommercial distribution and only if you\n    received the program in object code or executable form with such\n    an offer, in accord with Subsection b above.)\n\nThe source code for a work means the preferred form of the work for\nmaking modifications to it.  For an executable work, complete source\ncode means all the source code for all modules it contains, plus any\nassociated interface definition files, plus the scripts used to\ncontrol compilation and installation of the executable.  However, as a\nspecial exception, the source code distributed need not include\nanything that is normally distributed (in either source or binary\nform) with the major components (compiler, kernel, and so on) of the\noperating system on which the executable runs, unless that component\nitself accompanies the executable.\n\nIf distribution of executable or object code is made by offering\naccess to copy from a designated place, then offering equivalent\naccess to copy the source code from the same place counts as\ndistribution of the source code, even though third parties are not\ncompelled to copy the source along with the object code.\n\n  4. You may not copy, modify, sublicense, or distribute the Program\nexcept as expressly provided under this License.  Any attempt\notherwise to copy, modify, sublicense or distribute the Program is\nvoid, and will automatically terminate your rights under this License.\nHowever, parties who have received copies, or rights, from you under\nthis License will not have their licenses terminated so long as such\nparties remain in full compliance.\n\n  5. You are not required to accept this License, since you have not\nsigned it.  However, nothing else grants you permission to modify or\ndistribute the Program or its derivative works.  These actions are\nprohibited by law if you do not accept this License.  Therefore, by\nmodifying or distributing the Program (or any work based on the\nProgram), you indicate your acceptance of this License to do so, and\nall its terms and conditions for copying, distributing or modifying\nthe Program or works based on it.\n\n  6. Each time you redistribute the Program (or any work based on the\nProgram), the recipient automatically receives a license from the\noriginal licensor to copy, distribute or modify the Program subject to\nthese terms and conditions.  You may not impose any further\nrestrictions on the recipients' exercise of the rights granted herein.\nYou are not responsible for enforcing compliance by third parties to\nthis License.\n\n  7. If, as a consequence of a court judgment or allegation of patent\ninfringement or for any other reason (not limited to patent issues),\nconditions are imposed on you (whether by court order, agreement or\notherwise) that contradict the conditions of this License, they do not\nexcuse you from the conditions of this License.  If you cannot\ndistribute so as to satisfy simultaneously your obligations under this\nLicense and any other pertinent obligations, then as a consequence you\nmay not distribute the Program at all.  For example, if a patent\nlicense would not permit royalty-free redistribution of the Program by\nall those who receive copies directly or indirectly through you, then\nthe only way you could satisfy both it and this License would be to\nrefrain entirely from distribution of the Program.\n\nIf any portion of this section is held invalid or unenforceable under\nany particular circumstance, the balance of the section is intended to\napply and the section as a whole is intended to apply in other\ncircumstances.\n\nIt is not the purpose of this section to induce you to infringe any\npatents or other property right claims or to contest validity of any\nsuch claims; this section has the sole purpose of protecting the\nintegrity of the free software distribution system, which is\nimplemented by public license practices.  Many people have made\ngenerous contributions to the wide range of software distributed\nthrough that system in reliance on consistent application of that\nsystem; it is up to the author/donor to decide if he or she is willing\nto distribute software through any other system and a licensee cannot\nimpose that choice.\n\nThis section is intended to make thoroughly clear what is believed to\nbe a consequence of the rest of this License.\n\n  8. If the distribution and/or use of the Program is restricted in\ncertain countries either by patents or by copyrighted interfaces, the\noriginal copyright holder who places the Program under this License\nmay add an explicit geographical distribution limitation excluding\nthose countries, so that distribution is permitted only in or among\ncountries not thus excluded.  In such case, this License incorporates\nthe limitation as if written in the body of this License.\n\n  9. The Free Software Foundation may publish revised and/or new versions\nof the General Public License from time to time.  Such new versions will\nbe similar in spirit to the present version, but may differ in detail to\naddress new problems or concerns.\n\nEach version is given a distinguishing version number.  If the Program\nspecifies a version number of this License which applies to it and \"any\nlater version\", you have the option of following the terms and conditions\neither of that version or of any later version published by the Free\nSoftware Foundation.  If the Program does not specify a version number of\nthis License, you may choose any version ever published by the Free Software\nFoundation.\n\n  10. If you wish to incorporate parts of the Program into other free\nprograms whose distribution conditions are different, write to the author\nto ask for permission.  For software which is copyrighted by the Free\nSoftware Foundation, write to the Free Software Foundation; we sometimes\nmake exceptions for this.  Our decision will be guided by the two goals\nof preserving the free status of all derivatives of our free software and\nof promoting the sharing and reuse of software generally.\n\n          NO WARRANTY\n\n  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY\nFOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN\nOTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES\nPROVIDE THE PROGRAM \"AS IS\" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED\nOR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\nMERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS\nTO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE\nPROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,\nREPAIR OR CORRECTION.\n\n  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING\nWILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR\nREDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,\nINCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING\nOUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED\nTO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY\nYOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER\nPROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE\nPOSSIBILITY OF SUCH DAMAGES.\n\n         END OF TERMS AND CONDITIONS\n\n      How to Apply These Terms to Your New Programs\n\n  If you develop a new program, and you want it to be of the greatest\npossible use to the public, the best way to achieve this is to make it\nfree software which everyone can redistribute and change under these terms.\n\n  To do so, attach the following notices to the program.  It is safest\nto attach them to the start of each source file to most effectively\nconvey the exclusion of warranty; and each file should have at least\nthe \"copyright\" line and a pointer to where the full notice is found.\n\n    <one line to give the program's name and a brief idea of what it does.>\n    Copyright (C) <year>  <name of author>\n\n    This program is free software; you can redistribute it and/or modify\n    it under the terms of the GNU General Public License as published by\n    the Free Software Foundation; either version 2 of the License, or\n    (at your option) any later version.\n\n    This program is distributed in the hope that it will be useful,\n    but WITHOUT ANY WARRANTY; without even the implied warranty of\n    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n    GNU General Public License for more details.\n\n    You should have received a copy of the GNU General Public License\n    along with this program; if not, write to the Free Software\n    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA\n\n\nAlso add information on how to contact you by electronic and paper mail.\n\nIf the program is interactive, make it output a short notice like this\nwhen it starts in an interactive mode:\n\n    Gnomovision version 69, Copyright (C) year name of author\n    Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.\n    This is free software, and you are welcome to redistribute it\n    under certain conditions; type `show c' for details.\n\nThe hypothetical commands `show w' and `show c' should show the appropriate\nparts of the General Public License.  Of course, the commands you use may\nbe called something other than `show w' and `show c'; they could even be\nmouse-clicks or menu items--whatever suits your program.\n\nYou should also get your employer (if you work as a programmer) or your\nschool, if any, to sign a \"copyright disclaimer\" for the program, if\nnecessary.  Here is a sample; alter the names:\n\n  Yoyodyne, Inc., hereby disclaims all copyright interest in the program\n  `Gnomovision' (which makes passes at compilers) written by James Hacker.\n\n  <signature of Ty Coon>, 1 April 1989\n  Ty Coon, President of Vice\n\nThis General Public License does not permit incorporating your program into\nproprietary programs.  If your program is a subroutine library, you may\nconsider it more useful to permit linking proprietary applications with the\nlibrary.  If this is what you want to do, use the GNU Lesser General\nPublic License instead of this License.\n"
  },
  {
    "path": "static/mergely/editor/lib/farbtastic/farbtastic.css",
    "content": "/**\n * Farbtastic Color Picker 1.2\n * © 2008 Steven Wittens\n *\n * This program is free software; you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation; either version 2 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA\n */\n.farbtastic {\n  position: relative;\n}\n.farbtastic * {\n  position: absolute;\n  cursor: crosshair;\n}\n.farbtastic, .farbtastic .wheel {\n  width: 195px;\n  height: 195px;\n}\n.farbtastic .color, .farbtastic .overlay {\n  top: 47px;\n  left: 47px;\n  width: 101px;\n  height: 101px;\n}\n.farbtastic .wheel {\n  background: url(wheel.png) no-repeat;\n  width: 195px;\n  height: 195px;\n}\n.farbtastic .overlay {\n  background: url(mask.png) no-repeat;\n}\n.farbtastic .marker {\n  width: 17px;\n  height: 17px;\n  margin: -8px 0 0 -8px;\n  overflow: hidden; \n  background: url(marker.png) no-repeat;\n}\n\n"
  },
  {
    "path": "static/mergely/editor/lib/farbtastic/farbtastic.js",
    "content": "/**\n * Farbtastic Color Picker 1.2\n * © 2008 Steven Wittens\n *\n * This program is free software; you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation; either version 2 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA\n */\n\njQuery.fn.farbtastic = function (callback) {\n  $.farbtastic(this, callback);\n  return this;\n};\n\njQuery.farbtastic = function (container, callback) {\n  var container = $(container).get(0);\n  return container.farbtastic || (container.farbtastic = new jQuery._farbtastic(container, callback));\n}\n\njQuery._farbtastic = function (container, callback) {\n  // Store farbtastic object\n  var fb = this;\n\n  // Insert markup\n  $(container).html('<div class=\"farbtastic\"><div class=\"color\"></div><div class=\"wheel\"></div><div class=\"overlay\"></div><div class=\"h-marker marker\"></div><div class=\"sl-marker marker\"></div></div>');\n  var e = $('.farbtastic', container);\n  fb.wheel = $('.wheel', container).get(0);\n  // Dimensions\n  fb.radius = 84;\n  fb.square = 100;\n  fb.width = 194;\n\n  // Fix background PNGs in IE6\n  if (navigator.appVersion.match(/MSIE [0-6]\\./)) {\n    $('*', e).each(function () {\n      if (this.currentStyle.backgroundImage != 'none') {\n        var image = this.currentStyle.backgroundImage;\n        image = this.currentStyle.backgroundImage.substring(5, image.length - 2);\n        $(this).css({\n          'backgroundImage': 'none',\n          'filter': \"progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true, sizingMethod=crop, src='\" + image + \"')\"\n        });\n      }\n    });\n  }\n\n  /**\n   * Link to the given element(s) or callback.\n   */\n  fb.linkTo = function (callback) {\n    // Unbind previous nodes\n    if (typeof fb.callback == 'object') {\n      $(fb.callback).unbind('keyup', fb.updateValue);\n    }\n\n    // Reset color\n    fb.color = null;\n\n    // Bind callback or elements\n    if (typeof callback == 'function') {\n      fb.callback = callback;\n    }\n    else if (typeof callback == 'object' || typeof callback == 'string') {\n      fb.callback = $(callback);\n      fb.callback.bind('keyup', fb.updateValue);\n      if (fb.callback.get(0).value) {\n        fb.setColor(fb.callback.get(0).value);\n      }\n    }\n    return this;\n  }\n  fb.updateValue = function (event) {\n    if (this.value && this.value != fb.color) {\n      fb.setColor(this.value);\n    }\n  }\n\n  /**\n   * Change color with HTML syntax #123456\n   */\n  fb.setColor = function (color) {\n    var unpack = fb.unpack(color);\n\t// JAMIE WAS HERE rgb(r, g, b) modification\n\tif (!unpack && color) {\n\t\tcolor = fb.RGBToHex(color);\n\t\tif (color) unpack = fb.unpack(color);\n\t}\n\t// JAMIE WAS HERE rgb(r, g, b) modification\n    if (fb.color != color && unpack) {\n      fb.color = color;\n      fb.rgb = unpack;\n      fb.hsl = fb.RGBToHSL(fb.rgb);\n      fb.updateDisplay();\n    }\n    return this;\n  }\n\n  /**\n   * Change color with HSL triplet [0..1, 0..1, 0..1]\n   */\n  fb.setHSL = function (hsl) {\n    fb.hsl = hsl;\n    fb.rgb = fb.HSLToRGB(hsl);\n    fb.color = fb.pack(fb.rgb);\n    fb.updateDisplay();\n    return this;\n  }\n\n  /////////////////////////////////////////////////////\n\n  /**\n   * Retrieve the coordinates of the given event relative to the center\n   * of the widget.\n   */\n  fb.widgetCoords = function (event) {\n    var x, y;\n    var el = event.target || event.srcElement;\n    var reference = fb.wheel;\n\n    if (typeof event.offsetX != 'undefined') {\n      // Use offset coordinates and find common offsetParent\n      var pos = { x: event.offsetX, y: event.offsetY };\n\n      // Send the coordinates upwards through the offsetParent chain.\n      var e = el;\n      while (e) {\n        e.mouseX = pos.x;\n        e.mouseY = pos.y;\n        pos.x += e.offsetLeft;\n        pos.y += e.offsetTop;\n        e = e.offsetParent;\n      }\n\n      // Look for the coordinates starting from the wheel widget.\n      var e = reference;\n      var offset = { x: 0, y: 0 }\n      while (e) {\n        if (typeof e.mouseX != 'undefined') {\n          x = e.mouseX - offset.x;\n          y = e.mouseY - offset.y;\n          break;\n        }\n        offset.x += e.offsetLeft;\n        offset.y += e.offsetTop;\n        e = e.offsetParent;\n      }\n\n      // Reset stored coordinates\n      e = el;\n      while (e) {\n        e.mouseX = undefined;\n        e.mouseY = undefined;\n        e = e.offsetParent;\n      }\n    }\n    else {\n      // Use absolute coordinates\n      var pos = fb.absolutePosition(reference);\n      x = (event.pageX || 0*(event.clientX + $('html').get(0).scrollLeft)) - pos.x;\n      y = (event.pageY || 0*(event.clientY + $('html').get(0).scrollTop)) - pos.y;\n    }\n    // Subtract distance to middle\n    return { x: x - fb.width / 2, y: y - fb.width / 2 };\n  }\n\n  /**\n   * Mousedown handler\n   */\n  fb.mousedown = function (event) {\n    // Capture mouse\n    if (!document.dragging) {\n      $(document).bind('mousemove', fb.mousemove).bind('mouseup', fb.mouseup);\n      document.dragging = true;\n    }\n\n    // Check which area is being dragged\n    var pos = fb.widgetCoords(event);\n    fb.circleDrag = Math.max(Math.abs(pos.x), Math.abs(pos.y)) * 2 > fb.square;\n\n    // Process\n    fb.mousemove(event);\n    return false;\n  }\n\n  /**\n   * Mousemove handler\n   */\n  fb.mousemove = function (event) {\n    // Get coordinates relative to color picker center\n    var pos = fb.widgetCoords(event);\n\n    // Set new HSL parameters\n    if (fb.circleDrag) {\n      var hue = Math.atan2(pos.x, -pos.y) / 6.28;\n      if (hue < 0) hue += 1;\n      fb.setHSL([hue, fb.hsl[1], fb.hsl[2]]);\n    }\n    else {\n      var sat = Math.max(0, Math.min(1, -(pos.x / fb.square) + .5));\n      var lum = Math.max(0, Math.min(1, -(pos.y / fb.square) + .5));\n      fb.setHSL([fb.hsl[0], sat, lum]);\n    }\n    return false;\n  }\n\n  /**\n   * Mouseup handler\n   */\n  fb.mouseup = function () {\n    // Uncapture mouse\n    $(document).unbind('mousemove', fb.mousemove);\n    $(document).unbind('mouseup', fb.mouseup);\n    document.dragging = false;\n  }\n\n  /**\n   * Update the markers and styles\n   */\n  fb.updateDisplay = function () {\n    // Markers\n    var angle = fb.hsl[0] * 6.28;\n    $('.h-marker', e).css({\n      left: Math.round(Math.sin(angle) * fb.radius + fb.width / 2) + 'px',\n      top: Math.round(-Math.cos(angle) * fb.radius + fb.width / 2) + 'px'\n    });\n\n    $('.sl-marker', e).css({\n      left: Math.round(fb.square * (.5 - fb.hsl[1]) + fb.width / 2) + 'px',\n      top: Math.round(fb.square * (.5 - fb.hsl[2]) + fb.width / 2) + 'px'\n    });\n\n    // Saturation/Luminance gradient\n    $('.color', e).css('backgroundColor', fb.pack(fb.HSLToRGB([fb.hsl[0], 1, 0.5])));\n\n    // Linked elements or callback\n    if (typeof fb.callback == 'object') {\n      // Set background/foreground color\n      $(fb.callback).css({\n        backgroundColor: fb.color,\n        color: fb.hsl[2] > 0.5 ? '#000' : '#fff'\n      });\n\n      // Change linked value\n      $(fb.callback).each(function() {\n        if (this.value && this.value != fb.color) {\n          this.value = fb.color;\n        }\n      });\n    }\n    else if (typeof fb.callback == 'function') {\n      fb.callback.call(fb, fb.color);\n    }\n  }\n\n  /**\n   * Get absolute position of element\n   */\n  fb.absolutePosition = function (el) {\n    var r = { x: el.offsetLeft, y: el.offsetTop };\n    // Resolve relative to offsetParent\n    if (el.offsetParent) {\n      var tmp = fb.absolutePosition(el.offsetParent);\n      r.x += tmp.x;\n      r.y += tmp.y;\n    }\n    return r;\n  };\n\n  /* Various color utility functions */\n  fb.pack = function (rgb) {\n    var r = Math.round(rgb[0] * 255);\n    var g = Math.round(rgb[1] * 255);\n    var b = Math.round(rgb[2] * 255);\n    return '#' + (r < 16 ? '0' : '') + r.toString(16) +\n           (g < 16 ? '0' : '') + g.toString(16) +\n           (b < 16 ? '0' : '') + b.toString(16);\n  }\n\n  fb.unpack = function (color) {\n    if (color.length == 7) {\n      return [parseInt('0x' + color.substring(1, 3)) / 255,\n        parseInt('0x' + color.substring(3, 5)) / 255,\n        parseInt('0x' + color.substring(5, 7)) / 255];\n    }\n    else if (color.length == 4) {\n      return [parseInt('0x' + color.substring(1, 2)) / 15,\n        parseInt('0x' + color.substring(2, 3)) / 15,\n        parseInt('0x' + color.substring(3, 4)) / 15];\n    }\n  }\n\n  fb.HSLToRGB = function (hsl) {\n    var m1, m2, r, g, b;\n    var h = hsl[0], s = hsl[1], l = hsl[2];\n    m2 = (l <= 0.5) ? l * (s + 1) : l + s - l*s;\n    m1 = l * 2 - m2;\n    return [this.hueToRGB(m1, m2, h+0.33333),\n        this.hueToRGB(m1, m2, h),\n        this.hueToRGB(m1, m2, h-0.33333)];\n  }\n\n  fb.hueToRGB = function (m1, m2, h) {\n    h = (h < 0) ? h + 1 : ((h > 1) ? h - 1 : h);\n    if (h * 6 < 1) return m1 + (m2 - m1) * h * 6;\n    if (h * 2 < 1) return m2;\n    if (h * 3 < 2) return m1 + (m2 - m1) * (0.66666 - h) * 6;\n    return m1;\n  }\n\n  // JAMIE WAS HERE\n  fb.RGBToHex = function(color) {\n\t  var exp = new RegExp(/rgb\\(\\s*([0-9]{1,3})\\s*,\\s*([0-9]{1,3})\\s*,\\s*([0-9]{1,3}\\s*)\\)/i);\n\t  if(exp.test(color)) {\n\t\t  var results = exp.exec(color);\n\t\t  var r = parseInt(results[1]).toString(16);\n\t\t  var g = parseInt(results[2]).toString(16);\n\t\t  var b = parseInt(results[3]).toString(16);\n\t\t  if (r.length < 2) r = '0' + r;\n\t\t  if (g.length < 2) g = '0' + g;\n\t\t  if (b.length < 2) b = '0' + b;\n\t\t  return '#' + r + g + b;\n\t  }\n  }\n  // JAMIE WAS HERE\n  \n  fb.RGBToHSL = function (rgb) {\n    var min, max, delta, h, s, l;\n    var r = rgb[0], g = rgb[1], b = rgb[2];\n    min = Math.min(r, Math.min(g, b));\n    max = Math.max(r, Math.max(g, b));\n    delta = max - min;\n    l = (min + max) / 2;\n    s = 0;\n    if (l > 0 && l < 1) {\n      s = delta / (l < 0.5 ? (2 * l) : (2 - 2 * l));\n    }\n    h = 0;\n    if (delta > 0) {\n      if (max == r && max != g) h += (g - b) / delta;\n      if (max == g && max != b) h += (2 + (b - r) / delta);\n      if (max == b && max != r) h += (4 + (r - g) / delta);\n      h /= 6;\n    }\n    return [h, s, l];\n  }\n\n  // Install mousedown handler (the others are set on the document on-demand)\n  $('*', e).mousedown(fb.mousedown);\n\n    // Init color\n  fb.setColor('#000000');\n\n  // Set linked elements/callback\n  if (callback) {\n    fb.linkTo(callback);\n  }\n}"
  },
  {
    "path": "static/mergely/editor/lib/farbtastic/index.html",
    "content": "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\n<head>\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\" />\n<title>Papermashup.com | jQuery  Color picker</title>\n<link href=\"../style.css\" rel=\"stylesheet\" type=\"text/css\" />\n<script type=\"text/javascript\" src=\"http://ajax.googleapis.com/ajax/libs/jquery/1.3.0/jquery.min.js\"></script>\n <script type=\"text/javascript\" src=\"farbtastic.js\"></script>\n <link rel=\"stylesheet\" href=\"farbtastic.css\" type=\"text/css\" />\n \n\t <script type=\"text/javascript\" charset=\"utf-8\">\n  $(document).ready(function() {\n    var f = $.farbtastic('#picker');\n    var p = $('#picker').css('opacity', 0.25);\n    var selected;\n    $('.colorwell')\n      .each(function () { f.linkTo(this); $(this).css('opacity', 0.75); })\n      .focus(function() {\n        if (selected) {\n          $(selected).css('opacity', 0.75).removeClass('colorwell-selected');\n        }\n        f.linkTo(this);\n        p.css('opacity', 1);\n        $(selected = this).css('opacity', 1).addClass('colorwell-selected');\n      });\n  });\n </script>\n    \n    \n    \n<style>\nbody{\nfont-family:Verdana, Geneva, sans-serif;\nfont-size:14px;\nmargin:0px;\npadding:0px;}\n\n.colorwell{\n\tpadding:5px;\n\tfont-size:18px;\n\tcolor:#333;\n\tfont-family:Verdana, Geneva, sans-serif;\n\tborder:1px #CCC solid;}\n\n</style>\n\n</head>\n\n<body>\n<div id=\"header\"><a href=\"http://www.papermashup.com/\"><img src=\"../images/logo.png\" width=\"348\" height=\"63\" border=\"0\" /></a></div>\n<div id=\"container\">\n\n\t\n    <h1>jQuery 'Farbtastic' Color Picker</h1>\n\n\n<form action=\"\" style=\"width: 500px;\">\n  <div id=\"picker\" style=\"float: right;\"></div>\n  <div class=\"form-item\"><label for=\"color1\">Color 1:</label><input type=\"text\" id=\"color1\" name=\"color1\" class=\"colorwell\" value=\"#edfa00\" /></div>\n  <div class=\"form-item\"><label for=\"color2\">Color 2:</label><input type=\"text\" id=\"color2\" name=\"color2\" class=\"colorwell\" value=\"#ff9505\" /></div>\n  <div class=\"form-item\"><label for=\"color3\">Color 3:</label><input type=\"text\" id=\"color3\" name=\"color3\" class=\"colorwell\" value=\"#f86c2a\" /></div>\n  \n</form>\n\n    \n    <div class=\"clear\"></div>\n\n</div>\n<div id=\"footer\"><a href=\"http://www.papermashup.com\">papermashup.com</a> | <a href=\"http://papermashup.com/jquery-farbtastic-colour-picker/\">Back to tutorial</a></div>\n<script type=\"text/javascript\">\nvar gaJsHost = ((\"https:\" == document.location.protocol) ? \"https://ssl.\" : \"http://www.\");\ndocument.write(unescape(\"%3Cscript src='\" + gaJsHost + \"google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E\"));\n</script>\n<script type=\"text/javascript\">\ntry {\nvar pageTracker = _gat._getTracker(\"UA-7025232-1\");\npageTracker._trackPageview();\n} catch(err) {}</script>\n\n</body>\n</html>\n"
  },
  {
    "path": "static/mergely/editor/lib/gatag.js",
    "content": "//\tThis javascript tags file downloads and external links in Google Analytics.\n//\tYou need to be using the Google Analytics New Tracking Code (ga.js) \n//\tfor this script to work.\n//\tTo use, place this file on all pages just above the Google Analytics tracking code.\n//\tAll outbound links and links to non-html files should now be automatically tracked.\n//\n//\tThis script has been provided by Goodwebpractices.com\n//\tThanks to ShoreTel, MerryMan and Colm McBarron\n//\n//\twww.goodwebpractices.com\n//\tVKI has made changes as indicated below.\t\t\t\t\t\t\t\t\n\nif (document.getElementsByTagName) {\n        // Initialize external link handlers\n        var hrefs = document.getElementsByTagName(\"a\");\n        for (var l = 0; l < hrefs.length; l++) {\n\t\t\t\t// try {} catch{} block added by erikvold VKI\n\t\t\ttry{\n\t                //protocol, host, hostname, port, pathname, search, hash\n\t                if (hrefs[l].protocol == \"mailto:\") {\n\t                        startListening(hrefs[l],\"click\",trackMailto);\n\t                } else if (hrefs[l].hostname == location.host) {\n\t                        var path = hrefs[l].pathname + hrefs[l].search;\n\t\t\t\t\t\t\tvar isDoc = path.match(/\\.(?:doc|eps|jpg|png|svg|xls|ppt|pdf|xls|zip|txt|vsd|vxd|js|css|rar|exe|wma|mov|avi|wmv|mp3)($|\\&|\\?)/);\n\t                        if (isDoc) {\n\t                                startListening(hrefs[l],\"click\",trackExternalLinks);\n\t                        }\n\t                } else if (!hrefs[l].href.match(/^javascript:/)) {\n\t                        startListening(hrefs[l],\"click\",trackExternalLinks);\n\t                }\n\t\t\t}\n\t\t\tcatch(e){\n\t\t\t\t\tcontinue;\n\t\t\t}\n        }\n}\n\nfunction startListening (obj,evnt,func) {\n        if (obj.addEventListener) {\n                obj.addEventListener(evnt,func,false);\n        } else if (obj.attachEvent) {\n                obj.attachEvent(\"on\" + evnt,func);\n        }\n}\n\nfunction trackMailto (evnt) {\n        var href = (evnt.srcElement) ? evnt.srcElement.href : this.href;\n        var mailto = \"/mailto/\" + href.substring(7);\n        if (typeof(pageTracker) == \"object\") pageTracker._trackPageview(mailto);\n}\n\nfunction trackExternalLinks (evnt) {\n        var e = (evnt.srcElement) ? evnt.srcElement : this;\n        while (e.tagName != \"A\") {\n                e = e.parentNode;\n        }\n        var lnk = (e.pathname.charAt(0) == \"/\") ? e.pathname : \"/\" + e.pathname;\n        if (e.search && e.pathname.indexOf(e.search) == -1) lnk += e.search;\n        if (e.hostname != location.host) lnk = \"/external/\" + e.hostname + lnk;\n        if (typeof(pageTracker) == \"object\") pageTracker._trackPageview(lnk); \n}\n"
  },
  {
    "path": "static/mergely/editor/lib/tipsy/jquery.tipsy.js",
    "content": "// tipsy, facebook style tooltips for jquery\n// version 1.0.0a\n// (c) 2008-2010 jason frame [jason@onehackoranother.com]\n// released under the MIT license\n\n(function($) {\n    \n    function maybeCall(thing, ctx) {\n        return (typeof thing == 'function') ? (thing.call(ctx)) : thing;\n    };\n    \n    function isElementInDOM(ele) {\n      while (ele = ele.parentNode) {\n        if (ele == document) return true;\n      }\n      return false;\n    };\n    \n    function Tipsy(element, options) {\n        this.$element = $(element);\n        this.options = options;\n        this.enabled = true;\n        this.fixTitle();\n    };\n    \n    Tipsy.prototype = {\n        show: function() {\n            var title = this.getTitle();\n            if (title && this.enabled) {\n                var $tip = this.tip();\n                \n                $tip.find('.tipsy-inner')[this.options.html ? 'html' : 'text'](title);\n                $tip[0].className = 'tipsy'; // reset classname in case of dynamic gravity\n                $tip.remove().css({top: 0, left: 0, visibility: 'hidden', display: 'block'}).prependTo(document.body);\n                \n                var pos = $.extend({}, this.$element.offset(), {\n                    width: this.$element[0].offsetWidth,\n                    height: this.$element[0].offsetHeight\n                });\n                \n                var actualWidth = $tip[0].offsetWidth,\n                    actualHeight = $tip[0].offsetHeight,\n                    gravity = maybeCall(this.options.gravity, this.$element[0]);\n                \n                var tp;\n                switch (gravity.charAt(0)) {\n                    case 'n':\n                        tp = {top: pos.top + pos.height + this.options.offset, left: pos.left + pos.width / 2 - actualWidth / 2};\n                        break;\n                    case 's':\n                        tp = {top: pos.top - actualHeight - this.options.offset, left: pos.left + pos.width / 2 - actualWidth / 2};\n                        break;\n                    case 'e':\n                        tp = {top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left - actualWidth - this.options.offset};\n                        break;\n                    case 'w':\n                        tp = {top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left + pos.width + this.options.offset};\n                        break;\n                }\n                \n                if (gravity.length == 2) {\n                    if (gravity.charAt(1) == 'w') {\n                        tp.left = pos.left + pos.width / 2 - 15;\n                    } else {\n                        tp.left = pos.left + pos.width / 2 - actualWidth + 15;\n                    }\n                }\n                \n                $tip.css(tp).addClass('tipsy-' + gravity);\n                $tip.find('.tipsy-arrow')[0].className = 'tipsy-arrow tipsy-arrow-' + gravity.charAt(0);\n                if (this.options.className) {\n                    $tip.addClass(maybeCall(this.options.className, this.$element[0]));\n                }\n                \n                if (this.options.fade) {\n                    $tip.stop().css({opacity: 0, display: 'block', visibility: 'visible'}).animate({opacity: this.options.opacity});\n                } else {\n                    $tip.css({visibility: 'visible', opacity: this.options.opacity});\n                }\n            }\n        },\n        \n        hide: function() {\n            if (this.options.fade) {\n                this.tip().stop().fadeOut(function() { $(this).remove(); });\n            } else {\n                this.tip().remove();\n            }\n        },\n        \n        fixTitle: function() {\n            var $e = this.$element;\n            if ($e.attr('title') || typeof($e.attr('original-title')) != 'string') {\n                $e.attr('original-title', $e.attr('title') || '').removeAttr('title');\n            }\n        },\n        \n        getTitle: function() {\n            var title, $e = this.$element, o = this.options;\n            this.fixTitle();\n            var title, o = this.options;\n            if (typeof o.title == 'string') {\n                title = $e.attr(o.title == 'title' ? 'original-title' : o.title);\n            } else if (typeof o.title == 'function') {\n                title = o.title.call($e[0]);\n            }\n            title = ('' + title).replace(/(^\\s*|\\s*$)/, \"\");\n            return title || o.fallback;\n        },\n        \n        tip: function() {\n            if (!this.$tip) {\n                this.$tip = $('<div class=\"tipsy\"></div>').html('<div class=\"tipsy-arrow\"></div><div class=\"tipsy-inner\"></div>');\n                this.$tip.data('tipsy-pointee', this.$element[0]);\n            }\n            return this.$tip;\n        },\n        \n        validate: function() {\n            if (!this.$element[0].parentNode) {\n                this.hide();\n                this.$element = null;\n                this.options = null;\n            }\n        },\n        \n        enable: function() { this.enabled = true; },\n        disable: function() { this.enabled = false; },\n        toggleEnabled: function() { this.enabled = !this.enabled; }\n    };\n    \n    $.fn.tipsy = function(options) {\n        \n        if (options === true) {\n            return this.data('tipsy');\n        } else if (typeof options == 'string') {\n            var tipsy = this.data('tipsy');\n            if (tipsy) tipsy[options]();\n            return this;\n        }\n        \n        options = $.extend({}, $.fn.tipsy.defaults, options);\n        \n        function get(ele) {\n            var tipsy = $.data(ele, 'tipsy');\n            if (!tipsy) {\n                tipsy = new Tipsy(ele, $.fn.tipsy.elementOptions(ele, options));\n                $.data(ele, 'tipsy', tipsy);\n            }\n            return tipsy;\n        }\n        \n        function enter() {\n            var tipsy = get(this);\n            tipsy.hoverState = 'in';\n            if (options.delayIn == 0) {\n                tipsy.show();\n            } else {\n                tipsy.fixTitle();\n                setTimeout(function() { if (tipsy.hoverState == 'in') tipsy.show(); }, options.delayIn);\n            }\n        };\n        \n        function leave() {\n            var tipsy = get(this);\n            tipsy.hoverState = 'out';\n            if (options.delayOut == 0) {\n                tipsy.hide();\n            } else {\n                setTimeout(function() { if (tipsy.hoverState == 'out') tipsy.hide(); }, options.delayOut);\n            }\n        };\n        \n        if (!options.live) this.each(function() { get(this); });\n        \n        if (options.trigger != 'manual') {\n            var binder   = options.live ? 'live' : 'bind',\n                eventIn  = options.trigger == 'hover' ? 'mouseenter' : 'focus',\n                eventOut = options.trigger == 'hover' ? 'mouseleave' : 'blur';\n            this[binder](eventIn, enter)[binder](eventOut, leave);\n        }\n        \n        return this;\n        \n    };\n    \n    $.fn.tipsy.defaults = {\n        className: null,\n        delayIn: 0,\n        delayOut: 0,\n        fade: false,\n        fallback: '',\n        gravity: 'n',\n        html: false,\n        live: false,\n        offset: 0,\n        opacity: 0.8,\n        title: 'title',\n        trigger: 'hover'\n    };\n    \n    $.fn.tipsy.revalidate = function() {\n      $('.tipsy').each(function() {\n        var pointee = $.data(this, 'tipsy-pointee');\n        if (!pointee || !isElementInDOM(pointee)) {\n          $(this).remove();\n        }\n      });\n    };\n    \n    // Overwrite this method to provide options on a per-element basis.\n    // For example, you could store the gravity in a 'tipsy-gravity' attribute:\n    // return $.extend({}, options, {gravity: $(ele).attr('tipsy-gravity') || 'n' });\n    // (remember - do not modify 'options' in place!)\n    $.fn.tipsy.elementOptions = function(ele, options) {\n        return $.metadata ? $.extend({}, options, $(ele).metadata()) : options;\n    };\n    \n    $.fn.tipsy.autoNS = function() {\n        return $(this).offset().top > ($(document).scrollTop() + $(window).height() / 2) ? 's' : 'n';\n    };\n    \n    $.fn.tipsy.autoWE = function() {\n        return $(this).offset().left > ($(document).scrollLeft() + $(window).width() / 2) ? 'e' : 'w';\n    };\n    \n    /**\n     * yields a closure of the supplied parameters, producing a function that takes\n     * no arguments and is suitable for use as an autogravity function like so:\n     *\n     * @param margin (int) - distance from the viewable region edge that an\n     *        element should be before setting its tooltip's gravity to be away\n     *        from that edge.\n     * @param prefer (string, e.g. 'n', 'sw', 'w') - the direction to prefer\n     *        if there are no viewable region edges effecting the tooltip's\n     *        gravity. It will try to vary from this minimally, for example,\n     *        if 'sw' is preferred and an element is near the right viewable \n     *        region edge, but not the top edge, it will set the gravity for\n     *        that element's tooltip to be 'se', preserving the southern\n     *        component.\n     */\n     $.fn.tipsy.autoBounds = function(margin, prefer) {\n\t\treturn function() {\n\t\t\tvar dir = {ns: prefer[0], ew: (prefer.length > 1 ? prefer[1] : false)},\n\t\t\t    boundTop = $(document).scrollTop() + margin,\n\t\t\t    boundLeft = $(document).scrollLeft() + margin,\n\t\t\t    $this = $(this);\n\n\t\t\tif ($this.offset().top < boundTop) dir.ns = 'n';\n\t\t\tif ($this.offset().left < boundLeft) dir.ew = 'w';\n\t\t\tif ($(window).width() + $(document).scrollLeft() - $this.offset().left < margin) dir.ew = 'e';\n\t\t\tif ($(window).height() + $(document).scrollTop() - $this.offset().top < margin) dir.ns = 's';\n\n\t\t\treturn dir.ns + (dir.ew ? dir.ew : '');\n\t\t}\n\t};\n    \n})(jQuery);\n"
  },
  {
    "path": "static/mergely/editor/lib/tipsy/tipsy.css",
    "content": ".tipsy { font-size: 10px; position: absolute; padding: 5px; z-index: 100000; }\n  .tipsy-inner { background-color: #000; color: #FFF; max-width: 200px; padding: 5px 8px 4px 8px; text-align: center; }\n\n  /* Rounded corners */\n  .tipsy-inner { border-radius: 3px; -moz-border-radius: 3px; -webkit-border-radius: 3px; }\n  \n  /* Uncomment for shadow */\n  /*.tipsy-inner { box-shadow: 0 0 5px #000000; -webkit-box-shadow: 0 0 5px #000000; -moz-box-shadow: 0 0 5px #000000; }*/\n  \n  .tipsy-arrow { position: absolute; width: 0; height: 0; line-height: 0; border: 5px dashed #000; }\n  \n  /* Rules to colour arrows */\n  .tipsy-arrow-n { border-bottom-color: #000; }\n  .tipsy-arrow-s { border-top-color: #000; }\n  .tipsy-arrow-e { border-left-color: #000; }\n  .tipsy-arrow-w { border-right-color: #000; }\n  \n\t.tipsy-n .tipsy-arrow { top: 0px; left: 50%; margin-left: -5px; border-bottom-style: solid; border-top: none; border-left-color: transparent; border-right-color: transparent; }\n    .tipsy-nw .tipsy-arrow { top: 0; left: 10px; border-bottom-style: solid; border-top: none; border-left-color: transparent; border-right-color: transparent;}\n    .tipsy-ne .tipsy-arrow { top: 0; right: 10px; border-bottom-style: solid; border-top: none;  border-left-color: transparent; border-right-color: transparent;}\n  .tipsy-s .tipsy-arrow { bottom: 0; left: 50%; margin-left: -5px; border-top-style: solid; border-bottom: none;  border-left-color: transparent; border-right-color: transparent; }\n    .tipsy-sw .tipsy-arrow { bottom: 0; left: 10px; border-top-style: solid; border-bottom: none;  border-left-color: transparent; border-right-color: transparent; }\n    .tipsy-se .tipsy-arrow { bottom: 0; right: 10px; border-top-style: solid; border-bottom: none; border-left-color: transparent; border-right-color: transparent; }\n  .tipsy-e .tipsy-arrow { right: 0; top: 50%; margin-top: -5px; border-left-style: solid; border-right: none; border-top-color: transparent; border-bottom-color: transparent; }\n  .tipsy-w .tipsy-arrow { left: 0; top: 50%; margin-top: -5px; border-right-style: solid; border-left: none; border-top-color: transparent; border-bottom-color: transparent; }\n"
  },
  {
    "path": "static/mergely/editor/lib/wicked-ui.css",
    "content": "/*\nThe MIT License (MIT)\n\nCopyright (c) 2013 jamie.peabody@gmail.com\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n*/\n\n/* menu configurable options */\n.wicked-menu { z-index: 7; }\t\t\t\t\t\t\t\t\t/* cm uses index <= 6 */\n.wicked-menu { font-size: 13px; }\n.wicked-menu, .wicked-menu ul, .wicked-menu li > a.menu-item { \n\tcolor: #333; \t\t\t\t\t\t\t\t\t\t\t/* text color */\n}\n.wicked-menu li > a { color: #000; text-decoration:none;}\t\t\t\t\t\t\t/* regular link color */\n.wicked-menu li > a:hover { text-decoration:underline; }\t\t/* regular link:hover */\n.wicked-menu > li.hover > a.menu-item,\n.wicked-menu, .wicked-menu ul {\n\tbackground-color: #fff; \t\t\t\t\t\t\t\t/* background color */\n}\n.wicked-menu > li.hover,\n.wicked-menu ul li:hover > ul,\n.wicked-menu ul {\n\tborder: 1px solid #cbcbcb;\t\t\t\t\t\t\t\t/* menu border color */\n}\n.wicked-menu li:hover { background: #efefef; }\t\t\t\t/* hover menu background color */\n.wicked-menu ul,\n.wicked-menu > li.hover,\n.wicked-menu ul li:hover > ul {\t\t\t\t\t\t\t\t\t/* drop shadow */\n\t-webkit-box-shadow: rgba(0, 0, 0, .2) 0 2px 4px 0;\n\t-moz-box-shadow: rgba(0, 0, 0, .2) 0 2px 4px 0;\n\tbox-shadow: rgba(0, 0, 0, .2) 0 2px 4px 0;\n}\n/* -- global settings -- */\n.wicked-menu { margin: 0px; padding: 0px; }\n.wicked-menu, .wicked-menu ul { margin: 0; padding: 0; }\n.wicked-menu li { display: inline-block; list-style-type: none; cursor:pointer; }\n.wicked-menu li > a.menu-item { text-decoration: none; }\n.wicked-menu ul { display: none; }\n.wicked-menu ul li { width: 100%; position: relative; }\n.wicked-menu ul li > a.menu-item > span { padding-left: 10px; }\n\n/* top menu */\n.wicked-menu > li > a > *, .wicked-menu > li { display: inline-block; }\n.wicked-menu li > ul > li > * { padding: 5px; display: inline-block; } /* padding other menu-item */\n.wicked-menu > li > a.menu-item > * { padding: 7px 7px; }\n.wicked-menu > li { position: relative; border: 1px solid transparent; }\n.wicked-menu > li.hover > a.menu-item > * { padding: 7px 7px 3px 7px; }\n.wicked-menu > li.hover > a.menu-item  {\n\t/* lose the top-level focus indicator on hover */\n\toutline: none;\n\tposition: relative;\n\tdisplay: inline-block;\n\tz-index: 8;\n}\n\n/* menu items */\n.wicked-menu li.hover > ul,\n.wicked-menu ul li:hover > ul { display: block; position: absolute; }\n.wicked-menu ul li:hover > ul { margin-top: 5px; }\n/* drop menu */\n.wicked-menu ul { z-index: 7; min-width: 210px; top: 2.1em; left: -1px; }\n\n.wicked-menu > li.hover {\n\t/* for the top-level menu, after hovering do not show background */\n\tbackground: transparent; position: relative; \n}\n\n.wicked-menu ul > li > a.menu-item { line-height: 2.35em; display:inline-block; width:100%; padding: 0; }\n\n/* menu layout for icons and hotkeys */\n.wicked-menu span.hotkey { float: right; margin-right: 10px; }\n.wicked-menu ul > li > a.menu-item > span.icon { \npadding-left: 31px; \n\tbackground-position: 7px center;\n\tbackground-color: transparent;\n\tbackground-repeat: no-repeat;\n}\n\n.wicked-menu ul li:hover > ul { min-width: 210px; top: 0px; left: 100%; }\n\n.wicked-menu li.separator { border-top: 1px solid #e5e5e5; height: 3px; display: block; line-height: 3em; margin-top: 3px; }\n.wicked-menu li.separator:hover { background: transparent; cursor:default; }\n\n/* -------------------------------------------------------------------------- */\n\n/* toolbar configurable options */\n.wicked-toolbar {\n\tbackground-color: #f5f5f5;\n\theight: 30px;\n\tborder: 1px solid #e5e5e5;\n\tborder-right: 0;\n\tborder-left: 0;\n\tmargin: 0;\n}\n.wicked-toolbar li span {\n\twidth: 1px;\n\tcolor: transparent;\n\tdisplay: inline-block;\n}\n.wicked-toolbar li {\n\theight: 22px;\n\twidth: 28px;\n\tmargin: 3px;\n\tvertical-align: middle;\n\tdisplay: inline-block;\n\ttext-align: center;\n\tborder: 1px solid transparent;\n}\n.wicked-toolbar li.separator {\n\tborder-right:1px solid #e5e5e5;\n\twidth: 1px;\n}\n.wicked-toolbar li.hover {\n\tborder: 1px solid #ccc;\n\tborder-radius: 2px;\n\tbox-shadow: rgba(0, 0, 0, .1) 0 1px 3px 0;\n    -webkit-transition: all 0.25s ease;\n    -moz-transition: all 0.25s ease;\n    -o-transition: all 0.25s ease;\n    transition: all 0.25s ease;\t\n}\n.wicked-toolbar .icon {\n\twidth: 16px;\n\theight: 16px;\n\tbackground-position: center center;\n\tbackground-color: transparent;\n\tbackground-repeat: no-repeat;\n\tvertical-align: middle;\n}\n.wicked-toolbar a {\n\tdisplay: block;\n\tvertical-align: middle;\n\theight: 100%;\n\ttext-decoration: none;\n}\n"
  },
  {
    "path": "static/mergely/editor/lib/wicked-ui.js",
    "content": "/*\nThe MIT License (MIT)\n\nCopyright (c) 2013 jamie.peabody@gmail.com\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n*/\n\n;(function( $, window, document, undefined ){\n\tvar pluginName = 'wickedtoolbar';\n\tvar SHIFT = new RegExp(/shift/i);\n\tvar ALT = new RegExp(/alt/i);\n\tvar CTRL = new RegExp(/ctrl/i);\n\tvar ARROW_DOWN = new RegExp(/↓/);\n\tvar ARROW_UP = new RegExp(/↑/);\n\tvar ARROW_LEFT = new RegExp(/←/);\n\tvar ARROW_RIGHT = new RegExp(/→/);\n\t\n\tvar keys = {\n\t\tshift: 16,\n\t\talt: 17,\n\t\tctrl: 18,\n\t\tmeta: 91,\n\t\tarrow_up: 38,\n\t\tarrow_down: 40,\n\t\tarrow_left: 37,\n\t\tarrow_right: 39\n\t};\n\n\tvar defaults = {\n\t\thasIcon: function(id) { },\n\t\tgetIcon: function(id) { }\n\t};\n\t\n\tfunction MenuBase(element, options) {\n\t\tvar self = this;\n\t\t\n\t\tthis.element = $(element);\n\t\tthis.settings = $.extend({}, defaults, options);\n\t\tthis.bindings = [];\n\t\t// for each menu item, modify and wrap in div\n\t\tthis.element.find('li').each(function () {\n\t\t\tvar tthis = $(this);\n\t\t\t\n\t\t\t// since the DOM is modifying wrt to icons, it can match the li[data-cion] from\n\t\t\t// the HTML definition, or the span.icon from the modified DOM\n\t\t\tvar icons = tthis.closest('ul').find('li[data-icon], span.icon').length > 0;\n\t\t\t\n\t\t\tvar tnode = tthis.contents().filter(function() { return this.nodeType == 3; }).first();\n\t\t\tvar text = tnode.text().trim();\n\t\t\t\n\t\t\t// remove the text node\n\t\t\ttnode.remove();\n\t\t\t\n\t\t\tif (!text || !text.length) return; // not a regular menu item\n\t\t\t\n\t\t\t// change: <li>Text</li>\n\t\t\t// to: <li>\n\t\t\t//\t\t\t<a>\n\t\t\t//\t\t\t\t<span>Text</span>\n\t\t\t//\t\t\t</a>\n\t\t\t//\t\t</li>\n\t\t\tvar li = tthis;\n\t\t\tvar div = $('<a class=\"menu-item\" href=\"#\">');\n\t\t\tdiv.click(function(ev) {\n\t\t\t\t$(this).focus(); \n\t\t\t\t// li.id > a\n\t\t\t\tvar id = $(this).parent().attr('id');\n\t\t\t\tif (id) {\n\t\t\t\t\tself.element.trigger('selected', [id]);\n\t\t\t\t\t$(this).parents('.hover').removeClass('hover');\n\t\t\t\t}\n\t\t\t\treturn false; \n\t\t\t});\n\t\t\t\n\t\t\tvar span;\n\t\t\tif (self.settings._type == 'menu') {\n\t\t\t\tspan = $('<span>' + text + '</span>');\n\t\t\t}\n\t\t\telse {\n\t\t\t\tspan = $('<span></span>');\n\t\t\t}\n\t\t\tdiv.append(span);\n\t\t\t\n\t\t\tif (self.settings._type == 'menu') {\n\t\t\t\t// accesskey\n\t\t\t\tvar accesskey = tthis.attr('accesskey');\n\t\t\t\tif (accesskey) {\n\t\t\t\t\tdiv.attr('accesskey', accesskey);\n\t\t\t\t\ttthis.removeAttr('accesskey');\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// hotkey\n\t\t\t\tvar hotkey = tthis.attr('data-hotkey');\n\t\t\t\tif (hotkey) {\n\t\t\t\t\ttthis.removeAttr('data-hotkey');\n\t\t\t\t\tdiv.append('<span class=\"hotkey\">' + hotkey + '</span>');\n\n\t\t\t\t\tif (!accesskey) {\n\t\t\t\t\t\t// add our own handler\n\t\t\t\t\t\tvar parts = hotkey.split('+');\n\t\t\t\t\t\tvar bind = {};\n\t\t\t\t\t\tfor (var i = 0; i < parts.length; ++i) {\n\t\t\t\t\t\t\tif (SHIFT.test(parts[i])) {\n\t\t\t\t\t\t\t\tbind.shiftKey = true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse if (ALT.test(parts[i])) {\n\t\t\t\t\t\t\t\tbind.altKey = true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse if (CTRL.test(parts[i])) {\n\t\t\t\t\t\t\t\tbind.ctrlKey = true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse if (ARROW_DOWN.test(parts[i])) {\n\t\t\t\t\t\t\t\tbind.which = keys.arrow_down;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse if (ARROW_UP.test(parts[i])) {\n\t\t\t\t\t\t\t\tbind.which = keys.arrow_up;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse if (ARROW_RIGHT.test(parts[i])) {\n\t\t\t\t\t\t\t\tbind.which = keys.arrow_right;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse if (ARROW_LEFT.test(parts[i])) {\n\t\t\t\t\t\t\t\tbind.which = keys.arrow_left;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbind.target = div;\n\t\t\t\t\t\tself.bindings.push(bind);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// icon\n\t\t\tvar id = tthis.attr('id'), icon;\n\t\t\tif (self.settings.hasIcon(id)) {\n\t\t\t\tspan.addClass('icon');\n\t\t\t\ticon = self.settings.getIcon(id);\n\t\t\t\tif (icon) {\n\t\t\t\t\tspan.addClass(icon);\n\t\t\t\t}\n\t\t\t}\n\t\t\ticon = tthis.attr('data-icon');\n\t\t\tif (icon) {\n\t\t\t\ttthis.removeAttr('data-icon');\n\t\t\t\tspan.addClass('icon ' + icon);\n\t\t\t}\n\t\t\telse if (icons) {\n\t\t\t\tspan.addClass('icon');\n\t\t\t}\n\t\t\tli.prepend(div);\n\t\t});\n\t\t$(document).on('keydown', function(ev) {\n\t\t\tfor (var i = 0; i < self.bindings.length; ++i) {\n\t\t\t\tvar bind = self.bindings[i];\n\t\t\t\t// handle custom key events\n\t\t\t\tif ((bind.shiftKey === undefined ? true : (bind.shiftKey === ev.shiftKey)) &&\n\t\t\t\t\t(bind.ctrlKey === undefined ? true : (bind.ctrlKey === ev.ctrlKey)) &&\n\t\t\t\t\t(bind.altKey === undefined ? true : (bind.altKey === ev.altKey)) &&\n\t\t\t\t\tbind.which && ev.which && (bind.which === ev.which)) {\n\t\t\t\t\tbind.target.trigger('click');\n\t\t\t\t\tev.preventDefault();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n\t\n\tMenuBase.prototype.update = function (id) {\n\t\tvar li = this.element.find('#' + id), icon;\n\t\tvar span = li.find('span:first-child');\n\t\tif (this.settings.hasIcon(id)) {\n\t\t\tspan.removeClass(); // this could be brutally unfair\n\t\t\tspan.addClass('icon');\n\t\t\ticon = this.settings.getIcon(id);\n\t\t\tif (icon) {\n\t\t\t\tspan.addClass(icon);\n\t\t\t}\n\t\t}\n\t};\n\t\n\t// ------------\n\t// Menu\n\t// ------------\n\tfunction Menu(element, options) {\n\t\toptions._type = 'menu';\n\t\t$.extend(this, new MenuBase(element, options)) ;\n\t\tthis.constructor();\n\t}\n\n\tMenu.prototype.constructor = function () {\n\t\tthis.element.addClass('wicked-ui wicked-menu');\n\t\tvar self = this;\n\t\tvar dohover = function(ev) {\n\t\t\t$(this).parent().addClass('hover');\n\t\t\tif ($(this).closest('ul').hasClass('wicked-menu')) {\n\t\t\t\t// if the closest ul is a 'menu' (i.e. if this item is a top-level menu), then\n\t\t\t\t// aply focus\n\t\t\t\t$(this).focus();\n\t\t\t}\n\t\t\tif (!self.accessing) {\n\t\t\t\t// Set 'accessing' to true and one document click to cancel it\n\t\t\t\tself.accessing = true;\n\t\t\t\t$(document).one('click', function() {\n\t\t\t\t\tif (!self.accessing) return;\n\t\t\t\t\tself.accessing = false;\n\t\t\t\t\tself.element.find('.hover').removeClass('hover');\n\t\t\t\t});\n\t\t\t}\n\t\t};\n\t\t\n\t\tthis.element.find('> li > a.menu-item').click(dohover);\n\t\t\n\t\tthis.element.find('> li > ul > li ul.drop-menu').each(function() {\n\t\t\t// li > a + ul\n\t\t\t$(this).prev('a.menu-item').addClass('icon-arrow-right');\n\t\t\t\n\t\t\t$(this).prev('a.menu-item').hover(dohover);\n\t\t\t$(this).prev('a.menu-item').mouseleave(\n\t\t\t\tfunction() {\n\t\t\t\t\t$(this).parent().removeClass('hover');\n\t\t\t\t}\n\t\t\t);\n\t\t});\n\t\tthis.element.find('> li > a.menu-item').hover(\n\t\t\tfunction() {\n\t\t\t\tif (!self.accessing) return;\n\t\t\t\tself.element.find('.hover').removeClass('hover');\n\t\t\t\t$.proxy(dohover, this)();\n\t\t\t}\n\t\t);\n\t};\n\t\n\t// ------------\n\t// Toolbar\n\t// ------------\n\tfunction Toolbar(element, options) {\n\t\toptions._type = 'toolbar';\n\t\t$.extend(this, new MenuBase(element, options)) ;\n\t\tthis.constructor();\n\t}\n\t\n\tToolbar.prototype.constructor = function () {\n\t\tthis.element.addClass('wicked-ui wicked-toolbar');\n\t\tthis.element.find('> li > a.menu-item').hover(\n\t\t\tfunction(){ $(this).parent().addClass('hover'); },\n\t\t\tfunction(){ $(this).parent().removeClass('hover'); }\n\t\t);\n\t};\n\n\tvar plugins = { wickedmenu: Menu, wickedtoolbar: Toolbar };\n\tfor (var key in plugins) {\n\t\t(function(name, Plugin){\n\t\t\t$.fn[name] = function (options) {\n\t\t\t\tvar args = arguments;\n\t\t\t\treturn this.each(function () {\n\t\t\t\t\tif (typeof options === 'object' || !options) {\n\t\t\t\t\t\tif (!$.data(this, 'plugin_' + name)) {\n\t\t\t\t\t\t\t$.data(this, 'plugin_' + name, new Plugin( this, options ));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tvar d = $.data(this, 'plugin_' + name);\n\t\t\t\t\t\tif (!d) {\n\t\t\t\t\t\t\t$.error('jQuery.' + name + ' plugin does not exist');\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn d[options](Array.prototype.slice.call(args, 1));\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t};\n\t\t})(key, plugins[key])\n\t}\n\t\n})( jQuery, window, document );\n"
  },
  {
    "path": "static/mergely/lib/codemirror.css",
    "content": "/* BASICS */\n\n.CodeMirror {\n  /* Set height, width, borders, and global font properties here */\n  font-family: monospace;\n  height: 300px;\n  color: black;\n}\n\n/* PADDING */\n\n.CodeMirror-lines {\n  padding: 4px 0; /* Vertical padding around content */\n}\n.CodeMirror pre {\n  padding: 0 4px; /* Horizontal padding of content */\n}\n\n.CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler {\n  background-color: white; /* The little square between H and V scrollbars */\n}\n\n/* GUTTER */\n\n.CodeMirror-gutters {\n  border-right: 1px solid #ddd;\n  background-color: #f7f7f7;\n  white-space: nowrap;\n}\n.CodeMirror-linenumbers {}\n.CodeMirror-linenumber {\n  padding: 0 3px 0 5px;\n  min-width: 20px;\n  text-align: right;\n  color: #999;\n  white-space: nowrap;\n}\n\n.CodeMirror-guttermarker { color: black; }\n.CodeMirror-guttermarker-subtle { color: #999; }\n\n/* CURSOR */\n\n.CodeMirror-cursor {\n  border-left: 1px solid black;\n  border-right: none;\n  width: 0;\n}\n/* Shown when moving in bi-directional text */\n.CodeMirror div.CodeMirror-secondarycursor {\n  border-left: 1px solid silver;\n}\n.cm-fat-cursor .CodeMirror-cursor {\n  width: auto;\n  border: 0;\n  background: #7e7;\n}\n.cm-fat-cursor div.CodeMirror-cursors {\n  z-index: 1;\n}\n\n.cm-animate-fat-cursor {\n  width: auto;\n  border: 0;\n  -webkit-animation: blink 1.06s steps(1) infinite;\n  -moz-animation: blink 1.06s steps(1) infinite;\n  animation: blink 1.06s steps(1) infinite;\n  background-color: #7e7;\n}\n@-moz-keyframes blink {\n  0% {}\n  50% { background-color: transparent; }\n  100% {}\n}\n@-webkit-keyframes blink {\n  0% {}\n  50% { background-color: transparent; }\n  100% {}\n}\n@keyframes blink {\n  0% {}\n  50% { background-color: transparent; }\n  100% {}\n}\n\n/* Can style cursor different in overwrite (non-insert) mode */\n.CodeMirror-overwrite .CodeMirror-cursor {}\n\n.cm-tab { display: inline-block; text-decoration: inherit; }\n\n.CodeMirror-ruler {\n  border-left: 1px solid #ccc;\n  position: absolute;\n}\n\n/* DEFAULT THEME */\n\n.cm-s-default .cm-header {color: blue;}\n.cm-s-default .cm-quote {color: #090;}\n.cm-negative {color: #d44;}\n.cm-positive {color: #292;}\n.cm-header, .cm-strong {font-weight: bold;}\n.cm-em {font-style: italic;}\n.cm-link {text-decoration: underline;}\n.cm-strikethrough {text-decoration: line-through;}\n\n.cm-s-default .cm-keyword {color: #708;}\n.cm-s-default .cm-atom {color: #219;}\n.cm-s-default .cm-number {color: #164;}\n.cm-s-default .cm-def {color: #00f;}\n.cm-s-default .cm-variable,\n.cm-s-default .cm-punctuation,\n.cm-s-default .cm-property,\n.cm-s-default .cm-operator {}\n.cm-s-default .cm-variable-2 {color: #05a;}\n.cm-s-default .cm-variable-3 {color: #085;}\n.cm-s-default .cm-comment {color: #a50;}\n.cm-s-default .cm-string {color: #a11;}\n.cm-s-default .cm-string-2 {color: #f50;}\n.cm-s-default .cm-meta {color: #555;}\n.cm-s-default .cm-qualifier {color: #555;}\n.cm-s-default .cm-builtin {color: #30a;}\n.cm-s-default .cm-bracket {color: #997;}\n.cm-s-default .cm-tag {color: #170;}\n.cm-s-default .cm-attribute {color: #00c;}\n.cm-s-default .cm-hr {color: #999;}\n.cm-s-default .cm-link {color: #00c;}\n\n.cm-s-default .cm-error {color: #f00;}\n.cm-invalidchar {color: #f00;}\n\n.CodeMirror-composing { border-bottom: 2px solid; }\n\n/* Default styles for common addons */\n\ndiv.CodeMirror span.CodeMirror-matchingbracket {color: #0f0;}\ndiv.CodeMirror span.CodeMirror-nonmatchingbracket {color: #f22;}\n.CodeMirror-matchingtag { background: rgba(255, 150, 0, .3); }\n.CodeMirror-activeline-background {background: #e8f2ff;}\n\n/* STOP */\n\n/* The rest of this file contains styles related to the mechanics of\n   the editor. You probably shouldn't touch them. */\n\n.CodeMirror {\n  position: relative;\n  overflow: hidden;\n  background: white;\n}\n\n.CodeMirror-scroll {\n  overflow: scroll !important; /* Things will break if this is overridden */\n  /* 30px is the magic margin used to hide the element's real scrollbars */\n  /* See overflow: hidden in .CodeMirror */\n  margin-bottom: -30px; margin-right: -30px;\n  padding-bottom: 30px;\n  height: 100%;\n  outline: none; /* Prevent dragging from highlighting the element */\n  position: relative;\n}\n.CodeMirror-sizer {\n  position: relative;\n  border-right: 30px solid transparent;\n}\n\n/* The fake, visible scrollbars. Used to force redraw during scrolling\n   before actual scrolling happens, thus preventing shaking and\n   flickering artifacts. */\n.CodeMirror-vscrollbar, .CodeMirror-hscrollbar, .CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler {\n  position: absolute;\n  z-index: 6;\n  display: none;\n}\n.CodeMirror-vscrollbar {\n  right: 0; top: 0;\n  overflow-x: hidden;\n  overflow-y: scroll;\n}\n.CodeMirror-hscrollbar {\n  bottom: 0; left: 0;\n  overflow-y: hidden;\n  overflow-x: scroll;\n}\n.CodeMirror-scrollbar-filler {\n  right: 0; bottom: 0;\n}\n.CodeMirror-gutter-filler {\n  left: 0; bottom: 0;\n}\n\n.CodeMirror-gutters {\n  position: absolute; left: 0; top: 0;\n  z-index: 3;\n}\n.CodeMirror-gutter {\n  white-space: normal;\n  height: 100%;\n  display: inline-block;\n  margin-bottom: -30px;\n  /* Hack to make IE7 behave */\n  *zoom:1;\n  *display:inline;\n}\n.CodeMirror-gutter-wrapper {\n  position: absolute;\n  z-index: 4;\n  background: none !important;\n  border: none !important;\n}\n.CodeMirror-gutter-background {\n  position: absolute;\n  top: 0; bottom: 0;\n  z-index: 4;\n}\n.CodeMirror-gutter-elt {\n  position: absolute;\n  cursor: default;\n  z-index: 4;\n}\n.CodeMirror-gutter-wrapper {\n  -webkit-user-select: none;\n  -moz-user-select: none;\n  user-select: none;\n}\n\n.CodeMirror-lines {\n  cursor: text;\n  min-height: 1px; /* prevents collapsing before first draw */\n}\n.CodeMirror pre {\n  /* Reset some styles that the rest of the page might have set */\n  -moz-border-radius: 0; -webkit-border-radius: 0; border-radius: 0;\n  border-width: 0;\n  background: transparent;\n  font-family: inherit;\n  font-size: inherit;\n  margin: 0;\n  white-space: pre;\n  word-wrap: normal;\n  line-height: inherit;\n  color: inherit;\n  z-index: 2;\n  position: relative;\n  overflow: visible;\n  -webkit-tap-highlight-color: transparent;\n}\n.CodeMirror-wrap pre {\n  word-wrap: break-word;\n  white-space: pre-wrap;\n  word-break: normal;\n}\n\n.CodeMirror-linebackground {\n  position: absolute;\n  left: 0; right: 0; top: 0; bottom: 0;\n  z-index: 0;\n}\n\n.CodeMirror-linewidget {\n  position: relative;\n  z-index: 2;\n  overflow: auto;\n}\n\n.CodeMirror-widget {}\n\n.CodeMirror-code {\n  outline: none;\n}\n\n/* Force content-box sizing for the elements where we expect it */\n.CodeMirror-scroll,\n.CodeMirror-sizer,\n.CodeMirror-gutter,\n.CodeMirror-gutters,\n.CodeMirror-linenumber {\n  -moz-box-sizing: content-box;\n  box-sizing: content-box;\n}\n\n.CodeMirror-measure {\n  position: absolute;\n  width: 100%;\n  height: 0;\n  overflow: hidden;\n  visibility: hidden;\n}\n\n.CodeMirror-cursor { position: absolute; }\n.CodeMirror-measure pre { position: static; }\n\ndiv.CodeMirror-cursors {\n  visibility: hidden;\n  position: relative;\n  z-index: 3;\n}\ndiv.CodeMirror-dragcursors {\n  visibility: visible;\n}\n\n.CodeMirror-focused div.CodeMirror-cursors {\n  visibility: visible;\n}\n\n.CodeMirror-selected { background: #d9d9d9; }\n.CodeMirror-focused .CodeMirror-selected { background: #d7d4f0; }\n.CodeMirror-crosshair { cursor: crosshair; }\n.CodeMirror-line::selection, .CodeMirror-line > span::selection, .CodeMirror-line > span > span::selection { background: #d7d4f0; }\n.CodeMirror-line::-moz-selection, .CodeMirror-line > span::-moz-selection, .CodeMirror-line > span > span::-moz-selection { background: #d7d4f0; }\n\n.cm-searching {\n  background: #ffa;\n  background: rgba(255, 255, 0, .4);\n}\n\n/* IE7 hack to prevent it from returning funny offsetTops on the spans */\n.CodeMirror span { *vertical-align: text-bottom; }\n\n/* Used to force a border model for a node */\n.cm-force-border { padding-right: .1px; }\n\n@media print {\n  /* Hide the cursor when printing */\n  .CodeMirror div.CodeMirror-cursors {\n    visibility: hidden;\n  }\n}\n\n/* See issue #2901 */\n.cm-tab-wrap-hack:after { content: ''; }\n\n/* Help users use markselection to safely style text background */\nspan.CodeMirror-selectedtext { background: none; }\n"
  },
  {
    "path": "static/mergely/lib/codemirror.js",
    "content": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n// This is CodeMirror (http://codemirror.net), a code editor\n// implemented in JavaScript on top of the browser's DOM.\n//\n// You can find some technical background for some of the code below\n// at http://marijnhaverbeke.nl/blog/#cm-internals .\n\n(function(mod) {\n  if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n    module.exports = mod();\n  else if (typeof define == \"function\" && define.amd) // AMD\n    return define([], mod);\n  else // Plain browser env\n    (this || window).CodeMirror = mod();\n})(function() {\n  \"use strict\";\n\n  // BROWSER SNIFFING\n\n  // Kludges for bugs and behavior differences that can't be feature\n  // detected are enabled based on userAgent etc sniffing.\n  var userAgent = navigator.userAgent;\n  var platform = navigator.platform;\n\n  var gecko = /gecko\\/\\d/i.test(userAgent);\n  var ie_upto10 = /MSIE \\d/.test(userAgent);\n  var ie_11up = /Trident\\/(?:[7-9]|\\d{2,})\\..*rv:(\\d+)/.exec(userAgent);\n  var ie = ie_upto10 || ie_11up;\n  var ie_version = ie && (ie_upto10 ? document.documentMode || 6 : ie_11up[1]);\n  var webkit = /WebKit\\//.test(userAgent);\n  var qtwebkit = webkit && /Qt\\/\\d+\\.\\d+/.test(userAgent);\n  var chrome = /Chrome\\//.test(userAgent);\n  var presto = /Opera\\//.test(userAgent);\n  var safari = /Apple Computer/.test(navigator.vendor);\n  var mac_geMountainLion = /Mac OS X 1\\d\\D([8-9]|\\d\\d)\\D/.test(userAgent);\n  var phantom = /PhantomJS/.test(userAgent);\n\n  var ios = /AppleWebKit/.test(userAgent) && /Mobile\\/\\w+/.test(userAgent);\n  // This is woefully incomplete. Suggestions for alternative methods welcome.\n  var mobile = ios || /Android|webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(userAgent);\n  var mac = ios || /Mac/.test(platform);\n  var windows = /win/i.test(platform);\n\n  var presto_version = presto && userAgent.match(/Version\\/(\\d*\\.\\d*)/);\n  if (presto_version) presto_version = Number(presto_version[1]);\n  if (presto_version && presto_version >= 15) { presto = false; webkit = true; }\n  // Some browsers use the wrong event properties to signal cmd/ctrl on OS X\n  var flipCtrlCmd = mac && (qtwebkit || presto && (presto_version == null || presto_version < 12.11));\n  var captureRightClick = gecko || (ie && ie_version >= 9);\n\n  // Optimize some code when these features are not used.\n  var sawReadOnlySpans = false, sawCollapsedSpans = false;\n\n  // EDITOR CONSTRUCTOR\n\n  // A CodeMirror instance represents an editor. This is the object\n  // that user code is usually dealing with.\n\n  function CodeMirror(place, options) {\n    if (!(this instanceof CodeMirror)) return new CodeMirror(place, options);\n\n    this.options = options = options ? copyObj(options) : {};\n    // Determine effective options based on given values and defaults.\n    copyObj(defaults, options, false);\n    setGuttersForLineNumbers(options);\n\n    var doc = options.value;\n    if (typeof doc == \"string\") doc = new Doc(doc, options.mode, null, options.lineSeparator);\n    this.doc = doc;\n\n    var input = new CodeMirror.inputStyles[options.inputStyle](this);\n    var display = this.display = new Display(place, doc, input);\n    display.wrapper.CodeMirror = this;\n    updateGutters(this);\n    themeChanged(this);\n    if (options.lineWrapping)\n      this.display.wrapper.className += \" CodeMirror-wrap\";\n    if (options.autofocus && !mobile) display.input.focus();\n    initScrollbars(this);\n\n    this.state = {\n      keyMaps: [],  // stores maps added by addKeyMap\n      overlays: [], // highlighting overlays, as added by addOverlay\n      modeGen: 0,   // bumped when mode/overlay changes, used to invalidate highlighting info\n      overwrite: false,\n      delayingBlurEvent: false,\n      focused: false,\n      suppressEdits: false, // used to disable editing during key handlers when in readOnly mode\n      pasteIncoming: false, cutIncoming: false, // help recognize paste/cut edits in input.poll\n      selectingText: false,\n      draggingText: false,\n      highlight: new Delayed(), // stores highlight worker timeout\n      keySeq: null,  // Unfinished key sequence\n      specialChars: null\n    };\n\n    var cm = this;\n\n    // Override magic textarea content restore that IE sometimes does\n    // on our hidden textarea on reload\n    if (ie && ie_version < 11) setTimeout(function() { cm.display.input.reset(true); }, 20);\n\n    registerEventHandlers(this);\n    ensureGlobalHandlers();\n\n    startOperation(this);\n    this.curOp.forceUpdate = true;\n    attachDoc(this, doc);\n\n    if ((options.autofocus && !mobile) || cm.hasFocus())\n      setTimeout(bind(onFocus, this), 20);\n    else\n      onBlur(this);\n\n    for (var opt in optionHandlers) if (optionHandlers.hasOwnProperty(opt))\n      optionHandlers[opt](this, options[opt], Init);\n    maybeUpdateLineNumberWidth(this);\n    if (options.finishInit) options.finishInit(this);\n    for (var i = 0; i < initHooks.length; ++i) initHooks[i](this);\n    endOperation(this);\n    // Suppress optimizelegibility in Webkit, since it breaks text\n    // measuring on line wrapping boundaries.\n    if (webkit && options.lineWrapping &&\n        getComputedStyle(display.lineDiv).textRendering == \"optimizelegibility\")\n      display.lineDiv.style.textRendering = \"auto\";\n  }\n\n  // DISPLAY CONSTRUCTOR\n\n  // The display handles the DOM integration, both for input reading\n  // and content drawing. It holds references to DOM nodes and\n  // display-related state.\n\n  function Display(place, doc, input) {\n    var d = this;\n    this.input = input;\n\n    // Covers bottom-right square when both scrollbars are present.\n    d.scrollbarFiller = elt(\"div\", null, \"CodeMirror-scrollbar-filler\");\n    d.scrollbarFiller.setAttribute(\"cm-not-content\", \"true\");\n    // Covers bottom of gutter when coverGutterNextToScrollbar is on\n    // and h scrollbar is present.\n    d.gutterFiller = elt(\"div\", null, \"CodeMirror-gutter-filler\");\n    d.gutterFiller.setAttribute(\"cm-not-content\", \"true\");\n    // Will contain the actual code, positioned to cover the viewport.\n    d.lineDiv = elt(\"div\", null, \"CodeMirror-code\");\n    // Elements are added to these to represent selection and cursors.\n    d.selectionDiv = elt(\"div\", null, null, \"position: relative; z-index: 1\");\n    d.cursorDiv = elt(\"div\", null, \"CodeMirror-cursors\");\n    // A visibility: hidden element used to find the size of things.\n    d.measure = elt(\"div\", null, \"CodeMirror-measure\");\n    // When lines outside of the viewport are measured, they are drawn in this.\n    d.lineMeasure = elt(\"div\", null, \"CodeMirror-measure\");\n    // Wraps everything that needs to exist inside the vertically-padded coordinate system\n    d.lineSpace = elt(\"div\", [d.measure, d.lineMeasure, d.selectionDiv, d.cursorDiv, d.lineDiv],\n                      null, \"position: relative; outline: none\");\n    // Moved around its parent to cover visible view.\n    d.mover = elt(\"div\", [elt(\"div\", [d.lineSpace], \"CodeMirror-lines\")], null, \"position: relative\");\n    // Set to the height of the document, allowing scrolling.\n    d.sizer = elt(\"div\", [d.mover], \"CodeMirror-sizer\");\n    d.sizerWidth = null;\n    // Behavior of elts with overflow: auto and padding is\n    // inconsistent across browsers. This is used to ensure the\n    // scrollable area is big enough.\n    d.heightForcer = elt(\"div\", null, null, \"position: absolute; height: \" + scrollerGap + \"px; width: 1px;\");\n    // Will contain the gutters, if any.\n    d.gutters = elt(\"div\", null, \"CodeMirror-gutters\");\n    d.lineGutter = null;\n    // Actual scrollable element.\n    d.scroller = elt(\"div\", [d.sizer, d.heightForcer, d.gutters], \"CodeMirror-scroll\");\n    d.scroller.setAttribute(\"tabIndex\", \"-1\");\n    // The element in which the editor lives.\n    d.wrapper = elt(\"div\", [d.scrollbarFiller, d.gutterFiller, d.scroller], \"CodeMirror\");\n\n    // Work around IE7 z-index bug (not perfect, hence IE7 not really being supported)\n    if (ie && ie_version < 8) { d.gutters.style.zIndex = -1; d.scroller.style.paddingRight = 0; }\n    if (!webkit && !(gecko && mobile)) d.scroller.draggable = true;\n\n    if (place) {\n      if (place.appendChild) place.appendChild(d.wrapper);\n      else place(d.wrapper);\n    }\n\n    // Current rendered range (may be bigger than the view window).\n    d.viewFrom = d.viewTo = doc.first;\n    d.reportedViewFrom = d.reportedViewTo = doc.first;\n    // Information about the rendered lines.\n    d.view = [];\n    d.renderedView = null;\n    // Holds info about a single rendered line when it was rendered\n    // for measurement, while not in view.\n    d.externalMeasured = null;\n    // Empty space (in pixels) above the view\n    d.viewOffset = 0;\n    d.lastWrapHeight = d.lastWrapWidth = 0;\n    d.updateLineNumbers = null;\n\n    d.nativeBarWidth = d.barHeight = d.barWidth = 0;\n    d.scrollbarsClipped = false;\n\n    // Used to only resize the line number gutter when necessary (when\n    // the amount of lines crosses a boundary that makes its width change)\n    d.lineNumWidth = d.lineNumInnerWidth = d.lineNumChars = null;\n    // Set to true when a non-horizontal-scrolling line widget is\n    // added. As an optimization, line widget aligning is skipped when\n    // this is false.\n    d.alignWidgets = false;\n\n    d.cachedCharWidth = d.cachedTextHeight = d.cachedPaddingH = null;\n\n    // Tracks the maximum line length so that the horizontal scrollbar\n    // can be kept static when scrolling.\n    d.maxLine = null;\n    d.maxLineLength = 0;\n    d.maxLineChanged = false;\n\n    // Used for measuring wheel scrolling granularity\n    d.wheelDX = d.wheelDY = d.wheelStartX = d.wheelStartY = null;\n\n    // True when shift is held down.\n    d.shift = false;\n\n    // Used to track whether anything happened since the context menu\n    // was opened.\n    d.selForContextMenu = null;\n\n    d.activeTouch = null;\n\n    input.init(d);\n  }\n\n  // STATE UPDATES\n\n  // Used to get the editor into a consistent state again when options change.\n\n  function loadMode(cm) {\n    cm.doc.mode = CodeMirror.getMode(cm.options, cm.doc.modeOption);\n    resetModeState(cm);\n  }\n\n  function resetModeState(cm) {\n    cm.doc.iter(function(line) {\n      if (line.stateAfter) line.stateAfter = null;\n      if (line.styles) line.styles = null;\n    });\n    cm.doc.frontier = cm.doc.first;\n    startWorker(cm, 100);\n    cm.state.modeGen++;\n    if (cm.curOp) regChange(cm);\n  }\n\n  function wrappingChanged(cm) {\n    if (cm.options.lineWrapping) {\n      addClass(cm.display.wrapper, \"CodeMirror-wrap\");\n      cm.display.sizer.style.minWidth = \"\";\n      cm.display.sizerWidth = null;\n    } else {\n      rmClass(cm.display.wrapper, \"CodeMirror-wrap\");\n      findMaxLine(cm);\n    }\n    estimateLineHeights(cm);\n    regChange(cm);\n    clearCaches(cm);\n    setTimeout(function(){updateScrollbars(cm);}, 100);\n  }\n\n  // Returns a function that estimates the height of a line, to use as\n  // first approximation until the line becomes visible (and is thus\n  // properly measurable).\n  function estimateHeight(cm) {\n    var th = textHeight(cm.display), wrapping = cm.options.lineWrapping;\n    var perLine = wrapping && Math.max(5, cm.display.scroller.clientWidth / charWidth(cm.display) - 3);\n    return function(line) {\n      if (lineIsHidden(cm.doc, line)) return 0;\n\n      var widgetsHeight = 0;\n      if (line.widgets) for (var i = 0; i < line.widgets.length; i++) {\n        if (line.widgets[i].height) widgetsHeight += line.widgets[i].height;\n      }\n\n      if (wrapping)\n        return widgetsHeight + (Math.ceil(line.text.length / perLine) || 1) * th;\n      else\n        return widgetsHeight + th;\n    };\n  }\n\n  function estimateLineHeights(cm) {\n    var doc = cm.doc, est = estimateHeight(cm);\n    doc.iter(function(line) {\n      var estHeight = est(line);\n      if (estHeight != line.height) updateLineHeight(line, estHeight);\n    });\n  }\n\n  function themeChanged(cm) {\n    cm.display.wrapper.className = cm.display.wrapper.className.replace(/\\s*cm-s-\\S+/g, \"\") +\n      cm.options.theme.replace(/(^|\\s)\\s*/g, \" cm-s-\");\n    clearCaches(cm);\n  }\n\n  function guttersChanged(cm) {\n    updateGutters(cm);\n    regChange(cm);\n    setTimeout(function(){alignHorizontally(cm);}, 20);\n  }\n\n  // Rebuild the gutter elements, ensure the margin to the left of the\n  // code matches their width.\n  function updateGutters(cm) {\n    var gutters = cm.display.gutters, specs = cm.options.gutters;\n    removeChildren(gutters);\n    for (var i = 0; i < specs.length; ++i) {\n      var gutterClass = specs[i];\n      var gElt = gutters.appendChild(elt(\"div\", null, \"CodeMirror-gutter \" + gutterClass));\n      if (gutterClass == \"CodeMirror-linenumbers\") {\n        cm.display.lineGutter = gElt;\n        gElt.style.width = (cm.display.lineNumWidth || 1) + \"px\";\n      }\n    }\n    gutters.style.display = i ? \"\" : \"none\";\n    updateGutterSpace(cm);\n  }\n\n  function updateGutterSpace(cm) {\n    var width = cm.display.gutters.offsetWidth;\n    cm.display.sizer.style.marginLeft = width + \"px\";\n  }\n\n  // Compute the character length of a line, taking into account\n  // collapsed ranges (see markText) that might hide parts, and join\n  // other lines onto it.\n  function lineLength(line) {\n    if (line.height == 0) return 0;\n    var len = line.text.length, merged, cur = line;\n    while (merged = collapsedSpanAtStart(cur)) {\n      var found = merged.find(0, true);\n      cur = found.from.line;\n      len += found.from.ch - found.to.ch;\n    }\n    cur = line;\n    while (merged = collapsedSpanAtEnd(cur)) {\n      var found = merged.find(0, true);\n      len -= cur.text.length - found.from.ch;\n      cur = found.to.line;\n      len += cur.text.length - found.to.ch;\n    }\n    return len;\n  }\n\n  // Find the longest line in the document.\n  function findMaxLine(cm) {\n    var d = cm.display, doc = cm.doc;\n    d.maxLine = getLine(doc, doc.first);\n    d.maxLineLength = lineLength(d.maxLine);\n    d.maxLineChanged = true;\n    doc.iter(function(line) {\n      var len = lineLength(line);\n      if (len > d.maxLineLength) {\n        d.maxLineLength = len;\n        d.maxLine = line;\n      }\n    });\n  }\n\n  // Make sure the gutters options contains the element\n  // \"CodeMirror-linenumbers\" when the lineNumbers option is true.\n  function setGuttersForLineNumbers(options) {\n    var found = indexOf(options.gutters, \"CodeMirror-linenumbers\");\n    if (found == -1 && options.lineNumbers) {\n      options.gutters = options.gutters.concat([\"CodeMirror-linenumbers\"]);\n    } else if (found > -1 && !options.lineNumbers) {\n      options.gutters = options.gutters.slice(0);\n      options.gutters.splice(found, 1);\n    }\n  }\n\n  // SCROLLBARS\n\n  // Prepare DOM reads needed to update the scrollbars. Done in one\n  // shot to minimize update/measure roundtrips.\n  function measureForScrollbars(cm) {\n    var d = cm.display, gutterW = d.gutters.offsetWidth;\n    var docH = Math.round(cm.doc.height + paddingVert(cm.display));\n    return {\n      clientHeight: d.scroller.clientHeight,\n      viewHeight: d.wrapper.clientHeight,\n      scrollWidth: d.scroller.scrollWidth, clientWidth: d.scroller.clientWidth,\n      viewWidth: d.wrapper.clientWidth,\n      barLeft: cm.options.fixedGutter ? gutterW : 0,\n      docHeight: docH,\n      scrollHeight: docH + scrollGap(cm) + d.barHeight,\n      nativeBarWidth: d.nativeBarWidth,\n      gutterWidth: gutterW\n    };\n  }\n\n  function NativeScrollbars(place, scroll, cm) {\n    this.cm = cm;\n    var vert = this.vert = elt(\"div\", [elt(\"div\", null, null, \"min-width: 1px\")], \"CodeMirror-vscrollbar\");\n    var horiz = this.horiz = elt(\"div\", [elt(\"div\", null, null, \"height: 100%; min-height: 1px\")], \"CodeMirror-hscrollbar\");\n    place(vert); place(horiz);\n\n    on(vert, \"scroll\", function() {\n      if (vert.clientHeight) scroll(vert.scrollTop, \"vertical\");\n    });\n    on(horiz, \"scroll\", function() {\n      if (horiz.clientWidth) scroll(horiz.scrollLeft, \"horizontal\");\n    });\n\n    this.checkedZeroWidth = false;\n    // Need to set a minimum width to see the scrollbar on IE7 (but must not set it on IE8).\n    if (ie && ie_version < 8) this.horiz.style.minHeight = this.vert.style.minWidth = \"18px\";\n  }\n\n  NativeScrollbars.prototype = copyObj({\n    update: function(measure) {\n      var needsH = measure.scrollWidth > measure.clientWidth + 1;\n      var needsV = measure.scrollHeight > measure.clientHeight + 1;\n      var sWidth = measure.nativeBarWidth;\n\n      if (needsV) {\n        this.vert.style.display = \"block\";\n        this.vert.style.bottom = needsH ? sWidth + \"px\" : \"0\";\n        var totalHeight = measure.viewHeight - (needsH ? sWidth : 0);\n        // A bug in IE8 can cause this value to be negative, so guard it.\n        this.vert.firstChild.style.height =\n          Math.max(0, measure.scrollHeight - measure.clientHeight + totalHeight) + \"px\";\n      } else {\n        this.vert.style.display = \"\";\n        this.vert.firstChild.style.height = \"0\";\n      }\n\n      if (needsH) {\n        this.horiz.style.display = \"block\";\n        this.horiz.style.right = needsV ? sWidth + \"px\" : \"0\";\n        this.horiz.style.left = measure.barLeft + \"px\";\n        var totalWidth = measure.viewWidth - measure.barLeft - (needsV ? sWidth : 0);\n        this.horiz.firstChild.style.width =\n          (measure.scrollWidth - measure.clientWidth + totalWidth) + \"px\";\n      } else {\n        this.horiz.style.display = \"\";\n        this.horiz.firstChild.style.width = \"0\";\n      }\n\n      if (!this.checkedZeroWidth && measure.clientHeight > 0) {\n        if (sWidth == 0) this.zeroWidthHack();\n        this.checkedZeroWidth = true;\n      }\n\n      return {right: needsV ? sWidth : 0, bottom: needsH ? sWidth : 0};\n    },\n    setScrollLeft: function(pos) {\n      if (this.horiz.scrollLeft != pos) this.horiz.scrollLeft = pos;\n      if (this.disableHoriz) this.enableZeroWidthBar(this.horiz, this.disableHoriz);\n    },\n    setScrollTop: function(pos) {\n      if (this.vert.scrollTop != pos) this.vert.scrollTop = pos;\n      if (this.disableVert) this.enableZeroWidthBar(this.vert, this.disableVert);\n    },\n    zeroWidthHack: function() {\n      var w = mac && !mac_geMountainLion ? \"12px\" : \"18px\";\n      this.horiz.style.height = this.vert.style.width = w;\n      this.horiz.style.pointerEvents = this.vert.style.pointerEvents = \"none\";\n      this.disableHoriz = new Delayed;\n      this.disableVert = new Delayed;\n    },\n    enableZeroWidthBar: function(bar, delay) {\n      bar.style.pointerEvents = \"auto\";\n      function maybeDisable() {\n        // To find out whether the scrollbar is still visible, we\n        // check whether the element under the pixel in the bottom\n        // left corner of the scrollbar box is the scrollbar box\n        // itself (when the bar is still visible) or its filler child\n        // (when the bar is hidden). If it is still visible, we keep\n        // it enabled, if it's hidden, we disable pointer events.\n        var box = bar.getBoundingClientRect();\n        var elt = document.elementFromPoint(box.left + 1, box.bottom - 1);\n        if (elt != bar) bar.style.pointerEvents = \"none\";\n        else delay.set(1000, maybeDisable);\n      }\n      delay.set(1000, maybeDisable);\n    },\n    clear: function() {\n      var parent = this.horiz.parentNode;\n      parent.removeChild(this.horiz);\n      parent.removeChild(this.vert);\n    }\n  }, NativeScrollbars.prototype);\n\n  function NullScrollbars() {}\n\n  NullScrollbars.prototype = copyObj({\n    update: function() { return {bottom: 0, right: 0}; },\n    setScrollLeft: function() {},\n    setScrollTop: function() {},\n    clear: function() {}\n  }, NullScrollbars.prototype);\n\n  CodeMirror.scrollbarModel = {\"native\": NativeScrollbars, \"null\": NullScrollbars};\n\n  function initScrollbars(cm) {\n    if (cm.display.scrollbars) {\n      cm.display.scrollbars.clear();\n      if (cm.display.scrollbars.addClass)\n        rmClass(cm.display.wrapper, cm.display.scrollbars.addClass);\n    }\n\n    cm.display.scrollbars = new CodeMirror.scrollbarModel[cm.options.scrollbarStyle](function(node) {\n      cm.display.wrapper.insertBefore(node, cm.display.scrollbarFiller);\n      // Prevent clicks in the scrollbars from killing focus\n      on(node, \"mousedown\", function() {\n        if (cm.state.focused) setTimeout(function() { cm.display.input.focus(); }, 0);\n      });\n      node.setAttribute(\"cm-not-content\", \"true\");\n    }, function(pos, axis) {\n      if (axis == \"horizontal\") setScrollLeft(cm, pos);\n      else setScrollTop(cm, pos);\n    }, cm);\n    if (cm.display.scrollbars.addClass)\n      addClass(cm.display.wrapper, cm.display.scrollbars.addClass);\n  }\n\n  function updateScrollbars(cm, measure) {\n    if (!measure) measure = measureForScrollbars(cm);\n    var startWidth = cm.display.barWidth, startHeight = cm.display.barHeight;\n    updateScrollbarsInner(cm, measure);\n    for (var i = 0; i < 4 && startWidth != cm.display.barWidth || startHeight != cm.display.barHeight; i++) {\n      if (startWidth != cm.display.barWidth && cm.options.lineWrapping)\n        updateHeightsInViewport(cm);\n      updateScrollbarsInner(cm, measureForScrollbars(cm));\n      startWidth = cm.display.barWidth; startHeight = cm.display.barHeight;\n    }\n  }\n\n  // Re-synchronize the fake scrollbars with the actual size of the\n  // content.\n  function updateScrollbarsInner(cm, measure) {\n    var d = cm.display;\n    var sizes = d.scrollbars.update(measure);\n\n    d.sizer.style.paddingRight = (d.barWidth = sizes.right) + \"px\";\n    d.sizer.style.paddingBottom = (d.barHeight = sizes.bottom) + \"px\";\n\n    if (sizes.right && sizes.bottom) {\n      d.scrollbarFiller.style.display = \"block\";\n      d.scrollbarFiller.style.height = sizes.bottom + \"px\";\n      d.scrollbarFiller.style.width = sizes.right + \"px\";\n    } else d.scrollbarFiller.style.display = \"\";\n    if (sizes.bottom && cm.options.coverGutterNextToScrollbar && cm.options.fixedGutter) {\n      d.gutterFiller.style.display = \"block\";\n      d.gutterFiller.style.height = sizes.bottom + \"px\";\n      d.gutterFiller.style.width = measure.gutterWidth + \"px\";\n    } else d.gutterFiller.style.display = \"\";\n  }\n\n  // Compute the lines that are visible in a given viewport (defaults\n  // the the current scroll position). viewport may contain top,\n  // height, and ensure (see op.scrollToPos) properties.\n  function visibleLines(display, doc, viewport) {\n    var top = viewport && viewport.top != null ? Math.max(0, viewport.top) : display.scroller.scrollTop;\n    top = Math.floor(top - paddingTop(display));\n    var bottom = viewport && viewport.bottom != null ? viewport.bottom : top + display.wrapper.clientHeight;\n\n    var from = lineAtHeight(doc, top), to = lineAtHeight(doc, bottom);\n    // Ensure is a {from: {line, ch}, to: {line, ch}} object, and\n    // forces those lines into the viewport (if possible).\n    if (viewport && viewport.ensure) {\n      var ensureFrom = viewport.ensure.from.line, ensureTo = viewport.ensure.to.line;\n      if (ensureFrom < from) {\n        from = ensureFrom;\n        to = lineAtHeight(doc, heightAtLine(getLine(doc, ensureFrom)) + display.wrapper.clientHeight);\n      } else if (Math.min(ensureTo, doc.lastLine()) >= to) {\n        from = lineAtHeight(doc, heightAtLine(getLine(doc, ensureTo)) - display.wrapper.clientHeight);\n        to = ensureTo;\n      }\n    }\n    return {from: from, to: Math.max(to, from + 1)};\n  }\n\n  // LINE NUMBERS\n\n  // Re-align line numbers and gutter marks to compensate for\n  // horizontal scrolling.\n  function alignHorizontally(cm) {\n    var display = cm.display, view = display.view;\n    if (!display.alignWidgets && (!display.gutters.firstChild || !cm.options.fixedGutter)) return;\n    var comp = compensateForHScroll(display) - display.scroller.scrollLeft + cm.doc.scrollLeft;\n    var gutterW = display.gutters.offsetWidth, left = comp + \"px\";\n    for (var i = 0; i < view.length; i++) if (!view[i].hidden) {\n      if (cm.options.fixedGutter && view[i].gutter)\n        view[i].gutter.style.left = left;\n      var align = view[i].alignable;\n      if (align) for (var j = 0; j < align.length; j++)\n        align[j].style.left = left;\n    }\n    if (cm.options.fixedGutter)\n      display.gutters.style.left = (comp + gutterW) + \"px\";\n  }\n\n  // Used to ensure that the line number gutter is still the right\n  // size for the current document size. Returns true when an update\n  // is needed.\n  function maybeUpdateLineNumberWidth(cm) {\n    if (!cm.options.lineNumbers) return false;\n    var doc = cm.doc, last = lineNumberFor(cm.options, doc.first + doc.size - 1), display = cm.display;\n    if (last.length != display.lineNumChars) {\n      var test = display.measure.appendChild(elt(\"div\", [elt(\"div\", last)],\n                                                 \"CodeMirror-linenumber CodeMirror-gutter-elt\"));\n      var innerW = test.firstChild.offsetWidth, padding = test.offsetWidth - innerW;\n      display.lineGutter.style.width = \"\";\n      display.lineNumInnerWidth = Math.max(innerW, display.lineGutter.offsetWidth - padding) + 1;\n      display.lineNumWidth = display.lineNumInnerWidth + padding;\n      display.lineNumChars = display.lineNumInnerWidth ? last.length : -1;\n      display.lineGutter.style.width = display.lineNumWidth + \"px\";\n      updateGutterSpace(cm);\n      return true;\n    }\n    return false;\n  }\n\n  function lineNumberFor(options, i) {\n    return String(options.lineNumberFormatter(i + options.firstLineNumber));\n  }\n\n  // Computes display.scroller.scrollLeft + display.gutters.offsetWidth,\n  // but using getBoundingClientRect to get a sub-pixel-accurate\n  // result.\n  function compensateForHScroll(display) {\n    return display.scroller.getBoundingClientRect().left - display.sizer.getBoundingClientRect().left;\n  }\n\n  // DISPLAY DRAWING\n\n  function DisplayUpdate(cm, viewport, force) {\n    var display = cm.display;\n\n    this.viewport = viewport;\n    // Store some values that we'll need later (but don't want to force a relayout for)\n    this.visible = visibleLines(display, cm.doc, viewport);\n    this.editorIsHidden = !display.wrapper.offsetWidth;\n    this.wrapperHeight = display.wrapper.clientHeight;\n    this.wrapperWidth = display.wrapper.clientWidth;\n    this.oldDisplayWidth = displayWidth(cm);\n    this.force = force;\n    this.dims = getDimensions(cm);\n    this.events = [];\n  }\n\n  DisplayUpdate.prototype.signal = function(emitter, type) {\n    if (hasHandler(emitter, type))\n      this.events.push(arguments);\n  };\n  DisplayUpdate.prototype.finish = function() {\n    for (var i = 0; i < this.events.length; i++)\n      signal.apply(null, this.events[i]);\n  };\n\n  function maybeClipScrollbars(cm) {\n    var display = cm.display;\n    if (!display.scrollbarsClipped && display.scroller.offsetWidth) {\n      display.nativeBarWidth = display.scroller.offsetWidth - display.scroller.clientWidth;\n      display.heightForcer.style.height = scrollGap(cm) + \"px\";\n      display.sizer.style.marginBottom = -display.nativeBarWidth + \"px\";\n      display.sizer.style.borderRightWidth = scrollGap(cm) + \"px\";\n      display.scrollbarsClipped = true;\n    }\n  }\n\n  // Does the actual updating of the line display. Bails out\n  // (returning false) when there is nothing to be done and forced is\n  // false.\n  function updateDisplayIfNeeded(cm, update) {\n    var display = cm.display, doc = cm.doc;\n\n    if (update.editorIsHidden) {\n      resetView(cm);\n      return false;\n    }\n\n    // Bail out if the visible area is already rendered and nothing changed.\n    if (!update.force &&\n        update.visible.from >= display.viewFrom && update.visible.to <= display.viewTo &&\n        (display.updateLineNumbers == null || display.updateLineNumbers >= display.viewTo) &&\n        display.renderedView == display.view && countDirtyView(cm) == 0)\n      return false;\n\n    if (maybeUpdateLineNumberWidth(cm)) {\n      resetView(cm);\n      update.dims = getDimensions(cm);\n    }\n\n    // Compute a suitable new viewport (from & to)\n    var end = doc.first + doc.size;\n    var from = Math.max(update.visible.from - cm.options.viewportMargin, doc.first);\n    var to = Math.min(end, update.visible.to + cm.options.viewportMargin);\n    if (display.viewFrom < from && from - display.viewFrom < 20) from = Math.max(doc.first, display.viewFrom);\n    if (display.viewTo > to && display.viewTo - to < 20) to = Math.min(end, display.viewTo);\n    if (sawCollapsedSpans) {\n      from = visualLineNo(cm.doc, from);\n      to = visualLineEndNo(cm.doc, to);\n    }\n\n    var different = from != display.viewFrom || to != display.viewTo ||\n      display.lastWrapHeight != update.wrapperHeight || display.lastWrapWidth != update.wrapperWidth;\n    adjustView(cm, from, to);\n\n    display.viewOffset = heightAtLine(getLine(cm.doc, display.viewFrom));\n    // Position the mover div to align with the current scroll position\n    cm.display.mover.style.top = display.viewOffset + \"px\";\n\n    var toUpdate = countDirtyView(cm);\n    if (!different && toUpdate == 0 && !update.force && display.renderedView == display.view &&\n        (display.updateLineNumbers == null || display.updateLineNumbers >= display.viewTo))\n      return false;\n\n    // For big changes, we hide the enclosing element during the\n    // update, since that speeds up the operations on most browsers.\n    var focused = activeElt();\n    if (toUpdate > 4) display.lineDiv.style.display = \"none\";\n    patchDisplay(cm, display.updateLineNumbers, update.dims);\n    if (toUpdate > 4) display.lineDiv.style.display = \"\";\n    display.renderedView = display.view;\n    // There might have been a widget with a focused element that got\n    // hidden or updated, if so re-focus it.\n    if (focused && activeElt() != focused && focused.offsetHeight) focused.focus();\n\n    // Prevent selection and cursors from interfering with the scroll\n    // width and height.\n    removeChildren(display.cursorDiv);\n    removeChildren(display.selectionDiv);\n    display.gutters.style.height = display.sizer.style.minHeight = 0;\n\n    if (different) {\n      display.lastWrapHeight = update.wrapperHeight;\n      display.lastWrapWidth = update.wrapperWidth;\n      startWorker(cm, 400);\n    }\n\n    display.updateLineNumbers = null;\n\n    return true;\n  }\n\n  function postUpdateDisplay(cm, update) {\n    var viewport = update.viewport;\n    for (var first = true;; first = false) {\n      if (!first || !cm.options.lineWrapping || update.oldDisplayWidth == displayWidth(cm)) {\n        // Clip forced viewport to actual scrollable area.\n        if (viewport && viewport.top != null)\n          viewport = {top: Math.min(cm.doc.height + paddingVert(cm.display) - displayHeight(cm), viewport.top)};\n        // Updated line heights might result in the drawn area not\n        // actually covering the viewport. Keep looping until it does.\n        update.visible = visibleLines(cm.display, cm.doc, viewport);\n        if (update.visible.from >= cm.display.viewFrom && update.visible.to <= cm.display.viewTo)\n          break;\n      }\n      if (!updateDisplayIfNeeded(cm, update)) break;\n      updateHeightsInViewport(cm);\n      var barMeasure = measureForScrollbars(cm);\n      updateSelection(cm);\n      setDocumentHeight(cm, barMeasure);\n      updateScrollbars(cm, barMeasure);\n    }\n\n    update.signal(cm, \"update\", cm);\n    if (cm.display.viewFrom != cm.display.reportedViewFrom || cm.display.viewTo != cm.display.reportedViewTo) {\n      update.signal(cm, \"viewportChange\", cm, cm.display.viewFrom, cm.display.viewTo);\n      cm.display.reportedViewFrom = cm.display.viewFrom; cm.display.reportedViewTo = cm.display.viewTo;\n    }\n  }\n\n  function updateDisplaySimple(cm, viewport) {\n    var update = new DisplayUpdate(cm, viewport);\n    if (updateDisplayIfNeeded(cm, update)) {\n      updateHeightsInViewport(cm);\n      postUpdateDisplay(cm, update);\n      var barMeasure = measureForScrollbars(cm);\n      updateSelection(cm);\n      setDocumentHeight(cm, barMeasure);\n      updateScrollbars(cm, barMeasure);\n      update.finish();\n    }\n  }\n\n  function setDocumentHeight(cm, measure) {\n    cm.display.sizer.style.minHeight = measure.docHeight + \"px\";\n    var total = measure.docHeight + cm.display.barHeight;\n    cm.display.heightForcer.style.top = total + \"px\";\n    cm.display.gutters.style.height = Math.max(total + scrollGap(cm), measure.clientHeight) + \"px\";\n  }\n\n  // Read the actual heights of the rendered lines, and update their\n  // stored heights to match.\n  function updateHeightsInViewport(cm) {\n    var display = cm.display;\n    var prevBottom = display.lineDiv.offsetTop;\n    for (var i = 0; i < display.view.length; i++) {\n      var cur = display.view[i], height;\n      if (cur.hidden) continue;\n      if (ie && ie_version < 8) {\n        var bot = cur.node.offsetTop + cur.node.offsetHeight;\n        height = bot - prevBottom;\n        prevBottom = bot;\n      } else {\n        var box = cur.node.getBoundingClientRect();\n        height = box.bottom - box.top;\n      }\n      var diff = cur.line.height - height;\n      if (height < 2) height = textHeight(display);\n      if (diff > .001 || diff < -.001) {\n        updateLineHeight(cur.line, height);\n        updateWidgetHeight(cur.line);\n        if (cur.rest) for (var j = 0; j < cur.rest.length; j++)\n          updateWidgetHeight(cur.rest[j]);\n      }\n    }\n  }\n\n  // Read and store the height of line widgets associated with the\n  // given line.\n  function updateWidgetHeight(line) {\n    if (line.widgets) for (var i = 0; i < line.widgets.length; ++i)\n      line.widgets[i].height = line.widgets[i].node.parentNode.offsetHeight;\n  }\n\n  // Do a bulk-read of the DOM positions and sizes needed to draw the\n  // view, so that we don't interleave reading and writing to the DOM.\n  function getDimensions(cm) {\n    var d = cm.display, left = {}, width = {};\n    var gutterLeft = d.gutters.clientLeft;\n    for (var n = d.gutters.firstChild, i = 0; n; n = n.nextSibling, ++i) {\n      left[cm.options.gutters[i]] = n.offsetLeft + n.clientLeft + gutterLeft;\n      width[cm.options.gutters[i]] = n.clientWidth;\n    }\n    return {fixedPos: compensateForHScroll(d),\n            gutterTotalWidth: d.gutters.offsetWidth,\n            gutterLeft: left,\n            gutterWidth: width,\n            wrapperWidth: d.wrapper.clientWidth};\n  }\n\n  // Sync the actual display DOM structure with display.view, removing\n  // nodes for lines that are no longer in view, and creating the ones\n  // that are not there yet, and updating the ones that are out of\n  // date.\n  function patchDisplay(cm, updateNumbersFrom, dims) {\n    var display = cm.display, lineNumbers = cm.options.lineNumbers;\n    var container = display.lineDiv, cur = container.firstChild;\n\n    function rm(node) {\n      var next = node.nextSibling;\n      // Works around a throw-scroll bug in OS X Webkit\n      if (webkit && mac && cm.display.currentWheelTarget == node)\n        node.style.display = \"none\";\n      else\n        node.parentNode.removeChild(node);\n      return next;\n    }\n\n    var view = display.view, lineN = display.viewFrom;\n    // Loop over the elements in the view, syncing cur (the DOM nodes\n    // in display.lineDiv) with the view as we go.\n    for (var i = 0; i < view.length; i++) {\n      var lineView = view[i];\n      if (lineView.hidden) {\n      } else if (!lineView.node || lineView.node.parentNode != container) { // Not drawn yet\n        var node = buildLineElement(cm, lineView, lineN, dims);\n        container.insertBefore(node, cur);\n      } else { // Already drawn\n        while (cur != lineView.node) cur = rm(cur);\n        var updateNumber = lineNumbers && updateNumbersFrom != null &&\n          updateNumbersFrom <= lineN && lineView.lineNumber;\n        if (lineView.changes) {\n          if (indexOf(lineView.changes, \"gutter\") > -1) updateNumber = false;\n          updateLineForChanges(cm, lineView, lineN, dims);\n        }\n        if (updateNumber) {\n          removeChildren(lineView.lineNumber);\n          lineView.lineNumber.appendChild(document.createTextNode(lineNumberFor(cm.options, lineN)));\n        }\n        cur = lineView.node.nextSibling;\n      }\n      lineN += lineView.size;\n    }\n    while (cur) cur = rm(cur);\n  }\n\n  // When an aspect of a line changes, a string is added to\n  // lineView.changes. This updates the relevant part of the line's\n  // DOM structure.\n  function updateLineForChanges(cm, lineView, lineN, dims) {\n    for (var j = 0; j < lineView.changes.length; j++) {\n      var type = lineView.changes[j];\n      if (type == \"text\") updateLineText(cm, lineView);\n      else if (type == \"gutter\") updateLineGutter(cm, lineView, lineN, dims);\n      else if (type == \"class\") updateLineClasses(lineView);\n      else if (type == \"widget\") updateLineWidgets(cm, lineView, dims);\n    }\n    lineView.changes = null;\n  }\n\n  // Lines with gutter elements, widgets or a background class need to\n  // be wrapped, and have the extra elements added to the wrapper div\n  function ensureLineWrapped(lineView) {\n    if (lineView.node == lineView.text) {\n      lineView.node = elt(\"div\", null, null, \"position: relative\");\n      if (lineView.text.parentNode)\n        lineView.text.parentNode.replaceChild(lineView.node, lineView.text);\n      lineView.node.appendChild(lineView.text);\n      if (ie && ie_version < 8) lineView.node.style.zIndex = 2;\n    }\n    return lineView.node;\n  }\n\n  function updateLineBackground(lineView) {\n    var cls = lineView.bgClass ? lineView.bgClass + \" \" + (lineView.line.bgClass || \"\") : lineView.line.bgClass;\n    if (cls) cls += \" CodeMirror-linebackground\";\n    if (lineView.background) {\n      if (cls) lineView.background.className = cls;\n      else { lineView.background.parentNode.removeChild(lineView.background); lineView.background = null; }\n    } else if (cls) {\n      var wrap = ensureLineWrapped(lineView);\n      lineView.background = wrap.insertBefore(elt(\"div\", null, cls), wrap.firstChild);\n    }\n  }\n\n  // Wrapper around buildLineContent which will reuse the structure\n  // in display.externalMeasured when possible.\n  function getLineContent(cm, lineView) {\n    var ext = cm.display.externalMeasured;\n    if (ext && ext.line == lineView.line) {\n      cm.display.externalMeasured = null;\n      lineView.measure = ext.measure;\n      return ext.built;\n    }\n    return buildLineContent(cm, lineView);\n  }\n\n  // Redraw the line's text. Interacts with the background and text\n  // classes because the mode may output tokens that influence these\n  // classes.\n  function updateLineText(cm, lineView) {\n    var cls = lineView.text.className;\n    var built = getLineContent(cm, lineView);\n    if (lineView.text == lineView.node) lineView.node = built.pre;\n    lineView.text.parentNode.replaceChild(built.pre, lineView.text);\n    lineView.text = built.pre;\n    if (built.bgClass != lineView.bgClass || built.textClass != lineView.textClass) {\n      lineView.bgClass = built.bgClass;\n      lineView.textClass = built.textClass;\n      updateLineClasses(lineView);\n    } else if (cls) {\n      lineView.text.className = cls;\n    }\n  }\n\n  function updateLineClasses(lineView) {\n    updateLineBackground(lineView);\n    if (lineView.line.wrapClass)\n      ensureLineWrapped(lineView).className = lineView.line.wrapClass;\n    else if (lineView.node != lineView.text)\n      lineView.node.className = \"\";\n    var textClass = lineView.textClass ? lineView.textClass + \" \" + (lineView.line.textClass || \"\") : lineView.line.textClass;\n    lineView.text.className = textClass || \"\";\n  }\n\n  function updateLineGutter(cm, lineView, lineN, dims) {\n    if (lineView.gutter) {\n      lineView.node.removeChild(lineView.gutter);\n      lineView.gutter = null;\n    }\n    if (lineView.gutterBackground) {\n      lineView.node.removeChild(lineView.gutterBackground);\n      lineView.gutterBackground = null;\n    }\n    if (lineView.line.gutterClass) {\n      var wrap = ensureLineWrapped(lineView);\n      lineView.gutterBackground = elt(\"div\", null, \"CodeMirror-gutter-background \" + lineView.line.gutterClass,\n                                      \"left: \" + (cm.options.fixedGutter ? dims.fixedPos : -dims.gutterTotalWidth) +\n                                      \"px; width: \" + dims.gutterTotalWidth + \"px\");\n      wrap.insertBefore(lineView.gutterBackground, lineView.text);\n    }\n    var markers = lineView.line.gutterMarkers;\n    if (cm.options.lineNumbers || markers) {\n      var wrap = ensureLineWrapped(lineView);\n      var gutterWrap = lineView.gutter = elt(\"div\", null, \"CodeMirror-gutter-wrapper\", \"left: \" +\n                                             (cm.options.fixedGutter ? dims.fixedPos : -dims.gutterTotalWidth) + \"px\");\n      cm.display.input.setUneditable(gutterWrap);\n      wrap.insertBefore(gutterWrap, lineView.text);\n      if (lineView.line.gutterClass)\n        gutterWrap.className += \" \" + lineView.line.gutterClass;\n      if (cm.options.lineNumbers && (!markers || !markers[\"CodeMirror-linenumbers\"]))\n        lineView.lineNumber = gutterWrap.appendChild(\n          elt(\"div\", lineNumberFor(cm.options, lineN),\n              \"CodeMirror-linenumber CodeMirror-gutter-elt\",\n              \"left: \" + dims.gutterLeft[\"CodeMirror-linenumbers\"] + \"px; width: \"\n              + cm.display.lineNumInnerWidth + \"px\"));\n      if (markers) for (var k = 0; k < cm.options.gutters.length; ++k) {\n        var id = cm.options.gutters[k], found = markers.hasOwnProperty(id) && markers[id];\n        if (found)\n          gutterWrap.appendChild(elt(\"div\", [found], \"CodeMirror-gutter-elt\", \"left: \" +\n                                     dims.gutterLeft[id] + \"px; width: \" + dims.gutterWidth[id] + \"px\"));\n      }\n    }\n  }\n\n  function updateLineWidgets(cm, lineView, dims) {\n    if (lineView.alignable) lineView.alignable = null;\n    for (var node = lineView.node.firstChild, next; node; node = next) {\n      var next = node.nextSibling;\n      if (node.className == \"CodeMirror-linewidget\")\n        lineView.node.removeChild(node);\n    }\n    insertLineWidgets(cm, lineView, dims);\n  }\n\n  // Build a line's DOM representation from scratch\n  function buildLineElement(cm, lineView, lineN, dims) {\n    var built = getLineContent(cm, lineView);\n    lineView.text = lineView.node = built.pre;\n    if (built.bgClass) lineView.bgClass = built.bgClass;\n    if (built.textClass) lineView.textClass = built.textClass;\n\n    updateLineClasses(lineView);\n    updateLineGutter(cm, lineView, lineN, dims);\n    insertLineWidgets(cm, lineView, dims);\n    return lineView.node;\n  }\n\n  // A lineView may contain multiple logical lines (when merged by\n  // collapsed spans). The widgets for all of them need to be drawn.\n  function insertLineWidgets(cm, lineView, dims) {\n    insertLineWidgetsFor(cm, lineView.line, lineView, dims, true);\n    if (lineView.rest) for (var i = 0; i < lineView.rest.length; i++)\n      insertLineWidgetsFor(cm, lineView.rest[i], lineView, dims, false);\n  }\n\n  function insertLineWidgetsFor(cm, line, lineView, dims, allowAbove) {\n    if (!line.widgets) return;\n    var wrap = ensureLineWrapped(lineView);\n    for (var i = 0, ws = line.widgets; i < ws.length; ++i) {\n      var widget = ws[i], node = elt(\"div\", [widget.node], \"CodeMirror-linewidget\");\n      if (!widget.handleMouseEvents) node.setAttribute(\"cm-ignore-events\", \"true\");\n      positionLineWidget(widget, node, lineView, dims);\n      cm.display.input.setUneditable(node);\n      if (allowAbove && widget.above)\n        wrap.insertBefore(node, lineView.gutter || lineView.text);\n      else\n        wrap.appendChild(node);\n      signalLater(widget, \"redraw\");\n    }\n  }\n\n  function positionLineWidget(widget, node, lineView, dims) {\n    if (widget.noHScroll) {\n      (lineView.alignable || (lineView.alignable = [])).push(node);\n      var width = dims.wrapperWidth;\n      node.style.left = dims.fixedPos + \"px\";\n      if (!widget.coverGutter) {\n        width -= dims.gutterTotalWidth;\n        node.style.paddingLeft = dims.gutterTotalWidth + \"px\";\n      }\n      node.style.width = width + \"px\";\n    }\n    if (widget.coverGutter) {\n      node.style.zIndex = 5;\n      node.style.position = \"relative\";\n      if (!widget.noHScroll) node.style.marginLeft = -dims.gutterTotalWidth + \"px\";\n    }\n  }\n\n  // POSITION OBJECT\n\n  // A Pos instance represents a position within the text.\n  var Pos = CodeMirror.Pos = function(line, ch) {\n    if (!(this instanceof Pos)) return new Pos(line, ch);\n    this.line = line; this.ch = ch;\n  };\n\n  // Compare two positions, return 0 if they are the same, a negative\n  // number when a is less, and a positive number otherwise.\n  var cmp = CodeMirror.cmpPos = function(a, b) { return a.line - b.line || a.ch - b.ch; };\n\n  function copyPos(x) {return Pos(x.line, x.ch);}\n  function maxPos(a, b) { return cmp(a, b) < 0 ? b : a; }\n  function minPos(a, b) { return cmp(a, b) < 0 ? a : b; }\n\n  // INPUT HANDLING\n\n  function ensureFocus(cm) {\n    if (!cm.state.focused) { cm.display.input.focus(); onFocus(cm); }\n  }\n\n  // This will be set to an array of strings when copying, so that,\n  // when pasting, we know what kind of selections the copied text\n  // was made out of.\n  var lastCopied = null;\n\n  function applyTextInput(cm, inserted, deleted, sel, origin) {\n    var doc = cm.doc;\n    cm.display.shift = false;\n    if (!sel) sel = doc.sel;\n\n    var paste = cm.state.pasteIncoming || origin == \"paste\";\n    var textLines = doc.splitLines(inserted), multiPaste = null;\n    // When pasing N lines into N selections, insert one line per selection\n    if (paste && sel.ranges.length > 1) {\n      if (lastCopied && lastCopied.join(\"\\n\") == inserted) {\n        if (sel.ranges.length % lastCopied.length == 0) {\n          multiPaste = [];\n          for (var i = 0; i < lastCopied.length; i++)\n            multiPaste.push(doc.splitLines(lastCopied[i]));\n        }\n      } else if (textLines.length == sel.ranges.length) {\n        multiPaste = map(textLines, function(l) { return [l]; });\n      }\n    }\n\n    // Normal behavior is to insert the new text into every selection\n    for (var i = sel.ranges.length - 1; i >= 0; i--) {\n      var range = sel.ranges[i];\n      var from = range.from(), to = range.to();\n      if (range.empty()) {\n        if (deleted && deleted > 0) // Handle deletion\n          from = Pos(from.line, from.ch - deleted);\n        else if (cm.state.overwrite && !paste) // Handle overwrite\n          to = Pos(to.line, Math.min(getLine(doc, to.line).text.length, to.ch + lst(textLines).length));\n      }\n      var updateInput = cm.curOp.updateInput;\n      var changeEvent = {from: from, to: to, text: multiPaste ? multiPaste[i % multiPaste.length] : textLines,\n                         origin: origin || (paste ? \"paste\" : cm.state.cutIncoming ? \"cut\" : \"+input\")};\n      makeChange(cm.doc, changeEvent);\n      signalLater(cm, \"inputRead\", cm, changeEvent);\n    }\n    if (inserted && !paste)\n      triggerElectric(cm, inserted);\n\n    ensureCursorVisible(cm);\n    cm.curOp.updateInput = updateInput;\n    cm.curOp.typing = true;\n    cm.state.pasteIncoming = cm.state.cutIncoming = false;\n  }\n\n  function handlePaste(e, cm) {\n    var pasted = e.clipboardData && e.clipboardData.getData(\"text/plain\");\n    if (pasted) {\n      e.preventDefault();\n      if (!cm.isReadOnly() && !cm.options.disableInput)\n        runInOp(cm, function() { applyTextInput(cm, pasted, 0, null, \"paste\"); });\n      return true;\n    }\n  }\n\n  function triggerElectric(cm, inserted) {\n    // When an 'electric' character is inserted, immediately trigger a reindent\n    if (!cm.options.electricChars || !cm.options.smartIndent) return;\n    var sel = cm.doc.sel;\n\n    for (var i = sel.ranges.length - 1; i >= 0; i--) {\n      var range = sel.ranges[i];\n      if (range.head.ch > 100 || (i && sel.ranges[i - 1].head.line == range.head.line)) continue;\n      var mode = cm.getModeAt(range.head);\n      var indented = false;\n      if (mode.electricChars) {\n        for (var j = 0; j < mode.electricChars.length; j++)\n          if (inserted.indexOf(mode.electricChars.charAt(j)) > -1) {\n            indented = indentLine(cm, range.head.line, \"smart\");\n            break;\n          }\n      } else if (mode.electricInput) {\n        if (mode.electricInput.test(getLine(cm.doc, range.head.line).text.slice(0, range.head.ch)))\n          indented = indentLine(cm, range.head.line, \"smart\");\n      }\n      if (indented) signalLater(cm, \"electricInput\", cm, range.head.line);\n    }\n  }\n\n  function copyableRanges(cm) {\n    var text = [], ranges = [];\n    for (var i = 0; i < cm.doc.sel.ranges.length; i++) {\n      var line = cm.doc.sel.ranges[i].head.line;\n      var lineRange = {anchor: Pos(line, 0), head: Pos(line + 1, 0)};\n      ranges.push(lineRange);\n      text.push(cm.getRange(lineRange.anchor, lineRange.head));\n    }\n    return {text: text, ranges: ranges};\n  }\n\n  function disableBrowserMagic(field) {\n    field.setAttribute(\"autocorrect\", \"off\");\n    field.setAttribute(\"autocapitalize\", \"off\");\n    field.setAttribute(\"spellcheck\", \"false\");\n  }\n\n  // TEXTAREA INPUT STYLE\n\n  function TextareaInput(cm) {\n    this.cm = cm;\n    // See input.poll and input.reset\n    this.prevInput = \"\";\n\n    // Flag that indicates whether we expect input to appear real soon\n    // now (after some event like 'keypress' or 'input') and are\n    // polling intensively.\n    this.pollingFast = false;\n    // Self-resetting timeout for the poller\n    this.polling = new Delayed();\n    // Tracks when input.reset has punted to just putting a short\n    // string into the textarea instead of the full selection.\n    this.inaccurateSelection = false;\n    // Used to work around IE issue with selection being forgotten when focus moves away from textarea\n    this.hasSelection = false;\n    this.composing = null;\n  };\n\n  function hiddenTextarea() {\n    var te = elt(\"textarea\", null, null, \"position: absolute; padding: 0; width: 1px; height: 1em; outline: none\");\n    var div = elt(\"div\", [te], null, \"overflow: hidden; position: relative; width: 3px; height: 0px;\");\n    // The textarea is kept positioned near the cursor to prevent the\n    // fact that it'll be scrolled into view on input from scrolling\n    // our fake cursor out of view. On webkit, when wrap=off, paste is\n    // very slow. So make the area wide instead.\n    if (webkit) te.style.width = \"1000px\";\n    else te.setAttribute(\"wrap\", \"off\");\n    // If border: 0; -- iOS fails to open keyboard (issue #1287)\n    if (ios) te.style.border = \"1px solid black\";\n    disableBrowserMagic(te);\n    return div;\n  }\n\n  TextareaInput.prototype = copyObj({\n    init: function(display) {\n      var input = this, cm = this.cm;\n\n      // Wraps and hides input textarea\n      var div = this.wrapper = hiddenTextarea();\n      // The semihidden textarea that is focused when the editor is\n      // focused, and receives input.\n      var te = this.textarea = div.firstChild;\n      display.wrapper.insertBefore(div, display.wrapper.firstChild);\n\n      // Needed to hide big blue blinking cursor on Mobile Safari (doesn't seem to work in iOS 8 anymore)\n      if (ios) te.style.width = \"0px\";\n\n      on(te, \"input\", function() {\n        if (ie && ie_version >= 9 && input.hasSelection) input.hasSelection = null;\n        input.poll();\n      });\n\n      on(te, \"paste\", function(e) {\n        if (signalDOMEvent(cm, e) || handlePaste(e, cm)) return\n\n        cm.state.pasteIncoming = true;\n        input.fastPoll();\n      });\n\n      function prepareCopyCut(e) {\n        if (signalDOMEvent(cm, e)) return\n        if (cm.somethingSelected()) {\n          lastCopied = cm.getSelections();\n          if (input.inaccurateSelection) {\n            input.prevInput = \"\";\n            input.inaccurateSelection = false;\n            te.value = lastCopied.join(\"\\n\");\n            selectInput(te);\n          }\n        } else if (!cm.options.lineWiseCopyCut) {\n          return;\n        } else {\n          var ranges = copyableRanges(cm);\n          lastCopied = ranges.text;\n          if (e.type == \"cut\") {\n            cm.setSelections(ranges.ranges, null, sel_dontScroll);\n          } else {\n            input.prevInput = \"\";\n            te.value = ranges.text.join(\"\\n\");\n            selectInput(te);\n          }\n        }\n        if (e.type == \"cut\") cm.state.cutIncoming = true;\n      }\n      on(te, \"cut\", prepareCopyCut);\n      on(te, \"copy\", prepareCopyCut);\n\n      on(display.scroller, \"paste\", function(e) {\n        if (eventInWidget(display, e) || signalDOMEvent(cm, e)) return;\n        cm.state.pasteIncoming = true;\n        input.focus();\n      });\n\n      // Prevent normal selection in the editor (we handle our own)\n      on(display.lineSpace, \"selectstart\", function(e) {\n        if (!eventInWidget(display, e)) e_preventDefault(e);\n      });\n\n      on(te, \"compositionstart\", function() {\n        var start = cm.getCursor(\"from\");\n        if (input.composing) input.composing.range.clear()\n        input.composing = {\n          start: start,\n          range: cm.markText(start, cm.getCursor(\"to\"), {className: \"CodeMirror-composing\"})\n        };\n      });\n      on(te, \"compositionend\", function() {\n        if (input.composing) {\n          input.poll();\n          input.composing.range.clear();\n          input.composing = null;\n        }\n      });\n    },\n\n    prepareSelection: function() {\n      // Redraw the selection and/or cursor\n      var cm = this.cm, display = cm.display, doc = cm.doc;\n      var result = prepareSelection(cm);\n\n      // Move the hidden textarea near the cursor to prevent scrolling artifacts\n      if (cm.options.moveInputWithCursor) {\n        var headPos = cursorCoords(cm, doc.sel.primary().head, \"div\");\n        var wrapOff = display.wrapper.getBoundingClientRect(), lineOff = display.lineDiv.getBoundingClientRect();\n        result.teTop = Math.max(0, Math.min(display.wrapper.clientHeight - 10,\n                                            headPos.top + lineOff.top - wrapOff.top));\n        result.teLeft = Math.max(0, Math.min(display.wrapper.clientWidth - 10,\n                                             headPos.left + lineOff.left - wrapOff.left));\n      }\n\n      return result;\n    },\n\n    showSelection: function(drawn) {\n      var cm = this.cm, display = cm.display;\n      removeChildrenAndAdd(display.cursorDiv, drawn.cursors);\n      removeChildrenAndAdd(display.selectionDiv, drawn.selection);\n      if (drawn.teTop != null) {\n        this.wrapper.style.top = drawn.teTop + \"px\";\n        this.wrapper.style.left = drawn.teLeft + \"px\";\n      }\n    },\n\n    // Reset the input to correspond to the selection (or to be empty,\n    // when not typing and nothing is selected)\n    reset: function(typing) {\n      if (this.contextMenuPending) return;\n      var minimal, selected, cm = this.cm, doc = cm.doc;\n      if (cm.somethingSelected()) {\n        this.prevInput = \"\";\n        var range = doc.sel.primary();\n        minimal = hasCopyEvent &&\n          (range.to().line - range.from().line > 100 || (selected = cm.getSelection()).length > 1000);\n        var content = minimal ? \"-\" : selected || cm.getSelection();\n        this.textarea.value = content;\n        if (cm.state.focused) selectInput(this.textarea);\n        if (ie && ie_version >= 9) this.hasSelection = content;\n      } else if (!typing) {\n        this.prevInput = this.textarea.value = \"\";\n        if (ie && ie_version >= 9) this.hasSelection = null;\n      }\n      this.inaccurateSelection = minimal;\n    },\n\n    getField: function() { return this.textarea; },\n\n    supportsTouch: function() { return false; },\n\n    focus: function() {\n      if (this.cm.options.readOnly != \"nocursor\" && (!mobile || activeElt() != this.textarea)) {\n        try { this.textarea.focus(); }\n        catch (e) {} // IE8 will throw if the textarea is display: none or not in DOM\n      }\n    },\n\n    blur: function() { this.textarea.blur(); },\n\n    resetPosition: function() {\n      this.wrapper.style.top = this.wrapper.style.left = 0;\n    },\n\n    receivedFocus: function() { this.slowPoll(); },\n\n    // Poll for input changes, using the normal rate of polling. This\n    // runs as long as the editor is focused.\n    slowPoll: function() {\n      var input = this;\n      if (input.pollingFast) return;\n      input.polling.set(this.cm.options.pollInterval, function() {\n        input.poll();\n        if (input.cm.state.focused) input.slowPoll();\n      });\n    },\n\n    // When an event has just come in that is likely to add or change\n    // something in the input textarea, we poll faster, to ensure that\n    // the change appears on the screen quickly.\n    fastPoll: function() {\n      var missed = false, input = this;\n      input.pollingFast = true;\n      function p() {\n        var changed = input.poll();\n        if (!changed && !missed) {missed = true; input.polling.set(60, p);}\n        else {input.pollingFast = false; input.slowPoll();}\n      }\n      input.polling.set(20, p);\n    },\n\n    // Read input from the textarea, and update the document to match.\n    // When something is selected, it is present in the textarea, and\n    // selected (unless it is huge, in which case a placeholder is\n    // used). When nothing is selected, the cursor sits after previously\n    // seen text (can be empty), which is stored in prevInput (we must\n    // not reset the textarea when typing, because that breaks IME).\n    poll: function() {\n      var cm = this.cm, input = this.textarea, prevInput = this.prevInput;\n      // Since this is called a *lot*, try to bail out as cheaply as\n      // possible when it is clear that nothing happened. hasSelection\n      // will be the case when there is a lot of text in the textarea,\n      // in which case reading its value would be expensive.\n      if (this.contextMenuPending || !cm.state.focused ||\n          (hasSelection(input) && !prevInput && !this.composing) ||\n          cm.isReadOnly() || cm.options.disableInput || cm.state.keySeq)\n        return false;\n\n      var text = input.value;\n      // If nothing changed, bail.\n      if (text == prevInput && !cm.somethingSelected()) return false;\n      // Work around nonsensical selection resetting in IE9/10, and\n      // inexplicable appearance of private area unicode characters on\n      // some key combos in Mac (#2689).\n      if (ie && ie_version >= 9 && this.hasSelection === text ||\n          mac && /[\\uf700-\\uf7ff]/.test(text)) {\n        cm.display.input.reset();\n        return false;\n      }\n\n      if (cm.doc.sel == cm.display.selForContextMenu) {\n        var first = text.charCodeAt(0);\n        if (first == 0x200b && !prevInput) prevInput = \"\\u200b\";\n        if (first == 0x21da) { this.reset(); return this.cm.execCommand(\"undo\"); }\n      }\n      // Find the part of the input that is actually new\n      var same = 0, l = Math.min(prevInput.length, text.length);\n      while (same < l && prevInput.charCodeAt(same) == text.charCodeAt(same)) ++same;\n\n      var self = this;\n      runInOp(cm, function() {\n        applyTextInput(cm, text.slice(same), prevInput.length - same,\n                       null, self.composing ? \"*compose\" : null);\n\n        // Don't leave long text in the textarea, since it makes further polling slow\n        if (text.length > 1000 || text.indexOf(\"\\n\") > -1) input.value = self.prevInput = \"\";\n        else self.prevInput = text;\n\n        if (self.composing) {\n          self.composing.range.clear();\n          self.composing.range = cm.markText(self.composing.start, cm.getCursor(\"to\"),\n                                             {className: \"CodeMirror-composing\"});\n        }\n      });\n      return true;\n    },\n\n    ensurePolled: function() {\n      if (this.pollingFast && this.poll()) this.pollingFast = false;\n    },\n\n    onKeyPress: function() {\n      if (ie && ie_version >= 9) this.hasSelection = null;\n      this.fastPoll();\n    },\n\n    onContextMenu: function(e) {\n      var input = this, cm = input.cm, display = cm.display, te = input.textarea;\n      var pos = posFromMouse(cm, e), scrollPos = display.scroller.scrollTop;\n      if (!pos || presto) return; // Opera is difficult.\n\n      // Reset the current text selection only if the click is done outside of the selection\n      // and 'resetSelectionOnContextMenu' option is true.\n      var reset = cm.options.resetSelectionOnContextMenu;\n      if (reset && cm.doc.sel.contains(pos) == -1)\n        operation(cm, setSelection)(cm.doc, simpleSelection(pos), sel_dontScroll);\n\n      var oldCSS = te.style.cssText;\n      input.wrapper.style.position = \"absolute\";\n      te.style.cssText = \"position: fixed; width: 30px; height: 30px; top: \" + (e.clientY - 5) +\n        \"px; left: \" + (e.clientX - 5) + \"px; z-index: 1000; background: \" +\n        (ie ? \"rgba(255, 255, 255, .05)\" : \"transparent\") +\n        \"; outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);\";\n      if (webkit) var oldScrollY = window.scrollY; // Work around Chrome issue (#2712)\n      display.input.focus();\n      if (webkit) window.scrollTo(null, oldScrollY);\n      display.input.reset();\n      // Adds \"Select all\" to context menu in FF\n      if (!cm.somethingSelected()) te.value = input.prevInput = \" \";\n      input.contextMenuPending = true;\n      display.selForContextMenu = cm.doc.sel;\n      clearTimeout(display.detectingSelectAll);\n\n      // Select-all will be greyed out if there's nothing to select, so\n      // this adds a zero-width space so that we can later check whether\n      // it got selected.\n      function prepareSelectAllHack() {\n        if (te.selectionStart != null) {\n          var selected = cm.somethingSelected();\n          var extval = \"\\u200b\" + (selected ? te.value : \"\");\n          te.value = \"\\u21da\"; // Used to catch context-menu undo\n          te.value = extval;\n          input.prevInput = selected ? \"\" : \"\\u200b\";\n          te.selectionStart = 1; te.selectionEnd = extval.length;\n          // Re-set this, in case some other handler touched the\n          // selection in the meantime.\n          display.selForContextMenu = cm.doc.sel;\n        }\n      }\n      function rehide() {\n        input.contextMenuPending = false;\n        input.wrapper.style.position = \"relative\";\n        te.style.cssText = oldCSS;\n        if (ie && ie_version < 9) display.scrollbars.setScrollTop(display.scroller.scrollTop = scrollPos);\n\n        // Try to detect the user choosing select-all\n        if (te.selectionStart != null) {\n          if (!ie || (ie && ie_version < 9)) prepareSelectAllHack();\n          var i = 0, poll = function() {\n            if (display.selForContextMenu == cm.doc.sel && te.selectionStart == 0 &&\n                te.selectionEnd > 0 && input.prevInput == \"\\u200b\")\n              operation(cm, commands.selectAll)(cm);\n            else if (i++ < 10) display.detectingSelectAll = setTimeout(poll, 500);\n            else display.input.reset();\n          };\n          display.detectingSelectAll = setTimeout(poll, 200);\n        }\n      }\n\n      if (ie && ie_version >= 9) prepareSelectAllHack();\n      if (captureRightClick) {\n        e_stop(e);\n        var mouseup = function() {\n          off(window, \"mouseup\", mouseup);\n          setTimeout(rehide, 20);\n        };\n        on(window, \"mouseup\", mouseup);\n      } else {\n        setTimeout(rehide, 50);\n      }\n    },\n\n    readOnlyChanged: function(val) {\n      if (!val) this.reset();\n    },\n\n    setUneditable: nothing,\n\n    needsContentAttribute: false\n  }, TextareaInput.prototype);\n\n  // CONTENTEDITABLE INPUT STYLE\n\n  function ContentEditableInput(cm) {\n    this.cm = cm;\n    this.lastAnchorNode = this.lastAnchorOffset = this.lastFocusNode = this.lastFocusOffset = null;\n    this.polling = new Delayed();\n    this.gracePeriod = false;\n  }\n\n  ContentEditableInput.prototype = copyObj({\n    init: function(display) {\n      var input = this, cm = input.cm;\n      var div = input.div = display.lineDiv;\n      disableBrowserMagic(div);\n\n      on(div, \"paste\", function(e) {\n        if (!signalDOMEvent(cm, e)) handlePaste(e, cm);\n      })\n\n      on(div, \"compositionstart\", function(e) {\n        var data = e.data;\n        input.composing = {sel: cm.doc.sel, data: data, startData: data};\n        if (!data) return;\n        var prim = cm.doc.sel.primary();\n        var line = cm.getLine(prim.head.line);\n        var found = line.indexOf(data, Math.max(0, prim.head.ch - data.length));\n        if (found > -1 && found <= prim.head.ch)\n          input.composing.sel = simpleSelection(Pos(prim.head.line, found),\n                                                Pos(prim.head.line, found + data.length));\n      });\n      on(div, \"compositionupdate\", function(e) {\n        input.composing.data = e.data;\n      });\n      on(div, \"compositionend\", function(e) {\n        var ours = input.composing;\n        if (!ours) return;\n        if (e.data != ours.startData && !/\\u200b/.test(e.data))\n          ours.data = e.data;\n        // Need a small delay to prevent other code (input event,\n        // selection polling) from doing damage when fired right after\n        // compositionend.\n        setTimeout(function() {\n          if (!ours.handled)\n            input.applyComposition(ours);\n          if (input.composing == ours)\n            input.composing = null;\n        }, 50);\n      });\n\n      on(div, \"touchstart\", function() {\n        input.forceCompositionEnd();\n      });\n\n      on(div, \"input\", function() {\n        if (input.composing) return;\n        if (cm.isReadOnly() || !input.pollContent())\n          runInOp(input.cm, function() {regChange(cm);});\n      });\n\n      function onCopyCut(e) {\n        if (signalDOMEvent(cm, e)) return\n        if (cm.somethingSelected()) {\n          lastCopied = cm.getSelections();\n          if (e.type == \"cut\") cm.replaceSelection(\"\", null, \"cut\");\n        } else if (!cm.options.lineWiseCopyCut) {\n          return;\n        } else {\n          var ranges = copyableRanges(cm);\n          lastCopied = ranges.text;\n          if (e.type == \"cut\") {\n            cm.operation(function() {\n              cm.setSelections(ranges.ranges, 0, sel_dontScroll);\n              cm.replaceSelection(\"\", null, \"cut\");\n            });\n          }\n        }\n        // iOS exposes the clipboard API, but seems to discard content inserted into it\n        if (e.clipboardData && !ios) {\n          e.preventDefault();\n          e.clipboardData.clearData();\n          e.clipboardData.setData(\"text/plain\", lastCopied.join(\"\\n\"));\n        } else {\n          // Old-fashioned briefly-focus-a-textarea hack\n          var kludge = hiddenTextarea(), te = kludge.firstChild;\n          cm.display.lineSpace.insertBefore(kludge, cm.display.lineSpace.firstChild);\n          te.value = lastCopied.join(\"\\n\");\n          var hadFocus = document.activeElement;\n          selectInput(te);\n          setTimeout(function() {\n            cm.display.lineSpace.removeChild(kludge);\n            hadFocus.focus();\n          }, 50);\n        }\n      }\n      on(div, \"copy\", onCopyCut);\n      on(div, \"cut\", onCopyCut);\n    },\n\n    prepareSelection: function() {\n      var result = prepareSelection(this.cm, false);\n      result.focus = this.cm.state.focused;\n      return result;\n    },\n\n    showSelection: function(info) {\n      if (!info || !this.cm.display.view.length) return;\n      if (info.focus) this.showPrimarySelection();\n      this.showMultipleSelections(info);\n    },\n\n    showPrimarySelection: function() {\n      var sel = window.getSelection(), prim = this.cm.doc.sel.primary();\n      var curAnchor = domToPos(this.cm, sel.anchorNode, sel.anchorOffset);\n      var curFocus = domToPos(this.cm, sel.focusNode, sel.focusOffset);\n      if (curAnchor && !curAnchor.bad && curFocus && !curFocus.bad &&\n          cmp(minPos(curAnchor, curFocus), prim.from()) == 0 &&\n          cmp(maxPos(curAnchor, curFocus), prim.to()) == 0)\n        return;\n\n      var start = posToDOM(this.cm, prim.from());\n      var end = posToDOM(this.cm, prim.to());\n      if (!start && !end) return;\n\n      var view = this.cm.display.view;\n      var old = sel.rangeCount && sel.getRangeAt(0);\n      if (!start) {\n        start = {node: view[0].measure.map[2], offset: 0};\n      } else if (!end) { // FIXME dangerously hacky\n        var measure = view[view.length - 1].measure;\n        var map = measure.maps ? measure.maps[measure.maps.length - 1] : measure.map;\n        end = {node: map[map.length - 1], offset: map[map.length - 2] - map[map.length - 3]};\n      }\n\n      try { var rng = range(start.node, start.offset, end.offset, end.node); }\n      catch(e) {} // Our model of the DOM might be outdated, in which case the range we try to set can be impossible\n      if (rng) {\n        if (!gecko && this.cm.state.focused) {\n          sel.collapse(start.node, start.offset);\n          if (!rng.collapsed) sel.addRange(rng);\n        } else {\n          sel.removeAllRanges();\n          sel.addRange(rng);\n        }\n        if (old && sel.anchorNode == null) sel.addRange(old);\n        else if (gecko) this.startGracePeriod();\n      }\n      this.rememberSelection();\n    },\n\n    startGracePeriod: function() {\n      var input = this;\n      clearTimeout(this.gracePeriod);\n      this.gracePeriod = setTimeout(function() {\n        input.gracePeriod = false;\n        if (input.selectionChanged())\n          input.cm.operation(function() { input.cm.curOp.selectionChanged = true; });\n      }, 20);\n    },\n\n    showMultipleSelections: function(info) {\n      removeChildrenAndAdd(this.cm.display.cursorDiv, info.cursors);\n      removeChildrenAndAdd(this.cm.display.selectionDiv, info.selection);\n    },\n\n    rememberSelection: function() {\n      var sel = window.getSelection();\n      this.lastAnchorNode = sel.anchorNode; this.lastAnchorOffset = sel.anchorOffset;\n      this.lastFocusNode = sel.focusNode; this.lastFocusOffset = sel.focusOffset;\n    },\n\n    selectionInEditor: function() {\n      var sel = window.getSelection();\n      if (!sel.rangeCount) return false;\n      var node = sel.getRangeAt(0).commonAncestorContainer;\n      return contains(this.div, node);\n    },\n\n    focus: function() {\n      if (this.cm.options.readOnly != \"nocursor\") this.div.focus();\n    },\n    blur: function() { this.div.blur(); },\n    getField: function() { return this.div; },\n\n    supportsTouch: function() { return true; },\n\n    receivedFocus: function() {\n      var input = this;\n      if (this.selectionInEditor())\n        this.pollSelection();\n      else\n        runInOp(this.cm, function() { input.cm.curOp.selectionChanged = true; });\n\n      function poll() {\n        if (input.cm.state.focused) {\n          input.pollSelection();\n          input.polling.set(input.cm.options.pollInterval, poll);\n        }\n      }\n      this.polling.set(this.cm.options.pollInterval, poll);\n    },\n\n    selectionChanged: function() {\n      var sel = window.getSelection();\n      return sel.anchorNode != this.lastAnchorNode || sel.anchorOffset != this.lastAnchorOffset ||\n        sel.focusNode != this.lastFocusNode || sel.focusOffset != this.lastFocusOffset;\n    },\n\n    pollSelection: function() {\n      if (!this.composing && !this.gracePeriod && this.selectionChanged()) {\n        var sel = window.getSelection(), cm = this.cm;\n        this.rememberSelection();\n        var anchor = domToPos(cm, sel.anchorNode, sel.anchorOffset);\n        var head = domToPos(cm, sel.focusNode, sel.focusOffset);\n        if (anchor && head) runInOp(cm, function() {\n          setSelection(cm.doc, simpleSelection(anchor, head), sel_dontScroll);\n          if (anchor.bad || head.bad) cm.curOp.selectionChanged = true;\n        });\n      }\n    },\n\n    pollContent: function() {\n      var cm = this.cm, display = cm.display, sel = cm.doc.sel.primary();\n      var from = sel.from(), to = sel.to();\n      if (from.line < display.viewFrom || to.line > display.viewTo - 1) return false;\n\n      var fromIndex;\n      if (from.line == display.viewFrom || (fromIndex = findViewIndex(cm, from.line)) == 0) {\n        var fromLine = lineNo(display.view[0].line);\n        var fromNode = display.view[0].node;\n      } else {\n        var fromLine = lineNo(display.view[fromIndex].line);\n        var fromNode = display.view[fromIndex - 1].node.nextSibling;\n      }\n      var toIndex = findViewIndex(cm, to.line);\n      if (toIndex == display.view.length - 1) {\n        var toLine = display.viewTo - 1;\n        var toNode = display.lineDiv.lastChild;\n      } else {\n        var toLine = lineNo(display.view[toIndex + 1].line) - 1;\n        var toNode = display.view[toIndex + 1].node.previousSibling;\n      }\n\n      var newText = cm.doc.splitLines(domTextBetween(cm, fromNode, toNode, fromLine, toLine));\n      var oldText = getBetween(cm.doc, Pos(fromLine, 0), Pos(toLine, getLine(cm.doc, toLine).text.length));\n      while (newText.length > 1 && oldText.length > 1) {\n        if (lst(newText) == lst(oldText)) { newText.pop(); oldText.pop(); toLine--; }\n        else if (newText[0] == oldText[0]) { newText.shift(); oldText.shift(); fromLine++; }\n        else break;\n      }\n\n      var cutFront = 0, cutEnd = 0;\n      var newTop = newText[0], oldTop = oldText[0], maxCutFront = Math.min(newTop.length, oldTop.length);\n      while (cutFront < maxCutFront && newTop.charCodeAt(cutFront) == oldTop.charCodeAt(cutFront))\n        ++cutFront;\n      var newBot = lst(newText), oldBot = lst(oldText);\n      var maxCutEnd = Math.min(newBot.length - (newText.length == 1 ? cutFront : 0),\n                               oldBot.length - (oldText.length == 1 ? cutFront : 0));\n      while (cutEnd < maxCutEnd &&\n             newBot.charCodeAt(newBot.length - cutEnd - 1) == oldBot.charCodeAt(oldBot.length - cutEnd - 1))\n        ++cutEnd;\n\n      newText[newText.length - 1] = newBot.slice(0, newBot.length - cutEnd);\n      newText[0] = newText[0].slice(cutFront);\n\n      var chFrom = Pos(fromLine, cutFront);\n      var chTo = Pos(toLine, oldText.length ? lst(oldText).length - cutEnd : 0);\n      if (newText.length > 1 || newText[0] || cmp(chFrom, chTo)) {\n        replaceRange(cm.doc, newText, chFrom, chTo, \"+input\");\n        return true;\n      }\n    },\n\n    ensurePolled: function() {\n      this.forceCompositionEnd();\n    },\n    reset: function() {\n      this.forceCompositionEnd();\n    },\n    forceCompositionEnd: function() {\n      if (!this.composing || this.composing.handled) return;\n      this.applyComposition(this.composing);\n      this.composing.handled = true;\n      this.div.blur();\n      this.div.focus();\n    },\n    applyComposition: function(composing) {\n      if (this.cm.isReadOnly())\n        operation(this.cm, regChange)(this.cm)\n      else if (composing.data && composing.data != composing.startData)\n        operation(this.cm, applyTextInput)(this.cm, composing.data, 0, composing.sel);\n    },\n\n    setUneditable: function(node) {\n      node.contentEditable = \"false\"\n    },\n\n    onKeyPress: function(e) {\n      e.preventDefault();\n      if (!this.cm.isReadOnly())\n        operation(this.cm, applyTextInput)(this.cm, String.fromCharCode(e.charCode == null ? e.keyCode : e.charCode), 0);\n    },\n\n    readOnlyChanged: function(val) {\n      this.div.contentEditable = String(val != \"nocursor\")\n    },\n\n    onContextMenu: nothing,\n    resetPosition: nothing,\n\n    needsContentAttribute: true\n  }, ContentEditableInput.prototype);\n\n  function posToDOM(cm, pos) {\n    var view = findViewForLine(cm, pos.line);\n    if (!view || view.hidden) return null;\n    var line = getLine(cm.doc, pos.line);\n    var info = mapFromLineView(view, line, pos.line);\n\n    var order = getOrder(line), side = \"left\";\n    if (order) {\n      var partPos = getBidiPartAt(order, pos.ch);\n      side = partPos % 2 ? \"right\" : \"left\";\n    }\n    var result = nodeAndOffsetInLineMap(info.map, pos.ch, side);\n    result.offset = result.collapse == \"right\" ? result.end : result.start;\n    return result;\n  }\n\n  function badPos(pos, bad) { if (bad) pos.bad = true; return pos; }\n\n  function domToPos(cm, node, offset) {\n    var lineNode;\n    if (node == cm.display.lineDiv) {\n      lineNode = cm.display.lineDiv.childNodes[offset];\n      if (!lineNode) return badPos(cm.clipPos(Pos(cm.display.viewTo - 1)), true);\n      node = null; offset = 0;\n    } else {\n      for (lineNode = node;; lineNode = lineNode.parentNode) {\n        if (!lineNode || lineNode == cm.display.lineDiv) return null;\n        if (lineNode.parentNode && lineNode.parentNode == cm.display.lineDiv) break;\n      }\n    }\n    for (var i = 0; i < cm.display.view.length; i++) {\n      var lineView = cm.display.view[i];\n      if (lineView.node == lineNode)\n        return locateNodeInLineView(lineView, node, offset);\n    }\n  }\n\n  function locateNodeInLineView(lineView, node, offset) {\n    var wrapper = lineView.text.firstChild, bad = false;\n    if (!node || !contains(wrapper, node)) return badPos(Pos(lineNo(lineView.line), 0), true);\n    if (node == wrapper) {\n      bad = true;\n      node = wrapper.childNodes[offset];\n      offset = 0;\n      if (!node) {\n        var line = lineView.rest ? lst(lineView.rest) : lineView.line;\n        return badPos(Pos(lineNo(line), line.text.length), bad);\n      }\n    }\n\n    var textNode = node.nodeType == 3 ? node : null, topNode = node;\n    if (!textNode && node.childNodes.length == 1 && node.firstChild.nodeType == 3) {\n      textNode = node.firstChild;\n      if (offset) offset = textNode.nodeValue.length;\n    }\n    while (topNode.parentNode != wrapper) topNode = topNode.parentNode;\n    var measure = lineView.measure, maps = measure.maps;\n\n    function find(textNode, topNode, offset) {\n      for (var i = -1; i < (maps ? maps.length : 0); i++) {\n        var map = i < 0 ? measure.map : maps[i];\n        for (var j = 0; j < map.length; j += 3) {\n          var curNode = map[j + 2];\n          if (curNode == textNode || curNode == topNode) {\n            var line = lineNo(i < 0 ? lineView.line : lineView.rest[i]);\n            var ch = map[j] + offset;\n            if (offset < 0 || curNode != textNode) ch = map[j + (offset ? 1 : 0)];\n            return Pos(line, ch);\n          }\n        }\n      }\n    }\n    var found = find(textNode, topNode, offset);\n    if (found) return badPos(found, bad);\n\n    // FIXME this is all really shaky. might handle the few cases it needs to handle, but likely to cause problems\n    for (var after = topNode.nextSibling, dist = textNode ? textNode.nodeValue.length - offset : 0; after; after = after.nextSibling) {\n      found = find(after, after.firstChild, 0);\n      if (found)\n        return badPos(Pos(found.line, found.ch - dist), bad);\n      else\n        dist += after.textContent.length;\n    }\n    for (var before = topNode.previousSibling, dist = offset; before; before = before.previousSibling) {\n      found = find(before, before.firstChild, -1);\n      if (found)\n        return badPos(Pos(found.line, found.ch + dist), bad);\n      else\n        dist += after.textContent.length;\n    }\n  }\n\n  function domTextBetween(cm, from, to, fromLine, toLine) {\n    var text = \"\", closing = false, lineSep = cm.doc.lineSeparator();\n    function recognizeMarker(id) { return function(marker) { return marker.id == id; }; }\n    function walk(node) {\n      if (node.nodeType == 1) {\n        var cmText = node.getAttribute(\"cm-text\");\n        if (cmText != null) {\n          if (cmText == \"\") cmText = node.textContent.replace(/\\u200b/g, \"\");\n          text += cmText;\n          return;\n        }\n        var markerID = node.getAttribute(\"cm-marker\"), range;\n        if (markerID) {\n          var found = cm.findMarks(Pos(fromLine, 0), Pos(toLine + 1, 0), recognizeMarker(+markerID));\n          if (found.length && (range = found[0].find()))\n            text += getBetween(cm.doc, range.from, range.to).join(lineSep);\n          return;\n        }\n        if (node.getAttribute(\"contenteditable\") == \"false\") return;\n        for (var i = 0; i < node.childNodes.length; i++)\n          walk(node.childNodes[i]);\n        if (/^(pre|div|p)$/i.test(node.nodeName))\n          closing = true;\n      } else if (node.nodeType == 3) {\n        var val = node.nodeValue;\n        if (!val) return;\n        if (closing) {\n          text += lineSep;\n          closing = false;\n        }\n        text += val;\n      }\n    }\n    for (;;) {\n      walk(from);\n      if (from == to) break;\n      from = from.nextSibling;\n    }\n    return text;\n  }\n\n  CodeMirror.inputStyles = {\"textarea\": TextareaInput, \"contenteditable\": ContentEditableInput};\n\n  // SELECTION / CURSOR\n\n  // Selection objects are immutable. A new one is created every time\n  // the selection changes. A selection is one or more non-overlapping\n  // (and non-touching) ranges, sorted, and an integer that indicates\n  // which one is the primary selection (the one that's scrolled into\n  // view, that getCursor returns, etc).\n  function Selection(ranges, primIndex) {\n    this.ranges = ranges;\n    this.primIndex = primIndex;\n  }\n\n  Selection.prototype = {\n    primary: function() { return this.ranges[this.primIndex]; },\n    equals: function(other) {\n      if (other == this) return true;\n      if (other.primIndex != this.primIndex || other.ranges.length != this.ranges.length) return false;\n      for (var i = 0; i < this.ranges.length; i++) {\n        var here = this.ranges[i], there = other.ranges[i];\n        if (cmp(here.anchor, there.anchor) != 0 || cmp(here.head, there.head) != 0) return false;\n      }\n      return true;\n    },\n    deepCopy: function() {\n      for (var out = [], i = 0; i < this.ranges.length; i++)\n        out[i] = new Range(copyPos(this.ranges[i].anchor), copyPos(this.ranges[i].head));\n      return new Selection(out, this.primIndex);\n    },\n    somethingSelected: function() {\n      for (var i = 0; i < this.ranges.length; i++)\n        if (!this.ranges[i].empty()) return true;\n      return false;\n    },\n    contains: function(pos, end) {\n      if (!end) end = pos;\n      for (var i = 0; i < this.ranges.length; i++) {\n        var range = this.ranges[i];\n        if (cmp(end, range.from()) >= 0 && cmp(pos, range.to()) <= 0)\n          return i;\n      }\n      return -1;\n    }\n  };\n\n  function Range(anchor, head) {\n    this.anchor = anchor; this.head = head;\n  }\n\n  Range.prototype = {\n    from: function() { return minPos(this.anchor, this.head); },\n    to: function() { return maxPos(this.anchor, this.head); },\n    empty: function() {\n      return this.head.line == this.anchor.line && this.head.ch == this.anchor.ch;\n    }\n  };\n\n  // Take an unsorted, potentially overlapping set of ranges, and\n  // build a selection out of it. 'Consumes' ranges array (modifying\n  // it).\n  function normalizeSelection(ranges, primIndex) {\n    var prim = ranges[primIndex];\n    ranges.sort(function(a, b) { return cmp(a.from(), b.from()); });\n    primIndex = indexOf(ranges, prim);\n    for (var i = 1; i < ranges.length; i++) {\n      var cur = ranges[i], prev = ranges[i - 1];\n      if (cmp(prev.to(), cur.from()) >= 0) {\n        var from = minPos(prev.from(), cur.from()), to = maxPos(prev.to(), cur.to());\n        var inv = prev.empty() ? cur.from() == cur.head : prev.from() == prev.head;\n        if (i <= primIndex) --primIndex;\n        ranges.splice(--i, 2, new Range(inv ? to : from, inv ? from : to));\n      }\n    }\n    return new Selection(ranges, primIndex);\n  }\n\n  function simpleSelection(anchor, head) {\n    return new Selection([new Range(anchor, head || anchor)], 0);\n  }\n\n  // Most of the external API clips given positions to make sure they\n  // actually exist within the document.\n  function clipLine(doc, n) {return Math.max(doc.first, Math.min(n, doc.first + doc.size - 1));}\n  function clipPos(doc, pos) {\n    if (pos.line < doc.first) return Pos(doc.first, 0);\n    var last = doc.first + doc.size - 1;\n    if (pos.line > last) return Pos(last, getLine(doc, last).text.length);\n    return clipToLen(pos, getLine(doc, pos.line).text.length);\n  }\n  function clipToLen(pos, linelen) {\n    var ch = pos.ch;\n    if (ch == null || ch > linelen) return Pos(pos.line, linelen);\n    else if (ch < 0) return Pos(pos.line, 0);\n    else return pos;\n  }\n  function isLine(doc, l) {return l >= doc.first && l < doc.first + doc.size;}\n  function clipPosArray(doc, array) {\n    for (var out = [], i = 0; i < array.length; i++) out[i] = clipPos(doc, array[i]);\n    return out;\n  }\n\n  // SELECTION UPDATES\n\n  // The 'scroll' parameter given to many of these indicated whether\n  // the new cursor position should be scrolled into view after\n  // modifying the selection.\n\n  // If shift is held or the extend flag is set, extends a range to\n  // include a given position (and optionally a second position).\n  // Otherwise, simply returns the range between the given positions.\n  // Used for cursor motion and such.\n  function extendRange(doc, range, head, other) {\n    if (doc.cm && doc.cm.display.shift || doc.extend) {\n      var anchor = range.anchor;\n      if (other) {\n        var posBefore = cmp(head, anchor) < 0;\n        if (posBefore != (cmp(other, anchor) < 0)) {\n          anchor = head;\n          head = other;\n        } else if (posBefore != (cmp(head, other) < 0)) {\n          head = other;\n        }\n      }\n      return new Range(anchor, head);\n    } else {\n      return new Range(other || head, head);\n    }\n  }\n\n  // Extend the primary selection range, discard the rest.\n  function extendSelection(doc, head, other, options) {\n    setSelection(doc, new Selection([extendRange(doc, doc.sel.primary(), head, other)], 0), options);\n  }\n\n  // Extend all selections (pos is an array of selections with length\n  // equal the number of selections)\n  function extendSelections(doc, heads, options) {\n    for (var out = [], i = 0; i < doc.sel.ranges.length; i++)\n      out[i] = extendRange(doc, doc.sel.ranges[i], heads[i], null);\n    var newSel = normalizeSelection(out, doc.sel.primIndex);\n    setSelection(doc, newSel, options);\n  }\n\n  // Updates a single range in the selection.\n  function replaceOneSelection(doc, i, range, options) {\n    var ranges = doc.sel.ranges.slice(0);\n    ranges[i] = range;\n    setSelection(doc, normalizeSelection(ranges, doc.sel.primIndex), options);\n  }\n\n  // Reset the selection to a single range.\n  function setSimpleSelection(doc, anchor, head, options) {\n    setSelection(doc, simpleSelection(anchor, head), options);\n  }\n\n  // Give beforeSelectionChange handlers a change to influence a\n  // selection update.\n  function filterSelectionChange(doc, sel, options) {\n    var obj = {\n      ranges: sel.ranges,\n      update: function(ranges) {\n        this.ranges = [];\n        for (var i = 0; i < ranges.length; i++)\n          this.ranges[i] = new Range(clipPos(doc, ranges[i].anchor),\n                                     clipPos(doc, ranges[i].head));\n      },\n      origin: options && options.origin\n    };\n    signal(doc, \"beforeSelectionChange\", doc, obj);\n    if (doc.cm) signal(doc.cm, \"beforeSelectionChange\", doc.cm, obj);\n    if (obj.ranges != sel.ranges) return normalizeSelection(obj.ranges, obj.ranges.length - 1);\n    else return sel;\n  }\n\n  function setSelectionReplaceHistory(doc, sel, options) {\n    var done = doc.history.done, last = lst(done);\n    if (last && last.ranges) {\n      done[done.length - 1] = sel;\n      setSelectionNoUndo(doc, sel, options);\n    } else {\n      setSelection(doc, sel, options);\n    }\n  }\n\n  // Set a new selection.\n  function setSelection(doc, sel, options) {\n    setSelectionNoUndo(doc, sel, options);\n    addSelectionToHistory(doc, doc.sel, doc.cm ? doc.cm.curOp.id : NaN, options);\n  }\n\n  function setSelectionNoUndo(doc, sel, options) {\n    if (hasHandler(doc, \"beforeSelectionChange\") || doc.cm && hasHandler(doc.cm, \"beforeSelectionChange\"))\n      sel = filterSelectionChange(doc, sel, options);\n\n    var bias = options && options.bias ||\n      (cmp(sel.primary().head, doc.sel.primary().head) < 0 ? -1 : 1);\n    setSelectionInner(doc, skipAtomicInSelection(doc, sel, bias, true));\n\n    if (!(options && options.scroll === false) && doc.cm)\n      ensureCursorVisible(doc.cm);\n  }\n\n  function setSelectionInner(doc, sel) {\n    if (sel.equals(doc.sel)) return;\n\n    doc.sel = sel;\n\n    if (doc.cm) {\n      doc.cm.curOp.updateInput = doc.cm.curOp.selectionChanged = true;\n      signalCursorActivity(doc.cm);\n    }\n    signalLater(doc, \"cursorActivity\", doc);\n  }\n\n  // Verify that the selection does not partially select any atomic\n  // marked ranges.\n  function reCheckSelection(doc) {\n    setSelectionInner(doc, skipAtomicInSelection(doc, doc.sel, null, false), sel_dontScroll);\n  }\n\n  // Return a selection that does not partially select any atomic\n  // ranges.\n  function skipAtomicInSelection(doc, sel, bias, mayClear) {\n    var out;\n    for (var i = 0; i < sel.ranges.length; i++) {\n      var range = sel.ranges[i];\n      var old = sel.ranges.length == doc.sel.ranges.length && doc.sel.ranges[i];\n      var newAnchor = skipAtomic(doc, range.anchor, old && old.anchor, bias, mayClear);\n      var newHead = skipAtomic(doc, range.head, old && old.head, bias, mayClear);\n      if (out || newAnchor != range.anchor || newHead != range.head) {\n        if (!out) out = sel.ranges.slice(0, i);\n        out[i] = new Range(newAnchor, newHead);\n      }\n    }\n    return out ? normalizeSelection(out, sel.primIndex) : sel;\n  }\n\n  function skipAtomicInner(doc, pos, oldPos, dir, mayClear) {\n    var line = getLine(doc, pos.line);\n    if (line.markedSpans) for (var i = 0; i < line.markedSpans.length; ++i) {\n      var sp = line.markedSpans[i], m = sp.marker;\n      if ((sp.from == null || (m.inclusiveLeft ? sp.from <= pos.ch : sp.from < pos.ch)) &&\n          (sp.to == null || (m.inclusiveRight ? sp.to >= pos.ch : sp.to > pos.ch))) {\n        if (mayClear) {\n          signal(m, \"beforeCursorEnter\");\n          if (m.explicitlyCleared) {\n            if (!line.markedSpans) break;\n            else {--i; continue;}\n          }\n        }\n        if (!m.atomic) continue;\n\n        if (oldPos) {\n          var near = m.find(dir < 0 ? 1 : -1), diff;\n          if (dir < 0 ? m.inclusiveRight : m.inclusiveLeft) near = movePos(doc, near, -dir, line);\n          if (near && near.line == pos.line && (diff = cmp(near, oldPos)) && (dir < 0 ? diff < 0 : diff > 0))\n            return skipAtomicInner(doc, near, pos, dir, mayClear);\n        }\n\n        var far = m.find(dir < 0 ? -1 : 1);\n        if (dir < 0 ? m.inclusiveLeft : m.inclusiveRight) far = movePos(doc, far, dir, line);\n        return far ? skipAtomicInner(doc, far, pos, dir, mayClear) : null;\n      }\n    }\n    return pos;\n  }\n\n  // Ensure a given position is not inside an atomic range.\n  function skipAtomic(doc, pos, oldPos, bias, mayClear) {\n    var dir = bias || 1;\n    var found = skipAtomicInner(doc, pos, oldPos, dir, mayClear) ||\n        (!mayClear && skipAtomicInner(doc, pos, oldPos, dir, true)) ||\n        skipAtomicInner(doc, pos, oldPos, -dir, mayClear) ||\n        (!mayClear && skipAtomicInner(doc, pos, oldPos, -dir, true));\n    if (!found) {\n      doc.cantEdit = true;\n      return Pos(doc.first, 0);\n    }\n    return found;\n  }\n\n  function movePos(doc, pos, dir, line) {\n    if (dir < 0 && pos.ch == 0) {\n      if (pos.line > doc.first) return clipPos(doc, Pos(pos.line - 1));\n      else return null;\n    } else if (dir > 0 && pos.ch == (line || getLine(doc, pos.line)).text.length) {\n      if (pos.line < doc.first + doc.size - 1) return Pos(pos.line + 1, 0);\n      else return null;\n    } else {\n      return new Pos(pos.line, pos.ch + dir);\n    }\n  }\n\n  // SELECTION DRAWING\n\n  function updateSelection(cm) {\n    cm.display.input.showSelection(cm.display.input.prepareSelection());\n  }\n\n  function prepareSelection(cm, primary) {\n    var doc = cm.doc, result = {};\n    var curFragment = result.cursors = document.createDocumentFragment();\n    var selFragment = result.selection = document.createDocumentFragment();\n\n    for (var i = 0; i < doc.sel.ranges.length; i++) {\n      if (primary === false && i == doc.sel.primIndex) continue;\n      var range = doc.sel.ranges[i];\n      var collapsed = range.empty();\n      if (collapsed || cm.options.showCursorWhenSelecting)\n        drawSelectionCursor(cm, range.head, curFragment);\n      if (!collapsed)\n        drawSelectionRange(cm, range, selFragment);\n    }\n    return result;\n  }\n\n  // Draws a cursor for the given range\n  function drawSelectionCursor(cm, head, output) {\n    var pos = cursorCoords(cm, head, \"div\", null, null, !cm.options.singleCursorHeightPerLine);\n\n    var cursor = output.appendChild(elt(\"div\", \"\\u00a0\", \"CodeMirror-cursor\"));\n    cursor.style.left = pos.left + \"px\";\n    cursor.style.top = pos.top + \"px\";\n    cursor.style.height = Math.max(0, pos.bottom - pos.top) * cm.options.cursorHeight + \"px\";\n\n    if (pos.other) {\n      // Secondary cursor, shown when on a 'jump' in bi-directional text\n      var otherCursor = output.appendChild(elt(\"div\", \"\\u00a0\", \"CodeMirror-cursor CodeMirror-secondarycursor\"));\n      otherCursor.style.display = \"\";\n      otherCursor.style.left = pos.other.left + \"px\";\n      otherCursor.style.top = pos.other.top + \"px\";\n      otherCursor.style.height = (pos.other.bottom - pos.other.top) * .85 + \"px\";\n    }\n  }\n\n  // Draws the given range as a highlighted selection\n  function drawSelectionRange(cm, range, output) {\n    var display = cm.display, doc = cm.doc;\n    var fragment = document.createDocumentFragment();\n    var padding = paddingH(cm.display), leftSide = padding.left;\n    var rightSide = Math.max(display.sizerWidth, displayWidth(cm) - display.sizer.offsetLeft) - padding.right;\n\n    function add(left, top, width, bottom) {\n      if (top < 0) top = 0;\n      top = Math.round(top);\n      bottom = Math.round(bottom);\n      fragment.appendChild(elt(\"div\", null, \"CodeMirror-selected\", \"position: absolute; left: \" + left +\n                               \"px; top: \" + top + \"px; width: \" + (width == null ? rightSide - left : width) +\n                               \"px; height: \" + (bottom - top) + \"px\"));\n    }\n\n    function drawForLine(line, fromArg, toArg) {\n      var lineObj = getLine(doc, line);\n      var lineLen = lineObj.text.length;\n      var start, end;\n      function coords(ch, bias) {\n        return charCoords(cm, Pos(line, ch), \"div\", lineObj, bias);\n      }\n\n      iterateBidiSections(getOrder(lineObj), fromArg || 0, toArg == null ? lineLen : toArg, function(from, to, dir) {\n        var leftPos = coords(from, \"left\"), rightPos, left, right;\n        if (from == to) {\n          rightPos = leftPos;\n          left = right = leftPos.left;\n        } else {\n          rightPos = coords(to - 1, \"right\");\n          if (dir == \"rtl\") { var tmp = leftPos; leftPos = rightPos; rightPos = tmp; }\n          left = leftPos.left;\n          right = rightPos.right;\n        }\n        if (fromArg == null && from == 0) left = leftSide;\n        if (rightPos.top - leftPos.top > 3) { // Different lines, draw top part\n          add(left, leftPos.top, null, leftPos.bottom);\n          left = leftSide;\n          if (leftPos.bottom < rightPos.top) add(left, leftPos.bottom, null, rightPos.top);\n        }\n        if (toArg == null && to == lineLen) right = rightSide;\n        if (!start || leftPos.top < start.top || leftPos.top == start.top && leftPos.left < start.left)\n          start = leftPos;\n        if (!end || rightPos.bottom > end.bottom || rightPos.bottom == end.bottom && rightPos.right > end.right)\n          end = rightPos;\n        if (left < leftSide + 1) left = leftSide;\n        add(left, rightPos.top, right - left, rightPos.bottom);\n      });\n      return {start: start, end: end};\n    }\n\n    var sFrom = range.from(), sTo = range.to();\n    if (sFrom.line == sTo.line) {\n      drawForLine(sFrom.line, sFrom.ch, sTo.ch);\n    } else {\n      var fromLine = getLine(doc, sFrom.line), toLine = getLine(doc, sTo.line);\n      var singleVLine = visualLine(fromLine) == visualLine(toLine);\n      var leftEnd = drawForLine(sFrom.line, sFrom.ch, singleVLine ? fromLine.text.length + 1 : null).end;\n      var rightStart = drawForLine(sTo.line, singleVLine ? 0 : null, sTo.ch).start;\n      if (singleVLine) {\n        if (leftEnd.top < rightStart.top - 2) {\n          add(leftEnd.right, leftEnd.top, null, leftEnd.bottom);\n          add(leftSide, rightStart.top, rightStart.left, rightStart.bottom);\n        } else {\n          add(leftEnd.right, leftEnd.top, rightStart.left - leftEnd.right, leftEnd.bottom);\n        }\n      }\n      if (leftEnd.bottom < rightStart.top)\n        add(leftSide, leftEnd.bottom, null, rightStart.top);\n    }\n\n    output.appendChild(fragment);\n  }\n\n  // Cursor-blinking\n  function restartBlink(cm) {\n    if (!cm.state.focused) return;\n    var display = cm.display;\n    clearInterval(display.blinker);\n    var on = true;\n    display.cursorDiv.style.visibility = \"\";\n    if (cm.options.cursorBlinkRate > 0)\n      display.blinker = setInterval(function() {\n        display.cursorDiv.style.visibility = (on = !on) ? \"\" : \"hidden\";\n      }, cm.options.cursorBlinkRate);\n    else if (cm.options.cursorBlinkRate < 0)\n      display.cursorDiv.style.visibility = \"hidden\";\n  }\n\n  // HIGHLIGHT WORKER\n\n  function startWorker(cm, time) {\n    if (cm.doc.mode.startState && cm.doc.frontier < cm.display.viewTo)\n      cm.state.highlight.set(time, bind(highlightWorker, cm));\n  }\n\n  function highlightWorker(cm) {\n    var doc = cm.doc;\n    if (doc.frontier < doc.first) doc.frontier = doc.first;\n    if (doc.frontier >= cm.display.viewTo) return;\n    var end = +new Date + cm.options.workTime;\n    var state = copyState(doc.mode, getStateBefore(cm, doc.frontier));\n    var changedLines = [];\n\n    doc.iter(doc.frontier, Math.min(doc.first + doc.size, cm.display.viewTo + 500), function(line) {\n      if (doc.frontier >= cm.display.viewFrom) { // Visible\n        var oldStyles = line.styles, tooLong = line.text.length > cm.options.maxHighlightLength;\n        var highlighted = highlightLine(cm, line, tooLong ? copyState(doc.mode, state) : state, true);\n        line.styles = highlighted.styles;\n        var oldCls = line.styleClasses, newCls = highlighted.classes;\n        if (newCls) line.styleClasses = newCls;\n        else if (oldCls) line.styleClasses = null;\n        var ischange = !oldStyles || oldStyles.length != line.styles.length ||\n          oldCls != newCls && (!oldCls || !newCls || oldCls.bgClass != newCls.bgClass || oldCls.textClass != newCls.textClass);\n        for (var i = 0; !ischange && i < oldStyles.length; ++i) ischange = oldStyles[i] != line.styles[i];\n        if (ischange) changedLines.push(doc.frontier);\n        line.stateAfter = tooLong ? state : copyState(doc.mode, state);\n      } else {\n        if (line.text.length <= cm.options.maxHighlightLength)\n          processLine(cm, line.text, state);\n        line.stateAfter = doc.frontier % 5 == 0 ? copyState(doc.mode, state) : null;\n      }\n      ++doc.frontier;\n      if (+new Date > end) {\n        startWorker(cm, cm.options.workDelay);\n        return true;\n      }\n    });\n    if (changedLines.length) runInOp(cm, function() {\n      for (var i = 0; i < changedLines.length; i++)\n        regLineChange(cm, changedLines[i], \"text\");\n    });\n  }\n\n  // Finds the line to start with when starting a parse. Tries to\n  // find a line with a stateAfter, so that it can start with a\n  // valid state. If that fails, it returns the line with the\n  // smallest indentation, which tends to need the least context to\n  // parse correctly.\n  function findStartLine(cm, n, precise) {\n    var minindent, minline, doc = cm.doc;\n    var lim = precise ? -1 : n - (cm.doc.mode.innerMode ? 1000 : 100);\n    for (var search = n; search > lim; --search) {\n      if (search <= doc.first) return doc.first;\n      var line = getLine(doc, search - 1);\n      if (line.stateAfter && (!precise || search <= doc.frontier)) return search;\n      var indented = countColumn(line.text, null, cm.options.tabSize);\n      if (minline == null || minindent > indented) {\n        minline = search - 1;\n        minindent = indented;\n      }\n    }\n    return minline;\n  }\n\n  function getStateBefore(cm, n, precise) {\n    var doc = cm.doc, display = cm.display;\n    if (!doc.mode.startState) return true;\n    var pos = findStartLine(cm, n, precise), state = pos > doc.first && getLine(doc, pos-1).stateAfter;\n    if (!state) state = startState(doc.mode);\n    else state = copyState(doc.mode, state);\n    doc.iter(pos, n, function(line) {\n      processLine(cm, line.text, state);\n      var save = pos == n - 1 || pos % 5 == 0 || pos >= display.viewFrom && pos < display.viewTo;\n      line.stateAfter = save ? copyState(doc.mode, state) : null;\n      ++pos;\n    });\n    if (precise) doc.frontier = pos;\n    return state;\n  }\n\n  // POSITION MEASUREMENT\n\n  function paddingTop(display) {return display.lineSpace.offsetTop;}\n  function paddingVert(display) {return display.mover.offsetHeight - display.lineSpace.offsetHeight;}\n  function paddingH(display) {\n    if (display.cachedPaddingH) return display.cachedPaddingH;\n    var e = removeChildrenAndAdd(display.measure, elt(\"pre\", \"x\"));\n    var style = window.getComputedStyle ? window.getComputedStyle(e) : e.currentStyle;\n    var data = {left: parseInt(style.paddingLeft), right: parseInt(style.paddingRight)};\n    if (!isNaN(data.left) && !isNaN(data.right)) display.cachedPaddingH = data;\n    return data;\n  }\n\n  function scrollGap(cm) { return scrollerGap - cm.display.nativeBarWidth; }\n  function displayWidth(cm) {\n    return cm.display.scroller.clientWidth - scrollGap(cm) - cm.display.barWidth;\n  }\n  function displayHeight(cm) {\n    return cm.display.scroller.clientHeight - scrollGap(cm) - cm.display.barHeight;\n  }\n\n  // Ensure the lineView.wrapping.heights array is populated. This is\n  // an array of bottom offsets for the lines that make up a drawn\n  // line. When lineWrapping is on, there might be more than one\n  // height.\n  function ensureLineHeights(cm, lineView, rect) {\n    var wrapping = cm.options.lineWrapping;\n    var curWidth = wrapping && displayWidth(cm);\n    if (!lineView.measure.heights || wrapping && lineView.measure.width != curWidth) {\n      var heights = lineView.measure.heights = [];\n      if (wrapping) {\n        lineView.measure.width = curWidth;\n        var rects = lineView.text.firstChild.getClientRects();\n        for (var i = 0; i < rects.length - 1; i++) {\n          var cur = rects[i], next = rects[i + 1];\n          if (Math.abs(cur.bottom - next.bottom) > 2)\n            heights.push((cur.bottom + next.top) / 2 - rect.top);\n        }\n      }\n      heights.push(rect.bottom - rect.top);\n    }\n  }\n\n  // Find a line map (mapping character offsets to text nodes) and a\n  // measurement cache for the given line number. (A line view might\n  // contain multiple lines when collapsed ranges are present.)\n  function mapFromLineView(lineView, line, lineN) {\n    if (lineView.line == line)\n      return {map: lineView.measure.map, cache: lineView.measure.cache};\n    for (var i = 0; i < lineView.rest.length; i++)\n      if (lineView.rest[i] == line)\n        return {map: lineView.measure.maps[i], cache: lineView.measure.caches[i]};\n    for (var i = 0; i < lineView.rest.length; i++)\n      if (lineNo(lineView.rest[i]) > lineN)\n        return {map: lineView.measure.maps[i], cache: lineView.measure.caches[i], before: true};\n  }\n\n  // Render a line into the hidden node display.externalMeasured. Used\n  // when measurement is needed for a line that's not in the viewport.\n  function updateExternalMeasurement(cm, line) {\n    line = visualLine(line);\n    var lineN = lineNo(line);\n    var view = cm.display.externalMeasured = new LineView(cm.doc, line, lineN);\n    view.lineN = lineN;\n    var built = view.built = buildLineContent(cm, view);\n    view.text = built.pre;\n    removeChildrenAndAdd(cm.display.lineMeasure, built.pre);\n    return view;\n  }\n\n  // Get a {top, bottom, left, right} box (in line-local coordinates)\n  // for a given character.\n  function measureChar(cm, line, ch, bias) {\n    return measureCharPrepared(cm, prepareMeasureForLine(cm, line), ch, bias);\n  }\n\n  // Find a line view that corresponds to the given line number.\n  function findViewForLine(cm, lineN) {\n    if (lineN >= cm.display.viewFrom && lineN < cm.display.viewTo)\n      return cm.display.view[findViewIndex(cm, lineN)];\n    var ext = cm.display.externalMeasured;\n    if (ext && lineN >= ext.lineN && lineN < ext.lineN + ext.size)\n      return ext;\n  }\n\n  // Measurement can be split in two steps, the set-up work that\n  // applies to the whole line, and the measurement of the actual\n  // character. Functions like coordsChar, that need to do a lot of\n  // measurements in a row, can thus ensure that the set-up work is\n  // only done once.\n  function prepareMeasureForLine(cm, line) {\n    var lineN = lineNo(line);\n    var view = findViewForLine(cm, lineN);\n    if (view && !view.text) {\n      view = null;\n    } else if (view && view.changes) {\n      updateLineForChanges(cm, view, lineN, getDimensions(cm));\n      cm.curOp.forceUpdate = true;\n    }\n    if (!view)\n      view = updateExternalMeasurement(cm, line);\n\n    var info = mapFromLineView(view, line, lineN);\n    return {\n      line: line, view: view, rect: null,\n      map: info.map, cache: info.cache, before: info.before,\n      hasHeights: false\n    };\n  }\n\n  // Given a prepared measurement object, measures the position of an\n  // actual character (or fetches it from the cache).\n  function measureCharPrepared(cm, prepared, ch, bias, varHeight) {\n    if (prepared.before) ch = -1;\n    var key = ch + (bias || \"\"), found;\n    if (prepared.cache.hasOwnProperty(key)) {\n      found = prepared.cache[key];\n    } else {\n      if (!prepared.rect)\n        prepared.rect = prepared.view.text.getBoundingClientRect();\n      if (!prepared.hasHeights) {\n        ensureLineHeights(cm, prepared.view, prepared.rect);\n        prepared.hasHeights = true;\n      }\n      found = measureCharInner(cm, prepared, ch, bias);\n      if (!found.bogus) prepared.cache[key] = found;\n    }\n    return {left: found.left, right: found.right,\n            top: varHeight ? found.rtop : found.top,\n            bottom: varHeight ? found.rbottom : found.bottom};\n  }\n\n  var nullRect = {left: 0, right: 0, top: 0, bottom: 0};\n\n  function nodeAndOffsetInLineMap(map, ch, bias) {\n    var node, start, end, collapse;\n    // First, search the line map for the text node corresponding to,\n    // or closest to, the target character.\n    for (var i = 0; i < map.length; i += 3) {\n      var mStart = map[i], mEnd = map[i + 1];\n      if (ch < mStart) {\n        start = 0; end = 1;\n        collapse = \"left\";\n      } else if (ch < mEnd) {\n        start = ch - mStart;\n        end = start + 1;\n      } else if (i == map.length - 3 || ch == mEnd && map[i + 3] > ch) {\n        end = mEnd - mStart;\n        start = end - 1;\n        if (ch >= mEnd) collapse = \"right\";\n      }\n      if (start != null) {\n        node = map[i + 2];\n        if (mStart == mEnd && bias == (node.insertLeft ? \"left\" : \"right\"))\n          collapse = bias;\n        if (bias == \"left\" && start == 0)\n          while (i && map[i - 2] == map[i - 3] && map[i - 1].insertLeft) {\n            node = map[(i -= 3) + 2];\n            collapse = \"left\";\n          }\n        if (bias == \"right\" && start == mEnd - mStart)\n          while (i < map.length - 3 && map[i + 3] == map[i + 4] && !map[i + 5].insertLeft) {\n            node = map[(i += 3) + 2];\n            collapse = \"right\";\n          }\n        break;\n      }\n    }\n    return {node: node, start: start, end: end, collapse: collapse, coverStart: mStart, coverEnd: mEnd};\n  }\n\n  function measureCharInner(cm, prepared, ch, bias) {\n    var place = nodeAndOffsetInLineMap(prepared.map, ch, bias);\n    var node = place.node, start = place.start, end = place.end, collapse = place.collapse;\n\n    var rect;\n    if (node.nodeType == 3) { // If it is a text node, use a range to retrieve the coordinates.\n      for (var i = 0; i < 4; i++) { // Retry a maximum of 4 times when nonsense rectangles are returned\n        while (start && isExtendingChar(prepared.line.text.charAt(place.coverStart + start))) --start;\n        while (place.coverStart + end < place.coverEnd && isExtendingChar(prepared.line.text.charAt(place.coverStart + end))) ++end;\n        if (ie && ie_version < 9 && start == 0 && end == place.coverEnd - place.coverStart) {\n          rect = node.parentNode.getBoundingClientRect();\n        } else if (ie && cm.options.lineWrapping) {\n          var rects = range(node, start, end).getClientRects();\n          if (rects.length)\n            rect = rects[bias == \"right\" ? rects.length - 1 : 0];\n          else\n            rect = nullRect;\n        } else {\n          rect = range(node, start, end).getBoundingClientRect() || nullRect;\n        }\n        if (rect.left || rect.right || start == 0) break;\n        end = start;\n        start = start - 1;\n        collapse = \"right\";\n      }\n      if (ie && ie_version < 11) rect = maybeUpdateRectForZooming(cm.display.measure, rect);\n    } else { // If it is a widget, simply get the box for the whole widget.\n      if (start > 0) collapse = bias = \"right\";\n      var rects;\n      if (cm.options.lineWrapping && (rects = node.getClientRects()).length > 1)\n        rect = rects[bias == \"right\" ? rects.length - 1 : 0];\n      else\n        rect = node.getBoundingClientRect();\n    }\n    if (ie && ie_version < 9 && !start && (!rect || !rect.left && !rect.right)) {\n      var rSpan = node.parentNode.getClientRects()[0];\n      if (rSpan)\n        rect = {left: rSpan.left, right: rSpan.left + charWidth(cm.display), top: rSpan.top, bottom: rSpan.bottom};\n      else\n        rect = nullRect;\n    }\n\n    var rtop = rect.top - prepared.rect.top, rbot = rect.bottom - prepared.rect.top;\n    var mid = (rtop + rbot) / 2;\n    var heights = prepared.view.measure.heights;\n    for (var i = 0; i < heights.length - 1; i++)\n      if (mid < heights[i]) break;\n    var top = i ? heights[i - 1] : 0, bot = heights[i];\n    var result = {left: (collapse == \"right\" ? rect.right : rect.left) - prepared.rect.left,\n                  right: (collapse == \"left\" ? rect.left : rect.right) - prepared.rect.left,\n                  top: top, bottom: bot};\n    if (!rect.left && !rect.right) result.bogus = true;\n    if (!cm.options.singleCursorHeightPerLine) { result.rtop = rtop; result.rbottom = rbot; }\n\n    return result;\n  }\n\n  // Work around problem with bounding client rects on ranges being\n  // returned incorrectly when zoomed on IE10 and below.\n  function maybeUpdateRectForZooming(measure, rect) {\n    if (!window.screen || screen.logicalXDPI == null ||\n        screen.logicalXDPI == screen.deviceXDPI || !hasBadZoomedRects(measure))\n      return rect;\n    var scaleX = screen.logicalXDPI / screen.deviceXDPI;\n    var scaleY = screen.logicalYDPI / screen.deviceYDPI;\n    return {left: rect.left * scaleX, right: rect.right * scaleX,\n            top: rect.top * scaleY, bottom: rect.bottom * scaleY};\n  }\n\n  function clearLineMeasurementCacheFor(lineView) {\n    if (lineView.measure) {\n      lineView.measure.cache = {};\n      lineView.measure.heights = null;\n      if (lineView.rest) for (var i = 0; i < lineView.rest.length; i++)\n        lineView.measure.caches[i] = {};\n    }\n  }\n\n  function clearLineMeasurementCache(cm) {\n    cm.display.externalMeasure = null;\n    removeChildren(cm.display.lineMeasure);\n    for (var i = 0; i < cm.display.view.length; i++)\n      clearLineMeasurementCacheFor(cm.display.view[i]);\n  }\n\n  function clearCaches(cm) {\n    clearLineMeasurementCache(cm);\n    cm.display.cachedCharWidth = cm.display.cachedTextHeight = cm.display.cachedPaddingH = null;\n    if (!cm.options.lineWrapping) cm.display.maxLineChanged = true;\n    cm.display.lineNumChars = null;\n  }\n\n  function pageScrollX() { return window.pageXOffset || (document.documentElement || document.body).scrollLeft; }\n  function pageScrollY() { return window.pageYOffset || (document.documentElement || document.body).scrollTop; }\n\n  // Converts a {top, bottom, left, right} box from line-local\n  // coordinates into another coordinate system. Context may be one of\n  // \"line\", \"div\" (display.lineDiv), \"local\"/null (editor), \"window\",\n  // or \"page\".\n  function intoCoordSystem(cm, lineObj, rect, context) {\n    if (lineObj.widgets) for (var i = 0; i < lineObj.widgets.length; ++i) if (lineObj.widgets[i].above) {\n      var size = widgetHeight(lineObj.widgets[i]);\n      rect.top += size; rect.bottom += size;\n    }\n    if (context == \"line\") return rect;\n    if (!context) context = \"local\";\n    var yOff = heightAtLine(lineObj);\n    if (context == \"local\") yOff += paddingTop(cm.display);\n    else yOff -= cm.display.viewOffset;\n    if (context == \"page\" || context == \"window\") {\n      var lOff = cm.display.lineSpace.getBoundingClientRect();\n      yOff += lOff.top + (context == \"window\" ? 0 : pageScrollY());\n      var xOff = lOff.left + (context == \"window\" ? 0 : pageScrollX());\n      rect.left += xOff; rect.right += xOff;\n    }\n    rect.top += yOff; rect.bottom += yOff;\n    return rect;\n  }\n\n  // Coverts a box from \"div\" coords to another coordinate system.\n  // Context may be \"window\", \"page\", \"div\", or \"local\"/null.\n  function fromCoordSystem(cm, coords, context) {\n    if (context == \"div\") return coords;\n    var left = coords.left, top = coords.top;\n    // First move into \"page\" coordinate system\n    if (context == \"page\") {\n      left -= pageScrollX();\n      top -= pageScrollY();\n    } else if (context == \"local\" || !context) {\n      var localBox = cm.display.sizer.getBoundingClientRect();\n      left += localBox.left;\n      top += localBox.top;\n    }\n\n    var lineSpaceBox = cm.display.lineSpace.getBoundingClientRect();\n    return {left: left - lineSpaceBox.left, top: top - lineSpaceBox.top};\n  }\n\n  function charCoords(cm, pos, context, lineObj, bias) {\n    if (!lineObj) lineObj = getLine(cm.doc, pos.line);\n    return intoCoordSystem(cm, lineObj, measureChar(cm, lineObj, pos.ch, bias), context);\n  }\n\n  // Returns a box for a given cursor position, which may have an\n  // 'other' property containing the position of the secondary cursor\n  // on a bidi boundary.\n  function cursorCoords(cm, pos, context, lineObj, preparedMeasure, varHeight) {\n    lineObj = lineObj || getLine(cm.doc, pos.line);\n    if (!preparedMeasure) preparedMeasure = prepareMeasureForLine(cm, lineObj);\n    function get(ch, right) {\n      var m = measureCharPrepared(cm, preparedMeasure, ch, right ? \"right\" : \"left\", varHeight);\n      if (right) m.left = m.right; else m.right = m.left;\n      return intoCoordSystem(cm, lineObj, m, context);\n    }\n    function getBidi(ch, partPos) {\n      var part = order[partPos], right = part.level % 2;\n      if (ch == bidiLeft(part) && partPos && part.level < order[partPos - 1].level) {\n        part = order[--partPos];\n        ch = bidiRight(part) - (part.level % 2 ? 0 : 1);\n        right = true;\n      } else if (ch == bidiRight(part) && partPos < order.length - 1 && part.level < order[partPos + 1].level) {\n        part = order[++partPos];\n        ch = bidiLeft(part) - part.level % 2;\n        right = false;\n      }\n      if (right && ch == part.to && ch > part.from) return get(ch - 1);\n      return get(ch, right);\n    }\n    var order = getOrder(lineObj), ch = pos.ch;\n    if (!order) return get(ch);\n    var partPos = getBidiPartAt(order, ch);\n    var val = getBidi(ch, partPos);\n    if (bidiOther != null) val.other = getBidi(ch, bidiOther);\n    return val;\n  }\n\n  // Used to cheaply estimate the coordinates for a position. Used for\n  // intermediate scroll updates.\n  function estimateCoords(cm, pos) {\n    var left = 0, pos = clipPos(cm.doc, pos);\n    if (!cm.options.lineWrapping) left = charWidth(cm.display) * pos.ch;\n    var lineObj = getLine(cm.doc, pos.line);\n    var top = heightAtLine(lineObj) + paddingTop(cm.display);\n    return {left: left, right: left, top: top, bottom: top + lineObj.height};\n  }\n\n  // Positions returned by coordsChar contain some extra information.\n  // xRel is the relative x position of the input coordinates compared\n  // to the found position (so xRel > 0 means the coordinates are to\n  // the right of the character position, for example). When outside\n  // is true, that means the coordinates lie outside the line's\n  // vertical range.\n  function PosWithInfo(line, ch, outside, xRel) {\n    var pos = Pos(line, ch);\n    pos.xRel = xRel;\n    if (outside) pos.outside = true;\n    return pos;\n  }\n\n  // Compute the character position closest to the given coordinates.\n  // Input must be lineSpace-local (\"div\" coordinate system).\n  function coordsChar(cm, x, y) {\n    var doc = cm.doc;\n    y += cm.display.viewOffset;\n    if (y < 0) return PosWithInfo(doc.first, 0, true, -1);\n    var lineN = lineAtHeight(doc, y), last = doc.first + doc.size - 1;\n    if (lineN > last)\n      return PosWithInfo(doc.first + doc.size - 1, getLine(doc, last).text.length, true, 1);\n    if (x < 0) x = 0;\n\n    var lineObj = getLine(doc, lineN);\n    for (;;) {\n      var found = coordsCharInner(cm, lineObj, lineN, x, y);\n      var merged = collapsedSpanAtEnd(lineObj);\n      var mergedPos = merged && merged.find(0, true);\n      if (merged && (found.ch > mergedPos.from.ch || found.ch == mergedPos.from.ch && found.xRel > 0))\n        lineN = lineNo(lineObj = mergedPos.to.line);\n      else\n        return found;\n    }\n  }\n\n  function coordsCharInner(cm, lineObj, lineNo, x, y) {\n    var innerOff = y - heightAtLine(lineObj);\n    var wrongLine = false, adjust = 2 * cm.display.wrapper.clientWidth;\n    var preparedMeasure = prepareMeasureForLine(cm, lineObj);\n\n    function getX(ch) {\n      var sp = cursorCoords(cm, Pos(lineNo, ch), \"line\", lineObj, preparedMeasure);\n      wrongLine = true;\n      if (innerOff > sp.bottom) return sp.left - adjust;\n      else if (innerOff < sp.top) return sp.left + adjust;\n      else wrongLine = false;\n      return sp.left;\n    }\n\n    var bidi = getOrder(lineObj), dist = lineObj.text.length;\n    var from = lineLeft(lineObj), to = lineRight(lineObj);\n    var fromX = getX(from), fromOutside = wrongLine, toX = getX(to), toOutside = wrongLine;\n\n    if (x > toX) return PosWithInfo(lineNo, to, toOutside, 1);\n    // Do a binary search between these bounds.\n    for (;;) {\n      if (bidi ? to == from || to == moveVisually(lineObj, from, 1) : to - from <= 1) {\n        var ch = x < fromX || x - fromX <= toX - x ? from : to;\n        var xDiff = x - (ch == from ? fromX : toX);\n        while (isExtendingChar(lineObj.text.charAt(ch))) ++ch;\n        var pos = PosWithInfo(lineNo, ch, ch == from ? fromOutside : toOutside,\n                              xDiff < -1 ? -1 : xDiff > 1 ? 1 : 0);\n        return pos;\n      }\n      var step = Math.ceil(dist / 2), middle = from + step;\n      if (bidi) {\n        middle = from;\n        for (var i = 0; i < step; ++i) middle = moveVisually(lineObj, middle, 1);\n      }\n      var middleX = getX(middle);\n      if (middleX > x) {to = middle; toX = middleX; if (toOutside = wrongLine) toX += 1000; dist = step;}\n      else {from = middle; fromX = middleX; fromOutside = wrongLine; dist -= step;}\n    }\n  }\n\n  var measureText;\n  // Compute the default text height.\n  function textHeight(display) {\n    if (display.cachedTextHeight != null) return display.cachedTextHeight;\n    if (measureText == null) {\n      measureText = elt(\"pre\");\n      // Measure a bunch of lines, for browsers that compute\n      // fractional heights.\n      for (var i = 0; i < 49; ++i) {\n        measureText.appendChild(document.createTextNode(\"x\"));\n        measureText.appendChild(elt(\"br\"));\n      }\n      measureText.appendChild(document.createTextNode(\"x\"));\n    }\n    removeChildrenAndAdd(display.measure, measureText);\n    var height = measureText.offsetHeight / 50;\n    if (height > 3) display.cachedTextHeight = height;\n    removeChildren(display.measure);\n    return height || 1;\n  }\n\n  // Compute the default character width.\n  function charWidth(display) {\n    if (display.cachedCharWidth != null) return display.cachedCharWidth;\n    var anchor = elt(\"span\", \"xxxxxxxxxx\");\n    var pre = elt(\"pre\", [anchor]);\n    removeChildrenAndAdd(display.measure, pre);\n    var rect = anchor.getBoundingClientRect(), width = (rect.right - rect.left) / 10;\n    if (width > 2) display.cachedCharWidth = width;\n    return width || 10;\n  }\n\n  // OPERATIONS\n\n  // Operations are used to wrap a series of changes to the editor\n  // state in such a way that each change won't have to update the\n  // cursor and display (which would be awkward, slow, and\n  // error-prone). Instead, display updates are batched and then all\n  // combined and executed at once.\n\n  var operationGroup = null;\n\n  var nextOpId = 0;\n  // Start a new operation.\n  function startOperation(cm) {\n    cm.curOp = {\n      cm: cm,\n      viewChanged: false,      // Flag that indicates that lines might need to be redrawn\n      startHeight: cm.doc.height, // Used to detect need to update scrollbar\n      forceUpdate: false,      // Used to force a redraw\n      updateInput: null,       // Whether to reset the input textarea\n      typing: false,           // Whether this reset should be careful to leave existing text (for compositing)\n      changeObjs: null,        // Accumulated changes, for firing change events\n      cursorActivityHandlers: null, // Set of handlers to fire cursorActivity on\n      cursorActivityCalled: 0, // Tracks which cursorActivity handlers have been called already\n      selectionChanged: false, // Whether the selection needs to be redrawn\n      updateMaxLine: false,    // Set when the widest line needs to be determined anew\n      scrollLeft: null, scrollTop: null, // Intermediate scroll position, not pushed to DOM yet\n      scrollToPos: null,       // Used to scroll to a specific position\n      focus: false,\n      id: ++nextOpId           // Unique ID\n    };\n    if (operationGroup) {\n      operationGroup.ops.push(cm.curOp);\n    } else {\n      cm.curOp.ownsGroup = operationGroup = {\n        ops: [cm.curOp],\n        delayedCallbacks: []\n      };\n    }\n  }\n\n  function fireCallbacksForOps(group) {\n    // Calls delayed callbacks and cursorActivity handlers until no\n    // new ones appear\n    var callbacks = group.delayedCallbacks, i = 0;\n    do {\n      for (; i < callbacks.length; i++)\n        callbacks[i].call(null);\n      for (var j = 0; j < group.ops.length; j++) {\n        var op = group.ops[j];\n        if (op.cursorActivityHandlers)\n          while (op.cursorActivityCalled < op.cursorActivityHandlers.length)\n            op.cursorActivityHandlers[op.cursorActivityCalled++].call(null, op.cm);\n      }\n    } while (i < callbacks.length);\n  }\n\n  // Finish an operation, updating the display and signalling delayed events\n  function endOperation(cm) {\n    var op = cm.curOp, group = op.ownsGroup;\n    if (!group) return;\n\n    try { fireCallbacksForOps(group); }\n    finally {\n      operationGroup = null;\n      for (var i = 0; i < group.ops.length; i++)\n        group.ops[i].cm.curOp = null;\n      endOperations(group);\n    }\n  }\n\n  // The DOM updates done when an operation finishes are batched so\n  // that the minimum number of relayouts are required.\n  function endOperations(group) {\n    var ops = group.ops;\n    for (var i = 0; i < ops.length; i++) // Read DOM\n      endOperation_R1(ops[i]);\n    for (var i = 0; i < ops.length; i++) // Write DOM (maybe)\n      endOperation_W1(ops[i]);\n    for (var i = 0; i < ops.length; i++) // Read DOM\n      endOperation_R2(ops[i]);\n    for (var i = 0; i < ops.length; i++) // Write DOM (maybe)\n      endOperation_W2(ops[i]);\n    for (var i = 0; i < ops.length; i++) // Read DOM\n      endOperation_finish(ops[i]);\n  }\n\n  function endOperation_R1(op) {\n    var cm = op.cm, display = cm.display;\n    maybeClipScrollbars(cm);\n    if (op.updateMaxLine) findMaxLine(cm);\n\n    op.mustUpdate = op.viewChanged || op.forceUpdate || op.scrollTop != null ||\n      op.scrollToPos && (op.scrollToPos.from.line < display.viewFrom ||\n                         op.scrollToPos.to.line >= display.viewTo) ||\n      display.maxLineChanged && cm.options.lineWrapping;\n    op.update = op.mustUpdate &&\n      new DisplayUpdate(cm, op.mustUpdate && {top: op.scrollTop, ensure: op.scrollToPos}, op.forceUpdate);\n  }\n\n  function endOperation_W1(op) {\n    op.updatedDisplay = op.mustUpdate && updateDisplayIfNeeded(op.cm, op.update);\n  }\n\n  function endOperation_R2(op) {\n    var cm = op.cm, display = cm.display;\n    if (op.updatedDisplay) updateHeightsInViewport(cm);\n\n    op.barMeasure = measureForScrollbars(cm);\n\n    // If the max line changed since it was last measured, measure it,\n    // and ensure the document's width matches it.\n    // updateDisplay_W2 will use these properties to do the actual resizing\n    if (display.maxLineChanged && !cm.options.lineWrapping) {\n      op.adjustWidthTo = measureChar(cm, display.maxLine, display.maxLine.text.length).left + 3;\n      cm.display.sizerWidth = op.adjustWidthTo;\n      op.barMeasure.scrollWidth =\n        Math.max(display.scroller.clientWidth, display.sizer.offsetLeft + op.adjustWidthTo + scrollGap(cm) + cm.display.barWidth);\n      op.maxScrollLeft = Math.max(0, display.sizer.offsetLeft + op.adjustWidthTo - displayWidth(cm));\n    }\n\n    if (op.updatedDisplay || op.selectionChanged)\n      op.preparedSelection = display.input.prepareSelection();\n  }\n\n  function endOperation_W2(op) {\n    var cm = op.cm;\n\n    if (op.adjustWidthTo != null) {\n      cm.display.sizer.style.minWidth = op.adjustWidthTo + \"px\";\n      if (op.maxScrollLeft < cm.doc.scrollLeft)\n        setScrollLeft(cm, Math.min(cm.display.scroller.scrollLeft, op.maxScrollLeft), true);\n      cm.display.maxLineChanged = false;\n    }\n\n    if (op.preparedSelection)\n      cm.display.input.showSelection(op.preparedSelection);\n    if (op.updatedDisplay)\n      setDocumentHeight(cm, op.barMeasure);\n    if (op.updatedDisplay || op.startHeight != cm.doc.height)\n      updateScrollbars(cm, op.barMeasure);\n\n    if (op.selectionChanged) restartBlink(cm);\n\n    if (cm.state.focused && op.updateInput)\n      cm.display.input.reset(op.typing);\n    if (op.focus && op.focus == activeElt() && (!document.hasFocus || document.hasFocus()))\n      ensureFocus(op.cm);\n  }\n\n  function endOperation_finish(op) {\n    var cm = op.cm, display = cm.display, doc = cm.doc;\n\n    if (op.updatedDisplay) postUpdateDisplay(cm, op.update);\n\n    // Abort mouse wheel delta measurement, when scrolling explicitly\n    if (display.wheelStartX != null && (op.scrollTop != null || op.scrollLeft != null || op.scrollToPos))\n      display.wheelStartX = display.wheelStartY = null;\n\n    // Propagate the scroll position to the actual DOM scroller\n    if (op.scrollTop != null && (display.scroller.scrollTop != op.scrollTop || op.forceScroll)) {\n      doc.scrollTop = Math.max(0, Math.min(display.scroller.scrollHeight - display.scroller.clientHeight, op.scrollTop));\n      display.scrollbars.setScrollTop(doc.scrollTop);\n      display.scroller.scrollTop = doc.scrollTop;\n    }\n    if (op.scrollLeft != null && (display.scroller.scrollLeft != op.scrollLeft || op.forceScroll)) {\n      doc.scrollLeft = Math.max(0, Math.min(display.scroller.scrollWidth - displayWidth(cm), op.scrollLeft));\n      display.scrollbars.setScrollLeft(doc.scrollLeft);\n      display.scroller.scrollLeft = doc.scrollLeft;\n      alignHorizontally(cm);\n    }\n    // If we need to scroll a specific position into view, do so.\n    if (op.scrollToPos) {\n      var coords = scrollPosIntoView(cm, clipPos(doc, op.scrollToPos.from),\n                                     clipPos(doc, op.scrollToPos.to), op.scrollToPos.margin);\n      if (op.scrollToPos.isCursor && cm.state.focused) maybeScrollWindow(cm, coords);\n    }\n\n    // Fire events for markers that are hidden/unidden by editing or\n    // undoing\n    var hidden = op.maybeHiddenMarkers, unhidden = op.maybeUnhiddenMarkers;\n    if (hidden) for (var i = 0; i < hidden.length; ++i)\n      if (!hidden[i].lines.length) signal(hidden[i], \"hide\");\n    if (unhidden) for (var i = 0; i < unhidden.length; ++i)\n      if (unhidden[i].lines.length) signal(unhidden[i], \"unhide\");\n\n    if (display.wrapper.offsetHeight)\n      doc.scrollTop = cm.display.scroller.scrollTop;\n\n    // Fire change events, and delayed event handlers\n    if (op.changeObjs)\n      signal(cm, \"changes\", cm, op.changeObjs);\n    if (op.update)\n      op.update.finish();\n  }\n\n  // Run the given function in an operation\n  function runInOp(cm, f) {\n    if (cm.curOp) return f();\n    startOperation(cm);\n    try { return f(); }\n    finally { endOperation(cm); }\n  }\n  // Wraps a function in an operation. Returns the wrapped function.\n  function operation(cm, f) {\n    return function() {\n      if (cm.curOp) return f.apply(cm, arguments);\n      startOperation(cm);\n      try { return f.apply(cm, arguments); }\n      finally { endOperation(cm); }\n    };\n  }\n  // Used to add methods to editor and doc instances, wrapping them in\n  // operations.\n  function methodOp(f) {\n    return function() {\n      if (this.curOp) return f.apply(this, arguments);\n      startOperation(this);\n      try { return f.apply(this, arguments); }\n      finally { endOperation(this); }\n    };\n  }\n  function docMethodOp(f) {\n    return function() {\n      var cm = this.cm;\n      if (!cm || cm.curOp) return f.apply(this, arguments);\n      startOperation(cm);\n      try { return f.apply(this, arguments); }\n      finally { endOperation(cm); }\n    };\n  }\n\n  // VIEW TRACKING\n\n  // These objects are used to represent the visible (currently drawn)\n  // part of the document. A LineView may correspond to multiple\n  // logical lines, if those are connected by collapsed ranges.\n  function LineView(doc, line, lineN) {\n    // The starting line\n    this.line = line;\n    // Continuing lines, if any\n    this.rest = visualLineContinued(line);\n    // Number of logical lines in this visual line\n    this.size = this.rest ? lineNo(lst(this.rest)) - lineN + 1 : 1;\n    this.node = this.text = null;\n    this.hidden = lineIsHidden(doc, line);\n  }\n\n  // Create a range of LineView objects for the given lines.\n  function buildViewArray(cm, from, to) {\n    var array = [], nextPos;\n    for (var pos = from; pos < to; pos = nextPos) {\n      var view = new LineView(cm.doc, getLine(cm.doc, pos), pos);\n      nextPos = pos + view.size;\n      array.push(view);\n    }\n    return array;\n  }\n\n  // Updates the display.view data structure for a given change to the\n  // document. From and to are in pre-change coordinates. Lendiff is\n  // the amount of lines added or subtracted by the change. This is\n  // used for changes that span multiple lines, or change the way\n  // lines are divided into visual lines. regLineChange (below)\n  // registers single-line changes.\n  function regChange(cm, from, to, lendiff) {\n    if (from == null) from = cm.doc.first;\n    if (to == null) to = cm.doc.first + cm.doc.size;\n    if (!lendiff) lendiff = 0;\n\n    var display = cm.display;\n    if (lendiff && to < display.viewTo &&\n        (display.updateLineNumbers == null || display.updateLineNumbers > from))\n      display.updateLineNumbers = from;\n\n    cm.curOp.viewChanged = true;\n\n    if (from >= display.viewTo) { // Change after\n      if (sawCollapsedSpans && visualLineNo(cm.doc, from) < display.viewTo)\n        resetView(cm);\n    } else if (to <= display.viewFrom) { // Change before\n      if (sawCollapsedSpans && visualLineEndNo(cm.doc, to + lendiff) > display.viewFrom) {\n        resetView(cm);\n      } else {\n        display.viewFrom += lendiff;\n        display.viewTo += lendiff;\n      }\n    } else if (from <= display.viewFrom && to >= display.viewTo) { // Full overlap\n      resetView(cm);\n    } else if (from <= display.viewFrom) { // Top overlap\n      var cut = viewCuttingPoint(cm, to, to + lendiff, 1);\n      if (cut) {\n        display.view = display.view.slice(cut.index);\n        display.viewFrom = cut.lineN;\n        display.viewTo += lendiff;\n      } else {\n        resetView(cm);\n      }\n    } else if (to >= display.viewTo) { // Bottom overlap\n      var cut = viewCuttingPoint(cm, from, from, -1);\n      if (cut) {\n        display.view = display.view.slice(0, cut.index);\n        display.viewTo = cut.lineN;\n      } else {\n        resetView(cm);\n      }\n    } else { // Gap in the middle\n      var cutTop = viewCuttingPoint(cm, from, from, -1);\n      var cutBot = viewCuttingPoint(cm, to, to + lendiff, 1);\n      if (cutTop && cutBot) {\n        display.view = display.view.slice(0, cutTop.index)\n          .concat(buildViewArray(cm, cutTop.lineN, cutBot.lineN))\n          .concat(display.view.slice(cutBot.index));\n        display.viewTo += lendiff;\n      } else {\n        resetView(cm);\n      }\n    }\n\n    var ext = display.externalMeasured;\n    if (ext) {\n      if (to < ext.lineN)\n        ext.lineN += lendiff;\n      else if (from < ext.lineN + ext.size)\n        display.externalMeasured = null;\n    }\n  }\n\n  // Register a change to a single line. Type must be one of \"text\",\n  // \"gutter\", \"class\", \"widget\"\n  function regLineChange(cm, line, type) {\n    cm.curOp.viewChanged = true;\n    var display = cm.display, ext = cm.display.externalMeasured;\n    if (ext && line >= ext.lineN && line < ext.lineN + ext.size)\n      display.externalMeasured = null;\n\n    if (line < display.viewFrom || line >= display.viewTo) return;\n    var lineView = display.view[findViewIndex(cm, line)];\n    if (lineView.node == null) return;\n    var arr = lineView.changes || (lineView.changes = []);\n    if (indexOf(arr, type) == -1) arr.push(type);\n  }\n\n  // Clear the view.\n  function resetView(cm) {\n    cm.display.viewFrom = cm.display.viewTo = cm.doc.first;\n    cm.display.view = [];\n    cm.display.viewOffset = 0;\n  }\n\n  // Find the view element corresponding to a given line. Return null\n  // when the line isn't visible.\n  function findViewIndex(cm, n) {\n    if (n >= cm.display.viewTo) return null;\n    n -= cm.display.viewFrom;\n    if (n < 0) return null;\n    var view = cm.display.view;\n    for (var i = 0; i < view.length; i++) {\n      n -= view[i].size;\n      if (n < 0) return i;\n    }\n  }\n\n  function viewCuttingPoint(cm, oldN, newN, dir) {\n    var index = findViewIndex(cm, oldN), diff, view = cm.display.view;\n    if (!sawCollapsedSpans || newN == cm.doc.first + cm.doc.size)\n      return {index: index, lineN: newN};\n    for (var i = 0, n = cm.display.viewFrom; i < index; i++)\n      n += view[i].size;\n    if (n != oldN) {\n      if (dir > 0) {\n        if (index == view.length - 1) return null;\n        diff = (n + view[index].size) - oldN;\n        index++;\n      } else {\n        diff = n - oldN;\n      }\n      oldN += diff; newN += diff;\n    }\n    while (visualLineNo(cm.doc, newN) != newN) {\n      if (index == (dir < 0 ? 0 : view.length - 1)) return null;\n      newN += dir * view[index - (dir < 0 ? 1 : 0)].size;\n      index += dir;\n    }\n    return {index: index, lineN: newN};\n  }\n\n  // Force the view to cover a given range, adding empty view element\n  // or clipping off existing ones as needed.\n  function adjustView(cm, from, to) {\n    var display = cm.display, view = display.view;\n    if (view.length == 0 || from >= display.viewTo || to <= display.viewFrom) {\n      display.view = buildViewArray(cm, from, to);\n      display.viewFrom = from;\n    } else {\n      if (display.viewFrom > from)\n        display.view = buildViewArray(cm, from, display.viewFrom).concat(display.view);\n      else if (display.viewFrom < from)\n        display.view = display.view.slice(findViewIndex(cm, from));\n      display.viewFrom = from;\n      if (display.viewTo < to)\n        display.view = display.view.concat(buildViewArray(cm, display.viewTo, to));\n      else if (display.viewTo > to)\n        display.view = display.view.slice(0, findViewIndex(cm, to));\n    }\n    display.viewTo = to;\n  }\n\n  // Count the number of lines in the view whose DOM representation is\n  // out of date (or nonexistent).\n  function countDirtyView(cm) {\n    var view = cm.display.view, dirty = 0;\n    for (var i = 0; i < view.length; i++) {\n      var lineView = view[i];\n      if (!lineView.hidden && (!lineView.node || lineView.changes)) ++dirty;\n    }\n    return dirty;\n  }\n\n  // EVENT HANDLERS\n\n  // Attach the necessary event handlers when initializing the editor\n  function registerEventHandlers(cm) {\n    var d = cm.display;\n    on(d.scroller, \"mousedown\", operation(cm, onMouseDown));\n    // Older IE's will not fire a second mousedown for a double click\n    if (ie && ie_version < 11)\n      on(d.scroller, \"dblclick\", operation(cm, function(e) {\n        if (signalDOMEvent(cm, e)) return;\n        var pos = posFromMouse(cm, e);\n        if (!pos || clickInGutter(cm, e) || eventInWidget(cm.display, e)) return;\n        e_preventDefault(e);\n        var word = cm.findWordAt(pos);\n        extendSelection(cm.doc, word.anchor, word.head);\n      }));\n    else\n      on(d.scroller, \"dblclick\", function(e) { signalDOMEvent(cm, e) || e_preventDefault(e); });\n    // Some browsers fire contextmenu *after* opening the menu, at\n    // which point we can't mess with it anymore. Context menu is\n    // handled in onMouseDown for these browsers.\n    if (!captureRightClick) on(d.scroller, \"contextmenu\", function(e) {onContextMenu(cm, e);});\n\n    // Used to suppress mouse event handling when a touch happens\n    var touchFinished, prevTouch = {end: 0};\n    function finishTouch() {\n      if (d.activeTouch) {\n        touchFinished = setTimeout(function() {d.activeTouch = null;}, 1000);\n        prevTouch = d.activeTouch;\n        prevTouch.end = +new Date;\n      }\n    };\n    function isMouseLikeTouchEvent(e) {\n      if (e.touches.length != 1) return false;\n      var touch = e.touches[0];\n      return touch.radiusX <= 1 && touch.radiusY <= 1;\n    }\n    function farAway(touch, other) {\n      if (other.left == null) return true;\n      var dx = other.left - touch.left, dy = other.top - touch.top;\n      return dx * dx + dy * dy > 20 * 20;\n    }\n    on(d.scroller, \"touchstart\", function(e) {\n      if (!signalDOMEvent(cm, e) && !isMouseLikeTouchEvent(e)) {\n        clearTimeout(touchFinished);\n        var now = +new Date;\n        d.activeTouch = {start: now, moved: false,\n                         prev: now - prevTouch.end <= 300 ? prevTouch : null};\n        if (e.touches.length == 1) {\n          d.activeTouch.left = e.touches[0].pageX;\n          d.activeTouch.top = e.touches[0].pageY;\n        }\n      }\n    });\n    on(d.scroller, \"touchmove\", function() {\n      if (d.activeTouch) d.activeTouch.moved = true;\n    });\n    on(d.scroller, \"touchend\", function(e) {\n      var touch = d.activeTouch;\n      if (touch && !eventInWidget(d, e) && touch.left != null &&\n          !touch.moved && new Date - touch.start < 300) {\n        var pos = cm.coordsChar(d.activeTouch, \"page\"), range;\n        if (!touch.prev || farAway(touch, touch.prev)) // Single tap\n          range = new Range(pos, pos);\n        else if (!touch.prev.prev || farAway(touch, touch.prev.prev)) // Double tap\n          range = cm.findWordAt(pos);\n        else // Triple tap\n          range = new Range(Pos(pos.line, 0), clipPos(cm.doc, Pos(pos.line + 1, 0)));\n        cm.setSelection(range.anchor, range.head);\n        cm.focus();\n        e_preventDefault(e);\n      }\n      finishTouch();\n    });\n    on(d.scroller, \"touchcancel\", finishTouch);\n\n    // Sync scrolling between fake scrollbars and real scrollable\n    // area, ensure viewport is updated when scrolling.\n    on(d.scroller, \"scroll\", function() {\n      if (d.scroller.clientHeight) {\n        setScrollTop(cm, d.scroller.scrollTop);\n        setScrollLeft(cm, d.scroller.scrollLeft, true);\n        signal(cm, \"scroll\", cm);\n      }\n    });\n\n    // Listen to wheel events in order to try and update the viewport on time.\n    on(d.scroller, \"mousewheel\", function(e){onScrollWheel(cm, e);});\n    on(d.scroller, \"DOMMouseScroll\", function(e){onScrollWheel(cm, e);});\n\n    // Prevent wrapper from ever scrolling\n    on(d.wrapper, \"scroll\", function() { d.wrapper.scrollTop = d.wrapper.scrollLeft = 0; });\n\n    d.dragFunctions = {\n      enter: function(e) {if (!signalDOMEvent(cm, e)) e_stop(e);},\n      over: function(e) {if (!signalDOMEvent(cm, e)) { onDragOver(cm, e); e_stop(e); }},\n      start: function(e){onDragStart(cm, e);},\n      drop: operation(cm, onDrop),\n      leave: function() {clearDragCursor(cm);}\n    };\n\n    var inp = d.input.getField();\n    on(inp, \"keyup\", function(e) { onKeyUp.call(cm, e); });\n    on(inp, \"keydown\", operation(cm, onKeyDown));\n    on(inp, \"keypress\", operation(cm, onKeyPress));\n    on(inp, \"focus\", bind(onFocus, cm));\n    on(inp, \"blur\", bind(onBlur, cm));\n  }\n\n  function dragDropChanged(cm, value, old) {\n    var wasOn = old && old != CodeMirror.Init;\n    if (!value != !wasOn) {\n      var funcs = cm.display.dragFunctions;\n      var toggle = value ? on : off;\n      toggle(cm.display.scroller, \"dragstart\", funcs.start);\n      toggle(cm.display.scroller, \"dragenter\", funcs.enter);\n      toggle(cm.display.scroller, \"dragover\", funcs.over);\n      toggle(cm.display.scroller, \"dragleave\", funcs.leave);\n      toggle(cm.display.scroller, \"drop\", funcs.drop);\n    }\n  }\n\n  // Called when the window resizes\n  function onResize(cm) {\n    var d = cm.display;\n    if (d.lastWrapHeight == d.wrapper.clientHeight && d.lastWrapWidth == d.wrapper.clientWidth)\n      return;\n    // Might be a text scaling operation, clear size caches.\n    d.cachedCharWidth = d.cachedTextHeight = d.cachedPaddingH = null;\n    d.scrollbarsClipped = false;\n    cm.setSize();\n  }\n\n  // MOUSE EVENTS\n\n  // Return true when the given mouse event happened in a widget\n  function eventInWidget(display, e) {\n    for (var n = e_target(e); n != display.wrapper; n = n.parentNode) {\n      if (!n || (n.nodeType == 1 && n.getAttribute(\"cm-ignore-events\") == \"true\") ||\n          (n.parentNode == display.sizer && n != display.mover))\n        return true;\n    }\n  }\n\n  // Given a mouse event, find the corresponding position. If liberal\n  // is false, it checks whether a gutter or scrollbar was clicked,\n  // and returns null if it was. forRect is used by rectangular\n  // selections, and tries to estimate a character position even for\n  // coordinates beyond the right of the text.\n  function posFromMouse(cm, e, liberal, forRect) {\n    var display = cm.display;\n    if (!liberal && e_target(e).getAttribute(\"cm-not-content\") == \"true\") return null;\n\n    var x, y, space = display.lineSpace.getBoundingClientRect();\n    // Fails unpredictably on IE[67] when mouse is dragged around quickly.\n    try { x = e.clientX - space.left; y = e.clientY - space.top; }\n    catch (e) { return null; }\n    var coords = coordsChar(cm, x, y), line;\n    if (forRect && coords.xRel == 1 && (line = getLine(cm.doc, coords.line).text).length == coords.ch) {\n      var colDiff = countColumn(line, line.length, cm.options.tabSize) - line.length;\n      coords = Pos(coords.line, Math.max(0, Math.round((x - paddingH(cm.display).left) / charWidth(cm.display)) - colDiff));\n    }\n    return coords;\n  }\n\n  // A mouse down can be a single click, double click, triple click,\n  // start of selection drag, start of text drag, new cursor\n  // (ctrl-click), rectangle drag (alt-drag), or xwin\n  // middle-click-paste. Or it might be a click on something we should\n  // not interfere with, such as a scrollbar or widget.\n  function onMouseDown(e) {\n    var cm = this, display = cm.display;\n    if (signalDOMEvent(cm, e) || display.activeTouch && display.input.supportsTouch()) return;\n    display.shift = e.shiftKey;\n\n    if (eventInWidget(display, e)) {\n      if (!webkit) {\n        // Briefly turn off draggability, to allow widgets to do\n        // normal dragging things.\n        display.scroller.draggable = false;\n        setTimeout(function(){display.scroller.draggable = true;}, 100);\n      }\n      return;\n    }\n    if (clickInGutter(cm, e)) return;\n    var start = posFromMouse(cm, e);\n    window.focus();\n\n    switch (e_button(e)) {\n    case 1:\n      // #3261: make sure, that we're not starting a second selection\n      if (cm.state.selectingText)\n        cm.state.selectingText(e);\n      else if (start)\n        leftButtonDown(cm, e, start);\n      else if (e_target(e) == display.scroller)\n        e_preventDefault(e);\n      break;\n    case 2:\n      if (webkit) cm.state.lastMiddleDown = +new Date;\n      if (start) extendSelection(cm.doc, start);\n      setTimeout(function() {display.input.focus();}, 20);\n      e_preventDefault(e);\n      break;\n    case 3:\n      if (captureRightClick) onContextMenu(cm, e);\n      else delayBlurEvent(cm);\n      break;\n    }\n  }\n\n  var lastClick, lastDoubleClick;\n  function leftButtonDown(cm, e, start) {\n    if (ie) setTimeout(bind(ensureFocus, cm), 0);\n    else cm.curOp.focus = activeElt();\n\n    var now = +new Date, type;\n    if (lastDoubleClick && lastDoubleClick.time > now - 400 && cmp(lastDoubleClick.pos, start) == 0) {\n      type = \"triple\";\n    } else if (lastClick && lastClick.time > now - 400 && cmp(lastClick.pos, start) == 0) {\n      type = \"double\";\n      lastDoubleClick = {time: now, pos: start};\n    } else {\n      type = \"single\";\n      lastClick = {time: now, pos: start};\n    }\n\n    var sel = cm.doc.sel, modifier = mac ? e.metaKey : e.ctrlKey, contained;\n    if (cm.options.dragDrop && dragAndDrop && !cm.isReadOnly() &&\n        type == \"single\" && (contained = sel.contains(start)) > -1 &&\n        (cmp((contained = sel.ranges[contained]).from(), start) < 0 || start.xRel > 0) &&\n        (cmp(contained.to(), start) > 0 || start.xRel < 0))\n      leftButtonStartDrag(cm, e, start, modifier);\n    else\n      leftButtonSelect(cm, e, start, type, modifier);\n  }\n\n  // Start a text drag. When it ends, see if any dragging actually\n  // happen, and treat as a click if it didn't.\n  function leftButtonStartDrag(cm, e, start, modifier) {\n    var display = cm.display, startTime = +new Date;\n    var dragEnd = operation(cm, function(e2) {\n      if (webkit) display.scroller.draggable = false;\n      cm.state.draggingText = false;\n      off(document, \"mouseup\", dragEnd);\n      off(display.scroller, \"drop\", dragEnd);\n      if (Math.abs(e.clientX - e2.clientX) + Math.abs(e.clientY - e2.clientY) < 10) {\n        e_preventDefault(e2);\n        if (!modifier && +new Date - 200 < startTime)\n          extendSelection(cm.doc, start);\n        // Work around unexplainable focus problem in IE9 (#2127) and Chrome (#3081)\n        if (webkit || ie && ie_version == 9)\n          setTimeout(function() {document.body.focus(); display.input.focus();}, 20);\n        else\n          display.input.focus();\n      }\n    });\n    // Let the drag handler handle this.\n    if (webkit) display.scroller.draggable = true;\n    cm.state.draggingText = dragEnd;\n    // IE's approach to draggable\n    if (display.scroller.dragDrop) display.scroller.dragDrop();\n    on(document, \"mouseup\", dragEnd);\n    on(display.scroller, \"drop\", dragEnd);\n  }\n\n  // Normal selection, as opposed to text dragging.\n  function leftButtonSelect(cm, e, start, type, addNew) {\n    var display = cm.display, doc = cm.doc;\n    e_preventDefault(e);\n\n    var ourRange, ourIndex, startSel = doc.sel, ranges = startSel.ranges;\n    if (addNew && !e.shiftKey) {\n      ourIndex = doc.sel.contains(start);\n      if (ourIndex > -1)\n        ourRange = ranges[ourIndex];\n      else\n        ourRange = new Range(start, start);\n    } else {\n      ourRange = doc.sel.primary();\n      ourIndex = doc.sel.primIndex;\n    }\n\n    if (e.altKey) {\n      type = \"rect\";\n      if (!addNew) ourRange = new Range(start, start);\n      start = posFromMouse(cm, e, true, true);\n      ourIndex = -1;\n    } else if (type == \"double\") {\n      var word = cm.findWordAt(start);\n      if (cm.display.shift || doc.extend)\n        ourRange = extendRange(doc, ourRange, word.anchor, word.head);\n      else\n        ourRange = word;\n    } else if (type == \"triple\") {\n      var line = new Range(Pos(start.line, 0), clipPos(doc, Pos(start.line + 1, 0)));\n      if (cm.display.shift || doc.extend)\n        ourRange = extendRange(doc, ourRange, line.anchor, line.head);\n      else\n        ourRange = line;\n    } else {\n      ourRange = extendRange(doc, ourRange, start);\n    }\n\n    if (!addNew) {\n      ourIndex = 0;\n      setSelection(doc, new Selection([ourRange], 0), sel_mouse);\n      startSel = doc.sel;\n    } else if (ourIndex == -1) {\n      ourIndex = ranges.length;\n      setSelection(doc, normalizeSelection(ranges.concat([ourRange]), ourIndex),\n                   {scroll: false, origin: \"*mouse\"});\n    } else if (ranges.length > 1 && ranges[ourIndex].empty() && type == \"single\" && !e.shiftKey) {\n      setSelection(doc, normalizeSelection(ranges.slice(0, ourIndex).concat(ranges.slice(ourIndex + 1)), 0),\n                   {scroll: false, origin: \"*mouse\"});\n      startSel = doc.sel;\n    } else {\n      replaceOneSelection(doc, ourIndex, ourRange, sel_mouse);\n    }\n\n    var lastPos = start;\n    function extendTo(pos) {\n      if (cmp(lastPos, pos) == 0) return;\n      lastPos = pos;\n\n      if (type == \"rect\") {\n        var ranges = [], tabSize = cm.options.tabSize;\n        var startCol = countColumn(getLine(doc, start.line).text, start.ch, tabSize);\n        var posCol = countColumn(getLine(doc, pos.line).text, pos.ch, tabSize);\n        var left = Math.min(startCol, posCol), right = Math.max(startCol, posCol);\n        for (var line = Math.min(start.line, pos.line), end = Math.min(cm.lastLine(), Math.max(start.line, pos.line));\n             line <= end; line++) {\n          var text = getLine(doc, line).text, leftPos = findColumn(text, left, tabSize);\n          if (left == right)\n            ranges.push(new Range(Pos(line, leftPos), Pos(line, leftPos)));\n          else if (text.length > leftPos)\n            ranges.push(new Range(Pos(line, leftPos), Pos(line, findColumn(text, right, tabSize))));\n        }\n        if (!ranges.length) ranges.push(new Range(start, start));\n        setSelection(doc, normalizeSelection(startSel.ranges.slice(0, ourIndex).concat(ranges), ourIndex),\n                     {origin: \"*mouse\", scroll: false});\n        cm.scrollIntoView(pos);\n      } else {\n        var oldRange = ourRange;\n        var anchor = oldRange.anchor, head = pos;\n        if (type != \"single\") {\n          if (type == \"double\")\n            var range = cm.findWordAt(pos);\n          else\n            var range = new Range(Pos(pos.line, 0), clipPos(doc, Pos(pos.line + 1, 0)));\n          if (cmp(range.anchor, anchor) > 0) {\n            head = range.head;\n            anchor = minPos(oldRange.from(), range.anchor);\n          } else {\n            head = range.anchor;\n            anchor = maxPos(oldRange.to(), range.head);\n          }\n        }\n        var ranges = startSel.ranges.slice(0);\n        ranges[ourIndex] = new Range(clipPos(doc, anchor), head);\n        setSelection(doc, normalizeSelection(ranges, ourIndex), sel_mouse);\n      }\n    }\n\n    var editorSize = display.wrapper.getBoundingClientRect();\n    // Used to ensure timeout re-tries don't fire when another extend\n    // happened in the meantime (clearTimeout isn't reliable -- at\n    // least on Chrome, the timeouts still happen even when cleared,\n    // if the clear happens after their scheduled firing time).\n    var counter = 0;\n\n    function extend(e) {\n      var curCount = ++counter;\n      var cur = posFromMouse(cm, e, true, type == \"rect\");\n      if (!cur) return;\n      if (cmp(cur, lastPos) != 0) {\n        cm.curOp.focus = activeElt();\n        extendTo(cur);\n        var visible = visibleLines(display, doc);\n        if (cur.line >= visible.to || cur.line < visible.from)\n          setTimeout(operation(cm, function(){if (counter == curCount) extend(e);}), 150);\n      } else {\n        var outside = e.clientY < editorSize.top ? -20 : e.clientY > editorSize.bottom ? 20 : 0;\n        if (outside) setTimeout(operation(cm, function() {\n          if (counter != curCount) return;\n          display.scroller.scrollTop += outside;\n          extend(e);\n        }), 50);\n      }\n    }\n\n    function done(e) {\n      cm.state.selectingText = false;\n      counter = Infinity;\n      e_preventDefault(e);\n      display.input.focus();\n      off(document, \"mousemove\", move);\n      off(document, \"mouseup\", up);\n      doc.history.lastSelOrigin = null;\n    }\n\n    var move = operation(cm, function(e) {\n      if (!e_button(e)) done(e);\n      else extend(e);\n    });\n    var up = operation(cm, done);\n    cm.state.selectingText = up;\n    on(document, \"mousemove\", move);\n    on(document, \"mouseup\", up);\n  }\n\n  // Determines whether an event happened in the gutter, and fires the\n  // handlers for the corresponding event.\n  function gutterEvent(cm, e, type, prevent) {\n    try { var mX = e.clientX, mY = e.clientY; }\n    catch(e) { return false; }\n    if (mX >= Math.floor(cm.display.gutters.getBoundingClientRect().right)) return false;\n    if (prevent) e_preventDefault(e);\n\n    var display = cm.display;\n    var lineBox = display.lineDiv.getBoundingClientRect();\n\n    if (mY > lineBox.bottom || !hasHandler(cm, type)) return e_defaultPrevented(e);\n    mY -= lineBox.top - display.viewOffset;\n\n    for (var i = 0; i < cm.options.gutters.length; ++i) {\n      var g = display.gutters.childNodes[i];\n      if (g && g.getBoundingClientRect().right >= mX) {\n        var line = lineAtHeight(cm.doc, mY);\n        var gutter = cm.options.gutters[i];\n        signal(cm, type, cm, line, gutter, e);\n        return e_defaultPrevented(e);\n      }\n    }\n  }\n\n  function clickInGutter(cm, e) {\n    return gutterEvent(cm, e, \"gutterClick\", true);\n  }\n\n  // Kludge to work around strange IE behavior where it'll sometimes\n  // re-fire a series of drag-related events right after the drop (#1551)\n  var lastDrop = 0;\n\n  function onDrop(e) {\n    var cm = this;\n    clearDragCursor(cm);\n    if (signalDOMEvent(cm, e) || eventInWidget(cm.display, e))\n      return;\n    e_preventDefault(e);\n    if (ie) lastDrop = +new Date;\n    var pos = posFromMouse(cm, e, true), files = e.dataTransfer.files;\n    if (!pos || cm.isReadOnly()) return;\n    // Might be a file drop, in which case we simply extract the text\n    // and insert it.\n    if (files && files.length && window.FileReader && window.File) {\n      var n = files.length, text = Array(n), read = 0;\n      var loadFile = function(file, i) {\n        if (cm.options.allowDropFileTypes &&\n            indexOf(cm.options.allowDropFileTypes, file.type) == -1)\n          return;\n\n        var reader = new FileReader;\n        reader.onload = operation(cm, function() {\n          var content = reader.result;\n          if (/[\\x00-\\x08\\x0e-\\x1f]{2}/.test(content)) content = \"\";\n          text[i] = content;\n          if (++read == n) {\n            pos = clipPos(cm.doc, pos);\n            var change = {from: pos, to: pos,\n                          text: cm.doc.splitLines(text.join(cm.doc.lineSeparator())),\n                          origin: \"paste\"};\n            makeChange(cm.doc, change);\n            setSelectionReplaceHistory(cm.doc, simpleSelection(pos, changeEnd(change)));\n          }\n        });\n        reader.readAsText(file);\n      };\n      for (var i = 0; i < n; ++i) loadFile(files[i], i);\n    } else { // Normal drop\n      // Don't do a replace if the drop happened inside of the selected text.\n      if (cm.state.draggingText && cm.doc.sel.contains(pos) > -1) {\n        cm.state.draggingText(e);\n        // Ensure the editor is re-focused\n        setTimeout(function() {cm.display.input.focus();}, 20);\n        return;\n      }\n      try {\n        var text = e.dataTransfer.getData(\"Text\");\n        if (text) {\n          if (cm.state.draggingText && !(mac ? e.altKey : e.ctrlKey))\n            var selected = cm.listSelections();\n          setSelectionNoUndo(cm.doc, simpleSelection(pos, pos));\n          if (selected) for (var i = 0; i < selected.length; ++i)\n            replaceRange(cm.doc, \"\", selected[i].anchor, selected[i].head, \"drag\");\n          cm.replaceSelection(text, \"around\", \"paste\");\n          cm.display.input.focus();\n        }\n      }\n      catch(e){}\n    }\n  }\n\n  function onDragStart(cm, e) {\n    if (ie && (!cm.state.draggingText || +new Date - lastDrop < 100)) { e_stop(e); return; }\n    if (signalDOMEvent(cm, e) || eventInWidget(cm.display, e)) return;\n\n    e.dataTransfer.setData(\"Text\", cm.getSelection());\n\n    // Use dummy image instead of default browsers image.\n    // Recent Safari (~6.0.2) have a tendency to segfault when this happens, so we don't do it there.\n    if (e.dataTransfer.setDragImage && !safari) {\n      var img = elt(\"img\", null, null, \"position: fixed; left: 0; top: 0;\");\n      img.src = \"data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==\";\n      if (presto) {\n        img.width = img.height = 1;\n        cm.display.wrapper.appendChild(img);\n        // Force a relayout, or Opera won't use our image for some obscure reason\n        img._top = img.offsetTop;\n      }\n      e.dataTransfer.setDragImage(img, 0, 0);\n      if (presto) img.parentNode.removeChild(img);\n    }\n  }\n\n  function onDragOver(cm, e) {\n    var pos = posFromMouse(cm, e);\n    if (!pos) return;\n    var frag = document.createDocumentFragment();\n    drawSelectionCursor(cm, pos, frag);\n    if (!cm.display.dragCursor) {\n      cm.display.dragCursor = elt(\"div\", null, \"CodeMirror-cursors CodeMirror-dragcursors\");\n      cm.display.lineSpace.insertBefore(cm.display.dragCursor, cm.display.cursorDiv);\n    }\n    removeChildrenAndAdd(cm.display.dragCursor, frag);\n  }\n\n  function clearDragCursor(cm) {\n    if (cm.display.dragCursor) {\n      cm.display.lineSpace.removeChild(cm.display.dragCursor);\n      cm.display.dragCursor = null;\n    }\n  }\n\n  // SCROLL EVENTS\n\n  // Sync the scrollable area and scrollbars, ensure the viewport\n  // covers the visible area.\n  function setScrollTop(cm, val) {\n    if (Math.abs(cm.doc.scrollTop - val) < 2) return;\n    cm.doc.scrollTop = val;\n    if (!gecko) updateDisplaySimple(cm, {top: val});\n    if (cm.display.scroller.scrollTop != val) cm.display.scroller.scrollTop = val;\n    cm.display.scrollbars.setScrollTop(val);\n    if (gecko) updateDisplaySimple(cm);\n    startWorker(cm, 100);\n  }\n  // Sync scroller and scrollbar, ensure the gutter elements are\n  // aligned.\n  function setScrollLeft(cm, val, isScroller) {\n    if (isScroller ? val == cm.doc.scrollLeft : Math.abs(cm.doc.scrollLeft - val) < 2) return;\n    val = Math.min(val, cm.display.scroller.scrollWidth - cm.display.scroller.clientWidth);\n    cm.doc.scrollLeft = val;\n    alignHorizontally(cm);\n    if (cm.display.scroller.scrollLeft != val) cm.display.scroller.scrollLeft = val;\n    cm.display.scrollbars.setScrollLeft(val);\n  }\n\n  // Since the delta values reported on mouse wheel events are\n  // unstandardized between browsers and even browser versions, and\n  // generally horribly unpredictable, this code starts by measuring\n  // the scroll effect that the first few mouse wheel events have,\n  // and, from that, detects the way it can convert deltas to pixel\n  // offsets afterwards.\n  //\n  // The reason we want to know the amount a wheel event will scroll\n  // is that it gives us a chance to update the display before the\n  // actual scrolling happens, reducing flickering.\n\n  var wheelSamples = 0, wheelPixelsPerUnit = null;\n  // Fill in a browser-detected starting value on browsers where we\n  // know one. These don't have to be accurate -- the result of them\n  // being wrong would just be a slight flicker on the first wheel\n  // scroll (if it is large enough).\n  if (ie) wheelPixelsPerUnit = -.53;\n  else if (gecko) wheelPixelsPerUnit = 15;\n  else if (chrome) wheelPixelsPerUnit = -.7;\n  else if (safari) wheelPixelsPerUnit = -1/3;\n\n  var wheelEventDelta = function(e) {\n    var dx = e.wheelDeltaX, dy = e.wheelDeltaY;\n    if (dx == null && e.detail && e.axis == e.HORIZONTAL_AXIS) dx = e.detail;\n    if (dy == null && e.detail && e.axis == e.VERTICAL_AXIS) dy = e.detail;\n    else if (dy == null) dy = e.wheelDelta;\n    return {x: dx, y: dy};\n  };\n  CodeMirror.wheelEventPixels = function(e) {\n    var delta = wheelEventDelta(e);\n    delta.x *= wheelPixelsPerUnit;\n    delta.y *= wheelPixelsPerUnit;\n    return delta;\n  };\n\n  function onScrollWheel(cm, e) {\n    var delta = wheelEventDelta(e), dx = delta.x, dy = delta.y;\n\n    var display = cm.display, scroll = display.scroller;\n    // Quit if there's nothing to scroll here\n    var canScrollX = scroll.scrollWidth > scroll.clientWidth;\n    var canScrollY = scroll.scrollHeight > scroll.clientHeight;\n    if (!(dx && canScrollX || dy && canScrollY)) return;\n\n    // Webkit browsers on OS X abort momentum scrolls when the target\n    // of the scroll event is removed from the scrollable element.\n    // This hack (see related code in patchDisplay) makes sure the\n    // element is kept around.\n    if (dy && mac && webkit) {\n      outer: for (var cur = e.target, view = display.view; cur != scroll; cur = cur.parentNode) {\n        for (var i = 0; i < view.length; i++) {\n          if (view[i].node == cur) {\n            cm.display.currentWheelTarget = cur;\n            break outer;\n          }\n        }\n      }\n    }\n\n    // On some browsers, horizontal scrolling will cause redraws to\n    // happen before the gutter has been realigned, causing it to\n    // wriggle around in a most unseemly way. When we have an\n    // estimated pixels/delta value, we just handle horizontal\n    // scrolling entirely here. It'll be slightly off from native, but\n    // better than glitching out.\n    if (dx && !gecko && !presto && wheelPixelsPerUnit != null) {\n      if (dy && canScrollY)\n        setScrollTop(cm, Math.max(0, Math.min(scroll.scrollTop + dy * wheelPixelsPerUnit, scroll.scrollHeight - scroll.clientHeight)));\n      setScrollLeft(cm, Math.max(0, Math.min(scroll.scrollLeft + dx * wheelPixelsPerUnit, scroll.scrollWidth - scroll.clientWidth)));\n      // Only prevent default scrolling if vertical scrolling is\n      // actually possible. Otherwise, it causes vertical scroll\n      // jitter on OSX trackpads when deltaX is small and deltaY\n      // is large (issue #3579)\n      if (!dy || (dy && canScrollY))\n        e_preventDefault(e);\n      display.wheelStartX = null; // Abort measurement, if in progress\n      return;\n    }\n\n    // 'Project' the visible viewport to cover the area that is being\n    // scrolled into view (if we know enough to estimate it).\n    if (dy && wheelPixelsPerUnit != null) {\n      var pixels = dy * wheelPixelsPerUnit;\n      var top = cm.doc.scrollTop, bot = top + display.wrapper.clientHeight;\n      if (pixels < 0) top = Math.max(0, top + pixels - 50);\n      else bot = Math.min(cm.doc.height, bot + pixels + 50);\n      updateDisplaySimple(cm, {top: top, bottom: bot});\n    }\n\n    if (wheelSamples < 20) {\n      if (display.wheelStartX == null) {\n        display.wheelStartX = scroll.scrollLeft; display.wheelStartY = scroll.scrollTop;\n        display.wheelDX = dx; display.wheelDY = dy;\n        setTimeout(function() {\n          if (display.wheelStartX == null) return;\n          var movedX = scroll.scrollLeft - display.wheelStartX;\n          var movedY = scroll.scrollTop - display.wheelStartY;\n          var sample = (movedY && display.wheelDY && movedY / display.wheelDY) ||\n            (movedX && display.wheelDX && movedX / display.wheelDX);\n          display.wheelStartX = display.wheelStartY = null;\n          if (!sample) return;\n          wheelPixelsPerUnit = (wheelPixelsPerUnit * wheelSamples + sample) / (wheelSamples + 1);\n          ++wheelSamples;\n        }, 200);\n      } else {\n        display.wheelDX += dx; display.wheelDY += dy;\n      }\n    }\n  }\n\n  // KEY EVENTS\n\n  // Run a handler that was bound to a key.\n  function doHandleBinding(cm, bound, dropShift) {\n    if (typeof bound == \"string\") {\n      bound = commands[bound];\n      if (!bound) return false;\n    }\n    // Ensure previous input has been read, so that the handler sees a\n    // consistent view of the document\n    cm.display.input.ensurePolled();\n    var prevShift = cm.display.shift, done = false;\n    try {\n      if (cm.isReadOnly()) cm.state.suppressEdits = true;\n      if (dropShift) cm.display.shift = false;\n      done = bound(cm) != Pass;\n    } finally {\n      cm.display.shift = prevShift;\n      cm.state.suppressEdits = false;\n    }\n    return done;\n  }\n\n  function lookupKeyForEditor(cm, name, handle) {\n    for (var i = 0; i < cm.state.keyMaps.length; i++) {\n      var result = lookupKey(name, cm.state.keyMaps[i], handle, cm);\n      if (result) return result;\n    }\n    return (cm.options.extraKeys && lookupKey(name, cm.options.extraKeys, handle, cm))\n      || lookupKey(name, cm.options.keyMap, handle, cm);\n  }\n\n  var stopSeq = new Delayed;\n  function dispatchKey(cm, name, e, handle) {\n    var seq = cm.state.keySeq;\n    if (seq) {\n      if (isModifierKey(name)) return \"handled\";\n      stopSeq.set(50, function() {\n        if (cm.state.keySeq == seq) {\n          cm.state.keySeq = null;\n          cm.display.input.reset();\n        }\n      });\n      name = seq + \" \" + name;\n    }\n    var result = lookupKeyForEditor(cm, name, handle);\n\n    if (result == \"multi\")\n      cm.state.keySeq = name;\n    if (result == \"handled\")\n      signalLater(cm, \"keyHandled\", cm, name, e);\n\n    if (result == \"handled\" || result == \"multi\") {\n      e_preventDefault(e);\n      restartBlink(cm);\n    }\n\n    if (seq && !result && /\\'$/.test(name)) {\n      e_preventDefault(e);\n      return true;\n    }\n    return !!result;\n  }\n\n  // Handle a key from the keydown event.\n  function handleKeyBinding(cm, e) {\n    var name = keyName(e, true);\n    if (!name) return false;\n\n    if (e.shiftKey && !cm.state.keySeq) {\n      // First try to resolve full name (including 'Shift-'). Failing\n      // that, see if there is a cursor-motion command (starting with\n      // 'go') bound to the keyname without 'Shift-'.\n      return dispatchKey(cm, \"Shift-\" + name, e, function(b) {return doHandleBinding(cm, b, true);})\n          || dispatchKey(cm, name, e, function(b) {\n               if (typeof b == \"string\" ? /^go[A-Z]/.test(b) : b.motion)\n                 return doHandleBinding(cm, b);\n             });\n    } else {\n      return dispatchKey(cm, name, e, function(b) { return doHandleBinding(cm, b); });\n    }\n  }\n\n  // Handle a key from the keypress event\n  function handleCharBinding(cm, e, ch) {\n    return dispatchKey(cm, \"'\" + ch + \"'\", e,\n                       function(b) { return doHandleBinding(cm, b, true); });\n  }\n\n  var lastStoppedKey = null;\n  function onKeyDown(e) {\n    var cm = this;\n    cm.curOp.focus = activeElt();\n    if (signalDOMEvent(cm, e)) return;\n    // IE does strange things with escape.\n    if (ie && ie_version < 11 && e.keyCode == 27) e.returnValue = false;\n    var code = e.keyCode;\n    cm.display.shift = code == 16 || e.shiftKey;\n    var handled = handleKeyBinding(cm, e);\n    if (presto) {\n      lastStoppedKey = handled ? code : null;\n      // Opera has no cut event... we try to at least catch the key combo\n      if (!handled && code == 88 && !hasCopyEvent && (mac ? e.metaKey : e.ctrlKey))\n        cm.replaceSelection(\"\", null, \"cut\");\n    }\n\n    // Turn mouse into crosshair when Alt is held on Mac.\n    if (code == 18 && !/\\bCodeMirror-crosshair\\b/.test(cm.display.lineDiv.className))\n      showCrossHair(cm);\n  }\n\n  function showCrossHair(cm) {\n    var lineDiv = cm.display.lineDiv;\n    addClass(lineDiv, \"CodeMirror-crosshair\");\n\n    function up(e) {\n      if (e.keyCode == 18 || !e.altKey) {\n        rmClass(lineDiv, \"CodeMirror-crosshair\");\n        off(document, \"keyup\", up);\n        off(document, \"mouseover\", up);\n      }\n    }\n    on(document, \"keyup\", up);\n    on(document, \"mouseover\", up);\n  }\n\n  function onKeyUp(e) {\n    if (e.keyCode == 16) this.doc.sel.shift = false;\n    signalDOMEvent(this, e);\n  }\n\n  function onKeyPress(e) {\n    var cm = this;\n    if (eventInWidget(cm.display, e) || signalDOMEvent(cm, e) || e.ctrlKey && !e.altKey || mac && e.metaKey) return;\n    var keyCode = e.keyCode, charCode = e.charCode;\n    if (presto && keyCode == lastStoppedKey) {lastStoppedKey = null; e_preventDefault(e); return;}\n    if ((presto && (!e.which || e.which < 10)) && handleKeyBinding(cm, e)) return;\n    var ch = String.fromCharCode(charCode == null ? keyCode : charCode);\n    if (handleCharBinding(cm, e, ch)) return;\n    cm.display.input.onKeyPress(e);\n  }\n\n  // FOCUS/BLUR EVENTS\n\n  function delayBlurEvent(cm) {\n    cm.state.delayingBlurEvent = true;\n    setTimeout(function() {\n      if (cm.state.delayingBlurEvent) {\n        cm.state.delayingBlurEvent = false;\n        onBlur(cm);\n      }\n    }, 100);\n  }\n\n  function onFocus(cm) {\n    if (cm.state.delayingBlurEvent) cm.state.delayingBlurEvent = false;\n\n    if (cm.options.readOnly == \"nocursor\") return;\n    if (!cm.state.focused) {\n      signal(cm, \"focus\", cm);\n      cm.state.focused = true;\n      addClass(cm.display.wrapper, \"CodeMirror-focused\");\n      // This test prevents this from firing when a context\n      // menu is closed (since the input reset would kill the\n      // select-all detection hack)\n      if (!cm.curOp && cm.display.selForContextMenu != cm.doc.sel) {\n        cm.display.input.reset();\n        if (webkit) setTimeout(function() { cm.display.input.reset(true); }, 20); // Issue #1730\n      }\n      cm.display.input.receivedFocus();\n    }\n    restartBlink(cm);\n  }\n  function onBlur(cm) {\n    if (cm.state.delayingBlurEvent) return;\n\n    if (cm.state.focused) {\n      signal(cm, \"blur\", cm);\n      cm.state.focused = false;\n      rmClass(cm.display.wrapper, \"CodeMirror-focused\");\n    }\n    clearInterval(cm.display.blinker);\n    setTimeout(function() {if (!cm.state.focused) cm.display.shift = false;}, 150);\n  }\n\n  // CONTEXT MENU HANDLING\n\n  // To make the context menu work, we need to briefly unhide the\n  // textarea (making it as unobtrusive as possible) to let the\n  // right-click take effect on it.\n  function onContextMenu(cm, e) {\n    if (eventInWidget(cm.display, e) || contextMenuInGutter(cm, e)) return;\n    if (signalDOMEvent(cm, e, \"contextmenu\")) return;\n    cm.display.input.onContextMenu(e);\n  }\n\n  function contextMenuInGutter(cm, e) {\n    if (!hasHandler(cm, \"gutterContextMenu\")) return false;\n    return gutterEvent(cm, e, \"gutterContextMenu\", false);\n  }\n\n  // UPDATING\n\n  // Compute the position of the end of a change (its 'to' property\n  // refers to the pre-change end).\n  var changeEnd = CodeMirror.changeEnd = function(change) {\n    if (!change.text) return change.to;\n    return Pos(change.from.line + change.text.length - 1,\n               lst(change.text).length + (change.text.length == 1 ? change.from.ch : 0));\n  };\n\n  // Adjust a position to refer to the post-change position of the\n  // same text, or the end of the change if the change covers it.\n  function adjustForChange(pos, change) {\n    if (cmp(pos, change.from) < 0) return pos;\n    if (cmp(pos, change.to) <= 0) return changeEnd(change);\n\n    var line = pos.line + change.text.length - (change.to.line - change.from.line) - 1, ch = pos.ch;\n    if (pos.line == change.to.line) ch += changeEnd(change).ch - change.to.ch;\n    return Pos(line, ch);\n  }\n\n  function computeSelAfterChange(doc, change) {\n    var out = [];\n    for (var i = 0; i < doc.sel.ranges.length; i++) {\n      var range = doc.sel.ranges[i];\n      out.push(new Range(adjustForChange(range.anchor, change),\n                         adjustForChange(range.head, change)));\n    }\n    return normalizeSelection(out, doc.sel.primIndex);\n  }\n\n  function offsetPos(pos, old, nw) {\n    if (pos.line == old.line)\n      return Pos(nw.line, pos.ch - old.ch + nw.ch);\n    else\n      return Pos(nw.line + (pos.line - old.line), pos.ch);\n  }\n\n  // Used by replaceSelections to allow moving the selection to the\n  // start or around the replaced test. Hint may be \"start\" or \"around\".\n  function computeReplacedSel(doc, changes, hint) {\n    var out = [];\n    var oldPrev = Pos(doc.first, 0), newPrev = oldPrev;\n    for (var i = 0; i < changes.length; i++) {\n      var change = changes[i];\n      var from = offsetPos(change.from, oldPrev, newPrev);\n      var to = offsetPos(changeEnd(change), oldPrev, newPrev);\n      oldPrev = change.to;\n      newPrev = to;\n      if (hint == \"around\") {\n        var range = doc.sel.ranges[i], inv = cmp(range.head, range.anchor) < 0;\n        out[i] = new Range(inv ? to : from, inv ? from : to);\n      } else {\n        out[i] = new Range(from, from);\n      }\n    }\n    return new Selection(out, doc.sel.primIndex);\n  }\n\n  // Allow \"beforeChange\" event handlers to influence a change\n  function filterChange(doc, change, update) {\n    var obj = {\n      canceled: false,\n      from: change.from,\n      to: change.to,\n      text: change.text,\n      origin: change.origin,\n      cancel: function() { this.canceled = true; }\n    };\n    if (update) obj.update = function(from, to, text, origin) {\n      if (from) this.from = clipPos(doc, from);\n      if (to) this.to = clipPos(doc, to);\n      if (text) this.text = text;\n      if (origin !== undefined) this.origin = origin;\n    };\n    signal(doc, \"beforeChange\", doc, obj);\n    if (doc.cm) signal(doc.cm, \"beforeChange\", doc.cm, obj);\n\n    if (obj.canceled) return null;\n    return {from: obj.from, to: obj.to, text: obj.text, origin: obj.origin};\n  }\n\n  // Apply a change to a document, and add it to the document's\n  // history, and propagating it to all linked documents.\n  function makeChange(doc, change, ignoreReadOnly) {\n    if (doc.cm) {\n      if (!doc.cm.curOp) return operation(doc.cm, makeChange)(doc, change, ignoreReadOnly);\n      if (doc.cm.state.suppressEdits) return;\n    }\n\n    if (hasHandler(doc, \"beforeChange\") || doc.cm && hasHandler(doc.cm, \"beforeChange\")) {\n      change = filterChange(doc, change, true);\n      if (!change) return;\n    }\n\n    // Possibly split or suppress the update based on the presence\n    // of read-only spans in its range.\n    var split = sawReadOnlySpans && !ignoreReadOnly && removeReadOnlyRanges(doc, change.from, change.to);\n    if (split) {\n      for (var i = split.length - 1; i >= 0; --i)\n        makeChangeInner(doc, {from: split[i].from, to: split[i].to, text: i ? [\"\"] : change.text});\n    } else {\n      makeChangeInner(doc, change);\n    }\n  }\n\n  function makeChangeInner(doc, change) {\n    if (change.text.length == 1 && change.text[0] == \"\" && cmp(change.from, change.to) == 0) return;\n    var selAfter = computeSelAfterChange(doc, change);\n    addChangeToHistory(doc, change, selAfter, doc.cm ? doc.cm.curOp.id : NaN);\n\n    makeChangeSingleDoc(doc, change, selAfter, stretchSpansOverChange(doc, change));\n    var rebased = [];\n\n    linkedDocs(doc, function(doc, sharedHist) {\n      if (!sharedHist && indexOf(rebased, doc.history) == -1) {\n        rebaseHist(doc.history, change);\n        rebased.push(doc.history);\n      }\n      makeChangeSingleDoc(doc, change, null, stretchSpansOverChange(doc, change));\n    });\n  }\n\n  // Revert a change stored in a document's history.\n  function makeChangeFromHistory(doc, type, allowSelectionOnly) {\n    if (doc.cm && doc.cm.state.suppressEdits) return;\n\n    var hist = doc.history, event, selAfter = doc.sel;\n    var source = type == \"undo\" ? hist.done : hist.undone, dest = type == \"undo\" ? hist.undone : hist.done;\n\n    // Verify that there is a useable event (so that ctrl-z won't\n    // needlessly clear selection events)\n    for (var i = 0; i < source.length; i++) {\n      event = source[i];\n      if (allowSelectionOnly ? event.ranges && !event.equals(doc.sel) : !event.ranges)\n        break;\n    }\n    if (i == source.length) return;\n    hist.lastOrigin = hist.lastSelOrigin = null;\n\n    for (;;) {\n      event = source.pop();\n      if (event.ranges) {\n        pushSelectionToHistory(event, dest);\n        if (allowSelectionOnly && !event.equals(doc.sel)) {\n          setSelection(doc, event, {clearRedo: false});\n          return;\n        }\n        selAfter = event;\n      }\n      else break;\n    }\n\n    // Build up a reverse change object to add to the opposite history\n    // stack (redo when undoing, and vice versa).\n    var antiChanges = [];\n    pushSelectionToHistory(selAfter, dest);\n    dest.push({changes: antiChanges, generation: hist.generation});\n    hist.generation = event.generation || ++hist.maxGeneration;\n\n    var filter = hasHandler(doc, \"beforeChange\") || doc.cm && hasHandler(doc.cm, \"beforeChange\");\n\n    for (var i = event.changes.length - 1; i >= 0; --i) {\n      var change = event.changes[i];\n      change.origin = type;\n      if (filter && !filterChange(doc, change, false)) {\n        source.length = 0;\n        return;\n      }\n\n      antiChanges.push(historyChangeFromChange(doc, change));\n\n      var after = i ? computeSelAfterChange(doc, change) : lst(source);\n      makeChangeSingleDoc(doc, change, after, mergeOldSpans(doc, change));\n      if (!i && doc.cm) doc.cm.scrollIntoView({from: change.from, to: changeEnd(change)});\n      var rebased = [];\n\n      // Propagate to the linked documents\n      linkedDocs(doc, function(doc, sharedHist) {\n        if (!sharedHist && indexOf(rebased, doc.history) == -1) {\n          rebaseHist(doc.history, change);\n          rebased.push(doc.history);\n        }\n        makeChangeSingleDoc(doc, change, null, mergeOldSpans(doc, change));\n      });\n    }\n  }\n\n  // Sub-views need their line numbers shifted when text is added\n  // above or below them in the parent document.\n  function shiftDoc(doc, distance) {\n    if (distance == 0) return;\n    doc.first += distance;\n    doc.sel = new Selection(map(doc.sel.ranges, function(range) {\n      return new Range(Pos(range.anchor.line + distance, range.anchor.ch),\n                       Pos(range.head.line + distance, range.head.ch));\n    }), doc.sel.primIndex);\n    if (doc.cm) {\n      regChange(doc.cm, doc.first, doc.first - distance, distance);\n      for (var d = doc.cm.display, l = d.viewFrom; l < d.viewTo; l++)\n        regLineChange(doc.cm, l, \"gutter\");\n    }\n  }\n\n  // More lower-level change function, handling only a single document\n  // (not linked ones).\n  function makeChangeSingleDoc(doc, change, selAfter, spans) {\n    if (doc.cm && !doc.cm.curOp)\n      return operation(doc.cm, makeChangeSingleDoc)(doc, change, selAfter, spans);\n\n    if (change.to.line < doc.first) {\n      shiftDoc(doc, change.text.length - 1 - (change.to.line - change.from.line));\n      return;\n    }\n    if (change.from.line > doc.lastLine()) return;\n\n    // Clip the change to the size of this doc\n    if (change.from.line < doc.first) {\n      var shift = change.text.length - 1 - (doc.first - change.from.line);\n      shiftDoc(doc, shift);\n      change = {from: Pos(doc.first, 0), to: Pos(change.to.line + shift, change.to.ch),\n                text: [lst(change.text)], origin: change.origin};\n    }\n    var last = doc.lastLine();\n    if (change.to.line > last) {\n      change = {from: change.from, to: Pos(last, getLine(doc, last).text.length),\n                text: [change.text[0]], origin: change.origin};\n    }\n\n    change.removed = getBetween(doc, change.from, change.to);\n\n    if (!selAfter) selAfter = computeSelAfterChange(doc, change);\n    if (doc.cm) makeChangeSingleDocInEditor(doc.cm, change, spans);\n    else updateDoc(doc, change, spans);\n    setSelectionNoUndo(doc, selAfter, sel_dontScroll);\n  }\n\n  // Handle the interaction of a change to a document with the editor\n  // that this document is part of.\n  function makeChangeSingleDocInEditor(cm, change, spans) {\n    var doc = cm.doc, display = cm.display, from = change.from, to = change.to;\n\n    var recomputeMaxLength = false, checkWidthStart = from.line;\n    if (!cm.options.lineWrapping) {\n      checkWidthStart = lineNo(visualLine(getLine(doc, from.line)));\n      doc.iter(checkWidthStart, to.line + 1, function(line) {\n        if (line == display.maxLine) {\n          recomputeMaxLength = true;\n          return true;\n        }\n      });\n    }\n\n    if (doc.sel.contains(change.from, change.to) > -1)\n      signalCursorActivity(cm);\n\n    updateDoc(doc, change, spans, estimateHeight(cm));\n\n    if (!cm.options.lineWrapping) {\n      doc.iter(checkWidthStart, from.line + change.text.length, function(line) {\n        var len = lineLength(line);\n        if (len > display.maxLineLength) {\n          display.maxLine = line;\n          display.maxLineLength = len;\n          display.maxLineChanged = true;\n          recomputeMaxLength = false;\n        }\n      });\n      if (recomputeMaxLength) cm.curOp.updateMaxLine = true;\n    }\n\n    // Adjust frontier, schedule worker\n    doc.frontier = Math.min(doc.frontier, from.line);\n    startWorker(cm, 400);\n\n    var lendiff = change.text.length - (to.line - from.line) - 1;\n    // Remember that these lines changed, for updating the display\n    if (change.full)\n      regChange(cm);\n    else if (from.line == to.line && change.text.length == 1 && !isWholeLineUpdate(cm.doc, change))\n      regLineChange(cm, from.line, \"text\");\n    else\n      regChange(cm, from.line, to.line + 1, lendiff);\n\n    var changesHandler = hasHandler(cm, \"changes\"), changeHandler = hasHandler(cm, \"change\");\n    if (changeHandler || changesHandler) {\n      var obj = {\n        from: from, to: to,\n        text: change.text,\n        removed: change.removed,\n        origin: change.origin\n      };\n      if (changeHandler) signalLater(cm, \"change\", cm, obj);\n      if (changesHandler) (cm.curOp.changeObjs || (cm.curOp.changeObjs = [])).push(obj);\n    }\n    cm.display.selForContextMenu = null;\n  }\n\n  function replaceRange(doc, code, from, to, origin) {\n    if (!to) to = from;\n    if (cmp(to, from) < 0) { var tmp = to; to = from; from = tmp; }\n    if (typeof code == \"string\") code = doc.splitLines(code);\n    makeChange(doc, {from: from, to: to, text: code, origin: origin});\n  }\n\n  // SCROLLING THINGS INTO VIEW\n\n  // If an editor sits on the top or bottom of the window, partially\n  // scrolled out of view, this ensures that the cursor is visible.\n  function maybeScrollWindow(cm, coords) {\n    if (signalDOMEvent(cm, \"scrollCursorIntoView\")) return;\n\n    var display = cm.display, box = display.sizer.getBoundingClientRect(), doScroll = null;\n    if (coords.top + box.top < 0) doScroll = true;\n    else if (coords.bottom + box.top > (window.innerHeight || document.documentElement.clientHeight)) doScroll = false;\n    if (doScroll != null && !phantom) {\n      var scrollNode = elt(\"div\", \"\\u200b\", null, \"position: absolute; top: \" +\n                           (coords.top - display.viewOffset - paddingTop(cm.display)) + \"px; height: \" +\n                           (coords.bottom - coords.top + scrollGap(cm) + display.barHeight) + \"px; left: \" +\n                           coords.left + \"px; width: 2px;\");\n      cm.display.lineSpace.appendChild(scrollNode);\n      scrollNode.scrollIntoView(doScroll);\n      cm.display.lineSpace.removeChild(scrollNode);\n    }\n  }\n\n  // Scroll a given position into view (immediately), verifying that\n  // it actually became visible (as line heights are accurately\n  // measured, the position of something may 'drift' during drawing).\n  function scrollPosIntoView(cm, pos, end, margin) {\n    if (margin == null) margin = 0;\n    for (var limit = 0; limit < 5; limit++) {\n      var changed = false, coords = cursorCoords(cm, pos);\n      var endCoords = !end || end == pos ? coords : cursorCoords(cm, end);\n      var scrollPos = calculateScrollPos(cm, Math.min(coords.left, endCoords.left),\n                                         Math.min(coords.top, endCoords.top) - margin,\n                                         Math.max(coords.left, endCoords.left),\n                                         Math.max(coords.bottom, endCoords.bottom) + margin);\n      var startTop = cm.doc.scrollTop, startLeft = cm.doc.scrollLeft;\n      if (scrollPos.scrollTop != null) {\n        setScrollTop(cm, scrollPos.scrollTop);\n        if (Math.abs(cm.doc.scrollTop - startTop) > 1) changed = true;\n      }\n      if (scrollPos.scrollLeft != null) {\n        setScrollLeft(cm, scrollPos.scrollLeft);\n        if (Math.abs(cm.doc.scrollLeft - startLeft) > 1) changed = true;\n      }\n      if (!changed) break;\n    }\n    return coords;\n  }\n\n  // Scroll a given set of coordinates into view (immediately).\n  function scrollIntoView(cm, x1, y1, x2, y2) {\n    var scrollPos = calculateScrollPos(cm, x1, y1, x2, y2);\n    if (scrollPos.scrollTop != null) setScrollTop(cm, scrollPos.scrollTop);\n    if (scrollPos.scrollLeft != null) setScrollLeft(cm, scrollPos.scrollLeft);\n  }\n\n  // Calculate a new scroll position needed to scroll the given\n  // rectangle into view. Returns an object with scrollTop and\n  // scrollLeft properties. When these are undefined, the\n  // vertical/horizontal position does not need to be adjusted.\n  function calculateScrollPos(cm, x1, y1, x2, y2) {\n    var display = cm.display, snapMargin = textHeight(cm.display);\n    if (y1 < 0) y1 = 0;\n    var screentop = cm.curOp && cm.curOp.scrollTop != null ? cm.curOp.scrollTop : display.scroller.scrollTop;\n    var screen = displayHeight(cm), result = {};\n    if (y2 - y1 > screen) y2 = y1 + screen;\n    var docBottom = cm.doc.height + paddingVert(display);\n    var atTop = y1 < snapMargin, atBottom = y2 > docBottom - snapMargin;\n    if (y1 < screentop) {\n      result.scrollTop = atTop ? 0 : y1;\n    } else if (y2 > screentop + screen) {\n      var newTop = Math.min(y1, (atBottom ? docBottom : y2) - screen);\n      if (newTop != screentop) result.scrollTop = newTop;\n    }\n\n    var screenleft = cm.curOp && cm.curOp.scrollLeft != null ? cm.curOp.scrollLeft : display.scroller.scrollLeft;\n    var screenw = displayWidth(cm) - (cm.options.fixedGutter ? display.gutters.offsetWidth : 0);\n    var tooWide = x2 - x1 > screenw;\n    if (tooWide) x2 = x1 + screenw;\n    if (x1 < 10)\n      result.scrollLeft = 0;\n    else if (x1 < screenleft)\n      result.scrollLeft = Math.max(0, x1 - (tooWide ? 0 : 10));\n    else if (x2 > screenw + screenleft - 3)\n      result.scrollLeft = x2 + (tooWide ? 0 : 10) - screenw;\n    return result;\n  }\n\n  // Store a relative adjustment to the scroll position in the current\n  // operation (to be applied when the operation finishes).\n  function addToScrollPos(cm, left, top) {\n    if (left != null || top != null) resolveScrollToPos(cm);\n    if (left != null)\n      cm.curOp.scrollLeft = (cm.curOp.scrollLeft == null ? cm.doc.scrollLeft : cm.curOp.scrollLeft) + left;\n    if (top != null)\n      cm.curOp.scrollTop = (cm.curOp.scrollTop == null ? cm.doc.scrollTop : cm.curOp.scrollTop) + top;\n  }\n\n  // Make sure that at the end of the operation the current cursor is\n  // shown.\n  function ensureCursorVisible(cm) {\n    resolveScrollToPos(cm);\n    var cur = cm.getCursor(), from = cur, to = cur;\n    if (!cm.options.lineWrapping) {\n      from = cur.ch ? Pos(cur.line, cur.ch - 1) : cur;\n      to = Pos(cur.line, cur.ch + 1);\n    }\n    cm.curOp.scrollToPos = {from: from, to: to, margin: cm.options.cursorScrollMargin, isCursor: true};\n  }\n\n  // When an operation has its scrollToPos property set, and another\n  // scroll action is applied before the end of the operation, this\n  // 'simulates' scrolling that position into view in a cheap way, so\n  // that the effect of intermediate scroll commands is not ignored.\n  function resolveScrollToPos(cm) {\n    var range = cm.curOp.scrollToPos;\n    if (range) {\n      cm.curOp.scrollToPos = null;\n      var from = estimateCoords(cm, range.from), to = estimateCoords(cm, range.to);\n      var sPos = calculateScrollPos(cm, Math.min(from.left, to.left),\n                                    Math.min(from.top, to.top) - range.margin,\n                                    Math.max(from.right, to.right),\n                                    Math.max(from.bottom, to.bottom) + range.margin);\n      cm.scrollTo(sPos.scrollLeft, sPos.scrollTop);\n    }\n  }\n\n  // API UTILITIES\n\n  // Indent the given line. The how parameter can be \"smart\",\n  // \"add\"/null, \"subtract\", or \"prev\". When aggressive is false\n  // (typically set to true for forced single-line indents), empty\n  // lines are not indented, and places where the mode returns Pass\n  // are left alone.\n  function indentLine(cm, n, how, aggressive) {\n    var doc = cm.doc, state;\n    if (how == null) how = \"add\";\n    if (how == \"smart\") {\n      // Fall back to \"prev\" when the mode doesn't have an indentation\n      // method.\n      if (!doc.mode.indent) how = \"prev\";\n      else state = getStateBefore(cm, n);\n    }\n\n    var tabSize = cm.options.tabSize;\n    var line = getLine(doc, n), curSpace = countColumn(line.text, null, tabSize);\n    if (line.stateAfter) line.stateAfter = null;\n    var curSpaceString = line.text.match(/^\\s*/)[0], indentation;\n    if (!aggressive && !/\\S/.test(line.text)) {\n      indentation = 0;\n      how = \"not\";\n    } else if (how == \"smart\") {\n      indentation = doc.mode.indent(state, line.text.slice(curSpaceString.length), line.text);\n      if (indentation == Pass || indentation > 150) {\n        if (!aggressive) return;\n        how = \"prev\";\n      }\n    }\n    if (how == \"prev\") {\n      if (n > doc.first) indentation = countColumn(getLine(doc, n-1).text, null, tabSize);\n      else indentation = 0;\n    } else if (how == \"add\") {\n      indentation = curSpace + cm.options.indentUnit;\n    } else if (how == \"subtract\") {\n      indentation = curSpace - cm.options.indentUnit;\n    } else if (typeof how == \"number\") {\n      indentation = curSpace + how;\n    }\n    indentation = Math.max(0, indentation);\n\n    var indentString = \"\", pos = 0;\n    if (cm.options.indentWithTabs)\n      for (var i = Math.floor(indentation / tabSize); i; --i) {pos += tabSize; indentString += \"\\t\";}\n    if (pos < indentation) indentString += spaceStr(indentation - pos);\n\n    if (indentString != curSpaceString) {\n      replaceRange(doc, indentString, Pos(n, 0), Pos(n, curSpaceString.length), \"+input\");\n      line.stateAfter = null;\n      return true;\n    } else {\n      // Ensure that, if the cursor was in the whitespace at the start\n      // of the line, it is moved to the end of that space.\n      for (var i = 0; i < doc.sel.ranges.length; i++) {\n        var range = doc.sel.ranges[i];\n        if (range.head.line == n && range.head.ch < curSpaceString.length) {\n          var pos = Pos(n, curSpaceString.length);\n          replaceOneSelection(doc, i, new Range(pos, pos));\n          break;\n        }\n      }\n    }\n  }\n\n  // Utility for applying a change to a line by handle or number,\n  // returning the number and optionally registering the line as\n  // changed.\n  function changeLine(doc, handle, changeType, op) {\n    var no = handle, line = handle;\n    if (typeof handle == \"number\") line = getLine(doc, clipLine(doc, handle));\n    else no = lineNo(handle);\n    if (no == null) return null;\n    if (op(line, no) && doc.cm) regLineChange(doc.cm, no, changeType);\n    return line;\n  }\n\n  // Helper for deleting text near the selection(s), used to implement\n  // backspace, delete, and similar functionality.\n  function deleteNearSelection(cm, compute) {\n    var ranges = cm.doc.sel.ranges, kill = [];\n    // Build up a set of ranges to kill first, merging overlapping\n    // ranges.\n    for (var i = 0; i < ranges.length; i++) {\n      var toKill = compute(ranges[i]);\n      while (kill.length && cmp(toKill.from, lst(kill).to) <= 0) {\n        var replaced = kill.pop();\n        if (cmp(replaced.from, toKill.from) < 0) {\n          toKill.from = replaced.from;\n          break;\n        }\n      }\n      kill.push(toKill);\n    }\n    // Next, remove those actual ranges.\n    runInOp(cm, function() {\n      for (var i = kill.length - 1; i >= 0; i--)\n        replaceRange(cm.doc, \"\", kill[i].from, kill[i].to, \"+delete\");\n      ensureCursorVisible(cm);\n    });\n  }\n\n  // Used for horizontal relative motion. Dir is -1 or 1 (left or\n  // right), unit can be \"char\", \"column\" (like char, but doesn't\n  // cross line boundaries), \"word\" (across next word), or \"group\" (to\n  // the start of next group of word or non-word-non-whitespace\n  // chars). The visually param controls whether, in right-to-left\n  // text, direction 1 means to move towards the next index in the\n  // string, or towards the character to the right of the current\n  // position. The resulting position will have a hitSide=true\n  // property if it reached the end of the document.\n  function findPosH(doc, pos, dir, unit, visually) {\n    var line = pos.line, ch = pos.ch, origDir = dir;\n    var lineObj = getLine(doc, line);\n    function findNextLine() {\n      var l = line + dir;\n      if (l < doc.first || l >= doc.first + doc.size) return false\n      line = l;\n      return lineObj = getLine(doc, l);\n    }\n    function moveOnce(boundToLine) {\n      var next = (visually ? moveVisually : moveLogically)(lineObj, ch, dir, true);\n      if (next == null) {\n        if (!boundToLine && findNextLine()) {\n          if (visually) ch = (dir < 0 ? lineRight : lineLeft)(lineObj);\n          else ch = dir < 0 ? lineObj.text.length : 0;\n        } else return false\n      } else ch = next;\n      return true;\n    }\n\n    if (unit == \"char\") {\n      moveOnce()\n    } else if (unit == \"column\") {\n      moveOnce(true)\n    } else if (unit == \"word\" || unit == \"group\") {\n      var sawType = null, group = unit == \"group\";\n      var helper = doc.cm && doc.cm.getHelper(pos, \"wordChars\");\n      for (var first = true;; first = false) {\n        if (dir < 0 && !moveOnce(!first)) break;\n        var cur = lineObj.text.charAt(ch) || \"\\n\";\n        var type = isWordChar(cur, helper) ? \"w\"\n          : group && cur == \"\\n\" ? \"n\"\n          : !group || /\\s/.test(cur) ? null\n          : \"p\";\n        if (group && !first && !type) type = \"s\";\n        if (sawType && sawType != type) {\n          if (dir < 0) {dir = 1; moveOnce();}\n          break;\n        }\n\n        if (type) sawType = type;\n        if (dir > 0 && !moveOnce(!first)) break;\n      }\n    }\n    var result = skipAtomic(doc, Pos(line, ch), pos, origDir, true);\n    if (!cmp(pos, result)) result.hitSide = true;\n    return result;\n  }\n\n  // For relative vertical movement. Dir may be -1 or 1. Unit can be\n  // \"page\" or \"line\". The resulting position will have a hitSide=true\n  // property if it reached the end of the document.\n  function findPosV(cm, pos, dir, unit) {\n    var doc = cm.doc, x = pos.left, y;\n    if (unit == \"page\") {\n      var pageSize = Math.min(cm.display.wrapper.clientHeight, window.innerHeight || document.documentElement.clientHeight);\n      y = pos.top + dir * (pageSize - (dir < 0 ? 1.5 : .5) * textHeight(cm.display));\n    } else if (unit == \"line\") {\n      y = dir > 0 ? pos.bottom + 3 : pos.top - 3;\n    }\n    for (;;) {\n      var target = coordsChar(cm, x, y);\n      if (!target.outside) break;\n      if (dir < 0 ? y <= 0 : y >= doc.height) { target.hitSide = true; break; }\n      y += dir * 5;\n    }\n    return target;\n  }\n\n  // EDITOR METHODS\n\n  // The publicly visible API. Note that methodOp(f) means\n  // 'wrap f in an operation, performed on its `this` parameter'.\n\n  // This is not the complete set of editor methods. Most of the\n  // methods defined on the Doc type are also injected into\n  // CodeMirror.prototype, for backwards compatibility and\n  // convenience.\n\n  CodeMirror.prototype = {\n    constructor: CodeMirror,\n    focus: function(){window.focus(); this.display.input.focus();},\n\n    setOption: function(option, value) {\n      var options = this.options, old = options[option];\n      if (options[option] == value && option != \"mode\") return;\n      options[option] = value;\n      if (optionHandlers.hasOwnProperty(option))\n        operation(this, optionHandlers[option])(this, value, old);\n    },\n\n    getOption: function(option) {return this.options[option];},\n    getDoc: function() {return this.doc;},\n\n    addKeyMap: function(map, bottom) {\n      this.state.keyMaps[bottom ? \"push\" : \"unshift\"](getKeyMap(map));\n    },\n    removeKeyMap: function(map) {\n      var maps = this.state.keyMaps;\n      for (var i = 0; i < maps.length; ++i)\n        if (maps[i] == map || maps[i].name == map) {\n          maps.splice(i, 1);\n          return true;\n        }\n    },\n\n    addOverlay: methodOp(function(spec, options) {\n      var mode = spec.token ? spec : CodeMirror.getMode(this.options, spec);\n      if (mode.startState) throw new Error(\"Overlays may not be stateful.\");\n      this.state.overlays.push({mode: mode, modeSpec: spec, opaque: options && options.opaque});\n      this.state.modeGen++;\n      regChange(this);\n    }),\n    removeOverlay: methodOp(function(spec) {\n      var overlays = this.state.overlays;\n      for (var i = 0; i < overlays.length; ++i) {\n        var cur = overlays[i].modeSpec;\n        if (cur == spec || typeof spec == \"string\" && cur.name == spec) {\n          overlays.splice(i, 1);\n          this.state.modeGen++;\n          regChange(this);\n          return;\n        }\n      }\n    }),\n\n    indentLine: methodOp(function(n, dir, aggressive) {\n      if (typeof dir != \"string\" && typeof dir != \"number\") {\n        if (dir == null) dir = this.options.smartIndent ? \"smart\" : \"prev\";\n        else dir = dir ? \"add\" : \"subtract\";\n      }\n      if (isLine(this.doc, n)) indentLine(this, n, dir, aggressive);\n    }),\n    indentSelection: methodOp(function(how) {\n      var ranges = this.doc.sel.ranges, end = -1;\n      for (var i = 0; i < ranges.length; i++) {\n        var range = ranges[i];\n        if (!range.empty()) {\n          var from = range.from(), to = range.to();\n          var start = Math.max(end, from.line);\n          end = Math.min(this.lastLine(), to.line - (to.ch ? 0 : 1)) + 1;\n          for (var j = start; j < end; ++j)\n            indentLine(this, j, how);\n          var newRanges = this.doc.sel.ranges;\n          if (from.ch == 0 && ranges.length == newRanges.length && newRanges[i].from().ch > 0)\n            replaceOneSelection(this.doc, i, new Range(from, newRanges[i].to()), sel_dontScroll);\n        } else if (range.head.line > end) {\n          indentLine(this, range.head.line, how, true);\n          end = range.head.line;\n          if (i == this.doc.sel.primIndex) ensureCursorVisible(this);\n        }\n      }\n    }),\n\n    // Fetch the parser token for a given character. Useful for hacks\n    // that want to inspect the mode state (say, for completion).\n    getTokenAt: function(pos, precise) {\n      return takeToken(this, pos, precise);\n    },\n\n    getLineTokens: function(line, precise) {\n      return takeToken(this, Pos(line), precise, true);\n    },\n\n    getTokenTypeAt: function(pos) {\n      pos = clipPos(this.doc, pos);\n      var styles = getLineStyles(this, getLine(this.doc, pos.line));\n      var before = 0, after = (styles.length - 1) / 2, ch = pos.ch;\n      var type;\n      if (ch == 0) type = styles[2];\n      else for (;;) {\n        var mid = (before + after) >> 1;\n        if ((mid ? styles[mid * 2 - 1] : 0) >= ch) after = mid;\n        else if (styles[mid * 2 + 1] < ch) before = mid + 1;\n        else { type = styles[mid * 2 + 2]; break; }\n      }\n      var cut = type ? type.indexOf(\"cm-overlay \") : -1;\n      return cut < 0 ? type : cut == 0 ? null : type.slice(0, cut - 1);\n    },\n\n    getModeAt: function(pos) {\n      var mode = this.doc.mode;\n      if (!mode.innerMode) return mode;\n      return CodeMirror.innerMode(mode, this.getTokenAt(pos).state).mode;\n    },\n\n    getHelper: function(pos, type) {\n      return this.getHelpers(pos, type)[0];\n    },\n\n    getHelpers: function(pos, type) {\n      var found = [];\n      if (!helpers.hasOwnProperty(type)) return found;\n      var help = helpers[type], mode = this.getModeAt(pos);\n      if (typeof mode[type] == \"string\") {\n        if (help[mode[type]]) found.push(help[mode[type]]);\n      } else if (mode[type]) {\n        for (var i = 0; i < mode[type].length; i++) {\n          var val = help[mode[type][i]];\n          if (val) found.push(val);\n        }\n      } else if (mode.helperType && help[mode.helperType]) {\n        found.push(help[mode.helperType]);\n      } else if (help[mode.name]) {\n        found.push(help[mode.name]);\n      }\n      for (var i = 0; i < help._global.length; i++) {\n        var cur = help._global[i];\n        if (cur.pred(mode, this) && indexOf(found, cur.val) == -1)\n          found.push(cur.val);\n      }\n      return found;\n    },\n\n    getStateAfter: function(line, precise) {\n      var doc = this.doc;\n      line = clipLine(doc, line == null ? doc.first + doc.size - 1: line);\n      return getStateBefore(this, line + 1, precise);\n    },\n\n    cursorCoords: function(start, mode) {\n      var pos, range = this.doc.sel.primary();\n      if (start == null) pos = range.head;\n      else if (typeof start == \"object\") pos = clipPos(this.doc, start);\n      else pos = start ? range.from() : range.to();\n      return cursorCoords(this, pos, mode || \"page\");\n    },\n\n    charCoords: function(pos, mode) {\n      return charCoords(this, clipPos(this.doc, pos), mode || \"page\");\n    },\n\n    coordsChar: function(coords, mode) {\n      coords = fromCoordSystem(this, coords, mode || \"page\");\n      return coordsChar(this, coords.left, coords.top);\n    },\n\n    lineAtHeight: function(height, mode) {\n      height = fromCoordSystem(this, {top: height, left: 0}, mode || \"page\").top;\n      return lineAtHeight(this.doc, height + this.display.viewOffset);\n    },\n    heightAtLine: function(line, mode) {\n      var end = false, lineObj;\n      if (typeof line == \"number\") {\n        var last = this.doc.first + this.doc.size - 1;\n        if (line < this.doc.first) line = this.doc.first;\n        else if (line > last) { line = last; end = true; }\n        lineObj = getLine(this.doc, line);\n      } else {\n        lineObj = line;\n      }\n      return intoCoordSystem(this, lineObj, {top: 0, left: 0}, mode || \"page\").top +\n        (end ? this.doc.height - heightAtLine(lineObj) : 0);\n    },\n\n    defaultTextHeight: function() { return textHeight(this.display); },\n    defaultCharWidth: function() { return charWidth(this.display); },\n\n    setGutterMarker: methodOp(function(line, gutterID, value) {\n      return changeLine(this.doc, line, \"gutter\", function(line) {\n        var markers = line.gutterMarkers || (line.gutterMarkers = {});\n        markers[gutterID] = value;\n        if (!value && isEmpty(markers)) line.gutterMarkers = null;\n        return true;\n      });\n    }),\n\n    clearGutter: methodOp(function(gutterID) {\n      var cm = this, doc = cm.doc, i = doc.first;\n      doc.iter(function(line) {\n        if (line.gutterMarkers && line.gutterMarkers[gutterID]) {\n          line.gutterMarkers[gutterID] = null;\n          regLineChange(cm, i, \"gutter\");\n          if (isEmpty(line.gutterMarkers)) line.gutterMarkers = null;\n        }\n        ++i;\n      });\n    }),\n\n    lineInfo: function(line) {\n      if (typeof line == \"number\") {\n        if (!isLine(this.doc, line)) return null;\n        var n = line;\n        line = getLine(this.doc, line);\n        if (!line) return null;\n      } else {\n        var n = lineNo(line);\n        if (n == null) return null;\n      }\n      return {line: n, handle: line, text: line.text, gutterMarkers: line.gutterMarkers,\n              textClass: line.textClass, bgClass: line.bgClass, wrapClass: line.wrapClass,\n              widgets: line.widgets};\n    },\n\n    getViewport: function() { return {from: this.display.viewFrom, to: this.display.viewTo};},\n\n    addWidget: function(pos, node, scroll, vert, horiz) {\n      var display = this.display;\n      pos = cursorCoords(this, clipPos(this.doc, pos));\n      var top = pos.bottom, left = pos.left;\n      node.style.position = \"absolute\";\n      node.setAttribute(\"cm-ignore-events\", \"true\");\n      this.display.input.setUneditable(node);\n      display.sizer.appendChild(node);\n      if (vert == \"over\") {\n        top = pos.top;\n      } else if (vert == \"above\" || vert == \"near\") {\n        var vspace = Math.max(display.wrapper.clientHeight, this.doc.height),\n        hspace = Math.max(display.sizer.clientWidth, display.lineSpace.clientWidth);\n        // Default to positioning above (if specified and possible); otherwise default to positioning below\n        if ((vert == 'above' || pos.bottom + node.offsetHeight > vspace) && pos.top > node.offsetHeight)\n          top = pos.top - node.offsetHeight;\n        else if (pos.bottom + node.offsetHeight <= vspace)\n          top = pos.bottom;\n        if (left + node.offsetWidth > hspace)\n          left = hspace - node.offsetWidth;\n      }\n      node.style.top = top + \"px\";\n      node.style.left = node.style.right = \"\";\n      if (horiz == \"right\") {\n        left = display.sizer.clientWidth - node.offsetWidth;\n        node.style.right = \"0px\";\n      } else {\n        if (horiz == \"left\") left = 0;\n        else if (horiz == \"middle\") left = (display.sizer.clientWidth - node.offsetWidth) / 2;\n        node.style.left = left + \"px\";\n      }\n      if (scroll)\n        scrollIntoView(this, left, top, left + node.offsetWidth, top + node.offsetHeight);\n    },\n\n    triggerOnKeyDown: methodOp(onKeyDown),\n    triggerOnKeyPress: methodOp(onKeyPress),\n    triggerOnKeyUp: onKeyUp,\n\n    execCommand: function(cmd) {\n      if (commands.hasOwnProperty(cmd))\n        return commands[cmd].call(null, this);\n    },\n\n    triggerElectric: methodOp(function(text) { triggerElectric(this, text); }),\n\n    findPosH: function(from, amount, unit, visually) {\n      var dir = 1;\n      if (amount < 0) { dir = -1; amount = -amount; }\n      for (var i = 0, cur = clipPos(this.doc, from); i < amount; ++i) {\n        cur = findPosH(this.doc, cur, dir, unit, visually);\n        if (cur.hitSide) break;\n      }\n      return cur;\n    },\n\n    moveH: methodOp(function(dir, unit) {\n      var cm = this;\n      cm.extendSelectionsBy(function(range) {\n        if (cm.display.shift || cm.doc.extend || range.empty())\n          return findPosH(cm.doc, range.head, dir, unit, cm.options.rtlMoveVisually);\n        else\n          return dir < 0 ? range.from() : range.to();\n      }, sel_move);\n    }),\n\n    deleteH: methodOp(function(dir, unit) {\n      var sel = this.doc.sel, doc = this.doc;\n      if (sel.somethingSelected())\n        doc.replaceSelection(\"\", null, \"+delete\");\n      else\n        deleteNearSelection(this, function(range) {\n          var other = findPosH(doc, range.head, dir, unit, false);\n          return dir < 0 ? {from: other, to: range.head} : {from: range.head, to: other};\n        });\n    }),\n\n    findPosV: function(from, amount, unit, goalColumn) {\n      var dir = 1, x = goalColumn;\n      if (amount < 0) { dir = -1; amount = -amount; }\n      for (var i = 0, cur = clipPos(this.doc, from); i < amount; ++i) {\n        var coords = cursorCoords(this, cur, \"div\");\n        if (x == null) x = coords.left;\n        else coords.left = x;\n        cur = findPosV(this, coords, dir, unit);\n        if (cur.hitSide) break;\n      }\n      return cur;\n    },\n\n    moveV: methodOp(function(dir, unit) {\n      var cm = this, doc = this.doc, goals = [];\n      var collapse = !cm.display.shift && !doc.extend && doc.sel.somethingSelected();\n      doc.extendSelectionsBy(function(range) {\n        if (collapse)\n          return dir < 0 ? range.from() : range.to();\n        var headPos = cursorCoords(cm, range.head, \"div\");\n        if (range.goalColumn != null) headPos.left = range.goalColumn;\n        goals.push(headPos.left);\n        var pos = findPosV(cm, headPos, dir, unit);\n        if (unit == \"page\" && range == doc.sel.primary())\n          addToScrollPos(cm, null, charCoords(cm, pos, \"div\").top - headPos.top);\n        return pos;\n      }, sel_move);\n      if (goals.length) for (var i = 0; i < doc.sel.ranges.length; i++)\n        doc.sel.ranges[i].goalColumn = goals[i];\n    }),\n\n    // Find the word at the given position (as returned by coordsChar).\n    findWordAt: function(pos) {\n      var doc = this.doc, line = getLine(doc, pos.line).text;\n      var start = pos.ch, end = pos.ch;\n      if (line) {\n        var helper = this.getHelper(pos, \"wordChars\");\n        if ((pos.xRel < 0 || end == line.length) && start) --start; else ++end;\n        var startChar = line.charAt(start);\n        var check = isWordChar(startChar, helper)\n          ? function(ch) { return isWordChar(ch, helper); }\n          : /\\s/.test(startChar) ? function(ch) {return /\\s/.test(ch);}\n          : function(ch) {return !/\\s/.test(ch) && !isWordChar(ch);};\n        while (start > 0 && check(line.charAt(start - 1))) --start;\n        while (end < line.length && check(line.charAt(end))) ++end;\n      }\n      return new Range(Pos(pos.line, start), Pos(pos.line, end));\n    },\n\n    toggleOverwrite: function(value) {\n      if (value != null && value == this.state.overwrite) return;\n      if (this.state.overwrite = !this.state.overwrite)\n        addClass(this.display.cursorDiv, \"CodeMirror-overwrite\");\n      else\n        rmClass(this.display.cursorDiv, \"CodeMirror-overwrite\");\n\n      signal(this, \"overwriteToggle\", this, this.state.overwrite);\n    },\n    hasFocus: function() { return this.display.input.getField() == activeElt(); },\n    isReadOnly: function() { return !!(this.options.readOnly || this.doc.cantEdit); },\n\n    scrollTo: methodOp(function(x, y) {\n      if (x != null || y != null) resolveScrollToPos(this);\n      if (x != null) this.curOp.scrollLeft = x;\n      if (y != null) this.curOp.scrollTop = y;\n    }),\n    getScrollInfo: function() {\n      var scroller = this.display.scroller;\n      return {left: scroller.scrollLeft, top: scroller.scrollTop,\n              height: scroller.scrollHeight - scrollGap(this) - this.display.barHeight,\n              width: scroller.scrollWidth - scrollGap(this) - this.display.barWidth,\n              clientHeight: displayHeight(this), clientWidth: displayWidth(this)};\n    },\n\n    scrollIntoView: methodOp(function(range, margin) {\n      if (range == null) {\n        range = {from: this.doc.sel.primary().head, to: null};\n        if (margin == null) margin = this.options.cursorScrollMargin;\n      } else if (typeof range == \"number\") {\n        range = {from: Pos(range, 0), to: null};\n      } else if (range.from == null) {\n        range = {from: range, to: null};\n      }\n      if (!range.to) range.to = range.from;\n      range.margin = margin || 0;\n\n      if (range.from.line != null) {\n        resolveScrollToPos(this);\n        this.curOp.scrollToPos = range;\n      } else {\n        var sPos = calculateScrollPos(this, Math.min(range.from.left, range.to.left),\n                                      Math.min(range.from.top, range.to.top) - range.margin,\n                                      Math.max(range.from.right, range.to.right),\n                                      Math.max(range.from.bottom, range.to.bottom) + range.margin);\n        this.scrollTo(sPos.scrollLeft, sPos.scrollTop);\n      }\n    }),\n\n    setSize: methodOp(function(width, height) {\n      var cm = this;\n      function interpret(val) {\n        return typeof val == \"number\" || /^\\d+$/.test(String(val)) ? val + \"px\" : val;\n      }\n      if (width != null) cm.display.wrapper.style.width = interpret(width);\n      if (height != null) cm.display.wrapper.style.height = interpret(height);\n      if (cm.options.lineWrapping) clearLineMeasurementCache(this);\n      var lineNo = cm.display.viewFrom;\n      cm.doc.iter(lineNo, cm.display.viewTo, function(line) {\n        if (line.widgets) for (var i = 0; i < line.widgets.length; i++)\n          if (line.widgets[i].noHScroll) { regLineChange(cm, lineNo, \"widget\"); break; }\n        ++lineNo;\n      });\n      cm.curOp.forceUpdate = true;\n      signal(cm, \"refresh\", this);\n    }),\n\n    operation: function(f){return runInOp(this, f);},\n\n    refresh: methodOp(function() {\n      var oldHeight = this.display.cachedTextHeight;\n      regChange(this);\n      this.curOp.forceUpdate = true;\n      clearCaches(this);\n      this.scrollTo(this.doc.scrollLeft, this.doc.scrollTop);\n      updateGutterSpace(this);\n      if (oldHeight == null || Math.abs(oldHeight - textHeight(this.display)) > .5)\n        estimateLineHeights(this);\n      signal(this, \"refresh\", this);\n    }),\n\n    swapDoc: methodOp(function(doc) {\n      var old = this.doc;\n      old.cm = null;\n      attachDoc(this, doc);\n      clearCaches(this);\n      this.display.input.reset();\n      this.scrollTo(doc.scrollLeft, doc.scrollTop);\n      this.curOp.forceScroll = true;\n      signalLater(this, \"swapDoc\", this, old);\n      return old;\n    }),\n\n    getInputField: function(){return this.display.input.getField();},\n    getWrapperElement: function(){return this.display.wrapper;},\n    getScrollerElement: function(){return this.display.scroller;},\n    getGutterElement: function(){return this.display.gutters;}\n  };\n  eventMixin(CodeMirror);\n\n  // OPTION DEFAULTS\n\n  // The default configuration options.\n  var defaults = CodeMirror.defaults = {};\n  // Functions to run when options are changed.\n  var optionHandlers = CodeMirror.optionHandlers = {};\n\n  function option(name, deflt, handle, notOnInit) {\n    CodeMirror.defaults[name] = deflt;\n    if (handle) optionHandlers[name] =\n      notOnInit ? function(cm, val, old) {if (old != Init) handle(cm, val, old);} : handle;\n  }\n\n  // Passed to option handlers when there is no old value.\n  var Init = CodeMirror.Init = {toString: function(){return \"CodeMirror.Init\";}};\n\n  // These two are, on init, called from the constructor because they\n  // have to be initialized before the editor can start at all.\n  option(\"value\", \"\", function(cm, val) {\n    cm.setValue(val);\n  }, true);\n  option(\"mode\", null, function(cm, val) {\n    cm.doc.modeOption = val;\n    loadMode(cm);\n  }, true);\n\n  option(\"indentUnit\", 2, loadMode, true);\n  option(\"indentWithTabs\", false);\n  option(\"smartIndent\", true);\n  option(\"tabSize\", 4, function(cm) {\n    resetModeState(cm);\n    clearCaches(cm);\n    regChange(cm);\n  }, true);\n  option(\"lineSeparator\", null, function(cm, val) {\n    cm.doc.lineSep = val;\n    if (!val) return;\n    var newBreaks = [], lineNo = cm.doc.first;\n    cm.doc.iter(function(line) {\n      for (var pos = 0;;) {\n        var found = line.text.indexOf(val, pos);\n        if (found == -1) break;\n        pos = found + val.length;\n        newBreaks.push(Pos(lineNo, found));\n      }\n      lineNo++;\n    });\n    for (var i = newBreaks.length - 1; i >= 0; i--)\n      replaceRange(cm.doc, val, newBreaks[i], Pos(newBreaks[i].line, newBreaks[i].ch + val.length))\n  });\n  option(\"specialChars\", /[\\t\\u0000-\\u0019\\u00ad\\u200b-\\u200f\\u2028\\u2029\\ufeff]/g, function(cm, val, old) {\n    cm.state.specialChars = new RegExp(val.source + (val.test(\"\\t\") ? \"\" : \"|\\t\"), \"g\");\n    if (old != CodeMirror.Init) cm.refresh();\n  });\n  option(\"specialCharPlaceholder\", defaultSpecialCharPlaceholder, function(cm) {cm.refresh();}, true);\n  option(\"electricChars\", true);\n  option(\"inputStyle\", mobile ? \"contenteditable\" : \"textarea\", function() {\n    throw new Error(\"inputStyle can not (yet) be changed in a running editor\"); // FIXME\n  }, true);\n  option(\"rtlMoveVisually\", !windows);\n  option(\"wholeLineUpdateBefore\", true);\n\n  option(\"theme\", \"default\", function(cm) {\n    themeChanged(cm);\n    guttersChanged(cm);\n  }, true);\n  option(\"keyMap\", \"default\", function(cm, val, old) {\n    var next = getKeyMap(val);\n    var prev = old != CodeMirror.Init && getKeyMap(old);\n    if (prev && prev.detach) prev.detach(cm, next);\n    if (next.attach) next.attach(cm, prev || null);\n  });\n  option(\"extraKeys\", null);\n\n  option(\"lineWrapping\", false, wrappingChanged, true);\n  option(\"gutters\", [], function(cm) {\n    setGuttersForLineNumbers(cm.options);\n    guttersChanged(cm);\n  }, true);\n  option(\"fixedGutter\", true, function(cm, val) {\n    cm.display.gutters.style.left = val ? compensateForHScroll(cm.display) + \"px\" : \"0\";\n    cm.refresh();\n  }, true);\n  option(\"coverGutterNextToScrollbar\", false, function(cm) {updateScrollbars(cm);}, true);\n  option(\"scrollbarStyle\", \"native\", function(cm) {\n    initScrollbars(cm);\n    updateScrollbars(cm);\n    cm.display.scrollbars.setScrollTop(cm.doc.scrollTop);\n    cm.display.scrollbars.setScrollLeft(cm.doc.scrollLeft);\n  }, true);\n  option(\"lineNumbers\", false, function(cm) {\n    setGuttersForLineNumbers(cm.options);\n    guttersChanged(cm);\n  }, true);\n  option(\"firstLineNumber\", 1, guttersChanged, true);\n  option(\"lineNumberFormatter\", function(integer) {return integer;}, guttersChanged, true);\n  option(\"showCursorWhenSelecting\", false, updateSelection, true);\n\n  option(\"resetSelectionOnContextMenu\", true);\n  option(\"lineWiseCopyCut\", true);\n\n  option(\"readOnly\", false, function(cm, val) {\n    if (val == \"nocursor\") {\n      onBlur(cm);\n      cm.display.input.blur();\n      cm.display.disabled = true;\n    } else {\n      cm.display.disabled = false;\n    }\n    cm.display.input.readOnlyChanged(val)\n  });\n  option(\"disableInput\", false, function(cm, val) {if (!val) cm.display.input.reset();}, true);\n  option(\"dragDrop\", true, dragDropChanged);\n  option(\"allowDropFileTypes\", null);\n\n  option(\"cursorBlinkRate\", 530);\n  option(\"cursorScrollMargin\", 0);\n  option(\"cursorHeight\", 1, updateSelection, true);\n  option(\"singleCursorHeightPerLine\", true, updateSelection, true);\n  option(\"workTime\", 100);\n  option(\"workDelay\", 100);\n  option(\"flattenSpans\", true, resetModeState, true);\n  option(\"addModeClass\", false, resetModeState, true);\n  option(\"pollInterval\", 100);\n  option(\"undoDepth\", 200, function(cm, val){cm.doc.history.undoDepth = val;});\n  option(\"historyEventDelay\", 1250);\n  option(\"viewportMargin\", 10, function(cm){cm.refresh();}, true);\n  option(\"maxHighlightLength\", 10000, resetModeState, true);\n  option(\"moveInputWithCursor\", true, function(cm, val) {\n    if (!val) cm.display.input.resetPosition();\n  });\n\n  option(\"tabindex\", null, function(cm, val) {\n    cm.display.input.getField().tabIndex = val || \"\";\n  });\n  option(\"autofocus\", null);\n\n  // MODE DEFINITION AND QUERYING\n\n  // Known modes, by name and by MIME\n  var modes = CodeMirror.modes = {}, mimeModes = CodeMirror.mimeModes = {};\n\n  // Extra arguments are stored as the mode's dependencies, which is\n  // used by (legacy) mechanisms like loadmode.js to automatically\n  // load a mode. (Preferred mechanism is the require/define calls.)\n  CodeMirror.defineMode = function(name, mode) {\n    if (!CodeMirror.defaults.mode && name != \"null\") CodeMirror.defaults.mode = name;\n    if (arguments.length > 2)\n      mode.dependencies = Array.prototype.slice.call(arguments, 2);\n    modes[name] = mode;\n  };\n\n  CodeMirror.defineMIME = function(mime, spec) {\n    mimeModes[mime] = spec;\n  };\n\n  // Given a MIME type, a {name, ...options} config object, or a name\n  // string, return a mode config object.\n  CodeMirror.resolveMode = function(spec) {\n    if (typeof spec == \"string\" && mimeModes.hasOwnProperty(spec)) {\n      spec = mimeModes[spec];\n    } else if (spec && typeof spec.name == \"string\" && mimeModes.hasOwnProperty(spec.name)) {\n      var found = mimeModes[spec.name];\n      if (typeof found == \"string\") found = {name: found};\n      spec = createObj(found, spec);\n      spec.name = found.name;\n    } else if (typeof spec == \"string\" && /^[\\w\\-]+\\/[\\w\\-]+\\+xml$/.test(spec)) {\n      return CodeMirror.resolveMode(\"application/xml\");\n    }\n    if (typeof spec == \"string\") return {name: spec};\n    else return spec || {name: \"null\"};\n  };\n\n  // Given a mode spec (anything that resolveMode accepts), find and\n  // initialize an actual mode object.\n  CodeMirror.getMode = function(options, spec) {\n    var spec = CodeMirror.resolveMode(spec);\n    var mfactory = modes[spec.name];\n    if (!mfactory) return CodeMirror.getMode(options, \"text/plain\");\n    var modeObj = mfactory(options, spec);\n    if (modeExtensions.hasOwnProperty(spec.name)) {\n      var exts = modeExtensions[spec.name];\n      for (var prop in exts) {\n        if (!exts.hasOwnProperty(prop)) continue;\n        if (modeObj.hasOwnProperty(prop)) modeObj[\"_\" + prop] = modeObj[prop];\n        modeObj[prop] = exts[prop];\n      }\n    }\n    modeObj.name = spec.name;\n    if (spec.helperType) modeObj.helperType = spec.helperType;\n    if (spec.modeProps) for (var prop in spec.modeProps)\n      modeObj[prop] = spec.modeProps[prop];\n\n    return modeObj;\n  };\n\n  // Minimal default mode.\n  CodeMirror.defineMode(\"null\", function() {\n    return {token: function(stream) {stream.skipToEnd();}};\n  });\n  CodeMirror.defineMIME(\"text/plain\", \"null\");\n\n  // This can be used to attach properties to mode objects from\n  // outside the actual mode definition.\n  var modeExtensions = CodeMirror.modeExtensions = {};\n  CodeMirror.extendMode = function(mode, properties) {\n    var exts = modeExtensions.hasOwnProperty(mode) ? modeExtensions[mode] : (modeExtensions[mode] = {});\n    copyObj(properties, exts);\n  };\n\n  // EXTENSIONS\n\n  CodeMirror.defineExtension = function(name, func) {\n    CodeMirror.prototype[name] = func;\n  };\n  CodeMirror.defineDocExtension = function(name, func) {\n    Doc.prototype[name] = func;\n  };\n  CodeMirror.defineOption = option;\n\n  var initHooks = [];\n  CodeMirror.defineInitHook = function(f) {initHooks.push(f);};\n\n  var helpers = CodeMirror.helpers = {};\n  CodeMirror.registerHelper = function(type, name, value) {\n    if (!helpers.hasOwnProperty(type)) helpers[type] = CodeMirror[type] = {_global: []};\n    helpers[type][name] = value;\n  };\n  CodeMirror.registerGlobalHelper = function(type, name, predicate, value) {\n    CodeMirror.registerHelper(type, name, value);\n    helpers[type]._global.push({pred: predicate, val: value});\n  };\n\n  // MODE STATE HANDLING\n\n  // Utility functions for working with state. Exported because nested\n  // modes need to do this for their inner modes.\n\n  var copyState = CodeMirror.copyState = function(mode, state) {\n    if (state === true) return state;\n    if (mode.copyState) return mode.copyState(state);\n    var nstate = {};\n    for (var n in state) {\n      var val = state[n];\n      if (val instanceof Array) val = val.concat([]);\n      nstate[n] = val;\n    }\n    return nstate;\n  };\n\n  var startState = CodeMirror.startState = function(mode, a1, a2) {\n    return mode.startState ? mode.startState(a1, a2) : true;\n  };\n\n  // Given a mode and a state (for that mode), find the inner mode and\n  // state at the position that the state refers to.\n  CodeMirror.innerMode = function(mode, state) {\n    while (mode.innerMode) {\n      var info = mode.innerMode(state);\n      if (!info || info.mode == mode) break;\n      state = info.state;\n      mode = info.mode;\n    }\n    return info || {mode: mode, state: state};\n  };\n\n  // STANDARD COMMANDS\n\n  // Commands are parameter-less actions that can be performed on an\n  // editor, mostly used for keybindings.\n  var commands = CodeMirror.commands = {\n    selectAll: function(cm) {cm.setSelection(Pos(cm.firstLine(), 0), Pos(cm.lastLine()), sel_dontScroll);},\n    singleSelection: function(cm) {\n      cm.setSelection(cm.getCursor(\"anchor\"), cm.getCursor(\"head\"), sel_dontScroll);\n    },\n    killLine: function(cm) {\n      deleteNearSelection(cm, function(range) {\n        if (range.empty()) {\n          var len = getLine(cm.doc, range.head.line).text.length;\n          if (range.head.ch == len && range.head.line < cm.lastLine())\n            return {from: range.head, to: Pos(range.head.line + 1, 0)};\n          else\n            return {from: range.head, to: Pos(range.head.line, len)};\n        } else {\n          return {from: range.from(), to: range.to()};\n        }\n      });\n    },\n    deleteLine: function(cm) {\n      deleteNearSelection(cm, function(range) {\n        return {from: Pos(range.from().line, 0),\n                to: clipPos(cm.doc, Pos(range.to().line + 1, 0))};\n      });\n    },\n    delLineLeft: function(cm) {\n      deleteNearSelection(cm, function(range) {\n        return {from: Pos(range.from().line, 0), to: range.from()};\n      });\n    },\n    delWrappedLineLeft: function(cm) {\n      deleteNearSelection(cm, function(range) {\n        var top = cm.charCoords(range.head, \"div\").top + 5;\n        var leftPos = cm.coordsChar({left: 0, top: top}, \"div\");\n        return {from: leftPos, to: range.from()};\n      });\n    },\n    delWrappedLineRight: function(cm) {\n      deleteNearSelection(cm, function(range) {\n        var top = cm.charCoords(range.head, \"div\").top + 5;\n        var rightPos = cm.coordsChar({left: cm.display.lineDiv.offsetWidth + 100, top: top}, \"div\");\n        return {from: range.from(), to: rightPos };\n      });\n    },\n    undo: function(cm) {cm.undo();},\n    redo: function(cm) {cm.redo();},\n    undoSelection: function(cm) {cm.undoSelection();},\n    redoSelection: function(cm) {cm.redoSelection();},\n    goDocStart: function(cm) {cm.extendSelection(Pos(cm.firstLine(), 0));},\n    goDocEnd: function(cm) {cm.extendSelection(Pos(cm.lastLine()));},\n    goLineStart: function(cm) {\n      cm.extendSelectionsBy(function(range) { return lineStart(cm, range.head.line); },\n                            {origin: \"+move\", bias: 1});\n    },\n    goLineStartSmart: function(cm) {\n      cm.extendSelectionsBy(function(range) {\n        return lineStartSmart(cm, range.head);\n      }, {origin: \"+move\", bias: 1});\n    },\n    goLineEnd: function(cm) {\n      cm.extendSelectionsBy(function(range) { return lineEnd(cm, range.head.line); },\n                            {origin: \"+move\", bias: -1});\n    },\n    goLineRight: function(cm) {\n      cm.extendSelectionsBy(function(range) {\n        var top = cm.charCoords(range.head, \"div\").top + 5;\n        return cm.coordsChar({left: cm.display.lineDiv.offsetWidth + 100, top: top}, \"div\");\n      }, sel_move);\n    },\n    goLineLeft: function(cm) {\n      cm.extendSelectionsBy(function(range) {\n        var top = cm.charCoords(range.head, \"div\").top + 5;\n        return cm.coordsChar({left: 0, top: top}, \"div\");\n      }, sel_move);\n    },\n    goLineLeftSmart: function(cm) {\n      cm.extendSelectionsBy(function(range) {\n        var top = cm.charCoords(range.head, \"div\").top + 5;\n        var pos = cm.coordsChar({left: 0, top: top}, \"div\");\n        if (pos.ch < cm.getLine(pos.line).search(/\\S/)) return lineStartSmart(cm, range.head);\n        return pos;\n      }, sel_move);\n    },\n    goLineUp: function(cm) {cm.moveV(-1, \"line\");},\n    goLineDown: function(cm) {cm.moveV(1, \"line\");},\n    goPageUp: function(cm) {cm.moveV(-1, \"page\");},\n    goPageDown: function(cm) {cm.moveV(1, \"page\");},\n    goCharLeft: function(cm) {cm.moveH(-1, \"char\");},\n    goCharRight: function(cm) {cm.moveH(1, \"char\");},\n    goColumnLeft: function(cm) {cm.moveH(-1, \"column\");},\n    goColumnRight: function(cm) {cm.moveH(1, \"column\");},\n    goWordLeft: function(cm) {cm.moveH(-1, \"word\");},\n    goGroupRight: function(cm) {cm.moveH(1, \"group\");},\n    goGroupLeft: function(cm) {cm.moveH(-1, \"group\");},\n    goWordRight: function(cm) {cm.moveH(1, \"word\");},\n    delCharBefore: function(cm) {cm.deleteH(-1, \"char\");},\n    delCharAfter: function(cm) {cm.deleteH(1, \"char\");},\n    delWordBefore: function(cm) {cm.deleteH(-1, \"word\");},\n    delWordAfter: function(cm) {cm.deleteH(1, \"word\");},\n    delGroupBefore: function(cm) {cm.deleteH(-1, \"group\");},\n    delGroupAfter: function(cm) {cm.deleteH(1, \"group\");},\n    indentAuto: function(cm) {cm.indentSelection(\"smart\");},\n    indentMore: function(cm) {cm.indentSelection(\"add\");},\n    indentLess: function(cm) {cm.indentSelection(\"subtract\");},\n    insertTab: function(cm) {cm.replaceSelection(\"\\t\");},\n    insertSoftTab: function(cm) {\n      var spaces = [], ranges = cm.listSelections(), tabSize = cm.options.tabSize;\n      for (var i = 0; i < ranges.length; i++) {\n        var pos = ranges[i].from();\n        var col = countColumn(cm.getLine(pos.line), pos.ch, tabSize);\n        spaces.push(new Array(tabSize - col % tabSize + 1).join(\" \"));\n      }\n      cm.replaceSelections(spaces);\n    },\n    defaultTab: function(cm) {\n      if (cm.somethingSelected()) cm.indentSelection(\"add\");\n      else cm.execCommand(\"insertTab\");\n    },\n    transposeChars: function(cm) {\n      runInOp(cm, function() {\n        var ranges = cm.listSelections(), newSel = [];\n        for (var i = 0; i < ranges.length; i++) {\n          var cur = ranges[i].head, line = getLine(cm.doc, cur.line).text;\n          if (line) {\n            if (cur.ch == line.length) cur = new Pos(cur.line, cur.ch - 1);\n            if (cur.ch > 0) {\n              cur = new Pos(cur.line, cur.ch + 1);\n              cm.replaceRange(line.charAt(cur.ch - 1) + line.charAt(cur.ch - 2),\n                              Pos(cur.line, cur.ch - 2), cur, \"+transpose\");\n            } else if (cur.line > cm.doc.first) {\n              var prev = getLine(cm.doc, cur.line - 1).text;\n              if (prev)\n                cm.replaceRange(line.charAt(0) + cm.doc.lineSeparator() +\n                                prev.charAt(prev.length - 1),\n                                Pos(cur.line - 1, prev.length - 1), Pos(cur.line, 1), \"+transpose\");\n            }\n          }\n          newSel.push(new Range(cur, cur));\n        }\n        cm.setSelections(newSel);\n      });\n    },\n    newlineAndIndent: function(cm) {\n      runInOp(cm, function() {\n        var len = cm.listSelections().length;\n        for (var i = 0; i < len; i++) {\n          var range = cm.listSelections()[i];\n          cm.replaceRange(cm.doc.lineSeparator(), range.anchor, range.head, \"+input\");\n          cm.indentLine(range.from().line + 1, null, true);\n        }\n        ensureCursorVisible(cm);\n      });\n    },\n    toggleOverwrite: function(cm) {cm.toggleOverwrite();}\n  };\n\n\n  // STANDARD KEYMAPS\n\n  var keyMap = CodeMirror.keyMap = {};\n\n  keyMap.basic = {\n    \"Left\": \"goCharLeft\", \"Right\": \"goCharRight\", \"Up\": \"goLineUp\", \"Down\": \"goLineDown\",\n    \"End\": \"goLineEnd\", \"Home\": \"goLineStartSmart\", \"PageUp\": \"goPageUp\", \"PageDown\": \"goPageDown\",\n    \"Delete\": \"delCharAfter\", \"Backspace\": \"delCharBefore\", \"Shift-Backspace\": \"delCharBefore\",\n    \"Tab\": \"defaultTab\", \"Shift-Tab\": \"indentAuto\",\n    \"Enter\": \"newlineAndIndent\", \"Insert\": \"toggleOverwrite\",\n    \"Esc\": \"singleSelection\"\n  };\n  // Note that the save and find-related commands aren't defined by\n  // default. User code or addons can define them. Unknown commands\n  // are simply ignored.\n  keyMap.pcDefault = {\n    \"Ctrl-A\": \"selectAll\", \"Ctrl-D\": \"deleteLine\", \"Ctrl-Z\": \"undo\", \"Shift-Ctrl-Z\": \"redo\", \"Ctrl-Y\": \"redo\",\n    \"Ctrl-Home\": \"goDocStart\", \"Ctrl-End\": \"goDocEnd\", \"Ctrl-Up\": \"goLineUp\", \"Ctrl-Down\": \"goLineDown\",\n    \"Ctrl-Left\": \"goGroupLeft\", \"Ctrl-Right\": \"goGroupRight\", \"Alt-Left\": \"goLineStart\", \"Alt-Right\": \"goLineEnd\",\n    \"Ctrl-Backspace\": \"delGroupBefore\", \"Ctrl-Delete\": \"delGroupAfter\", \"Ctrl-S\": \"save\", \"Ctrl-F\": \"find\",\n    \"Ctrl-G\": \"findNext\", \"Shift-Ctrl-G\": \"findPrev\", \"Shift-Ctrl-F\": \"replace\", \"Shift-Ctrl-R\": \"replaceAll\",\n    \"Ctrl-[\": \"indentLess\", \"Ctrl-]\": \"indentMore\",\n    \"Ctrl-U\": \"undoSelection\", \"Shift-Ctrl-U\": \"redoSelection\", \"Alt-U\": \"redoSelection\",\n    fallthrough: \"basic\"\n  };\n  // Very basic readline/emacs-style bindings, which are standard on Mac.\n  keyMap.emacsy = {\n    \"Ctrl-F\": \"goCharRight\", \"Ctrl-B\": \"goCharLeft\", \"Ctrl-P\": \"goLineUp\", \"Ctrl-N\": \"goLineDown\",\n    \"Alt-F\": \"goWordRight\", \"Alt-B\": \"goWordLeft\", \"Ctrl-A\": \"goLineStart\", \"Ctrl-E\": \"goLineEnd\",\n    \"Ctrl-V\": \"goPageDown\", \"Shift-Ctrl-V\": \"goPageUp\", \"Ctrl-D\": \"delCharAfter\", \"Ctrl-H\": \"delCharBefore\",\n    \"Alt-D\": \"delWordAfter\", \"Alt-Backspace\": \"delWordBefore\", \"Ctrl-K\": \"killLine\", \"Ctrl-T\": \"transposeChars\"\n  };\n  keyMap.macDefault = {\n    \"Cmd-A\": \"selectAll\", \"Cmd-D\": \"deleteLine\", \"Cmd-Z\": \"undo\", \"Shift-Cmd-Z\": \"redo\", \"Cmd-Y\": \"redo\",\n    \"Cmd-Home\": \"goDocStart\", \"Cmd-Up\": \"goDocStart\", \"Cmd-End\": \"goDocEnd\", \"Cmd-Down\": \"goDocEnd\", \"Alt-Left\": \"goGroupLeft\",\n    \"Alt-Right\": \"goGroupRight\", \"Cmd-Left\": \"goLineLeft\", \"Cmd-Right\": \"goLineRight\", \"Alt-Backspace\": \"delGroupBefore\",\n    \"Ctrl-Alt-Backspace\": \"delGroupAfter\", \"Alt-Delete\": \"delGroupAfter\", \"Cmd-S\": \"save\", \"Cmd-F\": \"find\",\n    \"Cmd-G\": \"findNext\", \"Shift-Cmd-G\": \"findPrev\", \"Cmd-Alt-F\": \"replace\", \"Shift-Cmd-Alt-F\": \"replaceAll\",\n    \"Cmd-[\": \"indentLess\", \"Cmd-]\": \"indentMore\", \"Cmd-Backspace\": \"delWrappedLineLeft\", \"Cmd-Delete\": \"delWrappedLineRight\",\n    \"Cmd-U\": \"undoSelection\", \"Shift-Cmd-U\": \"redoSelection\", \"Ctrl-Up\": \"goDocStart\", \"Ctrl-Down\": \"goDocEnd\",\n    fallthrough: [\"basic\", \"emacsy\"]\n  };\n  keyMap[\"default\"] = mac ? keyMap.macDefault : keyMap.pcDefault;\n\n  // KEYMAP DISPATCH\n\n  function normalizeKeyName(name) {\n    var parts = name.split(/-(?!$)/), name = parts[parts.length - 1];\n    var alt, ctrl, shift, cmd;\n    for (var i = 0; i < parts.length - 1; i++) {\n      var mod = parts[i];\n      if (/^(cmd|meta|m)$/i.test(mod)) cmd = true;\n      else if (/^a(lt)?$/i.test(mod)) alt = true;\n      else if (/^(c|ctrl|control)$/i.test(mod)) ctrl = true;\n      else if (/^s(hift)$/i.test(mod)) shift = true;\n      else throw new Error(\"Unrecognized modifier name: \" + mod);\n    }\n    if (alt) name = \"Alt-\" + name;\n    if (ctrl) name = \"Ctrl-\" + name;\n    if (cmd) name = \"Cmd-\" + name;\n    if (shift) name = \"Shift-\" + name;\n    return name;\n  }\n\n  // This is a kludge to keep keymaps mostly working as raw objects\n  // (backwards compatibility) while at the same time support features\n  // like normalization and multi-stroke key bindings. It compiles a\n  // new normalized keymap, and then updates the old object to reflect\n  // this.\n  CodeMirror.normalizeKeyMap = function(keymap) {\n    var copy = {};\n    for (var keyname in keymap) if (keymap.hasOwnProperty(keyname)) {\n      var value = keymap[keyname];\n      if (/^(name|fallthrough|(de|at)tach)$/.test(keyname)) continue;\n      if (value == \"...\") { delete keymap[keyname]; continue; }\n\n      var keys = map(keyname.split(\" \"), normalizeKeyName);\n      for (var i = 0; i < keys.length; i++) {\n        var val, name;\n        if (i == keys.length - 1) {\n          name = keys.join(\" \");\n          val = value;\n        } else {\n          name = keys.slice(0, i + 1).join(\" \");\n          val = \"...\";\n        }\n        var prev = copy[name];\n        if (!prev) copy[name] = val;\n        else if (prev != val) throw new Error(\"Inconsistent bindings for \" + name);\n      }\n      delete keymap[keyname];\n    }\n    for (var prop in copy) keymap[prop] = copy[prop];\n    return keymap;\n  };\n\n  var lookupKey = CodeMirror.lookupKey = function(key, map, handle, context) {\n    map = getKeyMap(map);\n    var found = map.call ? map.call(key, context) : map[key];\n    if (found === false) return \"nothing\";\n    if (found === \"...\") return \"multi\";\n    if (found != null && handle(found)) return \"handled\";\n\n    if (map.fallthrough) {\n      if (Object.prototype.toString.call(map.fallthrough) != \"[object Array]\")\n        return lookupKey(key, map.fallthrough, handle, context);\n      for (var i = 0; i < map.fallthrough.length; i++) {\n        var result = lookupKey(key, map.fallthrough[i], handle, context);\n        if (result) return result;\n      }\n    }\n  };\n\n  // Modifier key presses don't count as 'real' key presses for the\n  // purpose of keymap fallthrough.\n  var isModifierKey = CodeMirror.isModifierKey = function(value) {\n    var name = typeof value == \"string\" ? value : keyNames[value.keyCode];\n    return name == \"Ctrl\" || name == \"Alt\" || name == \"Shift\" || name == \"Mod\";\n  };\n\n  // Look up the name of a key as indicated by an event object.\n  var keyName = CodeMirror.keyName = function(event, noShift) {\n    if (presto && event.keyCode == 34 && event[\"char\"]) return false;\n    var base = keyNames[event.keyCode], name = base;\n    if (name == null || event.altGraphKey) return false;\n    if (event.altKey && base != \"Alt\") name = \"Alt-\" + name;\n    if ((flipCtrlCmd ? event.metaKey : event.ctrlKey) && base != \"Ctrl\") name = \"Ctrl-\" + name;\n    if ((flipCtrlCmd ? event.ctrlKey : event.metaKey) && base != \"Cmd\") name = \"Cmd-\" + name;\n    if (!noShift && event.shiftKey && base != \"Shift\") name = \"Shift-\" + name;\n    return name;\n  };\n\n  function getKeyMap(val) {\n    return typeof val == \"string\" ? keyMap[val] : val;\n  }\n\n  // FROMTEXTAREA\n\n  CodeMirror.fromTextArea = function(textarea, options) {\n    options = options ? copyObj(options) : {};\n    options.value = textarea.value;\n    if (!options.tabindex && textarea.tabIndex)\n      options.tabindex = textarea.tabIndex;\n    if (!options.placeholder && textarea.placeholder)\n      options.placeholder = textarea.placeholder;\n    // Set autofocus to true if this textarea is focused, or if it has\n    // autofocus and no other element is focused.\n    if (options.autofocus == null) {\n      var hasFocus = activeElt();\n      options.autofocus = hasFocus == textarea ||\n        textarea.getAttribute(\"autofocus\") != null && hasFocus == document.body;\n    }\n\n    function save() {textarea.value = cm.getValue();}\n    if (textarea.form) {\n      on(textarea.form, \"submit\", save);\n      // Deplorable hack to make the submit method do the right thing.\n      if (!options.leaveSubmitMethodAlone) {\n        var form = textarea.form, realSubmit = form.submit;\n        try {\n          var wrappedSubmit = form.submit = function() {\n            save();\n            form.submit = realSubmit;\n            form.submit();\n            form.submit = wrappedSubmit;\n          };\n        } catch(e) {}\n      }\n    }\n\n    options.finishInit = function(cm) {\n      cm.save = save;\n      cm.getTextArea = function() { return textarea; };\n      cm.toTextArea = function() {\n        cm.toTextArea = isNaN; // Prevent this from being ran twice\n        save();\n        textarea.parentNode.removeChild(cm.getWrapperElement());\n        textarea.style.display = \"\";\n        if (textarea.form) {\n          off(textarea.form, \"submit\", save);\n          if (typeof textarea.form.submit == \"function\")\n            textarea.form.submit = realSubmit;\n        }\n      };\n    };\n\n    textarea.style.display = \"none\";\n    var cm = CodeMirror(function(node) {\n      textarea.parentNode.insertBefore(node, textarea.nextSibling);\n    }, options);\n    return cm;\n  };\n\n  // STRING STREAM\n\n  // Fed to the mode parsers, provides helper functions to make\n  // parsers more succinct.\n\n  var StringStream = CodeMirror.StringStream = function(string, tabSize) {\n    this.pos = this.start = 0;\n    this.string = string;\n    this.tabSize = tabSize || 8;\n    this.lastColumnPos = this.lastColumnValue = 0;\n    this.lineStart = 0;\n  };\n\n  StringStream.prototype = {\n    eol: function() {return this.pos >= this.string.length;},\n    sol: function() {return this.pos == this.lineStart;},\n    peek: function() {return this.string.charAt(this.pos) || undefined;},\n    next: function() {\n      if (this.pos < this.string.length)\n        return this.string.charAt(this.pos++);\n    },\n    eat: function(match) {\n      var ch = this.string.charAt(this.pos);\n      if (typeof match == \"string\") var ok = ch == match;\n      else var ok = ch && (match.test ? match.test(ch) : match(ch));\n      if (ok) {++this.pos; return ch;}\n    },\n    eatWhile: function(match) {\n      var start = this.pos;\n      while (this.eat(match)){}\n      return this.pos > start;\n    },\n    eatSpace: function() {\n      var start = this.pos;\n      while (/[\\s\\u00a0]/.test(this.string.charAt(this.pos))) ++this.pos;\n      return this.pos > start;\n    },\n    skipToEnd: function() {this.pos = this.string.length;},\n    skipTo: function(ch) {\n      var found = this.string.indexOf(ch, this.pos);\n      if (found > -1) {this.pos = found; return true;}\n    },\n    backUp: function(n) {this.pos -= n;},\n    column: function() {\n      if (this.lastColumnPos < this.start) {\n        this.lastColumnValue = countColumn(this.string, this.start, this.tabSize, this.lastColumnPos, this.lastColumnValue);\n        this.lastColumnPos = this.start;\n      }\n      return this.lastColumnValue - (this.lineStart ? countColumn(this.string, this.lineStart, this.tabSize) : 0);\n    },\n    indentation: function() {\n      return countColumn(this.string, null, this.tabSize) -\n        (this.lineStart ? countColumn(this.string, this.lineStart, this.tabSize) : 0);\n    },\n    match: function(pattern, consume, caseInsensitive) {\n      if (typeof pattern == \"string\") {\n        var cased = function(str) {return caseInsensitive ? str.toLowerCase() : str;};\n        var substr = this.string.substr(this.pos, pattern.length);\n        if (cased(substr) == cased(pattern)) {\n          if (consume !== false) this.pos += pattern.length;\n          return true;\n        }\n      } else {\n        var match = this.string.slice(this.pos).match(pattern);\n        if (match && match.index > 0) return null;\n        if (match && consume !== false) this.pos += match[0].length;\n        return match;\n      }\n    },\n    current: function(){return this.string.slice(this.start, this.pos);},\n    hideFirstChars: function(n, inner) {\n      this.lineStart += n;\n      try { return inner(); }\n      finally { this.lineStart -= n; }\n    }\n  };\n\n  // TEXTMARKERS\n\n  // Created with markText and setBookmark methods. A TextMarker is a\n  // handle that can be used to clear or find a marked position in the\n  // document. Line objects hold arrays (markedSpans) containing\n  // {from, to, marker} object pointing to such marker objects, and\n  // indicating that such a marker is present on that line. Multiple\n  // lines may point to the same marker when it spans across lines.\n  // The spans will have null for their from/to properties when the\n  // marker continues beyond the start/end of the line. Markers have\n  // links back to the lines they currently touch.\n\n  var nextMarkerId = 0;\n\n  var TextMarker = CodeMirror.TextMarker = function(doc, type) {\n    this.lines = [];\n    this.type = type;\n    this.doc = doc;\n    this.id = ++nextMarkerId;\n  };\n  eventMixin(TextMarker);\n\n  // Clear the marker.\n  TextMarker.prototype.clear = function() {\n    if (this.explicitlyCleared) return;\n    var cm = this.doc.cm, withOp = cm && !cm.curOp;\n    if (withOp) startOperation(cm);\n    if (hasHandler(this, \"clear\")) {\n      var found = this.find();\n      if (found) signalLater(this, \"clear\", found.from, found.to);\n    }\n    var min = null, max = null;\n    for (var i = 0; i < this.lines.length; ++i) {\n      var line = this.lines[i];\n      var span = getMarkedSpanFor(line.markedSpans, this);\n      if (cm && !this.collapsed) regLineChange(cm, lineNo(line), \"text\");\n      else if (cm) {\n        if (span.to != null) max = lineNo(line);\n        if (span.from != null) min = lineNo(line);\n      }\n      line.markedSpans = removeMarkedSpan(line.markedSpans, span);\n      if (span.from == null && this.collapsed && !lineIsHidden(this.doc, line) && cm)\n        updateLineHeight(line, textHeight(cm.display));\n    }\n    if (cm && this.collapsed && !cm.options.lineWrapping) for (var i = 0; i < this.lines.length; ++i) {\n      var visual = visualLine(this.lines[i]), len = lineLength(visual);\n      if (len > cm.display.maxLineLength) {\n        cm.display.maxLine = visual;\n        cm.display.maxLineLength = len;\n        cm.display.maxLineChanged = true;\n      }\n    }\n\n    if (min != null && cm && this.collapsed) regChange(cm, min, max + 1);\n    this.lines.length = 0;\n    this.explicitlyCleared = true;\n    if (this.atomic && this.doc.cantEdit) {\n      this.doc.cantEdit = false;\n      if (cm) reCheckSelection(cm.doc);\n    }\n    if (cm) signalLater(cm, \"markerCleared\", cm, this);\n    if (withOp) endOperation(cm);\n    if (this.parent) this.parent.clear();\n  };\n\n  // Find the position of the marker in the document. Returns a {from,\n  // to} object by default. Side can be passed to get a specific side\n  // -- 0 (both), -1 (left), or 1 (right). When lineObj is true, the\n  // Pos objects returned contain a line object, rather than a line\n  // number (used to prevent looking up the same line twice).\n  TextMarker.prototype.find = function(side, lineObj) {\n    if (side == null && this.type == \"bookmark\") side = 1;\n    var from, to;\n    for (var i = 0; i < this.lines.length; ++i) {\n      var line = this.lines[i];\n      var span = getMarkedSpanFor(line.markedSpans, this);\n      if (span.from != null) {\n        from = Pos(lineObj ? line : lineNo(line), span.from);\n        if (side == -1) return from;\n      }\n      if (span.to != null) {\n        to = Pos(lineObj ? line : lineNo(line), span.to);\n        if (side == 1) return to;\n      }\n    }\n    return from && {from: from, to: to};\n  };\n\n  // Signals that the marker's widget changed, and surrounding layout\n  // should be recomputed.\n  TextMarker.prototype.changed = function() {\n    var pos = this.find(-1, true), widget = this, cm = this.doc.cm;\n    if (!pos || !cm) return;\n    runInOp(cm, function() {\n      var line = pos.line, lineN = lineNo(pos.line);\n      var view = findViewForLine(cm, lineN);\n      if (view) {\n        clearLineMeasurementCacheFor(view);\n        cm.curOp.selectionChanged = cm.curOp.forceUpdate = true;\n      }\n      cm.curOp.updateMaxLine = true;\n      if (!lineIsHidden(widget.doc, line) && widget.height != null) {\n        var oldHeight = widget.height;\n        widget.height = null;\n        var dHeight = widgetHeight(widget) - oldHeight;\n        if (dHeight)\n          updateLineHeight(line, line.height + dHeight);\n      }\n    });\n  };\n\n  TextMarker.prototype.attachLine = function(line) {\n    if (!this.lines.length && this.doc.cm) {\n      var op = this.doc.cm.curOp;\n      if (!op.maybeHiddenMarkers || indexOf(op.maybeHiddenMarkers, this) == -1)\n        (op.maybeUnhiddenMarkers || (op.maybeUnhiddenMarkers = [])).push(this);\n    }\n    this.lines.push(line);\n  };\n  TextMarker.prototype.detachLine = function(line) {\n    this.lines.splice(indexOf(this.lines, line), 1);\n    if (!this.lines.length && this.doc.cm) {\n      var op = this.doc.cm.curOp;\n      (op.maybeHiddenMarkers || (op.maybeHiddenMarkers = [])).push(this);\n    }\n  };\n\n  // Collapsed markers have unique ids, in order to be able to order\n  // them, which is needed for uniquely determining an outer marker\n  // when they overlap (they may nest, but not partially overlap).\n  var nextMarkerId = 0;\n\n  // Create a marker, wire it up to the right lines, and\n  function markText(doc, from, to, options, type) {\n    // Shared markers (across linked documents) are handled separately\n    // (markTextShared will call out to this again, once per\n    // document).\n    if (options && options.shared) return markTextShared(doc, from, to, options, type);\n    // Ensure we are in an operation.\n    if (doc.cm && !doc.cm.curOp) return operation(doc.cm, markText)(doc, from, to, options, type);\n\n    var marker = new TextMarker(doc, type), diff = cmp(from, to);\n    if (options) copyObj(options, marker, false);\n    // Don't connect empty markers unless clearWhenEmpty is false\n    if (diff > 0 || diff == 0 && marker.clearWhenEmpty !== false)\n      return marker;\n    if (marker.replacedWith) {\n      // Showing up as a widget implies collapsed (widget replaces text)\n      marker.collapsed = true;\n      marker.widgetNode = elt(\"span\", [marker.replacedWith], \"CodeMirror-widget\");\n      if (!options.handleMouseEvents) marker.widgetNode.setAttribute(\"cm-ignore-events\", \"true\");\n      if (options.insertLeft) marker.widgetNode.insertLeft = true;\n    }\n    if (marker.collapsed) {\n      if (conflictingCollapsedRange(doc, from.line, from, to, marker) ||\n          from.line != to.line && conflictingCollapsedRange(doc, to.line, from, to, marker))\n        throw new Error(\"Inserting collapsed marker partially overlapping an existing one\");\n      sawCollapsedSpans = true;\n    }\n\n    if (marker.addToHistory)\n      addChangeToHistory(doc, {from: from, to: to, origin: \"markText\"}, doc.sel, NaN);\n\n    var curLine = from.line, cm = doc.cm, updateMaxLine;\n    doc.iter(curLine, to.line + 1, function(line) {\n      if (cm && marker.collapsed && !cm.options.lineWrapping && visualLine(line) == cm.display.maxLine)\n        updateMaxLine = true;\n      if (marker.collapsed && curLine != from.line) updateLineHeight(line, 0);\n      addMarkedSpan(line, new MarkedSpan(marker,\n                                         curLine == from.line ? from.ch : null,\n                                         curLine == to.line ? to.ch : null));\n      ++curLine;\n    });\n    // lineIsHidden depends on the presence of the spans, so needs a second pass\n    if (marker.collapsed) doc.iter(from.line, to.line + 1, function(line) {\n      if (lineIsHidden(doc, line)) updateLineHeight(line, 0);\n    });\n\n    if (marker.clearOnEnter) on(marker, \"beforeCursorEnter\", function() { marker.clear(); });\n\n    if (marker.readOnly) {\n      sawReadOnlySpans = true;\n      if (doc.history.done.length || doc.history.undone.length)\n        doc.clearHistory();\n    }\n    if (marker.collapsed) {\n      marker.id = ++nextMarkerId;\n      marker.atomic = true;\n    }\n    if (cm) {\n      // Sync editor state\n      if (updateMaxLine) cm.curOp.updateMaxLine = true;\n      if (marker.collapsed)\n        regChange(cm, from.line, to.line + 1);\n      else if (marker.className || marker.title || marker.startStyle || marker.endStyle || marker.css)\n        for (var i = from.line; i <= to.line; i++) regLineChange(cm, i, \"text\");\n      if (marker.atomic) reCheckSelection(cm.doc);\n      signalLater(cm, \"markerAdded\", cm, marker);\n    }\n    return marker;\n  }\n\n  // SHARED TEXTMARKERS\n\n  // A shared marker spans multiple linked documents. It is\n  // implemented as a meta-marker-object controlling multiple normal\n  // markers.\n  var SharedTextMarker = CodeMirror.SharedTextMarker = function(markers, primary) {\n    this.markers = markers;\n    this.primary = primary;\n    for (var i = 0; i < markers.length; ++i)\n      markers[i].parent = this;\n  };\n  eventMixin(SharedTextMarker);\n\n  SharedTextMarker.prototype.clear = function() {\n    if (this.explicitlyCleared) return;\n    this.explicitlyCleared = true;\n    for (var i = 0; i < this.markers.length; ++i)\n      this.markers[i].clear();\n    signalLater(this, \"clear\");\n  };\n  SharedTextMarker.prototype.find = function(side, lineObj) {\n    return this.primary.find(side, lineObj);\n  };\n\n  function markTextShared(doc, from, to, options, type) {\n    options = copyObj(options);\n    options.shared = false;\n    var markers = [markText(doc, from, to, options, type)], primary = markers[0];\n    var widget = options.widgetNode;\n    linkedDocs(doc, function(doc) {\n      if (widget) options.widgetNode = widget.cloneNode(true);\n      markers.push(markText(doc, clipPos(doc, from), clipPos(doc, to), options, type));\n      for (var i = 0; i < doc.linked.length; ++i)\n        if (doc.linked[i].isParent) return;\n      primary = lst(markers);\n    });\n    return new SharedTextMarker(markers, primary);\n  }\n\n  function findSharedMarkers(doc) {\n    return doc.findMarks(Pos(doc.first, 0), doc.clipPos(Pos(doc.lastLine())),\n                         function(m) { return m.parent; });\n  }\n\n  function copySharedMarkers(doc, markers) {\n    for (var i = 0; i < markers.length; i++) {\n      var marker = markers[i], pos = marker.find();\n      var mFrom = doc.clipPos(pos.from), mTo = doc.clipPos(pos.to);\n      if (cmp(mFrom, mTo)) {\n        var subMark = markText(doc, mFrom, mTo, marker.primary, marker.primary.type);\n        marker.markers.push(subMark);\n        subMark.parent = marker;\n      }\n    }\n  }\n\n  function detachSharedMarkers(markers) {\n    for (var i = 0; i < markers.length; i++) {\n      var marker = markers[i], linked = [marker.primary.doc];;\n      linkedDocs(marker.primary.doc, function(d) { linked.push(d); });\n      for (var j = 0; j < marker.markers.length; j++) {\n        var subMarker = marker.markers[j];\n        if (indexOf(linked, subMarker.doc) == -1) {\n          subMarker.parent = null;\n          marker.markers.splice(j--, 1);\n        }\n      }\n    }\n  }\n\n  // TEXTMARKER SPANS\n\n  function MarkedSpan(marker, from, to) {\n    this.marker = marker;\n    this.from = from; this.to = to;\n  }\n\n  // Search an array of spans for a span matching the given marker.\n  function getMarkedSpanFor(spans, marker) {\n    if (spans) for (var i = 0; i < spans.length; ++i) {\n      var span = spans[i];\n      if (span.marker == marker) return span;\n    }\n  }\n  // Remove a span from an array, returning undefined if no spans are\n  // left (we don't store arrays for lines without spans).\n  function removeMarkedSpan(spans, span) {\n    for (var r, i = 0; i < spans.length; ++i)\n      if (spans[i] != span) (r || (r = [])).push(spans[i]);\n    return r;\n  }\n  // Add a span to a line.\n  function addMarkedSpan(line, span) {\n    line.markedSpans = line.markedSpans ? line.markedSpans.concat([span]) : [span];\n    span.marker.attachLine(line);\n  }\n\n  // Used for the algorithm that adjusts markers for a change in the\n  // document. These functions cut an array of spans at a given\n  // character position, returning an array of remaining chunks (or\n  // undefined if nothing remains).\n  function markedSpansBefore(old, startCh, isInsert) {\n    if (old) for (var i = 0, nw; i < old.length; ++i) {\n      var span = old[i], marker = span.marker;\n      var startsBefore = span.from == null || (marker.inclusiveLeft ? span.from <= startCh : span.from < startCh);\n      if (startsBefore || span.from == startCh && marker.type == \"bookmark\" && (!isInsert || !span.marker.insertLeft)) {\n        var endsAfter = span.to == null || (marker.inclusiveRight ? span.to >= startCh : span.to > startCh);\n        (nw || (nw = [])).push(new MarkedSpan(marker, span.from, endsAfter ? null : span.to));\n      }\n    }\n    return nw;\n  }\n  function markedSpansAfter(old, endCh, isInsert) {\n    if (old) for (var i = 0, nw; i < old.length; ++i) {\n      var span = old[i], marker = span.marker;\n      var endsAfter = span.to == null || (marker.inclusiveRight ? span.to >= endCh : span.to > endCh);\n      if (endsAfter || span.from == endCh && marker.type == \"bookmark\" && (!isInsert || span.marker.insertLeft)) {\n        var startsBefore = span.from == null || (marker.inclusiveLeft ? span.from <= endCh : span.from < endCh);\n        (nw || (nw = [])).push(new MarkedSpan(marker, startsBefore ? null : span.from - endCh,\n                                              span.to == null ? null : span.to - endCh));\n      }\n    }\n    return nw;\n  }\n\n  // Given a change object, compute the new set of marker spans that\n  // cover the line in which the change took place. Removes spans\n  // entirely within the change, reconnects spans belonging to the\n  // same marker that appear on both sides of the change, and cuts off\n  // spans partially within the change. Returns an array of span\n  // arrays with one element for each line in (after) the change.\n  function stretchSpansOverChange(doc, change) {\n    if (change.full) return null;\n    var oldFirst = isLine(doc, change.from.line) && getLine(doc, change.from.line).markedSpans;\n    var oldLast = isLine(doc, change.to.line) && getLine(doc, change.to.line).markedSpans;\n    if (!oldFirst && !oldLast) return null;\n\n    var startCh = change.from.ch, endCh = change.to.ch, isInsert = cmp(change.from, change.to) == 0;\n    // Get the spans that 'stick out' on both sides\n    var first = markedSpansBefore(oldFirst, startCh, isInsert);\n    var last = markedSpansAfter(oldLast, endCh, isInsert);\n\n    // Next, merge those two ends\n    var sameLine = change.text.length == 1, offset = lst(change.text).length + (sameLine ? startCh : 0);\n    if (first) {\n      // Fix up .to properties of first\n      for (var i = 0; i < first.length; ++i) {\n        var span = first[i];\n        if (span.to == null) {\n          var found = getMarkedSpanFor(last, span.marker);\n          if (!found) span.to = startCh;\n          else if (sameLine) span.to = found.to == null ? null : found.to + offset;\n        }\n      }\n    }\n    if (last) {\n      // Fix up .from in last (or move them into first in case of sameLine)\n      for (var i = 0; i < last.length; ++i) {\n        var span = last[i];\n        if (span.to != null) span.to += offset;\n        if (span.from == null) {\n          var found = getMarkedSpanFor(first, span.marker);\n          if (!found) {\n            span.from = offset;\n            if (sameLine) (first || (first = [])).push(span);\n          }\n        } else {\n          span.from += offset;\n          if (sameLine) (first || (first = [])).push(span);\n        }\n      }\n    }\n    // Make sure we didn't create any zero-length spans\n    if (first) first = clearEmptySpans(first);\n    if (last && last != first) last = clearEmptySpans(last);\n\n    var newMarkers = [first];\n    if (!sameLine) {\n      // Fill gap with whole-line-spans\n      var gap = change.text.length - 2, gapMarkers;\n      if (gap > 0 && first)\n        for (var i = 0; i < first.length; ++i)\n          if (first[i].to == null)\n            (gapMarkers || (gapMarkers = [])).push(new MarkedSpan(first[i].marker, null, null));\n      for (var i = 0; i < gap; ++i)\n        newMarkers.push(gapMarkers);\n      newMarkers.push(last);\n    }\n    return newMarkers;\n  }\n\n  // Remove spans that are empty and don't have a clearWhenEmpty\n  // option of false.\n  function clearEmptySpans(spans) {\n    for (var i = 0; i < spans.length; ++i) {\n      var span = spans[i];\n      if (span.from != null && span.from == span.to && span.marker.clearWhenEmpty !== false)\n        spans.splice(i--, 1);\n    }\n    if (!spans.length) return null;\n    return spans;\n  }\n\n  // Used for un/re-doing changes from the history. Combines the\n  // result of computing the existing spans with the set of spans that\n  // existed in the history (so that deleting around a span and then\n  // undoing brings back the span).\n  function mergeOldSpans(doc, change) {\n    var old = getOldSpans(doc, change);\n    var stretched = stretchSpansOverChange(doc, change);\n    if (!old) return stretched;\n    if (!stretched) return old;\n\n    for (var i = 0; i < old.length; ++i) {\n      var oldCur = old[i], stretchCur = stretched[i];\n      if (oldCur && stretchCur) {\n        spans: for (var j = 0; j < stretchCur.length; ++j) {\n          var span = stretchCur[j];\n          for (var k = 0; k < oldCur.length; ++k)\n            if (oldCur[k].marker == span.marker) continue spans;\n          oldCur.push(span);\n        }\n      } else if (stretchCur) {\n        old[i] = stretchCur;\n      }\n    }\n    return old;\n  }\n\n  // Used to 'clip' out readOnly ranges when making a change.\n  function removeReadOnlyRanges(doc, from, to) {\n    var markers = null;\n    doc.iter(from.line, to.line + 1, function(line) {\n      if (line.markedSpans) for (var i = 0; i < line.markedSpans.length; ++i) {\n        var mark = line.markedSpans[i].marker;\n        if (mark.readOnly && (!markers || indexOf(markers, mark) == -1))\n          (markers || (markers = [])).push(mark);\n      }\n    });\n    if (!markers) return null;\n    var parts = [{from: from, to: to}];\n    for (var i = 0; i < markers.length; ++i) {\n      var mk = markers[i], m = mk.find(0);\n      for (var j = 0; j < parts.length; ++j) {\n        var p = parts[j];\n        if (cmp(p.to, m.from) < 0 || cmp(p.from, m.to) > 0) continue;\n        var newParts = [j, 1], dfrom = cmp(p.from, m.from), dto = cmp(p.to, m.to);\n        if (dfrom < 0 || !mk.inclusiveLeft && !dfrom)\n          newParts.push({from: p.from, to: m.from});\n        if (dto > 0 || !mk.inclusiveRight && !dto)\n          newParts.push({from: m.to, to: p.to});\n        parts.splice.apply(parts, newParts);\n        j += newParts.length - 1;\n      }\n    }\n    return parts;\n  }\n\n  // Connect or disconnect spans from a line.\n  function detachMarkedSpans(line) {\n    var spans = line.markedSpans;\n    if (!spans) return;\n    for (var i = 0; i < spans.length; ++i)\n      spans[i].marker.detachLine(line);\n    line.markedSpans = null;\n  }\n  function attachMarkedSpans(line, spans) {\n    if (!spans) return;\n    for (var i = 0; i < spans.length; ++i)\n      spans[i].marker.attachLine(line);\n    line.markedSpans = spans;\n  }\n\n  // Helpers used when computing which overlapping collapsed span\n  // counts as the larger one.\n  function extraLeft(marker) { return marker.inclusiveLeft ? -1 : 0; }\n  function extraRight(marker) { return marker.inclusiveRight ? 1 : 0; }\n\n  // Returns a number indicating which of two overlapping collapsed\n  // spans is larger (and thus includes the other). Falls back to\n  // comparing ids when the spans cover exactly the same range.\n  function compareCollapsedMarkers(a, b) {\n    var lenDiff = a.lines.length - b.lines.length;\n    if (lenDiff != 0) return lenDiff;\n    var aPos = a.find(), bPos = b.find();\n    var fromCmp = cmp(aPos.from, bPos.from) || extraLeft(a) - extraLeft(b);\n    if (fromCmp) return -fromCmp;\n    var toCmp = cmp(aPos.to, bPos.to) || extraRight(a) - extraRight(b);\n    if (toCmp) return toCmp;\n    return b.id - a.id;\n  }\n\n  // Find out whether a line ends or starts in a collapsed span. If\n  // so, return the marker for that span.\n  function collapsedSpanAtSide(line, start) {\n    var sps = sawCollapsedSpans && line.markedSpans, found;\n    if (sps) for (var sp, i = 0; i < sps.length; ++i) {\n      sp = sps[i];\n      if (sp.marker.collapsed && (start ? sp.from : sp.to) == null &&\n          (!found || compareCollapsedMarkers(found, sp.marker) < 0))\n        found = sp.marker;\n    }\n    return found;\n  }\n  function collapsedSpanAtStart(line) { return collapsedSpanAtSide(line, true); }\n  function collapsedSpanAtEnd(line) { return collapsedSpanAtSide(line, false); }\n\n  // Test whether there exists a collapsed span that partially\n  // overlaps (covers the start or end, but not both) of a new span.\n  // Such overlap is not allowed.\n  function conflictingCollapsedRange(doc, lineNo, from, to, marker) {\n    var line = getLine(doc, lineNo);\n    var sps = sawCollapsedSpans && line.markedSpans;\n    if (sps) for (var i = 0; i < sps.length; ++i) {\n      var sp = sps[i];\n      if (!sp.marker.collapsed) continue;\n      var found = sp.marker.find(0);\n      var fromCmp = cmp(found.from, from) || extraLeft(sp.marker) - extraLeft(marker);\n      var toCmp = cmp(found.to, to) || extraRight(sp.marker) - extraRight(marker);\n      if (fromCmp >= 0 && toCmp <= 0 || fromCmp <= 0 && toCmp >= 0) continue;\n      if (fromCmp <= 0 && (cmp(found.to, from) > 0 || (sp.marker.inclusiveRight && marker.inclusiveLeft)) ||\n          fromCmp >= 0 && (cmp(found.from, to) < 0 || (sp.marker.inclusiveLeft && marker.inclusiveRight)))\n        return true;\n    }\n  }\n\n  // A visual line is a line as drawn on the screen. Folding, for\n  // example, can cause multiple logical lines to appear on the same\n  // visual line. This finds the start of the visual line that the\n  // given line is part of (usually that is the line itself).\n  function visualLine(line) {\n    var merged;\n    while (merged = collapsedSpanAtStart(line))\n      line = merged.find(-1, true).line;\n    return line;\n  }\n\n  // Returns an array of logical lines that continue the visual line\n  // started by the argument, or undefined if there are no such lines.\n  function visualLineContinued(line) {\n    var merged, lines;\n    while (merged = collapsedSpanAtEnd(line)) {\n      line = merged.find(1, true).line;\n      (lines || (lines = [])).push(line);\n    }\n    return lines;\n  }\n\n  // Get the line number of the start of the visual line that the\n  // given line number is part of.\n  function visualLineNo(doc, lineN) {\n    var line = getLine(doc, lineN), vis = visualLine(line);\n    if (line == vis) return lineN;\n    return lineNo(vis);\n  }\n  // Get the line number of the start of the next visual line after\n  // the given line.\n  function visualLineEndNo(doc, lineN) {\n    if (lineN > doc.lastLine()) return lineN;\n    var line = getLine(doc, lineN), merged;\n    if (!lineIsHidden(doc, line)) return lineN;\n    while (merged = collapsedSpanAtEnd(line))\n      line = merged.find(1, true).line;\n    return lineNo(line) + 1;\n  }\n\n  // Compute whether a line is hidden. Lines count as hidden when they\n  // are part of a visual line that starts with another line, or when\n  // they are entirely covered by collapsed, non-widget span.\n  function lineIsHidden(doc, line) {\n    var sps = sawCollapsedSpans && line.markedSpans;\n    if (sps) for (var sp, i = 0; i < sps.length; ++i) {\n      sp = sps[i];\n      if (!sp.marker.collapsed) continue;\n      if (sp.from == null) return true;\n      if (sp.marker.widgetNode) continue;\n      if (sp.from == 0 && sp.marker.inclusiveLeft && lineIsHiddenInner(doc, line, sp))\n        return true;\n    }\n  }\n  function lineIsHiddenInner(doc, line, span) {\n    if (span.to == null) {\n      var end = span.marker.find(1, true);\n      return lineIsHiddenInner(doc, end.line, getMarkedSpanFor(end.line.markedSpans, span.marker));\n    }\n    if (span.marker.inclusiveRight && span.to == line.text.length)\n      return true;\n    for (var sp, i = 0; i < line.markedSpans.length; ++i) {\n      sp = line.markedSpans[i];\n      if (sp.marker.collapsed && !sp.marker.widgetNode && sp.from == span.to &&\n          (sp.to == null || sp.to != span.from) &&\n          (sp.marker.inclusiveLeft || span.marker.inclusiveRight) &&\n          lineIsHiddenInner(doc, line, sp)) return true;\n    }\n  }\n\n  // LINE WIDGETS\n\n  // Line widgets are block elements displayed above or below a line.\n\n  var LineWidget = CodeMirror.LineWidget = function(doc, node, options) {\n    if (options) for (var opt in options) if (options.hasOwnProperty(opt))\n      this[opt] = options[opt];\n    this.doc = doc;\n    this.node = node;\n  };\n  eventMixin(LineWidget);\n\n  function adjustScrollWhenAboveVisible(cm, line, diff) {\n    if (heightAtLine(line) < ((cm.curOp && cm.curOp.scrollTop) || cm.doc.scrollTop))\n      addToScrollPos(cm, null, diff);\n  }\n\n  LineWidget.prototype.clear = function() {\n    var cm = this.doc.cm, ws = this.line.widgets, line = this.line, no = lineNo(line);\n    if (no == null || !ws) return;\n    for (var i = 0; i < ws.length; ++i) if (ws[i] == this) ws.splice(i--, 1);\n    if (!ws.length) line.widgets = null;\n    var height = widgetHeight(this);\n    updateLineHeight(line, Math.max(0, line.height - height));\n    if (cm) runInOp(cm, function() {\n      adjustScrollWhenAboveVisible(cm, line, -height);\n      regLineChange(cm, no, \"widget\");\n    });\n  };\n  LineWidget.prototype.changed = function() {\n    var oldH = this.height, cm = this.doc.cm, line = this.line;\n    this.height = null;\n    var diff = widgetHeight(this) - oldH;\n    if (!diff) return;\n    updateLineHeight(line, line.height + diff);\n    if (cm) runInOp(cm, function() {\n      cm.curOp.forceUpdate = true;\n      adjustScrollWhenAboveVisible(cm, line, diff);\n    });\n  };\n\n  function widgetHeight(widget) {\n    if (widget.height != null) return widget.height;\n    var cm = widget.doc.cm;\n    if (!cm) return 0;\n    if (!contains(document.body, widget.node)) {\n      var parentStyle = \"position: relative;\";\n      if (widget.coverGutter)\n        parentStyle += \"margin-left: -\" + cm.display.gutters.offsetWidth + \"px;\";\n      if (widget.noHScroll)\n        parentStyle += \"width: \" + cm.display.wrapper.clientWidth + \"px;\";\n      removeChildrenAndAdd(cm.display.measure, elt(\"div\", [widget.node], null, parentStyle));\n    }\n    return widget.height = widget.node.parentNode.offsetHeight;\n  }\n\n  function addLineWidget(doc, handle, node, options) {\n    var widget = new LineWidget(doc, node, options);\n    var cm = doc.cm;\n    if (cm && widget.noHScroll) cm.display.alignWidgets = true;\n    changeLine(doc, handle, \"widget\", function(line) {\n      var widgets = line.widgets || (line.widgets = []);\n      if (widget.insertAt == null) widgets.push(widget);\n      else widgets.splice(Math.min(widgets.length - 1, Math.max(0, widget.insertAt)), 0, widget);\n      widget.line = line;\n      if (cm && !lineIsHidden(doc, line)) {\n        var aboveVisible = heightAtLine(line) < doc.scrollTop;\n        updateLineHeight(line, line.height + widgetHeight(widget));\n        if (aboveVisible) addToScrollPos(cm, null, widget.height);\n        cm.curOp.forceUpdate = true;\n      }\n      return true;\n    });\n    return widget;\n  }\n\n  // LINE DATA STRUCTURE\n\n  // Line objects. These hold state related to a line, including\n  // highlighting info (the styles array).\n  var Line = CodeMirror.Line = function(text, markedSpans, estimateHeight) {\n    this.text = text;\n    attachMarkedSpans(this, markedSpans);\n    this.height = estimateHeight ? estimateHeight(this) : 1;\n  };\n  eventMixin(Line);\n  Line.prototype.lineNo = function() { return lineNo(this); };\n\n  // Change the content (text, markers) of a line. Automatically\n  // invalidates cached information and tries to re-estimate the\n  // line's height.\n  function updateLine(line, text, markedSpans, estimateHeight) {\n    line.text = text;\n    if (line.stateAfter) line.stateAfter = null;\n    if (line.styles) line.styles = null;\n    if (line.order != null) line.order = null;\n    detachMarkedSpans(line);\n    attachMarkedSpans(line, markedSpans);\n    var estHeight = estimateHeight ? estimateHeight(line) : 1;\n    if (estHeight != line.height) updateLineHeight(line, estHeight);\n  }\n\n  // Detach a line from the document tree and its markers.\n  function cleanUpLine(line) {\n    line.parent = null;\n    detachMarkedSpans(line);\n  }\n\n  function extractLineClasses(type, output) {\n    if (type) for (;;) {\n      var lineClass = type.match(/(?:^|\\s+)line-(background-)?(\\S+)/);\n      if (!lineClass) break;\n      type = type.slice(0, lineClass.index) + type.slice(lineClass.index + lineClass[0].length);\n      var prop = lineClass[1] ? \"bgClass\" : \"textClass\";\n      if (output[prop] == null)\n        output[prop] = lineClass[2];\n      else if (!(new RegExp(\"(?:^|\\s)\" + lineClass[2] + \"(?:$|\\s)\")).test(output[prop]))\n        output[prop] += \" \" + lineClass[2];\n    }\n    return type;\n  }\n\n  function callBlankLine(mode, state) {\n    if (mode.blankLine) return mode.blankLine(state);\n    if (!mode.innerMode) return;\n    var inner = CodeMirror.innerMode(mode, state);\n    if (inner.mode.blankLine) return inner.mode.blankLine(inner.state);\n  }\n\n  function readToken(mode, stream, state, inner) {\n    for (var i = 0; i < 10; i++) {\n      if (inner) inner[0] = CodeMirror.innerMode(mode, state).mode;\n      var style = mode.token(stream, state);\n      if (stream.pos > stream.start) return style;\n    }\n    throw new Error(\"Mode \" + mode.name + \" failed to advance stream.\");\n  }\n\n  // Utility for getTokenAt and getLineTokens\n  function takeToken(cm, pos, precise, asArray) {\n    function getObj(copy) {\n      return {start: stream.start, end: stream.pos,\n              string: stream.current(),\n              type: style || null,\n              state: copy ? copyState(doc.mode, state) : state};\n    }\n\n    var doc = cm.doc, mode = doc.mode, style;\n    pos = clipPos(doc, pos);\n    var line = getLine(doc, pos.line), state = getStateBefore(cm, pos.line, precise);\n    var stream = new StringStream(line.text, cm.options.tabSize), tokens;\n    if (asArray) tokens = [];\n    while ((asArray || stream.pos < pos.ch) && !stream.eol()) {\n      stream.start = stream.pos;\n      style = readToken(mode, stream, state);\n      if (asArray) tokens.push(getObj(true));\n    }\n    return asArray ? tokens : getObj();\n  }\n\n  // Run the given mode's parser over a line, calling f for each token.\n  function runMode(cm, text, mode, state, f, lineClasses, forceToEnd) {\n    var flattenSpans = mode.flattenSpans;\n    if (flattenSpans == null) flattenSpans = cm.options.flattenSpans;\n    var curStart = 0, curStyle = null;\n    var stream = new StringStream(text, cm.options.tabSize), style;\n    var inner = cm.options.addModeClass && [null];\n    if (text == \"\") extractLineClasses(callBlankLine(mode, state), lineClasses);\n    while (!stream.eol()) {\n      if (stream.pos > cm.options.maxHighlightLength) {\n        flattenSpans = false;\n        if (forceToEnd) processLine(cm, text, state, stream.pos);\n        stream.pos = text.length;\n        style = null;\n      } else {\n        style = extractLineClasses(readToken(mode, stream, state, inner), lineClasses);\n      }\n      if (inner) {\n        var mName = inner[0].name;\n        if (mName) style = \"m-\" + (style ? mName + \" \" + style : mName);\n      }\n      if (!flattenSpans || curStyle != style) {\n        while (curStart < stream.start) {\n          curStart = Math.min(stream.start, curStart + 50000);\n          f(curStart, curStyle);\n        }\n        curStyle = style;\n      }\n      stream.start = stream.pos;\n    }\n    while (curStart < stream.pos) {\n      // Webkit seems to refuse to render text nodes longer than 57444 characters\n      var pos = Math.min(stream.pos, curStart + 50000);\n      f(pos, curStyle);\n      curStart = pos;\n    }\n  }\n\n  // Compute a style array (an array starting with a mode generation\n  // -- for invalidation -- followed by pairs of end positions and\n  // style strings), which is used to highlight the tokens on the\n  // line.\n  function highlightLine(cm, line, state, forceToEnd) {\n    // A styles array always starts with a number identifying the\n    // mode/overlays that it is based on (for easy invalidation).\n    var st = [cm.state.modeGen], lineClasses = {};\n    // Compute the base array of styles\n    runMode(cm, line.text, cm.doc.mode, state, function(end, style) {\n      st.push(end, style);\n    }, lineClasses, forceToEnd);\n\n    // Run overlays, adjust style array.\n    for (var o = 0; o < cm.state.overlays.length; ++o) {\n      var overlay = cm.state.overlays[o], i = 1, at = 0;\n      runMode(cm, line.text, overlay.mode, true, function(end, style) {\n        var start = i;\n        // Ensure there's a token end at the current position, and that i points at it\n        while (at < end) {\n          var i_end = st[i];\n          if (i_end > end)\n            st.splice(i, 1, end, st[i+1], i_end);\n          i += 2;\n          at = Math.min(end, i_end);\n        }\n        if (!style) return;\n        if (overlay.opaque) {\n          st.splice(start, i - start, end, \"cm-overlay \" + style);\n          i = start + 2;\n        } else {\n          for (; start < i; start += 2) {\n            var cur = st[start+1];\n            st[start+1] = (cur ? cur + \" \" : \"\") + \"cm-overlay \" + style;\n          }\n        }\n      }, lineClasses);\n    }\n\n    return {styles: st, classes: lineClasses.bgClass || lineClasses.textClass ? lineClasses : null};\n  }\n\n  function getLineStyles(cm, line, updateFrontier) {\n    if (!line.styles || line.styles[0] != cm.state.modeGen) {\n      var state = getStateBefore(cm, lineNo(line));\n      var result = highlightLine(cm, line, line.text.length > cm.options.maxHighlightLength ? copyState(cm.doc.mode, state) : state);\n      line.stateAfter = state;\n      line.styles = result.styles;\n      if (result.classes) line.styleClasses = result.classes;\n      else if (line.styleClasses) line.styleClasses = null;\n      if (updateFrontier === cm.doc.frontier) cm.doc.frontier++;\n    }\n    return line.styles;\n  }\n\n  // Lightweight form of highlight -- proceed over this line and\n  // update state, but don't save a style array. Used for lines that\n  // aren't currently visible.\n  function processLine(cm, text, state, startAt) {\n    var mode = cm.doc.mode;\n    var stream = new StringStream(text, cm.options.tabSize);\n    stream.start = stream.pos = startAt || 0;\n    if (text == \"\") callBlankLine(mode, state);\n    while (!stream.eol()) {\n      readToken(mode, stream, state);\n      stream.start = stream.pos;\n    }\n  }\n\n  // Convert a style as returned by a mode (either null, or a string\n  // containing one or more styles) to a CSS style. This is cached,\n  // and also looks for line-wide styles.\n  var styleToClassCache = {}, styleToClassCacheWithMode = {};\n  function interpretTokenStyle(style, options) {\n    if (!style || /^\\s*$/.test(style)) return null;\n    var cache = options.addModeClass ? styleToClassCacheWithMode : styleToClassCache;\n    return cache[style] ||\n      (cache[style] = style.replace(/\\S+/g, \"cm-$&\"));\n  }\n\n  // Render the DOM representation of the text of a line. Also builds\n  // up a 'line map', which points at the DOM nodes that represent\n  // specific stretches of text, and is used by the measuring code.\n  // The returned object contains the DOM node, this map, and\n  // information about line-wide styles that were set by the mode.\n  function buildLineContent(cm, lineView) {\n    // The padding-right forces the element to have a 'border', which\n    // is needed on Webkit to be able to get line-level bounding\n    // rectangles for it (in measureChar).\n    var content = elt(\"span\", null, null, webkit ? \"padding-right: .1px\" : null);\n    var builder = {pre: elt(\"pre\", [content], \"CodeMirror-line\"), content: content,\n                   col: 0, pos: 0, cm: cm,\n                   splitSpaces: (ie || webkit) && cm.getOption(\"lineWrapping\")};\n    lineView.measure = {};\n\n    // Iterate over the logical lines that make up this visual line.\n    for (var i = 0; i <= (lineView.rest ? lineView.rest.length : 0); i++) {\n      var line = i ? lineView.rest[i - 1] : lineView.line, order;\n      builder.pos = 0;\n      builder.addToken = buildToken;\n      // Optionally wire in some hacks into the token-rendering\n      // algorithm, to deal with browser quirks.\n      if (hasBadBidiRects(cm.display.measure) && (order = getOrder(line)))\n        builder.addToken = buildTokenBadBidi(builder.addToken, order);\n      builder.map = [];\n      var allowFrontierUpdate = lineView != cm.display.externalMeasured && lineNo(line);\n      insertLineContent(line, builder, getLineStyles(cm, line, allowFrontierUpdate));\n      if (line.styleClasses) {\n        if (line.styleClasses.bgClass)\n          builder.bgClass = joinClasses(line.styleClasses.bgClass, builder.bgClass || \"\");\n        if (line.styleClasses.textClass)\n          builder.textClass = joinClasses(line.styleClasses.textClass, builder.textClass || \"\");\n      }\n\n      // Ensure at least a single node is present, for measuring.\n      if (builder.map.length == 0)\n        builder.map.push(0, 0, builder.content.appendChild(zeroWidthElement(cm.display.measure)));\n\n      // Store the map and a cache object for the current logical line\n      if (i == 0) {\n        lineView.measure.map = builder.map;\n        lineView.measure.cache = {};\n      } else {\n        (lineView.measure.maps || (lineView.measure.maps = [])).push(builder.map);\n        (lineView.measure.caches || (lineView.measure.caches = [])).push({});\n      }\n    }\n\n    // See issue #2901\n    if (webkit && /\\bcm-tab\\b/.test(builder.content.lastChild.className))\n      builder.content.className = \"cm-tab-wrap-hack\";\n\n    signal(cm, \"renderLine\", cm, lineView.line, builder.pre);\n    if (builder.pre.className)\n      builder.textClass = joinClasses(builder.pre.className, builder.textClass || \"\");\n\n    return builder;\n  }\n\n  function defaultSpecialCharPlaceholder(ch) {\n    var token = elt(\"span\", \"\\u2022\", \"cm-invalidchar\");\n    token.title = \"\\\\u\" + ch.charCodeAt(0).toString(16);\n    token.setAttribute(\"aria-label\", token.title);\n    return token;\n  }\n\n  // Build up the DOM representation for a single token, and add it to\n  // the line map. Takes care to render special characters separately.\n  function buildToken(builder, text, style, startStyle, endStyle, title, css) {\n    if (!text) return;\n    var displayText = builder.splitSpaces ? text.replace(/ {3,}/g, splitSpaces) : text;\n    var special = builder.cm.state.specialChars, mustWrap = false;\n    if (!special.test(text)) {\n      builder.col += text.length;\n      var content = document.createTextNode(displayText);\n      builder.map.push(builder.pos, builder.pos + text.length, content);\n      if (ie && ie_version < 9) mustWrap = true;\n      builder.pos += text.length;\n    } else {\n      var content = document.createDocumentFragment(), pos = 0;\n      while (true) {\n        special.lastIndex = pos;\n        var m = special.exec(text);\n        var skipped = m ? m.index - pos : text.length - pos;\n        if (skipped) {\n          var txt = document.createTextNode(displayText.slice(pos, pos + skipped));\n          if (ie && ie_version < 9) content.appendChild(elt(\"span\", [txt]));\n          else content.appendChild(txt);\n          builder.map.push(builder.pos, builder.pos + skipped, txt);\n          builder.col += skipped;\n          builder.pos += skipped;\n        }\n        if (!m) break;\n        pos += skipped + 1;\n        if (m[0] == \"\\t\") {\n          var tabSize = builder.cm.options.tabSize, tabWidth = tabSize - builder.col % tabSize;\n          var txt = content.appendChild(elt(\"span\", spaceStr(tabWidth), \"cm-tab\"));\n          txt.setAttribute(\"role\", \"presentation\");\n          txt.setAttribute(\"cm-text\", \"\\t\");\n          builder.col += tabWidth;\n        } else if (m[0] == \"\\r\" || m[0] == \"\\n\") {\n          var txt = content.appendChild(elt(\"span\", m[0] == \"\\r\" ? \"\\u240d\" : \"\\u2424\", \"cm-invalidchar\"));\n          txt.setAttribute(\"cm-text\", m[0]);\n          builder.col += 1;\n        } else {\n          var txt = builder.cm.options.specialCharPlaceholder(m[0]);\n          txt.setAttribute(\"cm-text\", m[0]);\n          if (ie && ie_version < 9) content.appendChild(elt(\"span\", [txt]));\n          else content.appendChild(txt);\n          builder.col += 1;\n        }\n        builder.map.push(builder.pos, builder.pos + 1, txt);\n        builder.pos++;\n      }\n    }\n    if (style || startStyle || endStyle || mustWrap || css) {\n      var fullStyle = style || \"\";\n      if (startStyle) fullStyle += startStyle;\n      if (endStyle) fullStyle += endStyle;\n      var token = elt(\"span\", [content], fullStyle, css);\n      if (title) token.title = title;\n      return builder.content.appendChild(token);\n    }\n    builder.content.appendChild(content);\n  }\n\n  function splitSpaces(old) {\n    var out = \" \";\n    for (var i = 0; i < old.length - 2; ++i) out += i % 2 ? \" \" : \"\\u00a0\";\n    out += \" \";\n    return out;\n  }\n\n  // Work around nonsense dimensions being reported for stretches of\n  // right-to-left text.\n  function buildTokenBadBidi(inner, order) {\n    return function(builder, text, style, startStyle, endStyle, title, css) {\n      style = style ? style + \" cm-force-border\" : \"cm-force-border\";\n      var start = builder.pos, end = start + text.length;\n      for (;;) {\n        // Find the part that overlaps with the start of this text\n        for (var i = 0; i < order.length; i++) {\n          var part = order[i];\n          if (part.to > start && part.from <= start) break;\n        }\n        if (part.to >= end) return inner(builder, text, style, startStyle, endStyle, title, css);\n        inner(builder, text.slice(0, part.to - start), style, startStyle, null, title, css);\n        startStyle = null;\n        text = text.slice(part.to - start);\n        start = part.to;\n      }\n    };\n  }\n\n  function buildCollapsedSpan(builder, size, marker, ignoreWidget) {\n    var widget = !ignoreWidget && marker.widgetNode;\n    if (widget) builder.map.push(builder.pos, builder.pos + size, widget);\n    if (!ignoreWidget && builder.cm.display.input.needsContentAttribute) {\n      if (!widget)\n        widget = builder.content.appendChild(document.createElement(\"span\"));\n      widget.setAttribute(\"cm-marker\", marker.id);\n    }\n    if (widget) {\n      builder.cm.display.input.setUneditable(widget);\n      builder.content.appendChild(widget);\n    }\n    builder.pos += size;\n  }\n\n  // Outputs a number of spans to make up a line, taking highlighting\n  // and marked text into account.\n  function insertLineContent(line, builder, styles) {\n    var spans = line.markedSpans, allText = line.text, at = 0;\n    if (!spans) {\n      for (var i = 1; i < styles.length; i+=2)\n        builder.addToken(builder, allText.slice(at, at = styles[i]), interpretTokenStyle(styles[i+1], builder.cm.options));\n      return;\n    }\n\n    var len = allText.length, pos = 0, i = 1, text = \"\", style, css;\n    var nextChange = 0, spanStyle, spanEndStyle, spanStartStyle, title, collapsed;\n    for (;;) {\n      if (nextChange == pos) { // Update current marker set\n        spanStyle = spanEndStyle = spanStartStyle = title = css = \"\";\n        collapsed = null; nextChange = Infinity;\n        var foundBookmarks = [], endStyles\n        for (var j = 0; j < spans.length; ++j) {\n          var sp = spans[j], m = sp.marker;\n          if (m.type == \"bookmark\" && sp.from == pos && m.widgetNode) {\n            foundBookmarks.push(m);\n          } else if (sp.from <= pos && (sp.to == null || sp.to > pos || m.collapsed && sp.to == pos && sp.from == pos)) {\n            if (sp.to != null && sp.to != pos && nextChange > sp.to) {\n              nextChange = sp.to;\n              spanEndStyle = \"\";\n            }\n            if (m.className) spanStyle += \" \" + m.className;\n            if (m.css) css = (css ? css + \";\" : \"\") + m.css;\n            if (m.startStyle && sp.from == pos) spanStartStyle += \" \" + m.startStyle;\n            if (m.endStyle && sp.to == nextChange) (endStyles || (endStyles = [])).push(m.endStyle, sp.to)\n            if (m.title && !title) title = m.title;\n            if (m.collapsed && (!collapsed || compareCollapsedMarkers(collapsed.marker, m) < 0))\n              collapsed = sp;\n          } else if (sp.from > pos && nextChange > sp.from) {\n            nextChange = sp.from;\n          }\n        }\n        if (endStyles) for (var j = 0; j < endStyles.length; j += 2)\n          if (endStyles[j + 1] == nextChange) spanEndStyle += \" \" + endStyles[j]\n\n        if (!collapsed || collapsed.from == pos) for (var j = 0; j < foundBookmarks.length; ++j)\n          buildCollapsedSpan(builder, 0, foundBookmarks[j]);\n        if (collapsed && (collapsed.from || 0) == pos) {\n          buildCollapsedSpan(builder, (collapsed.to == null ? len + 1 : collapsed.to) - pos,\n                             collapsed.marker, collapsed.from == null);\n          if (collapsed.to == null) return;\n          if (collapsed.to == pos) collapsed = false;\n        }\n      }\n      if (pos >= len) break;\n\n      var upto = Math.min(len, nextChange);\n      while (true) {\n        if (text) {\n          var end = pos + text.length;\n          if (!collapsed) {\n            var tokenText = end > upto ? text.slice(0, upto - pos) : text;\n            builder.addToken(builder, tokenText, style ? style + spanStyle : spanStyle,\n                             spanStartStyle, pos + tokenText.length == nextChange ? spanEndStyle : \"\", title, css);\n          }\n          if (end >= upto) {text = text.slice(upto - pos); pos = upto; break;}\n          pos = end;\n          spanStartStyle = \"\";\n        }\n        text = allText.slice(at, at = styles[i++]);\n        style = interpretTokenStyle(styles[i++], builder.cm.options);\n      }\n    }\n  }\n\n  // DOCUMENT DATA STRUCTURE\n\n  // By default, updates that start and end at the beginning of a line\n  // are treated specially, in order to make the association of line\n  // widgets and marker elements with the text behave more intuitive.\n  function isWholeLineUpdate(doc, change) {\n    return change.from.ch == 0 && change.to.ch == 0 && lst(change.text) == \"\" &&\n      (!doc.cm || doc.cm.options.wholeLineUpdateBefore);\n  }\n\n  // Perform a change on the document data structure.\n  function updateDoc(doc, change, markedSpans, estimateHeight) {\n    function spansFor(n) {return markedSpans ? markedSpans[n] : null;}\n    function update(line, text, spans) {\n      updateLine(line, text, spans, estimateHeight);\n      signalLater(line, \"change\", line, change);\n    }\n    function linesFor(start, end) {\n      for (var i = start, result = []; i < end; ++i)\n        result.push(new Line(text[i], spansFor(i), estimateHeight));\n      return result;\n    }\n\n    var from = change.from, to = change.to, text = change.text;\n    var firstLine = getLine(doc, from.line), lastLine = getLine(doc, to.line);\n    var lastText = lst(text), lastSpans = spansFor(text.length - 1), nlines = to.line - from.line;\n\n    // Adjust the line structure\n    if (change.full) {\n      doc.insert(0, linesFor(0, text.length));\n      doc.remove(text.length, doc.size - text.length);\n    } else if (isWholeLineUpdate(doc, change)) {\n      // This is a whole-line replace. Treated specially to make\n      // sure line objects move the way they are supposed to.\n      var added = linesFor(0, text.length - 1);\n      update(lastLine, lastLine.text, lastSpans);\n      if (nlines) doc.remove(from.line, nlines);\n      if (added.length) doc.insert(from.line, added);\n    } else if (firstLine == lastLine) {\n      if (text.length == 1) {\n        update(firstLine, firstLine.text.slice(0, from.ch) + lastText + firstLine.text.slice(to.ch), lastSpans);\n      } else {\n        var added = linesFor(1, text.length - 1);\n        added.push(new Line(lastText + firstLine.text.slice(to.ch), lastSpans, estimateHeight));\n        update(firstLine, firstLine.text.slice(0, from.ch) + text[0], spansFor(0));\n        doc.insert(from.line + 1, added);\n      }\n    } else if (text.length == 1) {\n      update(firstLine, firstLine.text.slice(0, from.ch) + text[0] + lastLine.text.slice(to.ch), spansFor(0));\n      doc.remove(from.line + 1, nlines);\n    } else {\n      update(firstLine, firstLine.text.slice(0, from.ch) + text[0], spansFor(0));\n      update(lastLine, lastText + lastLine.text.slice(to.ch), lastSpans);\n      var added = linesFor(1, text.length - 1);\n      if (nlines > 1) doc.remove(from.line + 1, nlines - 1);\n      doc.insert(from.line + 1, added);\n    }\n\n    signalLater(doc, \"change\", doc, change);\n  }\n\n  // The document is represented as a BTree consisting of leaves, with\n  // chunk of lines in them, and branches, with up to ten leaves or\n  // other branch nodes below them. The top node is always a branch\n  // node, and is the document object itself (meaning it has\n  // additional methods and properties).\n  //\n  // All nodes have parent links. The tree is used both to go from\n  // line numbers to line objects, and to go from objects to numbers.\n  // It also indexes by height, and is used to convert between height\n  // and line object, and to find the total height of the document.\n  //\n  // See also http://marijnhaverbeke.nl/blog/codemirror-line-tree.html\n\n  function LeafChunk(lines) {\n    this.lines = lines;\n    this.parent = null;\n    for (var i = 0, height = 0; i < lines.length; ++i) {\n      lines[i].parent = this;\n      height += lines[i].height;\n    }\n    this.height = height;\n  }\n\n  LeafChunk.prototype = {\n    chunkSize: function() { return this.lines.length; },\n    // Remove the n lines at offset 'at'.\n    removeInner: function(at, n) {\n      for (var i = at, e = at + n; i < e; ++i) {\n        var line = this.lines[i];\n        this.height -= line.height;\n        cleanUpLine(line);\n        signalLater(line, \"delete\");\n      }\n      this.lines.splice(at, n);\n    },\n    // Helper used to collapse a small branch into a single leaf.\n    collapse: function(lines) {\n      lines.push.apply(lines, this.lines);\n    },\n    // Insert the given array of lines at offset 'at', count them as\n    // having the given height.\n    insertInner: function(at, lines, height) {\n      this.height += height;\n      this.lines = this.lines.slice(0, at).concat(lines).concat(this.lines.slice(at));\n      for (var i = 0; i < lines.length; ++i) lines[i].parent = this;\n    },\n    // Used to iterate over a part of the tree.\n    iterN: function(at, n, op) {\n      for (var e = at + n; at < e; ++at)\n        if (op(this.lines[at])) return true;\n    }\n  };\n\n  function BranchChunk(children) {\n    this.children = children;\n    var size = 0, height = 0;\n    for (var i = 0; i < children.length; ++i) {\n      var ch = children[i];\n      size += ch.chunkSize(); height += ch.height;\n      ch.parent = this;\n    }\n    this.size = size;\n    this.height = height;\n    this.parent = null;\n  }\n\n  BranchChunk.prototype = {\n    chunkSize: function() { return this.size; },\n    removeInner: function(at, n) {\n      this.size -= n;\n      for (var i = 0; i < this.children.length; ++i) {\n        var child = this.children[i], sz = child.chunkSize();\n        if (at < sz) {\n          var rm = Math.min(n, sz - at), oldHeight = child.height;\n          child.removeInner(at, rm);\n          this.height -= oldHeight - child.height;\n          if (sz == rm) { this.children.splice(i--, 1); child.parent = null; }\n          if ((n -= rm) == 0) break;\n          at = 0;\n        } else at -= sz;\n      }\n      // If the result is smaller than 25 lines, ensure that it is a\n      // single leaf node.\n      if (this.size - n < 25 &&\n          (this.children.length > 1 || !(this.children[0] instanceof LeafChunk))) {\n        var lines = [];\n        this.collapse(lines);\n        this.children = [new LeafChunk(lines)];\n        this.children[0].parent = this;\n      }\n    },\n    collapse: function(lines) {\n      for (var i = 0; i < this.children.length; ++i) this.children[i].collapse(lines);\n    },\n    insertInner: function(at, lines, height) {\n      this.size += lines.length;\n      this.height += height;\n      for (var i = 0; i < this.children.length; ++i) {\n        var child = this.children[i], sz = child.chunkSize();\n        if (at <= sz) {\n          child.insertInner(at, lines, height);\n          if (child.lines && child.lines.length > 50) {\n            while (child.lines.length > 50) {\n              var spilled = child.lines.splice(child.lines.length - 25, 25);\n              var newleaf = new LeafChunk(spilled);\n              child.height -= newleaf.height;\n              this.children.splice(i + 1, 0, newleaf);\n              newleaf.parent = this;\n            }\n            this.maybeSpill();\n          }\n          break;\n        }\n        at -= sz;\n      }\n    },\n    // When a node has grown, check whether it should be split.\n    maybeSpill: function() {\n      if (this.children.length <= 10) return;\n      var me = this;\n      do {\n        var spilled = me.children.splice(me.children.length - 5, 5);\n        var sibling = new BranchChunk(spilled);\n        if (!me.parent) { // Become the parent node\n          var copy = new BranchChunk(me.children);\n          copy.parent = me;\n          me.children = [copy, sibling];\n          me = copy;\n        } else {\n          me.size -= sibling.size;\n          me.height -= sibling.height;\n          var myIndex = indexOf(me.parent.children, me);\n          me.parent.children.splice(myIndex + 1, 0, sibling);\n        }\n        sibling.parent = me.parent;\n      } while (me.children.length > 10);\n      me.parent.maybeSpill();\n    },\n    iterN: function(at, n, op) {\n      for (var i = 0; i < this.children.length; ++i) {\n        var child = this.children[i], sz = child.chunkSize();\n        if (at < sz) {\n          var used = Math.min(n, sz - at);\n          if (child.iterN(at, used, op)) return true;\n          if ((n -= used) == 0) break;\n          at = 0;\n        } else at -= sz;\n      }\n    }\n  };\n\n  var nextDocId = 0;\n  var Doc = CodeMirror.Doc = function(text, mode, firstLine, lineSep) {\n    if (!(this instanceof Doc)) return new Doc(text, mode, firstLine, lineSep);\n    if (firstLine == null) firstLine = 0;\n\n    BranchChunk.call(this, [new LeafChunk([new Line(\"\", null)])]);\n    this.first = firstLine;\n    this.scrollTop = this.scrollLeft = 0;\n    this.cantEdit = false;\n    this.cleanGeneration = 1;\n    this.frontier = firstLine;\n    var start = Pos(firstLine, 0);\n    this.sel = simpleSelection(start);\n    this.history = new History(null);\n    this.id = ++nextDocId;\n    this.modeOption = mode;\n    this.lineSep = lineSep;\n    this.extend = false;\n\n    if (typeof text == \"string\") text = this.splitLines(text);\n    updateDoc(this, {from: start, to: start, text: text});\n    setSelection(this, simpleSelection(start), sel_dontScroll);\n  };\n\n  Doc.prototype = createObj(BranchChunk.prototype, {\n    constructor: Doc,\n    // Iterate over the document. Supports two forms -- with only one\n    // argument, it calls that for each line in the document. With\n    // three, it iterates over the range given by the first two (with\n    // the second being non-inclusive).\n    iter: function(from, to, op) {\n      if (op) this.iterN(from - this.first, to - from, op);\n      else this.iterN(this.first, this.first + this.size, from);\n    },\n\n    // Non-public interface for adding and removing lines.\n    insert: function(at, lines) {\n      var height = 0;\n      for (var i = 0; i < lines.length; ++i) height += lines[i].height;\n      this.insertInner(at - this.first, lines, height);\n    },\n    remove: function(at, n) { this.removeInner(at - this.first, n); },\n\n    // From here, the methods are part of the public interface. Most\n    // are also available from CodeMirror (editor) instances.\n\n    getValue: function(lineSep) {\n      var lines = getLines(this, this.first, this.first + this.size);\n      if (lineSep === false) return lines;\n      return lines.join(lineSep || this.lineSeparator());\n    },\n    setValue: docMethodOp(function(code) {\n      var top = Pos(this.first, 0), last = this.first + this.size - 1;\n      makeChange(this, {from: top, to: Pos(last, getLine(this, last).text.length),\n                        text: this.splitLines(code), origin: \"setValue\", full: true}, true);\n      setSelection(this, simpleSelection(top));\n    }),\n    replaceRange: function(code, from, to, origin) {\n      from = clipPos(this, from);\n      to = to ? clipPos(this, to) : from;\n      replaceRange(this, code, from, to, origin);\n    },\n    getRange: function(from, to, lineSep) {\n      var lines = getBetween(this, clipPos(this, from), clipPos(this, to));\n      if (lineSep === false) return lines;\n      return lines.join(lineSep || this.lineSeparator());\n    },\n\n    getLine: function(line) {var l = this.getLineHandle(line); return l && l.text;},\n\n    getLineHandle: function(line) {if (isLine(this, line)) return getLine(this, line);},\n    getLineNumber: function(line) {return lineNo(line);},\n\n    getLineHandleVisualStart: function(line) {\n      if (typeof line == \"number\") line = getLine(this, line);\n      return visualLine(line);\n    },\n\n    lineCount: function() {return this.size;},\n    firstLine: function() {return this.first;},\n    lastLine: function() {return this.first + this.size - 1;},\n\n    clipPos: function(pos) {return clipPos(this, pos);},\n\n    getCursor: function(start) {\n      var range = this.sel.primary(), pos;\n      if (start == null || start == \"head\") pos = range.head;\n      else if (start == \"anchor\") pos = range.anchor;\n      else if (start == \"end\" || start == \"to\" || start === false) pos = range.to();\n      else pos = range.from();\n      return pos;\n    },\n    listSelections: function() { return this.sel.ranges; },\n    somethingSelected: function() {return this.sel.somethingSelected();},\n\n    setCursor: docMethodOp(function(line, ch, options) {\n      setSimpleSelection(this, clipPos(this, typeof line == \"number\" ? Pos(line, ch || 0) : line), null, options);\n    }),\n    setSelection: docMethodOp(function(anchor, head, options) {\n      setSimpleSelection(this, clipPos(this, anchor), clipPos(this, head || anchor), options);\n    }),\n    extendSelection: docMethodOp(function(head, other, options) {\n      extendSelection(this, clipPos(this, head), other && clipPos(this, other), options);\n    }),\n    extendSelections: docMethodOp(function(heads, options) {\n      extendSelections(this, clipPosArray(this, heads), options);\n    }),\n    extendSelectionsBy: docMethodOp(function(f, options) {\n      var heads = map(this.sel.ranges, f);\n      extendSelections(this, clipPosArray(this, heads), options);\n    }),\n    setSelections: docMethodOp(function(ranges, primary, options) {\n      if (!ranges.length) return;\n      for (var i = 0, out = []; i < ranges.length; i++)\n        out[i] = new Range(clipPos(this, ranges[i].anchor),\n                           clipPos(this, ranges[i].head));\n      if (primary == null) primary = Math.min(ranges.length - 1, this.sel.primIndex);\n      setSelection(this, normalizeSelection(out, primary), options);\n    }),\n    addSelection: docMethodOp(function(anchor, head, options) {\n      var ranges = this.sel.ranges.slice(0);\n      ranges.push(new Range(clipPos(this, anchor), clipPos(this, head || anchor)));\n      setSelection(this, normalizeSelection(ranges, ranges.length - 1), options);\n    }),\n\n    getSelection: function(lineSep) {\n      var ranges = this.sel.ranges, lines;\n      for (var i = 0; i < ranges.length; i++) {\n        var sel = getBetween(this, ranges[i].from(), ranges[i].to());\n        lines = lines ? lines.concat(sel) : sel;\n      }\n      if (lineSep === false) return lines;\n      else return lines.join(lineSep || this.lineSeparator());\n    },\n    getSelections: function(lineSep) {\n      var parts = [], ranges = this.sel.ranges;\n      for (var i = 0; i < ranges.length; i++) {\n        var sel = getBetween(this, ranges[i].from(), ranges[i].to());\n        if (lineSep !== false) sel = sel.join(lineSep || this.lineSeparator());\n        parts[i] = sel;\n      }\n      return parts;\n    },\n    replaceSelection: function(code, collapse, origin) {\n      var dup = [];\n      for (var i = 0; i < this.sel.ranges.length; i++)\n        dup[i] = code;\n      this.replaceSelections(dup, collapse, origin || \"+input\");\n    },\n    replaceSelections: docMethodOp(function(code, collapse, origin) {\n      var changes = [], sel = this.sel;\n      for (var i = 0; i < sel.ranges.length; i++) {\n        var range = sel.ranges[i];\n        changes[i] = {from: range.from(), to: range.to(), text: this.splitLines(code[i]), origin: origin};\n      }\n      var newSel = collapse && collapse != \"end\" && computeReplacedSel(this, changes, collapse);\n      for (var i = changes.length - 1; i >= 0; i--)\n        makeChange(this, changes[i]);\n      if (newSel) setSelectionReplaceHistory(this, newSel);\n      else if (this.cm) ensureCursorVisible(this.cm);\n    }),\n    undo: docMethodOp(function() {makeChangeFromHistory(this, \"undo\");}),\n    redo: docMethodOp(function() {makeChangeFromHistory(this, \"redo\");}),\n    undoSelection: docMethodOp(function() {makeChangeFromHistory(this, \"undo\", true);}),\n    redoSelection: docMethodOp(function() {makeChangeFromHistory(this, \"redo\", true);}),\n\n    setExtending: function(val) {this.extend = val;},\n    getExtending: function() {return this.extend;},\n\n    historySize: function() {\n      var hist = this.history, done = 0, undone = 0;\n      for (var i = 0; i < hist.done.length; i++) if (!hist.done[i].ranges) ++done;\n      for (var i = 0; i < hist.undone.length; i++) if (!hist.undone[i].ranges) ++undone;\n      return {undo: done, redo: undone};\n    },\n    clearHistory: function() {this.history = new History(this.history.maxGeneration);},\n\n    markClean: function() {\n      this.cleanGeneration = this.changeGeneration(true);\n    },\n    changeGeneration: function(forceSplit) {\n      if (forceSplit)\n        this.history.lastOp = this.history.lastSelOp = this.history.lastOrigin = null;\n      return this.history.generation;\n    },\n    isClean: function (gen) {\n      return this.history.generation == (gen || this.cleanGeneration);\n    },\n\n    getHistory: function() {\n      return {done: copyHistoryArray(this.history.done),\n              undone: copyHistoryArray(this.history.undone)};\n    },\n    setHistory: function(histData) {\n      var hist = this.history = new History(this.history.maxGeneration);\n      hist.done = copyHistoryArray(histData.done.slice(0), null, true);\n      hist.undone = copyHistoryArray(histData.undone.slice(0), null, true);\n    },\n\n    addLineClass: docMethodOp(function(handle, where, cls) {\n      return changeLine(this, handle, where == \"gutter\" ? \"gutter\" : \"class\", function(line) {\n        var prop = where == \"text\" ? \"textClass\"\n                 : where == \"background\" ? \"bgClass\"\n                 : where == \"gutter\" ? \"gutterClass\" : \"wrapClass\";\n        if (!line[prop]) line[prop] = cls;\n        else if (classTest(cls).test(line[prop])) return false;\n        else line[prop] += \" \" + cls;\n        return true;\n      });\n    }),\n    removeLineClass: docMethodOp(function(handle, where, cls) {\n      return changeLine(this, handle, where == \"gutter\" ? \"gutter\" : \"class\", function(line) {\n        var prop = where == \"text\" ? \"textClass\"\n                 : where == \"background\" ? \"bgClass\"\n                 : where == \"gutter\" ? \"gutterClass\" : \"wrapClass\";\n        var cur = line[prop];\n        if (!cur) return false;\n        else if (cls == null) line[prop] = null;\n        else {\n          var found = cur.match(classTest(cls));\n          if (!found) return false;\n          var end = found.index + found[0].length;\n          line[prop] = cur.slice(0, found.index) + (!found.index || end == cur.length ? \"\" : \" \") + cur.slice(end) || null;\n        }\n        return true;\n      });\n    }),\n\n    addLineWidget: docMethodOp(function(handle, node, options) {\n      return addLineWidget(this, handle, node, options);\n    }),\n    removeLineWidget: function(widget) { widget.clear(); },\n\n    markText: function(from, to, options) {\n      return markText(this, clipPos(this, from), clipPos(this, to), options, options && options.type || \"range\");\n    },\n    setBookmark: function(pos, options) {\n      var realOpts = {replacedWith: options && (options.nodeType == null ? options.widget : options),\n                      insertLeft: options && options.insertLeft,\n                      clearWhenEmpty: false, shared: options && options.shared,\n                      handleMouseEvents: options && options.handleMouseEvents};\n      pos = clipPos(this, pos);\n      return markText(this, pos, pos, realOpts, \"bookmark\");\n    },\n    findMarksAt: function(pos) {\n      pos = clipPos(this, pos);\n      var markers = [], spans = getLine(this, pos.line).markedSpans;\n      if (spans) for (var i = 0; i < spans.length; ++i) {\n        var span = spans[i];\n        if ((span.from == null || span.from <= pos.ch) &&\n            (span.to == null || span.to >= pos.ch))\n          markers.push(span.marker.parent || span.marker);\n      }\n      return markers;\n    },\n    findMarks: function(from, to, filter) {\n      from = clipPos(this, from); to = clipPos(this, to);\n      var found = [], lineNo = from.line;\n      this.iter(from.line, to.line + 1, function(line) {\n        var spans = line.markedSpans;\n        if (spans) for (var i = 0; i < spans.length; i++) {\n          var span = spans[i];\n          if (!(lineNo == from.line && from.ch > span.to ||\n                span.from == null && lineNo != from.line||\n                lineNo == to.line && span.from > to.ch) &&\n              (!filter || filter(span.marker)))\n            found.push(span.marker.parent || span.marker);\n        }\n        ++lineNo;\n      });\n      return found;\n    },\n    getAllMarks: function() {\n      var markers = [];\n      this.iter(function(line) {\n        var sps = line.markedSpans;\n        if (sps) for (var i = 0; i < sps.length; ++i)\n          if (sps[i].from != null) markers.push(sps[i].marker);\n      });\n      return markers;\n    },\n\n    posFromIndex: function(off) {\n      var ch, lineNo = this.first;\n      this.iter(function(line) {\n        var sz = line.text.length + 1;\n        if (sz > off) { ch = off; return true; }\n        off -= sz;\n        ++lineNo;\n      });\n      return clipPos(this, Pos(lineNo, ch));\n    },\n    indexFromPos: function (coords) {\n      coords = clipPos(this, coords);\n      var index = coords.ch;\n      if (coords.line < this.first || coords.ch < 0) return 0;\n      this.iter(this.first, coords.line, function (line) {\n        index += line.text.length + 1;\n      });\n      return index;\n    },\n\n    copy: function(copyHistory) {\n      var doc = new Doc(getLines(this, this.first, this.first + this.size),\n                        this.modeOption, this.first, this.lineSep);\n      doc.scrollTop = this.scrollTop; doc.scrollLeft = this.scrollLeft;\n      doc.sel = this.sel;\n      doc.extend = false;\n      if (copyHistory) {\n        doc.history.undoDepth = this.history.undoDepth;\n        doc.setHistory(this.getHistory());\n      }\n      return doc;\n    },\n\n    linkedDoc: function(options) {\n      if (!options) options = {};\n      var from = this.first, to = this.first + this.size;\n      if (options.from != null && options.from > from) from = options.from;\n      if (options.to != null && options.to < to) to = options.to;\n      var copy = new Doc(getLines(this, from, to), options.mode || this.modeOption, from, this.lineSep);\n      if (options.sharedHist) copy.history = this.history;\n      (this.linked || (this.linked = [])).push({doc: copy, sharedHist: options.sharedHist});\n      copy.linked = [{doc: this, isParent: true, sharedHist: options.sharedHist}];\n      copySharedMarkers(copy, findSharedMarkers(this));\n      return copy;\n    },\n    unlinkDoc: function(other) {\n      if (other instanceof CodeMirror) other = other.doc;\n      if (this.linked) for (var i = 0; i < this.linked.length; ++i) {\n        var link = this.linked[i];\n        if (link.doc != other) continue;\n        this.linked.splice(i, 1);\n        other.unlinkDoc(this);\n        detachSharedMarkers(findSharedMarkers(this));\n        break;\n      }\n      // If the histories were shared, split them again\n      if (other.history == this.history) {\n        var splitIds = [other.id];\n        linkedDocs(other, function(doc) {splitIds.push(doc.id);}, true);\n        other.history = new History(null);\n        other.history.done = copyHistoryArray(this.history.done, splitIds);\n        other.history.undone = copyHistoryArray(this.history.undone, splitIds);\n      }\n    },\n    iterLinkedDocs: function(f) {linkedDocs(this, f);},\n\n    getMode: function() {return this.mode;},\n    getEditor: function() {return this.cm;},\n\n    splitLines: function(str) {\n      if (this.lineSep) return str.split(this.lineSep);\n      return splitLinesAuto(str);\n    },\n    lineSeparator: function() { return this.lineSep || \"\\n\"; }\n  });\n\n  // Public alias.\n  Doc.prototype.eachLine = Doc.prototype.iter;\n\n  // Set up methods on CodeMirror's prototype to redirect to the editor's document.\n  var dontDelegate = \"iter insert remove copy getEditor constructor\".split(\" \");\n  for (var prop in Doc.prototype) if (Doc.prototype.hasOwnProperty(prop) && indexOf(dontDelegate, prop) < 0)\n    CodeMirror.prototype[prop] = (function(method) {\n      return function() {return method.apply(this.doc, arguments);};\n    })(Doc.prototype[prop]);\n\n  eventMixin(Doc);\n\n  // Call f for all linked documents.\n  function linkedDocs(doc, f, sharedHistOnly) {\n    function propagate(doc, skip, sharedHist) {\n      if (doc.linked) for (var i = 0; i < doc.linked.length; ++i) {\n        var rel = doc.linked[i];\n        if (rel.doc == skip) continue;\n        var shared = sharedHist && rel.sharedHist;\n        if (sharedHistOnly && !shared) continue;\n        f(rel.doc, shared);\n        propagate(rel.doc, doc, shared);\n      }\n    }\n    propagate(doc, null, true);\n  }\n\n  // Attach a document to an editor.\n  function attachDoc(cm, doc) {\n    if (doc.cm) throw new Error(\"This document is already in use.\");\n    cm.doc = doc;\n    doc.cm = cm;\n    estimateLineHeights(cm);\n    loadMode(cm);\n    if (!cm.options.lineWrapping) findMaxLine(cm);\n    cm.options.mode = doc.modeOption;\n    regChange(cm);\n  }\n\n  // LINE UTILITIES\n\n  // Find the line object corresponding to the given line number.\n  function getLine(doc, n) {\n    n -= doc.first;\n    if (n < 0 || n >= doc.size) throw new Error(\"There is no line \" + (n + doc.first) + \" in the document.\");\n    for (var chunk = doc; !chunk.lines;) {\n      for (var i = 0;; ++i) {\n        var child = chunk.children[i], sz = child.chunkSize();\n        if (n < sz) { chunk = child; break; }\n        n -= sz;\n      }\n    }\n    return chunk.lines[n];\n  }\n\n  // Get the part of a document between two positions, as an array of\n  // strings.\n  function getBetween(doc, start, end) {\n    var out = [], n = start.line;\n    doc.iter(start.line, end.line + 1, function(line) {\n      var text = line.text;\n      if (n == end.line) text = text.slice(0, end.ch);\n      if (n == start.line) text = text.slice(start.ch);\n      out.push(text);\n      ++n;\n    });\n    return out;\n  }\n  // Get the lines between from and to, as array of strings.\n  function getLines(doc, from, to) {\n    var out = [];\n    doc.iter(from, to, function(line) { out.push(line.text); });\n    return out;\n  }\n\n  // Update the height of a line, propagating the height change\n  // upwards to parent nodes.\n  function updateLineHeight(line, height) {\n    var diff = height - line.height;\n    if (diff) for (var n = line; n; n = n.parent) n.height += diff;\n  }\n\n  // Given a line object, find its line number by walking up through\n  // its parent links.\n  function lineNo(line) {\n    if (line.parent == null) return null;\n    var cur = line.parent, no = indexOf(cur.lines, line);\n    for (var chunk = cur.parent; chunk; cur = chunk, chunk = chunk.parent) {\n      for (var i = 0;; ++i) {\n        if (chunk.children[i] == cur) break;\n        no += chunk.children[i].chunkSize();\n      }\n    }\n    return no + cur.first;\n  }\n\n  // Find the line at the given vertical position, using the height\n  // information in the document tree.\n  function lineAtHeight(chunk, h) {\n    var n = chunk.first;\n    outer: do {\n      for (var i = 0; i < chunk.children.length; ++i) {\n        var child = chunk.children[i], ch = child.height;\n        if (h < ch) { chunk = child; continue outer; }\n        h -= ch;\n        n += child.chunkSize();\n      }\n      return n;\n    } while (!chunk.lines);\n    for (var i = 0; i < chunk.lines.length; ++i) {\n      var line = chunk.lines[i], lh = line.height;\n      if (h < lh) break;\n      h -= lh;\n    }\n    return n + i;\n  }\n\n\n  // Find the height above the given line.\n  function heightAtLine(lineObj) {\n    lineObj = visualLine(lineObj);\n\n    var h = 0, chunk = lineObj.parent;\n    for (var i = 0; i < chunk.lines.length; ++i) {\n      var line = chunk.lines[i];\n      if (line == lineObj) break;\n      else h += line.height;\n    }\n    for (var p = chunk.parent; p; chunk = p, p = chunk.parent) {\n      for (var i = 0; i < p.children.length; ++i) {\n        var cur = p.children[i];\n        if (cur == chunk) break;\n        else h += cur.height;\n      }\n    }\n    return h;\n  }\n\n  // Get the bidi ordering for the given line (and cache it). Returns\n  // false for lines that are fully left-to-right, and an array of\n  // BidiSpan objects otherwise.\n  function getOrder(line) {\n    var order = line.order;\n    if (order == null) order = line.order = bidiOrdering(line.text);\n    return order;\n  }\n\n  // HISTORY\n\n  function History(startGen) {\n    // Arrays of change events and selections. Doing something adds an\n    // event to done and clears undo. Undoing moves events from done\n    // to undone, redoing moves them in the other direction.\n    this.done = []; this.undone = [];\n    this.undoDepth = Infinity;\n    // Used to track when changes can be merged into a single undo\n    // event\n    this.lastModTime = this.lastSelTime = 0;\n    this.lastOp = this.lastSelOp = null;\n    this.lastOrigin = this.lastSelOrigin = null;\n    // Used by the isClean() method\n    this.generation = this.maxGeneration = startGen || 1;\n  }\n\n  // Create a history change event from an updateDoc-style change\n  // object.\n  function historyChangeFromChange(doc, change) {\n    var histChange = {from: copyPos(change.from), to: changeEnd(change), text: getBetween(doc, change.from, change.to)};\n    attachLocalSpans(doc, histChange, change.from.line, change.to.line + 1);\n    linkedDocs(doc, function(doc) {attachLocalSpans(doc, histChange, change.from.line, change.to.line + 1);}, true);\n    return histChange;\n  }\n\n  // Pop all selection events off the end of a history array. Stop at\n  // a change event.\n  function clearSelectionEvents(array) {\n    while (array.length) {\n      var last = lst(array);\n      if (last.ranges) array.pop();\n      else break;\n    }\n  }\n\n  // Find the top change event in the history. Pop off selection\n  // events that are in the way.\n  function lastChangeEvent(hist, force) {\n    if (force) {\n      clearSelectionEvents(hist.done);\n      return lst(hist.done);\n    } else if (hist.done.length && !lst(hist.done).ranges) {\n      return lst(hist.done);\n    } else if (hist.done.length > 1 && !hist.done[hist.done.length - 2].ranges) {\n      hist.done.pop();\n      return lst(hist.done);\n    }\n  }\n\n  // Register a change in the history. Merges changes that are within\n  // a single operation, ore are close together with an origin that\n  // allows merging (starting with \"+\") into a single event.\n  function addChangeToHistory(doc, change, selAfter, opId) {\n    var hist = doc.history;\n    hist.undone.length = 0;\n    var time = +new Date, cur;\n\n    if ((hist.lastOp == opId ||\n         hist.lastOrigin == change.origin && change.origin &&\n         ((change.origin.charAt(0) == \"+\" && doc.cm && hist.lastModTime > time - doc.cm.options.historyEventDelay) ||\n          change.origin.charAt(0) == \"*\")) &&\n        (cur = lastChangeEvent(hist, hist.lastOp == opId))) {\n      // Merge this change into the last event\n      var last = lst(cur.changes);\n      if (cmp(change.from, change.to) == 0 && cmp(change.from, last.to) == 0) {\n        // Optimized case for simple insertion -- don't want to add\n        // new changesets for every character typed\n        last.to = changeEnd(change);\n      } else {\n        // Add new sub-event\n        cur.changes.push(historyChangeFromChange(doc, change));\n      }\n    } else {\n      // Can not be merged, start a new event.\n      var before = lst(hist.done);\n      if (!before || !before.ranges)\n        pushSelectionToHistory(doc.sel, hist.done);\n      cur = {changes: [historyChangeFromChange(doc, change)],\n             generation: hist.generation};\n      hist.done.push(cur);\n      while (hist.done.length > hist.undoDepth) {\n        hist.done.shift();\n        if (!hist.done[0].ranges) hist.done.shift();\n      }\n    }\n    hist.done.push(selAfter);\n    hist.generation = ++hist.maxGeneration;\n    hist.lastModTime = hist.lastSelTime = time;\n    hist.lastOp = hist.lastSelOp = opId;\n    hist.lastOrigin = hist.lastSelOrigin = change.origin;\n\n    if (!last) signal(doc, \"historyAdded\");\n  }\n\n  function selectionEventCanBeMerged(doc, origin, prev, sel) {\n    var ch = origin.charAt(0);\n    return ch == \"*\" ||\n      ch == \"+\" &&\n      prev.ranges.length == sel.ranges.length &&\n      prev.somethingSelected() == sel.somethingSelected() &&\n      new Date - doc.history.lastSelTime <= (doc.cm ? doc.cm.options.historyEventDelay : 500);\n  }\n\n  // Called whenever the selection changes, sets the new selection as\n  // the pending selection in the history, and pushes the old pending\n  // selection into the 'done' array when it was significantly\n  // different (in number of selected ranges, emptiness, or time).\n  function addSelectionToHistory(doc, sel, opId, options) {\n    var hist = doc.history, origin = options && options.origin;\n\n    // A new event is started when the previous origin does not match\n    // the current, or the origins don't allow matching. Origins\n    // starting with * are always merged, those starting with + are\n    // merged when similar and close together in time.\n    if (opId == hist.lastSelOp ||\n        (origin && hist.lastSelOrigin == origin &&\n         (hist.lastModTime == hist.lastSelTime && hist.lastOrigin == origin ||\n          selectionEventCanBeMerged(doc, origin, lst(hist.done), sel))))\n      hist.done[hist.done.length - 1] = sel;\n    else\n      pushSelectionToHistory(sel, hist.done);\n\n    hist.lastSelTime = +new Date;\n    hist.lastSelOrigin = origin;\n    hist.lastSelOp = opId;\n    if (options && options.clearRedo !== false)\n      clearSelectionEvents(hist.undone);\n  }\n\n  function pushSelectionToHistory(sel, dest) {\n    var top = lst(dest);\n    if (!(top && top.ranges && top.equals(sel)))\n      dest.push(sel);\n  }\n\n  // Used to store marked span information in the history.\n  function attachLocalSpans(doc, change, from, to) {\n    var existing = change[\"spans_\" + doc.id], n = 0;\n    doc.iter(Math.max(doc.first, from), Math.min(doc.first + doc.size, to), function(line) {\n      if (line.markedSpans)\n        (existing || (existing = change[\"spans_\" + doc.id] = {}))[n] = line.markedSpans;\n      ++n;\n    });\n  }\n\n  // When un/re-doing restores text containing marked spans, those\n  // that have been explicitly cleared should not be restored.\n  function removeClearedSpans(spans) {\n    if (!spans) return null;\n    for (var i = 0, out; i < spans.length; ++i) {\n      if (spans[i].marker.explicitlyCleared) { if (!out) out = spans.slice(0, i); }\n      else if (out) out.push(spans[i]);\n    }\n    return !out ? spans : out.length ? out : null;\n  }\n\n  // Retrieve and filter the old marked spans stored in a change event.\n  function getOldSpans(doc, change) {\n    var found = change[\"spans_\" + doc.id];\n    if (!found) return null;\n    for (var i = 0, nw = []; i < change.text.length; ++i)\n      nw.push(removeClearedSpans(found[i]));\n    return nw;\n  }\n\n  // Used both to provide a JSON-safe object in .getHistory, and, when\n  // detaching a document, to split the history in two\n  function copyHistoryArray(events, newGroup, instantiateSel) {\n    for (var i = 0, copy = []; i < events.length; ++i) {\n      var event = events[i];\n      if (event.ranges) {\n        copy.push(instantiateSel ? Selection.prototype.deepCopy.call(event) : event);\n        continue;\n      }\n      var changes = event.changes, newChanges = [];\n      copy.push({changes: newChanges});\n      for (var j = 0; j < changes.length; ++j) {\n        var change = changes[j], m;\n        newChanges.push({from: change.from, to: change.to, text: change.text});\n        if (newGroup) for (var prop in change) if (m = prop.match(/^spans_(\\d+)$/)) {\n          if (indexOf(newGroup, Number(m[1])) > -1) {\n            lst(newChanges)[prop] = change[prop];\n            delete change[prop];\n          }\n        }\n      }\n    }\n    return copy;\n  }\n\n  // Rebasing/resetting history to deal with externally-sourced changes\n\n  function rebaseHistSelSingle(pos, from, to, diff) {\n    if (to < pos.line) {\n      pos.line += diff;\n    } else if (from < pos.line) {\n      pos.line = from;\n      pos.ch = 0;\n    }\n  }\n\n  // Tries to rebase an array of history events given a change in the\n  // document. If the change touches the same lines as the event, the\n  // event, and everything 'behind' it, is discarded. If the change is\n  // before the event, the event's positions are updated. Uses a\n  // copy-on-write scheme for the positions, to avoid having to\n  // reallocate them all on every rebase, but also avoid problems with\n  // shared position objects being unsafely updated.\n  function rebaseHistArray(array, from, to, diff) {\n    for (var i = 0; i < array.length; ++i) {\n      var sub = array[i], ok = true;\n      if (sub.ranges) {\n        if (!sub.copied) { sub = array[i] = sub.deepCopy(); sub.copied = true; }\n        for (var j = 0; j < sub.ranges.length; j++) {\n          rebaseHistSelSingle(sub.ranges[j].anchor, from, to, diff);\n          rebaseHistSelSingle(sub.ranges[j].head, from, to, diff);\n        }\n        continue;\n      }\n      for (var j = 0; j < sub.changes.length; ++j) {\n        var cur = sub.changes[j];\n        if (to < cur.from.line) {\n          cur.from = Pos(cur.from.line + diff, cur.from.ch);\n          cur.to = Pos(cur.to.line + diff, cur.to.ch);\n        } else if (from <= cur.to.line) {\n          ok = false;\n          break;\n        }\n      }\n      if (!ok) {\n        array.splice(0, i + 1);\n        i = 0;\n      }\n    }\n  }\n\n  function rebaseHist(hist, change) {\n    var from = change.from.line, to = change.to.line, diff = change.text.length - (to - from) - 1;\n    rebaseHistArray(hist.done, from, to, diff);\n    rebaseHistArray(hist.undone, from, to, diff);\n  }\n\n  // EVENT UTILITIES\n\n  // Due to the fact that we still support jurassic IE versions, some\n  // compatibility wrappers are needed.\n\n  var e_preventDefault = CodeMirror.e_preventDefault = function(e) {\n    if (e.preventDefault) e.preventDefault();\n    else e.returnValue = false;\n  };\n  var e_stopPropagation = CodeMirror.e_stopPropagation = function(e) {\n    if (e.stopPropagation) e.stopPropagation();\n    else e.cancelBubble = true;\n  };\n  function e_defaultPrevented(e) {\n    return e.defaultPrevented != null ? e.defaultPrevented : e.returnValue == false;\n  }\n  var e_stop = CodeMirror.e_stop = function(e) {e_preventDefault(e); e_stopPropagation(e);};\n\n  function e_target(e) {return e.target || e.srcElement;}\n  function e_button(e) {\n    var b = e.which;\n    if (b == null) {\n      if (e.button & 1) b = 1;\n      else if (e.button & 2) b = 3;\n      else if (e.button & 4) b = 2;\n    }\n    if (mac && e.ctrlKey && b == 1) b = 3;\n    return b;\n  }\n\n  // EVENT HANDLING\n\n  // Lightweight event framework. on/off also work on DOM nodes,\n  // registering native DOM handlers.\n\n  var on = CodeMirror.on = function(emitter, type, f) {\n    if (emitter.addEventListener)\n      emitter.addEventListener(type, f, false);\n    else if (emitter.attachEvent)\n      emitter.attachEvent(\"on\" + type, f);\n    else {\n      var map = emitter._handlers || (emitter._handlers = {});\n      var arr = map[type] || (map[type] = []);\n      arr.push(f);\n    }\n  };\n\n  var noHandlers = []\n  function getHandlers(emitter, type, copy) {\n    var arr = emitter._handlers && emitter._handlers[type]\n    if (copy) return arr && arr.length > 0 ? arr.slice() : noHandlers\n    else return arr || noHandlers\n  }\n\n  var off = CodeMirror.off = function(emitter, type, f) {\n    if (emitter.removeEventListener)\n      emitter.removeEventListener(type, f, false);\n    else if (emitter.detachEvent)\n      emitter.detachEvent(\"on\" + type, f);\n    else {\n      var handlers = getHandlers(emitter, type, false)\n      for (var i = 0; i < handlers.length; ++i)\n        if (handlers[i] == f) { handlers.splice(i, 1); break; }\n    }\n  };\n\n  var signal = CodeMirror.signal = function(emitter, type /*, values...*/) {\n    var handlers = getHandlers(emitter, type, true)\n    if (!handlers.length) return;\n    var args = Array.prototype.slice.call(arguments, 2);\n    for (var i = 0; i < handlers.length; ++i) handlers[i].apply(null, args);\n  };\n\n  var orphanDelayedCallbacks = null;\n\n  // Often, we want to signal events at a point where we are in the\n  // middle of some work, but don't want the handler to start calling\n  // other methods on the editor, which might be in an inconsistent\n  // state or simply not expect any other events to happen.\n  // signalLater looks whether there are any handlers, and schedules\n  // them to be executed when the last operation ends, or, if no\n  // operation is active, when a timeout fires.\n  function signalLater(emitter, type /*, values...*/) {\n    var arr = getHandlers(emitter, type, false)\n    if (!arr.length) return;\n    var args = Array.prototype.slice.call(arguments, 2), list;\n    if (operationGroup) {\n      list = operationGroup.delayedCallbacks;\n    } else if (orphanDelayedCallbacks) {\n      list = orphanDelayedCallbacks;\n    } else {\n      list = orphanDelayedCallbacks = [];\n      setTimeout(fireOrphanDelayed, 0);\n    }\n    function bnd(f) {return function(){f.apply(null, args);};};\n    for (var i = 0; i < arr.length; ++i)\n      list.push(bnd(arr[i]));\n  }\n\n  function fireOrphanDelayed() {\n    var delayed = orphanDelayedCallbacks;\n    orphanDelayedCallbacks = null;\n    for (var i = 0; i < delayed.length; ++i) delayed[i]();\n  }\n\n  // The DOM events that CodeMirror handles can be overridden by\n  // registering a (non-DOM) handler on the editor for the event name,\n  // and preventDefault-ing the event in that handler.\n  function signalDOMEvent(cm, e, override) {\n    if (typeof e == \"string\")\n      e = {type: e, preventDefault: function() { this.defaultPrevented = true; }};\n    signal(cm, override || e.type, cm, e);\n    return e_defaultPrevented(e) || e.codemirrorIgnore;\n  }\n\n  function signalCursorActivity(cm) {\n    var arr = cm._handlers && cm._handlers.cursorActivity;\n    if (!arr) return;\n    var set = cm.curOp.cursorActivityHandlers || (cm.curOp.cursorActivityHandlers = []);\n    for (var i = 0; i < arr.length; ++i) if (indexOf(set, arr[i]) == -1)\n      set.push(arr[i]);\n  }\n\n  function hasHandler(emitter, type) {\n    return getHandlers(emitter, type).length > 0\n  }\n\n  // Add on and off methods to a constructor's prototype, to make\n  // registering events on such objects more convenient.\n  function eventMixin(ctor) {\n    ctor.prototype.on = function(type, f) {on(this, type, f);};\n    ctor.prototype.off = function(type, f) {off(this, type, f);};\n  }\n\n  // MISC UTILITIES\n\n  // Number of pixels added to scroller and sizer to hide scrollbar\n  var scrollerGap = 30;\n\n  // Returned or thrown by various protocols to signal 'I'm not\n  // handling this'.\n  var Pass = CodeMirror.Pass = {toString: function(){return \"CodeMirror.Pass\";}};\n\n  // Reused option objects for setSelection & friends\n  var sel_dontScroll = {scroll: false}, sel_mouse = {origin: \"*mouse\"}, sel_move = {origin: \"+move\"};\n\n  function Delayed() {this.id = null;}\n  Delayed.prototype.set = function(ms, f) {\n    clearTimeout(this.id);\n    this.id = setTimeout(f, ms);\n  };\n\n  // Counts the column offset in a string, taking tabs into account.\n  // Used mostly to find indentation.\n  var countColumn = CodeMirror.countColumn = function(string, end, tabSize, startIndex, startValue) {\n    if (end == null) {\n      end = string.search(/[^\\s\\u00a0]/);\n      if (end == -1) end = string.length;\n    }\n    for (var i = startIndex || 0, n = startValue || 0;;) {\n      var nextTab = string.indexOf(\"\\t\", i);\n      if (nextTab < 0 || nextTab >= end)\n        return n + (end - i);\n      n += nextTab - i;\n      n += tabSize - (n % tabSize);\n      i = nextTab + 1;\n    }\n  };\n\n  // The inverse of countColumn -- find the offset that corresponds to\n  // a particular column.\n  var findColumn = CodeMirror.findColumn = function(string, goal, tabSize) {\n    for (var pos = 0, col = 0;;) {\n      var nextTab = string.indexOf(\"\\t\", pos);\n      if (nextTab == -1) nextTab = string.length;\n      var skipped = nextTab - pos;\n      if (nextTab == string.length || col + skipped >= goal)\n        return pos + Math.min(skipped, goal - col);\n      col += nextTab - pos;\n      col += tabSize - (col % tabSize);\n      pos = nextTab + 1;\n      if (col >= goal) return pos;\n    }\n  }\n\n  var spaceStrs = [\"\"];\n  function spaceStr(n) {\n    while (spaceStrs.length <= n)\n      spaceStrs.push(lst(spaceStrs) + \" \");\n    return spaceStrs[n];\n  }\n\n  function lst(arr) { return arr[arr.length-1]; }\n\n  var selectInput = function(node) { node.select(); };\n  if (ios) // Mobile Safari apparently has a bug where select() is broken.\n    selectInput = function(node) { node.selectionStart = 0; node.selectionEnd = node.value.length; };\n  else if (ie) // Suppress mysterious IE10 errors\n    selectInput = function(node) { try { node.select(); } catch(_e) {} };\n\n  function indexOf(array, elt) {\n    for (var i = 0; i < array.length; ++i)\n      if (array[i] == elt) return i;\n    return -1;\n  }\n  function map(array, f) {\n    var out = [];\n    for (var i = 0; i < array.length; i++) out[i] = f(array[i], i);\n    return out;\n  }\n\n  function nothing() {}\n\n  function createObj(base, props) {\n    var inst;\n    if (Object.create) {\n      inst = Object.create(base);\n    } else {\n      nothing.prototype = base;\n      inst = new nothing();\n    }\n    if (props) copyObj(props, inst);\n    return inst;\n  };\n\n  function copyObj(obj, target, overwrite) {\n    if (!target) target = {};\n    for (var prop in obj)\n      if (obj.hasOwnProperty(prop) && (overwrite !== false || !target.hasOwnProperty(prop)))\n        target[prop] = obj[prop];\n    return target;\n  }\n\n  function bind(f) {\n    var args = Array.prototype.slice.call(arguments, 1);\n    return function(){return f.apply(null, args);};\n  }\n\n  var nonASCIISingleCaseWordChar = /[\\u00df\\u0587\\u0590-\\u05f4\\u0600-\\u06ff\\u3040-\\u309f\\u30a0-\\u30ff\\u3400-\\u4db5\\u4e00-\\u9fcc\\uac00-\\ud7af]/;\n  var isWordCharBasic = CodeMirror.isWordChar = function(ch) {\n    return /\\w/.test(ch) || ch > \"\\x80\" &&\n      (ch.toUpperCase() != ch.toLowerCase() || nonASCIISingleCaseWordChar.test(ch));\n  };\n  function isWordChar(ch, helper) {\n    if (!helper) return isWordCharBasic(ch);\n    if (helper.source.indexOf(\"\\\\w\") > -1 && isWordCharBasic(ch)) return true;\n    return helper.test(ch);\n  }\n\n  function isEmpty(obj) {\n    for (var n in obj) if (obj.hasOwnProperty(n) && obj[n]) return false;\n    return true;\n  }\n\n  // Extending unicode characters. A series of a non-extending char +\n  // any number of extending chars is treated as a single unit as far\n  // as editing and measuring is concerned. This is not fully correct,\n  // since some scripts/fonts/browsers also treat other configurations\n  // of code points as a group.\n  var extendingChars = /[\\u0300-\\u036f\\u0483-\\u0489\\u0591-\\u05bd\\u05bf\\u05c1\\u05c2\\u05c4\\u05c5\\u05c7\\u0610-\\u061a\\u064b-\\u065e\\u0670\\u06d6-\\u06dc\\u06de-\\u06e4\\u06e7\\u06e8\\u06ea-\\u06ed\\u0711\\u0730-\\u074a\\u07a6-\\u07b0\\u07eb-\\u07f3\\u0816-\\u0819\\u081b-\\u0823\\u0825-\\u0827\\u0829-\\u082d\\u0900-\\u0902\\u093c\\u0941-\\u0948\\u094d\\u0951-\\u0955\\u0962\\u0963\\u0981\\u09bc\\u09be\\u09c1-\\u09c4\\u09cd\\u09d7\\u09e2\\u09e3\\u0a01\\u0a02\\u0a3c\\u0a41\\u0a42\\u0a47\\u0a48\\u0a4b-\\u0a4d\\u0a51\\u0a70\\u0a71\\u0a75\\u0a81\\u0a82\\u0abc\\u0ac1-\\u0ac5\\u0ac7\\u0ac8\\u0acd\\u0ae2\\u0ae3\\u0b01\\u0b3c\\u0b3e\\u0b3f\\u0b41-\\u0b44\\u0b4d\\u0b56\\u0b57\\u0b62\\u0b63\\u0b82\\u0bbe\\u0bc0\\u0bcd\\u0bd7\\u0c3e-\\u0c40\\u0c46-\\u0c48\\u0c4a-\\u0c4d\\u0c55\\u0c56\\u0c62\\u0c63\\u0cbc\\u0cbf\\u0cc2\\u0cc6\\u0ccc\\u0ccd\\u0cd5\\u0cd6\\u0ce2\\u0ce3\\u0d3e\\u0d41-\\u0d44\\u0d4d\\u0d57\\u0d62\\u0d63\\u0dca\\u0dcf\\u0dd2-\\u0dd4\\u0dd6\\u0ddf\\u0e31\\u0e34-\\u0e3a\\u0e47-\\u0e4e\\u0eb1\\u0eb4-\\u0eb9\\u0ebb\\u0ebc\\u0ec8-\\u0ecd\\u0f18\\u0f19\\u0f35\\u0f37\\u0f39\\u0f71-\\u0f7e\\u0f80-\\u0f84\\u0f86\\u0f87\\u0f90-\\u0f97\\u0f99-\\u0fbc\\u0fc6\\u102d-\\u1030\\u1032-\\u1037\\u1039\\u103a\\u103d\\u103e\\u1058\\u1059\\u105e-\\u1060\\u1071-\\u1074\\u1082\\u1085\\u1086\\u108d\\u109d\\u135f\\u1712-\\u1714\\u1732-\\u1734\\u1752\\u1753\\u1772\\u1773\\u17b7-\\u17bd\\u17c6\\u17c9-\\u17d3\\u17dd\\u180b-\\u180d\\u18a9\\u1920-\\u1922\\u1927\\u1928\\u1932\\u1939-\\u193b\\u1a17\\u1a18\\u1a56\\u1a58-\\u1a5e\\u1a60\\u1a62\\u1a65-\\u1a6c\\u1a73-\\u1a7c\\u1a7f\\u1b00-\\u1b03\\u1b34\\u1b36-\\u1b3a\\u1b3c\\u1b42\\u1b6b-\\u1b73\\u1b80\\u1b81\\u1ba2-\\u1ba5\\u1ba8\\u1ba9\\u1c2c-\\u1c33\\u1c36\\u1c37\\u1cd0-\\u1cd2\\u1cd4-\\u1ce0\\u1ce2-\\u1ce8\\u1ced\\u1dc0-\\u1de6\\u1dfd-\\u1dff\\u200c\\u200d\\u20d0-\\u20f0\\u2cef-\\u2cf1\\u2de0-\\u2dff\\u302a-\\u302f\\u3099\\u309a\\ua66f-\\ua672\\ua67c\\ua67d\\ua6f0\\ua6f1\\ua802\\ua806\\ua80b\\ua825\\ua826\\ua8c4\\ua8e0-\\ua8f1\\ua926-\\ua92d\\ua947-\\ua951\\ua980-\\ua982\\ua9b3\\ua9b6-\\ua9b9\\ua9bc\\uaa29-\\uaa2e\\uaa31\\uaa32\\uaa35\\uaa36\\uaa43\\uaa4c\\uaab0\\uaab2-\\uaab4\\uaab7\\uaab8\\uaabe\\uaabf\\uaac1\\uabe5\\uabe8\\uabed\\udc00-\\udfff\\ufb1e\\ufe00-\\ufe0f\\ufe20-\\ufe26\\uff9e\\uff9f]/;\n  function isExtendingChar(ch) { return ch.charCodeAt(0) >= 768 && extendingChars.test(ch); }\n\n  // DOM UTILITIES\n\n  function elt(tag, content, className, style) {\n    var e = document.createElement(tag);\n    if (className) e.className = className;\n    if (style) e.style.cssText = style;\n    if (typeof content == \"string\") e.appendChild(document.createTextNode(content));\n    else if (content) for (var i = 0; i < content.length; ++i) e.appendChild(content[i]);\n    return e;\n  }\n\n  var range;\n  if (document.createRange) range = function(node, start, end, endNode) {\n    var r = document.createRange();\n    r.setEnd(endNode || node, end);\n    r.setStart(node, start);\n    return r;\n  };\n  else range = function(node, start, end) {\n    var r = document.body.createTextRange();\n    try { r.moveToElementText(node.parentNode); }\n    catch(e) { return r; }\n    r.collapse(true);\n    r.moveEnd(\"character\", end);\n    r.moveStart(\"character\", start);\n    return r;\n  };\n\n  function removeChildren(e) {\n    for (var count = e.childNodes.length; count > 0; --count)\n      e.removeChild(e.firstChild);\n    return e;\n  }\n\n  function removeChildrenAndAdd(parent, e) {\n    return removeChildren(parent).appendChild(e);\n  }\n\n  var contains = CodeMirror.contains = function(parent, child) {\n    if (child.nodeType == 3) // Android browser always returns false when child is a textnode\n      child = child.parentNode;\n    if (parent.contains)\n      return parent.contains(child);\n    do {\n      if (child.nodeType == 11) child = child.host;\n      if (child == parent) return true;\n    } while (child = child.parentNode);\n  };\n\n  function activeElt() {\n    var activeElement = document.activeElement;\n    while (activeElement && activeElement.root && activeElement.root.activeElement)\n      activeElement = activeElement.root.activeElement;\n    return activeElement;\n  }\n  // Older versions of IE throws unspecified error when touching\n  // document.activeElement in some cases (during loading, in iframe)\n  if (ie && ie_version < 11) activeElt = function() {\n    try { return document.activeElement; }\n    catch(e) { return document.body; }\n  };\n\n  function classTest(cls) { return new RegExp(\"(^|\\\\s)\" + cls + \"(?:$|\\\\s)\\\\s*\"); }\n  var rmClass = CodeMirror.rmClass = function(node, cls) {\n    var current = node.className;\n    var match = classTest(cls).exec(current);\n    if (match) {\n      var after = current.slice(match.index + match[0].length);\n      node.className = current.slice(0, match.index) + (after ? match[1] + after : \"\");\n    }\n  };\n  var addClass = CodeMirror.addClass = function(node, cls) {\n    var current = node.className;\n    if (!classTest(cls).test(current)) node.className += (current ? \" \" : \"\") + cls;\n  };\n  function joinClasses(a, b) {\n    var as = a.split(\" \");\n    for (var i = 0; i < as.length; i++)\n      if (as[i] && !classTest(as[i]).test(b)) b += \" \" + as[i];\n    return b;\n  }\n\n  // WINDOW-WIDE EVENTS\n\n  // These must be handled carefully, because naively registering a\n  // handler for each editor will cause the editors to never be\n  // garbage collected.\n\n  function forEachCodeMirror(f) {\n    if (!document.body.getElementsByClassName) return;\n    var byClass = document.body.getElementsByClassName(\"CodeMirror\");\n    for (var i = 0; i < byClass.length; i++) {\n      var cm = byClass[i].CodeMirror;\n      if (cm) f(cm);\n    }\n  }\n\n  var globalsRegistered = false;\n  function ensureGlobalHandlers() {\n    if (globalsRegistered) return;\n    registerGlobalHandlers();\n    globalsRegistered = true;\n  }\n  function registerGlobalHandlers() {\n    // When the window resizes, we need to refresh active editors.\n    var resizeTimer;\n    on(window, \"resize\", function() {\n      if (resizeTimer == null) resizeTimer = setTimeout(function() {\n        resizeTimer = null;\n        forEachCodeMirror(onResize);\n      }, 100);\n    });\n    // When the window loses focus, we want to show the editor as blurred\n    on(window, \"blur\", function() {\n      forEachCodeMirror(onBlur);\n    });\n  }\n\n  // FEATURE DETECTION\n\n  // Detect drag-and-drop\n  var dragAndDrop = function() {\n    // There is *some* kind of drag-and-drop support in IE6-8, but I\n    // couldn't get it to work yet.\n    if (ie && ie_version < 9) return false;\n    var div = elt('div');\n    return \"draggable\" in div || \"dragDrop\" in div;\n  }();\n\n  var zwspSupported;\n  function zeroWidthElement(measure) {\n    if (zwspSupported == null) {\n      var test = elt(\"span\", \"\\u200b\");\n      removeChildrenAndAdd(measure, elt(\"span\", [test, document.createTextNode(\"x\")]));\n      if (measure.firstChild.offsetHeight != 0)\n        zwspSupported = test.offsetWidth <= 1 && test.offsetHeight > 2 && !(ie && ie_version < 8);\n    }\n    var node = zwspSupported ? elt(\"span\", \"\\u200b\") :\n      elt(\"span\", \"\\u00a0\", null, \"display: inline-block; width: 1px; margin-right: -1px\");\n    node.setAttribute(\"cm-text\", \"\");\n    return node;\n  }\n\n  // Feature-detect IE's crummy client rect reporting for bidi text\n  var badBidiRects;\n  function hasBadBidiRects(measure) {\n    if (badBidiRects != null) return badBidiRects;\n    var txt = removeChildrenAndAdd(measure, document.createTextNode(\"A\\u062eA\"));\n    var r0 = range(txt, 0, 1).getBoundingClientRect();\n    if (!r0 || r0.left == r0.right) return false; // Safari returns null in some cases (#2780)\n    var r1 = range(txt, 1, 2).getBoundingClientRect();\n    return badBidiRects = (r1.right - r0.right < 3);\n  }\n\n  // See if \"\".split is the broken IE version, if so, provide an\n  // alternative way to split lines.\n  var splitLinesAuto = CodeMirror.splitLines = \"\\n\\nb\".split(/\\n/).length != 3 ? function(string) {\n    var pos = 0, result = [], l = string.length;\n    while (pos <= l) {\n      var nl = string.indexOf(\"\\n\", pos);\n      if (nl == -1) nl = string.length;\n      var line = string.slice(pos, string.charAt(nl - 1) == \"\\r\" ? nl - 1 : nl);\n      var rt = line.indexOf(\"\\r\");\n      if (rt != -1) {\n        result.push(line.slice(0, rt));\n        pos += rt + 1;\n      } else {\n        result.push(line);\n        pos = nl + 1;\n      }\n    }\n    return result;\n  } : function(string){return string.split(/\\r\\n?|\\n/);};\n\n  var hasSelection = window.getSelection ? function(te) {\n    try { return te.selectionStart != te.selectionEnd; }\n    catch(e) { return false; }\n  } : function(te) {\n    try {var range = te.ownerDocument.selection.createRange();}\n    catch(e) {}\n    if (!range || range.parentElement() != te) return false;\n    return range.compareEndPoints(\"StartToEnd\", range) != 0;\n  };\n\n  var hasCopyEvent = (function() {\n    var e = elt(\"div\");\n    if (\"oncopy\" in e) return true;\n    e.setAttribute(\"oncopy\", \"return;\");\n    return typeof e.oncopy == \"function\";\n  })();\n\n  var badZoomedRects = null;\n  function hasBadZoomedRects(measure) {\n    if (badZoomedRects != null) return badZoomedRects;\n    var node = removeChildrenAndAdd(measure, elt(\"span\", \"x\"));\n    var normal = node.getBoundingClientRect();\n    var fromRange = range(node, 0, 1).getBoundingClientRect();\n    return badZoomedRects = Math.abs(normal.left - fromRange.left) > 1;\n  }\n\n  // KEY NAMES\n\n  var keyNames = CodeMirror.keyNames = {\n    3: \"Enter\", 8: \"Backspace\", 9: \"Tab\", 13: \"Enter\", 16: \"Shift\", 17: \"Ctrl\", 18: \"Alt\",\n    19: \"Pause\", 20: \"CapsLock\", 27: \"Esc\", 32: \"Space\", 33: \"PageUp\", 34: \"PageDown\", 35: \"End\",\n    36: \"Home\", 37: \"Left\", 38: \"Up\", 39: \"Right\", 40: \"Down\", 44: \"PrintScrn\", 45: \"Insert\",\n    46: \"Delete\", 59: \";\", 61: \"=\", 91: \"Mod\", 92: \"Mod\", 93: \"Mod\",\n    106: \"*\", 107: \"=\", 109: \"-\", 110: \".\", 111: \"/\", 127: \"Delete\",\n    173: \"-\", 186: \";\", 187: \"=\", 188: \",\", 189: \"-\", 190: \".\", 191: \"/\", 192: \"`\", 219: \"[\", 220: \"\\\\\",\n    221: \"]\", 222: \"'\", 63232: \"Up\", 63233: \"Down\", 63234: \"Left\", 63235: \"Right\", 63272: \"Delete\",\n    63273: \"Home\", 63275: \"End\", 63276: \"PageUp\", 63277: \"PageDown\", 63302: \"Insert\"\n  };\n  (function() {\n    // Number keys\n    for (var i = 0; i < 10; i++) keyNames[i + 48] = keyNames[i + 96] = String(i);\n    // Alphabetic keys\n    for (var i = 65; i <= 90; i++) keyNames[i] = String.fromCharCode(i);\n    // Function keys\n    for (var i = 1; i <= 12; i++) keyNames[i + 111] = keyNames[i + 63235] = \"F\" + i;\n  })();\n\n  // BIDI HELPERS\n\n  function iterateBidiSections(order, from, to, f) {\n    if (!order) return f(from, to, \"ltr\");\n    var found = false;\n    for (var i = 0; i < order.length; ++i) {\n      var part = order[i];\n      if (part.from < to && part.to > from || from == to && part.to == from) {\n        f(Math.max(part.from, from), Math.min(part.to, to), part.level == 1 ? \"rtl\" : \"ltr\");\n        found = true;\n      }\n    }\n    if (!found) f(from, to, \"ltr\");\n  }\n\n  function bidiLeft(part) { return part.level % 2 ? part.to : part.from; }\n  function bidiRight(part) { return part.level % 2 ? part.from : part.to; }\n\n  function lineLeft(line) { var order = getOrder(line); return order ? bidiLeft(order[0]) : 0; }\n  function lineRight(line) {\n    var order = getOrder(line);\n    if (!order) return line.text.length;\n    return bidiRight(lst(order));\n  }\n\n  function lineStart(cm, lineN) {\n    var line = getLine(cm.doc, lineN);\n    var visual = visualLine(line);\n    if (visual != line) lineN = lineNo(visual);\n    var order = getOrder(visual);\n    var ch = !order ? 0 : order[0].level % 2 ? lineRight(visual) : lineLeft(visual);\n    return Pos(lineN, ch);\n  }\n  function lineEnd(cm, lineN) {\n    var merged, line = getLine(cm.doc, lineN);\n    while (merged = collapsedSpanAtEnd(line)) {\n      line = merged.find(1, true).line;\n      lineN = null;\n    }\n    var order = getOrder(line);\n    var ch = !order ? line.text.length : order[0].level % 2 ? lineLeft(line) : lineRight(line);\n    return Pos(lineN == null ? lineNo(line) : lineN, ch);\n  }\n  function lineStartSmart(cm, pos) {\n    var start = lineStart(cm, pos.line);\n    var line = getLine(cm.doc, start.line);\n    var order = getOrder(line);\n    if (!order || order[0].level == 0) {\n      var firstNonWS = Math.max(0, line.text.search(/\\S/));\n      var inWS = pos.line == start.line && pos.ch <= firstNonWS && pos.ch;\n      return Pos(start.line, inWS ? 0 : firstNonWS);\n    }\n    return start;\n  }\n\n  function compareBidiLevel(order, a, b) {\n    var linedir = order[0].level;\n    if (a == linedir) return true;\n    if (b == linedir) return false;\n    return a < b;\n  }\n  var bidiOther;\n  function getBidiPartAt(order, pos) {\n    bidiOther = null;\n    for (var i = 0, found; i < order.length; ++i) {\n      var cur = order[i];\n      if (cur.from < pos && cur.to > pos) return i;\n      if ((cur.from == pos || cur.to == pos)) {\n        if (found == null) {\n          found = i;\n        } else if (compareBidiLevel(order, cur.level, order[found].level)) {\n          if (cur.from != cur.to) bidiOther = found;\n          return i;\n        } else {\n          if (cur.from != cur.to) bidiOther = i;\n          return found;\n        }\n      }\n    }\n    return found;\n  }\n\n  function moveInLine(line, pos, dir, byUnit) {\n    if (!byUnit) return pos + dir;\n    do pos += dir;\n    while (pos > 0 && isExtendingChar(line.text.charAt(pos)));\n    return pos;\n  }\n\n  // This is needed in order to move 'visually' through bi-directional\n  // text -- i.e., pressing left should make the cursor go left, even\n  // when in RTL text. The tricky part is the 'jumps', where RTL and\n  // LTR text touch each other. This often requires the cursor offset\n  // to move more than one unit, in order to visually move one unit.\n  function moveVisually(line, start, dir, byUnit) {\n    var bidi = getOrder(line);\n    if (!bidi) return moveLogically(line, start, dir, byUnit);\n    var pos = getBidiPartAt(bidi, start), part = bidi[pos];\n    var target = moveInLine(line, start, part.level % 2 ? -dir : dir, byUnit);\n\n    for (;;) {\n      if (target > part.from && target < part.to) return target;\n      if (target == part.from || target == part.to) {\n        if (getBidiPartAt(bidi, target) == pos) return target;\n        part = bidi[pos += dir];\n        return (dir > 0) == part.level % 2 ? part.to : part.from;\n      } else {\n        part = bidi[pos += dir];\n        if (!part) return null;\n        if ((dir > 0) == part.level % 2)\n          target = moveInLine(line, part.to, -1, byUnit);\n        else\n          target = moveInLine(line, part.from, 1, byUnit);\n      }\n    }\n  }\n\n  function moveLogically(line, start, dir, byUnit) {\n    var target = start + dir;\n    if (byUnit) while (target > 0 && isExtendingChar(line.text.charAt(target))) target += dir;\n    return target < 0 || target > line.text.length ? null : target;\n  }\n\n  // Bidirectional ordering algorithm\n  // See http://unicode.org/reports/tr9/tr9-13.html for the algorithm\n  // that this (partially) implements.\n\n  // One-char codes used for character types:\n  // L (L):   Left-to-Right\n  // R (R):   Right-to-Left\n  // r (AL):  Right-to-Left Arabic\n  // 1 (EN):  European Number\n  // + (ES):  European Number Separator\n  // % (ET):  European Number Terminator\n  // n (AN):  Arabic Number\n  // , (CS):  Common Number Separator\n  // m (NSM): Non-Spacing Mark\n  // b (BN):  Boundary Neutral\n  // s (B):   Paragraph Separator\n  // t (S):   Segment Separator\n  // w (WS):  Whitespace\n  // N (ON):  Other Neutrals\n\n  // Returns null if characters are ordered as they appear\n  // (left-to-right), or an array of sections ({from, to, level}\n  // objects) in the order in which they occur visually.\n  var bidiOrdering = (function() {\n    // Character types for codepoints 0 to 0xff\n    var lowTypes = \"bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN\";\n    // Character types for codepoints 0x600 to 0x6ff\n    var arabicTypes = \"rrrrrrrrrrrr,rNNmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmrrrrrrrnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmNmmmm\";\n    function charType(code) {\n      if (code <= 0xf7) return lowTypes.charAt(code);\n      else if (0x590 <= code && code <= 0x5f4) return \"R\";\n      else if (0x600 <= code && code <= 0x6ed) return arabicTypes.charAt(code - 0x600);\n      else if (0x6ee <= code && code <= 0x8ac) return \"r\";\n      else if (0x2000 <= code && code <= 0x200b) return \"w\";\n      else if (code == 0x200c) return \"b\";\n      else return \"L\";\n    }\n\n    var bidiRE = /[\\u0590-\\u05f4\\u0600-\\u06ff\\u0700-\\u08ac]/;\n    var isNeutral = /[stwN]/, isStrong = /[LRr]/, countsAsLeft = /[Lb1n]/, countsAsNum = /[1n]/;\n    // Browsers seem to always treat the boundaries of block elements as being L.\n    var outerType = \"L\";\n\n    function BidiSpan(level, from, to) {\n      this.level = level;\n      this.from = from; this.to = to;\n    }\n\n    return function(str) {\n      if (!bidiRE.test(str)) return false;\n      var len = str.length, types = [];\n      for (var i = 0, type; i < len; ++i)\n        types.push(type = charType(str.charCodeAt(i)));\n\n      // W1. Examine each non-spacing mark (NSM) in the level run, and\n      // change the type of the NSM to the type of the previous\n      // character. If the NSM is at the start of the level run, it will\n      // get the type of sor.\n      for (var i = 0, prev = outerType; i < len; ++i) {\n        var type = types[i];\n        if (type == \"m\") types[i] = prev;\n        else prev = type;\n      }\n\n      // W2. Search backwards from each instance of a European number\n      // until the first strong type (R, L, AL, or sor) is found. If an\n      // AL is found, change the type of the European number to Arabic\n      // number.\n      // W3. Change all ALs to R.\n      for (var i = 0, cur = outerType; i < len; ++i) {\n        var type = types[i];\n        if (type == \"1\" && cur == \"r\") types[i] = \"n\";\n        else if (isStrong.test(type)) { cur = type; if (type == \"r\") types[i] = \"R\"; }\n      }\n\n      // W4. A single European separator between two European numbers\n      // changes to a European number. A single common separator between\n      // two numbers of the same type changes to that type.\n      for (var i = 1, prev = types[0]; i < len - 1; ++i) {\n        var type = types[i];\n        if (type == \"+\" && prev == \"1\" && types[i+1] == \"1\") types[i] = \"1\";\n        else if (type == \",\" && prev == types[i+1] &&\n                 (prev == \"1\" || prev == \"n\")) types[i] = prev;\n        prev = type;\n      }\n\n      // W5. A sequence of European terminators adjacent to European\n      // numbers changes to all European numbers.\n      // W6. Otherwise, separators and terminators change to Other\n      // Neutral.\n      for (var i = 0; i < len; ++i) {\n        var type = types[i];\n        if (type == \",\") types[i] = \"N\";\n        else if (type == \"%\") {\n          for (var end = i + 1; end < len && types[end] == \"%\"; ++end) {}\n          var replace = (i && types[i-1] == \"!\") || (end < len && types[end] == \"1\") ? \"1\" : \"N\";\n          for (var j = i; j < end; ++j) types[j] = replace;\n          i = end - 1;\n        }\n      }\n\n      // W7. Search backwards from each instance of a European number\n      // until the first strong type (R, L, or sor) is found. If an L is\n      // found, then change the type of the European number to L.\n      for (var i = 0, cur = outerType; i < len; ++i) {\n        var type = types[i];\n        if (cur == \"L\" && type == \"1\") types[i] = \"L\";\n        else if (isStrong.test(type)) cur = type;\n      }\n\n      // N1. A sequence of neutrals takes the direction of the\n      // surrounding strong text if the text on both sides has the same\n      // direction. European and Arabic numbers act as if they were R in\n      // terms of their influence on neutrals. Start-of-level-run (sor)\n      // and end-of-level-run (eor) are used at level run boundaries.\n      // N2. Any remaining neutrals take the embedding direction.\n      for (var i = 0; i < len; ++i) {\n        if (isNeutral.test(types[i])) {\n          for (var end = i + 1; end < len && isNeutral.test(types[end]); ++end) {}\n          var before = (i ? types[i-1] : outerType) == \"L\";\n          var after = (end < len ? types[end] : outerType) == \"L\";\n          var replace = before || after ? \"L\" : \"R\";\n          for (var j = i; j < end; ++j) types[j] = replace;\n          i = end - 1;\n        }\n      }\n\n      // Here we depart from the documented algorithm, in order to avoid\n      // building up an actual levels array. Since there are only three\n      // levels (0, 1, 2) in an implementation that doesn't take\n      // explicit embedding into account, we can build up the order on\n      // the fly, without following the level-based algorithm.\n      var order = [], m;\n      for (var i = 0; i < len;) {\n        if (countsAsLeft.test(types[i])) {\n          var start = i;\n          for (++i; i < len && countsAsLeft.test(types[i]); ++i) {}\n          order.push(new BidiSpan(0, start, i));\n        } else {\n          var pos = i, at = order.length;\n          for (++i; i < len && types[i] != \"L\"; ++i) {}\n          for (var j = pos; j < i;) {\n            if (countsAsNum.test(types[j])) {\n              if (pos < j) order.splice(at, 0, new BidiSpan(1, pos, j));\n              var nstart = j;\n              for (++j; j < i && countsAsNum.test(types[j]); ++j) {}\n              order.splice(at, 0, new BidiSpan(2, nstart, j));\n              pos = j;\n            } else ++j;\n          }\n          if (pos < i) order.splice(at, 0, new BidiSpan(1, pos, i));\n        }\n      }\n      if (order[0].level == 1 && (m = str.match(/^\\s+/))) {\n        order[0].from = m[0].length;\n        order.unshift(new BidiSpan(0, 0, m[0].length));\n      }\n      if (lst(order).level == 1 && (m = str.match(/\\s+$/))) {\n        lst(order).to -= m[0].length;\n        order.push(new BidiSpan(0, len - m[0].length, len));\n      }\n      if (order[0].level == 2)\n        order.unshift(new BidiSpan(1, order[0].to, order[0].to));\n      if (order[0].level != lst(order).level)\n        order.push(new BidiSpan(order[0].level, len, len));\n\n      return order;\n    };\n  })();\n\n  // THE END\n\n  CodeMirror.version = \"5.11.0\";\n\n  return CodeMirror;\n});\n"
  },
  {
    "path": "static/mergely/lib/mergely.css",
    "content": "\n/* required */\n.mergely-column textarea { width: 80px; height: 200px; }\n.mergely-column { float: left; }\n.mergely-margin { float: left; }\n.mergely-canvas { float: left; width: 28px; }\n\n/* resizeable */\n.mergely-resizer { width: 100%; height: 100%; }\n\n/* style configuration */\n.mergely-column { border: 1px solid #ccc; }\n.mergely-active { border: 1px solid #a3d1ff; }\n\n.mergely.a,.mergely.d,.mergely.c { color: #000; }\n\n.mergely.a.rhs.start { border-top: 1px solid #a3d1ff; }\n.mergely.a.lhs.start.end,\n.mergely.a.rhs.end { border-bottom: 1px solid #a3d1ff; }\n.mergely.a.rhs { background-color: #ddeeff; }\n.mergely.a.lhs.start.end.first { border-bottom: 0; border-top: 1px solid #a3d1ff; }\n\n.mergely.d.lhs { background-color: #ffe9e9; }\n.mergely.d.lhs.end,\n.mergely.d.rhs.start.end { border-bottom: 1px solid #f8e8e8; }\n.mergely.d.rhs.start.end.first { border-bottom: 0; border-top: 1px solid #f8e8e8; }\n.mergely.d.lhs.start { border-top: 1px solid #f8e8e8; }\n\n.mergely.c.lhs,\n.mergely.c.rhs { background-color: #fafafa; }\n.mergely.c.lhs.start,\n.mergely.c.rhs.start { border-top: 1px solid #a3a3a3; }\n.mergely.c.lhs.end,\n.mergely.c.rhs.end { border-bottom: 1px solid #a3a3a3; }\n\n.mergely.ch.a.rhs { background-color: #ddeeff; }\n.mergely.ch.d.lhs { background-color: #ffe9e9; text-decoration: line-through; color: red !important; }\n\n.mergely.current.start { border-top: 1px solid #000 !important; }\n.mergely.current.end { border-bottom: 1px solid #000 !important; }\n.mergely.current.lhs.a.start.end,\n.mergely.current.rhs.d.start.end { border-top: 0 !important; }\n.mergely.current.CodeMirror-linenumber { color: #F9F9F9; font-weight: bold; background-color: #777; }\n.CodeMirror-linenumber { cursor: pointer; }\n.CodeMirror-code { color: #717171; }\n"
  },
  {
    "path": "static/mergely/lib/mergely.js",
    "content": "\"use strict\";\n\n(function( window, document, jQuery, CodeMirror ){\n\nvar Mgly = {};\n\nMgly.Timer = function(){\n\tvar self = this;\n\tself.start = function() { self.t0 = new Date().getTime(); };\n\tself.stop = function() {\n\t\tvar t1 = new Date().getTime();\n\t\tvar d = t1 - self.t0;\n\t\tself.t0 = t1;\n\t\treturn d;\n\t};\n\tself.start();\n};\n\nMgly.ChangeExpression = new RegExp(/(^(?![><\\-])*\\d+(?:,\\d+)?)([acd])(\\d+(?:,\\d+)?)/);\n\nMgly.DiffParser = function(diff) {\n\tvar changes = [];\n\tvar change_id = 0;\n\t// parse diff\n\tvar diff_lines = diff.split(/\\n/);\n\tfor (var i = 0; i < diff_lines.length; ++i) {\n\t\tif (diff_lines[i].length == 0) continue;\n\t\tvar change = {};\n\t\tvar test = Mgly.ChangeExpression.exec(diff_lines[i]);\n\t\tif (test == null) continue;\n\t\t// lines are zero-based\n\t\tvar fr = test[1].split(',');\n\t\tchange['lhs-line-from'] = fr[0] - 1;\n\t\tif (fr.length == 1) change['lhs-line-to'] = fr[0] - 1;\n\t\telse change['lhs-line-to'] = fr[1] - 1;\n\t\tvar to = test[3].split(',');\n\t\tchange['rhs-line-from'] = to[0] - 1;\n\t\tif (to.length == 1) change['rhs-line-to'] = to[0] - 1;\n\t\telse change['rhs-line-to'] = to[1] - 1;\n\t\tchange['op'] = test[2];\n\t\tchanges[change_id++] = change;\n\t}\n\treturn changes;\n};\n\nMgly.sizeOf = function(obj) {\n\tvar size = 0, key;\n\tfor (key in obj) {\n\t\tif (obj.hasOwnProperty(key)) size++;\n\t}\n\treturn size;\n};\n\nMgly.LCS = function(x, y) {\n\tthis.x = x.replace(/[ ]{1}/g, '\\n');\n\tthis.y = y.replace(/[ ]{1}/g, '\\n');\n};\n\njQuery.extend(Mgly.LCS.prototype, {\n\tclear: function() { this.ready = 0; },\n\tdiff: function(added, removed) {\n\t\tvar d = new Mgly.diff(this.x, this.y, {ignorews: false});\n\t\tvar changes = Mgly.DiffParser(d.normal_form());\n\t\tvar li = 0, lj = 0;\n\t\tfor (var i = 0; i < changes.length; ++i) {\n\t\t\tvar change = changes[i];\n\t\t\tif (change.op != 'a') {\n\t\t\t\t// find the starting index of the line\n\t\t\t\tli = d.getLines('lhs').slice(0, change['lhs-line-from']).join(' ').length;\n\t\t\t\t// get the index of the the span of the change\n\t\t\t\tlj = change['lhs-line-to'] + 1;\n\t\t\t\t// get the changed text\n\t\t\t\tvar lchange = d.getLines('lhs').slice(change['lhs-line-from'], lj).join(' ');\n\t\t\t\tif (change.op == 'd') lchange += ' ';// include the leading space\n\t\t\t\telse if (li > 0 && change.op == 'c') li += 1; // ignore leading space if not first word\n\t\t\t\t// output the changed index and text\n\t\t\t\tremoved(li, li + lchange.length);\n\t\t\t}\n\t\t\tif (change.op != 'd') {\n\t\t\t\t// find the starting index of the line\n\t\t\t\tli = d.getLines('rhs').slice(0, change['rhs-line-from']).join(' ').length;\n\t\t\t\t// get the index of the the span of the change\n\t\t\t\tlj = change['rhs-line-to'] + 1;\n\t\t\t\t// get the changed text\n\t\t\t\tvar rchange = d.getLines('rhs').slice(change['rhs-line-from'], lj).join(' ');\n\t\t\t\tif (change.op == 'a') rchange += ' ';// include the leading space\n\t\t\t\telse if (li > 0 && change.op == 'c') li += 1; // ignore leading space if not first word\n\t\t\t\t// output the changed index and text\n\t\t\t\tadded(li, li + rchange.length);\n\t\t\t}\n\t\t}\n\t}\n});\n\nMgly.CodeifyText = function(settings) {\n    this._max_code = 0;\n    this._diff_codes = {};\n\tthis.ctxs = {};\n\tthis.options = {ignorews: false};\n\tjQuery.extend(this, settings);\n\tthis.lhs = settings.lhs.split('\\n');\n\tthis.rhs = settings.rhs.split('\\n');\n};\n\njQuery.extend(Mgly.CodeifyText.prototype, {\n\tgetCodes: function(side) {\n\t\tif (!this.ctxs.hasOwnProperty(side)) {\n\t\t\tvar ctx = this._diff_ctx(this[side]);\n\t\t\tthis.ctxs[side] = ctx;\n\t\t\tctx.codes.length = Object.keys(ctx.codes).length;\n\t\t}\n\t\treturn this.ctxs[side].codes;\n\t},\n\tgetLines: function(side) {\n\t\treturn this.ctxs[side].lines;\n\t},\n\t_diff_ctx: function(lines) {\n\t\tvar ctx = {i: 0, codes: {}, lines: lines};\n\t\tthis._codeify(lines, ctx);\n\t\treturn ctx;\n\t},\n\t_codeify: function(lines, ctx) {\n\t\tvar code = this._max_code;\n\t\tfor (var i = 0; i < lines.length; ++i) {\n\t\t\tvar line = lines[i];\n\t\t\tif (this.options.ignorews) {\n\t\t\t\tline = line.replace(/\\s+/g, '');\n\t\t\t}\n\t\t\tif (this.options.ignorecase) {\n\t\t\t\tline = line.toLowerCase();\n\t\t\t}\n\t\t\tvar aCode = this._diff_codes[line];\n\t\t\tif (aCode != undefined) {\n\t\t\t\tctx.codes[i] = aCode;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthis._max_code++;\n\t\t\t\tthis._diff_codes[line] = this._max_code;\n\t\t\t\tctx.codes[i] = this._max_code;\n\t\t\t}\n\t\t}\n\t}\n});\n\nMgly.diff = function(lhs, rhs, options) {\n\tvar opts = jQuery.extend({ignorews: false}, options);\n\tthis.codeify = new Mgly.CodeifyText({\n\t\tlhs: lhs,\n\t\trhs: rhs,\n\t\toptions: opts\n\t});\n\tvar lhs_ctx = {\n\t\tcodes: this.codeify.getCodes('lhs'),\n\t\tmodified: {}\n\t};\n\tvar rhs_ctx = {\n\t\tcodes: this.codeify.getCodes('rhs'),\n\t\tmodified: {}\n\t};\n\tvar max = (lhs_ctx.codes.length + rhs_ctx.codes.length + 1);\n\tvar vector_d = [];\n\tvar vector_u = [];\n\tthis._lcs(lhs_ctx, 0, lhs_ctx.codes.length, rhs_ctx, 0, rhs_ctx.codes.length, vector_u, vector_d);\n\tthis._optimize(lhs_ctx);\n\tthis._optimize(rhs_ctx);\n\tthis.items = this._create_diffs(lhs_ctx, rhs_ctx);\n};\n\njQuery.extend(Mgly.diff.prototype, {\n\tchanges: function() { return this.items; },\n\tgetLines: function(side) {\n\t\treturn this.codeify.getLines(side);\n\t},\n\tnormal_form: function() {\n\t\tvar nf = '';\n\t\tfor (var index = 0; index < this.items.length; ++index) {\n\t\t\tvar item = this.items[index];\n\t\t\tvar lhs_str = '';\n\t\t\tvar rhs_str = '';\n\t\t\tvar change = 'c';\n\t\t\tif (item.lhs_deleted_count == 0 && item.rhs_inserted_count > 0) change = 'a';\n\t\t\telse if (item.lhs_deleted_count > 0 && item.rhs_inserted_count == 0) change = 'd';\n\n\t\t\tif (item.lhs_deleted_count == 1) lhs_str = item.lhs_start + 1;\n\t\t\telse if (item.lhs_deleted_count == 0) lhs_str = item.lhs_start;\n\t\t\telse lhs_str = (item.lhs_start + 1) + ',' + (item.lhs_start + item.lhs_deleted_count);\n\n\t\t\tif (item.rhs_inserted_count == 1) rhs_str = item.rhs_start + 1;\n\t\t\telse if (item.rhs_inserted_count == 0) rhs_str = item.rhs_start;\n\t\t\telse rhs_str = (item.rhs_start + 1) + ',' + (item.rhs_start + item.rhs_inserted_count);\n\t\t\tnf += lhs_str + change + rhs_str + '\\n';\n\n\t\t\tvar lhs_lines = this.getLines('lhs');\n\t\t\tvar rhs_lines = this.getLines('rhs');\n\t\t\tif (rhs_lines && lhs_lines) {\n\t\t\t\tvar i;\n\t\t\t\t// if rhs/lhs lines have been retained, output contextual diff\n\t\t\t\tfor (i = item.lhs_start; i < item.lhs_start + item.lhs_deleted_count; ++i) {\n\t\t\t\t\tnf += '< ' + lhs_lines[i] + '\\n';\n\t\t\t\t}\n\t\t\t\tif (item.rhs_inserted_count && item.lhs_deleted_count) nf += '---\\n';\n\t\t\t\tfor (i = item.rhs_start; i < item.rhs_start + item.rhs_inserted_count; ++i) {\n\t\t\t\t\tnf += '> ' + rhs_lines[i] + '\\n';\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn nf;\n\t},\n\t_lcs: function(lhs_ctx, lhs_lower, lhs_upper, rhs_ctx, rhs_lower, rhs_upper, vector_u, vector_d) {\n\t\twhile ( (lhs_lower < lhs_upper) && (rhs_lower < rhs_upper) && (lhs_ctx.codes[lhs_lower] == rhs_ctx.codes[rhs_lower]) ) {\n\t\t\t++lhs_lower;\n\t\t\t++rhs_lower;\n\t\t}\n\t\twhile ( (lhs_lower < lhs_upper) && (rhs_lower < rhs_upper) && (lhs_ctx.codes[lhs_upper - 1] == rhs_ctx.codes[rhs_upper - 1]) ) {\n\t\t\t--lhs_upper;\n\t\t\t--rhs_upper;\n\t\t}\n\t\tif (lhs_lower == lhs_upper) {\n\t\t\twhile (rhs_lower < rhs_upper) {\n\t\t\t\trhs_ctx.modified[ rhs_lower++ ] = true;\n\t\t\t}\n\t\t}\n\t\telse if (rhs_lower == rhs_upper) {\n\t\t\twhile (lhs_lower < lhs_upper) {\n\t\t\t\tlhs_ctx.modified[ lhs_lower++ ] = true;\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tvar sms = this._sms(lhs_ctx, lhs_lower, lhs_upper, rhs_ctx, rhs_lower, rhs_upper, vector_u, vector_d);\n\t\t\tthis._lcs(lhs_ctx, lhs_lower, sms.x, rhs_ctx, rhs_lower, sms.y, vector_u, vector_d);\n\t\t\tthis._lcs(lhs_ctx, sms.x, lhs_upper, rhs_ctx, sms.y, rhs_upper, vector_u, vector_d);\n\t\t}\n\t},\n\t_sms: function(lhs_ctx, lhs_lower, lhs_upper, rhs_ctx, rhs_lower, rhs_upper, vector_u, vector_d) {\n\t\tvar max = lhs_ctx.codes.length + rhs_ctx.codes.length + 1;\n\t\tvar kdown = lhs_lower - rhs_lower;\n\t\tvar kup = lhs_upper - rhs_upper;\n\t\tvar delta = (lhs_upper - lhs_lower) - (rhs_upper - rhs_lower);\n\t\tvar odd = (delta & 1) != 0;\n\t\tvar offset_down = max - kdown;\n\t\tvar offset_up = max - kup;\n\t\tvar maxd = ((lhs_upper - lhs_lower + rhs_upper - rhs_lower) / 2) + 1;\n\t\tvector_d[ offset_down + kdown + 1 ] = lhs_lower;\n\t\tvector_u[ offset_up + kup - 1 ] = lhs_upper;\n\t\tvar ret = {x:0,y:0}, d, k, x, y;\n\t\tfor (d = 0; d <= maxd; ++d) {\n\t\t\tfor (k = kdown - d; k <= kdown + d; k += 2) {\n\t\t\t\tif (k == kdown - d) {\n\t\t\t\t\tx = vector_d[ offset_down + k + 1 ];//down\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tx = vector_d[ offset_down + k - 1 ] + 1;//right\n\t\t\t\t\tif ((k < (kdown + d)) && (vector_d[ offset_down + k + 1 ] >= x)) {\n\t\t\t\t\t\tx = vector_d[ offset_down + k + 1 ];//down\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\ty = x - k;\n\t\t\t\t// find the end of the furthest reaching forward D-path in diagonal k.\n\t\t\t\twhile ((x < lhs_upper) && (y < rhs_upper) && (lhs_ctx.codes[x] == rhs_ctx.codes[y])) {\n\t\t\t\t\tx++; y++;\n\t\t\t\t}\n\t\t\t\tvector_d[ offset_down + k ] = x;\n\t\t\t\t// overlap ?\n\t\t\t\tif (odd && (kup - d < k) && (k < kup + d)) {\n\t\t\t\t\tif (vector_u[offset_up + k] <= vector_d[offset_down + k]) {\n\t\t\t\t\t\tret.x = vector_d[offset_down + k];\n\t\t\t\t\t\tret.y = vector_d[offset_down + k] - k;\n\t\t\t\t\t\treturn (ret);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Extend the reverse path.\n\t\t\tfor (k = kup - d; k <= kup + d; k += 2) {\n\t\t\t\t// find the only or better starting point\n\t\t\t\tif (k == kup + d) {\n\t\t\t\t\tx = vector_u[offset_up + k - 1]; // up\n\t\t\t\t} else {\n\t\t\t\t\tx = vector_u[offset_up + k + 1] - 1; // left\n\t\t\t\t\tif ((k > kup - d) && (vector_u[offset_up + k - 1] < x))\n\t\t\t\t\t\tx = vector_u[offset_up + k - 1]; // up\n\t\t\t\t}\n\t\t\t\ty = x - k;\n\t\t\t\twhile ((x > lhs_lower) && (y > rhs_lower) && (lhs_ctx.codes[x - 1] == rhs_ctx.codes[y - 1])) {\n\t\t\t\t\t// diagonal\n\t\t\t\t\tx--;\n\t\t\t\t\ty--;\n\t\t\t\t}\n\t\t\t\tvector_u[offset_up + k] = x;\n\t\t\t\t// overlap ?\n\t\t\t\tif (!odd && (kdown - d <= k) && (k <= kdown + d)) {\n\t\t\t\t\tif (vector_u[offset_up + k] <= vector_d[offset_down + k]) {\n\t\t\t\t\t\tret.x = vector_d[offset_down + k];\n\t\t\t\t\t\tret.y = vector_d[offset_down + k] - k;\n\t\t\t\t\t\treturn (ret);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tthrow \"the algorithm should never come here.\";\n\t},\n\t_optimize: function(ctx) {\n\t\tvar start = 0, end = 0;\n\t\twhile (start < ctx.codes.length) {\n\t\t\twhile ((start < ctx.codes.length) && (ctx.modified[start] == undefined || ctx.modified[start] == false)) {\n\t\t\t\tstart++;\n\t\t\t}\n\t\t\tend = start;\n\t\t\twhile ((end < ctx.codes.length) && (ctx.modified[end] == true)) {\n\t\t\t\tend++;\n\t\t\t}\n\t\t\tif ((end < ctx.codes.length) && (ctx.codes[start] == ctx.codes[end])) {\n\t\t\t\tctx.modified[start] = false;\n\t\t\t\tctx.modified[end] = true;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tstart = end;\n\t\t\t}\n\t\t}\n\t},\n\t_create_diffs: function(lhs_ctx, rhs_ctx) {\n\t\tvar items = [];\n\t\tvar lhs_start = 0, rhs_start = 0;\n\t\tvar lhs_line = 0, rhs_line = 0;\n\n\t\twhile (lhs_line < lhs_ctx.codes.length || rhs_line < rhs_ctx.codes.length) {\n\t\t\tif ((lhs_line < lhs_ctx.codes.length) && (!lhs_ctx.modified[lhs_line])\n\t\t\t\t&& (rhs_line < rhs_ctx.codes.length) && (!rhs_ctx.modified[rhs_line])) {\n\t\t\t\t// equal lines\n\t\t\t\tlhs_line++;\n\t\t\t\trhs_line++;\n\t\t\t}\n\t\t\telse {\n\t\t\t\t// maybe deleted and/or inserted lines\n\t\t\t\tlhs_start = lhs_line;\n\t\t\t\trhs_start = rhs_line;\n\n\t\t\t\twhile (lhs_line < lhs_ctx.codes.length && (rhs_line >= rhs_ctx.codes.length || lhs_ctx.modified[lhs_line]))\n\t\t\t\t\tlhs_line++;\n\n\t\t\t\twhile (rhs_line < rhs_ctx.codes.length && (lhs_line >= lhs_ctx.codes.length || rhs_ctx.modified[rhs_line]))\n\t\t\t\t\trhs_line++;\n\n\t\t\t\tif ((lhs_start < lhs_line) || (rhs_start < rhs_line)) {\n\t\t\t\t\t// store a new difference-item\n\t\t\t\t\titems.push({\n\t\t\t\t\t\tlhs_start: lhs_start,\n\t\t\t\t\t\trhs_start: rhs_start,\n\t\t\t\t\t\tlhs_deleted_count: lhs_line - lhs_start,\n\t\t\t\t\t\trhs_inserted_count: rhs_line - rhs_start\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn items;\n\t}\n});\n\nMgly.mergely = function(el, options) {\n\tif (el) {\n\t\tthis.init(el, options);\n\t}\n};\n\njQuery.extend(Mgly.mergely.prototype, {\n\tname: 'mergely',\n\t//http://jupiterjs.com/news/writing-the-perfect-jquery-plugin\n\tinit: function(el, options) {\n\t\tthis.diffView = new Mgly.CodeMirrorDiffView(el, options);\n\t\tthis.bind(el);\n\t},\n\tbind: function(el) {\n\t\tthis.diffView.bind(el);\n\t}\n});\n\nMgly.CodeMirrorDiffView = function(el, options) {\n\tCodeMirror.defineExtension('centerOnCursor', function() {\n\t\tvar coords = this.cursorCoords(null, 'local');\n\t\tthis.scrollTo(null,\n\t\t\t(coords.y + coords.yBot) / 2 - (this.getScrollerElement().clientHeight / 2));\n\t});\n\tthis.init(el, options);\n};\n\njQuery.extend(Mgly.CodeMirrorDiffView.prototype, {\n\tinit: function(el, options) {\n\t\tthis.settings = {\n\t\t\tautoupdate: true,\n\t\t\tautoresize: true,\n\t\t\trhs_margin: 'right',\n\t\t\twrap_lines: false,\n\t\t\tline_numbers: true,\n\t\t\tlcs: true,\n\t\t\tsidebar: true,\n\t\t\tviewport: false,\n\t\t\tignorews: false,\n\t\t\tignorecase: false,\n\t\t\tfadein: 'fast',\n\t\t\teditor_width: '650px',\n\t\t\teditor_height: '400px',\n\t\t\tresize_timeout: 500,\n\t\t\tchange_timeout: 150,\n\t\t\tfgcolor: {a:'#4ba3fa',c:'#a3a3a3',d:'#ff7f7f',  // color for differences (soft color)\n\t\t\t\tca:'#4b73ff',cc:'#434343',cd:'#ff4f4f'},    // color for currently active difference (bright color)\n\t\t\tbgcolor: '#eee',\n\t\t\tvpcolor: 'rgba(0, 0, 200, 0.5)',\n\t\t\tlhs: function(setValue) { },\n\t\t\trhs: function(setValue) { },\n\t\t\tloaded: function() { },\n\t\t\t_auto_width: function(w) { return w; },\n\t\t\tresize: function(init) {\n\t\t\t\tvar scrollbar = init ? 16 : 0;\n\t\t\t\tvar w = jQuery(el).parent().width() + scrollbar, h = 0;\n\t\t\t\tif (this.width == 'auto') {\n\t\t\t\t\tw = this._auto_width(w);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tw = this.width;\n\t\t\t\t\tthis.editor_width = w;\n\t\t\t\t}\n\t\t\t\tif (this.height == 'auto') {\n\t\t\t\t\t//h = this._auto_height(h);\n\t\t\t\t\th = jQuery(el).parent().height();\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\th = this.height;\n\t\t\t\t\tthis.editor_height = h;\n\t\t\t\t}\n\t\t\t\tvar content_width = w / 2.0 - 2 * 8 - 8;\n\t\t\t\tvar content_height = h;\n\t\t\t\tvar self = jQuery(el);\n\t\t\t\tself.find('.mergely-column').css({ width: content_width + 'px' });\n\t\t\t\tself.find('.mergely-column, .mergely-canvas, .mergely-margin, .mergely-column textarea, .CodeMirror-scroll, .cm-s-default').css({ height: content_height + 'px' });\n\t\t\t\tself.find('.mergely-canvas').css({ height: content_height + 'px' });\n\t\t\t\tself.find('.mergely-column textarea').css({ width: content_width + 'px' });\n\t\t\t\tself.css({ width: w, height: h, clear: 'both' });\n\t\t\t\tif (self.css('display') == 'none') {\n\t\t\t\t\tif (this.fadein != false) self.fadeIn(this.fadein);\n\t\t\t\t\telse self.show();\n\t\t\t\t\tif (this.loaded) this.loaded();\n\t\t\t\t}\n\t\t\t\tif (this.resized) this.resized();\n\t\t\t},\n\t\t\t_debug: '', //scroll,draw,calc,diff,markup,change\n\t\t\tresized: function() { }\n\t\t};\n\t\tvar cmsettings = {\n\t\t\tmode: 'text/plain',\n\t\t\treadOnly: false,\n\t\t\tlineWrapping: this.settings.wrap_lines,\n\t\t\tlineNumbers: this.settings.line_numbers,\n\t\t\tgutters: ['merge', 'CodeMirror-linenumbers']\n\t\t};\n\t\tthis.lhs_cmsettings = {};\n\t\tthis.rhs_cmsettings = {};\n\n\t\t// save this element for faster queries\n\t\tthis.element = jQuery(el);\n\n\t\t// save options if there are any\n\t\tif (options && options.cmsettings) jQuery.extend(this.lhs_cmsettings, cmsettings, options.cmsettings, options.lhs_cmsettings);\n\t\tif (options && options.cmsettings) jQuery.extend(this.rhs_cmsettings, cmsettings, options.cmsettings, options.rhs_cmsettings);\n\t\t//if (options) jQuery.extend(this.settings, options);\n\n\t\t// bind if the element is destroyed\n\t\tthis.element.bind('destroyed', jQuery.proxy(this.teardown, this));\n\n\t\t// save this instance in jQuery data, binding this view to the node\n\t\tjQuery.data(el, 'mergely', this);\n\n\t\tthis._setOptions(options);\n\t},\n\tunbind: function() {\n\t\tif (this.changed_timeout != null) clearTimeout(this.changed_timeout);\n\t\tthis.editor[this.id + '-lhs'].toTextArea();\n\t\tthis.editor[this.id + '-rhs'].toTextArea();\n\t\tjQuery(window).off('.mergely');\n\t},\n\tdestroy: function() {\n\t\tthis.element.unbind('destroyed', this.teardown);\n\t\tthis.teardown();\n\t},\n\tteardown: function() {\n\t\tthis.unbind();\n\t},\n\tlhs: function(text) {\n\t\tthis.editor[this.id + '-lhs'].setValue(text);\n\t},\n\trhs: function(text) {\n\t\tthis.editor[this.id + '-rhs'].setValue(text);\n\t},\n\tupdate: function() {\n\t\tthis._changing(this.id + '-lhs', this.id + '-rhs');\n\t},\n\tunmarkup: function() {\n\t\tthis._clear();\n\t},\n\tscrollToDiff: function(direction) {\n\t\tif (!this.changes.length) return;\n\t\tif (direction == 'next') {\n\t\t\tif (this._current_diff == this.changes.length -1) {\n\t\t\t\tthis._current_diff = 0;\n\t\t\t} else {\n\t\t\t\tthis._current_diff = Math.min(++this._current_diff, this.changes.length - 1);\n\t\t\t}\n\t\t}\n\t\telse if (direction == 'prev') {\n\t\t\tif (this._current_diff == 0) {\n\t\t\t\tthis._current_diff = this.changes.length - 1;\n\t\t\t} else {\n\t\t\t\tthis._current_diff = Math.max(--this._current_diff, 0);\n\t\t\t}\n\t\t}\n\t\tthis._scroll_to_change(this.changes[this._current_diff]);\n\t\tthis._changed(this.id + '-lhs', this.id + '-rhs');\n\t},\n\tmergeCurrentChange: function(side) {\n\t\tif (!this.changes.length) return;\n\t\tif (side == 'lhs' && !this.lhs_cmsettings.readOnly) {\n\t\t\tthis._merge_change(this.changes[this._current_diff], 'rhs', 'lhs');\n\t\t}\n\t\telse if (side == 'rhs' && !this.rhs_cmsettings.readOnly) {\n\t\t\tthis._merge_change(this.changes[this._current_diff], 'lhs', 'rhs');\n\t\t}\n\t},\n\tscrollTo: function(side, num) {\n\t\tvar le = this.editor[this.id + '-lhs'];\n\t\tvar re = this.editor[this.id + '-rhs'];\n\t\tif (side == 'lhs') {\n\t\t\tle.setCursor(num);\n\t\t\tle.centerOnCursor();\n\t\t}\n\t\telse {\n\t\t\tre.setCursor(num);\n\t\t\tre.centerOnCursor();\n\t\t}\n\t},\n\t_setOptions: function(opts) {\n\t\tjQuery.extend(this.settings, opts);\n\t\tif (this.settings.hasOwnProperty('rhs_margin')) {\n\t\t\t// dynamically swap the margin\n\t\t\tif (this.settings.rhs_margin == 'left') {\n\t\t\t\tthis.element.find('.mergely-margin:last-child').insertAfter(\n\t\t\t\t\tthis.element.find('.mergely-canvas'));\n\t\t\t}\n\t\t\telse {\n\t\t\t\tvar target = this.element.find('.mergely-margin').last();\n\t\t\t\ttarget.appendTo(target.parent());\n\t\t\t}\n\t\t}\n\t\tif (this.settings.hasOwnProperty('sidebar')) {\n\t\t\t// dynamically enable sidebars\n\t\t\tif (this.settings.sidebar) {\n\t\t\t\tthis.element.find('.mergely-margin').css({display: 'block'});\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthis.element.find('.mergely-margin').css({display: 'none'});\n\t\t\t}\n\t\t}\n\t\tvar le, re;\n\t\tif (this.settings.hasOwnProperty('wrap_lines')) {\n\t\t\tif (this.editor) {\n\t\t\t\tle = this.editor[this.id + '-lhs'];\n\t\t\t\tre = this.editor[this.id + '-rhs'];\n\t\t\t\tle.setOption('lineWrapping', this.settings.wrap_lines);\n\t\t\t\tre.setOption('lineWrapping', this.settings.wrap_lines);\n\t\t\t}\n\t\t}\n\t\tif (this.settings.hasOwnProperty('line_numbers')) {\n\t\t\tif (this.editor) {\n\t\t\t\tle = this.editor[this.id + '-lhs'];\n\t\t\t\tre = this.editor[this.id + '-rhs'];\n\t\t\t\tle.setOption('lineNumbers', this.settings.line_numbers);\n\t\t\t\tre.setOption('lineNumbers', this.settings.line_numbers);\n\t\t\t}\n\t\t}\n\t},\n\toptions: function(opts) {\n\t\tif (opts) {\n\t\t\tthis._setOptions(opts);\n\t\t\tif (this.settings.autoresize) this.resize();\n\t\t\tif (this.settings.autoupdate) this.update();\n\t\t}\n\t\telse {\n\t\t\treturn this.settings;\n\t\t}\n\t},\n\tswap: function() {\n\t\tif (this.lhs_cmsettings.readOnly || this.rhs_cmsettings.readOnly) return;\n\t\tvar le = this.editor[this.id + '-lhs'];\n\t\tvar re = this.editor[this.id + '-rhs'];\n\t\tvar tmp = re.getValue();\n\t\tre.setValue(le.getValue());\n\t\tle.setValue(tmp);\n\t},\n\tmerge: function(side) {\n\t\tvar le = this.editor[this.id + '-lhs'];\n\t\tvar re = this.editor[this.id + '-rhs'];\n\t\tif (side == 'lhs' && !this.lhs_cmsettings.readOnly) le.setValue(re.getValue());\n\t\telse if (!this.rhs_cmsettings.readOnly) re.setValue(le.getValue());\n\t},\n\tget: function(side) {\n\t\tvar ed = this.editor[this.id + '-' + side];\n\t\tvar t = ed.getValue();\n\t\tif (t == undefined) return '';\n\t\treturn t;\n\t},\n\tclear: function(side) {\n\t\tif (side == 'lhs' && this.lhs_cmsettings.readOnly) return;\n\t\tif (side == 'rhs' && this.rhs_cmsettings.readOnly) return;\n\t\tvar ed = this.editor[this.id + '-' + side];\n\t\ted.setValue('');\n\t},\n\tcm: function(side) {\n\t\treturn this.editor[this.id + '-' + side];\n\t},\n\tsearch: function(side, query, direction) {\n\t\tvar le = this.editor[this.id + '-lhs'];\n\t\tvar re = this.editor[this.id + '-rhs'];\n\t\tvar editor;\n\t\tif (side == 'lhs') editor = le;\n\t\telse editor = re;\n\t\tdirection = (direction == 'prev') ? 'findPrevious' : 'findNext';\n\t\tif ((editor.getSelection().length == 0) || (this.prev_query[side] != query)) {\n\t\t\tthis.cursor[this.id] = editor.getSearchCursor(query, { line: 0, ch: 0 }, false);\n\t\t\tthis.prev_query[side] = query;\n\t\t}\n\t\tvar cursor = this.cursor[this.id];\n\n\t\tif (cursor[direction]()) {\n\t\t\teditor.setSelection(cursor.from(), cursor.to());\n\t\t}\n\t\telse {\n\t\t\tcursor = editor.getSearchCursor(query, { line: 0, ch: 0 }, false);\n\t\t}\n\t},\n\tresize: function() {\n\t\tthis.settings.resize();\n\t\tthis._changing(this.id + '-lhs', this.id + '-rhs');\n\t\tthis._set_top_offset(this.id + '-lhs');\n\t},\n\tdiff: function() {\n\t\tvar lhs = this.editor[this.id + '-lhs'].getValue();\n\t\tvar rhs = this.editor[this.id + '-rhs'].getValue();\n\t\tvar d = new Mgly.diff(lhs, rhs, this.settings);\n\t\treturn d.normal_form();\n\t},\n\tbind: function(el) {\n\t\tthis.element.hide();//hide\n\t\tthis.id = jQuery(el).attr('id');\n\t\tthis.changed_timeout = null;\n\t\tthis.chfns = {};\n\t\tthis.chfns[this.id + '-lhs'] = [];\n\t\tthis.chfns[this.id + '-rhs'] = [];\n\t\tthis.prev_query = [];\n\t\tthis.cursor = [];\n\t\tthis._skipscroll = {};\n\t\tthis.change_exp = new RegExp(/(\\d+(?:,\\d+)?)([acd])(\\d+(?:,\\d+)?)/);\n\t\tvar merge_lhs_button;\n\t\tvar merge_rhs_button;\n\t\tif (jQuery.button != undefined) {\n\t\t\t//jquery ui\n\t\t\tmerge_lhs_button = '<button title=\"Merge left\"></button>';\n\t\t\tmerge_rhs_button = '<button title=\"Merge right\"></button>';\n\t\t}\n\t\telse {\n\t\t\t// homebrew\n\t\t\tvar style = 'opacity:0.4;width:10px;height:15px;background-color:#888;cursor:pointer;text-align:center;color:#eee;border:1px solid: #222;margin-right:5px;margin-top: -2px;';\n\t\t\tmerge_lhs_button = '<div style=\"' + style + '\" title=\"Merge left\">&lt;</div>';\n\t\t\tmerge_rhs_button = '<div style=\"' + style + '\" title=\"Merge right\">&gt;</div>';\n\t\t}\n\t\tthis.merge_rhs_button = jQuery(merge_rhs_button);\n\t\tthis.merge_lhs_button = jQuery(merge_lhs_button);\n\n\t\t// create the textarea and canvas elements\n\t\tvar height = this.settings.editor_height;\n\t\tvar width = this.settings.editor_width;\n\t\tthis.element.append(jQuery('<div class=\"mergely-margin\" style=\"height: ' + height + '\"><canvas id=\"' + this.id + '-lhs-margin\" width=\"8px\" height=\"' + height + '\"></canvas></div>'));\n\t\tthis.element.append(jQuery('<div style=\"position:relative;width:' + width + '; height:' + height + '\" id=\"' + this.id + '-editor-lhs\" class=\"mergely-column\"><textarea style=\"\" id=\"' + this.id + '-lhs\"></textarea></div>'));\n\t\tthis.element.append(jQuery('<div class=\"mergely-canvas\" style=\"height: ' + height + '\"><canvas id=\"' + this.id + '-lhs-' + this.id + '-rhs-canvas\" style=\"width:28px\" width=\"28px\" height=\"' + height + '\"></canvas></div>'));\n\t\tvar rmargin = jQuery('<div class=\"mergely-margin\" style=\"height: ' + height + '\"><canvas id=\"' + this.id + '-rhs-margin\" width=\"8px\" height=\"' + height + '\"></canvas></div>');\n\t\tif (!this.settings.sidebar) {\n\t\t\tthis.element.find('.mergely-margin').css({display: 'none'});\n\t\t}\n\t\tif (this.settings.rhs_margin == 'left') {\n\t\t\tthis.element.append(rmargin);\n\t\t}\n\t\tthis.element.append(jQuery('<div style=\"width:' + width + '; height:' + height + '\" id=\"' + this.id + '-editor-rhs\" class=\"mergely-column\"><textarea style=\"\" id=\"' + this.id + '-rhs\"></textarea></div>'));\n\t\tif (this.settings.rhs_margin != 'left') {\n\t\t\tthis.element.append(rmargin);\n\t\t}\n\n\t\t// get current diff border color\n\t\tvar color = jQuery('<div style=\"display:none\" class=\"mergely current start\" />').appendTo('body').css('border-top-color');\n\t\tthis.current_diff_color = color;\n\n\t\t// codemirror\n\t\tvar cmstyle = '#' + this.id + ' .CodeMirror-gutter-text { padding: 5px 0 0 0; }' +\n\t\t\t'#' + this.id + ' .CodeMirror-lines pre, ' + '#' + this.id + ' .CodeMirror-gutter-text pre { line-height: 18px; }' +\n\t\t\t'.CodeMirror-linewidget { overflow: hidden; };';\n\t\tif (this.settings.autoresize) {\n\t\t\tcmstyle += this.id + ' .CodeMirror-scroll { height: 100%; overflow: auto; }';\n\t\t}\n\t\t// adjust the margin line height\n\t\tcmstyle += '\\n.CodeMirror { line-height: 18px; }';\n\t\tjQuery('<style type=\"text/css\">' + cmstyle + '</style>').appendTo('head');\n\n\t\t//bind\n\t\tvar rhstx = this.element.find('#' + this.id + '-rhs').get(0);\n\t\tif (!rhstx) {\n\t\t\tconsole.error('rhs textarea not defined - Mergely not initialized properly');\n\t\t\treturn;\n\t\t}\n\t\tvar lhstx = this.element.find('#' + this.id + '-lhs').get(0);\n\t\tif (!rhstx) {\n\t\t\tconsole.error('lhs textarea not defined - Mergely not initialized properly');\n\t\t\treturn;\n\t\t}\n\t\tvar self = this;\n\t\tthis.editor = [];\n\t\tthis.editor[this.id + '-lhs'] = CodeMirror.fromTextArea(lhstx, this.lhs_cmsettings);\n\t\tthis.editor[this.id + '-rhs'] = CodeMirror.fromTextArea(rhstx, this.rhs_cmsettings);\n\t\tthis.editor[this.id + '-lhs'].on('change', function(){ if (self.settings.autoupdate) self._changing(self.id + '-lhs', self.id + '-rhs'); });\n\t\tthis.editor[this.id + '-lhs'].on('scroll', function(){ self._scrolling(self.id + '-lhs'); });\n\t\tthis.editor[this.id + '-rhs'].on('change', function(){ if (self.settings.autoupdate) self._changing(self.id + '-lhs', self.id + '-rhs'); });\n\t\tthis.editor[this.id + '-rhs'].on('scroll', function(){ self._scrolling(self.id + '-rhs'); });\n\t\t// resize\n\t\tif (this.settings.autoresize) {\n\t\t\tvar sz_timeout1 = null;\n\t\t\tvar sz = function(init) {\n\t\t\t\t//self.em_height = null; //recalculate\n\t\t\t\tif (self.settings.resize) self.settings.resize(init);\n\t\t\t\tself.editor[self.id + '-lhs'].refresh();\n\t\t\t\tself.editor[self.id + '-rhs'].refresh();\n\t\t\t\tif (self.settings.autoupdate) {\n\t\t\t\t\tself._changing(self.id + '-lhs', self.id + '-rhs');\n\t\t\t\t}\n\t\t\t};\n\t\t\tjQuery(window).on('resize.mergely',\n\t\t\t\tfunction () {\n\t\t\t\t\tif (sz_timeout1) clearTimeout(sz_timeout1);\n\t\t\t\t\tsz_timeout1 = setTimeout(sz, self.settings.resize_timeout);\n\t\t\t\t}\n\t\t\t);\n\t\t\tsz(true);\n\t\t}\n\n\t\t// scrollToDiff() from gutter\n\t\tfunction gutterClicked(side, line, ev) {\n\t\t\t// The \"Merge left/right\" buttons are also located in the gutter.\n\t\t\t// Don't interfere with them:\n\t\t\tif (ev.target && (jQuery(ev.target).closest('.merge-button').length > 0)) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// See if the user clicked the line number of a difference:\n\t\t\tvar i, change;\n\t\t\tfor (i = 0; i < this.changes.length; i++) {\n\t\t\t\tchange = this.changes[i];\n\t\t\t\tif (line >= change[side+'-line-from'] && line <= change[side+'-line-to']) {\n\t\t\t\t\tthis._current_diff = i;\n\t\t\t\t\t// I really don't like this here - something about gutterClick does not\n\t\t\t\t\t// like mutating editor here.  Need to trigger the scroll to diff from\n\t\t\t\t\t// a timeout.\n\t\t\t\t\tsetTimeout(function() { this.scrollToDiff(); }.bind(this), 10);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tthis.editor[this.id + '-lhs'].on('gutterClick', function(cm, n, gutterClass, ev) {\n\t\t\tgutterClicked.call(this, 'lhs', n, ev);\n\t\t}.bind(this));\n\n\t\tthis.editor[this.id + '-rhs'].on('gutterClick', function(cm, n, gutterClass, ev) {\n\t\t\tgutterClicked.call(this, 'rhs', n, ev);\n\t\t}.bind(this));\n\n\t\t//bind\n\t\tvar setv;\n\t\tif (this.settings.lhs) {\n\t\t\tsetv = this.editor[this.id + '-lhs'].getDoc().setValue;\n\t\t\tthis.settings.lhs(setv.bind(this.editor[this.id + '-lhs'].getDoc()));\n\t\t}\n\t\tif (this.settings.rhs) {\n\t\t\tsetv = this.editor[this.id + '-rhs'].getDoc().setValue;\n\t\t\tthis.settings.rhs(setv.bind(this.editor[this.id + '-rhs'].getDoc()));\n\t\t}\n\t},\n\n\t_scroll_to_change : function(change) {\n\t\tif (!change) return;\n\t\tvar self = this;\n\t\tvar led = self.editor[self.id+'-lhs'];\n\t\tvar red = self.editor[self.id+'-rhs'];\n\t\t// set cursors\n\t\tled.setCursor(Math.max(change[\"lhs-line-from\"],0), 0); // use led.getCursor().ch ?\n\t\tred.setCursor(Math.max(change[\"rhs-line-from\"],0), 0);\n\t\tled.scrollIntoView({line: change[\"lhs-line-to\"]});\n\t},\n\n\t_scrolling: function(editor_name) {\n\t\tif (this._skipscroll[editor_name] === true) {\n\t\t\t// scrolling one side causes the other to event - ignore it\n\t\t\tthis._skipscroll[editor_name] = false;\n\t\t\treturn;\n\t\t}\n\t\tvar scroller = jQuery(this.editor[editor_name].getScrollerElement());\n\t\tif (this.midway == undefined) {\n\t\t\tthis.midway = (scroller.height() / 2.0 + scroller.offset().top).toFixed(2);\n\t\t}\n\t\t// balance-line\n\t\tvar midline = this.editor[editor_name].coordsChar({left:0, top:this.midway});\n\t\tvar top_to = scroller.scrollTop();\n\t\tvar left_to = scroller.scrollLeft();\n\n\t\tthis.trace('scroll', 'side', editor_name);\n\t\tthis.trace('scroll', 'midway', this.midway);\n\t\tthis.trace('scroll', 'midline', midline);\n\t\tthis.trace('scroll', 'top_to', top_to);\n\t\tthis.trace('scroll', 'left_to', left_to);\n\n\t\tvar editor_name1 = this.id + '-lhs';\n\t\tvar editor_name2 = this.id + '-rhs';\n\n\t\tfor (var name in this.editor) {\n\t\t\tif (!this.editor.hasOwnProperty(name)) continue;\n\t\t\tif (editor_name == name) continue; //same editor\n\t\t\tvar this_side = editor_name.replace(this.id + '-', '');\n\t\t\tvar other_side = name.replace(this.id + '-', '');\n\t\t\tvar top_adjust = 0;\n\n\t\t\t// find the last change that is less than or within the midway point\n\t\t\t// do not move the rhs until the lhs end point is >= the rhs end point.\n\t\t\tvar last_change = null;\n\t\t\tvar force_scroll = false;\n\t\t\tfor (var i = 0; i < this.changes.length; ++i) {\n\t\t\t\tvar change = this.changes[i];\n\t\t\t\tif ((midline.line >= change[this_side+'-line-from'])) {\n\t\t\t\t\tlast_change = change;\n\t\t\t\t\tif (midline.line >= last_change[this_side+'-line-to']) {\n\t\t\t\t\t\tif (!change.hasOwnProperty(this_side+'-y-start') ||\n\t\t\t\t\t\t\t!change.hasOwnProperty(this_side+'-y-end') ||\n\t\t\t\t\t\t\t!change.hasOwnProperty(other_side+'-y-start') ||\n\t\t\t\t\t\t\t!change.hasOwnProperty(other_side+'-y-end')){\n\t\t\t\t\t\t\t// change outside of viewport\n\t\t\t\t\t\t\tforce_scroll = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\ttop_adjust +=\n\t\t\t\t\t\t\t\t(change[this_side+'-y-end'] - change[this_side+'-y-start']) -\n\t\t\t\t\t\t\t\t(change[other_side+'-y-end'] - change[other_side+'-y-start']);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tvar vp = this.editor[name].getViewport();\n\t\t\tvar scroll = true;\n\t\t\tif (last_change) {\n\t\t\t\tthis.trace('scroll', 'last change before midline', last_change);\n\t\t\t\tif (midline.line >= vp.from && midline <= vp.to) {\n\t\t\t\t\tscroll = false;\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis.trace('scroll', 'scroll', scroll);\n\t\t\tif (scroll || force_scroll) {\n\t\t\t\t// scroll the other side\n\t\t\t\tthis.trace('scroll', 'scrolling other side', top_to - top_adjust);\n\t\t\t\tthis._skipscroll[name] = true;//disable next event\n\t\t\t\tthis.editor[name].scrollTo(left_to, top_to - top_adjust);\n\t\t\t}\n\t\t\telse this.trace('scroll', 'not scrolling other side');\n\n\t\t\tif (this.settings.autoupdate) {\n\t\t\t\tvar timer = new Mgly.Timer();\n\t\t\t\tthis._calculate_offsets(editor_name1, editor_name2, this.changes);\n\t\t\t\tthis.trace('change', 'offsets time', timer.stop());\n\t\t\t\tthis._markup_changes(editor_name1, editor_name2, this.changes);\n\t\t\t\tthis.trace('change', 'markup time', timer.stop());\n\t\t\t\tthis._draw_diff(editor_name1, editor_name2, this.changes);\n\t\t\t\tthis.trace('change', 'draw time', timer.stop());\n\t\t\t}\n\t\t\tthis.trace('scroll', 'scrolled');\n\t\t}\n\t},\n\t_changing: function(editor_name1, editor_name2) {\n\t\tthis.trace('change', 'changing-timeout', this.changed_timeout);\n\t\tvar self = this;\n\t\tif (this.changed_timeout != null) clearTimeout(this.changed_timeout);\n\t\tthis.changed_timeout = setTimeout(function(){\n\t\t\tvar timer = new Mgly.Timer();\n\t\t\tself._changed(editor_name1, editor_name2);\n\t\t\tself.trace('change', 'total time', timer.stop());\n\t\t}, this.settings.change_timeout);\n\t},\n\t_changed: function(editor_name1, editor_name2) {\n\t\tthis._clear();\n\t\tthis._diff(editor_name1, editor_name2);\n\t},\n\t_clear: function() {\n\t\tvar self = this, name, editor, fns, timer, i, change, l;\n\n\t\tvar clear_changes = function() {\n\t\t\ttimer = new Mgly.Timer();\n\t\t\tfor (i = 0, l = editor.lineCount(); i < l; ++i) {\n\t\t\t\teditor.removeLineClass(i, 'background');\n\t\t\t}\n\t\t\tfor (i = 0; i < fns.length; ++i) {\n\t\t\t\t//var edid = editor.getDoc().id;\n\t\t\t\tchange = fns[i];\n\t\t\t\t//if (change.doc.id != edid) continue;\n\t\t\t\tif (change.lines.length) {\n\t\t\t\t\tself.trace('change', 'clear text', change.lines[0].text);\n\t\t\t\t}\n\t\t\t\tchange.clear();\n\t\t\t}\n\t\t\teditor.clearGutter('merge');\n\t\t\tself.trace('change', 'clear time', timer.stop());\n\t\t};\n\n\t\tfor (name in this.editor) {\n\t\t\tif (!this.editor.hasOwnProperty(name)) continue;\n\t\t\teditor = this.editor[name];\n\t\t\tfns = self.chfns[name];\n\t\t\t// clear editor changes\n\t\t\teditor.operation(clear_changes);\n\t\t}\n\t\tself.chfns[name] = [];\n\n\t\tvar ex = this._draw_info(this.id + '-lhs', this.id + '-rhs');\n\t\tvar ctx_lhs = ex.clhs.get(0).getContext('2d');\n\t\tvar ctx_rhs = ex.crhs.get(0).getContext('2d');\n\t\tvar ctx = ex.dcanvas.getContext('2d');\n\n\t\tctx_lhs.beginPath();\n\t\tctx_lhs.fillStyle = this.settings.bgcolor;\n\t\tctx_lhs.strokeStyle = '#888';\n\t\tctx_lhs.fillRect(0, 0, 6.5, ex.visible_page_height);\n\t\tctx_lhs.strokeRect(0, 0, 6.5, ex.visible_page_height);\n\n\t\tctx_rhs.beginPath();\n\t\tctx_rhs.fillStyle = this.settings.bgcolor;\n\t\tctx_rhs.strokeStyle = '#888';\n\t\tctx_rhs.fillRect(0, 0, 6.5, ex.visible_page_height);\n\t\tctx_rhs.strokeRect(0, 0, 6.5, ex.visible_page_height);\n\n\t\tctx.beginPath();\n\t\tctx.fillStyle = '#fff';\n\t\tctx.fillRect(0, 0, this.draw_mid_width, ex.visible_page_height);\n\t},\n\t_diff: function(editor_name1, editor_name2) {\n\t\tvar lhs = this.editor[editor_name1].getValue();\n\t\tvar rhs = this.editor[editor_name2].getValue();\n\t\tvar timer = new Mgly.Timer();\n\t\tvar d = new Mgly.diff(lhs, rhs, this.settings);\n\t\tthis.trace('change', 'diff time', timer.stop());\n\t\tthis.changes = Mgly.DiffParser(d.normal_form());\n\t\tthis.trace('change', 'parse time', timer.stop());\n\t\tif (this._current_diff === undefined && this.changes.length) {\n\t\t\t// go to first difference on start-up\n\t\t\tthis._current_diff = 0;\n\t\t\tthis._scroll_to_change(this.changes[0]);\n\t\t}\n\t\tthis.trace('change', 'scroll_to_change time', timer.stop());\n\t\tthis._calculate_offsets(editor_name1, editor_name2, this.changes);\n\t\tthis.trace('change', 'offsets time', timer.stop());\n\t\tthis._markup_changes(editor_name1, editor_name2, this.changes);\n\t\tthis.trace('change', 'markup time', timer.stop());\n\t\tthis._draw_diff(editor_name1, editor_name2, this.changes);\n\t\tthis.trace('change', 'draw time', timer.stop());\n\t},\n\t_parse_diff: function (editor_name1, editor_name2, diff) {\n\t\tthis.trace('diff', 'diff results:\\n', diff);\n\t\tvar changes = [];\n\t\tvar change_id = 0;\n\t\t// parse diff\n\t\tvar diff_lines = diff.split(/\\n/);\n\t\tfor (var i = 0; i < diff_lines.length; ++i) {\n\t\t\tif (diff_lines[i].length == 0) continue;\n\t\t\tvar change = {};\n\t\t\tvar test = this.change_exp.exec(diff_lines[i]);\n\t\t\tif (test == null) continue;\n\t\t\t// lines are zero-based\n\t\t\tvar fr = test[1].split(',');\n\t\t\tchange['lhs-line-from'] = fr[0] - 1;\n\t\t\tif (fr.length == 1) change['lhs-line-to'] = fr[0] - 1;\n\t\t\telse change['lhs-line-to'] = fr[1] - 1;\n\t\t\tvar to = test[3].split(',');\n\t\t\tchange['rhs-line-from'] = to[0] - 1;\n\t\t\tif (to.length == 1) change['rhs-line-to'] = to[0] - 1;\n\t\t\telse change['rhs-line-to'] = to[1] - 1;\n\t\t\t// TODO: optimize for changes that are adds/removes\n\t\t\tif (change['lhs-line-from'] < 0) change['lhs-line-from'] = 0;\n\t\t\tif (change['lhs-line-to'] < 0) change['lhs-line-to'] = 0;\n\t\t\tif (change['rhs-line-from'] < 0) change['rhs-line-from'] = 0;\n\t\t\tif (change['rhs-line-to'] < 0) change['rhs-line-to'] = 0;\n\t\t\tchange['op'] = test[2];\n\t\t\tchanges[change_id++] = change;\n\t\t\tthis.trace('diff', 'change', change);\n\t\t}\n\t\treturn changes;\n\t},\n\t_get_viewport: function(editor_name1, editor_name2) {\n\t\tvar lhsvp = this.editor[editor_name1].getViewport();\n\t\tvar rhsvp = this.editor[editor_name2].getViewport();\n\t\treturn {from: Math.min(lhsvp.from, rhsvp.from), to: Math.max(lhsvp.to, rhsvp.to)};\n\t},\n\t_is_change_in_view: function(vp, change) {\n\t\tif (!this.settings.viewport) return true;\n\t\tif ((change['lhs-line-from'] < vp.from && change['lhs-line-to'] < vp.to) ||\n\t\t\t(change['lhs-line-from'] > vp.from && change['lhs-line-to'] > vp.to) ||\n\t\t\t(change['rhs-line-from'] < vp.from && change['rhs-line-to'] < vp.to) ||\n\t\t\t(change['rhs-line-from'] > vp.from && change['rhs-line-to'] > vp.to)) {\n\t\t\t// if the change is outside the viewport, skip\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t},\n\t_set_top_offset: function (editor_name1) {\n\t\t// save the current scroll position of the editor\n\t\tvar saveY = this.editor[editor_name1].getScrollInfo().top;\n\t\t// temporarily scroll to top\n\t\tthis.editor[editor_name1].scrollTo(null, 0);\n\n\t\t// this is the distance from the top of the screen to the top of the\n\t\t// content of the first codemirror editor\n\t\tvar topnode = this.element.find('.CodeMirror-measure').first();\n\t\tvar top_offset = topnode.offset().top - 4;\n\t\tif(!top_offset) return false;\n\n\t\t// restore editor's scroll position\n\t\tthis.editor[editor_name1].scrollTo(null, saveY);\n\n\t\tthis.draw_top_offset = 0.5 - top_offset;\n\t\treturn true;\n\t},\n\t_calculate_offsets: function (editor_name1, editor_name2, changes) {\n\t\tif (this.em_height == null) {\n\t\t\tif(!this._set_top_offset(editor_name1)) return; //try again\n\t\t\tthis.em_height = this.editor[editor_name1].defaultTextHeight();\n\t\t\tif (!this.em_height) {\n\t\t\t\tconsole.warn('Failed to calculate offsets, using 18 by default');\n\t\t\t\tthis.em_height = 18;\n\t\t\t}\n\t\t\tthis.draw_lhs_min = 0.5;\n\t\t\tvar c = jQuery('#' + editor_name1 + '-' + editor_name2 + '-canvas');\n\t\t\tif (!c.length) {\n\t\t\t\tconsole.error('failed to find canvas', '#' + editor_name1 + '-' + editor_name2 + '-canvas');\n\t\t\t}\n\t\t\tif (!c.width()) {\n\t\t\t\tconsole.error('canvas width is 0');\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tthis.draw_mid_width = jQuery('#' + editor_name1 + '-' + editor_name2 + '-canvas').width();\n\t\t\tthis.draw_rhs_max = this.draw_mid_width - 0.5; //24.5;\n\t\t\tthis.draw_lhs_width = 5;\n\t\t\tthis.draw_rhs_width = 5;\n\t\t\tthis.trace('calc', 'change offsets calculated', {top_offset: this.draw_top_offset, lhs_min: this.draw_lhs_min, rhs_max: this.draw_rhs_max, lhs_width: this.draw_lhs_width, rhs_width: this.draw_rhs_width});\n\t\t}\n\t\tvar lhschc = this.editor[editor_name1].charCoords({line: 0});\n\t\tvar rhschc = this.editor[editor_name2].charCoords({line: 0});\n\t\tvar vp = this._get_viewport(editor_name1, editor_name2);\n\n\t\tfor (var i = 0; i < changes.length; ++i) {\n\t\t\tvar change = changes[i];\n\n\t\t\tif (!this.settings.sidebar && !this._is_change_in_view(vp, change)) {\n\t\t\t\t// if the change is outside the viewport, skip\n\t\t\t\tdelete change['lhs-y-start'];\n\t\t\t\tdelete change['lhs-y-end'];\n\t\t\t\tdelete change['rhs-y-start'];\n\t\t\t\tdelete change['rhs-y-end'];\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tvar llf = change['lhs-line-from'] >= 0 ? change['lhs-line-from'] : 0;\n\t\t\tvar llt = change['lhs-line-to'] >= 0 ? change['lhs-line-to'] : 0;\n\t\t\tvar rlf = change['rhs-line-from'] >= 0 ? change['rhs-line-from'] : 0;\n\t\t\tvar rlt = change['rhs-line-to'] >= 0 ? change['rhs-line-to'] : 0;\n\n\t\t\tvar ls, le, rs, re, tls, tle, lhseh, lhssh, rhssh, rhseh;\n\t\t\tif (this.editor[editor_name1].getOption('lineWrapping') || this.editor[editor_name2].getOption('lineWrapping')) {\n\t\t\t\t// If using line-wrapping, we must get the height of the line\n\t\t\t\ttls = this.editor[editor_name1].cursorCoords({line: llf, ch: 0}, 'page');\n\t\t\t\tlhssh = this.editor[editor_name1].getLineHandle(llf);\n\t\t\t\tls = { top: tls.top, bottom: tls.top + lhssh.height };\n\n\t\t\t\ttle = this.editor[editor_name1].cursorCoords({line: llt, ch: 0}, 'page');\n\t\t\t\tlhseh = this.editor[editor_name1].getLineHandle(llt);\n\t\t\t\tle = { top: tle.top, bottom: tle.top + lhseh.height };\n\n\t\t\t\ttls = this.editor[editor_name2].cursorCoords({line: rlf, ch: 0}, 'page');\n\t\t\t\trhssh = this.editor[editor_name2].getLineHandle(rlf);\n\t\t\t\trs = { top: tls.top, bottom: tls.top + rhssh.height };\n\n\t\t\t\ttle = this.editor[editor_name2].cursorCoords({line: rlt, ch: 0}, 'page');\n\t\t\t\trhseh = this.editor[editor_name2].getLineHandle(rlt);\n\t\t\t\tre = { top: tle.top, bottom: tle.top + rhseh.height };\n\t\t\t}\n\t\t\telse {\n\t\t\t\t// If not using line-wrapping, we can calculate the line position\n\t\t\t\tls = {\n\t\t\t\t\ttop: lhschc.top + llf * this.em_height,\n\t\t\t\t\tbottom: lhschc.bottom + llf * this.em_height + 2\n\t\t\t\t};\n\t\t\t\tle = {\n\t\t\t\t\ttop: lhschc.top + llt * this.em_height,\n\t\t\t\t\tbottom: lhschc.bottom + llt * this.em_height + 2\n\t\t\t\t};\n\t\t\t\trs = {\n\t\t\t\t\ttop: rhschc.top + rlf * this.em_height,\n\t\t\t\t\tbottom: rhschc.bottom + rlf * this.em_height + 2\n\t\t\t\t};\n\t\t\t\tre = {\n\t\t\t\t\ttop: rhschc.top + rlt * this.em_height,\n\t\t\t\t\tbottom: rhschc.bottom + rlt * this.em_height + 2\n\t\t\t\t};\n\t\t\t}\n\n\t\t\tif (change['op'] == 'a') {\n\t\t\t\t// adds (right), normally start from the end of the lhs,\n\t\t\t\t// except for the case when the start of the rhs is 0\n\t\t\t\tif (rlf > 0) {\n\t\t\t\t\tls.top = ls.bottom;\n\t\t\t\t\tls.bottom += this.em_height;\n\t\t\t\t\tle = ls;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if (change['op'] == 'd') {\n\t\t\t\t// deletes (left) normally finish from the end of the rhs,\n\t\t\t\t// except for the case when the start of the lhs is 0\n\t\t\t\tif (llf > 0) {\n\t\t\t\t\trs.top = rs.bottom;\n\t\t\t\t\trs.bottom += this.em_height;\n\t\t\t\t\tre = rs;\n\t\t\t\t}\n\t\t\t}\n\t\t\tchange['lhs-y-start'] = this.draw_top_offset + ls.top;\n\t\t\tif (change['op'] == 'c' || change['op'] == 'd') {\n\t\t\t\tchange['lhs-y-end'] = this.draw_top_offset + le.bottom;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tchange['lhs-y-end'] = this.draw_top_offset + le.top;\n\t\t\t}\n\t\t\tchange['rhs-y-start'] = this.draw_top_offset + rs.top;\n\t\t\tif (change['op'] == 'c' || change['op'] == 'a') {\n\t\t\t\tchange['rhs-y-end'] = this.draw_top_offset + re.bottom;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tchange['rhs-y-end'] = this.draw_top_offset + re.top;\n\t\t\t}\n\t\t\tthis.trace('calc', 'change calculated', i, change);\n\t\t}\n\t\treturn changes;\n\t},\n\t_markup_changes: function (editor_name1, editor_name2, changes) {\n\t\tthis.element.find('.merge-button').remove(); //clear\n\n\t\tvar self = this;\n\t\tvar led = this.editor[editor_name1];\n\t\tvar red = this.editor[editor_name2];\n\t\tvar current_diff = this._current_diff;\n\n\t\tvar timer = new Mgly.Timer();\n\t\tled.operation(function() {\n\t\t\tfor (var i = 0; i < changes.length; ++i) {\n\t\t\t\tvar change = changes[i];\n\t\t\t\tvar llf = change['lhs-line-from'] >= 0 ? change['lhs-line-from'] : 0;\n\t\t\t\tvar llt = change['lhs-line-to'] >= 0 ? change['lhs-line-to'] : 0;\n\t\t\t\tvar rlf = change['rhs-line-from'] >= 0 ? change['rhs-line-from'] : 0;\n\t\t\t\tvar rlt = change['rhs-line-to'] >= 0 ? change['rhs-line-to'] : 0;\n\n\t\t\t\tvar clazz = ['mergely', 'lhs', change['op'], 'cid-' + i];\n\t\t\t\tled.addLineClass(llf, 'background', 'start');\n\t\t\t\tled.addLineClass(llt, 'background', 'end');\n\n\t\t\t\tif (current_diff == i) {\n\t\t\t\t\tif (llf != llt) {\n\t\t\t\t\t\tled.addLineClass(llf, 'background', 'current');\n\t\t\t\t\t}\n\t\t\t\t\tled.addLineClass(llt, 'background', 'current');\n\t\t\t\t}\n\t\t\t\tif (llf == 0 && llt == 0 && rlf == 0) {\n\t\t\t\t\tled.addLineClass(llf, 'background', clazz.join(' '));\n\t\t\t\t\tled.addLineClass(llf, 'background', 'first');\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t// apply change for each line in-between the changed lines\n\t\t\t\t\tfor (var j = llf; j <= llt; ++j) {\n\t\t\t\t\t\tled.addLineClass(j, 'background', clazz.join(' '));\n\t\t\t\t\t\tled.addLineClass(j, 'background', clazz.join(' '));\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (!red.getOption('readOnly')) {\n\t\t\t\t\t// add widgets to lhs, if rhs is not read only\n\t\t\t\t\tvar rhs_button = self.merge_rhs_button.clone();\n\t\t\t\t\tif (rhs_button.button) {\n\t\t\t\t\t\t//jquery-ui support\n\t\t\t\t\t\trhs_button.button({icons: {primary: 'ui-icon-triangle-1-e'}, text: false});\n\t\t\t\t\t}\n\t\t\t\t\trhs_button.addClass('merge-button');\n\t\t\t\t\trhs_button.attr('id', 'merge-rhs-' + i);\n\t\t\t\t\tled.setGutterMarker(llf, 'merge', rhs_button.get(0));\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\tvar vp = this._get_viewport(editor_name1, editor_name2);\n\n\t\tthis.trace('change', 'markup lhs-editor time', timer.stop());\n\t\tred.operation(function() {\n\t\t\tfor (var i = 0; i < changes.length; ++i) {\n\t\t\t\tvar change = changes[i];\n\t\t\t\tvar llf = change['lhs-line-from'] >= 0 ? change['lhs-line-from'] : 0;\n\t\t\t\tvar llt = change['lhs-line-to'] >= 0 ? change['lhs-line-to'] : 0;\n\t\t\t\tvar rlf = change['rhs-line-from'] >= 0 ? change['rhs-line-from'] : 0;\n\t\t\t\tvar rlt = change['rhs-line-to'] >= 0 ? change['rhs-line-to'] : 0;\n\n\t\t\t\tif (!self._is_change_in_view(vp, change)) {\n\t\t\t\t\t// if the change is outside the viewport, skip\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tvar clazz = ['mergely', 'rhs', change['op'], 'cid-' + i];\n\t\t\t\tred.addLineClass(rlf, 'background', 'start');\n\t\t\t\tred.addLineClass(rlt, 'background', 'end');\n\n\t\t\t\tif (current_diff == i) {\n\t\t\t\t\tif (rlf != rlt) {\n\t\t\t\t\t\tred.addLineClass(rlf, 'background', 'current');\n\t\t\t\t\t}\n\t\t\t\t\tred.addLineClass(rlt, 'background', 'current');\n\t\t\t\t}\n\t\t\t\tif (rlf == 0 && rlt == 0 && llf == 0) {\n\t\t\t\t\tred.addLineClass(rlf, 'background', clazz.join(' '));\n\t\t\t\t\tred.addLineClass(rlf, 'background', 'first');\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t// apply change for each line in-between the changed lines\n\t\t\t\t\tfor (var j = rlf; j <= rlt; ++j) {\n\t\t\t\t\t\tred.addLineClass(j, 'background', clazz.join(' '));\n\t\t\t\t\t\tred.addLineClass(j, 'background', clazz.join(' '));\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (!led.getOption('readOnly')) {\n\t\t\t\t\t// add widgets to rhs, if lhs is not read only\n\t\t\t\t\tvar lhs_button = self.merge_lhs_button.clone();\n\t\t\t\t\tif (lhs_button.button) {\n\t\t\t\t\t\t//jquery-ui support\n\t\t\t\t\t\tlhs_button.button({icons: {primary: 'ui-icon-triangle-1-w'}, text: false});\n\t\t\t\t\t}\n\t\t\t\t\tlhs_button.addClass('merge-button');\n\t\t\t\t\tlhs_button.attr('id', 'merge-lhs-' + i);\n\t\t\t\t\tred.setGutterMarker(rlf, 'merge', lhs_button.get(0));\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tthis.trace('change', 'markup rhs-editor time', timer.stop());\n\n\t\t// mark text deleted, LCS changes\n\t\tvar marktext = [], i, j, k, p;\n\t\tfor (i = 0; this.settings.lcs && i < changes.length; ++i) {\n\t\t\tvar change = changes[i];\n\t\t\tvar llf = change['lhs-line-from'] >= 0 ? change['lhs-line-from'] : 0;\n\t\t\tvar llt = change['lhs-line-to'] >= 0 ? change['lhs-line-to'] : 0;\n\t\t\tvar rlf = change['rhs-line-from'] >= 0 ? change['rhs-line-from'] : 0;\n\t\t\tvar rlt = change['rhs-line-to'] >= 0 ? change['rhs-line-to'] : 0;\n\n\t\t\tif (!this._is_change_in_view(vp, change)) {\n\t\t\t\t// if the change is outside the viewport, skip\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (change['op'] == 'd') {\n\t\t\t\t// apply delete to cross-out (left-hand side only)\n\t\t\t\tvar from = llf;\n\t\t\t\tvar to = llt;\n\t\t\t\tvar to_ln = led.lineInfo(to);\n\t\t\t\tif (to_ln) {\n\t\t\t\t\tmarktext.push([led, {line:from, ch:0}, {line:to, ch:to_ln.text.length}, {className: 'mergely ch d lhs'}]);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if (change['op'] == 'c') {\n\t\t\t\t// apply LCS changes to each line\n\t\t\t\tfor (j = llf, k = rlf, p = 0;\n\t\t\t\t\t ((j >= 0) && (j <= llt)) || ((k >= 0) && (k <= rlt));\n\t\t\t\t\t ++j, ++k) {\n\t\t\t\t\tvar lhs_line, rhs_line;\n\t\t\t\t\tif (k + p > rlt) {\n\t\t\t\t\t\t// lhs continues past rhs, mark lhs as deleted\n\t\t\t\t\t\tlhs_line = led.getLine( j );\n\t\t\t\t\t\tmarktext.push([led, {line:j, ch:0}, {line:j, ch:lhs_line.length}, {className: 'mergely ch d lhs'}]);\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tif (j + p > llt) {\n\t\t\t\t\t\t// rhs continues past lhs, mark rhs as added\n\t\t\t\t\t\trhs_line = red.getLine( k );\n\t\t\t\t\t\tmarktext.push([red, {line:k, ch:0}, {line:k, ch:rhs_line.length}, {className: 'mergely ch a rhs'}]);\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tlhs_line = led.getLine( j );\n\t\t\t\t\trhs_line = red.getLine( k );\n\t\t\t\t\tvar lcs = new Mgly.LCS(lhs_line, rhs_line);\n\t\t\t\t\tlcs.diff(\n\t\t\t\t\t\tfunction added (from, to) {\n\t\t\t\t\t\t\tmarktext.push([red, {line:k, ch:from}, {line:k, ch:to}, {className: 'mergely ch a rhs'}]);\n\t\t\t\t\t\t},\n\t\t\t\t\t\tfunction removed (from, to) {\n\t\t\t\t\t\t\tmarktext.push([led, {line:j, ch:from}, {line:j, ch:to}, {className: 'mergely ch d lhs'}]);\n\t\t\t\t\t\t}\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tthis.trace('change', 'LCS marktext time', timer.stop());\n\n\t\t// mark changes outside closure\n\t\tled.operation(function() {\n\t\t\t// apply lhs markup\n\t\t\tfor (var i = 0; i < marktext.length; ++i) {\n\t\t\t\tvar m = marktext[i];\n\t\t\t\tif (m[0].doc.id != led.getDoc().id) continue;\n\t\t\t\tself.chfns[self.id + '-lhs'].push(m[0].markText(m[1], m[2], m[3]));\n\t\t\t}\n\t\t});\n\t\tred.operation(function() {\n\t\t\t// apply lhs markup\n\t\t\tfor (var i = 0; i < marktext.length; ++i) {\n\t\t\t\tvar m = marktext[i];\n\t\t\t\tif (m[0].doc.id != red.getDoc().id) continue;\n\t\t\t\tself.chfns[self.id + '-rhs'].push(m[0].markText(m[1], m[2], m[3]));\n\t\t\t}\n\t\t});\n\n\t\tthis.trace('change', 'LCS markup time', timer.stop());\n\n\t\t// merge buttons\n\t\tvar ed = {lhs:led, rhs:red};\n\t\tthis.element.find('.merge-button').on('click', function(ev){\n\t\t\t// side of mouseenter\n\t\t\tvar side = 'rhs';\n\t\t\tvar oside = 'lhs';\n\t\t\tvar parent = jQuery(this).parents('#' + self.id + '-editor-lhs');\n\t\t\tif (parent.length) {\n\t\t\t\tside = 'lhs';\n\t\t\t\toside = 'rhs';\n\t\t\t}\n\t\t\tvar pos = ed[side].coordsChar({left:ev.pageX, top:ev.pageY});\n\n\t\t\t// get the change id\n\t\t\tvar cid = null;\n\t\t\tvar info = ed[side].lineInfo(pos.line);\n\t\t\tjQuery.each(info.bgClass.split(' '), function(i, clazz) {\n\t\t\t\tif (clazz.indexOf('cid-') == 0) {\n\t\t\t\t\tcid = parseInt(clazz.split('-')[1], 10);\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t});\n\t\t\tvar change = self.changes[cid];\n\t\t\tself._merge_change(change, side, oside);\n\t\t\treturn false;\n\t\t});\n\n\t\t// gutter markup\n\t\tvar lhsLineNumbers = jQuery('#mergely-lhs ~ .CodeMirror').find('.CodeMirror-linenumber');\n\t\tvar rhsLineNumbers = jQuery('#mergely-rhs ~ .CodeMirror').find('.CodeMirror-linenumber');\n\t\trhsLineNumbers.removeClass('mergely current');\n\t\tlhsLineNumbers.removeClass('mergely current');\n\t\tfor (var i = 0; i < changes.length; ++i) {\n\t\t\tif (current_diff == i && change.op !== 'd') {\n\t\t\t\tvar change = changes[i];\n\t\t\t\tvar j, jf = change['rhs-line-from'], jt = change['rhs-line-to'] + 1;\n\t\t\t\tfor (j = jf; j < jt; j++) {\n\t\t\t\t\tvar n = (j + 1).toString();\n\t\t\t\t\trhsLineNumbers\n\t\t\t\t\t\t.filter(function(i, node) { return jQuery(node).text() === n; })\n\t\t\t\t\t.addClass('mergely current');\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (current_diff == i && change.op !== 'a') {\n\t\t\t\tvar change = changes[i];\n\t\t\t\tjf = change['lhs-line-from'], jt = change['lhs-line-to'] + 1;\n\t\t\t\tfor (j = jf; j < jt; j++) {\n\t\t\t\t\tvar n = (j + 1).toString();\n\t\t\t\t\tlhsLineNumbers.filter(function(i, node) { return jQuery(node).text() === n; })\n\t\t\t\t\t.addClass('mergely current');\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tthis.trace('change', 'markup buttons time', timer.stop());\n\t},\n\t_merge_change :\tfunction(change, side, oside) {\n\t\tif (!change) return;\n\t\tvar led = this.editor[this.id+'-lhs'];\n\t\tvar red = this.editor[this.id+'-rhs'];\n\t\tvar ed = {lhs:led, rhs:red};\n\t\tvar i, from, to;\n\n\t\tvar text = ed[side].getRange(\n\t\t\tCodeMirror.Pos(change[side + '-line-from'], 0),\n\t\t\tCodeMirror.Pos(change[side + '-line-to'] + 1, 0));\n\n\t\tif (change['op'] == 'c') {\n\t\t\ted[oside].replaceRange(text,\n\t\t\t\tCodeMirror.Pos(change[oside + '-line-from'], 0),\n\t\t\t\tCodeMirror.Pos(change[oside + '-line-to'] + 1, 0));\n\t\t}\n\t\telse if (side == 'rhs') {\n\t\t\tif (change['op'] == 'a') {\n\t\t\t\ted[oside].replaceRange(text,\n\t\t\t\t\tCodeMirror.Pos(change[oside + '-line-from'] + 1, 0),\n\t\t\t\t\tCodeMirror.Pos(change[oside + '-line-to'] + 1, 0));\n\t\t\t}\n\t\t\telse {// 'd'\n\t\t\t\tfrom = parseInt(change[oside + '-line-from'], 10);\n\t\t\t\tto = parseInt(change[oside + '-line-to'], 10);\n\t\t\t\tfor (i = to; i >= from; --i) {\n\t\t\t\t\ted[oside].setCursor({line: i, ch: -1});\n\t\t\t\t\ted[oside].execCommand('deleteLine');\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse if (side == 'lhs') {\n\t\t\tif (change['op'] == 'a') {\n\t\t\t\tfrom = parseInt(change[oside + '-line-from'], 10);\n\t\t\t\tto = parseInt(change[oside + '-line-to'], 10);\n\t\t\t\tfor (i = to; i >= from; --i) {\n\t\t\t\t\t//ed[oside].removeLine(i);\n\t\t\t\t\ted[oside].setCursor({line: i, ch: -1});\n\t\t\t\t\ted[oside].execCommand('deleteLine');\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {// 'd'\n\t\t\t\ted[oside].replaceRange( text,\n\t\t\t\t\tCodeMirror.Pos(change[oside + '-line-from'] + 1, 0));\n\t\t\t}\n\t\t}\n\t\t//reset\n\t\ted['lhs'].setValue(ed['lhs'].getValue());\n\t\ted['rhs'].setValue(ed['rhs'].getValue());\n\n\t\tthis._scroll_to_change(change);\n\t},\n\t_draw_info: function(editor_name1, editor_name2) {\n\t\tvar visible_page_height = jQuery(this.editor[editor_name1].getScrollerElement()).height();\n\t\tvar gutter_height = jQuery(this.editor[editor_name1].getScrollerElement()).children(':first-child').height();\n\t\tvar dcanvas = document.getElementById(editor_name1 + '-' + editor_name2 + '-canvas');\n\t\tif (dcanvas == undefined) throw 'Failed to find: ' + editor_name1 + '-' + editor_name2 + '-canvas';\n\t\tvar clhs = this.element.find('#' + this.id + '-lhs-margin');\n\t\tvar crhs = this.element.find('#' + this.id + '-rhs-margin');\n\t\treturn {\n\t\t\tvisible_page_height: visible_page_height,\n\t\t\tgutter_height: gutter_height,\n\t\t\tvisible_page_ratio: (visible_page_height / gutter_height),\n\t\t\tmargin_ratio: (visible_page_height / gutter_height),\n\t\t\tlhs_scroller: jQuery(this.editor[editor_name1].getScrollerElement()),\n\t\t\trhs_scroller: jQuery(this.editor[editor_name2].getScrollerElement()),\n\t\t\tlhs_lines: this.editor[editor_name1].lineCount(),\n\t\t\trhs_lines: this.editor[editor_name2].lineCount(),\n\t\t\tdcanvas: dcanvas,\n\t\t\tclhs: clhs,\n\t\t\tcrhs: crhs,\n\t\t\tlhs_xyoffset: jQuery(clhs).offset(),\n\t\t\trhs_xyoffset: jQuery(crhs).offset()\n\t\t};\n\t},\n\t_draw_diff: function(editor_name1, editor_name2, changes) {\n\t\tvar ex = this._draw_info(editor_name1, editor_name2);\n\t\tvar mcanvas_lhs = ex.clhs.get(0);\n\t\tvar mcanvas_rhs = ex.crhs.get(0);\n\t\tvar ctx = ex.dcanvas.getContext('2d');\n\t\tvar ctx_lhs = mcanvas_lhs.getContext('2d');\n\t\tvar ctx_rhs = mcanvas_rhs.getContext('2d');\n\n\t\tthis.trace('draw', 'visible_page_height', ex.visible_page_height);\n\t\tthis.trace('draw', 'gutter_height', ex.gutter_height);\n\t\tthis.trace('draw', 'visible_page_ratio', ex.visible_page_ratio);\n\t\tthis.trace('draw', 'lhs-scroller-top', ex.lhs_scroller.scrollTop());\n\t\tthis.trace('draw', 'rhs-scroller-top', ex.rhs_scroller.scrollTop());\n\n\t\tjQuery.each(this.element.find('canvas'), function () {\n\t\t\tjQuery(this).get(0).height = ex.visible_page_height;\n\t\t});\n\n\t\tex.clhs.unbind('click');\n\t\tex.crhs.unbind('click');\n\n\t\tctx_lhs.beginPath();\n\t\tctx_lhs.fillStyle = this.settings.bgcolor;\n\t\tctx_lhs.strokeStyle = '#888';\n\t\tctx_lhs.fillRect(0, 0, 6.5, ex.visible_page_height);\n\t\tctx_lhs.strokeRect(0, 0, 6.5, ex.visible_page_height);\n\n\t\tctx_rhs.beginPath();\n\t\tctx_rhs.fillStyle = this.settings.bgcolor;\n\t\tctx_rhs.strokeStyle = '#888';\n\t\tctx_rhs.fillRect(0, 0, 6.5, ex.visible_page_height);\n\t\tctx_rhs.strokeRect(0, 0, 6.5, ex.visible_page_height);\n\n\t\tvar vp = this._get_viewport(editor_name1, editor_name2);\n\t\tfor (var i = 0; i < changes.length; ++i) {\n\t\t\tvar change = changes[i];\n\t\t\tvar fill = this.settings.fgcolor[change['op']];\n\t\t\tif (this._current_diff === i) {\n\t\t\t\tfill = this.current_diff_color;\n\t\t\t}\n\n\t\t\tthis.trace('draw', change);\n\t\t\t// margin indicators\n\t\t\tvar lhs_y_start = ((change['lhs-y-start'] + ex.lhs_scroller.scrollTop()) * ex.visible_page_ratio);\n\t\t\tvar lhs_y_end = ((change['lhs-y-end'] + ex.lhs_scroller.scrollTop()) * ex.visible_page_ratio) + 1;\n\t\t\tvar rhs_y_start = ((change['rhs-y-start'] + ex.rhs_scroller.scrollTop()) * ex.visible_page_ratio);\n\t\t\tvar rhs_y_end = ((change['rhs-y-end'] + ex.rhs_scroller.scrollTop()) * ex.visible_page_ratio) + 1;\n\t\t\tthis.trace('draw', 'marker calculated', lhs_y_start, lhs_y_end, rhs_y_start, rhs_y_end);\n\n\t\t\tctx_lhs.beginPath();\n\t\t\tctx_lhs.fillStyle = fill;\n\t\t\tctx_lhs.strokeStyle = '#000';\n\t\t\tctx_lhs.lineWidth = 0.5;\n\t\t\tctx_lhs.fillRect(1.5, lhs_y_start, 4.5, Math.max(lhs_y_end - lhs_y_start, 5));\n\t\t\tctx_lhs.strokeRect(1.5, lhs_y_start, 4.5, Math.max(lhs_y_end - lhs_y_start, 5));\n\n\t\t\tctx_rhs.beginPath();\n\t\t\tctx_rhs.fillStyle = fill;\n\t\t\tctx_rhs.strokeStyle = '#000';\n\t\t\tctx_rhs.lineWidth = 0.5;\n\t\t\tctx_rhs.fillRect(1.5, rhs_y_start, 4.5, Math.max(rhs_y_end - rhs_y_start, 5));\n\t\t\tctx_rhs.strokeRect(1.5, rhs_y_start, 4.5, Math.max(rhs_y_end - rhs_y_start, 5));\n\n\t\t\tif (!this._is_change_in_view(vp, change)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tlhs_y_start = change['lhs-y-start'];\n\t\t\tlhs_y_end = change['lhs-y-end'];\n\t\t\trhs_y_start = change['rhs-y-start'];\n\t\t\trhs_y_end = change['rhs-y-end'];\n\n\t\t\tvar radius = 3;\n\n\t\t\t// draw left box\n\t\t\tctx.beginPath();\n\t\t\tctx.strokeStyle = fill;\n\t\t\tctx.lineWidth = (this._current_diff==i) ? 1.5 : 1;\n\n\t\t\tvar rectWidth = this.draw_lhs_width;\n\t\t\tvar rectHeight = lhs_y_end - lhs_y_start - 1;\n\t\t\tvar rectX = this.draw_lhs_min;\n\t\t\tvar rectY = lhs_y_start;\n\t\t\t// top and top top-right corner\n\n\t\t\t// draw left box\n\t\t\tctx.moveTo(rectX, rectY);\n\t\t\tif (navigator.appName == 'Microsoft Internet Explorer') {\n\t\t\t\t// IE arcs look awful\n\t\t\t\tctx.lineTo(this.draw_lhs_min + this.draw_lhs_width, lhs_y_start);\n\t\t\t\tctx.lineTo(this.draw_lhs_min + this.draw_lhs_width, lhs_y_end + 1);\n\t\t\t\tctx.lineTo(this.draw_lhs_min, lhs_y_end + 1);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif (rectHeight <= 0) {\n\t\t\t\t\tctx.lineTo(rectX + rectWidth, rectY);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tctx.arcTo(rectX + rectWidth, rectY, rectX + rectWidth, rectY + radius, radius);\n\t\t\t\t\tctx.arcTo(rectX + rectWidth, rectY + rectHeight, rectX + rectWidth - radius, rectY + rectHeight, radius);\n\t\t\t\t}\n\t\t\t\t// bottom line\n\t\t\t\tctx.lineTo(rectX, rectY + rectHeight);\n\t\t\t}\n\t\t\tctx.stroke();\n\n\t\t\trectWidth = this.draw_rhs_width;\n\t\t\trectHeight = rhs_y_end - rhs_y_start - 1;\n\t\t\trectX = this.draw_rhs_max;\n\t\t\trectY = rhs_y_start;\n\n\t\t\t// draw right box\n\t\t\tctx.moveTo(rectX, rectY);\n\t\t\tif (navigator.appName == 'Microsoft Internet Explorer') {\n\t\t\t\tctx.lineTo(this.draw_rhs_max - this.draw_rhs_width, rhs_y_start);\n\t\t\t\tctx.lineTo(this.draw_rhs_max - this.draw_rhs_width, rhs_y_end + 1);\n\t\t\t\tctx.lineTo(this.draw_rhs_max, rhs_y_end + 1);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif (rectHeight <= 0) {\n\t\t\t\t\tctx.lineTo(rectX - rectWidth, rectY);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tctx.arcTo(rectX - rectWidth, rectY, rectX - rectWidth, rectY + radius, radius);\n\t\t\t\t\tctx.arcTo(rectX - rectWidth, rectY + rectHeight, rectX - radius, rectY + rectHeight, radius);\n\t\t\t\t}\n\t\t\t\tctx.lineTo(rectX, rectY + rectHeight);\n\t\t\t}\n\t\t\tctx.stroke();\n\n\t\t\t// connect boxes\n\t\t\tvar cx = this.draw_lhs_min + this.draw_lhs_width;\n\t\t\tvar cy = lhs_y_start + (lhs_y_end + 1 - lhs_y_start) / 2.0;\n\t\t\tvar dx = this.draw_rhs_max - this.draw_rhs_width;\n\t\t\tvar dy = rhs_y_start + (rhs_y_end + 1 - rhs_y_start) / 2.0;\n\t\t\tctx.moveTo(cx, cy);\n\t\t\tif (cy == dy) {\n\t\t\t\tctx.lineTo(dx, dy);\n\t\t\t}\n\t\t\telse {\n\t\t\t\t// fancy!\n\t\t\t\tctx.bezierCurveTo(\n\t\t\t\t\tcx + 12, cy - 3, // control-1 X,Y\n\t\t\t\t\tdx - 12, dy - 3, // control-2 X,Y\n\t\t\t\t\tdx, dy);\n\t\t\t}\n\t\t\tctx.stroke();\n\t\t}\n\n\t\t// visible window feedback\n\t\tctx_lhs.fillStyle = this.settings.vpcolor;\n\t\tctx_rhs.fillStyle = this.settings.vpcolor;\n\n\t\tvar lto = ex.clhs.height() * ex.visible_page_ratio;\n\t\tvar lfrom = (ex.lhs_scroller.scrollTop() / ex.gutter_height) * ex.clhs.height();\n\t\tvar rto = ex.crhs.height() * ex.visible_page_ratio;\n\t\tvar rfrom = (ex.rhs_scroller.scrollTop() / ex.gutter_height) * ex.crhs.height();\n\t\tthis.trace('draw', 'cls.height', ex.clhs.height());\n\t\tthis.trace('draw', 'lhs_scroller.scrollTop()', ex.lhs_scroller.scrollTop());\n\t\tthis.trace('draw', 'gutter_height', ex.gutter_height);\n\t\tthis.trace('draw', 'visible_page_ratio', ex.visible_page_ratio);\n\t\tthis.trace('draw', 'lhs from', lfrom, 'lhs to', lto);\n\t\tthis.trace('draw', 'rhs from', rfrom, 'rhs to', rto);\n\n\t\tctx_lhs.fillRect(1.5, lfrom, 4.5, lto);\n\t\tctx_rhs.fillRect(1.5, rfrom, 4.5, rto);\n\n\t\tex.clhs.click(function (ev) {\n\t\t\tvar y = ev.pageY - ex.lhs_xyoffset.top - (lto / 2);\n\t\t\tvar sto = Math.max(0, (y / mcanvas_lhs.height) * ex.lhs_scroller.get(0).scrollHeight);\n\t\t\tex.lhs_scroller.scrollTop(sto);\n\t\t});\n\t\tex.crhs.click(function (ev) {\n\t\t\tvar y = ev.pageY - ex.rhs_xyoffset.top - (rto / 2);\n\t\t\tvar sto = Math.max(0, (y / mcanvas_rhs.height) * ex.rhs_scroller.get(0).scrollHeight);\n\t\t\tex.rhs_scroller.scrollTop(sto);\n\t\t});\n\t},\n\ttrace: function(name) {\n\t\tif(this.settings._debug.indexOf(name) >= 0) {\n\t\t\targuments[0] = name + ':';\n\t\t\tconsole.log([].slice.apply(arguments));\n\t\t}\n\t}\n});\n\njQuery.pluginMaker = function(plugin) {\n\t// add the plugin function as a jQuery plugin\n\tjQuery.fn[plugin.prototype.name] = function(options) {\n\t\t// get the arguments\n\t\tvar args = jQuery.makeArray(arguments),\n\t\tafter = args.slice(1);\n\t\tvar rc;\n\t\tthis.each(function() {\n\t\t\t// see if we have an instance\n\t\t\tvar instance = jQuery.data(this, plugin.prototype.name);\n\t\t\tif (instance) {\n\t\t\t\t// call a method on the instance\n\t\t\t\tif (typeof options == \"string\") {\n\t\t\t\t\trc = instance[options].apply(instance, after);\n\t\t\t\t} else if (instance.update) {\n\t\t\t\t\t// call update on the instance\n\t\t\t\t\treturn instance.update.apply(instance, args);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// create the plugin\n\t\t\t\tvar _plugin = new plugin(this, options);\n\t\t\t}\n\t\t});\n\t\tif (rc != undefined) return rc;\n\t};\n};\n\n// make the mergely widget\njQuery.pluginMaker(Mgly.mergely);\n\n})( window, document, jQuery, CodeMirror );\n"
  },
  {
    "path": "static/mergely/lib/searchcursor.js",
    "content": "(function(){\n  var Pos = CodeMirror.Pos;\n\n  function SearchCursor(cm, query, pos, caseFold) {\n    this.atOccurrence = false; this.cm = cm;\n    if (caseFold == null && typeof query == \"string\") caseFold = false;\n\n    pos = pos ? cm.clipPos(pos) : Pos(0, 0);\n    this.pos = {from: pos, to: pos};\n\n    // The matches method is filled in based on the type of query.\n    // It takes a position and a direction, and returns an object\n    // describing the next occurrence of the query, or null if no\n    // more matches were found.\n    if (typeof query != \"string\") { // Regexp match\n      if (!query.global) query = new RegExp(query.source, query.ignoreCase ? \"ig\" : \"g\");\n      this.matches = function(reverse, pos) {\n        if (reverse) {\n          query.lastIndex = 0;\n          var line = cm.getLine(pos.line).slice(0, pos.ch), match = query.exec(line), start = 0;\n          while (match) {\n            start += match.index + 1;\n            line = line.slice(start);\n            query.lastIndex = 0;\n            var newmatch = query.exec(line);\n            if (newmatch) match = newmatch;\n            else break;\n          }\n          start--;\n        } else {\n          query.lastIndex = pos.ch;\n          var line = cm.getLine(pos.line), match = query.exec(line),\n          start = match && match.index;\n        }\n        if (match && match[0])\n          return {from: Pos(pos.line, start),\n                  to: Pos(pos.line, start + match[0].length),\n                  match: match};\n      };\n    } else { // String query\n      if (caseFold) query = query.toLowerCase();\n      var fold = caseFold ? function(str){return str.toLowerCase();} : function(str){return str;};\n      var target = query.split(\"\\n\");\n      // Different methods for single-line and multi-line queries\n      if (target.length == 1) {\n        if (!query.length) {\n          // Empty string would match anything and never progress, so\n          // we define it to match nothing instead.\n          this.matches = function() {};\n        } else {\n          this.matches = function(reverse, pos) {\n            var line = fold(cm.getLine(pos.line)), len = query.length, match;\n            if (reverse ? (pos.ch >= len && (match = line.lastIndexOf(query, pos.ch - len)) != -1)\n                        : (match = line.indexOf(query, pos.ch)) != -1)\n              return {from: Pos(pos.line, match),\n                      to: Pos(pos.line, match + len)};\n          };\n        }\n      } else {\n        this.matches = function(reverse, pos) {\n          var ln = pos.line, idx = (reverse ? target.length - 1 : 0), match = target[idx], line = fold(cm.getLine(ln));\n          var offsetA = (reverse ? line.indexOf(match) + match.length : line.lastIndexOf(match));\n          if (reverse ? offsetA >= pos.ch || offsetA != match.length\n              : offsetA <= pos.ch || offsetA != line.length - match.length)\n            return;\n          for (;;) {\n            if (reverse ? !ln : ln == cm.lineCount() - 1) return;\n            line = fold(cm.getLine(ln += reverse ? -1 : 1));\n            match = target[reverse ? --idx : ++idx];\n            if (idx > 0 && idx < target.length - 1) {\n              if (line != match) return;\n              else continue;\n            }\n            var offsetB = (reverse ? line.lastIndexOf(match) : line.indexOf(match) + match.length);\n            if (reverse ? offsetB != line.length - match.length : offsetB != match.length)\n              return;\n            var start = Pos(pos.line, offsetA), end = Pos(ln, offsetB);\n            return {from: reverse ? end : start, to: reverse ? start : end};\n          }\n        };\n      }\n    }\n  }\n\n  SearchCursor.prototype = {\n    findNext: function() {return this.find(false);},\n    findPrevious: function() {return this.find(true);},\n\n    find: function(reverse) {\n      var self = this, pos = this.cm.clipPos(reverse ? this.pos.from : this.pos.to);\n      function savePosAndFail(line) {\n        var pos = Pos(line, 0);\n        self.pos = {from: pos, to: pos};\n        self.atOccurrence = false;\n        return false;\n      }\n\n      for (;;) {\n        if (this.pos = this.matches(reverse, pos)) {\n          if (!this.pos.from || !this.pos.to) { console.log(this.matches, this.pos); }\n          this.atOccurrence = true;\n          return this.pos.match || true;\n        }\n        if (reverse) {\n          if (!pos.line) return savePosAndFail(0);\n          pos = Pos(pos.line-1, this.cm.getLine(pos.line-1).length);\n        }\n        else {\n          var maxLine = this.cm.lineCount();\n          if (pos.line == maxLine - 1) return savePosAndFail(maxLine);\n          pos = Pos(pos.line + 1, 0);\n        }\n      }\n    },\n\n    from: function() {if (this.atOccurrence) return this.pos.from;},\n    to: function() {if (this.atOccurrence) return this.pos.to;},\n\n    replace: function(newText) {\n      if (!this.atOccurrence) return;\n      var lines = CodeMirror.splitLines(newText);\n      this.cm.replaceRange(lines, this.pos.from, this.pos.to);\n      this.pos.to = Pos(this.pos.from.line + lines.length - 1,\n                        lines[lines.length - 1].length + (lines.length == 1 ? this.pos.from.ch : 0));\n    }\n  };\n\n  CodeMirror.defineExtension(\"getSearchCursor\", function(query, pos, caseFold) {\n    return new SearchCursor(this, query, pos, caseFold);\n  });\n})();"
  },
  {
    "path": "static/nprogress/nprogress.css",
    "content": "/* Make clicks pass-through */\n#nprogress {\n  pointer-events: none;\n}\n\n#nprogress .bar {\n  background: #29d;\n\n  position: fixed;\n  z-index: 1031;\n  top: 0;\n  left: 0;\n\n  width: 100%;\n  height: 2px;\n}\n\n/* Fancy blur effect */\n#nprogress .peg {\n  display: block;\n  position: absolute;\n  right: 0px;\n  width: 100px;\n  height: 100%;\n  box-shadow: 0 0 10px #29d, 0 0 5px #29d;\n  opacity: 1.0;\n\n  -webkit-transform: rotate(3deg) translate(0px, -4px);\n      -ms-transform: rotate(3deg) translate(0px, -4px);\n          transform: rotate(3deg) translate(0px, -4px);\n}\n\n/* Remove these to get rid of the spinner */\n#nprogress .spinner {\n  display: block;\n  position: fixed;\n  z-index: 1031;\n  top: 15px;\n  right: 15px;\n}\n\n#nprogress .spinner-icon {\n  width: 18px;\n  height: 18px;\n  box-sizing: border-box;\n\n  border: solid 2px transparent;\n  border-top-color: #29d;\n  border-left-color: #29d;\n  border-radius: 50%;\n\n  -webkit-animation: nprogress-spinner 400ms linear infinite;\n          animation: nprogress-spinner 400ms linear infinite;\n}\n\n.nprogress-custom-parent {\n  overflow: hidden;\n  position: relative;\n}\n\n.nprogress-custom-parent #nprogress .spinner,\n.nprogress-custom-parent #nprogress .bar {\n  position: absolute;\n}\n\n@-webkit-keyframes nprogress-spinner {\n  0%   { -webkit-transform: rotate(0deg); }\n  100% { -webkit-transform: rotate(360deg); }\n}\n@keyframes nprogress-spinner {\n  0%   { transform: rotate(0deg); }\n  100% { transform: rotate(360deg); }\n}\n\n"
  },
  {
    "path": "static/nprogress/nprogress.js",
    "content": "/* NProgress, (c) 2013, 2014 Rico Sta. Cruz - http://ricostacruz.com/nprogress\n * @license MIT */\n\n;(function(root, factory) {\n\n  if (typeof define === 'function' && define.amd) {\n    define(factory);\n  } else if (typeof exports === 'object') {\n    module.exports = factory();\n  } else {\n    root.NProgress = factory();\n  }\n\n})(this, function() {\n  var NProgress = {};\n\n  NProgress.version = '0.2.0';\n\n  var Settings = NProgress.settings = {\n    minimum: 0.08,\n    easing: 'ease',\n    positionUsing: '',\n    speed: 200,\n    trickle: true,\n    trickleRate: 0.02,\n    trickleSpeed: 800,\n    showSpinner: true,\n    barSelector: '[role=\"bar\"]',\n    spinnerSelector: '[role=\"spinner\"]',\n    parent: 'body',\n    template: '<div class=\"bar\" role=\"bar\"><div class=\"peg\"></div></div><div class=\"spinner\" role=\"spinner\"><div class=\"spinner-icon\"></div></div>'\n  };\n\n  /**\n   * Updates configuration.\n   *\n   *     NProgress.configure({\n   *       minimum: 0.1\n   *     });\n   */\n  NProgress.configure = function(options) {\n    var key, value;\n    for (key in options) {\n      value = options[key];\n      if (value !== undefined && options.hasOwnProperty(key)) Settings[key] = value;\n    }\n\n    return this;\n  };\n\n  /**\n   * Last number.\n   */\n\n  NProgress.status = null;\n\n  /**\n   * Sets the progress bar status, where `n` is a number from `0.0` to `1.0`.\n   *\n   *     NProgress.set(0.4);\n   *     NProgress.set(1.0);\n   */\n\n  NProgress.set = function(n) {\n    var started = NProgress.isStarted();\n\n    n = clamp(n, Settings.minimum, 1);\n    NProgress.status = (n === 1 ? null : n);\n\n    var progress = NProgress.render(!started),\n        bar      = progress.querySelector(Settings.barSelector),\n        speed    = Settings.speed,\n        ease     = Settings.easing;\n\n    progress.offsetWidth; /* Repaint */\n\n    queue(function(next) {\n      // Set positionUsing if it hasn't already been set\n      if (Settings.positionUsing === '') Settings.positionUsing = NProgress.getPositioningCSS();\n\n      // Add transition\n      css(bar, barPositionCSS(n, speed, ease));\n\n      if (n === 1) {\n        // Fade out\n        css(progress, { \n          transition: 'none', \n          opacity: 1 \n        });\n        progress.offsetWidth; /* Repaint */\n\n        setTimeout(function() {\n          css(progress, { \n            transition: 'all ' + speed + 'ms linear', \n            opacity: 0 \n          });\n          setTimeout(function() {\n            NProgress.remove();\n            next();\n          }, speed);\n        }, speed);\n      } else {\n        setTimeout(next, speed);\n      }\n    });\n\n    return this;\n  };\n\n  NProgress.isStarted = function() {\n    return typeof NProgress.status === 'number';\n  };\n\n  /**\n   * Shows the progress bar.\n   * This is the same as setting the status to 0%, except that it doesn't go backwards.\n   *\n   *     NProgress.start();\n   *\n   */\n  NProgress.start = function() {\n    if (!NProgress.status) NProgress.set(0);\n\n    var work = function() {\n      setTimeout(function() {\n        if (!NProgress.status) return;\n        NProgress.trickle();\n        work();\n      }, Settings.trickleSpeed);\n    };\n\n    if (Settings.trickle) work();\n\n    return this;\n  };\n\n  /**\n   * Hides the progress bar.\n   * This is the *sort of* the same as setting the status to 100%, with the\n   * difference being `done()` makes some placebo effect of some realistic motion.\n   *\n   *     NProgress.done();\n   *\n   * If `true` is passed, it will show the progress bar even if its hidden.\n   *\n   *     NProgress.done(true);\n   */\n\n  NProgress.done = function(force) {\n    if (!force && !NProgress.status) return this;\n\n    return NProgress.inc(0.3 + 0.5 * Math.random()).set(1);\n  };\n\n  /**\n   * Increments by a random amount.\n   */\n\n  NProgress.inc = function(amount) {\n    var n = NProgress.status;\n\n    if (!n) {\n      return NProgress.start();\n    } else {\n      if (typeof amount !== 'number') {\n        amount = (1 - n) * clamp(Math.random() * n, 0.1, 0.95);\n      }\n\n      n = clamp(n + amount, 0, 0.994);\n      return NProgress.set(n);\n    }\n  };\n\n  NProgress.trickle = function() {\n    return NProgress.inc(Math.random() * Settings.trickleRate);\n  };\n\n  /**\n   * Waits for all supplied jQuery promises and\n   * increases the progress as the promises resolve.\n   *\n   * @param $promise jQUery Promise\n   */\n  (function() {\n    var initial = 0, current = 0;\n\n    NProgress.promise = function($promise) {\n      if (!$promise || $promise.state() === \"resolved\") {\n        return this;\n      }\n\n      if (current === 0) {\n        NProgress.start();\n      }\n\n      initial++;\n      current++;\n\n      $promise.always(function() {\n        current--;\n        if (current === 0) {\n            initial = 0;\n            NProgress.done();\n        } else {\n            NProgress.set((initial - current) / initial);\n        }\n      });\n\n      return this;\n    };\n\n  })();\n\n  /**\n   * (Internal) renders the progress bar markup based on the `template`\n   * setting.\n   */\n\n  NProgress.render = function(fromStart) {\n    if (NProgress.isRendered()) return document.getElementById('nprogress');\n\n    addClass(document.documentElement, 'nprogress-busy');\n    \n    var progress = document.createElement('div');\n    progress.id = 'nprogress';\n    progress.innerHTML = Settings.template;\n\n    var bar      = progress.querySelector(Settings.barSelector),\n        perc     = fromStart ? '-100' : toBarPerc(NProgress.status || 0),\n        parent   = document.querySelector(Settings.parent),\n        spinner;\n    \n    css(bar, {\n      transition: 'all 0 linear',\n      transform: 'translate3d(' + perc + '%,0,0)'\n    });\n\n    if (!Settings.showSpinner) {\n      spinner = progress.querySelector(Settings.spinnerSelector);\n      spinner && removeElement(spinner);\n    }\n\n    if (parent != document.body) {\n      addClass(parent, 'nprogress-custom-parent');\n    }\n\n    parent.appendChild(progress);\n    return progress;\n  };\n\n  /**\n   * Removes the element. Opposite of render().\n   */\n\n  NProgress.remove = function() {\n    removeClass(document.documentElement, 'nprogress-busy');\n    removeClass(document.querySelector(Settings.parent), 'nprogress-custom-parent');\n    var progress = document.getElementById('nprogress');\n    progress && removeElement(progress);\n  };\n\n  /**\n   * Checks if the progress bar is rendered.\n   */\n\n  NProgress.isRendered = function() {\n    return !!document.getElementById('nprogress');\n  };\n\n  /**\n   * Determine which positioning CSS rule to use.\n   */\n\n  NProgress.getPositioningCSS = function() {\n    // Sniff on document.body.style\n    var bodyStyle = document.body.style;\n\n    // Sniff prefixes\n    var vendorPrefix = ('WebkitTransform' in bodyStyle) ? 'Webkit' :\n                       ('MozTransform' in bodyStyle) ? 'Moz' :\n                       ('msTransform' in bodyStyle) ? 'ms' :\n                       ('OTransform' in bodyStyle) ? 'O' : '';\n\n    if (vendorPrefix + 'Perspective' in bodyStyle) {\n      // Modern browsers with 3D support, e.g. Webkit, IE10\n      return 'translate3d';\n    } else if (vendorPrefix + 'Transform' in bodyStyle) {\n      // Browsers without 3D support, e.g. IE9\n      return 'translate';\n    } else {\n      // Browsers without translate() support, e.g. IE7-8\n      return 'margin';\n    }\n  };\n\n  /**\n   * Helpers\n   */\n\n  function clamp(n, min, max) {\n    if (n < min) return min;\n    if (n > max) return max;\n    return n;\n  }\n\n  /**\n   * (Internal) converts a percentage (`0..1`) to a bar translateX\n   * percentage (`-100%..0%`).\n   */\n\n  function toBarPerc(n) {\n    return (-1 + n) * 100;\n  }\n\n\n  /**\n   * (Internal) returns the correct CSS for changing the bar's\n   * position given an n percentage, and speed and ease from Settings\n   */\n\n  function barPositionCSS(n, speed, ease) {\n    var barCSS;\n\n    if (Settings.positionUsing === 'translate3d') {\n      barCSS = { transform: 'translate3d('+toBarPerc(n)+'%,0,0)' };\n    } else if (Settings.positionUsing === 'translate') {\n      barCSS = { transform: 'translate('+toBarPerc(n)+'%,0)' };\n    } else {\n      barCSS = { 'margin-left': toBarPerc(n)+'%' };\n    }\n\n    barCSS.transition = 'all '+speed+'ms '+ease;\n\n    return barCSS;\n  }\n\n  /**\n   * (Internal) Queues a function to be executed.\n   */\n\n  var queue = (function() {\n    var pending = [];\n    \n    function next() {\n      var fn = pending.shift();\n      if (fn) {\n        fn(next);\n      }\n    }\n\n    return function(fn) {\n      pending.push(fn);\n      if (pending.length == 1) next();\n    };\n  })();\n\n  /**\n   * (Internal) Applies css properties to an element, similar to the jQuery \n   * css method.\n   *\n   * While this helper does assist with vendor prefixed property names, it \n   * does not perform any manipulation of values prior to setting styles.\n   */\n\n  var css = (function() {\n    var cssPrefixes = [ 'Webkit', 'O', 'Moz', 'ms' ],\n        cssProps    = {};\n\n    function camelCase(string) {\n      return string.replace(/^-ms-/, 'ms-').replace(/-([\\da-z])/gi, function(match, letter) {\n        return letter.toUpperCase();\n      });\n    }\n\n    function getVendorProp(name) {\n      var style = document.body.style;\n      if (name in style) return name;\n\n      var i = cssPrefixes.length,\n          capName = name.charAt(0).toUpperCase() + name.slice(1),\n          vendorName;\n      while (i--) {\n        vendorName = cssPrefixes[i] + capName;\n        if (vendorName in style) return vendorName;\n      }\n\n      return name;\n    }\n\n    function getStyleProp(name) {\n      name = camelCase(name);\n      return cssProps[name] || (cssProps[name] = getVendorProp(name));\n    }\n\n    function applyCss(element, prop, value) {\n      prop = getStyleProp(prop);\n      element.style[prop] = value;\n    }\n\n    return function(element, properties) {\n      var args = arguments,\n          prop, \n          value;\n\n      if (args.length == 2) {\n        for (prop in properties) {\n          value = properties[prop];\n          if (value !== undefined && properties.hasOwnProperty(prop)) applyCss(element, prop, value);\n        }\n      } else {\n        applyCss(element, args[1], args[2]);\n      }\n    }\n  })();\n\n  /**\n   * (Internal) Determines if an element or space separated list of class names contains a class name.\n   */\n\n  function hasClass(element, name) {\n    var list = typeof element == 'string' ? element : classList(element);\n    return list.indexOf(' ' + name + ' ') >= 0;\n  }\n\n  /**\n   * (Internal) Adds a class to an element.\n   */\n\n  function addClass(element, name) {\n    var oldList = classList(element),\n        newList = oldList + name;\n\n    if (hasClass(oldList, name)) return; \n\n    // Trim the opening space.\n    element.className = newList.substring(1);\n  }\n\n  /**\n   * (Internal) Removes a class from an element.\n   */\n\n  function removeClass(element, name) {\n    var oldList = classList(element),\n        newList;\n\n    if (!hasClass(element, name)) return;\n\n    // Replace the class name.\n    newList = oldList.replace(' ' + name + ' ', ' ');\n\n    // Trim the opening and closing spaces.\n    element.className = newList.substring(1, newList.length - 1);\n  }\n\n  /**\n   * (Internal) Gets a space separated list of the class names on the element. \n   * The list is wrapped with a single space on each end to facilitate finding \n   * matches within the list.\n   */\n\n  function classList(element) {\n    return (' ' + (element.className || '') + ' ').replace(/\\s+/gi, ' ');\n  }\n\n  /**\n   * (Internal) Removes an element from the DOM.\n   */\n\n  function removeElement(element) {\n    element && element.parentNode && element.parentNode.removeChild(element);\n  }\n\n  return NProgress;\n});\n\n"
  },
  {
    "path": "static/prettify/themes/prettify.css",
    "content": "/**\n * @license\n * Copyright (C) 2015 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/* Pretty printing styles. Used with prettify.js. */\n\n\n/* SPAN elements with the classes below are added by prettyprint. */\n.pln { color: #000 }  /* plain text */\n\n@media screen {\n    .str { color: #080 }  /* string content */\n    .kwd { color: #008 }  /* a keyword */\n    .com { color: #800 }  /* a comment */\n    .typ { color: #606 }  /* a type name */\n    .lit { color: #066 }  /* a literal value */\n    /* punctuation, lisp open bracket, lisp close bracket */\n    .pun, .opn, .clo { color: #660 }\n    .tag { color: #008 }  /* a markup tag name */\n    .atn { color: #606 }  /* a markup attribute name */\n    .atv { color: #080 }  /* a markup attribute value */\n    .dec, .var { color: #606 }  /* a declaration; a variable name */\n    .fun { color: red }  /* a function name */\n}\n\n/* Use higher contrast and text-weight for printable form. */\n@media print, projection {\n    .str { color: #060 }\n    .kwd { color: #006; font-weight: bold }\n    .com { color: #600; font-style: italic }\n    .typ { color: #404; font-weight: bold }\n    .lit { color: #044 }\n    .pun, .opn, .clo { color: #440 }\n    .tag { color: #006; font-weight: bold }\n    .atn { color: #404 }\n    .atv { color: #060 }\n}\n\n/* Put a border around prettyprinted code snippets. */\npre.prettyprint { padding: 2px; border: 1px solid #888 }\n\n/* Specify class=linenums on a pre to get line numbering */\nol.linenums { margin-top: 0; margin-bottom: 0 } /* IE indents via margin-left */\nli.L0,\nli.L1,\nli.L2,\nli.L3,\nli.L5,\nli.L6,\nli.L7,\nli.L8 { list-style-type: none }\n/* Alternate shading for lines */\nli.L1,\nli.L3,\nli.L5,\nli.L7,\nli.L9 { background: #eee }"
  },
  {
    "path": "static/prismjs/prismjs.css",
    "content": "/* PrismJS 1.29.0\nhttps://prismjs.com/download.html#themes=prism-tomorrow&languages=markup+css+clike+javascript */\ncode[class*=language-],\npre[class*=language-] {\n    color: #ccc;\n    background: 0 0;\n    font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;\n    font-size: 1em;\n    text-align: left;\n    white-space: pre;\n    word-spacing: normal;\n    word-break: normal;\n    word-wrap: normal;\n    line-height: 1.5;\n    -moz-tab-size: 4;\n    -o-tab-size: 4;\n    tab-size: 4;\n    -webkit-hyphens: none;\n    -moz-hyphens: none;\n    -ms-hyphens: none;\n    hyphens: none\n}\n\npre[class*=language-] {\n    padding: 1em;\n    margin: .5em 0;\n    overflow: auto\n}\n\ncode[class*=language-] ::-moz-selection,\ncode[class*=language-]::-moz-selection,\npre[class*=language-] ::-moz-selection,\npre[class*=language-]::-moz-selection {\n    text-shadow: none;\n    background: #b3d4fc\n}\n\ncode[class*=language-] ::selection,\ncode[class*=language-]::selection,\npre[class*=language-] ::selection,\npre[class*=language-]::selection {\n    text-shadow: none;\n    background: #b3d4fc\n}\n\n@media print {\n\n    code[class*=language-],\n    pre[class*=language-] {\n        text-shadow: none\n    }\n}\n\n:not(pre)>code[class*=language-],\npre[class*=language-] {\n    background: #2d2d2d\n}\n\n:not(pre)>code[class*=language-] {\n    padding: .1em;\n    border-radius: .3em;\n    white-space: normal\n}\n\n.token.block-comment,\n.token.cdata,\n.token.comment,\n.token.doctype,\n.token.prolog {\n    color: #999\n}\n\n.token.punctuation {\n    color: #ccc\n}\n\n.token.attr-name,\n.token.deleted,\n.token.namespace,\n.token.tag {\n    color: #e2777a\n}\n\n.token.function-name {\n    color: #6196cc\n}\n\n.token.boolean,\n.token.function,\n.token.number {\n    color: #f08d49\n}\n\n.token.class-name,\n.token.constant,\n.token.property,\n.token.symbol {\n    color: #f8c555\n}\n\n.token.atrule,\n.token.builtin,\n.token.important,\n.token.keyword,\n.token.selector {\n    color: #cc99cd\n}\n\n.token.attr-value,\n.token.char,\n.token.regex,\n.token.string,\n.token.variable {\n    color: #7ec699\n}\n\n.token.entity,\n.token.operator,\n.token.url {\n    color: #67cdcc\n}\n\n.token.bold,\n.token.important {\n    font-weight: 700\n}\n\n.token.italic {\n    font-style: italic\n}\n\n.token.entity {\n    cursor: help\n}\n\n.token.inserted {\n    color: green\n}\n\n.token.atrule,\n.token.attr-value,\n.token.keyword {\n    color: #07a\n}\n\n.token.class-name,\n.token.function {\n    color: #dd4a68\n}\n\n.token.important,\n.token.regex,\n.token.variable {\n    color: #e90\n}\n\npre[class*=language-].line-numbers {\n    position: relative;\n    padding-left: 3.8em !important;\n    counter-reset: linenumber\n}\n\npre[class*=language-].line-numbers>code {\n    position: relative;\n    white-space: inherit\n}\n\n.line-numbers .line-numbers-rows {\n    position: absolute;\n    pointer-events: none;\n    top: 0;\n    font-size: 100%;\n    left: -3.8em;\n    width: 3em;\n    letter-spacing: -1px;\n    border-right: 1px solid #999;\n    -webkit-user-select: none;\n    -moz-user-select: none;\n    -ms-user-select: none;\n    user-select: none\n}\n\n.line-numbers-rows>span {\n    display: block;\n    counter-increment: linenumber\n}\n\n.line-numbers-rows>span:before {\n    content: counter(linenumber);\n    color: #999;\n    display: block;\n    padding-right: .8em;\n    text-align: right\n}\n\ndiv.code-toolbar {\n    position: relative\n}\n\ndiv.code-toolbar>.toolbar {\n    position: absolute;\n    z-index: 10;\n    top: .1em;\n    right: .5em;\n    transition: opacity .3s ease-in-out;\n    opacity: 0\n}\n\ndiv.code-toolbar:hover>.toolbar {\n    opacity: 1\n}\n\ndiv.code-toolbar:focus-within>.toolbar {\n    opacity: 1\n}\n\ndiv.code-toolbar>.toolbar>.toolbar-item {\n    display: inline-block\n}\n\ndiv.code-toolbar>.toolbar>.toolbar-item>a {\n    cursor: pointer\n}\n\ndiv.code-toolbar>.toolbar>.toolbar-item>button {\n    background: 0 0;\n    border: 0;\n    color: inherit;\n    font: inherit;\n    line-height: normal;\n    overflow: visible;\n    padding: 0;\n    -webkit-user-select: none;\n    -moz-user-select: none;\n    -ms-user-select: none\n}\n\ndiv.code-toolbar>.toolbar>.toolbar-item>a,\ndiv.code-toolbar>.toolbar>.toolbar-item>button,\ndiv.code-toolbar>.toolbar>.toolbar-item>span {\n    color: #bbb;\n    font-size: .8em;\n    padding: 0 .5em;\n    background: #f5f2f0;\n    box-shadow: 0 2px 0 0 rgba(0, 0, 0, .2);\n    border-radius: .5em\n}\n\ndiv.code-toolbar>.toolbar>.toolbar-item>a:focus,\ndiv.code-toolbar>.toolbar>.toolbar-item>a:hover,\ndiv.code-toolbar>.toolbar>.toolbar-item>button:focus,\ndiv.code-toolbar>.toolbar>.toolbar-item>button:hover,\ndiv.code-toolbar>.toolbar>.toolbar-item>span:focus,\ndiv.code-toolbar>.toolbar>.toolbar-item>span:hover {\n    color: inherit;\n    text-decoration: none\n}\n\n.cherry div.code-toolbar>.toolbar>.toolbar-item>button:focus,\ndiv.code-toolbar>.toolbar>.toolbar-item>button:hover {\n    color: #1fa9e0be !important;\n}\n"
  },
  {
    "path": "static/prismjs/prismjs.js",
    "content": "/* PrismJS 1.28.0\nhttps://prismjs.com/download.html#themes=prism&languages=markup+css+clike+javascript+bash+dart+go+java+kotlin+latex+markup-templating+matlab+mongodb+php+python+ruby+rust+sql+swift+systemd+typoscript+yaml&plugins=line-numbers+toolbar+copy-to-clipboard */\nvar _self = \"undefined\" != typeof window ? window : \"undefined\" != typeof WorkerGlobalScope && self instanceof WorkerGlobalScope ? self : {}, Prism = function (e) { var n = /(?:^|\\s)lang(?:uage)?-([\\w-]+)(?=\\s|$)/i, t = 0, r = {}, a = { manual: e.Prism && e.Prism.manual, disableWorkerMessageHandler: e.Prism && e.Prism.disableWorkerMessageHandler, util: { encode: function e(n) { return n instanceof i ? new i(n.type, e(n.content), n.alias) : Array.isArray(n) ? n.map(e) : n.replace(/&/g, \"&amp;\").replace(/</g, \"&lt;\").replace(/\\u00a0/g, \" \") }, type: function (e) { return Object.prototype.toString.call(e).slice(8, -1) }, objId: function (e) { return e.__id || Object.defineProperty(e, \"__id\", { value: ++t }), e.__id }, clone: function e(n, t) { var r, i; switch (t = t || {}, a.util.type(n)) { case \"Object\": if (i = a.util.objId(n), t[i]) return t[i]; for (var l in r = {}, t[i] = r, n) n.hasOwnProperty(l) && (r[l] = e(n[l], t)); return r; case \"Array\": return i = a.util.objId(n), t[i] ? t[i] : (r = [], t[i] = r, n.forEach((function (n, a) { r[a] = e(n, t) })), r); default: return n } }, getLanguage: function (e) { for (; e;) { var t = n.exec(e.className); if (t) return t[1].toLowerCase(); e = e.parentElement } return \"none\" }, setLanguage: function (e, t) { e.className = e.className.replace(RegExp(n, \"gi\"), \"\"), e.classList.add(\"language-\" + t) }, currentScript: function () { if (\"undefined\" == typeof document) return null; if (\"currentScript\" in document) return document.currentScript; try { throw new Error } catch (r) { var e = (/at [^(\\r\\n]*\\((.*):[^:]+:[^:]+\\)$/i.exec(r.stack) || [])[1]; if (e) { var n = document.getElementsByTagName(\"script\"); for (var t in n) if (n[t].src == e) return n[t] } return null } }, isActive: function (e, n, t) { for (var r = \"no-\" + n; e;) { var a = e.classList; if (a.contains(n)) return !0; if (a.contains(r)) return !1; e = e.parentElement } return !!t } }, languages: { plain: r, plaintext: r, text: r, txt: r, extend: function (e, n) { var t = a.util.clone(a.languages[e]); for (var r in n) t[r] = n[r]; return t }, insertBefore: function (e, n, t, r) { var i = (r = r || a.languages)[e], l = {}; for (var o in i) if (i.hasOwnProperty(o)) { if (o == n) for (var s in t) t.hasOwnProperty(s) && (l[s] = t[s]); t.hasOwnProperty(o) || (l[o] = i[o]) } var u = r[e]; return r[e] = l, a.languages.DFS(a.languages, (function (n, t) { t === u && n != e && (this[n] = l) })), l }, DFS: function e(n, t, r, i) { i = i || {}; var l = a.util.objId; for (var o in n) if (n.hasOwnProperty(o)) { t.call(n, o, n[o], r || o); var s = n[o], u = a.util.type(s); \"Object\" !== u || i[l(s)] ? \"Array\" !== u || i[l(s)] || (i[l(s)] = !0, e(s, t, o, i)) : (i[l(s)] = !0, e(s, t, null, i)) } } }, plugins: {}, highlightAll: function (e, n) { a.highlightAllUnder(document, e, n) }, highlightAllUnder: function (e, n, t) { var r = { callback: t, container: e, selector: 'code[class*=\"language-\"], [class*=\"language-\"] code, code[class*=\"lang-\"], [class*=\"lang-\"] code' }; a.hooks.run(\"before-highlightall\", r), r.elements = Array.prototype.slice.apply(r.container.querySelectorAll(r.selector)), a.hooks.run(\"before-all-elements-highlight\", r); for (var i, l = 0; i = r.elements[l++];)a.highlightElement(i, !0 === n, r.callback) }, highlightElement: function (n, t, r) { var i = a.util.getLanguage(n), l = a.languages[i]; a.util.setLanguage(n, i); var o = n.parentElement; o && \"pre\" === o.nodeName.toLowerCase() && a.util.setLanguage(o, i); var s = { element: n, language: i, grammar: l, code: n.textContent }; function u(e) { s.highlightedCode = e, a.hooks.run(\"before-insert\", s), s.element.innerHTML = s.highlightedCode, a.hooks.run(\"after-highlight\", s), a.hooks.run(\"complete\", s), r && r.call(s.element) } if (a.hooks.run(\"before-sanity-check\", s), (o = s.element.parentElement) && \"pre\" === o.nodeName.toLowerCase() && !o.hasAttribute(\"tabindex\") && o.setAttribute(\"tabindex\", \"0\"), !s.code) return a.hooks.run(\"complete\", s), void (r && r.call(s.element)); if (a.hooks.run(\"before-highlight\", s), s.grammar) if (t && e.Worker) { var c = new Worker(a.filename); c.onmessage = function (e) { u(e.data) }, c.postMessage(JSON.stringify({ language: s.language, code: s.code, immediateClose: !0 })) } else u(a.highlight(s.code, s.grammar, s.language)); else u(a.util.encode(s.code)) }, highlight: function (e, n, t) { var r = { code: e, grammar: n, language: t }; if (a.hooks.run(\"before-tokenize\", r), !r.grammar) throw new Error('The language \"' + r.language + '\" has no grammar.'); return r.tokens = a.tokenize(r.code, r.grammar), a.hooks.run(\"after-tokenize\", r), i.stringify(a.util.encode(r.tokens), r.language) }, tokenize: function (e, n) { var t = n.rest; if (t) { for (var r in t) n[r] = t[r]; delete n.rest } var a = new s; return u(a, a.head, e), o(e, a, n, a.head, 0), function (e) { for (var n = [], t = e.head.next; t !== e.tail;)n.push(t.value), t = t.next; return n }(a) }, hooks: { all: {}, add: function (e, n) { var t = a.hooks.all; t[e] = t[e] || [], t[e].push(n) }, run: function (e, n) { var t = a.hooks.all[e]; if (t && t.length) for (var r, i = 0; r = t[i++];)r(n) } }, Token: i }; function i(e, n, t, r) { this.type = e, this.content = n, this.alias = t, this.length = 0 | (r || \"\").length } function l(e, n, t, r) { e.lastIndex = n; var a = e.exec(t); if (a && r && a[1]) { var i = a[1].length; a.index += i, a[0] = a[0].slice(i) } return a } function o(e, n, t, r, s, g) { for (var f in t) if (t.hasOwnProperty(f) && t[f]) { var h = t[f]; h = Array.isArray(h) ? h : [h]; for (var d = 0; d < h.length; ++d) { if (g && g.cause == f + \",\" + d) return; var v = h[d], p = v.inside, m = !!v.lookbehind, y = !!v.greedy, k = v.alias; if (y && !v.pattern.global) { var x = v.pattern.toString().match(/[imsuy]*$/)[0]; v.pattern = RegExp(v.pattern.source, x + \"g\") } for (var b = v.pattern || v, w = r.next, A = s; w !== n.tail && !(g && A >= g.reach); A += w.value.length, w = w.next) { var E = w.value; if (n.length > e.length) return; if (!(E instanceof i)) { var P, L = 1; if (y) { if (!(P = l(b, A, e, m)) || P.index >= e.length) break; var S = P.index, O = P.index + P[0].length, j = A; for (j += w.value.length; S >= j;)j += (w = w.next).value.length; if (A = j -= w.value.length, w.value instanceof i) continue; for (var C = w; C !== n.tail && (j < O || \"string\" == typeof C.value); C = C.next)L++, j += C.value.length; L--, E = e.slice(A, j), P.index -= A } else if (!(P = l(b, 0, E, m))) continue; S = P.index; var N = P[0], _ = E.slice(0, S), M = E.slice(S + N.length), W = A + E.length; g && W > g.reach && (g.reach = W); var z = w.prev; if (_ && (z = u(n, z, _), A += _.length), c(n, z, L), w = u(n, z, new i(f, p ? a.tokenize(N, p) : N, k, N)), M && u(n, w, M), L > 1) { var I = { cause: f + \",\" + d, reach: W }; o(e, n, t, w.prev, A, I), g && I.reach > g.reach && (g.reach = I.reach) } } } } } } function s() { var e = { value: null, prev: null, next: null }, n = { value: null, prev: e, next: null }; e.next = n, this.head = e, this.tail = n, this.length = 0 } function u(e, n, t) { var r = n.next, a = { value: t, prev: n, next: r }; return n.next = a, r.prev = a, e.length++, a } function c(e, n, t) { for (var r = n.next, a = 0; a < t && r !== e.tail; a++)r = r.next; n.next = r, r.prev = n, e.length -= a } if (e.Prism = a, i.stringify = function e(n, t) { if (\"string\" == typeof n) return n; if (Array.isArray(n)) { var r = \"\"; return n.forEach((function (n) { r += e(n, t) })), r } var i = { type: n.type, content: e(n.content, t), tag: \"span\", classes: [\"token\", n.type], attributes: {}, language: t }, l = n.alias; l && (Array.isArray(l) ? Array.prototype.push.apply(i.classes, l) : i.classes.push(l)), a.hooks.run(\"wrap\", i); var o = \"\"; for (var s in i.attributes) o += \" \" + s + '=\"' + (i.attributes[s] || \"\").replace(/\"/g, \"&quot;\") + '\"'; return \"<\" + i.tag + ' class=\"' + i.classes.join(\" \") + '\"' + o + \">\" + i.content + \"</\" + i.tag + \">\" }, !e.document) return e.addEventListener ? (a.disableWorkerMessageHandler || e.addEventListener(\"message\", (function (n) { var t = JSON.parse(n.data), r = t.language, i = t.code, l = t.immediateClose; e.postMessage(a.highlight(i, a.languages[r], r)), l && e.close() }), !1), a) : a; var g = a.util.currentScript(); function f() { a.manual || a.highlightAll() } if (g && (a.filename = g.src, g.hasAttribute(\"data-manual\") && (a.manual = !0)), !a.manual) { var h = document.readyState; \"loading\" === h || \"interactive\" === h && g && g.defer ? document.addEventListener(\"DOMContentLoaded\", f) : window.requestAnimationFrame ? window.requestAnimationFrame(f) : window.setTimeout(f, 16) } return a }(_self); \"undefined\" != typeof module && module.exports && (module.exports = Prism), \"undefined\" != typeof global && (global.Prism = Prism);\nPrism.languages.markup = { comment: { pattern: /<!--(?:(?!<!--)[\\s\\S])*?-->/, greedy: !0 }, prolog: { pattern: /<\\?[\\s\\S]+?\\?>/, greedy: !0 }, doctype: { pattern: /<!DOCTYPE(?:[^>\"'[\\]]|\"[^\"]*\"|'[^']*')+(?:\\[(?:[^<\"'\\]]|\"[^\"]*\"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\\]\\s*)?>/i, greedy: !0, inside: { \"internal-subset\": { pattern: /(^[^\\[]*\\[)[\\s\\S]+(?=\\]>$)/, lookbehind: !0, greedy: !0, inside: null }, string: { pattern: /\"[^\"]*\"|'[^']*'/, greedy: !0 }, punctuation: /^<!|>$|[[\\]]/, \"doctype-tag\": /^DOCTYPE/i, name: /[^\\s<>'\"]+/ } }, cdata: { pattern: /<!\\[CDATA\\[[\\s\\S]*?\\]\\]>/i, greedy: !0 }, tag: { pattern: /<\\/?(?!\\d)[^\\s>\\/=$<%]+(?:\\s(?:\\s*[^\\s>\\/=]+(?:\\s*=\\s*(?:\"[^\"]*\"|'[^']*'|[^\\s'\">=]+(?=[\\s>]))|(?=[\\s/>])))+)?\\s*\\/?>/, greedy: !0, inside: { tag: { pattern: /^<\\/?[^\\s>\\/]+/, inside: { punctuation: /^<\\/?/, namespace: /^[^\\s>\\/:]+:/ } }, \"special-attr\": [], \"attr-value\": { pattern: /=\\s*(?:\"[^\"]*\"|'[^']*'|[^\\s'\">=]+)/, inside: { punctuation: [{ pattern: /^=/, alias: \"attr-equals\" }, { pattern: /^(\\s*)[\"']|[\"']$/, lookbehind: !0 }] } }, punctuation: /\\/?>/, \"attr-name\": { pattern: /[^\\s>\\/]+/, inside: { namespace: /^[^\\s>\\/:]+:/ } } } }, entity: [{ pattern: /&[\\da-z]{1,8};/i, alias: \"named-entity\" }, /&#x?[\\da-f]{1,8};/i] }, Prism.languages.markup.tag.inside[\"attr-value\"].inside.entity = Prism.languages.markup.entity, Prism.languages.markup.doctype.inside[\"internal-subset\"].inside = Prism.languages.markup, Prism.hooks.add(\"wrap\", (function (a) { \"entity\" === a.type && (a.attributes.title = a.content.replace(/&amp;/, \"&\")) })), Object.defineProperty(Prism.languages.markup.tag, \"addInlined\", { value: function (a, e) { var s = {}; s[\"language-\" + e] = { pattern: /(^<!\\[CDATA\\[)[\\s\\S]+?(?=\\]\\]>$)/i, lookbehind: !0, inside: Prism.languages[e] }, s.cdata = /^<!\\[CDATA\\[|\\]\\]>$/i; var t = { \"included-cdata\": { pattern: /<!\\[CDATA\\[[\\s\\S]*?\\]\\]>/i, inside: s } }; t[\"language-\" + e] = { pattern: /[\\s\\S]+/, inside: Prism.languages[e] }; var n = {}; n[a] = { pattern: RegExp(\"(<__[^>]*>)(?:<!\\\\[CDATA\\\\[(?:[^\\\\]]|\\\\](?!\\\\]>))*\\\\]\\\\]>|(?!<!\\\\[CDATA\\\\[)[^])*?(?=</__>)\".replace(/__/g, (function () { return a })), \"i\"), lookbehind: !0, greedy: !0, inside: t }, Prism.languages.insertBefore(\"markup\", \"cdata\", n) } }), Object.defineProperty(Prism.languages.markup.tag, \"addAttribute\", { value: function (a, e) { Prism.languages.markup.tag.inside[\"special-attr\"].push({ pattern: RegExp(\"(^|[\\\"'\\\\s])(?:\" + a + \")\\\\s*=\\\\s*(?:\\\"[^\\\"]*\\\"|'[^']*'|[^\\\\s'\\\">=]+(?=[\\\\s>]))\", \"i\"), lookbehind: !0, inside: { \"attr-name\": /^[^\\s=]+/, \"attr-value\": { pattern: /=[\\s\\S]+/, inside: { value: { pattern: /(^=\\s*([\"']|(?![\"'])))\\S[\\s\\S]*(?=\\2$)/, lookbehind: !0, alias: [e, \"language-\" + e], inside: Prism.languages[e] }, punctuation: [{ pattern: /^=/, alias: \"attr-equals\" }, /\"|'/] } } } }) } }), Prism.languages.html = Prism.languages.markup, Prism.languages.mathml = Prism.languages.markup, Prism.languages.svg = Prism.languages.markup, Prism.languages.xml = Prism.languages.extend(\"markup\", {}), Prism.languages.ssml = Prism.languages.xml, Prism.languages.atom = Prism.languages.xml, Prism.languages.rss = Prism.languages.xml;\n!function (s) { var e = /(?:\"(?:\\\\(?:\\r\\n|[\\s\\S])|[^\"\\\\\\r\\n])*\"|'(?:\\\\(?:\\r\\n|[\\s\\S])|[^'\\\\\\r\\n])*')/; s.languages.css = { comment: /\\/\\*[\\s\\S]*?\\*\\//, atrule: { pattern: RegExp(\"@[\\\\w-](?:[^;{\\\\s\\\"']|\\\\s+(?!\\\\s)|\" + e.source + \")*?(?:;|(?=\\\\s*\\\\{))\"), inside: { rule: /^@[\\w-]+/, \"selector-function-argument\": { pattern: /(\\bselector\\s*\\(\\s*(?![\\s)]))(?:[^()\\s]|\\s+(?![\\s)])|\\((?:[^()]|\\([^()]*\\))*\\))+(?=\\s*\\))/, lookbehind: !0, alias: \"selector\" }, keyword: { pattern: /(^|[^\\w-])(?:and|not|only|or)(?![\\w-])/, lookbehind: !0 } } }, url: { pattern: RegExp(\"\\\\burl\\\\((?:\" + e.source + \"|(?:[^\\\\\\\\\\r\\n()\\\"']|\\\\\\\\[^])*)\\\\)\", \"i\"), greedy: !0, inside: { function: /^url/i, punctuation: /^\\(|\\)$/, string: { pattern: RegExp(\"^\" + e.source + \"$\"), alias: \"url\" } } }, selector: { pattern: RegExp(\"(^|[{}\\\\s])[^{}\\\\s](?:[^{};\\\"'\\\\s]|\\\\s+(?![\\\\s{])|\" + e.source + \")*(?=\\\\s*\\\\{)\"), lookbehind: !0 }, string: { pattern: e, greedy: !0 }, property: { pattern: /(^|[^-\\w\\xA0-\\uFFFF])(?!\\s)[-_a-z\\xA0-\\uFFFF](?:(?!\\s)[-\\w\\xA0-\\uFFFF])*(?=\\s*:)/i, lookbehind: !0 }, important: /!important\\b/i, function: { pattern: /(^|[^-a-z0-9])[-a-z0-9]+(?=\\()/i, lookbehind: !0 }, punctuation: /[(){};:,]/ }, s.languages.css.atrule.inside.rest = s.languages.css; var t = s.languages.markup; t && (t.tag.addInlined(\"style\", \"css\"), t.tag.addAttribute(\"style\", \"css\")) }(Prism);\nPrism.languages.clike = { comment: [{ pattern: /(^|[^\\\\])\\/\\*[\\s\\S]*?(?:\\*\\/|$)/, lookbehind: !0, greedy: !0 }, { pattern: /(^|[^\\\\:])\\/\\/.*/, lookbehind: !0, greedy: !0 }], string: { pattern: /([\"'])(?:\\\\(?:\\r\\n|[\\s\\S])|(?!\\1)[^\\\\\\r\\n])*\\1/, greedy: !0 }, \"class-name\": { pattern: /(\\b(?:class|extends|implements|instanceof|interface|new|trait)\\s+|\\bcatch\\s+\\()[\\w.\\\\]+/i, lookbehind: !0, inside: { punctuation: /[.\\\\]/ } }, keyword: /\\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\\b/, boolean: /\\b(?:false|true)\\b/, function: /\\b\\w+(?=\\()/, number: /\\b0x[\\da-f]+\\b|(?:\\b\\d+(?:\\.\\d*)?|\\B\\.\\d+)(?:e[+-]?\\d+)?/i, operator: /[<>]=?|[!=]=?=?|--?|\\+\\+?|&&?|\\|\\|?|[?*/~^%]/, punctuation: /[{}[\\];(),.:]/ };\nPrism.languages.javascript = Prism.languages.extend(\"clike\", { \"class-name\": [Prism.languages.clike[\"class-name\"], { pattern: /(^|[^$\\w\\xA0-\\uFFFF])(?!\\s)[_$A-Z\\xA0-\\uFFFF](?:(?!\\s)[$\\w\\xA0-\\uFFFF])*(?=\\.(?:constructor|prototype))/, lookbehind: !0 }], keyword: [{ pattern: /((?:^|\\})\\s*)catch\\b/, lookbehind: !0 }, { pattern: /(^|[^.]|\\.\\.\\.\\s*)\\b(?:as|assert(?=\\s*\\{)|async(?=\\s*(?:function\\b|\\(|[$\\w\\xA0-\\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\\s*(?:\\{|$))|for|from(?=\\s*(?:['\"]|$))|function|(?:get|set)(?=\\s*(?:[#\\[$\\w\\xA0-\\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\\b/, lookbehind: !0 }], function: /#?(?!\\s)[_$a-zA-Z\\xA0-\\uFFFF](?:(?!\\s)[$\\w\\xA0-\\uFFFF])*(?=\\s*(?:\\.\\s*(?:apply|bind|call)\\s*)?\\()/, number: { pattern: RegExp(\"(^|[^\\\\w$])(?:NaN|Infinity|0[bB][01]+(?:_[01]+)*n?|0[oO][0-7]+(?:_[0-7]+)*n?|0[xX][\\\\dA-Fa-f]+(?:_[\\\\dA-Fa-f]+)*n?|\\\\d+(?:_\\\\d+)*n|(?:\\\\d+(?:_\\\\d+)*(?:\\\\.(?:\\\\d+(?:_\\\\d+)*)?)?|\\\\.\\\\d+(?:_\\\\d+)*)(?:[Ee][+-]?\\\\d+(?:_\\\\d+)*)?)(?![\\\\w$])\"), lookbehind: !0 }, operator: /--|\\+\\+|\\*\\*=?|=>|&&=?|\\|\\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\\.{3}|\\?\\?=?|\\?\\.?|[~:]/ }), Prism.languages.javascript[\"class-name\"][0].pattern = /(\\b(?:class|extends|implements|instanceof|interface|new)\\s+)[\\w.\\\\]+/, Prism.languages.insertBefore(\"javascript\", \"keyword\", { regex: { pattern: RegExp(\"((?:^|[^$\\\\w\\\\xA0-\\\\uFFFF.\\\"'\\\\])\\\\s]|\\\\b(?:return|yield))\\\\s*)/(?:(?:\\\\[(?:[^\\\\]\\\\\\\\\\r\\n]|\\\\\\\\.)*\\\\]|\\\\\\\\.|[^/\\\\\\\\\\\\[\\r\\n])+/[dgimyus]{0,7}|(?:\\\\[(?:[^[\\\\]\\\\\\\\\\r\\n]|\\\\\\\\.|\\\\[(?:[^[\\\\]\\\\\\\\\\r\\n]|\\\\\\\\.|\\\\[(?:[^[\\\\]\\\\\\\\\\r\\n]|\\\\\\\\.)*\\\\])*\\\\])*\\\\]|\\\\\\\\.|[^/\\\\\\\\\\\\[\\r\\n])+/[dgimyus]{0,7}v[dgimyus]{0,7})(?=(?:\\\\s|/\\\\*(?:[^*]|\\\\*(?!/))*\\\\*/)*(?:$|[\\r\\n,.;:})\\\\]]|//))\"), lookbehind: !0, greedy: !0, inside: { \"regex-source\": { pattern: /^(\\/)[\\s\\S]+(?=\\/[a-z]*$)/, lookbehind: !0, alias: \"language-regex\", inside: Prism.languages.regex }, \"regex-delimiter\": /^\\/|\\/$/, \"regex-flags\": /^[a-z]+$/ } }, \"function-variable\": { pattern: /#?(?!\\s)[_$a-zA-Z\\xA0-\\uFFFF](?:(?!\\s)[$\\w\\xA0-\\uFFFF])*(?=\\s*[=:]\\s*(?:async\\s*)?(?:\\bfunction\\b|(?:\\((?:[^()]|\\([^()]*\\))*\\)|(?!\\s)[_$a-zA-Z\\xA0-\\uFFFF](?:(?!\\s)[$\\w\\xA0-\\uFFFF])*)\\s*=>))/, alias: \"function\" }, parameter: [{ pattern: /(function(?:\\s+(?!\\s)[_$a-zA-Z\\xA0-\\uFFFF](?:(?!\\s)[$\\w\\xA0-\\uFFFF])*)?\\s*\\(\\s*)(?!\\s)(?:[^()\\s]|\\s+(?![\\s)])|\\([^()]*\\))+(?=\\s*\\))/, lookbehind: !0, inside: Prism.languages.javascript }, { pattern: /(^|[^$\\w\\xA0-\\uFFFF])(?!\\s)[_$a-z\\xA0-\\uFFFF](?:(?!\\s)[$\\w\\xA0-\\uFFFF])*(?=\\s*=>)/i, lookbehind: !0, inside: Prism.languages.javascript }, { pattern: /(\\(\\s*)(?!\\s)(?:[^()\\s]|\\s+(?![\\s)])|\\([^()]*\\))+(?=\\s*\\)\\s*=>)/, lookbehind: !0, inside: Prism.languages.javascript }, { pattern: /((?:\\b|\\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\\w\\xA0-\\uFFFF]))(?:(?!\\s)[_$a-zA-Z\\xA0-\\uFFFF](?:(?!\\s)[$\\w\\xA0-\\uFFFF])*\\s*)\\(\\s*|\\]\\s*\\(\\s*)(?!\\s)(?:[^()\\s]|\\s+(?![\\s)])|\\([^()]*\\))+(?=\\s*\\)\\s*\\{)/, lookbehind: !0, inside: Prism.languages.javascript }], constant: /\\b[A-Z](?:[A-Z_]|\\dx?)*\\b/ }), Prism.languages.insertBefore(\"javascript\", \"string\", { hashbang: { pattern: /^#!.*/, greedy: !0, alias: \"comment\" }, \"template-string\": { pattern: /`(?:\\\\[\\s\\S]|\\$\\{(?:[^{}]|\\{(?:[^{}]|\\{[^}]*\\})*\\})+\\}|(?!\\$\\{)[^\\\\`])*`/, greedy: !0, inside: { \"template-punctuation\": { pattern: /^`|`$/, alias: \"string\" }, interpolation: { pattern: /((?:^|[^\\\\])(?:\\\\{2})*)\\$\\{(?:[^{}]|\\{(?:[^{}]|\\{[^}]*\\})*\\})+\\}/, lookbehind: !0, inside: { \"interpolation-punctuation\": { pattern: /^\\$\\{|\\}$/, alias: \"punctuation\" }, rest: Prism.languages.javascript } }, string: /[\\s\\S]+/ } }, \"string-property\": { pattern: /((?:^|[,{])[ \\t]*)([\"'])(?:\\\\(?:\\r\\n|[\\s\\S])|(?!\\2)[^\\\\\\r\\n])*\\2(?=\\s*:)/m, lookbehind: !0, greedy: !0, alias: \"property\" } }), Prism.languages.insertBefore(\"javascript\", \"operator\", { \"literal-property\": { pattern: /((?:^|[,{])[ \\t]*)(?!\\s)[_$a-zA-Z\\xA0-\\uFFFF](?:(?!\\s)[$\\w\\xA0-\\uFFFF])*(?=\\s*:)/m, lookbehind: !0, alias: \"property\" } }), Prism.languages.markup && (Prism.languages.markup.tag.addInlined(\"script\", \"javascript\"), Prism.languages.markup.tag.addAttribute(\"on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)\", \"javascript\")), Prism.languages.js = Prism.languages.javascript;\n!function (e) { var t = \"\\\\b(?:BASH|BASHOPTS|BASH_ALIASES|BASH_ARGC|BASH_ARGV|BASH_CMDS|BASH_COMPLETION_COMPAT_DIR|BASH_LINENO|BASH_REMATCH|BASH_SOURCE|BASH_VERSINFO|BASH_VERSION|COLORTERM|COLUMNS|COMP_WORDBREAKS|DBUS_SESSION_BUS_ADDRESS|DEFAULTS_PATH|DESKTOP_SESSION|DIRSTACK|DISPLAY|EUID|GDMSESSION|GDM_LANG|GNOME_KEYRING_CONTROL|GNOME_KEYRING_PID|GPG_AGENT_INFO|GROUPS|HISTCONTROL|HISTFILE|HISTFILESIZE|HISTSIZE|HOME|HOSTNAME|HOSTTYPE|IFS|INSTANCE|JOB|LANG|LANGUAGE|LC_ADDRESS|LC_ALL|LC_IDENTIFICATION|LC_MEASUREMENT|LC_MONETARY|LC_NAME|LC_NUMERIC|LC_PAPER|LC_TELEPHONE|LC_TIME|LESSCLOSE|LESSOPEN|LINES|LOGNAME|LS_COLORS|MACHTYPE|MAILCHECK|MANDATORY_PATH|NO_AT_BRIDGE|OLDPWD|OPTERR|OPTIND|ORBIT_SOCKETDIR|OSTYPE|PAPERSIZE|PATH|PIPESTATUS|PPID|PS1|PS2|PS3|PS4|PWD|RANDOM|REPLY|SECONDS|SELINUX_INIT|SESSION|SESSIONTYPE|SESSION_MANAGER|SHELL|SHELLOPTS|SHLVL|SSH_AUTH_SOCK|TERM|UID|UPSTART_EVENTS|UPSTART_INSTANCE|UPSTART_JOB|UPSTART_SESSION|USER|WINDOWID|XAUTHORITY|XDG_CONFIG_DIRS|XDG_CURRENT_DESKTOP|XDG_DATA_DIRS|XDG_GREETER_DATA_DIR|XDG_MENU_PREFIX|XDG_RUNTIME_DIR|XDG_SEAT|XDG_SEAT_PATH|XDG_SESSION_DESKTOP|XDG_SESSION_ID|XDG_SESSION_PATH|XDG_SESSION_TYPE|XDG_VTNR|XMODIFIERS)\\\\b\", n = { pattern: /(^([\"']?)\\w+\\2)[ \\t]+\\S.*/, lookbehind: !0, alias: \"punctuation\", inside: null }, a = { bash: n, environment: { pattern: RegExp(\"\\\\$\" + t), alias: \"constant\" }, variable: [{ pattern: /\\$?\\(\\([\\s\\S]+?\\)\\)/, greedy: !0, inside: { variable: [{ pattern: /(^\\$\\(\\([\\s\\S]+)\\)\\)/, lookbehind: !0 }, /^\\$\\(\\(/], number: /\\b0x[\\dA-Fa-f]+\\b|(?:\\b\\d+(?:\\.\\d*)?|\\B\\.\\d+)(?:[Ee]-?\\d+)?/, operator: /--|\\+\\+|\\*\\*=?|<<=?|>>=?|&&|\\|\\||[=!+\\-*/%<>^&|]=?|[?~:]/, punctuation: /\\(\\(?|\\)\\)?|,|;/ } }, { pattern: /\\$\\((?:\\([^)]+\\)|[^()])+\\)|`[^`]+`/, greedy: !0, inside: { variable: /^\\$\\(|^`|\\)$|`$/ } }, { pattern: /\\$\\{[^}]+\\}/, greedy: !0, inside: { operator: /:[-=?+]?|[!\\/]|##?|%%?|\\^\\^?|,,?/, punctuation: /[\\[\\]]/, environment: { pattern: RegExp(\"(\\\\{)\" + t), lookbehind: !0, alias: \"constant\" } } }, /\\$(?:\\w+|[#?*!@$])/], entity: /\\\\(?:[abceEfnrtv\\\\\"]|O?[0-7]{1,3}|U[0-9a-fA-F]{8}|u[0-9a-fA-F]{4}|x[0-9a-fA-F]{1,2})/ }; e.languages.bash = { shebang: { pattern: /^#!\\s*\\/.*/, alias: \"important\" }, comment: { pattern: /(^|[^\"{\\\\$])#.*/, lookbehind: !0 }, \"function-name\": [{ pattern: /(\\bfunction\\s+)[\\w-]+(?=(?:\\s*\\(?:\\s*\\))?\\s*\\{)/, lookbehind: !0, alias: \"function\" }, { pattern: /\\b[\\w-]+(?=\\s*\\(\\s*\\)\\s*\\{)/, alias: \"function\" }], \"for-or-select\": { pattern: /(\\b(?:for|select)\\s+)\\w+(?=\\s+in\\s)/, alias: \"variable\", lookbehind: !0 }, \"assign-left\": { pattern: /(^|[\\s;|&]|[<>]\\()\\w+(?:\\.\\w+)*(?=\\+?=)/, inside: { environment: { pattern: RegExp(\"(^|[\\\\s;|&]|[<>]\\\\()\" + t), lookbehind: !0, alias: \"constant\" } }, alias: \"variable\", lookbehind: !0 }, parameter: { pattern: /(^|\\s)-{1,2}(?:\\w+:[+-]?)?\\w+(?:\\.\\w+)*(?=[=\\s]|$)/, alias: \"variable\", lookbehind: !0 }, string: [{ pattern: /((?:^|[^<])<<-?\\s*)(\\w+)\\s[\\s\\S]*?(?:\\r?\\n|\\r)\\2/, lookbehind: !0, greedy: !0, inside: a }, { pattern: /((?:^|[^<])<<-?\\s*)([\"'])(\\w+)\\2\\s[\\s\\S]*?(?:\\r?\\n|\\r)\\3/, lookbehind: !0, greedy: !0, inside: { bash: n } }, { pattern: /(^|[^\\\\](?:\\\\\\\\)*)\"(?:\\\\[\\s\\S]|\\$\\([^)]+\\)|\\$(?!\\()|`[^`]+`|[^\"\\\\`$])*\"/, lookbehind: !0, greedy: !0, inside: a }, { pattern: /(^|[^$\\\\])'[^']*'/, lookbehind: !0, greedy: !0 }, { pattern: /\\$'(?:[^'\\\\]|\\\\[\\s\\S])*'/, greedy: !0, inside: { entity: a.entity } }], environment: { pattern: RegExp(\"\\\\$?\" + t), alias: \"constant\" }, variable: a.variable, function: { pattern: /(^|[\\s;|&]|[<>]\\()(?:add|apropos|apt|apt-cache|apt-get|aptitude|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|bzip2|cal|cargo|cat|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|column|comm|composer|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|docker|docker-compose|du|egrep|eject|env|ethtool|expand|expect|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|head|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|java|jobs|join|kill|killall|less|link|ln|locate|logname|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|node|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|pnpm|podman|podman-compose|popd|pr|printcap|printenv|ps|pushd|pv|quota|quotacheck|quotactl|ram|rar|rcp|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|sh|shellcheck|shuf|shutdown|sleep|slocate|sort|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|sysctl|tac|tail|tar|tee|time|timeout|top|touch|tr|traceroute|tsort|tty|umount|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|v|vcpkg|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zenity|zip|zsh|zypper)(?=$|[)\\s;|&])/, lookbehind: !0 }, keyword: { pattern: /(^|[\\s;|&]|[<>]\\()(?:case|do|done|elif|else|esac|fi|for|function|if|in|select|then|until|while)(?=$|[)\\s;|&])/, lookbehind: !0 }, builtin: { pattern: /(^|[\\s;|&]|[<>]\\()(?:\\.|:|alias|bind|break|builtin|caller|cd|command|continue|declare|echo|enable|eval|exec|exit|export|getopts|hash|help|let|local|logout|mapfile|printf|pwd|read|readarray|readonly|return|set|shift|shopt|source|test|times|trap|type|typeset|ulimit|umask|unalias|unset)(?=$|[)\\s;|&])/, lookbehind: !0, alias: \"class-name\" }, boolean: { pattern: /(^|[\\s;|&]|[<>]\\()(?:false|true)(?=$|[)\\s;|&])/, lookbehind: !0 }, \"file-descriptor\": { pattern: /\\B&\\d\\b/, alias: \"important\" }, operator: { pattern: /\\d?<>|>\\||\\+=|=[=~]?|!=?|<<[<-]?|[&\\d]?>>|\\d[<>]&?|[<>][&=]?|&[>&]?|\\|[&|]?/, inside: { \"file-descriptor\": { pattern: /^\\d/, alias: \"important\" } } }, punctuation: /\\$?\\(\\(?|\\)\\)?|\\.\\.|[{}[\\];\\\\]/, number: { pattern: /(^|\\s)(?:[1-9]\\d*|0)(?:[.,]\\d+)?\\b/, lookbehind: !0 } }, n.inside = e.languages.bash; for (var s = [\"comment\", \"function-name\", \"for-or-select\", \"assign-left\", \"parameter\", \"string\", \"environment\", \"function\", \"keyword\", \"builtin\", \"boolean\", \"file-descriptor\", \"operator\", \"punctuation\", \"number\"], o = a.variable[1].inside, i = 0; i < s.length; i++)o[s[i]] = e.languages.bash[s[i]]; e.languages.shell = e.languages.bash }(Prism);\n!function (e) { var a = [/\\b(?:async|sync|yield)\\*/, /\\b(?:abstract|assert|async|await|break|case|catch|class|const|continue|covariant|default|deferred|do|dynamic|else|enum|export|extends|extension|external|factory|final|finally|for|get|hide|if|implements|import|in|interface|library|mixin|new|null|on|operator|part|rethrow|return|set|show|static|super|switch|sync|this|throw|try|typedef|var|void|while|with|yield)\\b/], n = \"(^|[^\\\\w.])(?:[a-z]\\\\w*\\\\s*\\\\.\\\\s*)*(?:[A-Z]\\\\w*\\\\s*\\\\.\\\\s*)*\", s = { pattern: RegExp(n + \"[A-Z](?:[\\\\d_A-Z]*[a-z]\\\\w*)?\\\\b\"), lookbehind: !0, inside: { namespace: { pattern: /^[a-z]\\w*(?:\\s*\\.\\s*[a-z]\\w*)*(?:\\s*\\.)?/, inside: { punctuation: /\\./ } } } }; e.languages.dart = e.languages.extend(\"clike\", { \"class-name\": [s, { pattern: RegExp(n + \"[A-Z]\\\\w*(?=\\\\s+\\\\w+\\\\s*[;,=()])\"), lookbehind: !0, inside: s.inside }], keyword: a, operator: /\\bis!|\\b(?:as|is)\\b|\\+\\+|--|&&|\\|\\||<<=?|>>=?|~(?:\\/=?)?|[+\\-*\\/%&^|=!<>]=?|\\?/ }), e.languages.insertBefore(\"dart\", \"string\", { \"string-literal\": { pattern: /r?(?:(\"\"\"|''')[\\s\\S]*?\\1|([\"'])(?:\\\\.|(?!\\2)[^\\\\\\r\\n])*\\2(?!\\2))/, greedy: !0, inside: { interpolation: { pattern: /((?:^|[^\\\\])(?:\\\\{2})*)\\$(?:\\w+|\\{(?:[^{}]|\\{[^{}]*\\})*\\})/, lookbehind: !0, inside: { punctuation: /^\\$\\{?|\\}$/, expression: { pattern: /[\\s\\S]+/, inside: e.languages.dart } } }, string: /[\\s\\S]+/ } }, string: void 0 }), e.languages.insertBefore(\"dart\", \"class-name\", { metadata: { pattern: /@\\w+/, alias: \"function\" } }), e.languages.insertBefore(\"dart\", \"class-name\", { generics: { pattern: /<(?:[\\w\\s,.&?]|<(?:[\\w\\s,.&?]|<(?:[\\w\\s,.&?]|<[\\w\\s,.&?]*>)*>)*>)*>/, inside: { \"class-name\": s, keyword: a, punctuation: /[<>(),.:]/, operator: /[?&|]/ } } }) }(Prism);\nPrism.languages.go = Prism.languages.extend(\"clike\", { string: { pattern: /(^|[^\\\\])\"(?:\\\\.|[^\"\\\\\\r\\n])*\"|`[^`]*`/, lookbehind: !0, greedy: !0 }, keyword: /\\b(?:break|case|chan|const|continue|default|defer|else|fallthrough|for|func|go(?:to)?|if|import|interface|map|package|range|return|select|struct|switch|type|var)\\b/, boolean: /\\b(?:_|false|iota|nil|true)\\b/, number: [/\\b0(?:b[01_]+|o[0-7_]+)i?\\b/i, /\\b0x(?:[a-f\\d_]+(?:\\.[a-f\\d_]*)?|\\.[a-f\\d_]+)(?:p[+-]?\\d+(?:_\\d+)*)?i?(?!\\w)/i, /(?:\\b\\d[\\d_]*(?:\\.[\\d_]*)?|\\B\\.\\d[\\d_]*)(?:e[+-]?[\\d_]+)?i?(?!\\w)/i], operator: /[*\\/%^!=]=?|\\+[=+]?|-[=-]?|\\|[=|]?|&(?:=|&|\\^=?)?|>(?:>=?|=)?|<(?:<=?|=|-)?|:=|\\.\\.\\./, builtin: /\\b(?:append|bool|byte|cap|close|complex|complex(?:64|128)|copy|delete|error|float(?:32|64)|u?int(?:8|16|32|64)?|imag|len|make|new|panic|print(?:ln)?|real|recover|rune|string|uintptr)\\b/ }), Prism.languages.insertBefore(\"go\", \"string\", { char: { pattern: /'(?:\\\\.|[^'\\\\\\r\\n]){0,10}'/, greedy: !0 } }), delete Prism.languages.go[\"class-name\"];\n!function (e) { var n = /\\b(?:abstract|assert|boolean|break|byte|case|catch|char|class|const|continue|default|do|double|else|enum|exports|extends|final|finally|float|for|goto|if|implements|import|instanceof|int|interface|long|module|native|new|non-sealed|null|open|opens|package|permits|private|protected|provides|public|record(?!\\s*[(){}[\\]<>=%~.:,;?+\\-*/&|^])|requires|return|sealed|short|static|strictfp|super|switch|synchronized|this|throw|throws|to|transient|transitive|try|uses|var|void|volatile|while|with|yield)\\b/, t = \"(?:[a-z]\\\\w*\\\\s*\\\\.\\\\s*)*(?:[A-Z]\\\\w*\\\\s*\\\\.\\\\s*)*\", s = { pattern: RegExp(\"(^|[^\\\\w.])\" + t + \"[A-Z](?:[\\\\d_A-Z]*[a-z]\\\\w*)?\\\\b\"), lookbehind: !0, inside: { namespace: { pattern: /^[a-z]\\w*(?:\\s*\\.\\s*[a-z]\\w*)*(?:\\s*\\.)?/, inside: { punctuation: /\\./ } }, punctuation: /\\./ } }; e.languages.java = e.languages.extend(\"clike\", { string: { pattern: /(^|[^\\\\])\"(?:\\\\.|[^\"\\\\\\r\\n])*\"/, lookbehind: !0, greedy: !0 }, \"class-name\": [s, { pattern: RegExp(\"(^|[^\\\\w.])\" + t + \"[A-Z]\\\\w*(?=\\\\s+\\\\w+\\\\s*[;,=()]|\\\\s*(?:\\\\[[\\\\s,]*\\\\]\\\\s*)?::\\\\s*new\\\\b)\"), lookbehind: !0, inside: s.inside }, { pattern: RegExp(\"(\\\\b(?:class|enum|extends|implements|instanceof|interface|new|record|throws)\\\\s+)\" + t + \"[A-Z]\\\\w*\\\\b\"), lookbehind: !0, inside: s.inside }], keyword: n, function: [e.languages.clike.function, { pattern: /(::\\s*)[a-z_]\\w*/, lookbehind: !0 }], number: /\\b0b[01][01_]*L?\\b|\\b0x(?:\\.[\\da-f_p+-]+|[\\da-f_]+(?:\\.[\\da-f_p+-]+)?)\\b|(?:\\b\\d[\\d_]*(?:\\.[\\d_]*)?|\\B\\.\\d[\\d_]*)(?:e[+-]?\\d[\\d_]*)?[dfl]?/i, operator: { pattern: /(^|[^.])(?:<<=?|>>>?=?|->|--|\\+\\+|&&|\\|\\||::|[?:~]|[-+*/%&|^!=<>]=?)/m, lookbehind: !0 }, constant: /\\b[A-Z][A-Z_\\d]+\\b/ }), e.languages.insertBefore(\"java\", \"string\", { \"triple-quoted-string\": { pattern: /\"\"\"[ \\t]*[\\r\\n](?:(?:\"|\"\")?(?:\\\\.|[^\"\\\\]))*\"\"\"/, greedy: !0, alias: \"string\" }, char: { pattern: /'(?:\\\\.|[^'\\\\\\r\\n]){1,6}'/, greedy: !0 } }), e.languages.insertBefore(\"java\", \"class-name\", { annotation: { pattern: /(^|[^.])@\\w+(?:\\s*\\.\\s*\\w+)*/, lookbehind: !0, alias: \"punctuation\" }, generics: { pattern: /<(?:[\\w\\s,.?]|&(?!&)|<(?:[\\w\\s,.?]|&(?!&)|<(?:[\\w\\s,.?]|&(?!&)|<(?:[\\w\\s,.?]|&(?!&))*>)*>)*>)*>/, inside: { \"class-name\": s, keyword: n, punctuation: /[<>(),.:]/, operator: /[?&|]/ } }, import: [{ pattern: RegExp(\"(\\\\bimport\\\\s+)\" + t + \"(?:[A-Z]\\\\w*|\\\\*)(?=\\\\s*;)\"), lookbehind: !0, inside: { namespace: s.inside.namespace, punctuation: /\\./, operator: /\\*/, \"class-name\": /\\w+/ } }, { pattern: RegExp(\"(\\\\bimport\\\\s+static\\\\s+)\" + t + \"(?:\\\\w+|\\\\*)(?=\\\\s*;)\"), lookbehind: !0, alias: \"static\", inside: { namespace: s.inside.namespace, static: /\\b\\w+$/, punctuation: /\\./, operator: /\\*/, \"class-name\": /\\w+/ } }], namespace: { pattern: RegExp(\"(\\\\b(?:exports|import(?:\\\\s+static)?|module|open|opens|package|provides|requires|to|transitive|uses|with)\\\\s+)(?!<keyword>)[a-z]\\\\w*(?:\\\\.[a-z]\\\\w*)*\\\\.?\".replace(/<keyword>/g, (function () { return n.source }))), lookbehind: !0, inside: { punctuation: /\\./ } } }) }(Prism);\n!function (n) { n.languages.kotlin = n.languages.extend(\"clike\", { keyword: { pattern: /(^|[^.])\\b(?:abstract|actual|annotation|as|break|by|catch|class|companion|const|constructor|continue|crossinline|data|do|dynamic|else|enum|expect|external|final|finally|for|fun|get|if|import|in|infix|init|inline|inner|interface|internal|is|lateinit|noinline|null|object|open|operator|out|override|package|private|protected|public|reified|return|sealed|set|super|suspend|tailrec|this|throw|to|try|typealias|val|var|vararg|when|where|while)\\b/, lookbehind: !0 }, function: [{ pattern: /(?:`[^\\r\\n`]+`|\\b\\w+)(?=\\s*\\()/, greedy: !0 }, { pattern: /(\\.)(?:`[^\\r\\n`]+`|\\w+)(?=\\s*\\{)/, lookbehind: !0, greedy: !0 }], number: /\\b(?:0[xX][\\da-fA-F]+(?:_[\\da-fA-F]+)*|0[bB][01]+(?:_[01]+)*|\\d+(?:_\\d+)*(?:\\.\\d+(?:_\\d+)*)?(?:[eE][+-]?\\d+(?:_\\d+)*)?[fFL]?)\\b/, operator: /\\+[+=]?|-[-=>]?|==?=?|!(?:!|==?)?|[\\/*%<>]=?|[?:]:?|\\.\\.|&&|\\|\\||\\b(?:and|inv|or|shl|shr|ushr|xor)\\b/ }), delete n.languages.kotlin[\"class-name\"]; var e = { \"interpolation-punctuation\": { pattern: /^\\$\\{?|\\}$/, alias: \"punctuation\" }, expression: { pattern: /[\\s\\S]+/, inside: n.languages.kotlin } }; n.languages.insertBefore(\"kotlin\", \"string\", { \"string-literal\": [{ pattern: /\"\"\"(?:[^$]|\\$(?:(?!\\{)|\\{[^{}]*\\}))*?\"\"\"/, alias: \"multiline\", inside: { interpolation: { pattern: /\\$(?:[a-z_]\\w*|\\{[^{}]*\\})/i, inside: e }, string: /[\\s\\S]+/ } }, { pattern: /\"(?:[^\"\\\\\\r\\n$]|\\\\.|\\$(?:(?!\\{)|\\{[^{}]*\\}))*\"/, alias: \"singleline\", inside: { interpolation: { pattern: /((?:^|[^\\\\])(?:\\\\{2})*)\\$(?:[a-z_]\\w*|\\{[^{}]*\\})/i, lookbehind: !0, inside: e }, string: /[\\s\\S]+/ } }], char: { pattern: /'(?:[^'\\\\\\r\\n]|\\\\(?:.|u[a-fA-F0-9]{0,4}))'/, greedy: !0 } }), delete n.languages.kotlin.string, n.languages.insertBefore(\"kotlin\", \"keyword\", { annotation: { pattern: /\\B@(?:\\w+:)?(?:[A-Z]\\w*|\\[[^\\]]+\\])/, alias: \"builtin\" } }), n.languages.insertBefore(\"kotlin\", \"function\", { label: { pattern: /\\b\\w+@|@\\w+\\b/, alias: \"symbol\" } }), n.languages.kt = n.languages.kotlin, n.languages.kts = n.languages.kotlin }(Prism);\n!function (a) { var e = /\\\\(?:[^a-z()[\\]]|[a-z*]+)/i, n = { \"equation-command\": { pattern: e, alias: \"regex\" } }; a.languages.latex = { comment: /%.*/, cdata: { pattern: /(\\\\begin\\{((?:lstlisting|verbatim)\\*?)\\})[\\s\\S]*?(?=\\\\end\\{\\2\\})/, lookbehind: !0 }, equation: [{ pattern: /\\$\\$(?:\\\\[\\s\\S]|[^\\\\$])+\\$\\$|\\$(?:\\\\[\\s\\S]|[^\\\\$])+\\$|\\\\\\([\\s\\S]*?\\\\\\)|\\\\\\[[\\s\\S]*?\\\\\\]/, inside: n, alias: \"string\" }, { pattern: /(\\\\begin\\{((?:align|eqnarray|equation|gather|math|multline)\\*?)\\})[\\s\\S]*?(?=\\\\end\\{\\2\\})/, lookbehind: !0, inside: n, alias: \"string\" }], keyword: { pattern: /(\\\\(?:begin|cite|documentclass|end|label|ref|usepackage)(?:\\[[^\\]]+\\])?\\{)[^}]+(?=\\})/, lookbehind: !0 }, url: { pattern: /(\\\\url\\{)[^}]+(?=\\})/, lookbehind: !0 }, headline: { pattern: /(\\\\(?:chapter|frametitle|paragraph|part|section|subparagraph|subsection|subsubparagraph|subsubsection|subsubsubparagraph)\\*?(?:\\[[^\\]]+\\])?\\{)[^}]+(?=\\})/, lookbehind: !0, alias: \"class-name\" }, function: { pattern: e, alias: \"selector\" }, punctuation: /[[\\]{}&]/ }, a.languages.tex = a.languages.latex, a.languages.context = a.languages.latex }(Prism);\n!function (e) { function n(e, n) { return \"___\" + e.toUpperCase() + n + \"___\" } Object.defineProperties(e.languages[\"markup-templating\"] = {}, { buildPlaceholders: { value: function (t, a, r, o) { if (t.language === a) { var c = t.tokenStack = []; t.code = t.code.replace(r, (function (e) { if (\"function\" == typeof o && !o(e)) return e; for (var r, i = c.length; -1 !== t.code.indexOf(r = n(a, i));)++i; return c[i] = e, r })), t.grammar = e.languages.markup } } }, tokenizePlaceholders: { value: function (t, a) { if (t.language === a && t.tokenStack) { t.grammar = e.languages[a]; var r = 0, o = Object.keys(t.tokenStack); !function c(i) { for (var u = 0; u < i.length && !(r >= o.length); u++) { var g = i[u]; if (\"string\" == typeof g || g.content && \"string\" == typeof g.content) { var l = o[r], s = t.tokenStack[l], f = \"string\" == typeof g ? g : g.content, p = n(a, l), k = f.indexOf(p); if (k > -1) { ++r; var m = f.substring(0, k), d = new e.Token(a, e.tokenize(s, t.grammar), \"language-\" + a, s), h = f.substring(k + p.length), v = []; m && v.push.apply(v, c([m])), v.push(d), h && v.push.apply(v, c([h])), \"string\" == typeof g ? i.splice.apply(i, [u, 1].concat(v)) : g.content = v } } else g.content && c(g.content) } return i }(t.tokens) } } } }) }(Prism);\nPrism.languages.matlab = { comment: [/%\\{[\\s\\S]*?\\}%/, /%.+/], string: { pattern: /\\B'(?:''|[^'\\r\\n])*'/, greedy: !0 }, number: /(?:\\b\\d+(?:\\.\\d*)?|\\B\\.\\d+)(?:[eE][+-]?\\d+)?(?:[ij])?|\\b[ij]\\b/, keyword: /\\b(?:NaN|break|case|catch|continue|else|elseif|end|for|function|if|inf|otherwise|parfor|pause|pi|return|switch|try|while)\\b/, function: /\\b(?!\\d)\\w+(?=\\s*\\()/, operator: /\\.?[*^\\/\\\\']|[+\\-:@]|[<>=~]=?|&&?|\\|\\|?/, punctuation: /\\.{3}|[.,;\\[\\](){}!]/ };\n!function ($) { var e = [\"$eq\", \"$gt\", \"$gte\", \"$in\", \"$lt\", \"$lte\", \"$ne\", \"$nin\", \"$and\", \"$not\", \"$nor\", \"$or\", \"$exists\", \"$type\", \"$expr\", \"$jsonSchema\", \"$mod\", \"$regex\", \"$text\", \"$where\", \"$geoIntersects\", \"$geoWithin\", \"$near\", \"$nearSphere\", \"$all\", \"$elemMatch\", \"$size\", \"$bitsAllClear\", \"$bitsAllSet\", \"$bitsAnyClear\", \"$bitsAnySet\", \"$comment\", \"$elemMatch\", \"$meta\", \"$slice\", \"$currentDate\", \"$inc\", \"$min\", \"$max\", \"$mul\", \"$rename\", \"$set\", \"$setOnInsert\", \"$unset\", \"$addToSet\", \"$pop\", \"$pull\", \"$push\", \"$pullAll\", \"$each\", \"$position\", \"$slice\", \"$sort\", \"$bit\", \"$addFields\", \"$bucket\", \"$bucketAuto\", \"$collStats\", \"$count\", \"$currentOp\", \"$facet\", \"$geoNear\", \"$graphLookup\", \"$group\", \"$indexStats\", \"$limit\", \"$listLocalSessions\", \"$listSessions\", \"$lookup\", \"$match\", \"$merge\", \"$out\", \"$planCacheStats\", \"$project\", \"$redact\", \"$replaceRoot\", \"$replaceWith\", \"$sample\", \"$set\", \"$skip\", \"$sort\", \"$sortByCount\", \"$unionWith\", \"$unset\", \"$unwind\", \"$setWindowFields\", \"$abs\", \"$accumulator\", \"$acos\", \"$acosh\", \"$add\", \"$addToSet\", \"$allElementsTrue\", \"$and\", \"$anyElementTrue\", \"$arrayElemAt\", \"$arrayToObject\", \"$asin\", \"$asinh\", \"$atan\", \"$atan2\", \"$atanh\", \"$avg\", \"$binarySize\", \"$bsonSize\", \"$ceil\", \"$cmp\", \"$concat\", \"$concatArrays\", \"$cond\", \"$convert\", \"$cos\", \"$dateFromParts\", \"$dateToParts\", \"$dateFromString\", \"$dateToString\", \"$dayOfMonth\", \"$dayOfWeek\", \"$dayOfYear\", \"$degreesToRadians\", \"$divide\", \"$eq\", \"$exp\", \"$filter\", \"$first\", \"$floor\", \"$function\", \"$gt\", \"$gte\", \"$hour\", \"$ifNull\", \"$in\", \"$indexOfArray\", \"$indexOfBytes\", \"$indexOfCP\", \"$isArray\", \"$isNumber\", \"$isoDayOfWeek\", \"$isoWeek\", \"$isoWeekYear\", \"$last\", \"$last\", \"$let\", \"$literal\", \"$ln\", \"$log\", \"$log10\", \"$lt\", \"$lte\", \"$ltrim\", \"$map\", \"$max\", \"$mergeObjects\", \"$meta\", \"$min\", \"$millisecond\", \"$minute\", \"$mod\", \"$month\", \"$multiply\", \"$ne\", \"$not\", \"$objectToArray\", \"$or\", \"$pow\", \"$push\", \"$radiansToDegrees\", \"$range\", \"$reduce\", \"$regexFind\", \"$regexFindAll\", \"$regexMatch\", \"$replaceOne\", \"$replaceAll\", \"$reverseArray\", \"$round\", \"$rtrim\", \"$second\", \"$setDifference\", \"$setEquals\", \"$setIntersection\", \"$setIsSubset\", \"$setUnion\", \"$size\", \"$sin\", \"$slice\", \"$split\", \"$sqrt\", \"$stdDevPop\", \"$stdDevSamp\", \"$strcasecmp\", \"$strLenBytes\", \"$strLenCP\", \"$substr\", \"$substrBytes\", \"$substrCP\", \"$subtract\", \"$sum\", \"$switch\", \"$tan\", \"$toBool\", \"$toDate\", \"$toDecimal\", \"$toDouble\", \"$toInt\", \"$toLong\", \"$toObjectId\", \"$toString\", \"$toLower\", \"$toUpper\", \"$trim\", \"$trunc\", \"$type\", \"$week\", \"$year\", \"$zip\", \"$count\", \"$dateAdd\", \"$dateDiff\", \"$dateSubtract\", \"$dateTrunc\", \"$getField\", \"$rand\", \"$sampleRate\", \"$setField\", \"$unsetField\", \"$comment\", \"$explain\", \"$hint\", \"$max\", \"$maxTimeMS\", \"$min\", \"$orderby\", \"$query\", \"$returnKey\", \"$showDiskLoc\", \"$natural\"], t = \"(?:\" + (e = e.map((function ($) { return $.replace(\"$\", \"\\\\$\") }))).join(\"|\") + \")\\\\b\"; $.languages.mongodb = $.languages.extend(\"javascript\", {}), $.languages.insertBefore(\"mongodb\", \"string\", { property: { pattern: /(?:([\"'])(?:\\\\(?:\\r\\n|[\\s\\S])|(?!\\1)[^\\\\\\r\\n])*\\1|(?!\\s)[_$a-zA-Z\\xA0-\\uFFFF](?:(?!\\s)[$\\w\\xA0-\\uFFFF])*)(?=\\s*:)/, greedy: !0, inside: { keyword: RegExp(\"^(['\\\"])?\" + t + \"(?:\\\\1)?$\") } } }), $.languages.mongodb.string.inside = { url: { pattern: /https?:\\/\\/[-\\w@:%.+~#=]{1,256}\\.[a-z0-9()]{1,6}\\b[-\\w()@:%+.~#?&/=]*/i, greedy: !0 }, entity: { pattern: /\\b(?:(?:[01]?\\d\\d?|2[0-4]\\d|25[0-5])\\.){3}(?:[01]?\\d\\d?|2[0-4]\\d|25[0-5])\\b/, greedy: !0 } }, $.languages.insertBefore(\"mongodb\", \"constant\", { builtin: { pattern: RegExp(\"\\\\b(?:\" + [\"ObjectId\", \"Code\", \"BinData\", \"DBRef\", \"Timestamp\", \"NumberLong\", \"NumberDecimal\", \"MaxKey\", \"MinKey\", \"RegExp\", \"ISODate\", \"UUID\"].join(\"|\") + \")\\\\b\"), alias: \"keyword\" } }) }(Prism);\n!function (e) { var a = /\\/\\*[\\s\\S]*?\\*\\/|\\/\\/.*|#(?!\\[).*/, t = [{ pattern: /\\b(?:false|true)\\b/i, alias: \"boolean\" }, { pattern: /(::\\s*)\\b[a-z_]\\w*\\b(?!\\s*\\()/i, greedy: !0, lookbehind: !0 }, { pattern: /(\\b(?:case|const)\\s+)\\b[a-z_]\\w*(?=\\s*[;=])/i, greedy: !0, lookbehind: !0 }, /\\b(?:null)\\b/i, /\\b[A-Z_][A-Z0-9_]*\\b(?!\\s*\\()/], i = /\\b0b[01]+(?:_[01]+)*\\b|\\b0o[0-7]+(?:_[0-7]+)*\\b|\\b0x[\\da-f]+(?:_[\\da-f]+)*\\b|(?:\\b\\d+(?:_\\d+)*\\.?(?:\\d+(?:_\\d+)*)?|\\B\\.\\d+)(?:e[+-]?\\d+)?/i, n = /<?=>|\\?\\?=?|\\.{3}|\\??->|[!=]=?=?|::|\\*\\*=?|--|\\+\\+|&&|\\|\\||<<|>>|[?~]|[/^|%*&<>.+-]=?/, s = /[{}\\[\\](),:;]/; e.languages.php = { delimiter: { pattern: /\\?>$|^<\\?(?:php(?=\\s)|=)?/i, alias: \"important\" }, comment: a, variable: /\\$+(?:\\w+\\b|(?=\\{))/, package: { pattern: /(namespace\\s+|use\\s+(?:function\\s+)?)(?:\\\\?\\b[a-z_]\\w*)+\\b(?!\\\\)/i, lookbehind: !0, inside: { punctuation: /\\\\/ } }, \"class-name-definition\": { pattern: /(\\b(?:class|enum|interface|trait)\\s+)\\b[a-z_]\\w*(?!\\\\)\\b/i, lookbehind: !0, alias: \"class-name\" }, \"function-definition\": { pattern: /(\\bfunction\\s+)[a-z_]\\w*(?=\\s*\\()/i, lookbehind: !0, alias: \"function\" }, keyword: [{ pattern: /(\\(\\s*)\\b(?:array|bool|boolean|float|int|integer|object|string)\\b(?=\\s*\\))/i, alias: \"type-casting\", greedy: !0, lookbehind: !0 }, { pattern: /([(,?]\\s*)\\b(?:array(?!\\s*\\()|bool|callable|(?:false|null)(?=\\s*\\|)|float|int|iterable|mixed|object|self|static|string)\\b(?=\\s*\\$)/i, alias: \"type-hint\", greedy: !0, lookbehind: !0 }, { pattern: /(\\)\\s*:\\s*(?:\\?\\s*)?)\\b(?:array(?!\\s*\\()|bool|callable|(?:false|null)(?=\\s*\\|)|float|int|iterable|mixed|never|object|self|static|string|void)\\b/i, alias: \"return-type\", greedy: !0, lookbehind: !0 }, { pattern: /\\b(?:array(?!\\s*\\()|bool|float|int|iterable|mixed|object|string|void)\\b/i, alias: \"type-declaration\", greedy: !0 }, { pattern: /(\\|\\s*)(?:false|null)\\b|\\b(?:false|null)(?=\\s*\\|)/i, alias: \"type-declaration\", greedy: !0, lookbehind: !0 }, { pattern: /\\b(?:parent|self|static)(?=\\s*::)/i, alias: \"static-context\", greedy: !0 }, { pattern: /(\\byield\\s+)from\\b/i, lookbehind: !0 }, /\\bclass\\b/i, { pattern: /((?:^|[^\\s>:]|(?:^|[^-])>|(?:^|[^:]):)\\s*)\\b(?:abstract|and|array|as|break|callable|case|catch|clone|const|continue|declare|default|die|do|echo|else|elseif|empty|enddeclare|endfor|endforeach|endif|endswitch|endwhile|enum|eval|exit|extends|final|finally|fn|for|foreach|function|global|goto|if|implements|include|include_once|instanceof|insteadof|interface|isset|list|match|namespace|never|new|or|parent|print|private|protected|public|readonly|require|require_once|return|self|static|switch|throw|trait|try|unset|use|var|while|xor|yield|__halt_compiler)\\b/i, lookbehind: !0 }], \"argument-name\": { pattern: /([(,]\\s*)\\b[a-z_]\\w*(?=\\s*:(?!:))/i, lookbehind: !0 }, \"class-name\": [{ pattern: /(\\b(?:extends|implements|instanceof|new(?!\\s+self|\\s+static))\\s+|\\bcatch\\s*\\()\\b[a-z_]\\w*(?!\\\\)\\b/i, greedy: !0, lookbehind: !0 }, { pattern: /(\\|\\s*)\\b[a-z_]\\w*(?!\\\\)\\b/i, greedy: !0, lookbehind: !0 }, { pattern: /\\b[a-z_]\\w*(?!\\\\)\\b(?=\\s*\\|)/i, greedy: !0 }, { pattern: /(\\|\\s*)(?:\\\\?\\b[a-z_]\\w*)+\\b/i, alias: \"class-name-fully-qualified\", greedy: !0, lookbehind: !0, inside: { punctuation: /\\\\/ } }, { pattern: /(?:\\\\?\\b[a-z_]\\w*)+\\b(?=\\s*\\|)/i, alias: \"class-name-fully-qualified\", greedy: !0, inside: { punctuation: /\\\\/ } }, { pattern: /(\\b(?:extends|implements|instanceof|new(?!\\s+self\\b|\\s+static\\b))\\s+|\\bcatch\\s*\\()(?:\\\\?\\b[a-z_]\\w*)+\\b(?!\\\\)/i, alias: \"class-name-fully-qualified\", greedy: !0, lookbehind: !0, inside: { punctuation: /\\\\/ } }, { pattern: /\\b[a-z_]\\w*(?=\\s*\\$)/i, alias: \"type-declaration\", greedy: !0 }, { pattern: /(?:\\\\?\\b[a-z_]\\w*)+(?=\\s*\\$)/i, alias: [\"class-name-fully-qualified\", \"type-declaration\"], greedy: !0, inside: { punctuation: /\\\\/ } }, { pattern: /\\b[a-z_]\\w*(?=\\s*::)/i, alias: \"static-context\", greedy: !0 }, { pattern: /(?:\\\\?\\b[a-z_]\\w*)+(?=\\s*::)/i, alias: [\"class-name-fully-qualified\", \"static-context\"], greedy: !0, inside: { punctuation: /\\\\/ } }, { pattern: /([(,?]\\s*)[a-z_]\\w*(?=\\s*\\$)/i, alias: \"type-hint\", greedy: !0, lookbehind: !0 }, { pattern: /([(,?]\\s*)(?:\\\\?\\b[a-z_]\\w*)+(?=\\s*\\$)/i, alias: [\"class-name-fully-qualified\", \"type-hint\"], greedy: !0, lookbehind: !0, inside: { punctuation: /\\\\/ } }, { pattern: /(\\)\\s*:\\s*(?:\\?\\s*)?)\\b[a-z_]\\w*(?!\\\\)\\b/i, alias: \"return-type\", greedy: !0, lookbehind: !0 }, { pattern: /(\\)\\s*:\\s*(?:\\?\\s*)?)(?:\\\\?\\b[a-z_]\\w*)+\\b(?!\\\\)/i, alias: [\"class-name-fully-qualified\", \"return-type\"], greedy: !0, lookbehind: !0, inside: { punctuation: /\\\\/ } }], constant: t, function: { pattern: /(^|[^\\\\\\w])\\\\?[a-z_](?:[\\w\\\\]*\\w)?(?=\\s*\\()/i, lookbehind: !0, inside: { punctuation: /\\\\/ } }, property: { pattern: /(->\\s*)\\w+/, lookbehind: !0 }, number: i, operator: n, punctuation: s }; var l = { pattern: /\\{\\$(?:\\{(?:\\{[^{}]+\\}|[^{}]+)\\}|[^{}])+\\}|(^|[^\\\\{])\\$+(?:\\w+(?:\\[[^\\r\\n\\[\\]]+\\]|->\\w+)?)/, lookbehind: !0, inside: e.languages.php }, r = [{ pattern: /<<<'([^']+)'[\\r\\n](?:.*[\\r\\n])*?\\1;/, alias: \"nowdoc-string\", greedy: !0, inside: { delimiter: { pattern: /^<<<'[^']+'|[a-z_]\\w*;$/i, alias: \"symbol\", inside: { punctuation: /^<<<'?|[';]$/ } } } }, { pattern: /<<<(?:\"([^\"]+)\"[\\r\\n](?:.*[\\r\\n])*?\\1;|([a-z_]\\w*)[\\r\\n](?:.*[\\r\\n])*?\\2;)/i, alias: \"heredoc-string\", greedy: !0, inside: { delimiter: { pattern: /^<<<(?:\"[^\"]+\"|[a-z_]\\w*)|[a-z_]\\w*;$/i, alias: \"symbol\", inside: { punctuation: /^<<<\"?|[\";]$/ } }, interpolation: l } }, { pattern: /`(?:\\\\[\\s\\S]|[^\\\\`])*`/, alias: \"backtick-quoted-string\", greedy: !0 }, { pattern: /'(?:\\\\[\\s\\S]|[^\\\\'])*'/, alias: \"single-quoted-string\", greedy: !0 }, { pattern: /\"(?:\\\\[\\s\\S]|[^\\\\\"])*\"/, alias: \"double-quoted-string\", greedy: !0, inside: { interpolation: l } }]; e.languages.insertBefore(\"php\", \"variable\", { string: r, attribute: { pattern: /#\\[(?:[^\"'\\/#]|\\/(?![*/])|\\/\\/.*$|#(?!\\[).*$|\\/\\*(?:[^*]|\\*(?!\\/))*\\*\\/|\"(?:\\\\[\\s\\S]|[^\\\\\"])*\"|'(?:\\\\[\\s\\S]|[^\\\\'])*')+\\](?=\\s*[a-z$#])/im, greedy: !0, inside: { \"attribute-content\": { pattern: /^(#\\[)[\\s\\S]+(?=\\]$)/, lookbehind: !0, inside: { comment: a, string: r, \"attribute-class-name\": [{ pattern: /([^:]|^)\\b[a-z_]\\w*(?!\\\\)\\b/i, alias: \"class-name\", greedy: !0, lookbehind: !0 }, { pattern: /([^:]|^)(?:\\\\?\\b[a-z_]\\w*)+/i, alias: [\"class-name\", \"class-name-fully-qualified\"], greedy: !0, lookbehind: !0, inside: { punctuation: /\\\\/ } }], constant: t, number: i, operator: n, punctuation: s } }, delimiter: { pattern: /^#\\[|\\]$/, alias: \"punctuation\" } } } }), e.hooks.add(\"before-tokenize\", (function (a) { /<\\?/.test(a.code) && e.languages[\"markup-templating\"].buildPlaceholders(a, \"php\", /<\\?(?:[^\"'/#]|\\/(?![*/])|(\"|')(?:\\\\[\\s\\S]|(?!\\1)[^\\\\])*\\1|(?:\\/\\/|#(?!\\[))(?:[^?\\n\\r]|\\?(?!>))*(?=$|\\?>|[\\r\\n])|#\\[|\\/\\*(?:[^*]|\\*(?!\\/))*(?:\\*\\/|$))*?(?:\\?>|$)/g) })), e.hooks.add(\"after-tokenize\", (function (a) { e.languages[\"markup-templating\"].tokenizePlaceholders(a, \"php\") })) }(Prism);\nPrism.languages.python = { comment: { pattern: /(^|[^\\\\])#.*/, lookbehind: !0, greedy: !0 }, \"string-interpolation\": { pattern: /(?:f|fr|rf)(?:(\"\"\"|''')[\\s\\S]*?\\1|(\"|')(?:\\\\.|(?!\\2)[^\\\\\\r\\n])*\\2)/i, greedy: !0, inside: { interpolation: { pattern: /((?:^|[^{])(?:\\{\\{)*)\\{(?!\\{)(?:[^{}]|\\{(?!\\{)(?:[^{}]|\\{(?!\\{)(?:[^{}])+\\})+\\})+\\}/, lookbehind: !0, inside: { \"format-spec\": { pattern: /(:)[^:(){}]+(?=\\}$)/, lookbehind: !0 }, \"conversion-option\": { pattern: /![sra](?=[:}]$)/, alias: \"punctuation\" }, rest: null } }, string: /[\\s\\S]+/ } }, \"triple-quoted-string\": { pattern: /(?:[rub]|br|rb)?(\"\"\"|''')[\\s\\S]*?\\1/i, greedy: !0, alias: \"string\" }, string: { pattern: /(?:[rub]|br|rb)?(\"|')(?:\\\\.|(?!\\1)[^\\\\\\r\\n])*\\1/i, greedy: !0 }, function: { pattern: /((?:^|\\s)def[ \\t]+)[a-zA-Z_]\\w*(?=\\s*\\()/g, lookbehind: !0 }, \"class-name\": { pattern: /(\\bclass\\s+)\\w+/i, lookbehind: !0 }, decorator: { pattern: /(^[\\t ]*)@\\w+(?:\\.\\w+)*/m, lookbehind: !0, alias: [\"annotation\", \"punctuation\"], inside: { punctuation: /\\./ } }, keyword: /\\b(?:_(?=\\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\\b/, builtin: /\\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\\b/, boolean: /\\b(?:False|None|True)\\b/, number: /\\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\\b|(?:\\b\\d+(?:_\\d+)*(?:\\.(?:\\d+(?:_\\d+)*)?)?|\\B\\.\\d+(?:_\\d+)*)(?:e[+-]?\\d+(?:_\\d+)*)?j?(?!\\w)/i, operator: /[-+%=]=?|!=|:=|\\*\\*?=?|\\/\\/?=?|<[<=>]?|>[=>]?|[&|^~]/, punctuation: /[{}[\\];(),.:]/ }, Prism.languages.python[\"string-interpolation\"].inside.interpolation.inside.rest = Prism.languages.python, Prism.languages.py = Prism.languages.python;\n!function (e) { e.languages.ruby = e.languages.extend(\"clike\", { comment: { pattern: /#.*|^=begin\\s[\\s\\S]*?^=end/m, greedy: !0 }, \"class-name\": { pattern: /(\\b(?:class|module)\\s+|\\bcatch\\s+\\()[\\w.\\\\]+|\\b[A-Z_]\\w*(?=\\s*\\.\\s*new\\b)/, lookbehind: !0, inside: { punctuation: /[.\\\\]/ } }, keyword: /\\b(?:BEGIN|END|alias|and|begin|break|case|class|def|define_method|defined|do|each|else|elsif|end|ensure|extend|for|if|in|include|module|new|next|nil|not|or|prepend|private|protected|public|raise|redo|require|rescue|retry|return|self|super|then|throw|undef|unless|until|when|while|yield)\\b/, operator: /\\.{2,3}|&\\.|===|<?=>|[!=]?~|(?:&&|\\|\\||<<|>>|\\*\\*|[+\\-*/%<>!^&|=])=?|[?:]/, punctuation: /[(){}[\\].,;]/ }), e.languages.insertBefore(\"ruby\", \"operator\", { \"double-colon\": { pattern: /::/, alias: \"punctuation\" } }); var n = { pattern: /((?:^|[^\\\\])(?:\\\\{2})*)#\\{(?:[^{}]|\\{[^{}]*\\})*\\}/, lookbehind: !0, inside: { content: { pattern: /^(#\\{)[\\s\\S]+(?=\\}$)/, lookbehind: !0, inside: e.languages.ruby }, delimiter: { pattern: /^#\\{|\\}$/, alias: \"punctuation\" } } }; delete e.languages.ruby.function; var t = \"(?:\" + [\"([^a-zA-Z0-9\\\\s{(\\\\[<=])(?:(?!\\\\1)[^\\\\\\\\]|\\\\\\\\[^])*\\\\1\", \"\\\\((?:[^()\\\\\\\\]|\\\\\\\\[^]|\\\\((?:[^()\\\\\\\\]|\\\\\\\\[^])*\\\\))*\\\\)\", \"\\\\{(?:[^{}\\\\\\\\]|\\\\\\\\[^]|\\\\{(?:[^{}\\\\\\\\]|\\\\\\\\[^])*\\\\})*\\\\}\", \"\\\\[(?:[^\\\\[\\\\]\\\\\\\\]|\\\\\\\\[^]|\\\\[(?:[^\\\\[\\\\]\\\\\\\\]|\\\\\\\\[^])*\\\\])*\\\\]\", \"<(?:[^<>\\\\\\\\]|\\\\\\\\[^]|<(?:[^<>\\\\\\\\]|\\\\\\\\[^])*>)*>\"].join(\"|\") + \")\", i = '(?:\"(?:\\\\\\\\.|[^\"\\\\\\\\\\r\\n])*\"|(?:\\\\b[a-zA-Z_]\\\\w*|[^\\\\s\\0-\\\\x7F]+)[?!]?|\\\\$.)'; e.languages.insertBefore(\"ruby\", \"keyword\", { \"regex-literal\": [{ pattern: RegExp(\"%r\" + t + \"[egimnosux]{0,6}\"), greedy: !0, inside: { interpolation: n, regex: /[\\s\\S]+/ } }, { pattern: /(^|[^/])\\/(?!\\/)(?:\\[[^\\r\\n\\]]+\\]|\\\\.|[^[/\\\\\\r\\n])+\\/[egimnosux]{0,6}(?=\\s*(?:$|[\\r\\n,.;})#]))/, lookbehind: !0, greedy: !0, inside: { interpolation: n, regex: /[\\s\\S]+/ } }], variable: /[@$]+[a-zA-Z_]\\w*(?:[?!]|\\b)/, symbol: [{ pattern: RegExp(\"(^|[^:]):\" + i), lookbehind: !0, greedy: !0 }, { pattern: RegExp(\"([\\r\\n{(,][ \\t]*)\" + i + \"(?=:(?!:))\"), lookbehind: !0, greedy: !0 }], \"method-definition\": { pattern: /(\\bdef\\s+)\\w+(?:\\s*\\.\\s*\\w+)?/, lookbehind: !0, inside: { function: /\\b\\w+$/, keyword: /^self\\b/, \"class-name\": /^\\w+/, punctuation: /\\./ } } }), e.languages.insertBefore(\"ruby\", \"string\", { \"string-literal\": [{ pattern: RegExp(\"%[qQiIwWs]?\" + t), greedy: !0, inside: { interpolation: n, string: /[\\s\\S]+/ } }, { pattern: /(\"|')(?:#\\{[^}]+\\}|#(?!\\{)|\\\\(?:\\r\\n|[\\s\\S])|(?!\\1)[^\\\\#\\r\\n])*\\1/, greedy: !0, inside: { interpolation: n, string: /[\\s\\S]+/ } }, { pattern: /<<[-~]?([a-z_]\\w*)[\\r\\n](?:.*[\\r\\n])*?[\\t ]*\\1/i, alias: \"heredoc-string\", greedy: !0, inside: { delimiter: { pattern: /^<<[-~]?[a-z_]\\w*|\\b[a-z_]\\w*$/i, inside: { symbol: /\\b\\w+/, punctuation: /^<<[-~]?/ } }, interpolation: n, string: /[\\s\\S]+/ } }, { pattern: /<<[-~]?'([a-z_]\\w*)'[\\r\\n](?:.*[\\r\\n])*?[\\t ]*\\1/i, alias: \"heredoc-string\", greedy: !0, inside: { delimiter: { pattern: /^<<[-~]?'[a-z_]\\w*'|\\b[a-z_]\\w*$/i, inside: { symbol: /\\b\\w+/, punctuation: /^<<[-~]?'|'$/ } }, string: /[\\s\\S]+/ } }], \"command-literal\": [{ pattern: RegExp(\"%x\" + t), greedy: !0, inside: { interpolation: n, command: { pattern: /[\\s\\S]+/, alias: \"string\" } } }, { pattern: /`(?:#\\{[^}]+\\}|#(?!\\{)|\\\\(?:\\r\\n|[\\s\\S])|[^\\\\`#\\r\\n])*`/, greedy: !0, inside: { interpolation: n, command: { pattern: /[\\s\\S]+/, alias: \"string\" } } }] }), delete e.languages.ruby.string, e.languages.insertBefore(\"ruby\", \"number\", { builtin: /\\b(?:Array|Bignum|Binding|Class|Continuation|Dir|Exception|FalseClass|File|Fixnum|Float|Hash|IO|Integer|MatchData|Method|Module|NilClass|Numeric|Object|Proc|Range|Regexp|Stat|String|Struct|Symbol|TMS|Thread|ThreadGroup|Time|TrueClass)\\b/, constant: /\\b[A-Z][A-Z0-9_]*(?:[?!]|\\b)/ }), e.languages.rb = e.languages.ruby }(Prism);\n!function (e) { for (var a = \"/\\\\*(?:[^*/]|\\\\*(?!/)|/(?!\\\\*)|<self>)*\\\\*/\", t = 0; t < 2; t++)a = a.replace(/<self>/g, (function () { return a })); a = a.replace(/<self>/g, (function () { return \"[^\\\\s\\\\S]\" })), e.languages.rust = { comment: [{ pattern: RegExp(\"(^|[^\\\\\\\\])\" + a), lookbehind: !0, greedy: !0 }, { pattern: /(^|[^\\\\:])\\/\\/.*/, lookbehind: !0, greedy: !0 }], string: { pattern: /b?\"(?:\\\\[\\s\\S]|[^\\\\\"])*\"|b?r(#*)\"(?:[^\"]|\"(?!\\1))*\"\\1/, greedy: !0 }, char: { pattern: /b?'(?:\\\\(?:x[0-7][\\da-fA-F]|u\\{(?:[\\da-fA-F]_*){1,6}\\}|.)|[^\\\\\\r\\n\\t'])'/, greedy: !0 }, attribute: { pattern: /#!?\\[(?:[^\\[\\]\"]|\"(?:\\\\[\\s\\S]|[^\\\\\"])*\")*\\]/, greedy: !0, alias: \"attr-name\", inside: { string: null } }, \"closure-params\": { pattern: /([=(,:]\\s*|\\bmove\\s*)\\|[^|]*\\||\\|[^|]*\\|(?=\\s*(?:\\{|->))/, lookbehind: !0, greedy: !0, inside: { \"closure-punctuation\": { pattern: /^\\||\\|$/, alias: \"punctuation\" }, rest: null } }, \"lifetime-annotation\": { pattern: /'\\w+/, alias: \"symbol\" }, \"fragment-specifier\": { pattern: /(\\$\\w+:)[a-z]+/, lookbehind: !0, alias: \"punctuation\" }, variable: /\\$\\w+/, \"function-definition\": { pattern: /(\\bfn\\s+)\\w+/, lookbehind: !0, alias: \"function\" }, \"type-definition\": { pattern: /(\\b(?:enum|struct|trait|type|union)\\s+)\\w+/, lookbehind: !0, alias: \"class-name\" }, \"module-declaration\": [{ pattern: /(\\b(?:crate|mod)\\s+)[a-z][a-z_\\d]*/, lookbehind: !0, alias: \"namespace\" }, { pattern: /(\\b(?:crate|self|super)\\s*)::\\s*[a-z][a-z_\\d]*\\b(?:\\s*::(?:\\s*[a-z][a-z_\\d]*\\s*::)*)?/, lookbehind: !0, alias: \"namespace\", inside: { punctuation: /::/ } }], keyword: [/\\b(?:Self|abstract|as|async|await|become|box|break|const|continue|crate|do|dyn|else|enum|extern|final|fn|for|if|impl|in|let|loop|macro|match|mod|move|mut|override|priv|pub|ref|return|self|static|struct|super|trait|try|type|typeof|union|unsafe|unsized|use|virtual|where|while|yield)\\b/, /\\b(?:bool|char|f(?:32|64)|[ui](?:8|16|32|64|128|size)|str)\\b/], function: /\\b[a-z_]\\w*(?=\\s*(?:::\\s*<|\\())/, macro: { pattern: /\\b\\w+!/, alias: \"property\" }, constant: /\\b[A-Z_][A-Z_\\d]+\\b/, \"class-name\": /\\b[A-Z]\\w*\\b/, namespace: { pattern: /(?:\\b[a-z][a-z_\\d]*\\s*::\\s*)*\\b[a-z][a-z_\\d]*\\s*::(?!\\s*<)/, inside: { punctuation: /::/ } }, number: /\\b(?:0x[\\dA-Fa-f](?:_?[\\dA-Fa-f])*|0o[0-7](?:_?[0-7])*|0b[01](?:_?[01])*|(?:(?:\\d(?:_?\\d)*)?\\.)?\\d(?:_?\\d)*(?:[Ee][+-]?\\d+)?)(?:_?(?:f32|f64|[iu](?:8|16|32|64|size)?))?\\b/, boolean: /\\b(?:false|true)\\b/, punctuation: /->|\\.\\.=|\\.{1,3}|::|[{}[\\];(),:]/, operator: /[-+*\\/%!^]=?|=[=>]?|&[&=]?|\\|[|=]?|<<?=?|>>?=?|[@?]/ }, e.languages.rust[\"closure-params\"].inside.rest = e.languages.rust, e.languages.rust.attribute.inside.string = e.languages.rust.string }(Prism);\nPrism.languages.sql = { comment: { pattern: /(^|[^\\\\])(?:\\/\\*[\\s\\S]*?\\*\\/|(?:--|\\/\\/|#).*)/, lookbehind: !0 }, variable: [{ pattern: /@([\"'`])(?:\\\\[\\s\\S]|(?!\\1)[^\\\\])+\\1/, greedy: !0 }, /@[\\w.$]+/], string: { pattern: /(^|[^@\\\\])(\"|')(?:\\\\[\\s\\S]|(?!\\2)[^\\\\]|\\2\\2)*\\2/, greedy: !0, lookbehind: !0 }, identifier: { pattern: /(^|[^@\\\\])`(?:\\\\[\\s\\S]|[^`\\\\]|``)*`/, greedy: !0, lookbehind: !0, inside: { punctuation: /^`|`$/ } }, function: /\\b(?:AVG|COUNT|FIRST|FORMAT|LAST|LCASE|LEN|MAX|MID|MIN|MOD|NOW|ROUND|SUM|UCASE)(?=\\s*\\()/i, keyword: /\\b(?:ACTION|ADD|AFTER|ALGORITHM|ALL|ALTER|ANALYZE|ANY|APPLY|AS|ASC|AUTHORIZATION|AUTO_INCREMENT|BACKUP|BDB|BEGIN|BERKELEYDB|BIGINT|BINARY|BIT|BLOB|BOOL|BOOLEAN|BREAK|BROWSE|BTREE|BULK|BY|CALL|CASCADED?|CASE|CHAIN|CHAR(?:ACTER|SET)?|CHECK(?:POINT)?|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMNS?|COMMENT|COMMIT(?:TED)?|COMPUTE|CONNECT|CONSISTENT|CONSTRAINT|CONTAINS(?:TABLE)?|CONTINUE|CONVERT|CREATE|CROSS|CURRENT(?:_DATE|_TIME|_TIMESTAMP|_USER)?|CURSOR|CYCLE|DATA(?:BASES?)?|DATE(?:TIME)?|DAY|DBCC|DEALLOCATE|DEC|DECIMAL|DECLARE|DEFAULT|DEFINER|DELAYED|DELETE|DELIMITERS?|DENY|DESC|DESCRIBE|DETERMINISTIC|DISABLE|DISCARD|DISK|DISTINCT|DISTINCTROW|DISTRIBUTED|DO|DOUBLE|DROP|DUMMY|DUMP(?:FILE)?|DUPLICATE|ELSE(?:IF)?|ENABLE|ENCLOSED|END|ENGINE|ENUM|ERRLVL|ERRORS|ESCAPED?|EXCEPT|EXEC(?:UTE)?|EXISTS|EXIT|EXPLAIN|EXTENDED|FETCH|FIELDS|FILE|FILLFACTOR|FIRST|FIXED|FLOAT|FOLLOWING|FOR(?: EACH ROW)?|FORCE|FOREIGN|FREETEXT(?:TABLE)?|FROM|FULL|FUNCTION|GEOMETRY(?:COLLECTION)?|GLOBAL|GOTO|GRANT|GROUP|HANDLER|HASH|HAVING|HOLDLOCK|HOUR|IDENTITY(?:COL|_INSERT)?|IF|IGNORE|IMPORT|INDEX|INFILE|INNER|INNODB|INOUT|INSERT|INT|INTEGER|INTERSECT|INTERVAL|INTO|INVOKER|ISOLATION|ITERATE|JOIN|KEYS?|KILL|LANGUAGE|LAST|LEAVE|LEFT|LEVEL|LIMIT|LINENO|LINES|LINESTRING|LOAD|LOCAL|LOCK|LONG(?:BLOB|TEXT)|LOOP|MATCH(?:ED)?|MEDIUM(?:BLOB|INT|TEXT)|MERGE|MIDDLEINT|MINUTE|MODE|MODIFIES|MODIFY|MONTH|MULTI(?:LINESTRING|POINT|POLYGON)|NATIONAL|NATURAL|NCHAR|NEXT|NO|NONCLUSTERED|NULLIF|NUMERIC|OFF?|OFFSETS?|ON|OPEN(?:DATASOURCE|QUERY|ROWSET)?|OPTIMIZE|OPTION(?:ALLY)?|ORDER|OUT(?:ER|FILE)?|OVER|PARTIAL|PARTITION|PERCENT|PIVOT|PLAN|POINT|POLYGON|PRECEDING|PRECISION|PREPARE|PREV|PRIMARY|PRINT|PRIVILEGES|PROC(?:EDURE)?|PUBLIC|PURGE|QUICK|RAISERROR|READS?|REAL|RECONFIGURE|REFERENCES|RELEASE|RENAME|REPEAT(?:ABLE)?|REPLACE|REPLICATION|REQUIRE|RESIGNAL|RESTORE|RESTRICT|RETURN(?:ING|S)?|REVOKE|RIGHT|ROLLBACK|ROUTINE|ROW(?:COUNT|GUIDCOL|S)?|RTREE|RULE|SAVE(?:POINT)?|SCHEMA|SECOND|SELECT|SERIAL(?:IZABLE)?|SESSION(?:_USER)?|SET(?:USER)?|SHARE|SHOW|SHUTDOWN|SIMPLE|SMALLINT|SNAPSHOT|SOME|SONAME|SQL|START(?:ING)?|STATISTICS|STATUS|STRIPED|SYSTEM_USER|TABLES?|TABLESPACE|TEMP(?:ORARY|TABLE)?|TERMINATED|TEXT(?:SIZE)?|THEN|TIME(?:STAMP)?|TINY(?:BLOB|INT|TEXT)|TOP?|TRAN(?:SACTIONS?)?|TRIGGER|TRUNCATE|TSEQUAL|TYPES?|UNBOUNDED|UNCOMMITTED|UNDEFINED|UNION|UNIQUE|UNLOCK|UNPIVOT|UNSIGNED|UPDATE(?:TEXT)?|USAGE|USE|USER|USING|VALUES?|VAR(?:BINARY|CHAR|CHARACTER|YING)|VIEW|WAITFOR|WARNINGS|WHEN|WHERE|WHILE|WITH(?: ROLLUP|IN)?|WORK|WRITE(?:TEXT)?|YEAR)\\b/i, boolean: /\\b(?:FALSE|NULL|TRUE)\\b/i, number: /\\b0x[\\da-f]+\\b|\\b\\d+(?:\\.\\d*)?|\\B\\.\\d+\\b/i, operator: /[-+*\\/=%^~]|&&?|\\|\\|?|!=?|<(?:=>?|<|>)?|>[>=]?|\\b(?:AND|BETWEEN|DIV|ILIKE|IN|IS|LIKE|NOT|OR|REGEXP|RLIKE|SOUNDS LIKE|XOR)\\b/i, punctuation: /[;[\\]()`,.]/ };\nPrism.languages.swift = { comment: { pattern: /(^|[^\\\\:])(?:\\/\\/.*|\\/\\*(?:[^/*]|\\/(?!\\*)|\\*(?!\\/)|\\/\\*(?:[^*]|\\*(?!\\/))*\\*\\/)*\\*\\/)/, lookbehind: !0, greedy: !0 }, \"string-literal\": [{ pattern: RegExp('(^|[^\"#])(?:\"(?:\\\\\\\\(?:\\\\((?:[^()]|\\\\([^()]*\\\\))*\\\\)|\\r\\n|[^(])|[^\\\\\\\\\\r\\n\"])*\"|\"\"\"(?:\\\\\\\\(?:\\\\((?:[^()]|\\\\([^()]*\\\\))*\\\\)|[^(])|[^\\\\\\\\\"]|\"(?!\"\"))*\"\"\")(?![\"#])'), lookbehind: !0, greedy: !0, inside: { interpolation: { pattern: /(\\\\\\()(?:[^()]|\\([^()]*\\))*(?=\\))/, lookbehind: !0, inside: null }, \"interpolation-punctuation\": { pattern: /^\\)|\\\\\\($/, alias: \"punctuation\" }, punctuation: /\\\\(?=[\\r\\n])/, string: /[\\s\\S]+/ } }, { pattern: RegExp('(^|[^\"#])(#+)(?:\"(?:\\\\\\\\(?:#+\\\\((?:[^()]|\\\\([^()]*\\\\))*\\\\)|\\r\\n|[^#])|[^\\\\\\\\\\r\\n])*?\"|\"\"\"(?:\\\\\\\\(?:#+\\\\((?:[^()]|\\\\([^()]*\\\\))*\\\\)|[^#])|[^\\\\\\\\])*?\"\"\")\\\\2'), lookbehind: !0, greedy: !0, inside: { interpolation: { pattern: /(\\\\#+\\()(?:[^()]|\\([^()]*\\))*(?=\\))/, lookbehind: !0, inside: null }, \"interpolation-punctuation\": { pattern: /^\\)|\\\\#+\\($/, alias: \"punctuation\" }, string: /[\\s\\S]+/ } }], directive: { pattern: RegExp(\"#(?:(?:elseif|if)\\\\b(?:[ \\t]*(?:![ \\t]*)?(?:\\\\b\\\\w+\\\\b(?:[ \\t]*\\\\((?:[^()]|\\\\([^()]*\\\\))*\\\\))?|\\\\((?:[^()]|\\\\([^()]*\\\\))*\\\\))(?:[ \\t]*(?:&&|\\\\|\\\\|))?)+|(?:else|endif)\\\\b)\"), alias: \"property\", inside: { \"directive-name\": /^#\\w+/, boolean: /\\b(?:false|true)\\b/, number: /\\b\\d+(?:\\.\\d+)*\\b/, operator: /!|&&|\\|\\||[<>]=?/, punctuation: /[(),]/ } }, literal: { pattern: /#(?:colorLiteral|column|dsohandle|file(?:ID|Literal|Path)?|function|imageLiteral|line)\\b/, alias: \"constant\" }, \"other-directive\": { pattern: /#\\w+\\b/, alias: \"property\" }, attribute: { pattern: /@\\w+/, alias: \"atrule\" }, \"function-definition\": { pattern: /(\\bfunc\\s+)\\w+/, lookbehind: !0, alias: \"function\" }, label: { pattern: /\\b(break|continue)\\s+\\w+|\\b[a-zA-Z_]\\w*(?=\\s*:\\s*(?:for|repeat|while)\\b)/, lookbehind: !0, alias: \"important\" }, keyword: /\\b(?:Any|Protocol|Self|Type|actor|as|assignment|associatedtype|associativity|async|await|break|case|catch|class|continue|convenience|default|defer|deinit|didSet|do|dynamic|else|enum|extension|fallthrough|fileprivate|final|for|func|get|guard|higherThan|if|import|in|indirect|infix|init|inout|internal|is|isolated|lazy|left|let|lowerThan|mutating|none|nonisolated|nonmutating|open|operator|optional|override|postfix|precedencegroup|prefix|private|protocol|public|repeat|required|rethrows|return|right|safe|self|set|some|static|struct|subscript|super|switch|throw|throws|try|typealias|unowned|unsafe|var|weak|where|while|willSet)\\b/, boolean: /\\b(?:false|true)\\b/, nil: { pattern: /\\bnil\\b/, alias: \"constant\" }, \"short-argument\": /\\$\\d+\\b/, omit: { pattern: /\\b_\\b/, alias: \"keyword\" }, number: /\\b(?:[\\d_]+(?:\\.[\\de_]+)?|0x[a-f0-9_]+(?:\\.[a-f0-9p_]+)?|0b[01_]+|0o[0-7_]+)\\b/i, \"class-name\": /\\b[A-Z](?:[A-Z_\\d]*[a-z]\\w*)?\\b/, function: /\\b[a-z_]\\w*(?=\\s*\\()/i, constant: /\\b(?:[A-Z_]{2,}|k[A-Z][A-Za-z_]+)\\b/, operator: /[-+*/%=!<>&|^~?]+|\\.[.\\-+*/%=!<>&|^~?]+/, punctuation: /[{}[\\]();,.:\\\\]/ }, Prism.languages.swift[\"string-literal\"].forEach((function (e) { e.inside.interpolation.inside = Prism.languages.swift }));\n!function (e) { var t = { pattern: /^[;#].*/m, greedy: !0 }, n = '\"(?:[^\\r\\n\"\\\\\\\\]|\\\\\\\\(?:[^\\r]|\\r\\n?))*\"(?!\\\\S)'; e.languages.systemd = { comment: t, section: { pattern: /^\\[[^\\n\\r\\[\\]]*\\](?=[ \\t]*$)/m, greedy: !0, inside: { punctuation: /^\\[|\\]$/, \"section-name\": { pattern: /[\\s\\S]+/, alias: \"selector\" } } }, key: { pattern: /^[^\\s=]+(?=[ \\t]*=)/m, greedy: !0, alias: \"attr-name\" }, value: { pattern: RegExp(\"(=[ \\t]*(?!\\\\s))(?:\" + n + '|(?=[^\"\\r\\n]))(?:[^\\\\s\\\\\\\\]|[ \\t]+(?:(?![ \\t\"])|' + n + \")|\\\\\\\\[\\r\\n]+(?:[#;].*[\\r\\n]+)*(?![#;]))*\"), lookbehind: !0, greedy: !0, alias: \"attr-value\", inside: { comment: t, quoted: { pattern: RegExp(\"(^|\\\\s)\" + n), lookbehind: !0, greedy: !0 }, punctuation: /\\\\$/m, boolean: { pattern: /^(?:false|no|off|on|true|yes)$/, greedy: !0 } } }, punctuation: /=/ } }(Prism);\n!function (E) { var n = /\\b(?:ACT|ACTIFSUB|CARRAY|CASE|CLEARGIF|COA|COA_INT|CONSTANTS|CONTENT|CUR|EDITPANEL|EFFECT|EXT|FILE|FLUIDTEMPLATE|FORM|FRAME|FRAMESET|GIFBUILDER|GMENU|GMENU_FOLDOUT|GMENU_LAYERS|GP|HMENU|HRULER|HTML|IENV|IFSUB|IMAGE|IMGMENU|IMGMENUITEM|IMGTEXT|IMG_RESOURCE|INCLUDE_TYPOSCRIPT|JSMENU|JSMENUITEM|LLL|LOAD_REGISTER|NO|PAGE|RECORDS|RESTORE_REGISTER|TEMPLATE|TEXT|TMENU|TMENUITEM|TMENU_LAYERS|USER|USER_INT|_GIFBUILDER|global|globalString|globalVar)\\b/; E.languages.typoscript = { comment: [{ pattern: /(^|[^\\\\])\\/\\*[\\s\\S]*?(?:\\*\\/|$)/, lookbehind: !0 }, { pattern: /(^|[^\\\\:= \\t]|(?:^|[^= \\t])[ \\t]+)\\/\\/.*/, lookbehind: !0, greedy: !0 }, { pattern: /(^|[^\"'])#.*/, lookbehind: !0, greedy: !0 }], function: [{ pattern: /<INCLUDE_TYPOSCRIPT:\\s*source\\s*=\\s*(?:\"[^\"\\r\\n]*\"|'[^'\\r\\n]*')\\s*>/, inside: { string: { pattern: /\"[^\"\\r\\n]*\"|'[^'\\r\\n]*'/, inside: { keyword: n } }, keyword: { pattern: /INCLUDE_TYPOSCRIPT/ } } }, { pattern: /@import\\s*(?:\"[^\"\\r\\n]*\"|'[^'\\r\\n]*')/, inside: { string: /\"[^\"\\r\\n]*\"|'[^'\\r\\n]*'/ } }], string: { pattern: /^([^=]*=[< ]?)(?:(?!\\]\\n).)*/, lookbehind: !0, inside: { function: /\\{\\$.*\\}/, keyword: n, number: /^\\d+$/, punctuation: /[,|:]/ } }, keyword: n, number: { pattern: /\\b\\d+\\s*[.{=]/, inside: { operator: /[.{=]/ } }, tag: { pattern: /\\.?[-\\w\\\\]+\\.?/, inside: { punctuation: /\\./ } }, punctuation: /[{}[\\];(),.:|]/, operator: /[<>]=?|[!=]=?=?|--?|\\+\\+?|&&?|\\|\\|?|[?*/~^%]/ }, E.languages.tsconfig = E.languages.typoscript }(Prism);\n!function (e) { var n = /[*&][^\\s[\\]{},]+/, r = /!(?:<[\\w\\-%#;/?:@&=+$,.!~*'()[\\]]+>|(?:[a-zA-Z\\d-]*!)?[\\w\\-%#;/?:@&=+$.~*'()]+)?/, t = \"(?:\" + r.source + \"(?:[ \\t]+\" + n.source + \")?|\" + n.source + \"(?:[ \\t]+\" + r.source + \")?)\", a = \"(?:[^\\\\s\\\\x00-\\\\x08\\\\x0e-\\\\x1f!\\\"#%&'*,\\\\-:>?@[\\\\]`{|}\\\\x7f-\\\\x84\\\\x86-\\\\x9f\\\\ud800-\\\\udfff\\\\ufffe\\\\uffff]|[?:-]<PLAIN>)(?:[ \\t]*(?:(?![#:])<PLAIN>|:<PLAIN>))*\".replace(/<PLAIN>/g, (function () { return \"[^\\\\s\\\\x00-\\\\x08\\\\x0e-\\\\x1f,[\\\\]{}\\\\x7f-\\\\x84\\\\x86-\\\\x9f\\\\ud800-\\\\udfff\\\\ufffe\\\\uffff]\" })), d = \"\\\"(?:[^\\\"\\\\\\\\\\r\\n]|\\\\\\\\.)*\\\"|'(?:[^'\\\\\\\\\\r\\n]|\\\\\\\\.)*'\"; function o(e, n) { n = (n || \"\").replace(/m/g, \"\") + \"m\"; var r = \"([:\\\\-,[{]\\\\s*(?:\\\\s<<prop>>[ \\t]+)?)(?:<<value>>)(?=[ \\t]*(?:$|,|\\\\]|\\\\}|(?:[\\r\\n]\\\\s*)?#))\".replace(/<<prop>>/g, (function () { return t })).replace(/<<value>>/g, (function () { return e })); return RegExp(r, n) } e.languages.yaml = { scalar: { pattern: RegExp(\"([\\\\-:]\\\\s*(?:\\\\s<<prop>>[ \\t]+)?[|>])[ \\t]*(?:((?:\\r?\\n|\\r)[ \\t]+)\\\\S[^\\r\\n]*(?:\\\\2[^\\r\\n]+)*)\".replace(/<<prop>>/g, (function () { return t }))), lookbehind: !0, alias: \"string\" }, comment: /#.*/, key: { pattern: RegExp(\"((?:^|[:\\\\-,[{\\r\\n?])[ \\t]*(?:<<prop>>[ \\t]+)?)<<key>>(?=\\\\s*:\\\\s)\".replace(/<<prop>>/g, (function () { return t })).replace(/<<key>>/g, (function () { return \"(?:\" + a + \"|\" + d + \")\" }))), lookbehind: !0, greedy: !0, alias: \"atrule\" }, directive: { pattern: /(^[ \\t]*)%.+/m, lookbehind: !0, alias: \"important\" }, datetime: { pattern: o(\"\\\\d{4}-\\\\d\\\\d?-\\\\d\\\\d?(?:[tT]|[ \\t]+)\\\\d\\\\d?:\\\\d{2}:\\\\d{2}(?:\\\\.\\\\d*)?(?:[ \\t]*(?:Z|[-+]\\\\d\\\\d?(?::\\\\d{2})?))?|\\\\d{4}-\\\\d{2}-\\\\d{2}|\\\\d\\\\d?:\\\\d{2}(?::\\\\d{2}(?:\\\\.\\\\d*)?)?\"), lookbehind: !0, alias: \"number\" }, boolean: { pattern: o(\"false|true\", \"i\"), lookbehind: !0, alias: \"important\" }, null: { pattern: o(\"null|~\", \"i\"), lookbehind: !0, alias: \"important\" }, string: { pattern: o(d), lookbehind: !0, greedy: !0 }, number: { pattern: o(\"[+-]?(?:0x[\\\\da-f]+|0o[0-7]+|(?:\\\\d+(?:\\\\.\\\\d*)?|\\\\.\\\\d+)(?:e[+-]?\\\\d+)?|\\\\.inf|\\\\.nan)\", \"i\"), lookbehind: !0 }, tag: r, important: n, punctuation: /---|[:[\\]{}\\-,|>?]|\\.\\.\\./ }, e.languages.yml = e.languages.yaml }(Prism);\n!function () { if (\"undefined\" != typeof Prism && \"undefined\" != typeof document) { var e = \"line-numbers\", n = /\\n(?!$)/g, t = Prism.plugins.lineNumbers = { getLine: function (n, t) { if (\"PRE\" === n.tagName && n.classList.contains(e)) { var i = n.querySelector(\".line-numbers-rows\"); if (i) { var r = parseInt(n.getAttribute(\"data-start\"), 10) || 1, s = r + (i.children.length - 1); t < r && (t = r), t > s && (t = s); var l = t - r; return i.children[l] } } }, resize: function (e) { r([e]) }, assumeViewportIndependence: !0 }, i = void 0; window.addEventListener(\"resize\", (function () { t.assumeViewportIndependence && i === window.innerWidth || (i = window.innerWidth, r(Array.prototype.slice.call(document.querySelectorAll(\"pre.line-numbers\")))) })), Prism.hooks.add(\"complete\", (function (t) { if (t.code) { var i = t.element, s = i.parentNode; if (s && /pre/i.test(s.nodeName) && !i.querySelector(\".line-numbers-rows\") && Prism.util.isActive(i, e)) { i.classList.remove(e), s.classList.add(e); var l, o = t.code.match(n), a = o ? o.length + 1 : 1, u = new Array(a + 1).join(\"<span></span>\"); (l = document.createElement(\"span\")).setAttribute(\"aria-hidden\", \"true\"), l.className = \"line-numbers-rows\", l.innerHTML = u, s.hasAttribute(\"data-start\") && (s.style.counterReset = \"linenumber \" + (parseInt(s.getAttribute(\"data-start\"), 10) - 1)), t.element.appendChild(l), r([s]), Prism.hooks.run(\"line-numbers\", t) } } })), Prism.hooks.add(\"line-numbers\", (function (e) { e.plugins = e.plugins || {}, e.plugins.lineNumbers = !0 })) } function r(e) { if (0 != (e = e.filter((function (e) { var n, t = (n = e, n ? window.getComputedStyle ? getComputedStyle(n) : n.currentStyle || null : null)[\"white-space\"]; return \"pre-wrap\" === t || \"pre-line\" === t }))).length) { var t = e.map((function (e) { var t = e.querySelector(\"code\"), i = e.querySelector(\".line-numbers-rows\"); if (t && i) { var r = e.querySelector(\".line-numbers-sizer\"), s = t.textContent.split(n); r || ((r = document.createElement(\"span\")).className = \"line-numbers-sizer\", t.appendChild(r)), r.innerHTML = \"0\", r.style.display = \"block\"; var l = r.getBoundingClientRect().height; return r.innerHTML = \"\", { element: e, lines: s, lineHeights: [], oneLinerHeight: l, sizer: r } } })).filter(Boolean); t.forEach((function (e) { var n = e.sizer, t = e.lines, i = e.lineHeights, r = e.oneLinerHeight; i[t.length - 1] = void 0, t.forEach((function (e, t) { if (e && e.length > 1) { var s = n.appendChild(document.createElement(\"span\")); s.style.display = \"block\", s.textContent = e } else i[t] = r })) })), t.forEach((function (e) { for (var n = e.sizer, t = e.lineHeights, i = 0, r = 0; r < t.length; r++)void 0 === t[r] && (t[r] = n.children[i++].getBoundingClientRect().height) })), t.forEach((function (e) { var n = e.sizer, t = e.element.querySelector(\".line-numbers-rows\"); n.style.display = \"none\", n.innerHTML = \"\", e.lineHeights.forEach((function (e, n) { t.children[n].style.height = e + \"px\" })) })) } } }();\n!function () { if (\"undefined\" != typeof Prism && \"undefined\" != typeof document) { var e = [], t = {}, n = function () { }; Prism.plugins.toolbar = {}; var a = Prism.plugins.toolbar.registerButton = function (n, a) { var r; r = \"function\" == typeof a ? a : function (e) { var t; return \"function\" == typeof a.onClick ? ((t = document.createElement(\"button\")).type = \"button\", t.addEventListener(\"click\", (function () { a.onClick.call(this, e) }))) : \"string\" == typeof a.url ? (t = document.createElement(\"a\")).href = a.url : t = document.createElement(\"span\"), a.className && t.classList.add(a.className), t.textContent = a.text, t }, n in t ? console.warn('There is a button with the key \"' + n + '\" registered already.') : e.push(t[n] = r) }, r = Prism.plugins.toolbar.hook = function (a) { var r = a.element.parentNode; if (r && /pre/i.test(r.nodeName) && !r.parentNode.classList.contains(\"code-toolbar\")) { var o = document.createElement(\"div\"); o.classList.add(\"code-toolbar\"), r.parentNode.insertBefore(o, r), o.appendChild(r); var i = document.createElement(\"div\"); i.classList.add(\"toolbar\"); var l = e, d = function (e) { for (; e;) { var t = e.getAttribute(\"data-toolbar-order\"); if (null != t) return (t = t.trim()).length ? t.split(/\\s*,\\s*/g) : []; e = e.parentElement } }(a.element); d && (l = d.map((function (e) { return t[e] || n }))), l.forEach((function (e) { var t = e(a); if (t) { var n = document.createElement(\"div\"); n.classList.add(\"toolbar-item\"), n.appendChild(t), i.appendChild(n) } })), o.appendChild(i) } }; a(\"label\", (function (e) { var t = e.element.parentNode; if (t && /pre/i.test(t.nodeName) && t.hasAttribute(\"data-label\")) { var n, a, r = t.getAttribute(\"data-label\"); try { a = document.querySelector(\"template#\" + r) } catch (e) { } return a ? n = a.content : (t.hasAttribute(\"data-url\") ? (n = document.createElement(\"a\")).href = t.getAttribute(\"data-url\") : n = document.createElement(\"span\"), n.textContent = r), n } })), Prism.hooks.add(\"complete\", r) } }();\n!function () { function t(t) { var e = document.createElement(\"textarea\"); e.value = t.getText(), e.style.top = \"0\", e.style.left = \"0\", e.style.position = \"fixed\", document.body.appendChild(e), e.focus(), e.select(); try { var o = document.execCommand(\"copy\"); setTimeout((function () { o ? t.success() : t.error() }), 1) } catch (e) { setTimeout((function () { t.error(e) }), 1) } document.body.removeChild(e) } \"undefined\" != typeof Prism && \"undefined\" != typeof document && (Prism.plugins.toolbar ? Prism.plugins.toolbar.registerButton(\"copy-to-clipboard\", (function (e) { var o = e.element, n = function (t) { var e = { copy: \"Copy\", \"copy-error\": \"Press Ctrl+C to copy\", \"copy-success\": \"Copied!\", \"copy-timeout\": 5e3 }; for (var o in e) { for (var n = \"data-prismjs-\" + o, c = t; c && !c.hasAttribute(n);)c = c.parentElement; c && (e[o] = c.getAttribute(n)) } return e }(o), c = document.createElement(\"button\"); c.className = \"copy-to-clipboard-button\", c.setAttribute(\"type\", \"button\"); var r = document.createElement(\"span\"); return c.appendChild(r), u(\"copy\"), function (e, o) { e.addEventListener(\"click\", (function () { !function (e) { navigator.clipboard ? navigator.clipboard.writeText(e.getText()).then(e.success, (function () { t(e) })) : t(e) }(o) })) }(c, { getText: function () { return o.textContent }, success: function () { u(\"copy-success\"), i() }, error: function () { u(\"copy-error\"), setTimeout((function () { !function (t) { window.getSelection().selectAllChildren(t) }(o) }), 1), i() } }), c; function i() { setTimeout((function () { u(\"copy\") }), n[\"copy-timeout\"]) } function u(t) { r.textContent = n[t], c.setAttribute(\"data-copy-state\", t) } })) : console.warn(\"Copy to Clipboard plugin loaded before Toolbar plugin.\")) }();\n"
  },
  {
    "path": "static/quill/quill.bubble.css",
    "content": "/*!\n * Quill Editor v1.3.5\n * https://quilljs.com/\n * Copyright (c) 2014, Jason Chen\n * Copyright (c) 2013, salesforce.com\n */\n.ql-container {\n  box-sizing: border-box;\n  font-family: Helvetica, Arial, sans-serif;\n  font-size: 13px;\n  height: 100%;\n  margin: 0px;\n  position: relative;\n}\n.ql-container.ql-disabled .ql-tooltip {\n  visibility: hidden;\n}\n.ql-container.ql-disabled .ql-editor ul[data-checked] > li::before {\n  pointer-events: none;\n}\n.ql-clipboard {\n  left: -100000px;\n  height: 1px;\n  overflow-y: hidden;\n  position: absolute;\n  top: 50%;\n}\n.ql-clipboard p {\n  margin: 0;\n  padding: 0;\n}\n.ql-editor {\n  box-sizing: border-box;\n  line-height: 1.42;\n  height: 100%;\n  outline: none;\n  overflow-y: auto;\n  padding: 12px 15px;\n  tab-size: 4;\n  -moz-tab-size: 4;\n  text-align: left;\n  white-space: pre-wrap;\n  word-wrap: break-word;\n}\n.ql-editor > * {\n  cursor: text;\n}\n.ql-editor p,\n.ql-editor ol,\n.ql-editor ul,\n.ql-editor pre,\n.ql-editor blockquote,\n.ql-editor h1,\n.ql-editor h2,\n.ql-editor h3,\n.ql-editor h4,\n.ql-editor h5,\n.ql-editor h6 {\n  margin: 0;\n  padding: 0;\n  counter-reset: list-1 list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9;\n}\n.ql-editor ol,\n.ql-editor ul {\n  padding-left: 1.5em;\n}\n.ql-editor ol > li,\n.ql-editor ul > li {\n  list-style-type: none;\n}\n.ql-editor ul > li::before {\n  content: '\\2022';\n}\n.ql-editor ul[data-checked=true],\n.ql-editor ul[data-checked=false] {\n  pointer-events: none;\n}\n.ql-editor ul[data-checked=true] > li *,\n.ql-editor ul[data-checked=false] > li * {\n  pointer-events: all;\n}\n.ql-editor ul[data-checked=true] > li::before,\n.ql-editor ul[data-checked=false] > li::before {\n  color: #777;\n  cursor: pointer;\n  pointer-events: all;\n}\n.ql-editor ul[data-checked=true] > li::before {\n  content: '\\2611';\n}\n.ql-editor ul[data-checked=false] > li::before {\n  content: '\\2610';\n}\n.ql-editor li::before {\n  display: inline-block;\n  white-space: nowrap;\n  width: 1.2em;\n}\n.ql-editor li:not(.ql-direction-rtl)::before {\n  margin-left: -1.5em;\n  margin-right: 0.3em;\n  text-align: right;\n}\n.ql-editor li.ql-direction-rtl::before {\n  margin-left: 0.3em;\n  margin-right: -1.5em;\n}\n.ql-editor ol li:not(.ql-direction-rtl),\n.ql-editor ul li:not(.ql-direction-rtl) {\n  padding-left: 1.5em;\n}\n.ql-editor ol li.ql-direction-rtl,\n.ql-editor ul li.ql-direction-rtl {\n  padding-right: 1.5em;\n}\n.ql-editor ol li {\n  counter-reset: list-1 list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9;\n  counter-increment: list-0;\n}\n.ql-editor ol li:before {\n  content: counter(list-0, decimal) '. ';\n}\n.ql-editor ol li.ql-indent-1 {\n  counter-increment: list-1;\n}\n.ql-editor ol li.ql-indent-1:before {\n  content: counter(list-1, lower-alpha) '. ';\n}\n.ql-editor ol li.ql-indent-1 {\n  counter-reset: list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9;\n}\n.ql-editor ol li.ql-indent-2 {\n  counter-increment: list-2;\n}\n.ql-editor ol li.ql-indent-2:before {\n  content: counter(list-2, lower-roman) '. ';\n}\n.ql-editor ol li.ql-indent-2 {\n  counter-reset: list-3 list-4 list-5 list-6 list-7 list-8 list-9;\n}\n.ql-editor ol li.ql-indent-3 {\n  counter-increment: list-3;\n}\n.ql-editor ol li.ql-indent-3:before {\n  content: counter(list-3, decimal) '. ';\n}\n.ql-editor ol li.ql-indent-3 {\n  counter-reset: list-4 list-5 list-6 list-7 list-8 list-9;\n}\n.ql-editor ol li.ql-indent-4 {\n  counter-increment: list-4;\n}\n.ql-editor ol li.ql-indent-4:before {\n  content: counter(list-4, lower-alpha) '. ';\n}\n.ql-editor ol li.ql-indent-4 {\n  counter-reset: list-5 list-6 list-7 list-8 list-9;\n}\n.ql-editor ol li.ql-indent-5 {\n  counter-increment: list-5;\n}\n.ql-editor ol li.ql-indent-5:before {\n  content: counter(list-5, lower-roman) '. ';\n}\n.ql-editor ol li.ql-indent-5 {\n  counter-reset: list-6 list-7 list-8 list-9;\n}\n.ql-editor ol li.ql-indent-6 {\n  counter-increment: list-6;\n}\n.ql-editor ol li.ql-indent-6:before {\n  content: counter(list-6, decimal) '. ';\n}\n.ql-editor ol li.ql-indent-6 {\n  counter-reset: list-7 list-8 list-9;\n}\n.ql-editor ol li.ql-indent-7 {\n  counter-increment: list-7;\n}\n.ql-editor ol li.ql-indent-7:before {\n  content: counter(list-7, lower-alpha) '. ';\n}\n.ql-editor ol li.ql-indent-7 {\n  counter-reset: list-8 list-9;\n}\n.ql-editor ol li.ql-indent-8 {\n  counter-increment: list-8;\n}\n.ql-editor ol li.ql-indent-8:before {\n  content: counter(list-8, lower-roman) '. ';\n}\n.ql-editor ol li.ql-indent-8 {\n  counter-reset: list-9;\n}\n.ql-editor ol li.ql-indent-9 {\n  counter-increment: list-9;\n}\n.ql-editor ol li.ql-indent-9:before {\n  content: counter(list-9, decimal) '. ';\n}\n.ql-editor .ql-indent-1:not(.ql-direction-rtl) {\n  padding-left: 3em;\n}\n.ql-editor li.ql-indent-1:not(.ql-direction-rtl) {\n  padding-left: 4.5em;\n}\n.ql-editor .ql-indent-1.ql-direction-rtl.ql-align-right {\n  padding-right: 3em;\n}\n.ql-editor li.ql-indent-1.ql-direction-rtl.ql-align-right {\n  padding-right: 4.5em;\n}\n.ql-editor .ql-indent-2:not(.ql-direction-rtl) {\n  padding-left: 6em;\n}\n.ql-editor li.ql-indent-2:not(.ql-direction-rtl) {\n  padding-left: 7.5em;\n}\n.ql-editor .ql-indent-2.ql-direction-rtl.ql-align-right {\n  padding-right: 6em;\n}\n.ql-editor li.ql-indent-2.ql-direction-rtl.ql-align-right {\n  padding-right: 7.5em;\n}\n.ql-editor .ql-indent-3:not(.ql-direction-rtl) {\n  padding-left: 9em;\n}\n.ql-editor li.ql-indent-3:not(.ql-direction-rtl) {\n  padding-left: 10.5em;\n}\n.ql-editor .ql-indent-3.ql-direction-rtl.ql-align-right {\n  padding-right: 9em;\n}\n.ql-editor li.ql-indent-3.ql-direction-rtl.ql-align-right {\n  padding-right: 10.5em;\n}\n.ql-editor .ql-indent-4:not(.ql-direction-rtl) {\n  padding-left: 12em;\n}\n.ql-editor li.ql-indent-4:not(.ql-direction-rtl) {\n  padding-left: 13.5em;\n}\n.ql-editor .ql-indent-4.ql-direction-rtl.ql-align-right {\n  padding-right: 12em;\n}\n.ql-editor li.ql-indent-4.ql-direction-rtl.ql-align-right {\n  padding-right: 13.5em;\n}\n.ql-editor .ql-indent-5:not(.ql-direction-rtl) {\n  padding-left: 15em;\n}\n.ql-editor li.ql-indent-5:not(.ql-direction-rtl) {\n  padding-left: 16.5em;\n}\n.ql-editor .ql-indent-5.ql-direction-rtl.ql-align-right {\n  padding-right: 15em;\n}\n.ql-editor li.ql-indent-5.ql-direction-rtl.ql-align-right {\n  padding-right: 16.5em;\n}\n.ql-editor .ql-indent-6:not(.ql-direction-rtl) {\n  padding-left: 18em;\n}\n.ql-editor li.ql-indent-6:not(.ql-direction-rtl) {\n  padding-left: 19.5em;\n}\n.ql-editor .ql-indent-6.ql-direction-rtl.ql-align-right {\n  padding-right: 18em;\n}\n.ql-editor li.ql-indent-6.ql-direction-rtl.ql-align-right {\n  padding-right: 19.5em;\n}\n.ql-editor .ql-indent-7:not(.ql-direction-rtl) {\n  padding-left: 21em;\n}\n.ql-editor li.ql-indent-7:not(.ql-direction-rtl) {\n  padding-left: 22.5em;\n}\n.ql-editor .ql-indent-7.ql-direction-rtl.ql-align-right {\n  padding-right: 21em;\n}\n.ql-editor li.ql-indent-7.ql-direction-rtl.ql-align-right {\n  padding-right: 22.5em;\n}\n.ql-editor .ql-indent-8:not(.ql-direction-rtl) {\n  padding-left: 24em;\n}\n.ql-editor li.ql-indent-8:not(.ql-direction-rtl) {\n  padding-left: 25.5em;\n}\n.ql-editor .ql-indent-8.ql-direction-rtl.ql-align-right {\n  padding-right: 24em;\n}\n.ql-editor li.ql-indent-8.ql-direction-rtl.ql-align-right {\n  padding-right: 25.5em;\n}\n.ql-editor .ql-indent-9:not(.ql-direction-rtl) {\n  padding-left: 27em;\n}\n.ql-editor li.ql-indent-9:not(.ql-direction-rtl) {\n  padding-left: 28.5em;\n}\n.ql-editor .ql-indent-9.ql-direction-rtl.ql-align-right {\n  padding-right: 27em;\n}\n.ql-editor li.ql-indent-9.ql-direction-rtl.ql-align-right {\n  padding-right: 28.5em;\n}\n.ql-editor .ql-video {\n  display: block;\n  max-width: 100%;\n}\n.ql-editor .ql-video.ql-align-center {\n  margin: 0 auto;\n}\n.ql-editor .ql-video.ql-align-right {\n  margin: 0 0 0 auto;\n}\n.ql-editor .ql-bg-black {\n  background-color: #000;\n}\n.ql-editor .ql-bg-red {\n  background-color: #e60000;\n}\n.ql-editor .ql-bg-orange {\n  background-color: #f90;\n}\n.ql-editor .ql-bg-yellow {\n  background-color: #ff0;\n}\n.ql-editor .ql-bg-green {\n  background-color: #008a00;\n}\n.ql-editor .ql-bg-blue {\n  background-color: #06c;\n}\n.ql-editor .ql-bg-purple {\n  background-color: #93f;\n}\n.ql-editor .ql-color-white {\n  color: #fff;\n}\n.ql-editor .ql-color-red {\n  color: #e60000;\n}\n.ql-editor .ql-color-orange {\n  color: #f90;\n}\n.ql-editor .ql-color-yellow {\n  color: #ff0;\n}\n.ql-editor .ql-color-green {\n  color: #008a00;\n}\n.ql-editor .ql-color-blue {\n  color: #06c;\n}\n.ql-editor .ql-color-purple {\n  color: #93f;\n}\n.ql-editor .ql-font-serif {\n  font-family: Georgia, Times New Roman, serif;\n}\n.ql-editor .ql-font-monospace {\n  font-family: Monaco, Courier New, monospace;\n}\n.ql-editor .ql-size-small {\n  font-size: 0.75em;\n}\n.ql-editor .ql-size-large {\n  font-size: 1.5em;\n}\n.ql-editor .ql-size-huge {\n  font-size: 2.5em;\n}\n.ql-editor .ql-direction-rtl {\n  direction: rtl;\n  text-align: inherit;\n}\n.ql-editor .ql-align-center {\n  text-align: center;\n}\n.ql-editor .ql-align-justify {\n  text-align: justify;\n}\n.ql-editor .ql-align-right {\n  text-align: right;\n}\n.ql-editor.ql-blank::before {\n  color: rgba(0,0,0,0.6);\n  content: attr(data-placeholder);\n  font-style: italic;\n  left: 15px;\n  pointer-events: none;\n  position: absolute;\n  right: 15px;\n}\n.ql-bubble.ql-toolbar:after,\n.ql-bubble .ql-toolbar:after {\n  clear: both;\n  content: '';\n  display: table;\n}\n.ql-bubble.ql-toolbar button,\n.ql-bubble .ql-toolbar button {\n  background: none;\n  border: none;\n  cursor: pointer;\n  display: inline-block;\n  float: left;\n  height: 24px;\n  padding: 3px 5px;\n  width: 28px;\n}\n.ql-bubble.ql-toolbar button svg,\n.ql-bubble .ql-toolbar button svg {\n  float: left;\n  height: 100%;\n}\n.ql-bubble.ql-toolbar button:active:hover,\n.ql-bubble .ql-toolbar button:active:hover {\n  outline: none;\n}\n.ql-bubble.ql-toolbar input.ql-image[type=file],\n.ql-bubble .ql-toolbar input.ql-image[type=file] {\n  display: none;\n}\n.ql-bubble.ql-toolbar button:hover,\n.ql-bubble .ql-toolbar button:hover,\n.ql-bubble.ql-toolbar button:focus,\n.ql-bubble .ql-toolbar button:focus,\n.ql-bubble.ql-toolbar button.ql-active,\n.ql-bubble .ql-toolbar button.ql-active,\n.ql-bubble.ql-toolbar .ql-picker-label:hover,\n.ql-bubble .ql-toolbar .ql-picker-label:hover,\n.ql-bubble.ql-toolbar .ql-picker-label.ql-active,\n.ql-bubble .ql-toolbar .ql-picker-label.ql-active,\n.ql-bubble.ql-toolbar .ql-picker-item:hover,\n.ql-bubble .ql-toolbar .ql-picker-item:hover,\n.ql-bubble.ql-toolbar .ql-picker-item.ql-selected,\n.ql-bubble .ql-toolbar .ql-picker-item.ql-selected {\n  color: #fff;\n}\n.ql-bubble.ql-toolbar button:hover .ql-fill,\n.ql-bubble .ql-toolbar button:hover .ql-fill,\n.ql-bubble.ql-toolbar button:focus .ql-fill,\n.ql-bubble .ql-toolbar button:focus .ql-fill,\n.ql-bubble.ql-toolbar button.ql-active .ql-fill,\n.ql-bubble .ql-toolbar button.ql-active .ql-fill,\n.ql-bubble.ql-toolbar .ql-picker-label:hover .ql-fill,\n.ql-bubble .ql-toolbar .ql-picker-label:hover .ql-fill,\n.ql-bubble.ql-toolbar .ql-picker-label.ql-active .ql-fill,\n.ql-bubble .ql-toolbar .ql-picker-label.ql-active .ql-fill,\n.ql-bubble.ql-toolbar .ql-picker-item:hover .ql-fill,\n.ql-bubble .ql-toolbar .ql-picker-item:hover .ql-fill,\n.ql-bubble.ql-toolbar .ql-picker-item.ql-selected .ql-fill,\n.ql-bubble .ql-toolbar .ql-picker-item.ql-selected .ql-fill,\n.ql-bubble.ql-toolbar button:hover .ql-stroke.ql-fill,\n.ql-bubble .ql-toolbar button:hover .ql-stroke.ql-fill,\n.ql-bubble.ql-toolbar button:focus .ql-stroke.ql-fill,\n.ql-bubble .ql-toolbar button:focus .ql-stroke.ql-fill,\n.ql-bubble.ql-toolbar button.ql-active .ql-stroke.ql-fill,\n.ql-bubble .ql-toolbar button.ql-active .ql-stroke.ql-fill,\n.ql-bubble.ql-toolbar .ql-picker-label:hover .ql-stroke.ql-fill,\n.ql-bubble .ql-toolbar .ql-picker-label:hover .ql-stroke.ql-fill,\n.ql-bubble.ql-toolbar .ql-picker-label.ql-active .ql-stroke.ql-fill,\n.ql-bubble .ql-toolbar .ql-picker-label.ql-active .ql-stroke.ql-fill,\n.ql-bubble.ql-toolbar .ql-picker-item:hover .ql-stroke.ql-fill,\n.ql-bubble .ql-toolbar .ql-picker-item:hover .ql-stroke.ql-fill,\n.ql-bubble.ql-toolbar .ql-picker-item.ql-selected .ql-stroke.ql-fill,\n.ql-bubble .ql-toolbar .ql-picker-item.ql-selected .ql-stroke.ql-fill {\n  fill: #fff;\n}\n.ql-bubble.ql-toolbar button:hover .ql-stroke,\n.ql-bubble .ql-toolbar button:hover .ql-stroke,\n.ql-bubble.ql-toolbar button:focus .ql-stroke,\n.ql-bubble .ql-toolbar button:focus .ql-stroke,\n.ql-bubble.ql-toolbar button.ql-active .ql-stroke,\n.ql-bubble .ql-toolbar button.ql-active .ql-stroke,\n.ql-bubble.ql-toolbar .ql-picker-label:hover .ql-stroke,\n.ql-bubble .ql-toolbar .ql-picker-label:hover .ql-stroke,\n.ql-bubble.ql-toolbar .ql-picker-label.ql-active .ql-stroke,\n.ql-bubble .ql-toolbar .ql-picker-label.ql-active .ql-stroke,\n.ql-bubble.ql-toolbar .ql-picker-item:hover .ql-stroke,\n.ql-bubble .ql-toolbar .ql-picker-item:hover .ql-stroke,\n.ql-bubble.ql-toolbar .ql-picker-item.ql-selected .ql-stroke,\n.ql-bubble .ql-toolbar .ql-picker-item.ql-selected .ql-stroke,\n.ql-bubble.ql-toolbar button:hover .ql-stroke-miter,\n.ql-bubble .ql-toolbar button:hover .ql-stroke-miter,\n.ql-bubble.ql-toolbar button:focus .ql-stroke-miter,\n.ql-bubble .ql-toolbar button:focus .ql-stroke-miter,\n.ql-bubble.ql-toolbar button.ql-active .ql-stroke-miter,\n.ql-bubble .ql-toolbar button.ql-active .ql-stroke-miter,\n.ql-bubble.ql-toolbar .ql-picker-label:hover .ql-stroke-miter,\n.ql-bubble .ql-toolbar .ql-picker-label:hover .ql-stroke-miter,\n.ql-bubble.ql-toolbar .ql-picker-label.ql-active .ql-stroke-miter,\n.ql-bubble .ql-toolbar .ql-picker-label.ql-active .ql-stroke-miter,\n.ql-bubble.ql-toolbar .ql-picker-item:hover .ql-stroke-miter,\n.ql-bubble .ql-toolbar .ql-picker-item:hover .ql-stroke-miter,\n.ql-bubble.ql-toolbar .ql-picker-item.ql-selected .ql-stroke-miter,\n.ql-bubble .ql-toolbar .ql-picker-item.ql-selected .ql-stroke-miter {\n  stroke: #fff;\n}\n@media (pointer: coarse) {\n  .ql-bubble.ql-toolbar button:hover:not(.ql-active),\n  .ql-bubble .ql-toolbar button:hover:not(.ql-active) {\n    color: #ccc;\n  }\n  .ql-bubble.ql-toolbar button:hover:not(.ql-active) .ql-fill,\n  .ql-bubble .ql-toolbar button:hover:not(.ql-active) .ql-fill,\n  .ql-bubble.ql-toolbar button:hover:not(.ql-active) .ql-stroke.ql-fill,\n  .ql-bubble .ql-toolbar button:hover:not(.ql-active) .ql-stroke.ql-fill {\n    fill: #ccc;\n  }\n  .ql-bubble.ql-toolbar button:hover:not(.ql-active) .ql-stroke,\n  .ql-bubble .ql-toolbar button:hover:not(.ql-active) .ql-stroke,\n  .ql-bubble.ql-toolbar button:hover:not(.ql-active) .ql-stroke-miter,\n  .ql-bubble .ql-toolbar button:hover:not(.ql-active) .ql-stroke-miter {\n    stroke: #ccc;\n  }\n}\n.ql-bubble {\n  box-sizing: border-box;\n}\n.ql-bubble * {\n  box-sizing: border-box;\n}\n.ql-bubble .ql-hidden {\n  display: none;\n}\n.ql-bubble .ql-out-bottom,\n.ql-bubble .ql-out-top {\n  visibility: hidden;\n}\n.ql-bubble .ql-tooltip {\n  position: absolute;\n  transform: translateY(10px);\n}\n.ql-bubble .ql-tooltip a {\n  cursor: pointer;\n  text-decoration: none;\n}\n.ql-bubble .ql-tooltip.ql-flip {\n  transform: translateY(-10px);\n}\n.ql-bubble .ql-formats {\n  display: inline-block;\n  vertical-align: middle;\n}\n.ql-bubble .ql-formats:after {\n  clear: both;\n  content: '';\n  display: table;\n}\n.ql-bubble .ql-stroke {\n  fill: none;\n  stroke: #ccc;\n  stroke-linecap: round;\n  stroke-linejoin: round;\n  stroke-width: 2;\n}\n.ql-bubble .ql-stroke-miter {\n  fill: none;\n  stroke: #ccc;\n  stroke-miterlimit: 10;\n  stroke-width: 2;\n}\n.ql-bubble .ql-fill,\n.ql-bubble .ql-stroke.ql-fill {\n  fill: #ccc;\n}\n.ql-bubble .ql-empty {\n  fill: none;\n}\n.ql-bubble .ql-even {\n  fill-rule: evenodd;\n}\n.ql-bubble .ql-thin,\n.ql-bubble .ql-stroke.ql-thin {\n  stroke-width: 1;\n}\n.ql-bubble .ql-transparent {\n  opacity: 0.4;\n}\n.ql-bubble .ql-direction svg:last-child {\n  display: none;\n}\n.ql-bubble .ql-direction.ql-active svg:last-child {\n  display: inline;\n}\n.ql-bubble .ql-direction.ql-active svg:first-child {\n  display: none;\n}\n.ql-bubble .ql-editor h1 {\n  font-size: 2em;\n}\n.ql-bubble .ql-editor h2 {\n  font-size: 1.5em;\n}\n.ql-bubble .ql-editor h3 {\n  font-size: 1.17em;\n}\n.ql-bubble .ql-editor h4 {\n  font-size: 1em;\n}\n.ql-bubble .ql-editor h5 {\n  font-size: 0.83em;\n}\n.ql-bubble .ql-editor h6 {\n  font-size: 0.67em;\n}\n.ql-bubble .ql-editor a {\n  text-decoration: underline;\n}\n.ql-bubble .ql-editor blockquote {\n  border-left: 4px solid #ccc;\n  margin-bottom: 5px;\n  margin-top: 5px;\n  padding-left: 16px;\n}\n.ql-bubble .ql-editor code,\n.ql-bubble .ql-editor pre {\n  background-color: #f0f0f0;\n  border-radius: 3px;\n}\n.ql-bubble .ql-editor pre {\n  white-space: pre-wrap;\n  margin-bottom: 5px;\n  margin-top: 5px;\n  padding: 5px 10px;\n}\n.ql-bubble .ql-editor code {\n  font-size: 85%;\n  padding: 2px 4px;\n}\n.ql-bubble .ql-editor pre.ql-syntax {\n  background-color: #23241f;\n  color: #f8f8f2;\n  overflow: visible;\n}\n.ql-bubble .ql-editor img {\n  max-width: 100%;\n}\n.ql-bubble .ql-picker {\n  color: #ccc;\n  display: inline-block;\n  float: left;\n  font-size: 14px;\n  font-weight: 500;\n  height: 24px;\n  position: relative;\n  vertical-align: middle;\n}\n.ql-bubble .ql-picker-label {\n  cursor: pointer;\n  display: inline-block;\n  height: 100%;\n  padding-left: 8px;\n  padding-right: 2px;\n  position: relative;\n  width: 100%;\n}\n.ql-bubble .ql-picker-label::before {\n  display: inline-block;\n  line-height: 22px;\n}\n.ql-bubble .ql-picker-options {\n  background-color: #444;\n  display: none;\n  min-width: 100%;\n  padding: 4px 8px;\n  position: absolute;\n  white-space: nowrap;\n}\n.ql-bubble .ql-picker-options .ql-picker-item {\n  cursor: pointer;\n  display: block;\n  padding-bottom: 5px;\n  padding-top: 5px;\n}\n.ql-bubble .ql-picker.ql-expanded .ql-picker-label {\n  color: #777;\n  z-index: 2;\n}\n.ql-bubble .ql-picker.ql-expanded .ql-picker-label .ql-fill {\n  fill: #777;\n}\n.ql-bubble .ql-picker.ql-expanded .ql-picker-label .ql-stroke {\n  stroke: #777;\n}\n.ql-bubble .ql-picker.ql-expanded .ql-picker-options {\n  display: block;\n  margin-top: -1px;\n  top: 100%;\n  z-index: 1;\n}\n.ql-bubble .ql-color-picker,\n.ql-bubble .ql-icon-picker {\n  width: 28px;\n}\n.ql-bubble .ql-color-picker .ql-picker-label,\n.ql-bubble .ql-icon-picker .ql-picker-label {\n  padding: 2px 4px;\n}\n.ql-bubble .ql-color-picker .ql-picker-label svg,\n.ql-bubble .ql-icon-picker .ql-picker-label svg {\n  right: 4px;\n}\n.ql-bubble .ql-icon-picker .ql-picker-options {\n  padding: 4px 0px;\n}\n.ql-bubble .ql-icon-picker .ql-picker-item {\n  height: 24px;\n  width: 24px;\n  padding: 2px 4px;\n}\n.ql-bubble .ql-color-picker .ql-picker-options {\n  padding: 3px 5px;\n  width: 152px;\n}\n.ql-bubble .ql-color-picker .ql-picker-item {\n  border: 1px solid transparent;\n  float: left;\n  height: 16px;\n  margin: 2px;\n  padding: 0px;\n  width: 16px;\n}\n.ql-bubble .ql-picker:not(.ql-color-picker):not(.ql-icon-picker) svg {\n  position: absolute;\n  margin-top: -9px;\n  right: 0;\n  top: 50%;\n  width: 18px;\n}\n.ql-bubble .ql-picker.ql-header .ql-picker-label[data-label]:not([data-label=''])::before,\n.ql-bubble .ql-picker.ql-font .ql-picker-label[data-label]:not([data-label=''])::before,\n.ql-bubble .ql-picker.ql-size .ql-picker-label[data-label]:not([data-label=''])::before,\n.ql-bubble .ql-picker.ql-header .ql-picker-item[data-label]:not([data-label=''])::before,\n.ql-bubble .ql-picker.ql-font .ql-picker-item[data-label]:not([data-label=''])::before,\n.ql-bubble .ql-picker.ql-size .ql-picker-item[data-label]:not([data-label=''])::before {\n  content: attr(data-label);\n}\n.ql-bubble .ql-picker.ql-header {\n  width: 98px;\n}\n.ql-bubble .ql-picker.ql-header .ql-picker-label::before,\n.ql-bubble .ql-picker.ql-header .ql-picker-item::before {\n  content: 'Normal';\n}\n.ql-bubble .ql-picker.ql-header .ql-picker-label[data-value=\"1\"]::before,\n.ql-bubble .ql-picker.ql-header .ql-picker-item[data-value=\"1\"]::before {\n  content: 'Heading 1';\n}\n.ql-bubble .ql-picker.ql-header .ql-picker-label[data-value=\"2\"]::before,\n.ql-bubble .ql-picker.ql-header .ql-picker-item[data-value=\"2\"]::before {\n  content: 'Heading 2';\n}\n.ql-bubble .ql-picker.ql-header .ql-picker-label[data-value=\"3\"]::before,\n.ql-bubble .ql-picker.ql-header .ql-picker-item[data-value=\"3\"]::before {\n  content: 'Heading 3';\n}\n.ql-bubble .ql-picker.ql-header .ql-picker-label[data-value=\"4\"]::before,\n.ql-bubble .ql-picker.ql-header .ql-picker-item[data-value=\"4\"]::before {\n  content: 'Heading 4';\n}\n.ql-bubble .ql-picker.ql-header .ql-picker-label[data-value=\"5\"]::before,\n.ql-bubble .ql-picker.ql-header .ql-picker-item[data-value=\"5\"]::before {\n  content: 'Heading 5';\n}\n.ql-bubble .ql-picker.ql-header .ql-picker-label[data-value=\"6\"]::before,\n.ql-bubble .ql-picker.ql-header .ql-picker-item[data-value=\"6\"]::before {\n  content: 'Heading 6';\n}\n.ql-bubble .ql-picker.ql-header .ql-picker-item[data-value=\"1\"]::before {\n  font-size: 2em;\n}\n.ql-bubble .ql-picker.ql-header .ql-picker-item[data-value=\"2\"]::before {\n  font-size: 1.5em;\n}\n.ql-bubble .ql-picker.ql-header .ql-picker-item[data-value=\"3\"]::before {\n  font-size: 1.17em;\n}\n.ql-bubble .ql-picker.ql-header .ql-picker-item[data-value=\"4\"]::before {\n  font-size: 1em;\n}\n.ql-bubble .ql-picker.ql-header .ql-picker-item[data-value=\"5\"]::before {\n  font-size: 0.83em;\n}\n.ql-bubble .ql-picker.ql-header .ql-picker-item[data-value=\"6\"]::before {\n  font-size: 0.67em;\n}\n.ql-bubble .ql-picker.ql-font {\n  width: 108px;\n}\n.ql-bubble .ql-picker.ql-font .ql-picker-label::before,\n.ql-bubble .ql-picker.ql-font .ql-picker-item::before {\n  content: 'Sans Serif';\n}\n.ql-bubble .ql-picker.ql-font .ql-picker-label[data-value=serif]::before,\n.ql-bubble .ql-picker.ql-font .ql-picker-item[data-value=serif]::before {\n  content: 'Serif';\n}\n.ql-bubble .ql-picker.ql-font .ql-picker-label[data-value=monospace]::before,\n.ql-bubble .ql-picker.ql-font .ql-picker-item[data-value=monospace]::before {\n  content: 'Monospace';\n}\n.ql-bubble .ql-picker.ql-font .ql-picker-item[data-value=serif]::before {\n  font-family: Georgia, Times New Roman, serif;\n}\n.ql-bubble .ql-picker.ql-font .ql-picker-item[data-value=monospace]::before {\n  font-family: Monaco, Courier New, monospace;\n}\n.ql-bubble .ql-picker.ql-size {\n  width: 98px;\n}\n.ql-bubble .ql-picker.ql-size .ql-picker-label::before,\n.ql-bubble .ql-picker.ql-size .ql-picker-item::before {\n  content: 'Normal';\n}\n.ql-bubble .ql-picker.ql-size .ql-picker-label[data-value=small]::before,\n.ql-bubble .ql-picker.ql-size .ql-picker-item[data-value=small]::before {\n  content: 'Small';\n}\n.ql-bubble .ql-picker.ql-size .ql-picker-label[data-value=large]::before,\n.ql-bubble .ql-picker.ql-size .ql-picker-item[data-value=large]::before {\n  content: 'Large';\n}\n.ql-bubble .ql-picker.ql-size .ql-picker-label[data-value=huge]::before,\n.ql-bubble .ql-picker.ql-size .ql-picker-item[data-value=huge]::before {\n  content: 'Huge';\n}\n.ql-bubble .ql-picker.ql-size .ql-picker-item[data-value=small]::before {\n  font-size: 10px;\n}\n.ql-bubble .ql-picker.ql-size .ql-picker-item[data-value=large]::before {\n  font-size: 18px;\n}\n.ql-bubble .ql-picker.ql-size .ql-picker-item[data-value=huge]::before {\n  font-size: 32px;\n}\n.ql-bubble .ql-color-picker.ql-background .ql-picker-item {\n  background-color: #fff;\n}\n.ql-bubble .ql-color-picker.ql-color .ql-picker-item {\n  background-color: #000;\n}\n.ql-bubble .ql-toolbar .ql-formats {\n  margin: 8px 12px 8px 0px;\n}\n.ql-bubble .ql-toolbar .ql-formats:first-child {\n  margin-left: 12px;\n}\n.ql-bubble .ql-color-picker svg {\n  margin: 1px;\n}\n.ql-bubble .ql-color-picker .ql-picker-item.ql-selected,\n.ql-bubble .ql-color-picker .ql-picker-item:hover {\n  border-color: #fff;\n}\n.ql-bubble .ql-tooltip {\n  background-color: #444;\n  border-radius: 25px;\n  color: #fff;\n}\n.ql-bubble .ql-tooltip-arrow {\n  border-left: 6px solid transparent;\n  border-right: 6px solid transparent;\n  content: \" \";\n  display: block;\n  left: 50%;\n  margin-left: -6px;\n  position: absolute;\n}\n.ql-bubble .ql-tooltip:not(.ql-flip) .ql-tooltip-arrow {\n  border-bottom: 6px solid #444;\n  top: -6px;\n}\n.ql-bubble .ql-tooltip.ql-flip .ql-tooltip-arrow {\n  border-top: 6px solid #444;\n  bottom: -6px;\n}\n.ql-bubble .ql-tooltip.ql-editing .ql-tooltip-editor {\n  display: block;\n}\n.ql-bubble .ql-tooltip.ql-editing .ql-formats {\n  visibility: hidden;\n}\n.ql-bubble .ql-tooltip-editor {\n  display: none;\n}\n.ql-bubble .ql-tooltip-editor input[type=text] {\n  background: transparent;\n  border: none;\n  color: #fff;\n  font-size: 13px;\n  height: 100%;\n  outline: none;\n  padding: 10px 20px;\n  position: absolute;\n  width: 100%;\n}\n.ql-bubble .ql-tooltip-editor a {\n  top: 10px;\n  position: absolute;\n  right: 20px;\n}\n.ql-bubble .ql-tooltip-editor a:before {\n  color: #ccc;\n  content: \"\\D7\";\n  font-size: 16px;\n  font-weight: bold;\n}\n.ql-container.ql-bubble:not(.ql-disabled) a {\n  position: relative;\n  white-space: nowrap;\n}\n.ql-container.ql-bubble:not(.ql-disabled) a::before {\n  background-color: #444;\n  border-radius: 15px;\n  top: -5px;\n  font-size: 12px;\n  color: #fff;\n  content: attr(href);\n  font-weight: normal;\n  overflow: hidden;\n  padding: 5px 15px;\n  text-decoration: none;\n  z-index: 1;\n}\n.ql-container.ql-bubble:not(.ql-disabled) a::after {\n  border-top: 6px solid #444;\n  border-left: 6px solid transparent;\n  border-right: 6px solid transparent;\n  top: 0;\n  content: \" \";\n  height: 0;\n  width: 0;\n}\n.ql-container.ql-bubble:not(.ql-disabled) a::before,\n.ql-container.ql-bubble:not(.ql-disabled) a::after {\n  left: 0;\n  margin-left: 50%;\n  position: absolute;\n  transform: translate(-50%, -100%);\n  transition: visibility 0s ease 200ms;\n  visibility: hidden;\n}\n.ql-container.ql-bubble:not(.ql-disabled) a:hover::before,\n.ql-container.ql-bubble:not(.ql-disabled) a:hover::after {\n  visibility: visible;\n}\n"
  },
  {
    "path": "static/quill/quill.core.css",
    "content": "/*!\n * Quill Editor v1.3.5\n * https://quilljs.com/\n * Copyright (c) 2014, Jason Chen\n * Copyright (c) 2013, salesforce.com\n */\n.ql-container {\n  box-sizing: border-box;\n  font-family: Helvetica, Arial, sans-serif;\n  font-size: 13px;\n  height: 100%;\n  margin: 0px;\n  position: relative;\n}\n.ql-container.ql-disabled .ql-tooltip {\n  visibility: hidden;\n}\n.ql-container.ql-disabled .ql-editor ul[data-checked] > li::before {\n  pointer-events: none;\n}\n.ql-clipboard {\n  left: -100000px;\n  height: 1px;\n  overflow-y: hidden;\n  position: absolute;\n  top: 50%;\n}\n.ql-clipboard p {\n  margin: 0;\n  padding: 0;\n}\n.ql-editor {\n  box-sizing: border-box;\n  line-height: 1.42;\n  height: 100%;\n  outline: none;\n  overflow-y: auto;\n  padding: 12px 15px;\n  tab-size: 4;\n  -moz-tab-size: 4;\n  text-align: left;\n  white-space: pre-wrap;\n  word-wrap: break-word;\n}\n.ql-editor > * {\n  cursor: text;\n}\n.ql-editor p,\n.ql-editor ol,\n.ql-editor ul,\n.ql-editor pre,\n.ql-editor blockquote,\n.ql-editor h1,\n.ql-editor h2,\n.ql-editor h3,\n.ql-editor h4,\n.ql-editor h5,\n.ql-editor h6 {\n  margin: 0;\n  padding: 0;\n  counter-reset: list-1 list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9;\n}\n.ql-editor ol,\n.ql-editor ul {\n  padding-left: 1.5em;\n}\n.ql-editor ol > li,\n.ql-editor ul > li {\n  list-style-type: none;\n}\n.ql-editor ul > li::before {\n  content: '\\2022';\n}\n.ql-editor ul[data-checked=true],\n.ql-editor ul[data-checked=false] {\n  pointer-events: none;\n}\n.ql-editor ul[data-checked=true] > li *,\n.ql-editor ul[data-checked=false] > li * {\n  pointer-events: all;\n}\n.ql-editor ul[data-checked=true] > li::before,\n.ql-editor ul[data-checked=false] > li::before {\n  color: #777;\n  cursor: pointer;\n  pointer-events: all;\n}\n.ql-editor ul[data-checked=true] > li::before {\n  content: '\\2611';\n}\n.ql-editor ul[data-checked=false] > li::before {\n  content: '\\2610';\n}\n.ql-editor li::before {\n  display: inline-block;\n  white-space: nowrap;\n  width: 1.2em;\n}\n.ql-editor li:not(.ql-direction-rtl)::before {\n  margin-left: -1.5em;\n  margin-right: 0.3em;\n  text-align: right;\n}\n.ql-editor li.ql-direction-rtl::before {\n  margin-left: 0.3em;\n  margin-right: -1.5em;\n}\n.ql-editor ol li:not(.ql-direction-rtl),\n.ql-editor ul li:not(.ql-direction-rtl) {\n  padding-left: 1.5em;\n}\n.ql-editor ol li.ql-direction-rtl,\n.ql-editor ul li.ql-direction-rtl {\n  padding-right: 1.5em;\n}\n.ql-editor ol li {\n  counter-reset: list-1 list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9;\n  counter-increment: list-0;\n}\n.ql-editor ol li:before {\n  content: counter(list-0, decimal) '. ';\n}\n.ql-editor ol li.ql-indent-1 {\n  counter-increment: list-1;\n}\n.ql-editor ol li.ql-indent-1:before {\n  content: counter(list-1, lower-alpha) '. ';\n}\n.ql-editor ol li.ql-indent-1 {\n  counter-reset: list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9;\n}\n.ql-editor ol li.ql-indent-2 {\n  counter-increment: list-2;\n}\n.ql-editor ol li.ql-indent-2:before {\n  content: counter(list-2, lower-roman) '. ';\n}\n.ql-editor ol li.ql-indent-2 {\n  counter-reset: list-3 list-4 list-5 list-6 list-7 list-8 list-9;\n}\n.ql-editor ol li.ql-indent-3 {\n  counter-increment: list-3;\n}\n.ql-editor ol li.ql-indent-3:before {\n  content: counter(list-3, decimal) '. ';\n}\n.ql-editor ol li.ql-indent-3 {\n  counter-reset: list-4 list-5 list-6 list-7 list-8 list-9;\n}\n.ql-editor ol li.ql-indent-4 {\n  counter-increment: list-4;\n}\n.ql-editor ol li.ql-indent-4:before {\n  content: counter(list-4, lower-alpha) '. ';\n}\n.ql-editor ol li.ql-indent-4 {\n  counter-reset: list-5 list-6 list-7 list-8 list-9;\n}\n.ql-editor ol li.ql-indent-5 {\n  counter-increment: list-5;\n}\n.ql-editor ol li.ql-indent-5:before {\n  content: counter(list-5, lower-roman) '. ';\n}\n.ql-editor ol li.ql-indent-5 {\n  counter-reset: list-6 list-7 list-8 list-9;\n}\n.ql-editor ol li.ql-indent-6 {\n  counter-increment: list-6;\n}\n.ql-editor ol li.ql-indent-6:before {\n  content: counter(list-6, decimal) '. ';\n}\n.ql-editor ol li.ql-indent-6 {\n  counter-reset: list-7 list-8 list-9;\n}\n.ql-editor ol li.ql-indent-7 {\n  counter-increment: list-7;\n}\n.ql-editor ol li.ql-indent-7:before {\n  content: counter(list-7, lower-alpha) '. ';\n}\n.ql-editor ol li.ql-indent-7 {\n  counter-reset: list-8 list-9;\n}\n.ql-editor ol li.ql-indent-8 {\n  counter-increment: list-8;\n}\n.ql-editor ol li.ql-indent-8:before {\n  content: counter(list-8, lower-roman) '. ';\n}\n.ql-editor ol li.ql-indent-8 {\n  counter-reset: list-9;\n}\n.ql-editor ol li.ql-indent-9 {\n  counter-increment: list-9;\n}\n.ql-editor ol li.ql-indent-9:before {\n  content: counter(list-9, decimal) '. ';\n}\n.ql-editor .ql-indent-1:not(.ql-direction-rtl) {\n  padding-left: 3em;\n}\n.ql-editor li.ql-indent-1:not(.ql-direction-rtl) {\n  padding-left: 4.5em;\n}\n.ql-editor .ql-indent-1.ql-direction-rtl.ql-align-right {\n  padding-right: 3em;\n}\n.ql-editor li.ql-indent-1.ql-direction-rtl.ql-align-right {\n  padding-right: 4.5em;\n}\n.ql-editor .ql-indent-2:not(.ql-direction-rtl) {\n  padding-left: 6em;\n}\n.ql-editor li.ql-indent-2:not(.ql-direction-rtl) {\n  padding-left: 7.5em;\n}\n.ql-editor .ql-indent-2.ql-direction-rtl.ql-align-right {\n  padding-right: 6em;\n}\n.ql-editor li.ql-indent-2.ql-direction-rtl.ql-align-right {\n  padding-right: 7.5em;\n}\n.ql-editor .ql-indent-3:not(.ql-direction-rtl) {\n  padding-left: 9em;\n}\n.ql-editor li.ql-indent-3:not(.ql-direction-rtl) {\n  padding-left: 10.5em;\n}\n.ql-editor .ql-indent-3.ql-direction-rtl.ql-align-right {\n  padding-right: 9em;\n}\n.ql-editor li.ql-indent-3.ql-direction-rtl.ql-align-right {\n  padding-right: 10.5em;\n}\n.ql-editor .ql-indent-4:not(.ql-direction-rtl) {\n  padding-left: 12em;\n}\n.ql-editor li.ql-indent-4:not(.ql-direction-rtl) {\n  padding-left: 13.5em;\n}\n.ql-editor .ql-indent-4.ql-direction-rtl.ql-align-right {\n  padding-right: 12em;\n}\n.ql-editor li.ql-indent-4.ql-direction-rtl.ql-align-right {\n  padding-right: 13.5em;\n}\n.ql-editor .ql-indent-5:not(.ql-direction-rtl) {\n  padding-left: 15em;\n}\n.ql-editor li.ql-indent-5:not(.ql-direction-rtl) {\n  padding-left: 16.5em;\n}\n.ql-editor .ql-indent-5.ql-direction-rtl.ql-align-right {\n  padding-right: 15em;\n}\n.ql-editor li.ql-indent-5.ql-direction-rtl.ql-align-right {\n  padding-right: 16.5em;\n}\n.ql-editor .ql-indent-6:not(.ql-direction-rtl) {\n  padding-left: 18em;\n}\n.ql-editor li.ql-indent-6:not(.ql-direction-rtl) {\n  padding-left: 19.5em;\n}\n.ql-editor .ql-indent-6.ql-direction-rtl.ql-align-right {\n  padding-right: 18em;\n}\n.ql-editor li.ql-indent-6.ql-direction-rtl.ql-align-right {\n  padding-right: 19.5em;\n}\n.ql-editor .ql-indent-7:not(.ql-direction-rtl) {\n  padding-left: 21em;\n}\n.ql-editor li.ql-indent-7:not(.ql-direction-rtl) {\n  padding-left: 22.5em;\n}\n.ql-editor .ql-indent-7.ql-direction-rtl.ql-align-right {\n  padding-right: 21em;\n}\n.ql-editor li.ql-indent-7.ql-direction-rtl.ql-align-right {\n  padding-right: 22.5em;\n}\n.ql-editor .ql-indent-8:not(.ql-direction-rtl) {\n  padding-left: 24em;\n}\n.ql-editor li.ql-indent-8:not(.ql-direction-rtl) {\n  padding-left: 25.5em;\n}\n.ql-editor .ql-indent-8.ql-direction-rtl.ql-align-right {\n  padding-right: 24em;\n}\n.ql-editor li.ql-indent-8.ql-direction-rtl.ql-align-right {\n  padding-right: 25.5em;\n}\n.ql-editor .ql-indent-9:not(.ql-direction-rtl) {\n  padding-left: 27em;\n}\n.ql-editor li.ql-indent-9:not(.ql-direction-rtl) {\n  padding-left: 28.5em;\n}\n.ql-editor .ql-indent-9.ql-direction-rtl.ql-align-right {\n  padding-right: 27em;\n}\n.ql-editor li.ql-indent-9.ql-direction-rtl.ql-align-right {\n  padding-right: 28.5em;\n}\n.ql-editor .ql-video {\n  display: block;\n  max-width: 100%;\n}\n.ql-editor .ql-video.ql-align-center {\n  margin: 0 auto;\n}\n.ql-editor .ql-video.ql-align-right {\n  margin: 0 0 0 auto;\n}\n.ql-editor .ql-bg-black {\n  background-color: #000;\n}\n.ql-editor .ql-bg-red {\n  background-color: #e60000;\n}\n.ql-editor .ql-bg-orange {\n  background-color: #f90;\n}\n.ql-editor .ql-bg-yellow {\n  background-color: #ff0;\n}\n.ql-editor .ql-bg-green {\n  background-color: #008a00;\n}\n.ql-editor .ql-bg-blue {\n  background-color: #06c;\n}\n.ql-editor .ql-bg-purple {\n  background-color: #93f;\n}\n.ql-editor .ql-color-white {\n  color: #fff;\n}\n.ql-editor .ql-color-red {\n  color: #e60000;\n}\n.ql-editor .ql-color-orange {\n  color: #f90;\n}\n.ql-editor .ql-color-yellow {\n  color: #ff0;\n}\n.ql-editor .ql-color-green {\n  color: #008a00;\n}\n.ql-editor .ql-color-blue {\n  color: #06c;\n}\n.ql-editor .ql-color-purple {\n  color: #93f;\n}\n.ql-editor .ql-font-serif {\n  font-family: Georgia, Times New Roman, serif;\n}\n.ql-editor .ql-font-monospace {\n  font-family: Monaco, Courier New, monospace;\n}\n.ql-editor .ql-size-small {\n  font-size: 0.75em;\n}\n.ql-editor .ql-size-large {\n  font-size: 1.5em;\n}\n.ql-editor .ql-size-huge {\n  font-size: 2.5em;\n}\n.ql-editor .ql-direction-rtl {\n  direction: rtl;\n  text-align: inherit;\n}\n.ql-editor .ql-align-center {\n  text-align: center;\n}\n.ql-editor .ql-align-justify {\n  text-align: justify;\n}\n.ql-editor .ql-align-right {\n  text-align: right;\n}\n.ql-editor.ql-blank::before {\n  color: rgba(0,0,0,0.6);\n  content: attr(data-placeholder);\n  font-style: italic;\n  left: 15px;\n  pointer-events: none;\n  position: absolute;\n  right: 15px;\n}\n"
  },
  {
    "path": "static/quill/quill.core.js",
    "content": "/*!\n * Quill Editor v1.3.5\n * https://quilljs.com/\n * Copyright (c) 2014, Jason Chen\n * Copyright (c) 2013, salesforce.com\n */\n(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"Quill\"] = factory();\n\telse\n\t\troot[\"Quill\"] = factory();\n})(this, function() {\nreturn /******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId]) {\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/ \t\t}\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\ti: moduleId,\n/******/ \t\t\tl: false,\n/******/ \t\t\texports: {}\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.l = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// define getter function for harmony exports\n/******/ \t__webpack_require__.d = function(exports, name, getter) {\n/******/ \t\tif(!__webpack_require__.o(exports, name)) {\n/******/ \t\t\tObject.defineProperty(exports, name, {\n/******/ \t\t\t\tconfigurable: false,\n/******/ \t\t\t\tenumerable: true,\n/******/ \t\t\t\tget: getter\n/******/ \t\t\t});\n/******/ \t\t}\n/******/ \t};\n/******/\n/******/ \t// getDefaultExport function for compatibility with non-harmony modules\n/******/ \t__webpack_require__.n = function(module) {\n/******/ \t\tvar getter = module && module.__esModule ?\n/******/ \t\t\tfunction getDefault() { return module['default']; } :\n/******/ \t\t\tfunction getModuleExports() { return module; };\n/******/ \t\t__webpack_require__.d(getter, 'a', getter);\n/******/ \t\treturn getter;\n/******/ \t};\n/******/\n/******/ \t// Object.prototype.hasOwnProperty.call\n/******/ \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(__webpack_require__.s = 110);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar container_1 = __webpack_require__(17);\nvar format_1 = __webpack_require__(18);\nvar leaf_1 = __webpack_require__(19);\nvar scroll_1 = __webpack_require__(45);\nvar inline_1 = __webpack_require__(46);\nvar block_1 = __webpack_require__(47);\nvar embed_1 = __webpack_require__(48);\nvar text_1 = __webpack_require__(49);\nvar attributor_1 = __webpack_require__(12);\nvar class_1 = __webpack_require__(31);\nvar style_1 = __webpack_require__(32);\nvar store_1 = __webpack_require__(30);\nvar Registry = __webpack_require__(1);\nvar Parchment = {\n    Scope: Registry.Scope,\n    create: Registry.create,\n    find: Registry.find,\n    query: Registry.query,\n    register: Registry.register,\n    Container: container_1.default,\n    Format: format_1.default,\n    Leaf: leaf_1.default,\n    Embed: embed_1.default,\n    Scroll: scroll_1.default,\n    Block: block_1.default,\n    Inline: inline_1.default,\n    Text: text_1.default,\n    Attributor: {\n        Attribute: attributor_1.default,\n        Class: class_1.default,\n        Style: style_1.default,\n        Store: store_1.default,\n    },\n};\nexports.default = Parchment;\n\n\n/***/ }),\n/* 1 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar __extends = (this && this.__extends) || (function () {\n    var extendStatics = Object.setPrototypeOf ||\n        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar ParchmentError = /** @class */ (function (_super) {\n    __extends(ParchmentError, _super);\n    function ParchmentError(message) {\n        var _this = this;\n        message = '[Parchment] ' + message;\n        _this = _super.call(this, message) || this;\n        _this.message = message;\n        _this.name = _this.constructor.name;\n        return _this;\n    }\n    return ParchmentError;\n}(Error));\nexports.ParchmentError = ParchmentError;\nvar attributes = {};\nvar classes = {};\nvar tags = {};\nvar types = {};\nexports.DATA_KEY = '__blot';\nvar Scope;\n(function (Scope) {\n    Scope[Scope[\"TYPE\"] = 3] = \"TYPE\";\n    Scope[Scope[\"LEVEL\"] = 12] = \"LEVEL\";\n    Scope[Scope[\"ATTRIBUTE\"] = 13] = \"ATTRIBUTE\";\n    Scope[Scope[\"BLOT\"] = 14] = \"BLOT\";\n    Scope[Scope[\"INLINE\"] = 7] = \"INLINE\";\n    Scope[Scope[\"BLOCK\"] = 11] = \"BLOCK\";\n    Scope[Scope[\"BLOCK_BLOT\"] = 10] = \"BLOCK_BLOT\";\n    Scope[Scope[\"INLINE_BLOT\"] = 6] = \"INLINE_BLOT\";\n    Scope[Scope[\"BLOCK_ATTRIBUTE\"] = 9] = \"BLOCK_ATTRIBUTE\";\n    Scope[Scope[\"INLINE_ATTRIBUTE\"] = 5] = \"INLINE_ATTRIBUTE\";\n    Scope[Scope[\"ANY\"] = 15] = \"ANY\";\n})(Scope = exports.Scope || (exports.Scope = {}));\nfunction create(input, value) {\n    var match = query(input);\n    if (match == null) {\n        throw new ParchmentError(\"Unable to create \" + input + \" blot\");\n    }\n    var BlotClass = match;\n    var node = \n    // @ts-ignore\n    input instanceof Node || input['nodeType'] === Node.TEXT_NODE ? input : BlotClass.create(value);\n    return new BlotClass(node, value);\n}\nexports.create = create;\nfunction find(node, bubble) {\n    if (bubble === void 0) { bubble = false; }\n    if (node == null)\n        return null;\n    // @ts-ignore\n    if (node[exports.DATA_KEY] != null)\n        return node[exports.DATA_KEY].blot;\n    if (bubble)\n        return find(node.parentNode, bubble);\n    return null;\n}\nexports.find = find;\nfunction query(query, scope) {\n    if (scope === void 0) { scope = Scope.ANY; }\n    var match;\n    if (typeof query === 'string') {\n        match = types[query] || attributes[query];\n        // @ts-ignore\n    }\n    else if (query instanceof Text || query['nodeType'] === Node.TEXT_NODE) {\n        match = types['text'];\n    }\n    else if (typeof query === 'number') {\n        if (query & Scope.LEVEL & Scope.BLOCK) {\n            match = types['block'];\n        }\n        else if (query & Scope.LEVEL & Scope.INLINE) {\n            match = types['inline'];\n        }\n    }\n    else if (query instanceof HTMLElement) {\n        var names = (query.getAttribute('class') || '').split(/\\s+/);\n        for (var i in names) {\n            match = classes[names[i]];\n            if (match)\n                break;\n        }\n        match = match || tags[query.tagName];\n    }\n    if (match == null)\n        return null;\n    // @ts-ignore\n    if (scope & Scope.LEVEL & match.scope && scope & Scope.TYPE & match.scope)\n        return match;\n    return null;\n}\nexports.query = query;\nfunction register() {\n    var Definitions = [];\n    for (var _i = 0; _i < arguments.length; _i++) {\n        Definitions[_i] = arguments[_i];\n    }\n    if (Definitions.length > 1) {\n        return Definitions.map(function (d) {\n            return register(d);\n        });\n    }\n    var Definition = Definitions[0];\n    if (typeof Definition.blotName !== 'string' && typeof Definition.attrName !== 'string') {\n        throw new ParchmentError('Invalid definition');\n    }\n    else if (Definition.blotName === 'abstract') {\n        throw new ParchmentError('Cannot register abstract class');\n    }\n    types[Definition.blotName || Definition.attrName] = Definition;\n    if (typeof Definition.keyName === 'string') {\n        attributes[Definition.keyName] = Definition;\n    }\n    else {\n        if (Definition.className != null) {\n            classes[Definition.className] = Definition;\n        }\n        if (Definition.tagName != null) {\n            if (Array.isArray(Definition.tagName)) {\n                Definition.tagName = Definition.tagName.map(function (tagName) {\n                    return tagName.toUpperCase();\n                });\n            }\n            else {\n                Definition.tagName = Definition.tagName.toUpperCase();\n            }\n            var tagNames = Array.isArray(Definition.tagName) ? Definition.tagName : [Definition.tagName];\n            tagNames.forEach(function (tag) {\n                if (tags[tag] == null || Definition.className == null) {\n                    tags[tag] = Definition;\n                }\n            });\n        }\n    }\n    return Definition;\n}\nexports.register = register;\n\n\n/***/ }),\n/* 2 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar diff = __webpack_require__(51);\nvar equal = __webpack_require__(11);\nvar extend = __webpack_require__(3);\nvar op = __webpack_require__(20);\n\n\nvar NULL_CHARACTER = String.fromCharCode(0);  // Placeholder char for embed in diff()\n\n\nvar Delta = function (ops) {\n  // Assume we are given a well formed ops\n  if (Array.isArray(ops)) {\n    this.ops = ops;\n  } else if (ops != null && Array.isArray(ops.ops)) {\n    this.ops = ops.ops;\n  } else {\n    this.ops = [];\n  }\n};\n\n\nDelta.prototype.insert = function (text, attributes) {\n  var newOp = {};\n  if (text.length === 0) return this;\n  newOp.insert = text;\n  if (attributes != null && typeof attributes === 'object' && Object.keys(attributes).length > 0) {\n    newOp.attributes = attributes;\n  }\n  return this.push(newOp);\n};\n\nDelta.prototype['delete'] = function (length) {\n  if (length <= 0) return this;\n  return this.push({ 'delete': length });\n};\n\nDelta.prototype.retain = function (length, attributes) {\n  if (length <= 0) return this;\n  var newOp = { retain: length };\n  if (attributes != null && typeof attributes === 'object' && Object.keys(attributes).length > 0) {\n    newOp.attributes = attributes;\n  }\n  return this.push(newOp);\n};\n\nDelta.prototype.push = function (newOp) {\n  var index = this.ops.length;\n  var lastOp = this.ops[index - 1];\n  newOp = extend(true, {}, newOp);\n  if (typeof lastOp === 'object') {\n    if (typeof newOp['delete'] === 'number' && typeof lastOp['delete'] === 'number') {\n      this.ops[index - 1] = { 'delete': lastOp['delete'] + newOp['delete'] };\n      return this;\n    }\n    // Since it does not matter if we insert before or after deleting at the same index,\n    // always prefer to insert first\n    if (typeof lastOp['delete'] === 'number' && newOp.insert != null) {\n      index -= 1;\n      lastOp = this.ops[index - 1];\n      if (typeof lastOp !== 'object') {\n        this.ops.unshift(newOp);\n        return this;\n      }\n    }\n    if (equal(newOp.attributes, lastOp.attributes)) {\n      if (typeof newOp.insert === 'string' && typeof lastOp.insert === 'string') {\n        this.ops[index - 1] = { insert: lastOp.insert + newOp.insert };\n        if (typeof newOp.attributes === 'object') this.ops[index - 1].attributes = newOp.attributes\n        return this;\n      } else if (typeof newOp.retain === 'number' && typeof lastOp.retain === 'number') {\n        this.ops[index - 1] = { retain: lastOp.retain + newOp.retain };\n        if (typeof newOp.attributes === 'object') this.ops[index - 1].attributes = newOp.attributes\n        return this;\n      }\n    }\n  }\n  if (index === this.ops.length) {\n    this.ops.push(newOp);\n  } else {\n    this.ops.splice(index, 0, newOp);\n  }\n  return this;\n};\n\nDelta.prototype.chop = function () {\n  var lastOp = this.ops[this.ops.length - 1];\n  if (lastOp && lastOp.retain && !lastOp.attributes) {\n    this.ops.pop();\n  }\n  return this;\n};\n\nDelta.prototype.filter = function (predicate) {\n  return this.ops.filter(predicate);\n};\n\nDelta.prototype.forEach = function (predicate) {\n  this.ops.forEach(predicate);\n};\n\nDelta.prototype.map = function (predicate) {\n  return this.ops.map(predicate);\n};\n\nDelta.prototype.partition = function (predicate) {\n  var passed = [], failed = [];\n  this.forEach(function(op) {\n    var target = predicate(op) ? passed : failed;\n    target.push(op);\n  });\n  return [passed, failed];\n};\n\nDelta.prototype.reduce = function (predicate, initial) {\n  return this.ops.reduce(predicate, initial);\n};\n\nDelta.prototype.changeLength = function () {\n  return this.reduce(function (length, elem) {\n    if (elem.insert) {\n      return length + op.length(elem);\n    } else if (elem.delete) {\n      return length - elem.delete;\n    }\n    return length;\n  }, 0);\n};\n\nDelta.prototype.length = function () {\n  return this.reduce(function (length, elem) {\n    return length + op.length(elem);\n  }, 0);\n};\n\nDelta.prototype.slice = function (start, end) {\n  start = start || 0;\n  if (typeof end !== 'number') end = Infinity;\n  var ops = [];\n  var iter = op.iterator(this.ops);\n  var index = 0;\n  while (index < end && iter.hasNext()) {\n    var nextOp;\n    if (index < start) {\n      nextOp = iter.next(start - index);\n    } else {\n      nextOp = iter.next(end - index);\n      ops.push(nextOp);\n    }\n    index += op.length(nextOp);\n  }\n  return new Delta(ops);\n};\n\n\nDelta.prototype.compose = function (other) {\n  var thisIter = op.iterator(this.ops);\n  var otherIter = op.iterator(other.ops);\n  var delta = new Delta();\n  while (thisIter.hasNext() || otherIter.hasNext()) {\n    if (otherIter.peekType() === 'insert') {\n      delta.push(otherIter.next());\n    } else if (thisIter.peekType() === 'delete') {\n      delta.push(thisIter.next());\n    } else {\n      var length = Math.min(thisIter.peekLength(), otherIter.peekLength());\n      var thisOp = thisIter.next(length);\n      var otherOp = otherIter.next(length);\n      if (typeof otherOp.retain === 'number') {\n        var newOp = {};\n        if (typeof thisOp.retain === 'number') {\n          newOp.retain = length;\n        } else {\n          newOp.insert = thisOp.insert;\n        }\n        // Preserve null when composing with a retain, otherwise remove it for inserts\n        var attributes = op.attributes.compose(thisOp.attributes, otherOp.attributes, typeof thisOp.retain === 'number');\n        if (attributes) newOp.attributes = attributes;\n        delta.push(newOp);\n      // Other op should be delete, we could be an insert or retain\n      // Insert + delete cancels out\n      } else if (typeof otherOp['delete'] === 'number' && typeof thisOp.retain === 'number') {\n        delta.push(otherOp);\n      }\n    }\n  }\n  return delta.chop();\n};\n\nDelta.prototype.concat = function (other) {\n  var delta = new Delta(this.ops.slice());\n  if (other.ops.length > 0) {\n    delta.push(other.ops[0]);\n    delta.ops = delta.ops.concat(other.ops.slice(1));\n  }\n  return delta;\n};\n\nDelta.prototype.diff = function (other, index) {\n  if (this.ops === other.ops) {\n    return new Delta();\n  }\n  var strings = [this, other].map(function (delta) {\n    return delta.map(function (op) {\n      if (op.insert != null) {\n        return typeof op.insert === 'string' ? op.insert : NULL_CHARACTER;\n      }\n      var prep = (delta === other) ? 'on' : 'with';\n      throw new Error('diff() called ' + prep + ' non-document');\n    }).join('');\n  });\n  var delta = new Delta();\n  var diffResult = diff(strings[0], strings[1], index);\n  var thisIter = op.iterator(this.ops);\n  var otherIter = op.iterator(other.ops);\n  diffResult.forEach(function (component) {\n    var length = component[1].length;\n    while (length > 0) {\n      var opLength = 0;\n      switch (component[0]) {\n        case diff.INSERT:\n          opLength = Math.min(otherIter.peekLength(), length);\n          delta.push(otherIter.next(opLength));\n          break;\n        case diff.DELETE:\n          opLength = Math.min(length, thisIter.peekLength());\n          thisIter.next(opLength);\n          delta['delete'](opLength);\n          break;\n        case diff.EQUAL:\n          opLength = Math.min(thisIter.peekLength(), otherIter.peekLength(), length);\n          var thisOp = thisIter.next(opLength);\n          var otherOp = otherIter.next(opLength);\n          if (equal(thisOp.insert, otherOp.insert)) {\n            delta.retain(opLength, op.attributes.diff(thisOp.attributes, otherOp.attributes));\n          } else {\n            delta.push(otherOp)['delete'](opLength);\n          }\n          break;\n      }\n      length -= opLength;\n    }\n  });\n  return delta.chop();\n};\n\nDelta.prototype.eachLine = function (predicate, newline) {\n  newline = newline || '\\n';\n  var iter = op.iterator(this.ops);\n  var line = new Delta();\n  var i = 0;\n  while (iter.hasNext()) {\n    if (iter.peekType() !== 'insert') return;\n    var thisOp = iter.peek();\n    var start = op.length(thisOp) - iter.peekLength();\n    var index = typeof thisOp.insert === 'string' ?\n      thisOp.insert.indexOf(newline, start) - start : -1;\n    if (index < 0) {\n      line.push(iter.next());\n    } else if (index > 0) {\n      line.push(iter.next(index));\n    } else {\n      if (predicate(line, iter.next(1).attributes || {}, i) === false) {\n        return;\n      }\n      i += 1;\n      line = new Delta();\n    }\n  }\n  if (line.length() > 0) {\n    predicate(line, {}, i);\n  }\n};\n\nDelta.prototype.transform = function (other, priority) {\n  priority = !!priority;\n  if (typeof other === 'number') {\n    return this.transformPosition(other, priority);\n  }\n  var thisIter = op.iterator(this.ops);\n  var otherIter = op.iterator(other.ops);\n  var delta = new Delta();\n  while (thisIter.hasNext() || otherIter.hasNext()) {\n    if (thisIter.peekType() === 'insert' && (priority || otherIter.peekType() !== 'insert')) {\n      delta.retain(op.length(thisIter.next()));\n    } else if (otherIter.peekType() === 'insert') {\n      delta.push(otherIter.next());\n    } else {\n      var length = Math.min(thisIter.peekLength(), otherIter.peekLength());\n      var thisOp = thisIter.next(length);\n      var otherOp = otherIter.next(length);\n      if (thisOp['delete']) {\n        // Our delete either makes their delete redundant or removes their retain\n        continue;\n      } else if (otherOp['delete']) {\n        delta.push(otherOp);\n      } else {\n        // We retain either their retain or insert\n        delta.retain(length, op.attributes.transform(thisOp.attributes, otherOp.attributes, priority));\n      }\n    }\n  }\n  return delta.chop();\n};\n\nDelta.prototype.transformPosition = function (index, priority) {\n  priority = !!priority;\n  var thisIter = op.iterator(this.ops);\n  var offset = 0;\n  while (thisIter.hasNext() && offset <= index) {\n    var length = thisIter.peekLength();\n    var nextType = thisIter.peekType();\n    thisIter.next();\n    if (nextType === 'delete') {\n      index -= Math.min(length, index - offset);\n      continue;\n    } else if (nextType === 'insert' && (offset < index || !priority)) {\n      index += length;\n    }\n    offset += length;\n  }\n  return index;\n};\n\n\nmodule.exports = Delta;\n\n\n/***/ }),\n/* 3 */\n/***/ (function(module, exports) {\n\n'use strict';\n\nvar hasOwn = Object.prototype.hasOwnProperty;\nvar toStr = Object.prototype.toString;\n\nvar isArray = function isArray(arr) {\n\tif (typeof Array.isArray === 'function') {\n\t\treturn Array.isArray(arr);\n\t}\n\n\treturn toStr.call(arr) === '[object Array]';\n};\n\nvar isPlainObject = function isPlainObject(obj) {\n\tif (!obj || toStr.call(obj) !== '[object Object]') {\n\t\treturn false;\n\t}\n\n\tvar hasOwnConstructor = hasOwn.call(obj, 'constructor');\n\tvar hasIsPrototypeOf = obj.constructor && obj.constructor.prototype && hasOwn.call(obj.constructor.prototype, 'isPrototypeOf');\n\t// Not own constructor property must be Object\n\tif (obj.constructor && !hasOwnConstructor && !hasIsPrototypeOf) {\n\t\treturn false;\n\t}\n\n\t// Own properties are enumerated firstly, so to speed up,\n\t// if last one is own, then all properties are own.\n\tvar key;\n\tfor (key in obj) { /**/ }\n\n\treturn typeof key === 'undefined' || hasOwn.call(obj, key);\n};\n\nmodule.exports = function extend() {\n\tvar options, name, src, copy, copyIsArray, clone;\n\tvar target = arguments[0];\n\tvar i = 1;\n\tvar length = arguments.length;\n\tvar deep = false;\n\n\t// Handle a deep copy situation\n\tif (typeof target === 'boolean') {\n\t\tdeep = target;\n\t\ttarget = arguments[1] || {};\n\t\t// skip the boolean and the target\n\t\ti = 2;\n\t}\n\tif (target == null || (typeof target !== 'object' && typeof target !== 'function')) {\n\t\ttarget = {};\n\t}\n\n\tfor (; i < length; ++i) {\n\t\toptions = arguments[i];\n\t\t// Only deal with non-null/undefined values\n\t\tif (options != null) {\n\t\t\t// Extend the base object\n\t\t\tfor (name in options) {\n\t\t\t\tsrc = target[name];\n\t\t\t\tcopy = options[name];\n\n\t\t\t\t// Prevent never-ending loop\n\t\t\t\tif (target !== copy) {\n\t\t\t\t\t// Recurse if we're merging plain objects or arrays\n\t\t\t\t\tif (deep && copy && (isPlainObject(copy) || (copyIsArray = isArray(copy)))) {\n\t\t\t\t\t\tif (copyIsArray) {\n\t\t\t\t\t\t\tcopyIsArray = false;\n\t\t\t\t\t\t\tclone = src && isArray(src) ? src : [];\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tclone = src && isPlainObject(src) ? src : {};\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Never move original objects, clone them\n\t\t\t\t\t\ttarget[name] = extend(deep, clone, copy);\n\n\t\t\t\t\t// Don't bring in undefined values\n\t\t\t\t\t} else if (typeof copy !== 'undefined') {\n\t\t\t\t\t\ttarget[name] = copy;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// Return the modified object\n\treturn target;\n};\n\n\n/***/ }),\n/* 4 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.default = exports.BlockEmbed = exports.bubbleFormats = undefined;\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if (\"value\" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };\n\nvar _extend = __webpack_require__(3);\n\nvar _extend2 = _interopRequireDefault(_extend);\n\nvar _quillDelta = __webpack_require__(2);\n\nvar _quillDelta2 = _interopRequireDefault(_quillDelta);\n\nvar _parchment = __webpack_require__(0);\n\nvar _parchment2 = _interopRequireDefault(_parchment);\n\nvar _break = __webpack_require__(16);\n\nvar _break2 = _interopRequireDefault(_break);\n\nvar _inline = __webpack_require__(6);\n\nvar _inline2 = _interopRequireDefault(_inline);\n\nvar _text = __webpack_require__(7);\n\nvar _text2 = _interopRequireDefault(_text);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar NEWLINE_LENGTH = 1;\n\nvar BlockEmbed = function (_Parchment$Embed) {\n  _inherits(BlockEmbed, _Parchment$Embed);\n\n  function BlockEmbed() {\n    _classCallCheck(this, BlockEmbed);\n\n    return _possibleConstructorReturn(this, (BlockEmbed.__proto__ || Object.getPrototypeOf(BlockEmbed)).apply(this, arguments));\n  }\n\n  _createClass(BlockEmbed, [{\n    key: 'attach',\n    value: function attach() {\n      _get(BlockEmbed.prototype.__proto__ || Object.getPrototypeOf(BlockEmbed.prototype), 'attach', this).call(this);\n      this.attributes = new _parchment2.default.Attributor.Store(this.domNode);\n    }\n  }, {\n    key: 'delta',\n    value: function delta() {\n      return new _quillDelta2.default().insert(this.value(), (0, _extend2.default)(this.formats(), this.attributes.values()));\n    }\n  }, {\n    key: 'format',\n    value: function format(name, value) {\n      var attribute = _parchment2.default.query(name, _parchment2.default.Scope.BLOCK_ATTRIBUTE);\n      if (attribute != null) {\n        this.attributes.attribute(attribute, value);\n      }\n    }\n  }, {\n    key: 'formatAt',\n    value: function formatAt(index, length, name, value) {\n      this.format(name, value);\n    }\n  }, {\n    key: 'insertAt',\n    value: function insertAt(index, value, def) {\n      if (typeof value === 'string' && value.endsWith('\\n')) {\n        var block = _parchment2.default.create(Block.blotName);\n        this.parent.insertBefore(block, index === 0 ? this : this.next);\n        block.insertAt(0, value.slice(0, -1));\n      } else {\n        _get(BlockEmbed.prototype.__proto__ || Object.getPrototypeOf(BlockEmbed.prototype), 'insertAt', this).call(this, index, value, def);\n      }\n    }\n  }]);\n\n  return BlockEmbed;\n}(_parchment2.default.Embed);\n\nBlockEmbed.scope = _parchment2.default.Scope.BLOCK_BLOT;\n// It is important for cursor behavior BlockEmbeds use tags that are block level elements\n\n\nvar Block = function (_Parchment$Block) {\n  _inherits(Block, _Parchment$Block);\n\n  function Block(domNode) {\n    _classCallCheck(this, Block);\n\n    var _this2 = _possibleConstructorReturn(this, (Block.__proto__ || Object.getPrototypeOf(Block)).call(this, domNode));\n\n    _this2.cache = {};\n    return _this2;\n  }\n\n  _createClass(Block, [{\n    key: 'delta',\n    value: function delta() {\n      if (this.cache.delta == null) {\n        this.cache.delta = this.descendants(_parchment2.default.Leaf).reduce(function (delta, leaf) {\n          if (leaf.length() === 0) {\n            return delta;\n          } else {\n            return delta.insert(leaf.value(), bubbleFormats(leaf));\n          }\n        }, new _quillDelta2.default()).insert('\\n', bubbleFormats(this));\n      }\n      return this.cache.delta;\n    }\n  }, {\n    key: 'deleteAt',\n    value: function deleteAt(index, length) {\n      _get(Block.prototype.__proto__ || Object.getPrototypeOf(Block.prototype), 'deleteAt', this).call(this, index, length);\n      this.cache = {};\n    }\n  }, {\n    key: 'formatAt',\n    value: function formatAt(index, length, name, value) {\n      if (length <= 0) return;\n      if (_parchment2.default.query(name, _parchment2.default.Scope.BLOCK)) {\n        if (index + length === this.length()) {\n          this.format(name, value);\n        }\n      } else {\n        _get(Block.prototype.__proto__ || Object.getPrototypeOf(Block.prototype), 'formatAt', this).call(this, index, Math.min(length, this.length() - index - 1), name, value);\n      }\n      this.cache = {};\n    }\n  }, {\n    key: 'insertAt',\n    value: function insertAt(index, value, def) {\n      if (def != null) return _get(Block.prototype.__proto__ || Object.getPrototypeOf(Block.prototype), 'insertAt', this).call(this, index, value, def);\n      if (value.length === 0) return;\n      var lines = value.split('\\n');\n      var text = lines.shift();\n      if (text.length > 0) {\n        if (index < this.length() - 1 || this.children.tail == null) {\n          _get(Block.prototype.__proto__ || Object.getPrototypeOf(Block.prototype), 'insertAt', this).call(this, Math.min(index, this.length() - 1), text);\n        } else {\n          this.children.tail.insertAt(this.children.tail.length(), text);\n        }\n        this.cache = {};\n      }\n      var block = this;\n      lines.reduce(function (index, line) {\n        block = block.split(index, true);\n        block.insertAt(0, line);\n        return line.length;\n      }, index + text.length);\n    }\n  }, {\n    key: 'insertBefore',\n    value: function insertBefore(blot, ref) {\n      var head = this.children.head;\n      _get(Block.prototype.__proto__ || Object.getPrototypeOf(Block.prototype), 'insertBefore', this).call(this, blot, ref);\n      if (head instanceof _break2.default) {\n        head.remove();\n      }\n      this.cache = {};\n    }\n  }, {\n    key: 'length',\n    value: function length() {\n      if (this.cache.length == null) {\n        this.cache.length = _get(Block.prototype.__proto__ || Object.getPrototypeOf(Block.prototype), 'length', this).call(this) + NEWLINE_LENGTH;\n      }\n      return this.cache.length;\n    }\n  }, {\n    key: 'moveChildren',\n    value: function moveChildren(target, ref) {\n      _get(Block.prototype.__proto__ || Object.getPrototypeOf(Block.prototype), 'moveChildren', this).call(this, target, ref);\n      this.cache = {};\n    }\n  }, {\n    key: 'optimize',\n    value: function optimize(context) {\n      _get(Block.prototype.__proto__ || Object.getPrototypeOf(Block.prototype), 'optimize', this).call(this, context);\n      this.cache = {};\n    }\n  }, {\n    key: 'path',\n    value: function path(index) {\n      return _get(Block.prototype.__proto__ || Object.getPrototypeOf(Block.prototype), 'path', this).call(this, index, true);\n    }\n  }, {\n    key: 'removeChild',\n    value: function removeChild(child) {\n      _get(Block.prototype.__proto__ || Object.getPrototypeOf(Block.prototype), 'removeChild', this).call(this, child);\n      this.cache = {};\n    }\n  }, {\n    key: 'split',\n    value: function split(index) {\n      var force = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n\n      if (force && (index === 0 || index >= this.length() - NEWLINE_LENGTH)) {\n        var clone = this.clone();\n        if (index === 0) {\n          this.parent.insertBefore(clone, this);\n          return this;\n        } else {\n          this.parent.insertBefore(clone, this.next);\n          return clone;\n        }\n      } else {\n        var next = _get(Block.prototype.__proto__ || Object.getPrototypeOf(Block.prototype), 'split', this).call(this, index, force);\n        this.cache = {};\n        return next;\n      }\n    }\n  }]);\n\n  return Block;\n}(_parchment2.default.Block);\n\nBlock.blotName = 'block';\nBlock.tagName = 'P';\nBlock.defaultChild = 'break';\nBlock.allowedChildren = [_inline2.default, _parchment2.default.Embed, _text2.default];\n\nfunction bubbleFormats(blot) {\n  var formats = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n  if (blot == null) return formats;\n  if (typeof blot.formats === 'function') {\n    formats = (0, _extend2.default)(formats, blot.formats());\n  }\n  if (blot.parent == null || blot.parent.blotName == 'scroll' || blot.parent.statics.scope !== blot.statics.scope) {\n    return formats;\n  }\n  return bubbleFormats(blot.parent, formats);\n}\n\nexports.bubbleFormats = bubbleFormats;\nexports.BlockEmbed = BlockEmbed;\nexports.default = Block;\n\n/***/ }),\n/* 5 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.default = exports.overload = exports.expandConfig = undefined;\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nvar _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"]) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); } }; }();\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\n__webpack_require__(50);\n\nvar _quillDelta = __webpack_require__(2);\n\nvar _quillDelta2 = _interopRequireDefault(_quillDelta);\n\nvar _editor = __webpack_require__(14);\n\nvar _editor2 = _interopRequireDefault(_editor);\n\nvar _emitter3 = __webpack_require__(8);\n\nvar _emitter4 = _interopRequireDefault(_emitter3);\n\nvar _module = __webpack_require__(9);\n\nvar _module2 = _interopRequireDefault(_module);\n\nvar _parchment = __webpack_require__(0);\n\nvar _parchment2 = _interopRequireDefault(_parchment);\n\nvar _selection = __webpack_require__(15);\n\nvar _selection2 = _interopRequireDefault(_selection);\n\nvar _extend = __webpack_require__(3);\n\nvar _extend2 = _interopRequireDefault(_extend);\n\nvar _logger = __webpack_require__(10);\n\nvar _logger2 = _interopRequireDefault(_logger);\n\nvar _theme = __webpack_require__(33);\n\nvar _theme2 = _interopRequireDefault(_theme);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar debug = (0, _logger2.default)('quill');\n\nvar Quill = function () {\n  _createClass(Quill, null, [{\n    key: 'debug',\n    value: function debug(limit) {\n      if (limit === true) {\n        limit = 'log';\n      }\n      _logger2.default.level(limit);\n    }\n  }, {\n    key: 'find',\n    value: function find(node) {\n      return node.__quill || _parchment2.default.find(node);\n    }\n  }, {\n    key: 'import',\n    value: function _import(name) {\n      if (this.imports[name] == null) {\n        debug.error('Cannot import ' + name + '. Are you sure it was registered?');\n      }\n      return this.imports[name];\n    }\n  }, {\n    key: 'register',\n    value: function register(path, target) {\n      var _this = this;\n\n      var overwrite = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n\n      if (typeof path !== 'string') {\n        var name = path.attrName || path.blotName;\n        if (typeof name === 'string') {\n          // register(Blot | Attributor, overwrite)\n          this.register('formats/' + name, path, target);\n        } else {\n          Object.keys(path).forEach(function (key) {\n            _this.register(key, path[key], target);\n          });\n        }\n      } else {\n        if (this.imports[path] != null && !overwrite) {\n          debug.warn('Overwriting ' + path + ' with', target);\n        }\n        this.imports[path] = target;\n        if ((path.startsWith('blots/') || path.startsWith('formats/')) && target.blotName !== 'abstract') {\n          _parchment2.default.register(target);\n        } else if (path.startsWith('modules') && typeof target.register === 'function') {\n          target.register();\n        }\n      }\n    }\n  }]);\n\n  function Quill(container) {\n    var _this2 = this;\n\n    var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n    _classCallCheck(this, Quill);\n\n    this.options = expandConfig(container, options);\n    this.container = this.options.container;\n    if (this.container == null) {\n      return debug.error('Invalid Quill container', container);\n    }\n    if (this.options.debug) {\n      Quill.debug(this.options.debug);\n    }\n    var html = this.container.innerHTML.trim();\n    this.container.classList.add('ql-container');\n    this.container.innerHTML = '';\n    this.container.__quill = this;\n    this.root = this.addContainer('ql-editor');\n    this.root.classList.add('ql-blank');\n    this.root.setAttribute('data-gramm', false);\n    this.scrollingContainer = this.options.scrollingContainer || this.root;\n    this.emitter = new _emitter4.default();\n    this.scroll = _parchment2.default.create(this.root, {\n      emitter: this.emitter,\n      whitelist: this.options.formats\n    });\n    this.editor = new _editor2.default(this.scroll);\n    this.selection = new _selection2.default(this.scroll, this.emitter);\n    this.theme = new this.options.theme(this, this.options);\n    this.keyboard = this.theme.addModule('keyboard');\n    this.clipboard = this.theme.addModule('clipboard');\n    this.history = this.theme.addModule('history');\n    this.theme.init();\n    this.emitter.on(_emitter4.default.events.EDITOR_CHANGE, function (type) {\n      if (type === _emitter4.default.events.TEXT_CHANGE) {\n        _this2.root.classList.toggle('ql-blank', _this2.editor.isBlank());\n      }\n    });\n    this.emitter.on(_emitter4.default.events.SCROLL_UPDATE, function (source, mutations) {\n      var range = _this2.selection.lastRange;\n      var index = range && range.length === 0 ? range.index : undefined;\n      modify.call(_this2, function () {\n        return _this2.editor.update(null, mutations, index);\n      }, source);\n    });\n    var contents = this.clipboard.convert('<div class=\\'ql-editor\\' style=\"white-space: normal;\">' + html + '<p><br></p></div>');\n    this.setContents(contents);\n    this.history.clear();\n    if (this.options.placeholder) {\n      this.root.setAttribute('data-placeholder', this.options.placeholder);\n    }\n    if (this.options.readOnly) {\n      this.disable();\n    }\n  }\n\n  _createClass(Quill, [{\n    key: 'addContainer',\n    value: function addContainer(container) {\n      var refNode = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;\n\n      if (typeof container === 'string') {\n        var className = container;\n        container = document.createElement('div');\n        container.classList.add(className);\n      }\n      this.container.insertBefore(container, refNode);\n      return container;\n    }\n  }, {\n    key: 'blur',\n    value: function blur() {\n      this.selection.setRange(null);\n    }\n  }, {\n    key: 'deleteText',\n    value: function deleteText(index, length, source) {\n      var _this3 = this;\n\n      var _overload = overload(index, length, source);\n\n      var _overload2 = _slicedToArray(_overload, 4);\n\n      index = _overload2[0];\n      length = _overload2[1];\n      source = _overload2[3];\n\n      return modify.call(this, function () {\n        return _this3.editor.deleteText(index, length);\n      }, source, index, -1 * length);\n    }\n  }, {\n    key: 'disable',\n    value: function disable() {\n      this.enable(false);\n    }\n  }, {\n    key: 'enable',\n    value: function enable() {\n      var enabled = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;\n\n      this.scroll.enable(enabled);\n      this.container.classList.toggle('ql-disabled', !enabled);\n    }\n  }, {\n    key: 'focus',\n    value: function focus() {\n      var scrollTop = this.scrollingContainer.scrollTop;\n      this.selection.focus();\n      this.scrollingContainer.scrollTop = scrollTop;\n      this.scrollIntoView();\n    }\n  }, {\n    key: 'format',\n    value: function format(name, value) {\n      var _this4 = this;\n\n      var source = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : _emitter4.default.sources.API;\n\n      return modify.call(this, function () {\n        var range = _this4.getSelection(true);\n        var change = new _quillDelta2.default();\n        if (range == null) {\n          return change;\n        } else if (_parchment2.default.query(name, _parchment2.default.Scope.BLOCK)) {\n          change = _this4.editor.formatLine(range.index, range.length, _defineProperty({}, name, value));\n        } else if (range.length === 0) {\n          _this4.selection.format(name, value);\n          return change;\n        } else {\n          change = _this4.editor.formatText(range.index, range.length, _defineProperty({}, name, value));\n        }\n        _this4.setSelection(range, _emitter4.default.sources.SILENT);\n        return change;\n      }, source);\n    }\n  }, {\n    key: 'formatLine',\n    value: function formatLine(index, length, name, value, source) {\n      var _this5 = this;\n\n      var formats = void 0;\n\n      var _overload3 = overload(index, length, name, value, source);\n\n      var _overload4 = _slicedToArray(_overload3, 4);\n\n      index = _overload4[0];\n      length = _overload4[1];\n      formats = _overload4[2];\n      source = _overload4[3];\n\n      return modify.call(this, function () {\n        return _this5.editor.formatLine(index, length, formats);\n      }, source, index, 0);\n    }\n  }, {\n    key: 'formatText',\n    value: function formatText(index, length, name, value, source) {\n      var _this6 = this;\n\n      var formats = void 0;\n\n      var _overload5 = overload(index, length, name, value, source);\n\n      var _overload6 = _slicedToArray(_overload5, 4);\n\n      index = _overload6[0];\n      length = _overload6[1];\n      formats = _overload6[2];\n      source = _overload6[3];\n\n      return modify.call(this, function () {\n        return _this6.editor.formatText(index, length, formats);\n      }, source, index, 0);\n    }\n  }, {\n    key: 'getBounds',\n    value: function getBounds(index) {\n      var length = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n\n      var bounds = void 0;\n      if (typeof index === 'number') {\n        bounds = this.selection.getBounds(index, length);\n      } else {\n        bounds = this.selection.getBounds(index.index, index.length);\n      }\n      var containerBounds = this.container.getBoundingClientRect();\n      return {\n        bottom: bounds.bottom - containerBounds.top,\n        height: bounds.height,\n        left: bounds.left - containerBounds.left,\n        right: bounds.right - containerBounds.left,\n        top: bounds.top - containerBounds.top,\n        width: bounds.width\n      };\n    }\n  }, {\n    key: 'getContents',\n    value: function getContents() {\n      var index = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;\n      var length = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.getLength() - index;\n\n      var _overload7 = overload(index, length);\n\n      var _overload8 = _slicedToArray(_overload7, 2);\n\n      index = _overload8[0];\n      length = _overload8[1];\n\n      return this.editor.getContents(index, length);\n    }\n  }, {\n    key: 'getFormat',\n    value: function getFormat() {\n      var index = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.getSelection(true);\n      var length = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n\n      if (typeof index === 'number') {\n        return this.editor.getFormat(index, length);\n      } else {\n        return this.editor.getFormat(index.index, index.length);\n      }\n    }\n  }, {\n    key: 'getIndex',\n    value: function getIndex(blot) {\n      return blot.offset(this.scroll);\n    }\n  }, {\n    key: 'getLength',\n    value: function getLength() {\n      return this.scroll.length();\n    }\n  }, {\n    key: 'getLeaf',\n    value: function getLeaf(index) {\n      return this.scroll.leaf(index);\n    }\n  }, {\n    key: 'getLine',\n    value: function getLine(index) {\n      return this.scroll.line(index);\n    }\n  }, {\n    key: 'getLines',\n    value: function getLines() {\n      var index = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;\n      var length = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : Number.MAX_VALUE;\n\n      if (typeof index !== 'number') {\n        return this.scroll.lines(index.index, index.length);\n      } else {\n        return this.scroll.lines(index, length);\n      }\n    }\n  }, {\n    key: 'getModule',\n    value: function getModule(name) {\n      return this.theme.modules[name];\n    }\n  }, {\n    key: 'getSelection',\n    value: function getSelection() {\n      var focus = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n\n      if (focus) this.focus();\n      this.update(); // Make sure we access getRange with editor in consistent state\n      return this.selection.getRange()[0];\n    }\n  }, {\n    key: 'getText',\n    value: function getText() {\n      var index = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;\n      var length = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.getLength() - index;\n\n      var _overload9 = overload(index, length);\n\n      var _overload10 = _slicedToArray(_overload9, 2);\n\n      index = _overload10[0];\n      length = _overload10[1];\n\n      return this.editor.getText(index, length);\n    }\n  }, {\n    key: 'hasFocus',\n    value: function hasFocus() {\n      return this.selection.hasFocus();\n    }\n  }, {\n    key: 'insertEmbed',\n    value: function insertEmbed(index, embed, value) {\n      var _this7 = this;\n\n      var source = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : Quill.sources.API;\n\n      return modify.call(this, function () {\n        return _this7.editor.insertEmbed(index, embed, value);\n      }, source, index);\n    }\n  }, {\n    key: 'insertText',\n    value: function insertText(index, text, name, value, source) {\n      var _this8 = this;\n\n      var formats = void 0;\n\n      var _overload11 = overload(index, 0, name, value, source);\n\n      var _overload12 = _slicedToArray(_overload11, 4);\n\n      index = _overload12[0];\n      formats = _overload12[2];\n      source = _overload12[3];\n\n      return modify.call(this, function () {\n        return _this8.editor.insertText(index, text, formats);\n      }, source, index, text.length);\n    }\n  }, {\n    key: 'isEnabled',\n    value: function isEnabled() {\n      return !this.container.classList.contains('ql-disabled');\n    }\n  }, {\n    key: 'off',\n    value: function off() {\n      return this.emitter.off.apply(this.emitter, arguments);\n    }\n  }, {\n    key: 'on',\n    value: function on() {\n      return this.emitter.on.apply(this.emitter, arguments);\n    }\n  }, {\n    key: 'once',\n    value: function once() {\n      return this.emitter.once.apply(this.emitter, arguments);\n    }\n  }, {\n    key: 'pasteHTML',\n    value: function pasteHTML(index, html, source) {\n      this.clipboard.dangerouslyPasteHTML(index, html, source);\n    }\n  }, {\n    key: 'removeFormat',\n    value: function removeFormat(index, length, source) {\n      var _this9 = this;\n\n      var _overload13 = overload(index, length, source);\n\n      var _overload14 = _slicedToArray(_overload13, 4);\n\n      index = _overload14[0];\n      length = _overload14[1];\n      source = _overload14[3];\n\n      return modify.call(this, function () {\n        return _this9.editor.removeFormat(index, length);\n      }, source, index);\n    }\n  }, {\n    key: 'scrollIntoView',\n    value: function scrollIntoView() {\n      this.selection.scrollIntoView(this.scrollingContainer);\n    }\n  }, {\n    key: 'setContents',\n    value: function setContents(delta) {\n      var _this10 = this;\n\n      var source = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : _emitter4.default.sources.API;\n\n      return modify.call(this, function () {\n        delta = new _quillDelta2.default(delta);\n        var length = _this10.getLength();\n        var deleted = _this10.editor.deleteText(0, length);\n        var applied = _this10.editor.applyDelta(delta);\n        var lastOp = applied.ops[applied.ops.length - 1];\n        if (lastOp != null && typeof lastOp.insert === 'string' && lastOp.insert[lastOp.insert.length - 1] === '\\n') {\n          _this10.editor.deleteText(_this10.getLength() - 1, 1);\n          applied.delete(1);\n        }\n        var ret = deleted.compose(applied);\n        return ret;\n      }, source);\n    }\n  }, {\n    key: 'setSelection',\n    value: function setSelection(index, length, source) {\n      if (index == null) {\n        this.selection.setRange(null, length || Quill.sources.API);\n      } else {\n        var _overload15 = overload(index, length, source);\n\n        var _overload16 = _slicedToArray(_overload15, 4);\n\n        index = _overload16[0];\n        length = _overload16[1];\n        source = _overload16[3];\n\n        this.selection.setRange(new _selection.Range(index, length), source);\n        if (source !== _emitter4.default.sources.SILENT) {\n          this.selection.scrollIntoView(this.scrollingContainer);\n        }\n      }\n    }\n  }, {\n    key: 'setText',\n    value: function setText(text) {\n      var source = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : _emitter4.default.sources.API;\n\n      var delta = new _quillDelta2.default().insert(text);\n      return this.setContents(delta, source);\n    }\n  }, {\n    key: 'update',\n    value: function update() {\n      var source = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : _emitter4.default.sources.USER;\n\n      var change = this.scroll.update(source); // Will update selection before selection.update() does if text changes\n      this.selection.update(source);\n      return change;\n    }\n  }, {\n    key: 'updateContents',\n    value: function updateContents(delta) {\n      var _this11 = this;\n\n      var source = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : _emitter4.default.sources.API;\n\n      return modify.call(this, function () {\n        delta = new _quillDelta2.default(delta);\n        return _this11.editor.applyDelta(delta, source);\n      }, source, true);\n    }\n  }]);\n\n  return Quill;\n}();\n\nQuill.DEFAULTS = {\n  bounds: null,\n  formats: null,\n  modules: {},\n  placeholder: '',\n  readOnly: false,\n  scrollingContainer: null,\n  strict: true,\n  theme: 'default'\n};\nQuill.events = _emitter4.default.events;\nQuill.sources = _emitter4.default.sources;\n// eslint-disable-next-line no-undef\nQuill.version =  false ? 'dev' : \"1.3.5\";\n\nQuill.imports = {\n  'delta': _quillDelta2.default,\n  'parchment': _parchment2.default,\n  'core/module': _module2.default,\n  'core/theme': _theme2.default\n};\n\nfunction expandConfig(container, userConfig) {\n  userConfig = (0, _extend2.default)(true, {\n    container: container,\n    modules: {\n      clipboard: true,\n      keyboard: true,\n      history: true\n    }\n  }, userConfig);\n  if (!userConfig.theme || userConfig.theme === Quill.DEFAULTS.theme) {\n    userConfig.theme = _theme2.default;\n  } else {\n    userConfig.theme = Quill.import('themes/' + userConfig.theme);\n    if (userConfig.theme == null) {\n      throw new Error('Invalid theme ' + userConfig.theme + '. Did you register it?');\n    }\n  }\n  var themeConfig = (0, _extend2.default)(true, {}, userConfig.theme.DEFAULTS);\n  [themeConfig, userConfig].forEach(function (config) {\n    config.modules = config.modules || {};\n    Object.keys(config.modules).forEach(function (module) {\n      if (config.modules[module] === true) {\n        config.modules[module] = {};\n      }\n    });\n  });\n  var moduleNames = Object.keys(themeConfig.modules).concat(Object.keys(userConfig.modules));\n  var moduleConfig = moduleNames.reduce(function (config, name) {\n    var moduleClass = Quill.import('modules/' + name);\n    if (moduleClass == null) {\n      debug.error('Cannot load ' + name + ' module. Are you sure you registered it?');\n    } else {\n      config[name] = moduleClass.DEFAULTS || {};\n    }\n    return config;\n  }, {});\n  // Special case toolbar shorthand\n  if (userConfig.modules != null && userConfig.modules.toolbar && userConfig.modules.toolbar.constructor !== Object) {\n    userConfig.modules.toolbar = {\n      container: userConfig.modules.toolbar\n    };\n  }\n  userConfig = (0, _extend2.default)(true, {}, Quill.DEFAULTS, { modules: moduleConfig }, themeConfig, userConfig);\n  ['bounds', 'container', 'scrollingContainer'].forEach(function (key) {\n    if (typeof userConfig[key] === 'string') {\n      userConfig[key] = document.querySelector(userConfig[key]);\n    }\n  });\n  userConfig.modules = Object.keys(userConfig.modules).reduce(function (config, name) {\n    if (userConfig.modules[name]) {\n      config[name] = userConfig.modules[name];\n    }\n    return config;\n  }, {});\n  return userConfig;\n}\n\n// Handle selection preservation and TEXT_CHANGE emission\n// common to modification APIs\nfunction modify(modifier, source, index, shift) {\n  if (this.options.strict && !this.isEnabled() && source === _emitter4.default.sources.USER) {\n    return new _quillDelta2.default();\n  }\n  var range = index == null ? null : this.getSelection();\n  var oldDelta = this.editor.delta;\n  var change = modifier();\n  if (range != null) {\n    if (index === true) index = range.index;\n    if (shift == null) {\n      range = shiftRange(range, change, source);\n    } else if (shift !== 0) {\n      range = shiftRange(range, index, shift, source);\n    }\n    this.setSelection(range, _emitter4.default.sources.SILENT);\n  }\n  if (change.length() > 0) {\n    var _emitter;\n\n    var args = [_emitter4.default.events.TEXT_CHANGE, change, oldDelta, source];\n    (_emitter = this.emitter).emit.apply(_emitter, [_emitter4.default.events.EDITOR_CHANGE].concat(args));\n    if (source !== _emitter4.default.sources.SILENT) {\n      var _emitter2;\n\n      (_emitter2 = this.emitter).emit.apply(_emitter2, args);\n    }\n  }\n  return change;\n}\n\nfunction overload(index, length, name, value, source) {\n  var formats = {};\n  if (typeof index.index === 'number' && typeof index.length === 'number') {\n    // Allow for throwaway end (used by insertText/insertEmbed)\n    if (typeof length !== 'number') {\n      source = value, value = name, name = length, length = index.length, index = index.index;\n    } else {\n      length = index.length, index = index.index;\n    }\n  } else if (typeof length !== 'number') {\n    source = value, value = name, name = length, length = 0;\n  }\n  // Handle format being object, two format name/value strings or excluded\n  if ((typeof name === 'undefined' ? 'undefined' : _typeof(name)) === 'object') {\n    formats = name;\n    source = value;\n  } else if (typeof name === 'string') {\n    if (value != null) {\n      formats[name] = value;\n    } else {\n      source = name;\n    }\n  }\n  // Handle optional source\n  source = source || _emitter4.default.sources.API;\n  return [index, length, formats, source];\n}\n\nfunction shiftRange(range, index, length, source) {\n  if (range == null) return null;\n  var start = void 0,\n      end = void 0;\n  if (index instanceof _quillDelta2.default) {\n    var _map = [range.index, range.index + range.length].map(function (pos) {\n      return index.transformPosition(pos, source !== _emitter4.default.sources.USER);\n    });\n\n    var _map2 = _slicedToArray(_map, 2);\n\n    start = _map2[0];\n    end = _map2[1];\n  } else {\n    var _map3 = [range.index, range.index + range.length].map(function (pos) {\n      if (pos < index || pos === index && source === _emitter4.default.sources.USER) return pos;\n      if (length >= 0) {\n        return pos + length;\n      } else {\n        return Math.max(index, pos + length);\n      }\n    });\n\n    var _map4 = _slicedToArray(_map3, 2);\n\n    start = _map4[0];\n    end = _map4[1];\n  }\n  return new _selection.Range(start, end - start);\n}\n\nexports.expandConfig = expandConfig;\nexports.overload = overload;\nexports.default = Quill;\n\n/***/ }),\n/* 6 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if (\"value\" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };\n\nvar _text = __webpack_require__(7);\n\nvar _text2 = _interopRequireDefault(_text);\n\nvar _parchment = __webpack_require__(0);\n\nvar _parchment2 = _interopRequireDefault(_parchment);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar Inline = function (_Parchment$Inline) {\n  _inherits(Inline, _Parchment$Inline);\n\n  function Inline() {\n    _classCallCheck(this, Inline);\n\n    return _possibleConstructorReturn(this, (Inline.__proto__ || Object.getPrototypeOf(Inline)).apply(this, arguments));\n  }\n\n  _createClass(Inline, [{\n    key: 'formatAt',\n    value: function formatAt(index, length, name, value) {\n      if (Inline.compare(this.statics.blotName, name) < 0 && _parchment2.default.query(name, _parchment2.default.Scope.BLOT)) {\n        var blot = this.isolate(index, length);\n        if (value) {\n          blot.wrap(name, value);\n        }\n      } else {\n        _get(Inline.prototype.__proto__ || Object.getPrototypeOf(Inline.prototype), 'formatAt', this).call(this, index, length, name, value);\n      }\n    }\n  }, {\n    key: 'optimize',\n    value: function optimize(context) {\n      _get(Inline.prototype.__proto__ || Object.getPrototypeOf(Inline.prototype), 'optimize', this).call(this, context);\n      if (this.parent instanceof Inline && Inline.compare(this.statics.blotName, this.parent.statics.blotName) > 0) {\n        var parent = this.parent.isolate(this.offset(), this.length());\n        this.moveChildren(parent);\n        parent.wrap(this);\n      }\n    }\n  }], [{\n    key: 'compare',\n    value: function compare(self, other) {\n      var selfIndex = Inline.order.indexOf(self);\n      var otherIndex = Inline.order.indexOf(other);\n      if (selfIndex >= 0 || otherIndex >= 0) {\n        return selfIndex - otherIndex;\n      } else if (self === other) {\n        return 0;\n      } else if (self < other) {\n        return -1;\n      } else {\n        return 1;\n      }\n    }\n  }]);\n\n  return Inline;\n}(_parchment2.default.Inline);\n\nInline.allowedChildren = [Inline, _parchment2.default.Embed, _text2.default];\n// Lower index means deeper in the DOM tree, since not found (-1) is for embeds\nInline.order = ['cursor', 'inline', // Must be lower\n'underline', 'strike', 'italic', 'bold', 'script', 'link', 'code' // Must be higher\n];\n\nexports.default = Inline;\n\n/***/ }),\n/* 7 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _parchment = __webpack_require__(0);\n\nvar _parchment2 = _interopRequireDefault(_parchment);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar TextBlot = function (_Parchment$Text) {\n  _inherits(TextBlot, _Parchment$Text);\n\n  function TextBlot() {\n    _classCallCheck(this, TextBlot);\n\n    return _possibleConstructorReturn(this, (TextBlot.__proto__ || Object.getPrototypeOf(TextBlot)).apply(this, arguments));\n  }\n\n  return TextBlot;\n}(_parchment2.default.Text);\n\nexports.default = TextBlot;\n\n/***/ }),\n/* 8 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if (\"value\" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };\n\nvar _eventemitter = __webpack_require__(54);\n\nvar _eventemitter2 = _interopRequireDefault(_eventemitter);\n\nvar _logger = __webpack_require__(10);\n\nvar _logger2 = _interopRequireDefault(_logger);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar debug = (0, _logger2.default)('quill:events');\n\nvar EVENTS = ['selectionchange', 'mousedown', 'mouseup', 'click'];\n\nEVENTS.forEach(function (eventName) {\n  document.addEventListener(eventName, function () {\n    for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n      args[_key] = arguments[_key];\n    }\n\n    [].slice.call(document.querySelectorAll('.ql-container')).forEach(function (node) {\n      // TODO use WeakMap\n      if (node.__quill && node.__quill.emitter) {\n        var _node$__quill$emitter;\n\n        (_node$__quill$emitter = node.__quill.emitter).handleDOM.apply(_node$__quill$emitter, args);\n      }\n    });\n  });\n});\n\nvar Emitter = function (_EventEmitter) {\n  _inherits(Emitter, _EventEmitter);\n\n  function Emitter() {\n    _classCallCheck(this, Emitter);\n\n    var _this = _possibleConstructorReturn(this, (Emitter.__proto__ || Object.getPrototypeOf(Emitter)).call(this));\n\n    _this.listeners = {};\n    _this.on('error', debug.error);\n    return _this;\n  }\n\n  _createClass(Emitter, [{\n    key: 'emit',\n    value: function emit() {\n      debug.log.apply(debug, arguments);\n      _get(Emitter.prototype.__proto__ || Object.getPrototypeOf(Emitter.prototype), 'emit', this).apply(this, arguments);\n    }\n  }, {\n    key: 'handleDOM',\n    value: function handleDOM(event) {\n      for (var _len2 = arguments.length, args = Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n        args[_key2 - 1] = arguments[_key2];\n      }\n\n      (this.listeners[event.type] || []).forEach(function (_ref) {\n        var node = _ref.node,\n            handler = _ref.handler;\n\n        if (event.target === node || node.contains(event.target)) {\n          handler.apply(undefined, [event].concat(args));\n        }\n      });\n    }\n  }, {\n    key: 'listenDOM',\n    value: function listenDOM(eventName, node, handler) {\n      if (!this.listeners[eventName]) {\n        this.listeners[eventName] = [];\n      }\n      this.listeners[eventName].push({ node: node, handler: handler });\n    }\n  }]);\n\n  return Emitter;\n}(_eventemitter2.default);\n\nEmitter.events = {\n  EDITOR_CHANGE: 'editor-change',\n  SCROLL_BEFORE_UPDATE: 'scroll-before-update',\n  SCROLL_OPTIMIZE: 'scroll-optimize',\n  SCROLL_UPDATE: 'scroll-update',\n  SELECTION_CHANGE: 'selection-change',\n  TEXT_CHANGE: 'text-change'\n};\nEmitter.sources = {\n  API: 'api',\n  SILENT: 'silent',\n  USER: 'user'\n};\n\nexports.default = Emitter;\n\n/***/ }),\n/* 9 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar Module = function Module(quill) {\n  var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n  _classCallCheck(this, Module);\n\n  this.quill = quill;\n  this.options = options;\n};\n\nModule.DEFAULTS = {};\n\nexports.default = Module;\n\n/***/ }),\n/* 10 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nvar levels = ['error', 'warn', 'log', 'info'];\nvar level = 'warn';\n\nfunction debug(method) {\n  if (levels.indexOf(method) <= levels.indexOf(level)) {\n    var _console;\n\n    for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n      args[_key - 1] = arguments[_key];\n    }\n\n    (_console = console)[method].apply(_console, args); // eslint-disable-line no-console\n  }\n}\n\nfunction namespace(ns) {\n  return levels.reduce(function (logger, method) {\n    logger[method] = debug.bind(console, method, ns);\n    return logger;\n  }, {});\n}\n\ndebug.level = namespace.level = function (newLevel) {\n  level = newLevel;\n};\n\nexports.default = namespace;\n\n/***/ }),\n/* 11 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar pSlice = Array.prototype.slice;\nvar objectKeys = __webpack_require__(52);\nvar isArguments = __webpack_require__(53);\n\nvar deepEqual = module.exports = function (actual, expected, opts) {\n  if (!opts) opts = {};\n  // 7.1. All identical values are equivalent, as determined by ===.\n  if (actual === expected) {\n    return true;\n\n  } else if (actual instanceof Date && expected instanceof Date) {\n    return actual.getTime() === expected.getTime();\n\n  // 7.3. Other pairs that do not both pass typeof value == 'object',\n  // equivalence is determined by ==.\n  } else if (!actual || !expected || typeof actual != 'object' && typeof expected != 'object') {\n    return opts.strict ? actual === expected : actual == expected;\n\n  // 7.4. For all other Object pairs, including Array objects, equivalence is\n  // determined by having the same number of owned properties (as verified\n  // with Object.prototype.hasOwnProperty.call), the same set of keys\n  // (although not necessarily the same order), equivalent values for every\n  // corresponding key, and an identical 'prototype' property. Note: this\n  // accounts for both named and indexed properties on Arrays.\n  } else {\n    return objEquiv(actual, expected, opts);\n  }\n}\n\nfunction isUndefinedOrNull(value) {\n  return value === null || value === undefined;\n}\n\nfunction isBuffer (x) {\n  if (!x || typeof x !== 'object' || typeof x.length !== 'number') return false;\n  if (typeof x.copy !== 'function' || typeof x.slice !== 'function') {\n    return false;\n  }\n  if (x.length > 0 && typeof x[0] !== 'number') return false;\n  return true;\n}\n\nfunction objEquiv(a, b, opts) {\n  var i, key;\n  if (isUndefinedOrNull(a) || isUndefinedOrNull(b))\n    return false;\n  // an identical 'prototype' property.\n  if (a.prototype !== b.prototype) return false;\n  //~~~I've managed to break Object.keys through screwy arguments passing.\n  //   Converting to array solves the problem.\n  if (isArguments(a)) {\n    if (!isArguments(b)) {\n      return false;\n    }\n    a = pSlice.call(a);\n    b = pSlice.call(b);\n    return deepEqual(a, b, opts);\n  }\n  if (isBuffer(a)) {\n    if (!isBuffer(b)) {\n      return false;\n    }\n    if (a.length !== b.length) return false;\n    for (i = 0; i < a.length; i++) {\n      if (a[i] !== b[i]) return false;\n    }\n    return true;\n  }\n  try {\n    var ka = objectKeys(a),\n        kb = objectKeys(b);\n  } catch (e) {//happens when one is a string literal and the other isn't\n    return false;\n  }\n  // having the same number of owned properties (keys incorporates\n  // hasOwnProperty)\n  if (ka.length != kb.length)\n    return false;\n  //the same set of keys (although not necessarily the same order),\n  ka.sort();\n  kb.sort();\n  //~~~cheap key test\n  for (i = ka.length - 1; i >= 0; i--) {\n    if (ka[i] != kb[i])\n      return false;\n  }\n  //equivalent values for every corresponding key, and\n  //~~~possibly expensive deep test\n  for (i = ka.length - 1; i >= 0; i--) {\n    key = ka[i];\n    if (!deepEqual(a[key], b[key], opts)) return false;\n  }\n  return typeof a === typeof b;\n}\n\n\n/***/ }),\n/* 12 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Registry = __webpack_require__(1);\nvar Attributor = /** @class */ (function () {\n    function Attributor(attrName, keyName, options) {\n        if (options === void 0) { options = {}; }\n        this.attrName = attrName;\n        this.keyName = keyName;\n        var attributeBit = Registry.Scope.TYPE & Registry.Scope.ATTRIBUTE;\n        if (options.scope != null) {\n            // Ignore type bits, force attribute bit\n            this.scope = (options.scope & Registry.Scope.LEVEL) | attributeBit;\n        }\n        else {\n            this.scope = Registry.Scope.ATTRIBUTE;\n        }\n        if (options.whitelist != null)\n            this.whitelist = options.whitelist;\n    }\n    Attributor.keys = function (node) {\n        return [].map.call(node.attributes, function (item) {\n            return item.name;\n        });\n    };\n    Attributor.prototype.add = function (node, value) {\n        if (!this.canAdd(node, value))\n            return false;\n        node.setAttribute(this.keyName, value);\n        return true;\n    };\n    Attributor.prototype.canAdd = function (node, value) {\n        var match = Registry.query(node, Registry.Scope.BLOT & (this.scope | Registry.Scope.TYPE));\n        if (match == null)\n            return false;\n        if (this.whitelist == null)\n            return true;\n        if (typeof value === 'string') {\n            return this.whitelist.indexOf(value.replace(/[\"']/g, '')) > -1;\n        }\n        else {\n            return this.whitelist.indexOf(value) > -1;\n        }\n    };\n    Attributor.prototype.remove = function (node) {\n        node.removeAttribute(this.keyName);\n    };\n    Attributor.prototype.value = function (node) {\n        var value = node.getAttribute(this.keyName);\n        if (this.canAdd(node, value) && value) {\n            return value;\n        }\n        return '';\n    };\n    return Attributor;\n}());\nexports.default = Attributor;\n\n\n/***/ }),\n/* 13 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.default = exports.Code = undefined;\n\nvar _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"]) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); } }; }();\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if (\"value\" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };\n\nvar _quillDelta = __webpack_require__(2);\n\nvar _quillDelta2 = _interopRequireDefault(_quillDelta);\n\nvar _parchment = __webpack_require__(0);\n\nvar _parchment2 = _interopRequireDefault(_parchment);\n\nvar _block = __webpack_require__(4);\n\nvar _block2 = _interopRequireDefault(_block);\n\nvar _inline = __webpack_require__(6);\n\nvar _inline2 = _interopRequireDefault(_inline);\n\nvar _text = __webpack_require__(7);\n\nvar _text2 = _interopRequireDefault(_text);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar Code = function (_Inline) {\n  _inherits(Code, _Inline);\n\n  function Code() {\n    _classCallCheck(this, Code);\n\n    return _possibleConstructorReturn(this, (Code.__proto__ || Object.getPrototypeOf(Code)).apply(this, arguments));\n  }\n\n  return Code;\n}(_inline2.default);\n\nCode.blotName = 'code';\nCode.tagName = 'CODE';\n\nvar CodeBlock = function (_Block) {\n  _inherits(CodeBlock, _Block);\n\n  function CodeBlock() {\n    _classCallCheck(this, CodeBlock);\n\n    return _possibleConstructorReturn(this, (CodeBlock.__proto__ || Object.getPrototypeOf(CodeBlock)).apply(this, arguments));\n  }\n\n  _createClass(CodeBlock, [{\n    key: 'delta',\n    value: function delta() {\n      var _this3 = this;\n\n      var text = this.domNode.textContent;\n      if (text.endsWith('\\n')) {\n        // Should always be true\n        text = text.slice(0, -1);\n      }\n      return text.split('\\n').reduce(function (delta, frag) {\n        return delta.insert(frag).insert('\\n', _this3.formats());\n      }, new _quillDelta2.default());\n    }\n  }, {\n    key: 'format',\n    value: function format(name, value) {\n      if (name === this.statics.blotName && value) return;\n\n      var _descendant = this.descendant(_text2.default, this.length() - 1),\n          _descendant2 = _slicedToArray(_descendant, 1),\n          text = _descendant2[0];\n\n      if (text != null) {\n        text.deleteAt(text.length() - 1, 1);\n      }\n      _get(CodeBlock.prototype.__proto__ || Object.getPrototypeOf(CodeBlock.prototype), 'format', this).call(this, name, value);\n    }\n  }, {\n    key: 'formatAt',\n    value: function formatAt(index, length, name, value) {\n      if (length === 0) return;\n      if (_parchment2.default.query(name, _parchment2.default.Scope.BLOCK) == null || name === this.statics.blotName && value === this.statics.formats(this.domNode)) {\n        return;\n      }\n      var nextNewline = this.newlineIndex(index);\n      if (nextNewline < 0 || nextNewline >= index + length) return;\n      var prevNewline = this.newlineIndex(index, true) + 1;\n      var isolateLength = nextNewline - prevNewline + 1;\n      var blot = this.isolate(prevNewline, isolateLength);\n      var next = blot.next;\n      blot.format(name, value);\n      if (next instanceof CodeBlock) {\n        next.formatAt(0, index - prevNewline + length - isolateLength, name, value);\n      }\n    }\n  }, {\n    key: 'insertAt',\n    value: function insertAt(index, value, def) {\n      if (def != null) return;\n\n      var _descendant3 = this.descendant(_text2.default, index),\n          _descendant4 = _slicedToArray(_descendant3, 2),\n          text = _descendant4[0],\n          offset = _descendant4[1];\n\n      text.insertAt(offset, value);\n    }\n  }, {\n    key: 'length',\n    value: function length() {\n      var length = this.domNode.textContent.length;\n      if (!this.domNode.textContent.endsWith('\\n')) {\n        return length + 1;\n      }\n      return length;\n    }\n  }, {\n    key: 'newlineIndex',\n    value: function newlineIndex(searchIndex) {\n      var reverse = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n\n      if (!reverse) {\n        var offset = this.domNode.textContent.slice(searchIndex).indexOf('\\n');\n        return offset > -1 ? searchIndex + offset : -1;\n      } else {\n        return this.domNode.textContent.slice(0, searchIndex).lastIndexOf('\\n');\n      }\n    }\n  }, {\n    key: 'optimize',\n    value: function optimize(context) {\n      if (!this.domNode.textContent.endsWith('\\n')) {\n        this.appendChild(_parchment2.default.create('text', '\\n'));\n      }\n      _get(CodeBlock.prototype.__proto__ || Object.getPrototypeOf(CodeBlock.prototype), 'optimize', this).call(this, context);\n      var next = this.next;\n      if (next != null && next.prev === this && next.statics.blotName === this.statics.blotName && this.statics.formats(this.domNode) === next.statics.formats(next.domNode)) {\n        next.optimize(context);\n        next.moveChildren(this);\n        next.remove();\n      }\n    }\n  }, {\n    key: 'replace',\n    value: function replace(target) {\n      _get(CodeBlock.prototype.__proto__ || Object.getPrototypeOf(CodeBlock.prototype), 'replace', this).call(this, target);\n      [].slice.call(this.domNode.querySelectorAll('*')).forEach(function (node) {\n        var blot = _parchment2.default.find(node);\n        if (blot == null) {\n          node.parentNode.removeChild(node);\n        } else if (blot instanceof _parchment2.default.Embed) {\n          blot.remove();\n        } else {\n          blot.unwrap();\n        }\n      });\n    }\n  }], [{\n    key: 'create',\n    value: function create(value) {\n      var domNode = _get(CodeBlock.__proto__ || Object.getPrototypeOf(CodeBlock), 'create', this).call(this, value);\n      domNode.setAttribute('spellcheck', false);\n      return domNode;\n    }\n  }, {\n    key: 'formats',\n    value: function formats() {\n      return true;\n    }\n  }]);\n\n  return CodeBlock;\n}(_block2.default);\n\nCodeBlock.blotName = 'code-block';\nCodeBlock.tagName = 'PRE';\nCodeBlock.TAB = '  ';\n\nexports.Code = Code;\nexports.default = CodeBlock;\n\n/***/ }),\n/* 14 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nvar _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"]) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); } }; }();\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _quillDelta = __webpack_require__(2);\n\nvar _quillDelta2 = _interopRequireDefault(_quillDelta);\n\nvar _op = __webpack_require__(20);\n\nvar _op2 = _interopRequireDefault(_op);\n\nvar _parchment = __webpack_require__(0);\n\nvar _parchment2 = _interopRequireDefault(_parchment);\n\nvar _code = __webpack_require__(13);\n\nvar _code2 = _interopRequireDefault(_code);\n\nvar _cursor = __webpack_require__(23);\n\nvar _cursor2 = _interopRequireDefault(_cursor);\n\nvar _block = __webpack_require__(4);\n\nvar _block2 = _interopRequireDefault(_block);\n\nvar _break = __webpack_require__(16);\n\nvar _break2 = _interopRequireDefault(_break);\n\nvar _clone = __webpack_require__(21);\n\nvar _clone2 = _interopRequireDefault(_clone);\n\nvar _deepEqual = __webpack_require__(11);\n\nvar _deepEqual2 = _interopRequireDefault(_deepEqual);\n\nvar _extend = __webpack_require__(3);\n\nvar _extend2 = _interopRequireDefault(_extend);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar ASCII = /^[ -~]*$/;\n\nvar Editor = function () {\n  function Editor(scroll) {\n    _classCallCheck(this, Editor);\n\n    this.scroll = scroll;\n    this.delta = this.getDelta();\n  }\n\n  _createClass(Editor, [{\n    key: 'applyDelta',\n    value: function applyDelta(delta) {\n      var _this = this;\n\n      var consumeNextNewline = false;\n      this.scroll.update();\n      var scrollLength = this.scroll.length();\n      this.scroll.batchStart();\n      delta = normalizeDelta(delta);\n      delta.reduce(function (index, op) {\n        var length = op.retain || op.delete || op.insert.length || 1;\n        var attributes = op.attributes || {};\n        if (op.insert != null) {\n          if (typeof op.insert === 'string') {\n            var text = op.insert;\n            if (text.endsWith('\\n') && consumeNextNewline) {\n              consumeNextNewline = false;\n              text = text.slice(0, -1);\n            }\n            if (index >= scrollLength && !text.endsWith('\\n')) {\n              consumeNextNewline = true;\n            }\n            _this.scroll.insertAt(index, text);\n\n            var _scroll$line = _this.scroll.line(index),\n                _scroll$line2 = _slicedToArray(_scroll$line, 2),\n                line = _scroll$line2[0],\n                offset = _scroll$line2[1];\n\n            var formats = (0, _extend2.default)({}, (0, _block.bubbleFormats)(line));\n            if (line instanceof _block2.default) {\n              var _line$descendant = line.descendant(_parchment2.default.Leaf, offset),\n                  _line$descendant2 = _slicedToArray(_line$descendant, 1),\n                  leaf = _line$descendant2[0];\n\n              formats = (0, _extend2.default)(formats, (0, _block.bubbleFormats)(leaf));\n            }\n            attributes = _op2.default.attributes.diff(formats, attributes) || {};\n          } else if (_typeof(op.insert) === 'object') {\n            var key = Object.keys(op.insert)[0]; // There should only be one key\n            if (key == null) return index;\n            _this.scroll.insertAt(index, key, op.insert[key]);\n          }\n          scrollLength += length;\n        }\n        Object.keys(attributes).forEach(function (name) {\n          _this.scroll.formatAt(index, length, name, attributes[name]);\n        });\n        return index + length;\n      }, 0);\n      delta.reduce(function (index, op) {\n        if (typeof op.delete === 'number') {\n          _this.scroll.deleteAt(index, op.delete);\n          return index;\n        }\n        return index + (op.retain || op.insert.length || 1);\n      }, 0);\n      this.scroll.batchEnd();\n      return this.update(delta);\n    }\n  }, {\n    key: 'deleteText',\n    value: function deleteText(index, length) {\n      this.scroll.deleteAt(index, length);\n      return this.update(new _quillDelta2.default().retain(index).delete(length));\n    }\n  }, {\n    key: 'formatLine',\n    value: function formatLine(index, length) {\n      var _this2 = this;\n\n      var formats = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n\n      this.scroll.update();\n      Object.keys(formats).forEach(function (format) {\n        if (_this2.scroll.whitelist != null && !_this2.scroll.whitelist[format]) return;\n        var lines = _this2.scroll.lines(index, Math.max(length, 1));\n        var lengthRemaining = length;\n        lines.forEach(function (line) {\n          var lineLength = line.length();\n          if (!(line instanceof _code2.default)) {\n            line.format(format, formats[format]);\n          } else {\n            var codeIndex = index - line.offset(_this2.scroll);\n            var codeLength = line.newlineIndex(codeIndex + lengthRemaining) - codeIndex + 1;\n            line.formatAt(codeIndex, codeLength, format, formats[format]);\n          }\n          lengthRemaining -= lineLength;\n        });\n      });\n      this.scroll.optimize();\n      return this.update(new _quillDelta2.default().retain(index).retain(length, (0, _clone2.default)(formats)));\n    }\n  }, {\n    key: 'formatText',\n    value: function formatText(index, length) {\n      var _this3 = this;\n\n      var formats = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n\n      Object.keys(formats).forEach(function (format) {\n        _this3.scroll.formatAt(index, length, format, formats[format]);\n      });\n      return this.update(new _quillDelta2.default().retain(index).retain(length, (0, _clone2.default)(formats)));\n    }\n  }, {\n    key: 'getContents',\n    value: function getContents(index, length) {\n      return this.delta.slice(index, index + length);\n    }\n  }, {\n    key: 'getDelta',\n    value: function getDelta() {\n      return this.scroll.lines().reduce(function (delta, line) {\n        return delta.concat(line.delta());\n      }, new _quillDelta2.default());\n    }\n  }, {\n    key: 'getFormat',\n    value: function getFormat(index) {\n      var length = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n\n      var lines = [],\n          leaves = [];\n      if (length === 0) {\n        this.scroll.path(index).forEach(function (path) {\n          var _path = _slicedToArray(path, 1),\n              blot = _path[0];\n\n          if (blot instanceof _block2.default) {\n            lines.push(blot);\n          } else if (blot instanceof _parchment2.default.Leaf) {\n            leaves.push(blot);\n          }\n        });\n      } else {\n        lines = this.scroll.lines(index, length);\n        leaves = this.scroll.descendants(_parchment2.default.Leaf, index, length);\n      }\n      var formatsArr = [lines, leaves].map(function (blots) {\n        if (blots.length === 0) return {};\n        var formats = (0, _block.bubbleFormats)(blots.shift());\n        while (Object.keys(formats).length > 0) {\n          var blot = blots.shift();\n          if (blot == null) return formats;\n          formats = combineFormats((0, _block.bubbleFormats)(blot), formats);\n        }\n        return formats;\n      });\n      return _extend2.default.apply(_extend2.default, formatsArr);\n    }\n  }, {\n    key: 'getText',\n    value: function getText(index, length) {\n      return this.getContents(index, length).filter(function (op) {\n        return typeof op.insert === 'string';\n      }).map(function (op) {\n        return op.insert;\n      }).join('');\n    }\n  }, {\n    key: 'insertEmbed',\n    value: function insertEmbed(index, embed, value) {\n      this.scroll.insertAt(index, embed, value);\n      return this.update(new _quillDelta2.default().retain(index).insert(_defineProperty({}, embed, value)));\n    }\n  }, {\n    key: 'insertText',\n    value: function insertText(index, text) {\n      var _this4 = this;\n\n      var formats = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n\n      text = text.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\n      this.scroll.insertAt(index, text);\n      Object.keys(formats).forEach(function (format) {\n        _this4.scroll.formatAt(index, text.length, format, formats[format]);\n      });\n      return this.update(new _quillDelta2.default().retain(index).insert(text, (0, _clone2.default)(formats)));\n    }\n  }, {\n    key: 'isBlank',\n    value: function isBlank() {\n      if (this.scroll.children.length == 0) return true;\n      if (this.scroll.children.length > 1) return false;\n      var block = this.scroll.children.head;\n      if (block.statics.blotName !== _block2.default.blotName) return false;\n      if (block.children.length > 1) return false;\n      return block.children.head instanceof _break2.default;\n    }\n  }, {\n    key: 'removeFormat',\n    value: function removeFormat(index, length) {\n      var text = this.getText(index, length);\n\n      var _scroll$line3 = this.scroll.line(index + length),\n          _scroll$line4 = _slicedToArray(_scroll$line3, 2),\n          line = _scroll$line4[0],\n          offset = _scroll$line4[1];\n\n      var suffixLength = 0,\n          suffix = new _quillDelta2.default();\n      if (line != null) {\n        if (!(line instanceof _code2.default)) {\n          suffixLength = line.length() - offset;\n        } else {\n          suffixLength = line.newlineIndex(offset) - offset + 1;\n        }\n        suffix = line.delta().slice(offset, offset + suffixLength - 1).insert('\\n');\n      }\n      var contents = this.getContents(index, length + suffixLength);\n      var diff = contents.diff(new _quillDelta2.default().insert(text).concat(suffix));\n      var delta = new _quillDelta2.default().retain(index).concat(diff);\n      return this.applyDelta(delta);\n    }\n  }, {\n    key: 'update',\n    value: function update(change) {\n      var mutations = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n      var cursorIndex = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : undefined;\n\n      var oldDelta = this.delta;\n      if (mutations.length === 1 && mutations[0].type === 'characterData' && mutations[0].target.data.match(ASCII) && _parchment2.default.find(mutations[0].target)) {\n        // Optimization for character changes\n        var textBlot = _parchment2.default.find(mutations[0].target);\n        var formats = (0, _block.bubbleFormats)(textBlot);\n        var index = textBlot.offset(this.scroll);\n        var oldValue = mutations[0].oldValue.replace(_cursor2.default.CONTENTS, '');\n        var oldText = new _quillDelta2.default().insert(oldValue);\n        var newText = new _quillDelta2.default().insert(textBlot.value());\n        var diffDelta = new _quillDelta2.default().retain(index).concat(oldText.diff(newText, cursorIndex));\n        change = diffDelta.reduce(function (delta, op) {\n          if (op.insert) {\n            return delta.insert(op.insert, formats);\n          } else {\n            return delta.push(op);\n          }\n        }, new _quillDelta2.default());\n        this.delta = oldDelta.compose(change);\n      } else {\n        this.delta = this.getDelta();\n        if (!change || !(0, _deepEqual2.default)(oldDelta.compose(change), this.delta)) {\n          change = oldDelta.diff(this.delta, cursorIndex);\n        }\n      }\n      return change;\n    }\n  }]);\n\n  return Editor;\n}();\n\nfunction combineFormats(formats, combined) {\n  return Object.keys(combined).reduce(function (merged, name) {\n    if (formats[name] == null) return merged;\n    if (combined[name] === formats[name]) {\n      merged[name] = combined[name];\n    } else if (Array.isArray(combined[name])) {\n      if (combined[name].indexOf(formats[name]) < 0) {\n        merged[name] = combined[name].concat([formats[name]]);\n      }\n    } else {\n      merged[name] = [combined[name], formats[name]];\n    }\n    return merged;\n  }, {});\n}\n\nfunction normalizeDelta(delta) {\n  return delta.reduce(function (delta, op) {\n    if (op.insert === 1) {\n      var attributes = (0, _clone2.default)(op.attributes);\n      delete attributes['image'];\n      return delta.insert({ image: op.attributes.image }, attributes);\n    }\n    if (op.attributes != null && (op.attributes.list === true || op.attributes.bullet === true)) {\n      op = (0, _clone2.default)(op);\n      if (op.attributes.list) {\n        op.attributes.list = 'ordered';\n      } else {\n        op.attributes.list = 'bullet';\n        delete op.attributes.bullet;\n      }\n    }\n    if (typeof op.insert === 'string') {\n      var text = op.insert.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\n      return delta.insert(text, op.attributes);\n    }\n    return delta.push(op);\n  }, new _quillDelta2.default());\n}\n\nexports.default = Editor;\n\n/***/ }),\n/* 15 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.default = exports.Range = undefined;\n\nvar _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"]) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); } }; }();\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _parchment = __webpack_require__(0);\n\nvar _parchment2 = _interopRequireDefault(_parchment);\n\nvar _clone = __webpack_require__(21);\n\nvar _clone2 = _interopRequireDefault(_clone);\n\nvar _deepEqual = __webpack_require__(11);\n\nvar _deepEqual2 = _interopRequireDefault(_deepEqual);\n\nvar _emitter3 = __webpack_require__(8);\n\nvar _emitter4 = _interopRequireDefault(_emitter3);\n\nvar _logger = __webpack_require__(10);\n\nvar _logger2 = _interopRequireDefault(_logger);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar debug = (0, _logger2.default)('quill:selection');\n\nvar Range = function Range(index) {\n  var length = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n\n  _classCallCheck(this, Range);\n\n  this.index = index;\n  this.length = length;\n};\n\nvar Selection = function () {\n  function Selection(scroll, emitter) {\n    var _this = this;\n\n    _classCallCheck(this, Selection);\n\n    this.emitter = emitter;\n    this.scroll = scroll;\n    this.composing = false;\n    this.mouseDown = false;\n    this.root = this.scroll.domNode;\n    this.cursor = _parchment2.default.create('cursor', this);\n    // savedRange is last non-null range\n    this.lastRange = this.savedRange = new Range(0, 0);\n    this.handleComposition();\n    this.handleDragging();\n    this.emitter.listenDOM('selectionchange', document, function () {\n      if (!_this.mouseDown) {\n        setTimeout(_this.update.bind(_this, _emitter4.default.sources.USER), 1);\n      }\n    });\n    this.emitter.on(_emitter4.default.events.EDITOR_CHANGE, function (type, delta) {\n      if (type === _emitter4.default.events.TEXT_CHANGE && delta.length() > 0) {\n        _this.update(_emitter4.default.sources.SILENT);\n      }\n    });\n    this.emitter.on(_emitter4.default.events.SCROLL_BEFORE_UPDATE, function () {\n      if (!_this.hasFocus()) return;\n      var native = _this.getNativeRange();\n      if (native == null) return;\n      if (native.start.node === _this.cursor.textNode) return; // cursor.restore() will handle\n      // TODO unclear if this has negative side effects\n      _this.emitter.once(_emitter4.default.events.SCROLL_UPDATE, function () {\n        try {\n          _this.setNativeRange(native.start.node, native.start.offset, native.end.node, native.end.offset);\n        } catch (ignored) {}\n      });\n    });\n    this.emitter.on(_emitter4.default.events.SCROLL_OPTIMIZE, function (mutations, context) {\n      if (context.range) {\n        var _context$range = context.range,\n            startNode = _context$range.startNode,\n            startOffset = _context$range.startOffset,\n            endNode = _context$range.endNode,\n            endOffset = _context$range.endOffset;\n\n        _this.setNativeRange(startNode, startOffset, endNode, endOffset);\n      }\n    });\n    this.update(_emitter4.default.sources.SILENT);\n  }\n\n  _createClass(Selection, [{\n    key: 'handleComposition',\n    value: function handleComposition() {\n      var _this2 = this;\n\n      this.root.addEventListener('compositionstart', function () {\n        _this2.composing = true;\n      });\n      this.root.addEventListener('compositionend', function () {\n        _this2.composing = false;\n        if (_this2.cursor.parent) {\n          var range = _this2.cursor.restore();\n          if (!range) return;\n          setTimeout(function () {\n            _this2.setNativeRange(range.startNode, range.startOffset, range.endNode, range.endOffset);\n          }, 1);\n        }\n      });\n    }\n  }, {\n    key: 'handleDragging',\n    value: function handleDragging() {\n      var _this3 = this;\n\n      this.emitter.listenDOM('mousedown', document.body, function () {\n        _this3.mouseDown = true;\n      });\n      this.emitter.listenDOM('mouseup', document.body, function () {\n        _this3.mouseDown = false;\n        _this3.update(_emitter4.default.sources.USER);\n      });\n    }\n  }, {\n    key: 'focus',\n    value: function focus() {\n      if (this.hasFocus()) return;\n      this.root.focus();\n      this.setRange(this.savedRange);\n    }\n  }, {\n    key: 'format',\n    value: function format(_format, value) {\n      if (this.scroll.whitelist != null && !this.scroll.whitelist[_format]) return;\n      this.scroll.update();\n      var nativeRange = this.getNativeRange();\n      if (nativeRange == null || !nativeRange.native.collapsed || _parchment2.default.query(_format, _parchment2.default.Scope.BLOCK)) return;\n      if (nativeRange.start.node !== this.cursor.textNode) {\n        var blot = _parchment2.default.find(nativeRange.start.node, false);\n        if (blot == null) return;\n        // TODO Give blot ability to not split\n        if (blot instanceof _parchment2.default.Leaf) {\n          var after = blot.split(nativeRange.start.offset);\n          blot.parent.insertBefore(this.cursor, after);\n        } else {\n          blot.insertBefore(this.cursor, nativeRange.start.node); // Should never happen\n        }\n        this.cursor.attach();\n      }\n      this.cursor.format(_format, value);\n      this.scroll.optimize();\n      this.setNativeRange(this.cursor.textNode, this.cursor.textNode.data.length);\n      this.update();\n    }\n  }, {\n    key: 'getBounds',\n    value: function getBounds(index) {\n      var length = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n\n      var scrollLength = this.scroll.length();\n      index = Math.min(index, scrollLength - 1);\n      length = Math.min(index + length, scrollLength - 1) - index;\n      var node = void 0,\n          _scroll$leaf = this.scroll.leaf(index),\n          _scroll$leaf2 = _slicedToArray(_scroll$leaf, 2),\n          leaf = _scroll$leaf2[0],\n          offset = _scroll$leaf2[1];\n      if (leaf == null) return null;\n\n      var _leaf$position = leaf.position(offset, true);\n\n      var _leaf$position2 = _slicedToArray(_leaf$position, 2);\n\n      node = _leaf$position2[0];\n      offset = _leaf$position2[1];\n\n      var range = document.createRange();\n      if (length > 0) {\n        range.setStart(node, offset);\n\n        var _scroll$leaf3 = this.scroll.leaf(index + length);\n\n        var _scroll$leaf4 = _slicedToArray(_scroll$leaf3, 2);\n\n        leaf = _scroll$leaf4[0];\n        offset = _scroll$leaf4[1];\n\n        if (leaf == null) return null;\n\n        var _leaf$position3 = leaf.position(offset, true);\n\n        var _leaf$position4 = _slicedToArray(_leaf$position3, 2);\n\n        node = _leaf$position4[0];\n        offset = _leaf$position4[1];\n\n        range.setEnd(node, offset);\n        return range.getBoundingClientRect();\n      } else {\n        var side = 'left';\n        var rect = void 0;\n        if (node instanceof Text) {\n          if (offset < node.data.length) {\n            range.setStart(node, offset);\n            range.setEnd(node, offset + 1);\n          } else {\n            range.setStart(node, offset - 1);\n            range.setEnd(node, offset);\n            side = 'right';\n          }\n          rect = range.getBoundingClientRect();\n        } else {\n          rect = leaf.domNode.getBoundingClientRect();\n          if (offset > 0) side = 'right';\n        }\n        return {\n          bottom: rect.top + rect.height,\n          height: rect.height,\n          left: rect[side],\n          right: rect[side],\n          top: rect.top,\n          width: 0\n        };\n      }\n    }\n  }, {\n    key: 'getNativeRange',\n    value: function getNativeRange() {\n      var selection = document.getSelection();\n      if (selection == null || selection.rangeCount <= 0) return null;\n      var nativeRange = selection.getRangeAt(0);\n      if (nativeRange == null) return null;\n      var range = this.normalizeNative(nativeRange);\n      debug.info('getNativeRange', range);\n      return range;\n    }\n  }, {\n    key: 'getRange',\n    value: function getRange() {\n      var normalized = this.getNativeRange();\n      if (normalized == null) return [null, null];\n      var range = this.normalizedToRange(normalized);\n      return [range, normalized];\n    }\n  }, {\n    key: 'hasFocus',\n    value: function hasFocus() {\n      return document.activeElement === this.root;\n    }\n  }, {\n    key: 'normalizedToRange',\n    value: function normalizedToRange(range) {\n      var _this4 = this;\n\n      var positions = [[range.start.node, range.start.offset]];\n      if (!range.native.collapsed) {\n        positions.push([range.end.node, range.end.offset]);\n      }\n      var indexes = positions.map(function (position) {\n        var _position = _slicedToArray(position, 2),\n            node = _position[0],\n            offset = _position[1];\n\n        var blot = _parchment2.default.find(node, true);\n        var index = blot.offset(_this4.scroll);\n        if (offset === 0) {\n          return index;\n        } else if (blot instanceof _parchment2.default.Container) {\n          return index + blot.length();\n        } else {\n          return index + blot.index(node, offset);\n        }\n      });\n      var end = Math.min(Math.max.apply(Math, _toConsumableArray(indexes)), this.scroll.length() - 1);\n      var start = Math.min.apply(Math, [end].concat(_toConsumableArray(indexes)));\n      return new Range(start, end - start);\n    }\n  }, {\n    key: 'normalizeNative',\n    value: function normalizeNative(nativeRange) {\n      if (!contains(this.root, nativeRange.startContainer) || !nativeRange.collapsed && !contains(this.root, nativeRange.endContainer)) {\n        return null;\n      }\n      var range = {\n        start: { node: nativeRange.startContainer, offset: nativeRange.startOffset },\n        end: { node: nativeRange.endContainer, offset: nativeRange.endOffset },\n        native: nativeRange\n      };\n      [range.start, range.end].forEach(function (position) {\n        var node = position.node,\n            offset = position.offset;\n        while (!(node instanceof Text) && node.childNodes.length > 0) {\n          if (node.childNodes.length > offset) {\n            node = node.childNodes[offset];\n            offset = 0;\n          } else if (node.childNodes.length === offset) {\n            node = node.lastChild;\n            offset = node instanceof Text ? node.data.length : node.childNodes.length + 1;\n          } else {\n            break;\n          }\n        }\n        position.node = node, position.offset = offset;\n      });\n      return range;\n    }\n  }, {\n    key: 'rangeToNative',\n    value: function rangeToNative(range) {\n      var _this5 = this;\n\n      var indexes = range.collapsed ? [range.index] : [range.index, range.index + range.length];\n      var args = [];\n      var scrollLength = this.scroll.length();\n      indexes.forEach(function (index, i) {\n        index = Math.min(scrollLength - 1, index);\n        var node = void 0,\n            _scroll$leaf5 = _this5.scroll.leaf(index),\n            _scroll$leaf6 = _slicedToArray(_scroll$leaf5, 2),\n            leaf = _scroll$leaf6[0],\n            offset = _scroll$leaf6[1];\n        var _leaf$position5 = leaf.position(offset, i !== 0);\n\n        var _leaf$position6 = _slicedToArray(_leaf$position5, 2);\n\n        node = _leaf$position6[0];\n        offset = _leaf$position6[1];\n\n        args.push(node, offset);\n      });\n      if (args.length < 2) {\n        args = args.concat(args);\n      }\n      return args;\n    }\n  }, {\n    key: 'scrollIntoView',\n    value: function scrollIntoView(scrollingContainer) {\n      var range = this.lastRange;\n      if (range == null) return;\n      var bounds = this.getBounds(range.index, range.length);\n      if (bounds == null) return;\n      var limit = this.scroll.length() - 1;\n\n      var _scroll$line = this.scroll.line(Math.min(range.index, limit)),\n          _scroll$line2 = _slicedToArray(_scroll$line, 1),\n          first = _scroll$line2[0];\n\n      var last = first;\n      if (range.length > 0) {\n        var _scroll$line3 = this.scroll.line(Math.min(range.index + range.length, limit));\n\n        var _scroll$line4 = _slicedToArray(_scroll$line3, 1);\n\n        last = _scroll$line4[0];\n      }\n      if (first == null || last == null) return;\n      var scrollBounds = scrollingContainer.getBoundingClientRect();\n      if (bounds.top < scrollBounds.top) {\n        scrollingContainer.scrollTop -= scrollBounds.top - bounds.top;\n      } else if (bounds.bottom > scrollBounds.bottom) {\n        scrollingContainer.scrollTop += bounds.bottom - scrollBounds.bottom;\n      }\n    }\n  }, {\n    key: 'setNativeRange',\n    value: function setNativeRange(startNode, startOffset) {\n      var endNode = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : startNode;\n      var endOffset = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : startOffset;\n      var force = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;\n\n      debug.info('setNativeRange', startNode, startOffset, endNode, endOffset);\n      if (startNode != null && (this.root.parentNode == null || startNode.parentNode == null || endNode.parentNode == null)) {\n        return;\n      }\n      var selection = document.getSelection();\n      if (selection == null) return;\n      if (startNode != null) {\n        if (!this.hasFocus()) this.root.focus();\n        var native = (this.getNativeRange() || {}).native;\n        if (native == null || force || startNode !== native.startContainer || startOffset !== native.startOffset || endNode !== native.endContainer || endOffset !== native.endOffset) {\n\n          if (startNode.tagName == \"BR\") {\n            startOffset = [].indexOf.call(startNode.parentNode.childNodes, startNode);\n            startNode = startNode.parentNode;\n          }\n          if (endNode.tagName == \"BR\") {\n            endOffset = [].indexOf.call(endNode.parentNode.childNodes, endNode);\n            endNode = endNode.parentNode;\n          }\n          var range = document.createRange();\n          range.setStart(startNode, startOffset);\n          range.setEnd(endNode, endOffset);\n          selection.removeAllRanges();\n          selection.addRange(range);\n        }\n      } else {\n        selection.removeAllRanges();\n        this.root.blur();\n        document.body.focus(); // root.blur() not enough on IE11+Travis+SauceLabs (but not local VMs)\n      }\n    }\n  }, {\n    key: 'setRange',\n    value: function setRange(range) {\n      var force = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n      var source = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : _emitter4.default.sources.API;\n\n      if (typeof force === 'string') {\n        source = force;\n        force = false;\n      }\n      debug.info('setRange', range);\n      if (range != null) {\n        var args = this.rangeToNative(range);\n        this.setNativeRange.apply(this, _toConsumableArray(args).concat([force]));\n      } else {\n        this.setNativeRange(null);\n      }\n      this.update(source);\n    }\n  }, {\n    key: 'update',\n    value: function update() {\n      var source = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : _emitter4.default.sources.USER;\n\n      var oldRange = this.lastRange;\n\n      var _getRange = this.getRange(),\n          _getRange2 = _slicedToArray(_getRange, 2),\n          lastRange = _getRange2[0],\n          nativeRange = _getRange2[1];\n\n      this.lastRange = lastRange;\n      if (this.lastRange != null) {\n        this.savedRange = this.lastRange;\n      }\n      if (!(0, _deepEqual2.default)(oldRange, this.lastRange)) {\n        var _emitter;\n\n        if (!this.composing && nativeRange != null && nativeRange.native.collapsed && nativeRange.start.node !== this.cursor.textNode) {\n          this.cursor.restore();\n        }\n        var args = [_emitter4.default.events.SELECTION_CHANGE, (0, _clone2.default)(this.lastRange), (0, _clone2.default)(oldRange), source];\n        (_emitter = this.emitter).emit.apply(_emitter, [_emitter4.default.events.EDITOR_CHANGE].concat(args));\n        if (source !== _emitter4.default.sources.SILENT) {\n          var _emitter2;\n\n          (_emitter2 = this.emitter).emit.apply(_emitter2, args);\n        }\n      }\n    }\n  }]);\n\n  return Selection;\n}();\n\nfunction contains(parent, descendant) {\n  try {\n    // Firefox inserts inaccessible nodes around video elements\n    descendant.parentNode;\n  } catch (e) {\n    return false;\n  }\n  // IE11 has bug with Text nodes\n  // https://connect.microsoft.com/IE/feedback/details/780874/node-contains-is-incorrect\n  if (descendant instanceof Text) {\n    descendant = descendant.parentNode;\n  }\n  return parent.contains(descendant);\n}\n\nexports.Range = Range;\nexports.default = Selection;\n\n/***/ }),\n/* 16 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if (\"value\" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };\n\nvar _parchment = __webpack_require__(0);\n\nvar _parchment2 = _interopRequireDefault(_parchment);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar Break = function (_Parchment$Embed) {\n  _inherits(Break, _Parchment$Embed);\n\n  function Break() {\n    _classCallCheck(this, Break);\n\n    return _possibleConstructorReturn(this, (Break.__proto__ || Object.getPrototypeOf(Break)).apply(this, arguments));\n  }\n\n  _createClass(Break, [{\n    key: 'insertInto',\n    value: function insertInto(parent, ref) {\n      if (parent.children.length === 0) {\n        _get(Break.prototype.__proto__ || Object.getPrototypeOf(Break.prototype), 'insertInto', this).call(this, parent, ref);\n      } else {\n        this.remove();\n      }\n    }\n  }, {\n    key: 'length',\n    value: function length() {\n      return 0;\n    }\n  }, {\n    key: 'value',\n    value: function value() {\n      return '';\n    }\n  }], [{\n    key: 'value',\n    value: function value() {\n      return undefined;\n    }\n  }]);\n\n  return Break;\n}(_parchment2.default.Embed);\n\nBreak.blotName = 'break';\nBreak.tagName = 'BR';\n\nexports.default = Break;\n\n/***/ }),\n/* 17 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar __extends = (this && this.__extends) || (function () {\n    var extendStatics = Object.setPrototypeOf ||\n        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar linked_list_1 = __webpack_require__(44);\nvar shadow_1 = __webpack_require__(29);\nvar Registry = __webpack_require__(1);\nvar ContainerBlot = /** @class */ (function (_super) {\n    __extends(ContainerBlot, _super);\n    function ContainerBlot(domNode) {\n        var _this = _super.call(this, domNode) || this;\n        _this.build();\n        return _this;\n    }\n    ContainerBlot.prototype.appendChild = function (other) {\n        this.insertBefore(other);\n    };\n    ContainerBlot.prototype.attach = function () {\n        _super.prototype.attach.call(this);\n        this.children.forEach(function (child) {\n            child.attach();\n        });\n    };\n    ContainerBlot.prototype.build = function () {\n        var _this = this;\n        this.children = new linked_list_1.default();\n        // Need to be reversed for if DOM nodes already in order\n        [].slice\n            .call(this.domNode.childNodes)\n            .reverse()\n            .forEach(function (node) {\n            try {\n                var child = makeBlot(node);\n                _this.insertBefore(child, _this.children.head || undefined);\n            }\n            catch (err) {\n                if (err instanceof Registry.ParchmentError)\n                    return;\n                else\n                    throw err;\n            }\n        });\n    };\n    ContainerBlot.prototype.deleteAt = function (index, length) {\n        if (index === 0 && length === this.length()) {\n            return this.remove();\n        }\n        this.children.forEachAt(index, length, function (child, offset, length) {\n            child.deleteAt(offset, length);\n        });\n    };\n    ContainerBlot.prototype.descendant = function (criteria, index) {\n        var _a = this.children.find(index), child = _a[0], offset = _a[1];\n        if ((criteria.blotName == null && criteria(child)) ||\n            (criteria.blotName != null && child instanceof criteria)) {\n            return [child, offset];\n        }\n        else if (child instanceof ContainerBlot) {\n            return child.descendant(criteria, offset);\n        }\n        else {\n            return [null, -1];\n        }\n    };\n    ContainerBlot.prototype.descendants = function (criteria, index, length) {\n        if (index === void 0) { index = 0; }\n        if (length === void 0) { length = Number.MAX_VALUE; }\n        var descendants = [];\n        var lengthLeft = length;\n        this.children.forEachAt(index, length, function (child, index, length) {\n            if ((criteria.blotName == null && criteria(child)) ||\n                (criteria.blotName != null && child instanceof criteria)) {\n                descendants.push(child);\n            }\n            if (child instanceof ContainerBlot) {\n                descendants = descendants.concat(child.descendants(criteria, index, lengthLeft));\n            }\n            lengthLeft -= length;\n        });\n        return descendants;\n    };\n    ContainerBlot.prototype.detach = function () {\n        this.children.forEach(function (child) {\n            child.detach();\n        });\n        _super.prototype.detach.call(this);\n    };\n    ContainerBlot.prototype.formatAt = function (index, length, name, value) {\n        this.children.forEachAt(index, length, function (child, offset, length) {\n            child.formatAt(offset, length, name, value);\n        });\n    };\n    ContainerBlot.prototype.insertAt = function (index, value, def) {\n        var _a = this.children.find(index), child = _a[0], offset = _a[1];\n        if (child) {\n            child.insertAt(offset, value, def);\n        }\n        else {\n            var blot = def == null ? Registry.create('text', value) : Registry.create(value, def);\n            this.appendChild(blot);\n        }\n    };\n    ContainerBlot.prototype.insertBefore = function (childBlot, refBlot) {\n        if (this.statics.allowedChildren != null &&\n            !this.statics.allowedChildren.some(function (child) {\n                return childBlot instanceof child;\n            })) {\n            throw new Registry.ParchmentError(\"Cannot insert \" + childBlot.statics.blotName + \" into \" + this.statics.blotName);\n        }\n        childBlot.insertInto(this, refBlot);\n    };\n    ContainerBlot.prototype.length = function () {\n        return this.children.reduce(function (memo, child) {\n            return memo + child.length();\n        }, 0);\n    };\n    ContainerBlot.prototype.moveChildren = function (targetParent, refNode) {\n        this.children.forEach(function (child) {\n            targetParent.insertBefore(child, refNode);\n        });\n    };\n    ContainerBlot.prototype.optimize = function (context) {\n        _super.prototype.optimize.call(this, context);\n        if (this.children.length === 0) {\n            if (this.statics.defaultChild != null) {\n                var child = Registry.create(this.statics.defaultChild);\n                this.appendChild(child);\n                child.optimize(context);\n            }\n            else {\n                this.remove();\n            }\n        }\n    };\n    ContainerBlot.prototype.path = function (index, inclusive) {\n        if (inclusive === void 0) { inclusive = false; }\n        var _a = this.children.find(index, inclusive), child = _a[0], offset = _a[1];\n        var position = [[this, index]];\n        if (child instanceof ContainerBlot) {\n            return position.concat(child.path(offset, inclusive));\n        }\n        else if (child != null) {\n            position.push([child, offset]);\n        }\n        return position;\n    };\n    ContainerBlot.prototype.removeChild = function (child) {\n        this.children.remove(child);\n    };\n    ContainerBlot.prototype.replace = function (target) {\n        if (target instanceof ContainerBlot) {\n            target.moveChildren(this);\n        }\n        _super.prototype.replace.call(this, target);\n    };\n    ContainerBlot.prototype.split = function (index, force) {\n        if (force === void 0) { force = false; }\n        if (!force) {\n            if (index === 0)\n                return this;\n            if (index === this.length())\n                return this.next;\n        }\n        var after = this.clone();\n        this.parent.insertBefore(after, this.next);\n        this.children.forEachAt(index, this.length(), function (child, offset, length) {\n            child = child.split(offset, force);\n            after.appendChild(child);\n        });\n        return after;\n    };\n    ContainerBlot.prototype.unwrap = function () {\n        this.moveChildren(this.parent, this.next);\n        this.remove();\n    };\n    ContainerBlot.prototype.update = function (mutations, context) {\n        var _this = this;\n        var addedNodes = [];\n        var removedNodes = [];\n        mutations.forEach(function (mutation) {\n            if (mutation.target === _this.domNode && mutation.type === 'childList') {\n                addedNodes.push.apply(addedNodes, mutation.addedNodes);\n                removedNodes.push.apply(removedNodes, mutation.removedNodes);\n            }\n        });\n        removedNodes.forEach(function (node) {\n            // Check node has actually been removed\n            // One exception is Chrome does not immediately remove IFRAMEs\n            // from DOM but MutationRecord is correct in its reported removal\n            if (node.parentNode != null &&\n                // @ts-ignore\n                node.tagName !== 'IFRAME' &&\n                document.body.compareDocumentPosition(node) & Node.DOCUMENT_POSITION_CONTAINED_BY) {\n                return;\n            }\n            var blot = Registry.find(node);\n            if (blot == null)\n                return;\n            if (blot.domNode.parentNode == null || blot.domNode.parentNode === _this.domNode) {\n                blot.detach();\n            }\n        });\n        addedNodes\n            .filter(function (node) {\n            return node.parentNode == _this.domNode;\n        })\n            .sort(function (a, b) {\n            if (a === b)\n                return 0;\n            if (a.compareDocumentPosition(b) & Node.DOCUMENT_POSITION_FOLLOWING) {\n                return 1;\n            }\n            return -1;\n        })\n            .forEach(function (node) {\n            var refBlot = null;\n            if (node.nextSibling != null) {\n                refBlot = Registry.find(node.nextSibling);\n            }\n            var blot = makeBlot(node);\n            if (blot.next != refBlot || blot.next == null) {\n                if (blot.parent != null) {\n                    blot.parent.removeChild(_this);\n                }\n                _this.insertBefore(blot, refBlot || undefined);\n            }\n        });\n    };\n    return ContainerBlot;\n}(shadow_1.default));\nfunction makeBlot(node) {\n    var blot = Registry.find(node);\n    if (blot == null) {\n        try {\n            blot = Registry.create(node);\n        }\n        catch (e) {\n            blot = Registry.create(Registry.Scope.INLINE);\n            [].slice.call(node.childNodes).forEach(function (child) {\n                // @ts-ignore\n                blot.domNode.appendChild(child);\n            });\n            if (node.parentNode) {\n                node.parentNode.replaceChild(blot.domNode, node);\n            }\n            blot.attach();\n        }\n    }\n    return blot;\n}\nexports.default = ContainerBlot;\n\n\n/***/ }),\n/* 18 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar __extends = (this && this.__extends) || (function () {\n    var extendStatics = Object.setPrototypeOf ||\n        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar attributor_1 = __webpack_require__(12);\nvar store_1 = __webpack_require__(30);\nvar container_1 = __webpack_require__(17);\nvar Registry = __webpack_require__(1);\nvar FormatBlot = /** @class */ (function (_super) {\n    __extends(FormatBlot, _super);\n    function FormatBlot(domNode) {\n        var _this = _super.call(this, domNode) || this;\n        _this.attributes = new store_1.default(_this.domNode);\n        return _this;\n    }\n    FormatBlot.formats = function (domNode) {\n        if (typeof this.tagName === 'string') {\n            return true;\n        }\n        else if (Array.isArray(this.tagName)) {\n            return domNode.tagName.toLowerCase();\n        }\n        return undefined;\n    };\n    FormatBlot.prototype.format = function (name, value) {\n        var format = Registry.query(name);\n        if (format instanceof attributor_1.default) {\n            this.attributes.attribute(format, value);\n        }\n        else if (value) {\n            if (format != null && (name !== this.statics.blotName || this.formats()[name] !== value)) {\n                this.replaceWith(name, value);\n            }\n        }\n    };\n    FormatBlot.prototype.formats = function () {\n        var formats = this.attributes.values();\n        var format = this.statics.formats(this.domNode);\n        if (format != null) {\n            formats[this.statics.blotName] = format;\n        }\n        return formats;\n    };\n    FormatBlot.prototype.replaceWith = function (name, value) {\n        var replacement = _super.prototype.replaceWith.call(this, name, value);\n        this.attributes.copy(replacement);\n        return replacement;\n    };\n    FormatBlot.prototype.update = function (mutations, context) {\n        var _this = this;\n        _super.prototype.update.call(this, mutations, context);\n        if (mutations.some(function (mutation) {\n            return mutation.target === _this.domNode && mutation.type === 'attributes';\n        })) {\n            this.attributes.build();\n        }\n    };\n    FormatBlot.prototype.wrap = function (name, value) {\n        var wrapper = _super.prototype.wrap.call(this, name, value);\n        if (wrapper instanceof FormatBlot && wrapper.statics.scope === this.statics.scope) {\n            this.attributes.move(wrapper);\n        }\n        return wrapper;\n    };\n    return FormatBlot;\n}(container_1.default));\nexports.default = FormatBlot;\n\n\n/***/ }),\n/* 19 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar __extends = (this && this.__extends) || (function () {\n    var extendStatics = Object.setPrototypeOf ||\n        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar shadow_1 = __webpack_require__(29);\nvar Registry = __webpack_require__(1);\nvar LeafBlot = /** @class */ (function (_super) {\n    __extends(LeafBlot, _super);\n    function LeafBlot() {\n        return _super !== null && _super.apply(this, arguments) || this;\n    }\n    LeafBlot.value = function (domNode) {\n        return true;\n    };\n    LeafBlot.prototype.index = function (node, offset) {\n        if (this.domNode === node ||\n            this.domNode.compareDocumentPosition(node) & Node.DOCUMENT_POSITION_CONTAINED_BY) {\n            return Math.min(offset, 1);\n        }\n        return -1;\n    };\n    LeafBlot.prototype.position = function (index, inclusive) {\n        var offset = [].indexOf.call(this.parent.domNode.childNodes, this.domNode);\n        if (index > 0)\n            offset += 1;\n        return [this.parent.domNode, offset];\n    };\n    LeafBlot.prototype.value = function () {\n        return _a = {}, _a[this.statics.blotName] = this.statics.value(this.domNode) || true, _a;\n        var _a;\n    };\n    LeafBlot.scope = Registry.Scope.INLINE_BLOT;\n    return LeafBlot;\n}(shadow_1.default));\nexports.default = LeafBlot;\n\n\n/***/ }),\n/* 20 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar equal = __webpack_require__(11);\nvar extend = __webpack_require__(3);\n\n\nvar lib = {\n  attributes: {\n    compose: function (a, b, keepNull) {\n      if (typeof a !== 'object') a = {};\n      if (typeof b !== 'object') b = {};\n      var attributes = extend(true, {}, b);\n      if (!keepNull) {\n        attributes = Object.keys(attributes).reduce(function (copy, key) {\n          if (attributes[key] != null) {\n            copy[key] = attributes[key];\n          }\n          return copy;\n        }, {});\n      }\n      for (var key in a) {\n        if (a[key] !== undefined && b[key] === undefined) {\n          attributes[key] = a[key];\n        }\n      }\n      return Object.keys(attributes).length > 0 ? attributes : undefined;\n    },\n\n    diff: function(a, b) {\n      if (typeof a !== 'object') a = {};\n      if (typeof b !== 'object') b = {};\n      var attributes = Object.keys(a).concat(Object.keys(b)).reduce(function (attributes, key) {\n        if (!equal(a[key], b[key])) {\n          attributes[key] = b[key] === undefined ? null : b[key];\n        }\n        return attributes;\n      }, {});\n      return Object.keys(attributes).length > 0 ? attributes : undefined;\n    },\n\n    transform: function (a, b, priority) {\n      if (typeof a !== 'object') return b;\n      if (typeof b !== 'object') return undefined;\n      if (!priority) return b;  // b simply overwrites us without priority\n      var attributes = Object.keys(b).reduce(function (attributes, key) {\n        if (a[key] === undefined) attributes[key] = b[key];  // null is a valid value\n        return attributes;\n      }, {});\n      return Object.keys(attributes).length > 0 ? attributes : undefined;\n    }\n  },\n\n  iterator: function (ops) {\n    return new Iterator(ops);\n  },\n\n  length: function (op) {\n    if (typeof op['delete'] === 'number') {\n      return op['delete'];\n    } else if (typeof op.retain === 'number') {\n      return op.retain;\n    } else {\n      return typeof op.insert === 'string' ? op.insert.length : 1;\n    }\n  }\n};\n\n\nfunction Iterator(ops) {\n  this.ops = ops;\n  this.index = 0;\n  this.offset = 0;\n};\n\nIterator.prototype.hasNext = function () {\n  return this.peekLength() < Infinity;\n};\n\nIterator.prototype.next = function (length) {\n  if (!length) length = Infinity;\n  var nextOp = this.ops[this.index];\n  if (nextOp) {\n    var offset = this.offset;\n    var opLength = lib.length(nextOp)\n    if (length >= opLength - offset) {\n      length = opLength - offset;\n      this.index += 1;\n      this.offset = 0;\n    } else {\n      this.offset += length;\n    }\n    if (typeof nextOp['delete'] === 'number') {\n      return { 'delete': length };\n    } else {\n      var retOp = {};\n      if (nextOp.attributes) {\n        retOp.attributes = nextOp.attributes;\n      }\n      if (typeof nextOp.retain === 'number') {\n        retOp.retain = length;\n      } else if (typeof nextOp.insert === 'string') {\n        retOp.insert = nextOp.insert.substr(offset, length);\n      } else {\n        // offset should === 0, length should === 1\n        retOp.insert = nextOp.insert;\n      }\n      return retOp;\n    }\n  } else {\n    return { retain: Infinity };\n  }\n};\n\nIterator.prototype.peek = function () {\n  return this.ops[this.index];\n};\n\nIterator.prototype.peekLength = function () {\n  if (this.ops[this.index]) {\n    // Should never return 0 if our index is being managed correctly\n    return lib.length(this.ops[this.index]) - this.offset;\n  } else {\n    return Infinity;\n  }\n};\n\nIterator.prototype.peekType = function () {\n  if (this.ops[this.index]) {\n    if (typeof this.ops[this.index]['delete'] === 'number') {\n      return 'delete';\n    } else if (typeof this.ops[this.index].retain === 'number') {\n      return 'retain';\n    } else {\n      return 'insert';\n    }\n  }\n  return 'retain';\n};\n\n\nmodule.exports = lib;\n\n\n/***/ }),\n/* 21 */\n/***/ (function(module, exports) {\n\nvar clone = (function() {\n'use strict';\n\nfunction _instanceof(obj, type) {\n  return type != null && obj instanceof type;\n}\n\nvar nativeMap;\ntry {\n  nativeMap = Map;\n} catch(_) {\n  // maybe a reference error because no `Map`. Give it a dummy value that no\n  // value will ever be an instanceof.\n  nativeMap = function() {};\n}\n\nvar nativeSet;\ntry {\n  nativeSet = Set;\n} catch(_) {\n  nativeSet = function() {};\n}\n\nvar nativePromise;\ntry {\n  nativePromise = Promise;\n} catch(_) {\n  nativePromise = function() {};\n}\n\n/**\n * Clones (copies) an Object using deep copying.\n *\n * This function supports circular references by default, but if you are certain\n * there are no circular references in your object, you can save some CPU time\n * by calling clone(obj, false).\n *\n * Caution: if `circular` is false and `parent` contains circular references,\n * your program may enter an infinite loop and crash.\n *\n * @param `parent` - the object to be cloned\n * @param `circular` - set to true if the object to be cloned may contain\n *    circular references. (optional - true by default)\n * @param `depth` - set to a number if the object is only to be cloned to\n *    a particular depth. (optional - defaults to Infinity)\n * @param `prototype` - sets the prototype to be used when cloning an object.\n *    (optional - defaults to parent prototype).\n * @param `includeNonEnumerable` - set to true if the non-enumerable properties\n *    should be cloned as well. Non-enumerable properties on the prototype\n *    chain will be ignored. (optional - false by default)\n*/\nfunction clone(parent, circular, depth, prototype, includeNonEnumerable) {\n  if (typeof circular === 'object') {\n    depth = circular.depth;\n    prototype = circular.prototype;\n    includeNonEnumerable = circular.includeNonEnumerable;\n    circular = circular.circular;\n  }\n  // maintain two arrays for circular references, where corresponding parents\n  // and children have the same index\n  var allParents = [];\n  var allChildren = [];\n\n  var useBuffer = typeof Buffer != 'undefined';\n\n  if (typeof circular == 'undefined')\n    circular = true;\n\n  if (typeof depth == 'undefined')\n    depth = Infinity;\n\n  // recurse this function so we don't reset allParents and allChildren\n  function _clone(parent, depth) {\n    // cloning null always returns null\n    if (parent === null)\n      return null;\n\n    if (depth === 0)\n      return parent;\n\n    var child;\n    var proto;\n    if (typeof parent != 'object') {\n      return parent;\n    }\n\n    if (_instanceof(parent, nativeMap)) {\n      child = new nativeMap();\n    } else if (_instanceof(parent, nativeSet)) {\n      child = new nativeSet();\n    } else if (_instanceof(parent, nativePromise)) {\n      child = new nativePromise(function (resolve, reject) {\n        parent.then(function(value) {\n          resolve(_clone(value, depth - 1));\n        }, function(err) {\n          reject(_clone(err, depth - 1));\n        });\n      });\n    } else if (clone.__isArray(parent)) {\n      child = [];\n    } else if (clone.__isRegExp(parent)) {\n      child = new RegExp(parent.source, __getRegExpFlags(parent));\n      if (parent.lastIndex) child.lastIndex = parent.lastIndex;\n    } else if (clone.__isDate(parent)) {\n      child = new Date(parent.getTime());\n    } else if (useBuffer && Buffer.isBuffer(parent)) {\n      child = new Buffer(parent.length);\n      parent.copy(child);\n      return child;\n    } else if (_instanceof(parent, Error)) {\n      child = Object.create(parent);\n    } else {\n      if (typeof prototype == 'undefined') {\n        proto = Object.getPrototypeOf(parent);\n        child = Object.create(proto);\n      }\n      else {\n        child = Object.create(prototype);\n        proto = prototype;\n      }\n    }\n\n    if (circular) {\n      var index = allParents.indexOf(parent);\n\n      if (index != -1) {\n        return allChildren[index];\n      }\n      allParents.push(parent);\n      allChildren.push(child);\n    }\n\n    if (_instanceof(parent, nativeMap)) {\n      parent.forEach(function(value, key) {\n        var keyChild = _clone(key, depth - 1);\n        var valueChild = _clone(value, depth - 1);\n        child.set(keyChild, valueChild);\n      });\n    }\n    if (_instanceof(parent, nativeSet)) {\n      parent.forEach(function(value) {\n        var entryChild = _clone(value, depth - 1);\n        child.add(entryChild);\n      });\n    }\n\n    for (var i in parent) {\n      var attrs;\n      if (proto) {\n        attrs = Object.getOwnPropertyDescriptor(proto, i);\n      }\n\n      if (attrs && attrs.set == null) {\n        continue;\n      }\n      child[i] = _clone(parent[i], depth - 1);\n    }\n\n    if (Object.getOwnPropertySymbols) {\n      var symbols = Object.getOwnPropertySymbols(parent);\n      for (var i = 0; i < symbols.length; i++) {\n        // Don't need to worry about cloning a symbol because it is a primitive,\n        // like a number or string.\n        var symbol = symbols[i];\n        var descriptor = Object.getOwnPropertyDescriptor(parent, symbol);\n        if (descriptor && !descriptor.enumerable && !includeNonEnumerable) {\n          continue;\n        }\n        child[symbol] = _clone(parent[symbol], depth - 1);\n        if (!descriptor.enumerable) {\n          Object.defineProperty(child, symbol, {\n            enumerable: false\n          });\n        }\n      }\n    }\n\n    if (includeNonEnumerable) {\n      var allPropertyNames = Object.getOwnPropertyNames(parent);\n      for (var i = 0; i < allPropertyNames.length; i++) {\n        var propertyName = allPropertyNames[i];\n        var descriptor = Object.getOwnPropertyDescriptor(parent, propertyName);\n        if (descriptor && descriptor.enumerable) {\n          continue;\n        }\n        child[propertyName] = _clone(parent[propertyName], depth - 1);\n        Object.defineProperty(child, propertyName, {\n          enumerable: false\n        });\n      }\n    }\n\n    return child;\n  }\n\n  return _clone(parent, depth);\n}\n\n/**\n * Simple flat clone using prototype, accepts only objects, usefull for property\n * override on FLAT configuration object (no nested props).\n *\n * USE WITH CAUTION! This may not behave as you wish if you do not know how this\n * works.\n */\nclone.clonePrototype = function clonePrototype(parent) {\n  if (parent === null)\n    return null;\n\n  var c = function () {};\n  c.prototype = parent;\n  return new c();\n};\n\n// private utility functions\n\nfunction __objToStr(o) {\n  return Object.prototype.toString.call(o);\n}\nclone.__objToStr = __objToStr;\n\nfunction __isDate(o) {\n  return typeof o === 'object' && __objToStr(o) === '[object Date]';\n}\nclone.__isDate = __isDate;\n\nfunction __isArray(o) {\n  return typeof o === 'object' && __objToStr(o) === '[object Array]';\n}\nclone.__isArray = __isArray;\n\nfunction __isRegExp(o) {\n  return typeof o === 'object' && __objToStr(o) === '[object RegExp]';\n}\nclone.__isRegExp = __isRegExp;\n\nfunction __getRegExpFlags(re) {\n  var flags = '';\n  if (re.global) flags += 'g';\n  if (re.ignoreCase) flags += 'i';\n  if (re.multiline) flags += 'm';\n  return flags;\n}\nclone.__getRegExpFlags = __getRegExpFlags;\n\nreturn clone;\n})();\n\nif (typeof module === 'object' && module.exports) {\n  module.exports = clone;\n}\n\n\n/***/ }),\n/* 22 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"]) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); } }; }();\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if (\"value\" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };\n\nvar _parchment = __webpack_require__(0);\n\nvar _parchment2 = _interopRequireDefault(_parchment);\n\nvar _emitter = __webpack_require__(8);\n\nvar _emitter2 = _interopRequireDefault(_emitter);\n\nvar _block = __webpack_require__(4);\n\nvar _block2 = _interopRequireDefault(_block);\n\nvar _break = __webpack_require__(16);\n\nvar _break2 = _interopRequireDefault(_break);\n\nvar _code = __webpack_require__(13);\n\nvar _code2 = _interopRequireDefault(_code);\n\nvar _container = __webpack_require__(24);\n\nvar _container2 = _interopRequireDefault(_container);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nfunction isLine(blot) {\n  return blot instanceof _block2.default || blot instanceof _block.BlockEmbed;\n}\n\nvar Scroll = function (_Parchment$Scroll) {\n  _inherits(Scroll, _Parchment$Scroll);\n\n  function Scroll(domNode, config) {\n    _classCallCheck(this, Scroll);\n\n    var _this = _possibleConstructorReturn(this, (Scroll.__proto__ || Object.getPrototypeOf(Scroll)).call(this, domNode));\n\n    _this.emitter = config.emitter;\n    if (Array.isArray(config.whitelist)) {\n      _this.whitelist = config.whitelist.reduce(function (whitelist, format) {\n        whitelist[format] = true;\n        return whitelist;\n      }, {});\n    }\n    // Some reason fixes composition issues with character languages in Windows/Chrome, Safari\n    _this.domNode.addEventListener('DOMNodeInserted', function () {});\n    _this.optimize();\n    _this.enable();\n    return _this;\n  }\n\n  _createClass(Scroll, [{\n    key: 'batchStart',\n    value: function batchStart() {\n      this.batch = true;\n    }\n  }, {\n    key: 'batchEnd',\n    value: function batchEnd() {\n      this.batch = false;\n      this.optimize();\n    }\n  }, {\n    key: 'deleteAt',\n    value: function deleteAt(index, length) {\n      var _line = this.line(index),\n          _line2 = _slicedToArray(_line, 2),\n          first = _line2[0],\n          offset = _line2[1];\n\n      var _line3 = this.line(index + length),\n          _line4 = _slicedToArray(_line3, 1),\n          last = _line4[0];\n\n      _get(Scroll.prototype.__proto__ || Object.getPrototypeOf(Scroll.prototype), 'deleteAt', this).call(this, index, length);\n      if (last != null && first !== last && offset > 0) {\n        if (first instanceof _block.BlockEmbed || last instanceof _block.BlockEmbed) {\n          this.optimize();\n          return;\n        }\n        if (first instanceof _code2.default) {\n          var newlineIndex = first.newlineIndex(first.length(), true);\n          if (newlineIndex > -1) {\n            first = first.split(newlineIndex + 1);\n            if (first === last) {\n              this.optimize();\n              return;\n            }\n          }\n        } else if (last instanceof _code2.default) {\n          var _newlineIndex = last.newlineIndex(0);\n          if (_newlineIndex > -1) {\n            last.split(_newlineIndex + 1);\n          }\n        }\n        var ref = last.children.head instanceof _break2.default ? null : last.children.head;\n        first.moveChildren(last, ref);\n        first.remove();\n      }\n      this.optimize();\n    }\n  }, {\n    key: 'enable',\n    value: function enable() {\n      var enabled = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;\n\n      this.domNode.setAttribute('contenteditable', enabled);\n    }\n  }, {\n    key: 'formatAt',\n    value: function formatAt(index, length, format, value) {\n      if (this.whitelist != null && !this.whitelist[format]) return;\n      _get(Scroll.prototype.__proto__ || Object.getPrototypeOf(Scroll.prototype), 'formatAt', this).call(this, index, length, format, value);\n      this.optimize();\n    }\n  }, {\n    key: 'insertAt',\n    value: function insertAt(index, value, def) {\n      if (def != null && this.whitelist != null && !this.whitelist[value]) return;\n      if (index >= this.length()) {\n        if (def == null || _parchment2.default.query(value, _parchment2.default.Scope.BLOCK) == null) {\n          var blot = _parchment2.default.create(this.statics.defaultChild);\n          this.appendChild(blot);\n          if (def == null && value.endsWith('\\n')) {\n            value = value.slice(0, -1);\n          }\n          blot.insertAt(0, value, def);\n        } else {\n          var embed = _parchment2.default.create(value, def);\n          this.appendChild(embed);\n        }\n      } else {\n        _get(Scroll.prototype.__proto__ || Object.getPrototypeOf(Scroll.prototype), 'insertAt', this).call(this, index, value, def);\n      }\n      this.optimize();\n    }\n  }, {\n    key: 'insertBefore',\n    value: function insertBefore(blot, ref) {\n      if (blot.statics.scope === _parchment2.default.Scope.INLINE_BLOT) {\n        var wrapper = _parchment2.default.create(this.statics.defaultChild);\n        wrapper.appendChild(blot);\n        blot = wrapper;\n      }\n      _get(Scroll.prototype.__proto__ || Object.getPrototypeOf(Scroll.prototype), 'insertBefore', this).call(this, blot, ref);\n    }\n  }, {\n    key: 'leaf',\n    value: function leaf(index) {\n      return this.path(index).pop() || [null, -1];\n    }\n  }, {\n    key: 'line',\n    value: function line(index) {\n      if (index === this.length()) {\n        return this.line(index - 1);\n      }\n      return this.descendant(isLine, index);\n    }\n  }, {\n    key: 'lines',\n    value: function lines() {\n      var index = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;\n      var length = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : Number.MAX_VALUE;\n\n      var getLines = function getLines(blot, index, length) {\n        var lines = [],\n            lengthLeft = length;\n        blot.children.forEachAt(index, length, function (child, index, length) {\n          if (isLine(child)) {\n            lines.push(child);\n          } else if (child instanceof _parchment2.default.Container) {\n            lines = lines.concat(getLines(child, index, lengthLeft));\n          }\n          lengthLeft -= length;\n        });\n        return lines;\n      };\n      return getLines(this, index, length);\n    }\n  }, {\n    key: 'optimize',\n    value: function optimize() {\n      var mutations = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];\n      var context = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n      if (this.batch === true) return;\n      _get(Scroll.prototype.__proto__ || Object.getPrototypeOf(Scroll.prototype), 'optimize', this).call(this, mutations, context);\n      if (mutations.length > 0) {\n        this.emitter.emit(_emitter2.default.events.SCROLL_OPTIMIZE, mutations, context);\n      }\n    }\n  }, {\n    key: 'path',\n    value: function path(index) {\n      return _get(Scroll.prototype.__proto__ || Object.getPrototypeOf(Scroll.prototype), 'path', this).call(this, index).slice(1); // Exclude self\n    }\n  }, {\n    key: 'update',\n    value: function update(mutations) {\n      if (this.batch === true) return;\n      var source = _emitter2.default.sources.USER;\n      if (typeof mutations === 'string') {\n        source = mutations;\n      }\n      if (!Array.isArray(mutations)) {\n        mutations = this.observer.takeRecords();\n      }\n      if (mutations.length > 0) {\n        this.emitter.emit(_emitter2.default.events.SCROLL_BEFORE_UPDATE, source, mutations);\n      }\n      _get(Scroll.prototype.__proto__ || Object.getPrototypeOf(Scroll.prototype), 'update', this).call(this, mutations.concat([])); // pass copy\n      if (mutations.length > 0) {\n        this.emitter.emit(_emitter2.default.events.SCROLL_UPDATE, source, mutations);\n      }\n    }\n  }]);\n\n  return Scroll;\n}(_parchment2.default.Scroll);\n\nScroll.blotName = 'scroll';\nScroll.className = 'ql-editor';\nScroll.tagName = 'DIV';\nScroll.defaultChild = 'block';\nScroll.allowedChildren = [_block2.default, _block.BlockEmbed, _container2.default];\n\nexports.default = Scroll;\n\n/***/ }),\n/* 23 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"]) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); } }; }();\n\nvar _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if (\"value\" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _parchment = __webpack_require__(0);\n\nvar _parchment2 = _interopRequireDefault(_parchment);\n\nvar _text = __webpack_require__(7);\n\nvar _text2 = _interopRequireDefault(_text);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar Cursor = function (_Parchment$Embed) {\n  _inherits(Cursor, _Parchment$Embed);\n\n  _createClass(Cursor, null, [{\n    key: 'value',\n    value: function value() {\n      return undefined;\n    }\n  }]);\n\n  function Cursor(domNode, selection) {\n    _classCallCheck(this, Cursor);\n\n    var _this = _possibleConstructorReturn(this, (Cursor.__proto__ || Object.getPrototypeOf(Cursor)).call(this, domNode));\n\n    _this.selection = selection;\n    _this.textNode = document.createTextNode(Cursor.CONTENTS);\n    _this.domNode.appendChild(_this.textNode);\n    _this._length = 0;\n    return _this;\n  }\n\n  _createClass(Cursor, [{\n    key: 'detach',\n    value: function detach() {\n      // super.detach() will also clear domNode.__blot\n      if (this.parent != null) this.parent.removeChild(this);\n    }\n  }, {\n    key: 'format',\n    value: function format(name, value) {\n      if (this._length !== 0) {\n        return _get(Cursor.prototype.__proto__ || Object.getPrototypeOf(Cursor.prototype), 'format', this).call(this, name, value);\n      }\n      var target = this,\n          index = 0;\n      while (target != null && target.statics.scope !== _parchment2.default.Scope.BLOCK_BLOT) {\n        index += target.offset(target.parent);\n        target = target.parent;\n      }\n      if (target != null) {\n        this._length = Cursor.CONTENTS.length;\n        target.optimize();\n        target.formatAt(index, Cursor.CONTENTS.length, name, value);\n        this._length = 0;\n      }\n    }\n  }, {\n    key: 'index',\n    value: function index(node, offset) {\n      if (node === this.textNode) return 0;\n      return _get(Cursor.prototype.__proto__ || Object.getPrototypeOf(Cursor.prototype), 'index', this).call(this, node, offset);\n    }\n  }, {\n    key: 'length',\n    value: function length() {\n      return this._length;\n    }\n  }, {\n    key: 'position',\n    value: function position() {\n      return [this.textNode, this.textNode.data.length];\n    }\n  }, {\n    key: 'remove',\n    value: function remove() {\n      _get(Cursor.prototype.__proto__ || Object.getPrototypeOf(Cursor.prototype), 'remove', this).call(this);\n      this.parent = null;\n    }\n  }, {\n    key: 'restore',\n    value: function restore() {\n      if (this.selection.composing || this.parent == null) return;\n      var textNode = this.textNode;\n      var range = this.selection.getNativeRange();\n      var restoreText = void 0,\n          start = void 0,\n          end = void 0;\n      if (range != null && range.start.node === textNode && range.end.node === textNode) {\n        var _ref = [textNode, range.start.offset, range.end.offset];\n        restoreText = _ref[0];\n        start = _ref[1];\n        end = _ref[2];\n      }\n      // Link format will insert text outside of anchor tag\n      while (this.domNode.lastChild != null && this.domNode.lastChild !== this.textNode) {\n        this.domNode.parentNode.insertBefore(this.domNode.lastChild, this.domNode);\n      }\n      if (this.textNode.data !== Cursor.CONTENTS) {\n        var text = this.textNode.data.split(Cursor.CONTENTS).join('');\n        if (this.next instanceof _text2.default) {\n          restoreText = this.next.domNode;\n          this.next.insertAt(0, text);\n          this.textNode.data = Cursor.CONTENTS;\n        } else {\n          this.textNode.data = text;\n          this.parent.insertBefore(_parchment2.default.create(this.textNode), this);\n          this.textNode = document.createTextNode(Cursor.CONTENTS);\n          this.domNode.appendChild(this.textNode);\n        }\n      }\n      this.remove();\n      if (start != null) {\n        var _map = [start, end].map(function (offset) {\n          return Math.max(0, Math.min(restoreText.data.length, offset - 1));\n        });\n\n        var _map2 = _slicedToArray(_map, 2);\n\n        start = _map2[0];\n        end = _map2[1];\n\n        return {\n          startNode: restoreText,\n          startOffset: start,\n          endNode: restoreText,\n          endOffset: end\n        };\n      }\n    }\n  }, {\n    key: 'update',\n    value: function update(mutations, context) {\n      var _this2 = this;\n\n      if (mutations.some(function (mutation) {\n        return mutation.type === 'characterData' && mutation.target === _this2.textNode;\n      })) {\n        var range = this.restore();\n        if (range) context.range = range;\n      }\n    }\n  }, {\n    key: 'value',\n    value: function value() {\n      return '';\n    }\n  }]);\n\n  return Cursor;\n}(_parchment2.default.Embed);\n\nCursor.blotName = 'cursor';\nCursor.className = 'ql-cursor';\nCursor.tagName = 'span';\nCursor.CONTENTS = '\\uFEFF'; // Zero width no break space\n\n\nexports.default = Cursor;\n\n/***/ }),\n/* 24 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _parchment = __webpack_require__(0);\n\nvar _parchment2 = _interopRequireDefault(_parchment);\n\nvar _block = __webpack_require__(4);\n\nvar _block2 = _interopRequireDefault(_block);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar Container = function (_Parchment$Container) {\n  _inherits(Container, _Parchment$Container);\n\n  function Container() {\n    _classCallCheck(this, Container);\n\n    return _possibleConstructorReturn(this, (Container.__proto__ || Object.getPrototypeOf(Container)).apply(this, arguments));\n  }\n\n  return Container;\n}(_parchment2.default.Container);\n\nContainer.allowedChildren = [_block2.default, _block.BlockEmbed, Container];\n\nexports.default = Container;\n\n/***/ }),\n/* 25 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.ColorStyle = exports.ColorClass = exports.ColorAttributor = undefined;\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if (\"value\" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };\n\nvar _parchment = __webpack_require__(0);\n\nvar _parchment2 = _interopRequireDefault(_parchment);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar ColorAttributor = function (_Parchment$Attributor) {\n  _inherits(ColorAttributor, _Parchment$Attributor);\n\n  function ColorAttributor() {\n    _classCallCheck(this, ColorAttributor);\n\n    return _possibleConstructorReturn(this, (ColorAttributor.__proto__ || Object.getPrototypeOf(ColorAttributor)).apply(this, arguments));\n  }\n\n  _createClass(ColorAttributor, [{\n    key: 'value',\n    value: function value(domNode) {\n      var value = _get(ColorAttributor.prototype.__proto__ || Object.getPrototypeOf(ColorAttributor.prototype), 'value', this).call(this, domNode);\n      if (!value.startsWith('rgb(')) return value;\n      value = value.replace(/^[^\\d]+/, '').replace(/[^\\d]+$/, '');\n      return '#' + value.split(',').map(function (component) {\n        return ('00' + parseInt(component).toString(16)).slice(-2);\n      }).join('');\n    }\n  }]);\n\n  return ColorAttributor;\n}(_parchment2.default.Attributor.Style);\n\nvar ColorClass = new _parchment2.default.Attributor.Class('color', 'ql-color', {\n  scope: _parchment2.default.Scope.INLINE\n});\nvar ColorStyle = new ColorAttributor('color', 'color', {\n  scope: _parchment2.default.Scope.INLINE\n});\n\nexports.ColorAttributor = ColorAttributor;\nexports.ColorClass = ColorClass;\nexports.ColorStyle = ColorStyle;\n\n/***/ }),\n/* 26 */,\n/* 27 */,\n/* 28 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _parchment = __webpack_require__(0);\n\nvar _parchment2 = _interopRequireDefault(_parchment);\n\nvar _quill = __webpack_require__(5);\n\nvar _quill2 = _interopRequireDefault(_quill);\n\nvar _block = __webpack_require__(4);\n\nvar _block2 = _interopRequireDefault(_block);\n\nvar _break = __webpack_require__(16);\n\nvar _break2 = _interopRequireDefault(_break);\n\nvar _container = __webpack_require__(24);\n\nvar _container2 = _interopRequireDefault(_container);\n\nvar _cursor = __webpack_require__(23);\n\nvar _cursor2 = _interopRequireDefault(_cursor);\n\nvar _embed = __webpack_require__(35);\n\nvar _embed2 = _interopRequireDefault(_embed);\n\nvar _inline = __webpack_require__(6);\n\nvar _inline2 = _interopRequireDefault(_inline);\n\nvar _scroll = __webpack_require__(22);\n\nvar _scroll2 = _interopRequireDefault(_scroll);\n\nvar _text = __webpack_require__(7);\n\nvar _text2 = _interopRequireDefault(_text);\n\nvar _clipboard = __webpack_require__(55);\n\nvar _clipboard2 = _interopRequireDefault(_clipboard);\n\nvar _history = __webpack_require__(42);\n\nvar _history2 = _interopRequireDefault(_history);\n\nvar _keyboard = __webpack_require__(34);\n\nvar _keyboard2 = _interopRequireDefault(_keyboard);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n_quill2.default.register({\n  'blots/block': _block2.default,\n  'blots/block/embed': _block.BlockEmbed,\n  'blots/break': _break2.default,\n  'blots/container': _container2.default,\n  'blots/cursor': _cursor2.default,\n  'blots/embed': _embed2.default,\n  'blots/inline': _inline2.default,\n  'blots/scroll': _scroll2.default,\n  'blots/text': _text2.default,\n\n  'modules/clipboard': _clipboard2.default,\n  'modules/history': _history2.default,\n  'modules/keyboard': _keyboard2.default\n});\n\n_parchment2.default.register(_block2.default, _break2.default, _cursor2.default, _inline2.default, _scroll2.default, _text2.default);\n\nexports.default = _quill2.default;\n\n/***/ }),\n/* 29 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Registry = __webpack_require__(1);\nvar ShadowBlot = /** @class */ (function () {\n    function ShadowBlot(domNode) {\n        this.domNode = domNode;\n        // @ts-ignore\n        this.domNode[Registry.DATA_KEY] = { blot: this };\n    }\n    Object.defineProperty(ShadowBlot.prototype, \"statics\", {\n        // Hack for accessing inherited static methods\n        get: function () {\n            return this.constructor;\n        },\n        enumerable: true,\n        configurable: true\n    });\n    ShadowBlot.create = function (value) {\n        if (this.tagName == null) {\n            throw new Registry.ParchmentError('Blot definition missing tagName');\n        }\n        var node;\n        if (Array.isArray(this.tagName)) {\n            if (typeof value === 'string') {\n                value = value.toUpperCase();\n                if (parseInt(value).toString() === value) {\n                    value = parseInt(value);\n                }\n            }\n            if (typeof value === 'number') {\n                node = document.createElement(this.tagName[value - 1]);\n            }\n            else if (this.tagName.indexOf(value) > -1) {\n                node = document.createElement(value);\n            }\n            else {\n                node = document.createElement(this.tagName[0]);\n            }\n        }\n        else {\n            node = document.createElement(this.tagName);\n        }\n        if (this.className) {\n            node.classList.add(this.className);\n        }\n        return node;\n    };\n    ShadowBlot.prototype.attach = function () {\n        if (this.parent != null) {\n            this.scroll = this.parent.scroll;\n        }\n    };\n    ShadowBlot.prototype.clone = function () {\n        var domNode = this.domNode.cloneNode(false);\n        return Registry.create(domNode);\n    };\n    ShadowBlot.prototype.detach = function () {\n        if (this.parent != null)\n            this.parent.removeChild(this);\n        // @ts-ignore\n        delete this.domNode[Registry.DATA_KEY];\n    };\n    ShadowBlot.prototype.deleteAt = function (index, length) {\n        var blot = this.isolate(index, length);\n        blot.remove();\n    };\n    ShadowBlot.prototype.formatAt = function (index, length, name, value) {\n        var blot = this.isolate(index, length);\n        if (Registry.query(name, Registry.Scope.BLOT) != null && value) {\n            blot.wrap(name, value);\n        }\n        else if (Registry.query(name, Registry.Scope.ATTRIBUTE) != null) {\n            var parent = Registry.create(this.statics.scope);\n            blot.wrap(parent);\n            parent.format(name, value);\n        }\n    };\n    ShadowBlot.prototype.insertAt = function (index, value, def) {\n        var blot = def == null ? Registry.create('text', value) : Registry.create(value, def);\n        var ref = this.split(index);\n        this.parent.insertBefore(blot, ref);\n    };\n    ShadowBlot.prototype.insertInto = function (parentBlot, refBlot) {\n        if (refBlot === void 0) { refBlot = null; }\n        if (this.parent != null) {\n            this.parent.children.remove(this);\n        }\n        var refDomNode = null;\n        parentBlot.children.insertBefore(this, refBlot);\n        if (refBlot != null) {\n            refDomNode = refBlot.domNode;\n        }\n        if (this.next == null || this.domNode.nextSibling != refDomNode) {\n            parentBlot.domNode.insertBefore(this.domNode, refDomNode);\n        }\n        this.parent = parentBlot;\n        this.attach();\n    };\n    ShadowBlot.prototype.isolate = function (index, length) {\n        var target = this.split(index);\n        target.split(length);\n        return target;\n    };\n    ShadowBlot.prototype.length = function () {\n        return 1;\n    };\n    ShadowBlot.prototype.offset = function (root) {\n        if (root === void 0) { root = this.parent; }\n        if (this.parent == null || this == root)\n            return 0;\n        return this.parent.children.offset(this) + this.parent.offset(root);\n    };\n    ShadowBlot.prototype.optimize = function (context) {\n        // TODO clean up once we use WeakMap\n        // @ts-ignore\n        if (this.domNode[Registry.DATA_KEY] != null) {\n            // @ts-ignore\n            delete this.domNode[Registry.DATA_KEY].mutations;\n        }\n    };\n    ShadowBlot.prototype.remove = function () {\n        if (this.domNode.parentNode != null) {\n            this.domNode.parentNode.removeChild(this.domNode);\n        }\n        this.detach();\n    };\n    ShadowBlot.prototype.replace = function (target) {\n        if (target.parent == null)\n            return;\n        target.parent.insertBefore(this, target.next);\n        target.remove();\n    };\n    ShadowBlot.prototype.replaceWith = function (name, value) {\n        var replacement = typeof name === 'string' ? Registry.create(name, value) : name;\n        replacement.replace(this);\n        return replacement;\n    };\n    ShadowBlot.prototype.split = function (index, force) {\n        return index === 0 ? this : this.next;\n    };\n    ShadowBlot.prototype.update = function (mutations, context) {\n        // Nothing to do by default\n    };\n    ShadowBlot.prototype.wrap = function (name, value) {\n        var wrapper = typeof name === 'string' ? Registry.create(name, value) : name;\n        if (this.parent != null) {\n            this.parent.insertBefore(wrapper, this.next);\n        }\n        wrapper.appendChild(this);\n        return wrapper;\n    };\n    ShadowBlot.blotName = 'abstract';\n    return ShadowBlot;\n}());\nexports.default = ShadowBlot;\n\n\n/***/ }),\n/* 30 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar attributor_1 = __webpack_require__(12);\nvar class_1 = __webpack_require__(31);\nvar style_1 = __webpack_require__(32);\nvar Registry = __webpack_require__(1);\nvar AttributorStore = /** @class */ (function () {\n    function AttributorStore(domNode) {\n        this.attributes = {};\n        this.domNode = domNode;\n        this.build();\n    }\n    AttributorStore.prototype.attribute = function (attribute, value) {\n        // verb\n        if (value) {\n            if (attribute.add(this.domNode, value)) {\n                if (attribute.value(this.domNode) != null) {\n                    this.attributes[attribute.attrName] = attribute;\n                }\n                else {\n                    delete this.attributes[attribute.attrName];\n                }\n            }\n        }\n        else {\n            attribute.remove(this.domNode);\n            delete this.attributes[attribute.attrName];\n        }\n    };\n    AttributorStore.prototype.build = function () {\n        var _this = this;\n        this.attributes = {};\n        var attributes = attributor_1.default.keys(this.domNode);\n        var classes = class_1.default.keys(this.domNode);\n        var styles = style_1.default.keys(this.domNode);\n        attributes\n            .concat(classes)\n            .concat(styles)\n            .forEach(function (name) {\n            var attr = Registry.query(name, Registry.Scope.ATTRIBUTE);\n            if (attr instanceof attributor_1.default) {\n                _this.attributes[attr.attrName] = attr;\n            }\n        });\n    };\n    AttributorStore.prototype.copy = function (target) {\n        var _this = this;\n        Object.keys(this.attributes).forEach(function (key) {\n            var value = _this.attributes[key].value(_this.domNode);\n            target.format(key, value);\n        });\n    };\n    AttributorStore.prototype.move = function (target) {\n        var _this = this;\n        this.copy(target);\n        Object.keys(this.attributes).forEach(function (key) {\n            _this.attributes[key].remove(_this.domNode);\n        });\n        this.attributes = {};\n    };\n    AttributorStore.prototype.values = function () {\n        var _this = this;\n        return Object.keys(this.attributes).reduce(function (attributes, name) {\n            attributes[name] = _this.attributes[name].value(_this.domNode);\n            return attributes;\n        }, {});\n    };\n    return AttributorStore;\n}());\nexports.default = AttributorStore;\n\n\n/***/ }),\n/* 31 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar __extends = (this && this.__extends) || (function () {\n    var extendStatics = Object.setPrototypeOf ||\n        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar attributor_1 = __webpack_require__(12);\nfunction match(node, prefix) {\n    var className = node.getAttribute('class') || '';\n    return className.split(/\\s+/).filter(function (name) {\n        return name.indexOf(prefix + \"-\") === 0;\n    });\n}\nvar ClassAttributor = /** @class */ (function (_super) {\n    __extends(ClassAttributor, _super);\n    function ClassAttributor() {\n        return _super !== null && _super.apply(this, arguments) || this;\n    }\n    ClassAttributor.keys = function (node) {\n        return (node.getAttribute('class') || '').split(/\\s+/).map(function (name) {\n            return name\n                .split('-')\n                .slice(0, -1)\n                .join('-');\n        });\n    };\n    ClassAttributor.prototype.add = function (node, value) {\n        if (!this.canAdd(node, value))\n            return false;\n        this.remove(node);\n        node.classList.add(this.keyName + \"-\" + value);\n        return true;\n    };\n    ClassAttributor.prototype.remove = function (node) {\n        var matches = match(node, this.keyName);\n        matches.forEach(function (name) {\n            node.classList.remove(name);\n        });\n        if (node.classList.length === 0) {\n            node.removeAttribute('class');\n        }\n    };\n    ClassAttributor.prototype.value = function (node) {\n        var result = match(node, this.keyName)[0] || '';\n        var value = result.slice(this.keyName.length + 1); // +1 for hyphen\n        return this.canAdd(node, value) ? value : '';\n    };\n    return ClassAttributor;\n}(attributor_1.default));\nexports.default = ClassAttributor;\n\n\n/***/ }),\n/* 32 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar __extends = (this && this.__extends) || (function () {\n    var extendStatics = Object.setPrototypeOf ||\n        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar attributor_1 = __webpack_require__(12);\nfunction camelize(name) {\n    var parts = name.split('-');\n    var rest = parts\n        .slice(1)\n        .map(function (part) {\n        return part[0].toUpperCase() + part.slice(1);\n    })\n        .join('');\n    return parts[0] + rest;\n}\nvar StyleAttributor = /** @class */ (function (_super) {\n    __extends(StyleAttributor, _super);\n    function StyleAttributor() {\n        return _super !== null && _super.apply(this, arguments) || this;\n    }\n    StyleAttributor.keys = function (node) {\n        return (node.getAttribute('style') || '').split(';').map(function (value) {\n            var arr = value.split(':');\n            return arr[0].trim();\n        });\n    };\n    StyleAttributor.prototype.add = function (node, value) {\n        if (!this.canAdd(node, value))\n            return false;\n        // @ts-ignore\n        node.style[camelize(this.keyName)] = value;\n        return true;\n    };\n    StyleAttributor.prototype.remove = function (node) {\n        // @ts-ignore\n        node.style[camelize(this.keyName)] = '';\n        if (!node.getAttribute('style')) {\n            node.removeAttribute('style');\n        }\n    };\n    StyleAttributor.prototype.value = function (node) {\n        // @ts-ignore\n        var value = node.style[camelize(this.keyName)];\n        return this.canAdd(node, value) ? value : '';\n    };\n    return StyleAttributor;\n}(attributor_1.default));\nexports.default = StyleAttributor;\n\n\n/***/ }),\n/* 33 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar Theme = function () {\n  function Theme(quill, options) {\n    _classCallCheck(this, Theme);\n\n    this.quill = quill;\n    this.options = options;\n    this.modules = {};\n  }\n\n  _createClass(Theme, [{\n    key: 'init',\n    value: function init() {\n      var _this = this;\n\n      Object.keys(this.options.modules).forEach(function (name) {\n        if (_this.modules[name] == null) {\n          _this.addModule(name);\n        }\n      });\n    }\n  }, {\n    key: 'addModule',\n    value: function addModule(name) {\n      var moduleClass = this.quill.constructor.import('modules/' + name);\n      this.modules[name] = new moduleClass(this.quill, this.options.modules[name] || {});\n      return this.modules[name];\n    }\n  }]);\n\n  return Theme;\n}();\n\nTheme.DEFAULTS = {\n  modules: {}\n};\nTheme.themes = {\n  'default': Theme\n};\n\nexports.default = Theme;\n\n/***/ }),\n/* 34 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.SHORTKEY = exports.default = undefined;\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nvar _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"]) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); } }; }();\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _clone = __webpack_require__(21);\n\nvar _clone2 = _interopRequireDefault(_clone);\n\nvar _deepEqual = __webpack_require__(11);\n\nvar _deepEqual2 = _interopRequireDefault(_deepEqual);\n\nvar _extend = __webpack_require__(3);\n\nvar _extend2 = _interopRequireDefault(_extend);\n\nvar _quillDelta = __webpack_require__(2);\n\nvar _quillDelta2 = _interopRequireDefault(_quillDelta);\n\nvar _op = __webpack_require__(20);\n\nvar _op2 = _interopRequireDefault(_op);\n\nvar _parchment = __webpack_require__(0);\n\nvar _parchment2 = _interopRequireDefault(_parchment);\n\nvar _quill = __webpack_require__(5);\n\nvar _quill2 = _interopRequireDefault(_quill);\n\nvar _logger = __webpack_require__(10);\n\nvar _logger2 = _interopRequireDefault(_logger);\n\nvar _module = __webpack_require__(9);\n\nvar _module2 = _interopRequireDefault(_module);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar debug = (0, _logger2.default)('quill:keyboard');\n\nvar SHORTKEY = /Mac/i.test(navigator.platform) ? 'metaKey' : 'ctrlKey';\n\nvar Keyboard = function (_Module) {\n  _inherits(Keyboard, _Module);\n\n  _createClass(Keyboard, null, [{\n    key: 'match',\n    value: function match(evt, binding) {\n      binding = normalize(binding);\n      if (['altKey', 'ctrlKey', 'metaKey', 'shiftKey'].some(function (key) {\n        return !!binding[key] !== evt[key] && binding[key] !== null;\n      })) {\n        return false;\n      }\n      return binding.key === (evt.which || evt.keyCode);\n    }\n  }]);\n\n  function Keyboard(quill, options) {\n    _classCallCheck(this, Keyboard);\n\n    var _this = _possibleConstructorReturn(this, (Keyboard.__proto__ || Object.getPrototypeOf(Keyboard)).call(this, quill, options));\n\n    _this.bindings = {};\n    Object.keys(_this.options.bindings).forEach(function (name) {\n      if (name === 'list autofill' && quill.scroll.whitelist != null && !quill.scroll.whitelist['list']) {\n        return;\n      }\n      if (_this.options.bindings[name]) {\n        _this.addBinding(_this.options.bindings[name]);\n      }\n    });\n    _this.addBinding({ key: Keyboard.keys.ENTER, shiftKey: null }, handleEnter);\n    _this.addBinding({ key: Keyboard.keys.ENTER, metaKey: null, ctrlKey: null, altKey: null }, function () {});\n    if (/Firefox/i.test(navigator.userAgent)) {\n      // Need to handle delete and backspace for Firefox in the general case #1171\n      _this.addBinding({ key: Keyboard.keys.BACKSPACE }, { collapsed: true }, handleBackspace);\n      _this.addBinding({ key: Keyboard.keys.DELETE }, { collapsed: true }, handleDelete);\n    } else {\n      _this.addBinding({ key: Keyboard.keys.BACKSPACE }, { collapsed: true, prefix: /^.?$/ }, handleBackspace);\n      _this.addBinding({ key: Keyboard.keys.DELETE }, { collapsed: true, suffix: /^.?$/ }, handleDelete);\n    }\n    _this.addBinding({ key: Keyboard.keys.BACKSPACE }, { collapsed: false }, handleDeleteRange);\n    _this.addBinding({ key: Keyboard.keys.DELETE }, { collapsed: false }, handleDeleteRange);\n    _this.addBinding({ key: Keyboard.keys.BACKSPACE, altKey: null, ctrlKey: null, metaKey: null, shiftKey: null }, { collapsed: true, offset: 0 }, handleBackspace);\n    _this.listen();\n    return _this;\n  }\n\n  _createClass(Keyboard, [{\n    key: 'addBinding',\n    value: function addBinding(key) {\n      var context = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n      var handler = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n\n      var binding = normalize(key);\n      if (binding == null || binding.key == null) {\n        return debug.warn('Attempted to add invalid keyboard binding', binding);\n      }\n      if (typeof context === 'function') {\n        context = { handler: context };\n      }\n      if (typeof handler === 'function') {\n        handler = { handler: handler };\n      }\n      binding = (0, _extend2.default)(binding, context, handler);\n      this.bindings[binding.key] = this.bindings[binding.key] || [];\n      this.bindings[binding.key].push(binding);\n    }\n  }, {\n    key: 'listen',\n    value: function listen() {\n      var _this2 = this;\n\n      this.quill.root.addEventListener('keydown', function (evt) {\n        if (evt.defaultPrevented) return;\n        var which = evt.which || evt.keyCode;\n        var bindings = (_this2.bindings[which] || []).filter(function (binding) {\n          return Keyboard.match(evt, binding);\n        });\n        if (bindings.length === 0) return;\n        var range = _this2.quill.getSelection();\n        if (range == null || !_this2.quill.hasFocus()) return;\n\n        var _quill$getLine = _this2.quill.getLine(range.index),\n            _quill$getLine2 = _slicedToArray(_quill$getLine, 2),\n            line = _quill$getLine2[0],\n            offset = _quill$getLine2[1];\n\n        var _quill$getLeaf = _this2.quill.getLeaf(range.index),\n            _quill$getLeaf2 = _slicedToArray(_quill$getLeaf, 2),\n            leafStart = _quill$getLeaf2[0],\n            offsetStart = _quill$getLeaf2[1];\n\n        var _ref = range.length === 0 ? [leafStart, offsetStart] : _this2.quill.getLeaf(range.index + range.length),\n            _ref2 = _slicedToArray(_ref, 2),\n            leafEnd = _ref2[0],\n            offsetEnd = _ref2[1];\n\n        var prefixText = leafStart instanceof _parchment2.default.Text ? leafStart.value().slice(0, offsetStart) : '';\n        var suffixText = leafEnd instanceof _parchment2.default.Text ? leafEnd.value().slice(offsetEnd) : '';\n        var curContext = {\n          collapsed: range.length === 0,\n          empty: range.length === 0 && line.length() <= 1,\n          format: _this2.quill.getFormat(range),\n          offset: offset,\n          prefix: prefixText,\n          suffix: suffixText\n        };\n        var prevented = bindings.some(function (binding) {\n          if (binding.collapsed != null && binding.collapsed !== curContext.collapsed) return false;\n          if (binding.empty != null && binding.empty !== curContext.empty) return false;\n          if (binding.offset != null && binding.offset !== curContext.offset) return false;\n          if (Array.isArray(binding.format)) {\n            // any format is present\n            if (binding.format.every(function (name) {\n              return curContext.format[name] == null;\n            })) {\n              return false;\n            }\n          } else if (_typeof(binding.format) === 'object') {\n            // all formats must match\n            if (!Object.keys(binding.format).every(function (name) {\n              if (binding.format[name] === true) return curContext.format[name] != null;\n              if (binding.format[name] === false) return curContext.format[name] == null;\n              return (0, _deepEqual2.default)(binding.format[name], curContext.format[name]);\n            })) {\n              return false;\n            }\n          }\n          if (binding.prefix != null && !binding.prefix.test(curContext.prefix)) return false;\n          if (binding.suffix != null && !binding.suffix.test(curContext.suffix)) return false;\n          return binding.handler.call(_this2, range, curContext) !== true;\n        });\n        if (prevented) {\n          evt.preventDefault();\n        }\n      });\n    }\n  }]);\n\n  return Keyboard;\n}(_module2.default);\n\nKeyboard.keys = {\n  BACKSPACE: 8,\n  TAB: 9,\n  ENTER: 13,\n  ESCAPE: 27,\n  LEFT: 37,\n  UP: 38,\n  RIGHT: 39,\n  DOWN: 40,\n  DELETE: 46\n};\n\nKeyboard.DEFAULTS = {\n  bindings: {\n    'bold': makeFormatHandler('bold'),\n    'italic': makeFormatHandler('italic'),\n    'underline': makeFormatHandler('underline'),\n    'indent': {\n      // highlight tab or tab at beginning of list, indent or blockquote\n      key: Keyboard.keys.TAB,\n      format: ['blockquote', 'indent', 'list'],\n      handler: function handler(range, context) {\n        if (context.collapsed && context.offset !== 0) return true;\n        this.quill.format('indent', '+1', _quill2.default.sources.USER);\n      }\n    },\n    'outdent': {\n      key: Keyboard.keys.TAB,\n      shiftKey: true,\n      format: ['blockquote', 'indent', 'list'],\n      // highlight tab or tab at beginning of list, indent or blockquote\n      handler: function handler(range, context) {\n        if (context.collapsed && context.offset !== 0) return true;\n        this.quill.format('indent', '-1', _quill2.default.sources.USER);\n      }\n    },\n    'outdent backspace': {\n      key: Keyboard.keys.BACKSPACE,\n      collapsed: true,\n      shiftKey: null,\n      metaKey: null,\n      ctrlKey: null,\n      altKey: null,\n      format: ['indent', 'list'],\n      offset: 0,\n      handler: function handler(range, context) {\n        if (context.format.indent != null) {\n          this.quill.format('indent', '-1', _quill2.default.sources.USER);\n        } else if (context.format.list != null) {\n          this.quill.format('list', false, _quill2.default.sources.USER);\n        }\n      }\n    },\n    'indent code-block': makeCodeBlockHandler(true),\n    'outdent code-block': makeCodeBlockHandler(false),\n    'remove tab': {\n      key: Keyboard.keys.TAB,\n      shiftKey: true,\n      collapsed: true,\n      prefix: /\\t$/,\n      handler: function handler(range) {\n        this.quill.deleteText(range.index - 1, 1, _quill2.default.sources.USER);\n      }\n    },\n    'tab': {\n      key: Keyboard.keys.TAB,\n      handler: function handler(range) {\n        this.quill.history.cutoff();\n        var delta = new _quillDelta2.default().retain(range.index).delete(range.length).insert('\\t');\n        this.quill.updateContents(delta, _quill2.default.sources.USER);\n        this.quill.history.cutoff();\n        this.quill.setSelection(range.index + 1, _quill2.default.sources.SILENT);\n      }\n    },\n    'list empty enter': {\n      key: Keyboard.keys.ENTER,\n      collapsed: true,\n      format: ['list'],\n      empty: true,\n      handler: function handler(range, context) {\n        this.quill.format('list', false, _quill2.default.sources.USER);\n        if (context.format.indent) {\n          this.quill.format('indent', false, _quill2.default.sources.USER);\n        }\n      }\n    },\n    'checklist enter': {\n      key: Keyboard.keys.ENTER,\n      collapsed: true,\n      format: { list: 'checked' },\n      handler: function handler(range) {\n        var _quill$getLine3 = this.quill.getLine(range.index),\n            _quill$getLine4 = _slicedToArray(_quill$getLine3, 2),\n            line = _quill$getLine4[0],\n            offset = _quill$getLine4[1];\n\n        var formats = (0, _extend2.default)({}, line.formats(), { list: 'checked' });\n        var delta = new _quillDelta2.default().retain(range.index).insert('\\n', formats).retain(line.length() - offset - 1).retain(1, { list: 'unchecked' });\n        this.quill.updateContents(delta, _quill2.default.sources.USER);\n        this.quill.setSelection(range.index + 1, _quill2.default.sources.SILENT);\n        this.quill.scrollIntoView();\n      }\n    },\n    'header enter': {\n      key: Keyboard.keys.ENTER,\n      collapsed: true,\n      format: ['header'],\n      suffix: /^$/,\n      handler: function handler(range, context) {\n        var _quill$getLine5 = this.quill.getLine(range.index),\n            _quill$getLine6 = _slicedToArray(_quill$getLine5, 2),\n            line = _quill$getLine6[0],\n            offset = _quill$getLine6[1];\n\n        var delta = new _quillDelta2.default().retain(range.index).insert('\\n', context.format).retain(line.length() - offset - 1).retain(1, { header: null });\n        this.quill.updateContents(delta, _quill2.default.sources.USER);\n        this.quill.setSelection(range.index + 1, _quill2.default.sources.SILENT);\n        this.quill.scrollIntoView();\n      }\n    },\n    'list autofill': {\n      key: ' ',\n      collapsed: true,\n      format: { list: false },\n      prefix: /^\\s*?(\\d+\\.|-|\\*|\\[ ?\\]|\\[x\\])$/,\n      handler: function handler(range, context) {\n        var length = context.prefix.length;\n\n        var _quill$getLine7 = this.quill.getLine(range.index),\n            _quill$getLine8 = _slicedToArray(_quill$getLine7, 2),\n            line = _quill$getLine8[0],\n            offset = _quill$getLine8[1];\n\n        if (offset > length) return true;\n        var value = void 0;\n        switch (context.prefix.trim()) {\n          case '[]':case '[ ]':\n            value = 'unchecked';\n            break;\n          case '[x]':\n            value = 'checked';\n            break;\n          case '-':case '*':\n            value = 'bullet';\n            break;\n          default:\n            value = 'ordered';\n        }\n        this.quill.insertText(range.index, ' ', _quill2.default.sources.USER);\n        this.quill.history.cutoff();\n        var delta = new _quillDelta2.default().retain(range.index - offset).delete(length + 1).retain(line.length() - 2 - offset).retain(1, { list: value });\n        this.quill.updateContents(delta, _quill2.default.sources.USER);\n        this.quill.history.cutoff();\n        this.quill.setSelection(range.index - length, _quill2.default.sources.SILENT);\n      }\n    },\n    'code exit': {\n      key: Keyboard.keys.ENTER,\n      collapsed: true,\n      format: ['code-block'],\n      prefix: /\\n\\n$/,\n      suffix: /^\\s+$/,\n      handler: function handler(range) {\n        var _quill$getLine9 = this.quill.getLine(range.index),\n            _quill$getLine10 = _slicedToArray(_quill$getLine9, 2),\n            line = _quill$getLine10[0],\n            offset = _quill$getLine10[1];\n\n        var delta = new _quillDelta2.default().retain(range.index + line.length() - offset - 2).retain(1, { 'code-block': null }).delete(1);\n        this.quill.updateContents(delta, _quill2.default.sources.USER);\n      }\n    },\n    'embed left': makeEmbedArrowHandler(Keyboard.keys.LEFT, false),\n    'embed left shift': makeEmbedArrowHandler(Keyboard.keys.LEFT, true),\n    'embed right': makeEmbedArrowHandler(Keyboard.keys.RIGHT, false),\n    'embed right shift': makeEmbedArrowHandler(Keyboard.keys.RIGHT, true)\n  }\n};\n\nfunction makeEmbedArrowHandler(key, shiftKey) {\n  var _ref3;\n\n  var where = key === Keyboard.keys.LEFT ? 'prefix' : 'suffix';\n  return _ref3 = {\n    key: key,\n    shiftKey: shiftKey,\n    altKey: null\n  }, _defineProperty(_ref3, where, /^$/), _defineProperty(_ref3, 'handler', function handler(range) {\n    var index = range.index;\n    if (key === Keyboard.keys.RIGHT) {\n      index += range.length + 1;\n    }\n\n    var _quill$getLeaf3 = this.quill.getLeaf(index),\n        _quill$getLeaf4 = _slicedToArray(_quill$getLeaf3, 1),\n        leaf = _quill$getLeaf4[0];\n\n    if (!(leaf instanceof _parchment2.default.Embed)) return true;\n    if (key === Keyboard.keys.LEFT) {\n      if (shiftKey) {\n        this.quill.setSelection(range.index - 1, range.length + 1, _quill2.default.sources.USER);\n      } else {\n        this.quill.setSelection(range.index - 1, _quill2.default.sources.USER);\n      }\n    } else {\n      if (shiftKey) {\n        this.quill.setSelection(range.index, range.length + 1, _quill2.default.sources.USER);\n      } else {\n        this.quill.setSelection(range.index + range.length + 1, _quill2.default.sources.USER);\n      }\n    }\n    return false;\n  }), _ref3;\n}\n\nfunction handleBackspace(range, context) {\n  if (range.index === 0 || this.quill.getLength() <= 1) return;\n\n  var _quill$getLine11 = this.quill.getLine(range.index),\n      _quill$getLine12 = _slicedToArray(_quill$getLine11, 1),\n      line = _quill$getLine12[0];\n\n  var formats = {};\n  if (context.offset === 0) {\n    var _quill$getLine13 = this.quill.getLine(range.index - 1),\n        _quill$getLine14 = _slicedToArray(_quill$getLine13, 1),\n        prev = _quill$getLine14[0];\n\n    if (prev != null && prev.length() > 1) {\n      var curFormats = line.formats();\n      var prevFormats = this.quill.getFormat(range.index - 1, 1);\n      formats = _op2.default.attributes.diff(curFormats, prevFormats) || {};\n    }\n  }\n  // Check for astral symbols\n  var length = /[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]$/.test(context.prefix) ? 2 : 1;\n  this.quill.deleteText(range.index - length, length, _quill2.default.sources.USER);\n  if (Object.keys(formats).length > 0) {\n    this.quill.formatLine(range.index - length, length, formats, _quill2.default.sources.USER);\n  }\n  this.quill.focus();\n}\n\nfunction handleDelete(range, context) {\n  // Check for astral symbols\n  var length = /^[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]/.test(context.suffix) ? 2 : 1;\n  if (range.index >= this.quill.getLength() - length) return;\n  var formats = {},\n      nextLength = 0;\n\n  var _quill$getLine15 = this.quill.getLine(range.index),\n      _quill$getLine16 = _slicedToArray(_quill$getLine15, 1),\n      line = _quill$getLine16[0];\n\n  if (context.offset >= line.length() - 1) {\n    var _quill$getLine17 = this.quill.getLine(range.index + 1),\n        _quill$getLine18 = _slicedToArray(_quill$getLine17, 1),\n        next = _quill$getLine18[0];\n\n    if (next) {\n      var curFormats = line.formats();\n      var nextFormats = this.quill.getFormat(range.index, 1);\n      formats = _op2.default.attributes.diff(curFormats, nextFormats) || {};\n      nextLength = next.length();\n    }\n  }\n  this.quill.deleteText(range.index, length, _quill2.default.sources.USER);\n  if (Object.keys(formats).length > 0) {\n    this.quill.formatLine(range.index + nextLength - 1, length, formats, _quill2.default.sources.USER);\n  }\n}\n\nfunction handleDeleteRange(range) {\n  var lines = this.quill.getLines(range);\n  var formats = {};\n  if (lines.length > 1) {\n    var firstFormats = lines[0].formats();\n    var lastFormats = lines[lines.length - 1].formats();\n    formats = _op2.default.attributes.diff(lastFormats, firstFormats) || {};\n  }\n  this.quill.deleteText(range, _quill2.default.sources.USER);\n  if (Object.keys(formats).length > 0) {\n    this.quill.formatLine(range.index, 1, formats, _quill2.default.sources.USER);\n  }\n  this.quill.setSelection(range.index, _quill2.default.sources.SILENT);\n  this.quill.focus();\n}\n\nfunction handleEnter(range, context) {\n  var _this3 = this;\n\n  if (range.length > 0) {\n    this.quill.scroll.deleteAt(range.index, range.length); // So we do not trigger text-change\n  }\n  var lineFormats = Object.keys(context.format).reduce(function (lineFormats, format) {\n    if (_parchment2.default.query(format, _parchment2.default.Scope.BLOCK) && !Array.isArray(context.format[format])) {\n      lineFormats[format] = context.format[format];\n    }\n    return lineFormats;\n  }, {});\n  this.quill.insertText(range.index, '\\n', lineFormats, _quill2.default.sources.USER);\n  // Earlier scroll.deleteAt might have messed up our selection,\n  // so insertText's built in selection preservation is not reliable\n  this.quill.setSelection(range.index + 1, _quill2.default.sources.SILENT);\n  this.quill.focus();\n  Object.keys(context.format).forEach(function (name) {\n    if (lineFormats[name] != null) return;\n    if (Array.isArray(context.format[name])) return;\n    if (name === 'link') return;\n    _this3.quill.format(name, context.format[name], _quill2.default.sources.USER);\n  });\n}\n\nfunction makeCodeBlockHandler(indent) {\n  return {\n    key: Keyboard.keys.TAB,\n    shiftKey: !indent,\n    format: { 'code-block': true },\n    handler: function handler(range) {\n      var CodeBlock = _parchment2.default.query('code-block');\n      var index = range.index,\n          length = range.length;\n\n      var _quill$scroll$descend = this.quill.scroll.descendant(CodeBlock, index),\n          _quill$scroll$descend2 = _slicedToArray(_quill$scroll$descend, 2),\n          block = _quill$scroll$descend2[0],\n          offset = _quill$scroll$descend2[1];\n\n      if (block == null) return;\n      var scrollIndex = this.quill.getIndex(block);\n      var start = block.newlineIndex(offset, true) + 1;\n      var end = block.newlineIndex(scrollIndex + offset + length);\n      var lines = block.domNode.textContent.slice(start, end).split('\\n');\n      offset = 0;\n      lines.forEach(function (line, i) {\n        if (indent) {\n          block.insertAt(start + offset, CodeBlock.TAB);\n          offset += CodeBlock.TAB.length;\n          if (i === 0) {\n            index += CodeBlock.TAB.length;\n          } else {\n            length += CodeBlock.TAB.length;\n          }\n        } else if (line.startsWith(CodeBlock.TAB)) {\n          block.deleteAt(start + offset, CodeBlock.TAB.length);\n          offset -= CodeBlock.TAB.length;\n          if (i === 0) {\n            index -= CodeBlock.TAB.length;\n          } else {\n            length -= CodeBlock.TAB.length;\n          }\n        }\n        offset += line.length + 1;\n      });\n      this.quill.update(_quill2.default.sources.USER);\n      this.quill.setSelection(index, length, _quill2.default.sources.SILENT);\n    }\n  };\n}\n\nfunction makeFormatHandler(format) {\n  return {\n    key: format[0].toUpperCase(),\n    shortKey: true,\n    handler: function handler(range, context) {\n      this.quill.format(format, !context.format[format], _quill2.default.sources.USER);\n    }\n  };\n}\n\nfunction normalize(binding) {\n  if (typeof binding === 'string' || typeof binding === 'number') {\n    return normalize({ key: binding });\n  }\n  if ((typeof binding === 'undefined' ? 'undefined' : _typeof(binding)) === 'object') {\n    binding = (0, _clone2.default)(binding, false);\n  }\n  if (typeof binding.key === 'string') {\n    if (Keyboard.keys[binding.key.toUpperCase()] != null) {\n      binding.key = Keyboard.keys[binding.key.toUpperCase()];\n    } else if (binding.key.length === 1) {\n      binding.key = binding.key.toUpperCase().charCodeAt(0);\n    } else {\n      return null;\n    }\n  }\n  if (binding.shortKey) {\n    binding[SHORTKEY] = binding.shortKey;\n    delete binding.shortKey;\n  }\n  return binding;\n}\n\nexports.default = Keyboard;\nexports.SHORTKEY = SHORTKEY;\n\n/***/ }),\n/* 35 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if (\"value\" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };\n\nvar _parchment = __webpack_require__(0);\n\nvar _parchment2 = _interopRequireDefault(_parchment);\n\nvar _text = __webpack_require__(7);\n\nvar _text2 = _interopRequireDefault(_text);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar GUARD_TEXT = '\\uFEFF';\n\nvar Embed = function (_Parchment$Embed) {\n  _inherits(Embed, _Parchment$Embed);\n\n  function Embed(node) {\n    _classCallCheck(this, Embed);\n\n    var _this = _possibleConstructorReturn(this, (Embed.__proto__ || Object.getPrototypeOf(Embed)).call(this, node));\n\n    _this.contentNode = document.createElement('span');\n    _this.contentNode.setAttribute('contenteditable', false);\n    [].slice.call(_this.domNode.childNodes).forEach(function (childNode) {\n      _this.contentNode.appendChild(childNode);\n    });\n    _this.leftGuard = document.createTextNode(GUARD_TEXT);\n    _this.rightGuard = document.createTextNode(GUARD_TEXT);\n    _this.domNode.appendChild(_this.leftGuard);\n    _this.domNode.appendChild(_this.contentNode);\n    _this.domNode.appendChild(_this.rightGuard);\n    return _this;\n  }\n\n  _createClass(Embed, [{\n    key: 'index',\n    value: function index(node, offset) {\n      if (node === this.leftGuard) return 0;\n      if (node === this.rightGuard) return 1;\n      return _get(Embed.prototype.__proto__ || Object.getPrototypeOf(Embed.prototype), 'index', this).call(this, node, offset);\n    }\n  }, {\n    key: 'restore',\n    value: function restore(node) {\n      var range = void 0,\n          textNode = void 0;\n      var text = node.data.split(GUARD_TEXT).join('');\n      if (node === this.leftGuard) {\n        if (this.prev instanceof _text2.default) {\n          var prevLength = this.prev.length();\n          this.prev.insertAt(prevLength, text);\n          range = {\n            startNode: this.prev.domNode,\n            startOffset: prevLength + text.length\n          };\n        } else {\n          textNode = document.createTextNode(text);\n          this.parent.insertBefore(_parchment2.default.create(textNode), this);\n          range = {\n            startNode: textNode,\n            startOffset: text.length\n          };\n        }\n      } else if (node === this.rightGuard) {\n        if (this.next instanceof _text2.default) {\n          this.next.insertAt(0, text);\n          range = {\n            startNode: this.next.domNode,\n            startOffset: text.length\n          };\n        } else {\n          textNode = document.createTextNode(text);\n          this.parent.insertBefore(_parchment2.default.create(textNode), this.next);\n          range = {\n            startNode: textNode,\n            startOffset: text.length\n          };\n        }\n      }\n      node.data = GUARD_TEXT;\n      return range;\n    }\n  }, {\n    key: 'update',\n    value: function update(mutations, context) {\n      var _this2 = this;\n\n      mutations.forEach(function (mutation) {\n        if (mutation.type === 'characterData' && (mutation.target === _this2.leftGuard || mutation.target === _this2.rightGuard)) {\n          var range = _this2.restore(mutation.target);\n          if (range) context.range = range;\n        }\n      });\n    }\n  }]);\n\n  return Embed;\n}(_parchment2.default.Embed);\n\nexports.default = Embed;\n\n/***/ }),\n/* 36 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.AlignStyle = exports.AlignClass = exports.AlignAttribute = undefined;\n\nvar _parchment = __webpack_require__(0);\n\nvar _parchment2 = _interopRequireDefault(_parchment);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar config = {\n  scope: _parchment2.default.Scope.BLOCK,\n  whitelist: ['right', 'center', 'justify']\n};\n\nvar AlignAttribute = new _parchment2.default.Attributor.Attribute('align', 'align', config);\nvar AlignClass = new _parchment2.default.Attributor.Class('align', 'ql-align', config);\nvar AlignStyle = new _parchment2.default.Attributor.Style('align', 'text-align', config);\n\nexports.AlignAttribute = AlignAttribute;\nexports.AlignClass = AlignClass;\nexports.AlignStyle = AlignStyle;\n\n/***/ }),\n/* 37 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.BackgroundStyle = exports.BackgroundClass = undefined;\n\nvar _parchment = __webpack_require__(0);\n\nvar _parchment2 = _interopRequireDefault(_parchment);\n\nvar _color = __webpack_require__(25);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar BackgroundClass = new _parchment2.default.Attributor.Class('background', 'ql-bg', {\n  scope: _parchment2.default.Scope.INLINE\n});\nvar BackgroundStyle = new _color.ColorAttributor('background', 'background-color', {\n  scope: _parchment2.default.Scope.INLINE\n});\n\nexports.BackgroundClass = BackgroundClass;\nexports.BackgroundStyle = BackgroundStyle;\n\n/***/ }),\n/* 38 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.DirectionStyle = exports.DirectionClass = exports.DirectionAttribute = undefined;\n\nvar _parchment = __webpack_require__(0);\n\nvar _parchment2 = _interopRequireDefault(_parchment);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar config = {\n  scope: _parchment2.default.Scope.BLOCK,\n  whitelist: ['rtl']\n};\n\nvar DirectionAttribute = new _parchment2.default.Attributor.Attribute('direction', 'dir', config);\nvar DirectionClass = new _parchment2.default.Attributor.Class('direction', 'ql-direction', config);\nvar DirectionStyle = new _parchment2.default.Attributor.Style('direction', 'direction', config);\n\nexports.DirectionAttribute = DirectionAttribute;\nexports.DirectionClass = DirectionClass;\nexports.DirectionStyle = DirectionStyle;\n\n/***/ }),\n/* 39 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.FontClass = exports.FontStyle = undefined;\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if (\"value\" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };\n\nvar _parchment = __webpack_require__(0);\n\nvar _parchment2 = _interopRequireDefault(_parchment);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar config = {\n  scope: _parchment2.default.Scope.INLINE,\n  whitelist: ['serif', 'monospace']\n};\n\nvar FontClass = new _parchment2.default.Attributor.Class('font', 'ql-font', config);\n\nvar FontStyleAttributor = function (_Parchment$Attributor) {\n  _inherits(FontStyleAttributor, _Parchment$Attributor);\n\n  function FontStyleAttributor() {\n    _classCallCheck(this, FontStyleAttributor);\n\n    return _possibleConstructorReturn(this, (FontStyleAttributor.__proto__ || Object.getPrototypeOf(FontStyleAttributor)).apply(this, arguments));\n  }\n\n  _createClass(FontStyleAttributor, [{\n    key: 'value',\n    value: function value(node) {\n      return _get(FontStyleAttributor.prototype.__proto__ || Object.getPrototypeOf(FontStyleAttributor.prototype), 'value', this).call(this, node).replace(/[\"']/g, '');\n    }\n  }]);\n\n  return FontStyleAttributor;\n}(_parchment2.default.Attributor.Style);\n\nvar FontStyle = new FontStyleAttributor('font', 'font-family', config);\n\nexports.FontStyle = FontStyle;\nexports.FontClass = FontClass;\n\n/***/ }),\n/* 40 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.SizeStyle = exports.SizeClass = undefined;\n\nvar _parchment = __webpack_require__(0);\n\nvar _parchment2 = _interopRequireDefault(_parchment);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar SizeClass = new _parchment2.default.Attributor.Class('size', 'ql-size', {\n  scope: _parchment2.default.Scope.INLINE,\n  whitelist: ['small', 'large', 'huge']\n});\nvar SizeStyle = new _parchment2.default.Attributor.Style('size', 'font-size', {\n  scope: _parchment2.default.Scope.INLINE,\n  whitelist: ['10px', '18px', '32px']\n});\n\nexports.SizeClass = SizeClass;\nexports.SizeStyle = SizeStyle;\n\n/***/ }),\n/* 41 */,\n/* 42 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.getLastChangeIndex = exports.default = undefined;\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _parchment = __webpack_require__(0);\n\nvar _parchment2 = _interopRequireDefault(_parchment);\n\nvar _quill = __webpack_require__(5);\n\nvar _quill2 = _interopRequireDefault(_quill);\n\nvar _module = __webpack_require__(9);\n\nvar _module2 = _interopRequireDefault(_module);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar History = function (_Module) {\n  _inherits(History, _Module);\n\n  function History(quill, options) {\n    _classCallCheck(this, History);\n\n    var _this = _possibleConstructorReturn(this, (History.__proto__ || Object.getPrototypeOf(History)).call(this, quill, options));\n\n    _this.lastRecorded = 0;\n    _this.ignoreChange = false;\n    _this.clear();\n    _this.quill.on(_quill2.default.events.EDITOR_CHANGE, function (eventName, delta, oldDelta, source) {\n      if (eventName !== _quill2.default.events.TEXT_CHANGE || _this.ignoreChange) return;\n      if (!_this.options.userOnly || source === _quill2.default.sources.USER) {\n        _this.record(delta, oldDelta);\n      } else {\n        _this.transform(delta);\n      }\n    });\n    _this.quill.keyboard.addBinding({ key: 'Z', shortKey: true }, _this.undo.bind(_this));\n    _this.quill.keyboard.addBinding({ key: 'Z', shortKey: true, shiftKey: true }, _this.redo.bind(_this));\n    if (/Win/i.test(navigator.platform)) {\n      _this.quill.keyboard.addBinding({ key: 'Y', shortKey: true }, _this.redo.bind(_this));\n    }\n    return _this;\n  }\n\n  _createClass(History, [{\n    key: 'change',\n    value: function change(source, dest) {\n      if (this.stack[source].length === 0) return;\n      var delta = this.stack[source].pop();\n      this.stack[dest].push(delta);\n      this.lastRecorded = 0;\n      this.ignoreChange = true;\n      this.quill.updateContents(delta[source], _quill2.default.sources.USER);\n      this.ignoreChange = false;\n      var index = getLastChangeIndex(delta[source]);\n      this.quill.setSelection(index);\n    }\n  }, {\n    key: 'clear',\n    value: function clear() {\n      this.stack = { undo: [], redo: [] };\n    }\n  }, {\n    key: 'cutoff',\n    value: function cutoff() {\n      this.lastRecorded = 0;\n    }\n  }, {\n    key: 'record',\n    value: function record(changeDelta, oldDelta) {\n      if (changeDelta.ops.length === 0) return;\n      this.stack.redo = [];\n      var undoDelta = this.quill.getContents().diff(oldDelta);\n      var timestamp = Date.now();\n      if (this.lastRecorded + this.options.delay > timestamp && this.stack.undo.length > 0) {\n        var delta = this.stack.undo.pop();\n        undoDelta = undoDelta.compose(delta.undo);\n        changeDelta = delta.redo.compose(changeDelta);\n      } else {\n        this.lastRecorded = timestamp;\n      }\n      this.stack.undo.push({\n        redo: changeDelta,\n        undo: undoDelta\n      });\n      if (this.stack.undo.length > this.options.maxStack) {\n        this.stack.undo.shift();\n      }\n    }\n  }, {\n    key: 'redo',\n    value: function redo() {\n      this.change('redo', 'undo');\n    }\n  }, {\n    key: 'transform',\n    value: function transform(delta) {\n      this.stack.undo.forEach(function (change) {\n        change.undo = delta.transform(change.undo, true);\n        change.redo = delta.transform(change.redo, true);\n      });\n      this.stack.redo.forEach(function (change) {\n        change.undo = delta.transform(change.undo, true);\n        change.redo = delta.transform(change.redo, true);\n      });\n    }\n  }, {\n    key: 'undo',\n    value: function undo() {\n      this.change('undo', 'redo');\n    }\n  }]);\n\n  return History;\n}(_module2.default);\n\nHistory.DEFAULTS = {\n  delay: 1000,\n  maxStack: 100,\n  userOnly: false\n};\n\nfunction endsWithNewlineChange(delta) {\n  var lastOp = delta.ops[delta.ops.length - 1];\n  if (lastOp == null) return false;\n  if (lastOp.insert != null) {\n    return typeof lastOp.insert === 'string' && lastOp.insert.endsWith('\\n');\n  }\n  if (lastOp.attributes != null) {\n    return Object.keys(lastOp.attributes).some(function (attr) {\n      return _parchment2.default.query(attr, _parchment2.default.Scope.BLOCK) != null;\n    });\n  }\n  return false;\n}\n\nfunction getLastChangeIndex(delta) {\n  var deleteLength = delta.reduce(function (length, op) {\n    length += op.delete || 0;\n    return length;\n  }, 0);\n  var changeIndex = delta.length() - deleteLength;\n  if (endsWithNewlineChange(delta)) {\n    changeIndex -= 1;\n  }\n  return changeIndex;\n}\n\nexports.default = History;\nexports.getLastChangeIndex = getLastChangeIndex;\n\n/***/ }),\n/* 43 */,\n/* 44 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar LinkedList = /** @class */ (function () {\n    function LinkedList() {\n        this.head = this.tail = null;\n        this.length = 0;\n    }\n    LinkedList.prototype.append = function () {\n        var nodes = [];\n        for (var _i = 0; _i < arguments.length; _i++) {\n            nodes[_i] = arguments[_i];\n        }\n        this.insertBefore(nodes[0], null);\n        if (nodes.length > 1) {\n            this.append.apply(this, nodes.slice(1));\n        }\n    };\n    LinkedList.prototype.contains = function (node) {\n        var cur, next = this.iterator();\n        while ((cur = next())) {\n            if (cur === node)\n                return true;\n        }\n        return false;\n    };\n    LinkedList.prototype.insertBefore = function (node, refNode) {\n        if (!node)\n            return;\n        node.next = refNode;\n        if (refNode != null) {\n            node.prev = refNode.prev;\n            if (refNode.prev != null) {\n                refNode.prev.next = node;\n            }\n            refNode.prev = node;\n            if (refNode === this.head) {\n                this.head = node;\n            }\n        }\n        else if (this.tail != null) {\n            this.tail.next = node;\n            node.prev = this.tail;\n            this.tail = node;\n        }\n        else {\n            node.prev = null;\n            this.head = this.tail = node;\n        }\n        this.length += 1;\n    };\n    LinkedList.prototype.offset = function (target) {\n        var index = 0, cur = this.head;\n        while (cur != null) {\n            if (cur === target)\n                return index;\n            index += cur.length();\n            cur = cur.next;\n        }\n        return -1;\n    };\n    LinkedList.prototype.remove = function (node) {\n        if (!this.contains(node))\n            return;\n        if (node.prev != null)\n            node.prev.next = node.next;\n        if (node.next != null)\n            node.next.prev = node.prev;\n        if (node === this.head)\n            this.head = node.next;\n        if (node === this.tail)\n            this.tail = node.prev;\n        this.length -= 1;\n    };\n    LinkedList.prototype.iterator = function (curNode) {\n        if (curNode === void 0) { curNode = this.head; }\n        // TODO use yield when we can\n        return function () {\n            var ret = curNode;\n            if (curNode != null)\n                curNode = curNode.next;\n            return ret;\n        };\n    };\n    LinkedList.prototype.find = function (index, inclusive) {\n        if (inclusive === void 0) { inclusive = false; }\n        var cur, next = this.iterator();\n        while ((cur = next())) {\n            var length = cur.length();\n            if (index < length ||\n                (inclusive && index === length && (cur.next == null || cur.next.length() !== 0))) {\n                return [cur, index];\n            }\n            index -= length;\n        }\n        return [null, 0];\n    };\n    LinkedList.prototype.forEach = function (callback) {\n        var cur, next = this.iterator();\n        while ((cur = next())) {\n            callback(cur);\n        }\n    };\n    LinkedList.prototype.forEachAt = function (index, length, callback) {\n        if (length <= 0)\n            return;\n        var _a = this.find(index), startNode = _a[0], offset = _a[1];\n        var cur, curIndex = index - offset, next = this.iterator(startNode);\n        while ((cur = next()) && curIndex < index + length) {\n            var curLength = cur.length();\n            if (index > curIndex) {\n                callback(cur, index - curIndex, Math.min(length, curIndex + curLength - index));\n            }\n            else {\n                callback(cur, 0, Math.min(curLength, index + length - curIndex));\n            }\n            curIndex += curLength;\n        }\n    };\n    LinkedList.prototype.map = function (callback) {\n        return this.reduce(function (memo, cur) {\n            memo.push(callback(cur));\n            return memo;\n        }, []);\n    };\n    LinkedList.prototype.reduce = function (callback, memo) {\n        var cur, next = this.iterator();\n        while ((cur = next())) {\n            memo = callback(memo, cur);\n        }\n        return memo;\n    };\n    return LinkedList;\n}());\nexports.default = LinkedList;\n\n\n/***/ }),\n/* 45 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar __extends = (this && this.__extends) || (function () {\n    var extendStatics = Object.setPrototypeOf ||\n        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar container_1 = __webpack_require__(17);\nvar Registry = __webpack_require__(1);\nvar OBSERVER_CONFIG = {\n    attributes: true,\n    characterData: true,\n    characterDataOldValue: true,\n    childList: true,\n    subtree: true,\n};\nvar MAX_OPTIMIZE_ITERATIONS = 100;\nvar ScrollBlot = /** @class */ (function (_super) {\n    __extends(ScrollBlot, _super);\n    function ScrollBlot(node) {\n        var _this = _super.call(this, node) || this;\n        _this.scroll = _this;\n        _this.observer = new MutationObserver(function (mutations) {\n            _this.update(mutations);\n        });\n        _this.observer.observe(_this.domNode, OBSERVER_CONFIG);\n        _this.attach();\n        return _this;\n    }\n    ScrollBlot.prototype.detach = function () {\n        _super.prototype.detach.call(this);\n        this.observer.disconnect();\n    };\n    ScrollBlot.prototype.deleteAt = function (index, length) {\n        this.update();\n        if (index === 0 && length === this.length()) {\n            this.children.forEach(function (child) {\n                child.remove();\n            });\n        }\n        else {\n            _super.prototype.deleteAt.call(this, index, length);\n        }\n    };\n    ScrollBlot.prototype.formatAt = function (index, length, name, value) {\n        this.update();\n        _super.prototype.formatAt.call(this, index, length, name, value);\n    };\n    ScrollBlot.prototype.insertAt = function (index, value, def) {\n        this.update();\n        _super.prototype.insertAt.call(this, index, value, def);\n    };\n    ScrollBlot.prototype.optimize = function (mutations, context) {\n        var _this = this;\n        if (mutations === void 0) { mutations = []; }\n        if (context === void 0) { context = {}; }\n        _super.prototype.optimize.call(this, context);\n        // We must modify mutations directly, cannot make copy and then modify\n        var records = [].slice.call(this.observer.takeRecords());\n        // Array.push currently seems to be implemented by a non-tail recursive function\n        // so we cannot just mutations.push.apply(mutations, this.observer.takeRecords());\n        while (records.length > 0)\n            mutations.push(records.pop());\n        // TODO use WeakMap\n        var mark = function (blot, markParent) {\n            if (markParent === void 0) { markParent = true; }\n            if (blot == null || blot === _this)\n                return;\n            if (blot.domNode.parentNode == null)\n                return;\n            // @ts-ignore\n            if (blot.domNode[Registry.DATA_KEY].mutations == null) {\n                // @ts-ignore\n                blot.domNode[Registry.DATA_KEY].mutations = [];\n            }\n            if (markParent)\n                mark(blot.parent);\n        };\n        var optimize = function (blot) {\n            // Post-order traversal\n            if (\n            // @ts-ignore\n            blot.domNode[Registry.DATA_KEY] == null ||\n                // @ts-ignore\n                blot.domNode[Registry.DATA_KEY].mutations == null) {\n                return;\n            }\n            if (blot instanceof container_1.default) {\n                blot.children.forEach(optimize);\n            }\n            blot.optimize(context);\n        };\n        var remaining = mutations;\n        for (var i = 0; remaining.length > 0; i += 1) {\n            if (i >= MAX_OPTIMIZE_ITERATIONS) {\n                throw new Error('[Parchment] Maximum optimize iterations reached');\n            }\n            remaining.forEach(function (mutation) {\n                var blot = Registry.find(mutation.target, true);\n                if (blot == null)\n                    return;\n                if (blot.domNode === mutation.target) {\n                    if (mutation.type === 'childList') {\n                        mark(Registry.find(mutation.previousSibling, false));\n                        [].forEach.call(mutation.addedNodes, function (node) {\n                            var child = Registry.find(node, false);\n                            mark(child, false);\n                            if (child instanceof container_1.default) {\n                                child.children.forEach(function (grandChild) {\n                                    mark(grandChild, false);\n                                });\n                            }\n                        });\n                    }\n                    else if (mutation.type === 'attributes') {\n                        mark(blot.prev);\n                    }\n                }\n                mark(blot);\n            });\n            this.children.forEach(optimize);\n            remaining = [].slice.call(this.observer.takeRecords());\n            records = remaining.slice();\n            while (records.length > 0)\n                mutations.push(records.pop());\n        }\n    };\n    ScrollBlot.prototype.update = function (mutations, context) {\n        var _this = this;\n        if (context === void 0) { context = {}; }\n        mutations = mutations || this.observer.takeRecords();\n        // TODO use WeakMap\n        mutations\n            .map(function (mutation) {\n            var blot = Registry.find(mutation.target, true);\n            if (blot == null)\n                return null;\n            // @ts-ignore\n            if (blot.domNode[Registry.DATA_KEY].mutations == null) {\n                // @ts-ignore\n                blot.domNode[Registry.DATA_KEY].mutations = [mutation];\n                return blot;\n            }\n            else {\n                // @ts-ignore\n                blot.domNode[Registry.DATA_KEY].mutations.push(mutation);\n                return null;\n            }\n        })\n            .forEach(function (blot) {\n            // @ts-ignore\n            if (blot == null || blot === _this || blot.domNode[Registry.DATA_KEY] == null)\n                return;\n            // @ts-ignore\n            blot.update(blot.domNode[Registry.DATA_KEY].mutations || [], context);\n        });\n        // @ts-ignore\n        if (this.domNode[Registry.DATA_KEY].mutations != null) {\n            // @ts-ignore\n            _super.prototype.update.call(this, this.domNode[Registry.DATA_KEY].mutations, context);\n        }\n        this.optimize(mutations, context);\n    };\n    ScrollBlot.blotName = 'scroll';\n    ScrollBlot.defaultChild = 'block';\n    ScrollBlot.scope = Registry.Scope.BLOCK_BLOT;\n    ScrollBlot.tagName = 'DIV';\n    return ScrollBlot;\n}(container_1.default));\nexports.default = ScrollBlot;\n\n\n/***/ }),\n/* 46 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar __extends = (this && this.__extends) || (function () {\n    var extendStatics = Object.setPrototypeOf ||\n        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar format_1 = __webpack_require__(18);\nvar Registry = __webpack_require__(1);\n// Shallow object comparison\nfunction isEqual(obj1, obj2) {\n    if (Object.keys(obj1).length !== Object.keys(obj2).length)\n        return false;\n    // @ts-ignore\n    for (var prop in obj1) {\n        // @ts-ignore\n        if (obj1[prop] !== obj2[prop])\n            return false;\n    }\n    return true;\n}\nvar InlineBlot = /** @class */ (function (_super) {\n    __extends(InlineBlot, _super);\n    function InlineBlot() {\n        return _super !== null && _super.apply(this, arguments) || this;\n    }\n    InlineBlot.formats = function (domNode) {\n        if (domNode.tagName === InlineBlot.tagName)\n            return undefined;\n        return _super.formats.call(this, domNode);\n    };\n    InlineBlot.prototype.format = function (name, value) {\n        var _this = this;\n        if (name === this.statics.blotName && !value) {\n            this.children.forEach(function (child) {\n                if (!(child instanceof format_1.default)) {\n                    child = child.wrap(InlineBlot.blotName, true);\n                }\n                _this.attributes.copy(child);\n            });\n            this.unwrap();\n        }\n        else {\n            _super.prototype.format.call(this, name, value);\n        }\n    };\n    InlineBlot.prototype.formatAt = function (index, length, name, value) {\n        if (this.formats()[name] != null || Registry.query(name, Registry.Scope.ATTRIBUTE)) {\n            var blot = this.isolate(index, length);\n            blot.format(name, value);\n        }\n        else {\n            _super.prototype.formatAt.call(this, index, length, name, value);\n        }\n    };\n    InlineBlot.prototype.optimize = function (context) {\n        _super.prototype.optimize.call(this, context);\n        var formats = this.formats();\n        if (Object.keys(formats).length === 0) {\n            return this.unwrap(); // unformatted span\n        }\n        var next = this.next;\n        if (next instanceof InlineBlot && next.prev === this && isEqual(formats, next.formats())) {\n            next.moveChildren(this);\n            next.remove();\n        }\n    };\n    InlineBlot.blotName = 'inline';\n    InlineBlot.scope = Registry.Scope.INLINE_BLOT;\n    InlineBlot.tagName = 'SPAN';\n    return InlineBlot;\n}(format_1.default));\nexports.default = InlineBlot;\n\n\n/***/ }),\n/* 47 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar __extends = (this && this.__extends) || (function () {\n    var extendStatics = Object.setPrototypeOf ||\n        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar format_1 = __webpack_require__(18);\nvar Registry = __webpack_require__(1);\nvar BlockBlot = /** @class */ (function (_super) {\n    __extends(BlockBlot, _super);\n    function BlockBlot() {\n        return _super !== null && _super.apply(this, arguments) || this;\n    }\n    BlockBlot.formats = function (domNode) {\n        var tagName = Registry.query(BlockBlot.blotName).tagName;\n        if (domNode.tagName === tagName)\n            return undefined;\n        return _super.formats.call(this, domNode);\n    };\n    BlockBlot.prototype.format = function (name, value) {\n        if (Registry.query(name, Registry.Scope.BLOCK) == null) {\n            return;\n        }\n        else if (name === this.statics.blotName && !value) {\n            this.replaceWith(BlockBlot.blotName);\n        }\n        else {\n            _super.prototype.format.call(this, name, value);\n        }\n    };\n    BlockBlot.prototype.formatAt = function (index, length, name, value) {\n        if (Registry.query(name, Registry.Scope.BLOCK) != null) {\n            this.format(name, value);\n        }\n        else {\n            _super.prototype.formatAt.call(this, index, length, name, value);\n        }\n    };\n    BlockBlot.prototype.insertAt = function (index, value, def) {\n        if (def == null || Registry.query(value, Registry.Scope.INLINE) != null) {\n            // Insert text or inline\n            _super.prototype.insertAt.call(this, index, value, def);\n        }\n        else {\n            var after = this.split(index);\n            var blot = Registry.create(value, def);\n            after.parent.insertBefore(blot, after);\n        }\n    };\n    BlockBlot.prototype.update = function (mutations, context) {\n        if (navigator.userAgent.match(/Trident/)) {\n            this.build();\n        }\n        else {\n            _super.prototype.update.call(this, mutations, context);\n        }\n    };\n    BlockBlot.blotName = 'block';\n    BlockBlot.scope = Registry.Scope.BLOCK_BLOT;\n    BlockBlot.tagName = 'P';\n    return BlockBlot;\n}(format_1.default));\nexports.default = BlockBlot;\n\n\n/***/ }),\n/* 48 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar __extends = (this && this.__extends) || (function () {\n    var extendStatics = Object.setPrototypeOf ||\n        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar leaf_1 = __webpack_require__(19);\nvar EmbedBlot = /** @class */ (function (_super) {\n    __extends(EmbedBlot, _super);\n    function EmbedBlot() {\n        return _super !== null && _super.apply(this, arguments) || this;\n    }\n    EmbedBlot.formats = function (domNode) {\n        return undefined;\n    };\n    EmbedBlot.prototype.format = function (name, value) {\n        // super.formatAt wraps, which is what we want in general,\n        // but this allows subclasses to overwrite for formats\n        // that just apply to particular embeds\n        _super.prototype.formatAt.call(this, 0, this.length(), name, value);\n    };\n    EmbedBlot.prototype.formatAt = function (index, length, name, value) {\n        if (index === 0 && length === this.length()) {\n            this.format(name, value);\n        }\n        else {\n            _super.prototype.formatAt.call(this, index, length, name, value);\n        }\n    };\n    EmbedBlot.prototype.formats = function () {\n        return this.statics.formats(this.domNode);\n    };\n    return EmbedBlot;\n}(leaf_1.default));\nexports.default = EmbedBlot;\n\n\n/***/ }),\n/* 49 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar __extends = (this && this.__extends) || (function () {\n    var extendStatics = Object.setPrototypeOf ||\n        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar leaf_1 = __webpack_require__(19);\nvar Registry = __webpack_require__(1);\nvar TextBlot = /** @class */ (function (_super) {\n    __extends(TextBlot, _super);\n    function TextBlot(node) {\n        var _this = _super.call(this, node) || this;\n        _this.text = _this.statics.value(_this.domNode);\n        return _this;\n    }\n    TextBlot.create = function (value) {\n        return document.createTextNode(value);\n    };\n    TextBlot.value = function (domNode) {\n        var text = domNode.data;\n        // @ts-ignore\n        if (text['normalize'])\n            text = text['normalize']();\n        return text;\n    };\n    TextBlot.prototype.deleteAt = function (index, length) {\n        this.domNode.data = this.text = this.text.slice(0, index) + this.text.slice(index + length);\n    };\n    TextBlot.prototype.index = function (node, offset) {\n        if (this.domNode === node) {\n            return offset;\n        }\n        return -1;\n    };\n    TextBlot.prototype.insertAt = function (index, value, def) {\n        if (def == null) {\n            this.text = this.text.slice(0, index) + value + this.text.slice(index);\n            this.domNode.data = this.text;\n        }\n        else {\n            _super.prototype.insertAt.call(this, index, value, def);\n        }\n    };\n    TextBlot.prototype.length = function () {\n        return this.text.length;\n    };\n    TextBlot.prototype.optimize = function (context) {\n        _super.prototype.optimize.call(this, context);\n        this.text = this.statics.value(this.domNode);\n        if (this.text.length === 0) {\n            this.remove();\n        }\n        else if (this.next instanceof TextBlot && this.next.prev === this) {\n            this.insertAt(this.length(), this.next.value());\n            this.next.remove();\n        }\n    };\n    TextBlot.prototype.position = function (index, inclusive) {\n        if (inclusive === void 0) { inclusive = false; }\n        return [this.domNode, index];\n    };\n    TextBlot.prototype.split = function (index, force) {\n        if (force === void 0) { force = false; }\n        if (!force) {\n            if (index === 0)\n                return this;\n            if (index === this.length())\n                return this.next;\n        }\n        var after = Registry.create(this.domNode.splitText(index));\n        this.parent.insertBefore(after, this.next);\n        this.text = this.statics.value(this.domNode);\n        return after;\n    };\n    TextBlot.prototype.update = function (mutations, context) {\n        var _this = this;\n        if (mutations.some(function (mutation) {\n            return mutation.type === 'characterData' && mutation.target === _this.domNode;\n        })) {\n            this.text = this.statics.value(this.domNode);\n        }\n    };\n    TextBlot.prototype.value = function () {\n        return this.text;\n    };\n    TextBlot.blotName = 'text';\n    TextBlot.scope = Registry.Scope.INLINE_BLOT;\n    return TextBlot;\n}(leaf_1.default));\nexports.default = TextBlot;\n\n\n/***/ }),\n/* 50 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar elem = document.createElement('div');\nelem.classList.toggle('test-class', false);\nif (elem.classList.contains('test-class')) {\n  var _toggle = DOMTokenList.prototype.toggle;\n  DOMTokenList.prototype.toggle = function (token, force) {\n    if (arguments.length > 1 && !this.contains(token) === !force) {\n      return force;\n    } else {\n      return _toggle.call(this, token);\n    }\n  };\n}\n\nif (!String.prototype.startsWith) {\n  String.prototype.startsWith = function (searchString, position) {\n    position = position || 0;\n    return this.substr(position, searchString.length) === searchString;\n  };\n}\n\nif (!String.prototype.endsWith) {\n  String.prototype.endsWith = function (searchString, position) {\n    var subjectString = this.toString();\n    if (typeof position !== 'number' || !isFinite(position) || Math.floor(position) !== position || position > subjectString.length) {\n      position = subjectString.length;\n    }\n    position -= searchString.length;\n    var lastIndex = subjectString.indexOf(searchString, position);\n    return lastIndex !== -1 && lastIndex === position;\n  };\n}\n\nif (!Array.prototype.find) {\n  Object.defineProperty(Array.prototype, \"find\", {\n    value: function value(predicate) {\n      if (this === null) {\n        throw new TypeError('Array.prototype.find called on null or undefined');\n      }\n      if (typeof predicate !== 'function') {\n        throw new TypeError('predicate must be a function');\n      }\n      var list = Object(this);\n      var length = list.length >>> 0;\n      var thisArg = arguments[1];\n      var value;\n\n      for (var i = 0; i < length; i++) {\n        value = list[i];\n        if (predicate.call(thisArg, value, i, list)) {\n          return value;\n        }\n      }\n      return undefined;\n    }\n  });\n}\n\ndocument.addEventListener(\"DOMContentLoaded\", function () {\n  // Disable resizing in Firefox\n  document.execCommand(\"enableObjectResizing\", false, false);\n  // Disable automatic linkifying in IE11\n  document.execCommand(\"autoUrlDetect\", false, false);\n});\n\n/***/ }),\n/* 51 */\n/***/ (function(module, exports) {\n\n/**\n * This library modifies the diff-patch-match library by Neil Fraser\n * by removing the patch and match functionality and certain advanced\n * options in the diff function. The original license is as follows:\n *\n * ===\n *\n * Diff Match and Patch\n *\n * Copyright 2006 Google Inc.\n * http://code.google.com/p/google-diff-match-patch/\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\n/**\n * The data structure representing a diff is an array of tuples:\n * [[DIFF_DELETE, 'Hello'], [DIFF_INSERT, 'Goodbye'], [DIFF_EQUAL, ' world.']]\n * which means: delete 'Hello', add 'Goodbye' and keep ' world.'\n */\nvar DIFF_DELETE = -1;\nvar DIFF_INSERT = 1;\nvar DIFF_EQUAL = 0;\n\n\n/**\n * Find the differences between two texts.  Simplifies the problem by stripping\n * any common prefix or suffix off the texts before diffing.\n * @param {string} text1 Old string to be diffed.\n * @param {string} text2 New string to be diffed.\n * @param {Int} cursor_pos Expected edit position in text1 (optional)\n * @return {Array} Array of diff tuples.\n */\nfunction diff_main(text1, text2, cursor_pos) {\n  // Check for equality (speedup).\n  if (text1 == text2) {\n    if (text1) {\n      return [[DIFF_EQUAL, text1]];\n    }\n    return [];\n  }\n\n  // Check cursor_pos within bounds\n  if (cursor_pos < 0 || text1.length < cursor_pos) {\n    cursor_pos = null;\n  }\n\n  // Trim off common prefix (speedup).\n  var commonlength = diff_commonPrefix(text1, text2);\n  var commonprefix = text1.substring(0, commonlength);\n  text1 = text1.substring(commonlength);\n  text2 = text2.substring(commonlength);\n\n  // Trim off common suffix (speedup).\n  commonlength = diff_commonSuffix(text1, text2);\n  var commonsuffix = text1.substring(text1.length - commonlength);\n  text1 = text1.substring(0, text1.length - commonlength);\n  text2 = text2.substring(0, text2.length - commonlength);\n\n  // Compute the diff on the middle block.\n  var diffs = diff_compute_(text1, text2);\n\n  // Restore the prefix and suffix.\n  if (commonprefix) {\n    diffs.unshift([DIFF_EQUAL, commonprefix]);\n  }\n  if (commonsuffix) {\n    diffs.push([DIFF_EQUAL, commonsuffix]);\n  }\n  diff_cleanupMerge(diffs);\n  if (cursor_pos != null) {\n    diffs = fix_cursor(diffs, cursor_pos);\n  }\n  diffs = fix_emoji(diffs);\n  return diffs;\n};\n\n\n/**\n * Find the differences between two texts.  Assumes that the texts do not\n * have any common prefix or suffix.\n * @param {string} text1 Old string to be diffed.\n * @param {string} text2 New string to be diffed.\n * @return {Array} Array of diff tuples.\n */\nfunction diff_compute_(text1, text2) {\n  var diffs;\n\n  if (!text1) {\n    // Just add some text (speedup).\n    return [[DIFF_INSERT, text2]];\n  }\n\n  if (!text2) {\n    // Just delete some text (speedup).\n    return [[DIFF_DELETE, text1]];\n  }\n\n  var longtext = text1.length > text2.length ? text1 : text2;\n  var shorttext = text1.length > text2.length ? text2 : text1;\n  var i = longtext.indexOf(shorttext);\n  if (i != -1) {\n    // Shorter text is inside the longer text (speedup).\n    diffs = [[DIFF_INSERT, longtext.substring(0, i)],\n             [DIFF_EQUAL, shorttext],\n             [DIFF_INSERT, longtext.substring(i + shorttext.length)]];\n    // Swap insertions for deletions if diff is reversed.\n    if (text1.length > text2.length) {\n      diffs[0][0] = diffs[2][0] = DIFF_DELETE;\n    }\n    return diffs;\n  }\n\n  if (shorttext.length == 1) {\n    // Single character string.\n    // After the previous speedup, the character can't be an equality.\n    return [[DIFF_DELETE, text1], [DIFF_INSERT, text2]];\n  }\n\n  // Check to see if the problem can be split in two.\n  var hm = diff_halfMatch_(text1, text2);\n  if (hm) {\n    // A half-match was found, sort out the return data.\n    var text1_a = hm[0];\n    var text1_b = hm[1];\n    var text2_a = hm[2];\n    var text2_b = hm[3];\n    var mid_common = hm[4];\n    // Send both pairs off for separate processing.\n    var diffs_a = diff_main(text1_a, text2_a);\n    var diffs_b = diff_main(text1_b, text2_b);\n    // Merge the results.\n    return diffs_a.concat([[DIFF_EQUAL, mid_common]], diffs_b);\n  }\n\n  return diff_bisect_(text1, text2);\n};\n\n\n/**\n * Find the 'middle snake' of a diff, split the problem in two\n * and return the recursively constructed diff.\n * See Myers 1986 paper: An O(ND) Difference Algorithm and Its Variations.\n * @param {string} text1 Old string to be diffed.\n * @param {string} text2 New string to be diffed.\n * @return {Array} Array of diff tuples.\n * @private\n */\nfunction diff_bisect_(text1, text2) {\n  // Cache the text lengths to prevent multiple calls.\n  var text1_length = text1.length;\n  var text2_length = text2.length;\n  var max_d = Math.ceil((text1_length + text2_length) / 2);\n  var v_offset = max_d;\n  var v_length = 2 * max_d;\n  var v1 = new Array(v_length);\n  var v2 = new Array(v_length);\n  // Setting all elements to -1 is faster in Chrome & Firefox than mixing\n  // integers and undefined.\n  for (var x = 0; x < v_length; x++) {\n    v1[x] = -1;\n    v2[x] = -1;\n  }\n  v1[v_offset + 1] = 0;\n  v2[v_offset + 1] = 0;\n  var delta = text1_length - text2_length;\n  // If the total number of characters is odd, then the front path will collide\n  // with the reverse path.\n  var front = (delta % 2 != 0);\n  // Offsets for start and end of k loop.\n  // Prevents mapping of space beyond the grid.\n  var k1start = 0;\n  var k1end = 0;\n  var k2start = 0;\n  var k2end = 0;\n  for (var d = 0; d < max_d; d++) {\n    // Walk the front path one step.\n    for (var k1 = -d + k1start; k1 <= d - k1end; k1 += 2) {\n      var k1_offset = v_offset + k1;\n      var x1;\n      if (k1 == -d || (k1 != d && v1[k1_offset - 1] < v1[k1_offset + 1])) {\n        x1 = v1[k1_offset + 1];\n      } else {\n        x1 = v1[k1_offset - 1] + 1;\n      }\n      var y1 = x1 - k1;\n      while (x1 < text1_length && y1 < text2_length &&\n             text1.charAt(x1) == text2.charAt(y1)) {\n        x1++;\n        y1++;\n      }\n      v1[k1_offset] = x1;\n      if (x1 > text1_length) {\n        // Ran off the right of the graph.\n        k1end += 2;\n      } else if (y1 > text2_length) {\n        // Ran off the bottom of the graph.\n        k1start += 2;\n      } else if (front) {\n        var k2_offset = v_offset + delta - k1;\n        if (k2_offset >= 0 && k2_offset < v_length && v2[k2_offset] != -1) {\n          // Mirror x2 onto top-left coordinate system.\n          var x2 = text1_length - v2[k2_offset];\n          if (x1 >= x2) {\n            // Overlap detected.\n            return diff_bisectSplit_(text1, text2, x1, y1);\n          }\n        }\n      }\n    }\n\n    // Walk the reverse path one step.\n    for (var k2 = -d + k2start; k2 <= d - k2end; k2 += 2) {\n      var k2_offset = v_offset + k2;\n      var x2;\n      if (k2 == -d || (k2 != d && v2[k2_offset - 1] < v2[k2_offset + 1])) {\n        x2 = v2[k2_offset + 1];\n      } else {\n        x2 = v2[k2_offset - 1] + 1;\n      }\n      var y2 = x2 - k2;\n      while (x2 < text1_length && y2 < text2_length &&\n             text1.charAt(text1_length - x2 - 1) ==\n             text2.charAt(text2_length - y2 - 1)) {\n        x2++;\n        y2++;\n      }\n      v2[k2_offset] = x2;\n      if (x2 > text1_length) {\n        // Ran off the left of the graph.\n        k2end += 2;\n      } else if (y2 > text2_length) {\n        // Ran off the top of the graph.\n        k2start += 2;\n      } else if (!front) {\n        var k1_offset = v_offset + delta - k2;\n        if (k1_offset >= 0 && k1_offset < v_length && v1[k1_offset] != -1) {\n          var x1 = v1[k1_offset];\n          var y1 = v_offset + x1 - k1_offset;\n          // Mirror x2 onto top-left coordinate system.\n          x2 = text1_length - x2;\n          if (x1 >= x2) {\n            // Overlap detected.\n            return diff_bisectSplit_(text1, text2, x1, y1);\n          }\n        }\n      }\n    }\n  }\n  // Diff took too long and hit the deadline or\n  // number of diffs equals number of characters, no commonality at all.\n  return [[DIFF_DELETE, text1], [DIFF_INSERT, text2]];\n};\n\n\n/**\n * Given the location of the 'middle snake', split the diff in two parts\n * and recurse.\n * @param {string} text1 Old string to be diffed.\n * @param {string} text2 New string to be diffed.\n * @param {number} x Index of split point in text1.\n * @param {number} y Index of split point in text2.\n * @return {Array} Array of diff tuples.\n */\nfunction diff_bisectSplit_(text1, text2, x, y) {\n  var text1a = text1.substring(0, x);\n  var text2a = text2.substring(0, y);\n  var text1b = text1.substring(x);\n  var text2b = text2.substring(y);\n\n  // Compute both diffs serially.\n  var diffs = diff_main(text1a, text2a);\n  var diffsb = diff_main(text1b, text2b);\n\n  return diffs.concat(diffsb);\n};\n\n\n/**\n * Determine the common prefix of two strings.\n * @param {string} text1 First string.\n * @param {string} text2 Second string.\n * @return {number} The number of characters common to the start of each\n *     string.\n */\nfunction diff_commonPrefix(text1, text2) {\n  // Quick check for common null cases.\n  if (!text1 || !text2 || text1.charAt(0) != text2.charAt(0)) {\n    return 0;\n  }\n  // Binary search.\n  // Performance analysis: http://neil.fraser.name/news/2007/10/09/\n  var pointermin = 0;\n  var pointermax = Math.min(text1.length, text2.length);\n  var pointermid = pointermax;\n  var pointerstart = 0;\n  while (pointermin < pointermid) {\n    if (text1.substring(pointerstart, pointermid) ==\n        text2.substring(pointerstart, pointermid)) {\n      pointermin = pointermid;\n      pointerstart = pointermin;\n    } else {\n      pointermax = pointermid;\n    }\n    pointermid = Math.floor((pointermax - pointermin) / 2 + pointermin);\n  }\n  return pointermid;\n};\n\n\n/**\n * Determine the common suffix of two strings.\n * @param {string} text1 First string.\n * @param {string} text2 Second string.\n * @return {number} The number of characters common to the end of each string.\n */\nfunction diff_commonSuffix(text1, text2) {\n  // Quick check for common null cases.\n  if (!text1 || !text2 ||\n      text1.charAt(text1.length - 1) != text2.charAt(text2.length - 1)) {\n    return 0;\n  }\n  // Binary search.\n  // Performance analysis: http://neil.fraser.name/news/2007/10/09/\n  var pointermin = 0;\n  var pointermax = Math.min(text1.length, text2.length);\n  var pointermid = pointermax;\n  var pointerend = 0;\n  while (pointermin < pointermid) {\n    if (text1.substring(text1.length - pointermid, text1.length - pointerend) ==\n        text2.substring(text2.length - pointermid, text2.length - pointerend)) {\n      pointermin = pointermid;\n      pointerend = pointermin;\n    } else {\n      pointermax = pointermid;\n    }\n    pointermid = Math.floor((pointermax - pointermin) / 2 + pointermin);\n  }\n  return pointermid;\n};\n\n\n/**\n * Do the two texts share a substring which is at least half the length of the\n * longer text?\n * This speedup can produce non-minimal diffs.\n * @param {string} text1 First string.\n * @param {string} text2 Second string.\n * @return {Array.<string>} Five element Array, containing the prefix of\n *     text1, the suffix of text1, the prefix of text2, the suffix of\n *     text2 and the common middle.  Or null if there was no match.\n */\nfunction diff_halfMatch_(text1, text2) {\n  var longtext = text1.length > text2.length ? text1 : text2;\n  var shorttext = text1.length > text2.length ? text2 : text1;\n  if (longtext.length < 4 || shorttext.length * 2 < longtext.length) {\n    return null;  // Pointless.\n  }\n\n  /**\n   * Does a substring of shorttext exist within longtext such that the substring\n   * is at least half the length of longtext?\n   * Closure, but does not reference any external variables.\n   * @param {string} longtext Longer string.\n   * @param {string} shorttext Shorter string.\n   * @param {number} i Start index of quarter length substring within longtext.\n   * @return {Array.<string>} Five element Array, containing the prefix of\n   *     longtext, the suffix of longtext, the prefix of shorttext, the suffix\n   *     of shorttext and the common middle.  Or null if there was no match.\n   * @private\n   */\n  function diff_halfMatchI_(longtext, shorttext, i) {\n    // Start with a 1/4 length substring at position i as a seed.\n    var seed = longtext.substring(i, i + Math.floor(longtext.length / 4));\n    var j = -1;\n    var best_common = '';\n    var best_longtext_a, best_longtext_b, best_shorttext_a, best_shorttext_b;\n    while ((j = shorttext.indexOf(seed, j + 1)) != -1) {\n      var prefixLength = diff_commonPrefix(longtext.substring(i),\n                                           shorttext.substring(j));\n      var suffixLength = diff_commonSuffix(longtext.substring(0, i),\n                                           shorttext.substring(0, j));\n      if (best_common.length < suffixLength + prefixLength) {\n        best_common = shorttext.substring(j - suffixLength, j) +\n            shorttext.substring(j, j + prefixLength);\n        best_longtext_a = longtext.substring(0, i - suffixLength);\n        best_longtext_b = longtext.substring(i + prefixLength);\n        best_shorttext_a = shorttext.substring(0, j - suffixLength);\n        best_shorttext_b = shorttext.substring(j + prefixLength);\n      }\n    }\n    if (best_common.length * 2 >= longtext.length) {\n      return [best_longtext_a, best_longtext_b,\n              best_shorttext_a, best_shorttext_b, best_common];\n    } else {\n      return null;\n    }\n  }\n\n  // First check if the second quarter is the seed for a half-match.\n  var hm1 = diff_halfMatchI_(longtext, shorttext,\n                             Math.ceil(longtext.length / 4));\n  // Check again based on the third quarter.\n  var hm2 = diff_halfMatchI_(longtext, shorttext,\n                             Math.ceil(longtext.length / 2));\n  var hm;\n  if (!hm1 && !hm2) {\n    return null;\n  } else if (!hm2) {\n    hm = hm1;\n  } else if (!hm1) {\n    hm = hm2;\n  } else {\n    // Both matched.  Select the longest.\n    hm = hm1[4].length > hm2[4].length ? hm1 : hm2;\n  }\n\n  // A half-match was found, sort out the return data.\n  var text1_a, text1_b, text2_a, text2_b;\n  if (text1.length > text2.length) {\n    text1_a = hm[0];\n    text1_b = hm[1];\n    text2_a = hm[2];\n    text2_b = hm[3];\n  } else {\n    text2_a = hm[0];\n    text2_b = hm[1];\n    text1_a = hm[2];\n    text1_b = hm[3];\n  }\n  var mid_common = hm[4];\n  return [text1_a, text1_b, text2_a, text2_b, mid_common];\n};\n\n\n/**\n * Reorder and merge like edit sections.  Merge equalities.\n * Any edit section can move as long as it doesn't cross an equality.\n * @param {Array} diffs Array of diff tuples.\n */\nfunction diff_cleanupMerge(diffs) {\n  diffs.push([DIFF_EQUAL, '']);  // Add a dummy entry at the end.\n  var pointer = 0;\n  var count_delete = 0;\n  var count_insert = 0;\n  var text_delete = '';\n  var text_insert = '';\n  var commonlength;\n  while (pointer < diffs.length) {\n    switch (diffs[pointer][0]) {\n      case DIFF_INSERT:\n        count_insert++;\n        text_insert += diffs[pointer][1];\n        pointer++;\n        break;\n      case DIFF_DELETE:\n        count_delete++;\n        text_delete += diffs[pointer][1];\n        pointer++;\n        break;\n      case DIFF_EQUAL:\n        // Upon reaching an equality, check for prior redundancies.\n        if (count_delete + count_insert > 1) {\n          if (count_delete !== 0 && count_insert !== 0) {\n            // Factor out any common prefixies.\n            commonlength = diff_commonPrefix(text_insert, text_delete);\n            if (commonlength !== 0) {\n              if ((pointer - count_delete - count_insert) > 0 &&\n                  diffs[pointer - count_delete - count_insert - 1][0] ==\n                  DIFF_EQUAL) {\n                diffs[pointer - count_delete - count_insert - 1][1] +=\n                    text_insert.substring(0, commonlength);\n              } else {\n                diffs.splice(0, 0, [DIFF_EQUAL,\n                                    text_insert.substring(0, commonlength)]);\n                pointer++;\n              }\n              text_insert = text_insert.substring(commonlength);\n              text_delete = text_delete.substring(commonlength);\n            }\n            // Factor out any common suffixies.\n            commonlength = diff_commonSuffix(text_insert, text_delete);\n            if (commonlength !== 0) {\n              diffs[pointer][1] = text_insert.substring(text_insert.length -\n                  commonlength) + diffs[pointer][1];\n              text_insert = text_insert.substring(0, text_insert.length -\n                  commonlength);\n              text_delete = text_delete.substring(0, text_delete.length -\n                  commonlength);\n            }\n          }\n          // Delete the offending records and add the merged ones.\n          if (count_delete === 0) {\n            diffs.splice(pointer - count_insert,\n                count_delete + count_insert, [DIFF_INSERT, text_insert]);\n          } else if (count_insert === 0) {\n            diffs.splice(pointer - count_delete,\n                count_delete + count_insert, [DIFF_DELETE, text_delete]);\n          } else {\n            diffs.splice(pointer - count_delete - count_insert,\n                count_delete + count_insert, [DIFF_DELETE, text_delete],\n                [DIFF_INSERT, text_insert]);\n          }\n          pointer = pointer - count_delete - count_insert +\n                    (count_delete ? 1 : 0) + (count_insert ? 1 : 0) + 1;\n        } else if (pointer !== 0 && diffs[pointer - 1][0] == DIFF_EQUAL) {\n          // Merge this equality with the previous one.\n          diffs[pointer - 1][1] += diffs[pointer][1];\n          diffs.splice(pointer, 1);\n        } else {\n          pointer++;\n        }\n        count_insert = 0;\n        count_delete = 0;\n        text_delete = '';\n        text_insert = '';\n        break;\n    }\n  }\n  if (diffs[diffs.length - 1][1] === '') {\n    diffs.pop();  // Remove the dummy entry at the end.\n  }\n\n  // Second pass: look for single edits surrounded on both sides by equalities\n  // which can be shifted sideways to eliminate an equality.\n  // e.g: A<ins>BA</ins>C -> <ins>AB</ins>AC\n  var changes = false;\n  pointer = 1;\n  // Intentionally ignore the first and last element (don't need checking).\n  while (pointer < diffs.length - 1) {\n    if (diffs[pointer - 1][0] == DIFF_EQUAL &&\n        diffs[pointer + 1][0] == DIFF_EQUAL) {\n      // This is a single edit surrounded by equalities.\n      if (diffs[pointer][1].substring(diffs[pointer][1].length -\n          diffs[pointer - 1][1].length) == diffs[pointer - 1][1]) {\n        // Shift the edit over the previous equality.\n        diffs[pointer][1] = diffs[pointer - 1][1] +\n            diffs[pointer][1].substring(0, diffs[pointer][1].length -\n                                        diffs[pointer - 1][1].length);\n        diffs[pointer + 1][1] = diffs[pointer - 1][1] + diffs[pointer + 1][1];\n        diffs.splice(pointer - 1, 1);\n        changes = true;\n      } else if (diffs[pointer][1].substring(0, diffs[pointer + 1][1].length) ==\n          diffs[pointer + 1][1]) {\n        // Shift the edit over the next equality.\n        diffs[pointer - 1][1] += diffs[pointer + 1][1];\n        diffs[pointer][1] =\n            diffs[pointer][1].substring(diffs[pointer + 1][1].length) +\n            diffs[pointer + 1][1];\n        diffs.splice(pointer + 1, 1);\n        changes = true;\n      }\n    }\n    pointer++;\n  }\n  // If shifts were made, the diff needs reordering and another shift sweep.\n  if (changes) {\n    diff_cleanupMerge(diffs);\n  }\n};\n\n\nvar diff = diff_main;\ndiff.INSERT = DIFF_INSERT;\ndiff.DELETE = DIFF_DELETE;\ndiff.EQUAL = DIFF_EQUAL;\n\nmodule.exports = diff;\n\n/*\n * Modify a diff such that the cursor position points to the start of a change:\n * E.g.\n *   cursor_normalize_diff([[DIFF_EQUAL, 'abc']], 1)\n *     => [1, [[DIFF_EQUAL, 'a'], [DIFF_EQUAL, 'bc']]]\n *   cursor_normalize_diff([[DIFF_INSERT, 'new'], [DIFF_DELETE, 'xyz']], 2)\n *     => [2, [[DIFF_INSERT, 'new'], [DIFF_DELETE, 'xy'], [DIFF_DELETE, 'z']]]\n *\n * @param {Array} diffs Array of diff tuples\n * @param {Int} cursor_pos Suggested edit position. Must not be out of bounds!\n * @return {Array} A tuple [cursor location in the modified diff, modified diff]\n */\nfunction cursor_normalize_diff (diffs, cursor_pos) {\n  if (cursor_pos === 0) {\n    return [DIFF_EQUAL, diffs];\n  }\n  for (var current_pos = 0, i = 0; i < diffs.length; i++) {\n    var d = diffs[i];\n    if (d[0] === DIFF_DELETE || d[0] === DIFF_EQUAL) {\n      var next_pos = current_pos + d[1].length;\n      if (cursor_pos === next_pos) {\n        return [i + 1, diffs];\n      } else if (cursor_pos < next_pos) {\n        // copy to prevent side effects\n        diffs = diffs.slice();\n        // split d into two diff changes\n        var split_pos = cursor_pos - current_pos;\n        var d_left = [d[0], d[1].slice(0, split_pos)];\n        var d_right = [d[0], d[1].slice(split_pos)];\n        diffs.splice(i, 1, d_left, d_right);\n        return [i + 1, diffs];\n      } else {\n        current_pos = next_pos;\n      }\n    }\n  }\n  throw new Error('cursor_pos is out of bounds!')\n}\n\n/*\n * Modify a diff such that the edit position is \"shifted\" to the proposed edit location (cursor_position).\n *\n * Case 1)\n *   Check if a naive shift is possible:\n *     [0, X], [ 1, Y] -> [ 1, Y], [0, X]    (if X + Y === Y + X)\n *     [0, X], [-1, Y] -> [-1, Y], [0, X]    (if X + Y === Y + X) - holds same result\n * Case 2)\n *   Check if the following shifts are possible:\n *     [0, 'pre'], [ 1, 'prefix'] -> [ 1, 'pre'], [0, 'pre'], [ 1, 'fix']\n *     [0, 'pre'], [-1, 'prefix'] -> [-1, 'pre'], [0, 'pre'], [-1, 'fix']\n *         ^            ^\n *         d          d_next\n *\n * @param {Array} diffs Array of diff tuples\n * @param {Int} cursor_pos Suggested edit position. Must not be out of bounds!\n * @return {Array} Array of diff tuples\n */\nfunction fix_cursor (diffs, cursor_pos) {\n  var norm = cursor_normalize_diff(diffs, cursor_pos);\n  var ndiffs = norm[1];\n  var cursor_pointer = norm[0];\n  var d = ndiffs[cursor_pointer];\n  var d_next = ndiffs[cursor_pointer + 1];\n\n  if (d == null) {\n    // Text was deleted from end of original string,\n    // cursor is now out of bounds in new string\n    return diffs;\n  } else if (d[0] !== DIFF_EQUAL) {\n    // A modification happened at the cursor location.\n    // This is the expected outcome, so we can return the original diff.\n    return diffs;\n  } else {\n    if (d_next != null && d[1] + d_next[1] === d_next[1] + d[1]) {\n      // Case 1)\n      // It is possible to perform a naive shift\n      ndiffs.splice(cursor_pointer, 2, d_next, d)\n      return merge_tuples(ndiffs, cursor_pointer, 2)\n    } else if (d_next != null && d_next[1].indexOf(d[1]) === 0) {\n      // Case 2)\n      // d[1] is a prefix of d_next[1]\n      // We can assume that d_next[0] !== 0, since d[0] === 0\n      // Shift edit locations..\n      ndiffs.splice(cursor_pointer, 2, [d_next[0], d[1]], [0, d[1]]);\n      var suffix = d_next[1].slice(d[1].length);\n      if (suffix.length > 0) {\n        ndiffs.splice(cursor_pointer + 2, 0, [d_next[0], suffix]);\n      }\n      return merge_tuples(ndiffs, cursor_pointer, 3)\n    } else {\n      // Not possible to perform any modification\n      return diffs;\n    }\n  }\n}\n\n/*\n * Check diff did not split surrogate pairs.\n * Ex. [0, '\\uD83D'], [-1, '\\uDC36'], [1, '\\uDC2F'] -> [-1, '\\uD83D\\uDC36'], [1, '\\uD83D\\uDC2F']\n *     '\\uD83D\\uDC36' === '🐶', '\\uD83D\\uDC2F' === '🐯'\n *\n * @param {Array} diffs Array of diff tuples\n * @return {Array} Array of diff tuples\n */\nfunction fix_emoji (diffs) {\n  var compact = false;\n  var starts_with_pair_end = function(str) {\n    return str.charCodeAt(0) >= 0xDC00 && str.charCodeAt(0) <= 0xDFFF;\n  }\n  var ends_with_pair_start = function(str) {\n    return str.charCodeAt(str.length-1) >= 0xD800 && str.charCodeAt(str.length-1) <= 0xDBFF;\n  }\n  for (var i = 2; i < diffs.length; i += 1) {\n    if (diffs[i-2][0] === DIFF_EQUAL && ends_with_pair_start(diffs[i-2][1]) &&\n        diffs[i-1][0] === DIFF_DELETE && starts_with_pair_end(diffs[i-1][1]) &&\n        diffs[i][0] === DIFF_INSERT && starts_with_pair_end(diffs[i][1])) {\n      compact = true;\n\n      diffs[i-1][1] = diffs[i-2][1].slice(-1) + diffs[i-1][1];\n      diffs[i][1] = diffs[i-2][1].slice(-1) + diffs[i][1];\n\n      diffs[i-2][1] = diffs[i-2][1].slice(0, -1);\n    }\n  }\n  if (!compact) {\n    return diffs;\n  }\n  var fixed_diffs = [];\n  for (var i = 0; i < diffs.length; i += 1) {\n    if (diffs[i][1].length > 0) {\n      fixed_diffs.push(diffs[i]);\n    }\n  }\n  return fixed_diffs;\n}\n\n/*\n * Try to merge tuples with their neigbors in a given range.\n * E.g. [0, 'a'], [0, 'b'] -> [0, 'ab']\n *\n * @param {Array} diffs Array of diff tuples.\n * @param {Int} start Position of the first element to merge (diffs[start] is also merged with diffs[start - 1]).\n * @param {Int} length Number of consecutive elements to check.\n * @return {Array} Array of merged diff tuples.\n */\nfunction merge_tuples (diffs, start, length) {\n  // Check from (start-1) to (start+length).\n  for (var i = start + length - 1; i >= 0 && i >= start - 1; i--) {\n    if (i + 1 < diffs.length) {\n      var left_d = diffs[i];\n      var right_d = diffs[i+1];\n      if (left_d[0] === right_d[1]) {\n        diffs.splice(i, 2, [left_d[0], left_d[1] + right_d[1]]);\n      }\n    }\n  }\n  return diffs;\n}\n\n\n/***/ }),\n/* 52 */\n/***/ (function(module, exports) {\n\nexports = module.exports = typeof Object.keys === 'function'\n  ? Object.keys : shim;\n\nexports.shim = shim;\nfunction shim (obj) {\n  var keys = [];\n  for (var key in obj) keys.push(key);\n  return keys;\n}\n\n\n/***/ }),\n/* 53 */\n/***/ (function(module, exports) {\n\nvar supportsArgumentsClass = (function(){\n  return Object.prototype.toString.call(arguments)\n})() == '[object Arguments]';\n\nexports = module.exports = supportsArgumentsClass ? supported : unsupported;\n\nexports.supported = supported;\nfunction supported(object) {\n  return Object.prototype.toString.call(object) == '[object Arguments]';\n};\n\nexports.unsupported = unsupported;\nfunction unsupported(object){\n  return object &&\n    typeof object == 'object' &&\n    typeof object.length == 'number' &&\n    Object.prototype.hasOwnProperty.call(object, 'callee') &&\n    !Object.prototype.propertyIsEnumerable.call(object, 'callee') ||\n    false;\n};\n\n\n/***/ }),\n/* 54 */\n/***/ (function(module, exports) {\n\n'use strict';\n\nvar has = Object.prototype.hasOwnProperty\n  , prefix = '~';\n\n/**\n * Constructor to create a storage for our `EE` objects.\n * An `Events` instance is a plain object whose properties are event names.\n *\n * @constructor\n * @api private\n */\nfunction Events() {}\n\n//\n// We try to not inherit from `Object.prototype`. In some engines creating an\n// instance in this way is faster than calling `Object.create(null)` directly.\n// If `Object.create(null)` is not supported we prefix the event names with a\n// character to make sure that the built-in object properties are not\n// overridden or used as an attack vector.\n//\nif (Object.create) {\n  Events.prototype = Object.create(null);\n\n  //\n  // This hack is needed because the `__proto__` property is still inherited in\n  // some old browsers like Android 4, iPhone 5.1, Opera 11 and Safari 5.\n  //\n  if (!new Events().__proto__) prefix = false;\n}\n\n/**\n * Representation of a single event listener.\n *\n * @param {Function} fn The listener function.\n * @param {Mixed} context The context to invoke the listener with.\n * @param {Boolean} [once=false] Specify if the listener is a one-time listener.\n * @constructor\n * @api private\n */\nfunction EE(fn, context, once) {\n  this.fn = fn;\n  this.context = context;\n  this.once = once || false;\n}\n\n/**\n * Minimal `EventEmitter` interface that is molded against the Node.js\n * `EventEmitter` interface.\n *\n * @constructor\n * @api public\n */\nfunction EventEmitter() {\n  this._events = new Events();\n  this._eventsCount = 0;\n}\n\n/**\n * Return an array listing the events for which the emitter has registered\n * listeners.\n *\n * @returns {Array}\n * @api public\n */\nEventEmitter.prototype.eventNames = function eventNames() {\n  var names = []\n    , events\n    , name;\n\n  if (this._eventsCount === 0) return names;\n\n  for (name in (events = this._events)) {\n    if (has.call(events, name)) names.push(prefix ? name.slice(1) : name);\n  }\n\n  if (Object.getOwnPropertySymbols) {\n    return names.concat(Object.getOwnPropertySymbols(events));\n  }\n\n  return names;\n};\n\n/**\n * Return the listeners registered for a given event.\n *\n * @param {String|Symbol} event The event name.\n * @param {Boolean} exists Only check if there are listeners.\n * @returns {Array|Boolean}\n * @api public\n */\nEventEmitter.prototype.listeners = function listeners(event, exists) {\n  var evt = prefix ? prefix + event : event\n    , available = this._events[evt];\n\n  if (exists) return !!available;\n  if (!available) return [];\n  if (available.fn) return [available.fn];\n\n  for (var i = 0, l = available.length, ee = new Array(l); i < l; i++) {\n    ee[i] = available[i].fn;\n  }\n\n  return ee;\n};\n\n/**\n * Calls each of the listeners registered for a given event.\n *\n * @param {String|Symbol} event The event name.\n * @returns {Boolean} `true` if the event had listeners, else `false`.\n * @api public\n */\nEventEmitter.prototype.emit = function emit(event, a1, a2, a3, a4, a5) {\n  var evt = prefix ? prefix + event : event;\n\n  if (!this._events[evt]) return false;\n\n  var listeners = this._events[evt]\n    , len = arguments.length\n    , args\n    , i;\n\n  if (listeners.fn) {\n    if (listeners.once) this.removeListener(event, listeners.fn, undefined, true);\n\n    switch (len) {\n      case 1: return listeners.fn.call(listeners.context), true;\n      case 2: return listeners.fn.call(listeners.context, a1), true;\n      case 3: return listeners.fn.call(listeners.context, a1, a2), true;\n      case 4: return listeners.fn.call(listeners.context, a1, a2, a3), true;\n      case 5: return listeners.fn.call(listeners.context, a1, a2, a3, a4), true;\n      case 6: return listeners.fn.call(listeners.context, a1, a2, a3, a4, a5), true;\n    }\n\n    for (i = 1, args = new Array(len -1); i < len; i++) {\n      args[i - 1] = arguments[i];\n    }\n\n    listeners.fn.apply(listeners.context, args);\n  } else {\n    var length = listeners.length\n      , j;\n\n    for (i = 0; i < length; i++) {\n      if (listeners[i].once) this.removeListener(event, listeners[i].fn, undefined, true);\n\n      switch (len) {\n        case 1: listeners[i].fn.call(listeners[i].context); break;\n        case 2: listeners[i].fn.call(listeners[i].context, a1); break;\n        case 3: listeners[i].fn.call(listeners[i].context, a1, a2); break;\n        case 4: listeners[i].fn.call(listeners[i].context, a1, a2, a3); break;\n        default:\n          if (!args) for (j = 1, args = new Array(len -1); j < len; j++) {\n            args[j - 1] = arguments[j];\n          }\n\n          listeners[i].fn.apply(listeners[i].context, args);\n      }\n    }\n  }\n\n  return true;\n};\n\n/**\n * Add a listener for a given event.\n *\n * @param {String|Symbol} event The event name.\n * @param {Function} fn The listener function.\n * @param {Mixed} [context=this] The context to invoke the listener with.\n * @returns {EventEmitter} `this`.\n * @api public\n */\nEventEmitter.prototype.on = function on(event, fn, context) {\n  var listener = new EE(fn, context || this)\n    , evt = prefix ? prefix + event : event;\n\n  if (!this._events[evt]) this._events[evt] = listener, this._eventsCount++;\n  else if (!this._events[evt].fn) this._events[evt].push(listener);\n  else this._events[evt] = [this._events[evt], listener];\n\n  return this;\n};\n\n/**\n * Add a one-time listener for a given event.\n *\n * @param {String|Symbol} event The event name.\n * @param {Function} fn The listener function.\n * @param {Mixed} [context=this] The context to invoke the listener with.\n * @returns {EventEmitter} `this`.\n * @api public\n */\nEventEmitter.prototype.once = function once(event, fn, context) {\n  var listener = new EE(fn, context || this, true)\n    , evt = prefix ? prefix + event : event;\n\n  if (!this._events[evt]) this._events[evt] = listener, this._eventsCount++;\n  else if (!this._events[evt].fn) this._events[evt].push(listener);\n  else this._events[evt] = [this._events[evt], listener];\n\n  return this;\n};\n\n/**\n * Remove the listeners of a given event.\n *\n * @param {String|Symbol} event The event name.\n * @param {Function} fn Only remove the listeners that match this function.\n * @param {Mixed} context Only remove the listeners that have this context.\n * @param {Boolean} once Only remove one-time listeners.\n * @returns {EventEmitter} `this`.\n * @api public\n */\nEventEmitter.prototype.removeListener = function removeListener(event, fn, context, once) {\n  var evt = prefix ? prefix + event : event;\n\n  if (!this._events[evt]) return this;\n  if (!fn) {\n    if (--this._eventsCount === 0) this._events = new Events();\n    else delete this._events[evt];\n    return this;\n  }\n\n  var listeners = this._events[evt];\n\n  if (listeners.fn) {\n    if (\n         listeners.fn === fn\n      && (!once || listeners.once)\n      && (!context || listeners.context === context)\n    ) {\n      if (--this._eventsCount === 0) this._events = new Events();\n      else delete this._events[evt];\n    }\n  } else {\n    for (var i = 0, events = [], length = listeners.length; i < length; i++) {\n      if (\n           listeners[i].fn !== fn\n        || (once && !listeners[i].once)\n        || (context && listeners[i].context !== context)\n      ) {\n        events.push(listeners[i]);\n      }\n    }\n\n    //\n    // Reset the array, or remove it completely if we have no more listeners.\n    //\n    if (events.length) this._events[evt] = events.length === 1 ? events[0] : events;\n    else if (--this._eventsCount === 0) this._events = new Events();\n    else delete this._events[evt];\n  }\n\n  return this;\n};\n\n/**\n * Remove all listeners, or those of the specified event.\n *\n * @param {String|Symbol} [event] The event name.\n * @returns {EventEmitter} `this`.\n * @api public\n */\nEventEmitter.prototype.removeAllListeners = function removeAllListeners(event) {\n  var evt;\n\n  if (event) {\n    evt = prefix ? prefix + event : event;\n    if (this._events[evt]) {\n      if (--this._eventsCount === 0) this._events = new Events();\n      else delete this._events[evt];\n    }\n  } else {\n    this._events = new Events();\n    this._eventsCount = 0;\n  }\n\n  return this;\n};\n\n//\n// Alias methods names because people roll like that.\n//\nEventEmitter.prototype.off = EventEmitter.prototype.removeListener;\nEventEmitter.prototype.addListener = EventEmitter.prototype.on;\n\n//\n// This function doesn't apply anymore.\n//\nEventEmitter.prototype.setMaxListeners = function setMaxListeners() {\n  return this;\n};\n\n//\n// Expose the prefix.\n//\nEventEmitter.prefixed = prefix;\n\n//\n// Allow `EventEmitter` to be imported as module namespace.\n//\nEventEmitter.EventEmitter = EventEmitter;\n\n//\n// Expose the module.\n//\nif ('undefined' !== typeof module) {\n  module.exports = EventEmitter;\n}\n\n\n/***/ }),\n/* 55 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.matchText = exports.matchSpacing = exports.matchNewline = exports.matchBlot = exports.matchAttributor = exports.default = undefined;\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nvar _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"]) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); } }; }();\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _extend2 = __webpack_require__(3);\n\nvar _extend3 = _interopRequireDefault(_extend2);\n\nvar _quillDelta = __webpack_require__(2);\n\nvar _quillDelta2 = _interopRequireDefault(_quillDelta);\n\nvar _parchment = __webpack_require__(0);\n\nvar _parchment2 = _interopRequireDefault(_parchment);\n\nvar _quill = __webpack_require__(5);\n\nvar _quill2 = _interopRequireDefault(_quill);\n\nvar _logger = __webpack_require__(10);\n\nvar _logger2 = _interopRequireDefault(_logger);\n\nvar _module = __webpack_require__(9);\n\nvar _module2 = _interopRequireDefault(_module);\n\nvar _align = __webpack_require__(36);\n\nvar _background = __webpack_require__(37);\n\nvar _code = __webpack_require__(13);\n\nvar _code2 = _interopRequireDefault(_code);\n\nvar _color = __webpack_require__(25);\n\nvar _direction = __webpack_require__(38);\n\nvar _font = __webpack_require__(39);\n\nvar _size = __webpack_require__(40);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar debug = (0, _logger2.default)('quill:clipboard');\n\nvar DOM_KEY = '__ql-matcher';\n\nvar CLIPBOARD_CONFIG = [[Node.TEXT_NODE, matchText], [Node.TEXT_NODE, matchNewline], ['br', matchBreak], [Node.ELEMENT_NODE, matchNewline], [Node.ELEMENT_NODE, matchBlot], [Node.ELEMENT_NODE, matchSpacing], [Node.ELEMENT_NODE, matchAttributor], [Node.ELEMENT_NODE, matchStyles], ['li', matchIndent], ['b', matchAlias.bind(matchAlias, 'bold')], ['i', matchAlias.bind(matchAlias, 'italic')], ['style', matchIgnore]];\n\nvar ATTRIBUTE_ATTRIBUTORS = [_align.AlignAttribute, _direction.DirectionAttribute].reduce(function (memo, attr) {\n  memo[attr.keyName] = attr;\n  return memo;\n}, {});\n\nvar STYLE_ATTRIBUTORS = [_align.AlignStyle, _background.BackgroundStyle, _color.ColorStyle, _direction.DirectionStyle, _font.FontStyle, _size.SizeStyle].reduce(function (memo, attr) {\n  memo[attr.keyName] = attr;\n  return memo;\n}, {});\n\nvar Clipboard = function (_Module) {\n  _inherits(Clipboard, _Module);\n\n  function Clipboard(quill, options) {\n    _classCallCheck(this, Clipboard);\n\n    var _this = _possibleConstructorReturn(this, (Clipboard.__proto__ || Object.getPrototypeOf(Clipboard)).call(this, quill, options));\n\n    _this.quill.root.addEventListener('paste', _this.onPaste.bind(_this));\n    _this.container = _this.quill.addContainer('ql-clipboard');\n    _this.container.setAttribute('contenteditable', true);\n    _this.container.setAttribute('tabindex', -1);\n    _this.matchers = [];\n    CLIPBOARD_CONFIG.concat(_this.options.matchers).forEach(function (_ref) {\n      var _ref2 = _slicedToArray(_ref, 2),\n          selector = _ref2[0],\n          matcher = _ref2[1];\n\n      if (!options.matchVisual && matcher === matchSpacing) return;\n      _this.addMatcher(selector, matcher);\n    });\n    return _this;\n  }\n\n  _createClass(Clipboard, [{\n    key: 'addMatcher',\n    value: function addMatcher(selector, matcher) {\n      this.matchers.push([selector, matcher]);\n    }\n  }, {\n    key: 'convert',\n    value: function convert(html) {\n      if (typeof html === 'string') {\n        this.container.innerHTML = html.replace(/\\>\\r?\\n +\\</g, '><'); // Remove spaces between tags\n        return this.convert();\n      }\n      var formats = this.quill.getFormat(this.quill.selection.savedRange.index);\n      if (formats[_code2.default.blotName]) {\n        var text = this.container.innerText;\n        this.container.innerHTML = '';\n        return new _quillDelta2.default().insert(text, _defineProperty({}, _code2.default.blotName, formats[_code2.default.blotName]));\n      }\n\n      var _prepareMatching = this.prepareMatching(),\n          _prepareMatching2 = _slicedToArray(_prepareMatching, 2),\n          elementMatchers = _prepareMatching2[0],\n          textMatchers = _prepareMatching2[1];\n\n      var delta = traverse(this.container, elementMatchers, textMatchers);\n      // Remove trailing newline\n      if (deltaEndsWith(delta, '\\n') && delta.ops[delta.ops.length - 1].attributes == null) {\n        delta = delta.compose(new _quillDelta2.default().retain(delta.length() - 1).delete(1));\n      }\n      debug.log('convert', this.container.innerHTML, delta);\n      this.container.innerHTML = '';\n      return delta;\n    }\n  }, {\n    key: 'dangerouslyPasteHTML',\n    value: function dangerouslyPasteHTML(index, html) {\n      var source = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : _quill2.default.sources.API;\n\n      if (typeof index === 'string') {\n        this.quill.setContents(this.convert(index), html);\n        this.quill.setSelection(0, _quill2.default.sources.SILENT);\n      } else {\n        var paste = this.convert(html);\n        this.quill.updateContents(new _quillDelta2.default().retain(index).concat(paste), source);\n        this.quill.setSelection(index + paste.length(), _quill2.default.sources.SILENT);\n      }\n    }\n  }, {\n    key: 'onPaste',\n    value: function onPaste(e) {\n      var _this2 = this;\n\n      if (e.defaultPrevented || !this.quill.isEnabled()) return;\n      var range = this.quill.getSelection();\n      var delta = new _quillDelta2.default().retain(range.index);\n      var scrollTop = this.quill.scrollingContainer.scrollTop;\n      this.container.focus();\n      this.quill.selection.update(_quill2.default.sources.SILENT);\n      setTimeout(function () {\n        delta = delta.concat(_this2.convert()).delete(range.length);\n        _this2.quill.updateContents(delta, _quill2.default.sources.USER);\n        // range.length contributes to delta.length()\n        _this2.quill.setSelection(delta.length() - range.length, _quill2.default.sources.SILENT);\n        _this2.quill.scrollingContainer.scrollTop = scrollTop;\n        _this2.quill.focus();\n      }, 1);\n    }\n  }, {\n    key: 'prepareMatching',\n    value: function prepareMatching() {\n      var _this3 = this;\n\n      var elementMatchers = [],\n          textMatchers = [];\n      this.matchers.forEach(function (pair) {\n        var _pair = _slicedToArray(pair, 2),\n            selector = _pair[0],\n            matcher = _pair[1];\n\n        switch (selector) {\n          case Node.TEXT_NODE:\n            textMatchers.push(matcher);\n            break;\n          case Node.ELEMENT_NODE:\n            elementMatchers.push(matcher);\n            break;\n          default:\n            [].forEach.call(_this3.container.querySelectorAll(selector), function (node) {\n              // TODO use weakmap\n              node[DOM_KEY] = node[DOM_KEY] || [];\n              node[DOM_KEY].push(matcher);\n            });\n            break;\n        }\n      });\n      return [elementMatchers, textMatchers];\n    }\n  }]);\n\n  return Clipboard;\n}(_module2.default);\n\nClipboard.DEFAULTS = {\n  matchers: [],\n  matchVisual: true\n};\n\nfunction applyFormat(delta, format, value) {\n  if ((typeof format === 'undefined' ? 'undefined' : _typeof(format)) === 'object') {\n    return Object.keys(format).reduce(function (delta, key) {\n      return applyFormat(delta, key, format[key]);\n    }, delta);\n  } else {\n    return delta.reduce(function (delta, op) {\n      if (op.attributes && op.attributes[format]) {\n        return delta.push(op);\n      } else {\n        return delta.insert(op.insert, (0, _extend3.default)({}, _defineProperty({}, format, value), op.attributes));\n      }\n    }, new _quillDelta2.default());\n  }\n}\n\nfunction computeStyle(node) {\n  if (node.nodeType !== Node.ELEMENT_NODE) return {};\n  var DOM_KEY = '__ql-computed-style';\n  return node[DOM_KEY] || (node[DOM_KEY] = window.getComputedStyle(node));\n}\n\nfunction deltaEndsWith(delta, text) {\n  var endText = \"\";\n  for (var i = delta.ops.length - 1; i >= 0 && endText.length < text.length; --i) {\n    var op = delta.ops[i];\n    if (typeof op.insert !== 'string') break;\n    endText = op.insert + endText;\n  }\n  return endText.slice(-1 * text.length) === text;\n}\n\nfunction isLine(node) {\n  if (node.childNodes.length === 0) return false; // Exclude embed blocks\n  var style = computeStyle(node);\n  return ['block', 'list-item'].indexOf(style.display) > -1;\n}\n\nfunction traverse(node, elementMatchers, textMatchers) {\n  // Post-order\n  if (node.nodeType === node.TEXT_NODE) {\n    return textMatchers.reduce(function (delta, matcher) {\n      return matcher(node, delta);\n    }, new _quillDelta2.default());\n  } else if (node.nodeType === node.ELEMENT_NODE) {\n    return [].reduce.call(node.childNodes || [], function (delta, childNode) {\n      var childrenDelta = traverse(childNode, elementMatchers, textMatchers);\n      if (childNode.nodeType === node.ELEMENT_NODE) {\n        childrenDelta = elementMatchers.reduce(function (childrenDelta, matcher) {\n          return matcher(childNode, childrenDelta);\n        }, childrenDelta);\n        childrenDelta = (childNode[DOM_KEY] || []).reduce(function (childrenDelta, matcher) {\n          return matcher(childNode, childrenDelta);\n        }, childrenDelta);\n      }\n      return delta.concat(childrenDelta);\n    }, new _quillDelta2.default());\n  } else {\n    return new _quillDelta2.default();\n  }\n}\n\nfunction matchAlias(format, node, delta) {\n  return applyFormat(delta, format, true);\n}\n\nfunction matchAttributor(node, delta) {\n  var attributes = _parchment2.default.Attributor.Attribute.keys(node);\n  var classes = _parchment2.default.Attributor.Class.keys(node);\n  var styles = _parchment2.default.Attributor.Style.keys(node);\n  var formats = {};\n  attributes.concat(classes).concat(styles).forEach(function (name) {\n    var attr = _parchment2.default.query(name, _parchment2.default.Scope.ATTRIBUTE);\n    if (attr != null) {\n      formats[attr.attrName] = attr.value(node);\n      if (formats[attr.attrName]) return;\n    }\n    attr = ATTRIBUTE_ATTRIBUTORS[name];\n    if (attr != null && (attr.attrName === name || attr.keyName === name)) {\n      formats[attr.attrName] = attr.value(node) || undefined;\n    }\n    attr = STYLE_ATTRIBUTORS[name];\n    if (attr != null && (attr.attrName === name || attr.keyName === name)) {\n      attr = STYLE_ATTRIBUTORS[name];\n      formats[attr.attrName] = attr.value(node) || undefined;\n    }\n  });\n  if (Object.keys(formats).length > 0) {\n    delta = applyFormat(delta, formats);\n  }\n  return delta;\n}\n\nfunction matchBlot(node, delta) {\n  var match = _parchment2.default.query(node);\n  if (match == null) return delta;\n  if (match.prototype instanceof _parchment2.default.Embed) {\n    var embed = {};\n    var value = match.value(node);\n    if (value != null) {\n      embed[match.blotName] = value;\n      delta = new _quillDelta2.default().insert(embed, match.formats(node));\n    }\n  } else if (typeof match.formats === 'function') {\n    delta = applyFormat(delta, match.blotName, match.formats(node));\n  }\n  return delta;\n}\n\nfunction matchBreak(node, delta) {\n  if (!deltaEndsWith(delta, '\\n')) {\n    delta.insert('\\n');\n  }\n  return delta;\n}\n\nfunction matchIgnore() {\n  return new _quillDelta2.default();\n}\n\nfunction matchIndent(node, delta) {\n  var match = _parchment2.default.query(node);\n  if (match == null || match.blotName !== 'list-item' || !deltaEndsWith(delta, '\\n')) {\n    return delta;\n  }\n  var indent = -1,\n      parent = node.parentNode;\n  while (!parent.classList.contains('ql-clipboard')) {\n    if ((_parchment2.default.query(parent) || {}).blotName === 'list') {\n      indent += 1;\n    }\n    parent = parent.parentNode;\n  }\n  if (indent <= 0) return delta;\n  return delta.compose(new _quillDelta2.default().retain(delta.length() - 1).retain(1, { indent: indent }));\n}\n\nfunction matchNewline(node, delta) {\n  if (!deltaEndsWith(delta, '\\n')) {\n    if (isLine(node) || delta.length() > 0 && node.nextSibling && isLine(node.nextSibling)) {\n      delta.insert('\\n');\n    }\n  }\n  return delta;\n}\n\nfunction matchSpacing(node, delta) {\n  if (isLine(node) && node.nextElementSibling != null && !deltaEndsWith(delta, '\\n\\n')) {\n    var nodeHeight = node.offsetHeight + parseFloat(computeStyle(node).marginTop) + parseFloat(computeStyle(node).marginBottom);\n    if (node.nextElementSibling.offsetTop > node.offsetTop + nodeHeight * 1.5) {\n      delta.insert('\\n');\n    }\n  }\n  return delta;\n}\n\nfunction matchStyles(node, delta) {\n  var formats = {};\n  var style = node.style || {};\n  if (style.fontStyle && computeStyle(node).fontStyle === 'italic') {\n    formats.italic = true;\n  }\n  if (style.fontWeight && (computeStyle(node).fontWeight.startsWith('bold') || parseInt(computeStyle(node).fontWeight) >= 700)) {\n    formats.bold = true;\n  }\n  if (Object.keys(formats).length > 0) {\n    delta = applyFormat(delta, formats);\n  }\n  if (parseFloat(style.textIndent || 0) > 0) {\n    // Could be 0.5in\n    delta = new _quillDelta2.default().insert('\\t').concat(delta);\n  }\n  return delta;\n}\n\nfunction matchText(node, delta) {\n  var text = node.data;\n  // Word represents empty line with <o:p>&nbsp;</o:p>\n  if (node.parentNode.tagName === 'O:P') {\n    return delta.insert(text.trim());\n  }\n  if (text.trim().length === 0 && node.parentNode.classList.contains('ql-clipboard')) {\n    return delta;\n  }\n  if (!computeStyle(node.parentNode).whiteSpace.startsWith('pre')) {\n    // eslint-disable-next-line func-style\n    var replacer = function replacer(collapse, match) {\n      match = match.replace(/[^\\u00a0]/g, ''); // \\u00a0 is nbsp;\n      return match.length < 1 && collapse ? ' ' : match;\n    };\n    text = text.replace(/\\r\\n/g, ' ').replace(/\\n/g, ' ');\n    text = text.replace(/\\s\\s+/g, replacer.bind(replacer, true)); // collapse whitespace\n    if (node.previousSibling == null && isLine(node.parentNode) || node.previousSibling != null && isLine(node.previousSibling)) {\n      text = text.replace(/^\\s+/, replacer.bind(replacer, false));\n    }\n    if (node.nextSibling == null && isLine(node.parentNode) || node.nextSibling != null && isLine(node.nextSibling)) {\n      text = text.replace(/\\s+$/, replacer.bind(replacer, false));\n    }\n  }\n  return delta.insert(text);\n}\n\nexports.default = Clipboard;\nexports.matchAttributor = matchAttributor;\nexports.matchBlot = matchBlot;\nexports.matchNewline = matchNewline;\nexports.matchSpacing = matchSpacing;\nexports.matchText = matchText;\n\n/***/ }),\n/* 56 */,\n/* 57 */,\n/* 58 */,\n/* 59 */,\n/* 60 */,\n/* 61 */,\n/* 62 */,\n/* 63 */,\n/* 64 */,\n/* 65 */,\n/* 66 */,\n/* 67 */,\n/* 68 */,\n/* 69 */,\n/* 70 */,\n/* 71 */,\n/* 72 */,\n/* 73 */,\n/* 74 */,\n/* 75 */,\n/* 76 */,\n/* 77 */,\n/* 78 */,\n/* 79 */,\n/* 80 */,\n/* 81 */,\n/* 82 */,\n/* 83 */,\n/* 84 */,\n/* 85 */,\n/* 86 */,\n/* 87 */,\n/* 88 */,\n/* 89 */,\n/* 90 */,\n/* 91 */,\n/* 92 */,\n/* 93 */,\n/* 94 */,\n/* 95 */,\n/* 96 */,\n/* 97 */,\n/* 98 */,\n/* 99 */,\n/* 100 */,\n/* 101 */,\n/* 102 */,\n/* 103 */,\n/* 104 */,\n/* 105 */,\n/* 106 */,\n/* 107 */,\n/* 108 */,\n/* 109 */,\n/* 110 */\n/***/ (function(module, exports, __webpack_require__) {\n\nmodule.exports = __webpack_require__(28);\n\n\n/***/ })\n/******/ ])[\"default\"];\n});"
  },
  {
    "path": "static/quill/quill.icons.js",
    "content": "(function () {\n    var icons = Quill.import('ui/icons');\n    icons.header[3] = '<svg viewBox=\"0 0 18 18\">\\n' +\n        '  <path class=\"ql-fill\" d=\"M16.65186,12.30664a2.6742,2.6742,0,0,1-2.915,2.68457,3.96592,3.96592,0,0,1-2.25537-.6709.56007.56007,0,0,1-.13232-.83594L11.64648,13c.209-.34082.48389-.36328.82471-.1543a2.32654,2.32654,0,0,0,1.12256.33008c.71484,0,1.12207-.35156,1.12207-.78125,0-.61523-.61621-.86816-1.46338-.86816H13.2085a.65159.65159,0,0,1-.68213-.41895l-.05518-.10937a.67114.67114,0,0,1,.14307-.78125l.71533-.86914a8.55289,8.55289,0,0,1,.68213-.7373V8.58887a3.93913,3.93913,0,0,1-.748.05469H11.9873a.54085.54085,0,0,1-.605-.60547V7.59863a.54085.54085,0,0,1,.605-.60547h3.75146a.53773.53773,0,0,1,.60547.59375v.17676a1.03723,1.03723,0,0,1-.27539.748L14.74854,10.0293A2.31132,2.31132,0,0,1,16.65186,12.30664ZM9,3A.99974.99974,0,0,0,8,4V8H3V4A1,1,0,0,0,1,4V14a1,1,0,0,0,2,0V10H8v4a1,1,0,0,0,2,0V4A.99974.99974,0,0,0,9,3Z\"/>\\n' +\n        '</svg>';\n    icons.header[4] = '<svg viewBox=\"0 0 18 18\">\\n' +\n        '  <path class=\"ql-fill\" d=\"M10,4V14a1,1,0,0,1-2,0V10H3v4a1,1,0,0,1-2,0V4A1,1,0,0,1,3,4V8H8V4a1,1,0,0,1,2,0Zm7.05371,7.96582v.38477c0,.39648-.165.60547-.46191.60547h-.47314v1.29785a.54085.54085,0,0,1-.605.60547h-.69336a.54085.54085,0,0,1-.605-.60547V12.95605H11.333a.5412.5412,0,0,1-.60547-.60547v-.15332a1.199,1.199,0,0,1,.22021-.748l2.56348-4.05957a.7819.7819,0,0,1,.72607-.39648h1.27637a.54085.54085,0,0,1,.605.60547v3.7627h.33008A.54055.54055,0,0,1,17.05371,11.96582ZM14.28125,8.7207h-.022a4.18969,4.18969,0,0,1-.38525.81348l-1.188,1.80469v.02246h1.5293V9.60059A7.04058,7.04058,0,0,1,14.28125,8.7207Z\"/>\\n' +\n        '</svg>';\n    icons.header[5] = '<svg viewBox=\"0 0 18 18\">\\n' +\n        '  <path class=\"ql-fill\" d=\"M16.74023,12.18555a2.75131,2.75131,0,0,1-2.91553,2.80566,3.908,3.908,0,0,1-2.25537-.68164.54809.54809,0,0,1-.13184-.8252L11.73438,13c.209-.34082.48389-.36328.8252-.1543a2.23757,2.23757,0,0,0,1.1001.33008,1.01827,1.01827,0,0,0,1.1001-.96777c0-.61621-.53906-.97949-1.25439-.97949a2.15554,2.15554,0,0,0-.64893.09961,1.15209,1.15209,0,0,1-.814.01074l-.12109-.04395a.64116.64116,0,0,1-.45117-.71484l.231-3.00391a.56666.56666,0,0,1,.62744-.583H15.541a.54085.54085,0,0,1,.605.60547v.43945a.54085.54085,0,0,1-.605.60547H13.41748l-.04395.72559a1.29306,1.29306,0,0,1-.04395.30859h.022a2.39776,2.39776,0,0,1,.57227-.07715A2.53266,2.53266,0,0,1,16.74023,12.18555ZM9,3A.99974.99974,0,0,0,8,4V8H3V4A1,1,0,0,0,1,4V14a1,1,0,0,0,2,0V10H8v4a1,1,0,0,0,2,0V4A.99974.99974,0,0,0,9,3Z\"/>\\n' +\n        '</svg>';\n    icons.header[6] = '<svg viewBox=\"0 0 18 18\">\\n' +\n        '  <path class=\"ql-fill\" d=\"M14.51758,9.64453a1.85627,1.85627,0,0,0-1.24316.38477H13.252a1.73532,1.73532,0,0,1,1.72754-1.4082,2.66491,2.66491,0,0,1,.5498.06641c.35254.05469.57227.01074.70508-.40723l.16406-.5166a.53393.53393,0,0,0-.373-.75977,4.83723,4.83723,0,0,0-1.17773-.14258c-2.43164,0-3.7627,2.17773-3.7627,4.43359,0,2.47559,1.60645,3.69629,3.19043,3.69629A2.70585,2.70585,0,0,0,16.96,12.19727,2.43861,2.43861,0,0,0,14.51758,9.64453Zm-.23047,3.58691c-.67187,0-1.22168-.81445-1.22168-1.45215,0-.47363.30762-.583.72559-.583.96875,0,1.27734.59375,1.27734,1.12207A.82182.82182,0,0,1,14.28711,13.23145ZM10,4V14a1,1,0,0,1-2,0V10H3v4a1,1,0,0,1-2,0V4A1,1,0,0,1,3,4V8H8V4a1,1,0,0,1,2,0Z\"/>\\n' +\n        '</svg>';\n    icons.font = '<svg viewbox=\"0 0 18 18\">\\n' +\n        '  <polyline class=\"ql-stroke\" points=\"3.5 14 7 4 10.5 14\"></polyline>\\n' +\n        '  <line class=\"ql-stroke\" x1=\"9.45\" x2=\"4.55\" y1=\"11\" y2=\"11\"></line>\\n' +\n        '  <path class=\"ql-fill\" d=\"M13.636,5.013a4.016,4.016,0,0,0-1.863.472,0.42,0.42,0,0,0-.179.629l0.112,0.214a0.418,0.418,0,0,0,.625.191,2.557,2.557,0,0,1,1.183-.326A0.933,0.933,0,0,1,14.573,7.2V7.338H14.339c-1.272,0-3.325.281-3.325,1.954A1.75,1.75,0,0,0,12.9,11.011a2.072,2.072,0,0,0,1.785-1.078h0.022a1.132,1.132,0,0,0-.022.247V10.4a0.412,0.412,0,0,0,.457.472h0.379A0.416,0.416,0,0,0,15.99,10.4V7.293A2.121,2.121,0,0,0,13.636,5.013Zm0.948,3.4a1.452,1.452,0,0,1-1.305,1.505,0.775,0.775,0,0,1-.859-0.753c0-.854,1.216-0.966,1.93-0.966h0.234V8.416Z\"></path>\\n' +\n        '</svg>';\n})();"
  },
  {
    "path": "static/quill/quill.js",
    "content": "/*!\n * Quill Editor v1.3.5\n * https://quilljs.com/\n * Copyright (c) 2014, Jason Chen\n * Copyright (c) 2013, salesforce.com\n */\n(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"Quill\"] = factory();\n\telse\n\t\troot[\"Quill\"] = factory();\n})(this, function() {\nreturn /******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId]) {\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/ \t\t}\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\ti: moduleId,\n/******/ \t\t\tl: false,\n/******/ \t\t\texports: {}\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.l = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// define getter function for harmony exports\n/******/ \t__webpack_require__.d = function(exports, name, getter) {\n/******/ \t\tif(!__webpack_require__.o(exports, name)) {\n/******/ \t\t\tObject.defineProperty(exports, name, {\n/******/ \t\t\t\tconfigurable: false,\n/******/ \t\t\t\tenumerable: true,\n/******/ \t\t\t\tget: getter\n/******/ \t\t\t});\n/******/ \t\t}\n/******/ \t};\n/******/\n/******/ \t// getDefaultExport function for compatibility with non-harmony modules\n/******/ \t__webpack_require__.n = function(module) {\n/******/ \t\tvar getter = module && module.__esModule ?\n/******/ \t\t\tfunction getDefault() { return module['default']; } :\n/******/ \t\t\tfunction getModuleExports() { return module; };\n/******/ \t\t__webpack_require__.d(getter, 'a', getter);\n/******/ \t\treturn getter;\n/******/ \t};\n/******/\n/******/ \t// Object.prototype.hasOwnProperty.call\n/******/ \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(__webpack_require__.s = 109);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar container_1 = __webpack_require__(17);\nvar format_1 = __webpack_require__(18);\nvar leaf_1 = __webpack_require__(19);\nvar scroll_1 = __webpack_require__(45);\nvar inline_1 = __webpack_require__(46);\nvar block_1 = __webpack_require__(47);\nvar embed_1 = __webpack_require__(48);\nvar text_1 = __webpack_require__(49);\nvar attributor_1 = __webpack_require__(12);\nvar class_1 = __webpack_require__(31);\nvar style_1 = __webpack_require__(32);\nvar store_1 = __webpack_require__(30);\nvar Registry = __webpack_require__(1);\nvar Parchment = {\n    Scope: Registry.Scope,\n    create: Registry.create,\n    find: Registry.find,\n    query: Registry.query,\n    register: Registry.register,\n    Container: container_1.default,\n    Format: format_1.default,\n    Leaf: leaf_1.default,\n    Embed: embed_1.default,\n    Scroll: scroll_1.default,\n    Block: block_1.default,\n    Inline: inline_1.default,\n    Text: text_1.default,\n    Attributor: {\n        Attribute: attributor_1.default,\n        Class: class_1.default,\n        Style: style_1.default,\n        Store: store_1.default,\n    },\n};\nexports.default = Parchment;\n\n\n/***/ }),\n/* 1 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar __extends = (this && this.__extends) || (function () {\n    var extendStatics = Object.setPrototypeOf ||\n        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar ParchmentError = /** @class */ (function (_super) {\n    __extends(ParchmentError, _super);\n    function ParchmentError(message) {\n        var _this = this;\n        message = '[Parchment] ' + message;\n        _this = _super.call(this, message) || this;\n        _this.message = message;\n        _this.name = _this.constructor.name;\n        return _this;\n    }\n    return ParchmentError;\n}(Error));\nexports.ParchmentError = ParchmentError;\nvar attributes = {};\nvar classes = {};\nvar tags = {};\nvar types = {};\nexports.DATA_KEY = '__blot';\nvar Scope;\n(function (Scope) {\n    Scope[Scope[\"TYPE\"] = 3] = \"TYPE\";\n    Scope[Scope[\"LEVEL\"] = 12] = \"LEVEL\";\n    Scope[Scope[\"ATTRIBUTE\"] = 13] = \"ATTRIBUTE\";\n    Scope[Scope[\"BLOT\"] = 14] = \"BLOT\";\n    Scope[Scope[\"INLINE\"] = 7] = \"INLINE\";\n    Scope[Scope[\"BLOCK\"] = 11] = \"BLOCK\";\n    Scope[Scope[\"BLOCK_BLOT\"] = 10] = \"BLOCK_BLOT\";\n    Scope[Scope[\"INLINE_BLOT\"] = 6] = \"INLINE_BLOT\";\n    Scope[Scope[\"BLOCK_ATTRIBUTE\"] = 9] = \"BLOCK_ATTRIBUTE\";\n    Scope[Scope[\"INLINE_ATTRIBUTE\"] = 5] = \"INLINE_ATTRIBUTE\";\n    Scope[Scope[\"ANY\"] = 15] = \"ANY\";\n})(Scope = exports.Scope || (exports.Scope = {}));\nfunction create(input, value) {\n    var match = query(input);\n    if (match == null) {\n        throw new ParchmentError(\"Unable to create \" + input + \" blot\");\n    }\n    var BlotClass = match;\n    var node = \n    // @ts-ignore\n    input instanceof Node || input['nodeType'] === Node.TEXT_NODE ? input : BlotClass.create(value);\n    return new BlotClass(node, value);\n}\nexports.create = create;\nfunction find(node, bubble) {\n    if (bubble === void 0) { bubble = false; }\n    if (node == null)\n        return null;\n    // @ts-ignore\n    if (node[exports.DATA_KEY] != null)\n        return node[exports.DATA_KEY].blot;\n    if (bubble)\n        return find(node.parentNode, bubble);\n    return null;\n}\nexports.find = find;\nfunction query(query, scope) {\n    if (scope === void 0) { scope = Scope.ANY; }\n    var match;\n    if (typeof query === 'string') {\n        match = types[query] || attributes[query];\n        // @ts-ignore\n    }\n    else if (query instanceof Text || query['nodeType'] === Node.TEXT_NODE) {\n        match = types['text'];\n    }\n    else if (typeof query === 'number') {\n        if (query & Scope.LEVEL & Scope.BLOCK) {\n            match = types['block'];\n        }\n        else if (query & Scope.LEVEL & Scope.INLINE) {\n            match = types['inline'];\n        }\n    }\n    else if (query instanceof HTMLElement) {\n        var names = (query.getAttribute('class') || '').split(/\\s+/);\n        for (var i in names) {\n            match = classes[names[i]];\n            if (match)\n                break;\n        }\n        match = match || tags[query.tagName];\n    }\n    if (match == null)\n        return null;\n    // @ts-ignore\n    if (scope & Scope.LEVEL & match.scope && scope & Scope.TYPE & match.scope)\n        return match;\n    return null;\n}\nexports.query = query;\nfunction register() {\n    var Definitions = [];\n    for (var _i = 0; _i < arguments.length; _i++) {\n        Definitions[_i] = arguments[_i];\n    }\n    if (Definitions.length > 1) {\n        return Definitions.map(function (d) {\n            return register(d);\n        });\n    }\n    var Definition = Definitions[0];\n    if (typeof Definition.blotName !== 'string' && typeof Definition.attrName !== 'string') {\n        throw new ParchmentError('Invalid definition');\n    }\n    else if (Definition.blotName === 'abstract') {\n        throw new ParchmentError('Cannot register abstract class');\n    }\n    types[Definition.blotName || Definition.attrName] = Definition;\n    if (typeof Definition.keyName === 'string') {\n        attributes[Definition.keyName] = Definition;\n    }\n    else {\n        if (Definition.className != null) {\n            classes[Definition.className] = Definition;\n        }\n        if (Definition.tagName != null) {\n            if (Array.isArray(Definition.tagName)) {\n                Definition.tagName = Definition.tagName.map(function (tagName) {\n                    return tagName.toUpperCase();\n                });\n            }\n            else {\n                Definition.tagName = Definition.tagName.toUpperCase();\n            }\n            var tagNames = Array.isArray(Definition.tagName) ? Definition.tagName : [Definition.tagName];\n            tagNames.forEach(function (tag) {\n                if (tags[tag] == null || Definition.className == null) {\n                    tags[tag] = Definition;\n                }\n            });\n        }\n    }\n    return Definition;\n}\nexports.register = register;\n\n\n/***/ }),\n/* 2 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar diff = __webpack_require__(51);\nvar equal = __webpack_require__(11);\nvar extend = __webpack_require__(3);\nvar op = __webpack_require__(20);\n\n\nvar NULL_CHARACTER = String.fromCharCode(0);  // Placeholder char for embed in diff()\n\n\nvar Delta = function (ops) {\n  // Assume we are given a well formed ops\n  if (Array.isArray(ops)) {\n    this.ops = ops;\n  } else if (ops != null && Array.isArray(ops.ops)) {\n    this.ops = ops.ops;\n  } else {\n    this.ops = [];\n  }\n};\n\n\nDelta.prototype.insert = function (text, attributes) {\n  var newOp = {};\n  if (text.length === 0) return this;\n  newOp.insert = text;\n  if (attributes != null && typeof attributes === 'object' && Object.keys(attributes).length > 0) {\n    newOp.attributes = attributes;\n  }\n  return this.push(newOp);\n};\n\nDelta.prototype['delete'] = function (length) {\n  if (length <= 0) return this;\n  return this.push({ 'delete': length });\n};\n\nDelta.prototype.retain = function (length, attributes) {\n  if (length <= 0) return this;\n  var newOp = { retain: length };\n  if (attributes != null && typeof attributes === 'object' && Object.keys(attributes).length > 0) {\n    newOp.attributes = attributes;\n  }\n  return this.push(newOp);\n};\n\nDelta.prototype.push = function (newOp) {\n  var index = this.ops.length;\n  var lastOp = this.ops[index - 1];\n  newOp = extend(true, {}, newOp);\n  if (typeof lastOp === 'object') {\n    if (typeof newOp['delete'] === 'number' && typeof lastOp['delete'] === 'number') {\n      this.ops[index - 1] = { 'delete': lastOp['delete'] + newOp['delete'] };\n      return this;\n    }\n    // Since it does not matter if we insert before or after deleting at the same index,\n    // always prefer to insert first\n    if (typeof lastOp['delete'] === 'number' && newOp.insert != null) {\n      index -= 1;\n      lastOp = this.ops[index - 1];\n      if (typeof lastOp !== 'object') {\n        this.ops.unshift(newOp);\n        return this;\n      }\n    }\n    if (equal(newOp.attributes, lastOp.attributes)) {\n      if (typeof newOp.insert === 'string' && typeof lastOp.insert === 'string') {\n        this.ops[index - 1] = { insert: lastOp.insert + newOp.insert };\n        if (typeof newOp.attributes === 'object') this.ops[index - 1].attributes = newOp.attributes\n        return this;\n      } else if (typeof newOp.retain === 'number' && typeof lastOp.retain === 'number') {\n        this.ops[index - 1] = { retain: lastOp.retain + newOp.retain };\n        if (typeof newOp.attributes === 'object') this.ops[index - 1].attributes = newOp.attributes\n        return this;\n      }\n    }\n  }\n  if (index === this.ops.length) {\n    this.ops.push(newOp);\n  } else {\n    this.ops.splice(index, 0, newOp);\n  }\n  return this;\n};\n\nDelta.prototype.chop = function () {\n  var lastOp = this.ops[this.ops.length - 1];\n  if (lastOp && lastOp.retain && !lastOp.attributes) {\n    this.ops.pop();\n  }\n  return this;\n};\n\nDelta.prototype.filter = function (predicate) {\n  return this.ops.filter(predicate);\n};\n\nDelta.prototype.forEach = function (predicate) {\n  this.ops.forEach(predicate);\n};\n\nDelta.prototype.map = function (predicate) {\n  return this.ops.map(predicate);\n};\n\nDelta.prototype.partition = function (predicate) {\n  var passed = [], failed = [];\n  this.forEach(function(op) {\n    var target = predicate(op) ? passed : failed;\n    target.push(op);\n  });\n  return [passed, failed];\n};\n\nDelta.prototype.reduce = function (predicate, initial) {\n  return this.ops.reduce(predicate, initial);\n};\n\nDelta.prototype.changeLength = function () {\n  return this.reduce(function (length, elem) {\n    if (elem.insert) {\n      return length + op.length(elem);\n    } else if (elem.delete) {\n      return length - elem.delete;\n    }\n    return length;\n  }, 0);\n};\n\nDelta.prototype.length = function () {\n  return this.reduce(function (length, elem) {\n    return length + op.length(elem);\n  }, 0);\n};\n\nDelta.prototype.slice = function (start, end) {\n  start = start || 0;\n  if (typeof end !== 'number') end = Infinity;\n  var ops = [];\n  var iter = op.iterator(this.ops);\n  var index = 0;\n  while (index < end && iter.hasNext()) {\n    var nextOp;\n    if (index < start) {\n      nextOp = iter.next(start - index);\n    } else {\n      nextOp = iter.next(end - index);\n      ops.push(nextOp);\n    }\n    index += op.length(nextOp);\n  }\n  return new Delta(ops);\n};\n\n\nDelta.prototype.compose = function (other) {\n  var thisIter = op.iterator(this.ops);\n  var otherIter = op.iterator(other.ops);\n  var delta = new Delta();\n  while (thisIter.hasNext() || otherIter.hasNext()) {\n    if (otherIter.peekType() === 'insert') {\n      delta.push(otherIter.next());\n    } else if (thisIter.peekType() === 'delete') {\n      delta.push(thisIter.next());\n    } else {\n      var length = Math.min(thisIter.peekLength(), otherIter.peekLength());\n      var thisOp = thisIter.next(length);\n      var otherOp = otherIter.next(length);\n      if (typeof otherOp.retain === 'number') {\n        var newOp = {};\n        if (typeof thisOp.retain === 'number') {\n          newOp.retain = length;\n        } else {\n          newOp.insert = thisOp.insert;\n        }\n        // Preserve null when composing with a retain, otherwise remove it for inserts\n        var attributes = op.attributes.compose(thisOp.attributes, otherOp.attributes, typeof thisOp.retain === 'number');\n        if (attributes) newOp.attributes = attributes;\n        delta.push(newOp);\n      // Other op should be delete, we could be an insert or retain\n      // Insert + delete cancels out\n      } else if (typeof otherOp['delete'] === 'number' && typeof thisOp.retain === 'number') {\n        delta.push(otherOp);\n      }\n    }\n  }\n  return delta.chop();\n};\n\nDelta.prototype.concat = function (other) {\n  var delta = new Delta(this.ops.slice());\n  if (other.ops.length > 0) {\n    delta.push(other.ops[0]);\n    delta.ops = delta.ops.concat(other.ops.slice(1));\n  }\n  return delta;\n};\n\nDelta.prototype.diff = function (other, index) {\n  if (this.ops === other.ops) {\n    return new Delta();\n  }\n  var strings = [this, other].map(function (delta) {\n    return delta.map(function (op) {\n      if (op.insert != null) {\n        return typeof op.insert === 'string' ? op.insert : NULL_CHARACTER;\n      }\n      var prep = (delta === other) ? 'on' : 'with';\n      throw new Error('diff() called ' + prep + ' non-document');\n    }).join('');\n  });\n  var delta = new Delta();\n  var diffResult = diff(strings[0], strings[1], index);\n  var thisIter = op.iterator(this.ops);\n  var otherIter = op.iterator(other.ops);\n  diffResult.forEach(function (component) {\n    var length = component[1].length;\n    while (length > 0) {\n      var opLength = 0;\n      switch (component[0]) {\n        case diff.INSERT:\n          opLength = Math.min(otherIter.peekLength(), length);\n          delta.push(otherIter.next(opLength));\n          break;\n        case diff.DELETE:\n          opLength = Math.min(length, thisIter.peekLength());\n          thisIter.next(opLength);\n          delta['delete'](opLength);\n          break;\n        case diff.EQUAL:\n          opLength = Math.min(thisIter.peekLength(), otherIter.peekLength(), length);\n          var thisOp = thisIter.next(opLength);\n          var otherOp = otherIter.next(opLength);\n          if (equal(thisOp.insert, otherOp.insert)) {\n            delta.retain(opLength, op.attributes.diff(thisOp.attributes, otherOp.attributes));\n          } else {\n            delta.push(otherOp)['delete'](opLength);\n          }\n          break;\n      }\n      length -= opLength;\n    }\n  });\n  return delta.chop();\n};\n\nDelta.prototype.eachLine = function (predicate, newline) {\n  newline = newline || '\\n';\n  var iter = op.iterator(this.ops);\n  var line = new Delta();\n  var i = 0;\n  while (iter.hasNext()) {\n    if (iter.peekType() !== 'insert') return;\n    var thisOp = iter.peek();\n    var start = op.length(thisOp) - iter.peekLength();\n    var index = typeof thisOp.insert === 'string' ?\n      thisOp.insert.indexOf(newline, start) - start : -1;\n    if (index < 0) {\n      line.push(iter.next());\n    } else if (index > 0) {\n      line.push(iter.next(index));\n    } else {\n      if (predicate(line, iter.next(1).attributes || {}, i) === false) {\n        return;\n      }\n      i += 1;\n      line = new Delta();\n    }\n  }\n  if (line.length() > 0) {\n    predicate(line, {}, i);\n  }\n};\n\nDelta.prototype.transform = function (other, priority) {\n  priority = !!priority;\n  if (typeof other === 'number') {\n    return this.transformPosition(other, priority);\n  }\n  var thisIter = op.iterator(this.ops);\n  var otherIter = op.iterator(other.ops);\n  var delta = new Delta();\n  while (thisIter.hasNext() || otherIter.hasNext()) {\n    if (thisIter.peekType() === 'insert' && (priority || otherIter.peekType() !== 'insert')) {\n      delta.retain(op.length(thisIter.next()));\n    } else if (otherIter.peekType() === 'insert') {\n      delta.push(otherIter.next());\n    } else {\n      var length = Math.min(thisIter.peekLength(), otherIter.peekLength());\n      var thisOp = thisIter.next(length);\n      var otherOp = otherIter.next(length);\n      if (thisOp['delete']) {\n        // Our delete either makes their delete redundant or removes their retain\n        continue;\n      } else if (otherOp['delete']) {\n        delta.push(otherOp);\n      } else {\n        // We retain either their retain or insert\n        delta.retain(length, op.attributes.transform(thisOp.attributes, otherOp.attributes, priority));\n      }\n    }\n  }\n  return delta.chop();\n};\n\nDelta.prototype.transformPosition = function (index, priority) {\n  priority = !!priority;\n  var thisIter = op.iterator(this.ops);\n  var offset = 0;\n  while (thisIter.hasNext() && offset <= index) {\n    var length = thisIter.peekLength();\n    var nextType = thisIter.peekType();\n    thisIter.next();\n    if (nextType === 'delete') {\n      index -= Math.min(length, index - offset);\n      continue;\n    } else if (nextType === 'insert' && (offset < index || !priority)) {\n      index += length;\n    }\n    offset += length;\n  }\n  return index;\n};\n\n\nmodule.exports = Delta;\n\n\n/***/ }),\n/* 3 */\n/***/ (function(module, exports) {\n\n'use strict';\n\nvar hasOwn = Object.prototype.hasOwnProperty;\nvar toStr = Object.prototype.toString;\n\nvar isArray = function isArray(arr) {\n\tif (typeof Array.isArray === 'function') {\n\t\treturn Array.isArray(arr);\n\t}\n\n\treturn toStr.call(arr) === '[object Array]';\n};\n\nvar isPlainObject = function isPlainObject(obj) {\n\tif (!obj || toStr.call(obj) !== '[object Object]') {\n\t\treturn false;\n\t}\n\n\tvar hasOwnConstructor = hasOwn.call(obj, 'constructor');\n\tvar hasIsPrototypeOf = obj.constructor && obj.constructor.prototype && hasOwn.call(obj.constructor.prototype, 'isPrototypeOf');\n\t// Not own constructor property must be Object\n\tif (obj.constructor && !hasOwnConstructor && !hasIsPrototypeOf) {\n\t\treturn false;\n\t}\n\n\t// Own properties are enumerated firstly, so to speed up,\n\t// if last one is own, then all properties are own.\n\tvar key;\n\tfor (key in obj) { /**/ }\n\n\treturn typeof key === 'undefined' || hasOwn.call(obj, key);\n};\n\nmodule.exports = function extend() {\n\tvar options, name, src, copy, copyIsArray, clone;\n\tvar target = arguments[0];\n\tvar i = 1;\n\tvar length = arguments.length;\n\tvar deep = false;\n\n\t// Handle a deep copy situation\n\tif (typeof target === 'boolean') {\n\t\tdeep = target;\n\t\ttarget = arguments[1] || {};\n\t\t// skip the boolean and the target\n\t\ti = 2;\n\t}\n\tif (target == null || (typeof target !== 'object' && typeof target !== 'function')) {\n\t\ttarget = {};\n\t}\n\n\tfor (; i < length; ++i) {\n\t\toptions = arguments[i];\n\t\t// Only deal with non-null/undefined values\n\t\tif (options != null) {\n\t\t\t// Extend the base object\n\t\t\tfor (name in options) {\n\t\t\t\tsrc = target[name];\n\t\t\t\tcopy = options[name];\n\n\t\t\t\t// Prevent never-ending loop\n\t\t\t\tif (target !== copy) {\n\t\t\t\t\t// Recurse if we're merging plain objects or arrays\n\t\t\t\t\tif (deep && copy && (isPlainObject(copy) || (copyIsArray = isArray(copy)))) {\n\t\t\t\t\t\tif (copyIsArray) {\n\t\t\t\t\t\t\tcopyIsArray = false;\n\t\t\t\t\t\t\tclone = src && isArray(src) ? src : [];\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tclone = src && isPlainObject(src) ? src : {};\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Never move original objects, clone them\n\t\t\t\t\t\ttarget[name] = extend(deep, clone, copy);\n\n\t\t\t\t\t// Don't bring in undefined values\n\t\t\t\t\t} else if (typeof copy !== 'undefined') {\n\t\t\t\t\t\ttarget[name] = copy;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// Return the modified object\n\treturn target;\n};\n\n\n/***/ }),\n/* 4 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.default = exports.BlockEmbed = exports.bubbleFormats = undefined;\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if (\"value\" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };\n\nvar _extend = __webpack_require__(3);\n\nvar _extend2 = _interopRequireDefault(_extend);\n\nvar _quillDelta = __webpack_require__(2);\n\nvar _quillDelta2 = _interopRequireDefault(_quillDelta);\n\nvar _parchment = __webpack_require__(0);\n\nvar _parchment2 = _interopRequireDefault(_parchment);\n\nvar _break = __webpack_require__(16);\n\nvar _break2 = _interopRequireDefault(_break);\n\nvar _inline = __webpack_require__(6);\n\nvar _inline2 = _interopRequireDefault(_inline);\n\nvar _text = __webpack_require__(7);\n\nvar _text2 = _interopRequireDefault(_text);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar NEWLINE_LENGTH = 1;\n\nvar BlockEmbed = function (_Parchment$Embed) {\n  _inherits(BlockEmbed, _Parchment$Embed);\n\n  function BlockEmbed() {\n    _classCallCheck(this, BlockEmbed);\n\n    return _possibleConstructorReturn(this, (BlockEmbed.__proto__ || Object.getPrototypeOf(BlockEmbed)).apply(this, arguments));\n  }\n\n  _createClass(BlockEmbed, [{\n    key: 'attach',\n    value: function attach() {\n      _get(BlockEmbed.prototype.__proto__ || Object.getPrototypeOf(BlockEmbed.prototype), 'attach', this).call(this);\n      this.attributes = new _parchment2.default.Attributor.Store(this.domNode);\n    }\n  }, {\n    key: 'delta',\n    value: function delta() {\n      return new _quillDelta2.default().insert(this.value(), (0, _extend2.default)(this.formats(), this.attributes.values()));\n    }\n  }, {\n    key: 'format',\n    value: function format(name, value) {\n      var attribute = _parchment2.default.query(name, _parchment2.default.Scope.BLOCK_ATTRIBUTE);\n      if (attribute != null) {\n        this.attributes.attribute(attribute, value);\n      }\n    }\n  }, {\n    key: 'formatAt',\n    value: function formatAt(index, length, name, value) {\n      this.format(name, value);\n    }\n  }, {\n    key: 'insertAt',\n    value: function insertAt(index, value, def) {\n      if (typeof value === 'string' && value.endsWith('\\n')) {\n        var block = _parchment2.default.create(Block.blotName);\n        this.parent.insertBefore(block, index === 0 ? this : this.next);\n        block.insertAt(0, value.slice(0, -1));\n      } else {\n        _get(BlockEmbed.prototype.__proto__ || Object.getPrototypeOf(BlockEmbed.prototype), 'insertAt', this).call(this, index, value, def);\n      }\n    }\n  }]);\n\n  return BlockEmbed;\n}(_parchment2.default.Embed);\n\nBlockEmbed.scope = _parchment2.default.Scope.BLOCK_BLOT;\n// It is important for cursor behavior BlockEmbeds use tags that are block level elements\n\n\nvar Block = function (_Parchment$Block) {\n  _inherits(Block, _Parchment$Block);\n\n  function Block(domNode) {\n    _classCallCheck(this, Block);\n\n    var _this2 = _possibleConstructorReturn(this, (Block.__proto__ || Object.getPrototypeOf(Block)).call(this, domNode));\n\n    _this2.cache = {};\n    return _this2;\n  }\n\n  _createClass(Block, [{\n    key: 'delta',\n    value: function delta() {\n      if (this.cache.delta == null) {\n        this.cache.delta = this.descendants(_parchment2.default.Leaf).reduce(function (delta, leaf) {\n          if (leaf.length() === 0) {\n            return delta;\n          } else {\n            return delta.insert(leaf.value(), bubbleFormats(leaf));\n          }\n        }, new _quillDelta2.default()).insert('\\n', bubbleFormats(this));\n      }\n      return this.cache.delta;\n    }\n  }, {\n    key: 'deleteAt',\n    value: function deleteAt(index, length) {\n      _get(Block.prototype.__proto__ || Object.getPrototypeOf(Block.prototype), 'deleteAt', this).call(this, index, length);\n      this.cache = {};\n    }\n  }, {\n    key: 'formatAt',\n    value: function formatAt(index, length, name, value) {\n      if (length <= 0) return;\n      if (_parchment2.default.query(name, _parchment2.default.Scope.BLOCK)) {\n        if (index + length === this.length()) {\n          this.format(name, value);\n        }\n      } else {\n        _get(Block.prototype.__proto__ || Object.getPrototypeOf(Block.prototype), 'formatAt', this).call(this, index, Math.min(length, this.length() - index - 1), name, value);\n      }\n      this.cache = {};\n    }\n  }, {\n    key: 'insertAt',\n    value: function insertAt(index, value, def) {\n      if (def != null) return _get(Block.prototype.__proto__ || Object.getPrototypeOf(Block.prototype), 'insertAt', this).call(this, index, value, def);\n      if (value.length === 0) return;\n      var lines = value.split('\\n');\n      var text = lines.shift();\n      if (text.length > 0) {\n        if (index < this.length() - 1 || this.children.tail == null) {\n          _get(Block.prototype.__proto__ || Object.getPrototypeOf(Block.prototype), 'insertAt', this).call(this, Math.min(index, this.length() - 1), text);\n        } else {\n          this.children.tail.insertAt(this.children.tail.length(), text);\n        }\n        this.cache = {};\n      }\n      var block = this;\n      lines.reduce(function (index, line) {\n        block = block.split(index, true);\n        block.insertAt(0, line);\n        return line.length;\n      }, index + text.length);\n    }\n  }, {\n    key: 'insertBefore',\n    value: function insertBefore(blot, ref) {\n      var head = this.children.head;\n      _get(Block.prototype.__proto__ || Object.getPrototypeOf(Block.prototype), 'insertBefore', this).call(this, blot, ref);\n      if (head instanceof _break2.default) {\n        head.remove();\n      }\n      this.cache = {};\n    }\n  }, {\n    key: 'length',\n    value: function length() {\n      if (this.cache.length == null) {\n        this.cache.length = _get(Block.prototype.__proto__ || Object.getPrototypeOf(Block.prototype), 'length', this).call(this) + NEWLINE_LENGTH;\n      }\n      return this.cache.length;\n    }\n  }, {\n    key: 'moveChildren',\n    value: function moveChildren(target, ref) {\n      _get(Block.prototype.__proto__ || Object.getPrototypeOf(Block.prototype), 'moveChildren', this).call(this, target, ref);\n      this.cache = {};\n    }\n  }, {\n    key: 'optimize',\n    value: function optimize(context) {\n      _get(Block.prototype.__proto__ || Object.getPrototypeOf(Block.prototype), 'optimize', this).call(this, context);\n      this.cache = {};\n    }\n  }, {\n    key: 'path',\n    value: function path(index) {\n      return _get(Block.prototype.__proto__ || Object.getPrototypeOf(Block.prototype), 'path', this).call(this, index, true);\n    }\n  }, {\n    key: 'removeChild',\n    value: function removeChild(child) {\n      _get(Block.prototype.__proto__ || Object.getPrototypeOf(Block.prototype), 'removeChild', this).call(this, child);\n      this.cache = {};\n    }\n  }, {\n    key: 'split',\n    value: function split(index) {\n      var force = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n\n      if (force && (index === 0 || index >= this.length() - NEWLINE_LENGTH)) {\n        var clone = this.clone();\n        if (index === 0) {\n          this.parent.insertBefore(clone, this);\n          return this;\n        } else {\n          this.parent.insertBefore(clone, this.next);\n          return clone;\n        }\n      } else {\n        var next = _get(Block.prototype.__proto__ || Object.getPrototypeOf(Block.prototype), 'split', this).call(this, index, force);\n        this.cache = {};\n        return next;\n      }\n    }\n  }]);\n\n  return Block;\n}(_parchment2.default.Block);\n\nBlock.blotName = 'block';\nBlock.tagName = 'P';\nBlock.defaultChild = 'break';\nBlock.allowedChildren = [_inline2.default, _parchment2.default.Embed, _text2.default];\n\nfunction bubbleFormats(blot) {\n  var formats = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n  if (blot == null) return formats;\n  if (typeof blot.formats === 'function') {\n    formats = (0, _extend2.default)(formats, blot.formats());\n  }\n  if (blot.parent == null || blot.parent.blotName == 'scroll' || blot.parent.statics.scope !== blot.statics.scope) {\n    return formats;\n  }\n  return bubbleFormats(blot.parent, formats);\n}\n\nexports.bubbleFormats = bubbleFormats;\nexports.BlockEmbed = BlockEmbed;\nexports.default = Block;\n\n/***/ }),\n/* 5 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.default = exports.overload = exports.expandConfig = undefined;\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nvar _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"]) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); } }; }();\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\n__webpack_require__(50);\n\nvar _quillDelta = __webpack_require__(2);\n\nvar _quillDelta2 = _interopRequireDefault(_quillDelta);\n\nvar _editor = __webpack_require__(14);\n\nvar _editor2 = _interopRequireDefault(_editor);\n\nvar _emitter3 = __webpack_require__(8);\n\nvar _emitter4 = _interopRequireDefault(_emitter3);\n\nvar _module = __webpack_require__(9);\n\nvar _module2 = _interopRequireDefault(_module);\n\nvar _parchment = __webpack_require__(0);\n\nvar _parchment2 = _interopRequireDefault(_parchment);\n\nvar _selection = __webpack_require__(15);\n\nvar _selection2 = _interopRequireDefault(_selection);\n\nvar _extend = __webpack_require__(3);\n\nvar _extend2 = _interopRequireDefault(_extend);\n\nvar _logger = __webpack_require__(10);\n\nvar _logger2 = _interopRequireDefault(_logger);\n\nvar _theme = __webpack_require__(33);\n\nvar _theme2 = _interopRequireDefault(_theme);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar debug = (0, _logger2.default)('quill');\n\nvar Quill = function () {\n  _createClass(Quill, null, [{\n    key: 'debug',\n    value: function debug(limit) {\n      if (limit === true) {\n        limit = 'log';\n      }\n      _logger2.default.level(limit);\n    }\n  }, {\n    key: 'find',\n    value: function find(node) {\n      return node.__quill || _parchment2.default.find(node);\n    }\n  }, {\n    key: 'import',\n    value: function _import(name) {\n      if (this.imports[name] == null) {\n        debug.error('Cannot import ' + name + '. Are you sure it was registered?');\n      }\n      return this.imports[name];\n    }\n  }, {\n    key: 'register',\n    value: function register(path, target) {\n      var _this = this;\n\n      var overwrite = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n\n      if (typeof path !== 'string') {\n        var name = path.attrName || path.blotName;\n        if (typeof name === 'string') {\n          // register(Blot | Attributor, overwrite)\n          this.register('formats/' + name, path, target);\n        } else {\n          Object.keys(path).forEach(function (key) {\n            _this.register(key, path[key], target);\n          });\n        }\n      } else {\n        if (this.imports[path] != null && !overwrite) {\n          debug.warn('Overwriting ' + path + ' with', target);\n        }\n        this.imports[path] = target;\n        if ((path.startsWith('blots/') || path.startsWith('formats/')) && target.blotName !== 'abstract') {\n          _parchment2.default.register(target);\n        } else if (path.startsWith('modules') && typeof target.register === 'function') {\n          target.register();\n        }\n      }\n    }\n  }]);\n\n  function Quill(container) {\n    var _this2 = this;\n\n    var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n    _classCallCheck(this, Quill);\n\n    this.options = expandConfig(container, options);\n    this.container = this.options.container;\n    if (this.container == null) {\n      return debug.error('Invalid Quill container', container);\n    }\n    if (this.options.debug) {\n      Quill.debug(this.options.debug);\n    }\n    var html = this.container.innerHTML.trim();\n    this.container.classList.add('ql-container');\n    this.container.innerHTML = '';\n    this.container.__quill = this;\n    this.root = this.addContainer('ql-editor');\n    this.root.classList.add('ql-blank');\n    this.root.setAttribute('data-gramm', false);\n    this.scrollingContainer = this.options.scrollingContainer || this.root;\n    this.emitter = new _emitter4.default();\n    this.scroll = _parchment2.default.create(this.root, {\n      emitter: this.emitter,\n      whitelist: this.options.formats\n    });\n    this.editor = new _editor2.default(this.scroll);\n    this.selection = new _selection2.default(this.scroll, this.emitter);\n    this.theme = new this.options.theme(this, this.options);\n    this.keyboard = this.theme.addModule('keyboard');\n    this.clipboard = this.theme.addModule('clipboard');\n    this.history = this.theme.addModule('history');\n    this.theme.init();\n    this.emitter.on(_emitter4.default.events.EDITOR_CHANGE, function (type) {\n      if (type === _emitter4.default.events.TEXT_CHANGE) {\n        _this2.root.classList.toggle('ql-blank', _this2.editor.isBlank());\n      }\n    });\n    this.emitter.on(_emitter4.default.events.SCROLL_UPDATE, function (source, mutations) {\n      var range = _this2.selection.lastRange;\n      var index = range && range.length === 0 ? range.index : undefined;\n      modify.call(_this2, function () {\n        return _this2.editor.update(null, mutations, index);\n      }, source);\n    });\n    var contents = this.clipboard.convert('<div class=\\'ql-editor\\' style=\"white-space: normal;\">' + html + '<p><br></p></div>');\n    this.setContents(contents);\n    this.history.clear();\n    if (this.options.placeholder) {\n      this.root.setAttribute('data-placeholder', this.options.placeholder);\n    }\n    if (this.options.readOnly) {\n      this.disable();\n    }\n  }\n\n  _createClass(Quill, [{\n    key: 'addContainer',\n    value: function addContainer(container) {\n      var refNode = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;\n\n      if (typeof container === 'string') {\n        var className = container;\n        container = document.createElement('div');\n        container.classList.add(className);\n      }\n      this.container.insertBefore(container, refNode);\n      return container;\n    }\n  }, {\n    key: 'blur',\n    value: function blur() {\n      this.selection.setRange(null);\n    }\n  }, {\n    key: 'deleteText',\n    value: function deleteText(index, length, source) {\n      var _this3 = this;\n\n      var _overload = overload(index, length, source);\n\n      var _overload2 = _slicedToArray(_overload, 4);\n\n      index = _overload2[0];\n      length = _overload2[1];\n      source = _overload2[3];\n\n      return modify.call(this, function () {\n        return _this3.editor.deleteText(index, length);\n      }, source, index, -1 * length);\n    }\n  }, {\n    key: 'disable',\n    value: function disable() {\n      this.enable(false);\n    }\n  }, {\n    key: 'enable',\n    value: function enable() {\n      var enabled = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;\n\n      this.scroll.enable(enabled);\n      this.container.classList.toggle('ql-disabled', !enabled);\n    }\n  }, {\n    key: 'focus',\n    value: function focus() {\n      var scrollTop = this.scrollingContainer.scrollTop;\n      this.selection.focus();\n      this.scrollingContainer.scrollTop = scrollTop;\n      this.scrollIntoView();\n    }\n  }, {\n    key: 'format',\n    value: function format(name, value) {\n      var _this4 = this;\n\n      var source = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : _emitter4.default.sources.API;\n\n      return modify.call(this, function () {\n        var range = _this4.getSelection(true);\n        var change = new _quillDelta2.default();\n        if (range == null) {\n          return change;\n        } else if (_parchment2.default.query(name, _parchment2.default.Scope.BLOCK)) {\n          change = _this4.editor.formatLine(range.index, range.length, _defineProperty({}, name, value));\n        } else if (range.length === 0) {\n          _this4.selection.format(name, value);\n          return change;\n        } else {\n          change = _this4.editor.formatText(range.index, range.length, _defineProperty({}, name, value));\n        }\n        _this4.setSelection(range, _emitter4.default.sources.SILENT);\n        return change;\n      }, source);\n    }\n  }, {\n    key: 'formatLine',\n    value: function formatLine(index, length, name, value, source) {\n      var _this5 = this;\n\n      var formats = void 0;\n\n      var _overload3 = overload(index, length, name, value, source);\n\n      var _overload4 = _slicedToArray(_overload3, 4);\n\n      index = _overload4[0];\n      length = _overload4[1];\n      formats = _overload4[2];\n      source = _overload4[3];\n\n      return modify.call(this, function () {\n        return _this5.editor.formatLine(index, length, formats);\n      }, source, index, 0);\n    }\n  }, {\n    key: 'formatText',\n    value: function formatText(index, length, name, value, source) {\n      var _this6 = this;\n\n      var formats = void 0;\n\n      var _overload5 = overload(index, length, name, value, source);\n\n      var _overload6 = _slicedToArray(_overload5, 4);\n\n      index = _overload6[0];\n      length = _overload6[1];\n      formats = _overload6[2];\n      source = _overload6[3];\n\n      return modify.call(this, function () {\n        return _this6.editor.formatText(index, length, formats);\n      }, source, index, 0);\n    }\n  }, {\n    key: 'getBounds',\n    value: function getBounds(index) {\n      var length = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n\n      var bounds = void 0;\n      if (typeof index === 'number') {\n        bounds = this.selection.getBounds(index, length);\n      } else {\n        bounds = this.selection.getBounds(index.index, index.length);\n      }\n      var containerBounds = this.container.getBoundingClientRect();\n      return {\n        bottom: bounds.bottom - containerBounds.top,\n        height: bounds.height,\n        left: bounds.left - containerBounds.left,\n        right: bounds.right - containerBounds.left,\n        top: bounds.top - containerBounds.top,\n        width: bounds.width\n      };\n    }\n  }, {\n    key: 'getContents',\n    value: function getContents() {\n      var index = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;\n      var length = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.getLength() - index;\n\n      var _overload7 = overload(index, length);\n\n      var _overload8 = _slicedToArray(_overload7, 2);\n\n      index = _overload8[0];\n      length = _overload8[1];\n\n      return this.editor.getContents(index, length);\n    }\n  }, {\n    key: 'getFormat',\n    value: function getFormat() {\n      var index = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.getSelection(true);\n      var length = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n\n      if (typeof index === 'number') {\n        return this.editor.getFormat(index, length);\n      } else {\n        return this.editor.getFormat(index.index, index.length);\n      }\n    }\n  }, {\n    key: 'getIndex',\n    value: function getIndex(blot) {\n      return blot.offset(this.scroll);\n    }\n  }, {\n    key: 'getLength',\n    value: function getLength() {\n      return this.scroll.length();\n    }\n  }, {\n    key: 'getLeaf',\n    value: function getLeaf(index) {\n      return this.scroll.leaf(index);\n    }\n  }, {\n    key: 'getLine',\n    value: function getLine(index) {\n      return this.scroll.line(index);\n    }\n  }, {\n    key: 'getLines',\n    value: function getLines() {\n      var index = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;\n      var length = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : Number.MAX_VALUE;\n\n      if (typeof index !== 'number') {\n        return this.scroll.lines(index.index, index.length);\n      } else {\n        return this.scroll.lines(index, length);\n      }\n    }\n  }, {\n    key: 'getModule',\n    value: function getModule(name) {\n      return this.theme.modules[name];\n    }\n  }, {\n    key: 'getSelection',\n    value: function getSelection() {\n      var focus = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n\n      if (focus) this.focus();\n      this.update(); // Make sure we access getRange with editor in consistent state\n      return this.selection.getRange()[0];\n    }\n  }, {\n    key: 'getText',\n    value: function getText() {\n      var index = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;\n      var length = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.getLength() - index;\n\n      var _overload9 = overload(index, length);\n\n      var _overload10 = _slicedToArray(_overload9, 2);\n\n      index = _overload10[0];\n      length = _overload10[1];\n\n      return this.editor.getText(index, length);\n    }\n  }, {\n    key: 'hasFocus',\n    value: function hasFocus() {\n      return this.selection.hasFocus();\n    }\n  }, {\n    key: 'insertEmbed',\n    value: function insertEmbed(index, embed, value) {\n      var _this7 = this;\n\n      var source = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : Quill.sources.API;\n\n      return modify.call(this, function () {\n        return _this7.editor.insertEmbed(index, embed, value);\n      }, source, index);\n    }\n  }, {\n    key: 'insertText',\n    value: function insertText(index, text, name, value, source) {\n      var _this8 = this;\n\n      var formats = void 0;\n\n      var _overload11 = overload(index, 0, name, value, source);\n\n      var _overload12 = _slicedToArray(_overload11, 4);\n\n      index = _overload12[0];\n      formats = _overload12[2];\n      source = _overload12[3];\n\n      return modify.call(this, function () {\n        return _this8.editor.insertText(index, text, formats);\n      }, source, index, text.length);\n    }\n  }, {\n    key: 'isEnabled',\n    value: function isEnabled() {\n      return !this.container.classList.contains('ql-disabled');\n    }\n  }, {\n    key: 'off',\n    value: function off() {\n      return this.emitter.off.apply(this.emitter, arguments);\n    }\n  }, {\n    key: 'on',\n    value: function on() {\n      return this.emitter.on.apply(this.emitter, arguments);\n    }\n  }, {\n    key: 'once',\n    value: function once() {\n      return this.emitter.once.apply(this.emitter, arguments);\n    }\n  }, {\n    key: 'pasteHTML',\n    value: function pasteHTML(index, html, source) {\n      this.clipboard.dangerouslyPasteHTML(index, html, source);\n    }\n  }, {\n    key: 'removeFormat',\n    value: function removeFormat(index, length, source) {\n      var _this9 = this;\n\n      var _overload13 = overload(index, length, source);\n\n      var _overload14 = _slicedToArray(_overload13, 4);\n\n      index = _overload14[0];\n      length = _overload14[1];\n      source = _overload14[3];\n\n      return modify.call(this, function () {\n        return _this9.editor.removeFormat(index, length);\n      }, source, index);\n    }\n  }, {\n    key: 'scrollIntoView',\n    value: function scrollIntoView() {\n      this.selection.scrollIntoView(this.scrollingContainer);\n    }\n  }, {\n    key: 'setContents',\n    value: function setContents(delta) {\n      var _this10 = this;\n\n      var source = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : _emitter4.default.sources.API;\n\n      return modify.call(this, function () {\n        delta = new _quillDelta2.default(delta);\n        var length = _this10.getLength();\n        var deleted = _this10.editor.deleteText(0, length);\n        var applied = _this10.editor.applyDelta(delta);\n        var lastOp = applied.ops[applied.ops.length - 1];\n        if (lastOp != null && typeof lastOp.insert === 'string' && lastOp.insert[lastOp.insert.length - 1] === '\\n') {\n          _this10.editor.deleteText(_this10.getLength() - 1, 1);\n          applied.delete(1);\n        }\n        var ret = deleted.compose(applied);\n        return ret;\n      }, source);\n    }\n  }, {\n    key: 'setSelection',\n    value: function setSelection(index, length, source) {\n      if (index == null) {\n        this.selection.setRange(null, length || Quill.sources.API);\n      } else {\n        var _overload15 = overload(index, length, source);\n\n        var _overload16 = _slicedToArray(_overload15, 4);\n\n        index = _overload16[0];\n        length = _overload16[1];\n        source = _overload16[3];\n\n        this.selection.setRange(new _selection.Range(index, length), source);\n        if (source !== _emitter4.default.sources.SILENT) {\n          this.selection.scrollIntoView(this.scrollingContainer);\n        }\n      }\n    }\n  }, {\n    key: 'setText',\n    value: function setText(text) {\n      var source = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : _emitter4.default.sources.API;\n\n      var delta = new _quillDelta2.default().insert(text);\n      return this.setContents(delta, source);\n    }\n  }, {\n    key: 'update',\n    value: function update() {\n      var source = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : _emitter4.default.sources.USER;\n\n      var change = this.scroll.update(source); // Will update selection before selection.update() does if text changes\n      this.selection.update(source);\n      return change;\n    }\n  }, {\n    key: 'updateContents',\n    value: function updateContents(delta) {\n      var _this11 = this;\n\n      var source = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : _emitter4.default.sources.API;\n\n      return modify.call(this, function () {\n        delta = new _quillDelta2.default(delta);\n        return _this11.editor.applyDelta(delta, source);\n      }, source, true);\n    }\n  }]);\n\n  return Quill;\n}();\n\nQuill.DEFAULTS = {\n  bounds: null,\n  formats: null,\n  modules: {},\n  placeholder: '',\n  readOnly: false,\n  scrollingContainer: null,\n  strict: true,\n  theme: 'default'\n};\nQuill.events = _emitter4.default.events;\nQuill.sources = _emitter4.default.sources;\n// eslint-disable-next-line no-undef\nQuill.version =  false ? 'dev' : \"1.3.5\";\n\nQuill.imports = {\n  'delta': _quillDelta2.default,\n  'parchment': _parchment2.default,\n  'core/module': _module2.default,\n  'core/theme': _theme2.default\n};\n\nfunction expandConfig(container, userConfig) {\n  userConfig = (0, _extend2.default)(true, {\n    container: container,\n    modules: {\n      clipboard: true,\n      keyboard: true,\n      history: true\n    }\n  }, userConfig);\n  if (!userConfig.theme || userConfig.theme === Quill.DEFAULTS.theme) {\n    userConfig.theme = _theme2.default;\n  } else {\n    userConfig.theme = Quill.import('themes/' + userConfig.theme);\n    if (userConfig.theme == null) {\n      throw new Error('Invalid theme ' + userConfig.theme + '. Did you register it?');\n    }\n  }\n  var themeConfig = (0, _extend2.default)(true, {}, userConfig.theme.DEFAULTS);\n  [themeConfig, userConfig].forEach(function (config) {\n    config.modules = config.modules || {};\n    Object.keys(config.modules).forEach(function (module) {\n      if (config.modules[module] === true) {\n        config.modules[module] = {};\n      }\n    });\n  });\n  var moduleNames = Object.keys(themeConfig.modules).concat(Object.keys(userConfig.modules));\n  var moduleConfig = moduleNames.reduce(function (config, name) {\n    var moduleClass = Quill.import('modules/' + name);\n    if (moduleClass == null) {\n      debug.error('Cannot load ' + name + ' module. Are you sure you registered it?');\n    } else {\n      config[name] = moduleClass.DEFAULTS || {};\n    }\n    return config;\n  }, {});\n  // Special case toolbar shorthand\n  if (userConfig.modules != null && userConfig.modules.toolbar && userConfig.modules.toolbar.constructor !== Object) {\n    userConfig.modules.toolbar = {\n      container: userConfig.modules.toolbar\n    };\n  }\n  userConfig = (0, _extend2.default)(true, {}, Quill.DEFAULTS, { modules: moduleConfig }, themeConfig, userConfig);\n  ['bounds', 'container', 'scrollingContainer'].forEach(function (key) {\n    if (typeof userConfig[key] === 'string') {\n      userConfig[key] = document.querySelector(userConfig[key]);\n    }\n  });\n  userConfig.modules = Object.keys(userConfig.modules).reduce(function (config, name) {\n    if (userConfig.modules[name]) {\n      config[name] = userConfig.modules[name];\n    }\n    return config;\n  }, {});\n  return userConfig;\n}\n\n// Handle selection preservation and TEXT_CHANGE emission\n// common to modification APIs\nfunction modify(modifier, source, index, shift) {\n  if (this.options.strict && !this.isEnabled() && source === _emitter4.default.sources.USER) {\n    return new _quillDelta2.default();\n  }\n  var range = index == null ? null : this.getSelection();\n  var oldDelta = this.editor.delta;\n  var change = modifier();\n  if (range != null) {\n    if (index === true) index = range.index;\n    if (shift == null) {\n      range = shiftRange(range, change, source);\n    } else if (shift !== 0) {\n      range = shiftRange(range, index, shift, source);\n    }\n    this.setSelection(range, _emitter4.default.sources.SILENT);\n  }\n  if (change.length() > 0) {\n    var _emitter;\n\n    var args = [_emitter4.default.events.TEXT_CHANGE, change, oldDelta, source];\n    (_emitter = this.emitter).emit.apply(_emitter, [_emitter4.default.events.EDITOR_CHANGE].concat(args));\n    if (source !== _emitter4.default.sources.SILENT) {\n      var _emitter2;\n\n      (_emitter2 = this.emitter).emit.apply(_emitter2, args);\n    }\n  }\n  return change;\n}\n\nfunction overload(index, length, name, value, source) {\n  var formats = {};\n  if (typeof index.index === 'number' && typeof index.length === 'number') {\n    // Allow for throwaway end (used by insertText/insertEmbed)\n    if (typeof length !== 'number') {\n      source = value, value = name, name = length, length = index.length, index = index.index;\n    } else {\n      length = index.length, index = index.index;\n    }\n  } else if (typeof length !== 'number') {\n    source = value, value = name, name = length, length = 0;\n  }\n  // Handle format being object, two format name/value strings or excluded\n  if ((typeof name === 'undefined' ? 'undefined' : _typeof(name)) === 'object') {\n    formats = name;\n    source = value;\n  } else if (typeof name === 'string') {\n    if (value != null) {\n      formats[name] = value;\n    } else {\n      source = name;\n    }\n  }\n  // Handle optional source\n  source = source || _emitter4.default.sources.API;\n  return [index, length, formats, source];\n}\n\nfunction shiftRange(range, index, length, source) {\n  if (range == null) return null;\n  var start = void 0,\n      end = void 0;\n  if (index instanceof _quillDelta2.default) {\n    var _map = [range.index, range.index + range.length].map(function (pos) {\n      return index.transformPosition(pos, source !== _emitter4.default.sources.USER);\n    });\n\n    var _map2 = _slicedToArray(_map, 2);\n\n    start = _map2[0];\n    end = _map2[1];\n  } else {\n    var _map3 = [range.index, range.index + range.length].map(function (pos) {\n      if (pos < index || pos === index && source === _emitter4.default.sources.USER) return pos;\n      if (length >= 0) {\n        return pos + length;\n      } else {\n        return Math.max(index, pos + length);\n      }\n    });\n\n    var _map4 = _slicedToArray(_map3, 2);\n\n    start = _map4[0];\n    end = _map4[1];\n  }\n  return new _selection.Range(start, end - start);\n}\n\nexports.expandConfig = expandConfig;\nexports.overload = overload;\nexports.default = Quill;\n\n/***/ }),\n/* 6 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if (\"value\" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };\n\nvar _text = __webpack_require__(7);\n\nvar _text2 = _interopRequireDefault(_text);\n\nvar _parchment = __webpack_require__(0);\n\nvar _parchment2 = _interopRequireDefault(_parchment);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar Inline = function (_Parchment$Inline) {\n  _inherits(Inline, _Parchment$Inline);\n\n  function Inline() {\n    _classCallCheck(this, Inline);\n\n    return _possibleConstructorReturn(this, (Inline.__proto__ || Object.getPrototypeOf(Inline)).apply(this, arguments));\n  }\n\n  _createClass(Inline, [{\n    key: 'formatAt',\n    value: function formatAt(index, length, name, value) {\n      if (Inline.compare(this.statics.blotName, name) < 0 && _parchment2.default.query(name, _parchment2.default.Scope.BLOT)) {\n        var blot = this.isolate(index, length);\n        if (value) {\n          blot.wrap(name, value);\n        }\n      } else {\n        _get(Inline.prototype.__proto__ || Object.getPrototypeOf(Inline.prototype), 'formatAt', this).call(this, index, length, name, value);\n      }\n    }\n  }, {\n    key: 'optimize',\n    value: function optimize(context) {\n      _get(Inline.prototype.__proto__ || Object.getPrototypeOf(Inline.prototype), 'optimize', this).call(this, context);\n      if (this.parent instanceof Inline && Inline.compare(this.statics.blotName, this.parent.statics.blotName) > 0) {\n        var parent = this.parent.isolate(this.offset(), this.length());\n        this.moveChildren(parent);\n        parent.wrap(this);\n      }\n    }\n  }], [{\n    key: 'compare',\n    value: function compare(self, other) {\n      var selfIndex = Inline.order.indexOf(self);\n      var otherIndex = Inline.order.indexOf(other);\n      if (selfIndex >= 0 || otherIndex >= 0) {\n        return selfIndex - otherIndex;\n      } else if (self === other) {\n        return 0;\n      } else if (self < other) {\n        return -1;\n      } else {\n        return 1;\n      }\n    }\n  }]);\n\n  return Inline;\n}(_parchment2.default.Inline);\n\nInline.allowedChildren = [Inline, _parchment2.default.Embed, _text2.default];\n// Lower index means deeper in the DOM tree, since not found (-1) is for embeds\nInline.order = ['cursor', 'inline', // Must be lower\n'underline', 'strike', 'italic', 'bold', 'script', 'link', 'code' // Must be higher\n];\n\nexports.default = Inline;\n\n/***/ }),\n/* 7 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _parchment = __webpack_require__(0);\n\nvar _parchment2 = _interopRequireDefault(_parchment);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar TextBlot = function (_Parchment$Text) {\n  _inherits(TextBlot, _Parchment$Text);\n\n  function TextBlot() {\n    _classCallCheck(this, TextBlot);\n\n    return _possibleConstructorReturn(this, (TextBlot.__proto__ || Object.getPrototypeOf(TextBlot)).apply(this, arguments));\n  }\n\n  return TextBlot;\n}(_parchment2.default.Text);\n\nexports.default = TextBlot;\n\n/***/ }),\n/* 8 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if (\"value\" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };\n\nvar _eventemitter = __webpack_require__(54);\n\nvar _eventemitter2 = _interopRequireDefault(_eventemitter);\n\nvar _logger = __webpack_require__(10);\n\nvar _logger2 = _interopRequireDefault(_logger);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar debug = (0, _logger2.default)('quill:events');\n\nvar EVENTS = ['selectionchange', 'mousedown', 'mouseup', 'click'];\n\nEVENTS.forEach(function (eventName) {\n  document.addEventListener(eventName, function () {\n    for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n      args[_key] = arguments[_key];\n    }\n\n    [].slice.call(document.querySelectorAll('.ql-container')).forEach(function (node) {\n      // TODO use WeakMap\n      if (node.__quill && node.__quill.emitter) {\n        var _node$__quill$emitter;\n\n        (_node$__quill$emitter = node.__quill.emitter).handleDOM.apply(_node$__quill$emitter, args);\n      }\n    });\n  });\n});\n\nvar Emitter = function (_EventEmitter) {\n  _inherits(Emitter, _EventEmitter);\n\n  function Emitter() {\n    _classCallCheck(this, Emitter);\n\n    var _this = _possibleConstructorReturn(this, (Emitter.__proto__ || Object.getPrototypeOf(Emitter)).call(this));\n\n    _this.listeners = {};\n    _this.on('error', debug.error);\n    return _this;\n  }\n\n  _createClass(Emitter, [{\n    key: 'emit',\n    value: function emit() {\n      debug.log.apply(debug, arguments);\n      _get(Emitter.prototype.__proto__ || Object.getPrototypeOf(Emitter.prototype), 'emit', this).apply(this, arguments);\n    }\n  }, {\n    key: 'handleDOM',\n    value: function handleDOM(event) {\n      for (var _len2 = arguments.length, args = Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n        args[_key2 - 1] = arguments[_key2];\n      }\n\n      (this.listeners[event.type] || []).forEach(function (_ref) {\n        var node = _ref.node,\n            handler = _ref.handler;\n\n        if (event.target === node || node.contains(event.target)) {\n          handler.apply(undefined, [event].concat(args));\n        }\n      });\n    }\n  }, {\n    key: 'listenDOM',\n    value: function listenDOM(eventName, node, handler) {\n      if (!this.listeners[eventName]) {\n        this.listeners[eventName] = [];\n      }\n      this.listeners[eventName].push({ node: node, handler: handler });\n    }\n  }]);\n\n  return Emitter;\n}(_eventemitter2.default);\n\nEmitter.events = {\n  EDITOR_CHANGE: 'editor-change',\n  SCROLL_BEFORE_UPDATE: 'scroll-before-update',\n  SCROLL_OPTIMIZE: 'scroll-optimize',\n  SCROLL_UPDATE: 'scroll-update',\n  SELECTION_CHANGE: 'selection-change',\n  TEXT_CHANGE: 'text-change'\n};\nEmitter.sources = {\n  API: 'api',\n  SILENT: 'silent',\n  USER: 'user'\n};\n\nexports.default = Emitter;\n\n/***/ }),\n/* 9 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar Module = function Module(quill) {\n  var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n  _classCallCheck(this, Module);\n\n  this.quill = quill;\n  this.options = options;\n};\n\nModule.DEFAULTS = {};\n\nexports.default = Module;\n\n/***/ }),\n/* 10 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nvar levels = ['error', 'warn', 'log', 'info'];\nvar level = 'warn';\n\nfunction debug(method) {\n  if (levels.indexOf(method) <= levels.indexOf(level)) {\n    var _console;\n\n    for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n      args[_key - 1] = arguments[_key];\n    }\n\n    (_console = console)[method].apply(_console, args); // eslint-disable-line no-console\n  }\n}\n\nfunction namespace(ns) {\n  return levels.reduce(function (logger, method) {\n    logger[method] = debug.bind(console, method, ns);\n    return logger;\n  }, {});\n}\n\ndebug.level = namespace.level = function (newLevel) {\n  level = newLevel;\n};\n\nexports.default = namespace;\n\n/***/ }),\n/* 11 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar pSlice = Array.prototype.slice;\nvar objectKeys = __webpack_require__(52);\nvar isArguments = __webpack_require__(53);\n\nvar deepEqual = module.exports = function (actual, expected, opts) {\n  if (!opts) opts = {};\n  // 7.1. All identical values are equivalent, as determined by ===.\n  if (actual === expected) {\n    return true;\n\n  } else if (actual instanceof Date && expected instanceof Date) {\n    return actual.getTime() === expected.getTime();\n\n  // 7.3. Other pairs that do not both pass typeof value == 'object',\n  // equivalence is determined by ==.\n  } else if (!actual || !expected || typeof actual != 'object' && typeof expected != 'object') {\n    return opts.strict ? actual === expected : actual == expected;\n\n  // 7.4. For all other Object pairs, including Array objects, equivalence is\n  // determined by having the same number of owned properties (as verified\n  // with Object.prototype.hasOwnProperty.call), the same set of keys\n  // (although not necessarily the same order), equivalent values for every\n  // corresponding key, and an identical 'prototype' property. Note: this\n  // accounts for both named and indexed properties on Arrays.\n  } else {\n    return objEquiv(actual, expected, opts);\n  }\n}\n\nfunction isUndefinedOrNull(value) {\n  return value === null || value === undefined;\n}\n\nfunction isBuffer (x) {\n  if (!x || typeof x !== 'object' || typeof x.length !== 'number') return false;\n  if (typeof x.copy !== 'function' || typeof x.slice !== 'function') {\n    return false;\n  }\n  if (x.length > 0 && typeof x[0] !== 'number') return false;\n  return true;\n}\n\nfunction objEquiv(a, b, opts) {\n  var i, key;\n  if (isUndefinedOrNull(a) || isUndefinedOrNull(b))\n    return false;\n  // an identical 'prototype' property.\n  if (a.prototype !== b.prototype) return false;\n  //~~~I've managed to break Object.keys through screwy arguments passing.\n  //   Converting to array solves the problem.\n  if (isArguments(a)) {\n    if (!isArguments(b)) {\n      return false;\n    }\n    a = pSlice.call(a);\n    b = pSlice.call(b);\n    return deepEqual(a, b, opts);\n  }\n  if (isBuffer(a)) {\n    if (!isBuffer(b)) {\n      return false;\n    }\n    if (a.length !== b.length) return false;\n    for (i = 0; i < a.length; i++) {\n      if (a[i] !== b[i]) return false;\n    }\n    return true;\n  }\n  try {\n    var ka = objectKeys(a),\n        kb = objectKeys(b);\n  } catch (e) {//happens when one is a string literal and the other isn't\n    return false;\n  }\n  // having the same number of owned properties (keys incorporates\n  // hasOwnProperty)\n  if (ka.length != kb.length)\n    return false;\n  //the same set of keys (although not necessarily the same order),\n  ka.sort();\n  kb.sort();\n  //~~~cheap key test\n  for (i = ka.length - 1; i >= 0; i--) {\n    if (ka[i] != kb[i])\n      return false;\n  }\n  //equivalent values for every corresponding key, and\n  //~~~possibly expensive deep test\n  for (i = ka.length - 1; i >= 0; i--) {\n    key = ka[i];\n    if (!deepEqual(a[key], b[key], opts)) return false;\n  }\n  return typeof a === typeof b;\n}\n\n\n/***/ }),\n/* 12 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Registry = __webpack_require__(1);\nvar Attributor = /** @class */ (function () {\n    function Attributor(attrName, keyName, options) {\n        if (options === void 0) { options = {}; }\n        this.attrName = attrName;\n        this.keyName = keyName;\n        var attributeBit = Registry.Scope.TYPE & Registry.Scope.ATTRIBUTE;\n        if (options.scope != null) {\n            // Ignore type bits, force attribute bit\n            this.scope = (options.scope & Registry.Scope.LEVEL) | attributeBit;\n        }\n        else {\n            this.scope = Registry.Scope.ATTRIBUTE;\n        }\n        if (options.whitelist != null)\n            this.whitelist = options.whitelist;\n    }\n    Attributor.keys = function (node) {\n        return [].map.call(node.attributes, function (item) {\n            return item.name;\n        });\n    };\n    Attributor.prototype.add = function (node, value) {\n        if (!this.canAdd(node, value))\n            return false;\n        node.setAttribute(this.keyName, value);\n        return true;\n    };\n    Attributor.prototype.canAdd = function (node, value) {\n        var match = Registry.query(node, Registry.Scope.BLOT & (this.scope | Registry.Scope.TYPE));\n        if (match == null)\n            return false;\n        if (this.whitelist == null)\n            return true;\n        if (typeof value === 'string') {\n            return this.whitelist.indexOf(value.replace(/[\"']/g, '')) > -1;\n        }\n        else {\n            return this.whitelist.indexOf(value) > -1;\n        }\n    };\n    Attributor.prototype.remove = function (node) {\n        node.removeAttribute(this.keyName);\n    };\n    Attributor.prototype.value = function (node) {\n        var value = node.getAttribute(this.keyName);\n        if (this.canAdd(node, value) && value) {\n            return value;\n        }\n        return '';\n    };\n    return Attributor;\n}());\nexports.default = Attributor;\n\n\n/***/ }),\n/* 13 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.default = exports.Code = undefined;\n\nvar _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"]) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); } }; }();\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if (\"value\" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };\n\nvar _quillDelta = __webpack_require__(2);\n\nvar _quillDelta2 = _interopRequireDefault(_quillDelta);\n\nvar _parchment = __webpack_require__(0);\n\nvar _parchment2 = _interopRequireDefault(_parchment);\n\nvar _block = __webpack_require__(4);\n\nvar _block2 = _interopRequireDefault(_block);\n\nvar _inline = __webpack_require__(6);\n\nvar _inline2 = _interopRequireDefault(_inline);\n\nvar _text = __webpack_require__(7);\n\nvar _text2 = _interopRequireDefault(_text);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar Code = function (_Inline) {\n  _inherits(Code, _Inline);\n\n  function Code() {\n    _classCallCheck(this, Code);\n\n    return _possibleConstructorReturn(this, (Code.__proto__ || Object.getPrototypeOf(Code)).apply(this, arguments));\n  }\n\n  return Code;\n}(_inline2.default);\n\nCode.blotName = 'code';\nCode.tagName = 'CODE';\n\nvar CodeBlock = function (_Block) {\n  _inherits(CodeBlock, _Block);\n\n  function CodeBlock() {\n    _classCallCheck(this, CodeBlock);\n\n    return _possibleConstructorReturn(this, (CodeBlock.__proto__ || Object.getPrototypeOf(CodeBlock)).apply(this, arguments));\n  }\n\n  _createClass(CodeBlock, [{\n    key: 'delta',\n    value: function delta() {\n      var _this3 = this;\n\n      var text = this.domNode.textContent;\n      if (text.endsWith('\\n')) {\n        // Should always be true\n        text = text.slice(0, -1);\n      }\n      return text.split('\\n').reduce(function (delta, frag) {\n        return delta.insert(frag).insert('\\n', _this3.formats());\n      }, new _quillDelta2.default());\n    }\n  }, {\n    key: 'format',\n    value: function format(name, value) {\n      if (name === this.statics.blotName && value) return;\n\n      var _descendant = this.descendant(_text2.default, this.length() - 1),\n          _descendant2 = _slicedToArray(_descendant, 1),\n          text = _descendant2[0];\n\n      if (text != null) {\n        text.deleteAt(text.length() - 1, 1);\n      }\n      _get(CodeBlock.prototype.__proto__ || Object.getPrototypeOf(CodeBlock.prototype), 'format', this).call(this, name, value);\n    }\n  }, {\n    key: 'formatAt',\n    value: function formatAt(index, length, name, value) {\n      if (length === 0) return;\n      if (_parchment2.default.query(name, _parchment2.default.Scope.BLOCK) == null || name === this.statics.blotName && value === this.statics.formats(this.domNode)) {\n        return;\n      }\n      var nextNewline = this.newlineIndex(index);\n      if (nextNewline < 0 || nextNewline >= index + length) return;\n      var prevNewline = this.newlineIndex(index, true) + 1;\n      var isolateLength = nextNewline - prevNewline + 1;\n      var blot = this.isolate(prevNewline, isolateLength);\n      var next = blot.next;\n      blot.format(name, value);\n      if (next instanceof CodeBlock) {\n        next.formatAt(0, index - prevNewline + length - isolateLength, name, value);\n      }\n    }\n  }, {\n    key: 'insertAt',\n    value: function insertAt(index, value, def) {\n      if (def != null) return;\n\n      var _descendant3 = this.descendant(_text2.default, index),\n          _descendant4 = _slicedToArray(_descendant3, 2),\n          text = _descendant4[0],\n          offset = _descendant4[1];\n\n      text.insertAt(offset, value);\n    }\n  }, {\n    key: 'length',\n    value: function length() {\n      var length = this.domNode.textContent.length;\n      if (!this.domNode.textContent.endsWith('\\n')) {\n        return length + 1;\n      }\n      return length;\n    }\n  }, {\n    key: 'newlineIndex',\n    value: function newlineIndex(searchIndex) {\n      var reverse = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n\n      if (!reverse) {\n        var offset = this.domNode.textContent.slice(searchIndex).indexOf('\\n');\n        return offset > -1 ? searchIndex + offset : -1;\n      } else {\n        return this.domNode.textContent.slice(0, searchIndex).lastIndexOf('\\n');\n      }\n    }\n  }, {\n    key: 'optimize',\n    value: function optimize(context) {\n      if (!this.domNode.textContent.endsWith('\\n')) {\n        this.appendChild(_parchment2.default.create('text', '\\n'));\n      }\n      _get(CodeBlock.prototype.__proto__ || Object.getPrototypeOf(CodeBlock.prototype), 'optimize', this).call(this, context);\n      var next = this.next;\n      if (next != null && next.prev === this && next.statics.blotName === this.statics.blotName && this.statics.formats(this.domNode) === next.statics.formats(next.domNode)) {\n        next.optimize(context);\n        next.moveChildren(this);\n        next.remove();\n      }\n    }\n  }, {\n    key: 'replace',\n    value: function replace(target) {\n      _get(CodeBlock.prototype.__proto__ || Object.getPrototypeOf(CodeBlock.prototype), 'replace', this).call(this, target);\n      [].slice.call(this.domNode.querySelectorAll('*')).forEach(function (node) {\n        var blot = _parchment2.default.find(node);\n        if (blot == null) {\n          node.parentNode.removeChild(node);\n        } else if (blot instanceof _parchment2.default.Embed) {\n          blot.remove();\n        } else {\n          blot.unwrap();\n        }\n      });\n    }\n  }], [{\n    key: 'create',\n    value: function create(value) {\n      var domNode = _get(CodeBlock.__proto__ || Object.getPrototypeOf(CodeBlock), 'create', this).call(this, value);\n      domNode.setAttribute('spellcheck', false);\n      return domNode;\n    }\n  }, {\n    key: 'formats',\n    value: function formats() {\n      return true;\n    }\n  }]);\n\n  return CodeBlock;\n}(_block2.default);\n\nCodeBlock.blotName = 'code-block';\nCodeBlock.tagName = 'PRE';\nCodeBlock.TAB = '  ';\n\nexports.Code = Code;\nexports.default = CodeBlock;\n\n/***/ }),\n/* 14 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nvar _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"]) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); } }; }();\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _quillDelta = __webpack_require__(2);\n\nvar _quillDelta2 = _interopRequireDefault(_quillDelta);\n\nvar _op = __webpack_require__(20);\n\nvar _op2 = _interopRequireDefault(_op);\n\nvar _parchment = __webpack_require__(0);\n\nvar _parchment2 = _interopRequireDefault(_parchment);\n\nvar _code = __webpack_require__(13);\n\nvar _code2 = _interopRequireDefault(_code);\n\nvar _cursor = __webpack_require__(23);\n\nvar _cursor2 = _interopRequireDefault(_cursor);\n\nvar _block = __webpack_require__(4);\n\nvar _block2 = _interopRequireDefault(_block);\n\nvar _break = __webpack_require__(16);\n\nvar _break2 = _interopRequireDefault(_break);\n\nvar _clone = __webpack_require__(21);\n\nvar _clone2 = _interopRequireDefault(_clone);\n\nvar _deepEqual = __webpack_require__(11);\n\nvar _deepEqual2 = _interopRequireDefault(_deepEqual);\n\nvar _extend = __webpack_require__(3);\n\nvar _extend2 = _interopRequireDefault(_extend);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar ASCII = /^[ -~]*$/;\n\nvar Editor = function () {\n  function Editor(scroll) {\n    _classCallCheck(this, Editor);\n\n    this.scroll = scroll;\n    this.delta = this.getDelta();\n  }\n\n  _createClass(Editor, [{\n    key: 'applyDelta',\n    value: function applyDelta(delta) {\n      var _this = this;\n\n      var consumeNextNewline = false;\n      this.scroll.update();\n      var scrollLength = this.scroll.length();\n      this.scroll.batchStart();\n      delta = normalizeDelta(delta);\n      delta.reduce(function (index, op) {\n        var length = op.retain || op.delete || op.insert.length || 1;\n        var attributes = op.attributes || {};\n        if (op.insert != null) {\n          if (typeof op.insert === 'string') {\n            var text = op.insert;\n            if (text.endsWith('\\n') && consumeNextNewline) {\n              consumeNextNewline = false;\n              text = text.slice(0, -1);\n            }\n            if (index >= scrollLength && !text.endsWith('\\n')) {\n              consumeNextNewline = true;\n            }\n            _this.scroll.insertAt(index, text);\n\n            var _scroll$line = _this.scroll.line(index),\n                _scroll$line2 = _slicedToArray(_scroll$line, 2),\n                line = _scroll$line2[0],\n                offset = _scroll$line2[1];\n\n            var formats = (0, _extend2.default)({}, (0, _block.bubbleFormats)(line));\n            if (line instanceof _block2.default) {\n              var _line$descendant = line.descendant(_parchment2.default.Leaf, offset),\n                  _line$descendant2 = _slicedToArray(_line$descendant, 1),\n                  leaf = _line$descendant2[0];\n\n              formats = (0, _extend2.default)(formats, (0, _block.bubbleFormats)(leaf));\n            }\n            attributes = _op2.default.attributes.diff(formats, attributes) || {};\n          } else if (_typeof(op.insert) === 'object') {\n            var key = Object.keys(op.insert)[0]; // There should only be one key\n            if (key == null) return index;\n            _this.scroll.insertAt(index, key, op.insert[key]);\n          }\n          scrollLength += length;\n        }\n        Object.keys(attributes).forEach(function (name) {\n          _this.scroll.formatAt(index, length, name, attributes[name]);\n        });\n        return index + length;\n      }, 0);\n      delta.reduce(function (index, op) {\n        if (typeof op.delete === 'number') {\n          _this.scroll.deleteAt(index, op.delete);\n          return index;\n        }\n        return index + (op.retain || op.insert.length || 1);\n      }, 0);\n      this.scroll.batchEnd();\n      return this.update(delta);\n    }\n  }, {\n    key: 'deleteText',\n    value: function deleteText(index, length) {\n      this.scroll.deleteAt(index, length);\n      return this.update(new _quillDelta2.default().retain(index).delete(length));\n    }\n  }, {\n    key: 'formatLine',\n    value: function formatLine(index, length) {\n      var _this2 = this;\n\n      var formats = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n\n      this.scroll.update();\n      Object.keys(formats).forEach(function (format) {\n        if (_this2.scroll.whitelist != null && !_this2.scroll.whitelist[format]) return;\n        var lines = _this2.scroll.lines(index, Math.max(length, 1));\n        var lengthRemaining = length;\n        lines.forEach(function (line) {\n          var lineLength = line.length();\n          if (!(line instanceof _code2.default)) {\n            line.format(format, formats[format]);\n          } else {\n            var codeIndex = index - line.offset(_this2.scroll);\n            var codeLength = line.newlineIndex(codeIndex + lengthRemaining) - codeIndex + 1;\n            line.formatAt(codeIndex, codeLength, format, formats[format]);\n          }\n          lengthRemaining -= lineLength;\n        });\n      });\n      this.scroll.optimize();\n      return this.update(new _quillDelta2.default().retain(index).retain(length, (0, _clone2.default)(formats)));\n    }\n  }, {\n    key: 'formatText',\n    value: function formatText(index, length) {\n      var _this3 = this;\n\n      var formats = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n\n      Object.keys(formats).forEach(function (format) {\n        _this3.scroll.formatAt(index, length, format, formats[format]);\n      });\n      return this.update(new _quillDelta2.default().retain(index).retain(length, (0, _clone2.default)(formats)));\n    }\n  }, {\n    key: 'getContents',\n    value: function getContents(index, length) {\n      return this.delta.slice(index, index + length);\n    }\n  }, {\n    key: 'getDelta',\n    value: function getDelta() {\n      return this.scroll.lines().reduce(function (delta, line) {\n        return delta.concat(line.delta());\n      }, new _quillDelta2.default());\n    }\n  }, {\n    key: 'getFormat',\n    value: function getFormat(index) {\n      var length = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n\n      var lines = [],\n          leaves = [];\n      if (length === 0) {\n        this.scroll.path(index).forEach(function (path) {\n          var _path = _slicedToArray(path, 1),\n              blot = _path[0];\n\n          if (blot instanceof _block2.default) {\n            lines.push(blot);\n          } else if (blot instanceof _parchment2.default.Leaf) {\n            leaves.push(blot);\n          }\n        });\n      } else {\n        lines = this.scroll.lines(index, length);\n        leaves = this.scroll.descendants(_parchment2.default.Leaf, index, length);\n      }\n      var formatsArr = [lines, leaves].map(function (blots) {\n        if (blots.length === 0) return {};\n        var formats = (0, _block.bubbleFormats)(blots.shift());\n        while (Object.keys(formats).length > 0) {\n          var blot = blots.shift();\n          if (blot == null) return formats;\n          formats = combineFormats((0, _block.bubbleFormats)(blot), formats);\n        }\n        return formats;\n      });\n      return _extend2.default.apply(_extend2.default, formatsArr);\n    }\n  }, {\n    key: 'getText',\n    value: function getText(index, length) {\n      return this.getContents(index, length).filter(function (op) {\n        return typeof op.insert === 'string';\n      }).map(function (op) {\n        return op.insert;\n      }).join('');\n    }\n  }, {\n    key: 'insertEmbed',\n    value: function insertEmbed(index, embed, value) {\n      this.scroll.insertAt(index, embed, value);\n      return this.update(new _quillDelta2.default().retain(index).insert(_defineProperty({}, embed, value)));\n    }\n  }, {\n    key: 'insertText',\n    value: function insertText(index, text) {\n      var _this4 = this;\n\n      var formats = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n\n      text = text.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\n      this.scroll.insertAt(index, text);\n      Object.keys(formats).forEach(function (format) {\n        _this4.scroll.formatAt(index, text.length, format, formats[format]);\n      });\n      return this.update(new _quillDelta2.default().retain(index).insert(text, (0, _clone2.default)(formats)));\n    }\n  }, {\n    key: 'isBlank',\n    value: function isBlank() {\n      if (this.scroll.children.length == 0) return true;\n      if (this.scroll.children.length > 1) return false;\n      var block = this.scroll.children.head;\n      if (block.statics.blotName !== _block2.default.blotName) return false;\n      if (block.children.length > 1) return false;\n      return block.children.head instanceof _break2.default;\n    }\n  }, {\n    key: 'removeFormat',\n    value: function removeFormat(index, length) {\n      var text = this.getText(index, length);\n\n      var _scroll$line3 = this.scroll.line(index + length),\n          _scroll$line4 = _slicedToArray(_scroll$line3, 2),\n          line = _scroll$line4[0],\n          offset = _scroll$line4[1];\n\n      var suffixLength = 0,\n          suffix = new _quillDelta2.default();\n      if (line != null) {\n        if (!(line instanceof _code2.default)) {\n          suffixLength = line.length() - offset;\n        } else {\n          suffixLength = line.newlineIndex(offset) - offset + 1;\n        }\n        suffix = line.delta().slice(offset, offset + suffixLength - 1).insert('\\n');\n      }\n      var contents = this.getContents(index, length + suffixLength);\n      var diff = contents.diff(new _quillDelta2.default().insert(text).concat(suffix));\n      var delta = new _quillDelta2.default().retain(index).concat(diff);\n      return this.applyDelta(delta);\n    }\n  }, {\n    key: 'update',\n    value: function update(change) {\n      var mutations = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n      var cursorIndex = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : undefined;\n\n      var oldDelta = this.delta;\n      if (mutations.length === 1 && mutations[0].type === 'characterData' && mutations[0].target.data.match(ASCII) && _parchment2.default.find(mutations[0].target)) {\n        // Optimization for character changes\n        var textBlot = _parchment2.default.find(mutations[0].target);\n        var formats = (0, _block.bubbleFormats)(textBlot);\n        var index = textBlot.offset(this.scroll);\n        var oldValue = mutations[0].oldValue.replace(_cursor2.default.CONTENTS, '');\n        var oldText = new _quillDelta2.default().insert(oldValue);\n        var newText = new _quillDelta2.default().insert(textBlot.value());\n        var diffDelta = new _quillDelta2.default().retain(index).concat(oldText.diff(newText, cursorIndex));\n        change = diffDelta.reduce(function (delta, op) {\n          if (op.insert) {\n            return delta.insert(op.insert, formats);\n          } else {\n            return delta.push(op);\n          }\n        }, new _quillDelta2.default());\n        this.delta = oldDelta.compose(change);\n      } else {\n        this.delta = this.getDelta();\n        if (!change || !(0, _deepEqual2.default)(oldDelta.compose(change), this.delta)) {\n          change = oldDelta.diff(this.delta, cursorIndex);\n        }\n      }\n      return change;\n    }\n  }]);\n\n  return Editor;\n}();\n\nfunction combineFormats(formats, combined) {\n  return Object.keys(combined).reduce(function (merged, name) {\n    if (formats[name] == null) return merged;\n    if (combined[name] === formats[name]) {\n      merged[name] = combined[name];\n    } else if (Array.isArray(combined[name])) {\n      if (combined[name].indexOf(formats[name]) < 0) {\n        merged[name] = combined[name].concat([formats[name]]);\n      }\n    } else {\n      merged[name] = [combined[name], formats[name]];\n    }\n    return merged;\n  }, {});\n}\n\nfunction normalizeDelta(delta) {\n  return delta.reduce(function (delta, op) {\n    if (op.insert === 1) {\n      var attributes = (0, _clone2.default)(op.attributes);\n      delete attributes['image'];\n      return delta.insert({ image: op.attributes.image }, attributes);\n    }\n    if (op.attributes != null && (op.attributes.list === true || op.attributes.bullet === true)) {\n      op = (0, _clone2.default)(op);\n      if (op.attributes.list) {\n        op.attributes.list = 'ordered';\n      } else {\n        op.attributes.list = 'bullet';\n        delete op.attributes.bullet;\n      }\n    }\n    if (typeof op.insert === 'string') {\n      var text = op.insert.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\n      return delta.insert(text, op.attributes);\n    }\n    return delta.push(op);\n  }, new _quillDelta2.default());\n}\n\nexports.default = Editor;\n\n/***/ }),\n/* 15 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.default = exports.Range = undefined;\n\nvar _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"]) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); } }; }();\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _parchment = __webpack_require__(0);\n\nvar _parchment2 = _interopRequireDefault(_parchment);\n\nvar _clone = __webpack_require__(21);\n\nvar _clone2 = _interopRequireDefault(_clone);\n\nvar _deepEqual = __webpack_require__(11);\n\nvar _deepEqual2 = _interopRequireDefault(_deepEqual);\n\nvar _emitter3 = __webpack_require__(8);\n\nvar _emitter4 = _interopRequireDefault(_emitter3);\n\nvar _logger = __webpack_require__(10);\n\nvar _logger2 = _interopRequireDefault(_logger);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar debug = (0, _logger2.default)('quill:selection');\n\nvar Range = function Range(index) {\n  var length = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n\n  _classCallCheck(this, Range);\n\n  this.index = index;\n  this.length = length;\n};\n\nvar Selection = function () {\n  function Selection(scroll, emitter) {\n    var _this = this;\n\n    _classCallCheck(this, Selection);\n\n    this.emitter = emitter;\n    this.scroll = scroll;\n    this.composing = false;\n    this.mouseDown = false;\n    this.root = this.scroll.domNode;\n    this.cursor = _parchment2.default.create('cursor', this);\n    // savedRange is last non-null range\n    this.lastRange = this.savedRange = new Range(0, 0);\n    this.handleComposition();\n    this.handleDragging();\n    this.emitter.listenDOM('selectionchange', document, function () {\n      if (!_this.mouseDown) {\n        setTimeout(_this.update.bind(_this, _emitter4.default.sources.USER), 1);\n      }\n    });\n    this.emitter.on(_emitter4.default.events.EDITOR_CHANGE, function (type, delta) {\n      if (type === _emitter4.default.events.TEXT_CHANGE && delta.length() > 0) {\n        _this.update(_emitter4.default.sources.SILENT);\n      }\n    });\n    this.emitter.on(_emitter4.default.events.SCROLL_BEFORE_UPDATE, function () {\n      if (!_this.hasFocus()) return;\n      var native = _this.getNativeRange();\n      if (native == null) return;\n      if (native.start.node === _this.cursor.textNode) return; // cursor.restore() will handle\n      // TODO unclear if this has negative side effects\n      _this.emitter.once(_emitter4.default.events.SCROLL_UPDATE, function () {\n        try {\n          _this.setNativeRange(native.start.node, native.start.offset, native.end.node, native.end.offset);\n        } catch (ignored) {}\n      });\n    });\n    this.emitter.on(_emitter4.default.events.SCROLL_OPTIMIZE, function (mutations, context) {\n      if (context.range) {\n        var _context$range = context.range,\n            startNode = _context$range.startNode,\n            startOffset = _context$range.startOffset,\n            endNode = _context$range.endNode,\n            endOffset = _context$range.endOffset;\n\n        _this.setNativeRange(startNode, startOffset, endNode, endOffset);\n      }\n    });\n    this.update(_emitter4.default.sources.SILENT);\n  }\n\n  _createClass(Selection, [{\n    key: 'handleComposition',\n    value: function handleComposition() {\n      var _this2 = this;\n\n      this.root.addEventListener('compositionstart', function () {\n        _this2.composing = true;\n      });\n      this.root.addEventListener('compositionend', function () {\n        _this2.composing = false;\n        if (_this2.cursor.parent) {\n          var range = _this2.cursor.restore();\n          if (!range) return;\n          setTimeout(function () {\n            _this2.setNativeRange(range.startNode, range.startOffset, range.endNode, range.endOffset);\n          }, 1);\n        }\n      });\n    }\n  }, {\n    key: 'handleDragging',\n    value: function handleDragging() {\n      var _this3 = this;\n\n      this.emitter.listenDOM('mousedown', document.body, function () {\n        _this3.mouseDown = true;\n      });\n      this.emitter.listenDOM('mouseup', document.body, function () {\n        _this3.mouseDown = false;\n        _this3.update(_emitter4.default.sources.USER);\n      });\n    }\n  }, {\n    key: 'focus',\n    value: function focus() {\n      if (this.hasFocus()) return;\n      this.root.focus();\n      this.setRange(this.savedRange);\n    }\n  }, {\n    key: 'format',\n    value: function format(_format, value) {\n      if (this.scroll.whitelist != null && !this.scroll.whitelist[_format]) return;\n      this.scroll.update();\n      var nativeRange = this.getNativeRange();\n      if (nativeRange == null || !nativeRange.native.collapsed || _parchment2.default.query(_format, _parchment2.default.Scope.BLOCK)) return;\n      if (nativeRange.start.node !== this.cursor.textNode) {\n        var blot = _parchment2.default.find(nativeRange.start.node, false);\n        if (blot == null) return;\n        // TODO Give blot ability to not split\n        if (blot instanceof _parchment2.default.Leaf) {\n          var after = blot.split(nativeRange.start.offset);\n          blot.parent.insertBefore(this.cursor, after);\n        } else {\n          blot.insertBefore(this.cursor, nativeRange.start.node); // Should never happen\n        }\n        this.cursor.attach();\n      }\n      this.cursor.format(_format, value);\n      this.scroll.optimize();\n      this.setNativeRange(this.cursor.textNode, this.cursor.textNode.data.length);\n      this.update();\n    }\n  }, {\n    key: 'getBounds',\n    value: function getBounds(index) {\n      var length = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n\n      var scrollLength = this.scroll.length();\n      index = Math.min(index, scrollLength - 1);\n      length = Math.min(index + length, scrollLength - 1) - index;\n      var node = void 0,\n          _scroll$leaf = this.scroll.leaf(index),\n          _scroll$leaf2 = _slicedToArray(_scroll$leaf, 2),\n          leaf = _scroll$leaf2[0],\n          offset = _scroll$leaf2[1];\n      if (leaf == null) return null;\n\n      var _leaf$position = leaf.position(offset, true);\n\n      var _leaf$position2 = _slicedToArray(_leaf$position, 2);\n\n      node = _leaf$position2[0];\n      offset = _leaf$position2[1];\n\n      var range = document.createRange();\n      if (length > 0) {\n        range.setStart(node, offset);\n\n        var _scroll$leaf3 = this.scroll.leaf(index + length);\n\n        var _scroll$leaf4 = _slicedToArray(_scroll$leaf3, 2);\n\n        leaf = _scroll$leaf4[0];\n        offset = _scroll$leaf4[1];\n\n        if (leaf == null) return null;\n\n        var _leaf$position3 = leaf.position(offset, true);\n\n        var _leaf$position4 = _slicedToArray(_leaf$position3, 2);\n\n        node = _leaf$position4[0];\n        offset = _leaf$position4[1];\n\n        range.setEnd(node, offset);\n        return range.getBoundingClientRect();\n      } else {\n        var side = 'left';\n        var rect = void 0;\n        if (node instanceof Text) {\n          if (offset < node.data.length) {\n            range.setStart(node, offset);\n            range.setEnd(node, offset + 1);\n          } else {\n            range.setStart(node, offset - 1);\n            range.setEnd(node, offset);\n            side = 'right';\n          }\n          rect = range.getBoundingClientRect();\n        } else {\n          rect = leaf.domNode.getBoundingClientRect();\n          if (offset > 0) side = 'right';\n        }\n        return {\n          bottom: rect.top + rect.height,\n          height: rect.height,\n          left: rect[side],\n          right: rect[side],\n          top: rect.top,\n          width: 0\n        };\n      }\n    }\n  }, {\n    key: 'getNativeRange',\n    value: function getNativeRange() {\n      var selection = document.getSelection();\n      if (selection == null || selection.rangeCount <= 0) return null;\n      var nativeRange = selection.getRangeAt(0);\n      if (nativeRange == null) return null;\n      var range = this.normalizeNative(nativeRange);\n      debug.info('getNativeRange', range);\n      return range;\n    }\n  }, {\n    key: 'getRange',\n    value: function getRange() {\n      var normalized = this.getNativeRange();\n      if (normalized == null) return [null, null];\n      var range = this.normalizedToRange(normalized);\n      return [range, normalized];\n    }\n  }, {\n    key: 'hasFocus',\n    value: function hasFocus() {\n      return document.activeElement === this.root;\n    }\n  }, {\n    key: 'normalizedToRange',\n    value: function normalizedToRange(range) {\n      var _this4 = this;\n\n      var positions = [[range.start.node, range.start.offset]];\n      if (!range.native.collapsed) {\n        positions.push([range.end.node, range.end.offset]);\n      }\n      var indexes = positions.map(function (position) {\n        var _position = _slicedToArray(position, 2),\n            node = _position[0],\n            offset = _position[1];\n\n        var blot = _parchment2.default.find(node, true);\n        var index = blot.offset(_this4.scroll);\n        if (offset === 0) {\n          return index;\n        } else if (blot instanceof _parchment2.default.Container) {\n          return index + blot.length();\n        } else {\n          return index + blot.index(node, offset);\n        }\n      });\n      var end = Math.min(Math.max.apply(Math, _toConsumableArray(indexes)), this.scroll.length() - 1);\n      var start = Math.min.apply(Math, [end].concat(_toConsumableArray(indexes)));\n      return new Range(start, end - start);\n    }\n  }, {\n    key: 'normalizeNative',\n    value: function normalizeNative(nativeRange) {\n      if (!contains(this.root, nativeRange.startContainer) || !nativeRange.collapsed && !contains(this.root, nativeRange.endContainer)) {\n        return null;\n      }\n      var range = {\n        start: { node: nativeRange.startContainer, offset: nativeRange.startOffset },\n        end: { node: nativeRange.endContainer, offset: nativeRange.endOffset },\n        native: nativeRange\n      };\n      [range.start, range.end].forEach(function (position) {\n        var node = position.node,\n            offset = position.offset;\n        while (!(node instanceof Text) && node.childNodes.length > 0) {\n          if (node.childNodes.length > offset) {\n            node = node.childNodes[offset];\n            offset = 0;\n          } else if (node.childNodes.length === offset) {\n            node = node.lastChild;\n            offset = node instanceof Text ? node.data.length : node.childNodes.length + 1;\n          } else {\n            break;\n          }\n        }\n        position.node = node, position.offset = offset;\n      });\n      return range;\n    }\n  }, {\n    key: 'rangeToNative',\n    value: function rangeToNative(range) {\n      var _this5 = this;\n\n      var indexes = range.collapsed ? [range.index] : [range.index, range.index + range.length];\n      var args = [];\n      var scrollLength = this.scroll.length();\n      indexes.forEach(function (index, i) {\n        index = Math.min(scrollLength - 1, index);\n        var node = void 0,\n            _scroll$leaf5 = _this5.scroll.leaf(index),\n            _scroll$leaf6 = _slicedToArray(_scroll$leaf5, 2),\n            leaf = _scroll$leaf6[0],\n            offset = _scroll$leaf6[1];\n        var _leaf$position5 = leaf.position(offset, i !== 0);\n\n        var _leaf$position6 = _slicedToArray(_leaf$position5, 2);\n\n        node = _leaf$position6[0];\n        offset = _leaf$position6[1];\n\n        args.push(node, offset);\n      });\n      if (args.length < 2) {\n        args = args.concat(args);\n      }\n      return args;\n    }\n  }, {\n    key: 'scrollIntoView',\n    value: function scrollIntoView(scrollingContainer) {\n      var range = this.lastRange;\n      if (range == null) return;\n      var bounds = this.getBounds(range.index, range.length);\n      if (bounds == null) return;\n      var limit = this.scroll.length() - 1;\n\n      var _scroll$line = this.scroll.line(Math.min(range.index, limit)),\n          _scroll$line2 = _slicedToArray(_scroll$line, 1),\n          first = _scroll$line2[0];\n\n      var last = first;\n      if (range.length > 0) {\n        var _scroll$line3 = this.scroll.line(Math.min(range.index + range.length, limit));\n\n        var _scroll$line4 = _slicedToArray(_scroll$line3, 1);\n\n        last = _scroll$line4[0];\n      }\n      if (first == null || last == null) return;\n      var scrollBounds = scrollingContainer.getBoundingClientRect();\n      if (bounds.top < scrollBounds.top) {\n        scrollingContainer.scrollTop -= scrollBounds.top - bounds.top;\n      } else if (bounds.bottom > scrollBounds.bottom) {\n        scrollingContainer.scrollTop += bounds.bottom - scrollBounds.bottom;\n      }\n    }\n  }, {\n    key: 'setNativeRange',\n    value: function setNativeRange(startNode, startOffset) {\n      var endNode = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : startNode;\n      var endOffset = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : startOffset;\n      var force = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;\n\n      debug.info('setNativeRange', startNode, startOffset, endNode, endOffset);\n      if (startNode != null && (this.root.parentNode == null || startNode.parentNode == null || endNode.parentNode == null)) {\n        return;\n      }\n      var selection = document.getSelection();\n      if (selection == null) return;\n      if (startNode != null) {\n        if (!this.hasFocus()) this.root.focus();\n        var native = (this.getNativeRange() || {}).native;\n        if (native == null || force || startNode !== native.startContainer || startOffset !== native.startOffset || endNode !== native.endContainer || endOffset !== native.endOffset) {\n\n          if (startNode.tagName == \"BR\") {\n            startOffset = [].indexOf.call(startNode.parentNode.childNodes, startNode);\n            startNode = startNode.parentNode;\n          }\n          if (endNode.tagName == \"BR\") {\n            endOffset = [].indexOf.call(endNode.parentNode.childNodes, endNode);\n            endNode = endNode.parentNode;\n          }\n          var range = document.createRange();\n          range.setStart(startNode, startOffset);\n          range.setEnd(endNode, endOffset);\n          selection.removeAllRanges();\n          selection.addRange(range);\n        }\n      } else {\n        selection.removeAllRanges();\n        this.root.blur();\n        document.body.focus(); // root.blur() not enough on IE11+Travis+SauceLabs (but not local VMs)\n      }\n    }\n  }, {\n    key: 'setRange',\n    value: function setRange(range) {\n      var force = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n      var source = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : _emitter4.default.sources.API;\n\n      if (typeof force === 'string') {\n        source = force;\n        force = false;\n      }\n      debug.info('setRange', range);\n      if (range != null) {\n        var args = this.rangeToNative(range);\n        this.setNativeRange.apply(this, _toConsumableArray(args).concat([force]));\n      } else {\n        this.setNativeRange(null);\n      }\n      this.update(source);\n    }\n  }, {\n    key: 'update',\n    value: function update() {\n      var source = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : _emitter4.default.sources.USER;\n\n      var oldRange = this.lastRange;\n\n      var _getRange = this.getRange(),\n          _getRange2 = _slicedToArray(_getRange, 2),\n          lastRange = _getRange2[0],\n          nativeRange = _getRange2[1];\n\n      this.lastRange = lastRange;\n      if (this.lastRange != null) {\n        this.savedRange = this.lastRange;\n      }\n      if (!(0, _deepEqual2.default)(oldRange, this.lastRange)) {\n        var _emitter;\n\n        if (!this.composing && nativeRange != null && nativeRange.native.collapsed && nativeRange.start.node !== this.cursor.textNode) {\n          this.cursor.restore();\n        }\n        var args = [_emitter4.default.events.SELECTION_CHANGE, (0, _clone2.default)(this.lastRange), (0, _clone2.default)(oldRange), source];\n        (_emitter = this.emitter).emit.apply(_emitter, [_emitter4.default.events.EDITOR_CHANGE].concat(args));\n        if (source !== _emitter4.default.sources.SILENT) {\n          var _emitter2;\n\n          (_emitter2 = this.emitter).emit.apply(_emitter2, args);\n        }\n      }\n    }\n  }]);\n\n  return Selection;\n}();\n\nfunction contains(parent, descendant) {\n  try {\n    // Firefox inserts inaccessible nodes around video elements\n    descendant.parentNode;\n  } catch (e) {\n    return false;\n  }\n  // IE11 has bug with Text nodes\n  // https://connect.microsoft.com/IE/feedback/details/780874/node-contains-is-incorrect\n  if (descendant instanceof Text) {\n    descendant = descendant.parentNode;\n  }\n  return parent.contains(descendant);\n}\n\nexports.Range = Range;\nexports.default = Selection;\n\n/***/ }),\n/* 16 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if (\"value\" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };\n\nvar _parchment = __webpack_require__(0);\n\nvar _parchment2 = _interopRequireDefault(_parchment);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar Break = function (_Parchment$Embed) {\n  _inherits(Break, _Parchment$Embed);\n\n  function Break() {\n    _classCallCheck(this, Break);\n\n    return _possibleConstructorReturn(this, (Break.__proto__ || Object.getPrototypeOf(Break)).apply(this, arguments));\n  }\n\n  _createClass(Break, [{\n    key: 'insertInto',\n    value: function insertInto(parent, ref) {\n      if (parent.children.length === 0) {\n        _get(Break.prototype.__proto__ || Object.getPrototypeOf(Break.prototype), 'insertInto', this).call(this, parent, ref);\n      } else {\n        this.remove();\n      }\n    }\n  }, {\n    key: 'length',\n    value: function length() {\n      return 0;\n    }\n  }, {\n    key: 'value',\n    value: function value() {\n      return '';\n    }\n  }], [{\n    key: 'value',\n    value: function value() {\n      return undefined;\n    }\n  }]);\n\n  return Break;\n}(_parchment2.default.Embed);\n\nBreak.blotName = 'break';\nBreak.tagName = 'BR';\n\nexports.default = Break;\n\n/***/ }),\n/* 17 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar __extends = (this && this.__extends) || (function () {\n    var extendStatics = Object.setPrototypeOf ||\n        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar linked_list_1 = __webpack_require__(44);\nvar shadow_1 = __webpack_require__(29);\nvar Registry = __webpack_require__(1);\nvar ContainerBlot = /** @class */ (function (_super) {\n    __extends(ContainerBlot, _super);\n    function ContainerBlot(domNode) {\n        var _this = _super.call(this, domNode) || this;\n        _this.build();\n        return _this;\n    }\n    ContainerBlot.prototype.appendChild = function (other) {\n        this.insertBefore(other);\n    };\n    ContainerBlot.prototype.attach = function () {\n        _super.prototype.attach.call(this);\n        this.children.forEach(function (child) {\n            child.attach();\n        });\n    };\n    ContainerBlot.prototype.build = function () {\n        var _this = this;\n        this.children = new linked_list_1.default();\n        // Need to be reversed for if DOM nodes already in order\n        [].slice\n            .call(this.domNode.childNodes)\n            .reverse()\n            .forEach(function (node) {\n            try {\n                var child = makeBlot(node);\n                _this.insertBefore(child, _this.children.head || undefined);\n            }\n            catch (err) {\n                if (err instanceof Registry.ParchmentError)\n                    return;\n                else\n                    throw err;\n            }\n        });\n    };\n    ContainerBlot.prototype.deleteAt = function (index, length) {\n        if (index === 0 && length === this.length()) {\n            return this.remove();\n        }\n        this.children.forEachAt(index, length, function (child, offset, length) {\n            child.deleteAt(offset, length);\n        });\n    };\n    ContainerBlot.prototype.descendant = function (criteria, index) {\n        var _a = this.children.find(index), child = _a[0], offset = _a[1];\n        if ((criteria.blotName == null && criteria(child)) ||\n            (criteria.blotName != null && child instanceof criteria)) {\n            return [child, offset];\n        }\n        else if (child instanceof ContainerBlot) {\n            return child.descendant(criteria, offset);\n        }\n        else {\n            return [null, -1];\n        }\n    };\n    ContainerBlot.prototype.descendants = function (criteria, index, length) {\n        if (index === void 0) { index = 0; }\n        if (length === void 0) { length = Number.MAX_VALUE; }\n        var descendants = [];\n        var lengthLeft = length;\n        this.children.forEachAt(index, length, function (child, index, length) {\n            if ((criteria.blotName == null && criteria(child)) ||\n                (criteria.blotName != null && child instanceof criteria)) {\n                descendants.push(child);\n            }\n            if (child instanceof ContainerBlot) {\n                descendants = descendants.concat(child.descendants(criteria, index, lengthLeft));\n            }\n            lengthLeft -= length;\n        });\n        return descendants;\n    };\n    ContainerBlot.prototype.detach = function () {\n        this.children.forEach(function (child) {\n            child.detach();\n        });\n        _super.prototype.detach.call(this);\n    };\n    ContainerBlot.prototype.formatAt = function (index, length, name, value) {\n        this.children.forEachAt(index, length, function (child, offset, length) {\n            child.formatAt(offset, length, name, value);\n        });\n    };\n    ContainerBlot.prototype.insertAt = function (index, value, def) {\n        var _a = this.children.find(index), child = _a[0], offset = _a[1];\n        if (child) {\n            child.insertAt(offset, value, def);\n        }\n        else {\n            var blot = def == null ? Registry.create('text', value) : Registry.create(value, def);\n            this.appendChild(blot);\n        }\n    };\n    ContainerBlot.prototype.insertBefore = function (childBlot, refBlot) {\n        if (this.statics.allowedChildren != null &&\n            !this.statics.allowedChildren.some(function (child) {\n                return childBlot instanceof child;\n            })) {\n            throw new Registry.ParchmentError(\"Cannot insert \" + childBlot.statics.blotName + \" into \" + this.statics.blotName);\n        }\n        childBlot.insertInto(this, refBlot);\n    };\n    ContainerBlot.prototype.length = function () {\n        return this.children.reduce(function (memo, child) {\n            return memo + child.length();\n        }, 0);\n    };\n    ContainerBlot.prototype.moveChildren = function (targetParent, refNode) {\n        this.children.forEach(function (child) {\n            targetParent.insertBefore(child, refNode);\n        });\n    };\n    ContainerBlot.prototype.optimize = function (context) {\n        _super.prototype.optimize.call(this, context);\n        if (this.children.length === 0) {\n            if (this.statics.defaultChild != null) {\n                var child = Registry.create(this.statics.defaultChild);\n                this.appendChild(child);\n                child.optimize(context);\n            }\n            else {\n                this.remove();\n            }\n        }\n    };\n    ContainerBlot.prototype.path = function (index, inclusive) {\n        if (inclusive === void 0) { inclusive = false; }\n        var _a = this.children.find(index, inclusive), child = _a[0], offset = _a[1];\n        var position = [[this, index]];\n        if (child instanceof ContainerBlot) {\n            return position.concat(child.path(offset, inclusive));\n        }\n        else if (child != null) {\n            position.push([child, offset]);\n        }\n        return position;\n    };\n    ContainerBlot.prototype.removeChild = function (child) {\n        this.children.remove(child);\n    };\n    ContainerBlot.prototype.replace = function (target) {\n        if (target instanceof ContainerBlot) {\n            target.moveChildren(this);\n        }\n        _super.prototype.replace.call(this, target);\n    };\n    ContainerBlot.prototype.split = function (index, force) {\n        if (force === void 0) { force = false; }\n        if (!force) {\n            if (index === 0)\n                return this;\n            if (index === this.length())\n                return this.next;\n        }\n        var after = this.clone();\n        this.parent.insertBefore(after, this.next);\n        this.children.forEachAt(index, this.length(), function (child, offset, length) {\n            child = child.split(offset, force);\n            after.appendChild(child);\n        });\n        return after;\n    };\n    ContainerBlot.prototype.unwrap = function () {\n        this.moveChildren(this.parent, this.next);\n        this.remove();\n    };\n    ContainerBlot.prototype.update = function (mutations, context) {\n        var _this = this;\n        var addedNodes = [];\n        var removedNodes = [];\n        mutations.forEach(function (mutation) {\n            if (mutation.target === _this.domNode && mutation.type === 'childList') {\n                addedNodes.push.apply(addedNodes, mutation.addedNodes);\n                removedNodes.push.apply(removedNodes, mutation.removedNodes);\n            }\n        });\n        removedNodes.forEach(function (node) {\n            // Check node has actually been removed\n            // One exception is Chrome does not immediately remove IFRAMEs\n            // from DOM but MutationRecord is correct in its reported removal\n            if (node.parentNode != null &&\n                // @ts-ignore\n                node.tagName !== 'IFRAME' &&\n                document.body.compareDocumentPosition(node) & Node.DOCUMENT_POSITION_CONTAINED_BY) {\n                return;\n            }\n            var blot = Registry.find(node);\n            if (blot == null)\n                return;\n            if (blot.domNode.parentNode == null || blot.domNode.parentNode === _this.domNode) {\n                blot.detach();\n            }\n        });\n        addedNodes\n            .filter(function (node) {\n            return node.parentNode == _this.domNode;\n        })\n            .sort(function (a, b) {\n            if (a === b)\n                return 0;\n            if (a.compareDocumentPosition(b) & Node.DOCUMENT_POSITION_FOLLOWING) {\n                return 1;\n            }\n            return -1;\n        })\n            .forEach(function (node) {\n            var refBlot = null;\n            if (node.nextSibling != null) {\n                refBlot = Registry.find(node.nextSibling);\n            }\n            var blot = makeBlot(node);\n            if (blot.next != refBlot || blot.next == null) {\n                if (blot.parent != null) {\n                    blot.parent.removeChild(_this);\n                }\n                _this.insertBefore(blot, refBlot || undefined);\n            }\n        });\n    };\n    return ContainerBlot;\n}(shadow_1.default));\nfunction makeBlot(node) {\n    var blot = Registry.find(node);\n    if (blot == null) {\n        try {\n            blot = Registry.create(node);\n        }\n        catch (e) {\n            blot = Registry.create(Registry.Scope.INLINE);\n            [].slice.call(node.childNodes).forEach(function (child) {\n                // @ts-ignore\n                blot.domNode.appendChild(child);\n            });\n            if (node.parentNode) {\n                node.parentNode.replaceChild(blot.domNode, node);\n            }\n            blot.attach();\n        }\n    }\n    return blot;\n}\nexports.default = ContainerBlot;\n\n\n/***/ }),\n/* 18 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar __extends = (this && this.__extends) || (function () {\n    var extendStatics = Object.setPrototypeOf ||\n        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar attributor_1 = __webpack_require__(12);\nvar store_1 = __webpack_require__(30);\nvar container_1 = __webpack_require__(17);\nvar Registry = __webpack_require__(1);\nvar FormatBlot = /** @class */ (function (_super) {\n    __extends(FormatBlot, _super);\n    function FormatBlot(domNode) {\n        var _this = _super.call(this, domNode) || this;\n        _this.attributes = new store_1.default(_this.domNode);\n        return _this;\n    }\n    FormatBlot.formats = function (domNode) {\n        if (typeof this.tagName === 'string') {\n            return true;\n        }\n        else if (Array.isArray(this.tagName)) {\n            return domNode.tagName.toLowerCase();\n        }\n        return undefined;\n    };\n    FormatBlot.prototype.format = function (name, value) {\n        var format = Registry.query(name);\n        if (format instanceof attributor_1.default) {\n            this.attributes.attribute(format, value);\n        }\n        else if (value) {\n            if (format != null && (name !== this.statics.blotName || this.formats()[name] !== value)) {\n                this.replaceWith(name, value);\n            }\n        }\n    };\n    FormatBlot.prototype.formats = function () {\n        var formats = this.attributes.values();\n        var format = this.statics.formats(this.domNode);\n        if (format != null) {\n            formats[this.statics.blotName] = format;\n        }\n        return formats;\n    };\n    FormatBlot.prototype.replaceWith = function (name, value) {\n        var replacement = _super.prototype.replaceWith.call(this, name, value);\n        this.attributes.copy(replacement);\n        return replacement;\n    };\n    FormatBlot.prototype.update = function (mutations, context) {\n        var _this = this;\n        _super.prototype.update.call(this, mutations, context);\n        if (mutations.some(function (mutation) {\n            return mutation.target === _this.domNode && mutation.type === 'attributes';\n        })) {\n            this.attributes.build();\n        }\n    };\n    FormatBlot.prototype.wrap = function (name, value) {\n        var wrapper = _super.prototype.wrap.call(this, name, value);\n        if (wrapper instanceof FormatBlot && wrapper.statics.scope === this.statics.scope) {\n            this.attributes.move(wrapper);\n        }\n        return wrapper;\n    };\n    return FormatBlot;\n}(container_1.default));\nexports.default = FormatBlot;\n\n\n/***/ }),\n/* 19 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar __extends = (this && this.__extends) || (function () {\n    var extendStatics = Object.setPrototypeOf ||\n        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar shadow_1 = __webpack_require__(29);\nvar Registry = __webpack_require__(1);\nvar LeafBlot = /** @class */ (function (_super) {\n    __extends(LeafBlot, _super);\n    function LeafBlot() {\n        return _super !== null && _super.apply(this, arguments) || this;\n    }\n    LeafBlot.value = function (domNode) {\n        return true;\n    };\n    LeafBlot.prototype.index = function (node, offset) {\n        if (this.domNode === node ||\n            this.domNode.compareDocumentPosition(node) & Node.DOCUMENT_POSITION_CONTAINED_BY) {\n            return Math.min(offset, 1);\n        }\n        return -1;\n    };\n    LeafBlot.prototype.position = function (index, inclusive) {\n        var offset = [].indexOf.call(this.parent.domNode.childNodes, this.domNode);\n        if (index > 0)\n            offset += 1;\n        return [this.parent.domNode, offset];\n    };\n    LeafBlot.prototype.value = function () {\n        return _a = {}, _a[this.statics.blotName] = this.statics.value(this.domNode) || true, _a;\n        var _a;\n    };\n    LeafBlot.scope = Registry.Scope.INLINE_BLOT;\n    return LeafBlot;\n}(shadow_1.default));\nexports.default = LeafBlot;\n\n\n/***/ }),\n/* 20 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar equal = __webpack_require__(11);\nvar extend = __webpack_require__(3);\n\n\nvar lib = {\n  attributes: {\n    compose: function (a, b, keepNull) {\n      if (typeof a !== 'object') a = {};\n      if (typeof b !== 'object') b = {};\n      var attributes = extend(true, {}, b);\n      if (!keepNull) {\n        attributes = Object.keys(attributes).reduce(function (copy, key) {\n          if (attributes[key] != null) {\n            copy[key] = attributes[key];\n          }\n          return copy;\n        }, {});\n      }\n      for (var key in a) {\n        if (a[key] !== undefined && b[key] === undefined) {\n          attributes[key] = a[key];\n        }\n      }\n      return Object.keys(attributes).length > 0 ? attributes : undefined;\n    },\n\n    diff: function(a, b) {\n      if (typeof a !== 'object') a = {};\n      if (typeof b !== 'object') b = {};\n      var attributes = Object.keys(a).concat(Object.keys(b)).reduce(function (attributes, key) {\n        if (!equal(a[key], b[key])) {\n          attributes[key] = b[key] === undefined ? null : b[key];\n        }\n        return attributes;\n      }, {});\n      return Object.keys(attributes).length > 0 ? attributes : undefined;\n    },\n\n    transform: function (a, b, priority) {\n      if (typeof a !== 'object') return b;\n      if (typeof b !== 'object') return undefined;\n      if (!priority) return b;  // b simply overwrites us without priority\n      var attributes = Object.keys(b).reduce(function (attributes, key) {\n        if (a[key] === undefined) attributes[key] = b[key];  // null is a valid value\n        return attributes;\n      }, {});\n      return Object.keys(attributes).length > 0 ? attributes : undefined;\n    }\n  },\n\n  iterator: function (ops) {\n    return new Iterator(ops);\n  },\n\n  length: function (op) {\n    if (typeof op['delete'] === 'number') {\n      return op['delete'];\n    } else if (typeof op.retain === 'number') {\n      return op.retain;\n    } else {\n      return typeof op.insert === 'string' ? op.insert.length : 1;\n    }\n  }\n};\n\n\nfunction Iterator(ops) {\n  this.ops = ops;\n  this.index = 0;\n  this.offset = 0;\n};\n\nIterator.prototype.hasNext = function () {\n  return this.peekLength() < Infinity;\n};\n\nIterator.prototype.next = function (length) {\n  if (!length) length = Infinity;\n  var nextOp = this.ops[this.index];\n  if (nextOp) {\n    var offset = this.offset;\n    var opLength = lib.length(nextOp)\n    if (length >= opLength - offset) {\n      length = opLength - offset;\n      this.index += 1;\n      this.offset = 0;\n    } else {\n      this.offset += length;\n    }\n    if (typeof nextOp['delete'] === 'number') {\n      return { 'delete': length };\n    } else {\n      var retOp = {};\n      if (nextOp.attributes) {\n        retOp.attributes = nextOp.attributes;\n      }\n      if (typeof nextOp.retain === 'number') {\n        retOp.retain = length;\n      } else if (typeof nextOp.insert === 'string') {\n        retOp.insert = nextOp.insert.substr(offset, length);\n      } else {\n        // offset should === 0, length should === 1\n        retOp.insert = nextOp.insert;\n      }\n      return retOp;\n    }\n  } else {\n    return { retain: Infinity };\n  }\n};\n\nIterator.prototype.peek = function () {\n  return this.ops[this.index];\n};\n\nIterator.prototype.peekLength = function () {\n  if (this.ops[this.index]) {\n    // Should never return 0 if our index is being managed correctly\n    return lib.length(this.ops[this.index]) - this.offset;\n  } else {\n    return Infinity;\n  }\n};\n\nIterator.prototype.peekType = function () {\n  if (this.ops[this.index]) {\n    if (typeof this.ops[this.index]['delete'] === 'number') {\n      return 'delete';\n    } else if (typeof this.ops[this.index].retain === 'number') {\n      return 'retain';\n    } else {\n      return 'insert';\n    }\n  }\n  return 'retain';\n};\n\n\nmodule.exports = lib;\n\n\n/***/ }),\n/* 21 */\n/***/ (function(module, exports) {\n\nvar clone = (function() {\n'use strict';\n\nfunction _instanceof(obj, type) {\n  return type != null && obj instanceof type;\n}\n\nvar nativeMap;\ntry {\n  nativeMap = Map;\n} catch(_) {\n  // maybe a reference error because no `Map`. Give it a dummy value that no\n  // value will ever be an instanceof.\n  nativeMap = function() {};\n}\n\nvar nativeSet;\ntry {\n  nativeSet = Set;\n} catch(_) {\n  nativeSet = function() {};\n}\n\nvar nativePromise;\ntry {\n  nativePromise = Promise;\n} catch(_) {\n  nativePromise = function() {};\n}\n\n/**\n * Clones (copies) an Object using deep copying.\n *\n * This function supports circular references by default, but if you are certain\n * there are no circular references in your object, you can save some CPU time\n * by calling clone(obj, false).\n *\n * Caution: if `circular` is false and `parent` contains circular references,\n * your program may enter an infinite loop and crash.\n *\n * @param `parent` - the object to be cloned\n * @param `circular` - set to true if the object to be cloned may contain\n *    circular references. (optional - true by default)\n * @param `depth` - set to a number if the object is only to be cloned to\n *    a particular depth. (optional - defaults to Infinity)\n * @param `prototype` - sets the prototype to be used when cloning an object.\n *    (optional - defaults to parent prototype).\n * @param `includeNonEnumerable` - set to true if the non-enumerable properties\n *    should be cloned as well. Non-enumerable properties on the prototype\n *    chain will be ignored. (optional - false by default)\n*/\nfunction clone(parent, circular, depth, prototype, includeNonEnumerable) {\n  if (typeof circular === 'object') {\n    depth = circular.depth;\n    prototype = circular.prototype;\n    includeNonEnumerable = circular.includeNonEnumerable;\n    circular = circular.circular;\n  }\n  // maintain two arrays for circular references, where corresponding parents\n  // and children have the same index\n  var allParents = [];\n  var allChildren = [];\n\n  var useBuffer = typeof Buffer != 'undefined';\n\n  if (typeof circular == 'undefined')\n    circular = true;\n\n  if (typeof depth == 'undefined')\n    depth = Infinity;\n\n  // recurse this function so we don't reset allParents and allChildren\n  function _clone(parent, depth) {\n    // cloning null always returns null\n    if (parent === null)\n      return null;\n\n    if (depth === 0)\n      return parent;\n\n    var child;\n    var proto;\n    if (typeof parent != 'object') {\n      return parent;\n    }\n\n    if (_instanceof(parent, nativeMap)) {\n      child = new nativeMap();\n    } else if (_instanceof(parent, nativeSet)) {\n      child = new nativeSet();\n    } else if (_instanceof(parent, nativePromise)) {\n      child = new nativePromise(function (resolve, reject) {\n        parent.then(function(value) {\n          resolve(_clone(value, depth - 1));\n        }, function(err) {\n          reject(_clone(err, depth - 1));\n        });\n      });\n    } else if (clone.__isArray(parent)) {\n      child = [];\n    } else if (clone.__isRegExp(parent)) {\n      child = new RegExp(parent.source, __getRegExpFlags(parent));\n      if (parent.lastIndex) child.lastIndex = parent.lastIndex;\n    } else if (clone.__isDate(parent)) {\n      child = new Date(parent.getTime());\n    } else if (useBuffer && Buffer.isBuffer(parent)) {\n      child = new Buffer(parent.length);\n      parent.copy(child);\n      return child;\n    } else if (_instanceof(parent, Error)) {\n      child = Object.create(parent);\n    } else {\n      if (typeof prototype == 'undefined') {\n        proto = Object.getPrototypeOf(parent);\n        child = Object.create(proto);\n      }\n      else {\n        child = Object.create(prototype);\n        proto = prototype;\n      }\n    }\n\n    if (circular) {\n      var index = allParents.indexOf(parent);\n\n      if (index != -1) {\n        return allChildren[index];\n      }\n      allParents.push(parent);\n      allChildren.push(child);\n    }\n\n    if (_instanceof(parent, nativeMap)) {\n      parent.forEach(function(value, key) {\n        var keyChild = _clone(key, depth - 1);\n        var valueChild = _clone(value, depth - 1);\n        child.set(keyChild, valueChild);\n      });\n    }\n    if (_instanceof(parent, nativeSet)) {\n      parent.forEach(function(value) {\n        var entryChild = _clone(value, depth - 1);\n        child.add(entryChild);\n      });\n    }\n\n    for (var i in parent) {\n      var attrs;\n      if (proto) {\n        attrs = Object.getOwnPropertyDescriptor(proto, i);\n      }\n\n      if (attrs && attrs.set == null) {\n        continue;\n      }\n      child[i] = _clone(parent[i], depth - 1);\n    }\n\n    if (Object.getOwnPropertySymbols) {\n      var symbols = Object.getOwnPropertySymbols(parent);\n      for (var i = 0; i < symbols.length; i++) {\n        // Don't need to worry about cloning a symbol because it is a primitive,\n        // like a number or string.\n        var symbol = symbols[i];\n        var descriptor = Object.getOwnPropertyDescriptor(parent, symbol);\n        if (descriptor && !descriptor.enumerable && !includeNonEnumerable) {\n          continue;\n        }\n        child[symbol] = _clone(parent[symbol], depth - 1);\n        if (!descriptor.enumerable) {\n          Object.defineProperty(child, symbol, {\n            enumerable: false\n          });\n        }\n      }\n    }\n\n    if (includeNonEnumerable) {\n      var allPropertyNames = Object.getOwnPropertyNames(parent);\n      for (var i = 0; i < allPropertyNames.length; i++) {\n        var propertyName = allPropertyNames[i];\n        var descriptor = Object.getOwnPropertyDescriptor(parent, propertyName);\n        if (descriptor && descriptor.enumerable) {\n          continue;\n        }\n        child[propertyName] = _clone(parent[propertyName], depth - 1);\n        Object.defineProperty(child, propertyName, {\n          enumerable: false\n        });\n      }\n    }\n\n    return child;\n  }\n\n  return _clone(parent, depth);\n}\n\n/**\n * Simple flat clone using prototype, accepts only objects, usefull for property\n * override on FLAT configuration object (no nested props).\n *\n * USE WITH CAUTION! This may not behave as you wish if you do not know how this\n * works.\n */\nclone.clonePrototype = function clonePrototype(parent) {\n  if (parent === null)\n    return null;\n\n  var c = function () {};\n  c.prototype = parent;\n  return new c();\n};\n\n// private utility functions\n\nfunction __objToStr(o) {\n  return Object.prototype.toString.call(o);\n}\nclone.__objToStr = __objToStr;\n\nfunction __isDate(o) {\n  return typeof o === 'object' && __objToStr(o) === '[object Date]';\n}\nclone.__isDate = __isDate;\n\nfunction __isArray(o) {\n  return typeof o === 'object' && __objToStr(o) === '[object Array]';\n}\nclone.__isArray = __isArray;\n\nfunction __isRegExp(o) {\n  return typeof o === 'object' && __objToStr(o) === '[object RegExp]';\n}\nclone.__isRegExp = __isRegExp;\n\nfunction __getRegExpFlags(re) {\n  var flags = '';\n  if (re.global) flags += 'g';\n  if (re.ignoreCase) flags += 'i';\n  if (re.multiline) flags += 'm';\n  return flags;\n}\nclone.__getRegExpFlags = __getRegExpFlags;\n\nreturn clone;\n})();\n\nif (typeof module === 'object' && module.exports) {\n  module.exports = clone;\n}\n\n\n/***/ }),\n/* 22 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"]) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); } }; }();\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if (\"value\" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };\n\nvar _parchment = __webpack_require__(0);\n\nvar _parchment2 = _interopRequireDefault(_parchment);\n\nvar _emitter = __webpack_require__(8);\n\nvar _emitter2 = _interopRequireDefault(_emitter);\n\nvar _block = __webpack_require__(4);\n\nvar _block2 = _interopRequireDefault(_block);\n\nvar _break = __webpack_require__(16);\n\nvar _break2 = _interopRequireDefault(_break);\n\nvar _code = __webpack_require__(13);\n\nvar _code2 = _interopRequireDefault(_code);\n\nvar _container = __webpack_require__(24);\n\nvar _container2 = _interopRequireDefault(_container);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nfunction isLine(blot) {\n  return blot instanceof _block2.default || blot instanceof _block.BlockEmbed;\n}\n\nvar Scroll = function (_Parchment$Scroll) {\n  _inherits(Scroll, _Parchment$Scroll);\n\n  function Scroll(domNode, config) {\n    _classCallCheck(this, Scroll);\n\n    var _this = _possibleConstructorReturn(this, (Scroll.__proto__ || Object.getPrototypeOf(Scroll)).call(this, domNode));\n\n    _this.emitter = config.emitter;\n    if (Array.isArray(config.whitelist)) {\n      _this.whitelist = config.whitelist.reduce(function (whitelist, format) {\n        whitelist[format] = true;\n        return whitelist;\n      }, {});\n    }\n    // Some reason fixes composition issues with character languages in Windows/Chrome, Safari\n    _this.domNode.addEventListener('DOMNodeInserted', function () {});\n    _this.optimize();\n    _this.enable();\n    return _this;\n  }\n\n  _createClass(Scroll, [{\n    key: 'batchStart',\n    value: function batchStart() {\n      this.batch = true;\n    }\n  }, {\n    key: 'batchEnd',\n    value: function batchEnd() {\n      this.batch = false;\n      this.optimize();\n    }\n  }, {\n    key: 'deleteAt',\n    value: function deleteAt(index, length) {\n      var _line = this.line(index),\n          _line2 = _slicedToArray(_line, 2),\n          first = _line2[0],\n          offset = _line2[1];\n\n      var _line3 = this.line(index + length),\n          _line4 = _slicedToArray(_line3, 1),\n          last = _line4[0];\n\n      _get(Scroll.prototype.__proto__ || Object.getPrototypeOf(Scroll.prototype), 'deleteAt', this).call(this, index, length);\n      if (last != null && first !== last && offset > 0) {\n        if (first instanceof _block.BlockEmbed || last instanceof _block.BlockEmbed) {\n          this.optimize();\n          return;\n        }\n        if (first instanceof _code2.default) {\n          var newlineIndex = first.newlineIndex(first.length(), true);\n          if (newlineIndex > -1) {\n            first = first.split(newlineIndex + 1);\n            if (first === last) {\n              this.optimize();\n              return;\n            }\n          }\n        } else if (last instanceof _code2.default) {\n          var _newlineIndex = last.newlineIndex(0);\n          if (_newlineIndex > -1) {\n            last.split(_newlineIndex + 1);\n          }\n        }\n        var ref = last.children.head instanceof _break2.default ? null : last.children.head;\n        first.moveChildren(last, ref);\n        first.remove();\n      }\n      this.optimize();\n    }\n  }, {\n    key: 'enable',\n    value: function enable() {\n      var enabled = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;\n\n      this.domNode.setAttribute('contenteditable', enabled);\n    }\n  }, {\n    key: 'formatAt',\n    value: function formatAt(index, length, format, value) {\n      if (this.whitelist != null && !this.whitelist[format]) return;\n      _get(Scroll.prototype.__proto__ || Object.getPrototypeOf(Scroll.prototype), 'formatAt', this).call(this, index, length, format, value);\n      this.optimize();\n    }\n  }, {\n    key: 'insertAt',\n    value: function insertAt(index, value, def) {\n      if (def != null && this.whitelist != null && !this.whitelist[value]) return;\n      if (index >= this.length()) {\n        if (def == null || _parchment2.default.query(value, _parchment2.default.Scope.BLOCK) == null) {\n          var blot = _parchment2.default.create(this.statics.defaultChild);\n          this.appendChild(blot);\n          if (def == null && value.endsWith('\\n')) {\n            value = value.slice(0, -1);\n          }\n          blot.insertAt(0, value, def);\n        } else {\n          var embed = _parchment2.default.create(value, def);\n          this.appendChild(embed);\n        }\n      } else {\n        _get(Scroll.prototype.__proto__ || Object.getPrototypeOf(Scroll.prototype), 'insertAt', this).call(this, index, value, def);\n      }\n      this.optimize();\n    }\n  }, {\n    key: 'insertBefore',\n    value: function insertBefore(blot, ref) {\n      if (blot.statics.scope === _parchment2.default.Scope.INLINE_BLOT) {\n        var wrapper = _parchment2.default.create(this.statics.defaultChild);\n        wrapper.appendChild(blot);\n        blot = wrapper;\n      }\n      _get(Scroll.prototype.__proto__ || Object.getPrototypeOf(Scroll.prototype), 'insertBefore', this).call(this, blot, ref);\n    }\n  }, {\n    key: 'leaf',\n    value: function leaf(index) {\n      return this.path(index).pop() || [null, -1];\n    }\n  }, {\n    key: 'line',\n    value: function line(index) {\n      if (index === this.length()) {\n        return this.line(index - 1);\n      }\n      return this.descendant(isLine, index);\n    }\n  }, {\n    key: 'lines',\n    value: function lines() {\n      var index = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;\n      var length = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : Number.MAX_VALUE;\n\n      var getLines = function getLines(blot, index, length) {\n        var lines = [],\n            lengthLeft = length;\n        blot.children.forEachAt(index, length, function (child, index, length) {\n          if (isLine(child)) {\n            lines.push(child);\n          } else if (child instanceof _parchment2.default.Container) {\n            lines = lines.concat(getLines(child, index, lengthLeft));\n          }\n          lengthLeft -= length;\n        });\n        return lines;\n      };\n      return getLines(this, index, length);\n    }\n  }, {\n    key: 'optimize',\n    value: function optimize() {\n      var mutations = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];\n      var context = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n      if (this.batch === true) return;\n      _get(Scroll.prototype.__proto__ || Object.getPrototypeOf(Scroll.prototype), 'optimize', this).call(this, mutations, context);\n      if (mutations.length > 0) {\n        this.emitter.emit(_emitter2.default.events.SCROLL_OPTIMIZE, mutations, context);\n      }\n    }\n  }, {\n    key: 'path',\n    value: function path(index) {\n      return _get(Scroll.prototype.__proto__ || Object.getPrototypeOf(Scroll.prototype), 'path', this).call(this, index).slice(1); // Exclude self\n    }\n  }, {\n    key: 'update',\n    value: function update(mutations) {\n      if (this.batch === true) return;\n      var source = _emitter2.default.sources.USER;\n      if (typeof mutations === 'string') {\n        source = mutations;\n      }\n      if (!Array.isArray(mutations)) {\n        mutations = this.observer.takeRecords();\n      }\n      if (mutations.length > 0) {\n        this.emitter.emit(_emitter2.default.events.SCROLL_BEFORE_UPDATE, source, mutations);\n      }\n      _get(Scroll.prototype.__proto__ || Object.getPrototypeOf(Scroll.prototype), 'update', this).call(this, mutations.concat([])); // pass copy\n      if (mutations.length > 0) {\n        this.emitter.emit(_emitter2.default.events.SCROLL_UPDATE, source, mutations);\n      }\n    }\n  }]);\n\n  return Scroll;\n}(_parchment2.default.Scroll);\n\nScroll.blotName = 'scroll';\nScroll.className = 'ql-editor';\nScroll.tagName = 'DIV';\nScroll.defaultChild = 'block';\nScroll.allowedChildren = [_block2.default, _block.BlockEmbed, _container2.default];\n\nexports.default = Scroll;\n\n/***/ }),\n/* 23 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"]) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); } }; }();\n\nvar _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if (\"value\" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _parchment = __webpack_require__(0);\n\nvar _parchment2 = _interopRequireDefault(_parchment);\n\nvar _text = __webpack_require__(7);\n\nvar _text2 = _interopRequireDefault(_text);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar Cursor = function (_Parchment$Embed) {\n  _inherits(Cursor, _Parchment$Embed);\n\n  _createClass(Cursor, null, [{\n    key: 'value',\n    value: function value() {\n      return undefined;\n    }\n  }]);\n\n  function Cursor(domNode, selection) {\n    _classCallCheck(this, Cursor);\n\n    var _this = _possibleConstructorReturn(this, (Cursor.__proto__ || Object.getPrototypeOf(Cursor)).call(this, domNode));\n\n    _this.selection = selection;\n    _this.textNode = document.createTextNode(Cursor.CONTENTS);\n    _this.domNode.appendChild(_this.textNode);\n    _this._length = 0;\n    return _this;\n  }\n\n  _createClass(Cursor, [{\n    key: 'detach',\n    value: function detach() {\n      // super.detach() will also clear domNode.__blot\n      if (this.parent != null) this.parent.removeChild(this);\n    }\n  }, {\n    key: 'format',\n    value: function format(name, value) {\n      if (this._length !== 0) {\n        return _get(Cursor.prototype.__proto__ || Object.getPrototypeOf(Cursor.prototype), 'format', this).call(this, name, value);\n      }\n      var target = this,\n          index = 0;\n      while (target != null && target.statics.scope !== _parchment2.default.Scope.BLOCK_BLOT) {\n        index += target.offset(target.parent);\n        target = target.parent;\n      }\n      if (target != null) {\n        this._length = Cursor.CONTENTS.length;\n        target.optimize();\n        target.formatAt(index, Cursor.CONTENTS.length, name, value);\n        this._length = 0;\n      }\n    }\n  }, {\n    key: 'index',\n    value: function index(node, offset) {\n      if (node === this.textNode) return 0;\n      return _get(Cursor.prototype.__proto__ || Object.getPrototypeOf(Cursor.prototype), 'index', this).call(this, node, offset);\n    }\n  }, {\n    key: 'length',\n    value: function length() {\n      return this._length;\n    }\n  }, {\n    key: 'position',\n    value: function position() {\n      return [this.textNode, this.textNode.data.length];\n    }\n  }, {\n    key: 'remove',\n    value: function remove() {\n      _get(Cursor.prototype.__proto__ || Object.getPrototypeOf(Cursor.prototype), 'remove', this).call(this);\n      this.parent = null;\n    }\n  }, {\n    key: 'restore',\n    value: function restore() {\n      if (this.selection.composing || this.parent == null) return;\n      var textNode = this.textNode;\n      var range = this.selection.getNativeRange();\n      var restoreText = void 0,\n          start = void 0,\n          end = void 0;\n      if (range != null && range.start.node === textNode && range.end.node === textNode) {\n        var _ref = [textNode, range.start.offset, range.end.offset];\n        restoreText = _ref[0];\n        start = _ref[1];\n        end = _ref[2];\n      }\n      // Link format will insert text outside of anchor tag\n      while (this.domNode.lastChild != null && this.domNode.lastChild !== this.textNode) {\n        this.domNode.parentNode.insertBefore(this.domNode.lastChild, this.domNode);\n      }\n      if (this.textNode.data !== Cursor.CONTENTS) {\n        var text = this.textNode.data.split(Cursor.CONTENTS).join('');\n        if (this.next instanceof _text2.default) {\n          restoreText = this.next.domNode;\n          this.next.insertAt(0, text);\n          this.textNode.data = Cursor.CONTENTS;\n        } else {\n          this.textNode.data = text;\n          this.parent.insertBefore(_parchment2.default.create(this.textNode), this);\n          this.textNode = document.createTextNode(Cursor.CONTENTS);\n          this.domNode.appendChild(this.textNode);\n        }\n      }\n      this.remove();\n      if (start != null) {\n        var _map = [start, end].map(function (offset) {\n          return Math.max(0, Math.min(restoreText.data.length, offset - 1));\n        });\n\n        var _map2 = _slicedToArray(_map, 2);\n\n        start = _map2[0];\n        end = _map2[1];\n\n        return {\n          startNode: restoreText,\n          startOffset: start,\n          endNode: restoreText,\n          endOffset: end\n        };\n      }\n    }\n  }, {\n    key: 'update',\n    value: function update(mutations, context) {\n      var _this2 = this;\n\n      if (mutations.some(function (mutation) {\n        return mutation.type === 'characterData' && mutation.target === _this2.textNode;\n      })) {\n        var range = this.restore();\n        if (range) context.range = range;\n      }\n    }\n  }, {\n    key: 'value',\n    value: function value() {\n      return '';\n    }\n  }]);\n\n  return Cursor;\n}(_parchment2.default.Embed);\n\nCursor.blotName = 'cursor';\nCursor.className = 'ql-cursor';\nCursor.tagName = 'span';\nCursor.CONTENTS = '\\uFEFF'; // Zero width no break space\n\n\nexports.default = Cursor;\n\n/***/ }),\n/* 24 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _parchment = __webpack_require__(0);\n\nvar _parchment2 = _interopRequireDefault(_parchment);\n\nvar _block = __webpack_require__(4);\n\nvar _block2 = _interopRequireDefault(_block);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar Container = function (_Parchment$Container) {\n  _inherits(Container, _Parchment$Container);\n\n  function Container() {\n    _classCallCheck(this, Container);\n\n    return _possibleConstructorReturn(this, (Container.__proto__ || Object.getPrototypeOf(Container)).apply(this, arguments));\n  }\n\n  return Container;\n}(_parchment2.default.Container);\n\nContainer.allowedChildren = [_block2.default, _block.BlockEmbed, Container];\n\nexports.default = Container;\n\n/***/ }),\n/* 25 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.ColorStyle = exports.ColorClass = exports.ColorAttributor = undefined;\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if (\"value\" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };\n\nvar _parchment = __webpack_require__(0);\n\nvar _parchment2 = _interopRequireDefault(_parchment);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar ColorAttributor = function (_Parchment$Attributor) {\n  _inherits(ColorAttributor, _Parchment$Attributor);\n\n  function ColorAttributor() {\n    _classCallCheck(this, ColorAttributor);\n\n    return _possibleConstructorReturn(this, (ColorAttributor.__proto__ || Object.getPrototypeOf(ColorAttributor)).apply(this, arguments));\n  }\n\n  _createClass(ColorAttributor, [{\n    key: 'value',\n    value: function value(domNode) {\n      var value = _get(ColorAttributor.prototype.__proto__ || Object.getPrototypeOf(ColorAttributor.prototype), 'value', this).call(this, domNode);\n      if (!value.startsWith('rgb(')) return value;\n      value = value.replace(/^[^\\d]+/, '').replace(/[^\\d]+$/, '');\n      return '#' + value.split(',').map(function (component) {\n        return ('00' + parseInt(component).toString(16)).slice(-2);\n      }).join('');\n    }\n  }]);\n\n  return ColorAttributor;\n}(_parchment2.default.Attributor.Style);\n\nvar ColorClass = new _parchment2.default.Attributor.Class('color', 'ql-color', {\n  scope: _parchment2.default.Scope.INLINE\n});\nvar ColorStyle = new ColorAttributor('color', 'color', {\n  scope: _parchment2.default.Scope.INLINE\n});\n\nexports.ColorAttributor = ColorAttributor;\nexports.ColorClass = ColorClass;\nexports.ColorStyle = ColorStyle;\n\n/***/ }),\n/* 26 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.sanitize = exports.default = undefined;\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if (\"value\" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };\n\nvar _inline = __webpack_require__(6);\n\nvar _inline2 = _interopRequireDefault(_inline);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar Link = function (_Inline) {\n  _inherits(Link, _Inline);\n\n  function Link() {\n    _classCallCheck(this, Link);\n\n    return _possibleConstructorReturn(this, (Link.__proto__ || Object.getPrototypeOf(Link)).apply(this, arguments));\n  }\n\n  _createClass(Link, [{\n    key: 'format',\n    value: function format(name, value) {\n      if (name !== this.statics.blotName || !value) return _get(Link.prototype.__proto__ || Object.getPrototypeOf(Link.prototype), 'format', this).call(this, name, value);\n      value = this.constructor.sanitize(value);\n      this.domNode.setAttribute('href', value);\n    }\n  }], [{\n    key: 'create',\n    value: function create(value) {\n      var node = _get(Link.__proto__ || Object.getPrototypeOf(Link), 'create', this).call(this, value);\n      value = this.sanitize(value);\n      node.setAttribute('href', value);\n      node.setAttribute('target', '_blank');\n      return node;\n    }\n  }, {\n    key: 'formats',\n    value: function formats(domNode) {\n      return domNode.getAttribute('href');\n    }\n  }, {\n    key: 'sanitize',\n    value: function sanitize(url) {\n      return _sanitize(url, this.PROTOCOL_WHITELIST) ? url : this.SANITIZED_URL;\n    }\n  }]);\n\n  return Link;\n}(_inline2.default);\n\nLink.blotName = 'link';\nLink.tagName = 'A';\nLink.SANITIZED_URL = 'about:blank';\nLink.PROTOCOL_WHITELIST = ['http', 'https', 'mailto', 'tel'];\n\nfunction _sanitize(url, protocols) {\n  var anchor = document.createElement('a');\n  anchor.href = url;\n  var protocol = anchor.href.slice(0, anchor.href.indexOf(':'));\n  return protocols.indexOf(protocol) > -1;\n}\n\nexports.default = Link;\nexports.sanitize = _sanitize;\n\n/***/ }),\n/* 27 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _dropdown = __webpack_require__(107);\n\nvar _dropdown2 = _interopRequireDefault(_dropdown);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar Picker = function () {\n  function Picker(select) {\n    var _this = this;\n\n    _classCallCheck(this, Picker);\n\n    this.select = select;\n    this.container = document.createElement('span');\n    this.buildPicker();\n    this.select.style.display = 'none';\n    this.select.parentNode.insertBefore(this.container, this.select);\n    this.label.addEventListener('mousedown', function () {\n      _this.container.classList.toggle('ql-expanded');\n    });\n    this.select.addEventListener('change', this.update.bind(this));\n  }\n\n  _createClass(Picker, [{\n    key: 'buildItem',\n    value: function buildItem(option) {\n      var _this2 = this;\n\n      var item = document.createElement('span');\n      item.classList.add('ql-picker-item');\n      if (option.hasAttribute('value')) {\n        item.setAttribute('data-value', option.getAttribute('value'));\n      }\n      if (option.textContent) {\n        item.setAttribute('data-label', option.textContent);\n      }\n      item.addEventListener('click', function () {\n        _this2.selectItem(item, true);\n      });\n      return item;\n    }\n  }, {\n    key: 'buildLabel',\n    value: function buildLabel() {\n      var label = document.createElement('span');\n      label.classList.add('ql-picker-label');\n      label.innerHTML = _dropdown2.default;\n      this.container.appendChild(label);\n      return label;\n    }\n  }, {\n    key: 'buildOptions',\n    value: function buildOptions() {\n      var _this3 = this;\n\n      var options = document.createElement('span');\n      options.classList.add('ql-picker-options');\n      [].slice.call(this.select.options).forEach(function (option) {\n        var item = _this3.buildItem(option);\n        options.appendChild(item);\n        if (option.selected === true) {\n          _this3.selectItem(item);\n        }\n      });\n      this.container.appendChild(options);\n    }\n  }, {\n    key: 'buildPicker',\n    value: function buildPicker() {\n      var _this4 = this;\n\n      [].slice.call(this.select.attributes).forEach(function (item) {\n        _this4.container.setAttribute(item.name, item.value);\n      });\n      this.container.classList.add('ql-picker');\n      this.label = this.buildLabel();\n      this.buildOptions();\n    }\n  }, {\n    key: 'close',\n    value: function close() {\n      this.container.classList.remove('ql-expanded');\n    }\n  }, {\n    key: 'selectItem',\n    value: function selectItem(item) {\n      var trigger = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n\n      var selected = this.container.querySelector('.ql-selected');\n      if (item === selected) return;\n      if (selected != null) {\n        selected.classList.remove('ql-selected');\n      }\n      if (item == null) return;\n      item.classList.add('ql-selected');\n      this.select.selectedIndex = [].indexOf.call(item.parentNode.children, item);\n      if (item.hasAttribute('data-value')) {\n        this.label.setAttribute('data-value', item.getAttribute('data-value'));\n      } else {\n        this.label.removeAttribute('data-value');\n      }\n      if (item.hasAttribute('data-label')) {\n        this.label.setAttribute('data-label', item.getAttribute('data-label'));\n      } else {\n        this.label.removeAttribute('data-label');\n      }\n      if (trigger) {\n        if (typeof Event === 'function') {\n          this.select.dispatchEvent(new Event('change'));\n        } else if ((typeof Event === 'undefined' ? 'undefined' : _typeof(Event)) === 'object') {\n          // IE11\n          var event = document.createEvent('Event');\n          event.initEvent('change', true, true);\n          this.select.dispatchEvent(event);\n        }\n        this.close();\n      }\n    }\n  }, {\n    key: 'update',\n    value: function update() {\n      var option = void 0;\n      if (this.select.selectedIndex > -1) {\n        var item = this.container.querySelector('.ql-picker-options').children[this.select.selectedIndex];\n        option = this.select.options[this.select.selectedIndex];\n        this.selectItem(item);\n      } else {\n        this.selectItem(null);\n      }\n      var isActive = option != null && option !== this.select.querySelector('option[selected]');\n      this.label.classList.toggle('ql-active', isActive);\n    }\n  }]);\n\n  return Picker;\n}();\n\nexports.default = Picker;\n\n/***/ }),\n/* 28 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _parchment = __webpack_require__(0);\n\nvar _parchment2 = _interopRequireDefault(_parchment);\n\nvar _quill = __webpack_require__(5);\n\nvar _quill2 = _interopRequireDefault(_quill);\n\nvar _block = __webpack_require__(4);\n\nvar _block2 = _interopRequireDefault(_block);\n\nvar _break = __webpack_require__(16);\n\nvar _break2 = _interopRequireDefault(_break);\n\nvar _container = __webpack_require__(24);\n\nvar _container2 = _interopRequireDefault(_container);\n\nvar _cursor = __webpack_require__(23);\n\nvar _cursor2 = _interopRequireDefault(_cursor);\n\nvar _embed = __webpack_require__(35);\n\nvar _embed2 = _interopRequireDefault(_embed);\n\nvar _inline = __webpack_require__(6);\n\nvar _inline2 = _interopRequireDefault(_inline);\n\nvar _scroll = __webpack_require__(22);\n\nvar _scroll2 = _interopRequireDefault(_scroll);\n\nvar _text = __webpack_require__(7);\n\nvar _text2 = _interopRequireDefault(_text);\n\nvar _clipboard = __webpack_require__(55);\n\nvar _clipboard2 = _interopRequireDefault(_clipboard);\n\nvar _history = __webpack_require__(42);\n\nvar _history2 = _interopRequireDefault(_history);\n\nvar _keyboard = __webpack_require__(34);\n\nvar _keyboard2 = _interopRequireDefault(_keyboard);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n_quill2.default.register({\n  'blots/block': _block2.default,\n  'blots/block/embed': _block.BlockEmbed,\n  'blots/break': _break2.default,\n  'blots/container': _container2.default,\n  'blots/cursor': _cursor2.default,\n  'blots/embed': _embed2.default,\n  'blots/inline': _inline2.default,\n  'blots/scroll': _scroll2.default,\n  'blots/text': _text2.default,\n\n  'modules/clipboard': _clipboard2.default,\n  'modules/history': _history2.default,\n  'modules/keyboard': _keyboard2.default\n});\n\n_parchment2.default.register(_block2.default, _break2.default, _cursor2.default, _inline2.default, _scroll2.default, _text2.default);\n\nexports.default = _quill2.default;\n\n/***/ }),\n/* 29 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Registry = __webpack_require__(1);\nvar ShadowBlot = /** @class */ (function () {\n    function ShadowBlot(domNode) {\n        this.domNode = domNode;\n        // @ts-ignore\n        this.domNode[Registry.DATA_KEY] = { blot: this };\n    }\n    Object.defineProperty(ShadowBlot.prototype, \"statics\", {\n        // Hack for accessing inherited static methods\n        get: function () {\n            return this.constructor;\n        },\n        enumerable: true,\n        configurable: true\n    });\n    ShadowBlot.create = function (value) {\n        if (this.tagName == null) {\n            throw new Registry.ParchmentError('Blot definition missing tagName');\n        }\n        var node;\n        if (Array.isArray(this.tagName)) {\n            if (typeof value === 'string') {\n                value = value.toUpperCase();\n                if (parseInt(value).toString() === value) {\n                    value = parseInt(value);\n                }\n            }\n            if (typeof value === 'number') {\n                node = document.createElement(this.tagName[value - 1]);\n            }\n            else if (this.tagName.indexOf(value) > -1) {\n                node = document.createElement(value);\n            }\n            else {\n                node = document.createElement(this.tagName[0]);\n            }\n        }\n        else {\n            node = document.createElement(this.tagName);\n        }\n        if (this.className) {\n            node.classList.add(this.className);\n        }\n        return node;\n    };\n    ShadowBlot.prototype.attach = function () {\n        if (this.parent != null) {\n            this.scroll = this.parent.scroll;\n        }\n    };\n    ShadowBlot.prototype.clone = function () {\n        var domNode = this.domNode.cloneNode(false);\n        return Registry.create(domNode);\n    };\n    ShadowBlot.prototype.detach = function () {\n        if (this.parent != null)\n            this.parent.removeChild(this);\n        // @ts-ignore\n        delete this.domNode[Registry.DATA_KEY];\n    };\n    ShadowBlot.prototype.deleteAt = function (index, length) {\n        var blot = this.isolate(index, length);\n        blot.remove();\n    };\n    ShadowBlot.prototype.formatAt = function (index, length, name, value) {\n        var blot = this.isolate(index, length);\n        if (Registry.query(name, Registry.Scope.BLOT) != null && value) {\n            blot.wrap(name, value);\n        }\n        else if (Registry.query(name, Registry.Scope.ATTRIBUTE) != null) {\n            var parent = Registry.create(this.statics.scope);\n            blot.wrap(parent);\n            parent.format(name, value);\n        }\n    };\n    ShadowBlot.prototype.insertAt = function (index, value, def) {\n        var blot = def == null ? Registry.create('text', value) : Registry.create(value, def);\n        var ref = this.split(index);\n        this.parent.insertBefore(blot, ref);\n    };\n    ShadowBlot.prototype.insertInto = function (parentBlot, refBlot) {\n        if (refBlot === void 0) { refBlot = null; }\n        if (this.parent != null) {\n            this.parent.children.remove(this);\n        }\n        var refDomNode = null;\n        parentBlot.children.insertBefore(this, refBlot);\n        if (refBlot != null) {\n            refDomNode = refBlot.domNode;\n        }\n        if (this.next == null || this.domNode.nextSibling != refDomNode) {\n            parentBlot.domNode.insertBefore(this.domNode, refDomNode);\n        }\n        this.parent = parentBlot;\n        this.attach();\n    };\n    ShadowBlot.prototype.isolate = function (index, length) {\n        var target = this.split(index);\n        target.split(length);\n        return target;\n    };\n    ShadowBlot.prototype.length = function () {\n        return 1;\n    };\n    ShadowBlot.prototype.offset = function (root) {\n        if (root === void 0) { root = this.parent; }\n        if (this.parent == null || this == root)\n            return 0;\n        return this.parent.children.offset(this) + this.parent.offset(root);\n    };\n    ShadowBlot.prototype.optimize = function (context) {\n        // TODO clean up once we use WeakMap\n        // @ts-ignore\n        if (this.domNode[Registry.DATA_KEY] != null) {\n            // @ts-ignore\n            delete this.domNode[Registry.DATA_KEY].mutations;\n        }\n    };\n    ShadowBlot.prototype.remove = function () {\n        if (this.domNode.parentNode != null) {\n            this.domNode.parentNode.removeChild(this.domNode);\n        }\n        this.detach();\n    };\n    ShadowBlot.prototype.replace = function (target) {\n        if (target.parent == null)\n            return;\n        target.parent.insertBefore(this, target.next);\n        target.remove();\n    };\n    ShadowBlot.prototype.replaceWith = function (name, value) {\n        var replacement = typeof name === 'string' ? Registry.create(name, value) : name;\n        replacement.replace(this);\n        return replacement;\n    };\n    ShadowBlot.prototype.split = function (index, force) {\n        return index === 0 ? this : this.next;\n    };\n    ShadowBlot.prototype.update = function (mutations, context) {\n        // Nothing to do by default\n    };\n    ShadowBlot.prototype.wrap = function (name, value) {\n        var wrapper = typeof name === 'string' ? Registry.create(name, value) : name;\n        if (this.parent != null) {\n            this.parent.insertBefore(wrapper, this.next);\n        }\n        wrapper.appendChild(this);\n        return wrapper;\n    };\n    ShadowBlot.blotName = 'abstract';\n    return ShadowBlot;\n}());\nexports.default = ShadowBlot;\n\n\n/***/ }),\n/* 30 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar attributor_1 = __webpack_require__(12);\nvar class_1 = __webpack_require__(31);\nvar style_1 = __webpack_require__(32);\nvar Registry = __webpack_require__(1);\nvar AttributorStore = /** @class */ (function () {\n    function AttributorStore(domNode) {\n        this.attributes = {};\n        this.domNode = domNode;\n        this.build();\n    }\n    AttributorStore.prototype.attribute = function (attribute, value) {\n        // verb\n        if (value) {\n            if (attribute.add(this.domNode, value)) {\n                if (attribute.value(this.domNode) != null) {\n                    this.attributes[attribute.attrName] = attribute;\n                }\n                else {\n                    delete this.attributes[attribute.attrName];\n                }\n            }\n        }\n        else {\n            attribute.remove(this.domNode);\n            delete this.attributes[attribute.attrName];\n        }\n    };\n    AttributorStore.prototype.build = function () {\n        var _this = this;\n        this.attributes = {};\n        var attributes = attributor_1.default.keys(this.domNode);\n        var classes = class_1.default.keys(this.domNode);\n        var styles = style_1.default.keys(this.domNode);\n        attributes\n            .concat(classes)\n            .concat(styles)\n            .forEach(function (name) {\n            var attr = Registry.query(name, Registry.Scope.ATTRIBUTE);\n            if (attr instanceof attributor_1.default) {\n                _this.attributes[attr.attrName] = attr;\n            }\n        });\n    };\n    AttributorStore.prototype.copy = function (target) {\n        var _this = this;\n        Object.keys(this.attributes).forEach(function (key) {\n            var value = _this.attributes[key].value(_this.domNode);\n            target.format(key, value);\n        });\n    };\n    AttributorStore.prototype.move = function (target) {\n        var _this = this;\n        this.copy(target);\n        Object.keys(this.attributes).forEach(function (key) {\n            _this.attributes[key].remove(_this.domNode);\n        });\n        this.attributes = {};\n    };\n    AttributorStore.prototype.values = function () {\n        var _this = this;\n        return Object.keys(this.attributes).reduce(function (attributes, name) {\n            attributes[name] = _this.attributes[name].value(_this.domNode);\n            return attributes;\n        }, {});\n    };\n    return AttributorStore;\n}());\nexports.default = AttributorStore;\n\n\n/***/ }),\n/* 31 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar __extends = (this && this.__extends) || (function () {\n    var extendStatics = Object.setPrototypeOf ||\n        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar attributor_1 = __webpack_require__(12);\nfunction match(node, prefix) {\n    var className = node.getAttribute('class') || '';\n    return className.split(/\\s+/).filter(function (name) {\n        return name.indexOf(prefix + \"-\") === 0;\n    });\n}\nvar ClassAttributor = /** @class */ (function (_super) {\n    __extends(ClassAttributor, _super);\n    function ClassAttributor() {\n        return _super !== null && _super.apply(this, arguments) || this;\n    }\n    ClassAttributor.keys = function (node) {\n        return (node.getAttribute('class') || '').split(/\\s+/).map(function (name) {\n            return name\n                .split('-')\n                .slice(0, -1)\n                .join('-');\n        });\n    };\n    ClassAttributor.prototype.add = function (node, value) {\n        if (!this.canAdd(node, value))\n            return false;\n        this.remove(node);\n        node.classList.add(this.keyName + \"-\" + value);\n        return true;\n    };\n    ClassAttributor.prototype.remove = function (node) {\n        var matches = match(node, this.keyName);\n        matches.forEach(function (name) {\n            node.classList.remove(name);\n        });\n        if (node.classList.length === 0) {\n            node.removeAttribute('class');\n        }\n    };\n    ClassAttributor.prototype.value = function (node) {\n        var result = match(node, this.keyName)[0] || '';\n        var value = result.slice(this.keyName.length + 1); // +1 for hyphen\n        return this.canAdd(node, value) ? value : '';\n    };\n    return ClassAttributor;\n}(attributor_1.default));\nexports.default = ClassAttributor;\n\n\n/***/ }),\n/* 32 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar __extends = (this && this.__extends) || (function () {\n    var extendStatics = Object.setPrototypeOf ||\n        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar attributor_1 = __webpack_require__(12);\nfunction camelize(name) {\n    var parts = name.split('-');\n    var rest = parts\n        .slice(1)\n        .map(function (part) {\n        return part[0].toUpperCase() + part.slice(1);\n    })\n        .join('');\n    return parts[0] + rest;\n}\nvar StyleAttributor = /** @class */ (function (_super) {\n    __extends(StyleAttributor, _super);\n    function StyleAttributor() {\n        return _super !== null && _super.apply(this, arguments) || this;\n    }\n    StyleAttributor.keys = function (node) {\n        return (node.getAttribute('style') || '').split(';').map(function (value) {\n            var arr = value.split(':');\n            return arr[0].trim();\n        });\n    };\n    StyleAttributor.prototype.add = function (node, value) {\n        if (!this.canAdd(node, value))\n            return false;\n        // @ts-ignore\n        node.style[camelize(this.keyName)] = value;\n        return true;\n    };\n    StyleAttributor.prototype.remove = function (node) {\n        // @ts-ignore\n        node.style[camelize(this.keyName)] = '';\n        if (!node.getAttribute('style')) {\n            node.removeAttribute('style');\n        }\n    };\n    StyleAttributor.prototype.value = function (node) {\n        // @ts-ignore\n        var value = node.style[camelize(this.keyName)];\n        return this.canAdd(node, value) ? value : '';\n    };\n    return StyleAttributor;\n}(attributor_1.default));\nexports.default = StyleAttributor;\n\n\n/***/ }),\n/* 33 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar Theme = function () {\n  function Theme(quill, options) {\n    _classCallCheck(this, Theme);\n\n    this.quill = quill;\n    this.options = options;\n    this.modules = {};\n  }\n\n  _createClass(Theme, [{\n    key: 'init',\n    value: function init() {\n      var _this = this;\n\n      Object.keys(this.options.modules).forEach(function (name) {\n        if (_this.modules[name] == null) {\n          _this.addModule(name);\n        }\n      });\n    }\n  }, {\n    key: 'addModule',\n    value: function addModule(name) {\n      var moduleClass = this.quill.constructor.import('modules/' + name);\n      this.modules[name] = new moduleClass(this.quill, this.options.modules[name] || {});\n      return this.modules[name];\n    }\n  }]);\n\n  return Theme;\n}();\n\nTheme.DEFAULTS = {\n  modules: {}\n};\nTheme.themes = {\n  'default': Theme\n};\n\nexports.default = Theme;\n\n/***/ }),\n/* 34 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.SHORTKEY = exports.default = undefined;\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nvar _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"]) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); } }; }();\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _clone = __webpack_require__(21);\n\nvar _clone2 = _interopRequireDefault(_clone);\n\nvar _deepEqual = __webpack_require__(11);\n\nvar _deepEqual2 = _interopRequireDefault(_deepEqual);\n\nvar _extend = __webpack_require__(3);\n\nvar _extend2 = _interopRequireDefault(_extend);\n\nvar _quillDelta = __webpack_require__(2);\n\nvar _quillDelta2 = _interopRequireDefault(_quillDelta);\n\nvar _op = __webpack_require__(20);\n\nvar _op2 = _interopRequireDefault(_op);\n\nvar _parchment = __webpack_require__(0);\n\nvar _parchment2 = _interopRequireDefault(_parchment);\n\nvar _quill = __webpack_require__(5);\n\nvar _quill2 = _interopRequireDefault(_quill);\n\nvar _logger = __webpack_require__(10);\n\nvar _logger2 = _interopRequireDefault(_logger);\n\nvar _module = __webpack_require__(9);\n\nvar _module2 = _interopRequireDefault(_module);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar debug = (0, _logger2.default)('quill:keyboard');\n\nvar SHORTKEY = /Mac/i.test(navigator.platform) ? 'metaKey' : 'ctrlKey';\n\nvar Keyboard = function (_Module) {\n  _inherits(Keyboard, _Module);\n\n  _createClass(Keyboard, null, [{\n    key: 'match',\n    value: function match(evt, binding) {\n      binding = normalize(binding);\n      if (['altKey', 'ctrlKey', 'metaKey', 'shiftKey'].some(function (key) {\n        return !!binding[key] !== evt[key] && binding[key] !== null;\n      })) {\n        return false;\n      }\n      return binding.key === (evt.which || evt.keyCode);\n    }\n  }]);\n\n  function Keyboard(quill, options) {\n    _classCallCheck(this, Keyboard);\n\n    var _this = _possibleConstructorReturn(this, (Keyboard.__proto__ || Object.getPrototypeOf(Keyboard)).call(this, quill, options));\n\n    _this.bindings = {};\n    Object.keys(_this.options.bindings).forEach(function (name) {\n      if (name === 'list autofill' && quill.scroll.whitelist != null && !quill.scroll.whitelist['list']) {\n        return;\n      }\n      if (_this.options.bindings[name]) {\n        _this.addBinding(_this.options.bindings[name]);\n      }\n    });\n    _this.addBinding({ key: Keyboard.keys.ENTER, shiftKey: null }, handleEnter);\n    _this.addBinding({ key: Keyboard.keys.ENTER, metaKey: null, ctrlKey: null, altKey: null }, function () {});\n    if (/Firefox/i.test(navigator.userAgent)) {\n      // Need to handle delete and backspace for Firefox in the general case #1171\n      _this.addBinding({ key: Keyboard.keys.BACKSPACE }, { collapsed: true }, handleBackspace);\n      _this.addBinding({ key: Keyboard.keys.DELETE }, { collapsed: true }, handleDelete);\n    } else {\n      _this.addBinding({ key: Keyboard.keys.BACKSPACE }, { collapsed: true, prefix: /^.?$/ }, handleBackspace);\n      _this.addBinding({ key: Keyboard.keys.DELETE }, { collapsed: true, suffix: /^.?$/ }, handleDelete);\n    }\n    _this.addBinding({ key: Keyboard.keys.BACKSPACE }, { collapsed: false }, handleDeleteRange);\n    _this.addBinding({ key: Keyboard.keys.DELETE }, { collapsed: false }, handleDeleteRange);\n    _this.addBinding({ key: Keyboard.keys.BACKSPACE, altKey: null, ctrlKey: null, metaKey: null, shiftKey: null }, { collapsed: true, offset: 0 }, handleBackspace);\n    _this.listen();\n    return _this;\n  }\n\n  _createClass(Keyboard, [{\n    key: 'addBinding',\n    value: function addBinding(key) {\n      var context = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n      var handler = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n\n      var binding = normalize(key);\n      if (binding == null || binding.key == null) {\n        return debug.warn('Attempted to add invalid keyboard binding', binding);\n      }\n      if (typeof context === 'function') {\n        context = { handler: context };\n      }\n      if (typeof handler === 'function') {\n        handler = { handler: handler };\n      }\n      binding = (0, _extend2.default)(binding, context, handler);\n      this.bindings[binding.key] = this.bindings[binding.key] || [];\n      this.bindings[binding.key].push(binding);\n    }\n  }, {\n    key: 'listen',\n    value: function listen() {\n      var _this2 = this;\n\n      this.quill.root.addEventListener('keydown', function (evt) {\n        if (evt.defaultPrevented) return;\n        var which = evt.which || evt.keyCode;\n        var bindings = (_this2.bindings[which] || []).filter(function (binding) {\n          return Keyboard.match(evt, binding);\n        });\n        if (bindings.length === 0) return;\n        var range = _this2.quill.getSelection();\n        if (range == null || !_this2.quill.hasFocus()) return;\n\n        var _quill$getLine = _this2.quill.getLine(range.index),\n            _quill$getLine2 = _slicedToArray(_quill$getLine, 2),\n            line = _quill$getLine2[0],\n            offset = _quill$getLine2[1];\n\n        var _quill$getLeaf = _this2.quill.getLeaf(range.index),\n            _quill$getLeaf2 = _slicedToArray(_quill$getLeaf, 2),\n            leafStart = _quill$getLeaf2[0],\n            offsetStart = _quill$getLeaf2[1];\n\n        var _ref = range.length === 0 ? [leafStart, offsetStart] : _this2.quill.getLeaf(range.index + range.length),\n            _ref2 = _slicedToArray(_ref, 2),\n            leafEnd = _ref2[0],\n            offsetEnd = _ref2[1];\n\n        var prefixText = leafStart instanceof _parchment2.default.Text ? leafStart.value().slice(0, offsetStart) : '';\n        var suffixText = leafEnd instanceof _parchment2.default.Text ? leafEnd.value().slice(offsetEnd) : '';\n        var curContext = {\n          collapsed: range.length === 0,\n          empty: range.length === 0 && line.length() <= 1,\n          format: _this2.quill.getFormat(range),\n          offset: offset,\n          prefix: prefixText,\n          suffix: suffixText\n        };\n        var prevented = bindings.some(function (binding) {\n          if (binding.collapsed != null && binding.collapsed !== curContext.collapsed) return false;\n          if (binding.empty != null && binding.empty !== curContext.empty) return false;\n          if (binding.offset != null && binding.offset !== curContext.offset) return false;\n          if (Array.isArray(binding.format)) {\n            // any format is present\n            if (binding.format.every(function (name) {\n              return curContext.format[name] == null;\n            })) {\n              return false;\n            }\n          } else if (_typeof(binding.format) === 'object') {\n            // all formats must match\n            if (!Object.keys(binding.format).every(function (name) {\n              if (binding.format[name] === true) return curContext.format[name] != null;\n              if (binding.format[name] === false) return curContext.format[name] == null;\n              return (0, _deepEqual2.default)(binding.format[name], curContext.format[name]);\n            })) {\n              return false;\n            }\n          }\n          if (binding.prefix != null && !binding.prefix.test(curContext.prefix)) return false;\n          if (binding.suffix != null && !binding.suffix.test(curContext.suffix)) return false;\n          return binding.handler.call(_this2, range, curContext) !== true;\n        });\n        if (prevented) {\n          evt.preventDefault();\n        }\n      });\n    }\n  }]);\n\n  return Keyboard;\n}(_module2.default);\n\nKeyboard.keys = {\n  BACKSPACE: 8,\n  TAB: 9,\n  ENTER: 13,\n  ESCAPE: 27,\n  LEFT: 37,\n  UP: 38,\n  RIGHT: 39,\n  DOWN: 40,\n  DELETE: 46\n};\n\nKeyboard.DEFAULTS = {\n  bindings: {\n    'bold': makeFormatHandler('bold'),\n    'italic': makeFormatHandler('italic'),\n    'underline': makeFormatHandler('underline'),\n    'indent': {\n      // highlight tab or tab at beginning of list, indent or blockquote\n      key: Keyboard.keys.TAB,\n      format: ['blockquote', 'indent', 'list'],\n      handler: function handler(range, context) {\n        if (context.collapsed && context.offset !== 0) return true;\n        this.quill.format('indent', '+1', _quill2.default.sources.USER);\n      }\n    },\n    'outdent': {\n      key: Keyboard.keys.TAB,\n      shiftKey: true,\n      format: ['blockquote', 'indent', 'list'],\n      // highlight tab or tab at beginning of list, indent or blockquote\n      handler: function handler(range, context) {\n        if (context.collapsed && context.offset !== 0) return true;\n        this.quill.format('indent', '-1', _quill2.default.sources.USER);\n      }\n    },\n    'outdent backspace': {\n      key: Keyboard.keys.BACKSPACE,\n      collapsed: true,\n      shiftKey: null,\n      metaKey: null,\n      ctrlKey: null,\n      altKey: null,\n      format: ['indent', 'list'],\n      offset: 0,\n      handler: function handler(range, context) {\n        if (context.format.indent != null) {\n          this.quill.format('indent', '-1', _quill2.default.sources.USER);\n        } else if (context.format.list != null) {\n          this.quill.format('list', false, _quill2.default.sources.USER);\n        }\n      }\n    },\n    'indent code-block': makeCodeBlockHandler(true),\n    'outdent code-block': makeCodeBlockHandler(false),\n    'remove tab': {\n      key: Keyboard.keys.TAB,\n      shiftKey: true,\n      collapsed: true,\n      prefix: /\\t$/,\n      handler: function handler(range) {\n        this.quill.deleteText(range.index - 1, 1, _quill2.default.sources.USER);\n      }\n    },\n    'tab': {\n      key: Keyboard.keys.TAB,\n      handler: function handler(range) {\n        this.quill.history.cutoff();\n        var delta = new _quillDelta2.default().retain(range.index).delete(range.length).insert('\\t');\n        this.quill.updateContents(delta, _quill2.default.sources.USER);\n        this.quill.history.cutoff();\n        this.quill.setSelection(range.index + 1, _quill2.default.sources.SILENT);\n      }\n    },\n    'list empty enter': {\n      key: Keyboard.keys.ENTER,\n      collapsed: true,\n      format: ['list'],\n      empty: true,\n      handler: function handler(range, context) {\n        this.quill.format('list', false, _quill2.default.sources.USER);\n        if (context.format.indent) {\n          this.quill.format('indent', false, _quill2.default.sources.USER);\n        }\n      }\n    },\n    'checklist enter': {\n      key: Keyboard.keys.ENTER,\n      collapsed: true,\n      format: { list: 'checked' },\n      handler: function handler(range) {\n        var _quill$getLine3 = this.quill.getLine(range.index),\n            _quill$getLine4 = _slicedToArray(_quill$getLine3, 2),\n            line = _quill$getLine4[0],\n            offset = _quill$getLine4[1];\n\n        var formats = (0, _extend2.default)({}, line.formats(), { list: 'checked' });\n        var delta = new _quillDelta2.default().retain(range.index).insert('\\n', formats).retain(line.length() - offset - 1).retain(1, { list: 'unchecked' });\n        this.quill.updateContents(delta, _quill2.default.sources.USER);\n        this.quill.setSelection(range.index + 1, _quill2.default.sources.SILENT);\n        this.quill.scrollIntoView();\n      }\n    },\n    'header enter': {\n      key: Keyboard.keys.ENTER,\n      collapsed: true,\n      format: ['header'],\n      suffix: /^$/,\n      handler: function handler(range, context) {\n        var _quill$getLine5 = this.quill.getLine(range.index),\n            _quill$getLine6 = _slicedToArray(_quill$getLine5, 2),\n            line = _quill$getLine6[0],\n            offset = _quill$getLine6[1];\n\n        var delta = new _quillDelta2.default().retain(range.index).insert('\\n', context.format).retain(line.length() - offset - 1).retain(1, { header: null });\n        this.quill.updateContents(delta, _quill2.default.sources.USER);\n        this.quill.setSelection(range.index + 1, _quill2.default.sources.SILENT);\n        this.quill.scrollIntoView();\n      }\n    },\n    'list autofill': {\n      key: ' ',\n      collapsed: true,\n      format: { list: false },\n      prefix: /^\\s*?(\\d+\\.|-|\\*|\\[ ?\\]|\\[x\\])$/,\n      handler: function handler(range, context) {\n        var length = context.prefix.length;\n\n        var _quill$getLine7 = this.quill.getLine(range.index),\n            _quill$getLine8 = _slicedToArray(_quill$getLine7, 2),\n            line = _quill$getLine8[0],\n            offset = _quill$getLine8[1];\n\n        if (offset > length) return true;\n        var value = void 0;\n        switch (context.prefix.trim()) {\n          case '[]':case '[ ]':\n            value = 'unchecked';\n            break;\n          case '[x]':\n            value = 'checked';\n            break;\n          case '-':case '*':\n            value = 'bullet';\n            break;\n          default:\n            value = 'ordered';\n        }\n        this.quill.insertText(range.index, ' ', _quill2.default.sources.USER);\n        this.quill.history.cutoff();\n        var delta = new _quillDelta2.default().retain(range.index - offset).delete(length + 1).retain(line.length() - 2 - offset).retain(1, { list: value });\n        this.quill.updateContents(delta, _quill2.default.sources.USER);\n        this.quill.history.cutoff();\n        this.quill.setSelection(range.index - length, _quill2.default.sources.SILENT);\n      }\n    },\n    'code exit': {\n      key: Keyboard.keys.ENTER,\n      collapsed: true,\n      format: ['code-block'],\n      prefix: /\\n\\n$/,\n      suffix: /^\\s+$/,\n      handler: function handler(range) {\n        var _quill$getLine9 = this.quill.getLine(range.index),\n            _quill$getLine10 = _slicedToArray(_quill$getLine9, 2),\n            line = _quill$getLine10[0],\n            offset = _quill$getLine10[1];\n\n        var delta = new _quillDelta2.default().retain(range.index + line.length() - offset - 2).retain(1, { 'code-block': null }).delete(1);\n        this.quill.updateContents(delta, _quill2.default.sources.USER);\n      }\n    },\n    'embed left': makeEmbedArrowHandler(Keyboard.keys.LEFT, false),\n    'embed left shift': makeEmbedArrowHandler(Keyboard.keys.LEFT, true),\n    'embed right': makeEmbedArrowHandler(Keyboard.keys.RIGHT, false),\n    'embed right shift': makeEmbedArrowHandler(Keyboard.keys.RIGHT, true)\n  }\n};\n\nfunction makeEmbedArrowHandler(key, shiftKey) {\n  var _ref3;\n\n  var where = key === Keyboard.keys.LEFT ? 'prefix' : 'suffix';\n  return _ref3 = {\n    key: key,\n    shiftKey: shiftKey,\n    altKey: null\n  }, _defineProperty(_ref3, where, /^$/), _defineProperty(_ref3, 'handler', function handler(range) {\n    var index = range.index;\n    if (key === Keyboard.keys.RIGHT) {\n      index += range.length + 1;\n    }\n\n    var _quill$getLeaf3 = this.quill.getLeaf(index),\n        _quill$getLeaf4 = _slicedToArray(_quill$getLeaf3, 1),\n        leaf = _quill$getLeaf4[0];\n\n    if (!(leaf instanceof _parchment2.default.Embed)) return true;\n    if (key === Keyboard.keys.LEFT) {\n      if (shiftKey) {\n        this.quill.setSelection(range.index - 1, range.length + 1, _quill2.default.sources.USER);\n      } else {\n        this.quill.setSelection(range.index - 1, _quill2.default.sources.USER);\n      }\n    } else {\n      if (shiftKey) {\n        this.quill.setSelection(range.index, range.length + 1, _quill2.default.sources.USER);\n      } else {\n        this.quill.setSelection(range.index + range.length + 1, _quill2.default.sources.USER);\n      }\n    }\n    return false;\n  }), _ref3;\n}\n\nfunction handleBackspace(range, context) {\n  if (range.index === 0 || this.quill.getLength() <= 1) return;\n\n  var _quill$getLine11 = this.quill.getLine(range.index),\n      _quill$getLine12 = _slicedToArray(_quill$getLine11, 1),\n      line = _quill$getLine12[0];\n\n  var formats = {};\n  if (context.offset === 0) {\n    var _quill$getLine13 = this.quill.getLine(range.index - 1),\n        _quill$getLine14 = _slicedToArray(_quill$getLine13, 1),\n        prev = _quill$getLine14[0];\n\n    if (prev != null && prev.length() > 1) {\n      var curFormats = line.formats();\n      var prevFormats = this.quill.getFormat(range.index - 1, 1);\n      formats = _op2.default.attributes.diff(curFormats, prevFormats) || {};\n    }\n  }\n  // Check for astral symbols\n  var length = /[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]$/.test(context.prefix) ? 2 : 1;\n  this.quill.deleteText(range.index - length, length, _quill2.default.sources.USER);\n  if (Object.keys(formats).length > 0) {\n    this.quill.formatLine(range.index - length, length, formats, _quill2.default.sources.USER);\n  }\n  this.quill.focus();\n}\n\nfunction handleDelete(range, context) {\n  // Check for astral symbols\n  var length = /^[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]/.test(context.suffix) ? 2 : 1;\n  if (range.index >= this.quill.getLength() - length) return;\n  var formats = {},\n      nextLength = 0;\n\n  var _quill$getLine15 = this.quill.getLine(range.index),\n      _quill$getLine16 = _slicedToArray(_quill$getLine15, 1),\n      line = _quill$getLine16[0];\n\n  if (context.offset >= line.length() - 1) {\n    var _quill$getLine17 = this.quill.getLine(range.index + 1),\n        _quill$getLine18 = _slicedToArray(_quill$getLine17, 1),\n        next = _quill$getLine18[0];\n\n    if (next) {\n      var curFormats = line.formats();\n      var nextFormats = this.quill.getFormat(range.index, 1);\n      formats = _op2.default.attributes.diff(curFormats, nextFormats) || {};\n      nextLength = next.length();\n    }\n  }\n  this.quill.deleteText(range.index, length, _quill2.default.sources.USER);\n  if (Object.keys(formats).length > 0) {\n    this.quill.formatLine(range.index + nextLength - 1, length, formats, _quill2.default.sources.USER);\n  }\n}\n\nfunction handleDeleteRange(range) {\n  var lines = this.quill.getLines(range);\n  var formats = {};\n  if (lines.length > 1) {\n    var firstFormats = lines[0].formats();\n    var lastFormats = lines[lines.length - 1].formats();\n    formats = _op2.default.attributes.diff(lastFormats, firstFormats) || {};\n  }\n  this.quill.deleteText(range, _quill2.default.sources.USER);\n  if (Object.keys(formats).length > 0) {\n    this.quill.formatLine(range.index, 1, formats, _quill2.default.sources.USER);\n  }\n  this.quill.setSelection(range.index, _quill2.default.sources.SILENT);\n  this.quill.focus();\n}\n\nfunction handleEnter(range, context) {\n  var _this3 = this;\n\n  if (range.length > 0) {\n    this.quill.scroll.deleteAt(range.index, range.length); // So we do not trigger text-change\n  }\n  var lineFormats = Object.keys(context.format).reduce(function (lineFormats, format) {\n    if (_parchment2.default.query(format, _parchment2.default.Scope.BLOCK) && !Array.isArray(context.format[format])) {\n      lineFormats[format] = context.format[format];\n    }\n    return lineFormats;\n  }, {});\n  this.quill.insertText(range.index, '\\n', lineFormats, _quill2.default.sources.USER);\n  // Earlier scroll.deleteAt might have messed up our selection,\n  // so insertText's built in selection preservation is not reliable\n  this.quill.setSelection(range.index + 1, _quill2.default.sources.SILENT);\n  this.quill.focus();\n  Object.keys(context.format).forEach(function (name) {\n    if (lineFormats[name] != null) return;\n    if (Array.isArray(context.format[name])) return;\n    if (name === 'link') return;\n    _this3.quill.format(name, context.format[name], _quill2.default.sources.USER);\n  });\n}\n\nfunction makeCodeBlockHandler(indent) {\n  return {\n    key: Keyboard.keys.TAB,\n    shiftKey: !indent,\n    format: { 'code-block': true },\n    handler: function handler(range) {\n      var CodeBlock = _parchment2.default.query('code-block');\n      var index = range.index,\n          length = range.length;\n\n      var _quill$scroll$descend = this.quill.scroll.descendant(CodeBlock, index),\n          _quill$scroll$descend2 = _slicedToArray(_quill$scroll$descend, 2),\n          block = _quill$scroll$descend2[0],\n          offset = _quill$scroll$descend2[1];\n\n      if (block == null) return;\n      var scrollIndex = this.quill.getIndex(block);\n      var start = block.newlineIndex(offset, true) + 1;\n      var end = block.newlineIndex(scrollIndex + offset + length);\n      var lines = block.domNode.textContent.slice(start, end).split('\\n');\n      offset = 0;\n      lines.forEach(function (line, i) {\n        if (indent) {\n          block.insertAt(start + offset, CodeBlock.TAB);\n          offset += CodeBlock.TAB.length;\n          if (i === 0) {\n            index += CodeBlock.TAB.length;\n          } else {\n            length += CodeBlock.TAB.length;\n          }\n        } else if (line.startsWith(CodeBlock.TAB)) {\n          block.deleteAt(start + offset, CodeBlock.TAB.length);\n          offset -= CodeBlock.TAB.length;\n          if (i === 0) {\n            index -= CodeBlock.TAB.length;\n          } else {\n            length -= CodeBlock.TAB.length;\n          }\n        }\n        offset += line.length + 1;\n      });\n      this.quill.update(_quill2.default.sources.USER);\n      this.quill.setSelection(index, length, _quill2.default.sources.SILENT);\n    }\n  };\n}\n\nfunction makeFormatHandler(format) {\n  return {\n    key: format[0].toUpperCase(),\n    shortKey: true,\n    handler: function handler(range, context) {\n      this.quill.format(format, !context.format[format], _quill2.default.sources.USER);\n    }\n  };\n}\n\nfunction normalize(binding) {\n  if (typeof binding === 'string' || typeof binding === 'number') {\n    return normalize({ key: binding });\n  }\n  if ((typeof binding === 'undefined' ? 'undefined' : _typeof(binding)) === 'object') {\n    binding = (0, _clone2.default)(binding, false);\n  }\n  if (typeof binding.key === 'string') {\n    if (Keyboard.keys[binding.key.toUpperCase()] != null) {\n      binding.key = Keyboard.keys[binding.key.toUpperCase()];\n    } else if (binding.key.length === 1) {\n      binding.key = binding.key.toUpperCase().charCodeAt(0);\n    } else {\n      return null;\n    }\n  }\n  if (binding.shortKey) {\n    binding[SHORTKEY] = binding.shortKey;\n    delete binding.shortKey;\n  }\n  return binding;\n}\n\nexports.default = Keyboard;\nexports.SHORTKEY = SHORTKEY;\n\n/***/ }),\n/* 35 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if (\"value\" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };\n\nvar _parchment = __webpack_require__(0);\n\nvar _parchment2 = _interopRequireDefault(_parchment);\n\nvar _text = __webpack_require__(7);\n\nvar _text2 = _interopRequireDefault(_text);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar GUARD_TEXT = '\\uFEFF';\n\nvar Embed = function (_Parchment$Embed) {\n  _inherits(Embed, _Parchment$Embed);\n\n  function Embed(node) {\n    _classCallCheck(this, Embed);\n\n    var _this = _possibleConstructorReturn(this, (Embed.__proto__ || Object.getPrototypeOf(Embed)).call(this, node));\n\n    _this.contentNode = document.createElement('span');\n    _this.contentNode.setAttribute('contenteditable', false);\n    [].slice.call(_this.domNode.childNodes).forEach(function (childNode) {\n      _this.contentNode.appendChild(childNode);\n    });\n    _this.leftGuard = document.createTextNode(GUARD_TEXT);\n    _this.rightGuard = document.createTextNode(GUARD_TEXT);\n    _this.domNode.appendChild(_this.leftGuard);\n    _this.domNode.appendChild(_this.contentNode);\n    _this.domNode.appendChild(_this.rightGuard);\n    return _this;\n  }\n\n  _createClass(Embed, [{\n    key: 'index',\n    value: function index(node, offset) {\n      if (node === this.leftGuard) return 0;\n      if (node === this.rightGuard) return 1;\n      return _get(Embed.prototype.__proto__ || Object.getPrototypeOf(Embed.prototype), 'index', this).call(this, node, offset);\n    }\n  }, {\n    key: 'restore',\n    value: function restore(node) {\n      var range = void 0,\n          textNode = void 0;\n      var text = node.data.split(GUARD_TEXT).join('');\n      if (node === this.leftGuard) {\n        if (this.prev instanceof _text2.default) {\n          var prevLength = this.prev.length();\n          this.prev.insertAt(prevLength, text);\n          range = {\n            startNode: this.prev.domNode,\n            startOffset: prevLength + text.length\n          };\n        } else {\n          textNode = document.createTextNode(text);\n          this.parent.insertBefore(_parchment2.default.create(textNode), this);\n          range = {\n            startNode: textNode,\n            startOffset: text.length\n          };\n        }\n      } else if (node === this.rightGuard) {\n        if (this.next instanceof _text2.default) {\n          this.next.insertAt(0, text);\n          range = {\n            startNode: this.next.domNode,\n            startOffset: text.length\n          };\n        } else {\n          textNode = document.createTextNode(text);\n          this.parent.insertBefore(_parchment2.default.create(textNode), this.next);\n          range = {\n            startNode: textNode,\n            startOffset: text.length\n          };\n        }\n      }\n      node.data = GUARD_TEXT;\n      return range;\n    }\n  }, {\n    key: 'update',\n    value: function update(mutations, context) {\n      var _this2 = this;\n\n      mutations.forEach(function (mutation) {\n        if (mutation.type === 'characterData' && (mutation.target === _this2.leftGuard || mutation.target === _this2.rightGuard)) {\n          var range = _this2.restore(mutation.target);\n          if (range) context.range = range;\n        }\n      });\n    }\n  }]);\n\n  return Embed;\n}(_parchment2.default.Embed);\n\nexports.default = Embed;\n\n/***/ }),\n/* 36 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.AlignStyle = exports.AlignClass = exports.AlignAttribute = undefined;\n\nvar _parchment = __webpack_require__(0);\n\nvar _parchment2 = _interopRequireDefault(_parchment);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar config = {\n  scope: _parchment2.default.Scope.BLOCK,\n  whitelist: ['right', 'center', 'justify']\n};\n\nvar AlignAttribute = new _parchment2.default.Attributor.Attribute('align', 'align', config);\nvar AlignClass = new _parchment2.default.Attributor.Class('align', 'ql-align', config);\nvar AlignStyle = new _parchment2.default.Attributor.Style('align', 'text-align', config);\n\nexports.AlignAttribute = AlignAttribute;\nexports.AlignClass = AlignClass;\nexports.AlignStyle = AlignStyle;\n\n/***/ }),\n/* 37 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.BackgroundStyle = exports.BackgroundClass = undefined;\n\nvar _parchment = __webpack_require__(0);\n\nvar _parchment2 = _interopRequireDefault(_parchment);\n\nvar _color = __webpack_require__(25);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar BackgroundClass = new _parchment2.default.Attributor.Class('background', 'ql-bg', {\n  scope: _parchment2.default.Scope.INLINE\n});\nvar BackgroundStyle = new _color.ColorAttributor('background', 'background-color', {\n  scope: _parchment2.default.Scope.INLINE\n});\n\nexports.BackgroundClass = BackgroundClass;\nexports.BackgroundStyle = BackgroundStyle;\n\n/***/ }),\n/* 38 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.DirectionStyle = exports.DirectionClass = exports.DirectionAttribute = undefined;\n\nvar _parchment = __webpack_require__(0);\n\nvar _parchment2 = _interopRequireDefault(_parchment);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar config = {\n  scope: _parchment2.default.Scope.BLOCK,\n  whitelist: ['rtl']\n};\n\nvar DirectionAttribute = new _parchment2.default.Attributor.Attribute('direction', 'dir', config);\nvar DirectionClass = new _parchment2.default.Attributor.Class('direction', 'ql-direction', config);\nvar DirectionStyle = new _parchment2.default.Attributor.Style('direction', 'direction', config);\n\nexports.DirectionAttribute = DirectionAttribute;\nexports.DirectionClass = DirectionClass;\nexports.DirectionStyle = DirectionStyle;\n\n/***/ }),\n/* 39 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.FontClass = exports.FontStyle = undefined;\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if (\"value\" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };\n\nvar _parchment = __webpack_require__(0);\n\nvar _parchment2 = _interopRequireDefault(_parchment);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar config = {\n  scope: _parchment2.default.Scope.INLINE,\n  whitelist: ['serif', 'monospace']\n};\n\nvar FontClass = new _parchment2.default.Attributor.Class('font', 'ql-font', config);\n\nvar FontStyleAttributor = function (_Parchment$Attributor) {\n  _inherits(FontStyleAttributor, _Parchment$Attributor);\n\n  function FontStyleAttributor() {\n    _classCallCheck(this, FontStyleAttributor);\n\n    return _possibleConstructorReturn(this, (FontStyleAttributor.__proto__ || Object.getPrototypeOf(FontStyleAttributor)).apply(this, arguments));\n  }\n\n  _createClass(FontStyleAttributor, [{\n    key: 'value',\n    value: function value(node) {\n      return _get(FontStyleAttributor.prototype.__proto__ || Object.getPrototypeOf(FontStyleAttributor.prototype), 'value', this).call(this, node).replace(/[\"']/g, '');\n    }\n  }]);\n\n  return FontStyleAttributor;\n}(_parchment2.default.Attributor.Style);\n\nvar FontStyle = new FontStyleAttributor('font', 'font-family', config);\n\nexports.FontStyle = FontStyle;\nexports.FontClass = FontClass;\n\n/***/ }),\n/* 40 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.SizeStyle = exports.SizeClass = undefined;\n\nvar _parchment = __webpack_require__(0);\n\nvar _parchment2 = _interopRequireDefault(_parchment);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar SizeClass = new _parchment2.default.Attributor.Class('size', 'ql-size', {\n  scope: _parchment2.default.Scope.INLINE,\n  whitelist: ['small', 'large', 'huge']\n});\nvar SizeStyle = new _parchment2.default.Attributor.Style('size', 'font-size', {\n  scope: _parchment2.default.Scope.INLINE,\n  whitelist: ['10px', '18px', '32px']\n});\n\nexports.SizeClass = SizeClass;\nexports.SizeStyle = SizeStyle;\n\n/***/ }),\n/* 41 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nmodule.exports = {\n  'align': {\n    '': __webpack_require__(76),\n    'center': __webpack_require__(77),\n    'right': __webpack_require__(78),\n    'justify': __webpack_require__(79)\n  },\n  'background': __webpack_require__(80),\n  'blockquote': __webpack_require__(81),\n  'bold': __webpack_require__(82),\n  'clean': __webpack_require__(83),\n  'code': __webpack_require__(58),\n  'code-block': __webpack_require__(58),\n  'color': __webpack_require__(84),\n  'direction': {\n    '': __webpack_require__(85),\n    'rtl': __webpack_require__(86)\n  },\n  'float': {\n    'center': __webpack_require__(87),\n    'full': __webpack_require__(88),\n    'left': __webpack_require__(89),\n    'right': __webpack_require__(90)\n  },\n  'formula': __webpack_require__(91),\n  'header': {\n    '1': __webpack_require__(92),\n    '2': __webpack_require__(93)\n  },\n  'italic': __webpack_require__(94),\n  'image': __webpack_require__(95),\n  'indent': {\n    '+1': __webpack_require__(96),\n    '-1': __webpack_require__(97)\n  },\n  'link': __webpack_require__(98),\n  'list': {\n    'ordered': __webpack_require__(99),\n    'bullet': __webpack_require__(100),\n    'check': __webpack_require__(101)\n  },\n  'script': {\n    'sub': __webpack_require__(102),\n    'super': __webpack_require__(103)\n  },\n  'strike': __webpack_require__(104),\n  'underline': __webpack_require__(105),\n  'video': __webpack_require__(106)\n};\n\n/***/ }),\n/* 42 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.getLastChangeIndex = exports.default = undefined;\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _parchment = __webpack_require__(0);\n\nvar _parchment2 = _interopRequireDefault(_parchment);\n\nvar _quill = __webpack_require__(5);\n\nvar _quill2 = _interopRequireDefault(_quill);\n\nvar _module = __webpack_require__(9);\n\nvar _module2 = _interopRequireDefault(_module);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar History = function (_Module) {\n  _inherits(History, _Module);\n\n  function History(quill, options) {\n    _classCallCheck(this, History);\n\n    var _this = _possibleConstructorReturn(this, (History.__proto__ || Object.getPrototypeOf(History)).call(this, quill, options));\n\n    _this.lastRecorded = 0;\n    _this.ignoreChange = false;\n    _this.clear();\n    _this.quill.on(_quill2.default.events.EDITOR_CHANGE, function (eventName, delta, oldDelta, source) {\n      if (eventName !== _quill2.default.events.TEXT_CHANGE || _this.ignoreChange) return;\n      if (!_this.options.userOnly || source === _quill2.default.sources.USER) {\n        _this.record(delta, oldDelta);\n      } else {\n        _this.transform(delta);\n      }\n    });\n    _this.quill.keyboard.addBinding({ key: 'Z', shortKey: true }, _this.undo.bind(_this));\n    _this.quill.keyboard.addBinding({ key: 'Z', shortKey: true, shiftKey: true }, _this.redo.bind(_this));\n    if (/Win/i.test(navigator.platform)) {\n      _this.quill.keyboard.addBinding({ key: 'Y', shortKey: true }, _this.redo.bind(_this));\n    }\n    return _this;\n  }\n\n  _createClass(History, [{\n    key: 'change',\n    value: function change(source, dest) {\n      if (this.stack[source].length === 0) return;\n      var delta = this.stack[source].pop();\n      this.stack[dest].push(delta);\n      this.lastRecorded = 0;\n      this.ignoreChange = true;\n      this.quill.updateContents(delta[source], _quill2.default.sources.USER);\n      this.ignoreChange = false;\n      var index = getLastChangeIndex(delta[source]);\n      this.quill.setSelection(index);\n    }\n  }, {\n    key: 'clear',\n    value: function clear() {\n      this.stack = { undo: [], redo: [] };\n    }\n  }, {\n    key: 'cutoff',\n    value: function cutoff() {\n      this.lastRecorded = 0;\n    }\n  }, {\n    key: 'record',\n    value: function record(changeDelta, oldDelta) {\n      if (changeDelta.ops.length === 0) return;\n      this.stack.redo = [];\n      var undoDelta = this.quill.getContents().diff(oldDelta);\n      var timestamp = Date.now();\n      if (this.lastRecorded + this.options.delay > timestamp && this.stack.undo.length > 0) {\n        var delta = this.stack.undo.pop();\n        undoDelta = undoDelta.compose(delta.undo);\n        changeDelta = delta.redo.compose(changeDelta);\n      } else {\n        this.lastRecorded = timestamp;\n      }\n      this.stack.undo.push({\n        redo: changeDelta,\n        undo: undoDelta\n      });\n      if (this.stack.undo.length > this.options.maxStack) {\n        this.stack.undo.shift();\n      }\n    }\n  }, {\n    key: 'redo',\n    value: function redo() {\n      this.change('redo', 'undo');\n    }\n  }, {\n    key: 'transform',\n    value: function transform(delta) {\n      this.stack.undo.forEach(function (change) {\n        change.undo = delta.transform(change.undo, true);\n        change.redo = delta.transform(change.redo, true);\n      });\n      this.stack.redo.forEach(function (change) {\n        change.undo = delta.transform(change.undo, true);\n        change.redo = delta.transform(change.redo, true);\n      });\n    }\n  }, {\n    key: 'undo',\n    value: function undo() {\n      this.change('undo', 'redo');\n    }\n  }]);\n\n  return History;\n}(_module2.default);\n\nHistory.DEFAULTS = {\n  delay: 1000,\n  maxStack: 100,\n  userOnly: false\n};\n\nfunction endsWithNewlineChange(delta) {\n  var lastOp = delta.ops[delta.ops.length - 1];\n  if (lastOp == null) return false;\n  if (lastOp.insert != null) {\n    return typeof lastOp.insert === 'string' && lastOp.insert.endsWith('\\n');\n  }\n  if (lastOp.attributes != null) {\n    return Object.keys(lastOp.attributes).some(function (attr) {\n      return _parchment2.default.query(attr, _parchment2.default.Scope.BLOCK) != null;\n    });\n  }\n  return false;\n}\n\nfunction getLastChangeIndex(delta) {\n  var deleteLength = delta.reduce(function (length, op) {\n    length += op.delete || 0;\n    return length;\n  }, 0);\n  var changeIndex = delta.length() - deleteLength;\n  if (endsWithNewlineChange(delta)) {\n    changeIndex -= 1;\n  }\n  return changeIndex;\n}\n\nexports.default = History;\nexports.getLastChangeIndex = getLastChangeIndex;\n\n/***/ }),\n/* 43 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.default = exports.BaseTooltip = undefined;\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if (\"value\" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };\n\nvar _extend = __webpack_require__(3);\n\nvar _extend2 = _interopRequireDefault(_extend);\n\nvar _quillDelta = __webpack_require__(2);\n\nvar _quillDelta2 = _interopRequireDefault(_quillDelta);\n\nvar _emitter = __webpack_require__(8);\n\nvar _emitter2 = _interopRequireDefault(_emitter);\n\nvar _keyboard = __webpack_require__(34);\n\nvar _keyboard2 = _interopRequireDefault(_keyboard);\n\nvar _theme = __webpack_require__(33);\n\nvar _theme2 = _interopRequireDefault(_theme);\n\nvar _colorPicker = __webpack_require__(59);\n\nvar _colorPicker2 = _interopRequireDefault(_colorPicker);\n\nvar _iconPicker = __webpack_require__(60);\n\nvar _iconPicker2 = _interopRequireDefault(_iconPicker);\n\nvar _picker = __webpack_require__(27);\n\nvar _picker2 = _interopRequireDefault(_picker);\n\nvar _tooltip = __webpack_require__(61);\n\nvar _tooltip2 = _interopRequireDefault(_tooltip);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar ALIGNS = [false, 'center', 'right', 'justify'];\n\nvar COLORS = [\"#000000\", \"#e60000\", \"#ff9900\", \"#ffff00\", \"#008a00\", \"#0066cc\", \"#9933ff\", \"#ffffff\", \"#facccc\", \"#ffebcc\", \"#ffffcc\", \"#cce8cc\", \"#cce0f5\", \"#ebd6ff\", \"#bbbbbb\", \"#f06666\", \"#ffc266\", \"#ffff66\", \"#66b966\", \"#66a3e0\", \"#c285ff\", \"#888888\", \"#a10000\", \"#b26b00\", \"#b2b200\", \"#006100\", \"#0047b2\", \"#6b24b2\", \"#444444\", \"#5c0000\", \"#663d00\", \"#666600\", \"#003700\", \"#002966\", \"#3d1466\"];\n\nvar FONTS = [false, 'serif', 'monospace'];\n\nvar HEADERS = ['1', '2', '3', false];\n\nvar SIZES = ['small', false, 'large', 'huge'];\n\nvar BaseTheme = function (_Theme) {\n  _inherits(BaseTheme, _Theme);\n\n  function BaseTheme(quill, options) {\n    _classCallCheck(this, BaseTheme);\n\n    var _this = _possibleConstructorReturn(this, (BaseTheme.__proto__ || Object.getPrototypeOf(BaseTheme)).call(this, quill, options));\n\n    var listener = function listener(e) {\n      if (!document.body.contains(quill.root)) {\n        return document.body.removeEventListener('click', listener);\n      }\n      if (_this.tooltip != null && !_this.tooltip.root.contains(e.target) && document.activeElement !== _this.tooltip.textbox && !_this.quill.hasFocus()) {\n        _this.tooltip.hide();\n      }\n      if (_this.pickers != null) {\n        _this.pickers.forEach(function (picker) {\n          if (!picker.container.contains(e.target)) {\n            picker.close();\n          }\n        });\n      }\n    };\n    quill.emitter.listenDOM('click', document.body, listener);\n    return _this;\n  }\n\n  _createClass(BaseTheme, [{\n    key: 'addModule',\n    value: function addModule(name) {\n      var module = _get(BaseTheme.prototype.__proto__ || Object.getPrototypeOf(BaseTheme.prototype), 'addModule', this).call(this, name);\n      if (name === 'toolbar') {\n        this.extendToolbar(module);\n      }\n      return module;\n    }\n  }, {\n    key: 'buildButtons',\n    value: function buildButtons(buttons, icons) {\n      buttons.forEach(function (button) {\n        var className = button.getAttribute('class') || '';\n        className.split(/\\s+/).forEach(function (name) {\n          if (!name.startsWith('ql-')) return;\n          name = name.slice('ql-'.length);\n          if (icons[name] == null) return;\n          if (name === 'direction') {\n            button.innerHTML = icons[name][''] + icons[name]['rtl'];\n          } else if (typeof icons[name] === 'string') {\n            button.innerHTML = icons[name];\n          } else {\n            var value = button.value || '';\n            if (value != null && icons[name][value]) {\n              button.innerHTML = icons[name][value];\n            }\n          }\n        });\n      });\n    }\n  }, {\n    key: 'buildPickers',\n    value: function buildPickers(selects, icons) {\n      var _this2 = this;\n\n      this.pickers = selects.map(function (select) {\n        if (select.classList.contains('ql-align')) {\n          if (select.querySelector('option') == null) {\n            fillSelect(select, ALIGNS);\n          }\n          return new _iconPicker2.default(select, icons.align);\n        } else if (select.classList.contains('ql-background') || select.classList.contains('ql-color')) {\n          var format = select.classList.contains('ql-background') ? 'background' : 'color';\n          if (select.querySelector('option') == null) {\n            fillSelect(select, COLORS, format === 'background' ? '#ffffff' : '#000000');\n          }\n          return new _colorPicker2.default(select, icons[format]);\n        } else {\n          if (select.querySelector('option') == null) {\n            if (select.classList.contains('ql-font')) {\n              fillSelect(select, FONTS);\n            } else if (select.classList.contains('ql-header')) {\n              fillSelect(select, HEADERS);\n            } else if (select.classList.contains('ql-size')) {\n              fillSelect(select, SIZES);\n            }\n          }\n          return new _picker2.default(select);\n        }\n      });\n      var update = function update() {\n        _this2.pickers.forEach(function (picker) {\n          picker.update();\n        });\n      };\n      this.quill.on(_emitter2.default.events.EDITOR_CHANGE, update);\n    }\n  }]);\n\n  return BaseTheme;\n}(_theme2.default);\n\nBaseTheme.DEFAULTS = (0, _extend2.default)(true, {}, _theme2.default.DEFAULTS, {\n  modules: {\n    toolbar: {\n      handlers: {\n        formula: function formula() {\n          this.quill.theme.tooltip.edit('formula');\n        },\n        image: function image() {\n          var _this3 = this;\n\n          var fileInput = this.container.querySelector('input.ql-image[type=file]');\n          if (fileInput == null) {\n            fileInput = document.createElement('input');\n            fileInput.setAttribute('type', 'file');\n            fileInput.setAttribute('accept', 'image/png, image/gif, image/jpeg, image/bmp, image/x-icon');\n            fileInput.classList.add('ql-image');\n            fileInput.addEventListener('change', function () {\n              if (fileInput.files != null && fileInput.files[0] != null) {\n                var reader = new FileReader();\n                reader.onload = function (e) {\n                  var range = _this3.quill.getSelection(true);\n                  _this3.quill.updateContents(new _quillDelta2.default().retain(range.index).delete(range.length).insert({ image: e.target.result }), _emitter2.default.sources.USER);\n                  _this3.quill.setSelection(range.index + 1, _emitter2.default.sources.SILENT);\n                  fileInput.value = \"\";\n                };\n                reader.readAsDataURL(fileInput.files[0]);\n              }\n            });\n            this.container.appendChild(fileInput);\n          }\n          fileInput.click();\n        },\n        video: function video() {\n          this.quill.theme.tooltip.edit('video');\n        }\n      }\n    }\n  }\n});\n\nvar BaseTooltip = function (_Tooltip) {\n  _inherits(BaseTooltip, _Tooltip);\n\n  function BaseTooltip(quill, boundsContainer) {\n    _classCallCheck(this, BaseTooltip);\n\n    var _this4 = _possibleConstructorReturn(this, (BaseTooltip.__proto__ || Object.getPrototypeOf(BaseTooltip)).call(this, quill, boundsContainer));\n\n    _this4.textbox = _this4.root.querySelector('input[type=\"text\"]');\n    _this4.listen();\n    return _this4;\n  }\n\n  _createClass(BaseTooltip, [{\n    key: 'listen',\n    value: function listen() {\n      var _this5 = this;\n\n      this.textbox.addEventListener('keydown', function (event) {\n        if (_keyboard2.default.match(event, 'enter')) {\n          _this5.save();\n          event.preventDefault();\n        } else if (_keyboard2.default.match(event, 'escape')) {\n          _this5.cancel();\n          event.preventDefault();\n        }\n      });\n    }\n  }, {\n    key: 'cancel',\n    value: function cancel() {\n      this.hide();\n    }\n  }, {\n    key: 'edit',\n    value: function edit() {\n      var mode = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'link';\n      var preview = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;\n\n      this.root.classList.remove('ql-hidden');\n      this.root.classList.add('ql-editing');\n      if (preview != null) {\n        this.textbox.value = preview;\n      } else if (mode !== this.root.getAttribute('data-mode')) {\n        this.textbox.value = '';\n      }\n      this.position(this.quill.getBounds(this.quill.selection.savedRange));\n      this.textbox.select();\n      this.textbox.setAttribute('placeholder', this.textbox.getAttribute('data-' + mode) || '');\n      this.root.setAttribute('data-mode', mode);\n    }\n  }, {\n    key: 'restoreFocus',\n    value: function restoreFocus() {\n      var scrollTop = this.quill.scrollingContainer.scrollTop;\n      this.quill.focus();\n      this.quill.scrollingContainer.scrollTop = scrollTop;\n    }\n  }, {\n    key: 'save',\n    value: function save() {\n      var value = this.textbox.value;\n      switch (this.root.getAttribute('data-mode')) {\n        case 'link':\n          {\n            var scrollTop = this.quill.root.scrollTop;\n            if (this.linkRange) {\n              this.quill.formatText(this.linkRange, 'link', value, _emitter2.default.sources.USER);\n              delete this.linkRange;\n            } else {\n              this.restoreFocus();\n              this.quill.format('link', value, _emitter2.default.sources.USER);\n            }\n            this.quill.root.scrollTop = scrollTop;\n            break;\n          }\n        case 'video':\n          {\n            value = extractVideoUrl(value);\n          } // eslint-disable-next-line no-fallthrough\n        case 'formula':\n          {\n            if (!value) break;\n            var range = this.quill.getSelection(true);\n            if (range != null) {\n              var index = range.index + range.length;\n              this.quill.insertEmbed(index, this.root.getAttribute('data-mode'), value, _emitter2.default.sources.USER);\n              if (this.root.getAttribute('data-mode') === 'formula') {\n                this.quill.insertText(index + 1, ' ', _emitter2.default.sources.USER);\n              }\n              this.quill.setSelection(index + 2, _emitter2.default.sources.USER);\n            }\n            break;\n          }\n        default:\n      }\n      this.textbox.value = '';\n      this.hide();\n    }\n  }]);\n\n  return BaseTooltip;\n}(_tooltip2.default);\n\nfunction extractVideoUrl(url) {\n  var match = url.match(/^(?:(https?):\\/\\/)?(?:(?:www|m)\\.)?youtube\\.com\\/watch.*v=([a-zA-Z0-9_-]+)/) || url.match(/^(?:(https?):\\/\\/)?(?:(?:www|m)\\.)?youtu\\.be\\/([a-zA-Z0-9_-]+)/);\n  if (match) {\n    return (match[1] || 'https') + '://www.youtube.com/embed/' + match[2] + '?showinfo=0';\n  }\n  if (match = url.match(/^(?:(https?):\\/\\/)?(?:www\\.)?vimeo\\.com\\/(\\d+)/)) {\n    // eslint-disable-line no-cond-assign\n    return (match[1] || 'https') + '://player.vimeo.com/video/' + match[2] + '/';\n  }\n  return url;\n}\n\nfunction fillSelect(select, values) {\n  var defaultValue = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n\n  values.forEach(function (value) {\n    var option = document.createElement('option');\n    if (value === defaultValue) {\n      option.setAttribute('selected', 'selected');\n    } else {\n      option.setAttribute('value', value);\n    }\n    select.appendChild(option);\n  });\n}\n\nexports.BaseTooltip = BaseTooltip;\nexports.default = BaseTheme;\n\n/***/ }),\n/* 44 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar LinkedList = /** @class */ (function () {\n    function LinkedList() {\n        this.head = this.tail = null;\n        this.length = 0;\n    }\n    LinkedList.prototype.append = function () {\n        var nodes = [];\n        for (var _i = 0; _i < arguments.length; _i++) {\n            nodes[_i] = arguments[_i];\n        }\n        this.insertBefore(nodes[0], null);\n        if (nodes.length > 1) {\n            this.append.apply(this, nodes.slice(1));\n        }\n    };\n    LinkedList.prototype.contains = function (node) {\n        var cur, next = this.iterator();\n        while ((cur = next())) {\n            if (cur === node)\n                return true;\n        }\n        return false;\n    };\n    LinkedList.prototype.insertBefore = function (node, refNode) {\n        if (!node)\n            return;\n        node.next = refNode;\n        if (refNode != null) {\n            node.prev = refNode.prev;\n            if (refNode.prev != null) {\n                refNode.prev.next = node;\n            }\n            refNode.prev = node;\n            if (refNode === this.head) {\n                this.head = node;\n            }\n        }\n        else if (this.tail != null) {\n            this.tail.next = node;\n            node.prev = this.tail;\n            this.tail = node;\n        }\n        else {\n            node.prev = null;\n            this.head = this.tail = node;\n        }\n        this.length += 1;\n    };\n    LinkedList.prototype.offset = function (target) {\n        var index = 0, cur = this.head;\n        while (cur != null) {\n            if (cur === target)\n                return index;\n            index += cur.length();\n            cur = cur.next;\n        }\n        return -1;\n    };\n    LinkedList.prototype.remove = function (node) {\n        if (!this.contains(node))\n            return;\n        if (node.prev != null)\n            node.prev.next = node.next;\n        if (node.next != null)\n            node.next.prev = node.prev;\n        if (node === this.head)\n            this.head = node.next;\n        if (node === this.tail)\n            this.tail = node.prev;\n        this.length -= 1;\n    };\n    LinkedList.prototype.iterator = function (curNode) {\n        if (curNode === void 0) { curNode = this.head; }\n        // TODO use yield when we can\n        return function () {\n            var ret = curNode;\n            if (curNode != null)\n                curNode = curNode.next;\n            return ret;\n        };\n    };\n    LinkedList.prototype.find = function (index, inclusive) {\n        if (inclusive === void 0) { inclusive = false; }\n        var cur, next = this.iterator();\n        while ((cur = next())) {\n            var length = cur.length();\n            if (index < length ||\n                (inclusive && index === length && (cur.next == null || cur.next.length() !== 0))) {\n                return [cur, index];\n            }\n            index -= length;\n        }\n        return [null, 0];\n    };\n    LinkedList.prototype.forEach = function (callback) {\n        var cur, next = this.iterator();\n        while ((cur = next())) {\n            callback(cur);\n        }\n    };\n    LinkedList.prototype.forEachAt = function (index, length, callback) {\n        if (length <= 0)\n            return;\n        var _a = this.find(index), startNode = _a[0], offset = _a[1];\n        var cur, curIndex = index - offset, next = this.iterator(startNode);\n        while ((cur = next()) && curIndex < index + length) {\n            var curLength = cur.length();\n            if (index > curIndex) {\n                callback(cur, index - curIndex, Math.min(length, curIndex + curLength - index));\n            }\n            else {\n                callback(cur, 0, Math.min(curLength, index + length - curIndex));\n            }\n            curIndex += curLength;\n        }\n    };\n    LinkedList.prototype.map = function (callback) {\n        return this.reduce(function (memo, cur) {\n            memo.push(callback(cur));\n            return memo;\n        }, []);\n    };\n    LinkedList.prototype.reduce = function (callback, memo) {\n        var cur, next = this.iterator();\n        while ((cur = next())) {\n            memo = callback(memo, cur);\n        }\n        return memo;\n    };\n    return LinkedList;\n}());\nexports.default = LinkedList;\n\n\n/***/ }),\n/* 45 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar __extends = (this && this.__extends) || (function () {\n    var extendStatics = Object.setPrototypeOf ||\n        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar container_1 = __webpack_require__(17);\nvar Registry = __webpack_require__(1);\nvar OBSERVER_CONFIG = {\n    attributes: true,\n    characterData: true,\n    characterDataOldValue: true,\n    childList: true,\n    subtree: true,\n};\nvar MAX_OPTIMIZE_ITERATIONS = 100;\nvar ScrollBlot = /** @class */ (function (_super) {\n    __extends(ScrollBlot, _super);\n    function ScrollBlot(node) {\n        var _this = _super.call(this, node) || this;\n        _this.scroll = _this;\n        _this.observer = new MutationObserver(function (mutations) {\n            _this.update(mutations);\n        });\n        _this.observer.observe(_this.domNode, OBSERVER_CONFIG);\n        _this.attach();\n        return _this;\n    }\n    ScrollBlot.prototype.detach = function () {\n        _super.prototype.detach.call(this);\n        this.observer.disconnect();\n    };\n    ScrollBlot.prototype.deleteAt = function (index, length) {\n        this.update();\n        if (index === 0 && length === this.length()) {\n            this.children.forEach(function (child) {\n                child.remove();\n            });\n        }\n        else {\n            _super.prototype.deleteAt.call(this, index, length);\n        }\n    };\n    ScrollBlot.prototype.formatAt = function (index, length, name, value) {\n        this.update();\n        _super.prototype.formatAt.call(this, index, length, name, value);\n    };\n    ScrollBlot.prototype.insertAt = function (index, value, def) {\n        this.update();\n        _super.prototype.insertAt.call(this, index, value, def);\n    };\n    ScrollBlot.prototype.optimize = function (mutations, context) {\n        var _this = this;\n        if (mutations === void 0) { mutations = []; }\n        if (context === void 0) { context = {}; }\n        _super.prototype.optimize.call(this, context);\n        // We must modify mutations directly, cannot make copy and then modify\n        var records = [].slice.call(this.observer.takeRecords());\n        // Array.push currently seems to be implemented by a non-tail recursive function\n        // so we cannot just mutations.push.apply(mutations, this.observer.takeRecords());\n        while (records.length > 0)\n            mutations.push(records.pop());\n        // TODO use WeakMap\n        var mark = function (blot, markParent) {\n            if (markParent === void 0) { markParent = true; }\n            if (blot == null || blot === _this)\n                return;\n            if (blot.domNode.parentNode == null)\n                return;\n            // @ts-ignore\n            if (blot.domNode[Registry.DATA_KEY].mutations == null) {\n                // @ts-ignore\n                blot.domNode[Registry.DATA_KEY].mutations = [];\n            }\n            if (markParent)\n                mark(blot.parent);\n        };\n        var optimize = function (blot) {\n            // Post-order traversal\n            if (\n            // @ts-ignore\n            blot.domNode[Registry.DATA_KEY] == null ||\n                // @ts-ignore\n                blot.domNode[Registry.DATA_KEY].mutations == null) {\n                return;\n            }\n            if (blot instanceof container_1.default) {\n                blot.children.forEach(optimize);\n            }\n            blot.optimize(context);\n        };\n        var remaining = mutations;\n        for (var i = 0; remaining.length > 0; i += 1) {\n            if (i >= MAX_OPTIMIZE_ITERATIONS) {\n                throw new Error('[Parchment] Maximum optimize iterations reached');\n            }\n            remaining.forEach(function (mutation) {\n                var blot = Registry.find(mutation.target, true);\n                if (blot == null)\n                    return;\n                if (blot.domNode === mutation.target) {\n                    if (mutation.type === 'childList') {\n                        mark(Registry.find(mutation.previousSibling, false));\n                        [].forEach.call(mutation.addedNodes, function (node) {\n                            var child = Registry.find(node, false);\n                            mark(child, false);\n                            if (child instanceof container_1.default) {\n                                child.children.forEach(function (grandChild) {\n                                    mark(grandChild, false);\n                                });\n                            }\n                        });\n                    }\n                    else if (mutation.type === 'attributes') {\n                        mark(blot.prev);\n                    }\n                }\n                mark(blot);\n            });\n            this.children.forEach(optimize);\n            remaining = [].slice.call(this.observer.takeRecords());\n            records = remaining.slice();\n            while (records.length > 0)\n                mutations.push(records.pop());\n        }\n    };\n    ScrollBlot.prototype.update = function (mutations, context) {\n        var _this = this;\n        if (context === void 0) { context = {}; }\n        mutations = mutations || this.observer.takeRecords();\n        // TODO use WeakMap\n        mutations\n            .map(function (mutation) {\n            var blot = Registry.find(mutation.target, true);\n            if (blot == null)\n                return null;\n            // @ts-ignore\n            if (blot.domNode[Registry.DATA_KEY].mutations == null) {\n                // @ts-ignore\n                blot.domNode[Registry.DATA_KEY].mutations = [mutation];\n                return blot;\n            }\n            else {\n                // @ts-ignore\n                blot.domNode[Registry.DATA_KEY].mutations.push(mutation);\n                return null;\n            }\n        })\n            .forEach(function (blot) {\n            // @ts-ignore\n            if (blot == null || blot === _this || blot.domNode[Registry.DATA_KEY] == null)\n                return;\n            // @ts-ignore\n            blot.update(blot.domNode[Registry.DATA_KEY].mutations || [], context);\n        });\n        // @ts-ignore\n        if (this.domNode[Registry.DATA_KEY].mutations != null) {\n            // @ts-ignore\n            _super.prototype.update.call(this, this.domNode[Registry.DATA_KEY].mutations, context);\n        }\n        this.optimize(mutations, context);\n    };\n    ScrollBlot.blotName = 'scroll';\n    ScrollBlot.defaultChild = 'block';\n    ScrollBlot.scope = Registry.Scope.BLOCK_BLOT;\n    ScrollBlot.tagName = 'DIV';\n    return ScrollBlot;\n}(container_1.default));\nexports.default = ScrollBlot;\n\n\n/***/ }),\n/* 46 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar __extends = (this && this.__extends) || (function () {\n    var extendStatics = Object.setPrototypeOf ||\n        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar format_1 = __webpack_require__(18);\nvar Registry = __webpack_require__(1);\n// Shallow object comparison\nfunction isEqual(obj1, obj2) {\n    if (Object.keys(obj1).length !== Object.keys(obj2).length)\n        return false;\n    // @ts-ignore\n    for (var prop in obj1) {\n        // @ts-ignore\n        if (obj1[prop] !== obj2[prop])\n            return false;\n    }\n    return true;\n}\nvar InlineBlot = /** @class */ (function (_super) {\n    __extends(InlineBlot, _super);\n    function InlineBlot() {\n        return _super !== null && _super.apply(this, arguments) || this;\n    }\n    InlineBlot.formats = function (domNode) {\n        if (domNode.tagName === InlineBlot.tagName)\n            return undefined;\n        return _super.formats.call(this, domNode);\n    };\n    InlineBlot.prototype.format = function (name, value) {\n        var _this = this;\n        if (name === this.statics.blotName && !value) {\n            this.children.forEach(function (child) {\n                if (!(child instanceof format_1.default)) {\n                    child = child.wrap(InlineBlot.blotName, true);\n                }\n                _this.attributes.copy(child);\n            });\n            this.unwrap();\n        }\n        else {\n            _super.prototype.format.call(this, name, value);\n        }\n    };\n    InlineBlot.prototype.formatAt = function (index, length, name, value) {\n        if (this.formats()[name] != null || Registry.query(name, Registry.Scope.ATTRIBUTE)) {\n            var blot = this.isolate(index, length);\n            blot.format(name, value);\n        }\n        else {\n            _super.prototype.formatAt.call(this, index, length, name, value);\n        }\n    };\n    InlineBlot.prototype.optimize = function (context) {\n        _super.prototype.optimize.call(this, context);\n        var formats = this.formats();\n        if (Object.keys(formats).length === 0) {\n            return this.unwrap(); // unformatted span\n        }\n        var next = this.next;\n        if (next instanceof InlineBlot && next.prev === this && isEqual(formats, next.formats())) {\n            next.moveChildren(this);\n            next.remove();\n        }\n    };\n    InlineBlot.blotName = 'inline';\n    InlineBlot.scope = Registry.Scope.INLINE_BLOT;\n    InlineBlot.tagName = 'SPAN';\n    return InlineBlot;\n}(format_1.default));\nexports.default = InlineBlot;\n\n\n/***/ }),\n/* 47 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar __extends = (this && this.__extends) || (function () {\n    var extendStatics = Object.setPrototypeOf ||\n        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar format_1 = __webpack_require__(18);\nvar Registry = __webpack_require__(1);\nvar BlockBlot = /** @class */ (function (_super) {\n    __extends(BlockBlot, _super);\n    function BlockBlot() {\n        return _super !== null && _super.apply(this, arguments) || this;\n    }\n    BlockBlot.formats = function (domNode) {\n        var tagName = Registry.query(BlockBlot.blotName).tagName;\n        if (domNode.tagName === tagName)\n            return undefined;\n        return _super.formats.call(this, domNode);\n    };\n    BlockBlot.prototype.format = function (name, value) {\n        if (Registry.query(name, Registry.Scope.BLOCK) == null) {\n            return;\n        }\n        else if (name === this.statics.blotName && !value) {\n            this.replaceWith(BlockBlot.blotName);\n        }\n        else {\n            _super.prototype.format.call(this, name, value);\n        }\n    };\n    BlockBlot.prototype.formatAt = function (index, length, name, value) {\n        if (Registry.query(name, Registry.Scope.BLOCK) != null) {\n            this.format(name, value);\n        }\n        else {\n            _super.prototype.formatAt.call(this, index, length, name, value);\n        }\n    };\n    BlockBlot.prototype.insertAt = function (index, value, def) {\n        if (def == null || Registry.query(value, Registry.Scope.INLINE) != null) {\n            // Insert text or inline\n            _super.prototype.insertAt.call(this, index, value, def);\n        }\n        else {\n            var after = this.split(index);\n            var blot = Registry.create(value, def);\n            after.parent.insertBefore(blot, after);\n        }\n    };\n    BlockBlot.prototype.update = function (mutations, context) {\n        if (navigator.userAgent.match(/Trident/)) {\n            this.build();\n        }\n        else {\n            _super.prototype.update.call(this, mutations, context);\n        }\n    };\n    BlockBlot.blotName = 'block';\n    BlockBlot.scope = Registry.Scope.BLOCK_BLOT;\n    BlockBlot.tagName = 'P';\n    return BlockBlot;\n}(format_1.default));\nexports.default = BlockBlot;\n\n\n/***/ }),\n/* 48 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar __extends = (this && this.__extends) || (function () {\n    var extendStatics = Object.setPrototypeOf ||\n        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar leaf_1 = __webpack_require__(19);\nvar EmbedBlot = /** @class */ (function (_super) {\n    __extends(EmbedBlot, _super);\n    function EmbedBlot() {\n        return _super !== null && _super.apply(this, arguments) || this;\n    }\n    EmbedBlot.formats = function (domNode) {\n        return undefined;\n    };\n    EmbedBlot.prototype.format = function (name, value) {\n        // super.formatAt wraps, which is what we want in general,\n        // but this allows subclasses to overwrite for formats\n        // that just apply to particular embeds\n        _super.prototype.formatAt.call(this, 0, this.length(), name, value);\n    };\n    EmbedBlot.prototype.formatAt = function (index, length, name, value) {\n        if (index === 0 && length === this.length()) {\n            this.format(name, value);\n        }\n        else {\n            _super.prototype.formatAt.call(this, index, length, name, value);\n        }\n    };\n    EmbedBlot.prototype.formats = function () {\n        return this.statics.formats(this.domNode);\n    };\n    return EmbedBlot;\n}(leaf_1.default));\nexports.default = EmbedBlot;\n\n\n/***/ }),\n/* 49 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar __extends = (this && this.__extends) || (function () {\n    var extendStatics = Object.setPrototypeOf ||\n        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar leaf_1 = __webpack_require__(19);\nvar Registry = __webpack_require__(1);\nvar TextBlot = /** @class */ (function (_super) {\n    __extends(TextBlot, _super);\n    function TextBlot(node) {\n        var _this = _super.call(this, node) || this;\n        _this.text = _this.statics.value(_this.domNode);\n        return _this;\n    }\n    TextBlot.create = function (value) {\n        return document.createTextNode(value);\n    };\n    TextBlot.value = function (domNode) {\n        var text = domNode.data;\n        // @ts-ignore\n        if (text['normalize'])\n            text = text['normalize']();\n        return text;\n    };\n    TextBlot.prototype.deleteAt = function (index, length) {\n        this.domNode.data = this.text = this.text.slice(0, index) + this.text.slice(index + length);\n    };\n    TextBlot.prototype.index = function (node, offset) {\n        if (this.domNode === node) {\n            return offset;\n        }\n        return -1;\n    };\n    TextBlot.prototype.insertAt = function (index, value, def) {\n        if (def == null) {\n            this.text = this.text.slice(0, index) + value + this.text.slice(index);\n            this.domNode.data = this.text;\n        }\n        else {\n            _super.prototype.insertAt.call(this, index, value, def);\n        }\n    };\n    TextBlot.prototype.length = function () {\n        return this.text.length;\n    };\n    TextBlot.prototype.optimize = function (context) {\n        _super.prototype.optimize.call(this, context);\n        this.text = this.statics.value(this.domNode);\n        if (this.text.length === 0) {\n            this.remove();\n        }\n        else if (this.next instanceof TextBlot && this.next.prev === this) {\n            this.insertAt(this.length(), this.next.value());\n            this.next.remove();\n        }\n    };\n    TextBlot.prototype.position = function (index, inclusive) {\n        if (inclusive === void 0) { inclusive = false; }\n        return [this.domNode, index];\n    };\n    TextBlot.prototype.split = function (index, force) {\n        if (force === void 0) { force = false; }\n        if (!force) {\n            if (index === 0)\n                return this;\n            if (index === this.length())\n                return this.next;\n        }\n        var after = Registry.create(this.domNode.splitText(index));\n        this.parent.insertBefore(after, this.next);\n        this.text = this.statics.value(this.domNode);\n        return after;\n    };\n    TextBlot.prototype.update = function (mutations, context) {\n        var _this = this;\n        if (mutations.some(function (mutation) {\n            return mutation.type === 'characterData' && mutation.target === _this.domNode;\n        })) {\n            this.text = this.statics.value(this.domNode);\n        }\n    };\n    TextBlot.prototype.value = function () {\n        return this.text;\n    };\n    TextBlot.blotName = 'text';\n    TextBlot.scope = Registry.Scope.INLINE_BLOT;\n    return TextBlot;\n}(leaf_1.default));\nexports.default = TextBlot;\n\n\n/***/ }),\n/* 50 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar elem = document.createElement('div');\nelem.classList.toggle('test-class', false);\nif (elem.classList.contains('test-class')) {\n  var _toggle = DOMTokenList.prototype.toggle;\n  DOMTokenList.prototype.toggle = function (token, force) {\n    if (arguments.length > 1 && !this.contains(token) === !force) {\n      return force;\n    } else {\n      return _toggle.call(this, token);\n    }\n  };\n}\n\nif (!String.prototype.startsWith) {\n  String.prototype.startsWith = function (searchString, position) {\n    position = position || 0;\n    return this.substr(position, searchString.length) === searchString;\n  };\n}\n\nif (!String.prototype.endsWith) {\n  String.prototype.endsWith = function (searchString, position) {\n    var subjectString = this.toString();\n    if (typeof position !== 'number' || !isFinite(position) || Math.floor(position) !== position || position > subjectString.length) {\n      position = subjectString.length;\n    }\n    position -= searchString.length;\n    var lastIndex = subjectString.indexOf(searchString, position);\n    return lastIndex !== -1 && lastIndex === position;\n  };\n}\n\nif (!Array.prototype.find) {\n  Object.defineProperty(Array.prototype, \"find\", {\n    value: function value(predicate) {\n      if (this === null) {\n        throw new TypeError('Array.prototype.find called on null or undefined');\n      }\n      if (typeof predicate !== 'function') {\n        throw new TypeError('predicate must be a function');\n      }\n      var list = Object(this);\n      var length = list.length >>> 0;\n      var thisArg = arguments[1];\n      var value;\n\n      for (var i = 0; i < length; i++) {\n        value = list[i];\n        if (predicate.call(thisArg, value, i, list)) {\n          return value;\n        }\n      }\n      return undefined;\n    }\n  });\n}\n\ndocument.addEventListener(\"DOMContentLoaded\", function () {\n  // Disable resizing in Firefox\n  document.execCommand(\"enableObjectResizing\", false, false);\n  // Disable automatic linkifying in IE11\n  document.execCommand(\"autoUrlDetect\", false, false);\n});\n\n/***/ }),\n/* 51 */\n/***/ (function(module, exports) {\n\n/**\n * This library modifies the diff-patch-match library by Neil Fraser\n * by removing the patch and match functionality and certain advanced\n * options in the diff function. The original license is as follows:\n *\n * ===\n *\n * Diff Match and Patch\n *\n * Copyright 2006 Google Inc.\n * http://code.google.com/p/google-diff-match-patch/\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\n/**\n * The data structure representing a diff is an array of tuples:\n * [[DIFF_DELETE, 'Hello'], [DIFF_INSERT, 'Goodbye'], [DIFF_EQUAL, ' world.']]\n * which means: delete 'Hello', add 'Goodbye' and keep ' world.'\n */\nvar DIFF_DELETE = -1;\nvar DIFF_INSERT = 1;\nvar DIFF_EQUAL = 0;\n\n\n/**\n * Find the differences between two texts.  Simplifies the problem by stripping\n * any common prefix or suffix off the texts before diffing.\n * @param {string} text1 Old string to be diffed.\n * @param {string} text2 New string to be diffed.\n * @param {Int} cursor_pos Expected edit position in text1 (optional)\n * @return {Array} Array of diff tuples.\n */\nfunction diff_main(text1, text2, cursor_pos) {\n  // Check for equality (speedup).\n  if (text1 == text2) {\n    if (text1) {\n      return [[DIFF_EQUAL, text1]];\n    }\n    return [];\n  }\n\n  // Check cursor_pos within bounds\n  if (cursor_pos < 0 || text1.length < cursor_pos) {\n    cursor_pos = null;\n  }\n\n  // Trim off common prefix (speedup).\n  var commonlength = diff_commonPrefix(text1, text2);\n  var commonprefix = text1.substring(0, commonlength);\n  text1 = text1.substring(commonlength);\n  text2 = text2.substring(commonlength);\n\n  // Trim off common suffix (speedup).\n  commonlength = diff_commonSuffix(text1, text2);\n  var commonsuffix = text1.substring(text1.length - commonlength);\n  text1 = text1.substring(0, text1.length - commonlength);\n  text2 = text2.substring(0, text2.length - commonlength);\n\n  // Compute the diff on the middle block.\n  var diffs = diff_compute_(text1, text2);\n\n  // Restore the prefix and suffix.\n  if (commonprefix) {\n    diffs.unshift([DIFF_EQUAL, commonprefix]);\n  }\n  if (commonsuffix) {\n    diffs.push([DIFF_EQUAL, commonsuffix]);\n  }\n  diff_cleanupMerge(diffs);\n  if (cursor_pos != null) {\n    diffs = fix_cursor(diffs, cursor_pos);\n  }\n  diffs = fix_emoji(diffs);\n  return diffs;\n};\n\n\n/**\n * Find the differences between two texts.  Assumes that the texts do not\n * have any common prefix or suffix.\n * @param {string} text1 Old string to be diffed.\n * @param {string} text2 New string to be diffed.\n * @return {Array} Array of diff tuples.\n */\nfunction diff_compute_(text1, text2) {\n  var diffs;\n\n  if (!text1) {\n    // Just add some text (speedup).\n    return [[DIFF_INSERT, text2]];\n  }\n\n  if (!text2) {\n    // Just delete some text (speedup).\n    return [[DIFF_DELETE, text1]];\n  }\n\n  var longtext = text1.length > text2.length ? text1 : text2;\n  var shorttext = text1.length > text2.length ? text2 : text1;\n  var i = longtext.indexOf(shorttext);\n  if (i != -1) {\n    // Shorter text is inside the longer text (speedup).\n    diffs = [[DIFF_INSERT, longtext.substring(0, i)],\n             [DIFF_EQUAL, shorttext],\n             [DIFF_INSERT, longtext.substring(i + shorttext.length)]];\n    // Swap insertions for deletions if diff is reversed.\n    if (text1.length > text2.length) {\n      diffs[0][0] = diffs[2][0] = DIFF_DELETE;\n    }\n    return diffs;\n  }\n\n  if (shorttext.length == 1) {\n    // Single character string.\n    // After the previous speedup, the character can't be an equality.\n    return [[DIFF_DELETE, text1], [DIFF_INSERT, text2]];\n  }\n\n  // Check to see if the problem can be split in two.\n  var hm = diff_halfMatch_(text1, text2);\n  if (hm) {\n    // A half-match was found, sort out the return data.\n    var text1_a = hm[0];\n    var text1_b = hm[1];\n    var text2_a = hm[2];\n    var text2_b = hm[3];\n    var mid_common = hm[4];\n    // Send both pairs off for separate processing.\n    var diffs_a = diff_main(text1_a, text2_a);\n    var diffs_b = diff_main(text1_b, text2_b);\n    // Merge the results.\n    return diffs_a.concat([[DIFF_EQUAL, mid_common]], diffs_b);\n  }\n\n  return diff_bisect_(text1, text2);\n};\n\n\n/**\n * Find the 'middle snake' of a diff, split the problem in two\n * and return the recursively constructed diff.\n * See Myers 1986 paper: An O(ND) Difference Algorithm and Its Variations.\n * @param {string} text1 Old string to be diffed.\n * @param {string} text2 New string to be diffed.\n * @return {Array} Array of diff tuples.\n * @private\n */\nfunction diff_bisect_(text1, text2) {\n  // Cache the text lengths to prevent multiple calls.\n  var text1_length = text1.length;\n  var text2_length = text2.length;\n  var max_d = Math.ceil((text1_length + text2_length) / 2);\n  var v_offset = max_d;\n  var v_length = 2 * max_d;\n  var v1 = new Array(v_length);\n  var v2 = new Array(v_length);\n  // Setting all elements to -1 is faster in Chrome & Firefox than mixing\n  // integers and undefined.\n  for (var x = 0; x < v_length; x++) {\n    v1[x] = -1;\n    v2[x] = -1;\n  }\n  v1[v_offset + 1] = 0;\n  v2[v_offset + 1] = 0;\n  var delta = text1_length - text2_length;\n  // If the total number of characters is odd, then the front path will collide\n  // with the reverse path.\n  var front = (delta % 2 != 0);\n  // Offsets for start and end of k loop.\n  // Prevents mapping of space beyond the grid.\n  var k1start = 0;\n  var k1end = 0;\n  var k2start = 0;\n  var k2end = 0;\n  for (var d = 0; d < max_d; d++) {\n    // Walk the front path one step.\n    for (var k1 = -d + k1start; k1 <= d - k1end; k1 += 2) {\n      var k1_offset = v_offset + k1;\n      var x1;\n      if (k1 == -d || (k1 != d && v1[k1_offset - 1] < v1[k1_offset + 1])) {\n        x1 = v1[k1_offset + 1];\n      } else {\n        x1 = v1[k1_offset - 1] + 1;\n      }\n      var y1 = x1 - k1;\n      while (x1 < text1_length && y1 < text2_length &&\n             text1.charAt(x1) == text2.charAt(y1)) {\n        x1++;\n        y1++;\n      }\n      v1[k1_offset] = x1;\n      if (x1 > text1_length) {\n        // Ran off the right of the graph.\n        k1end += 2;\n      } else if (y1 > text2_length) {\n        // Ran off the bottom of the graph.\n        k1start += 2;\n      } else if (front) {\n        var k2_offset = v_offset + delta - k1;\n        if (k2_offset >= 0 && k2_offset < v_length && v2[k2_offset] != -1) {\n          // Mirror x2 onto top-left coordinate system.\n          var x2 = text1_length - v2[k2_offset];\n          if (x1 >= x2) {\n            // Overlap detected.\n            return diff_bisectSplit_(text1, text2, x1, y1);\n          }\n        }\n      }\n    }\n\n    // Walk the reverse path one step.\n    for (var k2 = -d + k2start; k2 <= d - k2end; k2 += 2) {\n      var k2_offset = v_offset + k2;\n      var x2;\n      if (k2 == -d || (k2 != d && v2[k2_offset - 1] < v2[k2_offset + 1])) {\n        x2 = v2[k2_offset + 1];\n      } else {\n        x2 = v2[k2_offset - 1] + 1;\n      }\n      var y2 = x2 - k2;\n      while (x2 < text1_length && y2 < text2_length &&\n             text1.charAt(text1_length - x2 - 1) ==\n             text2.charAt(text2_length - y2 - 1)) {\n        x2++;\n        y2++;\n      }\n      v2[k2_offset] = x2;\n      if (x2 > text1_length) {\n        // Ran off the left of the graph.\n        k2end += 2;\n      } else if (y2 > text2_length) {\n        // Ran off the top of the graph.\n        k2start += 2;\n      } else if (!front) {\n        var k1_offset = v_offset + delta - k2;\n        if (k1_offset >= 0 && k1_offset < v_length && v1[k1_offset] != -1) {\n          var x1 = v1[k1_offset];\n          var y1 = v_offset + x1 - k1_offset;\n          // Mirror x2 onto top-left coordinate system.\n          x2 = text1_length - x2;\n          if (x1 >= x2) {\n            // Overlap detected.\n            return diff_bisectSplit_(text1, text2, x1, y1);\n          }\n        }\n      }\n    }\n  }\n  // Diff took too long and hit the deadline or\n  // number of diffs equals number of characters, no commonality at all.\n  return [[DIFF_DELETE, text1], [DIFF_INSERT, text2]];\n};\n\n\n/**\n * Given the location of the 'middle snake', split the diff in two parts\n * and recurse.\n * @param {string} text1 Old string to be diffed.\n * @param {string} text2 New string to be diffed.\n * @param {number} x Index of split point in text1.\n * @param {number} y Index of split point in text2.\n * @return {Array} Array of diff tuples.\n */\nfunction diff_bisectSplit_(text1, text2, x, y) {\n  var text1a = text1.substring(0, x);\n  var text2a = text2.substring(0, y);\n  var text1b = text1.substring(x);\n  var text2b = text2.substring(y);\n\n  // Compute both diffs serially.\n  var diffs = diff_main(text1a, text2a);\n  var diffsb = diff_main(text1b, text2b);\n\n  return diffs.concat(diffsb);\n};\n\n\n/**\n * Determine the common prefix of two strings.\n * @param {string} text1 First string.\n * @param {string} text2 Second string.\n * @return {number} The number of characters common to the start of each\n *     string.\n */\nfunction diff_commonPrefix(text1, text2) {\n  // Quick check for common null cases.\n  if (!text1 || !text2 || text1.charAt(0) != text2.charAt(0)) {\n    return 0;\n  }\n  // Binary search.\n  // Performance analysis: http://neil.fraser.name/news/2007/10/09/\n  var pointermin = 0;\n  var pointermax = Math.min(text1.length, text2.length);\n  var pointermid = pointermax;\n  var pointerstart = 0;\n  while (pointermin < pointermid) {\n    if (text1.substring(pointerstart, pointermid) ==\n        text2.substring(pointerstart, pointermid)) {\n      pointermin = pointermid;\n      pointerstart = pointermin;\n    } else {\n      pointermax = pointermid;\n    }\n    pointermid = Math.floor((pointermax - pointermin) / 2 + pointermin);\n  }\n  return pointermid;\n};\n\n\n/**\n * Determine the common suffix of two strings.\n * @param {string} text1 First string.\n * @param {string} text2 Second string.\n * @return {number} The number of characters common to the end of each string.\n */\nfunction diff_commonSuffix(text1, text2) {\n  // Quick check for common null cases.\n  if (!text1 || !text2 ||\n      text1.charAt(text1.length - 1) != text2.charAt(text2.length - 1)) {\n    return 0;\n  }\n  // Binary search.\n  // Performance analysis: http://neil.fraser.name/news/2007/10/09/\n  var pointermin = 0;\n  var pointermax = Math.min(text1.length, text2.length);\n  var pointermid = pointermax;\n  var pointerend = 0;\n  while (pointermin < pointermid) {\n    if (text1.substring(text1.length - pointermid, text1.length - pointerend) ==\n        text2.substring(text2.length - pointermid, text2.length - pointerend)) {\n      pointermin = pointermid;\n      pointerend = pointermin;\n    } else {\n      pointermax = pointermid;\n    }\n    pointermid = Math.floor((pointermax - pointermin) / 2 + pointermin);\n  }\n  return pointermid;\n};\n\n\n/**\n * Do the two texts share a substring which is at least half the length of the\n * longer text?\n * This speedup can produce non-minimal diffs.\n * @param {string} text1 First string.\n * @param {string} text2 Second string.\n * @return {Array.<string>} Five element Array, containing the prefix of\n *     text1, the suffix of text1, the prefix of text2, the suffix of\n *     text2 and the common middle.  Or null if there was no match.\n */\nfunction diff_halfMatch_(text1, text2) {\n  var longtext = text1.length > text2.length ? text1 : text2;\n  var shorttext = text1.length > text2.length ? text2 : text1;\n  if (longtext.length < 4 || shorttext.length * 2 < longtext.length) {\n    return null;  // Pointless.\n  }\n\n  /**\n   * Does a substring of shorttext exist within longtext such that the substring\n   * is at least half the length of longtext?\n   * Closure, but does not reference any external variables.\n   * @param {string} longtext Longer string.\n   * @param {string} shorttext Shorter string.\n   * @param {number} i Start index of quarter length substring within longtext.\n   * @return {Array.<string>} Five element Array, containing the prefix of\n   *     longtext, the suffix of longtext, the prefix of shorttext, the suffix\n   *     of shorttext and the common middle.  Or null if there was no match.\n   * @private\n   */\n  function diff_halfMatchI_(longtext, shorttext, i) {\n    // Start with a 1/4 length substring at position i as a seed.\n    var seed = longtext.substring(i, i + Math.floor(longtext.length / 4));\n    var j = -1;\n    var best_common = '';\n    var best_longtext_a, best_longtext_b, best_shorttext_a, best_shorttext_b;\n    while ((j = shorttext.indexOf(seed, j + 1)) != -1) {\n      var prefixLength = diff_commonPrefix(longtext.substring(i),\n                                           shorttext.substring(j));\n      var suffixLength = diff_commonSuffix(longtext.substring(0, i),\n                                           shorttext.substring(0, j));\n      if (best_common.length < suffixLength + prefixLength) {\n        best_common = shorttext.substring(j - suffixLength, j) +\n            shorttext.substring(j, j + prefixLength);\n        best_longtext_a = longtext.substring(0, i - suffixLength);\n        best_longtext_b = longtext.substring(i + prefixLength);\n        best_shorttext_a = shorttext.substring(0, j - suffixLength);\n        best_shorttext_b = shorttext.substring(j + prefixLength);\n      }\n    }\n    if (best_common.length * 2 >= longtext.length) {\n      return [best_longtext_a, best_longtext_b,\n              best_shorttext_a, best_shorttext_b, best_common];\n    } else {\n      return null;\n    }\n  }\n\n  // First check if the second quarter is the seed for a half-match.\n  var hm1 = diff_halfMatchI_(longtext, shorttext,\n                             Math.ceil(longtext.length / 4));\n  // Check again based on the third quarter.\n  var hm2 = diff_halfMatchI_(longtext, shorttext,\n                             Math.ceil(longtext.length / 2));\n  var hm;\n  if (!hm1 && !hm2) {\n    return null;\n  } else if (!hm2) {\n    hm = hm1;\n  } else if (!hm1) {\n    hm = hm2;\n  } else {\n    // Both matched.  Select the longest.\n    hm = hm1[4].length > hm2[4].length ? hm1 : hm2;\n  }\n\n  // A half-match was found, sort out the return data.\n  var text1_a, text1_b, text2_a, text2_b;\n  if (text1.length > text2.length) {\n    text1_a = hm[0];\n    text1_b = hm[1];\n    text2_a = hm[2];\n    text2_b = hm[3];\n  } else {\n    text2_a = hm[0];\n    text2_b = hm[1];\n    text1_a = hm[2];\n    text1_b = hm[3];\n  }\n  var mid_common = hm[4];\n  return [text1_a, text1_b, text2_a, text2_b, mid_common];\n};\n\n\n/**\n * Reorder and merge like edit sections.  Merge equalities.\n * Any edit section can move as long as it doesn't cross an equality.\n * @param {Array} diffs Array of diff tuples.\n */\nfunction diff_cleanupMerge(diffs) {\n  diffs.push([DIFF_EQUAL, '']);  // Add a dummy entry at the end.\n  var pointer = 0;\n  var count_delete = 0;\n  var count_insert = 0;\n  var text_delete = '';\n  var text_insert = '';\n  var commonlength;\n  while (pointer < diffs.length) {\n    switch (diffs[pointer][0]) {\n      case DIFF_INSERT:\n        count_insert++;\n        text_insert += diffs[pointer][1];\n        pointer++;\n        break;\n      case DIFF_DELETE:\n        count_delete++;\n        text_delete += diffs[pointer][1];\n        pointer++;\n        break;\n      case DIFF_EQUAL:\n        // Upon reaching an equality, check for prior redundancies.\n        if (count_delete + count_insert > 1) {\n          if (count_delete !== 0 && count_insert !== 0) {\n            // Factor out any common prefixies.\n            commonlength = diff_commonPrefix(text_insert, text_delete);\n            if (commonlength !== 0) {\n              if ((pointer - count_delete - count_insert) > 0 &&\n                  diffs[pointer - count_delete - count_insert - 1][0] ==\n                  DIFF_EQUAL) {\n                diffs[pointer - count_delete - count_insert - 1][1] +=\n                    text_insert.substring(0, commonlength);\n              } else {\n                diffs.splice(0, 0, [DIFF_EQUAL,\n                                    text_insert.substring(0, commonlength)]);\n                pointer++;\n              }\n              text_insert = text_insert.substring(commonlength);\n              text_delete = text_delete.substring(commonlength);\n            }\n            // Factor out any common suffixies.\n            commonlength = diff_commonSuffix(text_insert, text_delete);\n            if (commonlength !== 0) {\n              diffs[pointer][1] = text_insert.substring(text_insert.length -\n                  commonlength) + diffs[pointer][1];\n              text_insert = text_insert.substring(0, text_insert.length -\n                  commonlength);\n              text_delete = text_delete.substring(0, text_delete.length -\n                  commonlength);\n            }\n          }\n          // Delete the offending records and add the merged ones.\n          if (count_delete === 0) {\n            diffs.splice(pointer - count_insert,\n                count_delete + count_insert, [DIFF_INSERT, text_insert]);\n          } else if (count_insert === 0) {\n            diffs.splice(pointer - count_delete,\n                count_delete + count_insert, [DIFF_DELETE, text_delete]);\n          } else {\n            diffs.splice(pointer - count_delete - count_insert,\n                count_delete + count_insert, [DIFF_DELETE, text_delete],\n                [DIFF_INSERT, text_insert]);\n          }\n          pointer = pointer - count_delete - count_insert +\n                    (count_delete ? 1 : 0) + (count_insert ? 1 : 0) + 1;\n        } else if (pointer !== 0 && diffs[pointer - 1][0] == DIFF_EQUAL) {\n          // Merge this equality with the previous one.\n          diffs[pointer - 1][1] += diffs[pointer][1];\n          diffs.splice(pointer, 1);\n        } else {\n          pointer++;\n        }\n        count_insert = 0;\n        count_delete = 0;\n        text_delete = '';\n        text_insert = '';\n        break;\n    }\n  }\n  if (diffs[diffs.length - 1][1] === '') {\n    diffs.pop();  // Remove the dummy entry at the end.\n  }\n\n  // Second pass: look for single edits surrounded on both sides by equalities\n  // which can be shifted sideways to eliminate an equality.\n  // e.g: A<ins>BA</ins>C -> <ins>AB</ins>AC\n  var changes = false;\n  pointer = 1;\n  // Intentionally ignore the first and last element (don't need checking).\n  while (pointer < diffs.length - 1) {\n    if (diffs[pointer - 1][0] == DIFF_EQUAL &&\n        diffs[pointer + 1][0] == DIFF_EQUAL) {\n      // This is a single edit surrounded by equalities.\n      if (diffs[pointer][1].substring(diffs[pointer][1].length -\n          diffs[pointer - 1][1].length) == diffs[pointer - 1][1]) {\n        // Shift the edit over the previous equality.\n        diffs[pointer][1] = diffs[pointer - 1][1] +\n            diffs[pointer][1].substring(0, diffs[pointer][1].length -\n                                        diffs[pointer - 1][1].length);\n        diffs[pointer + 1][1] = diffs[pointer - 1][1] + diffs[pointer + 1][1];\n        diffs.splice(pointer - 1, 1);\n        changes = true;\n      } else if (diffs[pointer][1].substring(0, diffs[pointer + 1][1].length) ==\n          diffs[pointer + 1][1]) {\n        // Shift the edit over the next equality.\n        diffs[pointer - 1][1] += diffs[pointer + 1][1];\n        diffs[pointer][1] =\n            diffs[pointer][1].substring(diffs[pointer + 1][1].length) +\n            diffs[pointer + 1][1];\n        diffs.splice(pointer + 1, 1);\n        changes = true;\n      }\n    }\n    pointer++;\n  }\n  // If shifts were made, the diff needs reordering and another shift sweep.\n  if (changes) {\n    diff_cleanupMerge(diffs);\n  }\n};\n\n\nvar diff = diff_main;\ndiff.INSERT = DIFF_INSERT;\ndiff.DELETE = DIFF_DELETE;\ndiff.EQUAL = DIFF_EQUAL;\n\nmodule.exports = diff;\n\n/*\n * Modify a diff such that the cursor position points to the start of a change:\n * E.g.\n *   cursor_normalize_diff([[DIFF_EQUAL, 'abc']], 1)\n *     => [1, [[DIFF_EQUAL, 'a'], [DIFF_EQUAL, 'bc']]]\n *   cursor_normalize_diff([[DIFF_INSERT, 'new'], [DIFF_DELETE, 'xyz']], 2)\n *     => [2, [[DIFF_INSERT, 'new'], [DIFF_DELETE, 'xy'], [DIFF_DELETE, 'z']]]\n *\n * @param {Array} diffs Array of diff tuples\n * @param {Int} cursor_pos Suggested edit position. Must not be out of bounds!\n * @return {Array} A tuple [cursor location in the modified diff, modified diff]\n */\nfunction cursor_normalize_diff (diffs, cursor_pos) {\n  if (cursor_pos === 0) {\n    return [DIFF_EQUAL, diffs];\n  }\n  for (var current_pos = 0, i = 0; i < diffs.length; i++) {\n    var d = diffs[i];\n    if (d[0] === DIFF_DELETE || d[0] === DIFF_EQUAL) {\n      var next_pos = current_pos + d[1].length;\n      if (cursor_pos === next_pos) {\n        return [i + 1, diffs];\n      } else if (cursor_pos < next_pos) {\n        // copy to prevent side effects\n        diffs = diffs.slice();\n        // split d into two diff changes\n        var split_pos = cursor_pos - current_pos;\n        var d_left = [d[0], d[1].slice(0, split_pos)];\n        var d_right = [d[0], d[1].slice(split_pos)];\n        diffs.splice(i, 1, d_left, d_right);\n        return [i + 1, diffs];\n      } else {\n        current_pos = next_pos;\n      }\n    }\n  }\n  throw new Error('cursor_pos is out of bounds!')\n}\n\n/*\n * Modify a diff such that the edit position is \"shifted\" to the proposed edit location (cursor_position).\n *\n * Case 1)\n *   Check if a naive shift is possible:\n *     [0, X], [ 1, Y] -> [ 1, Y], [0, X]    (if X + Y === Y + X)\n *     [0, X], [-1, Y] -> [-1, Y], [0, X]    (if X + Y === Y + X) - holds same result\n * Case 2)\n *   Check if the following shifts are possible:\n *     [0, 'pre'], [ 1, 'prefix'] -> [ 1, 'pre'], [0, 'pre'], [ 1, 'fix']\n *     [0, 'pre'], [-1, 'prefix'] -> [-1, 'pre'], [0, 'pre'], [-1, 'fix']\n *         ^            ^\n *         d          d_next\n *\n * @param {Array} diffs Array of diff tuples\n * @param {Int} cursor_pos Suggested edit position. Must not be out of bounds!\n * @return {Array} Array of diff tuples\n */\nfunction fix_cursor (diffs, cursor_pos) {\n  var norm = cursor_normalize_diff(diffs, cursor_pos);\n  var ndiffs = norm[1];\n  var cursor_pointer = norm[0];\n  var d = ndiffs[cursor_pointer];\n  var d_next = ndiffs[cursor_pointer + 1];\n\n  if (d == null) {\n    // Text was deleted from end of original string,\n    // cursor is now out of bounds in new string\n    return diffs;\n  } else if (d[0] !== DIFF_EQUAL) {\n    // A modification happened at the cursor location.\n    // This is the expected outcome, so we can return the original diff.\n    return diffs;\n  } else {\n    if (d_next != null && d[1] + d_next[1] === d_next[1] + d[1]) {\n      // Case 1)\n      // It is possible to perform a naive shift\n      ndiffs.splice(cursor_pointer, 2, d_next, d)\n      return merge_tuples(ndiffs, cursor_pointer, 2)\n    } else if (d_next != null && d_next[1].indexOf(d[1]) === 0) {\n      // Case 2)\n      // d[1] is a prefix of d_next[1]\n      // We can assume that d_next[0] !== 0, since d[0] === 0\n      // Shift edit locations..\n      ndiffs.splice(cursor_pointer, 2, [d_next[0], d[1]], [0, d[1]]);\n      var suffix = d_next[1].slice(d[1].length);\n      if (suffix.length > 0) {\n        ndiffs.splice(cursor_pointer + 2, 0, [d_next[0], suffix]);\n      }\n      return merge_tuples(ndiffs, cursor_pointer, 3)\n    } else {\n      // Not possible to perform any modification\n      return diffs;\n    }\n  }\n}\n\n/*\n * Check diff did not split surrogate pairs.\n * Ex. [0, '\\uD83D'], [-1, '\\uDC36'], [1, '\\uDC2F'] -> [-1, '\\uD83D\\uDC36'], [1, '\\uD83D\\uDC2F']\n *     '\\uD83D\\uDC36' === '🐶', '\\uD83D\\uDC2F' === '🐯'\n *\n * @param {Array} diffs Array of diff tuples\n * @return {Array} Array of diff tuples\n */\nfunction fix_emoji (diffs) {\n  var compact = false;\n  var starts_with_pair_end = function(str) {\n    return str.charCodeAt(0) >= 0xDC00 && str.charCodeAt(0) <= 0xDFFF;\n  }\n  var ends_with_pair_start = function(str) {\n    return str.charCodeAt(str.length-1) >= 0xD800 && str.charCodeAt(str.length-1) <= 0xDBFF;\n  }\n  for (var i = 2; i < diffs.length; i += 1) {\n    if (diffs[i-2][0] === DIFF_EQUAL && ends_with_pair_start(diffs[i-2][1]) &&\n        diffs[i-1][0] === DIFF_DELETE && starts_with_pair_end(diffs[i-1][1]) &&\n        diffs[i][0] === DIFF_INSERT && starts_with_pair_end(diffs[i][1])) {\n      compact = true;\n\n      diffs[i-1][1] = diffs[i-2][1].slice(-1) + diffs[i-1][1];\n      diffs[i][1] = diffs[i-2][1].slice(-1) + diffs[i][1];\n\n      diffs[i-2][1] = diffs[i-2][1].slice(0, -1);\n    }\n  }\n  if (!compact) {\n    return diffs;\n  }\n  var fixed_diffs = [];\n  for (var i = 0; i < diffs.length; i += 1) {\n    if (diffs[i][1].length > 0) {\n      fixed_diffs.push(diffs[i]);\n    }\n  }\n  return fixed_diffs;\n}\n\n/*\n * Try to merge tuples with their neigbors in a given range.\n * E.g. [0, 'a'], [0, 'b'] -> [0, 'ab']\n *\n * @param {Array} diffs Array of diff tuples.\n * @param {Int} start Position of the first element to merge (diffs[start] is also merged with diffs[start - 1]).\n * @param {Int} length Number of consecutive elements to check.\n * @return {Array} Array of merged diff tuples.\n */\nfunction merge_tuples (diffs, start, length) {\n  // Check from (start-1) to (start+length).\n  for (var i = start + length - 1; i >= 0 && i >= start - 1; i--) {\n    if (i + 1 < diffs.length) {\n      var left_d = diffs[i];\n      var right_d = diffs[i+1];\n      if (left_d[0] === right_d[1]) {\n        diffs.splice(i, 2, [left_d[0], left_d[1] + right_d[1]]);\n      }\n    }\n  }\n  return diffs;\n}\n\n\n/***/ }),\n/* 52 */\n/***/ (function(module, exports) {\n\nexports = module.exports = typeof Object.keys === 'function'\n  ? Object.keys : shim;\n\nexports.shim = shim;\nfunction shim (obj) {\n  var keys = [];\n  for (var key in obj) keys.push(key);\n  return keys;\n}\n\n\n/***/ }),\n/* 53 */\n/***/ (function(module, exports) {\n\nvar supportsArgumentsClass = (function(){\n  return Object.prototype.toString.call(arguments)\n})() == '[object Arguments]';\n\nexports = module.exports = supportsArgumentsClass ? supported : unsupported;\n\nexports.supported = supported;\nfunction supported(object) {\n  return Object.prototype.toString.call(object) == '[object Arguments]';\n};\n\nexports.unsupported = unsupported;\nfunction unsupported(object){\n  return object &&\n    typeof object == 'object' &&\n    typeof object.length == 'number' &&\n    Object.prototype.hasOwnProperty.call(object, 'callee') &&\n    !Object.prototype.propertyIsEnumerable.call(object, 'callee') ||\n    false;\n};\n\n\n/***/ }),\n/* 54 */\n/***/ (function(module, exports) {\n\n'use strict';\n\nvar has = Object.prototype.hasOwnProperty\n  , prefix = '~';\n\n/**\n * Constructor to create a storage for our `EE` objects.\n * An `Events` instance is a plain object whose properties are event names.\n *\n * @constructor\n * @api private\n */\nfunction Events() {}\n\n//\n// We try to not inherit from `Object.prototype`. In some engines creating an\n// instance in this way is faster than calling `Object.create(null)` directly.\n// If `Object.create(null)` is not supported we prefix the event names with a\n// character to make sure that the built-in object properties are not\n// overridden or used as an attack vector.\n//\nif (Object.create) {\n  Events.prototype = Object.create(null);\n\n  //\n  // This hack is needed because the `__proto__` property is still inherited in\n  // some old browsers like Android 4, iPhone 5.1, Opera 11 and Safari 5.\n  //\n  if (!new Events().__proto__) prefix = false;\n}\n\n/**\n * Representation of a single event listener.\n *\n * @param {Function} fn The listener function.\n * @param {Mixed} context The context to invoke the listener with.\n * @param {Boolean} [once=false] Specify if the listener is a one-time listener.\n * @constructor\n * @api private\n */\nfunction EE(fn, context, once) {\n  this.fn = fn;\n  this.context = context;\n  this.once = once || false;\n}\n\n/**\n * Minimal `EventEmitter` interface that is molded against the Node.js\n * `EventEmitter` interface.\n *\n * @constructor\n * @api public\n */\nfunction EventEmitter() {\n  this._events = new Events();\n  this._eventsCount = 0;\n}\n\n/**\n * Return an array listing the events for which the emitter has registered\n * listeners.\n *\n * @returns {Array}\n * @api public\n */\nEventEmitter.prototype.eventNames = function eventNames() {\n  var names = []\n    , events\n    , name;\n\n  if (this._eventsCount === 0) return names;\n\n  for (name in (events = this._events)) {\n    if (has.call(events, name)) names.push(prefix ? name.slice(1) : name);\n  }\n\n  if (Object.getOwnPropertySymbols) {\n    return names.concat(Object.getOwnPropertySymbols(events));\n  }\n\n  return names;\n};\n\n/**\n * Return the listeners registered for a given event.\n *\n * @param {String|Symbol} event The event name.\n * @param {Boolean} exists Only check if there are listeners.\n * @returns {Array|Boolean}\n * @api public\n */\nEventEmitter.prototype.listeners = function listeners(event, exists) {\n  var evt = prefix ? prefix + event : event\n    , available = this._events[evt];\n\n  if (exists) return !!available;\n  if (!available) return [];\n  if (available.fn) return [available.fn];\n\n  for (var i = 0, l = available.length, ee = new Array(l); i < l; i++) {\n    ee[i] = available[i].fn;\n  }\n\n  return ee;\n};\n\n/**\n * Calls each of the listeners registered for a given event.\n *\n * @param {String|Symbol} event The event name.\n * @returns {Boolean} `true` if the event had listeners, else `false`.\n * @api public\n */\nEventEmitter.prototype.emit = function emit(event, a1, a2, a3, a4, a5) {\n  var evt = prefix ? prefix + event : event;\n\n  if (!this._events[evt]) return false;\n\n  var listeners = this._events[evt]\n    , len = arguments.length\n    , args\n    , i;\n\n  if (listeners.fn) {\n    if (listeners.once) this.removeListener(event, listeners.fn, undefined, true);\n\n    switch (len) {\n      case 1: return listeners.fn.call(listeners.context), true;\n      case 2: return listeners.fn.call(listeners.context, a1), true;\n      case 3: return listeners.fn.call(listeners.context, a1, a2), true;\n      case 4: return listeners.fn.call(listeners.context, a1, a2, a3), true;\n      case 5: return listeners.fn.call(listeners.context, a1, a2, a3, a4), true;\n      case 6: return listeners.fn.call(listeners.context, a1, a2, a3, a4, a5), true;\n    }\n\n    for (i = 1, args = new Array(len -1); i < len; i++) {\n      args[i - 1] = arguments[i];\n    }\n\n    listeners.fn.apply(listeners.context, args);\n  } else {\n    var length = listeners.length\n      , j;\n\n    for (i = 0; i < length; i++) {\n      if (listeners[i].once) this.removeListener(event, listeners[i].fn, undefined, true);\n\n      switch (len) {\n        case 1: listeners[i].fn.call(listeners[i].context); break;\n        case 2: listeners[i].fn.call(listeners[i].context, a1); break;\n        case 3: listeners[i].fn.call(listeners[i].context, a1, a2); break;\n        case 4: listeners[i].fn.call(listeners[i].context, a1, a2, a3); break;\n        default:\n          if (!args) for (j = 1, args = new Array(len -1); j < len; j++) {\n            args[j - 1] = arguments[j];\n          }\n\n          listeners[i].fn.apply(listeners[i].context, args);\n      }\n    }\n  }\n\n  return true;\n};\n\n/**\n * Add a listener for a given event.\n *\n * @param {String|Symbol} event The event name.\n * @param {Function} fn The listener function.\n * @param {Mixed} [context=this] The context to invoke the listener with.\n * @returns {EventEmitter} `this`.\n * @api public\n */\nEventEmitter.prototype.on = function on(event, fn, context) {\n  var listener = new EE(fn, context || this)\n    , evt = prefix ? prefix + event : event;\n\n  if (!this._events[evt]) this._events[evt] = listener, this._eventsCount++;\n  else if (!this._events[evt].fn) this._events[evt].push(listener);\n  else this._events[evt] = [this._events[evt], listener];\n\n  return this;\n};\n\n/**\n * Add a one-time listener for a given event.\n *\n * @param {String|Symbol} event The event name.\n * @param {Function} fn The listener function.\n * @param {Mixed} [context=this] The context to invoke the listener with.\n * @returns {EventEmitter} `this`.\n * @api public\n */\nEventEmitter.prototype.once = function once(event, fn, context) {\n  var listener = new EE(fn, context || this, true)\n    , evt = prefix ? prefix + event : event;\n\n  if (!this._events[evt]) this._events[evt] = listener, this._eventsCount++;\n  else if (!this._events[evt].fn) this._events[evt].push(listener);\n  else this._events[evt] = [this._events[evt], listener];\n\n  return this;\n};\n\n/**\n * Remove the listeners of a given event.\n *\n * @param {String|Symbol} event The event name.\n * @param {Function} fn Only remove the listeners that match this function.\n * @param {Mixed} context Only remove the listeners that have this context.\n * @param {Boolean} once Only remove one-time listeners.\n * @returns {EventEmitter} `this`.\n * @api public\n */\nEventEmitter.prototype.removeListener = function removeListener(event, fn, context, once) {\n  var evt = prefix ? prefix + event : event;\n\n  if (!this._events[evt]) return this;\n  if (!fn) {\n    if (--this._eventsCount === 0) this._events = new Events();\n    else delete this._events[evt];\n    return this;\n  }\n\n  var listeners = this._events[evt];\n\n  if (listeners.fn) {\n    if (\n         listeners.fn === fn\n      && (!once || listeners.once)\n      && (!context || listeners.context === context)\n    ) {\n      if (--this._eventsCount === 0) this._events = new Events();\n      else delete this._events[evt];\n    }\n  } else {\n    for (var i = 0, events = [], length = listeners.length; i < length; i++) {\n      if (\n           listeners[i].fn !== fn\n        || (once && !listeners[i].once)\n        || (context && listeners[i].context !== context)\n      ) {\n        events.push(listeners[i]);\n      }\n    }\n\n    //\n    // Reset the array, or remove it completely if we have no more listeners.\n    //\n    if (events.length) this._events[evt] = events.length === 1 ? events[0] : events;\n    else if (--this._eventsCount === 0) this._events = new Events();\n    else delete this._events[evt];\n  }\n\n  return this;\n};\n\n/**\n * Remove all listeners, or those of the specified event.\n *\n * @param {String|Symbol} [event] The event name.\n * @returns {EventEmitter} `this`.\n * @api public\n */\nEventEmitter.prototype.removeAllListeners = function removeAllListeners(event) {\n  var evt;\n\n  if (event) {\n    evt = prefix ? prefix + event : event;\n    if (this._events[evt]) {\n      if (--this._eventsCount === 0) this._events = new Events();\n      else delete this._events[evt];\n    }\n  } else {\n    this._events = new Events();\n    this._eventsCount = 0;\n  }\n\n  return this;\n};\n\n//\n// Alias methods names because people roll like that.\n//\nEventEmitter.prototype.off = EventEmitter.prototype.removeListener;\nEventEmitter.prototype.addListener = EventEmitter.prototype.on;\n\n//\n// This function doesn't apply anymore.\n//\nEventEmitter.prototype.setMaxListeners = function setMaxListeners() {\n  return this;\n};\n\n//\n// Expose the prefix.\n//\nEventEmitter.prefixed = prefix;\n\n//\n// Allow `EventEmitter` to be imported as module namespace.\n//\nEventEmitter.EventEmitter = EventEmitter;\n\n//\n// Expose the module.\n//\nif ('undefined' !== typeof module) {\n  module.exports = EventEmitter;\n}\n\n\n/***/ }),\n/* 55 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.matchText = exports.matchSpacing = exports.matchNewline = exports.matchBlot = exports.matchAttributor = exports.default = undefined;\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nvar _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"]) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); } }; }();\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _extend2 = __webpack_require__(3);\n\nvar _extend3 = _interopRequireDefault(_extend2);\n\nvar _quillDelta = __webpack_require__(2);\n\nvar _quillDelta2 = _interopRequireDefault(_quillDelta);\n\nvar _parchment = __webpack_require__(0);\n\nvar _parchment2 = _interopRequireDefault(_parchment);\n\nvar _quill = __webpack_require__(5);\n\nvar _quill2 = _interopRequireDefault(_quill);\n\nvar _logger = __webpack_require__(10);\n\nvar _logger2 = _interopRequireDefault(_logger);\n\nvar _module = __webpack_require__(9);\n\nvar _module2 = _interopRequireDefault(_module);\n\nvar _align = __webpack_require__(36);\n\nvar _background = __webpack_require__(37);\n\nvar _code = __webpack_require__(13);\n\nvar _code2 = _interopRequireDefault(_code);\n\nvar _color = __webpack_require__(25);\n\nvar _direction = __webpack_require__(38);\n\nvar _font = __webpack_require__(39);\n\nvar _size = __webpack_require__(40);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar debug = (0, _logger2.default)('quill:clipboard');\n\nvar DOM_KEY = '__ql-matcher';\n\nvar CLIPBOARD_CONFIG = [[Node.TEXT_NODE, matchText], [Node.TEXT_NODE, matchNewline], ['br', matchBreak], [Node.ELEMENT_NODE, matchNewline], [Node.ELEMENT_NODE, matchBlot], [Node.ELEMENT_NODE, matchSpacing], [Node.ELEMENT_NODE, matchAttributor], [Node.ELEMENT_NODE, matchStyles], ['li', matchIndent], ['b', matchAlias.bind(matchAlias, 'bold')], ['i', matchAlias.bind(matchAlias, 'italic')], ['style', matchIgnore]];\n\nvar ATTRIBUTE_ATTRIBUTORS = [_align.AlignAttribute, _direction.DirectionAttribute].reduce(function (memo, attr) {\n  memo[attr.keyName] = attr;\n  return memo;\n}, {});\n\nvar STYLE_ATTRIBUTORS = [_align.AlignStyle, _background.BackgroundStyle, _color.ColorStyle, _direction.DirectionStyle, _font.FontStyle, _size.SizeStyle].reduce(function (memo, attr) {\n  memo[attr.keyName] = attr;\n  return memo;\n}, {});\n\nvar Clipboard = function (_Module) {\n  _inherits(Clipboard, _Module);\n\n  function Clipboard(quill, options) {\n    _classCallCheck(this, Clipboard);\n\n    var _this = _possibleConstructorReturn(this, (Clipboard.__proto__ || Object.getPrototypeOf(Clipboard)).call(this, quill, options));\n\n    _this.quill.root.addEventListener('paste', _this.onPaste.bind(_this));\n    _this.container = _this.quill.addContainer('ql-clipboard');\n    _this.container.setAttribute('contenteditable', true);\n    _this.container.setAttribute('tabindex', -1);\n    _this.matchers = [];\n    CLIPBOARD_CONFIG.concat(_this.options.matchers).forEach(function (_ref) {\n      var _ref2 = _slicedToArray(_ref, 2),\n          selector = _ref2[0],\n          matcher = _ref2[1];\n\n      if (!options.matchVisual && matcher === matchSpacing) return;\n      _this.addMatcher(selector, matcher);\n    });\n    return _this;\n  }\n\n  _createClass(Clipboard, [{\n    key: 'addMatcher',\n    value: function addMatcher(selector, matcher) {\n      this.matchers.push([selector, matcher]);\n    }\n  }, {\n    key: 'convert',\n    value: function convert(html) {\n      if (typeof html === 'string') {\n        this.container.innerHTML = html.replace(/\\>\\r?\\n +\\</g, '><'); // Remove spaces between tags\n        return this.convert();\n      }\n      var formats = this.quill.getFormat(this.quill.selection.savedRange.index);\n      if (formats[_code2.default.blotName]) {\n        var text = this.container.innerText;\n        this.container.innerHTML = '';\n        return new _quillDelta2.default().insert(text, _defineProperty({}, _code2.default.blotName, formats[_code2.default.blotName]));\n      }\n\n      var _prepareMatching = this.prepareMatching(),\n          _prepareMatching2 = _slicedToArray(_prepareMatching, 2),\n          elementMatchers = _prepareMatching2[0],\n          textMatchers = _prepareMatching2[1];\n\n      var delta = traverse(this.container, elementMatchers, textMatchers);\n      // Remove trailing newline\n      if (deltaEndsWith(delta, '\\n') && delta.ops[delta.ops.length - 1].attributes == null) {\n        delta = delta.compose(new _quillDelta2.default().retain(delta.length() - 1).delete(1));\n      }\n      debug.log('convert', this.container.innerHTML, delta);\n      this.container.innerHTML = '';\n      return delta;\n    }\n  }, {\n    key: 'dangerouslyPasteHTML',\n    value: function dangerouslyPasteHTML(index, html) {\n      var source = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : _quill2.default.sources.API;\n\n      if (typeof index === 'string') {\n        this.quill.setContents(this.convert(index), html);\n        this.quill.setSelection(0, _quill2.default.sources.SILENT);\n      } else {\n        var paste = this.convert(html);\n        this.quill.updateContents(new _quillDelta2.default().retain(index).concat(paste), source);\n        this.quill.setSelection(index + paste.length(), _quill2.default.sources.SILENT);\n      }\n    }\n  }, {\n    key: 'onPaste',\n    value: function onPaste(e) {\n      var _this2 = this;\n\n      if (e.defaultPrevented || !this.quill.isEnabled()) return;\n      var range = this.quill.getSelection();\n      var delta = new _quillDelta2.default().retain(range.index);\n      var scrollTop = this.quill.scrollingContainer.scrollTop;\n      this.container.focus();\n      this.quill.selection.update(_quill2.default.sources.SILENT);\n      setTimeout(function () {\n        delta = delta.concat(_this2.convert()).delete(range.length);\n        _this2.quill.updateContents(delta, _quill2.default.sources.USER);\n        // range.length contributes to delta.length()\n        _this2.quill.setSelection(delta.length() - range.length, _quill2.default.sources.SILENT);\n        _this2.quill.scrollingContainer.scrollTop = scrollTop;\n        _this2.quill.focus();\n      }, 1);\n    }\n  }, {\n    key: 'prepareMatching',\n    value: function prepareMatching() {\n      var _this3 = this;\n\n      var elementMatchers = [],\n          textMatchers = [];\n      this.matchers.forEach(function (pair) {\n        var _pair = _slicedToArray(pair, 2),\n            selector = _pair[0],\n            matcher = _pair[1];\n\n        switch (selector) {\n          case Node.TEXT_NODE:\n            textMatchers.push(matcher);\n            break;\n          case Node.ELEMENT_NODE:\n            elementMatchers.push(matcher);\n            break;\n          default:\n            [].forEach.call(_this3.container.querySelectorAll(selector), function (node) {\n              // TODO use weakmap\n              node[DOM_KEY] = node[DOM_KEY] || [];\n              node[DOM_KEY].push(matcher);\n            });\n            break;\n        }\n      });\n      return [elementMatchers, textMatchers];\n    }\n  }]);\n\n  return Clipboard;\n}(_module2.default);\n\nClipboard.DEFAULTS = {\n  matchers: [],\n  matchVisual: true\n};\n\nfunction applyFormat(delta, format, value) {\n  if ((typeof format === 'undefined' ? 'undefined' : _typeof(format)) === 'object') {\n    return Object.keys(format).reduce(function (delta, key) {\n      return applyFormat(delta, key, format[key]);\n    }, delta);\n  } else {\n    return delta.reduce(function (delta, op) {\n      if (op.attributes && op.attributes[format]) {\n        return delta.push(op);\n      } else {\n        return delta.insert(op.insert, (0, _extend3.default)({}, _defineProperty({}, format, value), op.attributes));\n      }\n    }, new _quillDelta2.default());\n  }\n}\n\nfunction computeStyle(node) {\n  if (node.nodeType !== Node.ELEMENT_NODE) return {};\n  var DOM_KEY = '__ql-computed-style';\n  return node[DOM_KEY] || (node[DOM_KEY] = window.getComputedStyle(node));\n}\n\nfunction deltaEndsWith(delta, text) {\n  var endText = \"\";\n  for (var i = delta.ops.length - 1; i >= 0 && endText.length < text.length; --i) {\n    var op = delta.ops[i];\n    if (typeof op.insert !== 'string') break;\n    endText = op.insert + endText;\n  }\n  return endText.slice(-1 * text.length) === text;\n}\n\nfunction isLine(node) {\n  if (node.childNodes.length === 0) return false; // Exclude embed blocks\n  var style = computeStyle(node);\n  return ['block', 'list-item'].indexOf(style.display) > -1;\n}\n\nfunction traverse(node, elementMatchers, textMatchers) {\n  // Post-order\n  if (node.nodeType === node.TEXT_NODE) {\n    return textMatchers.reduce(function (delta, matcher) {\n      return matcher(node, delta);\n    }, new _quillDelta2.default());\n  } else if (node.nodeType === node.ELEMENT_NODE) {\n    return [].reduce.call(node.childNodes || [], function (delta, childNode) {\n      var childrenDelta = traverse(childNode, elementMatchers, textMatchers);\n      if (childNode.nodeType === node.ELEMENT_NODE) {\n        childrenDelta = elementMatchers.reduce(function (childrenDelta, matcher) {\n          return matcher(childNode, childrenDelta);\n        }, childrenDelta);\n        childrenDelta = (childNode[DOM_KEY] || []).reduce(function (childrenDelta, matcher) {\n          return matcher(childNode, childrenDelta);\n        }, childrenDelta);\n      }\n      return delta.concat(childrenDelta);\n    }, new _quillDelta2.default());\n  } else {\n    return new _quillDelta2.default();\n  }\n}\n\nfunction matchAlias(format, node, delta) {\n  return applyFormat(delta, format, true);\n}\n\nfunction matchAttributor(node, delta) {\n  var attributes = _parchment2.default.Attributor.Attribute.keys(node);\n  var classes = _parchment2.default.Attributor.Class.keys(node);\n  var styles = _parchment2.default.Attributor.Style.keys(node);\n  var formats = {};\n  attributes.concat(classes).concat(styles).forEach(function (name) {\n    var attr = _parchment2.default.query(name, _parchment2.default.Scope.ATTRIBUTE);\n    if (attr != null) {\n      formats[attr.attrName] = attr.value(node);\n      if (formats[attr.attrName]) return;\n    }\n    attr = ATTRIBUTE_ATTRIBUTORS[name];\n    if (attr != null && (attr.attrName === name || attr.keyName === name)) {\n      formats[attr.attrName] = attr.value(node) || undefined;\n    }\n    attr = STYLE_ATTRIBUTORS[name];\n    if (attr != null && (attr.attrName === name || attr.keyName === name)) {\n      attr = STYLE_ATTRIBUTORS[name];\n      formats[attr.attrName] = attr.value(node) || undefined;\n    }\n  });\n  if (Object.keys(formats).length > 0) {\n    delta = applyFormat(delta, formats);\n  }\n  return delta;\n}\n\nfunction matchBlot(node, delta) {\n  var match = _parchment2.default.query(node);\n  if (match == null) return delta;\n  if (match.prototype instanceof _parchment2.default.Embed) {\n    var embed = {};\n    var value = match.value(node);\n    if (value != null) {\n      embed[match.blotName] = value;\n      delta = new _quillDelta2.default().insert(embed, match.formats(node));\n    }\n  } else if (typeof match.formats === 'function') {\n    delta = applyFormat(delta, match.blotName, match.formats(node));\n  }\n  return delta;\n}\n\nfunction matchBreak(node, delta) {\n  if (!deltaEndsWith(delta, '\\n')) {\n    delta.insert('\\n');\n  }\n  return delta;\n}\n\nfunction matchIgnore() {\n  return new _quillDelta2.default();\n}\n\nfunction matchIndent(node, delta) {\n  var match = _parchment2.default.query(node);\n  if (match == null || match.blotName !== 'list-item' || !deltaEndsWith(delta, '\\n')) {\n    return delta;\n  }\n  var indent = -1,\n      parent = node.parentNode;\n  while (!parent.classList.contains('ql-clipboard')) {\n    if ((_parchment2.default.query(parent) || {}).blotName === 'list') {\n      indent += 1;\n    }\n    parent = parent.parentNode;\n  }\n  if (indent <= 0) return delta;\n  return delta.compose(new _quillDelta2.default().retain(delta.length() - 1).retain(1, { indent: indent }));\n}\n\nfunction matchNewline(node, delta) {\n  if (!deltaEndsWith(delta, '\\n')) {\n    if (isLine(node) || delta.length() > 0 && node.nextSibling && isLine(node.nextSibling)) {\n      delta.insert('\\n');\n    }\n  }\n  return delta;\n}\n\nfunction matchSpacing(node, delta) {\n  if (isLine(node) && node.nextElementSibling != null && !deltaEndsWith(delta, '\\n\\n')) {\n    var nodeHeight = node.offsetHeight + parseFloat(computeStyle(node).marginTop) + parseFloat(computeStyle(node).marginBottom);\n    if (node.nextElementSibling.offsetTop > node.offsetTop + nodeHeight * 1.5) {\n      delta.insert('\\n');\n    }\n  }\n  return delta;\n}\n\nfunction matchStyles(node, delta) {\n  var formats = {};\n  var style = node.style || {};\n  if (style.fontStyle && computeStyle(node).fontStyle === 'italic') {\n    formats.italic = true;\n  }\n  if (style.fontWeight && (computeStyle(node).fontWeight.startsWith('bold') || parseInt(computeStyle(node).fontWeight) >= 700)) {\n    formats.bold = true;\n  }\n  if (Object.keys(formats).length > 0) {\n    delta = applyFormat(delta, formats);\n  }\n  if (parseFloat(style.textIndent || 0) > 0) {\n    // Could be 0.5in\n    delta = new _quillDelta2.default().insert('\\t').concat(delta);\n  }\n  return delta;\n}\n\nfunction matchText(node, delta) {\n  var text = node.data;\n  // Word represents empty line with <o:p>&nbsp;</o:p>\n  if (node.parentNode.tagName === 'O:P') {\n    return delta.insert(text.trim());\n  }\n  if (text.trim().length === 0 && node.parentNode.classList.contains('ql-clipboard')) {\n    return delta;\n  }\n  if (!computeStyle(node.parentNode).whiteSpace.startsWith('pre')) {\n    // eslint-disable-next-line func-style\n    var replacer = function replacer(collapse, match) {\n      match = match.replace(/[^\\u00a0]/g, ''); // \\u00a0 is nbsp;\n      return match.length < 1 && collapse ? ' ' : match;\n    };\n    text = text.replace(/\\r\\n/g, ' ').replace(/\\n/g, ' ');\n    text = text.replace(/\\s\\s+/g, replacer.bind(replacer, true)); // collapse whitespace\n    if (node.previousSibling == null && isLine(node.parentNode) || node.previousSibling != null && isLine(node.previousSibling)) {\n      text = text.replace(/^\\s+/, replacer.bind(replacer, false));\n    }\n    if (node.nextSibling == null && isLine(node.parentNode) || node.nextSibling != null && isLine(node.nextSibling)) {\n      text = text.replace(/\\s+$/, replacer.bind(replacer, false));\n    }\n  }\n  return delta.insert(text);\n}\n\nexports.default = Clipboard;\nexports.matchAttributor = matchAttributor;\nexports.matchBlot = matchBlot;\nexports.matchNewline = matchNewline;\nexports.matchSpacing = matchSpacing;\nexports.matchText = matchText;\n\n/***/ }),\n/* 56 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if (\"value\" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };\n\nvar _inline = __webpack_require__(6);\n\nvar _inline2 = _interopRequireDefault(_inline);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar Bold = function (_Inline) {\n  _inherits(Bold, _Inline);\n\n  function Bold() {\n    _classCallCheck(this, Bold);\n\n    return _possibleConstructorReturn(this, (Bold.__proto__ || Object.getPrototypeOf(Bold)).apply(this, arguments));\n  }\n\n  _createClass(Bold, [{\n    key: 'optimize',\n    value: function optimize(context) {\n      _get(Bold.prototype.__proto__ || Object.getPrototypeOf(Bold.prototype), 'optimize', this).call(this, context);\n      if (this.domNode.tagName !== this.statics.tagName[0]) {\n        this.replaceWith(this.statics.blotName);\n      }\n    }\n  }], [{\n    key: 'create',\n    value: function create() {\n      return _get(Bold.__proto__ || Object.getPrototypeOf(Bold), 'create', this).call(this);\n    }\n  }, {\n    key: 'formats',\n    value: function formats() {\n      return true;\n    }\n  }]);\n\n  return Bold;\n}(_inline2.default);\n\nBold.blotName = 'bold';\nBold.tagName = ['STRONG', 'B'];\n\nexports.default = Bold;\n\n/***/ }),\n/* 57 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.addControls = exports.default = undefined;\n\nvar _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"]) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); } }; }();\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _quillDelta = __webpack_require__(2);\n\nvar _quillDelta2 = _interopRequireDefault(_quillDelta);\n\nvar _parchment = __webpack_require__(0);\n\nvar _parchment2 = _interopRequireDefault(_parchment);\n\nvar _quill = __webpack_require__(5);\n\nvar _quill2 = _interopRequireDefault(_quill);\n\nvar _logger = __webpack_require__(10);\n\nvar _logger2 = _interopRequireDefault(_logger);\n\nvar _module = __webpack_require__(9);\n\nvar _module2 = _interopRequireDefault(_module);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar debug = (0, _logger2.default)('quill:toolbar');\n\nvar Toolbar = function (_Module) {\n  _inherits(Toolbar, _Module);\n\n  function Toolbar(quill, options) {\n    _classCallCheck(this, Toolbar);\n\n    var _this = _possibleConstructorReturn(this, (Toolbar.__proto__ || Object.getPrototypeOf(Toolbar)).call(this, quill, options));\n\n    if (Array.isArray(_this.options.container)) {\n      var container = document.createElement('div');\n      addControls(container, _this.options.container);\n      quill.container.parentNode.insertBefore(container, quill.container);\n      _this.container = container;\n    } else if (typeof _this.options.container === 'string') {\n      _this.container = document.querySelector(_this.options.container);\n    } else {\n      _this.container = _this.options.container;\n    }\n    if (!(_this.container instanceof HTMLElement)) {\n      var _ret;\n\n      return _ret = debug.error('Container required for toolbar', _this.options), _possibleConstructorReturn(_this, _ret);\n    }\n    _this.container.classList.add('ql-toolbar');\n    _this.controls = [];\n    _this.handlers = {};\n    Object.keys(_this.options.handlers).forEach(function (format) {\n      _this.addHandler(format, _this.options.handlers[format]);\n    });\n    [].forEach.call(_this.container.querySelectorAll('button, select'), function (input) {\n      _this.attach(input);\n    });\n    _this.quill.on(_quill2.default.events.EDITOR_CHANGE, function (type, range) {\n      if (type === _quill2.default.events.SELECTION_CHANGE) {\n        _this.update(range);\n      }\n    });\n    _this.quill.on(_quill2.default.events.SCROLL_OPTIMIZE, function () {\n      var _this$quill$selection = _this.quill.selection.getRange(),\n          _this$quill$selection2 = _slicedToArray(_this$quill$selection, 1),\n          range = _this$quill$selection2[0]; // quill.getSelection triggers update\n\n\n      _this.update(range);\n    });\n    return _this;\n  }\n\n  _createClass(Toolbar, [{\n    key: 'addHandler',\n    value: function addHandler(format, handler) {\n      this.handlers[format] = handler;\n    }\n  }, {\n    key: 'attach',\n    value: function attach(input) {\n      var _this2 = this;\n\n      var format = [].find.call(input.classList, function (className) {\n        return className.indexOf('ql-') === 0;\n      });\n      if (!format) return;\n      format = format.slice('ql-'.length);\n      if (input.tagName === 'BUTTON') {\n        input.setAttribute('type', 'button');\n      }\n      if (this.handlers[format] == null) {\n        if (this.quill.scroll.whitelist != null && this.quill.scroll.whitelist[format] == null) {\n          debug.warn('ignoring attaching to disabled format', format, input);\n          return;\n        }\n        if (_parchment2.default.query(format) == null) {\n          debug.warn('ignoring attaching to nonexistent format', format, input);\n          return;\n        }\n      }\n      var eventName = input.tagName === 'SELECT' ? 'change' : 'click';\n      input.addEventListener(eventName, function (e) {\n        var value = void 0;\n        if (input.tagName === 'SELECT') {\n          if (input.selectedIndex < 0) return;\n          var selected = input.options[input.selectedIndex];\n          if (selected.hasAttribute('selected')) {\n            value = false;\n          } else {\n            value = selected.value || false;\n          }\n        } else {\n          if (input.classList.contains('ql-active')) {\n            value = false;\n          } else {\n            value = input.value || !input.hasAttribute('value');\n          }\n          e.preventDefault();\n        }\n        _this2.quill.focus();\n\n        var _quill$selection$getR = _this2.quill.selection.getRange(),\n            _quill$selection$getR2 = _slicedToArray(_quill$selection$getR, 1),\n            range = _quill$selection$getR2[0];\n\n        if (_this2.handlers[format] != null) {\n          _this2.handlers[format].call(_this2, value);\n        } else if (_parchment2.default.query(format).prototype instanceof _parchment2.default.Embed) {\n          value = prompt('Enter ' + format);\n          if (!value) return;\n          _this2.quill.updateContents(new _quillDelta2.default().retain(range.index).delete(range.length).insert(_defineProperty({}, format, value)), _quill2.default.sources.USER);\n        } else {\n          _this2.quill.format(format, value, _quill2.default.sources.USER);\n        }\n        _this2.update(range);\n      });\n      // TODO use weakmap\n      this.controls.push([format, input]);\n    }\n  }, {\n    key: 'update',\n    value: function update(range) {\n      var formats = range == null ? {} : this.quill.getFormat(range);\n      this.controls.forEach(function (pair) {\n        var _pair = _slicedToArray(pair, 2),\n            format = _pair[0],\n            input = _pair[1];\n\n        if (input.tagName === 'SELECT') {\n          var option = void 0;\n          if (range == null) {\n            option = null;\n          } else if (formats[format] == null) {\n            option = input.querySelector('option[selected]');\n          } else if (!Array.isArray(formats[format])) {\n            var value = formats[format];\n            if (typeof value === 'string') {\n              value = value.replace(/\\\"/g, '\\\\\"');\n            }\n            option = input.querySelector('option[value=\"' + value + '\"]');\n          }\n          if (option == null) {\n            input.value = ''; // TODO make configurable?\n            input.selectedIndex = -1;\n          } else {\n            option.selected = true;\n          }\n        } else {\n          if (range == null) {\n            input.classList.remove('ql-active');\n          } else if (input.hasAttribute('value')) {\n            // both being null should match (default values)\n            // '1' should match with 1 (headers)\n            var isActive = formats[format] === input.getAttribute('value') || formats[format] != null && formats[format].toString() === input.getAttribute('value') || formats[format] == null && !input.getAttribute('value');\n            input.classList.toggle('ql-active', isActive);\n          } else {\n            input.classList.toggle('ql-active', formats[format] != null);\n          }\n        }\n      });\n    }\n  }]);\n\n  return Toolbar;\n}(_module2.default);\n\nToolbar.DEFAULTS = {};\n\nfunction addButton(container, format, value) {\n  var input = document.createElement('button');\n  input.setAttribute('type', 'button');\n  input.classList.add('ql-' + format);\n  if (value != null) {\n    input.value = value;\n  }\n  container.appendChild(input);\n}\n\nfunction addControls(container, groups) {\n  if (!Array.isArray(groups[0])) {\n    groups = [groups];\n  }\n  groups.forEach(function (controls) {\n    var group = document.createElement('span');\n    group.classList.add('ql-formats');\n    controls.forEach(function (control) {\n      if (typeof control === 'string') {\n        addButton(group, control);\n      } else {\n        var format = Object.keys(control)[0];\n        var value = control[format];\n        if (Array.isArray(value)) {\n          addSelect(group, format, value);\n        } else {\n          addButton(group, format, value);\n        }\n      }\n    });\n    container.appendChild(group);\n  });\n}\n\nfunction addSelect(container, format, values) {\n  var input = document.createElement('select');\n  input.classList.add('ql-' + format);\n  values.forEach(function (value) {\n    var option = document.createElement('option');\n    if (value !== false) {\n      option.setAttribute('value', value);\n    } else {\n      option.setAttribute('selected', 'selected');\n    }\n    input.appendChild(option);\n  });\n  container.appendChild(input);\n}\n\nToolbar.DEFAULTS = {\n  container: null,\n  handlers: {\n    clean: function clean() {\n      var _this3 = this;\n\n      var range = this.quill.getSelection();\n      if (range == null) return;\n      if (range.length == 0) {\n        var formats = this.quill.getFormat();\n        Object.keys(formats).forEach(function (name) {\n          // Clean functionality in existing apps only clean inline formats\n          if (_parchment2.default.query(name, _parchment2.default.Scope.INLINE) != null) {\n            _this3.quill.format(name, false);\n          }\n        });\n      } else {\n        this.quill.removeFormat(range, _quill2.default.sources.USER);\n      }\n    },\n    direction: function direction(value) {\n      var align = this.quill.getFormat()['align'];\n      if (value === 'rtl' && align == null) {\n        this.quill.format('align', 'right', _quill2.default.sources.USER);\n      } else if (!value && align === 'right') {\n        this.quill.format('align', false, _quill2.default.sources.USER);\n      }\n      this.quill.format('direction', value, _quill2.default.sources.USER);\n    },\n    indent: function indent(value) {\n      var range = this.quill.getSelection();\n      var formats = this.quill.getFormat(range);\n      var indent = parseInt(formats.indent || 0);\n      if (value === '+1' || value === '-1') {\n        var modifier = value === '+1' ? 1 : -1;\n        if (formats.direction === 'rtl') modifier *= -1;\n        this.quill.format('indent', indent + modifier, _quill2.default.sources.USER);\n      }\n    },\n    link: function link(value) {\n      if (value === true) {\n        value = prompt('Enter link URL:');\n      }\n      this.quill.format('link', value, _quill2.default.sources.USER);\n    },\n    list: function list(value) {\n      var range = this.quill.getSelection();\n      var formats = this.quill.getFormat(range);\n      if (value === 'check') {\n        if (formats['list'] === 'checked' || formats['list'] === 'unchecked') {\n          this.quill.format('list', false, _quill2.default.sources.USER);\n        } else {\n          this.quill.format('list', 'unchecked', _quill2.default.sources.USER);\n        }\n      } else {\n        this.quill.format('list', value, _quill2.default.sources.USER);\n      }\n    }\n  }\n};\n\nexports.default = Toolbar;\nexports.addControls = addControls;\n\n/***/ }),\n/* 58 */\n/***/ (function(module, exports) {\n\nmodule.exports = \"<svg viewbox=\\\"0 0 18 18\\\"> <polyline class=\\\"ql-even ql-stroke\\\" points=\\\"5 7 3 9 5 11\\\"></polyline> <polyline class=\\\"ql-even ql-stroke\\\" points=\\\"13 7 15 9 13 11\\\"></polyline> <line class=ql-stroke x1=10 x2=8 y1=5 y2=13></line> </svg>\";\n\n/***/ }),\n/* 59 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if (\"value\" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };\n\nvar _picker = __webpack_require__(27);\n\nvar _picker2 = _interopRequireDefault(_picker);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar ColorPicker = function (_Picker) {\n  _inherits(ColorPicker, _Picker);\n\n  function ColorPicker(select, label) {\n    _classCallCheck(this, ColorPicker);\n\n    var _this = _possibleConstructorReturn(this, (ColorPicker.__proto__ || Object.getPrototypeOf(ColorPicker)).call(this, select));\n\n    _this.label.innerHTML = label;\n    _this.container.classList.add('ql-color-picker');\n    [].slice.call(_this.container.querySelectorAll('.ql-picker-item'), 0, 7).forEach(function (item) {\n      item.classList.add('ql-primary');\n    });\n    return _this;\n  }\n\n  _createClass(ColorPicker, [{\n    key: 'buildItem',\n    value: function buildItem(option) {\n      var item = _get(ColorPicker.prototype.__proto__ || Object.getPrototypeOf(ColorPicker.prototype), 'buildItem', this).call(this, option);\n      item.style.backgroundColor = option.getAttribute('value') || '';\n      return item;\n    }\n  }, {\n    key: 'selectItem',\n    value: function selectItem(item, trigger) {\n      _get(ColorPicker.prototype.__proto__ || Object.getPrototypeOf(ColorPicker.prototype), 'selectItem', this).call(this, item, trigger);\n      var colorLabel = this.label.querySelector('.ql-color-label');\n      var value = item ? item.getAttribute('data-value') || '' : '';\n      if (colorLabel) {\n        if (colorLabel.tagName === 'line') {\n          colorLabel.style.stroke = value;\n        } else {\n          colorLabel.style.fill = value;\n        }\n      }\n    }\n  }]);\n\n  return ColorPicker;\n}(_picker2.default);\n\nexports.default = ColorPicker;\n\n/***/ }),\n/* 60 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if (\"value\" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };\n\nvar _picker = __webpack_require__(27);\n\nvar _picker2 = _interopRequireDefault(_picker);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar IconPicker = function (_Picker) {\n  _inherits(IconPicker, _Picker);\n\n  function IconPicker(select, icons) {\n    _classCallCheck(this, IconPicker);\n\n    var _this = _possibleConstructorReturn(this, (IconPicker.__proto__ || Object.getPrototypeOf(IconPicker)).call(this, select));\n\n    _this.container.classList.add('ql-icon-picker');\n    [].forEach.call(_this.container.querySelectorAll('.ql-picker-item'), function (item) {\n      item.innerHTML = icons[item.getAttribute('data-value') || ''];\n    });\n    _this.defaultItem = _this.container.querySelector('.ql-selected');\n    _this.selectItem(_this.defaultItem);\n    return _this;\n  }\n\n  _createClass(IconPicker, [{\n    key: 'selectItem',\n    value: function selectItem(item, trigger) {\n      _get(IconPicker.prototype.__proto__ || Object.getPrototypeOf(IconPicker.prototype), 'selectItem', this).call(this, item, trigger);\n      item = item || this.defaultItem;\n      this.label.innerHTML = item.innerHTML;\n    }\n  }]);\n\n  return IconPicker;\n}(_picker2.default);\n\nexports.default = IconPicker;\n\n/***/ }),\n/* 61 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar Tooltip = function () {\n  function Tooltip(quill, boundsContainer) {\n    var _this = this;\n\n    _classCallCheck(this, Tooltip);\n\n    this.quill = quill;\n    this.boundsContainer = boundsContainer || document.body;\n    this.root = quill.addContainer('ql-tooltip');\n    this.root.innerHTML = this.constructor.TEMPLATE;\n    if (this.quill.root === this.quill.scrollingContainer) {\n      this.quill.root.addEventListener('scroll', function () {\n        _this.root.style.marginTop = -1 * _this.quill.root.scrollTop + 'px';\n      });\n    }\n    this.hide();\n  }\n\n  _createClass(Tooltip, [{\n    key: 'hide',\n    value: function hide() {\n      this.root.classList.add('ql-hidden');\n    }\n  }, {\n    key: 'position',\n    value: function position(reference) {\n      var left = reference.left + reference.width / 2 - this.root.offsetWidth / 2;\n      if(left <= 0){\n          left = 0;\n      }\n      // root.scrollTop should be 0 if scrollContainer !== root\n      var top = reference.bottom + this.quill.root.scrollTop;\n      this.root.style.left = left + 'px';\n      this.root.style.top = top + 'px';\n      this.root.classList.remove('ql-flip');\n      var containerBounds = this.boundsContainer.getBoundingClientRect();\n      var rootBounds = this.root.getBoundingClientRect();\n      var shift = 0;\n      if (rootBounds.right > containerBounds.right) {\n        shift = containerBounds.right - rootBounds.right;\n        this.root.style.left = left + shift + 'px';\n      }\n      if (rootBounds.left < containerBounds.left) {\n        shift = containerBounds.left - rootBounds.left;\n        this.root.style.left = left + shift + 'px';\n      }\n      if (rootBounds.bottom > containerBounds.bottom) {\n        var height = rootBounds.bottom - rootBounds.top;\n        var verticalShift = reference.bottom - reference.top + height;\n        this.root.style.top = top - verticalShift + 'px';\n        this.root.classList.add('ql-flip');\n      }\n      return shift;\n    }\n  }, {\n    key: 'show',\n    value: function show() {\n      this.root.classList.remove('ql-editing');\n      this.root.classList.remove('ql-hidden');\n    }\n  }]);\n\n  return Tooltip;\n}();\n\nexports.default = Tooltip;\n\n/***/ }),\n/* 62 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"]) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); } }; }();\n\nvar _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if (\"value\" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _extend = __webpack_require__(3);\n\nvar _extend2 = _interopRequireDefault(_extend);\n\nvar _emitter = __webpack_require__(8);\n\nvar _emitter2 = _interopRequireDefault(_emitter);\n\nvar _base = __webpack_require__(43);\n\nvar _base2 = _interopRequireDefault(_base);\n\nvar _link = __webpack_require__(26);\n\nvar _link2 = _interopRequireDefault(_link);\n\nvar _selection = __webpack_require__(15);\n\nvar _icons = __webpack_require__(41);\n\nvar _icons2 = _interopRequireDefault(_icons);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar TOOLBAR_CONFIG = [[{ header: ['1', '2', '3', false] }], ['bold', 'italic', 'underline', 'link'], [{ list: 'ordered' }, { list: 'bullet' }], ['clean']];\n\nvar SnowTheme = function (_BaseTheme) {\n  _inherits(SnowTheme, _BaseTheme);\n\n  function SnowTheme(quill, options) {\n    _classCallCheck(this, SnowTheme);\n\n    if (options.modules.toolbar != null && options.modules.toolbar.container == null) {\n      options.modules.toolbar.container = TOOLBAR_CONFIG;\n    }\n\n    var _this = _possibleConstructorReturn(this, (SnowTheme.__proto__ || Object.getPrototypeOf(SnowTheme)).call(this, quill, options));\n\n    _this.quill.container.classList.add('ql-snow');\n    return _this;\n  }\n\n  _createClass(SnowTheme, [{\n    key: 'extendToolbar',\n    value: function extendToolbar(toolbar) {\n      toolbar.container.classList.add('ql-snow');\n      this.buildButtons([].slice.call(toolbar.container.querySelectorAll('button')), _icons2.default);\n      this.buildPickers([].slice.call(toolbar.container.querySelectorAll('select')), _icons2.default);\n      this.tooltip = new SnowTooltip(this.quill, this.options.bounds);\n      if (toolbar.container.querySelector('.ql-link')) {\n        this.quill.keyboard.addBinding({ key: 'K', shortKey: true }, function (range, context) {\n          toolbar.handlers['link'].call(toolbar, !context.format.link);\n        });\n      }\n    }\n  }]);\n\n  return SnowTheme;\n}(_base2.default);\n\nSnowTheme.DEFAULTS = (0, _extend2.default)(true, {}, _base2.default.DEFAULTS, {\n  modules: {\n    toolbar: {\n      handlers: {\n        link: function link(value) {\n          if (value) {\n            var range = this.quill.getSelection();\n            if (range == null || range.length == 0) return;\n            var preview = this.quill.getText(range);\n            if (/^\\S+@\\S+\\.\\S+$/.test(preview) && preview.indexOf('mailto:') !== 0) {\n              preview = 'mailto:' + preview;\n            }\n            var tooltip = this.quill.theme.tooltip;\n            tooltip.edit('link', preview);\n          } else {\n            this.quill.format('link', false);\n          }\n        }\n      }\n    }\n  }\n});\n\nvar SnowTooltip = function (_BaseTooltip) {\n  _inherits(SnowTooltip, _BaseTooltip);\n\n  function SnowTooltip(quill, bounds) {\n    _classCallCheck(this, SnowTooltip);\n\n    var _this2 = _possibleConstructorReturn(this, (SnowTooltip.__proto__ || Object.getPrototypeOf(SnowTooltip)).call(this, quill, bounds));\n\n    _this2.preview = _this2.root.querySelector('a.ql-preview');\n    return _this2;\n  }\n\n  _createClass(SnowTooltip, [{\n    key: 'listen',\n    value: function listen() {\n      var _this3 = this;\n\n      _get(SnowTooltip.prototype.__proto__ || Object.getPrototypeOf(SnowTooltip.prototype), 'listen', this).call(this);\n      this.root.querySelector('a.ql-action').addEventListener('click', function (event) {\n        if (_this3.root.classList.contains('ql-editing')) {\n          _this3.save();\n        } else {\n          _this3.edit('link', _this3.preview.textContent);\n        }\n        event.preventDefault();\n      });\n      this.root.querySelector('a.ql-remove').addEventListener('click', function (event) {\n        if (_this3.linkRange != null) {\n          var range = _this3.linkRange;\n          _this3.restoreFocus();\n          _this3.quill.formatText(range, 'link', false, _emitter2.default.sources.USER);\n          delete _this3.linkRange;\n        }\n        event.preventDefault();\n        _this3.hide();\n      });\n      this.quill.on(_emitter2.default.events.SELECTION_CHANGE, function (range, oldRange, source) {\n        if (range == null) return;\n        if (range.length === 0 && source === _emitter2.default.sources.USER) {\n          var _quill$scroll$descend = _this3.quill.scroll.descendant(_link2.default, range.index),\n              _quill$scroll$descend2 = _slicedToArray(_quill$scroll$descend, 2),\n              link = _quill$scroll$descend2[0],\n              offset = _quill$scroll$descend2[1];\n\n          if (link != null) {\n            _this3.linkRange = new _selection.Range(range.index - offset, link.length());\n            var preview = _link2.default.formats(link.domNode);\n            _this3.preview.textContent = preview;\n            _this3.preview.setAttribute('href', preview);\n            _this3.show();\n            _this3.position(_this3.quill.getBounds(_this3.linkRange));\n            return;\n          }\n        } else {\n          delete _this3.linkRange;\n        }\n        _this3.hide();\n      });\n    }\n  }, {\n    key: 'show',\n    value: function show() {\n      _get(SnowTooltip.prototype.__proto__ || Object.getPrototypeOf(SnowTooltip.prototype), 'show', this).call(this);\n      this.root.removeAttribute('data-mode');\n    }\n  }]);\n\n  return SnowTooltip;\n}(_base.BaseTooltip);\n\nSnowTooltip.TEMPLATE = ['<a class=\"ql-preview\" target=\"_blank\" href=\"about:blank\"></a>', '<input type=\"text\" data-formula=\"e=mc^2\" data-link=\"https://quilljs.com\" data-video=\"Embed URL\">', '<a class=\"ql-action\"></a>', '<a class=\"ql-remove\"></a>'].join('');\n\nexports.default = SnowTheme;\n\n/***/ }),\n/* 63 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _core = __webpack_require__(28);\n\nvar _core2 = _interopRequireDefault(_core);\n\nvar _align = __webpack_require__(36);\n\nvar _direction = __webpack_require__(38);\n\nvar _indent = __webpack_require__(64);\n\nvar _blockquote = __webpack_require__(65);\n\nvar _blockquote2 = _interopRequireDefault(_blockquote);\n\nvar _header = __webpack_require__(66);\n\nvar _header2 = _interopRequireDefault(_header);\n\nvar _list = __webpack_require__(67);\n\nvar _list2 = _interopRequireDefault(_list);\n\nvar _background = __webpack_require__(37);\n\nvar _color = __webpack_require__(25);\n\nvar _font = __webpack_require__(39);\n\nvar _size = __webpack_require__(40);\n\nvar _bold = __webpack_require__(56);\n\nvar _bold2 = _interopRequireDefault(_bold);\n\nvar _italic = __webpack_require__(68);\n\nvar _italic2 = _interopRequireDefault(_italic);\n\nvar _link = __webpack_require__(26);\n\nvar _link2 = _interopRequireDefault(_link);\n\nvar _script = __webpack_require__(69);\n\nvar _script2 = _interopRequireDefault(_script);\n\nvar _strike = __webpack_require__(70);\n\nvar _strike2 = _interopRequireDefault(_strike);\n\nvar _underline = __webpack_require__(71);\n\nvar _underline2 = _interopRequireDefault(_underline);\n\nvar _image = __webpack_require__(72);\n\nvar _image2 = _interopRequireDefault(_image);\n\nvar _video = __webpack_require__(73);\n\nvar _video2 = _interopRequireDefault(_video);\n\nvar _code = __webpack_require__(13);\n\nvar _code2 = _interopRequireDefault(_code);\n\nvar _formula = __webpack_require__(74);\n\nvar _formula2 = _interopRequireDefault(_formula);\n\nvar _syntax = __webpack_require__(75);\n\nvar _syntax2 = _interopRequireDefault(_syntax);\n\nvar _toolbar = __webpack_require__(57);\n\nvar _toolbar2 = _interopRequireDefault(_toolbar);\n\nvar _icons = __webpack_require__(41);\n\nvar _icons2 = _interopRequireDefault(_icons);\n\nvar _picker = __webpack_require__(27);\n\nvar _picker2 = _interopRequireDefault(_picker);\n\nvar _colorPicker = __webpack_require__(59);\n\nvar _colorPicker2 = _interopRequireDefault(_colorPicker);\n\nvar _iconPicker = __webpack_require__(60);\n\nvar _iconPicker2 = _interopRequireDefault(_iconPicker);\n\nvar _tooltip = __webpack_require__(61);\n\nvar _tooltip2 = _interopRequireDefault(_tooltip);\n\nvar _bubble = __webpack_require__(108);\n\nvar _bubble2 = _interopRequireDefault(_bubble);\n\nvar _snow = __webpack_require__(62);\n\nvar _snow2 = _interopRequireDefault(_snow);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n_core2.default.register({\n  'attributors/attribute/direction': _direction.DirectionAttribute,\n\n  'attributors/class/align': _align.AlignClass,\n  'attributors/class/background': _background.BackgroundClass,\n  'attributors/class/color': _color.ColorClass,\n  'attributors/class/direction': _direction.DirectionClass,\n  'attributors/class/font': _font.FontClass,\n  'attributors/class/size': _size.SizeClass,\n\n  'attributors/style/align': _align.AlignStyle,\n  'attributors/style/background': _background.BackgroundStyle,\n  'attributors/style/color': _color.ColorStyle,\n  'attributors/style/direction': _direction.DirectionStyle,\n  'attributors/style/font': _font.FontStyle,\n  'attributors/style/size': _size.SizeStyle\n}, true);\n\n_core2.default.register({\n  'formats/align': _align.AlignClass,\n  'formats/direction': _direction.DirectionClass,\n  'formats/indent': _indent.IndentClass,\n\n  'formats/background': _background.BackgroundStyle,\n  'formats/color': _color.ColorStyle,\n  'formats/font': _font.FontClass,\n  'formats/size': _size.SizeClass,\n\n  'formats/blockquote': _blockquote2.default,\n  'formats/code-block': _code2.default,\n  'formats/header': _header2.default,\n  'formats/list': _list2.default,\n\n  'formats/bold': _bold2.default,\n  'formats/code': _code.Code,\n  'formats/italic': _italic2.default,\n  'formats/link': _link2.default,\n  'formats/script': _script2.default,\n  'formats/strike': _strike2.default,\n  'formats/underline': _underline2.default,\n\n  'formats/image': _image2.default,\n  'formats/video': _video2.default,\n\n  'formats/list/item': _list.ListItem,\n\n  'modules/formula': _formula2.default,\n  'modules/syntax': _syntax2.default,\n  'modules/toolbar': _toolbar2.default,\n\n  'themes/bubble': _bubble2.default,\n  'themes/snow': _snow2.default,\n\n  'ui/icons': _icons2.default,\n  'ui/picker': _picker2.default,\n  'ui/icon-picker': _iconPicker2.default,\n  'ui/color-picker': _colorPicker2.default,\n  'ui/tooltip': _tooltip2.default\n}, true);\n\nexports.default = _core2.default;\n\n/***/ }),\n/* 64 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.IndentClass = undefined;\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if (\"value\" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };\n\nvar _parchment = __webpack_require__(0);\n\nvar _parchment2 = _interopRequireDefault(_parchment);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar IdentAttributor = function (_Parchment$Attributor) {\n  _inherits(IdentAttributor, _Parchment$Attributor);\n\n  function IdentAttributor() {\n    _classCallCheck(this, IdentAttributor);\n\n    return _possibleConstructorReturn(this, (IdentAttributor.__proto__ || Object.getPrototypeOf(IdentAttributor)).apply(this, arguments));\n  }\n\n  _createClass(IdentAttributor, [{\n    key: 'add',\n    value: function add(node, value) {\n      if (value === '+1' || value === '-1') {\n        var indent = this.value(node) || 0;\n        value = value === '+1' ? indent + 1 : indent - 1;\n      }\n      if (value === 0) {\n        this.remove(node);\n        return true;\n      } else {\n        return _get(IdentAttributor.prototype.__proto__ || Object.getPrototypeOf(IdentAttributor.prototype), 'add', this).call(this, node, value);\n      }\n    }\n  }, {\n    key: 'canAdd',\n    value: function canAdd(node, value) {\n      return _get(IdentAttributor.prototype.__proto__ || Object.getPrototypeOf(IdentAttributor.prototype), 'canAdd', this).call(this, node, value) || _get(IdentAttributor.prototype.__proto__ || Object.getPrototypeOf(IdentAttributor.prototype), 'canAdd', this).call(this, node, parseInt(value));\n    }\n  }, {\n    key: 'value',\n    value: function value(node) {\n      return parseInt(_get(IdentAttributor.prototype.__proto__ || Object.getPrototypeOf(IdentAttributor.prototype), 'value', this).call(this, node)) || undefined; // Don't return NaN\n    }\n  }]);\n\n  return IdentAttributor;\n}(_parchment2.default.Attributor.Class);\n\nvar IndentClass = new IdentAttributor('indent', 'ql-indent', {\n  scope: _parchment2.default.Scope.BLOCK,\n  whitelist: [1, 2, 3, 4, 5, 6, 7, 8]\n});\n\nexports.IndentClass = IndentClass;\n\n/***/ }),\n/* 65 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _block = __webpack_require__(4);\n\nvar _block2 = _interopRequireDefault(_block);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar Blockquote = function (_Block) {\n  _inherits(Blockquote, _Block);\n\n  function Blockquote() {\n    _classCallCheck(this, Blockquote);\n\n    return _possibleConstructorReturn(this, (Blockquote.__proto__ || Object.getPrototypeOf(Blockquote)).apply(this, arguments));\n  }\n\n  return Blockquote;\n}(_block2.default);\n\nBlockquote.blotName = 'blockquote';\nBlockquote.tagName = 'blockquote';\n\nexports.default = Blockquote;\n\n/***/ }),\n/* 66 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _block = __webpack_require__(4);\n\nvar _block2 = _interopRequireDefault(_block);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar Header = function (_Block) {\n  _inherits(Header, _Block);\n\n  function Header() {\n    _classCallCheck(this, Header);\n\n    return _possibleConstructorReturn(this, (Header.__proto__ || Object.getPrototypeOf(Header)).apply(this, arguments));\n  }\n\n  _createClass(Header, null, [{\n    key: 'formats',\n    value: function formats(domNode) {\n      return this.tagName.indexOf(domNode.tagName) + 1;\n    }\n  }]);\n\n  return Header;\n}(_block2.default);\n\nHeader.blotName = 'header';\nHeader.tagName = ['H1', 'H2', 'H3', 'H4', 'H5', 'H6'];\n\nexports.default = Header;\n\n/***/ }),\n/* 67 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.default = exports.ListItem = undefined;\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if (\"value\" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };\n\nvar _parchment = __webpack_require__(0);\n\nvar _parchment2 = _interopRequireDefault(_parchment);\n\nvar _block = __webpack_require__(4);\n\nvar _block2 = _interopRequireDefault(_block);\n\nvar _container = __webpack_require__(24);\n\nvar _container2 = _interopRequireDefault(_container);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar ListItem = function (_Block) {\n  _inherits(ListItem, _Block);\n\n  function ListItem() {\n    _classCallCheck(this, ListItem);\n\n    return _possibleConstructorReturn(this, (ListItem.__proto__ || Object.getPrototypeOf(ListItem)).apply(this, arguments));\n  }\n\n  _createClass(ListItem, [{\n    key: 'format',\n    value: function format(name, value) {\n      if (name === List.blotName && !value) {\n        this.replaceWith(_parchment2.default.create(this.statics.scope));\n      } else {\n        _get(ListItem.prototype.__proto__ || Object.getPrototypeOf(ListItem.prototype), 'format', this).call(this, name, value);\n      }\n    }\n  }, {\n    key: 'remove',\n    value: function remove() {\n      if (this.prev == null && this.next == null) {\n        this.parent.remove();\n      } else {\n        _get(ListItem.prototype.__proto__ || Object.getPrototypeOf(ListItem.prototype), 'remove', this).call(this);\n      }\n    }\n  }, {\n    key: 'replaceWith',\n    value: function replaceWith(name, value) {\n      this.parent.isolate(this.offset(this.parent), this.length());\n      if (name === this.parent.statics.blotName) {\n        this.parent.replaceWith(name, value);\n        return this;\n      } else {\n        this.parent.unwrap();\n        return _get(ListItem.prototype.__proto__ || Object.getPrototypeOf(ListItem.prototype), 'replaceWith', this).call(this, name, value);\n      }\n    }\n  }], [{\n    key: 'formats',\n    value: function formats(domNode) {\n      return domNode.tagName === this.tagName ? undefined : _get(ListItem.__proto__ || Object.getPrototypeOf(ListItem), 'formats', this).call(this, domNode);\n    }\n  }]);\n\n  return ListItem;\n}(_block2.default);\n\nListItem.blotName = 'list-item';\nListItem.tagName = 'LI';\n\nvar List = function (_Container) {\n  _inherits(List, _Container);\n\n  _createClass(List, null, [{\n    key: 'create',\n    value: function create(value) {\n      var tagName = value === 'ordered' ? 'OL' : 'UL';\n      var node = _get(List.__proto__ || Object.getPrototypeOf(List), 'create', this).call(this, tagName);\n      if (value === 'checked' || value === 'unchecked') {\n        node.setAttribute('data-checked', value === 'checked');\n      }\n      return node;\n    }\n  }, {\n    key: 'formats',\n    value: function formats(domNode) {\n      if (domNode.tagName === 'OL') return 'ordered';\n      if (domNode.tagName === 'UL') {\n        if (domNode.hasAttribute('data-checked')) {\n          return domNode.getAttribute('data-checked') === 'true' ? 'checked' : 'unchecked';\n        } else {\n          return 'bullet';\n        }\n      }\n      return undefined;\n    }\n  }]);\n\n  function List(domNode) {\n    _classCallCheck(this, List);\n\n    var _this2 = _possibleConstructorReturn(this, (List.__proto__ || Object.getPrototypeOf(List)).call(this, domNode));\n\n    var listEventHandler = function listEventHandler(e) {\n      if (e.target.parentNode !== domNode) return;\n      var format = _this2.statics.formats(domNode);\n      var blot = _parchment2.default.find(e.target);\n      if (format === 'checked') {\n        blot.format('list', 'unchecked');\n      } else if (format === 'unchecked') {\n        blot.format('list', 'checked');\n      }\n    };\n\n    domNode.addEventListener('touchstart', listEventHandler);\n    domNode.addEventListener('mousedown', listEventHandler);\n    return _this2;\n  }\n\n  _createClass(List, [{\n    key: 'format',\n    value: function format(name, value) {\n      if (this.children.length > 0) {\n        this.children.tail.format(name, value);\n      }\n    }\n  }, {\n    key: 'formats',\n    value: function formats() {\n      // We don't inherit from FormatBlot\n      return _defineProperty({}, this.statics.blotName, this.statics.formats(this.domNode));\n    }\n  }, {\n    key: 'insertBefore',\n    value: function insertBefore(blot, ref) {\n      if (blot instanceof ListItem) {\n        _get(List.prototype.__proto__ || Object.getPrototypeOf(List.prototype), 'insertBefore', this).call(this, blot, ref);\n      } else {\n        var index = ref == null ? this.length() : ref.offset(this);\n        var after = this.split(index);\n        after.parent.insertBefore(blot, after);\n      }\n    }\n  }, {\n    key: 'optimize',\n    value: function optimize(context) {\n      _get(List.prototype.__proto__ || Object.getPrototypeOf(List.prototype), 'optimize', this).call(this, context);\n      var next = this.next;\n      if (next != null && next.prev === this && next.statics.blotName === this.statics.blotName && next.domNode.tagName === this.domNode.tagName && next.domNode.getAttribute('data-checked') === this.domNode.getAttribute('data-checked')) {\n        next.moveChildren(this);\n        next.remove();\n      }\n    }\n  }, {\n    key: 'replace',\n    value: function replace(target) {\n      if (target.statics.blotName !== this.statics.blotName) {\n        var item = _parchment2.default.create(this.statics.defaultChild);\n        target.moveChildren(item);\n        this.appendChild(item);\n      }\n      _get(List.prototype.__proto__ || Object.getPrototypeOf(List.prototype), 'replace', this).call(this, target);\n    }\n  }]);\n\n  return List;\n}(_container2.default);\n\nList.blotName = 'list';\nList.scope = _parchment2.default.Scope.BLOCK_BLOT;\nList.tagName = ['OL', 'UL'];\nList.defaultChild = 'list-item';\nList.allowedChildren = [ListItem];\n\nexports.ListItem = ListItem;\nexports.default = List;\n\n/***/ }),\n/* 68 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _bold = __webpack_require__(56);\n\nvar _bold2 = _interopRequireDefault(_bold);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar Italic = function (_Bold) {\n  _inherits(Italic, _Bold);\n\n  function Italic() {\n    _classCallCheck(this, Italic);\n\n    return _possibleConstructorReturn(this, (Italic.__proto__ || Object.getPrototypeOf(Italic)).apply(this, arguments));\n  }\n\n  return Italic;\n}(_bold2.default);\n\nItalic.blotName = 'italic';\nItalic.tagName = ['EM', 'I'];\n\nexports.default = Italic;\n\n/***/ }),\n/* 69 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if (\"value\" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };\n\nvar _inline = __webpack_require__(6);\n\nvar _inline2 = _interopRequireDefault(_inline);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar Script = function (_Inline) {\n  _inherits(Script, _Inline);\n\n  function Script() {\n    _classCallCheck(this, Script);\n\n    return _possibleConstructorReturn(this, (Script.__proto__ || Object.getPrototypeOf(Script)).apply(this, arguments));\n  }\n\n  _createClass(Script, null, [{\n    key: 'create',\n    value: function create(value) {\n      if (value === 'super') {\n        return document.createElement('sup');\n      } else if (value === 'sub') {\n        return document.createElement('sub');\n      } else {\n        return _get(Script.__proto__ || Object.getPrototypeOf(Script), 'create', this).call(this, value);\n      }\n    }\n  }, {\n    key: 'formats',\n    value: function formats(domNode) {\n      if (domNode.tagName === 'SUB') return 'sub';\n      if (domNode.tagName === 'SUP') return 'super';\n      return undefined;\n    }\n  }]);\n\n  return Script;\n}(_inline2.default);\n\nScript.blotName = 'script';\nScript.tagName = ['SUB', 'SUP'];\n\nexports.default = Script;\n\n/***/ }),\n/* 70 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _inline = __webpack_require__(6);\n\nvar _inline2 = _interopRequireDefault(_inline);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar Strike = function (_Inline) {\n  _inherits(Strike, _Inline);\n\n  function Strike() {\n    _classCallCheck(this, Strike);\n\n    return _possibleConstructorReturn(this, (Strike.__proto__ || Object.getPrototypeOf(Strike)).apply(this, arguments));\n  }\n\n  return Strike;\n}(_inline2.default);\n\nStrike.blotName = 'strike';\nStrike.tagName = 'S';\n\nexports.default = Strike;\n\n/***/ }),\n/* 71 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _inline = __webpack_require__(6);\n\nvar _inline2 = _interopRequireDefault(_inline);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar Underline = function (_Inline) {\n  _inherits(Underline, _Inline);\n\n  function Underline() {\n    _classCallCheck(this, Underline);\n\n    return _possibleConstructorReturn(this, (Underline.__proto__ || Object.getPrototypeOf(Underline)).apply(this, arguments));\n  }\n\n  return Underline;\n}(_inline2.default);\n\nUnderline.blotName = 'underline';\nUnderline.tagName = 'U';\n\nexports.default = Underline;\n\n/***/ }),\n/* 72 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if (\"value\" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };\n\nvar _parchment = __webpack_require__(0);\n\nvar _parchment2 = _interopRequireDefault(_parchment);\n\nvar _link = __webpack_require__(26);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar ATTRIBUTES = ['alt', 'height', 'width'];\n\nvar Image = function (_Parchment$Embed) {\n  _inherits(Image, _Parchment$Embed);\n\n  function Image() {\n    _classCallCheck(this, Image);\n\n    return _possibleConstructorReturn(this, (Image.__proto__ || Object.getPrototypeOf(Image)).apply(this, arguments));\n  }\n\n  _createClass(Image, [{\n    key: 'format',\n    value: function format(name, value) {\n      if (ATTRIBUTES.indexOf(name) > -1) {\n        if (value) {\n          this.domNode.setAttribute(name, value);\n        } else {\n          this.domNode.removeAttribute(name);\n        }\n      } else {\n        _get(Image.prototype.__proto__ || Object.getPrototypeOf(Image.prototype), 'format', this).call(this, name, value);\n      }\n    }\n  }], [{\n    key: 'create',\n    value: function create(value) {\n      var node = _get(Image.__proto__ || Object.getPrototypeOf(Image), 'create', this).call(this, value);\n      if (typeof value === 'string') {\n        node.setAttribute('src', this.sanitize(value));\n      }\n      return node;\n    }\n  }, {\n    key: 'formats',\n    value: function formats(domNode) {\n      return ATTRIBUTES.reduce(function (formats, attribute) {\n        if (domNode.hasAttribute(attribute)) {\n          formats[attribute] = domNode.getAttribute(attribute);\n        }\n        return formats;\n      }, {});\n    }\n  }, {\n    key: 'match',\n    value: function match(url) {\n      return (/\\.(jpe?g|gif|png)$/.test(url) || /^data:image\\/.+;base64/.test(url)\n      );\n    }\n  }, {\n    key: 'sanitize',\n    value: function sanitize(url) {\n      return (0, _link.sanitize)(url, ['http', 'https', 'data']) ? url : '//:0';\n    }\n  }, {\n    key: 'value',\n    value: function value(domNode) {\n      return domNode.getAttribute('src');\n    }\n  }]);\n\n  return Image;\n}(_parchment2.default.Embed);\n\nImage.blotName = 'image';\nImage.tagName = 'IMG';\n\nexports.default = Image;\n\n/***/ }),\n/* 73 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if (\"value\" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };\n\nvar _block = __webpack_require__(4);\n\nvar _link = __webpack_require__(26);\n\nvar _link2 = _interopRequireDefault(_link);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar ATTRIBUTES = ['height', 'width'];\n\nvar Video = function (_BlockEmbed) {\n  _inherits(Video, _BlockEmbed);\n\n  function Video() {\n    _classCallCheck(this, Video);\n\n    return _possibleConstructorReturn(this, (Video.__proto__ || Object.getPrototypeOf(Video)).apply(this, arguments));\n  }\n\n  _createClass(Video, [{\n    key: 'format',\n    value: function format(name, value) {\n      if (ATTRIBUTES.indexOf(name) > -1) {\n        if (value) {\n          this.domNode.setAttribute(name, value);\n        } else {\n          this.domNode.removeAttribute(name);\n        }\n      } else {\n        _get(Video.prototype.__proto__ || Object.getPrototypeOf(Video.prototype), 'format', this).call(this, name, value);\n      }\n    }\n  }], [{\n    key: 'create',\n    value: function create(value) {\n      var node = _get(Video.__proto__ || Object.getPrototypeOf(Video), 'create', this).call(this, value);\n      node.setAttribute('frameborder', '0');\n      node.setAttribute('allowfullscreen', true);\n      node.setAttribute('src', this.sanitize(value));\n      return node;\n    }\n  }, {\n    key: 'formats',\n    value: function formats(domNode) {\n      return ATTRIBUTES.reduce(function (formats, attribute) {\n        if (domNode.hasAttribute(attribute)) {\n          formats[attribute] = domNode.getAttribute(attribute);\n        }\n        return formats;\n      }, {});\n    }\n  }, {\n    key: 'sanitize',\n    value: function sanitize(url) {\n      return _link2.default.sanitize(url);\n    }\n  }, {\n    key: 'value',\n    value: function value(domNode) {\n      return domNode.getAttribute('src');\n    }\n  }]);\n\n  return Video;\n}(_block.BlockEmbed);\n\nVideo.blotName = 'video';\nVideo.className = 'ql-video';\nVideo.tagName = 'IFRAME';\n\nexports.default = Video;\n\n/***/ }),\n/* 74 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.default = exports.FormulaBlot = undefined;\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if (\"value\" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };\n\nvar _embed = __webpack_require__(35);\n\nvar _embed2 = _interopRequireDefault(_embed);\n\nvar _quill = __webpack_require__(5);\n\nvar _quill2 = _interopRequireDefault(_quill);\n\nvar _module = __webpack_require__(9);\n\nvar _module2 = _interopRequireDefault(_module);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar FormulaBlot = function (_Embed) {\n  _inherits(FormulaBlot, _Embed);\n\n  function FormulaBlot() {\n    _classCallCheck(this, FormulaBlot);\n\n    return _possibleConstructorReturn(this, (FormulaBlot.__proto__ || Object.getPrototypeOf(FormulaBlot)).apply(this, arguments));\n  }\n\n  _createClass(FormulaBlot, null, [{\n    key: 'create',\n    value: function create(value) {\n      var node = _get(FormulaBlot.__proto__ || Object.getPrototypeOf(FormulaBlot), 'create', this).call(this, value);\n      if (typeof value === 'string') {\n        window.katex.render(value, node, {\n          throwOnError: false,\n          errorColor: '#f00'\n        });\n        node.setAttribute('data-value', value);\n      }\n      return node;\n    }\n  }, {\n    key: 'value',\n    value: function value(domNode) {\n      return domNode.getAttribute('data-value');\n    }\n  }]);\n\n  return FormulaBlot;\n}(_embed2.default);\n\nFormulaBlot.blotName = 'formula';\nFormulaBlot.className = 'ql-formula';\nFormulaBlot.tagName = 'SPAN';\n\nvar Formula = function (_Module) {\n  _inherits(Formula, _Module);\n\n  _createClass(Formula, null, [{\n    key: 'register',\n    value: function register() {\n      _quill2.default.register(FormulaBlot, true);\n    }\n  }]);\n\n  function Formula() {\n    _classCallCheck(this, Formula);\n\n    var _this2 = _possibleConstructorReturn(this, (Formula.__proto__ || Object.getPrototypeOf(Formula)).call(this));\n\n    if (window.katex == null) {\n      throw new Error('Formula module requires KaTeX.');\n    }\n    return _this2;\n  }\n\n  return Formula;\n}(_module2.default);\n\nexports.FormulaBlot = FormulaBlot;\nexports.default = Formula;\n\n/***/ }),\n/* 75 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.default = exports.CodeToken = exports.CodeBlock = undefined;\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if (\"value\" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };\n\nvar _parchment = __webpack_require__(0);\n\nvar _parchment2 = _interopRequireDefault(_parchment);\n\nvar _quill = __webpack_require__(5);\n\nvar _quill2 = _interopRequireDefault(_quill);\n\nvar _module = __webpack_require__(9);\n\nvar _module2 = _interopRequireDefault(_module);\n\nvar _code = __webpack_require__(13);\n\nvar _code2 = _interopRequireDefault(_code);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar SyntaxCodeBlock = function (_CodeBlock) {\n  _inherits(SyntaxCodeBlock, _CodeBlock);\n\n  function SyntaxCodeBlock() {\n    _classCallCheck(this, SyntaxCodeBlock);\n\n    return _possibleConstructorReturn(this, (SyntaxCodeBlock.__proto__ || Object.getPrototypeOf(SyntaxCodeBlock)).apply(this, arguments));\n  }\n\n  _createClass(SyntaxCodeBlock, [{\n    key: 'replaceWith',\n    value: function replaceWith(block) {\n      this.domNode.textContent = this.domNode.textContent;\n      this.attach();\n      _get(SyntaxCodeBlock.prototype.__proto__ || Object.getPrototypeOf(SyntaxCodeBlock.prototype), 'replaceWith', this).call(this, block);\n    }\n  }, {\n    key: 'highlight',\n    value: function highlight(_highlight) {\n      var text = this.domNode.textContent;\n      if (this.cachedText !== text) {\n        if (text.trim().length > 0 || this.cachedText == null) {\n          this.domNode.innerHTML = _highlight(text);\n          this.domNode.normalize();\n          this.attach();\n        }\n        this.cachedText = text;\n      }\n    }\n  }]);\n\n  return SyntaxCodeBlock;\n}(_code2.default);\n\nSyntaxCodeBlock.className = 'ql-syntax';\n\nvar CodeToken = new _parchment2.default.Attributor.Class('token', 'hljs', {\n  scope: _parchment2.default.Scope.INLINE\n});\n\nvar Syntax = function (_Module) {\n  _inherits(Syntax, _Module);\n\n  _createClass(Syntax, null, [{\n    key: 'register',\n    value: function register() {\n      _quill2.default.register(CodeToken, true);\n      _quill2.default.register(SyntaxCodeBlock, true);\n    }\n  }]);\n\n  function Syntax(quill, options) {\n    _classCallCheck(this, Syntax);\n\n    var _this2 = _possibleConstructorReturn(this, (Syntax.__proto__ || Object.getPrototypeOf(Syntax)).call(this, quill, options));\n\n    if (typeof _this2.options.highlight !== 'function') {\n      throw new Error('Syntax module requires highlight.js. Please include the library on the page before Quill.');\n    }\n    var timer = null;\n    _this2.quill.on(_quill2.default.events.SCROLL_OPTIMIZE, function () {\n      clearTimeout(timer);\n      timer = setTimeout(function () {\n        _this2.highlight();\n        timer = null;\n      }, _this2.options.interval);\n    });\n    _this2.highlight();\n    return _this2;\n  }\n\n  _createClass(Syntax, [{\n    key: 'highlight',\n    value: function highlight() {\n      var _this3 = this;\n\n      if (this.quill.selection.composing) return;\n      this.quill.update(_quill2.default.sources.USER);\n      var range = this.quill.getSelection();\n      this.quill.scroll.descendants(SyntaxCodeBlock).forEach(function (code) {\n        code.highlight(_this3.options.highlight);\n      });\n      this.quill.update(_quill2.default.sources.SILENT);\n      if (range != null) {\n        this.quill.setSelection(range, _quill2.default.sources.SILENT);\n      }\n    }\n  }]);\n\n  return Syntax;\n}(_module2.default);\n\nSyntax.DEFAULTS = {\n  highlight: function () {\n    if (window.hljs == null) return null;\n    return function (text) {\n      var result = window.hljs.highlightAuto(text);\n      return result.value;\n    };\n  }(),\n  interval: 1000\n};\n\nexports.CodeBlock = SyntaxCodeBlock;\nexports.CodeToken = CodeToken;\nexports.default = Syntax;\n\n/***/ }),\n/* 76 */\n/***/ (function(module, exports) {\n\nmodule.exports = \"<svg viewbox=\\\"0 0 18 18\\\"> <line class=ql-stroke x1=3 x2=15 y1=9 y2=9></line> <line class=ql-stroke x1=3 x2=13 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=9 y1=4 y2=4></line> </svg>\";\n\n/***/ }),\n/* 77 */\n/***/ (function(module, exports) {\n\nmodule.exports = \"<svg viewbox=\\\"0 0 18 18\\\"> <line class=ql-stroke x1=15 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=14 x2=4 y1=14 y2=14></line> <line class=ql-stroke x1=12 x2=6 y1=4 y2=4></line> </svg>\";\n\n/***/ }),\n/* 78 */\n/***/ (function(module, exports) {\n\nmodule.exports = \"<svg viewbox=\\\"0 0 18 18\\\"> <line class=ql-stroke x1=15 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=15 x2=5 y1=14 y2=14></line> <line class=ql-stroke x1=15 x2=9 y1=4 y2=4></line> </svg>\";\n\n/***/ }),\n/* 79 */\n/***/ (function(module, exports) {\n\nmodule.exports = \"<svg viewbox=\\\"0 0 18 18\\\"> <line class=ql-stroke x1=15 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=15 x2=3 y1=14 y2=14></line> <line class=ql-stroke x1=15 x2=3 y1=4 y2=4></line> </svg>\";\n\n/***/ }),\n/* 80 */\n/***/ (function(module, exports) {\n\nmodule.exports = \"<svg viewbox=\\\"0 0 18 18\\\"> <g class=\\\"ql-fill ql-color-label\\\"> <polygon points=\\\"6 6.868 6 6 5 6 5 7 5.942 7 6 6.868\\\"></polygon> <rect height=1 width=1 x=4 y=4></rect> <polygon points=\\\"6.817 5 6 5 6 6 6.38 6 6.817 5\\\"></polygon> <rect height=1 width=1 x=2 y=6></rect> <rect height=1 width=1 x=3 y=5></rect> <rect height=1 width=1 x=4 y=7></rect> <polygon points=\\\"4 11.439 4 11 3 11 3 12 3.755 12 4 11.439\\\"></polygon> <rect height=1 width=1 x=2 y=12></rect> <rect height=1 width=1 x=2 y=9></rect> <rect height=1 width=1 x=2 y=15></rect> <polygon points=\\\"4.63 10 4 10 4 11 4.192 11 4.63 10\\\"></polygon> <rect height=1 width=1 x=3 y=8></rect> <path d=M10.832,4.2L11,4.582V4H10.708A1.948,1.948,0,0,1,10.832,4.2Z></path> <path d=M7,4.582L7.168,4.2A1.929,1.929,0,0,1,7.292,4H7V4.582Z></path> <path d=M8,13H7.683l-0.351.8a1.933,1.933,0,0,1-.124.2H8V13Z></path> <rect height=1 width=1 x=12 y=2></rect> <rect height=1 width=1 x=11 y=3></rect> <path d=M9,3H8V3.282A1.985,1.985,0,0,1,9,3Z></path> <rect height=1 width=1 x=2 y=3></rect> <rect height=1 width=1 x=6 y=2></rect> <rect height=1 width=1 x=3 y=2></rect> <rect height=1 width=1 x=5 y=3></rect> <rect height=1 width=1 x=9 y=2></rect> <rect height=1 width=1 x=15 y=14></rect> <polygon points=\\\"13.447 10.174 13.469 10.225 13.472 10.232 13.808 11 14 11 14 10 13.37 10 13.447 10.174\\\"></polygon> <rect height=1 width=1 x=13 y=7></rect> <rect height=1 width=1 x=15 y=5></rect> <rect height=1 width=1 x=14 y=6></rect> <rect height=1 width=1 x=15 y=8></rect> <rect height=1 width=1 x=14 y=9></rect> <path d=M3.775,14H3v1H4V14.314A1.97,1.97,0,0,1,3.775,14Z></path> <rect height=1 width=1 x=14 y=3></rect> <polygon points=\\\"12 6.868 12 6 11.62 6 12 6.868\\\"></polygon> <rect height=1 width=1 x=15 y=2></rect> <rect height=1 width=1 x=12 y=5></rect> <rect height=1 width=1 x=13 y=4></rect> <polygon points=\\\"12.933 9 13 9 13 8 12.495 8 12.933 9\\\"></polygon> <rect height=1 width=1 x=9 y=14></rect> <rect height=1 width=1 x=8 y=15></rect> <path d=M6,14.926V15H7V14.316A1.993,1.993,0,0,1,6,14.926Z></path> <rect height=1 width=1 x=5 y=15></rect> <path d=M10.668,13.8L10.317,13H10v1h0.792A1.947,1.947,0,0,1,10.668,13.8Z></path> <rect height=1 width=1 x=11 y=15></rect> <path d=M14.332,12.2a1.99,1.99,0,0,1,.166.8H15V12H14.245Z></path> <rect height=1 width=1 x=14 y=15></rect> <rect height=1 width=1 x=15 y=11></rect> </g> <polyline class=ql-stroke points=\\\"5.5 13 9 5 12.5 13\\\"></polyline> <line class=ql-stroke x1=11.63 x2=6.38 y1=11 y2=11></line> </svg>\";\n\n/***/ }),\n/* 81 */\n/***/ (function(module, exports) {\n\nmodule.exports = \"<svg viewbox=\\\"0 0 18 18\\\"> <rect class=\\\"ql-fill ql-stroke\\\" height=3 width=3 x=4 y=5></rect> <rect class=\\\"ql-fill ql-stroke\\\" height=3 width=3 x=11 y=5></rect> <path class=\\\"ql-even ql-fill ql-stroke\\\" d=M7,8c0,4.031-3,5-3,5></path> <path class=\\\"ql-even ql-fill ql-stroke\\\" d=M14,8c0,4.031-3,5-3,5></path> </svg>\";\n\n/***/ }),\n/* 82 */\n/***/ (function(module, exports) {\n\nmodule.exports = \"<svg viewbox=\\\"0 0 18 18\\\"> <path class=ql-stroke d=M5,4H9.5A2.5,2.5,0,0,1,12,6.5v0A2.5,2.5,0,0,1,9.5,9H5A0,0,0,0,1,5,9V4A0,0,0,0,1,5,4Z></path> <path class=ql-stroke d=M5,9h5.5A2.5,2.5,0,0,1,13,11.5v0A2.5,2.5,0,0,1,10.5,14H5a0,0,0,0,1,0,0V9A0,0,0,0,1,5,9Z></path> </svg>\";\n\n/***/ }),\n/* 83 */\n/***/ (function(module, exports) {\n\nmodule.exports = \"<svg class=\\\"\\\" viewbox=\\\"0 0 18 18\\\"> <line class=ql-stroke x1=5 x2=13 y1=3 y2=3></line> <line class=ql-stroke x1=6 x2=9.35 y1=12 y2=3></line> <line class=ql-stroke x1=11 x2=15 y1=11 y2=15></line> <line class=ql-stroke x1=15 x2=11 y1=11 y2=15></line> <rect class=ql-fill height=1 rx=0.5 ry=0.5 width=7 x=2 y=14></rect> </svg>\";\n\n/***/ }),\n/* 84 */\n/***/ (function(module, exports) {\n\nmodule.exports = \"<svg viewbox=\\\"0 0 18 18\\\"> <line class=\\\"ql-color-label ql-stroke ql-transparent\\\" x1=3 x2=15 y1=15 y2=15></line> <polyline class=ql-stroke points=\\\"5.5 11 9 3 12.5 11\\\"></polyline> <line class=ql-stroke x1=11.63 x2=6.38 y1=9 y2=9></line> </svg>\";\n\n/***/ }),\n/* 85 */\n/***/ (function(module, exports) {\n\nmodule.exports = \"<svg viewbox=\\\"0 0 18 18\\\"> <polygon class=\\\"ql-stroke ql-fill\\\" points=\\\"3 11 5 9 3 7 3 11\\\"></polygon> <line class=\\\"ql-stroke ql-fill\\\" x1=15 x2=11 y1=4 y2=4></line> <path class=ql-fill d=M11,3a3,3,0,0,0,0,6h1V3H11Z></path> <rect class=ql-fill height=11 width=1 x=11 y=4></rect> <rect class=ql-fill height=11 width=1 x=13 y=4></rect> </svg>\";\n\n/***/ }),\n/* 86 */\n/***/ (function(module, exports) {\n\nmodule.exports = \"<svg viewbox=\\\"0 0 18 18\\\"> <polygon class=\\\"ql-stroke ql-fill\\\" points=\\\"15 12 13 10 15 8 15 12\\\"></polygon> <line class=\\\"ql-stroke ql-fill\\\" x1=9 x2=5 y1=4 y2=4></line> <path class=ql-fill d=M5,3A3,3,0,0,0,5,9H6V3H5Z></path> <rect class=ql-fill height=11 width=1 x=5 y=4></rect> <rect class=ql-fill height=11 width=1 x=7 y=4></rect> </svg>\";\n\n/***/ }),\n/* 87 */\n/***/ (function(module, exports) {\n\nmodule.exports = \"<svg viewbox=\\\"0 0 18 18\\\"> <path class=ql-fill d=M14,16H4a1,1,0,0,1,0-2H14A1,1,0,0,1,14,16Z /> <path class=ql-fill d=M14,4H4A1,1,0,0,1,4,2H14A1,1,0,0,1,14,4Z /> <rect class=ql-fill x=3 y=6 width=12 height=6 rx=1 ry=1 /> </svg>\";\n\n/***/ }),\n/* 88 */\n/***/ (function(module, exports) {\n\nmodule.exports = \"<svg viewbox=\\\"0 0 18 18\\\"> <path class=ql-fill d=M13,16H5a1,1,0,0,1,0-2h8A1,1,0,0,1,13,16Z /> <path class=ql-fill d=M13,4H5A1,1,0,0,1,5,2h8A1,1,0,0,1,13,4Z /> <rect class=ql-fill x=2 y=6 width=14 height=6 rx=1 ry=1 /> </svg>\";\n\n/***/ }),\n/* 89 */\n/***/ (function(module, exports) {\n\nmodule.exports = \"<svg viewbox=\\\"0 0 18 18\\\"> <path class=ql-fill d=M15,8H13a1,1,0,0,1,0-2h2A1,1,0,0,1,15,8Z /> <path class=ql-fill d=M15,12H13a1,1,0,0,1,0-2h2A1,1,0,0,1,15,12Z /> <path class=ql-fill d=M15,16H5a1,1,0,0,1,0-2H15A1,1,0,0,1,15,16Z /> <path class=ql-fill d=M15,4H5A1,1,0,0,1,5,2H15A1,1,0,0,1,15,4Z /> <rect class=ql-fill x=2 y=6 width=8 height=6 rx=1 ry=1 /> </svg>\";\n\n/***/ }),\n/* 90 */\n/***/ (function(module, exports) {\n\nmodule.exports = \"<svg viewbox=\\\"0 0 18 18\\\"> <path class=ql-fill d=M5,8H3A1,1,0,0,1,3,6H5A1,1,0,0,1,5,8Z /> <path class=ql-fill d=M5,12H3a1,1,0,0,1,0-2H5A1,1,0,0,1,5,12Z /> <path class=ql-fill d=M13,16H3a1,1,0,0,1,0-2H13A1,1,0,0,1,13,16Z /> <path class=ql-fill d=M13,4H3A1,1,0,0,1,3,2H13A1,1,0,0,1,13,4Z /> <rect class=ql-fill x=8 y=6 width=8 height=6 rx=1 ry=1 transform=\\\"translate(24 18) rotate(-180)\\\"/> </svg>\";\n\n/***/ }),\n/* 91 */\n/***/ (function(module, exports) {\n\nmodule.exports = \"<svg viewbox=\\\"0 0 18 18\\\"> <path class=ql-fill d=M11.759,2.482a2.561,2.561,0,0,0-3.53.607A7.656,7.656,0,0,0,6.8,6.2C6.109,9.188,5.275,14.677,4.15,14.927a1.545,1.545,0,0,0-1.3-.933A0.922,0.922,0,0,0,2,15.036S1.954,16,4.119,16s3.091-2.691,3.7-5.553c0.177-.826.36-1.726,0.554-2.6L8.775,6.2c0.381-1.421.807-2.521,1.306-2.676a1.014,1.014,0,0,0,1.02.56A0.966,0.966,0,0,0,11.759,2.482Z></path> <rect class=ql-fill height=1.6 rx=0.8 ry=0.8 width=5 x=5.15 y=6.2></rect> <path class=ql-fill d=M13.663,12.027a1.662,1.662,0,0,1,.266-0.276q0.193,0.069.456,0.138a2.1,2.1,0,0,0,.535.069,1.075,1.075,0,0,0,.767-0.3,1.044,1.044,0,0,0,.314-0.8,0.84,0.84,0,0,0-.238-0.619,0.8,0.8,0,0,0-.594-0.239,1.154,1.154,0,0,0-.781.3,4.607,4.607,0,0,0-.781,1q-0.091.15-.218,0.346l-0.246.38c-0.068-.288-0.137-0.582-0.212-0.885-0.459-1.847-2.494-.984-2.941-0.8-0.482.2-.353,0.647-0.094,0.529a0.869,0.869,0,0,1,1.281.585c0.217,0.751.377,1.436,0.527,2.038a5.688,5.688,0,0,1-.362.467,2.69,2.69,0,0,1-.264.271q-0.221-.08-0.471-0.147a2.029,2.029,0,0,0-.522-0.066,1.079,1.079,0,0,0-.768.3A1.058,1.058,0,0,0,9,15.131a0.82,0.82,0,0,0,.832.852,1.134,1.134,0,0,0,.787-0.3,5.11,5.11,0,0,0,.776-0.993q0.141-.219.215-0.34c0.046-.076.122-0.194,0.223-0.346a2.786,2.786,0,0,0,.918,1.726,2.582,2.582,0,0,0,2.376-.185c0.317-.181.212-0.565,0-0.494A0.807,0.807,0,0,1,14.176,15a5.159,5.159,0,0,1-.913-2.446l0,0Q13.487,12.24,13.663,12.027Z></path> </svg>\";\n\n/***/ }),\n/* 92 */\n/***/ (function(module, exports) {\n\nmodule.exports = \"<svg viewBox=\\\"0 0 18 18\\\"> <path class=ql-fill d=M10,4V14a1,1,0,0,1-2,0V10H3v4a1,1,0,0,1-2,0V4A1,1,0,0,1,3,4V8H8V4a1,1,0,0,1,2,0Zm6.06787,9.209H14.98975V7.59863a.54085.54085,0,0,0-.605-.60547h-.62744a1.01119,1.01119,0,0,0-.748.29688L11.645,8.56641a.5435.5435,0,0,0-.022.8584l.28613.30762a.53861.53861,0,0,0,.84717.0332l.09912-.08789a1.2137,1.2137,0,0,0,.2417-.35254h.02246s-.01123.30859-.01123.60547V13.209H12.041a.54085.54085,0,0,0-.605.60547v.43945a.54085.54085,0,0,0,.605.60547h4.02686a.54085.54085,0,0,0,.605-.60547v-.43945A.54085.54085,0,0,0,16.06787,13.209Z /> </svg>\";\n\n/***/ }),\n/* 93 */\n/***/ (function(module, exports) {\n\nmodule.exports = \"<svg viewBox=\\\"0 0 18 18\\\"> <path class=ql-fill d=M16.73975,13.81445v.43945a.54085.54085,0,0,1-.605.60547H11.855a.58392.58392,0,0,1-.64893-.60547V14.0127c0-2.90527,3.39941-3.42187,3.39941-4.55469a.77675.77675,0,0,0-.84717-.78125,1.17684,1.17684,0,0,0-.83594.38477c-.2749.26367-.561.374-.85791.13184l-.4292-.34082c-.30811-.24219-.38525-.51758-.1543-.81445a2.97155,2.97155,0,0,1,2.45361-1.17676,2.45393,2.45393,0,0,1,2.68408,2.40918c0,2.45312-3.1792,2.92676-3.27832,3.93848h2.79443A.54085.54085,0,0,1,16.73975,13.81445ZM9,3A.99974.99974,0,0,0,8,4V8H3V4A1,1,0,0,0,1,4V14a1,1,0,0,0,2,0V10H8v4a1,1,0,0,0,2,0V4A.99974.99974,0,0,0,9,3Z /> </svg>\";\n\n/***/ }),\n/* 94 */\n/***/ (function(module, exports) {\n\nmodule.exports = \"<svg viewbox=\\\"0 0 18 18\\\"> <line class=ql-stroke x1=7 x2=13 y1=4 y2=4></line> <line class=ql-stroke x1=5 x2=11 y1=14 y2=14></line> <line class=ql-stroke x1=8 x2=10 y1=14 y2=4></line> </svg>\";\n\n/***/ }),\n/* 95 */\n/***/ (function(module, exports) {\n\nmodule.exports = \"<svg viewbox=\\\"0 0 18 18\\\"> <rect class=ql-stroke height=10 width=12 x=3 y=4></rect> <circle class=ql-fill cx=6 cy=7 r=1></circle> <polyline class=\\\"ql-even ql-fill\\\" points=\\\"5 12 5 11 7 9 8 10 11 7 13 9 13 12 5 12\\\"></polyline> </svg>\";\n\n/***/ }),\n/* 96 */\n/***/ (function(module, exports) {\n\nmodule.exports = \"<svg viewbox=\\\"0 0 18 18\\\"> <line class=ql-stroke x1=3 x2=15 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=9 x2=15 y1=9 y2=9></line> <polyline class=\\\"ql-fill ql-stroke\\\" points=\\\"3 7 3 11 5 9 3 7\\\"></polyline> </svg>\";\n\n/***/ }),\n/* 97 */\n/***/ (function(module, exports) {\n\nmodule.exports = \"<svg viewbox=\\\"0 0 18 18\\\"> <line class=ql-stroke x1=3 x2=15 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=9 x2=15 y1=9 y2=9></line> <polyline class=ql-stroke points=\\\"5 7 5 11 3 9 5 7\\\"></polyline> </svg>\";\n\n/***/ }),\n/* 98 */\n/***/ (function(module, exports) {\n\nmodule.exports = \"<svg viewbox=\\\"0 0 18 18\\\"> <line class=ql-stroke x1=7 x2=11 y1=7 y2=11></line> <path class=\\\"ql-even ql-stroke\\\" d=M8.9,4.577a3.476,3.476,0,0,1,.36,4.679A3.476,3.476,0,0,1,4.577,8.9C3.185,7.5,2.035,6.4,4.217,4.217S7.5,3.185,8.9,4.577Z></path> <path class=\\\"ql-even ql-stroke\\\" d=M13.423,9.1a3.476,3.476,0,0,0-4.679-.36,3.476,3.476,0,0,0,.36,4.679c1.392,1.392,2.5,2.542,4.679.36S14.815,10.5,13.423,9.1Z></path> </svg>\";\n\n/***/ }),\n/* 99 */\n/***/ (function(module, exports) {\n\nmodule.exports = \"<svg viewbox=\\\"0 0 18 18\\\"> <line class=ql-stroke x1=7 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=7 x2=15 y1=9 y2=9></line> <line class=ql-stroke x1=7 x2=15 y1=14 y2=14></line> <line class=\\\"ql-stroke ql-thin\\\" x1=2.5 x2=4.5 y1=5.5 y2=5.5></line> <path class=ql-fill d=M3.5,6A0.5,0.5,0,0,1,3,5.5V3.085l-0.276.138A0.5,0.5,0,0,1,2.053,3c-0.124-.247-0.023-0.324.224-0.447l1-.5A0.5,0.5,0,0,1,4,2.5v3A0.5,0.5,0,0,1,3.5,6Z></path> <path class=\\\"ql-stroke ql-thin\\\" d=M4.5,10.5h-2c0-.234,1.85-1.076,1.85-2.234A0.959,0.959,0,0,0,2.5,8.156></path> <path class=\\\"ql-stroke ql-thin\\\" d=M2.5,14.846a0.959,0.959,0,0,0,1.85-.109A0.7,0.7,0,0,0,3.75,14a0.688,0.688,0,0,0,.6-0.736,0.959,0.959,0,0,0-1.85-.109></path> </svg>\";\n\n/***/ }),\n/* 100 */\n/***/ (function(module, exports) {\n\nmodule.exports = \"<svg viewbox=\\\"0 0 18 18\\\"> <line class=ql-stroke x1=6 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=6 x2=15 y1=9 y2=9></line> <line class=ql-stroke x1=6 x2=15 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=3 y1=4 y2=4></line> <line class=ql-stroke x1=3 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=3 x2=3 y1=14 y2=14></line> </svg>\";\n\n/***/ }),\n/* 101 */\n/***/ (function(module, exports) {\n\nmodule.exports = \"<svg class=\\\"\\\" viewbox=\\\"0 0 18 18\\\"> <line class=ql-stroke x1=9 x2=15 y1=4 y2=4></line> <polyline class=ql-stroke points=\\\"3 4 4 5 6 3\\\"></polyline> <line class=ql-stroke x1=9 x2=15 y1=14 y2=14></line> <polyline class=ql-stroke points=\\\"3 14 4 15 6 13\\\"></polyline> <line class=ql-stroke x1=9 x2=15 y1=9 y2=9></line> <polyline class=ql-stroke points=\\\"3 9 4 10 6 8\\\"></polyline> </svg>\";\n\n/***/ }),\n/* 102 */\n/***/ (function(module, exports) {\n\nmodule.exports = \"<svg viewbox=\\\"0 0 18 18\\\"> <path class=ql-fill d=M15.5,15H13.861a3.858,3.858,0,0,0,1.914-2.975,1.8,1.8,0,0,0-1.6-1.751A1.921,1.921,0,0,0,12.021,11.7a0.50013,0.50013,0,1,0,.957.291h0a0.914,0.914,0,0,1,1.053-.725,0.81,0.81,0,0,1,.744.762c0,1.076-1.16971,1.86982-1.93971,2.43082A1.45639,1.45639,0,0,0,12,15.5a0.5,0.5,0,0,0,.5.5h3A0.5,0.5,0,0,0,15.5,15Z /> <path class=ql-fill d=M9.65,5.241a1,1,0,0,0-1.409.108L6,7.964,3.759,5.349A1,1,0,0,0,2.192,6.59178Q2.21541,6.6213,2.241,6.649L4.684,9.5,2.241,12.35A1,1,0,0,0,3.71,13.70722q0.02557-.02768.049-0.05722L6,11.036,8.241,13.65a1,1,0,1,0,1.567-1.24277Q9.78459,12.3777,9.759,12.35L7.316,9.5,9.759,6.651A1,1,0,0,0,9.65,5.241Z /> </svg>\";\n\n/***/ }),\n/* 103 */\n/***/ (function(module, exports) {\n\nmodule.exports = \"<svg viewbox=\\\"0 0 18 18\\\"> <path class=ql-fill d=M15.5,7H13.861a4.015,4.015,0,0,0,1.914-2.975,1.8,1.8,0,0,0-1.6-1.751A1.922,1.922,0,0,0,12.021,3.7a0.5,0.5,0,1,0,.957.291,0.917,0.917,0,0,1,1.053-.725,0.81,0.81,0,0,1,.744.762c0,1.077-1.164,1.925-1.934,2.486A1.423,1.423,0,0,0,12,7.5a0.5,0.5,0,0,0,.5.5h3A0.5,0.5,0,0,0,15.5,7Z /> <path class=ql-fill d=M9.651,5.241a1,1,0,0,0-1.41.108L6,7.964,3.759,5.349a1,1,0,1,0-1.519,1.3L4.683,9.5,2.241,12.35a1,1,0,1,0,1.519,1.3L6,11.036,8.241,13.65a1,1,0,0,0,1.519-1.3L7.317,9.5,9.759,6.651A1,1,0,0,0,9.651,5.241Z /> </svg>\";\n\n/***/ }),\n/* 104 */\n/***/ (function(module, exports) {\n\nmodule.exports = \"<svg viewbox=\\\"0 0 18 18\\\"> <line class=\\\"ql-stroke ql-thin\\\" x1=15.5 x2=2.5 y1=8.5 y2=9.5></line> <path class=ql-fill d=M9.007,8C6.542,7.791,6,7.519,6,6.5,6,5.792,7.283,5,9,5c1.571,0,2.765.679,2.969,1.309a1,1,0,0,0,1.9-.617C13.356,4.106,11.354,3,9,3,6.2,3,4,4.538,4,6.5a3.2,3.2,0,0,0,.5,1.843Z></path> <path class=ql-fill d=M8.984,10C11.457,10.208,12,10.479,12,11.5c0,0.708-1.283,1.5-3,1.5-1.571,0-2.765-.679-2.969-1.309a1,1,0,1,0-1.9.617C4.644,13.894,6.646,15,9,15c2.8,0,5-1.538,5-3.5a3.2,3.2,0,0,0-.5-1.843Z></path> </svg>\";\n\n/***/ }),\n/* 105 */\n/***/ (function(module, exports) {\n\nmodule.exports = \"<svg viewbox=\\\"0 0 18 18\\\"> <path class=ql-stroke d=M5,3V9a4.012,4.012,0,0,0,4,4H9a4.012,4.012,0,0,0,4-4V3></path> <rect class=ql-fill height=1 rx=0.5 ry=0.5 width=12 x=3 y=15></rect> </svg>\";\n\n/***/ }),\n/* 106 */\n/***/ (function(module, exports) {\n\nmodule.exports = \"<svg viewbox=\\\"0 0 18 18\\\"> <rect class=ql-stroke height=12 width=12 x=3 y=3></rect> <rect class=ql-fill height=12 width=1 x=5 y=3></rect> <rect class=ql-fill height=12 width=1 x=12 y=3></rect> <rect class=ql-fill height=2 width=8 x=5 y=8></rect> <rect class=ql-fill height=1 width=3 x=3 y=5></rect> <rect class=ql-fill height=1 width=3 x=3 y=7></rect> <rect class=ql-fill height=1 width=3 x=3 y=10></rect> <rect class=ql-fill height=1 width=3 x=3 y=12></rect> <rect class=ql-fill height=1 width=3 x=12 y=5></rect> <rect class=ql-fill height=1 width=3 x=12 y=7></rect> <rect class=ql-fill height=1 width=3 x=12 y=10></rect> <rect class=ql-fill height=1 width=3 x=12 y=12></rect> </svg>\";\n\n/***/ }),\n/* 107 */\n/***/ (function(module, exports) {\n\nmodule.exports = \"<svg viewbox=\\\"0 0 18 18\\\"> <polygon class=ql-stroke points=\\\"7 11 9 13 11 11 7 11\\\"></polygon> <polygon class=ql-stroke points=\\\"7 7 9 5 11 7 7 7\\\"></polygon> </svg>\";\n\n/***/ }),\n/* 108 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.default = exports.BubbleTooltip = undefined;\n\nvar _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if (\"value\" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _extend = __webpack_require__(3);\n\nvar _extend2 = _interopRequireDefault(_extend);\n\nvar _emitter = __webpack_require__(8);\n\nvar _emitter2 = _interopRequireDefault(_emitter);\n\nvar _base = __webpack_require__(43);\n\nvar _base2 = _interopRequireDefault(_base);\n\nvar _selection = __webpack_require__(15);\n\nvar _icons = __webpack_require__(41);\n\nvar _icons2 = _interopRequireDefault(_icons);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar TOOLBAR_CONFIG = [['bold', 'italic', 'link'], [{ header: 1 }, { header: 2 }, 'blockquote']];\n\nvar BubbleTheme = function (_BaseTheme) {\n  _inherits(BubbleTheme, _BaseTheme);\n\n  function BubbleTheme(quill, options) {\n    _classCallCheck(this, BubbleTheme);\n\n    if (options.modules.toolbar != null && options.modules.toolbar.container == null) {\n      options.modules.toolbar.container = TOOLBAR_CONFIG;\n    }\n\n    var _this = _possibleConstructorReturn(this, (BubbleTheme.__proto__ || Object.getPrototypeOf(BubbleTheme)).call(this, quill, options));\n\n    _this.quill.container.classList.add('ql-bubble');\n    return _this;\n  }\n\n  _createClass(BubbleTheme, [{\n    key: 'extendToolbar',\n    value: function extendToolbar(toolbar) {\n      this.tooltip = new BubbleTooltip(this.quill, this.options.bounds);\n      this.tooltip.root.appendChild(toolbar.container);\n      this.buildButtons([].slice.call(toolbar.container.querySelectorAll('button')), _icons2.default);\n      this.buildPickers([].slice.call(toolbar.container.querySelectorAll('select')), _icons2.default);\n    }\n  }]);\n\n  return BubbleTheme;\n}(_base2.default);\n\nBubbleTheme.DEFAULTS = (0, _extend2.default)(true, {}, _base2.default.DEFAULTS, {\n  modules: {\n    toolbar: {\n      handlers: {\n        link: function link(value) {\n          if (!value) {\n            this.quill.format('link', false);\n          } else {\n            this.quill.theme.tooltip.edit();\n          }\n        }\n      }\n    }\n  }\n});\n\nvar BubbleTooltip = function (_BaseTooltip) {\n  _inherits(BubbleTooltip, _BaseTooltip);\n\n  function BubbleTooltip(quill, bounds) {\n    _classCallCheck(this, BubbleTooltip);\n\n    var _this2 = _possibleConstructorReturn(this, (BubbleTooltip.__proto__ || Object.getPrototypeOf(BubbleTooltip)).call(this, quill, bounds));\n\n    _this2.quill.on(_emitter2.default.events.EDITOR_CHANGE, function (type, range, oldRange, source) {\n      if (type !== _emitter2.default.events.SELECTION_CHANGE) return;\n      if (range != null && range.length > 0 && source === _emitter2.default.sources.USER) {\n        _this2.show();\n        // Lock our width so we will expand beyond our offsetParent boundaries\n        _this2.root.style.left = '0px';\n        _this2.root.style.width = '';\n        _this2.root.style.width = _this2.root.offsetWidth + 'px';\n        var lines = _this2.quill.getLines(range.index, range.length);\n        if (lines.length === 1) {\n          _this2.position(_this2.quill.getBounds(range));\n        } else {\n          var lastLine = lines[lines.length - 1];\n          var index = _this2.quill.getIndex(lastLine);\n          var length = Math.min(lastLine.length() - 1, range.index + range.length - index);\n          var _bounds = _this2.quill.getBounds(new _selection.Range(index, length));\n          _this2.position(_bounds);\n        }\n      } else if (document.activeElement !== _this2.textbox && _this2.quill.hasFocus()) {\n        _this2.hide();\n      }\n    });\n    return _this2;\n  }\n\n  _createClass(BubbleTooltip, [{\n    key: 'listen',\n    value: function listen() {\n      var _this3 = this;\n\n      _get(BubbleTooltip.prototype.__proto__ || Object.getPrototypeOf(BubbleTooltip.prototype), 'listen', this).call(this);\n      this.root.querySelector('.ql-close').addEventListener('click', function () {\n        _this3.root.classList.remove('ql-editing');\n      });\n      this.quill.on(_emitter2.default.events.SCROLL_OPTIMIZE, function () {\n        // Let selection be restored by toolbar handlers before repositioning\n        setTimeout(function () {\n          if (_this3.root.classList.contains('ql-hidden')) return;\n          var range = _this3.quill.getSelection();\n          if (range != null) {\n            _this3.position(_this3.quill.getBounds(range));\n          }\n        }, 1);\n      });\n    }\n  }, {\n    key: 'cancel',\n    value: function cancel() {\n      this.show();\n    }\n  }, {\n    key: 'position',\n    value: function position(reference) {\n      var shift = _get(BubbleTooltip.prototype.__proto__ || Object.getPrototypeOf(BubbleTooltip.prototype), 'position', this).call(this, reference);\n      var arrow = this.root.querySelector('.ql-tooltip-arrow');\n      arrow.style.marginLeft = '';\n      if (shift === 0) return shift;\n      arrow.style.marginLeft = -1 * shift - arrow.offsetWidth / 2 + 'px';\n    }\n  }]);\n\n  return BubbleTooltip;\n}(_base.BaseTooltip);\n\nBubbleTooltip.TEMPLATE = ['<span class=\"ql-tooltip-arrow\"></span>', '<div class=\"ql-tooltip-editor\">', '<input type=\"text\" data-formula=\"e=mc^2\" data-link=\"https://quilljs.com\" data-video=\"Embed URL\">', '<a class=\"ql-close\"></a>', '</div>'].join('');\n\nexports.BubbleTooltip = BubbleTooltip;\nexports.default = BubbleTheme;\n\n/***/ }),\n/* 109 */\n/***/ (function(module, exports, __webpack_require__) {\n\nmodule.exports = __webpack_require__(63);\n\n\n/***/ })\n/******/ ])[\"default\"];\n});"
  },
  {
    "path": "static/quill/quill.snow.css",
    "content": "/*!\n * Quill Editor v1.3.5\n * https://quilljs.com/\n * Copyright (c) 2014, Jason Chen\n * Copyright (c) 2013, salesforce.com\n */\n.ql-container {\n  box-sizing: border-box;\n  font-family: Helvetica, Arial, sans-serif;\n  font-size: 13px;\n  height: 100%;\n  margin: 0px;\n  position: relative;\n}\n.ql-container.ql-disabled .ql-tooltip {\n  visibility: hidden;\n}\n.ql-container.ql-disabled .ql-editor ul[data-checked] > li::before {\n  pointer-events: none;\n}\n.ql-clipboard {\n  left: -100000px;\n  height: 1px;\n  overflow-y: hidden;\n  position: absolute;\n  top: 50%;\n}\n.ql-clipboard p {\n  margin: 0;\n  padding: 0;\n}\n.ql-editor {\n  box-sizing: border-box;\n  line-height: 1.42;\n  height: 100%;\n  outline: none;\n  overflow-y: auto;\n  padding: 12px 15px;\n  tab-size: 4;\n  -moz-tab-size: 4;\n  text-align: left;\n  white-space: pre-wrap;\n  word-wrap: break-word;\n}\n.ql-editor > * {\n  cursor: text;\n}\n.ql-editor p,\n.ql-editor ol,\n.ql-editor ul,\n.ql-editor pre,\n.ql-editor blockquote,\n.ql-editor h1,\n.ql-editor h2,\n.ql-editor h3,\n.ql-editor h4,\n.ql-editor h5,\n.ql-editor h6 {\n  margin: 0;\n  padding: 0;\n  counter-reset: list-1 list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9;\n}\n.ql-editor ol,\n.ql-editor ul {\n  padding-left: 1.5em;\n}\n.ql-editor ol > li,\n.ql-editor ul > li {\n  list-style-type: none;\n}\n.ql-editor ul > li::before {\n  content: '\\2022';\n}\n.ql-editor ul[data-checked=true],\n.ql-editor ul[data-checked=false] {\n  pointer-events: none;\n}\n.ql-editor ul[data-checked=true] > li *,\n.ql-editor ul[data-checked=false] > li * {\n  pointer-events: all;\n}\n.ql-editor ul[data-checked=true] > li::before,\n.ql-editor ul[data-checked=false] > li::before {\n  color: #777;\n  cursor: pointer;\n  pointer-events: all;\n}\n.ql-editor ul[data-checked=true] > li::before {\n  content: '\\2611';\n}\n.ql-editor ul[data-checked=false] > li::before {\n  content: '\\2610';\n}\n.ql-editor li::before {\n  display: inline-block;\n  white-space: nowrap;\n  width: 1.2em;\n}\n.ql-editor li:not(.ql-direction-rtl)::before {\n  margin-left: -1.5em;\n  margin-right: 0.3em;\n  text-align: right;\n}\n.ql-editor li.ql-direction-rtl::before {\n  margin-left: 0.3em;\n  margin-right: -1.5em;\n}\n.ql-editor ol li:not(.ql-direction-rtl),\n.ql-editor ul li:not(.ql-direction-rtl) {\n  padding-left: 1.5em;\n}\n.ql-editor ol li.ql-direction-rtl,\n.ql-editor ul li.ql-direction-rtl {\n  padding-right: 1.5em;\n}\n.ql-editor ol li {\n  counter-reset: list-1 list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9;\n  counter-increment: list-0;\n}\n.ql-editor ol li:before {\n  content: counter(list-0, decimal) '. ';\n}\n.ql-editor ol li.ql-indent-1 {\n  counter-increment: list-1;\n}\n.ql-editor ol li.ql-indent-1:before {\n  content: counter(list-1, lower-alpha) '. ';\n}\n.ql-editor ol li.ql-indent-1 {\n  counter-reset: list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9;\n}\n.ql-editor ol li.ql-indent-2 {\n  counter-increment: list-2;\n}\n.ql-editor ol li.ql-indent-2:before {\n  content: counter(list-2, lower-roman) '. ';\n}\n.ql-editor ol li.ql-indent-2 {\n  counter-reset: list-3 list-4 list-5 list-6 list-7 list-8 list-9;\n}\n.ql-editor ol li.ql-indent-3 {\n  counter-increment: list-3;\n}\n.ql-editor ol li.ql-indent-3:before {\n  content: counter(list-3, decimal) '. ';\n}\n.ql-editor ol li.ql-indent-3 {\n  counter-reset: list-4 list-5 list-6 list-7 list-8 list-9;\n}\n.ql-editor ol li.ql-indent-4 {\n  counter-increment: list-4;\n}\n.ql-editor ol li.ql-indent-4:before {\n  content: counter(list-4, lower-alpha) '. ';\n}\n.ql-editor ol li.ql-indent-4 {\n  counter-reset: list-5 list-6 list-7 list-8 list-9;\n}\n.ql-editor ol li.ql-indent-5 {\n  counter-increment: list-5;\n}\n.ql-editor ol li.ql-indent-5:before {\n  content: counter(list-5, lower-roman) '. ';\n}\n.ql-editor ol li.ql-indent-5 {\n  counter-reset: list-6 list-7 list-8 list-9;\n}\n.ql-editor ol li.ql-indent-6 {\n  counter-increment: list-6;\n}\n.ql-editor ol li.ql-indent-6:before {\n  content: counter(list-6, decimal) '. ';\n}\n.ql-editor ol li.ql-indent-6 {\n  counter-reset: list-7 list-8 list-9;\n}\n.ql-editor ol li.ql-indent-7 {\n  counter-increment: list-7;\n}\n.ql-editor ol li.ql-indent-7:before {\n  content: counter(list-7, lower-alpha) '. ';\n}\n.ql-editor ol li.ql-indent-7 {\n  counter-reset: list-8 list-9;\n}\n.ql-editor ol li.ql-indent-8 {\n  counter-increment: list-8;\n}\n.ql-editor ol li.ql-indent-8:before {\n  content: counter(list-8, lower-roman) '. ';\n}\n.ql-editor ol li.ql-indent-8 {\n  counter-reset: list-9;\n}\n.ql-editor ol li.ql-indent-9 {\n  counter-increment: list-9;\n}\n.ql-editor ol li.ql-indent-9:before {\n  content: counter(list-9, decimal) '. ';\n}\n.ql-editor .ql-indent-1:not(.ql-direction-rtl) {\n  padding-left: 3em;\n}\n.ql-editor li.ql-indent-1:not(.ql-direction-rtl) {\n  padding-left: 4.5em;\n}\n.ql-editor .ql-indent-1.ql-direction-rtl.ql-align-right {\n  padding-right: 3em;\n}\n.ql-editor li.ql-indent-1.ql-direction-rtl.ql-align-right {\n  padding-right: 4.5em;\n}\n.ql-editor .ql-indent-2:not(.ql-direction-rtl) {\n  padding-left: 6em;\n}\n.ql-editor li.ql-indent-2:not(.ql-direction-rtl) {\n  padding-left: 7.5em;\n}\n.ql-editor .ql-indent-2.ql-direction-rtl.ql-align-right {\n  padding-right: 6em;\n}\n.ql-editor li.ql-indent-2.ql-direction-rtl.ql-align-right {\n  padding-right: 7.5em;\n}\n.ql-editor .ql-indent-3:not(.ql-direction-rtl) {\n  padding-left: 9em;\n}\n.ql-editor li.ql-indent-3:not(.ql-direction-rtl) {\n  padding-left: 10.5em;\n}\n.ql-editor .ql-indent-3.ql-direction-rtl.ql-align-right {\n  padding-right: 9em;\n}\n.ql-editor li.ql-indent-3.ql-direction-rtl.ql-align-right {\n  padding-right: 10.5em;\n}\n.ql-editor .ql-indent-4:not(.ql-direction-rtl) {\n  padding-left: 12em;\n}\n.ql-editor li.ql-indent-4:not(.ql-direction-rtl) {\n  padding-left: 13.5em;\n}\n.ql-editor .ql-indent-4.ql-direction-rtl.ql-align-right {\n  padding-right: 12em;\n}\n.ql-editor li.ql-indent-4.ql-direction-rtl.ql-align-right {\n  padding-right: 13.5em;\n}\n.ql-editor .ql-indent-5:not(.ql-direction-rtl) {\n  padding-left: 15em;\n}\n.ql-editor li.ql-indent-5:not(.ql-direction-rtl) {\n  padding-left: 16.5em;\n}\n.ql-editor .ql-indent-5.ql-direction-rtl.ql-align-right {\n  padding-right: 15em;\n}\n.ql-editor li.ql-indent-5.ql-direction-rtl.ql-align-right {\n  padding-right: 16.5em;\n}\n.ql-editor .ql-indent-6:not(.ql-direction-rtl) {\n  padding-left: 18em;\n}\n.ql-editor li.ql-indent-6:not(.ql-direction-rtl) {\n  padding-left: 19.5em;\n}\n.ql-editor .ql-indent-6.ql-direction-rtl.ql-align-right {\n  padding-right: 18em;\n}\n.ql-editor li.ql-indent-6.ql-direction-rtl.ql-align-right {\n  padding-right: 19.5em;\n}\n.ql-editor .ql-indent-7:not(.ql-direction-rtl) {\n  padding-left: 21em;\n}\n.ql-editor li.ql-indent-7:not(.ql-direction-rtl) {\n  padding-left: 22.5em;\n}\n.ql-editor .ql-indent-7.ql-direction-rtl.ql-align-right {\n  padding-right: 21em;\n}\n.ql-editor li.ql-indent-7.ql-direction-rtl.ql-align-right {\n  padding-right: 22.5em;\n}\n.ql-editor .ql-indent-8:not(.ql-direction-rtl) {\n  padding-left: 24em;\n}\n.ql-editor li.ql-indent-8:not(.ql-direction-rtl) {\n  padding-left: 25.5em;\n}\n.ql-editor .ql-indent-8.ql-direction-rtl.ql-align-right {\n  padding-right: 24em;\n}\n.ql-editor li.ql-indent-8.ql-direction-rtl.ql-align-right {\n  padding-right: 25.5em;\n}\n.ql-editor .ql-indent-9:not(.ql-direction-rtl) {\n  padding-left: 27em;\n}\n.ql-editor li.ql-indent-9:not(.ql-direction-rtl) {\n  padding-left: 28.5em;\n}\n.ql-editor .ql-indent-9.ql-direction-rtl.ql-align-right {\n  padding-right: 27em;\n}\n.ql-editor li.ql-indent-9.ql-direction-rtl.ql-align-right {\n  padding-right: 28.5em;\n}\n.ql-editor .ql-video {\n  display: block;\n  max-width: 100%;\n}\n.ql-editor .ql-video.ql-align-center {\n  margin: 0 auto;\n}\n.ql-editor .ql-video.ql-align-right {\n  margin: 0 0 0 auto;\n}\n.ql-editor .ql-bg-black {\n  background-color: #000;\n}\n.ql-editor .ql-bg-red {\n  background-color: #e60000;\n}\n.ql-editor .ql-bg-orange {\n  background-color: #f90;\n}\n.ql-editor .ql-bg-yellow {\n  background-color: #ff0;\n}\n.ql-editor .ql-bg-green {\n  background-color: #008a00;\n}\n.ql-editor .ql-bg-blue {\n  background-color: #4b4b4b;\n}\n.ql-editor .ql-bg-purple {\n  background-color: #93f;\n}\n.ql-editor .ql-color-white {\n  color: #fff;\n}\n.ql-editor .ql-color-red {\n  color: #e60000;\n}\n.ql-editor .ql-color-orange {\n  color: #f90;\n}\n.ql-editor .ql-color-yellow {\n  color: #ff0;\n}\n.ql-editor .ql-color-green {\n  color: #008a00;\n}\n.ql-editor .ql-color-blue {\n  color: #4b4b4b;\n}\n.ql-editor .ql-color-purple {\n  color: #93f;\n}\n.ql-editor .ql-font-serif {\n  font-family: Georgia, Times New Roman, serif;\n}\n.ql-editor .ql-font-monospace {\n  font-family: Monaco, Courier New, monospace;\n}\n.ql-editor .ql-size-small {\n  font-size: 0.75em;\n}\n.ql-editor .ql-size-large {\n  font-size: 1.5em;\n}\n.ql-editor .ql-size-huge {\n  font-size: 2.5em;\n}\n.ql-editor .ql-direction-rtl {\n  direction: rtl;\n  text-align: inherit;\n}\n.ql-editor .ql-align-center {\n  text-align: center;\n}\n.ql-editor .ql-align-justify {\n  text-align: justify;\n}\n.ql-editor .ql-align-right {\n  text-align: right;\n}\n.ql-editor.ql-blank::before {\n  color: rgba(0,0,0,0.6);\n  content: attr(data-placeholder);\n  font-style: italic;\n  left: 15px;\n  pointer-events: none;\n  position: absolute;\n  right: 15px;\n}\n.ql-snow.ql-toolbar:after,\n.ql-snow .ql-toolbar:after {\n  clear: both;\n  content: '';\n  display: table;\n}\n.ql-snow.ql-toolbar button,\n.ql-snow .ql-toolbar button {\n  background: none;\n  border: none;\n  cursor: pointer;\n  display: inline-block;\n  float: left;\n  height: 24px;\n  padding: 3px 5px;\n  width: 28px;\n}\n.ql-snow.ql-toolbar button svg,\n.ql-snow .ql-toolbar button svg {\n  float: left;\n  height: 100%;\n}\n.ql-snow.ql-toolbar button:active:hover,\n.ql-snow .ql-toolbar button:active:hover {\n  outline: none;\n}\n.ql-snow.ql-toolbar input.ql-image[type=file],\n.ql-snow .ql-toolbar input.ql-image[type=file] {\n  display: none;\n}\n.ql-snow.ql-toolbar button:hover,\n.ql-snow .ql-toolbar button:hover,\n.ql-snow.ql-toolbar button:focus,\n.ql-snow .ql-toolbar button:focus,\n.ql-snow.ql-toolbar button.ql-active,\n.ql-snow .ql-toolbar button.ql-active,\n.ql-snow.ql-toolbar .ql-picker-label:hover,\n.ql-snow .ql-toolbar .ql-picker-label:hover,\n.ql-snow.ql-toolbar .ql-picker-label.ql-active,\n.ql-snow .ql-toolbar .ql-picker-label.ql-active,\n.ql-snow.ql-toolbar .ql-picker-item:hover,\n.ql-snow .ql-toolbar .ql-picker-item:hover,\n.ql-snow.ql-toolbar .ql-picker-item.ql-selected,\n.ql-snow .ql-toolbar .ql-picker-item.ql-selected {\n  color: #4b4b4b;\n}\n.ql-snow.ql-toolbar button:hover .ql-fill,\n.ql-snow .ql-toolbar button:hover .ql-fill,\n.ql-snow.ql-toolbar button:focus .ql-fill,\n.ql-snow .ql-toolbar button:focus .ql-fill,\n.ql-snow.ql-toolbar button.ql-active .ql-fill,\n.ql-snow .ql-toolbar button.ql-active .ql-fill,\n.ql-snow.ql-toolbar .ql-picker-label:hover .ql-fill,\n.ql-snow .ql-toolbar .ql-picker-label:hover .ql-fill,\n.ql-snow.ql-toolbar .ql-picker-label.ql-active .ql-fill,\n.ql-snow .ql-toolbar .ql-picker-label.ql-active .ql-fill,\n.ql-snow.ql-toolbar .ql-picker-item:hover .ql-fill,\n.ql-snow .ql-toolbar .ql-picker-item:hover .ql-fill,\n.ql-snow.ql-toolbar .ql-picker-item.ql-selected .ql-fill,\n.ql-snow .ql-toolbar .ql-picker-item.ql-selected .ql-fill,\n.ql-snow.ql-toolbar button:hover .ql-stroke.ql-fill,\n.ql-snow .ql-toolbar button:hover .ql-stroke.ql-fill,\n.ql-snow.ql-toolbar button:focus .ql-stroke.ql-fill,\n.ql-snow .ql-toolbar button:focus .ql-stroke.ql-fill,\n.ql-snow.ql-toolbar button.ql-active .ql-stroke.ql-fill,\n.ql-snow .ql-toolbar button.ql-active .ql-stroke.ql-fill,\n.ql-snow.ql-toolbar .ql-picker-label:hover .ql-stroke.ql-fill,\n.ql-snow .ql-toolbar .ql-picker-label:hover .ql-stroke.ql-fill,\n.ql-snow.ql-toolbar .ql-picker-label.ql-active .ql-stroke.ql-fill,\n.ql-snow .ql-toolbar .ql-picker-label.ql-active .ql-stroke.ql-fill,\n.ql-snow.ql-toolbar .ql-picker-item:hover .ql-stroke.ql-fill,\n.ql-snow .ql-toolbar .ql-picker-item:hover .ql-stroke.ql-fill,\n.ql-snow.ql-toolbar .ql-picker-item.ql-selected .ql-stroke.ql-fill,\n.ql-snow .ql-toolbar .ql-picker-item.ql-selected .ql-stroke.ql-fill {\n  fill: #4b4b4b;\n}\n.ql-snow.ql-toolbar button:hover .ql-stroke,\n.ql-snow .ql-toolbar button:hover .ql-stroke,\n.ql-snow.ql-toolbar button:focus .ql-stroke,\n.ql-snow .ql-toolbar button:focus .ql-stroke,\n.ql-snow.ql-toolbar button.ql-active .ql-stroke,\n.ql-snow .ql-toolbar button.ql-active .ql-stroke,\n.ql-snow.ql-toolbar .ql-picker-label:hover .ql-stroke,\n.ql-snow .ql-toolbar .ql-picker-label:hover .ql-stroke,\n.ql-snow.ql-toolbar .ql-picker-label.ql-active .ql-stroke,\n.ql-snow .ql-toolbar .ql-picker-label.ql-active .ql-stroke,\n.ql-snow.ql-toolbar .ql-picker-item:hover .ql-stroke,\n.ql-snow .ql-toolbar .ql-picker-item:hover .ql-stroke,\n.ql-snow.ql-toolbar .ql-picker-item.ql-selected .ql-stroke,\n.ql-snow .ql-toolbar .ql-picker-item.ql-selected .ql-stroke,\n.ql-snow.ql-toolbar button:hover .ql-stroke-miter,\n.ql-snow .ql-toolbar button:hover .ql-stroke-miter,\n.ql-snow.ql-toolbar button:focus .ql-stroke-miter,\n.ql-snow .ql-toolbar button:focus .ql-stroke-miter,\n.ql-snow.ql-toolbar button.ql-active .ql-stroke-miter,\n.ql-snow .ql-toolbar button.ql-active .ql-stroke-miter,\n.ql-snow.ql-toolbar .ql-picker-label:hover .ql-stroke-miter,\n.ql-snow .ql-toolbar .ql-picker-label:hover .ql-stroke-miter,\n.ql-snow.ql-toolbar .ql-picker-label.ql-active .ql-stroke-miter,\n.ql-snow .ql-toolbar .ql-picker-label.ql-active .ql-stroke-miter,\n.ql-snow.ql-toolbar .ql-picker-item:hover .ql-stroke-miter,\n.ql-snow .ql-toolbar .ql-picker-item:hover .ql-stroke-miter,\n.ql-snow.ql-toolbar .ql-picker-item.ql-selected .ql-stroke-miter,\n.ql-snow .ql-toolbar .ql-picker-item.ql-selected .ql-stroke-miter {\n  stroke: #4b4b4b;\n}\n@media (pointer: coarse) {\n  .ql-snow.ql-toolbar button:hover:not(.ql-active),\n  .ql-snow .ql-toolbar button:hover:not(.ql-active) {\n    color: #444;\n  }\n  .ql-snow.ql-toolbar button:hover:not(.ql-active) .ql-fill,\n  .ql-snow .ql-toolbar button:hover:not(.ql-active) .ql-fill,\n  .ql-snow.ql-toolbar button:hover:not(.ql-active) .ql-stroke.ql-fill,\n  .ql-snow .ql-toolbar button:hover:not(.ql-active) .ql-stroke.ql-fill {\n    fill: #444;\n  }\n  .ql-snow.ql-toolbar button:hover:not(.ql-active) .ql-stroke,\n  .ql-snow .ql-toolbar button:hover:not(.ql-active) .ql-stroke,\n  .ql-snow.ql-toolbar button:hover:not(.ql-active) .ql-stroke-miter,\n  .ql-snow .ql-toolbar button:hover:not(.ql-active) .ql-stroke-miter {\n    stroke: #444;\n  }\n}\n.ql-snow {\n  box-sizing: border-box;\n}\n.ql-snow * {\n  box-sizing: border-box;\n}\n.ql-snow .ql-hidden {\n  display: none;\n}\n.ql-snow .ql-out-bottom,\n.ql-snow .ql-out-top {\n  visibility: hidden;\n}\n.ql-snow .ql-tooltip {\n  position: absolute;\n  transform: translateY(10px);\n}\n.ql-snow .ql-tooltip a {\n  cursor: pointer;\n  text-decoration: none;\n}\n.ql-snow .ql-tooltip.ql-flip {\n  transform: translateY(-10px);\n}\n.ql-snow .ql-formats {\n  display: inline-block;\n  vertical-align: middle;\n}\n.ql-snow .ql-formats:after {\n  clear: both;\n  content: '';\n  display: table;\n}\n.ql-snow .ql-stroke {\n  fill: none;\n  stroke: #444;\n  stroke-linecap: round;\n  stroke-linejoin: round;\n  stroke-width: 2;\n}\n.ql-snow .ql-stroke-miter {\n  fill: none;\n  stroke: #444;\n  stroke-miterlimit: 10;\n  stroke-width: 2;\n}\n.ql-snow .ql-fill,\n.ql-snow .ql-stroke.ql-fill {\n  fill: #444;\n}\n.ql-snow .ql-empty {\n  fill: none;\n}\n.ql-snow .ql-even {\n  fill-rule: evenodd;\n}\n.ql-snow .ql-thin,\n.ql-snow .ql-stroke.ql-thin {\n  stroke-width: 1;\n}\n.ql-snow .ql-transparent {\n  opacity: 0.4;\n}\n.ql-snow .ql-direction svg:last-child {\n  display: none;\n}\n.ql-snow .ql-direction.ql-active svg:last-child {\n  display: inline;\n}\n.ql-snow .ql-direction.ql-active svg:first-child {\n  display: none;\n}\n.ql-snow .ql-editor h1 {\n  font-size: 2em;\n}\n.ql-snow .ql-editor h2 {\n  font-size: 1.5em;\n}\n.ql-snow .ql-editor h3 {\n  font-size: 1.17em;\n}\n.ql-snow .ql-editor h4 {\n  font-size: 1em;\n}\n.ql-snow .ql-editor h5 {\n  font-size: 0.83em;\n}\n.ql-snow .ql-editor h6 {\n  font-size: 0.67em;\n}\n.ql-snow .ql-editor a {\n  text-decoration: underline;\n}\n.ql-snow .ql-editor blockquote {\n  border-left: 4px solid #ccc;\n  margin-bottom: 5px;\n  margin-top: 5px;\n  padding-left: 16px;\n}\n.ql-snow .ql-editor code,\n.ql-snow .ql-editor pre {\n  background-color: #f0f0f0;\n  border-radius: 3px;\n}\n.ql-snow .ql-editor pre {\n  white-space: pre-wrap;\n  margin-bottom: 5px;\n  margin-top: 5px;\n  padding: 5px 10px;\n}\n.ql-snow .ql-editor code {\n  font-size: 85%;\n  padding: 2px 4px;\n}\n.ql-snow .ql-editor pre.ql-syntax {\n  background-color: #23241f;\n  color: #f8f8f2;\n  overflow: visible;\n}\n.ql-snow .ql-editor img {\n  max-width: 100%;\n}\n.ql-snow .ql-picker {\n  color: #444;\n  display: inline-block;\n  float: left;\n  font-size: 14px;\n  font-weight: 500;\n  height: 24px;\n  position: relative;\n  vertical-align: middle;\n}\n.ql-snow .ql-picker-label {\n  cursor: pointer;\n  display: inline-block;\n  height: 100%;\n  padding-left: 8px;\n  padding-right: 2px;\n  position: relative;\n  width: 100%;\n}\n.ql-snow .ql-picker-label::before {\n  display: inline-block;\n  line-height: 22px;\n}\n.ql-snow .ql-picker-options {\n  background-color: #fff;\n  display: none;\n  min-width: 100%;\n  padding: 4px 8px;\n  position: absolute;\n  white-space: nowrap;\n}\n.ql-snow .ql-picker-options .ql-picker-item {\n  cursor: pointer;\n  display: block;\n  padding-bottom: 5px;\n  padding-top: 5px;\n}\n.ql-snow .ql-picker.ql-expanded .ql-picker-label {\n  color: #ccc;\n  z-index: 2;\n}\n.ql-snow .ql-picker.ql-expanded .ql-picker-label .ql-fill {\n  fill: #ccc;\n}\n.ql-snow .ql-picker.ql-expanded .ql-picker-label .ql-stroke {\n  stroke: #ccc;\n}\n.ql-snow .ql-picker.ql-expanded .ql-picker-options {\n  display: block;\n  margin-top: -1px;\n  top: 100%;\n  z-index: 1000;\n}\n.ql-snow .ql-color-picker,\n.ql-snow .ql-icon-picker {\n  width: 28px;\n}\n.ql-snow .ql-color-picker .ql-picker-label,\n.ql-snow .ql-icon-picker .ql-picker-label {\n  padding: 2px 4px;\n}\n.ql-snow .ql-color-picker .ql-picker-label svg,\n.ql-snow .ql-icon-picker .ql-picker-label svg {\n  right: 4px;\n}\n.ql-snow .ql-icon-picker .ql-picker-options {\n  padding: 4px 0px;\n}\n.ql-snow .ql-icon-picker .ql-picker-item {\n  height: 24px;\n  width: 24px;\n  padding: 2px 4px;\n}\n.ql-snow .ql-color-picker .ql-picker-options {\n  padding: 3px 5px;\n  width: 152px;\n}\n.ql-snow .ql-color-picker .ql-picker-item {\n  border: 1px solid transparent;\n  float: left;\n  height: 16px;\n  margin: 2px;\n  padding: 0px;\n  width: 16px;\n}\n.ql-snow .ql-picker:not(.ql-color-picker):not(.ql-icon-picker) svg {\n  position: absolute;\n  margin-top: -9px;\n  right: 0;\n  top: 50%;\n  width: 18px;\n}\n.ql-snow .ql-picker.ql-header .ql-picker-label[data-label]:not([data-label=''])::before,\n.ql-snow .ql-picker.ql-font .ql-picker-label[data-label]:not([data-label=''])::before,\n.ql-snow .ql-picker.ql-size .ql-picker-label[data-label]:not([data-label=''])::before,\n.ql-snow .ql-picker.ql-header .ql-picker-item[data-label]:not([data-label=''])::before,\n.ql-snow .ql-picker.ql-font .ql-picker-item[data-label]:not([data-label=''])::before,\n.ql-snow .ql-picker.ql-size .ql-picker-item[data-label]:not([data-label=''])::before {\n  content: attr(data-label);\n}\n.ql-snow .ql-picker.ql-header {\n  width: 98px;\n}\n.ql-snow .ql-picker.ql-header .ql-picker-label::before,\n.ql-snow .ql-picker.ql-header .ql-picker-item::before {\n  content: 'Normal';\n}\n.ql-snow .ql-picker.ql-header .ql-picker-label[data-value=\"1\"]::before,\n.ql-snow .ql-picker.ql-header .ql-picker-item[data-value=\"1\"]::before {\n  content: 'Heading 1';\n}\n.ql-snow .ql-picker.ql-header .ql-picker-label[data-value=\"2\"]::before,\n.ql-snow .ql-picker.ql-header .ql-picker-item[data-value=\"2\"]::before {\n  content: 'Heading 2';\n}\n.ql-snow .ql-picker.ql-header .ql-picker-label[data-value=\"3\"]::before,\n.ql-snow .ql-picker.ql-header .ql-picker-item[data-value=\"3\"]::before {\n  content: 'Heading 3';\n}\n.ql-snow .ql-picker.ql-header .ql-picker-label[data-value=\"4\"]::before,\n.ql-snow .ql-picker.ql-header .ql-picker-item[data-value=\"4\"]::before {\n  content: 'Heading 4';\n}\n.ql-snow .ql-picker.ql-header .ql-picker-label[data-value=\"5\"]::before,\n.ql-snow .ql-picker.ql-header .ql-picker-item[data-value=\"5\"]::before {\n  content: 'Heading 5';\n}\n.ql-snow .ql-picker.ql-header .ql-picker-label[data-value=\"6\"]::before,\n.ql-snow .ql-picker.ql-header .ql-picker-item[data-value=\"6\"]::before {\n  content: 'Heading 6';\n}\n.ql-snow .ql-picker.ql-header .ql-picker-item[data-value=\"1\"]::before {\n  font-size: 2em;\n}\n.ql-snow .ql-picker.ql-header .ql-picker-item[data-value=\"2\"]::before {\n  font-size: 1.5em;\n}\n.ql-snow .ql-picker.ql-header .ql-picker-item[data-value=\"3\"]::before {\n  font-size: 1.17em;\n}\n.ql-snow .ql-picker.ql-header .ql-picker-item[data-value=\"4\"]::before {\n  font-size: 1em;\n}\n.ql-snow .ql-picker.ql-header .ql-picker-item[data-value=\"5\"]::before {\n  font-size: 0.83em;\n}\n.ql-snow .ql-picker.ql-header .ql-picker-item[data-value=\"6\"]::before {\n  font-size: 0.67em;\n}\n.ql-snow .ql-picker.ql-font {\n  width: 108px;\n}\n.ql-snow .ql-picker.ql-font .ql-picker-label::before,\n.ql-snow .ql-picker.ql-font .ql-picker-item::before {\n  content: 'Sans Serif';\n}\n.ql-snow .ql-picker.ql-font .ql-picker-label[data-value=serif]::before,\n.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=serif]::before {\n  content: 'Serif';\n}\n.ql-snow .ql-picker.ql-font .ql-picker-label[data-value=monospace]::before,\n.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=monospace]::before {\n  content: 'Monospace';\n}\n.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=serif]::before {\n  font-family: Georgia, Times New Roman, serif;\n}\n.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=monospace]::before {\n  font-family: Monaco, Courier New, monospace;\n}\n.ql-snow .ql-picker.ql-size {\n  width: 98px;\n}\n.ql-snow .ql-picker.ql-size .ql-picker-label::before,\n.ql-snow .ql-picker.ql-size .ql-picker-item::before {\n  content: 'Normal';\n}\n.ql-snow .ql-picker.ql-size .ql-picker-label[data-value=small]::before,\n.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=small]::before {\n  content: 'Small';\n}\n.ql-snow .ql-picker.ql-size .ql-picker-label[data-value=large]::before,\n.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=large]::before {\n  content: 'Large';\n}\n.ql-snow .ql-picker.ql-size .ql-picker-label[data-value=huge]::before,\n.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=huge]::before {\n  content: 'Huge';\n}\n.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=small]::before {\n  font-size: 10px;\n}\n.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=large]::before {\n  font-size: 18px;\n}\n.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=huge]::before {\n  font-size: 32px;\n}\n.ql-snow .ql-color-picker.ql-background .ql-picker-item {\n  background-color: #fff;\n}\n.ql-snow .ql-color-picker.ql-color .ql-picker-item {\n  background-color: #000;\n}\n.ql-toolbar.ql-snow {\n  border: 1px solid #ccc;\n  box-sizing: border-box;\n  font-family: 'Helvetica Neue', 'Helvetica', 'Arial', sans-serif;\n  padding: 8px;\n}\n.ql-toolbar.ql-snow .ql-formats {\n  margin-right: 15px;\n}\n.ql-toolbar.ql-snow .ql-picker-label {\n  border: 1px solid transparent;\n}\n.ql-toolbar.ql-snow .ql-picker-options {\n  border: 1px solid transparent;\n  box-shadow: rgba(0,0,0,0.2) 0 2px 8px;\n}\n.ql-toolbar.ql-snow .ql-picker.ql-expanded .ql-picker-label {\n  border-color: #ccc;\n}\n.ql-toolbar.ql-snow .ql-picker.ql-expanded .ql-picker-options {\n  border-color: #ccc;\n}\n.ql-toolbar.ql-snow .ql-color-picker .ql-picker-item.ql-selected,\n.ql-toolbar.ql-snow .ql-color-picker .ql-picker-item:hover {\n  border-color: #000;\n}\n.ql-toolbar.ql-snow + .ql-container.ql-snow {\n  border-top: 0px;\n}\n.ql-snow .ql-tooltip {\n  background-color: #fff;\n  border: 1px solid #ccc;\n  box-shadow: 0px 0px 5px #ddd;\n  color: #444;\n  padding: 5px 12px;\n  white-space: nowrap;\n}\n.ql-snow .ql-tooltip::before {\n  content: \"Visit URL:\";\n  line-height: 26px;\n  margin-right: 8px;\n}\n.ql-snow .ql-tooltip input[type=text] {\n  display: none;\n  border: 1px solid #ccc;\n  font-size: 13px;\n  height: 26px;\n  margin: 0px;\n  padding: 3px 5px;\n  width: 170px;\n}\n.ql-snow .ql-tooltip a.ql-preview {\n  display: inline-block;\n  max-width: 200px;\n  overflow-x: hidden;\n  text-overflow: ellipsis;\n  vertical-align: top;\n}\n.ql-snow .ql-tooltip a.ql-action::after {\n  border-right: 1px solid #ccc;\n  content: 'Edit';\n  margin-left: 16px;\n  padding-right: 8px;\n}\n.ql-snow .ql-tooltip a.ql-remove::before {\n  content: 'Remove';\n  margin-left: 8px;\n}\n.ql-snow .ql-tooltip a {\n  line-height: 26px;\n}\n.ql-snow .ql-tooltip.ql-editing a.ql-preview,\n.ql-snow .ql-tooltip.ql-editing a.ql-remove {\n  display: none;\n}\n.ql-snow .ql-tooltip.ql-editing input[type=text] {\n  display: inline-block;\n}\n.ql-snow .ql-tooltip.ql-editing a.ql-action::after {\n  border-right: 0px;\n  content: 'Save';\n  padding-right: 0px;\n}\n.ql-snow .ql-tooltip[data-mode=link]::before {\n  content: \"Enter link:\";\n}\n.ql-snow .ql-tooltip[data-mode=formula]::before {\n  content: \"Enter formula:\";\n}\n.ql-snow .ql-tooltip[data-mode=video]::before {\n  content: \"Enter video:\";\n}\n.ql-snow a {\n  color: #4b4b4b;\n}\n.ql-container.ql-snow {\n  border: 1px solid #ccc;\n}\n"
  },
  {
    "path": "static/table-editor/.gitignore",
    "content": "node_modules"
  },
  {
    "path": "static/table-editor/dist/index.js",
    "content": "(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(\"TableEditor\", [], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"TableEditor\"] = factory();\n\telse\n\t\troot[\"TableEditor\"] = factory();\n})(typeof self !== 'undefined' ? self : this, function() {\nreturn /******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId]) {\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/ \t\t}\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\ti: moduleId,\n/******/ \t\t\tl: false,\n/******/ \t\t\texports: {}\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.l = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// define getter function for harmony exports\n/******/ \t__webpack_require__.d = function(exports, name, getter) {\n/******/ \t\tif(!__webpack_require__.o(exports, name)) {\n/******/ \t\t\tObject.defineProperty(exports, name, {\n/******/ \t\t\t\tconfigurable: false,\n/******/ \t\t\t\tenumerable: true,\n/******/ \t\t\t\tget: getter\n/******/ \t\t\t});\n/******/ \t\t}\n/******/ \t};\n/******/\n/******/ \t// getDefaultExport function for compatibility with non-harmony modules\n/******/ \t__webpack_require__.n = function(module) {\n/******/ \t\tvar getter = module && module.__esModule ?\n/******/ \t\t\tfunction getDefault() { return module['default']; } :\n/******/ \t\t\tfunction getModuleExports() { return module; };\n/******/ \t\t__webpack_require__.d(getter, 'a', getter);\n/******/ \t\treturn getter;\n/******/ \t};\n/******/\n/******/ \t// Object.prototype.hasOwnProperty.call\n/******/ \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(__webpack_require__.s = 0);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nObject.defineProperty(__webpack_exports__, \"__esModule\", { value: true });\n/* harmony export (immutable) */ __webpack_exports__[\"initTableEditor\"] = initTableEditor;\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__susisu_mte_kernel__ = __webpack_require__(1);\n/* global CodeMirror, $ */\n\n\n// port of the code from: https://github.com/susisu/mte-demo/blob/master/src/main.js\n\n// text editor interface\n// see https://doc.esdoc.org/github.com/susisu/mte-kernel/class/lib/text-editor.js~ITextEditor.html\nclass TextEditorInterface {\n  constructor (editor) {\n    this.editor = editor\n    this.doc = editor.getDoc()\n    this.transaction = false\n    this.onDidFinishTransaction = null\n  }\n\n  getCursorPosition () {\n    const { line, ch } = this.doc.getCursor()\n    return new __WEBPACK_IMPORTED_MODULE_0__susisu_mte_kernel__[\"c\" /* Point */](line, ch)\n  }\n\n  setCursorPosition (pos) {\n    this.doc.setCursor({ line: pos.row, ch: pos.column })\n  }\n\n  setSelectionRange (range) {\n    this.doc.setSelection(\n      { line: range.start.row, ch: range.start.column },\n      { line: range.end.row, ch: range.end.column }\n    )\n  }\n\n  getLastRow () {\n    return this.doc.lineCount() - 1\n  }\n\n  acceptsTableEdit () {\n    return true\n  }\n\n  getLine (row) {\n    return this.doc.getLine(row)\n  }\n\n  insertLine (row, line) {\n    const lastRow = this.getLastRow()\n    if (row > lastRow) {\n      const lastLine = this.getLine(lastRow)\n      this.doc.replaceRange(\n        '\\n' + line,\n        { line: lastRow, ch: lastLine.length },\n        { line: lastRow, ch: lastLine.length }\n      )\n    } else {\n      this.doc.replaceRange(\n        line + '\\n',\n        { line: row, ch: 0 },\n        { line: row, ch: 0 }\n      )\n    }\n  }\n\n  deleteLine (row) {\n    const lastRow = this.getLastRow()\n    if (row >= lastRow) {\n      if (lastRow > 0) {\n        const preLastLine = this.getLine(lastRow - 1)\n        const lastLine = this.getLine(lastRow)\n        this.doc.replaceRange(\n          '',\n          { line: lastRow - 1, ch: preLastLine.length },\n          { line: lastRow, ch: lastLine.length }\n        )\n      } else {\n        const lastLine = this.getLine(lastRow)\n        this.doc.replaceRange(\n          '',\n          { line: lastRow, ch: 0 },\n          { line: lastRow, ch: lastLine.length }\n        )\n      }\n    } else {\n      this.doc.replaceRange(\n        '',\n        { line: row, ch: 0 },\n        { line: row + 1, ch: 0 }\n      )\n    }\n  }\n\n  replaceLines (startRow, endRow, lines) {\n    const lastRow = this.getLastRow()\n    if (endRow > lastRow) {\n      const lastLine = this.getLine(lastRow)\n      this.doc.replaceRange(\n        lines.join('\\n'),\n        { line: startRow, ch: 0 },\n        { line: lastRow, ch: lastLine.length }\n      )\n    } else {\n      this.doc.replaceRange(\n        lines.join('\\n') + '\\n',\n        { line: startRow, ch: 0 },\n        { line: endRow, ch: 0 }\n      )\n    }\n  }\n\n  transact (func) {\n    this.transaction = true\n    func()\n    this.transaction = false\n    if (this.onDidFinishTransaction) {\n      this.onDidFinishTransaction.call(undefined)\n    }\n  }\n}\n\nfunction initTableEditor (editor) {\n  // create an interface to the text editor\n  const editorIntf = new TextEditorInterface(editor)\n  // create a table editor object\n  const tableEditor = new __WEBPACK_IMPORTED_MODULE_0__susisu_mte_kernel__[\"d\" /* TableEditor */](editorIntf)\n  // options for the table editor\n  const opts = Object(__WEBPACK_IMPORTED_MODULE_0__susisu_mte_kernel__[\"e\" /* options */])({\n    smartCursor: true,\n    formatType: __WEBPACK_IMPORTED_MODULE_0__susisu_mte_kernel__[\"b\" /* FormatType */].NORMAL\n  })\n  // keymap of the commands\n  // from https://github.com/susisu/mte-demo/blob/master/src/main.js\n  const keyMap = CodeMirror.normalizeKeyMap({\n    Tab: () => { tableEditor.nextCell(opts) },\n    'Shift-Tab': () => { tableEditor.previousCell(opts) },\n    Enter: () => { tableEditor.nextRow(opts) },\n    'Ctrl-Enter': () => { tableEditor.escape(opts) },\n    'Cmd-Enter': () => { tableEditor.escape(opts) },\n    'Shift-Ctrl-Left': () => { tableEditor.alignColumn(__WEBPACK_IMPORTED_MODULE_0__susisu_mte_kernel__[\"a\" /* Alignment */].LEFT, opts) },\n    'Shift-Cmd-Left': () => { tableEditor.alignColumn(__WEBPACK_IMPORTED_MODULE_0__susisu_mte_kernel__[\"a\" /* Alignment */].LEFT, opts) },\n    'Shift-Ctrl-Right': () => { tableEditor.alignColumn(__WEBPACK_IMPORTED_MODULE_0__susisu_mte_kernel__[\"a\" /* Alignment */].RIGHT, opts) },\n    'Shift-Cmd-Right': () => { tableEditor.alignColumn(__WEBPACK_IMPORTED_MODULE_0__susisu_mte_kernel__[\"a\" /* Alignment */].RIGHT, opts) },\n    'Shift-Ctrl-Up': () => { tableEditor.alignColumn(__WEBPACK_IMPORTED_MODULE_0__susisu_mte_kernel__[\"a\" /* Alignment */].CENTER, opts) },\n    'Shift-Cmd-Up': () => { tableEditor.alignColumn(__WEBPACK_IMPORTED_MODULE_0__susisu_mte_kernel__[\"a\" /* Alignment */].CENTER, opts) },\n    'Shift-Ctrl-Down': () => { tableEditor.alignColumn(__WEBPACK_IMPORTED_MODULE_0__susisu_mte_kernel__[\"a\" /* Alignment */].NONE, opts) },\n    'Shift-Cmd-Down': () => { tableEditor.alignColumn(__WEBPACK_IMPORTED_MODULE_0__susisu_mte_kernel__[\"a\" /* Alignment */].NONE, opts) },\n    'Ctrl-Left': () => { tableEditor.moveFocus(0, -1, opts) },\n    'Cmd-Left': () => { tableEditor.moveFocus(0, -1, opts) },\n    'Ctrl-Right': () => { tableEditor.moveFocus(0, 1, opts) },\n    'Cmd-Right': () => { tableEditor.moveFocus(0, 1, opts) },\n    'Ctrl-Up': () => { tableEditor.moveFocus(-1, 0, opts) },\n    'Cmd-Up': () => { tableEditor.moveFocus(-1, 0, opts) },\n    'Ctrl-Down': () => { tableEditor.moveFocus(1, 0, opts) },\n    'Cmd-Down': () => { tableEditor.moveFocus(1, 0, opts) },\n    'Ctrl-K Ctrl-I': () => { tableEditor.insertRow(opts) },\n    'Cmd-K Cmd-I': () => { tableEditor.insertRow(opts) },\n    'Ctrl-L Ctrl-I': () => { tableEditor.deleteRow(opts) },\n    'Cmd-L Cmd-I': () => { tableEditor.deleteRow(opts) },\n    'Ctrl-K Ctrl-J': () => { tableEditor.insertColumn(opts) },\n    'Cmd-K Cmd-J': () => { tableEditor.insertColumn(opts) },\n    'Ctrl-L Ctrl-J': () => { tableEditor.deleteColumn(opts) },\n    'Cmd-L Cmd-J': () => { tableEditor.deleteColumn(opts) },\n    'Alt-Shift-Ctrl-Left': () => { tableEditor.moveColumn(-1, opts) },\n    'Alt-Shift-Cmd-Left': () => { tableEditor.moveColumn(-1, opts) },\n    'Alt-Shift-Ctrl-Right': () => { tableEditor.moveColumn(1, opts) },\n    'Alt-Shift-Cmd-Right': () => { tableEditor.moveColumn(1, opts) },\n    'Alt-Shift-Ctrl-Up': () => { tableEditor.moveRow(-1, opts) },\n    'Alt-Shift-Cmd-Up': () => { tableEditor.moveRow(-1, opts) },\n    'Alt-Shift-Ctrl-Down': () => { tableEditor.moveRow(1, opts) },\n    'Alt-Shift-Cmd-Down': () => { tableEditor.moveRow(1, opts) }\n  })\n\n  // enable keymap if the cursor is in a table\n  function updateActiveState() {\n    const active = tableEditor.cursorIsInTable();\n    if (active) {\n      editor.setOption(\"extraKeys\", keyMap);\n    }\n    else {\n      editor.setOption(\"extraKeys\", null);\n      tableEditor.resetSmartCursor();\n    }\n  }\n  // event subscriptions\n  editor.on(\"cursorActivity\", () => {\n    if (!editorIntf.transaction) {\n      updateActiveState();\n    }\n  });\n  editor.on(\"changes\", () => {\n    if (!editorIntf.transaction) {\n      updateActiveState();\n    }\n  });\n  editorIntf.onDidFinishTransaction = () => {\n    updateActiveState();\n  };\n\n  return tableEditor\n}\n\n\n\n/***/ }),\n/* 1 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"c\", function() { return Point; });\n/* unused harmony export Range */\n/* unused harmony export Focus */\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Alignment; });\n/* unused harmony export DefaultAlignment */\n/* unused harmony export HeaderAlignment */\n/* unused harmony export TableCell */\n/* unused harmony export TableRow */\n/* unused harmony export Table */\n/* unused harmony export readTable */\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return FormatType; });\n/* unused harmony export completeTable */\n/* unused harmony export formatTable */\n/* unused harmony export alterAlignment */\n/* unused harmony export insertRow */\n/* unused harmony export deleteRow */\n/* unused harmony export moveRow */\n/* unused harmony export insertColumn */\n/* unused harmony export deleteColumn */\n/* unused harmony export moveColumn */\n/* unused harmony export Insert */\n/* unused harmony export Delete */\n/* unused harmony export applyEditScript */\n/* unused harmony export shortestEditScript */\n/* unused harmony export ITextEditor */\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"e\", function() { return options; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"d\", function() { return TableEditor; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_meaw__ = __webpack_require__(2);\n\n\n/**\n * A `Point` represents a point in the text editor.\n */\nclass Point {\n  /**\n   * Creates a new `Point` object.\n   *\n   * @param {number} row - Row of the point, starts from 0.\n   * @param {number} column - Column of the point, starts from 0.\n   */\n  constructor(row, column) {\n    /** @private */\n    this._row = row;\n    /** @private */\n    this._column = column;\n  }\n\n  /**\n   * Row of the point.\n   *\n   * @type {number}\n   */\n  get row() {\n    return this._row;\n  }\n\n  /**\n   * Column of the point.\n   *\n   * @type {number}\n   */\n  get column() {\n    return this._column;\n  }\n\n  /**\n   * Checks if the point is equal to another point.\n   *\n   * @param {Point} point - A point object.\n   * @returns {boolean} `true` if two points are equal.\n   */\n  equals(point) {\n    return this.row === point.row && this.column === point.column;\n  }\n}\n\n/**\n * A `Range` object represents a range in the text editor.\n */\nclass Range {\n  /**\n   * Creates a new `Range` object.\n   *\n   * @param {Point} start - The start point of the range.\n   * @param {Point} end - The end point of the range.\n   */\n  constructor(start, end) {\n    /** @private */\n    this._start = start;\n    /** @private */\n    this._end = end;\n  }\n\n  /**\n   * The start point of the range.\n   *\n   * @type {Point}\n   */\n  get start() {\n    return this._start;\n  }\n\n  /**\n   * The end point of the range.\n   *\n   * @type {Point}\n   */\n  get end() {\n    return this._end;\n  }\n}\n\n/**\n * A `Focus` object represents which cell is focused in the table.\n *\n * Note that `row` and `column` properties specifiy a cell's position in the table, not the cursor's\n * position in the text editor as {@link Point} class.\n *\n * @private\n */\nclass Focus {\n  /**\n   * Creates a new `Focus` object.\n   *\n   * @param {number} row - Row of the focused cell.\n   * @param {number} column - Column of the focused cell.\n   * @param {number} offset - Raw offset in the cell.\n   */\n  constructor(row, column, offset) {\n    /** @private */\n    this._row = row;\n    /** @private */\n    this._column = column;\n    /** @private */\n    this._offset = offset;\n  }\n\n  /**\n   * Row of the focused cell.\n   *\n   * @type {number}\n   */\n  get row() {\n    return this._row;\n  }\n\n  /**\n   * Column of the focused cell.\n   *\n   * @type {number}\n   */\n  get column() {\n    return this._column;\n  }\n\n  /**\n   * Raw offset in the cell.\n   *\n   * @type {number}\n   */\n  get offset() {\n    return this._offset;\n  }\n\n  /**\n   * Checks if two focuses point the same cell.\n   * Offsets are ignored.\n   *\n   * @param {Focus} focus - A focus object.\n   * @returns {boolean}\n   */\n  posEquals(focus) {\n    return this.row === focus.row && this.column === focus.column;\n  }\n\n  /**\n   * Creates a copy of the focus object by setting its row to the specified value.\n   *\n   * @param {number} row - Row of the focused cell.\n   * @returns {Focus} A new focus object with the specified row.\n   */\n  setRow(row) {\n    return new Focus(row, this.column, this.offset);\n  }\n\n  /**\n   * Creates a copy of the focus object by setting its column to the specified value.\n   *\n   * @param {number} column - Column of the focused cell.\n   * @returns {Focus} A new focus object with the specified column.\n   */\n  setColumn(column) {\n    return new Focus(this.row, column, this.offset);\n  }\n\n  /**\n   * Creates a copy of the focus object by setting its offset to the specified value.\n   *\n   * @param {number} offset - Offset in the focused cell.\n   * @returns {Focus} A new focus object with the specified offset.\n   */\n  setOffset(offset) {\n    return new Focus(this.row, this.column, offset);\n  }\n}\n\n/**\n * Represents column alignment.\n *\n * - `Alignment.NONE` - Use default alignment.\n * - `Alignment.LEFT` - Align left.\n * - `Alignment.RIGHT` - Align right.\n * - `Alignment.CENTER` - Align center.\n *\n * @type {Object}\n */\nconst Alignment = Object.freeze({\n  NONE  : \"none\",\n  LEFT  : \"left\",\n  RIGHT : \"right\",\n  CENTER: \"center\"\n});\n\n/**\n * Represents default column alignment\n *\n * - `DefaultAlignment.LEFT` - Align left.\n * - `DefaultAlignment.RIGHT` - Align right.\n * - `DefaultAlignment.CENTER` - Align center.\n *\n * @type {Object}\n */\nconst DefaultAlignment = Object.freeze({\n  LEFT  : Alignment.LEFT,\n  RIGHT : Alignment.RIGHT,\n  CENTER: Alignment.CENTER\n});\n\n/**\n * Represents alignment of header cells.\n *\n * - `HeaderAlignment.FOLLOW` - Follow column's alignment.\n * - `HeaderAlignment.LEFT` - Align left.\n * - `HeaderAlignment.RIGHT` - Align right.\n * - `HeaderAlignment.CENTER` - Align center.\n *\n * @type {Object}\n */\nconst HeaderAlignment = Object.freeze({\n  FOLLOW: \"follow\",\n  LEFT  : Alignment.LEFT,\n  RIGHT : Alignment.RIGHT,\n  CENTER: Alignment.CENTER\n});\n\n/**\n * A `TableCell` object represents a table cell.\n *\n * @private\n */\nclass TableCell {\n  /**\n   * Creates a new `TableCell` object.\n   *\n   * @param {string} rawContent - Raw content of the cell.\n   */\n  constructor(rawContent) {\n    /** @private */\n    this._rawContent = rawContent;\n    /** @private */\n    this._content = rawContent.trim();\n    /** @private */\n    this._paddingLeft = this._content === \"\"\n      ? (this._rawContent === \"\" ? 0 : 1)\n      : this._rawContent.length - this._rawContent.trimLeft().length;\n    /** @private */\n    this._paddingRight = this._rawContent.length - this._content.length - this._paddingLeft;\n  }\n\n  /**\n   * Raw content of the cell.\n   *\n   * @type {string}\n   */\n  get rawContent() {\n    return this._rawContent;\n  }\n\n  /**\n   * Trimmed content of the cell.\n   *\n   * @type {string}\n   */\n  get content() {\n    return this._content;\n  }\n\n  /**\n   * Width of the left padding of the cell.\n   *\n   * @type {number}\n   */\n  get paddingLeft() {\n    return this._paddingLeft;\n  }\n\n  /**\n   * Width of the right padding of the cell.\n   *\n   * @type {number}\n   */\n  get paddingRight() {\n    return this._paddingRight;\n  }\n\n  /**\n   * Convers the cell to a text representation.\n   *\n   * @returns {string} The raw content of the cell.\n   */\n  toText() {\n    return this.rawContent;\n  }\n\n  /**\n   * Checks if the cell is a delimiter i.e. it only contains hyphens `-` with optional one\n   * leading and trailing colons `:`.\n   *\n   * @returns {boolean} `true` if the cell is a delimiter.\n   */\n  isDelimiter() {\n    return /^\\s*:?-+:?\\s*$/.test(this.rawContent);\n  }\n\n  /**\n   * Returns the alignment the cell represents.\n   *\n   * @returns {Alignment|undefined} The alignment the cell represents;\n   * `undefined` if the cell is not a delimiter.\n   */\n  getAlignment() {\n    if (!this.isDelimiter()) {\n      return undefined;\n    }\n    if (this.content[0] === \":\") {\n      if (this.content[this.content.length - 1] === \":\") {\n        return Alignment.CENTER;\n      }\n      else {\n        return Alignment.LEFT;\n      }\n    }\n    else {\n      if (this.content[this.content.length - 1] === \":\") {\n        return Alignment.RIGHT;\n      }\n      else {\n        return Alignment.NONE;\n      }\n    }\n  }\n\n  /**\n   * Computes a relative position in the trimmed content from that in the raw content.\n   *\n   * @param {number} rawOffset - Relative position in the raw content.\n   * @returns {number} - Relative position in the trimmed content.\n   */\n  computeContentOffset(rawOffset) {\n    if (this.content === \"\") {\n      return 0;\n    }\n    if (rawOffset < this.paddingLeft) {\n      return 0;\n    }\n    if (rawOffset < this.paddingLeft + this.content.length) {\n      return rawOffset - this.paddingLeft;\n    }\n    else {\n      return this.content.length;\n    }\n  }\n\n  /**\n   * Computes a relative position in the raw content from that in the trimmed content.\n   *\n   * @param {number} contentOffset - Relative position in the trimmed content.\n   * @returns {number} - Relative position in the raw content.\n   */\n  computeRawOffset(contentOffset) {\n    return contentOffset + this.paddingLeft;\n  }\n}\n\n/**\n * A `TableRow` object represents a table row.\n *\n * @private\n */\nclass TableRow {\n  /**\n   * Creates a new `TableRow` objec.\n   *\n   * @param {Array<TableCell>} cells - Cells that the row contains.\n   * @param {string} marginLeft - Margin string at the left of the row.\n   * @param {string} marginRight - Margin string at the right of the row.\n   */\n  constructor(cells, marginLeft, marginRight) {\n    /** @private */\n    this._cells = cells.slice();\n    /** @private */\n    this._marginLeft = marginLeft;\n    /** @private */\n    this._marginRight = marginRight;\n  }\n\n  /**\n   * Margin string at the left of the row.\n   *\n   * @type {string}\n   */\n  get marginLeft() {\n    return this._marginLeft;\n  }\n\n  /**\n   * Margin string at the right of the row.\n   *\n   * @type {string}\n   */\n  get marginRight() {\n    return this._marginRight;\n  }\n\n  /**\n   * Gets the number of the cells in the row.\n   *\n   * @returns {number} Number of the cells.\n   */\n  getWidth() {\n    return this._cells.length;\n  }\n\n  /**\n   * Returns the cells that the row contains.\n   *\n   * @returns {Array<TableCell>} An array of cells that the row contains.\n   */\n  getCells() {\n    return this._cells.slice();\n  }\n\n  /**\n   * Gets a cell at the specified index.\n   *\n   * @param {number} index - Index.\n   * @returns {TableCell|undefined} The cell at the specified index if exists;\n   * `undefined` if no cell is found.\n   */\n  getCellAt(index) {\n    return this._cells[index];\n  }\n\n  /**\n   * Convers the row to a text representation.\n   *\n   * @returns {string} A text representation of the row.\n   */\n  toText() {\n    if (this._cells.length === 0) {\n      return this.marginLeft;\n    }\n    else {\n      const cells = this._cells.map(cell => cell.toText()).join(\"|\");\n      return `${this.marginLeft}|${cells}|${this.marginRight}`;\n    }\n  }\n\n  /**\n   * Checks if the row is a delimiter or not.\n   *\n   * @returns {boolean} `true` if the row is a delimiter i.e. all the cells contained are delimiters.\n   */\n  isDelimiter() {\n    return this._cells.every(cell => cell.isDelimiter());\n  }\n}\n\n/**\n * A `Table` object represents a table.\n *\n * @private\n */\nclass Table {\n  /**\n   * Creates a new `Table` object.\n   *\n   * @param {Array<TableRow>} rows - An array of rows that the table contains.\n   */\n  constructor(rows) {\n    /** @private */\n    this._rows = rows.slice();\n  }\n\n  /**\n   * Gets the number of rows in the table.\n   *\n   * @returns {number} The number of rows.\n   */\n  getHeight() {\n    return this._rows.length;\n  }\n\n  /**\n   * Gets the maximum width of the rows in the table.\n   *\n   * @returns {number} The maximum width of the rows.\n   */\n  getWidth() {\n    return this._rows.map(row => row.getWidth())\n      .reduce((x, y) => Math.max(x, y), 0);\n  }\n\n  /**\n   * Gets the width of the header row.\n   *\n   * @returns {number|undefined} The width of the header row;\n   * `undefined` if there is no header row.\n   */\n  getHeaderWidth() {\n    if (this._rows.length === 0) {\n      return undefined;\n    }\n    return this._rows[0].getWidth();\n  }\n\n  /**\n   * Gets the rows that the table contains.\n   *\n   * @returns {Array<TableRow>} An array of the rows.\n   */\n  getRows() {\n    return this._rows.slice();\n  }\n\n  /**\n   * Gets a row at the specified index.\n   *\n   * @param {number} index - Row index.\n   * @returns {TableRow|undefined} The row at the specified index;\n   * `undefined` if not found.\n   */\n  getRowAt(index) {\n    return this._rows[index];\n  }\n\n  /**\n   * Gets the delimiter row of the table.\n   *\n   * @returns {TableRow|undefined} The delimiter row;\n   * `undefined` if there is not delimiter row.\n   */\n  getDelimiterRow() {\n    const row = this._rows[1];\n    if (row === undefined) {\n      return undefined;\n    }\n    if (row.isDelimiter()) {\n      return row;\n    }\n    else {\n      return undefined;\n    }\n  }\n\n  /**\n   * Gets a cell at the specified index.\n   *\n   * @param {number} rowIndex - Row index of the cell.\n   * @param {number} columnIndex - Column index of the cell.\n   * @returns {TableCell|undefined} The cell at the specified index;\n   * `undefined` if not found.\n   */\n  getCellAt(rowIndex, columnIndex) {\n    const row = this._rows[rowIndex];\n    if (row === undefined) {\n      return undefined;\n    }\n    return row.getCellAt(columnIndex);\n  }\n\n  /**\n   * Gets the cell at the focus.\n   *\n   * @param {Focus} focus - Focus object.\n   * @returns {TableCell|undefined} The cell at the focus;\n   * `undefined` if not found.\n   */\n  getFocusedCell(focus) {\n    return this.getCellAt(focus.row, focus.column);\n  }\n\n  /**\n   * Converts the table to an array of text representations of the rows.\n   *\n   * @returns {Array<string>} An array of text representations of the rows.\n   */\n  toLines() {\n    return this._rows.map(row => row.toText());\n  }\n\n  /**\n   * Computes a focus from a point in the text editor.\n   *\n   * @param {Point} pos - A point in the text editor.\n   * @param {number} rowOffset - The row index where the table starts in the text editor.\n   * @returns {Focus|undefined} A focus object that corresponds to the specified point;\n   * `undefined` if the row index is out of bounds.\n   */\n  focusOfPosition(pos, rowOffset) {\n    const rowIndex = pos.row - rowOffset;\n    const row = this._rows[rowIndex];\n    if (row === undefined) {\n      return undefined;\n    }\n    if (pos.column < row.marginLeft.length + 1) {\n      return new Focus(rowIndex, -1, pos.column);\n    }\n    else {\n      const cellWidths = row.getCells().map(cell => cell.rawContent.length);\n      let columnPos = row.marginLeft.length + 1; // left margin + a pipe\n      let columnIndex = 0;\n      for (; columnIndex < cellWidths.length; columnIndex++) {\n        if (columnPos + cellWidths[columnIndex] + 1 > pos.column) {\n          break;\n        }\n        columnPos += cellWidths[columnIndex] + 1;\n      }\n      const offset = pos.column - columnPos;\n      return new Focus(rowIndex, columnIndex, offset);\n    }\n  }\n\n  /**\n   * Computes a position in the text editor from a focus.\n   *\n   * @param {Focus} focus - A focus object.\n   * @param {number} rowOffset - The row index where the table starts in the text editor.\n   * @returns {Point|undefined} A position in the text editor that corresponds to the focus;\n   * `undefined` if the focused row  is out of the table.\n   */\n  positionOfFocus(focus, rowOffset) {\n    const row = this._rows[focus.row];\n    if (row === undefined) {\n      return undefined;\n    }\n    const rowPos = focus.row + rowOffset;\n    if (focus.column < 0) {\n      return new Point(rowPos, focus.offset);\n    }\n    const cellWidths = row.getCells().map(cell => cell.rawContent.length);\n    const maxIndex = Math.min(focus.column, cellWidths.length);\n    let columnPos = row.marginLeft.length + 1;\n    for (let columnIndex = 0; columnIndex < maxIndex; columnIndex++) {\n      columnPos += cellWidths[columnIndex] + 1;\n    }\n    return new Point(rowPos, columnPos + focus.offset);\n  }\n\n  /**\n   * Computes a selection range from a focus.\n   *\n   * @param {Focus} focus - A focus object.\n   * @param {number} rowOffset - The row index where the table starts in the text editor.\n   * @returns {Range|undefined} A range to be selected that corresponds to the focus;\n   * `undefined` if the focus does not specify any cell or the specified cell is empty.\n   */\n  selectionRangeOfFocus(focus, rowOffset) {\n    const row = this._rows[focus.row];\n    if (row === undefined) {\n      return undefined;\n    }\n    const cell = row.getCellAt(focus.column);\n    if (cell === undefined) {\n      return undefined;\n    }\n    if (cell.content === \"\") {\n      return undefined;\n    }\n    const rowPos = focus.row + rowOffset;\n    const cellWidths = row.getCells().map(cell => cell.rawContent.length);\n    let columnPos = row.marginLeft.length + 1;\n    for (let columnIndex = 0; columnIndex < focus.column; columnIndex++) {\n      columnPos += cellWidths[columnIndex] + 1;\n    }\n    columnPos += cell.paddingLeft;\n    return new Range(\n      new Point(rowPos, columnPos),\n      new Point(rowPos, columnPos + cell.content.length)\n    );\n  }\n}\n\n/**\n * Splits a text into cells.\n *\n * @private\n * @param {string} text\n * @returns {Array<string>}\n */\nfunction _splitCells(text) {\n  const cells = [];\n  let buf = \"\";\n  let rest = text;\n  while (rest !== \"\") {\n    switch (rest[0]) {\n    case \"`\":\n      // read code span\n      {\n        const start = rest.match(/^`*/)[0];\n        let buf1 = start;\n        let rest1 = rest.substr(start.length);\n        let closed = false;\n        while (rest1 !== \"\") {\n          if (rest1[0] === \"`\") {\n            const end = rest1.match(/^`*/)[0];\n            buf1 += end;\n            rest1 = rest1.substr(end.length);\n            if (end.length === start.length) {\n              closed = true;\n              break;\n            }\n          }\n          else {\n            buf1 += rest1[0];\n            rest1 = rest1.substr(1);\n          }\n        }\n        if (closed) {\n          buf += buf1;\n          rest = rest1;\n        }\n        else {\n          buf += \"`\";\n          rest = rest.substr(1);\n        }\n      }\n      break;\n    case \"\\\\\":\n      // escape next character\n      if (rest.length >= 2) {\n        buf += rest.substr(0, 2);\n        rest = rest.substr(2);\n      }\n      else {\n        buf += \"\\\\\";\n        rest = rest.substr(1);\n      }\n      break;\n    case \"|\":\n      // flush buffer\n      cells.push(buf);\n      buf = \"\";\n      rest = rest.substr(1);\n      break;\n    default:\n      buf += rest[0];\n      rest = rest.substr(1);\n    }\n  }\n  cells.push(buf);\n  return cells;\n}\n\n/**\n * Reads a table row.\n *\n * @private\n * @param {string} text - A text\n * @returns {TableRow}\n */\nfunction _readRow(text) {\n  let cells = _splitCells(text);\n  let marginLeft;\n  if (cells.length > 0 && /^\\s*$/.test(cells[0])) {\n    marginLeft = cells[0];\n    cells = cells.slice(1);\n  }\n  else {\n    marginLeft = \"\";\n  }\n  let marginRight;\n  if (cells.length > 1 && /^\\s*$/.test(cells[cells.length - 1])) {\n    marginRight = cells[cells.length - 1];\n    cells = cells.slice(0, cells.length - 1);\n  }\n  else {\n    marginRight = \"\";\n  }\n  return new TableRow(cells.map(cell => new TableCell(cell)), marginLeft, marginRight);\n}\n\n/**\n * Reads a table from lines.\n *\n * @private\n * @param {Array<string>} lines - An array of texts, each text represents a row.\n * @returns {Table} The table red from the lines.\n */\nfunction readTable(lines) {\n  return new Table(lines.map(_readRow));\n}\n\n/**\n * Creates a delimiter text.\n *\n * @private\n * @param {Alignment} alignment\n * @param {number} width - Width of the horizontal bar of delimiter.\n * @returns {string}\n * @throws {Error} Unknown alignment.\n */\nfunction _delimiterText(alignment, width) {\n  const bar = \"-\".repeat(width);\n  switch (alignment) {\n  case Alignment.NONE:\n    return ` ${bar} `;\n  case Alignment.LEFT:\n    return `:${bar} `;\n  case Alignment.RIGHT:\n    return ` ${bar}:`;\n  case Alignment.CENTER:\n    return `:${bar}:`;\n  default:\n    throw new Error(\"Unknown alignment: \" + alignment);\n  }\n}\n\n/**\n * Extends array size.\n *\n * @private\n * @param {Array} arr\n * @param {number} size\n * @param {Function} callback - Callback function to fill newly created cells.\n * @returns {Array} Extended array.\n */\nfunction _extendArray(arr, size, callback) {\n  const extended = arr.slice();\n  for (let i = arr.length; i < size; i++) {\n    extended.push(callback(i, arr));\n  }\n  return extended;\n}\n\n/**\n * Completes a table by adding missing delimiter and cells.\n * After completion, all rows in the table have the same width.\n *\n * @private\n * @param {Table} table - A table object.\n * @param {Object} options - An object containing options for completion.\n *\n * | property name       | type           | description                                               |\n * | ------------------- | -------------- | --------------------------------------------------------- |\n * | `minDelimiterWidth` | {@link number} | Width of delimiters used when completing delimiter cells. |\n *\n * @returns {Object} An object that represents the result of the completion.\n *\n * | property name       | type            | description                            |\n * | ------------------- | --------------- | -------------------------------------- |\n * | `table`             | {@link Table}   | A completed table object.              |\n * | `delimiterInserted` | {@link boolean} | `true` if a delimiter row is inserted. |\n *\n * @throws {Error} Empty table.\n */\nfunction completeTable(table, options) {\n  const tableHeight = table.getHeight();\n  const tableWidth = table.getWidth();\n  if (tableHeight === 0) {\n    throw new Error(\"Empty table\");\n  }\n  const rows = table.getRows();\n  const newRows = [];\n  // header\n  const headerRow = rows[0];\n  const headerCells = headerRow.getCells();\n  newRows.push(new TableRow(\n    _extendArray(headerCells, tableWidth, j => new TableCell(\n      j === headerCells.length ? headerRow.marginRight : \"\"\n    )),\n    headerRow.marginLeft,\n    headerCells.length < tableWidth ? \"\" : headerRow.marginRight\n  ));\n  // delimiter\n  const delimiterRow = table.getDelimiterRow();\n  if (delimiterRow !== undefined) {\n    const delimiterCells = delimiterRow.getCells();\n    newRows.push(new TableRow(\n      _extendArray(delimiterCells, tableWidth, j => new TableCell(\n        _delimiterText(\n          Alignment.NONE,\n          j === delimiterCells.length\n            ? Math.max(options.minDelimiterWidth, delimiterRow.marginRight.length - 2)\n            : options.minDelimiterWidth\n        )\n      )),\n      delimiterRow.marginLeft,\n      delimiterCells.length < tableWidth ? \"\" : delimiterRow.marginRight\n    ));\n  }\n  else {\n    newRows.push(new TableRow(\n      _extendArray([], tableWidth, () => new TableCell(\n        _delimiterText(Alignment.NONE, options.minDelimiterWidth)\n      )),\n      \"\",\n      \"\"\n    ));\n  }\n  // body\n  for (let i = delimiterRow !== undefined ? 2 : 1; i < tableHeight; i++) {\n    const row = rows[i];\n    const cells = row.getCells();\n    newRows.push(new TableRow(\n      _extendArray(cells, tableWidth, j => new TableCell(\n        j === cells.length ? row.marginRight : \"\"\n      )),\n      row.marginLeft,\n      cells.length < tableWidth ? \"\" : row.marginRight\n    ));\n  }\n  return {\n    table            : new Table(newRows),\n    delimiterInserted: delimiterRow === undefined\n  };\n}\n\n/**\n * Calculates the width of a text based on characters' EAW properties.\n *\n * @private\n * @param {string} text\n * @param {Object} options -\n *\n * | property name     | type                               |\n * | ----------------- | ---------------------------------- |\n * | `normalize`       | {@link boolean}                    |\n * | `wideChars`       | {@link Set}&lt;{@link string} &gt; |\n * | `narrowChars`     | {@link Set}&lt;{@link string} &gt; |\n * | `ambiguousAsWide` | {@link boolean}                    |\n *\n * @returns {number} Calculated width of the text.\n */\nfunction _computeTextWidth(text, options) {\n  const normalized = options.normalize ? text.normalize(\"NFC\") : text;\n  let w = 0;\n  for (const char of normalized) {\n    if (options.wideChars.has(char)) {\n      w += 2;\n      continue;\n    }\n    if (options.narrowChars.has(char)) {\n      w += 1;\n      continue;\n    }\n    switch (Object(__WEBPACK_IMPORTED_MODULE_0_meaw__[\"a\" /* getEAW */])(char)) {\n    case \"F\":\n    case \"W\":\n      w += 2;\n      break;\n    case \"A\":\n      w += options.ambiguousAsWide ? 2 : 1;\n      break;\n    default:\n      w += 1;\n    }\n  }\n  return w;\n}\n\n/**\n * Returns a aligned cell content.\n *\n * @private\n * @param {string} text\n * @param {number} width\n * @param {Alignment} alignment\n * @param {Object} options - Options for computing text width.\n * @returns {string}\n * @throws {Error} Unknown alignment.\n * @throws {Error} Unexpected default alignment.\n */\nfunction _alignText(text, width, alignment, options) {\n  const space = width - _computeTextWidth(text, options);\n  if (space < 0) {\n    return text;\n  }\n  switch (alignment) {\n  case Alignment.NONE:\n    throw new Error(\"Unexpected default alignment\");\n  case Alignment.LEFT:\n    return text + \" \".repeat(space);\n  case Alignment.RIGHT:\n    return \" \".repeat(space) + text;\n  case Alignment.CENTER:\n    return \" \".repeat(Math.floor(space / 2))\n      + text\n      + \" \".repeat(Math.ceil(space / 2));\n  default:\n    throw new Error(\"Unknown alignment: \" + alignment);\n  }\n}\n\n/**\n * Just adds one space paddings to both sides of a text.\n *\n * @private\n * @param {string} text\n * @returns {string}\n */\nfunction _padText(text) {\n  return ` ${text} `;\n}\n\n/**\n * Formats a table.\n *\n * @private\n * @param {Table} table - A table object.\n * @param {Object} options - An object containing options for formatting.\n *\n * | property name       | type                     | description                                             |\n * | ------------------- | ------------------------ | ------------------------------------------------------- |\n * | `minDelimiterWidth` | {@link number}           | Minimum width of delimiters.                            |\n * | `defaultAlignment`  | {@link DefaultAlignment} | Default alignment of columns.                           |\n * | `headerAlignment`   | {@link HeaderAlignment}  | Alignment of header cells.                              |\n * | `textWidthOptions`  | {@link Object}           | An object containing options for computing text widths. |\n *\n * `options.textWidthOptions` must contain the following options.\n *\n * | property name     | type                              | description                                         |\n * | ----------------- | --------------------------------- | --------------------------------------------------- |\n * | `normalize`       | {@link boolean}                   | Normalize texts before computing text widths.       |\n * | `wideChars`       | {@link Set}&lt;{@link string}&gt; | Set of characters that should be treated as wide.   |\n * | `narrowChars`     | {@link Set}&lt;{@link string}&gt; | Set of characters that should be treated as narrow. |\n * | `ambiguousAsWide` | {@link boolean}                   | Treat East Asian Ambiguous characters as wide.      |\n *\n * @returns {Object} An object that represents the result of formatting.\n *\n * | property name   | type           | description                                    |\n * | --------------- | -------------- | ---------------------------------------------- |\n * | `table`         | {@link Table}  | A formatted table object.                      |\n * | `marginLeft`    | {@link string} | The common left margin of the formatted table. |\n */\nfunction _formatTable(table, options) {\n  const tableHeight = table.getHeight();\n  const tableWidth = table.getWidth();\n  if (tableHeight === 0) {\n    return {\n      table,\n      marginLeft: \"\"\n    };\n  }\n  const marginLeft = table.getRowAt(0).marginLeft;\n  if (tableWidth === 0) {\n    const rows = new Array(tableHeight).fill()\n      .map(() => new TableRow([], marginLeft, \"\"));\n    return {\n      table: new Table(rows),\n      marginLeft\n    };\n  }\n  // compute column widths\n  const delimiterRow = table.getDelimiterRow();\n  const columnWidths = new Array(tableWidth).fill(0);\n  if (delimiterRow !== undefined) {\n    const delimiterRowWidth = delimiterRow.getWidth();\n    for (let j = 0; j < delimiterRowWidth; j++) {\n      columnWidths[j] = options.minDelimiterWidth;\n    }\n  }\n  for (let i = 0; i < tableHeight; i++) {\n    if (delimiterRow !== undefined && i === 1) {\n      continue;\n    }\n    const row = table.getRowAt(i);\n    const rowWidth = row.getWidth();\n    for (let j = 0; j < rowWidth; j++) {\n      columnWidths[j] = Math.max(\n        columnWidths[j],\n        _computeTextWidth(row.getCellAt(j).content, options.textWidthOptions)\n      );\n    }\n  }\n  // get column alignments\n  const alignments = delimiterRow !== undefined\n    ? _extendArray(\n      delimiterRow.getCells().map(cell => cell.getAlignment()),\n      tableWidth,\n      () => options.defaultAlignment\n    )\n    : new Array(tableWidth).fill(options.defaultAlignment);\n  // format\n  const rows = [];\n  // header\n  const headerRow = table.getRowAt(0);\n  rows.push(new TableRow(\n    headerRow.getCells().map((cell, j) =>\n      new TableCell(_padText(_alignText(\n        cell.content,\n        columnWidths[j],\n        options.headerAlignment === HeaderAlignment.FOLLOW\n          ? (alignments[j] === Alignment.NONE ? options.defaultAlignment : alignments[j])\n          : options.headerAlignment,\n        options.textWidthOptions\n      )))\n    ),\n    marginLeft,\n    \"\"\n  ));\n  // delimiter\n  if (delimiterRow !== undefined) {\n    rows.push(new TableRow(\n      delimiterRow.getCells().map((cell, j) =>\n        new TableCell(_delimiterText(alignments[j], columnWidths[j]))\n      ),\n      marginLeft,\n      \"\"\n    ));\n  }\n  // body\n  for (let i = delimiterRow !== undefined ? 2 : 1; i < tableHeight; i++) {\n    const row = table.getRowAt(i);\n    rows.push(new TableRow(\n      row.getCells().map((cell, j) =>\n        new TableCell(_padText(_alignText(\n          cell.content,\n          columnWidths[j],\n          alignments[j] === Alignment.NONE ? options.defaultAlignment : alignments[j],\n          options.textWidthOptions\n        )))\n      ),\n      marginLeft,\n      \"\"\n    ));\n  }\n  return {\n    table: new Table(rows),\n    marginLeft\n  };\n}\n\n/**\n * Formats a table weakly.\n * Rows are formatted independently to each other, cell contents are just trimmed and not aligned.\n * This is useful when using a non-monospaced font or dealing with wide tables.\n *\n * @private\n * @param {Table} table - A table object.\n * @param {Object} options - An object containing options for formatting.\n * The function accepts the same option object for {@link formatTable}, but properties not listed\n * here are just ignored.\n *\n * | property name       | type           | description          |\n * | ------------------- | -------------- | -------------------- |\n * | `minDelimiterWidth` | {@link number} | Width of delimiters. |\n *\n * @returns {Object} An object that represents the result of formatting.\n *\n * | property name   | type           | description                                    |\n * | --------------- | -------------- | ---------------------------------------------- |\n * | `table`         | {@link Table}  | A formatted table object.                      |\n * | `marginLeft`    | {@link string} | The common left margin of the formatted table. |\n */\nfunction _weakFormatTable(table, options) {\n  const tableHeight = table.getHeight();\n  const tableWidth = table.getWidth();\n  if (tableHeight === 0) {\n    return {\n      table,\n      marginLeft: \"\"\n    };\n  }\n  const marginLeft = table.getRowAt(0).marginLeft;\n  if (tableWidth === 0) {\n    const rows = new Array(tableHeight).fill()\n      .map(() => new TableRow([], marginLeft, \"\"));\n    return {\n      table: new Table(rows),\n      marginLeft\n    };\n  }\n  const delimiterRow = table.getDelimiterRow();\n  // format\n  const rows = [];\n  // header\n  const headerRow = table.getRowAt(0);\n  rows.push(new TableRow(\n    headerRow.getCells().map(cell =>\n      new TableCell(_padText(cell.content))\n    ),\n    marginLeft,\n    \"\"\n  ));\n  // delimiter\n  if (delimiterRow !== undefined) {\n    rows.push(new TableRow(\n      delimiterRow.getCells().map(cell =>\n        new TableCell(_delimiterText(cell.getAlignment(), options.minDelimiterWidth))\n      ),\n      marginLeft,\n      \"\"\n    ));\n  }\n  // body\n  for (let i = delimiterRow !== undefined ? 2 : 1; i < tableHeight; i++) {\n    const row = table.getRowAt(i);\n    rows.push(new TableRow(\n      row.getCells().map(cell =>\n        new TableCell(_padText(cell.content))\n      ),\n      marginLeft,\n      \"\"\n    ));\n  }\n  return {\n    table: new Table(rows),\n    marginLeft\n  };\n}\n\n/**\n * Represents table format type.\n *\n * - `FormatType.NORMAL` - Formats table normally.\n * - `FormatType.WEAK` - Formats table weakly, rows are formatted independently to each other, cell\n *   contents are just trimmed and not aligned.\n *\n * @type {Object}\n */\nconst FormatType = Object.freeze({\n  NORMAL: \"normal\",\n  WEAK  : \"weak\"\n});\n\n\n/**\n * Formats a table.\n *\n * @private\n * @param {Table} table - A table object.\n * @param {Object} options - An object containing options for formatting.\n *\n * | property name       | type                     | description                                             |\n * | ------------------- | ------------------------ | ------------------------------------------------------- |\n * | `formatType`        | {@link FormatType}       | Format type, normal or weak.                            |\n * | `minDelimiterWidth` | {@link number}           | Minimum width of delimiters.                            |\n * | `defaultAlignment`  | {@link DefaultAlignment} | Default alignment of columns.                           |\n * | `headerAlignment`   | {@link HeaderAlignment}  | Alignment of header cells.                              |\n * | `textWidthOptions`  | {@link Object}           | An object containing options for computing text widths. |\n *\n * `options.textWidthOptions` must contain the following options.\n *\n * | property name     | type                              | description                                         |\n * | ----------------- | --------------------------------- | --------------------------------------------------- |\n * | `normalize`       | {@link boolean}                   | Normalize texts before computing text widths.       |\n * | `wideChars`       | {@link Set}&lt;{@link string}&gt; | Set of characters that should be treated as wide.   |\n * | `narrowChars`     | {@link Set}&lt;{@link string}&gt; | Set of characters that should be treated as narrow. |\n * | `ambiguousAsWide` | {@link boolean}                   | Treat East Asian Ambiguous characters as wide.      |\n *\n * @returns {Object} An object that represents the result of formatting.\n *\n * | property name   | type           | description                                    |\n * | --------------- | -------------- | ---------------------------------------------- |\n * | `table`         | {@link Table}  | A formatted table object.                      |\n * | `marginLeft`    | {@link string} | The common left margin of the formatted table. |\n *\n * @throws {Error} Unknown format type.\n */\nfunction formatTable(table, options) {\n  switch (options.formatType) {\n  case FormatType.NORMAL:\n    return _formatTable(table, options);\n  case FormatType.WEAK:\n    return _weakFormatTable(table, options);\n  default:\n    throw new Error(\"Unknown format type: \" + options.formatType);\n  }\n}\n\n/**\n * Alters a column's alignment of a table.\n *\n * @private\n * @param {Table} table - A completed non-empty table.\n * @param {number} columnIndex - An index of the column.\n * @param {Alignment} alignment - A new alignment of the column.\n * @param {Object} options - An object containing options for completion.\n *\n * | property name       | type           | description          |\n * | ------------------- | -------------- | -------------------- |\n * | `minDelimiterWidth` | {@link number} | Width of delimiters. |\n *\n * @returns {Table} An altered table object.\n * If the column index is out of range, returns the original table.\n */\nfunction alterAlignment(table, columnIndex, alignment, options) {\n  const delimiterRow = table.getRowAt(1);\n  if (columnIndex < 0 || delimiterRow.getWidth() - 1 < columnIndex) {\n    return table;\n  }\n  const delimiterCells = delimiterRow.getCells();\n  delimiterCells[columnIndex] = new TableCell(_delimiterText(alignment, options.minDelimiterWidth));\n  const rows = table.getRows();\n  rows[1] = new TableRow(delimiterCells, delimiterRow.marginLeft, delimiterRow.marginRight);\n  return new Table(rows);\n}\n\n/**\n * Inserts a row to a table.\n * The row is always inserted after the header and the delimiter rows, even if the index specifies\n * the header or the delimiter.\n *\n * @private\n * @param {Table} table - A completed non-empty table.\n * @param {number} rowIndex - An row index at which a new row will be inserted.\n * @param {TableRow} row - A table row to be inserted.\n * @returns {Table} An altered table obejct.\n */\nfunction insertRow(table, rowIndex, row) {\n  const rows = table.getRows();\n  rows.splice(Math.max(rowIndex, 2), 0, row);\n  return new Table(rows);\n}\n\n/**\n * Deletes a row in a table.\n * If the index specifies the header row, the cells are emptied but the row will not be removed.\n * If the index specifies the delimiter row, it does nothing.\n *\n * @private\n * @param {Table} table - A completed non-empty table.\n * @param {number} rowIndex - An index of the row to be deleted.\n * @returns {Table} An altered table obejct.\n */\nfunction deleteRow(table, rowIndex) {\n  if (rowIndex === 1) {\n    return table;\n  }\n  const rows = table.getRows();\n  if (rowIndex === 0) {\n    const headerRow = rows[0];\n    rows[0] = new TableRow(\n      new Array(headerRow.getWidth()).fill(new TableCell(\"\")),\n      headerRow.marginLeft,\n      headerRow.marginRight\n    );\n  }\n  else {\n    rows.splice(rowIndex, 1);\n  }\n  return new Table(rows);\n}\n\n/**\n * Moves a row at the index to the specified destination.\n *\n * @private\n * @param {Table} table - A completed non-empty table.\n * @param {number} rowIndex - Index of the row to be moved.\n * @param {number} destIndex - Index of the destination.\n * @returns {Table} An altered table object.\n */\nfunction moveRow(table, rowIndex, destIndex) {\n  if (rowIndex <= 1 || destIndex <= 1 || rowIndex === destIndex) {\n    return table;\n  }\n  const rows = table.getRows();\n  const row = rows[rowIndex];\n  rows.splice(rowIndex, 1);\n  rows.splice(destIndex, 0, row);\n  return new Table(rows);\n}\n\n/**\n * Inserts a column to a table.\n *\n * @private\n * @param {Table} table - A completed non-empty table.\n * @param {number} columnIndex - An column index at which the new column will be inserted.\n * @param {Array<TableCell>} column - An array of cells.\n * @param {Object} options - An object containing options for completion.\n *\n * | property name       | type           | description             |\n * | ------------------- | -------------- | ----------------------- |\n * | `minDelimiterWidth` | {@link number} | Width of the delimiter. |\n *\n * @returns {Table} An altered table obejct.\n */\nfunction insertColumn(table, columnIndex, column, options) {\n  const rows = table.getRows();\n  for (let i = 0; i < rows.length; i++) {\n    const row = rows[i];\n    const cells = rows[i].getCells();\n    const cell = i === 1\n      ? new TableCell(_delimiterText(Alignment.NONE, options.minDelimiterWidth))\n      : column[i > 1 ? i - 1 : i];\n    cells.splice(columnIndex, 0, cell);\n    rows[i] = new TableRow(cells, row.marginLeft, row.marginRight);\n  }\n  return new Table(rows);\n}\n\n/**\n * Deletes a column in a table.\n * If there will be no columns after the deletion, the cells are emptied but the column will not be\n * removed.\n *\n * @private\n * @param {Table} table - A completed non-empty table.\n * @param {number} columnIndex - An index of the column to be deleted.\n * @param {Object} options - An object containing options for completion.\n *\n * | property name       | type           | description             |\n * | ------------------- | -------------- | ----------------------- |\n * | `minDelimiterWidth` | {@link number} | Width of the delimiter. |\n *\n * @returns {Table} An altered table object.\n */\nfunction deleteColumn(table, columnIndex, options) {\n  const rows = table.getRows();\n  for (let i = 0; i < rows.length; i++) {\n    const row = rows[i];\n    let cells = row.getCells();\n    if (cells.length <= 1) {\n      cells = [new TableCell(i === 1\n        ? _delimiterText(Alignment.NONE, options.minDelimiterWidth)\n        : \"\"\n      )];\n    }\n    else {\n      cells.splice(columnIndex, 1);\n    }\n    rows[i] = new TableRow(cells, row.marginLeft, row.marginRight);\n  }\n  return new Table(rows);\n}\n\n/**\n * Moves a column at the index to the specified destination.\n *\n * @private\n * @param {Table} table - A completed non-empty table.\n * @param {number} columnIndex - Index of the column to be moved.\n * @param {number} destIndex - Index of the destination.\n * @returns {Table} An altered table object.\n */\nfunction moveColumn(table, columnIndex, destIndex) {\n  if (columnIndex === destIndex) {\n    return table;\n  }\n  const rows = table.getRows();\n  for (let i = 0; i < rows.length; i++) {\n    const row = rows[i];\n    const cells = row.getCells();\n    const cell = cells[columnIndex];\n    cells.splice(columnIndex, 1);\n    cells.splice(destIndex, 0, cell);\n    rows[i] = new TableRow(cells, row.marginLeft, row.marginRight);\n  }\n  return new Table(rows);\n}\n\n/**\n * The `Insert` class represents an insertion of a line.\n *\n * @private\n */\nclass Insert {\n  /**\n   * Creats a new `Insert` object.\n   *\n   * @param {number} row - Row index, starts from `0`.\n   * @param {string} line - A string to be inserted at the row.\n   */\n  constructor(row, line) {\n    /** @private */\n    this._row = row;\n    /** @private */\n    this._line = line;\n  }\n\n  /**\n   * Row index, starts from `0`.\n   *\n   * @type {number}\n   */\n  get row() {\n    return this._row;\n  }\n\n  /**\n   * A string to be inserted.\n   *\n   * @type {string}\n   */\n  get line() {\n    return this._line;\n  }\n}\n\n/**\n * The `Delete` class represents a deletion of a line.\n *\n * @private\n */\nclass Delete {\n  /**\n   * Creates a new `Delete` object.\n   *\n   * @param {number} row - Row index, starts from `0`.\n   */\n  constructor(row) {\n    /** @private */\n    this._row = row;\n  }\n\n  /**\n   * Row index, starts from `0`.\n   *\n   * @type {number}\n   */\n  get row() {\n    return this._row;\n  }\n}\n\n/**\n * Applies a command to the text editor.\n *\n * @private\n * @param {ITextEditor} textEditor - An interface to the text editor.\n * @param {Insert|Delete} command - A command.\n * @param {number} rowOffset - Offset to the row index of the command.\n * @returns {undefined}\n */\nfunction _applyCommand(textEditor, command, rowOffset) {\n  if (command instanceof Insert) {\n    textEditor.insertLine(rowOffset + command.row, command.line);\n  }\n  else if (command instanceof Delete) {\n    textEditor.deleteLine(rowOffset + command.row);\n  }\n  else {\n    throw new Error(\"Unknown command\");\n  }\n}\n\n/**\n * Apply an edit script (array of commands) to the text editor.\n *\n * @private\n * @param {ITextEditor} textEditor - An interface to the text editor.\n * @param {Array<Insert|Delete>} script - An array of commands.\n * The commands are applied sequentially in the order of the array.\n * @param {number} rowOffset - Offset to the row index of the commands.\n * @returns {undefined}\n */\nfunction applyEditScript(textEditor, script, rowOffset) {\n  for (const command of script) {\n    _applyCommand(textEditor, command, rowOffset);\n  }\n}\n\n\n/**\n * Linked list used to remember edit script.\n *\n * @private\n */\nclass IList {\n  get car() {\n    throw new Error(\"Not implemented\");\n  }\n\n  get cdr() {\n    throw new Error(\"Not implemented\");\n  }\n\n  isEmpty() {\n    throw new Error(\"Not implemented\");\n  }\n\n  unshift(value) {\n    return new Cons(value, this);\n  }\n\n  toArray() {\n    const arr = [];\n    let rest = this;\n    while (!rest.isEmpty()) {\n      arr.push(rest.car);\n      rest = rest.cdr;\n    }\n    return arr;\n  }\n}\n\n/**\n * @private\n */\nclass Nil extends IList {\n  constructor() {\n    super();\n  }\n\n  get car() {\n    throw new Error(\"Empty list\");\n  }\n\n  get cdr() {\n    throw new Error(\"Empty list\");\n  }\n\n  isEmpty() {\n    return true;\n  }\n}\n\n/**\n * @private\n */\nclass Cons extends IList {\n  constructor(car, cdr) {\n    super();\n    this._car = car;\n    this._cdr = cdr;\n  }\n\n  get car() {\n    return this._car;\n  }\n\n  get cdr() {\n    return this._cdr;\n  }\n\n  isEmpty() {\n    return false;\n  }\n}\n\nconst nil = new Nil();\n\n\n/**\n * Computes the shortest edit script between two arrays of strings.\n *\n * @private\n * @param {Array<string>} from - An array of string the edit starts from.\n * @param {Array<string>} to - An array of string the edit goes to.\n * @param {number} [limit=-1] - Upper limit of edit distance to be searched.\n * If negative, there is no limit.\n * @returns {Array<Insert|Delete>|undefined} The shortest edit script that turns `from` into `to`;\n * `undefined` if no edit script is found in the given range.\n */\nfunction shortestEditScript(from, to, limit = -1) {\n  const fromLen = from.length;\n  const toLen = to.length;\n  const maxd = limit >= 0 ? Math.min(limit, fromLen + toLen) : fromLen + toLen;\n  const mem = new Array(Math.min(maxd, fromLen) + Math.min(maxd, toLen) + 1);\n  const offset = Math.min(maxd, fromLen);\n  for (let d = 0; d <= maxd; d++) {\n    const mink = d <= fromLen ? -d :  d - 2 * fromLen;\n    const maxk = d <= toLen   ?  d : -d + 2 * toLen;\n    for (let k = mink; k <= maxk; k += 2) {\n      let i;\n      let script;\n      if (d === 0) {\n        i = 0;\n        script = nil;\n      }\n      else if (k === -d) {\n        i = mem[offset + k + 1].i + 1;\n        script = mem[offset + k + 1].script.unshift(new Delete(i + k));\n      }\n      else if (k === d) {\n        i = mem[offset + k - 1].i;\n        script = mem[offset + k - 1].script.unshift(new Insert(i + k - 1, to[i + k - 1]));\n      }\n      else {\n        const vi = mem[offset + k + 1].i + 1;\n        const hi = mem[offset + k - 1].i;\n        if (vi > hi) {\n          i = vi;\n          script = mem[offset + k + 1].script.unshift(new Delete(i + k));\n        }\n        else {\n          i = hi;\n          script = mem[offset + k - 1].script.unshift(new Insert(i + k - 1, to[i + k - 1]));\n        }\n      }\n      while (i < fromLen && i + k < toLen && from[i] === to[i + k]) {\n        i += 1;\n      }\n      if (k === toLen - fromLen && i === fromLen) {\n        return script.toArray().reverse();\n      }\n      mem[offset + k] = { i, script };\n    }\n  }\n  return undefined;\n}\n\n/**\n * The `ITextEditor` represents an interface to a text editor.\n *\n * @interface\n */\nclass ITextEditor {\n  /**\n   * Gets the current cursor position.\n   *\n   * @returns {Point} A point object that represents the cursor position.\n   */\n  getCursorPosition() {\n    throw new Error(\"Not implemented: getCursorPosition\");\n  }\n\n  /**\n   * Sets the cursor position to a specified one.\n   *\n   * @param {Point} pos - A point object which the cursor position is set to.\n   * @returns {undefined}\n   */\n  setCursorPosition(pos) {\n    throw new Error(\"Not implemented: setCursorPosition\");\n  }\n\n  /**\n   * Sets the selection range.\n   * This method also expects the cursor position to be moved as the end of the selection range.\n   *\n   * @param {Range} range - A range object that describes a selection range.\n   * @returns {undefined}\n   */\n  setSelectionRange(range) {\n    throw new Error(\"Not implemented: setSelectionRange\");\n  }\n\n  /**\n   * Gets the last row index of the text editor.\n   *\n   * @returns {number} The last row index.\n   */\n  getLastRow() {\n    throw new Error(\"Not implemented: getLastRow\");\n  }\n\n  /**\n   * Checks if the editor accepts a table at a row to be editted.\n   * It should return `false` if, for example, the row is in a code block (not Markdown).\n   *\n   * @param {number} row - A row index in the text editor.\n   * @returns {boolean} `true` if the table at the row can be editted.\n   */\n  acceptsTableEdit(row) {\n    throw new Error(\"Not implemented: acceptsTableEdit\");\n  }\n\n  /**\n   * Gets a line string at a row.\n   *\n   * @param {number} row - Row index, starts from `0`.\n   * @returns {string} The line at the specified row.\n   * The line must not contain an EOL like `\"\\n\"` or `\"\\r\"`.\n   */\n  getLine(row) {\n    throw new Error(\"Not implemented: getLine\");\n  }\n\n  /**\n   * Inserts a line at a specified row.\n   *\n   * @param {number} row - Row index, starts from `0`.\n   * @param {string} line - A string to be inserted.\n   * This must not contain an EOL like `\"\\n\"` or `\"\\r\"`.\n   * @return {undefined}\n   */\n  insertLine(row, line) {\n    throw new Error(\"Not implemented: insertLine\");\n  }\n\n  /**\n   * Deletes a line at a specified row.\n   *\n   * @param {number} row - Row index, starts from `0`.\n   * @returns {undefined}\n   */\n  deleteLine(row) {\n    throw new Error(\"Not implemented: deleteLine\");\n  }\n\n  /**\n   * Replace lines in a specified range.\n   *\n   * @param {number} startRow - Start row index, starts from `0`.\n   * @param {number} endRow - End row index.\n   * Lines from `startRow` to `endRow - 1` is replaced.\n   * @param {Array<string>} lines - An array of string.\n   * Each strings must not contain an EOL like `\"\\n\"` or `\"\\r\"`.\n   * @returns {undefined}\n   */\n  replaceLines(startRow, endRow, lines) {\n    throw new Error(\"Not implemented: replaceLines\");\n  }\n\n  /**\n   * Batches multiple operations as a single undo/redo step.\n   *\n   * @param {Function} func - A callback function that executes some operations on the text editor.\n   * @returns {undefined}\n   */\n  transact(func) {\n    throw new Error(\"Not implemented: transact\");\n  }\n}\n\n/**\n * Reads a property of an object if exists; otherwise uses a default value.\n *\n * @private\n * @param {*} obj - An object. If a non-object value is specified, the default value is used.\n * @param {string} key - A key (or property name).\n * @param {*} defaultVal - A default value that is used when a value does not exist.\n * @returns {*} A read value or the default value.\n */\nfunction _value(obj, key, defaultVal) {\n  return (typeof obj === \"object\" && obj !== null && obj[key] !== undefined)\n    ? obj[key]\n    : defaultVal;\n}\n\n/**\n * Reads multiple properties of an object if exists; otherwise uses default values.\n *\n * @private\n * @param {*} obj - An object. If a non-object value is specified, the default value is used.\n * @param {Object} keys - An object that consists of pairs of a key and a default value.\n * @returns {Object} A new object that contains read values.\n */\nfunction _values(obj, keys) {\n  const res = {};\n  for (const [key, defaultVal] of Object.entries(keys)) {\n    res[key] = _value(obj, key, defaultVal);\n  }\n  return res;\n}\n\n/**\n * Reads options for the formatter from an object.\n * The default values are used for options that are not specified.\n *\n * @param {Object} obj - An object containing options.\n * The available options and default values are listed below.\n *\n * | property name       | type                     | description                                             | default value            |\n * | ------------------- | ------------------------ | ------------------------------------------------------- | ------------------------ |\n * | `formatType`        | {@link FormatType}       | Format type, normal or weak.                            | `FormatType.NORMAL`      |\n * | `minDelimiterWidth` | {@link number}           | Minimum width of delimiters.                            | `3`                      |\n * | `defaultAlignment`  | {@link DefaultAlignment} | Default alignment of columns.                           | `DefaultAlignment.LEFT`  |\n * | `headerAlignment`   | {@link HeaderAlignment}  | Alignment of header cells.                              | `HeaderAlignment.FOLLOW` |\n * | `textWidthOptions`  | {@link Object}           | An object containing options for computing text widths. |                          |\n * | `smartCursor`       | {@link boolean}          | Enables \"Smart Cursor\" feature.                         | `false`                  |\n *\n * The available options for `obj.textWidthOptions` are the following ones.\n *\n * | property name     | type                              | description                                           | default value |\n * | ----------------- | --------------------------------- | ----------------------------------------------------- | ------------- |\n * | `normalize`       | {@link boolean}                   | Normalizes texts before computing text widths.        | `true`        |\n * | `wideChars`       | {@link Set}&lt;{@link string}&gt; | A set of characters that should be treated as wide.   | `new Set()`   |\n * | `narrowChars`     | {@link Set}&lt;{@link string}&gt; | A set of characters that should be treated as narrow. | `new Set()`   |\n * | `ambiguousAsWide` | {@link boolean}                   | Treats East Asian Ambiguous characters as wide.       | `false`       |\n *\n * @returns {Object} - An object that contains complete options.\n */\nfunction options(obj) {\n  const res = _values(obj, {\n    formatType       : FormatType.NORMAL,\n    minDelimiterWidth: 3,\n    defaultAlignment : DefaultAlignment.LEFT,\n    headerAlignment  : HeaderAlignment.FOLLOW,\n    smartCursor      : false\n  });\n  res.textWidthOptions = _values(obj.textWidthOptions, {\n    normalize      : true,\n    wideChars      : new Set(),\n    narrowChars    : new Set(),\n    ambiguousAsWide: false\n  });\n  return res;\n}\n\n/**\n * Checks if a line is a table row.\n *\n * @private\n * @param {string} line - A string.\n * @returns {boolean} `true` if the given line starts with a pipe `|`.\n */\nfunction _isTableRow(line) {\n  return line.trimLeft()[0] === \"|\";\n}\n\n/**\n * Computes new focus offset from information of completed and formatted tables.\n *\n * @private\n * @param {Focus} focus - A focus.\n * @param {Table} table - A completed but not formatted table with original cell contents.\n * @param {Object} formatted - Information of the formatted table.\n * @param {boolean} moved - Indicates whether the focus position is moved by a command or not.\n * @returns {number}\n */\nfunction _computeNewOffset(focus, table, formatted, moved) {\n  if (moved) {\n    const formattedFocusedCell = formatted.table.getFocusedCell(focus);\n    if (formattedFocusedCell !== undefined) {\n      return formattedFocusedCell.computeRawOffset(0);\n    }\n    else {\n      return focus.column < 0 ? formatted.marginLeft.length : 0;\n    }\n  }\n  else {\n    const focusedCell = table.getFocusedCell(focus);\n    const formattedFocusedCell = formatted.table.getFocusedCell(focus);\n    if (focusedCell !== undefined && formattedFocusedCell !== undefined) {\n      const contentOffset = Math.min(\n        focusedCell.computeContentOffset(focus.offset),\n        formattedFocusedCell.content.length\n      );\n      return formattedFocusedCell.computeRawOffset(contentOffset);\n    }\n    else {\n      return focus.column < 0 ? formatted.marginLeft.length : 0;\n    }\n  }\n}\n\n/**\n * The `TableEditor` class is at the center of the markdown-table-editor.\n * When a command is executed, it reads a table from the text editor, does some operation on the\n * table, and then apply the result to the text editor.\n *\n * To use this class, the text editor (or an interface to it) must implement {@link ITextEditor}.\n */\nclass TableEditor {\n  /**\n   * Creates a new table editor instance.\n   *\n   * @param {ITextEditor} textEditor - A text editor interface.\n   */\n  constructor(textEditor) {\n    /** @private */\n    this._textEditor = textEditor;\n    // smart cursor\n    /** @private */\n    this._scActive = false;\n    /** @private */\n    this._scTablePos = null;\n    /** @private */\n    this._scStartFocus = null;\n    /** @private */\n    this._scLastFocus = null;\n  }\n\n  /**\n   * Resets the smart cursor.\n   * Call this method when the table editor is inactivated.\n   *\n   * @returns {undefined}\n   */\n  resetSmartCursor() {\n    this._scActive = false;\n  }\n\n  /**\n   * Checks if the cursor is in a table row.\n   * This is useful to check whether the table editor should be activated or not.\n   *\n   * @returns {boolean} `true` if the cursor is in a table row.\n   */\n  cursorIsInTable() {\n    const pos = this._textEditor.getCursorPosition();\n    return this._textEditor.acceptsTableEdit(pos.row)\n      && _isTableRow(this._textEditor.getLine(pos.row));\n  }\n\n  /**\n   * Finds a table under the current cursor position.\n   *\n   * @private\n   * @returns {Object|undefined} An object that contains information about the table;\n   * `undefined` if there is no table.\n   * The return object contains the properties listed in the table.\n   *\n   * | property name   | type                                | description                                                              |\n   * | --------------- | ----------------------------------- | ------------------------------------------------------------------------ |\n   * | `range`         | {@link Range}                       | The range of the table.                                                  |\n   * | `lines`         | {@link Array}&lt;{@link string}&gt; | An array of the lines in the range.                                      |\n   * | `table`         | {@link Table}                       | A table object read from the text editor.                                |\n   * | `focus`         | {@link Focus}                       | A focus object that represents the current cursor position in the table. |\n   */\n  _findTable() {\n    const pos = this._textEditor.getCursorPosition();\n    const lastRow = this._textEditor.getLastRow();\n    const lines = [];\n    let startRow = pos.row;\n    let endRow = pos.row;\n    // current line\n    {\n      const line = this._textEditor.getLine(pos.row);\n      if (!this._textEditor.acceptsTableEdit(pos.row) || !_isTableRow(line)) {\n        return undefined;\n      }\n      lines.push(line);\n    }\n    // previous lines\n    for (let row = pos.row - 1; row >= 0; row--) {\n      const line = this._textEditor.getLine(row);\n      if (!this._textEditor.acceptsTableEdit(row) || !_isTableRow(line)) {\n        break;\n      }\n      lines.unshift(line);\n      startRow = row;\n    }\n    // next lines\n    for (let row = pos.row + 1; row <= lastRow; row++) {\n      const line = this._textEditor.getLine(row);\n      if (!this._textEditor.acceptsTableEdit(row) || !_isTableRow(line)) {\n        break;\n      }\n      lines.push(line);\n      endRow = row;\n    }\n    const range = new Range(\n      new Point(startRow, 0),\n      new Point(endRow, lines[lines.length - 1].length)\n    );\n    const table = readTable(lines);\n    const focus = table.focusOfPosition(pos, startRow);\n    return { range, lines, table, focus };\n  }\n\n  /**\n   * Finds a table and does an operation with it.\n   *\n   * @private\n   * @param {Function} func - A function that does some operation on table information obtained by\n   * {@link TableEditor#_findTable}.\n   * @returns {undefined}\n   */\n  _withTable(func) {\n    const info = this._findTable();\n    if (info === undefined) {\n      return;\n    }\n    func(info);\n  }\n\n  /**\n   * Updates lines in a given range in the text editor.\n   *\n   * @private\n   * @param {number} startRow - Start row index, starts from `0`.\n   * @param {number} endRow - End row index.\n   * Lines from `startRow` to `endRow - 1` are replaced.\n   * @param {Array<string>} newLines - New lines.\n   * @param {Array<string>} [oldLines=undefined] - Old lines to be replaced.\n   * @returns {undefined}\n   */\n  _updateLines(startRow, endRow, newLines, oldLines = undefined) {\n    if (oldLines !== undefined) {\n      // apply the shortest edit script\n      // if a table is edited in a normal manner, the edit distance never exceeds 3\n      const ses = shortestEditScript(oldLines, newLines, 3);\n      if (ses !== undefined) {\n        applyEditScript(this._textEditor, ses, startRow);\n        return;\n      }\n    }\n    this._textEditor.replaceLines(startRow, endRow, newLines);\n  }\n\n  /**\n   * Moves the cursor position to the focused cell,\n   *\n   * @private\n   * @param {number} startRow - Row index where the table starts in the text editor.\n   * @param {Table} table - A table.\n   * @param {Focus} focus - A focus to which the cursor will be moved.\n   * @returns {undefined}\n   */\n  _moveToFocus(startRow, table, focus) {\n    const pos = table.positionOfFocus(focus, startRow);\n    if (pos !== undefined) {\n      this._textEditor.setCursorPosition(pos);\n    }\n  }\n\n  /**\n   * Selects the focused cell.\n   * If the cell has no content to be selected, then just moves the cursor position.\n   *\n   * @private\n   * @param {number} startRow - Row index where the table starts in the text editor.\n   * @param {Table} table - A table.\n   * @param {Focus} focus - A focus to be selected.\n   * @returns {undefined}\n   */\n  _selectFocus(startRow, table, focus) {\n    const range = table.selectionRangeOfFocus(focus, startRow);\n    if (range !== undefined) {\n      this._textEditor.setSelectionRange(range);\n    }\n    else {\n      this._moveToFocus(startRow, table, focus);\n    }\n  }\n\n  /**\n   * Formats the table under the cursor.\n   *\n   * @param {Object} options - See {@link options}.\n   * @returns {undefined}\n   */\n  format(options) {\n    this._withTable(({ range, lines, table, focus }) => {\n      let newFocus = focus;\n      // complete\n      const completed = completeTable(table, options);\n      if (completed.delimiterInserted && newFocus.row > 0) {\n        newFocus = newFocus.setRow(newFocus.row + 1);\n      }\n      // format\n      const formatted = formatTable(completed.table, options);\n      newFocus = newFocus.setOffset(_computeNewOffset(newFocus, completed.table, formatted, false));\n      // apply\n      this._textEditor.transact(() => {\n        this._updateLines(range.start.row, range.end.row + 1, formatted.table.toLines(), lines);\n        this._moveToFocus(range.start.row, formatted.table, newFocus);\n      });\n    });\n  }\n\n  /**\n   * Formats and escapes from the table.\n   *\n   * @param {Object} options - See {@link options}.\n   * @returns {undefined}\n   */\n  escape(options) {\n    this._withTable(({ range, lines, table, focus }) => {\n      // complete\n      const completed = completeTable(table, options);\n      // format\n      const formatted = formatTable(completed.table, options);\n      // apply\n      const newPos = new Point(range.end.row + (completed.delimiterInserted ? 2 : 1), 0);\n      this._textEditor.transact(() => {\n        this._updateLines(range.start.row, range.end.row + 1, formatted.table.toLines(), lines);\n        if (newPos.row > this._textEditor.getLastRow()) {\n          this._textEditor.insertLine(newPos.row, \"\");\n        }\n        this._textEditor.setCursorPosition(newPos);\n      });\n      this.resetSmartCursor();\n    });\n  }\n\n  /**\n   * Alters the alignment of the focused column.\n   *\n   * @param {Alignment} alignment - New alignment.\n   * @param {Object} options - See {@link options}.\n   * @returns {undefined}\n   */\n  alignColumn(alignment, options) {\n    this._withTable(({ range, lines, table, focus }) => {\n      let newFocus = focus;\n      // complete\n      const completed = completeTable(table, options);\n      if (completed.delimiterInserted && newFocus.row > 0) {\n        newFocus = newFocus.setRow(newFocus.row + 1);\n      }\n      // alter alignment\n      let altered = completed.table;\n      if (0 <= newFocus.column && newFocus.column <= altered.getHeaderWidth() - 1) {\n        altered = alterAlignment(completed.table, newFocus.column, alignment, options);\n      }\n      // format\n      const formatted = formatTable(altered, options);\n      newFocus = newFocus.setOffset(_computeNewOffset(newFocus, completed.table, formatted, false));\n      // apply\n      this._textEditor.transact(() => {\n        this._updateLines(range.start.row, range.end.row + 1, formatted.table.toLines(), lines);\n        this._moveToFocus(range.start.row, formatted.table, newFocus);\n      });\n    });\n  }\n\n  /**\n   * Selects the focused cell content.\n   *\n   * @param {Object} options - See {@link options}.\n   * @returns {undefined}\n   */\n  selectCell(options) {\n    this._withTable(({ range, lines, table, focus }) => {\n      let newFocus = focus;\n      // complete\n      const completed = completeTable(table, options);\n      if (completed.delimiterInserted && newFocus.row > 0) {\n        newFocus = newFocus.setRow(newFocus.row + 1);\n      }\n      // format\n      const formatted = formatTable(completed.table, options);\n      newFocus = newFocus.setOffset(_computeNewOffset(newFocus, completed.table, formatted, false));\n      // apply\n      this._textEditor.transact(() => {\n        this._updateLines(range.start.row, range.end.row + 1, formatted.table.toLines(), lines);\n        this._selectFocus(range.start.row, formatted.table, newFocus);\n      });\n    });\n  }\n\n  /**\n   * Moves the focus to another cell.\n   *\n   * @param {number} rowOffset - Offset in row.\n   * @param {number} columnOffset - Offset in column.\n   * @param {Object} options - See {@link options}.\n   * @returns {undefined}\n   */\n  moveFocus(rowOffset, columnOffset, options) {\n    this._withTable(({ range, lines, table, focus }) => {\n      let newFocus = focus;\n      // complete\n      const completed = completeTable(table, options);\n      if (completed.delimiterInserted && newFocus.row > 0) {\n        newFocus = newFocus.setRow(newFocus.row + 1);\n      }\n      const startFocus = newFocus;\n      // move focus\n      if (rowOffset !== 0) {\n        const height = completed.table.getHeight();\n        // skip delimiter row\n        const skip =\n            newFocus.row < 1 && newFocus.row + rowOffset >= 1 ? 1\n          : newFocus.row > 1 && newFocus.row + rowOffset <= 1 ? -1\n          : 0;\n        newFocus = newFocus.setRow(\n          Math.min(Math.max(newFocus.row + rowOffset + skip, 0), height <= 2 ? 0 : height - 1)\n        );\n      }\n      if (columnOffset !== 0) {\n        const width = completed.table.getHeaderWidth();\n        if (!(newFocus.column < 0 && columnOffset < 0)\n          && !(newFocus.column > width - 1 && columnOffset > 0)) {\n          newFocus = newFocus.setColumn(\n            Math.min(Math.max(newFocus.column + columnOffset, 0), width - 1)\n          );\n        }\n      }\n      const moved = !newFocus.posEquals(startFocus);\n      // format\n      const formatted = formatTable(completed.table, options);\n      newFocus = newFocus.setOffset(_computeNewOffset(newFocus, completed.table, formatted, moved));\n      // apply\n      this._textEditor.transact(() => {\n        this._updateLines(range.start.row, range.end.row + 1, formatted.table.toLines(), lines);\n        if (moved) {\n          this._selectFocus(range.start.row, formatted.table, newFocus);\n        }\n        else {\n          this._moveToFocus(range.start.row, formatted.table, newFocus);\n        }\n      });\n      if (moved) {\n        this.resetSmartCursor();\n      }\n    });\n  }\n\n  /**\n   * Moves the focus to the next cell.\n   *\n   * @param {Object} options - See {@link options}.\n   * @returns {undefined}\n   */\n  nextCell(options) {\n    this._withTable(({ range, lines, table, focus }) => {\n      // reset smart cursor if moved\n      const focusMoved = (this._scTablePos !== null && !range.start.equals(this._scTablePos))\n        || (this._scLastFocus !== null && !focus.posEquals(this._scLastFocus));\n      if (this._scActive && focusMoved) {\n        this.resetSmartCursor();\n      }\n      let newFocus = focus;\n      // complete\n      const completed = completeTable(table, options);\n      if (completed.delimiterInserted && newFocus.row > 0) {\n        newFocus = newFocus.setRow(newFocus.row + 1);\n      }\n      const startFocus = newFocus;\n      let altered = completed.table;\n      // move focus\n      if (newFocus.row === 1) {\n        // move to next row\n        newFocus = newFocus.setRow(2);\n        if (options.smartCursor) {\n          if (newFocus.column < 0 || altered.getHeaderWidth() - 1 < newFocus.column) {\n            newFocus = newFocus.setColumn(0);\n          }\n        }\n        else {\n          newFocus = newFocus.setColumn(0);\n        }\n        // insert an empty row if needed\n        if (newFocus.row > altered.getHeight() - 1) {\n          const row = new Array(altered.getHeaderWidth()).fill(new TableCell(\"\"));\n          altered = insertRow(altered, altered.getHeight(), new TableRow(row, \"\", \"\"));\n        }\n      }\n      else {\n        // insert an empty column if needed\n        if (newFocus.column > altered.getHeaderWidth() - 1) {\n          const column = new Array(altered.getHeight() - 1).fill(new TableCell(\"\"));\n          altered = insertColumn(altered, altered.getHeaderWidth(), column, options);\n        }\n        // move to next column\n        newFocus = newFocus.setColumn(newFocus.column + 1);\n      }\n      // format\n      const formatted = formatTable(altered, options);\n      newFocus = newFocus.setOffset(_computeNewOffset(newFocus, altered, formatted, true));\n      // apply\n      const newLines = formatted.table.toLines();\n      if (newFocus.column > formatted.table.getHeaderWidth() - 1) {\n        // add margin\n        newLines[newFocus.row] += \" \";\n        newFocus = newFocus.setOffset(1);\n      }\n      this._textEditor.transact(() => {\n        this._updateLines(range.start.row, range.end.row + 1, newLines, lines);\n        this._selectFocus(range.start.row, formatted.table, newFocus);\n      });\n      if (options.smartCursor) {\n        if (!this._scActive) {\n          // activate smart cursor\n          this._scActive = true;\n          this._scTablePos = range.start;\n          if (startFocus.column < 0 || formatted.table.getHeaderWidth() - 1 < startFocus.column) {\n            this._scStartFocus = new Focus(startFocus.row, 0, 0);\n          }\n          else {\n            this._scStartFocus = startFocus;\n          }\n        }\n        this._scLastFocus = newFocus;\n      }\n    });\n  }\n\n  /**\n   * Moves the focus to the previous cell.\n   *\n   * @param {Object} options - See {@link options}.\n   * @returns {undefined}\n   */\n  previousCell(options) {\n    this._withTable(({ range, lines, table, focus }) => {\n      let newFocus = focus;\n      // complete\n      const completed = completeTable(table, options);\n      if (completed.delimiterInserted && newFocus.row > 0) {\n        newFocus = newFocus.setRow(newFocus.row + 1);\n      }\n      const startFocus = newFocus;\n      // move focus\n      if (newFocus.row === 0) {\n        if (newFocus.column > 0) {\n          newFocus = newFocus.setColumn(newFocus.column - 1);\n        }\n      }\n      else if (newFocus.row === 1) {\n        newFocus = new Focus(0, completed.table.getHeaderWidth() - 1, newFocus.offset);\n      }\n      else {\n        if (newFocus.column > 0) {\n          newFocus = newFocus.setColumn(newFocus.column - 1);\n        }\n        else {\n          newFocus = new Focus(\n            newFocus.row === 2 ? 0 : newFocus.row - 1,\n            completed.table.getHeaderWidth() - 1,\n            newFocus.offset\n          );\n        }\n      }\n      const moved = !newFocus.posEquals(startFocus);\n      // format\n      const formatted = formatTable(completed.table, options);\n      newFocus = newFocus.setOffset(_computeNewOffset(newFocus, completed.table, formatted, moved));\n      // apply\n      this._textEditor.transact(() => {\n        this._updateLines(range.start.row, range.end.row + 1, formatted.table.toLines(), lines);\n        if (moved) {\n          this._selectFocus(range.start.row, formatted.table, newFocus);\n        }\n        else {\n          this._moveToFocus(range.start.row, formatted.table, newFocus);\n        }\n      });\n      if (moved) {\n        this.resetSmartCursor();\n      }\n    });\n  }\n\n  /**\n   * Moves the focus to the next row.\n   *\n   * @param {Object} options - See {@link options}.\n   * @returns {undefined}\n   */\n  nextRow(options) {\n    this._withTable(({ range, lines, table, focus }) => {\n      // reset smart cursor if moved\n      const focusMoved = (this._scTablePos !== null && !range.start.equals(this._scTablePos))\n        || (this._scLastFocus !== null && !focus.posEquals(this._scLastFocus));\n      if (this._scActive && focusMoved) {\n        this.resetSmartCursor();\n      }\n      let newFocus = focus;\n      // complete\n      const completed = completeTable(table, options);\n      if (completed.delimiterInserted && newFocus.row > 0) {\n        newFocus = newFocus.setRow(newFocus.row + 1);\n      }\n      const startFocus = newFocus;\n      let altered = completed.table;\n      // move focus\n      if (newFocus.row === 0) {\n        newFocus = newFocus.setRow(2);\n      }\n      else {\n        newFocus = newFocus.setRow(newFocus.row + 1);\n      }\n      if (options.smartCursor) {\n        if (this._scActive) {\n          newFocus = newFocus.setColumn(this._scStartFocus.column);\n        }\n        else if (newFocus.column < 0 || altered.getHeaderWidth() - 1 < newFocus.column) {\n          newFocus = newFocus.setColumn(0);\n        }\n      }\n      else {\n        newFocus = newFocus.setColumn(0);\n      }\n      // insert empty row if needed\n      if (newFocus.row > altered.getHeight() - 1) {\n        const row = new Array(altered.getHeaderWidth()).fill(new TableCell(\"\"));\n        altered = insertRow(altered, altered.getHeight(), new TableRow(row, \"\", \"\"));\n      }\n      // format\n      const formatted = formatTable(altered, options);\n      newFocus = newFocus.setOffset(_computeNewOffset(newFocus, altered, formatted, true));\n      // apply\n      this._textEditor.transact(() => {\n        this._updateLines(range.start.row, range.end.row + 1, formatted.table.toLines(), lines);\n        this._selectFocus(range.start.row, formatted.table, newFocus);\n      });\n      if (options.smartCursor) {\n        if (!this._scActive) {\n          // activate smart cursor\n          this._scActive = true;\n          this._scTablePos = range.start;\n          if (startFocus.column < 0 || formatted.table.getHeaderWidth() - 1 < startFocus.column) {\n            this._scStartFocus = new Focus(startFocus.row, 0, 0);\n          }\n          else {\n            this._scStartFocus = startFocus;\n          }\n        }\n        this._scLastFocus = newFocus;\n      }\n    });\n  }\n\n  /**\n   * Inserts an empty row at the current focus.\n   *\n   * @param {Object} options - See {@link options}.\n   * @returns {undefined}\n   */\n  insertRow(options) {\n    this._withTable(({ range, lines, table, focus }) => {\n      let newFocus = focus;\n      // complete\n      const completed = completeTable(table, options);\n      if (completed.delimiterInserted && newFocus.row > 0) {\n        newFocus = newFocus.setRow(newFocus.row + 1);\n      }\n      // move focus\n      if (newFocus.row <= 1) {\n        newFocus = newFocus.setRow(2);\n      }\n      newFocus = newFocus.setColumn(0);\n      // insert an empty row\n      const row = new Array(completed.table.getHeaderWidth()).fill(new TableCell(\"\"));\n      const altered = insertRow(completed.table, newFocus.row, new TableRow(row, \"\", \"\"));\n      // format\n      const formatted = formatTable(altered, options);\n      newFocus = newFocus.setOffset(_computeNewOffset(newFocus, altered, formatted, true));\n      // apply\n      this._textEditor.transact(() => {\n        this._updateLines(range.start.row, range.end.row + 1, formatted.table.toLines(), lines);\n        this._moveToFocus(range.start.row, formatted.table, newFocus);\n      });\n      this.resetSmartCursor();\n    });\n  }\n\n  /**\n   * Deletes a row at the current focus.\n   *\n   * @param {Object} options - See {@link options}.\n   * @returns {undefined}\n   */\n  deleteRow(options) {\n    this._withTable(({ range, lines, table, focus }) => {\n      let newFocus = focus;\n      // complete\n      const completed = completeTable(table, options);\n      if (completed.delimiterInserted && newFocus.row > 0) {\n        newFocus = newFocus.setRow(newFocus.row + 1);\n      }\n      // delete a row\n      let altered = completed.table;\n      let moved = false;\n      if (newFocus.row !== 1) {\n        altered = deleteRow(altered, newFocus.row);\n        moved = true;\n        if (newFocus.row > altered.getHeight() - 1) {\n          newFocus = newFocus.setRow(newFocus.row === 2 ? 0 : newFocus.row - 1);\n        }\n      }\n      // format\n      const formatted = formatTable(altered, options);\n      newFocus = newFocus.setOffset(_computeNewOffset(newFocus, altered, formatted, moved));\n      // apply\n      this._textEditor.transact(() => {\n        this._updateLines(range.start.row, range.end.row + 1, formatted.table.toLines(), lines);\n        if (moved) {\n          this._selectFocus(range.start.row, formatted.table, newFocus);\n        }\n        else {\n          this._moveToFocus(range.start.row, formatted.table, newFocus);\n        }\n      });\n      this.resetSmartCursor();\n    });\n  }\n\n  /**\n   * Moves the focused row by the specified offset.\n   *\n   * @param {number} offset - An offset the row is moved by.\n   * @param {Object} options - See {@link options}.\n   * @returns {undefined}\n   */\n  moveRow(offset, options) {\n    this._withTable(({ range, lines, table, focus }) => {\n      let newFocus = focus;\n      // complete\n      const completed = completeTable(table, options);\n      if (completed.delimiterInserted && newFocus.row > 0) {\n        newFocus = newFocus.setRow(newFocus.row + 1);\n      }\n      // move row\n      let altered = completed.table;\n      if (newFocus.row > 1) {\n        const dest = Math.min(Math.max(newFocus.row + offset, 2), altered.getHeight() - 1);\n        altered = moveRow(altered, newFocus.row, dest);\n        newFocus = newFocus.setRow(dest);\n      }\n      // format\n      const formatted = formatTable(altered, options);\n      newFocus = newFocus.setOffset(_computeNewOffset(newFocus, altered, formatted, false));\n      // apply\n      this._textEditor.transact(() => {\n        this._updateLines(range.start.row, range.end.row + 1, formatted.table.toLines(), lines);\n        this._moveToFocus(range.start.row, formatted.table, newFocus);\n      });\n      this.resetSmartCursor();\n    });\n  }\n\n  /**\n   * Inserts an empty column at the current focus.\n   *\n   * @param {Object} options - See {@link options}.\n   * @returns {undefined}\n   */\n  insertColumn(options) {\n    this._withTable(({ range, lines, table, focus }) => {\n      let newFocus = focus;\n      // complete\n      const completed = completeTable(table, options);\n      if (completed.delimiterInserted && newFocus.row > 0) {\n        newFocus = newFocus.setRow(newFocus.row + 1);\n      }\n      // move focus\n      if (newFocus.row === 1) {\n        newFocus = newFocus.setRow(0);\n      }\n      if (newFocus.column < 0) {\n        newFocus = newFocus.setColumn(0);\n      }\n      // insert an empty column\n      const column = new Array(completed.table.getHeight() - 1).fill(new TableCell(\"\"));\n      const altered = insertColumn(completed.table, newFocus.column, column, options);\n      // format\n      const formatted = formatTable(altered, options);\n      newFocus = newFocus.setOffset(_computeNewOffset(newFocus, altered, formatted, true));\n      // apply\n      this._textEditor.transact(() => {\n        this._updateLines(range.start.row, range.end.row + 1, formatted.table.toLines(), lines);\n        this._moveToFocus(range.start.row, formatted.table, newFocus);\n      });\n      this.resetSmartCursor();\n    });\n  }\n\n  /**\n   * Deletes a column at the current focus.\n   *\n   * @param {Object} options - See {@link options}.\n   * @returns {undefined}\n   */\n  deleteColumn(options) {\n    this._withTable(({ range, lines, table, focus }) => {\n      let newFocus = focus;\n      // complete\n      const completed = completeTable(table, options);\n      if (completed.delimiterInserted && newFocus.row > 0) {\n        newFocus = newFocus.setRow(newFocus.row + 1);\n      }\n      // move focus\n      if (newFocus.row === 1) {\n        newFocus = newFocus.setRow(0);\n      }\n      // delete a column\n      let altered = completed.table;\n      let moved = false;\n      if (0 <= newFocus.column && newFocus.column <= altered.getHeaderWidth() - 1) {\n        altered = deleteColumn(completed.table, newFocus.column, options);\n        moved = true;\n        if (newFocus.column > altered.getHeaderWidth() - 1) {\n          newFocus = newFocus.setColumn(altered.getHeaderWidth() - 1);\n        }\n      }\n      // format\n      const formatted = formatTable(altered, options);\n      newFocus = newFocus.setOffset(_computeNewOffset(newFocus, altered, formatted, moved));\n      // apply\n      this._textEditor.transact(() => {\n        this._updateLines(range.start.row, range.end.row + 1, formatted.table.toLines(), lines);\n        if (moved) {\n          this._selectFocus(range.start.row, formatted.table, newFocus);\n        }\n        else {\n          this._moveToFocus(range.start.row, formatted.table, newFocus);\n        }\n      });\n      this.resetSmartCursor();\n    });\n  }\n\n  /**\n   * Moves the focused column by the specified offset.\n   *\n   * @param {number} offset - An offset the column is moved by.\n   * @param {Object} options - See {@link options}.\n   * @returns {undefined}\n   */\n  moveColumn(offset, options) {\n    this._withTable(({ range, lines, table, focus }) => {\n      let newFocus = focus;\n      // complete\n      const completed = completeTable(table, options);\n      if (completed.delimiterInserted && newFocus.row > 0) {\n        newFocus = newFocus.setRow(newFocus.row + 1);\n      }\n      // move column\n      let altered = completed.table;\n      if (0 <= newFocus.column && newFocus.column <= altered.getHeaderWidth() - 1) {\n        const dest = Math.min(Math.max(newFocus.column + offset, 0), altered.getHeaderWidth() - 1);\n        altered = moveColumn(altered, newFocus.column, dest);\n        newFocus = newFocus.setColumn(dest);\n      }\n      // format\n      const formatted = formatTable(altered, options);\n      newFocus = newFocus.setOffset(_computeNewOffset(newFocus, altered, formatted, false));\n      // apply\n      this._textEditor.transact(() => {\n        this._updateLines(range.start.row, range.end.row + 1, formatted.table.toLines(), lines);\n        this._moveToFocus(range.start.row, formatted.table, newFocus);\n      });\n      this.resetSmartCursor();\n    });\n  }\n\n  /**\n   * Formats all the tables in the text editor.\n   *\n   * @param {Object} options - See {@link options}.\n   * @returns {undefined}\n   */\n  formatAll(options) {\n    this._textEditor.transact(() => {\n      let pos = this._textEditor.getCursorPosition();\n      let lines = [];\n      let startRow = undefined;\n      let lastRow = this._textEditor.getLastRow();\n      // find tables\n      for (let row = 0; row <= lastRow; row++) {\n        const line = this._textEditor.getLine(row);\n        if (this._textEditor.acceptsTableEdit(row) && _isTableRow(line)) {\n          lines.push(line);\n          if (startRow === undefined) {\n            startRow = row;\n          }\n        }\n        else if (startRow !== undefined) {\n          // get table info\n          const endRow = row - 1;\n          const range = new Range(\n            new Point(startRow, 0),\n            new Point(endRow, lines[lines.length - 1].length)\n          );\n          const table = readTable(lines);\n          const focus = table.focusOfPosition(pos, startRow);\n          const focused = focus !== undefined;\n          // format\n          let newFocus = focus;\n          const completed = completeTable(table, options);\n          if (focused && completed.delimiterInserted && newFocus.row > 0) {\n            newFocus = newFocus.setRow(newFocus.row + 1);\n          }\n          const formatted = formatTable(completed.table, options);\n          if (focused) {\n            newFocus = newFocus.setOffset(\n              _computeNewOffset(newFocus, completed.table, formatted, false)\n            );\n          }\n          // apply\n          const newLines = formatted.table.toLines();\n          this._updateLines(range.start.row, range.end.row + 1, newLines, lines);\n          // update cursor position\n          const diff = newLines.length - lines.length;\n          if (focused) {\n            pos = formatted.table.positionOfFocus(newFocus, startRow);\n          }\n          else if (pos.row > endRow) {\n            pos = new Point(pos.row + diff, pos.column);\n          }\n          // reset\n          lines = [];\n          startRow = undefined;\n          // update\n          lastRow += diff;\n          row += diff;\n        }\n      }\n      if (startRow !== undefined) {\n        // get table info\n        const endRow = lastRow;\n        const range = new Range(\n          new Point(startRow, 0),\n          new Point(endRow, lines[lines.length - 1].length)\n        );\n        const table = readTable(lines);\n        const focus = table.focusOfPosition(pos, startRow);\n        // format\n        let newFocus = focus;\n        const completed = completeTable(table, options);\n        if (completed.delimiterInserted && newFocus.row > 0) {\n          newFocus = newFocus.setRow(newFocus.row + 1);\n        }\n        const formatted = formatTable(completed.table, options);\n        newFocus = newFocus.setOffset(\n          _computeNewOffset(newFocus, completed.table, formatted, false)\n        );\n        // apply\n        const newLines = formatted.table.toLines();\n        this._updateLines(range.start.row, range.end.row + 1, newLines, lines);\n        pos = formatted.table.positionOfFocus(newFocus, startRow);\n      }\n      this._textEditor.setCursorPosition(pos);\n    });\n  }\n}\n\n\n//# sourceMappingURL=mte-kernel.mjs.map\n\n\n/***/ }),\n/* 2 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return getEAW; });\n/* unused harmony export computeWidth */\n/*\n * This file is generated by a script. DO NOT EDIT BY HAND!\n */\n\n/*\n * This part (from BEGIN to END) is derived from the Unicode Data Files:\n *\n * UNICODE, INC. LICENSE AGREEMENT\n *\n * Copyright © 1991-2017 Unicode, Inc. All rights reserved.\n * Distributed under the Terms of Use in http://www.unicode.org/copyright.html.\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of the Unicode data files and any associated documentation\n * (the \"Data Files\") or Unicode software and any associated documentation\n * (the \"Software\") to deal in the Data Files or Software\n * without restriction, including without limitation the rights to use,\n * copy, modify, merge, publish, distribute, and/or sell copies of\n * the Data Files or Software, and to permit persons to whom the Data Files\n * or Software are furnished to do so, provided that either\n * (a) this copyright and permission notice appear with all copies\n * of the Data Files or Software, or\n * (b) this copyright and permission notice appear in associated\n * Documentation.\n *\n * THE DATA FILES AND SOFTWARE ARE PROVIDED \"AS IS\", WITHOUT WARRANTY OF\n * ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE\n * WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n * NONINFRINGEMENT OF THIRD PARTY RIGHTS.\n * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS\n * NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL\n * DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,\n * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER\n * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\n * PERFORMANCE OF THE DATA FILES OR SOFTWARE.\n */\n\n/* BEGIN */\nvar defs = [\n  { start: 0, end: 31, prop: \"N\" },\n  { start: 32, end: 126, prop: \"Na\" },\n  { start: 127, end: 160, prop: \"N\" },\n  { start: 161, end: 161, prop: \"A\" },\n  { start: 162, end: 163, prop: \"Na\" },\n  { start: 164, end: 164, prop: \"A\" },\n  { start: 165, end: 166, prop: \"Na\" },\n  { start: 167, end: 168, prop: \"A\" },\n  { start: 169, end: 169, prop: \"N\" },\n  { start: 170, end: 170, prop: \"A\" },\n  { start: 171, end: 171, prop: \"N\" },\n  { start: 172, end: 172, prop: \"Na\" },\n  { start: 173, end: 174, prop: \"A\" },\n  { start: 175, end: 175, prop: \"Na\" },\n  { start: 176, end: 180, prop: \"A\" },\n  { start: 181, end: 181, prop: \"N\" },\n  { start: 182, end: 186, prop: \"A\" },\n  { start: 187, end: 187, prop: \"N\" },\n  { start: 188, end: 191, prop: \"A\" },\n  { start: 192, end: 197, prop: \"N\" },\n  { start: 198, end: 198, prop: \"A\" },\n  { start: 199, end: 207, prop: \"N\" },\n  { start: 208, end: 208, prop: \"A\" },\n  { start: 209, end: 214, prop: \"N\" },\n  { start: 215, end: 216, prop: \"A\" },\n  { start: 217, end: 221, prop: \"N\" },\n  { start: 222, end: 225, prop: \"A\" },\n  { start: 226, end: 229, prop: \"N\" },\n  { start: 230, end: 230, prop: \"A\" },\n  { start: 231, end: 231, prop: \"N\" },\n  { start: 232, end: 234, prop: \"A\" },\n  { start: 235, end: 235, prop: \"N\" },\n  { start: 236, end: 237, prop: \"A\" },\n  { start: 238, end: 239, prop: \"N\" },\n  { start: 240, end: 240, prop: \"A\" },\n  { start: 241, end: 241, prop: \"N\" },\n  { start: 242, end: 243, prop: \"A\" },\n  { start: 244, end: 246, prop: \"N\" },\n  { start: 247, end: 250, prop: \"A\" },\n  { start: 251, end: 251, prop: \"N\" },\n  { start: 252, end: 252, prop: \"A\" },\n  { start: 253, end: 253, prop: \"N\" },\n  { start: 254, end: 254, prop: \"A\" },\n  { start: 255, end: 256, prop: \"N\" },\n  { start: 257, end: 257, prop: \"A\" },\n  { start: 258, end: 272, prop: \"N\" },\n  { start: 273, end: 273, prop: \"A\" },\n  { start: 274, end: 274, prop: \"N\" },\n  { start: 275, end: 275, prop: \"A\" },\n  { start: 276, end: 282, prop: \"N\" },\n  { start: 283, end: 283, prop: \"A\" },\n  { start: 284, end: 293, prop: \"N\" },\n  { start: 294, end: 295, prop: \"A\" },\n  { start: 296, end: 298, prop: \"N\" },\n  { start: 299, end: 299, prop: \"A\" },\n  { start: 300, end: 304, prop: \"N\" },\n  { start: 305, end: 307, prop: \"A\" },\n  { start: 308, end: 311, prop: \"N\" },\n  { start: 312, end: 312, prop: \"A\" },\n  { start: 313, end: 318, prop: \"N\" },\n  { start: 319, end: 322, prop: \"A\" },\n  { start: 323, end: 323, prop: \"N\" },\n  { start: 324, end: 324, prop: \"A\" },\n  { start: 325, end: 327, prop: \"N\" },\n  { start: 328, end: 331, prop: \"A\" },\n  { start: 332, end: 332, prop: \"N\" },\n  { start: 333, end: 333, prop: \"A\" },\n  { start: 334, end: 337, prop: \"N\" },\n  { start: 338, end: 339, prop: \"A\" },\n  { start: 340, end: 357, prop: \"N\" },\n  { start: 358, end: 359, prop: \"A\" },\n  { start: 360, end: 362, prop: \"N\" },\n  { start: 363, end: 363, prop: \"A\" },\n  { start: 364, end: 461, prop: \"N\" },\n  { start: 462, end: 462, prop: \"A\" },\n  { start: 463, end: 463, prop: \"N\" },\n  { start: 464, end: 464, prop: \"A\" },\n  { start: 465, end: 465, prop: \"N\" },\n  { start: 466, end: 466, prop: \"A\" },\n  { start: 467, end: 467, prop: \"N\" },\n  { start: 468, end: 468, prop: \"A\" },\n  { start: 469, end: 469, prop: \"N\" },\n  { start: 470, end: 470, prop: \"A\" },\n  { start: 471, end: 471, prop: \"N\" },\n  { start: 472, end: 472, prop: \"A\" },\n  { start: 473, end: 473, prop: \"N\" },\n  { start: 474, end: 474, prop: \"A\" },\n  { start: 475, end: 475, prop: \"N\" },\n  { start: 476, end: 476, prop: \"A\" },\n  { start: 477, end: 592, prop: \"N\" },\n  { start: 593, end: 593, prop: \"A\" },\n  { start: 594, end: 608, prop: \"N\" },\n  { start: 609, end: 609, prop: \"A\" },\n  { start: 610, end: 707, prop: \"N\" },\n  { start: 708, end: 708, prop: \"A\" },\n  { start: 709, end: 710, prop: \"N\" },\n  { start: 711, end: 711, prop: \"A\" },\n  { start: 712, end: 712, prop: \"N\" },\n  { start: 713, end: 715, prop: \"A\" },\n  { start: 716, end: 716, prop: \"N\" },\n  { start: 717, end: 717, prop: \"A\" },\n  { start: 718, end: 719, prop: \"N\" },\n  { start: 720, end: 720, prop: \"A\" },\n  { start: 721, end: 727, prop: \"N\" },\n  { start: 728, end: 731, prop: \"A\" },\n  { start: 732, end: 732, prop: \"N\" },\n  { start: 733, end: 733, prop: \"A\" },\n  { start: 734, end: 734, prop: \"N\" },\n  { start: 735, end: 735, prop: \"A\" },\n  { start: 736, end: 767, prop: \"N\" },\n  { start: 768, end: 879, prop: \"A\" },\n  { start: 880, end: 912, prop: \"N\" },\n  { start: 913, end: 929, prop: \"A\" },\n  { start: 930, end: 930, prop: \"N\" },\n  { start: 931, end: 937, prop: \"A\" },\n  { start: 938, end: 944, prop: \"N\" },\n  { start: 945, end: 961, prop: \"A\" },\n  { start: 962, end: 962, prop: \"N\" },\n  { start: 963, end: 969, prop: \"A\" },\n  { start: 970, end: 1024, prop: \"N\" },\n  { start: 1025, end: 1025, prop: \"A\" },\n  { start: 1026, end: 1039, prop: \"N\" },\n  { start: 1040, end: 1103, prop: \"A\" },\n  { start: 1104, end: 1104, prop: \"N\" },\n  { start: 1105, end: 1105, prop: \"A\" },\n  { start: 1106, end: 4351, prop: \"N\" },\n  { start: 4352, end: 4447, prop: \"W\" },\n  { start: 4448, end: 8207, prop: \"N\" },\n  { start: 8208, end: 8208, prop: \"A\" },\n  { start: 8209, end: 8210, prop: \"N\" },\n  { start: 8211, end: 8214, prop: \"A\" },\n  { start: 8215, end: 8215, prop: \"N\" },\n  { start: 8216, end: 8217, prop: \"A\" },\n  { start: 8218, end: 8219, prop: \"N\" },\n  { start: 8220, end: 8221, prop: \"A\" },\n  { start: 8222, end: 8223, prop: \"N\" },\n  { start: 8224, end: 8226, prop: \"A\" },\n  { start: 8227, end: 8227, prop: \"N\" },\n  { start: 8228, end: 8231, prop: \"A\" },\n  { start: 8232, end: 8239, prop: \"N\" },\n  { start: 8240, end: 8240, prop: \"A\" },\n  { start: 8241, end: 8241, prop: \"N\" },\n  { start: 8242, end: 8243, prop: \"A\" },\n  { start: 8244, end: 8244, prop: \"N\" },\n  { start: 8245, end: 8245, prop: \"A\" },\n  { start: 8246, end: 8250, prop: \"N\" },\n  { start: 8251, end: 8251, prop: \"A\" },\n  { start: 8252, end: 8253, prop: \"N\" },\n  { start: 8254, end: 8254, prop: \"A\" },\n  { start: 8255, end: 8307, prop: \"N\" },\n  { start: 8308, end: 8308, prop: \"A\" },\n  { start: 8309, end: 8318, prop: \"N\" },\n  { start: 8319, end: 8319, prop: \"A\" },\n  { start: 8320, end: 8320, prop: \"N\" },\n  { start: 8321, end: 8324, prop: \"A\" },\n  { start: 8325, end: 8360, prop: \"N\" },\n  { start: 8361, end: 8361, prop: \"H\" },\n  { start: 8362, end: 8363, prop: \"N\" },\n  { start: 8364, end: 8364, prop: \"A\" },\n  { start: 8365, end: 8450, prop: \"N\" },\n  { start: 8451, end: 8451, prop: \"A\" },\n  { start: 8452, end: 8452, prop: \"N\" },\n  { start: 8453, end: 8453, prop: \"A\" },\n  { start: 8454, end: 8456, prop: \"N\" },\n  { start: 8457, end: 8457, prop: \"A\" },\n  { start: 8458, end: 8466, prop: \"N\" },\n  { start: 8467, end: 8467, prop: \"A\" },\n  { start: 8468, end: 8469, prop: \"N\" },\n  { start: 8470, end: 8470, prop: \"A\" },\n  { start: 8471, end: 8480, prop: \"N\" },\n  { start: 8481, end: 8482, prop: \"A\" },\n  { start: 8483, end: 8485, prop: \"N\" },\n  { start: 8486, end: 8486, prop: \"A\" },\n  { start: 8487, end: 8490, prop: \"N\" },\n  { start: 8491, end: 8491, prop: \"A\" },\n  { start: 8492, end: 8530, prop: \"N\" },\n  { start: 8531, end: 8532, prop: \"A\" },\n  { start: 8533, end: 8538, prop: \"N\" },\n  { start: 8539, end: 8542, prop: \"A\" },\n  { start: 8543, end: 8543, prop: \"N\" },\n  { start: 8544, end: 8555, prop: \"A\" },\n  { start: 8556, end: 8559, prop: \"N\" },\n  { start: 8560, end: 8569, prop: \"A\" },\n  { start: 8570, end: 8584, prop: \"N\" },\n  { start: 8585, end: 8585, prop: \"A\" },\n  { start: 8586, end: 8591, prop: \"N\" },\n  { start: 8592, end: 8601, prop: \"A\" },\n  { start: 8602, end: 8631, prop: \"N\" },\n  { start: 8632, end: 8633, prop: \"A\" },\n  { start: 8634, end: 8657, prop: \"N\" },\n  { start: 8658, end: 8658, prop: \"A\" },\n  { start: 8659, end: 8659, prop: \"N\" },\n  { start: 8660, end: 8660, prop: \"A\" },\n  { start: 8661, end: 8678, prop: \"N\" },\n  { start: 8679, end: 8679, prop: \"A\" },\n  { start: 8680, end: 8703, prop: \"N\" },\n  { start: 8704, end: 8704, prop: \"A\" },\n  { start: 8705, end: 8705, prop: \"N\" },\n  { start: 8706, end: 8707, prop: \"A\" },\n  { start: 8708, end: 8710, prop: \"N\" },\n  { start: 8711, end: 8712, prop: \"A\" },\n  { start: 8713, end: 8714, prop: \"N\" },\n  { start: 8715, end: 8715, prop: \"A\" },\n  { start: 8716, end: 8718, prop: \"N\" },\n  { start: 8719, end: 8719, prop: \"A\" },\n  { start: 8720, end: 8720, prop: \"N\" },\n  { start: 8721, end: 8721, prop: \"A\" },\n  { start: 8722, end: 8724, prop: \"N\" },\n  { start: 8725, end: 8725, prop: \"A\" },\n  { start: 8726, end: 8729, prop: \"N\" },\n  { start: 8730, end: 8730, prop: \"A\" },\n  { start: 8731, end: 8732, prop: \"N\" },\n  { start: 8733, end: 8736, prop: \"A\" },\n  { start: 8737, end: 8738, prop: \"N\" },\n  { start: 8739, end: 8739, prop: \"A\" },\n  { start: 8740, end: 8740, prop: \"N\" },\n  { start: 8741, end: 8741, prop: \"A\" },\n  { start: 8742, end: 8742, prop: \"N\" },\n  { start: 8743, end: 8748, prop: \"A\" },\n  { start: 8749, end: 8749, prop: \"N\" },\n  { start: 8750, end: 8750, prop: \"A\" },\n  { start: 8751, end: 8755, prop: \"N\" },\n  { start: 8756, end: 8759, prop: \"A\" },\n  { start: 8760, end: 8763, prop: \"N\" },\n  { start: 8764, end: 8765, prop: \"A\" },\n  { start: 8766, end: 8775, prop: \"N\" },\n  { start: 8776, end: 8776, prop: \"A\" },\n  { start: 8777, end: 8779, prop: \"N\" },\n  { start: 8780, end: 8780, prop: \"A\" },\n  { start: 8781, end: 8785, prop: \"N\" },\n  { start: 8786, end: 8786, prop: \"A\" },\n  { start: 8787, end: 8799, prop: \"N\" },\n  { start: 8800, end: 8801, prop: \"A\" },\n  { start: 8802, end: 8803, prop: \"N\" },\n  { start: 8804, end: 8807, prop: \"A\" },\n  { start: 8808, end: 8809, prop: \"N\" },\n  { start: 8810, end: 8811, prop: \"A\" },\n  { start: 8812, end: 8813, prop: \"N\" },\n  { start: 8814, end: 8815, prop: \"A\" },\n  { start: 8816, end: 8833, prop: \"N\" },\n  { start: 8834, end: 8835, prop: \"A\" },\n  { start: 8836, end: 8837, prop: \"N\" },\n  { start: 8838, end: 8839, prop: \"A\" },\n  { start: 8840, end: 8852, prop: \"N\" },\n  { start: 8853, end: 8853, prop: \"A\" },\n  { start: 8854, end: 8856, prop: \"N\" },\n  { start: 8857, end: 8857, prop: \"A\" },\n  { start: 8858, end: 8868, prop: \"N\" },\n  { start: 8869, end: 8869, prop: \"A\" },\n  { start: 8870, end: 8894, prop: \"N\" },\n  { start: 8895, end: 8895, prop: \"A\" },\n  { start: 8896, end: 8977, prop: \"N\" },\n  { start: 8978, end: 8978, prop: \"A\" },\n  { start: 8979, end: 8985, prop: \"N\" },\n  { start: 8986, end: 8987, prop: \"W\" },\n  { start: 8988, end: 9000, prop: \"N\" },\n  { start: 9001, end: 9002, prop: \"W\" },\n  { start: 9003, end: 9192, prop: \"N\" },\n  { start: 9193, end: 9196, prop: \"W\" },\n  { start: 9197, end: 9199, prop: \"N\" },\n  { start: 9200, end: 9200, prop: \"W\" },\n  { start: 9201, end: 9202, prop: \"N\" },\n  { start: 9203, end: 9203, prop: \"W\" },\n  { start: 9204, end: 9311, prop: \"N\" },\n  { start: 9312, end: 9449, prop: \"A\" },\n  { start: 9450, end: 9450, prop: \"N\" },\n  { start: 9451, end: 9547, prop: \"A\" },\n  { start: 9548, end: 9551, prop: \"N\" },\n  { start: 9552, end: 9587, prop: \"A\" },\n  { start: 9588, end: 9599, prop: \"N\" },\n  { start: 9600, end: 9615, prop: \"A\" },\n  { start: 9616, end: 9617, prop: \"N\" },\n  { start: 9618, end: 9621, prop: \"A\" },\n  { start: 9622, end: 9631, prop: \"N\" },\n  { start: 9632, end: 9633, prop: \"A\" },\n  { start: 9634, end: 9634, prop: \"N\" },\n  { start: 9635, end: 9641, prop: \"A\" },\n  { start: 9642, end: 9649, prop: \"N\" },\n  { start: 9650, end: 9651, prop: \"A\" },\n  { start: 9652, end: 9653, prop: \"N\" },\n  { start: 9654, end: 9655, prop: \"A\" },\n  { start: 9656, end: 9659, prop: \"N\" },\n  { start: 9660, end: 9661, prop: \"A\" },\n  { start: 9662, end: 9663, prop: \"N\" },\n  { start: 9664, end: 9665, prop: \"A\" },\n  { start: 9666, end: 9669, prop: \"N\" },\n  { start: 9670, end: 9672, prop: \"A\" },\n  { start: 9673, end: 9674, prop: \"N\" },\n  { start: 9675, end: 9675, prop: \"A\" },\n  { start: 9676, end: 9677, prop: \"N\" },\n  { start: 9678, end: 9681, prop: \"A\" },\n  { start: 9682, end: 9697, prop: \"N\" },\n  { start: 9698, end: 9701, prop: \"A\" },\n  { start: 9702, end: 9710, prop: \"N\" },\n  { start: 9711, end: 9711, prop: \"A\" },\n  { start: 9712, end: 9724, prop: \"N\" },\n  { start: 9725, end: 9726, prop: \"W\" },\n  { start: 9727, end: 9732, prop: \"N\" },\n  { start: 9733, end: 9734, prop: \"A\" },\n  { start: 9735, end: 9736, prop: \"N\" },\n  { start: 9737, end: 9737, prop: \"A\" },\n  { start: 9738, end: 9741, prop: \"N\" },\n  { start: 9742, end: 9743, prop: \"A\" },\n  { start: 9744, end: 9747, prop: \"N\" },\n  { start: 9748, end: 9749, prop: \"W\" },\n  { start: 9750, end: 9755, prop: \"N\" },\n  { start: 9756, end: 9756, prop: \"A\" },\n  { start: 9757, end: 9757, prop: \"N\" },\n  { start: 9758, end: 9758, prop: \"A\" },\n  { start: 9759, end: 9791, prop: \"N\" },\n  { start: 9792, end: 9792, prop: \"A\" },\n  { start: 9793, end: 9793, prop: \"N\" },\n  { start: 9794, end: 9794, prop: \"A\" },\n  { start: 9795, end: 9799, prop: \"N\" },\n  { start: 9800, end: 9811, prop: \"W\" },\n  { start: 9812, end: 9823, prop: \"N\" },\n  { start: 9824, end: 9825, prop: \"A\" },\n  { start: 9826, end: 9826, prop: \"N\" },\n  { start: 9827, end: 9829, prop: \"A\" },\n  { start: 9830, end: 9830, prop: \"N\" },\n  { start: 9831, end: 9834, prop: \"A\" },\n  { start: 9835, end: 9835, prop: \"N\" },\n  { start: 9836, end: 9837, prop: \"A\" },\n  { start: 9838, end: 9838, prop: \"N\" },\n  { start: 9839, end: 9839, prop: \"A\" },\n  { start: 9840, end: 9854, prop: \"N\" },\n  { start: 9855, end: 9855, prop: \"W\" },\n  { start: 9856, end: 9874, prop: \"N\" },\n  { start: 9875, end: 9875, prop: \"W\" },\n  { start: 9876, end: 9885, prop: \"N\" },\n  { start: 9886, end: 9887, prop: \"A\" },\n  { start: 9888, end: 9888, prop: \"N\" },\n  { start: 9889, end: 9889, prop: \"W\" },\n  { start: 9890, end: 9897, prop: \"N\" },\n  { start: 9898, end: 9899, prop: \"W\" },\n  { start: 9900, end: 9916, prop: \"N\" },\n  { start: 9917, end: 9918, prop: \"W\" },\n  { start: 9919, end: 9919, prop: \"A\" },\n  { start: 9920, end: 9923, prop: \"N\" },\n  { start: 9924, end: 9925, prop: \"W\" },\n  { start: 9926, end: 9933, prop: \"A\" },\n  { start: 9934, end: 9934, prop: \"W\" },\n  { start: 9935, end: 9939, prop: \"A\" },\n  { start: 9940, end: 9940, prop: \"W\" },\n  { start: 9941, end: 9953, prop: \"A\" },\n  { start: 9954, end: 9954, prop: \"N\" },\n  { start: 9955, end: 9955, prop: \"A\" },\n  { start: 9956, end: 9959, prop: \"N\" },\n  { start: 9960, end: 9961, prop: \"A\" },\n  { start: 9962, end: 9962, prop: \"W\" },\n  { start: 9963, end: 9969, prop: \"A\" },\n  { start: 9970, end: 9971, prop: \"W\" },\n  { start: 9972, end: 9972, prop: \"A\" },\n  { start: 9973, end: 9973, prop: \"W\" },\n  { start: 9974, end: 9977, prop: \"A\" },\n  { start: 9978, end: 9978, prop: \"W\" },\n  { start: 9979, end: 9980, prop: \"A\" },\n  { start: 9981, end: 9981, prop: \"W\" },\n  { start: 9982, end: 9983, prop: \"A\" },\n  { start: 9984, end: 9988, prop: \"N\" },\n  { start: 9989, end: 9989, prop: \"W\" },\n  { start: 9990, end: 9993, prop: \"N\" },\n  { start: 9994, end: 9995, prop: \"W\" },\n  { start: 9996, end: 10023, prop: \"N\" },\n  { start: 10024, end: 10024, prop: \"W\" },\n  { start: 10025, end: 10044, prop: \"N\" },\n  { start: 10045, end: 10045, prop: \"A\" },\n  { start: 10046, end: 10059, prop: \"N\" },\n  { start: 10060, end: 10060, prop: \"W\" },\n  { start: 10061, end: 10061, prop: \"N\" },\n  { start: 10062, end: 10062, prop: \"W\" },\n  { start: 10063, end: 10066, prop: \"N\" },\n  { start: 10067, end: 10069, prop: \"W\" },\n  { start: 10070, end: 10070, prop: \"N\" },\n  { start: 10071, end: 10071, prop: \"W\" },\n  { start: 10072, end: 10101, prop: \"N\" },\n  { start: 10102, end: 10111, prop: \"A\" },\n  { start: 10112, end: 10132, prop: \"N\" },\n  { start: 10133, end: 10135, prop: \"W\" },\n  { start: 10136, end: 10159, prop: \"N\" },\n  { start: 10160, end: 10160, prop: \"W\" },\n  { start: 10161, end: 10174, prop: \"N\" },\n  { start: 10175, end: 10175, prop: \"W\" },\n  { start: 10176, end: 10213, prop: \"N\" },\n  { start: 10214, end: 10221, prop: \"Na\" },\n  { start: 10222, end: 10628, prop: \"N\" },\n  { start: 10629, end: 10630, prop: \"Na\" },\n  { start: 10631, end: 11034, prop: \"N\" },\n  { start: 11035, end: 11036, prop: \"W\" },\n  { start: 11037, end: 11087, prop: \"N\" },\n  { start: 11088, end: 11088, prop: \"W\" },\n  { start: 11089, end: 11092, prop: \"N\" },\n  { start: 11093, end: 11093, prop: \"W\" },\n  { start: 11094, end: 11097, prop: \"A\" },\n  { start: 11098, end: 11903, prop: \"N\" },\n  { start: 11904, end: 11929, prop: \"W\" },\n  { start: 11930, end: 11930, prop: \"N\" },\n  { start: 11931, end: 12019, prop: \"W\" },\n  { start: 12020, end: 12031, prop: \"N\" },\n  { start: 12032, end: 12245, prop: \"W\" },\n  { start: 12246, end: 12271, prop: \"N\" },\n  { start: 12272, end: 12283, prop: \"W\" },\n  { start: 12284, end: 12287, prop: \"N\" },\n  { start: 12288, end: 12288, prop: \"F\" },\n  { start: 12289, end: 12350, prop: \"W\" },\n  { start: 12351, end: 12352, prop: \"N\" },\n  { start: 12353, end: 12438, prop: \"W\" },\n  { start: 12439, end: 12440, prop: \"N\" },\n  { start: 12441, end: 12543, prop: \"W\" },\n  { start: 12544, end: 12548, prop: \"N\" },\n  { start: 12549, end: 12590, prop: \"W\" },\n  { start: 12591, end: 12592, prop: \"N\" },\n  { start: 12593, end: 12686, prop: \"W\" },\n  { start: 12687, end: 12687, prop: \"N\" },\n  { start: 12688, end: 12730, prop: \"W\" },\n  { start: 12731, end: 12735, prop: \"N\" },\n  { start: 12736, end: 12771, prop: \"W\" },\n  { start: 12772, end: 12783, prop: \"N\" },\n  { start: 12784, end: 12830, prop: \"W\" },\n  { start: 12831, end: 12831, prop: \"N\" },\n  { start: 12832, end: 12871, prop: \"W\" },\n  { start: 12872, end: 12879, prop: \"A\" },\n  { start: 12880, end: 13054, prop: \"W\" },\n  { start: 13055, end: 13055, prop: \"N\" },\n  { start: 13056, end: 19903, prop: \"W\" },\n  { start: 19904, end: 19967, prop: \"N\" },\n  { start: 19968, end: 42124, prop: \"W\" },\n  { start: 42125, end: 42127, prop: \"N\" },\n  { start: 42128, end: 42182, prop: \"W\" },\n  { start: 42183, end: 43359, prop: \"N\" },\n  { start: 43360, end: 43388, prop: \"W\" },\n  { start: 43389, end: 44031, prop: \"N\" },\n  { start: 44032, end: 55203, prop: \"W\" },\n  { start: 55204, end: 57343, prop: \"N\" },\n  { start: 57344, end: 63743, prop: \"A\" },\n  { start: 63744, end: 64255, prop: \"W\" },\n  { start: 64256, end: 65023, prop: \"N\" },\n  { start: 65024, end: 65039, prop: \"A\" },\n  { start: 65040, end: 65049, prop: \"W\" },\n  { start: 65050, end: 65071, prop: \"N\" },\n  { start: 65072, end: 65106, prop: \"W\" },\n  { start: 65107, end: 65107, prop: \"N\" },\n  { start: 65108, end: 65126, prop: \"W\" },\n  { start: 65127, end: 65127, prop: \"N\" },\n  { start: 65128, end: 65131, prop: \"W\" },\n  { start: 65132, end: 65280, prop: \"N\" },\n  { start: 65281, end: 65376, prop: \"F\" },\n  { start: 65377, end: 65470, prop: \"H\" },\n  { start: 65471, end: 65473, prop: \"N\" },\n  { start: 65474, end: 65479, prop: \"H\" },\n  { start: 65480, end: 65481, prop: \"N\" },\n  { start: 65482, end: 65487, prop: \"H\" },\n  { start: 65488, end: 65489, prop: \"N\" },\n  { start: 65490, end: 65495, prop: \"H\" },\n  { start: 65496, end: 65497, prop: \"N\" },\n  { start: 65498, end: 65500, prop: \"H\" },\n  { start: 65501, end: 65503, prop: \"N\" },\n  { start: 65504, end: 65510, prop: \"F\" },\n  { start: 65511, end: 65511, prop: \"N\" },\n  { start: 65512, end: 65518, prop: \"H\" },\n  { start: 65519, end: 65532, prop: \"N\" },\n  { start: 65533, end: 65533, prop: \"A\" },\n  { start: 65534, end: 94175, prop: \"N\" },\n  { start: 94176, end: 94177, prop: \"W\" },\n  { start: 94178, end: 94207, prop: \"N\" },\n  { start: 94208, end: 100332, prop: \"W\" },\n  { start: 100333, end: 100351, prop: \"N\" },\n  { start: 100352, end: 101106, prop: \"W\" },\n  { start: 101107, end: 110591, prop: \"N\" },\n  { start: 110592, end: 110878, prop: \"W\" },\n  { start: 110879, end: 110959, prop: \"N\" },\n  { start: 110960, end: 111355, prop: \"W\" },\n  { start: 111356, end: 126979, prop: \"N\" },\n  { start: 126980, end: 126980, prop: \"W\" },\n  { start: 126981, end: 127182, prop: \"N\" },\n  { start: 127183, end: 127183, prop: \"W\" },\n  { start: 127184, end: 127231, prop: \"N\" },\n  { start: 127232, end: 127242, prop: \"A\" },\n  { start: 127243, end: 127247, prop: \"N\" },\n  { start: 127248, end: 127277, prop: \"A\" },\n  { start: 127278, end: 127279, prop: \"N\" },\n  { start: 127280, end: 127337, prop: \"A\" },\n  { start: 127338, end: 127343, prop: \"N\" },\n  { start: 127344, end: 127373, prop: \"A\" },\n  { start: 127374, end: 127374, prop: \"W\" },\n  { start: 127375, end: 127376, prop: \"A\" },\n  { start: 127377, end: 127386, prop: \"W\" },\n  { start: 127387, end: 127404, prop: \"A\" },\n  { start: 127405, end: 127487, prop: \"N\" },\n  { start: 127488, end: 127490, prop: \"W\" },\n  { start: 127491, end: 127503, prop: \"N\" },\n  { start: 127504, end: 127547, prop: \"W\" },\n  { start: 127548, end: 127551, prop: \"N\" },\n  { start: 127552, end: 127560, prop: \"W\" },\n  { start: 127561, end: 127567, prop: \"N\" },\n  { start: 127568, end: 127569, prop: \"W\" },\n  { start: 127570, end: 127583, prop: \"N\" },\n  { start: 127584, end: 127589, prop: \"W\" },\n  { start: 127590, end: 127743, prop: \"N\" },\n  { start: 127744, end: 127776, prop: \"W\" },\n  { start: 127777, end: 127788, prop: \"N\" },\n  { start: 127789, end: 127797, prop: \"W\" },\n  { start: 127798, end: 127798, prop: \"N\" },\n  { start: 127799, end: 127868, prop: \"W\" },\n  { start: 127869, end: 127869, prop: \"N\" },\n  { start: 127870, end: 127891, prop: \"W\" },\n  { start: 127892, end: 127903, prop: \"N\" },\n  { start: 127904, end: 127946, prop: \"W\" },\n  { start: 127947, end: 127950, prop: \"N\" },\n  { start: 127951, end: 127955, prop: \"W\" },\n  { start: 127956, end: 127967, prop: \"N\" },\n  { start: 127968, end: 127984, prop: \"W\" },\n  { start: 127985, end: 127987, prop: \"N\" },\n  { start: 127988, end: 127988, prop: \"W\" },\n  { start: 127989, end: 127991, prop: \"N\" },\n  { start: 127992, end: 128062, prop: \"W\" },\n  { start: 128063, end: 128063, prop: \"N\" },\n  { start: 128064, end: 128064, prop: \"W\" },\n  { start: 128065, end: 128065, prop: \"N\" },\n  { start: 128066, end: 128252, prop: \"W\" },\n  { start: 128253, end: 128254, prop: \"N\" },\n  { start: 128255, end: 128317, prop: \"W\" },\n  { start: 128318, end: 128330, prop: \"N\" },\n  { start: 128331, end: 128334, prop: \"W\" },\n  { start: 128335, end: 128335, prop: \"N\" },\n  { start: 128336, end: 128359, prop: \"W\" },\n  { start: 128360, end: 128377, prop: \"N\" },\n  { start: 128378, end: 128378, prop: \"W\" },\n  { start: 128379, end: 128404, prop: \"N\" },\n  { start: 128405, end: 128406, prop: \"W\" },\n  { start: 128407, end: 128419, prop: \"N\" },\n  { start: 128420, end: 128420, prop: \"W\" },\n  { start: 128421, end: 128506, prop: \"N\" },\n  { start: 128507, end: 128591, prop: \"W\" },\n  { start: 128592, end: 128639, prop: \"N\" },\n  { start: 128640, end: 128709, prop: \"W\" },\n  { start: 128710, end: 128715, prop: \"N\" },\n  { start: 128716, end: 128716, prop: \"W\" },\n  { start: 128717, end: 128719, prop: \"N\" },\n  { start: 128720, end: 128722, prop: \"W\" },\n  { start: 128723, end: 128746, prop: \"N\" },\n  { start: 128747, end: 128748, prop: \"W\" },\n  { start: 128749, end: 128755, prop: \"N\" },\n  { start: 128756, end: 128760, prop: \"W\" },\n  { start: 128761, end: 129295, prop: \"N\" },\n  { start: 129296, end: 129342, prop: \"W\" },\n  { start: 129343, end: 129343, prop: \"N\" },\n  { start: 129344, end: 129356, prop: \"W\" },\n  { start: 129357, end: 129359, prop: \"N\" },\n  { start: 129360, end: 129387, prop: \"W\" },\n  { start: 129388, end: 129407, prop: \"N\" },\n  { start: 129408, end: 129431, prop: \"W\" },\n  { start: 129432, end: 129471, prop: \"N\" },\n  { start: 129472, end: 129472, prop: \"W\" },\n  { start: 129473, end: 129487, prop: \"N\" },\n  { start: 129488, end: 129510, prop: \"W\" },\n  { start: 129511, end: 131071, prop: \"N\" },\n  { start: 131072, end: 196605, prop: \"W\" },\n  { start: 196606, end: 196607, prop: \"N\" },\n  { start: 196608, end: 262141, prop: \"W\" },\n  { start: 262142, end: 917759, prop: \"N\" },\n  { start: 917760, end: 917999, prop: \"A\" },\n  { start: 918000, end: 983039, prop: \"N\" },\n  { start: 983040, end: 1048573, prop: \"A\" },\n  { start: 1048574, end: 1048575, prop: \"N\" },\n  { start: 1048576, end: 1114109, prop: \"A\" },\n  { start: 1114110, end: 1114111, prop: \"N\" }\n];\n/* END */\n\n/**\n * Returns The EAW property of a code point.\n * @private\n * @param {string} codePoint A code point\n * @return {string} The EAW property of the specified code point\n */\nfunction _getEAWOfCodePoint(codePoint) {\n  let min = 0;\n  let max = defs.length - 1;\n  while (min !== max) {\n    const i   = min + ((max - min) >> 1);\n    const def = defs[i];\n    if (codePoint < def.start) {\n      max = i - 1;\n    }\n    else if (codePoint > def.end) {\n      min = i + 1;\n    }\n    else {\n      return def.prop;\n    }\n  }\n  return defs[min].prop;\n}\n\n/**\n * Returns the EAW property of a character.\n * @param {string} str A string in which the character is contained\n * @param {number} [at = 0] The position (in code unit) of the character in the string\n * @return {string} The EAW property of the specified character\n * @example\n * import { getEAW } from \"meaw\";\n *\n * // Narrow\n * assert(getEAW(\"A\") === \"Na\");\n * // Wide\n * assert(getEAW(\"あ\") === \"W\");\n * assert(getEAW(\"安\") === \"W\");\n * assert(getEAW(\"🍣\") === \"W\");\n * // Fullwidth\n * assert(getEAW(\"Ａ\") === \"F\");\n * // Halfwidth\n * assert(getEAW(\"ｱ\") === \"H\");\n * // Ambiguous\n * assert(getEAW(\"∀\") === \"A\");\n * assert(getEAW(\"→\") === \"A\");\n * assert(getEAW(\"Ω\") === \"A\");\n * assert(getEAW(\"Я\") === \"A\");\n * // Neutral\n * assert(getEAW(\"ℵ\") === \"N\");\n *\n * // a position (in code unit) can be specified\n * assert(getEAW(\"ℵAあＡｱ∀\", 2) === \"W\");\n */\nfunction getEAW(str, at) {\n  const codePoint = str.codePointAt(at || 0);\n  return codePoint === undefined\n    ? undefined\n    : _getEAWOfCodePoint(codePoint);\n}\n\nconst defaultWidthMap = {\n  \"N\" : 1,\n  \"Na\": 1,\n  \"W\" : 2,\n  \"F\" : 2,\n  \"H\" : 1,\n  \"A\" : 1\n};\n\n/**\n * Computes width of a string based on the EAW properties of its characters.\n * By default characters with property Wide (W) or Fullwidth (F) are treated as wide (= 2)\n * and the others are as narrow (= 1)\n * @param {string} str A string to compute width\n * @param {Object<string, number> | undefined} [widthMap = undefined]\n *   An object which represents a map from an EAW property to a character width\n * @return {number} The computed width\n * @example\n * import { computeWidth } from \"meaw\";\n *\n * assert(computeWidth(\"Aあ🍣Ω\") === 6);\n * // custom widths can be specified by an object\n * assert(computeWidth(\"Aあ🍣Ω\", { \"A\": 2 }) === 7);\n */\nfunction computeWidth(str, widthMap) {\n  const map = widthMap\n    ? Object.assign({}, defaultWidthMap, widthMap)\n    : defaultWidthMap;\n  let width = 0;\n  for (const char of str) {\n    width += map[getEAW(char)];\n  }\n  return width;\n}\n\n\n//# sourceMappingURL=meaw.es.js.map\n\n\n/***/ })\n/******/ ]);\n});"
  },
  {
    "path": "static/table-editor/package.json",
    "content": "{\n  \"name\": \"mte\",\n  \"version\": \"0.0.0\",\n  \"description\": \"\",\n  \"main\": \"index.js\",\n  \"scripts\": {\n    \"build:release\": \"cross-env NODE_ENV=production webpack\",\n    \"build:debug\": \"cross-env NODE_ENV=development webpack\",\n    \"build\": \"npm run build:release\",\n    \"clean\": \"rimraf build\"\n  },\n  \"dependencies\": {\n    \"@susisu/mte-kernel\": \"^1.0.0\",\n    \"codemirror\": \"^5.31.0\"\n  },\n  \"devDependencies\": {\n    \"babel-core\": \"^6.26.0\",\n    \"babel-loader\": \"^7.1.2\",\n    \"babel-preset-env\": \"^1.6.1\",\n    \"cpx\": \"^1.5.0\",\n    \"cross-env\": \"^5.1.1\",\n    \"eslint\": \"^4.11.0\",\n    \"npm-run-all\": \"^4.1.2\",\n    \"rimraf\": \"^2.6.2\",\n    \"uglifyjs-webpack-plugin\": \"^1.1.0\",\n    \"webpack\": \"^3.8.1\"\n  }\n}\n"
  },
  {
    "path": "static/table-editor/src/main.js",
    "content": "/* global CodeMirror, $ */\nimport { TableEditor, Point, options, Alignment, FormatType } from '@susisu/mte-kernel'\n\n// port of the code from: https://github.com/susisu/mte-demo/blob/master/src/main.js\n\n// text editor interface\n// see https://doc.esdoc.org/github.com/susisu/mte-kernel/class/lib/text-editor.js~ITextEditor.html\nclass TextEditorInterface {\n  constructor (editor) {\n    this.editor = editor\n    this.doc = editor.getDoc()\n    this.transaction = false\n    this.onDidFinishTransaction = null\n  }\n\n  getCursorPosition () {\n    const { line, ch } = this.doc.getCursor()\n    return new Point(line, ch)\n  }\n\n  setCursorPosition (pos) {\n    this.doc.setCursor({ line: pos.row, ch: pos.column })\n  }\n\n  setSelectionRange (range) {\n    this.doc.setSelection(\n      { line: range.start.row, ch: range.start.column },\n      { line: range.end.row, ch: range.end.column }\n    )\n  }\n\n  getLastRow () {\n    return this.doc.lineCount() - 1\n  }\n\n  acceptsTableEdit () {\n    return true\n  }\n\n  getLine (row) {\n    return this.doc.getLine(row)\n  }\n\n  insertLine (row, line) {\n    const lastRow = this.getLastRow()\n    if (row > lastRow) {\n      const lastLine = this.getLine(lastRow)\n      this.doc.replaceRange(\n        '\\n' + line,\n        { line: lastRow, ch: lastLine.length },\n        { line: lastRow, ch: lastLine.length }\n      )\n    } else {\n      this.doc.replaceRange(\n        line + '\\n',\n        { line: row, ch: 0 },\n        { line: row, ch: 0 }\n      )\n    }\n  }\n\n  deleteLine (row) {\n    const lastRow = this.getLastRow()\n    if (row >= lastRow) {\n      if (lastRow > 0) {\n        const preLastLine = this.getLine(lastRow - 1)\n        const lastLine = this.getLine(lastRow)\n        this.doc.replaceRange(\n          '',\n          { line: lastRow - 1, ch: preLastLine.length },\n          { line: lastRow, ch: lastLine.length }\n        )\n      } else {\n        const lastLine = this.getLine(lastRow)\n        this.doc.replaceRange(\n          '',\n          { line: lastRow, ch: 0 },\n          { line: lastRow, ch: lastLine.length }\n        )\n      }\n    } else {\n      this.doc.replaceRange(\n        '',\n        { line: row, ch: 0 },\n        { line: row + 1, ch: 0 }\n      )\n    }\n  }\n\n  replaceLines (startRow, endRow, lines) {\n    const lastRow = this.getLastRow()\n    if (endRow > lastRow) {\n      const lastLine = this.getLine(lastRow)\n      this.doc.replaceRange(\n        lines.join('\\n'),\n        { line: startRow, ch: 0 },\n        { line: lastRow, ch: lastLine.length }\n      )\n    } else {\n      this.doc.replaceRange(\n        lines.join('\\n') + '\\n',\n        { line: startRow, ch: 0 },\n        { line: endRow, ch: 0 }\n      )\n    }\n  }\n\n  transact (func) {\n    this.transaction = true\n    func()\n    this.transaction = false\n    if (this.onDidFinishTransaction) {\n      this.onDidFinishTransaction.call(undefined)\n    }\n  }\n}\n\nexport function initTableEditor (editor) {\n  // create an interface to the text editor\n  const editorIntf = new TextEditorInterface(editor)\n  // create a table editor object\n  const tableEditor = new TableEditor(editorIntf)\n  // options for the table editor\n  const opts = options({\n    smartCursor: true,\n    formatType: FormatType.NORMAL\n  })\n  // keymap of the commands\n  // from https://github.com/susisu/mte-demo/blob/master/src/main.js\n  const keyMap = CodeMirror.normalizeKeyMap({\n    Tab: () => { tableEditor.nextCell(opts) },\n    'Shift-Tab': () => { tableEditor.previousCell(opts) },\n    Enter: () => { tableEditor.nextRow(opts) },\n    'Ctrl-Enter': () => { tableEditor.escape(opts) },\n    'Cmd-Enter': () => { tableEditor.escape(opts) },\n    'Shift-Ctrl-Left': () => { tableEditor.alignColumn(Alignment.LEFT, opts) },\n    'Shift-Cmd-Left': () => { tableEditor.alignColumn(Alignment.LEFT, opts) },\n    'Shift-Ctrl-Right': () => { tableEditor.alignColumn(Alignment.RIGHT, opts) },\n    'Shift-Cmd-Right': () => { tableEditor.alignColumn(Alignment.RIGHT, opts) },\n    'Shift-Ctrl-Up': () => { tableEditor.alignColumn(Alignment.CENTER, opts) },\n    'Shift-Cmd-Up': () => { tableEditor.alignColumn(Alignment.CENTER, opts) },\n    'Shift-Ctrl-Down': () => { tableEditor.alignColumn(Alignment.NONE, opts) },\n    'Shift-Cmd-Down': () => { tableEditor.alignColumn(Alignment.NONE, opts) },\n    'Ctrl-Left': () => { tableEditor.moveFocus(0, -1, opts) },\n    'Cmd-Left': () => { tableEditor.moveFocus(0, -1, opts) },\n    'Ctrl-Right': () => { tableEditor.moveFocus(0, 1, opts) },\n    'Cmd-Right': () => { tableEditor.moveFocus(0, 1, opts) },\n    'Ctrl-Up': () => { tableEditor.moveFocus(-1, 0, opts) },\n    'Cmd-Up': () => { tableEditor.moveFocus(-1, 0, opts) },\n    'Ctrl-Down': () => { tableEditor.moveFocus(1, 0, opts) },\n    'Cmd-Down': () => { tableEditor.moveFocus(1, 0, opts) },\n    'Ctrl-K Ctrl-I': () => { tableEditor.insertRow(opts) },\n    'Cmd-K Cmd-I': () => { tableEditor.insertRow(opts) },\n    'Ctrl-L Ctrl-I': () => { tableEditor.deleteRow(opts) },\n    'Cmd-L Cmd-I': () => { tableEditor.deleteRow(opts) },\n    'Ctrl-K Ctrl-J': () => { tableEditor.insertColumn(opts) },\n    'Cmd-K Cmd-J': () => { tableEditor.insertColumn(opts) },\n    'Ctrl-L Ctrl-J': () => { tableEditor.deleteColumn(opts) },\n    'Cmd-L Cmd-J': () => { tableEditor.deleteColumn(opts) },\n    'Alt-Shift-Ctrl-Left': () => { tableEditor.moveColumn(-1, opts) },\n    'Alt-Shift-Cmd-Left': () => { tableEditor.moveColumn(-1, opts) },\n    'Alt-Shift-Ctrl-Right': () => { tableEditor.moveColumn(1, opts) },\n    'Alt-Shift-Cmd-Right': () => { tableEditor.moveColumn(1, opts) },\n    'Alt-Shift-Ctrl-Up': () => { tableEditor.moveRow(-1, opts) },\n    'Alt-Shift-Cmd-Up': () => { tableEditor.moveRow(-1, opts) },\n    'Alt-Shift-Ctrl-Down': () => { tableEditor.moveRow(1, opts) },\n    'Alt-Shift-Cmd-Down': () => { tableEditor.moveRow(1, opts) }\n  })\n\n  // enable keymap if the cursor is in a table\n  function updateActiveState() {\n    const active = tableEditor.cursorIsInTable();\n    if (active) {\n      editor.setOption(\"extraKeys\", keyMap);\n    }\n    else {\n      editor.setOption(\"extraKeys\", null);\n      tableEditor.resetSmartCursor();\n    }\n  }\n  // event subscriptions\n  editor.on(\"cursorActivity\", () => {\n    if (!editorIntf.transaction) {\n      updateActiveState();\n    }\n  });\n  editor.on(\"changes\", () => {\n    if (!editorIntf.transaction) {\n      updateActiveState();\n    }\n  });\n  editorIntf.onDidFinishTransaction = () => {\n    updateActiveState();\n  };\n\n  return tableEditor\n}\n\n"
  },
  {
    "path": "static/table-editor/webpack.config.js",
    "content": "// webpack.config.js\n\nconst path = require('path');\n\nmodule.exports = {\n  entry: './src/main.js', // 库的入口文件\n  output: {\n    path: path.resolve(__dirname, 'dist'), // 输出目录\n    filename: 'index.js', // 输出文件名称\n    library: 'TableEditor', // 库的全局变量名\n    libraryTarget: 'umd', // 输出库的目标格式\n    umdNamedDefine: true // 对UMD模块进行命名定义\n  },\n  // 配置其他选项...\n};\n"
  },
  {
    "path": "static/to-markdown/dist/to-markdown.js",
    "content": "(function(f){if(typeof exports===\"object\"&&typeof module!==\"undefined\"){module.exports=f()}else if(typeof define===\"function\"&&define.amd){define([],f)}else{var g;if(typeof window!==\"undefined\"){g=window}else if(typeof global!==\"undefined\"){g=global}else if(typeof self!==\"undefined\"){g=self}else{g=this}g.toMarkdown = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require==\"function\"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error(\"Cannot find module '\"+o+\"'\");throw f.code=\"MODULE_NOT_FOUND\",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require==\"function\"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){\n/*\n * to-markdown - an HTML to Markdown converter\n *\n * Copyright 2011+, Dom Christie\n * Licenced under the MIT licence\n *\n */\n\n'use strict'\n\nvar toMarkdown\nvar converters\nvar mdConverters = require('./lib/md-converters')\nvar gfmConverters = require('./lib/gfm-converters')\nvar HtmlParser = require('./lib/html-parser')\nvar collapse = require('collapse-whitespace')\n\n/*\n * Utilities\n */\n\nvar blocks = ['address', 'article', 'aside', 'audio', 'blockquote', 'body',\n  'canvas', 'center', 'dd', 'dir', 'div', 'dl', 'dt', 'fieldset', 'figcaption',\n  'figure', 'footer', 'form', 'frameset', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6',\n  'header', 'hgroup', 'hr', 'html', 'isindex', 'li', 'main', 'menu', 'nav',\n  'noframes', 'noscript', 'ol', 'output', 'p', 'pre', 'section', 'table',\n  'tbody', 'td', 'tfoot', 'th', 'thead', 'tr', 'ul'\n]\n\nfunction isBlock (node) {\n  return blocks.indexOf(node.nodeName.toLowerCase()) !== -1\n}\n\nvar voids = [\n  'area', 'base', 'br', 'col', 'command', 'embed', 'hr', 'img', 'input',\n  'keygen', 'link', 'meta', 'param', 'source', 'track', 'wbr'\n]\n\nfunction isVoid (node) {\n  return voids.indexOf(node.nodeName.toLowerCase()) !== -1\n}\n\nfunction htmlToDom (string) {\n  var tree = new HtmlParser().parseFromString(string, 'text/html')\n  collapse(tree.documentElement, isBlock)\n  return tree\n}\n\n/*\n * Flattens DOM tree into single array\n */\n\nfunction bfsOrder (node) {\n  var inqueue = [node]\n  var outqueue = []\n  var elem\n  var children\n  var i\n\n  while (inqueue.length > 0) {\n    elem = inqueue.shift()\n    outqueue.push(elem)\n    children = elem.childNodes\n    for (i = 0; i < children.length; i++) {\n      if (children[i].nodeType === 1) inqueue.push(children[i])\n    }\n  }\n  outqueue.shift()\n  return outqueue\n}\n\n/*\n * Contructs a Markdown string of replacement text for a given node\n */\n\nfunction getContent (node) {\n  var text = ''\n  for (var i = 0; i < node.childNodes.length; i++) {\n    if (node.childNodes[i].nodeType === 1) {\n      text += node.childNodes[i]._replacement\n    } else if (node.childNodes[i].nodeType === 3) {\n      text += node.childNodes[i].data\n    } else continue\n  }\n  return text\n}\n\n/*\n * Returns the HTML string of an element with its contents converted\n */\n\nfunction outer (node, content) {\n  return node.cloneNode(false).outerHTML.replace('><', '>' + content + '<')\n}\n\nfunction canConvert (node, filter) {\n  if (typeof filter === 'string') {\n    return filter === node.nodeName.toLowerCase()\n  }\n  if (Array.isArray(filter)) {\n    return filter.indexOf(node.nodeName.toLowerCase()) !== -1\n  } else if (typeof filter === 'function') {\n    return filter.call(toMarkdown, node)\n  } else {\n    throw new TypeError('`filter` needs to be a string, array, or function')\n  }\n}\n\nfunction isFlankedByWhitespace (side, node) {\n  var sibling\n  var regExp\n  var isFlanked\n\n  if (side === 'left') {\n    sibling = node.previousSibling\n    regExp = / $/\n  } else {\n    sibling = node.nextSibling\n    regExp = /^ /\n  }\n\n  if (sibling) {\n    if (sibling.nodeType === 3) {\n      isFlanked = regExp.test(sibling.nodeValue)\n    } else if (sibling.nodeType === 1 && !isBlock(sibling)) {\n      isFlanked = regExp.test(sibling.textContent)\n    }\n  }\n  return isFlanked\n}\n\nfunction flankingWhitespace (node, content) {\n  var leading = ''\n  var trailing = ''\n\n  if (!isBlock(node)) {\n    var hasLeading = /^[ \\r\\n\\t]/.test(content)\n    var hasTrailing = /[ \\r\\n\\t]$/.test(content)\n\n    if (hasLeading && !isFlankedByWhitespace('left', node)) {\n      leading = ' '\n    }\n    if (hasTrailing && !isFlankedByWhitespace('right', node)) {\n      trailing = ' '\n    }\n  }\n\n  return { leading: leading, trailing: trailing }\n}\n\n/*\n * Finds a Markdown converter, gets the replacement, and sets it on\n * `_replacement`\n */\n\nfunction process (node) {\n  var replacement\n  var content = getContent(node)\n\n  // Remove blank nodes\n  if (!isVoid(node) && !/A|TH|TD/.test(node.nodeName) && /^\\s*$/i.test(content)) {\n    node._replacement = ''\n    return\n  }\n\n  for (var i = 0; i < converters.length; i++) {\n    var converter = converters[i]\n\n    if (canConvert(node, converter.filter)) {\n      if (typeof converter.replacement !== 'function') {\n        throw new TypeError(\n          '`replacement` needs to be a function that returns a string'\n        )\n      }\n\n      var whitespace = flankingWhitespace(node, content)\n\n      if (whitespace.leading || whitespace.trailing) {\n        content = content.trim()\n      }\n      replacement = whitespace.leading +\n        converter.replacement.call(toMarkdown, content, node) +\n        whitespace.trailing\n      break\n    }\n  }\n\n  node._replacement = replacement\n}\n\ntoMarkdown = function (input, options) {\n  options = options || {}\n\n  if (typeof input !== 'string') {\n    throw new TypeError(input + ' is not a string')\n  }\n\n  if (input === '') {\n    return ''\n  }\n\n  // Escape potential ol triggers\n  input = input.replace(/(\\d+)\\. /g, '$1\\\\. ')\n\n  var clone = htmlToDom(input).body\n  var nodes = bfsOrder(clone)\n  var output\n\n  converters = mdConverters.slice(0)\n  if (options.gfm) {\n    converters = gfmConverters.concat(converters)\n  }\n\n  if (options.converters) {\n    converters = options.converters.concat(converters)\n  }\n\n  // Process through nodes in reverse (so deepest child elements are first).\n  for (var i = nodes.length - 1; i >= 0; i--) {\n    process(nodes[i])\n  }\n  output = getContent(clone)\n\n  return output.replace(/^[\\t\\r\\n]+|[\\t\\r\\n\\s]+$/g, '')\n    .replace(/\\n\\s+\\n/g, '\\n\\n')\n    .replace(/\\n{3,}/g, '\\n\\n')\n}\n\ntoMarkdown.isBlock = isBlock\ntoMarkdown.isVoid = isVoid\ntoMarkdown.outer = outer\n\nmodule.exports = toMarkdown\n\n},{\"./lib/gfm-converters\":2,\"./lib/html-parser\":3,\"./lib/md-converters\":4,\"collapse-whitespace\":7}],2:[function(require,module,exports){\n'use strict'\n\nfunction cell (content, node) {\n  var index = Array.prototype.indexOf.call(node.parentNode.childNodes, node)\n  var prefix = ' '\n  if (index === 0) prefix = '| '\n  return prefix + content + ' |'\n}\n\nvar highlightRegEx = /highlight highlight-(\\S+)/\n\nmodule.exports = [\n  {\n    filter: 'br',\n    replacement: function () {\n      return '\\n'\n    }\n  },\n  {\n    filter: ['del', 's', 'strike'],\n    replacement: function (content) {\n      return '~~' + content + '~~'\n    }\n  },\n\n  {\n    filter: function (node) {\n      return node.type === 'checkbox' && node.parentNode.nodeName === 'LI'\n    },\n    replacement: function (content, node) {\n      return (node.checked ? '[x]' : '[ ]') + ' '\n    }\n  },\n\n  {\n    filter: ['th', 'td'],\n    replacement: function (content, node) {\n      return cell(content, node)\n    }\n  },\n\n  {\n    filter: 'tr',\n    replacement: function (content, node) {\n      var borderCells = ''\n      var alignMap = { left: ':--', right: '--:', center: ':-:' }\n\n      if (node.parentNode.nodeName === 'THEAD') {\n        for (var i = 0; i < node.childNodes.length; i++) {\n          var align = node.childNodes[i].attributes.align\n          var border = '---'\n\n          if (align) border = alignMap[align.value] || border\n\n          borderCells += cell(border, node.childNodes[i])\n        }\n      }\n      return '\\n' + content + (borderCells ? '\\n' + borderCells : '')\n    }\n  },\n\n  {\n    filter: 'table',\n    replacement: function (content) {\n      return '\\n\\n' + content + '\\n\\n'\n    }\n  },\n\n  {\n    filter: ['thead', 'tbody', 'tfoot'],\n    replacement: function (content) {\n      return content\n    }\n  },\n\n  // Fenced code blocks\n  {\n    filter: function (node) {\n      return node.nodeName === 'PRE' &&\n      node.firstChild &&\n      node.firstChild.nodeName === 'CODE'\n    },\n    replacement: function (content, node) {\n      return '\\n\\n```\\n' + node.firstChild.textContent + '\\n```\\n\\n'\n    }\n  },\n\n  // Syntax-highlighted code blocks\n  {\n    filter: function (node) {\n      return node.nodeName === 'PRE' &&\n      node.parentNode.nodeName === 'DIV' &&\n      highlightRegEx.test(node.parentNode.className)\n    },\n    replacement: function (content, node) {\n      var language = node.parentNode.className.match(highlightRegEx)[1]\n      return '\\n\\n```' + language + '\\n' + node.textContent + '\\n```\\n\\n'\n    }\n  },\n\n  {\n    filter: function (node) {\n      return node.nodeName === 'DIV' &&\n      highlightRegEx.test(node.className)\n    },\n    replacement: function (content) {\n      return '\\n\\n' + content + '\\n\\n'\n    }\n  }\n]\n\n},{}],3:[function(require,module,exports){\n/*\n * Set up window for Node.js\n */\n\nvar _window = (typeof window !== 'undefined' ? window : this)\n\n/*\n * Parsing HTML strings\n */\n\nfunction canParseHtmlNatively () {\n  var Parser = _window.DOMParser\n  var canParse = false\n\n  // Adapted from https://gist.github.com/1129031\n  // Firefox/Opera/IE throw errors on unsupported types\n  try {\n    // WebKit returns null on unsupported types\n    if (new Parser().parseFromString('', 'text/html')) {\n      canParse = true\n    }\n  } catch (e) {}\n\n  return canParse\n}\n\nfunction createHtmlParser () {\n  var Parser = function () {}\n\n  // For Node.js environments\n  if (typeof document === 'undefined') {\n    var jsdom = require('jsdom')\n    Parser.prototype.parseFromString = function (string) {\n      return jsdom.jsdom(string, {\n        features: {\n          FetchExternalResources: [],\n          ProcessExternalResources: false\n        }\n      })\n    }\n  } else {\n    if (!shouldUseActiveX()) {\n      Parser.prototype.parseFromString = function (string) {\n        var doc = document.implementation.createHTMLDocument('')\n        doc.open()\n        doc.write(string)\n        doc.close()\n        return doc\n      }\n    } else {\n      Parser.prototype.parseFromString = function (string) {\n        var doc = new window.ActiveXObject('htmlfile')\n        doc.designMode = 'on' // disable on-page scripts\n        doc.open()\n        doc.write(string)\n        doc.close()\n        return doc\n      }\n    }\n  }\n  return Parser\n}\n\nfunction shouldUseActiveX () {\n  var useActiveX = false\n\n  try {\n    document.implementation.createHTMLDocument('').open()\n  } catch (e) {\n    if (window.ActiveXObject) useActiveX = true\n  }\n\n  return useActiveX\n}\n\nmodule.exports = canParseHtmlNatively() ? _window.DOMParser : createHtmlParser()\n\n},{\"jsdom\":6}],4:[function(require,module,exports){\n'use strict'\n\nmodule.exports = [\n  {\n    filter: 'p',\n    replacement: function (content) {\n      return '\\n\\n' + content + '\\n\\n'\n    }\n  },\n\n  {\n    filter: 'br',\n    replacement: function () {\n      return '  \\n'\n    }\n  },\n\n  {\n    filter: ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'],\n    replacement: function (content, node) {\n      var hLevel = node.nodeName.charAt(1)\n      var hPrefix = ''\n      for (var i = 0; i < hLevel; i++) {\n        hPrefix += '#'\n      }\n      return '\\n\\n' + hPrefix + ' ' + content + '\\n\\n'\n    }\n  },\n\n  {\n    filter: 'hr',\n    replacement: function () {\n      return '\\n\\n* * *\\n\\n'\n    }\n  },\n\n  {\n    filter: ['em', 'i'],\n    replacement: function (content) {\n      return '_' + content + '_'\n    }\n  },\n\n  {\n    filter: ['strong', 'b'],\n    replacement: function (content) {\n      return '**' + content + '**'\n    }\n  },\n\n  // Inline code\n  {\n    filter: function (node) {\n      var hasSiblings = node.previousSibling || node.nextSibling\n      var isCodeBlock = node.parentNode.nodeName === 'PRE' && !hasSiblings\n\n      return node.nodeName === 'CODE' && !isCodeBlock\n    },\n    replacement: function (content) {\n      return '`' + content + '`'\n    }\n  },\n\n  {\n    filter: function (node) {\n      return node.nodeName === 'A' && node.getAttribute('href')\n    },\n    replacement: function (content, node) {\n      var titlePart = node.title ? ' \"' + node.title + '\"' : ''\n      return '[' + content + '](' + node.getAttribute('href') + titlePart + ')'\n    }\n  },\n\n  {\n    filter: 'img',\n    replacement: function (content, node) {\n      var alt = node.alt || ''\n      var src = node.getAttribute('src') || ''\n      var title = node.title || ''\n      var titlePart = title ? ' \"' + title + '\"' : ''\n      return src ? '![' + alt + ']' + '(' + src + titlePart + ')' : ''\n    }\n  },\n\n  // Code blocks\n  {\n    filter: function (node) {\n      return node.nodeName === 'PRE' && node.firstChild.nodeName === 'CODE'\n    },\n    replacement: function (content, node) {\n      return '\\n\\n    ' + node.firstChild.textContent.replace(/\\n/g, '\\n    ') + '\\n\\n'\n    }\n  },\n\n  {\n    filter: 'blockquote',\n    replacement: function (content) {\n      content = content.trim()\n      content = content.replace(/\\n{3,}/g, '\\n\\n')\n      content = content.replace(/^/gm, '> ')\n      return '\\n\\n' + content + '\\n\\n'\n    }\n  },\n\n  {\n    filter: 'li',\n    replacement: function (content, node) {\n      content = content.replace(/^\\s+/, '').replace(/\\n/gm, '\\n    ')\n      var prefix = '*   '\n      var parent = node.parentNode\n      var index = Array.prototype.indexOf.call(parent.children, node) + 1\n\n      prefix = /ol/i.test(parent.nodeName) ? index + '.  ' : '*   '\n      return prefix + content\n    }\n  },\n\n  {\n    filter: ['ul', 'ol'],\n    replacement: function (content, node) {\n      var strings = []\n      for (var i = 0; i < node.childNodes.length; i++) {\n        strings.push(node.childNodes[i]._replacement)\n      }\n\n      if (/li/i.test(node.parentNode.nodeName)) {\n        return '\\n' + strings.join('\\n')\n      }\n      return '\\n\\n' + strings.join('\\n') + '\\n\\n'\n    }\n  },\n\n  {\n    filter: function (node) {\n      return this.isBlock(node)\n    },\n    replacement: function (content, node) {\n      return '\\n\\n' + this.outer(node, content) + '\\n\\n'\n    }\n  },\n\n  // Anything else!\n  {\n    filter: function () {\n      return true\n    },\n    replacement: function (content, node) {\n      return this.outer(node, content)\n    }\n  }\n]\n\n},{}],5:[function(require,module,exports){\n/**\n * This file automatically generated from `build.js`.\n * Do not manually edit.\n */\n\nmodule.exports = [\n  \"address\",\n  \"article\",\n  \"aside\",\n  \"audio\",\n  \"blockquote\",\n  \"canvas\",\n  \"dd\",\n  \"div\",\n  \"dl\",\n  \"fieldset\",\n  \"figcaption\",\n  \"figure\",\n  \"footer\",\n  \"form\",\n  \"h1\",\n  \"h2\",\n  \"h3\",\n  \"h4\",\n  \"h5\",\n  \"h6\",\n  \"header\",\n  \"hgroup\",\n  \"hr\",\n  \"main\",\n  \"nav\",\n  \"noscript\",\n  \"ol\",\n  \"output\",\n  \"p\",\n  \"pre\",\n  \"section\",\n  \"table\",\n  \"tfoot\",\n  \"ul\",\n  \"video\"\n];\n\n},{}],6:[function(require,module,exports){\n\n},{}],7:[function(require,module,exports){\n'use strict';\n\nvar voidElements = require('void-elements');\nObject.keys(voidElements).forEach(function (name) {\n  voidElements[name.toUpperCase()] = 1;\n});\n\nvar blockElements = {};\nrequire('block-elements').forEach(function (name) {\n  blockElements[name.toUpperCase()] = 1;\n});\n\n/**\n * isBlockElem(node) determines if the given node is a block element.\n *\n * @param {Node} node\n * @return {Boolean}\n */\nfunction isBlockElem(node) {\n  return !!(node && blockElements[node.nodeName]);\n}\n\n/**\n * isVoid(node) determines if the given node is a void element.\n *\n * @param {Node} node\n * @return {Boolean}\n */\nfunction isVoid(node) {\n  return !!(node && voidElements[node.nodeName]);\n}\n\n/**\n * whitespace(elem [, isBlock]) removes extraneous whitespace from an\n * the given element. The function isBlock may optionally be passed in\n * to determine whether or not an element is a block element; if none\n * is provided, defaults to using the list of block elements provided\n * by the `block-elements` module.\n *\n * @param {Node} elem\n * @param {Function} blockTest\n */\nfunction collapseWhitespace(elem, isBlock) {\n  if (!elem.firstChild || elem.nodeName === 'PRE') return;\n\n  if (typeof isBlock !== 'function') {\n    isBlock = isBlockElem;\n  }\n\n  var prevText = null;\n  var prevVoid = false;\n\n  var prev = null;\n  var node = next(prev, elem);\n\n  while (node !== elem) {\n    if (node.nodeType === 3) {\n      // Node.TEXT_NODE\n      var text = node.data.replace(/[ \\r\\n\\t]+/g, ' ');\n\n      if ((!prevText || / $/.test(prevText.data)) && !prevVoid && text[0] === ' ') {\n        text = text.substr(1);\n      }\n\n      // `text` might be empty at this point.\n      if (!text) {\n        node = remove(node);\n        continue;\n      }\n\n      node.data = text;\n      prevText = node;\n    } else if (node.nodeType === 1) {\n      // Node.ELEMENT_NODE\n      if (isBlock(node) || node.nodeName === 'BR') {\n        if (prevText) {\n          prevText.data = prevText.data.replace(/ $/, '');\n        }\n\n        prevText = null;\n        prevVoid = false;\n      } else if (isVoid(node)) {\n        // Avoid trimming space around non-block, non-BR void elements.\n        prevText = null;\n        prevVoid = true;\n      }\n    } else {\n      node = remove(node);\n      continue;\n    }\n\n    var nextNode = next(prev, node);\n    prev = node;\n    node = nextNode;\n  }\n\n  if (prevText) {\n    prevText.data = prevText.data.replace(/ $/, '');\n    if (!prevText.data) {\n      remove(prevText);\n    }\n  }\n}\n\n/**\n * remove(node) removes the given node from the DOM and returns the\n * next node in the sequence.\n *\n * @param {Node} node\n * @return {Node} node\n */\nfunction remove(node) {\n  var next = node.nextSibling || node.parentNode;\n\n  node.parentNode.removeChild(node);\n\n  return next;\n}\n\n/**\n * next(prev, current) returns the next node in the sequence, given the\n * current and previous nodes.\n *\n * @param {Node} prev\n * @param {Node} current\n * @return {Node}\n */\nfunction next(prev, current) {\n  if (prev && prev.parentNode === current || current.nodeName === 'PRE') {\n    return current.nextSibling || current.parentNode;\n  }\n\n  return current.firstChild || current.nextSibling || current.parentNode;\n}\n\nmodule.exports = collapseWhitespace;\n\n},{\"block-elements\":5,\"void-elements\":8}],8:[function(require,module,exports){\n/**\n * This file automatically generated from `pre-publish.js`.\n * Do not manually edit.\n */\n\nmodule.exports = {\n  \"area\": true,\n  \"base\": true,\n  \"br\": true,\n  \"col\": true,\n  \"embed\": true,\n  \"hr\": true,\n  \"img\": true,\n  \"input\": true,\n  \"keygen\": true,\n  \"link\": true,\n  \"menuitem\": true,\n  \"meta\": true,\n  \"param\": true,\n  \"source\": true,\n  \"track\": true,\n  \"wbr\": true\n};\n\n},{}]},{},[1])(1)\n});"
  },
  {
    "path": "static/to-markdown/lib/gfm-converters.js",
    "content": "'use strict'\n\nfunction cell (content, node) {\n  var index = Array.prototype.indexOf.call(node.parentNode.childNodes, node)\n  var prefix = ' '\n  if (index === 0) prefix = '| '\n  return prefix + content + ' |'\n}\n\nvar highlightRegEx = /highlight highlight-(\\S+)/\n\nmodule.exports = [\n  {\n    filter: 'br',\n    replacement: function () {\n      return '\\n'\n    }\n  },\n  {\n    filter: ['del', 's', 'strike'],\n    replacement: function (content) {\n      return '~~' + content + '~~'\n    }\n  },\n\n  {\n    filter: function (node) {\n      return node.type === 'checkbox' && node.parentNode.nodeName === 'LI'\n    },\n    replacement: function (content, node) {\n      return (node.checked ? '[x]' : '[ ]') + ' '\n    }\n  },\n\n  {\n    filter: ['th', 'td'],\n    replacement: function (content, node) {\n      return cell(content, node)\n    }\n  },\n\n  {\n    filter: 'tr',\n    replacement: function (content, node) {\n      var borderCells = ''\n      var alignMap = { left: ':--', right: '--:', center: ':-:' }\n\n      if (node.parentNode.nodeName === 'THEAD') {\n        for (var i = 0; i < node.childNodes.length; i++) {\n          var align = node.childNodes[i].attributes.align\n          var border = '---'\n\n          if (align) border = alignMap[align.value] || border\n\n          borderCells += cell(border, node.childNodes[i])\n        }\n      }\n      return '\\n' + content + (borderCells ? '\\n' + borderCells : '')\n    }\n  },\n\n  {\n    filter: 'table',\n    replacement: function (content) {\n      return '\\n\\n' + content + '\\n\\n'\n    }\n  },\n\n  {\n    filter: ['thead', 'tbody', 'tfoot'],\n    replacement: function (content) {\n      return content\n    }\n  },\n\n  // Fenced code blocks\n  {\n    filter: function (node) {\n      return node.nodeName === 'PRE' &&\n      node.firstChild &&\n      node.firstChild.nodeName === 'CODE'\n    },\n    replacement: function (content, node) {\n      return '\\n\\n```\\n' + node.firstChild.textContent + '\\n```\\n\\n'\n    }\n  },\n\n  // Syntax-highlighted code blocks\n  {\n    filter: function (node) {\n      return node.nodeName === 'PRE' &&\n      node.parentNode.nodeName === 'DIV' &&\n      highlightRegEx.test(node.parentNode.className)\n    },\n    replacement: function (content, node) {\n      var language = node.parentNode.className.match(highlightRegEx)[1]\n      return '\\n\\n```' + language + '\\n' + node.textContent + '\\n```\\n\\n'\n    }\n  },\n\n  {\n    filter: function (node) {\n      return node.nodeName === 'DIV' &&\n      highlightRegEx.test(node.className)\n    },\n    replacement: function (content) {\n      return '\\n\\n' + content + '\\n\\n'\n    }\n  }\n]\n"
  },
  {
    "path": "static/to-markdown/lib/html-parser.js",
    "content": "/*\n * Set up window for Node.js\n */\n\nvar _window = (typeof window !== 'undefined' ? window : this)\n\n/*\n * Parsing HTML strings\n */\n\nfunction canParseHtmlNatively () {\n  var Parser = _window.DOMParser\n  var canParse = false\n\n  // Adapted from https://gist.github.com/1129031\n  // Firefox/Opera/IE throw errors on unsupported types\n  try {\n    // WebKit returns null on unsupported types\n    if (new Parser().parseFromString('', 'text/html')) {\n      canParse = true\n    }\n  } catch (e) {}\n\n  return canParse\n}\n\nfunction createHtmlParser () {\n  var Parser = function () {}\n\n  // For Node.js environments\n  if (typeof document === 'undefined') {\n    var jsdom = require('jsdom')\n    Parser.prototype.parseFromString = function (string) {\n      return jsdom.jsdom(string, {\n        features: {\n          FetchExternalResources: [],\n          ProcessExternalResources: false\n        }\n      })\n    }\n  } else {\n    if (!shouldUseActiveX()) {\n      Parser.prototype.parseFromString = function (string) {\n        var doc = document.implementation.createHTMLDocument('')\n        doc.open()\n        doc.write(string)\n        doc.close()\n        return doc\n      }\n    } else {\n      Parser.prototype.parseFromString = function (string) {\n        var doc = new window.ActiveXObject('htmlfile')\n        doc.designMode = 'on' // disable on-page scripts\n        doc.open()\n        doc.write(string)\n        doc.close()\n        return doc\n      }\n    }\n  }\n  return Parser\n}\n\nfunction shouldUseActiveX () {\n  var useActiveX = false\n\n  try {\n    document.implementation.createHTMLDocument('').open()\n  } catch (e) {\n    if (window.ActiveXObject) useActiveX = true\n  }\n\n  return useActiveX\n}\n\nmodule.exports = canParseHtmlNatively() ? _window.DOMParser : createHtmlParser()\n"
  },
  {
    "path": "static/to-markdown/lib/md-converters.js",
    "content": "'use strict'\n\nmodule.exports = [\n  {\n    filter: 'p',\n    replacement: function (content) {\n      return '\\n\\n' + content + '\\n\\n'\n    }\n  },\n\n  {\n    filter: 'br',\n    replacement: function () {\n      return '  \\n'\n    }\n  },\n\n  {\n    filter: ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'],\n    replacement: function (content, node) {\n      var hLevel = node.nodeName.charAt(1)\n      var hPrefix = ''\n      for (var i = 0; i < hLevel; i++) {\n        hPrefix += '#'\n      }\n      return '\\n\\n' + hPrefix + ' ' + content + '\\n\\n'\n    }\n  },\n\n  {\n    filter: 'hr',\n    replacement: function () {\n      return '\\n\\n* * *\\n\\n'\n    }\n  },\n\n  {\n    filter: ['em', 'i'],\n    replacement: function (content) {\n      return '_' + content + '_'\n    }\n  },\n\n  {\n    filter: ['strong', 'b'],\n    replacement: function (content) {\n      return '**' + content + '**'\n    }\n  },\n\n  // Inline code\n  {\n    filter: function (node) {\n      var hasSiblings = node.previousSibling || node.nextSibling\n      var isCodeBlock = node.parentNode.nodeName === 'PRE' && !hasSiblings\n\n      return node.nodeName === 'CODE' && !isCodeBlock\n    },\n    replacement: function (content) {\n      return '`' + content + '`'\n    }\n  },\n\n  {\n    filter: function (node) {\n      return node.nodeName === 'A' && node.getAttribute('href')\n    },\n    replacement: function (content, node) {\n      var titlePart = node.title ? ' \"' + node.title + '\"' : ''\n      return '[' + content + '](' + node.getAttribute('href') + titlePart + ')'\n    }\n  },\n\n  {\n    filter: 'img',\n    replacement: function (content, node) {\n      var alt = node.alt || ''\n      var src = node.getAttribute('src') || ''\n      var title = node.title || ''\n      var titlePart = title ? ' \"' + title + '\"' : ''\n      return src ? '![' + alt + ']' + '(' + src + titlePart + ')' : ''\n    }\n  },\n\n  // Code blocks\n  {\n    filter: function (node) {\n      return node.nodeName === 'PRE' && node.firstChild.nodeName === 'CODE'\n    },\n    replacement: function (content, node) {\n      return '\\n\\n    ' + node.firstChild.textContent.replace(/\\n/g, '\\n    ') + '\\n\\n'\n    }\n  },\n\n  {\n    filter: 'blockquote',\n    replacement: function (content) {\n      content = content.trim()\n      content = content.replace(/\\n{3,}/g, '\\n\\n')\n      content = content.replace(/^/gm, '> ')\n      return '\\n\\n' + content + '\\n\\n'\n    }\n  },\n\n  {\n    filter: 'li',\n    replacement: function (content, node) {\n      content = content.replace(/^\\s+/, '').replace(/\\n/gm, '\\n    ')\n      var prefix = '*   '\n      var parent = node.parentNode\n      var index = Array.prototype.indexOf.call(parent.children, node) + 1\n\n      prefix = /ol/i.test(parent.nodeName) ? index + '.  ' : '*   '\n      return prefix + content\n    }\n  },\n\n  {\n    filter: ['ul', 'ol'],\n    replacement: function (content, node) {\n      var strings = []\n      for (var i = 0; i < node.childNodes.length; i++) {\n        strings.push(node.childNodes[i]._replacement)\n      }\n\n      if (/li/i.test(node.parentNode.nodeName)) {\n        return '\\n' + strings.join('\\n')\n      }\n      return '\\n\\n' + strings.join('\\n') + '\\n\\n'\n    }\n  },\n\n  {\n    filter: function (node) {\n      return this.isBlock(node)\n    },\n    replacement: function (content, node) {\n      return '\\n\\n' + this.outer(node, content) + '\\n\\n'\n    }\n  },\n\n  // Anything else!\n  {\n    filter: function () {\n      return true\n    },\n    replacement: function (content, node) {\n      return this.outer(node, content)\n    }\n  }\n]\n"
  },
  {
    "path": "static/turndown/turndown.js",
    "content": "var TurndownService = (function () {\n    'use strict';\n\n    function extend (destination) {\n        for (var i = 1; i < arguments.length; i++) {\n            var source = arguments[i];\n            for (var key in source) {\n                if (source.hasOwnProperty(key)) destination[key] = source[key];\n            }\n        }\n        return destination\n    }\n\n    function repeat (character, count) {\n        return Array(count + 1).join(character)\n    }\n\n    function trimLeadingNewlines (string) {\n        return string.replace(/^\\n*/, '')\n    }\n\n    function trimTrailingNewlines (string) {\n        // avoid match-at-end regexp bottleneck, see #370\n        var indexEnd = string.length;\n        while (indexEnd > 0 && string[indexEnd - 1] === '\\n') indexEnd--;\n        return string.substring(0, indexEnd)\n    }\n\n    var blockElements = [\n        'ADDRESS', 'ARTICLE', 'ASIDE', 'AUDIO', 'BLOCKQUOTE', 'BODY', 'CANVAS',\n        'CENTER', 'DD', 'DIR', 'DIV', 'DL', 'DT', 'FIELDSET', 'FIGCAPTION', 'FIGURE',\n        'FOOTER', 'FORM', 'FRAMESET', 'H1', 'H2', 'H3', 'H4', 'H5', 'H6', 'HEADER',\n        'HGROUP', 'HR', 'HTML', 'ISINDEX', 'LI', 'MAIN', 'MENU', 'NAV', 'NOFRAMES',\n        'NOSCRIPT', 'OL', 'OUTPUT', 'P', 'PRE', 'SECTION', 'TABLE', 'TBODY', 'TD',\n        'TFOOT', 'TH', 'THEAD', 'TR', 'UL'\n    ];\n\n    function isBlock (node) {\n        return is(node, blockElements)\n    }\n\n    var voidElements = [\n        'AREA', 'BASE', 'BR', 'COL', 'COMMAND', 'EMBED', 'HR', 'IMG', 'INPUT',\n        'KEYGEN', 'LINK', 'META', 'PARAM', 'SOURCE', 'TRACK', 'WBR'\n    ];\n\n    function isVoid (node) {\n        return is(node, voidElements)\n    }\n\n    function hasVoid (node) {\n        return has(node, voidElements)\n    }\n\n    var meaningfulWhenBlankElements = [\n        'A', 'TABLE', 'THEAD', 'TBODY', 'TFOOT', 'TH', 'TD', 'IFRAME', 'SCRIPT',\n        'AUDIO', 'VIDEO'\n    ];\n\n    function isMeaningfulWhenBlank (node) {\n        return is(node, meaningfulWhenBlankElements)\n    }\n\n    function hasMeaningfulWhenBlank (node) {\n        return has(node, meaningfulWhenBlankElements)\n    }\n\n    function is (node, tagNames) {\n        return tagNames.indexOf(node.nodeName) >= 0\n    }\n\n    function has (node, tagNames) {\n        return (\n            node.getElementsByTagName &&\n            tagNames.some(function (tagName) {\n                return node.getElementsByTagName(tagName).length\n            })\n        )\n    }\n\n    var rules = {};\n\n    rules.paragraph = {\n        filter: 'p',\n\n        replacement: function (content) {\n            return '\\n\\n' + content + '\\n\\n'\n        }\n    };\n\n    rules.lineBreak = {\n        filter: 'br',\n\n        replacement: function (content, node, options) {\n            return options.br + '\\n'\n        }\n    };\n\n    rules.heading = {\n        filter: ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'],\n\n        replacement: function (content, node, options) {\n            var hLevel = Number(node.nodeName.charAt(1));\n\n            if (options.headingStyle === 'setext' && hLevel < 3) {\n                var underline = repeat((hLevel === 1 ? '=' : '-'), content.length);\n                return (\n                    '\\n\\n' + content + '\\n' + underline + '\\n\\n'\n                )\n            } else {\n                return '\\n\\n' + repeat('#', hLevel) + ' ' + content + '\\n\\n'\n            }\n        }\n    };\n\n    rules.blockquote = {\n        filter: 'blockquote',\n\n        replacement: function (content) {\n            content = content.replace(/^\\n+|\\n+$/g, '');\n            content = content.replace(/^/gm, '> ');\n            return '\\n\\n' + content + '\\n\\n'\n        }\n    };\n\n    rules.list = {\n        filter: ['ul', 'ol'],\n\n        replacement: function (content, node) {\n            var parent = node.parentNode;\n            if (parent.nodeName === 'LI' && parent.lastElementChild === node) {\n                return '\\n' + content\n            } else {\n                return '\\n\\n' + content + '\\n\\n'\n            }\n        }\n    };\n\n    rules.listItem = {\n        filter: 'li',\n\n        replacement: function (content, node, options) {\n            content = content\n                .replace(/^\\n+/, '') // remove leading newlines\n                .replace(/\\n+$/, '\\n') // replace trailing newlines with just a single one\n                .replace(/\\n/gm, '\\n    '); // indent\n            var prefix = options.bulletListMarker + '   ';\n            var parent = node.parentNode;\n            if (parent.nodeName === 'OL') {\n                var start = parent.getAttribute('start');\n                var index = Array.prototype.indexOf.call(parent.children, node);\n                prefix = (start ? Number(start) + index : index + 1) + '.  ';\n            }\n            return (\n                prefix + content + (node.nextSibling && !/\\n$/.test(content) ? '\\n' : '')\n            )\n        }\n    };\n\n    rules.indentedCodeBlock = {\n        filter: function (node, options) {\n            return (\n                options.codeBlockStyle === 'indented' &&\n                node.nodeName === 'PRE' &&\n                node.firstChild &&\n                node.firstChild.nodeName === 'CODE'\n            )\n        },\n\n        replacement: function (content, node, options) {\n            return (\n                '\\n\\n    ' +\n                node.firstChild.textContent.replace(/\\n/g, '\\n    ') +\n                '\\n\\n'\n            )\n        }\n    };\n\n    rules.fencedCodeBlock = {\n        filter: function (node, options) {\n            return (\n                options.codeBlockStyle === 'fenced' &&\n                node.nodeName === 'PRE' &&\n                node.firstChild &&\n                node.firstChild.nodeName === 'CODE'\n            )\n        },\n\n        replacement: function (content, node, options) {\n            var className = node.firstChild.getAttribute('class') || '';\n            var language = (className.match(/language-(\\S+)/) || [null, ''])[1];\n            var code = node.firstChild.textContent;\n\n            var fenceChar = options.fence.charAt(0);\n            var fenceSize = 3;\n            var fenceInCodeRegex = new RegExp('^' + fenceChar + '{3,}', 'gm');\n\n            var match;\n            while ((match = fenceInCodeRegex.exec(code))) {\n                if (match[0].length >= fenceSize) {\n                    fenceSize = match[0].length + 1;\n                }\n            }\n\n            var fence = repeat(fenceChar, fenceSize);\n\n            return (\n                '\\n\\n' + fence + language + '\\n' +\n                code.replace(/\\n$/, '') +\n                '\\n' + fence + '\\n\\n'\n            )\n        }\n    };\n\n    rules.horizontalRule = {\n        filter: 'hr',\n\n        replacement: function (content, node, options) {\n            return '\\n\\n' + options.hr + '\\n\\n'\n        }\n    };\n\n    rules.inlineLink = {\n        filter: function (node, options) {\n            return (\n                options.linkStyle === 'inlined' &&\n                node.nodeName === 'A' &&\n                node.getAttribute('href')\n            )\n        },\n\n        replacement: function (content, node) {\n            var href = node.getAttribute('href');\n            if (href) href = href.replace(/([()])/g, '\\\\$1');\n            var title = cleanAttribute(node.getAttribute('title'));\n            if (title) title = ' \"' + title.replace(/\"/g, '\\\\\"') + '\"';\n            return '[' + content + '](' + href + title + ')'\n        }\n    };\n\n    rules.referenceLink = {\n        filter: function (node, options) {\n            return (\n                options.linkStyle === 'referenced' &&\n                node.nodeName === 'A' &&\n                node.getAttribute('href')\n            )\n        },\n\n        replacement: function (content, node, options) {\n            var href = node.getAttribute('href');\n            var title = cleanAttribute(node.getAttribute('title'));\n            if (title) title = ' \"' + title + '\"';\n            var replacement;\n            var reference;\n\n            switch (options.linkReferenceStyle) {\n                case 'collapsed':\n                    replacement = '[' + content + '][]';\n                    reference = '[' + content + ']: ' + href + title;\n                    break\n                case 'shortcut':\n                    replacement = '[' + content + ']';\n                    reference = '[' + content + ']: ' + href + title;\n                    break\n                default:\n                    var id = this.references.length + 1;\n                    replacement = '[' + content + '][' + id + ']';\n                    reference = '[' + id + ']: ' + href + title;\n            }\n\n            this.references.push(reference);\n            return replacement\n        },\n\n        references: [],\n\n        append: function (options) {\n            var references = '';\n            if (this.references.length) {\n                references = '\\n\\n' + this.references.join('\\n') + '\\n\\n';\n                this.references = []; // Reset references\n            }\n            return references\n        }\n    };\n\n    rules.emphasis = {\n        filter: ['em', 'i'],\n\n        replacement: function (content, node, options) {\n            if (!content.trim()) return ''\n            return options.emDelimiter + content + options.emDelimiter\n        }\n    };\n\n    rules.strong = {\n        filter: ['strong', 'b'],\n\n        replacement: function (content, node, options) {\n            if (!content.trim()) return ''\n            return options.strongDelimiter + content + options.strongDelimiter\n        }\n    };\n\n    rules.code = {\n        filter: function (node) {\n            var hasSiblings = node.previousSibling || node.nextSibling;\n            var isCodeBlock = node.parentNode.nodeName === 'PRE' && !hasSiblings;\n\n            return node.nodeName === 'CODE' && !isCodeBlock\n        },\n\n        replacement: function (content) {\n            if (!content) return ''\n            content = content.replace(/\\r?\\n|\\r/g, ' ');\n\n            var extraSpace = /^`|^ .*?[^ ].* $|`$/.test(content) ? ' ' : '';\n            var delimiter = '`';\n            var matches = content.match(/`+/gm) || [];\n            while (matches.indexOf(delimiter) !== -1) delimiter = delimiter + '`';\n\n            return delimiter + extraSpace + content + extraSpace + delimiter\n        }\n    };\n\n    rules.image = {\n        filter: 'img',\n\n        replacement: function (content, node) {\n            var alt = cleanAttribute(node.getAttribute('alt'));\n            var src = node.getAttribute('src') || '';\n            var title = cleanAttribute(node.getAttribute('title'));\n            var titlePart = title ? ' \"' + title + '\"' : '';\n            return src ? '![' + alt + ']' + '(' + src + titlePart + ')' : ''\n        }\n    };\n\n    function cleanAttribute (attribute) {\n        return attribute ? attribute.replace(/(\\n+\\s*)+/g, '\\n') : ''\n    }\n\n    /**\n     * Manages a collection of rules used to convert HTML to Markdown\n     */\n\n    function Rules (options) {\n        this.options = options;\n        this._keep = [];\n        this._remove = [];\n\n        this.blankRule = {\n            replacement: options.blankReplacement\n        };\n\n        this.keepReplacement = options.keepReplacement;\n\n        this.defaultRule = {\n            replacement: options.defaultReplacement\n        };\n\n        this.array = [];\n        for (var key in options.rules) this.array.push(options.rules[key]);\n    }\n\n    Rules.prototype = {\n        add: function (key, rule) {\n            this.array.unshift(rule);\n        },\n\n        keep: function (filter) {\n            this._keep.unshift({\n                filter: filter,\n                replacement: this.keepReplacement\n            });\n        },\n\n        remove: function (filter) {\n            this._remove.unshift({\n                filter: filter,\n                replacement: function () {\n                    return ''\n                }\n            });\n        },\n\n        forNode: function (node) {\n            if (node.isBlank) return this.blankRule\n            var rule;\n\n            if ((rule = findRule(this.array, node, this.options))) return rule\n            if ((rule = findRule(this._keep, node, this.options))) return rule\n            if ((rule = findRule(this._remove, node, this.options))) return rule\n\n            return this.defaultRule\n        },\n\n        forEach: function (fn) {\n            for (var i = 0; i < this.array.length; i++) fn(this.array[i], i);\n        }\n    };\n\n    function findRule (rules, node, options) {\n        for (var i = 0; i < rules.length; i++) {\n            var rule = rules[i];\n            if (filterValue(rule, node, options)) return rule\n        }\n        return void 0\n    }\n\n    function filterValue (rule, node, options) {\n        var filter = rule.filter;\n        if (typeof filter === 'string') {\n            if (filter === node.nodeName.toLowerCase()) return true\n        } else if (Array.isArray(filter)) {\n            if (filter.indexOf(node.nodeName.toLowerCase()) > -1) return true\n        } else if (typeof filter === 'function') {\n            if (filter.call(rule, node, options)) return true\n        } else {\n            throw new TypeError('`filter` needs to be a string, array, or function')\n        }\n    }\n\n    /**\n     * The collapseWhitespace function is adapted from collapse-whitespace\n     * by Luc Thevenard.\n     *\n     * The MIT License (MIT)\n     *\n     * Copyright (c) 2014 Luc Thevenard <lucthevenard@gmail.com>\n     *\n     * Permission is hereby granted, free of charge, to any person obtaining a copy\n     * of this software and associated documentation files (the \"Software\"), to deal\n     * in the Software without restriction, including without limitation the rights\n     * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n     * copies of the Software, and to permit persons to whom the Software is\n     * furnished to do so, subject to the following conditions:\n     *\n     * The above copyright notice and this permission notice shall be included in\n     * all copies or substantial portions of the Software.\n     *\n     * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n     * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n     * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n     * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n     * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n     * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n     * THE SOFTWARE.\n     */\n\n    /**\n     * collapseWhitespace(options) removes extraneous whitespace from an the given element.\n     *\n     * @param {Object} options\n     */\n    function collapseWhitespace (options) {\n        var element = options.element;\n        var isBlock = options.isBlock;\n        var isVoid = options.isVoid;\n        var isPre = options.isPre || function (node) {\n            return node.nodeName === 'PRE'\n        };\n\n        if (!element.firstChild || isPre(element)) return\n\n        var prevText = null;\n        var keepLeadingWs = false;\n\n        var prev = null;\n        var node = next(prev, element, isPre);\n\n        while (node !== element) {\n            if (node.nodeType === 3 || node.nodeType === 4) { // Node.TEXT_NODE or Node.CDATA_SECTION_NODE\n                var text = node.data.replace(/[ \\r\\n\\t]+/g, ' ');\n\n                if ((!prevText || / $/.test(prevText.data)) &&\n                    !keepLeadingWs && text[0] === ' ') {\n                    text = text.substr(1);\n                }\n\n                // `text` might be empty at this point.\n                if (!text) {\n                    node = remove(node);\n                    continue\n                }\n\n                node.data = text;\n\n                prevText = node;\n            } else if (node.nodeType === 1) { // Node.ELEMENT_NODE\n                if (isBlock(node) || node.nodeName === 'BR') {\n                    if (prevText) {\n                        prevText.data = prevText.data.replace(/ $/, '');\n                    }\n\n                    prevText = null;\n                    keepLeadingWs = false;\n                } else if (isVoid(node) || isPre(node)) {\n                    // Avoid trimming space around non-block, non-BR void elements and inline PRE.\n                    prevText = null;\n                    keepLeadingWs = true;\n                } else if (prevText) {\n                    // Drop protection if set previously.\n                    keepLeadingWs = false;\n                }\n            } else {\n                node = remove(node);\n                continue\n            }\n\n            var nextNode = next(prev, node, isPre);\n            prev = node;\n            node = nextNode;\n        }\n\n        if (prevText) {\n            prevText.data = prevText.data.replace(/ $/, '');\n            if (!prevText.data) {\n                remove(prevText);\n            }\n        }\n    }\n\n    /**\n     * remove(node) removes the given node from the DOM and returns the\n     * next node in the sequence.\n     *\n     * @param {Node} node\n     * @return {Node} node\n     */\n    function remove (node) {\n        var next = node.nextSibling || node.parentNode;\n\n        node.parentNode.removeChild(node);\n\n        return next\n    }\n\n    /**\n     * next(prev, current, isPre) returns the next node in the sequence, given the\n     * current and previous nodes.\n     *\n     * @param {Node} prev\n     * @param {Node} current\n     * @param {Function} isPre\n     * @return {Node}\n     */\n    function next (prev, current, isPre) {\n        if ((prev && prev.parentNode === current) || isPre(current)) {\n            return current.nextSibling || current.parentNode\n        }\n\n        return current.firstChild || current.nextSibling || current.parentNode\n    }\n\n    /*\n     * Set up window for Node.js\n     */\n\n    var root = (typeof window !== 'undefined' ? window : {});\n\n    /*\n     * Parsing HTML strings\n     */\n\n    function canParseHTMLNatively () {\n        var Parser = root.DOMParser;\n        var canParse = false;\n\n        // Adapted from https://gist.github.com/1129031\n        // Firefox/Opera/IE throw errors on unsupported types\n        try {\n            // WebKit returns null on unsupported types\n            if (new Parser().parseFromString('', 'text/html')) {\n                canParse = true;\n            }\n        } catch (e) {}\n\n        return canParse\n    }\n\n    function createHTMLParser () {\n        var Parser = function () {};\n\n        {\n            if (shouldUseActiveX()) {\n                Parser.prototype.parseFromString = function (string) {\n                    var doc = new window.ActiveXObject('htmlfile');\n                    doc.designMode = 'on'; // disable on-page scripts\n                    doc.open();\n                    doc.write(string);\n                    doc.close();\n                    return doc\n                };\n            } else {\n                Parser.prototype.parseFromString = function (string) {\n                    var doc = document.implementation.createHTMLDocument('');\n                    doc.open();\n                    doc.write(string);\n                    doc.close();\n                    return doc\n                };\n            }\n        }\n        return Parser\n    }\n\n    function shouldUseActiveX () {\n        var useActiveX = false;\n        try {\n            document.implementation.createHTMLDocument('').open();\n        } catch (e) {\n            if (root.ActiveXObject) useActiveX = true;\n        }\n        return useActiveX\n    }\n\n    var HTMLParser = canParseHTMLNatively() ? root.DOMParser : createHTMLParser();\n\n    function RootNode (input, options) {\n        var root;\n        if (typeof input === 'string') {\n            var doc = htmlParser().parseFromString(\n                // DOM parsers arrange elements in the <head> and <body>.\n                // Wrapping in a custom element ensures elements are reliably arranged in\n                // a single element.\n                '<x-turndown id=\"turndown-root\">' + input + '</x-turndown>',\n                'text/html'\n            );\n            root = doc.getElementById('turndown-root');\n        } else {\n            root = input.cloneNode(true);\n        }\n        collapseWhitespace({\n            element: root,\n            isBlock: isBlock,\n            isVoid: isVoid,\n            isPre: options.preformattedCode ? isPreOrCode : null\n        });\n\n        return root\n    }\n\n    var _htmlParser;\n    function htmlParser () {\n        _htmlParser = _htmlParser || new HTMLParser();\n        return _htmlParser\n    }\n\n    function isPreOrCode (node) {\n        return node.nodeName === 'PRE' || node.nodeName === 'CODE'\n    }\n\n    function Node (node, options) {\n        node.isBlock = isBlock(node);\n        node.isCode = node.nodeName === 'CODE' || node.parentNode.isCode;\n        node.isBlank = isBlank(node);\n        node.flankingWhitespace = flankingWhitespace(node, options);\n        return node\n    }\n\n    function isBlank (node) {\n        return (\n            !isVoid(node) &&\n            !isMeaningfulWhenBlank(node) &&\n            /^\\s*$/i.test(node.textContent) &&\n            !hasVoid(node) &&\n            !hasMeaningfulWhenBlank(node)\n        )\n    }\n\n    function flankingWhitespace (node, options) {\n        if (node.isBlock || (options.preformattedCode && node.isCode)) {\n            return { leading: '', trailing: '' }\n        }\n\n        var edges = edgeWhitespace(node.textContent);\n\n        // abandon leading ASCII WS if left-flanked by ASCII WS\n        if (edges.leadingAscii && isFlankedByWhitespace('left', node, options)) {\n            edges.leading = edges.leadingNonAscii;\n        }\n\n        // abandon trailing ASCII WS if right-flanked by ASCII WS\n        if (edges.trailingAscii && isFlankedByWhitespace('right', node, options)) {\n            edges.trailing = edges.trailingNonAscii;\n        }\n\n        return { leading: edges.leading, trailing: edges.trailing }\n    }\n\n    function edgeWhitespace (string) {\n        var m = string.match(/^(([ \\t\\r\\n]*)(\\s*))(?:(?=\\S)[\\s\\S]*\\S)?((\\s*?)([ \\t\\r\\n]*))$/);\n        return {\n            leading: m[1], // whole string for whitespace-only strings\n            leadingAscii: m[2],\n            leadingNonAscii: m[3],\n            trailing: m[4], // empty for whitespace-only strings\n            trailingNonAscii: m[5],\n            trailingAscii: m[6]\n        }\n    }\n\n    function isFlankedByWhitespace (side, node, options) {\n        var sibling;\n        var regExp;\n        var isFlanked;\n\n        if (side === 'left') {\n            sibling = node.previousSibling;\n            regExp = / $/;\n        } else {\n            sibling = node.nextSibling;\n            regExp = /^ /;\n        }\n\n        if (sibling) {\n            if (sibling.nodeType === 3) {\n                isFlanked = regExp.test(sibling.nodeValue);\n            } else if (options.preformattedCode && sibling.nodeName === 'CODE') {\n                isFlanked = false;\n            } else if (sibling.nodeType === 1 && !isBlock(sibling)) {\n                isFlanked = regExp.test(sibling.textContent);\n            }\n        }\n        return isFlanked\n    }\n\n    var reduce = Array.prototype.reduce;\n    var escapes = [\n        [/\\\\/g, '\\\\\\\\'],\n        [/\\*/g, '\\\\*'],\n        [/^-/g, '\\\\-'],\n        [/^\\+ /g, '\\\\+ '],\n        [/^(=+)/g, '\\\\$1'],\n        [/^(#{1,6}) /g, '\\\\$1 '],\n        [/`/g, '\\\\`'],\n        [/^~~~/g, '\\\\~~~'],\n        [/\\[/g, '\\\\['],\n        [/\\]/g, '\\\\]'],\n        [/^>/g, '\\\\>'],\n        [/_/g, '\\\\_'],\n        [/^(\\d+)\\. /g, '$1\\\\. ']\n    ];\n\n    function TurndownService (options) {\n        if (!(this instanceof TurndownService)) return new TurndownService(options)\n\n        var defaults = {\n            rules: rules,\n            headingStyle: 'setext',\n            hr: '* * *',\n            bulletListMarker: '*',\n            codeBlockStyle: 'indented',\n            fence: '```',\n            emDelimiter: '_',\n            strongDelimiter: '**',\n            linkStyle: 'inlined',\n            linkReferenceStyle: 'full',\n            br: '  ',\n            preformattedCode: false,\n            blankReplacement: function (content, node) {\n                return node.isBlock ? '\\n\\n' : ''\n            },\n            keepReplacement: function (content, node) {\n                return node.isBlock ? '\\n\\n' + node.outerHTML + '\\n\\n' : node.outerHTML\n            },\n            defaultReplacement: function (content, node) {\n                return node.isBlock ? '\\n\\n' + content + '\\n\\n' : content\n            }\n        };\n        this.options = extend({}, defaults, options);\n        this.rules = new Rules(this.options);\n    }\n\n    TurndownService.prototype = {\n        /**\n         * The entry point for converting a string or DOM node to Markdown\n         * @public\n         * @param {String|HTMLElement} input The string or DOM node to convert\n         * @returns A Markdown representation of the input\n         * @type String\n         */\n\n        turndown: function (input) {\n            if (!canConvert(input)) {\n                throw new TypeError(\n                    input + ' is not a string, or an element/document/fragment node.'\n                )\n            }\n\n            if (input === '') return ''\n\n            var output = process.call(this, new RootNode(input, this.options));\n            return postProcess.call(this, output)\n        },\n\n        /**\n         * Add one or more plugins\n         * @public\n         * @param {Function|Array} plugin The plugin or array of plugins to add\n         * @returns The Turndown instance for chaining\n         * @type Object\n         */\n\n        use: function (plugin) {\n            if (Array.isArray(plugin)) {\n                for (var i = 0; i < plugin.length; i++) this.use(plugin[i]);\n            } else if (typeof plugin === 'function') {\n                plugin(this);\n            } else {\n                throw new TypeError('plugin must be a Function or an Array of Functions')\n            }\n            return this\n        },\n\n        /**\n         * Adds a rule\n         * @public\n         * @param {String} key The unique key of the rule\n         * @param {Object} rule The rule\n         * @returns The Turndown instance for chaining\n         * @type Object\n         */\n\n        addRule: function (key, rule) {\n            this.rules.add(key, rule);\n            return this\n        },\n\n        /**\n         * Keep a node (as HTML) that matches the filter\n         * @public\n         * @param {String|Array|Function} filter The unique key of the rule\n         * @returns The Turndown instance for chaining\n         * @type Object\n         */\n\n        keep: function (filter) {\n            this.rules.keep(filter);\n            return this\n        },\n\n        /**\n         * Remove a node that matches the filter\n         * @public\n         * @param {String|Array|Function} filter The unique key of the rule\n         * @returns The Turndown instance for chaining\n         * @type Object\n         */\n\n        remove: function (filter) {\n            this.rules.remove(filter);\n            return this\n        },\n\n        /**\n         * Escapes Markdown syntax\n         * @public\n         * @param {String} string The string to escape\n         * @returns A string with Markdown syntax escaped\n         * @type String\n         */\n\n        escape: function (string) {\n            return escapes.reduce(function (accumulator, escape) {\n                return accumulator.replace(escape[0], escape[1])\n            }, string)\n        }\n    };\n\n    /**\n     * Reduces a DOM node down to its Markdown string equivalent\n     * @private\n     * @param {HTMLElement} parentNode The node to convert\n     * @returns A Markdown representation of the node\n     * @type String\n     */\n\n    function process (parentNode) {\n        var self = this;\n        return reduce.call(parentNode.childNodes, function (output, node) {\n            node = new Node(node, self.options);\n\n            var replacement = '';\n            if (node.nodeType === 3) {\n                replacement = node.isCode ? node.nodeValue : self.escape(node.nodeValue);\n            } else if (node.nodeType === 1) {\n                replacement = replacementForNode.call(self, node);\n            }\n\n            return join(output, replacement)\n        }, '')\n    }\n\n    /**\n     * Appends strings as each rule requires and trims the output\n     * @private\n     * @param {String} output The conversion output\n     * @returns A trimmed version of the ouput\n     * @type String\n     */\n\n    function postProcess (output) {\n        var self = this;\n        this.rules.forEach(function (rule) {\n            if (typeof rule.append === 'function') {\n                output = join(output, rule.append(self.options));\n            }\n        });\n\n        return output.replace(/^[\\t\\r\\n]+/, '').replace(/[\\t\\r\\n\\s]+$/, '')\n    }\n\n    /**\n     * Converts an element node to its Markdown equivalent\n     * @private\n     * @param {HTMLElement} node The node to convert\n     * @returns A Markdown representation of the node\n     * @type String\n     */\n\n    function replacementForNode (node) {\n        var rule = this.rules.forNode(node);\n        var content = process.call(this, node);\n        var whitespace = node.flankingWhitespace;\n        if (whitespace.leading || whitespace.trailing) content = content.trim();\n        return (\n            whitespace.leading +\n            rule.replacement(content, node, this.options) +\n            whitespace.trailing\n        )\n    }\n\n    /**\n     * Joins replacement to the current output with appropriate number of new lines\n     * @private\n     * @param {String} output The current conversion output\n     * @param {String} replacement The string to append to the output\n     * @returns Joined output\n     * @type String\n     */\n\n    function join (output, replacement) {\n        var s1 = trimTrailingNewlines(output);\n        var s2 = trimLeadingNewlines(replacement);\n        var nls = Math.max(output.length - s1.length, replacement.length - s2.length);\n        var separator = '\\n\\n'.substring(0, nls);\n\n        return s1 + separator + s2\n    }\n\n    /**\n     * Determines whether an input can be converted\n     * @private\n     * @param {String|HTMLElement} input Describe this parameter\n     * @returns Describe what it returns\n     * @type String|Object|Array|Boolean|Number\n     */\n\n    function canConvert (input) {\n        return (\n            input != null && (\n                typeof input === 'string' ||\n                (input.nodeType && (\n                    input.nodeType === 1 || input.nodeType === 9 || input.nodeType === 11\n                ))\n            )\n        )\n    }\n\n    return TurndownService;\n\n}());"
  },
  {
    "path": "static/vuejs/vue.common.js",
    "content": "/*!\n * Vue.js v2.2.6\n * (c) 2014-2017 Evan You\n * Released under the MIT License.\n */\n'use strict';\n\n/*  */\n\n/**\n * Convert a value to a string that is actually rendered.\n */\nfunction _toString (val) {\n  return val == null\n    ? ''\n    : typeof val === 'object'\n      ? JSON.stringify(val, null, 2)\n      : String(val)\n}\n\n/**\n * Convert a input value to a number for persistence.\n * If the conversion fails, return original string.\n */\nfunction toNumber (val) {\n  var n = parseFloat(val);\n  return isNaN(n) ? val : n\n}\n\n/**\n * Make a map and return a function for checking if a key\n * is in that map.\n */\nfunction makeMap (\n  str,\n  expectsLowerCase\n) {\n  var map = Object.create(null);\n  var list = str.split(',');\n  for (var i = 0; i < list.length; i++) {\n    map[list[i]] = true;\n  }\n  return expectsLowerCase\n    ? function (val) { return map[val.toLowerCase()]; }\n    : function (val) { return map[val]; }\n}\n\n/**\n * Check if a tag is a built-in tag.\n */\nvar isBuiltInTag = makeMap('slot,component', true);\n\n/**\n * Remove an item from an array\n */\nfunction remove (arr, item) {\n  if (arr.length) {\n    var index = arr.indexOf(item);\n    if (index > -1) {\n      return arr.splice(index, 1)\n    }\n  }\n}\n\n/**\n * Check whether the object has the property.\n */\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nfunction hasOwn (obj, key) {\n  return hasOwnProperty.call(obj, key)\n}\n\n/**\n * Check if value is primitive\n */\nfunction isPrimitive (value) {\n  return typeof value === 'string' || typeof value === 'number'\n}\n\n/**\n * Create a cached version of a pure function.\n */\nfunction cached (fn) {\n  var cache = Object.create(null);\n  return (function cachedFn (str) {\n    var hit = cache[str];\n    return hit || (cache[str] = fn(str))\n  })\n}\n\n/**\n * Camelize a hyphen-delimited string.\n */\nvar camelizeRE = /-(\\w)/g;\nvar camelize = cached(function (str) {\n  return str.replace(camelizeRE, function (_, c) { return c ? c.toUpperCase() : ''; })\n});\n\n/**\n * Capitalize a string.\n */\nvar capitalize = cached(function (str) {\n  return str.charAt(0).toUpperCase() + str.slice(1)\n});\n\n/**\n * Hyphenate a camelCase string.\n */\nvar hyphenateRE = /([^-])([A-Z])/g;\nvar hyphenate = cached(function (str) {\n  return str\n    .replace(hyphenateRE, '$1-$2')\n    .replace(hyphenateRE, '$1-$2')\n    .toLowerCase()\n});\n\n/**\n * Simple bind, faster than native\n */\nfunction bind (fn, ctx) {\n  function boundFn (a) {\n    var l = arguments.length;\n    return l\n      ? l > 1\n        ? fn.apply(ctx, arguments)\n        : fn.call(ctx, a)\n      : fn.call(ctx)\n  }\n  // record original fn length\n  boundFn._length = fn.length;\n  return boundFn\n}\n\n/**\n * Convert an Array-like object to a real Array.\n */\nfunction toArray (list, start) {\n  start = start || 0;\n  var i = list.length - start;\n  var ret = new Array(i);\n  while (i--) {\n    ret[i] = list[i + start];\n  }\n  return ret\n}\n\n/**\n * Mix properties into target object.\n */\nfunction extend (to, _from) {\n  for (var key in _from) {\n    to[key] = _from[key];\n  }\n  return to\n}\n\n/**\n * Quick object check - this is primarily used to tell\n * Objects from primitive values when we know the value\n * is a JSON-compliant type.\n */\nfunction isObject (obj) {\n  return obj !== null && typeof obj === 'object'\n}\n\n/**\n * Strict object type check. Only returns true\n * for plain JavaScript objects.\n */\nvar toString = Object.prototype.toString;\nvar OBJECT_STRING = '[object Object]';\nfunction isPlainObject (obj) {\n  return toString.call(obj) === OBJECT_STRING\n}\n\n/**\n * Merge an Array of Objects into a single Object.\n */\nfunction toObject (arr) {\n  var res = {};\n  for (var i = 0; i < arr.length; i++) {\n    if (arr[i]) {\n      extend(res, arr[i]);\n    }\n  }\n  return res\n}\n\n/**\n * Perform no operation.\n */\nfunction noop () {}\n\n/**\n * Always return false.\n */\nvar no = function () { return false; };\n\n/**\n * Return same value\n */\nvar identity = function (_) { return _; };\n\n/**\n * Generate a static keys string from compiler modules.\n */\nfunction genStaticKeys (modules) {\n  return modules.reduce(function (keys, m) {\n    return keys.concat(m.staticKeys || [])\n  }, []).join(',')\n}\n\n/**\n * Check if two values are loosely equal - that is,\n * if they are plain objects, do they have the same shape?\n */\nfunction looseEqual (a, b) {\n  var isObjectA = isObject(a);\n  var isObjectB = isObject(b);\n  if (isObjectA && isObjectB) {\n    try {\n      return JSON.stringify(a) === JSON.stringify(b)\n    } catch (e) {\n      // possible circular reference\n      return a === b\n    }\n  } else if (!isObjectA && !isObjectB) {\n    return String(a) === String(b)\n  } else {\n    return false\n  }\n}\n\nfunction looseIndexOf (arr, val) {\n  for (var i = 0; i < arr.length; i++) {\n    if (looseEqual(arr[i], val)) { return i }\n  }\n  return -1\n}\n\n/**\n * Ensure a function is called only once.\n */\nfunction once (fn) {\n  var called = false;\n  return function () {\n    if (!called) {\n      called = true;\n      fn();\n    }\n  }\n}\n\n/*  */\n\nvar config = {\n  /**\n   * Option merge strategies (used in core/util/options)\n   */\n  optionMergeStrategies: Object.create(null),\n\n  /**\n   * Whether to suppress warnings.\n   */\n  silent: false,\n\n  /**\n   * Show production mode tip message on boot?\n   */\n  productionTip: process.env.NODE_ENV !== 'production',\n\n  /**\n   * Whether to enable devtools\n   */\n  devtools: process.env.NODE_ENV !== 'production',\n\n  /**\n   * Whether to record perf\n   */\n  performance: false,\n\n  /**\n   * Error handler for watcher errors\n   */\n  errorHandler: null,\n\n  /**\n   * Ignore certain custom elements\n   */\n  ignoredElements: [],\n\n  /**\n   * Custom user key aliases for v-on\n   */\n  keyCodes: Object.create(null),\n\n  /**\n   * Check if a tag is reserved so that it cannot be registered as a\n   * component. This is platform-dependent and may be overwritten.\n   */\n  isReservedTag: no,\n\n  /**\n   * Check if a tag is an unknown element.\n   * Platform-dependent.\n   */\n  isUnknownElement: no,\n\n  /**\n   * Get the namespace of an element\n   */\n  getTagNamespace: noop,\n\n  /**\n   * Parse the real tag name for the specific platform.\n   */\n  parsePlatformTagName: identity,\n\n  /**\n   * Check if an attribute must be bound using property, e.g. value\n   * Platform-dependent.\n   */\n  mustUseProp: no,\n\n  /**\n   * List of asset types that a component can own.\n   */\n  _assetTypes: [\n    'component',\n    'directive',\n    'filter'\n  ],\n\n  /**\n   * List of lifecycle hooks.\n   */\n  _lifecycleHooks: [\n    'beforeCreate',\n    'created',\n    'beforeMount',\n    'mounted',\n    'beforeUpdate',\n    'updated',\n    'beforeDestroy',\n    'destroyed',\n    'activated',\n    'deactivated'\n  ],\n\n  /**\n   * Max circular updates allowed in a scheduler flush cycle.\n   */\n  _maxUpdateCount: 100\n};\n\n/*  */\n\nvar emptyObject = Object.freeze({});\n\n/**\n * Check if a string starts with $ or _\n */\nfunction isReserved (str) {\n  var c = (str + '').charCodeAt(0);\n  return c === 0x24 || c === 0x5F\n}\n\n/**\n * Define a property.\n */\nfunction def (obj, key, val, enumerable) {\n  Object.defineProperty(obj, key, {\n    value: val,\n    enumerable: !!enumerable,\n    writable: true,\n    configurable: true\n  });\n}\n\n/**\n * Parse simple path.\n */\nvar bailRE = /[^\\w.$]/;\nfunction parsePath (path) {\n  if (bailRE.test(path)) {\n    return\n  }\n  var segments = path.split('.');\n  return function (obj) {\n    for (var i = 0; i < segments.length; i++) {\n      if (!obj) { return }\n      obj = obj[segments[i]];\n    }\n    return obj\n  }\n}\n\n/*  */\n/* globals MutationObserver */\n\n// can we use __proto__?\nvar hasProto = '__proto__' in {};\n\n// Browser environment sniffing\nvar inBrowser = typeof window !== 'undefined';\nvar UA = inBrowser && window.navigator.userAgent.toLowerCase();\nvar isIE = UA && /msie|trident/.test(UA);\nvar isIE9 = UA && UA.indexOf('msie 9.0') > 0;\nvar isEdge = UA && UA.indexOf('edge/') > 0;\nvar isAndroid = UA && UA.indexOf('android') > 0;\nvar isIOS = UA && /iphone|ipad|ipod|ios/.test(UA);\nvar isChrome = UA && /chrome\\/\\d+/.test(UA) && !isEdge;\n\n// this needs to be lazy-evaled because vue may be required before\n// vue-server-renderer can set VUE_ENV\nvar _isServer;\nvar isServerRendering = function () {\n  if (_isServer === undefined) {\n    /* istanbul ignore if */\n    if (!inBrowser && typeof global !== 'undefined') {\n      // detect presence of vue-server-renderer and avoid\n      // Webpack shimming the process\n      _isServer = global['process'].env.VUE_ENV === 'server';\n    } else {\n      _isServer = false;\n    }\n  }\n  return _isServer\n};\n\n// detect devtools\nvar devtools = inBrowser && window.__VUE_DEVTOOLS_GLOBAL_HOOK__;\n\n/* istanbul ignore next */\nfunction isNative (Ctor) {\n  return /native code/.test(Ctor.toString())\n}\n\nvar hasSymbol =\n  typeof Symbol !== 'undefined' && isNative(Symbol) &&\n  typeof Reflect !== 'undefined' && isNative(Reflect.ownKeys);\n\n/**\n * Defer a task to execute it asynchronously.\n */\nvar nextTick = (function () {\n  var callbacks = [];\n  var pending = false;\n  var timerFunc;\n\n  function nextTickHandler () {\n    pending = false;\n    var copies = callbacks.slice(0);\n    callbacks.length = 0;\n    for (var i = 0; i < copies.length; i++) {\n      copies[i]();\n    }\n  }\n\n  // the nextTick behavior leverages the microtask queue, which can be accessed\n  // via either native Promise.then or MutationObserver.\n  // MutationObserver has wider support, however it is seriously bugged in\n  // UIWebView in iOS >= 9.3.3 when triggered in touch event handlers. It\n  // completely stops working after triggering a few times... so, if native\n  // Promise is available, we will use it:\n  /* istanbul ignore if */\n  if (typeof Promise !== 'undefined' && isNative(Promise)) {\n    var p = Promise.resolve();\n    var logError = function (err) { console.error(err); };\n    timerFunc = function () {\n      p.then(nextTickHandler).catch(logError);\n      // in problematic UIWebViews, Promise.then doesn't completely break, but\n      // it can get stuck in a weird state where callbacks are pushed into the\n      // microtask queue but the queue isn't being flushed, until the browser\n      // needs to do some other work, e.g. handle a timer. Therefore we can\n      // \"force\" the microtask queue to be flushed by adding an empty timer.\n      if (isIOS) { setTimeout(noop); }\n    };\n  } else if (typeof MutationObserver !== 'undefined' && (\n    isNative(MutationObserver) ||\n    // PhantomJS and iOS 7.x\n    MutationObserver.toString() === '[object MutationObserverConstructor]'\n  )) {\n    // use MutationObserver where native Promise is not available,\n    // e.g. PhantomJS IE11, iOS7, Android 4.4\n    var counter = 1;\n    var observer = new MutationObserver(nextTickHandler);\n    var textNode = document.createTextNode(String(counter));\n    observer.observe(textNode, {\n      characterData: true\n    });\n    timerFunc = function () {\n      counter = (counter + 1) % 2;\n      textNode.data = String(counter);\n    };\n  } else {\n    // fallback to setTimeout\n    /* istanbul ignore next */\n    timerFunc = function () {\n      setTimeout(nextTickHandler, 0);\n    };\n  }\n\n  return function queueNextTick (cb, ctx) {\n    var _resolve;\n    callbacks.push(function () {\n      if (cb) { cb.call(ctx); }\n      if (_resolve) { _resolve(ctx); }\n    });\n    if (!pending) {\n      pending = true;\n      timerFunc();\n    }\n    if (!cb && typeof Promise !== 'undefined') {\n      return new Promise(function (resolve) {\n        _resolve = resolve;\n      })\n    }\n  }\n})();\n\nvar _Set;\n/* istanbul ignore if */\nif (typeof Set !== 'undefined' && isNative(Set)) {\n  // use native Set when available.\n  _Set = Set;\n} else {\n  // a non-standard Set polyfill that only works with primitive keys.\n  _Set = (function () {\n    function Set () {\n      this.set = Object.create(null);\n    }\n    Set.prototype.has = function has (key) {\n      return this.set[key] === true\n    };\n    Set.prototype.add = function add (key) {\n      this.set[key] = true;\n    };\n    Set.prototype.clear = function clear () {\n      this.set = Object.create(null);\n    };\n\n    return Set;\n  }());\n}\n\nvar warn = noop;\nvar tip = noop;\nvar formatComponentName;\n\nif (process.env.NODE_ENV !== 'production') {\n  var hasConsole = typeof console !== 'undefined';\n  var classifyRE = /(?:^|[-_])(\\w)/g;\n  var classify = function (str) { return str\n    .replace(classifyRE, function (c) { return c.toUpperCase(); })\n    .replace(/[-_]/g, ''); };\n\n  warn = function (msg, vm) {\n    if (hasConsole && (!config.silent)) {\n      console.error(\"[Vue warn]: \" + msg + \" \" + (\n        vm ? formatLocation(formatComponentName(vm)) : ''\n      ));\n    }\n  };\n\n  tip = function (msg, vm) {\n    if (hasConsole && (!config.silent)) {\n      console.warn(\"[Vue tip]: \" + msg + \" \" + (\n        vm ? formatLocation(formatComponentName(vm)) : ''\n      ));\n    }\n  };\n\n  formatComponentName = function (vm, includeFile) {\n    if (vm.$root === vm) {\n      return '<Root>'\n    }\n    var name = typeof vm === 'string'\n      ? vm\n      : typeof vm === 'function' && vm.options\n        ? vm.options.name\n        : vm._isVue\n          ? vm.$options.name || vm.$options._componentTag\n          : vm.name;\n\n    var file = vm._isVue && vm.$options.__file;\n    if (!name && file) {\n      var match = file.match(/([^/\\\\]+)\\.vue$/);\n      name = match && match[1];\n    }\n\n    return (\n      (name ? (\"<\" + (classify(name)) + \">\") : \"<Anonymous>\") +\n      (file && includeFile !== false ? (\" at \" + file) : '')\n    )\n  };\n\n  var formatLocation = function (str) {\n    if (str === \"<Anonymous>\") {\n      str += \" - use the \\\"name\\\" option for better debugging messages.\";\n    }\n    return (\"\\n(found in \" + str + \")\")\n  };\n}\n\n/*  */\n\n\nvar uid$1 = 0;\n\n/**\n * A dep is an observable that can have multiple\n * directives subscribing to it.\n */\nvar Dep = function Dep () {\n  this.id = uid$1++;\n  this.subs = [];\n};\n\nDep.prototype.addSub = function addSub (sub) {\n  this.subs.push(sub);\n};\n\nDep.prototype.removeSub = function removeSub (sub) {\n  remove(this.subs, sub);\n};\n\nDep.prototype.depend = function depend () {\n  if (Dep.target) {\n    Dep.target.addDep(this);\n  }\n};\n\nDep.prototype.notify = function notify () {\n  // stabilize the subscriber list first\n  var subs = this.subs.slice();\n  for (var i = 0, l = subs.length; i < l; i++) {\n    subs[i].update();\n  }\n};\n\n// the current target watcher being evaluated.\n// this is globally unique because there could be only one\n// watcher being evaluated at any time.\nDep.target = null;\nvar targetStack = [];\n\nfunction pushTarget (_target) {\n  if (Dep.target) { targetStack.push(Dep.target); }\n  Dep.target = _target;\n}\n\nfunction popTarget () {\n  Dep.target = targetStack.pop();\n}\n\n/*\n * not type checking this file because flow doesn't play well with\n * dynamically accessing methods on Array prototype\n */\n\nvar arrayProto = Array.prototype;\nvar arrayMethods = Object.create(arrayProto);[\n  'push',\n  'pop',\n  'shift',\n  'unshift',\n  'splice',\n  'sort',\n  'reverse'\n]\n.forEach(function (method) {\n  // cache original method\n  var original = arrayProto[method];\n  def(arrayMethods, method, function mutator () {\n    var arguments$1 = arguments;\n\n    // avoid leaking arguments:\n    // http://jsperf.com/closure-with-arguments\n    var i = arguments.length;\n    var args = new Array(i);\n    while (i--) {\n      args[i] = arguments$1[i];\n    }\n    var result = original.apply(this, args);\n    var ob = this.__ob__;\n    var inserted;\n    switch (method) {\n      case 'push':\n        inserted = args;\n        break\n      case 'unshift':\n        inserted = args;\n        break\n      case 'splice':\n        inserted = args.slice(2);\n        break\n    }\n    if (inserted) { ob.observeArray(inserted); }\n    // notify change\n    ob.dep.notify();\n    return result\n  });\n});\n\n/*  */\n\nvar arrayKeys = Object.getOwnPropertyNames(arrayMethods);\n\n/**\n * By default, when a reactive property is set, the new value is\n * also converted to become reactive. However when passing down props,\n * we don't want to force conversion because the value may be a nested value\n * under a frozen data structure. Converting it would defeat the optimization.\n */\nvar observerState = {\n  shouldConvert: true,\n  isSettingProps: false\n};\n\n/**\n * Observer class that are attached to each observed\n * object. Once attached, the observer converts target\n * object's property keys into getter/setters that\n * collect dependencies and dispatches updates.\n */\nvar Observer = function Observer (value) {\n  this.value = value;\n  this.dep = new Dep();\n  this.vmCount = 0;\n  def(value, '__ob__', this);\n  if (Array.isArray(value)) {\n    var augment = hasProto\n      ? protoAugment\n      : copyAugment;\n    augment(value, arrayMethods, arrayKeys);\n    this.observeArray(value);\n  } else {\n    this.walk(value);\n  }\n};\n\n/**\n * Walk through each property and convert them into\n * getter/setters. This method should only be called when\n * value type is Object.\n */\nObserver.prototype.walk = function walk (obj) {\n  var keys = Object.keys(obj);\n  for (var i = 0; i < keys.length; i++) {\n    defineReactive$$1(obj, keys[i], obj[keys[i]]);\n  }\n};\n\n/**\n * Observe a list of Array items.\n */\nObserver.prototype.observeArray = function observeArray (items) {\n  for (var i = 0, l = items.length; i < l; i++) {\n    observe(items[i]);\n  }\n};\n\n// helpers\n\n/**\n * Augment an target Object or Array by intercepting\n * the prototype chain using __proto__\n */\nfunction protoAugment (target, src) {\n  /* eslint-disable no-proto */\n  target.__proto__ = src;\n  /* eslint-enable no-proto */\n}\n\n/**\n * Augment an target Object or Array by defining\n * hidden properties.\n */\n/* istanbul ignore next */\nfunction copyAugment (target, src, keys) {\n  for (var i = 0, l = keys.length; i < l; i++) {\n    var key = keys[i];\n    def(target, key, src[key]);\n  }\n}\n\n/**\n * Attempt to create an observer instance for a value,\n * returns the new observer if successfully observed,\n * or the existing observer if the value already has one.\n */\nfunction observe (value, asRootData) {\n  if (!isObject(value)) {\n    return\n  }\n  var ob;\n  if (hasOwn(value, '__ob__') && value.__ob__ instanceof Observer) {\n    ob = value.__ob__;\n  } else if (\n    observerState.shouldConvert &&\n    !isServerRendering() &&\n    (Array.isArray(value) || isPlainObject(value)) &&\n    Object.isExtensible(value) &&\n    !value._isVue\n  ) {\n    ob = new Observer(value);\n  }\n  if (asRootData && ob) {\n    ob.vmCount++;\n  }\n  return ob\n}\n\n/**\n * Define a reactive property on an Object.\n */\nfunction defineReactive$$1 (\n  obj,\n  key,\n  val,\n  customSetter\n) {\n  var dep = new Dep();\n\n  var property = Object.getOwnPropertyDescriptor(obj, key);\n  if (property && property.configurable === false) {\n    return\n  }\n\n  // cater for pre-defined getter/setters\n  var getter = property && property.get;\n  var setter = property && property.set;\n\n  var childOb = observe(val);\n  Object.defineProperty(obj, key, {\n    enumerable: true,\n    configurable: true,\n    get: function reactiveGetter () {\n      var value = getter ? getter.call(obj) : val;\n      if (Dep.target) {\n        dep.depend();\n        if (childOb) {\n          childOb.dep.depend();\n        }\n        if (Array.isArray(value)) {\n          dependArray(value);\n        }\n      }\n      return value\n    },\n    set: function reactiveSetter (newVal) {\n      var value = getter ? getter.call(obj) : val;\n      /* eslint-disable no-self-compare */\n      if (newVal === value || (newVal !== newVal && value !== value)) {\n        return\n      }\n      /* eslint-enable no-self-compare */\n      if (process.env.NODE_ENV !== 'production' && customSetter) {\n        customSetter();\n      }\n      if (setter) {\n        setter.call(obj, newVal);\n      } else {\n        val = newVal;\n      }\n      childOb = observe(newVal);\n      dep.notify();\n    }\n  });\n}\n\n/**\n * Set a property on an object. Adds the new property and\n * triggers change notification if the property doesn't\n * already exist.\n */\nfunction set (target, key, val) {\n  if (Array.isArray(target) && typeof key === 'number') {\n    target.length = Math.max(target.length, key);\n    target.splice(key, 1, val);\n    return val\n  }\n  if (hasOwn(target, key)) {\n    target[key] = val;\n    return val\n  }\n  var ob = (target ).__ob__;\n  if (target._isVue || (ob && ob.vmCount)) {\n    process.env.NODE_ENV !== 'production' && warn(\n      'Avoid adding reactive properties to a Vue instance or its root $data ' +\n      'at runtime - declare it upfront in the data option.'\n    );\n    return val\n  }\n  if (!ob) {\n    target[key] = val;\n    return val\n  }\n  defineReactive$$1(ob.value, key, val);\n  ob.dep.notify();\n  return val\n}\n\n/**\n * Delete a property and trigger change if necessary.\n */\nfunction del (target, key) {\n  if (Array.isArray(target) && typeof key === 'number') {\n    target.splice(key, 1);\n    return\n  }\n  var ob = (target ).__ob__;\n  if (target._isVue || (ob && ob.vmCount)) {\n    process.env.NODE_ENV !== 'production' && warn(\n      'Avoid deleting properties on a Vue instance or its root $data ' +\n      '- just set it to null.'\n    );\n    return\n  }\n  if (!hasOwn(target, key)) {\n    return\n  }\n  delete target[key];\n  if (!ob) {\n    return\n  }\n  ob.dep.notify();\n}\n\n/**\n * Collect dependencies on array elements when the array is touched, since\n * we cannot intercept array element access like property getters.\n */\nfunction dependArray (value) {\n  for (var e = (void 0), i = 0, l = value.length; i < l; i++) {\n    e = value[i];\n    e && e.__ob__ && e.__ob__.dep.depend();\n    if (Array.isArray(e)) {\n      dependArray(e);\n    }\n  }\n}\n\n/*  */\n\n/**\n * Option overwriting strategies are functions that handle\n * how to merge a parent option value and a child option\n * value into the final value.\n */\nvar strats = config.optionMergeStrategies;\n\n/**\n * Options with restrictions\n */\nif (process.env.NODE_ENV !== 'production') {\n  strats.el = strats.propsData = function (parent, child, vm, key) {\n    if (!vm) {\n      warn(\n        \"option \\\"\" + key + \"\\\" can only be used during instance \" +\n        'creation with the `new` keyword.'\n      );\n    }\n    return defaultStrat(parent, child)\n  };\n}\n\n/**\n * Helper that recursively merges two data objects together.\n */\nfunction mergeData (to, from) {\n  if (!from) { return to }\n  var key, toVal, fromVal;\n  var keys = Object.keys(from);\n  for (var i = 0; i < keys.length; i++) {\n    key = keys[i];\n    toVal = to[key];\n    fromVal = from[key];\n    if (!hasOwn(to, key)) {\n      set(to, key, fromVal);\n    } else if (isPlainObject(toVal) && isPlainObject(fromVal)) {\n      mergeData(toVal, fromVal);\n    }\n  }\n  return to\n}\n\n/**\n * Data\n */\nstrats.data = function (\n  parentVal,\n  childVal,\n  vm\n) {\n  if (!vm) {\n    // in a Vue.extend merge, both should be functions\n    if (!childVal) {\n      return parentVal\n    }\n    if (typeof childVal !== 'function') {\n      process.env.NODE_ENV !== 'production' && warn(\n        'The \"data\" option should be a function ' +\n        'that returns a per-instance value in component ' +\n        'definitions.',\n        vm\n      );\n      return parentVal\n    }\n    if (!parentVal) {\n      return childVal\n    }\n    // when parentVal & childVal are both present,\n    // we need to return a function that returns the\n    // merged result of both functions... no need to\n    // check if parentVal is a function here because\n    // it has to be a function to pass previous merges.\n    return function mergedDataFn () {\n      return mergeData(\n        childVal.call(this),\n        parentVal.call(this)\n      )\n    }\n  } else if (parentVal || childVal) {\n    return function mergedInstanceDataFn () {\n      // instance merge\n      var instanceData = typeof childVal === 'function'\n        ? childVal.call(vm)\n        : childVal;\n      var defaultData = typeof parentVal === 'function'\n        ? parentVal.call(vm)\n        : undefined;\n      if (instanceData) {\n        return mergeData(instanceData, defaultData)\n      } else {\n        return defaultData\n      }\n    }\n  }\n};\n\n/**\n * Hooks and props are merged as arrays.\n */\nfunction mergeHook (\n  parentVal,\n  childVal\n) {\n  return childVal\n    ? parentVal\n      ? parentVal.concat(childVal)\n      : Array.isArray(childVal)\n        ? childVal\n        : [childVal]\n    : parentVal\n}\n\nconfig._lifecycleHooks.forEach(function (hook) {\n  strats[hook] = mergeHook;\n});\n\n/**\n * Assets\n *\n * When a vm is present (instance creation), we need to do\n * a three-way merge between constructor options, instance\n * options and parent options.\n */\nfunction mergeAssets (parentVal, childVal) {\n  var res = Object.create(parentVal || null);\n  return childVal\n    ? extend(res, childVal)\n    : res\n}\n\nconfig._assetTypes.forEach(function (type) {\n  strats[type + 's'] = mergeAssets;\n});\n\n/**\n * Watchers.\n *\n * Watchers hashes should not overwrite one\n * another, so we merge them as arrays.\n */\nstrats.watch = function (parentVal, childVal) {\n  /* istanbul ignore if */\n  if (!childVal) { return Object.create(parentVal || null) }\n  if (!parentVal) { return childVal }\n  var ret = {};\n  extend(ret, parentVal);\n  for (var key in childVal) {\n    var parent = ret[key];\n    var child = childVal[key];\n    if (parent && !Array.isArray(parent)) {\n      parent = [parent];\n    }\n    ret[key] = parent\n      ? parent.concat(child)\n      : [child];\n  }\n  return ret\n};\n\n/**\n * Other object hashes.\n */\nstrats.props =\nstrats.methods =\nstrats.computed = function (parentVal, childVal) {\n  if (!childVal) { return Object.create(parentVal || null) }\n  if (!parentVal) { return childVal }\n  var ret = Object.create(null);\n  extend(ret, parentVal);\n  extend(ret, childVal);\n  return ret\n};\n\n/**\n * Default strategy.\n */\nvar defaultStrat = function (parentVal, childVal) {\n  return childVal === undefined\n    ? parentVal\n    : childVal\n};\n\n/**\n * Validate component names\n */\nfunction checkComponents (options) {\n  for (var key in options.components) {\n    var lower = key.toLowerCase();\n    if (isBuiltInTag(lower) || config.isReservedTag(lower)) {\n      warn(\n        'Do not use built-in or reserved HTML elements as component ' +\n        'id: ' + key\n      );\n    }\n  }\n}\n\n/**\n * Ensure all props option syntax are normalized into the\n * Object-based format.\n */\nfunction normalizeProps (options) {\n  var props = options.props;\n  if (!props) { return }\n  var res = {};\n  var i, val, name;\n  if (Array.isArray(props)) {\n    i = props.length;\n    while (i--) {\n      val = props[i];\n      if (typeof val === 'string') {\n        name = camelize(val);\n        res[name] = { type: null };\n      } else if (process.env.NODE_ENV !== 'production') {\n        warn('props must be strings when using array syntax.');\n      }\n    }\n  } else if (isPlainObject(props)) {\n    for (var key in props) {\n      val = props[key];\n      name = camelize(key);\n      res[name] = isPlainObject(val)\n        ? val\n        : { type: val };\n    }\n  }\n  options.props = res;\n}\n\n/**\n * Normalize raw function directives into object format.\n */\nfunction normalizeDirectives (options) {\n  var dirs = options.directives;\n  if (dirs) {\n    for (var key in dirs) {\n      var def = dirs[key];\n      if (typeof def === 'function') {\n        dirs[key] = { bind: def, update: def };\n      }\n    }\n  }\n}\n\n/**\n * Merge two option objects into a new one.\n * Core utility used in both instantiation and inheritance.\n */\nfunction mergeOptions (\n  parent,\n  child,\n  vm\n) {\n  if (process.env.NODE_ENV !== 'production') {\n    checkComponents(child);\n  }\n  normalizeProps(child);\n  normalizeDirectives(child);\n  var extendsFrom = child.extends;\n  if (extendsFrom) {\n    parent = typeof extendsFrom === 'function'\n      ? mergeOptions(parent, extendsFrom.options, vm)\n      : mergeOptions(parent, extendsFrom, vm);\n  }\n  if (child.mixins) {\n    for (var i = 0, l = child.mixins.length; i < l; i++) {\n      var mixin = child.mixins[i];\n      if (mixin.prototype instanceof Vue$3) {\n        mixin = mixin.options;\n      }\n      parent = mergeOptions(parent, mixin, vm);\n    }\n  }\n  var options = {};\n  var key;\n  for (key in parent) {\n    mergeField(key);\n  }\n  for (key in child) {\n    if (!hasOwn(parent, key)) {\n      mergeField(key);\n    }\n  }\n  function mergeField (key) {\n    var strat = strats[key] || defaultStrat;\n    options[key] = strat(parent[key], child[key], vm, key);\n  }\n  return options\n}\n\n/**\n * Resolve an asset.\n * This function is used because child instances need access\n * to assets defined in its ancestor chain.\n */\nfunction resolveAsset (\n  options,\n  type,\n  id,\n  warnMissing\n) {\n  /* istanbul ignore if */\n  if (typeof id !== 'string') {\n    return\n  }\n  var assets = options[type];\n  // check local registration variations first\n  if (hasOwn(assets, id)) { return assets[id] }\n  var camelizedId = camelize(id);\n  if (hasOwn(assets, camelizedId)) { return assets[camelizedId] }\n  var PascalCaseId = capitalize(camelizedId);\n  if (hasOwn(assets, PascalCaseId)) { return assets[PascalCaseId] }\n  // fallback to prototype chain\n  var res = assets[id] || assets[camelizedId] || assets[PascalCaseId];\n  if (process.env.NODE_ENV !== 'production' && warnMissing && !res) {\n    warn(\n      'Failed to resolve ' + type.slice(0, -1) + ': ' + id,\n      options\n    );\n  }\n  return res\n}\n\n/*  */\n\nfunction validateProp (\n  key,\n  propOptions,\n  propsData,\n  vm\n) {\n  var prop = propOptions[key];\n  var absent = !hasOwn(propsData, key);\n  var value = propsData[key];\n  // handle boolean props\n  if (isType(Boolean, prop.type)) {\n    if (absent && !hasOwn(prop, 'default')) {\n      value = false;\n    } else if (!isType(String, prop.type) && (value === '' || value === hyphenate(key))) {\n      value = true;\n    }\n  }\n  // check default value\n  if (value === undefined) {\n    value = getPropDefaultValue(vm, prop, key);\n    // since the default value is a fresh copy,\n    // make sure to observe it.\n    var prevShouldConvert = observerState.shouldConvert;\n    observerState.shouldConvert = true;\n    observe(value);\n    observerState.shouldConvert = prevShouldConvert;\n  }\n  if (process.env.NODE_ENV !== 'production') {\n    assertProp(prop, key, value, vm, absent);\n  }\n  return value\n}\n\n/**\n * Get the default value of a prop.\n */\nfunction getPropDefaultValue (vm, prop, key) {\n  // no default, return undefined\n  if (!hasOwn(prop, 'default')) {\n    return undefined\n  }\n  var def = prop.default;\n  // warn against non-factory defaults for Object & Array\n  if (process.env.NODE_ENV !== 'production' && isObject(def)) {\n    warn(\n      'Invalid default value for prop \"' + key + '\": ' +\n      'Props with type Object/Array must use a factory function ' +\n      'to return the default value.',\n      vm\n    );\n  }\n  // the raw prop value was also undefined from previous render,\n  // return previous default value to avoid unnecessary watcher trigger\n  if (vm && vm.$options.propsData &&\n    vm.$options.propsData[key] === undefined &&\n    vm._props[key] !== undefined) {\n    return vm._props[key]\n  }\n  // call factory function for non-Function types\n  // a value is Function if its prototype is function even across different execution context\n  return typeof def === 'function' && getType(prop.type) !== 'Function'\n    ? def.call(vm)\n    : def\n}\n\n/**\n * Assert whether a prop is valid.\n */\nfunction assertProp (\n  prop,\n  name,\n  value,\n  vm,\n  absent\n) {\n  if (prop.required && absent) {\n    warn(\n      'Missing required prop: \"' + name + '\"',\n      vm\n    );\n    return\n  }\n  if (value == null && !prop.required) {\n    return\n  }\n  var type = prop.type;\n  var valid = !type || type === true;\n  var expectedTypes = [];\n  if (type) {\n    if (!Array.isArray(type)) {\n      type = [type];\n    }\n    for (var i = 0; i < type.length && !valid; i++) {\n      var assertedType = assertType(value, type[i]);\n      expectedTypes.push(assertedType.expectedType || '');\n      valid = assertedType.valid;\n    }\n  }\n  if (!valid) {\n    warn(\n      'Invalid prop: type check failed for prop \"' + name + '\".' +\n      ' Expected ' + expectedTypes.map(capitalize).join(', ') +\n      ', got ' + Object.prototype.toString.call(value).slice(8, -1) + '.',\n      vm\n    );\n    return\n  }\n  var validator = prop.validator;\n  if (validator) {\n    if (!validator(value)) {\n      warn(\n        'Invalid prop: custom validator check failed for prop \"' + name + '\".',\n        vm\n      );\n    }\n  }\n}\n\n/**\n * Assert the type of a value\n */\nfunction assertType (value, type) {\n  var valid;\n  var expectedType = getType(type);\n  if (expectedType === 'String') {\n    valid = typeof value === (expectedType = 'string');\n  } else if (expectedType === 'Number') {\n    valid = typeof value === (expectedType = 'number');\n  } else if (expectedType === 'Boolean') {\n    valid = typeof value === (expectedType = 'boolean');\n  } else if (expectedType === 'Function') {\n    valid = typeof value === (expectedType = 'function');\n  } else if (expectedType === 'Object') {\n    valid = isPlainObject(value);\n  } else if (expectedType === 'Array') {\n    valid = Array.isArray(value);\n  } else {\n    valid = value instanceof type;\n  }\n  return {\n    valid: valid,\n    expectedType: expectedType\n  }\n}\n\n/**\n * Use function string name to check built-in types,\n * because a simple equality check will fail when running\n * across different vms / iframes.\n */\nfunction getType (fn) {\n  var match = fn && fn.toString().match(/^\\s*function (\\w+)/);\n  return match && match[1]\n}\n\nfunction isType (type, fn) {\n  if (!Array.isArray(fn)) {\n    return getType(fn) === getType(type)\n  }\n  for (var i = 0, len = fn.length; i < len; i++) {\n    if (getType(fn[i]) === getType(type)) {\n      return true\n    }\n  }\n  /* istanbul ignore next */\n  return false\n}\n\nfunction handleError (err, vm, info) {\n  if (config.errorHandler) {\n    config.errorHandler.call(null, err, vm, info);\n  } else {\n    if (process.env.NODE_ENV !== 'production') {\n      warn((\"Error in \" + info + \":\"), vm);\n    }\n    /* istanbul ignore else */\n    if (inBrowser && typeof console !== 'undefined') {\n      console.error(err);\n    } else {\n      throw err\n    }\n  }\n}\n\n/* not type checking this file because flow doesn't play well with Proxy */\n\nvar initProxy;\n\nif (process.env.NODE_ENV !== 'production') {\n  var allowedGlobals = makeMap(\n    'Infinity,undefined,NaN,isFinite,isNaN,' +\n    'parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,' +\n    'Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,' +\n    'require' // for Webpack/Browserify\n  );\n\n  var warnNonPresent = function (target, key) {\n    warn(\n      \"Property or method \\\"\" + key + \"\\\" is not defined on the instance but \" +\n      \"referenced during render. Make sure to declare reactive data \" +\n      \"properties in the data option.\",\n      target\n    );\n  };\n\n  var hasProxy =\n    typeof Proxy !== 'undefined' &&\n    Proxy.toString().match(/native code/);\n\n  if (hasProxy) {\n    var isBuiltInModifier = makeMap('stop,prevent,self,ctrl,shift,alt,meta');\n    config.keyCodes = new Proxy(config.keyCodes, {\n      set: function set (target, key, value) {\n        if (isBuiltInModifier(key)) {\n          warn((\"Avoid overwriting built-in modifier in config.keyCodes: .\" + key));\n          return false\n        } else {\n          target[key] = value;\n          return true\n        }\n      }\n    });\n  }\n\n  var hasHandler = {\n    has: function has (target, key) {\n      var has = key in target;\n      var isAllowed = allowedGlobals(key) || key.charAt(0) === '_';\n      if (!has && !isAllowed) {\n        warnNonPresent(target, key);\n      }\n      return has || !isAllowed\n    }\n  };\n\n  var getHandler = {\n    get: function get (target, key) {\n      if (typeof key === 'string' && !(key in target)) {\n        warnNonPresent(target, key);\n      }\n      return target[key]\n    }\n  };\n\n  initProxy = function initProxy (vm) {\n    if (hasProxy) {\n      // determine which proxy handler to use\n      var options = vm.$options;\n      var handlers = options.render && options.render._withStripped\n        ? getHandler\n        : hasHandler;\n      vm._renderProxy = new Proxy(vm, handlers);\n    } else {\n      vm._renderProxy = vm;\n    }\n  };\n}\n\nvar mark;\nvar measure;\n\nif (process.env.NODE_ENV !== 'production') {\n  var perf = inBrowser && window.performance;\n  /* istanbul ignore if */\n  if (\n    perf &&\n    perf.mark &&\n    perf.measure &&\n    perf.clearMarks &&\n    perf.clearMeasures\n  ) {\n    mark = function (tag) { return perf.mark(tag); };\n    measure = function (name, startTag, endTag) {\n      perf.measure(name, startTag, endTag);\n      perf.clearMarks(startTag);\n      perf.clearMarks(endTag);\n      perf.clearMeasures(name);\n    };\n  }\n}\n\n/*  */\n\nvar VNode = function VNode (\n  tag,\n  data,\n  children,\n  text,\n  elm,\n  context,\n  componentOptions\n) {\n  this.tag = tag;\n  this.data = data;\n  this.children = children;\n  this.text = text;\n  this.elm = elm;\n  this.ns = undefined;\n  this.context = context;\n  this.functionalContext = undefined;\n  this.key = data && data.key;\n  this.componentOptions = componentOptions;\n  this.componentInstance = undefined;\n  this.parent = undefined;\n  this.raw = false;\n  this.isStatic = false;\n  this.isRootInsert = true;\n  this.isComment = false;\n  this.isCloned = false;\n  this.isOnce = false;\n};\n\nvar prototypeAccessors = { child: {} };\n\n// DEPRECATED: alias for componentInstance for backwards compat.\n/* istanbul ignore next */\nprototypeAccessors.child.get = function () {\n  return this.componentInstance\n};\n\nObject.defineProperties( VNode.prototype, prototypeAccessors );\n\nvar createEmptyVNode = function () {\n  var node = new VNode();\n  node.text = '';\n  node.isComment = true;\n  return node\n};\n\nfunction createTextVNode (val) {\n  return new VNode(undefined, undefined, undefined, String(val))\n}\n\n// optimized shallow clone\n// used for static nodes and slot nodes because they may be reused across\n// multiple renders, cloning them avoids errors when DOM manipulations rely\n// on their elm reference.\nfunction cloneVNode (vnode) {\n  var cloned = new VNode(\n    vnode.tag,\n    vnode.data,\n    vnode.children,\n    vnode.text,\n    vnode.elm,\n    vnode.context,\n    vnode.componentOptions\n  );\n  cloned.ns = vnode.ns;\n  cloned.isStatic = vnode.isStatic;\n  cloned.key = vnode.key;\n  cloned.isCloned = true;\n  return cloned\n}\n\nfunction cloneVNodes (vnodes) {\n  var len = vnodes.length;\n  var res = new Array(len);\n  for (var i = 0; i < len; i++) {\n    res[i] = cloneVNode(vnodes[i]);\n  }\n  return res\n}\n\n/*  */\n\nvar normalizeEvent = cached(function (name) {\n  var once$$1 = name.charAt(0) === '~'; // Prefixed last, checked first\n  name = once$$1 ? name.slice(1) : name;\n  var capture = name.charAt(0) === '!';\n  name = capture ? name.slice(1) : name;\n  return {\n    name: name,\n    once: once$$1,\n    capture: capture\n  }\n});\n\nfunction createFnInvoker (fns) {\n  function invoker () {\n    var arguments$1 = arguments;\n\n    var fns = invoker.fns;\n    if (Array.isArray(fns)) {\n      for (var i = 0; i < fns.length; i++) {\n        fns[i].apply(null, arguments$1);\n      }\n    } else {\n      // return handler return value for single handlers\n      return fns.apply(null, arguments)\n    }\n  }\n  invoker.fns = fns;\n  return invoker\n}\n\nfunction updateListeners (\n  on,\n  oldOn,\n  add,\n  remove$$1,\n  vm\n) {\n  var name, cur, old, event;\n  for (name in on) {\n    cur = on[name];\n    old = oldOn[name];\n    event = normalizeEvent(name);\n    if (!cur) {\n      process.env.NODE_ENV !== 'production' && warn(\n        \"Invalid handler for event \\\"\" + (event.name) + \"\\\": got \" + String(cur),\n        vm\n      );\n    } else if (!old) {\n      if (!cur.fns) {\n        cur = on[name] = createFnInvoker(cur);\n      }\n      add(event.name, cur, event.once, event.capture);\n    } else if (cur !== old) {\n      old.fns = cur;\n      on[name] = old;\n    }\n  }\n  for (name in oldOn) {\n    if (!on[name]) {\n      event = normalizeEvent(name);\n      remove$$1(event.name, oldOn[name], event.capture);\n    }\n  }\n}\n\n/*  */\n\nfunction mergeVNodeHook (def, hookKey, hook) {\n  var invoker;\n  var oldHook = def[hookKey];\n\n  function wrappedHook () {\n    hook.apply(this, arguments);\n    // important: remove merged hook to ensure it's called only once\n    // and prevent memory leak\n    remove(invoker.fns, wrappedHook);\n  }\n\n  if (!oldHook) {\n    // no existing hook\n    invoker = createFnInvoker([wrappedHook]);\n  } else {\n    /* istanbul ignore if */\n    if (oldHook.fns && oldHook.merged) {\n      // already a merged invoker\n      invoker = oldHook;\n      invoker.fns.push(wrappedHook);\n    } else {\n      // existing plain hook\n      invoker = createFnInvoker([oldHook, wrappedHook]);\n    }\n  }\n\n  invoker.merged = true;\n  def[hookKey] = invoker;\n}\n\n/*  */\n\n// The template compiler attempts to minimize the need for normalization by\n// statically analyzing the template at compile time.\n//\n// For plain HTML markup, normalization can be completely skipped because the\n// generated render function is guaranteed to return Array<VNode>. There are\n// two cases where extra normalization is needed:\n\n// 1. When the children contains components - because a functional component\n// may return an Array instead of a single root. In this case, just a simple\n// normalization is needed - if any child is an Array, we flatten the whole\n// thing with Array.prototype.concat. It is guaranteed to be only 1-level deep\n// because functional components already normalize their own children.\nfunction simpleNormalizeChildren (children) {\n  for (var i = 0; i < children.length; i++) {\n    if (Array.isArray(children[i])) {\n      return Array.prototype.concat.apply([], children)\n    }\n  }\n  return children\n}\n\n// 2. When the children contains constructs that always generated nested Arrays,\n// e.g. <template>, <slot>, v-for, or when the children is provided by user\n// with hand-written render functions / JSX. In such cases a full normalization\n// is needed to cater to all possible types of children values.\nfunction normalizeChildren (children) {\n  return isPrimitive(children)\n    ? [createTextVNode(children)]\n    : Array.isArray(children)\n      ? normalizeArrayChildren(children)\n      : undefined\n}\n\nfunction normalizeArrayChildren (children, nestedIndex) {\n  var res = [];\n  var i, c, last;\n  for (i = 0; i < children.length; i++) {\n    c = children[i];\n    if (c == null || typeof c === 'boolean') { continue }\n    last = res[res.length - 1];\n    //  nested\n    if (Array.isArray(c)) {\n      res.push.apply(res, normalizeArrayChildren(c, ((nestedIndex || '') + \"_\" + i)));\n    } else if (isPrimitive(c)) {\n      if (last && last.text) {\n        last.text += String(c);\n      } else if (c !== '') {\n        // convert primitive to vnode\n        res.push(createTextVNode(c));\n      }\n    } else {\n      if (c.text && last && last.text) {\n        res[res.length - 1] = createTextVNode(last.text + c.text);\n      } else {\n        // default key for nested array children (likely generated by v-for)\n        if (c.tag && c.key == null && nestedIndex != null) {\n          c.key = \"__vlist\" + nestedIndex + \"_\" + i + \"__\";\n        }\n        res.push(c);\n      }\n    }\n  }\n  return res\n}\n\n/*  */\n\nfunction getFirstComponentChild (children) {\n  return children && children.filter(function (c) { return c && c.componentOptions; })[0]\n}\n\n/*  */\n\nfunction initEvents (vm) {\n  vm._events = Object.create(null);\n  vm._hasHookEvent = false;\n  // init parent attached events\n  var listeners = vm.$options._parentListeners;\n  if (listeners) {\n    updateComponentListeners(vm, listeners);\n  }\n}\n\nvar target;\n\nfunction add (event, fn, once$$1) {\n  if (once$$1) {\n    target.$once(event, fn);\n  } else {\n    target.$on(event, fn);\n  }\n}\n\nfunction remove$1 (event, fn) {\n  target.$off(event, fn);\n}\n\nfunction updateComponentListeners (\n  vm,\n  listeners,\n  oldListeners\n) {\n  target = vm;\n  updateListeners(listeners, oldListeners || {}, add, remove$1, vm);\n}\n\nfunction eventsMixin (Vue) {\n  var hookRE = /^hook:/;\n  Vue.prototype.$on = function (event, fn) {\n    var this$1 = this;\n\n    var vm = this;\n    if (Array.isArray(event)) {\n      for (var i = 0, l = event.length; i < l; i++) {\n        this$1.$on(event[i], fn);\n      }\n    } else {\n      (vm._events[event] || (vm._events[event] = [])).push(fn);\n      // optimize hook:event cost by using a boolean flag marked at registration\n      // instead of a hash lookup\n      if (hookRE.test(event)) {\n        vm._hasHookEvent = true;\n      }\n    }\n    return vm\n  };\n\n  Vue.prototype.$once = function (event, fn) {\n    var vm = this;\n    function on () {\n      vm.$off(event, on);\n      fn.apply(vm, arguments);\n    }\n    on.fn = fn;\n    vm.$on(event, on);\n    return vm\n  };\n\n  Vue.prototype.$off = function (event, fn) {\n    var this$1 = this;\n\n    var vm = this;\n    // all\n    if (!arguments.length) {\n      vm._events = Object.create(null);\n      return vm\n    }\n    // array of events\n    if (Array.isArray(event)) {\n      for (var i$1 = 0, l = event.length; i$1 < l; i$1++) {\n        this$1.$off(event[i$1], fn);\n      }\n      return vm\n    }\n    // specific event\n    var cbs = vm._events[event];\n    if (!cbs) {\n      return vm\n    }\n    if (arguments.length === 1) {\n      vm._events[event] = null;\n      return vm\n    }\n    // specific handler\n    var cb;\n    var i = cbs.length;\n    while (i--) {\n      cb = cbs[i];\n      if (cb === fn || cb.fn === fn) {\n        cbs.splice(i, 1);\n        break\n      }\n    }\n    return vm\n  };\n\n  Vue.prototype.$emit = function (event) {\n    var vm = this;\n    if (process.env.NODE_ENV !== 'production') {\n      var lowerCaseEvent = event.toLowerCase();\n      if (lowerCaseEvent !== event && vm._events[lowerCaseEvent]) {\n        tip(\n          \"Event \\\"\" + lowerCaseEvent + \"\\\" is emitted in component \" +\n          (formatComponentName(vm)) + \" but the handler is registered for \\\"\" + event + \"\\\". \" +\n          \"Note that HTML attributes are case-insensitive and you cannot use \" +\n          \"v-on to listen to camelCase events when using in-DOM templates. \" +\n          \"You should probably use \\\"\" + (hyphenate(event)) + \"\\\" instead of \\\"\" + event + \"\\\".\"\n        );\n      }\n    }\n    var cbs = vm._events[event];\n    if (cbs) {\n      cbs = cbs.length > 1 ? toArray(cbs) : cbs;\n      var args = toArray(arguments, 1);\n      for (var i = 0, l = cbs.length; i < l; i++) {\n        cbs[i].apply(vm, args);\n      }\n    }\n    return vm\n  };\n}\n\n/*  */\n\n/**\n * Runtime helper for resolving raw children VNodes into a slot object.\n */\nfunction resolveSlots (\n  children,\n  context\n) {\n  var slots = {};\n  if (!children) {\n    return slots\n  }\n  var defaultSlot = [];\n  var name, child;\n  for (var i = 0, l = children.length; i < l; i++) {\n    child = children[i];\n    // named slots should only be respected if the vnode was rendered in the\n    // same context.\n    if ((child.context === context || child.functionalContext === context) &&\n        child.data && (name = child.data.slot)) {\n      var slot = (slots[name] || (slots[name] = []));\n      if (child.tag === 'template') {\n        slot.push.apply(slot, child.children);\n      } else {\n        slot.push(child);\n      }\n    } else {\n      defaultSlot.push(child);\n    }\n  }\n  // ignore whitespace\n  if (!defaultSlot.every(isWhitespace)) {\n    slots.default = defaultSlot;\n  }\n  return slots\n}\n\nfunction isWhitespace (node) {\n  return node.isComment || node.text === ' '\n}\n\nfunction resolveScopedSlots (\n  fns\n) {\n  var res = {};\n  for (var i = 0; i < fns.length; i++) {\n    res[fns[i][0]] = fns[i][1];\n  }\n  return res\n}\n\n/*  */\n\nvar activeInstance = null;\n\nfunction initLifecycle (vm) {\n  var options = vm.$options;\n\n  // locate first non-abstract parent\n  var parent = options.parent;\n  if (parent && !options.abstract) {\n    while (parent.$options.abstract && parent.$parent) {\n      parent = parent.$parent;\n    }\n    parent.$children.push(vm);\n  }\n\n  vm.$parent = parent;\n  vm.$root = parent ? parent.$root : vm;\n\n  vm.$children = [];\n  vm.$refs = {};\n\n  vm._watcher = null;\n  vm._inactive = null;\n  vm._directInactive = false;\n  vm._isMounted = false;\n  vm._isDestroyed = false;\n  vm._isBeingDestroyed = false;\n}\n\nfunction lifecycleMixin (Vue) {\n  Vue.prototype._update = function (vnode, hydrating) {\n    var vm = this;\n    if (vm._isMounted) {\n      callHook(vm, 'beforeUpdate');\n    }\n    var prevEl = vm.$el;\n    var prevVnode = vm._vnode;\n    var prevActiveInstance = activeInstance;\n    activeInstance = vm;\n    vm._vnode = vnode;\n    // Vue.prototype.__patch__ is injected in entry points\n    // based on the rendering backend used.\n    if (!prevVnode) {\n      // initial render\n      vm.$el = vm.__patch__(\n        vm.$el, vnode, hydrating, false /* removeOnly */,\n        vm.$options._parentElm,\n        vm.$options._refElm\n      );\n    } else {\n      // updates\n      vm.$el = vm.__patch__(prevVnode, vnode);\n    }\n    activeInstance = prevActiveInstance;\n    // update __vue__ reference\n    if (prevEl) {\n      prevEl.__vue__ = null;\n    }\n    if (vm.$el) {\n      vm.$el.__vue__ = vm;\n    }\n    // if parent is an HOC, update its $el as well\n    if (vm.$vnode && vm.$parent && vm.$vnode === vm.$parent._vnode) {\n      vm.$parent.$el = vm.$el;\n    }\n    // updated hook is called by the scheduler to ensure that children are\n    // updated in a parent's updated hook.\n  };\n\n  Vue.prototype.$forceUpdate = function () {\n    var vm = this;\n    if (vm._watcher) {\n      vm._watcher.update();\n    }\n  };\n\n  Vue.prototype.$destroy = function () {\n    var vm = this;\n    if (vm._isBeingDestroyed) {\n      return\n    }\n    callHook(vm, 'beforeDestroy');\n    vm._isBeingDestroyed = true;\n    // remove self from parent\n    var parent = vm.$parent;\n    if (parent && !parent._isBeingDestroyed && !vm.$options.abstract) {\n      remove(parent.$children, vm);\n    }\n    // teardown watchers\n    if (vm._watcher) {\n      vm._watcher.teardown();\n    }\n    var i = vm._watchers.length;\n    while (i--) {\n      vm._watchers[i].teardown();\n    }\n    // remove reference from data ob\n    // frozen object may not have observer.\n    if (vm._data.__ob__) {\n      vm._data.__ob__.vmCount--;\n    }\n    // call the last hook...\n    vm._isDestroyed = true;\n    // invoke destroy hooks on current rendered tree\n    vm.__patch__(vm._vnode, null);\n    // fire destroyed hook\n    callHook(vm, 'destroyed');\n    // turn off all instance listeners.\n    vm.$off();\n    // remove __vue__ reference\n    if (vm.$el) {\n      vm.$el.__vue__ = null;\n    }\n    // remove reference to DOM nodes (prevents leak)\n    vm.$options._parentElm = vm.$options._refElm = null;\n  };\n}\n\nfunction mountComponent (\n  vm,\n  el,\n  hydrating\n) {\n  vm.$el = el;\n  if (!vm.$options.render) {\n    vm.$options.render = createEmptyVNode;\n    if (process.env.NODE_ENV !== 'production') {\n      /* istanbul ignore if */\n      if ((vm.$options.template && vm.$options.template.charAt(0) !== '#') ||\n        vm.$options.el || el) {\n        warn(\n          'You are using the runtime-only build of Vue where the template ' +\n          'compiler is not available. Either pre-compile the templates into ' +\n          'render functions, or use the compiler-included build.',\n          vm\n        );\n      } else {\n        warn(\n          'Failed to mount component: template or render function not defined.',\n          vm\n        );\n      }\n    }\n  }\n  callHook(vm, 'beforeMount');\n\n  var updateComponent;\n  /* istanbul ignore if */\n  if (process.env.NODE_ENV !== 'production' && config.performance && mark) {\n    updateComponent = function () {\n      var name = vm._name;\n      var id = vm._uid;\n      var startTag = \"vue-perf-start:\" + id;\n      var endTag = \"vue-perf-end:\" + id;\n\n      mark(startTag);\n      var vnode = vm._render();\n      mark(endTag);\n      measure((name + \" render\"), startTag, endTag);\n\n      mark(startTag);\n      vm._update(vnode, hydrating);\n      mark(endTag);\n      measure((name + \" patch\"), startTag, endTag);\n    };\n  } else {\n    updateComponent = function () {\n      vm._update(vm._render(), hydrating);\n    };\n  }\n\n  vm._watcher = new Watcher(vm, updateComponent, noop);\n  hydrating = false;\n\n  // manually mounted instance, call mounted on self\n  // mounted is called for render-created child components in its inserted hook\n  if (vm.$vnode == null) {\n    vm._isMounted = true;\n    callHook(vm, 'mounted');\n  }\n  return vm\n}\n\nfunction updateChildComponent (\n  vm,\n  propsData,\n  listeners,\n  parentVnode,\n  renderChildren\n) {\n  // determine whether component has slot children\n  // we need to do this before overwriting $options._renderChildren\n  var hasChildren = !!(\n    renderChildren ||               // has new static slots\n    vm.$options._renderChildren ||  // has old static slots\n    parentVnode.data.scopedSlots || // has new scoped slots\n    vm.$scopedSlots !== emptyObject // has old scoped slots\n  );\n\n  vm.$options._parentVnode = parentVnode;\n  vm.$vnode = parentVnode; // update vm's placeholder node without re-render\n  if (vm._vnode) { // update child tree's parent\n    vm._vnode.parent = parentVnode;\n  }\n  vm.$options._renderChildren = renderChildren;\n\n  // update props\n  if (propsData && vm.$options.props) {\n    observerState.shouldConvert = false;\n    if (process.env.NODE_ENV !== 'production') {\n      observerState.isSettingProps = true;\n    }\n    var props = vm._props;\n    var propKeys = vm.$options._propKeys || [];\n    for (var i = 0; i < propKeys.length; i++) {\n      var key = propKeys[i];\n      props[key] = validateProp(key, vm.$options.props, propsData, vm);\n    }\n    observerState.shouldConvert = true;\n    if (process.env.NODE_ENV !== 'production') {\n      observerState.isSettingProps = false;\n    }\n    // keep a copy of raw propsData\n    vm.$options.propsData = propsData;\n  }\n  // update listeners\n  if (listeners) {\n    var oldListeners = vm.$options._parentListeners;\n    vm.$options._parentListeners = listeners;\n    updateComponentListeners(vm, listeners, oldListeners);\n  }\n  // resolve slots + force update if has children\n  if (hasChildren) {\n    vm.$slots = resolveSlots(renderChildren, parentVnode.context);\n    vm.$forceUpdate();\n  }\n}\n\nfunction isInInactiveTree (vm) {\n  while (vm && (vm = vm.$parent)) {\n    if (vm._inactive) { return true }\n  }\n  return false\n}\n\nfunction activateChildComponent (vm, direct) {\n  if (direct) {\n    vm._directInactive = false;\n    if (isInInactiveTree(vm)) {\n      return\n    }\n  } else if (vm._directInactive) {\n    return\n  }\n  if (vm._inactive || vm._inactive == null) {\n    vm._inactive = false;\n    for (var i = 0; i < vm.$children.length; i++) {\n      activateChildComponent(vm.$children[i]);\n    }\n    callHook(vm, 'activated');\n  }\n}\n\nfunction deactivateChildComponent (vm, direct) {\n  if (direct) {\n    vm._directInactive = true;\n    if (isInInactiveTree(vm)) {\n      return\n    }\n  }\n  if (!vm._inactive) {\n    vm._inactive = true;\n    for (var i = 0; i < vm.$children.length; i++) {\n      deactivateChildComponent(vm.$children[i]);\n    }\n    callHook(vm, 'deactivated');\n  }\n}\n\nfunction callHook (vm, hook) {\n  var handlers = vm.$options[hook];\n  if (handlers) {\n    for (var i = 0, j = handlers.length; i < j; i++) {\n      try {\n        handlers[i].call(vm);\n      } catch (e) {\n        handleError(e, vm, (hook + \" hook\"));\n      }\n    }\n  }\n  if (vm._hasHookEvent) {\n    vm.$emit('hook:' + hook);\n  }\n}\n\n/*  */\n\n\nvar queue = [];\nvar has = {};\nvar circular = {};\nvar waiting = false;\nvar flushing = false;\nvar index = 0;\n\n/**\n * Reset the scheduler's state.\n */\nfunction resetSchedulerState () {\n  queue.length = 0;\n  has = {};\n  if (process.env.NODE_ENV !== 'production') {\n    circular = {};\n  }\n  waiting = flushing = false;\n}\n\n/**\n * Flush both queues and run the watchers.\n */\nfunction flushSchedulerQueue () {\n  flushing = true;\n  var watcher, id, vm;\n\n  // Sort queue before flush.\n  // This ensures that:\n  // 1. Components are updated from parent to child. (because parent is always\n  //    created before the child)\n  // 2. A component's user watchers are run before its render watcher (because\n  //    user watchers are created before the render watcher)\n  // 3. If a component is destroyed during a parent component's watcher run,\n  //    its watchers can be skipped.\n  queue.sort(function (a, b) { return a.id - b.id; });\n\n  // do not cache length because more watchers might be pushed\n  // as we run existing watchers\n  for (index = 0; index < queue.length; index++) {\n    watcher = queue[index];\n    id = watcher.id;\n    has[id] = null;\n    watcher.run();\n    // in dev build, check and stop circular updates.\n    if (process.env.NODE_ENV !== 'production' && has[id] != null) {\n      circular[id] = (circular[id] || 0) + 1;\n      if (circular[id] > config._maxUpdateCount) {\n        warn(\n          'You may have an infinite update loop ' + (\n            watcher.user\n              ? (\"in watcher with expression \\\"\" + (watcher.expression) + \"\\\"\")\n              : \"in a component render function.\"\n          ),\n          watcher.vm\n        );\n        break\n      }\n    }\n  }\n\n  // reset scheduler before updated hook called\n  var oldQueue = queue.slice();\n  resetSchedulerState();\n\n  // call updated hooks\n  index = oldQueue.length;\n  while (index--) {\n    watcher = oldQueue[index];\n    vm = watcher.vm;\n    if (vm._watcher === watcher && vm._isMounted) {\n      callHook(vm, 'updated');\n    }\n  }\n\n  // devtool hook\n  /* istanbul ignore if */\n  if (devtools && config.devtools) {\n    devtools.emit('flush');\n  }\n}\n\n/**\n * Push a watcher into the watcher queue.\n * Jobs with duplicate IDs will be skipped unless it's\n * pushed when the queue is being flushed.\n */\nfunction queueWatcher (watcher) {\n  var id = watcher.id;\n  if (has[id] == null) {\n    has[id] = true;\n    if (!flushing) {\n      queue.push(watcher);\n    } else {\n      // if already flushing, splice the watcher based on its id\n      // if already past its id, it will be run next immediately.\n      var i = queue.length - 1;\n      while (i >= 0 && queue[i].id > watcher.id) {\n        i--;\n      }\n      queue.splice(Math.max(i, index) + 1, 0, watcher);\n    }\n    // queue the flush\n    if (!waiting) {\n      waiting = true;\n      nextTick(flushSchedulerQueue);\n    }\n  }\n}\n\n/*  */\n\nvar uid$2 = 0;\n\n/**\n * A watcher parses an expression, collects dependencies,\n * and fires callback when the expression value changes.\n * This is used for both the $watch() api and directives.\n */\nvar Watcher = function Watcher (\n  vm,\n  expOrFn,\n  cb,\n  options\n) {\n  this.vm = vm;\n  vm._watchers.push(this);\n  // options\n  if (options) {\n    this.deep = !!options.deep;\n    this.user = !!options.user;\n    this.lazy = !!options.lazy;\n    this.sync = !!options.sync;\n  } else {\n    this.deep = this.user = this.lazy = this.sync = false;\n  }\n  this.cb = cb;\n  this.id = ++uid$2; // uid for batching\n  this.active = true;\n  this.dirty = this.lazy; // for lazy watchers\n  this.deps = [];\n  this.newDeps = [];\n  this.depIds = new _Set();\n  this.newDepIds = new _Set();\n  this.expression = process.env.NODE_ENV !== 'production'\n    ? expOrFn.toString()\n    : '';\n  // parse expression for getter\n  if (typeof expOrFn === 'function') {\n    this.getter = expOrFn;\n  } else {\n    this.getter = parsePath(expOrFn);\n    if (!this.getter) {\n      this.getter = function () {};\n      process.env.NODE_ENV !== 'production' && warn(\n        \"Failed watching path: \\\"\" + expOrFn + \"\\\" \" +\n        'Watcher only accepts simple dot-delimited paths. ' +\n        'For full control, use a function instead.',\n        vm\n      );\n    }\n  }\n  this.value = this.lazy\n    ? undefined\n    : this.get();\n};\n\n/**\n * Evaluate the getter, and re-collect dependencies.\n */\nWatcher.prototype.get = function get () {\n  pushTarget(this);\n  var value;\n  var vm = this.vm;\n  if (this.user) {\n    try {\n      value = this.getter.call(vm, vm);\n    } catch (e) {\n      handleError(e, vm, (\"getter for watcher \\\"\" + (this.expression) + \"\\\"\"));\n    }\n  } else {\n    value = this.getter.call(vm, vm);\n  }\n  // \"touch\" every property so they are all tracked as\n  // dependencies for deep watching\n  if (this.deep) {\n    traverse(value);\n  }\n  popTarget();\n  this.cleanupDeps();\n  return value\n};\n\n/**\n * Add a dependency to this directive.\n */\nWatcher.prototype.addDep = function addDep (dep) {\n  var id = dep.id;\n  if (!this.newDepIds.has(id)) {\n    this.newDepIds.add(id);\n    this.newDeps.push(dep);\n    if (!this.depIds.has(id)) {\n      dep.addSub(this);\n    }\n  }\n};\n\n/**\n * Clean up for dependency collection.\n */\nWatcher.prototype.cleanupDeps = function cleanupDeps () {\n    var this$1 = this;\n\n  var i = this.deps.length;\n  while (i--) {\n    var dep = this$1.deps[i];\n    if (!this$1.newDepIds.has(dep.id)) {\n      dep.removeSub(this$1);\n    }\n  }\n  var tmp = this.depIds;\n  this.depIds = this.newDepIds;\n  this.newDepIds = tmp;\n  this.newDepIds.clear();\n  tmp = this.deps;\n  this.deps = this.newDeps;\n  this.newDeps = tmp;\n  this.newDeps.length = 0;\n};\n\n/**\n * Subscriber interface.\n * Will be called when a dependency changes.\n */\nWatcher.prototype.update = function update () {\n  /* istanbul ignore else */\n  if (this.lazy) {\n    this.dirty = true;\n  } else if (this.sync) {\n    this.run();\n  } else {\n    queueWatcher(this);\n  }\n};\n\n/**\n * Scheduler job interface.\n * Will be called by the scheduler.\n */\nWatcher.prototype.run = function run () {\n  if (this.active) {\n    var value = this.get();\n    if (\n      value !== this.value ||\n      // Deep watchers and watchers on Object/Arrays should fire even\n      // when the value is the same, because the value may\n      // have mutated.\n      isObject(value) ||\n      this.deep\n    ) {\n      // set new value\n      var oldValue = this.value;\n      this.value = value;\n      if (this.user) {\n        try {\n          this.cb.call(this.vm, value, oldValue);\n        } catch (e) {\n          handleError(e, this.vm, (\"callback for watcher \\\"\" + (this.expression) + \"\\\"\"));\n        }\n      } else {\n        this.cb.call(this.vm, value, oldValue);\n      }\n    }\n  }\n};\n\n/**\n * Evaluate the value of the watcher.\n * This only gets called for lazy watchers.\n */\nWatcher.prototype.evaluate = function evaluate () {\n  this.value = this.get();\n  this.dirty = false;\n};\n\n/**\n * Depend on all deps collected by this watcher.\n */\nWatcher.prototype.depend = function depend () {\n    var this$1 = this;\n\n  var i = this.deps.length;\n  while (i--) {\n    this$1.deps[i].depend();\n  }\n};\n\n/**\n * Remove self from all dependencies' subscriber list.\n */\nWatcher.prototype.teardown = function teardown () {\n    var this$1 = this;\n\n  if (this.active) {\n    // remove self from vm's watcher list\n    // this is a somewhat expensive operation so we skip it\n    // if the vm is being destroyed.\n    if (!this.vm._isBeingDestroyed) {\n      remove(this.vm._watchers, this);\n    }\n    var i = this.deps.length;\n    while (i--) {\n      this$1.deps[i].removeSub(this$1);\n    }\n    this.active = false;\n  }\n};\n\n/**\n * Recursively traverse an object to evoke all converted\n * getters, so that every nested property inside the object\n * is collected as a \"deep\" dependency.\n */\nvar seenObjects = new _Set();\nfunction traverse (val) {\n  seenObjects.clear();\n  _traverse(val, seenObjects);\n}\n\nfunction _traverse (val, seen) {\n  var i, keys;\n  var isA = Array.isArray(val);\n  if ((!isA && !isObject(val)) || !Object.isExtensible(val)) {\n    return\n  }\n  if (val.__ob__) {\n    var depId = val.__ob__.dep.id;\n    if (seen.has(depId)) {\n      return\n    }\n    seen.add(depId);\n  }\n  if (isA) {\n    i = val.length;\n    while (i--) { _traverse(val[i], seen); }\n  } else {\n    keys = Object.keys(val);\n    i = keys.length;\n    while (i--) { _traverse(val[keys[i]], seen); }\n  }\n}\n\n/*  */\n\nvar sharedPropertyDefinition = {\n  enumerable: true,\n  configurable: true,\n  get: noop,\n  set: noop\n};\n\nfunction proxy (target, sourceKey, key) {\n  sharedPropertyDefinition.get = function proxyGetter () {\n    return this[sourceKey][key]\n  };\n  sharedPropertyDefinition.set = function proxySetter (val) {\n    this[sourceKey][key] = val;\n  };\n  Object.defineProperty(target, key, sharedPropertyDefinition);\n}\n\nfunction initState (vm) {\n  vm._watchers = [];\n  var opts = vm.$options;\n  if (opts.props) { initProps(vm, opts.props); }\n  if (opts.methods) { initMethods(vm, opts.methods); }\n  if (opts.data) {\n    initData(vm);\n  } else {\n    observe(vm._data = {}, true /* asRootData */);\n  }\n  if (opts.computed) { initComputed(vm, opts.computed); }\n  if (opts.watch) { initWatch(vm, opts.watch); }\n}\n\nvar isReservedProp = { key: 1, ref: 1, slot: 1 };\n\nfunction initProps (vm, propsOptions) {\n  var propsData = vm.$options.propsData || {};\n  var props = vm._props = {};\n  // cache prop keys so that future props updates can iterate using Array\n  // instead of dynamic object key enumeration.\n  var keys = vm.$options._propKeys = [];\n  var isRoot = !vm.$parent;\n  // root instance props should be converted\n  observerState.shouldConvert = isRoot;\n  var loop = function ( key ) {\n    keys.push(key);\n    var value = validateProp(key, propsOptions, propsData, vm);\n    /* istanbul ignore else */\n    if (process.env.NODE_ENV !== 'production') {\n      if (isReservedProp[key]) {\n        warn(\n          (\"\\\"\" + key + \"\\\" is a reserved attribute and cannot be used as component prop.\"),\n          vm\n        );\n      }\n      defineReactive$$1(props, key, value, function () {\n        if (vm.$parent && !observerState.isSettingProps) {\n          warn(\n            \"Avoid mutating a prop directly since the value will be \" +\n            \"overwritten whenever the parent component re-renders. \" +\n            \"Instead, use a data or computed property based on the prop's \" +\n            \"value. Prop being mutated: \\\"\" + key + \"\\\"\",\n            vm\n          );\n        }\n      });\n    } else {\n      defineReactive$$1(props, key, value);\n    }\n    // static props are already proxied on the component's prototype\n    // during Vue.extend(). We only need to proxy props defined at\n    // instantiation here.\n    if (!(key in vm)) {\n      proxy(vm, \"_props\", key);\n    }\n  };\n\n  for (var key in propsOptions) loop( key );\n  observerState.shouldConvert = true;\n}\n\nfunction initData (vm) {\n  var data = vm.$options.data;\n  data = vm._data = typeof data === 'function'\n    ? getData(data, vm)\n    : data || {};\n  if (!isPlainObject(data)) {\n    data = {};\n    process.env.NODE_ENV !== 'production' && warn(\n      'data functions should return an object:\\n' +\n      'https://vuejs.org/v2/guide/components.html#data-Must-Be-a-Function',\n      vm\n    );\n  }\n  // proxy data on instance\n  var keys = Object.keys(data);\n  var props = vm.$options.props;\n  var i = keys.length;\n  while (i--) {\n    if (props && hasOwn(props, keys[i])) {\n      process.env.NODE_ENV !== 'production' && warn(\n        \"The data property \\\"\" + (keys[i]) + \"\\\" is already declared as a prop. \" +\n        \"Use prop default value instead.\",\n        vm\n      );\n    } else if (!isReserved(keys[i])) {\n      proxy(vm, \"_data\", keys[i]);\n    }\n  }\n  // observe data\n  observe(data, true /* asRootData */);\n}\n\nfunction getData (data, vm) {\n  try {\n    return data.call(vm)\n  } catch (e) {\n    handleError(e, vm, \"data()\");\n    return {}\n  }\n}\n\nvar computedWatcherOptions = { lazy: true };\n\nfunction initComputed (vm, computed) {\n  var watchers = vm._computedWatchers = Object.create(null);\n\n  for (var key in computed) {\n    var userDef = computed[key];\n    var getter = typeof userDef === 'function' ? userDef : userDef.get;\n    if (process.env.NODE_ENV !== 'production') {\n      if (getter === undefined) {\n        warn(\n          (\"No getter function has been defined for computed property \\\"\" + key + \"\\\".\"),\n          vm\n        );\n        getter = noop;\n      }\n    }\n    // create internal watcher for the computed property.\n    watchers[key] = new Watcher(vm, getter, noop, computedWatcherOptions);\n\n    // component-defined computed properties are already defined on the\n    // component prototype. We only need to define computed properties defined\n    // at instantiation here.\n    if (!(key in vm)) {\n      defineComputed(vm, key, userDef);\n    }\n  }\n}\n\nfunction defineComputed (target, key, userDef) {\n  if (typeof userDef === 'function') {\n    sharedPropertyDefinition.get = createComputedGetter(key);\n    sharedPropertyDefinition.set = noop;\n  } else {\n    sharedPropertyDefinition.get = userDef.get\n      ? userDef.cache !== false\n        ? createComputedGetter(key)\n        : userDef.get\n      : noop;\n    sharedPropertyDefinition.set = userDef.set\n      ? userDef.set\n      : noop;\n  }\n  Object.defineProperty(target, key, sharedPropertyDefinition);\n}\n\nfunction createComputedGetter (key) {\n  return function computedGetter () {\n    var watcher = this._computedWatchers && this._computedWatchers[key];\n    if (watcher) {\n      if (watcher.dirty) {\n        watcher.evaluate();\n      }\n      if (Dep.target) {\n        watcher.depend();\n      }\n      return watcher.value\n    }\n  }\n}\n\nfunction initMethods (vm, methods) {\n  var props = vm.$options.props;\n  for (var key in methods) {\n    vm[key] = methods[key] == null ? noop : bind(methods[key], vm);\n    if (process.env.NODE_ENV !== 'production') {\n      if (methods[key] == null) {\n        warn(\n          \"method \\\"\" + key + \"\\\" has an undefined value in the component definition. \" +\n          \"Did you reference the function correctly?\",\n          vm\n        );\n      }\n      if (props && hasOwn(props, key)) {\n        warn(\n          (\"method \\\"\" + key + \"\\\" has already been defined as a prop.\"),\n          vm\n        );\n      }\n    }\n  }\n}\n\nfunction initWatch (vm, watch) {\n  for (var key in watch) {\n    var handler = watch[key];\n    if (Array.isArray(handler)) {\n      for (var i = 0; i < handler.length; i++) {\n        createWatcher(vm, key, handler[i]);\n      }\n    } else {\n      createWatcher(vm, key, handler);\n    }\n  }\n}\n\nfunction createWatcher (vm, key, handler) {\n  var options;\n  if (isPlainObject(handler)) {\n    options = handler;\n    handler = handler.handler;\n  }\n  if (typeof handler === 'string') {\n    handler = vm[handler];\n  }\n  vm.$watch(key, handler, options);\n}\n\nfunction stateMixin (Vue) {\n  // flow somehow has problems with directly declared definition object\n  // when using Object.defineProperty, so we have to procedurally build up\n  // the object here.\n  var dataDef = {};\n  dataDef.get = function () { return this._data };\n  var propsDef = {};\n  propsDef.get = function () { return this._props };\n  if (process.env.NODE_ENV !== 'production') {\n    dataDef.set = function (newData) {\n      warn(\n        'Avoid replacing instance root $data. ' +\n        'Use nested data properties instead.',\n        this\n      );\n    };\n    propsDef.set = function () {\n      warn(\"$props is readonly.\", this);\n    };\n  }\n  Object.defineProperty(Vue.prototype, '$data', dataDef);\n  Object.defineProperty(Vue.prototype, '$props', propsDef);\n\n  Vue.prototype.$set = set;\n  Vue.prototype.$delete = del;\n\n  Vue.prototype.$watch = function (\n    expOrFn,\n    cb,\n    options\n  ) {\n    var vm = this;\n    options = options || {};\n    options.user = true;\n    var watcher = new Watcher(vm, expOrFn, cb, options);\n    if (options.immediate) {\n      cb.call(vm, watcher.value);\n    }\n    return function unwatchFn () {\n      watcher.teardown();\n    }\n  };\n}\n\n/*  */\n\n// hooks to be invoked on component VNodes during patch\nvar componentVNodeHooks = {\n  init: function init (\n    vnode,\n    hydrating,\n    parentElm,\n    refElm\n  ) {\n    if (!vnode.componentInstance || vnode.componentInstance._isDestroyed) {\n      var child = vnode.componentInstance = createComponentInstanceForVnode(\n        vnode,\n        activeInstance,\n        parentElm,\n        refElm\n      );\n      child.$mount(hydrating ? vnode.elm : undefined, hydrating);\n    } else if (vnode.data.keepAlive) {\n      // kept-alive components, treat as a patch\n      var mountedNode = vnode; // work around flow\n      componentVNodeHooks.prepatch(mountedNode, mountedNode);\n    }\n  },\n\n  prepatch: function prepatch (oldVnode, vnode) {\n    var options = vnode.componentOptions;\n    var child = vnode.componentInstance = oldVnode.componentInstance;\n    updateChildComponent(\n      child,\n      options.propsData, // updated props\n      options.listeners, // updated listeners\n      vnode, // new parent vnode\n      options.children // new children\n    );\n  },\n\n  insert: function insert (vnode) {\n    if (!vnode.componentInstance._isMounted) {\n      vnode.componentInstance._isMounted = true;\n      callHook(vnode.componentInstance, 'mounted');\n    }\n    if (vnode.data.keepAlive) {\n      activateChildComponent(vnode.componentInstance, true /* direct */);\n    }\n  },\n\n  destroy: function destroy (vnode) {\n    if (!vnode.componentInstance._isDestroyed) {\n      if (!vnode.data.keepAlive) {\n        vnode.componentInstance.$destroy();\n      } else {\n        deactivateChildComponent(vnode.componentInstance, true /* direct */);\n      }\n    }\n  }\n};\n\nvar hooksToMerge = Object.keys(componentVNodeHooks);\n\nfunction createComponent (\n  Ctor,\n  data,\n  context,\n  children,\n  tag\n) {\n  if (!Ctor) {\n    return\n  }\n\n  var baseCtor = context.$options._base;\n  if (isObject(Ctor)) {\n    Ctor = baseCtor.extend(Ctor);\n  }\n\n  if (typeof Ctor !== 'function') {\n    if (process.env.NODE_ENV !== 'production') {\n      warn((\"Invalid Component definition: \" + (String(Ctor))), context);\n    }\n    return\n  }\n\n  // async component\n  if (!Ctor.cid) {\n    if (Ctor.resolved) {\n      Ctor = Ctor.resolved;\n    } else {\n      Ctor = resolveAsyncComponent(Ctor, baseCtor, function () {\n        // it's ok to queue this on every render because\n        // $forceUpdate is buffered by the scheduler.\n        context.$forceUpdate();\n      });\n      if (!Ctor) {\n        // return nothing if this is indeed an async component\n        // wait for the callback to trigger parent update.\n        return\n      }\n    }\n  }\n\n  // resolve constructor options in case global mixins are applied after\n  // component constructor creation\n  resolveConstructorOptions(Ctor);\n\n  data = data || {};\n\n  // transform component v-model data into props & events\n  if (data.model) {\n    transformModel(Ctor.options, data);\n  }\n\n  // extract props\n  var propsData = extractProps(data, Ctor, tag);\n\n  // functional component\n  if (Ctor.options.functional) {\n    return createFunctionalComponent(Ctor, propsData, data, context, children)\n  }\n\n  // extract listeners, since these needs to be treated as\n  // child component listeners instead of DOM listeners\n  var listeners = data.on;\n  // replace with listeners with .native modifier\n  data.on = data.nativeOn;\n\n  if (Ctor.options.abstract) {\n    // abstract components do not keep anything\n    // other than props & listeners\n    data = {};\n  }\n\n  // merge component management hooks onto the placeholder node\n  mergeHooks(data);\n\n  // return a placeholder vnode\n  var name = Ctor.options.name || tag;\n  var vnode = new VNode(\n    (\"vue-component-\" + (Ctor.cid) + (name ? (\"-\" + name) : '')),\n    data, undefined, undefined, undefined, context,\n    { Ctor: Ctor, propsData: propsData, listeners: listeners, tag: tag, children: children }\n  );\n  return vnode\n}\n\nfunction createFunctionalComponent (\n  Ctor,\n  propsData,\n  data,\n  context,\n  children\n) {\n  var props = {};\n  var propOptions = Ctor.options.props;\n  if (propOptions) {\n    for (var key in propOptions) {\n      props[key] = validateProp(key, propOptions, propsData);\n    }\n  }\n  // ensure the createElement function in functional components\n  // gets a unique context - this is necessary for correct named slot check\n  var _context = Object.create(context);\n  var h = function (a, b, c, d) { return createElement(_context, a, b, c, d, true); };\n  var vnode = Ctor.options.render.call(null, h, {\n    props: props,\n    data: data,\n    parent: context,\n    children: children,\n    slots: function () { return resolveSlots(children, context); }\n  });\n  if (vnode instanceof VNode) {\n    vnode.functionalContext = context;\n    if (data.slot) {\n      (vnode.data || (vnode.data = {})).slot = data.slot;\n    }\n  }\n  return vnode\n}\n\nfunction createComponentInstanceForVnode (\n  vnode, // we know it's MountedComponentVNode but flow doesn't\n  parent, // activeInstance in lifecycle state\n  parentElm,\n  refElm\n) {\n  var vnodeComponentOptions = vnode.componentOptions;\n  var options = {\n    _isComponent: true,\n    parent: parent,\n    propsData: vnodeComponentOptions.propsData,\n    _componentTag: vnodeComponentOptions.tag,\n    _parentVnode: vnode,\n    _parentListeners: vnodeComponentOptions.listeners,\n    _renderChildren: vnodeComponentOptions.children,\n    _parentElm: parentElm || null,\n    _refElm: refElm || null\n  };\n  // check inline-template render functions\n  var inlineTemplate = vnode.data.inlineTemplate;\n  if (inlineTemplate) {\n    options.render = inlineTemplate.render;\n    options.staticRenderFns = inlineTemplate.staticRenderFns;\n  }\n  return new vnodeComponentOptions.Ctor(options)\n}\n\nfunction resolveAsyncComponent (\n  factory,\n  baseCtor,\n  cb\n) {\n  if (factory.requested) {\n    // pool callbacks\n    factory.pendingCallbacks.push(cb);\n  } else {\n    factory.requested = true;\n    var cbs = factory.pendingCallbacks = [cb];\n    var sync = true;\n\n    var resolve = function (res) {\n      if (isObject(res)) {\n        res = baseCtor.extend(res);\n      }\n      // cache resolved\n      factory.resolved = res;\n      // invoke callbacks only if this is not a synchronous resolve\n      // (async resolves are shimmed as synchronous during SSR)\n      if (!sync) {\n        for (var i = 0, l = cbs.length; i < l; i++) {\n          cbs[i](res);\n        }\n      }\n    };\n\n    var reject = function (reason) {\n      process.env.NODE_ENV !== 'production' && warn(\n        \"Failed to resolve async component: \" + (String(factory)) +\n        (reason ? (\"\\nReason: \" + reason) : '')\n      );\n    };\n\n    var res = factory(resolve, reject);\n\n    // handle promise\n    if (res && typeof res.then === 'function' && !factory.resolved) {\n      res.then(resolve, reject);\n    }\n\n    sync = false;\n    // return in case resolved synchronously\n    return factory.resolved\n  }\n}\n\nfunction extractProps (data, Ctor, tag) {\n  // we are only extracting raw values here.\n  // validation and default values are handled in the child\n  // component itself.\n  var propOptions = Ctor.options.props;\n  if (!propOptions) {\n    return\n  }\n  var res = {};\n  var attrs = data.attrs;\n  var props = data.props;\n  var domProps = data.domProps;\n  if (attrs || props || domProps) {\n    for (var key in propOptions) {\n      var altKey = hyphenate(key);\n      if (process.env.NODE_ENV !== 'production') {\n        var keyInLowerCase = key.toLowerCase();\n        if (\n          key !== keyInLowerCase &&\n          attrs && attrs.hasOwnProperty(keyInLowerCase)\n        ) {\n          tip(\n            \"Prop \\\"\" + keyInLowerCase + \"\\\" is passed to component \" +\n            (formatComponentName(tag || Ctor)) + \", but the declared prop name is\" +\n            \" \\\"\" + key + \"\\\". \" +\n            \"Note that HTML attributes are case-insensitive and camelCased \" +\n            \"props need to use their kebab-case equivalents when using in-DOM \" +\n            \"templates. You should probably use \\\"\" + altKey + \"\\\" instead of \\\"\" + key + \"\\\".\"\n          );\n        }\n      }\n      checkProp(res, props, key, altKey, true) ||\n      checkProp(res, attrs, key, altKey) ||\n      checkProp(res, domProps, key, altKey);\n    }\n  }\n  return res\n}\n\nfunction checkProp (\n  res,\n  hash,\n  key,\n  altKey,\n  preserve\n) {\n  if (hash) {\n    if (hasOwn(hash, key)) {\n      res[key] = hash[key];\n      if (!preserve) {\n        delete hash[key];\n      }\n      return true\n    } else if (hasOwn(hash, altKey)) {\n      res[key] = hash[altKey];\n      if (!preserve) {\n        delete hash[altKey];\n      }\n      return true\n    }\n  }\n  return false\n}\n\nfunction mergeHooks (data) {\n  if (!data.hook) {\n    data.hook = {};\n  }\n  for (var i = 0; i < hooksToMerge.length; i++) {\n    var key = hooksToMerge[i];\n    var fromParent = data.hook[key];\n    var ours = componentVNodeHooks[key];\n    data.hook[key] = fromParent ? mergeHook$1(ours, fromParent) : ours;\n  }\n}\n\nfunction mergeHook$1 (one, two) {\n  return function (a, b, c, d) {\n    one(a, b, c, d);\n    two(a, b, c, d);\n  }\n}\n\n// transform component v-model info (value and callback) into\n// prop and event handler respectively.\nfunction transformModel (options, data) {\n  var prop = (options.model && options.model.prop) || 'value';\n  var event = (options.model && options.model.event) || 'input';(data.props || (data.props = {}))[prop] = data.model.value;\n  var on = data.on || (data.on = {});\n  if (on[event]) {\n    on[event] = [data.model.callback].concat(on[event]);\n  } else {\n    on[event] = data.model.callback;\n  }\n}\n\n/*  */\n\nvar SIMPLE_NORMALIZE = 1;\nvar ALWAYS_NORMALIZE = 2;\n\n// wrapper function for providing a more flexible interface\n// without getting yelled at by flow\nfunction createElement (\n  context,\n  tag,\n  data,\n  children,\n  normalizationType,\n  alwaysNormalize\n) {\n  if (Array.isArray(data) || isPrimitive(data)) {\n    normalizationType = children;\n    children = data;\n    data = undefined;\n  }\n  if (alwaysNormalize) { normalizationType = ALWAYS_NORMALIZE; }\n  return _createElement(context, tag, data, children, normalizationType)\n}\n\nfunction _createElement (\n  context,\n  tag,\n  data,\n  children,\n  normalizationType\n) {\n  if (data && data.__ob__) {\n    process.env.NODE_ENV !== 'production' && warn(\n      \"Avoid using observed data object as vnode data: \" + (JSON.stringify(data)) + \"\\n\" +\n      'Always create fresh vnode data objects in each render!',\n      context\n    );\n    return createEmptyVNode()\n  }\n  if (!tag) {\n    // in case of component :is set to falsy value\n    return createEmptyVNode()\n  }\n  // support single function children as default scoped slot\n  if (Array.isArray(children) &&\n      typeof children[0] === 'function') {\n    data = data || {};\n    data.scopedSlots = { default: children[0] };\n    children.length = 0;\n  }\n  if (normalizationType === ALWAYS_NORMALIZE) {\n    children = normalizeChildren(children);\n  } else if (normalizationType === SIMPLE_NORMALIZE) {\n    children = simpleNormalizeChildren(children);\n  }\n  var vnode, ns;\n  if (typeof tag === 'string') {\n    var Ctor;\n    ns = config.getTagNamespace(tag);\n    if (config.isReservedTag(tag)) {\n      // platform built-in elements\n      vnode = new VNode(\n        config.parsePlatformTagName(tag), data, children,\n        undefined, undefined, context\n      );\n    } else if ((Ctor = resolveAsset(context.$options, 'components', tag))) {\n      // component\n      vnode = createComponent(Ctor, data, context, children, tag);\n    } else {\n      // unknown or unlisted namespaced elements\n      // check at runtime because it may get assigned a namespace when its\n      // parent normalizes children\n      vnode = new VNode(\n        tag, data, children,\n        undefined, undefined, context\n      );\n    }\n  } else {\n    // direct component options / constructor\n    vnode = createComponent(tag, data, context, children);\n  }\n  if (vnode) {\n    if (ns) { applyNS(vnode, ns); }\n    return vnode\n  } else {\n    return createEmptyVNode()\n  }\n}\n\nfunction applyNS (vnode, ns) {\n  vnode.ns = ns;\n  if (vnode.tag === 'foreignObject') {\n    // use default namespace inside foreignObject\n    return\n  }\n  if (vnode.children) {\n    for (var i = 0, l = vnode.children.length; i < l; i++) {\n      var child = vnode.children[i];\n      if (child.tag && !child.ns) {\n        applyNS(child, ns);\n      }\n    }\n  }\n}\n\n/*  */\n\n/**\n * Runtime helper for rendering v-for lists.\n */\nfunction renderList (\n  val,\n  render\n) {\n  var ret, i, l, keys, key;\n  if (Array.isArray(val) || typeof val === 'string') {\n    ret = new Array(val.length);\n    for (i = 0, l = val.length; i < l; i++) {\n      ret[i] = render(val[i], i);\n    }\n  } else if (typeof val === 'number') {\n    ret = new Array(val);\n    for (i = 0; i < val; i++) {\n      ret[i] = render(i + 1, i);\n    }\n  } else if (isObject(val)) {\n    keys = Object.keys(val);\n    ret = new Array(keys.length);\n    for (i = 0, l = keys.length; i < l; i++) {\n      key = keys[i];\n      ret[i] = render(val[key], key, i);\n    }\n  }\n  return ret\n}\n\n/*  */\n\n/**\n * Runtime helper for rendering <slot>\n */\nfunction renderSlot (\n  name,\n  fallback,\n  props,\n  bindObject\n) {\n  var scopedSlotFn = this.$scopedSlots[name];\n  if (scopedSlotFn) { // scoped slot\n    props = props || {};\n    if (bindObject) {\n      extend(props, bindObject);\n    }\n    return scopedSlotFn(props) || fallback\n  } else {\n    var slotNodes = this.$slots[name];\n    // warn duplicate slot usage\n    if (slotNodes && process.env.NODE_ENV !== 'production') {\n      slotNodes._rendered && warn(\n        \"Duplicate presence of slot \\\"\" + name + \"\\\" found in the same render tree \" +\n        \"- this will likely cause render errors.\",\n        this\n      );\n      slotNodes._rendered = true;\n    }\n    return slotNodes || fallback\n  }\n}\n\n/*  */\n\n/**\n * Runtime helper for resolving filters\n */\nfunction resolveFilter (id) {\n  return resolveAsset(this.$options, 'filters', id, true) || identity\n}\n\n/*  */\n\n/**\n * Runtime helper for checking keyCodes from config.\n */\nfunction checkKeyCodes (\n  eventKeyCode,\n  key,\n  builtInAlias\n) {\n  var keyCodes = config.keyCodes[key] || builtInAlias;\n  if (Array.isArray(keyCodes)) {\n    return keyCodes.indexOf(eventKeyCode) === -1\n  } else {\n    return keyCodes !== eventKeyCode\n  }\n}\n\n/*  */\n\n/**\n * Runtime helper for merging v-bind=\"object\" into a VNode's data.\n */\nfunction bindObjectProps (\n  data,\n  tag,\n  value,\n  asProp\n) {\n  if (value) {\n    if (!isObject(value)) {\n      process.env.NODE_ENV !== 'production' && warn(\n        'v-bind without argument expects an Object or Array value',\n        this\n      );\n    } else {\n      if (Array.isArray(value)) {\n        value = toObject(value);\n      }\n      var hash;\n      for (var key in value) {\n        if (key === 'class' || key === 'style') {\n          hash = data;\n        } else {\n          var type = data.attrs && data.attrs.type;\n          hash = asProp || config.mustUseProp(tag, type, key)\n            ? data.domProps || (data.domProps = {})\n            : data.attrs || (data.attrs = {});\n        }\n        if (!(key in hash)) {\n          hash[key] = value[key];\n        }\n      }\n    }\n  }\n  return data\n}\n\n/*  */\n\n/**\n * Runtime helper for rendering static trees.\n */\nfunction renderStatic (\n  index,\n  isInFor\n) {\n  var tree = this._staticTrees[index];\n  // if has already-rendered static tree and not inside v-for,\n  // we can reuse the same tree by doing a shallow clone.\n  if (tree && !isInFor) {\n    return Array.isArray(tree)\n      ? cloneVNodes(tree)\n      : cloneVNode(tree)\n  }\n  // otherwise, render a fresh tree.\n  tree = this._staticTrees[index] =\n    this.$options.staticRenderFns[index].call(this._renderProxy);\n  markStatic(tree, (\"__static__\" + index), false);\n  return tree\n}\n\n/**\n * Runtime helper for v-once.\n * Effectively it means marking the node as static with a unique key.\n */\nfunction markOnce (\n  tree,\n  index,\n  key\n) {\n  markStatic(tree, (\"__once__\" + index + (key ? (\"_\" + key) : \"\")), true);\n  return tree\n}\n\nfunction markStatic (\n  tree,\n  key,\n  isOnce\n) {\n  if (Array.isArray(tree)) {\n    for (var i = 0; i < tree.length; i++) {\n      if (tree[i] && typeof tree[i] !== 'string') {\n        markStaticNode(tree[i], (key + \"_\" + i), isOnce);\n      }\n    }\n  } else {\n    markStaticNode(tree, key, isOnce);\n  }\n}\n\nfunction markStaticNode (node, key, isOnce) {\n  node.isStatic = true;\n  node.key = key;\n  node.isOnce = isOnce;\n}\n\n/*  */\n\nfunction initRender (vm) {\n  vm.$vnode = null; // the placeholder node in parent tree\n  vm._vnode = null; // the root of the child tree\n  vm._staticTrees = null;\n  var parentVnode = vm.$options._parentVnode;\n  var renderContext = parentVnode && parentVnode.context;\n  vm.$slots = resolveSlots(vm.$options._renderChildren, renderContext);\n  vm.$scopedSlots = emptyObject;\n  // bind the createElement fn to this instance\n  // so that we get proper render context inside it.\n  // args order: tag, data, children, normalizationType, alwaysNormalize\n  // internal version is used by render functions compiled from templates\n  vm._c = function (a, b, c, d) { return createElement(vm, a, b, c, d, false); };\n  // normalization is always applied for the public version, used in\n  // user-written render functions.\n  vm.$createElement = function (a, b, c, d) { return createElement(vm, a, b, c, d, true); };\n}\n\nfunction renderMixin (Vue) {\n  Vue.prototype.$nextTick = function (fn) {\n    return nextTick(fn, this)\n  };\n\n  Vue.prototype._render = function () {\n    var vm = this;\n    var ref = vm.$options;\n    var render = ref.render;\n    var staticRenderFns = ref.staticRenderFns;\n    var _parentVnode = ref._parentVnode;\n\n    if (vm._isMounted) {\n      // clone slot nodes on re-renders\n      for (var key in vm.$slots) {\n        vm.$slots[key] = cloneVNodes(vm.$slots[key]);\n      }\n    }\n\n    vm.$scopedSlots = (_parentVnode && _parentVnode.data.scopedSlots) || emptyObject;\n\n    if (staticRenderFns && !vm._staticTrees) {\n      vm._staticTrees = [];\n    }\n    // set parent vnode. this allows render functions to have access\n    // to the data on the placeholder node.\n    vm.$vnode = _parentVnode;\n    // render self\n    var vnode;\n    try {\n      vnode = render.call(vm._renderProxy, vm.$createElement);\n    } catch (e) {\n      handleError(e, vm, \"render function\");\n      // return error render result,\n      // or previous vnode to prevent render error causing blank component\n      /* istanbul ignore else */\n      if (process.env.NODE_ENV !== 'production') {\n        vnode = vm.$options.renderError\n          ? vm.$options.renderError.call(vm._renderProxy, vm.$createElement, e)\n          : vm._vnode;\n      } else {\n        vnode = vm._vnode;\n      }\n    }\n    // return empty vnode in case the render function errored out\n    if (!(vnode instanceof VNode)) {\n      if (process.env.NODE_ENV !== 'production' && Array.isArray(vnode)) {\n        warn(\n          'Multiple root nodes returned from render function. Render function ' +\n          'should return a single root node.',\n          vm\n        );\n      }\n      vnode = createEmptyVNode();\n    }\n    // set parent\n    vnode.parent = _parentVnode;\n    return vnode\n  };\n\n  // internal render helpers.\n  // these are exposed on the instance prototype to reduce generated render\n  // code size.\n  Vue.prototype._o = markOnce;\n  Vue.prototype._n = toNumber;\n  Vue.prototype._s = _toString;\n  Vue.prototype._l = renderList;\n  Vue.prototype._t = renderSlot;\n  Vue.prototype._q = looseEqual;\n  Vue.prototype._i = looseIndexOf;\n  Vue.prototype._m = renderStatic;\n  Vue.prototype._f = resolveFilter;\n  Vue.prototype._k = checkKeyCodes;\n  Vue.prototype._b = bindObjectProps;\n  Vue.prototype._v = createTextVNode;\n  Vue.prototype._e = createEmptyVNode;\n  Vue.prototype._u = resolveScopedSlots;\n}\n\n/*  */\n\nfunction initProvide (vm) {\n  var provide = vm.$options.provide;\n  if (provide) {\n    vm._provided = typeof provide === 'function'\n      ? provide.call(vm)\n      : provide;\n  }\n}\n\nfunction initInjections (vm) {\n  var inject = vm.$options.inject;\n  if (inject) {\n    // inject is :any because flow is not smart enough to figure out cached\n    // isArray here\n    var isArray = Array.isArray(inject);\n    var keys = isArray\n      ? inject\n      : hasSymbol\n        ? Reflect.ownKeys(inject)\n        : Object.keys(inject);\n\n    var loop = function ( i ) {\n      var key = keys[i];\n      var provideKey = isArray ? key : inject[key];\n      var source = vm;\n      while (source) {\n        if (source._provided && provideKey in source._provided) {\n          /* istanbul ignore else */\n          if (process.env.NODE_ENV !== 'production') {\n            defineReactive$$1(vm, key, source._provided[provideKey], function () {\n              warn(\n                \"Avoid mutating an injected value directly since the changes will be \" +\n                \"overwritten whenever the provided component re-renders. \" +\n                \"injection being mutated: \\\"\" + key + \"\\\"\",\n                vm\n              );\n            });\n          } else {\n            defineReactive$$1(vm, key, source._provided[provideKey]);\n          }\n          break\n        }\n        source = source.$parent;\n      }\n    };\n\n    for (var i = 0; i < keys.length; i++) loop( i );\n  }\n}\n\n/*  */\n\nvar uid = 0;\n\nfunction initMixin (Vue) {\n  Vue.prototype._init = function (options) {\n    var vm = this;\n    // a uid\n    vm._uid = uid++;\n\n    var startTag, endTag;\n    /* istanbul ignore if */\n    if (process.env.NODE_ENV !== 'production' && config.performance && mark) {\n      startTag = \"vue-perf-init:\" + (vm._uid);\n      endTag = \"vue-perf-end:\" + (vm._uid);\n      mark(startTag);\n    }\n\n    // a flag to avoid this being observed\n    vm._isVue = true;\n    // merge options\n    if (options && options._isComponent) {\n      // optimize internal component instantiation\n      // since dynamic options merging is pretty slow, and none of the\n      // internal component options needs special treatment.\n      initInternalComponent(vm, options);\n    } else {\n      vm.$options = mergeOptions(\n        resolveConstructorOptions(vm.constructor),\n        options || {},\n        vm\n      );\n    }\n    /* istanbul ignore else */\n    if (process.env.NODE_ENV !== 'production') {\n      initProxy(vm);\n    } else {\n      vm._renderProxy = vm;\n    }\n    // expose real self\n    vm._self = vm;\n    initLifecycle(vm);\n    initEvents(vm);\n    initRender(vm);\n    callHook(vm, 'beforeCreate');\n    initInjections(vm); // resolve injections before data/props\n    initState(vm);\n    initProvide(vm); // resolve provide after data/props\n    callHook(vm, 'created');\n\n    /* istanbul ignore if */\n    if (process.env.NODE_ENV !== 'production' && config.performance && mark) {\n      vm._name = formatComponentName(vm, false);\n      mark(endTag);\n      measure(((vm._name) + \" init\"), startTag, endTag);\n    }\n\n    if (vm.$options.el) {\n      vm.$mount(vm.$options.el);\n    }\n  };\n}\n\nfunction initInternalComponent (vm, options) {\n  var opts = vm.$options = Object.create(vm.constructor.options);\n  // doing this because it's faster than dynamic enumeration.\n  opts.parent = options.parent;\n  opts.propsData = options.propsData;\n  opts._parentVnode = options._parentVnode;\n  opts._parentListeners = options._parentListeners;\n  opts._renderChildren = options._renderChildren;\n  opts._componentTag = options._componentTag;\n  opts._parentElm = options._parentElm;\n  opts._refElm = options._refElm;\n  if (options.render) {\n    opts.render = options.render;\n    opts.staticRenderFns = options.staticRenderFns;\n  }\n}\n\nfunction resolveConstructorOptions (Ctor) {\n  var options = Ctor.options;\n  if (Ctor.super) {\n    var superOptions = resolveConstructorOptions(Ctor.super);\n    var cachedSuperOptions = Ctor.superOptions;\n    if (superOptions !== cachedSuperOptions) {\n      // super option changed,\n      // need to resolve new options.\n      Ctor.superOptions = superOptions;\n      // check if there are any late-modified/attached options (#4976)\n      var modifiedOptions = resolveModifiedOptions(Ctor);\n      // update base extend options\n      if (modifiedOptions) {\n        extend(Ctor.extendOptions, modifiedOptions);\n      }\n      options = Ctor.options = mergeOptions(superOptions, Ctor.extendOptions);\n      if (options.name) {\n        options.components[options.name] = Ctor;\n      }\n    }\n  }\n  return options\n}\n\nfunction resolveModifiedOptions (Ctor) {\n  var modified;\n  var latest = Ctor.options;\n  var sealed = Ctor.sealedOptions;\n  for (var key in latest) {\n    if (latest[key] !== sealed[key]) {\n      if (!modified) { modified = {}; }\n      modified[key] = dedupe(latest[key], sealed[key]);\n    }\n  }\n  return modified\n}\n\nfunction dedupe (latest, sealed) {\n  // compare latest and sealed to ensure lifecycle hooks won't be duplicated\n  // between merges\n  if (Array.isArray(latest)) {\n    var res = [];\n    sealed = Array.isArray(sealed) ? sealed : [sealed];\n    for (var i = 0; i < latest.length; i++) {\n      if (sealed.indexOf(latest[i]) < 0) {\n        res.push(latest[i]);\n      }\n    }\n    return res\n  } else {\n    return latest\n  }\n}\n\nfunction Vue$3 (options) {\n  if (process.env.NODE_ENV !== 'production' &&\n    !(this instanceof Vue$3)) {\n    warn('Vue is a constructor and should be called with the `new` keyword');\n  }\n  this._init(options);\n}\n\ninitMixin(Vue$3);\nstateMixin(Vue$3);\neventsMixin(Vue$3);\nlifecycleMixin(Vue$3);\nrenderMixin(Vue$3);\n\n/*  */\n\nfunction initUse (Vue) {\n  Vue.use = function (plugin) {\n    /* istanbul ignore if */\n    if (plugin.installed) {\n      return\n    }\n    // additional parameters\n    var args = toArray(arguments, 1);\n    args.unshift(this);\n    if (typeof plugin.install === 'function') {\n      plugin.install.apply(plugin, args);\n    } else if (typeof plugin === 'function') {\n      plugin.apply(null, args);\n    }\n    plugin.installed = true;\n    return this\n  };\n}\n\n/*  */\n\nfunction initMixin$1 (Vue) {\n  Vue.mixin = function (mixin) {\n    this.options = mergeOptions(this.options, mixin);\n  };\n}\n\n/*  */\n\nfunction initExtend (Vue) {\n  /**\n   * Each instance constructor, including Vue, has a unique\n   * cid. This enables us to create wrapped \"child\n   * constructors\" for prototypal inheritance and cache them.\n   */\n  Vue.cid = 0;\n  var cid = 1;\n\n  /**\n   * Class inheritance\n   */\n  Vue.extend = function (extendOptions) {\n    extendOptions = extendOptions || {};\n    var Super = this;\n    var SuperId = Super.cid;\n    var cachedCtors = extendOptions._Ctor || (extendOptions._Ctor = {});\n    if (cachedCtors[SuperId]) {\n      return cachedCtors[SuperId]\n    }\n\n    var name = extendOptions.name || Super.options.name;\n    if (process.env.NODE_ENV !== 'production') {\n      if (!/^[a-zA-Z][\\w-]*$/.test(name)) {\n        warn(\n          'Invalid component name: \"' + name + '\". Component names ' +\n          'can only contain alphanumeric characters and the hyphen, ' +\n          'and must start with a letter.'\n        );\n      }\n    }\n\n    var Sub = function VueComponent (options) {\n      this._init(options);\n    };\n    Sub.prototype = Object.create(Super.prototype);\n    Sub.prototype.constructor = Sub;\n    Sub.cid = cid++;\n    Sub.options = mergeOptions(\n      Super.options,\n      extendOptions\n    );\n    Sub['super'] = Super;\n\n    // For props and computed properties, we define the proxy getters on\n    // the Vue instances at extension time, on the extended prototype. This\n    // avoids Object.defineProperty calls for each instance created.\n    if (Sub.options.props) {\n      initProps$1(Sub);\n    }\n    if (Sub.options.computed) {\n      initComputed$1(Sub);\n    }\n\n    // allow further extension/mixin/plugin usage\n    Sub.extend = Super.extend;\n    Sub.mixin = Super.mixin;\n    Sub.use = Super.use;\n\n    // create asset registers, so extended classes\n    // can have their private assets too.\n    config._assetTypes.forEach(function (type) {\n      Sub[type] = Super[type];\n    });\n    // enable recursive self-lookup\n    if (name) {\n      Sub.options.components[name] = Sub;\n    }\n\n    // keep a reference to the super options at extension time.\n    // later at instantiation we can check if Super's options have\n    // been updated.\n    Sub.superOptions = Super.options;\n    Sub.extendOptions = extendOptions;\n    Sub.sealedOptions = extend({}, Sub.options);\n\n    // cache constructor\n    cachedCtors[SuperId] = Sub;\n    return Sub\n  };\n}\n\nfunction initProps$1 (Comp) {\n  var props = Comp.options.props;\n  for (var key in props) {\n    proxy(Comp.prototype, \"_props\", key);\n  }\n}\n\nfunction initComputed$1 (Comp) {\n  var computed = Comp.options.computed;\n  for (var key in computed) {\n    defineComputed(Comp.prototype, key, computed[key]);\n  }\n}\n\n/*  */\n\nfunction initAssetRegisters (Vue) {\n  /**\n   * Create asset registration methods.\n   */\n  config._assetTypes.forEach(function (type) {\n    Vue[type] = function (\n      id,\n      definition\n    ) {\n      if (!definition) {\n        return this.options[type + 's'][id]\n      } else {\n        /* istanbul ignore if */\n        if (process.env.NODE_ENV !== 'production') {\n          if (type === 'component' && config.isReservedTag(id)) {\n            warn(\n              'Do not use built-in or reserved HTML elements as component ' +\n              'id: ' + id\n            );\n          }\n        }\n        if (type === 'component' && isPlainObject(definition)) {\n          definition.name = definition.name || id;\n          definition = this.options._base.extend(definition);\n        }\n        if (type === 'directive' && typeof definition === 'function') {\n          definition = { bind: definition, update: definition };\n        }\n        this.options[type + 's'][id] = definition;\n        return definition\n      }\n    };\n  });\n}\n\n/*  */\n\nvar patternTypes = [String, RegExp];\n\nfunction getComponentName (opts) {\n  return opts && (opts.Ctor.options.name || opts.tag)\n}\n\nfunction matches (pattern, name) {\n  if (typeof pattern === 'string') {\n    return pattern.split(',').indexOf(name) > -1\n  } else if (pattern instanceof RegExp) {\n    return pattern.test(name)\n  }\n  /* istanbul ignore next */\n  return false\n}\n\nfunction pruneCache (cache, filter) {\n  for (var key in cache) {\n    var cachedNode = cache[key];\n    if (cachedNode) {\n      var name = getComponentName(cachedNode.componentOptions);\n      if (name && !filter(name)) {\n        pruneCacheEntry(cachedNode);\n        cache[key] = null;\n      }\n    }\n  }\n}\n\nfunction pruneCacheEntry (vnode) {\n  if (vnode) {\n    if (!vnode.componentInstance._inactive) {\n      callHook(vnode.componentInstance, 'deactivated');\n    }\n    vnode.componentInstance.$destroy();\n  }\n}\n\nvar KeepAlive = {\n  name: 'keep-alive',\n  abstract: true,\n\n  props: {\n    include: patternTypes,\n    exclude: patternTypes\n  },\n\n  created: function created () {\n    this.cache = Object.create(null);\n  },\n\n  destroyed: function destroyed () {\n    var this$1 = this;\n\n    for (var key in this$1.cache) {\n      pruneCacheEntry(this$1.cache[key]);\n    }\n  },\n\n  watch: {\n    include: function include (val) {\n      pruneCache(this.cache, function (name) { return matches(val, name); });\n    },\n    exclude: function exclude (val) {\n      pruneCache(this.cache, function (name) { return !matches(val, name); });\n    }\n  },\n\n  render: function render () {\n    var vnode = getFirstComponentChild(this.$slots.default);\n    var componentOptions = vnode && vnode.componentOptions;\n    if (componentOptions) {\n      // check pattern\n      var name = getComponentName(componentOptions);\n      if (name && (\n        (this.include && !matches(this.include, name)) ||\n        (this.exclude && matches(this.exclude, name))\n      )) {\n        return vnode\n      }\n      var key = vnode.key == null\n        // same constructor may get registered as different local components\n        // so cid alone is not enough (#3269)\n        ? componentOptions.Ctor.cid + (componentOptions.tag ? (\"::\" + (componentOptions.tag)) : '')\n        : vnode.key;\n      if (this.cache[key]) {\n        vnode.componentInstance = this.cache[key].componentInstance;\n      } else {\n        this.cache[key] = vnode;\n      }\n      vnode.data.keepAlive = true;\n    }\n    return vnode\n  }\n};\n\nvar builtInComponents = {\n  KeepAlive: KeepAlive\n};\n\n/*  */\n\nfunction initGlobalAPI (Vue) {\n  // config\n  var configDef = {};\n  configDef.get = function () { return config; };\n  if (process.env.NODE_ENV !== 'production') {\n    configDef.set = function () {\n      warn(\n        'Do not replace the Vue.config object, set individual fields instead.'\n      );\n    };\n  }\n  Object.defineProperty(Vue, 'config', configDef);\n\n  // exposed util methods.\n  // NOTE: these are not considered part of the public API - avoid relying on\n  // them unless you are aware of the risk.\n  Vue.util = {\n    warn: warn,\n    extend: extend,\n    mergeOptions: mergeOptions,\n    defineReactive: defineReactive$$1\n  };\n\n  Vue.set = set;\n  Vue.delete = del;\n  Vue.nextTick = nextTick;\n\n  Vue.options = Object.create(null);\n  config._assetTypes.forEach(function (type) {\n    Vue.options[type + 's'] = Object.create(null);\n  });\n\n  // this is used to identify the \"base\" constructor to extend all plain-object\n  // components with in Weex's multi-instance scenarios.\n  Vue.options._base = Vue;\n\n  extend(Vue.options.components, builtInComponents);\n\n  initUse(Vue);\n  initMixin$1(Vue);\n  initExtend(Vue);\n  initAssetRegisters(Vue);\n}\n\ninitGlobalAPI(Vue$3);\n\nObject.defineProperty(Vue$3.prototype, '$isServer', {\n  get: isServerRendering\n});\n\nVue$3.version = '2.2.6';\n\n/*  */\n\n// attributes that should be using props for binding\nvar acceptValue = makeMap('input,textarea,option,select');\nvar mustUseProp = function (tag, type, attr) {\n  return (\n    (attr === 'value' && acceptValue(tag)) && type !== 'button' ||\n    (attr === 'selected' && tag === 'option') ||\n    (attr === 'checked' && tag === 'input') ||\n    (attr === 'muted' && tag === 'video')\n  )\n};\n\nvar isEnumeratedAttr = makeMap('contenteditable,draggable,spellcheck');\n\nvar isBooleanAttr = makeMap(\n  'allowfullscreen,async,autofocus,autoplay,checked,compact,controls,declare,' +\n  'default,defaultchecked,defaultmuted,defaultselected,defer,disabled,' +\n  'enabled,formnovalidate,hidden,indeterminate,inert,ismap,itemscope,loop,multiple,' +\n  'muted,nohref,noresize,noshade,novalidate,nowrap,open,pauseonexit,readonly,' +\n  'required,reversed,scoped,seamless,selected,sortable,translate,' +\n  'truespeed,typemustmatch,visible'\n);\n\nvar xlinkNS = 'http://www.w3.org/1999/xlink';\n\nvar isXlink = function (name) {\n  return name.charAt(5) === ':' && name.slice(0, 5) === 'xlink'\n};\n\nvar getXlinkProp = function (name) {\n  return isXlink(name) ? name.slice(6, name.length) : ''\n};\n\nvar isFalsyAttrValue = function (val) {\n  return val == null || val === false\n};\n\n/*  */\n\nfunction genClassForVnode (vnode) {\n  var data = vnode.data;\n  var parentNode = vnode;\n  var childNode = vnode;\n  while (childNode.componentInstance) {\n    childNode = childNode.componentInstance._vnode;\n    if (childNode.data) {\n      data = mergeClassData(childNode.data, data);\n    }\n  }\n  while ((parentNode = parentNode.parent)) {\n    if (parentNode.data) {\n      data = mergeClassData(data, parentNode.data);\n    }\n  }\n  return genClassFromData(data)\n}\n\nfunction mergeClassData (child, parent) {\n  return {\n    staticClass: concat(child.staticClass, parent.staticClass),\n    class: child.class\n      ? [child.class, parent.class]\n      : parent.class\n  }\n}\n\nfunction genClassFromData (data) {\n  var dynamicClass = data.class;\n  var staticClass = data.staticClass;\n  if (staticClass || dynamicClass) {\n    return concat(staticClass, stringifyClass(dynamicClass))\n  }\n  /* istanbul ignore next */\n  return ''\n}\n\nfunction concat (a, b) {\n  return a ? b ? (a + ' ' + b) : a : (b || '')\n}\n\nfunction stringifyClass (value) {\n  var res = '';\n  if (!value) {\n    return res\n  }\n  if (typeof value === 'string') {\n    return value\n  }\n  if (Array.isArray(value)) {\n    var stringified;\n    for (var i = 0, l = value.length; i < l; i++) {\n      if (value[i]) {\n        if ((stringified = stringifyClass(value[i]))) {\n          res += stringified + ' ';\n        }\n      }\n    }\n    return res.slice(0, -1)\n  }\n  if (isObject(value)) {\n    for (var key in value) {\n      if (value[key]) { res += key + ' '; }\n    }\n    return res.slice(0, -1)\n  }\n  /* istanbul ignore next */\n  return res\n}\n\n/*  */\n\nvar namespaceMap = {\n  svg: 'http://www.w3.org/2000/svg',\n  math: 'http://www.w3.org/1998/Math/MathML'\n};\n\nvar isHTMLTag = makeMap(\n  'html,body,base,head,link,meta,style,title,' +\n  'address,article,aside,footer,header,h1,h2,h3,h4,h5,h6,hgroup,nav,section,' +\n  'div,dd,dl,dt,figcaption,figure,hr,img,li,main,ol,p,pre,ul,' +\n  'a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,rtc,ruby,' +\n  's,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,' +\n  'embed,object,param,source,canvas,script,noscript,del,ins,' +\n  'caption,col,colgroup,table,thead,tbody,td,th,tr,' +\n  'button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,' +\n  'output,progress,select,textarea,' +\n  'details,dialog,menu,menuitem,summary,' +\n  'content,element,shadow,template'\n);\n\n// this map is intentionally selective, only covering SVG elements that may\n// contain child elements.\nvar isSVG = makeMap(\n  'svg,animate,circle,clippath,cursor,defs,desc,ellipse,filter,font-face,' +\n  'foreignObject,g,glyph,image,line,marker,mask,missing-glyph,path,pattern,' +\n  'polygon,polyline,rect,switch,symbol,text,textpath,tspan,use,view',\n  true\n);\n\nvar isPreTag = function (tag) { return tag === 'pre'; };\n\nvar isReservedTag = function (tag) {\n  return isHTMLTag(tag) || isSVG(tag)\n};\n\nfunction getTagNamespace (tag) {\n  if (isSVG(tag)) {\n    return 'svg'\n  }\n  // basic support for MathML\n  // note it doesn't support other MathML elements being component roots\n  if (tag === 'math') {\n    return 'math'\n  }\n}\n\nvar unknownElementCache = Object.create(null);\nfunction isUnknownElement (tag) {\n  /* istanbul ignore if */\n  if (!inBrowser) {\n    return true\n  }\n  if (isReservedTag(tag)) {\n    return false\n  }\n  tag = tag.toLowerCase();\n  /* istanbul ignore if */\n  if (unknownElementCache[tag] != null) {\n    return unknownElementCache[tag]\n  }\n  var el = document.createElement(tag);\n  if (tag.indexOf('-') > -1) {\n    // http://stackoverflow.com/a/28210364/1070244\n    return (unknownElementCache[tag] = (\n      el.constructor === window.HTMLUnknownElement ||\n      el.constructor === window.HTMLElement\n    ))\n  } else {\n    return (unknownElementCache[tag] = /HTMLUnknownElement/.test(el.toString()))\n  }\n}\n\n/*  */\n\n/**\n * Query an element selector if it's not an element already.\n */\nfunction query (el) {\n  if (typeof el === 'string') {\n    var selected = document.querySelector(el);\n    if (!selected) {\n      process.env.NODE_ENV !== 'production' && warn(\n        'Cannot find element: ' + el\n      );\n      return document.createElement('div')\n    }\n    return selected\n  } else {\n    return el\n  }\n}\n\n/*  */\n\nfunction createElement$1 (tagName, vnode) {\n  var elm = document.createElement(tagName);\n  if (tagName !== 'select') {\n    return elm\n  }\n  // false or null will remove the attribute but undefined will not\n  if (vnode.data && vnode.data.attrs && vnode.data.attrs.multiple !== undefined) {\n    elm.setAttribute('multiple', 'multiple');\n  }\n  return elm\n}\n\nfunction createElementNS (namespace, tagName) {\n  return document.createElementNS(namespaceMap[namespace], tagName)\n}\n\nfunction createTextNode (text) {\n  return document.createTextNode(text)\n}\n\nfunction createComment (text) {\n  return document.createComment(text)\n}\n\nfunction insertBefore (parentNode, newNode, referenceNode) {\n  parentNode.insertBefore(newNode, referenceNode);\n}\n\nfunction removeChild (node, child) {\n  node.removeChild(child);\n}\n\nfunction appendChild (node, child) {\n  node.appendChild(child);\n}\n\nfunction parentNode (node) {\n  return node.parentNode\n}\n\nfunction nextSibling (node) {\n  return node.nextSibling\n}\n\nfunction tagName (node) {\n  return node.tagName\n}\n\nfunction setTextContent (node, text) {\n  node.textContent = text;\n}\n\nfunction setAttribute (node, key, val) {\n  node.setAttribute(key, val);\n}\n\n\nvar nodeOps = Object.freeze({\n\tcreateElement: createElement$1,\n\tcreateElementNS: createElementNS,\n\tcreateTextNode: createTextNode,\n\tcreateComment: createComment,\n\tinsertBefore: insertBefore,\n\tremoveChild: removeChild,\n\tappendChild: appendChild,\n\tparentNode: parentNode,\n\tnextSibling: nextSibling,\n\ttagName: tagName,\n\tsetTextContent: setTextContent,\n\tsetAttribute: setAttribute\n});\n\n/*  */\n\nvar ref = {\n  create: function create (_, vnode) {\n    registerRef(vnode);\n  },\n  update: function update (oldVnode, vnode) {\n    if (oldVnode.data.ref !== vnode.data.ref) {\n      registerRef(oldVnode, true);\n      registerRef(vnode);\n    }\n  },\n  destroy: function destroy (vnode) {\n    registerRef(vnode, true);\n  }\n};\n\nfunction registerRef (vnode, isRemoval) {\n  var key = vnode.data.ref;\n  if (!key) { return }\n\n  var vm = vnode.context;\n  var ref = vnode.componentInstance || vnode.elm;\n  var refs = vm.$refs;\n  if (isRemoval) {\n    if (Array.isArray(refs[key])) {\n      remove(refs[key], ref);\n    } else if (refs[key] === ref) {\n      refs[key] = undefined;\n    }\n  } else {\n    if (vnode.data.refInFor) {\n      if (Array.isArray(refs[key]) && refs[key].indexOf(ref) < 0) {\n        refs[key].push(ref);\n      } else {\n        refs[key] = [ref];\n      }\n    } else {\n      refs[key] = ref;\n    }\n  }\n}\n\n/**\n * Virtual DOM patching algorithm based on Snabbdom by\n * Simon Friis Vindum (@paldepind)\n * Licensed under the MIT License\n * https://github.com/paldepind/snabbdom/blob/master/LICENSE\n *\n * modified by Evan You (@yyx990803)\n *\n\n/*\n * Not type-checking this because this file is perf-critical and the cost\n * of making flow understand it is not worth it.\n */\n\nvar emptyNode = new VNode('', {}, []);\n\nvar hooks = ['create', 'activate', 'update', 'remove', 'destroy'];\n\nfunction isUndef (v) {\n  return v === undefined || v === null\n}\n\nfunction isDef (v) {\n  return v !== undefined && v !== null\n}\n\nfunction isTrue (v) {\n  return v === true\n}\n\nfunction sameVnode (a, b) {\n  return (\n    a.key === b.key &&\n    a.tag === b.tag &&\n    a.isComment === b.isComment &&\n    isDef(a.data) === isDef(b.data) &&\n    sameInputType(a, b)\n  )\n}\n\n// Some browsers do not support dynamically changing type for <input>\n// so they need to be treated as different nodes\nfunction sameInputType (a, b) {\n  if (a.tag !== 'input') { return true }\n  var i;\n  var typeA = isDef(i = a.data) && isDef(i = i.attrs) && i.type;\n  var typeB = isDef(i = b.data) && isDef(i = i.attrs) && i.type;\n  return typeA === typeB\n}\n\nfunction createKeyToOldIdx (children, beginIdx, endIdx) {\n  var i, key;\n  var map = {};\n  for (i = beginIdx; i <= endIdx; ++i) {\n    key = children[i].key;\n    if (isDef(key)) { map[key] = i; }\n  }\n  return map\n}\n\nfunction createPatchFunction (backend) {\n  var i, j;\n  var cbs = {};\n\n  var modules = backend.modules;\n  var nodeOps = backend.nodeOps;\n\n  for (i = 0; i < hooks.length; ++i) {\n    cbs[hooks[i]] = [];\n    for (j = 0; j < modules.length; ++j) {\n      if (isDef(modules[j][hooks[i]])) {\n        cbs[hooks[i]].push(modules[j][hooks[i]]);\n      }\n    }\n  }\n\n  function emptyNodeAt (elm) {\n    return new VNode(nodeOps.tagName(elm).toLowerCase(), {}, [], undefined, elm)\n  }\n\n  function createRmCb (childElm, listeners) {\n    function remove$$1 () {\n      if (--remove$$1.listeners === 0) {\n        removeNode(childElm);\n      }\n    }\n    remove$$1.listeners = listeners;\n    return remove$$1\n  }\n\n  function removeNode (el) {\n    var parent = nodeOps.parentNode(el);\n    // element may have already been removed due to v-html / v-text\n    if (isDef(parent)) {\n      nodeOps.removeChild(parent, el);\n    }\n  }\n\n  var inPre = 0;\n  function createElm (vnode, insertedVnodeQueue, parentElm, refElm, nested) {\n    vnode.isRootInsert = !nested; // for transition enter check\n    if (createComponent(vnode, insertedVnodeQueue, parentElm, refElm)) {\n      return\n    }\n\n    var data = vnode.data;\n    var children = vnode.children;\n    var tag = vnode.tag;\n    if (isDef(tag)) {\n      if (process.env.NODE_ENV !== 'production') {\n        if (data && data.pre) {\n          inPre++;\n        }\n        if (\n          !inPre &&\n          !vnode.ns &&\n          !(config.ignoredElements.length && config.ignoredElements.indexOf(tag) > -1) &&\n          config.isUnknownElement(tag)\n        ) {\n          warn(\n            'Unknown custom element: <' + tag + '> - did you ' +\n            'register the component correctly? For recursive components, ' +\n            'make sure to provide the \"name\" option.',\n            vnode.context\n          );\n        }\n      }\n      vnode.elm = vnode.ns\n        ? nodeOps.createElementNS(vnode.ns, tag)\n        : nodeOps.createElement(tag, vnode);\n      setScope(vnode);\n\n      /* istanbul ignore if */\n      {\n        createChildren(vnode, children, insertedVnodeQueue);\n        if (isDef(data)) {\n          invokeCreateHooks(vnode, insertedVnodeQueue);\n        }\n        insert(parentElm, vnode.elm, refElm);\n      }\n\n      if (process.env.NODE_ENV !== 'production' && data && data.pre) {\n        inPre--;\n      }\n    } else if (isTrue(vnode.isComment)) {\n      vnode.elm = nodeOps.createComment(vnode.text);\n      insert(parentElm, vnode.elm, refElm);\n    } else {\n      vnode.elm = nodeOps.createTextNode(vnode.text);\n      insert(parentElm, vnode.elm, refElm);\n    }\n  }\n\n  function createComponent (vnode, insertedVnodeQueue, parentElm, refElm) {\n    var i = vnode.data;\n    if (isDef(i)) {\n      var isReactivated = isDef(vnode.componentInstance) && i.keepAlive;\n      if (isDef(i = i.hook) && isDef(i = i.init)) {\n        i(vnode, false /* hydrating */, parentElm, refElm);\n      }\n      // after calling the init hook, if the vnode is a child component\n      // it should've created a child instance and mounted it. the child\n      // component also has set the placeholder vnode's elm.\n      // in that case we can just return the element and be done.\n      if (isDef(vnode.componentInstance)) {\n        initComponent(vnode, insertedVnodeQueue);\n        if (isTrue(isReactivated)) {\n          reactivateComponent(vnode, insertedVnodeQueue, parentElm, refElm);\n        }\n        return true\n      }\n    }\n  }\n\n  function initComponent (vnode, insertedVnodeQueue) {\n    if (isDef(vnode.data.pendingInsert)) {\n      insertedVnodeQueue.push.apply(insertedVnodeQueue, vnode.data.pendingInsert);\n    }\n    vnode.elm = vnode.componentInstance.$el;\n    if (isPatchable(vnode)) {\n      invokeCreateHooks(vnode, insertedVnodeQueue);\n      setScope(vnode);\n    } else {\n      // empty component root.\n      // skip all element-related modules except for ref (#3455)\n      registerRef(vnode);\n      // make sure to invoke the insert hook\n      insertedVnodeQueue.push(vnode);\n    }\n  }\n\n  function reactivateComponent (vnode, insertedVnodeQueue, parentElm, refElm) {\n    var i;\n    // hack for #4339: a reactivated component with inner transition\n    // does not trigger because the inner node's created hooks are not called\n    // again. It's not ideal to involve module-specific logic in here but\n    // there doesn't seem to be a better way to do it.\n    var innerNode = vnode;\n    while (innerNode.componentInstance) {\n      innerNode = innerNode.componentInstance._vnode;\n      if (isDef(i = innerNode.data) && isDef(i = i.transition)) {\n        for (i = 0; i < cbs.activate.length; ++i) {\n          cbs.activate[i](emptyNode, innerNode);\n        }\n        insertedVnodeQueue.push(innerNode);\n        break\n      }\n    }\n    // unlike a newly created component,\n    // a reactivated keep-alive component doesn't insert itself\n    insert(parentElm, vnode.elm, refElm);\n  }\n\n  function insert (parent, elm, ref) {\n    if (isDef(parent)) {\n      if (isDef(ref)) {\n        nodeOps.insertBefore(parent, elm, ref);\n      } else {\n        nodeOps.appendChild(parent, elm);\n      }\n    }\n  }\n\n  function createChildren (vnode, children, insertedVnodeQueue) {\n    if (Array.isArray(children)) {\n      for (var i = 0; i < children.length; ++i) {\n        createElm(children[i], insertedVnodeQueue, vnode.elm, null, true);\n      }\n    } else if (isPrimitive(vnode.text)) {\n      nodeOps.appendChild(vnode.elm, nodeOps.createTextNode(vnode.text));\n    }\n  }\n\n  function isPatchable (vnode) {\n    while (vnode.componentInstance) {\n      vnode = vnode.componentInstance._vnode;\n    }\n    return isDef(vnode.tag)\n  }\n\n  function invokeCreateHooks (vnode, insertedVnodeQueue) {\n    for (var i$1 = 0; i$1 < cbs.create.length; ++i$1) {\n      cbs.create[i$1](emptyNode, vnode);\n    }\n    i = vnode.data.hook; // Reuse variable\n    if (isDef(i)) {\n      if (isDef(i.create)) { i.create(emptyNode, vnode); }\n      if (isDef(i.insert)) { insertedVnodeQueue.push(vnode); }\n    }\n  }\n\n  // set scope id attribute for scoped CSS.\n  // this is implemented as a special case to avoid the overhead\n  // of going through the normal attribute patching process.\n  function setScope (vnode) {\n    var i;\n    var ancestor = vnode;\n    while (ancestor) {\n      if (isDef(i = ancestor.context) && isDef(i = i.$options._scopeId)) {\n        nodeOps.setAttribute(vnode.elm, i, '');\n      }\n      ancestor = ancestor.parent;\n    }\n    // for slot content they should also get the scopeId from the host instance.\n    if (isDef(i = activeInstance) &&\n        i !== vnode.context &&\n        isDef(i = i.$options._scopeId)) {\n      nodeOps.setAttribute(vnode.elm, i, '');\n    }\n  }\n\n  function addVnodes (parentElm, refElm, vnodes, startIdx, endIdx, insertedVnodeQueue) {\n    for (; startIdx <= endIdx; ++startIdx) {\n      createElm(vnodes[startIdx], insertedVnodeQueue, parentElm, refElm);\n    }\n  }\n\n  function invokeDestroyHook (vnode) {\n    var i, j;\n    var data = vnode.data;\n    if (isDef(data)) {\n      if (isDef(i = data.hook) && isDef(i = i.destroy)) { i(vnode); }\n      for (i = 0; i < cbs.destroy.length; ++i) { cbs.destroy[i](vnode); }\n    }\n    if (isDef(i = vnode.children)) {\n      for (j = 0; j < vnode.children.length; ++j) {\n        invokeDestroyHook(vnode.children[j]);\n      }\n    }\n  }\n\n  function removeVnodes (parentElm, vnodes, startIdx, endIdx) {\n    for (; startIdx <= endIdx; ++startIdx) {\n      var ch = vnodes[startIdx];\n      if (isDef(ch)) {\n        if (isDef(ch.tag)) {\n          removeAndInvokeRemoveHook(ch);\n          invokeDestroyHook(ch);\n        } else { // Text node\n          removeNode(ch.elm);\n        }\n      }\n    }\n  }\n\n  function removeAndInvokeRemoveHook (vnode, rm) {\n    if (isDef(rm) || isDef(vnode.data)) {\n      var listeners = cbs.remove.length + 1;\n      if (isDef(rm)) {\n        // we have a recursively passed down rm callback\n        // increase the listeners count\n        rm.listeners += listeners;\n      } else {\n        // directly removing\n        rm = createRmCb(vnode.elm, listeners);\n      }\n      // recursively invoke hooks on child component root node\n      if (isDef(i = vnode.componentInstance) && isDef(i = i._vnode) && isDef(i.data)) {\n        removeAndInvokeRemoveHook(i, rm);\n      }\n      for (i = 0; i < cbs.remove.length; ++i) {\n        cbs.remove[i](vnode, rm);\n      }\n      if (isDef(i = vnode.data.hook) && isDef(i = i.remove)) {\n        i(vnode, rm);\n      } else {\n        rm();\n      }\n    } else {\n      removeNode(vnode.elm);\n    }\n  }\n\n  function updateChildren (parentElm, oldCh, newCh, insertedVnodeQueue, removeOnly) {\n    var oldStartIdx = 0;\n    var newStartIdx = 0;\n    var oldEndIdx = oldCh.length - 1;\n    var oldStartVnode = oldCh[0];\n    var oldEndVnode = oldCh[oldEndIdx];\n    var newEndIdx = newCh.length - 1;\n    var newStartVnode = newCh[0];\n    var newEndVnode = newCh[newEndIdx];\n    var oldKeyToIdx, idxInOld, elmToMove, refElm;\n\n    // removeOnly is a special flag used only by <transition-group>\n    // to ensure removed elements stay in correct relative positions\n    // during leaving transitions\n    var canMove = !removeOnly;\n\n    while (oldStartIdx <= oldEndIdx && newStartIdx <= newEndIdx) {\n      if (isUndef(oldStartVnode)) {\n        oldStartVnode = oldCh[++oldStartIdx]; // Vnode has been moved left\n      } else if (isUndef(oldEndVnode)) {\n        oldEndVnode = oldCh[--oldEndIdx];\n      } else if (sameVnode(oldStartVnode, newStartVnode)) {\n        patchVnode(oldStartVnode, newStartVnode, insertedVnodeQueue);\n        oldStartVnode = oldCh[++oldStartIdx];\n        newStartVnode = newCh[++newStartIdx];\n      } else if (sameVnode(oldEndVnode, newEndVnode)) {\n        patchVnode(oldEndVnode, newEndVnode, insertedVnodeQueue);\n        oldEndVnode = oldCh[--oldEndIdx];\n        newEndVnode = newCh[--newEndIdx];\n      } else if (sameVnode(oldStartVnode, newEndVnode)) { // Vnode moved right\n        patchVnode(oldStartVnode, newEndVnode, insertedVnodeQueue);\n        canMove && nodeOps.insertBefore(parentElm, oldStartVnode.elm, nodeOps.nextSibling(oldEndVnode.elm));\n        oldStartVnode = oldCh[++oldStartIdx];\n        newEndVnode = newCh[--newEndIdx];\n      } else if (sameVnode(oldEndVnode, newStartVnode)) { // Vnode moved left\n        patchVnode(oldEndVnode, newStartVnode, insertedVnodeQueue);\n        canMove && nodeOps.insertBefore(parentElm, oldEndVnode.elm, oldStartVnode.elm);\n        oldEndVnode = oldCh[--oldEndIdx];\n        newStartVnode = newCh[++newStartIdx];\n      } else {\n        if (isUndef(oldKeyToIdx)) { oldKeyToIdx = createKeyToOldIdx(oldCh, oldStartIdx, oldEndIdx); }\n        idxInOld = isDef(newStartVnode.key) ? oldKeyToIdx[newStartVnode.key] : null;\n        if (isUndef(idxInOld)) { // New element\n          createElm(newStartVnode, insertedVnodeQueue, parentElm, oldStartVnode.elm);\n          newStartVnode = newCh[++newStartIdx];\n        } else {\n          elmToMove = oldCh[idxInOld];\n          /* istanbul ignore if */\n          if (process.env.NODE_ENV !== 'production' && !elmToMove) {\n            warn(\n              'It seems there are duplicate keys that is causing an update error. ' +\n              'Make sure each v-for item has a unique key.'\n            );\n          }\n          if (sameVnode(elmToMove, newStartVnode)) {\n            patchVnode(elmToMove, newStartVnode, insertedVnodeQueue);\n            oldCh[idxInOld] = undefined;\n            canMove && nodeOps.insertBefore(parentElm, newStartVnode.elm, oldStartVnode.elm);\n            newStartVnode = newCh[++newStartIdx];\n          } else {\n            // same key but different element. treat as new element\n            createElm(newStartVnode, insertedVnodeQueue, parentElm, oldStartVnode.elm);\n            newStartVnode = newCh[++newStartIdx];\n          }\n        }\n      }\n    }\n    if (oldStartIdx > oldEndIdx) {\n      refElm = isUndef(newCh[newEndIdx + 1]) ? null : newCh[newEndIdx + 1].elm;\n      addVnodes(parentElm, refElm, newCh, newStartIdx, newEndIdx, insertedVnodeQueue);\n    } else if (newStartIdx > newEndIdx) {\n      removeVnodes(parentElm, oldCh, oldStartIdx, oldEndIdx);\n    }\n  }\n\n  function patchVnode (oldVnode, vnode, insertedVnodeQueue, removeOnly) {\n    if (oldVnode === vnode) {\n      return\n    }\n    // reuse element for static trees.\n    // note we only do this if the vnode is cloned -\n    // if the new node is not cloned it means the render functions have been\n    // reset by the hot-reload-api and we need to do a proper re-render.\n    if (isTrue(vnode.isStatic) &&\n        isTrue(oldVnode.isStatic) &&\n        vnode.key === oldVnode.key &&\n        (isTrue(vnode.isCloned) || isTrue(vnode.isOnce))) {\n      vnode.elm = oldVnode.elm;\n      vnode.componentInstance = oldVnode.componentInstance;\n      return\n    }\n    var i;\n    var data = vnode.data;\n    if (isDef(data) && isDef(i = data.hook) && isDef(i = i.prepatch)) {\n      i(oldVnode, vnode);\n    }\n    var elm = vnode.elm = oldVnode.elm;\n    var oldCh = oldVnode.children;\n    var ch = vnode.children;\n    if (isDef(data) && isPatchable(vnode)) {\n      for (i = 0; i < cbs.update.length; ++i) { cbs.update[i](oldVnode, vnode); }\n      if (isDef(i = data.hook) && isDef(i = i.update)) { i(oldVnode, vnode); }\n    }\n    if (isUndef(vnode.text)) {\n      if (isDef(oldCh) && isDef(ch)) {\n        if (oldCh !== ch) { updateChildren(elm, oldCh, ch, insertedVnodeQueue, removeOnly); }\n      } else if (isDef(ch)) {\n        if (isDef(oldVnode.text)) { nodeOps.setTextContent(elm, ''); }\n        addVnodes(elm, null, ch, 0, ch.length - 1, insertedVnodeQueue);\n      } else if (isDef(oldCh)) {\n        removeVnodes(elm, oldCh, 0, oldCh.length - 1);\n      } else if (isDef(oldVnode.text)) {\n        nodeOps.setTextContent(elm, '');\n      }\n    } else if (oldVnode.text !== vnode.text) {\n      nodeOps.setTextContent(elm, vnode.text);\n    }\n    if (isDef(data)) {\n      if (isDef(i = data.hook) && isDef(i = i.postpatch)) { i(oldVnode, vnode); }\n    }\n  }\n\n  function invokeInsertHook (vnode, queue, initial) {\n    // delay insert hooks for component root nodes, invoke them after the\n    // element is really inserted\n    if (isTrue(initial) && isDef(vnode.parent)) {\n      vnode.parent.data.pendingInsert = queue;\n    } else {\n      for (var i = 0; i < queue.length; ++i) {\n        queue[i].data.hook.insert(queue[i]);\n      }\n    }\n  }\n\n  var bailed = false;\n  // list of modules that can skip create hook during hydration because they\n  // are already rendered on the client or has no need for initialization\n  var isRenderedModule = makeMap('attrs,style,class,staticClass,staticStyle,key');\n\n  // Note: this is a browser-only function so we can assume elms are DOM nodes.\n  function hydrate (elm, vnode, insertedVnodeQueue) {\n    if (process.env.NODE_ENV !== 'production') {\n      if (!assertNodeMatch(elm, vnode)) {\n        return false\n      }\n    }\n    vnode.elm = elm;\n    var tag = vnode.tag;\n    var data = vnode.data;\n    var children = vnode.children;\n    if (isDef(data)) {\n      if (isDef(i = data.hook) && isDef(i = i.init)) { i(vnode, true /* hydrating */); }\n      if (isDef(i = vnode.componentInstance)) {\n        // child component. it should have hydrated its own tree.\n        initComponent(vnode, insertedVnodeQueue);\n        return true\n      }\n    }\n    if (isDef(tag)) {\n      if (isDef(children)) {\n        // empty element, allow client to pick up and populate children\n        if (!elm.hasChildNodes()) {\n          createChildren(vnode, children, insertedVnodeQueue);\n        } else {\n          var childrenMatch = true;\n          var childNode = elm.firstChild;\n          for (var i$1 = 0; i$1 < children.length; i$1++) {\n            if (!childNode || !hydrate(childNode, children[i$1], insertedVnodeQueue)) {\n              childrenMatch = false;\n              break\n            }\n            childNode = childNode.nextSibling;\n          }\n          // if childNode is not null, it means the actual childNodes list is\n          // longer than the virtual children list.\n          if (!childrenMatch || childNode) {\n            if (process.env.NODE_ENV !== 'production' &&\n                typeof console !== 'undefined' &&\n                !bailed) {\n              bailed = true;\n              console.warn('Parent: ', elm);\n              console.warn('Mismatching childNodes vs. VNodes: ', elm.childNodes, children);\n            }\n            return false\n          }\n        }\n      }\n      if (isDef(data)) {\n        for (var key in data) {\n          if (!isRenderedModule(key)) {\n            invokeCreateHooks(vnode, insertedVnodeQueue);\n            break\n          }\n        }\n      }\n    } else if (elm.data !== vnode.text) {\n      elm.data = vnode.text;\n    }\n    return true\n  }\n\n  function assertNodeMatch (node, vnode) {\n    if (isDef(vnode.tag)) {\n      return (\n        vnode.tag.indexOf('vue-component') === 0 ||\n        vnode.tag.toLowerCase() === (node.tagName && node.tagName.toLowerCase())\n      )\n    } else {\n      return node.nodeType === (vnode.isComment ? 8 : 3)\n    }\n  }\n\n  return function patch (oldVnode, vnode, hydrating, removeOnly, parentElm, refElm) {\n    if (isUndef(vnode)) {\n      if (isDef(oldVnode)) { invokeDestroyHook(oldVnode); }\n      return\n    }\n\n    var isInitialPatch = false;\n    var insertedVnodeQueue = [];\n\n    if (isUndef(oldVnode)) {\n      // empty mount (likely as component), create new root element\n      isInitialPatch = true;\n      createElm(vnode, insertedVnodeQueue, parentElm, refElm);\n    } else {\n      var isRealElement = isDef(oldVnode.nodeType);\n      if (!isRealElement && sameVnode(oldVnode, vnode)) {\n        // patch existing root node\n        patchVnode(oldVnode, vnode, insertedVnodeQueue, removeOnly);\n      } else {\n        if (isRealElement) {\n          // mounting to a real element\n          // check if this is server-rendered content and if we can perform\n          // a successful hydration.\n          if (oldVnode.nodeType === 1 && oldVnode.hasAttribute('server-rendered')) {\n            oldVnode.removeAttribute('server-rendered');\n            hydrating = true;\n          }\n          if (isTrue(hydrating)) {\n            if (hydrate(oldVnode, vnode, insertedVnodeQueue)) {\n              invokeInsertHook(vnode, insertedVnodeQueue, true);\n              return oldVnode\n            } else if (process.env.NODE_ENV !== 'production') {\n              warn(\n                'The client-side rendered virtual DOM tree is not matching ' +\n                'server-rendered content. This is likely caused by incorrect ' +\n                'HTML markup, for example nesting block-level elements inside ' +\n                '<p>, or missing <tbody>. Bailing hydration and performing ' +\n                'full client-side render.'\n              );\n            }\n          }\n          // either not server-rendered, or hydration failed.\n          // create an empty node and replace it\n          oldVnode = emptyNodeAt(oldVnode);\n        }\n        // replacing existing element\n        var oldElm = oldVnode.elm;\n        var parentElm$1 = nodeOps.parentNode(oldElm);\n        createElm(\n          vnode,\n          insertedVnodeQueue,\n          // extremely rare edge case: do not insert if old element is in a\n          // leaving transition. Only happens when combining transition +\n          // keep-alive + HOCs. (#4590)\n          oldElm._leaveCb ? null : parentElm$1,\n          nodeOps.nextSibling(oldElm)\n        );\n\n        if (isDef(vnode.parent)) {\n          // component root element replaced.\n          // update parent placeholder node element, recursively\n          var ancestor = vnode.parent;\n          while (ancestor) {\n            ancestor.elm = vnode.elm;\n            ancestor = ancestor.parent;\n          }\n          if (isPatchable(vnode)) {\n            for (var i = 0; i < cbs.create.length; ++i) {\n              cbs.create[i](emptyNode, vnode.parent);\n            }\n          }\n        }\n\n        if (isDef(parentElm$1)) {\n          removeVnodes(parentElm$1, [oldVnode], 0, 0);\n        } else if (isDef(oldVnode.tag)) {\n          invokeDestroyHook(oldVnode);\n        }\n      }\n    }\n\n    invokeInsertHook(vnode, insertedVnodeQueue, isInitialPatch);\n    return vnode.elm\n  }\n}\n\n/*  */\n\nvar directives = {\n  create: updateDirectives,\n  update: updateDirectives,\n  destroy: function unbindDirectives (vnode) {\n    updateDirectives(vnode, emptyNode);\n  }\n};\n\nfunction updateDirectives (oldVnode, vnode) {\n  if (oldVnode.data.directives || vnode.data.directives) {\n    _update(oldVnode, vnode);\n  }\n}\n\nfunction _update (oldVnode, vnode) {\n  var isCreate = oldVnode === emptyNode;\n  var isDestroy = vnode === emptyNode;\n  var oldDirs = normalizeDirectives$1(oldVnode.data.directives, oldVnode.context);\n  var newDirs = normalizeDirectives$1(vnode.data.directives, vnode.context);\n\n  var dirsWithInsert = [];\n  var dirsWithPostpatch = [];\n\n  var key, oldDir, dir;\n  for (key in newDirs) {\n    oldDir = oldDirs[key];\n    dir = newDirs[key];\n    if (!oldDir) {\n      // new directive, bind\n      callHook$1(dir, 'bind', vnode, oldVnode);\n      if (dir.def && dir.def.inserted) {\n        dirsWithInsert.push(dir);\n      }\n    } else {\n      // existing directive, update\n      dir.oldValue = oldDir.value;\n      callHook$1(dir, 'update', vnode, oldVnode);\n      if (dir.def && dir.def.componentUpdated) {\n        dirsWithPostpatch.push(dir);\n      }\n    }\n  }\n\n  if (dirsWithInsert.length) {\n    var callInsert = function () {\n      for (var i = 0; i < dirsWithInsert.length; i++) {\n        callHook$1(dirsWithInsert[i], 'inserted', vnode, oldVnode);\n      }\n    };\n    if (isCreate) {\n      mergeVNodeHook(vnode.data.hook || (vnode.data.hook = {}), 'insert', callInsert);\n    } else {\n      callInsert();\n    }\n  }\n\n  if (dirsWithPostpatch.length) {\n    mergeVNodeHook(vnode.data.hook || (vnode.data.hook = {}), 'postpatch', function () {\n      for (var i = 0; i < dirsWithPostpatch.length; i++) {\n        callHook$1(dirsWithPostpatch[i], 'componentUpdated', vnode, oldVnode);\n      }\n    });\n  }\n\n  if (!isCreate) {\n    for (key in oldDirs) {\n      if (!newDirs[key]) {\n        // no longer present, unbind\n        callHook$1(oldDirs[key], 'unbind', oldVnode, oldVnode, isDestroy);\n      }\n    }\n  }\n}\n\nvar emptyModifiers = Object.create(null);\n\nfunction normalizeDirectives$1 (\n  dirs,\n  vm\n) {\n  var res = Object.create(null);\n  if (!dirs) {\n    return res\n  }\n  var i, dir;\n  for (i = 0; i < dirs.length; i++) {\n    dir = dirs[i];\n    if (!dir.modifiers) {\n      dir.modifiers = emptyModifiers;\n    }\n    res[getRawDirName(dir)] = dir;\n    dir.def = resolveAsset(vm.$options, 'directives', dir.name, true);\n  }\n  return res\n}\n\nfunction getRawDirName (dir) {\n  return dir.rawName || ((dir.name) + \".\" + (Object.keys(dir.modifiers || {}).join('.')))\n}\n\nfunction callHook$1 (dir, hook, vnode, oldVnode, isDestroy) {\n  var fn = dir.def && dir.def[hook];\n  if (fn) {\n    fn(vnode.elm, dir, vnode, oldVnode, isDestroy);\n  }\n}\n\nvar baseModules = [\n  ref,\n  directives\n];\n\n/*  */\n\nfunction updateAttrs (oldVnode, vnode) {\n  if (!oldVnode.data.attrs && !vnode.data.attrs) {\n    return\n  }\n  var key, cur, old;\n  var elm = vnode.elm;\n  var oldAttrs = oldVnode.data.attrs || {};\n  var attrs = vnode.data.attrs || {};\n  // clone observed objects, as the user probably wants to mutate it\n  if (attrs.__ob__) {\n    attrs = vnode.data.attrs = extend({}, attrs);\n  }\n\n  for (key in attrs) {\n    cur = attrs[key];\n    old = oldAttrs[key];\n    if (old !== cur) {\n      setAttr(elm, key, cur);\n    }\n  }\n  // #4391: in IE9, setting type can reset value for input[type=radio]\n  /* istanbul ignore if */\n  if (isIE9 && attrs.value !== oldAttrs.value) {\n    setAttr(elm, 'value', attrs.value);\n  }\n  for (key in oldAttrs) {\n    if (attrs[key] == null) {\n      if (isXlink(key)) {\n        elm.removeAttributeNS(xlinkNS, getXlinkProp(key));\n      } else if (!isEnumeratedAttr(key)) {\n        elm.removeAttribute(key);\n      }\n    }\n  }\n}\n\nfunction setAttr (el, key, value) {\n  if (isBooleanAttr(key)) {\n    // set attribute for blank value\n    // e.g. <option disabled>Select one</option>\n    if (isFalsyAttrValue(value)) {\n      el.removeAttribute(key);\n    } else {\n      el.setAttribute(key, key);\n    }\n  } else if (isEnumeratedAttr(key)) {\n    el.setAttribute(key, isFalsyAttrValue(value) || value === 'false' ? 'false' : 'true');\n  } else if (isXlink(key)) {\n    if (isFalsyAttrValue(value)) {\n      el.removeAttributeNS(xlinkNS, getXlinkProp(key));\n    } else {\n      el.setAttributeNS(xlinkNS, key, value);\n    }\n  } else {\n    if (isFalsyAttrValue(value)) {\n      el.removeAttribute(key);\n    } else {\n      el.setAttribute(key, value);\n    }\n  }\n}\n\nvar attrs = {\n  create: updateAttrs,\n  update: updateAttrs\n};\n\n/*  */\n\nfunction updateClass (oldVnode, vnode) {\n  var el = vnode.elm;\n  var data = vnode.data;\n  var oldData = oldVnode.data;\n  if (!data.staticClass && !data.class &&\n      (!oldData || (!oldData.staticClass && !oldData.class))) {\n    return\n  }\n\n  var cls = genClassForVnode(vnode);\n\n  // handle transition classes\n  var transitionClass = el._transitionClasses;\n  if (transitionClass) {\n    cls = concat(cls, stringifyClass(transitionClass));\n  }\n\n  // set the class\n  if (cls !== el._prevClass) {\n    el.setAttribute('class', cls);\n    el._prevClass = cls;\n  }\n}\n\nvar klass = {\n  create: updateClass,\n  update: updateClass\n};\n\n/*  */\n\nvar validDivisionCharRE = /[\\w).+\\-_$\\]]/;\n\nfunction parseFilters (exp) {\n  var inSingle = false;\n  var inDouble = false;\n  var inTemplateString = false;\n  var inRegex = false;\n  var curly = 0;\n  var square = 0;\n  var paren = 0;\n  var lastFilterIndex = 0;\n  var c, prev, i, expression, filters;\n\n  for (i = 0; i < exp.length; i++) {\n    prev = c;\n    c = exp.charCodeAt(i);\n    if (inSingle) {\n      if (c === 0x27 && prev !== 0x5C) { inSingle = false; }\n    } else if (inDouble) {\n      if (c === 0x22 && prev !== 0x5C) { inDouble = false; }\n    } else if (inTemplateString) {\n      if (c === 0x60 && prev !== 0x5C) { inTemplateString = false; }\n    } else if (inRegex) {\n      if (c === 0x2f && prev !== 0x5C) { inRegex = false; }\n    } else if (\n      c === 0x7C && // pipe\n      exp.charCodeAt(i + 1) !== 0x7C &&\n      exp.charCodeAt(i - 1) !== 0x7C &&\n      !curly && !square && !paren\n    ) {\n      if (expression === undefined) {\n        // first filter, end of expression\n        lastFilterIndex = i + 1;\n        expression = exp.slice(0, i).trim();\n      } else {\n        pushFilter();\n      }\n    } else {\n      switch (c) {\n        case 0x22: inDouble = true; break         // \"\n        case 0x27: inSingle = true; break         // '\n        case 0x60: inTemplateString = true; break // `\n        case 0x28: paren++; break                 // (\n        case 0x29: paren--; break                 // )\n        case 0x5B: square++; break                // [\n        case 0x5D: square--; break                // ]\n        case 0x7B: curly++; break                 // {\n        case 0x7D: curly--; break                 // }\n      }\n      if (c === 0x2f) { // /\n        var j = i - 1;\n        var p = (void 0);\n        // find first non-whitespace prev char\n        for (; j >= 0; j--) {\n          p = exp.charAt(j);\n          if (p !== ' ') { break }\n        }\n        if (!p || !validDivisionCharRE.test(p)) {\n          inRegex = true;\n        }\n      }\n    }\n  }\n\n  if (expression === undefined) {\n    expression = exp.slice(0, i).trim();\n  } else if (lastFilterIndex !== 0) {\n    pushFilter();\n  }\n\n  function pushFilter () {\n    (filters || (filters = [])).push(exp.slice(lastFilterIndex, i).trim());\n    lastFilterIndex = i + 1;\n  }\n\n  if (filters) {\n    for (i = 0; i < filters.length; i++) {\n      expression = wrapFilter(expression, filters[i]);\n    }\n  }\n\n  return expression\n}\n\nfunction wrapFilter (exp, filter) {\n  var i = filter.indexOf('(');\n  if (i < 0) {\n    // _f: resolveFilter\n    return (\"_f(\\\"\" + filter + \"\\\")(\" + exp + \")\")\n  } else {\n    var name = filter.slice(0, i);\n    var args = filter.slice(i + 1);\n    return (\"_f(\\\"\" + name + \"\\\")(\" + exp + \",\" + args)\n  }\n}\n\n/*  */\n\nfunction baseWarn (msg) {\n  console.error((\"[Vue compiler]: \" + msg));\n}\n\nfunction pluckModuleFunction (\n  modules,\n  key\n) {\n  return modules\n    ? modules.map(function (m) { return m[key]; }).filter(function (_) { return _; })\n    : []\n}\n\nfunction addProp (el, name, value) {\n  (el.props || (el.props = [])).push({ name: name, value: value });\n}\n\nfunction addAttr (el, name, value) {\n  (el.attrs || (el.attrs = [])).push({ name: name, value: value });\n}\n\nfunction addDirective (\n  el,\n  name,\n  rawName,\n  value,\n  arg,\n  modifiers\n) {\n  (el.directives || (el.directives = [])).push({ name: name, rawName: rawName, value: value, arg: arg, modifiers: modifiers });\n}\n\nfunction addHandler (\n  el,\n  name,\n  value,\n  modifiers,\n  important\n) {\n  // check capture modifier\n  if (modifiers && modifiers.capture) {\n    delete modifiers.capture;\n    name = '!' + name; // mark the event as captured\n  }\n  if (modifiers && modifiers.once) {\n    delete modifiers.once;\n    name = '~' + name; // mark the event as once\n  }\n  var events;\n  if (modifiers && modifiers.native) {\n    delete modifiers.native;\n    events = el.nativeEvents || (el.nativeEvents = {});\n  } else {\n    events = el.events || (el.events = {});\n  }\n  var newHandler = { value: value, modifiers: modifiers };\n  var handlers = events[name];\n  /* istanbul ignore if */\n  if (Array.isArray(handlers)) {\n    important ? handlers.unshift(newHandler) : handlers.push(newHandler);\n  } else if (handlers) {\n    events[name] = important ? [newHandler, handlers] : [handlers, newHandler];\n  } else {\n    events[name] = newHandler;\n  }\n}\n\nfunction getBindingAttr (\n  el,\n  name,\n  getStatic\n) {\n  var dynamicValue =\n    getAndRemoveAttr(el, ':' + name) ||\n    getAndRemoveAttr(el, 'v-bind:' + name);\n  if (dynamicValue != null) {\n    return parseFilters(dynamicValue)\n  } else if (getStatic !== false) {\n    var staticValue = getAndRemoveAttr(el, name);\n    if (staticValue != null) {\n      return JSON.stringify(staticValue)\n    }\n  }\n}\n\nfunction getAndRemoveAttr (el, name) {\n  var val;\n  if ((val = el.attrsMap[name]) != null) {\n    var list = el.attrsList;\n    for (var i = 0, l = list.length; i < l; i++) {\n      if (list[i].name === name) {\n        list.splice(i, 1);\n        break\n      }\n    }\n  }\n  return val\n}\n\n/*  */\n\n/**\n * Cross-platform code generation for component v-model\n */\nfunction genComponentModel (\n  el,\n  value,\n  modifiers\n) {\n  var ref = modifiers || {};\n  var number = ref.number;\n  var trim = ref.trim;\n\n  var baseValueExpression = '$$v';\n  var valueExpression = baseValueExpression;\n  if (trim) {\n    valueExpression =\n      \"(typeof \" + baseValueExpression + \" === 'string'\" +\n        \"? \" + baseValueExpression + \".trim()\" +\n        \": \" + baseValueExpression + \")\";\n  }\n  if (number) {\n    valueExpression = \"_n(\" + valueExpression + \")\";\n  }\n  var assignment = genAssignmentCode(value, valueExpression);\n\n  el.model = {\n    value: (\"(\" + value + \")\"),\n    expression: (\"\\\"\" + value + \"\\\"\"),\n    callback: (\"function (\" + baseValueExpression + \") {\" + assignment + \"}\")\n  };\n}\n\n/**\n * Cross-platform codegen helper for generating v-model value assignment code.\n */\nfunction genAssignmentCode (\n  value,\n  assignment\n) {\n  var modelRs = parseModel(value);\n  if (modelRs.idx === null) {\n    return (value + \"=\" + assignment)\n  } else {\n    return \"var $$exp = \" + (modelRs.exp) + \", $$idx = \" + (modelRs.idx) + \";\" +\n      \"if (!Array.isArray($$exp)){\" +\n        value + \"=\" + assignment + \"}\" +\n      \"else{$$exp.splice($$idx, 1, \" + assignment + \")}\"\n  }\n}\n\n/**\n * parse directive model to do the array update transform. a[idx] = val => $$a.splice($$idx, 1, val)\n *\n * for loop possible cases:\n *\n * - test\n * - test[idx]\n * - test[test1[idx]]\n * - test[\"a\"][idx]\n * - xxx.test[a[a].test1[idx]]\n * - test.xxx.a[\"asa\"][test1[idx]]\n *\n */\n\nvar len;\nvar str;\nvar chr;\nvar index$1;\nvar expressionPos;\nvar expressionEndPos;\n\nfunction parseModel (val) {\n  str = val;\n  len = str.length;\n  index$1 = expressionPos = expressionEndPos = 0;\n\n  if (val.indexOf('[') < 0 || val.lastIndexOf(']') < len - 1) {\n    return {\n      exp: val,\n      idx: null\n    }\n  }\n\n  while (!eof()) {\n    chr = next();\n    /* istanbul ignore if */\n    if (isStringStart(chr)) {\n      parseString(chr);\n    } else if (chr === 0x5B) {\n      parseBracket(chr);\n    }\n  }\n\n  return {\n    exp: val.substring(0, expressionPos),\n    idx: val.substring(expressionPos + 1, expressionEndPos)\n  }\n}\n\nfunction next () {\n  return str.charCodeAt(++index$1)\n}\n\nfunction eof () {\n  return index$1 >= len\n}\n\nfunction isStringStart (chr) {\n  return chr === 0x22 || chr === 0x27\n}\n\nfunction parseBracket (chr) {\n  var inBracket = 1;\n  expressionPos = index$1;\n  while (!eof()) {\n    chr = next();\n    if (isStringStart(chr)) {\n      parseString(chr);\n      continue\n    }\n    if (chr === 0x5B) { inBracket++; }\n    if (chr === 0x5D) { inBracket--; }\n    if (inBracket === 0) {\n      expressionEndPos = index$1;\n      break\n    }\n  }\n}\n\nfunction parseString (chr) {\n  var stringQuote = chr;\n  while (!eof()) {\n    chr = next();\n    if (chr === stringQuote) {\n      break\n    }\n  }\n}\n\n/*  */\n\nvar warn$1;\n\n// in some cases, the event used has to be determined at runtime\n// so we used some reserved tokens during compile.\nvar RANGE_TOKEN = '__r';\nvar CHECKBOX_RADIO_TOKEN = '__c';\n\nfunction model (\n  el,\n  dir,\n  _warn\n) {\n  warn$1 = _warn;\n  var value = dir.value;\n  var modifiers = dir.modifiers;\n  var tag = el.tag;\n  var type = el.attrsMap.type;\n\n  if (process.env.NODE_ENV !== 'production') {\n    var dynamicType = el.attrsMap['v-bind:type'] || el.attrsMap[':type'];\n    if (tag === 'input' && dynamicType) {\n      warn$1(\n        \"<input :type=\\\"\" + dynamicType + \"\\\" v-model=\\\"\" + value + \"\\\">:\\n\" +\n        \"v-model does not support dynamic input types. Use v-if branches instead.\"\n      );\n    }\n    // inputs with type=\"file\" are read only and setting the input's\n    // value will throw an error.\n    if (tag === 'input' && type === 'file') {\n      warn$1(\n        \"<\" + (el.tag) + \" v-model=\\\"\" + value + \"\\\" type=\\\"file\\\">:\\n\" +\n        \"File inputs are read only. Use a v-on:change listener instead.\"\n      );\n    }\n  }\n\n  if (tag === 'select') {\n    genSelect(el, value, modifiers);\n  } else if (tag === 'input' && type === 'checkbox') {\n    genCheckboxModel(el, value, modifiers);\n  } else if (tag === 'input' && type === 'radio') {\n    genRadioModel(el, value, modifiers);\n  } else if (tag === 'input' || tag === 'textarea') {\n    genDefaultModel(el, value, modifiers);\n  } else if (!config.isReservedTag(tag)) {\n    genComponentModel(el, value, modifiers);\n    // component v-model doesn't need extra runtime\n    return false\n  } else if (process.env.NODE_ENV !== 'production') {\n    warn$1(\n      \"<\" + (el.tag) + \" v-model=\\\"\" + value + \"\\\">: \" +\n      \"v-model is not supported on this element type. \" +\n      'If you are working with contenteditable, it\\'s recommended to ' +\n      'wrap a library dedicated for that purpose inside a custom component.'\n    );\n  }\n\n  // ensure runtime directive metadata\n  return true\n}\n\nfunction genCheckboxModel (\n  el,\n  value,\n  modifiers\n) {\n  var number = modifiers && modifiers.number;\n  var valueBinding = getBindingAttr(el, 'value') || 'null';\n  var trueValueBinding = getBindingAttr(el, 'true-value') || 'true';\n  var falseValueBinding = getBindingAttr(el, 'false-value') || 'false';\n  addProp(el, 'checked',\n    \"Array.isArray(\" + value + \")\" +\n      \"?_i(\" + value + \",\" + valueBinding + \")>-1\" + (\n        trueValueBinding === 'true'\n          ? (\":(\" + value + \")\")\n          : (\":_q(\" + value + \",\" + trueValueBinding + \")\")\n      )\n  );\n  addHandler(el, CHECKBOX_RADIO_TOKEN,\n    \"var $$a=\" + value + \",\" +\n        '$$el=$event.target,' +\n        \"$$c=$$el.checked?(\" + trueValueBinding + \"):(\" + falseValueBinding + \");\" +\n    'if(Array.isArray($$a)){' +\n      \"var $$v=\" + (number ? '_n(' + valueBinding + ')' : valueBinding) + \",\" +\n          '$$i=_i($$a,$$v);' +\n      \"if($$c){$$i<0&&(\" + value + \"=$$a.concat($$v))}\" +\n      \"else{$$i>-1&&(\" + value + \"=$$a.slice(0,$$i).concat($$a.slice($$i+1)))}\" +\n    \"}else{\" + value + \"=$$c}\",\n    null, true\n  );\n}\n\nfunction genRadioModel (\n    el,\n    value,\n    modifiers\n) {\n  var number = modifiers && modifiers.number;\n  var valueBinding = getBindingAttr(el, 'value') || 'null';\n  valueBinding = number ? (\"_n(\" + valueBinding + \")\") : valueBinding;\n  addProp(el, 'checked', (\"_q(\" + value + \",\" + valueBinding + \")\"));\n  addHandler(el, CHECKBOX_RADIO_TOKEN, genAssignmentCode(value, valueBinding), null, true);\n}\n\nfunction genSelect (\n    el,\n    value,\n    modifiers\n) {\n  var number = modifiers && modifiers.number;\n  var selectedVal = \"Array.prototype.filter\" +\n    \".call($event.target.options,function(o){return o.selected})\" +\n    \".map(function(o){var val = \\\"_value\\\" in o ? o._value : o.value;\" +\n    \"return \" + (number ? '_n(val)' : 'val') + \"})\";\n\n  var assignment = '$event.target.multiple ? $$selectedVal : $$selectedVal[0]';\n  var code = \"var $$selectedVal = \" + selectedVal + \";\";\n  code = code + \" \" + (genAssignmentCode(value, assignment));\n  addHandler(el, 'change', code, null, true);\n}\n\nfunction genDefaultModel (\n  el,\n  value,\n  modifiers\n) {\n  var type = el.attrsMap.type;\n  var ref = modifiers || {};\n  var lazy = ref.lazy;\n  var number = ref.number;\n  var trim = ref.trim;\n  var needCompositionGuard = !lazy && type !== 'range';\n  var event = lazy\n    ? 'change'\n    : type === 'range'\n      ? RANGE_TOKEN\n      : 'input';\n\n  var valueExpression = '$event.target.value';\n  if (trim) {\n    valueExpression = \"$event.target.value.trim()\";\n  }\n  if (number) {\n    valueExpression = \"_n(\" + valueExpression + \")\";\n  }\n\n  var code = genAssignmentCode(value, valueExpression);\n  if (needCompositionGuard) {\n    code = \"if($event.target.composing)return;\" + code;\n  }\n\n  addProp(el, 'value', (\"(\" + value + \")\"));\n  addHandler(el, event, code, null, true);\n  if (trim || number || type === 'number') {\n    addHandler(el, 'blur', '$forceUpdate()');\n  }\n}\n\n/*  */\n\n// normalize v-model event tokens that can only be determined at runtime.\n// it's important to place the event as the first in the array because\n// the whole point is ensuring the v-model callback gets called before\n// user-attached handlers.\nfunction normalizeEvents (on) {\n  var event;\n  /* istanbul ignore if */\n  if (on[RANGE_TOKEN]) {\n    // IE input[type=range] only supports `change` event\n    event = isIE ? 'change' : 'input';\n    on[event] = [].concat(on[RANGE_TOKEN], on[event] || []);\n    delete on[RANGE_TOKEN];\n  }\n  if (on[CHECKBOX_RADIO_TOKEN]) {\n    // Chrome fires microtasks in between click/change, leads to #4521\n    event = isChrome ? 'click' : 'change';\n    on[event] = [].concat(on[CHECKBOX_RADIO_TOKEN], on[event] || []);\n    delete on[CHECKBOX_RADIO_TOKEN];\n  }\n}\n\nvar target$1;\n\nfunction add$1 (\n  event,\n  handler,\n  once,\n  capture\n) {\n  if (once) {\n    var oldHandler = handler;\n    var _target = target$1; // save current target element in closure\n    handler = function (ev) {\n      var res = arguments.length === 1\n        ? oldHandler(ev)\n        : oldHandler.apply(null, arguments);\n      if (res !== null) {\n        remove$2(event, handler, capture, _target);\n      }\n    };\n  }\n  target$1.addEventListener(event, handler, capture);\n}\n\nfunction remove$2 (\n  event,\n  handler,\n  capture,\n  _target\n) {\n  (_target || target$1).removeEventListener(event, handler, capture);\n}\n\nfunction updateDOMListeners (oldVnode, vnode) {\n  if (!oldVnode.data.on && !vnode.data.on) {\n    return\n  }\n  var on = vnode.data.on || {};\n  var oldOn = oldVnode.data.on || {};\n  target$1 = vnode.elm;\n  normalizeEvents(on);\n  updateListeners(on, oldOn, add$1, remove$2, vnode.context);\n}\n\nvar events = {\n  create: updateDOMListeners,\n  update: updateDOMListeners\n};\n\n/*  */\n\nfunction updateDOMProps (oldVnode, vnode) {\n  if (!oldVnode.data.domProps && !vnode.data.domProps) {\n    return\n  }\n  var key, cur;\n  var elm = vnode.elm;\n  var oldProps = oldVnode.data.domProps || {};\n  var props = vnode.data.domProps || {};\n  // clone observed objects, as the user probably wants to mutate it\n  if (props.__ob__) {\n    props = vnode.data.domProps = extend({}, props);\n  }\n\n  for (key in oldProps) {\n    if (props[key] == null) {\n      elm[key] = '';\n    }\n  }\n  for (key in props) {\n    cur = props[key];\n    // ignore children if the node has textContent or innerHTML,\n    // as these will throw away existing DOM nodes and cause removal errors\n    // on subsequent patches (#3360)\n    if (key === 'textContent' || key === 'innerHTML') {\n      if (vnode.children) { vnode.children.length = 0; }\n      if (cur === oldProps[key]) { continue }\n    }\n\n    if (key === 'value') {\n      // store value as _value as well since\n      // non-string values will be stringified\n      elm._value = cur;\n      // avoid resetting cursor position when value is the same\n      var strCur = cur == null ? '' : String(cur);\n      if (shouldUpdateValue(elm, vnode, strCur)) {\n        elm.value = strCur;\n      }\n    } else {\n      elm[key] = cur;\n    }\n  }\n}\n\n// check platforms/web/util/attrs.js acceptValue\n\n\nfunction shouldUpdateValue (\n  elm,\n  vnode,\n  checkVal\n) {\n  return (!elm.composing && (\n    vnode.tag === 'option' ||\n    isDirty(elm, checkVal) ||\n    isInputChanged(elm, checkVal)\n  ))\n}\n\nfunction isDirty (elm, checkVal) {\n  // return true when textbox (.number and .trim) loses focus and its value is not equal to the updated value\n  return document.activeElement !== elm && elm.value !== checkVal\n}\n\nfunction isInputChanged (elm, newVal) {\n  var value = elm.value;\n  var modifiers = elm._vModifiers; // injected by v-model runtime\n  if ((modifiers && modifiers.number) || elm.type === 'number') {\n    return toNumber(value) !== toNumber(newVal)\n  }\n  if (modifiers && modifiers.trim) {\n    return value.trim() !== newVal.trim()\n  }\n  return value !== newVal\n}\n\nvar domProps = {\n  create: updateDOMProps,\n  update: updateDOMProps\n};\n\n/*  */\n\nvar parseStyleText = cached(function (cssText) {\n  var res = {};\n  var listDelimiter = /;(?![^(]*\\))/g;\n  var propertyDelimiter = /:(.+)/;\n  cssText.split(listDelimiter).forEach(function (item) {\n    if (item) {\n      var tmp = item.split(propertyDelimiter);\n      tmp.length > 1 && (res[tmp[0].trim()] = tmp[1].trim());\n    }\n  });\n  return res\n});\n\n// merge static and dynamic style data on the same vnode\nfunction normalizeStyleData (data) {\n  var style = normalizeStyleBinding(data.style);\n  // static style is pre-processed into an object during compilation\n  // and is always a fresh object, so it's safe to merge into it\n  return data.staticStyle\n    ? extend(data.staticStyle, style)\n    : style\n}\n\n// normalize possible array / string values into Object\nfunction normalizeStyleBinding (bindingStyle) {\n  if (Array.isArray(bindingStyle)) {\n    return toObject(bindingStyle)\n  }\n  if (typeof bindingStyle === 'string') {\n    return parseStyleText(bindingStyle)\n  }\n  return bindingStyle\n}\n\n/**\n * parent component style should be after child's\n * so that parent component's style could override it\n */\nfunction getStyle (vnode, checkChild) {\n  var res = {};\n  var styleData;\n\n  if (checkChild) {\n    var childNode = vnode;\n    while (childNode.componentInstance) {\n      childNode = childNode.componentInstance._vnode;\n      if (childNode.data && (styleData = normalizeStyleData(childNode.data))) {\n        extend(res, styleData);\n      }\n    }\n  }\n\n  if ((styleData = normalizeStyleData(vnode.data))) {\n    extend(res, styleData);\n  }\n\n  var parentNode = vnode;\n  while ((parentNode = parentNode.parent)) {\n    if (parentNode.data && (styleData = normalizeStyleData(parentNode.data))) {\n      extend(res, styleData);\n    }\n  }\n  return res\n}\n\n/*  */\n\nvar cssVarRE = /^--/;\nvar importantRE = /\\s*!important$/;\nvar setProp = function (el, name, val) {\n  /* istanbul ignore if */\n  if (cssVarRE.test(name)) {\n    el.style.setProperty(name, val);\n  } else if (importantRE.test(val)) {\n    el.style.setProperty(name, val.replace(importantRE, ''), 'important');\n  } else {\n    el.style[normalize(name)] = val;\n  }\n};\n\nvar prefixes = ['Webkit', 'Moz', 'ms'];\n\nvar testEl;\nvar normalize = cached(function (prop) {\n  testEl = testEl || document.createElement('div');\n  prop = camelize(prop);\n  if (prop !== 'filter' && (prop in testEl.style)) {\n    return prop\n  }\n  var upper = prop.charAt(0).toUpperCase() + prop.slice(1);\n  for (var i = 0; i < prefixes.length; i++) {\n    var prefixed = prefixes[i] + upper;\n    if (prefixed in testEl.style) {\n      return prefixed\n    }\n  }\n});\n\nfunction updateStyle (oldVnode, vnode) {\n  var data = vnode.data;\n  var oldData = oldVnode.data;\n\n  if (!data.staticStyle && !data.style &&\n      !oldData.staticStyle && !oldData.style) {\n    return\n  }\n\n  var cur, name;\n  var el = vnode.elm;\n  var oldStaticStyle = oldVnode.data.staticStyle;\n  var oldStyleBinding = oldVnode.data.style || {};\n\n  // if static style exists, stylebinding already merged into it when doing normalizeStyleData\n  var oldStyle = oldStaticStyle || oldStyleBinding;\n\n  var style = normalizeStyleBinding(vnode.data.style) || {};\n\n  vnode.data.style = style.__ob__ ? extend({}, style) : style;\n\n  var newStyle = getStyle(vnode, true);\n\n  for (name in oldStyle) {\n    if (newStyle[name] == null) {\n      setProp(el, name, '');\n    }\n  }\n  for (name in newStyle) {\n    cur = newStyle[name];\n    if (cur !== oldStyle[name]) {\n      // ie9 setting to null has no effect, must use empty string\n      setProp(el, name, cur == null ? '' : cur);\n    }\n  }\n}\n\nvar style = {\n  create: updateStyle,\n  update: updateStyle\n};\n\n/*  */\n\n/**\n * Add class with compatibility for SVG since classList is not supported on\n * SVG elements in IE\n */\nfunction addClass (el, cls) {\n  /* istanbul ignore if */\n  if (!cls || !(cls = cls.trim())) {\n    return\n  }\n\n  /* istanbul ignore else */\n  if (el.classList) {\n    if (cls.indexOf(' ') > -1) {\n      cls.split(/\\s+/).forEach(function (c) { return el.classList.add(c); });\n    } else {\n      el.classList.add(cls);\n    }\n  } else {\n    var cur = \" \" + (el.getAttribute('class') || '') + \" \";\n    if (cur.indexOf(' ' + cls + ' ') < 0) {\n      el.setAttribute('class', (cur + cls).trim());\n    }\n  }\n}\n\n/**\n * Remove class with compatibility for SVG since classList is not supported on\n * SVG elements in IE\n */\nfunction removeClass (el, cls) {\n  /* istanbul ignore if */\n  if (!cls || !(cls = cls.trim())) {\n    return\n  }\n\n  /* istanbul ignore else */\n  if (el.classList) {\n    if (cls.indexOf(' ') > -1) {\n      cls.split(/\\s+/).forEach(function (c) { return el.classList.remove(c); });\n    } else {\n      el.classList.remove(cls);\n    }\n  } else {\n    var cur = \" \" + (el.getAttribute('class') || '') + \" \";\n    var tar = ' ' + cls + ' ';\n    while (cur.indexOf(tar) >= 0) {\n      cur = cur.replace(tar, ' ');\n    }\n    el.setAttribute('class', cur.trim());\n  }\n}\n\n/*  */\n\nfunction resolveTransition (def$$1) {\n  if (!def$$1) {\n    return\n  }\n  /* istanbul ignore else */\n  if (typeof def$$1 === 'object') {\n    var res = {};\n    if (def$$1.css !== false) {\n      extend(res, autoCssTransition(def$$1.name || 'v'));\n    }\n    extend(res, def$$1);\n    return res\n  } else if (typeof def$$1 === 'string') {\n    return autoCssTransition(def$$1)\n  }\n}\n\nvar autoCssTransition = cached(function (name) {\n  return {\n    enterClass: (name + \"-enter\"),\n    enterToClass: (name + \"-enter-to\"),\n    enterActiveClass: (name + \"-enter-active\"),\n    leaveClass: (name + \"-leave\"),\n    leaveToClass: (name + \"-leave-to\"),\n    leaveActiveClass: (name + \"-leave-active\")\n  }\n});\n\nvar hasTransition = inBrowser && !isIE9;\nvar TRANSITION = 'transition';\nvar ANIMATION = 'animation';\n\n// Transition property/event sniffing\nvar transitionProp = 'transition';\nvar transitionEndEvent = 'transitionend';\nvar animationProp = 'animation';\nvar animationEndEvent = 'animationend';\nif (hasTransition) {\n  /* istanbul ignore if */\n  if (window.ontransitionend === undefined &&\n    window.onwebkittransitionend !== undefined) {\n    transitionProp = 'WebkitTransition';\n    transitionEndEvent = 'webkitTransitionEnd';\n  }\n  if (window.onanimationend === undefined &&\n    window.onwebkitanimationend !== undefined) {\n    animationProp = 'WebkitAnimation';\n    animationEndEvent = 'webkitAnimationEnd';\n  }\n}\n\n// binding to window is necessary to make hot reload work in IE in strict mode\nvar raf = inBrowser && window.requestAnimationFrame\n  ? window.requestAnimationFrame.bind(window)\n  : setTimeout;\n\nfunction nextFrame (fn) {\n  raf(function () {\n    raf(fn);\n  });\n}\n\nfunction addTransitionClass (el, cls) {\n  (el._transitionClasses || (el._transitionClasses = [])).push(cls);\n  addClass(el, cls);\n}\n\nfunction removeTransitionClass (el, cls) {\n  if (el._transitionClasses) {\n    remove(el._transitionClasses, cls);\n  }\n  removeClass(el, cls);\n}\n\nfunction whenTransitionEnds (\n  el,\n  expectedType,\n  cb\n) {\n  var ref = getTransitionInfo(el, expectedType);\n  var type = ref.type;\n  var timeout = ref.timeout;\n  var propCount = ref.propCount;\n  if (!type) { return cb() }\n  var event = type === TRANSITION ? transitionEndEvent : animationEndEvent;\n  var ended = 0;\n  var end = function () {\n    el.removeEventListener(event, onEnd);\n    cb();\n  };\n  var onEnd = function (e) {\n    if (e.target === el) {\n      if (++ended >= propCount) {\n        end();\n      }\n    }\n  };\n  setTimeout(function () {\n    if (ended < propCount) {\n      end();\n    }\n  }, timeout + 1);\n  el.addEventListener(event, onEnd);\n}\n\nvar transformRE = /\\b(transform|all)(,|$)/;\n\nfunction getTransitionInfo (el, expectedType) {\n  var styles = window.getComputedStyle(el);\n  var transitionDelays = styles[transitionProp + 'Delay'].split(', ');\n  var transitionDurations = styles[transitionProp + 'Duration'].split(', ');\n  var transitionTimeout = getTimeout(transitionDelays, transitionDurations);\n  var animationDelays = styles[animationProp + 'Delay'].split(', ');\n  var animationDurations = styles[animationProp + 'Duration'].split(', ');\n  var animationTimeout = getTimeout(animationDelays, animationDurations);\n\n  var type;\n  var timeout = 0;\n  var propCount = 0;\n  /* istanbul ignore if */\n  if (expectedType === TRANSITION) {\n    if (transitionTimeout > 0) {\n      type = TRANSITION;\n      timeout = transitionTimeout;\n      propCount = transitionDurations.length;\n    }\n  } else if (expectedType === ANIMATION) {\n    if (animationTimeout > 0) {\n      type = ANIMATION;\n      timeout = animationTimeout;\n      propCount = animationDurations.length;\n    }\n  } else {\n    timeout = Math.max(transitionTimeout, animationTimeout);\n    type = timeout > 0\n      ? transitionTimeout > animationTimeout\n        ? TRANSITION\n        : ANIMATION\n      : null;\n    propCount = type\n      ? type === TRANSITION\n        ? transitionDurations.length\n        : animationDurations.length\n      : 0;\n  }\n  var hasTransform =\n    type === TRANSITION &&\n    transformRE.test(styles[transitionProp + 'Property']);\n  return {\n    type: type,\n    timeout: timeout,\n    propCount: propCount,\n    hasTransform: hasTransform\n  }\n}\n\nfunction getTimeout (delays, durations) {\n  /* istanbul ignore next */\n  while (delays.length < durations.length) {\n    delays = delays.concat(delays);\n  }\n\n  return Math.max.apply(null, durations.map(function (d, i) {\n    return toMs(d) + toMs(delays[i])\n  }))\n}\n\nfunction toMs (s) {\n  return Number(s.slice(0, -1)) * 1000\n}\n\n/*  */\n\nfunction enter (vnode, toggleDisplay) {\n  var el = vnode.elm;\n\n  // call leave callback now\n  if (el._leaveCb) {\n    el._leaveCb.cancelled = true;\n    el._leaveCb();\n  }\n\n  var data = resolveTransition(vnode.data.transition);\n  if (!data) {\n    return\n  }\n\n  /* istanbul ignore if */\n  if (el._enterCb || el.nodeType !== 1) {\n    return\n  }\n\n  var css = data.css;\n  var type = data.type;\n  var enterClass = data.enterClass;\n  var enterToClass = data.enterToClass;\n  var enterActiveClass = data.enterActiveClass;\n  var appearClass = data.appearClass;\n  var appearToClass = data.appearToClass;\n  var appearActiveClass = data.appearActiveClass;\n  var beforeEnter = data.beforeEnter;\n  var enter = data.enter;\n  var afterEnter = data.afterEnter;\n  var enterCancelled = data.enterCancelled;\n  var beforeAppear = data.beforeAppear;\n  var appear = data.appear;\n  var afterAppear = data.afterAppear;\n  var appearCancelled = data.appearCancelled;\n  var duration = data.duration;\n\n  // activeInstance will always be the <transition> component managing this\n  // transition. One edge case to check is when the <transition> is placed\n  // as the root node of a child component. In that case we need to check\n  // <transition>'s parent for appear check.\n  var context = activeInstance;\n  var transitionNode = activeInstance.$vnode;\n  while (transitionNode && transitionNode.parent) {\n    transitionNode = transitionNode.parent;\n    context = transitionNode.context;\n  }\n\n  var isAppear = !context._isMounted || !vnode.isRootInsert;\n\n  if (isAppear && !appear && appear !== '') {\n    return\n  }\n\n  var startClass = isAppear && appearClass\n    ? appearClass\n    : enterClass;\n  var activeClass = isAppear && appearActiveClass\n    ? appearActiveClass\n    : enterActiveClass;\n  var toClass = isAppear && appearToClass\n    ? appearToClass\n    : enterToClass;\n\n  var beforeEnterHook = isAppear\n    ? (beforeAppear || beforeEnter)\n    : beforeEnter;\n  var enterHook = isAppear\n    ? (typeof appear === 'function' ? appear : enter)\n    : enter;\n  var afterEnterHook = isAppear\n    ? (afterAppear || afterEnter)\n    : afterEnter;\n  var enterCancelledHook = isAppear\n    ? (appearCancelled || enterCancelled)\n    : enterCancelled;\n\n  var explicitEnterDuration = toNumber(\n    isObject(duration)\n      ? duration.enter\n      : duration\n  );\n\n  if (process.env.NODE_ENV !== 'production' && explicitEnterDuration != null) {\n    checkDuration(explicitEnterDuration, 'enter', vnode);\n  }\n\n  var expectsCSS = css !== false && !isIE9;\n  var userWantsControl = getHookArgumentsLength(enterHook);\n\n  var cb = el._enterCb = once(function () {\n    if (expectsCSS) {\n      removeTransitionClass(el, toClass);\n      removeTransitionClass(el, activeClass);\n    }\n    if (cb.cancelled) {\n      if (expectsCSS) {\n        removeTransitionClass(el, startClass);\n      }\n      enterCancelledHook && enterCancelledHook(el);\n    } else {\n      afterEnterHook && afterEnterHook(el);\n    }\n    el._enterCb = null;\n  });\n\n  if (!vnode.data.show) {\n    // remove pending leave element on enter by injecting an insert hook\n    mergeVNodeHook(vnode.data.hook || (vnode.data.hook = {}), 'insert', function () {\n      var parent = el.parentNode;\n      var pendingNode = parent && parent._pending && parent._pending[vnode.key];\n      if (pendingNode &&\n          pendingNode.tag === vnode.tag &&\n          pendingNode.elm._leaveCb) {\n        pendingNode.elm._leaveCb();\n      }\n      enterHook && enterHook(el, cb);\n    });\n  }\n\n  // start enter transition\n  beforeEnterHook && beforeEnterHook(el);\n  if (expectsCSS) {\n    addTransitionClass(el, startClass);\n    addTransitionClass(el, activeClass);\n    nextFrame(function () {\n      addTransitionClass(el, toClass);\n      removeTransitionClass(el, startClass);\n      if (!cb.cancelled && !userWantsControl) {\n        if (isValidDuration(explicitEnterDuration)) {\n          setTimeout(cb, explicitEnterDuration);\n        } else {\n          whenTransitionEnds(el, type, cb);\n        }\n      }\n    });\n  }\n\n  if (vnode.data.show) {\n    toggleDisplay && toggleDisplay();\n    enterHook && enterHook(el, cb);\n  }\n\n  if (!expectsCSS && !userWantsControl) {\n    cb();\n  }\n}\n\nfunction leave (vnode, rm) {\n  var el = vnode.elm;\n\n  // call enter callback now\n  if (el._enterCb) {\n    el._enterCb.cancelled = true;\n    el._enterCb();\n  }\n\n  var data = resolveTransition(vnode.data.transition);\n  if (!data) {\n    return rm()\n  }\n\n  /* istanbul ignore if */\n  if (el._leaveCb || el.nodeType !== 1) {\n    return\n  }\n\n  var css = data.css;\n  var type = data.type;\n  var leaveClass = data.leaveClass;\n  var leaveToClass = data.leaveToClass;\n  var leaveActiveClass = data.leaveActiveClass;\n  var beforeLeave = data.beforeLeave;\n  var leave = data.leave;\n  var afterLeave = data.afterLeave;\n  var leaveCancelled = data.leaveCancelled;\n  var delayLeave = data.delayLeave;\n  var duration = data.duration;\n\n  var expectsCSS = css !== false && !isIE9;\n  var userWantsControl = getHookArgumentsLength(leave);\n\n  var explicitLeaveDuration = toNumber(\n    isObject(duration)\n      ? duration.leave\n      : duration\n  );\n\n  if (process.env.NODE_ENV !== 'production' && explicitLeaveDuration != null) {\n    checkDuration(explicitLeaveDuration, 'leave', vnode);\n  }\n\n  var cb = el._leaveCb = once(function () {\n    if (el.parentNode && el.parentNode._pending) {\n      el.parentNode._pending[vnode.key] = null;\n    }\n    if (expectsCSS) {\n      removeTransitionClass(el, leaveToClass);\n      removeTransitionClass(el, leaveActiveClass);\n    }\n    if (cb.cancelled) {\n      if (expectsCSS) {\n        removeTransitionClass(el, leaveClass);\n      }\n      leaveCancelled && leaveCancelled(el);\n    } else {\n      rm();\n      afterLeave && afterLeave(el);\n    }\n    el._leaveCb = null;\n  });\n\n  if (delayLeave) {\n    delayLeave(performLeave);\n  } else {\n    performLeave();\n  }\n\n  function performLeave () {\n    // the delayed leave may have already been cancelled\n    if (cb.cancelled) {\n      return\n    }\n    // record leaving element\n    if (!vnode.data.show) {\n      (el.parentNode._pending || (el.parentNode._pending = {}))[vnode.key] = vnode;\n    }\n    beforeLeave && beforeLeave(el);\n    if (expectsCSS) {\n      addTransitionClass(el, leaveClass);\n      addTransitionClass(el, leaveActiveClass);\n      nextFrame(function () {\n        addTransitionClass(el, leaveToClass);\n        removeTransitionClass(el, leaveClass);\n        if (!cb.cancelled && !userWantsControl) {\n          if (isValidDuration(explicitLeaveDuration)) {\n            setTimeout(cb, explicitLeaveDuration);\n          } else {\n            whenTransitionEnds(el, type, cb);\n          }\n        }\n      });\n    }\n    leave && leave(el, cb);\n    if (!expectsCSS && !userWantsControl) {\n      cb();\n    }\n  }\n}\n\n// only used in dev mode\nfunction checkDuration (val, name, vnode) {\n  if (typeof val !== 'number') {\n    warn(\n      \"<transition> explicit \" + name + \" duration is not a valid number - \" +\n      \"got \" + (JSON.stringify(val)) + \".\",\n      vnode.context\n    );\n  } else if (isNaN(val)) {\n    warn(\n      \"<transition> explicit \" + name + \" duration is NaN - \" +\n      'the duration expression might be incorrect.',\n      vnode.context\n    );\n  }\n}\n\nfunction isValidDuration (val) {\n  return typeof val === 'number' && !isNaN(val)\n}\n\n/**\n * Normalize a transition hook's argument length. The hook may be:\n * - a merged hook (invoker) with the original in .fns\n * - a wrapped component method (check ._length)\n * - a plain function (.length)\n */\nfunction getHookArgumentsLength (fn) {\n  if (!fn) { return false }\n  var invokerFns = fn.fns;\n  if (invokerFns) {\n    // invoker\n    return getHookArgumentsLength(\n      Array.isArray(invokerFns)\n        ? invokerFns[0]\n        : invokerFns\n    )\n  } else {\n    return (fn._length || fn.length) > 1\n  }\n}\n\nfunction _enter (_, vnode) {\n  if (!vnode.data.show) {\n    enter(vnode);\n  }\n}\n\nvar transition = inBrowser ? {\n  create: _enter,\n  activate: _enter,\n  remove: function remove$$1 (vnode, rm) {\n    /* istanbul ignore else */\n    if (!vnode.data.show) {\n      leave(vnode, rm);\n    } else {\n      rm();\n    }\n  }\n} : {};\n\nvar platformModules = [\n  attrs,\n  klass,\n  events,\n  domProps,\n  style,\n  transition\n];\n\n/*  */\n\n// the directive module should be applied last, after all\n// built-in modules have been applied.\nvar modules = platformModules.concat(baseModules);\n\nvar patch = createPatchFunction({ nodeOps: nodeOps, modules: modules });\n\n/**\n * Not type checking this file because flow doesn't like attaching\n * properties to Elements.\n */\n\n/* istanbul ignore if */\nif (isIE9) {\n  // http://www.matts411.com/post/internet-explorer-9-oninput/\n  document.addEventListener('selectionchange', function () {\n    var el = document.activeElement;\n    if (el && el.vmodel) {\n      trigger(el, 'input');\n    }\n  });\n}\n\nvar model$1 = {\n  inserted: function inserted (el, binding, vnode) {\n    if (vnode.tag === 'select') {\n      var cb = function () {\n        setSelected(el, binding, vnode.context);\n      };\n      cb();\n      /* istanbul ignore if */\n      if (isIE || isEdge) {\n        setTimeout(cb, 0);\n      }\n    } else if (vnode.tag === 'textarea' || el.type === 'text' || el.type === 'password') {\n      el._vModifiers = binding.modifiers;\n      if (!binding.modifiers.lazy) {\n        if (!isAndroid) {\n          el.addEventListener('compositionstart', onCompositionStart);\n          el.addEventListener('compositionend', onCompositionEnd);\n        }\n        /* istanbul ignore if */\n        if (isIE9) {\n          el.vmodel = true;\n        }\n      }\n    }\n  },\n  componentUpdated: function componentUpdated (el, binding, vnode) {\n    if (vnode.tag === 'select') {\n      setSelected(el, binding, vnode.context);\n      // in case the options rendered by v-for have changed,\n      // it's possible that the value is out-of-sync with the rendered options.\n      // detect such cases and filter out values that no longer has a matching\n      // option in the DOM.\n      var needReset = el.multiple\n        ? binding.value.some(function (v) { return hasNoMatchingOption(v, el.options); })\n        : binding.value !== binding.oldValue && hasNoMatchingOption(binding.value, el.options);\n      if (needReset) {\n        trigger(el, 'change');\n      }\n    }\n  }\n};\n\nfunction setSelected (el, binding, vm) {\n  var value = binding.value;\n  var isMultiple = el.multiple;\n  if (isMultiple && !Array.isArray(value)) {\n    process.env.NODE_ENV !== 'production' && warn(\n      \"<select multiple v-model=\\\"\" + (binding.expression) + \"\\\"> \" +\n      \"expects an Array value for its binding, but got \" + (Object.prototype.toString.call(value).slice(8, -1)),\n      vm\n    );\n    return\n  }\n  var selected, option;\n  for (var i = 0, l = el.options.length; i < l; i++) {\n    option = el.options[i];\n    if (isMultiple) {\n      selected = looseIndexOf(value, getValue(option)) > -1;\n      if (option.selected !== selected) {\n        option.selected = selected;\n      }\n    } else {\n      if (looseEqual(getValue(option), value)) {\n        if (el.selectedIndex !== i) {\n          el.selectedIndex = i;\n        }\n        return\n      }\n    }\n  }\n  if (!isMultiple) {\n    el.selectedIndex = -1;\n  }\n}\n\nfunction hasNoMatchingOption (value, options) {\n  for (var i = 0, l = options.length; i < l; i++) {\n    if (looseEqual(getValue(options[i]), value)) {\n      return false\n    }\n  }\n  return true\n}\n\nfunction getValue (option) {\n  return '_value' in option\n    ? option._value\n    : option.value\n}\n\nfunction onCompositionStart (e) {\n  e.target.composing = true;\n}\n\nfunction onCompositionEnd (e) {\n  e.target.composing = false;\n  trigger(e.target, 'input');\n}\n\nfunction trigger (el, type) {\n  var e = document.createEvent('HTMLEvents');\n  e.initEvent(type, true, true);\n  el.dispatchEvent(e);\n}\n\n/*  */\n\n// recursively search for possible transition defined inside the component root\nfunction locateNode (vnode) {\n  return vnode.componentInstance && (!vnode.data || !vnode.data.transition)\n    ? locateNode(vnode.componentInstance._vnode)\n    : vnode\n}\n\nvar show = {\n  bind: function bind (el, ref, vnode) {\n    var value = ref.value;\n\n    vnode = locateNode(vnode);\n    var transition = vnode.data && vnode.data.transition;\n    var originalDisplay = el.__vOriginalDisplay =\n      el.style.display === 'none' ? '' : el.style.display;\n    if (value && transition && !isIE9) {\n      vnode.data.show = true;\n      enter(vnode, function () {\n        el.style.display = originalDisplay;\n      });\n    } else {\n      el.style.display = value ? originalDisplay : 'none';\n    }\n  },\n\n  update: function update (el, ref, vnode) {\n    var value = ref.value;\n    var oldValue = ref.oldValue;\n\n    /* istanbul ignore if */\n    if (value === oldValue) { return }\n    vnode = locateNode(vnode);\n    var transition = vnode.data && vnode.data.transition;\n    if (transition && !isIE9) {\n      vnode.data.show = true;\n      if (value) {\n        enter(vnode, function () {\n          el.style.display = el.__vOriginalDisplay;\n        });\n      } else {\n        leave(vnode, function () {\n          el.style.display = 'none';\n        });\n      }\n    } else {\n      el.style.display = value ? el.__vOriginalDisplay : 'none';\n    }\n  },\n\n  unbind: function unbind (\n    el,\n    binding,\n    vnode,\n    oldVnode,\n    isDestroy\n  ) {\n    if (!isDestroy) {\n      el.style.display = el.__vOriginalDisplay;\n    }\n  }\n};\n\nvar platformDirectives = {\n  model: model$1,\n  show: show\n};\n\n/*  */\n\n// Provides transition support for a single element/component.\n// supports transition mode (out-in / in-out)\n\nvar transitionProps = {\n  name: String,\n  appear: Boolean,\n  css: Boolean,\n  mode: String,\n  type: String,\n  enterClass: String,\n  leaveClass: String,\n  enterToClass: String,\n  leaveToClass: String,\n  enterActiveClass: String,\n  leaveActiveClass: String,\n  appearClass: String,\n  appearActiveClass: String,\n  appearToClass: String,\n  duration: [Number, String, Object]\n};\n\n// in case the child is also an abstract component, e.g. <keep-alive>\n// we want to recursively retrieve the real component to be rendered\nfunction getRealChild (vnode) {\n  var compOptions = vnode && vnode.componentOptions;\n  if (compOptions && compOptions.Ctor.options.abstract) {\n    return getRealChild(getFirstComponentChild(compOptions.children))\n  } else {\n    return vnode\n  }\n}\n\nfunction extractTransitionData (comp) {\n  var data = {};\n  var options = comp.$options;\n  // props\n  for (var key in options.propsData) {\n    data[key] = comp[key];\n  }\n  // events.\n  // extract listeners and pass them directly to the transition methods\n  var listeners = options._parentListeners;\n  for (var key$1 in listeners) {\n    data[camelize(key$1)] = listeners[key$1];\n  }\n  return data\n}\n\nfunction placeholder (h, rawChild) {\n  return /\\d-keep-alive$/.test(rawChild.tag)\n    ? h('keep-alive')\n    : null\n}\n\nfunction hasParentTransition (vnode) {\n  while ((vnode = vnode.parent)) {\n    if (vnode.data.transition) {\n      return true\n    }\n  }\n}\n\nfunction isSameChild (child, oldChild) {\n  return oldChild.key === child.key && oldChild.tag === child.tag\n}\n\nvar Transition = {\n  name: 'transition',\n  props: transitionProps,\n  abstract: true,\n\n  render: function render (h) {\n    var this$1 = this;\n\n    var children = this.$slots.default;\n    if (!children) {\n      return\n    }\n\n    // filter out text nodes (possible whitespaces)\n    children = children.filter(function (c) { return c.tag; });\n    /* istanbul ignore if */\n    if (!children.length) {\n      return\n    }\n\n    // warn multiple elements\n    if (process.env.NODE_ENV !== 'production' && children.length > 1) {\n      warn(\n        '<transition> can only be used on a single element. Use ' +\n        '<transition-group> for lists.',\n        this.$parent\n      );\n    }\n\n    var mode = this.mode;\n\n    // warn invalid mode\n    if (process.env.NODE_ENV !== 'production' &&\n        mode && mode !== 'in-out' && mode !== 'out-in') {\n      warn(\n        'invalid <transition> mode: ' + mode,\n        this.$parent\n      );\n    }\n\n    var rawChild = children[0];\n\n    // if this is a component root node and the component's\n    // parent container node also has transition, skip.\n    if (hasParentTransition(this.$vnode)) {\n      return rawChild\n    }\n\n    // apply transition data to child\n    // use getRealChild() to ignore abstract components e.g. keep-alive\n    var child = getRealChild(rawChild);\n    /* istanbul ignore if */\n    if (!child) {\n      return rawChild\n    }\n\n    if (this._leaving) {\n      return placeholder(h, rawChild)\n    }\n\n    // ensure a key that is unique to the vnode type and to this transition\n    // component instance. This key will be used to remove pending leaving nodes\n    // during entering.\n    var id = \"__transition-\" + (this._uid) + \"-\";\n    child.key = child.key == null\n      ? id + child.tag\n      : isPrimitive(child.key)\n        ? (String(child.key).indexOf(id) === 0 ? child.key : id + child.key)\n        : child.key;\n\n    var data = (child.data || (child.data = {})).transition = extractTransitionData(this);\n    var oldRawChild = this._vnode;\n    var oldChild = getRealChild(oldRawChild);\n\n    // mark v-show\n    // so that the transition module can hand over the control to the directive\n    if (child.data.directives && child.data.directives.some(function (d) { return d.name === 'show'; })) {\n      child.data.show = true;\n    }\n\n    if (oldChild && oldChild.data && !isSameChild(child, oldChild)) {\n      // replace old child transition data with fresh one\n      // important for dynamic transitions!\n      var oldData = oldChild && (oldChild.data.transition = extend({}, data));\n      // handle transition mode\n      if (mode === 'out-in') {\n        // return placeholder node and queue update when leave finishes\n        this._leaving = true;\n        mergeVNodeHook(oldData, 'afterLeave', function () {\n          this$1._leaving = false;\n          this$1.$forceUpdate();\n        });\n        return placeholder(h, rawChild)\n      } else if (mode === 'in-out') {\n        var delayedLeave;\n        var performLeave = function () { delayedLeave(); };\n        mergeVNodeHook(data, 'afterEnter', performLeave);\n        mergeVNodeHook(data, 'enterCancelled', performLeave);\n        mergeVNodeHook(oldData, 'delayLeave', function (leave) { delayedLeave = leave; });\n      }\n    }\n\n    return rawChild\n  }\n};\n\n/*  */\n\n// Provides transition support for list items.\n// supports move transitions using the FLIP technique.\n\n// Because the vdom's children update algorithm is \"unstable\" - i.e.\n// it doesn't guarantee the relative positioning of removed elements,\n// we force transition-group to update its children into two passes:\n// in the first pass, we remove all nodes that need to be removed,\n// triggering their leaving transition; in the second pass, we insert/move\n// into the final desired state. This way in the second pass removed\n// nodes will remain where they should be.\n\nvar props = extend({\n  tag: String,\n  moveClass: String\n}, transitionProps);\n\ndelete props.mode;\n\nvar TransitionGroup = {\n  props: props,\n\n  render: function render (h) {\n    var tag = this.tag || this.$vnode.data.tag || 'span';\n    var map = Object.create(null);\n    var prevChildren = this.prevChildren = this.children;\n    var rawChildren = this.$slots.default || [];\n    var children = this.children = [];\n    var transitionData = extractTransitionData(this);\n\n    for (var i = 0; i < rawChildren.length; i++) {\n      var c = rawChildren[i];\n      if (c.tag) {\n        if (c.key != null && String(c.key).indexOf('__vlist') !== 0) {\n          children.push(c);\n          map[c.key] = c\n          ;(c.data || (c.data = {})).transition = transitionData;\n        } else if (process.env.NODE_ENV !== 'production') {\n          var opts = c.componentOptions;\n          var name = opts ? (opts.Ctor.options.name || opts.tag || '') : c.tag;\n          warn((\"<transition-group> children must be keyed: <\" + name + \">\"));\n        }\n      }\n    }\n\n    if (prevChildren) {\n      var kept = [];\n      var removed = [];\n      for (var i$1 = 0; i$1 < prevChildren.length; i$1++) {\n        var c$1 = prevChildren[i$1];\n        c$1.data.transition = transitionData;\n        c$1.data.pos = c$1.elm.getBoundingClientRect();\n        if (map[c$1.key]) {\n          kept.push(c$1);\n        } else {\n          removed.push(c$1);\n        }\n      }\n      this.kept = h(tag, null, kept);\n      this.removed = removed;\n    }\n\n    return h(tag, null, children)\n  },\n\n  beforeUpdate: function beforeUpdate () {\n    // force removing pass\n    this.__patch__(\n      this._vnode,\n      this.kept,\n      false, // hydrating\n      true // removeOnly (!important, avoids unnecessary moves)\n    );\n    this._vnode = this.kept;\n  },\n\n  updated: function updated () {\n    var children = this.prevChildren;\n    var moveClass = this.moveClass || ((this.name || 'v') + '-move');\n    if (!children.length || !this.hasMove(children[0].elm, moveClass)) {\n      return\n    }\n\n    // we divide the work into three loops to avoid mixing DOM reads and writes\n    // in each iteration - which helps prevent layout thrashing.\n    children.forEach(callPendingCbs);\n    children.forEach(recordPosition);\n    children.forEach(applyTranslation);\n\n    // force reflow to put everything in position\n    var body = document.body;\n    var f = body.offsetHeight; // eslint-disable-line\n\n    children.forEach(function (c) {\n      if (c.data.moved) {\n        var el = c.elm;\n        var s = el.style;\n        addTransitionClass(el, moveClass);\n        s.transform = s.WebkitTransform = s.transitionDuration = '';\n        el.addEventListener(transitionEndEvent, el._moveCb = function cb (e) {\n          if (!e || /transform$/.test(e.propertyName)) {\n            el.removeEventListener(transitionEndEvent, cb);\n            el._moveCb = null;\n            removeTransitionClass(el, moveClass);\n          }\n        });\n      }\n    });\n  },\n\n  methods: {\n    hasMove: function hasMove (el, moveClass) {\n      /* istanbul ignore if */\n      if (!hasTransition) {\n        return false\n      }\n      if (this._hasMove != null) {\n        return this._hasMove\n      }\n      // Detect whether an element with the move class applied has\n      // CSS transitions. Since the element may be inside an entering\n      // transition at this very moment, we make a clone of it and remove\n      // all other transition classes applied to ensure only the move class\n      // is applied.\n      var clone = el.cloneNode();\n      if (el._transitionClasses) {\n        el._transitionClasses.forEach(function (cls) { removeClass(clone, cls); });\n      }\n      addClass(clone, moveClass);\n      clone.style.display = 'none';\n      this.$el.appendChild(clone);\n      var info = getTransitionInfo(clone);\n      this.$el.removeChild(clone);\n      return (this._hasMove = info.hasTransform)\n    }\n  }\n};\n\nfunction callPendingCbs (c) {\n  /* istanbul ignore if */\n  if (c.elm._moveCb) {\n    c.elm._moveCb();\n  }\n  /* istanbul ignore if */\n  if (c.elm._enterCb) {\n    c.elm._enterCb();\n  }\n}\n\nfunction recordPosition (c) {\n  c.data.newPos = c.elm.getBoundingClientRect();\n}\n\nfunction applyTranslation (c) {\n  var oldPos = c.data.pos;\n  var newPos = c.data.newPos;\n  var dx = oldPos.left - newPos.left;\n  var dy = oldPos.top - newPos.top;\n  if (dx || dy) {\n    c.data.moved = true;\n    var s = c.elm.style;\n    s.transform = s.WebkitTransform = \"translate(\" + dx + \"px,\" + dy + \"px)\";\n    s.transitionDuration = '0s';\n  }\n}\n\nvar platformComponents = {\n  Transition: Transition,\n  TransitionGroup: TransitionGroup\n};\n\n/*  */\n\n// install platform specific utils\nVue$3.config.mustUseProp = mustUseProp;\nVue$3.config.isReservedTag = isReservedTag;\nVue$3.config.getTagNamespace = getTagNamespace;\nVue$3.config.isUnknownElement = isUnknownElement;\n\n// install platform runtime directives & components\nextend(Vue$3.options.directives, platformDirectives);\nextend(Vue$3.options.components, platformComponents);\n\n// install platform patch function\nVue$3.prototype.__patch__ = inBrowser ? patch : noop;\n\n// public mount method\nVue$3.prototype.$mount = function (\n  el,\n  hydrating\n) {\n  el = el && inBrowser ? query(el) : undefined;\n  return mountComponent(this, el, hydrating)\n};\n\n// devtools global hook\n/* istanbul ignore next */\nsetTimeout(function () {\n  if (config.devtools) {\n    if (devtools) {\n      devtools.emit('init', Vue$3);\n    } else if (process.env.NODE_ENV !== 'production' && isChrome) {\n      console[console.info ? 'info' : 'log'](\n        'Download the Vue Devtools extension for a better development experience:\\n' +\n        'https://github.com/vuejs/vue-devtools'\n      );\n    }\n  }\n  if (process.env.NODE_ENV !== 'production' &&\n      config.productionTip !== false &&\n      inBrowser && typeof console !== 'undefined') {\n    console[console.info ? 'info' : 'log'](\n      \"You are running Vue in development mode.\\n\" +\n      \"Make sure to turn on production mode when deploying for production.\\n\" +\n      \"See more tips at https://vuejs.org/guide/deployment.html\"\n    );\n  }\n}, 0);\n\n/*  */\n\n// check whether current browser encodes a char inside attribute values\nfunction shouldDecode (content, encoded) {\n  var div = document.createElement('div');\n  div.innerHTML = \"<div a=\\\"\" + content + \"\\\">\";\n  return div.innerHTML.indexOf(encoded) > 0\n}\n\n// #3663\n// IE encodes newlines inside attribute values while other browsers don't\nvar shouldDecodeNewlines = inBrowser ? shouldDecode('\\n', '&#10;') : false;\n\n/*  */\n\nvar isUnaryTag = makeMap(\n  'area,base,br,col,embed,frame,hr,img,input,isindex,keygen,' +\n  'link,meta,param,source,track,wbr'\n);\n\n// Elements that you can, intentionally, leave open\n// (and which close themselves)\nvar canBeLeftOpenTag = makeMap(\n  'colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr,source'\n);\n\n// HTML5 tags https://html.spec.whatwg.org/multipage/indices.html#elements-3\n// Phrasing Content https://html.spec.whatwg.org/multipage/dom.html#phrasing-content\nvar isNonPhrasingTag = makeMap(\n  'address,article,aside,base,blockquote,body,caption,col,colgroup,dd,' +\n  'details,dialog,div,dl,dt,fieldset,figcaption,figure,footer,form,' +\n  'h1,h2,h3,h4,h5,h6,head,header,hgroup,hr,html,legend,li,menuitem,meta,' +\n  'optgroup,option,param,rp,rt,source,style,summary,tbody,td,tfoot,th,thead,' +\n  'title,tr,track'\n);\n\n/*  */\n\nvar decoder;\n\nfunction decode (html) {\n  decoder = decoder || document.createElement('div');\n  decoder.innerHTML = html;\n  return decoder.textContent\n}\n\n/**\n * Not type-checking this file because it's mostly vendor code.\n */\n\n/*!\n * HTML Parser By John Resig (ejohn.org)\n * Modified by Juriy \"kangax\" Zaytsev\n * Original code by Erik Arvidsson, Mozilla Public License\n * http://erik.eae.net/simplehtmlparser/simplehtmlparser.js\n */\n\n// Regular Expressions for parsing tags and attributes\nvar singleAttrIdentifier = /([^\\s\"'<>/=]+)/;\nvar singleAttrAssign = /(?:=)/;\nvar singleAttrValues = [\n  // attr value double quotes\n  /\"([^\"]*)\"+/.source,\n  // attr value, single quotes\n  /'([^']*)'+/.source,\n  // attr value, no quotes\n  /([^\\s\"'=<>`]+)/.source\n];\nvar attribute = new RegExp(\n  '^\\\\s*' + singleAttrIdentifier.source +\n  '(?:\\\\s*(' + singleAttrAssign.source + ')' +\n  '\\\\s*(?:' + singleAttrValues.join('|') + '))?'\n);\n\n// could use https://www.w3.org/TR/1999/REC-xml-names-19990114/#NT-QName\n// but for Vue templates we can enforce a simple charset\nvar ncname = '[a-zA-Z_][\\\\w\\\\-\\\\.]*';\nvar qnameCapture = '((?:' + ncname + '\\\\:)?' + ncname + ')';\nvar startTagOpen = new RegExp('^<' + qnameCapture);\nvar startTagClose = /^\\s*(\\/?)>/;\nvar endTag = new RegExp('^<\\\\/' + qnameCapture + '[^>]*>');\nvar doctype = /^<!DOCTYPE [^>]+>/i;\nvar comment = /^<!--/;\nvar conditionalComment = /^<!\\[/;\n\nvar IS_REGEX_CAPTURING_BROKEN = false;\n'x'.replace(/x(.)?/g, function (m, g) {\n  IS_REGEX_CAPTURING_BROKEN = g === '';\n});\n\n// Special Elements (can contain anything)\nvar isPlainTextElement = makeMap('script,style,textarea', true);\nvar reCache = {};\n\nvar decodingMap = {\n  '&lt;': '<',\n  '&gt;': '>',\n  '&quot;': '\"',\n  '&amp;': '&',\n  '&#10;': '\\n'\n};\nvar encodedAttr = /&(?:lt|gt|quot|amp);/g;\nvar encodedAttrWithNewLines = /&(?:lt|gt|quot|amp|#10);/g;\n\nfunction decodeAttr (value, shouldDecodeNewlines) {\n  var re = shouldDecodeNewlines ? encodedAttrWithNewLines : encodedAttr;\n  return value.replace(re, function (match) { return decodingMap[match]; })\n}\n\nfunction parseHTML (html, options) {\n  var stack = [];\n  var expectHTML = options.expectHTML;\n  var isUnaryTag$$1 = options.isUnaryTag || no;\n  var canBeLeftOpenTag$$1 = options.canBeLeftOpenTag || no;\n  var index = 0;\n  var last, lastTag;\n  while (html) {\n    last = html;\n    // Make sure we're not in a plaintext content element like script/style\n    if (!lastTag || !isPlainTextElement(lastTag)) {\n      var textEnd = html.indexOf('<');\n      if (textEnd === 0) {\n        // Comment:\n        if (comment.test(html)) {\n          var commentEnd = html.indexOf('-->');\n\n          if (commentEnd >= 0) {\n            advance(commentEnd + 3);\n            continue\n          }\n        }\n\n        // http://en.wikipedia.org/wiki/Conditional_comment#Downlevel-revealed_conditional_comment\n        if (conditionalComment.test(html)) {\n          var conditionalEnd = html.indexOf(']>');\n\n          if (conditionalEnd >= 0) {\n            advance(conditionalEnd + 2);\n            continue\n          }\n        }\n\n        // Doctype:\n        var doctypeMatch = html.match(doctype);\n        if (doctypeMatch) {\n          advance(doctypeMatch[0].length);\n          continue\n        }\n\n        // End tag:\n        var endTagMatch = html.match(endTag);\n        if (endTagMatch) {\n          var curIndex = index;\n          advance(endTagMatch[0].length);\n          parseEndTag(endTagMatch[1], curIndex, index);\n          continue\n        }\n\n        // Start tag:\n        var startTagMatch = parseStartTag();\n        if (startTagMatch) {\n          handleStartTag(startTagMatch);\n          continue\n        }\n      }\n\n      var text = (void 0), rest$1 = (void 0), next = (void 0);\n      if (textEnd >= 0) {\n        rest$1 = html.slice(textEnd);\n        while (\n          !endTag.test(rest$1) &&\n          !startTagOpen.test(rest$1) &&\n          !comment.test(rest$1) &&\n          !conditionalComment.test(rest$1)\n        ) {\n          // < in plain text, be forgiving and treat it as text\n          next = rest$1.indexOf('<', 1);\n          if (next < 0) { break }\n          textEnd += next;\n          rest$1 = html.slice(textEnd);\n        }\n        text = html.substring(0, textEnd);\n        advance(textEnd);\n      }\n\n      if (textEnd < 0) {\n        text = html;\n        html = '';\n      }\n\n      if (options.chars && text) {\n        options.chars(text);\n      }\n    } else {\n      var stackedTag = lastTag.toLowerCase();\n      var reStackedTag = reCache[stackedTag] || (reCache[stackedTag] = new RegExp('([\\\\s\\\\S]*?)(</' + stackedTag + '[^>]*>)', 'i'));\n      var endTagLength = 0;\n      var rest = html.replace(reStackedTag, function (all, text, endTag) {\n        endTagLength = endTag.length;\n        if (!isPlainTextElement(stackedTag) && stackedTag !== 'noscript') {\n          text = text\n            .replace(/<!--([\\s\\S]*?)-->/g, '$1')\n            .replace(/<!\\[CDATA\\[([\\s\\S]*?)]]>/g, '$1');\n        }\n        if (options.chars) {\n          options.chars(text);\n        }\n        return ''\n      });\n      index += html.length - rest.length;\n      html = rest;\n      parseEndTag(stackedTag, index - endTagLength, index);\n    }\n\n    if (html === last) {\n      options.chars && options.chars(html);\n      if (process.env.NODE_ENV !== 'production' && !stack.length && options.warn) {\n        options.warn((\"Mal-formatted tag at end of template: \\\"\" + html + \"\\\"\"));\n      }\n      break\n    }\n  }\n\n  // Clean up any remaining tags\n  parseEndTag();\n\n  function advance (n) {\n    index += n;\n    html = html.substring(n);\n  }\n\n  function parseStartTag () {\n    var start = html.match(startTagOpen);\n    if (start) {\n      var match = {\n        tagName: start[1],\n        attrs: [],\n        start: index\n      };\n      advance(start[0].length);\n      var end, attr;\n      while (!(end = html.match(startTagClose)) && (attr = html.match(attribute))) {\n        advance(attr[0].length);\n        match.attrs.push(attr);\n      }\n      if (end) {\n        match.unarySlash = end[1];\n        advance(end[0].length);\n        match.end = index;\n        return match\n      }\n    }\n  }\n\n  function handleStartTag (match) {\n    var tagName = match.tagName;\n    var unarySlash = match.unarySlash;\n\n    if (expectHTML) {\n      if (lastTag === 'p' && isNonPhrasingTag(tagName)) {\n        parseEndTag(lastTag);\n      }\n      if (canBeLeftOpenTag$$1(tagName) && lastTag === tagName) {\n        parseEndTag(tagName);\n      }\n    }\n\n    var unary = isUnaryTag$$1(tagName) || tagName === 'html' && lastTag === 'head' || !!unarySlash;\n\n    var l = match.attrs.length;\n    var attrs = new Array(l);\n    for (var i = 0; i < l; i++) {\n      var args = match.attrs[i];\n      // hackish work around FF bug https://bugzilla.mozilla.org/show_bug.cgi?id=369778\n      if (IS_REGEX_CAPTURING_BROKEN && args[0].indexOf('\"\"') === -1) {\n        if (args[3] === '') { delete args[3]; }\n        if (args[4] === '') { delete args[4]; }\n        if (args[5] === '') { delete args[5]; }\n      }\n      var value = args[3] || args[4] || args[5] || '';\n      attrs[i] = {\n        name: args[1],\n        value: decodeAttr(\n          value,\n          options.shouldDecodeNewlines\n        )\n      };\n    }\n\n    if (!unary) {\n      stack.push({ tag: tagName, lowerCasedTag: tagName.toLowerCase(), attrs: attrs });\n      lastTag = tagName;\n    }\n\n    if (options.start) {\n      options.start(tagName, attrs, unary, match.start, match.end);\n    }\n  }\n\n  function parseEndTag (tagName, start, end) {\n    var pos, lowerCasedTagName;\n    if (start == null) { start = index; }\n    if (end == null) { end = index; }\n\n    if (tagName) {\n      lowerCasedTagName = tagName.toLowerCase();\n    }\n\n    // Find the closest opened tag of the same type\n    if (tagName) {\n      for (pos = stack.length - 1; pos >= 0; pos--) {\n        if (stack[pos].lowerCasedTag === lowerCasedTagName) {\n          break\n        }\n      }\n    } else {\n      // If no tag name is provided, clean shop\n      pos = 0;\n    }\n\n    if (pos >= 0) {\n      // Close all the open elements, up the stack\n      for (var i = stack.length - 1; i >= pos; i--) {\n        if (process.env.NODE_ENV !== 'production' &&\n            (i > pos || !tagName) &&\n            options.warn) {\n          options.warn(\n            (\"tag <\" + (stack[i].tag) + \"> has no matching end tag.\")\n          );\n        }\n        if (options.end) {\n          options.end(stack[i].tag, start, end);\n        }\n      }\n\n      // Remove the open elements from the stack\n      stack.length = pos;\n      lastTag = pos && stack[pos - 1].tag;\n    } else if (lowerCasedTagName === 'br') {\n      if (options.start) {\n        options.start(tagName, [], true, start, end);\n      }\n    } else if (lowerCasedTagName === 'p') {\n      if (options.start) {\n        options.start(tagName, [], false, start, end);\n      }\n      if (options.end) {\n        options.end(tagName, start, end);\n      }\n    }\n  }\n}\n\n/*  */\n\nvar defaultTagRE = /\\{\\{((?:.|\\n)+?)\\}\\}/g;\nvar regexEscapeRE = /[-.*+?^${}()|[\\]\\/\\\\]/g;\n\nvar buildRegex = cached(function (delimiters) {\n  var open = delimiters[0].replace(regexEscapeRE, '\\\\$&');\n  var close = delimiters[1].replace(regexEscapeRE, '\\\\$&');\n  return new RegExp(open + '((?:.|\\\\n)+?)' + close, 'g')\n});\n\nfunction parseText (\n  text,\n  delimiters\n) {\n  var tagRE = delimiters ? buildRegex(delimiters) : defaultTagRE;\n  if (!tagRE.test(text)) {\n    return\n  }\n  var tokens = [];\n  var lastIndex = tagRE.lastIndex = 0;\n  var match, index;\n  while ((match = tagRE.exec(text))) {\n    index = match.index;\n    // push text token\n    if (index > lastIndex) {\n      tokens.push(JSON.stringify(text.slice(lastIndex, index)));\n    }\n    // tag token\n    var exp = parseFilters(match[1].trim());\n    tokens.push((\"_s(\" + exp + \")\"));\n    lastIndex = index + match[0].length;\n  }\n  if (lastIndex < text.length) {\n    tokens.push(JSON.stringify(text.slice(lastIndex)));\n  }\n  return tokens.join('+')\n}\n\n/*  */\n\nvar onRE = /^@|^v-on:/;\nvar dirRE = /^v-|^@|^:/;\nvar forAliasRE = /(.*?)\\s+(?:in|of)\\s+(.*)/;\nvar forIteratorRE = /\\((\\{[^}]*\\}|[^,]*),([^,]*)(?:,([^,]*))?\\)/;\n\nvar argRE = /:(.*)$/;\nvar bindRE = /^:|^v-bind:/;\nvar modifierRE = /\\.[^.]+/g;\n\nvar decodeHTMLCached = cached(decode);\n\n// configurable state\nvar warn$2;\nvar delimiters;\nvar transforms;\nvar preTransforms;\nvar postTransforms;\nvar platformIsPreTag;\nvar platformMustUseProp;\nvar platformGetTagNamespace;\n\n/**\n * Convert HTML string to AST.\n */\nfunction parse (\n  template,\n  options\n) {\n  warn$2 = options.warn || baseWarn;\n  platformGetTagNamespace = options.getTagNamespace || no;\n  platformMustUseProp = options.mustUseProp || no;\n  platformIsPreTag = options.isPreTag || no;\n  preTransforms = pluckModuleFunction(options.modules, 'preTransformNode');\n  transforms = pluckModuleFunction(options.modules, 'transformNode');\n  postTransforms = pluckModuleFunction(options.modules, 'postTransformNode');\n  delimiters = options.delimiters;\n\n  var stack = [];\n  var preserveWhitespace = options.preserveWhitespace !== false;\n  var root;\n  var currentParent;\n  var inVPre = false;\n  var inPre = false;\n  var warned = false;\n\n  function warnOnce (msg) {\n    if (!warned) {\n      warned = true;\n      warn$2(msg);\n    }\n  }\n\n  function endPre (element) {\n    // check pre state\n    if (element.pre) {\n      inVPre = false;\n    }\n    if (platformIsPreTag(element.tag)) {\n      inPre = false;\n    }\n  }\n\n  parseHTML(template, {\n    warn: warn$2,\n    expectHTML: options.expectHTML,\n    isUnaryTag: options.isUnaryTag,\n    canBeLeftOpenTag: options.canBeLeftOpenTag,\n    shouldDecodeNewlines: options.shouldDecodeNewlines,\n    start: function start (tag, attrs, unary) {\n      // check namespace.\n      // inherit parent ns if there is one\n      var ns = (currentParent && currentParent.ns) || platformGetTagNamespace(tag);\n\n      // handle IE svg bug\n      /* istanbul ignore if */\n      if (isIE && ns === 'svg') {\n        attrs = guardIESVGBug(attrs);\n      }\n\n      var element = {\n        type: 1,\n        tag: tag,\n        attrsList: attrs,\n        attrsMap: makeAttrsMap(attrs),\n        parent: currentParent,\n        children: []\n      };\n      if (ns) {\n        element.ns = ns;\n      }\n\n      if (isForbiddenTag(element) && !isServerRendering()) {\n        element.forbidden = true;\n        process.env.NODE_ENV !== 'production' && warn$2(\n          'Templates should only be responsible for mapping the state to the ' +\n          'UI. Avoid placing tags with side-effects in your templates, such as ' +\n          \"<\" + tag + \">\" + ', as they will not be parsed.'\n        );\n      }\n\n      // apply pre-transforms\n      for (var i = 0; i < preTransforms.length; i++) {\n        preTransforms[i](element, options);\n      }\n\n      if (!inVPre) {\n        processPre(element);\n        if (element.pre) {\n          inVPre = true;\n        }\n      }\n      if (platformIsPreTag(element.tag)) {\n        inPre = true;\n      }\n      if (inVPre) {\n        processRawAttrs(element);\n      } else {\n        processFor(element);\n        processIf(element);\n        processOnce(element);\n        processKey(element);\n\n        // determine whether this is a plain element after\n        // removing structural attributes\n        element.plain = !element.key && !attrs.length;\n\n        processRef(element);\n        processSlot(element);\n        processComponent(element);\n        for (var i$1 = 0; i$1 < transforms.length; i$1++) {\n          transforms[i$1](element, options);\n        }\n        processAttrs(element);\n      }\n\n      function checkRootConstraints (el) {\n        if (process.env.NODE_ENV !== 'production') {\n          if (el.tag === 'slot' || el.tag === 'template') {\n            warnOnce(\n              \"Cannot use <\" + (el.tag) + \"> as component root element because it may \" +\n              'contain multiple nodes.'\n            );\n          }\n          if (el.attrsMap.hasOwnProperty('v-for')) {\n            warnOnce(\n              'Cannot use v-for on stateful component root element because ' +\n              'it renders multiple elements.'\n            );\n          }\n        }\n      }\n\n      // tree management\n      if (!root) {\n        root = element;\n        checkRootConstraints(root);\n      } else if (!stack.length) {\n        // allow root elements with v-if, v-else-if and v-else\n        if (root.if && (element.elseif || element.else)) {\n          checkRootConstraints(element);\n          addIfCondition(root, {\n            exp: element.elseif,\n            block: element\n          });\n        } else if (process.env.NODE_ENV !== 'production') {\n          warnOnce(\n            \"Component template should contain exactly one root element. \" +\n            \"If you are using v-if on multiple elements, \" +\n            \"use v-else-if to chain them instead.\"\n          );\n        }\n      }\n      if (currentParent && !element.forbidden) {\n        if (element.elseif || element.else) {\n          processIfConditions(element, currentParent);\n        } else if (element.slotScope) { // scoped slot\n          currentParent.plain = false;\n          var name = element.slotTarget || '\"default\"';(currentParent.scopedSlots || (currentParent.scopedSlots = {}))[name] = element;\n        } else {\n          currentParent.children.push(element);\n          element.parent = currentParent;\n        }\n      }\n      if (!unary) {\n        currentParent = element;\n        stack.push(element);\n      } else {\n        endPre(element);\n      }\n      // apply post-transforms\n      for (var i$2 = 0; i$2 < postTransforms.length; i$2++) {\n        postTransforms[i$2](element, options);\n      }\n    },\n\n    end: function end () {\n      // remove trailing whitespace\n      var element = stack[stack.length - 1];\n      var lastNode = element.children[element.children.length - 1];\n      if (lastNode && lastNode.type === 3 && lastNode.text === ' ' && !inPre) {\n        element.children.pop();\n      }\n      // pop stack\n      stack.length -= 1;\n      currentParent = stack[stack.length - 1];\n      endPre(element);\n    },\n\n    chars: function chars (text) {\n      if (!currentParent) {\n        if (process.env.NODE_ENV !== 'production') {\n          if (text === template) {\n            warnOnce(\n              'Component template requires a root element, rather than just text.'\n            );\n          } else if ((text = text.trim())) {\n            warnOnce(\n              (\"text \\\"\" + text + \"\\\" outside root element will be ignored.\")\n            );\n          }\n        }\n        return\n      }\n      // IE textarea placeholder bug\n      /* istanbul ignore if */\n      if (isIE &&\n          currentParent.tag === 'textarea' &&\n          currentParent.attrsMap.placeholder === text) {\n        return\n      }\n      var children = currentParent.children;\n      text = inPre || text.trim()\n        ? decodeHTMLCached(text)\n        // only preserve whitespace if its not right after a starting tag\n        : preserveWhitespace && children.length ? ' ' : '';\n      if (text) {\n        var expression;\n        if (!inVPre && text !== ' ' && (expression = parseText(text, delimiters))) {\n          children.push({\n            type: 2,\n            expression: expression,\n            text: text\n          });\n        } else if (text !== ' ' || !children.length || children[children.length - 1].text !== ' ') {\n          children.push({\n            type: 3,\n            text: text\n          });\n        }\n      }\n    }\n  });\n  return root\n}\n\nfunction processPre (el) {\n  if (getAndRemoveAttr(el, 'v-pre') != null) {\n    el.pre = true;\n  }\n}\n\nfunction processRawAttrs (el) {\n  var l = el.attrsList.length;\n  if (l) {\n    var attrs = el.attrs = new Array(l);\n    for (var i = 0; i < l; i++) {\n      attrs[i] = {\n        name: el.attrsList[i].name,\n        value: JSON.stringify(el.attrsList[i].value)\n      };\n    }\n  } else if (!el.pre) {\n    // non root node in pre blocks with no attributes\n    el.plain = true;\n  }\n}\n\nfunction processKey (el) {\n  var exp = getBindingAttr(el, 'key');\n  if (exp) {\n    if (process.env.NODE_ENV !== 'production' && el.tag === 'template') {\n      warn$2(\"<template> cannot be keyed. Place the key on real elements instead.\");\n    }\n    el.key = exp;\n  }\n}\n\nfunction processRef (el) {\n  var ref = getBindingAttr(el, 'ref');\n  if (ref) {\n    el.ref = ref;\n    el.refInFor = checkInFor(el);\n  }\n}\n\nfunction processFor (el) {\n  var exp;\n  if ((exp = getAndRemoveAttr(el, 'v-for'))) {\n    var inMatch = exp.match(forAliasRE);\n    if (!inMatch) {\n      process.env.NODE_ENV !== 'production' && warn$2(\n        (\"Invalid v-for expression: \" + exp)\n      );\n      return\n    }\n    el.for = inMatch[2].trim();\n    var alias = inMatch[1].trim();\n    var iteratorMatch = alias.match(forIteratorRE);\n    if (iteratorMatch) {\n      el.alias = iteratorMatch[1].trim();\n      el.iterator1 = iteratorMatch[2].trim();\n      if (iteratorMatch[3]) {\n        el.iterator2 = iteratorMatch[3].trim();\n      }\n    } else {\n      el.alias = alias;\n    }\n  }\n}\n\nfunction processIf (el) {\n  var exp = getAndRemoveAttr(el, 'v-if');\n  if (exp) {\n    el.if = exp;\n    addIfCondition(el, {\n      exp: exp,\n      block: el\n    });\n  } else {\n    if (getAndRemoveAttr(el, 'v-else') != null) {\n      el.else = true;\n    }\n    var elseif = getAndRemoveAttr(el, 'v-else-if');\n    if (elseif) {\n      el.elseif = elseif;\n    }\n  }\n}\n\nfunction processIfConditions (el, parent) {\n  var prev = findPrevElement(parent.children);\n  if (prev && prev.if) {\n    addIfCondition(prev, {\n      exp: el.elseif,\n      block: el\n    });\n  } else if (process.env.NODE_ENV !== 'production') {\n    warn$2(\n      \"v-\" + (el.elseif ? ('else-if=\"' + el.elseif + '\"') : 'else') + \" \" +\n      \"used on element <\" + (el.tag) + \"> without corresponding v-if.\"\n    );\n  }\n}\n\nfunction findPrevElement (children) {\n  var i = children.length;\n  while (i--) {\n    if (children[i].type === 1) {\n      return children[i]\n    } else {\n      if (process.env.NODE_ENV !== 'production' && children[i].text !== ' ') {\n        warn$2(\n          \"text \\\"\" + (children[i].text.trim()) + \"\\\" between v-if and v-else(-if) \" +\n          \"will be ignored.\"\n        );\n      }\n      children.pop();\n    }\n  }\n}\n\nfunction addIfCondition (el, condition) {\n  if (!el.ifConditions) {\n    el.ifConditions = [];\n  }\n  el.ifConditions.push(condition);\n}\n\nfunction processOnce (el) {\n  var once$$1 = getAndRemoveAttr(el, 'v-once');\n  if (once$$1 != null) {\n    el.once = true;\n  }\n}\n\nfunction processSlot (el) {\n  if (el.tag === 'slot') {\n    el.slotName = getBindingAttr(el, 'name');\n    if (process.env.NODE_ENV !== 'production' && el.key) {\n      warn$2(\n        \"`key` does not work on <slot> because slots are abstract outlets \" +\n        \"and can possibly expand into multiple elements. \" +\n        \"Use the key on a wrapping element instead.\"\n      );\n    }\n  } else {\n    var slotTarget = getBindingAttr(el, 'slot');\n    if (slotTarget) {\n      el.slotTarget = slotTarget === '\"\"' ? '\"default\"' : slotTarget;\n    }\n    if (el.tag === 'template') {\n      el.slotScope = getAndRemoveAttr(el, 'scope');\n    }\n  }\n}\n\nfunction processComponent (el) {\n  var binding;\n  if ((binding = getBindingAttr(el, 'is'))) {\n    el.component = binding;\n  }\n  if (getAndRemoveAttr(el, 'inline-template') != null) {\n    el.inlineTemplate = true;\n  }\n}\n\nfunction processAttrs (el) {\n  var list = el.attrsList;\n  var i, l, name, rawName, value, modifiers, isProp;\n  for (i = 0, l = list.length; i < l; i++) {\n    name = rawName = list[i].name;\n    value = list[i].value;\n    if (dirRE.test(name)) {\n      // mark element as dynamic\n      el.hasBindings = true;\n      // modifiers\n      modifiers = parseModifiers(name);\n      if (modifiers) {\n        name = name.replace(modifierRE, '');\n      }\n      if (bindRE.test(name)) { // v-bind\n        name = name.replace(bindRE, '');\n        value = parseFilters(value);\n        isProp = false;\n        if (modifiers) {\n          if (modifiers.prop) {\n            isProp = true;\n            name = camelize(name);\n            if (name === 'innerHtml') { name = 'innerHTML'; }\n          }\n          if (modifiers.camel) {\n            name = camelize(name);\n          }\n        }\n        if (isProp || platformMustUseProp(el.tag, el.attrsMap.type, name)) {\n          addProp(el, name, value);\n        } else {\n          addAttr(el, name, value);\n        }\n      } else if (onRE.test(name)) { // v-on\n        name = name.replace(onRE, '');\n        addHandler(el, name, value, modifiers);\n      } else { // normal directives\n        name = name.replace(dirRE, '');\n        // parse arg\n        var argMatch = name.match(argRE);\n        var arg = argMatch && argMatch[1];\n        if (arg) {\n          name = name.slice(0, -(arg.length + 1));\n        }\n        addDirective(el, name, rawName, value, arg, modifiers);\n        if (process.env.NODE_ENV !== 'production' && name === 'model') {\n          checkForAliasModel(el, value);\n        }\n      }\n    } else {\n      // literal attribute\n      if (process.env.NODE_ENV !== 'production') {\n        var expression = parseText(value, delimiters);\n        if (expression) {\n          warn$2(\n            name + \"=\\\"\" + value + \"\\\": \" +\n            'Interpolation inside attributes has been removed. ' +\n            'Use v-bind or the colon shorthand instead. For example, ' +\n            'instead of <div id=\"{{ val }}\">, use <div :id=\"val\">.'\n          );\n        }\n      }\n      addAttr(el, name, JSON.stringify(value));\n    }\n  }\n}\n\nfunction checkInFor (el) {\n  var parent = el;\n  while (parent) {\n    if (parent.for !== undefined) {\n      return true\n    }\n    parent = parent.parent;\n  }\n  return false\n}\n\nfunction parseModifiers (name) {\n  var match = name.match(modifierRE);\n  if (match) {\n    var ret = {};\n    match.forEach(function (m) { ret[m.slice(1)] = true; });\n    return ret\n  }\n}\n\nfunction makeAttrsMap (attrs) {\n  var map = {};\n  for (var i = 0, l = attrs.length; i < l; i++) {\n    if (process.env.NODE_ENV !== 'production' && map[attrs[i].name] && !isIE) {\n      warn$2('duplicate attribute: ' + attrs[i].name);\n    }\n    map[attrs[i].name] = attrs[i].value;\n  }\n  return map\n}\n\nfunction isForbiddenTag (el) {\n  return (\n    el.tag === 'style' ||\n    (el.tag === 'script' && (\n      !el.attrsMap.type ||\n      el.attrsMap.type === 'text/javascript'\n    ))\n  )\n}\n\nvar ieNSBug = /^xmlns:NS\\d+/;\nvar ieNSPrefix = /^NS\\d+:/;\n\n/* istanbul ignore next */\nfunction guardIESVGBug (attrs) {\n  var res = [];\n  for (var i = 0; i < attrs.length; i++) {\n    var attr = attrs[i];\n    if (!ieNSBug.test(attr.name)) {\n      attr.name = attr.name.replace(ieNSPrefix, '');\n      res.push(attr);\n    }\n  }\n  return res\n}\n\nfunction checkForAliasModel (el, value) {\n  var _el = el;\n  while (_el) {\n    if (_el.for && _el.alias === value) {\n      warn$2(\n        \"<\" + (el.tag) + \" v-model=\\\"\" + value + \"\\\">: \" +\n        \"You are binding v-model directly to a v-for iteration alias. \" +\n        \"This will not be able to modify the v-for source array because \" +\n        \"writing to the alias is like modifying a function local variable. \" +\n        \"Consider using an array of objects and use v-model on an object property instead.\"\n      );\n    }\n    _el = _el.parent;\n  }\n}\n\n/*  */\n\nvar isStaticKey;\nvar isPlatformReservedTag;\n\nvar genStaticKeysCached = cached(genStaticKeys$1);\n\n/**\n * Goal of the optimizer: walk the generated template AST tree\n * and detect sub-trees that are purely static, i.e. parts of\n * the DOM that never needs to change.\n *\n * Once we detect these sub-trees, we can:\n *\n * 1. Hoist them into constants, so that we no longer need to\n *    create fresh nodes for them on each re-render;\n * 2. Completely skip them in the patching process.\n */\nfunction optimize (root, options) {\n  if (!root) { return }\n  isStaticKey = genStaticKeysCached(options.staticKeys || '');\n  isPlatformReservedTag = options.isReservedTag || no;\n  // first pass: mark all non-static nodes.\n  markStatic$1(root);\n  // second pass: mark static roots.\n  markStaticRoots(root, false);\n}\n\nfunction genStaticKeys$1 (keys) {\n  return makeMap(\n    'type,tag,attrsList,attrsMap,plain,parent,children,attrs' +\n    (keys ? ',' + keys : '')\n  )\n}\n\nfunction markStatic$1 (node) {\n  node.static = isStatic(node);\n  if (node.type === 1) {\n    // do not make component slot content static. this avoids\n    // 1. components not able to mutate slot nodes\n    // 2. static slot content fails for hot-reloading\n    if (\n      !isPlatformReservedTag(node.tag) &&\n      node.tag !== 'slot' &&\n      node.attrsMap['inline-template'] == null\n    ) {\n      return\n    }\n    for (var i = 0, l = node.children.length; i < l; i++) {\n      var child = node.children[i];\n      markStatic$1(child);\n      if (!child.static) {\n        node.static = false;\n      }\n    }\n  }\n}\n\nfunction markStaticRoots (node, isInFor) {\n  if (node.type === 1) {\n    if (node.static || node.once) {\n      node.staticInFor = isInFor;\n    }\n    // For a node to qualify as a static root, it should have children that\n    // are not just static text. Otherwise the cost of hoisting out will\n    // outweigh the benefits and it's better off to just always render it fresh.\n    if (node.static && node.children.length && !(\n      node.children.length === 1 &&\n      node.children[0].type === 3\n    )) {\n      node.staticRoot = true;\n      return\n    } else {\n      node.staticRoot = false;\n    }\n    if (node.children) {\n      for (var i = 0, l = node.children.length; i < l; i++) {\n        markStaticRoots(node.children[i], isInFor || !!node.for);\n      }\n    }\n    if (node.ifConditions) {\n      walkThroughConditionsBlocks(node.ifConditions, isInFor);\n    }\n  }\n}\n\nfunction walkThroughConditionsBlocks (conditionBlocks, isInFor) {\n  for (var i = 1, len = conditionBlocks.length; i < len; i++) {\n    markStaticRoots(conditionBlocks[i].block, isInFor);\n  }\n}\n\nfunction isStatic (node) {\n  if (node.type === 2) { // expression\n    return false\n  }\n  if (node.type === 3) { // text\n    return true\n  }\n  return !!(node.pre || (\n    !node.hasBindings && // no dynamic bindings\n    !node.if && !node.for && // not v-if or v-for or v-else\n    !isBuiltInTag(node.tag) && // not a built-in\n    isPlatformReservedTag(node.tag) && // not a component\n    !isDirectChildOfTemplateFor(node) &&\n    Object.keys(node).every(isStaticKey)\n  ))\n}\n\nfunction isDirectChildOfTemplateFor (node) {\n  while (node.parent) {\n    node = node.parent;\n    if (node.tag !== 'template') {\n      return false\n    }\n    if (node.for) {\n      return true\n    }\n  }\n  return false\n}\n\n/*  */\n\nvar fnExpRE = /^\\s*([\\w$_]+|\\([^)]*?\\))\\s*=>|^function\\s*\\(/;\nvar simplePathRE = /^\\s*[A-Za-z_$][\\w$]*(?:\\.[A-Za-z_$][\\w$]*|\\['.*?']|\\[\".*?\"]|\\[\\d+]|\\[[A-Za-z_$][\\w$]*])*\\s*$/;\n\n// keyCode aliases\nvar keyCodes = {\n  esc: 27,\n  tab: 9,\n  enter: 13,\n  space: 32,\n  up: 38,\n  left: 37,\n  right: 39,\n  down: 40,\n  'delete': [8, 46]\n};\n\n// #4868: modifiers that prevent the execution of the listener\n// need to explicitly return null so that we can determine whether to remove\n// the listener for .once\nvar genGuard = function (condition) { return (\"if(\" + condition + \")return null;\"); };\n\nvar modifierCode = {\n  stop: '$event.stopPropagation();',\n  prevent: '$event.preventDefault();',\n  self: genGuard(\"$event.target !== $event.currentTarget\"),\n  ctrl: genGuard(\"!$event.ctrlKey\"),\n  shift: genGuard(\"!$event.shiftKey\"),\n  alt: genGuard(\"!$event.altKey\"),\n  meta: genGuard(\"!$event.metaKey\"),\n  left: genGuard(\"'button' in $event && $event.button !== 0\"),\n  middle: genGuard(\"'button' in $event && $event.button !== 1\"),\n  right: genGuard(\"'button' in $event && $event.button !== 2\")\n};\n\nfunction genHandlers (events, native) {\n  var res = native ? 'nativeOn:{' : 'on:{';\n  for (var name in events) {\n    res += \"\\\"\" + name + \"\\\":\" + (genHandler(name, events[name])) + \",\";\n  }\n  return res.slice(0, -1) + '}'\n}\n\nfunction genHandler (\n  name,\n  handler\n) {\n  if (!handler) {\n    return 'function(){}'\n  }\n\n  if (Array.isArray(handler)) {\n    return (\"[\" + (handler.map(function (handler) { return genHandler(name, handler); }).join(',')) + \"]\")\n  }\n\n  var isMethodPath = simplePathRE.test(handler.value);\n  var isFunctionExpression = fnExpRE.test(handler.value);\n\n  if (!handler.modifiers) {\n    return isMethodPath || isFunctionExpression\n      ? handler.value\n      : (\"function($event){\" + (handler.value) + \"}\") // inline statement\n  } else {\n    var code = '';\n    var genModifierCode = '';\n    var keys = [];\n    for (var key in handler.modifiers) {\n      if (modifierCode[key]) {\n        genModifierCode += modifierCode[key];\n        // left/right\n        if (keyCodes[key]) {\n          keys.push(key);\n        }\n      } else {\n        keys.push(key);\n      }\n    }\n    if (keys.length) {\n      code += genKeyFilter(keys);\n    }\n    // Make sure modifiers like prevent and stop get executed after key filtering\n    if (genModifierCode) {\n      code += genModifierCode;\n    }\n    var handlerCode = isMethodPath\n      ? handler.value + '($event)'\n      : isFunctionExpression\n        ? (\"(\" + (handler.value) + \")($event)\")\n        : handler.value;\n    return (\"function($event){\" + code + handlerCode + \"}\")\n  }\n}\n\nfunction genKeyFilter (keys) {\n  return (\"if(!('button' in $event)&&\" + (keys.map(genFilterCode).join('&&')) + \")return null;\")\n}\n\nfunction genFilterCode (key) {\n  var keyVal = parseInt(key, 10);\n  if (keyVal) {\n    return (\"$event.keyCode!==\" + keyVal)\n  }\n  var alias = keyCodes[key];\n  return (\"_k($event.keyCode,\" + (JSON.stringify(key)) + (alias ? ',' + JSON.stringify(alias) : '') + \")\")\n}\n\n/*  */\n\nfunction bind$1 (el, dir) {\n  el.wrapData = function (code) {\n    return (\"_b(\" + code + \",'\" + (el.tag) + \"',\" + (dir.value) + (dir.modifiers && dir.modifiers.prop ? ',true' : '') + \")\")\n  };\n}\n\n/*  */\n\nvar baseDirectives = {\n  bind: bind$1,\n  cloak: noop\n};\n\n/*  */\n\n// configurable state\nvar warn$3;\nvar transforms$1;\nvar dataGenFns;\nvar platformDirectives$1;\nvar isPlatformReservedTag$1;\nvar staticRenderFns;\nvar onceCount;\nvar currentOptions;\n\nfunction generate (\n  ast,\n  options\n) {\n  // save previous staticRenderFns so generate calls can be nested\n  var prevStaticRenderFns = staticRenderFns;\n  var currentStaticRenderFns = staticRenderFns = [];\n  var prevOnceCount = onceCount;\n  onceCount = 0;\n  currentOptions = options;\n  warn$3 = options.warn || baseWarn;\n  transforms$1 = pluckModuleFunction(options.modules, 'transformCode');\n  dataGenFns = pluckModuleFunction(options.modules, 'genData');\n  platformDirectives$1 = options.directives || {};\n  isPlatformReservedTag$1 = options.isReservedTag || no;\n  var code = ast ? genElement(ast) : '_c(\"div\")';\n  staticRenderFns = prevStaticRenderFns;\n  onceCount = prevOnceCount;\n  return {\n    render: (\"with(this){return \" + code + \"}\"),\n    staticRenderFns: currentStaticRenderFns\n  }\n}\n\nfunction genElement (el) {\n  if (el.staticRoot && !el.staticProcessed) {\n    return genStatic(el)\n  } else if (el.once && !el.onceProcessed) {\n    return genOnce(el)\n  } else if (el.for && !el.forProcessed) {\n    return genFor(el)\n  } else if (el.if && !el.ifProcessed) {\n    return genIf(el)\n  } else if (el.tag === 'template' && !el.slotTarget) {\n    return genChildren(el) || 'void 0'\n  } else if (el.tag === 'slot') {\n    return genSlot(el)\n  } else {\n    // component or element\n    var code;\n    if (el.component) {\n      code = genComponent(el.component, el);\n    } else {\n      var data = el.plain ? undefined : genData(el);\n\n      var children = el.inlineTemplate ? null : genChildren(el, true);\n      code = \"_c('\" + (el.tag) + \"'\" + (data ? (\",\" + data) : '') + (children ? (\",\" + children) : '') + \")\";\n    }\n    // module transforms\n    for (var i = 0; i < transforms$1.length; i++) {\n      code = transforms$1[i](el, code);\n    }\n    return code\n  }\n}\n\n// hoist static sub-trees out\nfunction genStatic (el) {\n  el.staticProcessed = true;\n  staticRenderFns.push((\"with(this){return \" + (genElement(el)) + \"}\"));\n  return (\"_m(\" + (staticRenderFns.length - 1) + (el.staticInFor ? ',true' : '') + \")\")\n}\n\n// v-once\nfunction genOnce (el) {\n  el.onceProcessed = true;\n  if (el.if && !el.ifProcessed) {\n    return genIf(el)\n  } else if (el.staticInFor) {\n    var key = '';\n    var parent = el.parent;\n    while (parent) {\n      if (parent.for) {\n        key = parent.key;\n        break\n      }\n      parent = parent.parent;\n    }\n    if (!key) {\n      process.env.NODE_ENV !== 'production' && warn$3(\n        \"v-once can only be used inside v-for that is keyed. \"\n      );\n      return genElement(el)\n    }\n    return (\"_o(\" + (genElement(el)) + \",\" + (onceCount++) + (key ? (\",\" + key) : \"\") + \")\")\n  } else {\n    return genStatic(el)\n  }\n}\n\nfunction genIf (el) {\n  el.ifProcessed = true; // avoid recursion\n  return genIfConditions(el.ifConditions.slice())\n}\n\nfunction genIfConditions (conditions) {\n  if (!conditions.length) {\n    return '_e()'\n  }\n\n  var condition = conditions.shift();\n  if (condition.exp) {\n    return (\"(\" + (condition.exp) + \")?\" + (genTernaryExp(condition.block)) + \":\" + (genIfConditions(conditions)))\n  } else {\n    return (\"\" + (genTernaryExp(condition.block)))\n  }\n\n  // v-if with v-once should generate code like (a)?_m(0):_m(1)\n  function genTernaryExp (el) {\n    return el.once ? genOnce(el) : genElement(el)\n  }\n}\n\nfunction genFor (el) {\n  var exp = el.for;\n  var alias = el.alias;\n  var iterator1 = el.iterator1 ? (\",\" + (el.iterator1)) : '';\n  var iterator2 = el.iterator2 ? (\",\" + (el.iterator2)) : '';\n\n  if (\n    process.env.NODE_ENV !== 'production' &&\n    maybeComponent(el) && el.tag !== 'slot' && el.tag !== 'template' && !el.key\n  ) {\n    warn$3(\n      \"<\" + (el.tag) + \" v-for=\\\"\" + alias + \" in \" + exp + \"\\\">: component lists rendered with \" +\n      \"v-for should have explicit keys. \" +\n      \"See https://vuejs.org/guide/list.html#key for more info.\",\n      true /* tip */\n    );\n  }\n\n  el.forProcessed = true; // avoid recursion\n  return \"_l((\" + exp + \"),\" +\n    \"function(\" + alias + iterator1 + iterator2 + \"){\" +\n      \"return \" + (genElement(el)) +\n    '})'\n}\n\nfunction genData (el) {\n  var data = '{';\n\n  // directives first.\n  // directives may mutate the el's other properties before they are generated.\n  var dirs = genDirectives(el);\n  if (dirs) { data += dirs + ','; }\n\n  // key\n  if (el.key) {\n    data += \"key:\" + (el.key) + \",\";\n  }\n  // ref\n  if (el.ref) {\n    data += \"ref:\" + (el.ref) + \",\";\n  }\n  if (el.refInFor) {\n    data += \"refInFor:true,\";\n  }\n  // pre\n  if (el.pre) {\n    data += \"pre:true,\";\n  }\n  // record original tag name for components using \"is\" attribute\n  if (el.component) {\n    data += \"tag:\\\"\" + (el.tag) + \"\\\",\";\n  }\n  // module data generation functions\n  for (var i = 0; i < dataGenFns.length; i++) {\n    data += dataGenFns[i](el);\n  }\n  // attributes\n  if (el.attrs) {\n    data += \"attrs:{\" + (genProps(el.attrs)) + \"},\";\n  }\n  // DOM props\n  if (el.props) {\n    data += \"domProps:{\" + (genProps(el.props)) + \"},\";\n  }\n  // event handlers\n  if (el.events) {\n    data += (genHandlers(el.events)) + \",\";\n  }\n  if (el.nativeEvents) {\n    data += (genHandlers(el.nativeEvents, true)) + \",\";\n  }\n  // slot target\n  if (el.slotTarget) {\n    data += \"slot:\" + (el.slotTarget) + \",\";\n  }\n  // scoped slots\n  if (el.scopedSlots) {\n    data += (genScopedSlots(el.scopedSlots)) + \",\";\n  }\n  // component v-model\n  if (el.model) {\n    data += \"model:{value:\" + (el.model.value) + \",callback:\" + (el.model.callback) + \",expression:\" + (el.model.expression) + \"},\";\n  }\n  // inline-template\n  if (el.inlineTemplate) {\n    var inlineTemplate = genInlineTemplate(el);\n    if (inlineTemplate) {\n      data += inlineTemplate + \",\";\n    }\n  }\n  data = data.replace(/,$/, '') + '}';\n  // v-bind data wrap\n  if (el.wrapData) {\n    data = el.wrapData(data);\n  }\n  return data\n}\n\nfunction genDirectives (el) {\n  var dirs = el.directives;\n  if (!dirs) { return }\n  var res = 'directives:[';\n  var hasRuntime = false;\n  var i, l, dir, needRuntime;\n  for (i = 0, l = dirs.length; i < l; i++) {\n    dir = dirs[i];\n    needRuntime = true;\n    var gen = platformDirectives$1[dir.name] || baseDirectives[dir.name];\n    if (gen) {\n      // compile-time directive that manipulates AST.\n      // returns true if it also needs a runtime counterpart.\n      needRuntime = !!gen(el, dir, warn$3);\n    }\n    if (needRuntime) {\n      hasRuntime = true;\n      res += \"{name:\\\"\" + (dir.name) + \"\\\",rawName:\\\"\" + (dir.rawName) + \"\\\"\" + (dir.value ? (\",value:(\" + (dir.value) + \"),expression:\" + (JSON.stringify(dir.value))) : '') + (dir.arg ? (\",arg:\\\"\" + (dir.arg) + \"\\\"\") : '') + (dir.modifiers ? (\",modifiers:\" + (JSON.stringify(dir.modifiers))) : '') + \"},\";\n    }\n  }\n  if (hasRuntime) {\n    return res.slice(0, -1) + ']'\n  }\n}\n\nfunction genInlineTemplate (el) {\n  var ast = el.children[0];\n  if (process.env.NODE_ENV !== 'production' && (\n    el.children.length > 1 || ast.type !== 1\n  )) {\n    warn$3('Inline-template components must have exactly one child element.');\n  }\n  if (ast.type === 1) {\n    var inlineRenderFns = generate(ast, currentOptions);\n    return (\"inlineTemplate:{render:function(){\" + (inlineRenderFns.render) + \"},staticRenderFns:[\" + (inlineRenderFns.staticRenderFns.map(function (code) { return (\"function(){\" + code + \"}\"); }).join(',')) + \"]}\")\n  }\n}\n\nfunction genScopedSlots (slots) {\n  return (\"scopedSlots:_u([\" + (Object.keys(slots).map(function (key) { return genScopedSlot(key, slots[key]); }).join(',')) + \"])\")\n}\n\nfunction genScopedSlot (key, el) {\n  return \"[\" + key + \",function(\" + (String(el.attrsMap.scope)) + \"){\" +\n    \"return \" + (el.tag === 'template'\n      ? genChildren(el) || 'void 0'\n      : genElement(el)) + \"}]\"\n}\n\nfunction genChildren (el, checkSkip) {\n  var children = el.children;\n  if (children.length) {\n    var el$1 = children[0];\n    // optimize single v-for\n    if (children.length === 1 &&\n        el$1.for &&\n        el$1.tag !== 'template' &&\n        el$1.tag !== 'slot') {\n      return genElement(el$1)\n    }\n    var normalizationType = checkSkip ? getNormalizationType(children) : 0;\n    return (\"[\" + (children.map(genNode).join(',')) + \"]\" + (normalizationType ? (\",\" + normalizationType) : ''))\n  }\n}\n\n// determine the normalization needed for the children array.\n// 0: no normalization needed\n// 1: simple normalization needed (possible 1-level deep nested array)\n// 2: full normalization needed\nfunction getNormalizationType (children) {\n  var res = 0;\n  for (var i = 0; i < children.length; i++) {\n    var el = children[i];\n    if (el.type !== 1) {\n      continue\n    }\n    if (needsNormalization(el) ||\n        (el.ifConditions && el.ifConditions.some(function (c) { return needsNormalization(c.block); }))) {\n      res = 2;\n      break\n    }\n    if (maybeComponent(el) ||\n        (el.ifConditions && el.ifConditions.some(function (c) { return maybeComponent(c.block); }))) {\n      res = 1;\n    }\n  }\n  return res\n}\n\nfunction needsNormalization (el) {\n  return el.for !== undefined || el.tag === 'template' || el.tag === 'slot'\n}\n\nfunction maybeComponent (el) {\n  return !isPlatformReservedTag$1(el.tag)\n}\n\nfunction genNode (node) {\n  if (node.type === 1) {\n    return genElement(node)\n  } else {\n    return genText(node)\n  }\n}\n\nfunction genText (text) {\n  return (\"_v(\" + (text.type === 2\n    ? text.expression // no need for () because already wrapped in _s()\n    : transformSpecialNewlines(JSON.stringify(text.text))) + \")\")\n}\n\nfunction genSlot (el) {\n  var slotName = el.slotName || '\"default\"';\n  var children = genChildren(el);\n  var res = \"_t(\" + slotName + (children ? (\",\" + children) : '');\n  var attrs = el.attrs && (\"{\" + (el.attrs.map(function (a) { return ((camelize(a.name)) + \":\" + (a.value)); }).join(',')) + \"}\");\n  var bind$$1 = el.attrsMap['v-bind'];\n  if ((attrs || bind$$1) && !children) {\n    res += \",null\";\n  }\n  if (attrs) {\n    res += \",\" + attrs;\n  }\n  if (bind$$1) {\n    res += (attrs ? '' : ',null') + \",\" + bind$$1;\n  }\n  return res + ')'\n}\n\n// componentName is el.component, take it as argument to shun flow's pessimistic refinement\nfunction genComponent (componentName, el) {\n  var children = el.inlineTemplate ? null : genChildren(el, true);\n  return (\"_c(\" + componentName + \",\" + (genData(el)) + (children ? (\",\" + children) : '') + \")\")\n}\n\nfunction genProps (props) {\n  var res = '';\n  for (var i = 0; i < props.length; i++) {\n    var prop = props[i];\n    res += \"\\\"\" + (prop.name) + \"\\\":\" + (transformSpecialNewlines(prop.value)) + \",\";\n  }\n  return res.slice(0, -1)\n}\n\n// #3895, #4268\nfunction transformSpecialNewlines (text) {\n  return text\n    .replace(/\\u2028/g, '\\\\u2028')\n    .replace(/\\u2029/g, '\\\\u2029')\n}\n\n/*  */\n\n// these keywords should not appear inside expressions, but operators like\n// typeof, instanceof and in are allowed\nvar prohibitedKeywordRE = new RegExp('\\\\b' + (\n  'do,if,for,let,new,try,var,case,else,with,await,break,catch,class,const,' +\n  'super,throw,while,yield,delete,export,import,return,switch,default,' +\n  'extends,finally,continue,debugger,function,arguments'\n).split(',').join('\\\\b|\\\\b') + '\\\\b');\n\n// these unary operators should not be used as property/method names\nvar unaryOperatorsRE = new RegExp('\\\\b' + (\n  'delete,typeof,void'\n).split(',').join('\\\\s*\\\\([^\\\\)]*\\\\)|\\\\b') + '\\\\s*\\\\([^\\\\)]*\\\\)');\n\n// check valid identifier for v-for\nvar identRE = /[A-Za-z_$][\\w$]*/;\n\n// strip strings in expressions\nvar stripStringRE = /'(?:[^'\\\\]|\\\\.)*'|\"(?:[^\"\\\\]|\\\\.)*\"|`(?:[^`\\\\]|\\\\.)*\\$\\{|\\}(?:[^`\\\\]|\\\\.)*`|`(?:[^`\\\\]|\\\\.)*`/g;\n\n// detect problematic expressions in a template\nfunction detectErrors (ast) {\n  var errors = [];\n  if (ast) {\n    checkNode(ast, errors);\n  }\n  return errors\n}\n\nfunction checkNode (node, errors) {\n  if (node.type === 1) {\n    for (var name in node.attrsMap) {\n      if (dirRE.test(name)) {\n        var value = node.attrsMap[name];\n        if (value) {\n          if (name === 'v-for') {\n            checkFor(node, (\"v-for=\\\"\" + value + \"\\\"\"), errors);\n          } else if (onRE.test(name)) {\n            checkEvent(value, (name + \"=\\\"\" + value + \"\\\"\"), errors);\n          } else {\n            checkExpression(value, (name + \"=\\\"\" + value + \"\\\"\"), errors);\n          }\n        }\n      }\n    }\n    if (node.children) {\n      for (var i = 0; i < node.children.length; i++) {\n        checkNode(node.children[i], errors);\n      }\n    }\n  } else if (node.type === 2) {\n    checkExpression(node.expression, node.text, errors);\n  }\n}\n\nfunction checkEvent (exp, text, errors) {\n  var keywordMatch = exp.replace(stripStringRE, '').match(unaryOperatorsRE);\n  if (keywordMatch) {\n    errors.push(\n      \"avoid using JavaScript unary operator as property name: \" +\n      \"\\\"\" + (keywordMatch[0]) + \"\\\" in expression \" + (text.trim())\n    );\n  }\n  checkExpression(exp, text, errors);\n}\n\nfunction checkFor (node, text, errors) {\n  checkExpression(node.for || '', text, errors);\n  checkIdentifier(node.alias, 'v-for alias', text, errors);\n  checkIdentifier(node.iterator1, 'v-for iterator', text, errors);\n  checkIdentifier(node.iterator2, 'v-for iterator', text, errors);\n}\n\nfunction checkIdentifier (ident, type, text, errors) {\n  if (typeof ident === 'string' && !identRE.test(ident)) {\n    errors.push((\"invalid \" + type + \" \\\"\" + ident + \"\\\" in expression: \" + (text.trim())));\n  }\n}\n\nfunction checkExpression (exp, text, errors) {\n  try {\n    new Function((\"return \" + exp));\n  } catch (e) {\n    var keywordMatch = exp.replace(stripStringRE, '').match(prohibitedKeywordRE);\n    if (keywordMatch) {\n      errors.push(\n        \"avoid using JavaScript keyword as property name: \" +\n        \"\\\"\" + (keywordMatch[0]) + \"\\\" in expression \" + (text.trim())\n      );\n    } else {\n      errors.push((\"invalid expression: \" + (text.trim())));\n    }\n  }\n}\n\n/*  */\n\nfunction baseCompile (\n  template,\n  options\n) {\n  var ast = parse(template.trim(), options);\n  optimize(ast, options);\n  var code = generate(ast, options);\n  return {\n    ast: ast,\n    render: code.render,\n    staticRenderFns: code.staticRenderFns\n  }\n}\n\nfunction makeFunction (code, errors) {\n  try {\n    return new Function(code)\n  } catch (err) {\n    errors.push({ err: err, code: code });\n    return noop\n  }\n}\n\nfunction createCompiler (baseOptions) {\n  var functionCompileCache = Object.create(null);\n\n  function compile (\n    template,\n    options\n  ) {\n    var finalOptions = Object.create(baseOptions);\n    var errors = [];\n    var tips = [];\n    finalOptions.warn = function (msg, tip$$1) {\n      (tip$$1 ? tips : errors).push(msg);\n    };\n\n    if (options) {\n      // merge custom modules\n      if (options.modules) {\n        finalOptions.modules = (baseOptions.modules || []).concat(options.modules);\n      }\n      // merge custom directives\n      if (options.directives) {\n        finalOptions.directives = extend(\n          Object.create(baseOptions.directives),\n          options.directives\n        );\n      }\n      // copy other options\n      for (var key in options) {\n        if (key !== 'modules' && key !== 'directives') {\n          finalOptions[key] = options[key];\n        }\n      }\n    }\n\n    var compiled = baseCompile(template, finalOptions);\n    if (process.env.NODE_ENV !== 'production') {\n      errors.push.apply(errors, detectErrors(compiled.ast));\n    }\n    compiled.errors = errors;\n    compiled.tips = tips;\n    return compiled\n  }\n\n  function compileToFunctions (\n    template,\n    options,\n    vm\n  ) {\n    options = options || {};\n\n    /* istanbul ignore if */\n    if (process.env.NODE_ENV !== 'production') {\n      // detect possible CSP restriction\n      try {\n        new Function('return 1');\n      } catch (e) {\n        if (e.toString().match(/unsafe-eval|CSP/)) {\n          warn(\n            'It seems you are using the standalone build of Vue.js in an ' +\n            'environment with Content Security Policy that prohibits unsafe-eval. ' +\n            'The template compiler cannot work in this environment. Consider ' +\n            'relaxing the policy to allow unsafe-eval or pre-compiling your ' +\n            'templates into render functions.'\n          );\n        }\n      }\n    }\n\n    // check cache\n    var key = options.delimiters\n      ? String(options.delimiters) + template\n      : template;\n    if (functionCompileCache[key]) {\n      return functionCompileCache[key]\n    }\n\n    // compile\n    var compiled = compile(template, options);\n\n    // check compilation errors/tips\n    if (process.env.NODE_ENV !== 'production') {\n      if (compiled.errors && compiled.errors.length) {\n        warn(\n          \"Error compiling template:\\n\\n\" + template + \"\\n\\n\" +\n          compiled.errors.map(function (e) { return (\"- \" + e); }).join('\\n') + '\\n',\n          vm\n        );\n      }\n      if (compiled.tips && compiled.tips.length) {\n        compiled.tips.forEach(function (msg) { return tip(msg, vm); });\n      }\n    }\n\n    // turn code into functions\n    var res = {};\n    var fnGenErrors = [];\n    res.render = makeFunction(compiled.render, fnGenErrors);\n    var l = compiled.staticRenderFns.length;\n    res.staticRenderFns = new Array(l);\n    for (var i = 0; i < l; i++) {\n      res.staticRenderFns[i] = makeFunction(compiled.staticRenderFns[i], fnGenErrors);\n    }\n\n    // check function generation errors.\n    // this should only happen if there is a bug in the compiler itself.\n    // mostly for codegen development use\n    /* istanbul ignore if */\n    if (process.env.NODE_ENV !== 'production') {\n      if ((!compiled.errors || !compiled.errors.length) && fnGenErrors.length) {\n        warn(\n          \"Failed to generate render function:\\n\\n\" +\n          fnGenErrors.map(function (ref) {\n            var err = ref.err;\n            var code = ref.code;\n\n            return ((err.toString()) + \" in\\n\\n\" + code + \"\\n\");\n        }).join('\\n'),\n          vm\n        );\n      }\n    }\n\n    return (functionCompileCache[key] = res)\n  }\n\n  return {\n    compile: compile,\n    compileToFunctions: compileToFunctions\n  }\n}\n\n/*  */\n\nfunction transformNode (el, options) {\n  var warn = options.warn || baseWarn;\n  var staticClass = getAndRemoveAttr(el, 'class');\n  if (process.env.NODE_ENV !== 'production' && staticClass) {\n    var expression = parseText(staticClass, options.delimiters);\n    if (expression) {\n      warn(\n        \"class=\\\"\" + staticClass + \"\\\": \" +\n        'Interpolation inside attributes has been removed. ' +\n        'Use v-bind or the colon shorthand instead. For example, ' +\n        'instead of <div class=\"{{ val }}\">, use <div :class=\"val\">.'\n      );\n    }\n  }\n  if (staticClass) {\n    el.staticClass = JSON.stringify(staticClass);\n  }\n  var classBinding = getBindingAttr(el, 'class', false /* getStatic */);\n  if (classBinding) {\n    el.classBinding = classBinding;\n  }\n}\n\nfunction genData$1 (el) {\n  var data = '';\n  if (el.staticClass) {\n    data += \"staticClass:\" + (el.staticClass) + \",\";\n  }\n  if (el.classBinding) {\n    data += \"class:\" + (el.classBinding) + \",\";\n  }\n  return data\n}\n\nvar klass$1 = {\n  staticKeys: ['staticClass'],\n  transformNode: transformNode,\n  genData: genData$1\n};\n\n/*  */\n\nfunction transformNode$1 (el, options) {\n  var warn = options.warn || baseWarn;\n  var staticStyle = getAndRemoveAttr(el, 'style');\n  if (staticStyle) {\n    /* istanbul ignore if */\n    if (process.env.NODE_ENV !== 'production') {\n      var expression = parseText(staticStyle, options.delimiters);\n      if (expression) {\n        warn(\n          \"style=\\\"\" + staticStyle + \"\\\": \" +\n          'Interpolation inside attributes has been removed. ' +\n          'Use v-bind or the colon shorthand instead. For example, ' +\n          'instead of <div style=\"{{ val }}\">, use <div :style=\"val\">.'\n        );\n      }\n    }\n    el.staticStyle = JSON.stringify(parseStyleText(staticStyle));\n  }\n\n  var styleBinding = getBindingAttr(el, 'style', false /* getStatic */);\n  if (styleBinding) {\n    el.styleBinding = styleBinding;\n  }\n}\n\nfunction genData$2 (el) {\n  var data = '';\n  if (el.staticStyle) {\n    data += \"staticStyle:\" + (el.staticStyle) + \",\";\n  }\n  if (el.styleBinding) {\n    data += \"style:(\" + (el.styleBinding) + \"),\";\n  }\n  return data\n}\n\nvar style$1 = {\n  staticKeys: ['staticStyle'],\n  transformNode: transformNode$1,\n  genData: genData$2\n};\n\nvar modules$1 = [\n  klass$1,\n  style$1\n];\n\n/*  */\n\nfunction text (el, dir) {\n  if (dir.value) {\n    addProp(el, 'textContent', (\"_s(\" + (dir.value) + \")\"));\n  }\n}\n\n/*  */\n\nfunction html (el, dir) {\n  if (dir.value) {\n    addProp(el, 'innerHTML', (\"_s(\" + (dir.value) + \")\"));\n  }\n}\n\nvar directives$1 = {\n  model: model,\n  text: text,\n  html: html\n};\n\n/*  */\n\nvar baseOptions = {\n  expectHTML: true,\n  modules: modules$1,\n  directives: directives$1,\n  isPreTag: isPreTag,\n  isUnaryTag: isUnaryTag,\n  mustUseProp: mustUseProp,\n  canBeLeftOpenTag: canBeLeftOpenTag,\n  isReservedTag: isReservedTag,\n  getTagNamespace: getTagNamespace,\n  staticKeys: genStaticKeys(modules$1)\n};\n\nvar ref$1 = createCompiler(baseOptions);\nvar compileToFunctions = ref$1.compileToFunctions;\n\n/*  */\n\nvar idToTemplate = cached(function (id) {\n  var el = query(id);\n  return el && el.innerHTML\n});\n\nvar mount = Vue$3.prototype.$mount;\nVue$3.prototype.$mount = function (\n  el,\n  hydrating\n) {\n  el = el && query(el);\n\n  /* istanbul ignore if */\n  if (el === document.body || el === document.documentElement) {\n    process.env.NODE_ENV !== 'production' && warn(\n      \"Do not mount Vue to <html> or <body> - mount to normal elements instead.\"\n    );\n    return this\n  }\n\n  var options = this.$options;\n  // resolve template/el and convert to render function\n  if (!options.render) {\n    var template = options.template;\n    if (template) {\n      if (typeof template === 'string') {\n        if (template.charAt(0) === '#') {\n          template = idToTemplate(template);\n          /* istanbul ignore if */\n          if (process.env.NODE_ENV !== 'production' && !template) {\n            warn(\n              (\"Template element not found or is empty: \" + (options.template)),\n              this\n            );\n          }\n        }\n      } else if (template.nodeType) {\n        template = template.innerHTML;\n      } else {\n        if (process.env.NODE_ENV !== 'production') {\n          warn('invalid template option:' + template, this);\n        }\n        return this\n      }\n    } else if (el) {\n      template = getOuterHTML(el);\n    }\n    if (template) {\n      /* istanbul ignore if */\n      if (process.env.NODE_ENV !== 'production' && config.performance && mark) {\n        mark('compile');\n      }\n\n      var ref = compileToFunctions(template, {\n        shouldDecodeNewlines: shouldDecodeNewlines,\n        delimiters: options.delimiters\n      }, this);\n      var render = ref.render;\n      var staticRenderFns = ref.staticRenderFns;\n      options.render = render;\n      options.staticRenderFns = staticRenderFns;\n\n      /* istanbul ignore if */\n      if (process.env.NODE_ENV !== 'production' && config.performance && mark) {\n        mark('compile end');\n        measure(((this._name) + \" compile\"), 'compile', 'compile end');\n      }\n    }\n  }\n  return mount.call(this, el, hydrating)\n};\n\n/**\n * Get outerHTML of elements, taking care\n * of SVG elements in IE as well.\n */\nfunction getOuterHTML (el) {\n  if (el.outerHTML) {\n    return el.outerHTML\n  } else {\n    var container = document.createElement('div');\n    container.appendChild(el.cloneNode(true));\n    return container.innerHTML\n  }\n}\n\nVue$3.compile = compileToFunctions;\n\nmodule.exports = Vue$3;\n"
  },
  {
    "path": "static/vuejs/vue.esm.js",
    "content": "/*!\n * Vue.js v2.2.6\n * (c) 2014-2017 Evan You\n * Released under the MIT License.\n */\n/*  */\n\n/**\n * Convert a value to a string that is actually rendered.\n */\nfunction _toString (val) {\n  return val == null\n    ? ''\n    : typeof val === 'object'\n      ? JSON.stringify(val, null, 2)\n      : String(val)\n}\n\n/**\n * Convert a input value to a number for persistence.\n * If the conversion fails, return original string.\n */\nfunction toNumber (val) {\n  var n = parseFloat(val);\n  return isNaN(n) ? val : n\n}\n\n/**\n * Make a map and return a function for checking if a key\n * is in that map.\n */\nfunction makeMap (\n  str,\n  expectsLowerCase\n) {\n  var map = Object.create(null);\n  var list = str.split(',');\n  for (var i = 0; i < list.length; i++) {\n    map[list[i]] = true;\n  }\n  return expectsLowerCase\n    ? function (val) { return map[val.toLowerCase()]; }\n    : function (val) { return map[val]; }\n}\n\n/**\n * Check if a tag is a built-in tag.\n */\nvar isBuiltInTag = makeMap('slot,component', true);\n\n/**\n * Remove an item from an array\n */\nfunction remove (arr, item) {\n  if (arr.length) {\n    var index = arr.indexOf(item);\n    if (index > -1) {\n      return arr.splice(index, 1)\n    }\n  }\n}\n\n/**\n * Check whether the object has the property.\n */\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nfunction hasOwn (obj, key) {\n  return hasOwnProperty.call(obj, key)\n}\n\n/**\n * Check if value is primitive\n */\nfunction isPrimitive (value) {\n  return typeof value === 'string' || typeof value === 'number'\n}\n\n/**\n * Create a cached version of a pure function.\n */\nfunction cached (fn) {\n  var cache = Object.create(null);\n  return (function cachedFn (str) {\n    var hit = cache[str];\n    return hit || (cache[str] = fn(str))\n  })\n}\n\n/**\n * Camelize a hyphen-delimited string.\n */\nvar camelizeRE = /-(\\w)/g;\nvar camelize = cached(function (str) {\n  return str.replace(camelizeRE, function (_, c) { return c ? c.toUpperCase() : ''; })\n});\n\n/**\n * Capitalize a string.\n */\nvar capitalize = cached(function (str) {\n  return str.charAt(0).toUpperCase() + str.slice(1)\n});\n\n/**\n * Hyphenate a camelCase string.\n */\nvar hyphenateRE = /([^-])([A-Z])/g;\nvar hyphenate = cached(function (str) {\n  return str\n    .replace(hyphenateRE, '$1-$2')\n    .replace(hyphenateRE, '$1-$2')\n    .toLowerCase()\n});\n\n/**\n * Simple bind, faster than native\n */\nfunction bind (fn, ctx) {\n  function boundFn (a) {\n    var l = arguments.length;\n    return l\n      ? l > 1\n        ? fn.apply(ctx, arguments)\n        : fn.call(ctx, a)\n      : fn.call(ctx)\n  }\n  // record original fn length\n  boundFn._length = fn.length;\n  return boundFn\n}\n\n/**\n * Convert an Array-like object to a real Array.\n */\nfunction toArray (list, start) {\n  start = start || 0;\n  var i = list.length - start;\n  var ret = new Array(i);\n  while (i--) {\n    ret[i] = list[i + start];\n  }\n  return ret\n}\n\n/**\n * Mix properties into target object.\n */\nfunction extend (to, _from) {\n  for (var key in _from) {\n    to[key] = _from[key];\n  }\n  return to\n}\n\n/**\n * Quick object check - this is primarily used to tell\n * Objects from primitive values when we know the value\n * is a JSON-compliant type.\n */\nfunction isObject (obj) {\n  return obj !== null && typeof obj === 'object'\n}\n\n/**\n * Strict object type check. Only returns true\n * for plain JavaScript objects.\n */\nvar toString = Object.prototype.toString;\nvar OBJECT_STRING = '[object Object]';\nfunction isPlainObject (obj) {\n  return toString.call(obj) === OBJECT_STRING\n}\n\n/**\n * Merge an Array of Objects into a single Object.\n */\nfunction toObject (arr) {\n  var res = {};\n  for (var i = 0; i < arr.length; i++) {\n    if (arr[i]) {\n      extend(res, arr[i]);\n    }\n  }\n  return res\n}\n\n/**\n * Perform no operation.\n */\nfunction noop () {}\n\n/**\n * Always return false.\n */\nvar no = function () { return false; };\n\n/**\n * Return same value\n */\nvar identity = function (_) { return _; };\n\n/**\n * Generate a static keys string from compiler modules.\n */\nfunction genStaticKeys (modules) {\n  return modules.reduce(function (keys, m) {\n    return keys.concat(m.staticKeys || [])\n  }, []).join(',')\n}\n\n/**\n * Check if two values are loosely equal - that is,\n * if they are plain objects, do they have the same shape?\n */\nfunction looseEqual (a, b) {\n  var isObjectA = isObject(a);\n  var isObjectB = isObject(b);\n  if (isObjectA && isObjectB) {\n    try {\n      return JSON.stringify(a) === JSON.stringify(b)\n    } catch (e) {\n      // possible circular reference\n      return a === b\n    }\n  } else if (!isObjectA && !isObjectB) {\n    return String(a) === String(b)\n  } else {\n    return false\n  }\n}\n\nfunction looseIndexOf (arr, val) {\n  for (var i = 0; i < arr.length; i++) {\n    if (looseEqual(arr[i], val)) { return i }\n  }\n  return -1\n}\n\n/**\n * Ensure a function is called only once.\n */\nfunction once (fn) {\n  var called = false;\n  return function () {\n    if (!called) {\n      called = true;\n      fn();\n    }\n  }\n}\n\n/*  */\n\nvar config = {\n  /**\n   * Option merge strategies (used in core/util/options)\n   */\n  optionMergeStrategies: Object.create(null),\n\n  /**\n   * Whether to suppress warnings.\n   */\n  silent: false,\n\n  /**\n   * Show production mode tip message on boot?\n   */\n  productionTip: process.env.NODE_ENV !== 'production',\n\n  /**\n   * Whether to enable devtools\n   */\n  devtools: process.env.NODE_ENV !== 'production',\n\n  /**\n   * Whether to record perf\n   */\n  performance: false,\n\n  /**\n   * Error handler for watcher errors\n   */\n  errorHandler: null,\n\n  /**\n   * Ignore certain custom elements\n   */\n  ignoredElements: [],\n\n  /**\n   * Custom user key aliases for v-on\n   */\n  keyCodes: Object.create(null),\n\n  /**\n   * Check if a tag is reserved so that it cannot be registered as a\n   * component. This is platform-dependent and may be overwritten.\n   */\n  isReservedTag: no,\n\n  /**\n   * Check if a tag is an unknown element.\n   * Platform-dependent.\n   */\n  isUnknownElement: no,\n\n  /**\n   * Get the namespace of an element\n   */\n  getTagNamespace: noop,\n\n  /**\n   * Parse the real tag name for the specific platform.\n   */\n  parsePlatformTagName: identity,\n\n  /**\n   * Check if an attribute must be bound using property, e.g. value\n   * Platform-dependent.\n   */\n  mustUseProp: no,\n\n  /**\n   * List of asset types that a component can own.\n   */\n  _assetTypes: [\n    'component',\n    'directive',\n    'filter'\n  ],\n\n  /**\n   * List of lifecycle hooks.\n   */\n  _lifecycleHooks: [\n    'beforeCreate',\n    'created',\n    'beforeMount',\n    'mounted',\n    'beforeUpdate',\n    'updated',\n    'beforeDestroy',\n    'destroyed',\n    'activated',\n    'deactivated'\n  ],\n\n  /**\n   * Max circular updates allowed in a scheduler flush cycle.\n   */\n  _maxUpdateCount: 100\n};\n\n/*  */\n\nvar emptyObject = Object.freeze({});\n\n/**\n * Check if a string starts with $ or _\n */\nfunction isReserved (str) {\n  var c = (str + '').charCodeAt(0);\n  return c === 0x24 || c === 0x5F\n}\n\n/**\n * Define a property.\n */\nfunction def (obj, key, val, enumerable) {\n  Object.defineProperty(obj, key, {\n    value: val,\n    enumerable: !!enumerable,\n    writable: true,\n    configurable: true\n  });\n}\n\n/**\n * Parse simple path.\n */\nvar bailRE = /[^\\w.$]/;\nfunction parsePath (path) {\n  if (bailRE.test(path)) {\n    return\n  }\n  var segments = path.split('.');\n  return function (obj) {\n    for (var i = 0; i < segments.length; i++) {\n      if (!obj) { return }\n      obj = obj[segments[i]];\n    }\n    return obj\n  }\n}\n\n/*  */\n/* globals MutationObserver */\n\n// can we use __proto__?\nvar hasProto = '__proto__' in {};\n\n// Browser environment sniffing\nvar inBrowser = typeof window !== 'undefined';\nvar UA = inBrowser && window.navigator.userAgent.toLowerCase();\nvar isIE = UA && /msie|trident/.test(UA);\nvar isIE9 = UA && UA.indexOf('msie 9.0') > 0;\nvar isEdge = UA && UA.indexOf('edge/') > 0;\nvar isAndroid = UA && UA.indexOf('android') > 0;\nvar isIOS = UA && /iphone|ipad|ipod|ios/.test(UA);\nvar isChrome = UA && /chrome\\/\\d+/.test(UA) && !isEdge;\n\n// this needs to be lazy-evaled because vue may be required before\n// vue-server-renderer can set VUE_ENV\nvar _isServer;\nvar isServerRendering = function () {\n  if (_isServer === undefined) {\n    /* istanbul ignore if */\n    if (!inBrowser && typeof global !== 'undefined') {\n      // detect presence of vue-server-renderer and avoid\n      // Webpack shimming the process\n      _isServer = global['process'].env.VUE_ENV === 'server';\n    } else {\n      _isServer = false;\n    }\n  }\n  return _isServer\n};\n\n// detect devtools\nvar devtools = inBrowser && window.__VUE_DEVTOOLS_GLOBAL_HOOK__;\n\n/* istanbul ignore next */\nfunction isNative (Ctor) {\n  return /native code/.test(Ctor.toString())\n}\n\nvar hasSymbol =\n  typeof Symbol !== 'undefined' && isNative(Symbol) &&\n  typeof Reflect !== 'undefined' && isNative(Reflect.ownKeys);\n\n/**\n * Defer a task to execute it asynchronously.\n */\nvar nextTick = (function () {\n  var callbacks = [];\n  var pending = false;\n  var timerFunc;\n\n  function nextTickHandler () {\n    pending = false;\n    var copies = callbacks.slice(0);\n    callbacks.length = 0;\n    for (var i = 0; i < copies.length; i++) {\n      copies[i]();\n    }\n  }\n\n  // the nextTick behavior leverages the microtask queue, which can be accessed\n  // via either native Promise.then or MutationObserver.\n  // MutationObserver has wider support, however it is seriously bugged in\n  // UIWebView in iOS >= 9.3.3 when triggered in touch event handlers. It\n  // completely stops working after triggering a few times... so, if native\n  // Promise is available, we will use it:\n  /* istanbul ignore if */\n  if (typeof Promise !== 'undefined' && isNative(Promise)) {\n    var p = Promise.resolve();\n    var logError = function (err) { console.error(err); };\n    timerFunc = function () {\n      p.then(nextTickHandler).catch(logError);\n      // in problematic UIWebViews, Promise.then doesn't completely break, but\n      // it can get stuck in a weird state where callbacks are pushed into the\n      // microtask queue but the queue isn't being flushed, until the browser\n      // needs to do some other work, e.g. handle a timer. Therefore we can\n      // \"force\" the microtask queue to be flushed by adding an empty timer.\n      if (isIOS) { setTimeout(noop); }\n    };\n  } else if (typeof MutationObserver !== 'undefined' && (\n    isNative(MutationObserver) ||\n    // PhantomJS and iOS 7.x\n    MutationObserver.toString() === '[object MutationObserverConstructor]'\n  )) {\n    // use MutationObserver where native Promise is not available,\n    // e.g. PhantomJS IE11, iOS7, Android 4.4\n    var counter = 1;\n    var observer = new MutationObserver(nextTickHandler);\n    var textNode = document.createTextNode(String(counter));\n    observer.observe(textNode, {\n      characterData: true\n    });\n    timerFunc = function () {\n      counter = (counter + 1) % 2;\n      textNode.data = String(counter);\n    };\n  } else {\n    // fallback to setTimeout\n    /* istanbul ignore next */\n    timerFunc = function () {\n      setTimeout(nextTickHandler, 0);\n    };\n  }\n\n  return function queueNextTick (cb, ctx) {\n    var _resolve;\n    callbacks.push(function () {\n      if (cb) { cb.call(ctx); }\n      if (_resolve) { _resolve(ctx); }\n    });\n    if (!pending) {\n      pending = true;\n      timerFunc();\n    }\n    if (!cb && typeof Promise !== 'undefined') {\n      return new Promise(function (resolve) {\n        _resolve = resolve;\n      })\n    }\n  }\n})();\n\nvar _Set;\n/* istanbul ignore if */\nif (typeof Set !== 'undefined' && isNative(Set)) {\n  // use native Set when available.\n  _Set = Set;\n} else {\n  // a non-standard Set polyfill that only works with primitive keys.\n  _Set = (function () {\n    function Set () {\n      this.set = Object.create(null);\n    }\n    Set.prototype.has = function has (key) {\n      return this.set[key] === true\n    };\n    Set.prototype.add = function add (key) {\n      this.set[key] = true;\n    };\n    Set.prototype.clear = function clear () {\n      this.set = Object.create(null);\n    };\n\n    return Set;\n  }());\n}\n\nvar warn = noop;\nvar tip = noop;\nvar formatComponentName;\n\nif (process.env.NODE_ENV !== 'production') {\n  var hasConsole = typeof console !== 'undefined';\n  var classifyRE = /(?:^|[-_])(\\w)/g;\n  var classify = function (str) { return str\n    .replace(classifyRE, function (c) { return c.toUpperCase(); })\n    .replace(/[-_]/g, ''); };\n\n  warn = function (msg, vm) {\n    if (hasConsole && (!config.silent)) {\n      console.error(\"[Vue warn]: \" + msg + \" \" + (\n        vm ? formatLocation(formatComponentName(vm)) : ''\n      ));\n    }\n  };\n\n  tip = function (msg, vm) {\n    if (hasConsole && (!config.silent)) {\n      console.warn(\"[Vue tip]: \" + msg + \" \" + (\n        vm ? formatLocation(formatComponentName(vm)) : ''\n      ));\n    }\n  };\n\n  formatComponentName = function (vm, includeFile) {\n    if (vm.$root === vm) {\n      return '<Root>'\n    }\n    var name = typeof vm === 'string'\n      ? vm\n      : typeof vm === 'function' && vm.options\n        ? vm.options.name\n        : vm._isVue\n          ? vm.$options.name || vm.$options._componentTag\n          : vm.name;\n\n    var file = vm._isVue && vm.$options.__file;\n    if (!name && file) {\n      var match = file.match(/([^/\\\\]+)\\.vue$/);\n      name = match && match[1];\n    }\n\n    return (\n      (name ? (\"<\" + (classify(name)) + \">\") : \"<Anonymous>\") +\n      (file && includeFile !== false ? (\" at \" + file) : '')\n    )\n  };\n\n  var formatLocation = function (str) {\n    if (str === \"<Anonymous>\") {\n      str += \" - use the \\\"name\\\" option for better debugging messages.\";\n    }\n    return (\"\\n(found in \" + str + \")\")\n  };\n}\n\n/*  */\n\n\nvar uid$1 = 0;\n\n/**\n * A dep is an observable that can have multiple\n * directives subscribing to it.\n */\nvar Dep = function Dep () {\n  this.id = uid$1++;\n  this.subs = [];\n};\n\nDep.prototype.addSub = function addSub (sub) {\n  this.subs.push(sub);\n};\n\nDep.prototype.removeSub = function removeSub (sub) {\n  remove(this.subs, sub);\n};\n\nDep.prototype.depend = function depend () {\n  if (Dep.target) {\n    Dep.target.addDep(this);\n  }\n};\n\nDep.prototype.notify = function notify () {\n  // stabilize the subscriber list first\n  var subs = this.subs.slice();\n  for (var i = 0, l = subs.length; i < l; i++) {\n    subs[i].update();\n  }\n};\n\n// the current target watcher being evaluated.\n// this is globally unique because there could be only one\n// watcher being evaluated at any time.\nDep.target = null;\nvar targetStack = [];\n\nfunction pushTarget (_target) {\n  if (Dep.target) { targetStack.push(Dep.target); }\n  Dep.target = _target;\n}\n\nfunction popTarget () {\n  Dep.target = targetStack.pop();\n}\n\n/*\n * not type checking this file because flow doesn't play well with\n * dynamically accessing methods on Array prototype\n */\n\nvar arrayProto = Array.prototype;\nvar arrayMethods = Object.create(arrayProto);[\n  'push',\n  'pop',\n  'shift',\n  'unshift',\n  'splice',\n  'sort',\n  'reverse'\n]\n.forEach(function (method) {\n  // cache original method\n  var original = arrayProto[method];\n  def(arrayMethods, method, function mutator () {\n    var arguments$1 = arguments;\n\n    // avoid leaking arguments:\n    // http://jsperf.com/closure-with-arguments\n    var i = arguments.length;\n    var args = new Array(i);\n    while (i--) {\n      args[i] = arguments$1[i];\n    }\n    var result = original.apply(this, args);\n    var ob = this.__ob__;\n    var inserted;\n    switch (method) {\n      case 'push':\n        inserted = args;\n        break\n      case 'unshift':\n        inserted = args;\n        break\n      case 'splice':\n        inserted = args.slice(2);\n        break\n    }\n    if (inserted) { ob.observeArray(inserted); }\n    // notify change\n    ob.dep.notify();\n    return result\n  });\n});\n\n/*  */\n\nvar arrayKeys = Object.getOwnPropertyNames(arrayMethods);\n\n/**\n * By default, when a reactive property is set, the new value is\n * also converted to become reactive. However when passing down props,\n * we don't want to force conversion because the value may be a nested value\n * under a frozen data structure. Converting it would defeat the optimization.\n */\nvar observerState = {\n  shouldConvert: true,\n  isSettingProps: false\n};\n\n/**\n * Observer class that are attached to each observed\n * object. Once attached, the observer converts target\n * object's property keys into getter/setters that\n * collect dependencies and dispatches updates.\n */\nvar Observer = function Observer (value) {\n  this.value = value;\n  this.dep = new Dep();\n  this.vmCount = 0;\n  def(value, '__ob__', this);\n  if (Array.isArray(value)) {\n    var augment = hasProto\n      ? protoAugment\n      : copyAugment;\n    augment(value, arrayMethods, arrayKeys);\n    this.observeArray(value);\n  } else {\n    this.walk(value);\n  }\n};\n\n/**\n * Walk through each property and convert them into\n * getter/setters. This method should only be called when\n * value type is Object.\n */\nObserver.prototype.walk = function walk (obj) {\n  var keys = Object.keys(obj);\n  for (var i = 0; i < keys.length; i++) {\n    defineReactive$$1(obj, keys[i], obj[keys[i]]);\n  }\n};\n\n/**\n * Observe a list of Array items.\n */\nObserver.prototype.observeArray = function observeArray (items) {\n  for (var i = 0, l = items.length; i < l; i++) {\n    observe(items[i]);\n  }\n};\n\n// helpers\n\n/**\n * Augment an target Object or Array by intercepting\n * the prototype chain using __proto__\n */\nfunction protoAugment (target, src) {\n  /* eslint-disable no-proto */\n  target.__proto__ = src;\n  /* eslint-enable no-proto */\n}\n\n/**\n * Augment an target Object or Array by defining\n * hidden properties.\n */\n/* istanbul ignore next */\nfunction copyAugment (target, src, keys) {\n  for (var i = 0, l = keys.length; i < l; i++) {\n    var key = keys[i];\n    def(target, key, src[key]);\n  }\n}\n\n/**\n * Attempt to create an observer instance for a value,\n * returns the new observer if successfully observed,\n * or the existing observer if the value already has one.\n */\nfunction observe (value, asRootData) {\n  if (!isObject(value)) {\n    return\n  }\n  var ob;\n  if (hasOwn(value, '__ob__') && value.__ob__ instanceof Observer) {\n    ob = value.__ob__;\n  } else if (\n    observerState.shouldConvert &&\n    !isServerRendering() &&\n    (Array.isArray(value) || isPlainObject(value)) &&\n    Object.isExtensible(value) &&\n    !value._isVue\n  ) {\n    ob = new Observer(value);\n  }\n  if (asRootData && ob) {\n    ob.vmCount++;\n  }\n  return ob\n}\n\n/**\n * Define a reactive property on an Object.\n */\nfunction defineReactive$$1 (\n  obj,\n  key,\n  val,\n  customSetter\n) {\n  var dep = new Dep();\n\n  var property = Object.getOwnPropertyDescriptor(obj, key);\n  if (property && property.configurable === false) {\n    return\n  }\n\n  // cater for pre-defined getter/setters\n  var getter = property && property.get;\n  var setter = property && property.set;\n\n  var childOb = observe(val);\n  Object.defineProperty(obj, key, {\n    enumerable: true,\n    configurable: true,\n    get: function reactiveGetter () {\n      var value = getter ? getter.call(obj) : val;\n      if (Dep.target) {\n        dep.depend();\n        if (childOb) {\n          childOb.dep.depend();\n        }\n        if (Array.isArray(value)) {\n          dependArray(value);\n        }\n      }\n      return value\n    },\n    set: function reactiveSetter (newVal) {\n      var value = getter ? getter.call(obj) : val;\n      /* eslint-disable no-self-compare */\n      if (newVal === value || (newVal !== newVal && value !== value)) {\n        return\n      }\n      /* eslint-enable no-self-compare */\n      if (process.env.NODE_ENV !== 'production' && customSetter) {\n        customSetter();\n      }\n      if (setter) {\n        setter.call(obj, newVal);\n      } else {\n        val = newVal;\n      }\n      childOb = observe(newVal);\n      dep.notify();\n    }\n  });\n}\n\n/**\n * Set a property on an object. Adds the new property and\n * triggers change notification if the property doesn't\n * already exist.\n */\nfunction set (target, key, val) {\n  if (Array.isArray(target) && typeof key === 'number') {\n    target.length = Math.max(target.length, key);\n    target.splice(key, 1, val);\n    return val\n  }\n  if (hasOwn(target, key)) {\n    target[key] = val;\n    return val\n  }\n  var ob = (target ).__ob__;\n  if (target._isVue || (ob && ob.vmCount)) {\n    process.env.NODE_ENV !== 'production' && warn(\n      'Avoid adding reactive properties to a Vue instance or its root $data ' +\n      'at runtime - declare it upfront in the data option.'\n    );\n    return val\n  }\n  if (!ob) {\n    target[key] = val;\n    return val\n  }\n  defineReactive$$1(ob.value, key, val);\n  ob.dep.notify();\n  return val\n}\n\n/**\n * Delete a property and trigger change if necessary.\n */\nfunction del (target, key) {\n  if (Array.isArray(target) && typeof key === 'number') {\n    target.splice(key, 1);\n    return\n  }\n  var ob = (target ).__ob__;\n  if (target._isVue || (ob && ob.vmCount)) {\n    process.env.NODE_ENV !== 'production' && warn(\n      'Avoid deleting properties on a Vue instance or its root $data ' +\n      '- just set it to null.'\n    );\n    return\n  }\n  if (!hasOwn(target, key)) {\n    return\n  }\n  delete target[key];\n  if (!ob) {\n    return\n  }\n  ob.dep.notify();\n}\n\n/**\n * Collect dependencies on array elements when the array is touched, since\n * we cannot intercept array element access like property getters.\n */\nfunction dependArray (value) {\n  for (var e = (void 0), i = 0, l = value.length; i < l; i++) {\n    e = value[i];\n    e && e.__ob__ && e.__ob__.dep.depend();\n    if (Array.isArray(e)) {\n      dependArray(e);\n    }\n  }\n}\n\n/*  */\n\n/**\n * Option overwriting strategies are functions that handle\n * how to merge a parent option value and a child option\n * value into the final value.\n */\nvar strats = config.optionMergeStrategies;\n\n/**\n * Options with restrictions\n */\nif (process.env.NODE_ENV !== 'production') {\n  strats.el = strats.propsData = function (parent, child, vm, key) {\n    if (!vm) {\n      warn(\n        \"option \\\"\" + key + \"\\\" can only be used during instance \" +\n        'creation with the `new` keyword.'\n      );\n    }\n    return defaultStrat(parent, child)\n  };\n}\n\n/**\n * Helper that recursively merges two data objects together.\n */\nfunction mergeData (to, from) {\n  if (!from) { return to }\n  var key, toVal, fromVal;\n  var keys = Object.keys(from);\n  for (var i = 0; i < keys.length; i++) {\n    key = keys[i];\n    toVal = to[key];\n    fromVal = from[key];\n    if (!hasOwn(to, key)) {\n      set(to, key, fromVal);\n    } else if (isPlainObject(toVal) && isPlainObject(fromVal)) {\n      mergeData(toVal, fromVal);\n    }\n  }\n  return to\n}\n\n/**\n * Data\n */\nstrats.data = function (\n  parentVal,\n  childVal,\n  vm\n) {\n  if (!vm) {\n    // in a Vue.extend merge, both should be functions\n    if (!childVal) {\n      return parentVal\n    }\n    if (typeof childVal !== 'function') {\n      process.env.NODE_ENV !== 'production' && warn(\n        'The \"data\" option should be a function ' +\n        'that returns a per-instance value in component ' +\n        'definitions.',\n        vm\n      );\n      return parentVal\n    }\n    if (!parentVal) {\n      return childVal\n    }\n    // when parentVal & childVal are both present,\n    // we need to return a function that returns the\n    // merged result of both functions... no need to\n    // check if parentVal is a function here because\n    // it has to be a function to pass previous merges.\n    return function mergedDataFn () {\n      return mergeData(\n        childVal.call(this),\n        parentVal.call(this)\n      )\n    }\n  } else if (parentVal || childVal) {\n    return function mergedInstanceDataFn () {\n      // instance merge\n      var instanceData = typeof childVal === 'function'\n        ? childVal.call(vm)\n        : childVal;\n      var defaultData = typeof parentVal === 'function'\n        ? parentVal.call(vm)\n        : undefined;\n      if (instanceData) {\n        return mergeData(instanceData, defaultData)\n      } else {\n        return defaultData\n      }\n    }\n  }\n};\n\n/**\n * Hooks and props are merged as arrays.\n */\nfunction mergeHook (\n  parentVal,\n  childVal\n) {\n  return childVal\n    ? parentVal\n      ? parentVal.concat(childVal)\n      : Array.isArray(childVal)\n        ? childVal\n        : [childVal]\n    : parentVal\n}\n\nconfig._lifecycleHooks.forEach(function (hook) {\n  strats[hook] = mergeHook;\n});\n\n/**\n * Assets\n *\n * When a vm is present (instance creation), we need to do\n * a three-way merge between constructor options, instance\n * options and parent options.\n */\nfunction mergeAssets (parentVal, childVal) {\n  var res = Object.create(parentVal || null);\n  return childVal\n    ? extend(res, childVal)\n    : res\n}\n\nconfig._assetTypes.forEach(function (type) {\n  strats[type + 's'] = mergeAssets;\n});\n\n/**\n * Watchers.\n *\n * Watchers hashes should not overwrite one\n * another, so we merge them as arrays.\n */\nstrats.watch = function (parentVal, childVal) {\n  /* istanbul ignore if */\n  if (!childVal) { return Object.create(parentVal || null) }\n  if (!parentVal) { return childVal }\n  var ret = {};\n  extend(ret, parentVal);\n  for (var key in childVal) {\n    var parent = ret[key];\n    var child = childVal[key];\n    if (parent && !Array.isArray(parent)) {\n      parent = [parent];\n    }\n    ret[key] = parent\n      ? parent.concat(child)\n      : [child];\n  }\n  return ret\n};\n\n/**\n * Other object hashes.\n */\nstrats.props =\nstrats.methods =\nstrats.computed = function (parentVal, childVal) {\n  if (!childVal) { return Object.create(parentVal || null) }\n  if (!parentVal) { return childVal }\n  var ret = Object.create(null);\n  extend(ret, parentVal);\n  extend(ret, childVal);\n  return ret\n};\n\n/**\n * Default strategy.\n */\nvar defaultStrat = function (parentVal, childVal) {\n  return childVal === undefined\n    ? parentVal\n    : childVal\n};\n\n/**\n * Validate component names\n */\nfunction checkComponents (options) {\n  for (var key in options.components) {\n    var lower = key.toLowerCase();\n    if (isBuiltInTag(lower) || config.isReservedTag(lower)) {\n      warn(\n        'Do not use built-in or reserved HTML elements as component ' +\n        'id: ' + key\n      );\n    }\n  }\n}\n\n/**\n * Ensure all props option syntax are normalized into the\n * Object-based format.\n */\nfunction normalizeProps (options) {\n  var props = options.props;\n  if (!props) { return }\n  var res = {};\n  var i, val, name;\n  if (Array.isArray(props)) {\n    i = props.length;\n    while (i--) {\n      val = props[i];\n      if (typeof val === 'string') {\n        name = camelize(val);\n        res[name] = { type: null };\n      } else if (process.env.NODE_ENV !== 'production') {\n        warn('props must be strings when using array syntax.');\n      }\n    }\n  } else if (isPlainObject(props)) {\n    for (var key in props) {\n      val = props[key];\n      name = camelize(key);\n      res[name] = isPlainObject(val)\n        ? val\n        : { type: val };\n    }\n  }\n  options.props = res;\n}\n\n/**\n * Normalize raw function directives into object format.\n */\nfunction normalizeDirectives (options) {\n  var dirs = options.directives;\n  if (dirs) {\n    for (var key in dirs) {\n      var def = dirs[key];\n      if (typeof def === 'function') {\n        dirs[key] = { bind: def, update: def };\n      }\n    }\n  }\n}\n\n/**\n * Merge two option objects into a new one.\n * Core utility used in both instantiation and inheritance.\n */\nfunction mergeOptions (\n  parent,\n  child,\n  vm\n) {\n  if (process.env.NODE_ENV !== 'production') {\n    checkComponents(child);\n  }\n  normalizeProps(child);\n  normalizeDirectives(child);\n  var extendsFrom = child.extends;\n  if (extendsFrom) {\n    parent = typeof extendsFrom === 'function'\n      ? mergeOptions(parent, extendsFrom.options, vm)\n      : mergeOptions(parent, extendsFrom, vm);\n  }\n  if (child.mixins) {\n    for (var i = 0, l = child.mixins.length; i < l; i++) {\n      var mixin = child.mixins[i];\n      if (mixin.prototype instanceof Vue$3) {\n        mixin = mixin.options;\n      }\n      parent = mergeOptions(parent, mixin, vm);\n    }\n  }\n  var options = {};\n  var key;\n  for (key in parent) {\n    mergeField(key);\n  }\n  for (key in child) {\n    if (!hasOwn(parent, key)) {\n      mergeField(key);\n    }\n  }\n  function mergeField (key) {\n    var strat = strats[key] || defaultStrat;\n    options[key] = strat(parent[key], child[key], vm, key);\n  }\n  return options\n}\n\n/**\n * Resolve an asset.\n * This function is used because child instances need access\n * to assets defined in its ancestor chain.\n */\nfunction resolveAsset (\n  options,\n  type,\n  id,\n  warnMissing\n) {\n  /* istanbul ignore if */\n  if (typeof id !== 'string') {\n    return\n  }\n  var assets = options[type];\n  // check local registration variations first\n  if (hasOwn(assets, id)) { return assets[id] }\n  var camelizedId = camelize(id);\n  if (hasOwn(assets, camelizedId)) { return assets[camelizedId] }\n  var PascalCaseId = capitalize(camelizedId);\n  if (hasOwn(assets, PascalCaseId)) { return assets[PascalCaseId] }\n  // fallback to prototype chain\n  var res = assets[id] || assets[camelizedId] || assets[PascalCaseId];\n  if (process.env.NODE_ENV !== 'production' && warnMissing && !res) {\n    warn(\n      'Failed to resolve ' + type.slice(0, -1) + ': ' + id,\n      options\n    );\n  }\n  return res\n}\n\n/*  */\n\nfunction validateProp (\n  key,\n  propOptions,\n  propsData,\n  vm\n) {\n  var prop = propOptions[key];\n  var absent = !hasOwn(propsData, key);\n  var value = propsData[key];\n  // handle boolean props\n  if (isType(Boolean, prop.type)) {\n    if (absent && !hasOwn(prop, 'default')) {\n      value = false;\n    } else if (!isType(String, prop.type) && (value === '' || value === hyphenate(key))) {\n      value = true;\n    }\n  }\n  // check default value\n  if (value === undefined) {\n    value = getPropDefaultValue(vm, prop, key);\n    // since the default value is a fresh copy,\n    // make sure to observe it.\n    var prevShouldConvert = observerState.shouldConvert;\n    observerState.shouldConvert = true;\n    observe(value);\n    observerState.shouldConvert = prevShouldConvert;\n  }\n  if (process.env.NODE_ENV !== 'production') {\n    assertProp(prop, key, value, vm, absent);\n  }\n  return value\n}\n\n/**\n * Get the default value of a prop.\n */\nfunction getPropDefaultValue (vm, prop, key) {\n  // no default, return undefined\n  if (!hasOwn(prop, 'default')) {\n    return undefined\n  }\n  var def = prop.default;\n  // warn against non-factory defaults for Object & Array\n  if (process.env.NODE_ENV !== 'production' && isObject(def)) {\n    warn(\n      'Invalid default value for prop \"' + key + '\": ' +\n      'Props with type Object/Array must use a factory function ' +\n      'to return the default value.',\n      vm\n    );\n  }\n  // the raw prop value was also undefined from previous render,\n  // return previous default value to avoid unnecessary watcher trigger\n  if (vm && vm.$options.propsData &&\n    vm.$options.propsData[key] === undefined &&\n    vm._props[key] !== undefined) {\n    return vm._props[key]\n  }\n  // call factory function for non-Function types\n  // a value is Function if its prototype is function even across different execution context\n  return typeof def === 'function' && getType(prop.type) !== 'Function'\n    ? def.call(vm)\n    : def\n}\n\n/**\n * Assert whether a prop is valid.\n */\nfunction assertProp (\n  prop,\n  name,\n  value,\n  vm,\n  absent\n) {\n  if (prop.required && absent) {\n    warn(\n      'Missing required prop: \"' + name + '\"',\n      vm\n    );\n    return\n  }\n  if (value == null && !prop.required) {\n    return\n  }\n  var type = prop.type;\n  var valid = !type || type === true;\n  var expectedTypes = [];\n  if (type) {\n    if (!Array.isArray(type)) {\n      type = [type];\n    }\n    for (var i = 0; i < type.length && !valid; i++) {\n      var assertedType = assertType(value, type[i]);\n      expectedTypes.push(assertedType.expectedType || '');\n      valid = assertedType.valid;\n    }\n  }\n  if (!valid) {\n    warn(\n      'Invalid prop: type check failed for prop \"' + name + '\".' +\n      ' Expected ' + expectedTypes.map(capitalize).join(', ') +\n      ', got ' + Object.prototype.toString.call(value).slice(8, -1) + '.',\n      vm\n    );\n    return\n  }\n  var validator = prop.validator;\n  if (validator) {\n    if (!validator(value)) {\n      warn(\n        'Invalid prop: custom validator check failed for prop \"' + name + '\".',\n        vm\n      );\n    }\n  }\n}\n\n/**\n * Assert the type of a value\n */\nfunction assertType (value, type) {\n  var valid;\n  var expectedType = getType(type);\n  if (expectedType === 'String') {\n    valid = typeof value === (expectedType = 'string');\n  } else if (expectedType === 'Number') {\n    valid = typeof value === (expectedType = 'number');\n  } else if (expectedType === 'Boolean') {\n    valid = typeof value === (expectedType = 'boolean');\n  } else if (expectedType === 'Function') {\n    valid = typeof value === (expectedType = 'function');\n  } else if (expectedType === 'Object') {\n    valid = isPlainObject(value);\n  } else if (expectedType === 'Array') {\n    valid = Array.isArray(value);\n  } else {\n    valid = value instanceof type;\n  }\n  return {\n    valid: valid,\n    expectedType: expectedType\n  }\n}\n\n/**\n * Use function string name to check built-in types,\n * because a simple equality check will fail when running\n * across different vms / iframes.\n */\nfunction getType (fn) {\n  var match = fn && fn.toString().match(/^\\s*function (\\w+)/);\n  return match && match[1]\n}\n\nfunction isType (type, fn) {\n  if (!Array.isArray(fn)) {\n    return getType(fn) === getType(type)\n  }\n  for (var i = 0, len = fn.length; i < len; i++) {\n    if (getType(fn[i]) === getType(type)) {\n      return true\n    }\n  }\n  /* istanbul ignore next */\n  return false\n}\n\nfunction handleError (err, vm, info) {\n  if (config.errorHandler) {\n    config.errorHandler.call(null, err, vm, info);\n  } else {\n    if (process.env.NODE_ENV !== 'production') {\n      warn((\"Error in \" + info + \":\"), vm);\n    }\n    /* istanbul ignore else */\n    if (inBrowser && typeof console !== 'undefined') {\n      console.error(err);\n    } else {\n      throw err\n    }\n  }\n}\n\n/* not type checking this file because flow doesn't play well with Proxy */\n\nvar initProxy;\n\nif (process.env.NODE_ENV !== 'production') {\n  var allowedGlobals = makeMap(\n    'Infinity,undefined,NaN,isFinite,isNaN,' +\n    'parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,' +\n    'Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,' +\n    'require' // for Webpack/Browserify\n  );\n\n  var warnNonPresent = function (target, key) {\n    warn(\n      \"Property or method \\\"\" + key + \"\\\" is not defined on the instance but \" +\n      \"referenced during render. Make sure to declare reactive data \" +\n      \"properties in the data option.\",\n      target\n    );\n  };\n\n  var hasProxy =\n    typeof Proxy !== 'undefined' &&\n    Proxy.toString().match(/native code/);\n\n  if (hasProxy) {\n    var isBuiltInModifier = makeMap('stop,prevent,self,ctrl,shift,alt,meta');\n    config.keyCodes = new Proxy(config.keyCodes, {\n      set: function set (target, key, value) {\n        if (isBuiltInModifier(key)) {\n          warn((\"Avoid overwriting built-in modifier in config.keyCodes: .\" + key));\n          return false\n        } else {\n          target[key] = value;\n          return true\n        }\n      }\n    });\n  }\n\n  var hasHandler = {\n    has: function has (target, key) {\n      var has = key in target;\n      var isAllowed = allowedGlobals(key) || key.charAt(0) === '_';\n      if (!has && !isAllowed) {\n        warnNonPresent(target, key);\n      }\n      return has || !isAllowed\n    }\n  };\n\n  var getHandler = {\n    get: function get (target, key) {\n      if (typeof key === 'string' && !(key in target)) {\n        warnNonPresent(target, key);\n      }\n      return target[key]\n    }\n  };\n\n  initProxy = function initProxy (vm) {\n    if (hasProxy) {\n      // determine which proxy handler to use\n      var options = vm.$options;\n      var handlers = options.render && options.render._withStripped\n        ? getHandler\n        : hasHandler;\n      vm._renderProxy = new Proxy(vm, handlers);\n    } else {\n      vm._renderProxy = vm;\n    }\n  };\n}\n\nvar mark;\nvar measure;\n\nif (process.env.NODE_ENV !== 'production') {\n  var perf = inBrowser && window.performance;\n  /* istanbul ignore if */\n  if (\n    perf &&\n    perf.mark &&\n    perf.measure &&\n    perf.clearMarks &&\n    perf.clearMeasures\n  ) {\n    mark = function (tag) { return perf.mark(tag); };\n    measure = function (name, startTag, endTag) {\n      perf.measure(name, startTag, endTag);\n      perf.clearMarks(startTag);\n      perf.clearMarks(endTag);\n      perf.clearMeasures(name);\n    };\n  }\n}\n\n/*  */\n\nvar VNode = function VNode (\n  tag,\n  data,\n  children,\n  text,\n  elm,\n  context,\n  componentOptions\n) {\n  this.tag = tag;\n  this.data = data;\n  this.children = children;\n  this.text = text;\n  this.elm = elm;\n  this.ns = undefined;\n  this.context = context;\n  this.functionalContext = undefined;\n  this.key = data && data.key;\n  this.componentOptions = componentOptions;\n  this.componentInstance = undefined;\n  this.parent = undefined;\n  this.raw = false;\n  this.isStatic = false;\n  this.isRootInsert = true;\n  this.isComment = false;\n  this.isCloned = false;\n  this.isOnce = false;\n};\n\nvar prototypeAccessors = { child: {} };\n\n// DEPRECATED: alias for componentInstance for backwards compat.\n/* istanbul ignore next */\nprototypeAccessors.child.get = function () {\n  return this.componentInstance\n};\n\nObject.defineProperties( VNode.prototype, prototypeAccessors );\n\nvar createEmptyVNode = function () {\n  var node = new VNode();\n  node.text = '';\n  node.isComment = true;\n  return node\n};\n\nfunction createTextVNode (val) {\n  return new VNode(undefined, undefined, undefined, String(val))\n}\n\n// optimized shallow clone\n// used for static nodes and slot nodes because they may be reused across\n// multiple renders, cloning them avoids errors when DOM manipulations rely\n// on their elm reference.\nfunction cloneVNode (vnode) {\n  var cloned = new VNode(\n    vnode.tag,\n    vnode.data,\n    vnode.children,\n    vnode.text,\n    vnode.elm,\n    vnode.context,\n    vnode.componentOptions\n  );\n  cloned.ns = vnode.ns;\n  cloned.isStatic = vnode.isStatic;\n  cloned.key = vnode.key;\n  cloned.isCloned = true;\n  return cloned\n}\n\nfunction cloneVNodes (vnodes) {\n  var len = vnodes.length;\n  var res = new Array(len);\n  for (var i = 0; i < len; i++) {\n    res[i] = cloneVNode(vnodes[i]);\n  }\n  return res\n}\n\n/*  */\n\nvar normalizeEvent = cached(function (name) {\n  var once$$1 = name.charAt(0) === '~'; // Prefixed last, checked first\n  name = once$$1 ? name.slice(1) : name;\n  var capture = name.charAt(0) === '!';\n  name = capture ? name.slice(1) : name;\n  return {\n    name: name,\n    once: once$$1,\n    capture: capture\n  }\n});\n\nfunction createFnInvoker (fns) {\n  function invoker () {\n    var arguments$1 = arguments;\n\n    var fns = invoker.fns;\n    if (Array.isArray(fns)) {\n      for (var i = 0; i < fns.length; i++) {\n        fns[i].apply(null, arguments$1);\n      }\n    } else {\n      // return handler return value for single handlers\n      return fns.apply(null, arguments)\n    }\n  }\n  invoker.fns = fns;\n  return invoker\n}\n\nfunction updateListeners (\n  on,\n  oldOn,\n  add,\n  remove$$1,\n  vm\n) {\n  var name, cur, old, event;\n  for (name in on) {\n    cur = on[name];\n    old = oldOn[name];\n    event = normalizeEvent(name);\n    if (!cur) {\n      process.env.NODE_ENV !== 'production' && warn(\n        \"Invalid handler for event \\\"\" + (event.name) + \"\\\": got \" + String(cur),\n        vm\n      );\n    } else if (!old) {\n      if (!cur.fns) {\n        cur = on[name] = createFnInvoker(cur);\n      }\n      add(event.name, cur, event.once, event.capture);\n    } else if (cur !== old) {\n      old.fns = cur;\n      on[name] = old;\n    }\n  }\n  for (name in oldOn) {\n    if (!on[name]) {\n      event = normalizeEvent(name);\n      remove$$1(event.name, oldOn[name], event.capture);\n    }\n  }\n}\n\n/*  */\n\nfunction mergeVNodeHook (def, hookKey, hook) {\n  var invoker;\n  var oldHook = def[hookKey];\n\n  function wrappedHook () {\n    hook.apply(this, arguments);\n    // important: remove merged hook to ensure it's called only once\n    // and prevent memory leak\n    remove(invoker.fns, wrappedHook);\n  }\n\n  if (!oldHook) {\n    // no existing hook\n    invoker = createFnInvoker([wrappedHook]);\n  } else {\n    /* istanbul ignore if */\n    if (oldHook.fns && oldHook.merged) {\n      // already a merged invoker\n      invoker = oldHook;\n      invoker.fns.push(wrappedHook);\n    } else {\n      // existing plain hook\n      invoker = createFnInvoker([oldHook, wrappedHook]);\n    }\n  }\n\n  invoker.merged = true;\n  def[hookKey] = invoker;\n}\n\n/*  */\n\n// The template compiler attempts to minimize the need for normalization by\n// statically analyzing the template at compile time.\n//\n// For plain HTML markup, normalization can be completely skipped because the\n// generated render function is guaranteed to return Array<VNode>. There are\n// two cases where extra normalization is needed:\n\n// 1. When the children contains components - because a functional component\n// may return an Array instead of a single root. In this case, just a simple\n// normalization is needed - if any child is an Array, we flatten the whole\n// thing with Array.prototype.concat. It is guaranteed to be only 1-level deep\n// because functional components already normalize their own children.\nfunction simpleNormalizeChildren (children) {\n  for (var i = 0; i < children.length; i++) {\n    if (Array.isArray(children[i])) {\n      return Array.prototype.concat.apply([], children)\n    }\n  }\n  return children\n}\n\n// 2. When the children contains constructs that always generated nested Arrays,\n// e.g. <template>, <slot>, v-for, or when the children is provided by user\n// with hand-written render functions / JSX. In such cases a full normalization\n// is needed to cater to all possible types of children values.\nfunction normalizeChildren (children) {\n  return isPrimitive(children)\n    ? [createTextVNode(children)]\n    : Array.isArray(children)\n      ? normalizeArrayChildren(children)\n      : undefined\n}\n\nfunction normalizeArrayChildren (children, nestedIndex) {\n  var res = [];\n  var i, c, last;\n  for (i = 0; i < children.length; i++) {\n    c = children[i];\n    if (c == null || typeof c === 'boolean') { continue }\n    last = res[res.length - 1];\n    //  nested\n    if (Array.isArray(c)) {\n      res.push.apply(res, normalizeArrayChildren(c, ((nestedIndex || '') + \"_\" + i)));\n    } else if (isPrimitive(c)) {\n      if (last && last.text) {\n        last.text += String(c);\n      } else if (c !== '') {\n        // convert primitive to vnode\n        res.push(createTextVNode(c));\n      }\n    } else {\n      if (c.text && last && last.text) {\n        res[res.length - 1] = createTextVNode(last.text + c.text);\n      } else {\n        // default key for nested array children (likely generated by v-for)\n        if (c.tag && c.key == null && nestedIndex != null) {\n          c.key = \"__vlist\" + nestedIndex + \"_\" + i + \"__\";\n        }\n        res.push(c);\n      }\n    }\n  }\n  return res\n}\n\n/*  */\n\nfunction getFirstComponentChild (children) {\n  return children && children.filter(function (c) { return c && c.componentOptions; })[0]\n}\n\n/*  */\n\nfunction initEvents (vm) {\n  vm._events = Object.create(null);\n  vm._hasHookEvent = false;\n  // init parent attached events\n  var listeners = vm.$options._parentListeners;\n  if (listeners) {\n    updateComponentListeners(vm, listeners);\n  }\n}\n\nvar target;\n\nfunction add (event, fn, once$$1) {\n  if (once$$1) {\n    target.$once(event, fn);\n  } else {\n    target.$on(event, fn);\n  }\n}\n\nfunction remove$1 (event, fn) {\n  target.$off(event, fn);\n}\n\nfunction updateComponentListeners (\n  vm,\n  listeners,\n  oldListeners\n) {\n  target = vm;\n  updateListeners(listeners, oldListeners || {}, add, remove$1, vm);\n}\n\nfunction eventsMixin (Vue) {\n  var hookRE = /^hook:/;\n  Vue.prototype.$on = function (event, fn) {\n    var this$1 = this;\n\n    var vm = this;\n    if (Array.isArray(event)) {\n      for (var i = 0, l = event.length; i < l; i++) {\n        this$1.$on(event[i], fn);\n      }\n    } else {\n      (vm._events[event] || (vm._events[event] = [])).push(fn);\n      // optimize hook:event cost by using a boolean flag marked at registration\n      // instead of a hash lookup\n      if (hookRE.test(event)) {\n        vm._hasHookEvent = true;\n      }\n    }\n    return vm\n  };\n\n  Vue.prototype.$once = function (event, fn) {\n    var vm = this;\n    function on () {\n      vm.$off(event, on);\n      fn.apply(vm, arguments);\n    }\n    on.fn = fn;\n    vm.$on(event, on);\n    return vm\n  };\n\n  Vue.prototype.$off = function (event, fn) {\n    var this$1 = this;\n\n    var vm = this;\n    // all\n    if (!arguments.length) {\n      vm._events = Object.create(null);\n      return vm\n    }\n    // array of events\n    if (Array.isArray(event)) {\n      for (var i$1 = 0, l = event.length; i$1 < l; i$1++) {\n        this$1.$off(event[i$1], fn);\n      }\n      return vm\n    }\n    // specific event\n    var cbs = vm._events[event];\n    if (!cbs) {\n      return vm\n    }\n    if (arguments.length === 1) {\n      vm._events[event] = null;\n      return vm\n    }\n    // specific handler\n    var cb;\n    var i = cbs.length;\n    while (i--) {\n      cb = cbs[i];\n      if (cb === fn || cb.fn === fn) {\n        cbs.splice(i, 1);\n        break\n      }\n    }\n    return vm\n  };\n\n  Vue.prototype.$emit = function (event) {\n    var vm = this;\n    if (process.env.NODE_ENV !== 'production') {\n      var lowerCaseEvent = event.toLowerCase();\n      if (lowerCaseEvent !== event && vm._events[lowerCaseEvent]) {\n        tip(\n          \"Event \\\"\" + lowerCaseEvent + \"\\\" is emitted in component \" +\n          (formatComponentName(vm)) + \" but the handler is registered for \\\"\" + event + \"\\\". \" +\n          \"Note that HTML attributes are case-insensitive and you cannot use \" +\n          \"v-on to listen to camelCase events when using in-DOM templates. \" +\n          \"You should probably use \\\"\" + (hyphenate(event)) + \"\\\" instead of \\\"\" + event + \"\\\".\"\n        );\n      }\n    }\n    var cbs = vm._events[event];\n    if (cbs) {\n      cbs = cbs.length > 1 ? toArray(cbs) : cbs;\n      var args = toArray(arguments, 1);\n      for (var i = 0, l = cbs.length; i < l; i++) {\n        cbs[i].apply(vm, args);\n      }\n    }\n    return vm\n  };\n}\n\n/*  */\n\n/**\n * Runtime helper for resolving raw children VNodes into a slot object.\n */\nfunction resolveSlots (\n  children,\n  context\n) {\n  var slots = {};\n  if (!children) {\n    return slots\n  }\n  var defaultSlot = [];\n  var name, child;\n  for (var i = 0, l = children.length; i < l; i++) {\n    child = children[i];\n    // named slots should only be respected if the vnode was rendered in the\n    // same context.\n    if ((child.context === context || child.functionalContext === context) &&\n        child.data && (name = child.data.slot)) {\n      var slot = (slots[name] || (slots[name] = []));\n      if (child.tag === 'template') {\n        slot.push.apply(slot, child.children);\n      } else {\n        slot.push(child);\n      }\n    } else {\n      defaultSlot.push(child);\n    }\n  }\n  // ignore whitespace\n  if (!defaultSlot.every(isWhitespace)) {\n    slots.default = defaultSlot;\n  }\n  return slots\n}\n\nfunction isWhitespace (node) {\n  return node.isComment || node.text === ' '\n}\n\nfunction resolveScopedSlots (\n  fns\n) {\n  var res = {};\n  for (var i = 0; i < fns.length; i++) {\n    res[fns[i][0]] = fns[i][1];\n  }\n  return res\n}\n\n/*  */\n\nvar activeInstance = null;\n\nfunction initLifecycle (vm) {\n  var options = vm.$options;\n\n  // locate first non-abstract parent\n  var parent = options.parent;\n  if (parent && !options.abstract) {\n    while (parent.$options.abstract && parent.$parent) {\n      parent = parent.$parent;\n    }\n    parent.$children.push(vm);\n  }\n\n  vm.$parent = parent;\n  vm.$root = parent ? parent.$root : vm;\n\n  vm.$children = [];\n  vm.$refs = {};\n\n  vm._watcher = null;\n  vm._inactive = null;\n  vm._directInactive = false;\n  vm._isMounted = false;\n  vm._isDestroyed = false;\n  vm._isBeingDestroyed = false;\n}\n\nfunction lifecycleMixin (Vue) {\n  Vue.prototype._update = function (vnode, hydrating) {\n    var vm = this;\n    if (vm._isMounted) {\n      callHook(vm, 'beforeUpdate');\n    }\n    var prevEl = vm.$el;\n    var prevVnode = vm._vnode;\n    var prevActiveInstance = activeInstance;\n    activeInstance = vm;\n    vm._vnode = vnode;\n    // Vue.prototype.__patch__ is injected in entry points\n    // based on the rendering backend used.\n    if (!prevVnode) {\n      // initial render\n      vm.$el = vm.__patch__(\n        vm.$el, vnode, hydrating, false /* removeOnly */,\n        vm.$options._parentElm,\n        vm.$options._refElm\n      );\n    } else {\n      // updates\n      vm.$el = vm.__patch__(prevVnode, vnode);\n    }\n    activeInstance = prevActiveInstance;\n    // update __vue__ reference\n    if (prevEl) {\n      prevEl.__vue__ = null;\n    }\n    if (vm.$el) {\n      vm.$el.__vue__ = vm;\n    }\n    // if parent is an HOC, update its $el as well\n    if (vm.$vnode && vm.$parent && vm.$vnode === vm.$parent._vnode) {\n      vm.$parent.$el = vm.$el;\n    }\n    // updated hook is called by the scheduler to ensure that children are\n    // updated in a parent's updated hook.\n  };\n\n  Vue.prototype.$forceUpdate = function () {\n    var vm = this;\n    if (vm._watcher) {\n      vm._watcher.update();\n    }\n  };\n\n  Vue.prototype.$destroy = function () {\n    var vm = this;\n    if (vm._isBeingDestroyed) {\n      return\n    }\n    callHook(vm, 'beforeDestroy');\n    vm._isBeingDestroyed = true;\n    // remove self from parent\n    var parent = vm.$parent;\n    if (parent && !parent._isBeingDestroyed && !vm.$options.abstract) {\n      remove(parent.$children, vm);\n    }\n    // teardown watchers\n    if (vm._watcher) {\n      vm._watcher.teardown();\n    }\n    var i = vm._watchers.length;\n    while (i--) {\n      vm._watchers[i].teardown();\n    }\n    // remove reference from data ob\n    // frozen object may not have observer.\n    if (vm._data.__ob__) {\n      vm._data.__ob__.vmCount--;\n    }\n    // call the last hook...\n    vm._isDestroyed = true;\n    // invoke destroy hooks on current rendered tree\n    vm.__patch__(vm._vnode, null);\n    // fire destroyed hook\n    callHook(vm, 'destroyed');\n    // turn off all instance listeners.\n    vm.$off();\n    // remove __vue__ reference\n    if (vm.$el) {\n      vm.$el.__vue__ = null;\n    }\n    // remove reference to DOM nodes (prevents leak)\n    vm.$options._parentElm = vm.$options._refElm = null;\n  };\n}\n\nfunction mountComponent (\n  vm,\n  el,\n  hydrating\n) {\n  vm.$el = el;\n  if (!vm.$options.render) {\n    vm.$options.render = createEmptyVNode;\n    if (process.env.NODE_ENV !== 'production') {\n      /* istanbul ignore if */\n      if ((vm.$options.template && vm.$options.template.charAt(0) !== '#') ||\n        vm.$options.el || el) {\n        warn(\n          'You are using the runtime-only build of Vue where the template ' +\n          'compiler is not available. Either pre-compile the templates into ' +\n          'render functions, or use the compiler-included build.',\n          vm\n        );\n      } else {\n        warn(\n          'Failed to mount component: template or render function not defined.',\n          vm\n        );\n      }\n    }\n  }\n  callHook(vm, 'beforeMount');\n\n  var updateComponent;\n  /* istanbul ignore if */\n  if (process.env.NODE_ENV !== 'production' && config.performance && mark) {\n    updateComponent = function () {\n      var name = vm._name;\n      var id = vm._uid;\n      var startTag = \"vue-perf-start:\" + id;\n      var endTag = \"vue-perf-end:\" + id;\n\n      mark(startTag);\n      var vnode = vm._render();\n      mark(endTag);\n      measure((name + \" render\"), startTag, endTag);\n\n      mark(startTag);\n      vm._update(vnode, hydrating);\n      mark(endTag);\n      measure((name + \" patch\"), startTag, endTag);\n    };\n  } else {\n    updateComponent = function () {\n      vm._update(vm._render(), hydrating);\n    };\n  }\n\n  vm._watcher = new Watcher(vm, updateComponent, noop);\n  hydrating = false;\n\n  // manually mounted instance, call mounted on self\n  // mounted is called for render-created child components in its inserted hook\n  if (vm.$vnode == null) {\n    vm._isMounted = true;\n    callHook(vm, 'mounted');\n  }\n  return vm\n}\n\nfunction updateChildComponent (\n  vm,\n  propsData,\n  listeners,\n  parentVnode,\n  renderChildren\n) {\n  // determine whether component has slot children\n  // we need to do this before overwriting $options._renderChildren\n  var hasChildren = !!(\n    renderChildren ||               // has new static slots\n    vm.$options._renderChildren ||  // has old static slots\n    parentVnode.data.scopedSlots || // has new scoped slots\n    vm.$scopedSlots !== emptyObject // has old scoped slots\n  );\n\n  vm.$options._parentVnode = parentVnode;\n  vm.$vnode = parentVnode; // update vm's placeholder node without re-render\n  if (vm._vnode) { // update child tree's parent\n    vm._vnode.parent = parentVnode;\n  }\n  vm.$options._renderChildren = renderChildren;\n\n  // update props\n  if (propsData && vm.$options.props) {\n    observerState.shouldConvert = false;\n    if (process.env.NODE_ENV !== 'production') {\n      observerState.isSettingProps = true;\n    }\n    var props = vm._props;\n    var propKeys = vm.$options._propKeys || [];\n    for (var i = 0; i < propKeys.length; i++) {\n      var key = propKeys[i];\n      props[key] = validateProp(key, vm.$options.props, propsData, vm);\n    }\n    observerState.shouldConvert = true;\n    if (process.env.NODE_ENV !== 'production') {\n      observerState.isSettingProps = false;\n    }\n    // keep a copy of raw propsData\n    vm.$options.propsData = propsData;\n  }\n  // update listeners\n  if (listeners) {\n    var oldListeners = vm.$options._parentListeners;\n    vm.$options._parentListeners = listeners;\n    updateComponentListeners(vm, listeners, oldListeners);\n  }\n  // resolve slots + force update if has children\n  if (hasChildren) {\n    vm.$slots = resolveSlots(renderChildren, parentVnode.context);\n    vm.$forceUpdate();\n  }\n}\n\nfunction isInInactiveTree (vm) {\n  while (vm && (vm = vm.$parent)) {\n    if (vm._inactive) { return true }\n  }\n  return false\n}\n\nfunction activateChildComponent (vm, direct) {\n  if (direct) {\n    vm._directInactive = false;\n    if (isInInactiveTree(vm)) {\n      return\n    }\n  } else if (vm._directInactive) {\n    return\n  }\n  if (vm._inactive || vm._inactive == null) {\n    vm._inactive = false;\n    for (var i = 0; i < vm.$children.length; i++) {\n      activateChildComponent(vm.$children[i]);\n    }\n    callHook(vm, 'activated');\n  }\n}\n\nfunction deactivateChildComponent (vm, direct) {\n  if (direct) {\n    vm._directInactive = true;\n    if (isInInactiveTree(vm)) {\n      return\n    }\n  }\n  if (!vm._inactive) {\n    vm._inactive = true;\n    for (var i = 0; i < vm.$children.length; i++) {\n      deactivateChildComponent(vm.$children[i]);\n    }\n    callHook(vm, 'deactivated');\n  }\n}\n\nfunction callHook (vm, hook) {\n  var handlers = vm.$options[hook];\n  if (handlers) {\n    for (var i = 0, j = handlers.length; i < j; i++) {\n      try {\n        handlers[i].call(vm);\n      } catch (e) {\n        handleError(e, vm, (hook + \" hook\"));\n      }\n    }\n  }\n  if (vm._hasHookEvent) {\n    vm.$emit('hook:' + hook);\n  }\n}\n\n/*  */\n\n\nvar queue = [];\nvar has = {};\nvar circular = {};\nvar waiting = false;\nvar flushing = false;\nvar index = 0;\n\n/**\n * Reset the scheduler's state.\n */\nfunction resetSchedulerState () {\n  queue.length = 0;\n  has = {};\n  if (process.env.NODE_ENV !== 'production') {\n    circular = {};\n  }\n  waiting = flushing = false;\n}\n\n/**\n * Flush both queues and run the watchers.\n */\nfunction flushSchedulerQueue () {\n  flushing = true;\n  var watcher, id, vm;\n\n  // Sort queue before flush.\n  // This ensures that:\n  // 1. Components are updated from parent to child. (because parent is always\n  //    created before the child)\n  // 2. A component's user watchers are run before its render watcher (because\n  //    user watchers are created before the render watcher)\n  // 3. If a component is destroyed during a parent component's watcher run,\n  //    its watchers can be skipped.\n  queue.sort(function (a, b) { return a.id - b.id; });\n\n  // do not cache length because more watchers might be pushed\n  // as we run existing watchers\n  for (index = 0; index < queue.length; index++) {\n    watcher = queue[index];\n    id = watcher.id;\n    has[id] = null;\n    watcher.run();\n    // in dev build, check and stop circular updates.\n    if (process.env.NODE_ENV !== 'production' && has[id] != null) {\n      circular[id] = (circular[id] || 0) + 1;\n      if (circular[id] > config._maxUpdateCount) {\n        warn(\n          'You may have an infinite update loop ' + (\n            watcher.user\n              ? (\"in watcher with expression \\\"\" + (watcher.expression) + \"\\\"\")\n              : \"in a component render function.\"\n          ),\n          watcher.vm\n        );\n        break\n      }\n    }\n  }\n\n  // reset scheduler before updated hook called\n  var oldQueue = queue.slice();\n  resetSchedulerState();\n\n  // call updated hooks\n  index = oldQueue.length;\n  while (index--) {\n    watcher = oldQueue[index];\n    vm = watcher.vm;\n    if (vm._watcher === watcher && vm._isMounted) {\n      callHook(vm, 'updated');\n    }\n  }\n\n  // devtool hook\n  /* istanbul ignore if */\n  if (devtools && config.devtools) {\n    devtools.emit('flush');\n  }\n}\n\n/**\n * Push a watcher into the watcher queue.\n * Jobs with duplicate IDs will be skipped unless it's\n * pushed when the queue is being flushed.\n */\nfunction queueWatcher (watcher) {\n  var id = watcher.id;\n  if (has[id] == null) {\n    has[id] = true;\n    if (!flushing) {\n      queue.push(watcher);\n    } else {\n      // if already flushing, splice the watcher based on its id\n      // if already past its id, it will be run next immediately.\n      var i = queue.length - 1;\n      while (i >= 0 && queue[i].id > watcher.id) {\n        i--;\n      }\n      queue.splice(Math.max(i, index) + 1, 0, watcher);\n    }\n    // queue the flush\n    if (!waiting) {\n      waiting = true;\n      nextTick(flushSchedulerQueue);\n    }\n  }\n}\n\n/*  */\n\nvar uid$2 = 0;\n\n/**\n * A watcher parses an expression, collects dependencies,\n * and fires callback when the expression value changes.\n * This is used for both the $watch() api and directives.\n */\nvar Watcher = function Watcher (\n  vm,\n  expOrFn,\n  cb,\n  options\n) {\n  this.vm = vm;\n  vm._watchers.push(this);\n  // options\n  if (options) {\n    this.deep = !!options.deep;\n    this.user = !!options.user;\n    this.lazy = !!options.lazy;\n    this.sync = !!options.sync;\n  } else {\n    this.deep = this.user = this.lazy = this.sync = false;\n  }\n  this.cb = cb;\n  this.id = ++uid$2; // uid for batching\n  this.active = true;\n  this.dirty = this.lazy; // for lazy watchers\n  this.deps = [];\n  this.newDeps = [];\n  this.depIds = new _Set();\n  this.newDepIds = new _Set();\n  this.expression = process.env.NODE_ENV !== 'production'\n    ? expOrFn.toString()\n    : '';\n  // parse expression for getter\n  if (typeof expOrFn === 'function') {\n    this.getter = expOrFn;\n  } else {\n    this.getter = parsePath(expOrFn);\n    if (!this.getter) {\n      this.getter = function () {};\n      process.env.NODE_ENV !== 'production' && warn(\n        \"Failed watching path: \\\"\" + expOrFn + \"\\\" \" +\n        'Watcher only accepts simple dot-delimited paths. ' +\n        'For full control, use a function instead.',\n        vm\n      );\n    }\n  }\n  this.value = this.lazy\n    ? undefined\n    : this.get();\n};\n\n/**\n * Evaluate the getter, and re-collect dependencies.\n */\nWatcher.prototype.get = function get () {\n  pushTarget(this);\n  var value;\n  var vm = this.vm;\n  if (this.user) {\n    try {\n      value = this.getter.call(vm, vm);\n    } catch (e) {\n      handleError(e, vm, (\"getter for watcher \\\"\" + (this.expression) + \"\\\"\"));\n    }\n  } else {\n    value = this.getter.call(vm, vm);\n  }\n  // \"touch\" every property so they are all tracked as\n  // dependencies for deep watching\n  if (this.deep) {\n    traverse(value);\n  }\n  popTarget();\n  this.cleanupDeps();\n  return value\n};\n\n/**\n * Add a dependency to this directive.\n */\nWatcher.prototype.addDep = function addDep (dep) {\n  var id = dep.id;\n  if (!this.newDepIds.has(id)) {\n    this.newDepIds.add(id);\n    this.newDeps.push(dep);\n    if (!this.depIds.has(id)) {\n      dep.addSub(this);\n    }\n  }\n};\n\n/**\n * Clean up for dependency collection.\n */\nWatcher.prototype.cleanupDeps = function cleanupDeps () {\n    var this$1 = this;\n\n  var i = this.deps.length;\n  while (i--) {\n    var dep = this$1.deps[i];\n    if (!this$1.newDepIds.has(dep.id)) {\n      dep.removeSub(this$1);\n    }\n  }\n  var tmp = this.depIds;\n  this.depIds = this.newDepIds;\n  this.newDepIds = tmp;\n  this.newDepIds.clear();\n  tmp = this.deps;\n  this.deps = this.newDeps;\n  this.newDeps = tmp;\n  this.newDeps.length = 0;\n};\n\n/**\n * Subscriber interface.\n * Will be called when a dependency changes.\n */\nWatcher.prototype.update = function update () {\n  /* istanbul ignore else */\n  if (this.lazy) {\n    this.dirty = true;\n  } else if (this.sync) {\n    this.run();\n  } else {\n    queueWatcher(this);\n  }\n};\n\n/**\n * Scheduler job interface.\n * Will be called by the scheduler.\n */\nWatcher.prototype.run = function run () {\n  if (this.active) {\n    var value = this.get();\n    if (\n      value !== this.value ||\n      // Deep watchers and watchers on Object/Arrays should fire even\n      // when the value is the same, because the value may\n      // have mutated.\n      isObject(value) ||\n      this.deep\n    ) {\n      // set new value\n      var oldValue = this.value;\n      this.value = value;\n      if (this.user) {\n        try {\n          this.cb.call(this.vm, value, oldValue);\n        } catch (e) {\n          handleError(e, this.vm, (\"callback for watcher \\\"\" + (this.expression) + \"\\\"\"));\n        }\n      } else {\n        this.cb.call(this.vm, value, oldValue);\n      }\n    }\n  }\n};\n\n/**\n * Evaluate the value of the watcher.\n * This only gets called for lazy watchers.\n */\nWatcher.prototype.evaluate = function evaluate () {\n  this.value = this.get();\n  this.dirty = false;\n};\n\n/**\n * Depend on all deps collected by this watcher.\n */\nWatcher.prototype.depend = function depend () {\n    var this$1 = this;\n\n  var i = this.deps.length;\n  while (i--) {\n    this$1.deps[i].depend();\n  }\n};\n\n/**\n * Remove self from all dependencies' subscriber list.\n */\nWatcher.prototype.teardown = function teardown () {\n    var this$1 = this;\n\n  if (this.active) {\n    // remove self from vm's watcher list\n    // this is a somewhat expensive operation so we skip it\n    // if the vm is being destroyed.\n    if (!this.vm._isBeingDestroyed) {\n      remove(this.vm._watchers, this);\n    }\n    var i = this.deps.length;\n    while (i--) {\n      this$1.deps[i].removeSub(this$1);\n    }\n    this.active = false;\n  }\n};\n\n/**\n * Recursively traverse an object to evoke all converted\n * getters, so that every nested property inside the object\n * is collected as a \"deep\" dependency.\n */\nvar seenObjects = new _Set();\nfunction traverse (val) {\n  seenObjects.clear();\n  _traverse(val, seenObjects);\n}\n\nfunction _traverse (val, seen) {\n  var i, keys;\n  var isA = Array.isArray(val);\n  if ((!isA && !isObject(val)) || !Object.isExtensible(val)) {\n    return\n  }\n  if (val.__ob__) {\n    var depId = val.__ob__.dep.id;\n    if (seen.has(depId)) {\n      return\n    }\n    seen.add(depId);\n  }\n  if (isA) {\n    i = val.length;\n    while (i--) { _traverse(val[i], seen); }\n  } else {\n    keys = Object.keys(val);\n    i = keys.length;\n    while (i--) { _traverse(val[keys[i]], seen); }\n  }\n}\n\n/*  */\n\nvar sharedPropertyDefinition = {\n  enumerable: true,\n  configurable: true,\n  get: noop,\n  set: noop\n};\n\nfunction proxy (target, sourceKey, key) {\n  sharedPropertyDefinition.get = function proxyGetter () {\n    return this[sourceKey][key]\n  };\n  sharedPropertyDefinition.set = function proxySetter (val) {\n    this[sourceKey][key] = val;\n  };\n  Object.defineProperty(target, key, sharedPropertyDefinition);\n}\n\nfunction initState (vm) {\n  vm._watchers = [];\n  var opts = vm.$options;\n  if (opts.props) { initProps(vm, opts.props); }\n  if (opts.methods) { initMethods(vm, opts.methods); }\n  if (opts.data) {\n    initData(vm);\n  } else {\n    observe(vm._data = {}, true /* asRootData */);\n  }\n  if (opts.computed) { initComputed(vm, opts.computed); }\n  if (opts.watch) { initWatch(vm, opts.watch); }\n}\n\nvar isReservedProp = { key: 1, ref: 1, slot: 1 };\n\nfunction initProps (vm, propsOptions) {\n  var propsData = vm.$options.propsData || {};\n  var props = vm._props = {};\n  // cache prop keys so that future props updates can iterate using Array\n  // instead of dynamic object key enumeration.\n  var keys = vm.$options._propKeys = [];\n  var isRoot = !vm.$parent;\n  // root instance props should be converted\n  observerState.shouldConvert = isRoot;\n  var loop = function ( key ) {\n    keys.push(key);\n    var value = validateProp(key, propsOptions, propsData, vm);\n    /* istanbul ignore else */\n    if (process.env.NODE_ENV !== 'production') {\n      if (isReservedProp[key]) {\n        warn(\n          (\"\\\"\" + key + \"\\\" is a reserved attribute and cannot be used as component prop.\"),\n          vm\n        );\n      }\n      defineReactive$$1(props, key, value, function () {\n        if (vm.$parent && !observerState.isSettingProps) {\n          warn(\n            \"Avoid mutating a prop directly since the value will be \" +\n            \"overwritten whenever the parent component re-renders. \" +\n            \"Instead, use a data or computed property based on the prop's \" +\n            \"value. Prop being mutated: \\\"\" + key + \"\\\"\",\n            vm\n          );\n        }\n      });\n    } else {\n      defineReactive$$1(props, key, value);\n    }\n    // static props are already proxied on the component's prototype\n    // during Vue.extend(). We only need to proxy props defined at\n    // instantiation here.\n    if (!(key in vm)) {\n      proxy(vm, \"_props\", key);\n    }\n  };\n\n  for (var key in propsOptions) loop( key );\n  observerState.shouldConvert = true;\n}\n\nfunction initData (vm) {\n  var data = vm.$options.data;\n  data = vm._data = typeof data === 'function'\n    ? getData(data, vm)\n    : data || {};\n  if (!isPlainObject(data)) {\n    data = {};\n    process.env.NODE_ENV !== 'production' && warn(\n      'data functions should return an object:\\n' +\n      'https://vuejs.org/v2/guide/components.html#data-Must-Be-a-Function',\n      vm\n    );\n  }\n  // proxy data on instance\n  var keys = Object.keys(data);\n  var props = vm.$options.props;\n  var i = keys.length;\n  while (i--) {\n    if (props && hasOwn(props, keys[i])) {\n      process.env.NODE_ENV !== 'production' && warn(\n        \"The data property \\\"\" + (keys[i]) + \"\\\" is already declared as a prop. \" +\n        \"Use prop default value instead.\",\n        vm\n      );\n    } else if (!isReserved(keys[i])) {\n      proxy(vm, \"_data\", keys[i]);\n    }\n  }\n  // observe data\n  observe(data, true /* asRootData */);\n}\n\nfunction getData (data, vm) {\n  try {\n    return data.call(vm)\n  } catch (e) {\n    handleError(e, vm, \"data()\");\n    return {}\n  }\n}\n\nvar computedWatcherOptions = { lazy: true };\n\nfunction initComputed (vm, computed) {\n  var watchers = vm._computedWatchers = Object.create(null);\n\n  for (var key in computed) {\n    var userDef = computed[key];\n    var getter = typeof userDef === 'function' ? userDef : userDef.get;\n    if (process.env.NODE_ENV !== 'production') {\n      if (getter === undefined) {\n        warn(\n          (\"No getter function has been defined for computed property \\\"\" + key + \"\\\".\"),\n          vm\n        );\n        getter = noop;\n      }\n    }\n    // create internal watcher for the computed property.\n    watchers[key] = new Watcher(vm, getter, noop, computedWatcherOptions);\n\n    // component-defined computed properties are already defined on the\n    // component prototype. We only need to define computed properties defined\n    // at instantiation here.\n    if (!(key in vm)) {\n      defineComputed(vm, key, userDef);\n    }\n  }\n}\n\nfunction defineComputed (target, key, userDef) {\n  if (typeof userDef === 'function') {\n    sharedPropertyDefinition.get = createComputedGetter(key);\n    sharedPropertyDefinition.set = noop;\n  } else {\n    sharedPropertyDefinition.get = userDef.get\n      ? userDef.cache !== false\n        ? createComputedGetter(key)\n        : userDef.get\n      : noop;\n    sharedPropertyDefinition.set = userDef.set\n      ? userDef.set\n      : noop;\n  }\n  Object.defineProperty(target, key, sharedPropertyDefinition);\n}\n\nfunction createComputedGetter (key) {\n  return function computedGetter () {\n    var watcher = this._computedWatchers && this._computedWatchers[key];\n    if (watcher) {\n      if (watcher.dirty) {\n        watcher.evaluate();\n      }\n      if (Dep.target) {\n        watcher.depend();\n      }\n      return watcher.value\n    }\n  }\n}\n\nfunction initMethods (vm, methods) {\n  var props = vm.$options.props;\n  for (var key in methods) {\n    vm[key] = methods[key] == null ? noop : bind(methods[key], vm);\n    if (process.env.NODE_ENV !== 'production') {\n      if (methods[key] == null) {\n        warn(\n          \"method \\\"\" + key + \"\\\" has an undefined value in the component definition. \" +\n          \"Did you reference the function correctly?\",\n          vm\n        );\n      }\n      if (props && hasOwn(props, key)) {\n        warn(\n          (\"method \\\"\" + key + \"\\\" has already been defined as a prop.\"),\n          vm\n        );\n      }\n    }\n  }\n}\n\nfunction initWatch (vm, watch) {\n  for (var key in watch) {\n    var handler = watch[key];\n    if (Array.isArray(handler)) {\n      for (var i = 0; i < handler.length; i++) {\n        createWatcher(vm, key, handler[i]);\n      }\n    } else {\n      createWatcher(vm, key, handler);\n    }\n  }\n}\n\nfunction createWatcher (vm, key, handler) {\n  var options;\n  if (isPlainObject(handler)) {\n    options = handler;\n    handler = handler.handler;\n  }\n  if (typeof handler === 'string') {\n    handler = vm[handler];\n  }\n  vm.$watch(key, handler, options);\n}\n\nfunction stateMixin (Vue) {\n  // flow somehow has problems with directly declared definition object\n  // when using Object.defineProperty, so we have to procedurally build up\n  // the object here.\n  var dataDef = {};\n  dataDef.get = function () { return this._data };\n  var propsDef = {};\n  propsDef.get = function () { return this._props };\n  if (process.env.NODE_ENV !== 'production') {\n    dataDef.set = function (newData) {\n      warn(\n        'Avoid replacing instance root $data. ' +\n        'Use nested data properties instead.',\n        this\n      );\n    };\n    propsDef.set = function () {\n      warn(\"$props is readonly.\", this);\n    };\n  }\n  Object.defineProperty(Vue.prototype, '$data', dataDef);\n  Object.defineProperty(Vue.prototype, '$props', propsDef);\n\n  Vue.prototype.$set = set;\n  Vue.prototype.$delete = del;\n\n  Vue.prototype.$watch = function (\n    expOrFn,\n    cb,\n    options\n  ) {\n    var vm = this;\n    options = options || {};\n    options.user = true;\n    var watcher = new Watcher(vm, expOrFn, cb, options);\n    if (options.immediate) {\n      cb.call(vm, watcher.value);\n    }\n    return function unwatchFn () {\n      watcher.teardown();\n    }\n  };\n}\n\n/*  */\n\n// hooks to be invoked on component VNodes during patch\nvar componentVNodeHooks = {\n  init: function init (\n    vnode,\n    hydrating,\n    parentElm,\n    refElm\n  ) {\n    if (!vnode.componentInstance || vnode.componentInstance._isDestroyed) {\n      var child = vnode.componentInstance = createComponentInstanceForVnode(\n        vnode,\n        activeInstance,\n        parentElm,\n        refElm\n      );\n      child.$mount(hydrating ? vnode.elm : undefined, hydrating);\n    } else if (vnode.data.keepAlive) {\n      // kept-alive components, treat as a patch\n      var mountedNode = vnode; // work around flow\n      componentVNodeHooks.prepatch(mountedNode, mountedNode);\n    }\n  },\n\n  prepatch: function prepatch (oldVnode, vnode) {\n    var options = vnode.componentOptions;\n    var child = vnode.componentInstance = oldVnode.componentInstance;\n    updateChildComponent(\n      child,\n      options.propsData, // updated props\n      options.listeners, // updated listeners\n      vnode, // new parent vnode\n      options.children // new children\n    );\n  },\n\n  insert: function insert (vnode) {\n    if (!vnode.componentInstance._isMounted) {\n      vnode.componentInstance._isMounted = true;\n      callHook(vnode.componentInstance, 'mounted');\n    }\n    if (vnode.data.keepAlive) {\n      activateChildComponent(vnode.componentInstance, true /* direct */);\n    }\n  },\n\n  destroy: function destroy (vnode) {\n    if (!vnode.componentInstance._isDestroyed) {\n      if (!vnode.data.keepAlive) {\n        vnode.componentInstance.$destroy();\n      } else {\n        deactivateChildComponent(vnode.componentInstance, true /* direct */);\n      }\n    }\n  }\n};\n\nvar hooksToMerge = Object.keys(componentVNodeHooks);\n\nfunction createComponent (\n  Ctor,\n  data,\n  context,\n  children,\n  tag\n) {\n  if (!Ctor) {\n    return\n  }\n\n  var baseCtor = context.$options._base;\n  if (isObject(Ctor)) {\n    Ctor = baseCtor.extend(Ctor);\n  }\n\n  if (typeof Ctor !== 'function') {\n    if (process.env.NODE_ENV !== 'production') {\n      warn((\"Invalid Component definition: \" + (String(Ctor))), context);\n    }\n    return\n  }\n\n  // async component\n  if (!Ctor.cid) {\n    if (Ctor.resolved) {\n      Ctor = Ctor.resolved;\n    } else {\n      Ctor = resolveAsyncComponent(Ctor, baseCtor, function () {\n        // it's ok to queue this on every render because\n        // $forceUpdate is buffered by the scheduler.\n        context.$forceUpdate();\n      });\n      if (!Ctor) {\n        // return nothing if this is indeed an async component\n        // wait for the callback to trigger parent update.\n        return\n      }\n    }\n  }\n\n  // resolve constructor options in case global mixins are applied after\n  // component constructor creation\n  resolveConstructorOptions(Ctor);\n\n  data = data || {};\n\n  // transform component v-model data into props & events\n  if (data.model) {\n    transformModel(Ctor.options, data);\n  }\n\n  // extract props\n  var propsData = extractProps(data, Ctor, tag);\n\n  // functional component\n  if (Ctor.options.functional) {\n    return createFunctionalComponent(Ctor, propsData, data, context, children)\n  }\n\n  // extract listeners, since these needs to be treated as\n  // child component listeners instead of DOM listeners\n  var listeners = data.on;\n  // replace with listeners with .native modifier\n  data.on = data.nativeOn;\n\n  if (Ctor.options.abstract) {\n    // abstract components do not keep anything\n    // other than props & listeners\n    data = {};\n  }\n\n  // merge component management hooks onto the placeholder node\n  mergeHooks(data);\n\n  // return a placeholder vnode\n  var name = Ctor.options.name || tag;\n  var vnode = new VNode(\n    (\"vue-component-\" + (Ctor.cid) + (name ? (\"-\" + name) : '')),\n    data, undefined, undefined, undefined, context,\n    { Ctor: Ctor, propsData: propsData, listeners: listeners, tag: tag, children: children }\n  );\n  return vnode\n}\n\nfunction createFunctionalComponent (\n  Ctor,\n  propsData,\n  data,\n  context,\n  children\n) {\n  var props = {};\n  var propOptions = Ctor.options.props;\n  if (propOptions) {\n    for (var key in propOptions) {\n      props[key] = validateProp(key, propOptions, propsData);\n    }\n  }\n  // ensure the createElement function in functional components\n  // gets a unique context - this is necessary for correct named slot check\n  var _context = Object.create(context);\n  var h = function (a, b, c, d) { return createElement(_context, a, b, c, d, true); };\n  var vnode = Ctor.options.render.call(null, h, {\n    props: props,\n    data: data,\n    parent: context,\n    children: children,\n    slots: function () { return resolveSlots(children, context); }\n  });\n  if (vnode instanceof VNode) {\n    vnode.functionalContext = context;\n    if (data.slot) {\n      (vnode.data || (vnode.data = {})).slot = data.slot;\n    }\n  }\n  return vnode\n}\n\nfunction createComponentInstanceForVnode (\n  vnode, // we know it's MountedComponentVNode but flow doesn't\n  parent, // activeInstance in lifecycle state\n  parentElm,\n  refElm\n) {\n  var vnodeComponentOptions = vnode.componentOptions;\n  var options = {\n    _isComponent: true,\n    parent: parent,\n    propsData: vnodeComponentOptions.propsData,\n    _componentTag: vnodeComponentOptions.tag,\n    _parentVnode: vnode,\n    _parentListeners: vnodeComponentOptions.listeners,\n    _renderChildren: vnodeComponentOptions.children,\n    _parentElm: parentElm || null,\n    _refElm: refElm || null\n  };\n  // check inline-template render functions\n  var inlineTemplate = vnode.data.inlineTemplate;\n  if (inlineTemplate) {\n    options.render = inlineTemplate.render;\n    options.staticRenderFns = inlineTemplate.staticRenderFns;\n  }\n  return new vnodeComponentOptions.Ctor(options)\n}\n\nfunction resolveAsyncComponent (\n  factory,\n  baseCtor,\n  cb\n) {\n  if (factory.requested) {\n    // pool callbacks\n    factory.pendingCallbacks.push(cb);\n  } else {\n    factory.requested = true;\n    var cbs = factory.pendingCallbacks = [cb];\n    var sync = true;\n\n    var resolve = function (res) {\n      if (isObject(res)) {\n        res = baseCtor.extend(res);\n      }\n      // cache resolved\n      factory.resolved = res;\n      // invoke callbacks only if this is not a synchronous resolve\n      // (async resolves are shimmed as synchronous during SSR)\n      if (!sync) {\n        for (var i = 0, l = cbs.length; i < l; i++) {\n          cbs[i](res);\n        }\n      }\n    };\n\n    var reject = function (reason) {\n      process.env.NODE_ENV !== 'production' && warn(\n        \"Failed to resolve async component: \" + (String(factory)) +\n        (reason ? (\"\\nReason: \" + reason) : '')\n      );\n    };\n\n    var res = factory(resolve, reject);\n\n    // handle promise\n    if (res && typeof res.then === 'function' && !factory.resolved) {\n      res.then(resolve, reject);\n    }\n\n    sync = false;\n    // return in case resolved synchronously\n    return factory.resolved\n  }\n}\n\nfunction extractProps (data, Ctor, tag) {\n  // we are only extracting raw values here.\n  // validation and default values are handled in the child\n  // component itself.\n  var propOptions = Ctor.options.props;\n  if (!propOptions) {\n    return\n  }\n  var res = {};\n  var attrs = data.attrs;\n  var props = data.props;\n  var domProps = data.domProps;\n  if (attrs || props || domProps) {\n    for (var key in propOptions) {\n      var altKey = hyphenate(key);\n      if (process.env.NODE_ENV !== 'production') {\n        var keyInLowerCase = key.toLowerCase();\n        if (\n          key !== keyInLowerCase &&\n          attrs && attrs.hasOwnProperty(keyInLowerCase)\n        ) {\n          tip(\n            \"Prop \\\"\" + keyInLowerCase + \"\\\" is passed to component \" +\n            (formatComponentName(tag || Ctor)) + \", but the declared prop name is\" +\n            \" \\\"\" + key + \"\\\". \" +\n            \"Note that HTML attributes are case-insensitive and camelCased \" +\n            \"props need to use their kebab-case equivalents when using in-DOM \" +\n            \"templates. You should probably use \\\"\" + altKey + \"\\\" instead of \\\"\" + key + \"\\\".\"\n          );\n        }\n      }\n      checkProp(res, props, key, altKey, true) ||\n      checkProp(res, attrs, key, altKey) ||\n      checkProp(res, domProps, key, altKey);\n    }\n  }\n  return res\n}\n\nfunction checkProp (\n  res,\n  hash,\n  key,\n  altKey,\n  preserve\n) {\n  if (hash) {\n    if (hasOwn(hash, key)) {\n      res[key] = hash[key];\n      if (!preserve) {\n        delete hash[key];\n      }\n      return true\n    } else if (hasOwn(hash, altKey)) {\n      res[key] = hash[altKey];\n      if (!preserve) {\n        delete hash[altKey];\n      }\n      return true\n    }\n  }\n  return false\n}\n\nfunction mergeHooks (data) {\n  if (!data.hook) {\n    data.hook = {};\n  }\n  for (var i = 0; i < hooksToMerge.length; i++) {\n    var key = hooksToMerge[i];\n    var fromParent = data.hook[key];\n    var ours = componentVNodeHooks[key];\n    data.hook[key] = fromParent ? mergeHook$1(ours, fromParent) : ours;\n  }\n}\n\nfunction mergeHook$1 (one, two) {\n  return function (a, b, c, d) {\n    one(a, b, c, d);\n    two(a, b, c, d);\n  }\n}\n\n// transform component v-model info (value and callback) into\n// prop and event handler respectively.\nfunction transformModel (options, data) {\n  var prop = (options.model && options.model.prop) || 'value';\n  var event = (options.model && options.model.event) || 'input';(data.props || (data.props = {}))[prop] = data.model.value;\n  var on = data.on || (data.on = {});\n  if (on[event]) {\n    on[event] = [data.model.callback].concat(on[event]);\n  } else {\n    on[event] = data.model.callback;\n  }\n}\n\n/*  */\n\nvar SIMPLE_NORMALIZE = 1;\nvar ALWAYS_NORMALIZE = 2;\n\n// wrapper function for providing a more flexible interface\n// without getting yelled at by flow\nfunction createElement (\n  context,\n  tag,\n  data,\n  children,\n  normalizationType,\n  alwaysNormalize\n) {\n  if (Array.isArray(data) || isPrimitive(data)) {\n    normalizationType = children;\n    children = data;\n    data = undefined;\n  }\n  if (alwaysNormalize) { normalizationType = ALWAYS_NORMALIZE; }\n  return _createElement(context, tag, data, children, normalizationType)\n}\n\nfunction _createElement (\n  context,\n  tag,\n  data,\n  children,\n  normalizationType\n) {\n  if (data && data.__ob__) {\n    process.env.NODE_ENV !== 'production' && warn(\n      \"Avoid using observed data object as vnode data: \" + (JSON.stringify(data)) + \"\\n\" +\n      'Always create fresh vnode data objects in each render!',\n      context\n    );\n    return createEmptyVNode()\n  }\n  if (!tag) {\n    // in case of component :is set to falsy value\n    return createEmptyVNode()\n  }\n  // support single function children as default scoped slot\n  if (Array.isArray(children) &&\n      typeof children[0] === 'function') {\n    data = data || {};\n    data.scopedSlots = { default: children[0] };\n    children.length = 0;\n  }\n  if (normalizationType === ALWAYS_NORMALIZE) {\n    children = normalizeChildren(children);\n  } else if (normalizationType === SIMPLE_NORMALIZE) {\n    children = simpleNormalizeChildren(children);\n  }\n  var vnode, ns;\n  if (typeof tag === 'string') {\n    var Ctor;\n    ns = config.getTagNamespace(tag);\n    if (config.isReservedTag(tag)) {\n      // platform built-in elements\n      vnode = new VNode(\n        config.parsePlatformTagName(tag), data, children,\n        undefined, undefined, context\n      );\n    } else if ((Ctor = resolveAsset(context.$options, 'components', tag))) {\n      // component\n      vnode = createComponent(Ctor, data, context, children, tag);\n    } else {\n      // unknown or unlisted namespaced elements\n      // check at runtime because it may get assigned a namespace when its\n      // parent normalizes children\n      vnode = new VNode(\n        tag, data, children,\n        undefined, undefined, context\n      );\n    }\n  } else {\n    // direct component options / constructor\n    vnode = createComponent(tag, data, context, children);\n  }\n  if (vnode) {\n    if (ns) { applyNS(vnode, ns); }\n    return vnode\n  } else {\n    return createEmptyVNode()\n  }\n}\n\nfunction applyNS (vnode, ns) {\n  vnode.ns = ns;\n  if (vnode.tag === 'foreignObject') {\n    // use default namespace inside foreignObject\n    return\n  }\n  if (vnode.children) {\n    for (var i = 0, l = vnode.children.length; i < l; i++) {\n      var child = vnode.children[i];\n      if (child.tag && !child.ns) {\n        applyNS(child, ns);\n      }\n    }\n  }\n}\n\n/*  */\n\n/**\n * Runtime helper for rendering v-for lists.\n */\nfunction renderList (\n  val,\n  render\n) {\n  var ret, i, l, keys, key;\n  if (Array.isArray(val) || typeof val === 'string') {\n    ret = new Array(val.length);\n    for (i = 0, l = val.length; i < l; i++) {\n      ret[i] = render(val[i], i);\n    }\n  } else if (typeof val === 'number') {\n    ret = new Array(val);\n    for (i = 0; i < val; i++) {\n      ret[i] = render(i + 1, i);\n    }\n  } else if (isObject(val)) {\n    keys = Object.keys(val);\n    ret = new Array(keys.length);\n    for (i = 0, l = keys.length; i < l; i++) {\n      key = keys[i];\n      ret[i] = render(val[key], key, i);\n    }\n  }\n  return ret\n}\n\n/*  */\n\n/**\n * Runtime helper for rendering <slot>\n */\nfunction renderSlot (\n  name,\n  fallback,\n  props,\n  bindObject\n) {\n  var scopedSlotFn = this.$scopedSlots[name];\n  if (scopedSlotFn) { // scoped slot\n    props = props || {};\n    if (bindObject) {\n      extend(props, bindObject);\n    }\n    return scopedSlotFn(props) || fallback\n  } else {\n    var slotNodes = this.$slots[name];\n    // warn duplicate slot usage\n    if (slotNodes && process.env.NODE_ENV !== 'production') {\n      slotNodes._rendered && warn(\n        \"Duplicate presence of slot \\\"\" + name + \"\\\" found in the same render tree \" +\n        \"- this will likely cause render errors.\",\n        this\n      );\n      slotNodes._rendered = true;\n    }\n    return slotNodes || fallback\n  }\n}\n\n/*  */\n\n/**\n * Runtime helper for resolving filters\n */\nfunction resolveFilter (id) {\n  return resolveAsset(this.$options, 'filters', id, true) || identity\n}\n\n/*  */\n\n/**\n * Runtime helper for checking keyCodes from config.\n */\nfunction checkKeyCodes (\n  eventKeyCode,\n  key,\n  builtInAlias\n) {\n  var keyCodes = config.keyCodes[key] || builtInAlias;\n  if (Array.isArray(keyCodes)) {\n    return keyCodes.indexOf(eventKeyCode) === -1\n  } else {\n    return keyCodes !== eventKeyCode\n  }\n}\n\n/*  */\n\n/**\n * Runtime helper for merging v-bind=\"object\" into a VNode's data.\n */\nfunction bindObjectProps (\n  data,\n  tag,\n  value,\n  asProp\n) {\n  if (value) {\n    if (!isObject(value)) {\n      process.env.NODE_ENV !== 'production' && warn(\n        'v-bind without argument expects an Object or Array value',\n        this\n      );\n    } else {\n      if (Array.isArray(value)) {\n        value = toObject(value);\n      }\n      var hash;\n      for (var key in value) {\n        if (key === 'class' || key === 'style') {\n          hash = data;\n        } else {\n          var type = data.attrs && data.attrs.type;\n          hash = asProp || config.mustUseProp(tag, type, key)\n            ? data.domProps || (data.domProps = {})\n            : data.attrs || (data.attrs = {});\n        }\n        if (!(key in hash)) {\n          hash[key] = value[key];\n        }\n      }\n    }\n  }\n  return data\n}\n\n/*  */\n\n/**\n * Runtime helper for rendering static trees.\n */\nfunction renderStatic (\n  index,\n  isInFor\n) {\n  var tree = this._staticTrees[index];\n  // if has already-rendered static tree and not inside v-for,\n  // we can reuse the same tree by doing a shallow clone.\n  if (tree && !isInFor) {\n    return Array.isArray(tree)\n      ? cloneVNodes(tree)\n      : cloneVNode(tree)\n  }\n  // otherwise, render a fresh tree.\n  tree = this._staticTrees[index] =\n    this.$options.staticRenderFns[index].call(this._renderProxy);\n  markStatic(tree, (\"__static__\" + index), false);\n  return tree\n}\n\n/**\n * Runtime helper for v-once.\n * Effectively it means marking the node as static with a unique key.\n */\nfunction markOnce (\n  tree,\n  index,\n  key\n) {\n  markStatic(tree, (\"__once__\" + index + (key ? (\"_\" + key) : \"\")), true);\n  return tree\n}\n\nfunction markStatic (\n  tree,\n  key,\n  isOnce\n) {\n  if (Array.isArray(tree)) {\n    for (var i = 0; i < tree.length; i++) {\n      if (tree[i] && typeof tree[i] !== 'string') {\n        markStaticNode(tree[i], (key + \"_\" + i), isOnce);\n      }\n    }\n  } else {\n    markStaticNode(tree, key, isOnce);\n  }\n}\n\nfunction markStaticNode (node, key, isOnce) {\n  node.isStatic = true;\n  node.key = key;\n  node.isOnce = isOnce;\n}\n\n/*  */\n\nfunction initRender (vm) {\n  vm.$vnode = null; // the placeholder node in parent tree\n  vm._vnode = null; // the root of the child tree\n  vm._staticTrees = null;\n  var parentVnode = vm.$options._parentVnode;\n  var renderContext = parentVnode && parentVnode.context;\n  vm.$slots = resolveSlots(vm.$options._renderChildren, renderContext);\n  vm.$scopedSlots = emptyObject;\n  // bind the createElement fn to this instance\n  // so that we get proper render context inside it.\n  // args order: tag, data, children, normalizationType, alwaysNormalize\n  // internal version is used by render functions compiled from templates\n  vm._c = function (a, b, c, d) { return createElement(vm, a, b, c, d, false); };\n  // normalization is always applied for the public version, used in\n  // user-written render functions.\n  vm.$createElement = function (a, b, c, d) { return createElement(vm, a, b, c, d, true); };\n}\n\nfunction renderMixin (Vue) {\n  Vue.prototype.$nextTick = function (fn) {\n    return nextTick(fn, this)\n  };\n\n  Vue.prototype._render = function () {\n    var vm = this;\n    var ref = vm.$options;\n    var render = ref.render;\n    var staticRenderFns = ref.staticRenderFns;\n    var _parentVnode = ref._parentVnode;\n\n    if (vm._isMounted) {\n      // clone slot nodes on re-renders\n      for (var key in vm.$slots) {\n        vm.$slots[key] = cloneVNodes(vm.$slots[key]);\n      }\n    }\n\n    vm.$scopedSlots = (_parentVnode && _parentVnode.data.scopedSlots) || emptyObject;\n\n    if (staticRenderFns && !vm._staticTrees) {\n      vm._staticTrees = [];\n    }\n    // set parent vnode. this allows render functions to have access\n    // to the data on the placeholder node.\n    vm.$vnode = _parentVnode;\n    // render self\n    var vnode;\n    try {\n      vnode = render.call(vm._renderProxy, vm.$createElement);\n    } catch (e) {\n      handleError(e, vm, \"render function\");\n      // return error render result,\n      // or previous vnode to prevent render error causing blank component\n      /* istanbul ignore else */\n      if (process.env.NODE_ENV !== 'production') {\n        vnode = vm.$options.renderError\n          ? vm.$options.renderError.call(vm._renderProxy, vm.$createElement, e)\n          : vm._vnode;\n      } else {\n        vnode = vm._vnode;\n      }\n    }\n    // return empty vnode in case the render function errored out\n    if (!(vnode instanceof VNode)) {\n      if (process.env.NODE_ENV !== 'production' && Array.isArray(vnode)) {\n        warn(\n          'Multiple root nodes returned from render function. Render function ' +\n          'should return a single root node.',\n          vm\n        );\n      }\n      vnode = createEmptyVNode();\n    }\n    // set parent\n    vnode.parent = _parentVnode;\n    return vnode\n  };\n\n  // internal render helpers.\n  // these are exposed on the instance prototype to reduce generated render\n  // code size.\n  Vue.prototype._o = markOnce;\n  Vue.prototype._n = toNumber;\n  Vue.prototype._s = _toString;\n  Vue.prototype._l = renderList;\n  Vue.prototype._t = renderSlot;\n  Vue.prototype._q = looseEqual;\n  Vue.prototype._i = looseIndexOf;\n  Vue.prototype._m = renderStatic;\n  Vue.prototype._f = resolveFilter;\n  Vue.prototype._k = checkKeyCodes;\n  Vue.prototype._b = bindObjectProps;\n  Vue.prototype._v = createTextVNode;\n  Vue.prototype._e = createEmptyVNode;\n  Vue.prototype._u = resolveScopedSlots;\n}\n\n/*  */\n\nfunction initProvide (vm) {\n  var provide = vm.$options.provide;\n  if (provide) {\n    vm._provided = typeof provide === 'function'\n      ? provide.call(vm)\n      : provide;\n  }\n}\n\nfunction initInjections (vm) {\n  var inject = vm.$options.inject;\n  if (inject) {\n    // inject is :any because flow is not smart enough to figure out cached\n    // isArray here\n    var isArray = Array.isArray(inject);\n    var keys = isArray\n      ? inject\n      : hasSymbol\n        ? Reflect.ownKeys(inject)\n        : Object.keys(inject);\n\n    var loop = function ( i ) {\n      var key = keys[i];\n      var provideKey = isArray ? key : inject[key];\n      var source = vm;\n      while (source) {\n        if (source._provided && provideKey in source._provided) {\n          /* istanbul ignore else */\n          if (process.env.NODE_ENV !== 'production') {\n            defineReactive$$1(vm, key, source._provided[provideKey], function () {\n              warn(\n                \"Avoid mutating an injected value directly since the changes will be \" +\n                \"overwritten whenever the provided component re-renders. \" +\n                \"injection being mutated: \\\"\" + key + \"\\\"\",\n                vm\n              );\n            });\n          } else {\n            defineReactive$$1(vm, key, source._provided[provideKey]);\n          }\n          break\n        }\n        source = source.$parent;\n      }\n    };\n\n    for (var i = 0; i < keys.length; i++) loop( i );\n  }\n}\n\n/*  */\n\nvar uid = 0;\n\nfunction initMixin (Vue) {\n  Vue.prototype._init = function (options) {\n    var vm = this;\n    // a uid\n    vm._uid = uid++;\n\n    var startTag, endTag;\n    /* istanbul ignore if */\n    if (process.env.NODE_ENV !== 'production' && config.performance && mark) {\n      startTag = \"vue-perf-init:\" + (vm._uid);\n      endTag = \"vue-perf-end:\" + (vm._uid);\n      mark(startTag);\n    }\n\n    // a flag to avoid this being observed\n    vm._isVue = true;\n    // merge options\n    if (options && options._isComponent) {\n      // optimize internal component instantiation\n      // since dynamic options merging is pretty slow, and none of the\n      // internal component options needs special treatment.\n      initInternalComponent(vm, options);\n    } else {\n      vm.$options = mergeOptions(\n        resolveConstructorOptions(vm.constructor),\n        options || {},\n        vm\n      );\n    }\n    /* istanbul ignore else */\n    if (process.env.NODE_ENV !== 'production') {\n      initProxy(vm);\n    } else {\n      vm._renderProxy = vm;\n    }\n    // expose real self\n    vm._self = vm;\n    initLifecycle(vm);\n    initEvents(vm);\n    initRender(vm);\n    callHook(vm, 'beforeCreate');\n    initInjections(vm); // resolve injections before data/props\n    initState(vm);\n    initProvide(vm); // resolve provide after data/props\n    callHook(vm, 'created');\n\n    /* istanbul ignore if */\n    if (process.env.NODE_ENV !== 'production' && config.performance && mark) {\n      vm._name = formatComponentName(vm, false);\n      mark(endTag);\n      measure(((vm._name) + \" init\"), startTag, endTag);\n    }\n\n    if (vm.$options.el) {\n      vm.$mount(vm.$options.el);\n    }\n  };\n}\n\nfunction initInternalComponent (vm, options) {\n  var opts = vm.$options = Object.create(vm.constructor.options);\n  // doing this because it's faster than dynamic enumeration.\n  opts.parent = options.parent;\n  opts.propsData = options.propsData;\n  opts._parentVnode = options._parentVnode;\n  opts._parentListeners = options._parentListeners;\n  opts._renderChildren = options._renderChildren;\n  opts._componentTag = options._componentTag;\n  opts._parentElm = options._parentElm;\n  opts._refElm = options._refElm;\n  if (options.render) {\n    opts.render = options.render;\n    opts.staticRenderFns = options.staticRenderFns;\n  }\n}\n\nfunction resolveConstructorOptions (Ctor) {\n  var options = Ctor.options;\n  if (Ctor.super) {\n    var superOptions = resolveConstructorOptions(Ctor.super);\n    var cachedSuperOptions = Ctor.superOptions;\n    if (superOptions !== cachedSuperOptions) {\n      // super option changed,\n      // need to resolve new options.\n      Ctor.superOptions = superOptions;\n      // check if there are any late-modified/attached options (#4976)\n      var modifiedOptions = resolveModifiedOptions(Ctor);\n      // update base extend options\n      if (modifiedOptions) {\n        extend(Ctor.extendOptions, modifiedOptions);\n      }\n      options = Ctor.options = mergeOptions(superOptions, Ctor.extendOptions);\n      if (options.name) {\n        options.components[options.name] = Ctor;\n      }\n    }\n  }\n  return options\n}\n\nfunction resolveModifiedOptions (Ctor) {\n  var modified;\n  var latest = Ctor.options;\n  var sealed = Ctor.sealedOptions;\n  for (var key in latest) {\n    if (latest[key] !== sealed[key]) {\n      if (!modified) { modified = {}; }\n      modified[key] = dedupe(latest[key], sealed[key]);\n    }\n  }\n  return modified\n}\n\nfunction dedupe (latest, sealed) {\n  // compare latest and sealed to ensure lifecycle hooks won't be duplicated\n  // between merges\n  if (Array.isArray(latest)) {\n    var res = [];\n    sealed = Array.isArray(sealed) ? sealed : [sealed];\n    for (var i = 0; i < latest.length; i++) {\n      if (sealed.indexOf(latest[i]) < 0) {\n        res.push(latest[i]);\n      }\n    }\n    return res\n  } else {\n    return latest\n  }\n}\n\nfunction Vue$3 (options) {\n  if (process.env.NODE_ENV !== 'production' &&\n    !(this instanceof Vue$3)) {\n    warn('Vue is a constructor and should be called with the `new` keyword');\n  }\n  this._init(options);\n}\n\ninitMixin(Vue$3);\nstateMixin(Vue$3);\neventsMixin(Vue$3);\nlifecycleMixin(Vue$3);\nrenderMixin(Vue$3);\n\n/*  */\n\nfunction initUse (Vue) {\n  Vue.use = function (plugin) {\n    /* istanbul ignore if */\n    if (plugin.installed) {\n      return\n    }\n    // additional parameters\n    var args = toArray(arguments, 1);\n    args.unshift(this);\n    if (typeof plugin.install === 'function') {\n      plugin.install.apply(plugin, args);\n    } else if (typeof plugin === 'function') {\n      plugin.apply(null, args);\n    }\n    plugin.installed = true;\n    return this\n  };\n}\n\n/*  */\n\nfunction initMixin$1 (Vue) {\n  Vue.mixin = function (mixin) {\n    this.options = mergeOptions(this.options, mixin);\n  };\n}\n\n/*  */\n\nfunction initExtend (Vue) {\n  /**\n   * Each instance constructor, including Vue, has a unique\n   * cid. This enables us to create wrapped \"child\n   * constructors\" for prototypal inheritance and cache them.\n   */\n  Vue.cid = 0;\n  var cid = 1;\n\n  /**\n   * Class inheritance\n   */\n  Vue.extend = function (extendOptions) {\n    extendOptions = extendOptions || {};\n    var Super = this;\n    var SuperId = Super.cid;\n    var cachedCtors = extendOptions._Ctor || (extendOptions._Ctor = {});\n    if (cachedCtors[SuperId]) {\n      return cachedCtors[SuperId]\n    }\n\n    var name = extendOptions.name || Super.options.name;\n    if (process.env.NODE_ENV !== 'production') {\n      if (!/^[a-zA-Z][\\w-]*$/.test(name)) {\n        warn(\n          'Invalid component name: \"' + name + '\". Component names ' +\n          'can only contain alphanumeric characters and the hyphen, ' +\n          'and must start with a letter.'\n        );\n      }\n    }\n\n    var Sub = function VueComponent (options) {\n      this._init(options);\n    };\n    Sub.prototype = Object.create(Super.prototype);\n    Sub.prototype.constructor = Sub;\n    Sub.cid = cid++;\n    Sub.options = mergeOptions(\n      Super.options,\n      extendOptions\n    );\n    Sub['super'] = Super;\n\n    // For props and computed properties, we define the proxy getters on\n    // the Vue instances at extension time, on the extended prototype. This\n    // avoids Object.defineProperty calls for each instance created.\n    if (Sub.options.props) {\n      initProps$1(Sub);\n    }\n    if (Sub.options.computed) {\n      initComputed$1(Sub);\n    }\n\n    // allow further extension/mixin/plugin usage\n    Sub.extend = Super.extend;\n    Sub.mixin = Super.mixin;\n    Sub.use = Super.use;\n\n    // create asset registers, so extended classes\n    // can have their private assets too.\n    config._assetTypes.forEach(function (type) {\n      Sub[type] = Super[type];\n    });\n    // enable recursive self-lookup\n    if (name) {\n      Sub.options.components[name] = Sub;\n    }\n\n    // keep a reference to the super options at extension time.\n    // later at instantiation we can check if Super's options have\n    // been updated.\n    Sub.superOptions = Super.options;\n    Sub.extendOptions = extendOptions;\n    Sub.sealedOptions = extend({}, Sub.options);\n\n    // cache constructor\n    cachedCtors[SuperId] = Sub;\n    return Sub\n  };\n}\n\nfunction initProps$1 (Comp) {\n  var props = Comp.options.props;\n  for (var key in props) {\n    proxy(Comp.prototype, \"_props\", key);\n  }\n}\n\nfunction initComputed$1 (Comp) {\n  var computed = Comp.options.computed;\n  for (var key in computed) {\n    defineComputed(Comp.prototype, key, computed[key]);\n  }\n}\n\n/*  */\n\nfunction initAssetRegisters (Vue) {\n  /**\n   * Create asset registration methods.\n   */\n  config._assetTypes.forEach(function (type) {\n    Vue[type] = function (\n      id,\n      definition\n    ) {\n      if (!definition) {\n        return this.options[type + 's'][id]\n      } else {\n        /* istanbul ignore if */\n        if (process.env.NODE_ENV !== 'production') {\n          if (type === 'component' && config.isReservedTag(id)) {\n            warn(\n              'Do not use built-in or reserved HTML elements as component ' +\n              'id: ' + id\n            );\n          }\n        }\n        if (type === 'component' && isPlainObject(definition)) {\n          definition.name = definition.name || id;\n          definition = this.options._base.extend(definition);\n        }\n        if (type === 'directive' && typeof definition === 'function') {\n          definition = { bind: definition, update: definition };\n        }\n        this.options[type + 's'][id] = definition;\n        return definition\n      }\n    };\n  });\n}\n\n/*  */\n\nvar patternTypes = [String, RegExp];\n\nfunction getComponentName (opts) {\n  return opts && (opts.Ctor.options.name || opts.tag)\n}\n\nfunction matches (pattern, name) {\n  if (typeof pattern === 'string') {\n    return pattern.split(',').indexOf(name) > -1\n  } else if (pattern instanceof RegExp) {\n    return pattern.test(name)\n  }\n  /* istanbul ignore next */\n  return false\n}\n\nfunction pruneCache (cache, filter) {\n  for (var key in cache) {\n    var cachedNode = cache[key];\n    if (cachedNode) {\n      var name = getComponentName(cachedNode.componentOptions);\n      if (name && !filter(name)) {\n        pruneCacheEntry(cachedNode);\n        cache[key] = null;\n      }\n    }\n  }\n}\n\nfunction pruneCacheEntry (vnode) {\n  if (vnode) {\n    if (!vnode.componentInstance._inactive) {\n      callHook(vnode.componentInstance, 'deactivated');\n    }\n    vnode.componentInstance.$destroy();\n  }\n}\n\nvar KeepAlive = {\n  name: 'keep-alive',\n  abstract: true,\n\n  props: {\n    include: patternTypes,\n    exclude: patternTypes\n  },\n\n  created: function created () {\n    this.cache = Object.create(null);\n  },\n\n  destroyed: function destroyed () {\n    var this$1 = this;\n\n    for (var key in this$1.cache) {\n      pruneCacheEntry(this$1.cache[key]);\n    }\n  },\n\n  watch: {\n    include: function include (val) {\n      pruneCache(this.cache, function (name) { return matches(val, name); });\n    },\n    exclude: function exclude (val) {\n      pruneCache(this.cache, function (name) { return !matches(val, name); });\n    }\n  },\n\n  render: function render () {\n    var vnode = getFirstComponentChild(this.$slots.default);\n    var componentOptions = vnode && vnode.componentOptions;\n    if (componentOptions) {\n      // check pattern\n      var name = getComponentName(componentOptions);\n      if (name && (\n        (this.include && !matches(this.include, name)) ||\n        (this.exclude && matches(this.exclude, name))\n      )) {\n        return vnode\n      }\n      var key = vnode.key == null\n        // same constructor may get registered as different local components\n        // so cid alone is not enough (#3269)\n        ? componentOptions.Ctor.cid + (componentOptions.tag ? (\"::\" + (componentOptions.tag)) : '')\n        : vnode.key;\n      if (this.cache[key]) {\n        vnode.componentInstance = this.cache[key].componentInstance;\n      } else {\n        this.cache[key] = vnode;\n      }\n      vnode.data.keepAlive = true;\n    }\n    return vnode\n  }\n};\n\nvar builtInComponents = {\n  KeepAlive: KeepAlive\n};\n\n/*  */\n\nfunction initGlobalAPI (Vue) {\n  // config\n  var configDef = {};\n  configDef.get = function () { return config; };\n  if (process.env.NODE_ENV !== 'production') {\n    configDef.set = function () {\n      warn(\n        'Do not replace the Vue.config object, set individual fields instead.'\n      );\n    };\n  }\n  Object.defineProperty(Vue, 'config', configDef);\n\n  // exposed util methods.\n  // NOTE: these are not considered part of the public API - avoid relying on\n  // them unless you are aware of the risk.\n  Vue.util = {\n    warn: warn,\n    extend: extend,\n    mergeOptions: mergeOptions,\n    defineReactive: defineReactive$$1\n  };\n\n  Vue.set = set;\n  Vue.delete = del;\n  Vue.nextTick = nextTick;\n\n  Vue.options = Object.create(null);\n  config._assetTypes.forEach(function (type) {\n    Vue.options[type + 's'] = Object.create(null);\n  });\n\n  // this is used to identify the \"base\" constructor to extend all plain-object\n  // components with in Weex's multi-instance scenarios.\n  Vue.options._base = Vue;\n\n  extend(Vue.options.components, builtInComponents);\n\n  initUse(Vue);\n  initMixin$1(Vue);\n  initExtend(Vue);\n  initAssetRegisters(Vue);\n}\n\ninitGlobalAPI(Vue$3);\n\nObject.defineProperty(Vue$3.prototype, '$isServer', {\n  get: isServerRendering\n});\n\nVue$3.version = '2.2.6';\n\n/*  */\n\n// attributes that should be using props for binding\nvar acceptValue = makeMap('input,textarea,option,select');\nvar mustUseProp = function (tag, type, attr) {\n  return (\n    (attr === 'value' && acceptValue(tag)) && type !== 'button' ||\n    (attr === 'selected' && tag === 'option') ||\n    (attr === 'checked' && tag === 'input') ||\n    (attr === 'muted' && tag === 'video')\n  )\n};\n\nvar isEnumeratedAttr = makeMap('contenteditable,draggable,spellcheck');\n\nvar isBooleanAttr = makeMap(\n  'allowfullscreen,async,autofocus,autoplay,checked,compact,controls,declare,' +\n  'default,defaultchecked,defaultmuted,defaultselected,defer,disabled,' +\n  'enabled,formnovalidate,hidden,indeterminate,inert,ismap,itemscope,loop,multiple,' +\n  'muted,nohref,noresize,noshade,novalidate,nowrap,open,pauseonexit,readonly,' +\n  'required,reversed,scoped,seamless,selected,sortable,translate,' +\n  'truespeed,typemustmatch,visible'\n);\n\nvar xlinkNS = 'http://www.w3.org/1999/xlink';\n\nvar isXlink = function (name) {\n  return name.charAt(5) === ':' && name.slice(0, 5) === 'xlink'\n};\n\nvar getXlinkProp = function (name) {\n  return isXlink(name) ? name.slice(6, name.length) : ''\n};\n\nvar isFalsyAttrValue = function (val) {\n  return val == null || val === false\n};\n\n/*  */\n\nfunction genClassForVnode (vnode) {\n  var data = vnode.data;\n  var parentNode = vnode;\n  var childNode = vnode;\n  while (childNode.componentInstance) {\n    childNode = childNode.componentInstance._vnode;\n    if (childNode.data) {\n      data = mergeClassData(childNode.data, data);\n    }\n  }\n  while ((parentNode = parentNode.parent)) {\n    if (parentNode.data) {\n      data = mergeClassData(data, parentNode.data);\n    }\n  }\n  return genClassFromData(data)\n}\n\nfunction mergeClassData (child, parent) {\n  return {\n    staticClass: concat(child.staticClass, parent.staticClass),\n    class: child.class\n      ? [child.class, parent.class]\n      : parent.class\n  }\n}\n\nfunction genClassFromData (data) {\n  var dynamicClass = data.class;\n  var staticClass = data.staticClass;\n  if (staticClass || dynamicClass) {\n    return concat(staticClass, stringifyClass(dynamicClass))\n  }\n  /* istanbul ignore next */\n  return ''\n}\n\nfunction concat (a, b) {\n  return a ? b ? (a + ' ' + b) : a : (b || '')\n}\n\nfunction stringifyClass (value) {\n  var res = '';\n  if (!value) {\n    return res\n  }\n  if (typeof value === 'string') {\n    return value\n  }\n  if (Array.isArray(value)) {\n    var stringified;\n    for (var i = 0, l = value.length; i < l; i++) {\n      if (value[i]) {\n        if ((stringified = stringifyClass(value[i]))) {\n          res += stringified + ' ';\n        }\n      }\n    }\n    return res.slice(0, -1)\n  }\n  if (isObject(value)) {\n    for (var key in value) {\n      if (value[key]) { res += key + ' '; }\n    }\n    return res.slice(0, -1)\n  }\n  /* istanbul ignore next */\n  return res\n}\n\n/*  */\n\nvar namespaceMap = {\n  svg: 'http://www.w3.org/2000/svg',\n  math: 'http://www.w3.org/1998/Math/MathML'\n};\n\nvar isHTMLTag = makeMap(\n  'html,body,base,head,link,meta,style,title,' +\n  'address,article,aside,footer,header,h1,h2,h3,h4,h5,h6,hgroup,nav,section,' +\n  'div,dd,dl,dt,figcaption,figure,hr,img,li,main,ol,p,pre,ul,' +\n  'a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,rtc,ruby,' +\n  's,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,' +\n  'embed,object,param,source,canvas,script,noscript,del,ins,' +\n  'caption,col,colgroup,table,thead,tbody,td,th,tr,' +\n  'button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,' +\n  'output,progress,select,textarea,' +\n  'details,dialog,menu,menuitem,summary,' +\n  'content,element,shadow,template'\n);\n\n// this map is intentionally selective, only covering SVG elements that may\n// contain child elements.\nvar isSVG = makeMap(\n  'svg,animate,circle,clippath,cursor,defs,desc,ellipse,filter,font-face,' +\n  'foreignObject,g,glyph,image,line,marker,mask,missing-glyph,path,pattern,' +\n  'polygon,polyline,rect,switch,symbol,text,textpath,tspan,use,view',\n  true\n);\n\nvar isPreTag = function (tag) { return tag === 'pre'; };\n\nvar isReservedTag = function (tag) {\n  return isHTMLTag(tag) || isSVG(tag)\n};\n\nfunction getTagNamespace (tag) {\n  if (isSVG(tag)) {\n    return 'svg'\n  }\n  // basic support for MathML\n  // note it doesn't support other MathML elements being component roots\n  if (tag === 'math') {\n    return 'math'\n  }\n}\n\nvar unknownElementCache = Object.create(null);\nfunction isUnknownElement (tag) {\n  /* istanbul ignore if */\n  if (!inBrowser) {\n    return true\n  }\n  if (isReservedTag(tag)) {\n    return false\n  }\n  tag = tag.toLowerCase();\n  /* istanbul ignore if */\n  if (unknownElementCache[tag] != null) {\n    return unknownElementCache[tag]\n  }\n  var el = document.createElement(tag);\n  if (tag.indexOf('-') > -1) {\n    // http://stackoverflow.com/a/28210364/1070244\n    return (unknownElementCache[tag] = (\n      el.constructor === window.HTMLUnknownElement ||\n      el.constructor === window.HTMLElement\n    ))\n  } else {\n    return (unknownElementCache[tag] = /HTMLUnknownElement/.test(el.toString()))\n  }\n}\n\n/*  */\n\n/**\n * Query an element selector if it's not an element already.\n */\nfunction query (el) {\n  if (typeof el === 'string') {\n    var selected = document.querySelector(el);\n    if (!selected) {\n      process.env.NODE_ENV !== 'production' && warn(\n        'Cannot find element: ' + el\n      );\n      return document.createElement('div')\n    }\n    return selected\n  } else {\n    return el\n  }\n}\n\n/*  */\n\nfunction createElement$1 (tagName, vnode) {\n  var elm = document.createElement(tagName);\n  if (tagName !== 'select') {\n    return elm\n  }\n  // false or null will remove the attribute but undefined will not\n  if (vnode.data && vnode.data.attrs && vnode.data.attrs.multiple !== undefined) {\n    elm.setAttribute('multiple', 'multiple');\n  }\n  return elm\n}\n\nfunction createElementNS (namespace, tagName) {\n  return document.createElementNS(namespaceMap[namespace], tagName)\n}\n\nfunction createTextNode (text) {\n  return document.createTextNode(text)\n}\n\nfunction createComment (text) {\n  return document.createComment(text)\n}\n\nfunction insertBefore (parentNode, newNode, referenceNode) {\n  parentNode.insertBefore(newNode, referenceNode);\n}\n\nfunction removeChild (node, child) {\n  node.removeChild(child);\n}\n\nfunction appendChild (node, child) {\n  node.appendChild(child);\n}\n\nfunction parentNode (node) {\n  return node.parentNode\n}\n\nfunction nextSibling (node) {\n  return node.nextSibling\n}\n\nfunction tagName (node) {\n  return node.tagName\n}\n\nfunction setTextContent (node, text) {\n  node.textContent = text;\n}\n\nfunction setAttribute (node, key, val) {\n  node.setAttribute(key, val);\n}\n\n\nvar nodeOps = Object.freeze({\n\tcreateElement: createElement$1,\n\tcreateElementNS: createElementNS,\n\tcreateTextNode: createTextNode,\n\tcreateComment: createComment,\n\tinsertBefore: insertBefore,\n\tremoveChild: removeChild,\n\tappendChild: appendChild,\n\tparentNode: parentNode,\n\tnextSibling: nextSibling,\n\ttagName: tagName,\n\tsetTextContent: setTextContent,\n\tsetAttribute: setAttribute\n});\n\n/*  */\n\nvar ref = {\n  create: function create (_, vnode) {\n    registerRef(vnode);\n  },\n  update: function update (oldVnode, vnode) {\n    if (oldVnode.data.ref !== vnode.data.ref) {\n      registerRef(oldVnode, true);\n      registerRef(vnode);\n    }\n  },\n  destroy: function destroy (vnode) {\n    registerRef(vnode, true);\n  }\n};\n\nfunction registerRef (vnode, isRemoval) {\n  var key = vnode.data.ref;\n  if (!key) { return }\n\n  var vm = vnode.context;\n  var ref = vnode.componentInstance || vnode.elm;\n  var refs = vm.$refs;\n  if (isRemoval) {\n    if (Array.isArray(refs[key])) {\n      remove(refs[key], ref);\n    } else if (refs[key] === ref) {\n      refs[key] = undefined;\n    }\n  } else {\n    if (vnode.data.refInFor) {\n      if (Array.isArray(refs[key]) && refs[key].indexOf(ref) < 0) {\n        refs[key].push(ref);\n      } else {\n        refs[key] = [ref];\n      }\n    } else {\n      refs[key] = ref;\n    }\n  }\n}\n\n/**\n * Virtual DOM patching algorithm based on Snabbdom by\n * Simon Friis Vindum (@paldepind)\n * Licensed under the MIT License\n * https://github.com/paldepind/snabbdom/blob/master/LICENSE\n *\n * modified by Evan You (@yyx990803)\n *\n\n/*\n * Not type-checking this because this file is perf-critical and the cost\n * of making flow understand it is not worth it.\n */\n\nvar emptyNode = new VNode('', {}, []);\n\nvar hooks = ['create', 'activate', 'update', 'remove', 'destroy'];\n\nfunction isUndef (v) {\n  return v === undefined || v === null\n}\n\nfunction isDef (v) {\n  return v !== undefined && v !== null\n}\n\nfunction isTrue (v) {\n  return v === true\n}\n\nfunction sameVnode (a, b) {\n  return (\n    a.key === b.key &&\n    a.tag === b.tag &&\n    a.isComment === b.isComment &&\n    isDef(a.data) === isDef(b.data) &&\n    sameInputType(a, b)\n  )\n}\n\n// Some browsers do not support dynamically changing type for <input>\n// so they need to be treated as different nodes\nfunction sameInputType (a, b) {\n  if (a.tag !== 'input') { return true }\n  var i;\n  var typeA = isDef(i = a.data) && isDef(i = i.attrs) && i.type;\n  var typeB = isDef(i = b.data) && isDef(i = i.attrs) && i.type;\n  return typeA === typeB\n}\n\nfunction createKeyToOldIdx (children, beginIdx, endIdx) {\n  var i, key;\n  var map = {};\n  for (i = beginIdx; i <= endIdx; ++i) {\n    key = children[i].key;\n    if (isDef(key)) { map[key] = i; }\n  }\n  return map\n}\n\nfunction createPatchFunction (backend) {\n  var i, j;\n  var cbs = {};\n\n  var modules = backend.modules;\n  var nodeOps = backend.nodeOps;\n\n  for (i = 0; i < hooks.length; ++i) {\n    cbs[hooks[i]] = [];\n    for (j = 0; j < modules.length; ++j) {\n      if (isDef(modules[j][hooks[i]])) {\n        cbs[hooks[i]].push(modules[j][hooks[i]]);\n      }\n    }\n  }\n\n  function emptyNodeAt (elm) {\n    return new VNode(nodeOps.tagName(elm).toLowerCase(), {}, [], undefined, elm)\n  }\n\n  function createRmCb (childElm, listeners) {\n    function remove$$1 () {\n      if (--remove$$1.listeners === 0) {\n        removeNode(childElm);\n      }\n    }\n    remove$$1.listeners = listeners;\n    return remove$$1\n  }\n\n  function removeNode (el) {\n    var parent = nodeOps.parentNode(el);\n    // element may have already been removed due to v-html / v-text\n    if (isDef(parent)) {\n      nodeOps.removeChild(parent, el);\n    }\n  }\n\n  var inPre = 0;\n  function createElm (vnode, insertedVnodeQueue, parentElm, refElm, nested) {\n    vnode.isRootInsert = !nested; // for transition enter check\n    if (createComponent(vnode, insertedVnodeQueue, parentElm, refElm)) {\n      return\n    }\n\n    var data = vnode.data;\n    var children = vnode.children;\n    var tag = vnode.tag;\n    if (isDef(tag)) {\n      if (process.env.NODE_ENV !== 'production') {\n        if (data && data.pre) {\n          inPre++;\n        }\n        if (\n          !inPre &&\n          !vnode.ns &&\n          !(config.ignoredElements.length && config.ignoredElements.indexOf(tag) > -1) &&\n          config.isUnknownElement(tag)\n        ) {\n          warn(\n            'Unknown custom element: <' + tag + '> - did you ' +\n            'register the component correctly? For recursive components, ' +\n            'make sure to provide the \"name\" option.',\n            vnode.context\n          );\n        }\n      }\n      vnode.elm = vnode.ns\n        ? nodeOps.createElementNS(vnode.ns, tag)\n        : nodeOps.createElement(tag, vnode);\n      setScope(vnode);\n\n      /* istanbul ignore if */\n      {\n        createChildren(vnode, children, insertedVnodeQueue);\n        if (isDef(data)) {\n          invokeCreateHooks(vnode, insertedVnodeQueue);\n        }\n        insert(parentElm, vnode.elm, refElm);\n      }\n\n      if (process.env.NODE_ENV !== 'production' && data && data.pre) {\n        inPre--;\n      }\n    } else if (isTrue(vnode.isComment)) {\n      vnode.elm = nodeOps.createComment(vnode.text);\n      insert(parentElm, vnode.elm, refElm);\n    } else {\n      vnode.elm = nodeOps.createTextNode(vnode.text);\n      insert(parentElm, vnode.elm, refElm);\n    }\n  }\n\n  function createComponent (vnode, insertedVnodeQueue, parentElm, refElm) {\n    var i = vnode.data;\n    if (isDef(i)) {\n      var isReactivated = isDef(vnode.componentInstance) && i.keepAlive;\n      if (isDef(i = i.hook) && isDef(i = i.init)) {\n        i(vnode, false /* hydrating */, parentElm, refElm);\n      }\n      // after calling the init hook, if the vnode is a child component\n      // it should've created a child instance and mounted it. the child\n      // component also has set the placeholder vnode's elm.\n      // in that case we can just return the element and be done.\n      if (isDef(vnode.componentInstance)) {\n        initComponent(vnode, insertedVnodeQueue);\n        if (isTrue(isReactivated)) {\n          reactivateComponent(vnode, insertedVnodeQueue, parentElm, refElm);\n        }\n        return true\n      }\n    }\n  }\n\n  function initComponent (vnode, insertedVnodeQueue) {\n    if (isDef(vnode.data.pendingInsert)) {\n      insertedVnodeQueue.push.apply(insertedVnodeQueue, vnode.data.pendingInsert);\n    }\n    vnode.elm = vnode.componentInstance.$el;\n    if (isPatchable(vnode)) {\n      invokeCreateHooks(vnode, insertedVnodeQueue);\n      setScope(vnode);\n    } else {\n      // empty component root.\n      // skip all element-related modules except for ref (#3455)\n      registerRef(vnode);\n      // make sure to invoke the insert hook\n      insertedVnodeQueue.push(vnode);\n    }\n  }\n\n  function reactivateComponent (vnode, insertedVnodeQueue, parentElm, refElm) {\n    var i;\n    // hack for #4339: a reactivated component with inner transition\n    // does not trigger because the inner node's created hooks are not called\n    // again. It's not ideal to involve module-specific logic in here but\n    // there doesn't seem to be a better way to do it.\n    var innerNode = vnode;\n    while (innerNode.componentInstance) {\n      innerNode = innerNode.componentInstance._vnode;\n      if (isDef(i = innerNode.data) && isDef(i = i.transition)) {\n        for (i = 0; i < cbs.activate.length; ++i) {\n          cbs.activate[i](emptyNode, innerNode);\n        }\n        insertedVnodeQueue.push(innerNode);\n        break\n      }\n    }\n    // unlike a newly created component,\n    // a reactivated keep-alive component doesn't insert itself\n    insert(parentElm, vnode.elm, refElm);\n  }\n\n  function insert (parent, elm, ref) {\n    if (isDef(parent)) {\n      if (isDef(ref)) {\n        nodeOps.insertBefore(parent, elm, ref);\n      } else {\n        nodeOps.appendChild(parent, elm);\n      }\n    }\n  }\n\n  function createChildren (vnode, children, insertedVnodeQueue) {\n    if (Array.isArray(children)) {\n      for (var i = 0; i < children.length; ++i) {\n        createElm(children[i], insertedVnodeQueue, vnode.elm, null, true);\n      }\n    } else if (isPrimitive(vnode.text)) {\n      nodeOps.appendChild(vnode.elm, nodeOps.createTextNode(vnode.text));\n    }\n  }\n\n  function isPatchable (vnode) {\n    while (vnode.componentInstance) {\n      vnode = vnode.componentInstance._vnode;\n    }\n    return isDef(vnode.tag)\n  }\n\n  function invokeCreateHooks (vnode, insertedVnodeQueue) {\n    for (var i$1 = 0; i$1 < cbs.create.length; ++i$1) {\n      cbs.create[i$1](emptyNode, vnode);\n    }\n    i = vnode.data.hook; // Reuse variable\n    if (isDef(i)) {\n      if (isDef(i.create)) { i.create(emptyNode, vnode); }\n      if (isDef(i.insert)) { insertedVnodeQueue.push(vnode); }\n    }\n  }\n\n  // set scope id attribute for scoped CSS.\n  // this is implemented as a special case to avoid the overhead\n  // of going through the normal attribute patching process.\n  function setScope (vnode) {\n    var i;\n    var ancestor = vnode;\n    while (ancestor) {\n      if (isDef(i = ancestor.context) && isDef(i = i.$options._scopeId)) {\n        nodeOps.setAttribute(vnode.elm, i, '');\n      }\n      ancestor = ancestor.parent;\n    }\n    // for slot content they should also get the scopeId from the host instance.\n    if (isDef(i = activeInstance) &&\n        i !== vnode.context &&\n        isDef(i = i.$options._scopeId)) {\n      nodeOps.setAttribute(vnode.elm, i, '');\n    }\n  }\n\n  function addVnodes (parentElm, refElm, vnodes, startIdx, endIdx, insertedVnodeQueue) {\n    for (; startIdx <= endIdx; ++startIdx) {\n      createElm(vnodes[startIdx], insertedVnodeQueue, parentElm, refElm);\n    }\n  }\n\n  function invokeDestroyHook (vnode) {\n    var i, j;\n    var data = vnode.data;\n    if (isDef(data)) {\n      if (isDef(i = data.hook) && isDef(i = i.destroy)) { i(vnode); }\n      for (i = 0; i < cbs.destroy.length; ++i) { cbs.destroy[i](vnode); }\n    }\n    if (isDef(i = vnode.children)) {\n      for (j = 0; j < vnode.children.length; ++j) {\n        invokeDestroyHook(vnode.children[j]);\n      }\n    }\n  }\n\n  function removeVnodes (parentElm, vnodes, startIdx, endIdx) {\n    for (; startIdx <= endIdx; ++startIdx) {\n      var ch = vnodes[startIdx];\n      if (isDef(ch)) {\n        if (isDef(ch.tag)) {\n          removeAndInvokeRemoveHook(ch);\n          invokeDestroyHook(ch);\n        } else { // Text node\n          removeNode(ch.elm);\n        }\n      }\n    }\n  }\n\n  function removeAndInvokeRemoveHook (vnode, rm) {\n    if (isDef(rm) || isDef(vnode.data)) {\n      var listeners = cbs.remove.length + 1;\n      if (isDef(rm)) {\n        // we have a recursively passed down rm callback\n        // increase the listeners count\n        rm.listeners += listeners;\n      } else {\n        // directly removing\n        rm = createRmCb(vnode.elm, listeners);\n      }\n      // recursively invoke hooks on child component root node\n      if (isDef(i = vnode.componentInstance) && isDef(i = i._vnode) && isDef(i.data)) {\n        removeAndInvokeRemoveHook(i, rm);\n      }\n      for (i = 0; i < cbs.remove.length; ++i) {\n        cbs.remove[i](vnode, rm);\n      }\n      if (isDef(i = vnode.data.hook) && isDef(i = i.remove)) {\n        i(vnode, rm);\n      } else {\n        rm();\n      }\n    } else {\n      removeNode(vnode.elm);\n    }\n  }\n\n  function updateChildren (parentElm, oldCh, newCh, insertedVnodeQueue, removeOnly) {\n    var oldStartIdx = 0;\n    var newStartIdx = 0;\n    var oldEndIdx = oldCh.length - 1;\n    var oldStartVnode = oldCh[0];\n    var oldEndVnode = oldCh[oldEndIdx];\n    var newEndIdx = newCh.length - 1;\n    var newStartVnode = newCh[0];\n    var newEndVnode = newCh[newEndIdx];\n    var oldKeyToIdx, idxInOld, elmToMove, refElm;\n\n    // removeOnly is a special flag used only by <transition-group>\n    // to ensure removed elements stay in correct relative positions\n    // during leaving transitions\n    var canMove = !removeOnly;\n\n    while (oldStartIdx <= oldEndIdx && newStartIdx <= newEndIdx) {\n      if (isUndef(oldStartVnode)) {\n        oldStartVnode = oldCh[++oldStartIdx]; // Vnode has been moved left\n      } else if (isUndef(oldEndVnode)) {\n        oldEndVnode = oldCh[--oldEndIdx];\n      } else if (sameVnode(oldStartVnode, newStartVnode)) {\n        patchVnode(oldStartVnode, newStartVnode, insertedVnodeQueue);\n        oldStartVnode = oldCh[++oldStartIdx];\n        newStartVnode = newCh[++newStartIdx];\n      } else if (sameVnode(oldEndVnode, newEndVnode)) {\n        patchVnode(oldEndVnode, newEndVnode, insertedVnodeQueue);\n        oldEndVnode = oldCh[--oldEndIdx];\n        newEndVnode = newCh[--newEndIdx];\n      } else if (sameVnode(oldStartVnode, newEndVnode)) { // Vnode moved right\n        patchVnode(oldStartVnode, newEndVnode, insertedVnodeQueue);\n        canMove && nodeOps.insertBefore(parentElm, oldStartVnode.elm, nodeOps.nextSibling(oldEndVnode.elm));\n        oldStartVnode = oldCh[++oldStartIdx];\n        newEndVnode = newCh[--newEndIdx];\n      } else if (sameVnode(oldEndVnode, newStartVnode)) { // Vnode moved left\n        patchVnode(oldEndVnode, newStartVnode, insertedVnodeQueue);\n        canMove && nodeOps.insertBefore(parentElm, oldEndVnode.elm, oldStartVnode.elm);\n        oldEndVnode = oldCh[--oldEndIdx];\n        newStartVnode = newCh[++newStartIdx];\n      } else {\n        if (isUndef(oldKeyToIdx)) { oldKeyToIdx = createKeyToOldIdx(oldCh, oldStartIdx, oldEndIdx); }\n        idxInOld = isDef(newStartVnode.key) ? oldKeyToIdx[newStartVnode.key] : null;\n        if (isUndef(idxInOld)) { // New element\n          createElm(newStartVnode, insertedVnodeQueue, parentElm, oldStartVnode.elm);\n          newStartVnode = newCh[++newStartIdx];\n        } else {\n          elmToMove = oldCh[idxInOld];\n          /* istanbul ignore if */\n          if (process.env.NODE_ENV !== 'production' && !elmToMove) {\n            warn(\n              'It seems there are duplicate keys that is causing an update error. ' +\n              'Make sure each v-for item has a unique key.'\n            );\n          }\n          if (sameVnode(elmToMove, newStartVnode)) {\n            patchVnode(elmToMove, newStartVnode, insertedVnodeQueue);\n            oldCh[idxInOld] = undefined;\n            canMove && nodeOps.insertBefore(parentElm, newStartVnode.elm, oldStartVnode.elm);\n            newStartVnode = newCh[++newStartIdx];\n          } else {\n            // same key but different element. treat as new element\n            createElm(newStartVnode, insertedVnodeQueue, parentElm, oldStartVnode.elm);\n            newStartVnode = newCh[++newStartIdx];\n          }\n        }\n      }\n    }\n    if (oldStartIdx > oldEndIdx) {\n      refElm = isUndef(newCh[newEndIdx + 1]) ? null : newCh[newEndIdx + 1].elm;\n      addVnodes(parentElm, refElm, newCh, newStartIdx, newEndIdx, insertedVnodeQueue);\n    } else if (newStartIdx > newEndIdx) {\n      removeVnodes(parentElm, oldCh, oldStartIdx, oldEndIdx);\n    }\n  }\n\n  function patchVnode (oldVnode, vnode, insertedVnodeQueue, removeOnly) {\n    if (oldVnode === vnode) {\n      return\n    }\n    // reuse element for static trees.\n    // note we only do this if the vnode is cloned -\n    // if the new node is not cloned it means the render functions have been\n    // reset by the hot-reload-api and we need to do a proper re-render.\n    if (isTrue(vnode.isStatic) &&\n        isTrue(oldVnode.isStatic) &&\n        vnode.key === oldVnode.key &&\n        (isTrue(vnode.isCloned) || isTrue(vnode.isOnce))) {\n      vnode.elm = oldVnode.elm;\n      vnode.componentInstance = oldVnode.componentInstance;\n      return\n    }\n    var i;\n    var data = vnode.data;\n    if (isDef(data) && isDef(i = data.hook) && isDef(i = i.prepatch)) {\n      i(oldVnode, vnode);\n    }\n    var elm = vnode.elm = oldVnode.elm;\n    var oldCh = oldVnode.children;\n    var ch = vnode.children;\n    if (isDef(data) && isPatchable(vnode)) {\n      for (i = 0; i < cbs.update.length; ++i) { cbs.update[i](oldVnode, vnode); }\n      if (isDef(i = data.hook) && isDef(i = i.update)) { i(oldVnode, vnode); }\n    }\n    if (isUndef(vnode.text)) {\n      if (isDef(oldCh) && isDef(ch)) {\n        if (oldCh !== ch) { updateChildren(elm, oldCh, ch, insertedVnodeQueue, removeOnly); }\n      } else if (isDef(ch)) {\n        if (isDef(oldVnode.text)) { nodeOps.setTextContent(elm, ''); }\n        addVnodes(elm, null, ch, 0, ch.length - 1, insertedVnodeQueue);\n      } else if (isDef(oldCh)) {\n        removeVnodes(elm, oldCh, 0, oldCh.length - 1);\n      } else if (isDef(oldVnode.text)) {\n        nodeOps.setTextContent(elm, '');\n      }\n    } else if (oldVnode.text !== vnode.text) {\n      nodeOps.setTextContent(elm, vnode.text);\n    }\n    if (isDef(data)) {\n      if (isDef(i = data.hook) && isDef(i = i.postpatch)) { i(oldVnode, vnode); }\n    }\n  }\n\n  function invokeInsertHook (vnode, queue, initial) {\n    // delay insert hooks for component root nodes, invoke them after the\n    // element is really inserted\n    if (isTrue(initial) && isDef(vnode.parent)) {\n      vnode.parent.data.pendingInsert = queue;\n    } else {\n      for (var i = 0; i < queue.length; ++i) {\n        queue[i].data.hook.insert(queue[i]);\n      }\n    }\n  }\n\n  var bailed = false;\n  // list of modules that can skip create hook during hydration because they\n  // are already rendered on the client or has no need for initialization\n  var isRenderedModule = makeMap('attrs,style,class,staticClass,staticStyle,key');\n\n  // Note: this is a browser-only function so we can assume elms are DOM nodes.\n  function hydrate (elm, vnode, insertedVnodeQueue) {\n    if (process.env.NODE_ENV !== 'production') {\n      if (!assertNodeMatch(elm, vnode)) {\n        return false\n      }\n    }\n    vnode.elm = elm;\n    var tag = vnode.tag;\n    var data = vnode.data;\n    var children = vnode.children;\n    if (isDef(data)) {\n      if (isDef(i = data.hook) && isDef(i = i.init)) { i(vnode, true /* hydrating */); }\n      if (isDef(i = vnode.componentInstance)) {\n        // child component. it should have hydrated its own tree.\n        initComponent(vnode, insertedVnodeQueue);\n        return true\n      }\n    }\n    if (isDef(tag)) {\n      if (isDef(children)) {\n        // empty element, allow client to pick up and populate children\n        if (!elm.hasChildNodes()) {\n          createChildren(vnode, children, insertedVnodeQueue);\n        } else {\n          var childrenMatch = true;\n          var childNode = elm.firstChild;\n          for (var i$1 = 0; i$1 < children.length; i$1++) {\n            if (!childNode || !hydrate(childNode, children[i$1], insertedVnodeQueue)) {\n              childrenMatch = false;\n              break\n            }\n            childNode = childNode.nextSibling;\n          }\n          // if childNode is not null, it means the actual childNodes list is\n          // longer than the virtual children list.\n          if (!childrenMatch || childNode) {\n            if (process.env.NODE_ENV !== 'production' &&\n                typeof console !== 'undefined' &&\n                !bailed) {\n              bailed = true;\n              console.warn('Parent: ', elm);\n              console.warn('Mismatching childNodes vs. VNodes: ', elm.childNodes, children);\n            }\n            return false\n          }\n        }\n      }\n      if (isDef(data)) {\n        for (var key in data) {\n          if (!isRenderedModule(key)) {\n            invokeCreateHooks(vnode, insertedVnodeQueue);\n            break\n          }\n        }\n      }\n    } else if (elm.data !== vnode.text) {\n      elm.data = vnode.text;\n    }\n    return true\n  }\n\n  function assertNodeMatch (node, vnode) {\n    if (isDef(vnode.tag)) {\n      return (\n        vnode.tag.indexOf('vue-component') === 0 ||\n        vnode.tag.toLowerCase() === (node.tagName && node.tagName.toLowerCase())\n      )\n    } else {\n      return node.nodeType === (vnode.isComment ? 8 : 3)\n    }\n  }\n\n  return function patch (oldVnode, vnode, hydrating, removeOnly, parentElm, refElm) {\n    if (isUndef(vnode)) {\n      if (isDef(oldVnode)) { invokeDestroyHook(oldVnode); }\n      return\n    }\n\n    var isInitialPatch = false;\n    var insertedVnodeQueue = [];\n\n    if (isUndef(oldVnode)) {\n      // empty mount (likely as component), create new root element\n      isInitialPatch = true;\n      createElm(vnode, insertedVnodeQueue, parentElm, refElm);\n    } else {\n      var isRealElement = isDef(oldVnode.nodeType);\n      if (!isRealElement && sameVnode(oldVnode, vnode)) {\n        // patch existing root node\n        patchVnode(oldVnode, vnode, insertedVnodeQueue, removeOnly);\n      } else {\n        if (isRealElement) {\n          // mounting to a real element\n          // check if this is server-rendered content and if we can perform\n          // a successful hydration.\n          if (oldVnode.nodeType === 1 && oldVnode.hasAttribute('server-rendered')) {\n            oldVnode.removeAttribute('server-rendered');\n            hydrating = true;\n          }\n          if (isTrue(hydrating)) {\n            if (hydrate(oldVnode, vnode, insertedVnodeQueue)) {\n              invokeInsertHook(vnode, insertedVnodeQueue, true);\n              return oldVnode\n            } else if (process.env.NODE_ENV !== 'production') {\n              warn(\n                'The client-side rendered virtual DOM tree is not matching ' +\n                'server-rendered content. This is likely caused by incorrect ' +\n                'HTML markup, for example nesting block-level elements inside ' +\n                '<p>, or missing <tbody>. Bailing hydration and performing ' +\n                'full client-side render.'\n              );\n            }\n          }\n          // either not server-rendered, or hydration failed.\n          // create an empty node and replace it\n          oldVnode = emptyNodeAt(oldVnode);\n        }\n        // replacing existing element\n        var oldElm = oldVnode.elm;\n        var parentElm$1 = nodeOps.parentNode(oldElm);\n        createElm(\n          vnode,\n          insertedVnodeQueue,\n          // extremely rare edge case: do not insert if old element is in a\n          // leaving transition. Only happens when combining transition +\n          // keep-alive + HOCs. (#4590)\n          oldElm._leaveCb ? null : parentElm$1,\n          nodeOps.nextSibling(oldElm)\n        );\n\n        if (isDef(vnode.parent)) {\n          // component root element replaced.\n          // update parent placeholder node element, recursively\n          var ancestor = vnode.parent;\n          while (ancestor) {\n            ancestor.elm = vnode.elm;\n            ancestor = ancestor.parent;\n          }\n          if (isPatchable(vnode)) {\n            for (var i = 0; i < cbs.create.length; ++i) {\n              cbs.create[i](emptyNode, vnode.parent);\n            }\n          }\n        }\n\n        if (isDef(parentElm$1)) {\n          removeVnodes(parentElm$1, [oldVnode], 0, 0);\n        } else if (isDef(oldVnode.tag)) {\n          invokeDestroyHook(oldVnode);\n        }\n      }\n    }\n\n    invokeInsertHook(vnode, insertedVnodeQueue, isInitialPatch);\n    return vnode.elm\n  }\n}\n\n/*  */\n\nvar directives = {\n  create: updateDirectives,\n  update: updateDirectives,\n  destroy: function unbindDirectives (vnode) {\n    updateDirectives(vnode, emptyNode);\n  }\n};\n\nfunction updateDirectives (oldVnode, vnode) {\n  if (oldVnode.data.directives || vnode.data.directives) {\n    _update(oldVnode, vnode);\n  }\n}\n\nfunction _update (oldVnode, vnode) {\n  var isCreate = oldVnode === emptyNode;\n  var isDestroy = vnode === emptyNode;\n  var oldDirs = normalizeDirectives$1(oldVnode.data.directives, oldVnode.context);\n  var newDirs = normalizeDirectives$1(vnode.data.directives, vnode.context);\n\n  var dirsWithInsert = [];\n  var dirsWithPostpatch = [];\n\n  var key, oldDir, dir;\n  for (key in newDirs) {\n    oldDir = oldDirs[key];\n    dir = newDirs[key];\n    if (!oldDir) {\n      // new directive, bind\n      callHook$1(dir, 'bind', vnode, oldVnode);\n      if (dir.def && dir.def.inserted) {\n        dirsWithInsert.push(dir);\n      }\n    } else {\n      // existing directive, update\n      dir.oldValue = oldDir.value;\n      callHook$1(dir, 'update', vnode, oldVnode);\n      if (dir.def && dir.def.componentUpdated) {\n        dirsWithPostpatch.push(dir);\n      }\n    }\n  }\n\n  if (dirsWithInsert.length) {\n    var callInsert = function () {\n      for (var i = 0; i < dirsWithInsert.length; i++) {\n        callHook$1(dirsWithInsert[i], 'inserted', vnode, oldVnode);\n      }\n    };\n    if (isCreate) {\n      mergeVNodeHook(vnode.data.hook || (vnode.data.hook = {}), 'insert', callInsert);\n    } else {\n      callInsert();\n    }\n  }\n\n  if (dirsWithPostpatch.length) {\n    mergeVNodeHook(vnode.data.hook || (vnode.data.hook = {}), 'postpatch', function () {\n      for (var i = 0; i < dirsWithPostpatch.length; i++) {\n        callHook$1(dirsWithPostpatch[i], 'componentUpdated', vnode, oldVnode);\n      }\n    });\n  }\n\n  if (!isCreate) {\n    for (key in oldDirs) {\n      if (!newDirs[key]) {\n        // no longer present, unbind\n        callHook$1(oldDirs[key], 'unbind', oldVnode, oldVnode, isDestroy);\n      }\n    }\n  }\n}\n\nvar emptyModifiers = Object.create(null);\n\nfunction normalizeDirectives$1 (\n  dirs,\n  vm\n) {\n  var res = Object.create(null);\n  if (!dirs) {\n    return res\n  }\n  var i, dir;\n  for (i = 0; i < dirs.length; i++) {\n    dir = dirs[i];\n    if (!dir.modifiers) {\n      dir.modifiers = emptyModifiers;\n    }\n    res[getRawDirName(dir)] = dir;\n    dir.def = resolveAsset(vm.$options, 'directives', dir.name, true);\n  }\n  return res\n}\n\nfunction getRawDirName (dir) {\n  return dir.rawName || ((dir.name) + \".\" + (Object.keys(dir.modifiers || {}).join('.')))\n}\n\nfunction callHook$1 (dir, hook, vnode, oldVnode, isDestroy) {\n  var fn = dir.def && dir.def[hook];\n  if (fn) {\n    fn(vnode.elm, dir, vnode, oldVnode, isDestroy);\n  }\n}\n\nvar baseModules = [\n  ref,\n  directives\n];\n\n/*  */\n\nfunction updateAttrs (oldVnode, vnode) {\n  if (!oldVnode.data.attrs && !vnode.data.attrs) {\n    return\n  }\n  var key, cur, old;\n  var elm = vnode.elm;\n  var oldAttrs = oldVnode.data.attrs || {};\n  var attrs = vnode.data.attrs || {};\n  // clone observed objects, as the user probably wants to mutate it\n  if (attrs.__ob__) {\n    attrs = vnode.data.attrs = extend({}, attrs);\n  }\n\n  for (key in attrs) {\n    cur = attrs[key];\n    old = oldAttrs[key];\n    if (old !== cur) {\n      setAttr(elm, key, cur);\n    }\n  }\n  // #4391: in IE9, setting type can reset value for input[type=radio]\n  /* istanbul ignore if */\n  if (isIE9 && attrs.value !== oldAttrs.value) {\n    setAttr(elm, 'value', attrs.value);\n  }\n  for (key in oldAttrs) {\n    if (attrs[key] == null) {\n      if (isXlink(key)) {\n        elm.removeAttributeNS(xlinkNS, getXlinkProp(key));\n      } else if (!isEnumeratedAttr(key)) {\n        elm.removeAttribute(key);\n      }\n    }\n  }\n}\n\nfunction setAttr (el, key, value) {\n  if (isBooleanAttr(key)) {\n    // set attribute for blank value\n    // e.g. <option disabled>Select one</option>\n    if (isFalsyAttrValue(value)) {\n      el.removeAttribute(key);\n    } else {\n      el.setAttribute(key, key);\n    }\n  } else if (isEnumeratedAttr(key)) {\n    el.setAttribute(key, isFalsyAttrValue(value) || value === 'false' ? 'false' : 'true');\n  } else if (isXlink(key)) {\n    if (isFalsyAttrValue(value)) {\n      el.removeAttributeNS(xlinkNS, getXlinkProp(key));\n    } else {\n      el.setAttributeNS(xlinkNS, key, value);\n    }\n  } else {\n    if (isFalsyAttrValue(value)) {\n      el.removeAttribute(key);\n    } else {\n      el.setAttribute(key, value);\n    }\n  }\n}\n\nvar attrs = {\n  create: updateAttrs,\n  update: updateAttrs\n};\n\n/*  */\n\nfunction updateClass (oldVnode, vnode) {\n  var el = vnode.elm;\n  var data = vnode.data;\n  var oldData = oldVnode.data;\n  if (!data.staticClass && !data.class &&\n      (!oldData || (!oldData.staticClass && !oldData.class))) {\n    return\n  }\n\n  var cls = genClassForVnode(vnode);\n\n  // handle transition classes\n  var transitionClass = el._transitionClasses;\n  if (transitionClass) {\n    cls = concat(cls, stringifyClass(transitionClass));\n  }\n\n  // set the class\n  if (cls !== el._prevClass) {\n    el.setAttribute('class', cls);\n    el._prevClass = cls;\n  }\n}\n\nvar klass = {\n  create: updateClass,\n  update: updateClass\n};\n\n/*  */\n\nvar validDivisionCharRE = /[\\w).+\\-_$\\]]/;\n\nfunction parseFilters (exp) {\n  var inSingle = false;\n  var inDouble = false;\n  var inTemplateString = false;\n  var inRegex = false;\n  var curly = 0;\n  var square = 0;\n  var paren = 0;\n  var lastFilterIndex = 0;\n  var c, prev, i, expression, filters;\n\n  for (i = 0; i < exp.length; i++) {\n    prev = c;\n    c = exp.charCodeAt(i);\n    if (inSingle) {\n      if (c === 0x27 && prev !== 0x5C) { inSingle = false; }\n    } else if (inDouble) {\n      if (c === 0x22 && prev !== 0x5C) { inDouble = false; }\n    } else if (inTemplateString) {\n      if (c === 0x60 && prev !== 0x5C) { inTemplateString = false; }\n    } else if (inRegex) {\n      if (c === 0x2f && prev !== 0x5C) { inRegex = false; }\n    } else if (\n      c === 0x7C && // pipe\n      exp.charCodeAt(i + 1) !== 0x7C &&\n      exp.charCodeAt(i - 1) !== 0x7C &&\n      !curly && !square && !paren\n    ) {\n      if (expression === undefined) {\n        // first filter, end of expression\n        lastFilterIndex = i + 1;\n        expression = exp.slice(0, i).trim();\n      } else {\n        pushFilter();\n      }\n    } else {\n      switch (c) {\n        case 0x22: inDouble = true; break         // \"\n        case 0x27: inSingle = true; break         // '\n        case 0x60: inTemplateString = true; break // `\n        case 0x28: paren++; break                 // (\n        case 0x29: paren--; break                 // )\n        case 0x5B: square++; break                // [\n        case 0x5D: square--; break                // ]\n        case 0x7B: curly++; break                 // {\n        case 0x7D: curly--; break                 // }\n      }\n      if (c === 0x2f) { // /\n        var j = i - 1;\n        var p = (void 0);\n        // find first non-whitespace prev char\n        for (; j >= 0; j--) {\n          p = exp.charAt(j);\n          if (p !== ' ') { break }\n        }\n        if (!p || !validDivisionCharRE.test(p)) {\n          inRegex = true;\n        }\n      }\n    }\n  }\n\n  if (expression === undefined) {\n    expression = exp.slice(0, i).trim();\n  } else if (lastFilterIndex !== 0) {\n    pushFilter();\n  }\n\n  function pushFilter () {\n    (filters || (filters = [])).push(exp.slice(lastFilterIndex, i).trim());\n    lastFilterIndex = i + 1;\n  }\n\n  if (filters) {\n    for (i = 0; i < filters.length; i++) {\n      expression = wrapFilter(expression, filters[i]);\n    }\n  }\n\n  return expression\n}\n\nfunction wrapFilter (exp, filter) {\n  var i = filter.indexOf('(');\n  if (i < 0) {\n    // _f: resolveFilter\n    return (\"_f(\\\"\" + filter + \"\\\")(\" + exp + \")\")\n  } else {\n    var name = filter.slice(0, i);\n    var args = filter.slice(i + 1);\n    return (\"_f(\\\"\" + name + \"\\\")(\" + exp + \",\" + args)\n  }\n}\n\n/*  */\n\nfunction baseWarn (msg) {\n  console.error((\"[Vue compiler]: \" + msg));\n}\n\nfunction pluckModuleFunction (\n  modules,\n  key\n) {\n  return modules\n    ? modules.map(function (m) { return m[key]; }).filter(function (_) { return _; })\n    : []\n}\n\nfunction addProp (el, name, value) {\n  (el.props || (el.props = [])).push({ name: name, value: value });\n}\n\nfunction addAttr (el, name, value) {\n  (el.attrs || (el.attrs = [])).push({ name: name, value: value });\n}\n\nfunction addDirective (\n  el,\n  name,\n  rawName,\n  value,\n  arg,\n  modifiers\n) {\n  (el.directives || (el.directives = [])).push({ name: name, rawName: rawName, value: value, arg: arg, modifiers: modifiers });\n}\n\nfunction addHandler (\n  el,\n  name,\n  value,\n  modifiers,\n  important\n) {\n  // check capture modifier\n  if (modifiers && modifiers.capture) {\n    delete modifiers.capture;\n    name = '!' + name; // mark the event as captured\n  }\n  if (modifiers && modifiers.once) {\n    delete modifiers.once;\n    name = '~' + name; // mark the event as once\n  }\n  var events;\n  if (modifiers && modifiers.native) {\n    delete modifiers.native;\n    events = el.nativeEvents || (el.nativeEvents = {});\n  } else {\n    events = el.events || (el.events = {});\n  }\n  var newHandler = { value: value, modifiers: modifiers };\n  var handlers = events[name];\n  /* istanbul ignore if */\n  if (Array.isArray(handlers)) {\n    important ? handlers.unshift(newHandler) : handlers.push(newHandler);\n  } else if (handlers) {\n    events[name] = important ? [newHandler, handlers] : [handlers, newHandler];\n  } else {\n    events[name] = newHandler;\n  }\n}\n\nfunction getBindingAttr (\n  el,\n  name,\n  getStatic\n) {\n  var dynamicValue =\n    getAndRemoveAttr(el, ':' + name) ||\n    getAndRemoveAttr(el, 'v-bind:' + name);\n  if (dynamicValue != null) {\n    return parseFilters(dynamicValue)\n  } else if (getStatic !== false) {\n    var staticValue = getAndRemoveAttr(el, name);\n    if (staticValue != null) {\n      return JSON.stringify(staticValue)\n    }\n  }\n}\n\nfunction getAndRemoveAttr (el, name) {\n  var val;\n  if ((val = el.attrsMap[name]) != null) {\n    var list = el.attrsList;\n    for (var i = 0, l = list.length; i < l; i++) {\n      if (list[i].name === name) {\n        list.splice(i, 1);\n        break\n      }\n    }\n  }\n  return val\n}\n\n/*  */\n\n/**\n * Cross-platform code generation for component v-model\n */\nfunction genComponentModel (\n  el,\n  value,\n  modifiers\n) {\n  var ref = modifiers || {};\n  var number = ref.number;\n  var trim = ref.trim;\n\n  var baseValueExpression = '$$v';\n  var valueExpression = baseValueExpression;\n  if (trim) {\n    valueExpression =\n      \"(typeof \" + baseValueExpression + \" === 'string'\" +\n        \"? \" + baseValueExpression + \".trim()\" +\n        \": \" + baseValueExpression + \")\";\n  }\n  if (number) {\n    valueExpression = \"_n(\" + valueExpression + \")\";\n  }\n  var assignment = genAssignmentCode(value, valueExpression);\n\n  el.model = {\n    value: (\"(\" + value + \")\"),\n    expression: (\"\\\"\" + value + \"\\\"\"),\n    callback: (\"function (\" + baseValueExpression + \") {\" + assignment + \"}\")\n  };\n}\n\n/**\n * Cross-platform codegen helper for generating v-model value assignment code.\n */\nfunction genAssignmentCode (\n  value,\n  assignment\n) {\n  var modelRs = parseModel(value);\n  if (modelRs.idx === null) {\n    return (value + \"=\" + assignment)\n  } else {\n    return \"var $$exp = \" + (modelRs.exp) + \", $$idx = \" + (modelRs.idx) + \";\" +\n      \"if (!Array.isArray($$exp)){\" +\n        value + \"=\" + assignment + \"}\" +\n      \"else{$$exp.splice($$idx, 1, \" + assignment + \")}\"\n  }\n}\n\n/**\n * parse directive model to do the array update transform. a[idx] = val => $$a.splice($$idx, 1, val)\n *\n * for loop possible cases:\n *\n * - test\n * - test[idx]\n * - test[test1[idx]]\n * - test[\"a\"][idx]\n * - xxx.test[a[a].test1[idx]]\n * - test.xxx.a[\"asa\"][test1[idx]]\n *\n */\n\nvar len;\nvar str;\nvar chr;\nvar index$1;\nvar expressionPos;\nvar expressionEndPos;\n\nfunction parseModel (val) {\n  str = val;\n  len = str.length;\n  index$1 = expressionPos = expressionEndPos = 0;\n\n  if (val.indexOf('[') < 0 || val.lastIndexOf(']') < len - 1) {\n    return {\n      exp: val,\n      idx: null\n    }\n  }\n\n  while (!eof()) {\n    chr = next();\n    /* istanbul ignore if */\n    if (isStringStart(chr)) {\n      parseString(chr);\n    } else if (chr === 0x5B) {\n      parseBracket(chr);\n    }\n  }\n\n  return {\n    exp: val.substring(0, expressionPos),\n    idx: val.substring(expressionPos + 1, expressionEndPos)\n  }\n}\n\nfunction next () {\n  return str.charCodeAt(++index$1)\n}\n\nfunction eof () {\n  return index$1 >= len\n}\n\nfunction isStringStart (chr) {\n  return chr === 0x22 || chr === 0x27\n}\n\nfunction parseBracket (chr) {\n  var inBracket = 1;\n  expressionPos = index$1;\n  while (!eof()) {\n    chr = next();\n    if (isStringStart(chr)) {\n      parseString(chr);\n      continue\n    }\n    if (chr === 0x5B) { inBracket++; }\n    if (chr === 0x5D) { inBracket--; }\n    if (inBracket === 0) {\n      expressionEndPos = index$1;\n      break\n    }\n  }\n}\n\nfunction parseString (chr) {\n  var stringQuote = chr;\n  while (!eof()) {\n    chr = next();\n    if (chr === stringQuote) {\n      break\n    }\n  }\n}\n\n/*  */\n\nvar warn$1;\n\n// in some cases, the event used has to be determined at runtime\n// so we used some reserved tokens during compile.\nvar RANGE_TOKEN = '__r';\nvar CHECKBOX_RADIO_TOKEN = '__c';\n\nfunction model (\n  el,\n  dir,\n  _warn\n) {\n  warn$1 = _warn;\n  var value = dir.value;\n  var modifiers = dir.modifiers;\n  var tag = el.tag;\n  var type = el.attrsMap.type;\n\n  if (process.env.NODE_ENV !== 'production') {\n    var dynamicType = el.attrsMap['v-bind:type'] || el.attrsMap[':type'];\n    if (tag === 'input' && dynamicType) {\n      warn$1(\n        \"<input :type=\\\"\" + dynamicType + \"\\\" v-model=\\\"\" + value + \"\\\">:\\n\" +\n        \"v-model does not support dynamic input types. Use v-if branches instead.\"\n      );\n    }\n    // inputs with type=\"file\" are read only and setting the input's\n    // value will throw an error.\n    if (tag === 'input' && type === 'file') {\n      warn$1(\n        \"<\" + (el.tag) + \" v-model=\\\"\" + value + \"\\\" type=\\\"file\\\">:\\n\" +\n        \"File inputs are read only. Use a v-on:change listener instead.\"\n      );\n    }\n  }\n\n  if (tag === 'select') {\n    genSelect(el, value, modifiers);\n  } else if (tag === 'input' && type === 'checkbox') {\n    genCheckboxModel(el, value, modifiers);\n  } else if (tag === 'input' && type === 'radio') {\n    genRadioModel(el, value, modifiers);\n  } else if (tag === 'input' || tag === 'textarea') {\n    genDefaultModel(el, value, modifiers);\n  } else if (!config.isReservedTag(tag)) {\n    genComponentModel(el, value, modifiers);\n    // component v-model doesn't need extra runtime\n    return false\n  } else if (process.env.NODE_ENV !== 'production') {\n    warn$1(\n      \"<\" + (el.tag) + \" v-model=\\\"\" + value + \"\\\">: \" +\n      \"v-model is not supported on this element type. \" +\n      'If you are working with contenteditable, it\\'s recommended to ' +\n      'wrap a library dedicated for that purpose inside a custom component.'\n    );\n  }\n\n  // ensure runtime directive metadata\n  return true\n}\n\nfunction genCheckboxModel (\n  el,\n  value,\n  modifiers\n) {\n  var number = modifiers && modifiers.number;\n  var valueBinding = getBindingAttr(el, 'value') || 'null';\n  var trueValueBinding = getBindingAttr(el, 'true-value') || 'true';\n  var falseValueBinding = getBindingAttr(el, 'false-value') || 'false';\n  addProp(el, 'checked',\n    \"Array.isArray(\" + value + \")\" +\n      \"?_i(\" + value + \",\" + valueBinding + \")>-1\" + (\n        trueValueBinding === 'true'\n          ? (\":(\" + value + \")\")\n          : (\":_q(\" + value + \",\" + trueValueBinding + \")\")\n      )\n  );\n  addHandler(el, CHECKBOX_RADIO_TOKEN,\n    \"var $$a=\" + value + \",\" +\n        '$$el=$event.target,' +\n        \"$$c=$$el.checked?(\" + trueValueBinding + \"):(\" + falseValueBinding + \");\" +\n    'if(Array.isArray($$a)){' +\n      \"var $$v=\" + (number ? '_n(' + valueBinding + ')' : valueBinding) + \",\" +\n          '$$i=_i($$a,$$v);' +\n      \"if($$c){$$i<0&&(\" + value + \"=$$a.concat($$v))}\" +\n      \"else{$$i>-1&&(\" + value + \"=$$a.slice(0,$$i).concat($$a.slice($$i+1)))}\" +\n    \"}else{\" + value + \"=$$c}\",\n    null, true\n  );\n}\n\nfunction genRadioModel (\n    el,\n    value,\n    modifiers\n) {\n  var number = modifiers && modifiers.number;\n  var valueBinding = getBindingAttr(el, 'value') || 'null';\n  valueBinding = number ? (\"_n(\" + valueBinding + \")\") : valueBinding;\n  addProp(el, 'checked', (\"_q(\" + value + \",\" + valueBinding + \")\"));\n  addHandler(el, CHECKBOX_RADIO_TOKEN, genAssignmentCode(value, valueBinding), null, true);\n}\n\nfunction genSelect (\n    el,\n    value,\n    modifiers\n) {\n  var number = modifiers && modifiers.number;\n  var selectedVal = \"Array.prototype.filter\" +\n    \".call($event.target.options,function(o){return o.selected})\" +\n    \".map(function(o){var val = \\\"_value\\\" in o ? o._value : o.value;\" +\n    \"return \" + (number ? '_n(val)' : 'val') + \"})\";\n\n  var assignment = '$event.target.multiple ? $$selectedVal : $$selectedVal[0]';\n  var code = \"var $$selectedVal = \" + selectedVal + \";\";\n  code = code + \" \" + (genAssignmentCode(value, assignment));\n  addHandler(el, 'change', code, null, true);\n}\n\nfunction genDefaultModel (\n  el,\n  value,\n  modifiers\n) {\n  var type = el.attrsMap.type;\n  var ref = modifiers || {};\n  var lazy = ref.lazy;\n  var number = ref.number;\n  var trim = ref.trim;\n  var needCompositionGuard = !lazy && type !== 'range';\n  var event = lazy\n    ? 'change'\n    : type === 'range'\n      ? RANGE_TOKEN\n      : 'input';\n\n  var valueExpression = '$event.target.value';\n  if (trim) {\n    valueExpression = \"$event.target.value.trim()\";\n  }\n  if (number) {\n    valueExpression = \"_n(\" + valueExpression + \")\";\n  }\n\n  var code = genAssignmentCode(value, valueExpression);\n  if (needCompositionGuard) {\n    code = \"if($event.target.composing)return;\" + code;\n  }\n\n  addProp(el, 'value', (\"(\" + value + \")\"));\n  addHandler(el, event, code, null, true);\n  if (trim || number || type === 'number') {\n    addHandler(el, 'blur', '$forceUpdate()');\n  }\n}\n\n/*  */\n\n// normalize v-model event tokens that can only be determined at runtime.\n// it's important to place the event as the first in the array because\n// the whole point is ensuring the v-model callback gets called before\n// user-attached handlers.\nfunction normalizeEvents (on) {\n  var event;\n  /* istanbul ignore if */\n  if (on[RANGE_TOKEN]) {\n    // IE input[type=range] only supports `change` event\n    event = isIE ? 'change' : 'input';\n    on[event] = [].concat(on[RANGE_TOKEN], on[event] || []);\n    delete on[RANGE_TOKEN];\n  }\n  if (on[CHECKBOX_RADIO_TOKEN]) {\n    // Chrome fires microtasks in between click/change, leads to #4521\n    event = isChrome ? 'click' : 'change';\n    on[event] = [].concat(on[CHECKBOX_RADIO_TOKEN], on[event] || []);\n    delete on[CHECKBOX_RADIO_TOKEN];\n  }\n}\n\nvar target$1;\n\nfunction add$1 (\n  event,\n  handler,\n  once,\n  capture\n) {\n  if (once) {\n    var oldHandler = handler;\n    var _target = target$1; // save current target element in closure\n    handler = function (ev) {\n      var res = arguments.length === 1\n        ? oldHandler(ev)\n        : oldHandler.apply(null, arguments);\n      if (res !== null) {\n        remove$2(event, handler, capture, _target);\n      }\n    };\n  }\n  target$1.addEventListener(event, handler, capture);\n}\n\nfunction remove$2 (\n  event,\n  handler,\n  capture,\n  _target\n) {\n  (_target || target$1).removeEventListener(event, handler, capture);\n}\n\nfunction updateDOMListeners (oldVnode, vnode) {\n  if (!oldVnode.data.on && !vnode.data.on) {\n    return\n  }\n  var on = vnode.data.on || {};\n  var oldOn = oldVnode.data.on || {};\n  target$1 = vnode.elm;\n  normalizeEvents(on);\n  updateListeners(on, oldOn, add$1, remove$2, vnode.context);\n}\n\nvar events = {\n  create: updateDOMListeners,\n  update: updateDOMListeners\n};\n\n/*  */\n\nfunction updateDOMProps (oldVnode, vnode) {\n  if (!oldVnode.data.domProps && !vnode.data.domProps) {\n    return\n  }\n  var key, cur;\n  var elm = vnode.elm;\n  var oldProps = oldVnode.data.domProps || {};\n  var props = vnode.data.domProps || {};\n  // clone observed objects, as the user probably wants to mutate it\n  if (props.__ob__) {\n    props = vnode.data.domProps = extend({}, props);\n  }\n\n  for (key in oldProps) {\n    if (props[key] == null) {\n      elm[key] = '';\n    }\n  }\n  for (key in props) {\n    cur = props[key];\n    // ignore children if the node has textContent or innerHTML,\n    // as these will throw away existing DOM nodes and cause removal errors\n    // on subsequent patches (#3360)\n    if (key === 'textContent' || key === 'innerHTML') {\n      if (vnode.children) { vnode.children.length = 0; }\n      if (cur === oldProps[key]) { continue }\n    }\n\n    if (key === 'value') {\n      // store value as _value as well since\n      // non-string values will be stringified\n      elm._value = cur;\n      // avoid resetting cursor position when value is the same\n      var strCur = cur == null ? '' : String(cur);\n      if (shouldUpdateValue(elm, vnode, strCur)) {\n        elm.value = strCur;\n      }\n    } else {\n      elm[key] = cur;\n    }\n  }\n}\n\n// check platforms/web/util/attrs.js acceptValue\n\n\nfunction shouldUpdateValue (\n  elm,\n  vnode,\n  checkVal\n) {\n  return (!elm.composing && (\n    vnode.tag === 'option' ||\n    isDirty(elm, checkVal) ||\n    isInputChanged(elm, checkVal)\n  ))\n}\n\nfunction isDirty (elm, checkVal) {\n  // return true when textbox (.number and .trim) loses focus and its value is not equal to the updated value\n  return document.activeElement !== elm && elm.value !== checkVal\n}\n\nfunction isInputChanged (elm, newVal) {\n  var value = elm.value;\n  var modifiers = elm._vModifiers; // injected by v-model runtime\n  if ((modifiers && modifiers.number) || elm.type === 'number') {\n    return toNumber(value) !== toNumber(newVal)\n  }\n  if (modifiers && modifiers.trim) {\n    return value.trim() !== newVal.trim()\n  }\n  return value !== newVal\n}\n\nvar domProps = {\n  create: updateDOMProps,\n  update: updateDOMProps\n};\n\n/*  */\n\nvar parseStyleText = cached(function (cssText) {\n  var res = {};\n  var listDelimiter = /;(?![^(]*\\))/g;\n  var propertyDelimiter = /:(.+)/;\n  cssText.split(listDelimiter).forEach(function (item) {\n    if (item) {\n      var tmp = item.split(propertyDelimiter);\n      tmp.length > 1 && (res[tmp[0].trim()] = tmp[1].trim());\n    }\n  });\n  return res\n});\n\n// merge static and dynamic style data on the same vnode\nfunction normalizeStyleData (data) {\n  var style = normalizeStyleBinding(data.style);\n  // static style is pre-processed into an object during compilation\n  // and is always a fresh object, so it's safe to merge into it\n  return data.staticStyle\n    ? extend(data.staticStyle, style)\n    : style\n}\n\n// normalize possible array / string values into Object\nfunction normalizeStyleBinding (bindingStyle) {\n  if (Array.isArray(bindingStyle)) {\n    return toObject(bindingStyle)\n  }\n  if (typeof bindingStyle === 'string') {\n    return parseStyleText(bindingStyle)\n  }\n  return bindingStyle\n}\n\n/**\n * parent component style should be after child's\n * so that parent component's style could override it\n */\nfunction getStyle (vnode, checkChild) {\n  var res = {};\n  var styleData;\n\n  if (checkChild) {\n    var childNode = vnode;\n    while (childNode.componentInstance) {\n      childNode = childNode.componentInstance._vnode;\n      if (childNode.data && (styleData = normalizeStyleData(childNode.data))) {\n        extend(res, styleData);\n      }\n    }\n  }\n\n  if ((styleData = normalizeStyleData(vnode.data))) {\n    extend(res, styleData);\n  }\n\n  var parentNode = vnode;\n  while ((parentNode = parentNode.parent)) {\n    if (parentNode.data && (styleData = normalizeStyleData(parentNode.data))) {\n      extend(res, styleData);\n    }\n  }\n  return res\n}\n\n/*  */\n\nvar cssVarRE = /^--/;\nvar importantRE = /\\s*!important$/;\nvar setProp = function (el, name, val) {\n  /* istanbul ignore if */\n  if (cssVarRE.test(name)) {\n    el.style.setProperty(name, val);\n  } else if (importantRE.test(val)) {\n    el.style.setProperty(name, val.replace(importantRE, ''), 'important');\n  } else {\n    el.style[normalize(name)] = val;\n  }\n};\n\nvar prefixes = ['Webkit', 'Moz', 'ms'];\n\nvar testEl;\nvar normalize = cached(function (prop) {\n  testEl = testEl || document.createElement('div');\n  prop = camelize(prop);\n  if (prop !== 'filter' && (prop in testEl.style)) {\n    return prop\n  }\n  var upper = prop.charAt(0).toUpperCase() + prop.slice(1);\n  for (var i = 0; i < prefixes.length; i++) {\n    var prefixed = prefixes[i] + upper;\n    if (prefixed in testEl.style) {\n      return prefixed\n    }\n  }\n});\n\nfunction updateStyle (oldVnode, vnode) {\n  var data = vnode.data;\n  var oldData = oldVnode.data;\n\n  if (!data.staticStyle && !data.style &&\n      !oldData.staticStyle && !oldData.style) {\n    return\n  }\n\n  var cur, name;\n  var el = vnode.elm;\n  var oldStaticStyle = oldVnode.data.staticStyle;\n  var oldStyleBinding = oldVnode.data.style || {};\n\n  // if static style exists, stylebinding already merged into it when doing normalizeStyleData\n  var oldStyle = oldStaticStyle || oldStyleBinding;\n\n  var style = normalizeStyleBinding(vnode.data.style) || {};\n\n  vnode.data.style = style.__ob__ ? extend({}, style) : style;\n\n  var newStyle = getStyle(vnode, true);\n\n  for (name in oldStyle) {\n    if (newStyle[name] == null) {\n      setProp(el, name, '');\n    }\n  }\n  for (name in newStyle) {\n    cur = newStyle[name];\n    if (cur !== oldStyle[name]) {\n      // ie9 setting to null has no effect, must use empty string\n      setProp(el, name, cur == null ? '' : cur);\n    }\n  }\n}\n\nvar style = {\n  create: updateStyle,\n  update: updateStyle\n};\n\n/*  */\n\n/**\n * Add class with compatibility for SVG since classList is not supported on\n * SVG elements in IE\n */\nfunction addClass (el, cls) {\n  /* istanbul ignore if */\n  if (!cls || !(cls = cls.trim())) {\n    return\n  }\n\n  /* istanbul ignore else */\n  if (el.classList) {\n    if (cls.indexOf(' ') > -1) {\n      cls.split(/\\s+/).forEach(function (c) { return el.classList.add(c); });\n    } else {\n      el.classList.add(cls);\n    }\n  } else {\n    var cur = \" \" + (el.getAttribute('class') || '') + \" \";\n    if (cur.indexOf(' ' + cls + ' ') < 0) {\n      el.setAttribute('class', (cur + cls).trim());\n    }\n  }\n}\n\n/**\n * Remove class with compatibility for SVG since classList is not supported on\n * SVG elements in IE\n */\nfunction removeClass (el, cls) {\n  /* istanbul ignore if */\n  if (!cls || !(cls = cls.trim())) {\n    return\n  }\n\n  /* istanbul ignore else */\n  if (el.classList) {\n    if (cls.indexOf(' ') > -1) {\n      cls.split(/\\s+/).forEach(function (c) { return el.classList.remove(c); });\n    } else {\n      el.classList.remove(cls);\n    }\n  } else {\n    var cur = \" \" + (el.getAttribute('class') || '') + \" \";\n    var tar = ' ' + cls + ' ';\n    while (cur.indexOf(tar) >= 0) {\n      cur = cur.replace(tar, ' ');\n    }\n    el.setAttribute('class', cur.trim());\n  }\n}\n\n/*  */\n\nfunction resolveTransition (def$$1) {\n  if (!def$$1) {\n    return\n  }\n  /* istanbul ignore else */\n  if (typeof def$$1 === 'object') {\n    var res = {};\n    if (def$$1.css !== false) {\n      extend(res, autoCssTransition(def$$1.name || 'v'));\n    }\n    extend(res, def$$1);\n    return res\n  } else if (typeof def$$1 === 'string') {\n    return autoCssTransition(def$$1)\n  }\n}\n\nvar autoCssTransition = cached(function (name) {\n  return {\n    enterClass: (name + \"-enter\"),\n    enterToClass: (name + \"-enter-to\"),\n    enterActiveClass: (name + \"-enter-active\"),\n    leaveClass: (name + \"-leave\"),\n    leaveToClass: (name + \"-leave-to\"),\n    leaveActiveClass: (name + \"-leave-active\")\n  }\n});\n\nvar hasTransition = inBrowser && !isIE9;\nvar TRANSITION = 'transition';\nvar ANIMATION = 'animation';\n\n// Transition property/event sniffing\nvar transitionProp = 'transition';\nvar transitionEndEvent = 'transitionend';\nvar animationProp = 'animation';\nvar animationEndEvent = 'animationend';\nif (hasTransition) {\n  /* istanbul ignore if */\n  if (window.ontransitionend === undefined &&\n    window.onwebkittransitionend !== undefined) {\n    transitionProp = 'WebkitTransition';\n    transitionEndEvent = 'webkitTransitionEnd';\n  }\n  if (window.onanimationend === undefined &&\n    window.onwebkitanimationend !== undefined) {\n    animationProp = 'WebkitAnimation';\n    animationEndEvent = 'webkitAnimationEnd';\n  }\n}\n\n// binding to window is necessary to make hot reload work in IE in strict mode\nvar raf = inBrowser && window.requestAnimationFrame\n  ? window.requestAnimationFrame.bind(window)\n  : setTimeout;\n\nfunction nextFrame (fn) {\n  raf(function () {\n    raf(fn);\n  });\n}\n\nfunction addTransitionClass (el, cls) {\n  (el._transitionClasses || (el._transitionClasses = [])).push(cls);\n  addClass(el, cls);\n}\n\nfunction removeTransitionClass (el, cls) {\n  if (el._transitionClasses) {\n    remove(el._transitionClasses, cls);\n  }\n  removeClass(el, cls);\n}\n\nfunction whenTransitionEnds (\n  el,\n  expectedType,\n  cb\n) {\n  var ref = getTransitionInfo(el, expectedType);\n  var type = ref.type;\n  var timeout = ref.timeout;\n  var propCount = ref.propCount;\n  if (!type) { return cb() }\n  var event = type === TRANSITION ? transitionEndEvent : animationEndEvent;\n  var ended = 0;\n  var end = function () {\n    el.removeEventListener(event, onEnd);\n    cb();\n  };\n  var onEnd = function (e) {\n    if (e.target === el) {\n      if (++ended >= propCount) {\n        end();\n      }\n    }\n  };\n  setTimeout(function () {\n    if (ended < propCount) {\n      end();\n    }\n  }, timeout + 1);\n  el.addEventListener(event, onEnd);\n}\n\nvar transformRE = /\\b(transform|all)(,|$)/;\n\nfunction getTransitionInfo (el, expectedType) {\n  var styles = window.getComputedStyle(el);\n  var transitionDelays = styles[transitionProp + 'Delay'].split(', ');\n  var transitionDurations = styles[transitionProp + 'Duration'].split(', ');\n  var transitionTimeout = getTimeout(transitionDelays, transitionDurations);\n  var animationDelays = styles[animationProp + 'Delay'].split(', ');\n  var animationDurations = styles[animationProp + 'Duration'].split(', ');\n  var animationTimeout = getTimeout(animationDelays, animationDurations);\n\n  var type;\n  var timeout = 0;\n  var propCount = 0;\n  /* istanbul ignore if */\n  if (expectedType === TRANSITION) {\n    if (transitionTimeout > 0) {\n      type = TRANSITION;\n      timeout = transitionTimeout;\n      propCount = transitionDurations.length;\n    }\n  } else if (expectedType === ANIMATION) {\n    if (animationTimeout > 0) {\n      type = ANIMATION;\n      timeout = animationTimeout;\n      propCount = animationDurations.length;\n    }\n  } else {\n    timeout = Math.max(transitionTimeout, animationTimeout);\n    type = timeout > 0\n      ? transitionTimeout > animationTimeout\n        ? TRANSITION\n        : ANIMATION\n      : null;\n    propCount = type\n      ? type === TRANSITION\n        ? transitionDurations.length\n        : animationDurations.length\n      : 0;\n  }\n  var hasTransform =\n    type === TRANSITION &&\n    transformRE.test(styles[transitionProp + 'Property']);\n  return {\n    type: type,\n    timeout: timeout,\n    propCount: propCount,\n    hasTransform: hasTransform\n  }\n}\n\nfunction getTimeout (delays, durations) {\n  /* istanbul ignore next */\n  while (delays.length < durations.length) {\n    delays = delays.concat(delays);\n  }\n\n  return Math.max.apply(null, durations.map(function (d, i) {\n    return toMs(d) + toMs(delays[i])\n  }))\n}\n\nfunction toMs (s) {\n  return Number(s.slice(0, -1)) * 1000\n}\n\n/*  */\n\nfunction enter (vnode, toggleDisplay) {\n  var el = vnode.elm;\n\n  // call leave callback now\n  if (el._leaveCb) {\n    el._leaveCb.cancelled = true;\n    el._leaveCb();\n  }\n\n  var data = resolveTransition(vnode.data.transition);\n  if (!data) {\n    return\n  }\n\n  /* istanbul ignore if */\n  if (el._enterCb || el.nodeType !== 1) {\n    return\n  }\n\n  var css = data.css;\n  var type = data.type;\n  var enterClass = data.enterClass;\n  var enterToClass = data.enterToClass;\n  var enterActiveClass = data.enterActiveClass;\n  var appearClass = data.appearClass;\n  var appearToClass = data.appearToClass;\n  var appearActiveClass = data.appearActiveClass;\n  var beforeEnter = data.beforeEnter;\n  var enter = data.enter;\n  var afterEnter = data.afterEnter;\n  var enterCancelled = data.enterCancelled;\n  var beforeAppear = data.beforeAppear;\n  var appear = data.appear;\n  var afterAppear = data.afterAppear;\n  var appearCancelled = data.appearCancelled;\n  var duration = data.duration;\n\n  // activeInstance will always be the <transition> component managing this\n  // transition. One edge case to check is when the <transition> is placed\n  // as the root node of a child component. In that case we need to check\n  // <transition>'s parent for appear check.\n  var context = activeInstance;\n  var transitionNode = activeInstance.$vnode;\n  while (transitionNode && transitionNode.parent) {\n    transitionNode = transitionNode.parent;\n    context = transitionNode.context;\n  }\n\n  var isAppear = !context._isMounted || !vnode.isRootInsert;\n\n  if (isAppear && !appear && appear !== '') {\n    return\n  }\n\n  var startClass = isAppear && appearClass\n    ? appearClass\n    : enterClass;\n  var activeClass = isAppear && appearActiveClass\n    ? appearActiveClass\n    : enterActiveClass;\n  var toClass = isAppear && appearToClass\n    ? appearToClass\n    : enterToClass;\n\n  var beforeEnterHook = isAppear\n    ? (beforeAppear || beforeEnter)\n    : beforeEnter;\n  var enterHook = isAppear\n    ? (typeof appear === 'function' ? appear : enter)\n    : enter;\n  var afterEnterHook = isAppear\n    ? (afterAppear || afterEnter)\n    : afterEnter;\n  var enterCancelledHook = isAppear\n    ? (appearCancelled || enterCancelled)\n    : enterCancelled;\n\n  var explicitEnterDuration = toNumber(\n    isObject(duration)\n      ? duration.enter\n      : duration\n  );\n\n  if (process.env.NODE_ENV !== 'production' && explicitEnterDuration != null) {\n    checkDuration(explicitEnterDuration, 'enter', vnode);\n  }\n\n  var expectsCSS = css !== false && !isIE9;\n  var userWantsControl = getHookArgumentsLength(enterHook);\n\n  var cb = el._enterCb = once(function () {\n    if (expectsCSS) {\n      removeTransitionClass(el, toClass);\n      removeTransitionClass(el, activeClass);\n    }\n    if (cb.cancelled) {\n      if (expectsCSS) {\n        removeTransitionClass(el, startClass);\n      }\n      enterCancelledHook && enterCancelledHook(el);\n    } else {\n      afterEnterHook && afterEnterHook(el);\n    }\n    el._enterCb = null;\n  });\n\n  if (!vnode.data.show) {\n    // remove pending leave element on enter by injecting an insert hook\n    mergeVNodeHook(vnode.data.hook || (vnode.data.hook = {}), 'insert', function () {\n      var parent = el.parentNode;\n      var pendingNode = parent && parent._pending && parent._pending[vnode.key];\n      if (pendingNode &&\n          pendingNode.tag === vnode.tag &&\n          pendingNode.elm._leaveCb) {\n        pendingNode.elm._leaveCb();\n      }\n      enterHook && enterHook(el, cb);\n    });\n  }\n\n  // start enter transition\n  beforeEnterHook && beforeEnterHook(el);\n  if (expectsCSS) {\n    addTransitionClass(el, startClass);\n    addTransitionClass(el, activeClass);\n    nextFrame(function () {\n      addTransitionClass(el, toClass);\n      removeTransitionClass(el, startClass);\n      if (!cb.cancelled && !userWantsControl) {\n        if (isValidDuration(explicitEnterDuration)) {\n          setTimeout(cb, explicitEnterDuration);\n        } else {\n          whenTransitionEnds(el, type, cb);\n        }\n      }\n    });\n  }\n\n  if (vnode.data.show) {\n    toggleDisplay && toggleDisplay();\n    enterHook && enterHook(el, cb);\n  }\n\n  if (!expectsCSS && !userWantsControl) {\n    cb();\n  }\n}\n\nfunction leave (vnode, rm) {\n  var el = vnode.elm;\n\n  // call enter callback now\n  if (el._enterCb) {\n    el._enterCb.cancelled = true;\n    el._enterCb();\n  }\n\n  var data = resolveTransition(vnode.data.transition);\n  if (!data) {\n    return rm()\n  }\n\n  /* istanbul ignore if */\n  if (el._leaveCb || el.nodeType !== 1) {\n    return\n  }\n\n  var css = data.css;\n  var type = data.type;\n  var leaveClass = data.leaveClass;\n  var leaveToClass = data.leaveToClass;\n  var leaveActiveClass = data.leaveActiveClass;\n  var beforeLeave = data.beforeLeave;\n  var leave = data.leave;\n  var afterLeave = data.afterLeave;\n  var leaveCancelled = data.leaveCancelled;\n  var delayLeave = data.delayLeave;\n  var duration = data.duration;\n\n  var expectsCSS = css !== false && !isIE9;\n  var userWantsControl = getHookArgumentsLength(leave);\n\n  var explicitLeaveDuration = toNumber(\n    isObject(duration)\n      ? duration.leave\n      : duration\n  );\n\n  if (process.env.NODE_ENV !== 'production' && explicitLeaveDuration != null) {\n    checkDuration(explicitLeaveDuration, 'leave', vnode);\n  }\n\n  var cb = el._leaveCb = once(function () {\n    if (el.parentNode && el.parentNode._pending) {\n      el.parentNode._pending[vnode.key] = null;\n    }\n    if (expectsCSS) {\n      removeTransitionClass(el, leaveToClass);\n      removeTransitionClass(el, leaveActiveClass);\n    }\n    if (cb.cancelled) {\n      if (expectsCSS) {\n        removeTransitionClass(el, leaveClass);\n      }\n      leaveCancelled && leaveCancelled(el);\n    } else {\n      rm();\n      afterLeave && afterLeave(el);\n    }\n    el._leaveCb = null;\n  });\n\n  if (delayLeave) {\n    delayLeave(performLeave);\n  } else {\n    performLeave();\n  }\n\n  function performLeave () {\n    // the delayed leave may have already been cancelled\n    if (cb.cancelled) {\n      return\n    }\n    // record leaving element\n    if (!vnode.data.show) {\n      (el.parentNode._pending || (el.parentNode._pending = {}))[vnode.key] = vnode;\n    }\n    beforeLeave && beforeLeave(el);\n    if (expectsCSS) {\n      addTransitionClass(el, leaveClass);\n      addTransitionClass(el, leaveActiveClass);\n      nextFrame(function () {\n        addTransitionClass(el, leaveToClass);\n        removeTransitionClass(el, leaveClass);\n        if (!cb.cancelled && !userWantsControl) {\n          if (isValidDuration(explicitLeaveDuration)) {\n            setTimeout(cb, explicitLeaveDuration);\n          } else {\n            whenTransitionEnds(el, type, cb);\n          }\n        }\n      });\n    }\n    leave && leave(el, cb);\n    if (!expectsCSS && !userWantsControl) {\n      cb();\n    }\n  }\n}\n\n// only used in dev mode\nfunction checkDuration (val, name, vnode) {\n  if (typeof val !== 'number') {\n    warn(\n      \"<transition> explicit \" + name + \" duration is not a valid number - \" +\n      \"got \" + (JSON.stringify(val)) + \".\",\n      vnode.context\n    );\n  } else if (isNaN(val)) {\n    warn(\n      \"<transition> explicit \" + name + \" duration is NaN - \" +\n      'the duration expression might be incorrect.',\n      vnode.context\n    );\n  }\n}\n\nfunction isValidDuration (val) {\n  return typeof val === 'number' && !isNaN(val)\n}\n\n/**\n * Normalize a transition hook's argument length. The hook may be:\n * - a merged hook (invoker) with the original in .fns\n * - a wrapped component method (check ._length)\n * - a plain function (.length)\n */\nfunction getHookArgumentsLength (fn) {\n  if (!fn) { return false }\n  var invokerFns = fn.fns;\n  if (invokerFns) {\n    // invoker\n    return getHookArgumentsLength(\n      Array.isArray(invokerFns)\n        ? invokerFns[0]\n        : invokerFns\n    )\n  } else {\n    return (fn._length || fn.length) > 1\n  }\n}\n\nfunction _enter (_, vnode) {\n  if (!vnode.data.show) {\n    enter(vnode);\n  }\n}\n\nvar transition = inBrowser ? {\n  create: _enter,\n  activate: _enter,\n  remove: function remove$$1 (vnode, rm) {\n    /* istanbul ignore else */\n    if (!vnode.data.show) {\n      leave(vnode, rm);\n    } else {\n      rm();\n    }\n  }\n} : {};\n\nvar platformModules = [\n  attrs,\n  klass,\n  events,\n  domProps,\n  style,\n  transition\n];\n\n/*  */\n\n// the directive module should be applied last, after all\n// built-in modules have been applied.\nvar modules = platformModules.concat(baseModules);\n\nvar patch = createPatchFunction({ nodeOps: nodeOps, modules: modules });\n\n/**\n * Not type checking this file because flow doesn't like attaching\n * properties to Elements.\n */\n\n/* istanbul ignore if */\nif (isIE9) {\n  // http://www.matts411.com/post/internet-explorer-9-oninput/\n  document.addEventListener('selectionchange', function () {\n    var el = document.activeElement;\n    if (el && el.vmodel) {\n      trigger(el, 'input');\n    }\n  });\n}\n\nvar model$1 = {\n  inserted: function inserted (el, binding, vnode) {\n    if (vnode.tag === 'select') {\n      var cb = function () {\n        setSelected(el, binding, vnode.context);\n      };\n      cb();\n      /* istanbul ignore if */\n      if (isIE || isEdge) {\n        setTimeout(cb, 0);\n      }\n    } else if (vnode.tag === 'textarea' || el.type === 'text' || el.type === 'password') {\n      el._vModifiers = binding.modifiers;\n      if (!binding.modifiers.lazy) {\n        if (!isAndroid) {\n          el.addEventListener('compositionstart', onCompositionStart);\n          el.addEventListener('compositionend', onCompositionEnd);\n        }\n        /* istanbul ignore if */\n        if (isIE9) {\n          el.vmodel = true;\n        }\n      }\n    }\n  },\n  componentUpdated: function componentUpdated (el, binding, vnode) {\n    if (vnode.tag === 'select') {\n      setSelected(el, binding, vnode.context);\n      // in case the options rendered by v-for have changed,\n      // it's possible that the value is out-of-sync with the rendered options.\n      // detect such cases and filter out values that no longer has a matching\n      // option in the DOM.\n      var needReset = el.multiple\n        ? binding.value.some(function (v) { return hasNoMatchingOption(v, el.options); })\n        : binding.value !== binding.oldValue && hasNoMatchingOption(binding.value, el.options);\n      if (needReset) {\n        trigger(el, 'change');\n      }\n    }\n  }\n};\n\nfunction setSelected (el, binding, vm) {\n  var value = binding.value;\n  var isMultiple = el.multiple;\n  if (isMultiple && !Array.isArray(value)) {\n    process.env.NODE_ENV !== 'production' && warn(\n      \"<select multiple v-model=\\\"\" + (binding.expression) + \"\\\"> \" +\n      \"expects an Array value for its binding, but got \" + (Object.prototype.toString.call(value).slice(8, -1)),\n      vm\n    );\n    return\n  }\n  var selected, option;\n  for (var i = 0, l = el.options.length; i < l; i++) {\n    option = el.options[i];\n    if (isMultiple) {\n      selected = looseIndexOf(value, getValue(option)) > -1;\n      if (option.selected !== selected) {\n        option.selected = selected;\n      }\n    } else {\n      if (looseEqual(getValue(option), value)) {\n        if (el.selectedIndex !== i) {\n          el.selectedIndex = i;\n        }\n        return\n      }\n    }\n  }\n  if (!isMultiple) {\n    el.selectedIndex = -1;\n  }\n}\n\nfunction hasNoMatchingOption (value, options) {\n  for (var i = 0, l = options.length; i < l; i++) {\n    if (looseEqual(getValue(options[i]), value)) {\n      return false\n    }\n  }\n  return true\n}\n\nfunction getValue (option) {\n  return '_value' in option\n    ? option._value\n    : option.value\n}\n\nfunction onCompositionStart (e) {\n  e.target.composing = true;\n}\n\nfunction onCompositionEnd (e) {\n  e.target.composing = false;\n  trigger(e.target, 'input');\n}\n\nfunction trigger (el, type) {\n  var e = document.createEvent('HTMLEvents');\n  e.initEvent(type, true, true);\n  el.dispatchEvent(e);\n}\n\n/*  */\n\n// recursively search for possible transition defined inside the component root\nfunction locateNode (vnode) {\n  return vnode.componentInstance && (!vnode.data || !vnode.data.transition)\n    ? locateNode(vnode.componentInstance._vnode)\n    : vnode\n}\n\nvar show = {\n  bind: function bind (el, ref, vnode) {\n    var value = ref.value;\n\n    vnode = locateNode(vnode);\n    var transition = vnode.data && vnode.data.transition;\n    var originalDisplay = el.__vOriginalDisplay =\n      el.style.display === 'none' ? '' : el.style.display;\n    if (value && transition && !isIE9) {\n      vnode.data.show = true;\n      enter(vnode, function () {\n        el.style.display = originalDisplay;\n      });\n    } else {\n      el.style.display = value ? originalDisplay : 'none';\n    }\n  },\n\n  update: function update (el, ref, vnode) {\n    var value = ref.value;\n    var oldValue = ref.oldValue;\n\n    /* istanbul ignore if */\n    if (value === oldValue) { return }\n    vnode = locateNode(vnode);\n    var transition = vnode.data && vnode.data.transition;\n    if (transition && !isIE9) {\n      vnode.data.show = true;\n      if (value) {\n        enter(vnode, function () {\n          el.style.display = el.__vOriginalDisplay;\n        });\n      } else {\n        leave(vnode, function () {\n          el.style.display = 'none';\n        });\n      }\n    } else {\n      el.style.display = value ? el.__vOriginalDisplay : 'none';\n    }\n  },\n\n  unbind: function unbind (\n    el,\n    binding,\n    vnode,\n    oldVnode,\n    isDestroy\n  ) {\n    if (!isDestroy) {\n      el.style.display = el.__vOriginalDisplay;\n    }\n  }\n};\n\nvar platformDirectives = {\n  model: model$1,\n  show: show\n};\n\n/*  */\n\n// Provides transition support for a single element/component.\n// supports transition mode (out-in / in-out)\n\nvar transitionProps = {\n  name: String,\n  appear: Boolean,\n  css: Boolean,\n  mode: String,\n  type: String,\n  enterClass: String,\n  leaveClass: String,\n  enterToClass: String,\n  leaveToClass: String,\n  enterActiveClass: String,\n  leaveActiveClass: String,\n  appearClass: String,\n  appearActiveClass: String,\n  appearToClass: String,\n  duration: [Number, String, Object]\n};\n\n// in case the child is also an abstract component, e.g. <keep-alive>\n// we want to recursively retrieve the real component to be rendered\nfunction getRealChild (vnode) {\n  var compOptions = vnode && vnode.componentOptions;\n  if (compOptions && compOptions.Ctor.options.abstract) {\n    return getRealChild(getFirstComponentChild(compOptions.children))\n  } else {\n    return vnode\n  }\n}\n\nfunction extractTransitionData (comp) {\n  var data = {};\n  var options = comp.$options;\n  // props\n  for (var key in options.propsData) {\n    data[key] = comp[key];\n  }\n  // events.\n  // extract listeners and pass them directly to the transition methods\n  var listeners = options._parentListeners;\n  for (var key$1 in listeners) {\n    data[camelize(key$1)] = listeners[key$1];\n  }\n  return data\n}\n\nfunction placeholder (h, rawChild) {\n  return /\\d-keep-alive$/.test(rawChild.tag)\n    ? h('keep-alive')\n    : null\n}\n\nfunction hasParentTransition (vnode) {\n  while ((vnode = vnode.parent)) {\n    if (vnode.data.transition) {\n      return true\n    }\n  }\n}\n\nfunction isSameChild (child, oldChild) {\n  return oldChild.key === child.key && oldChild.tag === child.tag\n}\n\nvar Transition = {\n  name: 'transition',\n  props: transitionProps,\n  abstract: true,\n\n  render: function render (h) {\n    var this$1 = this;\n\n    var children = this.$slots.default;\n    if (!children) {\n      return\n    }\n\n    // filter out text nodes (possible whitespaces)\n    children = children.filter(function (c) { return c.tag; });\n    /* istanbul ignore if */\n    if (!children.length) {\n      return\n    }\n\n    // warn multiple elements\n    if (process.env.NODE_ENV !== 'production' && children.length > 1) {\n      warn(\n        '<transition> can only be used on a single element. Use ' +\n        '<transition-group> for lists.',\n        this.$parent\n      );\n    }\n\n    var mode = this.mode;\n\n    // warn invalid mode\n    if (process.env.NODE_ENV !== 'production' &&\n        mode && mode !== 'in-out' && mode !== 'out-in') {\n      warn(\n        'invalid <transition> mode: ' + mode,\n        this.$parent\n      );\n    }\n\n    var rawChild = children[0];\n\n    // if this is a component root node and the component's\n    // parent container node also has transition, skip.\n    if (hasParentTransition(this.$vnode)) {\n      return rawChild\n    }\n\n    // apply transition data to child\n    // use getRealChild() to ignore abstract components e.g. keep-alive\n    var child = getRealChild(rawChild);\n    /* istanbul ignore if */\n    if (!child) {\n      return rawChild\n    }\n\n    if (this._leaving) {\n      return placeholder(h, rawChild)\n    }\n\n    // ensure a key that is unique to the vnode type and to this transition\n    // component instance. This key will be used to remove pending leaving nodes\n    // during entering.\n    var id = \"__transition-\" + (this._uid) + \"-\";\n    child.key = child.key == null\n      ? id + child.tag\n      : isPrimitive(child.key)\n        ? (String(child.key).indexOf(id) === 0 ? child.key : id + child.key)\n        : child.key;\n\n    var data = (child.data || (child.data = {})).transition = extractTransitionData(this);\n    var oldRawChild = this._vnode;\n    var oldChild = getRealChild(oldRawChild);\n\n    // mark v-show\n    // so that the transition module can hand over the control to the directive\n    if (child.data.directives && child.data.directives.some(function (d) { return d.name === 'show'; })) {\n      child.data.show = true;\n    }\n\n    if (oldChild && oldChild.data && !isSameChild(child, oldChild)) {\n      // replace old child transition data with fresh one\n      // important for dynamic transitions!\n      var oldData = oldChild && (oldChild.data.transition = extend({}, data));\n      // handle transition mode\n      if (mode === 'out-in') {\n        // return placeholder node and queue update when leave finishes\n        this._leaving = true;\n        mergeVNodeHook(oldData, 'afterLeave', function () {\n          this$1._leaving = false;\n          this$1.$forceUpdate();\n        });\n        return placeholder(h, rawChild)\n      } else if (mode === 'in-out') {\n        var delayedLeave;\n        var performLeave = function () { delayedLeave(); };\n        mergeVNodeHook(data, 'afterEnter', performLeave);\n        mergeVNodeHook(data, 'enterCancelled', performLeave);\n        mergeVNodeHook(oldData, 'delayLeave', function (leave) { delayedLeave = leave; });\n      }\n    }\n\n    return rawChild\n  }\n};\n\n/*  */\n\n// Provides transition support for list items.\n// supports move transitions using the FLIP technique.\n\n// Because the vdom's children update algorithm is \"unstable\" - i.e.\n// it doesn't guarantee the relative positioning of removed elements,\n// we force transition-group to update its children into two passes:\n// in the first pass, we remove all nodes that need to be removed,\n// triggering their leaving transition; in the second pass, we insert/move\n// into the final desired state. This way in the second pass removed\n// nodes will remain where they should be.\n\nvar props = extend({\n  tag: String,\n  moveClass: String\n}, transitionProps);\n\ndelete props.mode;\n\nvar TransitionGroup = {\n  props: props,\n\n  render: function render (h) {\n    var tag = this.tag || this.$vnode.data.tag || 'span';\n    var map = Object.create(null);\n    var prevChildren = this.prevChildren = this.children;\n    var rawChildren = this.$slots.default || [];\n    var children = this.children = [];\n    var transitionData = extractTransitionData(this);\n\n    for (var i = 0; i < rawChildren.length; i++) {\n      var c = rawChildren[i];\n      if (c.tag) {\n        if (c.key != null && String(c.key).indexOf('__vlist') !== 0) {\n          children.push(c);\n          map[c.key] = c\n          ;(c.data || (c.data = {})).transition = transitionData;\n        } else if (process.env.NODE_ENV !== 'production') {\n          var opts = c.componentOptions;\n          var name = opts ? (opts.Ctor.options.name || opts.tag || '') : c.tag;\n          warn((\"<transition-group> children must be keyed: <\" + name + \">\"));\n        }\n      }\n    }\n\n    if (prevChildren) {\n      var kept = [];\n      var removed = [];\n      for (var i$1 = 0; i$1 < prevChildren.length; i$1++) {\n        var c$1 = prevChildren[i$1];\n        c$1.data.transition = transitionData;\n        c$1.data.pos = c$1.elm.getBoundingClientRect();\n        if (map[c$1.key]) {\n          kept.push(c$1);\n        } else {\n          removed.push(c$1);\n        }\n      }\n      this.kept = h(tag, null, kept);\n      this.removed = removed;\n    }\n\n    return h(tag, null, children)\n  },\n\n  beforeUpdate: function beforeUpdate () {\n    // force removing pass\n    this.__patch__(\n      this._vnode,\n      this.kept,\n      false, // hydrating\n      true // removeOnly (!important, avoids unnecessary moves)\n    );\n    this._vnode = this.kept;\n  },\n\n  updated: function updated () {\n    var children = this.prevChildren;\n    var moveClass = this.moveClass || ((this.name || 'v') + '-move');\n    if (!children.length || !this.hasMove(children[0].elm, moveClass)) {\n      return\n    }\n\n    // we divide the work into three loops to avoid mixing DOM reads and writes\n    // in each iteration - which helps prevent layout thrashing.\n    children.forEach(callPendingCbs);\n    children.forEach(recordPosition);\n    children.forEach(applyTranslation);\n\n    // force reflow to put everything in position\n    var body = document.body;\n    var f = body.offsetHeight; // eslint-disable-line\n\n    children.forEach(function (c) {\n      if (c.data.moved) {\n        var el = c.elm;\n        var s = el.style;\n        addTransitionClass(el, moveClass);\n        s.transform = s.WebkitTransform = s.transitionDuration = '';\n        el.addEventListener(transitionEndEvent, el._moveCb = function cb (e) {\n          if (!e || /transform$/.test(e.propertyName)) {\n            el.removeEventListener(transitionEndEvent, cb);\n            el._moveCb = null;\n            removeTransitionClass(el, moveClass);\n          }\n        });\n      }\n    });\n  },\n\n  methods: {\n    hasMove: function hasMove (el, moveClass) {\n      /* istanbul ignore if */\n      if (!hasTransition) {\n        return false\n      }\n      if (this._hasMove != null) {\n        return this._hasMove\n      }\n      // Detect whether an element with the move class applied has\n      // CSS transitions. Since the element may be inside an entering\n      // transition at this very moment, we make a clone of it and remove\n      // all other transition classes applied to ensure only the move class\n      // is applied.\n      var clone = el.cloneNode();\n      if (el._transitionClasses) {\n        el._transitionClasses.forEach(function (cls) { removeClass(clone, cls); });\n      }\n      addClass(clone, moveClass);\n      clone.style.display = 'none';\n      this.$el.appendChild(clone);\n      var info = getTransitionInfo(clone);\n      this.$el.removeChild(clone);\n      return (this._hasMove = info.hasTransform)\n    }\n  }\n};\n\nfunction callPendingCbs (c) {\n  /* istanbul ignore if */\n  if (c.elm._moveCb) {\n    c.elm._moveCb();\n  }\n  /* istanbul ignore if */\n  if (c.elm._enterCb) {\n    c.elm._enterCb();\n  }\n}\n\nfunction recordPosition (c) {\n  c.data.newPos = c.elm.getBoundingClientRect();\n}\n\nfunction applyTranslation (c) {\n  var oldPos = c.data.pos;\n  var newPos = c.data.newPos;\n  var dx = oldPos.left - newPos.left;\n  var dy = oldPos.top - newPos.top;\n  if (dx || dy) {\n    c.data.moved = true;\n    var s = c.elm.style;\n    s.transform = s.WebkitTransform = \"translate(\" + dx + \"px,\" + dy + \"px)\";\n    s.transitionDuration = '0s';\n  }\n}\n\nvar platformComponents = {\n  Transition: Transition,\n  TransitionGroup: TransitionGroup\n};\n\n/*  */\n\n// install platform specific utils\nVue$3.config.mustUseProp = mustUseProp;\nVue$3.config.isReservedTag = isReservedTag;\nVue$3.config.getTagNamespace = getTagNamespace;\nVue$3.config.isUnknownElement = isUnknownElement;\n\n// install platform runtime directives & components\nextend(Vue$3.options.directives, platformDirectives);\nextend(Vue$3.options.components, platformComponents);\n\n// install platform patch function\nVue$3.prototype.__patch__ = inBrowser ? patch : noop;\n\n// public mount method\nVue$3.prototype.$mount = function (\n  el,\n  hydrating\n) {\n  el = el && inBrowser ? query(el) : undefined;\n  return mountComponent(this, el, hydrating)\n};\n\n// devtools global hook\n/* istanbul ignore next */\nsetTimeout(function () {\n  if (config.devtools) {\n    if (devtools) {\n      devtools.emit('init', Vue$3);\n    } else if (process.env.NODE_ENV !== 'production' && isChrome) {\n      console[console.info ? 'info' : 'log'](\n        'Download the Vue Devtools extension for a better development experience:\\n' +\n        'https://github.com/vuejs/vue-devtools'\n      );\n    }\n  }\n  if (process.env.NODE_ENV !== 'production' &&\n      config.productionTip !== false &&\n      inBrowser && typeof console !== 'undefined') {\n    console[console.info ? 'info' : 'log'](\n      \"You are running Vue in development mode.\\n\" +\n      \"Make sure to turn on production mode when deploying for production.\\n\" +\n      \"See more tips at https://vuejs.org/guide/deployment.html\"\n    );\n  }\n}, 0);\n\n/*  */\n\n// check whether current browser encodes a char inside attribute values\nfunction shouldDecode (content, encoded) {\n  var div = document.createElement('div');\n  div.innerHTML = \"<div a=\\\"\" + content + \"\\\">\";\n  return div.innerHTML.indexOf(encoded) > 0\n}\n\n// #3663\n// IE encodes newlines inside attribute values while other browsers don't\nvar shouldDecodeNewlines = inBrowser ? shouldDecode('\\n', '&#10;') : false;\n\n/*  */\n\nvar isUnaryTag = makeMap(\n  'area,base,br,col,embed,frame,hr,img,input,isindex,keygen,' +\n  'link,meta,param,source,track,wbr'\n);\n\n// Elements that you can, intentionally, leave open\n// (and which close themselves)\nvar canBeLeftOpenTag = makeMap(\n  'colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr,source'\n);\n\n// HTML5 tags https://html.spec.whatwg.org/multipage/indices.html#elements-3\n// Phrasing Content https://html.spec.whatwg.org/multipage/dom.html#phrasing-content\nvar isNonPhrasingTag = makeMap(\n  'address,article,aside,base,blockquote,body,caption,col,colgroup,dd,' +\n  'details,dialog,div,dl,dt,fieldset,figcaption,figure,footer,form,' +\n  'h1,h2,h3,h4,h5,h6,head,header,hgroup,hr,html,legend,li,menuitem,meta,' +\n  'optgroup,option,param,rp,rt,source,style,summary,tbody,td,tfoot,th,thead,' +\n  'title,tr,track'\n);\n\n/*  */\n\nvar decoder;\n\nfunction decode (html) {\n  decoder = decoder || document.createElement('div');\n  decoder.innerHTML = html;\n  return decoder.textContent\n}\n\n/**\n * Not type-checking this file because it's mostly vendor code.\n */\n\n/*!\n * HTML Parser By John Resig (ejohn.org)\n * Modified by Juriy \"kangax\" Zaytsev\n * Original code by Erik Arvidsson, Mozilla Public License\n * http://erik.eae.net/simplehtmlparser/simplehtmlparser.js\n */\n\n// Regular Expressions for parsing tags and attributes\nvar singleAttrIdentifier = /([^\\s\"'<>/=]+)/;\nvar singleAttrAssign = /(?:=)/;\nvar singleAttrValues = [\n  // attr value double quotes\n  /\"([^\"]*)\"+/.source,\n  // attr value, single quotes\n  /'([^']*)'+/.source,\n  // attr value, no quotes\n  /([^\\s\"'=<>`]+)/.source\n];\nvar attribute = new RegExp(\n  '^\\\\s*' + singleAttrIdentifier.source +\n  '(?:\\\\s*(' + singleAttrAssign.source + ')' +\n  '\\\\s*(?:' + singleAttrValues.join('|') + '))?'\n);\n\n// could use https://www.w3.org/TR/1999/REC-xml-names-19990114/#NT-QName\n// but for Vue templates we can enforce a simple charset\nvar ncname = '[a-zA-Z_][\\\\w\\\\-\\\\.]*';\nvar qnameCapture = '((?:' + ncname + '\\\\:)?' + ncname + ')';\nvar startTagOpen = new RegExp('^<' + qnameCapture);\nvar startTagClose = /^\\s*(\\/?)>/;\nvar endTag = new RegExp('^<\\\\/' + qnameCapture + '[^>]*>');\nvar doctype = /^<!DOCTYPE [^>]+>/i;\nvar comment = /^<!--/;\nvar conditionalComment = /^<!\\[/;\n\nvar IS_REGEX_CAPTURING_BROKEN = false;\n'x'.replace(/x(.)?/g, function (m, g) {\n  IS_REGEX_CAPTURING_BROKEN = g === '';\n});\n\n// Special Elements (can contain anything)\nvar isPlainTextElement = makeMap('script,style,textarea', true);\nvar reCache = {};\n\nvar decodingMap = {\n  '&lt;': '<',\n  '&gt;': '>',\n  '&quot;': '\"',\n  '&amp;': '&',\n  '&#10;': '\\n'\n};\nvar encodedAttr = /&(?:lt|gt|quot|amp);/g;\nvar encodedAttrWithNewLines = /&(?:lt|gt|quot|amp|#10);/g;\n\nfunction decodeAttr (value, shouldDecodeNewlines) {\n  var re = shouldDecodeNewlines ? encodedAttrWithNewLines : encodedAttr;\n  return value.replace(re, function (match) { return decodingMap[match]; })\n}\n\nfunction parseHTML (html, options) {\n  var stack = [];\n  var expectHTML = options.expectHTML;\n  var isUnaryTag$$1 = options.isUnaryTag || no;\n  var canBeLeftOpenTag$$1 = options.canBeLeftOpenTag || no;\n  var index = 0;\n  var last, lastTag;\n  while (html) {\n    last = html;\n    // Make sure we're not in a plaintext content element like script/style\n    if (!lastTag || !isPlainTextElement(lastTag)) {\n      var textEnd = html.indexOf('<');\n      if (textEnd === 0) {\n        // Comment:\n        if (comment.test(html)) {\n          var commentEnd = html.indexOf('-->');\n\n          if (commentEnd >= 0) {\n            advance(commentEnd + 3);\n            continue\n          }\n        }\n\n        // http://en.wikipedia.org/wiki/Conditional_comment#Downlevel-revealed_conditional_comment\n        if (conditionalComment.test(html)) {\n          var conditionalEnd = html.indexOf(']>');\n\n          if (conditionalEnd >= 0) {\n            advance(conditionalEnd + 2);\n            continue\n          }\n        }\n\n        // Doctype:\n        var doctypeMatch = html.match(doctype);\n        if (doctypeMatch) {\n          advance(doctypeMatch[0].length);\n          continue\n        }\n\n        // End tag:\n        var endTagMatch = html.match(endTag);\n        if (endTagMatch) {\n          var curIndex = index;\n          advance(endTagMatch[0].length);\n          parseEndTag(endTagMatch[1], curIndex, index);\n          continue\n        }\n\n        // Start tag:\n        var startTagMatch = parseStartTag();\n        if (startTagMatch) {\n          handleStartTag(startTagMatch);\n          continue\n        }\n      }\n\n      var text = (void 0), rest$1 = (void 0), next = (void 0);\n      if (textEnd >= 0) {\n        rest$1 = html.slice(textEnd);\n        while (\n          !endTag.test(rest$1) &&\n          !startTagOpen.test(rest$1) &&\n          !comment.test(rest$1) &&\n          !conditionalComment.test(rest$1)\n        ) {\n          // < in plain text, be forgiving and treat it as text\n          next = rest$1.indexOf('<', 1);\n          if (next < 0) { break }\n          textEnd += next;\n          rest$1 = html.slice(textEnd);\n        }\n        text = html.substring(0, textEnd);\n        advance(textEnd);\n      }\n\n      if (textEnd < 0) {\n        text = html;\n        html = '';\n      }\n\n      if (options.chars && text) {\n        options.chars(text);\n      }\n    } else {\n      var stackedTag = lastTag.toLowerCase();\n      var reStackedTag = reCache[stackedTag] || (reCache[stackedTag] = new RegExp('([\\\\s\\\\S]*?)(</' + stackedTag + '[^>]*>)', 'i'));\n      var endTagLength = 0;\n      var rest = html.replace(reStackedTag, function (all, text, endTag) {\n        endTagLength = endTag.length;\n        if (!isPlainTextElement(stackedTag) && stackedTag !== 'noscript') {\n          text = text\n            .replace(/<!--([\\s\\S]*?)-->/g, '$1')\n            .replace(/<!\\[CDATA\\[([\\s\\S]*?)]]>/g, '$1');\n        }\n        if (options.chars) {\n          options.chars(text);\n        }\n        return ''\n      });\n      index += html.length - rest.length;\n      html = rest;\n      parseEndTag(stackedTag, index - endTagLength, index);\n    }\n\n    if (html === last) {\n      options.chars && options.chars(html);\n      if (process.env.NODE_ENV !== 'production' && !stack.length && options.warn) {\n        options.warn((\"Mal-formatted tag at end of template: \\\"\" + html + \"\\\"\"));\n      }\n      break\n    }\n  }\n\n  // Clean up any remaining tags\n  parseEndTag();\n\n  function advance (n) {\n    index += n;\n    html = html.substring(n);\n  }\n\n  function parseStartTag () {\n    var start = html.match(startTagOpen);\n    if (start) {\n      var match = {\n        tagName: start[1],\n        attrs: [],\n        start: index\n      };\n      advance(start[0].length);\n      var end, attr;\n      while (!(end = html.match(startTagClose)) && (attr = html.match(attribute))) {\n        advance(attr[0].length);\n        match.attrs.push(attr);\n      }\n      if (end) {\n        match.unarySlash = end[1];\n        advance(end[0].length);\n        match.end = index;\n        return match\n      }\n    }\n  }\n\n  function handleStartTag (match) {\n    var tagName = match.tagName;\n    var unarySlash = match.unarySlash;\n\n    if (expectHTML) {\n      if (lastTag === 'p' && isNonPhrasingTag(tagName)) {\n        parseEndTag(lastTag);\n      }\n      if (canBeLeftOpenTag$$1(tagName) && lastTag === tagName) {\n        parseEndTag(tagName);\n      }\n    }\n\n    var unary = isUnaryTag$$1(tagName) || tagName === 'html' && lastTag === 'head' || !!unarySlash;\n\n    var l = match.attrs.length;\n    var attrs = new Array(l);\n    for (var i = 0; i < l; i++) {\n      var args = match.attrs[i];\n      // hackish work around FF bug https://bugzilla.mozilla.org/show_bug.cgi?id=369778\n      if (IS_REGEX_CAPTURING_BROKEN && args[0].indexOf('\"\"') === -1) {\n        if (args[3] === '') { delete args[3]; }\n        if (args[4] === '') { delete args[4]; }\n        if (args[5] === '') { delete args[5]; }\n      }\n      var value = args[3] || args[4] || args[5] || '';\n      attrs[i] = {\n        name: args[1],\n        value: decodeAttr(\n          value,\n          options.shouldDecodeNewlines\n        )\n      };\n    }\n\n    if (!unary) {\n      stack.push({ tag: tagName, lowerCasedTag: tagName.toLowerCase(), attrs: attrs });\n      lastTag = tagName;\n    }\n\n    if (options.start) {\n      options.start(tagName, attrs, unary, match.start, match.end);\n    }\n  }\n\n  function parseEndTag (tagName, start, end) {\n    var pos, lowerCasedTagName;\n    if (start == null) { start = index; }\n    if (end == null) { end = index; }\n\n    if (tagName) {\n      lowerCasedTagName = tagName.toLowerCase();\n    }\n\n    // Find the closest opened tag of the same type\n    if (tagName) {\n      for (pos = stack.length - 1; pos >= 0; pos--) {\n        if (stack[pos].lowerCasedTag === lowerCasedTagName) {\n          break\n        }\n      }\n    } else {\n      // If no tag name is provided, clean shop\n      pos = 0;\n    }\n\n    if (pos >= 0) {\n      // Close all the open elements, up the stack\n      for (var i = stack.length - 1; i >= pos; i--) {\n        if (process.env.NODE_ENV !== 'production' &&\n            (i > pos || !tagName) &&\n            options.warn) {\n          options.warn(\n            (\"tag <\" + (stack[i].tag) + \"> has no matching end tag.\")\n          );\n        }\n        if (options.end) {\n          options.end(stack[i].tag, start, end);\n        }\n      }\n\n      // Remove the open elements from the stack\n      stack.length = pos;\n      lastTag = pos && stack[pos - 1].tag;\n    } else if (lowerCasedTagName === 'br') {\n      if (options.start) {\n        options.start(tagName, [], true, start, end);\n      }\n    } else if (lowerCasedTagName === 'p') {\n      if (options.start) {\n        options.start(tagName, [], false, start, end);\n      }\n      if (options.end) {\n        options.end(tagName, start, end);\n      }\n    }\n  }\n}\n\n/*  */\n\nvar defaultTagRE = /\\{\\{((?:.|\\n)+?)\\}\\}/g;\nvar regexEscapeRE = /[-.*+?^${}()|[\\]\\/\\\\]/g;\n\nvar buildRegex = cached(function (delimiters) {\n  var open = delimiters[0].replace(regexEscapeRE, '\\\\$&');\n  var close = delimiters[1].replace(regexEscapeRE, '\\\\$&');\n  return new RegExp(open + '((?:.|\\\\n)+?)' + close, 'g')\n});\n\nfunction parseText (\n  text,\n  delimiters\n) {\n  var tagRE = delimiters ? buildRegex(delimiters) : defaultTagRE;\n  if (!tagRE.test(text)) {\n    return\n  }\n  var tokens = [];\n  var lastIndex = tagRE.lastIndex = 0;\n  var match, index;\n  while ((match = tagRE.exec(text))) {\n    index = match.index;\n    // push text token\n    if (index > lastIndex) {\n      tokens.push(JSON.stringify(text.slice(lastIndex, index)));\n    }\n    // tag token\n    var exp = parseFilters(match[1].trim());\n    tokens.push((\"_s(\" + exp + \")\"));\n    lastIndex = index + match[0].length;\n  }\n  if (lastIndex < text.length) {\n    tokens.push(JSON.stringify(text.slice(lastIndex)));\n  }\n  return tokens.join('+')\n}\n\n/*  */\n\nvar onRE = /^@|^v-on:/;\nvar dirRE = /^v-|^@|^:/;\nvar forAliasRE = /(.*?)\\s+(?:in|of)\\s+(.*)/;\nvar forIteratorRE = /\\((\\{[^}]*\\}|[^,]*),([^,]*)(?:,([^,]*))?\\)/;\n\nvar argRE = /:(.*)$/;\nvar bindRE = /^:|^v-bind:/;\nvar modifierRE = /\\.[^.]+/g;\n\nvar decodeHTMLCached = cached(decode);\n\n// configurable state\nvar warn$2;\nvar delimiters;\nvar transforms;\nvar preTransforms;\nvar postTransforms;\nvar platformIsPreTag;\nvar platformMustUseProp;\nvar platformGetTagNamespace;\n\n/**\n * Convert HTML string to AST.\n */\nfunction parse (\n  template,\n  options\n) {\n  warn$2 = options.warn || baseWarn;\n  platformGetTagNamespace = options.getTagNamespace || no;\n  platformMustUseProp = options.mustUseProp || no;\n  platformIsPreTag = options.isPreTag || no;\n  preTransforms = pluckModuleFunction(options.modules, 'preTransformNode');\n  transforms = pluckModuleFunction(options.modules, 'transformNode');\n  postTransforms = pluckModuleFunction(options.modules, 'postTransformNode');\n  delimiters = options.delimiters;\n\n  var stack = [];\n  var preserveWhitespace = options.preserveWhitespace !== false;\n  var root;\n  var currentParent;\n  var inVPre = false;\n  var inPre = false;\n  var warned = false;\n\n  function warnOnce (msg) {\n    if (!warned) {\n      warned = true;\n      warn$2(msg);\n    }\n  }\n\n  function endPre (element) {\n    // check pre state\n    if (element.pre) {\n      inVPre = false;\n    }\n    if (platformIsPreTag(element.tag)) {\n      inPre = false;\n    }\n  }\n\n  parseHTML(template, {\n    warn: warn$2,\n    expectHTML: options.expectHTML,\n    isUnaryTag: options.isUnaryTag,\n    canBeLeftOpenTag: options.canBeLeftOpenTag,\n    shouldDecodeNewlines: options.shouldDecodeNewlines,\n    start: function start (tag, attrs, unary) {\n      // check namespace.\n      // inherit parent ns if there is one\n      var ns = (currentParent && currentParent.ns) || platformGetTagNamespace(tag);\n\n      // handle IE svg bug\n      /* istanbul ignore if */\n      if (isIE && ns === 'svg') {\n        attrs = guardIESVGBug(attrs);\n      }\n\n      var element = {\n        type: 1,\n        tag: tag,\n        attrsList: attrs,\n        attrsMap: makeAttrsMap(attrs),\n        parent: currentParent,\n        children: []\n      };\n      if (ns) {\n        element.ns = ns;\n      }\n\n      if (isForbiddenTag(element) && !isServerRendering()) {\n        element.forbidden = true;\n        process.env.NODE_ENV !== 'production' && warn$2(\n          'Templates should only be responsible for mapping the state to the ' +\n          'UI. Avoid placing tags with side-effects in your templates, such as ' +\n          \"<\" + tag + \">\" + ', as they will not be parsed.'\n        );\n      }\n\n      // apply pre-transforms\n      for (var i = 0; i < preTransforms.length; i++) {\n        preTransforms[i](element, options);\n      }\n\n      if (!inVPre) {\n        processPre(element);\n        if (element.pre) {\n          inVPre = true;\n        }\n      }\n      if (platformIsPreTag(element.tag)) {\n        inPre = true;\n      }\n      if (inVPre) {\n        processRawAttrs(element);\n      } else {\n        processFor(element);\n        processIf(element);\n        processOnce(element);\n        processKey(element);\n\n        // determine whether this is a plain element after\n        // removing structural attributes\n        element.plain = !element.key && !attrs.length;\n\n        processRef(element);\n        processSlot(element);\n        processComponent(element);\n        for (var i$1 = 0; i$1 < transforms.length; i$1++) {\n          transforms[i$1](element, options);\n        }\n        processAttrs(element);\n      }\n\n      function checkRootConstraints (el) {\n        if (process.env.NODE_ENV !== 'production') {\n          if (el.tag === 'slot' || el.tag === 'template') {\n            warnOnce(\n              \"Cannot use <\" + (el.tag) + \"> as component root element because it may \" +\n              'contain multiple nodes.'\n            );\n          }\n          if (el.attrsMap.hasOwnProperty('v-for')) {\n            warnOnce(\n              'Cannot use v-for on stateful component root element because ' +\n              'it renders multiple elements.'\n            );\n          }\n        }\n      }\n\n      // tree management\n      if (!root) {\n        root = element;\n        checkRootConstraints(root);\n      } else if (!stack.length) {\n        // allow root elements with v-if, v-else-if and v-else\n        if (root.if && (element.elseif || element.else)) {\n          checkRootConstraints(element);\n          addIfCondition(root, {\n            exp: element.elseif,\n            block: element\n          });\n        } else if (process.env.NODE_ENV !== 'production') {\n          warnOnce(\n            \"Component template should contain exactly one root element. \" +\n            \"If you are using v-if on multiple elements, \" +\n            \"use v-else-if to chain them instead.\"\n          );\n        }\n      }\n      if (currentParent && !element.forbidden) {\n        if (element.elseif || element.else) {\n          processIfConditions(element, currentParent);\n        } else if (element.slotScope) { // scoped slot\n          currentParent.plain = false;\n          var name = element.slotTarget || '\"default\"';(currentParent.scopedSlots || (currentParent.scopedSlots = {}))[name] = element;\n        } else {\n          currentParent.children.push(element);\n          element.parent = currentParent;\n        }\n      }\n      if (!unary) {\n        currentParent = element;\n        stack.push(element);\n      } else {\n        endPre(element);\n      }\n      // apply post-transforms\n      for (var i$2 = 0; i$2 < postTransforms.length; i$2++) {\n        postTransforms[i$2](element, options);\n      }\n    },\n\n    end: function end () {\n      // remove trailing whitespace\n      var element = stack[stack.length - 1];\n      var lastNode = element.children[element.children.length - 1];\n      if (lastNode && lastNode.type === 3 && lastNode.text === ' ' && !inPre) {\n        element.children.pop();\n      }\n      // pop stack\n      stack.length -= 1;\n      currentParent = stack[stack.length - 1];\n      endPre(element);\n    },\n\n    chars: function chars (text) {\n      if (!currentParent) {\n        if (process.env.NODE_ENV !== 'production') {\n          if (text === template) {\n            warnOnce(\n              'Component template requires a root element, rather than just text.'\n            );\n          } else if ((text = text.trim())) {\n            warnOnce(\n              (\"text \\\"\" + text + \"\\\" outside root element will be ignored.\")\n            );\n          }\n        }\n        return\n      }\n      // IE textarea placeholder bug\n      /* istanbul ignore if */\n      if (isIE &&\n          currentParent.tag === 'textarea' &&\n          currentParent.attrsMap.placeholder === text) {\n        return\n      }\n      var children = currentParent.children;\n      text = inPre || text.trim()\n        ? decodeHTMLCached(text)\n        // only preserve whitespace if its not right after a starting tag\n        : preserveWhitespace && children.length ? ' ' : '';\n      if (text) {\n        var expression;\n        if (!inVPre && text !== ' ' && (expression = parseText(text, delimiters))) {\n          children.push({\n            type: 2,\n            expression: expression,\n            text: text\n          });\n        } else if (text !== ' ' || !children.length || children[children.length - 1].text !== ' ') {\n          children.push({\n            type: 3,\n            text: text\n          });\n        }\n      }\n    }\n  });\n  return root\n}\n\nfunction processPre (el) {\n  if (getAndRemoveAttr(el, 'v-pre') != null) {\n    el.pre = true;\n  }\n}\n\nfunction processRawAttrs (el) {\n  var l = el.attrsList.length;\n  if (l) {\n    var attrs = el.attrs = new Array(l);\n    for (var i = 0; i < l; i++) {\n      attrs[i] = {\n        name: el.attrsList[i].name,\n        value: JSON.stringify(el.attrsList[i].value)\n      };\n    }\n  } else if (!el.pre) {\n    // non root node in pre blocks with no attributes\n    el.plain = true;\n  }\n}\n\nfunction processKey (el) {\n  var exp = getBindingAttr(el, 'key');\n  if (exp) {\n    if (process.env.NODE_ENV !== 'production' && el.tag === 'template') {\n      warn$2(\"<template> cannot be keyed. Place the key on real elements instead.\");\n    }\n    el.key = exp;\n  }\n}\n\nfunction processRef (el) {\n  var ref = getBindingAttr(el, 'ref');\n  if (ref) {\n    el.ref = ref;\n    el.refInFor = checkInFor(el);\n  }\n}\n\nfunction processFor (el) {\n  var exp;\n  if ((exp = getAndRemoveAttr(el, 'v-for'))) {\n    var inMatch = exp.match(forAliasRE);\n    if (!inMatch) {\n      process.env.NODE_ENV !== 'production' && warn$2(\n        (\"Invalid v-for expression: \" + exp)\n      );\n      return\n    }\n    el.for = inMatch[2].trim();\n    var alias = inMatch[1].trim();\n    var iteratorMatch = alias.match(forIteratorRE);\n    if (iteratorMatch) {\n      el.alias = iteratorMatch[1].trim();\n      el.iterator1 = iteratorMatch[2].trim();\n      if (iteratorMatch[3]) {\n        el.iterator2 = iteratorMatch[3].trim();\n      }\n    } else {\n      el.alias = alias;\n    }\n  }\n}\n\nfunction processIf (el) {\n  var exp = getAndRemoveAttr(el, 'v-if');\n  if (exp) {\n    el.if = exp;\n    addIfCondition(el, {\n      exp: exp,\n      block: el\n    });\n  } else {\n    if (getAndRemoveAttr(el, 'v-else') != null) {\n      el.else = true;\n    }\n    var elseif = getAndRemoveAttr(el, 'v-else-if');\n    if (elseif) {\n      el.elseif = elseif;\n    }\n  }\n}\n\nfunction processIfConditions (el, parent) {\n  var prev = findPrevElement(parent.children);\n  if (prev && prev.if) {\n    addIfCondition(prev, {\n      exp: el.elseif,\n      block: el\n    });\n  } else if (process.env.NODE_ENV !== 'production') {\n    warn$2(\n      \"v-\" + (el.elseif ? ('else-if=\"' + el.elseif + '\"') : 'else') + \" \" +\n      \"used on element <\" + (el.tag) + \"> without corresponding v-if.\"\n    );\n  }\n}\n\nfunction findPrevElement (children) {\n  var i = children.length;\n  while (i--) {\n    if (children[i].type === 1) {\n      return children[i]\n    } else {\n      if (process.env.NODE_ENV !== 'production' && children[i].text !== ' ') {\n        warn$2(\n          \"text \\\"\" + (children[i].text.trim()) + \"\\\" between v-if and v-else(-if) \" +\n          \"will be ignored.\"\n        );\n      }\n      children.pop();\n    }\n  }\n}\n\nfunction addIfCondition (el, condition) {\n  if (!el.ifConditions) {\n    el.ifConditions = [];\n  }\n  el.ifConditions.push(condition);\n}\n\nfunction processOnce (el) {\n  var once$$1 = getAndRemoveAttr(el, 'v-once');\n  if (once$$1 != null) {\n    el.once = true;\n  }\n}\n\nfunction processSlot (el) {\n  if (el.tag === 'slot') {\n    el.slotName = getBindingAttr(el, 'name');\n    if (process.env.NODE_ENV !== 'production' && el.key) {\n      warn$2(\n        \"`key` does not work on <slot> because slots are abstract outlets \" +\n        \"and can possibly expand into multiple elements. \" +\n        \"Use the key on a wrapping element instead.\"\n      );\n    }\n  } else {\n    var slotTarget = getBindingAttr(el, 'slot');\n    if (slotTarget) {\n      el.slotTarget = slotTarget === '\"\"' ? '\"default\"' : slotTarget;\n    }\n    if (el.tag === 'template') {\n      el.slotScope = getAndRemoveAttr(el, 'scope');\n    }\n  }\n}\n\nfunction processComponent (el) {\n  var binding;\n  if ((binding = getBindingAttr(el, 'is'))) {\n    el.component = binding;\n  }\n  if (getAndRemoveAttr(el, 'inline-template') != null) {\n    el.inlineTemplate = true;\n  }\n}\n\nfunction processAttrs (el) {\n  var list = el.attrsList;\n  var i, l, name, rawName, value, modifiers, isProp;\n  for (i = 0, l = list.length; i < l; i++) {\n    name = rawName = list[i].name;\n    value = list[i].value;\n    if (dirRE.test(name)) {\n      // mark element as dynamic\n      el.hasBindings = true;\n      // modifiers\n      modifiers = parseModifiers(name);\n      if (modifiers) {\n        name = name.replace(modifierRE, '');\n      }\n      if (bindRE.test(name)) { // v-bind\n        name = name.replace(bindRE, '');\n        value = parseFilters(value);\n        isProp = false;\n        if (modifiers) {\n          if (modifiers.prop) {\n            isProp = true;\n            name = camelize(name);\n            if (name === 'innerHtml') { name = 'innerHTML'; }\n          }\n          if (modifiers.camel) {\n            name = camelize(name);\n          }\n        }\n        if (isProp || platformMustUseProp(el.tag, el.attrsMap.type, name)) {\n          addProp(el, name, value);\n        } else {\n          addAttr(el, name, value);\n        }\n      } else if (onRE.test(name)) { // v-on\n        name = name.replace(onRE, '');\n        addHandler(el, name, value, modifiers);\n      } else { // normal directives\n        name = name.replace(dirRE, '');\n        // parse arg\n        var argMatch = name.match(argRE);\n        var arg = argMatch && argMatch[1];\n        if (arg) {\n          name = name.slice(0, -(arg.length + 1));\n        }\n        addDirective(el, name, rawName, value, arg, modifiers);\n        if (process.env.NODE_ENV !== 'production' && name === 'model') {\n          checkForAliasModel(el, value);\n        }\n      }\n    } else {\n      // literal attribute\n      if (process.env.NODE_ENV !== 'production') {\n        var expression = parseText(value, delimiters);\n        if (expression) {\n          warn$2(\n            name + \"=\\\"\" + value + \"\\\": \" +\n            'Interpolation inside attributes has been removed. ' +\n            'Use v-bind or the colon shorthand instead. For example, ' +\n            'instead of <div id=\"{{ val }}\">, use <div :id=\"val\">.'\n          );\n        }\n      }\n      addAttr(el, name, JSON.stringify(value));\n    }\n  }\n}\n\nfunction checkInFor (el) {\n  var parent = el;\n  while (parent) {\n    if (parent.for !== undefined) {\n      return true\n    }\n    parent = parent.parent;\n  }\n  return false\n}\n\nfunction parseModifiers (name) {\n  var match = name.match(modifierRE);\n  if (match) {\n    var ret = {};\n    match.forEach(function (m) { ret[m.slice(1)] = true; });\n    return ret\n  }\n}\n\nfunction makeAttrsMap (attrs) {\n  var map = {};\n  for (var i = 0, l = attrs.length; i < l; i++) {\n    if (process.env.NODE_ENV !== 'production' && map[attrs[i].name] && !isIE) {\n      warn$2('duplicate attribute: ' + attrs[i].name);\n    }\n    map[attrs[i].name] = attrs[i].value;\n  }\n  return map\n}\n\nfunction isForbiddenTag (el) {\n  return (\n    el.tag === 'style' ||\n    (el.tag === 'script' && (\n      !el.attrsMap.type ||\n      el.attrsMap.type === 'text/javascript'\n    ))\n  )\n}\n\nvar ieNSBug = /^xmlns:NS\\d+/;\nvar ieNSPrefix = /^NS\\d+:/;\n\n/* istanbul ignore next */\nfunction guardIESVGBug (attrs) {\n  var res = [];\n  for (var i = 0; i < attrs.length; i++) {\n    var attr = attrs[i];\n    if (!ieNSBug.test(attr.name)) {\n      attr.name = attr.name.replace(ieNSPrefix, '');\n      res.push(attr);\n    }\n  }\n  return res\n}\n\nfunction checkForAliasModel (el, value) {\n  var _el = el;\n  while (_el) {\n    if (_el.for && _el.alias === value) {\n      warn$2(\n        \"<\" + (el.tag) + \" v-model=\\\"\" + value + \"\\\">: \" +\n        \"You are binding v-model directly to a v-for iteration alias. \" +\n        \"This will not be able to modify the v-for source array because \" +\n        \"writing to the alias is like modifying a function local variable. \" +\n        \"Consider using an array of objects and use v-model on an object property instead.\"\n      );\n    }\n    _el = _el.parent;\n  }\n}\n\n/*  */\n\nvar isStaticKey;\nvar isPlatformReservedTag;\n\nvar genStaticKeysCached = cached(genStaticKeys$1);\n\n/**\n * Goal of the optimizer: walk the generated template AST tree\n * and detect sub-trees that are purely static, i.e. parts of\n * the DOM that never needs to change.\n *\n * Once we detect these sub-trees, we can:\n *\n * 1. Hoist them into constants, so that we no longer need to\n *    create fresh nodes for them on each re-render;\n * 2. Completely skip them in the patching process.\n */\nfunction optimize (root, options) {\n  if (!root) { return }\n  isStaticKey = genStaticKeysCached(options.staticKeys || '');\n  isPlatformReservedTag = options.isReservedTag || no;\n  // first pass: mark all non-static nodes.\n  markStatic$1(root);\n  // second pass: mark static roots.\n  markStaticRoots(root, false);\n}\n\nfunction genStaticKeys$1 (keys) {\n  return makeMap(\n    'type,tag,attrsList,attrsMap,plain,parent,children,attrs' +\n    (keys ? ',' + keys : '')\n  )\n}\n\nfunction markStatic$1 (node) {\n  node.static = isStatic(node);\n  if (node.type === 1) {\n    // do not make component slot content static. this avoids\n    // 1. components not able to mutate slot nodes\n    // 2. static slot content fails for hot-reloading\n    if (\n      !isPlatformReservedTag(node.tag) &&\n      node.tag !== 'slot' &&\n      node.attrsMap['inline-template'] == null\n    ) {\n      return\n    }\n    for (var i = 0, l = node.children.length; i < l; i++) {\n      var child = node.children[i];\n      markStatic$1(child);\n      if (!child.static) {\n        node.static = false;\n      }\n    }\n  }\n}\n\nfunction markStaticRoots (node, isInFor) {\n  if (node.type === 1) {\n    if (node.static || node.once) {\n      node.staticInFor = isInFor;\n    }\n    // For a node to qualify as a static root, it should have children that\n    // are not just static text. Otherwise the cost of hoisting out will\n    // outweigh the benefits and it's better off to just always render it fresh.\n    if (node.static && node.children.length && !(\n      node.children.length === 1 &&\n      node.children[0].type === 3\n    )) {\n      node.staticRoot = true;\n      return\n    } else {\n      node.staticRoot = false;\n    }\n    if (node.children) {\n      for (var i = 0, l = node.children.length; i < l; i++) {\n        markStaticRoots(node.children[i], isInFor || !!node.for);\n      }\n    }\n    if (node.ifConditions) {\n      walkThroughConditionsBlocks(node.ifConditions, isInFor);\n    }\n  }\n}\n\nfunction walkThroughConditionsBlocks (conditionBlocks, isInFor) {\n  for (var i = 1, len = conditionBlocks.length; i < len; i++) {\n    markStaticRoots(conditionBlocks[i].block, isInFor);\n  }\n}\n\nfunction isStatic (node) {\n  if (node.type === 2) { // expression\n    return false\n  }\n  if (node.type === 3) { // text\n    return true\n  }\n  return !!(node.pre || (\n    !node.hasBindings && // no dynamic bindings\n    !node.if && !node.for && // not v-if or v-for or v-else\n    !isBuiltInTag(node.tag) && // not a built-in\n    isPlatformReservedTag(node.tag) && // not a component\n    !isDirectChildOfTemplateFor(node) &&\n    Object.keys(node).every(isStaticKey)\n  ))\n}\n\nfunction isDirectChildOfTemplateFor (node) {\n  while (node.parent) {\n    node = node.parent;\n    if (node.tag !== 'template') {\n      return false\n    }\n    if (node.for) {\n      return true\n    }\n  }\n  return false\n}\n\n/*  */\n\nvar fnExpRE = /^\\s*([\\w$_]+|\\([^)]*?\\))\\s*=>|^function\\s*\\(/;\nvar simplePathRE = /^\\s*[A-Za-z_$][\\w$]*(?:\\.[A-Za-z_$][\\w$]*|\\['.*?']|\\[\".*?\"]|\\[\\d+]|\\[[A-Za-z_$][\\w$]*])*\\s*$/;\n\n// keyCode aliases\nvar keyCodes = {\n  esc: 27,\n  tab: 9,\n  enter: 13,\n  space: 32,\n  up: 38,\n  left: 37,\n  right: 39,\n  down: 40,\n  'delete': [8, 46]\n};\n\n// #4868: modifiers that prevent the execution of the listener\n// need to explicitly return null so that we can determine whether to remove\n// the listener for .once\nvar genGuard = function (condition) { return (\"if(\" + condition + \")return null;\"); };\n\nvar modifierCode = {\n  stop: '$event.stopPropagation();',\n  prevent: '$event.preventDefault();',\n  self: genGuard(\"$event.target !== $event.currentTarget\"),\n  ctrl: genGuard(\"!$event.ctrlKey\"),\n  shift: genGuard(\"!$event.shiftKey\"),\n  alt: genGuard(\"!$event.altKey\"),\n  meta: genGuard(\"!$event.metaKey\"),\n  left: genGuard(\"'button' in $event && $event.button !== 0\"),\n  middle: genGuard(\"'button' in $event && $event.button !== 1\"),\n  right: genGuard(\"'button' in $event && $event.button !== 2\")\n};\n\nfunction genHandlers (events, native) {\n  var res = native ? 'nativeOn:{' : 'on:{';\n  for (var name in events) {\n    res += \"\\\"\" + name + \"\\\":\" + (genHandler(name, events[name])) + \",\";\n  }\n  return res.slice(0, -1) + '}'\n}\n\nfunction genHandler (\n  name,\n  handler\n) {\n  if (!handler) {\n    return 'function(){}'\n  }\n\n  if (Array.isArray(handler)) {\n    return (\"[\" + (handler.map(function (handler) { return genHandler(name, handler); }).join(',')) + \"]\")\n  }\n\n  var isMethodPath = simplePathRE.test(handler.value);\n  var isFunctionExpression = fnExpRE.test(handler.value);\n\n  if (!handler.modifiers) {\n    return isMethodPath || isFunctionExpression\n      ? handler.value\n      : (\"function($event){\" + (handler.value) + \"}\") // inline statement\n  } else {\n    var code = '';\n    var genModifierCode = '';\n    var keys = [];\n    for (var key in handler.modifiers) {\n      if (modifierCode[key]) {\n        genModifierCode += modifierCode[key];\n        // left/right\n        if (keyCodes[key]) {\n          keys.push(key);\n        }\n      } else {\n        keys.push(key);\n      }\n    }\n    if (keys.length) {\n      code += genKeyFilter(keys);\n    }\n    // Make sure modifiers like prevent and stop get executed after key filtering\n    if (genModifierCode) {\n      code += genModifierCode;\n    }\n    var handlerCode = isMethodPath\n      ? handler.value + '($event)'\n      : isFunctionExpression\n        ? (\"(\" + (handler.value) + \")($event)\")\n        : handler.value;\n    return (\"function($event){\" + code + handlerCode + \"}\")\n  }\n}\n\nfunction genKeyFilter (keys) {\n  return (\"if(!('button' in $event)&&\" + (keys.map(genFilterCode).join('&&')) + \")return null;\")\n}\n\nfunction genFilterCode (key) {\n  var keyVal = parseInt(key, 10);\n  if (keyVal) {\n    return (\"$event.keyCode!==\" + keyVal)\n  }\n  var alias = keyCodes[key];\n  return (\"_k($event.keyCode,\" + (JSON.stringify(key)) + (alias ? ',' + JSON.stringify(alias) : '') + \")\")\n}\n\n/*  */\n\nfunction bind$1 (el, dir) {\n  el.wrapData = function (code) {\n    return (\"_b(\" + code + \",'\" + (el.tag) + \"',\" + (dir.value) + (dir.modifiers && dir.modifiers.prop ? ',true' : '') + \")\")\n  };\n}\n\n/*  */\n\nvar baseDirectives = {\n  bind: bind$1,\n  cloak: noop\n};\n\n/*  */\n\n// configurable state\nvar warn$3;\nvar transforms$1;\nvar dataGenFns;\nvar platformDirectives$1;\nvar isPlatformReservedTag$1;\nvar staticRenderFns;\nvar onceCount;\nvar currentOptions;\n\nfunction generate (\n  ast,\n  options\n) {\n  // save previous staticRenderFns so generate calls can be nested\n  var prevStaticRenderFns = staticRenderFns;\n  var currentStaticRenderFns = staticRenderFns = [];\n  var prevOnceCount = onceCount;\n  onceCount = 0;\n  currentOptions = options;\n  warn$3 = options.warn || baseWarn;\n  transforms$1 = pluckModuleFunction(options.modules, 'transformCode');\n  dataGenFns = pluckModuleFunction(options.modules, 'genData');\n  platformDirectives$1 = options.directives || {};\n  isPlatformReservedTag$1 = options.isReservedTag || no;\n  var code = ast ? genElement(ast) : '_c(\"div\")';\n  staticRenderFns = prevStaticRenderFns;\n  onceCount = prevOnceCount;\n  return {\n    render: (\"with(this){return \" + code + \"}\"),\n    staticRenderFns: currentStaticRenderFns\n  }\n}\n\nfunction genElement (el) {\n  if (el.staticRoot && !el.staticProcessed) {\n    return genStatic(el)\n  } else if (el.once && !el.onceProcessed) {\n    return genOnce(el)\n  } else if (el.for && !el.forProcessed) {\n    return genFor(el)\n  } else if (el.if && !el.ifProcessed) {\n    return genIf(el)\n  } else if (el.tag === 'template' && !el.slotTarget) {\n    return genChildren(el) || 'void 0'\n  } else if (el.tag === 'slot') {\n    return genSlot(el)\n  } else {\n    // component or element\n    var code;\n    if (el.component) {\n      code = genComponent(el.component, el);\n    } else {\n      var data = el.plain ? undefined : genData(el);\n\n      var children = el.inlineTemplate ? null : genChildren(el, true);\n      code = \"_c('\" + (el.tag) + \"'\" + (data ? (\",\" + data) : '') + (children ? (\",\" + children) : '') + \")\";\n    }\n    // module transforms\n    for (var i = 0; i < transforms$1.length; i++) {\n      code = transforms$1[i](el, code);\n    }\n    return code\n  }\n}\n\n// hoist static sub-trees out\nfunction genStatic (el) {\n  el.staticProcessed = true;\n  staticRenderFns.push((\"with(this){return \" + (genElement(el)) + \"}\"));\n  return (\"_m(\" + (staticRenderFns.length - 1) + (el.staticInFor ? ',true' : '') + \")\")\n}\n\n// v-once\nfunction genOnce (el) {\n  el.onceProcessed = true;\n  if (el.if && !el.ifProcessed) {\n    return genIf(el)\n  } else if (el.staticInFor) {\n    var key = '';\n    var parent = el.parent;\n    while (parent) {\n      if (parent.for) {\n        key = parent.key;\n        break\n      }\n      parent = parent.parent;\n    }\n    if (!key) {\n      process.env.NODE_ENV !== 'production' && warn$3(\n        \"v-once can only be used inside v-for that is keyed. \"\n      );\n      return genElement(el)\n    }\n    return (\"_o(\" + (genElement(el)) + \",\" + (onceCount++) + (key ? (\",\" + key) : \"\") + \")\")\n  } else {\n    return genStatic(el)\n  }\n}\n\nfunction genIf (el) {\n  el.ifProcessed = true; // avoid recursion\n  return genIfConditions(el.ifConditions.slice())\n}\n\nfunction genIfConditions (conditions) {\n  if (!conditions.length) {\n    return '_e()'\n  }\n\n  var condition = conditions.shift();\n  if (condition.exp) {\n    return (\"(\" + (condition.exp) + \")?\" + (genTernaryExp(condition.block)) + \":\" + (genIfConditions(conditions)))\n  } else {\n    return (\"\" + (genTernaryExp(condition.block)))\n  }\n\n  // v-if with v-once should generate code like (a)?_m(0):_m(1)\n  function genTernaryExp (el) {\n    return el.once ? genOnce(el) : genElement(el)\n  }\n}\n\nfunction genFor (el) {\n  var exp = el.for;\n  var alias = el.alias;\n  var iterator1 = el.iterator1 ? (\",\" + (el.iterator1)) : '';\n  var iterator2 = el.iterator2 ? (\",\" + (el.iterator2)) : '';\n\n  if (\n    process.env.NODE_ENV !== 'production' &&\n    maybeComponent(el) && el.tag !== 'slot' && el.tag !== 'template' && !el.key\n  ) {\n    warn$3(\n      \"<\" + (el.tag) + \" v-for=\\\"\" + alias + \" in \" + exp + \"\\\">: component lists rendered with \" +\n      \"v-for should have explicit keys. \" +\n      \"See https://vuejs.org/guide/list.html#key for more info.\",\n      true /* tip */\n    );\n  }\n\n  el.forProcessed = true; // avoid recursion\n  return \"_l((\" + exp + \"),\" +\n    \"function(\" + alias + iterator1 + iterator2 + \"){\" +\n      \"return \" + (genElement(el)) +\n    '})'\n}\n\nfunction genData (el) {\n  var data = '{';\n\n  // directives first.\n  // directives may mutate the el's other properties before they are generated.\n  var dirs = genDirectives(el);\n  if (dirs) { data += dirs + ','; }\n\n  // key\n  if (el.key) {\n    data += \"key:\" + (el.key) + \",\";\n  }\n  // ref\n  if (el.ref) {\n    data += \"ref:\" + (el.ref) + \",\";\n  }\n  if (el.refInFor) {\n    data += \"refInFor:true,\";\n  }\n  // pre\n  if (el.pre) {\n    data += \"pre:true,\";\n  }\n  // record original tag name for components using \"is\" attribute\n  if (el.component) {\n    data += \"tag:\\\"\" + (el.tag) + \"\\\",\";\n  }\n  // module data generation functions\n  for (var i = 0; i < dataGenFns.length; i++) {\n    data += dataGenFns[i](el);\n  }\n  // attributes\n  if (el.attrs) {\n    data += \"attrs:{\" + (genProps(el.attrs)) + \"},\";\n  }\n  // DOM props\n  if (el.props) {\n    data += \"domProps:{\" + (genProps(el.props)) + \"},\";\n  }\n  // event handlers\n  if (el.events) {\n    data += (genHandlers(el.events)) + \",\";\n  }\n  if (el.nativeEvents) {\n    data += (genHandlers(el.nativeEvents, true)) + \",\";\n  }\n  // slot target\n  if (el.slotTarget) {\n    data += \"slot:\" + (el.slotTarget) + \",\";\n  }\n  // scoped slots\n  if (el.scopedSlots) {\n    data += (genScopedSlots(el.scopedSlots)) + \",\";\n  }\n  // component v-model\n  if (el.model) {\n    data += \"model:{value:\" + (el.model.value) + \",callback:\" + (el.model.callback) + \",expression:\" + (el.model.expression) + \"},\";\n  }\n  // inline-template\n  if (el.inlineTemplate) {\n    var inlineTemplate = genInlineTemplate(el);\n    if (inlineTemplate) {\n      data += inlineTemplate + \",\";\n    }\n  }\n  data = data.replace(/,$/, '') + '}';\n  // v-bind data wrap\n  if (el.wrapData) {\n    data = el.wrapData(data);\n  }\n  return data\n}\n\nfunction genDirectives (el) {\n  var dirs = el.directives;\n  if (!dirs) { return }\n  var res = 'directives:[';\n  var hasRuntime = false;\n  var i, l, dir, needRuntime;\n  for (i = 0, l = dirs.length; i < l; i++) {\n    dir = dirs[i];\n    needRuntime = true;\n    var gen = platformDirectives$1[dir.name] || baseDirectives[dir.name];\n    if (gen) {\n      // compile-time directive that manipulates AST.\n      // returns true if it also needs a runtime counterpart.\n      needRuntime = !!gen(el, dir, warn$3);\n    }\n    if (needRuntime) {\n      hasRuntime = true;\n      res += \"{name:\\\"\" + (dir.name) + \"\\\",rawName:\\\"\" + (dir.rawName) + \"\\\"\" + (dir.value ? (\",value:(\" + (dir.value) + \"),expression:\" + (JSON.stringify(dir.value))) : '') + (dir.arg ? (\",arg:\\\"\" + (dir.arg) + \"\\\"\") : '') + (dir.modifiers ? (\",modifiers:\" + (JSON.stringify(dir.modifiers))) : '') + \"},\";\n    }\n  }\n  if (hasRuntime) {\n    return res.slice(0, -1) + ']'\n  }\n}\n\nfunction genInlineTemplate (el) {\n  var ast = el.children[0];\n  if (process.env.NODE_ENV !== 'production' && (\n    el.children.length > 1 || ast.type !== 1\n  )) {\n    warn$3('Inline-template components must have exactly one child element.');\n  }\n  if (ast.type === 1) {\n    var inlineRenderFns = generate(ast, currentOptions);\n    return (\"inlineTemplate:{render:function(){\" + (inlineRenderFns.render) + \"},staticRenderFns:[\" + (inlineRenderFns.staticRenderFns.map(function (code) { return (\"function(){\" + code + \"}\"); }).join(',')) + \"]}\")\n  }\n}\n\nfunction genScopedSlots (slots) {\n  return (\"scopedSlots:_u([\" + (Object.keys(slots).map(function (key) { return genScopedSlot(key, slots[key]); }).join(',')) + \"])\")\n}\n\nfunction genScopedSlot (key, el) {\n  return \"[\" + key + \",function(\" + (String(el.attrsMap.scope)) + \"){\" +\n    \"return \" + (el.tag === 'template'\n      ? genChildren(el) || 'void 0'\n      : genElement(el)) + \"}]\"\n}\n\nfunction genChildren (el, checkSkip) {\n  var children = el.children;\n  if (children.length) {\n    var el$1 = children[0];\n    // optimize single v-for\n    if (children.length === 1 &&\n        el$1.for &&\n        el$1.tag !== 'template' &&\n        el$1.tag !== 'slot') {\n      return genElement(el$1)\n    }\n    var normalizationType = checkSkip ? getNormalizationType(children) : 0;\n    return (\"[\" + (children.map(genNode).join(',')) + \"]\" + (normalizationType ? (\",\" + normalizationType) : ''))\n  }\n}\n\n// determine the normalization needed for the children array.\n// 0: no normalization needed\n// 1: simple normalization needed (possible 1-level deep nested array)\n// 2: full normalization needed\nfunction getNormalizationType (children) {\n  var res = 0;\n  for (var i = 0; i < children.length; i++) {\n    var el = children[i];\n    if (el.type !== 1) {\n      continue\n    }\n    if (needsNormalization(el) ||\n        (el.ifConditions && el.ifConditions.some(function (c) { return needsNormalization(c.block); }))) {\n      res = 2;\n      break\n    }\n    if (maybeComponent(el) ||\n        (el.ifConditions && el.ifConditions.some(function (c) { return maybeComponent(c.block); }))) {\n      res = 1;\n    }\n  }\n  return res\n}\n\nfunction needsNormalization (el) {\n  return el.for !== undefined || el.tag === 'template' || el.tag === 'slot'\n}\n\nfunction maybeComponent (el) {\n  return !isPlatformReservedTag$1(el.tag)\n}\n\nfunction genNode (node) {\n  if (node.type === 1) {\n    return genElement(node)\n  } else {\n    return genText(node)\n  }\n}\n\nfunction genText (text) {\n  return (\"_v(\" + (text.type === 2\n    ? text.expression // no need for () because already wrapped in _s()\n    : transformSpecialNewlines(JSON.stringify(text.text))) + \")\")\n}\n\nfunction genSlot (el) {\n  var slotName = el.slotName || '\"default\"';\n  var children = genChildren(el);\n  var res = \"_t(\" + slotName + (children ? (\",\" + children) : '');\n  var attrs = el.attrs && (\"{\" + (el.attrs.map(function (a) { return ((camelize(a.name)) + \":\" + (a.value)); }).join(',')) + \"}\");\n  var bind$$1 = el.attrsMap['v-bind'];\n  if ((attrs || bind$$1) && !children) {\n    res += \",null\";\n  }\n  if (attrs) {\n    res += \",\" + attrs;\n  }\n  if (bind$$1) {\n    res += (attrs ? '' : ',null') + \",\" + bind$$1;\n  }\n  return res + ')'\n}\n\n// componentName is el.component, take it as argument to shun flow's pessimistic refinement\nfunction genComponent (componentName, el) {\n  var children = el.inlineTemplate ? null : genChildren(el, true);\n  return (\"_c(\" + componentName + \",\" + (genData(el)) + (children ? (\",\" + children) : '') + \")\")\n}\n\nfunction genProps (props) {\n  var res = '';\n  for (var i = 0; i < props.length; i++) {\n    var prop = props[i];\n    res += \"\\\"\" + (prop.name) + \"\\\":\" + (transformSpecialNewlines(prop.value)) + \",\";\n  }\n  return res.slice(0, -1)\n}\n\n// #3895, #4268\nfunction transformSpecialNewlines (text) {\n  return text\n    .replace(/\\u2028/g, '\\\\u2028')\n    .replace(/\\u2029/g, '\\\\u2029')\n}\n\n/*  */\n\n// these keywords should not appear inside expressions, but operators like\n// typeof, instanceof and in are allowed\nvar prohibitedKeywordRE = new RegExp('\\\\b' + (\n  'do,if,for,let,new,try,var,case,else,with,await,break,catch,class,const,' +\n  'super,throw,while,yield,delete,export,import,return,switch,default,' +\n  'extends,finally,continue,debugger,function,arguments'\n).split(',').join('\\\\b|\\\\b') + '\\\\b');\n\n// these unary operators should not be used as property/method names\nvar unaryOperatorsRE = new RegExp('\\\\b' + (\n  'delete,typeof,void'\n).split(',').join('\\\\s*\\\\([^\\\\)]*\\\\)|\\\\b') + '\\\\s*\\\\([^\\\\)]*\\\\)');\n\n// check valid identifier for v-for\nvar identRE = /[A-Za-z_$][\\w$]*/;\n\n// strip strings in expressions\nvar stripStringRE = /'(?:[^'\\\\]|\\\\.)*'|\"(?:[^\"\\\\]|\\\\.)*\"|`(?:[^`\\\\]|\\\\.)*\\$\\{|\\}(?:[^`\\\\]|\\\\.)*`|`(?:[^`\\\\]|\\\\.)*`/g;\n\n// detect problematic expressions in a template\nfunction detectErrors (ast) {\n  var errors = [];\n  if (ast) {\n    checkNode(ast, errors);\n  }\n  return errors\n}\n\nfunction checkNode (node, errors) {\n  if (node.type === 1) {\n    for (var name in node.attrsMap) {\n      if (dirRE.test(name)) {\n        var value = node.attrsMap[name];\n        if (value) {\n          if (name === 'v-for') {\n            checkFor(node, (\"v-for=\\\"\" + value + \"\\\"\"), errors);\n          } else if (onRE.test(name)) {\n            checkEvent(value, (name + \"=\\\"\" + value + \"\\\"\"), errors);\n          } else {\n            checkExpression(value, (name + \"=\\\"\" + value + \"\\\"\"), errors);\n          }\n        }\n      }\n    }\n    if (node.children) {\n      for (var i = 0; i < node.children.length; i++) {\n        checkNode(node.children[i], errors);\n      }\n    }\n  } else if (node.type === 2) {\n    checkExpression(node.expression, node.text, errors);\n  }\n}\n\nfunction checkEvent (exp, text, errors) {\n  var keywordMatch = exp.replace(stripStringRE, '').match(unaryOperatorsRE);\n  if (keywordMatch) {\n    errors.push(\n      \"avoid using JavaScript unary operator as property name: \" +\n      \"\\\"\" + (keywordMatch[0]) + \"\\\" in expression \" + (text.trim())\n    );\n  }\n  checkExpression(exp, text, errors);\n}\n\nfunction checkFor (node, text, errors) {\n  checkExpression(node.for || '', text, errors);\n  checkIdentifier(node.alias, 'v-for alias', text, errors);\n  checkIdentifier(node.iterator1, 'v-for iterator', text, errors);\n  checkIdentifier(node.iterator2, 'v-for iterator', text, errors);\n}\n\nfunction checkIdentifier (ident, type, text, errors) {\n  if (typeof ident === 'string' && !identRE.test(ident)) {\n    errors.push((\"invalid \" + type + \" \\\"\" + ident + \"\\\" in expression: \" + (text.trim())));\n  }\n}\n\nfunction checkExpression (exp, text, errors) {\n  try {\n    new Function((\"return \" + exp));\n  } catch (e) {\n    var keywordMatch = exp.replace(stripStringRE, '').match(prohibitedKeywordRE);\n    if (keywordMatch) {\n      errors.push(\n        \"avoid using JavaScript keyword as property name: \" +\n        \"\\\"\" + (keywordMatch[0]) + \"\\\" in expression \" + (text.trim())\n      );\n    } else {\n      errors.push((\"invalid expression: \" + (text.trim())));\n    }\n  }\n}\n\n/*  */\n\nfunction baseCompile (\n  template,\n  options\n) {\n  var ast = parse(template.trim(), options);\n  optimize(ast, options);\n  var code = generate(ast, options);\n  return {\n    ast: ast,\n    render: code.render,\n    staticRenderFns: code.staticRenderFns\n  }\n}\n\nfunction makeFunction (code, errors) {\n  try {\n    return new Function(code)\n  } catch (err) {\n    errors.push({ err: err, code: code });\n    return noop\n  }\n}\n\nfunction createCompiler (baseOptions) {\n  var functionCompileCache = Object.create(null);\n\n  function compile (\n    template,\n    options\n  ) {\n    var finalOptions = Object.create(baseOptions);\n    var errors = [];\n    var tips = [];\n    finalOptions.warn = function (msg, tip$$1) {\n      (tip$$1 ? tips : errors).push(msg);\n    };\n\n    if (options) {\n      // merge custom modules\n      if (options.modules) {\n        finalOptions.modules = (baseOptions.modules || []).concat(options.modules);\n      }\n      // merge custom directives\n      if (options.directives) {\n        finalOptions.directives = extend(\n          Object.create(baseOptions.directives),\n          options.directives\n        );\n      }\n      // copy other options\n      for (var key in options) {\n        if (key !== 'modules' && key !== 'directives') {\n          finalOptions[key] = options[key];\n        }\n      }\n    }\n\n    var compiled = baseCompile(template, finalOptions);\n    if (process.env.NODE_ENV !== 'production') {\n      errors.push.apply(errors, detectErrors(compiled.ast));\n    }\n    compiled.errors = errors;\n    compiled.tips = tips;\n    return compiled\n  }\n\n  function compileToFunctions (\n    template,\n    options,\n    vm\n  ) {\n    options = options || {};\n\n    /* istanbul ignore if */\n    if (process.env.NODE_ENV !== 'production') {\n      // detect possible CSP restriction\n      try {\n        new Function('return 1');\n      } catch (e) {\n        if (e.toString().match(/unsafe-eval|CSP/)) {\n          warn(\n            'It seems you are using the standalone build of Vue.js in an ' +\n            'environment with Content Security Policy that prohibits unsafe-eval. ' +\n            'The template compiler cannot work in this environment. Consider ' +\n            'relaxing the policy to allow unsafe-eval or pre-compiling your ' +\n            'templates into render functions.'\n          );\n        }\n      }\n    }\n\n    // check cache\n    var key = options.delimiters\n      ? String(options.delimiters) + template\n      : template;\n    if (functionCompileCache[key]) {\n      return functionCompileCache[key]\n    }\n\n    // compile\n    var compiled = compile(template, options);\n\n    // check compilation errors/tips\n    if (process.env.NODE_ENV !== 'production') {\n      if (compiled.errors && compiled.errors.length) {\n        warn(\n          \"Error compiling template:\\n\\n\" + template + \"\\n\\n\" +\n          compiled.errors.map(function (e) { return (\"- \" + e); }).join('\\n') + '\\n',\n          vm\n        );\n      }\n      if (compiled.tips && compiled.tips.length) {\n        compiled.tips.forEach(function (msg) { return tip(msg, vm); });\n      }\n    }\n\n    // turn code into functions\n    var res = {};\n    var fnGenErrors = [];\n    res.render = makeFunction(compiled.render, fnGenErrors);\n    var l = compiled.staticRenderFns.length;\n    res.staticRenderFns = new Array(l);\n    for (var i = 0; i < l; i++) {\n      res.staticRenderFns[i] = makeFunction(compiled.staticRenderFns[i], fnGenErrors);\n    }\n\n    // check function generation errors.\n    // this should only happen if there is a bug in the compiler itself.\n    // mostly for codegen development use\n    /* istanbul ignore if */\n    if (process.env.NODE_ENV !== 'production') {\n      if ((!compiled.errors || !compiled.errors.length) && fnGenErrors.length) {\n        warn(\n          \"Failed to generate render function:\\n\\n\" +\n          fnGenErrors.map(function (ref) {\n            var err = ref.err;\n            var code = ref.code;\n\n            return ((err.toString()) + \" in\\n\\n\" + code + \"\\n\");\n        }).join('\\n'),\n          vm\n        );\n      }\n    }\n\n    return (functionCompileCache[key] = res)\n  }\n\n  return {\n    compile: compile,\n    compileToFunctions: compileToFunctions\n  }\n}\n\n/*  */\n\nfunction transformNode (el, options) {\n  var warn = options.warn || baseWarn;\n  var staticClass = getAndRemoveAttr(el, 'class');\n  if (process.env.NODE_ENV !== 'production' && staticClass) {\n    var expression = parseText(staticClass, options.delimiters);\n    if (expression) {\n      warn(\n        \"class=\\\"\" + staticClass + \"\\\": \" +\n        'Interpolation inside attributes has been removed. ' +\n        'Use v-bind or the colon shorthand instead. For example, ' +\n        'instead of <div class=\"{{ val }}\">, use <div :class=\"val\">.'\n      );\n    }\n  }\n  if (staticClass) {\n    el.staticClass = JSON.stringify(staticClass);\n  }\n  var classBinding = getBindingAttr(el, 'class', false /* getStatic */);\n  if (classBinding) {\n    el.classBinding = classBinding;\n  }\n}\n\nfunction genData$1 (el) {\n  var data = '';\n  if (el.staticClass) {\n    data += \"staticClass:\" + (el.staticClass) + \",\";\n  }\n  if (el.classBinding) {\n    data += \"class:\" + (el.classBinding) + \",\";\n  }\n  return data\n}\n\nvar klass$1 = {\n  staticKeys: ['staticClass'],\n  transformNode: transformNode,\n  genData: genData$1\n};\n\n/*  */\n\nfunction transformNode$1 (el, options) {\n  var warn = options.warn || baseWarn;\n  var staticStyle = getAndRemoveAttr(el, 'style');\n  if (staticStyle) {\n    /* istanbul ignore if */\n    if (process.env.NODE_ENV !== 'production') {\n      var expression = parseText(staticStyle, options.delimiters);\n      if (expression) {\n        warn(\n          \"style=\\\"\" + staticStyle + \"\\\": \" +\n          'Interpolation inside attributes has been removed. ' +\n          'Use v-bind or the colon shorthand instead. For example, ' +\n          'instead of <div style=\"{{ val }}\">, use <div :style=\"val\">.'\n        );\n      }\n    }\n    el.staticStyle = JSON.stringify(parseStyleText(staticStyle));\n  }\n\n  var styleBinding = getBindingAttr(el, 'style', false /* getStatic */);\n  if (styleBinding) {\n    el.styleBinding = styleBinding;\n  }\n}\n\nfunction genData$2 (el) {\n  var data = '';\n  if (el.staticStyle) {\n    data += \"staticStyle:\" + (el.staticStyle) + \",\";\n  }\n  if (el.styleBinding) {\n    data += \"style:(\" + (el.styleBinding) + \"),\";\n  }\n  return data\n}\n\nvar style$1 = {\n  staticKeys: ['staticStyle'],\n  transformNode: transformNode$1,\n  genData: genData$2\n};\n\nvar modules$1 = [\n  klass$1,\n  style$1\n];\n\n/*  */\n\nfunction text (el, dir) {\n  if (dir.value) {\n    addProp(el, 'textContent', (\"_s(\" + (dir.value) + \")\"));\n  }\n}\n\n/*  */\n\nfunction html (el, dir) {\n  if (dir.value) {\n    addProp(el, 'innerHTML', (\"_s(\" + (dir.value) + \")\"));\n  }\n}\n\nvar directives$1 = {\n  model: model,\n  text: text,\n  html: html\n};\n\n/*  */\n\nvar baseOptions = {\n  expectHTML: true,\n  modules: modules$1,\n  directives: directives$1,\n  isPreTag: isPreTag,\n  isUnaryTag: isUnaryTag,\n  mustUseProp: mustUseProp,\n  canBeLeftOpenTag: canBeLeftOpenTag,\n  isReservedTag: isReservedTag,\n  getTagNamespace: getTagNamespace,\n  staticKeys: genStaticKeys(modules$1)\n};\n\nvar ref$1 = createCompiler(baseOptions);\nvar compileToFunctions = ref$1.compileToFunctions;\n\n/*  */\n\nvar idToTemplate = cached(function (id) {\n  var el = query(id);\n  return el && el.innerHTML\n});\n\nvar mount = Vue$3.prototype.$mount;\nVue$3.prototype.$mount = function (\n  el,\n  hydrating\n) {\n  el = el && query(el);\n\n  /* istanbul ignore if */\n  if (el === document.body || el === document.documentElement) {\n    process.env.NODE_ENV !== 'production' && warn(\n      \"Do not mount Vue to <html> or <body> - mount to normal elements instead.\"\n    );\n    return this\n  }\n\n  var options = this.$options;\n  // resolve template/el and convert to render function\n  if (!options.render) {\n    var template = options.template;\n    if (template) {\n      if (typeof template === 'string') {\n        if (template.charAt(0) === '#') {\n          template = idToTemplate(template);\n          /* istanbul ignore if */\n          if (process.env.NODE_ENV !== 'production' && !template) {\n            warn(\n              (\"Template element not found or is empty: \" + (options.template)),\n              this\n            );\n          }\n        }\n      } else if (template.nodeType) {\n        template = template.innerHTML;\n      } else {\n        if (process.env.NODE_ENV !== 'production') {\n          warn('invalid template option:' + template, this);\n        }\n        return this\n      }\n    } else if (el) {\n      template = getOuterHTML(el);\n    }\n    if (template) {\n      /* istanbul ignore if */\n      if (process.env.NODE_ENV !== 'production' && config.performance && mark) {\n        mark('compile');\n      }\n\n      var ref = compileToFunctions(template, {\n        shouldDecodeNewlines: shouldDecodeNewlines,\n        delimiters: options.delimiters\n      }, this);\n      var render = ref.render;\n      var staticRenderFns = ref.staticRenderFns;\n      options.render = render;\n      options.staticRenderFns = staticRenderFns;\n\n      /* istanbul ignore if */\n      if (process.env.NODE_ENV !== 'production' && config.performance && mark) {\n        mark('compile end');\n        measure(((this._name) + \" compile\"), 'compile', 'compile end');\n      }\n    }\n  }\n  return mount.call(this, el, hydrating)\n};\n\n/**\n * Get outerHTML of elements, taking care\n * of SVG elements in IE as well.\n */\nfunction getOuterHTML (el) {\n  if (el.outerHTML) {\n    return el.outerHTML\n  } else {\n    var container = document.createElement('div');\n    container.appendChild(el.cloneNode(true));\n    return container.innerHTML\n  }\n}\n\nVue$3.compile = compileToFunctions;\n\nexport default Vue$3;\n"
  },
  {
    "path": "static/vuejs/vue.js",
    "content": "/*!\n * Vue.js v2.2.6\n * (c) 2014-2017 Evan You\n * Released under the MIT License.\n */\n(function (global, factory) {\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :\n\ttypeof define === 'function' && define.amd ? define(factory) :\n\t(global.Vue = factory());\n}(this, (function () { 'use strict';\n\n/*  */\n\n/**\n * Convert a value to a string that is actually rendered.\n */\nfunction _toString (val) {\n  return val == null\n    ? ''\n    : typeof val === 'object'\n      ? JSON.stringify(val, null, 2)\n      : String(val)\n}\n\n/**\n * Convert a input value to a number for persistence.\n * If the conversion fails, return original string.\n */\nfunction toNumber (val) {\n  var n = parseFloat(val);\n  return isNaN(n) ? val : n\n}\n\n/**\n * Make a map and return a function for checking if a key\n * is in that map.\n */\nfunction makeMap (\n  str,\n  expectsLowerCase\n) {\n  var map = Object.create(null);\n  var list = str.split(',');\n  for (var i = 0; i < list.length; i++) {\n    map[list[i]] = true;\n  }\n  return expectsLowerCase\n    ? function (val) { return map[val.toLowerCase()]; }\n    : function (val) { return map[val]; }\n}\n\n/**\n * Check if a tag is a built-in tag.\n */\nvar isBuiltInTag = makeMap('slot,component', true);\n\n/**\n * Remove an item from an array\n */\nfunction remove (arr, item) {\n  if (arr.length) {\n    var index = arr.indexOf(item);\n    if (index > -1) {\n      return arr.splice(index, 1)\n    }\n  }\n}\n\n/**\n * Check whether the object has the property.\n */\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nfunction hasOwn (obj, key) {\n  return hasOwnProperty.call(obj, key)\n}\n\n/**\n * Check if value is primitive\n */\nfunction isPrimitive (value) {\n  return typeof value === 'string' || typeof value === 'number'\n}\n\n/**\n * Create a cached version of a pure function.\n */\nfunction cached (fn) {\n  var cache = Object.create(null);\n  return (function cachedFn (str) {\n    var hit = cache[str];\n    return hit || (cache[str] = fn(str))\n  })\n}\n\n/**\n * Camelize a hyphen-delimited string.\n */\nvar camelizeRE = /-(\\w)/g;\nvar camelize = cached(function (str) {\n  return str.replace(camelizeRE, function (_, c) { return c ? c.toUpperCase() : ''; })\n});\n\n/**\n * Capitalize a string.\n */\nvar capitalize = cached(function (str) {\n  return str.charAt(0).toUpperCase() + str.slice(1)\n});\n\n/**\n * Hyphenate a camelCase string.\n */\nvar hyphenateRE = /([^-])([A-Z])/g;\nvar hyphenate = cached(function (str) {\n  return str\n    .replace(hyphenateRE, '$1-$2')\n    .replace(hyphenateRE, '$1-$2')\n    .toLowerCase()\n});\n\n/**\n * Simple bind, faster than native\n */\nfunction bind (fn, ctx) {\n  function boundFn (a) {\n    var l = arguments.length;\n    return l\n      ? l > 1\n        ? fn.apply(ctx, arguments)\n        : fn.call(ctx, a)\n      : fn.call(ctx)\n  }\n  // record original fn length\n  boundFn._length = fn.length;\n  return boundFn\n}\n\n/**\n * Convert an Array-like object to a real Array.\n */\nfunction toArray (list, start) {\n  start = start || 0;\n  var i = list.length - start;\n  var ret = new Array(i);\n  while (i--) {\n    ret[i] = list[i + start];\n  }\n  return ret\n}\n\n/**\n * Mix properties into target object.\n */\nfunction extend (to, _from) {\n  for (var key in _from) {\n    to[key] = _from[key];\n  }\n  return to\n}\n\n/**\n * Quick object check - this is primarily used to tell\n * Objects from primitive values when we know the value\n * is a JSON-compliant type.\n */\nfunction isObject (obj) {\n  return obj !== null && typeof obj === 'object'\n}\n\n/**\n * Strict object type check. Only returns true\n * for plain JavaScript objects.\n */\nvar toString = Object.prototype.toString;\nvar OBJECT_STRING = '[object Object]';\nfunction isPlainObject (obj) {\n  return toString.call(obj) === OBJECT_STRING\n}\n\n/**\n * Merge an Array of Objects into a single Object.\n */\nfunction toObject (arr) {\n  var res = {};\n  for (var i = 0; i < arr.length; i++) {\n    if (arr[i]) {\n      extend(res, arr[i]);\n    }\n  }\n  return res\n}\n\n/**\n * Perform no operation.\n */\nfunction noop () {}\n\n/**\n * Always return false.\n */\nvar no = function () { return false; };\n\n/**\n * Return same value\n */\nvar identity = function (_) { return _; };\n\n/**\n * Generate a static keys string from compiler modules.\n */\nfunction genStaticKeys (modules) {\n  return modules.reduce(function (keys, m) {\n    return keys.concat(m.staticKeys || [])\n  }, []).join(',')\n}\n\n/**\n * Check if two values are loosely equal - that is,\n * if they are plain objects, do they have the same shape?\n */\nfunction looseEqual (a, b) {\n  var isObjectA = isObject(a);\n  var isObjectB = isObject(b);\n  if (isObjectA && isObjectB) {\n    try {\n      return JSON.stringify(a) === JSON.stringify(b)\n    } catch (e) {\n      // possible circular reference\n      return a === b\n    }\n  } else if (!isObjectA && !isObjectB) {\n    return String(a) === String(b)\n  } else {\n    return false\n  }\n}\n\nfunction looseIndexOf (arr, val) {\n  for (var i = 0; i < arr.length; i++) {\n    if (looseEqual(arr[i], val)) { return i }\n  }\n  return -1\n}\n\n/**\n * Ensure a function is called only once.\n */\nfunction once (fn) {\n  var called = false;\n  return function () {\n    if (!called) {\n      called = true;\n      fn();\n    }\n  }\n}\n\n/*  */\n\nvar config = {\n  /**\n   * Option merge strategies (used in core/util/options)\n   */\n  optionMergeStrategies: Object.create(null),\n\n  /**\n   * Whether to suppress warnings.\n   */\n  silent: false,\n\n  /**\n   * Show production mode tip message on boot?\n   */\n  productionTip: \"development\" !== 'production',\n\n  /**\n   * Whether to enable devtools\n   */\n  devtools: \"development\" !== 'production',\n\n  /**\n   * Whether to record perf\n   */\n  performance: false,\n\n  /**\n   * Error handler for watcher errors\n   */\n  errorHandler: null,\n\n  /**\n   * Ignore certain custom elements\n   */\n  ignoredElements: [],\n\n  /**\n   * Custom user key aliases for v-on\n   */\n  keyCodes: Object.create(null),\n\n  /**\n   * Check if a tag is reserved so that it cannot be registered as a\n   * component. This is platform-dependent and may be overwritten.\n   */\n  isReservedTag: no,\n\n  /**\n   * Check if a tag is an unknown element.\n   * Platform-dependent.\n   */\n  isUnknownElement: no,\n\n  /**\n   * Get the namespace of an element\n   */\n  getTagNamespace: noop,\n\n  /**\n   * Parse the real tag name for the specific platform.\n   */\n  parsePlatformTagName: identity,\n\n  /**\n   * Check if an attribute must be bound using property, e.g. value\n   * Platform-dependent.\n   */\n  mustUseProp: no,\n\n  /**\n   * List of asset types that a component can own.\n   */\n  _assetTypes: [\n    'component',\n    'directive',\n    'filter'\n  ],\n\n  /**\n   * List of lifecycle hooks.\n   */\n  _lifecycleHooks: [\n    'beforeCreate',\n    'created',\n    'beforeMount',\n    'mounted',\n    'beforeUpdate',\n    'updated',\n    'beforeDestroy',\n    'destroyed',\n    'activated',\n    'deactivated'\n  ],\n\n  /**\n   * Max circular updates allowed in a scheduler flush cycle.\n   */\n  _maxUpdateCount: 100\n};\n\n/*  */\n\nvar emptyObject = Object.freeze({});\n\n/**\n * Check if a string starts with $ or _\n */\nfunction isReserved (str) {\n  var c = (str + '').charCodeAt(0);\n  return c === 0x24 || c === 0x5F\n}\n\n/**\n * Define a property.\n */\nfunction def (obj, key, val, enumerable) {\n  Object.defineProperty(obj, key, {\n    value: val,\n    enumerable: !!enumerable,\n    writable: true,\n    configurable: true\n  });\n}\n\n/**\n * Parse simple path.\n */\nvar bailRE = /[^\\w.$]/;\nfunction parsePath (path) {\n  if (bailRE.test(path)) {\n    return\n  }\n  var segments = path.split('.');\n  return function (obj) {\n    for (var i = 0; i < segments.length; i++) {\n      if (!obj) { return }\n      obj = obj[segments[i]];\n    }\n    return obj\n  }\n}\n\n/*  */\n/* globals MutationObserver */\n\n// can we use __proto__?\nvar hasProto = '__proto__' in {};\n\n// Browser environment sniffing\nvar inBrowser = typeof window !== 'undefined';\nvar UA = inBrowser && window.navigator.userAgent.toLowerCase();\nvar isIE = UA && /msie|trident/.test(UA);\nvar isIE9 = UA && UA.indexOf('msie 9.0') > 0;\nvar isEdge = UA && UA.indexOf('edge/') > 0;\nvar isAndroid = UA && UA.indexOf('android') > 0;\nvar isIOS = UA && /iphone|ipad|ipod|ios/.test(UA);\nvar isChrome = UA && /chrome\\/\\d+/.test(UA) && !isEdge;\n\n// this needs to be lazy-evaled because vue may be required before\n// vue-server-renderer can set VUE_ENV\nvar _isServer;\nvar isServerRendering = function () {\n  if (_isServer === undefined) {\n    /* istanbul ignore if */\n    if (!inBrowser && typeof global !== 'undefined') {\n      // detect presence of vue-server-renderer and avoid\n      // Webpack shimming the process\n      _isServer = global['process'].env.VUE_ENV === 'server';\n    } else {\n      _isServer = false;\n    }\n  }\n  return _isServer\n};\n\n// detect devtools\nvar devtools = inBrowser && window.__VUE_DEVTOOLS_GLOBAL_HOOK__;\n\n/* istanbul ignore next */\nfunction isNative (Ctor) {\n  return /native code/.test(Ctor.toString())\n}\n\nvar hasSymbol =\n  typeof Symbol !== 'undefined' && isNative(Symbol) &&\n  typeof Reflect !== 'undefined' && isNative(Reflect.ownKeys);\n\n/**\n * Defer a task to execute it asynchronously.\n */\nvar nextTick = (function () {\n  var callbacks = [];\n  var pending = false;\n  var timerFunc;\n\n  function nextTickHandler () {\n    pending = false;\n    var copies = callbacks.slice(0);\n    callbacks.length = 0;\n    for (var i = 0; i < copies.length; i++) {\n      copies[i]();\n    }\n  }\n\n  // the nextTick behavior leverages the microtask queue, which can be accessed\n  // via either native Promise.then or MutationObserver.\n  // MutationObserver has wider support, however it is seriously bugged in\n  // UIWebView in iOS >= 9.3.3 when triggered in touch event handlers. It\n  // completely stops working after triggering a few times... so, if native\n  // Promise is available, we will use it:\n  /* istanbul ignore if */\n  if (typeof Promise !== 'undefined' && isNative(Promise)) {\n    var p = Promise.resolve();\n    var logError = function (err) { console.error(err); };\n    timerFunc = function () {\n      p.then(nextTickHandler).catch(logError);\n      // in problematic UIWebViews, Promise.then doesn't completely break, but\n      // it can get stuck in a weird state where callbacks are pushed into the\n      // microtask queue but the queue isn't being flushed, until the browser\n      // needs to do some other work, e.g. handle a timer. Therefore we can\n      // \"force\" the microtask queue to be flushed by adding an empty timer.\n      if (isIOS) { setTimeout(noop); }\n    };\n  } else if (typeof MutationObserver !== 'undefined' && (\n    isNative(MutationObserver) ||\n    // PhantomJS and iOS 7.x\n    MutationObserver.toString() === '[object MutationObserverConstructor]'\n  )) {\n    // use MutationObserver where native Promise is not available,\n    // e.g. PhantomJS IE11, iOS7, Android 4.4\n    var counter = 1;\n    var observer = new MutationObserver(nextTickHandler);\n    var textNode = document.createTextNode(String(counter));\n    observer.observe(textNode, {\n      characterData: true\n    });\n    timerFunc = function () {\n      counter = (counter + 1) % 2;\n      textNode.data = String(counter);\n    };\n  } else {\n    // fallback to setTimeout\n    /* istanbul ignore next */\n    timerFunc = function () {\n      setTimeout(nextTickHandler, 0);\n    };\n  }\n\n  return function queueNextTick (cb, ctx) {\n    var _resolve;\n    callbacks.push(function () {\n      if (cb) { cb.call(ctx); }\n      if (_resolve) { _resolve(ctx); }\n    });\n    if (!pending) {\n      pending = true;\n      timerFunc();\n    }\n    if (!cb && typeof Promise !== 'undefined') {\n      return new Promise(function (resolve) {\n        _resolve = resolve;\n      })\n    }\n  }\n})();\n\nvar _Set;\n/* istanbul ignore if */\nif (typeof Set !== 'undefined' && isNative(Set)) {\n  // use native Set when available.\n  _Set = Set;\n} else {\n  // a non-standard Set polyfill that only works with primitive keys.\n  _Set = (function () {\n    function Set () {\n      this.set = Object.create(null);\n    }\n    Set.prototype.has = function has (key) {\n      return this.set[key] === true\n    };\n    Set.prototype.add = function add (key) {\n      this.set[key] = true;\n    };\n    Set.prototype.clear = function clear () {\n      this.set = Object.create(null);\n    };\n\n    return Set;\n  }());\n}\n\nvar warn = noop;\nvar tip = noop;\nvar formatComponentName;\n\n{\n  var hasConsole = typeof console !== 'undefined';\n  var classifyRE = /(?:^|[-_])(\\w)/g;\n  var classify = function (str) { return str\n    .replace(classifyRE, function (c) { return c.toUpperCase(); })\n    .replace(/[-_]/g, ''); };\n\n  warn = function (msg, vm) {\n    if (hasConsole && (!config.silent)) {\n      console.error(\"[Vue warn]: \" + msg + \" \" + (\n        vm ? formatLocation(formatComponentName(vm)) : ''\n      ));\n    }\n  };\n\n  tip = function (msg, vm) {\n    if (hasConsole && (!config.silent)) {\n      console.warn(\"[Vue tip]: \" + msg + \" \" + (\n        vm ? formatLocation(formatComponentName(vm)) : ''\n      ));\n    }\n  };\n\n  formatComponentName = function (vm, includeFile) {\n    if (vm.$root === vm) {\n      return '<Root>'\n    }\n    var name = typeof vm === 'string'\n      ? vm\n      : typeof vm === 'function' && vm.options\n        ? vm.options.name\n        : vm._isVue\n          ? vm.$options.name || vm.$options._componentTag\n          : vm.name;\n\n    var file = vm._isVue && vm.$options.__file;\n    if (!name && file) {\n      var match = file.match(/([^/\\\\]+)\\.vue$/);\n      name = match && match[1];\n    }\n\n    return (\n      (name ? (\"<\" + (classify(name)) + \">\") : \"<Anonymous>\") +\n      (file && includeFile !== false ? (\" at \" + file) : '')\n    )\n  };\n\n  var formatLocation = function (str) {\n    if (str === \"<Anonymous>\") {\n      str += \" - use the \\\"name\\\" option for better debugging messages.\";\n    }\n    return (\"\\n(found in \" + str + \")\")\n  };\n}\n\n/*  */\n\n\nvar uid$1 = 0;\n\n/**\n * A dep is an observable that can have multiple\n * directives subscribing to it.\n */\nvar Dep = function Dep () {\n  this.id = uid$1++;\n  this.subs = [];\n};\n\nDep.prototype.addSub = function addSub (sub) {\n  this.subs.push(sub);\n};\n\nDep.prototype.removeSub = function removeSub (sub) {\n  remove(this.subs, sub);\n};\n\nDep.prototype.depend = function depend () {\n  if (Dep.target) {\n    Dep.target.addDep(this);\n  }\n};\n\nDep.prototype.notify = function notify () {\n  // stabilize the subscriber list first\n  var subs = this.subs.slice();\n  for (var i = 0, l = subs.length; i < l; i++) {\n    subs[i].update();\n  }\n};\n\n// the current target watcher being evaluated.\n// this is globally unique because there could be only one\n// watcher being evaluated at any time.\nDep.target = null;\nvar targetStack = [];\n\nfunction pushTarget (_target) {\n  if (Dep.target) { targetStack.push(Dep.target); }\n  Dep.target = _target;\n}\n\nfunction popTarget () {\n  Dep.target = targetStack.pop();\n}\n\n/*\n * not type checking this file because flow doesn't play well with\n * dynamically accessing methods on Array prototype\n */\n\nvar arrayProto = Array.prototype;\nvar arrayMethods = Object.create(arrayProto);[\n  'push',\n  'pop',\n  'shift',\n  'unshift',\n  'splice',\n  'sort',\n  'reverse'\n]\n.forEach(function (method) {\n  // cache original method\n  var original = arrayProto[method];\n  def(arrayMethods, method, function mutator () {\n    var arguments$1 = arguments;\n\n    // avoid leaking arguments:\n    // http://jsperf.com/closure-with-arguments\n    var i = arguments.length;\n    var args = new Array(i);\n    while (i--) {\n      args[i] = arguments$1[i];\n    }\n    var result = original.apply(this, args);\n    var ob = this.__ob__;\n    var inserted;\n    switch (method) {\n      case 'push':\n        inserted = args;\n        break\n      case 'unshift':\n        inserted = args;\n        break\n      case 'splice':\n        inserted = args.slice(2);\n        break\n    }\n    if (inserted) { ob.observeArray(inserted); }\n    // notify change\n    ob.dep.notify();\n    return result\n  });\n});\n\n/*  */\n\nvar arrayKeys = Object.getOwnPropertyNames(arrayMethods);\n\n/**\n * By default, when a reactive property is set, the new value is\n * also converted to become reactive. However when passing down props,\n * we don't want to force conversion because the value may be a nested value\n * under a frozen data structure. Converting it would defeat the optimization.\n */\nvar observerState = {\n  shouldConvert: true,\n  isSettingProps: false\n};\n\n/**\n * Observer class that are attached to each observed\n * object. Once attached, the observer converts target\n * object's property keys into getter/setters that\n * collect dependencies and dispatches updates.\n */\nvar Observer = function Observer (value) {\n  this.value = value;\n  this.dep = new Dep();\n  this.vmCount = 0;\n  def(value, '__ob__', this);\n  if (Array.isArray(value)) {\n    var augment = hasProto\n      ? protoAugment\n      : copyAugment;\n    augment(value, arrayMethods, arrayKeys);\n    this.observeArray(value);\n  } else {\n    this.walk(value);\n  }\n};\n\n/**\n * Walk through each property and convert them into\n * getter/setters. This method should only be called when\n * value type is Object.\n */\nObserver.prototype.walk = function walk (obj) {\n  var keys = Object.keys(obj);\n  for (var i = 0; i < keys.length; i++) {\n    defineReactive$$1(obj, keys[i], obj[keys[i]]);\n  }\n};\n\n/**\n * Observe a list of Array items.\n */\nObserver.prototype.observeArray = function observeArray (items) {\n  for (var i = 0, l = items.length; i < l; i++) {\n    observe(items[i]);\n  }\n};\n\n// helpers\n\n/**\n * Augment an target Object or Array by intercepting\n * the prototype chain using __proto__\n */\nfunction protoAugment (target, src) {\n  /* eslint-disable no-proto */\n  target.__proto__ = src;\n  /* eslint-enable no-proto */\n}\n\n/**\n * Augment an target Object or Array by defining\n * hidden properties.\n */\n/* istanbul ignore next */\nfunction copyAugment (target, src, keys) {\n  for (var i = 0, l = keys.length; i < l; i++) {\n    var key = keys[i];\n    def(target, key, src[key]);\n  }\n}\n\n/**\n * Attempt to create an observer instance for a value,\n * returns the new observer if successfully observed,\n * or the existing observer if the value already has one.\n */\nfunction observe (value, asRootData) {\n  if (!isObject(value)) {\n    return\n  }\n  var ob;\n  if (hasOwn(value, '__ob__') && value.__ob__ instanceof Observer) {\n    ob = value.__ob__;\n  } else if (\n    observerState.shouldConvert &&\n    !isServerRendering() &&\n    (Array.isArray(value) || isPlainObject(value)) &&\n    Object.isExtensible(value) &&\n    !value._isVue\n  ) {\n    ob = new Observer(value);\n  }\n  if (asRootData && ob) {\n    ob.vmCount++;\n  }\n  return ob\n}\n\n/**\n * Define a reactive property on an Object.\n */\nfunction defineReactive$$1 (\n  obj,\n  key,\n  val,\n  customSetter\n) {\n  var dep = new Dep();\n\n  var property = Object.getOwnPropertyDescriptor(obj, key);\n  if (property && property.configurable === false) {\n    return\n  }\n\n  // cater for pre-defined getter/setters\n  var getter = property && property.get;\n  var setter = property && property.set;\n\n  var childOb = observe(val);\n  Object.defineProperty(obj, key, {\n    enumerable: true,\n    configurable: true,\n    get: function reactiveGetter () {\n      var value = getter ? getter.call(obj) : val;\n      if (Dep.target) {\n        dep.depend();\n        if (childOb) {\n          childOb.dep.depend();\n        }\n        if (Array.isArray(value)) {\n          dependArray(value);\n        }\n      }\n      return value\n    },\n    set: function reactiveSetter (newVal) {\n      var value = getter ? getter.call(obj) : val;\n      /* eslint-disable no-self-compare */\n      if (newVal === value || (newVal !== newVal && value !== value)) {\n        return\n      }\n      /* eslint-enable no-self-compare */\n      if (\"development\" !== 'production' && customSetter) {\n        customSetter();\n      }\n      if (setter) {\n        setter.call(obj, newVal);\n      } else {\n        val = newVal;\n      }\n      childOb = observe(newVal);\n      dep.notify();\n    }\n  });\n}\n\n/**\n * Set a property on an object. Adds the new property and\n * triggers change notification if the property doesn't\n * already exist.\n */\nfunction set (target, key, val) {\n  if (Array.isArray(target) && typeof key === 'number') {\n    target.length = Math.max(target.length, key);\n    target.splice(key, 1, val);\n    return val\n  }\n  if (hasOwn(target, key)) {\n    target[key] = val;\n    return val\n  }\n  var ob = (target ).__ob__;\n  if (target._isVue || (ob && ob.vmCount)) {\n    \"development\" !== 'production' && warn(\n      'Avoid adding reactive properties to a Vue instance or its root $data ' +\n      'at runtime - declare it upfront in the data option.'\n    );\n    return val\n  }\n  if (!ob) {\n    target[key] = val;\n    return val\n  }\n  defineReactive$$1(ob.value, key, val);\n  ob.dep.notify();\n  return val\n}\n\n/**\n * Delete a property and trigger change if necessary.\n */\nfunction del (target, key) {\n  if (Array.isArray(target) && typeof key === 'number') {\n    target.splice(key, 1);\n    return\n  }\n  var ob = (target ).__ob__;\n  if (target._isVue || (ob && ob.vmCount)) {\n    \"development\" !== 'production' && warn(\n      'Avoid deleting properties on a Vue instance or its root $data ' +\n      '- just set it to null.'\n    );\n    return\n  }\n  if (!hasOwn(target, key)) {\n    return\n  }\n  delete target[key];\n  if (!ob) {\n    return\n  }\n  ob.dep.notify();\n}\n\n/**\n * Collect dependencies on array elements when the array is touched, since\n * we cannot intercept array element access like property getters.\n */\nfunction dependArray (value) {\n  for (var e = (void 0), i = 0, l = value.length; i < l; i++) {\n    e = value[i];\n    e && e.__ob__ && e.__ob__.dep.depend();\n    if (Array.isArray(e)) {\n      dependArray(e);\n    }\n  }\n}\n\n/*  */\n\n/**\n * Option overwriting strategies are functions that handle\n * how to merge a parent option value and a child option\n * value into the final value.\n */\nvar strats = config.optionMergeStrategies;\n\n/**\n * Options with restrictions\n */\n{\n  strats.el = strats.propsData = function (parent, child, vm, key) {\n    if (!vm) {\n      warn(\n        \"option \\\"\" + key + \"\\\" can only be used during instance \" +\n        'creation with the `new` keyword.'\n      );\n    }\n    return defaultStrat(parent, child)\n  };\n}\n\n/**\n * Helper that recursively merges two data objects together.\n */\nfunction mergeData (to, from) {\n  if (!from) { return to }\n  var key, toVal, fromVal;\n  var keys = Object.keys(from);\n  for (var i = 0; i < keys.length; i++) {\n    key = keys[i];\n    toVal = to[key];\n    fromVal = from[key];\n    if (!hasOwn(to, key)) {\n      set(to, key, fromVal);\n    } else if (isPlainObject(toVal) && isPlainObject(fromVal)) {\n      mergeData(toVal, fromVal);\n    }\n  }\n  return to\n}\n\n/**\n * Data\n */\nstrats.data = function (\n  parentVal,\n  childVal,\n  vm\n) {\n  if (!vm) {\n    // in a Vue.extend merge, both should be functions\n    if (!childVal) {\n      return parentVal\n    }\n    if (typeof childVal !== 'function') {\n      \"development\" !== 'production' && warn(\n        'The \"data\" option should be a function ' +\n        'that returns a per-instance value in component ' +\n        'definitions.',\n        vm\n      );\n      return parentVal\n    }\n    if (!parentVal) {\n      return childVal\n    }\n    // when parentVal & childVal are both present,\n    // we need to return a function that returns the\n    // merged result of both functions... no need to\n    // check if parentVal is a function here because\n    // it has to be a function to pass previous merges.\n    return function mergedDataFn () {\n      return mergeData(\n        childVal.call(this),\n        parentVal.call(this)\n      )\n    }\n  } else if (parentVal || childVal) {\n    return function mergedInstanceDataFn () {\n      // instance merge\n      var instanceData = typeof childVal === 'function'\n        ? childVal.call(vm)\n        : childVal;\n      var defaultData = typeof parentVal === 'function'\n        ? parentVal.call(vm)\n        : undefined;\n      if (instanceData) {\n        return mergeData(instanceData, defaultData)\n      } else {\n        return defaultData\n      }\n    }\n  }\n};\n\n/**\n * Hooks and props are merged as arrays.\n */\nfunction mergeHook (\n  parentVal,\n  childVal\n) {\n  return childVal\n    ? parentVal\n      ? parentVal.concat(childVal)\n      : Array.isArray(childVal)\n        ? childVal\n        : [childVal]\n    : parentVal\n}\n\nconfig._lifecycleHooks.forEach(function (hook) {\n  strats[hook] = mergeHook;\n});\n\n/**\n * Assets\n *\n * When a vm is present (instance creation), we need to do\n * a three-way merge between constructor options, instance\n * options and parent options.\n */\nfunction mergeAssets (parentVal, childVal) {\n  var res = Object.create(parentVal || null);\n  return childVal\n    ? extend(res, childVal)\n    : res\n}\n\nconfig._assetTypes.forEach(function (type) {\n  strats[type + 's'] = mergeAssets;\n});\n\n/**\n * Watchers.\n *\n * Watchers hashes should not overwrite one\n * another, so we merge them as arrays.\n */\nstrats.watch = function (parentVal, childVal) {\n  /* istanbul ignore if */\n  if (!childVal) { return Object.create(parentVal || null) }\n  if (!parentVal) { return childVal }\n  var ret = {};\n  extend(ret, parentVal);\n  for (var key in childVal) {\n    var parent = ret[key];\n    var child = childVal[key];\n    if (parent && !Array.isArray(parent)) {\n      parent = [parent];\n    }\n    ret[key] = parent\n      ? parent.concat(child)\n      : [child];\n  }\n  return ret\n};\n\n/**\n * Other object hashes.\n */\nstrats.props =\nstrats.methods =\nstrats.computed = function (parentVal, childVal) {\n  if (!childVal) { return Object.create(parentVal || null) }\n  if (!parentVal) { return childVal }\n  var ret = Object.create(null);\n  extend(ret, parentVal);\n  extend(ret, childVal);\n  return ret\n};\n\n/**\n * Default strategy.\n */\nvar defaultStrat = function (parentVal, childVal) {\n  return childVal === undefined\n    ? parentVal\n    : childVal\n};\n\n/**\n * Validate component names\n */\nfunction checkComponents (options) {\n  for (var key in options.components) {\n    var lower = key.toLowerCase();\n    if (isBuiltInTag(lower) || config.isReservedTag(lower)) {\n      warn(\n        'Do not use built-in or reserved HTML elements as component ' +\n        'id: ' + key\n      );\n    }\n  }\n}\n\n/**\n * Ensure all props option syntax are normalized into the\n * Object-based format.\n */\nfunction normalizeProps (options) {\n  var props = options.props;\n  if (!props) { return }\n  var res = {};\n  var i, val, name;\n  if (Array.isArray(props)) {\n    i = props.length;\n    while (i--) {\n      val = props[i];\n      if (typeof val === 'string') {\n        name = camelize(val);\n        res[name] = { type: null };\n      } else {\n        warn('props must be strings when using array syntax.');\n      }\n    }\n  } else if (isPlainObject(props)) {\n    for (var key in props) {\n      val = props[key];\n      name = camelize(key);\n      res[name] = isPlainObject(val)\n        ? val\n        : { type: val };\n    }\n  }\n  options.props = res;\n}\n\n/**\n * Normalize raw function directives into object format.\n */\nfunction normalizeDirectives (options) {\n  var dirs = options.directives;\n  if (dirs) {\n    for (var key in dirs) {\n      var def = dirs[key];\n      if (typeof def === 'function') {\n        dirs[key] = { bind: def, update: def };\n      }\n    }\n  }\n}\n\n/**\n * Merge two option objects into a new one.\n * Core utility used in both instantiation and inheritance.\n */\nfunction mergeOptions (\n  parent,\n  child,\n  vm\n) {\n  {\n    checkComponents(child);\n  }\n  normalizeProps(child);\n  normalizeDirectives(child);\n  var extendsFrom = child.extends;\n  if (extendsFrom) {\n    parent = typeof extendsFrom === 'function'\n      ? mergeOptions(parent, extendsFrom.options, vm)\n      : mergeOptions(parent, extendsFrom, vm);\n  }\n  if (child.mixins) {\n    for (var i = 0, l = child.mixins.length; i < l; i++) {\n      var mixin = child.mixins[i];\n      if (mixin.prototype instanceof Vue$3) {\n        mixin = mixin.options;\n      }\n      parent = mergeOptions(parent, mixin, vm);\n    }\n  }\n  var options = {};\n  var key;\n  for (key in parent) {\n    mergeField(key);\n  }\n  for (key in child) {\n    if (!hasOwn(parent, key)) {\n      mergeField(key);\n    }\n  }\n  function mergeField (key) {\n    var strat = strats[key] || defaultStrat;\n    options[key] = strat(parent[key], child[key], vm, key);\n  }\n  return options\n}\n\n/**\n * Resolve an asset.\n * This function is used because child instances need access\n * to assets defined in its ancestor chain.\n */\nfunction resolveAsset (\n  options,\n  type,\n  id,\n  warnMissing\n) {\n  /* istanbul ignore if */\n  if (typeof id !== 'string') {\n    return\n  }\n  var assets = options[type];\n  // check local registration variations first\n  if (hasOwn(assets, id)) { return assets[id] }\n  var camelizedId = camelize(id);\n  if (hasOwn(assets, camelizedId)) { return assets[camelizedId] }\n  var PascalCaseId = capitalize(camelizedId);\n  if (hasOwn(assets, PascalCaseId)) { return assets[PascalCaseId] }\n  // fallback to prototype chain\n  var res = assets[id] || assets[camelizedId] || assets[PascalCaseId];\n  if (\"development\" !== 'production' && warnMissing && !res) {\n    warn(\n      'Failed to resolve ' + type.slice(0, -1) + ': ' + id,\n      options\n    );\n  }\n  return res\n}\n\n/*  */\n\nfunction validateProp (\n  key,\n  propOptions,\n  propsData,\n  vm\n) {\n  var prop = propOptions[key];\n  var absent = !hasOwn(propsData, key);\n  var value = propsData[key];\n  // handle boolean props\n  if (isType(Boolean, prop.type)) {\n    if (absent && !hasOwn(prop, 'default')) {\n      value = false;\n    } else if (!isType(String, prop.type) && (value === '' || value === hyphenate(key))) {\n      value = true;\n    }\n  }\n  // check default value\n  if (value === undefined) {\n    value = getPropDefaultValue(vm, prop, key);\n    // since the default value is a fresh copy,\n    // make sure to observe it.\n    var prevShouldConvert = observerState.shouldConvert;\n    observerState.shouldConvert = true;\n    observe(value);\n    observerState.shouldConvert = prevShouldConvert;\n  }\n  {\n    assertProp(prop, key, value, vm, absent);\n  }\n  return value\n}\n\n/**\n * Get the default value of a prop.\n */\nfunction getPropDefaultValue (vm, prop, key) {\n  // no default, return undefined\n  if (!hasOwn(prop, 'default')) {\n    return undefined\n  }\n  var def = prop.default;\n  // warn against non-factory defaults for Object & Array\n  if (\"development\" !== 'production' && isObject(def)) {\n    warn(\n      'Invalid default value for prop \"' + key + '\": ' +\n      'Props with type Object/Array must use a factory function ' +\n      'to return the default value.',\n      vm\n    );\n  }\n  // the raw prop value was also undefined from previous render,\n  // return previous default value to avoid unnecessary watcher trigger\n  if (vm && vm.$options.propsData &&\n    vm.$options.propsData[key] === undefined &&\n    vm._props[key] !== undefined) {\n    return vm._props[key]\n  }\n  // call factory function for non-Function types\n  // a value is Function if its prototype is function even across different execution context\n  return typeof def === 'function' && getType(prop.type) !== 'Function'\n    ? def.call(vm)\n    : def\n}\n\n/**\n * Assert whether a prop is valid.\n */\nfunction assertProp (\n  prop,\n  name,\n  value,\n  vm,\n  absent\n) {\n  if (prop.required && absent) {\n    warn(\n      'Missing required prop: \"' + name + '\"',\n      vm\n    );\n    return\n  }\n  if (value == null && !prop.required) {\n    return\n  }\n  var type = prop.type;\n  var valid = !type || type === true;\n  var expectedTypes = [];\n  if (type) {\n    if (!Array.isArray(type)) {\n      type = [type];\n    }\n    for (var i = 0; i < type.length && !valid; i++) {\n      var assertedType = assertType(value, type[i]);\n      expectedTypes.push(assertedType.expectedType || '');\n      valid = assertedType.valid;\n    }\n  }\n  if (!valid) {\n    warn(\n      'Invalid prop: type check failed for prop \"' + name + '\".' +\n      ' Expected ' + expectedTypes.map(capitalize).join(', ') +\n      ', got ' + Object.prototype.toString.call(value).slice(8, -1) + '.',\n      vm\n    );\n    return\n  }\n  var validator = prop.validator;\n  if (validator) {\n    if (!validator(value)) {\n      warn(\n        'Invalid prop: custom validator check failed for prop \"' + name + '\".',\n        vm\n      );\n    }\n  }\n}\n\n/**\n * Assert the type of a value\n */\nfunction assertType (value, type) {\n  var valid;\n  var expectedType = getType(type);\n  if (expectedType === 'String') {\n    valid = typeof value === (expectedType = 'string');\n  } else if (expectedType === 'Number') {\n    valid = typeof value === (expectedType = 'number');\n  } else if (expectedType === 'Boolean') {\n    valid = typeof value === (expectedType = 'boolean');\n  } else if (expectedType === 'Function') {\n    valid = typeof value === (expectedType = 'function');\n  } else if (expectedType === 'Object') {\n    valid = isPlainObject(value);\n  } else if (expectedType === 'Array') {\n    valid = Array.isArray(value);\n  } else {\n    valid = value instanceof type;\n  }\n  return {\n    valid: valid,\n    expectedType: expectedType\n  }\n}\n\n/**\n * Use function string name to check built-in types,\n * because a simple equality check will fail when running\n * across different vms / iframes.\n */\nfunction getType (fn) {\n  var match = fn && fn.toString().match(/^\\s*function (\\w+)/);\n  return match && match[1]\n}\n\nfunction isType (type, fn) {\n  if (!Array.isArray(fn)) {\n    return getType(fn) === getType(type)\n  }\n  for (var i = 0, len = fn.length; i < len; i++) {\n    if (getType(fn[i]) === getType(type)) {\n      return true\n    }\n  }\n  /* istanbul ignore next */\n  return false\n}\n\nfunction handleError (err, vm, info) {\n  if (config.errorHandler) {\n    config.errorHandler.call(null, err, vm, info);\n  } else {\n    {\n      warn((\"Error in \" + info + \":\"), vm);\n    }\n    /* istanbul ignore else */\n    if (inBrowser && typeof console !== 'undefined') {\n      console.error(err);\n    } else {\n      throw err\n    }\n  }\n}\n\n/* not type checking this file because flow doesn't play well with Proxy */\n\nvar initProxy;\n\n{\n  var allowedGlobals = makeMap(\n    'Infinity,undefined,NaN,isFinite,isNaN,' +\n    'parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,' +\n    'Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,' +\n    'require' // for Webpack/Browserify\n  );\n\n  var warnNonPresent = function (target, key) {\n    warn(\n      \"Property or method \\\"\" + key + \"\\\" is not defined on the instance but \" +\n      \"referenced during render. Make sure to declare reactive data \" +\n      \"properties in the data option.\",\n      target\n    );\n  };\n\n  var hasProxy =\n    typeof Proxy !== 'undefined' &&\n    Proxy.toString().match(/native code/);\n\n  if (hasProxy) {\n    var isBuiltInModifier = makeMap('stop,prevent,self,ctrl,shift,alt,meta');\n    config.keyCodes = new Proxy(config.keyCodes, {\n      set: function set (target, key, value) {\n        if (isBuiltInModifier(key)) {\n          warn((\"Avoid overwriting built-in modifier in config.keyCodes: .\" + key));\n          return false\n        } else {\n          target[key] = value;\n          return true\n        }\n      }\n    });\n  }\n\n  var hasHandler = {\n    has: function has (target, key) {\n      var has = key in target;\n      var isAllowed = allowedGlobals(key) || key.charAt(0) === '_';\n      if (!has && !isAllowed) {\n        warnNonPresent(target, key);\n      }\n      return has || !isAllowed\n    }\n  };\n\n  var getHandler = {\n    get: function get (target, key) {\n      if (typeof key === 'string' && !(key in target)) {\n        warnNonPresent(target, key);\n      }\n      return target[key]\n    }\n  };\n\n  initProxy = function initProxy (vm) {\n    if (hasProxy) {\n      // determine which proxy handler to use\n      var options = vm.$options;\n      var handlers = options.render && options.render._withStripped\n        ? getHandler\n        : hasHandler;\n      vm._renderProxy = new Proxy(vm, handlers);\n    } else {\n      vm._renderProxy = vm;\n    }\n  };\n}\n\nvar mark;\nvar measure;\n\n{\n  var perf = inBrowser && window.performance;\n  /* istanbul ignore if */\n  if (\n    perf &&\n    perf.mark &&\n    perf.measure &&\n    perf.clearMarks &&\n    perf.clearMeasures\n  ) {\n    mark = function (tag) { return perf.mark(tag); };\n    measure = function (name, startTag, endTag) {\n      perf.measure(name, startTag, endTag);\n      perf.clearMarks(startTag);\n      perf.clearMarks(endTag);\n      perf.clearMeasures(name);\n    };\n  }\n}\n\n/*  */\n\nvar VNode = function VNode (\n  tag,\n  data,\n  children,\n  text,\n  elm,\n  context,\n  componentOptions\n) {\n  this.tag = tag;\n  this.data = data;\n  this.children = children;\n  this.text = text;\n  this.elm = elm;\n  this.ns = undefined;\n  this.context = context;\n  this.functionalContext = undefined;\n  this.key = data && data.key;\n  this.componentOptions = componentOptions;\n  this.componentInstance = undefined;\n  this.parent = undefined;\n  this.raw = false;\n  this.isStatic = false;\n  this.isRootInsert = true;\n  this.isComment = false;\n  this.isCloned = false;\n  this.isOnce = false;\n};\n\nvar prototypeAccessors = { child: {} };\n\n// DEPRECATED: alias for componentInstance for backwards compat.\n/* istanbul ignore next */\nprototypeAccessors.child.get = function () {\n  return this.componentInstance\n};\n\nObject.defineProperties( VNode.prototype, prototypeAccessors );\n\nvar createEmptyVNode = function () {\n  var node = new VNode();\n  node.text = '';\n  node.isComment = true;\n  return node\n};\n\nfunction createTextVNode (val) {\n  return new VNode(undefined, undefined, undefined, String(val))\n}\n\n// optimized shallow clone\n// used for static nodes and slot nodes because they may be reused across\n// multiple renders, cloning them avoids errors when DOM manipulations rely\n// on their elm reference.\nfunction cloneVNode (vnode) {\n  var cloned = new VNode(\n    vnode.tag,\n    vnode.data,\n    vnode.children,\n    vnode.text,\n    vnode.elm,\n    vnode.context,\n    vnode.componentOptions\n  );\n  cloned.ns = vnode.ns;\n  cloned.isStatic = vnode.isStatic;\n  cloned.key = vnode.key;\n  cloned.isCloned = true;\n  return cloned\n}\n\nfunction cloneVNodes (vnodes) {\n  var len = vnodes.length;\n  var res = new Array(len);\n  for (var i = 0; i < len; i++) {\n    res[i] = cloneVNode(vnodes[i]);\n  }\n  return res\n}\n\n/*  */\n\nvar normalizeEvent = cached(function (name) {\n  var once$$1 = name.charAt(0) === '~'; // Prefixed last, checked first\n  name = once$$1 ? name.slice(1) : name;\n  var capture = name.charAt(0) === '!';\n  name = capture ? name.slice(1) : name;\n  return {\n    name: name,\n    once: once$$1,\n    capture: capture\n  }\n});\n\nfunction createFnInvoker (fns) {\n  function invoker () {\n    var arguments$1 = arguments;\n\n    var fns = invoker.fns;\n    if (Array.isArray(fns)) {\n      for (var i = 0; i < fns.length; i++) {\n        fns[i].apply(null, arguments$1);\n      }\n    } else {\n      // return handler return value for single handlers\n      return fns.apply(null, arguments)\n    }\n  }\n  invoker.fns = fns;\n  return invoker\n}\n\nfunction updateListeners (\n  on,\n  oldOn,\n  add,\n  remove$$1,\n  vm\n) {\n  var name, cur, old, event;\n  for (name in on) {\n    cur = on[name];\n    old = oldOn[name];\n    event = normalizeEvent(name);\n    if (!cur) {\n      \"development\" !== 'production' && warn(\n        \"Invalid handler for event \\\"\" + (event.name) + \"\\\": got \" + String(cur),\n        vm\n      );\n    } else if (!old) {\n      if (!cur.fns) {\n        cur = on[name] = createFnInvoker(cur);\n      }\n      add(event.name, cur, event.once, event.capture);\n    } else if (cur !== old) {\n      old.fns = cur;\n      on[name] = old;\n    }\n  }\n  for (name in oldOn) {\n    if (!on[name]) {\n      event = normalizeEvent(name);\n      remove$$1(event.name, oldOn[name], event.capture);\n    }\n  }\n}\n\n/*  */\n\nfunction mergeVNodeHook (def, hookKey, hook) {\n  var invoker;\n  var oldHook = def[hookKey];\n\n  function wrappedHook () {\n    hook.apply(this, arguments);\n    // important: remove merged hook to ensure it's called only once\n    // and prevent memory leak\n    remove(invoker.fns, wrappedHook);\n  }\n\n  if (!oldHook) {\n    // no existing hook\n    invoker = createFnInvoker([wrappedHook]);\n  } else {\n    /* istanbul ignore if */\n    if (oldHook.fns && oldHook.merged) {\n      // already a merged invoker\n      invoker = oldHook;\n      invoker.fns.push(wrappedHook);\n    } else {\n      // existing plain hook\n      invoker = createFnInvoker([oldHook, wrappedHook]);\n    }\n  }\n\n  invoker.merged = true;\n  def[hookKey] = invoker;\n}\n\n/*  */\n\n// The template compiler attempts to minimize the need for normalization by\n// statically analyzing the template at compile time.\n//\n// For plain HTML markup, normalization can be completely skipped because the\n// generated render function is guaranteed to return Array<VNode>. There are\n// two cases where extra normalization is needed:\n\n// 1. When the children contains components - because a functional component\n// may return an Array instead of a single root. In this case, just a simple\n// normalization is needed - if any child is an Array, we flatten the whole\n// thing with Array.prototype.concat. It is guaranteed to be only 1-level deep\n// because functional components already normalize their own children.\nfunction simpleNormalizeChildren (children) {\n  for (var i = 0; i < children.length; i++) {\n    if (Array.isArray(children[i])) {\n      return Array.prototype.concat.apply([], children)\n    }\n  }\n  return children\n}\n\n// 2. When the children contains constructs that always generated nested Arrays,\n// e.g. <template>, <slot>, v-for, or when the children is provided by user\n// with hand-written render functions / JSX. In such cases a full normalization\n// is needed to cater to all possible types of children values.\nfunction normalizeChildren (children) {\n  return isPrimitive(children)\n    ? [createTextVNode(children)]\n    : Array.isArray(children)\n      ? normalizeArrayChildren(children)\n      : undefined\n}\n\nfunction normalizeArrayChildren (children, nestedIndex) {\n  var res = [];\n  var i, c, last;\n  for (i = 0; i < children.length; i++) {\n    c = children[i];\n    if (c == null || typeof c === 'boolean') { continue }\n    last = res[res.length - 1];\n    //  nested\n    if (Array.isArray(c)) {\n      res.push.apply(res, normalizeArrayChildren(c, ((nestedIndex || '') + \"_\" + i)));\n    } else if (isPrimitive(c)) {\n      if (last && last.text) {\n        last.text += String(c);\n      } else if (c !== '') {\n        // convert primitive to vnode\n        res.push(createTextVNode(c));\n      }\n    } else {\n      if (c.text && last && last.text) {\n        res[res.length - 1] = createTextVNode(last.text + c.text);\n      } else {\n        // default key for nested array children (likely generated by v-for)\n        if (c.tag && c.key == null && nestedIndex != null) {\n          c.key = \"__vlist\" + nestedIndex + \"_\" + i + \"__\";\n        }\n        res.push(c);\n      }\n    }\n  }\n  return res\n}\n\n/*  */\n\nfunction getFirstComponentChild (children) {\n  return children && children.filter(function (c) { return c && c.componentOptions; })[0]\n}\n\n/*  */\n\nfunction initEvents (vm) {\n  vm._events = Object.create(null);\n  vm._hasHookEvent = false;\n  // init parent attached events\n  var listeners = vm.$options._parentListeners;\n  if (listeners) {\n    updateComponentListeners(vm, listeners);\n  }\n}\n\nvar target;\n\nfunction add (event, fn, once$$1) {\n  if (once$$1) {\n    target.$once(event, fn);\n  } else {\n    target.$on(event, fn);\n  }\n}\n\nfunction remove$1 (event, fn) {\n  target.$off(event, fn);\n}\n\nfunction updateComponentListeners (\n  vm,\n  listeners,\n  oldListeners\n) {\n  target = vm;\n  updateListeners(listeners, oldListeners || {}, add, remove$1, vm);\n}\n\nfunction eventsMixin (Vue) {\n  var hookRE = /^hook:/;\n  Vue.prototype.$on = function (event, fn) {\n    var this$1 = this;\n\n    var vm = this;\n    if (Array.isArray(event)) {\n      for (var i = 0, l = event.length; i < l; i++) {\n        this$1.$on(event[i], fn);\n      }\n    } else {\n      (vm._events[event] || (vm._events[event] = [])).push(fn);\n      // optimize hook:event cost by using a boolean flag marked at registration\n      // instead of a hash lookup\n      if (hookRE.test(event)) {\n        vm._hasHookEvent = true;\n      }\n    }\n    return vm\n  };\n\n  Vue.prototype.$once = function (event, fn) {\n    var vm = this;\n    function on () {\n      vm.$off(event, on);\n      fn.apply(vm, arguments);\n    }\n    on.fn = fn;\n    vm.$on(event, on);\n    return vm\n  };\n\n  Vue.prototype.$off = function (event, fn) {\n    var this$1 = this;\n\n    var vm = this;\n    // all\n    if (!arguments.length) {\n      vm._events = Object.create(null);\n      return vm\n    }\n    // array of events\n    if (Array.isArray(event)) {\n      for (var i$1 = 0, l = event.length; i$1 < l; i$1++) {\n        this$1.$off(event[i$1], fn);\n      }\n      return vm\n    }\n    // specific event\n    var cbs = vm._events[event];\n    if (!cbs) {\n      return vm\n    }\n    if (arguments.length === 1) {\n      vm._events[event] = null;\n      return vm\n    }\n    // specific handler\n    var cb;\n    var i = cbs.length;\n    while (i--) {\n      cb = cbs[i];\n      if (cb === fn || cb.fn === fn) {\n        cbs.splice(i, 1);\n        break\n      }\n    }\n    return vm\n  };\n\n  Vue.prototype.$emit = function (event) {\n    var vm = this;\n    {\n      var lowerCaseEvent = event.toLowerCase();\n      if (lowerCaseEvent !== event && vm._events[lowerCaseEvent]) {\n        tip(\n          \"Event \\\"\" + lowerCaseEvent + \"\\\" is emitted in component \" +\n          (formatComponentName(vm)) + \" but the handler is registered for \\\"\" + event + \"\\\". \" +\n          \"Note that HTML attributes are case-insensitive and you cannot use \" +\n          \"v-on to listen to camelCase events when using in-DOM templates. \" +\n          \"You should probably use \\\"\" + (hyphenate(event)) + \"\\\" instead of \\\"\" + event + \"\\\".\"\n        );\n      }\n    }\n    var cbs = vm._events[event];\n    if (cbs) {\n      cbs = cbs.length > 1 ? toArray(cbs) : cbs;\n      var args = toArray(arguments, 1);\n      for (var i = 0, l = cbs.length; i < l; i++) {\n        cbs[i].apply(vm, args);\n      }\n    }\n    return vm\n  };\n}\n\n/*  */\n\n/**\n * Runtime helper for resolving raw children VNodes into a slot object.\n */\nfunction resolveSlots (\n  children,\n  context\n) {\n  var slots = {};\n  if (!children) {\n    return slots\n  }\n  var defaultSlot = [];\n  var name, child;\n  for (var i = 0, l = children.length; i < l; i++) {\n    child = children[i];\n    // named slots should only be respected if the vnode was rendered in the\n    // same context.\n    if ((child.context === context || child.functionalContext === context) &&\n        child.data && (name = child.data.slot)) {\n      var slot = (slots[name] || (slots[name] = []));\n      if (child.tag === 'template') {\n        slot.push.apply(slot, child.children);\n      } else {\n        slot.push(child);\n      }\n    } else {\n      defaultSlot.push(child);\n    }\n  }\n  // ignore whitespace\n  if (!defaultSlot.every(isWhitespace)) {\n    slots.default = defaultSlot;\n  }\n  return slots\n}\n\nfunction isWhitespace (node) {\n  return node.isComment || node.text === ' '\n}\n\nfunction resolveScopedSlots (\n  fns\n) {\n  var res = {};\n  for (var i = 0; i < fns.length; i++) {\n    res[fns[i][0]] = fns[i][1];\n  }\n  return res\n}\n\n/*  */\n\nvar activeInstance = null;\n\nfunction initLifecycle (vm) {\n  var options = vm.$options;\n\n  // locate first non-abstract parent\n  var parent = options.parent;\n  if (parent && !options.abstract) {\n    while (parent.$options.abstract && parent.$parent) {\n      parent = parent.$parent;\n    }\n    parent.$children.push(vm);\n  }\n\n  vm.$parent = parent;\n  vm.$root = parent ? parent.$root : vm;\n\n  vm.$children = [];\n  vm.$refs = {};\n\n  vm._watcher = null;\n  vm._inactive = null;\n  vm._directInactive = false;\n  vm._isMounted = false;\n  vm._isDestroyed = false;\n  vm._isBeingDestroyed = false;\n}\n\nfunction lifecycleMixin (Vue) {\n  Vue.prototype._update = function (vnode, hydrating) {\n    var vm = this;\n    if (vm._isMounted) {\n      callHook(vm, 'beforeUpdate');\n    }\n    var prevEl = vm.$el;\n    var prevVnode = vm._vnode;\n    var prevActiveInstance = activeInstance;\n    activeInstance = vm;\n    vm._vnode = vnode;\n    // Vue.prototype.__patch__ is injected in entry points\n    // based on the rendering backend used.\n    if (!prevVnode) {\n      // initial render\n      vm.$el = vm.__patch__(\n        vm.$el, vnode, hydrating, false /* removeOnly */,\n        vm.$options._parentElm,\n        vm.$options._refElm\n      );\n    } else {\n      // updates\n      vm.$el = vm.__patch__(prevVnode, vnode);\n    }\n    activeInstance = prevActiveInstance;\n    // update __vue__ reference\n    if (prevEl) {\n      prevEl.__vue__ = null;\n    }\n    if (vm.$el) {\n      vm.$el.__vue__ = vm;\n    }\n    // if parent is an HOC, update its $el as well\n    if (vm.$vnode && vm.$parent && vm.$vnode === vm.$parent._vnode) {\n      vm.$parent.$el = vm.$el;\n    }\n    // updated hook is called by the scheduler to ensure that children are\n    // updated in a parent's updated hook.\n  };\n\n  Vue.prototype.$forceUpdate = function () {\n    var vm = this;\n    if (vm._watcher) {\n      vm._watcher.update();\n    }\n  };\n\n  Vue.prototype.$destroy = function () {\n    var vm = this;\n    if (vm._isBeingDestroyed) {\n      return\n    }\n    callHook(vm, 'beforeDestroy');\n    vm._isBeingDestroyed = true;\n    // remove self from parent\n    var parent = vm.$parent;\n    if (parent && !parent._isBeingDestroyed && !vm.$options.abstract) {\n      remove(parent.$children, vm);\n    }\n    // teardown watchers\n    if (vm._watcher) {\n      vm._watcher.teardown();\n    }\n    var i = vm._watchers.length;\n    while (i--) {\n      vm._watchers[i].teardown();\n    }\n    // remove reference from data ob\n    // frozen object may not have observer.\n    if (vm._data.__ob__) {\n      vm._data.__ob__.vmCount--;\n    }\n    // call the last hook...\n    vm._isDestroyed = true;\n    // invoke destroy hooks on current rendered tree\n    vm.__patch__(vm._vnode, null);\n    // fire destroyed hook\n    callHook(vm, 'destroyed');\n    // turn off all instance listeners.\n    vm.$off();\n    // remove __vue__ reference\n    if (vm.$el) {\n      vm.$el.__vue__ = null;\n    }\n    // remove reference to DOM nodes (prevents leak)\n    vm.$options._parentElm = vm.$options._refElm = null;\n  };\n}\n\nfunction mountComponent (\n  vm,\n  el,\n  hydrating\n) {\n  vm.$el = el;\n  if (!vm.$options.render) {\n    vm.$options.render = createEmptyVNode;\n    {\n      /* istanbul ignore if */\n      if ((vm.$options.template && vm.$options.template.charAt(0) !== '#') ||\n        vm.$options.el || el) {\n        warn(\n          'You are using the runtime-only build of Vue where the template ' +\n          'compiler is not available. Either pre-compile the templates into ' +\n          'render functions, or use the compiler-included build.',\n          vm\n        );\n      } else {\n        warn(\n          'Failed to mount component: template or render function not defined.',\n          vm\n        );\n      }\n    }\n  }\n  callHook(vm, 'beforeMount');\n\n  var updateComponent;\n  /* istanbul ignore if */\n  if (\"development\" !== 'production' && config.performance && mark) {\n    updateComponent = function () {\n      var name = vm._name;\n      var id = vm._uid;\n      var startTag = \"vue-perf-start:\" + id;\n      var endTag = \"vue-perf-end:\" + id;\n\n      mark(startTag);\n      var vnode = vm._render();\n      mark(endTag);\n      measure((name + \" render\"), startTag, endTag);\n\n      mark(startTag);\n      vm._update(vnode, hydrating);\n      mark(endTag);\n      measure((name + \" patch\"), startTag, endTag);\n    };\n  } else {\n    updateComponent = function () {\n      vm._update(vm._render(), hydrating);\n    };\n  }\n\n  vm._watcher = new Watcher(vm, updateComponent, noop);\n  hydrating = false;\n\n  // manually mounted instance, call mounted on self\n  // mounted is called for render-created child components in its inserted hook\n  if (vm.$vnode == null) {\n    vm._isMounted = true;\n    callHook(vm, 'mounted');\n  }\n  return vm\n}\n\nfunction updateChildComponent (\n  vm,\n  propsData,\n  listeners,\n  parentVnode,\n  renderChildren\n) {\n  // determine whether component has slot children\n  // we need to do this before overwriting $options._renderChildren\n  var hasChildren = !!(\n    renderChildren ||               // has new static slots\n    vm.$options._renderChildren ||  // has old static slots\n    parentVnode.data.scopedSlots || // has new scoped slots\n    vm.$scopedSlots !== emptyObject // has old scoped slots\n  );\n\n  vm.$options._parentVnode = parentVnode;\n  vm.$vnode = parentVnode; // update vm's placeholder node without re-render\n  if (vm._vnode) { // update child tree's parent\n    vm._vnode.parent = parentVnode;\n  }\n  vm.$options._renderChildren = renderChildren;\n\n  // update props\n  if (propsData && vm.$options.props) {\n    observerState.shouldConvert = false;\n    {\n      observerState.isSettingProps = true;\n    }\n    var props = vm._props;\n    var propKeys = vm.$options._propKeys || [];\n    for (var i = 0; i < propKeys.length; i++) {\n      var key = propKeys[i];\n      props[key] = validateProp(key, vm.$options.props, propsData, vm);\n    }\n    observerState.shouldConvert = true;\n    {\n      observerState.isSettingProps = false;\n    }\n    // keep a copy of raw propsData\n    vm.$options.propsData = propsData;\n  }\n  // update listeners\n  if (listeners) {\n    var oldListeners = vm.$options._parentListeners;\n    vm.$options._parentListeners = listeners;\n    updateComponentListeners(vm, listeners, oldListeners);\n  }\n  // resolve slots + force update if has children\n  if (hasChildren) {\n    vm.$slots = resolveSlots(renderChildren, parentVnode.context);\n    vm.$forceUpdate();\n  }\n}\n\nfunction isInInactiveTree (vm) {\n  while (vm && (vm = vm.$parent)) {\n    if (vm._inactive) { return true }\n  }\n  return false\n}\n\nfunction activateChildComponent (vm, direct) {\n  if (direct) {\n    vm._directInactive = false;\n    if (isInInactiveTree(vm)) {\n      return\n    }\n  } else if (vm._directInactive) {\n    return\n  }\n  if (vm._inactive || vm._inactive == null) {\n    vm._inactive = false;\n    for (var i = 0; i < vm.$children.length; i++) {\n      activateChildComponent(vm.$children[i]);\n    }\n    callHook(vm, 'activated');\n  }\n}\n\nfunction deactivateChildComponent (vm, direct) {\n  if (direct) {\n    vm._directInactive = true;\n    if (isInInactiveTree(vm)) {\n      return\n    }\n  }\n  if (!vm._inactive) {\n    vm._inactive = true;\n    for (var i = 0; i < vm.$children.length; i++) {\n      deactivateChildComponent(vm.$children[i]);\n    }\n    callHook(vm, 'deactivated');\n  }\n}\n\nfunction callHook (vm, hook) {\n  var handlers = vm.$options[hook];\n  if (handlers) {\n    for (var i = 0, j = handlers.length; i < j; i++) {\n      try {\n        handlers[i].call(vm);\n      } catch (e) {\n        handleError(e, vm, (hook + \" hook\"));\n      }\n    }\n  }\n  if (vm._hasHookEvent) {\n    vm.$emit('hook:' + hook);\n  }\n}\n\n/*  */\n\n\nvar queue = [];\nvar has = {};\nvar circular = {};\nvar waiting = false;\nvar flushing = false;\nvar index = 0;\n\n/**\n * Reset the scheduler's state.\n */\nfunction resetSchedulerState () {\n  queue.length = 0;\n  has = {};\n  {\n    circular = {};\n  }\n  waiting = flushing = false;\n}\n\n/**\n * Flush both queues and run the watchers.\n */\nfunction flushSchedulerQueue () {\n  flushing = true;\n  var watcher, id, vm;\n\n  // Sort queue before flush.\n  // This ensures that:\n  // 1. Components are updated from parent to child. (because parent is always\n  //    created before the child)\n  // 2. A component's user watchers are run before its render watcher (because\n  //    user watchers are created before the render watcher)\n  // 3. If a component is destroyed during a parent component's watcher run,\n  //    its watchers can be skipped.\n  queue.sort(function (a, b) { return a.id - b.id; });\n\n  // do not cache length because more watchers might be pushed\n  // as we run existing watchers\n  for (index = 0; index < queue.length; index++) {\n    watcher = queue[index];\n    id = watcher.id;\n    has[id] = null;\n    watcher.run();\n    // in dev build, check and stop circular updates.\n    if (\"development\" !== 'production' && has[id] != null) {\n      circular[id] = (circular[id] || 0) + 1;\n      if (circular[id] > config._maxUpdateCount) {\n        warn(\n          'You may have an infinite update loop ' + (\n            watcher.user\n              ? (\"in watcher with expression \\\"\" + (watcher.expression) + \"\\\"\")\n              : \"in a component render function.\"\n          ),\n          watcher.vm\n        );\n        break\n      }\n    }\n  }\n\n  // reset scheduler before updated hook called\n  var oldQueue = queue.slice();\n  resetSchedulerState();\n\n  // call updated hooks\n  index = oldQueue.length;\n  while (index--) {\n    watcher = oldQueue[index];\n    vm = watcher.vm;\n    if (vm._watcher === watcher && vm._isMounted) {\n      callHook(vm, 'updated');\n    }\n  }\n\n  // devtool hook\n  /* istanbul ignore if */\n  if (devtools && config.devtools) {\n    devtools.emit('flush');\n  }\n}\n\n/**\n * Push a watcher into the watcher queue.\n * Jobs with duplicate IDs will be skipped unless it's\n * pushed when the queue is being flushed.\n */\nfunction queueWatcher (watcher) {\n  var id = watcher.id;\n  if (has[id] == null) {\n    has[id] = true;\n    if (!flushing) {\n      queue.push(watcher);\n    } else {\n      // if already flushing, splice the watcher based on its id\n      // if already past its id, it will be run next immediately.\n      var i = queue.length - 1;\n      while (i >= 0 && queue[i].id > watcher.id) {\n        i--;\n      }\n      queue.splice(Math.max(i, index) + 1, 0, watcher);\n    }\n    // queue the flush\n    if (!waiting) {\n      waiting = true;\n      nextTick(flushSchedulerQueue);\n    }\n  }\n}\n\n/*  */\n\nvar uid$2 = 0;\n\n/**\n * A watcher parses an expression, collects dependencies,\n * and fires callback when the expression value changes.\n * This is used for both the $watch() api and directives.\n */\nvar Watcher = function Watcher (\n  vm,\n  expOrFn,\n  cb,\n  options\n) {\n  this.vm = vm;\n  vm._watchers.push(this);\n  // options\n  if (options) {\n    this.deep = !!options.deep;\n    this.user = !!options.user;\n    this.lazy = !!options.lazy;\n    this.sync = !!options.sync;\n  } else {\n    this.deep = this.user = this.lazy = this.sync = false;\n  }\n  this.cb = cb;\n  this.id = ++uid$2; // uid for batching\n  this.active = true;\n  this.dirty = this.lazy; // for lazy watchers\n  this.deps = [];\n  this.newDeps = [];\n  this.depIds = new _Set();\n  this.newDepIds = new _Set();\n  this.expression = expOrFn.toString();\n  // parse expression for getter\n  if (typeof expOrFn === 'function') {\n    this.getter = expOrFn;\n  } else {\n    this.getter = parsePath(expOrFn);\n    if (!this.getter) {\n      this.getter = function () {};\n      \"development\" !== 'production' && warn(\n        \"Failed watching path: \\\"\" + expOrFn + \"\\\" \" +\n        'Watcher only accepts simple dot-delimited paths. ' +\n        'For full control, use a function instead.',\n        vm\n      );\n    }\n  }\n  this.value = this.lazy\n    ? undefined\n    : this.get();\n};\n\n/**\n * Evaluate the getter, and re-collect dependencies.\n */\nWatcher.prototype.get = function get () {\n  pushTarget(this);\n  var value;\n  var vm = this.vm;\n  if (this.user) {\n    try {\n      value = this.getter.call(vm, vm);\n    } catch (e) {\n      handleError(e, vm, (\"getter for watcher \\\"\" + (this.expression) + \"\\\"\"));\n    }\n  } else {\n    value = this.getter.call(vm, vm);\n  }\n  // \"touch\" every property so they are all tracked as\n  // dependencies for deep watching\n  if (this.deep) {\n    traverse(value);\n  }\n  popTarget();\n  this.cleanupDeps();\n  return value\n};\n\n/**\n * Add a dependency to this directive.\n */\nWatcher.prototype.addDep = function addDep (dep) {\n  var id = dep.id;\n  if (!this.newDepIds.has(id)) {\n    this.newDepIds.add(id);\n    this.newDeps.push(dep);\n    if (!this.depIds.has(id)) {\n      dep.addSub(this);\n    }\n  }\n};\n\n/**\n * Clean up for dependency collection.\n */\nWatcher.prototype.cleanupDeps = function cleanupDeps () {\n    var this$1 = this;\n\n  var i = this.deps.length;\n  while (i--) {\n    var dep = this$1.deps[i];\n    if (!this$1.newDepIds.has(dep.id)) {\n      dep.removeSub(this$1);\n    }\n  }\n  var tmp = this.depIds;\n  this.depIds = this.newDepIds;\n  this.newDepIds = tmp;\n  this.newDepIds.clear();\n  tmp = this.deps;\n  this.deps = this.newDeps;\n  this.newDeps = tmp;\n  this.newDeps.length = 0;\n};\n\n/**\n * Subscriber interface.\n * Will be called when a dependency changes.\n */\nWatcher.prototype.update = function update () {\n  /* istanbul ignore else */\n  if (this.lazy) {\n    this.dirty = true;\n  } else if (this.sync) {\n    this.run();\n  } else {\n    queueWatcher(this);\n  }\n};\n\n/**\n * Scheduler job interface.\n * Will be called by the scheduler.\n */\nWatcher.prototype.run = function run () {\n  if (this.active) {\n    var value = this.get();\n    if (\n      value !== this.value ||\n      // Deep watchers and watchers on Object/Arrays should fire even\n      // when the value is the same, because the value may\n      // have mutated.\n      isObject(value) ||\n      this.deep\n    ) {\n      // set new value\n      var oldValue = this.value;\n      this.value = value;\n      if (this.user) {\n        try {\n          this.cb.call(this.vm, value, oldValue);\n        } catch (e) {\n          handleError(e, this.vm, (\"callback for watcher \\\"\" + (this.expression) + \"\\\"\"));\n        }\n      } else {\n        this.cb.call(this.vm, value, oldValue);\n      }\n    }\n  }\n};\n\n/**\n * Evaluate the value of the watcher.\n * This only gets called for lazy watchers.\n */\nWatcher.prototype.evaluate = function evaluate () {\n  this.value = this.get();\n  this.dirty = false;\n};\n\n/**\n * Depend on all deps collected by this watcher.\n */\nWatcher.prototype.depend = function depend () {\n    var this$1 = this;\n\n  var i = this.deps.length;\n  while (i--) {\n    this$1.deps[i].depend();\n  }\n};\n\n/**\n * Remove self from all dependencies' subscriber list.\n */\nWatcher.prototype.teardown = function teardown () {\n    var this$1 = this;\n\n  if (this.active) {\n    // remove self from vm's watcher list\n    // this is a somewhat expensive operation so we skip it\n    // if the vm is being destroyed.\n    if (!this.vm._isBeingDestroyed) {\n      remove(this.vm._watchers, this);\n    }\n    var i = this.deps.length;\n    while (i--) {\n      this$1.deps[i].removeSub(this$1);\n    }\n    this.active = false;\n  }\n};\n\n/**\n * Recursively traverse an object to evoke all converted\n * getters, so that every nested property inside the object\n * is collected as a \"deep\" dependency.\n */\nvar seenObjects = new _Set();\nfunction traverse (val) {\n  seenObjects.clear();\n  _traverse(val, seenObjects);\n}\n\nfunction _traverse (val, seen) {\n  var i, keys;\n  var isA = Array.isArray(val);\n  if ((!isA && !isObject(val)) || !Object.isExtensible(val)) {\n    return\n  }\n  if (val.__ob__) {\n    var depId = val.__ob__.dep.id;\n    if (seen.has(depId)) {\n      return\n    }\n    seen.add(depId);\n  }\n  if (isA) {\n    i = val.length;\n    while (i--) { _traverse(val[i], seen); }\n  } else {\n    keys = Object.keys(val);\n    i = keys.length;\n    while (i--) { _traverse(val[keys[i]], seen); }\n  }\n}\n\n/*  */\n\nvar sharedPropertyDefinition = {\n  enumerable: true,\n  configurable: true,\n  get: noop,\n  set: noop\n};\n\nfunction proxy (target, sourceKey, key) {\n  sharedPropertyDefinition.get = function proxyGetter () {\n    return this[sourceKey][key]\n  };\n  sharedPropertyDefinition.set = function proxySetter (val) {\n    this[sourceKey][key] = val;\n  };\n  Object.defineProperty(target, key, sharedPropertyDefinition);\n}\n\nfunction initState (vm) {\n  vm._watchers = [];\n  var opts = vm.$options;\n  if (opts.props) { initProps(vm, opts.props); }\n  if (opts.methods) { initMethods(vm, opts.methods); }\n  if (opts.data) {\n    initData(vm);\n  } else {\n    observe(vm._data = {}, true /* asRootData */);\n  }\n  if (opts.computed) { initComputed(vm, opts.computed); }\n  if (opts.watch) { initWatch(vm, opts.watch); }\n}\n\nvar isReservedProp = { key: 1, ref: 1, slot: 1 };\n\nfunction initProps (vm, propsOptions) {\n  var propsData = vm.$options.propsData || {};\n  var props = vm._props = {};\n  // cache prop keys so that future props updates can iterate using Array\n  // instead of dynamic object key enumeration.\n  var keys = vm.$options._propKeys = [];\n  var isRoot = !vm.$parent;\n  // root instance props should be converted\n  observerState.shouldConvert = isRoot;\n  var loop = function ( key ) {\n    keys.push(key);\n    var value = validateProp(key, propsOptions, propsData, vm);\n    /* istanbul ignore else */\n    {\n      if (isReservedProp[key]) {\n        warn(\n          (\"\\\"\" + key + \"\\\" is a reserved attribute and cannot be used as component prop.\"),\n          vm\n        );\n      }\n      defineReactive$$1(props, key, value, function () {\n        if (vm.$parent && !observerState.isSettingProps) {\n          warn(\n            \"Avoid mutating a prop directly since the value will be \" +\n            \"overwritten whenever the parent component re-renders. \" +\n            \"Instead, use a data or computed property based on the prop's \" +\n            \"value. Prop being mutated: \\\"\" + key + \"\\\"\",\n            vm\n          );\n        }\n      });\n    }\n    // static props are already proxied on the component's prototype\n    // during Vue.extend(). We only need to proxy props defined at\n    // instantiation here.\n    if (!(key in vm)) {\n      proxy(vm, \"_props\", key);\n    }\n  };\n\n  for (var key in propsOptions) loop( key );\n  observerState.shouldConvert = true;\n}\n\nfunction initData (vm) {\n  var data = vm.$options.data;\n  data = vm._data = typeof data === 'function'\n    ? getData(data, vm)\n    : data || {};\n  if (!isPlainObject(data)) {\n    data = {};\n    \"development\" !== 'production' && warn(\n      'data functions should return an object:\\n' +\n      'https://vuejs.org/v2/guide/components.html#data-Must-Be-a-Function',\n      vm\n    );\n  }\n  // proxy data on instance\n  var keys = Object.keys(data);\n  var props = vm.$options.props;\n  var i = keys.length;\n  while (i--) {\n    if (props && hasOwn(props, keys[i])) {\n      \"development\" !== 'production' && warn(\n        \"The data property \\\"\" + (keys[i]) + \"\\\" is already declared as a prop. \" +\n        \"Use prop default value instead.\",\n        vm\n      );\n    } else if (!isReserved(keys[i])) {\n      proxy(vm, \"_data\", keys[i]);\n    }\n  }\n  // observe data\n  observe(data, true /* asRootData */);\n}\n\nfunction getData (data, vm) {\n  try {\n    return data.call(vm)\n  } catch (e) {\n    handleError(e, vm, \"data()\");\n    return {}\n  }\n}\n\nvar computedWatcherOptions = { lazy: true };\n\nfunction initComputed (vm, computed) {\n  var watchers = vm._computedWatchers = Object.create(null);\n\n  for (var key in computed) {\n    var userDef = computed[key];\n    var getter = typeof userDef === 'function' ? userDef : userDef.get;\n    {\n      if (getter === undefined) {\n        warn(\n          (\"No getter function has been defined for computed property \\\"\" + key + \"\\\".\"),\n          vm\n        );\n        getter = noop;\n      }\n    }\n    // create internal watcher for the computed property.\n    watchers[key] = new Watcher(vm, getter, noop, computedWatcherOptions);\n\n    // component-defined computed properties are already defined on the\n    // component prototype. We only need to define computed properties defined\n    // at instantiation here.\n    if (!(key in vm)) {\n      defineComputed(vm, key, userDef);\n    }\n  }\n}\n\nfunction defineComputed (target, key, userDef) {\n  if (typeof userDef === 'function') {\n    sharedPropertyDefinition.get = createComputedGetter(key);\n    sharedPropertyDefinition.set = noop;\n  } else {\n    sharedPropertyDefinition.get = userDef.get\n      ? userDef.cache !== false\n        ? createComputedGetter(key)\n        : userDef.get\n      : noop;\n    sharedPropertyDefinition.set = userDef.set\n      ? userDef.set\n      : noop;\n  }\n  Object.defineProperty(target, key, sharedPropertyDefinition);\n}\n\nfunction createComputedGetter (key) {\n  return function computedGetter () {\n    var watcher = this._computedWatchers && this._computedWatchers[key];\n    if (watcher) {\n      if (watcher.dirty) {\n        watcher.evaluate();\n      }\n      if (Dep.target) {\n        watcher.depend();\n      }\n      return watcher.value\n    }\n  }\n}\n\nfunction initMethods (vm, methods) {\n  var props = vm.$options.props;\n  for (var key in methods) {\n    vm[key] = methods[key] == null ? noop : bind(methods[key], vm);\n    {\n      if (methods[key] == null) {\n        warn(\n          \"method \\\"\" + key + \"\\\" has an undefined value in the component definition. \" +\n          \"Did you reference the function correctly?\",\n          vm\n        );\n      }\n      if (props && hasOwn(props, key)) {\n        warn(\n          (\"method \\\"\" + key + \"\\\" has already been defined as a prop.\"),\n          vm\n        );\n      }\n    }\n  }\n}\n\nfunction initWatch (vm, watch) {\n  for (var key in watch) {\n    var handler = watch[key];\n    if (Array.isArray(handler)) {\n      for (var i = 0; i < handler.length; i++) {\n        createWatcher(vm, key, handler[i]);\n      }\n    } else {\n      createWatcher(vm, key, handler);\n    }\n  }\n}\n\nfunction createWatcher (vm, key, handler) {\n  var options;\n  if (isPlainObject(handler)) {\n    options = handler;\n    handler = handler.handler;\n  }\n  if (typeof handler === 'string') {\n    handler = vm[handler];\n  }\n  vm.$watch(key, handler, options);\n}\n\nfunction stateMixin (Vue) {\n  // flow somehow has problems with directly declared definition object\n  // when using Object.defineProperty, so we have to procedurally build up\n  // the object here.\n  var dataDef = {};\n  dataDef.get = function () { return this._data };\n  var propsDef = {};\n  propsDef.get = function () { return this._props };\n  {\n    dataDef.set = function (newData) {\n      warn(\n        'Avoid replacing instance root $data. ' +\n        'Use nested data properties instead.',\n        this\n      );\n    };\n    propsDef.set = function () {\n      warn(\"$props is readonly.\", this);\n    };\n  }\n  Object.defineProperty(Vue.prototype, '$data', dataDef);\n  Object.defineProperty(Vue.prototype, '$props', propsDef);\n\n  Vue.prototype.$set = set;\n  Vue.prototype.$delete = del;\n\n  Vue.prototype.$watch = function (\n    expOrFn,\n    cb,\n    options\n  ) {\n    var vm = this;\n    options = options || {};\n    options.user = true;\n    var watcher = new Watcher(vm, expOrFn, cb, options);\n    if (options.immediate) {\n      cb.call(vm, watcher.value);\n    }\n    return function unwatchFn () {\n      watcher.teardown();\n    }\n  };\n}\n\n/*  */\n\n// hooks to be invoked on component VNodes during patch\nvar componentVNodeHooks = {\n  init: function init (\n    vnode,\n    hydrating,\n    parentElm,\n    refElm\n  ) {\n    if (!vnode.componentInstance || vnode.componentInstance._isDestroyed) {\n      var child = vnode.componentInstance = createComponentInstanceForVnode(\n        vnode,\n        activeInstance,\n        parentElm,\n        refElm\n      );\n      child.$mount(hydrating ? vnode.elm : undefined, hydrating);\n    } else if (vnode.data.keepAlive) {\n      // kept-alive components, treat as a patch\n      var mountedNode = vnode; // work around flow\n      componentVNodeHooks.prepatch(mountedNode, mountedNode);\n    }\n  },\n\n  prepatch: function prepatch (oldVnode, vnode) {\n    var options = vnode.componentOptions;\n    var child = vnode.componentInstance = oldVnode.componentInstance;\n    updateChildComponent(\n      child,\n      options.propsData, // updated props\n      options.listeners, // updated listeners\n      vnode, // new parent vnode\n      options.children // new children\n    );\n  },\n\n  insert: function insert (vnode) {\n    if (!vnode.componentInstance._isMounted) {\n      vnode.componentInstance._isMounted = true;\n      callHook(vnode.componentInstance, 'mounted');\n    }\n    if (vnode.data.keepAlive) {\n      activateChildComponent(vnode.componentInstance, true /* direct */);\n    }\n  },\n\n  destroy: function destroy (vnode) {\n    if (!vnode.componentInstance._isDestroyed) {\n      if (!vnode.data.keepAlive) {\n        vnode.componentInstance.$destroy();\n      } else {\n        deactivateChildComponent(vnode.componentInstance, true /* direct */);\n      }\n    }\n  }\n};\n\nvar hooksToMerge = Object.keys(componentVNodeHooks);\n\nfunction createComponent (\n  Ctor,\n  data,\n  context,\n  children,\n  tag\n) {\n  if (!Ctor) {\n    return\n  }\n\n  var baseCtor = context.$options._base;\n  if (isObject(Ctor)) {\n    Ctor = baseCtor.extend(Ctor);\n  }\n\n  if (typeof Ctor !== 'function') {\n    {\n      warn((\"Invalid Component definition: \" + (String(Ctor))), context);\n    }\n    return\n  }\n\n  // async component\n  if (!Ctor.cid) {\n    if (Ctor.resolved) {\n      Ctor = Ctor.resolved;\n    } else {\n      Ctor = resolveAsyncComponent(Ctor, baseCtor, function () {\n        // it's ok to queue this on every render because\n        // $forceUpdate is buffered by the scheduler.\n        context.$forceUpdate();\n      });\n      if (!Ctor) {\n        // return nothing if this is indeed an async component\n        // wait for the callback to trigger parent update.\n        return\n      }\n    }\n  }\n\n  // resolve constructor options in case global mixins are applied after\n  // component constructor creation\n  resolveConstructorOptions(Ctor);\n\n  data = data || {};\n\n  // transform component v-model data into props & events\n  if (data.model) {\n    transformModel(Ctor.options, data);\n  }\n\n  // extract props\n  var propsData = extractProps(data, Ctor, tag);\n\n  // functional component\n  if (Ctor.options.functional) {\n    return createFunctionalComponent(Ctor, propsData, data, context, children)\n  }\n\n  // extract listeners, since these needs to be treated as\n  // child component listeners instead of DOM listeners\n  var listeners = data.on;\n  // replace with listeners with .native modifier\n  data.on = data.nativeOn;\n\n  if (Ctor.options.abstract) {\n    // abstract components do not keep anything\n    // other than props & listeners\n    data = {};\n  }\n\n  // merge component management hooks onto the placeholder node\n  mergeHooks(data);\n\n  // return a placeholder vnode\n  var name = Ctor.options.name || tag;\n  var vnode = new VNode(\n    (\"vue-component-\" + (Ctor.cid) + (name ? (\"-\" + name) : '')),\n    data, undefined, undefined, undefined, context,\n    { Ctor: Ctor, propsData: propsData, listeners: listeners, tag: tag, children: children }\n  );\n  return vnode\n}\n\nfunction createFunctionalComponent (\n  Ctor,\n  propsData,\n  data,\n  context,\n  children\n) {\n  var props = {};\n  var propOptions = Ctor.options.props;\n  if (propOptions) {\n    for (var key in propOptions) {\n      props[key] = validateProp(key, propOptions, propsData);\n    }\n  }\n  // ensure the createElement function in functional components\n  // gets a unique context - this is necessary for correct named slot check\n  var _context = Object.create(context);\n  var h = function (a, b, c, d) { return createElement(_context, a, b, c, d, true); };\n  var vnode = Ctor.options.render.call(null, h, {\n    props: props,\n    data: data,\n    parent: context,\n    children: children,\n    slots: function () { return resolveSlots(children, context); }\n  });\n  if (vnode instanceof VNode) {\n    vnode.functionalContext = context;\n    if (data.slot) {\n      (vnode.data || (vnode.data = {})).slot = data.slot;\n    }\n  }\n  return vnode\n}\n\nfunction createComponentInstanceForVnode (\n  vnode, // we know it's MountedComponentVNode but flow doesn't\n  parent, // activeInstance in lifecycle state\n  parentElm,\n  refElm\n) {\n  var vnodeComponentOptions = vnode.componentOptions;\n  var options = {\n    _isComponent: true,\n    parent: parent,\n    propsData: vnodeComponentOptions.propsData,\n    _componentTag: vnodeComponentOptions.tag,\n    _parentVnode: vnode,\n    _parentListeners: vnodeComponentOptions.listeners,\n    _renderChildren: vnodeComponentOptions.children,\n    _parentElm: parentElm || null,\n    _refElm: refElm || null\n  };\n  // check inline-template render functions\n  var inlineTemplate = vnode.data.inlineTemplate;\n  if (inlineTemplate) {\n    options.render = inlineTemplate.render;\n    options.staticRenderFns = inlineTemplate.staticRenderFns;\n  }\n  return new vnodeComponentOptions.Ctor(options)\n}\n\nfunction resolveAsyncComponent (\n  factory,\n  baseCtor,\n  cb\n) {\n  if (factory.requested) {\n    // pool callbacks\n    factory.pendingCallbacks.push(cb);\n  } else {\n    factory.requested = true;\n    var cbs = factory.pendingCallbacks = [cb];\n    var sync = true;\n\n    var resolve = function (res) {\n      if (isObject(res)) {\n        res = baseCtor.extend(res);\n      }\n      // cache resolved\n      factory.resolved = res;\n      // invoke callbacks only if this is not a synchronous resolve\n      // (async resolves are shimmed as synchronous during SSR)\n      if (!sync) {\n        for (var i = 0, l = cbs.length; i < l; i++) {\n          cbs[i](res);\n        }\n      }\n    };\n\n    var reject = function (reason) {\n      \"development\" !== 'production' && warn(\n        \"Failed to resolve async component: \" + (String(factory)) +\n        (reason ? (\"\\nReason: \" + reason) : '')\n      );\n    };\n\n    var res = factory(resolve, reject);\n\n    // handle promise\n    if (res && typeof res.then === 'function' && !factory.resolved) {\n      res.then(resolve, reject);\n    }\n\n    sync = false;\n    // return in case resolved synchronously\n    return factory.resolved\n  }\n}\n\nfunction extractProps (data, Ctor, tag) {\n  // we are only extracting raw values here.\n  // validation and default values are handled in the child\n  // component itself.\n  var propOptions = Ctor.options.props;\n  if (!propOptions) {\n    return\n  }\n  var res = {};\n  var attrs = data.attrs;\n  var props = data.props;\n  var domProps = data.domProps;\n  if (attrs || props || domProps) {\n    for (var key in propOptions) {\n      var altKey = hyphenate(key);\n      {\n        var keyInLowerCase = key.toLowerCase();\n        if (\n          key !== keyInLowerCase &&\n          attrs && attrs.hasOwnProperty(keyInLowerCase)\n        ) {\n          tip(\n            \"Prop \\\"\" + keyInLowerCase + \"\\\" is passed to component \" +\n            (formatComponentName(tag || Ctor)) + \", but the declared prop name is\" +\n            \" \\\"\" + key + \"\\\". \" +\n            \"Note that HTML attributes are case-insensitive and camelCased \" +\n            \"props need to use their kebab-case equivalents when using in-DOM \" +\n            \"templates. You should probably use \\\"\" + altKey + \"\\\" instead of \\\"\" + key + \"\\\".\"\n          );\n        }\n      }\n      checkProp(res, props, key, altKey, true) ||\n      checkProp(res, attrs, key, altKey) ||\n      checkProp(res, domProps, key, altKey);\n    }\n  }\n  return res\n}\n\nfunction checkProp (\n  res,\n  hash,\n  key,\n  altKey,\n  preserve\n) {\n  if (hash) {\n    if (hasOwn(hash, key)) {\n      res[key] = hash[key];\n      if (!preserve) {\n        delete hash[key];\n      }\n      return true\n    } else if (hasOwn(hash, altKey)) {\n      res[key] = hash[altKey];\n      if (!preserve) {\n        delete hash[altKey];\n      }\n      return true\n    }\n  }\n  return false\n}\n\nfunction mergeHooks (data) {\n  if (!data.hook) {\n    data.hook = {};\n  }\n  for (var i = 0; i < hooksToMerge.length; i++) {\n    var key = hooksToMerge[i];\n    var fromParent = data.hook[key];\n    var ours = componentVNodeHooks[key];\n    data.hook[key] = fromParent ? mergeHook$1(ours, fromParent) : ours;\n  }\n}\n\nfunction mergeHook$1 (one, two) {\n  return function (a, b, c, d) {\n    one(a, b, c, d);\n    two(a, b, c, d);\n  }\n}\n\n// transform component v-model info (value and callback) into\n// prop and event handler respectively.\nfunction transformModel (options, data) {\n  var prop = (options.model && options.model.prop) || 'value';\n  var event = (options.model && options.model.event) || 'input';(data.props || (data.props = {}))[prop] = data.model.value;\n  var on = data.on || (data.on = {});\n  if (on[event]) {\n    on[event] = [data.model.callback].concat(on[event]);\n  } else {\n    on[event] = data.model.callback;\n  }\n}\n\n/*  */\n\nvar SIMPLE_NORMALIZE = 1;\nvar ALWAYS_NORMALIZE = 2;\n\n// wrapper function for providing a more flexible interface\n// without getting yelled at by flow\nfunction createElement (\n  context,\n  tag,\n  data,\n  children,\n  normalizationType,\n  alwaysNormalize\n) {\n  if (Array.isArray(data) || isPrimitive(data)) {\n    normalizationType = children;\n    children = data;\n    data = undefined;\n  }\n  if (alwaysNormalize) { normalizationType = ALWAYS_NORMALIZE; }\n  return _createElement(context, tag, data, children, normalizationType)\n}\n\nfunction _createElement (\n  context,\n  tag,\n  data,\n  children,\n  normalizationType\n) {\n  if (data && data.__ob__) {\n    \"development\" !== 'production' && warn(\n      \"Avoid using observed data object as vnode data: \" + (JSON.stringify(data)) + \"\\n\" +\n      'Always create fresh vnode data objects in each render!',\n      context\n    );\n    return createEmptyVNode()\n  }\n  if (!tag) {\n    // in case of component :is set to falsy value\n    return createEmptyVNode()\n  }\n  // support single function children as default scoped slot\n  if (Array.isArray(children) &&\n      typeof children[0] === 'function') {\n    data = data || {};\n    data.scopedSlots = { default: children[0] };\n    children.length = 0;\n  }\n  if (normalizationType === ALWAYS_NORMALIZE) {\n    children = normalizeChildren(children);\n  } else if (normalizationType === SIMPLE_NORMALIZE) {\n    children = simpleNormalizeChildren(children);\n  }\n  var vnode, ns;\n  if (typeof tag === 'string') {\n    var Ctor;\n    ns = config.getTagNamespace(tag);\n    if (config.isReservedTag(tag)) {\n      // platform built-in elements\n      vnode = new VNode(\n        config.parsePlatformTagName(tag), data, children,\n        undefined, undefined, context\n      );\n    } else if ((Ctor = resolveAsset(context.$options, 'components', tag))) {\n      // component\n      vnode = createComponent(Ctor, data, context, children, tag);\n    } else {\n      // unknown or unlisted namespaced elements\n      // check at runtime because it may get assigned a namespace when its\n      // parent normalizes children\n      vnode = new VNode(\n        tag, data, children,\n        undefined, undefined, context\n      );\n    }\n  } else {\n    // direct component options / constructor\n    vnode = createComponent(tag, data, context, children);\n  }\n  if (vnode) {\n    if (ns) { applyNS(vnode, ns); }\n    return vnode\n  } else {\n    return createEmptyVNode()\n  }\n}\n\nfunction applyNS (vnode, ns) {\n  vnode.ns = ns;\n  if (vnode.tag === 'foreignObject') {\n    // use default namespace inside foreignObject\n    return\n  }\n  if (vnode.children) {\n    for (var i = 0, l = vnode.children.length; i < l; i++) {\n      var child = vnode.children[i];\n      if (child.tag && !child.ns) {\n        applyNS(child, ns);\n      }\n    }\n  }\n}\n\n/*  */\n\n/**\n * Runtime helper for rendering v-for lists.\n */\nfunction renderList (\n  val,\n  render\n) {\n  var ret, i, l, keys, key;\n  if (Array.isArray(val) || typeof val === 'string') {\n    ret = new Array(val.length);\n    for (i = 0, l = val.length; i < l; i++) {\n      ret[i] = render(val[i], i);\n    }\n  } else if (typeof val === 'number') {\n    ret = new Array(val);\n    for (i = 0; i < val; i++) {\n      ret[i] = render(i + 1, i);\n    }\n  } else if (isObject(val)) {\n    keys = Object.keys(val);\n    ret = new Array(keys.length);\n    for (i = 0, l = keys.length; i < l; i++) {\n      key = keys[i];\n      ret[i] = render(val[key], key, i);\n    }\n  }\n  return ret\n}\n\n/*  */\n\n/**\n * Runtime helper for rendering <slot>\n */\nfunction renderSlot (\n  name,\n  fallback,\n  props,\n  bindObject\n) {\n  var scopedSlotFn = this.$scopedSlots[name];\n  if (scopedSlotFn) { // scoped slot\n    props = props || {};\n    if (bindObject) {\n      extend(props, bindObject);\n    }\n    return scopedSlotFn(props) || fallback\n  } else {\n    var slotNodes = this.$slots[name];\n    // warn duplicate slot usage\n    if (slotNodes && \"development\" !== 'production') {\n      slotNodes._rendered && warn(\n        \"Duplicate presence of slot \\\"\" + name + \"\\\" found in the same render tree \" +\n        \"- this will likely cause render errors.\",\n        this\n      );\n      slotNodes._rendered = true;\n    }\n    return slotNodes || fallback\n  }\n}\n\n/*  */\n\n/**\n * Runtime helper for resolving filters\n */\nfunction resolveFilter (id) {\n  return resolveAsset(this.$options, 'filters', id, true) || identity\n}\n\n/*  */\n\n/**\n * Runtime helper for checking keyCodes from config.\n */\nfunction checkKeyCodes (\n  eventKeyCode,\n  key,\n  builtInAlias\n) {\n  var keyCodes = config.keyCodes[key] || builtInAlias;\n  if (Array.isArray(keyCodes)) {\n    return keyCodes.indexOf(eventKeyCode) === -1\n  } else {\n    return keyCodes !== eventKeyCode\n  }\n}\n\n/*  */\n\n/**\n * Runtime helper for merging v-bind=\"object\" into a VNode's data.\n */\nfunction bindObjectProps (\n  data,\n  tag,\n  value,\n  asProp\n) {\n  if (value) {\n    if (!isObject(value)) {\n      \"development\" !== 'production' && warn(\n        'v-bind without argument expects an Object or Array value',\n        this\n      );\n    } else {\n      if (Array.isArray(value)) {\n        value = toObject(value);\n      }\n      var hash;\n      for (var key in value) {\n        if (key === 'class' || key === 'style') {\n          hash = data;\n        } else {\n          var type = data.attrs && data.attrs.type;\n          hash = asProp || config.mustUseProp(tag, type, key)\n            ? data.domProps || (data.domProps = {})\n            : data.attrs || (data.attrs = {});\n        }\n        if (!(key in hash)) {\n          hash[key] = value[key];\n        }\n      }\n    }\n  }\n  return data\n}\n\n/*  */\n\n/**\n * Runtime helper for rendering static trees.\n */\nfunction renderStatic (\n  index,\n  isInFor\n) {\n  var tree = this._staticTrees[index];\n  // if has already-rendered static tree and not inside v-for,\n  // we can reuse the same tree by doing a shallow clone.\n  if (tree && !isInFor) {\n    return Array.isArray(tree)\n      ? cloneVNodes(tree)\n      : cloneVNode(tree)\n  }\n  // otherwise, render a fresh tree.\n  tree = this._staticTrees[index] =\n    this.$options.staticRenderFns[index].call(this._renderProxy);\n  markStatic(tree, (\"__static__\" + index), false);\n  return tree\n}\n\n/**\n * Runtime helper for v-once.\n * Effectively it means marking the node as static with a unique key.\n */\nfunction markOnce (\n  tree,\n  index,\n  key\n) {\n  markStatic(tree, (\"__once__\" + index + (key ? (\"_\" + key) : \"\")), true);\n  return tree\n}\n\nfunction markStatic (\n  tree,\n  key,\n  isOnce\n) {\n  if (Array.isArray(tree)) {\n    for (var i = 0; i < tree.length; i++) {\n      if (tree[i] && typeof tree[i] !== 'string') {\n        markStaticNode(tree[i], (key + \"_\" + i), isOnce);\n      }\n    }\n  } else {\n    markStaticNode(tree, key, isOnce);\n  }\n}\n\nfunction markStaticNode (node, key, isOnce) {\n  node.isStatic = true;\n  node.key = key;\n  node.isOnce = isOnce;\n}\n\n/*  */\n\nfunction initRender (vm) {\n  vm.$vnode = null; // the placeholder node in parent tree\n  vm._vnode = null; // the root of the child tree\n  vm._staticTrees = null;\n  var parentVnode = vm.$options._parentVnode;\n  var renderContext = parentVnode && parentVnode.context;\n  vm.$slots = resolveSlots(vm.$options._renderChildren, renderContext);\n  vm.$scopedSlots = emptyObject;\n  // bind the createElement fn to this instance\n  // so that we get proper render context inside it.\n  // args order: tag, data, children, normalizationType, alwaysNormalize\n  // internal version is used by render functions compiled from templates\n  vm._c = function (a, b, c, d) { return createElement(vm, a, b, c, d, false); };\n  // normalization is always applied for the public version, used in\n  // user-written render functions.\n  vm.$createElement = function (a, b, c, d) { return createElement(vm, a, b, c, d, true); };\n}\n\nfunction renderMixin (Vue) {\n  Vue.prototype.$nextTick = function (fn) {\n    return nextTick(fn, this)\n  };\n\n  Vue.prototype._render = function () {\n    var vm = this;\n    var ref = vm.$options;\n    var render = ref.render;\n    var staticRenderFns = ref.staticRenderFns;\n    var _parentVnode = ref._parentVnode;\n\n    if (vm._isMounted) {\n      // clone slot nodes on re-renders\n      for (var key in vm.$slots) {\n        vm.$slots[key] = cloneVNodes(vm.$slots[key]);\n      }\n    }\n\n    vm.$scopedSlots = (_parentVnode && _parentVnode.data.scopedSlots) || emptyObject;\n\n    if (staticRenderFns && !vm._staticTrees) {\n      vm._staticTrees = [];\n    }\n    // set parent vnode. this allows render functions to have access\n    // to the data on the placeholder node.\n    vm.$vnode = _parentVnode;\n    // render self\n    var vnode;\n    try {\n      vnode = render.call(vm._renderProxy, vm.$createElement);\n    } catch (e) {\n      handleError(e, vm, \"render function\");\n      // return error render result,\n      // or previous vnode to prevent render error causing blank component\n      /* istanbul ignore else */\n      {\n        vnode = vm.$options.renderError\n          ? vm.$options.renderError.call(vm._renderProxy, vm.$createElement, e)\n          : vm._vnode;\n      }\n    }\n    // return empty vnode in case the render function errored out\n    if (!(vnode instanceof VNode)) {\n      if (\"development\" !== 'production' && Array.isArray(vnode)) {\n        warn(\n          'Multiple root nodes returned from render function. Render function ' +\n          'should return a single root node.',\n          vm\n        );\n      }\n      vnode = createEmptyVNode();\n    }\n    // set parent\n    vnode.parent = _parentVnode;\n    return vnode\n  };\n\n  // internal render helpers.\n  // these are exposed on the instance prototype to reduce generated render\n  // code size.\n  Vue.prototype._o = markOnce;\n  Vue.prototype._n = toNumber;\n  Vue.prototype._s = _toString;\n  Vue.prototype._l = renderList;\n  Vue.prototype._t = renderSlot;\n  Vue.prototype._q = looseEqual;\n  Vue.prototype._i = looseIndexOf;\n  Vue.prototype._m = renderStatic;\n  Vue.prototype._f = resolveFilter;\n  Vue.prototype._k = checkKeyCodes;\n  Vue.prototype._b = bindObjectProps;\n  Vue.prototype._v = createTextVNode;\n  Vue.prototype._e = createEmptyVNode;\n  Vue.prototype._u = resolveScopedSlots;\n}\n\n/*  */\n\nfunction initProvide (vm) {\n  var provide = vm.$options.provide;\n  if (provide) {\n    vm._provided = typeof provide === 'function'\n      ? provide.call(vm)\n      : provide;\n  }\n}\n\nfunction initInjections (vm) {\n  var inject = vm.$options.inject;\n  if (inject) {\n    // inject is :any because flow is not smart enough to figure out cached\n    // isArray here\n    var isArray = Array.isArray(inject);\n    var keys = isArray\n      ? inject\n      : hasSymbol\n        ? Reflect.ownKeys(inject)\n        : Object.keys(inject);\n\n    var loop = function ( i ) {\n      var key = keys[i];\n      var provideKey = isArray ? key : inject[key];\n      var source = vm;\n      while (source) {\n        if (source._provided && provideKey in source._provided) {\n          /* istanbul ignore else */\n          {\n            defineReactive$$1(vm, key, source._provided[provideKey], function () {\n              warn(\n                \"Avoid mutating an injected value directly since the changes will be \" +\n                \"overwritten whenever the provided component re-renders. \" +\n                \"injection being mutated: \\\"\" + key + \"\\\"\",\n                vm\n              );\n            });\n          }\n          break\n        }\n        source = source.$parent;\n      }\n    };\n\n    for (var i = 0; i < keys.length; i++) loop( i );\n  }\n}\n\n/*  */\n\nvar uid = 0;\n\nfunction initMixin (Vue) {\n  Vue.prototype._init = function (options) {\n    var vm = this;\n    // a uid\n    vm._uid = uid++;\n\n    var startTag, endTag;\n    /* istanbul ignore if */\n    if (\"development\" !== 'production' && config.performance && mark) {\n      startTag = \"vue-perf-init:\" + (vm._uid);\n      endTag = \"vue-perf-end:\" + (vm._uid);\n      mark(startTag);\n    }\n\n    // a flag to avoid this being observed\n    vm._isVue = true;\n    // merge options\n    if (options && options._isComponent) {\n      // optimize internal component instantiation\n      // since dynamic options merging is pretty slow, and none of the\n      // internal component options needs special treatment.\n      initInternalComponent(vm, options);\n    } else {\n      vm.$options = mergeOptions(\n        resolveConstructorOptions(vm.constructor),\n        options || {},\n        vm\n      );\n    }\n    /* istanbul ignore else */\n    {\n      initProxy(vm);\n    }\n    // expose real self\n    vm._self = vm;\n    initLifecycle(vm);\n    initEvents(vm);\n    initRender(vm);\n    callHook(vm, 'beforeCreate');\n    initInjections(vm); // resolve injections before data/props\n    initState(vm);\n    initProvide(vm); // resolve provide after data/props\n    callHook(vm, 'created');\n\n    /* istanbul ignore if */\n    if (\"development\" !== 'production' && config.performance && mark) {\n      vm._name = formatComponentName(vm, false);\n      mark(endTag);\n      measure(((vm._name) + \" init\"), startTag, endTag);\n    }\n\n    if (vm.$options.el) {\n      vm.$mount(vm.$options.el);\n    }\n  };\n}\n\nfunction initInternalComponent (vm, options) {\n  var opts = vm.$options = Object.create(vm.constructor.options);\n  // doing this because it's faster than dynamic enumeration.\n  opts.parent = options.parent;\n  opts.propsData = options.propsData;\n  opts._parentVnode = options._parentVnode;\n  opts._parentListeners = options._parentListeners;\n  opts._renderChildren = options._renderChildren;\n  opts._componentTag = options._componentTag;\n  opts._parentElm = options._parentElm;\n  opts._refElm = options._refElm;\n  if (options.render) {\n    opts.render = options.render;\n    opts.staticRenderFns = options.staticRenderFns;\n  }\n}\n\nfunction resolveConstructorOptions (Ctor) {\n  var options = Ctor.options;\n  if (Ctor.super) {\n    var superOptions = resolveConstructorOptions(Ctor.super);\n    var cachedSuperOptions = Ctor.superOptions;\n    if (superOptions !== cachedSuperOptions) {\n      // super option changed,\n      // need to resolve new options.\n      Ctor.superOptions = superOptions;\n      // check if there are any late-modified/attached options (#4976)\n      var modifiedOptions = resolveModifiedOptions(Ctor);\n      // update base extend options\n      if (modifiedOptions) {\n        extend(Ctor.extendOptions, modifiedOptions);\n      }\n      options = Ctor.options = mergeOptions(superOptions, Ctor.extendOptions);\n      if (options.name) {\n        options.components[options.name] = Ctor;\n      }\n    }\n  }\n  return options\n}\n\nfunction resolveModifiedOptions (Ctor) {\n  var modified;\n  var latest = Ctor.options;\n  var sealed = Ctor.sealedOptions;\n  for (var key in latest) {\n    if (latest[key] !== sealed[key]) {\n      if (!modified) { modified = {}; }\n      modified[key] = dedupe(latest[key], sealed[key]);\n    }\n  }\n  return modified\n}\n\nfunction dedupe (latest, sealed) {\n  // compare latest and sealed to ensure lifecycle hooks won't be duplicated\n  // between merges\n  if (Array.isArray(latest)) {\n    var res = [];\n    sealed = Array.isArray(sealed) ? sealed : [sealed];\n    for (var i = 0; i < latest.length; i++) {\n      if (sealed.indexOf(latest[i]) < 0) {\n        res.push(latest[i]);\n      }\n    }\n    return res\n  } else {\n    return latest\n  }\n}\n\nfunction Vue$3 (options) {\n  if (\"development\" !== 'production' &&\n    !(this instanceof Vue$3)) {\n    warn('Vue is a constructor and should be called with the `new` keyword');\n  }\n  this._init(options);\n}\n\ninitMixin(Vue$3);\nstateMixin(Vue$3);\neventsMixin(Vue$3);\nlifecycleMixin(Vue$3);\nrenderMixin(Vue$3);\n\n/*  */\n\nfunction initUse (Vue) {\n  Vue.use = function (plugin) {\n    /* istanbul ignore if */\n    if (plugin.installed) {\n      return\n    }\n    // additional parameters\n    var args = toArray(arguments, 1);\n    args.unshift(this);\n    if (typeof plugin.install === 'function') {\n      plugin.install.apply(plugin, args);\n    } else if (typeof plugin === 'function') {\n      plugin.apply(null, args);\n    }\n    plugin.installed = true;\n    return this\n  };\n}\n\n/*  */\n\nfunction initMixin$1 (Vue) {\n  Vue.mixin = function (mixin) {\n    this.options = mergeOptions(this.options, mixin);\n  };\n}\n\n/*  */\n\nfunction initExtend (Vue) {\n  /**\n   * Each instance constructor, including Vue, has a unique\n   * cid. This enables us to create wrapped \"child\n   * constructors\" for prototypal inheritance and cache them.\n   */\n  Vue.cid = 0;\n  var cid = 1;\n\n  /**\n   * Class inheritance\n   */\n  Vue.extend = function (extendOptions) {\n    extendOptions = extendOptions || {};\n    var Super = this;\n    var SuperId = Super.cid;\n    var cachedCtors = extendOptions._Ctor || (extendOptions._Ctor = {});\n    if (cachedCtors[SuperId]) {\n      return cachedCtors[SuperId]\n    }\n\n    var name = extendOptions.name || Super.options.name;\n    {\n      if (!/^[a-zA-Z][\\w-]*$/.test(name)) {\n        warn(\n          'Invalid component name: \"' + name + '\". Component names ' +\n          'can only contain alphanumeric characters and the hyphen, ' +\n          'and must start with a letter.'\n        );\n      }\n    }\n\n    var Sub = function VueComponent (options) {\n      this._init(options);\n    };\n    Sub.prototype = Object.create(Super.prototype);\n    Sub.prototype.constructor = Sub;\n    Sub.cid = cid++;\n    Sub.options = mergeOptions(\n      Super.options,\n      extendOptions\n    );\n    Sub['super'] = Super;\n\n    // For props and computed properties, we define the proxy getters on\n    // the Vue instances at extension time, on the extended prototype. This\n    // avoids Object.defineProperty calls for each instance created.\n    if (Sub.options.props) {\n      initProps$1(Sub);\n    }\n    if (Sub.options.computed) {\n      initComputed$1(Sub);\n    }\n\n    // allow further extension/mixin/plugin usage\n    Sub.extend = Super.extend;\n    Sub.mixin = Super.mixin;\n    Sub.use = Super.use;\n\n    // create asset registers, so extended classes\n    // can have their private assets too.\n    config._assetTypes.forEach(function (type) {\n      Sub[type] = Super[type];\n    });\n    // enable recursive self-lookup\n    if (name) {\n      Sub.options.components[name] = Sub;\n    }\n\n    // keep a reference to the super options at extension time.\n    // later at instantiation we can check if Super's options have\n    // been updated.\n    Sub.superOptions = Super.options;\n    Sub.extendOptions = extendOptions;\n    Sub.sealedOptions = extend({}, Sub.options);\n\n    // cache constructor\n    cachedCtors[SuperId] = Sub;\n    return Sub\n  };\n}\n\nfunction initProps$1 (Comp) {\n  var props = Comp.options.props;\n  for (var key in props) {\n    proxy(Comp.prototype, \"_props\", key);\n  }\n}\n\nfunction initComputed$1 (Comp) {\n  var computed = Comp.options.computed;\n  for (var key in computed) {\n    defineComputed(Comp.prototype, key, computed[key]);\n  }\n}\n\n/*  */\n\nfunction initAssetRegisters (Vue) {\n  /**\n   * Create asset registration methods.\n   */\n  config._assetTypes.forEach(function (type) {\n    Vue[type] = function (\n      id,\n      definition\n    ) {\n      if (!definition) {\n        return this.options[type + 's'][id]\n      } else {\n        /* istanbul ignore if */\n        {\n          if (type === 'component' && config.isReservedTag(id)) {\n            warn(\n              'Do not use built-in or reserved HTML elements as component ' +\n              'id: ' + id\n            );\n          }\n        }\n        if (type === 'component' && isPlainObject(definition)) {\n          definition.name = definition.name || id;\n          definition = this.options._base.extend(definition);\n        }\n        if (type === 'directive' && typeof definition === 'function') {\n          definition = { bind: definition, update: definition };\n        }\n        this.options[type + 's'][id] = definition;\n        return definition\n      }\n    };\n  });\n}\n\n/*  */\n\nvar patternTypes = [String, RegExp];\n\nfunction getComponentName (opts) {\n  return opts && (opts.Ctor.options.name || opts.tag)\n}\n\nfunction matches (pattern, name) {\n  if (typeof pattern === 'string') {\n    return pattern.split(',').indexOf(name) > -1\n  } else if (pattern instanceof RegExp) {\n    return pattern.test(name)\n  }\n  /* istanbul ignore next */\n  return false\n}\n\nfunction pruneCache (cache, filter) {\n  for (var key in cache) {\n    var cachedNode = cache[key];\n    if (cachedNode) {\n      var name = getComponentName(cachedNode.componentOptions);\n      if (name && !filter(name)) {\n        pruneCacheEntry(cachedNode);\n        cache[key] = null;\n      }\n    }\n  }\n}\n\nfunction pruneCacheEntry (vnode) {\n  if (vnode) {\n    if (!vnode.componentInstance._inactive) {\n      callHook(vnode.componentInstance, 'deactivated');\n    }\n    vnode.componentInstance.$destroy();\n  }\n}\n\nvar KeepAlive = {\n  name: 'keep-alive',\n  abstract: true,\n\n  props: {\n    include: patternTypes,\n    exclude: patternTypes\n  },\n\n  created: function created () {\n    this.cache = Object.create(null);\n  },\n\n  destroyed: function destroyed () {\n    var this$1 = this;\n\n    for (var key in this$1.cache) {\n      pruneCacheEntry(this$1.cache[key]);\n    }\n  },\n\n  watch: {\n    include: function include (val) {\n      pruneCache(this.cache, function (name) { return matches(val, name); });\n    },\n    exclude: function exclude (val) {\n      pruneCache(this.cache, function (name) { return !matches(val, name); });\n    }\n  },\n\n  render: function render () {\n    var vnode = getFirstComponentChild(this.$slots.default);\n    var componentOptions = vnode && vnode.componentOptions;\n    if (componentOptions) {\n      // check pattern\n      var name = getComponentName(componentOptions);\n      if (name && (\n        (this.include && !matches(this.include, name)) ||\n        (this.exclude && matches(this.exclude, name))\n      )) {\n        return vnode\n      }\n      var key = vnode.key == null\n        // same constructor may get registered as different local components\n        // so cid alone is not enough (#3269)\n        ? componentOptions.Ctor.cid + (componentOptions.tag ? (\"::\" + (componentOptions.tag)) : '')\n        : vnode.key;\n      if (this.cache[key]) {\n        vnode.componentInstance = this.cache[key].componentInstance;\n      } else {\n        this.cache[key] = vnode;\n      }\n      vnode.data.keepAlive = true;\n    }\n    return vnode\n  }\n};\n\nvar builtInComponents = {\n  KeepAlive: KeepAlive\n};\n\n/*  */\n\nfunction initGlobalAPI (Vue) {\n  // config\n  var configDef = {};\n  configDef.get = function () { return config; };\n  {\n    configDef.set = function () {\n      warn(\n        'Do not replace the Vue.config object, set individual fields instead.'\n      );\n    };\n  }\n  Object.defineProperty(Vue, 'config', configDef);\n\n  // exposed util methods.\n  // NOTE: these are not considered part of the public API - avoid relying on\n  // them unless you are aware of the risk.\n  Vue.util = {\n    warn: warn,\n    extend: extend,\n    mergeOptions: mergeOptions,\n    defineReactive: defineReactive$$1\n  };\n\n  Vue.set = set;\n  Vue.delete = del;\n  Vue.nextTick = nextTick;\n\n  Vue.options = Object.create(null);\n  config._assetTypes.forEach(function (type) {\n    Vue.options[type + 's'] = Object.create(null);\n  });\n\n  // this is used to identify the \"base\" constructor to extend all plain-object\n  // components with in Weex's multi-instance scenarios.\n  Vue.options._base = Vue;\n\n  extend(Vue.options.components, builtInComponents);\n\n  initUse(Vue);\n  initMixin$1(Vue);\n  initExtend(Vue);\n  initAssetRegisters(Vue);\n}\n\ninitGlobalAPI(Vue$3);\n\nObject.defineProperty(Vue$3.prototype, '$isServer', {\n  get: isServerRendering\n});\n\nVue$3.version = '2.2.6';\n\n/*  */\n\n// attributes that should be using props for binding\nvar acceptValue = makeMap('input,textarea,option,select');\nvar mustUseProp = function (tag, type, attr) {\n  return (\n    (attr === 'value' && acceptValue(tag)) && type !== 'button' ||\n    (attr === 'selected' && tag === 'option') ||\n    (attr === 'checked' && tag === 'input') ||\n    (attr === 'muted' && tag === 'video')\n  )\n};\n\nvar isEnumeratedAttr = makeMap('contenteditable,draggable,spellcheck');\n\nvar isBooleanAttr = makeMap(\n  'allowfullscreen,async,autofocus,autoplay,checked,compact,controls,declare,' +\n  'default,defaultchecked,defaultmuted,defaultselected,defer,disabled,' +\n  'enabled,formnovalidate,hidden,indeterminate,inert,ismap,itemscope,loop,multiple,' +\n  'muted,nohref,noresize,noshade,novalidate,nowrap,open,pauseonexit,readonly,' +\n  'required,reversed,scoped,seamless,selected,sortable,translate,' +\n  'truespeed,typemustmatch,visible'\n);\n\nvar xlinkNS = 'http://www.w3.org/1999/xlink';\n\nvar isXlink = function (name) {\n  return name.charAt(5) === ':' && name.slice(0, 5) === 'xlink'\n};\n\nvar getXlinkProp = function (name) {\n  return isXlink(name) ? name.slice(6, name.length) : ''\n};\n\nvar isFalsyAttrValue = function (val) {\n  return val == null || val === false\n};\n\n/*  */\n\nfunction genClassForVnode (vnode) {\n  var data = vnode.data;\n  var parentNode = vnode;\n  var childNode = vnode;\n  while (childNode.componentInstance) {\n    childNode = childNode.componentInstance._vnode;\n    if (childNode.data) {\n      data = mergeClassData(childNode.data, data);\n    }\n  }\n  while ((parentNode = parentNode.parent)) {\n    if (parentNode.data) {\n      data = mergeClassData(data, parentNode.data);\n    }\n  }\n  return genClassFromData(data)\n}\n\nfunction mergeClassData (child, parent) {\n  return {\n    staticClass: concat(child.staticClass, parent.staticClass),\n    class: child.class\n      ? [child.class, parent.class]\n      : parent.class\n  }\n}\n\nfunction genClassFromData (data) {\n  var dynamicClass = data.class;\n  var staticClass = data.staticClass;\n  if (staticClass || dynamicClass) {\n    return concat(staticClass, stringifyClass(dynamicClass))\n  }\n  /* istanbul ignore next */\n  return ''\n}\n\nfunction concat (a, b) {\n  return a ? b ? (a + ' ' + b) : a : (b || '')\n}\n\nfunction stringifyClass (value) {\n  var res = '';\n  if (!value) {\n    return res\n  }\n  if (typeof value === 'string') {\n    return value\n  }\n  if (Array.isArray(value)) {\n    var stringified;\n    for (var i = 0, l = value.length; i < l; i++) {\n      if (value[i]) {\n        if ((stringified = stringifyClass(value[i]))) {\n          res += stringified + ' ';\n        }\n      }\n    }\n    return res.slice(0, -1)\n  }\n  if (isObject(value)) {\n    for (var key in value) {\n      if (value[key]) { res += key + ' '; }\n    }\n    return res.slice(0, -1)\n  }\n  /* istanbul ignore next */\n  return res\n}\n\n/*  */\n\nvar namespaceMap = {\n  svg: 'http://www.w3.org/2000/svg',\n  math: 'http://www.w3.org/1998/Math/MathML'\n};\n\nvar isHTMLTag = makeMap(\n  'html,body,base,head,link,meta,style,title,' +\n  'address,article,aside,footer,header,h1,h2,h3,h4,h5,h6,hgroup,nav,section,' +\n  'div,dd,dl,dt,figcaption,figure,hr,img,li,main,ol,p,pre,ul,' +\n  'a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,rtc,ruby,' +\n  's,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,' +\n  'embed,object,param,source,canvas,script,noscript,del,ins,' +\n  'caption,col,colgroup,table,thead,tbody,td,th,tr,' +\n  'button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,' +\n  'output,progress,select,textarea,' +\n  'details,dialog,menu,menuitem,summary,' +\n  'content,element,shadow,template'\n);\n\n// this map is intentionally selective, only covering SVG elements that may\n// contain child elements.\nvar isSVG = makeMap(\n  'svg,animate,circle,clippath,cursor,defs,desc,ellipse,filter,font-face,' +\n  'foreignObject,g,glyph,image,line,marker,mask,missing-glyph,path,pattern,' +\n  'polygon,polyline,rect,switch,symbol,text,textpath,tspan,use,view',\n  true\n);\n\nvar isPreTag = function (tag) { return tag === 'pre'; };\n\nvar isReservedTag = function (tag) {\n  return isHTMLTag(tag) || isSVG(tag)\n};\n\nfunction getTagNamespace (tag) {\n  if (isSVG(tag)) {\n    return 'svg'\n  }\n  // basic support for MathML\n  // note it doesn't support other MathML elements being component roots\n  if (tag === 'math') {\n    return 'math'\n  }\n}\n\nvar unknownElementCache = Object.create(null);\nfunction isUnknownElement (tag) {\n  /* istanbul ignore if */\n  if (!inBrowser) {\n    return true\n  }\n  if (isReservedTag(tag)) {\n    return false\n  }\n  tag = tag.toLowerCase();\n  /* istanbul ignore if */\n  if (unknownElementCache[tag] != null) {\n    return unknownElementCache[tag]\n  }\n  var el = document.createElement(tag);\n  if (tag.indexOf('-') > -1) {\n    // http://stackoverflow.com/a/28210364/1070244\n    return (unknownElementCache[tag] = (\n      el.constructor === window.HTMLUnknownElement ||\n      el.constructor === window.HTMLElement\n    ))\n  } else {\n    return (unknownElementCache[tag] = /HTMLUnknownElement/.test(el.toString()))\n  }\n}\n\n/*  */\n\n/**\n * Query an element selector if it's not an element already.\n */\nfunction query (el) {\n  if (typeof el === 'string') {\n    var selected = document.querySelector(el);\n    if (!selected) {\n      \"development\" !== 'production' && warn(\n        'Cannot find element: ' + el\n      );\n      return document.createElement('div')\n    }\n    return selected\n  } else {\n    return el\n  }\n}\n\n/*  */\n\nfunction createElement$1 (tagName, vnode) {\n  var elm = document.createElement(tagName);\n  if (tagName !== 'select') {\n    return elm\n  }\n  // false or null will remove the attribute but undefined will not\n  if (vnode.data && vnode.data.attrs && vnode.data.attrs.multiple !== undefined) {\n    elm.setAttribute('multiple', 'multiple');\n  }\n  return elm\n}\n\nfunction createElementNS (namespace, tagName) {\n  return document.createElementNS(namespaceMap[namespace], tagName)\n}\n\nfunction createTextNode (text) {\n  return document.createTextNode(text)\n}\n\nfunction createComment (text) {\n  return document.createComment(text)\n}\n\nfunction insertBefore (parentNode, newNode, referenceNode) {\n  parentNode.insertBefore(newNode, referenceNode);\n}\n\nfunction removeChild (node, child) {\n  node.removeChild(child);\n}\n\nfunction appendChild (node, child) {\n  node.appendChild(child);\n}\n\nfunction parentNode (node) {\n  return node.parentNode\n}\n\nfunction nextSibling (node) {\n  return node.nextSibling\n}\n\nfunction tagName (node) {\n  return node.tagName\n}\n\nfunction setTextContent (node, text) {\n  node.textContent = text;\n}\n\nfunction setAttribute (node, key, val) {\n  node.setAttribute(key, val);\n}\n\n\nvar nodeOps = Object.freeze({\n\tcreateElement: createElement$1,\n\tcreateElementNS: createElementNS,\n\tcreateTextNode: createTextNode,\n\tcreateComment: createComment,\n\tinsertBefore: insertBefore,\n\tremoveChild: removeChild,\n\tappendChild: appendChild,\n\tparentNode: parentNode,\n\tnextSibling: nextSibling,\n\ttagName: tagName,\n\tsetTextContent: setTextContent,\n\tsetAttribute: setAttribute\n});\n\n/*  */\n\nvar ref = {\n  create: function create (_, vnode) {\n    registerRef(vnode);\n  },\n  update: function update (oldVnode, vnode) {\n    if (oldVnode.data.ref !== vnode.data.ref) {\n      registerRef(oldVnode, true);\n      registerRef(vnode);\n    }\n  },\n  destroy: function destroy (vnode) {\n    registerRef(vnode, true);\n  }\n};\n\nfunction registerRef (vnode, isRemoval) {\n  var key = vnode.data.ref;\n  if (!key) { return }\n\n  var vm = vnode.context;\n  var ref = vnode.componentInstance || vnode.elm;\n  var refs = vm.$refs;\n  if (isRemoval) {\n    if (Array.isArray(refs[key])) {\n      remove(refs[key], ref);\n    } else if (refs[key] === ref) {\n      refs[key] = undefined;\n    }\n  } else {\n    if (vnode.data.refInFor) {\n      if (Array.isArray(refs[key]) && refs[key].indexOf(ref) < 0) {\n        refs[key].push(ref);\n      } else {\n        refs[key] = [ref];\n      }\n    } else {\n      refs[key] = ref;\n    }\n  }\n}\n\n/**\n * Virtual DOM patching algorithm based on Snabbdom by\n * Simon Friis Vindum (@paldepind)\n * Licensed under the MIT License\n * https://github.com/paldepind/snabbdom/blob/master/LICENSE\n *\n * modified by Evan You (@yyx990803)\n *\n\n/*\n * Not type-checking this because this file is perf-critical and the cost\n * of making flow understand it is not worth it.\n */\n\nvar emptyNode = new VNode('', {}, []);\n\nvar hooks = ['create', 'activate', 'update', 'remove', 'destroy'];\n\nfunction isUndef (v) {\n  return v === undefined || v === null\n}\n\nfunction isDef (v) {\n  return v !== undefined && v !== null\n}\n\nfunction isTrue (v) {\n  return v === true\n}\n\nfunction sameVnode (a, b) {\n  return (\n    a.key === b.key &&\n    a.tag === b.tag &&\n    a.isComment === b.isComment &&\n    isDef(a.data) === isDef(b.data) &&\n    sameInputType(a, b)\n  )\n}\n\n// Some browsers do not support dynamically changing type for <input>\n// so they need to be treated as different nodes\nfunction sameInputType (a, b) {\n  if (a.tag !== 'input') { return true }\n  var i;\n  var typeA = isDef(i = a.data) && isDef(i = i.attrs) && i.type;\n  var typeB = isDef(i = b.data) && isDef(i = i.attrs) && i.type;\n  return typeA === typeB\n}\n\nfunction createKeyToOldIdx (children, beginIdx, endIdx) {\n  var i, key;\n  var map = {};\n  for (i = beginIdx; i <= endIdx; ++i) {\n    key = children[i].key;\n    if (isDef(key)) { map[key] = i; }\n  }\n  return map\n}\n\nfunction createPatchFunction (backend) {\n  var i, j;\n  var cbs = {};\n\n  var modules = backend.modules;\n  var nodeOps = backend.nodeOps;\n\n  for (i = 0; i < hooks.length; ++i) {\n    cbs[hooks[i]] = [];\n    for (j = 0; j < modules.length; ++j) {\n      if (isDef(modules[j][hooks[i]])) {\n        cbs[hooks[i]].push(modules[j][hooks[i]]);\n      }\n    }\n  }\n\n  function emptyNodeAt (elm) {\n    return new VNode(nodeOps.tagName(elm).toLowerCase(), {}, [], undefined, elm)\n  }\n\n  function createRmCb (childElm, listeners) {\n    function remove$$1 () {\n      if (--remove$$1.listeners === 0) {\n        removeNode(childElm);\n      }\n    }\n    remove$$1.listeners = listeners;\n    return remove$$1\n  }\n\n  function removeNode (el) {\n    var parent = nodeOps.parentNode(el);\n    // element may have already been removed due to v-html / v-text\n    if (isDef(parent)) {\n      nodeOps.removeChild(parent, el);\n    }\n  }\n\n  var inPre = 0;\n  function createElm (vnode, insertedVnodeQueue, parentElm, refElm, nested) {\n    vnode.isRootInsert = !nested; // for transition enter check\n    if (createComponent(vnode, insertedVnodeQueue, parentElm, refElm)) {\n      return\n    }\n\n    var data = vnode.data;\n    var children = vnode.children;\n    var tag = vnode.tag;\n    if (isDef(tag)) {\n      {\n        if (data && data.pre) {\n          inPre++;\n        }\n        if (\n          !inPre &&\n          !vnode.ns &&\n          !(config.ignoredElements.length && config.ignoredElements.indexOf(tag) > -1) &&\n          config.isUnknownElement(tag)\n        ) {\n          warn(\n            'Unknown custom element: <' + tag + '> - did you ' +\n            'register the component correctly? For recursive components, ' +\n            'make sure to provide the \"name\" option.',\n            vnode.context\n          );\n        }\n      }\n      vnode.elm = vnode.ns\n        ? nodeOps.createElementNS(vnode.ns, tag)\n        : nodeOps.createElement(tag, vnode);\n      setScope(vnode);\n\n      /* istanbul ignore if */\n      {\n        createChildren(vnode, children, insertedVnodeQueue);\n        if (isDef(data)) {\n          invokeCreateHooks(vnode, insertedVnodeQueue);\n        }\n        insert(parentElm, vnode.elm, refElm);\n      }\n\n      if (\"development\" !== 'production' && data && data.pre) {\n        inPre--;\n      }\n    } else if (isTrue(vnode.isComment)) {\n      vnode.elm = nodeOps.createComment(vnode.text);\n      insert(parentElm, vnode.elm, refElm);\n    } else {\n      vnode.elm = nodeOps.createTextNode(vnode.text);\n      insert(parentElm, vnode.elm, refElm);\n    }\n  }\n\n  function createComponent (vnode, insertedVnodeQueue, parentElm, refElm) {\n    var i = vnode.data;\n    if (isDef(i)) {\n      var isReactivated = isDef(vnode.componentInstance) && i.keepAlive;\n      if (isDef(i = i.hook) && isDef(i = i.init)) {\n        i(vnode, false /* hydrating */, parentElm, refElm);\n      }\n      // after calling the init hook, if the vnode is a child component\n      // it should've created a child instance and mounted it. the child\n      // component also has set the placeholder vnode's elm.\n      // in that case we can just return the element and be done.\n      if (isDef(vnode.componentInstance)) {\n        initComponent(vnode, insertedVnodeQueue);\n        if (isTrue(isReactivated)) {\n          reactivateComponent(vnode, insertedVnodeQueue, parentElm, refElm);\n        }\n        return true\n      }\n    }\n  }\n\n  function initComponent (vnode, insertedVnodeQueue) {\n    if (isDef(vnode.data.pendingInsert)) {\n      insertedVnodeQueue.push.apply(insertedVnodeQueue, vnode.data.pendingInsert);\n    }\n    vnode.elm = vnode.componentInstance.$el;\n    if (isPatchable(vnode)) {\n      invokeCreateHooks(vnode, insertedVnodeQueue);\n      setScope(vnode);\n    } else {\n      // empty component root.\n      // skip all element-related modules except for ref (#3455)\n      registerRef(vnode);\n      // make sure to invoke the insert hook\n      insertedVnodeQueue.push(vnode);\n    }\n  }\n\n  function reactivateComponent (vnode, insertedVnodeQueue, parentElm, refElm) {\n    var i;\n    // hack for #4339: a reactivated component with inner transition\n    // does not trigger because the inner node's created hooks are not called\n    // again. It's not ideal to involve module-specific logic in here but\n    // there doesn't seem to be a better way to do it.\n    var innerNode = vnode;\n    while (innerNode.componentInstance) {\n      innerNode = innerNode.componentInstance._vnode;\n      if (isDef(i = innerNode.data) && isDef(i = i.transition)) {\n        for (i = 0; i < cbs.activate.length; ++i) {\n          cbs.activate[i](emptyNode, innerNode);\n        }\n        insertedVnodeQueue.push(innerNode);\n        break\n      }\n    }\n    // unlike a newly created component,\n    // a reactivated keep-alive component doesn't insert itself\n    insert(parentElm, vnode.elm, refElm);\n  }\n\n  function insert (parent, elm, ref) {\n    if (isDef(parent)) {\n      if (isDef(ref)) {\n        nodeOps.insertBefore(parent, elm, ref);\n      } else {\n        nodeOps.appendChild(parent, elm);\n      }\n    }\n  }\n\n  function createChildren (vnode, children, insertedVnodeQueue) {\n    if (Array.isArray(children)) {\n      for (var i = 0; i < children.length; ++i) {\n        createElm(children[i], insertedVnodeQueue, vnode.elm, null, true);\n      }\n    } else if (isPrimitive(vnode.text)) {\n      nodeOps.appendChild(vnode.elm, nodeOps.createTextNode(vnode.text));\n    }\n  }\n\n  function isPatchable (vnode) {\n    while (vnode.componentInstance) {\n      vnode = vnode.componentInstance._vnode;\n    }\n    return isDef(vnode.tag)\n  }\n\n  function invokeCreateHooks (vnode, insertedVnodeQueue) {\n    for (var i$1 = 0; i$1 < cbs.create.length; ++i$1) {\n      cbs.create[i$1](emptyNode, vnode);\n    }\n    i = vnode.data.hook; // Reuse variable\n    if (isDef(i)) {\n      if (isDef(i.create)) { i.create(emptyNode, vnode); }\n      if (isDef(i.insert)) { insertedVnodeQueue.push(vnode); }\n    }\n  }\n\n  // set scope id attribute for scoped CSS.\n  // this is implemented as a special case to avoid the overhead\n  // of going through the normal attribute patching process.\n  function setScope (vnode) {\n    var i;\n    var ancestor = vnode;\n    while (ancestor) {\n      if (isDef(i = ancestor.context) && isDef(i = i.$options._scopeId)) {\n        nodeOps.setAttribute(vnode.elm, i, '');\n      }\n      ancestor = ancestor.parent;\n    }\n    // for slot content they should also get the scopeId from the host instance.\n    if (isDef(i = activeInstance) &&\n        i !== vnode.context &&\n        isDef(i = i.$options._scopeId)) {\n      nodeOps.setAttribute(vnode.elm, i, '');\n    }\n  }\n\n  function addVnodes (parentElm, refElm, vnodes, startIdx, endIdx, insertedVnodeQueue) {\n    for (; startIdx <= endIdx; ++startIdx) {\n      createElm(vnodes[startIdx], insertedVnodeQueue, parentElm, refElm);\n    }\n  }\n\n  function invokeDestroyHook (vnode) {\n    var i, j;\n    var data = vnode.data;\n    if (isDef(data)) {\n      if (isDef(i = data.hook) && isDef(i = i.destroy)) { i(vnode); }\n      for (i = 0; i < cbs.destroy.length; ++i) { cbs.destroy[i](vnode); }\n    }\n    if (isDef(i = vnode.children)) {\n      for (j = 0; j < vnode.children.length; ++j) {\n        invokeDestroyHook(vnode.children[j]);\n      }\n    }\n  }\n\n  function removeVnodes (parentElm, vnodes, startIdx, endIdx) {\n    for (; startIdx <= endIdx; ++startIdx) {\n      var ch = vnodes[startIdx];\n      if (isDef(ch)) {\n        if (isDef(ch.tag)) {\n          removeAndInvokeRemoveHook(ch);\n          invokeDestroyHook(ch);\n        } else { // Text node\n          removeNode(ch.elm);\n        }\n      }\n    }\n  }\n\n  function removeAndInvokeRemoveHook (vnode, rm) {\n    if (isDef(rm) || isDef(vnode.data)) {\n      var listeners = cbs.remove.length + 1;\n      if (isDef(rm)) {\n        // we have a recursively passed down rm callback\n        // increase the listeners count\n        rm.listeners += listeners;\n      } else {\n        // directly removing\n        rm = createRmCb(vnode.elm, listeners);\n      }\n      // recursively invoke hooks on child component root node\n      if (isDef(i = vnode.componentInstance) && isDef(i = i._vnode) && isDef(i.data)) {\n        removeAndInvokeRemoveHook(i, rm);\n      }\n      for (i = 0; i < cbs.remove.length; ++i) {\n        cbs.remove[i](vnode, rm);\n      }\n      if (isDef(i = vnode.data.hook) && isDef(i = i.remove)) {\n        i(vnode, rm);\n      } else {\n        rm();\n      }\n    } else {\n      removeNode(vnode.elm);\n    }\n  }\n\n  function updateChildren (parentElm, oldCh, newCh, insertedVnodeQueue, removeOnly) {\n    var oldStartIdx = 0;\n    var newStartIdx = 0;\n    var oldEndIdx = oldCh.length - 1;\n    var oldStartVnode = oldCh[0];\n    var oldEndVnode = oldCh[oldEndIdx];\n    var newEndIdx = newCh.length - 1;\n    var newStartVnode = newCh[0];\n    var newEndVnode = newCh[newEndIdx];\n    var oldKeyToIdx, idxInOld, elmToMove, refElm;\n\n    // removeOnly is a special flag used only by <transition-group>\n    // to ensure removed elements stay in correct relative positions\n    // during leaving transitions\n    var canMove = !removeOnly;\n\n    while (oldStartIdx <= oldEndIdx && newStartIdx <= newEndIdx) {\n      if (isUndef(oldStartVnode)) {\n        oldStartVnode = oldCh[++oldStartIdx]; // Vnode has been moved left\n      } else if (isUndef(oldEndVnode)) {\n        oldEndVnode = oldCh[--oldEndIdx];\n      } else if (sameVnode(oldStartVnode, newStartVnode)) {\n        patchVnode(oldStartVnode, newStartVnode, insertedVnodeQueue);\n        oldStartVnode = oldCh[++oldStartIdx];\n        newStartVnode = newCh[++newStartIdx];\n      } else if (sameVnode(oldEndVnode, newEndVnode)) {\n        patchVnode(oldEndVnode, newEndVnode, insertedVnodeQueue);\n        oldEndVnode = oldCh[--oldEndIdx];\n        newEndVnode = newCh[--newEndIdx];\n      } else if (sameVnode(oldStartVnode, newEndVnode)) { // Vnode moved right\n        patchVnode(oldStartVnode, newEndVnode, insertedVnodeQueue);\n        canMove && nodeOps.insertBefore(parentElm, oldStartVnode.elm, nodeOps.nextSibling(oldEndVnode.elm));\n        oldStartVnode = oldCh[++oldStartIdx];\n        newEndVnode = newCh[--newEndIdx];\n      } else if (sameVnode(oldEndVnode, newStartVnode)) { // Vnode moved left\n        patchVnode(oldEndVnode, newStartVnode, insertedVnodeQueue);\n        canMove && nodeOps.insertBefore(parentElm, oldEndVnode.elm, oldStartVnode.elm);\n        oldEndVnode = oldCh[--oldEndIdx];\n        newStartVnode = newCh[++newStartIdx];\n      } else {\n        if (isUndef(oldKeyToIdx)) { oldKeyToIdx = createKeyToOldIdx(oldCh, oldStartIdx, oldEndIdx); }\n        idxInOld = isDef(newStartVnode.key) ? oldKeyToIdx[newStartVnode.key] : null;\n        if (isUndef(idxInOld)) { // New element\n          createElm(newStartVnode, insertedVnodeQueue, parentElm, oldStartVnode.elm);\n          newStartVnode = newCh[++newStartIdx];\n        } else {\n          elmToMove = oldCh[idxInOld];\n          /* istanbul ignore if */\n          if (\"development\" !== 'production' && !elmToMove) {\n            warn(\n              'It seems there are duplicate keys that is causing an update error. ' +\n              'Make sure each v-for item has a unique key.'\n            );\n          }\n          if (sameVnode(elmToMove, newStartVnode)) {\n            patchVnode(elmToMove, newStartVnode, insertedVnodeQueue);\n            oldCh[idxInOld] = undefined;\n            canMove && nodeOps.insertBefore(parentElm, newStartVnode.elm, oldStartVnode.elm);\n            newStartVnode = newCh[++newStartIdx];\n          } else {\n            // same key but different element. treat as new element\n            createElm(newStartVnode, insertedVnodeQueue, parentElm, oldStartVnode.elm);\n            newStartVnode = newCh[++newStartIdx];\n          }\n        }\n      }\n    }\n    if (oldStartIdx > oldEndIdx) {\n      refElm = isUndef(newCh[newEndIdx + 1]) ? null : newCh[newEndIdx + 1].elm;\n      addVnodes(parentElm, refElm, newCh, newStartIdx, newEndIdx, insertedVnodeQueue);\n    } else if (newStartIdx > newEndIdx) {\n      removeVnodes(parentElm, oldCh, oldStartIdx, oldEndIdx);\n    }\n  }\n\n  function patchVnode (oldVnode, vnode, insertedVnodeQueue, removeOnly) {\n    if (oldVnode === vnode) {\n      return\n    }\n    // reuse element for static trees.\n    // note we only do this if the vnode is cloned -\n    // if the new node is not cloned it means the render functions have been\n    // reset by the hot-reload-api and we need to do a proper re-render.\n    if (isTrue(vnode.isStatic) &&\n        isTrue(oldVnode.isStatic) &&\n        vnode.key === oldVnode.key &&\n        (isTrue(vnode.isCloned) || isTrue(vnode.isOnce))) {\n      vnode.elm = oldVnode.elm;\n      vnode.componentInstance = oldVnode.componentInstance;\n      return\n    }\n    var i;\n    var data = vnode.data;\n    if (isDef(data) && isDef(i = data.hook) && isDef(i = i.prepatch)) {\n      i(oldVnode, vnode);\n    }\n    var elm = vnode.elm = oldVnode.elm;\n    var oldCh = oldVnode.children;\n    var ch = vnode.children;\n    if (isDef(data) && isPatchable(vnode)) {\n      for (i = 0; i < cbs.update.length; ++i) { cbs.update[i](oldVnode, vnode); }\n      if (isDef(i = data.hook) && isDef(i = i.update)) { i(oldVnode, vnode); }\n    }\n    if (isUndef(vnode.text)) {\n      if (isDef(oldCh) && isDef(ch)) {\n        if (oldCh !== ch) { updateChildren(elm, oldCh, ch, insertedVnodeQueue, removeOnly); }\n      } else if (isDef(ch)) {\n        if (isDef(oldVnode.text)) { nodeOps.setTextContent(elm, ''); }\n        addVnodes(elm, null, ch, 0, ch.length - 1, insertedVnodeQueue);\n      } else if (isDef(oldCh)) {\n        removeVnodes(elm, oldCh, 0, oldCh.length - 1);\n      } else if (isDef(oldVnode.text)) {\n        nodeOps.setTextContent(elm, '');\n      }\n    } else if (oldVnode.text !== vnode.text) {\n      nodeOps.setTextContent(elm, vnode.text);\n    }\n    if (isDef(data)) {\n      if (isDef(i = data.hook) && isDef(i = i.postpatch)) { i(oldVnode, vnode); }\n    }\n  }\n\n  function invokeInsertHook (vnode, queue, initial) {\n    // delay insert hooks for component root nodes, invoke them after the\n    // element is really inserted\n    if (isTrue(initial) && isDef(vnode.parent)) {\n      vnode.parent.data.pendingInsert = queue;\n    } else {\n      for (var i = 0; i < queue.length; ++i) {\n        queue[i].data.hook.insert(queue[i]);\n      }\n    }\n  }\n\n  var bailed = false;\n  // list of modules that can skip create hook during hydration because they\n  // are already rendered on the client or has no need for initialization\n  var isRenderedModule = makeMap('attrs,style,class,staticClass,staticStyle,key');\n\n  // Note: this is a browser-only function so we can assume elms are DOM nodes.\n  function hydrate (elm, vnode, insertedVnodeQueue) {\n    {\n      if (!assertNodeMatch(elm, vnode)) {\n        return false\n      }\n    }\n    vnode.elm = elm;\n    var tag = vnode.tag;\n    var data = vnode.data;\n    var children = vnode.children;\n    if (isDef(data)) {\n      if (isDef(i = data.hook) && isDef(i = i.init)) { i(vnode, true /* hydrating */); }\n      if (isDef(i = vnode.componentInstance)) {\n        // child component. it should have hydrated its own tree.\n        initComponent(vnode, insertedVnodeQueue);\n        return true\n      }\n    }\n    if (isDef(tag)) {\n      if (isDef(children)) {\n        // empty element, allow client to pick up and populate children\n        if (!elm.hasChildNodes()) {\n          createChildren(vnode, children, insertedVnodeQueue);\n        } else {\n          var childrenMatch = true;\n          var childNode = elm.firstChild;\n          for (var i$1 = 0; i$1 < children.length; i$1++) {\n            if (!childNode || !hydrate(childNode, children[i$1], insertedVnodeQueue)) {\n              childrenMatch = false;\n              break\n            }\n            childNode = childNode.nextSibling;\n          }\n          // if childNode is not null, it means the actual childNodes list is\n          // longer than the virtual children list.\n          if (!childrenMatch || childNode) {\n            if (\"development\" !== 'production' &&\n                typeof console !== 'undefined' &&\n                !bailed) {\n              bailed = true;\n              console.warn('Parent: ', elm);\n              console.warn('Mismatching childNodes vs. VNodes: ', elm.childNodes, children);\n            }\n            return false\n          }\n        }\n      }\n      if (isDef(data)) {\n        for (var key in data) {\n          if (!isRenderedModule(key)) {\n            invokeCreateHooks(vnode, insertedVnodeQueue);\n            break\n          }\n        }\n      }\n    } else if (elm.data !== vnode.text) {\n      elm.data = vnode.text;\n    }\n    return true\n  }\n\n  function assertNodeMatch (node, vnode) {\n    if (isDef(vnode.tag)) {\n      return (\n        vnode.tag.indexOf('vue-component') === 0 ||\n        vnode.tag.toLowerCase() === (node.tagName && node.tagName.toLowerCase())\n      )\n    } else {\n      return node.nodeType === (vnode.isComment ? 8 : 3)\n    }\n  }\n\n  return function patch (oldVnode, vnode, hydrating, removeOnly, parentElm, refElm) {\n    if (isUndef(vnode)) {\n      if (isDef(oldVnode)) { invokeDestroyHook(oldVnode); }\n      return\n    }\n\n    var isInitialPatch = false;\n    var insertedVnodeQueue = [];\n\n    if (isUndef(oldVnode)) {\n      // empty mount (likely as component), create new root element\n      isInitialPatch = true;\n      createElm(vnode, insertedVnodeQueue, parentElm, refElm);\n    } else {\n      var isRealElement = isDef(oldVnode.nodeType);\n      if (!isRealElement && sameVnode(oldVnode, vnode)) {\n        // patch existing root node\n        patchVnode(oldVnode, vnode, insertedVnodeQueue, removeOnly);\n      } else {\n        if (isRealElement) {\n          // mounting to a real element\n          // check if this is server-rendered content and if we can perform\n          // a successful hydration.\n          if (oldVnode.nodeType === 1 && oldVnode.hasAttribute('server-rendered')) {\n            oldVnode.removeAttribute('server-rendered');\n            hydrating = true;\n          }\n          if (isTrue(hydrating)) {\n            if (hydrate(oldVnode, vnode, insertedVnodeQueue)) {\n              invokeInsertHook(vnode, insertedVnodeQueue, true);\n              return oldVnode\n            } else {\n              warn(\n                'The client-side rendered virtual DOM tree is not matching ' +\n                'server-rendered content. This is likely caused by incorrect ' +\n                'HTML markup, for example nesting block-level elements inside ' +\n                '<p>, or missing <tbody>. Bailing hydration and performing ' +\n                'full client-side render.'\n              );\n            }\n          }\n          // either not server-rendered, or hydration failed.\n          // create an empty node and replace it\n          oldVnode = emptyNodeAt(oldVnode);\n        }\n        // replacing existing element\n        var oldElm = oldVnode.elm;\n        var parentElm$1 = nodeOps.parentNode(oldElm);\n        createElm(\n          vnode,\n          insertedVnodeQueue,\n          // extremely rare edge case: do not insert if old element is in a\n          // leaving transition. Only happens when combining transition +\n          // keep-alive + HOCs. (#4590)\n          oldElm._leaveCb ? null : parentElm$1,\n          nodeOps.nextSibling(oldElm)\n        );\n\n        if (isDef(vnode.parent)) {\n          // component root element replaced.\n          // update parent placeholder node element, recursively\n          var ancestor = vnode.parent;\n          while (ancestor) {\n            ancestor.elm = vnode.elm;\n            ancestor = ancestor.parent;\n          }\n          if (isPatchable(vnode)) {\n            for (var i = 0; i < cbs.create.length; ++i) {\n              cbs.create[i](emptyNode, vnode.parent);\n            }\n          }\n        }\n\n        if (isDef(parentElm$1)) {\n          removeVnodes(parentElm$1, [oldVnode], 0, 0);\n        } else if (isDef(oldVnode.tag)) {\n          invokeDestroyHook(oldVnode);\n        }\n      }\n    }\n\n    invokeInsertHook(vnode, insertedVnodeQueue, isInitialPatch);\n    return vnode.elm\n  }\n}\n\n/*  */\n\nvar directives = {\n  create: updateDirectives,\n  update: updateDirectives,\n  destroy: function unbindDirectives (vnode) {\n    updateDirectives(vnode, emptyNode);\n  }\n};\n\nfunction updateDirectives (oldVnode, vnode) {\n  if (oldVnode.data.directives || vnode.data.directives) {\n    _update(oldVnode, vnode);\n  }\n}\n\nfunction _update (oldVnode, vnode) {\n  var isCreate = oldVnode === emptyNode;\n  var isDestroy = vnode === emptyNode;\n  var oldDirs = normalizeDirectives$1(oldVnode.data.directives, oldVnode.context);\n  var newDirs = normalizeDirectives$1(vnode.data.directives, vnode.context);\n\n  var dirsWithInsert = [];\n  var dirsWithPostpatch = [];\n\n  var key, oldDir, dir;\n  for (key in newDirs) {\n    oldDir = oldDirs[key];\n    dir = newDirs[key];\n    if (!oldDir) {\n      // new directive, bind\n      callHook$1(dir, 'bind', vnode, oldVnode);\n      if (dir.def && dir.def.inserted) {\n        dirsWithInsert.push(dir);\n      }\n    } else {\n      // existing directive, update\n      dir.oldValue = oldDir.value;\n      callHook$1(dir, 'update', vnode, oldVnode);\n      if (dir.def && dir.def.componentUpdated) {\n        dirsWithPostpatch.push(dir);\n      }\n    }\n  }\n\n  if (dirsWithInsert.length) {\n    var callInsert = function () {\n      for (var i = 0; i < dirsWithInsert.length; i++) {\n        callHook$1(dirsWithInsert[i], 'inserted', vnode, oldVnode);\n      }\n    };\n    if (isCreate) {\n      mergeVNodeHook(vnode.data.hook || (vnode.data.hook = {}), 'insert', callInsert);\n    } else {\n      callInsert();\n    }\n  }\n\n  if (dirsWithPostpatch.length) {\n    mergeVNodeHook(vnode.data.hook || (vnode.data.hook = {}), 'postpatch', function () {\n      for (var i = 0; i < dirsWithPostpatch.length; i++) {\n        callHook$1(dirsWithPostpatch[i], 'componentUpdated', vnode, oldVnode);\n      }\n    });\n  }\n\n  if (!isCreate) {\n    for (key in oldDirs) {\n      if (!newDirs[key]) {\n        // no longer present, unbind\n        callHook$1(oldDirs[key], 'unbind', oldVnode, oldVnode, isDestroy);\n      }\n    }\n  }\n}\n\nvar emptyModifiers = Object.create(null);\n\nfunction normalizeDirectives$1 (\n  dirs,\n  vm\n) {\n  var res = Object.create(null);\n  if (!dirs) {\n    return res\n  }\n  var i, dir;\n  for (i = 0; i < dirs.length; i++) {\n    dir = dirs[i];\n    if (!dir.modifiers) {\n      dir.modifiers = emptyModifiers;\n    }\n    res[getRawDirName(dir)] = dir;\n    dir.def = resolveAsset(vm.$options, 'directives', dir.name, true);\n  }\n  return res\n}\n\nfunction getRawDirName (dir) {\n  return dir.rawName || ((dir.name) + \".\" + (Object.keys(dir.modifiers || {}).join('.')))\n}\n\nfunction callHook$1 (dir, hook, vnode, oldVnode, isDestroy) {\n  var fn = dir.def && dir.def[hook];\n  if (fn) {\n    fn(vnode.elm, dir, vnode, oldVnode, isDestroy);\n  }\n}\n\nvar baseModules = [\n  ref,\n  directives\n];\n\n/*  */\n\nfunction updateAttrs (oldVnode, vnode) {\n  if (!oldVnode.data.attrs && !vnode.data.attrs) {\n    return\n  }\n  var key, cur, old;\n  var elm = vnode.elm;\n  var oldAttrs = oldVnode.data.attrs || {};\n  var attrs = vnode.data.attrs || {};\n  // clone observed objects, as the user probably wants to mutate it\n  if (attrs.__ob__) {\n    attrs = vnode.data.attrs = extend({}, attrs);\n  }\n\n  for (key in attrs) {\n    cur = attrs[key];\n    old = oldAttrs[key];\n    if (old !== cur) {\n      setAttr(elm, key, cur);\n    }\n  }\n  // #4391: in IE9, setting type can reset value for input[type=radio]\n  /* istanbul ignore if */\n  if (isIE9 && attrs.value !== oldAttrs.value) {\n    setAttr(elm, 'value', attrs.value);\n  }\n  for (key in oldAttrs) {\n    if (attrs[key] == null) {\n      if (isXlink(key)) {\n        elm.removeAttributeNS(xlinkNS, getXlinkProp(key));\n      } else if (!isEnumeratedAttr(key)) {\n        elm.removeAttribute(key);\n      }\n    }\n  }\n}\n\nfunction setAttr (el, key, value) {\n  if (isBooleanAttr(key)) {\n    // set attribute for blank value\n    // e.g. <option disabled>Select one</option>\n    if (isFalsyAttrValue(value)) {\n      el.removeAttribute(key);\n    } else {\n      el.setAttribute(key, key);\n    }\n  } else if (isEnumeratedAttr(key)) {\n    el.setAttribute(key, isFalsyAttrValue(value) || value === 'false' ? 'false' : 'true');\n  } else if (isXlink(key)) {\n    if (isFalsyAttrValue(value)) {\n      el.removeAttributeNS(xlinkNS, getXlinkProp(key));\n    } else {\n      el.setAttributeNS(xlinkNS, key, value);\n    }\n  } else {\n    if (isFalsyAttrValue(value)) {\n      el.removeAttribute(key);\n    } else {\n      el.setAttribute(key, value);\n    }\n  }\n}\n\nvar attrs = {\n  create: updateAttrs,\n  update: updateAttrs\n};\n\n/*  */\n\nfunction updateClass (oldVnode, vnode) {\n  var el = vnode.elm;\n  var data = vnode.data;\n  var oldData = oldVnode.data;\n  if (!data.staticClass && !data.class &&\n      (!oldData || (!oldData.staticClass && !oldData.class))) {\n    return\n  }\n\n  var cls = genClassForVnode(vnode);\n\n  // handle transition classes\n  var transitionClass = el._transitionClasses;\n  if (transitionClass) {\n    cls = concat(cls, stringifyClass(transitionClass));\n  }\n\n  // set the class\n  if (cls !== el._prevClass) {\n    el.setAttribute('class', cls);\n    el._prevClass = cls;\n  }\n}\n\nvar klass = {\n  create: updateClass,\n  update: updateClass\n};\n\n/*  */\n\nvar validDivisionCharRE = /[\\w).+\\-_$\\]]/;\n\nfunction parseFilters (exp) {\n  var inSingle = false;\n  var inDouble = false;\n  var inTemplateString = false;\n  var inRegex = false;\n  var curly = 0;\n  var square = 0;\n  var paren = 0;\n  var lastFilterIndex = 0;\n  var c, prev, i, expression, filters;\n\n  for (i = 0; i < exp.length; i++) {\n    prev = c;\n    c = exp.charCodeAt(i);\n    if (inSingle) {\n      if (c === 0x27 && prev !== 0x5C) { inSingle = false; }\n    } else if (inDouble) {\n      if (c === 0x22 && prev !== 0x5C) { inDouble = false; }\n    } else if (inTemplateString) {\n      if (c === 0x60 && prev !== 0x5C) { inTemplateString = false; }\n    } else if (inRegex) {\n      if (c === 0x2f && prev !== 0x5C) { inRegex = false; }\n    } else if (\n      c === 0x7C && // pipe\n      exp.charCodeAt(i + 1) !== 0x7C &&\n      exp.charCodeAt(i - 1) !== 0x7C &&\n      !curly && !square && !paren\n    ) {\n      if (expression === undefined) {\n        // first filter, end of expression\n        lastFilterIndex = i + 1;\n        expression = exp.slice(0, i).trim();\n      } else {\n        pushFilter();\n      }\n    } else {\n      switch (c) {\n        case 0x22: inDouble = true; break         // \"\n        case 0x27: inSingle = true; break         // '\n        case 0x60: inTemplateString = true; break // `\n        case 0x28: paren++; break                 // (\n        case 0x29: paren--; break                 // )\n        case 0x5B: square++; break                // [\n        case 0x5D: square--; break                // ]\n        case 0x7B: curly++; break                 // {\n        case 0x7D: curly--; break                 // }\n      }\n      if (c === 0x2f) { // /\n        var j = i - 1;\n        var p = (void 0);\n        // find first non-whitespace prev char\n        for (; j >= 0; j--) {\n          p = exp.charAt(j);\n          if (p !== ' ') { break }\n        }\n        if (!p || !validDivisionCharRE.test(p)) {\n          inRegex = true;\n        }\n      }\n    }\n  }\n\n  if (expression === undefined) {\n    expression = exp.slice(0, i).trim();\n  } else if (lastFilterIndex !== 0) {\n    pushFilter();\n  }\n\n  function pushFilter () {\n    (filters || (filters = [])).push(exp.slice(lastFilterIndex, i).trim());\n    lastFilterIndex = i + 1;\n  }\n\n  if (filters) {\n    for (i = 0; i < filters.length; i++) {\n      expression = wrapFilter(expression, filters[i]);\n    }\n  }\n\n  return expression\n}\n\nfunction wrapFilter (exp, filter) {\n  var i = filter.indexOf('(');\n  if (i < 0) {\n    // _f: resolveFilter\n    return (\"_f(\\\"\" + filter + \"\\\")(\" + exp + \")\")\n  } else {\n    var name = filter.slice(0, i);\n    var args = filter.slice(i + 1);\n    return (\"_f(\\\"\" + name + \"\\\")(\" + exp + \",\" + args)\n  }\n}\n\n/*  */\n\nfunction baseWarn (msg) {\n  console.error((\"[Vue compiler]: \" + msg));\n}\n\nfunction pluckModuleFunction (\n  modules,\n  key\n) {\n  return modules\n    ? modules.map(function (m) { return m[key]; }).filter(function (_) { return _; })\n    : []\n}\n\nfunction addProp (el, name, value) {\n  (el.props || (el.props = [])).push({ name: name, value: value });\n}\n\nfunction addAttr (el, name, value) {\n  (el.attrs || (el.attrs = [])).push({ name: name, value: value });\n}\n\nfunction addDirective (\n  el,\n  name,\n  rawName,\n  value,\n  arg,\n  modifiers\n) {\n  (el.directives || (el.directives = [])).push({ name: name, rawName: rawName, value: value, arg: arg, modifiers: modifiers });\n}\n\nfunction addHandler (\n  el,\n  name,\n  value,\n  modifiers,\n  important\n) {\n  // check capture modifier\n  if (modifiers && modifiers.capture) {\n    delete modifiers.capture;\n    name = '!' + name; // mark the event as captured\n  }\n  if (modifiers && modifiers.once) {\n    delete modifiers.once;\n    name = '~' + name; // mark the event as once\n  }\n  var events;\n  if (modifiers && modifiers.native) {\n    delete modifiers.native;\n    events = el.nativeEvents || (el.nativeEvents = {});\n  } else {\n    events = el.events || (el.events = {});\n  }\n  var newHandler = { value: value, modifiers: modifiers };\n  var handlers = events[name];\n  /* istanbul ignore if */\n  if (Array.isArray(handlers)) {\n    important ? handlers.unshift(newHandler) : handlers.push(newHandler);\n  } else if (handlers) {\n    events[name] = important ? [newHandler, handlers] : [handlers, newHandler];\n  } else {\n    events[name] = newHandler;\n  }\n}\n\nfunction getBindingAttr (\n  el,\n  name,\n  getStatic\n) {\n  var dynamicValue =\n    getAndRemoveAttr(el, ':' + name) ||\n    getAndRemoveAttr(el, 'v-bind:' + name);\n  if (dynamicValue != null) {\n    return parseFilters(dynamicValue)\n  } else if (getStatic !== false) {\n    var staticValue = getAndRemoveAttr(el, name);\n    if (staticValue != null) {\n      return JSON.stringify(staticValue)\n    }\n  }\n}\n\nfunction getAndRemoveAttr (el, name) {\n  var val;\n  if ((val = el.attrsMap[name]) != null) {\n    var list = el.attrsList;\n    for (var i = 0, l = list.length; i < l; i++) {\n      if (list[i].name === name) {\n        list.splice(i, 1);\n        break\n      }\n    }\n  }\n  return val\n}\n\n/*  */\n\n/**\n * Cross-platform code generation for component v-model\n */\nfunction genComponentModel (\n  el,\n  value,\n  modifiers\n) {\n  var ref = modifiers || {};\n  var number = ref.number;\n  var trim = ref.trim;\n\n  var baseValueExpression = '$$v';\n  var valueExpression = baseValueExpression;\n  if (trim) {\n    valueExpression =\n      \"(typeof \" + baseValueExpression + \" === 'string'\" +\n        \"? \" + baseValueExpression + \".trim()\" +\n        \": \" + baseValueExpression + \")\";\n  }\n  if (number) {\n    valueExpression = \"_n(\" + valueExpression + \")\";\n  }\n  var assignment = genAssignmentCode(value, valueExpression);\n\n  el.model = {\n    value: (\"(\" + value + \")\"),\n    expression: (\"\\\"\" + value + \"\\\"\"),\n    callback: (\"function (\" + baseValueExpression + \") {\" + assignment + \"}\")\n  };\n}\n\n/**\n * Cross-platform codegen helper for generating v-model value assignment code.\n */\nfunction genAssignmentCode (\n  value,\n  assignment\n) {\n  var modelRs = parseModel(value);\n  if (modelRs.idx === null) {\n    return (value + \"=\" + assignment)\n  } else {\n    return \"var $$exp = \" + (modelRs.exp) + \", $$idx = \" + (modelRs.idx) + \";\" +\n      \"if (!Array.isArray($$exp)){\" +\n        value + \"=\" + assignment + \"}\" +\n      \"else{$$exp.splice($$idx, 1, \" + assignment + \")}\"\n  }\n}\n\n/**\n * parse directive model to do the array update transform. a[idx] = val => $$a.splice($$idx, 1, val)\n *\n * for loop possible cases:\n *\n * - test\n * - test[idx]\n * - test[test1[idx]]\n * - test[\"a\"][idx]\n * - xxx.test[a[a].test1[idx]]\n * - test.xxx.a[\"asa\"][test1[idx]]\n *\n */\n\nvar len;\nvar str;\nvar chr;\nvar index$1;\nvar expressionPos;\nvar expressionEndPos;\n\nfunction parseModel (val) {\n  str = val;\n  len = str.length;\n  index$1 = expressionPos = expressionEndPos = 0;\n\n  if (val.indexOf('[') < 0 || val.lastIndexOf(']') < len - 1) {\n    return {\n      exp: val,\n      idx: null\n    }\n  }\n\n  while (!eof()) {\n    chr = next();\n    /* istanbul ignore if */\n    if (isStringStart(chr)) {\n      parseString(chr);\n    } else if (chr === 0x5B) {\n      parseBracket(chr);\n    }\n  }\n\n  return {\n    exp: val.substring(0, expressionPos),\n    idx: val.substring(expressionPos + 1, expressionEndPos)\n  }\n}\n\nfunction next () {\n  return str.charCodeAt(++index$1)\n}\n\nfunction eof () {\n  return index$1 >= len\n}\n\nfunction isStringStart (chr) {\n  return chr === 0x22 || chr === 0x27\n}\n\nfunction parseBracket (chr) {\n  var inBracket = 1;\n  expressionPos = index$1;\n  while (!eof()) {\n    chr = next();\n    if (isStringStart(chr)) {\n      parseString(chr);\n      continue\n    }\n    if (chr === 0x5B) { inBracket++; }\n    if (chr === 0x5D) { inBracket--; }\n    if (inBracket === 0) {\n      expressionEndPos = index$1;\n      break\n    }\n  }\n}\n\nfunction parseString (chr) {\n  var stringQuote = chr;\n  while (!eof()) {\n    chr = next();\n    if (chr === stringQuote) {\n      break\n    }\n  }\n}\n\n/*  */\n\nvar warn$1;\n\n// in some cases, the event used has to be determined at runtime\n// so we used some reserved tokens during compile.\nvar RANGE_TOKEN = '__r';\nvar CHECKBOX_RADIO_TOKEN = '__c';\n\nfunction model (\n  el,\n  dir,\n  _warn\n) {\n  warn$1 = _warn;\n  var value = dir.value;\n  var modifiers = dir.modifiers;\n  var tag = el.tag;\n  var type = el.attrsMap.type;\n\n  {\n    var dynamicType = el.attrsMap['v-bind:type'] || el.attrsMap[':type'];\n    if (tag === 'input' && dynamicType) {\n      warn$1(\n        \"<input :type=\\\"\" + dynamicType + \"\\\" v-model=\\\"\" + value + \"\\\">:\\n\" +\n        \"v-model does not support dynamic input types. Use v-if branches instead.\"\n      );\n    }\n    // inputs with type=\"file\" are read only and setting the input's\n    // value will throw an error.\n    if (tag === 'input' && type === 'file') {\n      warn$1(\n        \"<\" + (el.tag) + \" v-model=\\\"\" + value + \"\\\" type=\\\"file\\\">:\\n\" +\n        \"File inputs are read only. Use a v-on:change listener instead.\"\n      );\n    }\n  }\n\n  if (tag === 'select') {\n    genSelect(el, value, modifiers);\n  } else if (tag === 'input' && type === 'checkbox') {\n    genCheckboxModel(el, value, modifiers);\n  } else if (tag === 'input' && type === 'radio') {\n    genRadioModel(el, value, modifiers);\n  } else if (tag === 'input' || tag === 'textarea') {\n    genDefaultModel(el, value, modifiers);\n  } else if (!config.isReservedTag(tag)) {\n    genComponentModel(el, value, modifiers);\n    // component v-model doesn't need extra runtime\n    return false\n  } else {\n    warn$1(\n      \"<\" + (el.tag) + \" v-model=\\\"\" + value + \"\\\">: \" +\n      \"v-model is not supported on this element type. \" +\n      'If you are working with contenteditable, it\\'s recommended to ' +\n      'wrap a library dedicated for that purpose inside a custom component.'\n    );\n  }\n\n  // ensure runtime directive metadata\n  return true\n}\n\nfunction genCheckboxModel (\n  el,\n  value,\n  modifiers\n) {\n  var number = modifiers && modifiers.number;\n  var valueBinding = getBindingAttr(el, 'value') || 'null';\n  var trueValueBinding = getBindingAttr(el, 'true-value') || 'true';\n  var falseValueBinding = getBindingAttr(el, 'false-value') || 'false';\n  addProp(el, 'checked',\n    \"Array.isArray(\" + value + \")\" +\n      \"?_i(\" + value + \",\" + valueBinding + \")>-1\" + (\n        trueValueBinding === 'true'\n          ? (\":(\" + value + \")\")\n          : (\":_q(\" + value + \",\" + trueValueBinding + \")\")\n      )\n  );\n  addHandler(el, CHECKBOX_RADIO_TOKEN,\n    \"var $$a=\" + value + \",\" +\n        '$$el=$event.target,' +\n        \"$$c=$$el.checked?(\" + trueValueBinding + \"):(\" + falseValueBinding + \");\" +\n    'if(Array.isArray($$a)){' +\n      \"var $$v=\" + (number ? '_n(' + valueBinding + ')' : valueBinding) + \",\" +\n          '$$i=_i($$a,$$v);' +\n      \"if($$c){$$i<0&&(\" + value + \"=$$a.concat($$v))}\" +\n      \"else{$$i>-1&&(\" + value + \"=$$a.slice(0,$$i).concat($$a.slice($$i+1)))}\" +\n    \"}else{\" + value + \"=$$c}\",\n    null, true\n  );\n}\n\nfunction genRadioModel (\n    el,\n    value,\n    modifiers\n) {\n  var number = modifiers && modifiers.number;\n  var valueBinding = getBindingAttr(el, 'value') || 'null';\n  valueBinding = number ? (\"_n(\" + valueBinding + \")\") : valueBinding;\n  addProp(el, 'checked', (\"_q(\" + value + \",\" + valueBinding + \")\"));\n  addHandler(el, CHECKBOX_RADIO_TOKEN, genAssignmentCode(value, valueBinding), null, true);\n}\n\nfunction genSelect (\n    el,\n    value,\n    modifiers\n) {\n  var number = modifiers && modifiers.number;\n  var selectedVal = \"Array.prototype.filter\" +\n    \".call($event.target.options,function(o){return o.selected})\" +\n    \".map(function(o){var val = \\\"_value\\\" in o ? o._value : o.value;\" +\n    \"return \" + (number ? '_n(val)' : 'val') + \"})\";\n\n  var assignment = '$event.target.multiple ? $$selectedVal : $$selectedVal[0]';\n  var code = \"var $$selectedVal = \" + selectedVal + \";\";\n  code = code + \" \" + (genAssignmentCode(value, assignment));\n  addHandler(el, 'change', code, null, true);\n}\n\nfunction genDefaultModel (\n  el,\n  value,\n  modifiers\n) {\n  var type = el.attrsMap.type;\n  var ref = modifiers || {};\n  var lazy = ref.lazy;\n  var number = ref.number;\n  var trim = ref.trim;\n  var needCompositionGuard = !lazy && type !== 'range';\n  var event = lazy\n    ? 'change'\n    : type === 'range'\n      ? RANGE_TOKEN\n      : 'input';\n\n  var valueExpression = '$event.target.value';\n  if (trim) {\n    valueExpression = \"$event.target.value.trim()\";\n  }\n  if (number) {\n    valueExpression = \"_n(\" + valueExpression + \")\";\n  }\n\n  var code = genAssignmentCode(value, valueExpression);\n  if (needCompositionGuard) {\n    code = \"if($event.target.composing)return;\" + code;\n  }\n\n  addProp(el, 'value', (\"(\" + value + \")\"));\n  addHandler(el, event, code, null, true);\n  if (trim || number || type === 'number') {\n    addHandler(el, 'blur', '$forceUpdate()');\n  }\n}\n\n/*  */\n\n// normalize v-model event tokens that can only be determined at runtime.\n// it's important to place the event as the first in the array because\n// the whole point is ensuring the v-model callback gets called before\n// user-attached handlers.\nfunction normalizeEvents (on) {\n  var event;\n  /* istanbul ignore if */\n  if (on[RANGE_TOKEN]) {\n    // IE input[type=range] only supports `change` event\n    event = isIE ? 'change' : 'input';\n    on[event] = [].concat(on[RANGE_TOKEN], on[event] || []);\n    delete on[RANGE_TOKEN];\n  }\n  if (on[CHECKBOX_RADIO_TOKEN]) {\n    // Chrome fires microtasks in between click/change, leads to #4521\n    event = isChrome ? 'click' : 'change';\n    on[event] = [].concat(on[CHECKBOX_RADIO_TOKEN], on[event] || []);\n    delete on[CHECKBOX_RADIO_TOKEN];\n  }\n}\n\nvar target$1;\n\nfunction add$1 (\n  event,\n  handler,\n  once,\n  capture\n) {\n  if (once) {\n    var oldHandler = handler;\n    var _target = target$1; // save current target element in closure\n    handler = function (ev) {\n      var res = arguments.length === 1\n        ? oldHandler(ev)\n        : oldHandler.apply(null, arguments);\n      if (res !== null) {\n        remove$2(event, handler, capture, _target);\n      }\n    };\n  }\n  target$1.addEventListener(event, handler, capture);\n}\n\nfunction remove$2 (\n  event,\n  handler,\n  capture,\n  _target\n) {\n  (_target || target$1).removeEventListener(event, handler, capture);\n}\n\nfunction updateDOMListeners (oldVnode, vnode) {\n  if (!oldVnode.data.on && !vnode.data.on) {\n    return\n  }\n  var on = vnode.data.on || {};\n  var oldOn = oldVnode.data.on || {};\n  target$1 = vnode.elm;\n  normalizeEvents(on);\n  updateListeners(on, oldOn, add$1, remove$2, vnode.context);\n}\n\nvar events = {\n  create: updateDOMListeners,\n  update: updateDOMListeners\n};\n\n/*  */\n\nfunction updateDOMProps (oldVnode, vnode) {\n  if (!oldVnode.data.domProps && !vnode.data.domProps) {\n    return\n  }\n  var key, cur;\n  var elm = vnode.elm;\n  var oldProps = oldVnode.data.domProps || {};\n  var props = vnode.data.domProps || {};\n  // clone observed objects, as the user probably wants to mutate it\n  if (props.__ob__) {\n    props = vnode.data.domProps = extend({}, props);\n  }\n\n  for (key in oldProps) {\n    if (props[key] == null) {\n      elm[key] = '';\n    }\n  }\n  for (key in props) {\n    cur = props[key];\n    // ignore children if the node has textContent or innerHTML,\n    // as these will throw away existing DOM nodes and cause removal errors\n    // on subsequent patches (#3360)\n    if (key === 'textContent' || key === 'innerHTML') {\n      if (vnode.children) { vnode.children.length = 0; }\n      if (cur === oldProps[key]) { continue }\n    }\n\n    if (key === 'value') {\n      // store value as _value as well since\n      // non-string values will be stringified\n      elm._value = cur;\n      // avoid resetting cursor position when value is the same\n      var strCur = cur == null ? '' : String(cur);\n      if (shouldUpdateValue(elm, vnode, strCur)) {\n        elm.value = strCur;\n      }\n    } else {\n      elm[key] = cur;\n    }\n  }\n}\n\n// check platforms/web/util/attrs.js acceptValue\n\n\nfunction shouldUpdateValue (\n  elm,\n  vnode,\n  checkVal\n) {\n  return (!elm.composing && (\n    vnode.tag === 'option' ||\n    isDirty(elm, checkVal) ||\n    isInputChanged(elm, checkVal)\n  ))\n}\n\nfunction isDirty (elm, checkVal) {\n  // return true when textbox (.number and .trim) loses focus and its value is not equal to the updated value\n  return document.activeElement !== elm && elm.value !== checkVal\n}\n\nfunction isInputChanged (elm, newVal) {\n  var value = elm.value;\n  var modifiers = elm._vModifiers; // injected by v-model runtime\n  if ((modifiers && modifiers.number) || elm.type === 'number') {\n    return toNumber(value) !== toNumber(newVal)\n  }\n  if (modifiers && modifiers.trim) {\n    return value.trim() !== newVal.trim()\n  }\n  return value !== newVal\n}\n\nvar domProps = {\n  create: updateDOMProps,\n  update: updateDOMProps\n};\n\n/*  */\n\nvar parseStyleText = cached(function (cssText) {\n  var res = {};\n  var listDelimiter = /;(?![^(]*\\))/g;\n  var propertyDelimiter = /:(.+)/;\n  cssText.split(listDelimiter).forEach(function (item) {\n    if (item) {\n      var tmp = item.split(propertyDelimiter);\n      tmp.length > 1 && (res[tmp[0].trim()] = tmp[1].trim());\n    }\n  });\n  return res\n});\n\n// merge static and dynamic style data on the same vnode\nfunction normalizeStyleData (data) {\n  var style = normalizeStyleBinding(data.style);\n  // static style is pre-processed into an object during compilation\n  // and is always a fresh object, so it's safe to merge into it\n  return data.staticStyle\n    ? extend(data.staticStyle, style)\n    : style\n}\n\n// normalize possible array / string values into Object\nfunction normalizeStyleBinding (bindingStyle) {\n  if (Array.isArray(bindingStyle)) {\n    return toObject(bindingStyle)\n  }\n  if (typeof bindingStyle === 'string') {\n    return parseStyleText(bindingStyle)\n  }\n  return bindingStyle\n}\n\n/**\n * parent component style should be after child's\n * so that parent component's style could override it\n */\nfunction getStyle (vnode, checkChild) {\n  var res = {};\n  var styleData;\n\n  if (checkChild) {\n    var childNode = vnode;\n    while (childNode.componentInstance) {\n      childNode = childNode.componentInstance._vnode;\n      if (childNode.data && (styleData = normalizeStyleData(childNode.data))) {\n        extend(res, styleData);\n      }\n    }\n  }\n\n  if ((styleData = normalizeStyleData(vnode.data))) {\n    extend(res, styleData);\n  }\n\n  var parentNode = vnode;\n  while ((parentNode = parentNode.parent)) {\n    if (parentNode.data && (styleData = normalizeStyleData(parentNode.data))) {\n      extend(res, styleData);\n    }\n  }\n  return res\n}\n\n/*  */\n\nvar cssVarRE = /^--/;\nvar importantRE = /\\s*!important$/;\nvar setProp = function (el, name, val) {\n  /* istanbul ignore if */\n  if (cssVarRE.test(name)) {\n    el.style.setProperty(name, val);\n  } else if (importantRE.test(val)) {\n    el.style.setProperty(name, val.replace(importantRE, ''), 'important');\n  } else {\n    el.style[normalize(name)] = val;\n  }\n};\n\nvar prefixes = ['Webkit', 'Moz', 'ms'];\n\nvar testEl;\nvar normalize = cached(function (prop) {\n  testEl = testEl || document.createElement('div');\n  prop = camelize(prop);\n  if (prop !== 'filter' && (prop in testEl.style)) {\n    return prop\n  }\n  var upper = prop.charAt(0).toUpperCase() + prop.slice(1);\n  for (var i = 0; i < prefixes.length; i++) {\n    var prefixed = prefixes[i] + upper;\n    if (prefixed in testEl.style) {\n      return prefixed\n    }\n  }\n});\n\nfunction updateStyle (oldVnode, vnode) {\n  var data = vnode.data;\n  var oldData = oldVnode.data;\n\n  if (!data.staticStyle && !data.style &&\n      !oldData.staticStyle && !oldData.style) {\n    return\n  }\n\n  var cur, name;\n  var el = vnode.elm;\n  var oldStaticStyle = oldVnode.data.staticStyle;\n  var oldStyleBinding = oldVnode.data.style || {};\n\n  // if static style exists, stylebinding already merged into it when doing normalizeStyleData\n  var oldStyle = oldStaticStyle || oldStyleBinding;\n\n  var style = normalizeStyleBinding(vnode.data.style) || {};\n\n  vnode.data.style = style.__ob__ ? extend({}, style) : style;\n\n  var newStyle = getStyle(vnode, true);\n\n  for (name in oldStyle) {\n    if (newStyle[name] == null) {\n      setProp(el, name, '');\n    }\n  }\n  for (name in newStyle) {\n    cur = newStyle[name];\n    if (cur !== oldStyle[name]) {\n      // ie9 setting to null has no effect, must use empty string\n      setProp(el, name, cur == null ? '' : cur);\n    }\n  }\n}\n\nvar style = {\n  create: updateStyle,\n  update: updateStyle\n};\n\n/*  */\n\n/**\n * Add class with compatibility for SVG since classList is not supported on\n * SVG elements in IE\n */\nfunction addClass (el, cls) {\n  /* istanbul ignore if */\n  if (!cls || !(cls = cls.trim())) {\n    return\n  }\n\n  /* istanbul ignore else */\n  if (el.classList) {\n    if (cls.indexOf(' ') > -1) {\n      cls.split(/\\s+/).forEach(function (c) { return el.classList.add(c); });\n    } else {\n      el.classList.add(cls);\n    }\n  } else {\n    var cur = \" \" + (el.getAttribute('class') || '') + \" \";\n    if (cur.indexOf(' ' + cls + ' ') < 0) {\n      el.setAttribute('class', (cur + cls).trim());\n    }\n  }\n}\n\n/**\n * Remove class with compatibility for SVG since classList is not supported on\n * SVG elements in IE\n */\nfunction removeClass (el, cls) {\n  /* istanbul ignore if */\n  if (!cls || !(cls = cls.trim())) {\n    return\n  }\n\n  /* istanbul ignore else */\n  if (el.classList) {\n    if (cls.indexOf(' ') > -1) {\n      cls.split(/\\s+/).forEach(function (c) { return el.classList.remove(c); });\n    } else {\n      el.classList.remove(cls);\n    }\n  } else {\n    var cur = \" \" + (el.getAttribute('class') || '') + \" \";\n    var tar = ' ' + cls + ' ';\n    while (cur.indexOf(tar) >= 0) {\n      cur = cur.replace(tar, ' ');\n    }\n    el.setAttribute('class', cur.trim());\n  }\n}\n\n/*  */\n\nfunction resolveTransition (def$$1) {\n  if (!def$$1) {\n    return\n  }\n  /* istanbul ignore else */\n  if (typeof def$$1 === 'object') {\n    var res = {};\n    if (def$$1.css !== false) {\n      extend(res, autoCssTransition(def$$1.name || 'v'));\n    }\n    extend(res, def$$1);\n    return res\n  } else if (typeof def$$1 === 'string') {\n    return autoCssTransition(def$$1)\n  }\n}\n\nvar autoCssTransition = cached(function (name) {\n  return {\n    enterClass: (name + \"-enter\"),\n    enterToClass: (name + \"-enter-to\"),\n    enterActiveClass: (name + \"-enter-active\"),\n    leaveClass: (name + \"-leave\"),\n    leaveToClass: (name + \"-leave-to\"),\n    leaveActiveClass: (name + \"-leave-active\")\n  }\n});\n\nvar hasTransition = inBrowser && !isIE9;\nvar TRANSITION = 'transition';\nvar ANIMATION = 'animation';\n\n// Transition property/event sniffing\nvar transitionProp = 'transition';\nvar transitionEndEvent = 'transitionend';\nvar animationProp = 'animation';\nvar animationEndEvent = 'animationend';\nif (hasTransition) {\n  /* istanbul ignore if */\n  if (window.ontransitionend === undefined &&\n    window.onwebkittransitionend !== undefined) {\n    transitionProp = 'WebkitTransition';\n    transitionEndEvent = 'webkitTransitionEnd';\n  }\n  if (window.onanimationend === undefined &&\n    window.onwebkitanimationend !== undefined) {\n    animationProp = 'WebkitAnimation';\n    animationEndEvent = 'webkitAnimationEnd';\n  }\n}\n\n// binding to window is necessary to make hot reload work in IE in strict mode\nvar raf = inBrowser && window.requestAnimationFrame\n  ? window.requestAnimationFrame.bind(window)\n  : setTimeout;\n\nfunction nextFrame (fn) {\n  raf(function () {\n    raf(fn);\n  });\n}\n\nfunction addTransitionClass (el, cls) {\n  (el._transitionClasses || (el._transitionClasses = [])).push(cls);\n  addClass(el, cls);\n}\n\nfunction removeTransitionClass (el, cls) {\n  if (el._transitionClasses) {\n    remove(el._transitionClasses, cls);\n  }\n  removeClass(el, cls);\n}\n\nfunction whenTransitionEnds (\n  el,\n  expectedType,\n  cb\n) {\n  var ref = getTransitionInfo(el, expectedType);\n  var type = ref.type;\n  var timeout = ref.timeout;\n  var propCount = ref.propCount;\n  if (!type) { return cb() }\n  var event = type === TRANSITION ? transitionEndEvent : animationEndEvent;\n  var ended = 0;\n  var end = function () {\n    el.removeEventListener(event, onEnd);\n    cb();\n  };\n  var onEnd = function (e) {\n    if (e.target === el) {\n      if (++ended >= propCount) {\n        end();\n      }\n    }\n  };\n  setTimeout(function () {\n    if (ended < propCount) {\n      end();\n    }\n  }, timeout + 1);\n  el.addEventListener(event, onEnd);\n}\n\nvar transformRE = /\\b(transform|all)(,|$)/;\n\nfunction getTransitionInfo (el, expectedType) {\n  var styles = window.getComputedStyle(el);\n  var transitionDelays = styles[transitionProp + 'Delay'].split(', ');\n  var transitionDurations = styles[transitionProp + 'Duration'].split(', ');\n  var transitionTimeout = getTimeout(transitionDelays, transitionDurations);\n  var animationDelays = styles[animationProp + 'Delay'].split(', ');\n  var animationDurations = styles[animationProp + 'Duration'].split(', ');\n  var animationTimeout = getTimeout(animationDelays, animationDurations);\n\n  var type;\n  var timeout = 0;\n  var propCount = 0;\n  /* istanbul ignore if */\n  if (expectedType === TRANSITION) {\n    if (transitionTimeout > 0) {\n      type = TRANSITION;\n      timeout = transitionTimeout;\n      propCount = transitionDurations.length;\n    }\n  } else if (expectedType === ANIMATION) {\n    if (animationTimeout > 0) {\n      type = ANIMATION;\n      timeout = animationTimeout;\n      propCount = animationDurations.length;\n    }\n  } else {\n    timeout = Math.max(transitionTimeout, animationTimeout);\n    type = timeout > 0\n      ? transitionTimeout > animationTimeout\n        ? TRANSITION\n        : ANIMATION\n      : null;\n    propCount = type\n      ? type === TRANSITION\n        ? transitionDurations.length\n        : animationDurations.length\n      : 0;\n  }\n  var hasTransform =\n    type === TRANSITION &&\n    transformRE.test(styles[transitionProp + 'Property']);\n  return {\n    type: type,\n    timeout: timeout,\n    propCount: propCount,\n    hasTransform: hasTransform\n  }\n}\n\nfunction getTimeout (delays, durations) {\n  /* istanbul ignore next */\n  while (delays.length < durations.length) {\n    delays = delays.concat(delays);\n  }\n\n  return Math.max.apply(null, durations.map(function (d, i) {\n    return toMs(d) + toMs(delays[i])\n  }))\n}\n\nfunction toMs (s) {\n  return Number(s.slice(0, -1)) * 1000\n}\n\n/*  */\n\nfunction enter (vnode, toggleDisplay) {\n  var el = vnode.elm;\n\n  // call leave callback now\n  if (el._leaveCb) {\n    el._leaveCb.cancelled = true;\n    el._leaveCb();\n  }\n\n  var data = resolveTransition(vnode.data.transition);\n  if (!data) {\n    return\n  }\n\n  /* istanbul ignore if */\n  if (el._enterCb || el.nodeType !== 1) {\n    return\n  }\n\n  var css = data.css;\n  var type = data.type;\n  var enterClass = data.enterClass;\n  var enterToClass = data.enterToClass;\n  var enterActiveClass = data.enterActiveClass;\n  var appearClass = data.appearClass;\n  var appearToClass = data.appearToClass;\n  var appearActiveClass = data.appearActiveClass;\n  var beforeEnter = data.beforeEnter;\n  var enter = data.enter;\n  var afterEnter = data.afterEnter;\n  var enterCancelled = data.enterCancelled;\n  var beforeAppear = data.beforeAppear;\n  var appear = data.appear;\n  var afterAppear = data.afterAppear;\n  var appearCancelled = data.appearCancelled;\n  var duration = data.duration;\n\n  // activeInstance will always be the <transition> component managing this\n  // transition. One edge case to check is when the <transition> is placed\n  // as the root node of a child component. In that case we need to check\n  // <transition>'s parent for appear check.\n  var context = activeInstance;\n  var transitionNode = activeInstance.$vnode;\n  while (transitionNode && transitionNode.parent) {\n    transitionNode = transitionNode.parent;\n    context = transitionNode.context;\n  }\n\n  var isAppear = !context._isMounted || !vnode.isRootInsert;\n\n  if (isAppear && !appear && appear !== '') {\n    return\n  }\n\n  var startClass = isAppear && appearClass\n    ? appearClass\n    : enterClass;\n  var activeClass = isAppear && appearActiveClass\n    ? appearActiveClass\n    : enterActiveClass;\n  var toClass = isAppear && appearToClass\n    ? appearToClass\n    : enterToClass;\n\n  var beforeEnterHook = isAppear\n    ? (beforeAppear || beforeEnter)\n    : beforeEnter;\n  var enterHook = isAppear\n    ? (typeof appear === 'function' ? appear : enter)\n    : enter;\n  var afterEnterHook = isAppear\n    ? (afterAppear || afterEnter)\n    : afterEnter;\n  var enterCancelledHook = isAppear\n    ? (appearCancelled || enterCancelled)\n    : enterCancelled;\n\n  var explicitEnterDuration = toNumber(\n    isObject(duration)\n      ? duration.enter\n      : duration\n  );\n\n  if (\"development\" !== 'production' && explicitEnterDuration != null) {\n    checkDuration(explicitEnterDuration, 'enter', vnode);\n  }\n\n  var expectsCSS = css !== false && !isIE9;\n  var userWantsControl = getHookArgumentsLength(enterHook);\n\n  var cb = el._enterCb = once(function () {\n    if (expectsCSS) {\n      removeTransitionClass(el, toClass);\n      removeTransitionClass(el, activeClass);\n    }\n    if (cb.cancelled) {\n      if (expectsCSS) {\n        removeTransitionClass(el, startClass);\n      }\n      enterCancelledHook && enterCancelledHook(el);\n    } else {\n      afterEnterHook && afterEnterHook(el);\n    }\n    el._enterCb = null;\n  });\n\n  if (!vnode.data.show) {\n    // remove pending leave element on enter by injecting an insert hook\n    mergeVNodeHook(vnode.data.hook || (vnode.data.hook = {}), 'insert', function () {\n      var parent = el.parentNode;\n      var pendingNode = parent && parent._pending && parent._pending[vnode.key];\n      if (pendingNode &&\n          pendingNode.tag === vnode.tag &&\n          pendingNode.elm._leaveCb) {\n        pendingNode.elm._leaveCb();\n      }\n      enterHook && enterHook(el, cb);\n    });\n  }\n\n  // start enter transition\n  beforeEnterHook && beforeEnterHook(el);\n  if (expectsCSS) {\n    addTransitionClass(el, startClass);\n    addTransitionClass(el, activeClass);\n    nextFrame(function () {\n      addTransitionClass(el, toClass);\n      removeTransitionClass(el, startClass);\n      if (!cb.cancelled && !userWantsControl) {\n        if (isValidDuration(explicitEnterDuration)) {\n          setTimeout(cb, explicitEnterDuration);\n        } else {\n          whenTransitionEnds(el, type, cb);\n        }\n      }\n    });\n  }\n\n  if (vnode.data.show) {\n    toggleDisplay && toggleDisplay();\n    enterHook && enterHook(el, cb);\n  }\n\n  if (!expectsCSS && !userWantsControl) {\n    cb();\n  }\n}\n\nfunction leave (vnode, rm) {\n  var el = vnode.elm;\n\n  // call enter callback now\n  if (el._enterCb) {\n    el._enterCb.cancelled = true;\n    el._enterCb();\n  }\n\n  var data = resolveTransition(vnode.data.transition);\n  if (!data) {\n    return rm()\n  }\n\n  /* istanbul ignore if */\n  if (el._leaveCb || el.nodeType !== 1) {\n    return\n  }\n\n  var css = data.css;\n  var type = data.type;\n  var leaveClass = data.leaveClass;\n  var leaveToClass = data.leaveToClass;\n  var leaveActiveClass = data.leaveActiveClass;\n  var beforeLeave = data.beforeLeave;\n  var leave = data.leave;\n  var afterLeave = data.afterLeave;\n  var leaveCancelled = data.leaveCancelled;\n  var delayLeave = data.delayLeave;\n  var duration = data.duration;\n\n  var expectsCSS = css !== false && !isIE9;\n  var userWantsControl = getHookArgumentsLength(leave);\n\n  var explicitLeaveDuration = toNumber(\n    isObject(duration)\n      ? duration.leave\n      : duration\n  );\n\n  if (\"development\" !== 'production' && explicitLeaveDuration != null) {\n    checkDuration(explicitLeaveDuration, 'leave', vnode);\n  }\n\n  var cb = el._leaveCb = once(function () {\n    if (el.parentNode && el.parentNode._pending) {\n      el.parentNode._pending[vnode.key] = null;\n    }\n    if (expectsCSS) {\n      removeTransitionClass(el, leaveToClass);\n      removeTransitionClass(el, leaveActiveClass);\n    }\n    if (cb.cancelled) {\n      if (expectsCSS) {\n        removeTransitionClass(el, leaveClass);\n      }\n      leaveCancelled && leaveCancelled(el);\n    } else {\n      rm();\n      afterLeave && afterLeave(el);\n    }\n    el._leaveCb = null;\n  });\n\n  if (delayLeave) {\n    delayLeave(performLeave);\n  } else {\n    performLeave();\n  }\n\n  function performLeave () {\n    // the delayed leave may have already been cancelled\n    if (cb.cancelled) {\n      return\n    }\n    // record leaving element\n    if (!vnode.data.show) {\n      (el.parentNode._pending || (el.parentNode._pending = {}))[vnode.key] = vnode;\n    }\n    beforeLeave && beforeLeave(el);\n    if (expectsCSS) {\n      addTransitionClass(el, leaveClass);\n      addTransitionClass(el, leaveActiveClass);\n      nextFrame(function () {\n        addTransitionClass(el, leaveToClass);\n        removeTransitionClass(el, leaveClass);\n        if (!cb.cancelled && !userWantsControl) {\n          if (isValidDuration(explicitLeaveDuration)) {\n            setTimeout(cb, explicitLeaveDuration);\n          } else {\n            whenTransitionEnds(el, type, cb);\n          }\n        }\n      });\n    }\n    leave && leave(el, cb);\n    if (!expectsCSS && !userWantsControl) {\n      cb();\n    }\n  }\n}\n\n// only used in dev mode\nfunction checkDuration (val, name, vnode) {\n  if (typeof val !== 'number') {\n    warn(\n      \"<transition> explicit \" + name + \" duration is not a valid number - \" +\n      \"got \" + (JSON.stringify(val)) + \".\",\n      vnode.context\n    );\n  } else if (isNaN(val)) {\n    warn(\n      \"<transition> explicit \" + name + \" duration is NaN - \" +\n      'the duration expression might be incorrect.',\n      vnode.context\n    );\n  }\n}\n\nfunction isValidDuration (val) {\n  return typeof val === 'number' && !isNaN(val)\n}\n\n/**\n * Normalize a transition hook's argument length. The hook may be:\n * - a merged hook (invoker) with the original in .fns\n * - a wrapped component method (check ._length)\n * - a plain function (.length)\n */\nfunction getHookArgumentsLength (fn) {\n  if (!fn) { return false }\n  var invokerFns = fn.fns;\n  if (invokerFns) {\n    // invoker\n    return getHookArgumentsLength(\n      Array.isArray(invokerFns)\n        ? invokerFns[0]\n        : invokerFns\n    )\n  } else {\n    return (fn._length || fn.length) > 1\n  }\n}\n\nfunction _enter (_, vnode) {\n  if (!vnode.data.show) {\n    enter(vnode);\n  }\n}\n\nvar transition = inBrowser ? {\n  create: _enter,\n  activate: _enter,\n  remove: function remove$$1 (vnode, rm) {\n    /* istanbul ignore else */\n    if (!vnode.data.show) {\n      leave(vnode, rm);\n    } else {\n      rm();\n    }\n  }\n} : {};\n\nvar platformModules = [\n  attrs,\n  klass,\n  events,\n  domProps,\n  style,\n  transition\n];\n\n/*  */\n\n// the directive module should be applied last, after all\n// built-in modules have been applied.\nvar modules = platformModules.concat(baseModules);\n\nvar patch = createPatchFunction({ nodeOps: nodeOps, modules: modules });\n\n/**\n * Not type checking this file because flow doesn't like attaching\n * properties to Elements.\n */\n\n/* istanbul ignore if */\nif (isIE9) {\n  // http://www.matts411.com/post/internet-explorer-9-oninput/\n  document.addEventListener('selectionchange', function () {\n    var el = document.activeElement;\n    if (el && el.vmodel) {\n      trigger(el, 'input');\n    }\n  });\n}\n\nvar model$1 = {\n  inserted: function inserted (el, binding, vnode) {\n    if (vnode.tag === 'select') {\n      var cb = function () {\n        setSelected(el, binding, vnode.context);\n      };\n      cb();\n      /* istanbul ignore if */\n      if (isIE || isEdge) {\n        setTimeout(cb, 0);\n      }\n    } else if (vnode.tag === 'textarea' || el.type === 'text' || el.type === 'password') {\n      el._vModifiers = binding.modifiers;\n      if (!binding.modifiers.lazy) {\n        if (!isAndroid) {\n          el.addEventListener('compositionstart', onCompositionStart);\n          el.addEventListener('compositionend', onCompositionEnd);\n        }\n        /* istanbul ignore if */\n        if (isIE9) {\n          el.vmodel = true;\n        }\n      }\n    }\n  },\n  componentUpdated: function componentUpdated (el, binding, vnode) {\n    if (vnode.tag === 'select') {\n      setSelected(el, binding, vnode.context);\n      // in case the options rendered by v-for have changed,\n      // it's possible that the value is out-of-sync with the rendered options.\n      // detect such cases and filter out values that no longer has a matching\n      // option in the DOM.\n      var needReset = el.multiple\n        ? binding.value.some(function (v) { return hasNoMatchingOption(v, el.options); })\n        : binding.value !== binding.oldValue && hasNoMatchingOption(binding.value, el.options);\n      if (needReset) {\n        trigger(el, 'change');\n      }\n    }\n  }\n};\n\nfunction setSelected (el, binding, vm) {\n  var value = binding.value;\n  var isMultiple = el.multiple;\n  if (isMultiple && !Array.isArray(value)) {\n    \"development\" !== 'production' && warn(\n      \"<select multiple v-model=\\\"\" + (binding.expression) + \"\\\"> \" +\n      \"expects an Array value for its binding, but got \" + (Object.prototype.toString.call(value).slice(8, -1)),\n      vm\n    );\n    return\n  }\n  var selected, option;\n  for (var i = 0, l = el.options.length; i < l; i++) {\n    option = el.options[i];\n    if (isMultiple) {\n      selected = looseIndexOf(value, getValue(option)) > -1;\n      if (option.selected !== selected) {\n        option.selected = selected;\n      }\n    } else {\n      if (looseEqual(getValue(option), value)) {\n        if (el.selectedIndex !== i) {\n          el.selectedIndex = i;\n        }\n        return\n      }\n    }\n  }\n  if (!isMultiple) {\n    el.selectedIndex = -1;\n  }\n}\n\nfunction hasNoMatchingOption (value, options) {\n  for (var i = 0, l = options.length; i < l; i++) {\n    if (looseEqual(getValue(options[i]), value)) {\n      return false\n    }\n  }\n  return true\n}\n\nfunction getValue (option) {\n  return '_value' in option\n    ? option._value\n    : option.value\n}\n\nfunction onCompositionStart (e) {\n  e.target.composing = true;\n}\n\nfunction onCompositionEnd (e) {\n  e.target.composing = false;\n  trigger(e.target, 'input');\n}\n\nfunction trigger (el, type) {\n  var e = document.createEvent('HTMLEvents');\n  e.initEvent(type, true, true);\n  el.dispatchEvent(e);\n}\n\n/*  */\n\n// recursively search for possible transition defined inside the component root\nfunction locateNode (vnode) {\n  return vnode.componentInstance && (!vnode.data || !vnode.data.transition)\n    ? locateNode(vnode.componentInstance._vnode)\n    : vnode\n}\n\nvar show = {\n  bind: function bind (el, ref, vnode) {\n    var value = ref.value;\n\n    vnode = locateNode(vnode);\n    var transition = vnode.data && vnode.data.transition;\n    var originalDisplay = el.__vOriginalDisplay =\n      el.style.display === 'none' ? '' : el.style.display;\n    if (value && transition && !isIE9) {\n      vnode.data.show = true;\n      enter(vnode, function () {\n        el.style.display = originalDisplay;\n      });\n    } else {\n      el.style.display = value ? originalDisplay : 'none';\n    }\n  },\n\n  update: function update (el, ref, vnode) {\n    var value = ref.value;\n    var oldValue = ref.oldValue;\n\n    /* istanbul ignore if */\n    if (value === oldValue) { return }\n    vnode = locateNode(vnode);\n    var transition = vnode.data && vnode.data.transition;\n    if (transition && !isIE9) {\n      vnode.data.show = true;\n      if (value) {\n        enter(vnode, function () {\n          el.style.display = el.__vOriginalDisplay;\n        });\n      } else {\n        leave(vnode, function () {\n          el.style.display = 'none';\n        });\n      }\n    } else {\n      el.style.display = value ? el.__vOriginalDisplay : 'none';\n    }\n  },\n\n  unbind: function unbind (\n    el,\n    binding,\n    vnode,\n    oldVnode,\n    isDestroy\n  ) {\n    if (!isDestroy) {\n      el.style.display = el.__vOriginalDisplay;\n    }\n  }\n};\n\nvar platformDirectives = {\n  model: model$1,\n  show: show\n};\n\n/*  */\n\n// Provides transition support for a single element/component.\n// supports transition mode (out-in / in-out)\n\nvar transitionProps = {\n  name: String,\n  appear: Boolean,\n  css: Boolean,\n  mode: String,\n  type: String,\n  enterClass: String,\n  leaveClass: String,\n  enterToClass: String,\n  leaveToClass: String,\n  enterActiveClass: String,\n  leaveActiveClass: String,\n  appearClass: String,\n  appearActiveClass: String,\n  appearToClass: String,\n  duration: [Number, String, Object]\n};\n\n// in case the child is also an abstract component, e.g. <keep-alive>\n// we want to recursively retrieve the real component to be rendered\nfunction getRealChild (vnode) {\n  var compOptions = vnode && vnode.componentOptions;\n  if (compOptions && compOptions.Ctor.options.abstract) {\n    return getRealChild(getFirstComponentChild(compOptions.children))\n  } else {\n    return vnode\n  }\n}\n\nfunction extractTransitionData (comp) {\n  var data = {};\n  var options = comp.$options;\n  // props\n  for (var key in options.propsData) {\n    data[key] = comp[key];\n  }\n  // events.\n  // extract listeners and pass them directly to the transition methods\n  var listeners = options._parentListeners;\n  for (var key$1 in listeners) {\n    data[camelize(key$1)] = listeners[key$1];\n  }\n  return data\n}\n\nfunction placeholder (h, rawChild) {\n  return /\\d-keep-alive$/.test(rawChild.tag)\n    ? h('keep-alive')\n    : null\n}\n\nfunction hasParentTransition (vnode) {\n  while ((vnode = vnode.parent)) {\n    if (vnode.data.transition) {\n      return true\n    }\n  }\n}\n\nfunction isSameChild (child, oldChild) {\n  return oldChild.key === child.key && oldChild.tag === child.tag\n}\n\nvar Transition = {\n  name: 'transition',\n  props: transitionProps,\n  abstract: true,\n\n  render: function render (h) {\n    var this$1 = this;\n\n    var children = this.$slots.default;\n    if (!children) {\n      return\n    }\n\n    // filter out text nodes (possible whitespaces)\n    children = children.filter(function (c) { return c.tag; });\n    /* istanbul ignore if */\n    if (!children.length) {\n      return\n    }\n\n    // warn multiple elements\n    if (\"development\" !== 'production' && children.length > 1) {\n      warn(\n        '<transition> can only be used on a single element. Use ' +\n        '<transition-group> for lists.',\n        this.$parent\n      );\n    }\n\n    var mode = this.mode;\n\n    // warn invalid mode\n    if (\"development\" !== 'production' &&\n        mode && mode !== 'in-out' && mode !== 'out-in') {\n      warn(\n        'invalid <transition> mode: ' + mode,\n        this.$parent\n      );\n    }\n\n    var rawChild = children[0];\n\n    // if this is a component root node and the component's\n    // parent container node also has transition, skip.\n    if (hasParentTransition(this.$vnode)) {\n      return rawChild\n    }\n\n    // apply transition data to child\n    // use getRealChild() to ignore abstract components e.g. keep-alive\n    var child = getRealChild(rawChild);\n    /* istanbul ignore if */\n    if (!child) {\n      return rawChild\n    }\n\n    if (this._leaving) {\n      return placeholder(h, rawChild)\n    }\n\n    // ensure a key that is unique to the vnode type and to this transition\n    // component instance. This key will be used to remove pending leaving nodes\n    // during entering.\n    var id = \"__transition-\" + (this._uid) + \"-\";\n    child.key = child.key == null\n      ? id + child.tag\n      : isPrimitive(child.key)\n        ? (String(child.key).indexOf(id) === 0 ? child.key : id + child.key)\n        : child.key;\n\n    var data = (child.data || (child.data = {})).transition = extractTransitionData(this);\n    var oldRawChild = this._vnode;\n    var oldChild = getRealChild(oldRawChild);\n\n    // mark v-show\n    // so that the transition module can hand over the control to the directive\n    if (child.data.directives && child.data.directives.some(function (d) { return d.name === 'show'; })) {\n      child.data.show = true;\n    }\n\n    if (oldChild && oldChild.data && !isSameChild(child, oldChild)) {\n      // replace old child transition data with fresh one\n      // important for dynamic transitions!\n      var oldData = oldChild && (oldChild.data.transition = extend({}, data));\n      // handle transition mode\n      if (mode === 'out-in') {\n        // return placeholder node and queue update when leave finishes\n        this._leaving = true;\n        mergeVNodeHook(oldData, 'afterLeave', function () {\n          this$1._leaving = false;\n          this$1.$forceUpdate();\n        });\n        return placeholder(h, rawChild)\n      } else if (mode === 'in-out') {\n        var delayedLeave;\n        var performLeave = function () { delayedLeave(); };\n        mergeVNodeHook(data, 'afterEnter', performLeave);\n        mergeVNodeHook(data, 'enterCancelled', performLeave);\n        mergeVNodeHook(oldData, 'delayLeave', function (leave) { delayedLeave = leave; });\n      }\n    }\n\n    return rawChild\n  }\n};\n\n/*  */\n\n// Provides transition support for list items.\n// supports move transitions using the FLIP technique.\n\n// Because the vdom's children update algorithm is \"unstable\" - i.e.\n// it doesn't guarantee the relative positioning of removed elements,\n// we force transition-group to update its children into two passes:\n// in the first pass, we remove all nodes that need to be removed,\n// triggering their leaving transition; in the second pass, we insert/move\n// into the final desired state. This way in the second pass removed\n// nodes will remain where they should be.\n\nvar props = extend({\n  tag: String,\n  moveClass: String\n}, transitionProps);\n\ndelete props.mode;\n\nvar TransitionGroup = {\n  props: props,\n\n  render: function render (h) {\n    var tag = this.tag || this.$vnode.data.tag || 'span';\n    var map = Object.create(null);\n    var prevChildren = this.prevChildren = this.children;\n    var rawChildren = this.$slots.default || [];\n    var children = this.children = [];\n    var transitionData = extractTransitionData(this);\n\n    for (var i = 0; i < rawChildren.length; i++) {\n      var c = rawChildren[i];\n      if (c.tag) {\n        if (c.key != null && String(c.key).indexOf('__vlist') !== 0) {\n          children.push(c);\n          map[c.key] = c\n          ;(c.data || (c.data = {})).transition = transitionData;\n        } else {\n          var opts = c.componentOptions;\n          var name = opts ? (opts.Ctor.options.name || opts.tag || '') : c.tag;\n          warn((\"<transition-group> children must be keyed: <\" + name + \">\"));\n        }\n      }\n    }\n\n    if (prevChildren) {\n      var kept = [];\n      var removed = [];\n      for (var i$1 = 0; i$1 < prevChildren.length; i$1++) {\n        var c$1 = prevChildren[i$1];\n        c$1.data.transition = transitionData;\n        c$1.data.pos = c$1.elm.getBoundingClientRect();\n        if (map[c$1.key]) {\n          kept.push(c$1);\n        } else {\n          removed.push(c$1);\n        }\n      }\n      this.kept = h(tag, null, kept);\n      this.removed = removed;\n    }\n\n    return h(tag, null, children)\n  },\n\n  beforeUpdate: function beforeUpdate () {\n    // force removing pass\n    this.__patch__(\n      this._vnode,\n      this.kept,\n      false, // hydrating\n      true // removeOnly (!important, avoids unnecessary moves)\n    );\n    this._vnode = this.kept;\n  },\n\n  updated: function updated () {\n    var children = this.prevChildren;\n    var moveClass = this.moveClass || ((this.name || 'v') + '-move');\n    if (!children.length || !this.hasMove(children[0].elm, moveClass)) {\n      return\n    }\n\n    // we divide the work into three loops to avoid mixing DOM reads and writes\n    // in each iteration - which helps prevent layout thrashing.\n    children.forEach(callPendingCbs);\n    children.forEach(recordPosition);\n    children.forEach(applyTranslation);\n\n    // force reflow to put everything in position\n    var body = document.body;\n    var f = body.offsetHeight; // eslint-disable-line\n\n    children.forEach(function (c) {\n      if (c.data.moved) {\n        var el = c.elm;\n        var s = el.style;\n        addTransitionClass(el, moveClass);\n        s.transform = s.WebkitTransform = s.transitionDuration = '';\n        el.addEventListener(transitionEndEvent, el._moveCb = function cb (e) {\n          if (!e || /transform$/.test(e.propertyName)) {\n            el.removeEventListener(transitionEndEvent, cb);\n            el._moveCb = null;\n            removeTransitionClass(el, moveClass);\n          }\n        });\n      }\n    });\n  },\n\n  methods: {\n    hasMove: function hasMove (el, moveClass) {\n      /* istanbul ignore if */\n      if (!hasTransition) {\n        return false\n      }\n      if (this._hasMove != null) {\n        return this._hasMove\n      }\n      // Detect whether an element with the move class applied has\n      // CSS transitions. Since the element may be inside an entering\n      // transition at this very moment, we make a clone of it and remove\n      // all other transition classes applied to ensure only the move class\n      // is applied.\n      var clone = el.cloneNode();\n      if (el._transitionClasses) {\n        el._transitionClasses.forEach(function (cls) { removeClass(clone, cls); });\n      }\n      addClass(clone, moveClass);\n      clone.style.display = 'none';\n      this.$el.appendChild(clone);\n      var info = getTransitionInfo(clone);\n      this.$el.removeChild(clone);\n      return (this._hasMove = info.hasTransform)\n    }\n  }\n};\n\nfunction callPendingCbs (c) {\n  /* istanbul ignore if */\n  if (c.elm._moveCb) {\n    c.elm._moveCb();\n  }\n  /* istanbul ignore if */\n  if (c.elm._enterCb) {\n    c.elm._enterCb();\n  }\n}\n\nfunction recordPosition (c) {\n  c.data.newPos = c.elm.getBoundingClientRect();\n}\n\nfunction applyTranslation (c) {\n  var oldPos = c.data.pos;\n  var newPos = c.data.newPos;\n  var dx = oldPos.left - newPos.left;\n  var dy = oldPos.top - newPos.top;\n  if (dx || dy) {\n    c.data.moved = true;\n    var s = c.elm.style;\n    s.transform = s.WebkitTransform = \"translate(\" + dx + \"px,\" + dy + \"px)\";\n    s.transitionDuration = '0s';\n  }\n}\n\nvar platformComponents = {\n  Transition: Transition,\n  TransitionGroup: TransitionGroup\n};\n\n/*  */\n\n// install platform specific utils\nVue$3.config.mustUseProp = mustUseProp;\nVue$3.config.isReservedTag = isReservedTag;\nVue$3.config.getTagNamespace = getTagNamespace;\nVue$3.config.isUnknownElement = isUnknownElement;\n\n// install platform runtime directives & components\nextend(Vue$3.options.directives, platformDirectives);\nextend(Vue$3.options.components, platformComponents);\n\n// install platform patch function\nVue$3.prototype.__patch__ = inBrowser ? patch : noop;\n\n// public mount method\nVue$3.prototype.$mount = function (\n  el,\n  hydrating\n) {\n  el = el && inBrowser ? query(el) : undefined;\n  return mountComponent(this, el, hydrating)\n};\n\n// devtools global hook\n/* istanbul ignore next */\nsetTimeout(function () {\n  if (config.devtools) {\n    if (devtools) {\n      devtools.emit('init', Vue$3);\n    } else if (\"development\" !== 'production' && isChrome) {\n      console[console.info ? 'info' : 'log'](\n        'Download the Vue Devtools extension for a better development experience:\\n' +\n        'https://github.com/vuejs/vue-devtools'\n      );\n    }\n  }\n  if (\"development\" !== 'production' &&\n      config.productionTip !== false &&\n      inBrowser && typeof console !== 'undefined') {\n    console[console.info ? 'info' : 'log'](\n      \"You are running Vue in development mode.\\n\" +\n      \"Make sure to turn on production mode when deploying for production.\\n\" +\n      \"See more tips at https://vuejs.org/guide/deployment.html\"\n    );\n  }\n}, 0);\n\n/*  */\n\n// check whether current browser encodes a char inside attribute values\nfunction shouldDecode (content, encoded) {\n  var div = document.createElement('div');\n  div.innerHTML = \"<div a=\\\"\" + content + \"\\\">\";\n  return div.innerHTML.indexOf(encoded) > 0\n}\n\n// #3663\n// IE encodes newlines inside attribute values while other browsers don't\nvar shouldDecodeNewlines = inBrowser ? shouldDecode('\\n', '&#10;') : false;\n\n/*  */\n\nvar isUnaryTag = makeMap(\n  'area,base,br,col,embed,frame,hr,img,input,isindex,keygen,' +\n  'link,meta,param,source,track,wbr'\n);\n\n// Elements that you can, intentionally, leave open\n// (and which close themselves)\nvar canBeLeftOpenTag = makeMap(\n  'colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr,source'\n);\n\n// HTML5 tags https://html.spec.whatwg.org/multipage/indices.html#elements-3\n// Phrasing Content https://html.spec.whatwg.org/multipage/dom.html#phrasing-content\nvar isNonPhrasingTag = makeMap(\n  'address,article,aside,base,blockquote,body,caption,col,colgroup,dd,' +\n  'details,dialog,div,dl,dt,fieldset,figcaption,figure,footer,form,' +\n  'h1,h2,h3,h4,h5,h6,head,header,hgroup,hr,html,legend,li,menuitem,meta,' +\n  'optgroup,option,param,rp,rt,source,style,summary,tbody,td,tfoot,th,thead,' +\n  'title,tr,track'\n);\n\n/*  */\n\nvar decoder;\n\nfunction decode (html) {\n  decoder = decoder || document.createElement('div');\n  decoder.innerHTML = html;\n  return decoder.textContent\n}\n\n/**\n * Not type-checking this file because it's mostly vendor code.\n */\n\n/*!\n * HTML Parser By John Resig (ejohn.org)\n * Modified by Juriy \"kangax\" Zaytsev\n * Original code by Erik Arvidsson, Mozilla Public License\n * http://erik.eae.net/simplehtmlparser/simplehtmlparser.js\n */\n\n// Regular Expressions for parsing tags and attributes\nvar singleAttrIdentifier = /([^\\s\"'<>/=]+)/;\nvar singleAttrAssign = /(?:=)/;\nvar singleAttrValues = [\n  // attr value double quotes\n  /\"([^\"]*)\"+/.source,\n  // attr value, single quotes\n  /'([^']*)'+/.source,\n  // attr value, no quotes\n  /([^\\s\"'=<>`]+)/.source\n];\nvar attribute = new RegExp(\n  '^\\\\s*' + singleAttrIdentifier.source +\n  '(?:\\\\s*(' + singleAttrAssign.source + ')' +\n  '\\\\s*(?:' + singleAttrValues.join('|') + '))?'\n);\n\n// could use https://www.w3.org/TR/1999/REC-xml-names-19990114/#NT-QName\n// but for Vue templates we can enforce a simple charset\nvar ncname = '[a-zA-Z_][\\\\w\\\\-\\\\.]*';\nvar qnameCapture = '((?:' + ncname + '\\\\:)?' + ncname + ')';\nvar startTagOpen = new RegExp('^<' + qnameCapture);\nvar startTagClose = /^\\s*(\\/?)>/;\nvar endTag = new RegExp('^<\\\\/' + qnameCapture + '[^>]*>');\nvar doctype = /^<!DOCTYPE [^>]+>/i;\nvar comment = /^<!--/;\nvar conditionalComment = /^<!\\[/;\n\nvar IS_REGEX_CAPTURING_BROKEN = false;\n'x'.replace(/x(.)?/g, function (m, g) {\n  IS_REGEX_CAPTURING_BROKEN = g === '';\n});\n\n// Special Elements (can contain anything)\nvar isPlainTextElement = makeMap('script,style,textarea', true);\nvar reCache = {};\n\nvar decodingMap = {\n  '&lt;': '<',\n  '&gt;': '>',\n  '&quot;': '\"',\n  '&amp;': '&',\n  '&#10;': '\\n'\n};\nvar encodedAttr = /&(?:lt|gt|quot|amp);/g;\nvar encodedAttrWithNewLines = /&(?:lt|gt|quot|amp|#10);/g;\n\nfunction decodeAttr (value, shouldDecodeNewlines) {\n  var re = shouldDecodeNewlines ? encodedAttrWithNewLines : encodedAttr;\n  return value.replace(re, function (match) { return decodingMap[match]; })\n}\n\nfunction parseHTML (html, options) {\n  var stack = [];\n  var expectHTML = options.expectHTML;\n  var isUnaryTag$$1 = options.isUnaryTag || no;\n  var canBeLeftOpenTag$$1 = options.canBeLeftOpenTag || no;\n  var index = 0;\n  var last, lastTag;\n  while (html) {\n    last = html;\n    // Make sure we're not in a plaintext content element like script/style\n    if (!lastTag || !isPlainTextElement(lastTag)) {\n      var textEnd = html.indexOf('<');\n      if (textEnd === 0) {\n        // Comment:\n        if (comment.test(html)) {\n          var commentEnd = html.indexOf('-->');\n\n          if (commentEnd >= 0) {\n            advance(commentEnd + 3);\n            continue\n          }\n        }\n\n        // http://en.wikipedia.org/wiki/Conditional_comment#Downlevel-revealed_conditional_comment\n        if (conditionalComment.test(html)) {\n          var conditionalEnd = html.indexOf(']>');\n\n          if (conditionalEnd >= 0) {\n            advance(conditionalEnd + 2);\n            continue\n          }\n        }\n\n        // Doctype:\n        var doctypeMatch = html.match(doctype);\n        if (doctypeMatch) {\n          advance(doctypeMatch[0].length);\n          continue\n        }\n\n        // End tag:\n        var endTagMatch = html.match(endTag);\n        if (endTagMatch) {\n          var curIndex = index;\n          advance(endTagMatch[0].length);\n          parseEndTag(endTagMatch[1], curIndex, index);\n          continue\n        }\n\n        // Start tag:\n        var startTagMatch = parseStartTag();\n        if (startTagMatch) {\n          handleStartTag(startTagMatch);\n          continue\n        }\n      }\n\n      var text = (void 0), rest$1 = (void 0), next = (void 0);\n      if (textEnd >= 0) {\n        rest$1 = html.slice(textEnd);\n        while (\n          !endTag.test(rest$1) &&\n          !startTagOpen.test(rest$1) &&\n          !comment.test(rest$1) &&\n          !conditionalComment.test(rest$1)\n        ) {\n          // < in plain text, be forgiving and treat it as text\n          next = rest$1.indexOf('<', 1);\n          if (next < 0) { break }\n          textEnd += next;\n          rest$1 = html.slice(textEnd);\n        }\n        text = html.substring(0, textEnd);\n        advance(textEnd);\n      }\n\n      if (textEnd < 0) {\n        text = html;\n        html = '';\n      }\n\n      if (options.chars && text) {\n        options.chars(text);\n      }\n    } else {\n      var stackedTag = lastTag.toLowerCase();\n      var reStackedTag = reCache[stackedTag] || (reCache[stackedTag] = new RegExp('([\\\\s\\\\S]*?)(</' + stackedTag + '[^>]*>)', 'i'));\n      var endTagLength = 0;\n      var rest = html.replace(reStackedTag, function (all, text, endTag) {\n        endTagLength = endTag.length;\n        if (!isPlainTextElement(stackedTag) && stackedTag !== 'noscript') {\n          text = text\n            .replace(/<!--([\\s\\S]*?)-->/g, '$1')\n            .replace(/<!\\[CDATA\\[([\\s\\S]*?)]]>/g, '$1');\n        }\n        if (options.chars) {\n          options.chars(text);\n        }\n        return ''\n      });\n      index += html.length - rest.length;\n      html = rest;\n      parseEndTag(stackedTag, index - endTagLength, index);\n    }\n\n    if (html === last) {\n      options.chars && options.chars(html);\n      if (\"development\" !== 'production' && !stack.length && options.warn) {\n        options.warn((\"Mal-formatted tag at end of template: \\\"\" + html + \"\\\"\"));\n      }\n      break\n    }\n  }\n\n  // Clean up any remaining tags\n  parseEndTag();\n\n  function advance (n) {\n    index += n;\n    html = html.substring(n);\n  }\n\n  function parseStartTag () {\n    var start = html.match(startTagOpen);\n    if (start) {\n      var match = {\n        tagName: start[1],\n        attrs: [],\n        start: index\n      };\n      advance(start[0].length);\n      var end, attr;\n      while (!(end = html.match(startTagClose)) && (attr = html.match(attribute))) {\n        advance(attr[0].length);\n        match.attrs.push(attr);\n      }\n      if (end) {\n        match.unarySlash = end[1];\n        advance(end[0].length);\n        match.end = index;\n        return match\n      }\n    }\n  }\n\n  function handleStartTag (match) {\n    var tagName = match.tagName;\n    var unarySlash = match.unarySlash;\n\n    if (expectHTML) {\n      if (lastTag === 'p' && isNonPhrasingTag(tagName)) {\n        parseEndTag(lastTag);\n      }\n      if (canBeLeftOpenTag$$1(tagName) && lastTag === tagName) {\n        parseEndTag(tagName);\n      }\n    }\n\n    var unary = isUnaryTag$$1(tagName) || tagName === 'html' && lastTag === 'head' || !!unarySlash;\n\n    var l = match.attrs.length;\n    var attrs = new Array(l);\n    for (var i = 0; i < l; i++) {\n      var args = match.attrs[i];\n      // hackish work around FF bug https://bugzilla.mozilla.org/show_bug.cgi?id=369778\n      if (IS_REGEX_CAPTURING_BROKEN && args[0].indexOf('\"\"') === -1) {\n        if (args[3] === '') { delete args[3]; }\n        if (args[4] === '') { delete args[4]; }\n        if (args[5] === '') { delete args[5]; }\n      }\n      var value = args[3] || args[4] || args[5] || '';\n      attrs[i] = {\n        name: args[1],\n        value: decodeAttr(\n          value,\n          options.shouldDecodeNewlines\n        )\n      };\n    }\n\n    if (!unary) {\n      stack.push({ tag: tagName, lowerCasedTag: tagName.toLowerCase(), attrs: attrs });\n      lastTag = tagName;\n    }\n\n    if (options.start) {\n      options.start(tagName, attrs, unary, match.start, match.end);\n    }\n  }\n\n  function parseEndTag (tagName, start, end) {\n    var pos, lowerCasedTagName;\n    if (start == null) { start = index; }\n    if (end == null) { end = index; }\n\n    if (tagName) {\n      lowerCasedTagName = tagName.toLowerCase();\n    }\n\n    // Find the closest opened tag of the same type\n    if (tagName) {\n      for (pos = stack.length - 1; pos >= 0; pos--) {\n        if (stack[pos].lowerCasedTag === lowerCasedTagName) {\n          break\n        }\n      }\n    } else {\n      // If no tag name is provided, clean shop\n      pos = 0;\n    }\n\n    if (pos >= 0) {\n      // Close all the open elements, up the stack\n      for (var i = stack.length - 1; i >= pos; i--) {\n        if (\"development\" !== 'production' &&\n            (i > pos || !tagName) &&\n            options.warn) {\n          options.warn(\n            (\"tag <\" + (stack[i].tag) + \"> has no matching end tag.\")\n          );\n        }\n        if (options.end) {\n          options.end(stack[i].tag, start, end);\n        }\n      }\n\n      // Remove the open elements from the stack\n      stack.length = pos;\n      lastTag = pos && stack[pos - 1].tag;\n    } else if (lowerCasedTagName === 'br') {\n      if (options.start) {\n        options.start(tagName, [], true, start, end);\n      }\n    } else if (lowerCasedTagName === 'p') {\n      if (options.start) {\n        options.start(tagName, [], false, start, end);\n      }\n      if (options.end) {\n        options.end(tagName, start, end);\n      }\n    }\n  }\n}\n\n/*  */\n\nvar defaultTagRE = /\\{\\{((?:.|\\n)+?)\\}\\}/g;\nvar regexEscapeRE = /[-.*+?^${}()|[\\]\\/\\\\]/g;\n\nvar buildRegex = cached(function (delimiters) {\n  var open = delimiters[0].replace(regexEscapeRE, '\\\\$&');\n  var close = delimiters[1].replace(regexEscapeRE, '\\\\$&');\n  return new RegExp(open + '((?:.|\\\\n)+?)' + close, 'g')\n});\n\nfunction parseText (\n  text,\n  delimiters\n) {\n  var tagRE = delimiters ? buildRegex(delimiters) : defaultTagRE;\n  if (!tagRE.test(text)) {\n    return\n  }\n  var tokens = [];\n  var lastIndex = tagRE.lastIndex = 0;\n  var match, index;\n  while ((match = tagRE.exec(text))) {\n    index = match.index;\n    // push text token\n    if (index > lastIndex) {\n      tokens.push(JSON.stringify(text.slice(lastIndex, index)));\n    }\n    // tag token\n    var exp = parseFilters(match[1].trim());\n    tokens.push((\"_s(\" + exp + \")\"));\n    lastIndex = index + match[0].length;\n  }\n  if (lastIndex < text.length) {\n    tokens.push(JSON.stringify(text.slice(lastIndex)));\n  }\n  return tokens.join('+')\n}\n\n/*  */\n\nvar onRE = /^@|^v-on:/;\nvar dirRE = /^v-|^@|^:/;\nvar forAliasRE = /(.*?)\\s+(?:in|of)\\s+(.*)/;\nvar forIteratorRE = /\\((\\{[^}]*\\}|[^,]*),([^,]*)(?:,([^,]*))?\\)/;\n\nvar argRE = /:(.*)$/;\nvar bindRE = /^:|^v-bind:/;\nvar modifierRE = /\\.[^.]+/g;\n\nvar decodeHTMLCached = cached(decode);\n\n// configurable state\nvar warn$2;\nvar delimiters;\nvar transforms;\nvar preTransforms;\nvar postTransforms;\nvar platformIsPreTag;\nvar platformMustUseProp;\nvar platformGetTagNamespace;\n\n/**\n * Convert HTML string to AST.\n */\nfunction parse (\n  template,\n  options\n) {\n  warn$2 = options.warn || baseWarn;\n  platformGetTagNamespace = options.getTagNamespace || no;\n  platformMustUseProp = options.mustUseProp || no;\n  platformIsPreTag = options.isPreTag || no;\n  preTransforms = pluckModuleFunction(options.modules, 'preTransformNode');\n  transforms = pluckModuleFunction(options.modules, 'transformNode');\n  postTransforms = pluckModuleFunction(options.modules, 'postTransformNode');\n  delimiters = options.delimiters;\n\n  var stack = [];\n  var preserveWhitespace = options.preserveWhitespace !== false;\n  var root;\n  var currentParent;\n  var inVPre = false;\n  var inPre = false;\n  var warned = false;\n\n  function warnOnce (msg) {\n    if (!warned) {\n      warned = true;\n      warn$2(msg);\n    }\n  }\n\n  function endPre (element) {\n    // check pre state\n    if (element.pre) {\n      inVPre = false;\n    }\n    if (platformIsPreTag(element.tag)) {\n      inPre = false;\n    }\n  }\n\n  parseHTML(template, {\n    warn: warn$2,\n    expectHTML: options.expectHTML,\n    isUnaryTag: options.isUnaryTag,\n    canBeLeftOpenTag: options.canBeLeftOpenTag,\n    shouldDecodeNewlines: options.shouldDecodeNewlines,\n    start: function start (tag, attrs, unary) {\n      // check namespace.\n      // inherit parent ns if there is one\n      var ns = (currentParent && currentParent.ns) || platformGetTagNamespace(tag);\n\n      // handle IE svg bug\n      /* istanbul ignore if */\n      if (isIE && ns === 'svg') {\n        attrs = guardIESVGBug(attrs);\n      }\n\n      var element = {\n        type: 1,\n        tag: tag,\n        attrsList: attrs,\n        attrsMap: makeAttrsMap(attrs),\n        parent: currentParent,\n        children: []\n      };\n      if (ns) {\n        element.ns = ns;\n      }\n\n      if (isForbiddenTag(element) && !isServerRendering()) {\n        element.forbidden = true;\n        \"development\" !== 'production' && warn$2(\n          'Templates should only be responsible for mapping the state to the ' +\n          'UI. Avoid placing tags with side-effects in your templates, such as ' +\n          \"<\" + tag + \">\" + ', as they will not be parsed.'\n        );\n      }\n\n      // apply pre-transforms\n      for (var i = 0; i < preTransforms.length; i++) {\n        preTransforms[i](element, options);\n      }\n\n      if (!inVPre) {\n        processPre(element);\n        if (element.pre) {\n          inVPre = true;\n        }\n      }\n      if (platformIsPreTag(element.tag)) {\n        inPre = true;\n      }\n      if (inVPre) {\n        processRawAttrs(element);\n      } else {\n        processFor(element);\n        processIf(element);\n        processOnce(element);\n        processKey(element);\n\n        // determine whether this is a plain element after\n        // removing structural attributes\n        element.plain = !element.key && !attrs.length;\n\n        processRef(element);\n        processSlot(element);\n        processComponent(element);\n        for (var i$1 = 0; i$1 < transforms.length; i$1++) {\n          transforms[i$1](element, options);\n        }\n        processAttrs(element);\n      }\n\n      function checkRootConstraints (el) {\n        {\n          if (el.tag === 'slot' || el.tag === 'template') {\n            warnOnce(\n              \"Cannot use <\" + (el.tag) + \"> as component root element because it may \" +\n              'contain multiple nodes.'\n            );\n          }\n          if (el.attrsMap.hasOwnProperty('v-for')) {\n            warnOnce(\n              'Cannot use v-for on stateful component root element because ' +\n              'it renders multiple elements.'\n            );\n          }\n        }\n      }\n\n      // tree management\n      if (!root) {\n        root = element;\n        checkRootConstraints(root);\n      } else if (!stack.length) {\n        // allow root elements with v-if, v-else-if and v-else\n        if (root.if && (element.elseif || element.else)) {\n          checkRootConstraints(element);\n          addIfCondition(root, {\n            exp: element.elseif,\n            block: element\n          });\n        } else {\n          warnOnce(\n            \"Component template should contain exactly one root element. \" +\n            \"If you are using v-if on multiple elements, \" +\n            \"use v-else-if to chain them instead.\"\n          );\n        }\n      }\n      if (currentParent && !element.forbidden) {\n        if (element.elseif || element.else) {\n          processIfConditions(element, currentParent);\n        } else if (element.slotScope) { // scoped slot\n          currentParent.plain = false;\n          var name = element.slotTarget || '\"default\"';(currentParent.scopedSlots || (currentParent.scopedSlots = {}))[name] = element;\n        } else {\n          currentParent.children.push(element);\n          element.parent = currentParent;\n        }\n      }\n      if (!unary) {\n        currentParent = element;\n        stack.push(element);\n      } else {\n        endPre(element);\n      }\n      // apply post-transforms\n      for (var i$2 = 0; i$2 < postTransforms.length; i$2++) {\n        postTransforms[i$2](element, options);\n      }\n    },\n\n    end: function end () {\n      // remove trailing whitespace\n      var element = stack[stack.length - 1];\n      var lastNode = element.children[element.children.length - 1];\n      if (lastNode && lastNode.type === 3 && lastNode.text === ' ' && !inPre) {\n        element.children.pop();\n      }\n      // pop stack\n      stack.length -= 1;\n      currentParent = stack[stack.length - 1];\n      endPre(element);\n    },\n\n    chars: function chars (text) {\n      if (!currentParent) {\n        {\n          if (text === template) {\n            warnOnce(\n              'Component template requires a root element, rather than just text.'\n            );\n          } else if ((text = text.trim())) {\n            warnOnce(\n              (\"text \\\"\" + text + \"\\\" outside root element will be ignored.\")\n            );\n          }\n        }\n        return\n      }\n      // IE textarea placeholder bug\n      /* istanbul ignore if */\n      if (isIE &&\n          currentParent.tag === 'textarea' &&\n          currentParent.attrsMap.placeholder === text) {\n        return\n      }\n      var children = currentParent.children;\n      text = inPre || text.trim()\n        ? decodeHTMLCached(text)\n        // only preserve whitespace if its not right after a starting tag\n        : preserveWhitespace && children.length ? ' ' : '';\n      if (text) {\n        var expression;\n        if (!inVPre && text !== ' ' && (expression = parseText(text, delimiters))) {\n          children.push({\n            type: 2,\n            expression: expression,\n            text: text\n          });\n        } else if (text !== ' ' || !children.length || children[children.length - 1].text !== ' ') {\n          children.push({\n            type: 3,\n            text: text\n          });\n        }\n      }\n    }\n  });\n  return root\n}\n\nfunction processPre (el) {\n  if (getAndRemoveAttr(el, 'v-pre') != null) {\n    el.pre = true;\n  }\n}\n\nfunction processRawAttrs (el) {\n  var l = el.attrsList.length;\n  if (l) {\n    var attrs = el.attrs = new Array(l);\n    for (var i = 0; i < l; i++) {\n      attrs[i] = {\n        name: el.attrsList[i].name,\n        value: JSON.stringify(el.attrsList[i].value)\n      };\n    }\n  } else if (!el.pre) {\n    // non root node in pre blocks with no attributes\n    el.plain = true;\n  }\n}\n\nfunction processKey (el) {\n  var exp = getBindingAttr(el, 'key');\n  if (exp) {\n    if (\"development\" !== 'production' && el.tag === 'template') {\n      warn$2(\"<template> cannot be keyed. Place the key on real elements instead.\");\n    }\n    el.key = exp;\n  }\n}\n\nfunction processRef (el) {\n  var ref = getBindingAttr(el, 'ref');\n  if (ref) {\n    el.ref = ref;\n    el.refInFor = checkInFor(el);\n  }\n}\n\nfunction processFor (el) {\n  var exp;\n  if ((exp = getAndRemoveAttr(el, 'v-for'))) {\n    var inMatch = exp.match(forAliasRE);\n    if (!inMatch) {\n      \"development\" !== 'production' && warn$2(\n        (\"Invalid v-for expression: \" + exp)\n      );\n      return\n    }\n    el.for = inMatch[2].trim();\n    var alias = inMatch[1].trim();\n    var iteratorMatch = alias.match(forIteratorRE);\n    if (iteratorMatch) {\n      el.alias = iteratorMatch[1].trim();\n      el.iterator1 = iteratorMatch[2].trim();\n      if (iteratorMatch[3]) {\n        el.iterator2 = iteratorMatch[3].trim();\n      }\n    } else {\n      el.alias = alias;\n    }\n  }\n}\n\nfunction processIf (el) {\n  var exp = getAndRemoveAttr(el, 'v-if');\n  if (exp) {\n    el.if = exp;\n    addIfCondition(el, {\n      exp: exp,\n      block: el\n    });\n  } else {\n    if (getAndRemoveAttr(el, 'v-else') != null) {\n      el.else = true;\n    }\n    var elseif = getAndRemoveAttr(el, 'v-else-if');\n    if (elseif) {\n      el.elseif = elseif;\n    }\n  }\n}\n\nfunction processIfConditions (el, parent) {\n  var prev = findPrevElement(parent.children);\n  if (prev && prev.if) {\n    addIfCondition(prev, {\n      exp: el.elseif,\n      block: el\n    });\n  } else {\n    warn$2(\n      \"v-\" + (el.elseif ? ('else-if=\"' + el.elseif + '\"') : 'else') + \" \" +\n      \"used on element <\" + (el.tag) + \"> without corresponding v-if.\"\n    );\n  }\n}\n\nfunction findPrevElement (children) {\n  var i = children.length;\n  while (i--) {\n    if (children[i].type === 1) {\n      return children[i]\n    } else {\n      if (\"development\" !== 'production' && children[i].text !== ' ') {\n        warn$2(\n          \"text \\\"\" + (children[i].text.trim()) + \"\\\" between v-if and v-else(-if) \" +\n          \"will be ignored.\"\n        );\n      }\n      children.pop();\n    }\n  }\n}\n\nfunction addIfCondition (el, condition) {\n  if (!el.ifConditions) {\n    el.ifConditions = [];\n  }\n  el.ifConditions.push(condition);\n}\n\nfunction processOnce (el) {\n  var once$$1 = getAndRemoveAttr(el, 'v-once');\n  if (once$$1 != null) {\n    el.once = true;\n  }\n}\n\nfunction processSlot (el) {\n  if (el.tag === 'slot') {\n    el.slotName = getBindingAttr(el, 'name');\n    if (\"development\" !== 'production' && el.key) {\n      warn$2(\n        \"`key` does not work on <slot> because slots are abstract outlets \" +\n        \"and can possibly expand into multiple elements. \" +\n        \"Use the key on a wrapping element instead.\"\n      );\n    }\n  } else {\n    var slotTarget = getBindingAttr(el, 'slot');\n    if (slotTarget) {\n      el.slotTarget = slotTarget === '\"\"' ? '\"default\"' : slotTarget;\n    }\n    if (el.tag === 'template') {\n      el.slotScope = getAndRemoveAttr(el, 'scope');\n    }\n  }\n}\n\nfunction processComponent (el) {\n  var binding;\n  if ((binding = getBindingAttr(el, 'is'))) {\n    el.component = binding;\n  }\n  if (getAndRemoveAttr(el, 'inline-template') != null) {\n    el.inlineTemplate = true;\n  }\n}\n\nfunction processAttrs (el) {\n  var list = el.attrsList;\n  var i, l, name, rawName, value, modifiers, isProp;\n  for (i = 0, l = list.length; i < l; i++) {\n    name = rawName = list[i].name;\n    value = list[i].value;\n    if (dirRE.test(name)) {\n      // mark element as dynamic\n      el.hasBindings = true;\n      // modifiers\n      modifiers = parseModifiers(name);\n      if (modifiers) {\n        name = name.replace(modifierRE, '');\n      }\n      if (bindRE.test(name)) { // v-bind\n        name = name.replace(bindRE, '');\n        value = parseFilters(value);\n        isProp = false;\n        if (modifiers) {\n          if (modifiers.prop) {\n            isProp = true;\n            name = camelize(name);\n            if (name === 'innerHtml') { name = 'innerHTML'; }\n          }\n          if (modifiers.camel) {\n            name = camelize(name);\n          }\n        }\n        if (isProp || platformMustUseProp(el.tag, el.attrsMap.type, name)) {\n          addProp(el, name, value);\n        } else {\n          addAttr(el, name, value);\n        }\n      } else if (onRE.test(name)) { // v-on\n        name = name.replace(onRE, '');\n        addHandler(el, name, value, modifiers);\n      } else { // normal directives\n        name = name.replace(dirRE, '');\n        // parse arg\n        var argMatch = name.match(argRE);\n        var arg = argMatch && argMatch[1];\n        if (arg) {\n          name = name.slice(0, -(arg.length + 1));\n        }\n        addDirective(el, name, rawName, value, arg, modifiers);\n        if (\"development\" !== 'production' && name === 'model') {\n          checkForAliasModel(el, value);\n        }\n      }\n    } else {\n      // literal attribute\n      {\n        var expression = parseText(value, delimiters);\n        if (expression) {\n          warn$2(\n            name + \"=\\\"\" + value + \"\\\": \" +\n            'Interpolation inside attributes has been removed. ' +\n            'Use v-bind or the colon shorthand instead. For example, ' +\n            'instead of <div id=\"{{ val }}\">, use <div :id=\"val\">.'\n          );\n        }\n      }\n      addAttr(el, name, JSON.stringify(value));\n    }\n  }\n}\n\nfunction checkInFor (el) {\n  var parent = el;\n  while (parent) {\n    if (parent.for !== undefined) {\n      return true\n    }\n    parent = parent.parent;\n  }\n  return false\n}\n\nfunction parseModifiers (name) {\n  var match = name.match(modifierRE);\n  if (match) {\n    var ret = {};\n    match.forEach(function (m) { ret[m.slice(1)] = true; });\n    return ret\n  }\n}\n\nfunction makeAttrsMap (attrs) {\n  var map = {};\n  for (var i = 0, l = attrs.length; i < l; i++) {\n    if (\"development\" !== 'production' && map[attrs[i].name] && !isIE) {\n      warn$2('duplicate attribute: ' + attrs[i].name);\n    }\n    map[attrs[i].name] = attrs[i].value;\n  }\n  return map\n}\n\nfunction isForbiddenTag (el) {\n  return (\n    el.tag === 'style' ||\n    (el.tag === 'script' && (\n      !el.attrsMap.type ||\n      el.attrsMap.type === 'text/javascript'\n    ))\n  )\n}\n\nvar ieNSBug = /^xmlns:NS\\d+/;\nvar ieNSPrefix = /^NS\\d+:/;\n\n/* istanbul ignore next */\nfunction guardIESVGBug (attrs) {\n  var res = [];\n  for (var i = 0; i < attrs.length; i++) {\n    var attr = attrs[i];\n    if (!ieNSBug.test(attr.name)) {\n      attr.name = attr.name.replace(ieNSPrefix, '');\n      res.push(attr);\n    }\n  }\n  return res\n}\n\nfunction checkForAliasModel (el, value) {\n  var _el = el;\n  while (_el) {\n    if (_el.for && _el.alias === value) {\n      warn$2(\n        \"<\" + (el.tag) + \" v-model=\\\"\" + value + \"\\\">: \" +\n        \"You are binding v-model directly to a v-for iteration alias. \" +\n        \"This will not be able to modify the v-for source array because \" +\n        \"writing to the alias is like modifying a function local variable. \" +\n        \"Consider using an array of objects and use v-model on an object property instead.\"\n      );\n    }\n    _el = _el.parent;\n  }\n}\n\n/*  */\n\nvar isStaticKey;\nvar isPlatformReservedTag;\n\nvar genStaticKeysCached = cached(genStaticKeys$1);\n\n/**\n * Goal of the optimizer: walk the generated template AST tree\n * and detect sub-trees that are purely static, i.e. parts of\n * the DOM that never needs to change.\n *\n * Once we detect these sub-trees, we can:\n *\n * 1. Hoist them into constants, so that we no longer need to\n *    create fresh nodes for them on each re-render;\n * 2. Completely skip them in the patching process.\n */\nfunction optimize (root, options) {\n  if (!root) { return }\n  isStaticKey = genStaticKeysCached(options.staticKeys || '');\n  isPlatformReservedTag = options.isReservedTag || no;\n  // first pass: mark all non-static nodes.\n  markStatic$1(root);\n  // second pass: mark static roots.\n  markStaticRoots(root, false);\n}\n\nfunction genStaticKeys$1 (keys) {\n  return makeMap(\n    'type,tag,attrsList,attrsMap,plain,parent,children,attrs' +\n    (keys ? ',' + keys : '')\n  )\n}\n\nfunction markStatic$1 (node) {\n  node.static = isStatic(node);\n  if (node.type === 1) {\n    // do not make component slot content static. this avoids\n    // 1. components not able to mutate slot nodes\n    // 2. static slot content fails for hot-reloading\n    if (\n      !isPlatformReservedTag(node.tag) &&\n      node.tag !== 'slot' &&\n      node.attrsMap['inline-template'] == null\n    ) {\n      return\n    }\n    for (var i = 0, l = node.children.length; i < l; i++) {\n      var child = node.children[i];\n      markStatic$1(child);\n      if (!child.static) {\n        node.static = false;\n      }\n    }\n  }\n}\n\nfunction markStaticRoots (node, isInFor) {\n  if (node.type === 1) {\n    if (node.static || node.once) {\n      node.staticInFor = isInFor;\n    }\n    // For a node to qualify as a static root, it should have children that\n    // are not just static text. Otherwise the cost of hoisting out will\n    // outweigh the benefits and it's better off to just always render it fresh.\n    if (node.static && node.children.length && !(\n      node.children.length === 1 &&\n      node.children[0].type === 3\n    )) {\n      node.staticRoot = true;\n      return\n    } else {\n      node.staticRoot = false;\n    }\n    if (node.children) {\n      for (var i = 0, l = node.children.length; i < l; i++) {\n        markStaticRoots(node.children[i], isInFor || !!node.for);\n      }\n    }\n    if (node.ifConditions) {\n      walkThroughConditionsBlocks(node.ifConditions, isInFor);\n    }\n  }\n}\n\nfunction walkThroughConditionsBlocks (conditionBlocks, isInFor) {\n  for (var i = 1, len = conditionBlocks.length; i < len; i++) {\n    markStaticRoots(conditionBlocks[i].block, isInFor);\n  }\n}\n\nfunction isStatic (node) {\n  if (node.type === 2) { // expression\n    return false\n  }\n  if (node.type === 3) { // text\n    return true\n  }\n  return !!(node.pre || (\n    !node.hasBindings && // no dynamic bindings\n    !node.if && !node.for && // not v-if or v-for or v-else\n    !isBuiltInTag(node.tag) && // not a built-in\n    isPlatformReservedTag(node.tag) && // not a component\n    !isDirectChildOfTemplateFor(node) &&\n    Object.keys(node).every(isStaticKey)\n  ))\n}\n\nfunction isDirectChildOfTemplateFor (node) {\n  while (node.parent) {\n    node = node.parent;\n    if (node.tag !== 'template') {\n      return false\n    }\n    if (node.for) {\n      return true\n    }\n  }\n  return false\n}\n\n/*  */\n\nvar fnExpRE = /^\\s*([\\w$_]+|\\([^)]*?\\))\\s*=>|^function\\s*\\(/;\nvar simplePathRE = /^\\s*[A-Za-z_$][\\w$]*(?:\\.[A-Za-z_$][\\w$]*|\\['.*?']|\\[\".*?\"]|\\[\\d+]|\\[[A-Za-z_$][\\w$]*])*\\s*$/;\n\n// keyCode aliases\nvar keyCodes = {\n  esc: 27,\n  tab: 9,\n  enter: 13,\n  space: 32,\n  up: 38,\n  left: 37,\n  right: 39,\n  down: 40,\n  'delete': [8, 46]\n};\n\n// #4868: modifiers that prevent the execution of the listener\n// need to explicitly return null so that we can determine whether to remove\n// the listener for .once\nvar genGuard = function (condition) { return (\"if(\" + condition + \")return null;\"); };\n\nvar modifierCode = {\n  stop: '$event.stopPropagation();',\n  prevent: '$event.preventDefault();',\n  self: genGuard(\"$event.target !== $event.currentTarget\"),\n  ctrl: genGuard(\"!$event.ctrlKey\"),\n  shift: genGuard(\"!$event.shiftKey\"),\n  alt: genGuard(\"!$event.altKey\"),\n  meta: genGuard(\"!$event.metaKey\"),\n  left: genGuard(\"'button' in $event && $event.button !== 0\"),\n  middle: genGuard(\"'button' in $event && $event.button !== 1\"),\n  right: genGuard(\"'button' in $event && $event.button !== 2\")\n};\n\nfunction genHandlers (events, native) {\n  var res = native ? 'nativeOn:{' : 'on:{';\n  for (var name in events) {\n    res += \"\\\"\" + name + \"\\\":\" + (genHandler(name, events[name])) + \",\";\n  }\n  return res.slice(0, -1) + '}'\n}\n\nfunction genHandler (\n  name,\n  handler\n) {\n  if (!handler) {\n    return 'function(){}'\n  }\n\n  if (Array.isArray(handler)) {\n    return (\"[\" + (handler.map(function (handler) { return genHandler(name, handler); }).join(',')) + \"]\")\n  }\n\n  var isMethodPath = simplePathRE.test(handler.value);\n  var isFunctionExpression = fnExpRE.test(handler.value);\n\n  if (!handler.modifiers) {\n    return isMethodPath || isFunctionExpression\n      ? handler.value\n      : (\"function($event){\" + (handler.value) + \"}\") // inline statement\n  } else {\n    var code = '';\n    var genModifierCode = '';\n    var keys = [];\n    for (var key in handler.modifiers) {\n      if (modifierCode[key]) {\n        genModifierCode += modifierCode[key];\n        // left/right\n        if (keyCodes[key]) {\n          keys.push(key);\n        }\n      } else {\n        keys.push(key);\n      }\n    }\n    if (keys.length) {\n      code += genKeyFilter(keys);\n    }\n    // Make sure modifiers like prevent and stop get executed after key filtering\n    if (genModifierCode) {\n      code += genModifierCode;\n    }\n    var handlerCode = isMethodPath\n      ? handler.value + '($event)'\n      : isFunctionExpression\n        ? (\"(\" + (handler.value) + \")($event)\")\n        : handler.value;\n    return (\"function($event){\" + code + handlerCode + \"}\")\n  }\n}\n\nfunction genKeyFilter (keys) {\n  return (\"if(!('button' in $event)&&\" + (keys.map(genFilterCode).join('&&')) + \")return null;\")\n}\n\nfunction genFilterCode (key) {\n  var keyVal = parseInt(key, 10);\n  if (keyVal) {\n    return (\"$event.keyCode!==\" + keyVal)\n  }\n  var alias = keyCodes[key];\n  return (\"_k($event.keyCode,\" + (JSON.stringify(key)) + (alias ? ',' + JSON.stringify(alias) : '') + \")\")\n}\n\n/*  */\n\nfunction bind$1 (el, dir) {\n  el.wrapData = function (code) {\n    return (\"_b(\" + code + \",'\" + (el.tag) + \"',\" + (dir.value) + (dir.modifiers && dir.modifiers.prop ? ',true' : '') + \")\")\n  };\n}\n\n/*  */\n\nvar baseDirectives = {\n  bind: bind$1,\n  cloak: noop\n};\n\n/*  */\n\n// configurable state\nvar warn$3;\nvar transforms$1;\nvar dataGenFns;\nvar platformDirectives$1;\nvar isPlatformReservedTag$1;\nvar staticRenderFns;\nvar onceCount;\nvar currentOptions;\n\nfunction generate (\n  ast,\n  options\n) {\n  // save previous staticRenderFns so generate calls can be nested\n  var prevStaticRenderFns = staticRenderFns;\n  var currentStaticRenderFns = staticRenderFns = [];\n  var prevOnceCount = onceCount;\n  onceCount = 0;\n  currentOptions = options;\n  warn$3 = options.warn || baseWarn;\n  transforms$1 = pluckModuleFunction(options.modules, 'transformCode');\n  dataGenFns = pluckModuleFunction(options.modules, 'genData');\n  platformDirectives$1 = options.directives || {};\n  isPlatformReservedTag$1 = options.isReservedTag || no;\n  var code = ast ? genElement(ast) : '_c(\"div\")';\n  staticRenderFns = prevStaticRenderFns;\n  onceCount = prevOnceCount;\n  return {\n    render: (\"with(this){return \" + code + \"}\"),\n    staticRenderFns: currentStaticRenderFns\n  }\n}\n\nfunction genElement (el) {\n  if (el.staticRoot && !el.staticProcessed) {\n    return genStatic(el)\n  } else if (el.once && !el.onceProcessed) {\n    return genOnce(el)\n  } else if (el.for && !el.forProcessed) {\n    return genFor(el)\n  } else if (el.if && !el.ifProcessed) {\n    return genIf(el)\n  } else if (el.tag === 'template' && !el.slotTarget) {\n    return genChildren(el) || 'void 0'\n  } else if (el.tag === 'slot') {\n    return genSlot(el)\n  } else {\n    // component or element\n    var code;\n    if (el.component) {\n      code = genComponent(el.component, el);\n    } else {\n      var data = el.plain ? undefined : genData(el);\n\n      var children = el.inlineTemplate ? null : genChildren(el, true);\n      code = \"_c('\" + (el.tag) + \"'\" + (data ? (\",\" + data) : '') + (children ? (\",\" + children) : '') + \")\";\n    }\n    // module transforms\n    for (var i = 0; i < transforms$1.length; i++) {\n      code = transforms$1[i](el, code);\n    }\n    return code\n  }\n}\n\n// hoist static sub-trees out\nfunction genStatic (el) {\n  el.staticProcessed = true;\n  staticRenderFns.push((\"with(this){return \" + (genElement(el)) + \"}\"));\n  return (\"_m(\" + (staticRenderFns.length - 1) + (el.staticInFor ? ',true' : '') + \")\")\n}\n\n// v-once\nfunction genOnce (el) {\n  el.onceProcessed = true;\n  if (el.if && !el.ifProcessed) {\n    return genIf(el)\n  } else if (el.staticInFor) {\n    var key = '';\n    var parent = el.parent;\n    while (parent) {\n      if (parent.for) {\n        key = parent.key;\n        break\n      }\n      parent = parent.parent;\n    }\n    if (!key) {\n      \"development\" !== 'production' && warn$3(\n        \"v-once can only be used inside v-for that is keyed. \"\n      );\n      return genElement(el)\n    }\n    return (\"_o(\" + (genElement(el)) + \",\" + (onceCount++) + (key ? (\",\" + key) : \"\") + \")\")\n  } else {\n    return genStatic(el)\n  }\n}\n\nfunction genIf (el) {\n  el.ifProcessed = true; // avoid recursion\n  return genIfConditions(el.ifConditions.slice())\n}\n\nfunction genIfConditions (conditions) {\n  if (!conditions.length) {\n    return '_e()'\n  }\n\n  var condition = conditions.shift();\n  if (condition.exp) {\n    return (\"(\" + (condition.exp) + \")?\" + (genTernaryExp(condition.block)) + \":\" + (genIfConditions(conditions)))\n  } else {\n    return (\"\" + (genTernaryExp(condition.block)))\n  }\n\n  // v-if with v-once should generate code like (a)?_m(0):_m(1)\n  function genTernaryExp (el) {\n    return el.once ? genOnce(el) : genElement(el)\n  }\n}\n\nfunction genFor (el) {\n  var exp = el.for;\n  var alias = el.alias;\n  var iterator1 = el.iterator1 ? (\",\" + (el.iterator1)) : '';\n  var iterator2 = el.iterator2 ? (\",\" + (el.iterator2)) : '';\n\n  if (\n    \"development\" !== 'production' &&\n    maybeComponent(el) && el.tag !== 'slot' && el.tag !== 'template' && !el.key\n  ) {\n    warn$3(\n      \"<\" + (el.tag) + \" v-for=\\\"\" + alias + \" in \" + exp + \"\\\">: component lists rendered with \" +\n      \"v-for should have explicit keys. \" +\n      \"See https://vuejs.org/guide/list.html#key for more info.\",\n      true /* tip */\n    );\n  }\n\n  el.forProcessed = true; // avoid recursion\n  return \"_l((\" + exp + \"),\" +\n    \"function(\" + alias + iterator1 + iterator2 + \"){\" +\n      \"return \" + (genElement(el)) +\n    '})'\n}\n\nfunction genData (el) {\n  var data = '{';\n\n  // directives first.\n  // directives may mutate the el's other properties before they are generated.\n  var dirs = genDirectives(el);\n  if (dirs) { data += dirs + ','; }\n\n  // key\n  if (el.key) {\n    data += \"key:\" + (el.key) + \",\";\n  }\n  // ref\n  if (el.ref) {\n    data += \"ref:\" + (el.ref) + \",\";\n  }\n  if (el.refInFor) {\n    data += \"refInFor:true,\";\n  }\n  // pre\n  if (el.pre) {\n    data += \"pre:true,\";\n  }\n  // record original tag name for components using \"is\" attribute\n  if (el.component) {\n    data += \"tag:\\\"\" + (el.tag) + \"\\\",\";\n  }\n  // module data generation functions\n  for (var i = 0; i < dataGenFns.length; i++) {\n    data += dataGenFns[i](el);\n  }\n  // attributes\n  if (el.attrs) {\n    data += \"attrs:{\" + (genProps(el.attrs)) + \"},\";\n  }\n  // DOM props\n  if (el.props) {\n    data += \"domProps:{\" + (genProps(el.props)) + \"},\";\n  }\n  // event handlers\n  if (el.events) {\n    data += (genHandlers(el.events)) + \",\";\n  }\n  if (el.nativeEvents) {\n    data += (genHandlers(el.nativeEvents, true)) + \",\";\n  }\n  // slot target\n  if (el.slotTarget) {\n    data += \"slot:\" + (el.slotTarget) + \",\";\n  }\n  // scoped slots\n  if (el.scopedSlots) {\n    data += (genScopedSlots(el.scopedSlots)) + \",\";\n  }\n  // component v-model\n  if (el.model) {\n    data += \"model:{value:\" + (el.model.value) + \",callback:\" + (el.model.callback) + \",expression:\" + (el.model.expression) + \"},\";\n  }\n  // inline-template\n  if (el.inlineTemplate) {\n    var inlineTemplate = genInlineTemplate(el);\n    if (inlineTemplate) {\n      data += inlineTemplate + \",\";\n    }\n  }\n  data = data.replace(/,$/, '') + '}';\n  // v-bind data wrap\n  if (el.wrapData) {\n    data = el.wrapData(data);\n  }\n  return data\n}\n\nfunction genDirectives (el) {\n  var dirs = el.directives;\n  if (!dirs) { return }\n  var res = 'directives:[';\n  var hasRuntime = false;\n  var i, l, dir, needRuntime;\n  for (i = 0, l = dirs.length; i < l; i++) {\n    dir = dirs[i];\n    needRuntime = true;\n    var gen = platformDirectives$1[dir.name] || baseDirectives[dir.name];\n    if (gen) {\n      // compile-time directive that manipulates AST.\n      // returns true if it also needs a runtime counterpart.\n      needRuntime = !!gen(el, dir, warn$3);\n    }\n    if (needRuntime) {\n      hasRuntime = true;\n      res += \"{name:\\\"\" + (dir.name) + \"\\\",rawName:\\\"\" + (dir.rawName) + \"\\\"\" + (dir.value ? (\",value:(\" + (dir.value) + \"),expression:\" + (JSON.stringify(dir.value))) : '') + (dir.arg ? (\",arg:\\\"\" + (dir.arg) + \"\\\"\") : '') + (dir.modifiers ? (\",modifiers:\" + (JSON.stringify(dir.modifiers))) : '') + \"},\";\n    }\n  }\n  if (hasRuntime) {\n    return res.slice(0, -1) + ']'\n  }\n}\n\nfunction genInlineTemplate (el) {\n  var ast = el.children[0];\n  if (\"development\" !== 'production' && (\n    el.children.length > 1 || ast.type !== 1\n  )) {\n    warn$3('Inline-template components must have exactly one child element.');\n  }\n  if (ast.type === 1) {\n    var inlineRenderFns = generate(ast, currentOptions);\n    return (\"inlineTemplate:{render:function(){\" + (inlineRenderFns.render) + \"},staticRenderFns:[\" + (inlineRenderFns.staticRenderFns.map(function (code) { return (\"function(){\" + code + \"}\"); }).join(',')) + \"]}\")\n  }\n}\n\nfunction genScopedSlots (slots) {\n  return (\"scopedSlots:_u([\" + (Object.keys(slots).map(function (key) { return genScopedSlot(key, slots[key]); }).join(',')) + \"])\")\n}\n\nfunction genScopedSlot (key, el) {\n  return \"[\" + key + \",function(\" + (String(el.attrsMap.scope)) + \"){\" +\n    \"return \" + (el.tag === 'template'\n      ? genChildren(el) || 'void 0'\n      : genElement(el)) + \"}]\"\n}\n\nfunction genChildren (el, checkSkip) {\n  var children = el.children;\n  if (children.length) {\n    var el$1 = children[0];\n    // optimize single v-for\n    if (children.length === 1 &&\n        el$1.for &&\n        el$1.tag !== 'template' &&\n        el$1.tag !== 'slot') {\n      return genElement(el$1)\n    }\n    var normalizationType = checkSkip ? getNormalizationType(children) : 0;\n    return (\"[\" + (children.map(genNode).join(',')) + \"]\" + (normalizationType ? (\",\" + normalizationType) : ''))\n  }\n}\n\n// determine the normalization needed for the children array.\n// 0: no normalization needed\n// 1: simple normalization needed (possible 1-level deep nested array)\n// 2: full normalization needed\nfunction getNormalizationType (children) {\n  var res = 0;\n  for (var i = 0; i < children.length; i++) {\n    var el = children[i];\n    if (el.type !== 1) {\n      continue\n    }\n    if (needsNormalization(el) ||\n        (el.ifConditions && el.ifConditions.some(function (c) { return needsNormalization(c.block); }))) {\n      res = 2;\n      break\n    }\n    if (maybeComponent(el) ||\n        (el.ifConditions && el.ifConditions.some(function (c) { return maybeComponent(c.block); }))) {\n      res = 1;\n    }\n  }\n  return res\n}\n\nfunction needsNormalization (el) {\n  return el.for !== undefined || el.tag === 'template' || el.tag === 'slot'\n}\n\nfunction maybeComponent (el) {\n  return !isPlatformReservedTag$1(el.tag)\n}\n\nfunction genNode (node) {\n  if (node.type === 1) {\n    return genElement(node)\n  } else {\n    return genText(node)\n  }\n}\n\nfunction genText (text) {\n  return (\"_v(\" + (text.type === 2\n    ? text.expression // no need for () because already wrapped in _s()\n    : transformSpecialNewlines(JSON.stringify(text.text))) + \")\")\n}\n\nfunction genSlot (el) {\n  var slotName = el.slotName || '\"default\"';\n  var children = genChildren(el);\n  var res = \"_t(\" + slotName + (children ? (\",\" + children) : '');\n  var attrs = el.attrs && (\"{\" + (el.attrs.map(function (a) { return ((camelize(a.name)) + \":\" + (a.value)); }).join(',')) + \"}\");\n  var bind$$1 = el.attrsMap['v-bind'];\n  if ((attrs || bind$$1) && !children) {\n    res += \",null\";\n  }\n  if (attrs) {\n    res += \",\" + attrs;\n  }\n  if (bind$$1) {\n    res += (attrs ? '' : ',null') + \",\" + bind$$1;\n  }\n  return res + ')'\n}\n\n// componentName is el.component, take it as argument to shun flow's pessimistic refinement\nfunction genComponent (componentName, el) {\n  var children = el.inlineTemplate ? null : genChildren(el, true);\n  return (\"_c(\" + componentName + \",\" + (genData(el)) + (children ? (\",\" + children) : '') + \")\")\n}\n\nfunction genProps (props) {\n  var res = '';\n  for (var i = 0; i < props.length; i++) {\n    var prop = props[i];\n    res += \"\\\"\" + (prop.name) + \"\\\":\" + (transformSpecialNewlines(prop.value)) + \",\";\n  }\n  return res.slice(0, -1)\n}\n\n// #3895, #4268\nfunction transformSpecialNewlines (text) {\n  return text\n    .replace(/\\u2028/g, '\\\\u2028')\n    .replace(/\\u2029/g, '\\\\u2029')\n}\n\n/*  */\n\n// these keywords should not appear inside expressions, but operators like\n// typeof, instanceof and in are allowed\nvar prohibitedKeywordRE = new RegExp('\\\\b' + (\n  'do,if,for,let,new,try,var,case,else,with,await,break,catch,class,const,' +\n  'super,throw,while,yield,delete,export,import,return,switch,default,' +\n  'extends,finally,continue,debugger,function,arguments'\n).split(',').join('\\\\b|\\\\b') + '\\\\b');\n\n// these unary operators should not be used as property/method names\nvar unaryOperatorsRE = new RegExp('\\\\b' + (\n  'delete,typeof,void'\n).split(',').join('\\\\s*\\\\([^\\\\)]*\\\\)|\\\\b') + '\\\\s*\\\\([^\\\\)]*\\\\)');\n\n// check valid identifier for v-for\nvar identRE = /[A-Za-z_$][\\w$]*/;\n\n// strip strings in expressions\nvar stripStringRE = /'(?:[^'\\\\]|\\\\.)*'|\"(?:[^\"\\\\]|\\\\.)*\"|`(?:[^`\\\\]|\\\\.)*\\$\\{|\\}(?:[^`\\\\]|\\\\.)*`|`(?:[^`\\\\]|\\\\.)*`/g;\n\n// detect problematic expressions in a template\nfunction detectErrors (ast) {\n  var errors = [];\n  if (ast) {\n    checkNode(ast, errors);\n  }\n  return errors\n}\n\nfunction checkNode (node, errors) {\n  if (node.type === 1) {\n    for (var name in node.attrsMap) {\n      if (dirRE.test(name)) {\n        var value = node.attrsMap[name];\n        if (value) {\n          if (name === 'v-for') {\n            checkFor(node, (\"v-for=\\\"\" + value + \"\\\"\"), errors);\n          } else if (onRE.test(name)) {\n            checkEvent(value, (name + \"=\\\"\" + value + \"\\\"\"), errors);\n          } else {\n            checkExpression(value, (name + \"=\\\"\" + value + \"\\\"\"), errors);\n          }\n        }\n      }\n    }\n    if (node.children) {\n      for (var i = 0; i < node.children.length; i++) {\n        checkNode(node.children[i], errors);\n      }\n    }\n  } else if (node.type === 2) {\n    checkExpression(node.expression, node.text, errors);\n  }\n}\n\nfunction checkEvent (exp, text, errors) {\n  var keywordMatch = exp.replace(stripStringRE, '').match(unaryOperatorsRE);\n  if (keywordMatch) {\n    errors.push(\n      \"avoid using JavaScript unary operator as property name: \" +\n      \"\\\"\" + (keywordMatch[0]) + \"\\\" in expression \" + (text.trim())\n    );\n  }\n  checkExpression(exp, text, errors);\n}\n\nfunction checkFor (node, text, errors) {\n  checkExpression(node.for || '', text, errors);\n  checkIdentifier(node.alias, 'v-for alias', text, errors);\n  checkIdentifier(node.iterator1, 'v-for iterator', text, errors);\n  checkIdentifier(node.iterator2, 'v-for iterator', text, errors);\n}\n\nfunction checkIdentifier (ident, type, text, errors) {\n  if (typeof ident === 'string' && !identRE.test(ident)) {\n    errors.push((\"invalid \" + type + \" \\\"\" + ident + \"\\\" in expression: \" + (text.trim())));\n  }\n}\n\nfunction checkExpression (exp, text, errors) {\n  try {\n    new Function((\"return \" + exp));\n  } catch (e) {\n    var keywordMatch = exp.replace(stripStringRE, '').match(prohibitedKeywordRE);\n    if (keywordMatch) {\n      errors.push(\n        \"avoid using JavaScript keyword as property name: \" +\n        \"\\\"\" + (keywordMatch[0]) + \"\\\" in expression \" + (text.trim())\n      );\n    } else {\n      errors.push((\"invalid expression: \" + (text.trim())));\n    }\n  }\n}\n\n/*  */\n\nfunction baseCompile (\n  template,\n  options\n) {\n  var ast = parse(template.trim(), options);\n  optimize(ast, options);\n  var code = generate(ast, options);\n  return {\n    ast: ast,\n    render: code.render,\n    staticRenderFns: code.staticRenderFns\n  }\n}\n\nfunction makeFunction (code, errors) {\n  try {\n    return new Function(code)\n  } catch (err) {\n    errors.push({ err: err, code: code });\n    return noop\n  }\n}\n\nfunction createCompiler (baseOptions) {\n  var functionCompileCache = Object.create(null);\n\n  function compile (\n    template,\n    options\n  ) {\n    var finalOptions = Object.create(baseOptions);\n    var errors = [];\n    var tips = [];\n    finalOptions.warn = function (msg, tip$$1) {\n      (tip$$1 ? tips : errors).push(msg);\n    };\n\n    if (options) {\n      // merge custom modules\n      if (options.modules) {\n        finalOptions.modules = (baseOptions.modules || []).concat(options.modules);\n      }\n      // merge custom directives\n      if (options.directives) {\n        finalOptions.directives = extend(\n          Object.create(baseOptions.directives),\n          options.directives\n        );\n      }\n      // copy other options\n      for (var key in options) {\n        if (key !== 'modules' && key !== 'directives') {\n          finalOptions[key] = options[key];\n        }\n      }\n    }\n\n    var compiled = baseCompile(template, finalOptions);\n    {\n      errors.push.apply(errors, detectErrors(compiled.ast));\n    }\n    compiled.errors = errors;\n    compiled.tips = tips;\n    return compiled\n  }\n\n  function compileToFunctions (\n    template,\n    options,\n    vm\n  ) {\n    options = options || {};\n\n    /* istanbul ignore if */\n    {\n      // detect possible CSP restriction\n      try {\n        new Function('return 1');\n      } catch (e) {\n        if (e.toString().match(/unsafe-eval|CSP/)) {\n          warn(\n            'It seems you are using the standalone build of Vue.js in an ' +\n            'environment with Content Security Policy that prohibits unsafe-eval. ' +\n            'The template compiler cannot work in this environment. Consider ' +\n            'relaxing the policy to allow unsafe-eval or pre-compiling your ' +\n            'templates into render functions.'\n          );\n        }\n      }\n    }\n\n    // check cache\n    var key = options.delimiters\n      ? String(options.delimiters) + template\n      : template;\n    if (functionCompileCache[key]) {\n      return functionCompileCache[key]\n    }\n\n    // compile\n    var compiled = compile(template, options);\n\n    // check compilation errors/tips\n    {\n      if (compiled.errors && compiled.errors.length) {\n        warn(\n          \"Error compiling template:\\n\\n\" + template + \"\\n\\n\" +\n          compiled.errors.map(function (e) { return (\"- \" + e); }).join('\\n') + '\\n',\n          vm\n        );\n      }\n      if (compiled.tips && compiled.tips.length) {\n        compiled.tips.forEach(function (msg) { return tip(msg, vm); });\n      }\n    }\n\n    // turn code into functions\n    var res = {};\n    var fnGenErrors = [];\n    res.render = makeFunction(compiled.render, fnGenErrors);\n    var l = compiled.staticRenderFns.length;\n    res.staticRenderFns = new Array(l);\n    for (var i = 0; i < l; i++) {\n      res.staticRenderFns[i] = makeFunction(compiled.staticRenderFns[i], fnGenErrors);\n    }\n\n    // check function generation errors.\n    // this should only happen if there is a bug in the compiler itself.\n    // mostly for codegen development use\n    /* istanbul ignore if */\n    {\n      if ((!compiled.errors || !compiled.errors.length) && fnGenErrors.length) {\n        warn(\n          \"Failed to generate render function:\\n\\n\" +\n          fnGenErrors.map(function (ref) {\n            var err = ref.err;\n            var code = ref.code;\n\n            return ((err.toString()) + \" in\\n\\n\" + code + \"\\n\");\n        }).join('\\n'),\n          vm\n        );\n      }\n    }\n\n    return (functionCompileCache[key] = res)\n  }\n\n  return {\n    compile: compile,\n    compileToFunctions: compileToFunctions\n  }\n}\n\n/*  */\n\nfunction transformNode (el, options) {\n  var warn = options.warn || baseWarn;\n  var staticClass = getAndRemoveAttr(el, 'class');\n  if (\"development\" !== 'production' && staticClass) {\n    var expression = parseText(staticClass, options.delimiters);\n    if (expression) {\n      warn(\n        \"class=\\\"\" + staticClass + \"\\\": \" +\n        'Interpolation inside attributes has been removed. ' +\n        'Use v-bind or the colon shorthand instead. For example, ' +\n        'instead of <div class=\"{{ val }}\">, use <div :class=\"val\">.'\n      );\n    }\n  }\n  if (staticClass) {\n    el.staticClass = JSON.stringify(staticClass);\n  }\n  var classBinding = getBindingAttr(el, 'class', false /* getStatic */);\n  if (classBinding) {\n    el.classBinding = classBinding;\n  }\n}\n\nfunction genData$1 (el) {\n  var data = '';\n  if (el.staticClass) {\n    data += \"staticClass:\" + (el.staticClass) + \",\";\n  }\n  if (el.classBinding) {\n    data += \"class:\" + (el.classBinding) + \",\";\n  }\n  return data\n}\n\nvar klass$1 = {\n  staticKeys: ['staticClass'],\n  transformNode: transformNode,\n  genData: genData$1\n};\n\n/*  */\n\nfunction transformNode$1 (el, options) {\n  var warn = options.warn || baseWarn;\n  var staticStyle = getAndRemoveAttr(el, 'style');\n  if (staticStyle) {\n    /* istanbul ignore if */\n    {\n      var expression = parseText(staticStyle, options.delimiters);\n      if (expression) {\n        warn(\n          \"style=\\\"\" + staticStyle + \"\\\": \" +\n          'Interpolation inside attributes has been removed. ' +\n          'Use v-bind or the colon shorthand instead. For example, ' +\n          'instead of <div style=\"{{ val }}\">, use <div :style=\"val\">.'\n        );\n      }\n    }\n    el.staticStyle = JSON.stringify(parseStyleText(staticStyle));\n  }\n\n  var styleBinding = getBindingAttr(el, 'style', false /* getStatic */);\n  if (styleBinding) {\n    el.styleBinding = styleBinding;\n  }\n}\n\nfunction genData$2 (el) {\n  var data = '';\n  if (el.staticStyle) {\n    data += \"staticStyle:\" + (el.staticStyle) + \",\";\n  }\n  if (el.styleBinding) {\n    data += \"style:(\" + (el.styleBinding) + \"),\";\n  }\n  return data\n}\n\nvar style$1 = {\n  staticKeys: ['staticStyle'],\n  transformNode: transformNode$1,\n  genData: genData$2\n};\n\nvar modules$1 = [\n  klass$1,\n  style$1\n];\n\n/*  */\n\nfunction text (el, dir) {\n  if (dir.value) {\n    addProp(el, 'textContent', (\"_s(\" + (dir.value) + \")\"));\n  }\n}\n\n/*  */\n\nfunction html (el, dir) {\n  if (dir.value) {\n    addProp(el, 'innerHTML', (\"_s(\" + (dir.value) + \")\"));\n  }\n}\n\nvar directives$1 = {\n  model: model,\n  text: text,\n  html: html\n};\n\n/*  */\n\nvar baseOptions = {\n  expectHTML: true,\n  modules: modules$1,\n  directives: directives$1,\n  isPreTag: isPreTag,\n  isUnaryTag: isUnaryTag,\n  mustUseProp: mustUseProp,\n  canBeLeftOpenTag: canBeLeftOpenTag,\n  isReservedTag: isReservedTag,\n  getTagNamespace: getTagNamespace,\n  staticKeys: genStaticKeys(modules$1)\n};\n\nvar ref$1 = createCompiler(baseOptions);\nvar compileToFunctions = ref$1.compileToFunctions;\n\n/*  */\n\nvar idToTemplate = cached(function (id) {\n  var el = query(id);\n  return el && el.innerHTML\n});\n\nvar mount = Vue$3.prototype.$mount;\nVue$3.prototype.$mount = function (\n  el,\n  hydrating\n) {\n  el = el && query(el);\n\n  /* istanbul ignore if */\n  if (el === document.body || el === document.documentElement) {\n    \"development\" !== 'production' && warn(\n      \"Do not mount Vue to <html> or <body> - mount to normal elements instead.\"\n    );\n    return this\n  }\n\n  var options = this.$options;\n  // resolve template/el and convert to render function\n  if (!options.render) {\n    var template = options.template;\n    if (template) {\n      if (typeof template === 'string') {\n        if (template.charAt(0) === '#') {\n          template = idToTemplate(template);\n          /* istanbul ignore if */\n          if (\"development\" !== 'production' && !template) {\n            warn(\n              (\"Template element not found or is empty: \" + (options.template)),\n              this\n            );\n          }\n        }\n      } else if (template.nodeType) {\n        template = template.innerHTML;\n      } else {\n        {\n          warn('invalid template option:' + template, this);\n        }\n        return this\n      }\n    } else if (el) {\n      template = getOuterHTML(el);\n    }\n    if (template) {\n      /* istanbul ignore if */\n      if (\"development\" !== 'production' && config.performance && mark) {\n        mark('compile');\n      }\n\n      var ref = compileToFunctions(template, {\n        shouldDecodeNewlines: shouldDecodeNewlines,\n        delimiters: options.delimiters\n      }, this);\n      var render = ref.render;\n      var staticRenderFns = ref.staticRenderFns;\n      options.render = render;\n      options.staticRenderFns = staticRenderFns;\n\n      /* istanbul ignore if */\n      if (\"development\" !== 'production' && config.performance && mark) {\n        mark('compile end');\n        measure(((this._name) + \" compile\"), 'compile', 'compile end');\n      }\n    }\n  }\n  return mount.call(this, el, hydrating)\n};\n\n/**\n * Get outerHTML of elements, taking care\n * of SVG elements in IE as well.\n */\nfunction getOuterHTML (el) {\n  if (el.outerHTML) {\n    return el.outerHTML\n  } else {\n    var container = document.createElement('div');\n    container.appendChild(el.cloneNode(true));\n    return container.innerHTML\n  }\n}\n\nVue$3.compile = compileToFunctions;\n\nreturn Vue$3;\n\n})));\n"
  },
  {
    "path": "static/vuejs/vue.runtime.common.js",
    "content": "/*!\n * Vue.js v2.2.6\n * (c) 2014-2017 Evan You\n * Released under the MIT License.\n */\n'use strict';\n\n/*  */\n\n/**\n * Convert a value to a string that is actually rendered.\n */\nfunction _toString (val) {\n  return val == null\n    ? ''\n    : typeof val === 'object'\n      ? JSON.stringify(val, null, 2)\n      : String(val)\n}\n\n/**\n * Convert a input value to a number for persistence.\n * If the conversion fails, return original string.\n */\nfunction toNumber (val) {\n  var n = parseFloat(val);\n  return isNaN(n) ? val : n\n}\n\n/**\n * Make a map and return a function for checking if a key\n * is in that map.\n */\nfunction makeMap (\n  str,\n  expectsLowerCase\n) {\n  var map = Object.create(null);\n  var list = str.split(',');\n  for (var i = 0; i < list.length; i++) {\n    map[list[i]] = true;\n  }\n  return expectsLowerCase\n    ? function (val) { return map[val.toLowerCase()]; }\n    : function (val) { return map[val]; }\n}\n\n/**\n * Check if a tag is a built-in tag.\n */\nvar isBuiltInTag = makeMap('slot,component', true);\n\n/**\n * Remove an item from an array\n */\nfunction remove (arr, item) {\n  if (arr.length) {\n    var index = arr.indexOf(item);\n    if (index > -1) {\n      return arr.splice(index, 1)\n    }\n  }\n}\n\n/**\n * Check whether the object has the property.\n */\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nfunction hasOwn (obj, key) {\n  return hasOwnProperty.call(obj, key)\n}\n\n/**\n * Check if value is primitive\n */\nfunction isPrimitive (value) {\n  return typeof value === 'string' || typeof value === 'number'\n}\n\n/**\n * Create a cached version of a pure function.\n */\nfunction cached (fn) {\n  var cache = Object.create(null);\n  return (function cachedFn (str) {\n    var hit = cache[str];\n    return hit || (cache[str] = fn(str))\n  })\n}\n\n/**\n * Camelize a hyphen-delimited string.\n */\nvar camelizeRE = /-(\\w)/g;\nvar camelize = cached(function (str) {\n  return str.replace(camelizeRE, function (_, c) { return c ? c.toUpperCase() : ''; })\n});\n\n/**\n * Capitalize a string.\n */\nvar capitalize = cached(function (str) {\n  return str.charAt(0).toUpperCase() + str.slice(1)\n});\n\n/**\n * Hyphenate a camelCase string.\n */\nvar hyphenateRE = /([^-])([A-Z])/g;\nvar hyphenate = cached(function (str) {\n  return str\n    .replace(hyphenateRE, '$1-$2')\n    .replace(hyphenateRE, '$1-$2')\n    .toLowerCase()\n});\n\n/**\n * Simple bind, faster than native\n */\nfunction bind (fn, ctx) {\n  function boundFn (a) {\n    var l = arguments.length;\n    return l\n      ? l > 1\n        ? fn.apply(ctx, arguments)\n        : fn.call(ctx, a)\n      : fn.call(ctx)\n  }\n  // record original fn length\n  boundFn._length = fn.length;\n  return boundFn\n}\n\n/**\n * Convert an Array-like object to a real Array.\n */\nfunction toArray (list, start) {\n  start = start || 0;\n  var i = list.length - start;\n  var ret = new Array(i);\n  while (i--) {\n    ret[i] = list[i + start];\n  }\n  return ret\n}\n\n/**\n * Mix properties into target object.\n */\nfunction extend (to, _from) {\n  for (var key in _from) {\n    to[key] = _from[key];\n  }\n  return to\n}\n\n/**\n * Quick object check - this is primarily used to tell\n * Objects from primitive values when we know the value\n * is a JSON-compliant type.\n */\nfunction isObject (obj) {\n  return obj !== null && typeof obj === 'object'\n}\n\n/**\n * Strict object type check. Only returns true\n * for plain JavaScript objects.\n */\nvar toString = Object.prototype.toString;\nvar OBJECT_STRING = '[object Object]';\nfunction isPlainObject (obj) {\n  return toString.call(obj) === OBJECT_STRING\n}\n\n/**\n * Merge an Array of Objects into a single Object.\n */\nfunction toObject (arr) {\n  var res = {};\n  for (var i = 0; i < arr.length; i++) {\n    if (arr[i]) {\n      extend(res, arr[i]);\n    }\n  }\n  return res\n}\n\n/**\n * Perform no operation.\n */\nfunction noop () {}\n\n/**\n * Always return false.\n */\nvar no = function () { return false; };\n\n/**\n * Return same value\n */\nvar identity = function (_) { return _; };\n\n/**\n * Generate a static keys string from compiler modules.\n */\n\n\n/**\n * Check if two values are loosely equal - that is,\n * if they are plain objects, do they have the same shape?\n */\nfunction looseEqual (a, b) {\n  var isObjectA = isObject(a);\n  var isObjectB = isObject(b);\n  if (isObjectA && isObjectB) {\n    try {\n      return JSON.stringify(a) === JSON.stringify(b)\n    } catch (e) {\n      // possible circular reference\n      return a === b\n    }\n  } else if (!isObjectA && !isObjectB) {\n    return String(a) === String(b)\n  } else {\n    return false\n  }\n}\n\nfunction looseIndexOf (arr, val) {\n  for (var i = 0; i < arr.length; i++) {\n    if (looseEqual(arr[i], val)) { return i }\n  }\n  return -1\n}\n\n/**\n * Ensure a function is called only once.\n */\nfunction once (fn) {\n  var called = false;\n  return function () {\n    if (!called) {\n      called = true;\n      fn();\n    }\n  }\n}\n\n/*  */\n\nvar config = {\n  /**\n   * Option merge strategies (used in core/util/options)\n   */\n  optionMergeStrategies: Object.create(null),\n\n  /**\n   * Whether to suppress warnings.\n   */\n  silent: false,\n\n  /**\n   * Show production mode tip message on boot?\n   */\n  productionTip: process.env.NODE_ENV !== 'production',\n\n  /**\n   * Whether to enable devtools\n   */\n  devtools: process.env.NODE_ENV !== 'production',\n\n  /**\n   * Whether to record perf\n   */\n  performance: false,\n\n  /**\n   * Error handler for watcher errors\n   */\n  errorHandler: null,\n\n  /**\n   * Ignore certain custom elements\n   */\n  ignoredElements: [],\n\n  /**\n   * Custom user key aliases for v-on\n   */\n  keyCodes: Object.create(null),\n\n  /**\n   * Check if a tag is reserved so that it cannot be registered as a\n   * component. This is platform-dependent and may be overwritten.\n   */\n  isReservedTag: no,\n\n  /**\n   * Check if a tag is an unknown element.\n   * Platform-dependent.\n   */\n  isUnknownElement: no,\n\n  /**\n   * Get the namespace of an element\n   */\n  getTagNamespace: noop,\n\n  /**\n   * Parse the real tag name for the specific platform.\n   */\n  parsePlatformTagName: identity,\n\n  /**\n   * Check if an attribute must be bound using property, e.g. value\n   * Platform-dependent.\n   */\n  mustUseProp: no,\n\n  /**\n   * List of asset types that a component can own.\n   */\n  _assetTypes: [\n    'component',\n    'directive',\n    'filter'\n  ],\n\n  /**\n   * List of lifecycle hooks.\n   */\n  _lifecycleHooks: [\n    'beforeCreate',\n    'created',\n    'beforeMount',\n    'mounted',\n    'beforeUpdate',\n    'updated',\n    'beforeDestroy',\n    'destroyed',\n    'activated',\n    'deactivated'\n  ],\n\n  /**\n   * Max circular updates allowed in a scheduler flush cycle.\n   */\n  _maxUpdateCount: 100\n};\n\n/*  */\n\nvar emptyObject = Object.freeze({});\n\n/**\n * Check if a string starts with $ or _\n */\nfunction isReserved (str) {\n  var c = (str + '').charCodeAt(0);\n  return c === 0x24 || c === 0x5F\n}\n\n/**\n * Define a property.\n */\nfunction def (obj, key, val, enumerable) {\n  Object.defineProperty(obj, key, {\n    value: val,\n    enumerable: !!enumerable,\n    writable: true,\n    configurable: true\n  });\n}\n\n/**\n * Parse simple path.\n */\nvar bailRE = /[^\\w.$]/;\nfunction parsePath (path) {\n  if (bailRE.test(path)) {\n    return\n  }\n  var segments = path.split('.');\n  return function (obj) {\n    for (var i = 0; i < segments.length; i++) {\n      if (!obj) { return }\n      obj = obj[segments[i]];\n    }\n    return obj\n  }\n}\n\n/*  */\n/* globals MutationObserver */\n\n// can we use __proto__?\nvar hasProto = '__proto__' in {};\n\n// Browser environment sniffing\nvar inBrowser = typeof window !== 'undefined';\nvar UA = inBrowser && window.navigator.userAgent.toLowerCase();\nvar isIE = UA && /msie|trident/.test(UA);\nvar isIE9 = UA && UA.indexOf('msie 9.0') > 0;\nvar isEdge = UA && UA.indexOf('edge/') > 0;\nvar isAndroid = UA && UA.indexOf('android') > 0;\nvar isIOS = UA && /iphone|ipad|ipod|ios/.test(UA);\nvar isChrome = UA && /chrome\\/\\d+/.test(UA) && !isEdge;\n\n// this needs to be lazy-evaled because vue may be required before\n// vue-server-renderer can set VUE_ENV\nvar _isServer;\nvar isServerRendering = function () {\n  if (_isServer === undefined) {\n    /* istanbul ignore if */\n    if (!inBrowser && typeof global !== 'undefined') {\n      // detect presence of vue-server-renderer and avoid\n      // Webpack shimming the process\n      _isServer = global['process'].env.VUE_ENV === 'server';\n    } else {\n      _isServer = false;\n    }\n  }\n  return _isServer\n};\n\n// detect devtools\nvar devtools = inBrowser && window.__VUE_DEVTOOLS_GLOBAL_HOOK__;\n\n/* istanbul ignore next */\nfunction isNative (Ctor) {\n  return /native code/.test(Ctor.toString())\n}\n\nvar hasSymbol =\n  typeof Symbol !== 'undefined' && isNative(Symbol) &&\n  typeof Reflect !== 'undefined' && isNative(Reflect.ownKeys);\n\n/**\n * Defer a task to execute it asynchronously.\n */\nvar nextTick = (function () {\n  var callbacks = [];\n  var pending = false;\n  var timerFunc;\n\n  function nextTickHandler () {\n    pending = false;\n    var copies = callbacks.slice(0);\n    callbacks.length = 0;\n    for (var i = 0; i < copies.length; i++) {\n      copies[i]();\n    }\n  }\n\n  // the nextTick behavior leverages the microtask queue, which can be accessed\n  // via either native Promise.then or MutationObserver.\n  // MutationObserver has wider support, however it is seriously bugged in\n  // UIWebView in iOS >= 9.3.3 when triggered in touch event handlers. It\n  // completely stops working after triggering a few times... so, if native\n  // Promise is available, we will use it:\n  /* istanbul ignore if */\n  if (typeof Promise !== 'undefined' && isNative(Promise)) {\n    var p = Promise.resolve();\n    var logError = function (err) { console.error(err); };\n    timerFunc = function () {\n      p.then(nextTickHandler).catch(logError);\n      // in problematic UIWebViews, Promise.then doesn't completely break, but\n      // it can get stuck in a weird state where callbacks are pushed into the\n      // microtask queue but the queue isn't being flushed, until the browser\n      // needs to do some other work, e.g. handle a timer. Therefore we can\n      // \"force\" the microtask queue to be flushed by adding an empty timer.\n      if (isIOS) { setTimeout(noop); }\n    };\n  } else if (typeof MutationObserver !== 'undefined' && (\n    isNative(MutationObserver) ||\n    // PhantomJS and iOS 7.x\n    MutationObserver.toString() === '[object MutationObserverConstructor]'\n  )) {\n    // use MutationObserver where native Promise is not available,\n    // e.g. PhantomJS IE11, iOS7, Android 4.4\n    var counter = 1;\n    var observer = new MutationObserver(nextTickHandler);\n    var textNode = document.createTextNode(String(counter));\n    observer.observe(textNode, {\n      characterData: true\n    });\n    timerFunc = function () {\n      counter = (counter + 1) % 2;\n      textNode.data = String(counter);\n    };\n  } else {\n    // fallback to setTimeout\n    /* istanbul ignore next */\n    timerFunc = function () {\n      setTimeout(nextTickHandler, 0);\n    };\n  }\n\n  return function queueNextTick (cb, ctx) {\n    var _resolve;\n    callbacks.push(function () {\n      if (cb) { cb.call(ctx); }\n      if (_resolve) { _resolve(ctx); }\n    });\n    if (!pending) {\n      pending = true;\n      timerFunc();\n    }\n    if (!cb && typeof Promise !== 'undefined') {\n      return new Promise(function (resolve) {\n        _resolve = resolve;\n      })\n    }\n  }\n})();\n\nvar _Set;\n/* istanbul ignore if */\nif (typeof Set !== 'undefined' && isNative(Set)) {\n  // use native Set when available.\n  _Set = Set;\n} else {\n  // a non-standard Set polyfill that only works with primitive keys.\n  _Set = (function () {\n    function Set () {\n      this.set = Object.create(null);\n    }\n    Set.prototype.has = function has (key) {\n      return this.set[key] === true\n    };\n    Set.prototype.add = function add (key) {\n      this.set[key] = true;\n    };\n    Set.prototype.clear = function clear () {\n      this.set = Object.create(null);\n    };\n\n    return Set;\n  }());\n}\n\nvar warn = noop;\nvar tip = noop;\nvar formatComponentName;\n\nif (process.env.NODE_ENV !== 'production') {\n  var hasConsole = typeof console !== 'undefined';\n  var classifyRE = /(?:^|[-_])(\\w)/g;\n  var classify = function (str) { return str\n    .replace(classifyRE, function (c) { return c.toUpperCase(); })\n    .replace(/[-_]/g, ''); };\n\n  warn = function (msg, vm) {\n    if (hasConsole && (!config.silent)) {\n      console.error(\"[Vue warn]: \" + msg + \" \" + (\n        vm ? formatLocation(formatComponentName(vm)) : ''\n      ));\n    }\n  };\n\n  tip = function (msg, vm) {\n    if (hasConsole && (!config.silent)) {\n      console.warn(\"[Vue tip]: \" + msg + \" \" + (\n        vm ? formatLocation(formatComponentName(vm)) : ''\n      ));\n    }\n  };\n\n  formatComponentName = function (vm, includeFile) {\n    if (vm.$root === vm) {\n      return '<Root>'\n    }\n    var name = typeof vm === 'string'\n      ? vm\n      : typeof vm === 'function' && vm.options\n        ? vm.options.name\n        : vm._isVue\n          ? vm.$options.name || vm.$options._componentTag\n          : vm.name;\n\n    var file = vm._isVue && vm.$options.__file;\n    if (!name && file) {\n      var match = file.match(/([^/\\\\]+)\\.vue$/);\n      name = match && match[1];\n    }\n\n    return (\n      (name ? (\"<\" + (classify(name)) + \">\") : \"<Anonymous>\") +\n      (file && includeFile !== false ? (\" at \" + file) : '')\n    )\n  };\n\n  var formatLocation = function (str) {\n    if (str === \"<Anonymous>\") {\n      str += \" - use the \\\"name\\\" option for better debugging messages.\";\n    }\n    return (\"\\n(found in \" + str + \")\")\n  };\n}\n\n/*  */\n\n\nvar uid$1 = 0;\n\n/**\n * A dep is an observable that can have multiple\n * directives subscribing to it.\n */\nvar Dep = function Dep () {\n  this.id = uid$1++;\n  this.subs = [];\n};\n\nDep.prototype.addSub = function addSub (sub) {\n  this.subs.push(sub);\n};\n\nDep.prototype.removeSub = function removeSub (sub) {\n  remove(this.subs, sub);\n};\n\nDep.prototype.depend = function depend () {\n  if (Dep.target) {\n    Dep.target.addDep(this);\n  }\n};\n\nDep.prototype.notify = function notify () {\n  // stabilize the subscriber list first\n  var subs = this.subs.slice();\n  for (var i = 0, l = subs.length; i < l; i++) {\n    subs[i].update();\n  }\n};\n\n// the current target watcher being evaluated.\n// this is globally unique because there could be only one\n// watcher being evaluated at any time.\nDep.target = null;\nvar targetStack = [];\n\nfunction pushTarget (_target) {\n  if (Dep.target) { targetStack.push(Dep.target); }\n  Dep.target = _target;\n}\n\nfunction popTarget () {\n  Dep.target = targetStack.pop();\n}\n\n/*\n * not type checking this file because flow doesn't play well with\n * dynamically accessing methods on Array prototype\n */\n\nvar arrayProto = Array.prototype;\nvar arrayMethods = Object.create(arrayProto);[\n  'push',\n  'pop',\n  'shift',\n  'unshift',\n  'splice',\n  'sort',\n  'reverse'\n]\n.forEach(function (method) {\n  // cache original method\n  var original = arrayProto[method];\n  def(arrayMethods, method, function mutator () {\n    var arguments$1 = arguments;\n\n    // avoid leaking arguments:\n    // http://jsperf.com/closure-with-arguments\n    var i = arguments.length;\n    var args = new Array(i);\n    while (i--) {\n      args[i] = arguments$1[i];\n    }\n    var result = original.apply(this, args);\n    var ob = this.__ob__;\n    var inserted;\n    switch (method) {\n      case 'push':\n        inserted = args;\n        break\n      case 'unshift':\n        inserted = args;\n        break\n      case 'splice':\n        inserted = args.slice(2);\n        break\n    }\n    if (inserted) { ob.observeArray(inserted); }\n    // notify change\n    ob.dep.notify();\n    return result\n  });\n});\n\n/*  */\n\nvar arrayKeys = Object.getOwnPropertyNames(arrayMethods);\n\n/**\n * By default, when a reactive property is set, the new value is\n * also converted to become reactive. However when passing down props,\n * we don't want to force conversion because the value may be a nested value\n * under a frozen data structure. Converting it would defeat the optimization.\n */\nvar observerState = {\n  shouldConvert: true,\n  isSettingProps: false\n};\n\n/**\n * Observer class that are attached to each observed\n * object. Once attached, the observer converts target\n * object's property keys into getter/setters that\n * collect dependencies and dispatches updates.\n */\nvar Observer = function Observer (value) {\n  this.value = value;\n  this.dep = new Dep();\n  this.vmCount = 0;\n  def(value, '__ob__', this);\n  if (Array.isArray(value)) {\n    var augment = hasProto\n      ? protoAugment\n      : copyAugment;\n    augment(value, arrayMethods, arrayKeys);\n    this.observeArray(value);\n  } else {\n    this.walk(value);\n  }\n};\n\n/**\n * Walk through each property and convert them into\n * getter/setters. This method should only be called when\n * value type is Object.\n */\nObserver.prototype.walk = function walk (obj) {\n  var keys = Object.keys(obj);\n  for (var i = 0; i < keys.length; i++) {\n    defineReactive$$1(obj, keys[i], obj[keys[i]]);\n  }\n};\n\n/**\n * Observe a list of Array items.\n */\nObserver.prototype.observeArray = function observeArray (items) {\n  for (var i = 0, l = items.length; i < l; i++) {\n    observe(items[i]);\n  }\n};\n\n// helpers\n\n/**\n * Augment an target Object or Array by intercepting\n * the prototype chain using __proto__\n */\nfunction protoAugment (target, src) {\n  /* eslint-disable no-proto */\n  target.__proto__ = src;\n  /* eslint-enable no-proto */\n}\n\n/**\n * Augment an target Object or Array by defining\n * hidden properties.\n */\n/* istanbul ignore next */\nfunction copyAugment (target, src, keys) {\n  for (var i = 0, l = keys.length; i < l; i++) {\n    var key = keys[i];\n    def(target, key, src[key]);\n  }\n}\n\n/**\n * Attempt to create an observer instance for a value,\n * returns the new observer if successfully observed,\n * or the existing observer if the value already has one.\n */\nfunction observe (value, asRootData) {\n  if (!isObject(value)) {\n    return\n  }\n  var ob;\n  if (hasOwn(value, '__ob__') && value.__ob__ instanceof Observer) {\n    ob = value.__ob__;\n  } else if (\n    observerState.shouldConvert &&\n    !isServerRendering() &&\n    (Array.isArray(value) || isPlainObject(value)) &&\n    Object.isExtensible(value) &&\n    !value._isVue\n  ) {\n    ob = new Observer(value);\n  }\n  if (asRootData && ob) {\n    ob.vmCount++;\n  }\n  return ob\n}\n\n/**\n * Define a reactive property on an Object.\n */\nfunction defineReactive$$1 (\n  obj,\n  key,\n  val,\n  customSetter\n) {\n  var dep = new Dep();\n\n  var property = Object.getOwnPropertyDescriptor(obj, key);\n  if (property && property.configurable === false) {\n    return\n  }\n\n  // cater for pre-defined getter/setters\n  var getter = property && property.get;\n  var setter = property && property.set;\n\n  var childOb = observe(val);\n  Object.defineProperty(obj, key, {\n    enumerable: true,\n    configurable: true,\n    get: function reactiveGetter () {\n      var value = getter ? getter.call(obj) : val;\n      if (Dep.target) {\n        dep.depend();\n        if (childOb) {\n          childOb.dep.depend();\n        }\n        if (Array.isArray(value)) {\n          dependArray(value);\n        }\n      }\n      return value\n    },\n    set: function reactiveSetter (newVal) {\n      var value = getter ? getter.call(obj) : val;\n      /* eslint-disable no-self-compare */\n      if (newVal === value || (newVal !== newVal && value !== value)) {\n        return\n      }\n      /* eslint-enable no-self-compare */\n      if (process.env.NODE_ENV !== 'production' && customSetter) {\n        customSetter();\n      }\n      if (setter) {\n        setter.call(obj, newVal);\n      } else {\n        val = newVal;\n      }\n      childOb = observe(newVal);\n      dep.notify();\n    }\n  });\n}\n\n/**\n * Set a property on an object. Adds the new property and\n * triggers change notification if the property doesn't\n * already exist.\n */\nfunction set (target, key, val) {\n  if (Array.isArray(target) && typeof key === 'number') {\n    target.length = Math.max(target.length, key);\n    target.splice(key, 1, val);\n    return val\n  }\n  if (hasOwn(target, key)) {\n    target[key] = val;\n    return val\n  }\n  var ob = (target ).__ob__;\n  if (target._isVue || (ob && ob.vmCount)) {\n    process.env.NODE_ENV !== 'production' && warn(\n      'Avoid adding reactive properties to a Vue instance or its root $data ' +\n      'at runtime - declare it upfront in the data option.'\n    );\n    return val\n  }\n  if (!ob) {\n    target[key] = val;\n    return val\n  }\n  defineReactive$$1(ob.value, key, val);\n  ob.dep.notify();\n  return val\n}\n\n/**\n * Delete a property and trigger change if necessary.\n */\nfunction del (target, key) {\n  if (Array.isArray(target) && typeof key === 'number') {\n    target.splice(key, 1);\n    return\n  }\n  var ob = (target ).__ob__;\n  if (target._isVue || (ob && ob.vmCount)) {\n    process.env.NODE_ENV !== 'production' && warn(\n      'Avoid deleting properties on a Vue instance or its root $data ' +\n      '- just set it to null.'\n    );\n    return\n  }\n  if (!hasOwn(target, key)) {\n    return\n  }\n  delete target[key];\n  if (!ob) {\n    return\n  }\n  ob.dep.notify();\n}\n\n/**\n * Collect dependencies on array elements when the array is touched, since\n * we cannot intercept array element access like property getters.\n */\nfunction dependArray (value) {\n  for (var e = (void 0), i = 0, l = value.length; i < l; i++) {\n    e = value[i];\n    e && e.__ob__ && e.__ob__.dep.depend();\n    if (Array.isArray(e)) {\n      dependArray(e);\n    }\n  }\n}\n\n/*  */\n\n/**\n * Option overwriting strategies are functions that handle\n * how to merge a parent option value and a child option\n * value into the final value.\n */\nvar strats = config.optionMergeStrategies;\n\n/**\n * Options with restrictions\n */\nif (process.env.NODE_ENV !== 'production') {\n  strats.el = strats.propsData = function (parent, child, vm, key) {\n    if (!vm) {\n      warn(\n        \"option \\\"\" + key + \"\\\" can only be used during instance \" +\n        'creation with the `new` keyword.'\n      );\n    }\n    return defaultStrat(parent, child)\n  };\n}\n\n/**\n * Helper that recursively merges two data objects together.\n */\nfunction mergeData (to, from) {\n  if (!from) { return to }\n  var key, toVal, fromVal;\n  var keys = Object.keys(from);\n  for (var i = 0; i < keys.length; i++) {\n    key = keys[i];\n    toVal = to[key];\n    fromVal = from[key];\n    if (!hasOwn(to, key)) {\n      set(to, key, fromVal);\n    } else if (isPlainObject(toVal) && isPlainObject(fromVal)) {\n      mergeData(toVal, fromVal);\n    }\n  }\n  return to\n}\n\n/**\n * Data\n */\nstrats.data = function (\n  parentVal,\n  childVal,\n  vm\n) {\n  if (!vm) {\n    // in a Vue.extend merge, both should be functions\n    if (!childVal) {\n      return parentVal\n    }\n    if (typeof childVal !== 'function') {\n      process.env.NODE_ENV !== 'production' && warn(\n        'The \"data\" option should be a function ' +\n        'that returns a per-instance value in component ' +\n        'definitions.',\n        vm\n      );\n      return parentVal\n    }\n    if (!parentVal) {\n      return childVal\n    }\n    // when parentVal & childVal are both present,\n    // we need to return a function that returns the\n    // merged result of both functions... no need to\n    // check if parentVal is a function here because\n    // it has to be a function to pass previous merges.\n    return function mergedDataFn () {\n      return mergeData(\n        childVal.call(this),\n        parentVal.call(this)\n      )\n    }\n  } else if (parentVal || childVal) {\n    return function mergedInstanceDataFn () {\n      // instance merge\n      var instanceData = typeof childVal === 'function'\n        ? childVal.call(vm)\n        : childVal;\n      var defaultData = typeof parentVal === 'function'\n        ? parentVal.call(vm)\n        : undefined;\n      if (instanceData) {\n        return mergeData(instanceData, defaultData)\n      } else {\n        return defaultData\n      }\n    }\n  }\n};\n\n/**\n * Hooks and props are merged as arrays.\n */\nfunction mergeHook (\n  parentVal,\n  childVal\n) {\n  return childVal\n    ? parentVal\n      ? parentVal.concat(childVal)\n      : Array.isArray(childVal)\n        ? childVal\n        : [childVal]\n    : parentVal\n}\n\nconfig._lifecycleHooks.forEach(function (hook) {\n  strats[hook] = mergeHook;\n});\n\n/**\n * Assets\n *\n * When a vm is present (instance creation), we need to do\n * a three-way merge between constructor options, instance\n * options and parent options.\n */\nfunction mergeAssets (parentVal, childVal) {\n  var res = Object.create(parentVal || null);\n  return childVal\n    ? extend(res, childVal)\n    : res\n}\n\nconfig._assetTypes.forEach(function (type) {\n  strats[type + 's'] = mergeAssets;\n});\n\n/**\n * Watchers.\n *\n * Watchers hashes should not overwrite one\n * another, so we merge them as arrays.\n */\nstrats.watch = function (parentVal, childVal) {\n  /* istanbul ignore if */\n  if (!childVal) { return Object.create(parentVal || null) }\n  if (!parentVal) { return childVal }\n  var ret = {};\n  extend(ret, parentVal);\n  for (var key in childVal) {\n    var parent = ret[key];\n    var child = childVal[key];\n    if (parent && !Array.isArray(parent)) {\n      parent = [parent];\n    }\n    ret[key] = parent\n      ? parent.concat(child)\n      : [child];\n  }\n  return ret\n};\n\n/**\n * Other object hashes.\n */\nstrats.props =\nstrats.methods =\nstrats.computed = function (parentVal, childVal) {\n  if (!childVal) { return Object.create(parentVal || null) }\n  if (!parentVal) { return childVal }\n  var ret = Object.create(null);\n  extend(ret, parentVal);\n  extend(ret, childVal);\n  return ret\n};\n\n/**\n * Default strategy.\n */\nvar defaultStrat = function (parentVal, childVal) {\n  return childVal === undefined\n    ? parentVal\n    : childVal\n};\n\n/**\n * Validate component names\n */\nfunction checkComponents (options) {\n  for (var key in options.components) {\n    var lower = key.toLowerCase();\n    if (isBuiltInTag(lower) || config.isReservedTag(lower)) {\n      warn(\n        'Do not use built-in or reserved HTML elements as component ' +\n        'id: ' + key\n      );\n    }\n  }\n}\n\n/**\n * Ensure all props option syntax are normalized into the\n * Object-based format.\n */\nfunction normalizeProps (options) {\n  var props = options.props;\n  if (!props) { return }\n  var res = {};\n  var i, val, name;\n  if (Array.isArray(props)) {\n    i = props.length;\n    while (i--) {\n      val = props[i];\n      if (typeof val === 'string') {\n        name = camelize(val);\n        res[name] = { type: null };\n      } else if (process.env.NODE_ENV !== 'production') {\n        warn('props must be strings when using array syntax.');\n      }\n    }\n  } else if (isPlainObject(props)) {\n    for (var key in props) {\n      val = props[key];\n      name = camelize(key);\n      res[name] = isPlainObject(val)\n        ? val\n        : { type: val };\n    }\n  }\n  options.props = res;\n}\n\n/**\n * Normalize raw function directives into object format.\n */\nfunction normalizeDirectives (options) {\n  var dirs = options.directives;\n  if (dirs) {\n    for (var key in dirs) {\n      var def = dirs[key];\n      if (typeof def === 'function') {\n        dirs[key] = { bind: def, update: def };\n      }\n    }\n  }\n}\n\n/**\n * Merge two option objects into a new one.\n * Core utility used in both instantiation and inheritance.\n */\nfunction mergeOptions (\n  parent,\n  child,\n  vm\n) {\n  if (process.env.NODE_ENV !== 'production') {\n    checkComponents(child);\n  }\n  normalizeProps(child);\n  normalizeDirectives(child);\n  var extendsFrom = child.extends;\n  if (extendsFrom) {\n    parent = typeof extendsFrom === 'function'\n      ? mergeOptions(parent, extendsFrom.options, vm)\n      : mergeOptions(parent, extendsFrom, vm);\n  }\n  if (child.mixins) {\n    for (var i = 0, l = child.mixins.length; i < l; i++) {\n      var mixin = child.mixins[i];\n      if (mixin.prototype instanceof Vue$2) {\n        mixin = mixin.options;\n      }\n      parent = mergeOptions(parent, mixin, vm);\n    }\n  }\n  var options = {};\n  var key;\n  for (key in parent) {\n    mergeField(key);\n  }\n  for (key in child) {\n    if (!hasOwn(parent, key)) {\n      mergeField(key);\n    }\n  }\n  function mergeField (key) {\n    var strat = strats[key] || defaultStrat;\n    options[key] = strat(parent[key], child[key], vm, key);\n  }\n  return options\n}\n\n/**\n * Resolve an asset.\n * This function is used because child instances need access\n * to assets defined in its ancestor chain.\n */\nfunction resolveAsset (\n  options,\n  type,\n  id,\n  warnMissing\n) {\n  /* istanbul ignore if */\n  if (typeof id !== 'string') {\n    return\n  }\n  var assets = options[type];\n  // check local registration variations first\n  if (hasOwn(assets, id)) { return assets[id] }\n  var camelizedId = camelize(id);\n  if (hasOwn(assets, camelizedId)) { return assets[camelizedId] }\n  var PascalCaseId = capitalize(camelizedId);\n  if (hasOwn(assets, PascalCaseId)) { return assets[PascalCaseId] }\n  // fallback to prototype chain\n  var res = assets[id] || assets[camelizedId] || assets[PascalCaseId];\n  if (process.env.NODE_ENV !== 'production' && warnMissing && !res) {\n    warn(\n      'Failed to resolve ' + type.slice(0, -1) + ': ' + id,\n      options\n    );\n  }\n  return res\n}\n\n/*  */\n\nfunction validateProp (\n  key,\n  propOptions,\n  propsData,\n  vm\n) {\n  var prop = propOptions[key];\n  var absent = !hasOwn(propsData, key);\n  var value = propsData[key];\n  // handle boolean props\n  if (isType(Boolean, prop.type)) {\n    if (absent && !hasOwn(prop, 'default')) {\n      value = false;\n    } else if (!isType(String, prop.type) && (value === '' || value === hyphenate(key))) {\n      value = true;\n    }\n  }\n  // check default value\n  if (value === undefined) {\n    value = getPropDefaultValue(vm, prop, key);\n    // since the default value is a fresh copy,\n    // make sure to observe it.\n    var prevShouldConvert = observerState.shouldConvert;\n    observerState.shouldConvert = true;\n    observe(value);\n    observerState.shouldConvert = prevShouldConvert;\n  }\n  if (process.env.NODE_ENV !== 'production') {\n    assertProp(prop, key, value, vm, absent);\n  }\n  return value\n}\n\n/**\n * Get the default value of a prop.\n */\nfunction getPropDefaultValue (vm, prop, key) {\n  // no default, return undefined\n  if (!hasOwn(prop, 'default')) {\n    return undefined\n  }\n  var def = prop.default;\n  // warn against non-factory defaults for Object & Array\n  if (process.env.NODE_ENV !== 'production' && isObject(def)) {\n    warn(\n      'Invalid default value for prop \"' + key + '\": ' +\n      'Props with type Object/Array must use a factory function ' +\n      'to return the default value.',\n      vm\n    );\n  }\n  // the raw prop value was also undefined from previous render,\n  // return previous default value to avoid unnecessary watcher trigger\n  if (vm && vm.$options.propsData &&\n    vm.$options.propsData[key] === undefined &&\n    vm._props[key] !== undefined) {\n    return vm._props[key]\n  }\n  // call factory function for non-Function types\n  // a value is Function if its prototype is function even across different execution context\n  return typeof def === 'function' && getType(prop.type) !== 'Function'\n    ? def.call(vm)\n    : def\n}\n\n/**\n * Assert whether a prop is valid.\n */\nfunction assertProp (\n  prop,\n  name,\n  value,\n  vm,\n  absent\n) {\n  if (prop.required && absent) {\n    warn(\n      'Missing required prop: \"' + name + '\"',\n      vm\n    );\n    return\n  }\n  if (value == null && !prop.required) {\n    return\n  }\n  var type = prop.type;\n  var valid = !type || type === true;\n  var expectedTypes = [];\n  if (type) {\n    if (!Array.isArray(type)) {\n      type = [type];\n    }\n    for (var i = 0; i < type.length && !valid; i++) {\n      var assertedType = assertType(value, type[i]);\n      expectedTypes.push(assertedType.expectedType || '');\n      valid = assertedType.valid;\n    }\n  }\n  if (!valid) {\n    warn(\n      'Invalid prop: type check failed for prop \"' + name + '\".' +\n      ' Expected ' + expectedTypes.map(capitalize).join(', ') +\n      ', got ' + Object.prototype.toString.call(value).slice(8, -1) + '.',\n      vm\n    );\n    return\n  }\n  var validator = prop.validator;\n  if (validator) {\n    if (!validator(value)) {\n      warn(\n        'Invalid prop: custom validator check failed for prop \"' + name + '\".',\n        vm\n      );\n    }\n  }\n}\n\n/**\n * Assert the type of a value\n */\nfunction assertType (value, type) {\n  var valid;\n  var expectedType = getType(type);\n  if (expectedType === 'String') {\n    valid = typeof value === (expectedType = 'string');\n  } else if (expectedType === 'Number') {\n    valid = typeof value === (expectedType = 'number');\n  } else if (expectedType === 'Boolean') {\n    valid = typeof value === (expectedType = 'boolean');\n  } else if (expectedType === 'Function') {\n    valid = typeof value === (expectedType = 'function');\n  } else if (expectedType === 'Object') {\n    valid = isPlainObject(value);\n  } else if (expectedType === 'Array') {\n    valid = Array.isArray(value);\n  } else {\n    valid = value instanceof type;\n  }\n  return {\n    valid: valid,\n    expectedType: expectedType\n  }\n}\n\n/**\n * Use function string name to check built-in types,\n * because a simple equality check will fail when running\n * across different vms / iframes.\n */\nfunction getType (fn) {\n  var match = fn && fn.toString().match(/^\\s*function (\\w+)/);\n  return match && match[1]\n}\n\nfunction isType (type, fn) {\n  if (!Array.isArray(fn)) {\n    return getType(fn) === getType(type)\n  }\n  for (var i = 0, len = fn.length; i < len; i++) {\n    if (getType(fn[i]) === getType(type)) {\n      return true\n    }\n  }\n  /* istanbul ignore next */\n  return false\n}\n\nfunction handleError (err, vm, info) {\n  if (config.errorHandler) {\n    config.errorHandler.call(null, err, vm, info);\n  } else {\n    if (process.env.NODE_ENV !== 'production') {\n      warn((\"Error in \" + info + \":\"), vm);\n    }\n    /* istanbul ignore else */\n    if (inBrowser && typeof console !== 'undefined') {\n      console.error(err);\n    } else {\n      throw err\n    }\n  }\n}\n\n/* not type checking this file because flow doesn't play well with Proxy */\n\nvar initProxy;\n\nif (process.env.NODE_ENV !== 'production') {\n  var allowedGlobals = makeMap(\n    'Infinity,undefined,NaN,isFinite,isNaN,' +\n    'parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,' +\n    'Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,' +\n    'require' // for Webpack/Browserify\n  );\n\n  var warnNonPresent = function (target, key) {\n    warn(\n      \"Property or method \\\"\" + key + \"\\\" is not defined on the instance but \" +\n      \"referenced during render. Make sure to declare reactive data \" +\n      \"properties in the data option.\",\n      target\n    );\n  };\n\n  var hasProxy =\n    typeof Proxy !== 'undefined' &&\n    Proxy.toString().match(/native code/);\n\n  if (hasProxy) {\n    var isBuiltInModifier = makeMap('stop,prevent,self,ctrl,shift,alt,meta');\n    config.keyCodes = new Proxy(config.keyCodes, {\n      set: function set (target, key, value) {\n        if (isBuiltInModifier(key)) {\n          warn((\"Avoid overwriting built-in modifier in config.keyCodes: .\" + key));\n          return false\n        } else {\n          target[key] = value;\n          return true\n        }\n      }\n    });\n  }\n\n  var hasHandler = {\n    has: function has (target, key) {\n      var has = key in target;\n      var isAllowed = allowedGlobals(key) || key.charAt(0) === '_';\n      if (!has && !isAllowed) {\n        warnNonPresent(target, key);\n      }\n      return has || !isAllowed\n    }\n  };\n\n  var getHandler = {\n    get: function get (target, key) {\n      if (typeof key === 'string' && !(key in target)) {\n        warnNonPresent(target, key);\n      }\n      return target[key]\n    }\n  };\n\n  initProxy = function initProxy (vm) {\n    if (hasProxy) {\n      // determine which proxy handler to use\n      var options = vm.$options;\n      var handlers = options.render && options.render._withStripped\n        ? getHandler\n        : hasHandler;\n      vm._renderProxy = new Proxy(vm, handlers);\n    } else {\n      vm._renderProxy = vm;\n    }\n  };\n}\n\nvar mark;\nvar measure;\n\nif (process.env.NODE_ENV !== 'production') {\n  var perf = inBrowser && window.performance;\n  /* istanbul ignore if */\n  if (\n    perf &&\n    perf.mark &&\n    perf.measure &&\n    perf.clearMarks &&\n    perf.clearMeasures\n  ) {\n    mark = function (tag) { return perf.mark(tag); };\n    measure = function (name, startTag, endTag) {\n      perf.measure(name, startTag, endTag);\n      perf.clearMarks(startTag);\n      perf.clearMarks(endTag);\n      perf.clearMeasures(name);\n    };\n  }\n}\n\n/*  */\n\nvar VNode = function VNode (\n  tag,\n  data,\n  children,\n  text,\n  elm,\n  context,\n  componentOptions\n) {\n  this.tag = tag;\n  this.data = data;\n  this.children = children;\n  this.text = text;\n  this.elm = elm;\n  this.ns = undefined;\n  this.context = context;\n  this.functionalContext = undefined;\n  this.key = data && data.key;\n  this.componentOptions = componentOptions;\n  this.componentInstance = undefined;\n  this.parent = undefined;\n  this.raw = false;\n  this.isStatic = false;\n  this.isRootInsert = true;\n  this.isComment = false;\n  this.isCloned = false;\n  this.isOnce = false;\n};\n\nvar prototypeAccessors = { child: {} };\n\n// DEPRECATED: alias for componentInstance for backwards compat.\n/* istanbul ignore next */\nprototypeAccessors.child.get = function () {\n  return this.componentInstance\n};\n\nObject.defineProperties( VNode.prototype, prototypeAccessors );\n\nvar createEmptyVNode = function () {\n  var node = new VNode();\n  node.text = '';\n  node.isComment = true;\n  return node\n};\n\nfunction createTextVNode (val) {\n  return new VNode(undefined, undefined, undefined, String(val))\n}\n\n// optimized shallow clone\n// used for static nodes and slot nodes because they may be reused across\n// multiple renders, cloning them avoids errors when DOM manipulations rely\n// on their elm reference.\nfunction cloneVNode (vnode) {\n  var cloned = new VNode(\n    vnode.tag,\n    vnode.data,\n    vnode.children,\n    vnode.text,\n    vnode.elm,\n    vnode.context,\n    vnode.componentOptions\n  );\n  cloned.ns = vnode.ns;\n  cloned.isStatic = vnode.isStatic;\n  cloned.key = vnode.key;\n  cloned.isCloned = true;\n  return cloned\n}\n\nfunction cloneVNodes (vnodes) {\n  var len = vnodes.length;\n  var res = new Array(len);\n  for (var i = 0; i < len; i++) {\n    res[i] = cloneVNode(vnodes[i]);\n  }\n  return res\n}\n\n/*  */\n\nvar normalizeEvent = cached(function (name) {\n  var once$$1 = name.charAt(0) === '~'; // Prefixed last, checked first\n  name = once$$1 ? name.slice(1) : name;\n  var capture = name.charAt(0) === '!';\n  name = capture ? name.slice(1) : name;\n  return {\n    name: name,\n    once: once$$1,\n    capture: capture\n  }\n});\n\nfunction createFnInvoker (fns) {\n  function invoker () {\n    var arguments$1 = arguments;\n\n    var fns = invoker.fns;\n    if (Array.isArray(fns)) {\n      for (var i = 0; i < fns.length; i++) {\n        fns[i].apply(null, arguments$1);\n      }\n    } else {\n      // return handler return value for single handlers\n      return fns.apply(null, arguments)\n    }\n  }\n  invoker.fns = fns;\n  return invoker\n}\n\nfunction updateListeners (\n  on,\n  oldOn,\n  add,\n  remove$$1,\n  vm\n) {\n  var name, cur, old, event;\n  for (name in on) {\n    cur = on[name];\n    old = oldOn[name];\n    event = normalizeEvent(name);\n    if (!cur) {\n      process.env.NODE_ENV !== 'production' && warn(\n        \"Invalid handler for event \\\"\" + (event.name) + \"\\\": got \" + String(cur),\n        vm\n      );\n    } else if (!old) {\n      if (!cur.fns) {\n        cur = on[name] = createFnInvoker(cur);\n      }\n      add(event.name, cur, event.once, event.capture);\n    } else if (cur !== old) {\n      old.fns = cur;\n      on[name] = old;\n    }\n  }\n  for (name in oldOn) {\n    if (!on[name]) {\n      event = normalizeEvent(name);\n      remove$$1(event.name, oldOn[name], event.capture);\n    }\n  }\n}\n\n/*  */\n\nfunction mergeVNodeHook (def, hookKey, hook) {\n  var invoker;\n  var oldHook = def[hookKey];\n\n  function wrappedHook () {\n    hook.apply(this, arguments);\n    // important: remove merged hook to ensure it's called only once\n    // and prevent memory leak\n    remove(invoker.fns, wrappedHook);\n  }\n\n  if (!oldHook) {\n    // no existing hook\n    invoker = createFnInvoker([wrappedHook]);\n  } else {\n    /* istanbul ignore if */\n    if (oldHook.fns && oldHook.merged) {\n      // already a merged invoker\n      invoker = oldHook;\n      invoker.fns.push(wrappedHook);\n    } else {\n      // existing plain hook\n      invoker = createFnInvoker([oldHook, wrappedHook]);\n    }\n  }\n\n  invoker.merged = true;\n  def[hookKey] = invoker;\n}\n\n/*  */\n\n// The template compiler attempts to minimize the need for normalization by\n// statically analyzing the template at compile time.\n//\n// For plain HTML markup, normalization can be completely skipped because the\n// generated render function is guaranteed to return Array<VNode>. There are\n// two cases where extra normalization is needed:\n\n// 1. When the children contains components - because a functional component\n// may return an Array instead of a single root. In this case, just a simple\n// normalization is needed - if any child is an Array, we flatten the whole\n// thing with Array.prototype.concat. It is guaranteed to be only 1-level deep\n// because functional components already normalize their own children.\nfunction simpleNormalizeChildren (children) {\n  for (var i = 0; i < children.length; i++) {\n    if (Array.isArray(children[i])) {\n      return Array.prototype.concat.apply([], children)\n    }\n  }\n  return children\n}\n\n// 2. When the children contains constructs that always generated nested Arrays,\n// e.g. <template>, <slot>, v-for, or when the children is provided by user\n// with hand-written render functions / JSX. In such cases a full normalization\n// is needed to cater to all possible types of children values.\nfunction normalizeChildren (children) {\n  return isPrimitive(children)\n    ? [createTextVNode(children)]\n    : Array.isArray(children)\n      ? normalizeArrayChildren(children)\n      : undefined\n}\n\nfunction normalizeArrayChildren (children, nestedIndex) {\n  var res = [];\n  var i, c, last;\n  for (i = 0; i < children.length; i++) {\n    c = children[i];\n    if (c == null || typeof c === 'boolean') { continue }\n    last = res[res.length - 1];\n    //  nested\n    if (Array.isArray(c)) {\n      res.push.apply(res, normalizeArrayChildren(c, ((nestedIndex || '') + \"_\" + i)));\n    } else if (isPrimitive(c)) {\n      if (last && last.text) {\n        last.text += String(c);\n      } else if (c !== '') {\n        // convert primitive to vnode\n        res.push(createTextVNode(c));\n      }\n    } else {\n      if (c.text && last && last.text) {\n        res[res.length - 1] = createTextVNode(last.text + c.text);\n      } else {\n        // default key for nested array children (likely generated by v-for)\n        if (c.tag && c.key == null && nestedIndex != null) {\n          c.key = \"__vlist\" + nestedIndex + \"_\" + i + \"__\";\n        }\n        res.push(c);\n      }\n    }\n  }\n  return res\n}\n\n/*  */\n\nfunction getFirstComponentChild (children) {\n  return children && children.filter(function (c) { return c && c.componentOptions; })[0]\n}\n\n/*  */\n\nfunction initEvents (vm) {\n  vm._events = Object.create(null);\n  vm._hasHookEvent = false;\n  // init parent attached events\n  var listeners = vm.$options._parentListeners;\n  if (listeners) {\n    updateComponentListeners(vm, listeners);\n  }\n}\n\nvar target;\n\nfunction add (event, fn, once$$1) {\n  if (once$$1) {\n    target.$once(event, fn);\n  } else {\n    target.$on(event, fn);\n  }\n}\n\nfunction remove$1 (event, fn) {\n  target.$off(event, fn);\n}\n\nfunction updateComponentListeners (\n  vm,\n  listeners,\n  oldListeners\n) {\n  target = vm;\n  updateListeners(listeners, oldListeners || {}, add, remove$1, vm);\n}\n\nfunction eventsMixin (Vue) {\n  var hookRE = /^hook:/;\n  Vue.prototype.$on = function (event, fn) {\n    var this$1 = this;\n\n    var vm = this;\n    if (Array.isArray(event)) {\n      for (var i = 0, l = event.length; i < l; i++) {\n        this$1.$on(event[i], fn);\n      }\n    } else {\n      (vm._events[event] || (vm._events[event] = [])).push(fn);\n      // optimize hook:event cost by using a boolean flag marked at registration\n      // instead of a hash lookup\n      if (hookRE.test(event)) {\n        vm._hasHookEvent = true;\n      }\n    }\n    return vm\n  };\n\n  Vue.prototype.$once = function (event, fn) {\n    var vm = this;\n    function on () {\n      vm.$off(event, on);\n      fn.apply(vm, arguments);\n    }\n    on.fn = fn;\n    vm.$on(event, on);\n    return vm\n  };\n\n  Vue.prototype.$off = function (event, fn) {\n    var this$1 = this;\n\n    var vm = this;\n    // all\n    if (!arguments.length) {\n      vm._events = Object.create(null);\n      return vm\n    }\n    // array of events\n    if (Array.isArray(event)) {\n      for (var i$1 = 0, l = event.length; i$1 < l; i$1++) {\n        this$1.$off(event[i$1], fn);\n      }\n      return vm\n    }\n    // specific event\n    var cbs = vm._events[event];\n    if (!cbs) {\n      return vm\n    }\n    if (arguments.length === 1) {\n      vm._events[event] = null;\n      return vm\n    }\n    // specific handler\n    var cb;\n    var i = cbs.length;\n    while (i--) {\n      cb = cbs[i];\n      if (cb === fn || cb.fn === fn) {\n        cbs.splice(i, 1);\n        break\n      }\n    }\n    return vm\n  };\n\n  Vue.prototype.$emit = function (event) {\n    var vm = this;\n    if (process.env.NODE_ENV !== 'production') {\n      var lowerCaseEvent = event.toLowerCase();\n      if (lowerCaseEvent !== event && vm._events[lowerCaseEvent]) {\n        tip(\n          \"Event \\\"\" + lowerCaseEvent + \"\\\" is emitted in component \" +\n          (formatComponentName(vm)) + \" but the handler is registered for \\\"\" + event + \"\\\". \" +\n          \"Note that HTML attributes are case-insensitive and you cannot use \" +\n          \"v-on to listen to camelCase events when using in-DOM templates. \" +\n          \"You should probably use \\\"\" + (hyphenate(event)) + \"\\\" instead of \\\"\" + event + \"\\\".\"\n        );\n      }\n    }\n    var cbs = vm._events[event];\n    if (cbs) {\n      cbs = cbs.length > 1 ? toArray(cbs) : cbs;\n      var args = toArray(arguments, 1);\n      for (var i = 0, l = cbs.length; i < l; i++) {\n        cbs[i].apply(vm, args);\n      }\n    }\n    return vm\n  };\n}\n\n/*  */\n\n/**\n * Runtime helper for resolving raw children VNodes into a slot object.\n */\nfunction resolveSlots (\n  children,\n  context\n) {\n  var slots = {};\n  if (!children) {\n    return slots\n  }\n  var defaultSlot = [];\n  var name, child;\n  for (var i = 0, l = children.length; i < l; i++) {\n    child = children[i];\n    // named slots should only be respected if the vnode was rendered in the\n    // same context.\n    if ((child.context === context || child.functionalContext === context) &&\n        child.data && (name = child.data.slot)) {\n      var slot = (slots[name] || (slots[name] = []));\n      if (child.tag === 'template') {\n        slot.push.apply(slot, child.children);\n      } else {\n        slot.push(child);\n      }\n    } else {\n      defaultSlot.push(child);\n    }\n  }\n  // ignore whitespace\n  if (!defaultSlot.every(isWhitespace)) {\n    slots.default = defaultSlot;\n  }\n  return slots\n}\n\nfunction isWhitespace (node) {\n  return node.isComment || node.text === ' '\n}\n\nfunction resolveScopedSlots (\n  fns\n) {\n  var res = {};\n  for (var i = 0; i < fns.length; i++) {\n    res[fns[i][0]] = fns[i][1];\n  }\n  return res\n}\n\n/*  */\n\nvar activeInstance = null;\n\nfunction initLifecycle (vm) {\n  var options = vm.$options;\n\n  // locate first non-abstract parent\n  var parent = options.parent;\n  if (parent && !options.abstract) {\n    while (parent.$options.abstract && parent.$parent) {\n      parent = parent.$parent;\n    }\n    parent.$children.push(vm);\n  }\n\n  vm.$parent = parent;\n  vm.$root = parent ? parent.$root : vm;\n\n  vm.$children = [];\n  vm.$refs = {};\n\n  vm._watcher = null;\n  vm._inactive = null;\n  vm._directInactive = false;\n  vm._isMounted = false;\n  vm._isDestroyed = false;\n  vm._isBeingDestroyed = false;\n}\n\nfunction lifecycleMixin (Vue) {\n  Vue.prototype._update = function (vnode, hydrating) {\n    var vm = this;\n    if (vm._isMounted) {\n      callHook(vm, 'beforeUpdate');\n    }\n    var prevEl = vm.$el;\n    var prevVnode = vm._vnode;\n    var prevActiveInstance = activeInstance;\n    activeInstance = vm;\n    vm._vnode = vnode;\n    // Vue.prototype.__patch__ is injected in entry points\n    // based on the rendering backend used.\n    if (!prevVnode) {\n      // initial render\n      vm.$el = vm.__patch__(\n        vm.$el, vnode, hydrating, false /* removeOnly */,\n        vm.$options._parentElm,\n        vm.$options._refElm\n      );\n    } else {\n      // updates\n      vm.$el = vm.__patch__(prevVnode, vnode);\n    }\n    activeInstance = prevActiveInstance;\n    // update __vue__ reference\n    if (prevEl) {\n      prevEl.__vue__ = null;\n    }\n    if (vm.$el) {\n      vm.$el.__vue__ = vm;\n    }\n    // if parent is an HOC, update its $el as well\n    if (vm.$vnode && vm.$parent && vm.$vnode === vm.$parent._vnode) {\n      vm.$parent.$el = vm.$el;\n    }\n    // updated hook is called by the scheduler to ensure that children are\n    // updated in a parent's updated hook.\n  };\n\n  Vue.prototype.$forceUpdate = function () {\n    var vm = this;\n    if (vm._watcher) {\n      vm._watcher.update();\n    }\n  };\n\n  Vue.prototype.$destroy = function () {\n    var vm = this;\n    if (vm._isBeingDestroyed) {\n      return\n    }\n    callHook(vm, 'beforeDestroy');\n    vm._isBeingDestroyed = true;\n    // remove self from parent\n    var parent = vm.$parent;\n    if (parent && !parent._isBeingDestroyed && !vm.$options.abstract) {\n      remove(parent.$children, vm);\n    }\n    // teardown watchers\n    if (vm._watcher) {\n      vm._watcher.teardown();\n    }\n    var i = vm._watchers.length;\n    while (i--) {\n      vm._watchers[i].teardown();\n    }\n    // remove reference from data ob\n    // frozen object may not have observer.\n    if (vm._data.__ob__) {\n      vm._data.__ob__.vmCount--;\n    }\n    // call the last hook...\n    vm._isDestroyed = true;\n    // invoke destroy hooks on current rendered tree\n    vm.__patch__(vm._vnode, null);\n    // fire destroyed hook\n    callHook(vm, 'destroyed');\n    // turn off all instance listeners.\n    vm.$off();\n    // remove __vue__ reference\n    if (vm.$el) {\n      vm.$el.__vue__ = null;\n    }\n    // remove reference to DOM nodes (prevents leak)\n    vm.$options._parentElm = vm.$options._refElm = null;\n  };\n}\n\nfunction mountComponent (\n  vm,\n  el,\n  hydrating\n) {\n  vm.$el = el;\n  if (!vm.$options.render) {\n    vm.$options.render = createEmptyVNode;\n    if (process.env.NODE_ENV !== 'production') {\n      /* istanbul ignore if */\n      if ((vm.$options.template && vm.$options.template.charAt(0) !== '#') ||\n        vm.$options.el || el) {\n        warn(\n          'You are using the runtime-only build of Vue where the template ' +\n          'compiler is not available. Either pre-compile the templates into ' +\n          'render functions, or use the compiler-included build.',\n          vm\n        );\n      } else {\n        warn(\n          'Failed to mount component: template or render function not defined.',\n          vm\n        );\n      }\n    }\n  }\n  callHook(vm, 'beforeMount');\n\n  var updateComponent;\n  /* istanbul ignore if */\n  if (process.env.NODE_ENV !== 'production' && config.performance && mark) {\n    updateComponent = function () {\n      var name = vm._name;\n      var id = vm._uid;\n      var startTag = \"vue-perf-start:\" + id;\n      var endTag = \"vue-perf-end:\" + id;\n\n      mark(startTag);\n      var vnode = vm._render();\n      mark(endTag);\n      measure((name + \" render\"), startTag, endTag);\n\n      mark(startTag);\n      vm._update(vnode, hydrating);\n      mark(endTag);\n      measure((name + \" patch\"), startTag, endTag);\n    };\n  } else {\n    updateComponent = function () {\n      vm._update(vm._render(), hydrating);\n    };\n  }\n\n  vm._watcher = new Watcher(vm, updateComponent, noop);\n  hydrating = false;\n\n  // manually mounted instance, call mounted on self\n  // mounted is called for render-created child components in its inserted hook\n  if (vm.$vnode == null) {\n    vm._isMounted = true;\n    callHook(vm, 'mounted');\n  }\n  return vm\n}\n\nfunction updateChildComponent (\n  vm,\n  propsData,\n  listeners,\n  parentVnode,\n  renderChildren\n) {\n  // determine whether component has slot children\n  // we need to do this before overwriting $options._renderChildren\n  var hasChildren = !!(\n    renderChildren ||               // has new static slots\n    vm.$options._renderChildren ||  // has old static slots\n    parentVnode.data.scopedSlots || // has new scoped slots\n    vm.$scopedSlots !== emptyObject // has old scoped slots\n  );\n\n  vm.$options._parentVnode = parentVnode;\n  vm.$vnode = parentVnode; // update vm's placeholder node without re-render\n  if (vm._vnode) { // update child tree's parent\n    vm._vnode.parent = parentVnode;\n  }\n  vm.$options._renderChildren = renderChildren;\n\n  // update props\n  if (propsData && vm.$options.props) {\n    observerState.shouldConvert = false;\n    if (process.env.NODE_ENV !== 'production') {\n      observerState.isSettingProps = true;\n    }\n    var props = vm._props;\n    var propKeys = vm.$options._propKeys || [];\n    for (var i = 0; i < propKeys.length; i++) {\n      var key = propKeys[i];\n      props[key] = validateProp(key, vm.$options.props, propsData, vm);\n    }\n    observerState.shouldConvert = true;\n    if (process.env.NODE_ENV !== 'production') {\n      observerState.isSettingProps = false;\n    }\n    // keep a copy of raw propsData\n    vm.$options.propsData = propsData;\n  }\n  // update listeners\n  if (listeners) {\n    var oldListeners = vm.$options._parentListeners;\n    vm.$options._parentListeners = listeners;\n    updateComponentListeners(vm, listeners, oldListeners);\n  }\n  // resolve slots + force update if has children\n  if (hasChildren) {\n    vm.$slots = resolveSlots(renderChildren, parentVnode.context);\n    vm.$forceUpdate();\n  }\n}\n\nfunction isInInactiveTree (vm) {\n  while (vm && (vm = vm.$parent)) {\n    if (vm._inactive) { return true }\n  }\n  return false\n}\n\nfunction activateChildComponent (vm, direct) {\n  if (direct) {\n    vm._directInactive = false;\n    if (isInInactiveTree(vm)) {\n      return\n    }\n  } else if (vm._directInactive) {\n    return\n  }\n  if (vm._inactive || vm._inactive == null) {\n    vm._inactive = false;\n    for (var i = 0; i < vm.$children.length; i++) {\n      activateChildComponent(vm.$children[i]);\n    }\n    callHook(vm, 'activated');\n  }\n}\n\nfunction deactivateChildComponent (vm, direct) {\n  if (direct) {\n    vm._directInactive = true;\n    if (isInInactiveTree(vm)) {\n      return\n    }\n  }\n  if (!vm._inactive) {\n    vm._inactive = true;\n    for (var i = 0; i < vm.$children.length; i++) {\n      deactivateChildComponent(vm.$children[i]);\n    }\n    callHook(vm, 'deactivated');\n  }\n}\n\nfunction callHook (vm, hook) {\n  var handlers = vm.$options[hook];\n  if (handlers) {\n    for (var i = 0, j = handlers.length; i < j; i++) {\n      try {\n        handlers[i].call(vm);\n      } catch (e) {\n        handleError(e, vm, (hook + \" hook\"));\n      }\n    }\n  }\n  if (vm._hasHookEvent) {\n    vm.$emit('hook:' + hook);\n  }\n}\n\n/*  */\n\n\nvar queue = [];\nvar has = {};\nvar circular = {};\nvar waiting = false;\nvar flushing = false;\nvar index = 0;\n\n/**\n * Reset the scheduler's state.\n */\nfunction resetSchedulerState () {\n  queue.length = 0;\n  has = {};\n  if (process.env.NODE_ENV !== 'production') {\n    circular = {};\n  }\n  waiting = flushing = false;\n}\n\n/**\n * Flush both queues and run the watchers.\n */\nfunction flushSchedulerQueue () {\n  flushing = true;\n  var watcher, id, vm;\n\n  // Sort queue before flush.\n  // This ensures that:\n  // 1. Components are updated from parent to child. (because parent is always\n  //    created before the child)\n  // 2. A component's user watchers are run before its render watcher (because\n  //    user watchers are created before the render watcher)\n  // 3. If a component is destroyed during a parent component's watcher run,\n  //    its watchers can be skipped.\n  queue.sort(function (a, b) { return a.id - b.id; });\n\n  // do not cache length because more watchers might be pushed\n  // as we run existing watchers\n  for (index = 0; index < queue.length; index++) {\n    watcher = queue[index];\n    id = watcher.id;\n    has[id] = null;\n    watcher.run();\n    // in dev build, check and stop circular updates.\n    if (process.env.NODE_ENV !== 'production' && has[id] != null) {\n      circular[id] = (circular[id] || 0) + 1;\n      if (circular[id] > config._maxUpdateCount) {\n        warn(\n          'You may have an infinite update loop ' + (\n            watcher.user\n              ? (\"in watcher with expression \\\"\" + (watcher.expression) + \"\\\"\")\n              : \"in a component render function.\"\n          ),\n          watcher.vm\n        );\n        break\n      }\n    }\n  }\n\n  // reset scheduler before updated hook called\n  var oldQueue = queue.slice();\n  resetSchedulerState();\n\n  // call updated hooks\n  index = oldQueue.length;\n  while (index--) {\n    watcher = oldQueue[index];\n    vm = watcher.vm;\n    if (vm._watcher === watcher && vm._isMounted) {\n      callHook(vm, 'updated');\n    }\n  }\n\n  // devtool hook\n  /* istanbul ignore if */\n  if (devtools && config.devtools) {\n    devtools.emit('flush');\n  }\n}\n\n/**\n * Push a watcher into the watcher queue.\n * Jobs with duplicate IDs will be skipped unless it's\n * pushed when the queue is being flushed.\n */\nfunction queueWatcher (watcher) {\n  var id = watcher.id;\n  if (has[id] == null) {\n    has[id] = true;\n    if (!flushing) {\n      queue.push(watcher);\n    } else {\n      // if already flushing, splice the watcher based on its id\n      // if already past its id, it will be run next immediately.\n      var i = queue.length - 1;\n      while (i >= 0 && queue[i].id > watcher.id) {\n        i--;\n      }\n      queue.splice(Math.max(i, index) + 1, 0, watcher);\n    }\n    // queue the flush\n    if (!waiting) {\n      waiting = true;\n      nextTick(flushSchedulerQueue);\n    }\n  }\n}\n\n/*  */\n\nvar uid$2 = 0;\n\n/**\n * A watcher parses an expression, collects dependencies,\n * and fires callback when the expression value changes.\n * This is used for both the $watch() api and directives.\n */\nvar Watcher = function Watcher (\n  vm,\n  expOrFn,\n  cb,\n  options\n) {\n  this.vm = vm;\n  vm._watchers.push(this);\n  // options\n  if (options) {\n    this.deep = !!options.deep;\n    this.user = !!options.user;\n    this.lazy = !!options.lazy;\n    this.sync = !!options.sync;\n  } else {\n    this.deep = this.user = this.lazy = this.sync = false;\n  }\n  this.cb = cb;\n  this.id = ++uid$2; // uid for batching\n  this.active = true;\n  this.dirty = this.lazy; // for lazy watchers\n  this.deps = [];\n  this.newDeps = [];\n  this.depIds = new _Set();\n  this.newDepIds = new _Set();\n  this.expression = process.env.NODE_ENV !== 'production'\n    ? expOrFn.toString()\n    : '';\n  // parse expression for getter\n  if (typeof expOrFn === 'function') {\n    this.getter = expOrFn;\n  } else {\n    this.getter = parsePath(expOrFn);\n    if (!this.getter) {\n      this.getter = function () {};\n      process.env.NODE_ENV !== 'production' && warn(\n        \"Failed watching path: \\\"\" + expOrFn + \"\\\" \" +\n        'Watcher only accepts simple dot-delimited paths. ' +\n        'For full control, use a function instead.',\n        vm\n      );\n    }\n  }\n  this.value = this.lazy\n    ? undefined\n    : this.get();\n};\n\n/**\n * Evaluate the getter, and re-collect dependencies.\n */\nWatcher.prototype.get = function get () {\n  pushTarget(this);\n  var value;\n  var vm = this.vm;\n  if (this.user) {\n    try {\n      value = this.getter.call(vm, vm);\n    } catch (e) {\n      handleError(e, vm, (\"getter for watcher \\\"\" + (this.expression) + \"\\\"\"));\n    }\n  } else {\n    value = this.getter.call(vm, vm);\n  }\n  // \"touch\" every property so they are all tracked as\n  // dependencies for deep watching\n  if (this.deep) {\n    traverse(value);\n  }\n  popTarget();\n  this.cleanupDeps();\n  return value\n};\n\n/**\n * Add a dependency to this directive.\n */\nWatcher.prototype.addDep = function addDep (dep) {\n  var id = dep.id;\n  if (!this.newDepIds.has(id)) {\n    this.newDepIds.add(id);\n    this.newDeps.push(dep);\n    if (!this.depIds.has(id)) {\n      dep.addSub(this);\n    }\n  }\n};\n\n/**\n * Clean up for dependency collection.\n */\nWatcher.prototype.cleanupDeps = function cleanupDeps () {\n    var this$1 = this;\n\n  var i = this.deps.length;\n  while (i--) {\n    var dep = this$1.deps[i];\n    if (!this$1.newDepIds.has(dep.id)) {\n      dep.removeSub(this$1);\n    }\n  }\n  var tmp = this.depIds;\n  this.depIds = this.newDepIds;\n  this.newDepIds = tmp;\n  this.newDepIds.clear();\n  tmp = this.deps;\n  this.deps = this.newDeps;\n  this.newDeps = tmp;\n  this.newDeps.length = 0;\n};\n\n/**\n * Subscriber interface.\n * Will be called when a dependency changes.\n */\nWatcher.prototype.update = function update () {\n  /* istanbul ignore else */\n  if (this.lazy) {\n    this.dirty = true;\n  } else if (this.sync) {\n    this.run();\n  } else {\n    queueWatcher(this);\n  }\n};\n\n/**\n * Scheduler job interface.\n * Will be called by the scheduler.\n */\nWatcher.prototype.run = function run () {\n  if (this.active) {\n    var value = this.get();\n    if (\n      value !== this.value ||\n      // Deep watchers and watchers on Object/Arrays should fire even\n      // when the value is the same, because the value may\n      // have mutated.\n      isObject(value) ||\n      this.deep\n    ) {\n      // set new value\n      var oldValue = this.value;\n      this.value = value;\n      if (this.user) {\n        try {\n          this.cb.call(this.vm, value, oldValue);\n        } catch (e) {\n          handleError(e, this.vm, (\"callback for watcher \\\"\" + (this.expression) + \"\\\"\"));\n        }\n      } else {\n        this.cb.call(this.vm, value, oldValue);\n      }\n    }\n  }\n};\n\n/**\n * Evaluate the value of the watcher.\n * This only gets called for lazy watchers.\n */\nWatcher.prototype.evaluate = function evaluate () {\n  this.value = this.get();\n  this.dirty = false;\n};\n\n/**\n * Depend on all deps collected by this watcher.\n */\nWatcher.prototype.depend = function depend () {\n    var this$1 = this;\n\n  var i = this.deps.length;\n  while (i--) {\n    this$1.deps[i].depend();\n  }\n};\n\n/**\n * Remove self from all dependencies' subscriber list.\n */\nWatcher.prototype.teardown = function teardown () {\n    var this$1 = this;\n\n  if (this.active) {\n    // remove self from vm's watcher list\n    // this is a somewhat expensive operation so we skip it\n    // if the vm is being destroyed.\n    if (!this.vm._isBeingDestroyed) {\n      remove(this.vm._watchers, this);\n    }\n    var i = this.deps.length;\n    while (i--) {\n      this$1.deps[i].removeSub(this$1);\n    }\n    this.active = false;\n  }\n};\n\n/**\n * Recursively traverse an object to evoke all converted\n * getters, so that every nested property inside the object\n * is collected as a \"deep\" dependency.\n */\nvar seenObjects = new _Set();\nfunction traverse (val) {\n  seenObjects.clear();\n  _traverse(val, seenObjects);\n}\n\nfunction _traverse (val, seen) {\n  var i, keys;\n  var isA = Array.isArray(val);\n  if ((!isA && !isObject(val)) || !Object.isExtensible(val)) {\n    return\n  }\n  if (val.__ob__) {\n    var depId = val.__ob__.dep.id;\n    if (seen.has(depId)) {\n      return\n    }\n    seen.add(depId);\n  }\n  if (isA) {\n    i = val.length;\n    while (i--) { _traverse(val[i], seen); }\n  } else {\n    keys = Object.keys(val);\n    i = keys.length;\n    while (i--) { _traverse(val[keys[i]], seen); }\n  }\n}\n\n/*  */\n\nvar sharedPropertyDefinition = {\n  enumerable: true,\n  configurable: true,\n  get: noop,\n  set: noop\n};\n\nfunction proxy (target, sourceKey, key) {\n  sharedPropertyDefinition.get = function proxyGetter () {\n    return this[sourceKey][key]\n  };\n  sharedPropertyDefinition.set = function proxySetter (val) {\n    this[sourceKey][key] = val;\n  };\n  Object.defineProperty(target, key, sharedPropertyDefinition);\n}\n\nfunction initState (vm) {\n  vm._watchers = [];\n  var opts = vm.$options;\n  if (opts.props) { initProps(vm, opts.props); }\n  if (opts.methods) { initMethods(vm, opts.methods); }\n  if (opts.data) {\n    initData(vm);\n  } else {\n    observe(vm._data = {}, true /* asRootData */);\n  }\n  if (opts.computed) { initComputed(vm, opts.computed); }\n  if (opts.watch) { initWatch(vm, opts.watch); }\n}\n\nvar isReservedProp = { key: 1, ref: 1, slot: 1 };\n\nfunction initProps (vm, propsOptions) {\n  var propsData = vm.$options.propsData || {};\n  var props = vm._props = {};\n  // cache prop keys so that future props updates can iterate using Array\n  // instead of dynamic object key enumeration.\n  var keys = vm.$options._propKeys = [];\n  var isRoot = !vm.$parent;\n  // root instance props should be converted\n  observerState.shouldConvert = isRoot;\n  var loop = function ( key ) {\n    keys.push(key);\n    var value = validateProp(key, propsOptions, propsData, vm);\n    /* istanbul ignore else */\n    if (process.env.NODE_ENV !== 'production') {\n      if (isReservedProp[key]) {\n        warn(\n          (\"\\\"\" + key + \"\\\" is a reserved attribute and cannot be used as component prop.\"),\n          vm\n        );\n      }\n      defineReactive$$1(props, key, value, function () {\n        if (vm.$parent && !observerState.isSettingProps) {\n          warn(\n            \"Avoid mutating a prop directly since the value will be \" +\n            \"overwritten whenever the parent component re-renders. \" +\n            \"Instead, use a data or computed property based on the prop's \" +\n            \"value. Prop being mutated: \\\"\" + key + \"\\\"\",\n            vm\n          );\n        }\n      });\n    } else {\n      defineReactive$$1(props, key, value);\n    }\n    // static props are already proxied on the component's prototype\n    // during Vue.extend(). We only need to proxy props defined at\n    // instantiation here.\n    if (!(key in vm)) {\n      proxy(vm, \"_props\", key);\n    }\n  };\n\n  for (var key in propsOptions) loop( key );\n  observerState.shouldConvert = true;\n}\n\nfunction initData (vm) {\n  var data = vm.$options.data;\n  data = vm._data = typeof data === 'function'\n    ? getData(data, vm)\n    : data || {};\n  if (!isPlainObject(data)) {\n    data = {};\n    process.env.NODE_ENV !== 'production' && warn(\n      'data functions should return an object:\\n' +\n      'https://vuejs.org/v2/guide/components.html#data-Must-Be-a-Function',\n      vm\n    );\n  }\n  // proxy data on instance\n  var keys = Object.keys(data);\n  var props = vm.$options.props;\n  var i = keys.length;\n  while (i--) {\n    if (props && hasOwn(props, keys[i])) {\n      process.env.NODE_ENV !== 'production' && warn(\n        \"The data property \\\"\" + (keys[i]) + \"\\\" is already declared as a prop. \" +\n        \"Use prop default value instead.\",\n        vm\n      );\n    } else if (!isReserved(keys[i])) {\n      proxy(vm, \"_data\", keys[i]);\n    }\n  }\n  // observe data\n  observe(data, true /* asRootData */);\n}\n\nfunction getData (data, vm) {\n  try {\n    return data.call(vm)\n  } catch (e) {\n    handleError(e, vm, \"data()\");\n    return {}\n  }\n}\n\nvar computedWatcherOptions = { lazy: true };\n\nfunction initComputed (vm, computed) {\n  var watchers = vm._computedWatchers = Object.create(null);\n\n  for (var key in computed) {\n    var userDef = computed[key];\n    var getter = typeof userDef === 'function' ? userDef : userDef.get;\n    if (process.env.NODE_ENV !== 'production') {\n      if (getter === undefined) {\n        warn(\n          (\"No getter function has been defined for computed property \\\"\" + key + \"\\\".\"),\n          vm\n        );\n        getter = noop;\n      }\n    }\n    // create internal watcher for the computed property.\n    watchers[key] = new Watcher(vm, getter, noop, computedWatcherOptions);\n\n    // component-defined computed properties are already defined on the\n    // component prototype. We only need to define computed properties defined\n    // at instantiation here.\n    if (!(key in vm)) {\n      defineComputed(vm, key, userDef);\n    }\n  }\n}\n\nfunction defineComputed (target, key, userDef) {\n  if (typeof userDef === 'function') {\n    sharedPropertyDefinition.get = createComputedGetter(key);\n    sharedPropertyDefinition.set = noop;\n  } else {\n    sharedPropertyDefinition.get = userDef.get\n      ? userDef.cache !== false\n        ? createComputedGetter(key)\n        : userDef.get\n      : noop;\n    sharedPropertyDefinition.set = userDef.set\n      ? userDef.set\n      : noop;\n  }\n  Object.defineProperty(target, key, sharedPropertyDefinition);\n}\n\nfunction createComputedGetter (key) {\n  return function computedGetter () {\n    var watcher = this._computedWatchers && this._computedWatchers[key];\n    if (watcher) {\n      if (watcher.dirty) {\n        watcher.evaluate();\n      }\n      if (Dep.target) {\n        watcher.depend();\n      }\n      return watcher.value\n    }\n  }\n}\n\nfunction initMethods (vm, methods) {\n  var props = vm.$options.props;\n  for (var key in methods) {\n    vm[key] = methods[key] == null ? noop : bind(methods[key], vm);\n    if (process.env.NODE_ENV !== 'production') {\n      if (methods[key] == null) {\n        warn(\n          \"method \\\"\" + key + \"\\\" has an undefined value in the component definition. \" +\n          \"Did you reference the function correctly?\",\n          vm\n        );\n      }\n      if (props && hasOwn(props, key)) {\n        warn(\n          (\"method \\\"\" + key + \"\\\" has already been defined as a prop.\"),\n          vm\n        );\n      }\n    }\n  }\n}\n\nfunction initWatch (vm, watch) {\n  for (var key in watch) {\n    var handler = watch[key];\n    if (Array.isArray(handler)) {\n      for (var i = 0; i < handler.length; i++) {\n        createWatcher(vm, key, handler[i]);\n      }\n    } else {\n      createWatcher(vm, key, handler);\n    }\n  }\n}\n\nfunction createWatcher (vm, key, handler) {\n  var options;\n  if (isPlainObject(handler)) {\n    options = handler;\n    handler = handler.handler;\n  }\n  if (typeof handler === 'string') {\n    handler = vm[handler];\n  }\n  vm.$watch(key, handler, options);\n}\n\nfunction stateMixin (Vue) {\n  // flow somehow has problems with directly declared definition object\n  // when using Object.defineProperty, so we have to procedurally build up\n  // the object here.\n  var dataDef = {};\n  dataDef.get = function () { return this._data };\n  var propsDef = {};\n  propsDef.get = function () { return this._props };\n  if (process.env.NODE_ENV !== 'production') {\n    dataDef.set = function (newData) {\n      warn(\n        'Avoid replacing instance root $data. ' +\n        'Use nested data properties instead.',\n        this\n      );\n    };\n    propsDef.set = function () {\n      warn(\"$props is readonly.\", this);\n    };\n  }\n  Object.defineProperty(Vue.prototype, '$data', dataDef);\n  Object.defineProperty(Vue.prototype, '$props', propsDef);\n\n  Vue.prototype.$set = set;\n  Vue.prototype.$delete = del;\n\n  Vue.prototype.$watch = function (\n    expOrFn,\n    cb,\n    options\n  ) {\n    var vm = this;\n    options = options || {};\n    options.user = true;\n    var watcher = new Watcher(vm, expOrFn, cb, options);\n    if (options.immediate) {\n      cb.call(vm, watcher.value);\n    }\n    return function unwatchFn () {\n      watcher.teardown();\n    }\n  };\n}\n\n/*  */\n\n// hooks to be invoked on component VNodes during patch\nvar componentVNodeHooks = {\n  init: function init (\n    vnode,\n    hydrating,\n    parentElm,\n    refElm\n  ) {\n    if (!vnode.componentInstance || vnode.componentInstance._isDestroyed) {\n      var child = vnode.componentInstance = createComponentInstanceForVnode(\n        vnode,\n        activeInstance,\n        parentElm,\n        refElm\n      );\n      child.$mount(hydrating ? vnode.elm : undefined, hydrating);\n    } else if (vnode.data.keepAlive) {\n      // kept-alive components, treat as a patch\n      var mountedNode = vnode; // work around flow\n      componentVNodeHooks.prepatch(mountedNode, mountedNode);\n    }\n  },\n\n  prepatch: function prepatch (oldVnode, vnode) {\n    var options = vnode.componentOptions;\n    var child = vnode.componentInstance = oldVnode.componentInstance;\n    updateChildComponent(\n      child,\n      options.propsData, // updated props\n      options.listeners, // updated listeners\n      vnode, // new parent vnode\n      options.children // new children\n    );\n  },\n\n  insert: function insert (vnode) {\n    if (!vnode.componentInstance._isMounted) {\n      vnode.componentInstance._isMounted = true;\n      callHook(vnode.componentInstance, 'mounted');\n    }\n    if (vnode.data.keepAlive) {\n      activateChildComponent(vnode.componentInstance, true /* direct */);\n    }\n  },\n\n  destroy: function destroy (vnode) {\n    if (!vnode.componentInstance._isDestroyed) {\n      if (!vnode.data.keepAlive) {\n        vnode.componentInstance.$destroy();\n      } else {\n        deactivateChildComponent(vnode.componentInstance, true /* direct */);\n      }\n    }\n  }\n};\n\nvar hooksToMerge = Object.keys(componentVNodeHooks);\n\nfunction createComponent (\n  Ctor,\n  data,\n  context,\n  children,\n  tag\n) {\n  if (!Ctor) {\n    return\n  }\n\n  var baseCtor = context.$options._base;\n  if (isObject(Ctor)) {\n    Ctor = baseCtor.extend(Ctor);\n  }\n\n  if (typeof Ctor !== 'function') {\n    if (process.env.NODE_ENV !== 'production') {\n      warn((\"Invalid Component definition: \" + (String(Ctor))), context);\n    }\n    return\n  }\n\n  // async component\n  if (!Ctor.cid) {\n    if (Ctor.resolved) {\n      Ctor = Ctor.resolved;\n    } else {\n      Ctor = resolveAsyncComponent(Ctor, baseCtor, function () {\n        // it's ok to queue this on every render because\n        // $forceUpdate is buffered by the scheduler.\n        context.$forceUpdate();\n      });\n      if (!Ctor) {\n        // return nothing if this is indeed an async component\n        // wait for the callback to trigger parent update.\n        return\n      }\n    }\n  }\n\n  // resolve constructor options in case global mixins are applied after\n  // component constructor creation\n  resolveConstructorOptions(Ctor);\n\n  data = data || {};\n\n  // transform component v-model data into props & events\n  if (data.model) {\n    transformModel(Ctor.options, data);\n  }\n\n  // extract props\n  var propsData = extractProps(data, Ctor, tag);\n\n  // functional component\n  if (Ctor.options.functional) {\n    return createFunctionalComponent(Ctor, propsData, data, context, children)\n  }\n\n  // extract listeners, since these needs to be treated as\n  // child component listeners instead of DOM listeners\n  var listeners = data.on;\n  // replace with listeners with .native modifier\n  data.on = data.nativeOn;\n\n  if (Ctor.options.abstract) {\n    // abstract components do not keep anything\n    // other than props & listeners\n    data = {};\n  }\n\n  // merge component management hooks onto the placeholder node\n  mergeHooks(data);\n\n  // return a placeholder vnode\n  var name = Ctor.options.name || tag;\n  var vnode = new VNode(\n    (\"vue-component-\" + (Ctor.cid) + (name ? (\"-\" + name) : '')),\n    data, undefined, undefined, undefined, context,\n    { Ctor: Ctor, propsData: propsData, listeners: listeners, tag: tag, children: children }\n  );\n  return vnode\n}\n\nfunction createFunctionalComponent (\n  Ctor,\n  propsData,\n  data,\n  context,\n  children\n) {\n  var props = {};\n  var propOptions = Ctor.options.props;\n  if (propOptions) {\n    for (var key in propOptions) {\n      props[key] = validateProp(key, propOptions, propsData);\n    }\n  }\n  // ensure the createElement function in functional components\n  // gets a unique context - this is necessary for correct named slot check\n  var _context = Object.create(context);\n  var h = function (a, b, c, d) { return createElement(_context, a, b, c, d, true); };\n  var vnode = Ctor.options.render.call(null, h, {\n    props: props,\n    data: data,\n    parent: context,\n    children: children,\n    slots: function () { return resolveSlots(children, context); }\n  });\n  if (vnode instanceof VNode) {\n    vnode.functionalContext = context;\n    if (data.slot) {\n      (vnode.data || (vnode.data = {})).slot = data.slot;\n    }\n  }\n  return vnode\n}\n\nfunction createComponentInstanceForVnode (\n  vnode, // we know it's MountedComponentVNode but flow doesn't\n  parent, // activeInstance in lifecycle state\n  parentElm,\n  refElm\n) {\n  var vnodeComponentOptions = vnode.componentOptions;\n  var options = {\n    _isComponent: true,\n    parent: parent,\n    propsData: vnodeComponentOptions.propsData,\n    _componentTag: vnodeComponentOptions.tag,\n    _parentVnode: vnode,\n    _parentListeners: vnodeComponentOptions.listeners,\n    _renderChildren: vnodeComponentOptions.children,\n    _parentElm: parentElm || null,\n    _refElm: refElm || null\n  };\n  // check inline-template render functions\n  var inlineTemplate = vnode.data.inlineTemplate;\n  if (inlineTemplate) {\n    options.render = inlineTemplate.render;\n    options.staticRenderFns = inlineTemplate.staticRenderFns;\n  }\n  return new vnodeComponentOptions.Ctor(options)\n}\n\nfunction resolveAsyncComponent (\n  factory,\n  baseCtor,\n  cb\n) {\n  if (factory.requested) {\n    // pool callbacks\n    factory.pendingCallbacks.push(cb);\n  } else {\n    factory.requested = true;\n    var cbs = factory.pendingCallbacks = [cb];\n    var sync = true;\n\n    var resolve = function (res) {\n      if (isObject(res)) {\n        res = baseCtor.extend(res);\n      }\n      // cache resolved\n      factory.resolved = res;\n      // invoke callbacks only if this is not a synchronous resolve\n      // (async resolves are shimmed as synchronous during SSR)\n      if (!sync) {\n        for (var i = 0, l = cbs.length; i < l; i++) {\n          cbs[i](res);\n        }\n      }\n    };\n\n    var reject = function (reason) {\n      process.env.NODE_ENV !== 'production' && warn(\n        \"Failed to resolve async component: \" + (String(factory)) +\n        (reason ? (\"\\nReason: \" + reason) : '')\n      );\n    };\n\n    var res = factory(resolve, reject);\n\n    // handle promise\n    if (res && typeof res.then === 'function' && !factory.resolved) {\n      res.then(resolve, reject);\n    }\n\n    sync = false;\n    // return in case resolved synchronously\n    return factory.resolved\n  }\n}\n\nfunction extractProps (data, Ctor, tag) {\n  // we are only extracting raw values here.\n  // validation and default values are handled in the child\n  // component itself.\n  var propOptions = Ctor.options.props;\n  if (!propOptions) {\n    return\n  }\n  var res = {};\n  var attrs = data.attrs;\n  var props = data.props;\n  var domProps = data.domProps;\n  if (attrs || props || domProps) {\n    for (var key in propOptions) {\n      var altKey = hyphenate(key);\n      if (process.env.NODE_ENV !== 'production') {\n        var keyInLowerCase = key.toLowerCase();\n        if (\n          key !== keyInLowerCase &&\n          attrs && attrs.hasOwnProperty(keyInLowerCase)\n        ) {\n          tip(\n            \"Prop \\\"\" + keyInLowerCase + \"\\\" is passed to component \" +\n            (formatComponentName(tag || Ctor)) + \", but the declared prop name is\" +\n            \" \\\"\" + key + \"\\\". \" +\n            \"Note that HTML attributes are case-insensitive and camelCased \" +\n            \"props need to use their kebab-case equivalents when using in-DOM \" +\n            \"templates. You should probably use \\\"\" + altKey + \"\\\" instead of \\\"\" + key + \"\\\".\"\n          );\n        }\n      }\n      checkProp(res, props, key, altKey, true) ||\n      checkProp(res, attrs, key, altKey) ||\n      checkProp(res, domProps, key, altKey);\n    }\n  }\n  return res\n}\n\nfunction checkProp (\n  res,\n  hash,\n  key,\n  altKey,\n  preserve\n) {\n  if (hash) {\n    if (hasOwn(hash, key)) {\n      res[key] = hash[key];\n      if (!preserve) {\n        delete hash[key];\n      }\n      return true\n    } else if (hasOwn(hash, altKey)) {\n      res[key] = hash[altKey];\n      if (!preserve) {\n        delete hash[altKey];\n      }\n      return true\n    }\n  }\n  return false\n}\n\nfunction mergeHooks (data) {\n  if (!data.hook) {\n    data.hook = {};\n  }\n  for (var i = 0; i < hooksToMerge.length; i++) {\n    var key = hooksToMerge[i];\n    var fromParent = data.hook[key];\n    var ours = componentVNodeHooks[key];\n    data.hook[key] = fromParent ? mergeHook$1(ours, fromParent) : ours;\n  }\n}\n\nfunction mergeHook$1 (one, two) {\n  return function (a, b, c, d) {\n    one(a, b, c, d);\n    two(a, b, c, d);\n  }\n}\n\n// transform component v-model info (value and callback) into\n// prop and event handler respectively.\nfunction transformModel (options, data) {\n  var prop = (options.model && options.model.prop) || 'value';\n  var event = (options.model && options.model.event) || 'input';(data.props || (data.props = {}))[prop] = data.model.value;\n  var on = data.on || (data.on = {});\n  if (on[event]) {\n    on[event] = [data.model.callback].concat(on[event]);\n  } else {\n    on[event] = data.model.callback;\n  }\n}\n\n/*  */\n\nvar SIMPLE_NORMALIZE = 1;\nvar ALWAYS_NORMALIZE = 2;\n\n// wrapper function for providing a more flexible interface\n// without getting yelled at by flow\nfunction createElement (\n  context,\n  tag,\n  data,\n  children,\n  normalizationType,\n  alwaysNormalize\n) {\n  if (Array.isArray(data) || isPrimitive(data)) {\n    normalizationType = children;\n    children = data;\n    data = undefined;\n  }\n  if (alwaysNormalize) { normalizationType = ALWAYS_NORMALIZE; }\n  return _createElement(context, tag, data, children, normalizationType)\n}\n\nfunction _createElement (\n  context,\n  tag,\n  data,\n  children,\n  normalizationType\n) {\n  if (data && data.__ob__) {\n    process.env.NODE_ENV !== 'production' && warn(\n      \"Avoid using observed data object as vnode data: \" + (JSON.stringify(data)) + \"\\n\" +\n      'Always create fresh vnode data objects in each render!',\n      context\n    );\n    return createEmptyVNode()\n  }\n  if (!tag) {\n    // in case of component :is set to falsy value\n    return createEmptyVNode()\n  }\n  // support single function children as default scoped slot\n  if (Array.isArray(children) &&\n      typeof children[0] === 'function') {\n    data = data || {};\n    data.scopedSlots = { default: children[0] };\n    children.length = 0;\n  }\n  if (normalizationType === ALWAYS_NORMALIZE) {\n    children = normalizeChildren(children);\n  } else if (normalizationType === SIMPLE_NORMALIZE) {\n    children = simpleNormalizeChildren(children);\n  }\n  var vnode, ns;\n  if (typeof tag === 'string') {\n    var Ctor;\n    ns = config.getTagNamespace(tag);\n    if (config.isReservedTag(tag)) {\n      // platform built-in elements\n      vnode = new VNode(\n        config.parsePlatformTagName(tag), data, children,\n        undefined, undefined, context\n      );\n    } else if ((Ctor = resolveAsset(context.$options, 'components', tag))) {\n      // component\n      vnode = createComponent(Ctor, data, context, children, tag);\n    } else {\n      // unknown or unlisted namespaced elements\n      // check at runtime because it may get assigned a namespace when its\n      // parent normalizes children\n      vnode = new VNode(\n        tag, data, children,\n        undefined, undefined, context\n      );\n    }\n  } else {\n    // direct component options / constructor\n    vnode = createComponent(tag, data, context, children);\n  }\n  if (vnode) {\n    if (ns) { applyNS(vnode, ns); }\n    return vnode\n  } else {\n    return createEmptyVNode()\n  }\n}\n\nfunction applyNS (vnode, ns) {\n  vnode.ns = ns;\n  if (vnode.tag === 'foreignObject') {\n    // use default namespace inside foreignObject\n    return\n  }\n  if (vnode.children) {\n    for (var i = 0, l = vnode.children.length; i < l; i++) {\n      var child = vnode.children[i];\n      if (child.tag && !child.ns) {\n        applyNS(child, ns);\n      }\n    }\n  }\n}\n\n/*  */\n\n/**\n * Runtime helper for rendering v-for lists.\n */\nfunction renderList (\n  val,\n  render\n) {\n  var ret, i, l, keys, key;\n  if (Array.isArray(val) || typeof val === 'string') {\n    ret = new Array(val.length);\n    for (i = 0, l = val.length; i < l; i++) {\n      ret[i] = render(val[i], i);\n    }\n  } else if (typeof val === 'number') {\n    ret = new Array(val);\n    for (i = 0; i < val; i++) {\n      ret[i] = render(i + 1, i);\n    }\n  } else if (isObject(val)) {\n    keys = Object.keys(val);\n    ret = new Array(keys.length);\n    for (i = 0, l = keys.length; i < l; i++) {\n      key = keys[i];\n      ret[i] = render(val[key], key, i);\n    }\n  }\n  return ret\n}\n\n/*  */\n\n/**\n * Runtime helper for rendering <slot>\n */\nfunction renderSlot (\n  name,\n  fallback,\n  props,\n  bindObject\n) {\n  var scopedSlotFn = this.$scopedSlots[name];\n  if (scopedSlotFn) { // scoped slot\n    props = props || {};\n    if (bindObject) {\n      extend(props, bindObject);\n    }\n    return scopedSlotFn(props) || fallback\n  } else {\n    var slotNodes = this.$slots[name];\n    // warn duplicate slot usage\n    if (slotNodes && process.env.NODE_ENV !== 'production') {\n      slotNodes._rendered && warn(\n        \"Duplicate presence of slot \\\"\" + name + \"\\\" found in the same render tree \" +\n        \"- this will likely cause render errors.\",\n        this\n      );\n      slotNodes._rendered = true;\n    }\n    return slotNodes || fallback\n  }\n}\n\n/*  */\n\n/**\n * Runtime helper for resolving filters\n */\nfunction resolveFilter (id) {\n  return resolveAsset(this.$options, 'filters', id, true) || identity\n}\n\n/*  */\n\n/**\n * Runtime helper for checking keyCodes from config.\n */\nfunction checkKeyCodes (\n  eventKeyCode,\n  key,\n  builtInAlias\n) {\n  var keyCodes = config.keyCodes[key] || builtInAlias;\n  if (Array.isArray(keyCodes)) {\n    return keyCodes.indexOf(eventKeyCode) === -1\n  } else {\n    return keyCodes !== eventKeyCode\n  }\n}\n\n/*  */\n\n/**\n * Runtime helper for merging v-bind=\"object\" into a VNode's data.\n */\nfunction bindObjectProps (\n  data,\n  tag,\n  value,\n  asProp\n) {\n  if (value) {\n    if (!isObject(value)) {\n      process.env.NODE_ENV !== 'production' && warn(\n        'v-bind without argument expects an Object or Array value',\n        this\n      );\n    } else {\n      if (Array.isArray(value)) {\n        value = toObject(value);\n      }\n      var hash;\n      for (var key in value) {\n        if (key === 'class' || key === 'style') {\n          hash = data;\n        } else {\n          var type = data.attrs && data.attrs.type;\n          hash = asProp || config.mustUseProp(tag, type, key)\n            ? data.domProps || (data.domProps = {})\n            : data.attrs || (data.attrs = {});\n        }\n        if (!(key in hash)) {\n          hash[key] = value[key];\n        }\n      }\n    }\n  }\n  return data\n}\n\n/*  */\n\n/**\n * Runtime helper for rendering static trees.\n */\nfunction renderStatic (\n  index,\n  isInFor\n) {\n  var tree = this._staticTrees[index];\n  // if has already-rendered static tree and not inside v-for,\n  // we can reuse the same tree by doing a shallow clone.\n  if (tree && !isInFor) {\n    return Array.isArray(tree)\n      ? cloneVNodes(tree)\n      : cloneVNode(tree)\n  }\n  // otherwise, render a fresh tree.\n  tree = this._staticTrees[index] =\n    this.$options.staticRenderFns[index].call(this._renderProxy);\n  markStatic(tree, (\"__static__\" + index), false);\n  return tree\n}\n\n/**\n * Runtime helper for v-once.\n * Effectively it means marking the node as static with a unique key.\n */\nfunction markOnce (\n  tree,\n  index,\n  key\n) {\n  markStatic(tree, (\"__once__\" + index + (key ? (\"_\" + key) : \"\")), true);\n  return tree\n}\n\nfunction markStatic (\n  tree,\n  key,\n  isOnce\n) {\n  if (Array.isArray(tree)) {\n    for (var i = 0; i < tree.length; i++) {\n      if (tree[i] && typeof tree[i] !== 'string') {\n        markStaticNode(tree[i], (key + \"_\" + i), isOnce);\n      }\n    }\n  } else {\n    markStaticNode(tree, key, isOnce);\n  }\n}\n\nfunction markStaticNode (node, key, isOnce) {\n  node.isStatic = true;\n  node.key = key;\n  node.isOnce = isOnce;\n}\n\n/*  */\n\nfunction initRender (vm) {\n  vm.$vnode = null; // the placeholder node in parent tree\n  vm._vnode = null; // the root of the child tree\n  vm._staticTrees = null;\n  var parentVnode = vm.$options._parentVnode;\n  var renderContext = parentVnode && parentVnode.context;\n  vm.$slots = resolveSlots(vm.$options._renderChildren, renderContext);\n  vm.$scopedSlots = emptyObject;\n  // bind the createElement fn to this instance\n  // so that we get proper render context inside it.\n  // args order: tag, data, children, normalizationType, alwaysNormalize\n  // internal version is used by render functions compiled from templates\n  vm._c = function (a, b, c, d) { return createElement(vm, a, b, c, d, false); };\n  // normalization is always applied for the public version, used in\n  // user-written render functions.\n  vm.$createElement = function (a, b, c, d) { return createElement(vm, a, b, c, d, true); };\n}\n\nfunction renderMixin (Vue) {\n  Vue.prototype.$nextTick = function (fn) {\n    return nextTick(fn, this)\n  };\n\n  Vue.prototype._render = function () {\n    var vm = this;\n    var ref = vm.$options;\n    var render = ref.render;\n    var staticRenderFns = ref.staticRenderFns;\n    var _parentVnode = ref._parentVnode;\n\n    if (vm._isMounted) {\n      // clone slot nodes on re-renders\n      for (var key in vm.$slots) {\n        vm.$slots[key] = cloneVNodes(vm.$slots[key]);\n      }\n    }\n\n    vm.$scopedSlots = (_parentVnode && _parentVnode.data.scopedSlots) || emptyObject;\n\n    if (staticRenderFns && !vm._staticTrees) {\n      vm._staticTrees = [];\n    }\n    // set parent vnode. this allows render functions to have access\n    // to the data on the placeholder node.\n    vm.$vnode = _parentVnode;\n    // render self\n    var vnode;\n    try {\n      vnode = render.call(vm._renderProxy, vm.$createElement);\n    } catch (e) {\n      handleError(e, vm, \"render function\");\n      // return error render result,\n      // or previous vnode to prevent render error causing blank component\n      /* istanbul ignore else */\n      if (process.env.NODE_ENV !== 'production') {\n        vnode = vm.$options.renderError\n          ? vm.$options.renderError.call(vm._renderProxy, vm.$createElement, e)\n          : vm._vnode;\n      } else {\n        vnode = vm._vnode;\n      }\n    }\n    // return empty vnode in case the render function errored out\n    if (!(vnode instanceof VNode)) {\n      if (process.env.NODE_ENV !== 'production' && Array.isArray(vnode)) {\n        warn(\n          'Multiple root nodes returned from render function. Render function ' +\n          'should return a single root node.',\n          vm\n        );\n      }\n      vnode = createEmptyVNode();\n    }\n    // set parent\n    vnode.parent = _parentVnode;\n    return vnode\n  };\n\n  // internal render helpers.\n  // these are exposed on the instance prototype to reduce generated render\n  // code size.\n  Vue.prototype._o = markOnce;\n  Vue.prototype._n = toNumber;\n  Vue.prototype._s = _toString;\n  Vue.prototype._l = renderList;\n  Vue.prototype._t = renderSlot;\n  Vue.prototype._q = looseEqual;\n  Vue.prototype._i = looseIndexOf;\n  Vue.prototype._m = renderStatic;\n  Vue.prototype._f = resolveFilter;\n  Vue.prototype._k = checkKeyCodes;\n  Vue.prototype._b = bindObjectProps;\n  Vue.prototype._v = createTextVNode;\n  Vue.prototype._e = createEmptyVNode;\n  Vue.prototype._u = resolveScopedSlots;\n}\n\n/*  */\n\nfunction initProvide (vm) {\n  var provide = vm.$options.provide;\n  if (provide) {\n    vm._provided = typeof provide === 'function'\n      ? provide.call(vm)\n      : provide;\n  }\n}\n\nfunction initInjections (vm) {\n  var inject = vm.$options.inject;\n  if (inject) {\n    // inject is :any because flow is not smart enough to figure out cached\n    // isArray here\n    var isArray = Array.isArray(inject);\n    var keys = isArray\n      ? inject\n      : hasSymbol\n        ? Reflect.ownKeys(inject)\n        : Object.keys(inject);\n\n    var loop = function ( i ) {\n      var key = keys[i];\n      var provideKey = isArray ? key : inject[key];\n      var source = vm;\n      while (source) {\n        if (source._provided && provideKey in source._provided) {\n          /* istanbul ignore else */\n          if (process.env.NODE_ENV !== 'production') {\n            defineReactive$$1(vm, key, source._provided[provideKey], function () {\n              warn(\n                \"Avoid mutating an injected value directly since the changes will be \" +\n                \"overwritten whenever the provided component re-renders. \" +\n                \"injection being mutated: \\\"\" + key + \"\\\"\",\n                vm\n              );\n            });\n          } else {\n            defineReactive$$1(vm, key, source._provided[provideKey]);\n          }\n          break\n        }\n        source = source.$parent;\n      }\n    };\n\n    for (var i = 0; i < keys.length; i++) loop( i );\n  }\n}\n\n/*  */\n\nvar uid = 0;\n\nfunction initMixin (Vue) {\n  Vue.prototype._init = function (options) {\n    var vm = this;\n    // a uid\n    vm._uid = uid++;\n\n    var startTag, endTag;\n    /* istanbul ignore if */\n    if (process.env.NODE_ENV !== 'production' && config.performance && mark) {\n      startTag = \"vue-perf-init:\" + (vm._uid);\n      endTag = \"vue-perf-end:\" + (vm._uid);\n      mark(startTag);\n    }\n\n    // a flag to avoid this being observed\n    vm._isVue = true;\n    // merge options\n    if (options && options._isComponent) {\n      // optimize internal component instantiation\n      // since dynamic options merging is pretty slow, and none of the\n      // internal component options needs special treatment.\n      initInternalComponent(vm, options);\n    } else {\n      vm.$options = mergeOptions(\n        resolveConstructorOptions(vm.constructor),\n        options || {},\n        vm\n      );\n    }\n    /* istanbul ignore else */\n    if (process.env.NODE_ENV !== 'production') {\n      initProxy(vm);\n    } else {\n      vm._renderProxy = vm;\n    }\n    // expose real self\n    vm._self = vm;\n    initLifecycle(vm);\n    initEvents(vm);\n    initRender(vm);\n    callHook(vm, 'beforeCreate');\n    initInjections(vm); // resolve injections before data/props\n    initState(vm);\n    initProvide(vm); // resolve provide after data/props\n    callHook(vm, 'created');\n\n    /* istanbul ignore if */\n    if (process.env.NODE_ENV !== 'production' && config.performance && mark) {\n      vm._name = formatComponentName(vm, false);\n      mark(endTag);\n      measure(((vm._name) + \" init\"), startTag, endTag);\n    }\n\n    if (vm.$options.el) {\n      vm.$mount(vm.$options.el);\n    }\n  };\n}\n\nfunction initInternalComponent (vm, options) {\n  var opts = vm.$options = Object.create(vm.constructor.options);\n  // doing this because it's faster than dynamic enumeration.\n  opts.parent = options.parent;\n  opts.propsData = options.propsData;\n  opts._parentVnode = options._parentVnode;\n  opts._parentListeners = options._parentListeners;\n  opts._renderChildren = options._renderChildren;\n  opts._componentTag = options._componentTag;\n  opts._parentElm = options._parentElm;\n  opts._refElm = options._refElm;\n  if (options.render) {\n    opts.render = options.render;\n    opts.staticRenderFns = options.staticRenderFns;\n  }\n}\n\nfunction resolveConstructorOptions (Ctor) {\n  var options = Ctor.options;\n  if (Ctor.super) {\n    var superOptions = resolveConstructorOptions(Ctor.super);\n    var cachedSuperOptions = Ctor.superOptions;\n    if (superOptions !== cachedSuperOptions) {\n      // super option changed,\n      // need to resolve new options.\n      Ctor.superOptions = superOptions;\n      // check if there are any late-modified/attached options (#4976)\n      var modifiedOptions = resolveModifiedOptions(Ctor);\n      // update base extend options\n      if (modifiedOptions) {\n        extend(Ctor.extendOptions, modifiedOptions);\n      }\n      options = Ctor.options = mergeOptions(superOptions, Ctor.extendOptions);\n      if (options.name) {\n        options.components[options.name] = Ctor;\n      }\n    }\n  }\n  return options\n}\n\nfunction resolveModifiedOptions (Ctor) {\n  var modified;\n  var latest = Ctor.options;\n  var sealed = Ctor.sealedOptions;\n  for (var key in latest) {\n    if (latest[key] !== sealed[key]) {\n      if (!modified) { modified = {}; }\n      modified[key] = dedupe(latest[key], sealed[key]);\n    }\n  }\n  return modified\n}\n\nfunction dedupe (latest, sealed) {\n  // compare latest and sealed to ensure lifecycle hooks won't be duplicated\n  // between merges\n  if (Array.isArray(latest)) {\n    var res = [];\n    sealed = Array.isArray(sealed) ? sealed : [sealed];\n    for (var i = 0; i < latest.length; i++) {\n      if (sealed.indexOf(latest[i]) < 0) {\n        res.push(latest[i]);\n      }\n    }\n    return res\n  } else {\n    return latest\n  }\n}\n\nfunction Vue$2 (options) {\n  if (process.env.NODE_ENV !== 'production' &&\n    !(this instanceof Vue$2)) {\n    warn('Vue is a constructor and should be called with the `new` keyword');\n  }\n  this._init(options);\n}\n\ninitMixin(Vue$2);\nstateMixin(Vue$2);\neventsMixin(Vue$2);\nlifecycleMixin(Vue$2);\nrenderMixin(Vue$2);\n\n/*  */\n\nfunction initUse (Vue) {\n  Vue.use = function (plugin) {\n    /* istanbul ignore if */\n    if (plugin.installed) {\n      return\n    }\n    // additional parameters\n    var args = toArray(arguments, 1);\n    args.unshift(this);\n    if (typeof plugin.install === 'function') {\n      plugin.install.apply(plugin, args);\n    } else if (typeof plugin === 'function') {\n      plugin.apply(null, args);\n    }\n    plugin.installed = true;\n    return this\n  };\n}\n\n/*  */\n\nfunction initMixin$1 (Vue) {\n  Vue.mixin = function (mixin) {\n    this.options = mergeOptions(this.options, mixin);\n  };\n}\n\n/*  */\n\nfunction initExtend (Vue) {\n  /**\n   * Each instance constructor, including Vue, has a unique\n   * cid. This enables us to create wrapped \"child\n   * constructors\" for prototypal inheritance and cache them.\n   */\n  Vue.cid = 0;\n  var cid = 1;\n\n  /**\n   * Class inheritance\n   */\n  Vue.extend = function (extendOptions) {\n    extendOptions = extendOptions || {};\n    var Super = this;\n    var SuperId = Super.cid;\n    var cachedCtors = extendOptions._Ctor || (extendOptions._Ctor = {});\n    if (cachedCtors[SuperId]) {\n      return cachedCtors[SuperId]\n    }\n\n    var name = extendOptions.name || Super.options.name;\n    if (process.env.NODE_ENV !== 'production') {\n      if (!/^[a-zA-Z][\\w-]*$/.test(name)) {\n        warn(\n          'Invalid component name: \"' + name + '\". Component names ' +\n          'can only contain alphanumeric characters and the hyphen, ' +\n          'and must start with a letter.'\n        );\n      }\n    }\n\n    var Sub = function VueComponent (options) {\n      this._init(options);\n    };\n    Sub.prototype = Object.create(Super.prototype);\n    Sub.prototype.constructor = Sub;\n    Sub.cid = cid++;\n    Sub.options = mergeOptions(\n      Super.options,\n      extendOptions\n    );\n    Sub['super'] = Super;\n\n    // For props and computed properties, we define the proxy getters on\n    // the Vue instances at extension time, on the extended prototype. This\n    // avoids Object.defineProperty calls for each instance created.\n    if (Sub.options.props) {\n      initProps$1(Sub);\n    }\n    if (Sub.options.computed) {\n      initComputed$1(Sub);\n    }\n\n    // allow further extension/mixin/plugin usage\n    Sub.extend = Super.extend;\n    Sub.mixin = Super.mixin;\n    Sub.use = Super.use;\n\n    // create asset registers, so extended classes\n    // can have their private assets too.\n    config._assetTypes.forEach(function (type) {\n      Sub[type] = Super[type];\n    });\n    // enable recursive self-lookup\n    if (name) {\n      Sub.options.components[name] = Sub;\n    }\n\n    // keep a reference to the super options at extension time.\n    // later at instantiation we can check if Super's options have\n    // been updated.\n    Sub.superOptions = Super.options;\n    Sub.extendOptions = extendOptions;\n    Sub.sealedOptions = extend({}, Sub.options);\n\n    // cache constructor\n    cachedCtors[SuperId] = Sub;\n    return Sub\n  };\n}\n\nfunction initProps$1 (Comp) {\n  var props = Comp.options.props;\n  for (var key in props) {\n    proxy(Comp.prototype, \"_props\", key);\n  }\n}\n\nfunction initComputed$1 (Comp) {\n  var computed = Comp.options.computed;\n  for (var key in computed) {\n    defineComputed(Comp.prototype, key, computed[key]);\n  }\n}\n\n/*  */\n\nfunction initAssetRegisters (Vue) {\n  /**\n   * Create asset registration methods.\n   */\n  config._assetTypes.forEach(function (type) {\n    Vue[type] = function (\n      id,\n      definition\n    ) {\n      if (!definition) {\n        return this.options[type + 's'][id]\n      } else {\n        /* istanbul ignore if */\n        if (process.env.NODE_ENV !== 'production') {\n          if (type === 'component' && config.isReservedTag(id)) {\n            warn(\n              'Do not use built-in or reserved HTML elements as component ' +\n              'id: ' + id\n            );\n          }\n        }\n        if (type === 'component' && isPlainObject(definition)) {\n          definition.name = definition.name || id;\n          definition = this.options._base.extend(definition);\n        }\n        if (type === 'directive' && typeof definition === 'function') {\n          definition = { bind: definition, update: definition };\n        }\n        this.options[type + 's'][id] = definition;\n        return definition\n      }\n    };\n  });\n}\n\n/*  */\n\nvar patternTypes = [String, RegExp];\n\nfunction getComponentName (opts) {\n  return opts && (opts.Ctor.options.name || opts.tag)\n}\n\nfunction matches (pattern, name) {\n  if (typeof pattern === 'string') {\n    return pattern.split(',').indexOf(name) > -1\n  } else if (pattern instanceof RegExp) {\n    return pattern.test(name)\n  }\n  /* istanbul ignore next */\n  return false\n}\n\nfunction pruneCache (cache, filter) {\n  for (var key in cache) {\n    var cachedNode = cache[key];\n    if (cachedNode) {\n      var name = getComponentName(cachedNode.componentOptions);\n      if (name && !filter(name)) {\n        pruneCacheEntry(cachedNode);\n        cache[key] = null;\n      }\n    }\n  }\n}\n\nfunction pruneCacheEntry (vnode) {\n  if (vnode) {\n    if (!vnode.componentInstance._inactive) {\n      callHook(vnode.componentInstance, 'deactivated');\n    }\n    vnode.componentInstance.$destroy();\n  }\n}\n\nvar KeepAlive = {\n  name: 'keep-alive',\n  abstract: true,\n\n  props: {\n    include: patternTypes,\n    exclude: patternTypes\n  },\n\n  created: function created () {\n    this.cache = Object.create(null);\n  },\n\n  destroyed: function destroyed () {\n    var this$1 = this;\n\n    for (var key in this$1.cache) {\n      pruneCacheEntry(this$1.cache[key]);\n    }\n  },\n\n  watch: {\n    include: function include (val) {\n      pruneCache(this.cache, function (name) { return matches(val, name); });\n    },\n    exclude: function exclude (val) {\n      pruneCache(this.cache, function (name) { return !matches(val, name); });\n    }\n  },\n\n  render: function render () {\n    var vnode = getFirstComponentChild(this.$slots.default);\n    var componentOptions = vnode && vnode.componentOptions;\n    if (componentOptions) {\n      // check pattern\n      var name = getComponentName(componentOptions);\n      if (name && (\n        (this.include && !matches(this.include, name)) ||\n        (this.exclude && matches(this.exclude, name))\n      )) {\n        return vnode\n      }\n      var key = vnode.key == null\n        // same constructor may get registered as different local components\n        // so cid alone is not enough (#3269)\n        ? componentOptions.Ctor.cid + (componentOptions.tag ? (\"::\" + (componentOptions.tag)) : '')\n        : vnode.key;\n      if (this.cache[key]) {\n        vnode.componentInstance = this.cache[key].componentInstance;\n      } else {\n        this.cache[key] = vnode;\n      }\n      vnode.data.keepAlive = true;\n    }\n    return vnode\n  }\n};\n\nvar builtInComponents = {\n  KeepAlive: KeepAlive\n};\n\n/*  */\n\nfunction initGlobalAPI (Vue) {\n  // config\n  var configDef = {};\n  configDef.get = function () { return config; };\n  if (process.env.NODE_ENV !== 'production') {\n    configDef.set = function () {\n      warn(\n        'Do not replace the Vue.config object, set individual fields instead.'\n      );\n    };\n  }\n  Object.defineProperty(Vue, 'config', configDef);\n\n  // exposed util methods.\n  // NOTE: these are not considered part of the public API - avoid relying on\n  // them unless you are aware of the risk.\n  Vue.util = {\n    warn: warn,\n    extend: extend,\n    mergeOptions: mergeOptions,\n    defineReactive: defineReactive$$1\n  };\n\n  Vue.set = set;\n  Vue.delete = del;\n  Vue.nextTick = nextTick;\n\n  Vue.options = Object.create(null);\n  config._assetTypes.forEach(function (type) {\n    Vue.options[type + 's'] = Object.create(null);\n  });\n\n  // this is used to identify the \"base\" constructor to extend all plain-object\n  // components with in Weex's multi-instance scenarios.\n  Vue.options._base = Vue;\n\n  extend(Vue.options.components, builtInComponents);\n\n  initUse(Vue);\n  initMixin$1(Vue);\n  initExtend(Vue);\n  initAssetRegisters(Vue);\n}\n\ninitGlobalAPI(Vue$2);\n\nObject.defineProperty(Vue$2.prototype, '$isServer', {\n  get: isServerRendering\n});\n\nVue$2.version = '2.2.6';\n\n/*  */\n\n// attributes that should be using props for binding\nvar acceptValue = makeMap('input,textarea,option,select');\nvar mustUseProp = function (tag, type, attr) {\n  return (\n    (attr === 'value' && acceptValue(tag)) && type !== 'button' ||\n    (attr === 'selected' && tag === 'option') ||\n    (attr === 'checked' && tag === 'input') ||\n    (attr === 'muted' && tag === 'video')\n  )\n};\n\nvar isEnumeratedAttr = makeMap('contenteditable,draggable,spellcheck');\n\nvar isBooleanAttr = makeMap(\n  'allowfullscreen,async,autofocus,autoplay,checked,compact,controls,declare,' +\n  'default,defaultchecked,defaultmuted,defaultselected,defer,disabled,' +\n  'enabled,formnovalidate,hidden,indeterminate,inert,ismap,itemscope,loop,multiple,' +\n  'muted,nohref,noresize,noshade,novalidate,nowrap,open,pauseonexit,readonly,' +\n  'required,reversed,scoped,seamless,selected,sortable,translate,' +\n  'truespeed,typemustmatch,visible'\n);\n\nvar xlinkNS = 'http://www.w3.org/1999/xlink';\n\nvar isXlink = function (name) {\n  return name.charAt(5) === ':' && name.slice(0, 5) === 'xlink'\n};\n\nvar getXlinkProp = function (name) {\n  return isXlink(name) ? name.slice(6, name.length) : ''\n};\n\nvar isFalsyAttrValue = function (val) {\n  return val == null || val === false\n};\n\n/*  */\n\nfunction genClassForVnode (vnode) {\n  var data = vnode.data;\n  var parentNode = vnode;\n  var childNode = vnode;\n  while (childNode.componentInstance) {\n    childNode = childNode.componentInstance._vnode;\n    if (childNode.data) {\n      data = mergeClassData(childNode.data, data);\n    }\n  }\n  while ((parentNode = parentNode.parent)) {\n    if (parentNode.data) {\n      data = mergeClassData(data, parentNode.data);\n    }\n  }\n  return genClassFromData(data)\n}\n\nfunction mergeClassData (child, parent) {\n  return {\n    staticClass: concat(child.staticClass, parent.staticClass),\n    class: child.class\n      ? [child.class, parent.class]\n      : parent.class\n  }\n}\n\nfunction genClassFromData (data) {\n  var dynamicClass = data.class;\n  var staticClass = data.staticClass;\n  if (staticClass || dynamicClass) {\n    return concat(staticClass, stringifyClass(dynamicClass))\n  }\n  /* istanbul ignore next */\n  return ''\n}\n\nfunction concat (a, b) {\n  return a ? b ? (a + ' ' + b) : a : (b || '')\n}\n\nfunction stringifyClass (value) {\n  var res = '';\n  if (!value) {\n    return res\n  }\n  if (typeof value === 'string') {\n    return value\n  }\n  if (Array.isArray(value)) {\n    var stringified;\n    for (var i = 0, l = value.length; i < l; i++) {\n      if (value[i]) {\n        if ((stringified = stringifyClass(value[i]))) {\n          res += stringified + ' ';\n        }\n      }\n    }\n    return res.slice(0, -1)\n  }\n  if (isObject(value)) {\n    for (var key in value) {\n      if (value[key]) { res += key + ' '; }\n    }\n    return res.slice(0, -1)\n  }\n  /* istanbul ignore next */\n  return res\n}\n\n/*  */\n\nvar namespaceMap = {\n  svg: 'http://www.w3.org/2000/svg',\n  math: 'http://www.w3.org/1998/Math/MathML'\n};\n\nvar isHTMLTag = makeMap(\n  'html,body,base,head,link,meta,style,title,' +\n  'address,article,aside,footer,header,h1,h2,h3,h4,h5,h6,hgroup,nav,section,' +\n  'div,dd,dl,dt,figcaption,figure,hr,img,li,main,ol,p,pre,ul,' +\n  'a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,rtc,ruby,' +\n  's,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,' +\n  'embed,object,param,source,canvas,script,noscript,del,ins,' +\n  'caption,col,colgroup,table,thead,tbody,td,th,tr,' +\n  'button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,' +\n  'output,progress,select,textarea,' +\n  'details,dialog,menu,menuitem,summary,' +\n  'content,element,shadow,template'\n);\n\n// this map is intentionally selective, only covering SVG elements that may\n// contain child elements.\nvar isSVG = makeMap(\n  'svg,animate,circle,clippath,cursor,defs,desc,ellipse,filter,font-face,' +\n  'foreignObject,g,glyph,image,line,marker,mask,missing-glyph,path,pattern,' +\n  'polygon,polyline,rect,switch,symbol,text,textpath,tspan,use,view',\n  true\n);\n\n\n\nvar isReservedTag = function (tag) {\n  return isHTMLTag(tag) || isSVG(tag)\n};\n\nfunction getTagNamespace (tag) {\n  if (isSVG(tag)) {\n    return 'svg'\n  }\n  // basic support for MathML\n  // note it doesn't support other MathML elements being component roots\n  if (tag === 'math') {\n    return 'math'\n  }\n}\n\nvar unknownElementCache = Object.create(null);\nfunction isUnknownElement (tag) {\n  /* istanbul ignore if */\n  if (!inBrowser) {\n    return true\n  }\n  if (isReservedTag(tag)) {\n    return false\n  }\n  tag = tag.toLowerCase();\n  /* istanbul ignore if */\n  if (unknownElementCache[tag] != null) {\n    return unknownElementCache[tag]\n  }\n  var el = document.createElement(tag);\n  if (tag.indexOf('-') > -1) {\n    // http://stackoverflow.com/a/28210364/1070244\n    return (unknownElementCache[tag] = (\n      el.constructor === window.HTMLUnknownElement ||\n      el.constructor === window.HTMLElement\n    ))\n  } else {\n    return (unknownElementCache[tag] = /HTMLUnknownElement/.test(el.toString()))\n  }\n}\n\n/*  */\n\n/**\n * Query an element selector if it's not an element already.\n */\nfunction query (el) {\n  if (typeof el === 'string') {\n    var selected = document.querySelector(el);\n    if (!selected) {\n      process.env.NODE_ENV !== 'production' && warn(\n        'Cannot find element: ' + el\n      );\n      return document.createElement('div')\n    }\n    return selected\n  } else {\n    return el\n  }\n}\n\n/*  */\n\nfunction createElement$1 (tagName, vnode) {\n  var elm = document.createElement(tagName);\n  if (tagName !== 'select') {\n    return elm\n  }\n  // false or null will remove the attribute but undefined will not\n  if (vnode.data && vnode.data.attrs && vnode.data.attrs.multiple !== undefined) {\n    elm.setAttribute('multiple', 'multiple');\n  }\n  return elm\n}\n\nfunction createElementNS (namespace, tagName) {\n  return document.createElementNS(namespaceMap[namespace], tagName)\n}\n\nfunction createTextNode (text) {\n  return document.createTextNode(text)\n}\n\nfunction createComment (text) {\n  return document.createComment(text)\n}\n\nfunction insertBefore (parentNode, newNode, referenceNode) {\n  parentNode.insertBefore(newNode, referenceNode);\n}\n\nfunction removeChild (node, child) {\n  node.removeChild(child);\n}\n\nfunction appendChild (node, child) {\n  node.appendChild(child);\n}\n\nfunction parentNode (node) {\n  return node.parentNode\n}\n\nfunction nextSibling (node) {\n  return node.nextSibling\n}\n\nfunction tagName (node) {\n  return node.tagName\n}\n\nfunction setTextContent (node, text) {\n  node.textContent = text;\n}\n\nfunction setAttribute (node, key, val) {\n  node.setAttribute(key, val);\n}\n\n\nvar nodeOps = Object.freeze({\n\tcreateElement: createElement$1,\n\tcreateElementNS: createElementNS,\n\tcreateTextNode: createTextNode,\n\tcreateComment: createComment,\n\tinsertBefore: insertBefore,\n\tremoveChild: removeChild,\n\tappendChild: appendChild,\n\tparentNode: parentNode,\n\tnextSibling: nextSibling,\n\ttagName: tagName,\n\tsetTextContent: setTextContent,\n\tsetAttribute: setAttribute\n});\n\n/*  */\n\nvar ref = {\n  create: function create (_, vnode) {\n    registerRef(vnode);\n  },\n  update: function update (oldVnode, vnode) {\n    if (oldVnode.data.ref !== vnode.data.ref) {\n      registerRef(oldVnode, true);\n      registerRef(vnode);\n    }\n  },\n  destroy: function destroy (vnode) {\n    registerRef(vnode, true);\n  }\n};\n\nfunction registerRef (vnode, isRemoval) {\n  var key = vnode.data.ref;\n  if (!key) { return }\n\n  var vm = vnode.context;\n  var ref = vnode.componentInstance || vnode.elm;\n  var refs = vm.$refs;\n  if (isRemoval) {\n    if (Array.isArray(refs[key])) {\n      remove(refs[key], ref);\n    } else if (refs[key] === ref) {\n      refs[key] = undefined;\n    }\n  } else {\n    if (vnode.data.refInFor) {\n      if (Array.isArray(refs[key]) && refs[key].indexOf(ref) < 0) {\n        refs[key].push(ref);\n      } else {\n        refs[key] = [ref];\n      }\n    } else {\n      refs[key] = ref;\n    }\n  }\n}\n\n/**\n * Virtual DOM patching algorithm based on Snabbdom by\n * Simon Friis Vindum (@paldepind)\n * Licensed under the MIT License\n * https://github.com/paldepind/snabbdom/blob/master/LICENSE\n *\n * modified by Evan You (@yyx990803)\n *\n\n/*\n * Not type-checking this because this file is perf-critical and the cost\n * of making flow understand it is not worth it.\n */\n\nvar emptyNode = new VNode('', {}, []);\n\nvar hooks = ['create', 'activate', 'update', 'remove', 'destroy'];\n\nfunction isUndef (v) {\n  return v === undefined || v === null\n}\n\nfunction isDef (v) {\n  return v !== undefined && v !== null\n}\n\nfunction isTrue (v) {\n  return v === true\n}\n\nfunction sameVnode (a, b) {\n  return (\n    a.key === b.key &&\n    a.tag === b.tag &&\n    a.isComment === b.isComment &&\n    isDef(a.data) === isDef(b.data) &&\n    sameInputType(a, b)\n  )\n}\n\n// Some browsers do not support dynamically changing type for <input>\n// so they need to be treated as different nodes\nfunction sameInputType (a, b) {\n  if (a.tag !== 'input') { return true }\n  var i;\n  var typeA = isDef(i = a.data) && isDef(i = i.attrs) && i.type;\n  var typeB = isDef(i = b.data) && isDef(i = i.attrs) && i.type;\n  return typeA === typeB\n}\n\nfunction createKeyToOldIdx (children, beginIdx, endIdx) {\n  var i, key;\n  var map = {};\n  for (i = beginIdx; i <= endIdx; ++i) {\n    key = children[i].key;\n    if (isDef(key)) { map[key] = i; }\n  }\n  return map\n}\n\nfunction createPatchFunction (backend) {\n  var i, j;\n  var cbs = {};\n\n  var modules = backend.modules;\n  var nodeOps = backend.nodeOps;\n\n  for (i = 0; i < hooks.length; ++i) {\n    cbs[hooks[i]] = [];\n    for (j = 0; j < modules.length; ++j) {\n      if (isDef(modules[j][hooks[i]])) {\n        cbs[hooks[i]].push(modules[j][hooks[i]]);\n      }\n    }\n  }\n\n  function emptyNodeAt (elm) {\n    return new VNode(nodeOps.tagName(elm).toLowerCase(), {}, [], undefined, elm)\n  }\n\n  function createRmCb (childElm, listeners) {\n    function remove$$1 () {\n      if (--remove$$1.listeners === 0) {\n        removeNode(childElm);\n      }\n    }\n    remove$$1.listeners = listeners;\n    return remove$$1\n  }\n\n  function removeNode (el) {\n    var parent = nodeOps.parentNode(el);\n    // element may have already been removed due to v-html / v-text\n    if (isDef(parent)) {\n      nodeOps.removeChild(parent, el);\n    }\n  }\n\n  var inPre = 0;\n  function createElm (vnode, insertedVnodeQueue, parentElm, refElm, nested) {\n    vnode.isRootInsert = !nested; // for transition enter check\n    if (createComponent(vnode, insertedVnodeQueue, parentElm, refElm)) {\n      return\n    }\n\n    var data = vnode.data;\n    var children = vnode.children;\n    var tag = vnode.tag;\n    if (isDef(tag)) {\n      if (process.env.NODE_ENV !== 'production') {\n        if (data && data.pre) {\n          inPre++;\n        }\n        if (\n          !inPre &&\n          !vnode.ns &&\n          !(config.ignoredElements.length && config.ignoredElements.indexOf(tag) > -1) &&\n          config.isUnknownElement(tag)\n        ) {\n          warn(\n            'Unknown custom element: <' + tag + '> - did you ' +\n            'register the component correctly? For recursive components, ' +\n            'make sure to provide the \"name\" option.',\n            vnode.context\n          );\n        }\n      }\n      vnode.elm = vnode.ns\n        ? nodeOps.createElementNS(vnode.ns, tag)\n        : nodeOps.createElement(tag, vnode);\n      setScope(vnode);\n\n      /* istanbul ignore if */\n      {\n        createChildren(vnode, children, insertedVnodeQueue);\n        if (isDef(data)) {\n          invokeCreateHooks(vnode, insertedVnodeQueue);\n        }\n        insert(parentElm, vnode.elm, refElm);\n      }\n\n      if (process.env.NODE_ENV !== 'production' && data && data.pre) {\n        inPre--;\n      }\n    } else if (isTrue(vnode.isComment)) {\n      vnode.elm = nodeOps.createComment(vnode.text);\n      insert(parentElm, vnode.elm, refElm);\n    } else {\n      vnode.elm = nodeOps.createTextNode(vnode.text);\n      insert(parentElm, vnode.elm, refElm);\n    }\n  }\n\n  function createComponent (vnode, insertedVnodeQueue, parentElm, refElm) {\n    var i = vnode.data;\n    if (isDef(i)) {\n      var isReactivated = isDef(vnode.componentInstance) && i.keepAlive;\n      if (isDef(i = i.hook) && isDef(i = i.init)) {\n        i(vnode, false /* hydrating */, parentElm, refElm);\n      }\n      // after calling the init hook, if the vnode is a child component\n      // it should've created a child instance and mounted it. the child\n      // component also has set the placeholder vnode's elm.\n      // in that case we can just return the element and be done.\n      if (isDef(vnode.componentInstance)) {\n        initComponent(vnode, insertedVnodeQueue);\n        if (isTrue(isReactivated)) {\n          reactivateComponent(vnode, insertedVnodeQueue, parentElm, refElm);\n        }\n        return true\n      }\n    }\n  }\n\n  function initComponent (vnode, insertedVnodeQueue) {\n    if (isDef(vnode.data.pendingInsert)) {\n      insertedVnodeQueue.push.apply(insertedVnodeQueue, vnode.data.pendingInsert);\n    }\n    vnode.elm = vnode.componentInstance.$el;\n    if (isPatchable(vnode)) {\n      invokeCreateHooks(vnode, insertedVnodeQueue);\n      setScope(vnode);\n    } else {\n      // empty component root.\n      // skip all element-related modules except for ref (#3455)\n      registerRef(vnode);\n      // make sure to invoke the insert hook\n      insertedVnodeQueue.push(vnode);\n    }\n  }\n\n  function reactivateComponent (vnode, insertedVnodeQueue, parentElm, refElm) {\n    var i;\n    // hack for #4339: a reactivated component with inner transition\n    // does not trigger because the inner node's created hooks are not called\n    // again. It's not ideal to involve module-specific logic in here but\n    // there doesn't seem to be a better way to do it.\n    var innerNode = vnode;\n    while (innerNode.componentInstance) {\n      innerNode = innerNode.componentInstance._vnode;\n      if (isDef(i = innerNode.data) && isDef(i = i.transition)) {\n        for (i = 0; i < cbs.activate.length; ++i) {\n          cbs.activate[i](emptyNode, innerNode);\n        }\n        insertedVnodeQueue.push(innerNode);\n        break\n      }\n    }\n    // unlike a newly created component,\n    // a reactivated keep-alive component doesn't insert itself\n    insert(parentElm, vnode.elm, refElm);\n  }\n\n  function insert (parent, elm, ref) {\n    if (isDef(parent)) {\n      if (isDef(ref)) {\n        nodeOps.insertBefore(parent, elm, ref);\n      } else {\n        nodeOps.appendChild(parent, elm);\n      }\n    }\n  }\n\n  function createChildren (vnode, children, insertedVnodeQueue) {\n    if (Array.isArray(children)) {\n      for (var i = 0; i < children.length; ++i) {\n        createElm(children[i], insertedVnodeQueue, vnode.elm, null, true);\n      }\n    } else if (isPrimitive(vnode.text)) {\n      nodeOps.appendChild(vnode.elm, nodeOps.createTextNode(vnode.text));\n    }\n  }\n\n  function isPatchable (vnode) {\n    while (vnode.componentInstance) {\n      vnode = vnode.componentInstance._vnode;\n    }\n    return isDef(vnode.tag)\n  }\n\n  function invokeCreateHooks (vnode, insertedVnodeQueue) {\n    for (var i$1 = 0; i$1 < cbs.create.length; ++i$1) {\n      cbs.create[i$1](emptyNode, vnode);\n    }\n    i = vnode.data.hook; // Reuse variable\n    if (isDef(i)) {\n      if (isDef(i.create)) { i.create(emptyNode, vnode); }\n      if (isDef(i.insert)) { insertedVnodeQueue.push(vnode); }\n    }\n  }\n\n  // set scope id attribute for scoped CSS.\n  // this is implemented as a special case to avoid the overhead\n  // of going through the normal attribute patching process.\n  function setScope (vnode) {\n    var i;\n    var ancestor = vnode;\n    while (ancestor) {\n      if (isDef(i = ancestor.context) && isDef(i = i.$options._scopeId)) {\n        nodeOps.setAttribute(vnode.elm, i, '');\n      }\n      ancestor = ancestor.parent;\n    }\n    // for slot content they should also get the scopeId from the host instance.\n    if (isDef(i = activeInstance) &&\n        i !== vnode.context &&\n        isDef(i = i.$options._scopeId)) {\n      nodeOps.setAttribute(vnode.elm, i, '');\n    }\n  }\n\n  function addVnodes (parentElm, refElm, vnodes, startIdx, endIdx, insertedVnodeQueue) {\n    for (; startIdx <= endIdx; ++startIdx) {\n      createElm(vnodes[startIdx], insertedVnodeQueue, parentElm, refElm);\n    }\n  }\n\n  function invokeDestroyHook (vnode) {\n    var i, j;\n    var data = vnode.data;\n    if (isDef(data)) {\n      if (isDef(i = data.hook) && isDef(i = i.destroy)) { i(vnode); }\n      for (i = 0; i < cbs.destroy.length; ++i) { cbs.destroy[i](vnode); }\n    }\n    if (isDef(i = vnode.children)) {\n      for (j = 0; j < vnode.children.length; ++j) {\n        invokeDestroyHook(vnode.children[j]);\n      }\n    }\n  }\n\n  function removeVnodes (parentElm, vnodes, startIdx, endIdx) {\n    for (; startIdx <= endIdx; ++startIdx) {\n      var ch = vnodes[startIdx];\n      if (isDef(ch)) {\n        if (isDef(ch.tag)) {\n          removeAndInvokeRemoveHook(ch);\n          invokeDestroyHook(ch);\n        } else { // Text node\n          removeNode(ch.elm);\n        }\n      }\n    }\n  }\n\n  function removeAndInvokeRemoveHook (vnode, rm) {\n    if (isDef(rm) || isDef(vnode.data)) {\n      var listeners = cbs.remove.length + 1;\n      if (isDef(rm)) {\n        // we have a recursively passed down rm callback\n        // increase the listeners count\n        rm.listeners += listeners;\n      } else {\n        // directly removing\n        rm = createRmCb(vnode.elm, listeners);\n      }\n      // recursively invoke hooks on child component root node\n      if (isDef(i = vnode.componentInstance) && isDef(i = i._vnode) && isDef(i.data)) {\n        removeAndInvokeRemoveHook(i, rm);\n      }\n      for (i = 0; i < cbs.remove.length; ++i) {\n        cbs.remove[i](vnode, rm);\n      }\n      if (isDef(i = vnode.data.hook) && isDef(i = i.remove)) {\n        i(vnode, rm);\n      } else {\n        rm();\n      }\n    } else {\n      removeNode(vnode.elm);\n    }\n  }\n\n  function updateChildren (parentElm, oldCh, newCh, insertedVnodeQueue, removeOnly) {\n    var oldStartIdx = 0;\n    var newStartIdx = 0;\n    var oldEndIdx = oldCh.length - 1;\n    var oldStartVnode = oldCh[0];\n    var oldEndVnode = oldCh[oldEndIdx];\n    var newEndIdx = newCh.length - 1;\n    var newStartVnode = newCh[0];\n    var newEndVnode = newCh[newEndIdx];\n    var oldKeyToIdx, idxInOld, elmToMove, refElm;\n\n    // removeOnly is a special flag used only by <transition-group>\n    // to ensure removed elements stay in correct relative positions\n    // during leaving transitions\n    var canMove = !removeOnly;\n\n    while (oldStartIdx <= oldEndIdx && newStartIdx <= newEndIdx) {\n      if (isUndef(oldStartVnode)) {\n        oldStartVnode = oldCh[++oldStartIdx]; // Vnode has been moved left\n      } else if (isUndef(oldEndVnode)) {\n        oldEndVnode = oldCh[--oldEndIdx];\n      } else if (sameVnode(oldStartVnode, newStartVnode)) {\n        patchVnode(oldStartVnode, newStartVnode, insertedVnodeQueue);\n        oldStartVnode = oldCh[++oldStartIdx];\n        newStartVnode = newCh[++newStartIdx];\n      } else if (sameVnode(oldEndVnode, newEndVnode)) {\n        patchVnode(oldEndVnode, newEndVnode, insertedVnodeQueue);\n        oldEndVnode = oldCh[--oldEndIdx];\n        newEndVnode = newCh[--newEndIdx];\n      } else if (sameVnode(oldStartVnode, newEndVnode)) { // Vnode moved right\n        patchVnode(oldStartVnode, newEndVnode, insertedVnodeQueue);\n        canMove && nodeOps.insertBefore(parentElm, oldStartVnode.elm, nodeOps.nextSibling(oldEndVnode.elm));\n        oldStartVnode = oldCh[++oldStartIdx];\n        newEndVnode = newCh[--newEndIdx];\n      } else if (sameVnode(oldEndVnode, newStartVnode)) { // Vnode moved left\n        patchVnode(oldEndVnode, newStartVnode, insertedVnodeQueue);\n        canMove && nodeOps.insertBefore(parentElm, oldEndVnode.elm, oldStartVnode.elm);\n        oldEndVnode = oldCh[--oldEndIdx];\n        newStartVnode = newCh[++newStartIdx];\n      } else {\n        if (isUndef(oldKeyToIdx)) { oldKeyToIdx = createKeyToOldIdx(oldCh, oldStartIdx, oldEndIdx); }\n        idxInOld = isDef(newStartVnode.key) ? oldKeyToIdx[newStartVnode.key] : null;\n        if (isUndef(idxInOld)) { // New element\n          createElm(newStartVnode, insertedVnodeQueue, parentElm, oldStartVnode.elm);\n          newStartVnode = newCh[++newStartIdx];\n        } else {\n          elmToMove = oldCh[idxInOld];\n          /* istanbul ignore if */\n          if (process.env.NODE_ENV !== 'production' && !elmToMove) {\n            warn(\n              'It seems there are duplicate keys that is causing an update error. ' +\n              'Make sure each v-for item has a unique key.'\n            );\n          }\n          if (sameVnode(elmToMove, newStartVnode)) {\n            patchVnode(elmToMove, newStartVnode, insertedVnodeQueue);\n            oldCh[idxInOld] = undefined;\n            canMove && nodeOps.insertBefore(parentElm, newStartVnode.elm, oldStartVnode.elm);\n            newStartVnode = newCh[++newStartIdx];\n          } else {\n            // same key but different element. treat as new element\n            createElm(newStartVnode, insertedVnodeQueue, parentElm, oldStartVnode.elm);\n            newStartVnode = newCh[++newStartIdx];\n          }\n        }\n      }\n    }\n    if (oldStartIdx > oldEndIdx) {\n      refElm = isUndef(newCh[newEndIdx + 1]) ? null : newCh[newEndIdx + 1].elm;\n      addVnodes(parentElm, refElm, newCh, newStartIdx, newEndIdx, insertedVnodeQueue);\n    } else if (newStartIdx > newEndIdx) {\n      removeVnodes(parentElm, oldCh, oldStartIdx, oldEndIdx);\n    }\n  }\n\n  function patchVnode (oldVnode, vnode, insertedVnodeQueue, removeOnly) {\n    if (oldVnode === vnode) {\n      return\n    }\n    // reuse element for static trees.\n    // note we only do this if the vnode is cloned -\n    // if the new node is not cloned it means the render functions have been\n    // reset by the hot-reload-api and we need to do a proper re-render.\n    if (isTrue(vnode.isStatic) &&\n        isTrue(oldVnode.isStatic) &&\n        vnode.key === oldVnode.key &&\n        (isTrue(vnode.isCloned) || isTrue(vnode.isOnce))) {\n      vnode.elm = oldVnode.elm;\n      vnode.componentInstance = oldVnode.componentInstance;\n      return\n    }\n    var i;\n    var data = vnode.data;\n    if (isDef(data) && isDef(i = data.hook) && isDef(i = i.prepatch)) {\n      i(oldVnode, vnode);\n    }\n    var elm = vnode.elm = oldVnode.elm;\n    var oldCh = oldVnode.children;\n    var ch = vnode.children;\n    if (isDef(data) && isPatchable(vnode)) {\n      for (i = 0; i < cbs.update.length; ++i) { cbs.update[i](oldVnode, vnode); }\n      if (isDef(i = data.hook) && isDef(i = i.update)) { i(oldVnode, vnode); }\n    }\n    if (isUndef(vnode.text)) {\n      if (isDef(oldCh) && isDef(ch)) {\n        if (oldCh !== ch) { updateChildren(elm, oldCh, ch, insertedVnodeQueue, removeOnly); }\n      } else if (isDef(ch)) {\n        if (isDef(oldVnode.text)) { nodeOps.setTextContent(elm, ''); }\n        addVnodes(elm, null, ch, 0, ch.length - 1, insertedVnodeQueue);\n      } else if (isDef(oldCh)) {\n        removeVnodes(elm, oldCh, 0, oldCh.length - 1);\n      } else if (isDef(oldVnode.text)) {\n        nodeOps.setTextContent(elm, '');\n      }\n    } else if (oldVnode.text !== vnode.text) {\n      nodeOps.setTextContent(elm, vnode.text);\n    }\n    if (isDef(data)) {\n      if (isDef(i = data.hook) && isDef(i = i.postpatch)) { i(oldVnode, vnode); }\n    }\n  }\n\n  function invokeInsertHook (vnode, queue, initial) {\n    // delay insert hooks for component root nodes, invoke them after the\n    // element is really inserted\n    if (isTrue(initial) && isDef(vnode.parent)) {\n      vnode.parent.data.pendingInsert = queue;\n    } else {\n      for (var i = 0; i < queue.length; ++i) {\n        queue[i].data.hook.insert(queue[i]);\n      }\n    }\n  }\n\n  var bailed = false;\n  // list of modules that can skip create hook during hydration because they\n  // are already rendered on the client or has no need for initialization\n  var isRenderedModule = makeMap('attrs,style,class,staticClass,staticStyle,key');\n\n  // Note: this is a browser-only function so we can assume elms are DOM nodes.\n  function hydrate (elm, vnode, insertedVnodeQueue) {\n    if (process.env.NODE_ENV !== 'production') {\n      if (!assertNodeMatch(elm, vnode)) {\n        return false\n      }\n    }\n    vnode.elm = elm;\n    var tag = vnode.tag;\n    var data = vnode.data;\n    var children = vnode.children;\n    if (isDef(data)) {\n      if (isDef(i = data.hook) && isDef(i = i.init)) { i(vnode, true /* hydrating */); }\n      if (isDef(i = vnode.componentInstance)) {\n        // child component. it should have hydrated its own tree.\n        initComponent(vnode, insertedVnodeQueue);\n        return true\n      }\n    }\n    if (isDef(tag)) {\n      if (isDef(children)) {\n        // empty element, allow client to pick up and populate children\n        if (!elm.hasChildNodes()) {\n          createChildren(vnode, children, insertedVnodeQueue);\n        } else {\n          var childrenMatch = true;\n          var childNode = elm.firstChild;\n          for (var i$1 = 0; i$1 < children.length; i$1++) {\n            if (!childNode || !hydrate(childNode, children[i$1], insertedVnodeQueue)) {\n              childrenMatch = false;\n              break\n            }\n            childNode = childNode.nextSibling;\n          }\n          // if childNode is not null, it means the actual childNodes list is\n          // longer than the virtual children list.\n          if (!childrenMatch || childNode) {\n            if (process.env.NODE_ENV !== 'production' &&\n                typeof console !== 'undefined' &&\n                !bailed) {\n              bailed = true;\n              console.warn('Parent: ', elm);\n              console.warn('Mismatching childNodes vs. VNodes: ', elm.childNodes, children);\n            }\n            return false\n          }\n        }\n      }\n      if (isDef(data)) {\n        for (var key in data) {\n          if (!isRenderedModule(key)) {\n            invokeCreateHooks(vnode, insertedVnodeQueue);\n            break\n          }\n        }\n      }\n    } else if (elm.data !== vnode.text) {\n      elm.data = vnode.text;\n    }\n    return true\n  }\n\n  function assertNodeMatch (node, vnode) {\n    if (isDef(vnode.tag)) {\n      return (\n        vnode.tag.indexOf('vue-component') === 0 ||\n        vnode.tag.toLowerCase() === (node.tagName && node.tagName.toLowerCase())\n      )\n    } else {\n      return node.nodeType === (vnode.isComment ? 8 : 3)\n    }\n  }\n\n  return function patch (oldVnode, vnode, hydrating, removeOnly, parentElm, refElm) {\n    if (isUndef(vnode)) {\n      if (isDef(oldVnode)) { invokeDestroyHook(oldVnode); }\n      return\n    }\n\n    var isInitialPatch = false;\n    var insertedVnodeQueue = [];\n\n    if (isUndef(oldVnode)) {\n      // empty mount (likely as component), create new root element\n      isInitialPatch = true;\n      createElm(vnode, insertedVnodeQueue, parentElm, refElm);\n    } else {\n      var isRealElement = isDef(oldVnode.nodeType);\n      if (!isRealElement && sameVnode(oldVnode, vnode)) {\n        // patch existing root node\n        patchVnode(oldVnode, vnode, insertedVnodeQueue, removeOnly);\n      } else {\n        if (isRealElement) {\n          // mounting to a real element\n          // check if this is server-rendered content and if we can perform\n          // a successful hydration.\n          if (oldVnode.nodeType === 1 && oldVnode.hasAttribute('server-rendered')) {\n            oldVnode.removeAttribute('server-rendered');\n            hydrating = true;\n          }\n          if (isTrue(hydrating)) {\n            if (hydrate(oldVnode, vnode, insertedVnodeQueue)) {\n              invokeInsertHook(vnode, insertedVnodeQueue, true);\n              return oldVnode\n            } else if (process.env.NODE_ENV !== 'production') {\n              warn(\n                'The client-side rendered virtual DOM tree is not matching ' +\n                'server-rendered content. This is likely caused by incorrect ' +\n                'HTML markup, for example nesting block-level elements inside ' +\n                '<p>, or missing <tbody>. Bailing hydration and performing ' +\n                'full client-side render.'\n              );\n            }\n          }\n          // either not server-rendered, or hydration failed.\n          // create an empty node and replace it\n          oldVnode = emptyNodeAt(oldVnode);\n        }\n        // replacing existing element\n        var oldElm = oldVnode.elm;\n        var parentElm$1 = nodeOps.parentNode(oldElm);\n        createElm(\n          vnode,\n          insertedVnodeQueue,\n          // extremely rare edge case: do not insert if old element is in a\n          // leaving transition. Only happens when combining transition +\n          // keep-alive + HOCs. (#4590)\n          oldElm._leaveCb ? null : parentElm$1,\n          nodeOps.nextSibling(oldElm)\n        );\n\n        if (isDef(vnode.parent)) {\n          // component root element replaced.\n          // update parent placeholder node element, recursively\n          var ancestor = vnode.parent;\n          while (ancestor) {\n            ancestor.elm = vnode.elm;\n            ancestor = ancestor.parent;\n          }\n          if (isPatchable(vnode)) {\n            for (var i = 0; i < cbs.create.length; ++i) {\n              cbs.create[i](emptyNode, vnode.parent);\n            }\n          }\n        }\n\n        if (isDef(parentElm$1)) {\n          removeVnodes(parentElm$1, [oldVnode], 0, 0);\n        } else if (isDef(oldVnode.tag)) {\n          invokeDestroyHook(oldVnode);\n        }\n      }\n    }\n\n    invokeInsertHook(vnode, insertedVnodeQueue, isInitialPatch);\n    return vnode.elm\n  }\n}\n\n/*  */\n\nvar directives = {\n  create: updateDirectives,\n  update: updateDirectives,\n  destroy: function unbindDirectives (vnode) {\n    updateDirectives(vnode, emptyNode);\n  }\n};\n\nfunction updateDirectives (oldVnode, vnode) {\n  if (oldVnode.data.directives || vnode.data.directives) {\n    _update(oldVnode, vnode);\n  }\n}\n\nfunction _update (oldVnode, vnode) {\n  var isCreate = oldVnode === emptyNode;\n  var isDestroy = vnode === emptyNode;\n  var oldDirs = normalizeDirectives$1(oldVnode.data.directives, oldVnode.context);\n  var newDirs = normalizeDirectives$1(vnode.data.directives, vnode.context);\n\n  var dirsWithInsert = [];\n  var dirsWithPostpatch = [];\n\n  var key, oldDir, dir;\n  for (key in newDirs) {\n    oldDir = oldDirs[key];\n    dir = newDirs[key];\n    if (!oldDir) {\n      // new directive, bind\n      callHook$1(dir, 'bind', vnode, oldVnode);\n      if (dir.def && dir.def.inserted) {\n        dirsWithInsert.push(dir);\n      }\n    } else {\n      // existing directive, update\n      dir.oldValue = oldDir.value;\n      callHook$1(dir, 'update', vnode, oldVnode);\n      if (dir.def && dir.def.componentUpdated) {\n        dirsWithPostpatch.push(dir);\n      }\n    }\n  }\n\n  if (dirsWithInsert.length) {\n    var callInsert = function () {\n      for (var i = 0; i < dirsWithInsert.length; i++) {\n        callHook$1(dirsWithInsert[i], 'inserted', vnode, oldVnode);\n      }\n    };\n    if (isCreate) {\n      mergeVNodeHook(vnode.data.hook || (vnode.data.hook = {}), 'insert', callInsert);\n    } else {\n      callInsert();\n    }\n  }\n\n  if (dirsWithPostpatch.length) {\n    mergeVNodeHook(vnode.data.hook || (vnode.data.hook = {}), 'postpatch', function () {\n      for (var i = 0; i < dirsWithPostpatch.length; i++) {\n        callHook$1(dirsWithPostpatch[i], 'componentUpdated', vnode, oldVnode);\n      }\n    });\n  }\n\n  if (!isCreate) {\n    for (key in oldDirs) {\n      if (!newDirs[key]) {\n        // no longer present, unbind\n        callHook$1(oldDirs[key], 'unbind', oldVnode, oldVnode, isDestroy);\n      }\n    }\n  }\n}\n\nvar emptyModifiers = Object.create(null);\n\nfunction normalizeDirectives$1 (\n  dirs,\n  vm\n) {\n  var res = Object.create(null);\n  if (!dirs) {\n    return res\n  }\n  var i, dir;\n  for (i = 0; i < dirs.length; i++) {\n    dir = dirs[i];\n    if (!dir.modifiers) {\n      dir.modifiers = emptyModifiers;\n    }\n    res[getRawDirName(dir)] = dir;\n    dir.def = resolveAsset(vm.$options, 'directives', dir.name, true);\n  }\n  return res\n}\n\nfunction getRawDirName (dir) {\n  return dir.rawName || ((dir.name) + \".\" + (Object.keys(dir.modifiers || {}).join('.')))\n}\n\nfunction callHook$1 (dir, hook, vnode, oldVnode, isDestroy) {\n  var fn = dir.def && dir.def[hook];\n  if (fn) {\n    fn(vnode.elm, dir, vnode, oldVnode, isDestroy);\n  }\n}\n\nvar baseModules = [\n  ref,\n  directives\n];\n\n/*  */\n\nfunction updateAttrs (oldVnode, vnode) {\n  if (!oldVnode.data.attrs && !vnode.data.attrs) {\n    return\n  }\n  var key, cur, old;\n  var elm = vnode.elm;\n  var oldAttrs = oldVnode.data.attrs || {};\n  var attrs = vnode.data.attrs || {};\n  // clone observed objects, as the user probably wants to mutate it\n  if (attrs.__ob__) {\n    attrs = vnode.data.attrs = extend({}, attrs);\n  }\n\n  for (key in attrs) {\n    cur = attrs[key];\n    old = oldAttrs[key];\n    if (old !== cur) {\n      setAttr(elm, key, cur);\n    }\n  }\n  // #4391: in IE9, setting type can reset value for input[type=radio]\n  /* istanbul ignore if */\n  if (isIE9 && attrs.value !== oldAttrs.value) {\n    setAttr(elm, 'value', attrs.value);\n  }\n  for (key in oldAttrs) {\n    if (attrs[key] == null) {\n      if (isXlink(key)) {\n        elm.removeAttributeNS(xlinkNS, getXlinkProp(key));\n      } else if (!isEnumeratedAttr(key)) {\n        elm.removeAttribute(key);\n      }\n    }\n  }\n}\n\nfunction setAttr (el, key, value) {\n  if (isBooleanAttr(key)) {\n    // set attribute for blank value\n    // e.g. <option disabled>Select one</option>\n    if (isFalsyAttrValue(value)) {\n      el.removeAttribute(key);\n    } else {\n      el.setAttribute(key, key);\n    }\n  } else if (isEnumeratedAttr(key)) {\n    el.setAttribute(key, isFalsyAttrValue(value) || value === 'false' ? 'false' : 'true');\n  } else if (isXlink(key)) {\n    if (isFalsyAttrValue(value)) {\n      el.removeAttributeNS(xlinkNS, getXlinkProp(key));\n    } else {\n      el.setAttributeNS(xlinkNS, key, value);\n    }\n  } else {\n    if (isFalsyAttrValue(value)) {\n      el.removeAttribute(key);\n    } else {\n      el.setAttribute(key, value);\n    }\n  }\n}\n\nvar attrs = {\n  create: updateAttrs,\n  update: updateAttrs\n};\n\n/*  */\n\nfunction updateClass (oldVnode, vnode) {\n  var el = vnode.elm;\n  var data = vnode.data;\n  var oldData = oldVnode.data;\n  if (!data.staticClass && !data.class &&\n      (!oldData || (!oldData.staticClass && !oldData.class))) {\n    return\n  }\n\n  var cls = genClassForVnode(vnode);\n\n  // handle transition classes\n  var transitionClass = el._transitionClasses;\n  if (transitionClass) {\n    cls = concat(cls, stringifyClass(transitionClass));\n  }\n\n  // set the class\n  if (cls !== el._prevClass) {\n    el.setAttribute('class', cls);\n    el._prevClass = cls;\n  }\n}\n\nvar klass = {\n  create: updateClass,\n  update: updateClass\n};\n\n/*  */\n\nvar validDivisionCharRE = /[\\w).+\\-_$\\]]/;\n\n\n\nfunction wrapFilter (exp, filter) {\n  var i = filter.indexOf('(');\n  if (i < 0) {\n    // _f: resolveFilter\n    return (\"_f(\\\"\" + filter + \"\\\")(\" + exp + \")\")\n  } else {\n    var name = filter.slice(0, i);\n    var args = filter.slice(i + 1);\n    return (\"_f(\\\"\" + name + \"\\\")(\" + exp + \",\" + args)\n  }\n}\n\n/*  */\n\n/*  */\n\n/**\n * Cross-platform code generation for component v-model\n */\n\n\n/**\n * Cross-platform codegen helper for generating v-model value assignment code.\n */\n\n\n/**\n * parse directive model to do the array update transform. a[idx] = val => $$a.splice($$idx, 1, val)\n *\n * for loop possible cases:\n *\n * - test\n * - test[idx]\n * - test[test1[idx]]\n * - test[\"a\"][idx]\n * - xxx.test[a[a].test1[idx]]\n * - test.xxx.a[\"asa\"][test1[idx]]\n *\n */\n\nvar str;\nvar index$1;\n\n/*  */\n\n// in some cases, the event used has to be determined at runtime\n// so we used some reserved tokens during compile.\nvar RANGE_TOKEN = '__r';\nvar CHECKBOX_RADIO_TOKEN = '__c';\n\n/*  */\n\n// normalize v-model event tokens that can only be determined at runtime.\n// it's important to place the event as the first in the array because\n// the whole point is ensuring the v-model callback gets called before\n// user-attached handlers.\nfunction normalizeEvents (on) {\n  var event;\n  /* istanbul ignore if */\n  if (on[RANGE_TOKEN]) {\n    // IE input[type=range] only supports `change` event\n    event = isIE ? 'change' : 'input';\n    on[event] = [].concat(on[RANGE_TOKEN], on[event] || []);\n    delete on[RANGE_TOKEN];\n  }\n  if (on[CHECKBOX_RADIO_TOKEN]) {\n    // Chrome fires microtasks in between click/change, leads to #4521\n    event = isChrome ? 'click' : 'change';\n    on[event] = [].concat(on[CHECKBOX_RADIO_TOKEN], on[event] || []);\n    delete on[CHECKBOX_RADIO_TOKEN];\n  }\n}\n\nvar target$1;\n\nfunction add$1 (\n  event,\n  handler,\n  once,\n  capture\n) {\n  if (once) {\n    var oldHandler = handler;\n    var _target = target$1; // save current target element in closure\n    handler = function (ev) {\n      var res = arguments.length === 1\n        ? oldHandler(ev)\n        : oldHandler.apply(null, arguments);\n      if (res !== null) {\n        remove$2(event, handler, capture, _target);\n      }\n    };\n  }\n  target$1.addEventListener(event, handler, capture);\n}\n\nfunction remove$2 (\n  event,\n  handler,\n  capture,\n  _target\n) {\n  (_target || target$1).removeEventListener(event, handler, capture);\n}\n\nfunction updateDOMListeners (oldVnode, vnode) {\n  if (!oldVnode.data.on && !vnode.data.on) {\n    return\n  }\n  var on = vnode.data.on || {};\n  var oldOn = oldVnode.data.on || {};\n  target$1 = vnode.elm;\n  normalizeEvents(on);\n  updateListeners(on, oldOn, add$1, remove$2, vnode.context);\n}\n\nvar events = {\n  create: updateDOMListeners,\n  update: updateDOMListeners\n};\n\n/*  */\n\nfunction updateDOMProps (oldVnode, vnode) {\n  if (!oldVnode.data.domProps && !vnode.data.domProps) {\n    return\n  }\n  var key, cur;\n  var elm = vnode.elm;\n  var oldProps = oldVnode.data.domProps || {};\n  var props = vnode.data.domProps || {};\n  // clone observed objects, as the user probably wants to mutate it\n  if (props.__ob__) {\n    props = vnode.data.domProps = extend({}, props);\n  }\n\n  for (key in oldProps) {\n    if (props[key] == null) {\n      elm[key] = '';\n    }\n  }\n  for (key in props) {\n    cur = props[key];\n    // ignore children if the node has textContent or innerHTML,\n    // as these will throw away existing DOM nodes and cause removal errors\n    // on subsequent patches (#3360)\n    if (key === 'textContent' || key === 'innerHTML') {\n      if (vnode.children) { vnode.children.length = 0; }\n      if (cur === oldProps[key]) { continue }\n    }\n\n    if (key === 'value') {\n      // store value as _value as well since\n      // non-string values will be stringified\n      elm._value = cur;\n      // avoid resetting cursor position when value is the same\n      var strCur = cur == null ? '' : String(cur);\n      if (shouldUpdateValue(elm, vnode, strCur)) {\n        elm.value = strCur;\n      }\n    } else {\n      elm[key] = cur;\n    }\n  }\n}\n\n// check platforms/web/util/attrs.js acceptValue\n\n\nfunction shouldUpdateValue (\n  elm,\n  vnode,\n  checkVal\n) {\n  return (!elm.composing && (\n    vnode.tag === 'option' ||\n    isDirty(elm, checkVal) ||\n    isInputChanged(elm, checkVal)\n  ))\n}\n\nfunction isDirty (elm, checkVal) {\n  // return true when textbox (.number and .trim) loses focus and its value is not equal to the updated value\n  return document.activeElement !== elm && elm.value !== checkVal\n}\n\nfunction isInputChanged (elm, newVal) {\n  var value = elm.value;\n  var modifiers = elm._vModifiers; // injected by v-model runtime\n  if ((modifiers && modifiers.number) || elm.type === 'number') {\n    return toNumber(value) !== toNumber(newVal)\n  }\n  if (modifiers && modifiers.trim) {\n    return value.trim() !== newVal.trim()\n  }\n  return value !== newVal\n}\n\nvar domProps = {\n  create: updateDOMProps,\n  update: updateDOMProps\n};\n\n/*  */\n\nvar parseStyleText = cached(function (cssText) {\n  var res = {};\n  var listDelimiter = /;(?![^(]*\\))/g;\n  var propertyDelimiter = /:(.+)/;\n  cssText.split(listDelimiter).forEach(function (item) {\n    if (item) {\n      var tmp = item.split(propertyDelimiter);\n      tmp.length > 1 && (res[tmp[0].trim()] = tmp[1].trim());\n    }\n  });\n  return res\n});\n\n// merge static and dynamic style data on the same vnode\nfunction normalizeStyleData (data) {\n  var style = normalizeStyleBinding(data.style);\n  // static style is pre-processed into an object during compilation\n  // and is always a fresh object, so it's safe to merge into it\n  return data.staticStyle\n    ? extend(data.staticStyle, style)\n    : style\n}\n\n// normalize possible array / string values into Object\nfunction normalizeStyleBinding (bindingStyle) {\n  if (Array.isArray(bindingStyle)) {\n    return toObject(bindingStyle)\n  }\n  if (typeof bindingStyle === 'string') {\n    return parseStyleText(bindingStyle)\n  }\n  return bindingStyle\n}\n\n/**\n * parent component style should be after child's\n * so that parent component's style could override it\n */\nfunction getStyle (vnode, checkChild) {\n  var res = {};\n  var styleData;\n\n  if (checkChild) {\n    var childNode = vnode;\n    while (childNode.componentInstance) {\n      childNode = childNode.componentInstance._vnode;\n      if (childNode.data && (styleData = normalizeStyleData(childNode.data))) {\n        extend(res, styleData);\n      }\n    }\n  }\n\n  if ((styleData = normalizeStyleData(vnode.data))) {\n    extend(res, styleData);\n  }\n\n  var parentNode = vnode;\n  while ((parentNode = parentNode.parent)) {\n    if (parentNode.data && (styleData = normalizeStyleData(parentNode.data))) {\n      extend(res, styleData);\n    }\n  }\n  return res\n}\n\n/*  */\n\nvar cssVarRE = /^--/;\nvar importantRE = /\\s*!important$/;\nvar setProp = function (el, name, val) {\n  /* istanbul ignore if */\n  if (cssVarRE.test(name)) {\n    el.style.setProperty(name, val);\n  } else if (importantRE.test(val)) {\n    el.style.setProperty(name, val.replace(importantRE, ''), 'important');\n  } else {\n    el.style[normalize(name)] = val;\n  }\n};\n\nvar prefixes = ['Webkit', 'Moz', 'ms'];\n\nvar testEl;\nvar normalize = cached(function (prop) {\n  testEl = testEl || document.createElement('div');\n  prop = camelize(prop);\n  if (prop !== 'filter' && (prop in testEl.style)) {\n    return prop\n  }\n  var upper = prop.charAt(0).toUpperCase() + prop.slice(1);\n  for (var i = 0; i < prefixes.length; i++) {\n    var prefixed = prefixes[i] + upper;\n    if (prefixed in testEl.style) {\n      return prefixed\n    }\n  }\n});\n\nfunction updateStyle (oldVnode, vnode) {\n  var data = vnode.data;\n  var oldData = oldVnode.data;\n\n  if (!data.staticStyle && !data.style &&\n      !oldData.staticStyle && !oldData.style) {\n    return\n  }\n\n  var cur, name;\n  var el = vnode.elm;\n  var oldStaticStyle = oldVnode.data.staticStyle;\n  var oldStyleBinding = oldVnode.data.style || {};\n\n  // if static style exists, stylebinding already merged into it when doing normalizeStyleData\n  var oldStyle = oldStaticStyle || oldStyleBinding;\n\n  var style = normalizeStyleBinding(vnode.data.style) || {};\n\n  vnode.data.style = style.__ob__ ? extend({}, style) : style;\n\n  var newStyle = getStyle(vnode, true);\n\n  for (name in oldStyle) {\n    if (newStyle[name] == null) {\n      setProp(el, name, '');\n    }\n  }\n  for (name in newStyle) {\n    cur = newStyle[name];\n    if (cur !== oldStyle[name]) {\n      // ie9 setting to null has no effect, must use empty string\n      setProp(el, name, cur == null ? '' : cur);\n    }\n  }\n}\n\nvar style = {\n  create: updateStyle,\n  update: updateStyle\n};\n\n/*  */\n\n/**\n * Add class with compatibility for SVG since classList is not supported on\n * SVG elements in IE\n */\nfunction addClass (el, cls) {\n  /* istanbul ignore if */\n  if (!cls || !(cls = cls.trim())) {\n    return\n  }\n\n  /* istanbul ignore else */\n  if (el.classList) {\n    if (cls.indexOf(' ') > -1) {\n      cls.split(/\\s+/).forEach(function (c) { return el.classList.add(c); });\n    } else {\n      el.classList.add(cls);\n    }\n  } else {\n    var cur = \" \" + (el.getAttribute('class') || '') + \" \";\n    if (cur.indexOf(' ' + cls + ' ') < 0) {\n      el.setAttribute('class', (cur + cls).trim());\n    }\n  }\n}\n\n/**\n * Remove class with compatibility for SVG since classList is not supported on\n * SVG elements in IE\n */\nfunction removeClass (el, cls) {\n  /* istanbul ignore if */\n  if (!cls || !(cls = cls.trim())) {\n    return\n  }\n\n  /* istanbul ignore else */\n  if (el.classList) {\n    if (cls.indexOf(' ') > -1) {\n      cls.split(/\\s+/).forEach(function (c) { return el.classList.remove(c); });\n    } else {\n      el.classList.remove(cls);\n    }\n  } else {\n    var cur = \" \" + (el.getAttribute('class') || '') + \" \";\n    var tar = ' ' + cls + ' ';\n    while (cur.indexOf(tar) >= 0) {\n      cur = cur.replace(tar, ' ');\n    }\n    el.setAttribute('class', cur.trim());\n  }\n}\n\n/*  */\n\nfunction resolveTransition (def$$1) {\n  if (!def$$1) {\n    return\n  }\n  /* istanbul ignore else */\n  if (typeof def$$1 === 'object') {\n    var res = {};\n    if (def$$1.css !== false) {\n      extend(res, autoCssTransition(def$$1.name || 'v'));\n    }\n    extend(res, def$$1);\n    return res\n  } else if (typeof def$$1 === 'string') {\n    return autoCssTransition(def$$1)\n  }\n}\n\nvar autoCssTransition = cached(function (name) {\n  return {\n    enterClass: (name + \"-enter\"),\n    enterToClass: (name + \"-enter-to\"),\n    enterActiveClass: (name + \"-enter-active\"),\n    leaveClass: (name + \"-leave\"),\n    leaveToClass: (name + \"-leave-to\"),\n    leaveActiveClass: (name + \"-leave-active\")\n  }\n});\n\nvar hasTransition = inBrowser && !isIE9;\nvar TRANSITION = 'transition';\nvar ANIMATION = 'animation';\n\n// Transition property/event sniffing\nvar transitionProp = 'transition';\nvar transitionEndEvent = 'transitionend';\nvar animationProp = 'animation';\nvar animationEndEvent = 'animationend';\nif (hasTransition) {\n  /* istanbul ignore if */\n  if (window.ontransitionend === undefined &&\n    window.onwebkittransitionend !== undefined) {\n    transitionProp = 'WebkitTransition';\n    transitionEndEvent = 'webkitTransitionEnd';\n  }\n  if (window.onanimationend === undefined &&\n    window.onwebkitanimationend !== undefined) {\n    animationProp = 'WebkitAnimation';\n    animationEndEvent = 'webkitAnimationEnd';\n  }\n}\n\n// binding to window is necessary to make hot reload work in IE in strict mode\nvar raf = inBrowser && window.requestAnimationFrame\n  ? window.requestAnimationFrame.bind(window)\n  : setTimeout;\n\nfunction nextFrame (fn) {\n  raf(function () {\n    raf(fn);\n  });\n}\n\nfunction addTransitionClass (el, cls) {\n  (el._transitionClasses || (el._transitionClasses = [])).push(cls);\n  addClass(el, cls);\n}\n\nfunction removeTransitionClass (el, cls) {\n  if (el._transitionClasses) {\n    remove(el._transitionClasses, cls);\n  }\n  removeClass(el, cls);\n}\n\nfunction whenTransitionEnds (\n  el,\n  expectedType,\n  cb\n) {\n  var ref = getTransitionInfo(el, expectedType);\n  var type = ref.type;\n  var timeout = ref.timeout;\n  var propCount = ref.propCount;\n  if (!type) { return cb() }\n  var event = type === TRANSITION ? transitionEndEvent : animationEndEvent;\n  var ended = 0;\n  var end = function () {\n    el.removeEventListener(event, onEnd);\n    cb();\n  };\n  var onEnd = function (e) {\n    if (e.target === el) {\n      if (++ended >= propCount) {\n        end();\n      }\n    }\n  };\n  setTimeout(function () {\n    if (ended < propCount) {\n      end();\n    }\n  }, timeout + 1);\n  el.addEventListener(event, onEnd);\n}\n\nvar transformRE = /\\b(transform|all)(,|$)/;\n\nfunction getTransitionInfo (el, expectedType) {\n  var styles = window.getComputedStyle(el);\n  var transitionDelays = styles[transitionProp + 'Delay'].split(', ');\n  var transitionDurations = styles[transitionProp + 'Duration'].split(', ');\n  var transitionTimeout = getTimeout(transitionDelays, transitionDurations);\n  var animationDelays = styles[animationProp + 'Delay'].split(', ');\n  var animationDurations = styles[animationProp + 'Duration'].split(', ');\n  var animationTimeout = getTimeout(animationDelays, animationDurations);\n\n  var type;\n  var timeout = 0;\n  var propCount = 0;\n  /* istanbul ignore if */\n  if (expectedType === TRANSITION) {\n    if (transitionTimeout > 0) {\n      type = TRANSITION;\n      timeout = transitionTimeout;\n      propCount = transitionDurations.length;\n    }\n  } else if (expectedType === ANIMATION) {\n    if (animationTimeout > 0) {\n      type = ANIMATION;\n      timeout = animationTimeout;\n      propCount = animationDurations.length;\n    }\n  } else {\n    timeout = Math.max(transitionTimeout, animationTimeout);\n    type = timeout > 0\n      ? transitionTimeout > animationTimeout\n        ? TRANSITION\n        : ANIMATION\n      : null;\n    propCount = type\n      ? type === TRANSITION\n        ? transitionDurations.length\n        : animationDurations.length\n      : 0;\n  }\n  var hasTransform =\n    type === TRANSITION &&\n    transformRE.test(styles[transitionProp + 'Property']);\n  return {\n    type: type,\n    timeout: timeout,\n    propCount: propCount,\n    hasTransform: hasTransform\n  }\n}\n\nfunction getTimeout (delays, durations) {\n  /* istanbul ignore next */\n  while (delays.length < durations.length) {\n    delays = delays.concat(delays);\n  }\n\n  return Math.max.apply(null, durations.map(function (d, i) {\n    return toMs(d) + toMs(delays[i])\n  }))\n}\n\nfunction toMs (s) {\n  return Number(s.slice(0, -1)) * 1000\n}\n\n/*  */\n\nfunction enter (vnode, toggleDisplay) {\n  var el = vnode.elm;\n\n  // call leave callback now\n  if (el._leaveCb) {\n    el._leaveCb.cancelled = true;\n    el._leaveCb();\n  }\n\n  var data = resolveTransition(vnode.data.transition);\n  if (!data) {\n    return\n  }\n\n  /* istanbul ignore if */\n  if (el._enterCb || el.nodeType !== 1) {\n    return\n  }\n\n  var css = data.css;\n  var type = data.type;\n  var enterClass = data.enterClass;\n  var enterToClass = data.enterToClass;\n  var enterActiveClass = data.enterActiveClass;\n  var appearClass = data.appearClass;\n  var appearToClass = data.appearToClass;\n  var appearActiveClass = data.appearActiveClass;\n  var beforeEnter = data.beforeEnter;\n  var enter = data.enter;\n  var afterEnter = data.afterEnter;\n  var enterCancelled = data.enterCancelled;\n  var beforeAppear = data.beforeAppear;\n  var appear = data.appear;\n  var afterAppear = data.afterAppear;\n  var appearCancelled = data.appearCancelled;\n  var duration = data.duration;\n\n  // activeInstance will always be the <transition> component managing this\n  // transition. One edge case to check is when the <transition> is placed\n  // as the root node of a child component. In that case we need to check\n  // <transition>'s parent for appear check.\n  var context = activeInstance;\n  var transitionNode = activeInstance.$vnode;\n  while (transitionNode && transitionNode.parent) {\n    transitionNode = transitionNode.parent;\n    context = transitionNode.context;\n  }\n\n  var isAppear = !context._isMounted || !vnode.isRootInsert;\n\n  if (isAppear && !appear && appear !== '') {\n    return\n  }\n\n  var startClass = isAppear && appearClass\n    ? appearClass\n    : enterClass;\n  var activeClass = isAppear && appearActiveClass\n    ? appearActiveClass\n    : enterActiveClass;\n  var toClass = isAppear && appearToClass\n    ? appearToClass\n    : enterToClass;\n\n  var beforeEnterHook = isAppear\n    ? (beforeAppear || beforeEnter)\n    : beforeEnter;\n  var enterHook = isAppear\n    ? (typeof appear === 'function' ? appear : enter)\n    : enter;\n  var afterEnterHook = isAppear\n    ? (afterAppear || afterEnter)\n    : afterEnter;\n  var enterCancelledHook = isAppear\n    ? (appearCancelled || enterCancelled)\n    : enterCancelled;\n\n  var explicitEnterDuration = toNumber(\n    isObject(duration)\n      ? duration.enter\n      : duration\n  );\n\n  if (process.env.NODE_ENV !== 'production' && explicitEnterDuration != null) {\n    checkDuration(explicitEnterDuration, 'enter', vnode);\n  }\n\n  var expectsCSS = css !== false && !isIE9;\n  var userWantsControl = getHookArgumentsLength(enterHook);\n\n  var cb = el._enterCb = once(function () {\n    if (expectsCSS) {\n      removeTransitionClass(el, toClass);\n      removeTransitionClass(el, activeClass);\n    }\n    if (cb.cancelled) {\n      if (expectsCSS) {\n        removeTransitionClass(el, startClass);\n      }\n      enterCancelledHook && enterCancelledHook(el);\n    } else {\n      afterEnterHook && afterEnterHook(el);\n    }\n    el._enterCb = null;\n  });\n\n  if (!vnode.data.show) {\n    // remove pending leave element on enter by injecting an insert hook\n    mergeVNodeHook(vnode.data.hook || (vnode.data.hook = {}), 'insert', function () {\n      var parent = el.parentNode;\n      var pendingNode = parent && parent._pending && parent._pending[vnode.key];\n      if (pendingNode &&\n          pendingNode.tag === vnode.tag &&\n          pendingNode.elm._leaveCb) {\n        pendingNode.elm._leaveCb();\n      }\n      enterHook && enterHook(el, cb);\n    });\n  }\n\n  // start enter transition\n  beforeEnterHook && beforeEnterHook(el);\n  if (expectsCSS) {\n    addTransitionClass(el, startClass);\n    addTransitionClass(el, activeClass);\n    nextFrame(function () {\n      addTransitionClass(el, toClass);\n      removeTransitionClass(el, startClass);\n      if (!cb.cancelled && !userWantsControl) {\n        if (isValidDuration(explicitEnterDuration)) {\n          setTimeout(cb, explicitEnterDuration);\n        } else {\n          whenTransitionEnds(el, type, cb);\n        }\n      }\n    });\n  }\n\n  if (vnode.data.show) {\n    toggleDisplay && toggleDisplay();\n    enterHook && enterHook(el, cb);\n  }\n\n  if (!expectsCSS && !userWantsControl) {\n    cb();\n  }\n}\n\nfunction leave (vnode, rm) {\n  var el = vnode.elm;\n\n  // call enter callback now\n  if (el._enterCb) {\n    el._enterCb.cancelled = true;\n    el._enterCb();\n  }\n\n  var data = resolveTransition(vnode.data.transition);\n  if (!data) {\n    return rm()\n  }\n\n  /* istanbul ignore if */\n  if (el._leaveCb || el.nodeType !== 1) {\n    return\n  }\n\n  var css = data.css;\n  var type = data.type;\n  var leaveClass = data.leaveClass;\n  var leaveToClass = data.leaveToClass;\n  var leaveActiveClass = data.leaveActiveClass;\n  var beforeLeave = data.beforeLeave;\n  var leave = data.leave;\n  var afterLeave = data.afterLeave;\n  var leaveCancelled = data.leaveCancelled;\n  var delayLeave = data.delayLeave;\n  var duration = data.duration;\n\n  var expectsCSS = css !== false && !isIE9;\n  var userWantsControl = getHookArgumentsLength(leave);\n\n  var explicitLeaveDuration = toNumber(\n    isObject(duration)\n      ? duration.leave\n      : duration\n  );\n\n  if (process.env.NODE_ENV !== 'production' && explicitLeaveDuration != null) {\n    checkDuration(explicitLeaveDuration, 'leave', vnode);\n  }\n\n  var cb = el._leaveCb = once(function () {\n    if (el.parentNode && el.parentNode._pending) {\n      el.parentNode._pending[vnode.key] = null;\n    }\n    if (expectsCSS) {\n      removeTransitionClass(el, leaveToClass);\n      removeTransitionClass(el, leaveActiveClass);\n    }\n    if (cb.cancelled) {\n      if (expectsCSS) {\n        removeTransitionClass(el, leaveClass);\n      }\n      leaveCancelled && leaveCancelled(el);\n    } else {\n      rm();\n      afterLeave && afterLeave(el);\n    }\n    el._leaveCb = null;\n  });\n\n  if (delayLeave) {\n    delayLeave(performLeave);\n  } else {\n    performLeave();\n  }\n\n  function performLeave () {\n    // the delayed leave may have already been cancelled\n    if (cb.cancelled) {\n      return\n    }\n    // record leaving element\n    if (!vnode.data.show) {\n      (el.parentNode._pending || (el.parentNode._pending = {}))[vnode.key] = vnode;\n    }\n    beforeLeave && beforeLeave(el);\n    if (expectsCSS) {\n      addTransitionClass(el, leaveClass);\n      addTransitionClass(el, leaveActiveClass);\n      nextFrame(function () {\n        addTransitionClass(el, leaveToClass);\n        removeTransitionClass(el, leaveClass);\n        if (!cb.cancelled && !userWantsControl) {\n          if (isValidDuration(explicitLeaveDuration)) {\n            setTimeout(cb, explicitLeaveDuration);\n          } else {\n            whenTransitionEnds(el, type, cb);\n          }\n        }\n      });\n    }\n    leave && leave(el, cb);\n    if (!expectsCSS && !userWantsControl) {\n      cb();\n    }\n  }\n}\n\n// only used in dev mode\nfunction checkDuration (val, name, vnode) {\n  if (typeof val !== 'number') {\n    warn(\n      \"<transition> explicit \" + name + \" duration is not a valid number - \" +\n      \"got \" + (JSON.stringify(val)) + \".\",\n      vnode.context\n    );\n  } else if (isNaN(val)) {\n    warn(\n      \"<transition> explicit \" + name + \" duration is NaN - \" +\n      'the duration expression might be incorrect.',\n      vnode.context\n    );\n  }\n}\n\nfunction isValidDuration (val) {\n  return typeof val === 'number' && !isNaN(val)\n}\n\n/**\n * Normalize a transition hook's argument length. The hook may be:\n * - a merged hook (invoker) with the original in .fns\n * - a wrapped component method (check ._length)\n * - a plain function (.length)\n */\nfunction getHookArgumentsLength (fn) {\n  if (!fn) { return false }\n  var invokerFns = fn.fns;\n  if (invokerFns) {\n    // invoker\n    return getHookArgumentsLength(\n      Array.isArray(invokerFns)\n        ? invokerFns[0]\n        : invokerFns\n    )\n  } else {\n    return (fn._length || fn.length) > 1\n  }\n}\n\nfunction _enter (_, vnode) {\n  if (!vnode.data.show) {\n    enter(vnode);\n  }\n}\n\nvar transition = inBrowser ? {\n  create: _enter,\n  activate: _enter,\n  remove: function remove$$1 (vnode, rm) {\n    /* istanbul ignore else */\n    if (!vnode.data.show) {\n      leave(vnode, rm);\n    } else {\n      rm();\n    }\n  }\n} : {};\n\nvar platformModules = [\n  attrs,\n  klass,\n  events,\n  domProps,\n  style,\n  transition\n];\n\n/*  */\n\n// the directive module should be applied last, after all\n// built-in modules have been applied.\nvar modules = platformModules.concat(baseModules);\n\nvar patch = createPatchFunction({ nodeOps: nodeOps, modules: modules });\n\n/**\n * Not type checking this file because flow doesn't like attaching\n * properties to Elements.\n */\n\n/* istanbul ignore if */\nif (isIE9) {\n  // http://www.matts411.com/post/internet-explorer-9-oninput/\n  document.addEventListener('selectionchange', function () {\n    var el = document.activeElement;\n    if (el && el.vmodel) {\n      trigger(el, 'input');\n    }\n  });\n}\n\nvar model$1 = {\n  inserted: function inserted (el, binding, vnode) {\n    if (vnode.tag === 'select') {\n      var cb = function () {\n        setSelected(el, binding, vnode.context);\n      };\n      cb();\n      /* istanbul ignore if */\n      if (isIE || isEdge) {\n        setTimeout(cb, 0);\n      }\n    } else if (vnode.tag === 'textarea' || el.type === 'text' || el.type === 'password') {\n      el._vModifiers = binding.modifiers;\n      if (!binding.modifiers.lazy) {\n        if (!isAndroid) {\n          el.addEventListener('compositionstart', onCompositionStart);\n          el.addEventListener('compositionend', onCompositionEnd);\n        }\n        /* istanbul ignore if */\n        if (isIE9) {\n          el.vmodel = true;\n        }\n      }\n    }\n  },\n  componentUpdated: function componentUpdated (el, binding, vnode) {\n    if (vnode.tag === 'select') {\n      setSelected(el, binding, vnode.context);\n      // in case the options rendered by v-for have changed,\n      // it's possible that the value is out-of-sync with the rendered options.\n      // detect such cases and filter out values that no longer has a matching\n      // option in the DOM.\n      var needReset = el.multiple\n        ? binding.value.some(function (v) { return hasNoMatchingOption(v, el.options); })\n        : binding.value !== binding.oldValue && hasNoMatchingOption(binding.value, el.options);\n      if (needReset) {\n        trigger(el, 'change');\n      }\n    }\n  }\n};\n\nfunction setSelected (el, binding, vm) {\n  var value = binding.value;\n  var isMultiple = el.multiple;\n  if (isMultiple && !Array.isArray(value)) {\n    process.env.NODE_ENV !== 'production' && warn(\n      \"<select multiple v-model=\\\"\" + (binding.expression) + \"\\\"> \" +\n      \"expects an Array value for its binding, but got \" + (Object.prototype.toString.call(value).slice(8, -1)),\n      vm\n    );\n    return\n  }\n  var selected, option;\n  for (var i = 0, l = el.options.length; i < l; i++) {\n    option = el.options[i];\n    if (isMultiple) {\n      selected = looseIndexOf(value, getValue(option)) > -1;\n      if (option.selected !== selected) {\n        option.selected = selected;\n      }\n    } else {\n      if (looseEqual(getValue(option), value)) {\n        if (el.selectedIndex !== i) {\n          el.selectedIndex = i;\n        }\n        return\n      }\n    }\n  }\n  if (!isMultiple) {\n    el.selectedIndex = -1;\n  }\n}\n\nfunction hasNoMatchingOption (value, options) {\n  for (var i = 0, l = options.length; i < l; i++) {\n    if (looseEqual(getValue(options[i]), value)) {\n      return false\n    }\n  }\n  return true\n}\n\nfunction getValue (option) {\n  return '_value' in option\n    ? option._value\n    : option.value\n}\n\nfunction onCompositionStart (e) {\n  e.target.composing = true;\n}\n\nfunction onCompositionEnd (e) {\n  e.target.composing = false;\n  trigger(e.target, 'input');\n}\n\nfunction trigger (el, type) {\n  var e = document.createEvent('HTMLEvents');\n  e.initEvent(type, true, true);\n  el.dispatchEvent(e);\n}\n\n/*  */\n\n// recursively search for possible transition defined inside the component root\nfunction locateNode (vnode) {\n  return vnode.componentInstance && (!vnode.data || !vnode.data.transition)\n    ? locateNode(vnode.componentInstance._vnode)\n    : vnode\n}\n\nvar show = {\n  bind: function bind (el, ref, vnode) {\n    var value = ref.value;\n\n    vnode = locateNode(vnode);\n    var transition = vnode.data && vnode.data.transition;\n    var originalDisplay = el.__vOriginalDisplay =\n      el.style.display === 'none' ? '' : el.style.display;\n    if (value && transition && !isIE9) {\n      vnode.data.show = true;\n      enter(vnode, function () {\n        el.style.display = originalDisplay;\n      });\n    } else {\n      el.style.display = value ? originalDisplay : 'none';\n    }\n  },\n\n  update: function update (el, ref, vnode) {\n    var value = ref.value;\n    var oldValue = ref.oldValue;\n\n    /* istanbul ignore if */\n    if (value === oldValue) { return }\n    vnode = locateNode(vnode);\n    var transition = vnode.data && vnode.data.transition;\n    if (transition && !isIE9) {\n      vnode.data.show = true;\n      if (value) {\n        enter(vnode, function () {\n          el.style.display = el.__vOriginalDisplay;\n        });\n      } else {\n        leave(vnode, function () {\n          el.style.display = 'none';\n        });\n      }\n    } else {\n      el.style.display = value ? el.__vOriginalDisplay : 'none';\n    }\n  },\n\n  unbind: function unbind (\n    el,\n    binding,\n    vnode,\n    oldVnode,\n    isDestroy\n  ) {\n    if (!isDestroy) {\n      el.style.display = el.__vOriginalDisplay;\n    }\n  }\n};\n\nvar platformDirectives = {\n  model: model$1,\n  show: show\n};\n\n/*  */\n\n// Provides transition support for a single element/component.\n// supports transition mode (out-in / in-out)\n\nvar transitionProps = {\n  name: String,\n  appear: Boolean,\n  css: Boolean,\n  mode: String,\n  type: String,\n  enterClass: String,\n  leaveClass: String,\n  enterToClass: String,\n  leaveToClass: String,\n  enterActiveClass: String,\n  leaveActiveClass: String,\n  appearClass: String,\n  appearActiveClass: String,\n  appearToClass: String,\n  duration: [Number, String, Object]\n};\n\n// in case the child is also an abstract component, e.g. <keep-alive>\n// we want to recursively retrieve the real component to be rendered\nfunction getRealChild (vnode) {\n  var compOptions = vnode && vnode.componentOptions;\n  if (compOptions && compOptions.Ctor.options.abstract) {\n    return getRealChild(getFirstComponentChild(compOptions.children))\n  } else {\n    return vnode\n  }\n}\n\nfunction extractTransitionData (comp) {\n  var data = {};\n  var options = comp.$options;\n  // props\n  for (var key in options.propsData) {\n    data[key] = comp[key];\n  }\n  // events.\n  // extract listeners and pass them directly to the transition methods\n  var listeners = options._parentListeners;\n  for (var key$1 in listeners) {\n    data[camelize(key$1)] = listeners[key$1];\n  }\n  return data\n}\n\nfunction placeholder (h, rawChild) {\n  return /\\d-keep-alive$/.test(rawChild.tag)\n    ? h('keep-alive')\n    : null\n}\n\nfunction hasParentTransition (vnode) {\n  while ((vnode = vnode.parent)) {\n    if (vnode.data.transition) {\n      return true\n    }\n  }\n}\n\nfunction isSameChild (child, oldChild) {\n  return oldChild.key === child.key && oldChild.tag === child.tag\n}\n\nvar Transition = {\n  name: 'transition',\n  props: transitionProps,\n  abstract: true,\n\n  render: function render (h) {\n    var this$1 = this;\n\n    var children = this.$slots.default;\n    if (!children) {\n      return\n    }\n\n    // filter out text nodes (possible whitespaces)\n    children = children.filter(function (c) { return c.tag; });\n    /* istanbul ignore if */\n    if (!children.length) {\n      return\n    }\n\n    // warn multiple elements\n    if (process.env.NODE_ENV !== 'production' && children.length > 1) {\n      warn(\n        '<transition> can only be used on a single element. Use ' +\n        '<transition-group> for lists.',\n        this.$parent\n      );\n    }\n\n    var mode = this.mode;\n\n    // warn invalid mode\n    if (process.env.NODE_ENV !== 'production' &&\n        mode && mode !== 'in-out' && mode !== 'out-in') {\n      warn(\n        'invalid <transition> mode: ' + mode,\n        this.$parent\n      );\n    }\n\n    var rawChild = children[0];\n\n    // if this is a component root node and the component's\n    // parent container node also has transition, skip.\n    if (hasParentTransition(this.$vnode)) {\n      return rawChild\n    }\n\n    // apply transition data to child\n    // use getRealChild() to ignore abstract components e.g. keep-alive\n    var child = getRealChild(rawChild);\n    /* istanbul ignore if */\n    if (!child) {\n      return rawChild\n    }\n\n    if (this._leaving) {\n      return placeholder(h, rawChild)\n    }\n\n    // ensure a key that is unique to the vnode type and to this transition\n    // component instance. This key will be used to remove pending leaving nodes\n    // during entering.\n    var id = \"__transition-\" + (this._uid) + \"-\";\n    child.key = child.key == null\n      ? id + child.tag\n      : isPrimitive(child.key)\n        ? (String(child.key).indexOf(id) === 0 ? child.key : id + child.key)\n        : child.key;\n\n    var data = (child.data || (child.data = {})).transition = extractTransitionData(this);\n    var oldRawChild = this._vnode;\n    var oldChild = getRealChild(oldRawChild);\n\n    // mark v-show\n    // so that the transition module can hand over the control to the directive\n    if (child.data.directives && child.data.directives.some(function (d) { return d.name === 'show'; })) {\n      child.data.show = true;\n    }\n\n    if (oldChild && oldChild.data && !isSameChild(child, oldChild)) {\n      // replace old child transition data with fresh one\n      // important for dynamic transitions!\n      var oldData = oldChild && (oldChild.data.transition = extend({}, data));\n      // handle transition mode\n      if (mode === 'out-in') {\n        // return placeholder node and queue update when leave finishes\n        this._leaving = true;\n        mergeVNodeHook(oldData, 'afterLeave', function () {\n          this$1._leaving = false;\n          this$1.$forceUpdate();\n        });\n        return placeholder(h, rawChild)\n      } else if (mode === 'in-out') {\n        var delayedLeave;\n        var performLeave = function () { delayedLeave(); };\n        mergeVNodeHook(data, 'afterEnter', performLeave);\n        mergeVNodeHook(data, 'enterCancelled', performLeave);\n        mergeVNodeHook(oldData, 'delayLeave', function (leave) { delayedLeave = leave; });\n      }\n    }\n\n    return rawChild\n  }\n};\n\n/*  */\n\n// Provides transition support for list items.\n// supports move transitions using the FLIP technique.\n\n// Because the vdom's children update algorithm is \"unstable\" - i.e.\n// it doesn't guarantee the relative positioning of removed elements,\n// we force transition-group to update its children into two passes:\n// in the first pass, we remove all nodes that need to be removed,\n// triggering their leaving transition; in the second pass, we insert/move\n// into the final desired state. This way in the second pass removed\n// nodes will remain where they should be.\n\nvar props = extend({\n  tag: String,\n  moveClass: String\n}, transitionProps);\n\ndelete props.mode;\n\nvar TransitionGroup = {\n  props: props,\n\n  render: function render (h) {\n    var tag = this.tag || this.$vnode.data.tag || 'span';\n    var map = Object.create(null);\n    var prevChildren = this.prevChildren = this.children;\n    var rawChildren = this.$slots.default || [];\n    var children = this.children = [];\n    var transitionData = extractTransitionData(this);\n\n    for (var i = 0; i < rawChildren.length; i++) {\n      var c = rawChildren[i];\n      if (c.tag) {\n        if (c.key != null && String(c.key).indexOf('__vlist') !== 0) {\n          children.push(c);\n          map[c.key] = c\n          ;(c.data || (c.data = {})).transition = transitionData;\n        } else if (process.env.NODE_ENV !== 'production') {\n          var opts = c.componentOptions;\n          var name = opts ? (opts.Ctor.options.name || opts.tag || '') : c.tag;\n          warn((\"<transition-group> children must be keyed: <\" + name + \">\"));\n        }\n      }\n    }\n\n    if (prevChildren) {\n      var kept = [];\n      var removed = [];\n      for (var i$1 = 0; i$1 < prevChildren.length; i$1++) {\n        var c$1 = prevChildren[i$1];\n        c$1.data.transition = transitionData;\n        c$1.data.pos = c$1.elm.getBoundingClientRect();\n        if (map[c$1.key]) {\n          kept.push(c$1);\n        } else {\n          removed.push(c$1);\n        }\n      }\n      this.kept = h(tag, null, kept);\n      this.removed = removed;\n    }\n\n    return h(tag, null, children)\n  },\n\n  beforeUpdate: function beforeUpdate () {\n    // force removing pass\n    this.__patch__(\n      this._vnode,\n      this.kept,\n      false, // hydrating\n      true // removeOnly (!important, avoids unnecessary moves)\n    );\n    this._vnode = this.kept;\n  },\n\n  updated: function updated () {\n    var children = this.prevChildren;\n    var moveClass = this.moveClass || ((this.name || 'v') + '-move');\n    if (!children.length || !this.hasMove(children[0].elm, moveClass)) {\n      return\n    }\n\n    // we divide the work into three loops to avoid mixing DOM reads and writes\n    // in each iteration - which helps prevent layout thrashing.\n    children.forEach(callPendingCbs);\n    children.forEach(recordPosition);\n    children.forEach(applyTranslation);\n\n    // force reflow to put everything in position\n    var body = document.body;\n    var f = body.offsetHeight; // eslint-disable-line\n\n    children.forEach(function (c) {\n      if (c.data.moved) {\n        var el = c.elm;\n        var s = el.style;\n        addTransitionClass(el, moveClass);\n        s.transform = s.WebkitTransform = s.transitionDuration = '';\n        el.addEventListener(transitionEndEvent, el._moveCb = function cb (e) {\n          if (!e || /transform$/.test(e.propertyName)) {\n            el.removeEventListener(transitionEndEvent, cb);\n            el._moveCb = null;\n            removeTransitionClass(el, moveClass);\n          }\n        });\n      }\n    });\n  },\n\n  methods: {\n    hasMove: function hasMove (el, moveClass) {\n      /* istanbul ignore if */\n      if (!hasTransition) {\n        return false\n      }\n      if (this._hasMove != null) {\n        return this._hasMove\n      }\n      // Detect whether an element with the move class applied has\n      // CSS transitions. Since the element may be inside an entering\n      // transition at this very moment, we make a clone of it and remove\n      // all other transition classes applied to ensure only the move class\n      // is applied.\n      var clone = el.cloneNode();\n      if (el._transitionClasses) {\n        el._transitionClasses.forEach(function (cls) { removeClass(clone, cls); });\n      }\n      addClass(clone, moveClass);\n      clone.style.display = 'none';\n      this.$el.appendChild(clone);\n      var info = getTransitionInfo(clone);\n      this.$el.removeChild(clone);\n      return (this._hasMove = info.hasTransform)\n    }\n  }\n};\n\nfunction callPendingCbs (c) {\n  /* istanbul ignore if */\n  if (c.elm._moveCb) {\n    c.elm._moveCb();\n  }\n  /* istanbul ignore if */\n  if (c.elm._enterCb) {\n    c.elm._enterCb();\n  }\n}\n\nfunction recordPosition (c) {\n  c.data.newPos = c.elm.getBoundingClientRect();\n}\n\nfunction applyTranslation (c) {\n  var oldPos = c.data.pos;\n  var newPos = c.data.newPos;\n  var dx = oldPos.left - newPos.left;\n  var dy = oldPos.top - newPos.top;\n  if (dx || dy) {\n    c.data.moved = true;\n    var s = c.elm.style;\n    s.transform = s.WebkitTransform = \"translate(\" + dx + \"px,\" + dy + \"px)\";\n    s.transitionDuration = '0s';\n  }\n}\n\nvar platformComponents = {\n  Transition: Transition,\n  TransitionGroup: TransitionGroup\n};\n\n/*  */\n\n// install platform specific utils\nVue$2.config.mustUseProp = mustUseProp;\nVue$2.config.isReservedTag = isReservedTag;\nVue$2.config.getTagNamespace = getTagNamespace;\nVue$2.config.isUnknownElement = isUnknownElement;\n\n// install platform runtime directives & components\nextend(Vue$2.options.directives, platformDirectives);\nextend(Vue$2.options.components, platformComponents);\n\n// install platform patch function\nVue$2.prototype.__patch__ = inBrowser ? patch : noop;\n\n// public mount method\nVue$2.prototype.$mount = function (\n  el,\n  hydrating\n) {\n  el = el && inBrowser ? query(el) : undefined;\n  return mountComponent(this, el, hydrating)\n};\n\n// devtools global hook\n/* istanbul ignore next */\nsetTimeout(function () {\n  if (config.devtools) {\n    if (devtools) {\n      devtools.emit('init', Vue$2);\n    } else if (process.env.NODE_ENV !== 'production' && isChrome) {\n      console[console.info ? 'info' : 'log'](\n        'Download the Vue Devtools extension for a better development experience:\\n' +\n        'https://github.com/vuejs/vue-devtools'\n      );\n    }\n  }\n  if (process.env.NODE_ENV !== 'production' &&\n      config.productionTip !== false &&\n      inBrowser && typeof console !== 'undefined') {\n    console[console.info ? 'info' : 'log'](\n      \"You are running Vue in development mode.\\n\" +\n      \"Make sure to turn on production mode when deploying for production.\\n\" +\n      \"See more tips at https://vuejs.org/guide/deployment.html\"\n    );\n  }\n}, 0);\n\nmodule.exports = Vue$2;\n"
  },
  {
    "path": "static/vuejs/vue.runtime.esm.js",
    "content": "/*!\n * Vue.js v2.2.6\n * (c) 2014-2017 Evan You\n * Released under the MIT License.\n */\n/*  */\n\n/**\n * Convert a value to a string that is actually rendered.\n */\nfunction _toString (val) {\n  return val == null\n    ? ''\n    : typeof val === 'object'\n      ? JSON.stringify(val, null, 2)\n      : String(val)\n}\n\n/**\n * Convert a input value to a number for persistence.\n * If the conversion fails, return original string.\n */\nfunction toNumber (val) {\n  var n = parseFloat(val);\n  return isNaN(n) ? val : n\n}\n\n/**\n * Make a map and return a function for checking if a key\n * is in that map.\n */\nfunction makeMap (\n  str,\n  expectsLowerCase\n) {\n  var map = Object.create(null);\n  var list = str.split(',');\n  for (var i = 0; i < list.length; i++) {\n    map[list[i]] = true;\n  }\n  return expectsLowerCase\n    ? function (val) { return map[val.toLowerCase()]; }\n    : function (val) { return map[val]; }\n}\n\n/**\n * Check if a tag is a built-in tag.\n */\nvar isBuiltInTag = makeMap('slot,component', true);\n\n/**\n * Remove an item from an array\n */\nfunction remove (arr, item) {\n  if (arr.length) {\n    var index = arr.indexOf(item);\n    if (index > -1) {\n      return arr.splice(index, 1)\n    }\n  }\n}\n\n/**\n * Check whether the object has the property.\n */\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nfunction hasOwn (obj, key) {\n  return hasOwnProperty.call(obj, key)\n}\n\n/**\n * Check if value is primitive\n */\nfunction isPrimitive (value) {\n  return typeof value === 'string' || typeof value === 'number'\n}\n\n/**\n * Create a cached version of a pure function.\n */\nfunction cached (fn) {\n  var cache = Object.create(null);\n  return (function cachedFn (str) {\n    var hit = cache[str];\n    return hit || (cache[str] = fn(str))\n  })\n}\n\n/**\n * Camelize a hyphen-delimited string.\n */\nvar camelizeRE = /-(\\w)/g;\nvar camelize = cached(function (str) {\n  return str.replace(camelizeRE, function (_, c) { return c ? c.toUpperCase() : ''; })\n});\n\n/**\n * Capitalize a string.\n */\nvar capitalize = cached(function (str) {\n  return str.charAt(0).toUpperCase() + str.slice(1)\n});\n\n/**\n * Hyphenate a camelCase string.\n */\nvar hyphenateRE = /([^-])([A-Z])/g;\nvar hyphenate = cached(function (str) {\n  return str\n    .replace(hyphenateRE, '$1-$2')\n    .replace(hyphenateRE, '$1-$2')\n    .toLowerCase()\n});\n\n/**\n * Simple bind, faster than native\n */\nfunction bind (fn, ctx) {\n  function boundFn (a) {\n    var l = arguments.length;\n    return l\n      ? l > 1\n        ? fn.apply(ctx, arguments)\n        : fn.call(ctx, a)\n      : fn.call(ctx)\n  }\n  // record original fn length\n  boundFn._length = fn.length;\n  return boundFn\n}\n\n/**\n * Convert an Array-like object to a real Array.\n */\nfunction toArray (list, start) {\n  start = start || 0;\n  var i = list.length - start;\n  var ret = new Array(i);\n  while (i--) {\n    ret[i] = list[i + start];\n  }\n  return ret\n}\n\n/**\n * Mix properties into target object.\n */\nfunction extend (to, _from) {\n  for (var key in _from) {\n    to[key] = _from[key];\n  }\n  return to\n}\n\n/**\n * Quick object check - this is primarily used to tell\n * Objects from primitive values when we know the value\n * is a JSON-compliant type.\n */\nfunction isObject (obj) {\n  return obj !== null && typeof obj === 'object'\n}\n\n/**\n * Strict object type check. Only returns true\n * for plain JavaScript objects.\n */\nvar toString = Object.prototype.toString;\nvar OBJECT_STRING = '[object Object]';\nfunction isPlainObject (obj) {\n  return toString.call(obj) === OBJECT_STRING\n}\n\n/**\n * Merge an Array of Objects into a single Object.\n */\nfunction toObject (arr) {\n  var res = {};\n  for (var i = 0; i < arr.length; i++) {\n    if (arr[i]) {\n      extend(res, arr[i]);\n    }\n  }\n  return res\n}\n\n/**\n * Perform no operation.\n */\nfunction noop () {}\n\n/**\n * Always return false.\n */\nvar no = function () { return false; };\n\n/**\n * Return same value\n */\nvar identity = function (_) { return _; };\n\n/**\n * Generate a static keys string from compiler modules.\n */\n\n\n/**\n * Check if two values are loosely equal - that is,\n * if they are plain objects, do they have the same shape?\n */\nfunction looseEqual (a, b) {\n  var isObjectA = isObject(a);\n  var isObjectB = isObject(b);\n  if (isObjectA && isObjectB) {\n    try {\n      return JSON.stringify(a) === JSON.stringify(b)\n    } catch (e) {\n      // possible circular reference\n      return a === b\n    }\n  } else if (!isObjectA && !isObjectB) {\n    return String(a) === String(b)\n  } else {\n    return false\n  }\n}\n\nfunction looseIndexOf (arr, val) {\n  for (var i = 0; i < arr.length; i++) {\n    if (looseEqual(arr[i], val)) { return i }\n  }\n  return -1\n}\n\n/**\n * Ensure a function is called only once.\n */\nfunction once (fn) {\n  var called = false;\n  return function () {\n    if (!called) {\n      called = true;\n      fn();\n    }\n  }\n}\n\n/*  */\n\nvar config = {\n  /**\n   * Option merge strategies (used in core/util/options)\n   */\n  optionMergeStrategies: Object.create(null),\n\n  /**\n   * Whether to suppress warnings.\n   */\n  silent: false,\n\n  /**\n   * Show production mode tip message on boot?\n   */\n  productionTip: process.env.NODE_ENV !== 'production',\n\n  /**\n   * Whether to enable devtools\n   */\n  devtools: process.env.NODE_ENV !== 'production',\n\n  /**\n   * Whether to record perf\n   */\n  performance: false,\n\n  /**\n   * Error handler for watcher errors\n   */\n  errorHandler: null,\n\n  /**\n   * Ignore certain custom elements\n   */\n  ignoredElements: [],\n\n  /**\n   * Custom user key aliases for v-on\n   */\n  keyCodes: Object.create(null),\n\n  /**\n   * Check if a tag is reserved so that it cannot be registered as a\n   * component. This is platform-dependent and may be overwritten.\n   */\n  isReservedTag: no,\n\n  /**\n   * Check if a tag is an unknown element.\n   * Platform-dependent.\n   */\n  isUnknownElement: no,\n\n  /**\n   * Get the namespace of an element\n   */\n  getTagNamespace: noop,\n\n  /**\n   * Parse the real tag name for the specific platform.\n   */\n  parsePlatformTagName: identity,\n\n  /**\n   * Check if an attribute must be bound using property, e.g. value\n   * Platform-dependent.\n   */\n  mustUseProp: no,\n\n  /**\n   * List of asset types that a component can own.\n   */\n  _assetTypes: [\n    'component',\n    'directive',\n    'filter'\n  ],\n\n  /**\n   * List of lifecycle hooks.\n   */\n  _lifecycleHooks: [\n    'beforeCreate',\n    'created',\n    'beforeMount',\n    'mounted',\n    'beforeUpdate',\n    'updated',\n    'beforeDestroy',\n    'destroyed',\n    'activated',\n    'deactivated'\n  ],\n\n  /**\n   * Max circular updates allowed in a scheduler flush cycle.\n   */\n  _maxUpdateCount: 100\n};\n\n/*  */\n\nvar emptyObject = Object.freeze({});\n\n/**\n * Check if a string starts with $ or _\n */\nfunction isReserved (str) {\n  var c = (str + '').charCodeAt(0);\n  return c === 0x24 || c === 0x5F\n}\n\n/**\n * Define a property.\n */\nfunction def (obj, key, val, enumerable) {\n  Object.defineProperty(obj, key, {\n    value: val,\n    enumerable: !!enumerable,\n    writable: true,\n    configurable: true\n  });\n}\n\n/**\n * Parse simple path.\n */\nvar bailRE = /[^\\w.$]/;\nfunction parsePath (path) {\n  if (bailRE.test(path)) {\n    return\n  }\n  var segments = path.split('.');\n  return function (obj) {\n    for (var i = 0; i < segments.length; i++) {\n      if (!obj) { return }\n      obj = obj[segments[i]];\n    }\n    return obj\n  }\n}\n\n/*  */\n/* globals MutationObserver */\n\n// can we use __proto__?\nvar hasProto = '__proto__' in {};\n\n// Browser environment sniffing\nvar inBrowser = typeof window !== 'undefined';\nvar UA = inBrowser && window.navigator.userAgent.toLowerCase();\nvar isIE = UA && /msie|trident/.test(UA);\nvar isIE9 = UA && UA.indexOf('msie 9.0') > 0;\nvar isEdge = UA && UA.indexOf('edge/') > 0;\nvar isAndroid = UA && UA.indexOf('android') > 0;\nvar isIOS = UA && /iphone|ipad|ipod|ios/.test(UA);\nvar isChrome = UA && /chrome\\/\\d+/.test(UA) && !isEdge;\n\n// this needs to be lazy-evaled because vue may be required before\n// vue-server-renderer can set VUE_ENV\nvar _isServer;\nvar isServerRendering = function () {\n  if (_isServer === undefined) {\n    /* istanbul ignore if */\n    if (!inBrowser && typeof global !== 'undefined') {\n      // detect presence of vue-server-renderer and avoid\n      // Webpack shimming the process\n      _isServer = global['process'].env.VUE_ENV === 'server';\n    } else {\n      _isServer = false;\n    }\n  }\n  return _isServer\n};\n\n// detect devtools\nvar devtools = inBrowser && window.__VUE_DEVTOOLS_GLOBAL_HOOK__;\n\n/* istanbul ignore next */\nfunction isNative (Ctor) {\n  return /native code/.test(Ctor.toString())\n}\n\nvar hasSymbol =\n  typeof Symbol !== 'undefined' && isNative(Symbol) &&\n  typeof Reflect !== 'undefined' && isNative(Reflect.ownKeys);\n\n/**\n * Defer a task to execute it asynchronously.\n */\nvar nextTick = (function () {\n  var callbacks = [];\n  var pending = false;\n  var timerFunc;\n\n  function nextTickHandler () {\n    pending = false;\n    var copies = callbacks.slice(0);\n    callbacks.length = 0;\n    for (var i = 0; i < copies.length; i++) {\n      copies[i]();\n    }\n  }\n\n  // the nextTick behavior leverages the microtask queue, which can be accessed\n  // via either native Promise.then or MutationObserver.\n  // MutationObserver has wider support, however it is seriously bugged in\n  // UIWebView in iOS >= 9.3.3 when triggered in touch event handlers. It\n  // completely stops working after triggering a few times... so, if native\n  // Promise is available, we will use it:\n  /* istanbul ignore if */\n  if (typeof Promise !== 'undefined' && isNative(Promise)) {\n    var p = Promise.resolve();\n    var logError = function (err) { console.error(err); };\n    timerFunc = function () {\n      p.then(nextTickHandler).catch(logError);\n      // in problematic UIWebViews, Promise.then doesn't completely break, but\n      // it can get stuck in a weird state where callbacks are pushed into the\n      // microtask queue but the queue isn't being flushed, until the browser\n      // needs to do some other work, e.g. handle a timer. Therefore we can\n      // \"force\" the microtask queue to be flushed by adding an empty timer.\n      if (isIOS) { setTimeout(noop); }\n    };\n  } else if (typeof MutationObserver !== 'undefined' && (\n    isNative(MutationObserver) ||\n    // PhantomJS and iOS 7.x\n    MutationObserver.toString() === '[object MutationObserverConstructor]'\n  )) {\n    // use MutationObserver where native Promise is not available,\n    // e.g. PhantomJS IE11, iOS7, Android 4.4\n    var counter = 1;\n    var observer = new MutationObserver(nextTickHandler);\n    var textNode = document.createTextNode(String(counter));\n    observer.observe(textNode, {\n      characterData: true\n    });\n    timerFunc = function () {\n      counter = (counter + 1) % 2;\n      textNode.data = String(counter);\n    };\n  } else {\n    // fallback to setTimeout\n    /* istanbul ignore next */\n    timerFunc = function () {\n      setTimeout(nextTickHandler, 0);\n    };\n  }\n\n  return function queueNextTick (cb, ctx) {\n    var _resolve;\n    callbacks.push(function () {\n      if (cb) { cb.call(ctx); }\n      if (_resolve) { _resolve(ctx); }\n    });\n    if (!pending) {\n      pending = true;\n      timerFunc();\n    }\n    if (!cb && typeof Promise !== 'undefined') {\n      return new Promise(function (resolve) {\n        _resolve = resolve;\n      })\n    }\n  }\n})();\n\nvar _Set;\n/* istanbul ignore if */\nif (typeof Set !== 'undefined' && isNative(Set)) {\n  // use native Set when available.\n  _Set = Set;\n} else {\n  // a non-standard Set polyfill that only works with primitive keys.\n  _Set = (function () {\n    function Set () {\n      this.set = Object.create(null);\n    }\n    Set.prototype.has = function has (key) {\n      return this.set[key] === true\n    };\n    Set.prototype.add = function add (key) {\n      this.set[key] = true;\n    };\n    Set.prototype.clear = function clear () {\n      this.set = Object.create(null);\n    };\n\n    return Set;\n  }());\n}\n\nvar warn = noop;\nvar tip = noop;\nvar formatComponentName;\n\nif (process.env.NODE_ENV !== 'production') {\n  var hasConsole = typeof console !== 'undefined';\n  var classifyRE = /(?:^|[-_])(\\w)/g;\n  var classify = function (str) { return str\n    .replace(classifyRE, function (c) { return c.toUpperCase(); })\n    .replace(/[-_]/g, ''); };\n\n  warn = function (msg, vm) {\n    if (hasConsole && (!config.silent)) {\n      console.error(\"[Vue warn]: \" + msg + \" \" + (\n        vm ? formatLocation(formatComponentName(vm)) : ''\n      ));\n    }\n  };\n\n  tip = function (msg, vm) {\n    if (hasConsole && (!config.silent)) {\n      console.warn(\"[Vue tip]: \" + msg + \" \" + (\n        vm ? formatLocation(formatComponentName(vm)) : ''\n      ));\n    }\n  };\n\n  formatComponentName = function (vm, includeFile) {\n    if (vm.$root === vm) {\n      return '<Root>'\n    }\n    var name = typeof vm === 'string'\n      ? vm\n      : typeof vm === 'function' && vm.options\n        ? vm.options.name\n        : vm._isVue\n          ? vm.$options.name || vm.$options._componentTag\n          : vm.name;\n\n    var file = vm._isVue && vm.$options.__file;\n    if (!name && file) {\n      var match = file.match(/([^/\\\\]+)\\.vue$/);\n      name = match && match[1];\n    }\n\n    return (\n      (name ? (\"<\" + (classify(name)) + \">\") : \"<Anonymous>\") +\n      (file && includeFile !== false ? (\" at \" + file) : '')\n    )\n  };\n\n  var formatLocation = function (str) {\n    if (str === \"<Anonymous>\") {\n      str += \" - use the \\\"name\\\" option for better debugging messages.\";\n    }\n    return (\"\\n(found in \" + str + \")\")\n  };\n}\n\n/*  */\n\n\nvar uid$1 = 0;\n\n/**\n * A dep is an observable that can have multiple\n * directives subscribing to it.\n */\nvar Dep = function Dep () {\n  this.id = uid$1++;\n  this.subs = [];\n};\n\nDep.prototype.addSub = function addSub (sub) {\n  this.subs.push(sub);\n};\n\nDep.prototype.removeSub = function removeSub (sub) {\n  remove(this.subs, sub);\n};\n\nDep.prototype.depend = function depend () {\n  if (Dep.target) {\n    Dep.target.addDep(this);\n  }\n};\n\nDep.prototype.notify = function notify () {\n  // stabilize the subscriber list first\n  var subs = this.subs.slice();\n  for (var i = 0, l = subs.length; i < l; i++) {\n    subs[i].update();\n  }\n};\n\n// the current target watcher being evaluated.\n// this is globally unique because there could be only one\n// watcher being evaluated at any time.\nDep.target = null;\nvar targetStack = [];\n\nfunction pushTarget (_target) {\n  if (Dep.target) { targetStack.push(Dep.target); }\n  Dep.target = _target;\n}\n\nfunction popTarget () {\n  Dep.target = targetStack.pop();\n}\n\n/*\n * not type checking this file because flow doesn't play well with\n * dynamically accessing methods on Array prototype\n */\n\nvar arrayProto = Array.prototype;\nvar arrayMethods = Object.create(arrayProto);[\n  'push',\n  'pop',\n  'shift',\n  'unshift',\n  'splice',\n  'sort',\n  'reverse'\n]\n.forEach(function (method) {\n  // cache original method\n  var original = arrayProto[method];\n  def(arrayMethods, method, function mutator () {\n    var arguments$1 = arguments;\n\n    // avoid leaking arguments:\n    // http://jsperf.com/closure-with-arguments\n    var i = arguments.length;\n    var args = new Array(i);\n    while (i--) {\n      args[i] = arguments$1[i];\n    }\n    var result = original.apply(this, args);\n    var ob = this.__ob__;\n    var inserted;\n    switch (method) {\n      case 'push':\n        inserted = args;\n        break\n      case 'unshift':\n        inserted = args;\n        break\n      case 'splice':\n        inserted = args.slice(2);\n        break\n    }\n    if (inserted) { ob.observeArray(inserted); }\n    // notify change\n    ob.dep.notify();\n    return result\n  });\n});\n\n/*  */\n\nvar arrayKeys = Object.getOwnPropertyNames(arrayMethods);\n\n/**\n * By default, when a reactive property is set, the new value is\n * also converted to become reactive. However when passing down props,\n * we don't want to force conversion because the value may be a nested value\n * under a frozen data structure. Converting it would defeat the optimization.\n */\nvar observerState = {\n  shouldConvert: true,\n  isSettingProps: false\n};\n\n/**\n * Observer class that are attached to each observed\n * object. Once attached, the observer converts target\n * object's property keys into getter/setters that\n * collect dependencies and dispatches updates.\n */\nvar Observer = function Observer (value) {\n  this.value = value;\n  this.dep = new Dep();\n  this.vmCount = 0;\n  def(value, '__ob__', this);\n  if (Array.isArray(value)) {\n    var augment = hasProto\n      ? protoAugment\n      : copyAugment;\n    augment(value, arrayMethods, arrayKeys);\n    this.observeArray(value);\n  } else {\n    this.walk(value);\n  }\n};\n\n/**\n * Walk through each property and convert them into\n * getter/setters. This method should only be called when\n * value type is Object.\n */\nObserver.prototype.walk = function walk (obj) {\n  var keys = Object.keys(obj);\n  for (var i = 0; i < keys.length; i++) {\n    defineReactive$$1(obj, keys[i], obj[keys[i]]);\n  }\n};\n\n/**\n * Observe a list of Array items.\n */\nObserver.prototype.observeArray = function observeArray (items) {\n  for (var i = 0, l = items.length; i < l; i++) {\n    observe(items[i]);\n  }\n};\n\n// helpers\n\n/**\n * Augment an target Object or Array by intercepting\n * the prototype chain using __proto__\n */\nfunction protoAugment (target, src) {\n  /* eslint-disable no-proto */\n  target.__proto__ = src;\n  /* eslint-enable no-proto */\n}\n\n/**\n * Augment an target Object or Array by defining\n * hidden properties.\n */\n/* istanbul ignore next */\nfunction copyAugment (target, src, keys) {\n  for (var i = 0, l = keys.length; i < l; i++) {\n    var key = keys[i];\n    def(target, key, src[key]);\n  }\n}\n\n/**\n * Attempt to create an observer instance for a value,\n * returns the new observer if successfully observed,\n * or the existing observer if the value already has one.\n */\nfunction observe (value, asRootData) {\n  if (!isObject(value)) {\n    return\n  }\n  var ob;\n  if (hasOwn(value, '__ob__') && value.__ob__ instanceof Observer) {\n    ob = value.__ob__;\n  } else if (\n    observerState.shouldConvert &&\n    !isServerRendering() &&\n    (Array.isArray(value) || isPlainObject(value)) &&\n    Object.isExtensible(value) &&\n    !value._isVue\n  ) {\n    ob = new Observer(value);\n  }\n  if (asRootData && ob) {\n    ob.vmCount++;\n  }\n  return ob\n}\n\n/**\n * Define a reactive property on an Object.\n */\nfunction defineReactive$$1 (\n  obj,\n  key,\n  val,\n  customSetter\n) {\n  var dep = new Dep();\n\n  var property = Object.getOwnPropertyDescriptor(obj, key);\n  if (property && property.configurable === false) {\n    return\n  }\n\n  // cater for pre-defined getter/setters\n  var getter = property && property.get;\n  var setter = property && property.set;\n\n  var childOb = observe(val);\n  Object.defineProperty(obj, key, {\n    enumerable: true,\n    configurable: true,\n    get: function reactiveGetter () {\n      var value = getter ? getter.call(obj) : val;\n      if (Dep.target) {\n        dep.depend();\n        if (childOb) {\n          childOb.dep.depend();\n        }\n        if (Array.isArray(value)) {\n          dependArray(value);\n        }\n      }\n      return value\n    },\n    set: function reactiveSetter (newVal) {\n      var value = getter ? getter.call(obj) : val;\n      /* eslint-disable no-self-compare */\n      if (newVal === value || (newVal !== newVal && value !== value)) {\n        return\n      }\n      /* eslint-enable no-self-compare */\n      if (process.env.NODE_ENV !== 'production' && customSetter) {\n        customSetter();\n      }\n      if (setter) {\n        setter.call(obj, newVal);\n      } else {\n        val = newVal;\n      }\n      childOb = observe(newVal);\n      dep.notify();\n    }\n  });\n}\n\n/**\n * Set a property on an object. Adds the new property and\n * triggers change notification if the property doesn't\n * already exist.\n */\nfunction set (target, key, val) {\n  if (Array.isArray(target) && typeof key === 'number') {\n    target.length = Math.max(target.length, key);\n    target.splice(key, 1, val);\n    return val\n  }\n  if (hasOwn(target, key)) {\n    target[key] = val;\n    return val\n  }\n  var ob = (target ).__ob__;\n  if (target._isVue || (ob && ob.vmCount)) {\n    process.env.NODE_ENV !== 'production' && warn(\n      'Avoid adding reactive properties to a Vue instance or its root $data ' +\n      'at runtime - declare it upfront in the data option.'\n    );\n    return val\n  }\n  if (!ob) {\n    target[key] = val;\n    return val\n  }\n  defineReactive$$1(ob.value, key, val);\n  ob.dep.notify();\n  return val\n}\n\n/**\n * Delete a property and trigger change if necessary.\n */\nfunction del (target, key) {\n  if (Array.isArray(target) && typeof key === 'number') {\n    target.splice(key, 1);\n    return\n  }\n  var ob = (target ).__ob__;\n  if (target._isVue || (ob && ob.vmCount)) {\n    process.env.NODE_ENV !== 'production' && warn(\n      'Avoid deleting properties on a Vue instance or its root $data ' +\n      '- just set it to null.'\n    );\n    return\n  }\n  if (!hasOwn(target, key)) {\n    return\n  }\n  delete target[key];\n  if (!ob) {\n    return\n  }\n  ob.dep.notify();\n}\n\n/**\n * Collect dependencies on array elements when the array is touched, since\n * we cannot intercept array element access like property getters.\n */\nfunction dependArray (value) {\n  for (var e = (void 0), i = 0, l = value.length; i < l; i++) {\n    e = value[i];\n    e && e.__ob__ && e.__ob__.dep.depend();\n    if (Array.isArray(e)) {\n      dependArray(e);\n    }\n  }\n}\n\n/*  */\n\n/**\n * Option overwriting strategies are functions that handle\n * how to merge a parent option value and a child option\n * value into the final value.\n */\nvar strats = config.optionMergeStrategies;\n\n/**\n * Options with restrictions\n */\nif (process.env.NODE_ENV !== 'production') {\n  strats.el = strats.propsData = function (parent, child, vm, key) {\n    if (!vm) {\n      warn(\n        \"option \\\"\" + key + \"\\\" can only be used during instance \" +\n        'creation with the `new` keyword.'\n      );\n    }\n    return defaultStrat(parent, child)\n  };\n}\n\n/**\n * Helper that recursively merges two data objects together.\n */\nfunction mergeData (to, from) {\n  if (!from) { return to }\n  var key, toVal, fromVal;\n  var keys = Object.keys(from);\n  for (var i = 0; i < keys.length; i++) {\n    key = keys[i];\n    toVal = to[key];\n    fromVal = from[key];\n    if (!hasOwn(to, key)) {\n      set(to, key, fromVal);\n    } else if (isPlainObject(toVal) && isPlainObject(fromVal)) {\n      mergeData(toVal, fromVal);\n    }\n  }\n  return to\n}\n\n/**\n * Data\n */\nstrats.data = function (\n  parentVal,\n  childVal,\n  vm\n) {\n  if (!vm) {\n    // in a Vue.extend merge, both should be functions\n    if (!childVal) {\n      return parentVal\n    }\n    if (typeof childVal !== 'function') {\n      process.env.NODE_ENV !== 'production' && warn(\n        'The \"data\" option should be a function ' +\n        'that returns a per-instance value in component ' +\n        'definitions.',\n        vm\n      );\n      return parentVal\n    }\n    if (!parentVal) {\n      return childVal\n    }\n    // when parentVal & childVal are both present,\n    // we need to return a function that returns the\n    // merged result of both functions... no need to\n    // check if parentVal is a function here because\n    // it has to be a function to pass previous merges.\n    return function mergedDataFn () {\n      return mergeData(\n        childVal.call(this),\n        parentVal.call(this)\n      )\n    }\n  } else if (parentVal || childVal) {\n    return function mergedInstanceDataFn () {\n      // instance merge\n      var instanceData = typeof childVal === 'function'\n        ? childVal.call(vm)\n        : childVal;\n      var defaultData = typeof parentVal === 'function'\n        ? parentVal.call(vm)\n        : undefined;\n      if (instanceData) {\n        return mergeData(instanceData, defaultData)\n      } else {\n        return defaultData\n      }\n    }\n  }\n};\n\n/**\n * Hooks and props are merged as arrays.\n */\nfunction mergeHook (\n  parentVal,\n  childVal\n) {\n  return childVal\n    ? parentVal\n      ? parentVal.concat(childVal)\n      : Array.isArray(childVal)\n        ? childVal\n        : [childVal]\n    : parentVal\n}\n\nconfig._lifecycleHooks.forEach(function (hook) {\n  strats[hook] = mergeHook;\n});\n\n/**\n * Assets\n *\n * When a vm is present (instance creation), we need to do\n * a three-way merge between constructor options, instance\n * options and parent options.\n */\nfunction mergeAssets (parentVal, childVal) {\n  var res = Object.create(parentVal || null);\n  return childVal\n    ? extend(res, childVal)\n    : res\n}\n\nconfig._assetTypes.forEach(function (type) {\n  strats[type + 's'] = mergeAssets;\n});\n\n/**\n * Watchers.\n *\n * Watchers hashes should not overwrite one\n * another, so we merge them as arrays.\n */\nstrats.watch = function (parentVal, childVal) {\n  /* istanbul ignore if */\n  if (!childVal) { return Object.create(parentVal || null) }\n  if (!parentVal) { return childVal }\n  var ret = {};\n  extend(ret, parentVal);\n  for (var key in childVal) {\n    var parent = ret[key];\n    var child = childVal[key];\n    if (parent && !Array.isArray(parent)) {\n      parent = [parent];\n    }\n    ret[key] = parent\n      ? parent.concat(child)\n      : [child];\n  }\n  return ret\n};\n\n/**\n * Other object hashes.\n */\nstrats.props =\nstrats.methods =\nstrats.computed = function (parentVal, childVal) {\n  if (!childVal) { return Object.create(parentVal || null) }\n  if (!parentVal) { return childVal }\n  var ret = Object.create(null);\n  extend(ret, parentVal);\n  extend(ret, childVal);\n  return ret\n};\n\n/**\n * Default strategy.\n */\nvar defaultStrat = function (parentVal, childVal) {\n  return childVal === undefined\n    ? parentVal\n    : childVal\n};\n\n/**\n * Validate component names\n */\nfunction checkComponents (options) {\n  for (var key in options.components) {\n    var lower = key.toLowerCase();\n    if (isBuiltInTag(lower) || config.isReservedTag(lower)) {\n      warn(\n        'Do not use built-in or reserved HTML elements as component ' +\n        'id: ' + key\n      );\n    }\n  }\n}\n\n/**\n * Ensure all props option syntax are normalized into the\n * Object-based format.\n */\nfunction normalizeProps (options) {\n  var props = options.props;\n  if (!props) { return }\n  var res = {};\n  var i, val, name;\n  if (Array.isArray(props)) {\n    i = props.length;\n    while (i--) {\n      val = props[i];\n      if (typeof val === 'string') {\n        name = camelize(val);\n        res[name] = { type: null };\n      } else if (process.env.NODE_ENV !== 'production') {\n        warn('props must be strings when using array syntax.');\n      }\n    }\n  } else if (isPlainObject(props)) {\n    for (var key in props) {\n      val = props[key];\n      name = camelize(key);\n      res[name] = isPlainObject(val)\n        ? val\n        : { type: val };\n    }\n  }\n  options.props = res;\n}\n\n/**\n * Normalize raw function directives into object format.\n */\nfunction normalizeDirectives (options) {\n  var dirs = options.directives;\n  if (dirs) {\n    for (var key in dirs) {\n      var def = dirs[key];\n      if (typeof def === 'function') {\n        dirs[key] = { bind: def, update: def };\n      }\n    }\n  }\n}\n\n/**\n * Merge two option objects into a new one.\n * Core utility used in both instantiation and inheritance.\n */\nfunction mergeOptions (\n  parent,\n  child,\n  vm\n) {\n  if (process.env.NODE_ENV !== 'production') {\n    checkComponents(child);\n  }\n  normalizeProps(child);\n  normalizeDirectives(child);\n  var extendsFrom = child.extends;\n  if (extendsFrom) {\n    parent = typeof extendsFrom === 'function'\n      ? mergeOptions(parent, extendsFrom.options, vm)\n      : mergeOptions(parent, extendsFrom, vm);\n  }\n  if (child.mixins) {\n    for (var i = 0, l = child.mixins.length; i < l; i++) {\n      var mixin = child.mixins[i];\n      if (mixin.prototype instanceof Vue$2) {\n        mixin = mixin.options;\n      }\n      parent = mergeOptions(parent, mixin, vm);\n    }\n  }\n  var options = {};\n  var key;\n  for (key in parent) {\n    mergeField(key);\n  }\n  for (key in child) {\n    if (!hasOwn(parent, key)) {\n      mergeField(key);\n    }\n  }\n  function mergeField (key) {\n    var strat = strats[key] || defaultStrat;\n    options[key] = strat(parent[key], child[key], vm, key);\n  }\n  return options\n}\n\n/**\n * Resolve an asset.\n * This function is used because child instances need access\n * to assets defined in its ancestor chain.\n */\nfunction resolveAsset (\n  options,\n  type,\n  id,\n  warnMissing\n) {\n  /* istanbul ignore if */\n  if (typeof id !== 'string') {\n    return\n  }\n  var assets = options[type];\n  // check local registration variations first\n  if (hasOwn(assets, id)) { return assets[id] }\n  var camelizedId = camelize(id);\n  if (hasOwn(assets, camelizedId)) { return assets[camelizedId] }\n  var PascalCaseId = capitalize(camelizedId);\n  if (hasOwn(assets, PascalCaseId)) { return assets[PascalCaseId] }\n  // fallback to prototype chain\n  var res = assets[id] || assets[camelizedId] || assets[PascalCaseId];\n  if (process.env.NODE_ENV !== 'production' && warnMissing && !res) {\n    warn(\n      'Failed to resolve ' + type.slice(0, -1) + ': ' + id,\n      options\n    );\n  }\n  return res\n}\n\n/*  */\n\nfunction validateProp (\n  key,\n  propOptions,\n  propsData,\n  vm\n) {\n  var prop = propOptions[key];\n  var absent = !hasOwn(propsData, key);\n  var value = propsData[key];\n  // handle boolean props\n  if (isType(Boolean, prop.type)) {\n    if (absent && !hasOwn(prop, 'default')) {\n      value = false;\n    } else if (!isType(String, prop.type) && (value === '' || value === hyphenate(key))) {\n      value = true;\n    }\n  }\n  // check default value\n  if (value === undefined) {\n    value = getPropDefaultValue(vm, prop, key);\n    // since the default value is a fresh copy,\n    // make sure to observe it.\n    var prevShouldConvert = observerState.shouldConvert;\n    observerState.shouldConvert = true;\n    observe(value);\n    observerState.shouldConvert = prevShouldConvert;\n  }\n  if (process.env.NODE_ENV !== 'production') {\n    assertProp(prop, key, value, vm, absent);\n  }\n  return value\n}\n\n/**\n * Get the default value of a prop.\n */\nfunction getPropDefaultValue (vm, prop, key) {\n  // no default, return undefined\n  if (!hasOwn(prop, 'default')) {\n    return undefined\n  }\n  var def = prop.default;\n  // warn against non-factory defaults for Object & Array\n  if (process.env.NODE_ENV !== 'production' && isObject(def)) {\n    warn(\n      'Invalid default value for prop \"' + key + '\": ' +\n      'Props with type Object/Array must use a factory function ' +\n      'to return the default value.',\n      vm\n    );\n  }\n  // the raw prop value was also undefined from previous render,\n  // return previous default value to avoid unnecessary watcher trigger\n  if (vm && vm.$options.propsData &&\n    vm.$options.propsData[key] === undefined &&\n    vm._props[key] !== undefined) {\n    return vm._props[key]\n  }\n  // call factory function for non-Function types\n  // a value is Function if its prototype is function even across different execution context\n  return typeof def === 'function' && getType(prop.type) !== 'Function'\n    ? def.call(vm)\n    : def\n}\n\n/**\n * Assert whether a prop is valid.\n */\nfunction assertProp (\n  prop,\n  name,\n  value,\n  vm,\n  absent\n) {\n  if (prop.required && absent) {\n    warn(\n      'Missing required prop: \"' + name + '\"',\n      vm\n    );\n    return\n  }\n  if (value == null && !prop.required) {\n    return\n  }\n  var type = prop.type;\n  var valid = !type || type === true;\n  var expectedTypes = [];\n  if (type) {\n    if (!Array.isArray(type)) {\n      type = [type];\n    }\n    for (var i = 0; i < type.length && !valid; i++) {\n      var assertedType = assertType(value, type[i]);\n      expectedTypes.push(assertedType.expectedType || '');\n      valid = assertedType.valid;\n    }\n  }\n  if (!valid) {\n    warn(\n      'Invalid prop: type check failed for prop \"' + name + '\".' +\n      ' Expected ' + expectedTypes.map(capitalize).join(', ') +\n      ', got ' + Object.prototype.toString.call(value).slice(8, -1) + '.',\n      vm\n    );\n    return\n  }\n  var validator = prop.validator;\n  if (validator) {\n    if (!validator(value)) {\n      warn(\n        'Invalid prop: custom validator check failed for prop \"' + name + '\".',\n        vm\n      );\n    }\n  }\n}\n\n/**\n * Assert the type of a value\n */\nfunction assertType (value, type) {\n  var valid;\n  var expectedType = getType(type);\n  if (expectedType === 'String') {\n    valid = typeof value === (expectedType = 'string');\n  } else if (expectedType === 'Number') {\n    valid = typeof value === (expectedType = 'number');\n  } else if (expectedType === 'Boolean') {\n    valid = typeof value === (expectedType = 'boolean');\n  } else if (expectedType === 'Function') {\n    valid = typeof value === (expectedType = 'function');\n  } else if (expectedType === 'Object') {\n    valid = isPlainObject(value);\n  } else if (expectedType === 'Array') {\n    valid = Array.isArray(value);\n  } else {\n    valid = value instanceof type;\n  }\n  return {\n    valid: valid,\n    expectedType: expectedType\n  }\n}\n\n/**\n * Use function string name to check built-in types,\n * because a simple equality check will fail when running\n * across different vms / iframes.\n */\nfunction getType (fn) {\n  var match = fn && fn.toString().match(/^\\s*function (\\w+)/);\n  return match && match[1]\n}\n\nfunction isType (type, fn) {\n  if (!Array.isArray(fn)) {\n    return getType(fn) === getType(type)\n  }\n  for (var i = 0, len = fn.length; i < len; i++) {\n    if (getType(fn[i]) === getType(type)) {\n      return true\n    }\n  }\n  /* istanbul ignore next */\n  return false\n}\n\nfunction handleError (err, vm, info) {\n  if (config.errorHandler) {\n    config.errorHandler.call(null, err, vm, info);\n  } else {\n    if (process.env.NODE_ENV !== 'production') {\n      warn((\"Error in \" + info + \":\"), vm);\n    }\n    /* istanbul ignore else */\n    if (inBrowser && typeof console !== 'undefined') {\n      console.error(err);\n    } else {\n      throw err\n    }\n  }\n}\n\n/* not type checking this file because flow doesn't play well with Proxy */\n\nvar initProxy;\n\nif (process.env.NODE_ENV !== 'production') {\n  var allowedGlobals = makeMap(\n    'Infinity,undefined,NaN,isFinite,isNaN,' +\n    'parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,' +\n    'Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,' +\n    'require' // for Webpack/Browserify\n  );\n\n  var warnNonPresent = function (target, key) {\n    warn(\n      \"Property or method \\\"\" + key + \"\\\" is not defined on the instance but \" +\n      \"referenced during render. Make sure to declare reactive data \" +\n      \"properties in the data option.\",\n      target\n    );\n  };\n\n  var hasProxy =\n    typeof Proxy !== 'undefined' &&\n    Proxy.toString().match(/native code/);\n\n  if (hasProxy) {\n    var isBuiltInModifier = makeMap('stop,prevent,self,ctrl,shift,alt,meta');\n    config.keyCodes = new Proxy(config.keyCodes, {\n      set: function set (target, key, value) {\n        if (isBuiltInModifier(key)) {\n          warn((\"Avoid overwriting built-in modifier in config.keyCodes: .\" + key));\n          return false\n        } else {\n          target[key] = value;\n          return true\n        }\n      }\n    });\n  }\n\n  var hasHandler = {\n    has: function has (target, key) {\n      var has = key in target;\n      var isAllowed = allowedGlobals(key) || key.charAt(0) === '_';\n      if (!has && !isAllowed) {\n        warnNonPresent(target, key);\n      }\n      return has || !isAllowed\n    }\n  };\n\n  var getHandler = {\n    get: function get (target, key) {\n      if (typeof key === 'string' && !(key in target)) {\n        warnNonPresent(target, key);\n      }\n      return target[key]\n    }\n  };\n\n  initProxy = function initProxy (vm) {\n    if (hasProxy) {\n      // determine which proxy handler to use\n      var options = vm.$options;\n      var handlers = options.render && options.render._withStripped\n        ? getHandler\n        : hasHandler;\n      vm._renderProxy = new Proxy(vm, handlers);\n    } else {\n      vm._renderProxy = vm;\n    }\n  };\n}\n\nvar mark;\nvar measure;\n\nif (process.env.NODE_ENV !== 'production') {\n  var perf = inBrowser && window.performance;\n  /* istanbul ignore if */\n  if (\n    perf &&\n    perf.mark &&\n    perf.measure &&\n    perf.clearMarks &&\n    perf.clearMeasures\n  ) {\n    mark = function (tag) { return perf.mark(tag); };\n    measure = function (name, startTag, endTag) {\n      perf.measure(name, startTag, endTag);\n      perf.clearMarks(startTag);\n      perf.clearMarks(endTag);\n      perf.clearMeasures(name);\n    };\n  }\n}\n\n/*  */\n\nvar VNode = function VNode (\n  tag,\n  data,\n  children,\n  text,\n  elm,\n  context,\n  componentOptions\n) {\n  this.tag = tag;\n  this.data = data;\n  this.children = children;\n  this.text = text;\n  this.elm = elm;\n  this.ns = undefined;\n  this.context = context;\n  this.functionalContext = undefined;\n  this.key = data && data.key;\n  this.componentOptions = componentOptions;\n  this.componentInstance = undefined;\n  this.parent = undefined;\n  this.raw = false;\n  this.isStatic = false;\n  this.isRootInsert = true;\n  this.isComment = false;\n  this.isCloned = false;\n  this.isOnce = false;\n};\n\nvar prototypeAccessors = { child: {} };\n\n// DEPRECATED: alias for componentInstance for backwards compat.\n/* istanbul ignore next */\nprototypeAccessors.child.get = function () {\n  return this.componentInstance\n};\n\nObject.defineProperties( VNode.prototype, prototypeAccessors );\n\nvar createEmptyVNode = function () {\n  var node = new VNode();\n  node.text = '';\n  node.isComment = true;\n  return node\n};\n\nfunction createTextVNode (val) {\n  return new VNode(undefined, undefined, undefined, String(val))\n}\n\n// optimized shallow clone\n// used for static nodes and slot nodes because they may be reused across\n// multiple renders, cloning them avoids errors when DOM manipulations rely\n// on their elm reference.\nfunction cloneVNode (vnode) {\n  var cloned = new VNode(\n    vnode.tag,\n    vnode.data,\n    vnode.children,\n    vnode.text,\n    vnode.elm,\n    vnode.context,\n    vnode.componentOptions\n  );\n  cloned.ns = vnode.ns;\n  cloned.isStatic = vnode.isStatic;\n  cloned.key = vnode.key;\n  cloned.isCloned = true;\n  return cloned\n}\n\nfunction cloneVNodes (vnodes) {\n  var len = vnodes.length;\n  var res = new Array(len);\n  for (var i = 0; i < len; i++) {\n    res[i] = cloneVNode(vnodes[i]);\n  }\n  return res\n}\n\n/*  */\n\nvar normalizeEvent = cached(function (name) {\n  var once$$1 = name.charAt(0) === '~'; // Prefixed last, checked first\n  name = once$$1 ? name.slice(1) : name;\n  var capture = name.charAt(0) === '!';\n  name = capture ? name.slice(1) : name;\n  return {\n    name: name,\n    once: once$$1,\n    capture: capture\n  }\n});\n\nfunction createFnInvoker (fns) {\n  function invoker () {\n    var arguments$1 = arguments;\n\n    var fns = invoker.fns;\n    if (Array.isArray(fns)) {\n      for (var i = 0; i < fns.length; i++) {\n        fns[i].apply(null, arguments$1);\n      }\n    } else {\n      // return handler return value for single handlers\n      return fns.apply(null, arguments)\n    }\n  }\n  invoker.fns = fns;\n  return invoker\n}\n\nfunction updateListeners (\n  on,\n  oldOn,\n  add,\n  remove$$1,\n  vm\n) {\n  var name, cur, old, event;\n  for (name in on) {\n    cur = on[name];\n    old = oldOn[name];\n    event = normalizeEvent(name);\n    if (!cur) {\n      process.env.NODE_ENV !== 'production' && warn(\n        \"Invalid handler for event \\\"\" + (event.name) + \"\\\": got \" + String(cur),\n        vm\n      );\n    } else if (!old) {\n      if (!cur.fns) {\n        cur = on[name] = createFnInvoker(cur);\n      }\n      add(event.name, cur, event.once, event.capture);\n    } else if (cur !== old) {\n      old.fns = cur;\n      on[name] = old;\n    }\n  }\n  for (name in oldOn) {\n    if (!on[name]) {\n      event = normalizeEvent(name);\n      remove$$1(event.name, oldOn[name], event.capture);\n    }\n  }\n}\n\n/*  */\n\nfunction mergeVNodeHook (def, hookKey, hook) {\n  var invoker;\n  var oldHook = def[hookKey];\n\n  function wrappedHook () {\n    hook.apply(this, arguments);\n    // important: remove merged hook to ensure it's called only once\n    // and prevent memory leak\n    remove(invoker.fns, wrappedHook);\n  }\n\n  if (!oldHook) {\n    // no existing hook\n    invoker = createFnInvoker([wrappedHook]);\n  } else {\n    /* istanbul ignore if */\n    if (oldHook.fns && oldHook.merged) {\n      // already a merged invoker\n      invoker = oldHook;\n      invoker.fns.push(wrappedHook);\n    } else {\n      // existing plain hook\n      invoker = createFnInvoker([oldHook, wrappedHook]);\n    }\n  }\n\n  invoker.merged = true;\n  def[hookKey] = invoker;\n}\n\n/*  */\n\n// The template compiler attempts to minimize the need for normalization by\n// statically analyzing the template at compile time.\n//\n// For plain HTML markup, normalization can be completely skipped because the\n// generated render function is guaranteed to return Array<VNode>. There are\n// two cases where extra normalization is needed:\n\n// 1. When the children contains components - because a functional component\n// may return an Array instead of a single root. In this case, just a simple\n// normalization is needed - if any child is an Array, we flatten the whole\n// thing with Array.prototype.concat. It is guaranteed to be only 1-level deep\n// because functional components already normalize their own children.\nfunction simpleNormalizeChildren (children) {\n  for (var i = 0; i < children.length; i++) {\n    if (Array.isArray(children[i])) {\n      return Array.prototype.concat.apply([], children)\n    }\n  }\n  return children\n}\n\n// 2. When the children contains constructs that always generated nested Arrays,\n// e.g. <template>, <slot>, v-for, or when the children is provided by user\n// with hand-written render functions / JSX. In such cases a full normalization\n// is needed to cater to all possible types of children values.\nfunction normalizeChildren (children) {\n  return isPrimitive(children)\n    ? [createTextVNode(children)]\n    : Array.isArray(children)\n      ? normalizeArrayChildren(children)\n      : undefined\n}\n\nfunction normalizeArrayChildren (children, nestedIndex) {\n  var res = [];\n  var i, c, last;\n  for (i = 0; i < children.length; i++) {\n    c = children[i];\n    if (c == null || typeof c === 'boolean') { continue }\n    last = res[res.length - 1];\n    //  nested\n    if (Array.isArray(c)) {\n      res.push.apply(res, normalizeArrayChildren(c, ((nestedIndex || '') + \"_\" + i)));\n    } else if (isPrimitive(c)) {\n      if (last && last.text) {\n        last.text += String(c);\n      } else if (c !== '') {\n        // convert primitive to vnode\n        res.push(createTextVNode(c));\n      }\n    } else {\n      if (c.text && last && last.text) {\n        res[res.length - 1] = createTextVNode(last.text + c.text);\n      } else {\n        // default key for nested array children (likely generated by v-for)\n        if (c.tag && c.key == null && nestedIndex != null) {\n          c.key = \"__vlist\" + nestedIndex + \"_\" + i + \"__\";\n        }\n        res.push(c);\n      }\n    }\n  }\n  return res\n}\n\n/*  */\n\nfunction getFirstComponentChild (children) {\n  return children && children.filter(function (c) { return c && c.componentOptions; })[0]\n}\n\n/*  */\n\nfunction initEvents (vm) {\n  vm._events = Object.create(null);\n  vm._hasHookEvent = false;\n  // init parent attached events\n  var listeners = vm.$options._parentListeners;\n  if (listeners) {\n    updateComponentListeners(vm, listeners);\n  }\n}\n\nvar target;\n\nfunction add (event, fn, once$$1) {\n  if (once$$1) {\n    target.$once(event, fn);\n  } else {\n    target.$on(event, fn);\n  }\n}\n\nfunction remove$1 (event, fn) {\n  target.$off(event, fn);\n}\n\nfunction updateComponentListeners (\n  vm,\n  listeners,\n  oldListeners\n) {\n  target = vm;\n  updateListeners(listeners, oldListeners || {}, add, remove$1, vm);\n}\n\nfunction eventsMixin (Vue) {\n  var hookRE = /^hook:/;\n  Vue.prototype.$on = function (event, fn) {\n    var this$1 = this;\n\n    var vm = this;\n    if (Array.isArray(event)) {\n      for (var i = 0, l = event.length; i < l; i++) {\n        this$1.$on(event[i], fn);\n      }\n    } else {\n      (vm._events[event] || (vm._events[event] = [])).push(fn);\n      // optimize hook:event cost by using a boolean flag marked at registration\n      // instead of a hash lookup\n      if (hookRE.test(event)) {\n        vm._hasHookEvent = true;\n      }\n    }\n    return vm\n  };\n\n  Vue.prototype.$once = function (event, fn) {\n    var vm = this;\n    function on () {\n      vm.$off(event, on);\n      fn.apply(vm, arguments);\n    }\n    on.fn = fn;\n    vm.$on(event, on);\n    return vm\n  };\n\n  Vue.prototype.$off = function (event, fn) {\n    var this$1 = this;\n\n    var vm = this;\n    // all\n    if (!arguments.length) {\n      vm._events = Object.create(null);\n      return vm\n    }\n    // array of events\n    if (Array.isArray(event)) {\n      for (var i$1 = 0, l = event.length; i$1 < l; i$1++) {\n        this$1.$off(event[i$1], fn);\n      }\n      return vm\n    }\n    // specific event\n    var cbs = vm._events[event];\n    if (!cbs) {\n      return vm\n    }\n    if (arguments.length === 1) {\n      vm._events[event] = null;\n      return vm\n    }\n    // specific handler\n    var cb;\n    var i = cbs.length;\n    while (i--) {\n      cb = cbs[i];\n      if (cb === fn || cb.fn === fn) {\n        cbs.splice(i, 1);\n        break\n      }\n    }\n    return vm\n  };\n\n  Vue.prototype.$emit = function (event) {\n    var vm = this;\n    if (process.env.NODE_ENV !== 'production') {\n      var lowerCaseEvent = event.toLowerCase();\n      if (lowerCaseEvent !== event && vm._events[lowerCaseEvent]) {\n        tip(\n          \"Event \\\"\" + lowerCaseEvent + \"\\\" is emitted in component \" +\n          (formatComponentName(vm)) + \" but the handler is registered for \\\"\" + event + \"\\\". \" +\n          \"Note that HTML attributes are case-insensitive and you cannot use \" +\n          \"v-on to listen to camelCase events when using in-DOM templates. \" +\n          \"You should probably use \\\"\" + (hyphenate(event)) + \"\\\" instead of \\\"\" + event + \"\\\".\"\n        );\n      }\n    }\n    var cbs = vm._events[event];\n    if (cbs) {\n      cbs = cbs.length > 1 ? toArray(cbs) : cbs;\n      var args = toArray(arguments, 1);\n      for (var i = 0, l = cbs.length; i < l; i++) {\n        cbs[i].apply(vm, args);\n      }\n    }\n    return vm\n  };\n}\n\n/*  */\n\n/**\n * Runtime helper for resolving raw children VNodes into a slot object.\n */\nfunction resolveSlots (\n  children,\n  context\n) {\n  var slots = {};\n  if (!children) {\n    return slots\n  }\n  var defaultSlot = [];\n  var name, child;\n  for (var i = 0, l = children.length; i < l; i++) {\n    child = children[i];\n    // named slots should only be respected if the vnode was rendered in the\n    // same context.\n    if ((child.context === context || child.functionalContext === context) &&\n        child.data && (name = child.data.slot)) {\n      var slot = (slots[name] || (slots[name] = []));\n      if (child.tag === 'template') {\n        slot.push.apply(slot, child.children);\n      } else {\n        slot.push(child);\n      }\n    } else {\n      defaultSlot.push(child);\n    }\n  }\n  // ignore whitespace\n  if (!defaultSlot.every(isWhitespace)) {\n    slots.default = defaultSlot;\n  }\n  return slots\n}\n\nfunction isWhitespace (node) {\n  return node.isComment || node.text === ' '\n}\n\nfunction resolveScopedSlots (\n  fns\n) {\n  var res = {};\n  for (var i = 0; i < fns.length; i++) {\n    res[fns[i][0]] = fns[i][1];\n  }\n  return res\n}\n\n/*  */\n\nvar activeInstance = null;\n\nfunction initLifecycle (vm) {\n  var options = vm.$options;\n\n  // locate first non-abstract parent\n  var parent = options.parent;\n  if (parent && !options.abstract) {\n    while (parent.$options.abstract && parent.$parent) {\n      parent = parent.$parent;\n    }\n    parent.$children.push(vm);\n  }\n\n  vm.$parent = parent;\n  vm.$root = parent ? parent.$root : vm;\n\n  vm.$children = [];\n  vm.$refs = {};\n\n  vm._watcher = null;\n  vm._inactive = null;\n  vm._directInactive = false;\n  vm._isMounted = false;\n  vm._isDestroyed = false;\n  vm._isBeingDestroyed = false;\n}\n\nfunction lifecycleMixin (Vue) {\n  Vue.prototype._update = function (vnode, hydrating) {\n    var vm = this;\n    if (vm._isMounted) {\n      callHook(vm, 'beforeUpdate');\n    }\n    var prevEl = vm.$el;\n    var prevVnode = vm._vnode;\n    var prevActiveInstance = activeInstance;\n    activeInstance = vm;\n    vm._vnode = vnode;\n    // Vue.prototype.__patch__ is injected in entry points\n    // based on the rendering backend used.\n    if (!prevVnode) {\n      // initial render\n      vm.$el = vm.__patch__(\n        vm.$el, vnode, hydrating, false /* removeOnly */,\n        vm.$options._parentElm,\n        vm.$options._refElm\n      );\n    } else {\n      // updates\n      vm.$el = vm.__patch__(prevVnode, vnode);\n    }\n    activeInstance = prevActiveInstance;\n    // update __vue__ reference\n    if (prevEl) {\n      prevEl.__vue__ = null;\n    }\n    if (vm.$el) {\n      vm.$el.__vue__ = vm;\n    }\n    // if parent is an HOC, update its $el as well\n    if (vm.$vnode && vm.$parent && vm.$vnode === vm.$parent._vnode) {\n      vm.$parent.$el = vm.$el;\n    }\n    // updated hook is called by the scheduler to ensure that children are\n    // updated in a parent's updated hook.\n  };\n\n  Vue.prototype.$forceUpdate = function () {\n    var vm = this;\n    if (vm._watcher) {\n      vm._watcher.update();\n    }\n  };\n\n  Vue.prototype.$destroy = function () {\n    var vm = this;\n    if (vm._isBeingDestroyed) {\n      return\n    }\n    callHook(vm, 'beforeDestroy');\n    vm._isBeingDestroyed = true;\n    // remove self from parent\n    var parent = vm.$parent;\n    if (parent && !parent._isBeingDestroyed && !vm.$options.abstract) {\n      remove(parent.$children, vm);\n    }\n    // teardown watchers\n    if (vm._watcher) {\n      vm._watcher.teardown();\n    }\n    var i = vm._watchers.length;\n    while (i--) {\n      vm._watchers[i].teardown();\n    }\n    // remove reference from data ob\n    // frozen object may not have observer.\n    if (vm._data.__ob__) {\n      vm._data.__ob__.vmCount--;\n    }\n    // call the last hook...\n    vm._isDestroyed = true;\n    // invoke destroy hooks on current rendered tree\n    vm.__patch__(vm._vnode, null);\n    // fire destroyed hook\n    callHook(vm, 'destroyed');\n    // turn off all instance listeners.\n    vm.$off();\n    // remove __vue__ reference\n    if (vm.$el) {\n      vm.$el.__vue__ = null;\n    }\n    // remove reference to DOM nodes (prevents leak)\n    vm.$options._parentElm = vm.$options._refElm = null;\n  };\n}\n\nfunction mountComponent (\n  vm,\n  el,\n  hydrating\n) {\n  vm.$el = el;\n  if (!vm.$options.render) {\n    vm.$options.render = createEmptyVNode;\n    if (process.env.NODE_ENV !== 'production') {\n      /* istanbul ignore if */\n      if ((vm.$options.template && vm.$options.template.charAt(0) !== '#') ||\n        vm.$options.el || el) {\n        warn(\n          'You are using the runtime-only build of Vue where the template ' +\n          'compiler is not available. Either pre-compile the templates into ' +\n          'render functions, or use the compiler-included build.',\n          vm\n        );\n      } else {\n        warn(\n          'Failed to mount component: template or render function not defined.',\n          vm\n        );\n      }\n    }\n  }\n  callHook(vm, 'beforeMount');\n\n  var updateComponent;\n  /* istanbul ignore if */\n  if (process.env.NODE_ENV !== 'production' && config.performance && mark) {\n    updateComponent = function () {\n      var name = vm._name;\n      var id = vm._uid;\n      var startTag = \"vue-perf-start:\" + id;\n      var endTag = \"vue-perf-end:\" + id;\n\n      mark(startTag);\n      var vnode = vm._render();\n      mark(endTag);\n      measure((name + \" render\"), startTag, endTag);\n\n      mark(startTag);\n      vm._update(vnode, hydrating);\n      mark(endTag);\n      measure((name + \" patch\"), startTag, endTag);\n    };\n  } else {\n    updateComponent = function () {\n      vm._update(vm._render(), hydrating);\n    };\n  }\n\n  vm._watcher = new Watcher(vm, updateComponent, noop);\n  hydrating = false;\n\n  // manually mounted instance, call mounted on self\n  // mounted is called for render-created child components in its inserted hook\n  if (vm.$vnode == null) {\n    vm._isMounted = true;\n    callHook(vm, 'mounted');\n  }\n  return vm\n}\n\nfunction updateChildComponent (\n  vm,\n  propsData,\n  listeners,\n  parentVnode,\n  renderChildren\n) {\n  // determine whether component has slot children\n  // we need to do this before overwriting $options._renderChildren\n  var hasChildren = !!(\n    renderChildren ||               // has new static slots\n    vm.$options._renderChildren ||  // has old static slots\n    parentVnode.data.scopedSlots || // has new scoped slots\n    vm.$scopedSlots !== emptyObject // has old scoped slots\n  );\n\n  vm.$options._parentVnode = parentVnode;\n  vm.$vnode = parentVnode; // update vm's placeholder node without re-render\n  if (vm._vnode) { // update child tree's parent\n    vm._vnode.parent = parentVnode;\n  }\n  vm.$options._renderChildren = renderChildren;\n\n  // update props\n  if (propsData && vm.$options.props) {\n    observerState.shouldConvert = false;\n    if (process.env.NODE_ENV !== 'production') {\n      observerState.isSettingProps = true;\n    }\n    var props = vm._props;\n    var propKeys = vm.$options._propKeys || [];\n    for (var i = 0; i < propKeys.length; i++) {\n      var key = propKeys[i];\n      props[key] = validateProp(key, vm.$options.props, propsData, vm);\n    }\n    observerState.shouldConvert = true;\n    if (process.env.NODE_ENV !== 'production') {\n      observerState.isSettingProps = false;\n    }\n    // keep a copy of raw propsData\n    vm.$options.propsData = propsData;\n  }\n  // update listeners\n  if (listeners) {\n    var oldListeners = vm.$options._parentListeners;\n    vm.$options._parentListeners = listeners;\n    updateComponentListeners(vm, listeners, oldListeners);\n  }\n  // resolve slots + force update if has children\n  if (hasChildren) {\n    vm.$slots = resolveSlots(renderChildren, parentVnode.context);\n    vm.$forceUpdate();\n  }\n}\n\nfunction isInInactiveTree (vm) {\n  while (vm && (vm = vm.$parent)) {\n    if (vm._inactive) { return true }\n  }\n  return false\n}\n\nfunction activateChildComponent (vm, direct) {\n  if (direct) {\n    vm._directInactive = false;\n    if (isInInactiveTree(vm)) {\n      return\n    }\n  } else if (vm._directInactive) {\n    return\n  }\n  if (vm._inactive || vm._inactive == null) {\n    vm._inactive = false;\n    for (var i = 0; i < vm.$children.length; i++) {\n      activateChildComponent(vm.$children[i]);\n    }\n    callHook(vm, 'activated');\n  }\n}\n\nfunction deactivateChildComponent (vm, direct) {\n  if (direct) {\n    vm._directInactive = true;\n    if (isInInactiveTree(vm)) {\n      return\n    }\n  }\n  if (!vm._inactive) {\n    vm._inactive = true;\n    for (var i = 0; i < vm.$children.length; i++) {\n      deactivateChildComponent(vm.$children[i]);\n    }\n    callHook(vm, 'deactivated');\n  }\n}\n\nfunction callHook (vm, hook) {\n  var handlers = vm.$options[hook];\n  if (handlers) {\n    for (var i = 0, j = handlers.length; i < j; i++) {\n      try {\n        handlers[i].call(vm);\n      } catch (e) {\n        handleError(e, vm, (hook + \" hook\"));\n      }\n    }\n  }\n  if (vm._hasHookEvent) {\n    vm.$emit('hook:' + hook);\n  }\n}\n\n/*  */\n\n\nvar queue = [];\nvar has = {};\nvar circular = {};\nvar waiting = false;\nvar flushing = false;\nvar index = 0;\n\n/**\n * Reset the scheduler's state.\n */\nfunction resetSchedulerState () {\n  queue.length = 0;\n  has = {};\n  if (process.env.NODE_ENV !== 'production') {\n    circular = {};\n  }\n  waiting = flushing = false;\n}\n\n/**\n * Flush both queues and run the watchers.\n */\nfunction flushSchedulerQueue () {\n  flushing = true;\n  var watcher, id, vm;\n\n  // Sort queue before flush.\n  // This ensures that:\n  // 1. Components are updated from parent to child. (because parent is always\n  //    created before the child)\n  // 2. A component's user watchers are run before its render watcher (because\n  //    user watchers are created before the render watcher)\n  // 3. If a component is destroyed during a parent component's watcher run,\n  //    its watchers can be skipped.\n  queue.sort(function (a, b) { return a.id - b.id; });\n\n  // do not cache length because more watchers might be pushed\n  // as we run existing watchers\n  for (index = 0; index < queue.length; index++) {\n    watcher = queue[index];\n    id = watcher.id;\n    has[id] = null;\n    watcher.run();\n    // in dev build, check and stop circular updates.\n    if (process.env.NODE_ENV !== 'production' && has[id] != null) {\n      circular[id] = (circular[id] || 0) + 1;\n      if (circular[id] > config._maxUpdateCount) {\n        warn(\n          'You may have an infinite update loop ' + (\n            watcher.user\n              ? (\"in watcher with expression \\\"\" + (watcher.expression) + \"\\\"\")\n              : \"in a component render function.\"\n          ),\n          watcher.vm\n        );\n        break\n      }\n    }\n  }\n\n  // reset scheduler before updated hook called\n  var oldQueue = queue.slice();\n  resetSchedulerState();\n\n  // call updated hooks\n  index = oldQueue.length;\n  while (index--) {\n    watcher = oldQueue[index];\n    vm = watcher.vm;\n    if (vm._watcher === watcher && vm._isMounted) {\n      callHook(vm, 'updated');\n    }\n  }\n\n  // devtool hook\n  /* istanbul ignore if */\n  if (devtools && config.devtools) {\n    devtools.emit('flush');\n  }\n}\n\n/**\n * Push a watcher into the watcher queue.\n * Jobs with duplicate IDs will be skipped unless it's\n * pushed when the queue is being flushed.\n */\nfunction queueWatcher (watcher) {\n  var id = watcher.id;\n  if (has[id] == null) {\n    has[id] = true;\n    if (!flushing) {\n      queue.push(watcher);\n    } else {\n      // if already flushing, splice the watcher based on its id\n      // if already past its id, it will be run next immediately.\n      var i = queue.length - 1;\n      while (i >= 0 && queue[i].id > watcher.id) {\n        i--;\n      }\n      queue.splice(Math.max(i, index) + 1, 0, watcher);\n    }\n    // queue the flush\n    if (!waiting) {\n      waiting = true;\n      nextTick(flushSchedulerQueue);\n    }\n  }\n}\n\n/*  */\n\nvar uid$2 = 0;\n\n/**\n * A watcher parses an expression, collects dependencies,\n * and fires callback when the expression value changes.\n * This is used for both the $watch() api and directives.\n */\nvar Watcher = function Watcher (\n  vm,\n  expOrFn,\n  cb,\n  options\n) {\n  this.vm = vm;\n  vm._watchers.push(this);\n  // options\n  if (options) {\n    this.deep = !!options.deep;\n    this.user = !!options.user;\n    this.lazy = !!options.lazy;\n    this.sync = !!options.sync;\n  } else {\n    this.deep = this.user = this.lazy = this.sync = false;\n  }\n  this.cb = cb;\n  this.id = ++uid$2; // uid for batching\n  this.active = true;\n  this.dirty = this.lazy; // for lazy watchers\n  this.deps = [];\n  this.newDeps = [];\n  this.depIds = new _Set();\n  this.newDepIds = new _Set();\n  this.expression = process.env.NODE_ENV !== 'production'\n    ? expOrFn.toString()\n    : '';\n  // parse expression for getter\n  if (typeof expOrFn === 'function') {\n    this.getter = expOrFn;\n  } else {\n    this.getter = parsePath(expOrFn);\n    if (!this.getter) {\n      this.getter = function () {};\n      process.env.NODE_ENV !== 'production' && warn(\n        \"Failed watching path: \\\"\" + expOrFn + \"\\\" \" +\n        'Watcher only accepts simple dot-delimited paths. ' +\n        'For full control, use a function instead.',\n        vm\n      );\n    }\n  }\n  this.value = this.lazy\n    ? undefined\n    : this.get();\n};\n\n/**\n * Evaluate the getter, and re-collect dependencies.\n */\nWatcher.prototype.get = function get () {\n  pushTarget(this);\n  var value;\n  var vm = this.vm;\n  if (this.user) {\n    try {\n      value = this.getter.call(vm, vm);\n    } catch (e) {\n      handleError(e, vm, (\"getter for watcher \\\"\" + (this.expression) + \"\\\"\"));\n    }\n  } else {\n    value = this.getter.call(vm, vm);\n  }\n  // \"touch\" every property so they are all tracked as\n  // dependencies for deep watching\n  if (this.deep) {\n    traverse(value);\n  }\n  popTarget();\n  this.cleanupDeps();\n  return value\n};\n\n/**\n * Add a dependency to this directive.\n */\nWatcher.prototype.addDep = function addDep (dep) {\n  var id = dep.id;\n  if (!this.newDepIds.has(id)) {\n    this.newDepIds.add(id);\n    this.newDeps.push(dep);\n    if (!this.depIds.has(id)) {\n      dep.addSub(this);\n    }\n  }\n};\n\n/**\n * Clean up for dependency collection.\n */\nWatcher.prototype.cleanupDeps = function cleanupDeps () {\n    var this$1 = this;\n\n  var i = this.deps.length;\n  while (i--) {\n    var dep = this$1.deps[i];\n    if (!this$1.newDepIds.has(dep.id)) {\n      dep.removeSub(this$1);\n    }\n  }\n  var tmp = this.depIds;\n  this.depIds = this.newDepIds;\n  this.newDepIds = tmp;\n  this.newDepIds.clear();\n  tmp = this.deps;\n  this.deps = this.newDeps;\n  this.newDeps = tmp;\n  this.newDeps.length = 0;\n};\n\n/**\n * Subscriber interface.\n * Will be called when a dependency changes.\n */\nWatcher.prototype.update = function update () {\n  /* istanbul ignore else */\n  if (this.lazy) {\n    this.dirty = true;\n  } else if (this.sync) {\n    this.run();\n  } else {\n    queueWatcher(this);\n  }\n};\n\n/**\n * Scheduler job interface.\n * Will be called by the scheduler.\n */\nWatcher.prototype.run = function run () {\n  if (this.active) {\n    var value = this.get();\n    if (\n      value !== this.value ||\n      // Deep watchers and watchers on Object/Arrays should fire even\n      // when the value is the same, because the value may\n      // have mutated.\n      isObject(value) ||\n      this.deep\n    ) {\n      // set new value\n      var oldValue = this.value;\n      this.value = value;\n      if (this.user) {\n        try {\n          this.cb.call(this.vm, value, oldValue);\n        } catch (e) {\n          handleError(e, this.vm, (\"callback for watcher \\\"\" + (this.expression) + \"\\\"\"));\n        }\n      } else {\n        this.cb.call(this.vm, value, oldValue);\n      }\n    }\n  }\n};\n\n/**\n * Evaluate the value of the watcher.\n * This only gets called for lazy watchers.\n */\nWatcher.prototype.evaluate = function evaluate () {\n  this.value = this.get();\n  this.dirty = false;\n};\n\n/**\n * Depend on all deps collected by this watcher.\n */\nWatcher.prototype.depend = function depend () {\n    var this$1 = this;\n\n  var i = this.deps.length;\n  while (i--) {\n    this$1.deps[i].depend();\n  }\n};\n\n/**\n * Remove self from all dependencies' subscriber list.\n */\nWatcher.prototype.teardown = function teardown () {\n    var this$1 = this;\n\n  if (this.active) {\n    // remove self from vm's watcher list\n    // this is a somewhat expensive operation so we skip it\n    // if the vm is being destroyed.\n    if (!this.vm._isBeingDestroyed) {\n      remove(this.vm._watchers, this);\n    }\n    var i = this.deps.length;\n    while (i--) {\n      this$1.deps[i].removeSub(this$1);\n    }\n    this.active = false;\n  }\n};\n\n/**\n * Recursively traverse an object to evoke all converted\n * getters, so that every nested property inside the object\n * is collected as a \"deep\" dependency.\n */\nvar seenObjects = new _Set();\nfunction traverse (val) {\n  seenObjects.clear();\n  _traverse(val, seenObjects);\n}\n\nfunction _traverse (val, seen) {\n  var i, keys;\n  var isA = Array.isArray(val);\n  if ((!isA && !isObject(val)) || !Object.isExtensible(val)) {\n    return\n  }\n  if (val.__ob__) {\n    var depId = val.__ob__.dep.id;\n    if (seen.has(depId)) {\n      return\n    }\n    seen.add(depId);\n  }\n  if (isA) {\n    i = val.length;\n    while (i--) { _traverse(val[i], seen); }\n  } else {\n    keys = Object.keys(val);\n    i = keys.length;\n    while (i--) { _traverse(val[keys[i]], seen); }\n  }\n}\n\n/*  */\n\nvar sharedPropertyDefinition = {\n  enumerable: true,\n  configurable: true,\n  get: noop,\n  set: noop\n};\n\nfunction proxy (target, sourceKey, key) {\n  sharedPropertyDefinition.get = function proxyGetter () {\n    return this[sourceKey][key]\n  };\n  sharedPropertyDefinition.set = function proxySetter (val) {\n    this[sourceKey][key] = val;\n  };\n  Object.defineProperty(target, key, sharedPropertyDefinition);\n}\n\nfunction initState (vm) {\n  vm._watchers = [];\n  var opts = vm.$options;\n  if (opts.props) { initProps(vm, opts.props); }\n  if (opts.methods) { initMethods(vm, opts.methods); }\n  if (opts.data) {\n    initData(vm);\n  } else {\n    observe(vm._data = {}, true /* asRootData */);\n  }\n  if (opts.computed) { initComputed(vm, opts.computed); }\n  if (opts.watch) { initWatch(vm, opts.watch); }\n}\n\nvar isReservedProp = { key: 1, ref: 1, slot: 1 };\n\nfunction initProps (vm, propsOptions) {\n  var propsData = vm.$options.propsData || {};\n  var props = vm._props = {};\n  // cache prop keys so that future props updates can iterate using Array\n  // instead of dynamic object key enumeration.\n  var keys = vm.$options._propKeys = [];\n  var isRoot = !vm.$parent;\n  // root instance props should be converted\n  observerState.shouldConvert = isRoot;\n  var loop = function ( key ) {\n    keys.push(key);\n    var value = validateProp(key, propsOptions, propsData, vm);\n    /* istanbul ignore else */\n    if (process.env.NODE_ENV !== 'production') {\n      if (isReservedProp[key]) {\n        warn(\n          (\"\\\"\" + key + \"\\\" is a reserved attribute and cannot be used as component prop.\"),\n          vm\n        );\n      }\n      defineReactive$$1(props, key, value, function () {\n        if (vm.$parent && !observerState.isSettingProps) {\n          warn(\n            \"Avoid mutating a prop directly since the value will be \" +\n            \"overwritten whenever the parent component re-renders. \" +\n            \"Instead, use a data or computed property based on the prop's \" +\n            \"value. Prop being mutated: \\\"\" + key + \"\\\"\",\n            vm\n          );\n        }\n      });\n    } else {\n      defineReactive$$1(props, key, value);\n    }\n    // static props are already proxied on the component's prototype\n    // during Vue.extend(). We only need to proxy props defined at\n    // instantiation here.\n    if (!(key in vm)) {\n      proxy(vm, \"_props\", key);\n    }\n  };\n\n  for (var key in propsOptions) loop( key );\n  observerState.shouldConvert = true;\n}\n\nfunction initData (vm) {\n  var data = vm.$options.data;\n  data = vm._data = typeof data === 'function'\n    ? getData(data, vm)\n    : data || {};\n  if (!isPlainObject(data)) {\n    data = {};\n    process.env.NODE_ENV !== 'production' && warn(\n      'data functions should return an object:\\n' +\n      'https://vuejs.org/v2/guide/components.html#data-Must-Be-a-Function',\n      vm\n    );\n  }\n  // proxy data on instance\n  var keys = Object.keys(data);\n  var props = vm.$options.props;\n  var i = keys.length;\n  while (i--) {\n    if (props && hasOwn(props, keys[i])) {\n      process.env.NODE_ENV !== 'production' && warn(\n        \"The data property \\\"\" + (keys[i]) + \"\\\" is already declared as a prop. \" +\n        \"Use prop default value instead.\",\n        vm\n      );\n    } else if (!isReserved(keys[i])) {\n      proxy(vm, \"_data\", keys[i]);\n    }\n  }\n  // observe data\n  observe(data, true /* asRootData */);\n}\n\nfunction getData (data, vm) {\n  try {\n    return data.call(vm)\n  } catch (e) {\n    handleError(e, vm, \"data()\");\n    return {}\n  }\n}\n\nvar computedWatcherOptions = { lazy: true };\n\nfunction initComputed (vm, computed) {\n  var watchers = vm._computedWatchers = Object.create(null);\n\n  for (var key in computed) {\n    var userDef = computed[key];\n    var getter = typeof userDef === 'function' ? userDef : userDef.get;\n    if (process.env.NODE_ENV !== 'production') {\n      if (getter === undefined) {\n        warn(\n          (\"No getter function has been defined for computed property \\\"\" + key + \"\\\".\"),\n          vm\n        );\n        getter = noop;\n      }\n    }\n    // create internal watcher for the computed property.\n    watchers[key] = new Watcher(vm, getter, noop, computedWatcherOptions);\n\n    // component-defined computed properties are already defined on the\n    // component prototype. We only need to define computed properties defined\n    // at instantiation here.\n    if (!(key in vm)) {\n      defineComputed(vm, key, userDef);\n    }\n  }\n}\n\nfunction defineComputed (target, key, userDef) {\n  if (typeof userDef === 'function') {\n    sharedPropertyDefinition.get = createComputedGetter(key);\n    sharedPropertyDefinition.set = noop;\n  } else {\n    sharedPropertyDefinition.get = userDef.get\n      ? userDef.cache !== false\n        ? createComputedGetter(key)\n        : userDef.get\n      : noop;\n    sharedPropertyDefinition.set = userDef.set\n      ? userDef.set\n      : noop;\n  }\n  Object.defineProperty(target, key, sharedPropertyDefinition);\n}\n\nfunction createComputedGetter (key) {\n  return function computedGetter () {\n    var watcher = this._computedWatchers && this._computedWatchers[key];\n    if (watcher) {\n      if (watcher.dirty) {\n        watcher.evaluate();\n      }\n      if (Dep.target) {\n        watcher.depend();\n      }\n      return watcher.value\n    }\n  }\n}\n\nfunction initMethods (vm, methods) {\n  var props = vm.$options.props;\n  for (var key in methods) {\n    vm[key] = methods[key] == null ? noop : bind(methods[key], vm);\n    if (process.env.NODE_ENV !== 'production') {\n      if (methods[key] == null) {\n        warn(\n          \"method \\\"\" + key + \"\\\" has an undefined value in the component definition. \" +\n          \"Did you reference the function correctly?\",\n          vm\n        );\n      }\n      if (props && hasOwn(props, key)) {\n        warn(\n          (\"method \\\"\" + key + \"\\\" has already been defined as a prop.\"),\n          vm\n        );\n      }\n    }\n  }\n}\n\nfunction initWatch (vm, watch) {\n  for (var key in watch) {\n    var handler = watch[key];\n    if (Array.isArray(handler)) {\n      for (var i = 0; i < handler.length; i++) {\n        createWatcher(vm, key, handler[i]);\n      }\n    } else {\n      createWatcher(vm, key, handler);\n    }\n  }\n}\n\nfunction createWatcher (vm, key, handler) {\n  var options;\n  if (isPlainObject(handler)) {\n    options = handler;\n    handler = handler.handler;\n  }\n  if (typeof handler === 'string') {\n    handler = vm[handler];\n  }\n  vm.$watch(key, handler, options);\n}\n\nfunction stateMixin (Vue) {\n  // flow somehow has problems with directly declared definition object\n  // when using Object.defineProperty, so we have to procedurally build up\n  // the object here.\n  var dataDef = {};\n  dataDef.get = function () { return this._data };\n  var propsDef = {};\n  propsDef.get = function () { return this._props };\n  if (process.env.NODE_ENV !== 'production') {\n    dataDef.set = function (newData) {\n      warn(\n        'Avoid replacing instance root $data. ' +\n        'Use nested data properties instead.',\n        this\n      );\n    };\n    propsDef.set = function () {\n      warn(\"$props is readonly.\", this);\n    };\n  }\n  Object.defineProperty(Vue.prototype, '$data', dataDef);\n  Object.defineProperty(Vue.prototype, '$props', propsDef);\n\n  Vue.prototype.$set = set;\n  Vue.prototype.$delete = del;\n\n  Vue.prototype.$watch = function (\n    expOrFn,\n    cb,\n    options\n  ) {\n    var vm = this;\n    options = options || {};\n    options.user = true;\n    var watcher = new Watcher(vm, expOrFn, cb, options);\n    if (options.immediate) {\n      cb.call(vm, watcher.value);\n    }\n    return function unwatchFn () {\n      watcher.teardown();\n    }\n  };\n}\n\n/*  */\n\n// hooks to be invoked on component VNodes during patch\nvar componentVNodeHooks = {\n  init: function init (\n    vnode,\n    hydrating,\n    parentElm,\n    refElm\n  ) {\n    if (!vnode.componentInstance || vnode.componentInstance._isDestroyed) {\n      var child = vnode.componentInstance = createComponentInstanceForVnode(\n        vnode,\n        activeInstance,\n        parentElm,\n        refElm\n      );\n      child.$mount(hydrating ? vnode.elm : undefined, hydrating);\n    } else if (vnode.data.keepAlive) {\n      // kept-alive components, treat as a patch\n      var mountedNode = vnode; // work around flow\n      componentVNodeHooks.prepatch(mountedNode, mountedNode);\n    }\n  },\n\n  prepatch: function prepatch (oldVnode, vnode) {\n    var options = vnode.componentOptions;\n    var child = vnode.componentInstance = oldVnode.componentInstance;\n    updateChildComponent(\n      child,\n      options.propsData, // updated props\n      options.listeners, // updated listeners\n      vnode, // new parent vnode\n      options.children // new children\n    );\n  },\n\n  insert: function insert (vnode) {\n    if (!vnode.componentInstance._isMounted) {\n      vnode.componentInstance._isMounted = true;\n      callHook(vnode.componentInstance, 'mounted');\n    }\n    if (vnode.data.keepAlive) {\n      activateChildComponent(vnode.componentInstance, true /* direct */);\n    }\n  },\n\n  destroy: function destroy (vnode) {\n    if (!vnode.componentInstance._isDestroyed) {\n      if (!vnode.data.keepAlive) {\n        vnode.componentInstance.$destroy();\n      } else {\n        deactivateChildComponent(vnode.componentInstance, true /* direct */);\n      }\n    }\n  }\n};\n\nvar hooksToMerge = Object.keys(componentVNodeHooks);\n\nfunction createComponent (\n  Ctor,\n  data,\n  context,\n  children,\n  tag\n) {\n  if (!Ctor) {\n    return\n  }\n\n  var baseCtor = context.$options._base;\n  if (isObject(Ctor)) {\n    Ctor = baseCtor.extend(Ctor);\n  }\n\n  if (typeof Ctor !== 'function') {\n    if (process.env.NODE_ENV !== 'production') {\n      warn((\"Invalid Component definition: \" + (String(Ctor))), context);\n    }\n    return\n  }\n\n  // async component\n  if (!Ctor.cid) {\n    if (Ctor.resolved) {\n      Ctor = Ctor.resolved;\n    } else {\n      Ctor = resolveAsyncComponent(Ctor, baseCtor, function () {\n        // it's ok to queue this on every render because\n        // $forceUpdate is buffered by the scheduler.\n        context.$forceUpdate();\n      });\n      if (!Ctor) {\n        // return nothing if this is indeed an async component\n        // wait for the callback to trigger parent update.\n        return\n      }\n    }\n  }\n\n  // resolve constructor options in case global mixins are applied after\n  // component constructor creation\n  resolveConstructorOptions(Ctor);\n\n  data = data || {};\n\n  // transform component v-model data into props & events\n  if (data.model) {\n    transformModel(Ctor.options, data);\n  }\n\n  // extract props\n  var propsData = extractProps(data, Ctor, tag);\n\n  // functional component\n  if (Ctor.options.functional) {\n    return createFunctionalComponent(Ctor, propsData, data, context, children)\n  }\n\n  // extract listeners, since these needs to be treated as\n  // child component listeners instead of DOM listeners\n  var listeners = data.on;\n  // replace with listeners with .native modifier\n  data.on = data.nativeOn;\n\n  if (Ctor.options.abstract) {\n    // abstract components do not keep anything\n    // other than props & listeners\n    data = {};\n  }\n\n  // merge component management hooks onto the placeholder node\n  mergeHooks(data);\n\n  // return a placeholder vnode\n  var name = Ctor.options.name || tag;\n  var vnode = new VNode(\n    (\"vue-component-\" + (Ctor.cid) + (name ? (\"-\" + name) : '')),\n    data, undefined, undefined, undefined, context,\n    { Ctor: Ctor, propsData: propsData, listeners: listeners, tag: tag, children: children }\n  );\n  return vnode\n}\n\nfunction createFunctionalComponent (\n  Ctor,\n  propsData,\n  data,\n  context,\n  children\n) {\n  var props = {};\n  var propOptions = Ctor.options.props;\n  if (propOptions) {\n    for (var key in propOptions) {\n      props[key] = validateProp(key, propOptions, propsData);\n    }\n  }\n  // ensure the createElement function in functional components\n  // gets a unique context - this is necessary for correct named slot check\n  var _context = Object.create(context);\n  var h = function (a, b, c, d) { return createElement(_context, a, b, c, d, true); };\n  var vnode = Ctor.options.render.call(null, h, {\n    props: props,\n    data: data,\n    parent: context,\n    children: children,\n    slots: function () { return resolveSlots(children, context); }\n  });\n  if (vnode instanceof VNode) {\n    vnode.functionalContext = context;\n    if (data.slot) {\n      (vnode.data || (vnode.data = {})).slot = data.slot;\n    }\n  }\n  return vnode\n}\n\nfunction createComponentInstanceForVnode (\n  vnode, // we know it's MountedComponentVNode but flow doesn't\n  parent, // activeInstance in lifecycle state\n  parentElm,\n  refElm\n) {\n  var vnodeComponentOptions = vnode.componentOptions;\n  var options = {\n    _isComponent: true,\n    parent: parent,\n    propsData: vnodeComponentOptions.propsData,\n    _componentTag: vnodeComponentOptions.tag,\n    _parentVnode: vnode,\n    _parentListeners: vnodeComponentOptions.listeners,\n    _renderChildren: vnodeComponentOptions.children,\n    _parentElm: parentElm || null,\n    _refElm: refElm || null\n  };\n  // check inline-template render functions\n  var inlineTemplate = vnode.data.inlineTemplate;\n  if (inlineTemplate) {\n    options.render = inlineTemplate.render;\n    options.staticRenderFns = inlineTemplate.staticRenderFns;\n  }\n  return new vnodeComponentOptions.Ctor(options)\n}\n\nfunction resolveAsyncComponent (\n  factory,\n  baseCtor,\n  cb\n) {\n  if (factory.requested) {\n    // pool callbacks\n    factory.pendingCallbacks.push(cb);\n  } else {\n    factory.requested = true;\n    var cbs = factory.pendingCallbacks = [cb];\n    var sync = true;\n\n    var resolve = function (res) {\n      if (isObject(res)) {\n        res = baseCtor.extend(res);\n      }\n      // cache resolved\n      factory.resolved = res;\n      // invoke callbacks only if this is not a synchronous resolve\n      // (async resolves are shimmed as synchronous during SSR)\n      if (!sync) {\n        for (var i = 0, l = cbs.length; i < l; i++) {\n          cbs[i](res);\n        }\n      }\n    };\n\n    var reject = function (reason) {\n      process.env.NODE_ENV !== 'production' && warn(\n        \"Failed to resolve async component: \" + (String(factory)) +\n        (reason ? (\"\\nReason: \" + reason) : '')\n      );\n    };\n\n    var res = factory(resolve, reject);\n\n    // handle promise\n    if (res && typeof res.then === 'function' && !factory.resolved) {\n      res.then(resolve, reject);\n    }\n\n    sync = false;\n    // return in case resolved synchronously\n    return factory.resolved\n  }\n}\n\nfunction extractProps (data, Ctor, tag) {\n  // we are only extracting raw values here.\n  // validation and default values are handled in the child\n  // component itself.\n  var propOptions = Ctor.options.props;\n  if (!propOptions) {\n    return\n  }\n  var res = {};\n  var attrs = data.attrs;\n  var props = data.props;\n  var domProps = data.domProps;\n  if (attrs || props || domProps) {\n    for (var key in propOptions) {\n      var altKey = hyphenate(key);\n      if (process.env.NODE_ENV !== 'production') {\n        var keyInLowerCase = key.toLowerCase();\n        if (\n          key !== keyInLowerCase &&\n          attrs && attrs.hasOwnProperty(keyInLowerCase)\n        ) {\n          tip(\n            \"Prop \\\"\" + keyInLowerCase + \"\\\" is passed to component \" +\n            (formatComponentName(tag || Ctor)) + \", but the declared prop name is\" +\n            \" \\\"\" + key + \"\\\". \" +\n            \"Note that HTML attributes are case-insensitive and camelCased \" +\n            \"props need to use their kebab-case equivalents when using in-DOM \" +\n            \"templates. You should probably use \\\"\" + altKey + \"\\\" instead of \\\"\" + key + \"\\\".\"\n          );\n        }\n      }\n      checkProp(res, props, key, altKey, true) ||\n      checkProp(res, attrs, key, altKey) ||\n      checkProp(res, domProps, key, altKey);\n    }\n  }\n  return res\n}\n\nfunction checkProp (\n  res,\n  hash,\n  key,\n  altKey,\n  preserve\n) {\n  if (hash) {\n    if (hasOwn(hash, key)) {\n      res[key] = hash[key];\n      if (!preserve) {\n        delete hash[key];\n      }\n      return true\n    } else if (hasOwn(hash, altKey)) {\n      res[key] = hash[altKey];\n      if (!preserve) {\n        delete hash[altKey];\n      }\n      return true\n    }\n  }\n  return false\n}\n\nfunction mergeHooks (data) {\n  if (!data.hook) {\n    data.hook = {};\n  }\n  for (var i = 0; i < hooksToMerge.length; i++) {\n    var key = hooksToMerge[i];\n    var fromParent = data.hook[key];\n    var ours = componentVNodeHooks[key];\n    data.hook[key] = fromParent ? mergeHook$1(ours, fromParent) : ours;\n  }\n}\n\nfunction mergeHook$1 (one, two) {\n  return function (a, b, c, d) {\n    one(a, b, c, d);\n    two(a, b, c, d);\n  }\n}\n\n// transform component v-model info (value and callback) into\n// prop and event handler respectively.\nfunction transformModel (options, data) {\n  var prop = (options.model && options.model.prop) || 'value';\n  var event = (options.model && options.model.event) || 'input';(data.props || (data.props = {}))[prop] = data.model.value;\n  var on = data.on || (data.on = {});\n  if (on[event]) {\n    on[event] = [data.model.callback].concat(on[event]);\n  } else {\n    on[event] = data.model.callback;\n  }\n}\n\n/*  */\n\nvar SIMPLE_NORMALIZE = 1;\nvar ALWAYS_NORMALIZE = 2;\n\n// wrapper function for providing a more flexible interface\n// without getting yelled at by flow\nfunction createElement (\n  context,\n  tag,\n  data,\n  children,\n  normalizationType,\n  alwaysNormalize\n) {\n  if (Array.isArray(data) || isPrimitive(data)) {\n    normalizationType = children;\n    children = data;\n    data = undefined;\n  }\n  if (alwaysNormalize) { normalizationType = ALWAYS_NORMALIZE; }\n  return _createElement(context, tag, data, children, normalizationType)\n}\n\nfunction _createElement (\n  context,\n  tag,\n  data,\n  children,\n  normalizationType\n) {\n  if (data && data.__ob__) {\n    process.env.NODE_ENV !== 'production' && warn(\n      \"Avoid using observed data object as vnode data: \" + (JSON.stringify(data)) + \"\\n\" +\n      'Always create fresh vnode data objects in each render!',\n      context\n    );\n    return createEmptyVNode()\n  }\n  if (!tag) {\n    // in case of component :is set to falsy value\n    return createEmptyVNode()\n  }\n  // support single function children as default scoped slot\n  if (Array.isArray(children) &&\n      typeof children[0] === 'function') {\n    data = data || {};\n    data.scopedSlots = { default: children[0] };\n    children.length = 0;\n  }\n  if (normalizationType === ALWAYS_NORMALIZE) {\n    children = normalizeChildren(children);\n  } else if (normalizationType === SIMPLE_NORMALIZE) {\n    children = simpleNormalizeChildren(children);\n  }\n  var vnode, ns;\n  if (typeof tag === 'string') {\n    var Ctor;\n    ns = config.getTagNamespace(tag);\n    if (config.isReservedTag(tag)) {\n      // platform built-in elements\n      vnode = new VNode(\n        config.parsePlatformTagName(tag), data, children,\n        undefined, undefined, context\n      );\n    } else if ((Ctor = resolveAsset(context.$options, 'components', tag))) {\n      // component\n      vnode = createComponent(Ctor, data, context, children, tag);\n    } else {\n      // unknown or unlisted namespaced elements\n      // check at runtime because it may get assigned a namespace when its\n      // parent normalizes children\n      vnode = new VNode(\n        tag, data, children,\n        undefined, undefined, context\n      );\n    }\n  } else {\n    // direct component options / constructor\n    vnode = createComponent(tag, data, context, children);\n  }\n  if (vnode) {\n    if (ns) { applyNS(vnode, ns); }\n    return vnode\n  } else {\n    return createEmptyVNode()\n  }\n}\n\nfunction applyNS (vnode, ns) {\n  vnode.ns = ns;\n  if (vnode.tag === 'foreignObject') {\n    // use default namespace inside foreignObject\n    return\n  }\n  if (vnode.children) {\n    for (var i = 0, l = vnode.children.length; i < l; i++) {\n      var child = vnode.children[i];\n      if (child.tag && !child.ns) {\n        applyNS(child, ns);\n      }\n    }\n  }\n}\n\n/*  */\n\n/**\n * Runtime helper for rendering v-for lists.\n */\nfunction renderList (\n  val,\n  render\n) {\n  var ret, i, l, keys, key;\n  if (Array.isArray(val) || typeof val === 'string') {\n    ret = new Array(val.length);\n    for (i = 0, l = val.length; i < l; i++) {\n      ret[i] = render(val[i], i);\n    }\n  } else if (typeof val === 'number') {\n    ret = new Array(val);\n    for (i = 0; i < val; i++) {\n      ret[i] = render(i + 1, i);\n    }\n  } else if (isObject(val)) {\n    keys = Object.keys(val);\n    ret = new Array(keys.length);\n    for (i = 0, l = keys.length; i < l; i++) {\n      key = keys[i];\n      ret[i] = render(val[key], key, i);\n    }\n  }\n  return ret\n}\n\n/*  */\n\n/**\n * Runtime helper for rendering <slot>\n */\nfunction renderSlot (\n  name,\n  fallback,\n  props,\n  bindObject\n) {\n  var scopedSlotFn = this.$scopedSlots[name];\n  if (scopedSlotFn) { // scoped slot\n    props = props || {};\n    if (bindObject) {\n      extend(props, bindObject);\n    }\n    return scopedSlotFn(props) || fallback\n  } else {\n    var slotNodes = this.$slots[name];\n    // warn duplicate slot usage\n    if (slotNodes && process.env.NODE_ENV !== 'production') {\n      slotNodes._rendered && warn(\n        \"Duplicate presence of slot \\\"\" + name + \"\\\" found in the same render tree \" +\n        \"- this will likely cause render errors.\",\n        this\n      );\n      slotNodes._rendered = true;\n    }\n    return slotNodes || fallback\n  }\n}\n\n/*  */\n\n/**\n * Runtime helper for resolving filters\n */\nfunction resolveFilter (id) {\n  return resolveAsset(this.$options, 'filters', id, true) || identity\n}\n\n/*  */\n\n/**\n * Runtime helper for checking keyCodes from config.\n */\nfunction checkKeyCodes (\n  eventKeyCode,\n  key,\n  builtInAlias\n) {\n  var keyCodes = config.keyCodes[key] || builtInAlias;\n  if (Array.isArray(keyCodes)) {\n    return keyCodes.indexOf(eventKeyCode) === -1\n  } else {\n    return keyCodes !== eventKeyCode\n  }\n}\n\n/*  */\n\n/**\n * Runtime helper for merging v-bind=\"object\" into a VNode's data.\n */\nfunction bindObjectProps (\n  data,\n  tag,\n  value,\n  asProp\n) {\n  if (value) {\n    if (!isObject(value)) {\n      process.env.NODE_ENV !== 'production' && warn(\n        'v-bind without argument expects an Object or Array value',\n        this\n      );\n    } else {\n      if (Array.isArray(value)) {\n        value = toObject(value);\n      }\n      var hash;\n      for (var key in value) {\n        if (key === 'class' || key === 'style') {\n          hash = data;\n        } else {\n          var type = data.attrs && data.attrs.type;\n          hash = asProp || config.mustUseProp(tag, type, key)\n            ? data.domProps || (data.domProps = {})\n            : data.attrs || (data.attrs = {});\n        }\n        if (!(key in hash)) {\n          hash[key] = value[key];\n        }\n      }\n    }\n  }\n  return data\n}\n\n/*  */\n\n/**\n * Runtime helper for rendering static trees.\n */\nfunction renderStatic (\n  index,\n  isInFor\n) {\n  var tree = this._staticTrees[index];\n  // if has already-rendered static tree and not inside v-for,\n  // we can reuse the same tree by doing a shallow clone.\n  if (tree && !isInFor) {\n    return Array.isArray(tree)\n      ? cloneVNodes(tree)\n      : cloneVNode(tree)\n  }\n  // otherwise, render a fresh tree.\n  tree = this._staticTrees[index] =\n    this.$options.staticRenderFns[index].call(this._renderProxy);\n  markStatic(tree, (\"__static__\" + index), false);\n  return tree\n}\n\n/**\n * Runtime helper for v-once.\n * Effectively it means marking the node as static with a unique key.\n */\nfunction markOnce (\n  tree,\n  index,\n  key\n) {\n  markStatic(tree, (\"__once__\" + index + (key ? (\"_\" + key) : \"\")), true);\n  return tree\n}\n\nfunction markStatic (\n  tree,\n  key,\n  isOnce\n) {\n  if (Array.isArray(tree)) {\n    for (var i = 0; i < tree.length; i++) {\n      if (tree[i] && typeof tree[i] !== 'string') {\n        markStaticNode(tree[i], (key + \"_\" + i), isOnce);\n      }\n    }\n  } else {\n    markStaticNode(tree, key, isOnce);\n  }\n}\n\nfunction markStaticNode (node, key, isOnce) {\n  node.isStatic = true;\n  node.key = key;\n  node.isOnce = isOnce;\n}\n\n/*  */\n\nfunction initRender (vm) {\n  vm.$vnode = null; // the placeholder node in parent tree\n  vm._vnode = null; // the root of the child tree\n  vm._staticTrees = null;\n  var parentVnode = vm.$options._parentVnode;\n  var renderContext = parentVnode && parentVnode.context;\n  vm.$slots = resolveSlots(vm.$options._renderChildren, renderContext);\n  vm.$scopedSlots = emptyObject;\n  // bind the createElement fn to this instance\n  // so that we get proper render context inside it.\n  // args order: tag, data, children, normalizationType, alwaysNormalize\n  // internal version is used by render functions compiled from templates\n  vm._c = function (a, b, c, d) { return createElement(vm, a, b, c, d, false); };\n  // normalization is always applied for the public version, used in\n  // user-written render functions.\n  vm.$createElement = function (a, b, c, d) { return createElement(vm, a, b, c, d, true); };\n}\n\nfunction renderMixin (Vue) {\n  Vue.prototype.$nextTick = function (fn) {\n    return nextTick(fn, this)\n  };\n\n  Vue.prototype._render = function () {\n    var vm = this;\n    var ref = vm.$options;\n    var render = ref.render;\n    var staticRenderFns = ref.staticRenderFns;\n    var _parentVnode = ref._parentVnode;\n\n    if (vm._isMounted) {\n      // clone slot nodes on re-renders\n      for (var key in vm.$slots) {\n        vm.$slots[key] = cloneVNodes(vm.$slots[key]);\n      }\n    }\n\n    vm.$scopedSlots = (_parentVnode && _parentVnode.data.scopedSlots) || emptyObject;\n\n    if (staticRenderFns && !vm._staticTrees) {\n      vm._staticTrees = [];\n    }\n    // set parent vnode. this allows render functions to have access\n    // to the data on the placeholder node.\n    vm.$vnode = _parentVnode;\n    // render self\n    var vnode;\n    try {\n      vnode = render.call(vm._renderProxy, vm.$createElement);\n    } catch (e) {\n      handleError(e, vm, \"render function\");\n      // return error render result,\n      // or previous vnode to prevent render error causing blank component\n      /* istanbul ignore else */\n      if (process.env.NODE_ENV !== 'production') {\n        vnode = vm.$options.renderError\n          ? vm.$options.renderError.call(vm._renderProxy, vm.$createElement, e)\n          : vm._vnode;\n      } else {\n        vnode = vm._vnode;\n      }\n    }\n    // return empty vnode in case the render function errored out\n    if (!(vnode instanceof VNode)) {\n      if (process.env.NODE_ENV !== 'production' && Array.isArray(vnode)) {\n        warn(\n          'Multiple root nodes returned from render function. Render function ' +\n          'should return a single root node.',\n          vm\n        );\n      }\n      vnode = createEmptyVNode();\n    }\n    // set parent\n    vnode.parent = _parentVnode;\n    return vnode\n  };\n\n  // internal render helpers.\n  // these are exposed on the instance prototype to reduce generated render\n  // code size.\n  Vue.prototype._o = markOnce;\n  Vue.prototype._n = toNumber;\n  Vue.prototype._s = _toString;\n  Vue.prototype._l = renderList;\n  Vue.prototype._t = renderSlot;\n  Vue.prototype._q = looseEqual;\n  Vue.prototype._i = looseIndexOf;\n  Vue.prototype._m = renderStatic;\n  Vue.prototype._f = resolveFilter;\n  Vue.prototype._k = checkKeyCodes;\n  Vue.prototype._b = bindObjectProps;\n  Vue.prototype._v = createTextVNode;\n  Vue.prototype._e = createEmptyVNode;\n  Vue.prototype._u = resolveScopedSlots;\n}\n\n/*  */\n\nfunction initProvide (vm) {\n  var provide = vm.$options.provide;\n  if (provide) {\n    vm._provided = typeof provide === 'function'\n      ? provide.call(vm)\n      : provide;\n  }\n}\n\nfunction initInjections (vm) {\n  var inject = vm.$options.inject;\n  if (inject) {\n    // inject is :any because flow is not smart enough to figure out cached\n    // isArray here\n    var isArray = Array.isArray(inject);\n    var keys = isArray\n      ? inject\n      : hasSymbol\n        ? Reflect.ownKeys(inject)\n        : Object.keys(inject);\n\n    var loop = function ( i ) {\n      var key = keys[i];\n      var provideKey = isArray ? key : inject[key];\n      var source = vm;\n      while (source) {\n        if (source._provided && provideKey in source._provided) {\n          /* istanbul ignore else */\n          if (process.env.NODE_ENV !== 'production') {\n            defineReactive$$1(vm, key, source._provided[provideKey], function () {\n              warn(\n                \"Avoid mutating an injected value directly since the changes will be \" +\n                \"overwritten whenever the provided component re-renders. \" +\n                \"injection being mutated: \\\"\" + key + \"\\\"\",\n                vm\n              );\n            });\n          } else {\n            defineReactive$$1(vm, key, source._provided[provideKey]);\n          }\n          break\n        }\n        source = source.$parent;\n      }\n    };\n\n    for (var i = 0; i < keys.length; i++) loop( i );\n  }\n}\n\n/*  */\n\nvar uid = 0;\n\nfunction initMixin (Vue) {\n  Vue.prototype._init = function (options) {\n    var vm = this;\n    // a uid\n    vm._uid = uid++;\n\n    var startTag, endTag;\n    /* istanbul ignore if */\n    if (process.env.NODE_ENV !== 'production' && config.performance && mark) {\n      startTag = \"vue-perf-init:\" + (vm._uid);\n      endTag = \"vue-perf-end:\" + (vm._uid);\n      mark(startTag);\n    }\n\n    // a flag to avoid this being observed\n    vm._isVue = true;\n    // merge options\n    if (options && options._isComponent) {\n      // optimize internal component instantiation\n      // since dynamic options merging is pretty slow, and none of the\n      // internal component options needs special treatment.\n      initInternalComponent(vm, options);\n    } else {\n      vm.$options = mergeOptions(\n        resolveConstructorOptions(vm.constructor),\n        options || {},\n        vm\n      );\n    }\n    /* istanbul ignore else */\n    if (process.env.NODE_ENV !== 'production') {\n      initProxy(vm);\n    } else {\n      vm._renderProxy = vm;\n    }\n    // expose real self\n    vm._self = vm;\n    initLifecycle(vm);\n    initEvents(vm);\n    initRender(vm);\n    callHook(vm, 'beforeCreate');\n    initInjections(vm); // resolve injections before data/props\n    initState(vm);\n    initProvide(vm); // resolve provide after data/props\n    callHook(vm, 'created');\n\n    /* istanbul ignore if */\n    if (process.env.NODE_ENV !== 'production' && config.performance && mark) {\n      vm._name = formatComponentName(vm, false);\n      mark(endTag);\n      measure(((vm._name) + \" init\"), startTag, endTag);\n    }\n\n    if (vm.$options.el) {\n      vm.$mount(vm.$options.el);\n    }\n  };\n}\n\nfunction initInternalComponent (vm, options) {\n  var opts = vm.$options = Object.create(vm.constructor.options);\n  // doing this because it's faster than dynamic enumeration.\n  opts.parent = options.parent;\n  opts.propsData = options.propsData;\n  opts._parentVnode = options._parentVnode;\n  opts._parentListeners = options._parentListeners;\n  opts._renderChildren = options._renderChildren;\n  opts._componentTag = options._componentTag;\n  opts._parentElm = options._parentElm;\n  opts._refElm = options._refElm;\n  if (options.render) {\n    opts.render = options.render;\n    opts.staticRenderFns = options.staticRenderFns;\n  }\n}\n\nfunction resolveConstructorOptions (Ctor) {\n  var options = Ctor.options;\n  if (Ctor.super) {\n    var superOptions = resolveConstructorOptions(Ctor.super);\n    var cachedSuperOptions = Ctor.superOptions;\n    if (superOptions !== cachedSuperOptions) {\n      // super option changed,\n      // need to resolve new options.\n      Ctor.superOptions = superOptions;\n      // check if there are any late-modified/attached options (#4976)\n      var modifiedOptions = resolveModifiedOptions(Ctor);\n      // update base extend options\n      if (modifiedOptions) {\n        extend(Ctor.extendOptions, modifiedOptions);\n      }\n      options = Ctor.options = mergeOptions(superOptions, Ctor.extendOptions);\n      if (options.name) {\n        options.components[options.name] = Ctor;\n      }\n    }\n  }\n  return options\n}\n\nfunction resolveModifiedOptions (Ctor) {\n  var modified;\n  var latest = Ctor.options;\n  var sealed = Ctor.sealedOptions;\n  for (var key in latest) {\n    if (latest[key] !== sealed[key]) {\n      if (!modified) { modified = {}; }\n      modified[key] = dedupe(latest[key], sealed[key]);\n    }\n  }\n  return modified\n}\n\nfunction dedupe (latest, sealed) {\n  // compare latest and sealed to ensure lifecycle hooks won't be duplicated\n  // between merges\n  if (Array.isArray(latest)) {\n    var res = [];\n    sealed = Array.isArray(sealed) ? sealed : [sealed];\n    for (var i = 0; i < latest.length; i++) {\n      if (sealed.indexOf(latest[i]) < 0) {\n        res.push(latest[i]);\n      }\n    }\n    return res\n  } else {\n    return latest\n  }\n}\n\nfunction Vue$2 (options) {\n  if (process.env.NODE_ENV !== 'production' &&\n    !(this instanceof Vue$2)) {\n    warn('Vue is a constructor and should be called with the `new` keyword');\n  }\n  this._init(options);\n}\n\ninitMixin(Vue$2);\nstateMixin(Vue$2);\neventsMixin(Vue$2);\nlifecycleMixin(Vue$2);\nrenderMixin(Vue$2);\n\n/*  */\n\nfunction initUse (Vue) {\n  Vue.use = function (plugin) {\n    /* istanbul ignore if */\n    if (plugin.installed) {\n      return\n    }\n    // additional parameters\n    var args = toArray(arguments, 1);\n    args.unshift(this);\n    if (typeof plugin.install === 'function') {\n      plugin.install.apply(plugin, args);\n    } else if (typeof plugin === 'function') {\n      plugin.apply(null, args);\n    }\n    plugin.installed = true;\n    return this\n  };\n}\n\n/*  */\n\nfunction initMixin$1 (Vue) {\n  Vue.mixin = function (mixin) {\n    this.options = mergeOptions(this.options, mixin);\n  };\n}\n\n/*  */\n\nfunction initExtend (Vue) {\n  /**\n   * Each instance constructor, including Vue, has a unique\n   * cid. This enables us to create wrapped \"child\n   * constructors\" for prototypal inheritance and cache them.\n   */\n  Vue.cid = 0;\n  var cid = 1;\n\n  /**\n   * Class inheritance\n   */\n  Vue.extend = function (extendOptions) {\n    extendOptions = extendOptions || {};\n    var Super = this;\n    var SuperId = Super.cid;\n    var cachedCtors = extendOptions._Ctor || (extendOptions._Ctor = {});\n    if (cachedCtors[SuperId]) {\n      return cachedCtors[SuperId]\n    }\n\n    var name = extendOptions.name || Super.options.name;\n    if (process.env.NODE_ENV !== 'production') {\n      if (!/^[a-zA-Z][\\w-]*$/.test(name)) {\n        warn(\n          'Invalid component name: \"' + name + '\". Component names ' +\n          'can only contain alphanumeric characters and the hyphen, ' +\n          'and must start with a letter.'\n        );\n      }\n    }\n\n    var Sub = function VueComponent (options) {\n      this._init(options);\n    };\n    Sub.prototype = Object.create(Super.prototype);\n    Sub.prototype.constructor = Sub;\n    Sub.cid = cid++;\n    Sub.options = mergeOptions(\n      Super.options,\n      extendOptions\n    );\n    Sub['super'] = Super;\n\n    // For props and computed properties, we define the proxy getters on\n    // the Vue instances at extension time, on the extended prototype. This\n    // avoids Object.defineProperty calls for each instance created.\n    if (Sub.options.props) {\n      initProps$1(Sub);\n    }\n    if (Sub.options.computed) {\n      initComputed$1(Sub);\n    }\n\n    // allow further extension/mixin/plugin usage\n    Sub.extend = Super.extend;\n    Sub.mixin = Super.mixin;\n    Sub.use = Super.use;\n\n    // create asset registers, so extended classes\n    // can have their private assets too.\n    config._assetTypes.forEach(function (type) {\n      Sub[type] = Super[type];\n    });\n    // enable recursive self-lookup\n    if (name) {\n      Sub.options.components[name] = Sub;\n    }\n\n    // keep a reference to the super options at extension time.\n    // later at instantiation we can check if Super's options have\n    // been updated.\n    Sub.superOptions = Super.options;\n    Sub.extendOptions = extendOptions;\n    Sub.sealedOptions = extend({}, Sub.options);\n\n    // cache constructor\n    cachedCtors[SuperId] = Sub;\n    return Sub\n  };\n}\n\nfunction initProps$1 (Comp) {\n  var props = Comp.options.props;\n  for (var key in props) {\n    proxy(Comp.prototype, \"_props\", key);\n  }\n}\n\nfunction initComputed$1 (Comp) {\n  var computed = Comp.options.computed;\n  for (var key in computed) {\n    defineComputed(Comp.prototype, key, computed[key]);\n  }\n}\n\n/*  */\n\nfunction initAssetRegisters (Vue) {\n  /**\n   * Create asset registration methods.\n   */\n  config._assetTypes.forEach(function (type) {\n    Vue[type] = function (\n      id,\n      definition\n    ) {\n      if (!definition) {\n        return this.options[type + 's'][id]\n      } else {\n        /* istanbul ignore if */\n        if (process.env.NODE_ENV !== 'production') {\n          if (type === 'component' && config.isReservedTag(id)) {\n            warn(\n              'Do not use built-in or reserved HTML elements as component ' +\n              'id: ' + id\n            );\n          }\n        }\n        if (type === 'component' && isPlainObject(definition)) {\n          definition.name = definition.name || id;\n          definition = this.options._base.extend(definition);\n        }\n        if (type === 'directive' && typeof definition === 'function') {\n          definition = { bind: definition, update: definition };\n        }\n        this.options[type + 's'][id] = definition;\n        return definition\n      }\n    };\n  });\n}\n\n/*  */\n\nvar patternTypes = [String, RegExp];\n\nfunction getComponentName (opts) {\n  return opts && (opts.Ctor.options.name || opts.tag)\n}\n\nfunction matches (pattern, name) {\n  if (typeof pattern === 'string') {\n    return pattern.split(',').indexOf(name) > -1\n  } else if (pattern instanceof RegExp) {\n    return pattern.test(name)\n  }\n  /* istanbul ignore next */\n  return false\n}\n\nfunction pruneCache (cache, filter) {\n  for (var key in cache) {\n    var cachedNode = cache[key];\n    if (cachedNode) {\n      var name = getComponentName(cachedNode.componentOptions);\n      if (name && !filter(name)) {\n        pruneCacheEntry(cachedNode);\n        cache[key] = null;\n      }\n    }\n  }\n}\n\nfunction pruneCacheEntry (vnode) {\n  if (vnode) {\n    if (!vnode.componentInstance._inactive) {\n      callHook(vnode.componentInstance, 'deactivated');\n    }\n    vnode.componentInstance.$destroy();\n  }\n}\n\nvar KeepAlive = {\n  name: 'keep-alive',\n  abstract: true,\n\n  props: {\n    include: patternTypes,\n    exclude: patternTypes\n  },\n\n  created: function created () {\n    this.cache = Object.create(null);\n  },\n\n  destroyed: function destroyed () {\n    var this$1 = this;\n\n    for (var key in this$1.cache) {\n      pruneCacheEntry(this$1.cache[key]);\n    }\n  },\n\n  watch: {\n    include: function include (val) {\n      pruneCache(this.cache, function (name) { return matches(val, name); });\n    },\n    exclude: function exclude (val) {\n      pruneCache(this.cache, function (name) { return !matches(val, name); });\n    }\n  },\n\n  render: function render () {\n    var vnode = getFirstComponentChild(this.$slots.default);\n    var componentOptions = vnode && vnode.componentOptions;\n    if (componentOptions) {\n      // check pattern\n      var name = getComponentName(componentOptions);\n      if (name && (\n        (this.include && !matches(this.include, name)) ||\n        (this.exclude && matches(this.exclude, name))\n      )) {\n        return vnode\n      }\n      var key = vnode.key == null\n        // same constructor may get registered as different local components\n        // so cid alone is not enough (#3269)\n        ? componentOptions.Ctor.cid + (componentOptions.tag ? (\"::\" + (componentOptions.tag)) : '')\n        : vnode.key;\n      if (this.cache[key]) {\n        vnode.componentInstance = this.cache[key].componentInstance;\n      } else {\n        this.cache[key] = vnode;\n      }\n      vnode.data.keepAlive = true;\n    }\n    return vnode\n  }\n};\n\nvar builtInComponents = {\n  KeepAlive: KeepAlive\n};\n\n/*  */\n\nfunction initGlobalAPI (Vue) {\n  // config\n  var configDef = {};\n  configDef.get = function () { return config; };\n  if (process.env.NODE_ENV !== 'production') {\n    configDef.set = function () {\n      warn(\n        'Do not replace the Vue.config object, set individual fields instead.'\n      );\n    };\n  }\n  Object.defineProperty(Vue, 'config', configDef);\n\n  // exposed util methods.\n  // NOTE: these are not considered part of the public API - avoid relying on\n  // them unless you are aware of the risk.\n  Vue.util = {\n    warn: warn,\n    extend: extend,\n    mergeOptions: mergeOptions,\n    defineReactive: defineReactive$$1\n  };\n\n  Vue.set = set;\n  Vue.delete = del;\n  Vue.nextTick = nextTick;\n\n  Vue.options = Object.create(null);\n  config._assetTypes.forEach(function (type) {\n    Vue.options[type + 's'] = Object.create(null);\n  });\n\n  // this is used to identify the \"base\" constructor to extend all plain-object\n  // components with in Weex's multi-instance scenarios.\n  Vue.options._base = Vue;\n\n  extend(Vue.options.components, builtInComponents);\n\n  initUse(Vue);\n  initMixin$1(Vue);\n  initExtend(Vue);\n  initAssetRegisters(Vue);\n}\n\ninitGlobalAPI(Vue$2);\n\nObject.defineProperty(Vue$2.prototype, '$isServer', {\n  get: isServerRendering\n});\n\nVue$2.version = '2.2.6';\n\n/*  */\n\n// attributes that should be using props for binding\nvar acceptValue = makeMap('input,textarea,option,select');\nvar mustUseProp = function (tag, type, attr) {\n  return (\n    (attr === 'value' && acceptValue(tag)) && type !== 'button' ||\n    (attr === 'selected' && tag === 'option') ||\n    (attr === 'checked' && tag === 'input') ||\n    (attr === 'muted' && tag === 'video')\n  )\n};\n\nvar isEnumeratedAttr = makeMap('contenteditable,draggable,spellcheck');\n\nvar isBooleanAttr = makeMap(\n  'allowfullscreen,async,autofocus,autoplay,checked,compact,controls,declare,' +\n  'default,defaultchecked,defaultmuted,defaultselected,defer,disabled,' +\n  'enabled,formnovalidate,hidden,indeterminate,inert,ismap,itemscope,loop,multiple,' +\n  'muted,nohref,noresize,noshade,novalidate,nowrap,open,pauseonexit,readonly,' +\n  'required,reversed,scoped,seamless,selected,sortable,translate,' +\n  'truespeed,typemustmatch,visible'\n);\n\nvar xlinkNS = 'http://www.w3.org/1999/xlink';\n\nvar isXlink = function (name) {\n  return name.charAt(5) === ':' && name.slice(0, 5) === 'xlink'\n};\n\nvar getXlinkProp = function (name) {\n  return isXlink(name) ? name.slice(6, name.length) : ''\n};\n\nvar isFalsyAttrValue = function (val) {\n  return val == null || val === false\n};\n\n/*  */\n\nfunction genClassForVnode (vnode) {\n  var data = vnode.data;\n  var parentNode = vnode;\n  var childNode = vnode;\n  while (childNode.componentInstance) {\n    childNode = childNode.componentInstance._vnode;\n    if (childNode.data) {\n      data = mergeClassData(childNode.data, data);\n    }\n  }\n  while ((parentNode = parentNode.parent)) {\n    if (parentNode.data) {\n      data = mergeClassData(data, parentNode.data);\n    }\n  }\n  return genClassFromData(data)\n}\n\nfunction mergeClassData (child, parent) {\n  return {\n    staticClass: concat(child.staticClass, parent.staticClass),\n    class: child.class\n      ? [child.class, parent.class]\n      : parent.class\n  }\n}\n\nfunction genClassFromData (data) {\n  var dynamicClass = data.class;\n  var staticClass = data.staticClass;\n  if (staticClass || dynamicClass) {\n    return concat(staticClass, stringifyClass(dynamicClass))\n  }\n  /* istanbul ignore next */\n  return ''\n}\n\nfunction concat (a, b) {\n  return a ? b ? (a + ' ' + b) : a : (b || '')\n}\n\nfunction stringifyClass (value) {\n  var res = '';\n  if (!value) {\n    return res\n  }\n  if (typeof value === 'string') {\n    return value\n  }\n  if (Array.isArray(value)) {\n    var stringified;\n    for (var i = 0, l = value.length; i < l; i++) {\n      if (value[i]) {\n        if ((stringified = stringifyClass(value[i]))) {\n          res += stringified + ' ';\n        }\n      }\n    }\n    return res.slice(0, -1)\n  }\n  if (isObject(value)) {\n    for (var key in value) {\n      if (value[key]) { res += key + ' '; }\n    }\n    return res.slice(0, -1)\n  }\n  /* istanbul ignore next */\n  return res\n}\n\n/*  */\n\nvar namespaceMap = {\n  svg: 'http://www.w3.org/2000/svg',\n  math: 'http://www.w3.org/1998/Math/MathML'\n};\n\nvar isHTMLTag = makeMap(\n  'html,body,base,head,link,meta,style,title,' +\n  'address,article,aside,footer,header,h1,h2,h3,h4,h5,h6,hgroup,nav,section,' +\n  'div,dd,dl,dt,figcaption,figure,hr,img,li,main,ol,p,pre,ul,' +\n  'a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,rtc,ruby,' +\n  's,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,' +\n  'embed,object,param,source,canvas,script,noscript,del,ins,' +\n  'caption,col,colgroup,table,thead,tbody,td,th,tr,' +\n  'button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,' +\n  'output,progress,select,textarea,' +\n  'details,dialog,menu,menuitem,summary,' +\n  'content,element,shadow,template'\n);\n\n// this map is intentionally selective, only covering SVG elements that may\n// contain child elements.\nvar isSVG = makeMap(\n  'svg,animate,circle,clippath,cursor,defs,desc,ellipse,filter,font-face,' +\n  'foreignObject,g,glyph,image,line,marker,mask,missing-glyph,path,pattern,' +\n  'polygon,polyline,rect,switch,symbol,text,textpath,tspan,use,view',\n  true\n);\n\n\n\nvar isReservedTag = function (tag) {\n  return isHTMLTag(tag) || isSVG(tag)\n};\n\nfunction getTagNamespace (tag) {\n  if (isSVG(tag)) {\n    return 'svg'\n  }\n  // basic support for MathML\n  // note it doesn't support other MathML elements being component roots\n  if (tag === 'math') {\n    return 'math'\n  }\n}\n\nvar unknownElementCache = Object.create(null);\nfunction isUnknownElement (tag) {\n  /* istanbul ignore if */\n  if (!inBrowser) {\n    return true\n  }\n  if (isReservedTag(tag)) {\n    return false\n  }\n  tag = tag.toLowerCase();\n  /* istanbul ignore if */\n  if (unknownElementCache[tag] != null) {\n    return unknownElementCache[tag]\n  }\n  var el = document.createElement(tag);\n  if (tag.indexOf('-') > -1) {\n    // http://stackoverflow.com/a/28210364/1070244\n    return (unknownElementCache[tag] = (\n      el.constructor === window.HTMLUnknownElement ||\n      el.constructor === window.HTMLElement\n    ))\n  } else {\n    return (unknownElementCache[tag] = /HTMLUnknownElement/.test(el.toString()))\n  }\n}\n\n/*  */\n\n/**\n * Query an element selector if it's not an element already.\n */\nfunction query (el) {\n  if (typeof el === 'string') {\n    var selected = document.querySelector(el);\n    if (!selected) {\n      process.env.NODE_ENV !== 'production' && warn(\n        'Cannot find element: ' + el\n      );\n      return document.createElement('div')\n    }\n    return selected\n  } else {\n    return el\n  }\n}\n\n/*  */\n\nfunction createElement$1 (tagName, vnode) {\n  var elm = document.createElement(tagName);\n  if (tagName !== 'select') {\n    return elm\n  }\n  // false or null will remove the attribute but undefined will not\n  if (vnode.data && vnode.data.attrs && vnode.data.attrs.multiple !== undefined) {\n    elm.setAttribute('multiple', 'multiple');\n  }\n  return elm\n}\n\nfunction createElementNS (namespace, tagName) {\n  return document.createElementNS(namespaceMap[namespace], tagName)\n}\n\nfunction createTextNode (text) {\n  return document.createTextNode(text)\n}\n\nfunction createComment (text) {\n  return document.createComment(text)\n}\n\nfunction insertBefore (parentNode, newNode, referenceNode) {\n  parentNode.insertBefore(newNode, referenceNode);\n}\n\nfunction removeChild (node, child) {\n  node.removeChild(child);\n}\n\nfunction appendChild (node, child) {\n  node.appendChild(child);\n}\n\nfunction parentNode (node) {\n  return node.parentNode\n}\n\nfunction nextSibling (node) {\n  return node.nextSibling\n}\n\nfunction tagName (node) {\n  return node.tagName\n}\n\nfunction setTextContent (node, text) {\n  node.textContent = text;\n}\n\nfunction setAttribute (node, key, val) {\n  node.setAttribute(key, val);\n}\n\n\nvar nodeOps = Object.freeze({\n\tcreateElement: createElement$1,\n\tcreateElementNS: createElementNS,\n\tcreateTextNode: createTextNode,\n\tcreateComment: createComment,\n\tinsertBefore: insertBefore,\n\tremoveChild: removeChild,\n\tappendChild: appendChild,\n\tparentNode: parentNode,\n\tnextSibling: nextSibling,\n\ttagName: tagName,\n\tsetTextContent: setTextContent,\n\tsetAttribute: setAttribute\n});\n\n/*  */\n\nvar ref = {\n  create: function create (_, vnode) {\n    registerRef(vnode);\n  },\n  update: function update (oldVnode, vnode) {\n    if (oldVnode.data.ref !== vnode.data.ref) {\n      registerRef(oldVnode, true);\n      registerRef(vnode);\n    }\n  },\n  destroy: function destroy (vnode) {\n    registerRef(vnode, true);\n  }\n};\n\nfunction registerRef (vnode, isRemoval) {\n  var key = vnode.data.ref;\n  if (!key) { return }\n\n  var vm = vnode.context;\n  var ref = vnode.componentInstance || vnode.elm;\n  var refs = vm.$refs;\n  if (isRemoval) {\n    if (Array.isArray(refs[key])) {\n      remove(refs[key], ref);\n    } else if (refs[key] === ref) {\n      refs[key] = undefined;\n    }\n  } else {\n    if (vnode.data.refInFor) {\n      if (Array.isArray(refs[key]) && refs[key].indexOf(ref) < 0) {\n        refs[key].push(ref);\n      } else {\n        refs[key] = [ref];\n      }\n    } else {\n      refs[key] = ref;\n    }\n  }\n}\n\n/**\n * Virtual DOM patching algorithm based on Snabbdom by\n * Simon Friis Vindum (@paldepind)\n * Licensed under the MIT License\n * https://github.com/paldepind/snabbdom/blob/master/LICENSE\n *\n * modified by Evan You (@yyx990803)\n *\n\n/*\n * Not type-checking this because this file is perf-critical and the cost\n * of making flow understand it is not worth it.\n */\n\nvar emptyNode = new VNode('', {}, []);\n\nvar hooks = ['create', 'activate', 'update', 'remove', 'destroy'];\n\nfunction isUndef (v) {\n  return v === undefined || v === null\n}\n\nfunction isDef (v) {\n  return v !== undefined && v !== null\n}\n\nfunction isTrue (v) {\n  return v === true\n}\n\nfunction sameVnode (a, b) {\n  return (\n    a.key === b.key &&\n    a.tag === b.tag &&\n    a.isComment === b.isComment &&\n    isDef(a.data) === isDef(b.data) &&\n    sameInputType(a, b)\n  )\n}\n\n// Some browsers do not support dynamically changing type for <input>\n// so they need to be treated as different nodes\nfunction sameInputType (a, b) {\n  if (a.tag !== 'input') { return true }\n  var i;\n  var typeA = isDef(i = a.data) && isDef(i = i.attrs) && i.type;\n  var typeB = isDef(i = b.data) && isDef(i = i.attrs) && i.type;\n  return typeA === typeB\n}\n\nfunction createKeyToOldIdx (children, beginIdx, endIdx) {\n  var i, key;\n  var map = {};\n  for (i = beginIdx; i <= endIdx; ++i) {\n    key = children[i].key;\n    if (isDef(key)) { map[key] = i; }\n  }\n  return map\n}\n\nfunction createPatchFunction (backend) {\n  var i, j;\n  var cbs = {};\n\n  var modules = backend.modules;\n  var nodeOps = backend.nodeOps;\n\n  for (i = 0; i < hooks.length; ++i) {\n    cbs[hooks[i]] = [];\n    for (j = 0; j < modules.length; ++j) {\n      if (isDef(modules[j][hooks[i]])) {\n        cbs[hooks[i]].push(modules[j][hooks[i]]);\n      }\n    }\n  }\n\n  function emptyNodeAt (elm) {\n    return new VNode(nodeOps.tagName(elm).toLowerCase(), {}, [], undefined, elm)\n  }\n\n  function createRmCb (childElm, listeners) {\n    function remove$$1 () {\n      if (--remove$$1.listeners === 0) {\n        removeNode(childElm);\n      }\n    }\n    remove$$1.listeners = listeners;\n    return remove$$1\n  }\n\n  function removeNode (el) {\n    var parent = nodeOps.parentNode(el);\n    // element may have already been removed due to v-html / v-text\n    if (isDef(parent)) {\n      nodeOps.removeChild(parent, el);\n    }\n  }\n\n  var inPre = 0;\n  function createElm (vnode, insertedVnodeQueue, parentElm, refElm, nested) {\n    vnode.isRootInsert = !nested; // for transition enter check\n    if (createComponent(vnode, insertedVnodeQueue, parentElm, refElm)) {\n      return\n    }\n\n    var data = vnode.data;\n    var children = vnode.children;\n    var tag = vnode.tag;\n    if (isDef(tag)) {\n      if (process.env.NODE_ENV !== 'production') {\n        if (data && data.pre) {\n          inPre++;\n        }\n        if (\n          !inPre &&\n          !vnode.ns &&\n          !(config.ignoredElements.length && config.ignoredElements.indexOf(tag) > -1) &&\n          config.isUnknownElement(tag)\n        ) {\n          warn(\n            'Unknown custom element: <' + tag + '> - did you ' +\n            'register the component correctly? For recursive components, ' +\n            'make sure to provide the \"name\" option.',\n            vnode.context\n          );\n        }\n      }\n      vnode.elm = vnode.ns\n        ? nodeOps.createElementNS(vnode.ns, tag)\n        : nodeOps.createElement(tag, vnode);\n      setScope(vnode);\n\n      /* istanbul ignore if */\n      {\n        createChildren(vnode, children, insertedVnodeQueue);\n        if (isDef(data)) {\n          invokeCreateHooks(vnode, insertedVnodeQueue);\n        }\n        insert(parentElm, vnode.elm, refElm);\n      }\n\n      if (process.env.NODE_ENV !== 'production' && data && data.pre) {\n        inPre--;\n      }\n    } else if (isTrue(vnode.isComment)) {\n      vnode.elm = nodeOps.createComment(vnode.text);\n      insert(parentElm, vnode.elm, refElm);\n    } else {\n      vnode.elm = nodeOps.createTextNode(vnode.text);\n      insert(parentElm, vnode.elm, refElm);\n    }\n  }\n\n  function createComponent (vnode, insertedVnodeQueue, parentElm, refElm) {\n    var i = vnode.data;\n    if (isDef(i)) {\n      var isReactivated = isDef(vnode.componentInstance) && i.keepAlive;\n      if (isDef(i = i.hook) && isDef(i = i.init)) {\n        i(vnode, false /* hydrating */, parentElm, refElm);\n      }\n      // after calling the init hook, if the vnode is a child component\n      // it should've created a child instance and mounted it. the child\n      // component also has set the placeholder vnode's elm.\n      // in that case we can just return the element and be done.\n      if (isDef(vnode.componentInstance)) {\n        initComponent(vnode, insertedVnodeQueue);\n        if (isTrue(isReactivated)) {\n          reactivateComponent(vnode, insertedVnodeQueue, parentElm, refElm);\n        }\n        return true\n      }\n    }\n  }\n\n  function initComponent (vnode, insertedVnodeQueue) {\n    if (isDef(vnode.data.pendingInsert)) {\n      insertedVnodeQueue.push.apply(insertedVnodeQueue, vnode.data.pendingInsert);\n    }\n    vnode.elm = vnode.componentInstance.$el;\n    if (isPatchable(vnode)) {\n      invokeCreateHooks(vnode, insertedVnodeQueue);\n      setScope(vnode);\n    } else {\n      // empty component root.\n      // skip all element-related modules except for ref (#3455)\n      registerRef(vnode);\n      // make sure to invoke the insert hook\n      insertedVnodeQueue.push(vnode);\n    }\n  }\n\n  function reactivateComponent (vnode, insertedVnodeQueue, parentElm, refElm) {\n    var i;\n    // hack for #4339: a reactivated component with inner transition\n    // does not trigger because the inner node's created hooks are not called\n    // again. It's not ideal to involve module-specific logic in here but\n    // there doesn't seem to be a better way to do it.\n    var innerNode = vnode;\n    while (innerNode.componentInstance) {\n      innerNode = innerNode.componentInstance._vnode;\n      if (isDef(i = innerNode.data) && isDef(i = i.transition)) {\n        for (i = 0; i < cbs.activate.length; ++i) {\n          cbs.activate[i](emptyNode, innerNode);\n        }\n        insertedVnodeQueue.push(innerNode);\n        break\n      }\n    }\n    // unlike a newly created component,\n    // a reactivated keep-alive component doesn't insert itself\n    insert(parentElm, vnode.elm, refElm);\n  }\n\n  function insert (parent, elm, ref) {\n    if (isDef(parent)) {\n      if (isDef(ref)) {\n        nodeOps.insertBefore(parent, elm, ref);\n      } else {\n        nodeOps.appendChild(parent, elm);\n      }\n    }\n  }\n\n  function createChildren (vnode, children, insertedVnodeQueue) {\n    if (Array.isArray(children)) {\n      for (var i = 0; i < children.length; ++i) {\n        createElm(children[i], insertedVnodeQueue, vnode.elm, null, true);\n      }\n    } else if (isPrimitive(vnode.text)) {\n      nodeOps.appendChild(vnode.elm, nodeOps.createTextNode(vnode.text));\n    }\n  }\n\n  function isPatchable (vnode) {\n    while (vnode.componentInstance) {\n      vnode = vnode.componentInstance._vnode;\n    }\n    return isDef(vnode.tag)\n  }\n\n  function invokeCreateHooks (vnode, insertedVnodeQueue) {\n    for (var i$1 = 0; i$1 < cbs.create.length; ++i$1) {\n      cbs.create[i$1](emptyNode, vnode);\n    }\n    i = vnode.data.hook; // Reuse variable\n    if (isDef(i)) {\n      if (isDef(i.create)) { i.create(emptyNode, vnode); }\n      if (isDef(i.insert)) { insertedVnodeQueue.push(vnode); }\n    }\n  }\n\n  // set scope id attribute for scoped CSS.\n  // this is implemented as a special case to avoid the overhead\n  // of going through the normal attribute patching process.\n  function setScope (vnode) {\n    var i;\n    var ancestor = vnode;\n    while (ancestor) {\n      if (isDef(i = ancestor.context) && isDef(i = i.$options._scopeId)) {\n        nodeOps.setAttribute(vnode.elm, i, '');\n      }\n      ancestor = ancestor.parent;\n    }\n    // for slot content they should also get the scopeId from the host instance.\n    if (isDef(i = activeInstance) &&\n        i !== vnode.context &&\n        isDef(i = i.$options._scopeId)) {\n      nodeOps.setAttribute(vnode.elm, i, '');\n    }\n  }\n\n  function addVnodes (parentElm, refElm, vnodes, startIdx, endIdx, insertedVnodeQueue) {\n    for (; startIdx <= endIdx; ++startIdx) {\n      createElm(vnodes[startIdx], insertedVnodeQueue, parentElm, refElm);\n    }\n  }\n\n  function invokeDestroyHook (vnode) {\n    var i, j;\n    var data = vnode.data;\n    if (isDef(data)) {\n      if (isDef(i = data.hook) && isDef(i = i.destroy)) { i(vnode); }\n      for (i = 0; i < cbs.destroy.length; ++i) { cbs.destroy[i](vnode); }\n    }\n    if (isDef(i = vnode.children)) {\n      for (j = 0; j < vnode.children.length; ++j) {\n        invokeDestroyHook(vnode.children[j]);\n      }\n    }\n  }\n\n  function removeVnodes (parentElm, vnodes, startIdx, endIdx) {\n    for (; startIdx <= endIdx; ++startIdx) {\n      var ch = vnodes[startIdx];\n      if (isDef(ch)) {\n        if (isDef(ch.tag)) {\n          removeAndInvokeRemoveHook(ch);\n          invokeDestroyHook(ch);\n        } else { // Text node\n          removeNode(ch.elm);\n        }\n      }\n    }\n  }\n\n  function removeAndInvokeRemoveHook (vnode, rm) {\n    if (isDef(rm) || isDef(vnode.data)) {\n      var listeners = cbs.remove.length + 1;\n      if (isDef(rm)) {\n        // we have a recursively passed down rm callback\n        // increase the listeners count\n        rm.listeners += listeners;\n      } else {\n        // directly removing\n        rm = createRmCb(vnode.elm, listeners);\n      }\n      // recursively invoke hooks on child component root node\n      if (isDef(i = vnode.componentInstance) && isDef(i = i._vnode) && isDef(i.data)) {\n        removeAndInvokeRemoveHook(i, rm);\n      }\n      for (i = 0; i < cbs.remove.length; ++i) {\n        cbs.remove[i](vnode, rm);\n      }\n      if (isDef(i = vnode.data.hook) && isDef(i = i.remove)) {\n        i(vnode, rm);\n      } else {\n        rm();\n      }\n    } else {\n      removeNode(vnode.elm);\n    }\n  }\n\n  function updateChildren (parentElm, oldCh, newCh, insertedVnodeQueue, removeOnly) {\n    var oldStartIdx = 0;\n    var newStartIdx = 0;\n    var oldEndIdx = oldCh.length - 1;\n    var oldStartVnode = oldCh[0];\n    var oldEndVnode = oldCh[oldEndIdx];\n    var newEndIdx = newCh.length - 1;\n    var newStartVnode = newCh[0];\n    var newEndVnode = newCh[newEndIdx];\n    var oldKeyToIdx, idxInOld, elmToMove, refElm;\n\n    // removeOnly is a special flag used only by <transition-group>\n    // to ensure removed elements stay in correct relative positions\n    // during leaving transitions\n    var canMove = !removeOnly;\n\n    while (oldStartIdx <= oldEndIdx && newStartIdx <= newEndIdx) {\n      if (isUndef(oldStartVnode)) {\n        oldStartVnode = oldCh[++oldStartIdx]; // Vnode has been moved left\n      } else if (isUndef(oldEndVnode)) {\n        oldEndVnode = oldCh[--oldEndIdx];\n      } else if (sameVnode(oldStartVnode, newStartVnode)) {\n        patchVnode(oldStartVnode, newStartVnode, insertedVnodeQueue);\n        oldStartVnode = oldCh[++oldStartIdx];\n        newStartVnode = newCh[++newStartIdx];\n      } else if (sameVnode(oldEndVnode, newEndVnode)) {\n        patchVnode(oldEndVnode, newEndVnode, insertedVnodeQueue);\n        oldEndVnode = oldCh[--oldEndIdx];\n        newEndVnode = newCh[--newEndIdx];\n      } else if (sameVnode(oldStartVnode, newEndVnode)) { // Vnode moved right\n        patchVnode(oldStartVnode, newEndVnode, insertedVnodeQueue);\n        canMove && nodeOps.insertBefore(parentElm, oldStartVnode.elm, nodeOps.nextSibling(oldEndVnode.elm));\n        oldStartVnode = oldCh[++oldStartIdx];\n        newEndVnode = newCh[--newEndIdx];\n      } else if (sameVnode(oldEndVnode, newStartVnode)) { // Vnode moved left\n        patchVnode(oldEndVnode, newStartVnode, insertedVnodeQueue);\n        canMove && nodeOps.insertBefore(parentElm, oldEndVnode.elm, oldStartVnode.elm);\n        oldEndVnode = oldCh[--oldEndIdx];\n        newStartVnode = newCh[++newStartIdx];\n      } else {\n        if (isUndef(oldKeyToIdx)) { oldKeyToIdx = createKeyToOldIdx(oldCh, oldStartIdx, oldEndIdx); }\n        idxInOld = isDef(newStartVnode.key) ? oldKeyToIdx[newStartVnode.key] : null;\n        if (isUndef(idxInOld)) { // New element\n          createElm(newStartVnode, insertedVnodeQueue, parentElm, oldStartVnode.elm);\n          newStartVnode = newCh[++newStartIdx];\n        } else {\n          elmToMove = oldCh[idxInOld];\n          /* istanbul ignore if */\n          if (process.env.NODE_ENV !== 'production' && !elmToMove) {\n            warn(\n              'It seems there are duplicate keys that is causing an update error. ' +\n              'Make sure each v-for item has a unique key.'\n            );\n          }\n          if (sameVnode(elmToMove, newStartVnode)) {\n            patchVnode(elmToMove, newStartVnode, insertedVnodeQueue);\n            oldCh[idxInOld] = undefined;\n            canMove && nodeOps.insertBefore(parentElm, newStartVnode.elm, oldStartVnode.elm);\n            newStartVnode = newCh[++newStartIdx];\n          } else {\n            // same key but different element. treat as new element\n            createElm(newStartVnode, insertedVnodeQueue, parentElm, oldStartVnode.elm);\n            newStartVnode = newCh[++newStartIdx];\n          }\n        }\n      }\n    }\n    if (oldStartIdx > oldEndIdx) {\n      refElm = isUndef(newCh[newEndIdx + 1]) ? null : newCh[newEndIdx + 1].elm;\n      addVnodes(parentElm, refElm, newCh, newStartIdx, newEndIdx, insertedVnodeQueue);\n    } else if (newStartIdx > newEndIdx) {\n      removeVnodes(parentElm, oldCh, oldStartIdx, oldEndIdx);\n    }\n  }\n\n  function patchVnode (oldVnode, vnode, insertedVnodeQueue, removeOnly) {\n    if (oldVnode === vnode) {\n      return\n    }\n    // reuse element for static trees.\n    // note we only do this if the vnode is cloned -\n    // if the new node is not cloned it means the render functions have been\n    // reset by the hot-reload-api and we need to do a proper re-render.\n    if (isTrue(vnode.isStatic) &&\n        isTrue(oldVnode.isStatic) &&\n        vnode.key === oldVnode.key &&\n        (isTrue(vnode.isCloned) || isTrue(vnode.isOnce))) {\n      vnode.elm = oldVnode.elm;\n      vnode.componentInstance = oldVnode.componentInstance;\n      return\n    }\n    var i;\n    var data = vnode.data;\n    if (isDef(data) && isDef(i = data.hook) && isDef(i = i.prepatch)) {\n      i(oldVnode, vnode);\n    }\n    var elm = vnode.elm = oldVnode.elm;\n    var oldCh = oldVnode.children;\n    var ch = vnode.children;\n    if (isDef(data) && isPatchable(vnode)) {\n      for (i = 0; i < cbs.update.length; ++i) { cbs.update[i](oldVnode, vnode); }\n      if (isDef(i = data.hook) && isDef(i = i.update)) { i(oldVnode, vnode); }\n    }\n    if (isUndef(vnode.text)) {\n      if (isDef(oldCh) && isDef(ch)) {\n        if (oldCh !== ch) { updateChildren(elm, oldCh, ch, insertedVnodeQueue, removeOnly); }\n      } else if (isDef(ch)) {\n        if (isDef(oldVnode.text)) { nodeOps.setTextContent(elm, ''); }\n        addVnodes(elm, null, ch, 0, ch.length - 1, insertedVnodeQueue);\n      } else if (isDef(oldCh)) {\n        removeVnodes(elm, oldCh, 0, oldCh.length - 1);\n      } else if (isDef(oldVnode.text)) {\n        nodeOps.setTextContent(elm, '');\n      }\n    } else if (oldVnode.text !== vnode.text) {\n      nodeOps.setTextContent(elm, vnode.text);\n    }\n    if (isDef(data)) {\n      if (isDef(i = data.hook) && isDef(i = i.postpatch)) { i(oldVnode, vnode); }\n    }\n  }\n\n  function invokeInsertHook (vnode, queue, initial) {\n    // delay insert hooks for component root nodes, invoke them after the\n    // element is really inserted\n    if (isTrue(initial) && isDef(vnode.parent)) {\n      vnode.parent.data.pendingInsert = queue;\n    } else {\n      for (var i = 0; i < queue.length; ++i) {\n        queue[i].data.hook.insert(queue[i]);\n      }\n    }\n  }\n\n  var bailed = false;\n  // list of modules that can skip create hook during hydration because they\n  // are already rendered on the client or has no need for initialization\n  var isRenderedModule = makeMap('attrs,style,class,staticClass,staticStyle,key');\n\n  // Note: this is a browser-only function so we can assume elms are DOM nodes.\n  function hydrate (elm, vnode, insertedVnodeQueue) {\n    if (process.env.NODE_ENV !== 'production') {\n      if (!assertNodeMatch(elm, vnode)) {\n        return false\n      }\n    }\n    vnode.elm = elm;\n    var tag = vnode.tag;\n    var data = vnode.data;\n    var children = vnode.children;\n    if (isDef(data)) {\n      if (isDef(i = data.hook) && isDef(i = i.init)) { i(vnode, true /* hydrating */); }\n      if (isDef(i = vnode.componentInstance)) {\n        // child component. it should have hydrated its own tree.\n        initComponent(vnode, insertedVnodeQueue);\n        return true\n      }\n    }\n    if (isDef(tag)) {\n      if (isDef(children)) {\n        // empty element, allow client to pick up and populate children\n        if (!elm.hasChildNodes()) {\n          createChildren(vnode, children, insertedVnodeQueue);\n        } else {\n          var childrenMatch = true;\n          var childNode = elm.firstChild;\n          for (var i$1 = 0; i$1 < children.length; i$1++) {\n            if (!childNode || !hydrate(childNode, children[i$1], insertedVnodeQueue)) {\n              childrenMatch = false;\n              break\n            }\n            childNode = childNode.nextSibling;\n          }\n          // if childNode is not null, it means the actual childNodes list is\n          // longer than the virtual children list.\n          if (!childrenMatch || childNode) {\n            if (process.env.NODE_ENV !== 'production' &&\n                typeof console !== 'undefined' &&\n                !bailed) {\n              bailed = true;\n              console.warn('Parent: ', elm);\n              console.warn('Mismatching childNodes vs. VNodes: ', elm.childNodes, children);\n            }\n            return false\n          }\n        }\n      }\n      if (isDef(data)) {\n        for (var key in data) {\n          if (!isRenderedModule(key)) {\n            invokeCreateHooks(vnode, insertedVnodeQueue);\n            break\n          }\n        }\n      }\n    } else if (elm.data !== vnode.text) {\n      elm.data = vnode.text;\n    }\n    return true\n  }\n\n  function assertNodeMatch (node, vnode) {\n    if (isDef(vnode.tag)) {\n      return (\n        vnode.tag.indexOf('vue-component') === 0 ||\n        vnode.tag.toLowerCase() === (node.tagName && node.tagName.toLowerCase())\n      )\n    } else {\n      return node.nodeType === (vnode.isComment ? 8 : 3)\n    }\n  }\n\n  return function patch (oldVnode, vnode, hydrating, removeOnly, parentElm, refElm) {\n    if (isUndef(vnode)) {\n      if (isDef(oldVnode)) { invokeDestroyHook(oldVnode); }\n      return\n    }\n\n    var isInitialPatch = false;\n    var insertedVnodeQueue = [];\n\n    if (isUndef(oldVnode)) {\n      // empty mount (likely as component), create new root element\n      isInitialPatch = true;\n      createElm(vnode, insertedVnodeQueue, parentElm, refElm);\n    } else {\n      var isRealElement = isDef(oldVnode.nodeType);\n      if (!isRealElement && sameVnode(oldVnode, vnode)) {\n        // patch existing root node\n        patchVnode(oldVnode, vnode, insertedVnodeQueue, removeOnly);\n      } else {\n        if (isRealElement) {\n          // mounting to a real element\n          // check if this is server-rendered content and if we can perform\n          // a successful hydration.\n          if (oldVnode.nodeType === 1 && oldVnode.hasAttribute('server-rendered')) {\n            oldVnode.removeAttribute('server-rendered');\n            hydrating = true;\n          }\n          if (isTrue(hydrating)) {\n            if (hydrate(oldVnode, vnode, insertedVnodeQueue)) {\n              invokeInsertHook(vnode, insertedVnodeQueue, true);\n              return oldVnode\n            } else if (process.env.NODE_ENV !== 'production') {\n              warn(\n                'The client-side rendered virtual DOM tree is not matching ' +\n                'server-rendered content. This is likely caused by incorrect ' +\n                'HTML markup, for example nesting block-level elements inside ' +\n                '<p>, or missing <tbody>. Bailing hydration and performing ' +\n                'full client-side render.'\n              );\n            }\n          }\n          // either not server-rendered, or hydration failed.\n          // create an empty node and replace it\n          oldVnode = emptyNodeAt(oldVnode);\n        }\n        // replacing existing element\n        var oldElm = oldVnode.elm;\n        var parentElm$1 = nodeOps.parentNode(oldElm);\n        createElm(\n          vnode,\n          insertedVnodeQueue,\n          // extremely rare edge case: do not insert if old element is in a\n          // leaving transition. Only happens when combining transition +\n          // keep-alive + HOCs. (#4590)\n          oldElm._leaveCb ? null : parentElm$1,\n          nodeOps.nextSibling(oldElm)\n        );\n\n        if (isDef(vnode.parent)) {\n          // component root element replaced.\n          // update parent placeholder node element, recursively\n          var ancestor = vnode.parent;\n          while (ancestor) {\n            ancestor.elm = vnode.elm;\n            ancestor = ancestor.parent;\n          }\n          if (isPatchable(vnode)) {\n            for (var i = 0; i < cbs.create.length; ++i) {\n              cbs.create[i](emptyNode, vnode.parent);\n            }\n          }\n        }\n\n        if (isDef(parentElm$1)) {\n          removeVnodes(parentElm$1, [oldVnode], 0, 0);\n        } else if (isDef(oldVnode.tag)) {\n          invokeDestroyHook(oldVnode);\n        }\n      }\n    }\n\n    invokeInsertHook(vnode, insertedVnodeQueue, isInitialPatch);\n    return vnode.elm\n  }\n}\n\n/*  */\n\nvar directives = {\n  create: updateDirectives,\n  update: updateDirectives,\n  destroy: function unbindDirectives (vnode) {\n    updateDirectives(vnode, emptyNode);\n  }\n};\n\nfunction updateDirectives (oldVnode, vnode) {\n  if (oldVnode.data.directives || vnode.data.directives) {\n    _update(oldVnode, vnode);\n  }\n}\n\nfunction _update (oldVnode, vnode) {\n  var isCreate = oldVnode === emptyNode;\n  var isDestroy = vnode === emptyNode;\n  var oldDirs = normalizeDirectives$1(oldVnode.data.directives, oldVnode.context);\n  var newDirs = normalizeDirectives$1(vnode.data.directives, vnode.context);\n\n  var dirsWithInsert = [];\n  var dirsWithPostpatch = [];\n\n  var key, oldDir, dir;\n  for (key in newDirs) {\n    oldDir = oldDirs[key];\n    dir = newDirs[key];\n    if (!oldDir) {\n      // new directive, bind\n      callHook$1(dir, 'bind', vnode, oldVnode);\n      if (dir.def && dir.def.inserted) {\n        dirsWithInsert.push(dir);\n      }\n    } else {\n      // existing directive, update\n      dir.oldValue = oldDir.value;\n      callHook$1(dir, 'update', vnode, oldVnode);\n      if (dir.def && dir.def.componentUpdated) {\n        dirsWithPostpatch.push(dir);\n      }\n    }\n  }\n\n  if (dirsWithInsert.length) {\n    var callInsert = function () {\n      for (var i = 0; i < dirsWithInsert.length; i++) {\n        callHook$1(dirsWithInsert[i], 'inserted', vnode, oldVnode);\n      }\n    };\n    if (isCreate) {\n      mergeVNodeHook(vnode.data.hook || (vnode.data.hook = {}), 'insert', callInsert);\n    } else {\n      callInsert();\n    }\n  }\n\n  if (dirsWithPostpatch.length) {\n    mergeVNodeHook(vnode.data.hook || (vnode.data.hook = {}), 'postpatch', function () {\n      for (var i = 0; i < dirsWithPostpatch.length; i++) {\n        callHook$1(dirsWithPostpatch[i], 'componentUpdated', vnode, oldVnode);\n      }\n    });\n  }\n\n  if (!isCreate) {\n    for (key in oldDirs) {\n      if (!newDirs[key]) {\n        // no longer present, unbind\n        callHook$1(oldDirs[key], 'unbind', oldVnode, oldVnode, isDestroy);\n      }\n    }\n  }\n}\n\nvar emptyModifiers = Object.create(null);\n\nfunction normalizeDirectives$1 (\n  dirs,\n  vm\n) {\n  var res = Object.create(null);\n  if (!dirs) {\n    return res\n  }\n  var i, dir;\n  for (i = 0; i < dirs.length; i++) {\n    dir = dirs[i];\n    if (!dir.modifiers) {\n      dir.modifiers = emptyModifiers;\n    }\n    res[getRawDirName(dir)] = dir;\n    dir.def = resolveAsset(vm.$options, 'directives', dir.name, true);\n  }\n  return res\n}\n\nfunction getRawDirName (dir) {\n  return dir.rawName || ((dir.name) + \".\" + (Object.keys(dir.modifiers || {}).join('.')))\n}\n\nfunction callHook$1 (dir, hook, vnode, oldVnode, isDestroy) {\n  var fn = dir.def && dir.def[hook];\n  if (fn) {\n    fn(vnode.elm, dir, vnode, oldVnode, isDestroy);\n  }\n}\n\nvar baseModules = [\n  ref,\n  directives\n];\n\n/*  */\n\nfunction updateAttrs (oldVnode, vnode) {\n  if (!oldVnode.data.attrs && !vnode.data.attrs) {\n    return\n  }\n  var key, cur, old;\n  var elm = vnode.elm;\n  var oldAttrs = oldVnode.data.attrs || {};\n  var attrs = vnode.data.attrs || {};\n  // clone observed objects, as the user probably wants to mutate it\n  if (attrs.__ob__) {\n    attrs = vnode.data.attrs = extend({}, attrs);\n  }\n\n  for (key in attrs) {\n    cur = attrs[key];\n    old = oldAttrs[key];\n    if (old !== cur) {\n      setAttr(elm, key, cur);\n    }\n  }\n  // #4391: in IE9, setting type can reset value for input[type=radio]\n  /* istanbul ignore if */\n  if (isIE9 && attrs.value !== oldAttrs.value) {\n    setAttr(elm, 'value', attrs.value);\n  }\n  for (key in oldAttrs) {\n    if (attrs[key] == null) {\n      if (isXlink(key)) {\n        elm.removeAttributeNS(xlinkNS, getXlinkProp(key));\n      } else if (!isEnumeratedAttr(key)) {\n        elm.removeAttribute(key);\n      }\n    }\n  }\n}\n\nfunction setAttr (el, key, value) {\n  if (isBooleanAttr(key)) {\n    // set attribute for blank value\n    // e.g. <option disabled>Select one</option>\n    if (isFalsyAttrValue(value)) {\n      el.removeAttribute(key);\n    } else {\n      el.setAttribute(key, key);\n    }\n  } else if (isEnumeratedAttr(key)) {\n    el.setAttribute(key, isFalsyAttrValue(value) || value === 'false' ? 'false' : 'true');\n  } else if (isXlink(key)) {\n    if (isFalsyAttrValue(value)) {\n      el.removeAttributeNS(xlinkNS, getXlinkProp(key));\n    } else {\n      el.setAttributeNS(xlinkNS, key, value);\n    }\n  } else {\n    if (isFalsyAttrValue(value)) {\n      el.removeAttribute(key);\n    } else {\n      el.setAttribute(key, value);\n    }\n  }\n}\n\nvar attrs = {\n  create: updateAttrs,\n  update: updateAttrs\n};\n\n/*  */\n\nfunction updateClass (oldVnode, vnode) {\n  var el = vnode.elm;\n  var data = vnode.data;\n  var oldData = oldVnode.data;\n  if (!data.staticClass && !data.class &&\n      (!oldData || (!oldData.staticClass && !oldData.class))) {\n    return\n  }\n\n  var cls = genClassForVnode(vnode);\n\n  // handle transition classes\n  var transitionClass = el._transitionClasses;\n  if (transitionClass) {\n    cls = concat(cls, stringifyClass(transitionClass));\n  }\n\n  // set the class\n  if (cls !== el._prevClass) {\n    el.setAttribute('class', cls);\n    el._prevClass = cls;\n  }\n}\n\nvar klass = {\n  create: updateClass,\n  update: updateClass\n};\n\n/*  */\n\nvar validDivisionCharRE = /[\\w).+\\-_$\\]]/;\n\n\n\nfunction wrapFilter (exp, filter) {\n  var i = filter.indexOf('(');\n  if (i < 0) {\n    // _f: resolveFilter\n    return (\"_f(\\\"\" + filter + \"\\\")(\" + exp + \")\")\n  } else {\n    var name = filter.slice(0, i);\n    var args = filter.slice(i + 1);\n    return (\"_f(\\\"\" + name + \"\\\")(\" + exp + \",\" + args)\n  }\n}\n\n/*  */\n\n/*  */\n\n/**\n * Cross-platform code generation for component v-model\n */\n\n\n/**\n * Cross-platform codegen helper for generating v-model value assignment code.\n */\n\n\n/**\n * parse directive model to do the array update transform. a[idx] = val => $$a.splice($$idx, 1, val)\n *\n * for loop possible cases:\n *\n * - test\n * - test[idx]\n * - test[test1[idx]]\n * - test[\"a\"][idx]\n * - xxx.test[a[a].test1[idx]]\n * - test.xxx.a[\"asa\"][test1[idx]]\n *\n */\n\nvar str;\nvar index$1;\n\n/*  */\n\n// in some cases, the event used has to be determined at runtime\n// so we used some reserved tokens during compile.\nvar RANGE_TOKEN = '__r';\nvar CHECKBOX_RADIO_TOKEN = '__c';\n\n/*  */\n\n// normalize v-model event tokens that can only be determined at runtime.\n// it's important to place the event as the first in the array because\n// the whole point is ensuring the v-model callback gets called before\n// user-attached handlers.\nfunction normalizeEvents (on) {\n  var event;\n  /* istanbul ignore if */\n  if (on[RANGE_TOKEN]) {\n    // IE input[type=range] only supports `change` event\n    event = isIE ? 'change' : 'input';\n    on[event] = [].concat(on[RANGE_TOKEN], on[event] || []);\n    delete on[RANGE_TOKEN];\n  }\n  if (on[CHECKBOX_RADIO_TOKEN]) {\n    // Chrome fires microtasks in between click/change, leads to #4521\n    event = isChrome ? 'click' : 'change';\n    on[event] = [].concat(on[CHECKBOX_RADIO_TOKEN], on[event] || []);\n    delete on[CHECKBOX_RADIO_TOKEN];\n  }\n}\n\nvar target$1;\n\nfunction add$1 (\n  event,\n  handler,\n  once,\n  capture\n) {\n  if (once) {\n    var oldHandler = handler;\n    var _target = target$1; // save current target element in closure\n    handler = function (ev) {\n      var res = arguments.length === 1\n        ? oldHandler(ev)\n        : oldHandler.apply(null, arguments);\n      if (res !== null) {\n        remove$2(event, handler, capture, _target);\n      }\n    };\n  }\n  target$1.addEventListener(event, handler, capture);\n}\n\nfunction remove$2 (\n  event,\n  handler,\n  capture,\n  _target\n) {\n  (_target || target$1).removeEventListener(event, handler, capture);\n}\n\nfunction updateDOMListeners (oldVnode, vnode) {\n  if (!oldVnode.data.on && !vnode.data.on) {\n    return\n  }\n  var on = vnode.data.on || {};\n  var oldOn = oldVnode.data.on || {};\n  target$1 = vnode.elm;\n  normalizeEvents(on);\n  updateListeners(on, oldOn, add$1, remove$2, vnode.context);\n}\n\nvar events = {\n  create: updateDOMListeners,\n  update: updateDOMListeners\n};\n\n/*  */\n\nfunction updateDOMProps (oldVnode, vnode) {\n  if (!oldVnode.data.domProps && !vnode.data.domProps) {\n    return\n  }\n  var key, cur;\n  var elm = vnode.elm;\n  var oldProps = oldVnode.data.domProps || {};\n  var props = vnode.data.domProps || {};\n  // clone observed objects, as the user probably wants to mutate it\n  if (props.__ob__) {\n    props = vnode.data.domProps = extend({}, props);\n  }\n\n  for (key in oldProps) {\n    if (props[key] == null) {\n      elm[key] = '';\n    }\n  }\n  for (key in props) {\n    cur = props[key];\n    // ignore children if the node has textContent or innerHTML,\n    // as these will throw away existing DOM nodes and cause removal errors\n    // on subsequent patches (#3360)\n    if (key === 'textContent' || key === 'innerHTML') {\n      if (vnode.children) { vnode.children.length = 0; }\n      if (cur === oldProps[key]) { continue }\n    }\n\n    if (key === 'value') {\n      // store value as _value as well since\n      // non-string values will be stringified\n      elm._value = cur;\n      // avoid resetting cursor position when value is the same\n      var strCur = cur == null ? '' : String(cur);\n      if (shouldUpdateValue(elm, vnode, strCur)) {\n        elm.value = strCur;\n      }\n    } else {\n      elm[key] = cur;\n    }\n  }\n}\n\n// check platforms/web/util/attrs.js acceptValue\n\n\nfunction shouldUpdateValue (\n  elm,\n  vnode,\n  checkVal\n) {\n  return (!elm.composing && (\n    vnode.tag === 'option' ||\n    isDirty(elm, checkVal) ||\n    isInputChanged(elm, checkVal)\n  ))\n}\n\nfunction isDirty (elm, checkVal) {\n  // return true when textbox (.number and .trim) loses focus and its value is not equal to the updated value\n  return document.activeElement !== elm && elm.value !== checkVal\n}\n\nfunction isInputChanged (elm, newVal) {\n  var value = elm.value;\n  var modifiers = elm._vModifiers; // injected by v-model runtime\n  if ((modifiers && modifiers.number) || elm.type === 'number') {\n    return toNumber(value) !== toNumber(newVal)\n  }\n  if (modifiers && modifiers.trim) {\n    return value.trim() !== newVal.trim()\n  }\n  return value !== newVal\n}\n\nvar domProps = {\n  create: updateDOMProps,\n  update: updateDOMProps\n};\n\n/*  */\n\nvar parseStyleText = cached(function (cssText) {\n  var res = {};\n  var listDelimiter = /;(?![^(]*\\))/g;\n  var propertyDelimiter = /:(.+)/;\n  cssText.split(listDelimiter).forEach(function (item) {\n    if (item) {\n      var tmp = item.split(propertyDelimiter);\n      tmp.length > 1 && (res[tmp[0].trim()] = tmp[1].trim());\n    }\n  });\n  return res\n});\n\n// merge static and dynamic style data on the same vnode\nfunction normalizeStyleData (data) {\n  var style = normalizeStyleBinding(data.style);\n  // static style is pre-processed into an object during compilation\n  // and is always a fresh object, so it's safe to merge into it\n  return data.staticStyle\n    ? extend(data.staticStyle, style)\n    : style\n}\n\n// normalize possible array / string values into Object\nfunction normalizeStyleBinding (bindingStyle) {\n  if (Array.isArray(bindingStyle)) {\n    return toObject(bindingStyle)\n  }\n  if (typeof bindingStyle === 'string') {\n    return parseStyleText(bindingStyle)\n  }\n  return bindingStyle\n}\n\n/**\n * parent component style should be after child's\n * so that parent component's style could override it\n */\nfunction getStyle (vnode, checkChild) {\n  var res = {};\n  var styleData;\n\n  if (checkChild) {\n    var childNode = vnode;\n    while (childNode.componentInstance) {\n      childNode = childNode.componentInstance._vnode;\n      if (childNode.data && (styleData = normalizeStyleData(childNode.data))) {\n        extend(res, styleData);\n      }\n    }\n  }\n\n  if ((styleData = normalizeStyleData(vnode.data))) {\n    extend(res, styleData);\n  }\n\n  var parentNode = vnode;\n  while ((parentNode = parentNode.parent)) {\n    if (parentNode.data && (styleData = normalizeStyleData(parentNode.data))) {\n      extend(res, styleData);\n    }\n  }\n  return res\n}\n\n/*  */\n\nvar cssVarRE = /^--/;\nvar importantRE = /\\s*!important$/;\nvar setProp = function (el, name, val) {\n  /* istanbul ignore if */\n  if (cssVarRE.test(name)) {\n    el.style.setProperty(name, val);\n  } else if (importantRE.test(val)) {\n    el.style.setProperty(name, val.replace(importantRE, ''), 'important');\n  } else {\n    el.style[normalize(name)] = val;\n  }\n};\n\nvar prefixes = ['Webkit', 'Moz', 'ms'];\n\nvar testEl;\nvar normalize = cached(function (prop) {\n  testEl = testEl || document.createElement('div');\n  prop = camelize(prop);\n  if (prop !== 'filter' && (prop in testEl.style)) {\n    return prop\n  }\n  var upper = prop.charAt(0).toUpperCase() + prop.slice(1);\n  for (var i = 0; i < prefixes.length; i++) {\n    var prefixed = prefixes[i] + upper;\n    if (prefixed in testEl.style) {\n      return prefixed\n    }\n  }\n});\n\nfunction updateStyle (oldVnode, vnode) {\n  var data = vnode.data;\n  var oldData = oldVnode.data;\n\n  if (!data.staticStyle && !data.style &&\n      !oldData.staticStyle && !oldData.style) {\n    return\n  }\n\n  var cur, name;\n  var el = vnode.elm;\n  var oldStaticStyle = oldVnode.data.staticStyle;\n  var oldStyleBinding = oldVnode.data.style || {};\n\n  // if static style exists, stylebinding already merged into it when doing normalizeStyleData\n  var oldStyle = oldStaticStyle || oldStyleBinding;\n\n  var style = normalizeStyleBinding(vnode.data.style) || {};\n\n  vnode.data.style = style.__ob__ ? extend({}, style) : style;\n\n  var newStyle = getStyle(vnode, true);\n\n  for (name in oldStyle) {\n    if (newStyle[name] == null) {\n      setProp(el, name, '');\n    }\n  }\n  for (name in newStyle) {\n    cur = newStyle[name];\n    if (cur !== oldStyle[name]) {\n      // ie9 setting to null has no effect, must use empty string\n      setProp(el, name, cur == null ? '' : cur);\n    }\n  }\n}\n\nvar style = {\n  create: updateStyle,\n  update: updateStyle\n};\n\n/*  */\n\n/**\n * Add class with compatibility for SVG since classList is not supported on\n * SVG elements in IE\n */\nfunction addClass (el, cls) {\n  /* istanbul ignore if */\n  if (!cls || !(cls = cls.trim())) {\n    return\n  }\n\n  /* istanbul ignore else */\n  if (el.classList) {\n    if (cls.indexOf(' ') > -1) {\n      cls.split(/\\s+/).forEach(function (c) { return el.classList.add(c); });\n    } else {\n      el.classList.add(cls);\n    }\n  } else {\n    var cur = \" \" + (el.getAttribute('class') || '') + \" \";\n    if (cur.indexOf(' ' + cls + ' ') < 0) {\n      el.setAttribute('class', (cur + cls).trim());\n    }\n  }\n}\n\n/**\n * Remove class with compatibility for SVG since classList is not supported on\n * SVG elements in IE\n */\nfunction removeClass (el, cls) {\n  /* istanbul ignore if */\n  if (!cls || !(cls = cls.trim())) {\n    return\n  }\n\n  /* istanbul ignore else */\n  if (el.classList) {\n    if (cls.indexOf(' ') > -1) {\n      cls.split(/\\s+/).forEach(function (c) { return el.classList.remove(c); });\n    } else {\n      el.classList.remove(cls);\n    }\n  } else {\n    var cur = \" \" + (el.getAttribute('class') || '') + \" \";\n    var tar = ' ' + cls + ' ';\n    while (cur.indexOf(tar) >= 0) {\n      cur = cur.replace(tar, ' ');\n    }\n    el.setAttribute('class', cur.trim());\n  }\n}\n\n/*  */\n\nfunction resolveTransition (def$$1) {\n  if (!def$$1) {\n    return\n  }\n  /* istanbul ignore else */\n  if (typeof def$$1 === 'object') {\n    var res = {};\n    if (def$$1.css !== false) {\n      extend(res, autoCssTransition(def$$1.name || 'v'));\n    }\n    extend(res, def$$1);\n    return res\n  } else if (typeof def$$1 === 'string') {\n    return autoCssTransition(def$$1)\n  }\n}\n\nvar autoCssTransition = cached(function (name) {\n  return {\n    enterClass: (name + \"-enter\"),\n    enterToClass: (name + \"-enter-to\"),\n    enterActiveClass: (name + \"-enter-active\"),\n    leaveClass: (name + \"-leave\"),\n    leaveToClass: (name + \"-leave-to\"),\n    leaveActiveClass: (name + \"-leave-active\")\n  }\n});\n\nvar hasTransition = inBrowser && !isIE9;\nvar TRANSITION = 'transition';\nvar ANIMATION = 'animation';\n\n// Transition property/event sniffing\nvar transitionProp = 'transition';\nvar transitionEndEvent = 'transitionend';\nvar animationProp = 'animation';\nvar animationEndEvent = 'animationend';\nif (hasTransition) {\n  /* istanbul ignore if */\n  if (window.ontransitionend === undefined &&\n    window.onwebkittransitionend !== undefined) {\n    transitionProp = 'WebkitTransition';\n    transitionEndEvent = 'webkitTransitionEnd';\n  }\n  if (window.onanimationend === undefined &&\n    window.onwebkitanimationend !== undefined) {\n    animationProp = 'WebkitAnimation';\n    animationEndEvent = 'webkitAnimationEnd';\n  }\n}\n\n// binding to window is necessary to make hot reload work in IE in strict mode\nvar raf = inBrowser && window.requestAnimationFrame\n  ? window.requestAnimationFrame.bind(window)\n  : setTimeout;\n\nfunction nextFrame (fn) {\n  raf(function () {\n    raf(fn);\n  });\n}\n\nfunction addTransitionClass (el, cls) {\n  (el._transitionClasses || (el._transitionClasses = [])).push(cls);\n  addClass(el, cls);\n}\n\nfunction removeTransitionClass (el, cls) {\n  if (el._transitionClasses) {\n    remove(el._transitionClasses, cls);\n  }\n  removeClass(el, cls);\n}\n\nfunction whenTransitionEnds (\n  el,\n  expectedType,\n  cb\n) {\n  var ref = getTransitionInfo(el, expectedType);\n  var type = ref.type;\n  var timeout = ref.timeout;\n  var propCount = ref.propCount;\n  if (!type) { return cb() }\n  var event = type === TRANSITION ? transitionEndEvent : animationEndEvent;\n  var ended = 0;\n  var end = function () {\n    el.removeEventListener(event, onEnd);\n    cb();\n  };\n  var onEnd = function (e) {\n    if (e.target === el) {\n      if (++ended >= propCount) {\n        end();\n      }\n    }\n  };\n  setTimeout(function () {\n    if (ended < propCount) {\n      end();\n    }\n  }, timeout + 1);\n  el.addEventListener(event, onEnd);\n}\n\nvar transformRE = /\\b(transform|all)(,|$)/;\n\nfunction getTransitionInfo (el, expectedType) {\n  var styles = window.getComputedStyle(el);\n  var transitionDelays = styles[transitionProp + 'Delay'].split(', ');\n  var transitionDurations = styles[transitionProp + 'Duration'].split(', ');\n  var transitionTimeout = getTimeout(transitionDelays, transitionDurations);\n  var animationDelays = styles[animationProp + 'Delay'].split(', ');\n  var animationDurations = styles[animationProp + 'Duration'].split(', ');\n  var animationTimeout = getTimeout(animationDelays, animationDurations);\n\n  var type;\n  var timeout = 0;\n  var propCount = 0;\n  /* istanbul ignore if */\n  if (expectedType === TRANSITION) {\n    if (transitionTimeout > 0) {\n      type = TRANSITION;\n      timeout = transitionTimeout;\n      propCount = transitionDurations.length;\n    }\n  } else if (expectedType === ANIMATION) {\n    if (animationTimeout > 0) {\n      type = ANIMATION;\n      timeout = animationTimeout;\n      propCount = animationDurations.length;\n    }\n  } else {\n    timeout = Math.max(transitionTimeout, animationTimeout);\n    type = timeout > 0\n      ? transitionTimeout > animationTimeout\n        ? TRANSITION\n        : ANIMATION\n      : null;\n    propCount = type\n      ? type === TRANSITION\n        ? transitionDurations.length\n        : animationDurations.length\n      : 0;\n  }\n  var hasTransform =\n    type === TRANSITION &&\n    transformRE.test(styles[transitionProp + 'Property']);\n  return {\n    type: type,\n    timeout: timeout,\n    propCount: propCount,\n    hasTransform: hasTransform\n  }\n}\n\nfunction getTimeout (delays, durations) {\n  /* istanbul ignore next */\n  while (delays.length < durations.length) {\n    delays = delays.concat(delays);\n  }\n\n  return Math.max.apply(null, durations.map(function (d, i) {\n    return toMs(d) + toMs(delays[i])\n  }))\n}\n\nfunction toMs (s) {\n  return Number(s.slice(0, -1)) * 1000\n}\n\n/*  */\n\nfunction enter (vnode, toggleDisplay) {\n  var el = vnode.elm;\n\n  // call leave callback now\n  if (el._leaveCb) {\n    el._leaveCb.cancelled = true;\n    el._leaveCb();\n  }\n\n  var data = resolveTransition(vnode.data.transition);\n  if (!data) {\n    return\n  }\n\n  /* istanbul ignore if */\n  if (el._enterCb || el.nodeType !== 1) {\n    return\n  }\n\n  var css = data.css;\n  var type = data.type;\n  var enterClass = data.enterClass;\n  var enterToClass = data.enterToClass;\n  var enterActiveClass = data.enterActiveClass;\n  var appearClass = data.appearClass;\n  var appearToClass = data.appearToClass;\n  var appearActiveClass = data.appearActiveClass;\n  var beforeEnter = data.beforeEnter;\n  var enter = data.enter;\n  var afterEnter = data.afterEnter;\n  var enterCancelled = data.enterCancelled;\n  var beforeAppear = data.beforeAppear;\n  var appear = data.appear;\n  var afterAppear = data.afterAppear;\n  var appearCancelled = data.appearCancelled;\n  var duration = data.duration;\n\n  // activeInstance will always be the <transition> component managing this\n  // transition. One edge case to check is when the <transition> is placed\n  // as the root node of a child component. In that case we need to check\n  // <transition>'s parent for appear check.\n  var context = activeInstance;\n  var transitionNode = activeInstance.$vnode;\n  while (transitionNode && transitionNode.parent) {\n    transitionNode = transitionNode.parent;\n    context = transitionNode.context;\n  }\n\n  var isAppear = !context._isMounted || !vnode.isRootInsert;\n\n  if (isAppear && !appear && appear !== '') {\n    return\n  }\n\n  var startClass = isAppear && appearClass\n    ? appearClass\n    : enterClass;\n  var activeClass = isAppear && appearActiveClass\n    ? appearActiveClass\n    : enterActiveClass;\n  var toClass = isAppear && appearToClass\n    ? appearToClass\n    : enterToClass;\n\n  var beforeEnterHook = isAppear\n    ? (beforeAppear || beforeEnter)\n    : beforeEnter;\n  var enterHook = isAppear\n    ? (typeof appear === 'function' ? appear : enter)\n    : enter;\n  var afterEnterHook = isAppear\n    ? (afterAppear || afterEnter)\n    : afterEnter;\n  var enterCancelledHook = isAppear\n    ? (appearCancelled || enterCancelled)\n    : enterCancelled;\n\n  var explicitEnterDuration = toNumber(\n    isObject(duration)\n      ? duration.enter\n      : duration\n  );\n\n  if (process.env.NODE_ENV !== 'production' && explicitEnterDuration != null) {\n    checkDuration(explicitEnterDuration, 'enter', vnode);\n  }\n\n  var expectsCSS = css !== false && !isIE9;\n  var userWantsControl = getHookArgumentsLength(enterHook);\n\n  var cb = el._enterCb = once(function () {\n    if (expectsCSS) {\n      removeTransitionClass(el, toClass);\n      removeTransitionClass(el, activeClass);\n    }\n    if (cb.cancelled) {\n      if (expectsCSS) {\n        removeTransitionClass(el, startClass);\n      }\n      enterCancelledHook && enterCancelledHook(el);\n    } else {\n      afterEnterHook && afterEnterHook(el);\n    }\n    el._enterCb = null;\n  });\n\n  if (!vnode.data.show) {\n    // remove pending leave element on enter by injecting an insert hook\n    mergeVNodeHook(vnode.data.hook || (vnode.data.hook = {}), 'insert', function () {\n      var parent = el.parentNode;\n      var pendingNode = parent && parent._pending && parent._pending[vnode.key];\n      if (pendingNode &&\n          pendingNode.tag === vnode.tag &&\n          pendingNode.elm._leaveCb) {\n        pendingNode.elm._leaveCb();\n      }\n      enterHook && enterHook(el, cb);\n    });\n  }\n\n  // start enter transition\n  beforeEnterHook && beforeEnterHook(el);\n  if (expectsCSS) {\n    addTransitionClass(el, startClass);\n    addTransitionClass(el, activeClass);\n    nextFrame(function () {\n      addTransitionClass(el, toClass);\n      removeTransitionClass(el, startClass);\n      if (!cb.cancelled && !userWantsControl) {\n        if (isValidDuration(explicitEnterDuration)) {\n          setTimeout(cb, explicitEnterDuration);\n        } else {\n          whenTransitionEnds(el, type, cb);\n        }\n      }\n    });\n  }\n\n  if (vnode.data.show) {\n    toggleDisplay && toggleDisplay();\n    enterHook && enterHook(el, cb);\n  }\n\n  if (!expectsCSS && !userWantsControl) {\n    cb();\n  }\n}\n\nfunction leave (vnode, rm) {\n  var el = vnode.elm;\n\n  // call enter callback now\n  if (el._enterCb) {\n    el._enterCb.cancelled = true;\n    el._enterCb();\n  }\n\n  var data = resolveTransition(vnode.data.transition);\n  if (!data) {\n    return rm()\n  }\n\n  /* istanbul ignore if */\n  if (el._leaveCb || el.nodeType !== 1) {\n    return\n  }\n\n  var css = data.css;\n  var type = data.type;\n  var leaveClass = data.leaveClass;\n  var leaveToClass = data.leaveToClass;\n  var leaveActiveClass = data.leaveActiveClass;\n  var beforeLeave = data.beforeLeave;\n  var leave = data.leave;\n  var afterLeave = data.afterLeave;\n  var leaveCancelled = data.leaveCancelled;\n  var delayLeave = data.delayLeave;\n  var duration = data.duration;\n\n  var expectsCSS = css !== false && !isIE9;\n  var userWantsControl = getHookArgumentsLength(leave);\n\n  var explicitLeaveDuration = toNumber(\n    isObject(duration)\n      ? duration.leave\n      : duration\n  );\n\n  if (process.env.NODE_ENV !== 'production' && explicitLeaveDuration != null) {\n    checkDuration(explicitLeaveDuration, 'leave', vnode);\n  }\n\n  var cb = el._leaveCb = once(function () {\n    if (el.parentNode && el.parentNode._pending) {\n      el.parentNode._pending[vnode.key] = null;\n    }\n    if (expectsCSS) {\n      removeTransitionClass(el, leaveToClass);\n      removeTransitionClass(el, leaveActiveClass);\n    }\n    if (cb.cancelled) {\n      if (expectsCSS) {\n        removeTransitionClass(el, leaveClass);\n      }\n      leaveCancelled && leaveCancelled(el);\n    } else {\n      rm();\n      afterLeave && afterLeave(el);\n    }\n    el._leaveCb = null;\n  });\n\n  if (delayLeave) {\n    delayLeave(performLeave);\n  } else {\n    performLeave();\n  }\n\n  function performLeave () {\n    // the delayed leave may have already been cancelled\n    if (cb.cancelled) {\n      return\n    }\n    // record leaving element\n    if (!vnode.data.show) {\n      (el.parentNode._pending || (el.parentNode._pending = {}))[vnode.key] = vnode;\n    }\n    beforeLeave && beforeLeave(el);\n    if (expectsCSS) {\n      addTransitionClass(el, leaveClass);\n      addTransitionClass(el, leaveActiveClass);\n      nextFrame(function () {\n        addTransitionClass(el, leaveToClass);\n        removeTransitionClass(el, leaveClass);\n        if (!cb.cancelled && !userWantsControl) {\n          if (isValidDuration(explicitLeaveDuration)) {\n            setTimeout(cb, explicitLeaveDuration);\n          } else {\n            whenTransitionEnds(el, type, cb);\n          }\n        }\n      });\n    }\n    leave && leave(el, cb);\n    if (!expectsCSS && !userWantsControl) {\n      cb();\n    }\n  }\n}\n\n// only used in dev mode\nfunction checkDuration (val, name, vnode) {\n  if (typeof val !== 'number') {\n    warn(\n      \"<transition> explicit \" + name + \" duration is not a valid number - \" +\n      \"got \" + (JSON.stringify(val)) + \".\",\n      vnode.context\n    );\n  } else if (isNaN(val)) {\n    warn(\n      \"<transition> explicit \" + name + \" duration is NaN - \" +\n      'the duration expression might be incorrect.',\n      vnode.context\n    );\n  }\n}\n\nfunction isValidDuration (val) {\n  return typeof val === 'number' && !isNaN(val)\n}\n\n/**\n * Normalize a transition hook's argument length. The hook may be:\n * - a merged hook (invoker) with the original in .fns\n * - a wrapped component method (check ._length)\n * - a plain function (.length)\n */\nfunction getHookArgumentsLength (fn) {\n  if (!fn) { return false }\n  var invokerFns = fn.fns;\n  if (invokerFns) {\n    // invoker\n    return getHookArgumentsLength(\n      Array.isArray(invokerFns)\n        ? invokerFns[0]\n        : invokerFns\n    )\n  } else {\n    return (fn._length || fn.length) > 1\n  }\n}\n\nfunction _enter (_, vnode) {\n  if (!vnode.data.show) {\n    enter(vnode);\n  }\n}\n\nvar transition = inBrowser ? {\n  create: _enter,\n  activate: _enter,\n  remove: function remove$$1 (vnode, rm) {\n    /* istanbul ignore else */\n    if (!vnode.data.show) {\n      leave(vnode, rm);\n    } else {\n      rm();\n    }\n  }\n} : {};\n\nvar platformModules = [\n  attrs,\n  klass,\n  events,\n  domProps,\n  style,\n  transition\n];\n\n/*  */\n\n// the directive module should be applied last, after all\n// built-in modules have been applied.\nvar modules = platformModules.concat(baseModules);\n\nvar patch = createPatchFunction({ nodeOps: nodeOps, modules: modules });\n\n/**\n * Not type checking this file because flow doesn't like attaching\n * properties to Elements.\n */\n\n/* istanbul ignore if */\nif (isIE9) {\n  // http://www.matts411.com/post/internet-explorer-9-oninput/\n  document.addEventListener('selectionchange', function () {\n    var el = document.activeElement;\n    if (el && el.vmodel) {\n      trigger(el, 'input');\n    }\n  });\n}\n\nvar model$1 = {\n  inserted: function inserted (el, binding, vnode) {\n    if (vnode.tag === 'select') {\n      var cb = function () {\n        setSelected(el, binding, vnode.context);\n      };\n      cb();\n      /* istanbul ignore if */\n      if (isIE || isEdge) {\n        setTimeout(cb, 0);\n      }\n    } else if (vnode.tag === 'textarea' || el.type === 'text' || el.type === 'password') {\n      el._vModifiers = binding.modifiers;\n      if (!binding.modifiers.lazy) {\n        if (!isAndroid) {\n          el.addEventListener('compositionstart', onCompositionStart);\n          el.addEventListener('compositionend', onCompositionEnd);\n        }\n        /* istanbul ignore if */\n        if (isIE9) {\n          el.vmodel = true;\n        }\n      }\n    }\n  },\n  componentUpdated: function componentUpdated (el, binding, vnode) {\n    if (vnode.tag === 'select') {\n      setSelected(el, binding, vnode.context);\n      // in case the options rendered by v-for have changed,\n      // it's possible that the value is out-of-sync with the rendered options.\n      // detect such cases and filter out values that no longer has a matching\n      // option in the DOM.\n      var needReset = el.multiple\n        ? binding.value.some(function (v) { return hasNoMatchingOption(v, el.options); })\n        : binding.value !== binding.oldValue && hasNoMatchingOption(binding.value, el.options);\n      if (needReset) {\n        trigger(el, 'change');\n      }\n    }\n  }\n};\n\nfunction setSelected (el, binding, vm) {\n  var value = binding.value;\n  var isMultiple = el.multiple;\n  if (isMultiple && !Array.isArray(value)) {\n    process.env.NODE_ENV !== 'production' && warn(\n      \"<select multiple v-model=\\\"\" + (binding.expression) + \"\\\"> \" +\n      \"expects an Array value for its binding, but got \" + (Object.prototype.toString.call(value).slice(8, -1)),\n      vm\n    );\n    return\n  }\n  var selected, option;\n  for (var i = 0, l = el.options.length; i < l; i++) {\n    option = el.options[i];\n    if (isMultiple) {\n      selected = looseIndexOf(value, getValue(option)) > -1;\n      if (option.selected !== selected) {\n        option.selected = selected;\n      }\n    } else {\n      if (looseEqual(getValue(option), value)) {\n        if (el.selectedIndex !== i) {\n          el.selectedIndex = i;\n        }\n        return\n      }\n    }\n  }\n  if (!isMultiple) {\n    el.selectedIndex = -1;\n  }\n}\n\nfunction hasNoMatchingOption (value, options) {\n  for (var i = 0, l = options.length; i < l; i++) {\n    if (looseEqual(getValue(options[i]), value)) {\n      return false\n    }\n  }\n  return true\n}\n\nfunction getValue (option) {\n  return '_value' in option\n    ? option._value\n    : option.value\n}\n\nfunction onCompositionStart (e) {\n  e.target.composing = true;\n}\n\nfunction onCompositionEnd (e) {\n  e.target.composing = false;\n  trigger(e.target, 'input');\n}\n\nfunction trigger (el, type) {\n  var e = document.createEvent('HTMLEvents');\n  e.initEvent(type, true, true);\n  el.dispatchEvent(e);\n}\n\n/*  */\n\n// recursively search for possible transition defined inside the component root\nfunction locateNode (vnode) {\n  return vnode.componentInstance && (!vnode.data || !vnode.data.transition)\n    ? locateNode(vnode.componentInstance._vnode)\n    : vnode\n}\n\nvar show = {\n  bind: function bind (el, ref, vnode) {\n    var value = ref.value;\n\n    vnode = locateNode(vnode);\n    var transition = vnode.data && vnode.data.transition;\n    var originalDisplay = el.__vOriginalDisplay =\n      el.style.display === 'none' ? '' : el.style.display;\n    if (value && transition && !isIE9) {\n      vnode.data.show = true;\n      enter(vnode, function () {\n        el.style.display = originalDisplay;\n      });\n    } else {\n      el.style.display = value ? originalDisplay : 'none';\n    }\n  },\n\n  update: function update (el, ref, vnode) {\n    var value = ref.value;\n    var oldValue = ref.oldValue;\n\n    /* istanbul ignore if */\n    if (value === oldValue) { return }\n    vnode = locateNode(vnode);\n    var transition = vnode.data && vnode.data.transition;\n    if (transition && !isIE9) {\n      vnode.data.show = true;\n      if (value) {\n        enter(vnode, function () {\n          el.style.display = el.__vOriginalDisplay;\n        });\n      } else {\n        leave(vnode, function () {\n          el.style.display = 'none';\n        });\n      }\n    } else {\n      el.style.display = value ? el.__vOriginalDisplay : 'none';\n    }\n  },\n\n  unbind: function unbind (\n    el,\n    binding,\n    vnode,\n    oldVnode,\n    isDestroy\n  ) {\n    if (!isDestroy) {\n      el.style.display = el.__vOriginalDisplay;\n    }\n  }\n};\n\nvar platformDirectives = {\n  model: model$1,\n  show: show\n};\n\n/*  */\n\n// Provides transition support for a single element/component.\n// supports transition mode (out-in / in-out)\n\nvar transitionProps = {\n  name: String,\n  appear: Boolean,\n  css: Boolean,\n  mode: String,\n  type: String,\n  enterClass: String,\n  leaveClass: String,\n  enterToClass: String,\n  leaveToClass: String,\n  enterActiveClass: String,\n  leaveActiveClass: String,\n  appearClass: String,\n  appearActiveClass: String,\n  appearToClass: String,\n  duration: [Number, String, Object]\n};\n\n// in case the child is also an abstract component, e.g. <keep-alive>\n// we want to recursively retrieve the real component to be rendered\nfunction getRealChild (vnode) {\n  var compOptions = vnode && vnode.componentOptions;\n  if (compOptions && compOptions.Ctor.options.abstract) {\n    return getRealChild(getFirstComponentChild(compOptions.children))\n  } else {\n    return vnode\n  }\n}\n\nfunction extractTransitionData (comp) {\n  var data = {};\n  var options = comp.$options;\n  // props\n  for (var key in options.propsData) {\n    data[key] = comp[key];\n  }\n  // events.\n  // extract listeners and pass them directly to the transition methods\n  var listeners = options._parentListeners;\n  for (var key$1 in listeners) {\n    data[camelize(key$1)] = listeners[key$1];\n  }\n  return data\n}\n\nfunction placeholder (h, rawChild) {\n  return /\\d-keep-alive$/.test(rawChild.tag)\n    ? h('keep-alive')\n    : null\n}\n\nfunction hasParentTransition (vnode) {\n  while ((vnode = vnode.parent)) {\n    if (vnode.data.transition) {\n      return true\n    }\n  }\n}\n\nfunction isSameChild (child, oldChild) {\n  return oldChild.key === child.key && oldChild.tag === child.tag\n}\n\nvar Transition = {\n  name: 'transition',\n  props: transitionProps,\n  abstract: true,\n\n  render: function render (h) {\n    var this$1 = this;\n\n    var children = this.$slots.default;\n    if (!children) {\n      return\n    }\n\n    // filter out text nodes (possible whitespaces)\n    children = children.filter(function (c) { return c.tag; });\n    /* istanbul ignore if */\n    if (!children.length) {\n      return\n    }\n\n    // warn multiple elements\n    if (process.env.NODE_ENV !== 'production' && children.length > 1) {\n      warn(\n        '<transition> can only be used on a single element. Use ' +\n        '<transition-group> for lists.',\n        this.$parent\n      );\n    }\n\n    var mode = this.mode;\n\n    // warn invalid mode\n    if (process.env.NODE_ENV !== 'production' &&\n        mode && mode !== 'in-out' && mode !== 'out-in') {\n      warn(\n        'invalid <transition> mode: ' + mode,\n        this.$parent\n      );\n    }\n\n    var rawChild = children[0];\n\n    // if this is a component root node and the component's\n    // parent container node also has transition, skip.\n    if (hasParentTransition(this.$vnode)) {\n      return rawChild\n    }\n\n    // apply transition data to child\n    // use getRealChild() to ignore abstract components e.g. keep-alive\n    var child = getRealChild(rawChild);\n    /* istanbul ignore if */\n    if (!child) {\n      return rawChild\n    }\n\n    if (this._leaving) {\n      return placeholder(h, rawChild)\n    }\n\n    // ensure a key that is unique to the vnode type and to this transition\n    // component instance. This key will be used to remove pending leaving nodes\n    // during entering.\n    var id = \"__transition-\" + (this._uid) + \"-\";\n    child.key = child.key == null\n      ? id + child.tag\n      : isPrimitive(child.key)\n        ? (String(child.key).indexOf(id) === 0 ? child.key : id + child.key)\n        : child.key;\n\n    var data = (child.data || (child.data = {})).transition = extractTransitionData(this);\n    var oldRawChild = this._vnode;\n    var oldChild = getRealChild(oldRawChild);\n\n    // mark v-show\n    // so that the transition module can hand over the control to the directive\n    if (child.data.directives && child.data.directives.some(function (d) { return d.name === 'show'; })) {\n      child.data.show = true;\n    }\n\n    if (oldChild && oldChild.data && !isSameChild(child, oldChild)) {\n      // replace old child transition data with fresh one\n      // important for dynamic transitions!\n      var oldData = oldChild && (oldChild.data.transition = extend({}, data));\n      // handle transition mode\n      if (mode === 'out-in') {\n        // return placeholder node and queue update when leave finishes\n        this._leaving = true;\n        mergeVNodeHook(oldData, 'afterLeave', function () {\n          this$1._leaving = false;\n          this$1.$forceUpdate();\n        });\n        return placeholder(h, rawChild)\n      } else if (mode === 'in-out') {\n        var delayedLeave;\n        var performLeave = function () { delayedLeave(); };\n        mergeVNodeHook(data, 'afterEnter', performLeave);\n        mergeVNodeHook(data, 'enterCancelled', performLeave);\n        mergeVNodeHook(oldData, 'delayLeave', function (leave) { delayedLeave = leave; });\n      }\n    }\n\n    return rawChild\n  }\n};\n\n/*  */\n\n// Provides transition support for list items.\n// supports move transitions using the FLIP technique.\n\n// Because the vdom's children update algorithm is \"unstable\" - i.e.\n// it doesn't guarantee the relative positioning of removed elements,\n// we force transition-group to update its children into two passes:\n// in the first pass, we remove all nodes that need to be removed,\n// triggering their leaving transition; in the second pass, we insert/move\n// into the final desired state. This way in the second pass removed\n// nodes will remain where they should be.\n\nvar props = extend({\n  tag: String,\n  moveClass: String\n}, transitionProps);\n\ndelete props.mode;\n\nvar TransitionGroup = {\n  props: props,\n\n  render: function render (h) {\n    var tag = this.tag || this.$vnode.data.tag || 'span';\n    var map = Object.create(null);\n    var prevChildren = this.prevChildren = this.children;\n    var rawChildren = this.$slots.default || [];\n    var children = this.children = [];\n    var transitionData = extractTransitionData(this);\n\n    for (var i = 0; i < rawChildren.length; i++) {\n      var c = rawChildren[i];\n      if (c.tag) {\n        if (c.key != null && String(c.key).indexOf('__vlist') !== 0) {\n          children.push(c);\n          map[c.key] = c\n          ;(c.data || (c.data = {})).transition = transitionData;\n        } else if (process.env.NODE_ENV !== 'production') {\n          var opts = c.componentOptions;\n          var name = opts ? (opts.Ctor.options.name || opts.tag || '') : c.tag;\n          warn((\"<transition-group> children must be keyed: <\" + name + \">\"));\n        }\n      }\n    }\n\n    if (prevChildren) {\n      var kept = [];\n      var removed = [];\n      for (var i$1 = 0; i$1 < prevChildren.length; i$1++) {\n        var c$1 = prevChildren[i$1];\n        c$1.data.transition = transitionData;\n        c$1.data.pos = c$1.elm.getBoundingClientRect();\n        if (map[c$1.key]) {\n          kept.push(c$1);\n        } else {\n          removed.push(c$1);\n        }\n      }\n      this.kept = h(tag, null, kept);\n      this.removed = removed;\n    }\n\n    return h(tag, null, children)\n  },\n\n  beforeUpdate: function beforeUpdate () {\n    // force removing pass\n    this.__patch__(\n      this._vnode,\n      this.kept,\n      false, // hydrating\n      true // removeOnly (!important, avoids unnecessary moves)\n    );\n    this._vnode = this.kept;\n  },\n\n  updated: function updated () {\n    var children = this.prevChildren;\n    var moveClass = this.moveClass || ((this.name || 'v') + '-move');\n    if (!children.length || !this.hasMove(children[0].elm, moveClass)) {\n      return\n    }\n\n    // we divide the work into three loops to avoid mixing DOM reads and writes\n    // in each iteration - which helps prevent layout thrashing.\n    children.forEach(callPendingCbs);\n    children.forEach(recordPosition);\n    children.forEach(applyTranslation);\n\n    // force reflow to put everything in position\n    var body = document.body;\n    var f = body.offsetHeight; // eslint-disable-line\n\n    children.forEach(function (c) {\n      if (c.data.moved) {\n        var el = c.elm;\n        var s = el.style;\n        addTransitionClass(el, moveClass);\n        s.transform = s.WebkitTransform = s.transitionDuration = '';\n        el.addEventListener(transitionEndEvent, el._moveCb = function cb (e) {\n          if (!e || /transform$/.test(e.propertyName)) {\n            el.removeEventListener(transitionEndEvent, cb);\n            el._moveCb = null;\n            removeTransitionClass(el, moveClass);\n          }\n        });\n      }\n    });\n  },\n\n  methods: {\n    hasMove: function hasMove (el, moveClass) {\n      /* istanbul ignore if */\n      if (!hasTransition) {\n        return false\n      }\n      if (this._hasMove != null) {\n        return this._hasMove\n      }\n      // Detect whether an element with the move class applied has\n      // CSS transitions. Since the element may be inside an entering\n      // transition at this very moment, we make a clone of it and remove\n      // all other transition classes applied to ensure only the move class\n      // is applied.\n      var clone = el.cloneNode();\n      if (el._transitionClasses) {\n        el._transitionClasses.forEach(function (cls) { removeClass(clone, cls); });\n      }\n      addClass(clone, moveClass);\n      clone.style.display = 'none';\n      this.$el.appendChild(clone);\n      var info = getTransitionInfo(clone);\n      this.$el.removeChild(clone);\n      return (this._hasMove = info.hasTransform)\n    }\n  }\n};\n\nfunction callPendingCbs (c) {\n  /* istanbul ignore if */\n  if (c.elm._moveCb) {\n    c.elm._moveCb();\n  }\n  /* istanbul ignore if */\n  if (c.elm._enterCb) {\n    c.elm._enterCb();\n  }\n}\n\nfunction recordPosition (c) {\n  c.data.newPos = c.elm.getBoundingClientRect();\n}\n\nfunction applyTranslation (c) {\n  var oldPos = c.data.pos;\n  var newPos = c.data.newPos;\n  var dx = oldPos.left - newPos.left;\n  var dy = oldPos.top - newPos.top;\n  if (dx || dy) {\n    c.data.moved = true;\n    var s = c.elm.style;\n    s.transform = s.WebkitTransform = \"translate(\" + dx + \"px,\" + dy + \"px)\";\n    s.transitionDuration = '0s';\n  }\n}\n\nvar platformComponents = {\n  Transition: Transition,\n  TransitionGroup: TransitionGroup\n};\n\n/*  */\n\n// install platform specific utils\nVue$2.config.mustUseProp = mustUseProp;\nVue$2.config.isReservedTag = isReservedTag;\nVue$2.config.getTagNamespace = getTagNamespace;\nVue$2.config.isUnknownElement = isUnknownElement;\n\n// install platform runtime directives & components\nextend(Vue$2.options.directives, platformDirectives);\nextend(Vue$2.options.components, platformComponents);\n\n// install platform patch function\nVue$2.prototype.__patch__ = inBrowser ? patch : noop;\n\n// public mount method\nVue$2.prototype.$mount = function (\n  el,\n  hydrating\n) {\n  el = el && inBrowser ? query(el) : undefined;\n  return mountComponent(this, el, hydrating)\n};\n\n// devtools global hook\n/* istanbul ignore next */\nsetTimeout(function () {\n  if (config.devtools) {\n    if (devtools) {\n      devtools.emit('init', Vue$2);\n    } else if (process.env.NODE_ENV !== 'production' && isChrome) {\n      console[console.info ? 'info' : 'log'](\n        'Download the Vue Devtools extension for a better development experience:\\n' +\n        'https://github.com/vuejs/vue-devtools'\n      );\n    }\n  }\n  if (process.env.NODE_ENV !== 'production' &&\n      config.productionTip !== false &&\n      inBrowser && typeof console !== 'undefined') {\n    console[console.info ? 'info' : 'log'](\n      \"You are running Vue in development mode.\\n\" +\n      \"Make sure to turn on production mode when deploying for production.\\n\" +\n      \"See more tips at https://vuejs.org/guide/deployment.html\"\n    );\n  }\n}, 0);\n\nexport default Vue$2;\n"
  },
  {
    "path": "static/vuejs/vue.runtime.js",
    "content": "/*!\n * Vue.js v2.2.6\n * (c) 2014-2017 Evan You\n * Released under the MIT License.\n */\n(function (global, factory) {\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :\n\ttypeof define === 'function' && define.amd ? define(factory) :\n\t(global.Vue = factory());\n}(this, (function () { 'use strict';\n\n/*  */\n\n/**\n * Convert a value to a string that is actually rendered.\n */\nfunction _toString (val) {\n  return val == null\n    ? ''\n    : typeof val === 'object'\n      ? JSON.stringify(val, null, 2)\n      : String(val)\n}\n\n/**\n * Convert a input value to a number for persistence.\n * If the conversion fails, return original string.\n */\nfunction toNumber (val) {\n  var n = parseFloat(val);\n  return isNaN(n) ? val : n\n}\n\n/**\n * Make a map and return a function for checking if a key\n * is in that map.\n */\nfunction makeMap (\n  str,\n  expectsLowerCase\n) {\n  var map = Object.create(null);\n  var list = str.split(',');\n  for (var i = 0; i < list.length; i++) {\n    map[list[i]] = true;\n  }\n  return expectsLowerCase\n    ? function (val) { return map[val.toLowerCase()]; }\n    : function (val) { return map[val]; }\n}\n\n/**\n * Check if a tag is a built-in tag.\n */\nvar isBuiltInTag = makeMap('slot,component', true);\n\n/**\n * Remove an item from an array\n */\nfunction remove (arr, item) {\n  if (arr.length) {\n    var index = arr.indexOf(item);\n    if (index > -1) {\n      return arr.splice(index, 1)\n    }\n  }\n}\n\n/**\n * Check whether the object has the property.\n */\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nfunction hasOwn (obj, key) {\n  return hasOwnProperty.call(obj, key)\n}\n\n/**\n * Check if value is primitive\n */\nfunction isPrimitive (value) {\n  return typeof value === 'string' || typeof value === 'number'\n}\n\n/**\n * Create a cached version of a pure function.\n */\nfunction cached (fn) {\n  var cache = Object.create(null);\n  return (function cachedFn (str) {\n    var hit = cache[str];\n    return hit || (cache[str] = fn(str))\n  })\n}\n\n/**\n * Camelize a hyphen-delimited string.\n */\nvar camelizeRE = /-(\\w)/g;\nvar camelize = cached(function (str) {\n  return str.replace(camelizeRE, function (_, c) { return c ? c.toUpperCase() : ''; })\n});\n\n/**\n * Capitalize a string.\n */\nvar capitalize = cached(function (str) {\n  return str.charAt(0).toUpperCase() + str.slice(1)\n});\n\n/**\n * Hyphenate a camelCase string.\n */\nvar hyphenateRE = /([^-])([A-Z])/g;\nvar hyphenate = cached(function (str) {\n  return str\n    .replace(hyphenateRE, '$1-$2')\n    .replace(hyphenateRE, '$1-$2')\n    .toLowerCase()\n});\n\n/**\n * Simple bind, faster than native\n */\nfunction bind (fn, ctx) {\n  function boundFn (a) {\n    var l = arguments.length;\n    return l\n      ? l > 1\n        ? fn.apply(ctx, arguments)\n        : fn.call(ctx, a)\n      : fn.call(ctx)\n  }\n  // record original fn length\n  boundFn._length = fn.length;\n  return boundFn\n}\n\n/**\n * Convert an Array-like object to a real Array.\n */\nfunction toArray (list, start) {\n  start = start || 0;\n  var i = list.length - start;\n  var ret = new Array(i);\n  while (i--) {\n    ret[i] = list[i + start];\n  }\n  return ret\n}\n\n/**\n * Mix properties into target object.\n */\nfunction extend (to, _from) {\n  for (var key in _from) {\n    to[key] = _from[key];\n  }\n  return to\n}\n\n/**\n * Quick object check - this is primarily used to tell\n * Objects from primitive values when we know the value\n * is a JSON-compliant type.\n */\nfunction isObject (obj) {\n  return obj !== null && typeof obj === 'object'\n}\n\n/**\n * Strict object type check. Only returns true\n * for plain JavaScript objects.\n */\nvar toString = Object.prototype.toString;\nvar OBJECT_STRING = '[object Object]';\nfunction isPlainObject (obj) {\n  return toString.call(obj) === OBJECT_STRING\n}\n\n/**\n * Merge an Array of Objects into a single Object.\n */\nfunction toObject (arr) {\n  var res = {};\n  for (var i = 0; i < arr.length; i++) {\n    if (arr[i]) {\n      extend(res, arr[i]);\n    }\n  }\n  return res\n}\n\n/**\n * Perform no operation.\n */\nfunction noop () {}\n\n/**\n * Always return false.\n */\nvar no = function () { return false; };\n\n/**\n * Return same value\n */\nvar identity = function (_) { return _; };\n\n/**\n * Generate a static keys string from compiler modules.\n */\n\n\n/**\n * Check if two values are loosely equal - that is,\n * if they are plain objects, do they have the same shape?\n */\nfunction looseEqual (a, b) {\n  var isObjectA = isObject(a);\n  var isObjectB = isObject(b);\n  if (isObjectA && isObjectB) {\n    try {\n      return JSON.stringify(a) === JSON.stringify(b)\n    } catch (e) {\n      // possible circular reference\n      return a === b\n    }\n  } else if (!isObjectA && !isObjectB) {\n    return String(a) === String(b)\n  } else {\n    return false\n  }\n}\n\nfunction looseIndexOf (arr, val) {\n  for (var i = 0; i < arr.length; i++) {\n    if (looseEqual(arr[i], val)) { return i }\n  }\n  return -1\n}\n\n/**\n * Ensure a function is called only once.\n */\nfunction once (fn) {\n  var called = false;\n  return function () {\n    if (!called) {\n      called = true;\n      fn();\n    }\n  }\n}\n\n/*  */\n\nvar config = {\n  /**\n   * Option merge strategies (used in core/util/options)\n   */\n  optionMergeStrategies: Object.create(null),\n\n  /**\n   * Whether to suppress warnings.\n   */\n  silent: false,\n\n  /**\n   * Show production mode tip message on boot?\n   */\n  productionTip: \"development\" !== 'production',\n\n  /**\n   * Whether to enable devtools\n   */\n  devtools: \"development\" !== 'production',\n\n  /**\n   * Whether to record perf\n   */\n  performance: false,\n\n  /**\n   * Error handler for watcher errors\n   */\n  errorHandler: null,\n\n  /**\n   * Ignore certain custom elements\n   */\n  ignoredElements: [],\n\n  /**\n   * Custom user key aliases for v-on\n   */\n  keyCodes: Object.create(null),\n\n  /**\n   * Check if a tag is reserved so that it cannot be registered as a\n   * component. This is platform-dependent and may be overwritten.\n   */\n  isReservedTag: no,\n\n  /**\n   * Check if a tag is an unknown element.\n   * Platform-dependent.\n   */\n  isUnknownElement: no,\n\n  /**\n   * Get the namespace of an element\n   */\n  getTagNamespace: noop,\n\n  /**\n   * Parse the real tag name for the specific platform.\n   */\n  parsePlatformTagName: identity,\n\n  /**\n   * Check if an attribute must be bound using property, e.g. value\n   * Platform-dependent.\n   */\n  mustUseProp: no,\n\n  /**\n   * List of asset types that a component can own.\n   */\n  _assetTypes: [\n    'component',\n    'directive',\n    'filter'\n  ],\n\n  /**\n   * List of lifecycle hooks.\n   */\n  _lifecycleHooks: [\n    'beforeCreate',\n    'created',\n    'beforeMount',\n    'mounted',\n    'beforeUpdate',\n    'updated',\n    'beforeDestroy',\n    'destroyed',\n    'activated',\n    'deactivated'\n  ],\n\n  /**\n   * Max circular updates allowed in a scheduler flush cycle.\n   */\n  _maxUpdateCount: 100\n};\n\n/*  */\n\nvar emptyObject = Object.freeze({});\n\n/**\n * Check if a string starts with $ or _\n */\nfunction isReserved (str) {\n  var c = (str + '').charCodeAt(0);\n  return c === 0x24 || c === 0x5F\n}\n\n/**\n * Define a property.\n */\nfunction def (obj, key, val, enumerable) {\n  Object.defineProperty(obj, key, {\n    value: val,\n    enumerable: !!enumerable,\n    writable: true,\n    configurable: true\n  });\n}\n\n/**\n * Parse simple path.\n */\nvar bailRE = /[^\\w.$]/;\nfunction parsePath (path) {\n  if (bailRE.test(path)) {\n    return\n  }\n  var segments = path.split('.');\n  return function (obj) {\n    for (var i = 0; i < segments.length; i++) {\n      if (!obj) { return }\n      obj = obj[segments[i]];\n    }\n    return obj\n  }\n}\n\n/*  */\n/* globals MutationObserver */\n\n// can we use __proto__?\nvar hasProto = '__proto__' in {};\n\n// Browser environment sniffing\nvar inBrowser = typeof window !== 'undefined';\nvar UA = inBrowser && window.navigator.userAgent.toLowerCase();\nvar isIE = UA && /msie|trident/.test(UA);\nvar isIE9 = UA && UA.indexOf('msie 9.0') > 0;\nvar isEdge = UA && UA.indexOf('edge/') > 0;\nvar isAndroid = UA && UA.indexOf('android') > 0;\nvar isIOS = UA && /iphone|ipad|ipod|ios/.test(UA);\nvar isChrome = UA && /chrome\\/\\d+/.test(UA) && !isEdge;\n\n// this needs to be lazy-evaled because vue may be required before\n// vue-server-renderer can set VUE_ENV\nvar _isServer;\nvar isServerRendering = function () {\n  if (_isServer === undefined) {\n    /* istanbul ignore if */\n    if (!inBrowser && typeof global !== 'undefined') {\n      // detect presence of vue-server-renderer and avoid\n      // Webpack shimming the process\n      _isServer = global['process'].env.VUE_ENV === 'server';\n    } else {\n      _isServer = false;\n    }\n  }\n  return _isServer\n};\n\n// detect devtools\nvar devtools = inBrowser && window.__VUE_DEVTOOLS_GLOBAL_HOOK__;\n\n/* istanbul ignore next */\nfunction isNative (Ctor) {\n  return /native code/.test(Ctor.toString())\n}\n\nvar hasSymbol =\n  typeof Symbol !== 'undefined' && isNative(Symbol) &&\n  typeof Reflect !== 'undefined' && isNative(Reflect.ownKeys);\n\n/**\n * Defer a task to execute it asynchronously.\n */\nvar nextTick = (function () {\n  var callbacks = [];\n  var pending = false;\n  var timerFunc;\n\n  function nextTickHandler () {\n    pending = false;\n    var copies = callbacks.slice(0);\n    callbacks.length = 0;\n    for (var i = 0; i < copies.length; i++) {\n      copies[i]();\n    }\n  }\n\n  // the nextTick behavior leverages the microtask queue, which can be accessed\n  // via either native Promise.then or MutationObserver.\n  // MutationObserver has wider support, however it is seriously bugged in\n  // UIWebView in iOS >= 9.3.3 when triggered in touch event handlers. It\n  // completely stops working after triggering a few times... so, if native\n  // Promise is available, we will use it:\n  /* istanbul ignore if */\n  if (typeof Promise !== 'undefined' && isNative(Promise)) {\n    var p = Promise.resolve();\n    var logError = function (err) { console.error(err); };\n    timerFunc = function () {\n      p.then(nextTickHandler).catch(logError);\n      // in problematic UIWebViews, Promise.then doesn't completely break, but\n      // it can get stuck in a weird state where callbacks are pushed into the\n      // microtask queue but the queue isn't being flushed, until the browser\n      // needs to do some other work, e.g. handle a timer. Therefore we can\n      // \"force\" the microtask queue to be flushed by adding an empty timer.\n      if (isIOS) { setTimeout(noop); }\n    };\n  } else if (typeof MutationObserver !== 'undefined' && (\n    isNative(MutationObserver) ||\n    // PhantomJS and iOS 7.x\n    MutationObserver.toString() === '[object MutationObserverConstructor]'\n  )) {\n    // use MutationObserver where native Promise is not available,\n    // e.g. PhantomJS IE11, iOS7, Android 4.4\n    var counter = 1;\n    var observer = new MutationObserver(nextTickHandler);\n    var textNode = document.createTextNode(String(counter));\n    observer.observe(textNode, {\n      characterData: true\n    });\n    timerFunc = function () {\n      counter = (counter + 1) % 2;\n      textNode.data = String(counter);\n    };\n  } else {\n    // fallback to setTimeout\n    /* istanbul ignore next */\n    timerFunc = function () {\n      setTimeout(nextTickHandler, 0);\n    };\n  }\n\n  return function queueNextTick (cb, ctx) {\n    var _resolve;\n    callbacks.push(function () {\n      if (cb) { cb.call(ctx); }\n      if (_resolve) { _resolve(ctx); }\n    });\n    if (!pending) {\n      pending = true;\n      timerFunc();\n    }\n    if (!cb && typeof Promise !== 'undefined') {\n      return new Promise(function (resolve) {\n        _resolve = resolve;\n      })\n    }\n  }\n})();\n\nvar _Set;\n/* istanbul ignore if */\nif (typeof Set !== 'undefined' && isNative(Set)) {\n  // use native Set when available.\n  _Set = Set;\n} else {\n  // a non-standard Set polyfill that only works with primitive keys.\n  _Set = (function () {\n    function Set () {\n      this.set = Object.create(null);\n    }\n    Set.prototype.has = function has (key) {\n      return this.set[key] === true\n    };\n    Set.prototype.add = function add (key) {\n      this.set[key] = true;\n    };\n    Set.prototype.clear = function clear () {\n      this.set = Object.create(null);\n    };\n\n    return Set;\n  }());\n}\n\nvar warn = noop;\nvar tip = noop;\nvar formatComponentName;\n\n{\n  var hasConsole = typeof console !== 'undefined';\n  var classifyRE = /(?:^|[-_])(\\w)/g;\n  var classify = function (str) { return str\n    .replace(classifyRE, function (c) { return c.toUpperCase(); })\n    .replace(/[-_]/g, ''); };\n\n  warn = function (msg, vm) {\n    if (hasConsole && (!config.silent)) {\n      console.error(\"[Vue warn]: \" + msg + \" \" + (\n        vm ? formatLocation(formatComponentName(vm)) : ''\n      ));\n    }\n  };\n\n  tip = function (msg, vm) {\n    if (hasConsole && (!config.silent)) {\n      console.warn(\"[Vue tip]: \" + msg + \" \" + (\n        vm ? formatLocation(formatComponentName(vm)) : ''\n      ));\n    }\n  };\n\n  formatComponentName = function (vm, includeFile) {\n    if (vm.$root === vm) {\n      return '<Root>'\n    }\n    var name = typeof vm === 'string'\n      ? vm\n      : typeof vm === 'function' && vm.options\n        ? vm.options.name\n        : vm._isVue\n          ? vm.$options.name || vm.$options._componentTag\n          : vm.name;\n\n    var file = vm._isVue && vm.$options.__file;\n    if (!name && file) {\n      var match = file.match(/([^/\\\\]+)\\.vue$/);\n      name = match && match[1];\n    }\n\n    return (\n      (name ? (\"<\" + (classify(name)) + \">\") : \"<Anonymous>\") +\n      (file && includeFile !== false ? (\" at \" + file) : '')\n    )\n  };\n\n  var formatLocation = function (str) {\n    if (str === \"<Anonymous>\") {\n      str += \" - use the \\\"name\\\" option for better debugging messages.\";\n    }\n    return (\"\\n(found in \" + str + \")\")\n  };\n}\n\n/*  */\n\n\nvar uid$1 = 0;\n\n/**\n * A dep is an observable that can have multiple\n * directives subscribing to it.\n */\nvar Dep = function Dep () {\n  this.id = uid$1++;\n  this.subs = [];\n};\n\nDep.prototype.addSub = function addSub (sub) {\n  this.subs.push(sub);\n};\n\nDep.prototype.removeSub = function removeSub (sub) {\n  remove(this.subs, sub);\n};\n\nDep.prototype.depend = function depend () {\n  if (Dep.target) {\n    Dep.target.addDep(this);\n  }\n};\n\nDep.prototype.notify = function notify () {\n  // stabilize the subscriber list first\n  var subs = this.subs.slice();\n  for (var i = 0, l = subs.length; i < l; i++) {\n    subs[i].update();\n  }\n};\n\n// the current target watcher being evaluated.\n// this is globally unique because there could be only one\n// watcher being evaluated at any time.\nDep.target = null;\nvar targetStack = [];\n\nfunction pushTarget (_target) {\n  if (Dep.target) { targetStack.push(Dep.target); }\n  Dep.target = _target;\n}\n\nfunction popTarget () {\n  Dep.target = targetStack.pop();\n}\n\n/*\n * not type checking this file because flow doesn't play well with\n * dynamically accessing methods on Array prototype\n */\n\nvar arrayProto = Array.prototype;\nvar arrayMethods = Object.create(arrayProto);[\n  'push',\n  'pop',\n  'shift',\n  'unshift',\n  'splice',\n  'sort',\n  'reverse'\n]\n.forEach(function (method) {\n  // cache original method\n  var original = arrayProto[method];\n  def(arrayMethods, method, function mutator () {\n    var arguments$1 = arguments;\n\n    // avoid leaking arguments:\n    // http://jsperf.com/closure-with-arguments\n    var i = arguments.length;\n    var args = new Array(i);\n    while (i--) {\n      args[i] = arguments$1[i];\n    }\n    var result = original.apply(this, args);\n    var ob = this.__ob__;\n    var inserted;\n    switch (method) {\n      case 'push':\n        inserted = args;\n        break\n      case 'unshift':\n        inserted = args;\n        break\n      case 'splice':\n        inserted = args.slice(2);\n        break\n    }\n    if (inserted) { ob.observeArray(inserted); }\n    // notify change\n    ob.dep.notify();\n    return result\n  });\n});\n\n/*  */\n\nvar arrayKeys = Object.getOwnPropertyNames(arrayMethods);\n\n/**\n * By default, when a reactive property is set, the new value is\n * also converted to become reactive. However when passing down props,\n * we don't want to force conversion because the value may be a nested value\n * under a frozen data structure. Converting it would defeat the optimization.\n */\nvar observerState = {\n  shouldConvert: true,\n  isSettingProps: false\n};\n\n/**\n * Observer class that are attached to each observed\n * object. Once attached, the observer converts target\n * object's property keys into getter/setters that\n * collect dependencies and dispatches updates.\n */\nvar Observer = function Observer (value) {\n  this.value = value;\n  this.dep = new Dep();\n  this.vmCount = 0;\n  def(value, '__ob__', this);\n  if (Array.isArray(value)) {\n    var augment = hasProto\n      ? protoAugment\n      : copyAugment;\n    augment(value, arrayMethods, arrayKeys);\n    this.observeArray(value);\n  } else {\n    this.walk(value);\n  }\n};\n\n/**\n * Walk through each property and convert them into\n * getter/setters. This method should only be called when\n * value type is Object.\n */\nObserver.prototype.walk = function walk (obj) {\n  var keys = Object.keys(obj);\n  for (var i = 0; i < keys.length; i++) {\n    defineReactive$$1(obj, keys[i], obj[keys[i]]);\n  }\n};\n\n/**\n * Observe a list of Array items.\n */\nObserver.prototype.observeArray = function observeArray (items) {\n  for (var i = 0, l = items.length; i < l; i++) {\n    observe(items[i]);\n  }\n};\n\n// helpers\n\n/**\n * Augment an target Object or Array by intercepting\n * the prototype chain using __proto__\n */\nfunction protoAugment (target, src) {\n  /* eslint-disable no-proto */\n  target.__proto__ = src;\n  /* eslint-enable no-proto */\n}\n\n/**\n * Augment an target Object or Array by defining\n * hidden properties.\n */\n/* istanbul ignore next */\nfunction copyAugment (target, src, keys) {\n  for (var i = 0, l = keys.length; i < l; i++) {\n    var key = keys[i];\n    def(target, key, src[key]);\n  }\n}\n\n/**\n * Attempt to create an observer instance for a value,\n * returns the new observer if successfully observed,\n * or the existing observer if the value already has one.\n */\nfunction observe (value, asRootData) {\n  if (!isObject(value)) {\n    return\n  }\n  var ob;\n  if (hasOwn(value, '__ob__') && value.__ob__ instanceof Observer) {\n    ob = value.__ob__;\n  } else if (\n    observerState.shouldConvert &&\n    !isServerRendering() &&\n    (Array.isArray(value) || isPlainObject(value)) &&\n    Object.isExtensible(value) &&\n    !value._isVue\n  ) {\n    ob = new Observer(value);\n  }\n  if (asRootData && ob) {\n    ob.vmCount++;\n  }\n  return ob\n}\n\n/**\n * Define a reactive property on an Object.\n */\nfunction defineReactive$$1 (\n  obj,\n  key,\n  val,\n  customSetter\n) {\n  var dep = new Dep();\n\n  var property = Object.getOwnPropertyDescriptor(obj, key);\n  if (property && property.configurable === false) {\n    return\n  }\n\n  // cater for pre-defined getter/setters\n  var getter = property && property.get;\n  var setter = property && property.set;\n\n  var childOb = observe(val);\n  Object.defineProperty(obj, key, {\n    enumerable: true,\n    configurable: true,\n    get: function reactiveGetter () {\n      var value = getter ? getter.call(obj) : val;\n      if (Dep.target) {\n        dep.depend();\n        if (childOb) {\n          childOb.dep.depend();\n        }\n        if (Array.isArray(value)) {\n          dependArray(value);\n        }\n      }\n      return value\n    },\n    set: function reactiveSetter (newVal) {\n      var value = getter ? getter.call(obj) : val;\n      /* eslint-disable no-self-compare */\n      if (newVal === value || (newVal !== newVal && value !== value)) {\n        return\n      }\n      /* eslint-enable no-self-compare */\n      if (\"development\" !== 'production' && customSetter) {\n        customSetter();\n      }\n      if (setter) {\n        setter.call(obj, newVal);\n      } else {\n        val = newVal;\n      }\n      childOb = observe(newVal);\n      dep.notify();\n    }\n  });\n}\n\n/**\n * Set a property on an object. Adds the new property and\n * triggers change notification if the property doesn't\n * already exist.\n */\nfunction set (target, key, val) {\n  if (Array.isArray(target) && typeof key === 'number') {\n    target.length = Math.max(target.length, key);\n    target.splice(key, 1, val);\n    return val\n  }\n  if (hasOwn(target, key)) {\n    target[key] = val;\n    return val\n  }\n  var ob = (target ).__ob__;\n  if (target._isVue || (ob && ob.vmCount)) {\n    \"development\" !== 'production' && warn(\n      'Avoid adding reactive properties to a Vue instance or its root $data ' +\n      'at runtime - declare it upfront in the data option.'\n    );\n    return val\n  }\n  if (!ob) {\n    target[key] = val;\n    return val\n  }\n  defineReactive$$1(ob.value, key, val);\n  ob.dep.notify();\n  return val\n}\n\n/**\n * Delete a property and trigger change if necessary.\n */\nfunction del (target, key) {\n  if (Array.isArray(target) && typeof key === 'number') {\n    target.splice(key, 1);\n    return\n  }\n  var ob = (target ).__ob__;\n  if (target._isVue || (ob && ob.vmCount)) {\n    \"development\" !== 'production' && warn(\n      'Avoid deleting properties on a Vue instance or its root $data ' +\n      '- just set it to null.'\n    );\n    return\n  }\n  if (!hasOwn(target, key)) {\n    return\n  }\n  delete target[key];\n  if (!ob) {\n    return\n  }\n  ob.dep.notify();\n}\n\n/**\n * Collect dependencies on array elements when the array is touched, since\n * we cannot intercept array element access like property getters.\n */\nfunction dependArray (value) {\n  for (var e = (void 0), i = 0, l = value.length; i < l; i++) {\n    e = value[i];\n    e && e.__ob__ && e.__ob__.dep.depend();\n    if (Array.isArray(e)) {\n      dependArray(e);\n    }\n  }\n}\n\n/*  */\n\n/**\n * Option overwriting strategies are functions that handle\n * how to merge a parent option value and a child option\n * value into the final value.\n */\nvar strats = config.optionMergeStrategies;\n\n/**\n * Options with restrictions\n */\n{\n  strats.el = strats.propsData = function (parent, child, vm, key) {\n    if (!vm) {\n      warn(\n        \"option \\\"\" + key + \"\\\" can only be used during instance \" +\n        'creation with the `new` keyword.'\n      );\n    }\n    return defaultStrat(parent, child)\n  };\n}\n\n/**\n * Helper that recursively merges two data objects together.\n */\nfunction mergeData (to, from) {\n  if (!from) { return to }\n  var key, toVal, fromVal;\n  var keys = Object.keys(from);\n  for (var i = 0; i < keys.length; i++) {\n    key = keys[i];\n    toVal = to[key];\n    fromVal = from[key];\n    if (!hasOwn(to, key)) {\n      set(to, key, fromVal);\n    } else if (isPlainObject(toVal) && isPlainObject(fromVal)) {\n      mergeData(toVal, fromVal);\n    }\n  }\n  return to\n}\n\n/**\n * Data\n */\nstrats.data = function (\n  parentVal,\n  childVal,\n  vm\n) {\n  if (!vm) {\n    // in a Vue.extend merge, both should be functions\n    if (!childVal) {\n      return parentVal\n    }\n    if (typeof childVal !== 'function') {\n      \"development\" !== 'production' && warn(\n        'The \"data\" option should be a function ' +\n        'that returns a per-instance value in component ' +\n        'definitions.',\n        vm\n      );\n      return parentVal\n    }\n    if (!parentVal) {\n      return childVal\n    }\n    // when parentVal & childVal are both present,\n    // we need to return a function that returns the\n    // merged result of both functions... no need to\n    // check if parentVal is a function here because\n    // it has to be a function to pass previous merges.\n    return function mergedDataFn () {\n      return mergeData(\n        childVal.call(this),\n        parentVal.call(this)\n      )\n    }\n  } else if (parentVal || childVal) {\n    return function mergedInstanceDataFn () {\n      // instance merge\n      var instanceData = typeof childVal === 'function'\n        ? childVal.call(vm)\n        : childVal;\n      var defaultData = typeof parentVal === 'function'\n        ? parentVal.call(vm)\n        : undefined;\n      if (instanceData) {\n        return mergeData(instanceData, defaultData)\n      } else {\n        return defaultData\n      }\n    }\n  }\n};\n\n/**\n * Hooks and props are merged as arrays.\n */\nfunction mergeHook (\n  parentVal,\n  childVal\n) {\n  return childVal\n    ? parentVal\n      ? parentVal.concat(childVal)\n      : Array.isArray(childVal)\n        ? childVal\n        : [childVal]\n    : parentVal\n}\n\nconfig._lifecycleHooks.forEach(function (hook) {\n  strats[hook] = mergeHook;\n});\n\n/**\n * Assets\n *\n * When a vm is present (instance creation), we need to do\n * a three-way merge between constructor options, instance\n * options and parent options.\n */\nfunction mergeAssets (parentVal, childVal) {\n  var res = Object.create(parentVal || null);\n  return childVal\n    ? extend(res, childVal)\n    : res\n}\n\nconfig._assetTypes.forEach(function (type) {\n  strats[type + 's'] = mergeAssets;\n});\n\n/**\n * Watchers.\n *\n * Watchers hashes should not overwrite one\n * another, so we merge them as arrays.\n */\nstrats.watch = function (parentVal, childVal) {\n  /* istanbul ignore if */\n  if (!childVal) { return Object.create(parentVal || null) }\n  if (!parentVal) { return childVal }\n  var ret = {};\n  extend(ret, parentVal);\n  for (var key in childVal) {\n    var parent = ret[key];\n    var child = childVal[key];\n    if (parent && !Array.isArray(parent)) {\n      parent = [parent];\n    }\n    ret[key] = parent\n      ? parent.concat(child)\n      : [child];\n  }\n  return ret\n};\n\n/**\n * Other object hashes.\n */\nstrats.props =\nstrats.methods =\nstrats.computed = function (parentVal, childVal) {\n  if (!childVal) { return Object.create(parentVal || null) }\n  if (!parentVal) { return childVal }\n  var ret = Object.create(null);\n  extend(ret, parentVal);\n  extend(ret, childVal);\n  return ret\n};\n\n/**\n * Default strategy.\n */\nvar defaultStrat = function (parentVal, childVal) {\n  return childVal === undefined\n    ? parentVal\n    : childVal\n};\n\n/**\n * Validate component names\n */\nfunction checkComponents (options) {\n  for (var key in options.components) {\n    var lower = key.toLowerCase();\n    if (isBuiltInTag(lower) || config.isReservedTag(lower)) {\n      warn(\n        'Do not use built-in or reserved HTML elements as component ' +\n        'id: ' + key\n      );\n    }\n  }\n}\n\n/**\n * Ensure all props option syntax are normalized into the\n * Object-based format.\n */\nfunction normalizeProps (options) {\n  var props = options.props;\n  if (!props) { return }\n  var res = {};\n  var i, val, name;\n  if (Array.isArray(props)) {\n    i = props.length;\n    while (i--) {\n      val = props[i];\n      if (typeof val === 'string') {\n        name = camelize(val);\n        res[name] = { type: null };\n      } else {\n        warn('props must be strings when using array syntax.');\n      }\n    }\n  } else if (isPlainObject(props)) {\n    for (var key in props) {\n      val = props[key];\n      name = camelize(key);\n      res[name] = isPlainObject(val)\n        ? val\n        : { type: val };\n    }\n  }\n  options.props = res;\n}\n\n/**\n * Normalize raw function directives into object format.\n */\nfunction normalizeDirectives (options) {\n  var dirs = options.directives;\n  if (dirs) {\n    for (var key in dirs) {\n      var def = dirs[key];\n      if (typeof def === 'function') {\n        dirs[key] = { bind: def, update: def };\n      }\n    }\n  }\n}\n\n/**\n * Merge two option objects into a new one.\n * Core utility used in both instantiation and inheritance.\n */\nfunction mergeOptions (\n  parent,\n  child,\n  vm\n) {\n  {\n    checkComponents(child);\n  }\n  normalizeProps(child);\n  normalizeDirectives(child);\n  var extendsFrom = child.extends;\n  if (extendsFrom) {\n    parent = typeof extendsFrom === 'function'\n      ? mergeOptions(parent, extendsFrom.options, vm)\n      : mergeOptions(parent, extendsFrom, vm);\n  }\n  if (child.mixins) {\n    for (var i = 0, l = child.mixins.length; i < l; i++) {\n      var mixin = child.mixins[i];\n      if (mixin.prototype instanceof Vue$2) {\n        mixin = mixin.options;\n      }\n      parent = mergeOptions(parent, mixin, vm);\n    }\n  }\n  var options = {};\n  var key;\n  for (key in parent) {\n    mergeField(key);\n  }\n  for (key in child) {\n    if (!hasOwn(parent, key)) {\n      mergeField(key);\n    }\n  }\n  function mergeField (key) {\n    var strat = strats[key] || defaultStrat;\n    options[key] = strat(parent[key], child[key], vm, key);\n  }\n  return options\n}\n\n/**\n * Resolve an asset.\n * This function is used because child instances need access\n * to assets defined in its ancestor chain.\n */\nfunction resolveAsset (\n  options,\n  type,\n  id,\n  warnMissing\n) {\n  /* istanbul ignore if */\n  if (typeof id !== 'string') {\n    return\n  }\n  var assets = options[type];\n  // check local registration variations first\n  if (hasOwn(assets, id)) { return assets[id] }\n  var camelizedId = camelize(id);\n  if (hasOwn(assets, camelizedId)) { return assets[camelizedId] }\n  var PascalCaseId = capitalize(camelizedId);\n  if (hasOwn(assets, PascalCaseId)) { return assets[PascalCaseId] }\n  // fallback to prototype chain\n  var res = assets[id] || assets[camelizedId] || assets[PascalCaseId];\n  if (\"development\" !== 'production' && warnMissing && !res) {\n    warn(\n      'Failed to resolve ' + type.slice(0, -1) + ': ' + id,\n      options\n    );\n  }\n  return res\n}\n\n/*  */\n\nfunction validateProp (\n  key,\n  propOptions,\n  propsData,\n  vm\n) {\n  var prop = propOptions[key];\n  var absent = !hasOwn(propsData, key);\n  var value = propsData[key];\n  // handle boolean props\n  if (isType(Boolean, prop.type)) {\n    if (absent && !hasOwn(prop, 'default')) {\n      value = false;\n    } else if (!isType(String, prop.type) && (value === '' || value === hyphenate(key))) {\n      value = true;\n    }\n  }\n  // check default value\n  if (value === undefined) {\n    value = getPropDefaultValue(vm, prop, key);\n    // since the default value is a fresh copy,\n    // make sure to observe it.\n    var prevShouldConvert = observerState.shouldConvert;\n    observerState.shouldConvert = true;\n    observe(value);\n    observerState.shouldConvert = prevShouldConvert;\n  }\n  {\n    assertProp(prop, key, value, vm, absent);\n  }\n  return value\n}\n\n/**\n * Get the default value of a prop.\n */\nfunction getPropDefaultValue (vm, prop, key) {\n  // no default, return undefined\n  if (!hasOwn(prop, 'default')) {\n    return undefined\n  }\n  var def = prop.default;\n  // warn against non-factory defaults for Object & Array\n  if (\"development\" !== 'production' && isObject(def)) {\n    warn(\n      'Invalid default value for prop \"' + key + '\": ' +\n      'Props with type Object/Array must use a factory function ' +\n      'to return the default value.',\n      vm\n    );\n  }\n  // the raw prop value was also undefined from previous render,\n  // return previous default value to avoid unnecessary watcher trigger\n  if (vm && vm.$options.propsData &&\n    vm.$options.propsData[key] === undefined &&\n    vm._props[key] !== undefined) {\n    return vm._props[key]\n  }\n  // call factory function for non-Function types\n  // a value is Function if its prototype is function even across different execution context\n  return typeof def === 'function' && getType(prop.type) !== 'Function'\n    ? def.call(vm)\n    : def\n}\n\n/**\n * Assert whether a prop is valid.\n */\nfunction assertProp (\n  prop,\n  name,\n  value,\n  vm,\n  absent\n) {\n  if (prop.required && absent) {\n    warn(\n      'Missing required prop: \"' + name + '\"',\n      vm\n    );\n    return\n  }\n  if (value == null && !prop.required) {\n    return\n  }\n  var type = prop.type;\n  var valid = !type || type === true;\n  var expectedTypes = [];\n  if (type) {\n    if (!Array.isArray(type)) {\n      type = [type];\n    }\n    for (var i = 0; i < type.length && !valid; i++) {\n      var assertedType = assertType(value, type[i]);\n      expectedTypes.push(assertedType.expectedType || '');\n      valid = assertedType.valid;\n    }\n  }\n  if (!valid) {\n    warn(\n      'Invalid prop: type check failed for prop \"' + name + '\".' +\n      ' Expected ' + expectedTypes.map(capitalize).join(', ') +\n      ', got ' + Object.prototype.toString.call(value).slice(8, -1) + '.',\n      vm\n    );\n    return\n  }\n  var validator = prop.validator;\n  if (validator) {\n    if (!validator(value)) {\n      warn(\n        'Invalid prop: custom validator check failed for prop \"' + name + '\".',\n        vm\n      );\n    }\n  }\n}\n\n/**\n * Assert the type of a value\n */\nfunction assertType (value, type) {\n  var valid;\n  var expectedType = getType(type);\n  if (expectedType === 'String') {\n    valid = typeof value === (expectedType = 'string');\n  } else if (expectedType === 'Number') {\n    valid = typeof value === (expectedType = 'number');\n  } else if (expectedType === 'Boolean') {\n    valid = typeof value === (expectedType = 'boolean');\n  } else if (expectedType === 'Function') {\n    valid = typeof value === (expectedType = 'function');\n  } else if (expectedType === 'Object') {\n    valid = isPlainObject(value);\n  } else if (expectedType === 'Array') {\n    valid = Array.isArray(value);\n  } else {\n    valid = value instanceof type;\n  }\n  return {\n    valid: valid,\n    expectedType: expectedType\n  }\n}\n\n/**\n * Use function string name to check built-in types,\n * because a simple equality check will fail when running\n * across different vms / iframes.\n */\nfunction getType (fn) {\n  var match = fn && fn.toString().match(/^\\s*function (\\w+)/);\n  return match && match[1]\n}\n\nfunction isType (type, fn) {\n  if (!Array.isArray(fn)) {\n    return getType(fn) === getType(type)\n  }\n  for (var i = 0, len = fn.length; i < len; i++) {\n    if (getType(fn[i]) === getType(type)) {\n      return true\n    }\n  }\n  /* istanbul ignore next */\n  return false\n}\n\nfunction handleError (err, vm, info) {\n  if (config.errorHandler) {\n    config.errorHandler.call(null, err, vm, info);\n  } else {\n    {\n      warn((\"Error in \" + info + \":\"), vm);\n    }\n    /* istanbul ignore else */\n    if (inBrowser && typeof console !== 'undefined') {\n      console.error(err);\n    } else {\n      throw err\n    }\n  }\n}\n\n/* not type checking this file because flow doesn't play well with Proxy */\n\nvar initProxy;\n\n{\n  var allowedGlobals = makeMap(\n    'Infinity,undefined,NaN,isFinite,isNaN,' +\n    'parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,' +\n    'Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,' +\n    'require' // for Webpack/Browserify\n  );\n\n  var warnNonPresent = function (target, key) {\n    warn(\n      \"Property or method \\\"\" + key + \"\\\" is not defined on the instance but \" +\n      \"referenced during render. Make sure to declare reactive data \" +\n      \"properties in the data option.\",\n      target\n    );\n  };\n\n  var hasProxy =\n    typeof Proxy !== 'undefined' &&\n    Proxy.toString().match(/native code/);\n\n  if (hasProxy) {\n    var isBuiltInModifier = makeMap('stop,prevent,self,ctrl,shift,alt,meta');\n    config.keyCodes = new Proxy(config.keyCodes, {\n      set: function set (target, key, value) {\n        if (isBuiltInModifier(key)) {\n          warn((\"Avoid overwriting built-in modifier in config.keyCodes: .\" + key));\n          return false\n        } else {\n          target[key] = value;\n          return true\n        }\n      }\n    });\n  }\n\n  var hasHandler = {\n    has: function has (target, key) {\n      var has = key in target;\n      var isAllowed = allowedGlobals(key) || key.charAt(0) === '_';\n      if (!has && !isAllowed) {\n        warnNonPresent(target, key);\n      }\n      return has || !isAllowed\n    }\n  };\n\n  var getHandler = {\n    get: function get (target, key) {\n      if (typeof key === 'string' && !(key in target)) {\n        warnNonPresent(target, key);\n      }\n      return target[key]\n    }\n  };\n\n  initProxy = function initProxy (vm) {\n    if (hasProxy) {\n      // determine which proxy handler to use\n      var options = vm.$options;\n      var handlers = options.render && options.render._withStripped\n        ? getHandler\n        : hasHandler;\n      vm._renderProxy = new Proxy(vm, handlers);\n    } else {\n      vm._renderProxy = vm;\n    }\n  };\n}\n\nvar mark;\nvar measure;\n\n{\n  var perf = inBrowser && window.performance;\n  /* istanbul ignore if */\n  if (\n    perf &&\n    perf.mark &&\n    perf.measure &&\n    perf.clearMarks &&\n    perf.clearMeasures\n  ) {\n    mark = function (tag) { return perf.mark(tag); };\n    measure = function (name, startTag, endTag) {\n      perf.measure(name, startTag, endTag);\n      perf.clearMarks(startTag);\n      perf.clearMarks(endTag);\n      perf.clearMeasures(name);\n    };\n  }\n}\n\n/*  */\n\nvar VNode = function VNode (\n  tag,\n  data,\n  children,\n  text,\n  elm,\n  context,\n  componentOptions\n) {\n  this.tag = tag;\n  this.data = data;\n  this.children = children;\n  this.text = text;\n  this.elm = elm;\n  this.ns = undefined;\n  this.context = context;\n  this.functionalContext = undefined;\n  this.key = data && data.key;\n  this.componentOptions = componentOptions;\n  this.componentInstance = undefined;\n  this.parent = undefined;\n  this.raw = false;\n  this.isStatic = false;\n  this.isRootInsert = true;\n  this.isComment = false;\n  this.isCloned = false;\n  this.isOnce = false;\n};\n\nvar prototypeAccessors = { child: {} };\n\n// DEPRECATED: alias for componentInstance for backwards compat.\n/* istanbul ignore next */\nprototypeAccessors.child.get = function () {\n  return this.componentInstance\n};\n\nObject.defineProperties( VNode.prototype, prototypeAccessors );\n\nvar createEmptyVNode = function () {\n  var node = new VNode();\n  node.text = '';\n  node.isComment = true;\n  return node\n};\n\nfunction createTextVNode (val) {\n  return new VNode(undefined, undefined, undefined, String(val))\n}\n\n// optimized shallow clone\n// used for static nodes and slot nodes because they may be reused across\n// multiple renders, cloning them avoids errors when DOM manipulations rely\n// on their elm reference.\nfunction cloneVNode (vnode) {\n  var cloned = new VNode(\n    vnode.tag,\n    vnode.data,\n    vnode.children,\n    vnode.text,\n    vnode.elm,\n    vnode.context,\n    vnode.componentOptions\n  );\n  cloned.ns = vnode.ns;\n  cloned.isStatic = vnode.isStatic;\n  cloned.key = vnode.key;\n  cloned.isCloned = true;\n  return cloned\n}\n\nfunction cloneVNodes (vnodes) {\n  var len = vnodes.length;\n  var res = new Array(len);\n  for (var i = 0; i < len; i++) {\n    res[i] = cloneVNode(vnodes[i]);\n  }\n  return res\n}\n\n/*  */\n\nvar normalizeEvent = cached(function (name) {\n  var once$$1 = name.charAt(0) === '~'; // Prefixed last, checked first\n  name = once$$1 ? name.slice(1) : name;\n  var capture = name.charAt(0) === '!';\n  name = capture ? name.slice(1) : name;\n  return {\n    name: name,\n    once: once$$1,\n    capture: capture\n  }\n});\n\nfunction createFnInvoker (fns) {\n  function invoker () {\n    var arguments$1 = arguments;\n\n    var fns = invoker.fns;\n    if (Array.isArray(fns)) {\n      for (var i = 0; i < fns.length; i++) {\n        fns[i].apply(null, arguments$1);\n      }\n    } else {\n      // return handler return value for single handlers\n      return fns.apply(null, arguments)\n    }\n  }\n  invoker.fns = fns;\n  return invoker\n}\n\nfunction updateListeners (\n  on,\n  oldOn,\n  add,\n  remove$$1,\n  vm\n) {\n  var name, cur, old, event;\n  for (name in on) {\n    cur = on[name];\n    old = oldOn[name];\n    event = normalizeEvent(name);\n    if (!cur) {\n      \"development\" !== 'production' && warn(\n        \"Invalid handler for event \\\"\" + (event.name) + \"\\\": got \" + String(cur),\n        vm\n      );\n    } else if (!old) {\n      if (!cur.fns) {\n        cur = on[name] = createFnInvoker(cur);\n      }\n      add(event.name, cur, event.once, event.capture);\n    } else if (cur !== old) {\n      old.fns = cur;\n      on[name] = old;\n    }\n  }\n  for (name in oldOn) {\n    if (!on[name]) {\n      event = normalizeEvent(name);\n      remove$$1(event.name, oldOn[name], event.capture);\n    }\n  }\n}\n\n/*  */\n\nfunction mergeVNodeHook (def, hookKey, hook) {\n  var invoker;\n  var oldHook = def[hookKey];\n\n  function wrappedHook () {\n    hook.apply(this, arguments);\n    // important: remove merged hook to ensure it's called only once\n    // and prevent memory leak\n    remove(invoker.fns, wrappedHook);\n  }\n\n  if (!oldHook) {\n    // no existing hook\n    invoker = createFnInvoker([wrappedHook]);\n  } else {\n    /* istanbul ignore if */\n    if (oldHook.fns && oldHook.merged) {\n      // already a merged invoker\n      invoker = oldHook;\n      invoker.fns.push(wrappedHook);\n    } else {\n      // existing plain hook\n      invoker = createFnInvoker([oldHook, wrappedHook]);\n    }\n  }\n\n  invoker.merged = true;\n  def[hookKey] = invoker;\n}\n\n/*  */\n\n// The template compiler attempts to minimize the need for normalization by\n// statically analyzing the template at compile time.\n//\n// For plain HTML markup, normalization can be completely skipped because the\n// generated render function is guaranteed to return Array<VNode>. There are\n// two cases where extra normalization is needed:\n\n// 1. When the children contains components - because a functional component\n// may return an Array instead of a single root. In this case, just a simple\n// normalization is needed - if any child is an Array, we flatten the whole\n// thing with Array.prototype.concat. It is guaranteed to be only 1-level deep\n// because functional components already normalize their own children.\nfunction simpleNormalizeChildren (children) {\n  for (var i = 0; i < children.length; i++) {\n    if (Array.isArray(children[i])) {\n      return Array.prototype.concat.apply([], children)\n    }\n  }\n  return children\n}\n\n// 2. When the children contains constructs that always generated nested Arrays,\n// e.g. <template>, <slot>, v-for, or when the children is provided by user\n// with hand-written render functions / JSX. In such cases a full normalization\n// is needed to cater to all possible types of children values.\nfunction normalizeChildren (children) {\n  return isPrimitive(children)\n    ? [createTextVNode(children)]\n    : Array.isArray(children)\n      ? normalizeArrayChildren(children)\n      : undefined\n}\n\nfunction normalizeArrayChildren (children, nestedIndex) {\n  var res = [];\n  var i, c, last;\n  for (i = 0; i < children.length; i++) {\n    c = children[i];\n    if (c == null || typeof c === 'boolean') { continue }\n    last = res[res.length - 1];\n    //  nested\n    if (Array.isArray(c)) {\n      res.push.apply(res, normalizeArrayChildren(c, ((nestedIndex || '') + \"_\" + i)));\n    } else if (isPrimitive(c)) {\n      if (last && last.text) {\n        last.text += String(c);\n      } else if (c !== '') {\n        // convert primitive to vnode\n        res.push(createTextVNode(c));\n      }\n    } else {\n      if (c.text && last && last.text) {\n        res[res.length - 1] = createTextVNode(last.text + c.text);\n      } else {\n        // default key for nested array children (likely generated by v-for)\n        if (c.tag && c.key == null && nestedIndex != null) {\n          c.key = \"__vlist\" + nestedIndex + \"_\" + i + \"__\";\n        }\n        res.push(c);\n      }\n    }\n  }\n  return res\n}\n\n/*  */\n\nfunction getFirstComponentChild (children) {\n  return children && children.filter(function (c) { return c && c.componentOptions; })[0]\n}\n\n/*  */\n\nfunction initEvents (vm) {\n  vm._events = Object.create(null);\n  vm._hasHookEvent = false;\n  // init parent attached events\n  var listeners = vm.$options._parentListeners;\n  if (listeners) {\n    updateComponentListeners(vm, listeners);\n  }\n}\n\nvar target;\n\nfunction add (event, fn, once$$1) {\n  if (once$$1) {\n    target.$once(event, fn);\n  } else {\n    target.$on(event, fn);\n  }\n}\n\nfunction remove$1 (event, fn) {\n  target.$off(event, fn);\n}\n\nfunction updateComponentListeners (\n  vm,\n  listeners,\n  oldListeners\n) {\n  target = vm;\n  updateListeners(listeners, oldListeners || {}, add, remove$1, vm);\n}\n\nfunction eventsMixin (Vue) {\n  var hookRE = /^hook:/;\n  Vue.prototype.$on = function (event, fn) {\n    var this$1 = this;\n\n    var vm = this;\n    if (Array.isArray(event)) {\n      for (var i = 0, l = event.length; i < l; i++) {\n        this$1.$on(event[i], fn);\n      }\n    } else {\n      (vm._events[event] || (vm._events[event] = [])).push(fn);\n      // optimize hook:event cost by using a boolean flag marked at registration\n      // instead of a hash lookup\n      if (hookRE.test(event)) {\n        vm._hasHookEvent = true;\n      }\n    }\n    return vm\n  };\n\n  Vue.prototype.$once = function (event, fn) {\n    var vm = this;\n    function on () {\n      vm.$off(event, on);\n      fn.apply(vm, arguments);\n    }\n    on.fn = fn;\n    vm.$on(event, on);\n    return vm\n  };\n\n  Vue.prototype.$off = function (event, fn) {\n    var this$1 = this;\n\n    var vm = this;\n    // all\n    if (!arguments.length) {\n      vm._events = Object.create(null);\n      return vm\n    }\n    // array of events\n    if (Array.isArray(event)) {\n      for (var i$1 = 0, l = event.length; i$1 < l; i$1++) {\n        this$1.$off(event[i$1], fn);\n      }\n      return vm\n    }\n    // specific event\n    var cbs = vm._events[event];\n    if (!cbs) {\n      return vm\n    }\n    if (arguments.length === 1) {\n      vm._events[event] = null;\n      return vm\n    }\n    // specific handler\n    var cb;\n    var i = cbs.length;\n    while (i--) {\n      cb = cbs[i];\n      if (cb === fn || cb.fn === fn) {\n        cbs.splice(i, 1);\n        break\n      }\n    }\n    return vm\n  };\n\n  Vue.prototype.$emit = function (event) {\n    var vm = this;\n    {\n      var lowerCaseEvent = event.toLowerCase();\n      if (lowerCaseEvent !== event && vm._events[lowerCaseEvent]) {\n        tip(\n          \"Event \\\"\" + lowerCaseEvent + \"\\\" is emitted in component \" +\n          (formatComponentName(vm)) + \" but the handler is registered for \\\"\" + event + \"\\\". \" +\n          \"Note that HTML attributes are case-insensitive and you cannot use \" +\n          \"v-on to listen to camelCase events when using in-DOM templates. \" +\n          \"You should probably use \\\"\" + (hyphenate(event)) + \"\\\" instead of \\\"\" + event + \"\\\".\"\n        );\n      }\n    }\n    var cbs = vm._events[event];\n    if (cbs) {\n      cbs = cbs.length > 1 ? toArray(cbs) : cbs;\n      var args = toArray(arguments, 1);\n      for (var i = 0, l = cbs.length; i < l; i++) {\n        cbs[i].apply(vm, args);\n      }\n    }\n    return vm\n  };\n}\n\n/*  */\n\n/**\n * Runtime helper for resolving raw children VNodes into a slot object.\n */\nfunction resolveSlots (\n  children,\n  context\n) {\n  var slots = {};\n  if (!children) {\n    return slots\n  }\n  var defaultSlot = [];\n  var name, child;\n  for (var i = 0, l = children.length; i < l; i++) {\n    child = children[i];\n    // named slots should only be respected if the vnode was rendered in the\n    // same context.\n    if ((child.context === context || child.functionalContext === context) &&\n        child.data && (name = child.data.slot)) {\n      var slot = (slots[name] || (slots[name] = []));\n      if (child.tag === 'template') {\n        slot.push.apply(slot, child.children);\n      } else {\n        slot.push(child);\n      }\n    } else {\n      defaultSlot.push(child);\n    }\n  }\n  // ignore whitespace\n  if (!defaultSlot.every(isWhitespace)) {\n    slots.default = defaultSlot;\n  }\n  return slots\n}\n\nfunction isWhitespace (node) {\n  return node.isComment || node.text === ' '\n}\n\nfunction resolveScopedSlots (\n  fns\n) {\n  var res = {};\n  for (var i = 0; i < fns.length; i++) {\n    res[fns[i][0]] = fns[i][1];\n  }\n  return res\n}\n\n/*  */\n\nvar activeInstance = null;\n\nfunction initLifecycle (vm) {\n  var options = vm.$options;\n\n  // locate first non-abstract parent\n  var parent = options.parent;\n  if (parent && !options.abstract) {\n    while (parent.$options.abstract && parent.$parent) {\n      parent = parent.$parent;\n    }\n    parent.$children.push(vm);\n  }\n\n  vm.$parent = parent;\n  vm.$root = parent ? parent.$root : vm;\n\n  vm.$children = [];\n  vm.$refs = {};\n\n  vm._watcher = null;\n  vm._inactive = null;\n  vm._directInactive = false;\n  vm._isMounted = false;\n  vm._isDestroyed = false;\n  vm._isBeingDestroyed = false;\n}\n\nfunction lifecycleMixin (Vue) {\n  Vue.prototype._update = function (vnode, hydrating) {\n    var vm = this;\n    if (vm._isMounted) {\n      callHook(vm, 'beforeUpdate');\n    }\n    var prevEl = vm.$el;\n    var prevVnode = vm._vnode;\n    var prevActiveInstance = activeInstance;\n    activeInstance = vm;\n    vm._vnode = vnode;\n    // Vue.prototype.__patch__ is injected in entry points\n    // based on the rendering backend used.\n    if (!prevVnode) {\n      // initial render\n      vm.$el = vm.__patch__(\n        vm.$el, vnode, hydrating, false /* removeOnly */,\n        vm.$options._parentElm,\n        vm.$options._refElm\n      );\n    } else {\n      // updates\n      vm.$el = vm.__patch__(prevVnode, vnode);\n    }\n    activeInstance = prevActiveInstance;\n    // update __vue__ reference\n    if (prevEl) {\n      prevEl.__vue__ = null;\n    }\n    if (vm.$el) {\n      vm.$el.__vue__ = vm;\n    }\n    // if parent is an HOC, update its $el as well\n    if (vm.$vnode && vm.$parent && vm.$vnode === vm.$parent._vnode) {\n      vm.$parent.$el = vm.$el;\n    }\n    // updated hook is called by the scheduler to ensure that children are\n    // updated in a parent's updated hook.\n  };\n\n  Vue.prototype.$forceUpdate = function () {\n    var vm = this;\n    if (vm._watcher) {\n      vm._watcher.update();\n    }\n  };\n\n  Vue.prototype.$destroy = function () {\n    var vm = this;\n    if (vm._isBeingDestroyed) {\n      return\n    }\n    callHook(vm, 'beforeDestroy');\n    vm._isBeingDestroyed = true;\n    // remove self from parent\n    var parent = vm.$parent;\n    if (parent && !parent._isBeingDestroyed && !vm.$options.abstract) {\n      remove(parent.$children, vm);\n    }\n    // teardown watchers\n    if (vm._watcher) {\n      vm._watcher.teardown();\n    }\n    var i = vm._watchers.length;\n    while (i--) {\n      vm._watchers[i].teardown();\n    }\n    // remove reference from data ob\n    // frozen object may not have observer.\n    if (vm._data.__ob__) {\n      vm._data.__ob__.vmCount--;\n    }\n    // call the last hook...\n    vm._isDestroyed = true;\n    // invoke destroy hooks on current rendered tree\n    vm.__patch__(vm._vnode, null);\n    // fire destroyed hook\n    callHook(vm, 'destroyed');\n    // turn off all instance listeners.\n    vm.$off();\n    // remove __vue__ reference\n    if (vm.$el) {\n      vm.$el.__vue__ = null;\n    }\n    // remove reference to DOM nodes (prevents leak)\n    vm.$options._parentElm = vm.$options._refElm = null;\n  };\n}\n\nfunction mountComponent (\n  vm,\n  el,\n  hydrating\n) {\n  vm.$el = el;\n  if (!vm.$options.render) {\n    vm.$options.render = createEmptyVNode;\n    {\n      /* istanbul ignore if */\n      if ((vm.$options.template && vm.$options.template.charAt(0) !== '#') ||\n        vm.$options.el || el) {\n        warn(\n          'You are using the runtime-only build of Vue where the template ' +\n          'compiler is not available. Either pre-compile the templates into ' +\n          'render functions, or use the compiler-included build.',\n          vm\n        );\n      } else {\n        warn(\n          'Failed to mount component: template or render function not defined.',\n          vm\n        );\n      }\n    }\n  }\n  callHook(vm, 'beforeMount');\n\n  var updateComponent;\n  /* istanbul ignore if */\n  if (\"development\" !== 'production' && config.performance && mark) {\n    updateComponent = function () {\n      var name = vm._name;\n      var id = vm._uid;\n      var startTag = \"vue-perf-start:\" + id;\n      var endTag = \"vue-perf-end:\" + id;\n\n      mark(startTag);\n      var vnode = vm._render();\n      mark(endTag);\n      measure((name + \" render\"), startTag, endTag);\n\n      mark(startTag);\n      vm._update(vnode, hydrating);\n      mark(endTag);\n      measure((name + \" patch\"), startTag, endTag);\n    };\n  } else {\n    updateComponent = function () {\n      vm._update(vm._render(), hydrating);\n    };\n  }\n\n  vm._watcher = new Watcher(vm, updateComponent, noop);\n  hydrating = false;\n\n  // manually mounted instance, call mounted on self\n  // mounted is called for render-created child components in its inserted hook\n  if (vm.$vnode == null) {\n    vm._isMounted = true;\n    callHook(vm, 'mounted');\n  }\n  return vm\n}\n\nfunction updateChildComponent (\n  vm,\n  propsData,\n  listeners,\n  parentVnode,\n  renderChildren\n) {\n  // determine whether component has slot children\n  // we need to do this before overwriting $options._renderChildren\n  var hasChildren = !!(\n    renderChildren ||               // has new static slots\n    vm.$options._renderChildren ||  // has old static slots\n    parentVnode.data.scopedSlots || // has new scoped slots\n    vm.$scopedSlots !== emptyObject // has old scoped slots\n  );\n\n  vm.$options._parentVnode = parentVnode;\n  vm.$vnode = parentVnode; // update vm's placeholder node without re-render\n  if (vm._vnode) { // update child tree's parent\n    vm._vnode.parent = parentVnode;\n  }\n  vm.$options._renderChildren = renderChildren;\n\n  // update props\n  if (propsData && vm.$options.props) {\n    observerState.shouldConvert = false;\n    {\n      observerState.isSettingProps = true;\n    }\n    var props = vm._props;\n    var propKeys = vm.$options._propKeys || [];\n    for (var i = 0; i < propKeys.length; i++) {\n      var key = propKeys[i];\n      props[key] = validateProp(key, vm.$options.props, propsData, vm);\n    }\n    observerState.shouldConvert = true;\n    {\n      observerState.isSettingProps = false;\n    }\n    // keep a copy of raw propsData\n    vm.$options.propsData = propsData;\n  }\n  // update listeners\n  if (listeners) {\n    var oldListeners = vm.$options._parentListeners;\n    vm.$options._parentListeners = listeners;\n    updateComponentListeners(vm, listeners, oldListeners);\n  }\n  // resolve slots + force update if has children\n  if (hasChildren) {\n    vm.$slots = resolveSlots(renderChildren, parentVnode.context);\n    vm.$forceUpdate();\n  }\n}\n\nfunction isInInactiveTree (vm) {\n  while (vm && (vm = vm.$parent)) {\n    if (vm._inactive) { return true }\n  }\n  return false\n}\n\nfunction activateChildComponent (vm, direct) {\n  if (direct) {\n    vm._directInactive = false;\n    if (isInInactiveTree(vm)) {\n      return\n    }\n  } else if (vm._directInactive) {\n    return\n  }\n  if (vm._inactive || vm._inactive == null) {\n    vm._inactive = false;\n    for (var i = 0; i < vm.$children.length; i++) {\n      activateChildComponent(vm.$children[i]);\n    }\n    callHook(vm, 'activated');\n  }\n}\n\nfunction deactivateChildComponent (vm, direct) {\n  if (direct) {\n    vm._directInactive = true;\n    if (isInInactiveTree(vm)) {\n      return\n    }\n  }\n  if (!vm._inactive) {\n    vm._inactive = true;\n    for (var i = 0; i < vm.$children.length; i++) {\n      deactivateChildComponent(vm.$children[i]);\n    }\n    callHook(vm, 'deactivated');\n  }\n}\n\nfunction callHook (vm, hook) {\n  var handlers = vm.$options[hook];\n  if (handlers) {\n    for (var i = 0, j = handlers.length; i < j; i++) {\n      try {\n        handlers[i].call(vm);\n      } catch (e) {\n        handleError(e, vm, (hook + \" hook\"));\n      }\n    }\n  }\n  if (vm._hasHookEvent) {\n    vm.$emit('hook:' + hook);\n  }\n}\n\n/*  */\n\n\nvar queue = [];\nvar has = {};\nvar circular = {};\nvar waiting = false;\nvar flushing = false;\nvar index = 0;\n\n/**\n * Reset the scheduler's state.\n */\nfunction resetSchedulerState () {\n  queue.length = 0;\n  has = {};\n  {\n    circular = {};\n  }\n  waiting = flushing = false;\n}\n\n/**\n * Flush both queues and run the watchers.\n */\nfunction flushSchedulerQueue () {\n  flushing = true;\n  var watcher, id, vm;\n\n  // Sort queue before flush.\n  // This ensures that:\n  // 1. Components are updated from parent to child. (because parent is always\n  //    created before the child)\n  // 2. A component's user watchers are run before its render watcher (because\n  //    user watchers are created before the render watcher)\n  // 3. If a component is destroyed during a parent component's watcher run,\n  //    its watchers can be skipped.\n  queue.sort(function (a, b) { return a.id - b.id; });\n\n  // do not cache length because more watchers might be pushed\n  // as we run existing watchers\n  for (index = 0; index < queue.length; index++) {\n    watcher = queue[index];\n    id = watcher.id;\n    has[id] = null;\n    watcher.run();\n    // in dev build, check and stop circular updates.\n    if (\"development\" !== 'production' && has[id] != null) {\n      circular[id] = (circular[id] || 0) + 1;\n      if (circular[id] > config._maxUpdateCount) {\n        warn(\n          'You may have an infinite update loop ' + (\n            watcher.user\n              ? (\"in watcher with expression \\\"\" + (watcher.expression) + \"\\\"\")\n              : \"in a component render function.\"\n          ),\n          watcher.vm\n        );\n        break\n      }\n    }\n  }\n\n  // reset scheduler before updated hook called\n  var oldQueue = queue.slice();\n  resetSchedulerState();\n\n  // call updated hooks\n  index = oldQueue.length;\n  while (index--) {\n    watcher = oldQueue[index];\n    vm = watcher.vm;\n    if (vm._watcher === watcher && vm._isMounted) {\n      callHook(vm, 'updated');\n    }\n  }\n\n  // devtool hook\n  /* istanbul ignore if */\n  if (devtools && config.devtools) {\n    devtools.emit('flush');\n  }\n}\n\n/**\n * Push a watcher into the watcher queue.\n * Jobs with duplicate IDs will be skipped unless it's\n * pushed when the queue is being flushed.\n */\nfunction queueWatcher (watcher) {\n  var id = watcher.id;\n  if (has[id] == null) {\n    has[id] = true;\n    if (!flushing) {\n      queue.push(watcher);\n    } else {\n      // if already flushing, splice the watcher based on its id\n      // if already past its id, it will be run next immediately.\n      var i = queue.length - 1;\n      while (i >= 0 && queue[i].id > watcher.id) {\n        i--;\n      }\n      queue.splice(Math.max(i, index) + 1, 0, watcher);\n    }\n    // queue the flush\n    if (!waiting) {\n      waiting = true;\n      nextTick(flushSchedulerQueue);\n    }\n  }\n}\n\n/*  */\n\nvar uid$2 = 0;\n\n/**\n * A watcher parses an expression, collects dependencies,\n * and fires callback when the expression value changes.\n * This is used for both the $watch() api and directives.\n */\nvar Watcher = function Watcher (\n  vm,\n  expOrFn,\n  cb,\n  options\n) {\n  this.vm = vm;\n  vm._watchers.push(this);\n  // options\n  if (options) {\n    this.deep = !!options.deep;\n    this.user = !!options.user;\n    this.lazy = !!options.lazy;\n    this.sync = !!options.sync;\n  } else {\n    this.deep = this.user = this.lazy = this.sync = false;\n  }\n  this.cb = cb;\n  this.id = ++uid$2; // uid for batching\n  this.active = true;\n  this.dirty = this.lazy; // for lazy watchers\n  this.deps = [];\n  this.newDeps = [];\n  this.depIds = new _Set();\n  this.newDepIds = new _Set();\n  this.expression = expOrFn.toString();\n  // parse expression for getter\n  if (typeof expOrFn === 'function') {\n    this.getter = expOrFn;\n  } else {\n    this.getter = parsePath(expOrFn);\n    if (!this.getter) {\n      this.getter = function () {};\n      \"development\" !== 'production' && warn(\n        \"Failed watching path: \\\"\" + expOrFn + \"\\\" \" +\n        'Watcher only accepts simple dot-delimited paths. ' +\n        'For full control, use a function instead.',\n        vm\n      );\n    }\n  }\n  this.value = this.lazy\n    ? undefined\n    : this.get();\n};\n\n/**\n * Evaluate the getter, and re-collect dependencies.\n */\nWatcher.prototype.get = function get () {\n  pushTarget(this);\n  var value;\n  var vm = this.vm;\n  if (this.user) {\n    try {\n      value = this.getter.call(vm, vm);\n    } catch (e) {\n      handleError(e, vm, (\"getter for watcher \\\"\" + (this.expression) + \"\\\"\"));\n    }\n  } else {\n    value = this.getter.call(vm, vm);\n  }\n  // \"touch\" every property so they are all tracked as\n  // dependencies for deep watching\n  if (this.deep) {\n    traverse(value);\n  }\n  popTarget();\n  this.cleanupDeps();\n  return value\n};\n\n/**\n * Add a dependency to this directive.\n */\nWatcher.prototype.addDep = function addDep (dep) {\n  var id = dep.id;\n  if (!this.newDepIds.has(id)) {\n    this.newDepIds.add(id);\n    this.newDeps.push(dep);\n    if (!this.depIds.has(id)) {\n      dep.addSub(this);\n    }\n  }\n};\n\n/**\n * Clean up for dependency collection.\n */\nWatcher.prototype.cleanupDeps = function cleanupDeps () {\n    var this$1 = this;\n\n  var i = this.deps.length;\n  while (i--) {\n    var dep = this$1.deps[i];\n    if (!this$1.newDepIds.has(dep.id)) {\n      dep.removeSub(this$1);\n    }\n  }\n  var tmp = this.depIds;\n  this.depIds = this.newDepIds;\n  this.newDepIds = tmp;\n  this.newDepIds.clear();\n  tmp = this.deps;\n  this.deps = this.newDeps;\n  this.newDeps = tmp;\n  this.newDeps.length = 0;\n};\n\n/**\n * Subscriber interface.\n * Will be called when a dependency changes.\n */\nWatcher.prototype.update = function update () {\n  /* istanbul ignore else */\n  if (this.lazy) {\n    this.dirty = true;\n  } else if (this.sync) {\n    this.run();\n  } else {\n    queueWatcher(this);\n  }\n};\n\n/**\n * Scheduler job interface.\n * Will be called by the scheduler.\n */\nWatcher.prototype.run = function run () {\n  if (this.active) {\n    var value = this.get();\n    if (\n      value !== this.value ||\n      // Deep watchers and watchers on Object/Arrays should fire even\n      // when the value is the same, because the value may\n      // have mutated.\n      isObject(value) ||\n      this.deep\n    ) {\n      // set new value\n      var oldValue = this.value;\n      this.value = value;\n      if (this.user) {\n        try {\n          this.cb.call(this.vm, value, oldValue);\n        } catch (e) {\n          handleError(e, this.vm, (\"callback for watcher \\\"\" + (this.expression) + \"\\\"\"));\n        }\n      } else {\n        this.cb.call(this.vm, value, oldValue);\n      }\n    }\n  }\n};\n\n/**\n * Evaluate the value of the watcher.\n * This only gets called for lazy watchers.\n */\nWatcher.prototype.evaluate = function evaluate () {\n  this.value = this.get();\n  this.dirty = false;\n};\n\n/**\n * Depend on all deps collected by this watcher.\n */\nWatcher.prototype.depend = function depend () {\n    var this$1 = this;\n\n  var i = this.deps.length;\n  while (i--) {\n    this$1.deps[i].depend();\n  }\n};\n\n/**\n * Remove self from all dependencies' subscriber list.\n */\nWatcher.prototype.teardown = function teardown () {\n    var this$1 = this;\n\n  if (this.active) {\n    // remove self from vm's watcher list\n    // this is a somewhat expensive operation so we skip it\n    // if the vm is being destroyed.\n    if (!this.vm._isBeingDestroyed) {\n      remove(this.vm._watchers, this);\n    }\n    var i = this.deps.length;\n    while (i--) {\n      this$1.deps[i].removeSub(this$1);\n    }\n    this.active = false;\n  }\n};\n\n/**\n * Recursively traverse an object to evoke all converted\n * getters, so that every nested property inside the object\n * is collected as a \"deep\" dependency.\n */\nvar seenObjects = new _Set();\nfunction traverse (val) {\n  seenObjects.clear();\n  _traverse(val, seenObjects);\n}\n\nfunction _traverse (val, seen) {\n  var i, keys;\n  var isA = Array.isArray(val);\n  if ((!isA && !isObject(val)) || !Object.isExtensible(val)) {\n    return\n  }\n  if (val.__ob__) {\n    var depId = val.__ob__.dep.id;\n    if (seen.has(depId)) {\n      return\n    }\n    seen.add(depId);\n  }\n  if (isA) {\n    i = val.length;\n    while (i--) { _traverse(val[i], seen); }\n  } else {\n    keys = Object.keys(val);\n    i = keys.length;\n    while (i--) { _traverse(val[keys[i]], seen); }\n  }\n}\n\n/*  */\n\nvar sharedPropertyDefinition = {\n  enumerable: true,\n  configurable: true,\n  get: noop,\n  set: noop\n};\n\nfunction proxy (target, sourceKey, key) {\n  sharedPropertyDefinition.get = function proxyGetter () {\n    return this[sourceKey][key]\n  };\n  sharedPropertyDefinition.set = function proxySetter (val) {\n    this[sourceKey][key] = val;\n  };\n  Object.defineProperty(target, key, sharedPropertyDefinition);\n}\n\nfunction initState (vm) {\n  vm._watchers = [];\n  var opts = vm.$options;\n  if (opts.props) { initProps(vm, opts.props); }\n  if (opts.methods) { initMethods(vm, opts.methods); }\n  if (opts.data) {\n    initData(vm);\n  } else {\n    observe(vm._data = {}, true /* asRootData */);\n  }\n  if (opts.computed) { initComputed(vm, opts.computed); }\n  if (opts.watch) { initWatch(vm, opts.watch); }\n}\n\nvar isReservedProp = { key: 1, ref: 1, slot: 1 };\n\nfunction initProps (vm, propsOptions) {\n  var propsData = vm.$options.propsData || {};\n  var props = vm._props = {};\n  // cache prop keys so that future props updates can iterate using Array\n  // instead of dynamic object key enumeration.\n  var keys = vm.$options._propKeys = [];\n  var isRoot = !vm.$parent;\n  // root instance props should be converted\n  observerState.shouldConvert = isRoot;\n  var loop = function ( key ) {\n    keys.push(key);\n    var value = validateProp(key, propsOptions, propsData, vm);\n    /* istanbul ignore else */\n    {\n      if (isReservedProp[key]) {\n        warn(\n          (\"\\\"\" + key + \"\\\" is a reserved attribute and cannot be used as component prop.\"),\n          vm\n        );\n      }\n      defineReactive$$1(props, key, value, function () {\n        if (vm.$parent && !observerState.isSettingProps) {\n          warn(\n            \"Avoid mutating a prop directly since the value will be \" +\n            \"overwritten whenever the parent component re-renders. \" +\n            \"Instead, use a data or computed property based on the prop's \" +\n            \"value. Prop being mutated: \\\"\" + key + \"\\\"\",\n            vm\n          );\n        }\n      });\n    }\n    // static props are already proxied on the component's prototype\n    // during Vue.extend(). We only need to proxy props defined at\n    // instantiation here.\n    if (!(key in vm)) {\n      proxy(vm, \"_props\", key);\n    }\n  };\n\n  for (var key in propsOptions) loop( key );\n  observerState.shouldConvert = true;\n}\n\nfunction initData (vm) {\n  var data = vm.$options.data;\n  data = vm._data = typeof data === 'function'\n    ? getData(data, vm)\n    : data || {};\n  if (!isPlainObject(data)) {\n    data = {};\n    \"development\" !== 'production' && warn(\n      'data functions should return an object:\\n' +\n      'https://vuejs.org/v2/guide/components.html#data-Must-Be-a-Function',\n      vm\n    );\n  }\n  // proxy data on instance\n  var keys = Object.keys(data);\n  var props = vm.$options.props;\n  var i = keys.length;\n  while (i--) {\n    if (props && hasOwn(props, keys[i])) {\n      \"development\" !== 'production' && warn(\n        \"The data property \\\"\" + (keys[i]) + \"\\\" is already declared as a prop. \" +\n        \"Use prop default value instead.\",\n        vm\n      );\n    } else if (!isReserved(keys[i])) {\n      proxy(vm, \"_data\", keys[i]);\n    }\n  }\n  // observe data\n  observe(data, true /* asRootData */);\n}\n\nfunction getData (data, vm) {\n  try {\n    return data.call(vm)\n  } catch (e) {\n    handleError(e, vm, \"data()\");\n    return {}\n  }\n}\n\nvar computedWatcherOptions = { lazy: true };\n\nfunction initComputed (vm, computed) {\n  var watchers = vm._computedWatchers = Object.create(null);\n\n  for (var key in computed) {\n    var userDef = computed[key];\n    var getter = typeof userDef === 'function' ? userDef : userDef.get;\n    {\n      if (getter === undefined) {\n        warn(\n          (\"No getter function has been defined for computed property \\\"\" + key + \"\\\".\"),\n          vm\n        );\n        getter = noop;\n      }\n    }\n    // create internal watcher for the computed property.\n    watchers[key] = new Watcher(vm, getter, noop, computedWatcherOptions);\n\n    // component-defined computed properties are already defined on the\n    // component prototype. We only need to define computed properties defined\n    // at instantiation here.\n    if (!(key in vm)) {\n      defineComputed(vm, key, userDef);\n    }\n  }\n}\n\nfunction defineComputed (target, key, userDef) {\n  if (typeof userDef === 'function') {\n    sharedPropertyDefinition.get = createComputedGetter(key);\n    sharedPropertyDefinition.set = noop;\n  } else {\n    sharedPropertyDefinition.get = userDef.get\n      ? userDef.cache !== false\n        ? createComputedGetter(key)\n        : userDef.get\n      : noop;\n    sharedPropertyDefinition.set = userDef.set\n      ? userDef.set\n      : noop;\n  }\n  Object.defineProperty(target, key, sharedPropertyDefinition);\n}\n\nfunction createComputedGetter (key) {\n  return function computedGetter () {\n    var watcher = this._computedWatchers && this._computedWatchers[key];\n    if (watcher) {\n      if (watcher.dirty) {\n        watcher.evaluate();\n      }\n      if (Dep.target) {\n        watcher.depend();\n      }\n      return watcher.value\n    }\n  }\n}\n\nfunction initMethods (vm, methods) {\n  var props = vm.$options.props;\n  for (var key in methods) {\n    vm[key] = methods[key] == null ? noop : bind(methods[key], vm);\n    {\n      if (methods[key] == null) {\n        warn(\n          \"method \\\"\" + key + \"\\\" has an undefined value in the component definition. \" +\n          \"Did you reference the function correctly?\",\n          vm\n        );\n      }\n      if (props && hasOwn(props, key)) {\n        warn(\n          (\"method \\\"\" + key + \"\\\" has already been defined as a prop.\"),\n          vm\n        );\n      }\n    }\n  }\n}\n\nfunction initWatch (vm, watch) {\n  for (var key in watch) {\n    var handler = watch[key];\n    if (Array.isArray(handler)) {\n      for (var i = 0; i < handler.length; i++) {\n        createWatcher(vm, key, handler[i]);\n      }\n    } else {\n      createWatcher(vm, key, handler);\n    }\n  }\n}\n\nfunction createWatcher (vm, key, handler) {\n  var options;\n  if (isPlainObject(handler)) {\n    options = handler;\n    handler = handler.handler;\n  }\n  if (typeof handler === 'string') {\n    handler = vm[handler];\n  }\n  vm.$watch(key, handler, options);\n}\n\nfunction stateMixin (Vue) {\n  // flow somehow has problems with directly declared definition object\n  // when using Object.defineProperty, so we have to procedurally build up\n  // the object here.\n  var dataDef = {};\n  dataDef.get = function () { return this._data };\n  var propsDef = {};\n  propsDef.get = function () { return this._props };\n  {\n    dataDef.set = function (newData) {\n      warn(\n        'Avoid replacing instance root $data. ' +\n        'Use nested data properties instead.',\n        this\n      );\n    };\n    propsDef.set = function () {\n      warn(\"$props is readonly.\", this);\n    };\n  }\n  Object.defineProperty(Vue.prototype, '$data', dataDef);\n  Object.defineProperty(Vue.prototype, '$props', propsDef);\n\n  Vue.prototype.$set = set;\n  Vue.prototype.$delete = del;\n\n  Vue.prototype.$watch = function (\n    expOrFn,\n    cb,\n    options\n  ) {\n    var vm = this;\n    options = options || {};\n    options.user = true;\n    var watcher = new Watcher(vm, expOrFn, cb, options);\n    if (options.immediate) {\n      cb.call(vm, watcher.value);\n    }\n    return function unwatchFn () {\n      watcher.teardown();\n    }\n  };\n}\n\n/*  */\n\n// hooks to be invoked on component VNodes during patch\nvar componentVNodeHooks = {\n  init: function init (\n    vnode,\n    hydrating,\n    parentElm,\n    refElm\n  ) {\n    if (!vnode.componentInstance || vnode.componentInstance._isDestroyed) {\n      var child = vnode.componentInstance = createComponentInstanceForVnode(\n        vnode,\n        activeInstance,\n        parentElm,\n        refElm\n      );\n      child.$mount(hydrating ? vnode.elm : undefined, hydrating);\n    } else if (vnode.data.keepAlive) {\n      // kept-alive components, treat as a patch\n      var mountedNode = vnode; // work around flow\n      componentVNodeHooks.prepatch(mountedNode, mountedNode);\n    }\n  },\n\n  prepatch: function prepatch (oldVnode, vnode) {\n    var options = vnode.componentOptions;\n    var child = vnode.componentInstance = oldVnode.componentInstance;\n    updateChildComponent(\n      child,\n      options.propsData, // updated props\n      options.listeners, // updated listeners\n      vnode, // new parent vnode\n      options.children // new children\n    );\n  },\n\n  insert: function insert (vnode) {\n    if (!vnode.componentInstance._isMounted) {\n      vnode.componentInstance._isMounted = true;\n      callHook(vnode.componentInstance, 'mounted');\n    }\n    if (vnode.data.keepAlive) {\n      activateChildComponent(vnode.componentInstance, true /* direct */);\n    }\n  },\n\n  destroy: function destroy (vnode) {\n    if (!vnode.componentInstance._isDestroyed) {\n      if (!vnode.data.keepAlive) {\n        vnode.componentInstance.$destroy();\n      } else {\n        deactivateChildComponent(vnode.componentInstance, true /* direct */);\n      }\n    }\n  }\n};\n\nvar hooksToMerge = Object.keys(componentVNodeHooks);\n\nfunction createComponent (\n  Ctor,\n  data,\n  context,\n  children,\n  tag\n) {\n  if (!Ctor) {\n    return\n  }\n\n  var baseCtor = context.$options._base;\n  if (isObject(Ctor)) {\n    Ctor = baseCtor.extend(Ctor);\n  }\n\n  if (typeof Ctor !== 'function') {\n    {\n      warn((\"Invalid Component definition: \" + (String(Ctor))), context);\n    }\n    return\n  }\n\n  // async component\n  if (!Ctor.cid) {\n    if (Ctor.resolved) {\n      Ctor = Ctor.resolved;\n    } else {\n      Ctor = resolveAsyncComponent(Ctor, baseCtor, function () {\n        // it's ok to queue this on every render because\n        // $forceUpdate is buffered by the scheduler.\n        context.$forceUpdate();\n      });\n      if (!Ctor) {\n        // return nothing if this is indeed an async component\n        // wait for the callback to trigger parent update.\n        return\n      }\n    }\n  }\n\n  // resolve constructor options in case global mixins are applied after\n  // component constructor creation\n  resolveConstructorOptions(Ctor);\n\n  data = data || {};\n\n  // transform component v-model data into props & events\n  if (data.model) {\n    transformModel(Ctor.options, data);\n  }\n\n  // extract props\n  var propsData = extractProps(data, Ctor, tag);\n\n  // functional component\n  if (Ctor.options.functional) {\n    return createFunctionalComponent(Ctor, propsData, data, context, children)\n  }\n\n  // extract listeners, since these needs to be treated as\n  // child component listeners instead of DOM listeners\n  var listeners = data.on;\n  // replace with listeners with .native modifier\n  data.on = data.nativeOn;\n\n  if (Ctor.options.abstract) {\n    // abstract components do not keep anything\n    // other than props & listeners\n    data = {};\n  }\n\n  // merge component management hooks onto the placeholder node\n  mergeHooks(data);\n\n  // return a placeholder vnode\n  var name = Ctor.options.name || tag;\n  var vnode = new VNode(\n    (\"vue-component-\" + (Ctor.cid) + (name ? (\"-\" + name) : '')),\n    data, undefined, undefined, undefined, context,\n    { Ctor: Ctor, propsData: propsData, listeners: listeners, tag: tag, children: children }\n  );\n  return vnode\n}\n\nfunction createFunctionalComponent (\n  Ctor,\n  propsData,\n  data,\n  context,\n  children\n) {\n  var props = {};\n  var propOptions = Ctor.options.props;\n  if (propOptions) {\n    for (var key in propOptions) {\n      props[key] = validateProp(key, propOptions, propsData);\n    }\n  }\n  // ensure the createElement function in functional components\n  // gets a unique context - this is necessary for correct named slot check\n  var _context = Object.create(context);\n  var h = function (a, b, c, d) { return createElement(_context, a, b, c, d, true); };\n  var vnode = Ctor.options.render.call(null, h, {\n    props: props,\n    data: data,\n    parent: context,\n    children: children,\n    slots: function () { return resolveSlots(children, context); }\n  });\n  if (vnode instanceof VNode) {\n    vnode.functionalContext = context;\n    if (data.slot) {\n      (vnode.data || (vnode.data = {})).slot = data.slot;\n    }\n  }\n  return vnode\n}\n\nfunction createComponentInstanceForVnode (\n  vnode, // we know it's MountedComponentVNode but flow doesn't\n  parent, // activeInstance in lifecycle state\n  parentElm,\n  refElm\n) {\n  var vnodeComponentOptions = vnode.componentOptions;\n  var options = {\n    _isComponent: true,\n    parent: parent,\n    propsData: vnodeComponentOptions.propsData,\n    _componentTag: vnodeComponentOptions.tag,\n    _parentVnode: vnode,\n    _parentListeners: vnodeComponentOptions.listeners,\n    _renderChildren: vnodeComponentOptions.children,\n    _parentElm: parentElm || null,\n    _refElm: refElm || null\n  };\n  // check inline-template render functions\n  var inlineTemplate = vnode.data.inlineTemplate;\n  if (inlineTemplate) {\n    options.render = inlineTemplate.render;\n    options.staticRenderFns = inlineTemplate.staticRenderFns;\n  }\n  return new vnodeComponentOptions.Ctor(options)\n}\n\nfunction resolveAsyncComponent (\n  factory,\n  baseCtor,\n  cb\n) {\n  if (factory.requested) {\n    // pool callbacks\n    factory.pendingCallbacks.push(cb);\n  } else {\n    factory.requested = true;\n    var cbs = factory.pendingCallbacks = [cb];\n    var sync = true;\n\n    var resolve = function (res) {\n      if (isObject(res)) {\n        res = baseCtor.extend(res);\n      }\n      // cache resolved\n      factory.resolved = res;\n      // invoke callbacks only if this is not a synchronous resolve\n      // (async resolves are shimmed as synchronous during SSR)\n      if (!sync) {\n        for (var i = 0, l = cbs.length; i < l; i++) {\n          cbs[i](res);\n        }\n      }\n    };\n\n    var reject = function (reason) {\n      \"development\" !== 'production' && warn(\n        \"Failed to resolve async component: \" + (String(factory)) +\n        (reason ? (\"\\nReason: \" + reason) : '')\n      );\n    };\n\n    var res = factory(resolve, reject);\n\n    // handle promise\n    if (res && typeof res.then === 'function' && !factory.resolved) {\n      res.then(resolve, reject);\n    }\n\n    sync = false;\n    // return in case resolved synchronously\n    return factory.resolved\n  }\n}\n\nfunction extractProps (data, Ctor, tag) {\n  // we are only extracting raw values here.\n  // validation and default values are handled in the child\n  // component itself.\n  var propOptions = Ctor.options.props;\n  if (!propOptions) {\n    return\n  }\n  var res = {};\n  var attrs = data.attrs;\n  var props = data.props;\n  var domProps = data.domProps;\n  if (attrs || props || domProps) {\n    for (var key in propOptions) {\n      var altKey = hyphenate(key);\n      {\n        var keyInLowerCase = key.toLowerCase();\n        if (\n          key !== keyInLowerCase &&\n          attrs && attrs.hasOwnProperty(keyInLowerCase)\n        ) {\n          tip(\n            \"Prop \\\"\" + keyInLowerCase + \"\\\" is passed to component \" +\n            (formatComponentName(tag || Ctor)) + \", but the declared prop name is\" +\n            \" \\\"\" + key + \"\\\". \" +\n            \"Note that HTML attributes are case-insensitive and camelCased \" +\n            \"props need to use their kebab-case equivalents when using in-DOM \" +\n            \"templates. You should probably use \\\"\" + altKey + \"\\\" instead of \\\"\" + key + \"\\\".\"\n          );\n        }\n      }\n      checkProp(res, props, key, altKey, true) ||\n      checkProp(res, attrs, key, altKey) ||\n      checkProp(res, domProps, key, altKey);\n    }\n  }\n  return res\n}\n\nfunction checkProp (\n  res,\n  hash,\n  key,\n  altKey,\n  preserve\n) {\n  if (hash) {\n    if (hasOwn(hash, key)) {\n      res[key] = hash[key];\n      if (!preserve) {\n        delete hash[key];\n      }\n      return true\n    } else if (hasOwn(hash, altKey)) {\n      res[key] = hash[altKey];\n      if (!preserve) {\n        delete hash[altKey];\n      }\n      return true\n    }\n  }\n  return false\n}\n\nfunction mergeHooks (data) {\n  if (!data.hook) {\n    data.hook = {};\n  }\n  for (var i = 0; i < hooksToMerge.length; i++) {\n    var key = hooksToMerge[i];\n    var fromParent = data.hook[key];\n    var ours = componentVNodeHooks[key];\n    data.hook[key] = fromParent ? mergeHook$1(ours, fromParent) : ours;\n  }\n}\n\nfunction mergeHook$1 (one, two) {\n  return function (a, b, c, d) {\n    one(a, b, c, d);\n    two(a, b, c, d);\n  }\n}\n\n// transform component v-model info (value and callback) into\n// prop and event handler respectively.\nfunction transformModel (options, data) {\n  var prop = (options.model && options.model.prop) || 'value';\n  var event = (options.model && options.model.event) || 'input';(data.props || (data.props = {}))[prop] = data.model.value;\n  var on = data.on || (data.on = {});\n  if (on[event]) {\n    on[event] = [data.model.callback].concat(on[event]);\n  } else {\n    on[event] = data.model.callback;\n  }\n}\n\n/*  */\n\nvar SIMPLE_NORMALIZE = 1;\nvar ALWAYS_NORMALIZE = 2;\n\n// wrapper function for providing a more flexible interface\n// without getting yelled at by flow\nfunction createElement (\n  context,\n  tag,\n  data,\n  children,\n  normalizationType,\n  alwaysNormalize\n) {\n  if (Array.isArray(data) || isPrimitive(data)) {\n    normalizationType = children;\n    children = data;\n    data = undefined;\n  }\n  if (alwaysNormalize) { normalizationType = ALWAYS_NORMALIZE; }\n  return _createElement(context, tag, data, children, normalizationType)\n}\n\nfunction _createElement (\n  context,\n  tag,\n  data,\n  children,\n  normalizationType\n) {\n  if (data && data.__ob__) {\n    \"development\" !== 'production' && warn(\n      \"Avoid using observed data object as vnode data: \" + (JSON.stringify(data)) + \"\\n\" +\n      'Always create fresh vnode data objects in each render!',\n      context\n    );\n    return createEmptyVNode()\n  }\n  if (!tag) {\n    // in case of component :is set to falsy value\n    return createEmptyVNode()\n  }\n  // support single function children as default scoped slot\n  if (Array.isArray(children) &&\n      typeof children[0] === 'function') {\n    data = data || {};\n    data.scopedSlots = { default: children[0] };\n    children.length = 0;\n  }\n  if (normalizationType === ALWAYS_NORMALIZE) {\n    children = normalizeChildren(children);\n  } else if (normalizationType === SIMPLE_NORMALIZE) {\n    children = simpleNormalizeChildren(children);\n  }\n  var vnode, ns;\n  if (typeof tag === 'string') {\n    var Ctor;\n    ns = config.getTagNamespace(tag);\n    if (config.isReservedTag(tag)) {\n      // platform built-in elements\n      vnode = new VNode(\n        config.parsePlatformTagName(tag), data, children,\n        undefined, undefined, context\n      );\n    } else if ((Ctor = resolveAsset(context.$options, 'components', tag))) {\n      // component\n      vnode = createComponent(Ctor, data, context, children, tag);\n    } else {\n      // unknown or unlisted namespaced elements\n      // check at runtime because it may get assigned a namespace when its\n      // parent normalizes children\n      vnode = new VNode(\n        tag, data, children,\n        undefined, undefined, context\n      );\n    }\n  } else {\n    // direct component options / constructor\n    vnode = createComponent(tag, data, context, children);\n  }\n  if (vnode) {\n    if (ns) { applyNS(vnode, ns); }\n    return vnode\n  } else {\n    return createEmptyVNode()\n  }\n}\n\nfunction applyNS (vnode, ns) {\n  vnode.ns = ns;\n  if (vnode.tag === 'foreignObject') {\n    // use default namespace inside foreignObject\n    return\n  }\n  if (vnode.children) {\n    for (var i = 0, l = vnode.children.length; i < l; i++) {\n      var child = vnode.children[i];\n      if (child.tag && !child.ns) {\n        applyNS(child, ns);\n      }\n    }\n  }\n}\n\n/*  */\n\n/**\n * Runtime helper for rendering v-for lists.\n */\nfunction renderList (\n  val,\n  render\n) {\n  var ret, i, l, keys, key;\n  if (Array.isArray(val) || typeof val === 'string') {\n    ret = new Array(val.length);\n    for (i = 0, l = val.length; i < l; i++) {\n      ret[i] = render(val[i], i);\n    }\n  } else if (typeof val === 'number') {\n    ret = new Array(val);\n    for (i = 0; i < val; i++) {\n      ret[i] = render(i + 1, i);\n    }\n  } else if (isObject(val)) {\n    keys = Object.keys(val);\n    ret = new Array(keys.length);\n    for (i = 0, l = keys.length; i < l; i++) {\n      key = keys[i];\n      ret[i] = render(val[key], key, i);\n    }\n  }\n  return ret\n}\n\n/*  */\n\n/**\n * Runtime helper for rendering <slot>\n */\nfunction renderSlot (\n  name,\n  fallback,\n  props,\n  bindObject\n) {\n  var scopedSlotFn = this.$scopedSlots[name];\n  if (scopedSlotFn) { // scoped slot\n    props = props || {};\n    if (bindObject) {\n      extend(props, bindObject);\n    }\n    return scopedSlotFn(props) || fallback\n  } else {\n    var slotNodes = this.$slots[name];\n    // warn duplicate slot usage\n    if (slotNodes && \"development\" !== 'production') {\n      slotNodes._rendered && warn(\n        \"Duplicate presence of slot \\\"\" + name + \"\\\" found in the same render tree \" +\n        \"- this will likely cause render errors.\",\n        this\n      );\n      slotNodes._rendered = true;\n    }\n    return slotNodes || fallback\n  }\n}\n\n/*  */\n\n/**\n * Runtime helper for resolving filters\n */\nfunction resolveFilter (id) {\n  return resolveAsset(this.$options, 'filters', id, true) || identity\n}\n\n/*  */\n\n/**\n * Runtime helper for checking keyCodes from config.\n */\nfunction checkKeyCodes (\n  eventKeyCode,\n  key,\n  builtInAlias\n) {\n  var keyCodes = config.keyCodes[key] || builtInAlias;\n  if (Array.isArray(keyCodes)) {\n    return keyCodes.indexOf(eventKeyCode) === -1\n  } else {\n    return keyCodes !== eventKeyCode\n  }\n}\n\n/*  */\n\n/**\n * Runtime helper for merging v-bind=\"object\" into a VNode's data.\n */\nfunction bindObjectProps (\n  data,\n  tag,\n  value,\n  asProp\n) {\n  if (value) {\n    if (!isObject(value)) {\n      \"development\" !== 'production' && warn(\n        'v-bind without argument expects an Object or Array value',\n        this\n      );\n    } else {\n      if (Array.isArray(value)) {\n        value = toObject(value);\n      }\n      var hash;\n      for (var key in value) {\n        if (key === 'class' || key === 'style') {\n          hash = data;\n        } else {\n          var type = data.attrs && data.attrs.type;\n          hash = asProp || config.mustUseProp(tag, type, key)\n            ? data.domProps || (data.domProps = {})\n            : data.attrs || (data.attrs = {});\n        }\n        if (!(key in hash)) {\n          hash[key] = value[key];\n        }\n      }\n    }\n  }\n  return data\n}\n\n/*  */\n\n/**\n * Runtime helper for rendering static trees.\n */\nfunction renderStatic (\n  index,\n  isInFor\n) {\n  var tree = this._staticTrees[index];\n  // if has already-rendered static tree and not inside v-for,\n  // we can reuse the same tree by doing a shallow clone.\n  if (tree && !isInFor) {\n    return Array.isArray(tree)\n      ? cloneVNodes(tree)\n      : cloneVNode(tree)\n  }\n  // otherwise, render a fresh tree.\n  tree = this._staticTrees[index] =\n    this.$options.staticRenderFns[index].call(this._renderProxy);\n  markStatic(tree, (\"__static__\" + index), false);\n  return tree\n}\n\n/**\n * Runtime helper for v-once.\n * Effectively it means marking the node as static with a unique key.\n */\nfunction markOnce (\n  tree,\n  index,\n  key\n) {\n  markStatic(tree, (\"__once__\" + index + (key ? (\"_\" + key) : \"\")), true);\n  return tree\n}\n\nfunction markStatic (\n  tree,\n  key,\n  isOnce\n) {\n  if (Array.isArray(tree)) {\n    for (var i = 0; i < tree.length; i++) {\n      if (tree[i] && typeof tree[i] !== 'string') {\n        markStaticNode(tree[i], (key + \"_\" + i), isOnce);\n      }\n    }\n  } else {\n    markStaticNode(tree, key, isOnce);\n  }\n}\n\nfunction markStaticNode (node, key, isOnce) {\n  node.isStatic = true;\n  node.key = key;\n  node.isOnce = isOnce;\n}\n\n/*  */\n\nfunction initRender (vm) {\n  vm.$vnode = null; // the placeholder node in parent tree\n  vm._vnode = null; // the root of the child tree\n  vm._staticTrees = null;\n  var parentVnode = vm.$options._parentVnode;\n  var renderContext = parentVnode && parentVnode.context;\n  vm.$slots = resolveSlots(vm.$options._renderChildren, renderContext);\n  vm.$scopedSlots = emptyObject;\n  // bind the createElement fn to this instance\n  // so that we get proper render context inside it.\n  // args order: tag, data, children, normalizationType, alwaysNormalize\n  // internal version is used by render functions compiled from templates\n  vm._c = function (a, b, c, d) { return createElement(vm, a, b, c, d, false); };\n  // normalization is always applied for the public version, used in\n  // user-written render functions.\n  vm.$createElement = function (a, b, c, d) { return createElement(vm, a, b, c, d, true); };\n}\n\nfunction renderMixin (Vue) {\n  Vue.prototype.$nextTick = function (fn) {\n    return nextTick(fn, this)\n  };\n\n  Vue.prototype._render = function () {\n    var vm = this;\n    var ref = vm.$options;\n    var render = ref.render;\n    var staticRenderFns = ref.staticRenderFns;\n    var _parentVnode = ref._parentVnode;\n\n    if (vm._isMounted) {\n      // clone slot nodes on re-renders\n      for (var key in vm.$slots) {\n        vm.$slots[key] = cloneVNodes(vm.$slots[key]);\n      }\n    }\n\n    vm.$scopedSlots = (_parentVnode && _parentVnode.data.scopedSlots) || emptyObject;\n\n    if (staticRenderFns && !vm._staticTrees) {\n      vm._staticTrees = [];\n    }\n    // set parent vnode. this allows render functions to have access\n    // to the data on the placeholder node.\n    vm.$vnode = _parentVnode;\n    // render self\n    var vnode;\n    try {\n      vnode = render.call(vm._renderProxy, vm.$createElement);\n    } catch (e) {\n      handleError(e, vm, \"render function\");\n      // return error render result,\n      // or previous vnode to prevent render error causing blank component\n      /* istanbul ignore else */\n      {\n        vnode = vm.$options.renderError\n          ? vm.$options.renderError.call(vm._renderProxy, vm.$createElement, e)\n          : vm._vnode;\n      }\n    }\n    // return empty vnode in case the render function errored out\n    if (!(vnode instanceof VNode)) {\n      if (\"development\" !== 'production' && Array.isArray(vnode)) {\n        warn(\n          'Multiple root nodes returned from render function. Render function ' +\n          'should return a single root node.',\n          vm\n        );\n      }\n      vnode = createEmptyVNode();\n    }\n    // set parent\n    vnode.parent = _parentVnode;\n    return vnode\n  };\n\n  // internal render helpers.\n  // these are exposed on the instance prototype to reduce generated render\n  // code size.\n  Vue.prototype._o = markOnce;\n  Vue.prototype._n = toNumber;\n  Vue.prototype._s = _toString;\n  Vue.prototype._l = renderList;\n  Vue.prototype._t = renderSlot;\n  Vue.prototype._q = looseEqual;\n  Vue.prototype._i = looseIndexOf;\n  Vue.prototype._m = renderStatic;\n  Vue.prototype._f = resolveFilter;\n  Vue.prototype._k = checkKeyCodes;\n  Vue.prototype._b = bindObjectProps;\n  Vue.prototype._v = createTextVNode;\n  Vue.prototype._e = createEmptyVNode;\n  Vue.prototype._u = resolveScopedSlots;\n}\n\n/*  */\n\nfunction initProvide (vm) {\n  var provide = vm.$options.provide;\n  if (provide) {\n    vm._provided = typeof provide === 'function'\n      ? provide.call(vm)\n      : provide;\n  }\n}\n\nfunction initInjections (vm) {\n  var inject = vm.$options.inject;\n  if (inject) {\n    // inject is :any because flow is not smart enough to figure out cached\n    // isArray here\n    var isArray = Array.isArray(inject);\n    var keys = isArray\n      ? inject\n      : hasSymbol\n        ? Reflect.ownKeys(inject)\n        : Object.keys(inject);\n\n    var loop = function ( i ) {\n      var key = keys[i];\n      var provideKey = isArray ? key : inject[key];\n      var source = vm;\n      while (source) {\n        if (source._provided && provideKey in source._provided) {\n          /* istanbul ignore else */\n          {\n            defineReactive$$1(vm, key, source._provided[provideKey], function () {\n              warn(\n                \"Avoid mutating an injected value directly since the changes will be \" +\n                \"overwritten whenever the provided component re-renders. \" +\n                \"injection being mutated: \\\"\" + key + \"\\\"\",\n                vm\n              );\n            });\n          }\n          break\n        }\n        source = source.$parent;\n      }\n    };\n\n    for (var i = 0; i < keys.length; i++) loop( i );\n  }\n}\n\n/*  */\n\nvar uid = 0;\n\nfunction initMixin (Vue) {\n  Vue.prototype._init = function (options) {\n    var vm = this;\n    // a uid\n    vm._uid = uid++;\n\n    var startTag, endTag;\n    /* istanbul ignore if */\n    if (\"development\" !== 'production' && config.performance && mark) {\n      startTag = \"vue-perf-init:\" + (vm._uid);\n      endTag = \"vue-perf-end:\" + (vm._uid);\n      mark(startTag);\n    }\n\n    // a flag to avoid this being observed\n    vm._isVue = true;\n    // merge options\n    if (options && options._isComponent) {\n      // optimize internal component instantiation\n      // since dynamic options merging is pretty slow, and none of the\n      // internal component options needs special treatment.\n      initInternalComponent(vm, options);\n    } else {\n      vm.$options = mergeOptions(\n        resolveConstructorOptions(vm.constructor),\n        options || {},\n        vm\n      );\n    }\n    /* istanbul ignore else */\n    {\n      initProxy(vm);\n    }\n    // expose real self\n    vm._self = vm;\n    initLifecycle(vm);\n    initEvents(vm);\n    initRender(vm);\n    callHook(vm, 'beforeCreate');\n    initInjections(vm); // resolve injections before data/props\n    initState(vm);\n    initProvide(vm); // resolve provide after data/props\n    callHook(vm, 'created');\n\n    /* istanbul ignore if */\n    if (\"development\" !== 'production' && config.performance && mark) {\n      vm._name = formatComponentName(vm, false);\n      mark(endTag);\n      measure(((vm._name) + \" init\"), startTag, endTag);\n    }\n\n    if (vm.$options.el) {\n      vm.$mount(vm.$options.el);\n    }\n  };\n}\n\nfunction initInternalComponent (vm, options) {\n  var opts = vm.$options = Object.create(vm.constructor.options);\n  // doing this because it's faster than dynamic enumeration.\n  opts.parent = options.parent;\n  opts.propsData = options.propsData;\n  opts._parentVnode = options._parentVnode;\n  opts._parentListeners = options._parentListeners;\n  opts._renderChildren = options._renderChildren;\n  opts._componentTag = options._componentTag;\n  opts._parentElm = options._parentElm;\n  opts._refElm = options._refElm;\n  if (options.render) {\n    opts.render = options.render;\n    opts.staticRenderFns = options.staticRenderFns;\n  }\n}\n\nfunction resolveConstructorOptions (Ctor) {\n  var options = Ctor.options;\n  if (Ctor.super) {\n    var superOptions = resolveConstructorOptions(Ctor.super);\n    var cachedSuperOptions = Ctor.superOptions;\n    if (superOptions !== cachedSuperOptions) {\n      // super option changed,\n      // need to resolve new options.\n      Ctor.superOptions = superOptions;\n      // check if there are any late-modified/attached options (#4976)\n      var modifiedOptions = resolveModifiedOptions(Ctor);\n      // update base extend options\n      if (modifiedOptions) {\n        extend(Ctor.extendOptions, modifiedOptions);\n      }\n      options = Ctor.options = mergeOptions(superOptions, Ctor.extendOptions);\n      if (options.name) {\n        options.components[options.name] = Ctor;\n      }\n    }\n  }\n  return options\n}\n\nfunction resolveModifiedOptions (Ctor) {\n  var modified;\n  var latest = Ctor.options;\n  var sealed = Ctor.sealedOptions;\n  for (var key in latest) {\n    if (latest[key] !== sealed[key]) {\n      if (!modified) { modified = {}; }\n      modified[key] = dedupe(latest[key], sealed[key]);\n    }\n  }\n  return modified\n}\n\nfunction dedupe (latest, sealed) {\n  // compare latest and sealed to ensure lifecycle hooks won't be duplicated\n  // between merges\n  if (Array.isArray(latest)) {\n    var res = [];\n    sealed = Array.isArray(sealed) ? sealed : [sealed];\n    for (var i = 0; i < latest.length; i++) {\n      if (sealed.indexOf(latest[i]) < 0) {\n        res.push(latest[i]);\n      }\n    }\n    return res\n  } else {\n    return latest\n  }\n}\n\nfunction Vue$2 (options) {\n  if (\"development\" !== 'production' &&\n    !(this instanceof Vue$2)) {\n    warn('Vue is a constructor and should be called with the `new` keyword');\n  }\n  this._init(options);\n}\n\ninitMixin(Vue$2);\nstateMixin(Vue$2);\neventsMixin(Vue$2);\nlifecycleMixin(Vue$2);\nrenderMixin(Vue$2);\n\n/*  */\n\nfunction initUse (Vue) {\n  Vue.use = function (plugin) {\n    /* istanbul ignore if */\n    if (plugin.installed) {\n      return\n    }\n    // additional parameters\n    var args = toArray(arguments, 1);\n    args.unshift(this);\n    if (typeof plugin.install === 'function') {\n      plugin.install.apply(plugin, args);\n    } else if (typeof plugin === 'function') {\n      plugin.apply(null, args);\n    }\n    plugin.installed = true;\n    return this\n  };\n}\n\n/*  */\n\nfunction initMixin$1 (Vue) {\n  Vue.mixin = function (mixin) {\n    this.options = mergeOptions(this.options, mixin);\n  };\n}\n\n/*  */\n\nfunction initExtend (Vue) {\n  /**\n   * Each instance constructor, including Vue, has a unique\n   * cid. This enables us to create wrapped \"child\n   * constructors\" for prototypal inheritance and cache them.\n   */\n  Vue.cid = 0;\n  var cid = 1;\n\n  /**\n   * Class inheritance\n   */\n  Vue.extend = function (extendOptions) {\n    extendOptions = extendOptions || {};\n    var Super = this;\n    var SuperId = Super.cid;\n    var cachedCtors = extendOptions._Ctor || (extendOptions._Ctor = {});\n    if (cachedCtors[SuperId]) {\n      return cachedCtors[SuperId]\n    }\n\n    var name = extendOptions.name || Super.options.name;\n    {\n      if (!/^[a-zA-Z][\\w-]*$/.test(name)) {\n        warn(\n          'Invalid component name: \"' + name + '\". Component names ' +\n          'can only contain alphanumeric characters and the hyphen, ' +\n          'and must start with a letter.'\n        );\n      }\n    }\n\n    var Sub = function VueComponent (options) {\n      this._init(options);\n    };\n    Sub.prototype = Object.create(Super.prototype);\n    Sub.prototype.constructor = Sub;\n    Sub.cid = cid++;\n    Sub.options = mergeOptions(\n      Super.options,\n      extendOptions\n    );\n    Sub['super'] = Super;\n\n    // For props and computed properties, we define the proxy getters on\n    // the Vue instances at extension time, on the extended prototype. This\n    // avoids Object.defineProperty calls for each instance created.\n    if (Sub.options.props) {\n      initProps$1(Sub);\n    }\n    if (Sub.options.computed) {\n      initComputed$1(Sub);\n    }\n\n    // allow further extension/mixin/plugin usage\n    Sub.extend = Super.extend;\n    Sub.mixin = Super.mixin;\n    Sub.use = Super.use;\n\n    // create asset registers, so extended classes\n    // can have their private assets too.\n    config._assetTypes.forEach(function (type) {\n      Sub[type] = Super[type];\n    });\n    // enable recursive self-lookup\n    if (name) {\n      Sub.options.components[name] = Sub;\n    }\n\n    // keep a reference to the super options at extension time.\n    // later at instantiation we can check if Super's options have\n    // been updated.\n    Sub.superOptions = Super.options;\n    Sub.extendOptions = extendOptions;\n    Sub.sealedOptions = extend({}, Sub.options);\n\n    // cache constructor\n    cachedCtors[SuperId] = Sub;\n    return Sub\n  };\n}\n\nfunction initProps$1 (Comp) {\n  var props = Comp.options.props;\n  for (var key in props) {\n    proxy(Comp.prototype, \"_props\", key);\n  }\n}\n\nfunction initComputed$1 (Comp) {\n  var computed = Comp.options.computed;\n  for (var key in computed) {\n    defineComputed(Comp.prototype, key, computed[key]);\n  }\n}\n\n/*  */\n\nfunction initAssetRegisters (Vue) {\n  /**\n   * Create asset registration methods.\n   */\n  config._assetTypes.forEach(function (type) {\n    Vue[type] = function (\n      id,\n      definition\n    ) {\n      if (!definition) {\n        return this.options[type + 's'][id]\n      } else {\n        /* istanbul ignore if */\n        {\n          if (type === 'component' && config.isReservedTag(id)) {\n            warn(\n              'Do not use built-in or reserved HTML elements as component ' +\n              'id: ' + id\n            );\n          }\n        }\n        if (type === 'component' && isPlainObject(definition)) {\n          definition.name = definition.name || id;\n          definition = this.options._base.extend(definition);\n        }\n        if (type === 'directive' && typeof definition === 'function') {\n          definition = { bind: definition, update: definition };\n        }\n        this.options[type + 's'][id] = definition;\n        return definition\n      }\n    };\n  });\n}\n\n/*  */\n\nvar patternTypes = [String, RegExp];\n\nfunction getComponentName (opts) {\n  return opts && (opts.Ctor.options.name || opts.tag)\n}\n\nfunction matches (pattern, name) {\n  if (typeof pattern === 'string') {\n    return pattern.split(',').indexOf(name) > -1\n  } else if (pattern instanceof RegExp) {\n    return pattern.test(name)\n  }\n  /* istanbul ignore next */\n  return false\n}\n\nfunction pruneCache (cache, filter) {\n  for (var key in cache) {\n    var cachedNode = cache[key];\n    if (cachedNode) {\n      var name = getComponentName(cachedNode.componentOptions);\n      if (name && !filter(name)) {\n        pruneCacheEntry(cachedNode);\n        cache[key] = null;\n      }\n    }\n  }\n}\n\nfunction pruneCacheEntry (vnode) {\n  if (vnode) {\n    if (!vnode.componentInstance._inactive) {\n      callHook(vnode.componentInstance, 'deactivated');\n    }\n    vnode.componentInstance.$destroy();\n  }\n}\n\nvar KeepAlive = {\n  name: 'keep-alive',\n  abstract: true,\n\n  props: {\n    include: patternTypes,\n    exclude: patternTypes\n  },\n\n  created: function created () {\n    this.cache = Object.create(null);\n  },\n\n  destroyed: function destroyed () {\n    var this$1 = this;\n\n    for (var key in this$1.cache) {\n      pruneCacheEntry(this$1.cache[key]);\n    }\n  },\n\n  watch: {\n    include: function include (val) {\n      pruneCache(this.cache, function (name) { return matches(val, name); });\n    },\n    exclude: function exclude (val) {\n      pruneCache(this.cache, function (name) { return !matches(val, name); });\n    }\n  },\n\n  render: function render () {\n    var vnode = getFirstComponentChild(this.$slots.default);\n    var componentOptions = vnode && vnode.componentOptions;\n    if (componentOptions) {\n      // check pattern\n      var name = getComponentName(componentOptions);\n      if (name && (\n        (this.include && !matches(this.include, name)) ||\n        (this.exclude && matches(this.exclude, name))\n      )) {\n        return vnode\n      }\n      var key = vnode.key == null\n        // same constructor may get registered as different local components\n        // so cid alone is not enough (#3269)\n        ? componentOptions.Ctor.cid + (componentOptions.tag ? (\"::\" + (componentOptions.tag)) : '')\n        : vnode.key;\n      if (this.cache[key]) {\n        vnode.componentInstance = this.cache[key].componentInstance;\n      } else {\n        this.cache[key] = vnode;\n      }\n      vnode.data.keepAlive = true;\n    }\n    return vnode\n  }\n};\n\nvar builtInComponents = {\n  KeepAlive: KeepAlive\n};\n\n/*  */\n\nfunction initGlobalAPI (Vue) {\n  // config\n  var configDef = {};\n  configDef.get = function () { return config; };\n  {\n    configDef.set = function () {\n      warn(\n        'Do not replace the Vue.config object, set individual fields instead.'\n      );\n    };\n  }\n  Object.defineProperty(Vue, 'config', configDef);\n\n  // exposed util methods.\n  // NOTE: these are not considered part of the public API - avoid relying on\n  // them unless you are aware of the risk.\n  Vue.util = {\n    warn: warn,\n    extend: extend,\n    mergeOptions: mergeOptions,\n    defineReactive: defineReactive$$1\n  };\n\n  Vue.set = set;\n  Vue.delete = del;\n  Vue.nextTick = nextTick;\n\n  Vue.options = Object.create(null);\n  config._assetTypes.forEach(function (type) {\n    Vue.options[type + 's'] = Object.create(null);\n  });\n\n  // this is used to identify the \"base\" constructor to extend all plain-object\n  // components with in Weex's multi-instance scenarios.\n  Vue.options._base = Vue;\n\n  extend(Vue.options.components, builtInComponents);\n\n  initUse(Vue);\n  initMixin$1(Vue);\n  initExtend(Vue);\n  initAssetRegisters(Vue);\n}\n\ninitGlobalAPI(Vue$2);\n\nObject.defineProperty(Vue$2.prototype, '$isServer', {\n  get: isServerRendering\n});\n\nVue$2.version = '2.2.6';\n\n/*  */\n\n// attributes that should be using props for binding\nvar acceptValue = makeMap('input,textarea,option,select');\nvar mustUseProp = function (tag, type, attr) {\n  return (\n    (attr === 'value' && acceptValue(tag)) && type !== 'button' ||\n    (attr === 'selected' && tag === 'option') ||\n    (attr === 'checked' && tag === 'input') ||\n    (attr === 'muted' && tag === 'video')\n  )\n};\n\nvar isEnumeratedAttr = makeMap('contenteditable,draggable,spellcheck');\n\nvar isBooleanAttr = makeMap(\n  'allowfullscreen,async,autofocus,autoplay,checked,compact,controls,declare,' +\n  'default,defaultchecked,defaultmuted,defaultselected,defer,disabled,' +\n  'enabled,formnovalidate,hidden,indeterminate,inert,ismap,itemscope,loop,multiple,' +\n  'muted,nohref,noresize,noshade,novalidate,nowrap,open,pauseonexit,readonly,' +\n  'required,reversed,scoped,seamless,selected,sortable,translate,' +\n  'truespeed,typemustmatch,visible'\n);\n\nvar xlinkNS = 'http://www.w3.org/1999/xlink';\n\nvar isXlink = function (name) {\n  return name.charAt(5) === ':' && name.slice(0, 5) === 'xlink'\n};\n\nvar getXlinkProp = function (name) {\n  return isXlink(name) ? name.slice(6, name.length) : ''\n};\n\nvar isFalsyAttrValue = function (val) {\n  return val == null || val === false\n};\n\n/*  */\n\nfunction genClassForVnode (vnode) {\n  var data = vnode.data;\n  var parentNode = vnode;\n  var childNode = vnode;\n  while (childNode.componentInstance) {\n    childNode = childNode.componentInstance._vnode;\n    if (childNode.data) {\n      data = mergeClassData(childNode.data, data);\n    }\n  }\n  while ((parentNode = parentNode.parent)) {\n    if (parentNode.data) {\n      data = mergeClassData(data, parentNode.data);\n    }\n  }\n  return genClassFromData(data)\n}\n\nfunction mergeClassData (child, parent) {\n  return {\n    staticClass: concat(child.staticClass, parent.staticClass),\n    class: child.class\n      ? [child.class, parent.class]\n      : parent.class\n  }\n}\n\nfunction genClassFromData (data) {\n  var dynamicClass = data.class;\n  var staticClass = data.staticClass;\n  if (staticClass || dynamicClass) {\n    return concat(staticClass, stringifyClass(dynamicClass))\n  }\n  /* istanbul ignore next */\n  return ''\n}\n\nfunction concat (a, b) {\n  return a ? b ? (a + ' ' + b) : a : (b || '')\n}\n\nfunction stringifyClass (value) {\n  var res = '';\n  if (!value) {\n    return res\n  }\n  if (typeof value === 'string') {\n    return value\n  }\n  if (Array.isArray(value)) {\n    var stringified;\n    for (var i = 0, l = value.length; i < l; i++) {\n      if (value[i]) {\n        if ((stringified = stringifyClass(value[i]))) {\n          res += stringified + ' ';\n        }\n      }\n    }\n    return res.slice(0, -1)\n  }\n  if (isObject(value)) {\n    for (var key in value) {\n      if (value[key]) { res += key + ' '; }\n    }\n    return res.slice(0, -1)\n  }\n  /* istanbul ignore next */\n  return res\n}\n\n/*  */\n\nvar namespaceMap = {\n  svg: 'http://www.w3.org/2000/svg',\n  math: 'http://www.w3.org/1998/Math/MathML'\n};\n\nvar isHTMLTag = makeMap(\n  'html,body,base,head,link,meta,style,title,' +\n  'address,article,aside,footer,header,h1,h2,h3,h4,h5,h6,hgroup,nav,section,' +\n  'div,dd,dl,dt,figcaption,figure,hr,img,li,main,ol,p,pre,ul,' +\n  'a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,rtc,ruby,' +\n  's,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,' +\n  'embed,object,param,source,canvas,script,noscript,del,ins,' +\n  'caption,col,colgroup,table,thead,tbody,td,th,tr,' +\n  'button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,' +\n  'output,progress,select,textarea,' +\n  'details,dialog,menu,menuitem,summary,' +\n  'content,element,shadow,template'\n);\n\n// this map is intentionally selective, only covering SVG elements that may\n// contain child elements.\nvar isSVG = makeMap(\n  'svg,animate,circle,clippath,cursor,defs,desc,ellipse,filter,font-face,' +\n  'foreignObject,g,glyph,image,line,marker,mask,missing-glyph,path,pattern,' +\n  'polygon,polyline,rect,switch,symbol,text,textpath,tspan,use,view',\n  true\n);\n\n\n\nvar isReservedTag = function (tag) {\n  return isHTMLTag(tag) || isSVG(tag)\n};\n\nfunction getTagNamespace (tag) {\n  if (isSVG(tag)) {\n    return 'svg'\n  }\n  // basic support for MathML\n  // note it doesn't support other MathML elements being component roots\n  if (tag === 'math') {\n    return 'math'\n  }\n}\n\nvar unknownElementCache = Object.create(null);\nfunction isUnknownElement (tag) {\n  /* istanbul ignore if */\n  if (!inBrowser) {\n    return true\n  }\n  if (isReservedTag(tag)) {\n    return false\n  }\n  tag = tag.toLowerCase();\n  /* istanbul ignore if */\n  if (unknownElementCache[tag] != null) {\n    return unknownElementCache[tag]\n  }\n  var el = document.createElement(tag);\n  if (tag.indexOf('-') > -1) {\n    // http://stackoverflow.com/a/28210364/1070244\n    return (unknownElementCache[tag] = (\n      el.constructor === window.HTMLUnknownElement ||\n      el.constructor === window.HTMLElement\n    ))\n  } else {\n    return (unknownElementCache[tag] = /HTMLUnknownElement/.test(el.toString()))\n  }\n}\n\n/*  */\n\n/**\n * Query an element selector if it's not an element already.\n */\nfunction query (el) {\n  if (typeof el === 'string') {\n    var selected = document.querySelector(el);\n    if (!selected) {\n      \"development\" !== 'production' && warn(\n        'Cannot find element: ' + el\n      );\n      return document.createElement('div')\n    }\n    return selected\n  } else {\n    return el\n  }\n}\n\n/*  */\n\nfunction createElement$1 (tagName, vnode) {\n  var elm = document.createElement(tagName);\n  if (tagName !== 'select') {\n    return elm\n  }\n  // false or null will remove the attribute but undefined will not\n  if (vnode.data && vnode.data.attrs && vnode.data.attrs.multiple !== undefined) {\n    elm.setAttribute('multiple', 'multiple');\n  }\n  return elm\n}\n\nfunction createElementNS (namespace, tagName) {\n  return document.createElementNS(namespaceMap[namespace], tagName)\n}\n\nfunction createTextNode (text) {\n  return document.createTextNode(text)\n}\n\nfunction createComment (text) {\n  return document.createComment(text)\n}\n\nfunction insertBefore (parentNode, newNode, referenceNode) {\n  parentNode.insertBefore(newNode, referenceNode);\n}\n\nfunction removeChild (node, child) {\n  node.removeChild(child);\n}\n\nfunction appendChild (node, child) {\n  node.appendChild(child);\n}\n\nfunction parentNode (node) {\n  return node.parentNode\n}\n\nfunction nextSibling (node) {\n  return node.nextSibling\n}\n\nfunction tagName (node) {\n  return node.tagName\n}\n\nfunction setTextContent (node, text) {\n  node.textContent = text;\n}\n\nfunction setAttribute (node, key, val) {\n  node.setAttribute(key, val);\n}\n\n\nvar nodeOps = Object.freeze({\n\tcreateElement: createElement$1,\n\tcreateElementNS: createElementNS,\n\tcreateTextNode: createTextNode,\n\tcreateComment: createComment,\n\tinsertBefore: insertBefore,\n\tremoveChild: removeChild,\n\tappendChild: appendChild,\n\tparentNode: parentNode,\n\tnextSibling: nextSibling,\n\ttagName: tagName,\n\tsetTextContent: setTextContent,\n\tsetAttribute: setAttribute\n});\n\n/*  */\n\nvar ref = {\n  create: function create (_, vnode) {\n    registerRef(vnode);\n  },\n  update: function update (oldVnode, vnode) {\n    if (oldVnode.data.ref !== vnode.data.ref) {\n      registerRef(oldVnode, true);\n      registerRef(vnode);\n    }\n  },\n  destroy: function destroy (vnode) {\n    registerRef(vnode, true);\n  }\n};\n\nfunction registerRef (vnode, isRemoval) {\n  var key = vnode.data.ref;\n  if (!key) { return }\n\n  var vm = vnode.context;\n  var ref = vnode.componentInstance || vnode.elm;\n  var refs = vm.$refs;\n  if (isRemoval) {\n    if (Array.isArray(refs[key])) {\n      remove(refs[key], ref);\n    } else if (refs[key] === ref) {\n      refs[key] = undefined;\n    }\n  } else {\n    if (vnode.data.refInFor) {\n      if (Array.isArray(refs[key]) && refs[key].indexOf(ref) < 0) {\n        refs[key].push(ref);\n      } else {\n        refs[key] = [ref];\n      }\n    } else {\n      refs[key] = ref;\n    }\n  }\n}\n\n/**\n * Virtual DOM patching algorithm based on Snabbdom by\n * Simon Friis Vindum (@paldepind)\n * Licensed under the MIT License\n * https://github.com/paldepind/snabbdom/blob/master/LICENSE\n *\n * modified by Evan You (@yyx990803)\n *\n\n/*\n * Not type-checking this because this file is perf-critical and the cost\n * of making flow understand it is not worth it.\n */\n\nvar emptyNode = new VNode('', {}, []);\n\nvar hooks = ['create', 'activate', 'update', 'remove', 'destroy'];\n\nfunction isUndef (v) {\n  return v === undefined || v === null\n}\n\nfunction isDef (v) {\n  return v !== undefined && v !== null\n}\n\nfunction isTrue (v) {\n  return v === true\n}\n\nfunction sameVnode (a, b) {\n  return (\n    a.key === b.key &&\n    a.tag === b.tag &&\n    a.isComment === b.isComment &&\n    isDef(a.data) === isDef(b.data) &&\n    sameInputType(a, b)\n  )\n}\n\n// Some browsers do not support dynamically changing type for <input>\n// so they need to be treated as different nodes\nfunction sameInputType (a, b) {\n  if (a.tag !== 'input') { return true }\n  var i;\n  var typeA = isDef(i = a.data) && isDef(i = i.attrs) && i.type;\n  var typeB = isDef(i = b.data) && isDef(i = i.attrs) && i.type;\n  return typeA === typeB\n}\n\nfunction createKeyToOldIdx (children, beginIdx, endIdx) {\n  var i, key;\n  var map = {};\n  for (i = beginIdx; i <= endIdx; ++i) {\n    key = children[i].key;\n    if (isDef(key)) { map[key] = i; }\n  }\n  return map\n}\n\nfunction createPatchFunction (backend) {\n  var i, j;\n  var cbs = {};\n\n  var modules = backend.modules;\n  var nodeOps = backend.nodeOps;\n\n  for (i = 0; i < hooks.length; ++i) {\n    cbs[hooks[i]] = [];\n    for (j = 0; j < modules.length; ++j) {\n      if (isDef(modules[j][hooks[i]])) {\n        cbs[hooks[i]].push(modules[j][hooks[i]]);\n      }\n    }\n  }\n\n  function emptyNodeAt (elm) {\n    return new VNode(nodeOps.tagName(elm).toLowerCase(), {}, [], undefined, elm)\n  }\n\n  function createRmCb (childElm, listeners) {\n    function remove$$1 () {\n      if (--remove$$1.listeners === 0) {\n        removeNode(childElm);\n      }\n    }\n    remove$$1.listeners = listeners;\n    return remove$$1\n  }\n\n  function removeNode (el) {\n    var parent = nodeOps.parentNode(el);\n    // element may have already been removed due to v-html / v-text\n    if (isDef(parent)) {\n      nodeOps.removeChild(parent, el);\n    }\n  }\n\n  var inPre = 0;\n  function createElm (vnode, insertedVnodeQueue, parentElm, refElm, nested) {\n    vnode.isRootInsert = !nested; // for transition enter check\n    if (createComponent(vnode, insertedVnodeQueue, parentElm, refElm)) {\n      return\n    }\n\n    var data = vnode.data;\n    var children = vnode.children;\n    var tag = vnode.tag;\n    if (isDef(tag)) {\n      {\n        if (data && data.pre) {\n          inPre++;\n        }\n        if (\n          !inPre &&\n          !vnode.ns &&\n          !(config.ignoredElements.length && config.ignoredElements.indexOf(tag) > -1) &&\n          config.isUnknownElement(tag)\n        ) {\n          warn(\n            'Unknown custom element: <' + tag + '> - did you ' +\n            'register the component correctly? For recursive components, ' +\n            'make sure to provide the \"name\" option.',\n            vnode.context\n          );\n        }\n      }\n      vnode.elm = vnode.ns\n        ? nodeOps.createElementNS(vnode.ns, tag)\n        : nodeOps.createElement(tag, vnode);\n      setScope(vnode);\n\n      /* istanbul ignore if */\n      {\n        createChildren(vnode, children, insertedVnodeQueue);\n        if (isDef(data)) {\n          invokeCreateHooks(vnode, insertedVnodeQueue);\n        }\n        insert(parentElm, vnode.elm, refElm);\n      }\n\n      if (\"development\" !== 'production' && data && data.pre) {\n        inPre--;\n      }\n    } else if (isTrue(vnode.isComment)) {\n      vnode.elm = nodeOps.createComment(vnode.text);\n      insert(parentElm, vnode.elm, refElm);\n    } else {\n      vnode.elm = nodeOps.createTextNode(vnode.text);\n      insert(parentElm, vnode.elm, refElm);\n    }\n  }\n\n  function createComponent (vnode, insertedVnodeQueue, parentElm, refElm) {\n    var i = vnode.data;\n    if (isDef(i)) {\n      var isReactivated = isDef(vnode.componentInstance) && i.keepAlive;\n      if (isDef(i = i.hook) && isDef(i = i.init)) {\n        i(vnode, false /* hydrating */, parentElm, refElm);\n      }\n      // after calling the init hook, if the vnode is a child component\n      // it should've created a child instance and mounted it. the child\n      // component also has set the placeholder vnode's elm.\n      // in that case we can just return the element and be done.\n      if (isDef(vnode.componentInstance)) {\n        initComponent(vnode, insertedVnodeQueue);\n        if (isTrue(isReactivated)) {\n          reactivateComponent(vnode, insertedVnodeQueue, parentElm, refElm);\n        }\n        return true\n      }\n    }\n  }\n\n  function initComponent (vnode, insertedVnodeQueue) {\n    if (isDef(vnode.data.pendingInsert)) {\n      insertedVnodeQueue.push.apply(insertedVnodeQueue, vnode.data.pendingInsert);\n    }\n    vnode.elm = vnode.componentInstance.$el;\n    if (isPatchable(vnode)) {\n      invokeCreateHooks(vnode, insertedVnodeQueue);\n      setScope(vnode);\n    } else {\n      // empty component root.\n      // skip all element-related modules except for ref (#3455)\n      registerRef(vnode);\n      // make sure to invoke the insert hook\n      insertedVnodeQueue.push(vnode);\n    }\n  }\n\n  function reactivateComponent (vnode, insertedVnodeQueue, parentElm, refElm) {\n    var i;\n    // hack for #4339: a reactivated component with inner transition\n    // does not trigger because the inner node's created hooks are not called\n    // again. It's not ideal to involve module-specific logic in here but\n    // there doesn't seem to be a better way to do it.\n    var innerNode = vnode;\n    while (innerNode.componentInstance) {\n      innerNode = innerNode.componentInstance._vnode;\n      if (isDef(i = innerNode.data) && isDef(i = i.transition)) {\n        for (i = 0; i < cbs.activate.length; ++i) {\n          cbs.activate[i](emptyNode, innerNode);\n        }\n        insertedVnodeQueue.push(innerNode);\n        break\n      }\n    }\n    // unlike a newly created component,\n    // a reactivated keep-alive component doesn't insert itself\n    insert(parentElm, vnode.elm, refElm);\n  }\n\n  function insert (parent, elm, ref) {\n    if (isDef(parent)) {\n      if (isDef(ref)) {\n        nodeOps.insertBefore(parent, elm, ref);\n      } else {\n        nodeOps.appendChild(parent, elm);\n      }\n    }\n  }\n\n  function createChildren (vnode, children, insertedVnodeQueue) {\n    if (Array.isArray(children)) {\n      for (var i = 0; i < children.length; ++i) {\n        createElm(children[i], insertedVnodeQueue, vnode.elm, null, true);\n      }\n    } else if (isPrimitive(vnode.text)) {\n      nodeOps.appendChild(vnode.elm, nodeOps.createTextNode(vnode.text));\n    }\n  }\n\n  function isPatchable (vnode) {\n    while (vnode.componentInstance) {\n      vnode = vnode.componentInstance._vnode;\n    }\n    return isDef(vnode.tag)\n  }\n\n  function invokeCreateHooks (vnode, insertedVnodeQueue) {\n    for (var i$1 = 0; i$1 < cbs.create.length; ++i$1) {\n      cbs.create[i$1](emptyNode, vnode);\n    }\n    i = vnode.data.hook; // Reuse variable\n    if (isDef(i)) {\n      if (isDef(i.create)) { i.create(emptyNode, vnode); }\n      if (isDef(i.insert)) { insertedVnodeQueue.push(vnode); }\n    }\n  }\n\n  // set scope id attribute for scoped CSS.\n  // this is implemented as a special case to avoid the overhead\n  // of going through the normal attribute patching process.\n  function setScope (vnode) {\n    var i;\n    var ancestor = vnode;\n    while (ancestor) {\n      if (isDef(i = ancestor.context) && isDef(i = i.$options._scopeId)) {\n        nodeOps.setAttribute(vnode.elm, i, '');\n      }\n      ancestor = ancestor.parent;\n    }\n    // for slot content they should also get the scopeId from the host instance.\n    if (isDef(i = activeInstance) &&\n        i !== vnode.context &&\n        isDef(i = i.$options._scopeId)) {\n      nodeOps.setAttribute(vnode.elm, i, '');\n    }\n  }\n\n  function addVnodes (parentElm, refElm, vnodes, startIdx, endIdx, insertedVnodeQueue) {\n    for (; startIdx <= endIdx; ++startIdx) {\n      createElm(vnodes[startIdx], insertedVnodeQueue, parentElm, refElm);\n    }\n  }\n\n  function invokeDestroyHook (vnode) {\n    var i, j;\n    var data = vnode.data;\n    if (isDef(data)) {\n      if (isDef(i = data.hook) && isDef(i = i.destroy)) { i(vnode); }\n      for (i = 0; i < cbs.destroy.length; ++i) { cbs.destroy[i](vnode); }\n    }\n    if (isDef(i = vnode.children)) {\n      for (j = 0; j < vnode.children.length; ++j) {\n        invokeDestroyHook(vnode.children[j]);\n      }\n    }\n  }\n\n  function removeVnodes (parentElm, vnodes, startIdx, endIdx) {\n    for (; startIdx <= endIdx; ++startIdx) {\n      var ch = vnodes[startIdx];\n      if (isDef(ch)) {\n        if (isDef(ch.tag)) {\n          removeAndInvokeRemoveHook(ch);\n          invokeDestroyHook(ch);\n        } else { // Text node\n          removeNode(ch.elm);\n        }\n      }\n    }\n  }\n\n  function removeAndInvokeRemoveHook (vnode, rm) {\n    if (isDef(rm) || isDef(vnode.data)) {\n      var listeners = cbs.remove.length + 1;\n      if (isDef(rm)) {\n        // we have a recursively passed down rm callback\n        // increase the listeners count\n        rm.listeners += listeners;\n      } else {\n        // directly removing\n        rm = createRmCb(vnode.elm, listeners);\n      }\n      // recursively invoke hooks on child component root node\n      if (isDef(i = vnode.componentInstance) && isDef(i = i._vnode) && isDef(i.data)) {\n        removeAndInvokeRemoveHook(i, rm);\n      }\n      for (i = 0; i < cbs.remove.length; ++i) {\n        cbs.remove[i](vnode, rm);\n      }\n      if (isDef(i = vnode.data.hook) && isDef(i = i.remove)) {\n        i(vnode, rm);\n      } else {\n        rm();\n      }\n    } else {\n      removeNode(vnode.elm);\n    }\n  }\n\n  function updateChildren (parentElm, oldCh, newCh, insertedVnodeQueue, removeOnly) {\n    var oldStartIdx = 0;\n    var newStartIdx = 0;\n    var oldEndIdx = oldCh.length - 1;\n    var oldStartVnode = oldCh[0];\n    var oldEndVnode = oldCh[oldEndIdx];\n    var newEndIdx = newCh.length - 1;\n    var newStartVnode = newCh[0];\n    var newEndVnode = newCh[newEndIdx];\n    var oldKeyToIdx, idxInOld, elmToMove, refElm;\n\n    // removeOnly is a special flag used only by <transition-group>\n    // to ensure removed elements stay in correct relative positions\n    // during leaving transitions\n    var canMove = !removeOnly;\n\n    while (oldStartIdx <= oldEndIdx && newStartIdx <= newEndIdx) {\n      if (isUndef(oldStartVnode)) {\n        oldStartVnode = oldCh[++oldStartIdx]; // Vnode has been moved left\n      } else if (isUndef(oldEndVnode)) {\n        oldEndVnode = oldCh[--oldEndIdx];\n      } else if (sameVnode(oldStartVnode, newStartVnode)) {\n        patchVnode(oldStartVnode, newStartVnode, insertedVnodeQueue);\n        oldStartVnode = oldCh[++oldStartIdx];\n        newStartVnode = newCh[++newStartIdx];\n      } else if (sameVnode(oldEndVnode, newEndVnode)) {\n        patchVnode(oldEndVnode, newEndVnode, insertedVnodeQueue);\n        oldEndVnode = oldCh[--oldEndIdx];\n        newEndVnode = newCh[--newEndIdx];\n      } else if (sameVnode(oldStartVnode, newEndVnode)) { // Vnode moved right\n        patchVnode(oldStartVnode, newEndVnode, insertedVnodeQueue);\n        canMove && nodeOps.insertBefore(parentElm, oldStartVnode.elm, nodeOps.nextSibling(oldEndVnode.elm));\n        oldStartVnode = oldCh[++oldStartIdx];\n        newEndVnode = newCh[--newEndIdx];\n      } else if (sameVnode(oldEndVnode, newStartVnode)) { // Vnode moved left\n        patchVnode(oldEndVnode, newStartVnode, insertedVnodeQueue);\n        canMove && nodeOps.insertBefore(parentElm, oldEndVnode.elm, oldStartVnode.elm);\n        oldEndVnode = oldCh[--oldEndIdx];\n        newStartVnode = newCh[++newStartIdx];\n      } else {\n        if (isUndef(oldKeyToIdx)) { oldKeyToIdx = createKeyToOldIdx(oldCh, oldStartIdx, oldEndIdx); }\n        idxInOld = isDef(newStartVnode.key) ? oldKeyToIdx[newStartVnode.key] : null;\n        if (isUndef(idxInOld)) { // New element\n          createElm(newStartVnode, insertedVnodeQueue, parentElm, oldStartVnode.elm);\n          newStartVnode = newCh[++newStartIdx];\n        } else {\n          elmToMove = oldCh[idxInOld];\n          /* istanbul ignore if */\n          if (\"development\" !== 'production' && !elmToMove) {\n            warn(\n              'It seems there are duplicate keys that is causing an update error. ' +\n              'Make sure each v-for item has a unique key.'\n            );\n          }\n          if (sameVnode(elmToMove, newStartVnode)) {\n            patchVnode(elmToMove, newStartVnode, insertedVnodeQueue);\n            oldCh[idxInOld] = undefined;\n            canMove && nodeOps.insertBefore(parentElm, newStartVnode.elm, oldStartVnode.elm);\n            newStartVnode = newCh[++newStartIdx];\n          } else {\n            // same key but different element. treat as new element\n            createElm(newStartVnode, insertedVnodeQueue, parentElm, oldStartVnode.elm);\n            newStartVnode = newCh[++newStartIdx];\n          }\n        }\n      }\n    }\n    if (oldStartIdx > oldEndIdx) {\n      refElm = isUndef(newCh[newEndIdx + 1]) ? null : newCh[newEndIdx + 1].elm;\n      addVnodes(parentElm, refElm, newCh, newStartIdx, newEndIdx, insertedVnodeQueue);\n    } else if (newStartIdx > newEndIdx) {\n      removeVnodes(parentElm, oldCh, oldStartIdx, oldEndIdx);\n    }\n  }\n\n  function patchVnode (oldVnode, vnode, insertedVnodeQueue, removeOnly) {\n    if (oldVnode === vnode) {\n      return\n    }\n    // reuse element for static trees.\n    // note we only do this if the vnode is cloned -\n    // if the new node is not cloned it means the render functions have been\n    // reset by the hot-reload-api and we need to do a proper re-render.\n    if (isTrue(vnode.isStatic) &&\n        isTrue(oldVnode.isStatic) &&\n        vnode.key === oldVnode.key &&\n        (isTrue(vnode.isCloned) || isTrue(vnode.isOnce))) {\n      vnode.elm = oldVnode.elm;\n      vnode.componentInstance = oldVnode.componentInstance;\n      return\n    }\n    var i;\n    var data = vnode.data;\n    if (isDef(data) && isDef(i = data.hook) && isDef(i = i.prepatch)) {\n      i(oldVnode, vnode);\n    }\n    var elm = vnode.elm = oldVnode.elm;\n    var oldCh = oldVnode.children;\n    var ch = vnode.children;\n    if (isDef(data) && isPatchable(vnode)) {\n      for (i = 0; i < cbs.update.length; ++i) { cbs.update[i](oldVnode, vnode); }\n      if (isDef(i = data.hook) && isDef(i = i.update)) { i(oldVnode, vnode); }\n    }\n    if (isUndef(vnode.text)) {\n      if (isDef(oldCh) && isDef(ch)) {\n        if (oldCh !== ch) { updateChildren(elm, oldCh, ch, insertedVnodeQueue, removeOnly); }\n      } else if (isDef(ch)) {\n        if (isDef(oldVnode.text)) { nodeOps.setTextContent(elm, ''); }\n        addVnodes(elm, null, ch, 0, ch.length - 1, insertedVnodeQueue);\n      } else if (isDef(oldCh)) {\n        removeVnodes(elm, oldCh, 0, oldCh.length - 1);\n      } else if (isDef(oldVnode.text)) {\n        nodeOps.setTextContent(elm, '');\n      }\n    } else if (oldVnode.text !== vnode.text) {\n      nodeOps.setTextContent(elm, vnode.text);\n    }\n    if (isDef(data)) {\n      if (isDef(i = data.hook) && isDef(i = i.postpatch)) { i(oldVnode, vnode); }\n    }\n  }\n\n  function invokeInsertHook (vnode, queue, initial) {\n    // delay insert hooks for component root nodes, invoke them after the\n    // element is really inserted\n    if (isTrue(initial) && isDef(vnode.parent)) {\n      vnode.parent.data.pendingInsert = queue;\n    } else {\n      for (var i = 0; i < queue.length; ++i) {\n        queue[i].data.hook.insert(queue[i]);\n      }\n    }\n  }\n\n  var bailed = false;\n  // list of modules that can skip create hook during hydration because they\n  // are already rendered on the client or has no need for initialization\n  var isRenderedModule = makeMap('attrs,style,class,staticClass,staticStyle,key');\n\n  // Note: this is a browser-only function so we can assume elms are DOM nodes.\n  function hydrate (elm, vnode, insertedVnodeQueue) {\n    {\n      if (!assertNodeMatch(elm, vnode)) {\n        return false\n      }\n    }\n    vnode.elm = elm;\n    var tag = vnode.tag;\n    var data = vnode.data;\n    var children = vnode.children;\n    if (isDef(data)) {\n      if (isDef(i = data.hook) && isDef(i = i.init)) { i(vnode, true /* hydrating */); }\n      if (isDef(i = vnode.componentInstance)) {\n        // child component. it should have hydrated its own tree.\n        initComponent(vnode, insertedVnodeQueue);\n        return true\n      }\n    }\n    if (isDef(tag)) {\n      if (isDef(children)) {\n        // empty element, allow client to pick up and populate children\n        if (!elm.hasChildNodes()) {\n          createChildren(vnode, children, insertedVnodeQueue);\n        } else {\n          var childrenMatch = true;\n          var childNode = elm.firstChild;\n          for (var i$1 = 0; i$1 < children.length; i$1++) {\n            if (!childNode || !hydrate(childNode, children[i$1], insertedVnodeQueue)) {\n              childrenMatch = false;\n              break\n            }\n            childNode = childNode.nextSibling;\n          }\n          // if childNode is not null, it means the actual childNodes list is\n          // longer than the virtual children list.\n          if (!childrenMatch || childNode) {\n            if (\"development\" !== 'production' &&\n                typeof console !== 'undefined' &&\n                !bailed) {\n              bailed = true;\n              console.warn('Parent: ', elm);\n              console.warn('Mismatching childNodes vs. VNodes: ', elm.childNodes, children);\n            }\n            return false\n          }\n        }\n      }\n      if (isDef(data)) {\n        for (var key in data) {\n          if (!isRenderedModule(key)) {\n            invokeCreateHooks(vnode, insertedVnodeQueue);\n            break\n          }\n        }\n      }\n    } else if (elm.data !== vnode.text) {\n      elm.data = vnode.text;\n    }\n    return true\n  }\n\n  function assertNodeMatch (node, vnode) {\n    if (isDef(vnode.tag)) {\n      return (\n        vnode.tag.indexOf('vue-component') === 0 ||\n        vnode.tag.toLowerCase() === (node.tagName && node.tagName.toLowerCase())\n      )\n    } else {\n      return node.nodeType === (vnode.isComment ? 8 : 3)\n    }\n  }\n\n  return function patch (oldVnode, vnode, hydrating, removeOnly, parentElm, refElm) {\n    if (isUndef(vnode)) {\n      if (isDef(oldVnode)) { invokeDestroyHook(oldVnode); }\n      return\n    }\n\n    var isInitialPatch = false;\n    var insertedVnodeQueue = [];\n\n    if (isUndef(oldVnode)) {\n      // empty mount (likely as component), create new root element\n      isInitialPatch = true;\n      createElm(vnode, insertedVnodeQueue, parentElm, refElm);\n    } else {\n      var isRealElement = isDef(oldVnode.nodeType);\n      if (!isRealElement && sameVnode(oldVnode, vnode)) {\n        // patch existing root node\n        patchVnode(oldVnode, vnode, insertedVnodeQueue, removeOnly);\n      } else {\n        if (isRealElement) {\n          // mounting to a real element\n          // check if this is server-rendered content and if we can perform\n          // a successful hydration.\n          if (oldVnode.nodeType === 1 && oldVnode.hasAttribute('server-rendered')) {\n            oldVnode.removeAttribute('server-rendered');\n            hydrating = true;\n          }\n          if (isTrue(hydrating)) {\n            if (hydrate(oldVnode, vnode, insertedVnodeQueue)) {\n              invokeInsertHook(vnode, insertedVnodeQueue, true);\n              return oldVnode\n            } else {\n              warn(\n                'The client-side rendered virtual DOM tree is not matching ' +\n                'server-rendered content. This is likely caused by incorrect ' +\n                'HTML markup, for example nesting block-level elements inside ' +\n                '<p>, or missing <tbody>. Bailing hydration and performing ' +\n                'full client-side render.'\n              );\n            }\n          }\n          // either not server-rendered, or hydration failed.\n          // create an empty node and replace it\n          oldVnode = emptyNodeAt(oldVnode);\n        }\n        // replacing existing element\n        var oldElm = oldVnode.elm;\n        var parentElm$1 = nodeOps.parentNode(oldElm);\n        createElm(\n          vnode,\n          insertedVnodeQueue,\n          // extremely rare edge case: do not insert if old element is in a\n          // leaving transition. Only happens when combining transition +\n          // keep-alive + HOCs. (#4590)\n          oldElm._leaveCb ? null : parentElm$1,\n          nodeOps.nextSibling(oldElm)\n        );\n\n        if (isDef(vnode.parent)) {\n          // component root element replaced.\n          // update parent placeholder node element, recursively\n          var ancestor = vnode.parent;\n          while (ancestor) {\n            ancestor.elm = vnode.elm;\n            ancestor = ancestor.parent;\n          }\n          if (isPatchable(vnode)) {\n            for (var i = 0; i < cbs.create.length; ++i) {\n              cbs.create[i](emptyNode, vnode.parent);\n            }\n          }\n        }\n\n        if (isDef(parentElm$1)) {\n          removeVnodes(parentElm$1, [oldVnode], 0, 0);\n        } else if (isDef(oldVnode.tag)) {\n          invokeDestroyHook(oldVnode);\n        }\n      }\n    }\n\n    invokeInsertHook(vnode, insertedVnodeQueue, isInitialPatch);\n    return vnode.elm\n  }\n}\n\n/*  */\n\nvar directives = {\n  create: updateDirectives,\n  update: updateDirectives,\n  destroy: function unbindDirectives (vnode) {\n    updateDirectives(vnode, emptyNode);\n  }\n};\n\nfunction updateDirectives (oldVnode, vnode) {\n  if (oldVnode.data.directives || vnode.data.directives) {\n    _update(oldVnode, vnode);\n  }\n}\n\nfunction _update (oldVnode, vnode) {\n  var isCreate = oldVnode === emptyNode;\n  var isDestroy = vnode === emptyNode;\n  var oldDirs = normalizeDirectives$1(oldVnode.data.directives, oldVnode.context);\n  var newDirs = normalizeDirectives$1(vnode.data.directives, vnode.context);\n\n  var dirsWithInsert = [];\n  var dirsWithPostpatch = [];\n\n  var key, oldDir, dir;\n  for (key in newDirs) {\n    oldDir = oldDirs[key];\n    dir = newDirs[key];\n    if (!oldDir) {\n      // new directive, bind\n      callHook$1(dir, 'bind', vnode, oldVnode);\n      if (dir.def && dir.def.inserted) {\n        dirsWithInsert.push(dir);\n      }\n    } else {\n      // existing directive, update\n      dir.oldValue = oldDir.value;\n      callHook$1(dir, 'update', vnode, oldVnode);\n      if (dir.def && dir.def.componentUpdated) {\n        dirsWithPostpatch.push(dir);\n      }\n    }\n  }\n\n  if (dirsWithInsert.length) {\n    var callInsert = function () {\n      for (var i = 0; i < dirsWithInsert.length; i++) {\n        callHook$1(dirsWithInsert[i], 'inserted', vnode, oldVnode);\n      }\n    };\n    if (isCreate) {\n      mergeVNodeHook(vnode.data.hook || (vnode.data.hook = {}), 'insert', callInsert);\n    } else {\n      callInsert();\n    }\n  }\n\n  if (dirsWithPostpatch.length) {\n    mergeVNodeHook(vnode.data.hook || (vnode.data.hook = {}), 'postpatch', function () {\n      for (var i = 0; i < dirsWithPostpatch.length; i++) {\n        callHook$1(dirsWithPostpatch[i], 'componentUpdated', vnode, oldVnode);\n      }\n    });\n  }\n\n  if (!isCreate) {\n    for (key in oldDirs) {\n      if (!newDirs[key]) {\n        // no longer present, unbind\n        callHook$1(oldDirs[key], 'unbind', oldVnode, oldVnode, isDestroy);\n      }\n    }\n  }\n}\n\nvar emptyModifiers = Object.create(null);\n\nfunction normalizeDirectives$1 (\n  dirs,\n  vm\n) {\n  var res = Object.create(null);\n  if (!dirs) {\n    return res\n  }\n  var i, dir;\n  for (i = 0; i < dirs.length; i++) {\n    dir = dirs[i];\n    if (!dir.modifiers) {\n      dir.modifiers = emptyModifiers;\n    }\n    res[getRawDirName(dir)] = dir;\n    dir.def = resolveAsset(vm.$options, 'directives', dir.name, true);\n  }\n  return res\n}\n\nfunction getRawDirName (dir) {\n  return dir.rawName || ((dir.name) + \".\" + (Object.keys(dir.modifiers || {}).join('.')))\n}\n\nfunction callHook$1 (dir, hook, vnode, oldVnode, isDestroy) {\n  var fn = dir.def && dir.def[hook];\n  if (fn) {\n    fn(vnode.elm, dir, vnode, oldVnode, isDestroy);\n  }\n}\n\nvar baseModules = [\n  ref,\n  directives\n];\n\n/*  */\n\nfunction updateAttrs (oldVnode, vnode) {\n  if (!oldVnode.data.attrs && !vnode.data.attrs) {\n    return\n  }\n  var key, cur, old;\n  var elm = vnode.elm;\n  var oldAttrs = oldVnode.data.attrs || {};\n  var attrs = vnode.data.attrs || {};\n  // clone observed objects, as the user probably wants to mutate it\n  if (attrs.__ob__) {\n    attrs = vnode.data.attrs = extend({}, attrs);\n  }\n\n  for (key in attrs) {\n    cur = attrs[key];\n    old = oldAttrs[key];\n    if (old !== cur) {\n      setAttr(elm, key, cur);\n    }\n  }\n  // #4391: in IE9, setting type can reset value for input[type=radio]\n  /* istanbul ignore if */\n  if (isIE9 && attrs.value !== oldAttrs.value) {\n    setAttr(elm, 'value', attrs.value);\n  }\n  for (key in oldAttrs) {\n    if (attrs[key] == null) {\n      if (isXlink(key)) {\n        elm.removeAttributeNS(xlinkNS, getXlinkProp(key));\n      } else if (!isEnumeratedAttr(key)) {\n        elm.removeAttribute(key);\n      }\n    }\n  }\n}\n\nfunction setAttr (el, key, value) {\n  if (isBooleanAttr(key)) {\n    // set attribute for blank value\n    // e.g. <option disabled>Select one</option>\n    if (isFalsyAttrValue(value)) {\n      el.removeAttribute(key);\n    } else {\n      el.setAttribute(key, key);\n    }\n  } else if (isEnumeratedAttr(key)) {\n    el.setAttribute(key, isFalsyAttrValue(value) || value === 'false' ? 'false' : 'true');\n  } else if (isXlink(key)) {\n    if (isFalsyAttrValue(value)) {\n      el.removeAttributeNS(xlinkNS, getXlinkProp(key));\n    } else {\n      el.setAttributeNS(xlinkNS, key, value);\n    }\n  } else {\n    if (isFalsyAttrValue(value)) {\n      el.removeAttribute(key);\n    } else {\n      el.setAttribute(key, value);\n    }\n  }\n}\n\nvar attrs = {\n  create: updateAttrs,\n  update: updateAttrs\n};\n\n/*  */\n\nfunction updateClass (oldVnode, vnode) {\n  var el = vnode.elm;\n  var data = vnode.data;\n  var oldData = oldVnode.data;\n  if (!data.staticClass && !data.class &&\n      (!oldData || (!oldData.staticClass && !oldData.class))) {\n    return\n  }\n\n  var cls = genClassForVnode(vnode);\n\n  // handle transition classes\n  var transitionClass = el._transitionClasses;\n  if (transitionClass) {\n    cls = concat(cls, stringifyClass(transitionClass));\n  }\n\n  // set the class\n  if (cls !== el._prevClass) {\n    el.setAttribute('class', cls);\n    el._prevClass = cls;\n  }\n}\n\nvar klass = {\n  create: updateClass,\n  update: updateClass\n};\n\n/*  */\n\nvar validDivisionCharRE = /[\\w).+\\-_$\\]]/;\n\n\n\nfunction wrapFilter (exp, filter) {\n  var i = filter.indexOf('(');\n  if (i < 0) {\n    // _f: resolveFilter\n    return (\"_f(\\\"\" + filter + \"\\\")(\" + exp + \")\")\n  } else {\n    var name = filter.slice(0, i);\n    var args = filter.slice(i + 1);\n    return (\"_f(\\\"\" + name + \"\\\")(\" + exp + \",\" + args)\n  }\n}\n\n/*  */\n\n/*  */\n\n/**\n * Cross-platform code generation for component v-model\n */\n\n\n/**\n * Cross-platform codegen helper for generating v-model value assignment code.\n */\n\n\n/**\n * parse directive model to do the array update transform. a[idx] = val => $$a.splice($$idx, 1, val)\n *\n * for loop possible cases:\n *\n * - test\n * - test[idx]\n * - test[test1[idx]]\n * - test[\"a\"][idx]\n * - xxx.test[a[a].test1[idx]]\n * - test.xxx.a[\"asa\"][test1[idx]]\n *\n */\n\nvar str;\nvar index$1;\n\n/*  */\n\n// in some cases, the event used has to be determined at runtime\n// so we used some reserved tokens during compile.\nvar RANGE_TOKEN = '__r';\nvar CHECKBOX_RADIO_TOKEN = '__c';\n\n/*  */\n\n// normalize v-model event tokens that can only be determined at runtime.\n// it's important to place the event as the first in the array because\n// the whole point is ensuring the v-model callback gets called before\n// user-attached handlers.\nfunction normalizeEvents (on) {\n  var event;\n  /* istanbul ignore if */\n  if (on[RANGE_TOKEN]) {\n    // IE input[type=range] only supports `change` event\n    event = isIE ? 'change' : 'input';\n    on[event] = [].concat(on[RANGE_TOKEN], on[event] || []);\n    delete on[RANGE_TOKEN];\n  }\n  if (on[CHECKBOX_RADIO_TOKEN]) {\n    // Chrome fires microtasks in between click/change, leads to #4521\n    event = isChrome ? 'click' : 'change';\n    on[event] = [].concat(on[CHECKBOX_RADIO_TOKEN], on[event] || []);\n    delete on[CHECKBOX_RADIO_TOKEN];\n  }\n}\n\nvar target$1;\n\nfunction add$1 (\n  event,\n  handler,\n  once,\n  capture\n) {\n  if (once) {\n    var oldHandler = handler;\n    var _target = target$1; // save current target element in closure\n    handler = function (ev) {\n      var res = arguments.length === 1\n        ? oldHandler(ev)\n        : oldHandler.apply(null, arguments);\n      if (res !== null) {\n        remove$2(event, handler, capture, _target);\n      }\n    };\n  }\n  target$1.addEventListener(event, handler, capture);\n}\n\nfunction remove$2 (\n  event,\n  handler,\n  capture,\n  _target\n) {\n  (_target || target$1).removeEventListener(event, handler, capture);\n}\n\nfunction updateDOMListeners (oldVnode, vnode) {\n  if (!oldVnode.data.on && !vnode.data.on) {\n    return\n  }\n  var on = vnode.data.on || {};\n  var oldOn = oldVnode.data.on || {};\n  target$1 = vnode.elm;\n  normalizeEvents(on);\n  updateListeners(on, oldOn, add$1, remove$2, vnode.context);\n}\n\nvar events = {\n  create: updateDOMListeners,\n  update: updateDOMListeners\n};\n\n/*  */\n\nfunction updateDOMProps (oldVnode, vnode) {\n  if (!oldVnode.data.domProps && !vnode.data.domProps) {\n    return\n  }\n  var key, cur;\n  var elm = vnode.elm;\n  var oldProps = oldVnode.data.domProps || {};\n  var props = vnode.data.domProps || {};\n  // clone observed objects, as the user probably wants to mutate it\n  if (props.__ob__) {\n    props = vnode.data.domProps = extend({}, props);\n  }\n\n  for (key in oldProps) {\n    if (props[key] == null) {\n      elm[key] = '';\n    }\n  }\n  for (key in props) {\n    cur = props[key];\n    // ignore children if the node has textContent or innerHTML,\n    // as these will throw away existing DOM nodes and cause removal errors\n    // on subsequent patches (#3360)\n    if (key === 'textContent' || key === 'innerHTML') {\n      if (vnode.children) { vnode.children.length = 0; }\n      if (cur === oldProps[key]) { continue }\n    }\n\n    if (key === 'value') {\n      // store value as _value as well since\n      // non-string values will be stringified\n      elm._value = cur;\n      // avoid resetting cursor position when value is the same\n      var strCur = cur == null ? '' : String(cur);\n      if (shouldUpdateValue(elm, vnode, strCur)) {\n        elm.value = strCur;\n      }\n    } else {\n      elm[key] = cur;\n    }\n  }\n}\n\n// check platforms/web/util/attrs.js acceptValue\n\n\nfunction shouldUpdateValue (\n  elm,\n  vnode,\n  checkVal\n) {\n  return (!elm.composing && (\n    vnode.tag === 'option' ||\n    isDirty(elm, checkVal) ||\n    isInputChanged(elm, checkVal)\n  ))\n}\n\nfunction isDirty (elm, checkVal) {\n  // return true when textbox (.number and .trim) loses focus and its value is not equal to the updated value\n  return document.activeElement !== elm && elm.value !== checkVal\n}\n\nfunction isInputChanged (elm, newVal) {\n  var value = elm.value;\n  var modifiers = elm._vModifiers; // injected by v-model runtime\n  if ((modifiers && modifiers.number) || elm.type === 'number') {\n    return toNumber(value) !== toNumber(newVal)\n  }\n  if (modifiers && modifiers.trim) {\n    return value.trim() !== newVal.trim()\n  }\n  return value !== newVal\n}\n\nvar domProps = {\n  create: updateDOMProps,\n  update: updateDOMProps\n};\n\n/*  */\n\nvar parseStyleText = cached(function (cssText) {\n  var res = {};\n  var listDelimiter = /;(?![^(]*\\))/g;\n  var propertyDelimiter = /:(.+)/;\n  cssText.split(listDelimiter).forEach(function (item) {\n    if (item) {\n      var tmp = item.split(propertyDelimiter);\n      tmp.length > 1 && (res[tmp[0].trim()] = tmp[1].trim());\n    }\n  });\n  return res\n});\n\n// merge static and dynamic style data on the same vnode\nfunction normalizeStyleData (data) {\n  var style = normalizeStyleBinding(data.style);\n  // static style is pre-processed into an object during compilation\n  // and is always a fresh object, so it's safe to merge into it\n  return data.staticStyle\n    ? extend(data.staticStyle, style)\n    : style\n}\n\n// normalize possible array / string values into Object\nfunction normalizeStyleBinding (bindingStyle) {\n  if (Array.isArray(bindingStyle)) {\n    return toObject(bindingStyle)\n  }\n  if (typeof bindingStyle === 'string') {\n    return parseStyleText(bindingStyle)\n  }\n  return bindingStyle\n}\n\n/**\n * parent component style should be after child's\n * so that parent component's style could override it\n */\nfunction getStyle (vnode, checkChild) {\n  var res = {};\n  var styleData;\n\n  if (checkChild) {\n    var childNode = vnode;\n    while (childNode.componentInstance) {\n      childNode = childNode.componentInstance._vnode;\n      if (childNode.data && (styleData = normalizeStyleData(childNode.data))) {\n        extend(res, styleData);\n      }\n    }\n  }\n\n  if ((styleData = normalizeStyleData(vnode.data))) {\n    extend(res, styleData);\n  }\n\n  var parentNode = vnode;\n  while ((parentNode = parentNode.parent)) {\n    if (parentNode.data && (styleData = normalizeStyleData(parentNode.data))) {\n      extend(res, styleData);\n    }\n  }\n  return res\n}\n\n/*  */\n\nvar cssVarRE = /^--/;\nvar importantRE = /\\s*!important$/;\nvar setProp = function (el, name, val) {\n  /* istanbul ignore if */\n  if (cssVarRE.test(name)) {\n    el.style.setProperty(name, val);\n  } else if (importantRE.test(val)) {\n    el.style.setProperty(name, val.replace(importantRE, ''), 'important');\n  } else {\n    el.style[normalize(name)] = val;\n  }\n};\n\nvar prefixes = ['Webkit', 'Moz', 'ms'];\n\nvar testEl;\nvar normalize = cached(function (prop) {\n  testEl = testEl || document.createElement('div');\n  prop = camelize(prop);\n  if (prop !== 'filter' && (prop in testEl.style)) {\n    return prop\n  }\n  var upper = prop.charAt(0).toUpperCase() + prop.slice(1);\n  for (var i = 0; i < prefixes.length; i++) {\n    var prefixed = prefixes[i] + upper;\n    if (prefixed in testEl.style) {\n      return prefixed\n    }\n  }\n});\n\nfunction updateStyle (oldVnode, vnode) {\n  var data = vnode.data;\n  var oldData = oldVnode.data;\n\n  if (!data.staticStyle && !data.style &&\n      !oldData.staticStyle && !oldData.style) {\n    return\n  }\n\n  var cur, name;\n  var el = vnode.elm;\n  var oldStaticStyle = oldVnode.data.staticStyle;\n  var oldStyleBinding = oldVnode.data.style || {};\n\n  // if static style exists, stylebinding already merged into it when doing normalizeStyleData\n  var oldStyle = oldStaticStyle || oldStyleBinding;\n\n  var style = normalizeStyleBinding(vnode.data.style) || {};\n\n  vnode.data.style = style.__ob__ ? extend({}, style) : style;\n\n  var newStyle = getStyle(vnode, true);\n\n  for (name in oldStyle) {\n    if (newStyle[name] == null) {\n      setProp(el, name, '');\n    }\n  }\n  for (name in newStyle) {\n    cur = newStyle[name];\n    if (cur !== oldStyle[name]) {\n      // ie9 setting to null has no effect, must use empty string\n      setProp(el, name, cur == null ? '' : cur);\n    }\n  }\n}\n\nvar style = {\n  create: updateStyle,\n  update: updateStyle\n};\n\n/*  */\n\n/**\n * Add class with compatibility for SVG since classList is not supported on\n * SVG elements in IE\n */\nfunction addClass (el, cls) {\n  /* istanbul ignore if */\n  if (!cls || !(cls = cls.trim())) {\n    return\n  }\n\n  /* istanbul ignore else */\n  if (el.classList) {\n    if (cls.indexOf(' ') > -1) {\n      cls.split(/\\s+/).forEach(function (c) { return el.classList.add(c); });\n    } else {\n      el.classList.add(cls);\n    }\n  } else {\n    var cur = \" \" + (el.getAttribute('class') || '') + \" \";\n    if (cur.indexOf(' ' + cls + ' ') < 0) {\n      el.setAttribute('class', (cur + cls).trim());\n    }\n  }\n}\n\n/**\n * Remove class with compatibility for SVG since classList is not supported on\n * SVG elements in IE\n */\nfunction removeClass (el, cls) {\n  /* istanbul ignore if */\n  if (!cls || !(cls = cls.trim())) {\n    return\n  }\n\n  /* istanbul ignore else */\n  if (el.classList) {\n    if (cls.indexOf(' ') > -1) {\n      cls.split(/\\s+/).forEach(function (c) { return el.classList.remove(c); });\n    } else {\n      el.classList.remove(cls);\n    }\n  } else {\n    var cur = \" \" + (el.getAttribute('class') || '') + \" \";\n    var tar = ' ' + cls + ' ';\n    while (cur.indexOf(tar) >= 0) {\n      cur = cur.replace(tar, ' ');\n    }\n    el.setAttribute('class', cur.trim());\n  }\n}\n\n/*  */\n\nfunction resolveTransition (def$$1) {\n  if (!def$$1) {\n    return\n  }\n  /* istanbul ignore else */\n  if (typeof def$$1 === 'object') {\n    var res = {};\n    if (def$$1.css !== false) {\n      extend(res, autoCssTransition(def$$1.name || 'v'));\n    }\n    extend(res, def$$1);\n    return res\n  } else if (typeof def$$1 === 'string') {\n    return autoCssTransition(def$$1)\n  }\n}\n\nvar autoCssTransition = cached(function (name) {\n  return {\n    enterClass: (name + \"-enter\"),\n    enterToClass: (name + \"-enter-to\"),\n    enterActiveClass: (name + \"-enter-active\"),\n    leaveClass: (name + \"-leave\"),\n    leaveToClass: (name + \"-leave-to\"),\n    leaveActiveClass: (name + \"-leave-active\")\n  }\n});\n\nvar hasTransition = inBrowser && !isIE9;\nvar TRANSITION = 'transition';\nvar ANIMATION = 'animation';\n\n// Transition property/event sniffing\nvar transitionProp = 'transition';\nvar transitionEndEvent = 'transitionend';\nvar animationProp = 'animation';\nvar animationEndEvent = 'animationend';\nif (hasTransition) {\n  /* istanbul ignore if */\n  if (window.ontransitionend === undefined &&\n    window.onwebkittransitionend !== undefined) {\n    transitionProp = 'WebkitTransition';\n    transitionEndEvent = 'webkitTransitionEnd';\n  }\n  if (window.onanimationend === undefined &&\n    window.onwebkitanimationend !== undefined) {\n    animationProp = 'WebkitAnimation';\n    animationEndEvent = 'webkitAnimationEnd';\n  }\n}\n\n// binding to window is necessary to make hot reload work in IE in strict mode\nvar raf = inBrowser && window.requestAnimationFrame\n  ? window.requestAnimationFrame.bind(window)\n  : setTimeout;\n\nfunction nextFrame (fn) {\n  raf(function () {\n    raf(fn);\n  });\n}\n\nfunction addTransitionClass (el, cls) {\n  (el._transitionClasses || (el._transitionClasses = [])).push(cls);\n  addClass(el, cls);\n}\n\nfunction removeTransitionClass (el, cls) {\n  if (el._transitionClasses) {\n    remove(el._transitionClasses, cls);\n  }\n  removeClass(el, cls);\n}\n\nfunction whenTransitionEnds (\n  el,\n  expectedType,\n  cb\n) {\n  var ref = getTransitionInfo(el, expectedType);\n  var type = ref.type;\n  var timeout = ref.timeout;\n  var propCount = ref.propCount;\n  if (!type) { return cb() }\n  var event = type === TRANSITION ? transitionEndEvent : animationEndEvent;\n  var ended = 0;\n  var end = function () {\n    el.removeEventListener(event, onEnd);\n    cb();\n  };\n  var onEnd = function (e) {\n    if (e.target === el) {\n      if (++ended >= propCount) {\n        end();\n      }\n    }\n  };\n  setTimeout(function () {\n    if (ended < propCount) {\n      end();\n    }\n  }, timeout + 1);\n  el.addEventListener(event, onEnd);\n}\n\nvar transformRE = /\\b(transform|all)(,|$)/;\n\nfunction getTransitionInfo (el, expectedType) {\n  var styles = window.getComputedStyle(el);\n  var transitionDelays = styles[transitionProp + 'Delay'].split(', ');\n  var transitionDurations = styles[transitionProp + 'Duration'].split(', ');\n  var transitionTimeout = getTimeout(transitionDelays, transitionDurations);\n  var animationDelays = styles[animationProp + 'Delay'].split(', ');\n  var animationDurations = styles[animationProp + 'Duration'].split(', ');\n  var animationTimeout = getTimeout(animationDelays, animationDurations);\n\n  var type;\n  var timeout = 0;\n  var propCount = 0;\n  /* istanbul ignore if */\n  if (expectedType === TRANSITION) {\n    if (transitionTimeout > 0) {\n      type = TRANSITION;\n      timeout = transitionTimeout;\n      propCount = transitionDurations.length;\n    }\n  } else if (expectedType === ANIMATION) {\n    if (animationTimeout > 0) {\n      type = ANIMATION;\n      timeout = animationTimeout;\n      propCount = animationDurations.length;\n    }\n  } else {\n    timeout = Math.max(transitionTimeout, animationTimeout);\n    type = timeout > 0\n      ? transitionTimeout > animationTimeout\n        ? TRANSITION\n        : ANIMATION\n      : null;\n    propCount = type\n      ? type === TRANSITION\n        ? transitionDurations.length\n        : animationDurations.length\n      : 0;\n  }\n  var hasTransform =\n    type === TRANSITION &&\n    transformRE.test(styles[transitionProp + 'Property']);\n  return {\n    type: type,\n    timeout: timeout,\n    propCount: propCount,\n    hasTransform: hasTransform\n  }\n}\n\nfunction getTimeout (delays, durations) {\n  /* istanbul ignore next */\n  while (delays.length < durations.length) {\n    delays = delays.concat(delays);\n  }\n\n  return Math.max.apply(null, durations.map(function (d, i) {\n    return toMs(d) + toMs(delays[i])\n  }))\n}\n\nfunction toMs (s) {\n  return Number(s.slice(0, -1)) * 1000\n}\n\n/*  */\n\nfunction enter (vnode, toggleDisplay) {\n  var el = vnode.elm;\n\n  // call leave callback now\n  if (el._leaveCb) {\n    el._leaveCb.cancelled = true;\n    el._leaveCb();\n  }\n\n  var data = resolveTransition(vnode.data.transition);\n  if (!data) {\n    return\n  }\n\n  /* istanbul ignore if */\n  if (el._enterCb || el.nodeType !== 1) {\n    return\n  }\n\n  var css = data.css;\n  var type = data.type;\n  var enterClass = data.enterClass;\n  var enterToClass = data.enterToClass;\n  var enterActiveClass = data.enterActiveClass;\n  var appearClass = data.appearClass;\n  var appearToClass = data.appearToClass;\n  var appearActiveClass = data.appearActiveClass;\n  var beforeEnter = data.beforeEnter;\n  var enter = data.enter;\n  var afterEnter = data.afterEnter;\n  var enterCancelled = data.enterCancelled;\n  var beforeAppear = data.beforeAppear;\n  var appear = data.appear;\n  var afterAppear = data.afterAppear;\n  var appearCancelled = data.appearCancelled;\n  var duration = data.duration;\n\n  // activeInstance will always be the <transition> component managing this\n  // transition. One edge case to check is when the <transition> is placed\n  // as the root node of a child component. In that case we need to check\n  // <transition>'s parent for appear check.\n  var context = activeInstance;\n  var transitionNode = activeInstance.$vnode;\n  while (transitionNode && transitionNode.parent) {\n    transitionNode = transitionNode.parent;\n    context = transitionNode.context;\n  }\n\n  var isAppear = !context._isMounted || !vnode.isRootInsert;\n\n  if (isAppear && !appear && appear !== '') {\n    return\n  }\n\n  var startClass = isAppear && appearClass\n    ? appearClass\n    : enterClass;\n  var activeClass = isAppear && appearActiveClass\n    ? appearActiveClass\n    : enterActiveClass;\n  var toClass = isAppear && appearToClass\n    ? appearToClass\n    : enterToClass;\n\n  var beforeEnterHook = isAppear\n    ? (beforeAppear || beforeEnter)\n    : beforeEnter;\n  var enterHook = isAppear\n    ? (typeof appear === 'function' ? appear : enter)\n    : enter;\n  var afterEnterHook = isAppear\n    ? (afterAppear || afterEnter)\n    : afterEnter;\n  var enterCancelledHook = isAppear\n    ? (appearCancelled || enterCancelled)\n    : enterCancelled;\n\n  var explicitEnterDuration = toNumber(\n    isObject(duration)\n      ? duration.enter\n      : duration\n  );\n\n  if (\"development\" !== 'production' && explicitEnterDuration != null) {\n    checkDuration(explicitEnterDuration, 'enter', vnode);\n  }\n\n  var expectsCSS = css !== false && !isIE9;\n  var userWantsControl = getHookArgumentsLength(enterHook);\n\n  var cb = el._enterCb = once(function () {\n    if (expectsCSS) {\n      removeTransitionClass(el, toClass);\n      removeTransitionClass(el, activeClass);\n    }\n    if (cb.cancelled) {\n      if (expectsCSS) {\n        removeTransitionClass(el, startClass);\n      }\n      enterCancelledHook && enterCancelledHook(el);\n    } else {\n      afterEnterHook && afterEnterHook(el);\n    }\n    el._enterCb = null;\n  });\n\n  if (!vnode.data.show) {\n    // remove pending leave element on enter by injecting an insert hook\n    mergeVNodeHook(vnode.data.hook || (vnode.data.hook = {}), 'insert', function () {\n      var parent = el.parentNode;\n      var pendingNode = parent && parent._pending && parent._pending[vnode.key];\n      if (pendingNode &&\n          pendingNode.tag === vnode.tag &&\n          pendingNode.elm._leaveCb) {\n        pendingNode.elm._leaveCb();\n      }\n      enterHook && enterHook(el, cb);\n    });\n  }\n\n  // start enter transition\n  beforeEnterHook && beforeEnterHook(el);\n  if (expectsCSS) {\n    addTransitionClass(el, startClass);\n    addTransitionClass(el, activeClass);\n    nextFrame(function () {\n      addTransitionClass(el, toClass);\n      removeTransitionClass(el, startClass);\n      if (!cb.cancelled && !userWantsControl) {\n        if (isValidDuration(explicitEnterDuration)) {\n          setTimeout(cb, explicitEnterDuration);\n        } else {\n          whenTransitionEnds(el, type, cb);\n        }\n      }\n    });\n  }\n\n  if (vnode.data.show) {\n    toggleDisplay && toggleDisplay();\n    enterHook && enterHook(el, cb);\n  }\n\n  if (!expectsCSS && !userWantsControl) {\n    cb();\n  }\n}\n\nfunction leave (vnode, rm) {\n  var el = vnode.elm;\n\n  // call enter callback now\n  if (el._enterCb) {\n    el._enterCb.cancelled = true;\n    el._enterCb();\n  }\n\n  var data = resolveTransition(vnode.data.transition);\n  if (!data) {\n    return rm()\n  }\n\n  /* istanbul ignore if */\n  if (el._leaveCb || el.nodeType !== 1) {\n    return\n  }\n\n  var css = data.css;\n  var type = data.type;\n  var leaveClass = data.leaveClass;\n  var leaveToClass = data.leaveToClass;\n  var leaveActiveClass = data.leaveActiveClass;\n  var beforeLeave = data.beforeLeave;\n  var leave = data.leave;\n  var afterLeave = data.afterLeave;\n  var leaveCancelled = data.leaveCancelled;\n  var delayLeave = data.delayLeave;\n  var duration = data.duration;\n\n  var expectsCSS = css !== false && !isIE9;\n  var userWantsControl = getHookArgumentsLength(leave);\n\n  var explicitLeaveDuration = toNumber(\n    isObject(duration)\n      ? duration.leave\n      : duration\n  );\n\n  if (\"development\" !== 'production' && explicitLeaveDuration != null) {\n    checkDuration(explicitLeaveDuration, 'leave', vnode);\n  }\n\n  var cb = el._leaveCb = once(function () {\n    if (el.parentNode && el.parentNode._pending) {\n      el.parentNode._pending[vnode.key] = null;\n    }\n    if (expectsCSS) {\n      removeTransitionClass(el, leaveToClass);\n      removeTransitionClass(el, leaveActiveClass);\n    }\n    if (cb.cancelled) {\n      if (expectsCSS) {\n        removeTransitionClass(el, leaveClass);\n      }\n      leaveCancelled && leaveCancelled(el);\n    } else {\n      rm();\n      afterLeave && afterLeave(el);\n    }\n    el._leaveCb = null;\n  });\n\n  if (delayLeave) {\n    delayLeave(performLeave);\n  } else {\n    performLeave();\n  }\n\n  function performLeave () {\n    // the delayed leave may have already been cancelled\n    if (cb.cancelled) {\n      return\n    }\n    // record leaving element\n    if (!vnode.data.show) {\n      (el.parentNode._pending || (el.parentNode._pending = {}))[vnode.key] = vnode;\n    }\n    beforeLeave && beforeLeave(el);\n    if (expectsCSS) {\n      addTransitionClass(el, leaveClass);\n      addTransitionClass(el, leaveActiveClass);\n      nextFrame(function () {\n        addTransitionClass(el, leaveToClass);\n        removeTransitionClass(el, leaveClass);\n        if (!cb.cancelled && !userWantsControl) {\n          if (isValidDuration(explicitLeaveDuration)) {\n            setTimeout(cb, explicitLeaveDuration);\n          } else {\n            whenTransitionEnds(el, type, cb);\n          }\n        }\n      });\n    }\n    leave && leave(el, cb);\n    if (!expectsCSS && !userWantsControl) {\n      cb();\n    }\n  }\n}\n\n// only used in dev mode\nfunction checkDuration (val, name, vnode) {\n  if (typeof val !== 'number') {\n    warn(\n      \"<transition> explicit \" + name + \" duration is not a valid number - \" +\n      \"got \" + (JSON.stringify(val)) + \".\",\n      vnode.context\n    );\n  } else if (isNaN(val)) {\n    warn(\n      \"<transition> explicit \" + name + \" duration is NaN - \" +\n      'the duration expression might be incorrect.',\n      vnode.context\n    );\n  }\n}\n\nfunction isValidDuration (val) {\n  return typeof val === 'number' && !isNaN(val)\n}\n\n/**\n * Normalize a transition hook's argument length. The hook may be:\n * - a merged hook (invoker) with the original in .fns\n * - a wrapped component method (check ._length)\n * - a plain function (.length)\n */\nfunction getHookArgumentsLength (fn) {\n  if (!fn) { return false }\n  var invokerFns = fn.fns;\n  if (invokerFns) {\n    // invoker\n    return getHookArgumentsLength(\n      Array.isArray(invokerFns)\n        ? invokerFns[0]\n        : invokerFns\n    )\n  } else {\n    return (fn._length || fn.length) > 1\n  }\n}\n\nfunction _enter (_, vnode) {\n  if (!vnode.data.show) {\n    enter(vnode);\n  }\n}\n\nvar transition = inBrowser ? {\n  create: _enter,\n  activate: _enter,\n  remove: function remove$$1 (vnode, rm) {\n    /* istanbul ignore else */\n    if (!vnode.data.show) {\n      leave(vnode, rm);\n    } else {\n      rm();\n    }\n  }\n} : {};\n\nvar platformModules = [\n  attrs,\n  klass,\n  events,\n  domProps,\n  style,\n  transition\n];\n\n/*  */\n\n// the directive module should be applied last, after all\n// built-in modules have been applied.\nvar modules = platformModules.concat(baseModules);\n\nvar patch = createPatchFunction({ nodeOps: nodeOps, modules: modules });\n\n/**\n * Not type checking this file because flow doesn't like attaching\n * properties to Elements.\n */\n\n/* istanbul ignore if */\nif (isIE9) {\n  // http://www.matts411.com/post/internet-explorer-9-oninput/\n  document.addEventListener('selectionchange', function () {\n    var el = document.activeElement;\n    if (el && el.vmodel) {\n      trigger(el, 'input');\n    }\n  });\n}\n\nvar model$1 = {\n  inserted: function inserted (el, binding, vnode) {\n    if (vnode.tag === 'select') {\n      var cb = function () {\n        setSelected(el, binding, vnode.context);\n      };\n      cb();\n      /* istanbul ignore if */\n      if (isIE || isEdge) {\n        setTimeout(cb, 0);\n      }\n    } else if (vnode.tag === 'textarea' || el.type === 'text' || el.type === 'password') {\n      el._vModifiers = binding.modifiers;\n      if (!binding.modifiers.lazy) {\n        if (!isAndroid) {\n          el.addEventListener('compositionstart', onCompositionStart);\n          el.addEventListener('compositionend', onCompositionEnd);\n        }\n        /* istanbul ignore if */\n        if (isIE9) {\n          el.vmodel = true;\n        }\n      }\n    }\n  },\n  componentUpdated: function componentUpdated (el, binding, vnode) {\n    if (vnode.tag === 'select') {\n      setSelected(el, binding, vnode.context);\n      // in case the options rendered by v-for have changed,\n      // it's possible that the value is out-of-sync with the rendered options.\n      // detect such cases and filter out values that no longer has a matching\n      // option in the DOM.\n      var needReset = el.multiple\n        ? binding.value.some(function (v) { return hasNoMatchingOption(v, el.options); })\n        : binding.value !== binding.oldValue && hasNoMatchingOption(binding.value, el.options);\n      if (needReset) {\n        trigger(el, 'change');\n      }\n    }\n  }\n};\n\nfunction setSelected (el, binding, vm) {\n  var value = binding.value;\n  var isMultiple = el.multiple;\n  if (isMultiple && !Array.isArray(value)) {\n    \"development\" !== 'production' && warn(\n      \"<select multiple v-model=\\\"\" + (binding.expression) + \"\\\"> \" +\n      \"expects an Array value for its binding, but got \" + (Object.prototype.toString.call(value).slice(8, -1)),\n      vm\n    );\n    return\n  }\n  var selected, option;\n  for (var i = 0, l = el.options.length; i < l; i++) {\n    option = el.options[i];\n    if (isMultiple) {\n      selected = looseIndexOf(value, getValue(option)) > -1;\n      if (option.selected !== selected) {\n        option.selected = selected;\n      }\n    } else {\n      if (looseEqual(getValue(option), value)) {\n        if (el.selectedIndex !== i) {\n          el.selectedIndex = i;\n        }\n        return\n      }\n    }\n  }\n  if (!isMultiple) {\n    el.selectedIndex = -1;\n  }\n}\n\nfunction hasNoMatchingOption (value, options) {\n  for (var i = 0, l = options.length; i < l; i++) {\n    if (looseEqual(getValue(options[i]), value)) {\n      return false\n    }\n  }\n  return true\n}\n\nfunction getValue (option) {\n  return '_value' in option\n    ? option._value\n    : option.value\n}\n\nfunction onCompositionStart (e) {\n  e.target.composing = true;\n}\n\nfunction onCompositionEnd (e) {\n  e.target.composing = false;\n  trigger(e.target, 'input');\n}\n\nfunction trigger (el, type) {\n  var e = document.createEvent('HTMLEvents');\n  e.initEvent(type, true, true);\n  el.dispatchEvent(e);\n}\n\n/*  */\n\n// recursively search for possible transition defined inside the component root\nfunction locateNode (vnode) {\n  return vnode.componentInstance && (!vnode.data || !vnode.data.transition)\n    ? locateNode(vnode.componentInstance._vnode)\n    : vnode\n}\n\nvar show = {\n  bind: function bind (el, ref, vnode) {\n    var value = ref.value;\n\n    vnode = locateNode(vnode);\n    var transition = vnode.data && vnode.data.transition;\n    var originalDisplay = el.__vOriginalDisplay =\n      el.style.display === 'none' ? '' : el.style.display;\n    if (value && transition && !isIE9) {\n      vnode.data.show = true;\n      enter(vnode, function () {\n        el.style.display = originalDisplay;\n      });\n    } else {\n      el.style.display = value ? originalDisplay : 'none';\n    }\n  },\n\n  update: function update (el, ref, vnode) {\n    var value = ref.value;\n    var oldValue = ref.oldValue;\n\n    /* istanbul ignore if */\n    if (value === oldValue) { return }\n    vnode = locateNode(vnode);\n    var transition = vnode.data && vnode.data.transition;\n    if (transition && !isIE9) {\n      vnode.data.show = true;\n      if (value) {\n        enter(vnode, function () {\n          el.style.display = el.__vOriginalDisplay;\n        });\n      } else {\n        leave(vnode, function () {\n          el.style.display = 'none';\n        });\n      }\n    } else {\n      el.style.display = value ? el.__vOriginalDisplay : 'none';\n    }\n  },\n\n  unbind: function unbind (\n    el,\n    binding,\n    vnode,\n    oldVnode,\n    isDestroy\n  ) {\n    if (!isDestroy) {\n      el.style.display = el.__vOriginalDisplay;\n    }\n  }\n};\n\nvar platformDirectives = {\n  model: model$1,\n  show: show\n};\n\n/*  */\n\n// Provides transition support for a single element/component.\n// supports transition mode (out-in / in-out)\n\nvar transitionProps = {\n  name: String,\n  appear: Boolean,\n  css: Boolean,\n  mode: String,\n  type: String,\n  enterClass: String,\n  leaveClass: String,\n  enterToClass: String,\n  leaveToClass: String,\n  enterActiveClass: String,\n  leaveActiveClass: String,\n  appearClass: String,\n  appearActiveClass: String,\n  appearToClass: String,\n  duration: [Number, String, Object]\n};\n\n// in case the child is also an abstract component, e.g. <keep-alive>\n// we want to recursively retrieve the real component to be rendered\nfunction getRealChild (vnode) {\n  var compOptions = vnode && vnode.componentOptions;\n  if (compOptions && compOptions.Ctor.options.abstract) {\n    return getRealChild(getFirstComponentChild(compOptions.children))\n  } else {\n    return vnode\n  }\n}\n\nfunction extractTransitionData (comp) {\n  var data = {};\n  var options = comp.$options;\n  // props\n  for (var key in options.propsData) {\n    data[key] = comp[key];\n  }\n  // events.\n  // extract listeners and pass them directly to the transition methods\n  var listeners = options._parentListeners;\n  for (var key$1 in listeners) {\n    data[camelize(key$1)] = listeners[key$1];\n  }\n  return data\n}\n\nfunction placeholder (h, rawChild) {\n  return /\\d-keep-alive$/.test(rawChild.tag)\n    ? h('keep-alive')\n    : null\n}\n\nfunction hasParentTransition (vnode) {\n  while ((vnode = vnode.parent)) {\n    if (vnode.data.transition) {\n      return true\n    }\n  }\n}\n\nfunction isSameChild (child, oldChild) {\n  return oldChild.key === child.key && oldChild.tag === child.tag\n}\n\nvar Transition = {\n  name: 'transition',\n  props: transitionProps,\n  abstract: true,\n\n  render: function render (h) {\n    var this$1 = this;\n\n    var children = this.$slots.default;\n    if (!children) {\n      return\n    }\n\n    // filter out text nodes (possible whitespaces)\n    children = children.filter(function (c) { return c.tag; });\n    /* istanbul ignore if */\n    if (!children.length) {\n      return\n    }\n\n    // warn multiple elements\n    if (\"development\" !== 'production' && children.length > 1) {\n      warn(\n        '<transition> can only be used on a single element. Use ' +\n        '<transition-group> for lists.',\n        this.$parent\n      );\n    }\n\n    var mode = this.mode;\n\n    // warn invalid mode\n    if (\"development\" !== 'production' &&\n        mode && mode !== 'in-out' && mode !== 'out-in') {\n      warn(\n        'invalid <transition> mode: ' + mode,\n        this.$parent\n      );\n    }\n\n    var rawChild = children[0];\n\n    // if this is a component root node and the component's\n    // parent container node also has transition, skip.\n    if (hasParentTransition(this.$vnode)) {\n      return rawChild\n    }\n\n    // apply transition data to child\n    // use getRealChild() to ignore abstract components e.g. keep-alive\n    var child = getRealChild(rawChild);\n    /* istanbul ignore if */\n    if (!child) {\n      return rawChild\n    }\n\n    if (this._leaving) {\n      return placeholder(h, rawChild)\n    }\n\n    // ensure a key that is unique to the vnode type and to this transition\n    // component instance. This key will be used to remove pending leaving nodes\n    // during entering.\n    var id = \"__transition-\" + (this._uid) + \"-\";\n    child.key = child.key == null\n      ? id + child.tag\n      : isPrimitive(child.key)\n        ? (String(child.key).indexOf(id) === 0 ? child.key : id + child.key)\n        : child.key;\n\n    var data = (child.data || (child.data = {})).transition = extractTransitionData(this);\n    var oldRawChild = this._vnode;\n    var oldChild = getRealChild(oldRawChild);\n\n    // mark v-show\n    // so that the transition module can hand over the control to the directive\n    if (child.data.directives && child.data.directives.some(function (d) { return d.name === 'show'; })) {\n      child.data.show = true;\n    }\n\n    if (oldChild && oldChild.data && !isSameChild(child, oldChild)) {\n      // replace old child transition data with fresh one\n      // important for dynamic transitions!\n      var oldData = oldChild && (oldChild.data.transition = extend({}, data));\n      // handle transition mode\n      if (mode === 'out-in') {\n        // return placeholder node and queue update when leave finishes\n        this._leaving = true;\n        mergeVNodeHook(oldData, 'afterLeave', function () {\n          this$1._leaving = false;\n          this$1.$forceUpdate();\n        });\n        return placeholder(h, rawChild)\n      } else if (mode === 'in-out') {\n        var delayedLeave;\n        var performLeave = function () { delayedLeave(); };\n        mergeVNodeHook(data, 'afterEnter', performLeave);\n        mergeVNodeHook(data, 'enterCancelled', performLeave);\n        mergeVNodeHook(oldData, 'delayLeave', function (leave) { delayedLeave = leave; });\n      }\n    }\n\n    return rawChild\n  }\n};\n\n/*  */\n\n// Provides transition support for list items.\n// supports move transitions using the FLIP technique.\n\n// Because the vdom's children update algorithm is \"unstable\" - i.e.\n// it doesn't guarantee the relative positioning of removed elements,\n// we force transition-group to update its children into two passes:\n// in the first pass, we remove all nodes that need to be removed,\n// triggering their leaving transition; in the second pass, we insert/move\n// into the final desired state. This way in the second pass removed\n// nodes will remain where they should be.\n\nvar props = extend({\n  tag: String,\n  moveClass: String\n}, transitionProps);\n\ndelete props.mode;\n\nvar TransitionGroup = {\n  props: props,\n\n  render: function render (h) {\n    var tag = this.tag || this.$vnode.data.tag || 'span';\n    var map = Object.create(null);\n    var prevChildren = this.prevChildren = this.children;\n    var rawChildren = this.$slots.default || [];\n    var children = this.children = [];\n    var transitionData = extractTransitionData(this);\n\n    for (var i = 0; i < rawChildren.length; i++) {\n      var c = rawChildren[i];\n      if (c.tag) {\n        if (c.key != null && String(c.key).indexOf('__vlist') !== 0) {\n          children.push(c);\n          map[c.key] = c\n          ;(c.data || (c.data = {})).transition = transitionData;\n        } else {\n          var opts = c.componentOptions;\n          var name = opts ? (opts.Ctor.options.name || opts.tag || '') : c.tag;\n          warn((\"<transition-group> children must be keyed: <\" + name + \">\"));\n        }\n      }\n    }\n\n    if (prevChildren) {\n      var kept = [];\n      var removed = [];\n      for (var i$1 = 0; i$1 < prevChildren.length; i$1++) {\n        var c$1 = prevChildren[i$1];\n        c$1.data.transition = transitionData;\n        c$1.data.pos = c$1.elm.getBoundingClientRect();\n        if (map[c$1.key]) {\n          kept.push(c$1);\n        } else {\n          removed.push(c$1);\n        }\n      }\n      this.kept = h(tag, null, kept);\n      this.removed = removed;\n    }\n\n    return h(tag, null, children)\n  },\n\n  beforeUpdate: function beforeUpdate () {\n    // force removing pass\n    this.__patch__(\n      this._vnode,\n      this.kept,\n      false, // hydrating\n      true // removeOnly (!important, avoids unnecessary moves)\n    );\n    this._vnode = this.kept;\n  },\n\n  updated: function updated () {\n    var children = this.prevChildren;\n    var moveClass = this.moveClass || ((this.name || 'v') + '-move');\n    if (!children.length || !this.hasMove(children[0].elm, moveClass)) {\n      return\n    }\n\n    // we divide the work into three loops to avoid mixing DOM reads and writes\n    // in each iteration - which helps prevent layout thrashing.\n    children.forEach(callPendingCbs);\n    children.forEach(recordPosition);\n    children.forEach(applyTranslation);\n\n    // force reflow to put everything in position\n    var body = document.body;\n    var f = body.offsetHeight; // eslint-disable-line\n\n    children.forEach(function (c) {\n      if (c.data.moved) {\n        var el = c.elm;\n        var s = el.style;\n        addTransitionClass(el, moveClass);\n        s.transform = s.WebkitTransform = s.transitionDuration = '';\n        el.addEventListener(transitionEndEvent, el._moveCb = function cb (e) {\n          if (!e || /transform$/.test(e.propertyName)) {\n            el.removeEventListener(transitionEndEvent, cb);\n            el._moveCb = null;\n            removeTransitionClass(el, moveClass);\n          }\n        });\n      }\n    });\n  },\n\n  methods: {\n    hasMove: function hasMove (el, moveClass) {\n      /* istanbul ignore if */\n      if (!hasTransition) {\n        return false\n      }\n      if (this._hasMove != null) {\n        return this._hasMove\n      }\n      // Detect whether an element with the move class applied has\n      // CSS transitions. Since the element may be inside an entering\n      // transition at this very moment, we make a clone of it and remove\n      // all other transition classes applied to ensure only the move class\n      // is applied.\n      var clone = el.cloneNode();\n      if (el._transitionClasses) {\n        el._transitionClasses.forEach(function (cls) { removeClass(clone, cls); });\n      }\n      addClass(clone, moveClass);\n      clone.style.display = 'none';\n      this.$el.appendChild(clone);\n      var info = getTransitionInfo(clone);\n      this.$el.removeChild(clone);\n      return (this._hasMove = info.hasTransform)\n    }\n  }\n};\n\nfunction callPendingCbs (c) {\n  /* istanbul ignore if */\n  if (c.elm._moveCb) {\n    c.elm._moveCb();\n  }\n  /* istanbul ignore if */\n  if (c.elm._enterCb) {\n    c.elm._enterCb();\n  }\n}\n\nfunction recordPosition (c) {\n  c.data.newPos = c.elm.getBoundingClientRect();\n}\n\nfunction applyTranslation (c) {\n  var oldPos = c.data.pos;\n  var newPos = c.data.newPos;\n  var dx = oldPos.left - newPos.left;\n  var dy = oldPos.top - newPos.top;\n  if (dx || dy) {\n    c.data.moved = true;\n    var s = c.elm.style;\n    s.transform = s.WebkitTransform = \"translate(\" + dx + \"px,\" + dy + \"px)\";\n    s.transitionDuration = '0s';\n  }\n}\n\nvar platformComponents = {\n  Transition: Transition,\n  TransitionGroup: TransitionGroup\n};\n\n/*  */\n\n// install platform specific utils\nVue$2.config.mustUseProp = mustUseProp;\nVue$2.config.isReservedTag = isReservedTag;\nVue$2.config.getTagNamespace = getTagNamespace;\nVue$2.config.isUnknownElement = isUnknownElement;\n\n// install platform runtime directives & components\nextend(Vue$2.options.directives, platformDirectives);\nextend(Vue$2.options.components, platformComponents);\n\n// install platform patch function\nVue$2.prototype.__patch__ = inBrowser ? patch : noop;\n\n// public mount method\nVue$2.prototype.$mount = function (\n  el,\n  hydrating\n) {\n  el = el && inBrowser ? query(el) : undefined;\n  return mountComponent(this, el, hydrating)\n};\n\n// devtools global hook\n/* istanbul ignore next */\nsetTimeout(function () {\n  if (config.devtools) {\n    if (devtools) {\n      devtools.emit('init', Vue$2);\n    } else if (\"development\" !== 'production' && isChrome) {\n      console[console.info ? 'info' : 'log'](\n        'Download the Vue Devtools extension for a better development experience:\\n' +\n        'https://github.com/vuejs/vue-devtools'\n      );\n    }\n  }\n  if (\"development\" !== 'production' &&\n      config.productionTip !== false &&\n      inBrowser && typeof console !== 'undefined') {\n    console[console.info ? 'info' : 'log'](\n      \"You are running Vue in development mode.\\n\" +\n      \"Make sure to turn on production mode when deploying for production.\\n\" +\n      \"See more tips at https://vuejs.org/guide/deployment.html\"\n    );\n  }\n}, 0);\n\nreturn Vue$2;\n\n})));\n"
  },
  {
    "path": "static/wangEditor/wangEditor.d.ts",
    "content": "/**\n * @description 入口文件\n * @author wangfupeng\n */\nimport './assets/style/common.less';\nimport './assets/style/icon.less';\nimport './assets/style/menus.less';\nimport './assets/style/text.less';\nimport './assets/style/panel.less';\nimport './assets/style/droplist.less';\nimport './utils/polyfill';\nimport Editor from './editor/index';\nexport * from './menus/menu-constructors/index';\nexport default Editor;\n"
  },
  {
    "path": "static/wangEditor/wangEditor.js",
    "content": "(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"wangEditor\"] = factory();\n\telse\n\t\troot[\"wangEditor\"] = factory();\n})(window, function() {\nreturn /******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId]) {\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/ \t\t}\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\ti: moduleId,\n/******/ \t\t\tl: false,\n/******/ \t\t\texports: {}\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.l = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// define getter function for harmony exports\n/******/ \t__webpack_require__.d = function(exports, name, getter) {\n/******/ \t\tif(!__webpack_require__.o(exports, name)) {\n/******/ \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n/******/ \t\t}\n/******/ \t};\n/******/\n/******/ \t// define __esModule on exports\n/******/ \t__webpack_require__.r = function(exports) {\n/******/ \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n/******/ \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n/******/ \t\t}\n/******/ \t\tObject.defineProperty(exports, '__esModule', { value: true });\n/******/ \t};\n/******/\n/******/ \t// create a fake namespace object\n/******/ \t// mode & 1: value is a module id, require it\n/******/ \t// mode & 2: merge all properties of value into the ns\n/******/ \t// mode & 4: return value when already ns object\n/******/ \t// mode & 8|1: behave like require\n/******/ \t__webpack_require__.t = function(value, mode) {\n/******/ \t\tif(mode & 1) value = __webpack_require__(value);\n/******/ \t\tif(mode & 8) return value;\n/******/ \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n/******/ \t\tvar ns = Object.create(null);\n/******/ \t\t__webpack_require__.r(ns);\n/******/ \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n/******/ \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n/******/ \t\treturn ns;\n/******/ \t};\n/******/\n/******/ \t// getDefaultExport function for compatibility with non-harmony modules\n/******/ \t__webpack_require__.n = function(module) {\n/******/ \t\tvar getter = module && module.__esModule ?\n/******/ \t\t\tfunction getDefault() { return module['default']; } :\n/******/ \t\t\tfunction getModuleExports() { return module; };\n/******/ \t\t__webpack_require__.d(getter, 'a', getter);\n/******/ \t\treturn getter;\n/******/ \t};\n/******/\n/******/ \t// Object.prototype.hasOwnProperty.call\n/******/ \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(__webpack_require__.s = 146);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ (function(module, exports) {\n\nfunction _interopRequireDefault(obj) {\n  return obj && obj.__esModule ? obj : {\n    \"default\": obj\n  };\n}\n\nmodule.exports = _interopRequireDefault;\nmodule.exports[\"default\"] = module.exports, module.exports.__esModule = true;\n\n/***/ }),\n/* 1 */\n/***/ (function(module, exports, __webpack_require__) {\n\nmodule.exports = __webpack_require__(147);\n\n/***/ }),\n/* 2 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"__extends\", function() { return __extends; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"__assign\", function() { return __assign; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"__rest\", function() { return __rest; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"__decorate\", function() { return __decorate; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"__param\", function() { return __param; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"__metadata\", function() { return __metadata; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"__awaiter\", function() { return __awaiter; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"__generator\", function() { return __generator; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"__createBinding\", function() { return __createBinding; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"__exportStar\", function() { return __exportStar; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"__values\", function() { return __values; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"__read\", function() { return __read; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"__spread\", function() { return __spread; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"__spreadArrays\", function() { return __spreadArrays; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"__spreadArray\", function() { return __spreadArray; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"__await\", function() { return __await; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"__asyncGenerator\", function() { return __asyncGenerator; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"__asyncDelegator\", function() { return __asyncDelegator; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"__asyncValues\", function() { return __asyncValues; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"__makeTemplateObject\", function() { return __makeTemplateObject; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"__importStar\", function() { return __importStar; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"__importDefault\", function() { return __importDefault; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"__classPrivateFieldGet\", function() { return __classPrivateFieldGet; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"__classPrivateFieldSet\", function() { return __classPrivateFieldSet; });\n/*! *****************************************************************************\nCopyright (c) Microsoft Corporation.\n\nPermission to use, copy, modify, and/or distribute this software for any\npurpose with or without fee is hereby granted.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\nPERFORMANCE OF THIS SOFTWARE.\n***************************************************************************** */\n/* global Reflect, Promise */\n\nvar extendStatics = function(d, b) {\n    extendStatics = Object.setPrototypeOf ||\n        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n        function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n    return extendStatics(d, b);\n};\n\nfunction __extends(d, b) {\n    if (typeof b !== \"function\" && b !== null)\n        throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n    extendStatics(d, b);\n    function __() { this.constructor = d; }\n    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n}\n\nvar __assign = function() {\n    __assign = Object.assign || function __assign(t) {\n        for (var s, i = 1, n = arguments.length; i < n; i++) {\n            s = arguments[i];\n            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n        }\n        return t;\n    }\n    return __assign.apply(this, arguments);\n}\n\nfunction __rest(s, e) {\n    var t = {};\n    for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n        t[p] = s[p];\n    if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n        for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n            if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n                t[p[i]] = s[p[i]];\n        }\n    return t;\n}\n\nfunction __decorate(decorators, target, key, desc) {\n    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n    if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n    return c > 3 && r && Object.defineProperty(target, key, r), r;\n}\n\nfunction __param(paramIndex, decorator) {\n    return function (target, key) { decorator(target, key, paramIndex); }\n}\n\nfunction __metadata(metadataKey, metadataValue) {\n    if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\n}\n\nfunction __awaiter(thisArg, _arguments, P, generator) {\n    function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n    return new (P || (P = Promise))(function (resolve, reject) {\n        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n        function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n        function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n        step((generator = generator.apply(thisArg, _arguments || [])).next());\n    });\n}\n\nfunction __generator(thisArg, body) {\n    var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n    return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n    function verb(n) { return function (v) { return step([n, v]); }; }\n    function step(op) {\n        if (f) throw new TypeError(\"Generator is already executing.\");\n        while (_) try {\n            if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n            if (y = 0, t) op = [op[0] & 2, t.value];\n            switch (op[0]) {\n                case 0: case 1: t = op; break;\n                case 4: _.label++; return { value: op[1], done: false };\n                case 5: _.label++; y = op[1]; op = [0]; continue;\n                case 7: op = _.ops.pop(); _.trys.pop(); continue;\n                default:\n                    if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n                    if (t[2]) _.ops.pop();\n                    _.trys.pop(); continue;\n            }\n            op = body.call(thisArg, _);\n        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n        if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n    }\n}\n\nvar __createBinding = Object.create ? (function(o, m, k, k2) {\n    if (k2 === undefined) k2 = k;\n    Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n    if (k2 === undefined) k2 = k;\n    o[k2] = m[k];\n});\n\nfunction __exportStar(m, o) {\n    for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\n}\n\nfunction __values(o) {\n    var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\n    if (m) return m.call(o);\n    if (o && typeof o.length === \"number\") return {\n        next: function () {\n            if (o && i >= o.length) o = void 0;\n            return { value: o && o[i++], done: !o };\n        }\n    };\n    throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\n}\n\nfunction __read(o, n) {\n    var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n    if (!m) return o;\n    var i = m.call(o), r, ar = [], e;\n    try {\n        while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n    }\n    catch (error) { e = { error: error }; }\n    finally {\n        try {\n            if (r && !r.done && (m = i[\"return\"])) m.call(i);\n        }\n        finally { if (e) throw e.error; }\n    }\n    return ar;\n}\n\n/** @deprecated */\nfunction __spread() {\n    for (var ar = [], i = 0; i < arguments.length; i++)\n        ar = ar.concat(__read(arguments[i]));\n    return ar;\n}\n\n/** @deprecated */\nfunction __spreadArrays() {\n    for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\n    for (var r = Array(s), k = 0, i = 0; i < il; i++)\n        for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\n            r[k] = a[j];\n    return r;\n}\n\nfunction __spreadArray(to, from, pack) {\n    if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n        if (ar || !(i in from)) {\n            if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n            ar[i] = from[i];\n        }\n    }\n    return to.concat(ar || Array.prototype.slice.call(from));\n}\n\nfunction __await(v) {\n    return this instanceof __await ? (this.v = v, this) : new __await(v);\n}\n\nfunction __asyncGenerator(thisArg, _arguments, generator) {\n    if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n    var g = generator.apply(thisArg, _arguments || []), i, q = [];\n    return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\n    function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\n    function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\n    function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\n    function fulfill(value) { resume(\"next\", value); }\n    function reject(value) { resume(\"throw\", value); }\n    function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\n}\n\nfunction __asyncDelegator(o) {\n    var i, p;\n    return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\n    function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\n}\n\nfunction __asyncValues(o) {\n    if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n    var m = o[Symbol.asyncIterator], i;\n    return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\n    function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\n    function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\n}\n\nfunction __makeTemplateObject(cooked, raw) {\n    if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\n    return cooked;\n};\n\nvar __setModuleDefault = Object.create ? (function(o, v) {\n    Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n    o[\"default\"] = v;\n};\n\nfunction __importStar(mod) {\n    if (mod && mod.__esModule) return mod;\n    var result = {};\n    if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n    __setModuleDefault(result, mod);\n    return result;\n}\n\nfunction __importDefault(mod) {\n    return (mod && mod.__esModule) ? mod : { default: mod };\n}\n\nfunction __classPrivateFieldGet(receiver, state, kind, f) {\n    if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\n    if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\n    return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\n}\n\nfunction __classPrivateFieldSet(receiver, state, value, kind, f) {\n    if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\n    if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\n    if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\n    return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\n}\n\n\n/***/ }),\n/* 3 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * @description 封装 DOM 操作\n * @wangfupeng\n */\n\nvar _interopRequireDefault = __webpack_require__(0);\n\nvar _defineProperty = _interopRequireDefault(__webpack_require__(1));\n\nvar _isArray = _interopRequireDefault(__webpack_require__(96));\n\nvar _forEach = _interopRequireDefault(__webpack_require__(4));\n\nvar _map = _interopRequireDefault(__webpack_require__(27));\n\nvar _trim = _interopRequireDefault(__webpack_require__(16));\n\nvar _map2 = _interopRequireDefault(__webpack_require__(125));\n\nvar _indexOf = _interopRequireDefault(__webpack_require__(28));\n\nvar _splice = _interopRequireDefault(__webpack_require__(99));\n\nvar _filter = _interopRequireDefault(__webpack_require__(76));\n\nvar _includes = _interopRequireDefault(__webpack_require__(46));\n\nvar _bind = _interopRequireDefault(__webpack_require__(61));\n\n(0, _defineProperty[\"default\"])(exports, \"__esModule\", {\n  value: true\n});\nexports.DomElement = void 0;\n\nvar tslib_1 = __webpack_require__(2);\n\nvar util_1 = __webpack_require__(6);\n\nvar AGENT_EVENTS = [];\n/**\n * 根据 html 字符串创建 elem\n * @param {String} html html\n */\n\nfunction _createElemByHTML(html) {\n  var div = document.createElement('div');\n  div.innerHTML = html;\n  var elems = div.children;\n  return util_1.toArray(elems);\n}\n/**\n * 判断是否是 DOM List\n * @param selector DOM 元素或列表\n */\n\n\nfunction _isDOMList(selector) {\n  if (!selector) {\n    return false;\n  }\n\n  if (selector instanceof HTMLCollection || selector instanceof NodeList) {\n    return true;\n  }\n\n  return false;\n}\n/**\n * 封装 querySelectorAll\n * @param selector css 选择器\n */\n\n\nfunction _querySelectorAll(selector) {\n  var elems = document.querySelectorAll(selector);\n  return util_1.toArray(elems);\n}\n/**\n * 封装 _styleArrTrim\n * @param styleArr css\n */\n\n\nfunction _styleArrTrim(style) {\n  var styleArr = [];\n  var resultArr = [];\n\n  if (!(0, _isArray[\"default\"])(style)) {\n    // 有 style，将 style 按照 `;` 拆分为数组\n    styleArr = style.split(';');\n  } else {\n    styleArr = style;\n  }\n\n  (0, _forEach[\"default\"])(styleArr).call(styleArr, function (item) {\n    var _context;\n\n    // 对每项样式，按照 : 拆分为 key 和 value\n    var arr = (0, _map[\"default\"])(_context = item.split(':')).call(_context, function (i) {\n      return (0, _trim[\"default\"])(i).call(i);\n    });\n\n    if (arr.length === 2) {\n      resultArr.push(arr[0] + ':' + arr[1]);\n    }\n  });\n  return resultArr;\n} // 构造函数\n\n\nvar DomElement = function () {\n  /**\n   * 构造函数\n   * @param selector 任一类型的选择器\n   */\n  function DomElement(selector) {\n    // 初始化属性\n    this.elems = [];\n    this.length = this.elems.length;\n    this.dataSource = new _map2[\"default\"]();\n\n    if (!selector) {\n      return;\n    } // 原本就是 DomElement 实例，则直接返回\n\n\n    if (selector instanceof DomElement) {\n      return selector;\n    }\n\n    var selectorResult = []; // 存储查询结果\n\n    var nodeType = selector instanceof Node ? selector.nodeType : -1;\n    this.selector = selector;\n\n    if (nodeType === 1 || nodeType === 9) {\n      selectorResult = [selector];\n    } else if (_isDOMList(selector)) {\n      // DOM List\n      selectorResult = util_1.toArray(selector);\n    } else if (selector instanceof Array) {\n      // Element 数组（其他数据类型，暂时忽略）\n      selectorResult = selector;\n    } else if (typeof selector === 'string') {\n      var _context2;\n\n      // 字符串\n      var tmpSelector = (0, _trim[\"default\"])(_context2 = selector.replace('/\\n/mg', '')).call(_context2);\n\n      if ((0, _indexOf[\"default\"])(tmpSelector).call(tmpSelector, '<') === 0) {\n        // 如 <div>\n        selectorResult = _createElemByHTML(tmpSelector);\n      } else {\n        // 如 #id .class\n        selectorResult = _querySelectorAll(tmpSelector);\n      }\n    }\n\n    var length = selectorResult.length;\n\n    if (!length) {\n      // 空数组\n      return this;\n    } // 加入 DOM 节点\n\n\n    var i = 0;\n\n    for (; i < length; i++) {\n      this.elems.push(selectorResult[i]);\n    }\n\n    this.length = length;\n  }\n\n  (0, _defineProperty[\"default\"])(DomElement.prototype, \"id\", {\n    /**\n     * 获取元素 id\n     */\n    get: function get() {\n      return this.elems[0].id;\n    },\n    enumerable: false,\n    configurable: true\n  });\n  /**\n   * 遍历所有元素，执行回调函数\n   * @param fn 回调函数\n   */\n\n  DomElement.prototype.forEach = function (fn) {\n    for (var i = 0; i < this.length; i++) {\n      var elem = this.elems[i];\n      var result = fn.call(elem, elem, i);\n\n      if (result === false) {\n        break;\n      }\n    }\n\n    return this;\n  };\n  /**\n   * 克隆元素\n   * @param deep 是否深度克隆\n   */\n\n\n  DomElement.prototype.clone = function (deep) {\n    var _context3;\n\n    if (deep === void 0) {\n      deep = false;\n    }\n\n    var cloneList = [];\n    (0, _forEach[\"default\"])(_context3 = this.elems).call(_context3, function (elem) {\n      cloneList.push(elem.cloneNode(!!deep));\n    });\n    return $(cloneList);\n  };\n  /**\n   * 获取第几个元素\n   * @param index index\n   */\n\n\n  DomElement.prototype.get = function (index) {\n    if (index === void 0) {\n      index = 0;\n    }\n\n    var length = this.length;\n\n    if (index >= length) {\n      index = index % length;\n    }\n\n    return $(this.elems[index]);\n  };\n  /**\n   * 获取第一个元素\n   */\n\n\n  DomElement.prototype.first = function () {\n    return this.get(0);\n  };\n  /**\n   * 获取最后一个元素\n   */\n\n\n  DomElement.prototype.last = function () {\n    var length = this.length;\n    return this.get(length - 1);\n  };\n\n  DomElement.prototype.on = function (type, selector, fn) {\n    var _context4;\n\n    if (!type) return this; // 没有 selector ，只有 type 和 fn\n\n    if (typeof selector === 'function') {\n      fn = selector;\n      selector = '';\n    }\n\n    return (0, _forEach[\"default\"])(_context4 = this).call(_context4, function (elem) {\n      // 没有事件代理\n      if (!selector) {\n        // 无代理\n        elem.addEventListener(type, fn);\n        return;\n      } // 有事件代理\n\n\n      var agentFn = function agentFn(e) {\n        var target = e.target;\n\n        if (target.matches(selector)) {\n          ;\n          fn.call(target, e);\n        }\n      };\n\n      elem.addEventListener(type, agentFn); // 缓存代理事件\n\n      AGENT_EVENTS.push({\n        elem: elem,\n        selector: selector,\n        fn: fn,\n        agentFn: agentFn\n      });\n    });\n  };\n\n  DomElement.prototype.off = function (type, selector, fn) {\n    var _context5;\n\n    if (!type) return this; // 没有 selector ，只有 type 和 fn\n\n    if (typeof selector === 'function') {\n      fn = selector;\n      selector = '';\n    }\n\n    return (0, _forEach[\"default\"])(_context5 = this).call(_context5, function (elem) {\n      // 解绑事件代理\n      if (selector) {\n        var idx = -1;\n\n        for (var i = 0; i < AGENT_EVENTS.length; i++) {\n          var item = AGENT_EVENTS[i];\n\n          if (item.selector === selector && item.fn === fn && item.elem === elem) {\n            idx = i;\n            break;\n          }\n        }\n\n        if (idx !== -1) {\n          var agentFn = (0, _splice[\"default\"])(AGENT_EVENTS).call(AGENT_EVENTS, idx, 1)[0].agentFn;\n          elem.removeEventListener(type, agentFn);\n        }\n      } else {\n        // @ts-ignore\n        elem.removeEventListener(type, fn);\n      }\n    });\n  };\n\n  DomElement.prototype.attr = function (key, val) {\n    var _context6;\n\n    if (val == null) {\n      // 获取数据\n      return this.elems[0].getAttribute(key) || '';\n    } // 否则，设置属性\n\n\n    return (0, _forEach[\"default\"])(_context6 = this).call(_context6, function (elem) {\n      elem.setAttribute(key, val);\n    });\n  };\n  /**\n   * 删除 属性\n   * @param key key\n   */\n\n\n  DomElement.prototype.removeAttr = function (key) {\n    var _context7;\n\n    (0, _forEach[\"default\"])(_context7 = this).call(_context7, function (elem) {\n      elem.removeAttribute(key);\n    });\n  };\n  /**\n   * 添加 css class\n   * @param className css class\n   */\n\n\n  DomElement.prototype.addClass = function (className) {\n    var _context8;\n\n    if (!className) {\n      return this;\n    }\n\n    return (0, _forEach[\"default\"])(_context8 = this).call(_context8, function (elem) {\n      if (elem.className) {\n        // 当前有 class\n        var arr = elem.className.split(/\\s/);\n        arr = (0, _filter[\"default\"])(arr).call(arr, function (item) {\n          return !!(0, _trim[\"default\"])(item).call(item);\n        }); // 添加 class\n\n        if ((0, _indexOf[\"default\"])(arr).call(arr, className) < 0) {\n          arr.push(className);\n        } // 修改 elem.class\n\n\n        elem.className = arr.join(' ');\n      } else {\n        // 当前没有 class\n        elem.className = className;\n      }\n    });\n  };\n  /**\n   * 添加 css class\n   * @param className css class\n   */\n\n\n  DomElement.prototype.removeClass = function (className) {\n    var _context9;\n\n    if (!className) {\n      return this;\n    }\n\n    return (0, _forEach[\"default\"])(_context9 = this).call(_context9, function (elem) {\n      if (!elem.className) {\n        // 当前无 class\n        return;\n      }\n\n      var arr = elem.className.split(/\\s/);\n      arr = (0, _filter[\"default\"])(arr).call(arr, function (item) {\n        item = (0, _trim[\"default\"])(item).call(item); // 删除 class\n\n        if (!item || item === className) {\n          return false;\n        }\n\n        return true;\n      }); // 修改 elem.class\n\n      elem.className = arr.join(' ');\n    });\n  };\n  /**\n   * 是否有传入的 css class\n   * @param className css class\n   */\n\n\n  DomElement.prototype.hasClass = function (className) {\n    if (!className) {\n      return false;\n    }\n\n    var elem = this.elems[0];\n\n    if (!elem.className) {\n      // 当前无 class\n      return false;\n    }\n\n    var arr = elem.className.split(/\\s/);\n    return (0, _includes[\"default\"])(arr).call(arr, className); // 是否包含\n  };\n  /**\n   * 修改 css\n   * @param key css key\n   * @param val css value\n   */\n  // css(key: string): string\n\n\n  DomElement.prototype.css = function (key, val) {\n    var _context10;\n\n    var currentStyle;\n\n    if (val == '') {\n      currentStyle = '';\n    } else {\n      currentStyle = key + \":\" + val + \";\";\n    }\n\n    return (0, _forEach[\"default\"])(_context10 = this).call(_context10, function (elem) {\n      var _context11;\n\n      var style = (0, _trim[\"default\"])(_context11 = elem.getAttribute('style') || '').call(_context11);\n\n      if (style) {\n        // 有 style，将 style 按照 `;` 拆分为数组\n        var resultArr = _styleArrTrim(style); // 替换现有的 style\n\n\n        resultArr = (0, _map[\"default\"])(resultArr).call(resultArr, function (item) {\n          if ((0, _indexOf[\"default\"])(item).call(item, key) === 0) {\n            return currentStyle;\n          } else {\n            return item;\n          }\n        }); // 新增 style\n\n        if (currentStyle != '' && (0, _indexOf[\"default\"])(resultArr).call(resultArr, currentStyle) < 0) {\n          resultArr.push(currentStyle);\n        } // 去掉 空白\n\n\n        if (currentStyle == '') {\n          resultArr = _styleArrTrim(resultArr);\n        } // 重新设置 style\n\n\n        elem.setAttribute('style', resultArr.join('; '));\n      } else {\n        // 当前没有 style\n        elem.setAttribute('style', currentStyle);\n      }\n    });\n  };\n  /**\n   * 封装 getBoundingClientRect\n   */\n\n\n  DomElement.prototype.getBoundingClientRect = function () {\n    var elem = this.elems[0];\n    return elem.getBoundingClientRect();\n  };\n  /**\n   * 显示\n   */\n\n\n  DomElement.prototype.show = function () {\n    return this.css('display', 'block');\n  };\n  /**\n   * 隐藏\n   */\n\n\n  DomElement.prototype.hide = function () {\n    return this.css('display', 'none');\n  };\n  /**\n   * 获取子节点（只有 DOM 元素）\n   */\n\n\n  DomElement.prototype.children = function () {\n    var elem = this.elems[0];\n\n    if (!elem) {\n      return null;\n    }\n\n    return $(elem.children);\n  };\n  /**\n   * 获取子节点（包括文本节点）\n   */\n\n\n  DomElement.prototype.childNodes = function () {\n    var elem = this.elems[0];\n\n    if (!elem) {\n      return null;\n    }\n\n    return $(elem.childNodes);\n  };\n  /**\n   * 将子元素全部替换\n   * @param $children 新的child节点\n   */\n\n\n  DomElement.prototype.replaceChildAll = function ($children) {\n    var parent = this.getNode();\n    var elem = this.elems[0];\n\n    while (elem.hasChildNodes()) {\n      parent.firstChild && elem.removeChild(parent.firstChild);\n    }\n\n    this.append($children);\n  };\n  /**\n   * 增加子节点\n   * @param $children 子节点\n   */\n\n\n  DomElement.prototype.append = function ($children) {\n    var _context12;\n\n    return (0, _forEach[\"default\"])(_context12 = this).call(_context12, function (elem) {\n      (0, _forEach[\"default\"])($children).call($children, function (child) {\n        elem.appendChild(child);\n      });\n    });\n  };\n  /**\n   * 移除当前节点\n   */\n\n\n  DomElement.prototype.remove = function () {\n    var _context13;\n\n    return (0, _forEach[\"default\"])(_context13 = this).call(_context13, function (elem) {\n      if (elem.remove) {\n        elem.remove();\n      } else {\n        var parent_1 = elem.parentElement;\n        parent_1 && parent_1.removeChild(elem);\n      }\n    });\n  };\n  /**\n   * 当前元素，是否包含某个子元素\n   * @param $child 子元素\n   */\n\n\n  DomElement.prototype.isContain = function ($child) {\n    var elem = this.elems[0];\n    var child = $child.elems[0];\n    return elem.contains(child);\n  };\n  /**\n   * 获取当前元素 nodeName\n   */\n\n\n  DomElement.prototype.getNodeName = function () {\n    var elem = this.elems[0];\n    return elem.nodeName;\n  };\n  /**\n   * 根据元素位置获取元素节点（默认获取0位置的节点）\n   * @param n 元素节点位置\n   */\n\n\n  DomElement.prototype.getNode = function (n) {\n    if (n === void 0) {\n      n = 0;\n    }\n\n    var elem;\n    elem = this.elems[n];\n    return elem;\n  };\n  /**\n   * 查询\n   * @param selector css 选择器\n   */\n\n\n  DomElement.prototype.find = function (selector) {\n    var elem = this.elems[0];\n    return $(elem.querySelectorAll(selector));\n  };\n\n  DomElement.prototype.text = function (val) {\n    if (!val) {\n      // 获取 text\n      var elem = this.elems[0];\n      return elem.innerHTML.replace(/<[^>]+>/g, function () {\n        return '';\n      });\n    } else {\n      var _context14;\n\n      // 设置 text\n      return (0, _forEach[\"default\"])(_context14 = this).call(_context14, function (elem) {\n        elem.innerHTML = val;\n      });\n    }\n  };\n\n  DomElement.prototype.html = function (val) {\n    var elem = this.elems[0];\n\n    if (!val) {\n      // 获取 html\n      return elem.innerHTML;\n    } else {\n      // 设置 html\n      elem.innerHTML = val;\n      return this;\n    }\n  };\n  /**\n   * 获取元素 value\n   */\n\n\n  DomElement.prototype.val = function () {\n    var _context15;\n\n    var elem = this.elems[0];\n    return (0, _trim[\"default\"])(_context15 = elem.value).call(_context15); // 暂用 any\n  };\n  /**\n   * focus 到当前元素\n   */\n\n\n  DomElement.prototype.focus = function () {\n    var _context16;\n\n    return (0, _forEach[\"default\"])(_context16 = this).call(_context16, function (elem) {\n      elem.focus();\n    });\n  };\n  /**\n   * 当前元素前一个兄弟节点\n   */\n\n\n  DomElement.prototype.prev = function () {\n    var elem = this.elems[0];\n    return $(elem.previousElementSibling);\n  };\n  /**\n   * 当前元素后一个兄弟节点\n   * 不包括文本节点、注释节点）\n   */\n\n\n  DomElement.prototype.next = function () {\n    var elem = this.elems[0];\n    return $(elem.nextElementSibling);\n  };\n  /**\n   * 获取当前节点的下一个兄弟节点\n   * 包括文本节点、注释节点即回车、换行、空格、文本等等）\n   */\n\n\n  DomElement.prototype.getNextSibling = function () {\n    var elem = this.elems[0];\n    return $(elem.nextSibling);\n  };\n  /**\n   * 获取父元素\n   */\n\n\n  DomElement.prototype.parent = function () {\n    var elem = this.elems[0];\n    return $(elem.parentElement);\n  };\n  /**\n   * 查找父元素，直到满足 selector 条件\n   * @param selector css 选择器\n   * @param curElem 从哪个元素开始查找，默认为当前元素\n   */\n\n\n  DomElement.prototype.parentUntil = function (selector, curElem) {\n    var elem = curElem || this.elems[0];\n\n    if (elem.nodeName === 'BODY') {\n      return null;\n    }\n\n    var parent = elem.parentElement;\n\n    if (parent === null) {\n      return null;\n    }\n\n    if (parent.matches(selector)) {\n      // 找到，并返回\n      return $(parent);\n    } // 继续查找，递归\n\n\n    return this.parentUntil(selector, parent);\n  };\n  /**\n   * 查找父元素，直到满足 selector 条件,或者 到达 编辑区域容器以及菜单栏容器\n   * @param selector css 选择器\n   * @param curElem 从哪个元素开始查找，默认为当前元素\n   */\n\n\n  DomElement.prototype.parentUntilEditor = function (selector, editor, curElem) {\n    var elem = curElem || this.elems[0];\n\n    if ($(elem).equal(editor.$textContainerElem) || $(elem).equal(editor.$toolbarElem)) {\n      return null;\n    }\n\n    var parent = elem.parentElement;\n\n    if (parent === null) {\n      return null;\n    }\n\n    if (parent.matches(selector)) {\n      // 找到，并返回\n      return $(parent);\n    } // 继续查找，递归\n\n\n    return this.parentUntilEditor(selector, editor, parent);\n  };\n  /**\n   * 判读是否相等\n   * @param $elem 元素\n   */\n\n\n  DomElement.prototype.equal = function ($elem) {\n    if ($elem instanceof DomElement) {\n      return this.elems[0] === $elem.elems[0];\n    } else if ($elem instanceof HTMLElement) {\n      return this.elems[0] === $elem;\n    } else {\n      return false;\n    }\n  };\n  /**\n   * 将该元素插入到某个元素前面\n   * @param selector css 选择器\n   */\n\n\n  DomElement.prototype.insertBefore = function (selector) {\n    var _context17;\n\n    var $referenceNode = $(selector);\n    var referenceNode = $referenceNode.elems[0];\n\n    if (!referenceNode) {\n      return this;\n    }\n\n    return (0, _forEach[\"default\"])(_context17 = this).call(_context17, function (elem) {\n      var parent = referenceNode.parentNode;\n      parent === null || parent === void 0 ? void 0 : parent.insertBefore(elem, referenceNode);\n    });\n  };\n  /**\n   * 将该元素插入到selector元素后面\n   * @param selector css 选择器\n   */\n\n\n  DomElement.prototype.insertAfter = function (selector) {\n    var _context18;\n\n    var $referenceNode = $(selector);\n    var referenceNode = $referenceNode.elems[0];\n    var anchorNode = referenceNode && referenceNode.nextSibling;\n\n    if (!referenceNode) {\n      return this;\n    }\n\n    return (0, _forEach[\"default\"])(_context18 = this).call(_context18, function (elem) {\n      var parent = referenceNode.parentNode;\n\n      if (anchorNode) {\n        parent.insertBefore(elem, anchorNode);\n      } else {\n        parent.appendChild(elem);\n      }\n    });\n  };\n  /**\n   * 设置/获取 数据\n   * @param key key\n   * @param value value\n   */\n\n\n  DomElement.prototype.data = function (key, value) {\n    if (value != null) {\n      // 设置数据\n      this.dataSource.set(key, value);\n    } else {\n      // 获取数据\n      return this.dataSource.get(key);\n    }\n  };\n  /**\n   * 获取当前节点的顶级(段落)\n   * @param editor 富文本实例\n   */\n\n\n  DomElement.prototype.getNodeTop = function (editor) {\n    // 异常抛出，空的 DomElement 直接返回\n    if (this.length < 1) {\n      return this;\n    } // 获取父级元素，并判断是否是 编辑区域\n    // 如果是则返回当前节点\n\n\n    var $parent = this.parent(); // fix：添加当前元素与编辑区元素的比较，防止传入的当前元素就是编辑区元素而造成的获取顶级元素为空的情况\n\n    if (editor.$textElem.equal(this) || editor.$textElem.equal($parent)) {\n      return this;\n    } // 到了此处，即代表当前节点不是顶级段落\n    // 将当前节点存放于父节点的 prior 字段下\n    // 主要用于 回溯 子节点\n    // 例如：ul ol 等标签\n    // 实际操作的节点是 li 但是一个 ul ol 的子节点可能有多个\n    // 所以需要对其进行 回溯 找到对应的子节点\n\n\n    $parent.prior = this;\n    return $parent.getNodeTop(editor);\n  };\n  /**\n   * 获取当前 节点 基与上一个拥有相对或者解决定位的父容器的位置\n   * @param editor 富文本实例\n   */\n\n\n  DomElement.prototype.getOffsetData = function () {\n    var $node = this.elems[0];\n    return {\n      top: $node.offsetTop,\n      left: $node.offsetLeft,\n      width: $node.offsetWidth,\n      height: $node.offsetHeight,\n      parent: $node.offsetParent\n    };\n  };\n  /**\n   * 从上至下进行滚动\n   * @param top 滚动的值\n   */\n\n\n  DomElement.prototype.scrollTop = function (top) {\n    var $node = this.elems[0];\n    $node.scrollTo({\n      top: top\n    });\n  };\n\n  return DomElement;\n}();\n\nexports.DomElement = DomElement; // new 一个对象\n\nfunction $() {\n  var arg = [];\n\n  for (var _i = 0; _i < arguments.length; _i++) {\n    arg[_i] = arguments[_i];\n  }\n\n  return new ((0, _bind[\"default\"])(DomElement).apply(DomElement, tslib_1.__spreadArray([void 0], arg)))();\n}\n\nexports[\"default\"] = $;\n\n/***/ }),\n/* 4 */\n/***/ (function(module, exports, __webpack_require__) {\n\nmodule.exports = __webpack_require__(190);\n\n/***/ }),\n/* 5 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar global = __webpack_require__(8);\nvar getOwnPropertyDescriptor = __webpack_require__(77).f;\nvar isForced = __webpack_require__(109);\nvar path = __webpack_require__(11);\nvar bind = __webpack_require__(40);\nvar createNonEnumerableProperty = __webpack_require__(19);\nvar has = __webpack_require__(17);\n\nvar wrapConstructor = function (NativeConstructor) {\n  var Wrapper = function (a, b, c) {\n    if (this instanceof NativeConstructor) {\n      switch (arguments.length) {\n        case 0: return new NativeConstructor();\n        case 1: return new NativeConstructor(a);\n        case 2: return new NativeConstructor(a, b);\n      } return new NativeConstructor(a, b, c);\n    } return NativeConstructor.apply(this, arguments);\n  };\n  Wrapper.prototype = NativeConstructor.prototype;\n  return Wrapper;\n};\n\n/*\n  options.target      - name of the target object\n  options.global      - target is the global object\n  options.stat        - export as static methods of target\n  options.proto       - export as prototype methods of target\n  options.real        - real prototype method for the `pure` version\n  options.forced      - export even if the native feature is available\n  options.bind        - bind methods to the target, required for the `pure` version\n  options.wrap        - wrap constructors to preventing global pollution, required for the `pure` version\n  options.unsafe      - use the simple assignment of property instead of delete + defineProperty\n  options.sham        - add a flag to not completely full polyfills\n  options.enumerable  - export as enumerable property\n  options.noTargetGet - prevent calling a getter on target\n*/\nmodule.exports = function (options, source) {\n  var TARGET = options.target;\n  var GLOBAL = options.global;\n  var STATIC = options.stat;\n  var PROTO = options.proto;\n\n  var nativeSource = GLOBAL ? global : STATIC ? global[TARGET] : (global[TARGET] || {}).prototype;\n\n  var target = GLOBAL ? path : path[TARGET] || (path[TARGET] = {});\n  var targetPrototype = target.prototype;\n\n  var FORCED, USE_NATIVE, VIRTUAL_PROTOTYPE;\n  var key, sourceProperty, targetProperty, nativeProperty, resultProperty, descriptor;\n\n  for (key in source) {\n    FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);\n    // contains in native\n    USE_NATIVE = !FORCED && nativeSource && has(nativeSource, key);\n\n    targetProperty = target[key];\n\n    if (USE_NATIVE) if (options.noTargetGet) {\n      descriptor = getOwnPropertyDescriptor(nativeSource, key);\n      nativeProperty = descriptor && descriptor.value;\n    } else nativeProperty = nativeSource[key];\n\n    // export native or implementation\n    sourceProperty = (USE_NATIVE && nativeProperty) ? nativeProperty : source[key];\n\n    if (USE_NATIVE && typeof targetProperty === typeof sourceProperty) continue;\n\n    // bind timers to global for call from export context\n    if (options.bind && USE_NATIVE) resultProperty = bind(sourceProperty, global);\n    // wrap global constructors for prevent changs in this version\n    else if (options.wrap && USE_NATIVE) resultProperty = wrapConstructor(sourceProperty);\n    // make static versions for prototype methods\n    else if (PROTO && typeof sourceProperty == 'function') resultProperty = bind(Function.call, sourceProperty);\n    // default case\n    else resultProperty = sourceProperty;\n\n    // add a flag to not completely full polyfills\n    if (options.sham || (sourceProperty && sourceProperty.sham) || (targetProperty && targetProperty.sham)) {\n      createNonEnumerableProperty(resultProperty, 'sham', true);\n    }\n\n    target[key] = resultProperty;\n\n    if (PROTO) {\n      VIRTUAL_PROTOTYPE = TARGET + 'Prototype';\n      if (!has(path, VIRTUAL_PROTOTYPE)) {\n        createNonEnumerableProperty(path, VIRTUAL_PROTOTYPE, {});\n      }\n      // export virtual prototype methods\n      path[VIRTUAL_PROTOTYPE][key] = sourceProperty;\n      // export real prototype methods\n      if (options.real && targetPrototype && !targetPrototype[key]) {\n        createNonEnumerableProperty(targetPrototype, key, sourceProperty);\n      }\n    }\n  }\n};\n\n\n/***/ }),\n/* 6 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * @description 工具函数集合\n * @author wangfupeng\n */\n\nvar _interopRequireDefault = __webpack_require__(0);\n\nvar _typeof2 = _interopRequireDefault(__webpack_require__(100));\n\nvar _defineProperty = _interopRequireDefault(__webpack_require__(1));\n\nvar _parseInt2 = _interopRequireDefault(__webpack_require__(271));\n\nvar _slice = _interopRequireDefault(__webpack_require__(47));\n\nvar _setTimeout2 = _interopRequireDefault(__webpack_require__(48));\n\nvar _isArray = _interopRequireDefault(__webpack_require__(96));\n\nvar _map = _interopRequireDefault(__webpack_require__(27));\n\n(0, _defineProperty[\"default\"])(exports, \"__esModule\", {\n  value: true\n});\nexports.hexToRgb = exports.getRandomCode = exports.toArray = exports.deepClone = exports.isFunction = exports.debounce = exports.throttle = exports.arrForEach = exports.forEach = exports.replaceSpecialSymbol = exports.replaceHtmlSymbol = exports.getRandom = exports.UA = void 0;\n\nvar tslib_1 = __webpack_require__(2);\n\nvar NavUA = function () {\n  function NavUA() {\n    this._ua = navigator.userAgent;\n\n    var math = this._ua.match(/(Edge?)\\/(\\d+)/);\n\n    this.isOldEdge = math && math[1] == 'Edge' && (0, _parseInt2[\"default\"])(math[2]) < 19 ? true : false;\n    this.isFirefox = /Firefox\\/\\d+/.test(this._ua) && !/Seamonkey\\/\\d+/.test(this._ua) ? true : false;\n  } // 是否为 IE\n\n\n  NavUA.prototype.isIE = function () {\n    return 'ActiveXObject' in window;\n  }; // 是否为 webkit\n\n\n  NavUA.prototype.isWebkit = function () {\n    return /webkit/i.test(this._ua);\n  };\n\n  return NavUA;\n}(); // 和 UA 相关的属性\n\n\nexports.UA = new NavUA();\n/**\n * 获取随机字符\n * @param prefix 前缀\n */\n\nfunction getRandom(prefix) {\n  var _context;\n\n  if (prefix === void 0) {\n    prefix = '';\n  }\n\n  return prefix + (0, _slice[\"default\"])(_context = Math.random().toString()).call(_context, 2);\n}\n\nexports.getRandom = getRandom;\n/**\n * 替换 html 特殊字符\n * @param html html 字符串\n */\n\nfunction replaceHtmlSymbol(html) {\n  return html.replace(/</gm, '&lt;').replace(/>/gm, '&gt;').replace(/\"/gm, '&quot;').replace(/(\\r\\n|\\r|\\n)/g, '<br/>');\n}\n\nexports.replaceHtmlSymbol = replaceHtmlSymbol;\n\nfunction replaceSpecialSymbol(value) {\n  return value.replace(/&lt;/gm, '<').replace(/&gt;/gm, '>').replace(/&quot;/gm, '\"');\n}\n\nexports.replaceSpecialSymbol = replaceSpecialSymbol;\n\nfunction forEach(obj, fn) {\n  for (var key in obj) {\n    if (Object.prototype.hasOwnProperty.call(obj, key)) {\n      var result = fn(key, obj[key]);\n\n      if (result === false) {\n        // 提前终止循环\n        break;\n      }\n    }\n  }\n}\n\nexports.forEach = forEach;\n/**\n * 遍历类数组\n * @param fakeArr 类数组\n * @param fn 回调函数\n */\n\nfunction arrForEach(fakeArr, fn) {\n  var i, item, result;\n  var length = fakeArr.length || 0;\n\n  for (i = 0; i < length; i++) {\n    item = fakeArr[i];\n    result = fn.call(fakeArr, item, i);\n\n    if (result === false) {\n      break;\n    }\n  }\n}\n\nexports.arrForEach = arrForEach;\n/**\n * 节流\n * @param fn 函数\n * @param interval 间隔时间，毫秒\n */\n\nfunction throttle(fn, interval) {\n  if (interval === void 0) {\n    interval = 200;\n  }\n\n  var flag = false;\n  return function () {\n    var _this = this;\n\n    var args = [];\n\n    for (var _i = 0; _i < arguments.length; _i++) {\n      args[_i] = arguments[_i];\n    }\n\n    if (!flag) {\n      flag = true;\n      (0, _setTimeout2[\"default\"])(function () {\n        flag = false;\n        fn.call.apply(fn, tslib_1.__spreadArray([_this], args)); // this 报语法错误，先用 null\n      }, interval);\n    }\n  };\n}\n\nexports.throttle = throttle;\n/**\n * 防抖\n * @param fn 函数\n * @param delay 间隔时间，毫秒\n */\n\nfunction debounce(fn, delay) {\n  if (delay === void 0) {\n    delay = 200;\n  }\n\n  var lastFn = 0;\n  return function () {\n    var _this = this;\n\n    var args = [];\n\n    for (var _i = 0; _i < arguments.length; _i++) {\n      args[_i] = arguments[_i];\n    }\n\n    if (lastFn) {\n      window.clearTimeout(lastFn);\n    }\n\n    lastFn = (0, _setTimeout2[\"default\"])(function () {\n      lastFn = 0;\n      fn.call.apply(fn, tslib_1.__spreadArray([_this], args)); // this 报语法错误，先用 null\n    }, delay);\n  };\n}\n\nexports.debounce = debounce;\n/**\n * isFunction 是否是函数\n * @param fn 函数\n */\n\nfunction isFunction(fn) {\n  return typeof fn === 'function';\n}\n\nexports.isFunction = isFunction;\n/**\n * 引用与非引用值 深拷贝方法\n * @param data\n */\n\nfunction deepClone(data) {\n  if ((0, _typeof2[\"default\"])(data) !== 'object' || typeof data == 'function' || data === null) {\n    return data;\n  }\n\n  var item;\n\n  if ((0, _isArray[\"default\"])(data)) {\n    item = [];\n  }\n\n  if (!(0, _isArray[\"default\"])(data)) {\n    item = {};\n  }\n\n  for (var i in data) {\n    if (Object.prototype.hasOwnProperty.call(data, i)) {\n      item[i] = deepClone(data[i]);\n    }\n  }\n\n  return item;\n}\n\nexports.deepClone = deepClone;\n/**\n * 将可遍历的对象转换为数组\n * @param data 可遍历的对象\n */\n\nfunction toArray(data) {\n  return (0, _slice[\"default\"])(Array.prototype).call(data);\n}\n\nexports.toArray = toArray;\n/**\n * 唯一id生成\n * @param length 随机数长度\n */\n\nfunction getRandomCode() {\n  var _context2;\n\n  return (0, _slice[\"default\"])(_context2 = Math.random().toString(36)).call(_context2, -5);\n}\n\nexports.getRandomCode = getRandomCode;\n/**\n * hex color 转换成 rgb\n * @param hex string\n */\n\nfunction hexToRgb(hex) {\n  var result = /^#?([a-f\\d]{2})([a-f\\d]{2})([a-f\\d]{2})$/i.exec(hex);\n  if (result == null) return null;\n  var colors = (0, _map[\"default\"])(result).call(result, function (i) {\n    return (0, _parseInt2[\"default\"])(i, 16);\n  });\n  var r = colors[1];\n  var g = colors[2];\n  var b = colors[3];\n  return \"rgb(\" + r + \", \" + g + \", \" + b + \")\";\n}\n\nexports.hexToRgb = hexToRgb;\n\n/***/ }),\n/* 7 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * @description 常量\n * @author wangfupeng\n */\n\nvar _interopRequireDefault = __webpack_require__(0);\n\nvar _defineProperty = _interopRequireDefault(__webpack_require__(1));\n\n(0, _defineProperty[\"default\"])(exports, \"__esModule\", {\n  value: true\n});\nexports.EMPTY_P_REGEX = exports.EMPTY_P_LAST_REGEX = exports.EMPTY_P = exports.urlRegex = exports.EMPTY_FN = void 0;\n\nfunction EMPTY_FN() {}\n\nexports.EMPTY_FN = EMPTY_FN; //用于校验是否为url格式字符串\n\nexports.urlRegex = /^(http|ftp|https):\\/\\/[\\w\\-_]+(\\.[\\w\\-_]+)+([\\w\\-.,@?^=%&amp;:/~+#]*[\\w\\-@?^=%&amp;/~+#])?/; // 编辑器为了方便继续输入/换行等原因 主动生成的空标签\n\nexports.EMPTY_P = '<p data-we-empty-p=\"\"><br></p>'; // 用于校验dom中最后 由编辑器主动生成的空标签结构\n\nexports.EMPTY_P_LAST_REGEX = /<p data-we-empty-p=\"\"><br\\/?><\\/p>$/gim; // 用于校验dom中所有 由编辑器主动生成的空标签结构\n\nexports.EMPTY_P_REGEX = /<p data-we-empty-p=\"\">/gim;\n\n/***/ }),\n/* 8 */\n/***/ (function(module, exports, __webpack_require__) {\n\n/* WEBPACK VAR INJECTION */(function(global) {var check = function (it) {\n  return it && it.Math == Math && it;\n};\n\n// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028\nmodule.exports =\n  // eslint-disable-next-line es/no-global-this -- safe\n  check(typeof globalThis == 'object' && globalThis) ||\n  check(typeof window == 'object' && window) ||\n  // eslint-disable-next-line no-restricted-globals -- safe\n  check(typeof self == 'object' && self) ||\n  check(typeof global == 'object' && global) ||\n  // eslint-disable-next-line no-new-func -- fallback\n  (function () { return this; })() || Function('return this')();\n\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(150)))\n\n/***/ }),\n/* 9 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar global = __webpack_require__(8);\nvar shared = __webpack_require__(80);\nvar has = __webpack_require__(17);\nvar uid = __webpack_require__(67);\nvar NATIVE_SYMBOL = __webpack_require__(79);\nvar USE_SYMBOL_AS_UID = __webpack_require__(107);\n\nvar WellKnownSymbolsStore = shared('wks');\nvar Symbol = global.Symbol;\nvar createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol : Symbol && Symbol.withoutSetter || uid;\n\nmodule.exports = function (name) {\n  if (!has(WellKnownSymbolsStore, name) || !(NATIVE_SYMBOL || typeof WellKnownSymbolsStore[name] == 'string')) {\n    if (NATIVE_SYMBOL && has(Symbol, name)) {\n      WellKnownSymbolsStore[name] = Symbol[name];\n    } else {\n      WellKnownSymbolsStore[name] = createWellKnownSymbol('Symbol.' + name);\n    }\n  } return WellKnownSymbolsStore[name];\n};\n\n\n/***/ }),\n/* 10 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar path = __webpack_require__(11);\nvar has = __webpack_require__(17);\nvar wrappedWellKnownSymbolModule = __webpack_require__(101);\nvar defineProperty = __webpack_require__(18).f;\n\nmodule.exports = function (NAME) {\n  var Symbol = path.Symbol || (path.Symbol = {});\n  if (!has(Symbol, NAME)) defineProperty(Symbol, NAME, {\n    value: wrappedWellKnownSymbolModule.f(NAME)\n  });\n};\n\n\n/***/ }),\n/* 11 */\n/***/ (function(module, exports) {\n\nmodule.exports = {};\n\n\n/***/ }),\n/* 12 */\n/***/ (function(module, exports) {\n\nmodule.exports = function (exec) {\n  try {\n    return !!exec();\n  } catch (error) {\n    return true;\n  }\n};\n\n\n/***/ }),\n/* 13 */\n/***/ (function(module, exports) {\n\nmodule.exports = function (it) {\n  return typeof it === 'object' ? it !== null : typeof it === 'function';\n};\n\n\n/***/ }),\n/* 14 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar path = __webpack_require__(11);\n\nmodule.exports = function (CONSTRUCTOR) {\n  return path[CONSTRUCTOR + 'Prototype'];\n};\n\n\n/***/ }),\n/* 15 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar fails = __webpack_require__(12);\n\n// Detect IE8's incomplete defineProperty implementation\nmodule.exports = !fails(function () {\n  // eslint-disable-next-line es/no-object-defineproperty -- required for testing\n  return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7;\n});\n\n\n/***/ }),\n/* 16 */\n/***/ (function(module, exports, __webpack_require__) {\n\nmodule.exports = __webpack_require__(203);\n\n/***/ }),\n/* 17 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar toObject = __webpack_require__(26);\n\nvar hasOwnProperty = {}.hasOwnProperty;\n\nmodule.exports = Object.hasOwn || function hasOwn(it, key) {\n  return hasOwnProperty.call(toObject(it), key);\n};\n\n\n/***/ }),\n/* 18 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar DESCRIPTORS = __webpack_require__(15);\nvar IE8_DOM_DEFINE = __webpack_require__(108);\nvar anObject = __webpack_require__(20);\nvar toPropertyKey = __webpack_require__(64);\n\n// eslint-disable-next-line es/no-object-defineproperty -- safe\nvar $defineProperty = Object.defineProperty;\n\n// `Object.defineProperty` method\n// https://tc39.es/ecma262/#sec-object.defineproperty\nexports.f = DESCRIPTORS ? $defineProperty : function defineProperty(O, P, Attributes) {\n  anObject(O);\n  P = toPropertyKey(P);\n  anObject(Attributes);\n  if (IE8_DOM_DEFINE) try {\n    return $defineProperty(O, P, Attributes);\n  } catch (error) { /* empty */ }\n  if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported');\n  if ('value' in Attributes) O[P] = Attributes.value;\n  return O;\n};\n\n\n/***/ }),\n/* 19 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar DESCRIPTORS = __webpack_require__(15);\nvar definePropertyModule = __webpack_require__(18);\nvar createPropertyDescriptor = __webpack_require__(38);\n\nmodule.exports = DESCRIPTORS ? function (object, key, value) {\n  return definePropertyModule.f(object, key, createPropertyDescriptor(1, value));\n} : function (object, key, value) {\n  object[key] = value;\n  return object;\n};\n\n\n/***/ }),\n/* 20 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar isObject = __webpack_require__(13);\n\nmodule.exports = function (it) {\n  if (!isObject(it)) {\n    throw TypeError(String(it) + ' is not an object');\n  } return it;\n};\n\n\n/***/ }),\n/* 21 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar isOldIE = function isOldIE() {\n  var memo;\n  return function memorize() {\n    if (typeof memo === 'undefined') {\n      // Test for IE <= 9 as proposed by Browserhacks\n      // @see http://browserhacks.com/#hack-e71d8692f65334173fee715c222cb805\n      // Tests for existence of standard globals is to allow style-loader\n      // to operate correctly into non-standard environments\n      // @see https://github.com/webpack-contrib/style-loader/issues/177\n      memo = Boolean(window && document && document.all && !window.atob);\n    }\n\n    return memo;\n  };\n}();\n\nvar getTarget = function getTarget() {\n  var memo = {};\n  return function memorize(target) {\n    if (typeof memo[target] === 'undefined') {\n      var styleTarget = document.querySelector(target); // Special case to return head of iframe instead of iframe itself\n\n      if (window.HTMLIFrameElement && styleTarget instanceof window.HTMLIFrameElement) {\n        try {\n          // This will throw an exception if access to iframe is blocked\n          // due to cross-origin restrictions\n          styleTarget = styleTarget.contentDocument.head;\n        } catch (e) {\n          // istanbul ignore next\n          styleTarget = null;\n        }\n      }\n\n      memo[target] = styleTarget;\n    }\n\n    return memo[target];\n  };\n}();\n\nvar stylesInDom = [];\n\nfunction getIndexByIdentifier(identifier) {\n  var result = -1;\n\n  for (var i = 0; i < stylesInDom.length; i++) {\n    if (stylesInDom[i].identifier === identifier) {\n      result = i;\n      break;\n    }\n  }\n\n  return result;\n}\n\nfunction modulesToDom(list, options) {\n  var idCountMap = {};\n  var identifiers = [];\n\n  for (var i = 0; i < list.length; i++) {\n    var item = list[i];\n    var id = options.base ? item[0] + options.base : item[0];\n    var count = idCountMap[id] || 0;\n    var identifier = \"\".concat(id, \" \").concat(count);\n    idCountMap[id] = count + 1;\n    var index = getIndexByIdentifier(identifier);\n    var obj = {\n      css: item[1],\n      media: item[2],\n      sourceMap: item[3]\n    };\n\n    if (index !== -1) {\n      stylesInDom[index].references++;\n      stylesInDom[index].updater(obj);\n    } else {\n      stylesInDom.push({\n        identifier: identifier,\n        updater: addStyle(obj, options),\n        references: 1\n      });\n    }\n\n    identifiers.push(identifier);\n  }\n\n  return identifiers;\n}\n\nfunction insertStyleElement(options) {\n  var style = document.createElement('style');\n  var attributes = options.attributes || {};\n\n  if (typeof attributes.nonce === 'undefined') {\n    var nonce =  true ? __webpack_require__.nc : undefined;\n\n    if (nonce) {\n      attributes.nonce = nonce;\n    }\n  }\n\n  Object.keys(attributes).forEach(function (key) {\n    style.setAttribute(key, attributes[key]);\n  });\n\n  if (typeof options.insert === 'function') {\n    options.insert(style);\n  } else {\n    var target = getTarget(options.insert || 'head');\n\n    if (!target) {\n      throw new Error(\"Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.\");\n    }\n\n    target.appendChild(style);\n  }\n\n  return style;\n}\n\nfunction removeStyleElement(style) {\n  // istanbul ignore if\n  if (style.parentNode === null) {\n    return false;\n  }\n\n  style.parentNode.removeChild(style);\n}\n/* istanbul ignore next  */\n\n\nvar replaceText = function replaceText() {\n  var textStore = [];\n  return function replace(index, replacement) {\n    textStore[index] = replacement;\n    return textStore.filter(Boolean).join('\\n');\n  };\n}();\n\nfunction applyToSingletonTag(style, index, remove, obj) {\n  var css = remove ? '' : obj.media ? \"@media \".concat(obj.media, \" {\").concat(obj.css, \"}\") : obj.css; // For old IE\n\n  /* istanbul ignore if  */\n\n  if (style.styleSheet) {\n    style.styleSheet.cssText = replaceText(index, css);\n  } else {\n    var cssNode = document.createTextNode(css);\n    var childNodes = style.childNodes;\n\n    if (childNodes[index]) {\n      style.removeChild(childNodes[index]);\n    }\n\n    if (childNodes.length) {\n      style.insertBefore(cssNode, childNodes[index]);\n    } else {\n      style.appendChild(cssNode);\n    }\n  }\n}\n\nfunction applyToTag(style, options, obj) {\n  var css = obj.css;\n  var media = obj.media;\n  var sourceMap = obj.sourceMap;\n\n  if (media) {\n    style.setAttribute('media', media);\n  } else {\n    style.removeAttribute('media');\n  }\n\n  if (sourceMap && typeof btoa !== 'undefined') {\n    css += \"\\n/*# sourceMappingURL=data:application/json;base64,\".concat(btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))), \" */\");\n  } // For old IE\n\n  /* istanbul ignore if  */\n\n\n  if (style.styleSheet) {\n    style.styleSheet.cssText = css;\n  } else {\n    while (style.firstChild) {\n      style.removeChild(style.firstChild);\n    }\n\n    style.appendChild(document.createTextNode(css));\n  }\n}\n\nvar singleton = null;\nvar singletonCounter = 0;\n\nfunction addStyle(obj, options) {\n  var style;\n  var update;\n  var remove;\n\n  if (options.singleton) {\n    var styleIndex = singletonCounter++;\n    style = singleton || (singleton = insertStyleElement(options));\n    update = applyToSingletonTag.bind(null, style, styleIndex, false);\n    remove = applyToSingletonTag.bind(null, style, styleIndex, true);\n  } else {\n    style = insertStyleElement(options);\n    update = applyToTag.bind(null, style, options);\n\n    remove = function remove() {\n      removeStyleElement(style);\n    };\n  }\n\n  update(obj);\n  return function updateStyle(newObj) {\n    if (newObj) {\n      if (newObj.css === obj.css && newObj.media === obj.media && newObj.sourceMap === obj.sourceMap) {\n        return;\n      }\n\n      update(obj = newObj);\n    } else {\n      remove();\n    }\n  };\n}\n\nmodule.exports = function (list, options) {\n  options = options || {}; // Force single-tag solution on IE6-9, which has a hard limit on the # of <style>\n  // tags it will allow on a page\n\n  if (!options.singleton && typeof options.singleton !== 'boolean') {\n    options.singleton = isOldIE();\n  }\n\n  list = list || [];\n  var lastIdentifiers = modulesToDom(list, options);\n  return function update(newList) {\n    newList = newList || [];\n\n    if (Object.prototype.toString.call(newList) !== '[object Array]') {\n      return;\n    }\n\n    for (var i = 0; i < lastIdentifiers.length; i++) {\n      var identifier = lastIdentifiers[i];\n      var index = getIndexByIdentifier(identifier);\n      stylesInDom[index].references--;\n    }\n\n    var newLastIdentifiers = modulesToDom(newList, options);\n\n    for (var _i = 0; _i < lastIdentifiers.length; _i++) {\n      var _identifier = lastIdentifiers[_i];\n\n      var _index = getIndexByIdentifier(_identifier);\n\n      if (stylesInDom[_index].references === 0) {\n        stylesInDom[_index].updater();\n\n        stylesInDom.splice(_index, 1);\n      }\n    }\n\n    lastIdentifiers = newLastIdentifiers;\n  };\n};\n\n/***/ }),\n/* 22 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\n/*\n  MIT License http://www.opensource.org/licenses/mit-license.php\n  Author Tobias Koppers @sokra\n*/\n// css base code, injected by the css-loader\n// eslint-disable-next-line func-names\nmodule.exports = function (useSourceMap) {\n  var list = []; // return the list of modules as css string\n\n  list.toString = function toString() {\n    return this.map(function (item) {\n      var content = cssWithMappingToString(item, useSourceMap);\n\n      if (item[2]) {\n        return \"@media \".concat(item[2], \" {\").concat(content, \"}\");\n      }\n\n      return content;\n    }).join('');\n  }; // import a list of modules into the list\n  // eslint-disable-next-line func-names\n\n\n  list.i = function (modules, mediaQuery, dedupe) {\n    if (typeof modules === 'string') {\n      // eslint-disable-next-line no-param-reassign\n      modules = [[null, modules, '']];\n    }\n\n    var alreadyImportedModules = {};\n\n    if (dedupe) {\n      for (var i = 0; i < this.length; i++) {\n        // eslint-disable-next-line prefer-destructuring\n        var id = this[i][0];\n\n        if (id != null) {\n          alreadyImportedModules[id] = true;\n        }\n      }\n    }\n\n    for (var _i = 0; _i < modules.length; _i++) {\n      var item = [].concat(modules[_i]);\n\n      if (dedupe && alreadyImportedModules[item[0]]) {\n        // eslint-disable-next-line no-continue\n        continue;\n      }\n\n      if (mediaQuery) {\n        if (!item[2]) {\n          item[2] = mediaQuery;\n        } else {\n          item[2] = \"\".concat(mediaQuery, \" and \").concat(item[2]);\n        }\n      }\n\n      list.push(item);\n    }\n  };\n\n  return list;\n};\n\nfunction cssWithMappingToString(item, useSourceMap) {\n  var content = item[1] || ''; // eslint-disable-next-line prefer-destructuring\n\n  var cssMapping = item[3];\n\n  if (!cssMapping) {\n    return content;\n  }\n\n  if (useSourceMap && typeof btoa === 'function') {\n    var sourceMapping = toComment(cssMapping);\n    var sourceURLs = cssMapping.sources.map(function (source) {\n      return \"/*# sourceURL=\".concat(cssMapping.sourceRoot || '').concat(source, \" */\");\n    });\n    return [content].concat(sourceURLs).concat([sourceMapping]).join('\\n');\n  }\n\n  return [content].join('\\n');\n} // Adapted from convert-source-map (MIT)\n\n\nfunction toComment(sourceMap) {\n  // eslint-disable-next-line no-undef\n  var base64 = btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap))));\n  var data = \"sourceMappingURL=data:application/json;charset=utf-8;base64,\".concat(base64);\n  return \"/*# \".concat(data, \" */\");\n}\n\n/***/ }),\n/* 23 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * @description 按钮菜单 Class\n * @author wangfupeng\n */\n\nvar _interopRequireDefault = __webpack_require__(0);\n\nvar _defineProperty = _interopRequireDefault(__webpack_require__(1));\n\n(0, _defineProperty[\"default\"])(exports, \"__esModule\", {\n  value: true\n});\n\nvar tslib_1 = __webpack_require__(2);\n\nvar Menu_1 = tslib_1.__importDefault(__webpack_require__(103));\n\nvar BtnMenu = function (_super) {\n  tslib_1.__extends(BtnMenu, _super);\n\n  function BtnMenu($elem, editor) {\n    return _super.call(this, $elem, editor) || this;\n  }\n\n  return BtnMenu;\n}(Menu_1[\"default\"]);\n\nexports[\"default\"] = BtnMenu;\n\n/***/ }),\n/* 24 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * @description 下拉菜单 Class\n * @author wangfupeng\n */\n\nvar _interopRequireDefault = __webpack_require__(0);\n\nvar _defineProperty = _interopRequireDefault(__webpack_require__(1));\n\nvar _forEach = _interopRequireDefault(__webpack_require__(4));\n\nvar _setTimeout2 = _interopRequireDefault(__webpack_require__(48));\n\n(0, _defineProperty[\"default\"])(exports, \"__esModule\", {\n  value: true\n});\n\nvar tslib_1 = __webpack_require__(2);\n\nvar dom_core_1 = tslib_1.__importDefault(__webpack_require__(3));\n\nvar Menu_1 = tslib_1.__importDefault(__webpack_require__(103));\n\nvar DropList_1 = tslib_1.__importDefault(__webpack_require__(138));\n\nvar DropListMenu = function (_super) {\n  tslib_1.__extends(DropListMenu, _super);\n\n  function DropListMenu($elem, editor, conf) {\n    var _this = _super.call(this, $elem, editor) || this; // 国际化\n\n\n    conf.title = editor.i18next.t(\"menus.dropListMenu.\" + conf.title); // 非中文模式下 带 icon 的下拉列表居左\n\n    var className = editor.config.lang === 'zh-CN' ? '' : 'w-e-drop-list-tl';\n\n    if (className !== '' && conf.type === 'list') {\n      var _context;\n\n      (0, _forEach[\"default\"])(_context = conf.list).call(_context, function (item) {\n        var $elem = item.$elem;\n        var $children = dom_core_1[\"default\"]($elem.children());\n\n        if ($children.length > 0) {\n          var nodeName = $children === null || $children === void 0 ? void 0 : $children.getNodeName();\n\n          if (nodeName && nodeName === 'I') {\n            $elem.addClass(className);\n          }\n        }\n      });\n    } // 初始化 dropList\n\n\n    var dropList = new DropList_1[\"default\"](_this, conf);\n    _this.dropList = dropList; // 绑定事件\n\n    $elem.on('click', function () {\n      var _context2;\n\n      if (editor.selection.getRange() == null) {\n        return;\n      }\n\n      $elem.css('z-index', editor.zIndex.get('menu')); // 触发 droplist 悬浮事件\n\n      (0, _forEach[\"default\"])(_context2 = editor.txt.eventHooks.dropListMenuHoverEvents).call(_context2, function (fn) {\n        return fn();\n      }); // 显示\n\n      dropList.show();\n    }).on('mouseleave', function () {\n      $elem.css('z-index', 'auto'); // 隐藏\n\n      dropList.hideTimeoutId = (0, _setTimeout2[\"default\"])(function () {\n        dropList.hide();\n      });\n    });\n    return _this;\n  }\n\n  return DropListMenu;\n}(Menu_1[\"default\"]);\n\nexports[\"default\"] = DropListMenu;\n\n/***/ }),\n/* 25 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar path = __webpack_require__(11);\nvar global = __webpack_require__(8);\n\nvar aFunction = function (variable) {\n  return typeof variable == 'function' ? variable : undefined;\n};\n\nmodule.exports = function (namespace, method) {\n  return arguments.length < 2 ? aFunction(path[namespace]) || aFunction(global[namespace])\n    : path[namespace] && path[namespace][method] || global[namespace] && global[namespace][method];\n};\n\n\n/***/ }),\n/* 26 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar requireObjectCoercible = __webpack_require__(51);\n\n// `ToObject` abstract operation\n// https://tc39.es/ecma262/#sec-toobject\nmodule.exports = function (argument) {\n  return Object(requireObjectCoercible(argument));\n};\n\n\n/***/ }),\n/* 27 */\n/***/ (function(module, exports, __webpack_require__) {\n\nmodule.exports = __webpack_require__(199);\n\n/***/ }),\n/* 28 */\n/***/ (function(module, exports, __webpack_require__) {\n\nmodule.exports = __webpack_require__(212);\n\n/***/ }),\n/* 29 */\n/***/ (function(module, exports, __webpack_require__) {\n\n// toObject with fallback for non-array-like ES3 strings\nvar IndexedObject = __webpack_require__(78);\nvar requireObjectCoercible = __webpack_require__(51);\n\nmodule.exports = function (it) {\n  return IndexedObject(requireObjectCoercible(it));\n};\n\n\n/***/ }),\n/* 30 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar isSymbol = __webpack_require__(65);\n\nmodule.exports = function (argument) {\n  if (isSymbol(argument)) throw TypeError('Cannot convert a Symbol value to a string');\n  return String(argument);\n};\n\n\n/***/ }),\n/* 31 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar bind = __webpack_require__(40);\nvar IndexedObject = __webpack_require__(78);\nvar toObject = __webpack_require__(26);\nvar toLength = __webpack_require__(35);\nvar arraySpeciesCreate = __webpack_require__(95);\n\nvar push = [].push;\n\n// `Array.prototype.{ forEach, map, filter, some, every, find, findIndex, filterReject }` methods implementation\nvar createMethod = function (TYPE) {\n  var IS_MAP = TYPE == 1;\n  var IS_FILTER = TYPE == 2;\n  var IS_SOME = TYPE == 3;\n  var IS_EVERY = TYPE == 4;\n  var IS_FIND_INDEX = TYPE == 6;\n  var IS_FILTER_REJECT = TYPE == 7;\n  var NO_HOLES = TYPE == 5 || IS_FIND_INDEX;\n  return function ($this, callbackfn, that, specificCreate) {\n    var O = toObject($this);\n    var self = IndexedObject(O);\n    var boundFunction = bind(callbackfn, that, 3);\n    var length = toLength(self.length);\n    var index = 0;\n    var create = specificCreate || arraySpeciesCreate;\n    var target = IS_MAP ? create($this, length) : IS_FILTER || IS_FILTER_REJECT ? create($this, 0) : undefined;\n    var value, result;\n    for (;length > index; index++) if (NO_HOLES || index in self) {\n      value = self[index];\n      result = boundFunction(value, index, O);\n      if (TYPE) {\n        if (IS_MAP) target[index] = result; // map\n        else if (result) switch (TYPE) {\n          case 3: return true;              // some\n          case 5: return value;             // find\n          case 6: return index;             // findIndex\n          case 2: push.call(target, value); // filter\n        } else switch (TYPE) {\n          case 4: return false;             // every\n          case 7: push.call(target, value); // filterReject\n        }\n      }\n    }\n    return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : target;\n  };\n};\n\nmodule.exports = {\n  // `Array.prototype.forEach` method\n  // https://tc39.es/ecma262/#sec-array.prototype.foreach\n  forEach: createMethod(0),\n  // `Array.prototype.map` method\n  // https://tc39.es/ecma262/#sec-array.prototype.map\n  map: createMethod(1),\n  // `Array.prototype.filter` method\n  // https://tc39.es/ecma262/#sec-array.prototype.filter\n  filter: createMethod(2),\n  // `Array.prototype.some` method\n  // https://tc39.es/ecma262/#sec-array.prototype.some\n  some: createMethod(3),\n  // `Array.prototype.every` method\n  // https://tc39.es/ecma262/#sec-array.prototype.every\n  every: createMethod(4),\n  // `Array.prototype.find` method\n  // https://tc39.es/ecma262/#sec-array.prototype.find\n  find: createMethod(5),\n  // `Array.prototype.findIndex` method\n  // https://tc39.es/ecma262/#sec-array.prototype.findIndex\n  findIndex: createMethod(6),\n  // `Array.prototype.filterReject` method\n  // https://github.com/tc39/proposal-array-filtering\n  filterReject: createMethod(7)\n};\n\n\n/***/ }),\n/* 32 */\n/***/ (function(module, exports, __webpack_require__) {\n\nmodule.exports = __webpack_require__(298);\n\n/***/ }),\n/* 33 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * @description panel class\n * @author wangfupeng\n */\n\nvar _interopRequireDefault = __webpack_require__(0);\n\nvar _defineProperty = _interopRequireDefault(__webpack_require__(1));\n\nvar _forEach = _interopRequireDefault(__webpack_require__(4));\n\nvar _find = _interopRequireDefault(__webpack_require__(32));\n\nvar _set = _interopRequireDefault(__webpack_require__(136));\n\n(0, _defineProperty[\"default\"])(exports, \"__esModule\", {\n  value: true\n});\n\nvar tslib_1 = __webpack_require__(2);\n\nvar dom_core_1 = tslib_1.__importDefault(__webpack_require__(3));\n\nvar const_1 = __webpack_require__(7);\n\nvar Panel = function () {\n  function Panel(menu, conf) {\n    this.menu = menu;\n    this.conf = conf;\n    this.$container = dom_core_1[\"default\"]('<div class=\"w-e-panel-container\"></div>'); // 隐藏 panel\n\n    var editor = menu.editor;\n    editor.txt.eventHooks.clickEvents.push(Panel.hideCurAllPanels);\n    editor.txt.eventHooks.toolbarClickEvents.push(Panel.hideCurAllPanels);\n    editor.txt.eventHooks.dropListMenuHoverEvents.push(Panel.hideCurAllPanels);\n  }\n  /**\n   * 创建并展示 panel\n   */\n\n\n  Panel.prototype.create = function () {\n    var _this = this;\n\n    var menu = this.menu;\n\n    if (Panel.createdMenus.has(menu)) {\n      // 创建过了\n      return;\n    }\n\n    var conf = this.conf; // panel 的容器\n\n    var $container = this.$container;\n    var width = conf.width || 300; // 默认 300px\n\n    var rect = menu.editor.$toolbarElem.getBoundingClientRect();\n    var menuRect = menu.$elem.getBoundingClientRect();\n    var top = rect.height + rect.top - menuRect.top;\n    var left = (rect.width - width) / 2 + rect.left - menuRect.left;\n    var offset = 300; // icon与panel菜单距离偏移量暂定 300\n\n    if (Math.abs(left) > offset) {\n      // panel菜单离工具栏icon过远时，让panel菜单出现在icon正下方，处理边界逻辑\n      if (menuRect.left < document.documentElement.clientWidth / 2) {\n        // icon在左侧\n        left = -menuRect.width / 2;\n      } else {\n        // icon在右侧\n        left = -width + menuRect.width / 2;\n      }\n    }\n\n    $container.css('width', width + 'px').css('margin-top', top + \"px\").css('margin-left', left + \"px\").css('z-index', menu.editor.zIndex.get('panel')); // 添加关闭按钮\n\n    var $closeBtn = dom_core_1[\"default\"]('<i class=\"w-e-icon-close w-e-panel-close\"></i>');\n    $container.append($closeBtn);\n    $closeBtn.on('click', function () {\n      _this.remove();\n    }); // 准备 tabs 容器\n\n    var $tabTitleContainer = dom_core_1[\"default\"]('<ul class=\"w-e-panel-tab-title\"></ul>');\n    var $tabContentContainer = dom_core_1[\"default\"]('<div class=\"w-e-panel-tab-content\"></div>');\n    $container.append($tabTitleContainer).append($tabContentContainer); // 设置高度\n\n    var height = conf.height; // height: 0 即不用设置\n\n    if (height) {\n      $tabContentContainer.css('height', height + 'px').css('overflow-y', 'auto');\n    } // tabs\n\n\n    var tabs = conf.tabs || [];\n    var tabTitleArr = [];\n    var tabContentArr = [];\n    (0, _forEach[\"default\"])(tabs).call(tabs, function (tab, tabIndex) {\n      if (!tab) {\n        return;\n      }\n\n      var title = tab.title || '';\n      var tpl = tab.tpl || ''; // 添加到 DOM\n\n      var $title = dom_core_1[\"default\"](\"<li class=\\\"w-e-item\\\">\" + title + \"</li>\");\n      $tabTitleContainer.append($title);\n      var $content = dom_core_1[\"default\"](tpl);\n      $tabContentContainer.append($content); // 记录到内存\n\n      tabTitleArr.push($title);\n      tabContentArr.push($content); // 设置 active 项\n\n      if (tabIndex === 0) {\n        $title.data('active', true);\n        $title.addClass('w-e-active');\n      } else {\n        $content.hide();\n      } // 绑定 tab 的事件\n\n\n      $title.on('click', function () {\n        if ($title.data('active')) {\n          return;\n        } // 隐藏所有的 tab\n\n\n        (0, _forEach[\"default\"])(tabTitleArr).call(tabTitleArr, function ($title) {\n          $title.data('active', false);\n          $title.removeClass('w-e-active');\n        });\n        (0, _forEach[\"default\"])(tabContentArr).call(tabContentArr, function ($content) {\n          $content.hide();\n        }); // 显示当前的 tab\n\n        $title.data('active', true);\n        $title.addClass('w-e-active');\n        $content.show();\n      });\n    }); // 绑定关闭事件\n\n    $container.on('click', function (e) {\n      // 点击时阻止冒泡\n      e.stopPropagation();\n    }); // 添加到 DOM\n\n    menu.$elem.append($container); // 绑定 conf events 的事件，只有添加到 DOM 之后才能绑定成功\n\n    (0, _forEach[\"default\"])(tabs).call(tabs, function (tab, index) {\n      if (!tab) {\n        return;\n      }\n\n      var events = tab.events || [];\n      (0, _forEach[\"default\"])(events).call(events, function (event) {\n        var _a;\n\n        var selector = event.selector;\n        var type = event.type;\n        var fn = event.fn || const_1.EMPTY_FN;\n        var $content = tabContentArr[index];\n        var bindEnter = (_a = event.bindEnter) !== null && _a !== void 0 ? _a : false;\n\n        var doneFn = function doneFn(e) {\n          return tslib_1.__awaiter(_this, void 0, void 0, function () {\n            var needToHide;\n            return tslib_1.__generator(this, function (_a) {\n              switch (_a.label) {\n                case 0:\n                  e.stopPropagation();\n                  return [4\n                  /*yield*/\n                  , fn(e) // 执行完事件之后，是否要关闭 panel\n                  ];\n\n                case 1:\n                  needToHide = _a.sent(); // 执行完事件之后，是否要关闭 panel\n\n                  if (needToHide) {\n                    this.remove();\n                  }\n\n                  return [2\n                  /*return*/\n                  ];\n              }\n            });\n          });\n        }; // 给按钮绑定相应的事件\n\n\n        (0, _find[\"default\"])($content).call($content, selector).on(type, doneFn); // 绑定enter键入事件\n\n        if (bindEnter && type === 'click') {\n          $content.on('keyup', function (e) {\n            if (e.keyCode == 13) {\n              doneFn(e);\n            }\n          });\n        }\n      });\n    }); // focus 第一个 elem\n\n    var $inputs = (0, _find[\"default\"])($container).call($container, 'input[type=text],textarea');\n\n    if ($inputs.length) {\n      $inputs.get(0).focus();\n    } // 隐藏其他 panel\n\n\n    Panel.hideCurAllPanels(); // 记录该 menu 已经创建了 panel\n\n    menu.setPanel(this);\n    Panel.createdMenus.add(menu);\n  };\n  /**\n   * 移除 penal\n   */\n\n\n  Panel.prototype.remove = function () {\n    var menu = this.menu;\n    var $container = this.$container;\n\n    if ($container) {\n      $container.remove();\n    } // 将该 menu 记录中移除\n\n\n    Panel.createdMenus[\"delete\"](menu);\n  };\n  /**\n   * 隐藏当前所有的 panel\n   */\n\n\n  Panel.hideCurAllPanels = function () {\n    var _context;\n\n    if (Panel.createdMenus.size === 0) {\n      return;\n    }\n\n    (0, _forEach[\"default\"])(_context = Panel.createdMenus).call(_context, function (menu) {\n      var panel = menu.panel;\n      panel && panel.remove();\n    });\n  }; // 记录已经创建过的 panelMenu\n\n\n  Panel.createdMenus = new _set[\"default\"]();\n  return Panel;\n}();\n\nexports[\"default\"] = Panel;\n\n/***/ }),\n/* 34 */\n/***/ (function(module, exports) {\n\nmodule.exports = function (it) {\n  if (typeof it != 'function') {\n    throw TypeError(String(it) + ' is not a function');\n  } return it;\n};\n\n\n/***/ }),\n/* 35 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar toInteger = __webpack_require__(70);\n\nvar min = Math.min;\n\n// `ToLength` abstract operation\n// https://tc39.es/ecma262/#sec-tolength\nmodule.exports = function (argument) {\n  return argument > 0 ? min(toInteger(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991\n};\n\n\n/***/ }),\n/* 36 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * @description Modal 菜单 Class\n * @author wangfupeng\n */\n\nvar _interopRequireDefault = __webpack_require__(0);\n\nvar _defineProperty = _interopRequireDefault(__webpack_require__(1));\n\n(0, _defineProperty[\"default\"])(exports, \"__esModule\", {\n  value: true\n});\n\nvar tslib_1 = __webpack_require__(2);\n\nvar Menu_1 = tslib_1.__importDefault(__webpack_require__(103));\n\nvar PanelMenu = function (_super) {\n  tslib_1.__extends(PanelMenu, _super);\n\n  function PanelMenu($elem, editor) {\n    return _super.call(this, $elem, editor) || this;\n  }\n  /**\n   * 给 menu 设置 panel\n   * @param panel panel 实例\n   */\n\n\n  PanelMenu.prototype.setPanel = function (panel) {\n    this.panel = panel;\n  };\n\n  return PanelMenu;\n}(Menu_1[\"default\"]);\n\nexports[\"default\"] = PanelMenu;\n\n/***/ }),\n/* 37 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * @description Tooltip class\n * @author wangfupeng\n */\n\nvar _interopRequireDefault = __webpack_require__(0);\n\nvar _defineProperty = _interopRequireDefault(__webpack_require__(1));\n\nvar _forEach = _interopRequireDefault(__webpack_require__(4));\n\nvar _bind = _interopRequireDefault(__webpack_require__(61));\n\n(0, _defineProperty[\"default\"])(exports, \"__esModule\", {\n  value: true\n});\n\nvar tslib_1 = __webpack_require__(2);\n\nvar dom_core_1 = tslib_1.__importDefault(__webpack_require__(3));\n\nvar Tooltip = function () {\n  function Tooltip(editor, $elem, conf) {\n    this.editor = editor;\n    this.$targetElem = $elem;\n    this.conf = conf;\n    this._show = false;\n    this._isInsertTextContainer = false; // 定义 container\n\n    var $container = dom_core_1[\"default\"]('<div></div>');\n    $container.addClass('w-e-tooltip');\n    this.$container = $container;\n  }\n  /**\n   * 获取 tooltip 定位\n   */\n\n\n  Tooltip.prototype.getPositionData = function () {\n    var $container = this.$container;\n    var top = 0;\n    var left = 0; // tooltip 的高度\n\n    var tooltipHeight = 20; // 网页的 scrollTop\n\n    var pageScrollTop = document.documentElement.scrollTop; // 目标元素的 rect\n\n    var targetElemRect = this.$targetElem.getBoundingClientRect(); // 编辑区域的 rect\n\n    var textElemRect = this.editor.$textElem.getBoundingClientRect(); // 获取基于 textContainerElem 的 位置信息\n\n    var targetOffset = this.$targetElem.getOffsetData();\n    var targetParentElem = dom_core_1[\"default\"](targetOffset.parent); // 获取 编辑区域的滚动条信息\n\n    var scrollTop = this.editor.$textElem.elems[0].scrollTop; // 是否插入 textContainer 中\n\n    this._isInsertTextContainer = targetParentElem.equal(this.editor.$textContainerElem);\n\n    if (this._isInsertTextContainer) {\n      // 父容器的高度\n      var targetParentElemHeight = targetParentElem.getBoundingClientRect().height; // 相对于父容器的位置信息\n\n      var offsetTop = targetOffset.top,\n          offsetLeft = targetOffset.left,\n          offsetHeight = targetOffset.height; // 元素基于父容器的 绝对top信息\n\n      var absoluteTop = offsetTop - scrollTop;\n\n      if (absoluteTop > tooltipHeight + 5) {\n        // 说明模板元素的顶部空间足够\n        top = absoluteTop - tooltipHeight - 15;\n        $container.addClass('w-e-tooltip-up');\n      } else if (absoluteTop + offsetHeight + tooltipHeight < targetParentElemHeight) {\n        // 说明模板元素的底部空间足够\n        top = absoluteTop + offsetHeight + 10;\n        $container.addClass('w-e-tooltip-down');\n      } else {\n        // 其他情况，tooltip 放在目标元素左上角\n        top = (absoluteTop > 0 ? absoluteTop : 0) + tooltipHeight + 10;\n        $container.addClass('w-e-tooltip-down');\n      } // 计算 left\n\n\n      if (offsetLeft < 0) {\n        left = 0;\n      } else {\n        left = offsetLeft;\n      }\n    } else {\n      if (targetElemRect.top < tooltipHeight) {\n        // 说明目标元素的顶部，因滑动隐藏在浏览器上方。tooltip 要放在目标元素下面\n        top = targetElemRect.bottom + pageScrollTop + 5; // 5px 间距\n\n        $container.addClass('w-e-tooltip-down');\n      } else if (targetElemRect.top - textElemRect.top < tooltipHeight) {\n        // 说明目标元素的顶部，因滑动隐藏在编辑区域上方。tooltip 要放在目标元素下面\n        top = targetElemRect.bottom + pageScrollTop + 5; // 5px 间距\n\n        $container.addClass('w-e-tooltip-down');\n      } else {\n        // 其他情况，tooltip 放在目标元素上方\n        top = targetElemRect.top + pageScrollTop - tooltipHeight - 15; // 减去 toolbar 的高度，还有 15px 间距\n\n        $container.addClass('w-e-tooltip-up');\n      } // 计算 left\n\n\n      if (targetElemRect.left < 0) {\n        left = 0;\n      } else {\n        left = targetElemRect.left;\n      }\n    } // 返回结果\n\n\n    return {\n      top: top,\n      left: left\n    };\n  };\n  /**\n   * 添加 tooltip 菜单\n   */\n\n\n  Tooltip.prototype.appendMenus = function () {\n    var _this = this;\n\n    var conf = this.conf;\n    var editor = this.editor;\n    var $targetElem = this.$targetElem;\n    var $container = this.$container;\n    (0, _forEach[\"default\"])(conf).call(conf, function (item, index) {\n      // 添加元素\n      var $elem = item.$elem;\n      var $wrapper = dom_core_1[\"default\"]('<div></div>');\n      $wrapper.addClass('w-e-tooltip-item-wrapper ');\n      $wrapper.append($elem);\n      $container.append($wrapper); // 绑定点击事件\n\n      $elem.on('click', function (e) {\n        e.preventDefault();\n        var res = item.onClick(editor, $targetElem);\n        if (res) _this.remove();\n      });\n    });\n  };\n  /**\n   * 创建 tooltip\n   */\n\n\n  Tooltip.prototype.create = function () {\n    var _context, _context2;\n\n    var editor = this.editor;\n    var $container = this.$container; // 生成 container 的内容\n\n    this.appendMenus(); // 设置定位\n\n    var _a = this.getPositionData(),\n        top = _a.top,\n        left = _a.left;\n\n    $container.css('top', top + \"px\");\n    $container.css('left', left + \"px\"); // 设置 z-index\n\n    $container.css('z-index', editor.zIndex.get('tooltip')); // 添加到 DOM\n\n    if (this._isInsertTextContainer) {\n      this.editor.$textContainerElem.append($container);\n    } else {\n      dom_core_1[\"default\"]('body').append($container);\n    }\n\n    this._show = true;\n    editor.beforeDestroy((0, _bind[\"default\"])(_context = this.remove).call(_context, this));\n    editor.txt.eventHooks.onBlurEvents.push((0, _bind[\"default\"])(_context2 = this.remove).call(_context2, this));\n  };\n  /**\n   * 移除该 tooltip\n   */\n\n\n  Tooltip.prototype.remove = function () {\n    this.$container.remove();\n    this._show = false;\n  };\n\n  (0, _defineProperty[\"default\"])(Tooltip.prototype, \"isShow\", {\n    /**\n     * 是否显示\n     */\n    get: function get() {\n      return this._show;\n    },\n    enumerable: false,\n    configurable: true\n  });\n  return Tooltip;\n}();\n\nexports[\"default\"] = Tooltip;\n\n/***/ }),\n/* 38 */\n/***/ (function(module, exports) {\n\nmodule.exports = function (bitmap, value) {\n  return {\n    enumerable: !(bitmap & 1),\n    configurable: !(bitmap & 2),\n    writable: !(bitmap & 4),\n    value: value\n  };\n};\n\n\n/***/ }),\n/* 39 */\n/***/ (function(module, exports) {\n\nmodule.exports = true;\n\n\n/***/ }),\n/* 40 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar aFunction = __webpack_require__(34);\n\n// optional / simple context binding\nmodule.exports = function (fn, that, length) {\n  aFunction(fn);\n  if (that === undefined) return fn;\n  switch (length) {\n    case 0: return function () {\n      return fn.call(that);\n    };\n    case 1: return function (a) {\n      return fn.call(that, a);\n    };\n    case 2: return function (a, b) {\n      return fn.call(that, a, b);\n    };\n    case 3: return function (a, b, c) {\n      return fn.call(that, a, b, c);\n    };\n  }\n  return function (/* ...args */) {\n    return fn.apply(that, arguments);\n  };\n};\n\n\n/***/ }),\n/* 41 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar anObject = __webpack_require__(20);\nvar isArrayIteratorMethod = __webpack_require__(112);\nvar toLength = __webpack_require__(35);\nvar bind = __webpack_require__(40);\nvar getIteratorMethod = __webpack_require__(113);\nvar iteratorClose = __webpack_require__(114);\n\nvar Result = function (stopped, result) {\n  this.stopped = stopped;\n  this.result = result;\n};\n\nmodule.exports = function (iterable, unboundFunction, options) {\n  var that = options && options.that;\n  var AS_ENTRIES = !!(options && options.AS_ENTRIES);\n  var IS_ITERATOR = !!(options && options.IS_ITERATOR);\n  var INTERRUPTED = !!(options && options.INTERRUPTED);\n  var fn = bind(unboundFunction, that, 1 + AS_ENTRIES + INTERRUPTED);\n  var iterator, iterFn, index, length, result, next, step;\n\n  var stop = function (condition) {\n    if (iterator) iteratorClose(iterator);\n    return new Result(true, condition);\n  };\n\n  var callFn = function (value) {\n    if (AS_ENTRIES) {\n      anObject(value);\n      return INTERRUPTED ? fn(value[0], value[1], stop) : fn(value[0], value[1]);\n    } return INTERRUPTED ? fn(value, stop) : fn(value);\n  };\n\n  if (IS_ITERATOR) {\n    iterator = iterable;\n  } else {\n    iterFn = getIteratorMethod(iterable);\n    if (typeof iterFn != 'function') throw TypeError('Target is not iterable');\n    // optimisation for array iterators\n    if (isArrayIteratorMethod(iterFn)) {\n      for (index = 0, length = toLength(iterable.length); length > index; index++) {\n        result = callFn(iterable[index]);\n        if (result && result instanceof Result) return result;\n      } return new Result(false);\n    }\n    iterator = iterFn.call(iterable);\n  }\n\n  next = iterator.next;\n  while (!(step = next.call(iterator)).done) {\n    try {\n      result = callFn(step.value);\n    } catch (error) {\n      iteratorClose(iterator);\n      throw error;\n    }\n    if (typeof result == 'object' && result && result instanceof Result) return result;\n  } return new Result(false);\n};\n\n\n/***/ }),\n/* 42 */\n/***/ (function(module, exports) {\n\nmodule.exports = {};\n\n\n/***/ }),\n/* 43 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar NATIVE_WEAK_MAP = __webpack_require__(176);\nvar global = __webpack_require__(8);\nvar isObject = __webpack_require__(13);\nvar createNonEnumerableProperty = __webpack_require__(19);\nvar objectHas = __webpack_require__(17);\nvar shared = __webpack_require__(81);\nvar sharedKey = __webpack_require__(68);\nvar hiddenKeys = __webpack_require__(54);\n\nvar OBJECT_ALREADY_INITIALIZED = 'Object already initialized';\nvar WeakMap = global.WeakMap;\nvar set, get, has;\n\nvar enforce = function (it) {\n  return has(it) ? get(it) : set(it, {});\n};\n\nvar getterFor = function (TYPE) {\n  return function (it) {\n    var state;\n    if (!isObject(it) || (state = get(it)).type !== TYPE) {\n      throw TypeError('Incompatible receiver, ' + TYPE + ' required');\n    } return state;\n  };\n};\n\nif (NATIVE_WEAK_MAP || shared.state) {\n  var store = shared.state || (shared.state = new WeakMap());\n  var wmget = store.get;\n  var wmhas = store.has;\n  var wmset = store.set;\n  set = function (it, metadata) {\n    if (wmhas.call(store, it)) throw new TypeError(OBJECT_ALREADY_INITIALIZED);\n    metadata.facade = it;\n    wmset.call(store, it, metadata);\n    return metadata;\n  };\n  get = function (it) {\n    return wmget.call(store, it) || {};\n  };\n  has = function (it) {\n    return wmhas.call(store, it);\n  };\n} else {\n  var STATE = sharedKey('state');\n  hiddenKeys[STATE] = true;\n  set = function (it, metadata) {\n    if (objectHas(it, STATE)) throw new TypeError(OBJECT_ALREADY_INITIALIZED);\n    metadata.facade = it;\n    createNonEnumerableProperty(it, STATE, metadata);\n    return metadata;\n  };\n  get = function (it) {\n    return objectHas(it, STATE) ? it[STATE] : {};\n  };\n  has = function (it) {\n    return objectHas(it, STATE);\n  };\n}\n\nmodule.exports = {\n  set: set,\n  get: get,\n  has: has,\n  enforce: enforce,\n  getterFor: getterFor\n};\n\n\n/***/ }),\n/* 44 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar TO_STRING_TAG_SUPPORT = __webpack_require__(88);\nvar defineProperty = __webpack_require__(18).f;\nvar createNonEnumerableProperty = __webpack_require__(19);\nvar has = __webpack_require__(17);\nvar toString = __webpack_require__(178);\nvar wellKnownSymbol = __webpack_require__(9);\n\nvar TO_STRING_TAG = wellKnownSymbol('toStringTag');\n\nmodule.exports = function (it, TAG, STATIC, SET_METHOD) {\n  if (it) {\n    var target = STATIC ? it : it.prototype;\n    if (!has(target, TO_STRING_TAG)) {\n      defineProperty(target, TO_STRING_TAG, { configurable: true, value: TAG });\n    }\n    if (SET_METHOD && !TO_STRING_TAG_SUPPORT) {\n      createNonEnumerableProperty(target, 'toString', toString);\n    }\n  }\n};\n\n\n/***/ }),\n/* 45 */\n/***/ (function(module, exports, __webpack_require__) {\n\n__webpack_require__(55);\nvar DOMIterables = __webpack_require__(189);\nvar global = __webpack_require__(8);\nvar classof = __webpack_require__(71);\nvar createNonEnumerableProperty = __webpack_require__(19);\nvar Iterators = __webpack_require__(42);\nvar wellKnownSymbol = __webpack_require__(9);\n\nvar TO_STRING_TAG = wellKnownSymbol('toStringTag');\n\nfor (var COLLECTION_NAME in DOMIterables) {\n  var Collection = global[COLLECTION_NAME];\n  var CollectionPrototype = Collection && Collection.prototype;\n  if (CollectionPrototype && classof(CollectionPrototype) !== TO_STRING_TAG) {\n    createNonEnumerableProperty(CollectionPrototype, TO_STRING_TAG, COLLECTION_NAME);\n  }\n  Iterators[COLLECTION_NAME] = Iterators.Array;\n}\n\n\n/***/ }),\n/* 46 */\n/***/ (function(module, exports, __webpack_require__) {\n\nmodule.exports = __webpack_require__(224);\n\n/***/ }),\n/* 47 */\n/***/ (function(module, exports, __webpack_require__) {\n\nmodule.exports = __webpack_require__(276);\n\n/***/ }),\n/* 48 */\n/***/ (function(module, exports, __webpack_require__) {\n\nmodule.exports = __webpack_require__(280);\n\n/***/ }),\n/* 49 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _interopRequireDefault = __webpack_require__(0);\n\nvar _defineProperty = _interopRequireDefault(__webpack_require__(1));\n\nvar _forEach = _interopRequireDefault(__webpack_require__(4));\n\n(0, _defineProperty[\"default\"])(exports, \"__esModule\", {\n  value: true\n});\nexports.createElementFragment = exports.createDocumentFragment = exports.createElement = exports.insertBefore = exports.getEndPoint = exports.getStartPoint = exports.updateRange = exports.filterSelectionNodes = void 0;\n\nvar tslib_1 = __webpack_require__(2);\n\nvar _1 = __webpack_require__(142);\n\nvar dom_core_1 = tslib_1.__importDefault(__webpack_require__(3));\n/**\n * 过滤 选择的 node 节点\n * @returns { DomElement[] } DomElement[]\n */\n\n\nfunction filterSelectionNodes($nodes) {\n  var $listHtml = [];\n  (0, _forEach[\"default\"])($nodes).call($nodes, function ($node) {\n    var targerName = $node.getNodeName();\n\n    if (targerName !== _1.ListType.OrderedList && targerName !== _1.ListType.UnorderedList) {\n      // 非序列\n      $listHtml.push($node);\n    } else {\n      // 序列\n      if ($node.prior) {\n        $listHtml.push($node.prior);\n      } else {\n        var $children = $node.children();\n        $children === null || $children === void 0 ? void 0 : (0, _forEach[\"default\"])($children).call($children, function ($li) {\n          $listHtml.push(dom_core_1[\"default\"]($li));\n        });\n      }\n    }\n  });\n  return $listHtml;\n}\n\nexports.filterSelectionNodes = filterSelectionNodes;\n/**\n * 更新选区\n * @param $node\n */\n\nfunction updateRange(editor, $node, collapsed) {\n  var selection = editor.selection;\n  var range = document.createRange(); // ===============================\n  // length 大于 1\n  // 代表着转换是一个文档节点多段落\n  // ===============================\n\n  if ($node.length > 1) {\n    range.setStart($node.elems[0], 0);\n    range.setEnd($node.elems[$node.length - 1], $node.elems[$node.length - 1].childNodes.length);\n  } // ===============================\n  // 序列节点 或 单段落\n  // ===============================\n  else {\n    range.selectNodeContents($node.elems[0]);\n  } // ===============================\n  // collapsed 为 true 代表是光标\n  // ===============================\n\n\n  collapsed && range.collapse(false);\n  selection.saveRange(range);\n  selection.restoreSelection();\n}\n\nexports.updateRange = updateRange;\n/**\n * 获取起点元素\n * @param $startElem 开始序列节点\n */\n\nfunction getStartPoint($startElem) {\n  var _a;\n\n  return $startElem.prior ? $startElem.prior // 有 prior 代表不是全选序列\n  : dom_core_1[\"default\"]((_a = $startElem.children()) === null || _a === void 0 ? void 0 : _a.elems[0]); // 没有则代表全选序列\n}\n\nexports.getStartPoint = getStartPoint;\n/**\n * 获取结束元素\n * @param $endElem 结束序列节点\n */\n\nfunction getEndPoint($endElem) {\n  var _a;\n\n  return $endElem.prior ? $endElem.prior // 有 prior 代表不是全选序列\n  : dom_core_1[\"default\"]((_a = $endElem.children()) === null || _a === void 0 ? void 0 : _a.last().elems[0]); // 没有则代表全选序列\n}\n\nexports.getEndPoint = getEndPoint;\n/**\n * 在您指定节点的已有子节点之前插入新的子节点。\n * @param { DomElement } $node 指定节点\n * @param { ContainerFragment } newNode 插入的新子节点\n * @param { Node | null } existingNode 指定子节点\n */\n\nfunction insertBefore($node, newNode, existingNode) {\n  if (existingNode === void 0) {\n    existingNode = null;\n  }\n\n  $node.parent().elems[0].insertBefore(newNode, existingNode);\n}\n\nexports.insertBefore = insertBefore;\n/**\n * 创建指定的 element 对象\n */\n\nfunction createElement(target) {\n  return document.createElement(target);\n}\n\nexports.createElement = createElement;\n/**\n * 创建文档片段\n */\n\nfunction createDocumentFragment() {\n  return document.createDocumentFragment();\n}\n\nexports.createDocumentFragment = createDocumentFragment;\n/**\n * 生成 li 标签的元素，并返回 $fragment 文档片段\n * @param { DomElement[] } $nodes 需要转换成 li 的 dom 元素数组\n * @param { ContainerFragment } $fragment 用于存储生成后 li 元素的文档片段\n */\n\nfunction createElementFragment($nodes, $fragment, tag) {\n  if (tag === void 0) {\n    tag = 'li';\n  }\n\n  (0, _forEach[\"default\"])($nodes).call($nodes, function ($node) {\n    var $list = createElement(tag);\n    $list.innerHTML = $node.html();\n    $fragment.appendChild($list);\n    $node.remove();\n  });\n  return $fragment;\n}\n\nexports.createElementFragment = createElementFragment;\n\n/***/ }),\n/* 50 */\n/***/ (function(module, exports) {\n\nvar toString = {}.toString;\n\nmodule.exports = function (it) {\n  return toString.call(it).slice(8, -1);\n};\n\n\n/***/ }),\n/* 51 */\n/***/ (function(module, exports) {\n\n// `RequireObjectCoercible` abstract operation\n// https://tc39.es/ecma262/#sec-requireobjectcoercible\nmodule.exports = function (it) {\n  if (it == undefined) throw TypeError(\"Can't call method on \" + it);\n  return it;\n};\n\n\n/***/ }),\n/* 52 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar getBuiltIn = __webpack_require__(25);\n\nmodule.exports = getBuiltIn('navigator', 'userAgent') || '';\n\n\n/***/ }),\n/* 53 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar internalObjectKeys = __webpack_require__(110);\nvar enumBugKeys = __webpack_require__(87);\n\n// `Object.keys` method\n// https://tc39.es/ecma262/#sec-object.keys\n// eslint-disable-next-line es/no-object-keys -- safe\nmodule.exports = Object.keys || function keys(O) {\n  return internalObjectKeys(O, enumBugKeys);\n};\n\n\n/***/ }),\n/* 54 */\n/***/ (function(module, exports) {\n\nmodule.exports = {};\n\n\n/***/ }),\n/* 55 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar toIndexedObject = __webpack_require__(29);\nvar addToUnscopables = __webpack_require__(89);\nvar Iterators = __webpack_require__(42);\nvar InternalStateModule = __webpack_require__(43);\nvar defineIterator = __webpack_require__(90);\n\nvar ARRAY_ITERATOR = 'Array Iterator';\nvar setInternalState = InternalStateModule.set;\nvar getInternalState = InternalStateModule.getterFor(ARRAY_ITERATOR);\n\n// `Array.prototype.entries` method\n// https://tc39.es/ecma262/#sec-array.prototype.entries\n// `Array.prototype.keys` method\n// https://tc39.es/ecma262/#sec-array.prototype.keys\n// `Array.prototype.values` method\n// https://tc39.es/ecma262/#sec-array.prototype.values\n// `Array.prototype[@@iterator]` method\n// https://tc39.es/ecma262/#sec-array.prototype-@@iterator\n// `CreateArrayIterator` internal method\n// https://tc39.es/ecma262/#sec-createarrayiterator\nmodule.exports = defineIterator(Array, 'Array', function (iterated, kind) {\n  setInternalState(this, {\n    type: ARRAY_ITERATOR,\n    target: toIndexedObject(iterated), // target\n    index: 0,                          // next index\n    kind: kind                         // kind\n  });\n// `%ArrayIteratorPrototype%.next` method\n// https://tc39.es/ecma262/#sec-%arrayiteratorprototype%.next\n}, function () {\n  var state = getInternalState(this);\n  var target = state.target;\n  var kind = state.kind;\n  var index = state.index++;\n  if (!target || index >= target.length) {\n    state.target = undefined;\n    return { value: undefined, done: true };\n  }\n  if (kind == 'keys') return { value: index, done: false };\n  if (kind == 'values') return { value: target[index], done: false };\n  return { value: [index, target[index]], done: false };\n}, 'values');\n\n// argumentsList[@@iterator] is %ArrayProto_values%\n// https://tc39.es/ecma262/#sec-createunmappedargumentsobject\n// https://tc39.es/ecma262/#sec-createmappedargumentsobject\nIterators.Arguments = Iterators.Array;\n\n// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables\naddToUnscopables('keys');\naddToUnscopables('values');\naddToUnscopables('entries');\n\n\n/***/ }),\n/* 56 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar createNonEnumerableProperty = __webpack_require__(19);\n\nmodule.exports = function (target, key, value, options) {\n  if (options && options.enumerable) target[key] = value;\n  else createNonEnumerableProperty(target, key, value);\n};\n\n\n/***/ }),\n/* 57 */\n/***/ (function(module, exports) {\n\n// empty\n\n\n/***/ }),\n/* 58 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar charAt = __webpack_require__(188).charAt;\nvar toString = __webpack_require__(30);\nvar InternalStateModule = __webpack_require__(43);\nvar defineIterator = __webpack_require__(90);\n\nvar STRING_ITERATOR = 'String Iterator';\nvar setInternalState = InternalStateModule.set;\nvar getInternalState = InternalStateModule.getterFor(STRING_ITERATOR);\n\n// `String.prototype[@@iterator]` method\n// https://tc39.es/ecma262/#sec-string.prototype-@@iterator\ndefineIterator(String, 'String', function (iterated) {\n  setInternalState(this, {\n    type: STRING_ITERATOR,\n    string: toString(iterated),\n    index: 0\n  });\n// `%StringIteratorPrototype%.next` method\n// https://tc39.es/ecma262/#sec-%stringiteratorprototype%.next\n}, function next() {\n  var state = getInternalState(this);\n  var string = state.string;\n  var index = state.index;\n  var point;\n  if (index >= string.length) return { value: undefined, done: true };\n  point = charAt(string, index);\n  state.index += point.length;\n  return { value: point, done: false };\n});\n\n\n/***/ }),\n/* 59 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar classof = __webpack_require__(50);\n\n// `IsArray` abstract operation\n// https://tc39.es/ecma262/#sec-isarray\n// eslint-disable-next-line es/no-array-isarray -- safe\nmodule.exports = Array.isArray || function isArray(arg) {\n  return classof(arg) == 'Array';\n};\n\n\n/***/ }),\n/* 60 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar fails = __webpack_require__(12);\nvar wellKnownSymbol = __webpack_require__(9);\nvar V8_VERSION = __webpack_require__(66);\n\nvar SPECIES = wellKnownSymbol('species');\n\nmodule.exports = function (METHOD_NAME) {\n  // We can't use this feature detection in V8 since it causes\n  // deoptimization and serious performance degradation\n  // https://github.com/zloirock/core-js/issues/677\n  return V8_VERSION >= 51 || !fails(function () {\n    var array = [];\n    var constructor = array.constructor = {};\n    constructor[SPECIES] = function () {\n      return { foo: 1 };\n    };\n    return array[METHOD_NAME](Boolean).foo !== 1;\n  });\n};\n\n\n/***/ }),\n/* 61 */\n/***/ (function(module, exports, __webpack_require__) {\n\nmodule.exports = __webpack_require__(233);\n\n/***/ }),\n/* 62 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _interopRequireDefault = __webpack_require__(0);\n\nvar _defineProperty = _interopRequireDefault(__webpack_require__(1));\n\n(0, _defineProperty[\"default\"])(exports, \"__esModule\", {\n  value: true\n});\nexports.ListHandle = void 0;\n\nvar tslib_1 = __webpack_require__(2);\n\nvar SelectionRangeElem_1 = tslib_1.__importDefault(__webpack_require__(388));\n\nvar ListHandle = function () {\n  function ListHandle(options) {\n    this.options = options;\n    this.selectionRangeElem = new SelectionRangeElem_1[\"default\"]();\n  }\n\n  return ListHandle;\n}();\n\nexports.ListHandle = ListHandle;\n\n/***/ }),\n/* 63 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar $propertyIsEnumerable = {}.propertyIsEnumerable;\n// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe\nvar getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\n\n// Nashorn ~ JDK8 bug\nvar NASHORN_BUG = getOwnPropertyDescriptor && !$propertyIsEnumerable.call({ 1: 2 }, 1);\n\n// `Object.prototype.propertyIsEnumerable` method implementation\n// https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable\nexports.f = NASHORN_BUG ? function propertyIsEnumerable(V) {\n  var descriptor = getOwnPropertyDescriptor(this, V);\n  return !!descriptor && descriptor.enumerable;\n} : $propertyIsEnumerable;\n\n\n/***/ }),\n/* 64 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar toPrimitive = __webpack_require__(151);\nvar isSymbol = __webpack_require__(65);\n\n// `ToPropertyKey` abstract operation\n// https://tc39.es/ecma262/#sec-topropertykey\nmodule.exports = function (argument) {\n  var key = toPrimitive(argument, 'string');\n  return isSymbol(key) ? key : String(key);\n};\n\n\n/***/ }),\n/* 65 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar getBuiltIn = __webpack_require__(25);\nvar USE_SYMBOL_AS_UID = __webpack_require__(107);\n\nmodule.exports = USE_SYMBOL_AS_UID ? function (it) {\n  return typeof it == 'symbol';\n} : function (it) {\n  var $Symbol = getBuiltIn('Symbol');\n  return typeof $Symbol == 'function' && Object(it) instanceof $Symbol;\n};\n\n\n/***/ }),\n/* 66 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar global = __webpack_require__(8);\nvar userAgent = __webpack_require__(52);\n\nvar process = global.process;\nvar Deno = global.Deno;\nvar versions = process && process.versions || Deno && Deno.version;\nvar v8 = versions && versions.v8;\nvar match, version;\n\nif (v8) {\n  match = v8.split('.');\n  version = match[0] < 4 ? 1 : match[0] + match[1];\n} else if (userAgent) {\n  match = userAgent.match(/Edge\\/(\\d+)/);\n  if (!match || match[1] >= 74) {\n    match = userAgent.match(/Chrome\\/(\\d+)/);\n    if (match) version = match[1];\n  }\n}\n\nmodule.exports = version && +version;\n\n\n/***/ }),\n/* 67 */\n/***/ (function(module, exports) {\n\nvar id = 0;\nvar postfix = Math.random();\n\nmodule.exports = function (key) {\n  return 'Symbol(' + String(key === undefined ? '' : key) + ')_' + (++id + postfix).toString(36);\n};\n\n\n/***/ }),\n/* 68 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar shared = __webpack_require__(80);\nvar uid = __webpack_require__(67);\n\nvar keys = shared('keys');\n\nmodule.exports = function (key) {\n  return keys[key] || (keys[key] = uid(key));\n};\n\n\n/***/ }),\n/* 69 */\n/***/ (function(module, exports, __webpack_require__) {\n\n/* global ActiveXObject -- old IE, WSH */\nvar anObject = __webpack_require__(20);\nvar defineProperties = __webpack_require__(175);\nvar enumBugKeys = __webpack_require__(87);\nvar hiddenKeys = __webpack_require__(54);\nvar html = __webpack_require__(111);\nvar documentCreateElement = __webpack_require__(82);\nvar sharedKey = __webpack_require__(68);\n\nvar GT = '>';\nvar LT = '<';\nvar PROTOTYPE = 'prototype';\nvar SCRIPT = 'script';\nvar IE_PROTO = sharedKey('IE_PROTO');\n\nvar EmptyConstructor = function () { /* empty */ };\n\nvar scriptTag = function (content) {\n  return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT;\n};\n\n// Create object with fake `null` prototype: use ActiveX Object with cleared prototype\nvar NullProtoObjectViaActiveX = function (activeXDocument) {\n  activeXDocument.write(scriptTag(''));\n  activeXDocument.close();\n  var temp = activeXDocument.parentWindow.Object;\n  activeXDocument = null; // avoid memory leak\n  return temp;\n};\n\n// Create object with fake `null` prototype: use iframe Object with cleared prototype\nvar NullProtoObjectViaIFrame = function () {\n  // Thrash, waste and sodomy: IE GC bug\n  var iframe = documentCreateElement('iframe');\n  var JS = 'java' + SCRIPT + ':';\n  var iframeDocument;\n  iframe.style.display = 'none';\n  html.appendChild(iframe);\n  // https://github.com/zloirock/core-js/issues/475\n  iframe.src = String(JS);\n  iframeDocument = iframe.contentWindow.document;\n  iframeDocument.open();\n  iframeDocument.write(scriptTag('document.F=Object'));\n  iframeDocument.close();\n  return iframeDocument.F;\n};\n\n// Check for document.domain and active x support\n// No need to use active x approach when document.domain is not set\n// see https://github.com/es-shims/es5-shim/issues/150\n// variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346\n// avoid IE GC bug\nvar activeXDocument;\nvar NullProtoObject = function () {\n  try {\n    activeXDocument = new ActiveXObject('htmlfile');\n  } catch (error) { /* ignore */ }\n  NullProtoObject = typeof document != 'undefined'\n    ? document.domain && activeXDocument\n      ? NullProtoObjectViaActiveX(activeXDocument) // old IE\n      : NullProtoObjectViaIFrame()\n    : NullProtoObjectViaActiveX(activeXDocument); // WSH\n  var length = enumBugKeys.length;\n  while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]];\n  return NullProtoObject();\n};\n\nhiddenKeys[IE_PROTO] = true;\n\n// `Object.create` method\n// https://tc39.es/ecma262/#sec-object.create\nmodule.exports = Object.create || function create(O, Properties) {\n  var result;\n  if (O !== null) {\n    EmptyConstructor[PROTOTYPE] = anObject(O);\n    result = new EmptyConstructor();\n    EmptyConstructor[PROTOTYPE] = null;\n    // add \"__proto__\" for Object.getPrototypeOf polyfill\n    result[IE_PROTO] = O;\n  } else result = NullProtoObject();\n  return Properties === undefined ? result : defineProperties(result, Properties);\n};\n\n\n/***/ }),\n/* 70 */\n/***/ (function(module, exports) {\n\nvar ceil = Math.ceil;\nvar floor = Math.floor;\n\n// `ToInteger` abstract operation\n// https://tc39.es/ecma262/#sec-tointeger\nmodule.exports = function (argument) {\n  return isNaN(argument = +argument) ? 0 : (argument > 0 ? floor : ceil)(argument);\n};\n\n\n/***/ }),\n/* 71 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar TO_STRING_TAG_SUPPORT = __webpack_require__(88);\nvar classofRaw = __webpack_require__(50);\nvar wellKnownSymbol = __webpack_require__(9);\n\nvar TO_STRING_TAG = wellKnownSymbol('toStringTag');\n// ES3 wrong here\nvar CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) == 'Arguments';\n\n// fallback for IE11 Script Access Denied error\nvar tryGet = function (it, key) {\n  try {\n    return it[key];\n  } catch (error) { /* empty */ }\n};\n\n// getting tag from ES6+ `Object.prototype.toString`\nmodule.exports = TO_STRING_TAG_SUPPORT ? classofRaw : function (it) {\n  var O, tag, result;\n  return it === undefined ? 'Undefined' : it === null ? 'Null'\n    // @@toStringTag case\n    : typeof (tag = tryGet(O = Object(it), TO_STRING_TAG)) == 'string' ? tag\n    // builtinTag case\n    : CORRECT_ARGUMENTS ? classofRaw(O)\n    // ES3 arguments fallback\n    : (result = classofRaw(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : result;\n};\n\n\n/***/ }),\n/* 72 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar aFunction = __webpack_require__(34);\n\nvar PromiseCapability = function (C) {\n  var resolve, reject;\n  this.promise = new C(function ($$resolve, $$reject) {\n    if (resolve !== undefined || reject !== undefined) throw TypeError('Bad Promise constructor');\n    resolve = $$resolve;\n    reject = $$reject;\n  });\n  this.resolve = aFunction(resolve);\n  this.reject = aFunction(reject);\n};\n\n// `NewPromiseCapability` abstract operation\n// https://tc39.es/ecma262/#sec-newpromisecapability\nmodule.exports.f = function (C) {\n  return new PromiseCapability(C);\n};\n\n\n/***/ }),\n/* 73 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar fails = __webpack_require__(12);\n\nmodule.exports = function (METHOD_NAME, argument) {\n  var method = [][METHOD_NAME];\n  return !!method && fails(function () {\n    // eslint-disable-next-line no-useless-call,no-throw-literal -- required for testing\n    method.call(null, argument || function () { throw 1; }, 1);\n  });\n};\n\n\n/***/ }),\n/* 74 */\n/***/ (function(module, exports) {\n\n// a string of all valid unicode whitespaces\nmodule.exports = '\\u0009\\u000A\\u000B\\u000C\\u000D\\u0020\\u00A0\\u1680\\u2000\\u2001\\u2002' +\n  '\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\\uFEFF';\n\n\n/***/ }),\n/* 75 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar toPropertyKey = __webpack_require__(64);\nvar definePropertyModule = __webpack_require__(18);\nvar createPropertyDescriptor = __webpack_require__(38);\n\nmodule.exports = function (object, key, value) {\n  var propertyKey = toPropertyKey(key);\n  if (propertyKey in object) definePropertyModule.f(object, propertyKey, createPropertyDescriptor(0, value));\n  else object[propertyKey] = value;\n};\n\n\n/***/ }),\n/* 76 */\n/***/ (function(module, exports, __webpack_require__) {\n\nmodule.exports = __webpack_require__(220);\n\n/***/ }),\n/* 77 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar DESCRIPTORS = __webpack_require__(15);\nvar propertyIsEnumerableModule = __webpack_require__(63);\nvar createPropertyDescriptor = __webpack_require__(38);\nvar toIndexedObject = __webpack_require__(29);\nvar toPropertyKey = __webpack_require__(64);\nvar has = __webpack_require__(17);\nvar IE8_DOM_DEFINE = __webpack_require__(108);\n\n// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe\nvar $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\n\n// `Object.getOwnPropertyDescriptor` method\n// https://tc39.es/ecma262/#sec-object.getownpropertydescriptor\nexports.f = DESCRIPTORS ? $getOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) {\n  O = toIndexedObject(O);\n  P = toPropertyKey(P);\n  if (IE8_DOM_DEFINE) try {\n    return $getOwnPropertyDescriptor(O, P);\n  } catch (error) { /* empty */ }\n  if (has(O, P)) return createPropertyDescriptor(!propertyIsEnumerableModule.f.call(O, P), O[P]);\n};\n\n\n/***/ }),\n/* 78 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar fails = __webpack_require__(12);\nvar classof = __webpack_require__(50);\n\nvar split = ''.split;\n\n// fallback for non-array-like ES3 and non-enumerable old V8 strings\nmodule.exports = fails(function () {\n  // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346\n  // eslint-disable-next-line no-prototype-builtins -- safe\n  return !Object('z').propertyIsEnumerable(0);\n}) ? function (it) {\n  return classof(it) == 'String' ? split.call(it, '') : Object(it);\n} : Object;\n\n\n/***/ }),\n/* 79 */\n/***/ (function(module, exports, __webpack_require__) {\n\n/* eslint-disable es/no-symbol -- required for testing */\nvar V8_VERSION = __webpack_require__(66);\nvar fails = __webpack_require__(12);\n\n// eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing\nmodule.exports = !!Object.getOwnPropertySymbols && !fails(function () {\n  var symbol = Symbol();\n  // Chrome 38 Symbol has incorrect toString conversion\n  // `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances\n  return !String(symbol) || !(Object(symbol) instanceof Symbol) ||\n    // Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances\n    !Symbol.sham && V8_VERSION && V8_VERSION < 41;\n});\n\n\n/***/ }),\n/* 80 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar IS_PURE = __webpack_require__(39);\nvar store = __webpack_require__(81);\n\n(module.exports = function (key, value) {\n  return store[key] || (store[key] = value !== undefined ? value : {});\n})('versions', []).push({\n  version: '3.16.2',\n  mode: IS_PURE ? 'pure' : 'global',\n  copyright: '© 2021 Denis Pushkarev (zloirock.ru)'\n});\n\n\n/***/ }),\n/* 81 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar global = __webpack_require__(8);\nvar setGlobal = __webpack_require__(153);\n\nvar SHARED = '__core-js_shared__';\nvar store = global[SHARED] || setGlobal(SHARED, {});\n\nmodule.exports = store;\n\n\n/***/ }),\n/* 82 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar global = __webpack_require__(8);\nvar isObject = __webpack_require__(13);\n\nvar document = global.document;\n// typeof document.createElement is 'object' in old IE\nvar EXISTS = isObject(document) && isObject(document.createElement);\n\nmodule.exports = function (it) {\n  return EXISTS ? document.createElement(it) : {};\n};\n\n\n/***/ }),\n/* 83 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar has = __webpack_require__(17);\nvar toObject = __webpack_require__(26);\nvar sharedKey = __webpack_require__(68);\nvar CORRECT_PROTOTYPE_GETTER = __webpack_require__(173);\n\nvar IE_PROTO = sharedKey('IE_PROTO');\nvar ObjectPrototype = Object.prototype;\n\n// `Object.getPrototypeOf` method\n// https://tc39.es/ecma262/#sec-object.getprototypeof\n// eslint-disable-next-line es/no-object-getprototypeof -- safe\nmodule.exports = CORRECT_PROTOTYPE_GETTER ? Object.getPrototypeOf : function (O) {\n  O = toObject(O);\n  if (has(O, IE_PROTO)) return O[IE_PROTO];\n  if (typeof O.constructor == 'function' && O instanceof O.constructor) {\n    return O.constructor.prototype;\n  } return O instanceof Object ? ObjectPrototype : null;\n};\n\n\n/***/ }),\n/* 84 */\n/***/ (function(module, exports, __webpack_require__) {\n\n/* eslint-disable no-proto -- safe */\nvar anObject = __webpack_require__(20);\nvar aPossiblePrototype = __webpack_require__(174);\n\n// `Object.setPrototypeOf` method\n// https://tc39.es/ecma262/#sec-object.setprototypeof\n// Works with __proto__ only. Old v8 can't work with null proto objects.\n// eslint-disable-next-line es/no-object-setprototypeof -- safe\nmodule.exports = Object.setPrototypeOf || ('__proto__' in {} ? function () {\n  var CORRECT_SETTER = false;\n  var test = {};\n  var setter;\n  try {\n    // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe\n    setter = Object.getOwnPropertyDescriptor(Object.prototype, '__proto__').set;\n    setter.call(test, []);\n    CORRECT_SETTER = test instanceof Array;\n  } catch (error) { /* empty */ }\n  return function setPrototypeOf(O, proto) {\n    anObject(O);\n    aPossiblePrototype(proto);\n    if (CORRECT_SETTER) setter.call(O, proto);\n    else O.__proto__ = proto;\n    return O;\n  };\n}() : undefined);\n\n\n/***/ }),\n/* 85 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar toIndexedObject = __webpack_require__(29);\nvar toLength = __webpack_require__(35);\nvar toAbsoluteIndex = __webpack_require__(86);\n\n// `Array.prototype.{ indexOf, includes }` methods implementation\nvar createMethod = function (IS_INCLUDES) {\n  return function ($this, el, fromIndex) {\n    var O = toIndexedObject($this);\n    var length = toLength(O.length);\n    var index = toAbsoluteIndex(fromIndex, length);\n    var value;\n    // Array#includes uses SameValueZero equality algorithm\n    // eslint-disable-next-line no-self-compare -- NaN check\n    if (IS_INCLUDES && el != el) while (length > index) {\n      value = O[index++];\n      // eslint-disable-next-line no-self-compare -- NaN check\n      if (value != value) return true;\n    // Array#indexOf ignores holes, Array#includes - not\n    } else for (;length > index; index++) {\n      if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;\n    } return !IS_INCLUDES && -1;\n  };\n};\n\nmodule.exports = {\n  // `Array.prototype.includes` method\n  // https://tc39.es/ecma262/#sec-array.prototype.includes\n  includes: createMethod(true),\n  // `Array.prototype.indexOf` method\n  // https://tc39.es/ecma262/#sec-array.prototype.indexof\n  indexOf: createMethod(false)\n};\n\n\n/***/ }),\n/* 86 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar toInteger = __webpack_require__(70);\n\nvar max = Math.max;\nvar min = Math.min;\n\n// Helper for a popular repeating case of the spec:\n// Let integer be ? ToInteger(index).\n// If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).\nmodule.exports = function (index, length) {\n  var integer = toInteger(index);\n  return integer < 0 ? max(integer + length, 0) : min(integer, length);\n};\n\n\n/***/ }),\n/* 87 */\n/***/ (function(module, exports) {\n\n// IE8- don't enum bug keys\nmodule.exports = [\n  'constructor',\n  'hasOwnProperty',\n  'isPrototypeOf',\n  'propertyIsEnumerable',\n  'toLocaleString',\n  'toString',\n  'valueOf'\n];\n\n\n/***/ }),\n/* 88 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar wellKnownSymbol = __webpack_require__(9);\n\nvar TO_STRING_TAG = wellKnownSymbol('toStringTag');\nvar test = {};\n\ntest[TO_STRING_TAG] = 'z';\n\nmodule.exports = String(test) === '[object z]';\n\n\n/***/ }),\n/* 89 */\n/***/ (function(module, exports) {\n\nmodule.exports = function () { /* empty */ };\n\n\n/***/ }),\n/* 90 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar $ = __webpack_require__(5);\nvar createIteratorConstructor = __webpack_require__(177);\nvar getPrototypeOf = __webpack_require__(83);\nvar setPrototypeOf = __webpack_require__(84);\nvar setToStringTag = __webpack_require__(44);\nvar createNonEnumerableProperty = __webpack_require__(19);\nvar redefine = __webpack_require__(56);\nvar wellKnownSymbol = __webpack_require__(9);\nvar IS_PURE = __webpack_require__(39);\nvar Iterators = __webpack_require__(42);\nvar IteratorsCore = __webpack_require__(116);\n\nvar IteratorPrototype = IteratorsCore.IteratorPrototype;\nvar BUGGY_SAFARI_ITERATORS = IteratorsCore.BUGGY_SAFARI_ITERATORS;\nvar ITERATOR = wellKnownSymbol('iterator');\nvar KEYS = 'keys';\nvar VALUES = 'values';\nvar ENTRIES = 'entries';\n\nvar returnThis = function () { return this; };\n\nmodule.exports = function (Iterable, NAME, IteratorConstructor, next, DEFAULT, IS_SET, FORCED) {\n  createIteratorConstructor(IteratorConstructor, NAME, next);\n\n  var getIterationMethod = function (KIND) {\n    if (KIND === DEFAULT && defaultIterator) return defaultIterator;\n    if (!BUGGY_SAFARI_ITERATORS && KIND in IterablePrototype) return IterablePrototype[KIND];\n    switch (KIND) {\n      case KEYS: return function keys() { return new IteratorConstructor(this, KIND); };\n      case VALUES: return function values() { return new IteratorConstructor(this, KIND); };\n      case ENTRIES: return function entries() { return new IteratorConstructor(this, KIND); };\n    } return function () { return new IteratorConstructor(this); };\n  };\n\n  var TO_STRING_TAG = NAME + ' Iterator';\n  var INCORRECT_VALUES_NAME = false;\n  var IterablePrototype = Iterable.prototype;\n  var nativeIterator = IterablePrototype[ITERATOR]\n    || IterablePrototype['@@iterator']\n    || DEFAULT && IterablePrototype[DEFAULT];\n  var defaultIterator = !BUGGY_SAFARI_ITERATORS && nativeIterator || getIterationMethod(DEFAULT);\n  var anyNativeIterator = NAME == 'Array' ? IterablePrototype.entries || nativeIterator : nativeIterator;\n  var CurrentIteratorPrototype, methods, KEY;\n\n  // fix native\n  if (anyNativeIterator) {\n    CurrentIteratorPrototype = getPrototypeOf(anyNativeIterator.call(new Iterable()));\n    if (IteratorPrototype !== Object.prototype && CurrentIteratorPrototype.next) {\n      if (!IS_PURE && getPrototypeOf(CurrentIteratorPrototype) !== IteratorPrototype) {\n        if (setPrototypeOf) {\n          setPrototypeOf(CurrentIteratorPrototype, IteratorPrototype);\n        } else if (typeof CurrentIteratorPrototype[ITERATOR] != 'function') {\n          createNonEnumerableProperty(CurrentIteratorPrototype, ITERATOR, returnThis);\n        }\n      }\n      // Set @@toStringTag to native iterators\n      setToStringTag(CurrentIteratorPrototype, TO_STRING_TAG, true, true);\n      if (IS_PURE) Iterators[TO_STRING_TAG] = returnThis;\n    }\n  }\n\n  // fix Array.prototype.{ values, @@iterator }.name in V8 / FF\n  if (DEFAULT == VALUES && nativeIterator && nativeIterator.name !== VALUES) {\n    INCORRECT_VALUES_NAME = true;\n    defaultIterator = function values() { return nativeIterator.call(this); };\n  }\n\n  // define iterator\n  if ((!IS_PURE || FORCED) && IterablePrototype[ITERATOR] !== defaultIterator) {\n    createNonEnumerableProperty(IterablePrototype, ITERATOR, defaultIterator);\n  }\n  Iterators[NAME] = defaultIterator;\n\n  // export additional methods\n  if (DEFAULT) {\n    methods = {\n      values: getIterationMethod(VALUES),\n      keys: IS_SET ? defaultIterator : getIterationMethod(KEYS),\n      entries: getIterationMethod(ENTRIES)\n    };\n    if (FORCED) for (KEY in methods) {\n      if (BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME || !(KEY in IterablePrototype)) {\n        redefine(IterablePrototype, KEY, methods[KEY]);\n      }\n    } else $({ target: NAME, proto: true, forced: BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME }, methods);\n  }\n\n  return methods;\n};\n\n\n/***/ }),\n/* 91 */\n/***/ (function(module, exports) {\n\nmodule.exports = function (it, Constructor, name) {\n  if (!(it instanceof Constructor)) {\n    throw TypeError('Incorrect ' + (name ? name + ' ' : '') + 'invocation');\n  } return it;\n};\n\n\n/***/ }),\n/* 92 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar classof = __webpack_require__(50);\nvar global = __webpack_require__(8);\n\nmodule.exports = classof(global.process) == 'process';\n\n\n/***/ }),\n/* 93 */\n/***/ (function(module, exports) {\n\nmodule.exports = function (exec) {\n  try {\n    return { error: false, value: exec() };\n  } catch (error) {\n    return { error: true, value: error };\n  }\n};\n\n\n/***/ }),\n/* 94 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * @description 编辑器 class\n * @author wangfupeng\n */\n\nvar _interopRequireDefault = __webpack_require__(0);\n\nvar _defineProperty = _interopRequireDefault(__webpack_require__(1));\n\nvar _forEach = _interopRequireDefault(__webpack_require__(4));\n\n(0, _defineProperty[\"default\"])(exports, \"__esModule\", {\n  value: true\n});\n\nvar tslib_1 = __webpack_require__(2);\n\nvar dom_core_1 = tslib_1.__importDefault(__webpack_require__(3));\n\nvar util_1 = __webpack_require__(6);\n\nvar config_1 = tslib_1.__importDefault(__webpack_require__(282));\n\nvar selection_1 = tslib_1.__importDefault(__webpack_require__(295));\n\nvar command_1 = tslib_1.__importDefault(__webpack_require__(296));\n\nvar index_1 = tslib_1.__importDefault(__webpack_require__(297));\n\nvar index_2 = tslib_1.__importDefault(__webpack_require__(316));\n\nvar init_dom_1 = tslib_1.__importStar(__webpack_require__(432));\n\nvar init_selection_1 = tslib_1.__importDefault(__webpack_require__(433));\n\nvar bind_event_1 = tslib_1.__importDefault(__webpack_require__(434));\n\nvar i18next_init_1 = tslib_1.__importDefault(__webpack_require__(435));\n\nvar set_full_screen_1 = tslib_1.__importStar(__webpack_require__(436));\n\nvar scroll_to_head_1 = tslib_1.__importDefault(__webpack_require__(439));\n\nvar z_index_1 = tslib_1.__importDefault(__webpack_require__(440));\n\nvar index_3 = tslib_1.__importDefault(__webpack_require__(441));\n\nvar index_4 = tslib_1.__importDefault(__webpack_require__(443));\n\nvar disable_1 = tslib_1.__importDefault(__webpack_require__(453));\n\nvar selection_change_1 = tslib_1.__importDefault(__webpack_require__(456));\n\nvar plugins_1 = tslib_1.__importStar(__webpack_require__(457));\n\nvar BtnMenu_1 = tslib_1.__importDefault(__webpack_require__(23));\n\nvar DropList_1 = tslib_1.__importDefault(__webpack_require__(138));\n\nvar DropListMenu_1 = tslib_1.__importDefault(__webpack_require__(24));\n\nvar Panel_1 = tslib_1.__importDefault(__webpack_require__(33));\n\nvar PanelMenu_1 = tslib_1.__importDefault(__webpack_require__(36));\n\nvar Tooltip_1 = tslib_1.__importDefault(__webpack_require__(37));\n\nvar EDITOR_ID = 1;\n\nvar Editor = function () {\n  /**\n   * 构造函数\n   * @param toolbarSelector 工具栏 DOM selector\n   * @param textSelector 文本区域 DOM selector\n   */\n  function Editor(toolbarSelector, textSelector) {\n    this.pluginsFunctionList = {}; // 实例销毁前需要执行的钩子集合\n\n    this.beforeDestroyHooks = []; // id，用以区分单个页面不同的编辑器对象\n\n    this.id = \"wangEditor-\" + EDITOR_ID++;\n    this.toolbarSelector = toolbarSelector;\n    this.textSelector = textSelector;\n    init_dom_1.selectorValidator(this); // 属性的默认值，后面可能会再修改\n    // 默认配置 - 当一个页面有多个编辑器的时候，因为 JS 的特性(引用类型)会导致多个编辑器的 config 引用是同一个，所以需要 深度克隆 断掉引用\n\n    this.config = util_1.deepClone(config_1[\"default\"]);\n    this.$toolbarElem = dom_core_1[\"default\"]('<div></div>');\n    this.$textContainerElem = dom_core_1[\"default\"]('<div></div>');\n    this.$textElem = dom_core_1[\"default\"]('<div></div>');\n    this.toolbarElemId = '';\n    this.textElemId = '';\n    this.isFocus = false;\n    this.isComposing = false;\n    this.isCompatibleMode = false;\n    this.selection = new selection_1[\"default\"](this);\n    this.cmd = new command_1[\"default\"](this);\n    this.txt = new index_1[\"default\"](this);\n    this.menus = new index_2[\"default\"](this);\n    this.zIndex = new z_index_1[\"default\"]();\n    this.change = new index_3[\"default\"](this);\n    this.history = new index_4[\"default\"](this);\n    this.onSelectionChange = new selection_change_1[\"default\"](this);\n\n    var _a = disable_1[\"default\"](this),\n        disable = _a.disable,\n        enable = _a.enable;\n\n    this.disable = disable;\n    this.enable = enable;\n    this.isEnable = true;\n  }\n  /**\n   * 初始化选区\n   * @param newLine 新建一行\n   */\n\n\n  Editor.prototype.initSelection = function (newLine) {\n    init_selection_1[\"default\"](this, newLine);\n  };\n  /**\n   * 创建编辑器实例\n   */\n\n\n  Editor.prototype.create = function () {\n    // 初始化 ZIndex\n    this.zIndex.init(this); // 确定当前的历史记录模式\n\n    this.isCompatibleMode = this.config.compatibleMode(); // 标准模式下，重置延迟时间\n\n    if (!this.isCompatibleMode) {\n      this.config.onchangeTimeout = 30;\n    } // 国际化 因为要在创建菜单前使用 所以要最先 初始化\n\n\n    i18next_init_1[\"default\"](this); // 初始化 DOM\n\n    init_dom_1[\"default\"](this); // 初始化 text\n\n    this.txt.init(); // 初始化菜单\n\n    this.menus.init(); // 初始化全屏功能\n\n    set_full_screen_1[\"default\"](this); // 初始化选区，将光标定位到内容尾部\n\n    this.initSelection(true); // 绑定事件\n\n    bind_event_1[\"default\"](this); // 绑定监听的目标节点\n\n    this.change.observe();\n    this.history.observe(); // 初始化插件\n\n    plugins_1[\"default\"](this);\n  };\n  /**\n   * 提供给用户添加销毁前的钩子函数\n   * @param fn 钩子函数\n   */\n\n\n  Editor.prototype.beforeDestroy = function (fn) {\n    this.beforeDestroyHooks.push(fn);\n    return this;\n  };\n  /**\n   * 销毁当前编辑器实例\n   */\n\n\n  Editor.prototype.destroy = function () {\n    var _context;\n\n    var _this = this; // 调用钩子函数\n\n\n    (0, _forEach[\"default\"])(_context = this.beforeDestroyHooks).call(_context, function (fn) {\n      return fn.call(_this);\n    }); // 销毁 DOM 节点\n\n    this.$toolbarElem.remove();\n    this.$textContainerElem.remove();\n  };\n  /**\n   * 将编辑器设置为全屏\n   */\n\n\n  Editor.prototype.fullScreen = function () {\n    set_full_screen_1.setFullScreen(this);\n  };\n  /**\n   * 将编辑器退出全屏\n   */\n\n\n  Editor.prototype.unFullScreen = function () {\n    set_full_screen_1.setUnFullScreen(this);\n  };\n  /**\n   * 滚动到指定标题锚点\n   * @param id 标题锚点id\n   */\n\n\n  Editor.prototype.scrollToHead = function (id) {\n    scroll_to_head_1[\"default\"](this, id);\n  };\n  /**\n   * 自定义添加菜单\n   * @param key 菜单 key\n   * @param Menu 菜单构造函数\n   */\n\n\n  Editor.registerMenu = function (key, Menu) {\n    if (!Menu || typeof Menu !== 'function') return;\n    Editor.globalCustomMenuConstructorList[key] = Menu;\n  };\n  /**\n   * 自定义添加插件\n   * @param { string } name 插件的名称\n   * @param { RegisterOptions } options 插件的选项\n   */\n\n\n  Editor.prototype.registerPlugin = function (name, options) {\n    plugins_1.registerPlugin(name, options, this.pluginsFunctionList);\n  };\n  /**\n   * 自定义添加插件\n   * @param { string } name 插件的名称\n   * @param { RegisterOptions } options 插件的选项\n   */\n\n\n  Editor.registerPlugin = function (name, options) {\n    plugins_1.registerPlugin(name, options, Editor.globalPluginsFunctionList);\n  }; // 暴露 $\n\n\n  Editor.$ = dom_core_1[\"default\"];\n  Editor.BtnMenu = BtnMenu_1[\"default\"];\n  Editor.DropList = DropList_1[\"default\"];\n  Editor.DropListMenu = DropListMenu_1[\"default\"];\n  Editor.Panel = Panel_1[\"default\"];\n  Editor.PanelMenu = PanelMenu_1[\"default\"];\n  Editor.Tooltip = Tooltip_1[\"default\"];\n  Editor.globalCustomMenuConstructorList = {};\n  Editor.globalPluginsFunctionList = {};\n  return Editor;\n}();\n\nexports[\"default\"] = Editor;\n\n/***/ }),\n/* 95 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar arraySpeciesConstructor = __webpack_require__(195);\n\n// `ArraySpeciesCreate` abstract operation\n// https://tc39.es/ecma262/#sec-arrayspeciescreate\nmodule.exports = function (originalArray, length) {\n  return new (arraySpeciesConstructor(originalArray))(length === 0 ? 0 : length);\n};\n\n\n/***/ }),\n/* 96 */\n/***/ (function(module, exports, __webpack_require__) {\n\nmodule.exports = __webpack_require__(196);\n\n/***/ }),\n/* 97 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar requireObjectCoercible = __webpack_require__(51);\nvar toString = __webpack_require__(30);\nvar whitespaces = __webpack_require__(74);\n\nvar whitespace = '[' + whitespaces + ']';\nvar ltrim = RegExp('^' + whitespace + whitespace + '*');\nvar rtrim = RegExp(whitespace + whitespace + '*$');\n\n// `String.prototype.{ trim, trimStart, trimEnd, trimLeft, trimRight }` methods implementation\nvar createMethod = function (TYPE) {\n  return function ($this) {\n    var string = toString(requireObjectCoercible($this));\n    if (TYPE & 1) string = string.replace(ltrim, '');\n    if (TYPE & 2) string = string.replace(rtrim, '');\n    return string;\n  };\n};\n\nmodule.exports = {\n  // `String.prototype.{ trimLeft, trimStart }` methods\n  // https://tc39.es/ecma262/#sec-string.prototype.trimstart\n  start: createMethod(1),\n  // `String.prototype.{ trimRight, trimEnd }` methods\n  // https://tc39.es/ecma262/#sec-string.prototype.trimend\n  end: createMethod(2),\n  // `String.prototype.trim` method\n  // https://tc39.es/ecma262/#sec-string.prototype.trim\n  trim: createMethod(3)\n};\n\n\n/***/ }),\n/* 98 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar internalObjectKeys = __webpack_require__(110);\nvar enumBugKeys = __webpack_require__(87);\n\nvar hiddenKeys = enumBugKeys.concat('length', 'prototype');\n\n// `Object.getOwnPropertyNames` method\n// https://tc39.es/ecma262/#sec-object.getownpropertynames\n// eslint-disable-next-line es/no-object-getownpropertynames -- safe\nexports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {\n  return internalObjectKeys(O, hiddenKeys);\n};\n\n\n/***/ }),\n/* 99 */\n/***/ (function(module, exports, __webpack_require__) {\n\nmodule.exports = __webpack_require__(216);\n\n/***/ }),\n/* 100 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar _Symbol = __webpack_require__(238);\n\nvar _Symbol$iterator = __webpack_require__(267);\n\nfunction _typeof(obj) {\n  \"@babel/helpers - typeof\";\n\n  if (typeof _Symbol === \"function\" && typeof _Symbol$iterator === \"symbol\") {\n    module.exports = _typeof = function _typeof(obj) {\n      return typeof obj;\n    };\n\n    module.exports[\"default\"] = module.exports, module.exports.__esModule = true;\n  } else {\n    module.exports = _typeof = function _typeof(obj) {\n      return obj && typeof _Symbol === \"function\" && obj.constructor === _Symbol && obj !== _Symbol.prototype ? \"symbol\" : typeof obj;\n    };\n\n    module.exports[\"default\"] = module.exports, module.exports.__esModule = true;\n  }\n\n  return _typeof(obj);\n}\n\nmodule.exports = _typeof;\nmodule.exports[\"default\"] = module.exports, module.exports.__esModule = true;\n\n/***/ }),\n/* 101 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar wellKnownSymbol = __webpack_require__(9);\n\nexports.f = wellKnownSymbol;\n\n\n/***/ }),\n/* 102 */\n/***/ (function(module, exports, __webpack_require__) {\n\nmodule.exports = __webpack_require__(321);\n\n/***/ }),\n/* 103 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * @description Menu class 父类\n * @author wangfupeng\n */\n\nvar _interopRequireDefault = __webpack_require__(0);\n\nvar _defineProperty = _interopRequireDefault(__webpack_require__(1));\n\nvar _forEach = _interopRequireDefault(__webpack_require__(4));\n\n(0, _defineProperty[\"default\"])(exports, \"__esModule\", {\n  value: true\n});\n\nvar tslib_1 = __webpack_require__(2);\n\nvar Panel_1 = tslib_1.__importDefault(__webpack_require__(33));\n\nvar Menu = function () {\n  function Menu($elem, editor) {\n    var _this = this;\n\n    this.$elem = $elem;\n    this.editor = editor;\n    this._active = false; // 绑定菜单点击事件\n\n    $elem.on('click', function (e) {\n      var _context;\n\n      Panel_1[\"default\"].hideCurAllPanels(); // 隐藏当前的所有 Panel\n      // 触发菜单点击的钩子\n\n      (0, _forEach[\"default\"])(_context = editor.txt.eventHooks.menuClickEvents).call(_context, function (fn) {\n        return fn();\n      });\n      e.stopPropagation();\n\n      if (editor.selection.getRange() == null) {\n        return;\n      }\n\n      _this.clickHandler(e);\n    });\n  }\n  /**\n   * 菜单点击事件，子类可重写\n   * @param e event\n   */\n\n\n  Menu.prototype.clickHandler = function (e) {};\n  /**\n   * 激活菜单，高亮显示\n   */\n\n\n  Menu.prototype.active = function () {\n    this._active = true;\n    this.$elem.addClass('w-e-active');\n  };\n  /**\n   * 取消激活，不再高亮显示\n   */\n\n\n  Menu.prototype.unActive = function () {\n    this._active = false;\n    this.$elem.removeClass('w-e-active');\n  };\n\n  (0, _defineProperty[\"default\"])(Menu.prototype, \"isActive\", {\n    /**\n     * 是否处于激活状态\n     */\n    get: function get() {\n      return this._active;\n    },\n    enumerable: false,\n    configurable: true\n  });\n  return Menu;\n}();\n\nexports[\"default\"] = Menu;\n\n/***/ }),\n/* 104 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * @description 上传图片\n * @author wangfupeng\n */\n\nvar _interopRequireDefault = __webpack_require__(0);\n\nvar _defineProperty = _interopRequireDefault(__webpack_require__(1));\n\nvar _bind = _interopRequireDefault(__webpack_require__(61));\n\nvar _forEach = _interopRequireDefault(__webpack_require__(4));\n\nvar _indexOf = _interopRequireDefault(__webpack_require__(28));\n\n(0, _defineProperty[\"default\"])(exports, \"__esModule\", {\n  value: true\n});\n\nvar tslib_1 = __webpack_require__(2);\n\nvar util_1 = __webpack_require__(6);\n\nvar upload_core_1 = tslib_1.__importDefault(__webpack_require__(140));\n\nvar progress_1 = tslib_1.__importDefault(__webpack_require__(141));\n\nvar UploadImg = function () {\n  function UploadImg(editor) {\n    this.editor = editor;\n  }\n  /**\n   * 往编辑区域插入图片\n   * @param src 图片地址\n   */\n\n\n  UploadImg.prototype.insertImg = function (src, alt, href) {\n    var editor = this.editor;\n    var config = editor.config;\n    var i18nPrefix = 'validate.';\n\n    var t = function t(text, prefix) {\n      if (prefix === void 0) {\n        prefix = i18nPrefix;\n      }\n\n      return editor.i18next.t(prefix + text);\n    }; // 设置图片alt\n\n\n    var altText = alt ? \"alt=\\\"\" + alt + \"\\\" \" : '';\n    var hrefText = href ? \"data-href=\\\"\" + encodeURIComponent(href) + \"\\\" \" : ''; // 先插入图片，无论是否能成功\n\n    editor.cmd[\"do\"]('insertHTML', \"<img src=\\\"\" + src + \"\\\" \" + altText + hrefText + \"style=\\\"max-width:100%;\\\" contenteditable=\\\"false\\\"/>\"); // 执行回调函数\n\n    config.linkImgCallback(src, alt, href); // 加载图片\n\n    var img = document.createElement('img');\n\n    img.onload = function () {\n      img = null;\n    };\n\n    img.onerror = function () {\n      config.customAlert(t('插入图片错误'), 'error', \"wangEditor: \" + t('插入图片错误') + \"\\uFF0C\" + t('图片链接') + \" \\\"\" + src + \"\\\"\\uFF0C\" + t('下载链接失败'));\n      img = null;\n    };\n\n    img.onabort = function () {\n      return img = null;\n    };\n\n    img.src = src;\n  };\n  /**\n   * 上传图片\n   * @param files 文件列表\n   */\n\n\n  UploadImg.prototype.uploadImg = function (files) {\n    var _this_1 = this;\n\n    if (!files.length) {\n      return;\n    }\n\n    var editor = this.editor;\n    var config = editor.config; // ------------------------------ i18next ------------------------------\n\n    var i18nPrefix = 'validate.';\n\n    var t = function t(text) {\n      return editor.i18next.t(i18nPrefix + text);\n    }; // ------------------------------ 获取配置信息 ------------------------------\n    // 服务端地址\n\n\n    var uploadImgServer = config.uploadImgServer; // base64 格式\n\n    var uploadImgShowBase64 = config.uploadImgShowBase64; // 图片最大体积\n\n    var maxSize = config.uploadImgMaxSize;\n    var maxSizeM = maxSize / 1024 / 1024; // 一次最多上传图片数量\n\n    var maxLength = config.uploadImgMaxLength; // 自定义 fileName\n\n    var uploadFileName = config.uploadFileName; // 自定义参数\n\n    var uploadImgParams = config.uploadImgParams; // 参数拼接到 url 中\n\n    var uploadImgParamsWithUrl = config.uploadImgParamsWithUrl; // 自定义 header\n\n    var uploadImgHeaders = config.uploadImgHeaders; // 钩子函数\n\n    var hooks = config.uploadImgHooks; // 上传图片超时时间\n\n    var timeout = config.uploadImgTimeout; // 跨域带 cookie\n\n    var withCredentials = config.withCredentials; // 自定义上传图片\n\n    var customUploadImg = config.customUploadImg;\n\n    if (!customUploadImg) {\n      // 没有 customUploadImg 的情况下，需要如下两个配置才能继续进行图片上传\n      if (!uploadImgServer && !uploadImgShowBase64) {\n        return;\n      }\n    } // ------------------------------ 验证文件信息 ------------------------------\n\n\n    var resultFiles = [];\n    var errInfos = [];\n    util_1.arrForEach(files, function (file) {\n      // chrome 低版本 粘贴一张图时files为 [null, File]\n      if (!file) return;\n      var name = file.name || file.type.replace('/', '.'); // 兼容低版本chrome 没有name\n\n      var size = file.size; // chrome 低版本 name === undefined\n\n      if (!name || !size) {\n        return;\n      } // 将uploadImgAccept数组转换为正则对象\n\n\n      var imgType = editor.config.uploadImgAccept.join('|');\n      var imgTypeRuleStr = \".(\" + imgType + \")$\";\n      var uploadImgAcceptRule = new RegExp(imgTypeRuleStr, 'i');\n\n      if (uploadImgAcceptRule.test(name) === false) {\n        // 后缀名不合法，不是图片\n        errInfos.push(\"\\u3010\" + name + \"\\u3011\" + t('不是图片'));\n        return;\n      }\n\n      if (maxSize < size) {\n        // 上传图片过大\n        errInfos.push(\"\\u3010\" + name + \"\\u3011\" + t('大于') + \" \" + maxSizeM + \"M\");\n        return;\n      } // 验证通过的加入结果列表\n\n\n      resultFiles.push(file);\n    }); // 抛出验证信息\n\n    if (errInfos.length) {\n      config.customAlert(t('图片验证未通过') + \": \\n\" + errInfos.join('\\n'), 'warning');\n      return;\n    } // 如果过滤后文件列表为空直接返回\n\n\n    if (resultFiles.length === 0) {\n      config.customAlert(t('传入的文件不合法'), 'warning');\n      return;\n    }\n\n    if (resultFiles.length > maxLength) {\n      config.customAlert(t('一次最多上传') + maxLength + t('张图片'), 'warning');\n      return;\n    } // ------------------------------ 自定义上传 ------------------------------\n\n\n    if (customUploadImg && typeof customUploadImg === 'function') {\n      var _context;\n\n      customUploadImg(resultFiles, (0, _bind[\"default\"])(_context = this.insertImg).call(_context, this)); // 阻止以下代码执行，重要！！！\n\n      return;\n    } // ------------------------------ 上传图片 ------------------------------\n    // 添加图片数据\n\n\n    var formData = new FormData();\n    (0, _forEach[\"default\"])(resultFiles).call(resultFiles, function (file, index) {\n      var name = uploadFileName || file.name;\n\n      if (resultFiles.length > 1) {\n        // 多个文件时，filename 不能重复\n        name = name + (index + 1);\n      }\n\n      formData.append(name, file);\n    });\n\n    if (uploadImgServer) {\n      // 添加自定义参数\n      var uploadImgServerArr = uploadImgServer.split('#');\n      uploadImgServer = uploadImgServerArr[0];\n      var uploadImgServerHash = uploadImgServerArr[1] || '';\n      (0, _forEach[\"default\"])(util_1).call(util_1, uploadImgParams, function (key, val) {\n        // 因使用者反应，自定义参数不能默认 encode ，由 v3.1.1 版本开始注释掉\n        // val = encodeURIComponent(val)\n        // 第一，将参数拼接到 url 中\n        if (uploadImgParamsWithUrl) {\n          if ((0, _indexOf[\"default\"])(uploadImgServer).call(uploadImgServer, '?') > 0) {\n            uploadImgServer += '&';\n          } else {\n            uploadImgServer += '?';\n          }\n\n          uploadImgServer = uploadImgServer + key + '=' + val;\n        } // 第二，将参数添加到 formData 中\n\n\n        formData.append(key, val);\n      });\n\n      if (uploadImgServerHash) {\n        uploadImgServer += '#' + uploadImgServerHash;\n      } // 开始上传\n\n\n      var xhr = upload_core_1[\"default\"](uploadImgServer, {\n        timeout: timeout,\n        formData: formData,\n        headers: uploadImgHeaders,\n        withCredentials: !!withCredentials,\n        beforeSend: function beforeSend(xhr) {\n          if (hooks.before) return hooks.before(xhr, editor, resultFiles);\n        },\n        onTimeout: function onTimeout(xhr) {\n          config.customAlert(t('上传图片超时'), 'error');\n          if (hooks.timeout) hooks.timeout(xhr, editor);\n        },\n        onProgress: function onProgress(percent, e) {\n          var progressBar = new progress_1[\"default\"](editor);\n\n          if (e.lengthComputable) {\n            percent = e.loaded / e.total;\n            progressBar.show(percent);\n          }\n        },\n        onError: function onError(xhr) {\n          config.customAlert(t('上传图片错误'), 'error', t('上传图片错误') + \"\\uFF0C\" + t('服务器返回状态') + \": \" + xhr.status);\n          if (hooks.error) hooks.error(xhr, editor);\n        },\n        onFail: function onFail(xhr, resultStr) {\n          config.customAlert(t('上传图片失败'), 'error', t('上传图片返回结果错误') + (\"\\uFF0C\" + t('返回结果') + \": \") + resultStr);\n          if (hooks.fail) hooks.fail(xhr, editor, resultStr);\n        },\n        onSuccess: function onSuccess(xhr, result) {\n          if (hooks.customInsert) {\n            var _context2;\n\n            // 自定义插入图片\n            hooks.customInsert((0, _bind[\"default\"])(_context2 = _this_1.insertImg).call(_context2, _this_1), result, editor);\n            return;\n          }\n\n          if (result.errno != '0') {\n            // 返回格式不对，应该为 { errno: 0, data: [...] }\n            config.customAlert(t('上传图片失败'), 'error', t('上传图片返回结果错误') + \"\\uFF0C\" + t('返回结果') + \" errno=\" + result.errno);\n            if (hooks.fail) hooks.fail(xhr, editor, result);\n            return;\n          } // 成功，插入图片\n\n\n          var data = result.data;\n          (0, _forEach[\"default\"])(data).call(data, function (link) {\n            if (typeof link === 'string') {\n              _this_1.insertImg(link);\n            } else {\n              _this_1.insertImg(link.url, link.alt, link.href);\n            }\n          }); // 钩子函数\n\n          if (hooks.success) hooks.success(xhr, editor, result);\n        }\n      });\n\n      if (typeof xhr === 'string') {\n        // 上传被阻止\n        config.customAlert(xhr, 'error');\n      } // 阻止以下代码执行，重要！！！\n\n\n      return;\n    } // ------------------------------ 显示 base64 格式 ------------------------------\n\n\n    if (uploadImgShowBase64) {\n      util_1.arrForEach(files, function (file) {\n        var _this = _this_1;\n        var reader = new FileReader();\n        reader.readAsDataURL(file);\n\n        reader.onload = function () {\n          if (!this.result) return;\n          var imgLink = this.result.toString();\n\n          _this.insertImg(imgLink, imgLink);\n        };\n      });\n    }\n  };\n\n  return UploadImg;\n}();\n\nexports[\"default\"] = UploadImg;\n\n/***/ }),\n/* 105 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _interopRequireDefault = __webpack_require__(0);\n\nvar _defineProperty = _interopRequireDefault(__webpack_require__(1));\n\nvar _every = _interopRequireDefault(__webpack_require__(426));\n\nvar _forEach = _interopRequireDefault(__webpack_require__(4));\n\nvar _slice = _interopRequireDefault(__webpack_require__(47));\n\n(0, _defineProperty[\"default\"])(exports, \"__esModule\", {\n  value: true\n});\nexports.dealTextNode = exports.isAllTodo = exports.isTodo = exports.getCursorNextNode = void 0;\n/**\n * 判断传入的单行顶级选区选取是不是todo\n * @param editor 编辑器对象\n */\n\nfunction isTodo($topSelectElem) {\n  if ($topSelectElem.length) {\n    return $topSelectElem.attr('class') === 'w-e-todo';\n  }\n\n  return false;\n}\n\nexports.isTodo = isTodo;\n/**\n * 判断选中的内容是不是都是todo\n * @param editor 编辑器对象\n */\n\nfunction isAllTodo(editor) {\n  var $topSelectElems = editor.selection.getSelectionRangeTopNodes(); // 排除为[]的情况\n\n  if ($topSelectElems.length === 0) return;\n  return (0, _every[\"default\"])($topSelectElems).call($topSelectElems, function ($topSelectElem) {\n    return isTodo($topSelectElem);\n  });\n}\n\nexports.isAllTodo = isAllTodo;\n/**\n * 根据所在的文本节点和光标在文本节点的位置获取截断的后节点内容\n * @param node 顶级节点\n * @param textNode 光标所在的文本节点\n * @param pos 光标在文本节点的位置\n */\n\nfunction getCursorNextNode(node, textNode, pos) {\n  var _context;\n\n  if (!node.hasChildNodes()) return;\n  var newNode = node.cloneNode(); // 判断光标是否在末尾\n\n  var end = false;\n\n  if (textNode.nodeValue === '') {\n    end = true;\n  }\n\n  var delArr = [];\n  (0, _forEach[\"default\"])(_context = node.childNodes).call(_context, function (v) {\n    //光标后的内容\n    if (!isContains(v, textNode) && end) {\n      newNode.appendChild(v.cloneNode(true));\n\n      if (v.nodeName !== 'BR') {\n        delArr.push(v);\n      }\n    } // 光标所在的区域\n\n\n    if (isContains(v, textNode)) {\n      if (v.nodeType === 1) {\n        var childNode = getCursorNextNode(v, textNode, pos);\n        if (childNode && childNode.textContent !== '') newNode === null || newNode === void 0 ? void 0 : newNode.appendChild(childNode);\n      }\n\n      if (v.nodeType === 3) {\n        if (textNode.isEqualNode(v)) {\n          var textContent = dealTextNode(v, pos);\n          newNode.textContent = textContent;\n        }\n      }\n\n      end = true;\n    }\n  }); // 删除选中后原来的节点\n\n  (0, _forEach[\"default\"])(delArr).call(delArr, function (v) {\n    var node = v;\n    node.remove();\n  });\n  return newNode;\n}\n\nexports.getCursorNextNode = getCursorNextNode;\n/**\n * 判断otherNode是否包含在node中\n * @param node 父节点\n * @param otherNode 需要判断是不是被包含的节点\n */\n\nfunction isContains(node, otherNode) {\n  // 兼容ie11中textNode不支持contains方法\n  if (node.nodeType === 3) {\n    return node.nodeValue === otherNode.nodeValue;\n  }\n\n  return node.contains(otherNode);\n}\n/**\n * 获取新的文本节点\n * @param node 要处理的文本节点\n * @param pos  光标在文本节点所在的位置\n * @param start 设置为true时保留开始位置到光标的内容，设置为false时删去开始的内容\n */\n\n\nfunction dealTextNode(node, pos, start) {\n  if (start === void 0) {\n    start = true;\n  }\n\n  var content = node.nodeValue;\n  var oldContent = content === null || content === void 0 ? void 0 : (0, _slice[\"default\"])(content).call(content, 0, pos);\n  content = content === null || content === void 0 ? void 0 : (0, _slice[\"default\"])(content).call(content, pos); // start为false时替换content和oldContent\n\n  if (!start) {\n    var temp = content;\n    content = oldContent;\n    oldContent = temp;\n  }\n\n  node.nodeValue = oldContent;\n  return content;\n}\n\nexports.dealTextNode = dealTextNode;\n\n/***/ }),\n/* 106 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * @description 双栈实现撤销恢复\n * @author fangzhicong\n */\n\nvar _interopRequireDefault = __webpack_require__(0);\n\nvar _defineProperty = _interopRequireDefault(__webpack_require__(1));\n\n(0, _defineProperty[\"default\"])(exports, \"__esModule\", {\n  value: true\n});\n\nvar stack_1 = __webpack_require__(446);\n\nvar Cache = function () {\n  function Cache(maxSize) {\n    this.maxSize = maxSize;\n    /**\n     * 上一步操作是否为 撤销/恢复\n     */\n\n    this.isRe = false;\n    this.data = new stack_1.CeilStack(maxSize);\n    this.revokeData = new stack_1.CeilStack(maxSize);\n  }\n\n  (0, _defineProperty[\"default\"])(Cache.prototype, \"size\", {\n    /**\n     * 返回当前栈中的数据长度。格式为：[正常的数据的条数，被撤销的数据的条数]\n     */\n    get: function get() {\n      return [this.data.size, this.revokeData.size];\n    },\n    enumerable: false,\n    configurable: true\n  });\n  /**\n   * 重设数据缓存器的缓存长度（第一次有效）\n   */\n\n  Cache.prototype.resetMaxSize = function (maxSize) {\n    this.data.resetMax(maxSize);\n    this.revokeData.resetMax(maxSize);\n  };\n  /**\n   * 保存数据\n   */\n\n\n  Cache.prototype.save = function (data) {\n    if (this.isRe) {\n      this.revokeData.clear();\n      this.isRe = false;\n    }\n\n    this.data.instack(data);\n    return this;\n  };\n  /**\n   * 撤销\n   * @param fn 撤销时，如果有数据，执行的回调函数\n   */\n\n\n  Cache.prototype.revoke = function (fn) {\n    !this.isRe && (this.isRe = true);\n    var data = this.data.outstack();\n\n    if (data) {\n      this.revokeData.instack(data);\n      fn(data);\n      return true;\n    }\n\n    return false;\n  };\n  /**\n   * 恢复\n   * @param fn 恢复时，如果有数据，执行的回调函数\n   */\n\n\n  Cache.prototype.restore = function (fn) {\n    !this.isRe && (this.isRe = true);\n    var data = this.revokeData.outstack();\n\n    if (data) {\n      this.data.instack(data);\n      fn(data);\n      return true;\n    }\n\n    return false;\n  };\n\n  return Cache;\n}();\n\nexports[\"default\"] = Cache;\n\n/***/ }),\n/* 107 */\n/***/ (function(module, exports, __webpack_require__) {\n\n/* eslint-disable es/no-symbol -- required for testing */\nvar NATIVE_SYMBOL = __webpack_require__(79);\n\nmodule.exports = NATIVE_SYMBOL\n  && !Symbol.sham\n  && typeof Symbol.iterator == 'symbol';\n\n\n/***/ }),\n/* 108 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar DESCRIPTORS = __webpack_require__(15);\nvar fails = __webpack_require__(12);\nvar createElement = __webpack_require__(82);\n\n// Thank's IE8 for his funny defineProperty\nmodule.exports = !DESCRIPTORS && !fails(function () {\n  // eslint-disable-next-line es/no-object-defineproperty -- requied for testing\n  return Object.defineProperty(createElement('div'), 'a', {\n    get: function () { return 7; }\n  }).a != 7;\n});\n\n\n/***/ }),\n/* 109 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar fails = __webpack_require__(12);\n\nvar replacement = /#|\\.prototype\\./;\n\nvar isForced = function (feature, detection) {\n  var value = data[normalize(feature)];\n  return value == POLYFILL ? true\n    : value == NATIVE ? false\n    : typeof detection == 'function' ? fails(detection)\n    : !!detection;\n};\n\nvar normalize = isForced.normalize = function (string) {\n  return String(string).replace(replacement, '.').toLowerCase();\n};\n\nvar data = isForced.data = {};\nvar NATIVE = isForced.NATIVE = 'N';\nvar POLYFILL = isForced.POLYFILL = 'P';\n\nmodule.exports = isForced;\n\n\n/***/ }),\n/* 110 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar has = __webpack_require__(17);\nvar toIndexedObject = __webpack_require__(29);\nvar indexOf = __webpack_require__(85).indexOf;\nvar hiddenKeys = __webpack_require__(54);\n\nmodule.exports = function (object, names) {\n  var O = toIndexedObject(object);\n  var i = 0;\n  var result = [];\n  var key;\n  for (key in O) !has(hiddenKeys, key) && has(O, key) && result.push(key);\n  // Don't enum bug & hidden keys\n  while (names.length > i) if (has(O, key = names[i++])) {\n    ~indexOf(result, key) || result.push(key);\n  }\n  return result;\n};\n\n\n/***/ }),\n/* 111 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar getBuiltIn = __webpack_require__(25);\n\nmodule.exports = getBuiltIn('document', 'documentElement');\n\n\n/***/ }),\n/* 112 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar wellKnownSymbol = __webpack_require__(9);\nvar Iterators = __webpack_require__(42);\n\nvar ITERATOR = wellKnownSymbol('iterator');\nvar ArrayPrototype = Array.prototype;\n\n// check on default Array iterator\nmodule.exports = function (it) {\n  return it !== undefined && (Iterators.Array === it || ArrayPrototype[ITERATOR] === it);\n};\n\n\n/***/ }),\n/* 113 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar classof = __webpack_require__(71);\nvar Iterators = __webpack_require__(42);\nvar wellKnownSymbol = __webpack_require__(9);\n\nvar ITERATOR = wellKnownSymbol('iterator');\n\nmodule.exports = function (it) {\n  if (it != undefined) return it[ITERATOR]\n    || it['@@iterator']\n    || Iterators[classof(it)];\n};\n\n\n/***/ }),\n/* 114 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar anObject = __webpack_require__(20);\n\nmodule.exports = function (iterator) {\n  var returnMethod = iterator['return'];\n  if (returnMethod !== undefined) {\n    return anObject(returnMethod.call(iterator)).value;\n  }\n};\n\n\n/***/ }),\n/* 115 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar store = __webpack_require__(81);\n\nvar functionToString = Function.toString;\n\n// this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper\nif (typeof store.inspectSource != 'function') {\n  store.inspectSource = function (it) {\n    return functionToString.call(it);\n  };\n}\n\nmodule.exports = store.inspectSource;\n\n\n/***/ }),\n/* 116 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar fails = __webpack_require__(12);\nvar getPrototypeOf = __webpack_require__(83);\nvar createNonEnumerableProperty = __webpack_require__(19);\nvar has = __webpack_require__(17);\nvar wellKnownSymbol = __webpack_require__(9);\nvar IS_PURE = __webpack_require__(39);\n\nvar ITERATOR = wellKnownSymbol('iterator');\nvar BUGGY_SAFARI_ITERATORS = false;\n\nvar returnThis = function () { return this; };\n\n// `%IteratorPrototype%` object\n// https://tc39.es/ecma262/#sec-%iteratorprototype%-object\nvar IteratorPrototype, PrototypeOfArrayIteratorPrototype, arrayIterator;\n\n/* eslint-disable es/no-array-prototype-keys -- safe */\nif ([].keys) {\n  arrayIterator = [].keys();\n  // Safari 8 has buggy iterators w/o `next`\n  if (!('next' in arrayIterator)) BUGGY_SAFARI_ITERATORS = true;\n  else {\n    PrototypeOfArrayIteratorPrototype = getPrototypeOf(getPrototypeOf(arrayIterator));\n    if (PrototypeOfArrayIteratorPrototype !== Object.prototype) IteratorPrototype = PrototypeOfArrayIteratorPrototype;\n  }\n}\n\nvar NEW_ITERATOR_PROTOTYPE = IteratorPrototype == undefined || fails(function () {\n  var test = {};\n  // FF44- legacy iterators case\n  return IteratorPrototype[ITERATOR].call(test) !== test;\n});\n\nif (NEW_ITERATOR_PROTOTYPE) IteratorPrototype = {};\n\n// `%IteratorPrototype%[@@iterator]()` method\n// https://tc39.es/ecma262/#sec-%iteratorprototype%-@@iterator\nif ((!IS_PURE || NEW_ITERATOR_PROTOTYPE) && !has(IteratorPrototype, ITERATOR)) {\n  createNonEnumerableProperty(IteratorPrototype, ITERATOR, returnThis);\n}\n\nmodule.exports = {\n  IteratorPrototype: IteratorPrototype,\n  BUGGY_SAFARI_ITERATORS: BUGGY_SAFARI_ITERATORS\n};\n\n\n/***/ }),\n/* 117 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar global = __webpack_require__(8);\n\nmodule.exports = global.Promise;\n\n\n/***/ }),\n/* 118 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar redefine = __webpack_require__(56);\n\nmodule.exports = function (target, src, options) {\n  for (var key in src) {\n    if (options && options.unsafe && target[key]) target[key] = src[key];\n    else redefine(target, key, src[key], options);\n  } return target;\n};\n\n\n/***/ }),\n/* 119 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar getBuiltIn = __webpack_require__(25);\nvar definePropertyModule = __webpack_require__(18);\nvar wellKnownSymbol = __webpack_require__(9);\nvar DESCRIPTORS = __webpack_require__(15);\n\nvar SPECIES = wellKnownSymbol('species');\n\nmodule.exports = function (CONSTRUCTOR_NAME) {\n  var Constructor = getBuiltIn(CONSTRUCTOR_NAME);\n  var defineProperty = definePropertyModule.f;\n\n  if (DESCRIPTORS && Constructor && !Constructor[SPECIES]) {\n    defineProperty(Constructor, SPECIES, {\n      configurable: true,\n      get: function () { return this; }\n    });\n  }\n};\n\n\n/***/ }),\n/* 120 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar wellKnownSymbol = __webpack_require__(9);\n\nvar ITERATOR = wellKnownSymbol('iterator');\nvar SAFE_CLOSING = false;\n\ntry {\n  var called = 0;\n  var iteratorWithReturn = {\n    next: function () {\n      return { done: !!called++ };\n    },\n    'return': function () {\n      SAFE_CLOSING = true;\n    }\n  };\n  iteratorWithReturn[ITERATOR] = function () {\n    return this;\n  };\n  // eslint-disable-next-line es/no-array-from, no-throw-literal -- required for testing\n  Array.from(iteratorWithReturn, function () { throw 2; });\n} catch (error) { /* empty */ }\n\nmodule.exports = function (exec, SKIP_CLOSING) {\n  if (!SKIP_CLOSING && !SAFE_CLOSING) return false;\n  var ITERATION_SUPPORT = false;\n  try {\n    var object = {};\n    object[ITERATOR] = function () {\n      return {\n        next: function () {\n          return { done: ITERATION_SUPPORT = true };\n        }\n      };\n    };\n    exec(object);\n  } catch (error) { /* empty */ }\n  return ITERATION_SUPPORT;\n};\n\n\n/***/ }),\n/* 121 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar anObject = __webpack_require__(20);\nvar aFunction = __webpack_require__(34);\nvar wellKnownSymbol = __webpack_require__(9);\n\nvar SPECIES = wellKnownSymbol('species');\n\n// `SpeciesConstructor` abstract operation\n// https://tc39.es/ecma262/#sec-speciesconstructor\nmodule.exports = function (O, defaultConstructor) {\n  var C = anObject(O).constructor;\n  var S;\n  return C === undefined || (S = anObject(C)[SPECIES]) == undefined ? defaultConstructor : aFunction(S);\n};\n\n\n/***/ }),\n/* 122 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar global = __webpack_require__(8);\nvar fails = __webpack_require__(12);\nvar bind = __webpack_require__(40);\nvar html = __webpack_require__(111);\nvar createElement = __webpack_require__(82);\nvar IS_IOS = __webpack_require__(123);\nvar IS_NODE = __webpack_require__(92);\n\nvar set = global.setImmediate;\nvar clear = global.clearImmediate;\nvar process = global.process;\nvar MessageChannel = global.MessageChannel;\nvar Dispatch = global.Dispatch;\nvar counter = 0;\nvar queue = {};\nvar ONREADYSTATECHANGE = 'onreadystatechange';\nvar location, defer, channel, port;\n\ntry {\n  // Deno throws a ReferenceError on `location` access without `--location` flag\n  location = global.location;\n} catch (error) { /* empty */ }\n\nvar run = function (id) {\n  // eslint-disable-next-line no-prototype-builtins -- safe\n  if (queue.hasOwnProperty(id)) {\n    var fn = queue[id];\n    delete queue[id];\n    fn();\n  }\n};\n\nvar runner = function (id) {\n  return function () {\n    run(id);\n  };\n};\n\nvar listener = function (event) {\n  run(event.data);\n};\n\nvar post = function (id) {\n  // old engines have not location.origin\n  global.postMessage(String(id), location.protocol + '//' + location.host);\n};\n\n// Node.js 0.9+ & IE10+ has setImmediate, otherwise:\nif (!set || !clear) {\n  set = function setImmediate(fn) {\n    var args = [];\n    var argumentsLength = arguments.length;\n    var i = 1;\n    while (argumentsLength > i) args.push(arguments[i++]);\n    queue[++counter] = function () {\n      // eslint-disable-next-line no-new-func -- spec requirement\n      (typeof fn == 'function' ? fn : Function(fn)).apply(undefined, args);\n    };\n    defer(counter);\n    return counter;\n  };\n  clear = function clearImmediate(id) {\n    delete queue[id];\n  };\n  // Node.js 0.8-\n  if (IS_NODE) {\n    defer = function (id) {\n      process.nextTick(runner(id));\n    };\n  // Sphere (JS game engine) Dispatch API\n  } else if (Dispatch && Dispatch.now) {\n    defer = function (id) {\n      Dispatch.now(runner(id));\n    };\n  // Browsers with MessageChannel, includes WebWorkers\n  // except iOS - https://github.com/zloirock/core-js/issues/624\n  } else if (MessageChannel && !IS_IOS) {\n    channel = new MessageChannel();\n    port = channel.port2;\n    channel.port1.onmessage = listener;\n    defer = bind(port.postMessage, port, 1);\n  // Browsers with postMessage, skip WebWorkers\n  // IE8 has postMessage, but it's sync & typeof its postMessage is 'object'\n  } else if (\n    global.addEventListener &&\n    typeof postMessage == 'function' &&\n    !global.importScripts &&\n    location && location.protocol !== 'file:' &&\n    !fails(post)\n  ) {\n    defer = post;\n    global.addEventListener('message', listener, false);\n  // IE8-\n  } else if (ONREADYSTATECHANGE in createElement('script')) {\n    defer = function (id) {\n      html.appendChild(createElement('script'))[ONREADYSTATECHANGE] = function () {\n        html.removeChild(this);\n        run(id);\n      };\n    };\n  // Rest old browsers\n  } else {\n    defer = function (id) {\n      setTimeout(runner(id), 0);\n    };\n  }\n}\n\nmodule.exports = {\n  set: set,\n  clear: clear\n};\n\n\n/***/ }),\n/* 123 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar userAgent = __webpack_require__(52);\n\nmodule.exports = /(?:ipad|iphone|ipod).*applewebkit/i.test(userAgent);\n\n\n/***/ }),\n/* 124 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar anObject = __webpack_require__(20);\nvar isObject = __webpack_require__(13);\nvar newPromiseCapability = __webpack_require__(72);\n\nmodule.exports = function (C, x) {\n  anObject(C);\n  if (isObject(x) && x.constructor === C) return x;\n  var promiseCapability = newPromiseCapability.f(C);\n  var resolve = promiseCapability.resolve;\n  resolve(x);\n  return promiseCapability.promise;\n};\n\n\n/***/ }),\n/* 125 */\n/***/ (function(module, exports, __webpack_require__) {\n\nmodule.exports = __webpack_require__(208);\n\n/***/ }),\n/* 126 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar $ = __webpack_require__(5);\nvar global = __webpack_require__(8);\nvar InternalMetadataModule = __webpack_require__(127);\nvar fails = __webpack_require__(12);\nvar createNonEnumerableProperty = __webpack_require__(19);\nvar iterate = __webpack_require__(41);\nvar anInstance = __webpack_require__(91);\nvar isObject = __webpack_require__(13);\nvar setToStringTag = __webpack_require__(44);\nvar defineProperty = __webpack_require__(18).f;\nvar forEach = __webpack_require__(31).forEach;\nvar DESCRIPTORS = __webpack_require__(15);\nvar InternalStateModule = __webpack_require__(43);\n\nvar setInternalState = InternalStateModule.set;\nvar internalStateGetterFor = InternalStateModule.getterFor;\n\nmodule.exports = function (CONSTRUCTOR_NAME, wrapper, common) {\n  var IS_MAP = CONSTRUCTOR_NAME.indexOf('Map') !== -1;\n  var IS_WEAK = CONSTRUCTOR_NAME.indexOf('Weak') !== -1;\n  var ADDER = IS_MAP ? 'set' : 'add';\n  var NativeConstructor = global[CONSTRUCTOR_NAME];\n  var NativePrototype = NativeConstructor && NativeConstructor.prototype;\n  var exported = {};\n  var Constructor;\n\n  if (!DESCRIPTORS || typeof NativeConstructor != 'function'\n    || !(IS_WEAK || NativePrototype.forEach && !fails(function () { new NativeConstructor().entries().next(); }))\n  ) {\n    // create collection constructor\n    Constructor = common.getConstructor(wrapper, CONSTRUCTOR_NAME, IS_MAP, ADDER);\n    InternalMetadataModule.enable();\n  } else {\n    Constructor = wrapper(function (target, iterable) {\n      setInternalState(anInstance(target, Constructor, CONSTRUCTOR_NAME), {\n        type: CONSTRUCTOR_NAME,\n        collection: new NativeConstructor()\n      });\n      if (iterable != undefined) iterate(iterable, target[ADDER], { that: target, AS_ENTRIES: IS_MAP });\n    });\n\n    var getInternalState = internalStateGetterFor(CONSTRUCTOR_NAME);\n\n    forEach(['add', 'clear', 'delete', 'forEach', 'get', 'has', 'set', 'keys', 'values', 'entries'], function (KEY) {\n      var IS_ADDER = KEY == 'add' || KEY == 'set';\n      if (KEY in NativePrototype && !(IS_WEAK && KEY == 'clear')) {\n        createNonEnumerableProperty(Constructor.prototype, KEY, function (a, b) {\n          var collection = getInternalState(this).collection;\n          if (!IS_ADDER && IS_WEAK && !isObject(a)) return KEY == 'get' ? undefined : false;\n          var result = collection[KEY](a === 0 ? 0 : a, b);\n          return IS_ADDER ? this : result;\n        });\n      }\n    });\n\n    IS_WEAK || defineProperty(Constructor.prototype, 'size', {\n      configurable: true,\n      get: function () {\n        return getInternalState(this).collection.size;\n      }\n    });\n  }\n\n  setToStringTag(Constructor, CONSTRUCTOR_NAME, false, true);\n\n  exported[CONSTRUCTOR_NAME] = Constructor;\n  $({ global: true, forced: true }, exported);\n\n  if (!IS_WEAK) common.setStrong(Constructor, CONSTRUCTOR_NAME, IS_MAP);\n\n  return Constructor;\n};\n\n\n/***/ }),\n/* 127 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar $ = __webpack_require__(5);\nvar hiddenKeys = __webpack_require__(54);\nvar isObject = __webpack_require__(13);\nvar has = __webpack_require__(17);\nvar defineProperty = __webpack_require__(18).f;\nvar getOwnPropertyNamesModule = __webpack_require__(98);\nvar getOwnPropertyNamesExternalModule = __webpack_require__(128);\nvar uid = __webpack_require__(67);\nvar FREEZING = __webpack_require__(211);\n\nvar REQUIRED = false;\nvar METADATA = uid('meta');\nvar id = 0;\n\n// eslint-disable-next-line es/no-object-isextensible -- safe\nvar isExtensible = Object.isExtensible || function () {\n  return true;\n};\n\nvar setMetadata = function (it) {\n  defineProperty(it, METADATA, { value: {\n    objectID: 'O' + id++, // object ID\n    weakData: {}          // weak collections IDs\n  } });\n};\n\nvar fastKey = function (it, create) {\n  // return a primitive with prefix\n  if (!isObject(it)) return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it;\n  if (!has(it, METADATA)) {\n    // can't set metadata to uncaught frozen object\n    if (!isExtensible(it)) return 'F';\n    // not necessary to add metadata\n    if (!create) return 'E';\n    // add missing metadata\n    setMetadata(it);\n  // return object ID\n  } return it[METADATA].objectID;\n};\n\nvar getWeakData = function (it, create) {\n  if (!has(it, METADATA)) {\n    // can't set metadata to uncaught frozen object\n    if (!isExtensible(it)) return true;\n    // not necessary to add metadata\n    if (!create) return false;\n    // add missing metadata\n    setMetadata(it);\n  // return the store of weak collections IDs\n  } return it[METADATA].weakData;\n};\n\n// add metadata on freeze-family methods calling\nvar onFreeze = function (it) {\n  if (FREEZING && REQUIRED && isExtensible(it) && !has(it, METADATA)) setMetadata(it);\n  return it;\n};\n\nvar enable = function () {\n  meta.enable = function () { /* empty */ };\n  REQUIRED = true;\n  var getOwnPropertyNames = getOwnPropertyNamesModule.f;\n  var splice = [].splice;\n  var test = {};\n  test[METADATA] = 1;\n\n  // prevent exposing of metadata key\n  if (getOwnPropertyNames(test).length) {\n    getOwnPropertyNamesModule.f = function (it) {\n      var result = getOwnPropertyNames(it);\n      for (var i = 0, length = result.length; i < length; i++) {\n        if (result[i] === METADATA) {\n          splice.call(result, i, 1);\n          break;\n        }\n      } return result;\n    };\n\n    $({ target: 'Object', stat: true, forced: true }, {\n      getOwnPropertyNames: getOwnPropertyNamesExternalModule.f\n    });\n  }\n};\n\nvar meta = module.exports = {\n  enable: enable,\n  fastKey: fastKey,\n  getWeakData: getWeakData,\n  onFreeze: onFreeze\n};\n\nhiddenKeys[METADATA] = true;\n\n\n/***/ }),\n/* 128 */\n/***/ (function(module, exports, __webpack_require__) {\n\n/* eslint-disable es/no-object-getownpropertynames -- safe */\nvar toIndexedObject = __webpack_require__(29);\nvar $getOwnPropertyNames = __webpack_require__(98).f;\n\nvar toString = {}.toString;\n\nvar windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames\n  ? Object.getOwnPropertyNames(window) : [];\n\nvar getWindowNames = function (it) {\n  try {\n    return $getOwnPropertyNames(it);\n  } catch (error) {\n    return windowNames.slice();\n  }\n};\n\n// fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window\nmodule.exports.f = function getOwnPropertyNames(it) {\n  return windowNames && toString.call(it) == '[object Window]'\n    ? getWindowNames(it)\n    : $getOwnPropertyNames(toIndexedObject(it));\n};\n\n\n/***/ }),\n/* 129 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar defineProperty = __webpack_require__(18).f;\nvar create = __webpack_require__(69);\nvar redefineAll = __webpack_require__(118);\nvar bind = __webpack_require__(40);\nvar anInstance = __webpack_require__(91);\nvar iterate = __webpack_require__(41);\nvar defineIterator = __webpack_require__(90);\nvar setSpecies = __webpack_require__(119);\nvar DESCRIPTORS = __webpack_require__(15);\nvar fastKey = __webpack_require__(127).fastKey;\nvar InternalStateModule = __webpack_require__(43);\n\nvar setInternalState = InternalStateModule.set;\nvar internalStateGetterFor = InternalStateModule.getterFor;\n\nmodule.exports = {\n  getConstructor: function (wrapper, CONSTRUCTOR_NAME, IS_MAP, ADDER) {\n    var C = wrapper(function (that, iterable) {\n      anInstance(that, C, CONSTRUCTOR_NAME);\n      setInternalState(that, {\n        type: CONSTRUCTOR_NAME,\n        index: create(null),\n        first: undefined,\n        last: undefined,\n        size: 0\n      });\n      if (!DESCRIPTORS) that.size = 0;\n      if (iterable != undefined) iterate(iterable, that[ADDER], { that: that, AS_ENTRIES: IS_MAP });\n    });\n\n    var getInternalState = internalStateGetterFor(CONSTRUCTOR_NAME);\n\n    var define = function (that, key, value) {\n      var state = getInternalState(that);\n      var entry = getEntry(that, key);\n      var previous, index;\n      // change existing entry\n      if (entry) {\n        entry.value = value;\n      // create new entry\n      } else {\n        state.last = entry = {\n          index: index = fastKey(key, true),\n          key: key,\n          value: value,\n          previous: previous = state.last,\n          next: undefined,\n          removed: false\n        };\n        if (!state.first) state.first = entry;\n        if (previous) previous.next = entry;\n        if (DESCRIPTORS) state.size++;\n        else that.size++;\n        // add to index\n        if (index !== 'F') state.index[index] = entry;\n      } return that;\n    };\n\n    var getEntry = function (that, key) {\n      var state = getInternalState(that);\n      // fast case\n      var index = fastKey(key);\n      var entry;\n      if (index !== 'F') return state.index[index];\n      // frozen object case\n      for (entry = state.first; entry; entry = entry.next) {\n        if (entry.key == key) return entry;\n      }\n    };\n\n    redefineAll(C.prototype, {\n      // `{ Map, Set }.prototype.clear()` methods\n      // https://tc39.es/ecma262/#sec-map.prototype.clear\n      // https://tc39.es/ecma262/#sec-set.prototype.clear\n      clear: function clear() {\n        var that = this;\n        var state = getInternalState(that);\n        var data = state.index;\n        var entry = state.first;\n        while (entry) {\n          entry.removed = true;\n          if (entry.previous) entry.previous = entry.previous.next = undefined;\n          delete data[entry.index];\n          entry = entry.next;\n        }\n        state.first = state.last = undefined;\n        if (DESCRIPTORS) state.size = 0;\n        else that.size = 0;\n      },\n      // `{ Map, Set }.prototype.delete(key)` methods\n      // https://tc39.es/ecma262/#sec-map.prototype.delete\n      // https://tc39.es/ecma262/#sec-set.prototype.delete\n      'delete': function (key) {\n        var that = this;\n        var state = getInternalState(that);\n        var entry = getEntry(that, key);\n        if (entry) {\n          var next = entry.next;\n          var prev = entry.previous;\n          delete state.index[entry.index];\n          entry.removed = true;\n          if (prev) prev.next = next;\n          if (next) next.previous = prev;\n          if (state.first == entry) state.first = next;\n          if (state.last == entry) state.last = prev;\n          if (DESCRIPTORS) state.size--;\n          else that.size--;\n        } return !!entry;\n      },\n      // `{ Map, Set }.prototype.forEach(callbackfn, thisArg = undefined)` methods\n      // https://tc39.es/ecma262/#sec-map.prototype.foreach\n      // https://tc39.es/ecma262/#sec-set.prototype.foreach\n      forEach: function forEach(callbackfn /* , that = undefined */) {\n        var state = getInternalState(this);\n        var boundFunction = bind(callbackfn, arguments.length > 1 ? arguments[1] : undefined, 3);\n        var entry;\n        while (entry = entry ? entry.next : state.first) {\n          boundFunction(entry.value, entry.key, this);\n          // revert to the last existing entry\n          while (entry && entry.removed) entry = entry.previous;\n        }\n      },\n      // `{ Map, Set}.prototype.has(key)` methods\n      // https://tc39.es/ecma262/#sec-map.prototype.has\n      // https://tc39.es/ecma262/#sec-set.prototype.has\n      has: function has(key) {\n        return !!getEntry(this, key);\n      }\n    });\n\n    redefineAll(C.prototype, IS_MAP ? {\n      // `Map.prototype.get(key)` method\n      // https://tc39.es/ecma262/#sec-map.prototype.get\n      get: function get(key) {\n        var entry = getEntry(this, key);\n        return entry && entry.value;\n      },\n      // `Map.prototype.set(key, value)` method\n      // https://tc39.es/ecma262/#sec-map.prototype.set\n      set: function set(key, value) {\n        return define(this, key === 0 ? 0 : key, value);\n      }\n    } : {\n      // `Set.prototype.add(value)` method\n      // https://tc39.es/ecma262/#sec-set.prototype.add\n      add: function add(value) {\n        return define(this, value = value === 0 ? 0 : value, value);\n      }\n    });\n    if (DESCRIPTORS) defineProperty(C.prototype, 'size', {\n      get: function () {\n        return getInternalState(this).size;\n      }\n    });\n    return C;\n  },\n  setStrong: function (C, CONSTRUCTOR_NAME, IS_MAP) {\n    var ITERATOR_NAME = CONSTRUCTOR_NAME + ' Iterator';\n    var getInternalCollectionState = internalStateGetterFor(CONSTRUCTOR_NAME);\n    var getInternalIteratorState = internalStateGetterFor(ITERATOR_NAME);\n    // `{ Map, Set }.prototype.{ keys, values, entries, @@iterator }()` methods\n    // https://tc39.es/ecma262/#sec-map.prototype.entries\n    // https://tc39.es/ecma262/#sec-map.prototype.keys\n    // https://tc39.es/ecma262/#sec-map.prototype.values\n    // https://tc39.es/ecma262/#sec-map.prototype-@@iterator\n    // https://tc39.es/ecma262/#sec-set.prototype.entries\n    // https://tc39.es/ecma262/#sec-set.prototype.keys\n    // https://tc39.es/ecma262/#sec-set.prototype.values\n    // https://tc39.es/ecma262/#sec-set.prototype-@@iterator\n    defineIterator(C, CONSTRUCTOR_NAME, function (iterated, kind) {\n      setInternalState(this, {\n        type: ITERATOR_NAME,\n        target: iterated,\n        state: getInternalCollectionState(iterated),\n        kind: kind,\n        last: undefined\n      });\n    }, function () {\n      var state = getInternalIteratorState(this);\n      var kind = state.kind;\n      var entry = state.last;\n      // revert to the last existing entry\n      while (entry && entry.removed) entry = entry.previous;\n      // get next entry\n      if (!state.target || !(state.last = entry = entry ? entry.next : state.state.first)) {\n        // or finish the iteration\n        state.target = undefined;\n        return { value: undefined, done: true };\n      }\n      // return step by kind\n      if (kind == 'keys') return { value: entry.key, done: false };\n      if (kind == 'values') return { value: entry.value, done: false };\n      return { value: [entry.key, entry.value], done: false };\n    }, IS_MAP ? 'entries' : 'values', !IS_MAP, true);\n\n    // `{ Map, Set }.prototype[@@species]` accessors\n    // https://tc39.es/ecma262/#sec-get-map-@@species\n    // https://tc39.es/ecma262/#sec-get-set-@@species\n    setSpecies(CONSTRUCTOR_NAME);\n  }\n};\n\n\n/***/ }),\n/* 130 */\n/***/ (function(module, exports) {\n\n// eslint-disable-next-line es/no-object-getownpropertysymbols -- safe\nexports.f = Object.getOwnPropertySymbols;\n\n\n/***/ }),\n/* 131 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar defineWellKnownSymbol = __webpack_require__(10);\n\n// `Symbol.iterator` well-known symbol\n// https://tc39.es/ecma262/#sec-symbol.iterator\ndefineWellKnownSymbol('iterator');\n\n\n/***/ }),\n/* 132 */\n/***/ (function(module, exports, __webpack_require__) {\n\nmodule.exports = __webpack_require__(283);\n\n/***/ }),\n/* 133 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * @description 样式配置\n * @author wangfupeng\n */\n\nvar _interopRequireDefault = __webpack_require__(0);\n\nvar _defineProperty = _interopRequireDefault(__webpack_require__(1));\n\n(0, _defineProperty[\"default\"])(exports, \"__esModule\", {\n  value: true\n});\nexports[\"default\"] = {\n  zIndex: 10000\n};\n\n/***/ }),\n/* 134 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * @description 默认常量配置\n * @author xiaokyo\n */\n\nvar _interopRequireDefault = __webpack_require__(0);\n\nvar _defineProperty = _interopRequireDefault(__webpack_require__(1));\n\n(0, _defineProperty[\"default\"])(exports, \"__esModule\", {\n  value: true\n});\nexports[\"default\"] = {\n  focus: true,\n  height: 300,\n  placeholder: '请输入正文',\n  zIndexFullScreen: 10002,\n  showFullScreen: true\n};\n\n/***/ }),\n/* 135 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * @description 处理粘贴逻辑\n * @author wangfupeng\n */\n\nvar _interopRequireDefault = __webpack_require__(0);\n\nvar _defineProperty = _interopRequireDefault(__webpack_require__(1));\n\nvar _forEach = _interopRequireDefault(__webpack_require__(4));\n\n(0, _defineProperty[\"default\"])(exports, \"__esModule\", {\n  value: true\n});\nexports.getPasteImgs = exports.getPasteHtml = exports.getPasteText = void 0;\n\nvar tslib_1 = __webpack_require__(2);\n\nvar util_1 = __webpack_require__(6);\n\nvar parse_html_1 = tslib_1.__importDefault(__webpack_require__(307));\n/**\n * 获取粘贴的纯文本\n * @param e Event 参数\n */\n\n\nfunction getPasteText(e) {\n  // const clipboardData = e.clipboardData || (e.originalEvent && e.originalEvent.clipboardData)\n  var clipboardData = e.clipboardData; // 暂不考虑 originalEvent 的情况\n\n  var pasteText = '';\n\n  if (clipboardData == null) {\n    pasteText = window.clipboardData && window.clipboardData.getData('text');\n  } else {\n    pasteText = clipboardData.getData('text/plain');\n  }\n\n  return util_1.replaceHtmlSymbol(pasteText);\n}\n\nexports.getPasteText = getPasteText;\n/**\n * 获取粘贴的 html 字符串\n * @param e Event 参数\n * @param filterStyle 是否过滤 style 样式\n * @param ignoreImg 是否忽略 img 标签\n */\n\nfunction getPasteHtml(e, filterStyle, ignoreImg) {\n  if (filterStyle === void 0) {\n    filterStyle = true;\n  }\n\n  if (ignoreImg === void 0) {\n    ignoreImg = false;\n  }\n\n  var clipboardData = e.clipboardData; // 暂不考虑 originalEvent 的情况\n\n  var pasteHtml = '';\n\n  if (clipboardData) {\n    pasteHtml = clipboardData.getData('text/html');\n  } // 无法通过 'text/html' 格式获取 html，则尝试获取 text\n\n\n  if (!pasteHtml) {\n    var text = getPasteText(e);\n\n    if (!text) {\n      return ''; // 没有找到任何文字，则返回\n    }\n\n    pasteHtml = \"<p>\" + text + \"</p>\";\n  } // 转译<1，后面跟数字的转译成 &lt;1\n\n\n  pasteHtml = pasteHtml.replace(/<(\\d)/gm, function (_, num) {\n    return '&lt;' + num;\n  }); // pdf复制只会有一个meta标签，parseHtml中的过滤meta标签会导致后面内容丢失\n\n  pasteHtml = pasteHtml.replace(/<(\\/?meta.*?)>/gim, ''); // 剔除多余的标签、属性\n\n  pasteHtml = parse_html_1[\"default\"](pasteHtml, filterStyle, ignoreImg);\n  return pasteHtml;\n}\n\nexports.getPasteHtml = getPasteHtml;\n/**\n * 获取粘贴的图片文件\n * @param e Event 参数\n */\n\nfunction getPasteImgs(e) {\n  var _a;\n\n  var result = [];\n  var txt = getPasteText(e);\n\n  if (txt) {\n    // 有文字，就忽略图片\n    return result;\n  }\n\n  var items = (_a = e.clipboardData) === null || _a === void 0 ? void 0 : _a.items;\n  if (!items) return result;\n  (0, _forEach[\"default\"])(util_1).call(util_1, items, function (key, value) {\n    var type = value.type;\n\n    if (/image/i.test(type)) {\n      result.push(value.getAsFile());\n    }\n  });\n  return result;\n}\n\nexports.getPasteImgs = getPasteImgs;\n\n/***/ }),\n/* 136 */\n/***/ (function(module, exports, __webpack_require__) {\n\nmodule.exports = __webpack_require__(309);\n\n/***/ }),\n/* 137 */\n/***/ (function(module, exports, __webpack_require__) {\n\nmodule.exports = __webpack_require__(325);\n\n/***/ }),\n/* 138 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * @description 下拉列表 class\n */\n\nvar _interopRequireDefault = __webpack_require__(0);\n\nvar _defineProperty = _interopRequireDefault(__webpack_require__(1));\n\nvar _forEach = _interopRequireDefault(__webpack_require__(4));\n\nvar _setTimeout2 = _interopRequireDefault(__webpack_require__(48));\n\n(0, _defineProperty[\"default\"])(exports, \"__esModule\", {\n  value: true\n});\n\nvar tslib_1 = __webpack_require__(2);\n\nvar dom_core_1 = tslib_1.__importDefault(__webpack_require__(3));\n\nvar const_1 = __webpack_require__(7);\n\nvar DropList = function () {\n  function DropList(menu, conf) {\n    var _this = this;\n\n    this.hideTimeoutId = 0;\n    this.menu = menu;\n    this.conf = conf; // 容器\n\n    var $container = dom_core_1[\"default\"]('<div class=\"w-e-droplist\"></div>'); // 标题\n\n    var $title = dom_core_1[\"default\"](\"<p>\" + conf.title + \"</p>\");\n    $title.addClass('w-e-dp-title');\n    $container.append($title); // 列表和类型\n\n    var list = conf.list || [];\n    var type = conf.type || 'list'; // item 的点击事件\n\n    var clickHandler = conf.clickHandler || const_1.EMPTY_FN; // 加入 DOM 并绑定事件\n\n    var $list = dom_core_1[\"default\"]('<ul class=\"' + (type === 'list' ? 'w-e-list' : 'w-e-block') + '\"></ul>');\n    (0, _forEach[\"default\"])(list).call(list, function (item) {\n      var $elem = item.$elem;\n      var value = item.value;\n      var $li = dom_core_1[\"default\"]('<li class=\"w-e-item\"></li>');\n\n      if ($elem) {\n        $li.append($elem);\n        $list.append($li);\n        $li.on('click', function (e) {\n          clickHandler(value); // 阻止冒泡\n\n          e.stopPropagation(); // item 点击之后，隐藏 list\n\n          _this.hideTimeoutId = (0, _setTimeout2[\"default\"])(function () {\n            _this.hide();\n          });\n        });\n      }\n    });\n    $container.append($list); // 绑定隐藏事件\n\n    $container.on('mouseleave', function () {\n      _this.hideTimeoutId = (0, _setTimeout2[\"default\"])(function () {\n        _this.hide();\n      });\n    }); // 记录属性\n\n    this.$container = $container;\n    this.rendered = false;\n    this._show = false;\n  }\n  /**\n   * 显示 DropList\n   */\n\n\n  DropList.prototype.show = function () {\n    if (this.hideTimeoutId) {\n      // 清除之前的定时隐藏\n      clearTimeout(this.hideTimeoutId);\n    }\n\n    var menu = this.menu;\n    var $menuELem = menu.$elem;\n    var $container = this.$container;\n\n    if (this._show) {\n      return;\n    }\n\n    if (this.rendered) {\n      // 显示\n      $container.show();\n    } else {\n      // 加入 DOM 之前先定位位置\n      var menuHeight = $menuELem.getBoundingClientRect().height || 0;\n      var width = this.conf.width || 100; // 默认为 100\n\n      $container.css('margin-top', menuHeight + 'px').css('width', width + 'px'); // 加入到 DOM\n\n      $menuELem.append($container);\n      this.rendered = true;\n    } // 修改属性\n\n\n    this._show = true;\n  };\n  /**\n   * 隐藏 DropList\n   */\n\n\n  DropList.prototype.hide = function () {\n    var $container = this.$container;\n\n    if (!this._show) {\n      return;\n    } // 隐藏并需改属性\n\n\n    $container.hide();\n    this._show = false;\n  };\n\n  (0, _defineProperty[\"default\"])(DropList.prototype, \"isShow\", {\n    get: function get() {\n      return this._show;\n    },\n    enumerable: false,\n    configurable: true\n  });\n  return DropList;\n}();\n\nexports[\"default\"] = DropList;\n\n/***/ }),\n/* 139 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * @description 检查选区是否在链接中，即菜单是否应该 active\n * @author wangfupeng\n */\n\nvar _interopRequireDefault = __webpack_require__(0);\n\nvar _defineProperty = _interopRequireDefault(__webpack_require__(1));\n\n(0, _defineProperty[\"default\"])(exports, \"__esModule\", {\n  value: true\n});\n\nfunction isActive(editor) {\n  var $selectionELem = editor.selection.getSelectionContainerElem();\n\n  if (!($selectionELem === null || $selectionELem === void 0 ? void 0 : $selectionELem.length)) {\n    return false;\n  }\n\n  if ($selectionELem.getNodeName() === 'A') {\n    return true;\n  } else {\n    return false;\n  }\n}\n\nexports[\"default\"] = isActive;\n\n/***/ }),\n/* 140 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * @description 上传的核心方法\n * @author wangfupeng\n */\n\nvar _interopRequireDefault = __webpack_require__(0);\n\nvar _typeof2 = _interopRequireDefault(__webpack_require__(100));\n\nvar _defineProperty = _interopRequireDefault(__webpack_require__(1));\n\nvar _forEach = _interopRequireDefault(__webpack_require__(4));\n\n(0, _defineProperty[\"default\"])(exports, \"__esModule\", {\n  value: true\n});\n\nvar util_1 = __webpack_require__(6);\n/**\n * 发送 post 请求（用于文件上传）\n * @param url url\n * @param option 配置项\n */\n\n\nfunction post(url, option) {\n  var xhr = new XMLHttpRequest();\n  xhr.open('POST', url); // 超时，默认 10s\n\n  xhr.timeout = option.timeout || 10 * 1000;\n\n  xhr.ontimeout = function () {\n    console.error('wangEditor - 请求超时');\n    option.onTimeout && option.onTimeout(xhr);\n  }; // 进度\n\n\n  if (xhr.upload) {\n    xhr.upload.onprogress = function (e) {\n      var percent = e.loaded / e.total;\n      option.onProgress && option.onProgress(percent, e);\n    };\n  } // 自定义 header\n\n\n  if (option.headers) {\n    (0, _forEach[\"default\"])(util_1).call(util_1, option.headers, function (key, val) {\n      xhr.setRequestHeader(key, val);\n    });\n  } // 跨域传 cookie\n\n\n  xhr.withCredentials = !!option.withCredentials; // 上传之前的钩子函数，在 xhr.send() 之前执行\n\n  if (option.beforeSend) {\n    var beforeResult = option.beforeSend(xhr);\n\n    if (beforeResult && (0, _typeof2[\"default\"])(beforeResult) === 'object') {\n      if (beforeResult.prevent) {\n        // 如果返回的结果是 {prevent: true, msg: 'xxxx'} 则表示用户放弃上传\n        return beforeResult.msg;\n      }\n    }\n  } // 服务端返回之后\n\n\n  xhr.onreadystatechange = function () {\n    if (xhr.readyState !== 4) return;\n    var status = xhr.status;\n    if (status < 200) return; // 请求发送过程中，尚未返回\n\n    if (status >= 300 && status < 400) return; // 重定向\n\n    if (status >= 400) {\n      // 40x 50x 报错\n      console.error('wangEditor - XHR 报错，状态码 ' + status);\n      if (option.onError) option.onError(xhr); // 有，则执行 onError 函数即可\n\n      return;\n    } // status = 200 ，得到结果\n\n\n    var resultStr = xhr.responseText;\n    var result;\n\n    if ((0, _typeof2[\"default\"])(resultStr) !== 'object') {\n      try {\n        result = JSON.parse(resultStr);\n      } catch (ex) {\n        console.error('wangEditor - 返回结果不是 JSON 格式', resultStr);\n        if (option.onFail) option.onFail(xhr, resultStr);\n        return;\n      }\n    } else {\n      result = resultStr;\n    }\n\n    option.onSuccess(xhr, result);\n  }; // 发送请求\n\n\n  xhr.send(option.formData || null);\n  return xhr;\n}\n\nexports[\"default\"] = post;\n\n/***/ }),\n/* 141 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * @description 上传进度条\n * @author wangfupeng\n */\n\nvar _interopRequireDefault = __webpack_require__(0);\n\nvar _defineProperty = _interopRequireDefault(__webpack_require__(1));\n\nvar _now = _interopRequireDefault(__webpack_require__(357));\n\nvar _setTimeout2 = _interopRequireDefault(__webpack_require__(48));\n\n(0, _defineProperty[\"default\"])(exports, \"__esModule\", {\n  value: true\n});\n\nvar tslib_1 = __webpack_require__(2);\n\nvar dom_core_1 = tslib_1.__importDefault(__webpack_require__(3));\n\nvar Progress = function () {\n  function Progress(editor) {\n    this.editor = editor;\n    this.$textContainer = editor.$textContainerElem;\n    this.$bar = dom_core_1[\"default\"]('<div class=\"w-e-progress\"></div>');\n    this.isShow = false;\n    this.time = 0;\n    this.timeoutId = 0;\n  }\n  /**\n   * 显示进度条\n   * @param progress 进度百分比\n   */\n\n\n  Progress.prototype.show = function (progress) {\n    var _this = this; // 不要重新显示\n\n\n    if (this.isShow) {\n      return;\n    }\n\n    this.isShow = true; // 渲染 $bar\n\n    var $bar = this.$bar;\n    var $textContainer = this.$textContainer;\n    $textContainer.append($bar); // 改变进度条（防抖，100ms 渲染一次）\n\n    if ((0, _now[\"default\"])() - this.time > 100) {\n      if (progress <= 1) {\n        $bar.css('width', progress * 100 + '%');\n        this.time = (0, _now[\"default\"])();\n      }\n    } // 500ms 之后隐藏\n\n\n    var timeoutId = this.timeoutId;\n\n    if (timeoutId) {\n      clearTimeout(timeoutId);\n    }\n\n    this.timeoutId = (0, _setTimeout2[\"default\"])(function () {\n      _this.hide();\n    }, 500);\n  };\n  /**\n   * 隐藏\n   */\n\n\n  Progress.prototype.hide = function () {\n    var $bar = this.$bar;\n    $bar.remove();\n    this.isShow = false;\n    this.time = 0;\n    this.timeoutId = 0;\n  };\n\n  return Progress;\n}();\n\nexports[\"default\"] = Progress;\n\n/***/ }),\n/* 142 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * @description 无序列表/有序列表\n * @author tonghan\n */\n\nvar _interopRequireDefault = __webpack_require__(0);\n\nvar _defineProperty = _interopRequireDefault(__webpack_require__(1));\n\n(0, _defineProperty[\"default\"])(exports, \"__esModule\", {\n  value: true\n});\nexports.ListType = void 0;\n\nvar tslib_1 = __webpack_require__(2);\n\nvar dom_core_1 = tslib_1.__importDefault(__webpack_require__(3));\n\nvar DropListMenu_1 = tslib_1.__importDefault(__webpack_require__(24));\n\nvar utils_1 = __webpack_require__(49);\n\nvar ListHandle_1 = tslib_1.__importStar(__webpack_require__(386));\n/**\n * 列表的种类\n */\n\n\nvar ListType;\n\n(function (ListType) {\n  ListType[\"OrderedList\"] = \"OL\";\n  ListType[\"UnorderedList\"] = \"UL\";\n})(ListType = exports.ListType || (exports.ListType = {}));\n\nvar List = function (_super) {\n  tslib_1.__extends(List, _super);\n\n  function List(editor) {\n    var _this = this;\n\n    var $elem = dom_core_1[\"default\"](\"<div class=\\\"w-e-menu\\\" data-title=\\\"\\u5E8F\\u5217\\\">\\n                <i class=\\\"w-e-icon-list2\\\"></i>\\n            </div>\");\n    var dropListConf = {\n      width: 130,\n      title: '序列',\n      type: 'list',\n      list: [{\n        $elem: dom_core_1[\"default\"](\"\\n                        <p>\\n                            <i class=\\\"w-e-icon-list2 w-e-drop-list-item\\\"></i>\\n                            \" + editor.i18next.t('menus.dropListMenu.list.无序列表') + \"\\n                        <p>\"),\n        value: ListType.UnorderedList\n      }, {\n        $elem: dom_core_1[\"default\"](\"<p>\\n                            <i class=\\\"w-e-icon-list-numbered w-e-drop-list-item\\\"></i>\\n                            \" + editor.i18next.t('menus.dropListMenu.list.有序列表') + \"\\n                        <p>\"),\n        value: ListType.OrderedList\n      }],\n      clickHandler: function clickHandler(value) {\n        // 注意 this 是指向当前的 List 对象\n        _this.command(value);\n      }\n    };\n    _this = _super.call(this, $elem, editor, dropListConf) || this;\n    return _this;\n  }\n\n  List.prototype.command = function (type) {\n    var editor = this.editor;\n    var $selectionElem = editor.selection.getSelectionContainerElem(); // 选区范围的 DOM 元素不存在，不执行命令\n\n    if ($selectionElem === undefined) return; // 获取选区范围内的顶级 DOM 元素\n\n    this.handleSelectionRangeNodes(type); // 是否激活\n\n    this.tryChangeActive();\n  };\n\n  List.prototype.validator = function ($startElem, $endElem, $textElem) {\n    if (!$startElem.length || !$endElem.length || $textElem.equal($startElem) || $textElem.equal($endElem)) {\n      return false;\n    }\n\n    return true;\n  };\n\n  List.prototype.handleSelectionRangeNodes = function (listType) {\n    var editor = this.editor;\n    var selection = editor.selection; // 获取 序列标签\n\n    var listTarget = listType.toLowerCase(); // 获取相对应的 元属节点\n\n    var $selectionElem = selection.getSelectionContainerElem();\n    var $startElem = selection.getSelectionStartElem().getNodeTop(editor);\n    var $endElem = selection.getSelectionEndElem().getNodeTop(editor); // 验证是否执行 处理逻辑\n\n    if (!this.validator($startElem, $endElem, editor.$textElem)) {\n      return;\n    } // 获取选区\n\n\n    var _range = selection.getRange();\n\n    var _collapsed = _range === null || _range === void 0 ? void 0 : _range.collapsed; // 防止光标的时候判断异常\n\n\n    if (!editor.$textElem.equal($selectionElem)) {\n      $selectionElem = $selectionElem.getNodeTop(editor);\n    }\n\n    var options = {\n      editor: editor,\n      listType: listType,\n      listTarget: listTarget,\n      $selectionElem: $selectionElem,\n      $startElem: $startElem,\n      $endElem: $endElem\n    };\n    var classType; // =====================================\n    // 当 selectionElem 属于序列元素的时候\n    // 代表着当前选区一定是在一个序列元素内的\n    // =====================================\n\n    if (this.isOrderElem($selectionElem)) {\n      classType = ListHandle_1.ClassType.Wrap;\n    } // =====================================\n    // 当 startElem 和 endElem 属于序列元素的时候\n    // 代表着当前选区一定是在再两个序列的中间(包括两个序列)\n    // =====================================\n    else if (this.isOrderElem($startElem) && this.isOrderElem($endElem)) {\n      classType = ListHandle_1.ClassType.Join;\n    } // =====================================\n    // 选区开始元素为 序列 的时候\n    // =====================================\n    else if (this.isOrderElem($startElem)) {\n      classType = ListHandle_1.ClassType.StartJoin;\n    } // =====================================\n    // 选区结束元素为 序列 的时候\n    // =====================================\n    else if (this.isOrderElem($endElem)) {\n      classType = ListHandle_1.ClassType.EndJoin;\n    } // =====================================\n    // 当选区不是序列内且开头和结尾不是序列的时候\n    // 直接获取所有顶级段落然后过滤\n    // 代表着 设置序列 的操作\n    // =====================================\n    else {\n      classType = ListHandle_1.ClassType.Other;\n    }\n\n    var listHandleCmd = new ListHandle_1[\"default\"](ListHandle_1.createListHandle(classType, options, _range)); // 更新选区\n\n    utils_1.updateRange(editor, listHandleCmd.getSelectionRangeElem(), !!_collapsed);\n  };\n  /**\n   * 是否是序列元素节点 UL and OL\n   * @param $node\n   */\n\n\n  List.prototype.isOrderElem = function ($node) {\n    var nodeName = $node.getNodeName();\n\n    if (nodeName === ListType.OrderedList || nodeName === ListType.UnorderedList) {\n      return true;\n    }\n\n    return false;\n  };\n\n  List.prototype.tryChangeActive = function () {};\n\n  return List;\n}(DropListMenu_1[\"default\"]);\n\nexports[\"default\"] = List;\n\n/***/ }),\n/* 143 */\n/***/ (function(module, exports, __webpack_require__) {\n\nmodule.exports = __webpack_require__(410);\n\n/***/ }),\n/* 144 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * @description 检查选区是否在代码中，即菜单是否应该 active\n * @author lkw\n */\n\nvar _interopRequireDefault = __webpack_require__(0);\n\nvar _defineProperty = _interopRequireDefault(__webpack_require__(1));\n\n(0, _defineProperty[\"default\"])(exports, \"__esModule\", {\n  value: true\n});\n\nfunction isActive(editor) {\n  var $selectionELem = editor.selection.getSelectionContainerElem();\n\n  if (!($selectionELem === null || $selectionELem === void 0 ? void 0 : $selectionELem.length)) {\n    return false;\n  }\n\n  if ($selectionELem.getNodeName() == 'CODE' || $selectionELem.getNodeName() == 'PRE' || $selectionELem.parent().getNodeName() == 'CODE' || $selectionELem.parent().getNodeName() == 'PRE' || /hljs/.test($selectionELem.parent().attr('class'))) {\n    return true;\n  } else {\n    return false;\n  }\n}\n\nexports[\"default\"] = isActive;\n\n/***/ }),\n/* 145 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _interopRequireDefault = __webpack_require__(0);\n\nvar _defineProperty = _interopRequireDefault(__webpack_require__(1));\n\nvar _find = _interopRequireDefault(__webpack_require__(32));\n\n(0, _defineProperty[\"default\"])(exports, \"__esModule\", {\n  value: true\n});\nexports.todo = void 0;\n\nvar tslib_1 = __webpack_require__(2);\n\nvar dom_core_1 = tslib_1.__importDefault(__webpack_require__(3));\n\nvar todo = function () {\n  function todo($orginElem) {\n    var _a;\n\n    this.template = \"<ul class=\\\"w-e-todo\\\"><li><span contenteditable=\\\"false\\\"><input type=\\\"checkbox\\\"></span></li></ul>\";\n    this.checked = false;\n    this.$todo = dom_core_1[\"default\"](this.template);\n    this.$child = (_a = $orginElem === null || $orginElem === void 0 ? void 0 : $orginElem.childNodes()) === null || _a === void 0 ? void 0 : _a.clone(true);\n  }\n\n  todo.prototype.init = function () {\n    var $child = this.$child;\n    var $inputContainer = this.getInputContainer();\n\n    if ($child) {\n      $child.insertAfter($inputContainer);\n    }\n  };\n\n  todo.prototype.getInput = function () {\n    var $todo = this.$todo;\n    var $input = (0, _find[\"default\"])($todo).call($todo, 'input');\n    return $input;\n  };\n\n  todo.prototype.getInputContainer = function () {\n    var $inputContainer = this.getInput().parent();\n    return $inputContainer;\n  };\n\n  todo.prototype.getTodo = function () {\n    return this.$todo;\n  };\n\n  return todo;\n}();\n\nexports.todo = todo;\n\nfunction createTodo($orginElem) {\n  var t = new todo($orginElem);\n  t.init();\n  return t;\n}\n\nexports[\"default\"] = createTodo;\n\n/***/ }),\n/* 146 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * @description 入口文件\n * @author wangfupeng\n */\n\nvar _interopRequireDefault = __webpack_require__(0);\n\nvar _defineProperty = _interopRequireDefault(__webpack_require__(1));\n\n(0, _defineProperty[\"default\"])(exports, \"__esModule\", {\n  value: true\n});\n\nvar tslib_1 = __webpack_require__(2);\n\n__webpack_require__(154);\n\n__webpack_require__(156);\n\n__webpack_require__(160);\n\n__webpack_require__(162);\n\n__webpack_require__(164);\n\n__webpack_require__(166);\n\n__webpack_require__(168);\n\nvar index_1 = tslib_1.__importDefault(__webpack_require__(94));\n\ntslib_1.__exportStar(__webpack_require__(458), exports); // 检验是否浏览器环境\n\n\ntry {\n  document;\n} catch (ex) {\n  throw new Error('请在浏览器环境下运行');\n}\n\nexports[\"default\"] = index_1[\"default\"];\n\n/***/ }),\n/* 147 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar parent = __webpack_require__(148);\n\nmodule.exports = parent;\n\n\n/***/ }),\n/* 148 */\n/***/ (function(module, exports, __webpack_require__) {\n\n__webpack_require__(149);\nvar path = __webpack_require__(11);\n\nvar Object = path.Object;\n\nvar defineProperty = module.exports = function defineProperty(it, key, desc) {\n  return Object.defineProperty(it, key, desc);\n};\n\nif (Object.defineProperty.sham) defineProperty.sham = true;\n\n\n/***/ }),\n/* 149 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar $ = __webpack_require__(5);\nvar DESCRIPTORS = __webpack_require__(15);\nvar objectDefinePropertyModile = __webpack_require__(18);\n\n// `Object.defineProperty` method\n// https://tc39.es/ecma262/#sec-object.defineproperty\n$({ target: 'Object', stat: true, forced: !DESCRIPTORS, sham: !DESCRIPTORS }, {\n  defineProperty: objectDefinePropertyModile.f\n});\n\n\n/***/ }),\n/* 150 */\n/***/ (function(module, exports) {\n\nvar g;\n\n// This works in non-strict mode\ng = (function() {\n\treturn this;\n})();\n\ntry {\n\t// This works if eval is allowed (see CSP)\n\tg = g || new Function(\"return this\")();\n} catch (e) {\n\t// This works if the window reference is available\n\tif (typeof window === \"object\") g = window;\n}\n\n// g can still be undefined, but nothing to do about it...\n// We return undefined, instead of nothing here, so it's\n// easier to handle this case. if(!global) { ...}\n\nmodule.exports = g;\n\n\n/***/ }),\n/* 151 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar isObject = __webpack_require__(13);\nvar isSymbol = __webpack_require__(65);\nvar ordinaryToPrimitive = __webpack_require__(152);\nvar wellKnownSymbol = __webpack_require__(9);\n\nvar TO_PRIMITIVE = wellKnownSymbol('toPrimitive');\n\n// `ToPrimitive` abstract operation\n// https://tc39.es/ecma262/#sec-toprimitive\nmodule.exports = function (input, pref) {\n  if (!isObject(input) || isSymbol(input)) return input;\n  var exoticToPrim = input[TO_PRIMITIVE];\n  var result;\n  if (exoticToPrim !== undefined) {\n    if (pref === undefined) pref = 'default';\n    result = exoticToPrim.call(input, pref);\n    if (!isObject(result) || isSymbol(result)) return result;\n    throw TypeError(\"Can't convert object to primitive value\");\n  }\n  if (pref === undefined) pref = 'number';\n  return ordinaryToPrimitive(input, pref);\n};\n\n\n/***/ }),\n/* 152 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar isObject = __webpack_require__(13);\n\n// `OrdinaryToPrimitive` abstract operation\n// https://tc39.es/ecma262/#sec-ordinarytoprimitive\nmodule.exports = function (input, pref) {\n  var fn, val;\n  if (pref === 'string' && typeof (fn = input.toString) == 'function' && !isObject(val = fn.call(input))) return val;\n  if (typeof (fn = input.valueOf) == 'function' && !isObject(val = fn.call(input))) return val;\n  if (pref !== 'string' && typeof (fn = input.toString) == 'function' && !isObject(val = fn.call(input))) return val;\n  throw TypeError(\"Can't convert object to primitive value\");\n};\n\n\n/***/ }),\n/* 153 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar global = __webpack_require__(8);\n\nmodule.exports = function (key, value) {\n  try {\n    // eslint-disable-next-line es/no-object-defineproperty -- safe\n    Object.defineProperty(global, key, { value: value, configurable: true, writable: true });\n  } catch (error) {\n    global[key] = value;\n  } return value;\n};\n\n\n/***/ }),\n/* 154 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar api = __webpack_require__(21);\n            var content = __webpack_require__(155);\n\n            content = content.__esModule ? content.default : content;\n\n            if (typeof content === 'string') {\n              content = [[module.i, content, '']];\n            }\n\nvar options = {};\n\noptions.insert = \"head\";\noptions.singleton = false;\n\nvar update = api(content, options);\n\n\n\nmodule.exports = content.locals || {};\n\n/***/ }),\n/* 155 */\n/***/ (function(module, exports, __webpack_require__) {\n\n// Imports\nvar ___CSS_LOADER_API_IMPORT___ = __webpack_require__(22);\nexports = ___CSS_LOADER_API_IMPORT___(false);\n// Module\nexports.push([module.i, \".w-e-toolbar,\\n.w-e-text-container,\\n.w-e-menu-panel {\\n  padding: 0;\\n  margin: 0;\\n  box-sizing: border-box;\\n  background-color: #fff;\\n  /*表情菜单样式*/\\n  /*分割线样式*/\\n}\\n.w-e-toolbar h1,\\n.w-e-text-container h1,\\n.w-e-menu-panel h1 {\\n  font-size: 32px !important;\\n}\\n.w-e-toolbar h2,\\n.w-e-text-container h2,\\n.w-e-menu-panel h2 {\\n  font-size: 24px !important;\\n}\\n.w-e-toolbar h3,\\n.w-e-text-container h3,\\n.w-e-menu-panel h3 {\\n  font-size: 18.72px !important;\\n}\\n.w-e-toolbar h4,\\n.w-e-text-container h4,\\n.w-e-menu-panel h4 {\\n  font-size: 16px !important;\\n}\\n.w-e-toolbar h5,\\n.w-e-text-container h5,\\n.w-e-menu-panel h5 {\\n  font-size: 13.28px !important;\\n}\\n.w-e-toolbar p,\\n.w-e-text-container p,\\n.w-e-menu-panel p {\\n  font-size: 16px !important;\\n}\\n.w-e-toolbar .eleImg,\\n.w-e-text-container .eleImg,\\n.w-e-menu-panel .eleImg {\\n  cursor: pointer;\\n  display: inline-block;\\n  font-size: 18px;\\n  padding: 0 3px;\\n}\\n.w-e-toolbar *,\\n.w-e-text-container *,\\n.w-e-menu-panel * {\\n  padding: 0;\\n  margin: 0;\\n  box-sizing: border-box;\\n}\\n.w-e-toolbar hr,\\n.w-e-text-container hr,\\n.w-e-menu-panel hr {\\n  cursor: pointer;\\n  display: block;\\n  height: 0px;\\n  border: 0;\\n  border-top: 3px solid #ccc;\\n  margin: 20px 0;\\n}\\n.w-e-clear-fix:after {\\n  content: \\\"\\\";\\n  display: table;\\n  clear: both;\\n}\\n.w-e-drop-list-item {\\n  position: relative;\\n  top: 1px;\\n  padding-right: 7px;\\n  color: #333 !important;\\n}\\n.w-e-drop-list-tl {\\n  padding-left: 10px;\\n  text-align: left;\\n}\\n\", \"\"]);\n// Exports\nmodule.exports = exports;\n\n\n/***/ }),\n/* 156 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar api = __webpack_require__(21);\n            var content = __webpack_require__(157);\n\n            content = content.__esModule ? content.default : content;\n\n            if (typeof content === 'string') {\n              content = [[module.i, content, '']];\n            }\n\nvar options = {};\n\noptions.insert = \"head\";\noptions.singleton = false;\n\nvar update = api(content, options);\n\n\n\nmodule.exports = content.locals || {};\n\n/***/ }),\n/* 157 */\n/***/ (function(module, exports, __webpack_require__) {\n\n// Imports\nvar ___CSS_LOADER_API_IMPORT___ = __webpack_require__(22);\nvar ___CSS_LOADER_GET_URL_IMPORT___ = __webpack_require__(158);\nvar ___CSS_LOADER_URL_IMPORT_0___ = __webpack_require__(159);\nexports = ___CSS_LOADER_API_IMPORT___(false);\nvar ___CSS_LOADER_URL_REPLACEMENT_0___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_0___);\n// Module\nexports.push([module.i, \"@font-face {\\n  font-family: 'w-e-icon';\\n  src: url(\" + ___CSS_LOADER_URL_REPLACEMENT_0___ + \") format('truetype');\\n  font-weight: normal;\\n  font-style: normal;\\n}\\n[class^=\\\"w-e-icon-\\\"],\\n[class*=\\\" w-e-icon-\\\"] {\\n  /* use !important to prevent issues with browser extensions that change fonts */\\n  font-family: 'w-e-icon' !important;\\n  speak: none;\\n  font-style: normal;\\n  font-weight: normal;\\n  font-variant: normal;\\n  text-transform: none;\\n  line-height: 1;\\n  /* Better Font Rendering =========== */\\n  -webkit-font-smoothing: antialiased;\\n  -moz-osx-font-smoothing: grayscale;\\n}\\n.w-e-icon-close:before {\\n  content: \\\"\\\\f00d\\\";\\n}\\n.w-e-icon-upload2:before {\\n  content: \\\"\\\\e9c6\\\";\\n}\\n.w-e-icon-trash-o:before {\\n  content: \\\"\\\\f014\\\";\\n}\\n.w-e-icon-header:before {\\n  content: \\\"\\\\f1dc\\\";\\n}\\n.w-e-icon-pencil2:before {\\n  content: \\\"\\\\e906\\\";\\n}\\n.w-e-icon-paint-brush:before {\\n  content: \\\"\\\\f1fc\\\";\\n}\\n.w-e-icon-image:before {\\n  content: \\\"\\\\e90d\\\";\\n}\\n.w-e-icon-play:before {\\n  content: \\\"\\\\e912\\\";\\n}\\n.w-e-icon-location:before {\\n  content: \\\"\\\\e947\\\";\\n}\\n.w-e-icon-undo:before {\\n  content: \\\"\\\\e965\\\";\\n}\\n.w-e-icon-redo:before {\\n  content: \\\"\\\\e966\\\";\\n}\\n.w-e-icon-quotes-left:before {\\n  content: \\\"\\\\e977\\\";\\n}\\n.w-e-icon-list-numbered:before {\\n  content: \\\"\\\\e9b9\\\";\\n}\\n.w-e-icon-list2:before {\\n  content: \\\"\\\\e9bb\\\";\\n}\\n.w-e-icon-link:before {\\n  content: \\\"\\\\e9cb\\\";\\n}\\n.w-e-icon-happy:before {\\n  content: \\\"\\\\e9df\\\";\\n}\\n.w-e-icon-bold:before {\\n  content: \\\"\\\\ea62\\\";\\n}\\n.w-e-icon-underline:before {\\n  content: \\\"\\\\ea63\\\";\\n}\\n.w-e-icon-italic:before {\\n  content: \\\"\\\\ea64\\\";\\n}\\n.w-e-icon-strikethrough:before {\\n  content: \\\"\\\\ea65\\\";\\n}\\n.w-e-icon-table2:before {\\n  content: \\\"\\\\ea71\\\";\\n}\\n.w-e-icon-paragraph-left:before {\\n  content: \\\"\\\\ea77\\\";\\n}\\n.w-e-icon-paragraph-center:before {\\n  content: \\\"\\\\ea78\\\";\\n}\\n.w-e-icon-paragraph-right:before {\\n  content: \\\"\\\\ea79\\\";\\n}\\n.w-e-icon-paragraph-justify:before {\\n  content: \\\"\\\\ea7a\\\";\\n}\\n.w-e-icon-terminal:before {\\n  content: \\\"\\\\f120\\\";\\n}\\n.w-e-icon-page-break:before {\\n  content: \\\"\\\\ea68\\\";\\n}\\n.w-e-icon-cancel-circle:before {\\n  content: \\\"\\\\ea0d\\\";\\n}\\n.w-e-icon-font:before {\\n  content: \\\"\\\\ea5c\\\";\\n}\\n.w-e-icon-text-heigh:before {\\n  content: \\\"\\\\ea5f\\\";\\n}\\n.w-e-icon-paint-format:before {\\n  content: \\\"\\\\e90c\\\";\\n}\\n.w-e-icon-indent-increase:before {\\n  content: \\\"\\\\ea7b\\\";\\n}\\n.w-e-icon-indent-decrease:before {\\n  content: \\\"\\\\ea7c\\\";\\n}\\n.w-e-icon-row-height:before {\\n  content: \\\"\\\\e9be\\\";\\n}\\n.w-e-icon-fullscreen_exit:before {\\n  content: \\\"\\\\e900\\\";\\n}\\n.w-e-icon-fullscreen:before {\\n  content: \\\"\\\\e901\\\";\\n}\\n.w-e-icon-split-line:before {\\n  content: \\\"\\\\ea0b\\\";\\n}\\n.w-e-icon-checkbox-checked:before {\\n  content: \\\"\\\\ea52\\\";\\n}\\n\", \"\"]);\n// Exports\nmodule.exports = exports;\n\n\n/***/ }),\n/* 158 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nmodule.exports = function (url, options) {\n  if (!options) {\n    // eslint-disable-next-line no-param-reassign\n    options = {};\n  } // eslint-disable-next-line no-underscore-dangle, no-param-reassign\n\n\n  url = url && url.__esModule ? url.default : url;\n\n  if (typeof url !== 'string') {\n    return url;\n  } // If url is already wrapped in quotes, remove them\n\n\n  if (/^['\"].*['\"]$/.test(url)) {\n    // eslint-disable-next-line no-param-reassign\n    url = url.slice(1, -1);\n  }\n\n  if (options.hash) {\n    // eslint-disable-next-line no-param-reassign\n    url += options.hash;\n  } // Should url be wrapped?\n  // See https://drafts.csswg.org/css-values-3/#urls\n\n\n  if (/[\"'() \\t\\n]/.test(url) || options.needQuotes) {\n    return \"\\\"\".concat(url.replace(/\"/g, '\\\\\"').replace(/\\n/g, '\\\\n'), \"\\\"\");\n  }\n\n  return url;\n};\n\n/***/ }),\n/* 159 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (\"data:font/woff;base64,d09GRgABAAAAABskAAsAAAAAGtgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABPUy8yAAABCAAAAGAAAABgDxIPFWNtYXAAAAFoAAABHAAAARz2mfAgZ2FzcAAAAoQAAAAIAAAACAAAABBnbHlmAAACjAAAFXwAABV8IH7+mGhlYWQAABgIAAAANgAAADYb6gumaGhlYQAAGEAAAAAkAAAAJAkjBWlobXR4AAAYZAAAAKQAAACkmYcEbmxvY2EAABkIAAAAVAAAAFReAmKYbWF4cAAAGVwAAAAgAAAAIAA0ALZuYW1lAAAZfAAAAYYAAAGGmUoJ+3Bvc3QAABsEAAAAIAAAACAAAwAAAAMD7wGQAAUAAAKZAswAAACPApkCzAAAAesAMwEJAAAAAAAAAAAAAAAAAAAAARAAAAAAAAAAAAAAAAAAAAAAQAAA8fwDwP/AAEADwABAAAAAAQAAAAAAAAAAAAAAIAAAAAAAAwAAAAMAAAAcAAEAAwAAABwAAwABAAAAHAAEAQAAAAA8ACAABAAcAAEAIOkB6QbpDekS6UfpZul36bnpu+m+6cbpy+nf6gvqDepS6lzqX+pl6nHqfPAN8BTxIPHc8fz//f//AAAAAAAg6QDpBukM6RLpR+ll6Xfpuem76b7pxunL6d/qC+oN6lLqXOpf6mLqcep38A3wFPEg8dzx/P/9//8AAf/jFwQXABb7FvcWwxamFpYWVRZUFlIWSxZHFjQWCRYIFcQVuxW5FbcVrBWnEBcQEQ8GDksOLAADAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAB//8ADwABAAAAAAAAAAAAAgAANzkBAAAAAAEAAAAAAAAAAAACAAA3OQEAAAAAAQAAAAAAAAAAAAIAADc5AQAAAAAEAEEAAQO/A38ABQALABEAFwAAATMVIREzAxEhFSMVATUzESE1ETUhESM1Av/A/sJ+fgE+wP4Cfv7CAT5+Ar9+AT78ggE+fsACvsD+wn7+An7+wsAAAAAABABBAAEDvwN/AAUACwARABcAAAEhESM1IxM1MxEhNQERIRUjFREVMxUhEQKBAT5+wMB+/sL9wAE+wMD+wgN//sLA/X7A/sJ+AcIBPn7A/v7AfgE+AAAAAAIAAP/ABAADwAAEABMAAAE3AScBAy4BJxM3ASMBAyUBNQEHAYCAAcBA/kCfFzsyY4ABgMD+gMACgAGA/oBOAUBAAcBA/kD+nTI7FwERTgGA/oD9gMABgMD+gIAAAgAA/8AEAAOAACkALQAAAREjNTQmIyEiBh0BFBYzITI2PQEzESEVIyIGFREUFjsBMjY1ETQmKwE1ASE1IQQAwCYa/UAaJiYaAsAaJoD9wCANExMNgA0TEw0gAUD9QALAAYABgEAaJiYawBomJhpA/wCAEw3+wA0TEw0BQA0TQAGAQAAABAAAAAAEAAOAABAAIQAtADQAAAE4ATEROAExITgBMRE4ATEhNSEiBhURFBYzITI2NRE0JiMHFAYjIiY1NDYzMhYTITUTATM3A8D8gAOA/IAaJiYaA4AaJiYagDgoKDg4KCg4QP0A4AEAQOADQP0AAwBAJhr9ABomJhoDABom4Cg4OCgoODj9uIABgP7AwAAAAgAAAEAEAANAADgAPAAAASYnLgEnJiMiBw4BBwYHBgcOAQcGFRQXHgEXFhcWFx4BFxYzMjc+ATc2NzY3PgE3NjU0Jy4BJyYnARENAQPVNjg5djw9Pz89PHY5ODYLBwgLAwMDAwsIBws2ODl2PD0/Pz08djk4NgsHCAsDAwMDCwgHC/2rAUD+wAMgCAYGCAICAgIIBgYIKSoqWS0uLy8uLVkqKikIBgYIAgICAggGBggpKipZLS4vLy4tWSoqKf3gAYDAwAAAAAACAMD/wANAA8AAGwAnAAABIgcOAQcGFRQXHgEXFjEwNz4BNzY1NCcuAScmAyImNTQ2MzIWFRQGAgBCOzpXGRkyMngyMjIyeDIyGRlXOjtCUHBwUFBwcAPAGRlXOjtCeH19zEFBQUHMfX14Qjs6VxkZ/gBwUFBwcFBQcAAAAQAAAAAEAAOAACsAAAEiBw4BBwYHJxEhJz4BMzIXHgEXFhUUBw4BBwYHFzY3PgE3NjU0Jy4BJyYjAgA1MjJcKSkjlgGAkDWLUFBFRmkeHgkJIhgYHlUoICAtDAwoKIteXWoDgAoLJxscI5b+gJA0PB4eaUZFUCsoKUkgIRpgIysrYjY2OWpdXosoKAABAAAAAAQAA4AAKgAAExQXHgEXFhc3JicuAScmNTQ3PgE3NjMyFhcHIREHJicuAScmIyIHDgEHBgAMDC0gIChVHhgYIgkJHh5pRkVQUIs1kAGAliMpKVwyMjVqXV6LKCgBgDk2NmIrKyNgGiEgSSkoK1BFRmkeHjw0kAGAliMcGycLCigoi15dAAAAAAIAAABABAEDAAAmAE0AABMyFx4BFxYVFAcOAQcGIyInLgEnJjUnNDc+ATc2MxUiBgcOAQc+ASEyFx4BFxYVFAcOAQcGIyInLgEnJjUnNDc+ATc2MxUiBgcOAQc+AeEuKSk9ERISET0pKS4uKSk9ERIBIyN6UlFdQHUtCRAHCBICSS4pKT0REhIRPSkpLi4pKT0REgEjI3pSUV1AdS0JEAcIEgIAEhE9KSkuLikpPRESEhE9KSkuIF1RUnojI4AwLggTCgIBEhE9KSkuLikpPRESEhE9KSkuIF1RUnojI4AwLggTCgIBAAAGAED/wAQAA8AAAwAHAAsAEQAdACkAACUhFSERIRUhESEVIScRIzUjNRMVMxUjNTc1IzUzFRURIzUzNSM1MzUjNQGAAoD9gAKA/YACgP2AwEBAQIDAgIDAwICAgICAgAIAgAIAgMD/AMBA/fIyQJI8MkCS7v7AQEBAQEAABgAA/8AEAAPAAAMABwALABcAIwAvAAABIRUhESEVIREhFSEBNDYzMhYVFAYjIiYRNDYzMhYVFAYjIiYRNDYzMhYVFAYjIiYBgAKA/YACgP2AAoD9gP6ASzU1S0s1NUtLNTVLSzU1S0s1NUtLNTVLA4CA/wCA/wCAA0A1S0s1NUtL/rU1S0s1NUtL/rU1S0s1NUtLAAUAAABABWADAAADAAcACwAOABEAABMhFSEVIRUhFSEVIQEXNzUnBwADgPyAA4D8gAOA/IAD4MDAwMADAMBAwEDAAUDAwEDAwAAAAAADAAAAAAQAA6AAAwANABQAADchFSElFSE1EyEVITUhJQkBIxEjEQAEAPwABAD8AIABAAEAAQD9YAEgASDggEBAwEBAAQCAgMABIP7g/wABAAAAAAACAB7/zAPiA7QAMwBkAAABIiYnJicmNDc2PwE+ATMyFhcWFxYUBwYPAQYiJyY0PwE2NCcuASMiBg8BBhQXFhQHDgEjAyImJyYnJjQ3Nj8BNjIXFhQPAQYUFx4BMzI2PwE2NCcmNDc2MhcWFxYUBwYPAQ4BIwG4ChMIIxISEhIjwCNZMTFZIyMSEhISI1gPLA8PD1gpKRQzHBwzFMApKQ8PCBMKuDFZIyMSEhISI1gPLA8PD1gpKRQzHBwzFMApKQ8PDysQIxISEhIjwCNZMQFECAckLS1eLS0kwCIlJSIkLS1eLS0kVxAQDysPWCl0KRQVFRTAKXQpDysQBwj+iCUiJC0tXi0tJFcQEA8rD1gpdCkUFRUUwCl0KQ8rEA8PJC0tXi0tJMAiJQAAAAAFAAD/wAQAA8AAGwA3AFMAXwBrAAAFMjc+ATc2NTQnLgEnJiMiBw4BBwYVFBceARcWEzIXHgEXFhUUBw4BBwYjIicuAScmNTQ3PgE3NhMyNz4BNzY3BgcOAQcGIyInLgEnJicWFx4BFxYnNDYzMhYVFAYjIiYlNDYzMhYVFAYjIiYCAGpdXosoKCgoi15dampdXosoKCgoi15dalZMTHEgISEgcUxMVlZMTHEgISEgcUxMVisrKlEmJiMFHBtWODc/Pzc4VhscBSMmJlEqK9UlGxslJRsbJQGAJRsbJSUbGyVAKCiLXl1qal1eiygoKCiLXl1qal1eiygoA6AhIHFMTFZWTExxICEhIHFMTFZWTExxICH+CQYGFRAQFEM6OlYYGRkYVjo6QxQQEBUGBvcoODgoKDg4KCg4OCgoODgAAAEAAAFABAACQAAPAAATFRQWMyEyNj0BNCYjISIGABMNA8ANExMN/EANEwIgwA0TEw3ADRMTAAAAAwAA/8AEAAPAABsANwBDAAABIgcOAQcGFRQXHgEXFjMyNz4BNzY1NCcuAScmAyInLgEnJjU0Nz4BNzYzMhceARcWFRQHDgEHBhMHJwcXBxc3FzcnNwIAal1eiygoKCiLXl1qal1eiygoKCiLXl1qVkxMcSAhISBxTExWVkxMcSAhISBxTExKoKBgoKBgoKBgoKADwCgoi15dampdXosoKCgoi15dampdXosoKPxgISBxTExWVkxMcSAhISBxTExWVkxMcSAhAqCgoGCgoGCgoGCgoAACAAD/wAQAA8AADwAVAAABISIGFREUFjMhMjY1ETQmASc3FwEXA4D9ADVLSzUDADVLS/4L7VqTATNaA8BLNf0ANUtLNQMANUv85e5akgEyWgAAAAABAGX/wAObA8AAKQAAASImIyIHDgEHBhUUFjMuATU0NjcwBwYCBwYHFSETMzcjNx4BMzI2Nw4BAyBEaEZxU1RtGhtJSAYNZUoQEEs8PFkBPWzGLNc0LVUmLlAYHT0DsBAeHWE+P0FNOwsmN5lvA31+/sWPkCMZAgCA9gkPN2sJBwAAAAACAAAAAAQAA4AACQAXAAAlMwcnMxEjNxcjJREnIxEzFSE1MxEjBxEDgICgoICAoKCA/wBAwID+gIDAQMDAwAIAwMDA/wCA/UBAQALAgAEAAAMAwAAAA0ADgAAWAB8AKAAAAT4BNTQnLgEnJiMhESEyNz4BNzY1NCYBMzIWFRQGKwETIxEzMhYVFAYCxBwgFBRGLi81/sABgDUvLkYUFET+hGUqPDwpZp+fnyw+PgHbIlQvNS8uRhQU/IAUFEYuLzVGdAFGSzU1S/6AAQBLNTVLAAAAAAIAwAAAA0ADgAAfACMAAAEzERQHDgEHBiMiJy4BJyY1ETMRFBYXHgEzMjY3PgE1ASEVIQLAgBkZVzo7QkI7OlcZGYAbGBxJKChJHBgb/gACgP2AA4D+YDw0NU4WFxcWTjU0PAGg/mAeOBcYGxsYFzge/qCAAAAAAAEAgAAAA4ADgAALAAABFSMBMxUhNTMBIzUDgID+wID+QIABQIADgED9AEBAAwBAAAEAAAAABAADgAA9AAABFSMeARUUBgcOASMiJicuATUzFBYzMjY1NCYjITUhLgEnLgE1NDY3PgEzMhYXHgEVIzQmIyIGFRQWMzIWFwQA6xUWNTAscT4+cSwwNYByTk5yck7+AAEsAgQBMDU1MCxxPj5xLDA1gHJOTnJyTjtuKwHAQB1BIjViJCEkJCEkYjU0TEw0NExAAQMBJGI1NWIkISQkISRiNTRMTDQ0TCEfAAAACgAAAAAEAAOAAAMABwALAA8AEwAXABsAHwAjACcAABMRIREBNSEVHQEhNQEVITUjFSE1ESEVISUhFSERNSEVASEVISE1IRUABAD9gAEA/wABAP8AQP8AAQD/AAKAAQD/AAEA/IABAP8AAoABAAOA/IADgP3AwMBAwMACAMDAwMD/AMDAwAEAwMD+wMDAwAAABQAAAAAEAAOAAAMABwALAA8AEwAAEyEVIRUhFSERIRUhESEVIREhFSEABAD8AAKA/YACgP2ABAD8AAQA/AADgIBAgP8AgAFAgP8AgAAAAAAFAAAAAAQAA4AAAwAHAAsADwATAAATIRUhFyEVIREhFSEDIRUhESEVIQAEAPwAwAKA/YACgP2AwAQA/AAEAPwAA4CAQID/AIABQID/AIAAAAUAAAAABAADgAADAAcACwAPABMAABMhFSEFIRUhESEVIQEhFSERIRUhAAQA/AABgAKA/YACgP2A/oAEAPwABAD8AAOAgECA/wCAAUCA/wCAAAAAAAUAAAAABAADgAADAAcACwAPABMAABMhFSEVIRUhFSEVIRUhFSEVIRUhAAQA/AAEAPwABAD8AAQA/AAEAPwAA4CAQIBAgECAQIAAAAAGAAAAAAQAA4AAAwAHAAsADwATABYAABMhFSEFIRUhFSEVIRUhFSEFIRUhGQEFAAQA/AABgAKA/YACgP2AAoD9gP6ABAD8AAEAA4CAQIBAgECAQIABAAGAwAAAAAYAAAAABAADgAADAAcACwAPABMAFgAAEyEVIQUhFSEVIRUhFSEVIQUhFSEBESUABAD8AAGAAoD9gAKA/YACgP2A/oAEAPwAAQD/AAOAgECAQIBAgECAAoD+gMAAAQA/AD8C5gLmACwAACUUDwEGIyIvAQcGIyIvASY1ND8BJyY1ND8BNjMyHwE3NjMyHwEWFRQPARcWFQLmEE4QFxcQqKgQFxYQThAQqKgQEE4QFhcQqKgQFxcQThAQqKgQwxYQThAQqKgQEE4QFhcQqKgQFxcQThAQqKgQEE4QFxcQqKgQFwAAAAYAAAAAAyUDbgAUACgAPABNAFUAggAAAREUBwYrASInJjURNDc2OwEyFxYVMxEUBwYrASInJjURNDc2OwEyFxYXERQHBisBIicmNRE0NzY7ATIXFhMRIREUFxYXFjMhMjc2NzY1ASEnJicjBgcFFRQHBisBERQHBiMhIicmNREjIicmPQE0NzY7ATc2NzY7ATIXFh8BMzIXFhUBJQYFCCQIBQYGBQgkCAUGkgUFCCUIBQUFBQglCAUFkgUFCCUIBQUFBQglCAUFSf4ABAQFBAIB2wIEBAQE/oABABsEBrUGBAH3BgUINxobJv4lJhsbNwgFBQUFCLEoCBcWF7cXFhYJKLAIBQYCEv63CAUFBQUIAUkIBQYGBQj+twgFBQUFCAFJCAUGBgUI/rcIBQUFBQgBSQgFBgYF/lsCHf3jDQsKBQUFBQoLDQJmQwUCAgVVJAgGBf3jMCIjISIvAiAFBggkCAUFYBUPDw8PFWAFBQgAAgAHAEkDtwKvABoALgAACQEGIyIvASY1ND8BJyY1ND8BNjMyFwEWFRQHARUUBwYjISInJj0BNDc2MyEyFxYBTv72BgcIBR0GBuHhBgYdBQgHBgEKBgYCaQUFCP3bCAUFBQUIAiUIBQUBhf72BgYcBggHBuDhBgcHBh0FBf71BQgHBv77JQgFBQUFCCUIBQUFBQAAAAEAIwAAA90DbgCzAAAlIicmIyIHBiMiJyY1NDc2NzY3Njc2PQE0JyYjISIHBh0BFBcWFxYzFhcWFRQHBiMiJyYjIgcGIyInJjU0NzY3Njc2NzY9ARE0NTQ1NCc0JyYnJicmJyYnJiMiJyY1NDc2MzIXFjMyNzYzMhcWFRQHBiMGBwYHBh0BFBcWMyEyNzY9ATQnJicmJyY1NDc2MzIXFjMyNzYzMhcWFRQHBgciBwYHBhURFBcWFxYXMhcWFRQHBiMDwRkzMhoZMjMZDQgHCQoNDBEQChIBBxX+fhYHARUJEhMODgwLBwcOGzU1GhgxMRgNBwcJCQsMEA8JEgECAQIDBAQFCBIRDQ0KCwcHDho1NRoYMDEYDgcHCQoMDRAQCBQBBw8BkA4HARQKFxcPDgcHDhkzMhkZMTEZDgcHCgoNDRARCBQUCRERDg0KCwcHDgACAgICDAsPEQkJAQEDAwUMROAMBQMDBQzUUQ0GAQIBCAgSDwwNAgICAgwMDhEICQECAwMFDUUhAdACDQ0ICA4OCgoLCwcHAwYBAQgIEg8MDQICAgINDA8RCAgBAgEGDFC2DAcBAQcMtlAMBgEBBgcWDwwNAgICAg0MDxEICAEBAgYNT/3mRAwGAgIBCQgRDwwNAAACAAD/twP/A7cAEwA5AAABMhcWFRQHAgcGIyInJjU0NwE2MwEWFxYfARYHBiMiJyYnJicmNRYXFhcWFxYzMjc2NzY3Njc2NzY3A5soHh4avkw3RUg0NDUBbSEp/fgXJicvAQJMTHtHNjYhIRARBBMUEBASEQkXCA8SExUVHR0eHikDtxsaKCQz/plGNDU0SUkwAUsf/bErHx8NKHpNTBobLi86OkQDDw4LCwoKFiUbGhERCgsEBAIAAQAAAAAAAIWwaoFfDzz1AAsEAAAAAADbteOZAAAAANu145kAAP+3BWADwAAAAAgAAgAAAAAAAAABAAADwP/AAAAFgAAA//8FYAABAAAAAAAAAAAAAAAAAAAAKQQAAAAAAAAAAAAAAAIAAAAEAABBBAAAQQQAAAAEAAAABAAAAAQAAAAEAADABAAAAAQAAAAEAAAABAAAQAQAAAAFgAAABAAAAAQAAB4EAAAABAAAAAQAAAAEAAAABAAAZQQAAAAEAADABAAAwAQAAIAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAMlAD8DJQAAA74ABwQAACMD/wAAAAAAAAAKABQAHgBKAHYApADmAS4BkgHQAhYCXALQAw4DWAN+A6gEPgTeBPoFZAWOBdAF+AY6BnYGjgbmBy4HVgd+B6gHzgf8CCoIbgkmCXAKYgq+AAEAAAApALQACgAAAAAAAgAAAAAAAAAAAAAAAAAAAAAAAAAOAK4AAQAAAAAAAQAHAAAAAQAAAAAAAgAHAGAAAQAAAAAAAwAHADYAAQAAAAAABAAHAHUAAQAAAAAABQALABUAAQAAAAAABgAHAEsAAQAAAAAACgAaAIoAAwABBAkAAQAOAAcAAwABBAkAAgAOAGcAAwABBAkAAwAOAD0AAwABBAkABAAOAHwAAwABBAkABQAWACAAAwABBAkABgAOAFIAAwABBAkACgA0AKRpY29tb29uAGkAYwBvAG0AbwBvAG5WZXJzaW9uIDEuMABWAGUAcgBzAGkAbwBuACAAMQAuADBpY29tb29uAGkAYwBvAG0AbwBvAG5pY29tb29uAGkAYwBvAG0AbwBvAG5SZWd1bGFyAFIAZQBnAHUAbABhAHJpY29tb29uAGkAYwBvAG0AbwBvAG5Gb250IGdlbmVyYXRlZCBieSBJY29Nb29uLgBGAG8AbgB0ACAAZwBlAG4AZQByAGEAdABlAGQAIABiAHkAIABJAGMAbwBNAG8AbwBuAC4AAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\");\n\n/***/ }),\n/* 160 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar api = __webpack_require__(21);\n            var content = __webpack_require__(161);\n\n            content = content.__esModule ? content.default : content;\n\n            if (typeof content === 'string') {\n              content = [[module.i, content, '']];\n            }\n\nvar options = {};\n\noptions.insert = \"head\";\noptions.singleton = false;\n\nvar update = api(content, options);\n\n\n\nmodule.exports = content.locals || {};\n\n/***/ }),\n/* 161 */\n/***/ (function(module, exports, __webpack_require__) {\n\n// Imports\nvar ___CSS_LOADER_API_IMPORT___ = __webpack_require__(22);\nexports = ___CSS_LOADER_API_IMPORT___(false);\n// Module\nexports.push([module.i, \".w-e-toolbar {\\n  display: flex;\\n  padding: 0 6px;\\n  flex-wrap: wrap;\\n  position: relative;\\n  /* 单个菜单 */\\n}\\n.w-e-toolbar .w-e-menu {\\n  position: relative;\\n  display: flex;\\n  width: 40px;\\n  height: 40px;\\n  align-items: center;\\n  justify-content: center;\\n  text-align: center;\\n  cursor: pointer;\\n}\\n.w-e-toolbar .w-e-menu i {\\n  color: #999;\\n}\\n.w-e-toolbar .w-e-menu:hover {\\n  background-color: #F6F6F6;\\n}\\n.w-e-toolbar .w-e-menu:hover i {\\n  color: #333;\\n}\\n.w-e-toolbar .w-e-active i {\\n  color: #1e88e5;\\n}\\n.w-e-toolbar .w-e-active:hover i {\\n  color: #1e88e5;\\n}\\n.w-e-menu-tooltip {\\n  position: absolute;\\n  display: flex;\\n  color: #f1f1f1;\\n  background-color: rgba(0, 0, 0, 0.75);\\n  box-shadow: 0 2px 8px 0 rgba(0, 0, 0, 0.15);\\n  border-radius: 4px;\\n  padding: 4px 5px 6px;\\n  justify-content: center;\\n  align-items: center;\\n}\\n.w-e-menu-tooltip-up::after {\\n  content: \\\"\\\";\\n  position: absolute;\\n  top: 100%;\\n  left: 50%;\\n  margin-left: -5px;\\n  border: 5px solid rgba(0, 0, 0, 0);\\n  border-top-color: rgba(0, 0, 0, 0.73);\\n}\\n.w-e-menu-tooltip-down::after {\\n  content: \\\"\\\";\\n  position: absolute;\\n  bottom: 100%;\\n  left: 50%;\\n  margin-left: -5px;\\n  border: 5px solid rgba(0, 0, 0, 0);\\n  border-bottom-color: rgba(0, 0, 0, 0.73);\\n}\\n.w-e-menu-tooltip-item-wrapper {\\n  font-size: 14px;\\n  margin: 0 5px;\\n}\\n\", \"\"]);\n// Exports\nmodule.exports = exports;\n\n\n/***/ }),\n/* 162 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar api = __webpack_require__(21);\n            var content = __webpack_require__(163);\n\n            content = content.__esModule ? content.default : content;\n\n            if (typeof content === 'string') {\n              content = [[module.i, content, '']];\n            }\n\nvar options = {};\n\noptions.insert = \"head\";\noptions.singleton = false;\n\nvar update = api(content, options);\n\n\n\nmodule.exports = content.locals || {};\n\n/***/ }),\n/* 163 */\n/***/ (function(module, exports, __webpack_require__) {\n\n// Imports\nvar ___CSS_LOADER_API_IMPORT___ = __webpack_require__(22);\nexports = ___CSS_LOADER_API_IMPORT___(false);\n// Module\nexports.push([module.i, \".w-e-text-container {\\n  position: relative;\\n  height: 100%;\\n}\\n.w-e-text-container .w-e-progress {\\n  position: absolute;\\n  background-color: #1e88e5;\\n  top: 0;\\n  left: 0;\\n  height: 1px;\\n}\\n.w-e-text-container .placeholder {\\n  color: #D4D4D4;\\n  position: absolute;\\n  font-size: 11pt;\\n  line-height: 22px;\\n  left: 10px;\\n  top: 10px;\\n  -webkit-user-select: none;\\n     -moz-user-select: none;\\n      -ms-user-select: none;\\n          user-select: none;\\n  z-index: -1;\\n}\\n.w-e-text {\\n  padding: 0 10px;\\n  overflow-y: auto;\\n}\\n.w-e-text p,\\n.w-e-text h1,\\n.w-e-text h2,\\n.w-e-text h3,\\n.w-e-text h4,\\n.w-e-text h5,\\n.w-e-text table,\\n.w-e-text pre {\\n  margin: 10px 0;\\n  line-height: 1.5;\\n}\\n.w-e-text ul,\\n.w-e-text ol {\\n  margin: 10px 0 10px 20px;\\n}\\n.w-e-text blockquote {\\n  display: block;\\n  border-left: 8px solid #d0e5f2;\\n  padding: 5px 10px;\\n  margin: 10px 0;\\n  line-height: 1.4;\\n  font-size: 100%;\\n  background-color: #f1f1f1;\\n}\\n.w-e-text code {\\n  display: inline-block;\\n  background-color: #f1f1f1;\\n  border-radius: 3px;\\n  padding: 3px 5px;\\n  margin: 0 3px;\\n}\\n.w-e-text pre code {\\n  display: block;\\n}\\n.w-e-text table {\\n  border-top: 1px solid #ccc;\\n  border-left: 1px solid #ccc;\\n}\\n.w-e-text table td,\\n.w-e-text table th {\\n  border-bottom: 1px solid #ccc;\\n  border-right: 1px solid #ccc;\\n  padding: 3px 5px;\\n  min-height: 30px;\\n}\\n.w-e-text table th {\\n  border-bottom: 2px solid #ccc;\\n  text-align: center;\\n  background-color: #f1f1f1;\\n}\\n.w-e-text:focus {\\n  outline: none;\\n}\\n.w-e-text img {\\n  cursor: pointer;\\n}\\n.w-e-text img:hover {\\n  box-shadow: 0 0 5px #333;\\n}\\n.w-e-text .w-e-todo {\\n  margin: 0 0 0 20px;\\n}\\n.w-e-text .w-e-todo li {\\n  list-style: none;\\n  font-size: 1em;\\n}\\n.w-e-text .w-e-todo li span:nth-child(1) {\\n  position: relative;\\n  left: -18px;\\n}\\n.w-e-text .w-e-todo li span:nth-child(1) input {\\n  position: absolute;\\n  margin-right: 3px;\\n}\\n.w-e-text .w-e-todo li span:nth-child(1) input[type=checkbox] {\\n  top: 50%;\\n  margin-top: -6px;\\n}\\n.w-e-tooltip {\\n  position: absolute;\\n  display: flex;\\n  color: #f1f1f1;\\n  background-color: rgba(0, 0, 0, 0.75);\\n  box-shadow: 0 2px 8px 0 rgba(0, 0, 0, 0.15);\\n  border-radius: 4px;\\n  padding: 4px 5px 6px;\\n  justify-content: center;\\n  align-items: center;\\n}\\n.w-e-tooltip-up::after {\\n  content: \\\"\\\";\\n  position: absolute;\\n  top: 100%;\\n  left: 50%;\\n  margin-left: -5px;\\n  border: 5px solid rgba(0, 0, 0, 0);\\n  border-top-color: rgba(0, 0, 0, 0.73);\\n}\\n.w-e-tooltip-down::after {\\n  content: \\\"\\\";\\n  position: absolute;\\n  bottom: 100%;\\n  left: 50%;\\n  margin-left: -5px;\\n  border: 5px solid rgba(0, 0, 0, 0);\\n  border-bottom-color: rgba(0, 0, 0, 0.73);\\n}\\n.w-e-tooltip-item-wrapper {\\n  cursor: pointer;\\n  font-size: 14px;\\n  margin: 0 5px;\\n}\\n.w-e-tooltip-item-wrapper:hover {\\n  color: #ccc;\\n  text-decoration: underline;\\n}\\n\", \"\"]);\n// Exports\nmodule.exports = exports;\n\n\n/***/ }),\n/* 164 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar api = __webpack_require__(21);\n            var content = __webpack_require__(165);\n\n            content = content.__esModule ? content.default : content;\n\n            if (typeof content === 'string') {\n              content = [[module.i, content, '']];\n            }\n\nvar options = {};\n\noptions.insert = \"head\";\noptions.singleton = false;\n\nvar update = api(content, options);\n\n\n\nmodule.exports = content.locals || {};\n\n/***/ }),\n/* 165 */\n/***/ (function(module, exports, __webpack_require__) {\n\n// Imports\nvar ___CSS_LOADER_API_IMPORT___ = __webpack_require__(22);\nexports = ___CSS_LOADER_API_IMPORT___(false);\n// Module\nexports.push([module.i, \".w-e-menu .w-e-panel-container {\\n  position: absolute;\\n  top: 0;\\n  left: 50%;\\n  border: 1px solid #ccc;\\n  border-top: 0;\\n  box-shadow: 1px 1px 2px #ccc;\\n  color: #333;\\n  background-color: #fff;\\n  text-align: left;\\n  /* 为 emotion panel 定制的样式 */\\n  /* 上传图片、上传视频的 panel 定制样式 */\\n}\\n.w-e-menu .w-e-panel-container .w-e-panel-close {\\n  position: absolute;\\n  right: 0;\\n  top: 0;\\n  padding: 5px;\\n  margin: 2px 5px 0 0;\\n  cursor: pointer;\\n  color: #999;\\n}\\n.w-e-menu .w-e-panel-container .w-e-panel-close:hover {\\n  color: #333;\\n}\\n.w-e-menu .w-e-panel-container .w-e-panel-tab-title {\\n  list-style: none;\\n  display: flex;\\n  font-size: 14px;\\n  margin: 2px 10px 0 10px;\\n  border-bottom: 1px solid #f1f1f1;\\n}\\n.w-e-menu .w-e-panel-container .w-e-panel-tab-title .w-e-item {\\n  padding: 3px 5px;\\n  color: #999;\\n  cursor: pointer;\\n  margin: 0 3px;\\n  position: relative;\\n  top: 1px;\\n}\\n.w-e-menu .w-e-panel-container .w-e-panel-tab-title .w-e-active {\\n  color: #333;\\n  border-bottom: 1px solid #333;\\n  cursor: default;\\n  font-weight: 700;\\n}\\n.w-e-menu .w-e-panel-container .w-e-panel-tab-content {\\n  padding: 10px 15px 10px 15px;\\n  font-size: 16px;\\n  /* 输入框的样式 */\\n  /* 按钮的样式 */\\n}\\n.w-e-menu .w-e-panel-container .w-e-panel-tab-content input:focus,\\n.w-e-menu .w-e-panel-container .w-e-panel-tab-content textarea:focus,\\n.w-e-menu .w-e-panel-container .w-e-panel-tab-content button:focus {\\n  outline: none;\\n}\\n.w-e-menu .w-e-panel-container .w-e-panel-tab-content textarea {\\n  width: 100%;\\n  border: 1px solid #ccc;\\n  padding: 5px;\\n  margin-top: 10px;\\n}\\n.w-e-menu .w-e-panel-container .w-e-panel-tab-content textarea:focus {\\n  border-color: #1e88e5;\\n}\\n.w-e-menu .w-e-panel-container .w-e-panel-tab-content input[type=text] {\\n  border: none;\\n  border-bottom: 1px solid #ccc;\\n  font-size: 14px;\\n  height: 20px;\\n  color: #333;\\n  text-align: left;\\n}\\n.w-e-menu .w-e-panel-container .w-e-panel-tab-content input[type=text].small {\\n  width: 30px;\\n  text-align: center;\\n}\\n.w-e-menu .w-e-panel-container .w-e-panel-tab-content input[type=text].block {\\n  display: block;\\n  width: 100%;\\n  margin: 10px 0;\\n}\\n.w-e-menu .w-e-panel-container .w-e-panel-tab-content input[type=text]:focus {\\n  border-bottom: 2px solid #1e88e5;\\n}\\n.w-e-menu .w-e-panel-container .w-e-panel-tab-content .w-e-button-container button {\\n  font-size: 14px;\\n  color: #1e88e5;\\n  border: none;\\n  padding: 5px 10px;\\n  background-color: #fff;\\n  cursor: pointer;\\n  border-radius: 3px;\\n}\\n.w-e-menu .w-e-panel-container .w-e-panel-tab-content .w-e-button-container button.left {\\n  float: left;\\n  margin-right: 10px;\\n}\\n.w-e-menu .w-e-panel-container .w-e-panel-tab-content .w-e-button-container button.right {\\n  float: right;\\n  margin-left: 10px;\\n}\\n.w-e-menu .w-e-panel-container .w-e-panel-tab-content .w-e-button-container button.gray {\\n  color: #999;\\n}\\n.w-e-menu .w-e-panel-container .w-e-panel-tab-content .w-e-button-container button.red {\\n  color: #c24f4a;\\n}\\n.w-e-menu .w-e-panel-container .w-e-panel-tab-content .w-e-button-container button:hover {\\n  background-color: #f1f1f1;\\n}\\n.w-e-menu .w-e-panel-container .w-e-panel-tab-content .w-e-button-container:after {\\n  content: \\\"\\\";\\n  display: table;\\n  clear: both;\\n}\\n.w-e-menu .w-e-panel-container .w-e-emoticon-container .w-e-item {\\n  cursor: pointer;\\n  font-size: 18px;\\n  padding: 0 3px;\\n  display: inline-block;\\n}\\n.w-e-menu .w-e-panel-container .w-e-up-img-container,\\n.w-e-menu .w-e-panel-container .w-e-up-video-container {\\n  text-align: center;\\n}\\n.w-e-menu .w-e-panel-container .w-e-up-img-container .w-e-up-btn,\\n.w-e-menu .w-e-panel-container .w-e-up-video-container .w-e-up-btn {\\n  display: inline-block;\\n  color: #999;\\n  cursor: pointer;\\n  font-size: 60px;\\n  line-height: 1;\\n}\\n.w-e-menu .w-e-panel-container .w-e-up-img-container .w-e-up-btn:hover,\\n.w-e-menu .w-e-panel-container .w-e-up-video-container .w-e-up-btn:hover {\\n  color: #333;\\n}\\n\", \"\"]);\n// Exports\nmodule.exports = exports;\n\n\n/***/ }),\n/* 166 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar api = __webpack_require__(21);\n            var content = __webpack_require__(167);\n\n            content = content.__esModule ? content.default : content;\n\n            if (typeof content === 'string') {\n              content = [[module.i, content, '']];\n            }\n\nvar options = {};\n\noptions.insert = \"head\";\noptions.singleton = false;\n\nvar update = api(content, options);\n\n\n\nmodule.exports = content.locals || {};\n\n/***/ }),\n/* 167 */\n/***/ (function(module, exports, __webpack_require__) {\n\n// Imports\nvar ___CSS_LOADER_API_IMPORT___ = __webpack_require__(22);\nexports = ___CSS_LOADER_API_IMPORT___(false);\n// Module\nexports.push([module.i, \".w-e-toolbar .w-e-droplist {\\n  position: absolute;\\n  left: 0;\\n  top: 0;\\n  background-color: #fff;\\n  border: 1px solid #f1f1f1;\\n  border-right-color: #ccc;\\n  border-bottom-color: #ccc;\\n}\\n.w-e-toolbar .w-e-droplist .w-e-dp-title {\\n  text-align: center;\\n  color: #999;\\n  line-height: 2;\\n  border-bottom: 1px solid #f1f1f1;\\n  font-size: 13px;\\n}\\n.w-e-toolbar .w-e-droplist ul.w-e-list {\\n  list-style: none;\\n  line-height: 1;\\n}\\n.w-e-toolbar .w-e-droplist ul.w-e-list li.w-e-item {\\n  color: #333;\\n  padding: 5px 0;\\n}\\n.w-e-toolbar .w-e-droplist ul.w-e-list li.w-e-item:hover {\\n  background-color: #f1f1f1;\\n}\\n.w-e-toolbar .w-e-droplist ul.w-e-block {\\n  list-style: none;\\n  text-align: left;\\n  padding: 5px;\\n}\\n.w-e-toolbar .w-e-droplist ul.w-e-block li.w-e-item {\\n  display: inline-block;\\n  padding: 3px 5px;\\n}\\n.w-e-toolbar .w-e-droplist ul.w-e-block li.w-e-item:hover {\\n  background-color: #f1f1f1;\\n}\\n\", \"\"]);\n// Exports\nmodule.exports = exports;\n\n\n/***/ }),\n/* 168 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * @description polyfill 【注意，js 语法的兼容，都通过 babel transform runtime 支持】\n * @author wangfupeng\n */\n\nvar _interopRequireDefault = __webpack_require__(0);\n\nvar _promise = _interopRequireDefault(__webpack_require__(169));\n\nif (!Element.prototype.matches) {\n  Element.prototype.matches = function (s) {\n    var matches = this.ownerDocument.querySelectorAll(s);\n    var i = matches.length;\n\n    for (i; i >= 0; i--) {\n      if (matches.item(i) === this) break;\n    }\n\n    return i > -1;\n  };\n} // 有的第三方库需要原生 Promise ，而 IE11 又没有原生 Promise ，就报错\n\n\nif (!_promise[\"default\"]) {\n  window.Promise = _promise[\"default\"];\n}\n\n/***/ }),\n/* 169 */\n/***/ (function(module, exports, __webpack_require__) {\n\nmodule.exports = __webpack_require__(170);\n\n/***/ }),\n/* 170 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar parent = __webpack_require__(171);\n__webpack_require__(45);\n\nmodule.exports = parent;\n\n\n/***/ }),\n/* 171 */\n/***/ (function(module, exports, __webpack_require__) {\n\n__webpack_require__(172);\n__webpack_require__(55);\n__webpack_require__(57);\n__webpack_require__(179);\n__webpack_require__(185);\n__webpack_require__(186);\n__webpack_require__(187);\n__webpack_require__(58);\nvar path = __webpack_require__(11);\n\nmodule.exports = path.Promise;\n\n\n/***/ }),\n/* 172 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar $ = __webpack_require__(5);\nvar getPrototypeOf = __webpack_require__(83);\nvar setPrototypeOf = __webpack_require__(84);\nvar create = __webpack_require__(69);\nvar createNonEnumerableProperty = __webpack_require__(19);\nvar createPropertyDescriptor = __webpack_require__(38);\nvar iterate = __webpack_require__(41);\nvar toString = __webpack_require__(30);\n\nvar $AggregateError = function AggregateError(errors, message) {\n  var that = this;\n  if (!(that instanceof $AggregateError)) return new $AggregateError(errors, message);\n  if (setPrototypeOf) {\n    // eslint-disable-next-line unicorn/error-message -- expected\n    that = setPrototypeOf(new Error(undefined), getPrototypeOf(that));\n  }\n  if (message !== undefined) createNonEnumerableProperty(that, 'message', toString(message));\n  var errorsArray = [];\n  iterate(errors, errorsArray.push, { that: errorsArray });\n  createNonEnumerableProperty(that, 'errors', errorsArray);\n  return that;\n};\n\n$AggregateError.prototype = create(Error.prototype, {\n  constructor: createPropertyDescriptor(5, $AggregateError),\n  message: createPropertyDescriptor(5, ''),\n  name: createPropertyDescriptor(5, 'AggregateError')\n});\n\n// `AggregateError` constructor\n// https://tc39.es/ecma262/#sec-aggregate-error-constructor\n$({ global: true }, {\n  AggregateError: $AggregateError\n});\n\n\n/***/ }),\n/* 173 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar fails = __webpack_require__(12);\n\nmodule.exports = !fails(function () {\n  function F() { /* empty */ }\n  F.prototype.constructor = null;\n  // eslint-disable-next-line es/no-object-getprototypeof -- required for testing\n  return Object.getPrototypeOf(new F()) !== F.prototype;\n});\n\n\n/***/ }),\n/* 174 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar isObject = __webpack_require__(13);\n\nmodule.exports = function (it) {\n  if (!isObject(it) && it !== null) {\n    throw TypeError(\"Can't set \" + String(it) + ' as a prototype');\n  } return it;\n};\n\n\n/***/ }),\n/* 175 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar DESCRIPTORS = __webpack_require__(15);\nvar definePropertyModule = __webpack_require__(18);\nvar anObject = __webpack_require__(20);\nvar objectKeys = __webpack_require__(53);\n\n// `Object.defineProperties` method\n// https://tc39.es/ecma262/#sec-object.defineproperties\n// eslint-disable-next-line es/no-object-defineproperties -- safe\nmodule.exports = DESCRIPTORS ? Object.defineProperties : function defineProperties(O, Properties) {\n  anObject(O);\n  var keys = objectKeys(Properties);\n  var length = keys.length;\n  var index = 0;\n  var key;\n  while (length > index) definePropertyModule.f(O, key = keys[index++], Properties[key]);\n  return O;\n};\n\n\n/***/ }),\n/* 176 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar global = __webpack_require__(8);\nvar inspectSource = __webpack_require__(115);\n\nvar WeakMap = global.WeakMap;\n\nmodule.exports = typeof WeakMap === 'function' && /native code/.test(inspectSource(WeakMap));\n\n\n/***/ }),\n/* 177 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar IteratorPrototype = __webpack_require__(116).IteratorPrototype;\nvar create = __webpack_require__(69);\nvar createPropertyDescriptor = __webpack_require__(38);\nvar setToStringTag = __webpack_require__(44);\nvar Iterators = __webpack_require__(42);\n\nvar returnThis = function () { return this; };\n\nmodule.exports = function (IteratorConstructor, NAME, next) {\n  var TO_STRING_TAG = NAME + ' Iterator';\n  IteratorConstructor.prototype = create(IteratorPrototype, { next: createPropertyDescriptor(1, next) });\n  setToStringTag(IteratorConstructor, TO_STRING_TAG, false, true);\n  Iterators[TO_STRING_TAG] = returnThis;\n  return IteratorConstructor;\n};\n\n\n/***/ }),\n/* 178 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar TO_STRING_TAG_SUPPORT = __webpack_require__(88);\nvar classof = __webpack_require__(71);\n\n// `Object.prototype.toString` method implementation\n// https://tc39.es/ecma262/#sec-object.prototype.tostring\nmodule.exports = TO_STRING_TAG_SUPPORT ? {}.toString : function toString() {\n  return '[object ' + classof(this) + ']';\n};\n\n\n/***/ }),\n/* 179 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar $ = __webpack_require__(5);\nvar IS_PURE = __webpack_require__(39);\nvar global = __webpack_require__(8);\nvar getBuiltIn = __webpack_require__(25);\nvar NativePromise = __webpack_require__(117);\nvar redefine = __webpack_require__(56);\nvar redefineAll = __webpack_require__(118);\nvar setPrototypeOf = __webpack_require__(84);\nvar setToStringTag = __webpack_require__(44);\nvar setSpecies = __webpack_require__(119);\nvar isObject = __webpack_require__(13);\nvar aFunction = __webpack_require__(34);\nvar anInstance = __webpack_require__(91);\nvar inspectSource = __webpack_require__(115);\nvar iterate = __webpack_require__(41);\nvar checkCorrectnessOfIteration = __webpack_require__(120);\nvar speciesConstructor = __webpack_require__(121);\nvar task = __webpack_require__(122).set;\nvar microtask = __webpack_require__(180);\nvar promiseResolve = __webpack_require__(124);\nvar hostReportErrors = __webpack_require__(183);\nvar newPromiseCapabilityModule = __webpack_require__(72);\nvar perform = __webpack_require__(93);\nvar InternalStateModule = __webpack_require__(43);\nvar isForced = __webpack_require__(109);\nvar wellKnownSymbol = __webpack_require__(9);\nvar IS_BROWSER = __webpack_require__(184);\nvar IS_NODE = __webpack_require__(92);\nvar V8_VERSION = __webpack_require__(66);\n\nvar SPECIES = wellKnownSymbol('species');\nvar PROMISE = 'Promise';\nvar getInternalState = InternalStateModule.get;\nvar setInternalState = InternalStateModule.set;\nvar getInternalPromiseState = InternalStateModule.getterFor(PROMISE);\nvar NativePromisePrototype = NativePromise && NativePromise.prototype;\nvar PromiseConstructor = NativePromise;\nvar PromiseConstructorPrototype = NativePromisePrototype;\nvar TypeError = global.TypeError;\nvar document = global.document;\nvar process = global.process;\nvar newPromiseCapability = newPromiseCapabilityModule.f;\nvar newGenericPromiseCapability = newPromiseCapability;\nvar DISPATCH_EVENT = !!(document && document.createEvent && global.dispatchEvent);\nvar NATIVE_REJECTION_EVENT = typeof PromiseRejectionEvent == 'function';\nvar UNHANDLED_REJECTION = 'unhandledrejection';\nvar REJECTION_HANDLED = 'rejectionhandled';\nvar PENDING = 0;\nvar FULFILLED = 1;\nvar REJECTED = 2;\nvar HANDLED = 1;\nvar UNHANDLED = 2;\nvar SUBCLASSING = false;\nvar Internal, OwnPromiseCapability, PromiseWrapper, nativeThen;\n\nvar FORCED = isForced(PROMISE, function () {\n  var PROMISE_CONSTRUCTOR_SOURCE = inspectSource(PromiseConstructor);\n  var GLOBAL_CORE_JS_PROMISE = PROMISE_CONSTRUCTOR_SOURCE !== String(PromiseConstructor);\n  // V8 6.6 (Node 10 and Chrome 66) have a bug with resolving custom thenables\n  // https://bugs.chromium.org/p/chromium/issues/detail?id=830565\n  // We can't detect it synchronously, so just check versions\n  if (!GLOBAL_CORE_JS_PROMISE && V8_VERSION === 66) return true;\n  // We need Promise#finally in the pure version for preventing prototype pollution\n  if (IS_PURE && !PromiseConstructorPrototype['finally']) return true;\n  // We can't use @@species feature detection in V8 since it causes\n  // deoptimization and performance degradation\n  // https://github.com/zloirock/core-js/issues/679\n  if (V8_VERSION >= 51 && /native code/.test(PROMISE_CONSTRUCTOR_SOURCE)) return false;\n  // Detect correctness of subclassing with @@species support\n  var promise = new PromiseConstructor(function (resolve) { resolve(1); });\n  var FakePromise = function (exec) {\n    exec(function () { /* empty */ }, function () { /* empty */ });\n  };\n  var constructor = promise.constructor = {};\n  constructor[SPECIES] = FakePromise;\n  SUBCLASSING = promise.then(function () { /* empty */ }) instanceof FakePromise;\n  if (!SUBCLASSING) return true;\n  // Unhandled rejections tracking support, NodeJS Promise without it fails @@species test\n  return !GLOBAL_CORE_JS_PROMISE && IS_BROWSER && !NATIVE_REJECTION_EVENT;\n});\n\nvar INCORRECT_ITERATION = FORCED || !checkCorrectnessOfIteration(function (iterable) {\n  PromiseConstructor.all(iterable)['catch'](function () { /* empty */ });\n});\n\n// helpers\nvar isThenable = function (it) {\n  var then;\n  return isObject(it) && typeof (then = it.then) == 'function' ? then : false;\n};\n\nvar notify = function (state, isReject) {\n  if (state.notified) return;\n  state.notified = true;\n  var chain = state.reactions;\n  microtask(function () {\n    var value = state.value;\n    var ok = state.state == FULFILLED;\n    var index = 0;\n    // variable length - can't use forEach\n    while (chain.length > index) {\n      var reaction = chain[index++];\n      var handler = ok ? reaction.ok : reaction.fail;\n      var resolve = reaction.resolve;\n      var reject = reaction.reject;\n      var domain = reaction.domain;\n      var result, then, exited;\n      try {\n        if (handler) {\n          if (!ok) {\n            if (state.rejection === UNHANDLED) onHandleUnhandled(state);\n            state.rejection = HANDLED;\n          }\n          if (handler === true) result = value;\n          else {\n            if (domain) domain.enter();\n            result = handler(value); // can throw\n            if (domain) {\n              domain.exit();\n              exited = true;\n            }\n          }\n          if (result === reaction.promise) {\n            reject(TypeError('Promise-chain cycle'));\n          } else if (then = isThenable(result)) {\n            then.call(result, resolve, reject);\n          } else resolve(result);\n        } else reject(value);\n      } catch (error) {\n        if (domain && !exited) domain.exit();\n        reject(error);\n      }\n    }\n    state.reactions = [];\n    state.notified = false;\n    if (isReject && !state.rejection) onUnhandled(state);\n  });\n};\n\nvar dispatchEvent = function (name, promise, reason) {\n  var event, handler;\n  if (DISPATCH_EVENT) {\n    event = document.createEvent('Event');\n    event.promise = promise;\n    event.reason = reason;\n    event.initEvent(name, false, true);\n    global.dispatchEvent(event);\n  } else event = { promise: promise, reason: reason };\n  if (!NATIVE_REJECTION_EVENT && (handler = global['on' + name])) handler(event);\n  else if (name === UNHANDLED_REJECTION) hostReportErrors('Unhandled promise rejection', reason);\n};\n\nvar onUnhandled = function (state) {\n  task.call(global, function () {\n    var promise = state.facade;\n    var value = state.value;\n    var IS_UNHANDLED = isUnhandled(state);\n    var result;\n    if (IS_UNHANDLED) {\n      result = perform(function () {\n        if (IS_NODE) {\n          process.emit('unhandledRejection', value, promise);\n        } else dispatchEvent(UNHANDLED_REJECTION, promise, value);\n      });\n      // Browsers should not trigger `rejectionHandled` event if it was handled here, NodeJS - should\n      state.rejection = IS_NODE || isUnhandled(state) ? UNHANDLED : HANDLED;\n      if (result.error) throw result.value;\n    }\n  });\n};\n\nvar isUnhandled = function (state) {\n  return state.rejection !== HANDLED && !state.parent;\n};\n\nvar onHandleUnhandled = function (state) {\n  task.call(global, function () {\n    var promise = state.facade;\n    if (IS_NODE) {\n      process.emit('rejectionHandled', promise);\n    } else dispatchEvent(REJECTION_HANDLED, promise, state.value);\n  });\n};\n\nvar bind = function (fn, state, unwrap) {\n  return function (value) {\n    fn(state, value, unwrap);\n  };\n};\n\nvar internalReject = function (state, value, unwrap) {\n  if (state.done) return;\n  state.done = true;\n  if (unwrap) state = unwrap;\n  state.value = value;\n  state.state = REJECTED;\n  notify(state, true);\n};\n\nvar internalResolve = function (state, value, unwrap) {\n  if (state.done) return;\n  state.done = true;\n  if (unwrap) state = unwrap;\n  try {\n    if (state.facade === value) throw TypeError(\"Promise can't be resolved itself\");\n    var then = isThenable(value);\n    if (then) {\n      microtask(function () {\n        var wrapper = { done: false };\n        try {\n          then.call(value,\n            bind(internalResolve, wrapper, state),\n            bind(internalReject, wrapper, state)\n          );\n        } catch (error) {\n          internalReject(wrapper, error, state);\n        }\n      });\n    } else {\n      state.value = value;\n      state.state = FULFILLED;\n      notify(state, false);\n    }\n  } catch (error) {\n    internalReject({ done: false }, error, state);\n  }\n};\n\n// constructor polyfill\nif (FORCED) {\n  // 25.4.3.1 Promise(executor)\n  PromiseConstructor = function Promise(executor) {\n    anInstance(this, PromiseConstructor, PROMISE);\n    aFunction(executor);\n    Internal.call(this);\n    var state = getInternalState(this);\n    try {\n      executor(bind(internalResolve, state), bind(internalReject, state));\n    } catch (error) {\n      internalReject(state, error);\n    }\n  };\n  PromiseConstructorPrototype = PromiseConstructor.prototype;\n  // eslint-disable-next-line no-unused-vars -- required for `.length`\n  Internal = function Promise(executor) {\n    setInternalState(this, {\n      type: PROMISE,\n      done: false,\n      notified: false,\n      parent: false,\n      reactions: [],\n      rejection: false,\n      state: PENDING,\n      value: undefined\n    });\n  };\n  Internal.prototype = redefineAll(PromiseConstructorPrototype, {\n    // `Promise.prototype.then` method\n    // https://tc39.es/ecma262/#sec-promise.prototype.then\n    then: function then(onFulfilled, onRejected) {\n      var state = getInternalPromiseState(this);\n      var reaction = newPromiseCapability(speciesConstructor(this, PromiseConstructor));\n      reaction.ok = typeof onFulfilled == 'function' ? onFulfilled : true;\n      reaction.fail = typeof onRejected == 'function' && onRejected;\n      reaction.domain = IS_NODE ? process.domain : undefined;\n      state.parent = true;\n      state.reactions.push(reaction);\n      if (state.state != PENDING) notify(state, false);\n      return reaction.promise;\n    },\n    // `Promise.prototype.catch` method\n    // https://tc39.es/ecma262/#sec-promise.prototype.catch\n    'catch': function (onRejected) {\n      return this.then(undefined, onRejected);\n    }\n  });\n  OwnPromiseCapability = function () {\n    var promise = new Internal();\n    var state = getInternalState(promise);\n    this.promise = promise;\n    this.resolve = bind(internalResolve, state);\n    this.reject = bind(internalReject, state);\n  };\n  newPromiseCapabilityModule.f = newPromiseCapability = function (C) {\n    return C === PromiseConstructor || C === PromiseWrapper\n      ? new OwnPromiseCapability(C)\n      : newGenericPromiseCapability(C);\n  };\n\n  if (!IS_PURE && typeof NativePromise == 'function' && NativePromisePrototype !== Object.prototype) {\n    nativeThen = NativePromisePrototype.then;\n\n    if (!SUBCLASSING) {\n      // make `Promise#then` return a polyfilled `Promise` for native promise-based APIs\n      redefine(NativePromisePrototype, 'then', function then(onFulfilled, onRejected) {\n        var that = this;\n        return new PromiseConstructor(function (resolve, reject) {\n          nativeThen.call(that, resolve, reject);\n        }).then(onFulfilled, onRejected);\n      // https://github.com/zloirock/core-js/issues/640\n      }, { unsafe: true });\n\n      // makes sure that native promise-based APIs `Promise#catch` properly works with patched `Promise#then`\n      redefine(NativePromisePrototype, 'catch', PromiseConstructorPrototype['catch'], { unsafe: true });\n    }\n\n    // make `.constructor === Promise` work for native promise-based APIs\n    try {\n      delete NativePromisePrototype.constructor;\n    } catch (error) { /* empty */ }\n\n    // make `instanceof Promise` work for native promise-based APIs\n    if (setPrototypeOf) {\n      setPrototypeOf(NativePromisePrototype, PromiseConstructorPrototype);\n    }\n  }\n}\n\n$({ global: true, wrap: true, forced: FORCED }, {\n  Promise: PromiseConstructor\n});\n\nsetToStringTag(PromiseConstructor, PROMISE, false, true);\nsetSpecies(PROMISE);\n\nPromiseWrapper = getBuiltIn(PROMISE);\n\n// statics\n$({ target: PROMISE, stat: true, forced: FORCED }, {\n  // `Promise.reject` method\n  // https://tc39.es/ecma262/#sec-promise.reject\n  reject: function reject(r) {\n    var capability = newPromiseCapability(this);\n    capability.reject.call(undefined, r);\n    return capability.promise;\n  }\n});\n\n$({ target: PROMISE, stat: true, forced: IS_PURE || FORCED }, {\n  // `Promise.resolve` method\n  // https://tc39.es/ecma262/#sec-promise.resolve\n  resolve: function resolve(x) {\n    return promiseResolve(IS_PURE && this === PromiseWrapper ? PromiseConstructor : this, x);\n  }\n});\n\n$({ target: PROMISE, stat: true, forced: INCORRECT_ITERATION }, {\n  // `Promise.all` method\n  // https://tc39.es/ecma262/#sec-promise.all\n  all: function all(iterable) {\n    var C = this;\n    var capability = newPromiseCapability(C);\n    var resolve = capability.resolve;\n    var reject = capability.reject;\n    var result = perform(function () {\n      var $promiseResolve = aFunction(C.resolve);\n      var values = [];\n      var counter = 0;\n      var remaining = 1;\n      iterate(iterable, function (promise) {\n        var index = counter++;\n        var alreadyCalled = false;\n        values.push(undefined);\n        remaining++;\n        $promiseResolve.call(C, promise).then(function (value) {\n          if (alreadyCalled) return;\n          alreadyCalled = true;\n          values[index] = value;\n          --remaining || resolve(values);\n        }, reject);\n      });\n      --remaining || resolve(values);\n    });\n    if (result.error) reject(result.value);\n    return capability.promise;\n  },\n  // `Promise.race` method\n  // https://tc39.es/ecma262/#sec-promise.race\n  race: function race(iterable) {\n    var C = this;\n    var capability = newPromiseCapability(C);\n    var reject = capability.reject;\n    var result = perform(function () {\n      var $promiseResolve = aFunction(C.resolve);\n      iterate(iterable, function (promise) {\n        $promiseResolve.call(C, promise).then(capability.resolve, reject);\n      });\n    });\n    if (result.error) reject(result.value);\n    return capability.promise;\n  }\n});\n\n\n/***/ }),\n/* 180 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar global = __webpack_require__(8);\nvar getOwnPropertyDescriptor = __webpack_require__(77).f;\nvar macrotask = __webpack_require__(122).set;\nvar IS_IOS = __webpack_require__(123);\nvar IS_IOS_PEBBLE = __webpack_require__(181);\nvar IS_WEBOS_WEBKIT = __webpack_require__(182);\nvar IS_NODE = __webpack_require__(92);\n\nvar MutationObserver = global.MutationObserver || global.WebKitMutationObserver;\nvar document = global.document;\nvar process = global.process;\nvar Promise = global.Promise;\n// Node.js 11 shows ExperimentalWarning on getting `queueMicrotask`\nvar queueMicrotaskDescriptor = getOwnPropertyDescriptor(global, 'queueMicrotask');\nvar queueMicrotask = queueMicrotaskDescriptor && queueMicrotaskDescriptor.value;\n\nvar flush, head, last, notify, toggle, node, promise, then;\n\n// modern engines have queueMicrotask method\nif (!queueMicrotask) {\n  flush = function () {\n    var parent, fn;\n    if (IS_NODE && (parent = process.domain)) parent.exit();\n    while (head) {\n      fn = head.fn;\n      head = head.next;\n      try {\n        fn();\n      } catch (error) {\n        if (head) notify();\n        else last = undefined;\n        throw error;\n      }\n    } last = undefined;\n    if (parent) parent.enter();\n  };\n\n  // browsers with MutationObserver, except iOS - https://github.com/zloirock/core-js/issues/339\n  // also except WebOS Webkit https://github.com/zloirock/core-js/issues/898\n  if (!IS_IOS && !IS_NODE && !IS_WEBOS_WEBKIT && MutationObserver && document) {\n    toggle = true;\n    node = document.createTextNode('');\n    new MutationObserver(flush).observe(node, { characterData: true });\n    notify = function () {\n      node.data = toggle = !toggle;\n    };\n  // environments with maybe non-completely correct, but existent Promise\n  } else if (!IS_IOS_PEBBLE && Promise && Promise.resolve) {\n    // Promise.resolve without an argument throws an error in LG WebOS 2\n    promise = Promise.resolve(undefined);\n    // workaround of WebKit ~ iOS Safari 10.1 bug\n    promise.constructor = Promise;\n    then = promise.then;\n    notify = function () {\n      then.call(promise, flush);\n    };\n  // Node.js without promises\n  } else if (IS_NODE) {\n    notify = function () {\n      process.nextTick(flush);\n    };\n  // for other environments - macrotask based on:\n  // - setImmediate\n  // - MessageChannel\n  // - window.postMessag\n  // - onreadystatechange\n  // - setTimeout\n  } else {\n    notify = function () {\n      // strange IE + webpack dev server bug - use .call(global)\n      macrotask.call(global, flush);\n    };\n  }\n}\n\nmodule.exports = queueMicrotask || function (fn) {\n  var task = { fn: fn, next: undefined };\n  if (last) last.next = task;\n  if (!head) {\n    head = task;\n    notify();\n  } last = task;\n};\n\n\n/***/ }),\n/* 181 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar userAgent = __webpack_require__(52);\nvar global = __webpack_require__(8);\n\nmodule.exports = /ipad|iphone|ipod/i.test(userAgent) && global.Pebble !== undefined;\n\n\n/***/ }),\n/* 182 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar userAgent = __webpack_require__(52);\n\nmodule.exports = /web0s(?!.*chrome)/i.test(userAgent);\n\n\n/***/ }),\n/* 183 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar global = __webpack_require__(8);\n\nmodule.exports = function (a, b) {\n  var console = global.console;\n  if (console && console.error) {\n    arguments.length === 1 ? console.error(a) : console.error(a, b);\n  }\n};\n\n\n/***/ }),\n/* 184 */\n/***/ (function(module, exports) {\n\nmodule.exports = typeof window == 'object';\n\n\n/***/ }),\n/* 185 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar $ = __webpack_require__(5);\nvar aFunction = __webpack_require__(34);\nvar newPromiseCapabilityModule = __webpack_require__(72);\nvar perform = __webpack_require__(93);\nvar iterate = __webpack_require__(41);\n\n// `Promise.allSettled` method\n// https://tc39.es/ecma262/#sec-promise.allsettled\n$({ target: 'Promise', stat: true }, {\n  allSettled: function allSettled(iterable) {\n    var C = this;\n    var capability = newPromiseCapabilityModule.f(C);\n    var resolve = capability.resolve;\n    var reject = capability.reject;\n    var result = perform(function () {\n      var promiseResolve = aFunction(C.resolve);\n      var values = [];\n      var counter = 0;\n      var remaining = 1;\n      iterate(iterable, function (promise) {\n        var index = counter++;\n        var alreadyCalled = false;\n        values.push(undefined);\n        remaining++;\n        promiseResolve.call(C, promise).then(function (value) {\n          if (alreadyCalled) return;\n          alreadyCalled = true;\n          values[index] = { status: 'fulfilled', value: value };\n          --remaining || resolve(values);\n        }, function (error) {\n          if (alreadyCalled) return;\n          alreadyCalled = true;\n          values[index] = { status: 'rejected', reason: error };\n          --remaining || resolve(values);\n        });\n      });\n      --remaining || resolve(values);\n    });\n    if (result.error) reject(result.value);\n    return capability.promise;\n  }\n});\n\n\n/***/ }),\n/* 186 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar $ = __webpack_require__(5);\nvar aFunction = __webpack_require__(34);\nvar getBuiltIn = __webpack_require__(25);\nvar newPromiseCapabilityModule = __webpack_require__(72);\nvar perform = __webpack_require__(93);\nvar iterate = __webpack_require__(41);\n\nvar PROMISE_ANY_ERROR = 'No one promise resolved';\n\n// `Promise.any` method\n// https://tc39.es/ecma262/#sec-promise.any\n$({ target: 'Promise', stat: true }, {\n  any: function any(iterable) {\n    var C = this;\n    var capability = newPromiseCapabilityModule.f(C);\n    var resolve = capability.resolve;\n    var reject = capability.reject;\n    var result = perform(function () {\n      var promiseResolve = aFunction(C.resolve);\n      var errors = [];\n      var counter = 0;\n      var remaining = 1;\n      var alreadyResolved = false;\n      iterate(iterable, function (promise) {\n        var index = counter++;\n        var alreadyRejected = false;\n        errors.push(undefined);\n        remaining++;\n        promiseResolve.call(C, promise).then(function (value) {\n          if (alreadyRejected || alreadyResolved) return;\n          alreadyResolved = true;\n          resolve(value);\n        }, function (error) {\n          if (alreadyRejected || alreadyResolved) return;\n          alreadyRejected = true;\n          errors[index] = error;\n          --remaining || reject(new (getBuiltIn('AggregateError'))(errors, PROMISE_ANY_ERROR));\n        });\n      });\n      --remaining || reject(new (getBuiltIn('AggregateError'))(errors, PROMISE_ANY_ERROR));\n    });\n    if (result.error) reject(result.value);\n    return capability.promise;\n  }\n});\n\n\n/***/ }),\n/* 187 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar $ = __webpack_require__(5);\nvar IS_PURE = __webpack_require__(39);\nvar NativePromise = __webpack_require__(117);\nvar fails = __webpack_require__(12);\nvar getBuiltIn = __webpack_require__(25);\nvar speciesConstructor = __webpack_require__(121);\nvar promiseResolve = __webpack_require__(124);\nvar redefine = __webpack_require__(56);\n\n// Safari bug https://bugs.webkit.org/show_bug.cgi?id=200829\nvar NON_GENERIC = !!NativePromise && fails(function () {\n  NativePromise.prototype['finally'].call({ then: function () { /* empty */ } }, function () { /* empty */ });\n});\n\n// `Promise.prototype.finally` method\n// https://tc39.es/ecma262/#sec-promise.prototype.finally\n$({ target: 'Promise', proto: true, real: true, forced: NON_GENERIC }, {\n  'finally': function (onFinally) {\n    var C = speciesConstructor(this, getBuiltIn('Promise'));\n    var isFunction = typeof onFinally == 'function';\n    return this.then(\n      isFunction ? function (x) {\n        return promiseResolve(C, onFinally()).then(function () { return x; });\n      } : onFinally,\n      isFunction ? function (e) {\n        return promiseResolve(C, onFinally()).then(function () { throw e; });\n      } : onFinally\n    );\n  }\n});\n\n// makes sure that native promise-based APIs `Promise#finally` properly works with patched `Promise#then`\nif (!IS_PURE && typeof NativePromise == 'function') {\n  var method = getBuiltIn('Promise').prototype['finally'];\n  if (NativePromise.prototype['finally'] !== method) {\n    redefine(NativePromise.prototype, 'finally', method, { unsafe: true });\n  }\n}\n\n\n/***/ }),\n/* 188 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar toInteger = __webpack_require__(70);\nvar toString = __webpack_require__(30);\nvar requireObjectCoercible = __webpack_require__(51);\n\n// `String.prototype.codePointAt` methods implementation\nvar createMethod = function (CONVERT_TO_STRING) {\n  return function ($this, pos) {\n    var S = toString(requireObjectCoercible($this));\n    var position = toInteger(pos);\n    var size = S.length;\n    var first, second;\n    if (position < 0 || position >= size) return CONVERT_TO_STRING ? '' : undefined;\n    first = S.charCodeAt(position);\n    return first < 0xD800 || first > 0xDBFF || position + 1 === size\n      || (second = S.charCodeAt(position + 1)) < 0xDC00 || second > 0xDFFF\n        ? CONVERT_TO_STRING ? S.charAt(position) : first\n        : CONVERT_TO_STRING ? S.slice(position, position + 2) : (first - 0xD800 << 10) + (second - 0xDC00) + 0x10000;\n  };\n};\n\nmodule.exports = {\n  // `String.prototype.codePointAt` method\n  // https://tc39.es/ecma262/#sec-string.prototype.codepointat\n  codeAt: createMethod(false),\n  // `String.prototype.at` method\n  // https://github.com/mathiasbynens/String.prototype.at\n  charAt: createMethod(true)\n};\n\n\n/***/ }),\n/* 189 */\n/***/ (function(module, exports) {\n\n// iterable DOM collections\n// flag - `iterable` interface - 'entries', 'keys', 'values', 'forEach' methods\nmodule.exports = {\n  CSSRuleList: 0,\n  CSSStyleDeclaration: 0,\n  CSSValueList: 0,\n  ClientRectList: 0,\n  DOMRectList: 0,\n  DOMStringList: 0,\n  DOMTokenList: 1,\n  DataTransferItemList: 0,\n  FileList: 0,\n  HTMLAllCollection: 0,\n  HTMLCollection: 0,\n  HTMLFormElement: 0,\n  HTMLSelectElement: 0,\n  MediaList: 0,\n  MimeTypeArray: 0,\n  NamedNodeMap: 0,\n  NodeList: 1,\n  PaintRequestList: 0,\n  Plugin: 0,\n  PluginArray: 0,\n  SVGLengthList: 0,\n  SVGNumberList: 0,\n  SVGPathSegList: 0,\n  SVGPointList: 0,\n  SVGStringList: 0,\n  SVGTransformList: 0,\n  SourceBufferList: 0,\n  StyleSheetList: 0,\n  TextTrackCueList: 0,\n  TextTrackList: 0,\n  TouchList: 0\n};\n\n\n/***/ }),\n/* 190 */\n/***/ (function(module, exports, __webpack_require__) {\n\n__webpack_require__(45);\nvar forEach = __webpack_require__(191);\nvar classof = __webpack_require__(71);\nvar ArrayPrototype = Array.prototype;\n\nvar DOMIterables = {\n  DOMTokenList: true,\n  NodeList: true\n};\n\nmodule.exports = function (it) {\n  var own = it.forEach;\n  return it === ArrayPrototype || (it instanceof Array && own === ArrayPrototype.forEach)\n    // eslint-disable-next-line no-prototype-builtins -- safe\n    || DOMIterables.hasOwnProperty(classof(it)) ? forEach : own;\n};\n\n\n/***/ }),\n/* 191 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar parent = __webpack_require__(192);\n\nmodule.exports = parent;\n\n\n/***/ }),\n/* 192 */\n/***/ (function(module, exports, __webpack_require__) {\n\n__webpack_require__(193);\nvar entryVirtual = __webpack_require__(14);\n\nmodule.exports = entryVirtual('Array').forEach;\n\n\n/***/ }),\n/* 193 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar $ = __webpack_require__(5);\nvar forEach = __webpack_require__(194);\n\n// `Array.prototype.forEach` method\n// https://tc39.es/ecma262/#sec-array.prototype.foreach\n// eslint-disable-next-line es/no-array-prototype-foreach -- safe\n$({ target: 'Array', proto: true, forced: [].forEach != forEach }, {\n  forEach: forEach\n});\n\n\n/***/ }),\n/* 194 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar $forEach = __webpack_require__(31).forEach;\nvar arrayMethodIsStrict = __webpack_require__(73);\n\nvar STRICT_METHOD = arrayMethodIsStrict('forEach');\n\n// `Array.prototype.forEach` method implementation\n// https://tc39.es/ecma262/#sec-array.prototype.foreach\nmodule.exports = !STRICT_METHOD ? function forEach(callbackfn /* , thisArg */) {\n  return $forEach(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n// eslint-disable-next-line es/no-array-prototype-foreach -- safe\n} : [].forEach;\n\n\n/***/ }),\n/* 195 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar isObject = __webpack_require__(13);\nvar isArray = __webpack_require__(59);\nvar wellKnownSymbol = __webpack_require__(9);\n\nvar SPECIES = wellKnownSymbol('species');\n\n// a part of `ArraySpeciesCreate` abstract operation\n// https://tc39.es/ecma262/#sec-arrayspeciescreate\nmodule.exports = function (originalArray) {\n  var C;\n  if (isArray(originalArray)) {\n    C = originalArray.constructor;\n    // cross-realm fallback\n    if (typeof C == 'function' && (C === Array || isArray(C.prototype))) C = undefined;\n    else if (isObject(C)) {\n      C = C[SPECIES];\n      if (C === null) C = undefined;\n    }\n  } return C === undefined ? Array : C;\n};\n\n\n/***/ }),\n/* 196 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar parent = __webpack_require__(197);\n\nmodule.exports = parent;\n\n\n/***/ }),\n/* 197 */\n/***/ (function(module, exports, __webpack_require__) {\n\n__webpack_require__(198);\nvar path = __webpack_require__(11);\n\nmodule.exports = path.Array.isArray;\n\n\n/***/ }),\n/* 198 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar $ = __webpack_require__(5);\nvar isArray = __webpack_require__(59);\n\n// `Array.isArray` method\n// https://tc39.es/ecma262/#sec-array.isarray\n$({ target: 'Array', stat: true }, {\n  isArray: isArray\n});\n\n\n/***/ }),\n/* 199 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar parent = __webpack_require__(200);\n\nmodule.exports = parent;\n\n\n/***/ }),\n/* 200 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar map = __webpack_require__(201);\n\nvar ArrayPrototype = Array.prototype;\n\nmodule.exports = function (it) {\n  var own = it.map;\n  return it === ArrayPrototype || (it instanceof Array && own === ArrayPrototype.map) ? map : own;\n};\n\n\n/***/ }),\n/* 201 */\n/***/ (function(module, exports, __webpack_require__) {\n\n__webpack_require__(202);\nvar entryVirtual = __webpack_require__(14);\n\nmodule.exports = entryVirtual('Array').map;\n\n\n/***/ }),\n/* 202 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar $ = __webpack_require__(5);\nvar $map = __webpack_require__(31).map;\nvar arrayMethodHasSpeciesSupport = __webpack_require__(60);\n\nvar HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('map');\n\n// `Array.prototype.map` method\n// https://tc39.es/ecma262/#sec-array.prototype.map\n// with adding support of @@species\n$({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT }, {\n  map: function map(callbackfn /* , thisArg */) {\n    return $map(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n  }\n});\n\n\n/***/ }),\n/* 203 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar parent = __webpack_require__(204);\n\nmodule.exports = parent;\n\n\n/***/ }),\n/* 204 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar trim = __webpack_require__(205);\n\nvar StringPrototype = String.prototype;\n\nmodule.exports = function (it) {\n  var own = it.trim;\n  return typeof it === 'string' || it === StringPrototype\n    || (it instanceof String && own === StringPrototype.trim) ? trim : own;\n};\n\n\n/***/ }),\n/* 205 */\n/***/ (function(module, exports, __webpack_require__) {\n\n__webpack_require__(206);\nvar entryVirtual = __webpack_require__(14);\n\nmodule.exports = entryVirtual('String').trim;\n\n\n/***/ }),\n/* 206 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar $ = __webpack_require__(5);\nvar $trim = __webpack_require__(97).trim;\nvar forcedStringTrimMethod = __webpack_require__(207);\n\n// `String.prototype.trim` method\n// https://tc39.es/ecma262/#sec-string.prototype.trim\n$({ target: 'String', proto: true, forced: forcedStringTrimMethod('trim') }, {\n  trim: function trim() {\n    return $trim(this);\n  }\n});\n\n\n/***/ }),\n/* 207 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar fails = __webpack_require__(12);\nvar whitespaces = __webpack_require__(74);\n\nvar non = '\\u200B\\u0085\\u180E';\n\n// check that a method works with the correct list\n// of whitespaces and has a correct name\nmodule.exports = function (METHOD_NAME) {\n  return fails(function () {\n    return !!whitespaces[METHOD_NAME]() || non[METHOD_NAME]() != non || whitespaces[METHOD_NAME].name !== METHOD_NAME;\n  });\n};\n\n\n/***/ }),\n/* 208 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar parent = __webpack_require__(209);\n__webpack_require__(45);\n\nmodule.exports = parent;\n\n\n/***/ }),\n/* 209 */\n/***/ (function(module, exports, __webpack_require__) {\n\n__webpack_require__(55);\n__webpack_require__(210);\n__webpack_require__(57);\n__webpack_require__(58);\nvar path = __webpack_require__(11);\n\nmodule.exports = path.Map;\n\n\n/***/ }),\n/* 210 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar collection = __webpack_require__(126);\nvar collectionStrong = __webpack_require__(129);\n\n// `Map` constructor\n// https://tc39.es/ecma262/#sec-map-objects\nmodule.exports = collection('Map', function (init) {\n  return function Map() { return init(this, arguments.length ? arguments[0] : undefined); };\n}, collectionStrong);\n\n\n/***/ }),\n/* 211 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar fails = __webpack_require__(12);\n\nmodule.exports = !fails(function () {\n  // eslint-disable-next-line es/no-object-isextensible, es/no-object-preventextensions -- required for testing\n  return Object.isExtensible(Object.preventExtensions({}));\n});\n\n\n/***/ }),\n/* 212 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar parent = __webpack_require__(213);\n\nmodule.exports = parent;\n\n\n/***/ }),\n/* 213 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar indexOf = __webpack_require__(214);\n\nvar ArrayPrototype = Array.prototype;\n\nmodule.exports = function (it) {\n  var own = it.indexOf;\n  return it === ArrayPrototype || (it instanceof Array && own === ArrayPrototype.indexOf) ? indexOf : own;\n};\n\n\n/***/ }),\n/* 214 */\n/***/ (function(module, exports, __webpack_require__) {\n\n__webpack_require__(215);\nvar entryVirtual = __webpack_require__(14);\n\nmodule.exports = entryVirtual('Array').indexOf;\n\n\n/***/ }),\n/* 215 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/* eslint-disable es/no-array-prototype-indexof -- required for testing */\nvar $ = __webpack_require__(5);\nvar $indexOf = __webpack_require__(85).indexOf;\nvar arrayMethodIsStrict = __webpack_require__(73);\n\nvar nativeIndexOf = [].indexOf;\n\nvar NEGATIVE_ZERO = !!nativeIndexOf && 1 / [1].indexOf(1, -0) < 0;\nvar STRICT_METHOD = arrayMethodIsStrict('indexOf');\n\n// `Array.prototype.indexOf` method\n// https://tc39.es/ecma262/#sec-array.prototype.indexof\n$({ target: 'Array', proto: true, forced: NEGATIVE_ZERO || !STRICT_METHOD }, {\n  indexOf: function indexOf(searchElement /* , fromIndex = 0 */) {\n    return NEGATIVE_ZERO\n      // convert -0 to +0\n      ? nativeIndexOf.apply(this, arguments) || 0\n      : $indexOf(this, searchElement, arguments.length > 1 ? arguments[1] : undefined);\n  }\n});\n\n\n/***/ }),\n/* 216 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar parent = __webpack_require__(217);\n\nmodule.exports = parent;\n\n\n/***/ }),\n/* 217 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar splice = __webpack_require__(218);\n\nvar ArrayPrototype = Array.prototype;\n\nmodule.exports = function (it) {\n  var own = it.splice;\n  return it === ArrayPrototype || (it instanceof Array && own === ArrayPrototype.splice) ? splice : own;\n};\n\n\n/***/ }),\n/* 218 */\n/***/ (function(module, exports, __webpack_require__) {\n\n__webpack_require__(219);\nvar entryVirtual = __webpack_require__(14);\n\nmodule.exports = entryVirtual('Array').splice;\n\n\n/***/ }),\n/* 219 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar $ = __webpack_require__(5);\nvar toAbsoluteIndex = __webpack_require__(86);\nvar toInteger = __webpack_require__(70);\nvar toLength = __webpack_require__(35);\nvar toObject = __webpack_require__(26);\nvar arraySpeciesCreate = __webpack_require__(95);\nvar createProperty = __webpack_require__(75);\nvar arrayMethodHasSpeciesSupport = __webpack_require__(60);\n\nvar HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('splice');\n\nvar max = Math.max;\nvar min = Math.min;\nvar MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF;\nvar MAXIMUM_ALLOWED_LENGTH_EXCEEDED = 'Maximum allowed length exceeded';\n\n// `Array.prototype.splice` method\n// https://tc39.es/ecma262/#sec-array.prototype.splice\n// with adding support of @@species\n$({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT }, {\n  splice: function splice(start, deleteCount /* , ...items */) {\n    var O = toObject(this);\n    var len = toLength(O.length);\n    var actualStart = toAbsoluteIndex(start, len);\n    var argumentsLength = arguments.length;\n    var insertCount, actualDeleteCount, A, k, from, to;\n    if (argumentsLength === 0) {\n      insertCount = actualDeleteCount = 0;\n    } else if (argumentsLength === 1) {\n      insertCount = 0;\n      actualDeleteCount = len - actualStart;\n    } else {\n      insertCount = argumentsLength - 2;\n      actualDeleteCount = min(max(toInteger(deleteCount), 0), len - actualStart);\n    }\n    if (len + insertCount - actualDeleteCount > MAX_SAFE_INTEGER) {\n      throw TypeError(MAXIMUM_ALLOWED_LENGTH_EXCEEDED);\n    }\n    A = arraySpeciesCreate(O, actualDeleteCount);\n    for (k = 0; k < actualDeleteCount; k++) {\n      from = actualStart + k;\n      if (from in O) createProperty(A, k, O[from]);\n    }\n    A.length = actualDeleteCount;\n    if (insertCount < actualDeleteCount) {\n      for (k = actualStart; k < len - actualDeleteCount; k++) {\n        from = k + actualDeleteCount;\n        to = k + insertCount;\n        if (from in O) O[to] = O[from];\n        else delete O[to];\n      }\n      for (k = len; k > len - actualDeleteCount + insertCount; k--) delete O[k - 1];\n    } else if (insertCount > actualDeleteCount) {\n      for (k = len - actualDeleteCount; k > actualStart; k--) {\n        from = k + actualDeleteCount - 1;\n        to = k + insertCount - 1;\n        if (from in O) O[to] = O[from];\n        else delete O[to];\n      }\n    }\n    for (k = 0; k < insertCount; k++) {\n      O[k + actualStart] = arguments[k + 2];\n    }\n    O.length = len - actualDeleteCount + insertCount;\n    return A;\n  }\n});\n\n\n/***/ }),\n/* 220 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar parent = __webpack_require__(221);\n\nmodule.exports = parent;\n\n\n/***/ }),\n/* 221 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar filter = __webpack_require__(222);\n\nvar ArrayPrototype = Array.prototype;\n\nmodule.exports = function (it) {\n  var own = it.filter;\n  return it === ArrayPrototype || (it instanceof Array && own === ArrayPrototype.filter) ? filter : own;\n};\n\n\n/***/ }),\n/* 222 */\n/***/ (function(module, exports, __webpack_require__) {\n\n__webpack_require__(223);\nvar entryVirtual = __webpack_require__(14);\n\nmodule.exports = entryVirtual('Array').filter;\n\n\n/***/ }),\n/* 223 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar $ = __webpack_require__(5);\nvar $filter = __webpack_require__(31).filter;\nvar arrayMethodHasSpeciesSupport = __webpack_require__(60);\n\nvar HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('filter');\n\n// `Array.prototype.filter` method\n// https://tc39.es/ecma262/#sec-array.prototype.filter\n// with adding support of @@species\n$({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT }, {\n  filter: function filter(callbackfn /* , thisArg */) {\n    return $filter(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n  }\n});\n\n\n/***/ }),\n/* 224 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar parent = __webpack_require__(225);\n\nmodule.exports = parent;\n\n\n/***/ }),\n/* 225 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar arrayIncludes = __webpack_require__(226);\nvar stringIncludes = __webpack_require__(228);\n\nvar ArrayPrototype = Array.prototype;\nvar StringPrototype = String.prototype;\n\nmodule.exports = function (it) {\n  var own = it.includes;\n  if (it === ArrayPrototype || (it instanceof Array && own === ArrayPrototype.includes)) return arrayIncludes;\n  if (typeof it === 'string' || it === StringPrototype || (it instanceof String && own === StringPrototype.includes)) {\n    return stringIncludes;\n  } return own;\n};\n\n\n/***/ }),\n/* 226 */\n/***/ (function(module, exports, __webpack_require__) {\n\n__webpack_require__(227);\nvar entryVirtual = __webpack_require__(14);\n\nmodule.exports = entryVirtual('Array').includes;\n\n\n/***/ }),\n/* 227 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar $ = __webpack_require__(5);\nvar $includes = __webpack_require__(85).includes;\nvar addToUnscopables = __webpack_require__(89);\n\n// `Array.prototype.includes` method\n// https://tc39.es/ecma262/#sec-array.prototype.includes\n$({ target: 'Array', proto: true }, {\n  includes: function includes(el /* , fromIndex = 0 */) {\n    return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined);\n  }\n});\n\n// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables\naddToUnscopables('includes');\n\n\n/***/ }),\n/* 228 */\n/***/ (function(module, exports, __webpack_require__) {\n\n__webpack_require__(229);\nvar entryVirtual = __webpack_require__(14);\n\nmodule.exports = entryVirtual('String').includes;\n\n\n/***/ }),\n/* 229 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar $ = __webpack_require__(5);\nvar notARegExp = __webpack_require__(230);\nvar requireObjectCoercible = __webpack_require__(51);\nvar toString = __webpack_require__(30);\nvar correctIsRegExpLogic = __webpack_require__(232);\n\n// `String.prototype.includes` method\n// https://tc39.es/ecma262/#sec-string.prototype.includes\n$({ target: 'String', proto: true, forced: !correctIsRegExpLogic('includes') }, {\n  includes: function includes(searchString /* , position = 0 */) {\n    return !!~toString(requireObjectCoercible(this))\n      .indexOf(toString(notARegExp(searchString)), arguments.length > 1 ? arguments[1] : undefined);\n  }\n});\n\n\n/***/ }),\n/* 230 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar isRegExp = __webpack_require__(231);\n\nmodule.exports = function (it) {\n  if (isRegExp(it)) {\n    throw TypeError(\"The method doesn't accept regular expressions\");\n  } return it;\n};\n\n\n/***/ }),\n/* 231 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar isObject = __webpack_require__(13);\nvar classof = __webpack_require__(50);\nvar wellKnownSymbol = __webpack_require__(9);\n\nvar MATCH = wellKnownSymbol('match');\n\n// `IsRegExp` abstract operation\n// https://tc39.es/ecma262/#sec-isregexp\nmodule.exports = function (it) {\n  var isRegExp;\n  return isObject(it) && ((isRegExp = it[MATCH]) !== undefined ? !!isRegExp : classof(it) == 'RegExp');\n};\n\n\n/***/ }),\n/* 232 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar wellKnownSymbol = __webpack_require__(9);\n\nvar MATCH = wellKnownSymbol('match');\n\nmodule.exports = function (METHOD_NAME) {\n  var regexp = /./;\n  try {\n    '/./'[METHOD_NAME](regexp);\n  } catch (error1) {\n    try {\n      regexp[MATCH] = false;\n      return '/./'[METHOD_NAME](regexp);\n    } catch (error2) { /* empty */ }\n  } return false;\n};\n\n\n/***/ }),\n/* 233 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar parent = __webpack_require__(234);\n\nmodule.exports = parent;\n\n\n/***/ }),\n/* 234 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar bind = __webpack_require__(235);\n\nvar FunctionPrototype = Function.prototype;\n\nmodule.exports = function (it) {\n  var own = it.bind;\n  return it === FunctionPrototype || (it instanceof Function && own === FunctionPrototype.bind) ? bind : own;\n};\n\n\n/***/ }),\n/* 235 */\n/***/ (function(module, exports, __webpack_require__) {\n\n__webpack_require__(236);\nvar entryVirtual = __webpack_require__(14);\n\nmodule.exports = entryVirtual('Function').bind;\n\n\n/***/ }),\n/* 236 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar $ = __webpack_require__(5);\nvar bind = __webpack_require__(237);\n\n// `Function.prototype.bind` method\n// https://tc39.es/ecma262/#sec-function.prototype.bind\n$({ target: 'Function', proto: true }, {\n  bind: bind\n});\n\n\n/***/ }),\n/* 237 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar aFunction = __webpack_require__(34);\nvar isObject = __webpack_require__(13);\n\nvar slice = [].slice;\nvar factories = {};\n\nvar construct = function (C, argsLength, args) {\n  if (!(argsLength in factories)) {\n    for (var list = [], i = 0; i < argsLength; i++) list[i] = 'a[' + i + ']';\n    // eslint-disable-next-line no-new-func -- we have no proper alternatives, IE8- only\n    factories[argsLength] = Function('C,a', 'return new C(' + list.join(',') + ')');\n  } return factories[argsLength](C, args);\n};\n\n// `Function.prototype.bind` method implementation\n// https://tc39.es/ecma262/#sec-function.prototype.bind\nmodule.exports = Function.bind || function bind(that /* , ...args */) {\n  var fn = aFunction(this);\n  var partArgs = slice.call(arguments, 1);\n  var boundFunction = function bound(/* args... */) {\n    var args = partArgs.concat(slice.call(arguments));\n    return this instanceof boundFunction ? construct(fn, args.length, args) : fn.apply(that, args);\n  };\n  if (isObject(fn.prototype)) boundFunction.prototype = fn.prototype;\n  return boundFunction;\n};\n\n\n/***/ }),\n/* 238 */\n/***/ (function(module, exports, __webpack_require__) {\n\nmodule.exports = __webpack_require__(239);\n\n/***/ }),\n/* 239 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar parent = __webpack_require__(240);\n__webpack_require__(260);\n__webpack_require__(261);\n__webpack_require__(262);\n__webpack_require__(263);\n__webpack_require__(264);\n// TODO: Remove from `core-js@4`\n__webpack_require__(265);\n// TODO: Remove from `core-js@4`\n__webpack_require__(266);\n\nmodule.exports = parent;\n\n\n/***/ }),\n/* 240 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar parent = __webpack_require__(241);\n__webpack_require__(45);\n\nmodule.exports = parent;\n\n\n/***/ }),\n/* 241 */\n/***/ (function(module, exports, __webpack_require__) {\n\n__webpack_require__(242);\n__webpack_require__(57);\n__webpack_require__(243);\n__webpack_require__(244);\n__webpack_require__(245);\n__webpack_require__(246);\n__webpack_require__(247);\n__webpack_require__(131);\n__webpack_require__(248);\n__webpack_require__(249);\n__webpack_require__(250);\n__webpack_require__(251);\n__webpack_require__(252);\n__webpack_require__(253);\n__webpack_require__(254);\n__webpack_require__(255);\n__webpack_require__(256);\n__webpack_require__(257);\n__webpack_require__(258);\n__webpack_require__(259);\nvar path = __webpack_require__(11);\n\nmodule.exports = path.Symbol;\n\n\n/***/ }),\n/* 242 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar $ = __webpack_require__(5);\nvar fails = __webpack_require__(12);\nvar isArray = __webpack_require__(59);\nvar isObject = __webpack_require__(13);\nvar toObject = __webpack_require__(26);\nvar toLength = __webpack_require__(35);\nvar createProperty = __webpack_require__(75);\nvar arraySpeciesCreate = __webpack_require__(95);\nvar arrayMethodHasSpeciesSupport = __webpack_require__(60);\nvar wellKnownSymbol = __webpack_require__(9);\nvar V8_VERSION = __webpack_require__(66);\n\nvar IS_CONCAT_SPREADABLE = wellKnownSymbol('isConcatSpreadable');\nvar MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF;\nvar MAXIMUM_ALLOWED_INDEX_EXCEEDED = 'Maximum allowed index exceeded';\n\n// We can't use this feature detection in V8 since it causes\n// deoptimization and serious performance degradation\n// https://github.com/zloirock/core-js/issues/679\nvar IS_CONCAT_SPREADABLE_SUPPORT = V8_VERSION >= 51 || !fails(function () {\n  var array = [];\n  array[IS_CONCAT_SPREADABLE] = false;\n  return array.concat()[0] !== array;\n});\n\nvar SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('concat');\n\nvar isConcatSpreadable = function (O) {\n  if (!isObject(O)) return false;\n  var spreadable = O[IS_CONCAT_SPREADABLE];\n  return spreadable !== undefined ? !!spreadable : isArray(O);\n};\n\nvar FORCED = !IS_CONCAT_SPREADABLE_SUPPORT || !SPECIES_SUPPORT;\n\n// `Array.prototype.concat` method\n// https://tc39.es/ecma262/#sec-array.prototype.concat\n// with adding support of @@isConcatSpreadable and @@species\n$({ target: 'Array', proto: true, forced: FORCED }, {\n  // eslint-disable-next-line no-unused-vars -- required for `.length`\n  concat: function concat(arg) {\n    var O = toObject(this);\n    var A = arraySpeciesCreate(O, 0);\n    var n = 0;\n    var i, k, length, len, E;\n    for (i = -1, length = arguments.length; i < length; i++) {\n      E = i === -1 ? O : arguments[i];\n      if (isConcatSpreadable(E)) {\n        len = toLength(E.length);\n        if (n + len > MAX_SAFE_INTEGER) throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED);\n        for (k = 0; k < len; k++, n++) if (k in E) createProperty(A, n, E[k]);\n      } else {\n        if (n >= MAX_SAFE_INTEGER) throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED);\n        createProperty(A, n++, E);\n      }\n    }\n    A.length = n;\n    return A;\n  }\n});\n\n\n/***/ }),\n/* 243 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar $ = __webpack_require__(5);\nvar global = __webpack_require__(8);\nvar getBuiltIn = __webpack_require__(25);\nvar IS_PURE = __webpack_require__(39);\nvar DESCRIPTORS = __webpack_require__(15);\nvar NATIVE_SYMBOL = __webpack_require__(79);\nvar fails = __webpack_require__(12);\nvar has = __webpack_require__(17);\nvar isArray = __webpack_require__(59);\nvar isObject = __webpack_require__(13);\nvar isSymbol = __webpack_require__(65);\nvar anObject = __webpack_require__(20);\nvar toObject = __webpack_require__(26);\nvar toIndexedObject = __webpack_require__(29);\nvar toPropertyKey = __webpack_require__(64);\nvar $toString = __webpack_require__(30);\nvar createPropertyDescriptor = __webpack_require__(38);\nvar nativeObjectCreate = __webpack_require__(69);\nvar objectKeys = __webpack_require__(53);\nvar getOwnPropertyNamesModule = __webpack_require__(98);\nvar getOwnPropertyNamesExternal = __webpack_require__(128);\nvar getOwnPropertySymbolsModule = __webpack_require__(130);\nvar getOwnPropertyDescriptorModule = __webpack_require__(77);\nvar definePropertyModule = __webpack_require__(18);\nvar propertyIsEnumerableModule = __webpack_require__(63);\nvar createNonEnumerableProperty = __webpack_require__(19);\nvar redefine = __webpack_require__(56);\nvar shared = __webpack_require__(80);\nvar sharedKey = __webpack_require__(68);\nvar hiddenKeys = __webpack_require__(54);\nvar uid = __webpack_require__(67);\nvar wellKnownSymbol = __webpack_require__(9);\nvar wrappedWellKnownSymbolModule = __webpack_require__(101);\nvar defineWellKnownSymbol = __webpack_require__(10);\nvar setToStringTag = __webpack_require__(44);\nvar InternalStateModule = __webpack_require__(43);\nvar $forEach = __webpack_require__(31).forEach;\n\nvar HIDDEN = sharedKey('hidden');\nvar SYMBOL = 'Symbol';\nvar PROTOTYPE = 'prototype';\nvar TO_PRIMITIVE = wellKnownSymbol('toPrimitive');\nvar setInternalState = InternalStateModule.set;\nvar getInternalState = InternalStateModule.getterFor(SYMBOL);\nvar ObjectPrototype = Object[PROTOTYPE];\nvar $Symbol = global.Symbol;\nvar $stringify = getBuiltIn('JSON', 'stringify');\nvar nativeGetOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;\nvar nativeDefineProperty = definePropertyModule.f;\nvar nativeGetOwnPropertyNames = getOwnPropertyNamesExternal.f;\nvar nativePropertyIsEnumerable = propertyIsEnumerableModule.f;\nvar AllSymbols = shared('symbols');\nvar ObjectPrototypeSymbols = shared('op-symbols');\nvar StringToSymbolRegistry = shared('string-to-symbol-registry');\nvar SymbolToStringRegistry = shared('symbol-to-string-registry');\nvar WellKnownSymbolsStore = shared('wks');\nvar QObject = global.QObject;\n// Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173\nvar USE_SETTER = !QObject || !QObject[PROTOTYPE] || !QObject[PROTOTYPE].findChild;\n\n// fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687\nvar setSymbolDescriptor = DESCRIPTORS && fails(function () {\n  return nativeObjectCreate(nativeDefineProperty({}, 'a', {\n    get: function () { return nativeDefineProperty(this, 'a', { value: 7 }).a; }\n  })).a != 7;\n}) ? function (O, P, Attributes) {\n  var ObjectPrototypeDescriptor = nativeGetOwnPropertyDescriptor(ObjectPrototype, P);\n  if (ObjectPrototypeDescriptor) delete ObjectPrototype[P];\n  nativeDefineProperty(O, P, Attributes);\n  if (ObjectPrototypeDescriptor && O !== ObjectPrototype) {\n    nativeDefineProperty(ObjectPrototype, P, ObjectPrototypeDescriptor);\n  }\n} : nativeDefineProperty;\n\nvar wrap = function (tag, description) {\n  var symbol = AllSymbols[tag] = nativeObjectCreate($Symbol[PROTOTYPE]);\n  setInternalState(symbol, {\n    type: SYMBOL,\n    tag: tag,\n    description: description\n  });\n  if (!DESCRIPTORS) symbol.description = description;\n  return symbol;\n};\n\nvar $defineProperty = function defineProperty(O, P, Attributes) {\n  if (O === ObjectPrototype) $defineProperty(ObjectPrototypeSymbols, P, Attributes);\n  anObject(O);\n  var key = toPropertyKey(P);\n  anObject(Attributes);\n  if (has(AllSymbols, key)) {\n    if (!Attributes.enumerable) {\n      if (!has(O, HIDDEN)) nativeDefineProperty(O, HIDDEN, createPropertyDescriptor(1, {}));\n      O[HIDDEN][key] = true;\n    } else {\n      if (has(O, HIDDEN) && O[HIDDEN][key]) O[HIDDEN][key] = false;\n      Attributes = nativeObjectCreate(Attributes, { enumerable: createPropertyDescriptor(0, false) });\n    } return setSymbolDescriptor(O, key, Attributes);\n  } return nativeDefineProperty(O, key, Attributes);\n};\n\nvar $defineProperties = function defineProperties(O, Properties) {\n  anObject(O);\n  var properties = toIndexedObject(Properties);\n  var keys = objectKeys(properties).concat($getOwnPropertySymbols(properties));\n  $forEach(keys, function (key) {\n    if (!DESCRIPTORS || $propertyIsEnumerable.call(properties, key)) $defineProperty(O, key, properties[key]);\n  });\n  return O;\n};\n\nvar $create = function create(O, Properties) {\n  return Properties === undefined ? nativeObjectCreate(O) : $defineProperties(nativeObjectCreate(O), Properties);\n};\n\nvar $propertyIsEnumerable = function propertyIsEnumerable(V) {\n  var P = toPropertyKey(V);\n  var enumerable = nativePropertyIsEnumerable.call(this, P);\n  if (this === ObjectPrototype && has(AllSymbols, P) && !has(ObjectPrototypeSymbols, P)) return false;\n  return enumerable || !has(this, P) || !has(AllSymbols, P) || has(this, HIDDEN) && this[HIDDEN][P] ? enumerable : true;\n};\n\nvar $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(O, P) {\n  var it = toIndexedObject(O);\n  var key = toPropertyKey(P);\n  if (it === ObjectPrototype && has(AllSymbols, key) && !has(ObjectPrototypeSymbols, key)) return;\n  var descriptor = nativeGetOwnPropertyDescriptor(it, key);\n  if (descriptor && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key])) {\n    descriptor.enumerable = true;\n  }\n  return descriptor;\n};\n\nvar $getOwnPropertyNames = function getOwnPropertyNames(O) {\n  var names = nativeGetOwnPropertyNames(toIndexedObject(O));\n  var result = [];\n  $forEach(names, function (key) {\n    if (!has(AllSymbols, key) && !has(hiddenKeys, key)) result.push(key);\n  });\n  return result;\n};\n\nvar $getOwnPropertySymbols = function getOwnPropertySymbols(O) {\n  var IS_OBJECT_PROTOTYPE = O === ObjectPrototype;\n  var names = nativeGetOwnPropertyNames(IS_OBJECT_PROTOTYPE ? ObjectPrototypeSymbols : toIndexedObject(O));\n  var result = [];\n  $forEach(names, function (key) {\n    if (has(AllSymbols, key) && (!IS_OBJECT_PROTOTYPE || has(ObjectPrototype, key))) {\n      result.push(AllSymbols[key]);\n    }\n  });\n  return result;\n};\n\n// `Symbol` constructor\n// https://tc39.es/ecma262/#sec-symbol-constructor\nif (!NATIVE_SYMBOL) {\n  $Symbol = function Symbol() {\n    if (this instanceof $Symbol) throw TypeError('Symbol is not a constructor');\n    var description = !arguments.length || arguments[0] === undefined ? undefined : $toString(arguments[0]);\n    var tag = uid(description);\n    var setter = function (value) {\n      if (this === ObjectPrototype) setter.call(ObjectPrototypeSymbols, value);\n      if (has(this, HIDDEN) && has(this[HIDDEN], tag)) this[HIDDEN][tag] = false;\n      setSymbolDescriptor(this, tag, createPropertyDescriptor(1, value));\n    };\n    if (DESCRIPTORS && USE_SETTER) setSymbolDescriptor(ObjectPrototype, tag, { configurable: true, set: setter });\n    return wrap(tag, description);\n  };\n\n  redefine($Symbol[PROTOTYPE], 'toString', function toString() {\n    return getInternalState(this).tag;\n  });\n\n  redefine($Symbol, 'withoutSetter', function (description) {\n    return wrap(uid(description), description);\n  });\n\n  propertyIsEnumerableModule.f = $propertyIsEnumerable;\n  definePropertyModule.f = $defineProperty;\n  getOwnPropertyDescriptorModule.f = $getOwnPropertyDescriptor;\n  getOwnPropertyNamesModule.f = getOwnPropertyNamesExternal.f = $getOwnPropertyNames;\n  getOwnPropertySymbolsModule.f = $getOwnPropertySymbols;\n\n  wrappedWellKnownSymbolModule.f = function (name) {\n    return wrap(wellKnownSymbol(name), name);\n  };\n\n  if (DESCRIPTORS) {\n    // https://github.com/tc39/proposal-Symbol-description\n    nativeDefineProperty($Symbol[PROTOTYPE], 'description', {\n      configurable: true,\n      get: function description() {\n        return getInternalState(this).description;\n      }\n    });\n    if (!IS_PURE) {\n      redefine(ObjectPrototype, 'propertyIsEnumerable', $propertyIsEnumerable, { unsafe: true });\n    }\n  }\n}\n\n$({ global: true, wrap: true, forced: !NATIVE_SYMBOL, sham: !NATIVE_SYMBOL }, {\n  Symbol: $Symbol\n});\n\n$forEach(objectKeys(WellKnownSymbolsStore), function (name) {\n  defineWellKnownSymbol(name);\n});\n\n$({ target: SYMBOL, stat: true, forced: !NATIVE_SYMBOL }, {\n  // `Symbol.for` method\n  // https://tc39.es/ecma262/#sec-symbol.for\n  'for': function (key) {\n    var string = $toString(key);\n    if (has(StringToSymbolRegistry, string)) return StringToSymbolRegistry[string];\n    var symbol = $Symbol(string);\n    StringToSymbolRegistry[string] = symbol;\n    SymbolToStringRegistry[symbol] = string;\n    return symbol;\n  },\n  // `Symbol.keyFor` method\n  // https://tc39.es/ecma262/#sec-symbol.keyfor\n  keyFor: function keyFor(sym) {\n    if (!isSymbol(sym)) throw TypeError(sym + ' is not a symbol');\n    if (has(SymbolToStringRegistry, sym)) return SymbolToStringRegistry[sym];\n  },\n  useSetter: function () { USE_SETTER = true; },\n  useSimple: function () { USE_SETTER = false; }\n});\n\n$({ target: 'Object', stat: true, forced: !NATIVE_SYMBOL, sham: !DESCRIPTORS }, {\n  // `Object.create` method\n  // https://tc39.es/ecma262/#sec-object.create\n  create: $create,\n  // `Object.defineProperty` method\n  // https://tc39.es/ecma262/#sec-object.defineproperty\n  defineProperty: $defineProperty,\n  // `Object.defineProperties` method\n  // https://tc39.es/ecma262/#sec-object.defineproperties\n  defineProperties: $defineProperties,\n  // `Object.getOwnPropertyDescriptor` method\n  // https://tc39.es/ecma262/#sec-object.getownpropertydescriptors\n  getOwnPropertyDescriptor: $getOwnPropertyDescriptor\n});\n\n$({ target: 'Object', stat: true, forced: !NATIVE_SYMBOL }, {\n  // `Object.getOwnPropertyNames` method\n  // https://tc39.es/ecma262/#sec-object.getownpropertynames\n  getOwnPropertyNames: $getOwnPropertyNames,\n  // `Object.getOwnPropertySymbols` method\n  // https://tc39.es/ecma262/#sec-object.getownpropertysymbols\n  getOwnPropertySymbols: $getOwnPropertySymbols\n});\n\n// Chrome 38 and 39 `Object.getOwnPropertySymbols` fails on primitives\n// https://bugs.chromium.org/p/v8/issues/detail?id=3443\n$({ target: 'Object', stat: true, forced: fails(function () { getOwnPropertySymbolsModule.f(1); }) }, {\n  getOwnPropertySymbols: function getOwnPropertySymbols(it) {\n    return getOwnPropertySymbolsModule.f(toObject(it));\n  }\n});\n\n// `JSON.stringify` method behavior with symbols\n// https://tc39.es/ecma262/#sec-json.stringify\nif ($stringify) {\n  var FORCED_JSON_STRINGIFY = !NATIVE_SYMBOL || fails(function () {\n    var symbol = $Symbol();\n    // MS Edge converts symbol values to JSON as {}\n    return $stringify([symbol]) != '[null]'\n      // WebKit converts symbol values to JSON as null\n      || $stringify({ a: symbol }) != '{}'\n      // V8 throws on boxed symbols\n      || $stringify(Object(symbol)) != '{}';\n  });\n\n  $({ target: 'JSON', stat: true, forced: FORCED_JSON_STRINGIFY }, {\n    // eslint-disable-next-line no-unused-vars -- required for `.length`\n    stringify: function stringify(it, replacer, space) {\n      var args = [it];\n      var index = 1;\n      var $replacer;\n      while (arguments.length > index) args.push(arguments[index++]);\n      $replacer = replacer;\n      if (!isObject(replacer) && it === undefined || isSymbol(it)) return; // IE8 returns string on undefined\n      if (!isArray(replacer)) replacer = function (key, value) {\n        if (typeof $replacer == 'function') value = $replacer.call(this, key, value);\n        if (!isSymbol(value)) return value;\n      };\n      args[1] = replacer;\n      return $stringify.apply(null, args);\n    }\n  });\n}\n\n// `Symbol.prototype[@@toPrimitive]` method\n// https://tc39.es/ecma262/#sec-symbol.prototype-@@toprimitive\nif (!$Symbol[PROTOTYPE][TO_PRIMITIVE]) {\n  createNonEnumerableProperty($Symbol[PROTOTYPE], TO_PRIMITIVE, $Symbol[PROTOTYPE].valueOf);\n}\n// `Symbol.prototype[@@toStringTag]` property\n// https://tc39.es/ecma262/#sec-symbol.prototype-@@tostringtag\nsetToStringTag($Symbol, SYMBOL);\n\nhiddenKeys[HIDDEN] = true;\n\n\n/***/ }),\n/* 244 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar defineWellKnownSymbol = __webpack_require__(10);\n\n// `Symbol.asyncIterator` well-known symbol\n// https://tc39.es/ecma262/#sec-symbol.asynciterator\ndefineWellKnownSymbol('asyncIterator');\n\n\n/***/ }),\n/* 245 */\n/***/ (function(module, exports) {\n\n// empty\n\n\n/***/ }),\n/* 246 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar defineWellKnownSymbol = __webpack_require__(10);\n\n// `Symbol.hasInstance` well-known symbol\n// https://tc39.es/ecma262/#sec-symbol.hasinstance\ndefineWellKnownSymbol('hasInstance');\n\n\n/***/ }),\n/* 247 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar defineWellKnownSymbol = __webpack_require__(10);\n\n// `Symbol.isConcatSpreadable` well-known symbol\n// https://tc39.es/ecma262/#sec-symbol.isconcatspreadable\ndefineWellKnownSymbol('isConcatSpreadable');\n\n\n/***/ }),\n/* 248 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar defineWellKnownSymbol = __webpack_require__(10);\n\n// `Symbol.match` well-known symbol\n// https://tc39.es/ecma262/#sec-symbol.match\ndefineWellKnownSymbol('match');\n\n\n/***/ }),\n/* 249 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar defineWellKnownSymbol = __webpack_require__(10);\n\n// `Symbol.matchAll` well-known symbol\n// https://tc39.es/ecma262/#sec-symbol.matchall\ndefineWellKnownSymbol('matchAll');\n\n\n/***/ }),\n/* 250 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar defineWellKnownSymbol = __webpack_require__(10);\n\n// `Symbol.replace` well-known symbol\n// https://tc39.es/ecma262/#sec-symbol.replace\ndefineWellKnownSymbol('replace');\n\n\n/***/ }),\n/* 251 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar defineWellKnownSymbol = __webpack_require__(10);\n\n// `Symbol.search` well-known symbol\n// https://tc39.es/ecma262/#sec-symbol.search\ndefineWellKnownSymbol('search');\n\n\n/***/ }),\n/* 252 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar defineWellKnownSymbol = __webpack_require__(10);\n\n// `Symbol.species` well-known symbol\n// https://tc39.es/ecma262/#sec-symbol.species\ndefineWellKnownSymbol('species');\n\n\n/***/ }),\n/* 253 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar defineWellKnownSymbol = __webpack_require__(10);\n\n// `Symbol.split` well-known symbol\n// https://tc39.es/ecma262/#sec-symbol.split\ndefineWellKnownSymbol('split');\n\n\n/***/ }),\n/* 254 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar defineWellKnownSymbol = __webpack_require__(10);\n\n// `Symbol.toPrimitive` well-known symbol\n// https://tc39.es/ecma262/#sec-symbol.toprimitive\ndefineWellKnownSymbol('toPrimitive');\n\n\n/***/ }),\n/* 255 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar defineWellKnownSymbol = __webpack_require__(10);\n\n// `Symbol.toStringTag` well-known symbol\n// https://tc39.es/ecma262/#sec-symbol.tostringtag\ndefineWellKnownSymbol('toStringTag');\n\n\n/***/ }),\n/* 256 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar defineWellKnownSymbol = __webpack_require__(10);\n\n// `Symbol.unscopables` well-known symbol\n// https://tc39.es/ecma262/#sec-symbol.unscopables\ndefineWellKnownSymbol('unscopables');\n\n\n/***/ }),\n/* 257 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar global = __webpack_require__(8);\nvar setToStringTag = __webpack_require__(44);\n\n// JSON[@@toStringTag] property\n// https://tc39.es/ecma262/#sec-json-@@tostringtag\nsetToStringTag(global.JSON, 'JSON', true);\n\n\n/***/ }),\n/* 258 */\n/***/ (function(module, exports) {\n\n// empty\n\n\n/***/ }),\n/* 259 */\n/***/ (function(module, exports) {\n\n// empty\n\n\n/***/ }),\n/* 260 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar defineWellKnownSymbol = __webpack_require__(10);\n\n// `Symbol.asyncDispose` well-known symbol\n// https://github.com/tc39/proposal-using-statement\ndefineWellKnownSymbol('asyncDispose');\n\n\n/***/ }),\n/* 261 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar defineWellKnownSymbol = __webpack_require__(10);\n\n// `Symbol.dispose` well-known symbol\n// https://github.com/tc39/proposal-using-statement\ndefineWellKnownSymbol('dispose');\n\n\n/***/ }),\n/* 262 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar defineWellKnownSymbol = __webpack_require__(10);\n\n// `Symbol.matcher` well-known symbol\n// https://github.com/tc39/proposal-pattern-matching\ndefineWellKnownSymbol('matcher');\n\n\n/***/ }),\n/* 263 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar defineWellKnownSymbol = __webpack_require__(10);\n\n// `Symbol.metadata` well-known symbol\n// https://github.com/tc39/proposal-decorators\ndefineWellKnownSymbol('metadata');\n\n\n/***/ }),\n/* 264 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar defineWellKnownSymbol = __webpack_require__(10);\n\n// `Symbol.observable` well-known symbol\n// https://github.com/tc39/proposal-observable\ndefineWellKnownSymbol('observable');\n\n\n/***/ }),\n/* 265 */\n/***/ (function(module, exports, __webpack_require__) {\n\n// TODO: remove from `core-js@4`\nvar defineWellKnownSymbol = __webpack_require__(10);\n\n// `Symbol.patternMatch` well-known symbol\n// https://github.com/tc39/proposal-pattern-matching\ndefineWellKnownSymbol('patternMatch');\n\n\n/***/ }),\n/* 266 */\n/***/ (function(module, exports, __webpack_require__) {\n\n// TODO: remove from `core-js@4`\nvar defineWellKnownSymbol = __webpack_require__(10);\n\ndefineWellKnownSymbol('replaceAll');\n\n\n/***/ }),\n/* 267 */\n/***/ (function(module, exports, __webpack_require__) {\n\nmodule.exports = __webpack_require__(268);\n\n/***/ }),\n/* 268 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar parent = __webpack_require__(269);\n\nmodule.exports = parent;\n\n\n/***/ }),\n/* 269 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar parent = __webpack_require__(270);\n__webpack_require__(45);\n\nmodule.exports = parent;\n\n\n/***/ }),\n/* 270 */\n/***/ (function(module, exports, __webpack_require__) {\n\n__webpack_require__(55);\n__webpack_require__(57);\n__webpack_require__(58);\n__webpack_require__(131);\nvar WrappedWellKnownSymbolModule = __webpack_require__(101);\n\nmodule.exports = WrappedWellKnownSymbolModule.f('iterator');\n\n\n/***/ }),\n/* 271 */\n/***/ (function(module, exports, __webpack_require__) {\n\nmodule.exports = __webpack_require__(272);\n\n/***/ }),\n/* 272 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar parent = __webpack_require__(273);\n\nmodule.exports = parent;\n\n\n/***/ }),\n/* 273 */\n/***/ (function(module, exports, __webpack_require__) {\n\n__webpack_require__(274);\nvar path = __webpack_require__(11);\n\nmodule.exports = path.parseInt;\n\n\n/***/ }),\n/* 274 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar $ = __webpack_require__(5);\nvar parseIntImplementation = __webpack_require__(275);\n\n// `parseInt` method\n// https://tc39.es/ecma262/#sec-parseint-string-radix\n$({ global: true, forced: parseInt != parseIntImplementation }, {\n  parseInt: parseIntImplementation\n});\n\n\n/***/ }),\n/* 275 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar global = __webpack_require__(8);\nvar toString = __webpack_require__(30);\nvar trim = __webpack_require__(97).trim;\nvar whitespaces = __webpack_require__(74);\n\nvar $parseInt = global.parseInt;\nvar hex = /^[+-]?0[Xx]/;\nvar FORCED = $parseInt(whitespaces + '08') !== 8 || $parseInt(whitespaces + '0x16') !== 22;\n\n// `parseInt` method\n// https://tc39.es/ecma262/#sec-parseint-string-radix\nmodule.exports = FORCED ? function parseInt(string, radix) {\n  var S = trim(toString(string));\n  return $parseInt(S, (radix >>> 0) || (hex.test(S) ? 16 : 10));\n} : $parseInt;\n\n\n/***/ }),\n/* 276 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar parent = __webpack_require__(277);\n\nmodule.exports = parent;\n\n\n/***/ }),\n/* 277 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar slice = __webpack_require__(278);\n\nvar ArrayPrototype = Array.prototype;\n\nmodule.exports = function (it) {\n  var own = it.slice;\n  return it === ArrayPrototype || (it instanceof Array && own === ArrayPrototype.slice) ? slice : own;\n};\n\n\n/***/ }),\n/* 278 */\n/***/ (function(module, exports, __webpack_require__) {\n\n__webpack_require__(279);\nvar entryVirtual = __webpack_require__(14);\n\nmodule.exports = entryVirtual('Array').slice;\n\n\n/***/ }),\n/* 279 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar $ = __webpack_require__(5);\nvar isObject = __webpack_require__(13);\nvar isArray = __webpack_require__(59);\nvar toAbsoluteIndex = __webpack_require__(86);\nvar toLength = __webpack_require__(35);\nvar toIndexedObject = __webpack_require__(29);\nvar createProperty = __webpack_require__(75);\nvar wellKnownSymbol = __webpack_require__(9);\nvar arrayMethodHasSpeciesSupport = __webpack_require__(60);\n\nvar HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('slice');\n\nvar SPECIES = wellKnownSymbol('species');\nvar nativeSlice = [].slice;\nvar max = Math.max;\n\n// `Array.prototype.slice` method\n// https://tc39.es/ecma262/#sec-array.prototype.slice\n// fallback for not array-like ES3 strings and DOM objects\n$({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT }, {\n  slice: function slice(start, end) {\n    var O = toIndexedObject(this);\n    var length = toLength(O.length);\n    var k = toAbsoluteIndex(start, length);\n    var fin = toAbsoluteIndex(end === undefined ? length : end, length);\n    // inline `ArraySpeciesCreate` for usage native `Array#slice` where it's possible\n    var Constructor, result, n;\n    if (isArray(O)) {\n      Constructor = O.constructor;\n      // cross-realm fallback\n      if (typeof Constructor == 'function' && (Constructor === Array || isArray(Constructor.prototype))) {\n        Constructor = undefined;\n      } else if (isObject(Constructor)) {\n        Constructor = Constructor[SPECIES];\n        if (Constructor === null) Constructor = undefined;\n      }\n      if (Constructor === Array || Constructor === undefined) {\n        return nativeSlice.call(O, k, fin);\n      }\n    }\n    result = new (Constructor === undefined ? Array : Constructor)(max(fin - k, 0));\n    for (n = 0; k < fin; k++, n++) if (k in O) createProperty(result, n, O[k]);\n    result.length = n;\n    return result;\n  }\n});\n\n\n/***/ }),\n/* 280 */\n/***/ (function(module, exports, __webpack_require__) {\n\n__webpack_require__(281);\nvar path = __webpack_require__(11);\n\nmodule.exports = path.setTimeout;\n\n\n/***/ }),\n/* 281 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar $ = __webpack_require__(5);\nvar global = __webpack_require__(8);\nvar userAgent = __webpack_require__(52);\n\nvar slice = [].slice;\nvar MSIE = /MSIE .\\./.test(userAgent); // <- dirty ie9- check\n\nvar wrap = function (scheduler) {\n  return function (handler, timeout /* , ...arguments */) {\n    var boundArgs = arguments.length > 2;\n    var args = boundArgs ? slice.call(arguments, 2) : undefined;\n    return scheduler(boundArgs ? function () {\n      // eslint-disable-next-line no-new-func -- spec requirement\n      (typeof handler == 'function' ? handler : Function(handler)).apply(this, args);\n    } : handler, timeout);\n  };\n};\n\n// ie9- setTimeout & setInterval additional parameters fix\n// https://html.spec.whatwg.org/multipage/timers-and-user-prompts.html#timers\n$({ global: true, bind: true, forced: MSIE }, {\n  // `setTimeout` method\n  // https://html.spec.whatwg.org/multipage/timers-and-user-prompts.html#dom-settimeout\n  setTimeout: wrap(global.setTimeout),\n  // `setInterval` method\n  // https://html.spec.whatwg.org/multipage/timers-and-user-prompts.html#dom-setinterval\n  setInterval: wrap(global.setInterval)\n});\n\n\n/***/ }),\n/* 282 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * @description 编辑器配置\n * @author wangfupeng\n */\n\nvar _interopRequireDefault = __webpack_require__(0);\n\nvar _defineProperty = _interopRequireDefault(__webpack_require__(1));\n\nvar _assign = _interopRequireDefault(__webpack_require__(132));\n\n(0, _defineProperty[\"default\"])(exports, \"__esModule\", {\n  value: true\n});\n\nvar tslib_1 = __webpack_require__(2);\n\nvar menus_1 = tslib_1.__importDefault(__webpack_require__(287));\n\nvar events_1 = tslib_1.__importDefault(__webpack_require__(288));\n\nvar style_1 = tslib_1.__importDefault(__webpack_require__(133));\n\nvar paste_1 = tslib_1.__importDefault(__webpack_require__(289));\n\nvar cmd_1 = tslib_1.__importDefault(__webpack_require__(290));\n\nvar image_1 = tslib_1.__importDefault(__webpack_require__(291));\n\nvar text_1 = tslib_1.__importDefault(__webpack_require__(134));\n\nvar lang_1 = tslib_1.__importDefault(__webpack_require__(292));\n\nvar history_1 = tslib_1.__importDefault(__webpack_require__(293));\n\nvar video_1 = tslib_1.__importDefault(__webpack_require__(294)); // 合并所有的配置信息\n\n\nvar defaultConfig = (0, _assign[\"default\"])({}, menus_1[\"default\"], events_1[\"default\"], style_1[\"default\"], cmd_1[\"default\"], paste_1[\"default\"], image_1[\"default\"], text_1[\"default\"], lang_1[\"default\"], history_1[\"default\"], video_1[\"default\"], //链接校验的配置函数\n{\n  linkCheck: function linkCheck(text, link) {\n    return true;\n  }\n});\nexports[\"default\"] = defaultConfig;\n\n/***/ }),\n/* 283 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar parent = __webpack_require__(284);\n\nmodule.exports = parent;\n\n\n/***/ }),\n/* 284 */\n/***/ (function(module, exports, __webpack_require__) {\n\n__webpack_require__(285);\nvar path = __webpack_require__(11);\n\nmodule.exports = path.Object.assign;\n\n\n/***/ }),\n/* 285 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar $ = __webpack_require__(5);\nvar assign = __webpack_require__(286);\n\n// `Object.assign` method\n// https://tc39.es/ecma262/#sec-object.assign\n// eslint-disable-next-line es/no-object-assign -- required for testing\n$({ target: 'Object', stat: true, forced: Object.assign !== assign }, {\n  assign: assign\n});\n\n\n/***/ }),\n/* 286 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar DESCRIPTORS = __webpack_require__(15);\nvar fails = __webpack_require__(12);\nvar objectKeys = __webpack_require__(53);\nvar getOwnPropertySymbolsModule = __webpack_require__(130);\nvar propertyIsEnumerableModule = __webpack_require__(63);\nvar toObject = __webpack_require__(26);\nvar IndexedObject = __webpack_require__(78);\n\n// eslint-disable-next-line es/no-object-assign -- safe\nvar $assign = Object.assign;\n// eslint-disable-next-line es/no-object-defineproperty -- required for testing\nvar defineProperty = Object.defineProperty;\n\n// `Object.assign` method\n// https://tc39.es/ecma262/#sec-object.assign\nmodule.exports = !$assign || fails(function () {\n  // should have correct order of operations (Edge bug)\n  if (DESCRIPTORS && $assign({ b: 1 }, $assign(defineProperty({}, 'a', {\n    enumerable: true,\n    get: function () {\n      defineProperty(this, 'b', {\n        value: 3,\n        enumerable: false\n      });\n    }\n  }), { b: 2 })).b !== 1) return true;\n  // should work with symbols and should have deterministic property order (V8 bug)\n  var A = {};\n  var B = {};\n  // eslint-disable-next-line es/no-symbol -- safe\n  var symbol = Symbol();\n  var alphabet = 'abcdefghijklmnopqrst';\n  A[symbol] = 7;\n  alphabet.split('').forEach(function (chr) { B[chr] = chr; });\n  return $assign({}, A)[symbol] != 7 || objectKeys($assign({}, B)).join('') != alphabet;\n}) ? function assign(target, source) { // eslint-disable-line no-unused-vars -- required for `.length`\n  var T = toObject(target);\n  var argumentsLength = arguments.length;\n  var index = 1;\n  var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;\n  var propertyIsEnumerable = propertyIsEnumerableModule.f;\n  while (argumentsLength > index) {\n    var S = IndexedObject(arguments[index++]);\n    var keys = getOwnPropertySymbols ? objectKeys(S).concat(getOwnPropertySymbols(S)) : objectKeys(S);\n    var length = keys.length;\n    var j = 0;\n    var key;\n    while (length > j) {\n      key = keys[j++];\n      if (!DESCRIPTORS || propertyIsEnumerable.call(S, key)) T[key] = S[key];\n    }\n  } return T;\n} : $assign;\n\n\n/***/ }),\n/* 287 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * @description 菜单配置\n * @author wangfupeng\n */\n\nvar _interopRequireDefault = __webpack_require__(0);\n\nvar _defineProperty = _interopRequireDefault(__webpack_require__(1));\n\n(0, _defineProperty[\"default\"])(exports, \"__esModule\", {\n  value: true\n});\n/*表情菜单数据结构类型END*/\n\nexports[\"default\"] = {\n  menus: ['head', 'bold', 'fontSize', // 'customFontSize',\n  'fontName', 'italic', 'underline', 'strikeThrough', 'indent', 'lineHeight', 'foreColor', 'backColor', 'link', 'list', 'todo', 'justify', 'quote', 'emoticon', 'image', 'video', 'table', 'code', 'splitLine', 'undo', 'redo'],\n  fontNames: ['黑体', '仿宋', '楷体', '标楷体', '华文仿宋', '华文楷体', '宋体', '微软雅黑', 'Arial', 'Tahoma', 'Verdana', 'Times New Roman', 'Courier New'],\n  //  fontNames: [{ name: '宋体', value: '宋体' }],\n  fontSizes: {\n    'x-small': {\n      name: '10px',\n      value: '1'\n    },\n    small: {\n      name: '13px',\n      value: '2'\n    },\n    normal: {\n      name: '16px',\n      value: '3'\n    },\n    large: {\n      name: '18px',\n      value: '4'\n    },\n    'x-large': {\n      name: '24px',\n      value: '5'\n    },\n    'xx-large': {\n      name: '32px',\n      value: '6'\n    },\n    'xxx-large': {\n      name: '48px',\n      value: '7'\n    }\n  },\n  // customFontSize: [ // 该菜单暂时不用 - 王福朋 20200924\n  //     { value: '9px', text: '9' },\n  //     { value: '10px', text: '10' },\n  //     { value: '12px', text: '12' },\n  //     { value: '14px', text: '14' },\n  //     { value: '16px', text: '16' },\n  //     { value: '20px', text: '20' },\n  //     { value: '42px', text: '42' },\n  //     { value: '72px', text: '72' },\n  // ],\n  colors: ['#000000', '#ffffff', '#eeece0', '#1c487f', '#4d80bf', '#c24f4a', '#8baa4a', '#7b5ba1', '#46acc8', '#f9963b'],\n  //插入代码语言配置\n  languageType: ['Bash', 'C', 'C#', 'C++', 'CSS', 'Java', 'JavaScript', 'JSON', 'TypeScript', 'Plain text', 'Html', 'XML', 'SQL', 'Go', 'Kotlin', 'Lua', 'Markdown', 'PHP', 'Python', 'Shell Session', 'Ruby'],\n  languageTab: '　　　　',\n\n  /**\n   * 表情配置菜单\n   * 如果为emoji表情直接作为元素插入\n   * emoticon:Array<EmotionsType>\n   */\n  emotions: [{\n    // tab 的标题\n    title: '表情',\n    // type -> 'emoji' / 'image'\n    type: 'emoji',\n    // content -> 数组\n    content: '😀 😃 😄 😁 😆 😅 😂 🤣 😊 😇 🙂 🙃 😉 😌 😍 😘 😗 😙 😚 😋 😛 😝 😜 🤓 😎 😏 😒 😞 😔 😟 😕 🙁 😣 😖 😫 😩 😢 😭 😤 😠 😡 😳 😱 😨 🤗 🤔 😶 😑 😬 🙄 😯 😴 😷 🤑 😈 🤡 💩 👻 💀 👀 👣'.split(/\\s/)\n  }, {\n    // tab 的标题\n    title: '手势',\n    // type -> 'emoji' / 'image'\n    type: 'emoji',\n    // content -> 数组\n    content: '👐 🙌 👏 🤝 👍 👎 👊 ✊ 🤛 🤜 🤞 ✌️ 🤘 👌 👈 👉 👆 👇 ☝️ ✋ 🤚 🖐 🖖 👋 🤙 💪 🖕 ✍️ 🙏'.split(/\\s/)\n  }],\n  lineHeights: ['1', '1.15', '1.6', '2', '2.5', '3'],\n  undoLimit: 20,\n  indentation: '2em',\n  showMenuTooltips: true,\n  // 菜单栏tooltip为上标还是下标\n  menuTooltipPosition: 'up'\n};\n\n/***/ }),\n/* 288 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * @description 事件配置\n * @author wangfupeng\n */\n\nvar _interopRequireDefault = __webpack_require__(0);\n\nvar _defineProperty = _interopRequireDefault(__webpack_require__(1));\n\n(0, _defineProperty[\"default\"])(exports, \"__esModule\", {\n  value: true\n});\n\nvar const_1 = __webpack_require__(7);\n/**\n * 提示信息\n * @param alertInfo alert info\n * @param alertType 错误提示类型\n * @param debugInfo debug info\n */\n\n\nfunction customAlert(alertInfo, alertType, debugInfo) {\n  window.alert(alertInfo);\n\n  if (debugInfo) {\n    console.error('wangEditor: ' + debugInfo);\n  }\n}\n\nexports[\"default\"] = {\n  onchangeTimeout: 200,\n  onchange: null,\n  onfocus: const_1.EMPTY_FN,\n  onblur: const_1.EMPTY_FN,\n  onCatalogChange: null,\n  customAlert: customAlert\n};\n\n/***/ }),\n/* 289 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * @description 粘贴，配置文件\n * @author wangfupeng\n */\n\nvar _interopRequireDefault = __webpack_require__(0);\n\nvar _defineProperty = _interopRequireDefault(__webpack_require__(1));\n\n(0, _defineProperty[\"default\"])(exports, \"__esModule\", {\n  value: true\n});\nexports[\"default\"] = {\n  // 粘贴过滤样式，默认开启\n  pasteFilterStyle: true,\n  // 粘贴内容时，忽略图片。默认关闭\n  pasteIgnoreImg: false,\n  // 对粘贴的文字进行自定义处理，返回处理后的结果。编辑器会将处理后的结果粘贴到编辑区域中。\n  // IE 暂时不支持\n  pasteTextHandle: function pasteTextHandle(content) {\n    // content 即粘贴过来的内容（html 或 纯文本），可进行自定义处理然后返回\n    return content;\n  }\n};\n\n/***/ }),\n/* 290 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * @description 命令配置项\n * @author wangfupeng\n */\n\nvar _interopRequireDefault = __webpack_require__(0);\n\nvar _defineProperty = _interopRequireDefault(__webpack_require__(1));\n\n(0, _defineProperty[\"default\"])(exports, \"__esModule\", {\n  value: true\n});\nexports[\"default\"] = {\n  styleWithCSS: false // 默认 false\n\n};\n\n/***/ }),\n/* 291 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * @description 图片相关的配置\n * @author wangfupeng\n */\n\nvar _interopRequireDefault = __webpack_require__(0);\n\nvar _defineProperty = _interopRequireDefault(__webpack_require__(1));\n\n(0, _defineProperty[\"default\"])(exports, \"__esModule\", {\n  value: true\n});\n\nvar const_1 = __webpack_require__(7);\n\nexports[\"default\"] = {\n  // 网络图片校验的配置函数\n  linkImgCheck: function linkImgCheck(src, alt, href) {\n    return true;\n  },\n  // 显示“插入网络图片”\n  showLinkImg: true,\n  // 显示“插入图片alt”\n  showLinkImgAlt: true,\n  // 显示“插入图片href”\n  showLinkImgHref: true,\n  // 插入图片成功之后的回调函数\n  linkImgCallback: const_1.EMPTY_FN,\n  // accept\n  uploadImgAccept: ['jpg', 'jpeg', 'png', 'gif', 'bmp'],\n  // 服务端地址\n  uploadImgServer: '',\n  // 使用 base64 存储图片\n  uploadImgShowBase64: false,\n  // 上传图片的最大体积，默认 5M\n  uploadImgMaxSize: 5 * 1024 * 1024,\n  // 一次最多上传多少个图片\n  uploadImgMaxLength: 100,\n  // 自定义上传图片的名称\n  uploadFileName: '',\n  // 上传图片自定义参数\n  uploadImgParams: {},\n  // 自定义参数拼接到 url 中\n  uploadImgParamsWithUrl: false,\n  // 上传图片自定义 header\n  uploadImgHeaders: {},\n  // 钩子函数\n  uploadImgHooks: {},\n  // 上传图片超时时间 ms\n  uploadImgTimeout: 10 * 1000,\n  // 跨域带 cookie\n  withCredentials: false,\n  // 自定义上传\n  customUploadImg: null,\n  // 从媒体库上传\n  uploadImgFromMedia: null\n};\n\n/***/ }),\n/* 292 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _interopRequireDefault = __webpack_require__(0);\n\nvar _defineProperty = _interopRequireDefault(__webpack_require__(1));\n\n(0, _defineProperty[\"default\"])(exports, \"__esModule\", {\n  value: true\n});\nexports[\"default\"] = {\n  lang: 'zh-CN',\n  languages: {\n    'zh-CN': {\n      wangEditor: {\n        重置: '重置',\n        插入: '插入',\n        默认: '默认',\n        创建: '创建',\n        修改: '修改',\n        如: '如',\n        请输入正文: '请输入正文',\n        menus: {\n          title: {\n            标题: '标题',\n            加粗: '加粗',\n            字号: '字号',\n            字体: '字体',\n            斜体: '斜体',\n            下划线: '下划线',\n            删除线: '删除线',\n            缩进: '缩进',\n            行高: '行高',\n            文字颜色: '文字颜色',\n            背景色: '背景色',\n            链接: '链接',\n            序列: '序列',\n            对齐: '对齐',\n            引用: '引用',\n            表情: '表情',\n            图片: '图片',\n            视频: '视频',\n            表格: '表格',\n            代码: '代码',\n            分割线: '分割线',\n            恢复: '恢复',\n            撤销: '撤销',\n            全屏: '全屏',\n            取消全屏: '取消全屏',\n            待办事项: '待办事项'\n          },\n          dropListMenu: {\n            设置标题: '设置标题',\n            背景颜色: '背景颜色',\n            文字颜色: '文字颜色',\n            设置字号: '设置字号',\n            设置字体: '设置字体',\n            设置缩进: '设置缩进',\n            对齐方式: '对齐方式',\n            设置行高: '设置行高',\n            序列: '序列',\n            head: {\n              正文: '正文'\n            },\n            indent: {\n              增加缩进: '增加缩进',\n              减少缩进: '减少缩进'\n            },\n            justify: {\n              靠左: '靠左',\n              居中: '居中',\n              靠右: '靠右',\n              两端: '两端'\n            },\n            list: {\n              无序列表: '无序列表',\n              有序列表: '有序列表'\n            }\n          },\n          panelMenus: {\n            emoticon: {\n              默认: '默认',\n              新浪: '新浪',\n              emoji: 'emoji',\n              手势: '手势'\n            },\n            image: {\n              上传图片: '上传图片',\n              网络图片: '网络图片',\n              图片地址: '图片地址',\n              图片文字说明: '图片文字说明',\n              跳转链接: '跳转链接'\n            },\n            link: {\n              链接: '链接',\n              链接文字: '链接文字',\n              取消链接: '取消链接',\n              查看链接: '查看链接'\n            },\n            video: {\n              插入视频: '插入视频',\n              上传视频: '上传视频'\n            },\n            table: {\n              行: '行',\n              列: '列',\n              的: '的',\n              表格: '表格',\n              添加行: '添加行',\n              删除行: '删除行',\n              添加列: '添加列',\n              删除列: '删除列',\n              设置表头: '设置表头',\n              取消表头: '取消表头',\n              插入表格: '插入表格',\n              删除表格: '删除表格'\n            },\n            code: {\n              删除代码: '删除代码',\n              修改代码: '修改代码',\n              插入代码: '插入代码'\n            }\n          }\n        },\n        validate: {\n          张图片: '张图片',\n          大于: '大于',\n          图片链接: '图片链接',\n          不是图片: '不是图片',\n          返回结果: '返回结果',\n          上传图片超时: '上传图片超时',\n          上传图片错误: '上传图片错误',\n          上传图片失败: '上传图片失败',\n          插入图片错误: '插入图片错误',\n          一次最多上传: '一次最多上传',\n          下载链接失败: '下载链接失败',\n          图片验证未通过: '图片验证未通过',\n          服务器返回状态: '服务器返回状态',\n          上传图片返回结果错误: '上传图片返回结果错误',\n          请替换为支持的图片类型: '请替换为支持的图片类型',\n          您插入的网络图片无法识别: '您插入的网络图片无法识别',\n          您刚才插入的图片链接未通过编辑器校验: '您刚才插入的图片链接未通过编辑器校验',\n          插入视频错误: '插入视频错误',\n          视频链接: '视频链接',\n          不是视频: '不是视频',\n          视频验证未通过: '视频验证未通过',\n          个视频: '个视频',\n          上传视频超时: '上传视频超时',\n          上传视频错误: '上传视频错误',\n          上传视频失败: '上传视频失败',\n          上传视频返回结果错误: '上传视频返回结果错误'\n        }\n      }\n    },\n    en: {\n      wangEditor: {\n        重置: 'reset',\n        插入: 'insert',\n        默认: 'default',\n        创建: 'create',\n        修改: 'edit',\n        如: 'like',\n        请输入正文: 'please enter the text',\n        menus: {\n          title: {\n            标题: 'head',\n            加粗: 'bold',\n            字号: 'font size',\n            字体: 'font family',\n            斜体: 'italic',\n            下划线: 'underline',\n            删除线: 'strikethrough',\n            缩进: 'indent',\n            行高: 'line heihgt',\n            文字颜色: 'font color',\n            背景色: 'background',\n            链接: 'link',\n            序列: 'numbered list',\n            对齐: 'align',\n            引用: 'quote',\n            表情: 'emoticons',\n            图片: 'image',\n            视频: 'media',\n            表格: 'table',\n            代码: 'code',\n            分割线: 'split line',\n            恢复: 'undo',\n            撤销: 'redo',\n            全屏: 'fullscreen',\n            取消全屏: 'cancel fullscreen',\n            待办事项: 'todo'\n          },\n          dropListMenu: {\n            设置标题: 'title',\n            背景颜色: 'background',\n            文字颜色: 'font color',\n            设置字号: 'font size',\n            设置字体: 'font family',\n            设置缩进: 'indent',\n            对齐方式: 'align',\n            设置行高: 'line heihgt',\n            序列: 'list',\n            head: {\n              正文: 'text'\n            },\n            indent: {\n              增加缩进: 'indent',\n              减少缩进: 'outdent'\n            },\n            justify: {\n              靠左: 'left',\n              居中: 'center',\n              靠右: 'right',\n              两端: 'justify'\n            },\n            list: {\n              无序列表: 'unordered',\n              有序列表: 'ordered'\n            }\n          },\n          panelMenus: {\n            emoticon: {\n              表情: 'emoji',\n              手势: 'gesture'\n            },\n            image: {\n              上传图片: 'upload image',\n              网络图片: 'network image',\n              图片地址: 'image link',\n              图片文字说明: 'image alt',\n              跳转链接: 'hyperlink'\n            },\n            link: {\n              链接: 'link',\n              链接文字: 'link text',\n              取消链接: 'unlink',\n              查看链接: 'view links'\n            },\n            video: {\n              插入视频: 'insert video',\n              上传视频: 'upload local video'\n            },\n            table: {\n              行: 'rows',\n              列: 'columns',\n              的: ' ',\n              表格: 'table',\n              添加行: 'insert row',\n              删除行: 'delete row',\n              添加列: 'insert column',\n              删除列: 'delete column',\n              设置表头: 'set header',\n              取消表头: 'cancel header',\n              插入表格: 'insert table',\n              删除表格: 'delete table'\n            },\n            code: {\n              删除代码: 'delete code',\n              修改代码: 'edit code',\n              插入代码: 'insert code'\n            }\n          }\n        },\n        validate: {\n          张图片: 'images',\n          大于: 'greater than',\n          图片链接: 'image link',\n          不是图片: 'is not image',\n          返回结果: 'return results',\n          上传图片超时: 'upload image timeout',\n          上传图片错误: 'upload image error',\n          上传图片失败: 'upload image failed',\n          插入图片错误: 'insert image error',\n          一次最多上传: 'once most at upload',\n          下载链接失败: 'download link failed',\n          图片验证未通过: 'image validate failed',\n          服务器返回状态: 'server return status',\n          上传图片返回结果错误: 'upload image return results error',\n          请替换为支持的图片类型: 'please replace with a supported image type',\n          您插入的网络图片无法识别: 'the network picture you inserted is not recognized',\n          您刚才插入的图片链接未通过编辑器校验: 'the image link you just inserted did not pass the editor verification',\n          插入视频错误: 'insert video error',\n          视频链接: 'video link',\n          不是视频: 'is not video',\n          视频验证未通过: 'video validate failed',\n          个视频: 'videos',\n          上传视频超时: 'upload video timeout',\n          上传视频错误: 'upload video error',\n          上传视频失败: 'upload video failed',\n          上传视频返回结果错误: 'upload video return results error'\n        }\n      }\n    }\n  }\n};\n\n/***/ }),\n/* 293 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * @description 历史记录 - 数据缓存的模式\n * @author fangzhicong\n */\n\nvar _interopRequireDefault = __webpack_require__(0);\n\nvar _defineProperty = _interopRequireDefault(__webpack_require__(1));\n\n(0, _defineProperty[\"default\"])(exports, \"__esModule\", {\n  value: true\n});\n\nvar util_1 = __webpack_require__(6);\n/**\n * 是否为兼容模式。返回 true 表示当前使用兼容（内容备份）模式，否则使用标准（差异备份）模式\n */\n\n\nfunction compatibleMode() {\n  if (util_1.UA.isIE() || util_1.UA.isOldEdge) {\n    return true;\n  }\n\n  return false;\n}\n\nexports[\"default\"] = {\n  compatibleMode: compatibleMode,\n  historyMaxSize: 30\n};\n\n/***/ }),\n/* 294 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * @description 视频相关的配置\n * @author hutianhao\n */\n\nvar _interopRequireDefault = __webpack_require__(0);\n\nvar _defineProperty = _interopRequireDefault(__webpack_require__(1));\n\n(0, _defineProperty[\"default\"])(exports, \"__esModule\", {\n  value: true\n});\n\nvar const_1 = __webpack_require__(7);\n\nexports[\"default\"] = {\n  // 插入网络视频前的回调函数\n  onlineVideoCheck: function onlineVideoCheck(video) {\n    return true;\n  },\n  // 插入网络视频成功之后的回调函数\n  onlineVideoCallback: const_1.EMPTY_FN,\n  // 显示“插入视频”\n  showLinkVideo: true,\n  // accept\n  uploadVideoAccept: ['mp4'],\n  // 服务端地址\n  uploadVideoServer: '',\n  // 上传视频的最大体积，默认 1024M\n  uploadVideoMaxSize: 1 * 1024 * 1024 * 1024,\n  // 一次最多上传多少个视频\n  // uploadVideoMaxLength: 2,\n  // 自定义上传视频的名称\n  uploadVideoName: '',\n  // 上传视频自定义参数\n  uploadVideoParams: {},\n  // 自定义参数拼接到 url 中\n  uploadVideoParamsWithUrl: false,\n  // 上传视频自定义 header\n  uploadVideoHeaders: {},\n  // 钩子函数\n  uploadVideoHooks: {},\n  // 上传视频超时时间 ms 默认2个小时\n  uploadVideoTimeout: 1000 * 60 * 60 * 2,\n  // 跨域带 cookie\n  withVideoCredentials: false,\n  // 自定义上传\n  customUploadVideo: null,\n  // 自定义插入视频\n  customInsertVideo: null\n};\n\n/***/ }),\n/* 295 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _interopRequireDefault = __webpack_require__(0);\n\nvar _defineProperty = _interopRequireDefault(__webpack_require__(1));\n\nvar _trim = _interopRequireDefault(__webpack_require__(16));\n\n(0, _defineProperty[\"default\"])(exports, \"__esModule\", {\n  value: true\n});\n\nvar tslib_1 = __webpack_require__(2);\n/**\n * @description selection range API\n * @author wangfupeng\n */\n\n\nvar dom_core_1 = tslib_1.__importDefault(__webpack_require__(3));\n\nvar util_1 = __webpack_require__(6);\n\nvar const_1 = __webpack_require__(7);\n\nvar SelectionAndRange = function () {\n  function SelectionAndRange(editor) {\n    this._currentRange = null;\n    this.editor = editor;\n  }\n  /**\n   * 获取当前 range\n   */\n\n\n  SelectionAndRange.prototype.getRange = function () {\n    return this._currentRange;\n  };\n  /**\n   * 保存选区范围\n   * @param _range 选区范围\n   */\n\n\n  SelectionAndRange.prototype.saveRange = function (_range) {\n    if (_range) {\n      // 保存已有选区\n      this._currentRange = _range;\n      return;\n    } // 获取当前的选区\n\n\n    var selection = window.getSelection();\n\n    if (selection.rangeCount === 0) {\n      return;\n    }\n\n    var range = selection.getRangeAt(0); // 获取选区范围的 DOM 元素\n\n    var $containerElem = this.getSelectionContainerElem(range);\n\n    if (!($containerElem === null || $containerElem === void 0 ? void 0 : $containerElem.length)) {\n      // 当 选区范围内没有 DOM元素 则抛出\n      return;\n    }\n\n    if ($containerElem.attr('contenteditable') === 'false' || $containerElem.parentUntil('[contenteditable=false]')) {\n      // 这里大体意义上就是个保险\n      // 确保 编辑区域 的 contenteditable属性 的值为 true\n      return;\n    }\n\n    var editor = this.editor;\n    var $textElem = editor.$textElem;\n\n    if ($textElem.isContain($containerElem)) {\n      if ($textElem.elems[0] === $containerElem.elems[0]) {\n        var _context;\n\n        if ((0, _trim[\"default\"])(_context = $textElem.html()).call(_context) === const_1.EMPTY_P) {\n          var $children = $textElem.children();\n          var $last = $children === null || $children === void 0 ? void 0 : $children.last();\n          editor.selection.createRangeByElem($last, true, true);\n          editor.selection.restoreSelection();\n        }\n      } // 是编辑内容之内的\n\n\n      this._currentRange = range;\n    }\n  };\n  /**\n   * 折叠选区范围\n   * @param toStart true 开始位置，false 结束位置\n   */\n\n\n  SelectionAndRange.prototype.collapseRange = function (toStart) {\n    if (toStart === void 0) {\n      toStart = false;\n    }\n\n    var range = this._currentRange;\n\n    if (range) {\n      range.collapse(toStart);\n    }\n  };\n  /**\n   * 获取选区范围内的文字\n   */\n\n\n  SelectionAndRange.prototype.getSelectionText = function () {\n    var range = this._currentRange;\n\n    if (range) {\n      return range.toString();\n    } else {\n      return '';\n    }\n  };\n  /**\n   * 获取选区范围的 DOM 元素\n   * @param range 选区范围\n   */\n\n\n  SelectionAndRange.prototype.getSelectionContainerElem = function (range) {\n    var r;\n    r = range || this._currentRange;\n    var elem;\n\n    if (r) {\n      elem = r.commonAncestorContainer;\n      return dom_core_1[\"default\"](elem.nodeType === 1 ? elem : elem.parentNode);\n    }\n  };\n  /**\n   * 选区范围开始的 DOM 元素\n   * @param range 选区范围\n   */\n\n\n  SelectionAndRange.prototype.getSelectionStartElem = function (range) {\n    var r;\n    r = range || this._currentRange;\n    var elem;\n\n    if (r) {\n      elem = r.startContainer;\n      return dom_core_1[\"default\"](elem.nodeType === 1 ? elem : elem.parentNode);\n    }\n  };\n  /**\n   * 选区范围结束的 DOM 元素\n   * @param range 选区范围\n   */\n\n\n  SelectionAndRange.prototype.getSelectionEndElem = function (range) {\n    var r;\n    r = range || this._currentRange;\n    var elem;\n\n    if (r) {\n      elem = r.endContainer;\n      return dom_core_1[\"default\"](elem.nodeType === 1 ? elem : elem.parentNode);\n    }\n  };\n  /**\n   * 选区是否为空（没有选择文字）\n   */\n\n\n  SelectionAndRange.prototype.isSelectionEmpty = function () {\n    var range = this._currentRange;\n\n    if (range && range.startContainer) {\n      if (range.startContainer === range.endContainer) {\n        if (range.startOffset === range.endOffset) {\n          return true;\n        }\n      }\n    }\n\n    return false;\n  };\n  /**\n   * 恢复选区范围\n   */\n\n\n  SelectionAndRange.prototype.restoreSelection = function () {\n    var selection = window.getSelection();\n    var r = this._currentRange;\n\n    if (selection && r) {\n      selection.removeAllRanges();\n      selection.addRange(r);\n    }\n  };\n  /**\n   * 创建一个空白（即 &#8203 字符）选区\n   */\n\n\n  SelectionAndRange.prototype.createEmptyRange = function () {\n    var editor = this.editor;\n    var range = this.getRange();\n    var $elem;\n\n    if (!range) {\n      // 当前无 range\n      return;\n    }\n\n    if (!this.isSelectionEmpty()) {\n      // 当前选区必须没有内容才可以，有内容就直接 return\n      return;\n    }\n\n    try {\n      // 目前只支持 webkit 内核\n      if (util_1.UA.isWebkit()) {\n        // 插入 &#8203\n        editor.cmd[\"do\"]('insertHTML', '&#8203;'); // 修改 offset 位置\n\n        range.setEnd(range.endContainer, range.endOffset + 1); // 存储\n\n        this.saveRange(range);\n      } else {\n        $elem = dom_core_1[\"default\"]('<strong>&#8203;</strong>');\n        editor.cmd[\"do\"]('insertElem', $elem);\n        this.createRangeByElem($elem, true);\n      }\n    } catch (ex) {// 部分情况下会报错，兼容一下\n    }\n  };\n  /**\n   * 重新设置选区\n   * @param startDom 选区开始的元素\n   * @param endDom 选区结束的元素\n   */\n\n\n  SelectionAndRange.prototype.createRangeByElems = function (startDom, endDom) {\n    var selection = window.getSelection ? window.getSelection() : document.getSelection(); //清除所有的选区\n\n    selection === null || selection === void 0 ? void 0 : selection.removeAllRanges();\n    var range = document.createRange();\n    range.setStart(startDom, 0); // 设置多行标签之后，第二个参数会被h标签内的b、font标签等影响range范围的选取\n\n    range.setEnd(endDom, endDom.childNodes.length || 1); // 保存设置好的选区\n\n    this.saveRange(range); //恢复选区\n\n    this.restoreSelection();\n  };\n  /**\n   * 根据 DOM 元素设置选区\n   * @param $elem DOM 元素\n   * @param toStart true 开始位置，false 结束位置\n   * @param isContent 是否选中 $elem 的内容\n   */\n\n\n  SelectionAndRange.prototype.createRangeByElem = function ($elem, toStart, isContent) {\n    if (!$elem.length) {\n      return;\n    }\n\n    var elem = $elem.elems[0];\n    var range = document.createRange();\n\n    if (isContent) {\n      range.selectNodeContents(elem);\n    } else {\n      // 如果用户没有传入 isContent 参数，那就默认为 false\n      range.selectNode(elem);\n    }\n\n    if (toStart != null) {\n      // 传入了 toStart 参数，折叠选区。如果没传入 toStart 参数，则忽略这一步\n      range.collapse(toStart);\n\n      if (!toStart) {\n        this.saveRange(range);\n        this.editor.selection.moveCursor(elem);\n      }\n    } // 存储 range\n\n\n    this.saveRange(range);\n  };\n  /**\n   * 获取 当前 选取范围的 顶级(段落) 元素\n   * @param $editor\n   */\n\n\n  SelectionAndRange.prototype.getSelectionRangeTopNodes = function () {\n    var _a, _b; // 清空，防止叠加元素\n\n\n    var $nodeList;\n    var $startElem = (_a = this.getSelectionStartElem()) === null || _a === void 0 ? void 0 : _a.getNodeTop(this.editor);\n    var $endElem = (_b = this.getSelectionEndElem()) === null || _b === void 0 ? void 0 : _b.getNodeTop(this.editor);\n    $nodeList = this.recordSelectionNodes(dom_core_1[\"default\"]($startElem), dom_core_1[\"default\"]($endElem));\n    return $nodeList;\n  };\n  /**\n   * 移动光标位置,默认情况下在尾部\n   * 有一个特殊情况是firefox下的文本节点会自动补充一个br元素，会导致自动换行\n   * 所以默认情况下在firefox下的文本节点会自动移动到br前面\n   * @param {Node} node 元素节点\n   * @param {number} position 光标的位置\n   */\n\n\n  SelectionAndRange.prototype.moveCursor = function (node, position) {\n    var _a;\n\n    var range = this.getRange(); //对文本节点特殊处理\n\n    var len = node.nodeType === 3 ? (_a = node.nodeValue) === null || _a === void 0 ? void 0 : _a.length : node.childNodes.length;\n\n    if ((util_1.UA.isFirefox || util_1.UA.isIE()) && len !== 0) {\n      // firefox下在节点为文本节点和节点最后一个元素为文本节点的情况下\n      if (node.nodeType === 3 || node.childNodes[len - 1].nodeName === 'BR') {\n        len = len - 1;\n      }\n    }\n\n    var pos = position !== null && position !== void 0 ? position : len;\n\n    if (!range) {\n      return;\n    }\n\n    if (node) {\n      range.setStart(node, pos);\n      range.setEnd(node, pos);\n      this.restoreSelection();\n    }\n  };\n  /**\n   * 获取光标在当前选区的位置\n   */\n\n\n  SelectionAndRange.prototype.getCursorPos = function () {\n    var selection = window.getSelection();\n    return selection === null || selection === void 0 ? void 0 : selection.anchorOffset;\n  };\n  /**\n   * 清除当前选区的Range,notice:不影响已保存的Range\n   */\n\n\n  SelectionAndRange.prototype.clearWindowSelectionRange = function () {\n    var selection = window.getSelection();\n\n    if (selection) {\n      selection.removeAllRanges();\n    }\n  };\n  /**\n   * 记录节点 - 从选区开始节点开始 一直到匹配到选区结束节点为止\n   * @param $node 节点\n   */\n\n\n  SelectionAndRange.prototype.recordSelectionNodes = function ($node, $endElem) {\n    var $list = [];\n    var isEnd = true;\n    /**\n    @author:lw\n    @description 解决ctrl+a全选报错的bug $elem.getNodeName()可能会触发$elem[0]未定义\n    **/\n\n    try {\n      var $NODE = $node;\n      var $textElem = this.editor.$textElem; // $NODE元素为空时不需要进行循环\n\n      while (isEnd) {\n        var $elem = $NODE === null || $NODE === void 0 ? void 0 : $NODE.getNodeTop(this.editor);\n        if ($elem.getNodeName() === 'BODY') isEnd = false; // 兜底\n\n        if ($elem.length > 0) {\n          $list.push(dom_core_1[\"default\"]($NODE)); // 两个边界情况：\n          // 1. 当前元素就是我们要找的末尾元素\n          // 2. 当前元素已经是编辑区顶级元素（否则会找到编辑区的兄弟节点，比如placeholder元素）\n\n          if (($endElem === null || $endElem === void 0 ? void 0 : $endElem.equal($elem)) || $textElem.equal($elem)) {\n            isEnd = false;\n          } else {\n            $NODE = $elem.getNextSibling();\n          }\n        }\n      }\n    } catch (e) {\n      isEnd = false;\n    }\n\n    return $list;\n  };\n  /**\n   * 将当前 range 设置到 node 元素并初始化位置\n   * 解决编辑器内容为空时，菜单不生效的问题\n   * @param node 元素节点\n   */\n\n\n  SelectionAndRange.prototype.setRangeToElem = function (node) {\n    var range = this.getRange();\n    range === null || range === void 0 ? void 0 : range.setStart(node, 0);\n    range === null || range === void 0 ? void 0 : range.setEnd(node, 0);\n  };\n\n  return SelectionAndRange;\n}();\n\nexports[\"default\"] = SelectionAndRange;\n\n/***/ }),\n/* 296 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * @description 封装 document.execCommand\n * @author wangfupeng\n */\n\nvar _interopRequireDefault = __webpack_require__(0);\n\nvar _defineProperty = _interopRequireDefault(__webpack_require__(1));\n\n(0, _defineProperty[\"default\"])(exports, \"__esModule\", {\n  value: true\n});\n\nvar tslib_1 = __webpack_require__(2);\n\nvar dom_core_1 = tslib_1.__importDefault(__webpack_require__(3));\n\nvar Command = function () {\n  function Command(editor) {\n    this.editor = editor;\n  }\n  /**\n   * 执行富文本操作的命令\n   * @param name name\n   * @param value value\n   */\n\n\n  Command.prototype[\"do\"] = function (name, value) {\n    var editor = this.editor;\n\n    if (editor.config.styleWithCSS) {\n      document.execCommand('styleWithCSS', false, 'true');\n    }\n\n    var selection = editor.selection; // 如果无选区，忽略\n\n    if (!selection.getRange()) {\n      return;\n    } // 恢复选取\n\n\n    selection.restoreSelection(); // 执行\n\n    switch (name) {\n      case 'insertHTML':\n        this.insertHTML(value);\n        break;\n\n      case 'insertElem':\n        this.insertElem(value);\n        break;\n\n      default:\n        // 默认 command\n        this.execCommand(name, value);\n        break;\n    } // 修改菜单状态\n\n\n    editor.menus.changeActive(); // 最后，恢复选取保证光标在原来的位置闪烁\n\n    selection.saveRange();\n    selection.restoreSelection();\n  };\n  /**\n   * 插入 html\n   * @param html html 字符串\n   */\n\n\n  Command.prototype.insertHTML = function (html) {\n    var editor = this.editor;\n    var range = editor.selection.getRange();\n    if (range == null) return;\n\n    if (this.queryCommandSupported('insertHTML')) {\n      // W3C\n      this.execCommand('insertHTML', html);\n    } else if (range.insertNode) {\n      // IE\n      range.deleteContents();\n\n      if (dom_core_1[\"default\"](html).elems.length > 0) {\n        range.insertNode(dom_core_1[\"default\"](html).elems[0]);\n      } else {\n        var newNode = document.createElement('p');\n        newNode.appendChild(document.createTextNode(html));\n        range.insertNode(newNode);\n      }\n\n      editor.selection.collapseRange();\n    } // else if (range.pasteHTML) {\n    //     // IE <= 10\n    //     range.pasteHTML(html)\n    // }\n\n  };\n  /**\n   * 插入 DOM 元素\n   * @param $elem DOM 元素\n   */\n\n\n  Command.prototype.insertElem = function ($elem) {\n    var editor = this.editor;\n    var range = editor.selection.getRange();\n    if (range == null) return;\n\n    if (range.insertNode) {\n      range.deleteContents();\n      range.insertNode($elem.elems[0]);\n    }\n  };\n  /**\n   * 执行 document.execCommand\n   * @param name name\n   * @param value value\n   */\n\n\n  Command.prototype.execCommand = function (name, value) {\n    document.execCommand(name, false, value);\n  };\n  /**\n   * 执行 document.queryCommandValue\n   * @param name name\n   */\n\n\n  Command.prototype.queryCommandValue = function (name) {\n    return document.queryCommandValue(name);\n  };\n  /**\n   * 执行 document.queryCommandState\n   * @param name name\n   */\n\n\n  Command.prototype.queryCommandState = function (name) {\n    return document.queryCommandState(name);\n  };\n  /**\n   * 执行 document.queryCommandSupported\n   * @param name name\n   */\n\n\n  Command.prototype.queryCommandSupported = function (name) {\n    return document.queryCommandSupported(name);\n  };\n\n  return Command;\n}();\n\nexports[\"default\"] = Command;\n\n/***/ }),\n/* 297 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * @description 编辑区域，入口文件\n * @author wangfupeng\n */\n\nvar _interopRequireDefault = __webpack_require__(0);\n\nvar _defineProperty = _interopRequireDefault(__webpack_require__(1));\n\nvar _find = _interopRequireDefault(__webpack_require__(32));\n\nvar _forEach = _interopRequireDefault(__webpack_require__(4));\n\nvar _trim = _interopRequireDefault(__webpack_require__(16));\n\nvar _indexOf = _interopRequireDefault(__webpack_require__(28));\n\nvar _setTimeout2 = _interopRequireDefault(__webpack_require__(48));\n\n(0, _defineProperty[\"default\"])(exports, \"__esModule\", {\n  value: true\n});\n\nvar tslib_1 = __webpack_require__(2);\n\nvar dom_core_1 = tslib_1.__importDefault(__webpack_require__(3));\n\nvar index_1 = tslib_1.__importDefault(__webpack_require__(302));\n\nvar util_1 = __webpack_require__(6);\n\nvar getChildrenJSON_1 = tslib_1.__importDefault(__webpack_require__(314));\n\nvar getHtmlByNodeList_1 = tslib_1.__importDefault(__webpack_require__(315));\n\nvar const_1 = __webpack_require__(7);\n\nvar Text = function () {\n  function Text(editor) {\n    this.editor = editor;\n    this.eventHooks = {\n      onBlurEvents: [],\n      changeEvents: [],\n      dropEvents: [],\n      clickEvents: [],\n      keydownEvents: [],\n      keyupEvents: [],\n      tabUpEvents: [],\n      tabDownEvents: [],\n      enterUpEvents: [],\n      enterDownEvents: [],\n      deleteUpEvents: [],\n      deleteDownEvents: [],\n      pasteEvents: [],\n      linkClickEvents: [],\n      codeClickEvents: [],\n      textScrollEvents: [],\n      toolbarClickEvents: [],\n      imgClickEvents: [],\n      imgDragBarMouseDownEvents: [],\n      tableClickEvents: [],\n      menuClickEvents: [],\n      dropListMenuHoverEvents: [],\n      splitLineEvents: [],\n      videoClickEvents: []\n    };\n  }\n  /**\n   * 初始化\n   */\n\n\n  Text.prototype.init = function () {\n    // 实时保存选取范围\n    this._saveRange(); // 绑定事件\n\n\n    this._bindEventHooks(); // 初始化 text 事件钩子函数\n\n\n    index_1[\"default\"](this);\n  };\n  /**\n   * 切换placeholder\n   */\n\n\n  Text.prototype.togglePlaceholder = function () {\n    var _context;\n\n    var html = this.html();\n    var $placeholder = (0, _find[\"default\"])(_context = this.editor.$textContainerElem).call(_context, '.placeholder');\n    $placeholder.hide();\n    if (this.editor.isComposing) return;\n    if (!html || html === ' ') $placeholder.show();\n  };\n  /**\n   * 清空内容\n   */\n\n\n  Text.prototype.clear = function () {\n    this.html(const_1.EMPTY_P);\n  };\n  /**\n   * 设置/获取 html\n   * @param val html 字符串\n   */\n\n\n  Text.prototype.html = function (val) {\n    var editor = this.editor;\n    var $textElem = editor.$textElem; // 没有 val ，则是获取 html\n\n    if (val == null) {\n      var html_1 = $textElem.html(); // 未选中任何内容的时候点击“加粗”或者“斜体”等按钮，就得需要一个空的占位符 &#8203 ，这里替换掉\n\n      html_1 = html_1.replace(/\\u200b/gm, ''); // 去掉空行\n\n      html_1 = html_1.replace(/<p><\\/p>/gim, ''); // 去掉最后的 空标签\n\n      html_1 = html_1.replace(const_1.EMPTY_P_LAST_REGEX, ''); // 为了避免用户在最后生成的EMPTY_P标签中编辑数据, 最后产生多余标签, 去除所有p标签上的data-we-empty-p属性\n\n      html_1 = html_1.replace(const_1.EMPTY_P_REGEX, '<p>');\n      /**\n       * 这里的代码为了处理火狐多余的空行标签,但是强制删除空行标签会带来其他问题\n       * html()方法返回的的值,EMPTY_P中pr会被删除,只留下<p>,点不进去,从而产生垃圾数据\n       * 目前在末位有多个空行的情况下执行撤销重做操作,会产生一种不记录末尾空行的错觉\n       * 暂时注释, 等待进一步的兼容处理\n       */\n      // html = html.replace(/><br>(?!<)/gi, '>') // 过滤 <p><br>内容</p> 中的br\n      // html = html.replace(/(?!>)<br></gi, '<') // 过滤 <p>内容<br></p> 中的br\n\n      /**\n       * pre标签格式化\n       * html()方法理论上应当输出纯净的代码文本,但是对于是否解析html标签还没有良好的判断\n       * 如果去除hljs的标签,在解析状态下回显,会造成显示错误并且无法再通过hljs方法渲染\n       * 暂且其弃用\n       */\n      // html = formatCodeHtml(editor, html)\n      // 将没有自闭和的标签过滤为自闭和\n\n      var selfCloseHtmls = html_1.match(/<(img|br|hr|input)[^>]*>/gi);\n\n      if (selfCloseHtmls !== null) {\n        (0, _forEach[\"default\"])(selfCloseHtmls).call(selfCloseHtmls, function (item) {\n          if (!item.match(/\\/>/)) {\n            html_1 = html_1.replace(item, item.substring(0, item.length - 1) + '/>');\n          }\n        });\n      }\n\n      return html_1;\n    } // 有 val ，则是设置 html\n\n\n    val = (0, _trim[\"default\"])(val).call(val);\n\n    if (val === '') {\n      val = const_1.EMPTY_P;\n    }\n\n    if ((0, _indexOf[\"default\"])(val).call(val, '<') !== 0) {\n      // 内容用 p 标签包裹\n      val = \"<p>\" + val + \"</p>\";\n    }\n\n    $textElem.html(val); // 初始化选区，将光标定位到内容尾部\n\n    editor.initSelection();\n  };\n  /**\n   * 将json设置成html至编辑器\n   * @param nodeList json格式\n   */\n\n\n  Text.prototype.setJSON = function (nodeList) {\n    var html = getHtmlByNodeList_1[\"default\"](nodeList).children();\n    var editor = this.editor;\n    var $textElem = editor.$textElem; // 没有获取到元素的情况\n\n    if (!html) return; // 替换文本节点下全部子节点\n\n    $textElem.replaceChildAll(html);\n  };\n  /**\n   * 获取 json 格式的数据\n   */\n\n\n  Text.prototype.getJSON = function () {\n    var editor = this.editor;\n    var $textElem = editor.$textElem;\n    return getChildrenJSON_1[\"default\"]($textElem);\n  };\n\n  Text.prototype.text = function (val) {\n    var editor = this.editor;\n    var $textElem = editor.$textElem; // 没有 val ，是获取 text\n\n    if (val == null) {\n      var text = $textElem.text(); // 未选中任何内容的时候点击“加粗”或者“斜体”等按钮，就得需要一个空的占位符 &#8203 ，这里替换掉\n\n      text = text.replace(/\\u200b/gm, '');\n      return text;\n    } // 有 val ，则是设置 text\n\n\n    $textElem.text(\"<p>\" + val + \"</p>\"); // 初始化选区，将光标定位到内容尾部\n\n    editor.initSelection();\n  };\n  /**\n   * 追加 html 内容\n   * @param html html 字符串\n   */\n\n\n  Text.prototype.append = function (html) {\n    var editor = this.editor;\n\n    if ((0, _indexOf[\"default\"])(html).call(html, '<') !== 0) {\n      // 普通字符串，用 <p> 包裹\n      html = \"<p>\" + html + \"</p>\";\n    }\n\n    this.html(this.html() + html); // 初始化选区，将光标定位到内容尾部\n\n    editor.initSelection();\n  };\n  /**\n   * 每一步操作，都实时保存选区范围\n   */\n\n\n  Text.prototype._saveRange = function () {\n    var editor = this.editor;\n    var $textElem = editor.$textElem;\n    var $document = dom_core_1[\"default\"](document); // 保存当前的选区\n\n    function saveRange() {\n      // 随时保存选区\n      editor.selection.saveRange(); // 更新按钮 active 状态\n\n      editor.menus.changeActive();\n    } // 按键后保存\n\n\n    $textElem.on('keyup', saveRange); // 点击后保存，为了避免被多次执行而导致造成浪费，这里对 click 使用一次性绑定\n\n    function onceClickSaveRange() {\n      saveRange();\n      $textElem.off('click', onceClickSaveRange);\n    }\n\n    $textElem.on('click', onceClickSaveRange);\n\n    function handleMouseUp() {\n      // 在编辑器区域之外完成抬起，保存此时编辑区内的新选区，取消此时鼠标抬起事件\n      saveRange();\n      $document.off('mouseup', handleMouseUp);\n    }\n\n    function listenMouseLeave() {\n      // 当鼠标移动到外面，要监听鼠标抬起操作\n      $document.on('mouseup', handleMouseUp); // 首次移出时即接触leave监听，防止用户不断移入移出多次注册handleMouseUp\n\n      $textElem.off('mouseleave', listenMouseLeave);\n    }\n\n    $textElem.on('mousedown', function () {\n      // mousedown 状态下，要坚听鼠标滑动到编辑区域外面\n      $textElem.on('mouseleave', listenMouseLeave);\n    });\n    $textElem.on('mouseup', function (e) {\n      // 记得移除$textElem的mouseleave事件, 避免内存泄露\n      $textElem.off('mouseleave', listenMouseLeave); // fix：避免当选中一段文字之后，再次点击文字中间位置无法更新selection问题。issue#3096\n\n      (0, _setTimeout2[\"default\"])(function () {\n        var selection = editor.selection;\n        var range = selection.getRange();\n        if (range === null) return;\n        saveRange();\n      }, 0);\n    });\n  };\n  /**\n   * 绑定事件，事件会触发钩子函数\n   */\n\n\n  Text.prototype._bindEventHooks = function () {\n    var editor = this.editor;\n    var $textElem = editor.$textElem;\n    var eventHooks = this.eventHooks; // click hooks\n\n    $textElem.on('click', function (e) {\n      var clickEvents = eventHooks.clickEvents;\n      (0, _forEach[\"default\"])(clickEvents).call(clickEvents, function (fn) {\n        return fn(e);\n      });\n    }); // enter 键 up 时的 hooks\n\n    $textElem.on('keyup', function (e) {\n      if (e.keyCode !== 13) return;\n      var enterUpEvents = eventHooks.enterUpEvents;\n      (0, _forEach[\"default\"])(enterUpEvents).call(enterUpEvents, function (fn) {\n        return fn(e);\n      });\n    }); // 键盘 up 时的 hooks\n\n    $textElem.on('keyup', function (e) {\n      var keyupEvents = eventHooks.keyupEvents;\n      (0, _forEach[\"default\"])(keyupEvents).call(keyupEvents, function (fn) {\n        return fn(e);\n      });\n    }); // 键盘 down 时的 hooks\n\n    $textElem.on('keydown', function (e) {\n      var keydownEvents = eventHooks.keydownEvents;\n      (0, _forEach[\"default\"])(keydownEvents).call(keydownEvents, function (fn) {\n        return fn(e);\n      });\n    }); // delete 键 up 时 hooks\n\n    $textElem.on('keyup', function (e) {\n      if (e.keyCode !== 8 && e.keyCode !== 46) return;\n      var deleteUpEvents = eventHooks.deleteUpEvents;\n      (0, _forEach[\"default\"])(deleteUpEvents).call(deleteUpEvents, function (fn) {\n        return fn(e);\n      });\n    }); // delete 键 down 时 hooks\n\n    $textElem.on('keydown', function (e) {\n      if (e.keyCode !== 8 && e.keyCode !== 46) return;\n      var deleteDownEvents = eventHooks.deleteDownEvents;\n      (0, _forEach[\"default\"])(deleteDownEvents).call(deleteDownEvents, function (fn) {\n        return fn(e);\n      });\n    }); // 粘贴\n\n    $textElem.on('paste', function (e) {\n      if (util_1.UA.isIE()) return; // IE 不支持\n      // 阻止默认行为，使用 execCommand 的粘贴命令\n\n      e.preventDefault();\n      var pasteEvents = eventHooks.pasteEvents;\n      (0, _forEach[\"default\"])(pasteEvents).call(pasteEvents, function (fn) {\n        return fn(e);\n      });\n    }); // 撤销/恢复 快捷键\n\n    $textElem.on('keydown', function (e) {\n      if ( // 编辑器处于聚焦状态下（多编辑器实例） || 当前处于兼容模式（兼容模式撤销/恢复后不聚焦，所以直接过，但会造成多编辑器同时撤销/恢复）\n      (editor.isFocus || editor.isCompatibleMode) && (e.ctrlKey || e.metaKey) && e.keyCode === 90) {\n        // 取消默认行为\n        e.preventDefault(); // 执行事件\n\n        if (e.shiftKey) {\n          // 恢复\n          editor.history.restore();\n        } else {\n          // 撤销\n          editor.history.revoke();\n        }\n      }\n    }); // tab up\n\n    $textElem.on('keyup', function (e) {\n      if (e.keyCode !== 9) return;\n      e.preventDefault();\n      var tabUpEvents = eventHooks.tabUpEvents;\n      (0, _forEach[\"default\"])(tabUpEvents).call(tabUpEvents, function (fn) {\n        return fn(e);\n      });\n    }); // tab down\n\n    $textElem.on('keydown', function (e) {\n      if (e.keyCode !== 9) return;\n      e.preventDefault();\n      var tabDownEvents = eventHooks.tabDownEvents;\n      (0, _forEach[\"default\"])(tabDownEvents).call(tabDownEvents, function (fn) {\n        return fn(e);\n      });\n    }); // 文本编辑区域 滚动时触发\n\n    $textElem.on('scroll', // 使用节流\n    util_1.throttle(function (e) {\n      var textScrollEvents = eventHooks.textScrollEvents;\n      (0, _forEach[\"default\"])(textScrollEvents).call(textScrollEvents, function (fn) {\n        return fn(e);\n      });\n    }, 100)); // 拖拽相关的事件\n\n    function preventDefault(e) {\n      // 禁用 document 拖拽事件\n      e.preventDefault();\n    }\n\n    dom_core_1[\"default\"](document).on('dragleave', preventDefault).on('drop', preventDefault).on('dragenter', preventDefault).on('dragover', preventDefault); // 全局事件在编辑器实例销毁的时候进行解绑\n\n    editor.beforeDestroy(function () {\n      dom_core_1[\"default\"](document).off('dragleave', preventDefault).off('drop', preventDefault).off('dragenter', preventDefault).off('dragover', preventDefault);\n    });\n    $textElem.on('drop', function (e) {\n      e.preventDefault();\n      var events = eventHooks.dropEvents;\n      (0, _forEach[\"default\"])(events).call(events, function (fn) {\n        return fn(e);\n      });\n    }); // link click\n\n    $textElem.on('click', function (e) {\n      // 存储链接元素\n      var $link = null;\n      var target = e.target;\n      var $target = dom_core_1[\"default\"](target);\n\n      if ($target.getNodeName() === 'A') {\n        // 当前点击的就是一个链接\n        $link = $target;\n      } else {\n        // 否则，向父节点中寻找链接\n        var $parent = $target.parentUntil('a');\n\n        if ($parent != null) {\n          // 找到了\n          $link = $parent;\n        }\n      }\n\n      if (!$link) return; // 没有点击链接，则返回\n\n      var linkClickEvents = eventHooks.linkClickEvents;\n      (0, _forEach[\"default\"])(linkClickEvents).call(linkClickEvents, function (fn) {\n        return fn($link);\n      });\n    }); // img click\n\n    $textElem.on('click', function (e) {\n      // 存储图片元素\n      var $img = null;\n      var target = e.target;\n      var $target = dom_core_1[\"default\"](target); //处理图片点击 去除掉emoji图片的情况\n\n      if ($target.getNodeName() === 'IMG' && !$target.elems[0].getAttribute('data-emoji')) {\n        // 当前点击的就是img\n        e.stopPropagation();\n        $img = $target;\n      }\n\n      if (!$img) return; // 没有点击图片，则返回\n\n      var imgClickEvents = eventHooks.imgClickEvents;\n      (0, _forEach[\"default\"])(imgClickEvents).call(imgClickEvents, function (fn) {\n        return fn($img);\n      });\n    }); // code click\n\n    $textElem.on('click', function (e) {\n      // 存储代码元素\n      var $code = null;\n      var target = e.target;\n      var $target = dom_core_1[\"default\"](target);\n\n      if ($target.getNodeName() === 'PRE') {\n        // 当前点击的就是一个链接\n        $code = $target;\n      } else {\n        // 否则，向父节点中寻找链接\n        var $parent = $target.parentUntil('pre');\n\n        if ($parent !== null) {\n          // 找到了\n          $code = $parent;\n        }\n      }\n\n      if (!$code) return;\n      var codeClickEvents = eventHooks.codeClickEvents;\n      (0, _forEach[\"default\"])(codeClickEvents).call(codeClickEvents, function (fn) {\n        return fn($code);\n      });\n    }); // splitLine click\n\n    $textElem.on('click', function (e) {\n      // 存储分割线元素\n      var $splitLine = null;\n      var target = e.target;\n      var $target = dom_core_1[\"default\"](target); // 判断当前点击元素\n\n      if ($target.getNodeName() === 'HR') {\n        $splitLine = $target;\n      } else {\n        $target == null;\n      }\n\n      if (!$splitLine) return; // 没有点击分割线，则返回\n      // 设置、恢复选区\n\n      editor.selection.createRangeByElem($splitLine);\n      editor.selection.restoreSelection();\n      var splitLineClickEvents = eventHooks.splitLineEvents;\n      (0, _forEach[\"default\"])(splitLineClickEvents).call(splitLineClickEvents, function (fn) {\n        return fn($splitLine);\n      });\n    }); // 菜单栏被点击\n\n    editor.$toolbarElem.on('click', function (e) {\n      var toolbarClickEvents = eventHooks.toolbarClickEvents;\n      (0, _forEach[\"default\"])(toolbarClickEvents).call(toolbarClickEvents, function (fn) {\n        return fn(e);\n      });\n    }); //mousedown事件\n\n    editor.$textContainerElem.on('mousedown', function (e) {\n      var target = e.target;\n      var $target = dom_core_1[\"default\"](target);\n\n      if ($target.hasClass('w-e-img-drag-rb')) {\n        // 点击的元素，是图片拖拽调整大小的 bar\n        var imgDragBarMouseDownEvents = eventHooks.imgDragBarMouseDownEvents;\n        (0, _forEach[\"default\"])(imgDragBarMouseDownEvents).call(imgDragBarMouseDownEvents, function (fn) {\n          return fn();\n        });\n      }\n    }); //table click\n\n    $textElem.on('click', function (e) {\n      // 存储元素\n      var $dom = null;\n      var target = e.target; //获取最祖父元素\n\n      $dom = dom_core_1[\"default\"](target).parentUntilEditor('TABLE', editor, target); // 没有table范围内，则返回\n\n      if (!$dom) return;\n      var tableClickEvents = eventHooks.tableClickEvents;\n      (0, _forEach[\"default\"])(tableClickEvents).call(tableClickEvents, function (fn) {\n        return fn($dom, e);\n      });\n    }); // enter 键 down\n\n    $textElem.on('keydown', function (e) {\n      if (e.keyCode !== 13) return;\n      var enterDownEvents = eventHooks.enterDownEvents;\n      (0, _forEach[\"default\"])(enterDownEvents).call(enterDownEvents, function (fn) {\n        return fn(e);\n      });\n    }); // 视频 click\n\n    $textElem.on('click', function (e) {\n      // 存储视频\n      var $video = null;\n      var target = e.target;\n      var $target = dom_core_1[\"default\"](target); //处理视频点击 简单的video 标签\n\n      if ($target.getNodeName() === 'VIDEO') {\n        // 当前点击的就是视频\n        e.stopPropagation();\n        $video = $target;\n      }\n\n      if (!$video) return; // 没有点击视频，则返回\n\n      var videoClickEvents = eventHooks.videoClickEvents;\n      (0, _forEach[\"default\"])(videoClickEvents).call(videoClickEvents, function (fn) {\n        return fn($video);\n      });\n    });\n  };\n\n  return Text;\n}();\n\nexports[\"default\"] = Text;\n\n/***/ }),\n/* 298 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar parent = __webpack_require__(299);\n\nmodule.exports = parent;\n\n\n/***/ }),\n/* 299 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar find = __webpack_require__(300);\n\nvar ArrayPrototype = Array.prototype;\n\nmodule.exports = function (it) {\n  var own = it.find;\n  return it === ArrayPrototype || (it instanceof Array && own === ArrayPrototype.find) ? find : own;\n};\n\n\n/***/ }),\n/* 300 */\n/***/ (function(module, exports, __webpack_require__) {\n\n__webpack_require__(301);\nvar entryVirtual = __webpack_require__(14);\n\nmodule.exports = entryVirtual('Array').find;\n\n\n/***/ }),\n/* 301 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar $ = __webpack_require__(5);\nvar $find = __webpack_require__(31).find;\nvar addToUnscopables = __webpack_require__(89);\n\nvar FIND = 'find';\nvar SKIPS_HOLES = true;\n\n// Shouldn't skip holes\nif (FIND in []) Array(1)[FIND](function () { SKIPS_HOLES = false; });\n\n// `Array.prototype.find` method\n// https://tc39.es/ecma262/#sec-array.prototype.find\n$({ target: 'Array', proto: true, forced: SKIPS_HOLES }, {\n  find: function find(callbackfn /* , that = undefined */) {\n    return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n  }\n});\n\n// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables\naddToUnscopables(FIND);\n\n\n/***/ }),\n/* 302 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * @description Text 事件钩子函数。Text 公共的，不是某个菜单独有的\n * @wangfupeng\n */\n\nvar _interopRequireDefault = __webpack_require__(0);\n\nvar _defineProperty = _interopRequireDefault(__webpack_require__(1));\n\n(0, _defineProperty[\"default\"])(exports, \"__esModule\", {\n  value: true\n});\n\nvar tslib_1 = __webpack_require__(2);\n\nvar enter_to_create_p_1 = tslib_1.__importDefault(__webpack_require__(303));\n\nvar del_to_keep_p_1 = tslib_1.__importStar(__webpack_require__(304));\n\nvar tab_to_space_1 = tslib_1.__importDefault(__webpack_require__(305));\n\nvar paste_text_html_1 = tslib_1.__importDefault(__webpack_require__(306));\n\nvar img_click_active_1 = tslib_1.__importDefault(__webpack_require__(313));\n/**\n * 初始化 text 事件钩子函数\n * @param text text 实例\n */\n\n\nfunction initTextHooks(text) {\n  var editor = text.editor;\n  var eventHooks = text.eventHooks; // 回车时，保证生成的是 <p> 标签\n\n  enter_to_create_p_1[\"default\"](editor, eventHooks.enterUpEvents, eventHooks.enterDownEvents); // 删除时，保留 EMPTY_P\n\n  del_to_keep_p_1[\"default\"](editor, eventHooks.deleteUpEvents, eventHooks.deleteDownEvents); // 剪切时, 保留p\n\n  del_to_keep_p_1.cutToKeepP(editor, eventHooks.keyupEvents); // tab 转换为空格\n\n  tab_to_space_1[\"default\"](editor, eventHooks.tabDownEvents); // 粘贴 text html\n\n  paste_text_html_1[\"default\"](editor, eventHooks.pasteEvents); // img click active\n\n  img_click_active_1[\"default\"](editor, eventHooks.imgClickEvents);\n}\n\nexports[\"default\"] = initTextHooks;\n\n/***/ }),\n/* 303 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * @description 回车时，保证生成的是 <p> 标签\n * @author wangfupeng\n */\n\nvar _interopRequireDefault = __webpack_require__(0);\n\nvar _defineProperty = _interopRequireDefault(__webpack_require__(1));\n\nvar _indexOf = _interopRequireDefault(__webpack_require__(28));\n\n(0, _defineProperty[\"default\"])(exports, \"__esModule\", {\n  value: true\n});\n\nvar tslib_1 = __webpack_require__(2);\n\nvar const_1 = __webpack_require__(7);\n\nvar dom_core_1 = tslib_1.__importDefault(__webpack_require__(3));\n/**\n * 回车时，保证生成的是 <p> 标签\n * @param editor 编辑器实例\n * @param enterUpEvents enter 键 up 时的 hooks\n * @param enterDownEvents enter 键 down 时的 hooks\n */\n\n\nfunction enterToCreateP(editor, enterUpEvents, enterDownEvents) {\n  function insertEmptyP($selectionElem) {\n    var _context;\n\n    var $p = dom_core_1[\"default\"](const_1.EMPTY_P);\n    $p.insertBefore($selectionElem);\n\n    if ((0, _indexOf[\"default\"])(_context = $selectionElem.html()).call(_context, '<img') >= 0) {\n      // 有图片的回车键弹起时\n      $p.remove();\n      return;\n    }\n\n    editor.selection.createRangeByElem($p, true, true);\n    editor.selection.restoreSelection();\n    $selectionElem.remove();\n  } // enter up 时\n\n\n  function fn() {\n    var $textElem = editor.$textElem;\n    var $selectionElem = editor.selection.getSelectionContainerElem();\n    var $parentElem = $selectionElem.parent();\n\n    if ($parentElem.html() === '<code><br></code>') {\n      // 回车之前光标所在一个 <p><code>.....</code></p> ，忽然回车生成一个空的 <p><code><br></code></p>\n      // 而且继续回车跳不出去，因此只能特殊处理\n      insertEmptyP($parentElem);\n      return;\n    }\n\n    if ($selectionElem.getNodeName() === 'FONT' && $selectionElem.text() === '' && $selectionElem.attr('face') === 'monospace') {\n      // 行内code回车时会产生一个<font face=\"monospace\"><br></font>，导致样式问题\n      insertEmptyP($parentElem);\n      return;\n    }\n\n    if (!$parentElem.equal($textElem)) {\n      // 不是顶级标签\n      return;\n    }\n\n    var nodeName = $selectionElem.getNodeName();\n\n    if (nodeName === 'P' && $selectionElem.attr('data-we-empty-p') === null) {\n      // 当前的标签是 P 且不为 editor 生成的空白占位 p 标签，不用做处理\n      return;\n    }\n\n    if ($selectionElem.text()) {\n      // 有内容，不做处理\n      return;\n    } // 插入 <p> ，并将选取定位到 <p>，删除当前标签\n\n\n    insertEmptyP($selectionElem);\n  }\n\n  enterUpEvents.push(fn); // enter down 时\n\n  function createPWhenEnterText(e) {\n    var _a; // selection中的range缓存还有问题,更新不及时,此处手动更新range,处理enter的bug\n\n\n    editor.selection.saveRange((_a = getSelection()) === null || _a === void 0 ? void 0 : _a.getRangeAt(0));\n    var $selectElem = editor.selection.getSelectionContainerElem();\n\n    if ($selectElem.id === editor.textElemId) {\n      // 回车时，默认创建了 text 标签（没有 p 标签包裹），父元素直接就是 $textElem\n      // 例如，光标放在 table 最后侧，回车时，默认就是这个情况\n      e.preventDefault();\n      editor.cmd[\"do\"]('insertHTML', '<p><br></p>');\n    }\n  }\n\n  enterDownEvents.push(createPWhenEnterText);\n}\n\nexports[\"default\"] = enterToCreateP;\n\n/***/ }),\n/* 304 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * @description 删除时保留 EMPTY_P\n * @author wangfupeng\n */\n\nvar _interopRequireDefault = __webpack_require__(0);\n\nvar _defineProperty = _interopRequireDefault(__webpack_require__(1));\n\nvar _trim = _interopRequireDefault(__webpack_require__(16));\n\nvar _includes = _interopRequireDefault(__webpack_require__(46));\n\n(0, _defineProperty[\"default\"])(exports, \"__esModule\", {\n  value: true\n});\nexports.cutToKeepP = void 0;\n\nvar tslib_1 = __webpack_require__(2);\n\nvar const_1 = __webpack_require__(7);\n\nvar dom_core_1 = tslib_1.__importDefault(__webpack_require__(3));\n/**\n * 删除时保留 EMPTY_P\n * @param editor 编辑器实例\n * @param deleteUpEvents delete 键 up 时的 hooks\n * @param deleteDownEvents delete 建 down 时的 hooks\n */\n\n\nfunction deleteToKeepP(editor, deleteUpEvents, deleteDownEvents) {\n  function upFn() {\n    var $textElem = editor.$textElem;\n    var html = editor.$textElem.html();\n    var text = editor.$textElem.text();\n    var txtHtml = (0, _trim[\"default\"])(html).call(html);\n    /**\n      @description\n        如果编辑区清空的状态下，单单插入一张图片，删除图片后，会存在空的情况：'<p data-we-empty-p=\"\"></p>'\n        需要包含这种边界情况\n    **/\n\n    var emptyTags = ['<p><br></p>', '<br>', '<p data-we-empty-p=\"\"></p>', const_1.EMPTY_P]; // 编辑器中的字符是\"\"或空白，说明内容为空\n\n    if (/^\\s*$/.test(text) && (!txtHtml || (0, _includes[\"default\"])(emptyTags).call(emptyTags, txtHtml))) {\n      // 内容空了\n      $textElem.html(const_1.EMPTY_P);\n      editor.selection.createRangeByElem($textElem, false, true);\n      editor.selection.restoreSelection(); // 设置折叠后的光标位置，在firebox等浏览器下\n      // 光标设置在end位置会自动换行\n\n      editor.selection.moveCursor($textElem.getNode(), 0);\n    }\n  }\n\n  deleteUpEvents.push(upFn);\n\n  function downFn(e) {\n    var _context;\n\n    var $textElem = editor.$textElem;\n    var txtHtml = (0, _trim[\"default\"])(_context = $textElem.html().toLowerCase()).call(_context);\n\n    if (txtHtml === const_1.EMPTY_P) {\n      // 最后剩下一个空行，就不再删除了\n      e.preventDefault();\n      return;\n    }\n  }\n\n  deleteDownEvents.push(downFn);\n}\n/**\n * 剪切时保留 EMPTY_P\n * @param editor 编辑器实例\n * @param cutEvents keydown hooks\n */\n\n\nfunction cutToKeepP(editor, cutEvents) {\n  function upFn(e) {\n    var _context2;\n\n    if (e.keyCode !== 88) {\n      return;\n    }\n\n    var $textElem = editor.$textElem;\n    var txtHtml = (0, _trim[\"default\"])(_context2 = $textElem.html().toLowerCase()).call(_context2); // firefox 时用 txtHtml === '<br>' 判断，其他用 !txtHtml 判断\n\n    if (!txtHtml || txtHtml === '<br>') {\n      // 内容空了\n      var $p = dom_core_1[\"default\"](const_1.EMPTY_P);\n      $textElem.html(' '); // 一定要先清空，否则在 firefox 下有问题\n\n      $textElem.append($p);\n      editor.selection.createRangeByElem($p, false, true);\n      editor.selection.restoreSelection(); // 设置折叠后的光标位置，在firebox等浏览器下\n      // 光标设置在end位置会自动换行\n\n      editor.selection.moveCursor($p.getNode(), 0);\n    }\n  }\n\n  cutEvents.push(upFn);\n}\n\nexports.cutToKeepP = cutToKeepP;\nexports[\"default\"] = deleteToKeepP;\n\n/***/ }),\n/* 305 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * @description 编辑区域 tab 的特殊处理\n * @author wangfupeng\n */\n\nvar _interopRequireDefault = __webpack_require__(0);\n\nvar _defineProperty = _interopRequireDefault(__webpack_require__(1));\n\n(0, _defineProperty[\"default\"])(exports, \"__esModule\", {\n  value: true\n});\n/**\n * 编辑区域 tab 的特殊处理，转换为空格\n * @param editor 编辑器实例\n * @param tabDownEvents tab down 事件钩子\n */\n\nfunction tabHandler(editor, tabDownEvents) {\n  // 定义函数\n  function fn() {\n    if (!editor.cmd.queryCommandSupported('insertHTML')) {\n      // 必须原生支持 insertHTML 命令\n      return;\n    }\n\n    var $selectionElem = editor.selection.getSelectionContainerElem();\n\n    if (!$selectionElem) {\n      return;\n    }\n\n    var $parentElem = $selectionElem.parent();\n    var selectionNodeName = $selectionElem.getNodeName();\n    var parentNodeName = $parentElem.getNodeName();\n\n    if (selectionNodeName == 'CODE' || parentNodeName === 'CODE' || parentNodeName === 'PRE' || /hljs/.test(parentNodeName)) {\n      // <pre><code> 里面\n      editor.cmd[\"do\"]('insertHTML', editor.config.languageTab);\n    } else {\n      // 普通文字\n      editor.cmd[\"do\"]('insertHTML', '&nbsp;&nbsp;&nbsp;&nbsp;');\n    }\n  } // 保留函数\n\n\n  tabDownEvents.push(fn);\n}\n\nexports[\"default\"] = tabHandler;\n\n/***/ }),\n/* 306 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * @description 粘贴 text html\n * @author wangfupeng\n */\n\nvar _interopRequireDefault = __webpack_require__(0);\n\nvar _defineProperty = _interopRequireDefault(__webpack_require__(1));\n\nvar _trim = _interopRequireDefault(__webpack_require__(16));\n\n(0, _defineProperty[\"default\"])(exports, \"__esModule\", {\n  value: true\n});\n\nvar paste_event_1 = __webpack_require__(135);\n\nvar util_1 = __webpack_require__(6);\n\nvar const_1 = __webpack_require__(7);\n/**\n * 格式化html\n * @param val 粘贴的html\n * @author Gavin\n * @description\n    格式化html，需要特别注意\n    功能：\n        1. 将htmlText中的div，都替换成p标签\n        2. 将处理后的htmlText模拟先插入到真实dom中，处理P截断问题。\n\n    注意点：\n        由于P不能嵌套p，会导致标签截断，从而将<p><p>xx</p></p>这样一个结构插入到页面时，会出现很多问题，包括光标位置问题，页面凭空多很多元素的问题。\n */\n\n\nfunction formatHtml(htmlText) {\n  var _context;\n\n  var paste = (0, _trim[\"default\"])(_context = htmlText.replace(/<div>/gim, '<p>') // div 全部替换为 p 标签\n  .replace(/<\\/div>/gim, '</p>')).call(_context); // 去除''\n  // 模拟插入到真实dom中\n\n  var tempContainer = document.createElement('div');\n  tempContainer.innerHTML = paste;\n  return tempContainer.innerHTML.replace(/<p><\\/p>/gim, ''); // 将被截断的p，都替换掉\n}\n/**\n * 格式化html\n * @param val 粘贴的html\n * @author liuwei\n */\n\n\nfunction formatCode(val) {\n  var pasteText = val.replace(/<br>|<br\\/>/gm, '\\n').replace(/<[^>]+>/gm, '');\n  return pasteText;\n}\n/**\n * 判断html是否使用P标签包裹\n * @param html 粘贴的html\n * @author luochao\n */\n\n\nfunction isParagraphHtml(html) {\n  var _a;\n\n  if (html === '') return false;\n  var container = document.createElement('div');\n  container.innerHTML = html;\n  return ((_a = container.firstChild) === null || _a === void 0 ? void 0 : _a.nodeName) === 'P';\n}\n/**\n * 判断当前选区是否是空段落\n * @param topElem 选区顶层元素\n * @author luochao\n */\n\n\nfunction isEmptyParagraph(topElem) {\n  if (!(topElem === null || topElem === void 0 ? void 0 : topElem.length)) return false;\n  var dom = topElem.elems[0];\n  return dom.nodeName === 'P' && dom.innerHTML === '<br>';\n}\n/**\n * 粘贴文本和 html\n * @param editor 编辑器对象\n * @param pasteEvents 粘贴事件列表\n */\n\n\nfunction pasteTextHtml(editor, pasteEvents) {\n  function fn(e) {\n    // 获取配置\n    var config = editor.config;\n    var pasteFilterStyle = config.pasteFilterStyle;\n    var pasteIgnoreImg = config.pasteIgnoreImg;\n    var pasteTextHandle = config.pasteTextHandle; // 获取粘贴的文字\n\n    var pasteHtml = paste_event_1.getPasteHtml(e, pasteFilterStyle, pasteIgnoreImg);\n    var pasteText = paste_event_1.getPasteText(e);\n    pasteText = pasteText.replace(/\\n/gm, '<br>'); // 当前选区所在的 DOM 节点\n\n    var $selectionElem = editor.selection.getSelectionContainerElem();\n\n    if (!$selectionElem) {\n      return;\n    }\n\n    var nodeName = $selectionElem === null || $selectionElem === void 0 ? void 0 : $selectionElem.getNodeName();\n    var $topElem = $selectionElem === null || $selectionElem === void 0 ? void 0 : $selectionElem.getNodeTop(editor); // 当前节点顶级可能没有\n\n    var topNodeName = '';\n\n    if ($topElem.elems[0]) {\n      topNodeName = $topElem === null || $topElem === void 0 ? void 0 : $topElem.getNodeName();\n    } // code 中只能粘贴纯文本\n\n\n    if (nodeName === 'CODE' || topNodeName === 'PRE') {\n      if (pasteTextHandle && util_1.isFunction(pasteTextHandle)) {\n        // 用户自定义过滤处理粘贴内容\n        pasteText = '' + (pasteTextHandle(pasteText) || '');\n      }\n\n      editor.cmd[\"do\"]('insertHTML', formatCode(pasteText));\n      return;\n    } // 如果用户开启闭粘贴样式注释则将复制进来为url的直接转为链接 否则不转换\n    //  在群中有用户提到关闭样式粘贴复制的文字进来后链接直接转为文字了，不符合预期，这里优化下\n\n\n    if (const_1.urlRegex.test(pasteText) && pasteFilterStyle) {\n      //当复制的内容为链接时，也应该判断用户是否定义了处理粘贴的事件\n      if (pasteTextHandle && util_1.isFunction(pasteTextHandle)) {\n        // 用户自定义过滤处理粘贴内容\n        pasteText = '' + (pasteTextHandle(pasteText) || ''); // html\n      }\n\n      var insertUrl = const_1.urlRegex.exec(pasteText)[0];\n      var otherText = pasteText.replace(const_1.urlRegex, '');\n      return editor.cmd[\"do\"]('insertHTML', \"<a href=\\\"\" + insertUrl + \"\\\" target=\\\"_blank\\\">\" + insertUrl + \"</a>\" + otherText); // html\n    } // table 中（td、th），待开发。。。\n\n\n    if (!pasteHtml) {\n      return;\n    }\n\n    try {\n      // firefox 中，获取的 pasteHtml 可能是没有 <ul> 包裹的 <li>\n      // 因此执行 insertHTML 会报错\n      if (pasteTextHandle && util_1.isFunction(pasteTextHandle)) {\n        // 用户自定义过滤处理粘贴内容\n        pasteHtml = '' + (pasteTextHandle(pasteHtml) || ''); // html\n      } // 粘贴的html的是否是css的style样式\n\n\n      var isCssStyle = /[\\.\\#\\@]?\\w+[ ]+\\{[^}]*\\}/.test(pasteHtml); // eslint-disable-line\n      // 经过处理后还是包含暴露的css样式则直接插入它的text\n\n      if (isCssStyle && pasteFilterStyle) {\n        editor.cmd[\"do\"]('insertHTML', \"\" + formatHtml(pasteText)); // text\n      } else {\n        var html = formatHtml(pasteHtml); // 如果是段落，为了兼容 firefox 和 chrome差异，自定义插入\n\n        if (isParagraphHtml(html)) {\n          var $textEl = editor.$textElem;\n          editor.cmd[\"do\"]('insertHTML', html); // 全选的情况下覆盖原有内容\n\n          if ($textEl.equal($selectionElem)) {\n            // 更新选区\n            editor.selection.createEmptyRange();\n            return;\n          } // 如果选区是空段落，移除空段落\n\n\n          if (isEmptyParagraph($topElem)) {\n            $topElem.remove();\n          }\n        } else {\n          // 如果用户从百度等网站点击复制得到的图片是一串img标签且待src的http地址\n          // 见 https://github.com/wangeditor-team/wangEditor/issues/3119\n          // 如果是走用户定义的图片上传逻辑\n          var isHasOnlyImgEleReg = /^<img [^>]*src=['\"]([^'\"]+)[^>]*>$/g;\n\n          if (!isHasOnlyImgEleReg.test(html)) {\n            editor.cmd[\"do\"]('insertHTML', html);\n          }\n        }\n      }\n    } catch (ex) {\n      // 此时使用 pasteText 来兼容一下\n      if (pasteTextHandle && util_1.isFunction(pasteTextHandle)) {\n        // 用户自定义过滤处理粘贴内容\n        pasteText = '' + (pasteTextHandle(pasteText) || '');\n      }\n\n      editor.cmd[\"do\"]('insertHTML', \"\" + formatHtml(pasteText)); // text\n    }\n  }\n\n  pasteEvents.push(fn);\n}\n\nexports[\"default\"] = pasteTextHtml;\n\n/***/ }),\n/* 307 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * @description 将粘贴的 html 字符串，转换为正确、简洁的 html 代码。剔除不必要的标签和属性。\n * @author wangfupeng\n */\n\nvar _interopRequireDefault = __webpack_require__(0);\n\nvar _defineProperty = _interopRequireDefault(__webpack_require__(1));\n\nvar _trim = _interopRequireDefault(__webpack_require__(16));\n\nvar _forEach = _interopRequireDefault(__webpack_require__(4));\n\nvar _includes = _interopRequireDefault(__webpack_require__(46));\n\n(0, _defineProperty[\"default\"])(exports, \"__esModule\", {\n  value: true\n});\n\nvar tslib_1 = __webpack_require__(2);\n\nvar tags_1 = __webpack_require__(308);\n\nvar simplehtmlparser_js_1 = tslib_1.__importDefault(__webpack_require__(312));\n/**\n * 过滤掉空 span\n * @param html html\n */\n\n\nfunction filterEmptySpan(html) {\n  var regForReplace = /<span>.*?<\\/span>/gi;\n  var regForMatch = /<span>(.*?)<\\/span>/;\n  return html.replace(regForReplace, function (s) {\n    // s 是单个 span ，如 <span>文字</span>\n    var result = s.match(regForMatch);\n    if (result == null) return '';\n    return result[1];\n  });\n}\n/**\n * 是否忽略标签\n * @param tag tag\n * @param ignoreImg 是否忽略 img 标签\n */\n\n\nfunction isIgnoreTag(tag, ignoreImg) {\n  var _context;\n\n  tag = (0, _trim[\"default\"])(_context = tag.toLowerCase()).call(_context); // 忽略的标签\n\n  if (tags_1.IGNORE_TAGS.has(tag)) {\n    return true;\n  } // 是否忽略图片\n\n\n  if (ignoreImg) {\n    if (tag === 'img') {\n      return true;\n    }\n  }\n\n  return false;\n}\n/**\n * 为 tag 生成 html 字符串，开始部分\n * @param tag tag\n * @param attrs 属性\n */\n\n\nfunction genStartHtml(tag, attrs) {\n  var result = ''; // tag < 符号\n\n  result = \"<\" + tag; // 拼接属性\n\n  var attrStrArr = [];\n  (0, _forEach[\"default\"])(attrs).call(attrs, function (attr) {\n    attrStrArr.push(attr.name + \"=\\\"\" + attr.value + \"\\\"\");\n  });\n\n  if (attrStrArr.length > 0) {\n    result = result + ' ' + attrStrArr.join(' ');\n  } // tag > 符号\n\n\n  var isEmpty = tags_1.EMPTY_TAGS.has(tag); // 没有子节点或文本的标签，如 img\n\n  result = result + (isEmpty ? '/' : '') + '>';\n  return result;\n}\n/**\n * 为 tag 生成 html 字符串，结尾部分\n * @param tag tag\n */\n\n\nfunction genEndHtml(tag) {\n  return \"</\" + tag + \">\";\n}\n/**\n * 处理粘贴的 html\n * @param html html 字符串\n * @param filterStyle 是否过滤 style 样式\n * @param ignoreImg 是否忽略 img 标签\n */\n\n\nfunction parseHtml(html, filterStyle, ignoreImg) {\n  if (filterStyle === void 0) {\n    filterStyle = true;\n  }\n\n  if (ignoreImg === void 0) {\n    ignoreImg = false;\n  }\n\n  var resultArr = []; // 存储结果，数组形式，最后再 join\n  // 当前正在处理的标签，以及记录和清除的方法\n\n  var CUR_TAG = '';\n\n  function markTagStart(tag) {\n    tag = (0, _trim[\"default\"])(tag).call(tag);\n    if (!tag) return;\n    if (tags_1.EMPTY_TAGS.has(tag)) return; // 内容为空的标签，如 img ，不用记录\n\n    CUR_TAG = tag;\n  }\n\n  function markTagEnd() {\n    CUR_TAG = '';\n  } // 能通过 'text/html' 格式获取 html\n\n\n  var htmlParser = new simplehtmlparser_js_1[\"default\"]();\n  htmlParser.parse(html, {\n    startElement: function startElement(tag, attrs) {\n      // 首先，标记开始\n      markTagStart(tag); // 忽略的标签\n\n      if (isIgnoreTag(tag, ignoreImg)) {\n        return;\n      } // 找出该标签必须的属性（其他的属性忽略）\n\n\n      var necessaryAttrKeys = tags_1.NECESSARY_ATTRS.get(tag) || [];\n      var attrsForTag = [];\n      (0, _forEach[\"default\"])(attrs).call(attrs, function (attr) {\n        // 属性名\n        var name = attr.name; // style 单独处理\n\n        if (name === 'style') {\n          // 保留 style 样式\n          if (!filterStyle) {\n            attrsForTag.push(attr);\n          }\n\n          return;\n        } // 除了 style 之外的其他属性\n\n\n        if ((0, _includes[\"default\"])(necessaryAttrKeys).call(necessaryAttrKeys, name) === false) {\n          // 不是必须的属性，忽略\n          return;\n        }\n\n        attrsForTag.push(attr);\n      }); // 拼接为 HTML 标签\n\n      var html = genStartHtml(tag, attrsForTag);\n      resultArr.push(html);\n    },\n    characters: function characters(str) {\n      if (!str) {\n        return;\n      } // 忽略的标签\n\n\n      if (isIgnoreTag(CUR_TAG, ignoreImg)) return;\n      resultArr.push(str);\n    },\n    endElement: function endElement(tag) {\n      // 忽略的标签\n      if (isIgnoreTag(tag, ignoreImg)) {\n        return;\n      } // 拼接为 HTML 标签\n\n\n      var html = genEndHtml(tag);\n      resultArr.push(html); // 最后，标记结束\n\n      markTagEnd();\n    },\n    comment: function comment(str) {\n      /* 注释，不做处理 */\n      markTagStart(str);\n    }\n  });\n  var result = resultArr.join(''); // 转换为字符串\n  // 过滤掉空 span 标签\n\n  result = filterEmptySpan(result);\n  return result;\n}\n\nexports[\"default\"] = parseHtml;\n\n/***/ }),\n/* 308 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * @description 粘贴相关的 tags\n * @author wangfupeng\n */\n\nvar _interopRequireDefault = __webpack_require__(0);\n\nvar _defineProperty = _interopRequireDefault(__webpack_require__(1));\n\nvar _set = _interopRequireDefault(__webpack_require__(136));\n\nvar _map = _interopRequireDefault(__webpack_require__(125));\n\n(0, _defineProperty[\"default\"])(exports, \"__esModule\", {\n  value: true\n});\nexports.TOP_LEVEL_TAGS = exports.EMPTY_TAGS = exports.NECESSARY_ATTRS = exports.IGNORE_TAGS = void 0; // 忽略的标签\n\nexports.IGNORE_TAGS = new _set[\"default\"](['doctype', '!doctype', 'html', 'head', 'meta', 'body', 'script', 'style', 'link', 'frame', 'iframe', 'title', 'svg', 'center', 'o:p' // 复制 word 内容包含 o:p 标签\n]); // 指定标签必要的属性\n\nexports.NECESSARY_ATTRS = new _map[\"default\"]([['img', ['src', 'alt']], ['a', ['href', 'target']], ['td', ['colspan', 'rowspan']], ['th', ['colspan', 'rowspan']]]); // 没有子节点或文本的标签\n\nexports.EMPTY_TAGS = new _set[\"default\"](['area', 'base', 'basefont', 'br', 'col', 'hr', 'img', 'input', 'isindex', 'embed']); // 编辑区域顶级节点\n\nexports.TOP_LEVEL_TAGS = new _set[\"default\"](['h1', 'h2', 'h3', 'h4', 'h5', 'p', 'ul', 'ol', 'table', 'blockquote', 'pre', 'hr', 'form']);\n\n/***/ }),\n/* 309 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar parent = __webpack_require__(310);\n__webpack_require__(45);\n\nmodule.exports = parent;\n\n\n/***/ }),\n/* 310 */\n/***/ (function(module, exports, __webpack_require__) {\n\n__webpack_require__(55);\n__webpack_require__(57);\n__webpack_require__(311);\n__webpack_require__(58);\nvar path = __webpack_require__(11);\n\nmodule.exports = path.Set;\n\n\n/***/ }),\n/* 311 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar collection = __webpack_require__(126);\nvar collectionStrong = __webpack_require__(129);\n\n// `Set` constructor\n// https://tc39.es/ecma262/#sec-set-objects\nmodule.exports = collection('Set', function (init) {\n  return function Set() { return init(this, arguments.length ? arguments[0] : undefined); };\n}, collectionStrong);\n\n\n/***/ }),\n/* 312 */\n/***/ (function(module, exports) {\n\n// Copyright 2004 Erik Arvidsson. All Rights Reserved.\n//\n// This code is triple licensed using Apache Software License 2.0,\n// Mozilla Public License or GNU Public License\n//\n///////////////////////////////////////////////////////////////////////////////\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\"); you may not\n// use this file except in compliance with the License.  You may obtain a copy\n// of the License at http://www.apache.org/licenses/LICENSE-2.0\n//\n///////////////////////////////////////////////////////////////////////////////\n//\n// The contents of this file are subject to the Mozilla Public License\n// Version 1.1 (the \"License\"); you may not use this file except in\n// compliance with the License. You may obtain a copy of the License at\n// http://www.mozilla.org/MPL/\n//\n// Software distributed under the License is distributed on an \"AS IS\"\n// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the\n// License for the specific language governing rights and limitations\n// under the License.\n//\n// The Original Code is Simple HTML Parser.\n//\n// The Initial Developer of the Original Code is Erik Arvidsson.\n// Portions created by Erik Arvidssson are Copyright (C) 2004. All Rights\n// Reserved.\n//\n///////////////////////////////////////////////////////////////////////////////\n//\n// This program is free software; you can redistribute it and/or\n// modify it under the terms of the GNU General Public License\n// as published by the Free Software Foundation; either version 2\n// of the License, or (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n// GNU General Public License for more details.\n//\n// You should have received a copy of the GNU General Public License\n// along with this program; if not, write to the Free Software\n// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n//\n///////////////////////////////////////////////////////////////////////////////\n\n/*\nvar handler ={\n\tstartElement:   function (sTagName, oAttrs) {},\n\tendElement:     function (sTagName) {},\n    characters:\t\tfunction (s) {},\n    comment:\t\tfunction (s) {}\n};\n*/\n\nfunction SimpleHtmlParser() {}\n\nSimpleHtmlParser.prototype = {\n    handler: null,\n\n    // regexps\n\n    startTagRe: /^<([^>\\s\\/]+)((\\s+[^=>\\s]+(\\s*=\\s*((\\\"[^\"]*\\\")|(\\'[^']*\\')|[^>\\s]+))?)*)\\s*\\/?\\s*>/m,\n    endTagRe: /^<\\/([^>\\s]+)[^>]*>/m,\n    attrRe: /([^=\\s]+)(\\s*=\\s*((\\\"([^\"]*)\\\")|(\\'([^']*)\\')|[^>\\s]+))?/gm,\n\n    parse: function (s, oHandler) {\n        if (oHandler) this.contentHandler = oHandler\n\n        var i = 0\n        var res, lc, lm, rc, index\n        var treatAsChars = false\n        var oThis = this\n        while (s.length > 0) {\n            // Comment\n            if (s.substring(0, 4) == '<!--') {\n                index = s.indexOf('-->')\n                if (index != -1) {\n                    this.contentHandler.comment(s.substring(4, index))\n                    s = s.substring(index + 3)\n                    treatAsChars = false\n                } else {\n                    treatAsChars = true\n                }\n            }\n\n            // end tag\n            else if (s.substring(0, 2) == '</') {\n                if (this.endTagRe.test(s)) {\n                    lc = RegExp.leftContext\n                    lm = RegExp.lastMatch\n                    rc = RegExp.rightContext\n\n                    lm.replace(this.endTagRe, function () {\n                        return oThis.parseEndTag.apply(oThis, arguments)\n                    })\n\n                    s = rc\n                    treatAsChars = false\n                } else {\n                    treatAsChars = true\n                }\n            }\n            // start tag\n            else if (s.charAt(0) == '<') {\n                if (this.startTagRe.test(s)) {\n                    lc = RegExp.leftContext\n                    lm = RegExp.lastMatch\n                    rc = RegExp.rightContext\n\n                    lm.replace(this.startTagRe, function () {\n                        return oThis.parseStartTag.apply(oThis, arguments)\n                    })\n\n                    s = rc\n                    treatAsChars = false\n                } else {\n                    treatAsChars = true\n                }\n            }\n\n            if (treatAsChars) {\n                index = s.indexOf('<')\n                if (index == -1) {\n                    this.contentHandler.characters(s)\n                    s = ''\n                } else {\n                    this.contentHandler.characters(s.substring(0, index))\n                    s = s.substring(index)\n                }\n            }\n\n            treatAsChars = true\n        }\n    },\n\n    parseStartTag: function (sTag, sTagName, sRest) {\n        var attrs = this.parseAttributes(sTagName, sRest)\n        this.contentHandler.startElement(sTagName, attrs)\n    },\n\n    parseEndTag: function (sTag, sTagName) {\n        this.contentHandler.endElement(sTagName)\n    },\n\n    parseAttributes: function (sTagName, s) {\n        var oThis = this\n        var attrs = []\n        s.replace(this.attrRe, function (a0, a1, a2, a3, a4, a5, a6, a7) {\n            attrs.push(oThis.parseAttribute(sTagName, a0, a1, a2, a3, a4, a5, a6, a7))\n        })\n        return attrs\n    },\n\n    parseAttribute: function (sTagName, sAttribute, sName) {\n        var value = ''\n        if (arguments[7]) value = arguments[8]\n        else if (arguments[5]) value = arguments[6]\n        else if (arguments[3]) value = arguments[4]\n\n        var empty = !value && !arguments[3]\n        return { name: sName, value: empty ? null : value }\n    },\n}\n\n// export default SimpleHtmlParser\nmodule.exports = SimpleHtmlParser\n\n\n/***/ }),\n/* 313 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * @description 图片点击后选区更新到img的位置\n * @author tonghan\n */\n\nvar _interopRequireDefault = __webpack_require__(0);\n\nvar _defineProperty = _interopRequireDefault(__webpack_require__(1));\n\n(0, _defineProperty[\"default\"])(exports, \"__esModule\", {\n  value: true\n});\n/**\n * 图片点击后选区更新到img的位置\n * @param editor 编辑器实例\n * @param imgClickEvents delete 键 up 时的 hooks\n */\n\nfunction imgClickActive(editor, imgClickEvents) {\n  function clickFn($img) {\n    editor.selection.createRangeByElem($img);\n    editor.selection.restoreSelection();\n  }\n\n  imgClickEvents.push(clickFn);\n}\n\nexports[\"default\"] = imgClickActive;\n\n/***/ }),\n/* 314 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * @description 获取子元素的 JSON 格式数据\n * @author wangfupeng\n */\n\nvar _interopRequireDefault = __webpack_require__(0);\n\nvar _defineProperty = _interopRequireDefault(__webpack_require__(1));\n\nvar _forEach = _interopRequireDefault(__webpack_require__(4));\n\n(0, _defineProperty[\"default\"])(exports, \"__esModule\", {\n  value: true\n});\n\nvar tslib_1 = __webpack_require__(2);\n\nvar util_1 = __webpack_require__(6);\n\nvar dom_core_1 = tslib_1.__importDefault(__webpack_require__(3));\n/**\n * 获取子元素的 JSON 格式数据\n * @param $elem DOM 节点\n */\n\n\nfunction getChildrenJSON($elem) {\n  var result = []; // 存储结果\n\n  var $children = $elem.childNodes() || []; // 注意 childNodes() 可以获取文本节点\n\n  (0, _forEach[\"default\"])($children).call($children, function (curElem) {\n    var elemResult;\n    var nodeType = curElem.nodeType; // 文本节点\n\n    if (nodeType === 3) {\n      elemResult = curElem.textContent || '';\n      elemResult = util_1.replaceHtmlSymbol(elemResult);\n    } // 普通 DOM 节点\n\n\n    if (nodeType === 1) {\n      elemResult = {};\n      elemResult = elemResult; // tag\n\n      elemResult.tag = curElem.nodeName.toLowerCase(); // attr\n\n      var attrData = [];\n      var attrList = curElem.attributes;\n      var attrListLength = attrList.length || 0;\n\n      for (var i = 0; i < attrListLength; i++) {\n        var attr = attrList[i];\n        attrData.push({\n          name: attr.name,\n          value: attr.value\n        });\n      }\n\n      elemResult.attrs = attrData; // children（递归）\n\n      elemResult.children = getChildrenJSON(dom_core_1[\"default\"](curElem));\n    }\n\n    if (elemResult) {\n      result.push(elemResult);\n    }\n  });\n  return result;\n}\n\nexports[\"default\"] = getChildrenJSON;\n\n/***/ }),\n/* 315 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * @description 从nodeList json格式中遍历生成dom元素\n * @author zhengwenjian\n */\n\nvar _interopRequireDefault = __webpack_require__(0);\n\nvar _typeof2 = _interopRequireDefault(__webpack_require__(100));\n\nvar _defineProperty = _interopRequireDefault(__webpack_require__(1));\n\nvar _forEach = _interopRequireDefault(__webpack_require__(4));\n\n(0, _defineProperty[\"default\"])(exports, \"__esModule\", {\n  value: true\n});\n\nvar tslib_1 = __webpack_require__(2);\n\nvar dom_core_1 = tslib_1.__importDefault(__webpack_require__(3));\n\nfunction getHtmlByNodeList(nodeList, parent) {\n  if (parent === void 0) {\n    parent = document.createElement('div');\n  } // 设置一个父节点存储所有子节点\n\n\n  var root = parent; // 遍历节点JSON\n\n  (0, _forEach[\"default\"])(nodeList).call(nodeList, function (item) {\n    var elem; // 当为文本节点时\n\n    if (typeof item === 'string') {\n      elem = document.createTextNode(item);\n    } // 当为普通节点时\n\n\n    if ((0, _typeof2[\"default\"])(item) === 'object') {\n      var _context;\n\n      elem = document.createElement(item.tag);\n      (0, _forEach[\"default\"])(_context = item.attrs).call(_context, function (attr) {\n        dom_core_1[\"default\"](elem).attr(attr.name, attr.value);\n      }); // 有子节点时递归将子节点加入当前节点\n\n      if (item.children && item.children.length > 0) {\n        getHtmlByNodeList(item.children, elem.getRootNode());\n      }\n    }\n\n    elem && root.appendChild(elem);\n  });\n  return dom_core_1[\"default\"](root);\n}\n\nexports[\"default\"] = getHtmlByNodeList;\n\n/***/ }),\n/* 316 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * @description Menus 菜单栏 入口文件\n * @author wangfupeng\n */\n\nvar _interopRequireDefault = __webpack_require__(0);\n\nvar _defineProperty = _interopRequireDefault(__webpack_require__(1));\n\nvar _isArray = _interopRequireDefault(__webpack_require__(96));\n\nvar _filter = _interopRequireDefault(__webpack_require__(76));\n\nvar _includes = _interopRequireDefault(__webpack_require__(46));\n\nvar _keys = _interopRequireDefault(__webpack_require__(317));\n\nvar _forEach = _interopRequireDefault(__webpack_require__(4));\n\nvar _entries = _interopRequireDefault(__webpack_require__(102));\n\nvar _some = _interopRequireDefault(__webpack_require__(137));\n\nvar _setTimeout2 = _interopRequireDefault(__webpack_require__(48));\n\nvar _bind = _interopRequireDefault(__webpack_require__(61));\n\n(0, _defineProperty[\"default\"])(exports, \"__esModule\", {\n  value: true\n});\n\nvar tslib_1 = __webpack_require__(2);\n\nvar index_1 = tslib_1.__importDefault(__webpack_require__(94));\n\nvar menu_list_1 = tslib_1.__importDefault(__webpack_require__(329));\n\nvar dom_core_1 = tslib_1.__importDefault(__webpack_require__(3)); // import { MenuActive } from './menu-constructors/Menu'\n\n\nvar Menus = function () {\n  function Menus(editor) {\n    this.editor = editor;\n    this.menuList = [];\n    this.constructorList = menu_list_1[\"default\"]; // 所有菜单构造函数的列表\n  }\n  /**\n   * 自定义添加菜单\n   * @param key 菜单 key ，和 editor.config.menus 对应\n   * @param Menu 菜单构造函数\n   */\n\n\n  Menus.prototype.extend = function (key, Menu) {\n    if (!Menu || typeof Menu !== 'function') return;\n    this.constructorList[key] = Menu;\n  }; // 初始化菜单\n\n\n  Menus.prototype.init = function () {\n    var _context, _context2;\n\n    var _this = this; // 从用户配置的 menus 入手，看需要初始化哪些菜单\n\n\n    var config = this.editor.config; // 排除exclude包含的菜单\n\n    var excludeMenus = config.excludeMenus;\n    if ((0, _isArray[\"default\"])(excludeMenus) === false) excludeMenus = [];\n    config.menus = (0, _filter[\"default\"])(_context = config.menus).call(_context, function (key) {\n      return (0, _includes[\"default\"])(excludeMenus).call(excludeMenus, key) === false;\n    }); // 排除自扩展中exclude包含的菜单\n\n    var CustomMenuKeysList = (0, _keys[\"default\"])(index_1[\"default\"].globalCustomMenuConstructorList);\n    CustomMenuKeysList = (0, _filter[\"default\"])(CustomMenuKeysList).call(CustomMenuKeysList, function (key) {\n      return (0, _includes[\"default\"])(excludeMenus).call(excludeMenus, key);\n    });\n    (0, _forEach[\"default\"])(CustomMenuKeysList).call(CustomMenuKeysList, function (key) {\n      delete index_1[\"default\"].globalCustomMenuConstructorList[key];\n    });\n    (0, _forEach[\"default\"])(_context2 = config.menus).call(_context2, function (menuKey) {\n      var MenuConstructor = _this.constructorList[menuKey]; // 暂用 any ，后面再替换\n\n      _this._initMenuList(menuKey, MenuConstructor);\n    }); // 全局注册\n\n    for (var _i = 0, _a = (0, _entries[\"default\"])(index_1[\"default\"].globalCustomMenuConstructorList); _i < _a.length; _i++) {\n      var _b = _a[_i],\n          menuKey = _b[0],\n          menuFun = _b[1];\n      var MenuConstructor = menuFun; // 暂用 any ，后面再替换\n\n      this._initMenuList(menuKey, MenuConstructor);\n    } // 渲染 DOM\n\n\n    this._addToToolbar();\n\n    if (config.showMenuTooltips) {\n      // 添加菜单栏tooltips\n      this._bindMenuTooltips();\n    }\n  };\n  /**\n   * 创建 menu 实例，并放到 menuList 中\n   * @param menuKey 菜单 key ，和 editor.config.menus 对应\n   * @param MenuConstructor 菜单构造函数\n   */\n\n\n  Menus.prototype._initMenuList = function (menuKey, MenuConstructor) {\n    var _context3;\n\n    if (MenuConstructor == null || typeof MenuConstructor !== 'function') {\n      // 必须是 class\n      return;\n    }\n\n    if ((0, _some[\"default\"])(_context3 = this.menuList).call(_context3, function (menu) {\n      return menu.key === menuKey;\n    })) {\n      console.warn('菜单名称重复:' + menuKey);\n    } else {\n      var m = new MenuConstructor(this.editor);\n      m.key = menuKey;\n      this.menuList.push(m);\n    }\n  }; // 绑定菜单栏tooltips\n\n\n  Menus.prototype._bindMenuTooltips = function () {\n    var editor = this.editor;\n    var $toolbarElem = editor.$toolbarElem;\n    var config = editor.config; // 若isTooltipShowTop为true则伪元素为下三角，反之为上三角\n\n    var menuTooltipPosition = config.menuTooltipPosition;\n    var $tooltipEl = dom_core_1[\"default\"](\"<div class=\\\"w-e-menu-tooltip w-e-menu-tooltip-\" + menuTooltipPosition + \"\\\">\\n            <div class=\\\"w-e-menu-tooltip-item-wrapper\\\">\\n              <div></div>\\n            </div>\\n          </div>\");\n    $tooltipEl.css('visibility', 'hidden');\n    $toolbarElem.append($tooltipEl); // 设置 z-index\n\n    $tooltipEl.css('z-index', editor.zIndex.get('tooltip'));\n    var showTimeoutId = 0; // 定时器，延时200ms显示tooltips\n    // 清空计时器\n\n    function clearShowTimeoutId() {\n      if (showTimeoutId) {\n        clearTimeout(showTimeoutId);\n      }\n    } // 隐藏tooltip\n\n\n    function hide() {\n      clearShowTimeoutId();\n      $tooltipEl.css('visibility', 'hidden');\n    } // 事件监听\n\n\n    $toolbarElem.on('mouseover', function (e) {\n      var target = e.target;\n      var $target = dom_core_1[\"default\"](target);\n      var title;\n      var $menuEl;\n\n      if ($target.isContain($toolbarElem)) {\n        hide();\n        return;\n      }\n\n      if ($target.parentUntil('.w-e-droplist') != null) {\n        // 处于droplist中时隐藏\n        hide();\n      } else {\n        if ($target.attr('data-title')) {\n          title = $target.attr('data-title');\n          $menuEl = $target;\n        } else {\n          var $parent = $target.parentUntil('.w-e-menu');\n\n          if ($parent != null) {\n            title = $parent.attr('data-title');\n            $menuEl = $parent;\n          }\n        }\n      }\n\n      if (title && $menuEl) {\n        clearShowTimeoutId();\n        var targetOffset = $menuEl.getOffsetData();\n        $tooltipEl.text(editor.i18next.t('menus.title.' + title));\n        var tooltipOffset = $tooltipEl.getOffsetData();\n        var left = targetOffset.left + targetOffset.width / 2 - tooltipOffset.width / 2;\n        $tooltipEl.css('left', left + \"px\"); // 2. 高度设置\n\n        if (menuTooltipPosition === 'up') {\n          $tooltipEl.css('top', targetOffset.top - tooltipOffset.height - 8 + \"px\");\n        } else if (menuTooltipPosition === 'down') {\n          $tooltipEl.css('top', targetOffset.top + targetOffset.height + 8 + \"px\");\n        }\n\n        showTimeoutId = (0, _setTimeout2[\"default\"])(function () {\n          $tooltipEl.css('visibility', 'visible');\n        }, 200);\n      } else {\n        hide();\n      }\n    }).on('mouseleave', function () {\n      hide();\n    });\n  }; // 添加到菜单栏\n\n\n  Menus.prototype._addToToolbar = function () {\n    var _context4;\n\n    var editor = this.editor;\n    var $toolbarElem = editor.$toolbarElem; // 遍历添加到 DOM\n\n    (0, _forEach[\"default\"])(_context4 = this.menuList).call(_context4, function (menu) {\n      var $elem = menu.$elem;\n\n      if ($elem) {\n        $toolbarElem.append($elem);\n      }\n    });\n  };\n  /**\n   * 获取菜单对象\n   * @param 菜单名称 小写\n   * @return Menus 菜单对象\n   */\n\n\n  Menus.prototype.menuFind = function (key) {\n    var menuList = this.menuList;\n\n    for (var i = 0, l = menuList.length; i < l; i++) {\n      if (menuList[i].key === key) return menuList[i];\n    }\n\n    return menuList[0];\n  };\n  /**\n   * @description 修改菜单激活状态\n   */\n\n\n  Menus.prototype.changeActive = function () {\n    var _context5;\n\n    (0, _forEach[\"default\"])(_context5 = this.menuList).call(_context5, function (menu) {\n      var _context6;\n\n      (0, _setTimeout2[\"default\"])((0, _bind[\"default\"])(_context6 = menu.tryChangeActive).call(_context6, menu), 100); // 暂用 any ，后面再替换\n    });\n  };\n\n  return Menus;\n}();\n\nexports[\"default\"] = Menus;\n\n/***/ }),\n/* 317 */\n/***/ (function(module, exports, __webpack_require__) {\n\nmodule.exports = __webpack_require__(318);\n\n/***/ }),\n/* 318 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar parent = __webpack_require__(319);\n\nmodule.exports = parent;\n\n\n/***/ }),\n/* 319 */\n/***/ (function(module, exports, __webpack_require__) {\n\n__webpack_require__(320);\nvar path = __webpack_require__(11);\n\nmodule.exports = path.Object.keys;\n\n\n/***/ }),\n/* 320 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar $ = __webpack_require__(5);\nvar toObject = __webpack_require__(26);\nvar nativeKeys = __webpack_require__(53);\nvar fails = __webpack_require__(12);\n\nvar FAILS_ON_PRIMITIVES = fails(function () { nativeKeys(1); });\n\n// `Object.keys` method\n// https://tc39.es/ecma262/#sec-object.keys\n$({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES }, {\n  keys: function keys(it) {\n    return nativeKeys(toObject(it));\n  }\n});\n\n\n/***/ }),\n/* 321 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar parent = __webpack_require__(322);\n\nmodule.exports = parent;\n\n\n/***/ }),\n/* 322 */\n/***/ (function(module, exports, __webpack_require__) {\n\n__webpack_require__(323);\nvar path = __webpack_require__(11);\n\nmodule.exports = path.Object.entries;\n\n\n/***/ }),\n/* 323 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar $ = __webpack_require__(5);\nvar $entries = __webpack_require__(324).entries;\n\n// `Object.entries` method\n// https://tc39.es/ecma262/#sec-object.entries\n$({ target: 'Object', stat: true }, {\n  entries: function entries(O) {\n    return $entries(O);\n  }\n});\n\n\n/***/ }),\n/* 324 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar DESCRIPTORS = __webpack_require__(15);\nvar objectKeys = __webpack_require__(53);\nvar toIndexedObject = __webpack_require__(29);\nvar propertyIsEnumerable = __webpack_require__(63).f;\n\n// `Object.{ entries, values }` methods implementation\nvar createMethod = function (TO_ENTRIES) {\n  return function (it) {\n    var O = toIndexedObject(it);\n    var keys = objectKeys(O);\n    var length = keys.length;\n    var i = 0;\n    var result = [];\n    var key;\n    while (length > i) {\n      key = keys[i++];\n      if (!DESCRIPTORS || propertyIsEnumerable.call(O, key)) {\n        result.push(TO_ENTRIES ? [key, O[key]] : O[key]);\n      }\n    }\n    return result;\n  };\n};\n\nmodule.exports = {\n  // `Object.entries` method\n  // https://tc39.es/ecma262/#sec-object.entries\n  entries: createMethod(true),\n  // `Object.values` method\n  // https://tc39.es/ecma262/#sec-object.values\n  values: createMethod(false)\n};\n\n\n/***/ }),\n/* 325 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar parent = __webpack_require__(326);\n\nmodule.exports = parent;\n\n\n/***/ }),\n/* 326 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar some = __webpack_require__(327);\n\nvar ArrayPrototype = Array.prototype;\n\nmodule.exports = function (it) {\n  var own = it.some;\n  return it === ArrayPrototype || (it instanceof Array && own === ArrayPrototype.some) ? some : own;\n};\n\n\n/***/ }),\n/* 327 */\n/***/ (function(module, exports, __webpack_require__) {\n\n__webpack_require__(328);\nvar entryVirtual = __webpack_require__(14);\n\nmodule.exports = entryVirtual('Array').some;\n\n\n/***/ }),\n/* 328 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar $ = __webpack_require__(5);\nvar $some = __webpack_require__(31).some;\nvar arrayMethodIsStrict = __webpack_require__(73);\n\nvar STRICT_METHOD = arrayMethodIsStrict('some');\n\n// `Array.prototype.some` method\n// https://tc39.es/ecma262/#sec-array.prototype.some\n$({ target: 'Array', proto: true, forced: !STRICT_METHOD }, {\n  some: function some(callbackfn /* , thisArg */) {\n    return $some(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n  }\n});\n\n\n/***/ }),\n/* 329 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * @description 所有菜单的构造函数\n * @author wangfupeng\n */\n\nvar _interopRequireDefault = __webpack_require__(0);\n\nvar _defineProperty = _interopRequireDefault(__webpack_require__(1));\n\n(0, _defineProperty[\"default\"])(exports, \"__esModule\", {\n  value: true\n});\n\nvar tslib_1 = __webpack_require__(2);\n\nvar index_1 = tslib_1.__importDefault(__webpack_require__(330));\n\nvar index_2 = tslib_1.__importDefault(__webpack_require__(331));\n\nvar index_3 = tslib_1.__importDefault(__webpack_require__(336));\n\nvar index_4 = tslib_1.__importDefault(__webpack_require__(341));\n\nvar index_5 = tslib_1.__importDefault(__webpack_require__(342));\n\nvar index_6 = tslib_1.__importDefault(__webpack_require__(343));\n\nvar index_7 = tslib_1.__importDefault(__webpack_require__(344));\n\nvar font_size_1 = tslib_1.__importDefault(__webpack_require__(346));\n\nvar index_8 = tslib_1.__importDefault(__webpack_require__(348));\n\nvar index_9 = tslib_1.__importDefault(__webpack_require__(349));\n\nvar index_10 = tslib_1.__importDefault(__webpack_require__(352));\n\nvar index_11 = tslib_1.__importDefault(__webpack_require__(353));\n\nvar index_12 = tslib_1.__importDefault(__webpack_require__(354));\n\nvar index_13 = tslib_1.__importDefault(__webpack_require__(365));\n\nvar index_14 = tslib_1.__importDefault(__webpack_require__(380));\n\nvar index_15 = tslib_1.__importDefault(__webpack_require__(384));\n\nvar index_16 = tslib_1.__importDefault(__webpack_require__(142));\n\nvar index_17 = tslib_1.__importDefault(__webpack_require__(393));\n\nvar index_18 = tslib_1.__importDefault(__webpack_require__(395));\n\nvar index_19 = tslib_1.__importDefault(__webpack_require__(396));\n\nvar index_20 = tslib_1.__importDefault(__webpack_require__(397));\n\nvar code_1 = tslib_1.__importDefault(__webpack_require__(417));\n\nvar index_21 = tslib_1.__importDefault(__webpack_require__(422));\n\nvar todo_1 = tslib_1.__importDefault(__webpack_require__(425));\n\nexports[\"default\"] = {\n  bold: index_1[\"default\"],\n  head: index_2[\"default\"],\n  italic: index_4[\"default\"],\n  link: index_3[\"default\"],\n  underline: index_5[\"default\"],\n  strikeThrough: index_6[\"default\"],\n  fontName: index_7[\"default\"],\n  fontSize: font_size_1[\"default\"],\n  justify: index_8[\"default\"],\n  quote: index_9[\"default\"],\n  backColor: index_10[\"default\"],\n  foreColor: index_11[\"default\"],\n  video: index_12[\"default\"],\n  image: index_13[\"default\"],\n  indent: index_14[\"default\"],\n  emoticon: index_15[\"default\"],\n  list: index_16[\"default\"],\n  lineHeight: index_17[\"default\"],\n  undo: index_18[\"default\"],\n  redo: index_19[\"default\"],\n  table: index_20[\"default\"],\n  code: code_1[\"default\"],\n  splitLine: index_21[\"default\"],\n  todo: todo_1[\"default\"]\n};\n\n/***/ }),\n/* 330 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * @description 加粗\n * @author wangfupeng\n */\n\nvar _interopRequireDefault = __webpack_require__(0);\n\nvar _defineProperty = _interopRequireDefault(__webpack_require__(1));\n\n(0, _defineProperty[\"default\"])(exports, \"__esModule\", {\n  value: true\n});\n\nvar tslib_1 = __webpack_require__(2);\n\nvar BtnMenu_1 = tslib_1.__importDefault(__webpack_require__(23));\n\nvar dom_core_1 = tslib_1.__importDefault(__webpack_require__(3));\n\nvar Bold = function (_super) {\n  tslib_1.__extends(Bold, _super);\n\n  function Bold(editor) {\n    var _this = this;\n\n    var $elem = dom_core_1[\"default\"](\"<div class=\\\"w-e-menu\\\" data-title=\\\"\\u52A0\\u7C97\\\">\\n                <i class=\\\"w-e-icon-bold\\\"></i>\\n            </div>\");\n    _this = _super.call(this, $elem, editor) || this;\n    return _this;\n  }\n  /**\n   * 点击事件\n   */\n\n\n  Bold.prototype.clickHandler = function () {\n    var editor = this.editor;\n    var isSelectEmpty = editor.selection.isSelectionEmpty();\n\n    if (isSelectEmpty) {\n      // 选区范围是空的，插入并选中一个“空白”\n      editor.selection.createEmptyRange();\n    } // 执行 bold 命令\n\n\n    editor.cmd[\"do\"]('bold');\n\n    if (isSelectEmpty) {\n      // 需要将选区范围折叠起来\n      editor.selection.collapseRange();\n      editor.selection.restoreSelection();\n    }\n  };\n  /**\n   * 尝试修改菜单激活状态\n   */\n\n\n  Bold.prototype.tryChangeActive = function () {\n    var editor = this.editor;\n\n    if (editor.cmd.queryCommandState('bold')) {\n      this.active();\n    } else {\n      this.unActive();\n    }\n  };\n\n  return Bold;\n}(BtnMenu_1[\"default\"]);\n\nexports[\"default\"] = Bold;\n\n/***/ }),\n/* 331 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * @description 标题\n * @author wangfupeng\n */\n\nvar _interopRequireDefault = __webpack_require__(0);\n\nvar _defineProperty = _interopRequireDefault(__webpack_require__(1));\n\nvar _indexOf = _interopRequireDefault(__webpack_require__(28));\n\nvar _find = _interopRequireDefault(__webpack_require__(32));\n\nvar _forEach = _interopRequireDefault(__webpack_require__(4));\n\nvar _stringify = _interopRequireDefault(__webpack_require__(332));\n\nvar _includes = _interopRequireDefault(__webpack_require__(46));\n\n(0, _defineProperty[\"default\"])(exports, \"__esModule\", {\n  value: true\n});\n\nvar tslib_1 = __webpack_require__(2);\n\nvar DropListMenu_1 = tslib_1.__importDefault(__webpack_require__(24));\n\nvar dom_core_1 = tslib_1.__importDefault(__webpack_require__(3));\n\nvar util_1 = __webpack_require__(6);\n\nvar const_1 = __webpack_require__(7);\n\nvar Head = function (_super) {\n  tslib_1.__extends(Head, _super);\n\n  function Head(editor) {\n    var _this = this;\n\n    var $elem = dom_core_1[\"default\"]('<div class=\"w-e-menu\" data-title=\"标题\"><i class=\"w-e-icon-header\"></i></div>');\n    var dropListConf = {\n      width: 100,\n      title: '设置标题',\n      type: 'list',\n      list: [{\n        $elem: dom_core_1[\"default\"]('<h1>H1</h1>'),\n        value: '<h1>'\n      }, {\n        $elem: dom_core_1[\"default\"]('<h2>H2</h2>'),\n        value: '<h2>'\n      }, {\n        $elem: dom_core_1[\"default\"]('<h3>H3</h3>'),\n        value: '<h3>'\n      }, {\n        $elem: dom_core_1[\"default\"]('<h4>H4</h4>'),\n        value: '<h4>'\n      }, {\n        $elem: dom_core_1[\"default\"]('<h5>H5</h5>'),\n        value: '<h5>'\n      }, {\n        $elem: dom_core_1[\"default\"](\"<p>\" + editor.i18next.t('menus.dropListMenu.head.正文') + \"</p>\"),\n        value: '<p>'\n      }],\n      clickHandler: function clickHandler(value) {\n        // 注意 this 是指向当前的 Head 对象\n        _this.command(value);\n      }\n    };\n    _this = _super.call(this, $elem, editor, dropListConf) || this;\n    var onCatalogChange = editor.config.onCatalogChange; // 未配置目录change监听回调时不运行下面操作\n\n    if (onCatalogChange) {\n      _this.oldCatalogs = [];\n\n      _this.addListenerCatalog(); // 监听文本框编辑时的大纲信息\n\n\n      _this.getCatalogs(); // 初始有值的情况获取一遍大纲信息\n\n    }\n\n    return _this;\n  }\n  /**\n   * 执行命令\n   * @param value value\n   */\n\n\n  Head.prototype.command = function (value) {\n    var editor = this.editor;\n    var $selectionElem = editor.selection.getSelectionContainerElem();\n\n    if ($selectionElem && editor.$textElem.equal($selectionElem)) {\n      // 不能选中多行来设置标题，否则会出现问题\n      // 例如选中的是 <p>xxx</p><p>yyy</p> 来设置标题，设置之后会成为 <h1>xxx<br>yyy</h1> 不符合预期\n      this.setMultilineHead(value);\n    } else {\n      var _context;\n\n      // 选中内容包含序列，code，表格，分割线时不处理\n      if ((0, _indexOf[\"default\"])(_context = ['OL', 'UL', 'LI', 'TABLE', 'TH', 'TR', 'CODE', 'HR']).call(_context, dom_core_1[\"default\"]($selectionElem).getNodeName()) > -1) {\n        return;\n      }\n\n      editor.cmd[\"do\"]('formatBlock', value);\n    } // 标题设置成功且不是<p>正文标签就配置大纲id\n\n\n    value !== '<p>' && this.addUidForSelectionElem();\n  };\n  /**\n   * 为标题设置大纲\n   */\n\n\n  Head.prototype.addUidForSelectionElem = function () {\n    var editor = this.editor;\n    var tag = editor.selection.getSelectionContainerElem();\n    var id = util_1.getRandomCode(); // 默认五位数id\n\n    dom_core_1[\"default\"](tag).attr('id', id);\n  };\n  /**\n   * 监听change事件来返回大纲信息\n   */\n\n\n  Head.prototype.addListenerCatalog = function () {\n    var _this = this;\n\n    var editor = this.editor;\n    editor.txt.eventHooks.changeEvents.push(function () {\n      _this.getCatalogs();\n    });\n  };\n  /**\n   * 获取大纲数组\n   */\n\n\n  Head.prototype.getCatalogs = function () {\n    var editor = this.editor;\n    var $textElem = this.editor.$textElem;\n    var onCatalogChange = editor.config.onCatalogChange;\n    var elems = (0, _find[\"default\"])($textElem).call($textElem, 'h1,h2,h3,h4,h5');\n    var catalogs = [];\n    (0, _forEach[\"default\"])(elems).call(elems, function (elem, index) {\n      var $elem = dom_core_1[\"default\"](elem);\n      var id = $elem.attr('id');\n      var tag = $elem.getNodeName();\n      var text = $elem.text();\n\n      if (!id) {\n        id = util_1.getRandomCode();\n        $elem.attr('id', id);\n      } // 标题为空的情况不生成目录\n\n\n      if (!text) return;\n      catalogs.push({\n        tag: tag,\n        id: id,\n        text: text\n      });\n    }); // 旧目录和新目录对比是否相等，不相等则运行回调并保存新目录到旧目录变量，以方便下一次对比\n\n    if ((0, _stringify[\"default\"])(this.oldCatalogs) !== (0, _stringify[\"default\"])(catalogs)) {\n      this.oldCatalogs = catalogs;\n      onCatalogChange && onCatalogChange(catalogs);\n    }\n  };\n  /**\n   * 设置选中的多行标题\n   * @param value  需要执行的命令值\n   */\n\n\n  Head.prototype.setMultilineHead = function (value) {\n    var _this = this;\n\n    var _a, _b;\n\n    var editor = this.editor;\n    var $selection = editor.selection; // 初始选区的父节点\n\n    var containerElem = (_a = $selection.getSelectionContainerElem()) === null || _a === void 0 ? void 0 : _a.elems[0]; // 白名单：用户选区里如果有该元素则不进行转换\n\n    var _WHITE_LIST = ['IMG', 'VIDEO', 'TABLE', 'TH', 'TR', 'UL', 'OL', 'PRE', 'HR', 'BLOCKQUOTE']; // 获取选中的首、尾元素\n\n    var startElem = dom_core_1[\"default\"]($selection.getSelectionStartElem());\n    var endElem = dom_core_1[\"default\"]($selection.getSelectionEndElem()); // 判断用户选中元素是否为最后一个空元素，如果是将endElem指向上一个元素\n\n    if (endElem.elems[0].outerHTML === dom_core_1[\"default\"](const_1.EMPTY_P).elems[0].outerHTML && !endElem.elems[0].nextSibling) {\n      endElem = endElem.prev();\n    } // 存放选中的所有元素\n\n\n    var cacheDomList = [];\n    cacheDomList.push(startElem.getNodeTop(editor)); // 选中首尾元素在父级下的坐标\n\n    var indexList = []; // 选区共同祖先元素的所有子节点\n\n    var childList = (_b = $selection.getRange()) === null || _b === void 0 ? void 0 : _b.commonAncestorContainer.childNodes; // 找到选区的首尾元素的下标，方便最后恢复选区\n\n    childList === null || childList === void 0 ? void 0 : (0, _forEach[\"default\"])(childList).call(childList, function (item, index) {\n      if (item === cacheDomList[0].getNode()) {\n        indexList.push(index);\n      }\n\n      if (item === endElem.getNodeTop(editor).getNode()) {\n        indexList.push(index);\n      }\n    }); // 找到首尾元素中间所包含的所有dom\n\n    var i = 0; // 数组中的当前元素不等于选区最后一个节点时循环寻找中间节点\n\n    while (cacheDomList[i].getNode() !== endElem.getNodeTop(editor).getNode()) {\n      // 严谨性判断，是否元素为空\n      if (!cacheDomList[i].elems[0]) return;\n      var d = dom_core_1[\"default\"](cacheDomList[i].next().getNode());\n      cacheDomList.push(d);\n      i++;\n    } // 将选区内的所有子节点进行遍历生成对应的标签\n\n\n    cacheDomList === null || cacheDomList === void 0 ? void 0 : (0, _forEach[\"default\"])(cacheDomList).call(cacheDomList, function (_node, index) {\n      // 判断元素是否含有白名单内的标签元素\n      if (!_this.hasTag(_node, _WHITE_LIST)) {\n        var $h = dom_core_1[\"default\"](value);\n\n        var $parentNode = _node.parent().getNode(); // 设置标签内容\n\n\n        $h.html(\"\" + _node.html()); // 插入生成的新标签\n\n        $parentNode.insertBefore($h.getNode(), _node.getNode()); // 移除原有的标签\n\n        _node.remove();\n      }\n    }); // 重新设置选区起始位置，保留拖蓝区域\n\n    $selection.createRangeByElems(containerElem.children[indexList[0]], containerElem.children[indexList[1]]);\n  };\n  /**\n   * 是否含有某元素\n   * @param elem 需要检查的元素\n   * @param whiteList 白名单\n   */\n\n\n  Head.prototype.hasTag = function (elem, whiteList) {\n    var _this = this;\n\n    var _a;\n\n    if (!elem) return false;\n    if ((0, _includes[\"default\"])(whiteList).call(whiteList, elem === null || elem === void 0 ? void 0 : elem.getNodeName())) return true;\n    var _flag = false;\n    (_a = elem.children()) === null || _a === void 0 ? void 0 : (0, _forEach[\"default\"])(_a).call(_a, function (child) {\n      _flag = _this.hasTag(dom_core_1[\"default\"](child), whiteList);\n    });\n    return _flag;\n  };\n  /**\n   * 尝试改变菜单激活（高亮）状态\n   */\n\n\n  Head.prototype.tryChangeActive = function () {\n    var editor = this.editor;\n    var reg = /^h/i;\n    var cmdValue = editor.cmd.queryCommandValue('formatBlock');\n\n    if (reg.test(cmdValue)) {\n      this.active();\n    } else {\n      this.unActive();\n    }\n  };\n\n  return Head;\n}(DropListMenu_1[\"default\"]);\n\nexports[\"default\"] = Head;\n\n/***/ }),\n/* 332 */\n/***/ (function(module, exports, __webpack_require__) {\n\nmodule.exports = __webpack_require__(333);\n\n/***/ }),\n/* 333 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar parent = __webpack_require__(334);\n\nmodule.exports = parent;\n\n\n/***/ }),\n/* 334 */\n/***/ (function(module, exports, __webpack_require__) {\n\n__webpack_require__(335);\nvar core = __webpack_require__(11);\n\n// eslint-disable-next-line es/no-json -- safe\nif (!core.JSON) core.JSON = { stringify: JSON.stringify };\n\n// eslint-disable-next-line no-unused-vars -- required for `.length`\nmodule.exports = function stringify(it, replacer, space) {\n  return core.JSON.stringify.apply(null, arguments);\n};\n\n\n/***/ }),\n/* 335 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar $ = __webpack_require__(5);\nvar getBuiltIn = __webpack_require__(25);\nvar fails = __webpack_require__(12);\n\nvar $stringify = getBuiltIn('JSON', 'stringify');\nvar re = /[\\uD800-\\uDFFF]/g;\nvar low = /^[\\uD800-\\uDBFF]$/;\nvar hi = /^[\\uDC00-\\uDFFF]$/;\n\nvar fix = function (match, offset, string) {\n  var prev = string.charAt(offset - 1);\n  var next = string.charAt(offset + 1);\n  if ((low.test(match) && !hi.test(next)) || (hi.test(match) && !low.test(prev))) {\n    return '\\\\u' + match.charCodeAt(0).toString(16);\n  } return match;\n};\n\nvar FORCED = fails(function () {\n  return $stringify('\\uDF06\\uD834') !== '\"\\\\udf06\\\\ud834\"'\n    || $stringify('\\uDEAD') !== '\"\\\\udead\"';\n});\n\nif ($stringify) {\n  // `JSON.stringify` method\n  // https://tc39.es/ecma262/#sec-json.stringify\n  // https://github.com/tc39/proposal-well-formed-stringify\n  $({ target: 'JSON', stat: true, forced: FORCED }, {\n    // eslint-disable-next-line no-unused-vars -- required for `.length`\n    stringify: function stringify(it, replacer, space) {\n      var result = $stringify.apply(null, arguments);\n      return typeof result == 'string' ? result.replace(re, fix) : result;\n    }\n  });\n}\n\n\n/***/ }),\n/* 336 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * @description 链接 菜单\n * @author wangfupeng\n */\n\nvar _interopRequireDefault = __webpack_require__(0);\n\nvar _defineProperty = _interopRequireDefault(__webpack_require__(1));\n\nvar _trim = _interopRequireDefault(__webpack_require__(16));\n\n(0, _defineProperty[\"default\"])(exports, \"__esModule\", {\n  value: true\n});\n\nvar tslib_1 = __webpack_require__(2);\n\nvar PanelMenu_1 = tslib_1.__importDefault(__webpack_require__(36));\n\nvar dom_core_1 = tslib_1.__importDefault(__webpack_require__(3));\n\nvar create_panel_conf_1 = tslib_1.__importDefault(__webpack_require__(337));\n\nvar is_active_1 = tslib_1.__importDefault(__webpack_require__(139));\n\nvar Panel_1 = tslib_1.__importDefault(__webpack_require__(33));\n\nvar index_1 = tslib_1.__importDefault(__webpack_require__(339));\n\nvar const_1 = __webpack_require__(7);\n\nvar Link = function (_super) {\n  tslib_1.__extends(Link, _super);\n\n  function Link(editor) {\n    var _this = this;\n\n    var $elem = dom_core_1[\"default\"]('<div class=\"w-e-menu\" data-title=\"链接\"><i class=\"w-e-icon-link\"></i></div>');\n    _this = _super.call(this, $elem, editor) || this; // 绑定事件，如点击链接时，可以查看链接\n\n    index_1[\"default\"](editor);\n    return _this;\n  }\n  /**\n   * 菜单点击事件\n   */\n\n\n  Link.prototype.clickHandler = function () {\n    var editor = this.editor;\n    var $linkElem;\n    /**\n        @author:Gavin\n        @description\n            解决当全选删除编辑区内容时，点击链接没反应的问题(因为选区有问题)\n          \n    **/\n\n    var $selectionElem = editor.selection.getSelectionContainerElem();\n    var $textElem = editor.$textElem;\n    var html = $textElem.html();\n    var $txtHtml = (0, _trim[\"default\"])(html).call(html);\n\n    if ($txtHtml === const_1.EMPTY_P) {\n      var $emptyChild = $textElem.children(); // 调整选区\n\n      editor.selection.createRangeByElem($emptyChild, true, true); // 重新获取选区\n\n      $selectionElem = editor.selection.getSelectionContainerElem();\n    } // 判断是否是多行 多行则退出 否则会出现问题\n\n\n    if ($selectionElem && editor.$textElem.equal($selectionElem)) {\n      return;\n    }\n\n    if (this.isActive) {\n      // 菜单被激活，说明选区在链接里\n      $linkElem = editor.selection.getSelectionContainerElem();\n\n      if (!$linkElem) {\n        return;\n      } // 弹出 panel\n\n\n      this.createPanel($linkElem.text(), $linkElem.attr('href'));\n    } else {\n      // 菜单未被激活，说明选区不在链接里\n      if (editor.selection.isSelectionEmpty()) {\n        // 选区是空的，未选中内容\n        this.createPanel('', '');\n      } else {\n        // 选中内容了\n        this.createPanel(editor.selection.getSelectionText(), '');\n      }\n    }\n  };\n  /**\n   * 创建 panel\n   * @param text 文本\n   * @param link 链接\n   */\n\n\n  Link.prototype.createPanel = function (text, link) {\n    var conf = create_panel_conf_1[\"default\"](this.editor, text, link);\n    var panel = new Panel_1[\"default\"](this, conf);\n    panel.create();\n  };\n  /**\n   * 尝试修改菜单 active 状态\n   */\n\n\n  Link.prototype.tryChangeActive = function () {\n    var editor = this.editor;\n\n    if (is_active_1[\"default\"](editor)) {\n      this.active();\n    } else {\n      this.unActive();\n    }\n  };\n\n  return Link;\n}(PanelMenu_1[\"default\"]);\n\nexports[\"default\"] = Link;\n\n/***/ }),\n/* 337 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * @description link 菜单 panel tab 配置\n * @author wangfupeng\n */\n\nvar _interopRequireDefault = __webpack_require__(0);\n\nvar _defineProperty = _interopRequireDefault(__webpack_require__(1));\n\nvar _trim = _interopRequireDefault(__webpack_require__(16));\n\n(0, _defineProperty[\"default\"])(exports, \"__esModule\", {\n  value: true\n});\n\nvar tslib_1 = __webpack_require__(2);\n\nvar util_1 = __webpack_require__(6);\n\nvar dom_core_1 = tslib_1.__importDefault(__webpack_require__(3));\n\nvar is_active_1 = tslib_1.__importDefault(__webpack_require__(139));\n\nvar util_2 = __webpack_require__(338);\n\nfunction default_1(editor, text, link) {\n  // panel 中需要用到的id\n  var inputLinkId = util_1.getRandom('input-link');\n  var inputTextId = util_1.getRandom('input-text');\n  var btnOkId = util_1.getRandom('btn-ok');\n  var btnDelId = util_1.getRandom('btn-del'); // 是否显示“取消链接”\n\n  var delBtnDisplay = is_active_1[\"default\"](editor) ? 'inline-block' : 'none';\n  var $selectedLink;\n  /**\n   * 选中整个链接元素\n   */\n\n  function selectLinkElem() {\n    if (!is_active_1[\"default\"](editor)) return;\n    var $linkElem = editor.selection.getSelectionContainerElem();\n    if (!$linkElem) return;\n    editor.selection.createRangeByElem($linkElem);\n    editor.selection.restoreSelection();\n    $selectedLink = $linkElem; // 赋值给函数内全局变量\n  }\n  /**\n   * 插入链接\n   * @param text 文字\n   * @param link 链接\n   */\n\n\n  function insertLink(text, link) {\n    // fix: 修复列表下无法设置超链接的问题(替换选中文字中的标签)\n    var subStr = new RegExp(/(<\\/*ul>)|(<\\/*li>)|(<\\/*ol>)/g);\n    text = text.replace(subStr, '');\n\n    if (is_active_1[\"default\"](editor)) {\n      // 选区处于链接中，则选中整个菜单，再执行 insertHTML\n      selectLinkElem();\n      editor.cmd[\"do\"]('insertHTML', \"<a href=\\\"\" + link + \"\\\" target=\\\"_blank\\\">\" + text + \"</a>\");\n    } else {\n      // 选区未处于链接中，直接插入即可\n      editor.cmd[\"do\"]('insertHTML', \"<a href=\\\"\" + link + \"\\\" target=\\\"_blank\\\">\" + text + \"</a>\");\n    }\n  }\n  /**\n   * 取消链接\n   */\n\n\n  function delLink() {\n    if (!is_active_1[\"default\"](editor)) {\n      return;\n    } // 选中整个链接\n\n\n    selectLinkElem(); // 用文本替换链接\n\n    var selectionText = $selectedLink.text();\n    editor.cmd[\"do\"]('insertHTML', '<span>' + selectionText + '</span>');\n  }\n  /**\n   * 校验链接是否合法\n   * @param link 链接\n   */\n\n\n  function checkLink(text, link) {\n    //查看开发者自定义配置的返回值\n    var check = editor.config.linkCheck(text, link);\n\n    if (check === undefined) {//用户未能通过开发者的校验，且开发者不希望编辑器提示用户\n    } else if (check === true) {\n      //用户通过了开发者的校验\n      return true;\n    } else {\n      //用户未能通过开发者的校验，开发者希望我们提示这一字符串\n      editor.config.customAlert(check, 'warning');\n    }\n\n    return false;\n  }\n\n  var conf = {\n    width: 300,\n    height: 0,\n    // panel 中可包含多个 tab\n    tabs: [{\n      // tab 的标题\n      title: editor.i18next.t('menus.panelMenus.link.链接'),\n      // 模板\n      tpl: \"<div>\\n                        <input\\n                            id=\\\"\" + inputTextId + \"\\\"\\n                            type=\\\"text\\\"\\n                            class=\\\"block\\\"\\n                            value=\\\"\" + text + \"\\\"\\n                            placeholder=\\\"\" + editor.i18next.t('menus.panelMenus.link.链接文字') + \"\\\"/>\\n                        </td>\\n                        <input\\n                            id=\\\"\" + inputLinkId + \"\\\"\\n                            type=\\\"text\\\"\\n                            class=\\\"block\\\"\\n                            value=\\\"\" + link + \"\\\"\\n                            placeholder=\\\"\" + editor.i18next.t('如') + \" https://...\\\"/>\\n                        </td>\\n                        <div class=\\\"w-e-button-container\\\">\\n                            <button type=\\\"button\\\" id=\\\"\" + btnOkId + \"\\\" class=\\\"right\\\">\\n                                \" + editor.i18next.t('插入') + \"\\n                            </button>\\n                            <button type=\\\"button\\\" id=\\\"\" + btnDelId + \"\\\" class=\\\"gray right\\\" style=\\\"display:\" + delBtnDisplay + \"\\\">\\n                                \" + editor.i18next.t('menus.panelMenus.link.取消链接') + \"\\n                            </button>\\n                        </div>\\n                    </div>\",\n      // 事件绑定\n      events: [// 插入链接\n      {\n        selector: '#' + btnOkId,\n        type: 'click',\n        fn: function fn() {\n          var _context, _context2;\n\n          var _a, _b; // 获取选取\n\n\n          editor.selection.restoreSelection();\n          var topNode = editor.selection.getSelectionRangeTopNodes()[0].getNode();\n          var selection = window.getSelection(); // 执行插入链接\n\n          var $link = dom_core_1[\"default\"]('#' + inputLinkId);\n          var $text = dom_core_1[\"default\"]('#' + inputTextId);\n          var link = (0, _trim[\"default\"])(_context = $link.val()).call(_context);\n          var text = (0, _trim[\"default\"])(_context2 = $text.val()).call(_context2);\n          var html = '';\n          if (selection && !(selection === null || selection === void 0 ? void 0 : selection.isCollapsed)) html = (_a = util_2.insertHtml(selection, topNode)) === null || _a === void 0 ? void 0 : (0, _trim[\"default\"])(_a).call(_a); // 去除html的tag标签\n\n          var htmlText = html === null || html === void 0 ? void 0 : html.replace(/<.*?>/g, '');\n          var htmlTextLen = (_b = htmlText === null || htmlText === void 0 ? void 0 : htmlText.length) !== null && _b !== void 0 ? _b : 0; // 当input中的text的长度大于等于选区的文字时\n          // 需要判断两者相同的长度的text内容是否相同\n          // 相同则只需把多余的部分添加上去即可，否则使用input中的内容\n\n          if (htmlTextLen <= text.length) {\n            var startText = text.substring(0, htmlTextLen);\n            var endText = text.substring(htmlTextLen);\n\n            if (htmlText === startText) {\n              text = html + endText;\n            }\n          } // 链接为空，则不插入\n\n\n          if (!link) return; // 文本为空，则用链接代替\n\n          if (!text) text = link; // 校验链接是否满足用户的规则，若不满足则不插入\n\n          if (!checkLink(text, link)) return;\n          insertLink(text, link); // 返回 true，表示该事件执行完之后，panel 要关闭。否则 panel 不会关闭\n\n          return true;\n        },\n        bindEnter: true\n      }, // 取消链接\n      {\n        selector: '#' + btnDelId,\n        type: 'click',\n        fn: function fn() {\n          // 执行取消链接\n          delLink(); // 返回 true，表示该事件执行完之后，panel 要关闭。否则 panel 不会关闭\n\n          return true;\n        }\n      }]\n    } // tab end\n    ] // tabs end\n\n  };\n  return conf;\n}\n\nexports[\"default\"] = default_1;\n\n/***/ }),\n/* 338 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _interopRequireDefault = __webpack_require__(0);\n\nvar _defineProperty = _interopRequireDefault(__webpack_require__(1));\n\nvar _forEach = _interopRequireDefault(__webpack_require__(4));\n\n(0, _defineProperty[\"default\"])(exports, \"__esModule\", {\n  value: true\n});\nexports.insertHtml = exports.createPartHtml = exports.makeHtmlString = exports.getTopNode = void 0;\n/**\n * 获取除了包裹在整行区域的顶级Node\n * @param node 最外层node下的某个childNode\n * @param topText 最外层node中文本内容\n */\n\nfunction getTopNode(node, topText) {\n  var pointerNode = node;\n  var topNode = node;\n\n  do {\n    if (pointerNode.textContent === topText) break;\n    topNode = pointerNode;\n\n    if (pointerNode.parentNode) {\n      pointerNode = pointerNode === null || pointerNode === void 0 ? void 0 : pointerNode.parentNode;\n    }\n  } while ((pointerNode === null || pointerNode === void 0 ? void 0 : pointerNode.nodeName) !== 'P');\n\n  return topNode;\n}\n\nexports.getTopNode = getTopNode;\n/**\n * 生成html的string形式\n * @param tagName 标签名\n * @param content 需要包裹的内容\n */\n\nfunction makeHtmlString(node, content) {\n  var tagName = node.nodeName;\n  var attr = '';\n\n  if (node.nodeType === 3 || /^(h|H)[1-6]$/.test(tagName)) {\n    return content;\n  }\n\n  if (node.nodeType === 1) {\n    var style = node.getAttribute('style');\n    var face = node.getAttribute('face');\n    var color = node.getAttribute('color');\n    if (style) attr = attr + (\" style=\\\"\" + style + \"\\\"\");\n    if (face) attr = attr + (\" face=\\\"\" + face + \"\\\"\");\n    if (color) attr = attr + (\" color=\\\"\" + color + \"\\\"\");\n  }\n\n  tagName = tagName.toLowerCase();\n  return \"<\" + tagName + attr + \">\" + content + \"</\" + tagName + \">\";\n}\n\nexports.makeHtmlString = makeHtmlString;\n/**\n * 生成开始或者结束位置的html字符片段\n * @param topText 选区所在的行的文本内容\n * @param node 选区给出的node节点\n * @param startPos node文本内容选取的开始位置\n * @param endPos node文本内容选取的结束位置\n */\n\nfunction createPartHtml(topText, node, startPos, endPost) {\n  var _a;\n\n  var selectionContent = (_a = node.textContent) === null || _a === void 0 ? void 0 : _a.substring(startPos, endPost);\n  var pointerNode = node;\n  var content = '';\n\n  do {\n    content = makeHtmlString(pointerNode, selectionContent !== null && selectionContent !== void 0 ? selectionContent : '');\n    selectionContent = content;\n    pointerNode = pointerNode === null || pointerNode === void 0 ? void 0 : pointerNode.parentElement;\n  } while (pointerNode && pointerNode.textContent !== topText);\n\n  return content;\n}\n\nexports.createPartHtml = createPartHtml;\n/**\n * 生成需要插入的html内容的字符串形式\n * @param selection 选区对象\n * @param topNode 选区所在行的顶级node节点\n */\n\nfunction insertHtml(selection, topNode) {\n  var _a, _b, _c, _d, _e;\n\n  var anchorNode = selection.anchorNode,\n      focusNode = selection.focusNode,\n      anchorPos = selection.anchorOffset,\n      focusPos = selection.focusOffset;\n  var topText = (_a = topNode.textContent) !== null && _a !== void 0 ? _a : '';\n  var TagArr = getContainerTag(topNode);\n  var content = '';\n  var startContent = '';\n  var middleContent = '';\n  var endContent = '';\n  var startNode = anchorNode;\n  var endNode = focusNode; // 用来保存 anchorNode的非p最外层节点\n\n  var pointerNode = anchorNode; // 节点是同一个的处理\n\n  if (anchorNode === null || anchorNode === void 0 ? void 0 : anchorNode.isEqualNode(focusNode !== null && focusNode !== void 0 ? focusNode : null)) {\n    var innerContent = createPartHtml(topText, anchorNode, anchorPos, focusPos);\n    innerContent = addContainer(TagArr, innerContent);\n    return innerContent;\n  } // 选中开始位置节点的处理\n\n\n  if (anchorNode) startContent = createPartHtml(topText, anchorNode, anchorPos !== null && anchorPos !== void 0 ? anchorPos : 0); // 结束位置节点的处理\n\n  if (focusNode) endContent = createPartHtml(topText, focusNode, 0, focusPos); // 将指针节点位置放置到开始的节点\n\n  if (anchorNode) {\n    // 获取start的非p顶级node\n    startNode = getTopNode(anchorNode, topText);\n  }\n\n  if (focusNode) {\n    // 获取end的非p顶级node\n    endNode = getTopNode(focusNode, topText);\n  } // 处于开始和结束节点位置之间的节点的处理\n\n\n  pointerNode = (_b = startNode === null || startNode === void 0 ? void 0 : startNode.nextSibling) !== null && _b !== void 0 ? _b : anchorNode;\n\n  while (!(pointerNode === null || pointerNode === void 0 ? void 0 : pointerNode.isEqualNode(endNode !== null && endNode !== void 0 ? endNode : null))) {\n    var pointerNodeName = pointerNode === null || pointerNode === void 0 ? void 0 : pointerNode.nodeName;\n\n    if (pointerNodeName === '#text') {\n      middleContent = middleContent + (pointerNode === null || pointerNode === void 0 ? void 0 : pointerNode.textContent);\n    } else {\n      var htmlString = (_d = (_c = pointerNode === null || pointerNode === void 0 ? void 0 : pointerNode.firstChild) === null || _c === void 0 ? void 0 : _c.parentElement) === null || _d === void 0 ? void 0 : _d.innerHTML;\n      if (pointerNode) middleContent = middleContent + makeHtmlString(pointerNode, htmlString !== null && htmlString !== void 0 ? htmlString : '');\n    } // 解决文字和图片同一行时会触发无限循环, 到不了endNode === pointerNode条件\n\n\n    var nextPointNode = (_e = pointerNode === null || pointerNode === void 0 ? void 0 : pointerNode.nextSibling) !== null && _e !== void 0 ? _e : pointerNode;\n    if (nextPointNode === pointerNode) break;\n    pointerNode = nextPointNode;\n  }\n\n  content = \"\" + startContent + middleContent + endContent; // 增加最外层包裹标签\n\n  content = addContainer(TagArr, content);\n  return content;\n}\n\nexports.insertHtml = insertHtml;\n/**\n * 获取包裹在最外层的非p Node tagName 数组\n * @param node 选区所在行的node节点\n */\n\nfunction getContainerTag(node) {\n  var _a;\n\n  var topText = (_a = node.textContent) !== null && _a !== void 0 ? _a : '';\n  var tagArr = [];\n\n  while ((node === null || node === void 0 ? void 0 : node.textContent) === topText) {\n    if (node.nodeName !== 'P') {\n      tagArr.push(node);\n    }\n\n    node = node.childNodes[0];\n  }\n\n  return tagArr;\n}\n/**\n * 为内容增加包裹标签\n * @param tagArr 最外层包裹的tag数组，索引越小tag越在外面\n * @param content tag要包裹的内容\n */\n\n\nfunction addContainer(tagArr, content) {\n  (0, _forEach[\"default\"])(tagArr).call(tagArr, function (v) {\n    content = makeHtmlString(v, content);\n  });\n  return content;\n}\n\n/***/ }),\n/* 339 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * @description 绑定链接元素的事件，入口\n * @author wangfupeng\n */\n\nvar _interopRequireDefault = __webpack_require__(0);\n\nvar _defineProperty = _interopRequireDefault(__webpack_require__(1));\n\n(0, _defineProperty[\"default\"])(exports, \"__esModule\", {\n  value: true\n});\n\nvar tslib_1 = __webpack_require__(2);\n\nvar tooltip_event_1 = tslib_1.__importDefault(__webpack_require__(340));\n/**\n * 绑定事件\n * @param editor 编辑器实例\n */\n\n\nfunction bindEvent(editor) {\n  // tooltip 事件\n  tooltip_event_1[\"default\"](editor);\n}\n\nexports[\"default\"] = bindEvent;\n\n/***/ }),\n/* 340 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * @description tooltip 事件\n * @author wangfupeng\n */\n\nvar _interopRequireDefault = __webpack_require__(0);\n\nvar _defineProperty = _interopRequireDefault(__webpack_require__(1));\n\n(0, _defineProperty[\"default\"])(exports, \"__esModule\", {\n  value: true\n});\n\nvar tslib_1 = __webpack_require__(2);\n\nvar dom_core_1 = tslib_1.__importDefault(__webpack_require__(3));\n\nvar Tooltip_1 = tslib_1.__importDefault(__webpack_require__(37));\n/**\n * 生成 Tooltip 的显示隐藏函数\n */\n\n\nfunction createShowHideFn(editor) {\n  var tooltip;\n  /**\n   * 显示 tooltip\n   * @param $link 链接元素\n   */\n\n  function showLinkTooltip($link) {\n    var conf = [{\n      $elem: dom_core_1[\"default\"](\"<span>\" + editor.i18next.t('menus.panelMenus.link.查看链接') + \"</span>\"),\n      onClick: function onClick(editor, $link) {\n        var link = $link.attr('href');\n        window.open(link, '_target'); // 返回 true，表示执行完之后，隐藏 tooltip。否则不隐藏。\n\n        return true;\n      }\n    }, {\n      $elem: dom_core_1[\"default\"](\"<span>\" + editor.i18next.t('menus.panelMenus.link.取消链接') + \"</span>\"),\n      onClick: function onClick(editor, $link) {\n        var _a, _b; // 选中链接元素\n\n\n        editor.selection.createRangeByElem($link);\n        editor.selection.restoreSelection();\n        var $childNodes = $link.childNodes(); // 如果链接是图片\n\n        if (($childNodes === null || $childNodes === void 0 ? void 0 : $childNodes.getNodeName()) === 'IMG') {\n          // 获取选中的图片\n          var $selectIMG = (_b = (_a = editor.selection.getSelectionContainerElem()) === null || _a === void 0 ? void 0 : _a.children()) === null || _b === void 0 ? void 0 : _b.elems[0].children[0]; // 插入图片\n\n          editor.cmd[\"do\"]('insertHTML', \"<img \\n                                src=\" + ($selectIMG === null || $selectIMG === void 0 ? void 0 : $selectIMG.getAttribute('src')) + \" \\n                                style=\" + ($selectIMG === null || $selectIMG === void 0 ? void 0 : $selectIMG.getAttribute('style')) + \">\");\n        } else {\n          // 用文字，替换链接\n          var selectionText = $link.text();\n          editor.cmd[\"do\"]('insertHTML', '<span>' + selectionText + '</span>');\n        } // 返回 true，表示执行完之后，隐藏 tooltip。否则不隐藏。\n\n\n        return true;\n      }\n    }]; // 创建 tooltip\n\n    tooltip = new Tooltip_1[\"default\"](editor, $link, conf);\n    tooltip.create();\n  }\n  /**\n   * 隐藏 tooltip\n   */\n\n\n  function hideLinkTooltip() {\n    // 移除 tooltip\n    if (tooltip) {\n      tooltip.remove();\n      tooltip = null;\n    }\n  }\n\n  return {\n    showLinkTooltip: showLinkTooltip,\n    hideLinkTooltip: hideLinkTooltip\n  };\n}\n/**\n * 绑定 tooltip 事件\n * @param editor 编辑器实例\n */\n\n\nfunction bindTooltipEvent(editor) {\n  var _a = createShowHideFn(editor),\n      showLinkTooltip = _a.showLinkTooltip,\n      hideLinkTooltip = _a.hideLinkTooltip; // 点击链接元素是，显示 tooltip\n\n\n  editor.txt.eventHooks.linkClickEvents.push(showLinkTooltip); // 点击其他地方，或者滚动时，隐藏 tooltip\n\n  editor.txt.eventHooks.clickEvents.push(hideLinkTooltip);\n  editor.txt.eventHooks.keyupEvents.push(hideLinkTooltip);\n  editor.txt.eventHooks.toolbarClickEvents.push(hideLinkTooltip);\n  editor.txt.eventHooks.menuClickEvents.push(hideLinkTooltip);\n  editor.txt.eventHooks.textScrollEvents.push(hideLinkTooltip);\n}\n\nexports[\"default\"] = bindTooltipEvent;\n\n/***/ }),\n/* 341 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * @description 斜体\n * @author liuwei\n */\n\nvar _interopRequireDefault = __webpack_require__(0);\n\nvar _defineProperty = _interopRequireDefault(__webpack_require__(1));\n\n(0, _defineProperty[\"default\"])(exports, \"__esModule\", {\n  value: true\n});\n\nvar tslib_1 = __webpack_require__(2);\n\nvar BtnMenu_1 = tslib_1.__importDefault(__webpack_require__(23));\n\nvar dom_core_1 = tslib_1.__importDefault(__webpack_require__(3));\n\nvar Italic = function (_super) {\n  tslib_1.__extends(Italic, _super);\n\n  function Italic(editor) {\n    var _this = this;\n\n    var $elem = dom_core_1[\"default\"](\"<div class=\\\"w-e-menu\\\" data-title=\\\"\\u659C\\u4F53\\\">\\n                <i class=\\\"w-e-icon-italic\\\"></i>\\n            </div>\");\n    _this = _super.call(this, $elem, editor) || this;\n    return _this;\n  }\n  /**\n   * 点击事件\n   */\n\n\n  Italic.prototype.clickHandler = function () {\n    var editor = this.editor;\n    var isSelectEmpty = editor.selection.isSelectionEmpty();\n\n    if (isSelectEmpty) {\n      // 选区范围是空的，插入并选中一个“空白”\n      editor.selection.createEmptyRange();\n    } // 执行 italic 命令\n\n\n    editor.cmd[\"do\"]('italic');\n\n    if (isSelectEmpty) {\n      // 需要将选区范围折叠起来\n      editor.selection.collapseRange();\n      editor.selection.restoreSelection();\n    }\n  };\n  /**\n   * 尝试修改菜单激活状态\n   */\n\n\n  Italic.prototype.tryChangeActive = function () {\n    var editor = this.editor;\n\n    if (editor.cmd.queryCommandState('italic')) {\n      this.active();\n    } else {\n      this.unActive();\n    }\n  };\n\n  return Italic;\n}(BtnMenu_1[\"default\"]);\n\nexports[\"default\"] = Italic;\n\n/***/ }),\n/* 342 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * @description 下划线 underline\n * @author dyl\n *\n */\n\nvar _interopRequireDefault = __webpack_require__(0);\n\nvar _defineProperty = _interopRequireDefault(__webpack_require__(1));\n\n(0, _defineProperty[\"default\"])(exports, \"__esModule\", {\n  value: true\n});\n\nvar tslib_1 = __webpack_require__(2);\n\nvar BtnMenu_1 = tslib_1.__importDefault(__webpack_require__(23));\n\nvar dom_core_1 = tslib_1.__importDefault(__webpack_require__(3));\n\nvar Underline = function (_super) {\n  tslib_1.__extends(Underline, _super);\n\n  function Underline(editor) {\n    var _this = this;\n\n    var $elem = dom_core_1[\"default\"](\"<div class=\\\"w-e-menu\\\" data-title=\\\"\\u4E0B\\u5212\\u7EBF\\\">\\n                <i class=\\\"w-e-icon-underline\\\"></i>\\n            </div>\");\n    _this = _super.call(this, $elem, editor) || this;\n    return _this;\n  }\n  /**\n   * 点击事件\n   */\n\n\n  Underline.prototype.clickHandler = function () {\n    var editor = this.editor;\n    var isSelectEmpty = editor.selection.isSelectionEmpty();\n\n    if (isSelectEmpty) {\n      // 选区范围是空的，插入并选中一个“空白”\n      editor.selection.createEmptyRange();\n    } // 执行 Underline 命令\n\n\n    editor.cmd[\"do\"]('underline');\n\n    if (isSelectEmpty) {\n      // 需要将选区范围折叠起来\n      editor.selection.collapseRange();\n      editor.selection.restoreSelection();\n    }\n  };\n  /**\n   * 尝试修改菜单激活状态\n   */\n\n\n  Underline.prototype.tryChangeActive = function () {\n    var editor = this.editor;\n\n    if (editor.cmd.queryCommandState('underline')) {\n      this.active();\n    } else {\n      this.unActive();\n    }\n  };\n\n  return Underline;\n}(BtnMenu_1[\"default\"]);\n\nexports[\"default\"] = Underline;\n\n/***/ }),\n/* 343 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * @description 删除线\n * @author lkw\n */\n\nvar _interopRequireDefault = __webpack_require__(0);\n\nvar _defineProperty = _interopRequireDefault(__webpack_require__(1));\n\n(0, _defineProperty[\"default\"])(exports, \"__esModule\", {\n  value: true\n});\n\nvar tslib_1 = __webpack_require__(2);\n\nvar BtnMenu_1 = tslib_1.__importDefault(__webpack_require__(23));\n\nvar dom_core_1 = tslib_1.__importDefault(__webpack_require__(3));\n\nvar StrikeThrough = function (_super) {\n  tslib_1.__extends(StrikeThrough, _super);\n\n  function StrikeThrough(editor) {\n    var _this = this;\n\n    var $elem = dom_core_1[\"default\"](\"<div class=\\\"w-e-menu\\\" data-title=\\\"\\u5220\\u9664\\u7EBF\\\">\\n                <i class=\\\"w-e-icon-strikethrough\\\"></i>\\n            </div>\");\n    _this = _super.call(this, $elem, editor) || this;\n    return _this;\n  }\n  /**\n   * 点击事件\n   */\n\n\n  StrikeThrough.prototype.clickHandler = function () {\n    var editor = this.editor;\n    var isSelectEmpty = editor.selection.isSelectionEmpty();\n\n    if (isSelectEmpty) {\n      // 选区范围是空的，插入并选中一个“空白”\n      editor.selection.createEmptyRange();\n    } // 执行 strikeThrough 命令\n\n\n    editor.cmd[\"do\"]('strikeThrough');\n\n    if (isSelectEmpty) {\n      // 需要将选区范围折叠起来\n      editor.selection.collapseRange();\n      editor.selection.restoreSelection();\n    }\n  };\n  /**\n   * 尝试修改菜单激活状态\n   */\n\n\n  StrikeThrough.prototype.tryChangeActive = function () {\n    var editor = this.editor;\n\n    if (editor.cmd.queryCommandState('strikeThrough')) {\n      this.active();\n    } else {\n      this.unActive();\n    }\n  };\n\n  return StrikeThrough;\n}(BtnMenu_1[\"default\"]);\n\nexports[\"default\"] = StrikeThrough;\n\n/***/ }),\n/* 344 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * @description 字体样式 FontStyle\n * @author dyl\n *\n */\n\nvar _interopRequireDefault = __webpack_require__(0);\n\nvar _defineProperty = _interopRequireDefault(__webpack_require__(1));\n\n(0, _defineProperty[\"default\"])(exports, \"__esModule\", {\n  value: true\n});\n\nvar tslib_1 = __webpack_require__(2);\n\nvar DropListMenu_1 = tslib_1.__importDefault(__webpack_require__(24));\n\nvar dom_core_1 = tslib_1.__importDefault(__webpack_require__(3));\n\nvar FontStyleList_1 = tslib_1.__importDefault(__webpack_require__(345));\n\nvar FontStyle = function (_super) {\n  tslib_1.__extends(FontStyle, _super);\n\n  function FontStyle(editor) {\n    var _this = this;\n\n    var $elem = dom_core_1[\"default\"](\"<div class=\\\"w-e-menu\\\" data-title=\\\"\\u5B57\\u4F53\\\">\\n                <i class=\\\"w-e-icon-font\\\"></i>\\n            </div>\");\n    var fontStyleList = new FontStyleList_1[\"default\"](editor.config.fontNames);\n    var fontListConf = {\n      width: 100,\n      title: '设置字体',\n      type: 'list',\n      list: fontStyleList.getItemList(),\n      clickHandler: function clickHandler(value) {\n        // this 是指向当前的 FontStyle 对象\n        _this.command(value);\n      }\n    };\n    _this = _super.call(this, $elem, editor, fontListConf) || this;\n    return _this;\n  }\n  /**\n   * 执行命令\n   * @param value value\n   */\n\n\n  FontStyle.prototype.command = function (value) {\n    var _a;\n\n    var editor = this.editor;\n    var isEmptySelection = editor.selection.isSelectionEmpty();\n    var $selectionElem = (_a = editor.selection.getSelectionContainerElem()) === null || _a === void 0 ? void 0 : _a.elems[0];\n    if ($selectionElem == null) return;\n    var isFont = ($selectionElem === null || $selectionElem === void 0 ? void 0 : $selectionElem.nodeName.toLowerCase()) !== 'p';\n    var isSameValue = ($selectionElem === null || $selectionElem === void 0 ? void 0 : $selectionElem.getAttribute('face')) === value;\n\n    if (isEmptySelection) {\n      if (isFont && !isSameValue) {\n        var $elems = editor.selection.getSelectionRangeTopNodes();\n        editor.selection.createRangeByElem($elems[0]);\n        editor.selection.moveCursor($elems[0].elems[0]);\n      }\n\n      editor.selection.setRangeToElem($selectionElem); // 插入空白选区\n\n      editor.selection.createEmptyRange();\n    }\n\n    editor.cmd[\"do\"]('fontName', value);\n\n    if (isEmptySelection) {\n      // 需要将选区范围折叠起来\n      editor.selection.collapseRange();\n      editor.selection.restoreSelection();\n    }\n  };\n  /**\n   * 尝试修改菜单激活状态\n   * ?字体是否需要有激活状态这个操作?\n   */\n\n\n  FontStyle.prototype.tryChangeActive = function () {// const editor = this.editor\n    // const cmdValue = editor.cmd.queryCommandValue('fontName')\n    // if (menusConfig.fontNames.indexOf(cmdValue) >= 0) {\n    //     this.active()\n    // } else {\n    //     this.unActive()\n    // }\n  };\n\n  return FontStyle;\n}(DropListMenu_1[\"default\"]);\n\nexports[\"default\"] = FontStyle;\n\n/***/ }),\n/* 345 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _interopRequireDefault = __webpack_require__(0);\n\nvar _defineProperty = _interopRequireDefault(__webpack_require__(1));\n\nvar _forEach = _interopRequireDefault(__webpack_require__(4));\n\n(0, _defineProperty[\"default\"])(exports, \"__esModule\", {\n  value: true\n});\n\nvar tslib_1 = __webpack_require__(2);\n/**\n * @description 字体 class\n * @author dyl\n */\n\n\nvar dom_core_1 = tslib_1.__importDefault(__webpack_require__(3));\n/**\n * 封装的一个字体菜单列表数据的组装对象,\n * 原因是因为在constructor函数中,直接执行此流程,会让代码量看起来较多,\n * 如果要在constructor调用外部函数,个人目前发现会有错误提示,\n * 因此,想着顺便研究实践下ts,遍创建了这样一个类\n */\n\n\nvar FontStyleList = function () {\n  function FontStyleList(list) {\n    var _this = this;\n\n    this.itemList = [];\n    (0, _forEach[\"default\"])(list).call(list, function (fontValue) {\n      // fontValue 2种情况一种是string类型的直接value等同于font-family\n      // Object类型value为font-family name为ui视图呈现\n      var fontFamily = typeof fontValue === 'string' ? fontValue : fontValue.value;\n      var fontName = typeof fontValue === 'string' ? fontValue : fontValue.name;\n\n      _this.itemList.push({\n        $elem: dom_core_1[\"default\"](\"<p style=\\\"font-family:'\" + fontFamily + \"'\\\">\" + fontName + \"</p>\"),\n        value: fontName\n      });\n    });\n  }\n\n  FontStyleList.prototype.getItemList = function () {\n    return this.itemList;\n  };\n\n  return FontStyleList;\n}();\n\nexports[\"default\"] = FontStyleList;\n\n/***/ }),\n/* 346 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * @description 字号 FontSize\n * @author lkw\n *\n */\n\nvar _interopRequireDefault = __webpack_require__(0);\n\nvar _defineProperty = _interopRequireDefault(__webpack_require__(1));\n\n(0, _defineProperty[\"default\"])(exports, \"__esModule\", {\n  value: true\n});\n\nvar tslib_1 = __webpack_require__(2);\n\nvar DropListMenu_1 = tslib_1.__importDefault(__webpack_require__(24));\n\nvar dom_core_1 = tslib_1.__importDefault(__webpack_require__(3));\n\nvar FontSizeList_1 = tslib_1.__importDefault(__webpack_require__(347));\n\nvar FontSize = function (_super) {\n  tslib_1.__extends(FontSize, _super);\n\n  function FontSize(editor) {\n    var _this = this;\n\n    var $elem = dom_core_1[\"default\"](\"<div class=\\\"w-e-menu\\\" data-title=\\\"\\u5B57\\u53F7\\\">\\n                <i class=\\\"w-e-icon-text-heigh\\\"></i>\\n            </div>\");\n    var fontStyleList = new FontSizeList_1[\"default\"](editor.config.fontSizes);\n    var fontListConf = {\n      width: 160,\n      title: '设置字号',\n      type: 'list',\n      list: fontStyleList.getItemList(),\n      clickHandler: function clickHandler(value) {\n        // this 是指向当前的 FontSize 对象\n        _this.command(value);\n      }\n    };\n    _this = _super.call(this, $elem, editor, fontListConf) || this;\n    return _this;\n  }\n  /**\n   * 执行命令\n   * @param value value\n   */\n\n\n  FontSize.prototype.command = function (value) {\n    var _a;\n\n    var editor = this.editor;\n    var isEmptySelection = editor.selection.isSelectionEmpty();\n    var selectionElem = (_a = editor.selection.getSelectionContainerElem()) === null || _a === void 0 ? void 0 : _a.elems[0];\n    if (selectionElem == null) return;\n    editor.cmd[\"do\"]('fontSize', value);\n\n    if (isEmptySelection) {\n      // 需要将选区范围折叠起来\n      editor.selection.collapseRange();\n      editor.selection.restoreSelection();\n    }\n  };\n  /**\n   * 尝试修改菜单激活状态\n   * ?字号是否需要有激活状态这个操作?\n   */\n\n\n  FontSize.prototype.tryChangeActive = function () {};\n\n  return FontSize;\n}(DropListMenu_1[\"default\"]);\n\nexports[\"default\"] = FontSize;\n\n/***/ }),\n/* 347 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _interopRequireDefault = __webpack_require__(0);\n\nvar _defineProperty = _interopRequireDefault(__webpack_require__(1));\n\n(0, _defineProperty[\"default\"])(exports, \"__esModule\", {\n  value: true\n});\n\nvar tslib_1 = __webpack_require__(2);\n/**\n * @description 字号 class\n * @author lkw\n */\n\n\nvar dom_core_1 = tslib_1.__importDefault(__webpack_require__(3));\n/**\n * FontSizeList 字号配置列表\n */\n\n\nvar FontSizeList = function () {\n  function FontSizeList(list) {\n    this.itemList = [];\n\n    for (var key in list) {\n      var item = list[key];\n      this.itemList.push({\n        $elem: dom_core_1[\"default\"](\"<p style=\\\"font-size:\" + key + \"\\\">\" + item.name + \"</p>\"),\n        value: item.value\n      });\n    }\n  }\n\n  FontSizeList.prototype.getItemList = function () {\n    return this.itemList;\n  };\n\n  return FontSizeList;\n}();\n\nexports[\"default\"] = FontSizeList;\n\n/***/ }),\n/* 348 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * @description 对齐方式\n * @author liuwei\n */\n\nvar _interopRequireDefault = __webpack_require__(0);\n\nvar _defineProperty = _interopRequireDefault(__webpack_require__(1));\n\nvar _forEach = _interopRequireDefault(__webpack_require__(4));\n\nvar _indexOf = _interopRequireDefault(__webpack_require__(28));\n\n(0, _defineProperty[\"default\"])(exports, \"__esModule\", {\n  value: true\n});\n\nvar tslib_1 = __webpack_require__(2);\n\nvar DropListMenu_1 = tslib_1.__importDefault(__webpack_require__(24));\n\nvar dom_core_1 = tslib_1.__importDefault(__webpack_require__(3));\n\nvar SPECIAL_NODE_LIST = ['LI'];\nvar SPECIAL_TOP_NODE_LIST = ['UL', 'BLOCKQUOTE'];\n\nvar Justify = function (_super) {\n  tslib_1.__extends(Justify, _super);\n\n  function Justify(editor) {\n    var _this = this;\n\n    var $elem = dom_core_1[\"default\"]('<div class=\"w-e-menu\" data-title=\"对齐\"><i class=\"w-e-icon-paragraph-left\"></i></div>');\n    var dropListConf = {\n      width: 100,\n      title: '对齐方式',\n      type: 'list',\n      list: [{\n        $elem: dom_core_1[\"default\"](\"<p>\\n                            <i class=\\\"w-e-icon-paragraph-left w-e-drop-list-item\\\"></i>\\n                            \" + editor.i18next.t('menus.dropListMenu.justify.靠左') + \"\\n                        </p>\"),\n        value: 'left'\n      }, {\n        $elem: dom_core_1[\"default\"](\"<p>\\n                            <i class=\\\"w-e-icon-paragraph-center w-e-drop-list-item\\\"></i>\\n                            \" + editor.i18next.t('menus.dropListMenu.justify.居中') + \"\\n                        </p>\"),\n        value: 'center'\n      }, {\n        $elem: dom_core_1[\"default\"](\"<p>\\n                            <i class=\\\"w-e-icon-paragraph-right w-e-drop-list-item\\\"></i>\\n                            \" + editor.i18next.t('menus.dropListMenu.justify.靠右') + \"\\n                        </p>\"),\n        value: 'right'\n      }, {\n        $elem: dom_core_1[\"default\"](\"<p>\\n                            <i class=\\\"w-e-icon-paragraph-justify w-e-drop-list-item\\\"></i>\\n                            \" + editor.i18next.t('menus.dropListMenu.justify.两端') + \"\\n                        </p>\"),\n        value: 'justify'\n      }],\n      clickHandler: function clickHandler(value) {\n        // 执行对应的value操作\n        _this.command(value);\n      }\n    };\n    _this = _super.call(this, $elem, editor, dropListConf) || this;\n    return _this;\n  }\n  /**\n   * 执行命令\n   * @param value value\n   */\n\n\n  Justify.prototype.command = function (value) {\n    var editor = this.editor;\n    var selection = editor.selection;\n    var $selectionElem = selection.getSelectionContainerElem(); // 保存选区\n\n    selection.saveRange(); // 获取顶级元素\n\n    var $elems = editor.selection.getSelectionRangeTopNodes();\n\n    if ($selectionElem === null || $selectionElem === void 0 ? void 0 : $selectionElem.length) {\n      // list 在chrome下默认多包裹一个 p，导致不能通过顶层元素判断，所以单独加个判断\n      if (this.isSpecialNode($selectionElem, $elems[0]) || this.isSpecialTopNode($elems[0])) {\n        var el = this.getSpecialNodeUntilTop($selectionElem, $elems[0]);\n        if (el == null) return;\n        dom_core_1[\"default\"](el).css('text-align', value);\n      } else {\n        (0, _forEach[\"default\"])($elems).call($elems, function (el) {\n          el.css('text-align', value);\n        });\n      }\n    } //恢复选区\n\n\n    selection.restoreSelection();\n  };\n  /**\n   * 获取选区中的特殊元素，如果不存在，则直接返回顶层元素子元素\n   * @param el DomElement\n   * @param topEl DomElement\n   */\n\n\n  Justify.prototype.getSpecialNodeUntilTop = function (el, topEl) {\n    var parentNode = el.elems[0];\n    var topNode = topEl.elems[0]; // 可能出现嵌套的情况，所以一级一级向上找，是否是特殊元素\n\n    while (parentNode != null) {\n      if ((0, _indexOf[\"default\"])(SPECIAL_NODE_LIST).call(SPECIAL_NODE_LIST, parentNode === null || parentNode === void 0 ? void 0 : parentNode.nodeName) !== -1) {\n        return parentNode;\n      } // 如果再到 top 元素之前还没找到特殊元素，直接返回元素\n\n\n      if (parentNode.parentNode === topNode) {\n        return parentNode;\n      }\n\n      parentNode = parentNode.parentNode;\n    }\n\n    return parentNode;\n  };\n  /**\n   * 当选区元素或者顶层元素是某些特殊元素时，只需要修改子元素的对齐样式的元素\n   * @param el DomElement\n   * @param topEl DomElement\n   */\n\n\n  Justify.prototype.isSpecialNode = function (el, topEl) {\n    // 如果以后有类似的元素要这样处理，直接修改这个数组即可\n    var parentNode = this.getSpecialNodeUntilTop(el, topEl);\n    if (parentNode == null) return false;\n    return (0, _indexOf[\"default\"])(SPECIAL_NODE_LIST).call(SPECIAL_NODE_LIST, parentNode.nodeName) !== -1;\n  };\n  /**\n   * 当选区 top 元素为某些特殊元素时，只需要修改子元素的对齐样式的元素\n   * @param el DomElement\n   */\n\n\n  Justify.prototype.isSpecialTopNode = function (topEl) {\n    var _a;\n\n    if (topEl == null) return false;\n    return (0, _indexOf[\"default\"])(SPECIAL_TOP_NODE_LIST).call(SPECIAL_TOP_NODE_LIST, (_a = topEl.elems[0]) === null || _a === void 0 ? void 0 : _a.nodeName) !== -1;\n  };\n  /**\n   * 尝试改变菜单激活（高亮）状态\n   * 默认左对齐,若选择其他对其方式对active进行高亮否则unActive\n   * ?考虑优化的话 是否可以对具体选中的进行高亮\n   */\n\n\n  Justify.prototype.tryChangeActive = function () {};\n\n  return Justify;\n}(DropListMenu_1[\"default\"]);\n\nexports[\"default\"] = Justify;\n\n/***/ }),\n/* 349 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * @description 引用\n * @author tonghan\n */\n\nvar _interopRequireDefault = __webpack_require__(0);\n\nvar _defineProperty = _interopRequireDefault(__webpack_require__(1));\n\nvar _forEach = _interopRequireDefault(__webpack_require__(4));\n\n(0, _defineProperty[\"default\"])(exports, \"__esModule\", {\n  value: true\n});\n\nvar tslib_1 = __webpack_require__(2);\n\nvar dom_core_1 = tslib_1.__importDefault(__webpack_require__(3));\n\nvar BtnMenu_1 = tslib_1.__importDefault(__webpack_require__(23));\n\nvar bind_event_1 = tslib_1.__importDefault(__webpack_require__(350));\n\nvar create_quote_node_1 = tslib_1.__importDefault(__webpack_require__(351));\n\nvar const_1 = __webpack_require__(7);\n\nvar Quote = function (_super) {\n  tslib_1.__extends(Quote, _super);\n\n  function Quote(editor) {\n    var _this = this;\n\n    var $elem = dom_core_1[\"default\"](\"<div class=\\\"w-e-menu\\\" data-title=\\\"\\u5F15\\u7528\\\">\\n                <i class=\\\"w-e-icon-quotes-left\\\"></i>\\n            </div>\");\n    _this = _super.call(this, $elem, editor) || this;\n    bind_event_1[\"default\"](editor);\n    return _this;\n  }\n  /**\n   * 点击事件\n   */\n\n\n  Quote.prototype.clickHandler = function () {\n    var _a, _b;\n\n    var editor = this.editor;\n    var isSelectEmpty = editor.selection.isSelectionEmpty();\n    var topNodeElem = editor.selection.getSelectionRangeTopNodes();\n    var $topNodeElem = topNodeElem[topNodeElem.length - 1];\n    var nodeName = this.getTopNodeName(); // IE 中不支持 formatBlock <BLOCKQUOTE> ，要用其他方式兼容\n    // 兼容firefox无法取消blockquote的问题\n\n    if (nodeName === 'BLOCKQUOTE') {\n      // 撤销 quote\n      var $targetELem = dom_core_1[\"default\"]($topNodeElem.childNodes());\n      var len = $targetELem.length;\n      var $middle_1 = $topNodeElem;\n      (0, _forEach[\"default\"])($targetELem).call($targetELem, function (elem) {\n        var $elem = dom_core_1[\"default\"](elem);\n        $elem.insertAfter($middle_1);\n        $middle_1 = $elem;\n      });\n      $topNodeElem.remove();\n      editor.selection.moveCursor($targetELem.elems[len - 1]); // 即时更新btn状态\n\n      this.tryChangeActive();\n    } else {\n      // 将 P 转换为 quote\n\n      /**\n      @author:gavin\n      @description\n          1. 解决ctrl+a全选删除后，选区错位的问题。\n          2. 或者内容清空，按删除键后，选区错位。\n           导致topNodeElem选择的是编辑器顶层元素，在进行dom操作时，quote插入的位置有问题。\n      **/\n      var $quote = create_quote_node_1[\"default\"](topNodeElem); //如果选择的元素时顶层元素，就将选区移动到正确的位置\n\n      if (editor.$textElem.equal($topNodeElem)) {\n        var containerElem = (_a = editor.selection.getSelectionContainerElem()) === null || _a === void 0 ? void 0 : _a.elems[0];\n        editor.selection.createRangeByElems(containerElem.children[0], containerElem.children[0]);\n        topNodeElem = editor.selection.getSelectionRangeTopNodes();\n        $quote = create_quote_node_1[\"default\"](topNodeElem);\n        $topNodeElem.append($quote);\n      } else {\n        $quote.insertAfter($topNodeElem);\n      }\n\n      this.delSelectNode(topNodeElem);\n      var moveNode = (_b = $quote.childNodes()) === null || _b === void 0 ? void 0 : _b.last().getNode();\n      if (moveNode == null) return; // 兼容firefox（firefox下空行情况下选区会在br后，造成自动换行的问题）\n\n      moveNode.textContent ? editor.selection.moveCursor(moveNode) : editor.selection.moveCursor(moveNode, 0); // 即时更新btn状态\n\n      this.tryChangeActive(); // 防止最后一行无法跳出\n\n      dom_core_1[\"default\"](const_1.EMPTY_P).insertAfter($quote);\n      return;\n    }\n\n    if (isSelectEmpty) {\n      // 需要将选区范围折叠起来\n      editor.selection.collapseRange();\n      editor.selection.restoreSelection();\n    }\n  };\n  /**\n   * 尝试修改菜单激活状态\n   */\n\n\n  Quote.prototype.tryChangeActive = function () {\n    var _a;\n\n    var editor = this.editor;\n    var cmdValue = (_a = editor.selection.getSelectionRangeTopNodes()[0]) === null || _a === void 0 ? void 0 : _a.getNodeName();\n\n    if (cmdValue === 'BLOCKQUOTE') {\n      this.active();\n    } else {\n      this.unActive();\n    }\n  };\n  /**\n   * 获取包裹在最外层的节点(防止内部嵌入多个样式)\n   * @param selectionElem 选中的节点\n   * @returns {string} 最终要处理的节点名称\n   */\n\n\n  Quote.prototype.getTopNodeName = function () {\n    var editor = this.editor;\n    var $topNodeElem = editor.selection.getSelectionRangeTopNodes()[0];\n    var nodeName = $topNodeElem === null || $topNodeElem === void 0 ? void 0 : $topNodeElem.getNodeName();\n    return nodeName;\n  };\n  /**\n   * 删除选中的元素\n   * @param selectElem 选中的元素节点数组\n   */\n\n\n  Quote.prototype.delSelectNode = function (selectElem) {\n    (0, _forEach[\"default\"])(selectElem).call(selectElem, function (node) {\n      node.remove();\n    });\n  };\n\n  return Quote;\n}(BtnMenu_1[\"default\"]);\n\nexports[\"default\"] = Quote;\n\n/***/ }),\n/* 350 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _interopRequireDefault = __webpack_require__(0);\n\nvar _defineProperty = _interopRequireDefault(__webpack_require__(1));\n\n(0, _defineProperty[\"default\"])(exports, \"__esModule\", {\n  value: true\n});\n\nvar tslib_1 = __webpack_require__(2);\n\nvar const_1 = __webpack_require__(7);\n\nvar dom_core_1 = tslib_1.__importDefault(__webpack_require__(3));\n\nfunction bindEvent(editor) {\n  function quoteEnter(e) {\n    var _a;\n\n    var $selectElem = editor.selection.getSelectionContainerElem();\n    var $topSelectElem = editor.selection.getSelectionRangeTopNodes()[0]; // 对quote的enter进行特殊处理\n    //最后一行为空标签时再按会出跳出blockquote\n\n    if (($topSelectElem === null || $topSelectElem === void 0 ? void 0 : $topSelectElem.getNodeName()) === 'BLOCKQUOTE') {\n      // firefox下点击引用按钮会选中外容器<blockquote></blockquote>\n      if ($selectElem.getNodeName() === 'BLOCKQUOTE') {\n        var selectNode = (_a = $selectElem.childNodes()) === null || _a === void 0 ? void 0 : _a.getNode();\n        editor.selection.moveCursor(selectNode);\n      }\n\n      if ($selectElem.text() === '') {\n        e.preventDefault();\n        $selectElem.remove();\n        var $newLine = dom_core_1[\"default\"](const_1.EMPTY_P);\n        $newLine.insertAfter($topSelectElem); // 将光标移动br前面\n\n        editor.selection.moveCursor($newLine.getNode(), 0);\n      } // 当blockQuote中没有内容回车后移除blockquote\n\n\n      if ($topSelectElem.text() === '') {\n        $topSelectElem.remove();\n      }\n    }\n  }\n\n  editor.txt.eventHooks.enterDownEvents.push(quoteEnter);\n}\n\nexports[\"default\"] = bindEvent;\n\n/***/ }),\n/* 351 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _interopRequireDefault = __webpack_require__(0);\n\nvar _defineProperty = _interopRequireDefault(__webpack_require__(1));\n\nvar _forEach = _interopRequireDefault(__webpack_require__(4));\n\n(0, _defineProperty[\"default\"])(exports, \"__esModule\", {\n  value: true\n});\n\nvar tslib_1 = __webpack_require__(2);\n\nvar dom_core_1 = tslib_1.__importDefault(__webpack_require__(3));\n/**\n * 创建一个blockquote元素节点\n * @param editor 编辑器实例\n */\n\n\nfunction createQuote($childElem) {\n  var $targetElem = dom_core_1[\"default\"](\"<blockquote></blockquote>\");\n  (0, _forEach[\"default\"])($childElem).call($childElem, function (node) {\n    $targetElem.append(node.clone(true));\n  });\n  return $targetElem;\n}\n\nexports[\"default\"] = createQuote;\n\n/***/ }),\n/* 352 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * @description 背景颜色 BackColor\n * @author lkw\n *\n */\n\nvar _interopRequireDefault = __webpack_require__(0);\n\nvar _defineProperty = _interopRequireDefault(__webpack_require__(1));\n\nvar _map = _interopRequireDefault(__webpack_require__(27));\n\n(0, _defineProperty[\"default\"])(exports, \"__esModule\", {\n  value: true\n});\n\nvar tslib_1 = __webpack_require__(2);\n\nvar DropListMenu_1 = tslib_1.__importDefault(__webpack_require__(24));\n\nvar dom_core_1 = tslib_1.__importDefault(__webpack_require__(3));\n\nvar util_1 = __webpack_require__(6);\n\nvar BackColor = function (_super) {\n  tslib_1.__extends(BackColor, _super);\n\n  function BackColor(editor) {\n    var _context;\n\n    var _this = this;\n\n    var $elem = dom_core_1[\"default\"](\"<div class=\\\"w-e-menu\\\" data-title=\\\"\\u80CC\\u666F\\u8272\\\">\\n                <i class=\\\"w-e-icon-paint-brush\\\"></i>\\n            </div>\");\n    var colorListConf = {\n      width: 120,\n      title: '背景颜色',\n      // droplist 内容以 block 形式展示\n      type: 'inline-block',\n      list: (0, _map[\"default\"])(_context = editor.config.colors).call(_context, function (color) {\n        return {\n          $elem: dom_core_1[\"default\"](\"<i style=\\\"color:\" + color + \";\\\" class=\\\"w-e-icon-paint-brush\\\"></i>\"),\n          value: color\n        };\n      }),\n      clickHandler: function clickHandler(value) {\n        // this 是指向当前的 BackColor 对象\n        _this.command(value);\n      }\n    };\n    _this = _super.call(this, $elem, editor, colorListConf) || this;\n    return _this;\n  }\n  /**\n   * 执行命令\n   * @param value value\n   */\n\n\n  BackColor.prototype.command = function (value) {\n    var _a;\n\n    var editor = this.editor;\n    var isEmptySelection = editor.selection.isSelectionEmpty();\n    var $selectionElem = (_a = editor.selection.getSelectionContainerElem()) === null || _a === void 0 ? void 0 : _a.elems[0];\n    if ($selectionElem == null) return;\n    var isSpan = ($selectionElem === null || $selectionElem === void 0 ? void 0 : $selectionElem.nodeName.toLowerCase()) !== 'p';\n    var bgColor = $selectionElem === null || $selectionElem === void 0 ? void 0 : $selectionElem.style.backgroundColor;\n    var isSameColor = util_1.hexToRgb(value) === bgColor;\n\n    if (isEmptySelection) {\n      if (isSpan && !isSameColor) {\n        var $elems = editor.selection.getSelectionRangeTopNodes();\n        editor.selection.createRangeByElem($elems[0]);\n        editor.selection.moveCursor($elems[0].elems[0]);\n      } // 插入空白选区\n\n\n      editor.selection.createEmptyRange();\n    }\n\n    editor.cmd[\"do\"]('backColor', value);\n\n    if (isEmptySelection) {\n      // 需要将选区范围折叠起来\n      editor.selection.collapseRange();\n      editor.selection.restoreSelection();\n    }\n  };\n  /**\n   * 尝试修改菜单激活状态\n   */\n\n\n  BackColor.prototype.tryChangeActive = function () {};\n\n  return BackColor;\n}(DropListMenu_1[\"default\"]);\n\nexports[\"default\"] = BackColor;\n\n/***/ }),\n/* 353 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * @description 文字颜色 FontColor\n * @author lkw\n *\n */\n\nvar _interopRequireDefault = __webpack_require__(0);\n\nvar _defineProperty = _interopRequireDefault(__webpack_require__(1));\n\nvar _map = _interopRequireDefault(__webpack_require__(27));\n\n(0, _defineProperty[\"default\"])(exports, \"__esModule\", {\n  value: true\n});\n\nvar tslib_1 = __webpack_require__(2);\n\nvar DropListMenu_1 = tslib_1.__importDefault(__webpack_require__(24));\n\nvar dom_core_1 = tslib_1.__importDefault(__webpack_require__(3));\n\nvar FontColor = function (_super) {\n  tslib_1.__extends(FontColor, _super);\n\n  function FontColor(editor) {\n    var _context;\n\n    var _this = this;\n\n    var $elem = dom_core_1[\"default\"](\"<div class=\\\"w-e-menu\\\" data-title=\\\"\\u6587\\u5B57\\u989C\\u8272\\\">\\n                <i class=\\\"w-e-icon-pencil2\\\"></i>\\n            </div>\");\n    var colorListConf = {\n      width: 120,\n      title: '文字颜色',\n      // droplist 内容以 block 形式展示\n      type: 'inline-block',\n      list: (0, _map[\"default\"])(_context = editor.config.colors).call(_context, function (color) {\n        return {\n          $elem: dom_core_1[\"default\"](\"<i style=\\\"color:\" + color + \";\\\" class=\\\"w-e-icon-pencil2\\\"></i>\"),\n          value: color\n        };\n      }),\n      clickHandler: function clickHandler(value) {\n        // this 是指向当前的 BackColor 对象\n        _this.command(value);\n      }\n    };\n    _this = _super.call(this, $elem, editor, colorListConf) || this;\n    return _this;\n  }\n  /**\n   * 执行命令\n   * @param value value\n   */\n\n\n  FontColor.prototype.command = function (value) {\n    var _a;\n\n    var editor = this.editor;\n    var isEmptySelection = editor.selection.isSelectionEmpty();\n    var $selectionElem = (_a = editor.selection.getSelectionContainerElem()) === null || _a === void 0 ? void 0 : _a.elems[0];\n    if ($selectionElem == null) return; // 获取选区范围的文字\n\n    var $selectionText = editor.selection.getSelectionText(); // 如果设置的是 a 标签就特殊处理一下，避免回车换行设置颜色无效的情况\n    // 只处理选中a标签内全部文字的情况，因为选中部分文字不存在换行颜色失效的情况\n\n    if ($selectionElem.nodeName === 'A' && $selectionElem.textContent === $selectionText) {\n      // 创建一个相当于占位的元素\n      var _payloadElem = dom_core_1[\"default\"]('<span>&#8203;</span>').getNode(); // 添加到a标签之后\n\n\n      $selectionElem.appendChild(_payloadElem);\n    }\n\n    editor.cmd[\"do\"]('foreColor', value);\n\n    if (isEmptySelection) {\n      // 需要将选区范围折叠起来\n      editor.selection.collapseRange();\n      editor.selection.restoreSelection();\n    }\n  };\n  /**\n   * 尝试修改菜单激活状态\n   */\n\n\n  FontColor.prototype.tryChangeActive = function () {};\n\n  return FontColor;\n}(DropListMenu_1[\"default\"]);\n\nexports[\"default\"] = FontColor;\n\n/***/ }),\n/* 354 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * @description 视频 菜单\n * @author tonghan\n */\n\nvar _interopRequireDefault = __webpack_require__(0);\n\nvar _defineProperty = _interopRequireDefault(__webpack_require__(1));\n\n(0, _defineProperty[\"default\"])(exports, \"__esModule\", {\n  value: true\n});\n\nvar tslib_1 = __webpack_require__(2);\n\nvar dom_core_1 = tslib_1.__importDefault(__webpack_require__(3));\n\nvar Panel_1 = tslib_1.__importDefault(__webpack_require__(33));\n\nvar PanelMenu_1 = tslib_1.__importDefault(__webpack_require__(36));\n\nvar create_panel_conf_1 = tslib_1.__importDefault(__webpack_require__(355));\n\nvar index_1 = tslib_1.__importDefault(__webpack_require__(361));\n\nvar Video = function (_super) {\n  tslib_1.__extends(Video, _super);\n\n  function Video(editor) {\n    var _this = this;\n\n    var $elem = dom_core_1[\"default\"](\"<div class=\\\"w-e-menu\\\" data-title=\\\"\\u89C6\\u9891\\\">\\n                <i class=\\\"w-e-icon-play\\\"></i>\\n            </div>\");\n    _this = _super.call(this, $elem, editor) || this; // 绑定事件 tootip\n\n    index_1[\"default\"](editor);\n    return _this;\n  }\n  /**\n   * 菜单点击事件\n   */\n\n\n  Video.prototype.clickHandler = function () {\n    // 弹出 panel\n    this.createPanel('');\n  };\n  /**\n   * 创建 panel\n   * @param link 链接\n   */\n\n\n  Video.prototype.createPanel = function (iframe) {\n    var conf = create_panel_conf_1[\"default\"](this.editor, iframe);\n    var panel = new Panel_1[\"default\"](this, conf);\n    panel.create();\n  };\n  /**\n   * 尝试修改菜单 active 状态\n   */\n\n\n  Video.prototype.tryChangeActive = function () {};\n\n  return Video;\n}(PanelMenu_1[\"default\"]);\n\nexports[\"default\"] = Video;\n\n/***/ }),\n/* 355 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * @description video 菜单 panel tab 配置\n * @author tonghan\n */\n\nvar _interopRequireDefault = __webpack_require__(0);\n\nvar _defineProperty = _interopRequireDefault(__webpack_require__(1));\n\nvar _trim = _interopRequireDefault(__webpack_require__(16));\n\n(0, _defineProperty[\"default\"])(exports, \"__esModule\", {\n  value: true\n});\n\nvar tslib_1 = __webpack_require__(2);\n\nvar util_1 = __webpack_require__(6);\n\nvar dom_core_1 = tslib_1.__importDefault(__webpack_require__(3));\n\nvar upload_video_1 = tslib_1.__importDefault(__webpack_require__(356));\n\nvar const_1 = __webpack_require__(7);\n\nfunction default_1(editor, video) {\n  var config = editor.config;\n  var uploadVideo = new upload_video_1[\"default\"](editor); // panel 中需要用到的id\n\n  var inputIFrameId = util_1.getRandom('input-iframe');\n  var btnOkId = util_1.getRandom('btn-ok');\n  var inputUploadId = util_1.getRandom('input-upload');\n  var btnStartId = util_1.getRandom('btn-local-ok');\n  /**\n   * 插入链接\n   * @param iframe html标签\n   */\n\n  function insertVideo(video) {\n    editor.cmd[\"do\"]('insertHTML', video + const_1.EMPTY_P); // video添加后的回调\n\n    editor.config.onlineVideoCallback(video);\n  }\n  /**\n   * 校验在线视频链接\n   * @param video 在线视频链接\n   */\n\n\n  function checkOnlineVideo(video) {\n    // 查看开发者自定义配置的返回值\n    var check = editor.config.onlineVideoCheck(video);\n\n    if (check === true) {\n      return true;\n    }\n\n    if (typeof check === 'string') {\n      //用户未能通过开发者的校验，开发者希望我们提示这一字符串\n      editor.config.customAlert(check, 'error');\n    }\n\n    return false;\n  } // tabs配置\n  // const fileMultipleAttr = config.uploadVideoMaxLength === 1 ? '' : 'multiple=\"multiple\"'\n\n\n  var tabsConf = [{\n    // tab 的标题\n    title: editor.i18next.t('menus.panelMenus.video.上传视频'),\n    tpl: \"<div class=\\\"w-e-up-video-container\\\">\\n                    <div id=\\\"\" + btnStartId + \"\\\" class=\\\"w-e-up-btn\\\">\\n                        <i class=\\\"w-e-icon-upload2\\\"></i>\\n                    </div>\\n                    <div style=\\\"display:none;\\\">\\n                        <input id=\\\"\" + inputUploadId + \"\\\" type=\\\"file\\\" accept=\\\"video/*\\\"/>\\n                    </div>\\n                 </div>\",\n    events: [// 触发选择视频\n    {\n      selector: '#' + btnStartId,\n      type: 'click',\n      fn: function fn() {\n        var $file = dom_core_1[\"default\"]('#' + inputUploadId);\n        var fileElem = $file.elems[0];\n\n        if (fileElem) {\n          fileElem.click();\n        } else {\n          // 返回 true 可关闭 panel\n          return true;\n        }\n      }\n    }, // 选择视频完毕\n    {\n      selector: '#' + inputUploadId,\n      type: 'change',\n      fn: function fn() {\n        var $file = dom_core_1[\"default\"]('#' + inputUploadId);\n        var fileElem = $file.elems[0];\n\n        if (!fileElem) {\n          // 返回 true 可关闭 panel\n          return true;\n        } // 获取选中的 file 对象列表\n\n\n        var fileList = fileElem.files;\n\n        if (fileList.length) {\n          uploadVideo.uploadVideo(fileList);\n        } // 返回 true 可关闭 panel\n\n\n        return true;\n      }\n    }]\n  }, {\n    // tab 的标题\n    title: editor.i18next.t('menus.panelMenus.video.插入视频'),\n    // 模板\n    tpl: \"<div>\\n                    <input \\n                        id=\\\"\" + inputIFrameId + \"\\\" \\n                        type=\\\"text\\\" \\n                        class=\\\"block\\\" \\n                        placeholder=\\\"\" + editor.i18next.t('如') + \"\\uFF1A<iframe src=... ></iframe>\\\"/>\\n                    </td>\\n                    <div class=\\\"w-e-button-container\\\">\\n                        <button type=\\\"button\\\" id=\\\"\" + btnOkId + \"\\\" class=\\\"right\\\">\\n                            \" + editor.i18next.t('插入') + \"\\n                        </button>\\n                    </div>\\n                </div>\",\n    // 事件绑定\n    events: [// 插入视频\n    {\n      selector: '#' + btnOkId,\n      type: 'click',\n      fn: function fn() {\n        var _context;\n\n        // 执行插入视频\n        var $video = dom_core_1[\"default\"]('#' + inputIFrameId);\n        var video = (0, _trim[\"default\"])(_context = $video.val()).call(_context); // 视频为空，则不插入\n\n        if (!video) return; // 对当前用户插入的内容进行判断，插入为空，或者返回false，都停止插入\n\n        if (!checkOnlineVideo(video)) return;\n        insertVideo(video); // 返回 true，表示该事件执行完之后，panel 要关闭。否则 panel 不会关闭\n\n        return true;\n      },\n      bindEnter: true\n    }]\n  } // tab end\n  ];\n  var conf = {\n    width: 300,\n    height: 0,\n    // panel 中可包含多个 tab\n    tabs: [] // tabs end\n\n  }; // 显示“上传视频”\n\n  if (window.FileReader && (config.uploadVideoServer || config.customUploadVideo)) {\n    conf.tabs.push(tabsConf[0]);\n  } // 显示“插入视频”\n\n\n  if (config.showLinkVideo) {\n    conf.tabs.push(tabsConf[1]);\n  }\n\n  return conf;\n}\n\nexports[\"default\"] = default_1;\n\n/***/ }),\n/* 356 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * @description 上传视频\n * @author lichunlin\n */\n\nvar _interopRequireDefault = __webpack_require__(0);\n\nvar _defineProperty = _interopRequireDefault(__webpack_require__(1));\n\nvar _some = _interopRequireDefault(__webpack_require__(137));\n\nvar _bind = _interopRequireDefault(__webpack_require__(61));\n\nvar _forEach = _interopRequireDefault(__webpack_require__(4));\n\nvar _indexOf = _interopRequireDefault(__webpack_require__(28));\n\n(0, _defineProperty[\"default\"])(exports, \"__esModule\", {\n  value: true\n});\n\nvar tslib_1 = __webpack_require__(2);\n\nvar util_1 = __webpack_require__(6);\n\nvar upload_core_1 = tslib_1.__importDefault(__webpack_require__(140));\n\nvar progress_1 = tslib_1.__importDefault(__webpack_require__(141));\n\nvar const_1 = __webpack_require__(7);\n\nvar util_2 = __webpack_require__(6);\n\nvar UploadVideo = function () {\n  function UploadVideo(editor) {\n    this.editor = editor;\n  }\n  /**\n   * 上传视频\n   * @param files 文件列表\n   */\n\n\n  UploadVideo.prototype.uploadVideo = function (files) {\n    var _this = this;\n\n    if (!files.length) {\n      return;\n    }\n\n    var editor = this.editor;\n    var config = editor.config; // ------------------------------ i18next ------------------------------\n\n    var i18nPrefix = 'validate.';\n\n    var t = function t(text) {\n      return editor.i18next.t(i18nPrefix + text);\n    }; // ------------------------------ 获取配置信息 ------------------------------\n    // 服务端地址\n\n\n    var uploadVideoServer = config.uploadVideoServer; // 上传视频的最大体积，默认 1024M\n\n    var maxSize = config.uploadVideoMaxSize;\n    var uploadVideoMaxSize = maxSize / 1024; // 一次最多上传多少个视频\n    // const uploadVideoMaxLength = config.uploadVideoMaxLength\n    // 自定义上传视频的名称\n\n    var uploadVideoName = config.uploadVideoName; // 上传视频自定义参数\n\n    var uploadVideoParams = config.uploadVideoParams; // 自定义参数拼接到 url 中\n\n    var uploadVideoParamsWithUrl = config.uploadVideoParamsWithUrl; // 上传视频自定义 header\n\n    var uploadVideoHeaders = config.uploadVideoHeaders; // 钩子函数\n\n    var uploadVideoHooks = config.uploadVideoHooks; // 上传视频超时时间 ms 默认2个小时\n\n    var uploadVideoTimeout = config.uploadVideoTimeout; // 跨域带 cookie\n\n    var withVideoCredentials = config.withVideoCredentials; // 自定义上传\n\n    var customUploadVideo = config.customUploadVideo; // 格式校验\n\n    var uploadVideoAccept = config.uploadVideoAccept; // ------------------------------ 验证文件信息 ------------------------------\n\n    var resultFiles = [];\n    var errInfos = [];\n    util_1.arrForEach(files, function (file) {\n      var name = file.name;\n      var size = file.size / 1024 / 1024; // chrome 低版本 name === undefined\n\n      if (!name || !size) {\n        return;\n      }\n\n      if (!(uploadVideoAccept instanceof Array)) {\n        // 格式不是数组\n        errInfos.push(\"\\u3010\" + uploadVideoAccept + \"\\u3011\" + t('uploadVideoAccept 不是Array'));\n        return;\n      }\n\n      if (!(0, _some[\"default\"])(uploadVideoAccept).call(uploadVideoAccept, function (item) {\n        return item === name.split('.')[name.split('.').length - 1];\n      })) {\n        // 后缀名不合法，不是视频\n        errInfos.push(\"\\u3010\" + name + \"\\u3011\" + t('不是视频'));\n        return;\n      }\n\n      if (uploadVideoMaxSize < size) {\n        // 上传视频过大\n        errInfos.push(\"\\u3010\" + name + \"\\u3011\" + t('大于') + \" \" + uploadVideoMaxSize + \"M\");\n        return;\n      } //验证通过的加入结果列表\n\n\n      resultFiles.push(file);\n    }); // 抛出验证信息\n\n    if (errInfos.length) {\n      config.customAlert(t('视频验证未通过') + \": \\n\" + errInfos.join('\\n'), 'warning');\n      return;\n    } // 如果过滤后文件列表为空直接返回\n\n\n    if (resultFiles.length === 0) {\n      config.customAlert(t('传入的文件不合法'), 'warning');\n      return;\n    } // ------------------------------ 自定义上传 ------------------------------\n\n\n    if (customUploadVideo && typeof customUploadVideo === 'function') {\n      var _context;\n\n      customUploadVideo(resultFiles, (0, _bind[\"default\"])(_context = this.insertVideo).call(_context, this));\n      return;\n    } // 添加视频数据\n\n\n    var formData = new FormData();\n    (0, _forEach[\"default\"])(resultFiles).call(resultFiles, function (file, index) {\n      var name = uploadVideoName || file.name;\n\n      if (resultFiles.length > 1) {\n        // 多个文件时，filename 不能重复\n        name = name + (index + 1);\n      }\n\n      formData.append(name, file);\n    }); // ------------------------------ 上传视频 ------------------------------\n    //添加自定义参数  基于有服务端地址的情况下\n\n    if (uploadVideoServer) {\n      // 添加自定义参数\n      var uploadVideoServerArr = uploadVideoServer.split('#');\n      uploadVideoServer = uploadVideoServerArr[0];\n      var uploadVideoServerHash = uploadVideoServerArr[1] || '';\n      (0, _forEach[\"default\"])(util_1).call(util_1, uploadVideoParams, function (key, val) {\n        // 因使用者反应，自定义参数不能默认 encode ，由 v3.1.1 版本开始注释掉\n        // val = encodeURIComponent(val)\n        // 第一，将参数拼接到 url 中\n        if (uploadVideoParamsWithUrl) {\n          if ((0, _indexOf[\"default\"])(uploadVideoServer).call(uploadVideoServer, '?') > 0) {\n            uploadVideoServer += '&';\n          } else {\n            uploadVideoServer += '?';\n          }\n\n          uploadVideoServer = uploadVideoServer + key + '=' + val;\n        } // 第二，将参数添加到 formData 中\n\n\n        formData.append(key, val);\n      });\n\n      if (uploadVideoServerHash) {\n        uploadVideoServer += '#' + uploadVideoServerHash;\n      } // 开始上传\n\n\n      var xhr = upload_core_1[\"default\"](uploadVideoServer, {\n        timeout: uploadVideoTimeout,\n        formData: formData,\n        headers: uploadVideoHeaders,\n        withCredentials: !!withVideoCredentials,\n        beforeSend: function beforeSend(xhr) {\n          if (uploadVideoHooks.before) return uploadVideoHooks.before(xhr, editor, resultFiles);\n        },\n        onTimeout: function onTimeout(xhr) {\n          config.customAlert(t('上传视频超时'), 'error');\n          if (uploadVideoHooks.timeout) uploadVideoHooks.timeout(xhr, editor);\n        },\n        onProgress: function onProgress(percent, e) {\n          var progressBar = new progress_1[\"default\"](editor);\n\n          if (e.lengthComputable) {\n            percent = e.loaded / e.total;\n            progressBar.show(percent);\n          }\n        },\n        onError: function onError(xhr) {\n          config.customAlert(t('上传视频错误'), 'error', t('上传视频错误') + \"\\uFF0C\" + t('服务器返回状态') + \": \" + xhr.status);\n          if (uploadVideoHooks.error) uploadVideoHooks.error(xhr, editor);\n        },\n        onFail: function onFail(xhr, resultStr) {\n          config.customAlert(t('上传视频失败'), 'error', t('上传视频返回结果错误') + (\"\\uFF0C\" + t('返回结果') + \": \") + resultStr);\n          if (uploadVideoHooks.fail) uploadVideoHooks.fail(xhr, editor, resultStr);\n        },\n        onSuccess: function onSuccess(xhr, result) {\n          if (uploadVideoHooks.customInsert) {\n            var _context2;\n\n            // 自定义插入视频\n            uploadVideoHooks.customInsert((0, _bind[\"default\"])(_context2 = _this.insertVideo).call(_context2, _this), result, editor);\n            return;\n          }\n\n          if (result.errno != '0') {\n            // 返回格式不对，应该为 { errno: 0, data: [...] }\n            config.customAlert(t('上传视频失败'), 'error', t('上传视频返回结果错误') + \"\\uFF0C\" + t('返回结果') + \" errno=\" + result.errno);\n            if (uploadVideoHooks.fail) uploadVideoHooks.fail(xhr, editor, result);\n            return;\n          } // 成功，插入视频\n\n\n          var data = result.data;\n\n          _this.insertVideo(data.url); // 钩子函数\n\n\n          if (uploadVideoHooks.success) uploadVideoHooks.success(xhr, editor, result);\n        }\n      });\n\n      if (typeof xhr === 'string') {\n        // 上传被阻止\n        config.customAlert(xhr, 'error');\n      }\n    }\n  };\n  /**\n   * 往编辑器区域插入视频\n   * @param url 视频访问地址\n   */\n\n\n  UploadVideo.prototype.insertVideo = function (url) {\n    var editor = this.editor;\n    var config = editor.config;\n    var i18nPrefix = 'validate.';\n\n    var t = function t(text, prefix) {\n      if (prefix === void 0) {\n        prefix = i18nPrefix;\n      }\n\n      return editor.i18next.t(prefix + text);\n    }; // 判断用户是否自定义插入视频\n\n\n    if (!config.customInsertVideo) {\n      if (util_2.UA.isFirefox) {\n        editor.cmd[\"do\"]('insertHTML', \"<p data-we-video-p=\\\"true\\\"><video src=\\\"\" + url + \"\\\" controls=\\\"controls\\\" style=\\\"max-width:100%\\\"></video></p><p>&#8203</p>\");\n      } else {\n        editor.cmd[\"do\"]('insertHTML', \"<video src=\\\"\" + url + \"\\\" controls=\\\"controls\\\" style=\\\"max-width:100%\\\"></video>\" + const_1.EMPTY_P);\n      }\n    } else {\n      config.customInsertVideo(url);\n      return;\n    } // 加载视频\n\n\n    var video = document.createElement('video');\n\n    video.onload = function () {\n      video = null;\n    };\n\n    video.onerror = function () {\n      config.customAlert(t('插入视频错误'), 'error', \"wangEditor: \" + t('插入视频错误') + \"\\uFF0C\" + t('视频链接') + \" \\\"\" + url + \"\\\"\\uFF0C\" + t('下载链接失败'));\n      video = null;\n    };\n\n    video.onabort = function () {\n      return video = null;\n    };\n\n    video.src = url;\n  };\n\n  return UploadVideo;\n}();\n\nexports[\"default\"] = UploadVideo;\n\n/***/ }),\n/* 357 */\n/***/ (function(module, exports, __webpack_require__) {\n\nmodule.exports = __webpack_require__(358);\n\n/***/ }),\n/* 358 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar parent = __webpack_require__(359);\n\nmodule.exports = parent;\n\n\n/***/ }),\n/* 359 */\n/***/ (function(module, exports, __webpack_require__) {\n\n__webpack_require__(360);\nvar path = __webpack_require__(11);\n\nmodule.exports = path.Date.now;\n\n\n/***/ }),\n/* 360 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar $ = __webpack_require__(5);\n\n// `Date.now` method\n// https://tc39.es/ecma262/#sec-date.now\n$({ target: 'Date', stat: true }, {\n  now: function now() {\n    return new Date().getTime();\n  }\n});\n\n\n/***/ }),\n/* 361 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * @description 绑定视频的事件\n * @author lichunlin\n */\n\nvar _interopRequireDefault = __webpack_require__(0);\n\nvar _defineProperty = _interopRequireDefault(__webpack_require__(1));\n\n(0, _defineProperty[\"default\"])(exports, \"__esModule\", {\n  value: true\n});\n\nvar tslib_1 = __webpack_require__(2);\n\nvar tooltip_event_1 = tslib_1.__importDefault(__webpack_require__(362));\n\nvar keyboard_1 = tslib_1.__importDefault(__webpack_require__(364));\n/**\n * 绑定事件\n * @param editor 编辑器实例\n */\n\n\nfunction bindEvent(editor) {\n  //Tooltip\n  tooltip_event_1[\"default\"](editor);\n  keyboard_1[\"default\"](editor);\n}\n\nexports[\"default\"] = bindEvent;\n\n/***/ }),\n/* 362 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * @description tooltip 事件\n * @author lichunlin\n */\n\nvar _interopRequireDefault = __webpack_require__(0);\n\nvar _defineProperty = _interopRequireDefault(__webpack_require__(1));\n\n(0, _defineProperty[\"default\"])(exports, \"__esModule\", {\n  value: true\n});\nexports.createShowHideFn = void 0;\n\nvar tslib_1 = __webpack_require__(2);\n\nvar dom_core_1 = tslib_1.__importDefault(__webpack_require__(3));\n\nvar Tooltip_1 = tslib_1.__importDefault(__webpack_require__(37));\n\nvar video_alignment_1 = tslib_1.__importDefault(__webpack_require__(363));\n/**\n * 生成 Tooltip 的显示隐藏函数\n */\n\n\nfunction createShowHideFn(editor) {\n  var tooltip;\n\n  var t = function t(text, prefix) {\n    if (prefix === void 0) {\n      prefix = '';\n    }\n\n    return editor.i18next.t(prefix + text);\n  };\n  /**\n   * 显示 tooltip\n   * @param $node 链接元素\n   */\n\n\n  function showVideoTooltip($node) {\n    var conf = [{\n      $elem: dom_core_1[\"default\"](\"<span class='w-e-icon-trash-o'></span>\"),\n      onClick: function onClick(editor, $node) {\n        // 选中video元素 删除\n        $node.remove(); // 返回 true，表示执行完之后，隐藏 tooltip。否则不隐藏。\n\n        return true;\n      }\n    }, {\n      $elem: dom_core_1[\"default\"]('<span>100%</span>'),\n      onClick: function onClick(editor, $node) {\n        $node.attr('width', '100%');\n        $node.removeAttr('height'); // 返回 true，表示执行完之后，隐藏 tooltip。否则不隐藏。\n\n        return true;\n      }\n    }, {\n      $elem: dom_core_1[\"default\"]('<span>50%</span>'),\n      onClick: function onClick(editor, $node) {\n        $node.attr('width', '50%');\n        $node.removeAttr('height'); // 返回 true，表示执行完之后，隐藏 tooltip。否则不隐藏。\n\n        return true;\n      }\n    }, {\n      $elem: dom_core_1[\"default\"]('<span>30%</span>'),\n      onClick: function onClick(editor, $node) {\n        $node.attr('width', '30%');\n        $node.removeAttr('height'); // 返回 true，表示执行完之后，隐藏 tooltip。否则不隐藏。\n\n        return true;\n      }\n    }, {\n      $elem: dom_core_1[\"default\"](\"<span>\" + t('重置') + \"</span>\"),\n      onClick: function onClick(editor, $node) {\n        $node.removeAttr('width');\n        $node.removeAttr('height'); // 返回 true，表示执行完之后，隐藏 tooltip。否则不隐藏。\n\n        return true;\n      }\n    }, {\n      $elem: dom_core_1[\"default\"](\"<span>\" + t('menus.justify.靠左') + \"</span>\"),\n      onClick: function onClick(editor, $node) {\n        // 获取顶级元素\n        video_alignment_1[\"default\"]($node, 'left'); // 返回 true，表示执行完之后，隐藏 tooltip。否则不隐藏。\n\n        return true;\n      }\n    }, {\n      $elem: dom_core_1[\"default\"](\"<span>\" + t('menus.justify.居中') + \"</span>\"),\n      onClick: function onClick(editor, $node) {\n        // 获取顶级元素\n        video_alignment_1[\"default\"]($node, 'center'); // 返回 true，表示执行完之后，隐藏 tooltip。否则不隐藏。\n\n        return true;\n      }\n    }, {\n      $elem: dom_core_1[\"default\"](\"<span>\" + t('menus.justify.靠右') + \"</span>\"),\n      onClick: function onClick(editor, $node) {\n        // 获取顶级元素\n        video_alignment_1[\"default\"]($node, 'right'); // 返回 true，表示执行完之后，隐藏 tooltip。否则不隐藏。\n\n        return true;\n      }\n    }];\n    tooltip = new Tooltip_1[\"default\"](editor, $node, conf);\n    tooltip.create();\n  }\n  /**\n   * 隐藏 tooltip\n   */\n\n\n  function hideVideoTooltip() {\n    // 移除 tooltip\n    if (tooltip) {\n      tooltip.remove();\n      tooltip = null;\n    }\n  }\n\n  return {\n    showVideoTooltip: showVideoTooltip,\n    hideVideoTooltip: hideVideoTooltip\n  };\n}\n\nexports.createShowHideFn = createShowHideFn;\n/**\n * 绑定 tooltip 事件\n * @param editor 编辑器实例\n */\n\nfunction bindTooltipEvent(editor) {\n  var _a = createShowHideFn(editor),\n      showVideoTooltip = _a.showVideoTooltip,\n      hideVideoTooltip = _a.hideVideoTooltip; // 点击视频元素是，显示 tooltip\n\n\n  editor.txt.eventHooks.videoClickEvents.push(showVideoTooltip); // 点击其他地方，或者滚动时，隐藏 tooltip\n\n  editor.txt.eventHooks.clickEvents.push(hideVideoTooltip);\n  editor.txt.eventHooks.keyupEvents.push(hideVideoTooltip);\n  editor.txt.eventHooks.toolbarClickEvents.push(hideVideoTooltip);\n  editor.txt.eventHooks.menuClickEvents.push(hideVideoTooltip);\n  editor.txt.eventHooks.textScrollEvents.push(hideVideoTooltip); // change 时隐藏\n\n  editor.txt.eventHooks.changeEvents.push(hideVideoTooltip);\n}\n\nexports[\"default\"] = bindTooltipEvent;\n\n/***/ }),\n/* 363 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * @description 视频布局 事件\n * @author lichunlin\n */\n\nvar _interopRequireDefault = __webpack_require__(0);\n\nvar _defineProperty = _interopRequireDefault(__webpack_require__(1));\n\nvar _includes = _interopRequireDefault(__webpack_require__(46));\n\n(0, _defineProperty[\"default\"])(exports, \"__esModule\", {\n  value: true\n});\n\nvar tslib_1 = __webpack_require__(2);\n\nvar dom_core_1 = tslib_1.__importDefault(__webpack_require__(3)); // 设置布局方式\n\n\nfunction setAlignment($node, value) {\n  // 设置顶级元素匹配\n  var NODENAME = ['P']; // 获取匹配得顶级元素\n\n  var topNode = getSelectedTopNode($node, NODENAME); // 判断是否存在\n\n  if (topNode) {\n    dom_core_1[\"default\"](topNode).css('text-align', value);\n  }\n}\n\nexports[\"default\"] = setAlignment;\n/**\n * 获取选中的元素的顶级元素\n * @params el 选中的元素\n * @params tag 匹配顶级的元素 如 P LI ....\n */\n\nfunction getSelectedTopNode(el, tag) {\n  var _a;\n\n  var parentNode = el.elems[0]; // 可能出现嵌套的情况，所以一级一级向上找，找到指定得顶级元素\n\n  while (parentNode != null) {\n    if ((0, _includes[\"default\"])(tag).call(tag, parentNode === null || parentNode === void 0 ? void 0 : parentNode.nodeName)) {\n      return parentNode;\n    } // 兜底 body\n\n\n    if (((_a = parentNode === null || parentNode === void 0 ? void 0 : parentNode.parentNode) === null || _a === void 0 ? void 0 : _a.nodeName) === 'BODY') {\n      return null;\n    }\n\n    parentNode = parentNode.parentNode;\n  }\n\n  return parentNode;\n}\n\n/***/ }),\n/* 364 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _interopRequireDefault = __webpack_require__(0);\n\nvar _defineProperty = _interopRequireDefault(__webpack_require__(1));\n\n(0, _defineProperty[\"default\"])(exports, \"__esModule\", {\n  value: true\n});\n\nvar util_1 = __webpack_require__(6);\n\nfunction bindEventKeyboardEvent(editor) {\n  if (!util_1.UA.isFirefox) return;\n  var txt = editor.txt,\n      selection = editor.selection;\n  var keydownEvents = txt.eventHooks.keydownEvents;\n  keydownEvents.push(function (e) {\n    // 实时保存选区\n    // editor.selection.saveRange()\n    var $selectionContainerElem = selection.getSelectionContainerElem();\n\n    if ($selectionContainerElem) {\n      var $topElem = $selectionContainerElem.getNodeTop(editor);\n      var $preElem = $topElem.length ? $topElem.prev().length ? $topElem.prev() : null : null;\n\n      if ($preElem && $preElem.attr('data-we-video-p')) {\n        // 光标处于选区开头\n        if (selection.getCursorPos() === 0) {\n          // 如果上一个dom是包含video， 按下删除连video一块删除\n          if (e.keyCode === 8) {\n            $preElem.remove();\n          }\n        }\n      }\n    }\n  });\n}\n\nexports[\"default\"] = bindEventKeyboardEvent;\n\n/***/ }),\n/* 365 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * @description 插入、上传图片\n * @author wangfupeng\n */\n\nvar _interopRequireDefault = __webpack_require__(0);\n\nvar _defineProperty = _interopRequireDefault(__webpack_require__(1));\n\nvar _map = _interopRequireDefault(__webpack_require__(27));\n\n(0, _defineProperty[\"default\"])(exports, \"__esModule\", {\n  value: true\n});\n\nvar tslib_1 = __webpack_require__(2);\n\nvar const_1 = __webpack_require__(7);\n\nvar dom_core_1 = tslib_1.__importDefault(__webpack_require__(3));\n\nvar Panel_1 = tslib_1.__importDefault(__webpack_require__(33));\n\nvar PanelMenu_1 = tslib_1.__importDefault(__webpack_require__(36));\n\nvar index_1 = tslib_1.__importDefault(__webpack_require__(366));\n\nvar create_panel_conf_1 = tslib_1.__importDefault(__webpack_require__(379));\n\nvar Image = function (_super) {\n  tslib_1.__extends(Image, _super);\n\n  function Image(editor) {\n    var _this = this;\n\n    var $elem = dom_core_1[\"default\"]('<div class=\"w-e-menu\" data-title=\"图片\"><i class=\"w-e-icon-image\"></i></div>');\n    var imgPanelConfig = create_panel_conf_1[\"default\"](editor);\n\n    if (imgPanelConfig.onlyUploadConf) {\n      var _context;\n\n      $elem = imgPanelConfig.onlyUploadConf.$elem;\n      (0, _map[\"default\"])(_context = imgPanelConfig.onlyUploadConf.events).call(_context, function (event) {\n        var type = event.type;\n        var fn = event.fn || const_1.EMPTY_FN;\n        $elem.on(type, function (e) {\n          e.stopPropagation();\n          fn(e);\n        });\n      });\n    }\n\n    _this = _super.call(this, $elem, editor) || this;\n    _this.imgPanelConfig = imgPanelConfig; // 绑定事件，如粘贴图片\n\n    index_1[\"default\"](editor);\n    return _this;\n  }\n  /**\n   * 菜单点击事件\n   */\n\n\n  Image.prototype.clickHandler = function () {\n    if (!this.imgPanelConfig.onlyUploadConf) {\n      this.createPanel();\n    }\n  };\n  /**\n   * 创建 panel\n   */\n\n\n  Image.prototype.createPanel = function () {\n    var conf = this.imgPanelConfig;\n    var panel = new Panel_1[\"default\"](this, conf);\n    this.setPanel(panel);\n    panel.create();\n  };\n  /**\n   * 尝试修改菜单 active 状态\n   */\n\n\n  Image.prototype.tryChangeActive = function () {};\n\n  return Image;\n}(PanelMenu_1[\"default\"]);\n\nexports[\"default\"] = Image;\n\n/***/ }),\n/* 366 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * @description 绑定图片的事件\n * @author wangfupeng\n */\n\nvar _interopRequireDefault = __webpack_require__(0);\n\nvar _defineProperty = _interopRequireDefault(__webpack_require__(1));\n\n(0, _defineProperty[\"default\"])(exports, \"__esModule\", {\n  value: true\n});\n\nvar tslib_1 = __webpack_require__(2);\n\nvar paste_img_1 = tslib_1.__importDefault(__webpack_require__(367));\n\nvar drop_img_1 = tslib_1.__importDefault(__webpack_require__(368));\n\nvar drag_size_1 = tslib_1.__importDefault(__webpack_require__(369));\n\nvar tooltip_event_1 = tslib_1.__importDefault(__webpack_require__(377));\n\nvar keyboard_event_1 = tslib_1.__importDefault(__webpack_require__(378));\n/**\n * 绑定事件\n * @param editor 编辑器实例\n */\n\n\nfunction bindEvent(editor) {\n  // 粘贴图片\n  paste_img_1[\"default\"](editor); // 拖拽图片\n\n  drop_img_1[\"default\"](editor); // 可再扩展其他事件...如图片 tooltip 等\n  // 拖拽图片尺寸\n\n  drag_size_1[\"default\"](editor); //Tooltip\n\n  tooltip_event_1[\"default\"](editor);\n  keyboard_event_1[\"default\"](editor);\n}\n\nexports[\"default\"] = bindEvent;\n\n/***/ }),\n/* 367 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * @description 粘贴图片\n * @author wangfupeng\n */\n\nvar _interopRequireDefault = __webpack_require__(0);\n\nvar _defineProperty = _interopRequireDefault(__webpack_require__(1));\n\n(0, _defineProperty[\"default\"])(exports, \"__esModule\", {\n  value: true\n});\n\nvar tslib_1 = __webpack_require__(2);\n\nvar paste_event_1 = __webpack_require__(135);\n\nvar upload_img_1 = tslib_1.__importDefault(__webpack_require__(104));\n/**\n * 剪切板是否有 text 或者 html ？\n * @param editor 编辑器对象\n * @param e 粘贴事件参数\n */\n\n\nfunction _haveTextOrHtml(editor, e) {\n  var config = editor.config;\n  var pasteFilterStyle = config.pasteFilterStyle;\n  var pasteIgnoreImg = config.pasteIgnoreImg;\n  var pasteHtml = paste_event_1.getPasteHtml(e, pasteFilterStyle, pasteIgnoreImg);\n  if (pasteHtml) return true;\n  var pasteText = paste_event_1.getPasteText(e);\n  if (pasteText) return true;\n  return false; // text html 都没有，则返回 false\n}\n/**\n * 剪切板是否有 Files\n * @param editor 编辑器对象\n * @param e 粘贴事件参数\n */\n\n\nfunction _haveFiles(editor, e) {\n  var _a;\n\n  var types = ((_a = e.clipboardData) === null || _a === void 0 ? void 0 : _a.types) || [];\n\n  for (var i = 0; i < types.length; i++) {\n    var type = types[i];\n\n    if (type === 'Files') {\n      return true;\n    }\n  }\n\n  return false;\n}\n/**\n * 粘贴图片事件方法\n * @param e 事件参数\n */\n\n\nfunction pasteImgHandler(e, editor) {\n  // 粘贴过来的没有 file 时，判断 text 或者 html\n  if (!_haveFiles(editor, e)) {\n    if (_haveTextOrHtml(editor, e)) {\n      // 粘贴过来的有 text 或者 html ，则不执行粘贴图片逻辑\n      return;\n    }\n  } // 获取粘贴的图片列表\n\n\n  var pastedFiles = paste_event_1.getPasteImgs(e);\n\n  if (!pastedFiles.length) {\n    return;\n  } // code 中忽略（暂不管它）\n  // 执行上传\n\n\n  var uploadImg = new upload_img_1[\"default\"](editor);\n  uploadImg.uploadImg(pastedFiles);\n}\n/**\n * 粘贴图片\n * @param editor 编辑器对象\n * @param pasteEvents 粘贴事件列表\n */\n\n\nfunction bindPasteImg(editor) {\n  /**\n   * 绑定 paste 事件\n   * 这里使用了unshift，以前是push\n   * 在以前的流程中，pasteImgHandler触发之前，会调用到window.getSelection().removeAllRanges()\n   * 会导致性能变差。在编辑器中粘贴，粘贴耗时多了100+ms，根本原因未知\n   * 最小复现demo，在div内粘贴图片就可以看到getData耗时异常得长\n   * <html>\n   *     <div id=\"a\" contenteditable=\"true\"></div>\n   *     <script>\n   *         const div = document.getElementById('a')\n   *         div.addEventListener('paste', (e) => {\n   *             window.getSelection().removeAllRanges()\n   *             e.clipboardData.getData('text/html')\n   *         })\n   *     </script>\n   * </html>\n   * 因此改成unshift，先触发pasteImgHandler就不会有性能问题\n   */\n  editor.txt.eventHooks.pasteEvents.unshift(function (e) {\n    pasteImgHandler(e, editor);\n  });\n}\n\nexports[\"default\"] = bindPasteImg;\n\n/***/ }),\n/* 368 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * @description 拖拽上传图片\n * @author wangfupeng\n */\n\nvar _interopRequireDefault = __webpack_require__(0);\n\nvar _defineProperty = _interopRequireDefault(__webpack_require__(1));\n\n(0, _defineProperty[\"default\"])(exports, \"__esModule\", {\n  value: true\n});\n\nvar tslib_1 = __webpack_require__(2);\n\nvar upload_img_1 = tslib_1.__importDefault(__webpack_require__(104));\n\nfunction bindDropImg(editor) {\n  /**\n   * 拖拽图片的事件\n   * @param e 事件参数\n   */\n  function dropImgHandler(e) {\n    var files = e.dataTransfer && e.dataTransfer.files;\n\n    if (!files || !files.length) {\n      return;\n    } // 上传图片\n\n\n    var uploadImg = new upload_img_1[\"default\"](editor);\n    uploadImg.uploadImg(files);\n  } // 绑定 drop 事件\n\n\n  editor.txt.eventHooks.dropEvents.push(dropImgHandler);\n}\n\nexports[\"default\"] = bindDropImg;\n\n/***/ }),\n/* 369 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * @description 图片拖拽事件绑定\n * @author xiaokyo\n */\n\nvar _interopRequireDefault = __webpack_require__(0);\n\nvar _defineProperty = _interopRequireDefault(__webpack_require__(1));\n\nvar _find = _interopRequireDefault(__webpack_require__(32));\n\nvar _parseFloat2 = _interopRequireDefault(__webpack_require__(370));\n\n(0, _defineProperty[\"default\"])(exports, \"__esModule\", {\n  value: true\n});\nexports.createShowHideFn = void 0;\n\nvar tslib_1 = __webpack_require__(2);\n\nvar dom_core_1 = tslib_1.__importDefault(__webpack_require__(3));\n\n__webpack_require__(375);\n\nvar util_1 = __webpack_require__(6);\n/**\n * 设置拖拽框的rect\n * @param $drag drag Dom\n * @param width 要设置的宽度\n * @param height 要设置的高度\n * @param left 要设置的左边\n * @param top 要设置的顶部距离\n */\n\n\nfunction setDragStyle($drag, width, height, left, top) {\n  $drag.attr('style', \"width:\" + width + \"px; height:\" + height + \"px; left:\" + left + \"px; top:\" + top + \"px;\");\n}\n/**\n * 生成一个图片指定大小的拖拽框\n * @param editor 编辑器实例\n * @param $textContainerElem 编辑框对象\n */\n\n\nfunction createDragBox(editor, $textContainerElem) {\n  var $drag = dom_core_1[\"default\"](\"<div class=\\\"w-e-img-drag-mask\\\">\\n            <div class=\\\"w-e-img-drag-show-size\\\"></div>\\n            <div class=\\\"w-e-img-drag-rb\\\"></div>\\n         </div>\");\n  $drag.hide();\n  $textContainerElem.append($drag);\n  return $drag;\n}\n/**\n * 显示拖拽框并设置宽度\n * @param $textContainerElem 编辑框实例\n * @param $drag 拖拽框对象\n */\n\n\nfunction showDargBox($textContainerElem, $drag, $img) {\n  var boxRect = $textContainerElem.getBoundingClientRect();\n  var rect = $img.getBoundingClientRect();\n  var rectW = rect.width.toFixed(2);\n  var rectH = rect.height.toFixed(2);\n  (0, _find[\"default\"])($drag).call($drag, '.w-e-img-drag-show-size').text(rectW + \"px * \" + rectH + \"px\");\n  setDragStyle($drag, (0, _parseFloat2[\"default\"])(rectW), (0, _parseFloat2[\"default\"])(rectH), rect.left - boxRect.left, rect.top - boxRect.top);\n  $drag.show();\n}\n/**\n * 生成图片拖拽框的 显示/隐藏 函数\n */\n\n\nfunction createShowHideFn(editor) {\n  var $textContainerElem = editor.$textContainerElem;\n  var $imgTarget; // 生成拖拽框\n\n  var $drag = createDragBox(editor, $textContainerElem);\n  /**\n   * 设置拖拽事件\n   * @param $drag 拖拽框的domElement\n   * @param $textContainerElem 编辑器实例\n   */\n\n  function bindDragEvents($drag, $container) {\n    $drag.on('click', function (e) {\n      e.stopPropagation();\n    });\n    $drag.on('mousedown', '.w-e-img-drag-rb', function (e) {\n      // e.stopPropagation()\n      e.preventDefault();\n      if (!$imgTarget) return;\n      var firstX = e.clientX;\n      var firstY = e.clientY;\n      var boxRect = $container.getBoundingClientRect();\n      var imgRect = $imgTarget.getBoundingClientRect();\n      var width = imgRect.width;\n      var height = imgRect.height;\n      var left = imgRect.left - boxRect.left;\n      var top = imgRect.top - boxRect.top;\n      var ratio = width / height;\n      var setW = width;\n      var setH = height;\n      var $document = dom_core_1[\"default\"](document);\n\n      function offEvents() {\n        $document.off('mousemove', mouseMoveHandler);\n        $document.off('mouseup', mouseUpHandler);\n      }\n\n      function mouseMoveHandler(ev) {\n        ev.stopPropagation();\n        ev.preventDefault();\n        setW = width + (ev.clientX - firstX);\n        setH = height + (ev.clientY - firstY); // 等比计算\n\n        if (setW / setH != ratio) {\n          setH = setW / ratio;\n        }\n\n        setW = (0, _parseFloat2[\"default\"])(setW.toFixed(2));\n        setH = (0, _parseFloat2[\"default\"])(setH.toFixed(2));\n        (0, _find[\"default\"])($drag).call($drag, '.w-e-img-drag-show-size').text(setW.toFixed(2).replace('.00', '') + \"px * \" + setH.toFixed(2).replace('.00', '') + \"px\");\n        setDragStyle($drag, setW, setH, left, top);\n      }\n\n      $document.on('mousemove', mouseMoveHandler);\n\n      function mouseUpHandler() {\n        $imgTarget.attr('width', setW + '');\n        $imgTarget.attr('height', setH + '');\n        var newImgRect = $imgTarget.getBoundingClientRect();\n        setDragStyle($drag, setW, setH, newImgRect.left - boxRect.left, newImgRect.top - boxRect.top); // 解绑事件\n\n        offEvents();\n      }\n\n      $document.on('mouseup', mouseUpHandler); // 解绑事件\n\n      $document.on('mouseleave', offEvents);\n    });\n  } // 显示拖拽框\n\n\n  function showDrag($target) {\n    if (util_1.UA.isIE()) return false;\n\n    if ($target) {\n      $imgTarget = $target;\n      showDargBox($textContainerElem, $drag, $imgTarget);\n    }\n  } // 隐藏拖拽框\n\n\n  function hideDrag() {\n    (0, _find[\"default\"])($textContainerElem).call($textContainerElem, '.w-e-img-drag-mask').hide();\n  } // 事件绑定\n\n\n  bindDragEvents($drag, $textContainerElem); // 后期改成 blur 触发\n\n  dom_core_1[\"default\"](document).on('click', hideDrag);\n  editor.beforeDestroy(function () {\n    dom_core_1[\"default\"](document).off('click', hideDrag);\n  });\n  return {\n    showDrag: showDrag,\n    hideDrag: hideDrag\n  };\n}\n\nexports.createShowHideFn = createShowHideFn;\n/**\n * 点击事件委托\n * @param editor 编辑器实例\n */\n\nfunction bindDragImgSize(editor) {\n  var _a = createShowHideFn(editor),\n      showDrag = _a.showDrag,\n      hideDrag = _a.hideDrag; // 显示拖拽框\n\n\n  editor.txt.eventHooks.imgClickEvents.push(showDrag); // 隐藏拖拽框\n\n  editor.txt.eventHooks.textScrollEvents.push(hideDrag);\n  editor.txt.eventHooks.keyupEvents.push(hideDrag);\n  editor.txt.eventHooks.toolbarClickEvents.push(hideDrag);\n  editor.txt.eventHooks.menuClickEvents.push(hideDrag);\n  editor.txt.eventHooks.changeEvents.push(hideDrag);\n}\n\nexports[\"default\"] = bindDragImgSize;\n\n/***/ }),\n/* 370 */\n/***/ (function(module, exports, __webpack_require__) {\n\nmodule.exports = __webpack_require__(371);\n\n/***/ }),\n/* 371 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar parent = __webpack_require__(372);\n\nmodule.exports = parent;\n\n\n/***/ }),\n/* 372 */\n/***/ (function(module, exports, __webpack_require__) {\n\n__webpack_require__(373);\nvar path = __webpack_require__(11);\n\nmodule.exports = path.parseFloat;\n\n\n/***/ }),\n/* 373 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar $ = __webpack_require__(5);\nvar parseFloatImplementation = __webpack_require__(374);\n\n// `parseFloat` method\n// https://tc39.es/ecma262/#sec-parsefloat-string\n$({ global: true, forced: parseFloat != parseFloatImplementation }, {\n  parseFloat: parseFloatImplementation\n});\n\n\n/***/ }),\n/* 374 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar global = __webpack_require__(8);\nvar toString = __webpack_require__(30);\nvar trim = __webpack_require__(97).trim;\nvar whitespaces = __webpack_require__(74);\n\nvar $parseFloat = global.parseFloat;\nvar FORCED = 1 / $parseFloat(whitespaces + '-0') !== -Infinity;\n\n// `parseFloat` method\n// https://tc39.es/ecma262/#sec-parsefloat-string\nmodule.exports = FORCED ? function parseFloat(string) {\n  var trimmedString = trim(toString(string));\n  var result = $parseFloat(trimmedString);\n  return result === 0 && trimmedString.charAt(0) == '-' ? -0 : result;\n} : $parseFloat;\n\n\n/***/ }),\n/* 375 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar api = __webpack_require__(21);\n            var content = __webpack_require__(376);\n\n            content = content.__esModule ? content.default : content;\n\n            if (typeof content === 'string') {\n              content = [[module.i, content, '']];\n            }\n\nvar options = {};\n\noptions.insert = \"head\";\noptions.singleton = false;\n\nvar update = api(content, options);\n\n\n\nmodule.exports = content.locals || {};\n\n/***/ }),\n/* 376 */\n/***/ (function(module, exports, __webpack_require__) {\n\n// Imports\nvar ___CSS_LOADER_API_IMPORT___ = __webpack_require__(22);\nexports = ___CSS_LOADER_API_IMPORT___(false);\n// Module\nexports.push([module.i, \".w-e-text-container {\\n  overflow: hidden;\\n}\\n.w-e-img-drag-mask {\\n  position: absolute;\\n  z-index: 1;\\n  border: 1px dashed #ccc;\\n  box-sizing: border-box;\\n}\\n.w-e-img-drag-mask .w-e-img-drag-rb {\\n  position: absolute;\\n  right: -5px;\\n  bottom: -5px;\\n  width: 16px;\\n  height: 16px;\\n  border-radius: 50%;\\n  background: #ccc;\\n  cursor: se-resize;\\n}\\n.w-e-img-drag-mask .w-e-img-drag-show-size {\\n  min-width: 110px;\\n  height: 22px;\\n  line-height: 22px;\\n  font-size: 14px;\\n  color: #999;\\n  position: absolute;\\n  left: 0;\\n  top: 0;\\n  background-color: #999;\\n  color: #fff;\\n  border-radius: 2px;\\n  padding: 0 5px;\\n}\\n\", \"\"]);\n// Exports\nmodule.exports = exports;\n\n\n/***/ }),\n/* 377 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * @description tooltip 事件\n * @author lichunlin\n */\n\nvar _interopRequireDefault = __webpack_require__(0);\n\nvar _defineProperty = _interopRequireDefault(__webpack_require__(1));\n\n(0, _defineProperty[\"default\"])(exports, \"__esModule\", {\n  value: true\n});\nexports.createShowHideFn = void 0;\n\nvar tslib_1 = __webpack_require__(2);\n\nvar dom_core_1 = tslib_1.__importDefault(__webpack_require__(3));\n\nvar Tooltip_1 = tslib_1.__importDefault(__webpack_require__(37));\n/**\n * 生成 Tooltip 的显示隐藏函数\n */\n\n\nfunction createShowHideFn(editor) {\n  var tooltip;\n\n  var t = function t(text, prefix) {\n    if (prefix === void 0) {\n      prefix = '';\n    }\n\n    return editor.i18next.t(prefix + text);\n  };\n  /**\n   * 显示 tooltip\n   * @param $node 链接元素\n   */\n\n\n  function showImgTooltip($node) {\n    var conf = [{\n      $elem: dom_core_1[\"default\"](\"<span class='w-e-icon-trash-o'></span>\"),\n      onClick: function onClick(editor, $node) {\n        // 选中img元素\n        editor.selection.createRangeByElem($node);\n        editor.selection.restoreSelection();\n        editor.cmd[\"do\"]('delete'); // 返回 true，表示执行完之后，隐藏 tooltip。否则不隐藏。\n\n        return true;\n      }\n    }, {\n      $elem: dom_core_1[\"default\"]('<span>30%</span>'),\n      onClick: function onClick(editor, $node) {\n        $node.attr('width', '30%');\n        $node.removeAttr('height'); // 返回 true，表示执行完之后，隐藏 tooltip。否则不隐藏。\n\n        return true;\n      }\n    }, {\n      $elem: dom_core_1[\"default\"]('<span>50%</span>'),\n      onClick: function onClick(editor, $node) {\n        $node.attr('width', '50%');\n        $node.removeAttr('height'); // 返回 true，表示执行完之后，隐藏 tooltip。否则不隐藏。\n\n        return true;\n      }\n    }, {\n      $elem: dom_core_1[\"default\"]('<span>100%</span>'),\n      onClick: function onClick(editor, $node) {\n        $node.attr('width', '100%');\n        $node.removeAttr('height'); // 返回 true，表示执行完之后，隐藏 tooltip。否则不隐藏。\n\n        return true;\n      }\n    }];\n    conf.push({\n      $elem: dom_core_1[\"default\"](\"<span>\" + t('重置') + \"</span>\"),\n      onClick: function onClick(editor, $node) {\n        $node.removeAttr('width');\n        $node.removeAttr('height'); // 返回 true，表示执行完之后，隐藏 tooltip。否则不隐藏。\n\n        return true;\n      }\n    });\n\n    if ($node.attr('data-href')) {\n      conf.push({\n        $elem: dom_core_1[\"default\"](\"<span>\" + t('查看链接') + \"</span>\"),\n        onClick: function onClick(editor, $node) {\n          var link = $node.attr('data-href');\n\n          if (link) {\n            link = decodeURIComponent(link);\n            window.open(link, '_target');\n          } // 返回 true，表示执行完之后，隐藏 tooltip。否则不隐藏。\n\n\n          return true;\n        }\n      });\n    }\n\n    tooltip = new Tooltip_1[\"default\"](editor, $node, conf);\n    tooltip.create();\n  }\n  /**\n   * 隐藏 tooltip\n   */\n\n\n  function hideImgTooltip() {\n    // 移除 tooltip\n    if (tooltip) {\n      tooltip.remove();\n      tooltip = null;\n    }\n  }\n\n  return {\n    showImgTooltip: showImgTooltip,\n    hideImgTooltip: hideImgTooltip\n  };\n}\n\nexports.createShowHideFn = createShowHideFn;\n/**\n * 绑定 tooltip 事件\n * @param editor 编辑器实例\n */\n\nfunction bindTooltipEvent(editor) {\n  var _a = createShowHideFn(editor),\n      showImgTooltip = _a.showImgTooltip,\n      hideImgTooltip = _a.hideImgTooltip; // 点击图片元素是，显示 tooltip\n\n\n  editor.txt.eventHooks.imgClickEvents.push(showImgTooltip); // 点击其他地方，或者滚动时，隐藏 tooltip\n\n  editor.txt.eventHooks.clickEvents.push(hideImgTooltip);\n  editor.txt.eventHooks.keyupEvents.push(hideImgTooltip);\n  editor.txt.eventHooks.toolbarClickEvents.push(hideImgTooltip);\n  editor.txt.eventHooks.menuClickEvents.push(hideImgTooltip);\n  editor.txt.eventHooks.textScrollEvents.push(hideImgTooltip);\n  editor.txt.eventHooks.imgDragBarMouseDownEvents.push(hideImgTooltip); // change 时隐藏\n\n  editor.txt.eventHooks.changeEvents.push(hideImgTooltip);\n}\n\nexports[\"default\"] = bindTooltipEvent;\n\n/***/ }),\n/* 378 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _interopRequireDefault = __webpack_require__(0);\n\nvar _defineProperty = _interopRequireDefault(__webpack_require__(1));\n\n(0, _defineProperty[\"default\"])(exports, \"__esModule\", {\n  value: true\n});\n\nfunction bindEventKeyboardEvent(editor) {\n  var txt = editor.txt,\n      selection = editor.selection;\n  var keydownEvents = txt.eventHooks.keydownEvents;\n  keydownEvents.push(function (e) {\n    // 删除图片时，有时会因为浏览器bug删不掉。因此这里手动判断光标前面是不是图片，是就删掉\n    var $selectionContainerElem = selection.getSelectionContainerElem();\n    var range = selection.getRange();\n\n    if (!range || !$selectionContainerElem || e.keyCode !== 8 || !selection.isSelectionEmpty()) {\n      return;\n    }\n\n    var startContainer = range.startContainer,\n        startOffset = range.startOffset; // 同一段落内上一个节点\n\n    var prevNode = null;\n\n    if (startOffset === 0) {\n      // 此时上一个节点需要通过previousSibling去找\n      while (startContainer !== $selectionContainerElem.elems[0] && $selectionContainerElem.elems[0].contains(startContainer) && startContainer.parentNode && !prevNode) {\n        if (startContainer.previousSibling) {\n          prevNode = startContainer.previousSibling;\n          break;\n        }\n\n        startContainer = startContainer.parentNode;\n      }\n    } else if (startContainer.nodeType !== 3) {\n      // 非文本节点才需要被处理，比如p\n      prevNode = startContainer.childNodes[startOffset - 1];\n    }\n\n    if (!prevNode) {\n      return;\n    }\n\n    var lastChildNodeInPrevNode = prevNode; // 找到最右侧叶子节点\n\n    while (lastChildNodeInPrevNode.childNodes.length) {\n      lastChildNodeInPrevNode = lastChildNodeInPrevNode.childNodes[lastChildNodeInPrevNode.childNodes.length - 1];\n    }\n\n    if (lastChildNodeInPrevNode instanceof HTMLElement && lastChildNodeInPrevNode.tagName === 'IMG') {\n      lastChildNodeInPrevNode.remove();\n      e.preventDefault();\n    }\n  });\n}\n\nexports[\"default\"] = bindEventKeyboardEvent;\n\n/***/ }),\n/* 379 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * @description image 菜单 panel tab 配置\n * @author wangfupeng\n */\n\nvar _interopRequireDefault = __webpack_require__(0);\n\nvar _defineProperty = _interopRequireDefault(__webpack_require__(1));\n\nvar _map = _interopRequireDefault(__webpack_require__(27));\n\nvar _trim = _interopRequireDefault(__webpack_require__(16));\n\n(0, _defineProperty[\"default\"])(exports, \"__esModule\", {\n  value: true\n});\n\nvar tslib_1 = __webpack_require__(2);\n\nvar dom_core_1 = tslib_1.__importDefault(__webpack_require__(3));\n\nvar util_1 = __webpack_require__(6);\n\nvar upload_img_1 = tslib_1.__importDefault(__webpack_require__(104));\n\nfunction default_1(editor) {\n  var _context;\n\n  var config = editor.config;\n  var uploadImg = new upload_img_1[\"default\"](editor); // panel 中需要用到的id\n\n  var upTriggerId = util_1.getRandom('up-trigger-id');\n  var upFileId = util_1.getRandom('up-file-id');\n  var linkUrlId = util_1.getRandom('input-link-url');\n  var linkUrlAltId = util_1.getRandom('input-link-url-alt');\n  var linkUrlHrefId = util_1.getRandom('input-link-url-href');\n  var linkBtnId = util_1.getRandom('btn-link');\n  var i18nPrefix = 'menus.panelMenus.image.';\n\n  var t = function t(text, prefix) {\n    if (prefix === void 0) {\n      prefix = i18nPrefix;\n    }\n\n    return editor.i18next.t(prefix + text);\n  };\n  /**\n   * 校验网络图片链接是否合法\n   * @param linkImg 网络图片链接\n   */\n\n\n  function checkLinkImg(src, linkUrlAltText, linkUrlHrefText) {\n    //查看开发者自定义配置的返回值\n    var check = config.linkImgCheck(src);\n\n    if (check === true) {\n      return true;\n    } else if (typeof check === 'string') {\n      //用户未能通过开发者的校验，开发者希望我们提示这一字符串\n      config.customAlert(check, 'error');\n    }\n\n    return false;\n  } // tabs 配置 -----------------------------------------\n\n\n  var fileMultipleAttr = config.uploadImgMaxLength === 1 ? '' : 'multiple=\"multiple\"';\n  var accepts = (0, _map[\"default\"])(_context = config.uploadImgAccept).call(_context, function (item) {\n    return \"image/\" + item;\n  }).join(',');\n  /**\n   * 设置模板的类名和icon图标\n   * w-e-menu是作为button菜单的模板\n   * w-e-up-img-container是做为panel菜单的窗口内容的模板\n   * @param containerClass 模板最外层的类名\n   * @param iconClass 模板中icon的类名\n   * @param titleName 模板中标题的名称 需要则设置不需要则设为空字符\n   */\n\n  var getUploadImgTpl = function getUploadImgTpl(containerClass, iconClass, titleName) {\n    return \"<div class=\\\"\" + containerClass + \"\\\" data-title=\\\"\" + titleName + \"\\\">\\n            <div id=\\\"\" + upTriggerId + \"\\\" class=\\\"w-e-up-btn\\\">\\n                <i class=\\\"\" + iconClass + \"\\\"></i>\\n            </div>\\n            <div style=\\\"display:none;\\\">\\n                <input id=\\\"\" + upFileId + \"\\\" type=\\\"file\\\" \" + fileMultipleAttr + \" accept=\\\"\" + accepts + \"\\\"/>\\n            </div>\\n        </div>\";\n  };\n\n  var uploadEvents = [// 触发选择图片\n  {\n    selector: '#' + upTriggerId,\n    type: 'click',\n    fn: function fn() {\n      var uploadImgFromMedia = config.uploadImgFromMedia;\n\n      if (uploadImgFromMedia && typeof uploadImgFromMedia === 'function') {\n        uploadImgFromMedia();\n        return true;\n      }\n\n      var $file = dom_core_1[\"default\"]('#' + upFileId);\n      var fileElem = $file.elems[0];\n\n      if (fileElem) {\n        fileElem.click();\n      } else {\n        // 返回 true 可关闭 panel\n        return true;\n      }\n    }\n  }, // 选择图片完毕\n  {\n    selector: '#' + upFileId,\n    type: 'change',\n    fn: function fn() {\n      var $file = dom_core_1[\"default\"]('#' + upFileId);\n      var fileElem = $file.elems[0];\n\n      if (!fileElem) {\n        // 返回 true 可关闭 panel\n        return true;\n      } // 获取选中的 file 对象列表\n\n\n      var fileList = fileElem.files;\n\n      if (fileList === null || fileList === void 0 ? void 0 : fileList.length) {\n        uploadImg.uploadImg(fileList);\n      } // 判断用于打开文件的input，有没有值，如果有就清空，以防上传同一张图片时，不会触发change事件\n      // input的功能只是单单为了打开文件而已，获取到需要的文件参数，当文件数据获取到后，可以清空。\n\n\n      if (fileElem) {\n        fileElem.value = '';\n      } // 返回 true 可关闭 panel\n\n\n      return true;\n    }\n  }];\n  var linkImgInputs = [\"<input\\n            id=\\\"\" + linkUrlId + \"\\\"\\n            type=\\\"text\\\"\\n            class=\\\"block\\\"\\n            placeholder=\\\"\" + t('图片地址') + \"\\\"/>\"];\n\n  if (config.showLinkImgAlt) {\n    linkImgInputs.push(\"\\n        <input\\n            id=\\\"\" + linkUrlAltId + \"\\\"\\n            type=\\\"text\\\"\\n            class=\\\"block\\\"\\n            placeholder=\\\"\" + t('图片文字说明') + \"\\\"/>\");\n  }\n\n  if (config.showLinkImgHref) {\n    linkImgInputs.push(\"\\n        <input\\n            id=\\\"\" + linkUrlHrefId + \"\\\"\\n            type=\\\"text\\\"\\n            class=\\\"block\\\"\\n            placeholder=\\\"\" + t('跳转链接') + \"\\\"/>\");\n  }\n\n  var tabsConf = [// first tab\n  {\n    // 标题\n    title: t('上传图片'),\n    // 模板\n    tpl: getUploadImgTpl('w-e-up-img-container', 'w-e-icon-upload2', ''),\n    // 事件绑定\n    events: uploadEvents\n  }, // second tab\n  {\n    title: t('网络图片'),\n    tpl: \"<div>\\n                    \" + linkImgInputs.join('') + \"\\n                    <div class=\\\"w-e-button-container\\\">\\n                        <button type=\\\"button\\\" id=\\\"\" + linkBtnId + \"\\\" class=\\\"right\\\">\" + t('插入', '') + \"</button>\\n                    </div>\\n                </div>\",\n    events: [{\n      selector: '#' + linkBtnId,\n      type: 'click',\n      fn: function fn() {\n        var _context2;\n\n        var $linkUrl = dom_core_1[\"default\"]('#' + linkUrlId);\n        var url = (0, _trim[\"default\"])(_context2 = $linkUrl.val()).call(_context2); //如果url为空则直接返回\n\n        if (!url) return;\n        var linkUrlAltText;\n\n        if (config.showLinkImgAlt) {\n          var _context3;\n\n          linkUrlAltText = (0, _trim[\"default\"])(_context3 = dom_core_1[\"default\"]('#' + linkUrlAltId).val()).call(_context3);\n        }\n\n        var linkUrlHrefText;\n\n        if (config.showLinkImgHref) {\n          var _context4;\n\n          linkUrlHrefText = (0, _trim[\"default\"])(_context4 = dom_core_1[\"default\"]('#' + linkUrlHrefId).val()).call(_context4);\n        } //如果不能通过校验也直接返回\n\n\n        if (!checkLinkImg(url, linkUrlAltText, linkUrlHrefText)) return; //插入图片url\n\n        uploadImg.insertImg(url, linkUrlAltText, linkUrlHrefText); // 返回 true 表示函数执行结束之后关闭 panel\n\n        return true;\n      },\n      bindEnter: true\n    }]\n  } // second tab end\n  ]; // tabs end\n  // 最终的配置 -----------------------------------------\n\n  var conf = {\n    width: 300,\n    height: 0,\n    tabs: [],\n    onlyUploadConf: {\n      $elem: dom_core_1[\"default\"](getUploadImgTpl('w-e-menu', 'w-e-icon-image', '图片')),\n      events: uploadEvents\n    }\n  }; // 显示“上传图片”\n\n  if (window.FileReader && (config.uploadImgShowBase64 || config.uploadImgServer || config.customUploadImg || config.uploadImgFromMedia)) {\n    conf.tabs.push(tabsConf[0]);\n  } // 显示“插入网络图片”\n\n\n  if (config.showLinkImg) {\n    conf.tabs.push(tabsConf[1]);\n    conf.onlyUploadConf = undefined;\n  }\n\n  return conf;\n}\n\nexports[\"default\"] = default_1;\n\n/***/ }),\n/* 380 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * @description 增加缩进/减少缩进\n * @author tonghan\n */\n\nvar _interopRequireDefault = __webpack_require__(0);\n\nvar _defineProperty = _interopRequireDefault(__webpack_require__(1));\n\nvar _forEach = _interopRequireDefault(__webpack_require__(4));\n\n(0, _defineProperty[\"default\"])(exports, \"__esModule\", {\n  value: true\n});\n\nvar tslib_1 = __webpack_require__(2);\n\nvar dom_core_1 = tslib_1.__importDefault(__webpack_require__(3));\n\nvar DropListMenu_1 = tslib_1.__importDefault(__webpack_require__(24));\n\nvar operate_element_1 = tslib_1.__importDefault(__webpack_require__(381));\n\nvar Indent = function (_super) {\n  tslib_1.__extends(Indent, _super);\n\n  function Indent(editor) {\n    var _this = this;\n\n    var $elem = dom_core_1[\"default\"](\"<div class=\\\"w-e-menu\\\" data-title=\\\"\\u7F29\\u8FDB\\\">\\n                <i class=\\\"w-e-icon-indent-increase\\\"></i>\\n            </div>\");\n    var dropListConf = {\n      width: 130,\n      title: '设置缩进',\n      type: 'list',\n      list: [{\n        $elem: dom_core_1[\"default\"](\"<p>\\n                            <i class=\\\"w-e-icon-indent-increase w-e-drop-list-item\\\"></i>\\n                            \" + editor.i18next.t('menus.dropListMenu.indent.增加缩进') + \"\\n                        <p>\"),\n        value: 'increase'\n      }, {\n        $elem: dom_core_1[\"default\"](\"<p>\\n                            <i class=\\\"w-e-icon-indent-decrease w-e-drop-list-item\\\"></i>\\n                            \" + editor.i18next.t('menus.dropListMenu.indent.减少缩进') + \"\\n                        <p>\"),\n        value: 'decrease'\n      }],\n      clickHandler: function clickHandler(value) {\n        // 注意 this 是指向当前的 Indent 对象\n        _this.command(value);\n      }\n    };\n    _this = _super.call(this, $elem, editor, dropListConf) || this;\n    return _this;\n  }\n  /**\n   * 执行命令\n   * @param value value\n   */\n\n\n  Indent.prototype.command = function (value) {\n    var editor = this.editor;\n    var $selectionElem = editor.selection.getSelectionContainerElem(); // 判断 当前选区为 textElem 时\n\n    if ($selectionElem && editor.$textElem.equal($selectionElem)) {\n      // 当 当前选区 等于 textElem 时\n      // 代表 当前选区 可能是一个选择了一个完整的段落或者多个段落\n      var $elems = editor.selection.getSelectionRangeTopNodes();\n\n      if ($elems.length > 0) {\n        (0, _forEach[\"default\"])($elems).call($elems, function (item) {\n          operate_element_1[\"default\"](dom_core_1[\"default\"](item), value, editor);\n        });\n      }\n    } else {\n      // 当 当前选区 不等于 textElem 时\n      // 代表 当前选区要么是一个段落，要么是段落中的一部分\n      if ($selectionElem && $selectionElem.length > 0) {\n        (0, _forEach[\"default\"])($selectionElem).call($selectionElem, function (item) {\n          operate_element_1[\"default\"](dom_core_1[\"default\"](item), value, editor);\n        });\n      }\n    } // 恢复选区\n\n\n    editor.selection.restoreSelection();\n    this.tryChangeActive();\n  };\n  /**\n   * 尝试改变菜单激活（高亮）状态\n   */\n\n\n  Indent.prototype.tryChangeActive = function () {\n    var editor = this.editor;\n    var $selectionElem = editor.selection.getSelectionStartElem();\n    var $selectionStartElem = dom_core_1[\"default\"]($selectionElem).getNodeTop(editor);\n    if ($selectionStartElem.length <= 0) return;\n\n    if ($selectionStartElem.elems[0].style['paddingLeft'] != '') {\n      this.active();\n    } else {\n      this.unActive();\n    }\n  };\n\n  return Indent;\n}(DropListMenu_1[\"default\"]);\n\nexports[\"default\"] = Indent;\n\n/***/ }),\n/* 381 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * @description 对节点 操作 进行封装\n *                  获取当前节点的段落\n *                  根据type判断是增加还是减少缩进\n * @author tonghan\n */\n\nvar _interopRequireDefault = __webpack_require__(0);\n\nvar _defineProperty = _interopRequireDefault(__webpack_require__(1));\n\nvar _slice = _interopRequireDefault(__webpack_require__(47));\n\nvar _trim = _interopRequireDefault(__webpack_require__(16));\n\n(0, _defineProperty[\"default\"])(exports, \"__esModule\", {\n  value: true\n});\n\nvar tslib_1 = __webpack_require__(2);\n\nvar increase_indent_style_1 = tslib_1.__importDefault(__webpack_require__(382));\n\nvar decrease_indent_style_1 = tslib_1.__importDefault(__webpack_require__(383));\n\nvar lengthRegex = /^(\\d+)(\\w+)$/;\nvar percentRegex = /^(\\d+)%$/;\n\nfunction parseIndentation(editor) {\n  var indentation = editor.config.indentation;\n\n  if (typeof indentation === 'string') {\n    if (lengthRegex.test(indentation)) {\n      var _context;\n\n      var _a = (0, _slice[\"default\"])(_context = (0, _trim[\"default\"])(indentation).call(indentation).match(lengthRegex)).call(_context, 1, 3),\n          value = _a[0],\n          unit = _a[1];\n\n      return {\n        value: Number(value),\n        unit: unit\n      };\n    } else if (percentRegex.test(indentation)) {\n      return {\n        value: Number((0, _trim[\"default\"])(indentation).call(indentation).match(percentRegex)[1]),\n        unit: '%'\n      };\n    }\n  } else if (indentation.value !== void 0 && indentation.unit) {\n    return indentation;\n  }\n\n  return {\n    value: 2,\n    unit: 'em'\n  };\n}\n\nfunction operateElement($node, type, editor) {\n  var $elem = $node.getNodeTop(editor);\n  var reg = /^(P|H[0-9]*)$/;\n\n  if (reg.test($elem.getNodeName())) {\n    if (type === 'increase') increase_indent_style_1[\"default\"]($elem, parseIndentation(editor));else if (type === 'decrease') decrease_indent_style_1[\"default\"]($elem, parseIndentation(editor));\n  }\n}\n\nexports[\"default\"] = operateElement;\n\n/***/ }),\n/* 382 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * @description 增加缩进\n * @author tonghan\n */\n\nvar _interopRequireDefault = __webpack_require__(0);\n\nvar _defineProperty = _interopRequireDefault(__webpack_require__(1));\n\nvar _slice = _interopRequireDefault(__webpack_require__(47));\n\n(0, _defineProperty[\"default\"])(exports, \"__esModule\", {\n  value: true\n});\n\nfunction increaseIndentStyle($node, options) {\n  var $elem = $node.elems[0];\n\n  if ($elem.style['paddingLeft'] === '') {\n    $node.css('padding-left', options.value + options.unit);\n  } else {\n    var oldPL = $elem.style['paddingLeft'];\n    var oldVal = (0, _slice[\"default\"])(oldPL).call(oldPL, 0, oldPL.length - options.unit.length);\n    var newVal = Number(oldVal) + options.value;\n    $node.css('padding-left', \"\" + newVal + options.unit);\n  }\n}\n\nexports[\"default\"] = increaseIndentStyle;\n\n/***/ }),\n/* 383 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * @description 减少缩进\n * @author tonghan\n */\n\nvar _interopRequireDefault = __webpack_require__(0);\n\nvar _defineProperty = _interopRequireDefault(__webpack_require__(1));\n\nvar _slice = _interopRequireDefault(__webpack_require__(47));\n\n(0, _defineProperty[\"default\"])(exports, \"__esModule\", {\n  value: true\n});\n\nfunction decreaseIndentStyle($node, options) {\n  var $elem = $node.elems[0];\n\n  if ($elem.style['paddingLeft'] !== '') {\n    var oldPL = $elem.style['paddingLeft'];\n    var oldVal = (0, _slice[\"default\"])(oldPL).call(oldPL, 0, oldPL.length - options.unit.length);\n    var newVal = Number(oldVal) - options.value;\n\n    if (newVal > 0) {\n      $node.css('padding-left', \"\" + newVal + options.unit);\n    } else {\n      $node.css('padding-left', '');\n    }\n  }\n}\n\nexports[\"default\"] = decreaseIndentStyle;\n\n/***/ }),\n/* 384 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _interopRequireDefault = __webpack_require__(0);\n\nvar _defineProperty = _interopRequireDefault(__webpack_require__(1));\n\n(0, _defineProperty[\"default\"])(exports, \"__esModule\", {\n  value: true\n});\n\nvar tslib_1 = __webpack_require__(2);\n/**\n * @description 插入表情\n * @author liuwe\n */\n\n\nvar dom_core_1 = tslib_1.__importDefault(__webpack_require__(3));\n\nvar PanelMenu_1 = tslib_1.__importDefault(__webpack_require__(36));\n\nvar Panel_1 = tslib_1.__importDefault(__webpack_require__(33));\n\nvar create_panel_conf_1 = tslib_1.__importDefault(__webpack_require__(385));\n\nvar Emoticon = function (_super) {\n  tslib_1.__extends(Emoticon, _super);\n\n  function Emoticon(editor) {\n    var _this = this;\n\n    var $elem = dom_core_1[\"default\"](\"<div class=\\\"w-e-menu\\\" data-title=\\\"\\u8868\\u60C5\\\">\\n                <i class=\\\"w-e-icon-happy\\\"></i>\\n            </div>\");\n    _this = _super.call(this, $elem, editor) || this;\n    return _this;\n  }\n  /**\n   * 创建 panel\n   */\n\n\n  Emoticon.prototype.createPanel = function () {\n    var conf = create_panel_conf_1[\"default\"](this.editor);\n    var panel = new Panel_1[\"default\"](this, conf);\n    panel.create();\n  };\n  /**\n   * 菜单表情点击事件\n   */\n\n\n  Emoticon.prototype.clickHandler = function () {\n    this.createPanel();\n  };\n\n  Emoticon.prototype.tryChangeActive = function () {};\n\n  return Emoticon;\n}(PanelMenu_1[\"default\"]);\n\nexports[\"default\"] = Emoticon;\n\n/***/ }),\n/* 385 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * @description  表情菜单 panel配置\n * @author liuwei\n */\n\nvar _interopRequireDefault = __webpack_require__(0);\n\nvar _defineProperty = _interopRequireDefault(__webpack_require__(1));\n\nvar _map = _interopRequireDefault(__webpack_require__(27));\n\nvar _filter = _interopRequireDefault(__webpack_require__(76));\n\nvar _trim = _interopRequireDefault(__webpack_require__(16));\n\n(0, _defineProperty[\"default\"])(exports, \"__esModule\", {\n  value: true\n});\n\nvar tslib_1 = __webpack_require__(2);\n\nvar dom_core_1 = tslib_1.__importDefault(__webpack_require__(3));\n\nfunction default_1(editor) {\n  // 声明emotions数据结构\n  var emotions = editor.config.emotions;\n  /* tabs配置项 ==================================================================*/\n  // 生成表情结构 TODO jele type类型待优化\n\n  function GenerateExpressionStructure(ele) {\n    // 返回为一个数组对象\n    var res = []; // 如果type是image类型则生成一个img标签\n\n    if (ele.type == 'image') {\n      var _context;\n\n      res = (0, _map[\"default\"])(_context = ele.content).call(_context, function (con) {\n        if (typeof con == 'string') return '';\n        return \"<span  title=\\\"\" + con.alt + \"\\\">\\n                    <img class=\\\"eleImg\\\" data-emoji=\\\"\" + con.alt + \"\\\" style src=\\\"\" + con.src + \"\\\" alt=\\\"[\" + con.alt + \"]\\\">\\n                </span>\";\n      });\n      res = (0, _filter[\"default\"])(res).call(res, function (s) {\n        return s !== '';\n      });\n    } //否则直接当内容处理\n    else {\n      var _context2;\n\n      res = (0, _map[\"default\"])(_context2 = ele.content).call(_context2, function (con) {\n        return \"<span class=\\\"eleImg\\\" title=\\\"\" + con + \"\\\">\" + con + \"</span>\";\n      });\n    }\n\n    return res.join('').replace(/&nbsp;/g, '');\n  }\n\n  var tabsConf = (0, _map[\"default\"])(emotions).call(emotions, function (ele) {\n    return {\n      title: editor.i18next.t(\"menus.panelMenus.emoticon.\" + ele.title),\n      // 判断type类型如果是image则以img的形式插入否则以内容\n      tpl: \"<div>\" + GenerateExpressionStructure(ele) + \"</div>\",\n      events: [{\n        selector: '.eleImg',\n        type: 'click',\n        fn: function fn(e) {\n          // e为事件对象\n          var $target = dom_core_1[\"default\"](e.target);\n          var nodeName = $target.getNodeName();\n          var insertHtml;\n\n          if (nodeName === 'IMG') {\n            var _context3;\n\n            // 插入图片\n            insertHtml = (0, _trim[\"default\"])(_context3 = $target.parent().html()).call(_context3);\n          } else {\n            // 插入 emoji\n            insertHtml = '<span>' + $target.html() + '</span>';\n          }\n\n          editor.cmd[\"do\"]('insertHTML', insertHtml); // 示函数执行结束之后关闭 panel\n\n          return true;\n        }\n      }]\n    };\n  });\n  /* tabs配置项 =================================================================end*/\n  // 最终的配置 -----------------------------------------\n\n  var conf = {\n    width: 300,\n    height: 230,\n    tabs: tabsConf\n  };\n  return conf;\n}\n\nexports[\"default\"] = default_1;\n\n/***/ }),\n/* 386 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _interopRequireDefault = __webpack_require__(0);\n\nvar _defineProperty = _interopRequireDefault(__webpack_require__(1));\n\n(0, _defineProperty[\"default\"])(exports, \"__esModule\", {\n  value: true\n});\nexports.createListHandle = exports.ClassType = void 0;\n\nvar tslib_1 = __webpack_require__(2);\n\nvar dom_core_1 = tslib_1.__importDefault(__webpack_require__(3));\n\nvar WrapListHandle_1 = tslib_1.__importDefault(__webpack_require__(387));\n\nvar JoinListHandle_1 = tslib_1.__importDefault(__webpack_require__(389));\n\nvar StartJoinListHandle_1 = tslib_1.__importDefault(__webpack_require__(390));\n\nvar EndJoinListHandle_1 = tslib_1.__importDefault(__webpack_require__(391));\n\nvar OtherListHandle_1 = tslib_1.__importDefault(__webpack_require__(392));\n\nvar ClassType;\n\n(function (ClassType) {\n  ClassType[\"Wrap\"] = \"WrapListHandle\";\n  ClassType[\"Join\"] = \"JoinListHandle\";\n  ClassType[\"StartJoin\"] = \"StartJoinListHandle\";\n  ClassType[\"EndJoin\"] = \"EndJoinListHandle\";\n  ClassType[\"Other\"] = \"OtherListHandle\";\n})(ClassType = exports.ClassType || (exports.ClassType = {}));\n\nvar handle = {\n  WrapListHandle: WrapListHandle_1[\"default\"],\n  JoinListHandle: JoinListHandle_1[\"default\"],\n  StartJoinListHandle: StartJoinListHandle_1[\"default\"],\n  EndJoinListHandle: EndJoinListHandle_1[\"default\"],\n  OtherListHandle: OtherListHandle_1[\"default\"]\n};\n\nfunction createListHandle(classType, options, range) {\n  if (classType === ClassType.Other && range === undefined) {\n    throw new Error('other 类需要传入 range');\n  }\n\n  return classType !== ClassType.Other ? new handle[classType](options) : new handle[classType](options, range);\n}\n\nexports.createListHandle = createListHandle;\n/**\n * 统一执行的接口\n */\n\nvar ListHandleCommand = function () {\n  function ListHandleCommand(handle) {\n    this.handle = handle;\n    this.handle.exec();\n  }\n\n  ListHandleCommand.prototype.getSelectionRangeElem = function () {\n    return dom_core_1[\"default\"](this.handle.selectionRangeElem.get());\n  };\n\n  return ListHandleCommand;\n}();\n\nexports[\"default\"] = ListHandleCommand;\n\n/***/ }),\n/* 387 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _interopRequireDefault = __webpack_require__(0);\n\nvar _defineProperty = _interopRequireDefault(__webpack_require__(1));\n\nvar _forEach = _interopRequireDefault(__webpack_require__(4));\n\n(0, _defineProperty[\"default\"])(exports, \"__esModule\", {\n  value: true\n});\n\nvar tslib_1 = __webpack_require__(2);\n\nvar dom_core_1 = tslib_1.__importDefault(__webpack_require__(3));\n\nvar ListHandle_1 = __webpack_require__(62);\n\nvar utils_1 = __webpack_require__(49);\n/**\n * 选区在序列内的处理\n */\n\n\nvar WrapListHandle = function (_super) {\n  tslib_1.__extends(WrapListHandle, _super);\n\n  function WrapListHandle(options) {\n    return _super.call(this, options) || this;\n  }\n\n  WrapListHandle.prototype.exec = function () {\n    var _a = this.options,\n        listType = _a.listType,\n        listTarget = _a.listTarget,\n        $selectionElem = _a.$selectionElem,\n        $startElem = _a.$startElem,\n        $endElem = _a.$endElem;\n    var $containerFragment; // 容器 - HTML 文档片段\n\n    var $nodes = []; // 获取选中的段落\n    // 获取 selectionElem 的标签名\n\n    var containerNodeName = $selectionElem === null || $selectionElem === void 0 ? void 0 : $selectionElem.getNodeName(); // 获取开始以及结束的 li 元素\n\n    var $start = $startElem.prior;\n    var $end = $endElem.prior; // =====================================\n    // 当 开始节点 和 结束节点 没有 prior\n    // 并且 开始节点 没有前一个兄弟节点\n    // 并且 结束节点 没有后一个兄弟节点\n    // 即代表 全选序列\n    // =====================================\n\n    if (!$startElem.prior && !$endElem.prior || !($start === null || $start === void 0 ? void 0 : $start.prev().length) && !($end === null || $end === void 0 ? void 0 : $end.next().length)) {\n      var _context;\n\n      // 获取当前序列下的所有 li 标签\n      ;\n      (0, _forEach[\"default\"])(_context = $selectionElem === null || $selectionElem === void 0 ? void 0 : $selectionElem.children()).call(_context, function ($node) {\n        $nodes.push(dom_core_1[\"default\"]($node));\n      }); // =====================================\n      // 当 selectionElem 的标签名和按钮类型 一致 的时候\n      // 代表着当前的操作是 取消 序列\n      // =====================================\n\n      if (containerNodeName === listType) {\n        // 生成对应的段落(p)并添加到文档片段中，然后删除掉无用的 li\n        $containerFragment = utils_1.createElementFragment($nodes, utils_1.createDocumentFragment(), // 创建 文档片段\n        'p');\n      } // =====================================\n      // 当 selectionElem 的标签名和按钮类型 不一致 的时候\n      // 代表着当前的操作是 转换 序列\n      // =====================================\n      else {\n        // 创建 序列节点\n        $containerFragment = utils_1.createElement(listTarget); // 因为是转换，所以 li 元素可以直接使用\n\n        (0, _forEach[\"default\"])($nodes).call($nodes, function ($node) {\n          $containerFragment.appendChild($node.elems[0]);\n        });\n      } // 把 文档片段 或 序列节点 插入到 selectionElem 的前面\n\n\n      this.selectionRangeElem.set($containerFragment); // 插入到 $selectionElem 之前\n\n      utils_1.insertBefore($selectionElem, $containerFragment, $selectionElem.elems[0]); // 删除无用的 selectionElem 因为它被掏空了\n\n      $selectionElem.remove();\n    } // =====================================\n    // 当不是全选序列的时候就代表是非全选序列(废话)\n    // 非全选序列的情况\n    // =====================================\n    else {\n      // 获取选中的内容\n      var $startDom = $start;\n\n      while ($startDom.length) {\n        $nodes.push($startDom);\n        ($end === null || $end === void 0 ? void 0 : $end.equal($startDom)) ? $startDom = dom_core_1[\"default\"](undefined) : $startDom = $startDom.next(); // 继续\n      } // 获取开始节点的上一个兄弟节点\n\n\n      var $prveDom = $start.prev(); // 获取结束节点的下一个兄弟节点\n\n      var $nextDom = $end.next(); // =====================================\n      // 当 selectionElem 的标签名和按钮类型一致的时候\n      // 代表着当前的操作是 取消 序列\n      // =====================================\n\n      if (containerNodeName === listType) {\n        // 生成对应的段落(p)并添加到文档片段中，然后删除掉无用的 li\n        $containerFragment = utils_1.createElementFragment($nodes, utils_1.createDocumentFragment(), // 创建 文档片段\n        'p');\n      } // =====================================\n      // 当 selectionElem 的标签名和按钮类型不一致的时候\n      // 代表着当前的操作是 转换 序列\n      // =====================================\n      else {\n        // 创建 文档片段\n        $containerFragment = utils_1.createElement(listTarget); // 因为是转换，所以 li 元素可以直接使用\n\n        (0, _forEach[\"default\"])($nodes).call($nodes, function ($node) {\n          $containerFragment.append($node.elems[0]);\n        });\n      } // =====================================\n      // 当 prveDom 和 nextDom 都存在的时候\n      // 代表着当前选区是在序列的中间\n      // 所以要先把 下半部分 未选择的 li 元素独立出来生成一个 序列\n      // =====================================\n\n\n      if ($prveDom.length && $nextDom.length) {\n        // 获取尾部的元素\n        var $tailDomArr = [];\n\n        while ($nextDom.length) {\n          $tailDomArr.push($nextDom);\n          $nextDom = $nextDom.next();\n        } // 创建 尾部序列节点\n\n\n        var $tailDocFragment_1 = utils_1.createElement(containerNodeName); // 把尾部元素节点添加到尾部序列节点中\n\n        (0, _forEach[\"default\"])($tailDomArr).call($tailDomArr, function ($node) {\n          $tailDocFragment_1.append($node.elems[0]);\n        }); // 把尾部序列节点插入到 selectionElem 的后面\n\n        dom_core_1[\"default\"]($tailDocFragment_1).insertAfter($selectionElem); // =====================================\n        // 获取选区容器元素的父元素，一般就是编辑区域\n        // 然后判断 selectionElem 是否还有下一个兄弟节点\n        // 如果有，就把文档片段添加到 selectionElem 下一个兄弟节点前\n        // 如果没有，就把文档片段添加到 编辑区域 末尾\n        // =====================================\n\n        this.selectionRangeElem.set($containerFragment);\n        var $selectionNextDom = $selectionElem.next();\n        $selectionNextDom.length ? utils_1.insertBefore($selectionElem, $containerFragment, $selectionNextDom.elems[0]) : $selectionElem.parent().elems[0].append($containerFragment);\n      } // =====================================\n      // 不管是 取消 还是 转换 都需要重新插入节点\n      //\n      // prveDom.length 等于 0 即代表选区是 selectionElem 序列的上半部分\n      // 上半部分的 li 元素\n      // =====================================\n      else if (!$prveDom.length) {\n        // 文档片段插入到 selectionElem 之前\n        this.selectionRangeElem.set($containerFragment);\n        utils_1.insertBefore($selectionElem, $containerFragment, $selectionElem.elems[0]);\n      } // =====================================\n      // 不管是 取消 还是 转换 都需要重新插入节点\n      //\n      // nextDom.length 等于 0 即代表选区是 selectionElem 序列的下半部分\n      // 下半部分的 li 元素  if (!$nextDom.length)\n      // =====================================\n      else {\n        // 文档片段插入到 selectionElem 之后\n        this.selectionRangeElem.set($containerFragment);\n        var $selectionNextDom = $selectionElem.next();\n        $selectionNextDom.length ? utils_1.insertBefore($selectionElem, $containerFragment, $selectionNextDom.elems[0]) : $selectionElem.parent().elems[0].append($containerFragment);\n      }\n    }\n  };\n\n  return WrapListHandle;\n}(ListHandle_1.ListHandle);\n\nexports[\"default\"] = WrapListHandle;\n\n/***/ }),\n/* 388 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _interopRequireDefault = __webpack_require__(0);\n\nvar _defineProperty = _interopRequireDefault(__webpack_require__(1));\n\nvar _forEach = _interopRequireDefault(__webpack_require__(4));\n\n(0, _defineProperty[\"default\"])(exports, \"__esModule\", {\n  value: true\n});\n/**\n * @description 选区的 Element\n * @author tonghan\n */\n\nvar SelectionRangeElem = function () {\n  function SelectionRangeElem() {\n    this._element = null;\n  }\n  /**\n   * 设置 SelectionRangeElem 的值\n   * @param { SetSelectionRangeType } data\n   */\n\n\n  SelectionRangeElem.prototype.set = function (data) {\n    //\n    if (data instanceof DocumentFragment) {\n      var _context;\n\n      var childNode_1 = [];\n      (0, _forEach[\"default\"])(_context = data.childNodes).call(_context, function ($node) {\n        childNode_1.push($node);\n      });\n      data = childNode_1;\n    }\n\n    this._element = data;\n  };\n  /**\n   * 获取 SelectionRangeElem 的值\n   * @returns { SelectionRangeType } Elem\n   */\n\n\n  SelectionRangeElem.prototype.get = function () {\n    return this._element;\n  };\n  /**\n   * 清除 SelectionRangeElem 的值\n   */\n\n\n  SelectionRangeElem.prototype.clear = function () {\n    this._element = null;\n  };\n\n  return SelectionRangeElem;\n}();\n\nexports[\"default\"] = SelectionRangeElem;\n\n/***/ }),\n/* 389 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _interopRequireDefault = __webpack_require__(0);\n\nvar _defineProperty = _interopRequireDefault(__webpack_require__(1));\n\nvar _forEach = _interopRequireDefault(__webpack_require__(4));\n\n(0, _defineProperty[\"default\"])(exports, \"__esModule\", {\n  value: true\n});\n\nvar tslib_1 = __webpack_require__(2);\n\nvar dom_core_1 = tslib_1.__importDefault(__webpack_require__(3));\n\nvar ListHandle_1 = __webpack_require__(62);\n\nvar utils_1 = __webpack_require__(49);\n\nvar JoinListHandle = function (_super) {\n  tslib_1.__extends(JoinListHandle, _super);\n\n  function JoinListHandle(options) {\n    return _super.call(this, options) || this;\n  }\n\n  JoinListHandle.prototype.exec = function () {\n    var _a, _b, _c, _d, _e, _f, _g;\n\n    var _h = this.options,\n        editor = _h.editor,\n        listType = _h.listType,\n        listTarget = _h.listTarget,\n        $startElem = _h.$startElem,\n        $endElem = _h.$endElem; // 容器 - HTML 文档片段\n\n    var $containerFragment; // 获取选中的段落\n\n    var $nodes = editor.selection.getSelectionRangeTopNodes(); // 获取开始段落和结束段落 标签名\n\n    var startNodeName = $startElem === null || $startElem === void 0 ? void 0 : $startElem.getNodeName();\n    var endNodeName = $endElem === null || $endElem === void 0 ? void 0 : $endElem.getNodeName(); // =====================================\n    // 开头结尾都是序列的情况下\n    // 开头序列 和 结尾序列的标签名一致的时候\n    // =====================================\n\n    if (startNodeName === endNodeName) {\n      // =====================================\n      // 开头序列 和 结尾序列 中间还有其他的段落的时候\n      // =====================================\n      if ($nodes.length > 2) {\n        // 弹出 开头 和 结尾\n        $nodes.shift();\n        $nodes.pop(); // 把中间部分的节点元素转换成 li 元素并添加到文档片段后删除\n\n        $containerFragment = utils_1.createElementFragment(utils_1.filterSelectionNodes($nodes), // 过滤 $nodes 获取到符合要求的选中元素节点\n        utils_1.createDocumentFragment() // 创建 文档片段\n        ); // =====================================\n        // 由于开头序列 和 结尾序列的标签名一样，所以只判断了开头序列的\n        // 当开头序列的标签名和按钮类型 一致 的时候\n        // 代表着当前是一个 设置序列 的操作\n        // =====================================\n\n        if (startNodeName === listType) {\n          // 把结束序列的 li 元素添加到 文档片段中\n          (_a = $endElem.children()) === null || _a === void 0 ? void 0 : (0, _forEach[\"default\"])(_a).call(_a, function ($list) {\n            $containerFragment.append($list);\n          }); // 下序列全选被掏空了，就卸磨杀驴吧\n\n          $endElem.remove(); // 在开始序列中添加 文档片段\n\n          this.selectionRangeElem.set($containerFragment);\n          $startElem.elems[0].append($containerFragment);\n        } // =====================================\n        // 由于开头序列 和 结尾序列的标签名一样，所以只判断了开头序列的\n        // 当开头序列的标签名和按钮类型 不一致 的时候\n        // 代表着当前是一个 转换序列 的操作\n        // =====================================\n        else {\n          // 创建 开始序列和结束序列的文档片段\n          var $startFragment = document.createDocumentFragment();\n          var $endFragment_1 = document.createDocumentFragment(); // 获取起点元素\n\n          var $startDom = utils_1.getStartPoint($startElem); // 获取上半序列中的选中内容，并添加到文档片段中\n\n          while ($startDom.length) {\n            var _element = $startDom.elems[0];\n            $startDom = $startDom.next();\n            $startFragment.append(_element);\n          } // 获取结束元素\n\n\n          var $endDom = utils_1.getEndPoint($endElem); // 获取下半序列中选中的内容\n\n          var domArr = [];\n\n          while ($endDom.length) {\n            domArr.unshift($endDom.elems[0]);\n            $endDom = $endDom.prev();\n          } // 添加到文档片段中\n\n\n          (0, _forEach[\"default\"])(domArr).call(domArr, function ($node) {\n            $endFragment_1.append($node);\n          }); // 合并文档片段\n\n          var $orderFragment = utils_1.createElement(listTarget);\n          $orderFragment.append($startFragment);\n          $orderFragment.append($containerFragment);\n          $orderFragment.append($endFragment_1);\n          $containerFragment = $orderFragment; // 插入\n\n          this.selectionRangeElem.set($containerFragment);\n          dom_core_1[\"default\"]($orderFragment).insertAfter($startElem); // 序列全选被掏空了后，就卸磨杀驴吧\n\n          !((_b = $startElem.children()) === null || _b === void 0 ? void 0 : _b.length) && $startElem.remove();\n          !((_c = $endElem.children()) === null || _c === void 0 ? void 0 : _c.length) && $endElem.remove();\n        }\n      } // =====================================\n      // 开头序列 和 结尾序列 中间没有其他的段落\n      // =====================================\n      else {\n        $nodes.length = 0; // 获取起点元素\n\n        var $startDom = utils_1.getStartPoint($startElem); // 获取上半序列中的选中内容\n\n        while ($startDom.length) {\n          $nodes.push($startDom);\n          $startDom = $startDom.next();\n        } // 获取结束元素\n\n\n        var $endDom = utils_1.getEndPoint($endElem); // 获取下半序列中选中的内容\n\n        var domArr = []; // 获取下半序列中的选中内容\n\n        while ($endDom.length) {\n          domArr.unshift($endDom);\n          $endDom = $endDom.prev();\n        } // 融合内容\n\n\n        $nodes.push.apply($nodes, domArr); // =====================================\n        // 由于开头序列 和 结尾序列的标签名一样，所以只判断了开头序列的\n        // 当开头序列的标签名和按钮类型 一致 的时候\n        // 代表着当前是一个 取消序列 的操作\n        // =====================================\n\n        if (startNodeName === listType) {\n          // 创建 文档片段\n          // 把 li 转换为 p 标签\n          $containerFragment = utils_1.createElementFragment($nodes, utils_1.createDocumentFragment(), 'p'); // 插入到 endElem 前\n\n          this.selectionRangeElem.set($containerFragment);\n          utils_1.insertBefore($startElem, $containerFragment, $endElem.elems[0]);\n        } // =====================================\n        // 由于开头序列 和 结尾序列的标签名一样，所以只判断了开头序列的\n        // 当开头序列的标签名和按钮类型 不一致 的时候\n        // 代表着当前是一个 设置序列 的操作\n        // =====================================\n        else {\n          // 创建 序列元素\n          $containerFragment = utils_1.createElement(listTarget); // li 元素添加到 序列元素 中\n\n          (0, _forEach[\"default\"])($nodes).call($nodes, function ($list) {\n            $containerFragment.append($list.elems[0]);\n          }); // 插入到 startElem 之后\n\n          this.selectionRangeElem.set($containerFragment);\n          dom_core_1[\"default\"]($containerFragment).insertAfter($startElem);\n        } // 序列全选被掏空了后，就卸磨杀驴吧\n\n\n        !((_d = $startElem.children()) === null || _d === void 0 ? void 0 : _d.length) && $endElem.remove();\n        !((_e = $endElem.children()) === null || _e === void 0 ? void 0 : _e.length) && $endElem.remove();\n      }\n    } // =====================================\n    // 由于开头序列 和 结尾序列的标签名不一样\n    // =====================================\n    else {\n      // 下序列元素数组\n      var lowerListElems = []; // 获取结束元素\n\n      var $endDom = utils_1.getEndPoint($endElem); // 获取下半序列中选中的内容\n\n      while ($endDom.length) {\n        lowerListElems.unshift($endDom);\n        $endDom = $endDom.prev();\n      } // 上序列元素数组\n\n\n      var upperListElems = []; // 获取起点元素\n\n      var $startDom = utils_1.getStartPoint($startElem); // 获取上半序列中的选中内容，并添加到文档片段中\n\n      while ($startDom.length) {\n        upperListElems.push($startDom);\n        $startDom = $startDom.next();\n      } // 创建 文档片段\n\n\n      $containerFragment = utils_1.createDocumentFragment(); // 弹出开头和结尾的序列\n\n      $nodes.shift();\n      $nodes.pop(); // 把头部序列的内容添加到文档片段当中\n\n      (0, _forEach[\"default\"])(upperListElems).call(upperListElems, function ($list) {\n        return $containerFragment.append($list.elems[0]);\n      }); // 生成 li 标签，并且添加到 文档片段中，删除无用节点\n\n      $containerFragment = utils_1.createElementFragment(utils_1.filterSelectionNodes($nodes), // 序列中间的数据 - 进行数据过滤\n      $containerFragment); // 把尾部序列的内容添加到文档片段当中\n\n      (0, _forEach[\"default\"])(lowerListElems).call(lowerListElems, function ($list) {\n        return $containerFragment.append($list.elems[0]);\n      }); // 记录\n\n      this.selectionRangeElem.set($containerFragment); // =====================================\n      // 开头序列 和 设置序列类型相同\n      // =====================================\n\n      if (startNodeName === listType) {\n        // 插入到 开始序列的尾部(作为子元素)\n        $startElem.elems[0].append($containerFragment); // 序列全选被掏空了后，就卸磨杀驴吧\n\n        !((_f = $endElem.children()) === null || _f === void 0 ? void 0 : _f.length) && $endElem.remove();\n      } // =====================================\n      // 结尾序列 和 设置序列类型相同\n      // =====================================\n      else {\n        // 插入到结束序列的顶部(作为子元素)\n        if ((_g = $endElem.children()) === null || _g === void 0 ? void 0 : _g.length) {\n          var $endElemChild = $endElem.children();\n          utils_1.insertBefore($endElemChild, $containerFragment, $endElemChild.elems[0]);\n        } else {\n          $endElem.elems[0].append($containerFragment);\n        }\n      }\n    }\n  };\n\n  return JoinListHandle;\n}(ListHandle_1.ListHandle);\n\nexports[\"default\"] = JoinListHandle;\n\n/***/ }),\n/* 390 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _interopRequireDefault = __webpack_require__(0);\n\nvar _defineProperty = _interopRequireDefault(__webpack_require__(1));\n\nvar _forEach = _interopRequireDefault(__webpack_require__(4));\n\n(0, _defineProperty[\"default\"])(exports, \"__esModule\", {\n  value: true\n});\n\nvar tslib_1 = __webpack_require__(2);\n\nvar dom_core_1 = tslib_1.__importDefault(__webpack_require__(3));\n\nvar ListHandle_1 = __webpack_require__(62);\n\nvar utils_1 = __webpack_require__(49);\n\nvar StartJoinListHandle = function (_super) {\n  tslib_1.__extends(StartJoinListHandle, _super);\n\n  function StartJoinListHandle(options) {\n    return _super.call(this, options) || this;\n  }\n\n  StartJoinListHandle.prototype.exec = function () {\n    var _a;\n\n    var _b = this.options,\n        editor = _b.editor,\n        listType = _b.listType,\n        listTarget = _b.listTarget,\n        $startElem = _b.$startElem; // 容器 - HTML 文档片段\n\n    var $containerFragment; // 获取选中的段落\n\n    var $nodes = editor.selection.getSelectionRangeTopNodes(); // 获取开始段落标签名\n\n    var startNodeName = $startElem === null || $startElem === void 0 ? void 0 : $startElem.getNodeName(); // 弹出 开头序列\n\n    $nodes.shift(); // 上序列元素数组\n\n    var upperListElems = []; // 获取起点元素\n\n    var $startDom = utils_1.getStartPoint($startElem); // 获取上半序列中的选中内容，并添加到文档片段中\n\n    while ($startDom.length) {\n      upperListElems.push($startDom);\n      $startDom = $startDom.next();\n    } // =====================================\n    // 当前序列类型和开头序列的类型 一致\n    // 代表当前是一个 融合(把其他段落加入到开头序列中) 的操作\n    // =====================================\n\n\n    if (startNodeName === listType) {\n      $containerFragment = utils_1.createDocumentFragment();\n      (0, _forEach[\"default\"])(upperListElems).call(upperListElems, function ($list) {\n        return $containerFragment.append($list.elems[0]);\n      }); // 生成 li 元属，并删除\n\n      $containerFragment = utils_1.createElementFragment(utils_1.filterSelectionNodes($nodes), // 过滤元素节点数据\n      $containerFragment); // 插入到开始序列末尾\n\n      this.selectionRangeElem.set($containerFragment); // this.selectionRangeElem.set($startElem.elems[0])\n\n      $startElem.elems[0].append($containerFragment);\n    } // =====================================\n    // 当前序列类型和开头序列的类型 不一致\n    // 代表当前是一个 设置序列 的操作\n    // =====================================\n    else {\n      // 创建 序列节点\n      $containerFragment = utils_1.createElement(listTarget);\n      (0, _forEach[\"default\"])(upperListElems).call(upperListElems, function ($list) {\n        return $containerFragment.append($list.elems[0]);\n      }); // 生成 li 元素，并添加到 序列节点 当中，删除无用节点\n\n      $containerFragment = utils_1.createElementFragment(utils_1.filterSelectionNodes($nodes), // 过滤普通节点\n      $containerFragment); // 插入到开始元素\n\n      this.selectionRangeElem.set($containerFragment);\n      dom_core_1[\"default\"]($containerFragment).insertAfter($startElem); // 序列全选被掏空了后，就卸磨杀驴吧\n\n      !((_a = $startElem.children()) === null || _a === void 0 ? void 0 : _a.length) && $startElem.remove();\n    }\n  };\n\n  return StartJoinListHandle;\n}(ListHandle_1.ListHandle);\n\nexports[\"default\"] = StartJoinListHandle;\n\n/***/ }),\n/* 391 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _interopRequireDefault = __webpack_require__(0);\n\nvar _defineProperty = _interopRequireDefault(__webpack_require__(1));\n\nvar _forEach = _interopRequireDefault(__webpack_require__(4));\n\n(0, _defineProperty[\"default\"])(exports, \"__esModule\", {\n  value: true\n});\n\nvar tslib_1 = __webpack_require__(2);\n\nvar dom_core_1 = tslib_1.__importDefault(__webpack_require__(3));\n\nvar ListHandle_1 = __webpack_require__(62);\n\nvar utils_1 = __webpack_require__(49);\n\nvar EndJoinListHandle = function (_super) {\n  tslib_1.__extends(EndJoinListHandle, _super);\n\n  function EndJoinListHandle(options) {\n    return _super.call(this, options) || this;\n  }\n\n  EndJoinListHandle.prototype.exec = function () {\n    var _a, _b;\n\n    var _c = this.options,\n        editor = _c.editor,\n        listType = _c.listType,\n        listTarget = _c.listTarget,\n        $endElem = _c.$endElem; // 容器 - HTML 文档片段\n\n    var $containerFragment; // 获取选中的段落\n\n    var $nodes = editor.selection.getSelectionRangeTopNodes(); // 获取结束段落标签名\n\n    var endNodeName = $endElem === null || $endElem === void 0 ? void 0 : $endElem.getNodeName(); // 弹出 结束序列\n\n    $nodes.pop(); // 下序列元素数组\n\n    var lowerListElems = []; // 获取结束元素\n\n    var $endDom = utils_1.getEndPoint($endElem); // 获取下半序列中选中的内容\n\n    while ($endDom.length) {\n      lowerListElems.unshift($endDom);\n      $endDom = $endDom.prev();\n    } // =====================================\n    // 当前序列类型和结束序列的类型 一致\n    // 代表当前是一个 融合(把其他段落加入到结束序列中) 的操作\n    // =====================================\n\n\n    if (endNodeName === listType) {\n      // 生成 li 元属，并删除原来的 dom 元素\n      $containerFragment = utils_1.createElementFragment(utils_1.filterSelectionNodes($nodes), // 过滤元素节点数据\n      utils_1.createDocumentFragment() // 创建 文档片段\n      );\n      (0, _forEach[\"default\"])(lowerListElems).call(lowerListElems, function ($list) {\n        return $containerFragment.append($list.elems[0]);\n      }); // 插入到结束序列之前\n\n      this.selectionRangeElem.set($containerFragment);\n\n      if ((_a = $endElem.children()) === null || _a === void 0 ? void 0 : _a.length) {\n        var $endElemChild = $endElem.children();\n        utils_1.insertBefore($endElemChild, $containerFragment, $endElemChild.elems[0]);\n      } else {\n        $endElem.elems[0].append($containerFragment);\n      }\n    } // =====================================\n    // 当前序列类型和结束序列的类型 不一致\n    // 代表当前是一个 设置序列 的操作\n    // =====================================\n    else {\n      // 过滤元素节点数据\n      var $selectionNodes = utils_1.filterSelectionNodes($nodes); // 把下序列的内容添加到过滤元素中\n\n      $selectionNodes.push.apply($selectionNodes, lowerListElems); // 生成 li 元素并且添加到序列节点后删除原节点\n\n      $containerFragment = utils_1.createElementFragment($selectionNodes, utils_1.createElement(listTarget) // 创建 序列节点\n      ); // 插入到结束序列之前\n\n      this.selectionRangeElem.set($containerFragment);\n      dom_core_1[\"default\"]($containerFragment).insertBefore($endElem); // 序列全选被掏空了后，就卸磨杀驴吧\n\n      !((_b = $endElem.children()) === null || _b === void 0 ? void 0 : _b.length) && $endElem.remove();\n    }\n  };\n\n  return EndJoinListHandle;\n}(ListHandle_1.ListHandle);\n\nexports[\"default\"] = EndJoinListHandle;\n\n/***/ }),\n/* 392 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _interopRequireDefault = __webpack_require__(0);\n\nvar _defineProperty = _interopRequireDefault(__webpack_require__(1));\n\n(0, _defineProperty[\"default\"])(exports, \"__esModule\", {\n  value: true\n});\n\nvar tslib_1 = __webpack_require__(2);\n\nvar ListHandle_1 = __webpack_require__(62);\n\nvar utils_1 = __webpack_require__(49);\n\nvar OtherListHandle = function (_super) {\n  tslib_1.__extends(OtherListHandle, _super);\n\n  function OtherListHandle(options, range) {\n    var _this = _super.call(this, options) || this;\n\n    _this.range = range;\n    return _this;\n  }\n\n  OtherListHandle.prototype.exec = function () {\n    var _a = this.options,\n        editor = _a.editor,\n        listTarget = _a.listTarget; // 获取选中的段落\n\n    var $nodes = editor.selection.getSelectionRangeTopNodes(); // 生成 li 元素并且添加到序列节点后删除原节点\n\n    var $containerFragment = utils_1.createElementFragment(utils_1.filterSelectionNodes($nodes), // 过滤选取的元素\n    utils_1.createElement(listTarget) // 创建 序列节点\n    ); // 插入节点到选区\n\n    this.selectionRangeElem.set($containerFragment);\n    this.range.insertNode($containerFragment);\n  };\n\n  return OtherListHandle;\n}(ListHandle_1.ListHandle);\n\nexports[\"default\"] = OtherListHandle;\n\n/***/ }),\n/* 393 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * @description 段落行高 LineHeight\n * @author lichunlin\n *\n */\n\nvar _interopRequireDefault = __webpack_require__(0);\n\nvar _defineProperty = _interopRequireDefault(__webpack_require__(1));\n\nvar _forEach = _interopRequireDefault(__webpack_require__(4));\n\nvar _indexOf = _interopRequireDefault(__webpack_require__(28));\n\n(0, _defineProperty[\"default\"])(exports, \"__esModule\", {\n  value: true\n});\n\nvar tslib_1 = __webpack_require__(2);\n\nvar DropListMenu_1 = tslib_1.__importDefault(__webpack_require__(24));\n\nvar dom_core_1 = tslib_1.__importDefault(__webpack_require__(3));\n\nvar lineHeightList_1 = tslib_1.__importDefault(__webpack_require__(394));\n\nvar util_1 = __webpack_require__(6);\n\nvar LineHeight = function (_super) {\n  tslib_1.__extends(LineHeight, _super);\n\n  function LineHeight(editor) {\n    var _this = this;\n\n    var $elem = dom_core_1[\"default\"](\"<div class=\\\"w-e-menu\\\" data-title=\\\"\\u884C\\u9AD8\\\">\\n                    <i class=\\\"w-e-icon-row-height\\\"></i>\\n                </div>\");\n    var lineHeightMenu = new lineHeightList_1[\"default\"](editor, editor.config.lineHeights);\n    var DropListMenu = {\n      width: 100,\n      title: '设置行高',\n      type: 'list',\n      list: lineHeightMenu.getItemList(),\n      clickHandler: function clickHandler(value) {\n        //保存焦点\n        editor.selection.saveRange();\n\n        _this.command(value);\n      }\n    };\n    _this = _super.call(this, $elem, editor, DropListMenu) || this;\n    return _this;\n  }\n  /**\n   * 执行命令\n   * @param value value\n   */\n\n\n  LineHeight.prototype.command = function (value) {\n    var _this = this;\n\n    var _a;\n\n    var selection = window.getSelection ? window.getSelection() : document.getSelection(); //允许设置dom\n\n    var allowArray = ['P'];\n    var editor = this.editor;\n    var st = ''; //恢复焦点\n\n    editor.selection.restoreSelection();\n    var $selectionElem = dom_core_1[\"default\"](editor.selection.getSelectionContainerElem());\n    if (!($selectionElem === null || $selectionElem === void 0 ? void 0 : $selectionElem.length)) return;\n    var $selectionAll = dom_core_1[\"default\"](editor.selection.getSelectionContainerElem()); // let dom:HTMLElement= $selectionElem.elems[0]\n\n    var dom = dom_core_1[\"default\"](editor.selection.getSelectionStartElem()).elems[0]; //获取元素的style\n\n    var style = '';\n    var styleList = []; //点击默认的时候删除line-height属性 并重新设置 style\n\n    var styleStr = ''; //选中多行操作\n\n    if ($selectionElem && editor.$textElem.equal($selectionElem)) {\n      var isIE_1 = util_1.UA.isIE(); //获取range 开头结束的dom在 祖父元素的下标\n\n      var indexStore_1 = [];\n      var arrayDom_a = [];\n      var arrayDom_b = []; //获取range 开头结束的dom\n\n      var StartElem_1 = dom_core_1[\"default\"](editor.selection.getSelectionStartElem());\n      var EndElem_1 = dom_core_1[\"default\"](editor.selection.getSelectionEndElem());\n      var childList = (_a = editor.selection.getRange()) === null || _a === void 0 ? void 0 : _a.commonAncestorContainer.childNodes;\n      arrayDom_a.push(this.getDom(StartElem_1.elems[0]));\n      childList === null || childList === void 0 ? void 0 : (0, _forEach[\"default\"])(childList).call(childList, function (item, index) {\n        if (item === _this.getDom(StartElem_1.elems[0])) {\n          indexStore_1.push(index);\n        }\n\n        if (item === _this.getDom(EndElem_1.elems[0])) {\n          indexStore_1.push(index);\n        }\n      }); //遍历 获取头尾之间的dom元素\n\n      var i = 0;\n      var d = void 0;\n      arrayDom_b.push(this.getDom(StartElem_1.elems[0]));\n\n      while (arrayDom_a[i] !== this.getDom(EndElem_1.elems[0])) {\n        d = dom_core_1[\"default\"](arrayDom_a[i].nextElementSibling).elems[0];\n\n        if ((0, _indexOf[\"default\"])(allowArray).call(allowArray, dom_core_1[\"default\"](d).getNodeName()) !== -1) {\n          arrayDom_b.push(d);\n          arrayDom_a.push(d);\n        } else {\n          arrayDom_a.push(d);\n        }\n\n        i++;\n      } //设置段落选取 全选\n\n\n      if (dom_core_1[\"default\"](arrayDom_a[0]).getNodeName() !== 'P') {\n        i = 0; //遍历集合得到第一个p标签的下标\n\n        for (var k = 0; k < arrayDom_a.length; k++) {\n          if (dom_core_1[\"default\"](arrayDom_a[k]).getNodeName() === 'P') {\n            i = k;\n            break;\n          }\n        } //i===0 说明选区中没有p段落\n\n\n        if (i === 0) {\n          return;\n        }\n\n        var _i = 0;\n\n        while (_i !== i) {\n          arrayDom_a.shift();\n          _i++;\n        }\n      } //设置替换的选区\n\n\n      this.setRange(arrayDom_a[0], arrayDom_a[arrayDom_a.length - 1]); //生成innerHtml html字符串\n\n      (0, _forEach[\"default\"])(arrayDom_a).call(arrayDom_a, function (item) {\n        style = item.getAttribute('style');\n        styleList = style ? style.split(';') : [];\n        styleStr = _this.styleProcessing(styleList);\n\n        if (dom_core_1[\"default\"](item).getNodeName() === 'P') {\n          //判断是否 点击默认\n          if (value) {\n            styleStr += value ? \"line-height:\" + value + \";\" : '';\n          }\n        }\n\n        if (!isIE_1) {\n          st += \"<\" + dom_core_1[\"default\"](item).getNodeName().toLowerCase() + \" style=\\\"\" + styleStr + \"\\\">\" + item.innerHTML + \"</\" + dom_core_1[\"default\"](item).getNodeName().toLowerCase() + \">\";\n        } else {\n          dom_core_1[\"default\"](item).css('line-height', value);\n        }\n      });\n\n      if (st) {\n        this.action(st, editor);\n      } //恢复已选择的选区\n\n\n      dom = $selectionAll.elems[0];\n      this.setRange(dom.children[indexStore_1[0]], dom.children[indexStore_1[1]]);\n      return;\n    } //遍历dom 获取祖父元素 直到contenteditable属性的div标签\n\n\n    dom = this.getDom(dom); //校验允许lineheight设置标签\n\n    if ((0, _indexOf[\"default\"])(allowArray).call(allowArray, dom_core_1[\"default\"](dom).getNodeName()) === -1) {\n      return;\n    }\n\n    style = dom.getAttribute('style');\n    styleList = style ? style.split(';') : []; //全选 dom下所有的内容\n\n    selection === null || selection === void 0 ? void 0 : selection.selectAllChildren(dom); //保存range\n\n    editor.selection.saveRange(); //判断是否存在value 默认 移除line-height\n\n    if (!value) {\n      if (style) {\n        styleStr = this.styleProcessing(styleList); //避免没有其它属性 只留下 ‘style’ 减少代码\n\n        if (styleStr === '') {\n          st = \"<\" + dom_core_1[\"default\"](dom).getNodeName().toLowerCase() + \">\" + dom.innerHTML + \"</\" + dom_core_1[\"default\"](dom).getNodeName().toLowerCase() + \">\";\n        } else {\n          st = \"<\" + dom_core_1[\"default\"](dom).getNodeName().toLowerCase() + \" style=\\\"\" + styleStr + \"\\\">\" + dom.innerHTML + \"</\" + dom_core_1[\"default\"](dom).getNodeName().toLowerCase() + \">\";\n        }\n\n        this.action(st, editor);\n      }\n\n      return;\n    }\n\n    if (style) {\n      //存在style 检索其它style属性\n      styleStr = this.styleProcessing(styleList) + (\"line-height:\" + value + \";\");\n    } else {\n      styleStr = \"line-height:\" + value + \";\";\n    }\n\n    st = \"<\" + dom_core_1[\"default\"](dom).getNodeName().toLowerCase() + \" style=\\\"\" + styleStr + \"\\\">\" + dom.innerHTML + \"</\" + dom_core_1[\"default\"](dom).getNodeName().toLowerCase() + \">\"; //防止BLOCKQUOTE叠加 or IE下导致P嵌套出现误删\n\n    if (dom_core_1[\"default\"](dom).getNodeName() === 'BLOCKQUOTE' || util_1.UA.isIE()) {\n      dom_core_1[\"default\"](dom).css('line-height', value);\n    } else {\n      this.action(st, editor);\n    }\n  };\n  /**\n   * 遍历dom 获取祖父元素 直到contenteditable属性的div标签\n   *\n   */\n\n\n  LineHeight.prototype.getDom = function (dom) {\n    var DOM = dom_core_1[\"default\"](dom).elems[0];\n\n    if (!DOM.parentNode) {\n      return DOM;\n    }\n\n    function getParentNode($node, editor) {\n      var $parent = dom_core_1[\"default\"]($node.parentNode);\n\n      if (editor.$textElem.equal($parent)) {\n        return $node;\n      } else {\n        return getParentNode($parent.elems[0], editor);\n      }\n    }\n\n    DOM = getParentNode(DOM, this.editor);\n    return DOM;\n  };\n  /**\n   * 执行 document.execCommand\n   *\n   */\n\n\n  LineHeight.prototype.action = function (html_str, editor) {\n    editor.cmd[\"do\"]('insertHTML', html_str);\n  };\n  /**\n   * style 处理\n   */\n\n\n  LineHeight.prototype.styleProcessing = function (styleList) {\n    var styleStr = '';\n    (0, _forEach[\"default\"])(styleList).call(styleList, function (item) {\n      item !== '' && (0, _indexOf[\"default\"])(item).call(item, 'line-height') === -1 ? styleStr = styleStr + item + ';' : '';\n    });\n    return styleStr;\n  };\n  /**\n   * 段落全选 比如：避免11变成111\n   */\n\n\n  LineHeight.prototype.setRange = function (startDom, endDom) {\n    var editor = this.editor;\n    var selection = window.getSelection ? window.getSelection() : document.getSelection(); //清除所有的选区\n\n    selection === null || selection === void 0 ? void 0 : selection.removeAllRanges();\n    var range = document.createRange();\n    var star = startDom;\n    var end = endDom;\n    range.setStart(star, 0);\n    range.setEnd(end, 1);\n    selection === null || selection === void 0 ? void 0 : selection.addRange(range); //保存设置好的选区\n\n    editor.selection.saveRange(); //清除所有的选区\n\n    selection === null || selection === void 0 ? void 0 : selection.removeAllRanges(); //恢复选区\n\n    editor.selection.restoreSelection();\n  };\n  /**\n   * 尝试修改菜单激活状态\n   */\n\n\n  LineHeight.prototype.tryChangeActive = function () {\n    var editor = this.editor;\n    var $selectionElem = editor.selection.getSelectionContainerElem();\n\n    if ($selectionElem && editor.$textElem.equal($selectionElem)) {\n      //避免选中多行设置\n      return;\n    }\n\n    var dom = dom_core_1[\"default\"](editor.selection.getSelectionStartElem()); // 有些情况下 dom 可能为空，比如编辑器初始化\n\n    if (dom.length === 0) return;\n    dom = this.getDom(dom.elems[0]);\n    var style = dom.getAttribute('style') ? dom.getAttribute('style') : ''; //判断当前标签是否具有line-height属性\n\n    if (style && (0, _indexOf[\"default\"])(style).call(style, 'line-height') !== -1) {\n      this.active();\n    } else {\n      this.unActive();\n    }\n  };\n\n  return LineHeight;\n}(DropListMenu_1[\"default\"]);\n\nexports[\"default\"] = LineHeight;\n\n/***/ }),\n/* 394 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _interopRequireDefault = __webpack_require__(0);\n\nvar _defineProperty = _interopRequireDefault(__webpack_require__(1));\n\nvar _forEach = _interopRequireDefault(__webpack_require__(4));\n\n(0, _defineProperty[\"default\"])(exports, \"__esModule\", {\n  value: true\n});\n\nvar tslib_1 = __webpack_require__(2);\n/**\n * @description 行高 菜单\n * @author lichunlin\n */\n\n\nvar dom_core_1 = tslib_1.__importDefault(__webpack_require__(3));\n\nvar lineHeightList = function () {\n  function lineHeightList(editor, list) {\n    var _this = this;\n\n    this.itemList = [{\n      $elem: dom_core_1[\"default\"](\"<span>\" + editor.i18next.t('默认') + \"</span>\"),\n      value: ''\n    }];\n    (0, _forEach[\"default\"])(list).call(list, function (item) {\n      _this.itemList.push({\n        $elem: dom_core_1[\"default\"](\"<span>\" + item + \"</span>\"),\n        value: item\n      });\n    });\n  }\n\n  lineHeightList.prototype.getItemList = function () {\n    return this.itemList;\n  };\n\n  return lineHeightList;\n}();\n\nexports[\"default\"] = lineHeightList;\n\n/***/ }),\n/* 395 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * @description 撤销\n * @author tonghan\n */\n\nvar _interopRequireDefault = __webpack_require__(0);\n\nvar _defineProperty = _interopRequireDefault(__webpack_require__(1));\n\n(0, _defineProperty[\"default\"])(exports, \"__esModule\", {\n  value: true\n});\n\nvar tslib_1 = __webpack_require__(2);\n\nvar dom_core_1 = tslib_1.__importDefault(__webpack_require__(3));\n\nvar BtnMenu_1 = tslib_1.__importDefault(__webpack_require__(23));\n\nvar Undo = function (_super) {\n  tslib_1.__extends(Undo, _super);\n\n  function Undo(editor) {\n    var _this = this;\n\n    var $elem = dom_core_1[\"default\"](\"<div class=\\\"w-e-menu\\\" data-title=\\\"\\u64A4\\u9500\\\">\\n                <i class=\\\"w-e-icon-undo\\\"></i>\\n            </div>\");\n    _this = _super.call(this, $elem, editor) || this;\n    return _this;\n  }\n  /**\n   * 点击事件\n   */\n\n\n  Undo.prototype.clickHandler = function () {\n    var editor = this.editor;\n    editor.history.revoke(); // 重新创建 range，是处理当初始化编辑器，API插入内容后撤销，range 不在编辑器内部的问题\n\n    var children = editor.$textElem.children();\n    if (!(children === null || children === void 0 ? void 0 : children.length)) return;\n    var $last = children.last();\n    editor.selection.createRangeByElem($last, false, true);\n    editor.selection.restoreSelection();\n  };\n  /**\n   * 尝试修改菜单激活状态\n   */\n\n\n  Undo.prototype.tryChangeActive = function () {\n    // 标准模式下才进行操作\n    if (!this.editor.isCompatibleMode) {\n      if (this.editor.history.size[0]) {\n        this.active();\n      } else {\n        this.unActive();\n      }\n    }\n  };\n\n  return Undo;\n}(BtnMenu_1[\"default\"]);\n\nexports[\"default\"] = Undo;\n\n/***/ }),\n/* 396 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * @description 重做\n * @author tonghan\n */\n\nvar _interopRequireDefault = __webpack_require__(0);\n\nvar _defineProperty = _interopRequireDefault(__webpack_require__(1));\n\n(0, _defineProperty[\"default\"])(exports, \"__esModule\", {\n  value: true\n});\n\nvar tslib_1 = __webpack_require__(2);\n\nvar dom_core_1 = tslib_1.__importDefault(__webpack_require__(3));\n\nvar BtnMenu_1 = tslib_1.__importDefault(__webpack_require__(23));\n\nvar Redo = function (_super) {\n  tslib_1.__extends(Redo, _super);\n\n  function Redo(editor) {\n    var _this = this;\n\n    var $elem = dom_core_1[\"default\"](\"<div class=\\\"w-e-menu\\\" data-title=\\\"\\u6062\\u590D\\\">\\n                <i class=\\\"w-e-icon-redo\\\"></i>\\n            </div>\");\n    _this = _super.call(this, $elem, editor) || this;\n    return _this;\n  }\n  /**\n   * 点击事件\n   */\n\n\n  Redo.prototype.clickHandler = function () {\n    var editor = this.editor;\n    editor.history.restore(); // 重新创建 range，是处理当初始化编辑器，API插入内容后撤销，range 不在编辑器内部的问题\n\n    var children = editor.$textElem.children();\n    if (!(children === null || children === void 0 ? void 0 : children.length)) return;\n    var $last = children.last();\n    editor.selection.createRangeByElem($last, false, true);\n    editor.selection.restoreSelection();\n  };\n  /**\n   * 尝试修改菜单激活状态\n   */\n\n\n  Redo.prototype.tryChangeActive = function () {\n    // 标准模式下才进行操作\n    if (!this.editor.isCompatibleMode) {\n      if (this.editor.history.size[1]) {\n        this.active();\n      } else {\n        this.unActive();\n      }\n    }\n  };\n\n  return Redo;\n}(BtnMenu_1[\"default\"]);\n\nexports[\"default\"] = Redo;\n\n/***/ }),\n/* 397 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * @description 创建table\n * @author lichunlin\n */\n\nvar _interopRequireDefault = __webpack_require__(0);\n\nvar _defineProperty = _interopRequireDefault(__webpack_require__(1));\n\n(0, _defineProperty[\"default\"])(exports, \"__esModule\", {\n  value: true\n});\n\nvar tslib_1 = __webpack_require__(2);\n\nvar PanelMenu_1 = tslib_1.__importDefault(__webpack_require__(36));\n\nvar dom_core_1 = tslib_1.__importDefault(__webpack_require__(3));\n\nvar create_panel_conf_1 = tslib_1.__importDefault(__webpack_require__(398));\n\nvar Panel_1 = tslib_1.__importDefault(__webpack_require__(33));\n\nvar index_1 = tslib_1.__importDefault(__webpack_require__(407));\n\nvar Table = function (_super) {\n  tslib_1.__extends(Table, _super);\n\n  function Table(editor) {\n    var _this = this;\n\n    var $elem = dom_core_1[\"default\"]('<div class=\"w-e-menu\" data-title=\"表格\"><i class=\"w-e-icon-table2\"></i></div>');\n    _this = _super.call(this, $elem, editor) || this; // 绑定事件\n\n    index_1[\"default\"](editor);\n    return _this;\n  }\n  /**\n   * 菜单点击事件\n   */\n\n\n  Table.prototype.clickHandler = function () {\n    this.createPanel();\n  };\n  /**\n   * 创建 panel\n   */\n\n\n  Table.prototype.createPanel = function () {\n    var conf = create_panel_conf_1[\"default\"](this.editor);\n    var panel = new Panel_1[\"default\"](this, conf);\n    panel.create();\n  };\n  /**\n   * 尝试修改菜单 active 状态\n   */\n\n\n  Table.prototype.tryChangeActive = function () {};\n\n  return Table;\n}(PanelMenu_1[\"default\"]);\n\nexports[\"default\"] = Table;\n\n/***/ }),\n/* 398 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * @description table 菜单 panel tab 配置\n * @author lichunlin\n */\n\nvar _interopRequireDefault = __webpack_require__(0);\n\nvar _defineProperty = _interopRequireDefault(__webpack_require__(1));\n\nvar _isInteger = _interopRequireDefault(__webpack_require__(399));\n\n(0, _defineProperty[\"default\"])(exports, \"__esModule\", {\n  value: true\n});\n\nvar tslib_1 = __webpack_require__(2);\n\nvar util_1 = __webpack_require__(6);\n\nvar dom_core_1 = tslib_1.__importDefault(__webpack_require__(3));\n\n__webpack_require__(404);\n\nvar create_table_1 = tslib_1.__importDefault(__webpack_require__(406));\n/**\n * 判断一个数值是否为正整数\n * @param { number } n 被验证的值\n */\n\n\nfunction isPositiveInteger(n) {\n  //是否为正整数\n  return n > 0 && (0, _isInteger[\"default\"])(n);\n}\n\nfunction default_1(editor) {\n  var createTable = new create_table_1[\"default\"](editor); // panel 中需要用到的id\n\n  var colId = util_1.getRandom('w-col-id');\n  var rowId = util_1.getRandom('w-row-id');\n  var insertBtnId = util_1.getRandom('btn-link');\n  var i18nPrefix = 'menus.panelMenus.table.';\n\n  var t = function t(text) {\n    return editor.i18next.t(text);\n  }; // tabs 配置 -----------------------------------------\n\n\n  var tabsConf = [{\n    title: t(i18nPrefix + \"\\u63D2\\u5165\\u8868\\u683C\"),\n    tpl: \"<div>\\n                    <div class=\\\"w-e-table\\\">\\n                        <span>\" + t('创建') + \"</span>\\n                        <input id=\\\"\" + rowId + \"\\\"  type=\\\"text\\\" class=\\\"w-e-table-input\\\" value=\\\"5\\\"/></td>\\n                        <span>\" + t(i18nPrefix + \"\\u884C\") + \"</span>\\n                        <input id=\\\"\" + colId + \"\\\" type=\\\"text\\\" class=\\\"w-e-table-input\\\" value=\\\"5\\\"/></td>\\n                        <span>\" + (t(i18nPrefix + \"\\u5217\") + t(i18nPrefix + \"\\u7684\") + t(i18nPrefix + \"\\u8868\\u683C\")) + \"</span>\\n                    </div>\\n                    <div class=\\\"w-e-button-container\\\">\\n                        <button type=\\\"button\\\" id=\\\"\" + insertBtnId + \"\\\" class=\\\"right\\\">\" + t('插入') + \"</button>\\n                    </div>\\n                </div>\",\n    events: [{\n      selector: '#' + insertBtnId,\n      type: 'click',\n      fn: function fn() {\n        var colValue = Number(dom_core_1[\"default\"]('#' + colId).val());\n        var rowValue = Number(dom_core_1[\"default\"]('#' + rowId).val()); //校验是否传值\n\n        if (isPositiveInteger(rowValue) && isPositiveInteger(colValue)) {\n          createTable.createAction(rowValue, colValue);\n          return true;\n        } else {\n          editor.config.customAlert('表格行列请输入正整数', 'warning');\n          return false;\n        } // 返回 true 表示函数执行结束之后关闭 panel\n\n      },\n      bindEnter: true\n    }]\n  }]; // tabs end\n  // 最终的配置 -----------------------------------------\n\n  var conf = {\n    width: 330,\n    height: 0,\n    tabs: []\n  };\n  conf.tabs.push(tabsConf[0]);\n  return conf;\n}\n\nexports[\"default\"] = default_1;\n\n/***/ }),\n/* 399 */\n/***/ (function(module, exports, __webpack_require__) {\n\nmodule.exports = __webpack_require__(400);\n\n/***/ }),\n/* 400 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar parent = __webpack_require__(401);\n\nmodule.exports = parent;\n\n\n/***/ }),\n/* 401 */\n/***/ (function(module, exports, __webpack_require__) {\n\n__webpack_require__(402);\nvar path = __webpack_require__(11);\n\nmodule.exports = path.Number.isInteger;\n\n\n/***/ }),\n/* 402 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar $ = __webpack_require__(5);\nvar isInteger = __webpack_require__(403);\n\n// `Number.isInteger` method\n// https://tc39.es/ecma262/#sec-number.isinteger\n$({ target: 'Number', stat: true }, {\n  isInteger: isInteger\n});\n\n\n/***/ }),\n/* 403 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar isObject = __webpack_require__(13);\n\nvar floor = Math.floor;\n\n// `Number.isInteger` method implementation\n// https://tc39.es/ecma262/#sec-number.isinteger\nmodule.exports = function isInteger(it) {\n  return !isObject(it) && isFinite(it) && floor(it) === it;\n};\n\n\n/***/ }),\n/* 404 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar api = __webpack_require__(21);\n            var content = __webpack_require__(405);\n\n            content = content.__esModule ? content.default : content;\n\n            if (typeof content === 'string') {\n              content = [[module.i, content, '']];\n            }\n\nvar options = {};\n\noptions.insert = \"head\";\noptions.singleton = false;\n\nvar update = api(content, options);\n\n\n\nmodule.exports = content.locals || {};\n\n/***/ }),\n/* 405 */\n/***/ (function(module, exports, __webpack_require__) {\n\n// Imports\nvar ___CSS_LOADER_API_IMPORT___ = __webpack_require__(22);\nexports = ___CSS_LOADER_API_IMPORT___(false);\n// Module\nexports.push([module.i, \".w-e-table {\\n  display: flex;\\n}\\n.w-e-table .w-e-table-input {\\n  width: 40px;\\n  text-align: center!important;\\n  margin: 0 5px;\\n}\\n\", \"\"]);\n// Exports\nmodule.exports = exports;\n\n\n/***/ }),\n/* 406 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * @description 创建tabel\n * @author lichunlin\n */\n\nvar _interopRequireDefault = __webpack_require__(0);\n\nvar _defineProperty = _interopRequireDefault(__webpack_require__(1));\n\n(0, _defineProperty[\"default\"])(exports, \"__esModule\", {\n  value: true\n});\n\nvar tslib_1 = __webpack_require__(2);\n\nvar const_1 = __webpack_require__(7);\n\nvar dom_core_1 = tslib_1.__importDefault(__webpack_require__(3));\n\nvar CreateTable = function () {\n  function CreateTable(editor) {\n    this.editor = editor;\n  }\n  /**\n   * 执行创建\n   * @param rowValue 行数\n   * @param colValue 列数\n   */\n\n\n  CreateTable.prototype.createAction = function (rowValue, colValue) {\n    var editor = this.editor; //不允许在有序列表中添加table\n\n    var $selectionElem = dom_core_1[\"default\"](editor.selection.getSelectionContainerElem());\n    var $ul = dom_core_1[\"default\"]($selectionElem.elems[0]).parentUntilEditor('UL', editor);\n    var $ol = dom_core_1[\"default\"]($selectionElem.elems[0]).parentUntilEditor('OL', editor);\n\n    if ($ul || $ol) {\n      return;\n    }\n\n    var tableDom = this.createTableHtml(rowValue, colValue);\n    editor.cmd[\"do\"]('insertHTML', tableDom);\n  };\n  /**\n   * 创建table、行、列\n   * @param rowValue 行数\n   * @param colValue 列数\n   */\n\n\n  CreateTable.prototype.createTableHtml = function (rowValue, colValue) {\n    var rowStr = '';\n    var colStr = '';\n\n    for (var i = 0; i < rowValue; i++) {\n      colStr = '';\n\n      for (var j = 0; j < colValue; j++) {\n        if (i === 0) {\n          colStr = colStr + '<th></th>';\n        } else {\n          colStr = colStr + '<td></td>';\n        }\n      }\n\n      rowStr = rowStr + '<tr>' + colStr + '</tr>';\n    }\n\n    var tableDom = \"<table border=\\\"0\\\" width=\\\"100%\\\" cellpadding=\\\"0\\\" cellspacing=\\\"0\\\"><tbody>\" + rowStr + (\"</tbody></table>\" + const_1.EMPTY_P);\n    return tableDom;\n  };\n\n  return CreateTable;\n}();\n\nexports[\"default\"] = CreateTable;\n\n/***/ }),\n/* 407 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * @description 绑定点击事件\n * @author lichunlin\n */\n\nvar _interopRequireDefault = __webpack_require__(0);\n\nvar _defineProperty = _interopRequireDefault(__webpack_require__(1));\n\n(0, _defineProperty[\"default\"])(exports, \"__esModule\", {\n  value: true\n});\n\nvar tslib_1 = __webpack_require__(2);\n\nvar tooltip_event_1 = tslib_1.__importDefault(__webpack_require__(408));\n\nvar table_event_1 = __webpack_require__(416);\n/**\n * 绑定事件\n * @param editor 编辑器实例\n */\n\n\nfunction bindEvent(editor) {\n  //Tooltip\n  tooltip_event_1[\"default\"](editor);\n  table_event_1.bindEventKeyboardEvent(editor);\n  table_event_1.bindClickEvent(editor);\n}\n\nexports[\"default\"] = bindEvent;\n\n/***/ }),\n/* 408 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * @description tooltip 事件\n * @author lichunlin\n */\n\nvar _interopRequireDefault = __webpack_require__(0);\n\nvar _defineProperty = _interopRequireDefault(__webpack_require__(1));\n\n(0, _defineProperty[\"default\"])(exports, \"__esModule\", {\n  value: true\n});\n\nvar tslib_1 = __webpack_require__(2);\n\nvar dom_core_1 = tslib_1.__importDefault(__webpack_require__(3));\n\nvar Tooltip_1 = tslib_1.__importDefault(__webpack_require__(37)); //操作事件\n\n\nvar operating_event_1 = tslib_1.__importDefault(__webpack_require__(409));\n\nvar getNode_1 = tslib_1.__importDefault(__webpack_require__(415));\n\nvar const_1 = __webpack_require__(7);\n/**\n * 生成 Tooltip 的显示隐藏函数\n */\n\n\nfunction createShowHideFn(editor) {\n  var tooltip;\n  /**\n   * 显示 tooltip\n   * @param  table元素\n   */\n\n  function showTableTooltip($node) {\n    var getnode = new getNode_1[\"default\"](editor);\n    var i18nPrefix = 'menus.panelMenus.table.';\n\n    var t = function t(text, prefix) {\n      if (prefix === void 0) {\n        prefix = i18nPrefix;\n      }\n\n      return editor.i18next.t(prefix + text);\n    };\n\n    var conf = [{\n      // $elem: $(\"<span class='w-e-icon-trash-o'></span>\"),\n      $elem: dom_core_1[\"default\"](\"<span>\" + t('删除表格') + \"</span>\"),\n      onClick: function onClick(editor, $node) {\n        // 选中img元素\n        editor.selection.createRangeByElem($node);\n        editor.selection.restoreSelection();\n        editor.cmd[\"do\"]('insertHTML', const_1.EMPTY_P); // 返回 true，表示执行完之后，隐藏 tooltip。否则不隐藏。\n\n        return true;\n      }\n    }, {\n      $elem: dom_core_1[\"default\"](\"<span>\" + t('添加行') + \"</span>\"),\n      onClick: function onClick(editor, $node) {\n        // 禁止多选操作\n        var isMore = isMoreRowAction(editor);\n\n        if (isMore) {\n          return true;\n        } //当前元素\n\n\n        var selectDom = dom_core_1[\"default\"](editor.selection.getSelectionStartElem()); //当前行\n\n        var $currentRow = getnode.getRowNode(selectDom.elems[0]);\n\n        if (!$currentRow) {\n          return true;\n        } //获取当前行的index\n\n\n        var index = Number(getnode.getCurrentRowIndex($node.elems[0], $currentRow)); //生成要替换的html\n\n        var htmlStr = getnode.getTableHtml($node.elems[0]); //生成新的table\n\n        var newdom = getnode.getTableHtml(operating_event_1[\"default\"].ProcessingRow(dom_core_1[\"default\"](htmlStr), index).elems[0]);\n        newdom = _isEmptyP($node, newdom); // 选中table\n\n        editor.selection.createRangeByElem($node);\n        editor.selection.restoreSelection();\n        editor.cmd[\"do\"]('insertHTML', newdom);\n        return true;\n      }\n    }, {\n      $elem: dom_core_1[\"default\"](\"<span>\" + t('删除行') + \"</span>\"),\n      onClick: function onClick(editor, $node) {\n        // 禁止多选操作\n        var isMore = isMoreRowAction(editor);\n\n        if (isMore) {\n          return true;\n        } //当前元素\n\n\n        var selectDom = dom_core_1[\"default\"](editor.selection.getSelectionStartElem()); //当前行\n\n        var $currentRow = getnode.getRowNode(selectDom.elems[0]);\n\n        if (!$currentRow) {\n          return true;\n        } //获取当前行的index\n\n\n        var index = Number(getnode.getCurrentRowIndex($node.elems[0], $currentRow)); //生成要替换的html\n\n        var htmlStr = getnode.getTableHtml($node.elems[0]); //获取新生成的table 判断是否是最后一行被删除 是 删除整个table\n\n        var trLength = operating_event_1[\"default\"].DeleteRow(dom_core_1[\"default\"](htmlStr), index).elems[0].children[0].children.length; //生成新的table\n\n        var newdom = ''; // 选中table\n\n        editor.selection.createRangeByElem($node);\n        editor.selection.restoreSelection();\n\n        if (trLength === 0) {\n          newdom = const_1.EMPTY_P;\n        } else {\n          newdom = getnode.getTableHtml(operating_event_1[\"default\"].DeleteRow(dom_core_1[\"default\"](htmlStr), index).elems[0]);\n        }\n\n        newdom = _isEmptyP($node, newdom);\n        editor.cmd[\"do\"]('insertHTML', newdom);\n        return true;\n      }\n    }, {\n      $elem: dom_core_1[\"default\"](\"<span>\" + t('添加列') + \"</span>\"),\n      onClick: function onClick(editor, $node) {\n        // 禁止多选操作\n        var isMore = isMoreRowAction(editor);\n\n        if (isMore) {\n          return true;\n        } //当前元素\n\n\n        var selectDom = dom_core_1[\"default\"](editor.selection.getSelectionStartElem()); //当前列的index\n\n        var index = getnode.getCurrentColIndex(selectDom.elems[0]); //生成要替换的html\n\n        var htmlStr = getnode.getTableHtml($node.elems[0]); //生成新的table\n\n        var newdom = getnode.getTableHtml(operating_event_1[\"default\"].ProcessingCol(dom_core_1[\"default\"](htmlStr), index).elems[0]);\n        newdom = _isEmptyP($node, newdom); // 选中table\n\n        editor.selection.createRangeByElem($node);\n        editor.selection.restoreSelection();\n        editor.cmd[\"do\"]('insertHTML', newdom);\n        return true;\n      }\n    }, {\n      $elem: dom_core_1[\"default\"](\"<span>\" + t('删除列') + \"</span>\"),\n      onClick: function onClick(editor, $node) {\n        // 禁止多选操作\n        var isMore = isMoreRowAction(editor);\n\n        if (isMore) {\n          return true;\n        } //当前元素\n\n\n        var selectDom = dom_core_1[\"default\"](editor.selection.getSelectionStartElem()); //当前列的index\n\n        var index = getnode.getCurrentColIndex(selectDom.elems[0]); //生成要替换的html\n\n        var htmlStr = getnode.getTableHtml($node.elems[0]); //获取新生成的table 判断是否是最后一列被删除 是 删除整个table\n\n        var newDom = operating_event_1[\"default\"].DeleteCol(dom_core_1[\"default\"](htmlStr), index); // 获取子节点的数量\n\n        var tdLength = newDom.elems[0].children[0].children[0].children.length; //生成新的table\n\n        var newdom = ''; // 选中table\n\n        editor.selection.createRangeByElem($node);\n        editor.selection.restoreSelection(); // 如果没有列了 则替换成空行\n\n        if (tdLength === 0) {\n          newdom = const_1.EMPTY_P;\n        } else {\n          newdom = getnode.getTableHtml(newDom.elems[0]);\n        }\n\n        newdom = _isEmptyP($node, newdom);\n        editor.cmd[\"do\"]('insertHTML', newdom);\n        return true;\n      }\n    }, {\n      $elem: dom_core_1[\"default\"](\"<span>\" + t('设置表头') + \"</span>\"),\n      onClick: function onClick(editor, $node) {\n        // 禁止多选操作\n        var isMore = isMoreRowAction(editor);\n\n        if (isMore) {\n          return true;\n        } //当前元素\n\n\n        var selectDom = dom_core_1[\"default\"](editor.selection.getSelectionStartElem()); //当前行\n\n        var $currentRow = getnode.getRowNode(selectDom.elems[0]);\n\n        if (!$currentRow) {\n          return true;\n        } //获取当前行的index\n\n\n        var index = Number(getnode.getCurrentRowIndex($node.elems[0], $currentRow));\n\n        if (index !== 0) {\n          //控制在table的第一行\n          index = 0;\n        } //生成要替换的html\n\n\n        var htmlStr = getnode.getTableHtml($node.elems[0]); //生成新的table\n\n        var newdom = getnode.getTableHtml(operating_event_1[\"default\"].setTheHeader(dom_core_1[\"default\"](htmlStr), index, 'th').elems[0]);\n        newdom = _isEmptyP($node, newdom); // 选中table\n\n        editor.selection.createRangeByElem($node);\n        editor.selection.restoreSelection();\n        editor.cmd[\"do\"]('insertHTML', newdom);\n        return true;\n      }\n    }, {\n      $elem: dom_core_1[\"default\"](\"<span>\" + t('取消表头') + \"</span>\"),\n      onClick: function onClick(editor, $node) {\n        //当前元素\n        var selectDom = dom_core_1[\"default\"](editor.selection.getSelectionStartElem()); //当前行\n\n        var $currentRow = getnode.getRowNode(selectDom.elems[0]);\n\n        if (!$currentRow) {\n          return true;\n        } //获取当前行的index\n\n\n        var index = Number(getnode.getCurrentRowIndex($node.elems[0], $currentRow));\n\n        if (index !== 0) {\n          //控制在table的第一行\n          index = 0;\n        } //生成要替换的html\n\n\n        var htmlStr = getnode.getTableHtml($node.elems[0]); //生成新的table\n\n        var newdom = getnode.getTableHtml(operating_event_1[\"default\"].setTheHeader(dom_core_1[\"default\"](htmlStr), index, 'td').elems[0]);\n        newdom = _isEmptyP($node, newdom); // 选中table\n\n        editor.selection.createRangeByElem($node);\n        editor.selection.restoreSelection();\n        editor.cmd[\"do\"]('insertHTML', newdom);\n        return true;\n      }\n    }];\n    tooltip = new Tooltip_1[\"default\"](editor, $node, conf);\n    tooltip.create();\n  }\n  /**\n   * 隐藏 tooltip\n   */\n\n\n  function hideTableTooltip() {\n    // 移除 tooltip\n    if (tooltip) {\n      tooltip.remove();\n      tooltip = null;\n    }\n  }\n\n  return {\n    showTableTooltip: showTableTooltip,\n    hideTableTooltip: hideTableTooltip\n  };\n}\n/**\n * 判断是否是多行\n */\n\n\nfunction isMoreRowAction(editor) {\n  var $startElem = editor.selection.getSelectionStartElem();\n  var $endElem = editor.selection.getSelectionEndElem();\n\n  if (($startElem === null || $startElem === void 0 ? void 0 : $startElem.elems[0]) !== ($endElem === null || $endElem === void 0 ? void 0 : $endElem.elems[0])) {\n    return true;\n  } else {\n    return false;\n  }\n}\n/**\n * 绑定 tooltip 事件\n * @param editor 编辑器实例\n */\n\n\nfunction bindTooltipEvent(editor) {\n  var _a = createShowHideFn(editor),\n      showTableTooltip = _a.showTableTooltip,\n      hideTableTooltip = _a.hideTableTooltip; // 点击table元素是，显示 tooltip\n\n\n  editor.txt.eventHooks.tableClickEvents.push(showTableTooltip); // 点击其他地方，或者滚动时，隐藏 tooltip\n\n  editor.txt.eventHooks.clickEvents.push(hideTableTooltip);\n  editor.txt.eventHooks.keyupEvents.push(hideTableTooltip);\n  editor.txt.eventHooks.toolbarClickEvents.push(hideTableTooltip);\n  editor.txt.eventHooks.menuClickEvents.push(hideTableTooltip);\n  editor.txt.eventHooks.textScrollEvents.push(hideTableTooltip);\n}\n\nexports[\"default\"] = bindTooltipEvent;\n/**\n * 判断表格的下一个节点是否是空行\n */\n\nfunction _isEmptyP($node, newdom) {\n  // 当表格的下一个兄弟节点是空行时，在 newdom 后添加 EMPTY_P\n  var nextNode = $node.elems[0].nextSibling;\n\n  if (!nextNode || nextNode.innerHTML === '<br>') {\n    newdom += \"\" + const_1.EMPTY_P;\n  }\n\n  return newdom;\n}\n\n/***/ }),\n/* 409 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _interopRequireDefault = __webpack_require__(0);\n\nvar _defineProperty = _interopRequireDefault(__webpack_require__(1));\n\nvar _slice = _interopRequireDefault(__webpack_require__(47));\n\nvar _splice = _interopRequireDefault(__webpack_require__(99));\n\nvar _forEach = _interopRequireDefault(__webpack_require__(4));\n\nvar _from = _interopRequireDefault(__webpack_require__(143));\n\n(0, _defineProperty[\"default\"])(exports, \"__esModule\", {\n  value: true\n});\n\nvar tslib_1 = __webpack_require__(2);\n\nvar dom_core_1 = tslib_1.__importDefault(__webpack_require__(3));\n/**\n * 处理新添加行\n * @param $node 整个table\n * @param _index 行的inde\n */\n\n\nfunction ProcessingRow($node, _index) {\n  //执行获取tbody节点\n  var $dom = generateDomAction($node); //取出所有的行\n\n  var domArray = (0, _slice[\"default\"])(Array.prototype).apply($dom.children); //列的数量\n\n  var childrenLength = domArray[0].children.length; //创建新tr\n\n  var tr = document.createElement('tr');\n\n  for (var i = 0; i < childrenLength; i++) {\n    var td = document.createElement('td');\n    tr.appendChild(td);\n  } //插入集合中\n\n\n  (0, _splice[\"default\"])(domArray).call(domArray, _index + 1, 0, tr); //移除、新增节点事件\n\n  removeAndInsertAction($dom, domArray);\n  return dom_core_1[\"default\"]($dom.parentNode);\n}\n/**\n * 处理新添加列\n * @param $node 整个table\n * @param _index 列的inde\n */\n\n\nfunction ProcessingCol($node, _index) {\n  //执行获取tbody节点\n  var $dom = generateDomAction($node); //取出所有的行\n\n  var domArray = (0, _slice[\"default\"])(Array.prototype).apply($dom.children);\n\n  var _loop_1 = function _loop_1(i) {\n    var _context;\n\n    var cArray = []; //取出所有的列\n\n    (0, _forEach[\"default\"])(_context = (0, _from[\"default\"])(domArray[i].children)).call(_context, function (item) {\n      cArray.push(item);\n    }); //移除行的旧的子节点\n\n    while (domArray[i].children.length !== 0) {\n      domArray[i].removeChild(domArray[i].children[0]);\n    } //列分th td\n\n\n    var td = dom_core_1[\"default\"](cArray[0]).getNodeName() !== 'TH' ? document.createElement('td') : document.createElement('th'); // let td = document.createElement('td')\n\n    (0, _splice[\"default\"])(cArray).call(cArray, _index + 1, 0, td); //插入新的子节点\n\n    for (var j = 0; j < cArray.length; j++) {\n      domArray[i].appendChild(cArray[j]);\n    }\n  }; //创建td\n\n\n  for (var i = 0; i < domArray.length; i++) {\n    _loop_1(i);\n  } //移除、新增节点事件\n\n\n  removeAndInsertAction($dom, domArray);\n  return dom_core_1[\"default\"]($dom.parentNode);\n}\n/**\n * 处理删除行\n * @param $node  整个table\n * @param _index  行的inde\n */\n\n\nfunction DeleteRow($node, _index) {\n  //执行获取tbody节点\n  var $dom = generateDomAction($node); //取出所有的行\n\n  var domArray = (0, _slice[\"default\"])(Array.prototype).apply($dom.children); //删除行\n\n  (0, _splice[\"default\"])(domArray).call(domArray, _index, 1); //移除、新增节点事件\n\n  removeAndInsertAction($dom, domArray);\n  return dom_core_1[\"default\"]($dom.parentNode);\n}\n/**\n * 处理删除列\n * @param $node\n * @param _index\n */\n\n\nfunction DeleteCol($node, _index) {\n  //执行获取tbody节点\n  var $dom = generateDomAction($node); //取出所有的行\n\n  var domArray = (0, _slice[\"default\"])(Array.prototype).apply($dom.children);\n\n  var _loop_2 = function _loop_2(i) {\n    var _context2;\n\n    var cArray = []; //取出所有的列\n\n    (0, _forEach[\"default\"])(_context2 = (0, _from[\"default\"])(domArray[i].children)).call(_context2, function (item) {\n      cArray.push(item);\n    }); //移除行的旧的子节点\n\n    while (domArray[i].children.length !== 0) {\n      domArray[i].removeChild(domArray[i].children[0]);\n    }\n\n    (0, _splice[\"default\"])(cArray).call(cArray, _index, 1); //插入新的子节点\n\n    for (var j = 0; j < cArray.length; j++) {\n      domArray[i].appendChild(cArray[j]);\n    }\n  }; //创建td\n\n\n  for (var i = 0; i < domArray.length; i++) {\n    _loop_2(i);\n  } //移除、新增节点事件\n\n\n  removeAndInsertAction($dom, domArray);\n  return dom_core_1[\"default\"]($dom.parentNode);\n}\n/**\n * 处理设置/取消表头\n * @param $node\n * @param _index\n * @type 替换的标签 th还是td\n */\n\n\nfunction setTheHeader($node, _index, type) {\n  // 执行获取tbody节点\n  var $dom = generateDomAction($node); // 取出所有的行\n\n  var domArray = (0, _slice[\"default\"])(Array.prototype).apply($dom.children); // 列的数量\n\n  var cols = domArray[_index].children; // 创建新tr\n\n  var tr = document.createElement('tr');\n\n  var _loop_3 = function _loop_3(i) {\n    var _context3;\n\n    // 根据type(td 或者 th)生成对应的el\n    var el = document.createElement(type);\n    var col = cols[i];\n    /**\n     * 没有使用children是因为谷歌纯文本内容children数组就为空，而火狐纯文本内容是“xxx<br>”使用children只能获取br\n     * 当然使用childNodes也涵盖支持我们表头使用表情，代码块等，不管是设置还是取消都会保留第一行\n     */\n\n    (0, _forEach[\"default\"])(_context3 = (0, _from[\"default\"])(col.childNodes)).call(_context3, function (item) {\n      el.appendChild(item);\n    });\n    tr.appendChild(el);\n  };\n\n  for (var i = 0; i < cols.length; i++) {\n    _loop_3(i);\n  } //插入集合中\n\n\n  (0, _splice[\"default\"])(domArray).call(domArray, _index, 1, tr); //移除、新增节点事件\n\n  removeAndInsertAction($dom, domArray);\n  return dom_core_1[\"default\"]($dom.parentNode);\n}\n/**\n * 封装移除、新增节点事件\n * @param $dom tbody节点\n * @param domArray  所有的行\n */\n\n\nfunction removeAndInsertAction($dom, domArray) {\n  //移除所有的旧的子节点\n  while ($dom.children.length !== 0) {\n    $dom.removeChild($dom.children[0]);\n  } //插入新的子节点\n\n\n  for (var i = 0; i < domArray.length; i++) {\n    $dom.appendChild(domArray[i]);\n  }\n}\n/**\n * 封装判断是否tbody节点\n * 粘贴的table 第一个节点是<colgroup> 最后的节点<tbody>\n * @param dom\n */\n\n\nfunction generateDomAction($node) {\n  var $dom = $node.elems[0].children[0];\n\n  if ($dom.nodeName === 'COLGROUP') {\n    $dom = $node.elems[0].children[$node.elems[0].children.length - 1];\n  }\n\n  return $dom;\n}\n\nexports[\"default\"] = {\n  ProcessingRow: ProcessingRow,\n  ProcessingCol: ProcessingCol,\n  DeleteRow: DeleteRow,\n  DeleteCol: DeleteCol,\n  setTheHeader: setTheHeader\n};\n\n/***/ }),\n/* 410 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar parent = __webpack_require__(411);\n\nmodule.exports = parent;\n\n\n/***/ }),\n/* 411 */\n/***/ (function(module, exports, __webpack_require__) {\n\n__webpack_require__(58);\n__webpack_require__(412);\nvar path = __webpack_require__(11);\n\nmodule.exports = path.Array.from;\n\n\n/***/ }),\n/* 412 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar $ = __webpack_require__(5);\nvar from = __webpack_require__(413);\nvar checkCorrectnessOfIteration = __webpack_require__(120);\n\nvar INCORRECT_ITERATION = !checkCorrectnessOfIteration(function (iterable) {\n  // eslint-disable-next-line es/no-array-from -- required for testing\n  Array.from(iterable);\n});\n\n// `Array.from` method\n// https://tc39.es/ecma262/#sec-array.from\n$({ target: 'Array', stat: true, forced: INCORRECT_ITERATION }, {\n  from: from\n});\n\n\n/***/ }),\n/* 413 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar bind = __webpack_require__(40);\nvar toObject = __webpack_require__(26);\nvar callWithSafeIterationClosing = __webpack_require__(414);\nvar isArrayIteratorMethod = __webpack_require__(112);\nvar toLength = __webpack_require__(35);\nvar createProperty = __webpack_require__(75);\nvar getIteratorMethod = __webpack_require__(113);\n\n// `Array.from` method implementation\n// https://tc39.es/ecma262/#sec-array.from\nmodule.exports = function from(arrayLike /* , mapfn = undefined, thisArg = undefined */) {\n  var O = toObject(arrayLike);\n  var C = typeof this == 'function' ? this : Array;\n  var argumentsLength = arguments.length;\n  var mapfn = argumentsLength > 1 ? arguments[1] : undefined;\n  var mapping = mapfn !== undefined;\n  var iteratorMethod = getIteratorMethod(O);\n  var index = 0;\n  var length, result, step, iterator, next, value;\n  if (mapping) mapfn = bind(mapfn, argumentsLength > 2 ? arguments[2] : undefined, 2);\n  // if the target is not iterable or it's an array with the default iterator - use a simple case\n  if (iteratorMethod != undefined && !(C == Array && isArrayIteratorMethod(iteratorMethod))) {\n    iterator = iteratorMethod.call(O);\n    next = iterator.next;\n    result = new C();\n    for (;!(step = next.call(iterator)).done; index++) {\n      value = mapping ? callWithSafeIterationClosing(iterator, mapfn, [step.value, index], true) : step.value;\n      createProperty(result, index, value);\n    }\n  } else {\n    length = toLength(O.length);\n    result = new C(length);\n    for (;length > index; index++) {\n      value = mapping ? mapfn(O[index], index) : O[index];\n      createProperty(result, index, value);\n    }\n  }\n  result.length = index;\n  return result;\n};\n\n\n/***/ }),\n/* 414 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar anObject = __webpack_require__(20);\nvar iteratorClose = __webpack_require__(114);\n\n// call something on iterator step with safe closing on error\nmodule.exports = function (iterator, fn, value, ENTRIES) {\n  try {\n    return ENTRIES ? fn(anObject(value)[0], value[1]) : fn(value);\n  } catch (error) {\n    iteratorClose(iterator);\n    throw error;\n  }\n};\n\n\n/***/ }),\n/* 415 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * @description 获取dom节点\n * @author lichunlin\n */\n\nvar _interopRequireDefault = __webpack_require__(0);\n\nvar _defineProperty = _interopRequireDefault(__webpack_require__(1));\n\nvar _forEach = _interopRequireDefault(__webpack_require__(4));\n\nvar _from = _interopRequireDefault(__webpack_require__(143));\n\n(0, _defineProperty[\"default\"])(exports, \"__esModule\", {\n  value: true\n});\n\nvar tslib_1 = __webpack_require__(2);\n\nvar dom_core_1 = tslib_1.__importDefault(__webpack_require__(3));\n\nvar getNode = function () {\n  function getNode(editor) {\n    this.editor = editor;\n  }\n  /**\n   * 获取焦点所在行\n   * @param $node 当前table\n   */\n\n\n  getNode.prototype.getRowNode = function ($node) {\n    var _a;\n\n    var DOM = dom_core_1[\"default\"]($node).elems[0];\n\n    if (!DOM.parentNode) {\n      return DOM;\n    }\n\n    DOM = (_a = dom_core_1[\"default\"](DOM).parentUntil('TR', DOM)) === null || _a === void 0 ? void 0 : _a.elems[0];\n    return DOM;\n  };\n  /**\n   * 获取当前行的下标\n   * @param $node 当前table\n   * @param $dmo 当前行节点\n   */\n\n\n  getNode.prototype.getCurrentRowIndex = function ($node, $dom) {\n    var _context;\n\n    var _index = 0;\n    var $nodeChild = $node.children[0]; //粘贴的table 最后一个节点才是tbody\n\n    if ($nodeChild.nodeName === 'COLGROUP') {\n      $nodeChild = $node.children[$node.children.length - 1];\n    }\n\n    (0, _forEach[\"default\"])(_context = (0, _from[\"default\"])($nodeChild.children)).call(_context, function (item, index) {\n      item === $dom ? _index = index : '';\n    });\n    return _index;\n  };\n  /**\n   * 获取当前列的下标\n   * @param $node 当前点击元素\n   */\n\n\n  getNode.prototype.getCurrentColIndex = function ($node) {\n    var _context2;\n\n    var _a; //当前行\n\n\n    var _index = 0; //获取当前列 td或th\n\n    var rowDom = dom_core_1[\"default\"]($node).getNodeName() === 'TD' || dom_core_1[\"default\"]($node).getNodeName() === 'TH' ? $node : (_a = dom_core_1[\"default\"]($node).parentUntil('TD', $node)) === null || _a === void 0 ? void 0 : _a.elems[0];\n    var colDom = dom_core_1[\"default\"](rowDom).parent();\n    (0, _forEach[\"default\"])(_context2 = (0, _from[\"default\"])(colDom.elems[0].children)).call(_context2, function (item, index) {\n      item === rowDom ? _index = index : '';\n    });\n    return _index;\n  };\n  /**\n   * 返回元素html字符串\n   * @param $node\n   */\n\n\n  getNode.prototype.getTableHtml = function ($node) {\n    var htmlStr = \"<table border=\\\"0\\\" width=\\\"100%\\\" cellpadding=\\\"0\\\" cellspacing=\\\"0\\\">\" + dom_core_1[\"default\"]($node).html() + \"</table>\";\n    return htmlStr;\n  };\n\n  return getNode;\n}();\n\nexports[\"default\"] = getNode;\n\n/***/ }),\n/* 416 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _interopRequireDefault = __webpack_require__(0);\n\nvar _defineProperty = _interopRequireDefault(__webpack_require__(1));\n\n(0, _defineProperty[\"default\"])(exports, \"__esModule\", {\n  value: true\n});\nexports.bindEventKeyboardEvent = exports.bindClickEvent = void 0;\n\nvar tslib_1 = __webpack_require__(2);\n\nvar dom_core_1 = tslib_1.__importDefault(__webpack_require__(3));\n/**\n * @description 是否是空行\n * @param topElem\n */\n\n\nfunction isEmptyLine(topElem) {\n  if (!topElem.length) {\n    return false;\n  }\n\n  var dom = topElem.elems[0];\n  return dom.nodeName === 'P' && dom.innerHTML === '<br>';\n}\n\nfunction bindClickEvent(editor) {\n  function handleTripleClick($dom, e) {\n    // 处理三击事件，此时选区可能离开table，修正回来\n    if (e.detail >= 3) {\n      var selection = window.getSelection();\n\n      if (selection) {\n        var focusNode = selection.focusNode,\n            anchorNode = selection.anchorNode;\n        var $anchorNode = dom_core_1[\"default\"](anchorNode === null || anchorNode === void 0 ? void 0 : anchorNode.parentElement); // 当focusNode离开了table\n\n        if (!$dom.isContain(dom_core_1[\"default\"](focusNode))) {\n          var $td = $anchorNode.elems[0].tagName === 'TD' ? $anchorNode : $anchorNode.parentUntilEditor('td', editor);\n\n          if ($td) {\n            var range = editor.selection.getRange();\n            range === null || range === void 0 ? void 0 : range.setEnd($td.elems[0], $td.elems[0].childNodes.length);\n            editor.selection.restoreSelection();\n          }\n        }\n      }\n    }\n  }\n\n  editor.txt.eventHooks.tableClickEvents.push(handleTripleClick);\n}\n\nexports.bindClickEvent = bindClickEvent;\n\nfunction bindEventKeyboardEvent(editor) {\n  var txt = editor.txt,\n      selection = editor.selection;\n  var keydownEvents = txt.eventHooks.keydownEvents;\n  keydownEvents.push(function (e) {\n    // 实时保存选区\n    editor.selection.saveRange();\n    var $selectionContainerElem = selection.getSelectionContainerElem();\n\n    if ($selectionContainerElem) {\n      var $topElem = $selectionContainerElem.getNodeTop(editor);\n      var $preElem = $topElem.length ? $topElem.prev().length ? $topElem.prev() : null : null; // 删除时，选区前面是table，且选区没有选中文本，阻止默认行为\n\n      if ($preElem && $preElem.getNodeName() === 'TABLE' && selection.isSelectionEmpty() && selection.getCursorPos() === 0 && e.keyCode === 8) {\n        var $nextElem = $topElem.next();\n        var hasNext = !!$nextElem.length;\n        /**\n         * 如果当前是空行，并且当前行下面还有内容，删除当前行\n         * 浏览器默认行为不会删除掉当前行的<br>标签\n         * 因此阻止默认行为，特殊处理\n         */\n\n        if (hasNext && isEmptyLine($topElem)) {\n          $topElem.remove();\n          editor.selection.setRangeToElem($nextElem.elems[0]);\n        }\n\n        e.preventDefault();\n      }\n    }\n  });\n}\n\nexports.bindEventKeyboardEvent = bindEventKeyboardEvent;\n\n/***/ }),\n/* 417 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * @description 代码 菜单\n * @author lkw\n */\n\nvar _interopRequireDefault = __webpack_require__(0);\n\nvar _defineProperty = _interopRequireDefault(__webpack_require__(1));\n\nvar _map = _interopRequireDefault(__webpack_require__(27));\n\n(0, _defineProperty[\"default\"])(exports, \"__esModule\", {\n  value: true\n});\nexports.formatCodeHtml = void 0;\n\nvar tslib_1 = __webpack_require__(2);\n\nvar PanelMenu_1 = tslib_1.__importDefault(__webpack_require__(36));\n\nvar dom_core_1 = tslib_1.__importDefault(__webpack_require__(3));\n\nvar util_1 = __webpack_require__(6);\n\nvar create_panel_conf_1 = tslib_1.__importDefault(__webpack_require__(418));\n\nvar is_active_1 = tslib_1.__importDefault(__webpack_require__(144));\n\nvar Panel_1 = tslib_1.__importDefault(__webpack_require__(33));\n\nvar index_1 = tslib_1.__importDefault(__webpack_require__(419));\n\nfunction formatCodeHtml(editor, html) {\n  if (!html) return html;\n  html = deleteHighlightCode(html);\n  html = formatEnterCode(html);\n  html = util_1.replaceSpecialSymbol(html);\n  return html; // 格式化换换所产生的code标签\n\n  function formatEnterCode(html) {\n    var preArr = html.match(/<pre[\\s|\\S]+?\\/pre>/g);\n    if (preArr === null) return html;\n    (0, _map[\"default\"])(preArr).call(preArr, function (item) {\n      //将连续的code标签换为\\n换行\n      html = html.replace(item, item.replace(/<\\/code><code>/g, '\\n').replace(/<br>/g, ''));\n    });\n    return html;\n  } // highlight格式化方法\n\n\n  function deleteHighlightCode(html) {\n    var _context;\n\n    // 获取所有hljs文本\n    var m = html.match(/<span\\sclass=\"hljs[\\s|\\S]+?\\/span>/gm); // 没有代码渲染文本则退出\n    // @ts-ignore\n\n    if (!m || !m.length) return html; // 获取替换文本\n\n    var r = (0, _map[\"default\"])(_context = util_1.deepClone(m)).call(_context, function (i) {\n      i = i.replace(/<span\\sclass=\"hljs[^>]+>/, '');\n      return i.replace(/<\\/span>/, '');\n    }); // @ts-ignore\n\n    for (var i = 0; i < m.length; i++) {\n      html = html.replace(m[i], r[i]);\n    }\n\n    return deleteHighlightCode(html);\n  }\n}\n\nexports.formatCodeHtml = formatCodeHtml;\n\nvar Code = function (_super) {\n  tslib_1.__extends(Code, _super);\n\n  function Code(editor) {\n    var _this = this;\n\n    var $elem = dom_core_1[\"default\"]('<div class=\"w-e-menu\" data-title=\"代码\"><i class=\"w-e-icon-terminal\"></i></div>');\n    _this = _super.call(this, $elem, editor) || this; // 绑定事件，如点击链接时，可以查看链接\n\n    index_1[\"default\"](editor);\n    return _this;\n  }\n  /**\n   * 插入行内代码\n   * @param text\n   * @return null\n   */\n\n\n  Code.prototype.insertLineCode = function (text) {\n    var editor = this.editor; // 行内代码处理\n\n    var $code = dom_core_1[\"default\"](\"<code>\" + text + \"</code>\");\n    editor.cmd[\"do\"]('insertElem', $code);\n    editor.selection.createRangeByElem($code, false);\n    editor.selection.restoreSelection();\n  };\n  /**\n   * 菜单点击事件\n   */\n\n\n  Code.prototype.clickHandler = function () {\n    var editor = this.editor;\n    var selectionText = editor.selection.getSelectionText();\n\n    if (this.isActive) {\n      return;\n    } else {\n      // 菜单未被激活，说明选区不在链接里\n      if (editor.selection.isSelectionEmpty()) {\n        // 选区是空的，未选中内容\n        this.createPanel('', '');\n      } else {\n        // 行内代码处理 选中了非代码内容\n        this.insertLineCode(selectionText);\n      }\n    }\n  };\n  /**\n   * 创建 panel\n   * @param text 代码文本\n   * @param languageType 代码类型\n   */\n\n\n  Code.prototype.createPanel = function (text, languageType) {\n    var conf = create_panel_conf_1[\"default\"](this.editor, text, languageType);\n    var panel = new Panel_1[\"default\"](this, conf);\n    panel.create();\n  };\n  /**\n   * 尝试修改菜单 active 状态\n   */\n\n\n  Code.prototype.tryChangeActive = function () {\n    var editor = this.editor;\n\n    if (is_active_1[\"default\"](editor)) {\n      this.active();\n    } else {\n      this.unActive();\n    }\n  };\n\n  return Code;\n}(PanelMenu_1[\"default\"]);\n\nexports[\"default\"] = Code;\n\n/***/ }),\n/* 418 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * @description code 菜单 panel tab 配置\n * @author lkw\n */\n\nvar _interopRequireDefault = __webpack_require__(0);\n\nvar _defineProperty = _interopRequireDefault(__webpack_require__(1));\n\nvar _map = _interopRequireDefault(__webpack_require__(27));\n\n(0, _defineProperty[\"default\"])(exports, \"__esModule\", {\n  value: true\n});\n\nvar tslib_1 = __webpack_require__(2);\n\nvar util_1 = __webpack_require__(6);\n\nvar dom_core_1 = tslib_1.__importDefault(__webpack_require__(3));\n\nvar is_active_1 = tslib_1.__importDefault(__webpack_require__(144));\n\nvar const_1 = __webpack_require__(7);\n\nfunction default_1(editor, text, languageType) {\n  var _context;\n\n  // panel 中需要用到的id\n  var inputIFrameId = util_1.getRandom('input-iframe');\n  var languageId = util_1.getRandom('select');\n  var btnOkId = util_1.getRandom('btn-ok');\n  /**\n   * 插入代码块\n   * @param text 文字\n   */\n\n  function insertCode(text) {\n    var _a; // 选区处于链接中，则选中整个菜单，再执行 insertHTML\n\n\n    var active = is_active_1[\"default\"](editor);\n\n    if (active) {\n      selectCodeElem();\n    }\n\n    var content = (_a = editor.selection.getSelectionStartElem()) === null || _a === void 0 ? void 0 : _a.elems[0].innerHTML;\n\n    if (content) {\n      editor.cmd[\"do\"]('insertHTML', const_1.EMPTY_P);\n    }\n\n    editor.cmd[\"do\"]('insertHTML', text);\n    var $code = editor.selection.getSelectionStartElem();\n    var $codeElem = $code === null || $code === void 0 ? void 0 : $code.getNodeTop(editor); // 通过dom操作添加换行标签\n\n    if (($codeElem === null || $codeElem === void 0 ? void 0 : $codeElem.getNextSibling().elems.length) === 0) {\n      // @ts-ignore\n      dom_core_1[\"default\"](const_1.EMPTY_P).insertAfter($codeElem);\n    }\n  }\n  /**\n   * 选中整个链接元素\n   */\n\n\n  function selectCodeElem() {\n    if (!is_active_1[\"default\"](editor)) return; // eslint-disable-next-line @typescript-eslint/no-unused-vars\n\n    var $selectedCode;\n    var $code = editor.selection.getSelectionStartElem();\n    var $codeElem = $code === null || $code === void 0 ? void 0 : $code.getNodeTop(editor);\n    if (!$codeElem) return;\n    editor.selection.createRangeByElem($codeElem);\n    editor.selection.restoreSelection();\n    $selectedCode = $codeElem; // 赋值给函数内全局变量\n  }\n\n  var t = function t(text) {\n    return editor.i18next.t(text);\n  }; // @ts-ignore\n\n\n  var conf = {\n    width: 500,\n    height: 0,\n    // panel 中可包含多个 tab\n    tabs: [{\n      // tab 的标题\n      title: t('menus.panelMenus.code.插入代码'),\n      // 模板\n      tpl: \"<div>\\n                        <select name=\\\"\\\" id=\\\"\" + languageId + \"\\\">\\n                            \" + (0, _map[\"default\"])(_context = editor.config.languageType).call(_context, function (language) {\n        return '<option ' + (languageType == language ? 'selected' : '') + ' value =\"' + language + '\">' + language + '</option>';\n      }) + \"\\n                        </select>\\n                        <textarea id=\\\"\" + inputIFrameId + \"\\\" type=\\\"text\\\" class=\\\"wang-code-textarea\\\" placeholder=\\\"\\\" style=\\\"height: 160px\\\">\" + text.replace(/&quot;/g, '\"') + \"</textarea>\\n                        <div class=\\\"w-e-button-container\\\">\\n                            <button type=\\\"button\\\" id=\\\"\" + btnOkId + \"\\\" class=\\\"right\\\">\" + (is_active_1[\"default\"](editor) ? t('修改') : t('插入')) + \"</button>\\n                        </div>\\n                    </div>\",\n      // 事件绑定\n      events: [// 插入链接\n      {\n        selector: '#' + btnOkId,\n        type: 'click',\n        fn: function fn() {\n          var formatCode, codeDom;\n          var $code = document.getElementById(inputIFrameId);\n          var $select = dom_core_1[\"default\"]('#' + languageId);\n          var languageType = $select.val(); // @ts-ignore\n\n          var code = $code.value; // 高亮渲染\n\n          if (editor.highlight) {\n            formatCode = editor.highlight.highlightAuto(code).value;\n          } else {\n            formatCode = \"<xmp>\" + code + \"</xmp>\";\n          } // 代码为空，则不插入\n\n\n          if (!code) return; //增加标签\n\n          if (is_active_1[\"default\"](editor)) {\n            return false;\n          } else {\n            //增加pre标签\n            codeDom = \"<pre><code class=\\\"\" + languageType + \"\\\">\" + formatCode + \"</code></pre>\"; // @ts-ignore\n\n            insertCode(codeDom);\n          } // 返回 true，表示该事件执行完之后，panel 要关闭。否则 panel 不会关闭\n\n\n          return true;\n        }\n      }]\n    } // tab end\n    ] // tabs end\n\n  };\n  return conf;\n}\n\nexports[\"default\"] = default_1;\n\n/***/ }),\n/* 419 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * @description 绑定链接元素的事件，入口\n * @author lkw\n */\n\nvar _interopRequireDefault = __webpack_require__(0);\n\nvar _defineProperty = _interopRequireDefault(__webpack_require__(1));\n\n(0, _defineProperty[\"default\"])(exports, \"__esModule\", {\n  value: true\n});\n\nvar tslib_1 = __webpack_require__(2);\n\nvar tooltip_event_1 = tslib_1.__importDefault(__webpack_require__(420));\n\nvar jump_code_block_down_1 = tslib_1.__importDefault(__webpack_require__(421));\n/**\n * 绑定事件\n * @param editor 编辑器实例\n */\n\n\nfunction bindEvent(editor) {\n  // tooltip 事件\n  tooltip_event_1[\"default\"](editor); // 代码块为最后内容的跳出处理\n\n  jump_code_block_down_1[\"default\"](editor);\n}\n\nexports[\"default\"] = bindEvent;\n\n/***/ }),\n/* 420 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * @description tooltip 事件\n * @author lkw\n */\n\nvar _interopRequireDefault = __webpack_require__(0);\n\nvar _defineProperty = _interopRequireDefault(__webpack_require__(1));\n\n(0, _defineProperty[\"default\"])(exports, \"__esModule\", {\n  value: true\n});\nexports.createShowHideFn = void 0;\n\nvar tslib_1 = __webpack_require__(2);\n\nvar dom_core_1 = tslib_1.__importDefault(__webpack_require__(3));\n\nvar Tooltip_1 = tslib_1.__importDefault(__webpack_require__(37));\n/**\n * 生成 Tooltip 的显示隐藏函数\n */\n\n\nfunction createShowHideFn(editor) {\n  var tooltip;\n  /**\n   * 显示 tooltip\n   * @param $code 链接元素\n   */\n\n  function showCodeTooltip($code) {\n    var i18nPrefix = 'menus.panelMenus.code.';\n\n    var t = function t(text, prefix) {\n      if (prefix === void 0) {\n        prefix = i18nPrefix;\n      }\n\n      return editor.i18next.t(prefix + text);\n    };\n\n    var conf = [{\n      $elem: dom_core_1[\"default\"](\"<span>\" + t('删除代码') + \"</span>\"),\n      onClick: function onClick(editor, $code) {\n        //dom操作删除\n        $code.remove(); // 返回 true，表示执行完之后，隐藏 tooltip。否则不隐藏。\n\n        return true;\n      }\n    }]; // 创建 tooltip\n\n    tooltip = new Tooltip_1[\"default\"](editor, $code, conf);\n    tooltip.create();\n  }\n  /**\n   * 隐藏 tooltip\n   */\n\n\n  function hideCodeTooltip() {\n    // 移除 tooltip\n    if (tooltip) {\n      tooltip.remove();\n      tooltip = null;\n    }\n  }\n\n  return {\n    showCodeTooltip: showCodeTooltip,\n    hideCodeTooltip: hideCodeTooltip\n  };\n}\n\nexports.createShowHideFn = createShowHideFn;\n/**\n * preEnterListener是为了统一浏览器 在pre标签内的enter行为而进行的监听\n * 目前并没有使用, 但是在未来处理与Firefox和ie的兼容性时需要用到 暂且放置\n * pre标签内的回车监听\n * @param e\n * @param editor\n */\n\n/* istanbul ignore next */\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\n\nfunction preEnterListener(e, editor) {\n  // 获取当前标签元素\n  var $selectionElem = editor.selection.getSelectionContainerElem(); // 获取当前节点最顶级标签元素\n\n  var $topElem = $selectionElem === null || $selectionElem === void 0 ? void 0 : $selectionElem.getNodeTop(editor); // 获取顶级节点节点名\n\n  var topNodeName = $topElem === null || $topElem === void 0 ? void 0 : $topElem.getNodeName(); // 非pre标签退出\n\n  if (topNodeName !== 'PRE') return; // 取消默认行为\n\n  e.preventDefault(); // 执行换行\n\n  editor.cmd[\"do\"]('insertHTML', '\\n\\r');\n}\n/**\n * 绑定 tooltip 事件\n * @param editor 编辑器实例\n */\n\n\nfunction bindTooltipEvent(editor) {\n  var _a = createShowHideFn(editor),\n      showCodeTooltip = _a.showCodeTooltip,\n      hideCodeTooltip = _a.hideCodeTooltip; // 点击代码元素时，显示 tooltip\n\n\n  editor.txt.eventHooks.codeClickEvents.push(showCodeTooltip); // 点击其他地方，或者滚动时，隐藏 tooltip\n\n  editor.txt.eventHooks.clickEvents.push(hideCodeTooltip);\n  editor.txt.eventHooks.toolbarClickEvents.push(hideCodeTooltip);\n  editor.txt.eventHooks.menuClickEvents.push(hideCodeTooltip);\n  editor.txt.eventHooks.textScrollEvents.push(hideCodeTooltip);\n}\n\nexports[\"default\"] = bindTooltipEvent;\n\n/***/ }),\n/* 421 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _interopRequireDefault = __webpack_require__(0);\n\nvar _defineProperty = _interopRequireDefault(__webpack_require__(1));\n\n(0, _defineProperty[\"default\"])(exports, \"__esModule\", {\n  value: true\n});\n\nvar tslib_1 = __webpack_require__(2);\n/**\n * @description 代码块为最后一块内容时往下跳出代码块\n * @author zhengwenjian\n */\n\n\nvar const_1 = __webpack_require__(7);\n\nvar dom_core_1 = tslib_1.__importDefault(__webpack_require__(3));\n/**\n * 在代码块最后一行 按方向下键跳出代码块的处理\n * @param editor 编辑器实例\n */\n\n\nfunction bindEventJumpCodeBlock(editor) {\n  var $textElem = editor.$textElem,\n      selection = editor.selection,\n      txt = editor.txt;\n  var keydownEvents = txt.eventHooks.keydownEvents;\n  keydownEvents.push(function (e) {\n    var _a; // 40 是键盘中的下方向键\n\n\n    if (e.keyCode !== 40) return;\n    var node = selection.getSelectionContainerElem();\n    var $lastNode = (_a = $textElem.children()) === null || _a === void 0 ? void 0 : _a.last();\n\n    if ((node === null || node === void 0 ? void 0 : node.elems[0].tagName) === 'XMP' && ($lastNode === null || $lastNode === void 0 ? void 0 : $lastNode.elems[0].tagName) === 'PRE') {\n      // 就是最后一块是代码块的情况插入空p标签并光标移至p\n      var $emptyP = dom_core_1[\"default\"](const_1.EMPTY_P);\n      $textElem.append($emptyP);\n    }\n  }); // fix: 修复代码块作为最后一个元素时，用户无法再进行输入的问题\n\n  keydownEvents.push(function (e) {\n    // 实时保存选区\n    editor.selection.saveRange();\n    var $selectionContainerElem = selection.getSelectionContainerElem();\n\n    if ($selectionContainerElem) {\n      var $topElem = $selectionContainerElem.getNodeTop(editor); // 获取选区所在节点的上一元素\n\n      var $preElem = $topElem === null || $topElem === void 0 ? void 0 : $topElem.prev(); // 判断该元素后面是否还存在元素\n      // 如果存在则允许删除\n\n      var $nextElem = $topElem === null || $topElem === void 0 ? void 0 : $topElem.getNextSibling();\n\n      if ($preElem.length && ($preElem === null || $preElem === void 0 ? void 0 : $preElem.getNodeName()) === 'PRE' && $nextElem.length === 0) {\n        // 光标处于选区开头\n        if (selection.getCursorPos() === 0) {\n          // 按下delete键时末尾追加空行\n          if (e.keyCode === 8) {\n            var $emptyP = dom_core_1[\"default\"](const_1.EMPTY_P);\n            $textElem.append($emptyP);\n          }\n        }\n      }\n    }\n  });\n}\n\nexports[\"default\"] = bindEventJumpCodeBlock;\n\n/***/ }),\n/* 422 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _interopRequireDefault = __webpack_require__(0);\n\nvar _defineProperty = _interopRequireDefault(__webpack_require__(1));\n\n(0, _defineProperty[\"default\"])(exports, \"__esModule\", {\n  value: true\n});\n\nvar tslib_1 = __webpack_require__(2);\n/**\n * @description 分割线\n * @author wangqiaoling\n */\n\n\nvar BtnMenu_1 = tslib_1.__importDefault(__webpack_require__(23));\n\nvar dom_core_1 = tslib_1.__importDefault(__webpack_require__(3));\n\nvar index_1 = tslib_1.__importDefault(__webpack_require__(423));\n\nvar util_1 = __webpack_require__(6);\n\nvar const_1 = __webpack_require__(7);\n\nvar splitLine = function (_super) {\n  tslib_1.__extends(splitLine, _super);\n\n  function splitLine(editor) {\n    var _this = this;\n\n    var $elem = dom_core_1[\"default\"]('<div class=\"w-e-menu\" data-title=\"分割线\"><i class=\"w-e-icon-split-line\"></i></div>');\n    _this = _super.call(this, $elem, editor) || this; // 绑定事件\n\n    index_1[\"default\"](editor);\n    return _this;\n  }\n  /**\n   * 菜单点击事件\n   */\n\n\n  splitLine.prototype.clickHandler = function () {\n    var editor = this.editor;\n    var range = editor.selection.getRange();\n    var $selectionElem = editor.selection.getSelectionContainerElem();\n    if (!($selectionElem === null || $selectionElem === void 0 ? void 0 : $selectionElem.length)) return;\n    var $DomElement = dom_core_1[\"default\"]($selectionElem.elems[0]);\n    var $tableDOM = $DomElement.parentUntil('TABLE', $selectionElem.elems[0]);\n    var $imgDOM = $DomElement.children(); // 禁止在代码块中添加分割线\n\n    if ($DomElement.getNodeName() === 'CODE') return; // 禁止在表格中添加分割线\n\n    if ($tableDOM && dom_core_1[\"default\"]($tableDOM.elems[0]).getNodeName() === 'TABLE') return; // 禁止在图片处添加分割线\n\n    if ($imgDOM && $imgDOM.length !== 0 && dom_core_1[\"default\"]($imgDOM.elems[0]).getNodeName() === 'IMG' && !(range === null || range === void 0 ? void 0 : range.collapsed) // 处理光标在 img 后面的情况\n    ) {\n      return;\n    }\n\n    this.createSplitLine();\n  };\n  /**\n   * 创建 splitLine\n   */\n\n\n  splitLine.prototype.createSplitLine = function () {\n    // 防止插入分割线时没有占位元素的尴尬\n    var splitLineDOM = \"<hr/>\" + const_1.EMPTY_P; // 火狐浏览器不需要br标签占位\n\n    if (util_1.UA.isFirefox) {\n      splitLineDOM = '<hr/><p></p>';\n    }\n\n    this.editor.cmd[\"do\"]('insertHTML', splitLineDOM);\n  };\n  /**\n   * 尝试修改菜单激活状态\n   */\n\n\n  splitLine.prototype.tryChangeActive = function () {};\n\n  return splitLine;\n}(BtnMenu_1[\"default\"]);\n\nexports[\"default\"] = splitLine;\n\n/***/ }),\n/* 423 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _interopRequireDefault = __webpack_require__(0);\n\nvar _defineProperty = _interopRequireDefault(__webpack_require__(1));\n\n(0, _defineProperty[\"default\"])(exports, \"__esModule\", {\n  value: true\n});\n\nvar tslib_1 = __webpack_require__(2);\n\nvar tooltip_event_1 = tslib_1.__importDefault(__webpack_require__(424));\n/**\n * 绑定事件\n * @param editor 编辑器实例\n */\n\n\nfunction bindEvent(editor) {\n  // 分割线的 tooltip 事件\n  tooltip_event_1[\"default\"](editor);\n}\n\nexports[\"default\"] = bindEvent;\n\n/***/ }),\n/* 424 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _interopRequireDefault = __webpack_require__(0);\n\nvar _defineProperty = _interopRequireDefault(__webpack_require__(1));\n\n(0, _defineProperty[\"default\"])(exports, \"__esModule\", {\n  value: true\n});\n\nvar tslib_1 = __webpack_require__(2);\n/**\n * @description tooltip 事件\n * @author wangqiaoling\n */\n\n\nvar dom_core_1 = tslib_1.__importDefault(__webpack_require__(3));\n\nvar Tooltip_1 = tslib_1.__importDefault(__webpack_require__(37));\n/**\n * 生成 Tooltip 的显示隐藏函数\n */\n\n\nfunction createShowHideFn(editor) {\n  var tooltip;\n  /**\n   * 显示分割线的 tooltip\n   * @param $splitLine 分割线元素\n   */\n\n  function showSplitLineTooltip($splitLine) {\n    // 定义 splitLine tooltip 配置\n    var conf = [{\n      $elem: dom_core_1[\"default\"](\"<span>\" + editor.i18next.t('menus.panelMenus.删除') + \"</span>\"),\n      onClick: function onClick(editor, $splitLine) {\n        // 选中 分割线 元素\n        editor.selection.createRangeByElem($splitLine);\n        editor.selection.restoreSelection();\n        editor.cmd[\"do\"]('delete'); // 返回 true，表示执行完之后，隐藏 tooltip。否则不隐藏。\n\n        return true;\n      }\n    }]; // 实例化 tooltip\n\n    tooltip = new Tooltip_1[\"default\"](editor, $splitLine, conf); // 创建 tooltip\n\n    tooltip.create();\n  }\n  /**\n   * 隐藏分割线的 tooltip\n   */\n\n\n  function hideSplitLineTooltip() {\n    if (tooltip) {\n      tooltip.remove();\n      tooltip = null;\n    }\n  }\n\n  return {\n    showSplitLineTooltip: showSplitLineTooltip,\n    hideSplitLineTooltip: hideSplitLineTooltip\n  };\n}\n\nfunction bindTooltipEvent(editor) {\n  var _a = createShowHideFn(editor),\n      showSplitLineTooltip = _a.showSplitLineTooltip,\n      hideSplitLineTooltip = _a.hideSplitLineTooltip; // 点击分割线时，显示 tooltip\n\n\n  editor.txt.eventHooks.splitLineEvents.push(showSplitLineTooltip); // 点击其他地方（工具栏、滚动、keyup）时，隐藏 tooltip\n\n  editor.txt.eventHooks.clickEvents.push(hideSplitLineTooltip);\n  editor.txt.eventHooks.keyupEvents.push(hideSplitLineTooltip);\n  editor.txt.eventHooks.toolbarClickEvents.push(hideSplitLineTooltip);\n  editor.txt.eventHooks.menuClickEvents.push(hideSplitLineTooltip);\n  editor.txt.eventHooks.textScrollEvents.push(hideSplitLineTooltip);\n}\n\nexports[\"default\"] = bindTooltipEvent;\n\n/***/ }),\n/* 425 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _interopRequireDefault = __webpack_require__(0);\n\nvar _defineProperty = _interopRequireDefault(__webpack_require__(1));\n\nvar _forEach = _interopRequireDefault(__webpack_require__(4));\n\n(0, _defineProperty[\"default\"])(exports, \"__esModule\", {\n  value: true\n});\n\nvar tslib_1 = __webpack_require__(2);\n\nvar dom_core_1 = tslib_1.__importDefault(__webpack_require__(3));\n\nvar BtnMenu_1 = tslib_1.__importDefault(__webpack_require__(23));\n\nvar util_1 = __webpack_require__(105);\n\nvar bind_event_1 = tslib_1.__importDefault(__webpack_require__(431));\n\nvar todo_1 = tslib_1.__importDefault(__webpack_require__(145));\n\nvar Todo = function (_super) {\n  tslib_1.__extends(Todo, _super);\n\n  function Todo(editor) {\n    var _this = this;\n\n    var $elem = dom_core_1[\"default\"](\"<div class=\\\"w-e-menu\\\" data-title=\\\"\\u5F85\\u529E\\u4E8B\\u9879\\\">\\n                    <i class=\\\"w-e-icon-checkbox-checked\\\"></i>\\n                </div>\");\n    _this = _super.call(this, $elem, editor) || this;\n    bind_event_1[\"default\"](editor);\n    return _this;\n  }\n  /**\n   * 点击事件\n   */\n\n\n  Todo.prototype.clickHandler = function () {\n    var editor = this.editor;\n\n    if (!util_1.isAllTodo(editor)) {\n      // 设置todolist\n      this.setTodo();\n    } else {\n      // 取消设置todolist\n      this.cancelTodo();\n      this.tryChangeActive();\n    }\n  };\n\n  Todo.prototype.tryChangeActive = function () {\n    if (util_1.isAllTodo(this.editor)) {\n      this.active();\n    } else {\n      this.unActive();\n    }\n  };\n  /**\n   * 设置todo\n   */\n\n\n  Todo.prototype.setTodo = function () {\n    var editor = this.editor;\n    var topNodeElem = editor.selection.getSelectionRangeTopNodes();\n    (0, _forEach[\"default\"])(topNodeElem).call(topNodeElem, function ($node) {\n      var _a;\n\n      var nodeName = $node === null || $node === void 0 ? void 0 : $node.getNodeName();\n\n      if (nodeName === 'P') {\n        var todo = todo_1[\"default\"]($node);\n        var todoNode = todo.getTodo();\n        var child = (_a = todoNode.children()) === null || _a === void 0 ? void 0 : _a.getNode();\n        todoNode.insertAfter($node);\n        editor.selection.moveCursor(child);\n        $node.remove();\n      }\n    });\n    this.tryChangeActive();\n  };\n  /**\n   * 取消设置todo\n   */\n\n\n  Todo.prototype.cancelTodo = function () {\n    var editor = this.editor;\n    var $topNodeElems = editor.selection.getSelectionRangeTopNodes();\n    (0, _forEach[\"default\"])($topNodeElems).call($topNodeElems, function ($topNodeElem) {\n      var _a, _b, _c;\n\n      var content = (_b = (_a = $topNodeElem.childNodes()) === null || _a === void 0 ? void 0 : _a.childNodes()) === null || _b === void 0 ? void 0 : _b.clone(true);\n      var $p = dom_core_1[\"default\"](\"<p></p>\");\n      $p.append(content);\n      $p.insertAfter($topNodeElem); // 移除input\n\n      (_c = $p.childNodes()) === null || _c === void 0 ? void 0 : _c.get(0).remove();\n      editor.selection.moveCursor($p.getNode());\n      $topNodeElem.remove();\n    });\n  };\n\n  return Todo;\n}(BtnMenu_1[\"default\"]);\n\nexports[\"default\"] = Todo;\n\n/***/ }),\n/* 426 */\n/***/ (function(module, exports, __webpack_require__) {\n\nmodule.exports = __webpack_require__(427);\n\n/***/ }),\n/* 427 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar parent = __webpack_require__(428);\n\nmodule.exports = parent;\n\n\n/***/ }),\n/* 428 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar every = __webpack_require__(429);\n\nvar ArrayPrototype = Array.prototype;\n\nmodule.exports = function (it) {\n  var own = it.every;\n  return it === ArrayPrototype || (it instanceof Array && own === ArrayPrototype.every) ? every : own;\n};\n\n\n/***/ }),\n/* 429 */\n/***/ (function(module, exports, __webpack_require__) {\n\n__webpack_require__(430);\nvar entryVirtual = __webpack_require__(14);\n\nmodule.exports = entryVirtual('Array').every;\n\n\n/***/ }),\n/* 430 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar $ = __webpack_require__(5);\nvar $every = __webpack_require__(31).every;\nvar arrayMethodIsStrict = __webpack_require__(73);\n\nvar STRICT_METHOD = arrayMethodIsStrict('every');\n\n// `Array.prototype.every` method\n// https://tc39.es/ecma262/#sec-array.prototype.every\n$({ target: 'Array', proto: true, forced: !STRICT_METHOD }, {\n  every: function every(callbackfn /* , thisArg */) {\n    return $every(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n  }\n});\n\n\n/***/ }),\n/* 431 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _interopRequireDefault = __webpack_require__(0);\n\nvar _defineProperty = _interopRequireDefault(__webpack_require__(1));\n\nvar _forEach = _interopRequireDefault(__webpack_require__(4));\n\n(0, _defineProperty[\"default\"])(exports, \"__esModule\", {\n  value: true\n});\n\nvar tslib_1 = __webpack_require__(2);\n\nvar dom_core_1 = tslib_1.__importDefault(__webpack_require__(3));\n\nvar util_1 = __webpack_require__(105);\n\nvar todo_1 = tslib_1.__importDefault(__webpack_require__(145));\n\nvar util_2 = __webpack_require__(105);\n\nvar const_1 = __webpack_require__(7);\n/**\n * todolist 内部逻辑\n * @param editor\n */\n\n\nfunction bindEvent(editor) {\n  /**\n   * todo的自定义回车事件\n   * @param e 事件属性\n   */\n  function todoEnter(e) {\n    var _a, _b; // 判断是否为todo节点\n\n\n    if (util_1.isAllTodo(editor)) {\n      e.preventDefault();\n      var selection = editor.selection;\n      var $topSelectElem = selection.getSelectionRangeTopNodes()[0];\n      var $li = (_a = $topSelectElem.childNodes()) === null || _a === void 0 ? void 0 : _a.get(0);\n      var selectionNode = (_b = window.getSelection()) === null || _b === void 0 ? void 0 : _b.anchorNode;\n      var range = selection.getRange();\n\n      if (!(range === null || range === void 0 ? void 0 : range.collapsed)) {\n        var rangeChildNodes = range === null || range === void 0 ? void 0 : range.commonAncestorContainer.childNodes;\n        var startContainer_1 = range === null || range === void 0 ? void 0 : range.startContainer;\n        var endContainer_1 = range === null || range === void 0 ? void 0 : range.endContainer;\n        var startPos = range === null || range === void 0 ? void 0 : range.startOffset;\n        var endPos = range === null || range === void 0 ? void 0 : range.endOffset;\n        var startElemIndex_1 = 0;\n        var endElemIndex_1 = 0;\n        var delList_1 = []; // 找出startContainer和endContainer在rangeChildNodes中的位置\n\n        rangeChildNodes === null || rangeChildNodes === void 0 ? void 0 : (0, _forEach[\"default\"])(rangeChildNodes).call(rangeChildNodes, function (v, i) {\n          if (v.contains(startContainer_1)) startElemIndex_1 = i;\n          if (v.contains(endContainer_1)) endElemIndex_1 = i;\n        }); // 删除两个容器间的内容\n\n        if (endElemIndex_1 - startElemIndex_1 > 1) {\n          rangeChildNodes === null || rangeChildNodes === void 0 ? void 0 : (0, _forEach[\"default\"])(rangeChildNodes).call(rangeChildNodes, function (v, i) {\n            if (i <= startElemIndex_1) return;\n            if (i >= endElemIndex_1) return;\n            delList_1.push(v);\n          });\n          (0, _forEach[\"default\"])(delList_1).call(delList_1, function (v) {\n            v.remove();\n          });\n        } // 删除两个容器里拖蓝的内容\n\n\n        util_2.dealTextNode(startContainer_1, startPos);\n        util_2.dealTextNode(endContainer_1, endPos, false);\n        editor.selection.moveCursor(endContainer_1, 0);\n      } // 回车时内容为空时，删去此行\n\n\n      if ($topSelectElem.text() === '') {\n        var $p = dom_core_1[\"default\"](const_1.EMPTY_P);\n        $p.insertAfter($topSelectElem);\n        selection.moveCursor($p.getNode());\n        $topSelectElem.remove();\n        return;\n      }\n\n      var pos = selection.getCursorPos();\n      var CursorNextNode = util_1.getCursorNextNode($li === null || $li === void 0 ? void 0 : $li.getNode(), selectionNode, pos);\n      var todo = todo_1[\"default\"](dom_core_1[\"default\"](CursorNextNode));\n      var $inputcontainer = todo.getInputContainer();\n      var todoLiElem = $inputcontainer.parent().getNode();\n      var $newTodo = todo.getTodo();\n      var contentSection = $inputcontainer.getNode().nextSibling; // 处理光标在最前面时回车input不显示的问题\n\n      if (($li === null || $li === void 0 ? void 0 : $li.text()) === '') {\n        $li === null || $li === void 0 ? void 0 : $li.append(dom_core_1[\"default\"](\"<br>\"));\n      }\n\n      $newTodo.insertAfter($topSelectElem); // 处理在google中光标在最后面的，input不显示的问题(必须插入之后移动光标)\n\n      if (!contentSection || (contentSection === null || contentSection === void 0 ? void 0 : contentSection.textContent) === '') {\n        // 防止多个br出现的情况\n        if ((contentSection === null || contentSection === void 0 ? void 0 : contentSection.nodeName) !== 'BR') {\n          var $br = dom_core_1[\"default\"](\"<br>\");\n          $br.insertAfter($inputcontainer);\n        }\n\n        selection.moveCursor(todoLiElem, 1);\n      } else {\n        selection.moveCursor(todoLiElem);\n      }\n    }\n  }\n  /**\n   * 自定义删除事件，用来处理光标在最前面删除input产生的问题\n   */\n\n\n  function delDown(e) {\n    var _a, _b;\n\n    if (util_1.isAllTodo(editor)) {\n      var selection = editor.selection;\n      var $topSelectElem = selection.getSelectionRangeTopNodes()[0];\n      var $li = (_a = $topSelectElem.childNodes()) === null || _a === void 0 ? void 0 : _a.getNode();\n      var $p = dom_core_1[\"default\"](\"<p></p>\");\n      var p_1 = $p.getNode();\n      var selectionNode = (_b = window.getSelection()) === null || _b === void 0 ? void 0 : _b.anchorNode;\n      var pos = selection.getCursorPos();\n      var prevNode = selectionNode.previousSibling; // 处理内容为空的情况\n\n      if ($topSelectElem.text() === '') {\n        e.preventDefault();\n        var $newP = dom_core_1[\"default\"](const_1.EMPTY_P);\n        $newP.insertAfter($topSelectElem);\n        $topSelectElem.remove();\n        selection.moveCursor($newP.getNode(), 0);\n        return;\n      } // 处理有内容时，光标在最前面的情况\n\n\n      if ((prevNode === null || prevNode === void 0 ? void 0 : prevNode.nodeName) === 'SPAN' && prevNode.childNodes[0].nodeName === 'INPUT' && pos === 0) {\n        var _context;\n\n        e.preventDefault();\n        $li === null || $li === void 0 ? void 0 : (0, _forEach[\"default\"])(_context = $li.childNodes).call(_context, function (v, index) {\n          if (index === 0) return;\n          p_1.appendChild(v.cloneNode(true));\n        });\n        $p.insertAfter($topSelectElem);\n        $topSelectElem.remove();\n      }\n    }\n  }\n  /**\n   * 自定义删除键up事件\n   */\n\n\n  function deleteUp() {\n    var selection = editor.selection;\n    var $topSelectElem = selection.getSelectionRangeTopNodes()[0];\n\n    if ($topSelectElem && util_2.isTodo($topSelectElem)) {\n      if ($topSelectElem.text() === '') {\n        dom_core_1[\"default\"](const_1.EMPTY_P).insertAfter($topSelectElem);\n        $topSelectElem.remove();\n      }\n    }\n  }\n  /**\n   * input 的点击事件（ input 默认不会产生 attribute 的改变 ）\n   * @param e 事件属性\n   */\n\n\n  function inputClick(e) {\n    if (e && e.target instanceof HTMLInputElement) {\n      if (e.target.type === 'checkbox') {\n        if (e.target.checked) {\n          e.target.setAttribute('checked', 'true');\n        } else {\n          e.target.removeAttribute('checked');\n        }\n      }\n    }\n  }\n\n  editor.txt.eventHooks.enterDownEvents.push(todoEnter);\n  editor.txt.eventHooks.deleteUpEvents.push(deleteUp);\n  editor.txt.eventHooks.deleteDownEvents.push(delDown);\n  editor.txt.eventHooks.clickEvents.push(inputClick);\n}\n\nexports[\"default\"] = bindEvent;\n\n/***/ }),\n/* 432 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * @description 初始化编辑器 DOM 结构\n * @author wangfupeng\n */\n\nvar _interopRequireDefault = __webpack_require__(0);\n\nvar _defineProperty = _interopRequireDefault(__webpack_require__(1));\n\n(0, _defineProperty[\"default\"])(exports, \"__esModule\", {\n  value: true\n});\nexports.selectorValidator = void 0;\n\nvar tslib_1 = __webpack_require__(2);\n\nvar dom_core_1 = tslib_1.__importDefault(__webpack_require__(3));\n\nvar util_1 = __webpack_require__(6);\n\nvar const_1 = __webpack_require__(7);\n\nvar text_1 = tslib_1.__importDefault(__webpack_require__(134));\n\nvar styleSettings = {\n  border: '1px solid #c9d8db',\n  toolbarBgColor: '#FFF',\n  toolbarBottomBorder: '1px solid #EEE'\n};\n\nfunction default_1(editor) {\n  var toolbarSelector = editor.toolbarSelector;\n  var $toolbarSelector = dom_core_1[\"default\"](toolbarSelector);\n  var textSelector = editor.textSelector;\n  var config = editor.config;\n  var height = config.height;\n  var i18next = editor.i18next;\n  var $toolbarElem = dom_core_1[\"default\"]('<div></div>');\n  var $textContainerElem = dom_core_1[\"default\"]('<div></div>');\n  var $textElem;\n  var $children;\n  var $subChildren = null;\n\n  if (textSelector == null) {\n    // 将编辑器区域原有的内容，暂存起来\n    $children = $toolbarSelector.children(); // 添加到 DOM 结构中\n\n    $toolbarSelector.append($toolbarElem).append($textContainerElem); // 自行创建的，需要配置默认的样式\n\n    $toolbarElem.css('background-color', styleSettings.toolbarBgColor).css('border', styleSettings.border).css('border-bottom', styleSettings.toolbarBottomBorder);\n    $textContainerElem.css('border', styleSettings.border).css('border-top', 'none').css('height', height + \"px\");\n  } else {\n    // toolbarSelector 和 textSelector 都有\n    $toolbarSelector.append($toolbarElem); // 菜单分离后，文本区域内容暂存\n\n    $subChildren = dom_core_1[\"default\"](textSelector).children();\n    dom_core_1[\"default\"](textSelector).append($textContainerElem); // 将编辑器区域原有的内容，暂存起来\n\n    $children = $textContainerElem.children();\n  } // 编辑区域\n\n\n  $textElem = dom_core_1[\"default\"]('<div></div>');\n  $textElem.attr('contenteditable', 'true').css('width', '100%').css('height', '100%'); // 添加 placeholder\n\n  var $placeholder;\n  var placeholder = editor.config.placeholder;\n\n  if (placeholder !== text_1[\"default\"].placeholder) {\n    $placeholder = dom_core_1[\"default\"](\"<div>\" + placeholder + \"</div>\");\n  } else {\n    $placeholder = dom_core_1[\"default\"](\"<div>\" + i18next.t(placeholder) + \"</div>\");\n  }\n\n  $placeholder.addClass('placeholder'); // 初始化编辑区域内容\n\n  if ($children && $children.length) {\n    $textElem.append($children); // 编辑器有默认值的时候隐藏placeholder\n\n    $placeholder.hide();\n  } else {\n    $textElem.append(dom_core_1[\"default\"](const_1.EMPTY_P)); // 新增一行，方便继续编辑\n  } // 菜单分离后，文本区域有标签的带入编辑器内\n\n\n  if ($subChildren && $subChildren.length) {\n    $textElem.append($subChildren); // 编辑器有默认值的时候隐藏placeholder\n\n    $placeholder.hide();\n  } // 编辑区域加入DOM\n\n\n  $textContainerElem.append($textElem); // 添加placeholder\n\n  $textContainerElem.append($placeholder); // 设置通用的 class\n\n  $toolbarElem.addClass('w-e-toolbar').css('z-index', editor.zIndex.get('toolbar'));\n  $textContainerElem.addClass('w-e-text-container');\n  $textContainerElem.css('z-index', editor.zIndex.get());\n  $textElem.addClass('w-e-text'); // 添加 ID\n\n  var toolbarElemId = util_1.getRandom('toolbar-elem');\n  $toolbarElem.attr('id', toolbarElemId);\n  var textElemId = util_1.getRandom('text-elem');\n  $textElem.attr('id', textElemId); // 判断编辑区与容器高度是否一致\n\n  var textContainerCliheight = $textContainerElem.getBoundingClientRect().height;\n  var textElemClientHeight = $textElem.getBoundingClientRect().height;\n\n  if (textContainerCliheight !== textElemClientHeight) {\n    $textElem.css('min-height', textContainerCliheight + 'px');\n  } // 记录属性\n\n\n  editor.$toolbarElem = $toolbarElem;\n  editor.$textContainerElem = $textContainerElem;\n  editor.$textElem = $textElem;\n  editor.toolbarElemId = toolbarElemId;\n  editor.textElemId = textElemId;\n}\n\nexports[\"default\"] = default_1;\n/**\n * 工具栏/文本区域 DOM selector 有效性验证\n * @param editor 编辑器实例\n */\n\nfunction selectorValidator(editor) {\n  var name = 'data-we-id';\n  var regexp = /^wangEditor-\\d+$/;\n  var textSelector = editor.textSelector,\n      toolbarSelector = editor.toolbarSelector;\n  var $el = {\n    bar: dom_core_1[\"default\"]('<div></div>'),\n    text: dom_core_1[\"default\"]('<div></div>')\n  };\n\n  if (toolbarSelector == null) {\n    throw new Error('错误：初始化编辑器时候未传入任何参数，请查阅文档');\n  } else {\n    $el.bar = dom_core_1[\"default\"](toolbarSelector);\n\n    if (!$el.bar.elems.length) {\n      throw new Error(\"\\u65E0\\u6548\\u7684\\u8282\\u70B9\\u9009\\u62E9\\u5668\\uFF1A\" + toolbarSelector);\n    }\n\n    if (regexp.test($el.bar.attr(name))) {\n      throw new Error('初始化节点已存在编辑器实例，无法重复创建编辑器');\n    }\n  }\n\n  if (textSelector) {\n    $el.text = dom_core_1[\"default\"](textSelector);\n\n    if (!$el.text.elems.length) {\n      throw new Error(\"\\u65E0\\u6548\\u7684\\u8282\\u70B9\\u9009\\u62E9\\u5668\\uFF1A\" + textSelector);\n    }\n\n    if (regexp.test($el.text.attr(name))) {\n      throw new Error('初始化节点已存在编辑器实例，无法重复创建编辑器');\n    }\n  } // 给节点做上标记\n\n\n  $el.bar.attr(name, editor.id);\n  $el.text.attr(name, editor.id); // 在编辑器销毁前取消标记\n\n  editor.beforeDestroy(function () {\n    $el.bar.removeAttr(name);\n    $el.text.removeAttr(name);\n  });\n}\n\nexports.selectorValidator = selectorValidator;\n\n/***/ }),\n/* 433 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * @description 初始化编辑器选区，将光标定位到文档末尾\n * @author wangfupeng\n */\n\nvar _interopRequireDefault = __webpack_require__(0);\n\nvar _defineProperty = _interopRequireDefault(__webpack_require__(1));\n\n(0, _defineProperty[\"default\"])(exports, \"__esModule\", {\n  value: true\n});\n\nvar tslib_1 = __webpack_require__(2);\n\nvar dom_core_1 = tslib_1.__importDefault(__webpack_require__(3));\n\nvar const_1 = __webpack_require__(7);\n/**\n * 初始化编辑器选区，将光标定位到文档末尾\n * @param editor 编辑器实例\n * @param newLine 是否新增一行\n */\n\n\nfunction initSelection(editor, newLine) {\n  var $textElem = editor.$textElem;\n  var $children = $textElem.children();\n\n  if (!$children || !$children.length) {\n    // 如果编辑器区域无内容，添加一个空行，重新设置选区\n    $textElem.append(dom_core_1[\"default\"](const_1.EMPTY_P));\n    initSelection(editor);\n    return;\n  }\n\n  var $last = $children.last();\n\n  if (newLine) {\n    // 新增一个空行\n    var html = $last.html().toLowerCase();\n    var nodeName = $last.getNodeName();\n\n    if (html !== '<br>' && html !== '<br/>' || nodeName !== 'P') {\n      // 最后一个元素不是 空标签，添加一个空行，重新设置选区\n      $textElem.append(dom_core_1[\"default\"](const_1.EMPTY_P));\n      initSelection(editor);\n      return;\n    }\n  }\n\n  editor.selection.createRangeByElem($last, false, true);\n\n  if (editor.config.focus) {\n    editor.selection.restoreSelection();\n  } else {\n    // 防止focus=false受其他因素影响\n    editor.selection.clearWindowSelectionRange();\n  }\n}\n\nexports[\"default\"] = initSelection;\n\n/***/ }),\n/* 434 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * @description 绑定编辑器事件 change blur focus\n * @author wangfupeng\n */\n\nvar _interopRequireDefault = __webpack_require__(0);\n\nvar _defineProperty = _interopRequireDefault(__webpack_require__(1));\n\nvar _forEach = _interopRequireDefault(__webpack_require__(4));\n\n(0, _defineProperty[\"default\"])(exports, \"__esModule\", {\n  value: true\n});\n\nvar tslib_1 = __webpack_require__(2);\n\nvar dom_core_1 = tslib_1.__importDefault(__webpack_require__(3));\n\nfunction bindEvent(editor) {\n  // 绑定 change 事件\n  _bindChange(editor); // 绑定 focus blur 事件\n\n\n  _bindFocusAndBlur(editor); // 绑定 input 输入\n\n\n  _bindInput(editor);\n}\n/**\n * 绑定 change 事件\n * @param editor 编辑器实例\n */\n\n\nfunction _bindChange(editor) {\n  editor.txt.eventHooks.changeEvents.push(function () {\n    var onchange = editor.config.onchange;\n\n    if (onchange) {\n      var html = editor.txt.html() || ''; // onchange触发时，是focus状态，详见https://github.com/wangeditor-team/wangEditor/issues/3034\n\n      editor.isFocus = true;\n      onchange(html);\n    }\n\n    editor.txt.togglePlaceholder();\n  });\n}\n/**\n * 绑定 focus blur 事件\n * @param editor 编辑器实例\n */\n\n\nfunction _bindFocusAndBlur(editor) {\n  // 当前编辑器是否是焦点状态\n  editor.isFocus = false;\n\n  function listener(e) {\n    var target = e.target;\n    var $target = dom_core_1[\"default\"](target);\n    var $textElem = editor.$textElem;\n    var $toolbarElem = editor.$toolbarElem; //判断当前点击元素是否在编辑器内\n\n    var isChild = $textElem.isContain($target); //判断当前点击元素是否为工具栏\n\n    var isToolbar = $toolbarElem.isContain($target);\n    var isMenu = $toolbarElem.elems[0] == e.target ? true : false;\n\n    if (!isChild) {\n      // 若为选择工具栏中的功能，则不视为成 blur 操作\n      if (isToolbar && !isMenu || !editor.isFocus) {\n        return;\n      }\n\n      _blurHandler(editor);\n\n      editor.isFocus = false;\n    } else {\n      if (!editor.isFocus) {\n        _focusHandler(editor);\n      }\n\n      editor.isFocus = true;\n    }\n  } // fix: 增加判断条件，防止当用户设置isFocus=false时，初始化完成后点击其他元素依旧会触发blur事件的问题\n\n\n  if (document.activeElement === editor.$textElem.elems[0] && editor.config.focus) {\n    _focusHandler(editor);\n\n    editor.isFocus = true;\n  } // 绑定监听事件\n\n\n  dom_core_1[\"default\"](document).on('click', listener); // 全局事件在编辑器实例销毁的时候进行解绑\n\n  editor.beforeDestroy(function () {\n    dom_core_1[\"default\"](document).off('click', listener);\n  });\n}\n/**\n * 绑定 input 事件\n * @param editor 编辑器实例\n */\n\n\nfunction _bindInput(editor) {\n  // 绑定中文输入\n  editor.$textElem.on('compositionstart', function () {\n    editor.isComposing = true;\n    editor.txt.togglePlaceholder();\n  }).on('compositionend', function () {\n    editor.isComposing = false;\n    editor.txt.togglePlaceholder();\n  });\n}\n/**\n * blur 事件\n * @param editor 编辑器实例\n */\n\n\nfunction _blurHandler(editor) {\n  var _context;\n\n  var config = editor.config;\n  var onblur = config.onblur;\n  var currentHtml = editor.txt.html() || '';\n  (0, _forEach[\"default\"])(_context = editor.txt.eventHooks.onBlurEvents).call(_context, function (fn) {\n    return fn();\n  });\n  onblur(currentHtml);\n}\n/**\n * focus 事件\n * @param editor 编辑器实例\n */\n\n\nfunction _focusHandler(editor) {\n  var config = editor.config;\n  var onfocus = config.onfocus;\n  var currentHtml = editor.txt.html() || '';\n  onfocus(currentHtml);\n}\n\nexports[\"default\"] = bindEvent;\n\n/***/ }),\n/* 435 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * @description 国际化 初始化\n * @author tonghan\n * i18next 是使用 JavaScript 编写的国际化框架\n * i18next 提供了标准的i18n功能，例如（复数，上下文，插值，格式）等\n * i18next 文档地址： https://www.i18next.com/overview/getting-started\n */\n\nvar _interopRequireDefault = __webpack_require__(0);\n\nvar _defineProperty = _interopRequireDefault(__webpack_require__(1));\n\n(0, _defineProperty[\"default\"])(exports, \"__esModule\", {\n  value: true\n});\n\nfunction i18nextInit(editor) {\n  var _a = editor.config,\n      lang = _a.lang,\n      languages = _a.languages;\n\n  if (editor.i18next != null) {\n    try {\n      editor.i18next.init({\n        ns: 'wangEditor',\n        lng: lang,\n        defaultNS: 'wangEditor',\n        resources: languages\n      });\n    } catch (error) {\n      throw new Error('i18next:' + error);\n    }\n\n    return;\n  } // 没有引入 i18next 的替代品\n\n\n  editor.i18next = {\n    t: function t(str) {\n      var strArr = str.split('.');\n      return strArr[strArr.length - 1];\n    }\n  };\n}\n\nexports[\"default\"] = i18nextInit;\n\n/***/ }),\n/* 436 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * @description 全屏功能\n * @author xiaokyo\n */\n\nvar _interopRequireDefault = __webpack_require__(0);\n\nvar _defineProperty = _interopRequireDefault(__webpack_require__(1));\n\nvar _find = _interopRequireDefault(__webpack_require__(32));\n\n(0, _defineProperty[\"default\"])(exports, \"__esModule\", {\n  value: true\n});\nexports.setUnFullScreen = exports.setFullScreen = void 0;\n\nvar tslib_1 = __webpack_require__(2);\n\nvar dom_core_1 = tslib_1.__importDefault(__webpack_require__(3));\n\n__webpack_require__(437);\n\nvar iconFullScreenText = 'w-e-icon-fullscreen'; // 全屏icon class\n\nvar iconExitFullScreenText = 'w-e-icon-fullscreen_exit'; // 退出全屏icon class\n\nvar classfullScreenEditor = 'w-e-full-screen-editor'; // 全屏添加至编辑器的class\n\n/**\n * 设置全屏\n * @param editor 编辑器实例\n */\n\nvar setFullScreen = function setFullScreen(editor) {\n  var $editorParent = dom_core_1[\"default\"](editor.toolbarSelector);\n  var $textContainerElem = editor.$textContainerElem;\n  var $toolbarElem = editor.$toolbarElem;\n  var $iconElem = (0, _find[\"default\"])($toolbarElem).call($toolbarElem, \"i.\" + iconFullScreenText);\n  var config = editor.config;\n  $iconElem.removeClass(iconFullScreenText);\n  $iconElem.addClass(iconExitFullScreenText);\n  $editorParent.addClass(classfullScreenEditor);\n  $editorParent.css('z-index', config.zIndexFullScreen);\n  var bar = $toolbarElem.getBoundingClientRect();\n  $textContainerElem.css('height', \"calc(100% - \" + bar.height + \"px)\");\n};\n\nexports.setFullScreen = setFullScreen;\n/**\n * 取消全屏\n * @param editor 编辑器实例\n */\n\nvar setUnFullScreen = function setUnFullScreen(editor) {\n  var $editorParent = dom_core_1[\"default\"](editor.toolbarSelector);\n  var $textContainerElem = editor.$textContainerElem;\n  var $toolbarElem = editor.$toolbarElem;\n  var $iconElem = (0, _find[\"default\"])($toolbarElem).call($toolbarElem, \"i.\" + iconExitFullScreenText);\n  var config = editor.config;\n  $iconElem.removeClass(iconExitFullScreenText);\n  $iconElem.addClass(iconFullScreenText);\n  $editorParent.removeClass(classfullScreenEditor);\n  $editorParent.css('z-index', 'auto');\n  $textContainerElem.css('height', config.height + 'px');\n};\n\nexports.setUnFullScreen = setUnFullScreen;\n/**\n * 初始化全屏功能\n * @param editor 编辑器实例\n */\n\nvar initFullScreen = function initFullScreen(editor) {\n  // 当textSelector有值的时候，也就是编辑器是工具栏和编辑区域分离的情况， 则不生成全屏功能按钮\n  if (editor.textSelector) return;\n  if (!editor.config.showFullScreen) return;\n  var $toolbarElem = editor.$toolbarElem;\n  var $elem = dom_core_1[\"default\"](\"<div class=\\\"w-e-menu\\\" data-title=\\\"\\u5168\\u5C4F\\\">\\n            <i class=\\\"\" + iconFullScreenText + \"\\\"></i>\\n        </div>\");\n  $elem.on('click', function (e) {\n    var _context;\n\n    var $elemIcon = (0, _find[\"default\"])(_context = dom_core_1[\"default\"](e.currentTarget)).call(_context, 'i');\n\n    if ($elemIcon.hasClass(iconFullScreenText)) {\n      $elem.attr('data-title', '取消全屏');\n      exports.setFullScreen(editor);\n    } else {\n      $elem.attr('data-title', '全屏');\n      exports.setUnFullScreen(editor);\n    }\n  });\n  $toolbarElem.append($elem);\n};\n\nexports[\"default\"] = initFullScreen;\n\n/***/ }),\n/* 437 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar api = __webpack_require__(21);\n            var content = __webpack_require__(438);\n\n            content = content.__esModule ? content.default : content;\n\n            if (typeof content === 'string') {\n              content = [[module.i, content, '']];\n            }\n\nvar options = {};\n\noptions.insert = \"head\";\noptions.singleton = false;\n\nvar update = api(content, options);\n\n\n\nmodule.exports = content.locals || {};\n\n/***/ }),\n/* 438 */\n/***/ (function(module, exports, __webpack_require__) {\n\n// Imports\nvar ___CSS_LOADER_API_IMPORT___ = __webpack_require__(22);\nexports = ___CSS_LOADER_API_IMPORT___(false);\n// Module\nexports.push([module.i, \".w-e-full-screen-editor {\\n  position: fixed;\\n  width: 100%!important;\\n  height: 100%!important;\\n  left: 0;\\n  top: 0;\\n}\\n\", \"\"]);\n// Exports\nmodule.exports = exports;\n\n\n/***/ }),\n/* 439 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * @description 滚动到指定锚点\n * @author zhengwenjian\n */\n\nvar _interopRequireDefault = __webpack_require__(0);\n\nvar _defineProperty = _interopRequireDefault(__webpack_require__(1));\n\nvar _find = _interopRequireDefault(__webpack_require__(32));\n\n(0, _defineProperty[\"default\"])(exports, \"__esModule\", {\n  value: true\n});\n/**\n * 编辑器滚动到指定锚点\n * @param editor 编辑器实例\n * @param id 标题锚点id\n */\n\nvar scrollToHead = function scrollToHead(editor, id) {\n  var _context;\n\n  var $textElem = editor.isEnable ? editor.$textElem : (0, _find[\"default\"])(_context = editor.$textContainerElem).call(_context, '.w-e-content-mantle');\n  var $targetHead = (0, _find[\"default\"])($textElem).call($textElem, \"[id='\" + id + \"']\");\n  var targetTop = $targetHead.getOffsetData().top;\n  $textElem.scrollTop(targetTop);\n};\n\nexports[\"default\"] = scrollToHead;\n\n/***/ }),\n/* 440 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _interopRequireDefault = __webpack_require__(0);\n\nvar _defineProperty = _interopRequireDefault(__webpack_require__(1));\n\n(0, _defineProperty[\"default\"])(exports, \"__esModule\", {\n  value: true\n});\n\nvar tslib_1 = __webpack_require__(2);\n\nvar style_1 = tslib_1.__importDefault(__webpack_require__(133));\n\nvar tier = {\n  menu: 2,\n  panel: 2,\n  toolbar: 1,\n  tooltip: 1,\n  textContainer: 1 // 编辑区域\n\n};\n\nvar ZIndex = function () {\n  function ZIndex() {\n    // 层级参数\n    this.tier = tier; // 默认值\n\n    this.baseZIndex = style_1[\"default\"].zIndex;\n  } // 获取 tierName 对应的 z-index 的值。如果 tierName 未定义则返回默认的 z-index 值\n\n\n  ZIndex.prototype.get = function (tierName) {\n    if (tierName && this.tier[tierName]) {\n      return this.baseZIndex + this.tier[tierName];\n    }\n\n    return this.baseZIndex;\n  }; // 初始化\n\n\n  ZIndex.prototype.init = function (editor) {\n    if (this.baseZIndex == style_1[\"default\"].zIndex) {\n      this.baseZIndex = editor.config.zIndex;\n    }\n  };\n\n  return ZIndex;\n}();\n\nexports[\"default\"] = ZIndex;\n\n/***/ }),\n/* 441 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * @description 编辑器 change 事件\n * @author fangzhicong\n */\n\nvar _interopRequireDefault = __webpack_require__(0);\n\nvar _defineProperty = _interopRequireDefault(__webpack_require__(1));\n\nvar _filter = _interopRequireDefault(__webpack_require__(76));\n\nvar _forEach = _interopRequireDefault(__webpack_require__(4));\n\n(0, _defineProperty[\"default\"])(exports, \"__esModule\", {\n  value: true\n});\n\nvar tslib_1 = __webpack_require__(2);\n\nvar mutation_1 = tslib_1.__importDefault(__webpack_require__(442));\n\nvar util_1 = __webpack_require__(6);\n\nvar const_1 = __webpack_require__(7);\n/**\n * 剔除编辑区容器的 attribute 变化中的非 contenteditable 变化\n * @param mutations MutationRecord[]\n * @param tar 编辑区容器的 DOM 节点\n */\n\n\nfunction mutationsFilter(mutations, tar) {\n  // 剔除编辑区容器的 attribute 变化中的非 contenteditable 变化\n  return (0, _filter[\"default\"])(mutations).call(mutations, function (_a) {\n    var type = _a.type,\n        target = _a.target,\n        attributeName = _a.attributeName;\n    return type != 'attributes' || type == 'attributes' && (attributeName == 'contenteditable' || target != tar);\n  });\n}\n/**\n * Change 实现\n */\n\n\nvar Change = function (_super) {\n  tslib_1.__extends(Change, _super);\n\n  function Change(editor) {\n    var _this = _super.call(this, function (mutations, observer) {\n      var _a; // 数据过滤\n\n\n      mutations = mutationsFilter(mutations, observer.target); // 存储数据\n\n      (_a = _this.data).push.apply(_a, mutations); // 标准模式下\n\n\n      if (!editor.isCompatibleMode) {\n        // 在非中文输入状态下时才保存数据\n        if (!editor.isComposing) {\n          return _this.asyncSave();\n        }\n      } // 兼容模式下\n      else {\n        _this.asyncSave();\n      }\n    }) || this;\n\n    _this.editor = editor;\n    /**\n     * 变化的数据集合\n     */\n\n    _this.data = [];\n    /**\n     * 异步保存数据\n     */\n\n    _this.asyncSave = const_1.EMPTY_FN;\n    return _this;\n  }\n  /**\n   * 保存变化的数据并发布 change event\n   */\n\n\n  Change.prototype.save = function () {\n    // 有数据\n    if (this.data.length) {\n      // 保存变化数据\n      this.editor.history.save(this.data); // 清除缓存\n\n      this.data.length = 0;\n      this.emit();\n    }\n  };\n  /**\n   * 发布 change event\n   */\n\n\n  Change.prototype.emit = function () {\n    var _context;\n\n    // 执行 onchange 回调\n    (0, _forEach[\"default\"])(_context = this.editor.txt.eventHooks.changeEvents).call(_context, function (fn) {\n      return fn();\n    });\n  }; // 重写 observe\n\n\n  Change.prototype.observe = function () {\n    var _this = this;\n\n    _super.prototype.observe.call(this, this.editor.$textElem.elems[0]);\n\n    var timeout = this.editor.config.onchangeTimeout;\n    this.asyncSave = util_1.debounce(function () {\n      _this.save();\n    }, timeout);\n\n    if (!this.editor.isCompatibleMode) {\n      this.editor.$textElem.on('compositionend', function () {\n        _this.asyncSave();\n      });\n    }\n  };\n\n  return Change;\n}(mutation_1[\"default\"]);\n\nexports[\"default\"] = Change;\n\n/***/ }),\n/* 442 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * @description 封装 MutationObserver\n * @author fangzhicong\n */\n\nvar _interopRequireDefault = __webpack_require__(0);\n\nvar _defineProperty = _interopRequireDefault(__webpack_require__(1));\n\n(0, _defineProperty[\"default\"])(exports, \"__esModule\", {\n  value: true\n});\n/**\n * 封装 MutationObserver，抽离成公共类\n */\n\nvar Mutation = function () {\n  /**\n   * 构造器\n   * @param fn 发生变化时执行的回调函数\n   * @param options 自定义配置项\n   */\n  function Mutation(fn, options) {\n    var _this = this;\n    /**\n     * 默认的 MutationObserverInit 配置\n     */\n\n\n    this.options = {\n      subtree: true,\n      childList: true,\n      attributes: true,\n      attributeOldValue: true,\n      characterData: true,\n      characterDataOldValue: true\n    };\n\n    this.callback = function (mutations) {\n      fn(mutations, _this);\n    };\n\n    this.observer = new MutationObserver(this.callback);\n    options && (this.options = options);\n  }\n\n  (0, _defineProperty[\"default\"])(Mutation.prototype, \"target\", {\n    get: function get() {\n      return this.node;\n    },\n    enumerable: false,\n    configurable: true\n  });\n  /**\n   * 绑定监听节点（初次绑定有效）\n   * @param node 需要被监听的节点\n   */\n\n  Mutation.prototype.observe = function (node) {\n    if (!(this.node instanceof Node)) {\n      this.node = node;\n      this.connect();\n    }\n  };\n  /**\n   * 连接监听器（开始观察）\n   */\n\n\n  Mutation.prototype.connect = function () {\n    if (this.node) {\n      this.observer.observe(this.node, this.options);\n      return this;\n    }\n\n    throw new Error('还未初始化绑定，请您先绑定有效的 Node 节点');\n  };\n  /**\n   * 断开监听器（停止观察）\n   */\n\n\n  Mutation.prototype.disconnect = function () {\n    var list = this.observer.takeRecords();\n    list.length && this.callback(list);\n    this.observer.disconnect();\n  };\n\n  return Mutation;\n}();\n\nexports[\"default\"] = Mutation;\n\n/***/ }),\n/* 443 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * @description 历史记录\n * @author fangzhicong\n */\n\nvar _interopRequireDefault = __webpack_require__(0);\n\nvar _defineProperty = _interopRequireDefault(__webpack_require__(1));\n\n(0, _defineProperty[\"default\"])(exports, \"__esModule\", {\n  value: true\n});\n\nvar tslib_1 = __webpack_require__(2);\n\nvar content_1 = tslib_1.__importDefault(__webpack_require__(444));\n\nvar scroll_1 = tslib_1.__importDefault(__webpack_require__(451));\n\nvar range_1 = tslib_1.__importDefault(__webpack_require__(452));\n/**\n * 历史记录（撤销、恢复）\n */\n\n\nvar History = function () {\n  function History(editor) {\n    this.editor = editor;\n    this.content = new content_1[\"default\"](editor);\n    this.scroll = new scroll_1[\"default\"](editor);\n    this.range = new range_1[\"default\"](editor);\n  }\n\n  (0, _defineProperty[\"default\"])(History.prototype, \"size\", {\n    /**\n     *  获取缓存中的数据长度。格式为：[正常的数据的条数，被撤销的数据的条数]\n     */\n    get: function get() {\n      return this.scroll.size;\n    },\n    enumerable: false,\n    configurable: true\n  });\n  /**\n   * 初始化绑定。在 editor.create() 结尾时调用\n   */\n\n  History.prototype.observe = function () {\n    this.content.observe();\n    this.scroll.observe(); // 标准模式下才进行初始化绑定\n\n    !this.editor.isCompatibleMode && this.range.observe();\n  };\n  /**\n   * 保存数据\n   */\n\n\n  History.prototype.save = function (mutations) {\n    if (mutations.length) {\n      this.content.save(mutations);\n      this.scroll.save(); // 标准模式下才进行缓存\n\n      !this.editor.isCompatibleMode && this.range.save();\n    }\n  };\n  /**\n   * 撤销\n   */\n\n\n  History.prototype.revoke = function () {\n    this.editor.change.disconnect();\n    var res = this.content.revoke();\n\n    if (res) {\n      this.scroll.revoke(); // 标准模式下才执行\n\n      if (!this.editor.isCompatibleMode) {\n        this.range.revoke();\n        this.editor.$textElem.focus();\n      }\n    }\n\n    this.editor.change.connect(); // 如果用户在 onchange 中修改了内容（DOM），那么缓存中的节点数据可能不连贯了，不连贯的数据必将导致恢复失败，所以必须将用户的 onchange 处于监控状态中\n\n    res && this.editor.change.emit();\n  };\n  /**\n   * 恢复\n   */\n\n\n  History.prototype.restore = function () {\n    this.editor.change.disconnect();\n    var res = this.content.restore();\n\n    if (res) {\n      this.scroll.restore(); // 标准模式下才执行\n\n      if (!this.editor.isCompatibleMode) {\n        this.range.restore();\n        this.editor.$textElem.focus();\n      }\n    }\n\n    this.editor.change.connect(); // 与 revoke 同理\n\n    res && this.editor.change.emit();\n  };\n\n  return History;\n}();\n\nexports[\"default\"] = History;\n\n/***/ }),\n/* 444 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * @description 整合差异备份和内容备份，进行统一管理\n * @author fangzhicong\n */\n\nvar _interopRequireDefault = __webpack_require__(0);\n\nvar _defineProperty = _interopRequireDefault(__webpack_require__(1));\n\n(0, _defineProperty[\"default\"])(exports, \"__esModule\", {\n  value: true\n});\n\nvar tslib_1 = __webpack_require__(2);\n\nvar node_1 = tslib_1.__importDefault(__webpack_require__(445));\n\nvar html_1 = tslib_1.__importDefault(__webpack_require__(449));\n\nvar ContentCache = function () {\n  function ContentCache(editor) {\n    this.editor = editor;\n  }\n  /**\n   * 初始化绑定\n   */\n\n\n  ContentCache.prototype.observe = function () {\n    if (this.editor.isCompatibleMode) {\n      // 兼容模式（内容备份）\n      this.cache = new html_1[\"default\"](this.editor);\n    } else {\n      // 标准模式（差异备份/节点备份）\n      this.cache = new node_1[\"default\"](this.editor);\n    }\n\n    this.cache.observe();\n  };\n  /**\n   * 保存\n   */\n\n\n  ContentCache.prototype.save = function (mutations) {\n    if (this.editor.isCompatibleMode) {\n      ;\n      this.cache.save();\n    } else {\n      ;\n      this.cache.compile(mutations);\n    }\n  };\n  /**\n   * 撤销\n   */\n\n\n  ContentCache.prototype.revoke = function () {\n    var _a;\n\n    return (_a = this.cache) === null || _a === void 0 ? void 0 : _a.revoke();\n  };\n  /**\n   * 恢复\n   */\n\n\n  ContentCache.prototype.restore = function () {\n    var _a;\n\n    return (_a = this.cache) === null || _a === void 0 ? void 0 : _a.restore();\n  };\n\n  return ContentCache;\n}();\n\nexports[\"default\"] = ContentCache;\n\n/***/ }),\n/* 445 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * @description 差异备份\n * @author fangzhicong\n */\n\nvar _interopRequireDefault = __webpack_require__(0);\n\nvar _defineProperty = _interopRequireDefault(__webpack_require__(1));\n\n(0, _defineProperty[\"default\"])(exports, \"__esModule\", {\n  value: true\n});\n\nvar tslib_1 = __webpack_require__(2);\n\nvar cache_1 = tslib_1.__importDefault(__webpack_require__(106));\n\nvar compile_1 = tslib_1.__importDefault(__webpack_require__(447));\n\nvar decompilation_1 = __webpack_require__(448);\n\nvar NodeCache = function (_super) {\n  tslib_1.__extends(NodeCache, _super);\n\n  function NodeCache(editor) {\n    var _this = _super.call(this, editor.config.historyMaxSize) || this;\n\n    _this.editor = editor;\n    return _this;\n  }\n\n  NodeCache.prototype.observe = function () {\n    this.resetMaxSize(this.editor.config.historyMaxSize);\n  };\n  /**\n   * 编译并保存数据\n   */\n\n\n  NodeCache.prototype.compile = function (data) {\n    this.save(compile_1[\"default\"](data));\n    return this;\n  };\n  /**\n   * 撤销\n   */\n\n\n  NodeCache.prototype.revoke = function () {\n    return _super.prototype.revoke.call(this, function (data) {\n      decompilation_1.revoke(data);\n    });\n  };\n  /**\n   * 恢复\n   */\n\n\n  NodeCache.prototype.restore = function () {\n    return _super.prototype.restore.call(this, function (data) {\n      decompilation_1.restore(data);\n    });\n  };\n\n  return NodeCache;\n}(cache_1[\"default\"]);\n\nexports[\"default\"] = NodeCache;\n\n/***/ }),\n/* 446 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * @description 数据结构 - 栈\n * @author fangzhicong\n */\n\nvar _interopRequireDefault = __webpack_require__(0);\n\nvar _defineProperty = _interopRequireDefault(__webpack_require__(1));\n\n(0, _defineProperty[\"default\"])(exports, \"__esModule\", {\n  value: true\n});\nexports.CeilStack = void 0;\n/**\n * 栈（限制最大数据条数，栈满后可以继续入栈，而先入栈的数据将失效）\n */\n// 取名灵感来自 Math.ceil，向上取有效值\n\nvar CeilStack = function () {\n  function CeilStack(max) {\n    if (max === void 0) {\n      max = 0;\n    }\n    /**\n     * 数据缓存\n     */\n\n\n    this.data = [];\n    /**\n     * 栈的最大长度。为零则长度不限\n     */\n\n    this.max = 0;\n    /**\n     * 标识是否重设过 max 值\n     */\n\n    this.reset = false;\n    max = Math.abs(max);\n    max && (this.max = max);\n  }\n  /**\n   * 允许用户重设一次 max 值\n   */\n\n\n  CeilStack.prototype.resetMax = function (maxSize) {\n    maxSize = Math.abs(maxSize);\n\n    if (!this.reset && !isNaN(maxSize)) {\n      this.max = maxSize;\n      this.reset = true;\n    }\n  };\n\n  (0, _defineProperty[\"default\"])(CeilStack.prototype, \"size\", {\n    /**\n     * 当前栈中的数据条数\n     */\n    get: function get() {\n      return this.data.length;\n    },\n    enumerable: false,\n    configurable: true\n  });\n  /**\n   * 入栈\n   * @param data 入栈的数据\n   */\n\n  CeilStack.prototype.instack = function (data) {\n    this.data.unshift(data);\n\n    if (this.max && this.size > this.max) {\n      this.data.length = this.max;\n    }\n\n    return this;\n  };\n  /**\n   * 出栈\n   */\n\n\n  CeilStack.prototype.outstack = function () {\n    return this.data.shift();\n  };\n  /**\n   * 清空栈\n   */\n\n\n  CeilStack.prototype.clear = function () {\n    this.data.length = 0;\n    return this;\n  };\n\n  return CeilStack;\n}();\n\nexports.CeilStack = CeilStack;\n\n/***/ }),\n/* 447 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * @description 数据整理\n * @author fangzhicong\n */\n\nvar _interopRequireDefault = __webpack_require__(0);\n\nvar _defineProperty = _interopRequireDefault(__webpack_require__(1));\n\nvar _forEach = _interopRequireDefault(__webpack_require__(4));\n\nvar _indexOf = _interopRequireDefault(__webpack_require__(28));\n\n(0, _defineProperty[\"default\"])(exports, \"__esModule\", {\n  value: true\n});\nexports.compliePosition = exports.complieNodes = exports.compileValue = exports.compileType = void 0;\n\nvar util_1 = __webpack_require__(6);\n/**\n * 数据类型\n */\n\n\nfunction compileType(data) {\n  switch (data) {\n    case 'childList':\n      return 'node';\n\n    case 'attributes':\n      return 'attr';\n\n    default:\n      return 'text';\n  }\n}\n\nexports.compileType = compileType;\n/**\n * 获取当前的文本内容\n */\n\nfunction compileValue(data) {\n  switch (data.type) {\n    case 'attributes':\n      return data.target.getAttribute(data.attributeName) || '';\n\n    case 'characterData':\n      return data.target.textContent;\n\n    default:\n      return '';\n  }\n}\n\nexports.compileValue = compileValue;\n/**\n * addedNodes/removedNodes\n */\n\nfunction complieNodes(data) {\n  var temp = {};\n\n  if (data.addedNodes.length) {\n    temp.add = util_1.toArray(data.addedNodes);\n  }\n\n  if (data.removedNodes.length) {\n    temp.remove = util_1.toArray(data.removedNodes);\n  }\n\n  return temp;\n}\n\nexports.complieNodes = complieNodes;\n/**\n * addedNodes/removedNodes 的相对位置\n */\n\nfunction compliePosition(data) {\n  var temp;\n\n  if (data.previousSibling) {\n    temp = {\n      type: 'before',\n      target: data.previousSibling\n    };\n  } else if (data.nextSibling) {\n    temp = {\n      type: 'after',\n      target: data.nextSibling\n    };\n  } else {\n    temp = {\n      type: 'parent',\n      target: data.target\n    };\n  }\n\n  return temp;\n}\n\nexports.compliePosition = compliePosition;\n/**\n * 补全 Firefox 数据的特殊标签\n */\n\nvar tag = ['UL', 'OL', 'H1', 'H2', 'H3', 'H4', 'H5', 'H6'];\n/**\n * 将 MutationRecord 转换成自定义格式的数据\n */\n\nfunction compile(data) {\n  var temp = []; // 以下两个变量是兼容 Firefox 时使用到的\n  // 前一次操作为删除元素节点\n\n  var removeNode = false; // 连续的节点删除记录\n\n  var removeCache = [];\n  (0, _forEach[\"default\"])(data).call(data, function (record, index) {\n    var item = {\n      type: compileType(record.type),\n      target: record.target,\n      attr: record.attributeName || '',\n      value: compileValue(record) || '',\n      oldValue: record.oldValue || '',\n      nodes: complieNodes(record),\n      position: compliePosition(record)\n    };\n    temp.push(item); // 兼容 Firefox，补全数据（这几十行代码写得吐血，跟 IE 有得一拼）\n\n    if (!util_1.UA.isFirefox) {\n      return;\n    } // 正常的数据：缩进、行高、超链接、对齐方式、引用、插入表情、插入图片、分割线、表格、插入代码\n    // 普通的数据补全：标题（纯文本内容）、加粗、斜体、删除线、下划线、颜色、背景色、字体、字号、列表（纯文本内容）\n    // 特殊的数据补全：标题（包含 HTMLElement）、列表（包含 HTMLElement 或 ul -> ol 或 ol -> ul 或 Enter）\n\n\n    if (removeNode && record.addedNodes.length && record.addedNodes[0].nodeType == 1) {\n      // 需要被全数据的目标节点\n      var replenishNode = record.addedNodes[0];\n      var replenishData = {\n        type: 'node',\n        target: replenishNode,\n        attr: '',\n        value: '',\n        oldValue: '',\n        nodes: {\n          add: [removeNode]\n        },\n        position: {\n          type: 'parent',\n          target: replenishNode\n        }\n      }; // 特殊的标签：['UL', 'OL', 'H1', 'H2', 'H3', 'H4', 'H5', 'H6']\n\n      if ((0, _indexOf[\"default\"])(tag).call(tag, replenishNode.nodeName) != -1) {\n        replenishData.nodes.add = util_1.toArray(replenishNode.childNodes);\n        temp.push(replenishData);\n      } // 上一个删除元素是文本节点\n      else if (removeNode.nodeType == 3) {\n        if (contains(replenishNode, removeCache)) {\n          replenishData.nodes.add = util_1.toArray(replenishNode.childNodes);\n        }\n\n        temp.push(replenishData);\n      } // 上一个删除元素是 Element && 由近到远的删除元素至少有一个是需要补全数据节点的子节点\n      else if ((0, _indexOf[\"default\"])(tag).call(tag, record.target.nodeName) == -1 && contains(replenishNode, removeCache)) {\n        replenishData.nodes.add = util_1.toArray(replenishNode.childNodes);\n        temp.push(replenishData);\n      }\n    } // 记录本次的节点信息\n\n\n    if (item.type == 'node' && record.removedNodes.length == 1) {\n      removeNode = record.removedNodes[0];\n      removeCache.push(removeNode);\n    } else {\n      removeNode = false;\n      removeCache.length = 0;\n    }\n  });\n  return temp;\n}\n\nexports[\"default\"] = compile; // 删除元素的历史记录中包含有多少个目标节点的子元素\n\nfunction contains(tar, childs) {\n  var count = 0;\n\n  for (var i = childs.length - 1; i > 0; i--) {\n    if (tar.contains(childs[i])) {\n      count++;\n    } else {\n      break;\n    }\n  }\n\n  return count;\n}\n\n/***/ }),\n/* 448 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _interopRequireDefault = __webpack_require__(0);\n\nvar _defineProperty = _interopRequireDefault(__webpack_require__(1));\n\nvar _forEach = _interopRequireDefault(__webpack_require__(4));\n\nvar _entries = _interopRequireDefault(__webpack_require__(102));\n\n(0, _defineProperty[\"default\"])(exports, \"__esModule\", {\n  value: true\n});\nexports.restore = exports.revoke = void 0;\n/**\n * 将节点添加到 DOM 树中\n * @param data 数据项\n * @param list 节点集合（addedNodes 或 removedNodes）\n */\n\nfunction insertNode(data, list) {\n  var reference = data.position.target;\n\n  switch (data.position.type) {\n    // reference 在这些节点的前面\n    case 'before':\n      if (reference.nextSibling) {\n        reference = reference.nextSibling;\n        (0, _forEach[\"default\"])(list).call(list, function (item) {\n          data.target.insertBefore(item, reference);\n        });\n      } else {\n        (0, _forEach[\"default\"])(list).call(list, function (item) {\n          data.target.appendChild(item);\n        });\n      }\n\n      break;\n    // reference 在这些节点的后面\n\n    case 'after':\n      (0, _forEach[\"default\"])(list).call(list, function (item) {\n        data.target.insertBefore(item, reference);\n      });\n      break;\n    // parent\n    // reference 是这些节点的父节点\n\n    default:\n      (0, _forEach[\"default\"])(list).call(list, function (item) {\n        reference.appendChild(item);\n      });\n      break;\n  }\n}\n/* ------------------------------------------------------------------ 撤销逻辑 ------------------------------------------------------------------ */\n\n\nfunction revokeNode(data) {\n  for (var _i = 0, _a = (0, _entries[\"default\"])(data.nodes); _i < _a.length; _i++) {\n    var _b = _a[_i],\n        relative = _b[0],\n        list = _b[1];\n\n    switch (relative) {\n      // 反向操作，将这些节点从 DOM 中移除\n      case 'add':\n        (0, _forEach[\"default\"])(list).call(list, function (item) {\n          data.target.removeChild(item);\n        });\n        break;\n      // remove（反向操作，将这些节点添加到 DOM 中）\n\n      default:\n        {\n          insertNode(data, list);\n          break;\n        }\n    }\n  }\n}\n/**\n * 撤销 attribute\n */\n\n\nfunction revokeAttr(data) {\n  var target = data.target;\n\n  if (data.oldValue == null) {\n    target.removeAttribute(data.attr);\n  } else {\n    target.setAttribute(data.attr, data.oldValue);\n  }\n}\n/**\n * 撤销文本内容\n */\n\n\nfunction revokeText(data) {\n  data.target.textContent = data.oldValue;\n}\n\nvar revokeFns = {\n  node: revokeNode,\n  text: revokeText,\n  attr: revokeAttr\n}; // 撤销 - 对外暴露的接口\n\nfunction revoke(data) {\n  for (var i = data.length - 1; i > -1; i--) {\n    var item = data[i];\n    revokeFns[item.type](item);\n  }\n}\n\nexports.revoke = revoke;\n/* ------------------------------------------------------------------ 恢复逻辑 ------------------------------------------------------------------ */\n\nfunction restoreNode(data) {\n  for (var _i = 0, _a = (0, _entries[\"default\"])(data.nodes); _i < _a.length; _i++) {\n    var _b = _a[_i],\n        relative = _b[0],\n        list = _b[1];\n\n    switch (relative) {\n      case 'add':\n        {\n          insertNode(data, list);\n          break;\n        }\n      // remove\n\n      default:\n        {\n          (0, _forEach[\"default\"])(list).call(list, function (item) {\n            ;\n            item.parentNode.removeChild(item);\n          });\n          break;\n        }\n    }\n  }\n}\n\nfunction restoreText(data) {\n  data.target.textContent = data.value;\n}\n\nfunction restoreAttr(data) {\n  ;\n  data.target.setAttribute(data.attr, data.value);\n}\n\nvar restoreFns = {\n  node: restoreNode,\n  text: restoreText,\n  attr: restoreAttr\n}; // 恢复 - 对外暴露的接口\n\nfunction restore(data) {\n  for (var _i = 0, data_1 = data; _i < data_1.length; _i++) {\n    var item = data_1[_i];\n    restoreFns[item.type](item);\n  }\n}\n\nexports.restore = restore;\n\n/***/ }),\n/* 449 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _interopRequireDefault = __webpack_require__(0);\n\nvar _defineProperty = _interopRequireDefault(__webpack_require__(1));\n\n(0, _defineProperty[\"default\"])(exports, \"__esModule\", {\n  value: true\n});\n\nvar chain_1 = __webpack_require__(450);\n\nvar HtmlCache = function () {\n  function HtmlCache(editor) {\n    this.editor = editor;\n    this.data = new chain_1.TailChain();\n  }\n  /**\n   * 初始化绑定\n   */\n\n\n  HtmlCache.prototype.observe = function () {\n    this.data.resetMax(this.editor.config.historyMaxSize); // 保存初始化值\n\n    this.data.insertLast(this.editor.$textElem.html());\n  };\n  /**\n   * 保存\n   */\n\n\n  HtmlCache.prototype.save = function () {\n    this.data.insertLast(this.editor.$textElem.html());\n    return this;\n  };\n  /**\n   * 撤销\n   */\n\n\n  HtmlCache.prototype.revoke = function () {\n    var data = this.data.prev();\n\n    if (data) {\n      this.editor.$textElem.html(data);\n      return true;\n    }\n\n    return false;\n  };\n  /**\n   * 恢复\n   */\n\n\n  HtmlCache.prototype.restore = function () {\n    var data = this.data.next();\n\n    if (data) {\n      this.editor.$textElem.html(data);\n      return true;\n    }\n\n    return false;\n  };\n\n  return HtmlCache;\n}();\n\nexports[\"default\"] = HtmlCache;\n\n/***/ }),\n/* 450 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * @description 数据结构 - 链表\n * @author fangzhicong\n */\n\nvar _interopRequireDefault = __webpack_require__(0);\n\nvar _defineProperty = _interopRequireDefault(__webpack_require__(1));\n\nvar _splice = _interopRequireDefault(__webpack_require__(99));\n\n(0, _defineProperty[\"default\"])(exports, \"__esModule\", {\n  value: true\n});\nexports.TailChain = void 0;\n/**\n * 特殊链表（数据尾插入、插入前自动清理指针后边的数据、插入后指针永远定位于最后一位元素、可限制链表长度、指针双向移动）\n */\n\nvar TailChain = function () {\n  function TailChain() {\n    /**\n     * 链表数据\n     */\n    this.data = [];\n    /**\n     * 链表最大长度，零表示长度不限\n     */\n\n    this.max = 0;\n    /**\n     * 指针\n     */\n\n    this.point = 0; // 当前指针是否人为操作过\n\n    this.isRe = false;\n  }\n  /**\n   * 允许用户重设一次 max 值\n   */\n\n\n  TailChain.prototype.resetMax = function (maxSize) {\n    maxSize = Math.abs(maxSize);\n    maxSize && (this.max = maxSize);\n  };\n\n  (0, _defineProperty[\"default\"])(TailChain.prototype, \"size\", {\n    /**\n     * 当前链表的长度\n     */\n    get: function get() {\n      return this.data.length;\n    },\n    enumerable: false,\n    configurable: true\n  });\n  /**\n   * 尾插入\n   * @param data 插入的数据\n   */\n\n  TailChain.prototype.insertLast = function (data) {\n    // 人为操作过指针，清除指针后面的元素\n    if (this.isRe) {\n      var _context;\n\n      (0, _splice[\"default\"])(_context = this.data).call(_context, this.point + 1);\n      this.isRe = false;\n    }\n\n    this.data.push(data); // 超出链表最大长度\n\n    while (this.max && this.size > this.max) {\n      this.data.shift();\n    } // 从新定位指针到最后一个元素\n\n\n    this.point = this.size - 1;\n    return this;\n  };\n  /**\n   * 获取当前指针元素\n   */\n\n\n  TailChain.prototype.current = function () {\n    return this.data[this.point];\n  };\n  /**\n   * 获取上一指针元素\n   */\n\n\n  TailChain.prototype.prev = function () {\n    !this.isRe && (this.isRe = true);\n    this.point--;\n\n    if (this.point < 0) {\n      this.point = 0;\n      return undefined;\n    }\n\n    return this.current();\n  };\n  /**\n   * 下一指针元素\n   */\n\n\n  TailChain.prototype.next = function () {\n    !this.isRe && (this.isRe = true);\n    this.point++;\n\n    if (this.point >= this.size) {\n      this.point = this.size - 1;\n      return undefined;\n    }\n\n    return this.current();\n  };\n\n  return TailChain;\n}();\n\nexports.TailChain = TailChain;\n\n/***/ }),\n/* 451 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * @description 记录 scrollTop\n * @author fangzhicong\n */\n\nvar _interopRequireDefault = __webpack_require__(0);\n\nvar _defineProperty = _interopRequireDefault(__webpack_require__(1));\n\n(0, _defineProperty[\"default\"])(exports, \"__esModule\", {\n  value: true\n});\n\nvar tslib_1 = __webpack_require__(2);\n\nvar cache_1 = tslib_1.__importDefault(__webpack_require__(106));\n\nvar ScrollCache = function (_super) {\n  tslib_1.__extends(ScrollCache, _super);\n\n  function ScrollCache(editor) {\n    var _this = _super.call(this, editor.config.historyMaxSize) || this;\n\n    _this.editor = editor;\n    /**\n     * 上一次的 scrollTop\n     */\n\n    _this.last = 0;\n    _this.target = editor.$textElem.elems[0];\n    return _this;\n  }\n  /**\n   * 给编辑区容器绑定 scroll 事件\n   */\n\n\n  ScrollCache.prototype.observe = function () {\n    var _this = this;\n\n    this.target = this.editor.$textElem.elems[0];\n    this.editor.$textElem.on('scroll', function () {\n      _this.last = _this.target.scrollTop;\n    });\n    this.resetMaxSize(this.editor.config.historyMaxSize);\n  };\n  /**\n   * 保存 scrollTop 值\n   */\n\n\n  ScrollCache.prototype.save = function () {\n    _super.prototype.save.call(this, [this.last, this.target.scrollTop]);\n\n    return this;\n  };\n  /**\n   * 撤销\n   */\n\n\n  ScrollCache.prototype.revoke = function () {\n    var _this = this;\n\n    return _super.prototype.revoke.call(this, function (data) {\n      _this.target.scrollTop = data[0];\n    });\n  };\n  /**\n   * 恢复\n   */\n\n\n  ScrollCache.prototype.restore = function () {\n    var _this = this;\n\n    return _super.prototype.restore.call(this, function (data) {\n      _this.target.scrollTop = data[1];\n    });\n  };\n\n  return ScrollCache;\n}(cache_1[\"default\"]);\n\nexports[\"default\"] = ScrollCache;\n\n/***/ }),\n/* 452 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * @description 记录 range 变化\n * @author fangzhicong\n */\n\nvar _interopRequireDefault = __webpack_require__(0);\n\nvar _defineProperty = _interopRequireDefault(__webpack_require__(1));\n\n(0, _defineProperty[\"default\"])(exports, \"__esModule\", {\n  value: true\n});\n\nvar tslib_1 = __webpack_require__(2);\n\nvar cache_1 = tslib_1.__importDefault(__webpack_require__(106));\n\nvar dom_core_1 = tslib_1.__importDefault(__webpack_require__(3));\n\nvar util_1 = __webpack_require__(6);\n/**\n * 把 Range 对象转换成缓存对象\n * @param range Range 对象\n */\n\n\nfunction rangeToObject(range) {\n  return {\n    start: [range.startContainer, range.startOffset],\n    end: [range.endContainer, range.endOffset],\n    root: range.commonAncestorContainer,\n    collapsed: range.collapsed\n  };\n}\n/**\n * 编辑区 range 缓存管理器\n */\n\n\nvar RangeCache = function (_super) {\n  tslib_1.__extends(RangeCache, _super);\n\n  function RangeCache(editor) {\n    var _this = _super.call(this, editor.config.historyMaxSize) || this;\n\n    _this.editor = editor;\n    _this.lastRange = rangeToObject(document.createRange());\n    _this.root = editor.$textElem.elems[0];\n    _this.updateLastRange = util_1.debounce(function () {\n      _this.lastRange = rangeToObject(_this.rangeHandle);\n    }, editor.config.onchangeTimeout);\n    return _this;\n  }\n\n  (0, _defineProperty[\"default\"])(RangeCache.prototype, \"rangeHandle\", {\n    /**\n     * 获取 Range 对象\n     */\n    get: function get() {\n      var selection = document.getSelection();\n      return selection && selection.rangeCount ? selection.getRangeAt(0) : document.createRange();\n    },\n    enumerable: false,\n    configurable: true\n  });\n  /**\n   * 初始化绑定\n   */\n\n  RangeCache.prototype.observe = function () {\n    var self = this; // 同步节点数据\n\n    this.root = this.editor.$textElem.elems[0];\n    this.resetMaxSize(this.editor.config.historyMaxSize); // selection change 回调函数\n\n    function selectionchange() {\n      var handle = self.rangeHandle;\n\n      if (self.root === handle.commonAncestorContainer || self.root.contains(handle.commonAncestorContainer)) {\n        // 非中文输入状态下才进行记录\n        if (!self.editor.isComposing) {\n          self.updateLastRange();\n        }\n      }\n    } // backspace 和 delete 手动更新 Range 缓存\n\n\n    function deletecallback(e) {\n      if (e.key == 'Backspace' || e.key == 'Delete') {\n        // self.lastRange = rangeToObject(self.rangeHandle)\n        self.updateLastRange();\n      }\n    } // 绑定事件（必须绑定在 document 上，不能绑定在 window 上）\n\n\n    dom_core_1[\"default\"](document).on('selectionchange', selectionchange); // 解除事件绑定\n\n    this.editor.beforeDestroy(function () {\n      dom_core_1[\"default\"](document).off('selectionchange', selectionchange);\n    }); // 删除文本时手动更新 range\n\n    self.editor.$textElem.on('keydown', deletecallback);\n  };\n  /**\n   * 保存 Range\n   */\n\n\n  RangeCache.prototype.save = function () {\n    var current = rangeToObject(this.rangeHandle);\n\n    _super.prototype.save.call(this, [this.lastRange, current]);\n\n    this.lastRange = current;\n    return this;\n  };\n  /**\n   * 设置 Range，在 撤销/恢复 中调用\n   * @param range 缓存的 Range 数据\n   */\n\n\n  RangeCache.prototype.set = function (range) {\n    try {\n      if (range) {\n        var handle = this.rangeHandle;\n        handle.setStart.apply(handle, range.start);\n        handle.setEnd.apply(handle, range.end);\n        this.editor.menus.changeActive();\n        return true;\n      }\n    } catch (err) {\n      return false;\n    }\n\n    return false;\n  };\n  /**\n   * 撤销\n   */\n\n\n  RangeCache.prototype.revoke = function () {\n    var _this = this;\n\n    return _super.prototype.revoke.call(this, function (data) {\n      _this.set(data[0]);\n    });\n  };\n  /**\n   * 恢复\n   */\n\n\n  RangeCache.prototype.restore = function () {\n    var _this = this;\n\n    return _super.prototype.restore.call(this, function (data) {\n      _this.set(data[1]);\n    });\n  };\n\n  return RangeCache;\n}(cache_1[\"default\"]);\n\nexports[\"default\"] = RangeCache;\n\n/***/ }),\n/* 453 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _interopRequireDefault = __webpack_require__(0);\n\nvar _defineProperty = _interopRequireDefault(__webpack_require__(1));\n\nvar _find = _interopRequireDefault(__webpack_require__(32));\n\n(0, _defineProperty[\"default\"])(exports, \"__esModule\", {\n  value: true\n});\n\nvar tslib_1 = __webpack_require__(2);\n\nvar dom_core_1 = tslib_1.__importDefault(__webpack_require__(3));\n\n__webpack_require__(454);\n\nfunction disableInit(editor) {\n  var isCurtain = false; // 避免重复生成幕布\n\n  var $contentDom;\n  var $menuDom; // 禁用期间，通过 js 修改内容后，刷新内容\n\n  editor.txt.eventHooks.changeEvents.push(function () {\n    if (isCurtain) {\n      (0, _find[\"default\"])($contentDom).call($contentDom, '.w-e-content-preview').html(editor.$textElem.html());\n    }\n  }); // 创建幕布\n\n  function disable() {\n    if (isCurtain) return; // 隐藏编辑区域\n\n    editor.$textElem.hide(); // 生成div 渲染编辑内容\n\n    var textContainerZindexValue = editor.zIndex.get('textContainer');\n    var content = editor.txt.html();\n    $contentDom = dom_core_1[\"default\"](\"<div class=\\\"w-e-content-mantle\\\" style=\\\"z-index:\" + textContainerZindexValue + \"\\\">\\n                <div class=\\\"w-e-content-preview w-e-text\\\">\" + content + \"</div>\\n            </div>\");\n    editor.$textContainerElem.append($contentDom); // 生成div 菜单膜布\n\n    var menuZindexValue = editor.zIndex.get('menu');\n    $menuDom = dom_core_1[\"default\"](\"<div class=\\\"w-e-menue-mantle\\\" style=\\\"z-index:\" + menuZindexValue + \"\\\"></div>\");\n    editor.$toolbarElem.append($menuDom);\n    isCurtain = true;\n    editor.isEnable = false;\n  } // 销毁幕布并显示可编辑区域\n\n\n  function enable() {\n    if (!isCurtain) return;\n    $contentDom.remove();\n    $menuDom.remove();\n    editor.$textElem.show();\n    isCurtain = false;\n    editor.isEnable = true;\n  }\n\n  return {\n    disable: disable,\n    enable: enable\n  };\n}\n\nexports[\"default\"] = disableInit;\n\n/***/ }),\n/* 454 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar api = __webpack_require__(21);\n            var content = __webpack_require__(455);\n\n            content = content.__esModule ? content.default : content;\n\n            if (typeof content === 'string') {\n              content = [[module.i, content, '']];\n            }\n\nvar options = {};\n\noptions.insert = \"head\";\noptions.singleton = false;\n\nvar update = api(content, options);\n\n\n\nmodule.exports = content.locals || {};\n\n/***/ }),\n/* 455 */\n/***/ (function(module, exports, __webpack_require__) {\n\n// Imports\nvar ___CSS_LOADER_API_IMPORT___ = __webpack_require__(22);\nexports = ___CSS_LOADER_API_IMPORT___(false);\n// Module\nexports.push([module.i, \".w-e-content-mantle {\\n  width: 100%;\\n  height: 100%;\\n  overflow-y: auto;\\n}\\n.w-e-content-mantle .w-e-content-preview {\\n  width: 100%;\\n  min-height: 100%;\\n  padding: 0 10px;\\n  line-height: 1.5;\\n}\\n.w-e-content-mantle .w-e-content-preview img {\\n  cursor: default;\\n}\\n.w-e-content-mantle .w-e-content-preview img:hover {\\n  box-shadow: none;\\n}\\n.w-e-menue-mantle {\\n  position: absolute;\\n  height: 100%;\\n  width: 100%;\\n  top: 0;\\n  left: 0;\\n}\\n\", \"\"]);\n// Exports\nmodule.exports = exports;\n\n\n/***/ }),\n/* 456 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _interopRequireDefault = __webpack_require__(0);\n\nvar _defineProperty = _interopRequireDefault(__webpack_require__(1));\n\n(0, _defineProperty[\"default\"])(exports, \"__esModule\", {\n  value: true\n});\n\nvar SelectionChange = function () {\n  function SelectionChange(editor) {\n    var _this = this;\n\n    this.editor = editor; // 绑定的事件\n\n    var init = function init() {\n      var activeElement = document.activeElement;\n\n      if (activeElement === editor.$textElem.elems[0]) {\n        _this.emit();\n      }\n    }; //  选取变化事件监听\n\n\n    window.document.addEventListener('selectionchange', init); // 摧毁时移除监听\n\n    this.editor.beforeDestroy(function () {\n      window.document.removeEventListener('selectionchange', init);\n    });\n  }\n\n  SelectionChange.prototype.emit = function () {\n    var _a; // 执行rangeChange函数\n\n\n    var onSelectionChange = this.editor.config.onSelectionChange;\n\n    if (onSelectionChange) {\n      var selection = this.editor.selection;\n      selection.saveRange();\n      if (!selection.isSelectionEmpty()) onSelectionChange({\n        // 当前文本\n        text: selection.getSelectionText(),\n        // 当前的html\n        html: (_a = selection.getSelectionContainerElem()) === null || _a === void 0 ? void 0 : _a.elems[0].innerHTML,\n        // select对象\n        selection: selection\n      });\n    }\n  };\n\n  return SelectionChange;\n}();\n\nexports[\"default\"] = SelectionChange;\n\n/***/ }),\n/* 457 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _interopRequireDefault = __webpack_require__(0);\n\nvar _defineProperty = _interopRequireDefault(__webpack_require__(1));\n\nvar _assign = _interopRequireDefault(__webpack_require__(132));\n\nvar _entries = _interopRequireDefault(__webpack_require__(102));\n\nvar _forEach = _interopRequireDefault(__webpack_require__(4));\n\n(0, _defineProperty[\"default\"])(exports, \"__esModule\", {\n  value: true\n});\nexports.registerPlugin = void 0;\n\nvar tslib_1 = __webpack_require__(2);\n\nvar editor_1 = tslib_1.__importDefault(__webpack_require__(94));\n\nvar util_1 = __webpack_require__(6);\n/**\n * 插件注册\n * @param { string } name 插件名\n * @param { RegisterOptions } options 插件配置\n * @param { pluginsListType } memory 存储介质\n */\n\n\nfunction registerPlugin(name, options, memory) {\n  if (!name) {\n    throw new TypeError('name is not define');\n  }\n\n  if (!options) {\n    throw new TypeError('options is not define');\n  }\n\n  if (!options.intention) {\n    throw new TypeError('options.intention is not define');\n  }\n\n  if (options.intention && typeof options.intention !== 'function') {\n    throw new TypeError('options.intention is not function');\n  }\n\n  if (memory[name]) {\n    console.warn(\"plugin \" + name + \" \\u5DF2\\u5B58\\u5728\\uFF0C\\u5DF2\\u8986\\u76D6\\u3002\");\n  }\n\n  memory[name] = options;\n}\n\nexports.registerPlugin = registerPlugin;\n/**\n * 插件初始化\n * @param { Editor } editor 编辑器实例\n */\n\nfunction initPlugins(editor) {\n  var plugins = (0, _assign[\"default\"])({}, util_1.deepClone(editor_1[\"default\"].globalPluginsFunctionList), util_1.deepClone(editor.pluginsFunctionList));\n  var values = (0, _entries[\"default\"])(plugins);\n  (0, _forEach[\"default\"])(values).call(values, function (_a) {\n    var name = _a[0],\n        options = _a[1];\n    console.info(\"plugin \" + name + \" initializing\");\n    var intention = options.intention,\n        config = options.config;\n    intention(editor, config);\n    console.info(\"plugin \" + name + \" initialization complete\");\n  });\n}\n\nexports[\"default\"] = initPlugins;\n\n/***/ }),\n/* 458 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _interopRequireDefault = __webpack_require__(0);\n\nvar _defineProperty = _interopRequireDefault(__webpack_require__(1));\n\n(0, _defineProperty[\"default\"])(exports, \"__esModule\", {\n  value: true\n});\n\n/***/ })\n/******/ ])[\"default\"];\n});\n//# sourceMappingURL=wangEditor.js.map"
  },
  {
    "path": "static/webuploader/README.md",
    "content": "目录说明\n========================\n\n```bash\n├── Uploader.swf                      # SWF文件，当使用Flash运行时需要引入。\n├\n├── webuploader.js                    # 完全版本。\n├── webuploader.min.js                # min版本\n├\n├── webuploader.flashonly.js          # 只有Flash实现的版本。\n├── webuploader.flashonly.min.js      # min版本\n├\n├── webuploader.html5only.js          # 只有Html5实现的版本。\n├── webuploader.html5only.min.js      # min版本\n├\n├── webuploader.noimage.js            # 去除图片处理的版本，包括HTML5和FLASH.\n├── webuploader.noimage.min.js        # min版本\n├\n├── webuploader.custom.js             # 自定义打包方案，请查看 Gruntfile.js，满足移动端使用。\n└── webuploader.custom.min.js         # min版本\n```\n\n## 示例\n\n请把整个 Git 包下载下来放在 php 服务器下，因为默认提供的文件接受是用 php 编写的，打开 examples 页面便能查看示例效果。"
  },
  {
    "path": "static/webuploader/webuploader.css",
    "content": ".webuploader-container {\n\tposition: relative;\n}\n.webuploader-element-invisible {\n\tposition: absolute !important;\n\tclip: rect(1px 1px 1px 1px); /* IE6, IE7 */\n    clip: rect(1px,1px,1px,1px);\n}\n.webuploader-pick {\n\tposition: relative;\n\tdisplay: inline-block;\n\tcursor: pointer;\n\tbackground: #00b7ee;\n\tpadding: 10px 15px;\n\tcolor: #fff;\n\ttext-align: center;\n\tborder-radius: 3px;\n\toverflow: hidden;\n}\n.webuploader-pick-hover {\n\tbackground: #00a2d4;\n}\n\n.webuploader-pick-disable {\n\topacity: 0.6;\n\tpointer-events:none;\n}\n\n"
  },
  {
    "path": "static/webuploader/webuploader.custom.js",
    "content": "/*! WebUploader 0.1.6 */\n\n\n/**\n * @fileOverview 让内部各个部件的代码可以用[amd](https://github.com/amdjs/amdjs-api/wiki/AMD)模块定义方式组织起来。\n *\n * AMD API 内部的简单不完全实现，请忽略。只有当WebUploader被合并成一个文件的时候才会引入。\n */\n(function( root, factory ) {\n    var modules = {},\n\n        // 内部require, 简单不完全实现。\n        // https://github.com/amdjs/amdjs-api/wiki/require\n        _require = function( deps, callback ) {\n            var args, len, i;\n\n            // 如果deps不是数组，则直接返回指定module\n            if ( typeof deps === 'string' ) {\n                return getModule( deps );\n            } else {\n                args = [];\n                for( len = deps.length, i = 0; i < len; i++ ) {\n                    args.push( getModule( deps[ i ] ) );\n                }\n\n                return callback.apply( null, args );\n            }\n        },\n\n        // 内部define，暂时不支持不指定id.\n        _define = function( id, deps, factory ) {\n            if ( arguments.length === 2 ) {\n                factory = deps;\n                deps = null;\n            }\n\n            _require( deps || [], function() {\n                setModule( id, factory, arguments );\n            });\n        },\n\n        // 设置module, 兼容CommonJs写法。\n        setModule = function( id, factory, args ) {\n            var module = {\n                    exports: factory\n                },\n                returned;\n\n            if ( typeof factory === 'function' ) {\n                args.length || (args = [ _require, module.exports, module ]);\n                returned = factory.apply( null, args );\n                returned !== undefined && (module.exports = returned);\n            }\n\n            modules[ id ] = module.exports;\n        },\n\n        // 根据id获取module\n        getModule = function( id ) {\n            var module = modules[ id ] || root[ id ];\n\n            if ( !module ) {\n                throw new Error( '`' + id + '` is undefined' );\n            }\n\n            return module;\n        },\n\n        // 将所有modules，将路径ids装换成对象。\n        exportsTo = function( obj ) {\n            var key, host, parts, part, last, ucFirst;\n\n            // make the first character upper case.\n            ucFirst = function( str ) {\n                return str && (str.charAt( 0 ).toUpperCase() + str.substr( 1 ));\n            };\n\n            for ( key in modules ) {\n                host = obj;\n\n                if ( !modules.hasOwnProperty( key ) ) {\n                    continue;\n                }\n\n                parts = key.split('/');\n                last = ucFirst( parts.pop() );\n\n                while( (part = ucFirst( parts.shift() )) ) {\n                    host[ part ] = host[ part ] || {};\n                    host = host[ part ];\n                }\n\n                host[ last ] = modules[ key ];\n            }\n\n            return obj;\n        },\n\n        makeExport = function( dollar ) {\n            root.__dollar = dollar;\n\n            // exports every module.\n            return exportsTo( factory( root, _define, _require ) );\n        },\n\n        origin;\n\n    if ( typeof module === 'object' && typeof module.exports === 'object' ) {\n\n        // For CommonJS and CommonJS-like environments where a proper window is present,\n        module.exports = makeExport();\n    } else if ( typeof define === 'function' && define.amd ) {\n\n        // Allow using this built library as an AMD module\n        // in another project. That other project will only\n        // see this AMD call, not the internal modules in\n        // the closure below.\n        define([ 'jquery' ], makeExport );\n    } else {\n\n        // Browser globals case. Just assign the\n        // result to a property on the global.\n        origin = root.WebUploader;\n        root.WebUploader = makeExport();\n        root.WebUploader.noConflict = function() {\n            root.WebUploader = origin;\n        };\n    }\n})( window, function( window, define, require ) {\n\n\n    /**\n     * @fileOverview jQuery or Zepto\n     * @require \"jquery\"\n     * @require \"zepto\"\n     */\n    define('dollar-third',[],function() {\n        var req = window.require;\n        var $ = window.__dollar || \n            window.jQuery || \n            window.Zepto || \n            req('jquery') || \n            req('zepto');\n    \n        if ( !$ ) {\n            throw new Error('jQuery or Zepto not found!');\n        }\n    \n        return $;\n    });\n    \n    /**\n     * @fileOverview Dom 操作相关\n     */\n    define('dollar',[\n        'dollar-third'\n    ], function( _ ) {\n        return _;\n    });\n    /**\n     * 直接来源于jquery的代码。\n     * @fileOverview Promise/A+\n     * @beta\n     */\n    define('promise-builtin',[\n        'dollar'\n    ], function( $ ) {\n    \n        var api;\n    \n        // 简单版Callbacks, 默认memory，可选once.\n        function Callbacks( once ) {\n            var list = [],\n                stack = !once && [],\n                fire = function( data ) {\n                    memory = data;\n                    fired = true;\n                    firingIndex = firingStart || 0;\n                    firingStart = 0;\n                    firingLength = list.length;\n                    firing = true;\n    \n                    for ( ; list && firingIndex < firingLength; firingIndex++ ) {\n                        list[ firingIndex ].apply( data[ 0 ], data[ 1 ] );\n                    }\n                    firing = false;\n    \n                    if ( list ) {\n                        if ( stack ) {\n                            stack.length && fire( stack.shift() );\n                        }  else {\n                            list = [];\n                        }\n                    }\n                },\n                self = {\n                    add: function() {\n                        if ( list ) {\n                            var start = list.length;\n                            (function add ( args ) {\n                                $.each( args, function( _, arg ) {\n                                    var type = $.type( arg );\n                                    if ( type === 'function' ) {\n                                        list.push( arg );\n                                    } else if ( arg && arg.length &&\n                                            type !== 'string' ) {\n    \n                                        add( arg );\n                                    }\n                                });\n                            })( arguments );\n    \n                            if ( firing ) {\n                                firingLength = list.length;\n                            } else if ( memory ) {\n                                firingStart = start;\n                                fire( memory );\n                            }\n                        }\n                        return this;\n                    },\n    \n                    disable: function() {\n                        list = stack = memory = undefined;\n                        return this;\n                    },\n    \n                    // Lock the list in its current state\n                    lock: function() {\n                        stack = undefined;\n                        if ( !memory ) {\n                            self.disable();\n                        }\n                        return this;\n                    },\n    \n                    fireWith: function( context, args ) {\n                        if ( list && (!fired || stack) ) {\n                            args = args || [];\n                            args = [ context, args.slice ? args.slice() : args ];\n                            if ( firing ) {\n                                stack.push( args );\n                            } else {\n                                fire( args );\n                            }\n                        }\n                        return this;\n                    },\n    \n                    fire: function() {\n                        self.fireWith( this, arguments );\n                        return this;\n                    }\n                },\n    \n                fired, firing, firingStart, firingLength, firingIndex, memory;\n    \n            return self;\n        }\n    \n        function Deferred( func ) {\n            var tuples = [\n                    // action, add listener, listener list, final state\n                    [ 'resolve', 'done', Callbacks( true ), 'resolved' ],\n                    [ 'reject', 'fail', Callbacks( true ), 'rejected' ],\n                    [ 'notify', 'progress', Callbacks() ]\n                ],\n                state = 'pending',\n                promise = {\n                    state: function() {\n                        return state;\n                    },\n                    always: function() {\n                        deferred.done( arguments ).fail( arguments );\n                        return this;\n                    },\n                    then: function( /* fnDone, fnFail, fnProgress */ ) {\n                        var fns = arguments;\n                        return Deferred(function( newDefer ) {\n                            $.each( tuples, function( i, tuple ) {\n                                var action = tuple[ 0 ],\n                                    fn = $.isFunction( fns[ i ] ) && fns[ i ];\n    \n                                // deferred[ done | fail | progress ] for\n                                // forwarding actions to newDefer\n                                deferred[ tuple[ 1 ] ](function() {\n                                    var returned;\n    \n                                    returned = fn && fn.apply( this, arguments );\n    \n                                    if ( returned &&\n                                            $.isFunction( returned.promise ) ) {\n    \n                                        returned.promise()\n                                                .done( newDefer.resolve )\n                                                .fail( newDefer.reject )\n                                                .progress( newDefer.notify );\n                                    } else {\n                                        newDefer[ action + 'With' ](\n                                                this === promise ?\n                                                newDefer.promise() :\n                                                this,\n                                                fn ? [ returned ] : arguments );\n                                    }\n                                });\n                            });\n                            fns = null;\n                        }).promise();\n                    },\n    \n                    // Get a promise for this deferred\n                    // If obj is provided, the promise aspect is added to the object\n                    promise: function( obj ) {\n    \n                        return obj != null ? $.extend( obj, promise ) : promise;\n                    }\n                },\n                deferred = {};\n    \n            // Keep pipe for back-compat\n            promise.pipe = promise.then;\n    \n            // Add list-specific methods\n            $.each( tuples, function( i, tuple ) {\n                var list = tuple[ 2 ],\n                    stateString = tuple[ 3 ];\n    \n                // promise[ done | fail | progress ] = list.add\n                promise[ tuple[ 1 ] ] = list.add;\n    \n                // Handle state\n                if ( stateString ) {\n                    list.add(function() {\n                        // state = [ resolved | rejected ]\n                        state = stateString;\n    \n                    // [ reject_list | resolve_list ].disable; progress_list.lock\n                    }, tuples[ i ^ 1 ][ 2 ].disable, tuples[ 2 ][ 2 ].lock );\n                }\n    \n                // deferred[ resolve | reject | notify ]\n                deferred[ tuple[ 0 ] ] = function() {\n                    deferred[ tuple[ 0 ] + 'With' ]( this === deferred ? promise :\n                            this, arguments );\n                    return this;\n                };\n                deferred[ tuple[ 0 ] + 'With' ] = list.fireWith;\n            });\n    \n            // Make the deferred a promise\n            promise.promise( deferred );\n    \n            // Call given func if any\n            if ( func ) {\n                func.call( deferred, deferred );\n            }\n    \n            // All done!\n            return deferred;\n        }\n    \n        api = {\n            /**\n             * 创建一个[Deferred](http://api.jquery.com/category/deferred-object/)对象。\n             * 详细的Deferred用法说明，请参照jQuery的API文档。\n             *\n             * Deferred对象在钩子回掉函数中经常要用到，用来处理需要等待的异步操作。\n             *\n             * @for  Base\n             * @method Deferred\n             * @grammar Base.Deferred() => Deferred\n             * @example\n             * // 在文件开始发送前做些异步操作。\n             * // WebUploader会等待此异步操作完成后，开始发送文件。\n             * Uploader.register({\n             *     'before-send-file': 'doSomthingAsync'\n             * }, {\n             *\n             *     doSomthingAsync: function() {\n             *         var deferred = Base.Deferred();\n             *\n             *         // 模拟一次异步操作。\n             *         setTimeout(deferred.resolve, 2000);\n             *\n             *         return deferred.promise();\n             *     }\n             * });\n             */\n            Deferred: Deferred,\n    \n            /**\n             * 判断传入的参数是否为一个promise对象。\n             * @method isPromise\n             * @grammar Base.isPromise( anything ) => Boolean\n             * @param  {*}  anything 检测对象。\n             * @return {Boolean}\n             * @for  Base\n             * @example\n             * console.log( Base.isPromise() );    // => false\n             * console.log( Base.isPromise({ key: '123' }) );    // => false\n             * console.log( Base.isPromise( Base.Deferred().promise() ) );    // => true\n             *\n             * // Deferred也是一个Promise\n             * console.log( Base.isPromise( Base.Deferred() ) );    // => true\n             */\n            isPromise: function( anything ) {\n                return anything && typeof anything.then === 'function';\n            },\n    \n            /**\n             * 返回一个promise，此promise在所有传入的promise都完成了后完成。\n             * 详细请查看[这里](http://api.jquery.com/jQuery.when/)。\n             *\n             * @method when\n             * @for  Base\n             * @grammar Base.when( promise1[, promise2[, promise3...]] ) => Promise\n             */\n            when: function( subordinate /* , ..., subordinateN */ ) {\n                var i = 0,\n                    slice = [].slice,\n                    resolveValues = slice.call( arguments ),\n                    length = resolveValues.length,\n    \n                    // the count of uncompleted subordinates\n                    remaining = length !== 1 || (subordinate &&\n                        $.isFunction( subordinate.promise )) ? length : 0,\n    \n                    // the master Deferred. If resolveValues consist of\n                    // only a single Deferred, just use that.\n                    deferred = remaining === 1 ? subordinate : Deferred(),\n    \n                    // Update function for both resolve and progress values\n                    updateFunc = function( i, contexts, values ) {\n                        return function( value ) {\n                            contexts[ i ] = this;\n                            values[ i ] = arguments.length > 1 ?\n                                    slice.call( arguments ) : value;\n    \n                            if ( values === progressValues ) {\n                                deferred.notifyWith( contexts, values );\n                            } else if ( !(--remaining) ) {\n                                deferred.resolveWith( contexts, values );\n                            }\n                        };\n                    },\n    \n                    progressValues, progressContexts, resolveContexts;\n    \n                // add listeners to Deferred subordinates; treat others as resolved\n                if ( length > 1 ) {\n                    progressValues = new Array( length );\n                    progressContexts = new Array( length );\n                    resolveContexts = new Array( length );\n                    for ( ; i < length; i++ ) {\n                        if ( resolveValues[ i ] &&\n                                $.isFunction( resolveValues[ i ].promise ) ) {\n    \n                            resolveValues[ i ].promise()\n                                    .done( updateFunc( i, resolveContexts,\n                                            resolveValues ) )\n                                    .fail( deferred.reject )\n                                    .progress( updateFunc( i, progressContexts,\n                                            progressValues ) );\n                        } else {\n                            --remaining;\n                        }\n                    }\n                }\n    \n                // if we're not waiting on anything, resolve the master\n                if ( !remaining ) {\n                    deferred.resolveWith( resolveContexts, resolveValues );\n                }\n    \n                return deferred.promise();\n            }\n        };\n    \n        return api;\n    });\n    define('promise',[\n        'promise-builtin'\n    ], function( $ ) {\n        return $;\n    });\n    /**\n     * @fileOverview 基础类方法。\n     */\n    \n    /**\n     * Web Uploader内部类的详细说明，以下提及的功能类，都可以在`WebUploader`这个变量中访问到。\n     *\n     * As you know, Web Uploader的每个文件都是用过[AMD](https://github.com/amdjs/amdjs-api/wiki/AMD)规范中的`define`组织起来的, 每个Module都会有个module id.\n     * 默认module id为该文件的路径，而此路径将会转化成名字空间存放在WebUploader中。如：\n     *\n     * * module `base`：WebUploader.Base\n     * * module `file`: WebUploader.File\n     * * module `lib/dnd`: WebUploader.Lib.Dnd\n     * * module `runtime/html5/dnd`: WebUploader.Runtime.Html5.Dnd\n     *\n     *\n     * 以下文档中对类的使用可能省略掉了`WebUploader`前缀。\n     * @module WebUploader\n     * @title WebUploader API文档\n     */\n    define('base',[\n        'dollar',\n        'promise'\n    ], function( $, promise ) {\n    \n        var noop = function() {},\n            call = Function.call;\n    \n        // http://jsperf.com/uncurrythis\n        // 反科里化\n        function uncurryThis( fn ) {\n            return function() {\n                return call.apply( fn, arguments );\n            };\n        }\n    \n        function bindFn( fn, context ) {\n            return function() {\n                return fn.apply( context, arguments );\n            };\n        }\n    \n        function createObject( proto ) {\n            var f;\n    \n            if ( Object.create ) {\n                return Object.create( proto );\n            } else {\n                f = function() {};\n                f.prototype = proto;\n                return new f();\n            }\n        }\n    \n    \n        /**\n         * 基础类，提供一些简单常用的方法。\n         * @class Base\n         */\n        return {\n    \n            /**\n             * @property {String} version 当前版本号。\n             */\n            version: '0.1.6',\n    \n            /**\n             * @property {jQuery|Zepto} $ 引用依赖的jQuery或者Zepto对象。\n             */\n            $: $,\n    \n            Deferred: promise.Deferred,\n    \n            isPromise: promise.isPromise,\n    \n            when: promise.when,\n    \n            /**\n             * @description  简单的浏览器检查结果。\n             *\n             * * `webkit`  webkit版本号，如果浏览器为非webkit内核，此属性为`undefined`。\n             * * `chrome`  chrome浏览器版本号，如果浏览器为chrome，此属性为`undefined`。\n             * * `ie`  ie浏览器版本号，如果浏览器为非ie，此属性为`undefined`。**暂不支持ie10+**\n             * * `firefox`  firefox浏览器版本号，如果浏览器为非firefox，此属性为`undefined`。\n             * * `safari`  safari浏览器版本号，如果浏览器为非safari，此属性为`undefined`。\n             * * `opera`  opera浏览器版本号，如果浏览器为非opera，此属性为`undefined`。\n             *\n             * @property {Object} [browser]\n             */\n            browser: (function( ua ) {\n                var ret = {},\n                    webkit = ua.match( /WebKit\\/([\\d.]+)/ ),\n                    chrome = ua.match( /Chrome\\/([\\d.]+)/ ) ||\n                        ua.match( /CriOS\\/([\\d.]+)/ ),\n    \n                    ie = ua.match( /MSIE\\s([\\d\\.]+)/ ) ||\n                        ua.match( /(?:trident)(?:.*rv:([\\w.]+))?/i ),\n                    firefox = ua.match( /Firefox\\/([\\d.]+)/ ),\n                    safari = ua.match( /Safari\\/([\\d.]+)/ ),\n                    opera = ua.match( /OPR\\/([\\d.]+)/ );\n    \n                webkit && (ret.webkit = parseFloat( webkit[ 1 ] ));\n                chrome && (ret.chrome = parseFloat( chrome[ 1 ] ));\n                ie && (ret.ie = parseFloat( ie[ 1 ] ));\n                firefox && (ret.firefox = parseFloat( firefox[ 1 ] ));\n                safari && (ret.safari = parseFloat( safari[ 1 ] ));\n                opera && (ret.opera = parseFloat( opera[ 1 ] ));\n    \n                return ret;\n            })( navigator.userAgent ),\n    \n            /**\n             * @description  操作系统检查结果。\n             *\n             * * `android`  如果在android浏览器环境下，此值为对应的android版本号，否则为`undefined`。\n             * * `ios` 如果在ios浏览器环境下，此值为对应的ios版本号，否则为`undefined`。\n             * @property {Object} [os]\n             */\n            os: (function( ua ) {\n                var ret = {},\n    \n                    // osx = !!ua.match( /\\(Macintosh\\; Intel / ),\n                    android = ua.match( /(?:Android);?[\\s\\/]+([\\d.]+)?/ ),\n                    ios = ua.match( /(?:iPad|iPod|iPhone).*OS\\s([\\d_]+)/ );\n    \n                // osx && (ret.osx = true);\n                android && (ret.android = parseFloat( android[ 1 ] ));\n                ios && (ret.ios = parseFloat( ios[ 1 ].replace( /_/g, '.' ) ));\n    \n                return ret;\n            })( navigator.userAgent ),\n    \n            /**\n             * 实现类与类之间的继承。\n             * @method inherits\n             * @grammar Base.inherits( super ) => child\n             * @grammar Base.inherits( super, protos ) => child\n             * @grammar Base.inherits( super, protos, statics ) => child\n             * @param  {Class} super 父类\n             * @param  {Object | Function} [protos] 子类或者对象。如果对象中包含constructor，子类将是用此属性值。\n             * @param  {Function} [protos.constructor] 子类构造器，不指定的话将创建个临时的直接执行父类构造器的方法。\n             * @param  {Object} [statics] 静态属性或方法。\n             * @return {Class} 返回子类。\n             * @example\n             * function Person() {\n             *     console.log( 'Super' );\n             * }\n             * Person.prototype.hello = function() {\n             *     console.log( 'hello' );\n             * };\n             *\n             * var Manager = Base.inherits( Person, {\n             *     world: function() {\n             *         console.log( 'World' );\n             *     }\n             * });\n             *\n             * // 因为没有指定构造器，父类的构造器将会执行。\n             * var instance = new Manager();    // => Super\n             *\n             * // 继承子父类的方法\n             * instance.hello();    // => hello\n             * instance.world();    // => World\n             *\n             * // 子类的__super__属性指向父类\n             * console.log( Manager.__super__ === Person );    // => true\n             */\n            inherits: function( Super, protos, staticProtos ) {\n                var child;\n    \n                if ( typeof protos === 'function' ) {\n                    child = protos;\n                    protos = null;\n                } else if ( protos && protos.hasOwnProperty('constructor') ) {\n                    child = protos.constructor;\n                } else {\n                    child = function() {\n                        return Super.apply( this, arguments );\n                    };\n                }\n    \n                // 复制静态方法\n                $.extend( true, child, Super, staticProtos || {} );\n    \n                /* jshint camelcase: false */\n    \n                // 让子类的__super__属性指向父类。\n                child.__super__ = Super.prototype;\n    \n                // 构建原型，添加原型方法或属性。\n                // 暂时用Object.create实现。\n                child.prototype = createObject( Super.prototype );\n                protos && $.extend( true, child.prototype, protos );\n    \n                return child;\n            },\n    \n            /**\n             * 一个不做任何事情的方法。可以用来赋值给默认的callback.\n             * @method noop\n             */\n            noop: noop,\n    \n            /**\n             * 返回一个新的方法，此方法将已指定的`context`来执行。\n             * @grammar Base.bindFn( fn, context ) => Function\n             * @method bindFn\n             * @example\n             * var doSomething = function() {\n             *         console.log( this.name );\n             *     },\n             *     obj = {\n             *         name: 'Object Name'\n             *     },\n             *     aliasFn = Base.bind( doSomething, obj );\n             *\n             *  aliasFn();    // => Object Name\n             *\n             */\n            bindFn: bindFn,\n    \n            /**\n             * 引用Console.log如果存在的话，否则引用一个[空函数noop](#WebUploader:Base.noop)。\n             * @grammar Base.log( args... ) => undefined\n             * @method log\n             */\n            log: (function() {\n                if ( window.console ) {\n                    return bindFn( console.log, console );\n                }\n                return noop;\n            })(),\n    \n            nextTick: (function() {\n    \n                return function( cb ) {\n                    setTimeout( cb, 1 );\n                };\n    \n                // @bug 当浏览器不在当前窗口时就停了。\n                // var next = window.requestAnimationFrame ||\n                //     window.webkitRequestAnimationFrame ||\n                //     window.mozRequestAnimationFrame ||\n                //     function( cb ) {\n                //         window.setTimeout( cb, 1000 / 60 );\n                //     };\n    \n                // // fix: Uncaught TypeError: Illegal invocation\n                // return bindFn( next, window );\n            })(),\n    \n            /**\n             * 被[uncurrythis](http://www.2ality.com/2011/11/uncurrying-this.html)的数组slice方法。\n             * 将用来将非数组对象转化成数组对象。\n             * @grammar Base.slice( target, start[, end] ) => Array\n             * @method slice\n             * @example\n             * function doSomthing() {\n             *     var args = Base.slice( arguments, 1 );\n             *     console.log( args );\n             * }\n             *\n             * doSomthing( 'ignored', 'arg2', 'arg3' );    // => Array [\"arg2\", \"arg3\"]\n             */\n            slice: uncurryThis( [].slice ),\n    \n            /**\n             * 生成唯一的ID\n             * @method guid\n             * @grammar Base.guid() => String\n             * @grammar Base.guid( prefx ) => String\n             */\n            guid: (function() {\n                var counter = 0;\n    \n                return function( prefix ) {\n                    var guid = (+new Date()).toString( 32 ),\n                        i = 0;\n    \n                    for ( ; i < 5; i++ ) {\n                        guid += Math.floor( Math.random() * 65535 ).toString( 32 );\n                    }\n    \n                    return (prefix || 'wu_') + guid + (counter++).toString( 32 );\n                };\n            })(),\n    \n            /**\n             * 格式化文件大小, 输出成带单位的字符串\n             * @method formatSize\n             * @grammar Base.formatSize( size ) => String\n             * @grammar Base.formatSize( size, pointLength ) => String\n             * @grammar Base.formatSize( size, pointLength, units ) => String\n             * @param {Number} size 文件大小\n             * @param {Number} [pointLength=2] 精确到的小数点数。\n             * @param {Array} [units=[ 'B', 'K', 'M', 'G', 'TB' ]] 单位数组。从字节，到千字节，一直往上指定。如果单位数组里面只指定了到了K(千字节)，同时文件大小大于M, 此方法的输出将还是显示成多少K.\n             * @example\n             * console.log( Base.formatSize( 100 ) );    // => 100B\n             * console.log( Base.formatSize( 1024 ) );    // => 1.00K\n             * console.log( Base.formatSize( 1024, 0 ) );    // => 1K\n             * console.log( Base.formatSize( 1024 * 1024 ) );    // => 1.00M\n             * console.log( Base.formatSize( 1024 * 1024 * 1024 ) );    // => 1.00G\n             * console.log( Base.formatSize( 1024 * 1024 * 1024, 0, ['B', 'KB', 'MB'] ) );    // => 1024MB\n             */\n            formatSize: function( size, pointLength, units ) {\n                var unit;\n    \n                units = units || [ 'B', 'K', 'M', 'G', 'TB' ];\n    \n                while ( (unit = units.shift()) && size > 1024 ) {\n                    size = size / 1024;\n                }\n    \n                return (unit === 'B' ? size : size.toFixed( pointLength || 2 )) +\n                        unit;\n            }\n        };\n    });\n    /**\n     * 事件处理类，可以独立使用，也可以扩展给对象使用。\n     * @fileOverview Mediator\n     */\n    define('mediator',[\n        'base'\n    ], function( Base ) {\n        var $ = Base.$,\n            slice = [].slice,\n            separator = /\\s+/,\n            protos;\n    \n        // 根据条件过滤出事件handlers.\n        function findHandlers( arr, name, callback, context ) {\n            return $.grep( arr, function( handler ) {\n                return handler &&\n                        (!name || handler.e === name) &&\n                        (!callback || handler.cb === callback ||\n                        handler.cb._cb === callback) &&\n                        (!context || handler.ctx === context);\n            });\n        }\n    \n        function eachEvent( events, callback, iterator ) {\n            // 不支持对象，只支持多个event用空格隔开\n            $.each( (events || '').split( separator ), function( _, key ) {\n                iterator( key, callback );\n            });\n        }\n    \n        function triggerHanders( events, args ) {\n            var stoped = false,\n                i = -1,\n                len = events.length,\n                handler;\n    \n            while ( ++i < len ) {\n                handler = events[ i ];\n    \n                if ( handler.cb.apply( handler.ctx2, args ) === false ) {\n                    stoped = true;\n                    break;\n                }\n            }\n    \n            return !stoped;\n        }\n    \n        protos = {\n    \n            /**\n             * 绑定事件。\n             *\n             * `callback`方法在执行时，arguments将会来源于trigger的时候携带的参数。如\n             * ```javascript\n             * var obj = {};\n             *\n             * // 使得obj有事件行为\n             * Mediator.installTo( obj );\n             *\n             * obj.on( 'testa', function( arg1, arg2 ) {\n             *     console.log( arg1, arg2 ); // => 'arg1', 'arg2'\n             * });\n             *\n             * obj.trigger( 'testa', 'arg1', 'arg2' );\n             * ```\n             *\n             * 如果`callback`中，某一个方法`return false`了，则后续的其他`callback`都不会被执行到。\n             * 切会影响到`trigger`方法的返回值，为`false`。\n             *\n             * `on`还可以用来添加一个特殊事件`all`, 这样所有的事件触发都会响应到。同时此类`callback`中的arguments有一个不同处，\n             * 就是第一个参数为`type`，记录当前是什么事件在触发。此类`callback`的优先级比脚低，会再正常`callback`执行完后触发。\n             * ```javascript\n             * obj.on( 'all', function( type, arg1, arg2 ) {\n             *     console.log( type, arg1, arg2 ); // => 'testa', 'arg1', 'arg2'\n             * });\n             * ```\n             *\n             * @method on\n             * @grammar on( name, callback[, context] ) => self\n             * @param  {String}   name     事件名，支持多个事件用空格隔开\n             * @param  {Function} callback 事件处理器\n             * @param  {Object}   [context]  事件处理器的上下文。\n             * @return {self} 返回自身，方便链式\n             * @chainable\n             * @class Mediator\n             */\n            on: function( name, callback, context ) {\n                var me = this,\n                    set;\n    \n                if ( !callback ) {\n                    return this;\n                }\n    \n                set = this._events || (this._events = []);\n    \n                eachEvent( name, callback, function( name, callback ) {\n                    var handler = { e: name };\n    \n                    handler.cb = callback;\n                    handler.ctx = context;\n                    handler.ctx2 = context || me;\n                    handler.id = set.length;\n    \n                    set.push( handler );\n                });\n    \n                return this;\n            },\n    \n            /**\n             * 绑定事件，且当handler执行完后，自动解除绑定。\n             * @method once\n             * @grammar once( name, callback[, context] ) => self\n             * @param  {String}   name     事件名\n             * @param  {Function} callback 事件处理器\n             * @param  {Object}   [context]  事件处理器的上下文。\n             * @return {self} 返回自身，方便链式\n             * @chainable\n             */\n            once: function( name, callback, context ) {\n                var me = this;\n    \n                if ( !callback ) {\n                    return me;\n                }\n    \n                eachEvent( name, callback, function( name, callback ) {\n                    var once = function() {\n                            me.off( name, once );\n                            return callback.apply( context || me, arguments );\n                        };\n    \n                    once._cb = callback;\n                    me.on( name, once, context );\n                });\n    \n                return me;\n            },\n    \n            /**\n             * 解除事件绑定\n             * @method off\n             * @grammar off( [name[, callback[, context] ] ] ) => self\n             * @param  {String}   [name]     事件名\n             * @param  {Function} [callback] 事件处理器\n             * @param  {Object}   [context]  事件处理器的上下文。\n             * @return {self} 返回自身，方便链式\n             * @chainable\n             */\n            off: function( name, cb, ctx ) {\n                var events = this._events;\n    \n                if ( !events ) {\n                    return this;\n                }\n    \n                if ( !name && !cb && !ctx ) {\n                    this._events = [];\n                    return this;\n                }\n    \n                eachEvent( name, cb, function( name, cb ) {\n                    $.each( findHandlers( events, name, cb, ctx ), function() {\n                        delete events[ this.id ];\n                    });\n                });\n    \n                return this;\n            },\n    \n            /**\n             * 触发事件\n             * @method trigger\n             * @grammar trigger( name[, args...] ) => self\n             * @param  {String}   type     事件名\n             * @param  {*} [...] 任意参数\n             * @return {Boolean} 如果handler中return false了，则返回false, 否则返回true\n             */\n            trigger: function( type ) {\n                var args, events, allEvents;\n    \n                if ( !this._events || !type ) {\n                    return this;\n                }\n    \n                args = slice.call( arguments, 1 );\n                events = findHandlers( this._events, type );\n                allEvents = findHandlers( this._events, 'all' );\n    \n                return triggerHanders( events, args ) &&\n                        triggerHanders( allEvents, arguments );\n            }\n        };\n    \n        /**\n         * 中介者，它本身是个单例，但可以通过[installTo](#WebUploader:Mediator:installTo)方法，使任何对象具备事件行为。\n         * 主要目的是负责模块与模块之间的合作，降低耦合度。\n         *\n         * @class Mediator\n         */\n        return $.extend({\n    \n            /**\n             * 可以通过这个接口，使任何对象具备事件功能。\n             * @method installTo\n             * @param  {Object} obj 需要具备事件行为的对象。\n             * @return {Object} 返回obj.\n             */\n            installTo: function( obj ) {\n                return $.extend( obj, protos );\n            }\n    \n        }, protos );\n    });\n    /**\n     * @fileOverview Uploader上传类\n     */\n    define('uploader',[\n        'base',\n        'mediator'\n    ], function( Base, Mediator ) {\n    \n        var $ = Base.$;\n    \n        /**\n         * 上传入口类。\n         * @class Uploader\n         * @constructor\n         * @grammar new Uploader( opts ) => Uploader\n         * @example\n         * var uploader = WebUploader.Uploader({\n         *     swf: 'path_of_swf/Uploader.swf',\n         *\n         *     // 开起分片上传。\n         *     chunked: true\n         * });\n         */\n        function Uploader( opts ) {\n            this.options = $.extend( true, {}, Uploader.options, opts );\n            this._init( this.options );\n        }\n    \n        // default Options\n        // widgets中有相应扩展\n        Uploader.options = {};\n        Mediator.installTo( Uploader.prototype );\n    \n        // 批量添加纯命令式方法。\n        $.each({\n            upload: 'start-upload',\n            stop: 'stop-upload',\n            getFile: 'get-file',\n            getFiles: 'get-files',\n            addFile: 'add-file',\n            addFiles: 'add-file',\n            sort: 'sort-files',\n            removeFile: 'remove-file',\n            cancelFile: 'cancel-file',\n            skipFile: 'skip-file',\n            retry: 'retry',\n            isInProgress: 'is-in-progress',\n            makeThumb: 'make-thumb',\n            md5File: 'md5-file',\n            getDimension: 'get-dimension',\n            addButton: 'add-btn',\n            predictRuntimeType: 'predict-runtime-type',\n            refresh: 'refresh',\n            disable: 'disable',\n            enable: 'enable',\n            reset: 'reset'\n        }, function( fn, command ) {\n            Uploader.prototype[ fn ] = function() {\n                return this.request( command, arguments );\n            };\n        });\n    \n        $.extend( Uploader.prototype, {\n            state: 'pending',\n    \n            _init: function( opts ) {\n                var me = this;\n    \n                me.request( 'init', opts, function() {\n                    me.state = 'ready';\n                    me.trigger('ready');\n                });\n            },\n    \n            /**\n             * 获取或者设置Uploader配置项。\n             * @method option\n             * @grammar option( key ) => *\n             * @grammar option( key, val ) => self\n             * @example\n             *\n             * // 初始状态图片上传前不会压缩\n             * var uploader = new WebUploader.Uploader({\n             *     compress: null;\n             * });\n             *\n             * // 修改后图片上传前，尝试将图片压缩到1600 * 1600\n             * uploader.option( 'compress', {\n             *     width: 1600,\n             *     height: 1600\n             * });\n             */\n            option: function( key, val ) {\n                var opts = this.options;\n    \n                // setter\n                if ( arguments.length > 1 ) {\n    \n                    if ( $.isPlainObject( val ) &&\n                            $.isPlainObject( opts[ key ] ) ) {\n                        $.extend( opts[ key ], val );\n                    } else {\n                        opts[ key ] = val;\n                    }\n    \n                } else {    // getter\n                    return key ? opts[ key ] : opts;\n                }\n            },\n    \n            /**\n             * 获取文件统计信息。返回一个包含一下信息的对象。\n             * * `successNum` 上传成功的文件数\n             * * `progressNum` 上传中的文件数\n             * * `cancelNum` 被删除的文件数\n             * * `invalidNum` 无效的文件数\n             * * `uploadFailNum` 上传失败的文件数\n             * * `queueNum` 还在队列中的文件数\n             * * `interruptNum` 被暂停的文件数\n             * @method getStats\n             * @grammar getStats() => Object\n             */\n            getStats: function() {\n                // return this._mgr.getStats.apply( this._mgr, arguments );\n                var stats = this.request('get-stats');\n    \n                return stats ? {\n                    successNum: stats.numOfSuccess,\n                    progressNum: stats.numOfProgress,\n    \n                    // who care?\n                    // queueFailNum: 0,\n                    cancelNum: stats.numOfCancel,\n                    invalidNum: stats.numOfInvalid,\n                    uploadFailNum: stats.numOfUploadFailed,\n                    queueNum: stats.numOfQueue,\n                    interruptNum: stats.numofInterrupt\n                } : {};\n            },\n    \n            // 需要重写此方法来来支持opts.onEvent和instance.onEvent的处理器\n            trigger: function( type/*, args...*/ ) {\n                var args = [].slice.call( arguments, 1 ),\n                    opts = this.options,\n                    name = 'on' + type.substring( 0, 1 ).toUpperCase() +\n                        type.substring( 1 );\n    \n                if (\n                        // 调用通过on方法注册的handler.\n                        Mediator.trigger.apply( this, arguments ) === false ||\n    \n                        // 调用opts.onEvent\n                        $.isFunction( opts[ name ] ) &&\n                        opts[ name ].apply( this, args ) === false ||\n    \n                        // 调用this.onEvent\n                        $.isFunction( this[ name ] ) &&\n                        this[ name ].apply( this, args ) === false ||\n    \n                        // 广播所有uploader的事件。\n                        Mediator.trigger.apply( Mediator,\n                        [ this, type ].concat( args ) ) === false ) {\n    \n                    return false;\n                }\n    \n                return true;\n            },\n    \n            /**\n             * 销毁 webuploader 实例\n             * @method destroy\n             * @grammar destroy() => undefined\n             */\n            destroy: function() {\n                this.request( 'destroy', arguments );\n                this.off();\n            },\n    \n            // widgets/widget.js将补充此方法的详细文档。\n            request: Base.noop\n        });\n    \n        /**\n         * 创建Uploader实例，等同于new Uploader( opts );\n         * @method create\n         * @class Base\n         * @static\n         * @grammar Base.create( opts ) => Uploader\n         */\n        Base.create = Uploader.create = function( opts ) {\n            return new Uploader( opts );\n        };\n    \n        // 暴露Uploader，可以通过它来扩展业务逻辑。\n        Base.Uploader = Uploader;\n    \n        return Uploader;\n    });\n    /**\n     * @fileOverview Runtime管理器，负责Runtime的选择, 连接\n     */\n    define('runtime/runtime',[\n        'base',\n        'mediator'\n    ], function( Base, Mediator ) {\n    \n        var $ = Base.$,\n            factories = {},\n    \n            // 获取对象的第一个key\n            getFirstKey = function( obj ) {\n                for ( var key in obj ) {\n                    if ( obj.hasOwnProperty( key ) ) {\n                        return key;\n                    }\n                }\n                return null;\n            };\n    \n        // 接口类。\n        function Runtime( options ) {\n            this.options = $.extend({\n                container: document.body\n            }, options );\n            this.uid = Base.guid('rt_');\n        }\n    \n        $.extend( Runtime.prototype, {\n    \n            getContainer: function() {\n                var opts = this.options,\n                    parent, container;\n    \n                if ( this._container ) {\n                    return this._container;\n                }\n    \n                parent = $( opts.container || document.body );\n                container = $( document.createElement('div') );\n    \n                container.attr( 'id', 'rt_' + this.uid );\n                container.css({\n                    position: 'absolute',\n                    top: '0px',\n                    left: '0px',\n                    width: '1px',\n                    height: '1px',\n                    overflow: 'hidden'\n                });\n    \n                parent.append( container );\n                parent.addClass('webuploader-container');\n                this._container = container;\n                this._parent = parent;\n                return container;\n            },\n    \n            init: Base.noop,\n            exec: Base.noop,\n    \n            destroy: function() {\n                this._container && this._container.remove();\n                this._parent && this._parent.removeClass('webuploader-container');\n                this.off();\n            }\n        });\n    \n        Runtime.orders = 'html5,flash';\n    \n    \n        /**\n         * 添加Runtime实现。\n         * @param {String} type    类型\n         * @param {Runtime} factory 具体Runtime实现。\n         */\n        Runtime.addRuntime = function( type, factory ) {\n            factories[ type ] = factory;\n        };\n    \n        Runtime.hasRuntime = function( type ) {\n            return !!(type ? factories[ type ] : getFirstKey( factories ));\n        };\n    \n        Runtime.create = function( opts, orders ) {\n            var type, runtime;\n    \n            orders = orders || Runtime.orders;\n            $.each( orders.split( /\\s*,\\s*/g ), function() {\n                if ( factories[ this ] ) {\n                    type = this;\n                    return false;\n                }\n            });\n    \n            type = type || getFirstKey( factories );\n    \n            if ( !type ) {\n                throw new Error('Runtime Error');\n            }\n    \n            runtime = new factories[ type ]( opts );\n            return runtime;\n        };\n    \n        Mediator.installTo( Runtime.prototype );\n        return Runtime;\n    });\n    \n    /**\n     * @fileOverview Runtime管理器，负责Runtime的选择, 连接\n     */\n    define('runtime/client',[\n        'base',\n        'mediator',\n        'runtime/runtime'\n    ], function( Base, Mediator, Runtime ) {\n    \n        var cache;\n    \n        cache = (function() {\n            var obj = {};\n    \n            return {\n                add: function( runtime ) {\n                    obj[ runtime.uid ] = runtime;\n                },\n    \n                get: function( ruid, standalone ) {\n                    var i;\n    \n                    if ( ruid ) {\n                        return obj[ ruid ];\n                    }\n    \n                    for ( i in obj ) {\n                        // 有些类型不能重用，比如filepicker.\n                        if ( standalone && obj[ i ].__standalone ) {\n                            continue;\n                        }\n    \n                        return obj[ i ];\n                    }\n    \n                    return null;\n                },\n    \n                remove: function( runtime ) {\n                    delete obj[ runtime.uid ];\n                }\n            };\n        })();\n    \n        function RuntimeClient( component, standalone ) {\n            var deferred = Base.Deferred(),\n                runtime;\n    \n            this.uid = Base.guid('client_');\n    \n            // 允许runtime没有初始化之前，注册一些方法在初始化后执行。\n            this.runtimeReady = function( cb ) {\n                return deferred.done( cb );\n            };\n    \n            this.connectRuntime = function( opts, cb ) {\n    \n                // already connected.\n                if ( runtime ) {\n                    throw new Error('already connected!');\n                }\n    \n                deferred.done( cb );\n    \n                if ( typeof opts === 'string' && cache.get( opts ) ) {\n                    runtime = cache.get( opts );\n                }\n    \n                // 像filePicker只能独立存在，不能公用。\n                runtime = runtime || cache.get( null, standalone );\n    \n                // 需要创建\n                if ( !runtime ) {\n                    runtime = Runtime.create( opts, opts.runtimeOrder );\n                    runtime.__promise = deferred.promise();\n                    runtime.once( 'ready', deferred.resolve );\n                    runtime.init();\n                    cache.add( runtime );\n                    runtime.__client = 1;\n                } else {\n                    // 来自cache\n                    Base.$.extend( runtime.options, opts );\n                    runtime.__promise.then( deferred.resolve );\n                    runtime.__client++;\n                }\n    \n                standalone && (runtime.__standalone = standalone);\n                return runtime;\n            };\n    \n            this.getRuntime = function() {\n                return runtime;\n            };\n    \n            this.disconnectRuntime = function() {\n                if ( !runtime ) {\n                    return;\n                }\n    \n                runtime.__client--;\n    \n                if ( runtime.__client <= 0 ) {\n                    cache.remove( runtime );\n                    delete runtime.__promise;\n                    runtime.destroy();\n                }\n    \n                runtime = null;\n            };\n    \n            this.exec = function() {\n                if ( !runtime ) {\n                    return;\n                }\n    \n                var args = Base.slice( arguments );\n                component && args.unshift( component );\n    \n                return runtime.exec.apply( this, args );\n            };\n    \n            this.getRuid = function() {\n                return runtime && runtime.uid;\n            };\n    \n            this.destroy = (function( destroy ) {\n                return function() {\n                    destroy && destroy.apply( this, arguments );\n                    this.trigger('destroy');\n                    this.off();\n                    this.exec('destroy');\n                    this.disconnectRuntime();\n                };\n            })( this.destroy );\n        }\n    \n        Mediator.installTo( RuntimeClient.prototype );\n        return RuntimeClient;\n    });\n    /**\n     * @fileOverview Blob\n     */\n    define('lib/blob',[\n        'base',\n        'runtime/client'\n    ], function( Base, RuntimeClient ) {\n    \n        function Blob( ruid, source ) {\n            var me = this;\n    \n            me.source = source;\n            me.ruid = ruid;\n            this.size = source.size || 0;\n    \n            // 如果没有指定 mimetype, 但是知道文件后缀。\n            if ( !source.type && this.ext &&\n                    ~'jpg,jpeg,png,gif,bmp'.indexOf( this.ext ) ) {\n                this.type = 'image/' + (this.ext === 'jpg' ? 'jpeg' : this.ext);\n            } else {\n                this.type = source.type || 'application/octet-stream';\n            }\n    \n            RuntimeClient.call( me, 'Blob' );\n            this.uid = source.uid || this.uid;\n    \n            if ( ruid ) {\n                me.connectRuntime( ruid );\n            }\n        }\n    \n        Base.inherits( RuntimeClient, {\n            constructor: Blob,\n    \n            slice: function( start, end ) {\n                return this.exec( 'slice', start, end );\n            },\n    \n            getSource: function() {\n                return this.source;\n            }\n        });\n    \n        return Blob;\n    });\n    /**\n     * 为了统一化Flash的File和HTML5的File而存在。\n     * 以至于要调用Flash里面的File，也可以像调用HTML5版本的File一下。\n     * @fileOverview File\n     */\n    define('lib/file',[\n        'base',\n        'lib/blob'\n    ], function( Base, Blob ) {\n    \n        var uid = 1,\n            rExt = /\\.([^.]+)$/;\n    \n        function File( ruid, file ) {\n            var ext;\n    \n            this.name = file.name || ('untitled' + uid++);\n            ext = rExt.exec( file.name ) ? RegExp.$1.toLowerCase() : '';\n    \n            // todo 支持其他类型文件的转换。\n            // 如果有 mimetype, 但是文件名里面没有找出后缀规律\n            if ( !ext && file.type ) {\n                ext = /\\/(jpg|jpeg|png|gif|bmp)$/i.exec( file.type ) ?\n                        RegExp.$1.toLowerCase() : '';\n                this.name += '.' + ext;\n            }\n    \n            this.ext = ext;\n            this.lastModifiedDate = file.lastModifiedDate ||\n                    (new Date()).toLocaleString();\n    \n            Blob.apply( this, arguments );\n        }\n    \n        return Base.inherits( Blob, File );\n    });\n    \n    /**\n     * @fileOverview 错误信息\n     */\n    define('lib/filepicker',[\n        'base',\n        'runtime/client',\n        'lib/file'\n    ], function( Base, RuntimeClient, File ) {\n    \n        var $ = Base.$;\n    \n        function FilePicker( opts ) {\n            opts = this.options = $.extend({}, FilePicker.options, opts );\n    \n            opts.container = $( opts.id );\n    \n            if ( !opts.container.length ) {\n                throw new Error('按钮指定错误');\n            }\n    \n            opts.innerHTML = opts.innerHTML || opts.label ||\n                    opts.container.html() || '';\n    \n            opts.button = $( opts.button || document.createElement('div') );\n            opts.button.html( opts.innerHTML );\n            opts.container.html( opts.button );\n    \n            RuntimeClient.call( this, 'FilePicker', true );\n        }\n    \n        FilePicker.options = {\n            button: null,\n            container: null,\n            label: null,\n            innerHTML: null,\n            multiple: true,\n            accept: null,\n            name: 'file',\n            style: 'webuploader-pick'   //pick element class attribute, default is \"webuploader-pick\"\n        };\n    \n        Base.inherits( RuntimeClient, {\n            constructor: FilePicker,\n    \n            init: function() {\n                var me = this,\n                    opts = me.options,\n                    button = opts.button,\n                    style = opts.style;\n    \n                if (style)\n                    button.addClass('webuploader-pick');\n    \n                me.on( 'all', function( type ) {\n                    var files;\n    \n                    switch ( type ) {\n                        case 'mouseenter':\n                            if (style)\n                                button.addClass('webuploader-pick-hover');\n                            break;\n    \n                        case 'mouseleave':\n                            if (style)\n                                button.removeClass('webuploader-pick-hover');\n                            break;\n    \n                        case 'change':\n                            files = me.exec('getFiles');\n                            me.trigger( 'select', $.map( files, function( file ) {\n                                file = new File( me.getRuid(), file );\n    \n                                // 记录来源。\n                                file._refer = opts.container;\n                                return file;\n                            }), opts.container );\n                            break;\n                    }\n                });\n    \n                me.connectRuntime( opts, function() {\n                    me.refresh();\n                    me.exec( 'init', opts );\n                    me.trigger('ready');\n                });\n    \n                this._resizeHandler = Base.bindFn( this.refresh, this );\n                $( window ).on( 'resize', this._resizeHandler );\n            },\n    \n            refresh: function() {\n                var shimContainer = this.getRuntime().getContainer(),\n                    button = this.options.button,\n                    width = button.outerWidth ?\n                            button.outerWidth() : button.width(),\n    \n                    height = button.outerHeight ?\n                            button.outerHeight() : button.height(),\n    \n                    pos = button.offset();\n    \n                width && height && shimContainer.css({\n                    bottom: 'auto',\n                    right: 'auto',\n                    width: width + 'px',\n                    height: height + 'px'\n                }).offset( pos );\n            },\n    \n            enable: function() {\n                var btn = this.options.button;\n    \n                btn.removeClass('webuploader-pick-disable');\n                this.refresh();\n            },\n    \n            disable: function() {\n                var btn = this.options.button;\n    \n                this.getRuntime().getContainer().css({\n                    top: '-99999px'\n                });\n    \n                btn.addClass('webuploader-pick-disable');\n            },\n    \n            destroy: function() {\n                var btn = this.options.button;\n                $( window ).off( 'resize', this._resizeHandler );\n                btn.removeClass('webuploader-pick-disable webuploader-pick-hover ' +\n                    'webuploader-pick');\n            }\n        });\n    \n        return FilePicker;\n    });\n    \n    /**\n     * @fileOverview 组件基类。\n     */\n    define('widgets/widget',[\n        'base',\n        'uploader'\n    ], function( Base, Uploader ) {\n    \n        var $ = Base.$,\n            _init = Uploader.prototype._init,\n            _destroy = Uploader.prototype.destroy,\n            IGNORE = {},\n            widgetClass = [];\n    \n        function isArrayLike( obj ) {\n            if ( !obj ) {\n                return false;\n            }\n    \n            var length = obj.length,\n                type = $.type( obj );\n    \n            if ( obj.nodeType === 1 && length ) {\n                return true;\n            }\n    \n            return type === 'array' || type !== 'function' && type !== 'string' &&\n                    (length === 0 || typeof length === 'number' && length > 0 &&\n                    (length - 1) in obj);\n        }\n    \n        function Widget( uploader ) {\n            this.owner = uploader;\n            this.options = uploader.options;\n        }\n    \n        $.extend( Widget.prototype, {\n    \n            init: Base.noop,\n    \n            // 类Backbone的事件监听声明，监听uploader实例上的事件\n            // widget直接无法监听事件，事件只能通过uploader来传递\n            invoke: function( apiName, args ) {\n    \n                /*\n                    {\n                        'make-thumb': 'makeThumb'\n                    }\n                 */\n                var map = this.responseMap;\n    \n                // 如果无API响应声明则忽略\n                if ( !map || !(apiName in map) || !(map[ apiName ] in this) ||\n                        !$.isFunction( this[ map[ apiName ] ] ) ) {\n    \n                    return IGNORE;\n                }\n    \n                return this[ map[ apiName ] ].apply( this, args );\n    \n            },\n    \n            /**\n             * 发送命令。当传入`callback`或者`handler`中返回`promise`时。返回一个当所有`handler`中的promise都完成后完成的新`promise`。\n             * @method request\n             * @grammar request( command, args ) => * | Promise\n             * @grammar request( command, args, callback ) => Promise\n             * @for  Uploader\n             */\n            request: function() {\n                return this.owner.request.apply( this.owner, arguments );\n            }\n        });\n    \n        // 扩展Uploader.\n        $.extend( Uploader.prototype, {\n    \n            /**\n             * @property {String | Array} [disableWidgets=undefined]\n             * @namespace options\n             * @for Uploader\n             * @description 默认所有 Uploader.register 了的 widget 都会被加载，如果禁用某一部分，请通过此 option 指定黑名单。\n             */\n    \n            // 覆写_init用来初始化widgets\n            _init: function() {\n                var me = this,\n                    widgets = me._widgets = [],\n                    deactives = me.options.disableWidgets || '';\n    \n                $.each( widgetClass, function( _, klass ) {\n                    (!deactives || !~deactives.indexOf( klass._name )) &&\n                        widgets.push( new klass( me ) );\n                });\n    \n                return _init.apply( me, arguments );\n            },\n    \n            request: function( apiName, args, callback ) {\n                var i = 0,\n                    widgets = this._widgets,\n                    len = widgets && widgets.length,\n                    rlts = [],\n                    dfds = [],\n                    widget, rlt, promise, key;\n    \n                args = isArrayLike( args ) ? args : [ args ];\n    \n                for ( ; i < len; i++ ) {\n                    widget = widgets[ i ];\n                    rlt = widget.invoke( apiName, args );\n    \n                    if ( rlt !== IGNORE ) {\n    \n                        // Deferred对象\n                        if ( Base.isPromise( rlt ) ) {\n                            dfds.push( rlt );\n                        } else {\n                            rlts.push( rlt );\n                        }\n                    }\n                }\n    \n                // 如果有callback，则用异步方式。\n                if ( callback || dfds.length ) {\n                    promise = Base.when.apply( Base, dfds );\n                    key = promise.pipe ? 'pipe' : 'then';\n    \n                    // 很重要不能删除。删除了会死循环。\n                    // 保证执行顺序。让callback总是在下一个 tick 中执行。\n                    return promise[ key ](function() {\n                                var deferred = Base.Deferred(),\n                                    args = arguments;\n    \n                                if ( args.length === 1 ) {\n                                    args = args[ 0 ];\n                                }\n    \n                                setTimeout(function() {\n                                    deferred.resolve( args );\n                                }, 1 );\n    \n                                return deferred.promise();\n                            })[ callback ? key : 'done' ]( callback || Base.noop );\n                } else {\n                    return rlts[ 0 ];\n                }\n            },\n    \n            destroy: function() {\n                _destroy.apply( this, arguments );\n                this._widgets = null;\n            }\n        });\n    \n        /**\n         * 添加组件\n         * @grammar Uploader.register(proto);\n         * @grammar Uploader.register(map, proto);\n         * @param  {object} responseMap API 名称与函数实现的映射\n         * @param  {object} proto 组件原型，构造函数通过 constructor 属性定义\n         * @method Uploader.register\n         * @for Uploader\n         * @example\n         * Uploader.register({\n         *     'make-thumb': 'makeThumb'\n         * }, {\n         *     init: function( options ) {},\n         *     makeThumb: function() {}\n         * });\n         *\n         * Uploader.register({\n         *     'make-thumb': function() {\n         *         \n         *     }\n         * });\n         */\n        Uploader.register = Widget.register = function( responseMap, widgetProto ) {\n            var map = { init: 'init', destroy: 'destroy', name: 'anonymous' },\n                klass;\n    \n            if ( arguments.length === 1 ) {\n                widgetProto = responseMap;\n    \n                // 自动生成 map 表。\n                $.each(widgetProto, function(key) {\n                    if ( key[0] === '_' || key === 'name' ) {\n                        key === 'name' && (map.name = widgetProto.name);\n                        return;\n                    }\n    \n                    map[key.replace(/[A-Z]/g, '-$&').toLowerCase()] = key;\n                });\n    \n            } else {\n                map = $.extend( map, responseMap );\n            }\n    \n            widgetProto.responseMap = map;\n            klass = Base.inherits( Widget, widgetProto );\n            klass._name = map.name;\n            widgetClass.push( klass );\n    \n            return klass;\n        };\n    \n        /**\n         * 删除插件，只有在注册时指定了名字的才能被删除。\n         * @grammar Uploader.unRegister(name);\n         * @param  {string} name 组件名字\n         * @method Uploader.unRegister\n         * @for Uploader\n         * @example\n         *\n         * Uploader.register({\n         *     name: 'custom',\n         *     \n         *     'make-thumb': function() {\n         *         \n         *     }\n         * });\n         *\n         * Uploader.unRegister('custom');\n         */\n        Uploader.unRegister = Widget.unRegister = function( name ) {\n            if ( !name || name === 'anonymous' ) {\n                return;\n            }\n            \n            // 删除指定的插件。\n            for ( var i = widgetClass.length; i--; ) {\n                if ( widgetClass[i]._name === name ) {\n                    widgetClass.splice(i, 1)\n                }\n            }\n        };\n    \n        return Widget;\n    });\n    /**\n     * @fileOverview 文件选择相关\n     */\n    define('widgets/filepicker',[\n        'base',\n        'uploader',\n        'lib/filepicker',\n        'widgets/widget'\n    ], function( Base, Uploader, FilePicker ) {\n        var $ = Base.$;\n    \n        $.extend( Uploader.options, {\n    \n            /**\n             * @property {Selector | Object} [pick=undefined]\n             * @namespace options\n             * @for Uploader\n             * @description 指定选择文件的按钮容器，不指定则不创建按钮。\n             *\n             * * `id` {Seletor|dom} 指定选择文件的按钮容器，不指定则不创建按钮。**注意** 这里虽然写的是 id, 但是不是只支持 id, 还支持 class, 或者 dom 节点。\n             * * `label` {String} 请采用 `innerHTML` 代替\n             * * `innerHTML` {String} 指定按钮文字。不指定时优先从指定的容器中看是否自带文字。\n             * * `multiple` {Boolean} 是否开起同时选择多个文件能力。\n             */\n            pick: null,\n    \n            /**\n             * @property {Arroy} [accept=null]\n             * @namespace options\n             * @for Uploader\n             * @description 指定接受哪些类型的文件。 由于目前还有ext转mimeType表，所以这里需要分开指定。\n             *\n             * * `title` {String} 文字描述\n             * * `extensions` {String} 允许的文件后缀，不带点，多个用逗号分割。\n             * * `mimeTypes` {String} 多个用逗号分割。\n             *\n             * 如：\n             *\n             * ```\n             * {\n             *     title: 'Images',\n             *     extensions: 'gif,jpg,jpeg,bmp,png',\n             *     mimeTypes: 'image/*'\n             * }\n             * ```\n             */\n            accept: null/*{\n                title: 'Images',\n                extensions: 'gif,jpg,jpeg,bmp,png',\n                mimeTypes: 'image/*'\n            }*/\n        });\n    \n        return Uploader.register({\n            name: 'picker',\n    \n            init: function( opts ) {\n                this.pickers = [];\n                return opts.pick && this.addBtn( opts.pick );\n            },\n    \n            refresh: function() {\n                $.each( this.pickers, function() {\n                    this.refresh();\n                });\n            },\n    \n            /**\n             * @method addBtn\n             * @for Uploader\n             * @grammar addBtn( pick ) => Promise\n             * @description\n             * 添加文件选择按钮，如果一个按钮不够，需要调用此方法来添加。参数跟[options.pick](#WebUploader:Uploader:options)一致。\n             * @example\n             * uploader.addBtn({\n             *     id: '#btnContainer',\n             *     innerHTML: '选择文件'\n             * });\n             */\n            addBtn: function( pick ) {\n                var me = this,\n                    opts = me.options,\n                    accept = opts.accept,\n                    promises = [];\n    \n                if ( !pick ) {\n                    return;\n                }\n    \n                $.isPlainObject( pick ) || (pick = {\n                    id: pick\n                });\n    \n                $( pick.id ).each(function() {\n                    var options, picker, deferred;\n    \n                    deferred = Base.Deferred();\n    \n                    options = $.extend({}, pick, {\n                        accept: $.isPlainObject( accept ) ? [ accept ] : accept,\n                        swf: opts.swf,\n                        runtimeOrder: opts.runtimeOrder,\n                        id: this\n                    });\n    \n                    picker = new FilePicker( options );\n    \n                    picker.once( 'ready', deferred.resolve );\n                    picker.on( 'select', function( files ) {\n                        me.owner.request( 'add-file', [ files ]);\n                    });\n                    picker.on('dialogopen', function() {\n                        me.owner.trigger('dialogOpen', picker.button);\n                    });\n                    picker.init();\n    \n                    me.pickers.push( picker );\n    \n                    promises.push( deferred.promise() );\n                });\n    \n                return Base.when.apply( Base, promises );\n            },\n    \n            disable: function() {\n                $.each( this.pickers, function() {\n                    this.disable();\n                });\n            },\n    \n            enable: function() {\n                $.each( this.pickers, function() {\n                    this.enable();\n                });\n            },\n    \n            destroy: function() {\n                $.each( this.pickers, function() {\n                    this.destroy();\n                });\n                this.pickers = null;\n            }\n        });\n    });\n    /**\n     * @fileOverview Image\n     */\n    define('lib/image',[\n        'base',\n        'runtime/client',\n        'lib/blob'\n    ], function( Base, RuntimeClient, Blob ) {\n        var $ = Base.$;\n    \n        // 构造器。\n        function Image( opts ) {\n            this.options = $.extend({}, Image.options, opts );\n            RuntimeClient.call( this, 'Image' );\n    \n            this.on( 'load', function() {\n                this._info = this.exec('info');\n                this._meta = this.exec('meta');\n            });\n        }\n    \n        // 默认选项。\n        Image.options = {\n    \n            // 默认的图片处理质量\n            quality: 90,\n    \n            // 是否裁剪\n            crop: false,\n    \n            // 是否保留头部信息\n            preserveHeaders: false,\n    \n            // 是否允许放大。\n            allowMagnify: false\n        };\n    \n        // 继承RuntimeClient.\n        Base.inherits( RuntimeClient, {\n            constructor: Image,\n    \n            info: function( val ) {\n    \n                // setter\n                if ( val ) {\n                    this._info = val;\n                    return this;\n                }\n    \n                // getter\n                return this._info;\n            },\n    \n            meta: function( val ) {\n    \n                // setter\n                if ( val ) {\n                    this._meta = val;\n                    return this;\n                }\n    \n                // getter\n                return this._meta;\n            },\n    \n            loadFromBlob: function( blob ) {\n                var me = this,\n                    ruid = blob.getRuid();\n    \n                this.connectRuntime( ruid, function() {\n                    me.exec( 'init', me.options );\n                    me.exec( 'loadFromBlob', blob );\n                });\n            },\n    \n            resize: function() {\n                var args = Base.slice( arguments );\n                return this.exec.apply( this, [ 'resize' ].concat( args ) );\n            },\n    \n            crop: function() {\n                var args = Base.slice( arguments );\n                return this.exec.apply( this, [ 'crop' ].concat( args ) );\n            },\n    \n            getAsDataUrl: function( type ) {\n                return this.exec( 'getAsDataUrl', type );\n            },\n    \n            getAsBlob: function( type ) {\n                var blob = this.exec( 'getAsBlob', type );\n    \n                return new Blob( this.getRuid(), blob );\n            }\n        });\n    \n        return Image;\n    });\n    /**\n     * @fileOverview 图片操作, 负责预览图片和上传前压缩图片\n     */\n    define('widgets/image',[\n        'base',\n        'uploader',\n        'lib/image',\n        'widgets/widget'\n    ], function( Base, Uploader, Image ) {\n    \n        var $ = Base.$,\n            throttle;\n    \n        // 根据要处理的文件大小来节流，一次不能处理太多，会卡。\n        throttle = (function( max ) {\n            var occupied = 0,\n                waiting = [],\n                tick = function() {\n                    var item;\n    \n                    while ( waiting.length && occupied < max ) {\n                        item = waiting.shift();\n                        occupied += item[ 0 ];\n                        item[ 1 ]();\n                    }\n                };\n    \n            return function( emiter, size, cb ) {\n                waiting.push([ size, cb ]);\n                emiter.once( 'destroy', function() {\n                    occupied -= size;\n                    setTimeout( tick, 1 );\n                });\n                setTimeout( tick, 1 );\n            };\n        })( 5 * 1024 * 1024 );\n    \n        $.extend( Uploader.options, {\n    \n            /**\n             * @property {Object} [thumb]\n             * @namespace options\n             * @for Uploader\n             * @description 配置生成缩略图的选项。\n             *\n             * 默认为：\n             *\n             * ```javascript\n             * {\n             *     width: 110,\n             *     height: 110,\n             *\n             *     // 图片质量，只有type为`image/jpeg`的时候才有效。\n             *     quality: 70,\n             *\n             *     // 是否允许放大，如果想要生成小图的时候不失真，此选项应该设置为false.\n             *     allowMagnify: true,\n             *\n             *     // 是否允许裁剪。\n             *     crop: true,\n             *\n             *     // 为空的话则保留原有图片格式。\n             *     // 否则强制转换成指定的类型。\n             *     type: 'image/jpeg'\n             * }\n             * ```\n             */\n            thumb: {\n                width: 110,\n                height: 110,\n                quality: 70,\n                allowMagnify: true,\n                crop: true,\n                preserveHeaders: false,\n    \n                // 为空的话则保留原有图片格式。\n                // 否则强制转换成指定的类型。\n                // IE 8下面 base64 大小不能超过 32K 否则预览失败，而非 jpeg 编码的图片很可\n                // 能会超过 32k, 所以这里设置成预览的时候都是 image/jpeg\n                type: 'image/jpeg'\n            },\n    \n            /**\n             * @property {Object} [compress]\n             * @namespace options\n             * @for Uploader\n             * @description 配置压缩的图片的选项。如果此选项为`false`, 则图片在上传前不进行压缩。\n             *\n             * 默认为：\n             *\n             * ```javascript\n             * {\n             *     width: 1600,\n             *     height: 1600,\n             *\n             *     // 图片质量，只有type为`image/jpeg`的时候才有效。\n             *     quality: 90,\n             *\n             *     // 是否允许放大，如果想要生成小图的时候不失真，此选项应该设置为false.\n             *     allowMagnify: false,\n             *\n             *     // 是否允许裁剪。\n             *     crop: false,\n             *\n             *     // 是否保留头部meta信息。\n             *     preserveHeaders: true,\n             *\n             *     // 如果发现压缩后文件大小比原来还大，则使用原来图片\n             *     // 此属性可能会影响图片自动纠正功能\n             *     noCompressIfLarger: false,\n             *\n             *     // 单位字节，如果图片大小小于此值，不会采用压缩。\n             *     compressSize: 0\n             * }\n             * ```\n             */\n            compress: {\n                width: 1600,\n                height: 1600,\n                quality: 90,\n                allowMagnify: false,\n                crop: false,\n                preserveHeaders: true\n            }\n        });\n    \n        return Uploader.register({\n    \n            name: 'image',\n    \n    \n            /**\n             * 生成缩略图，此过程为异步，所以需要传入`callback`。\n             * 通常情况在图片加入队里后调用此方法来生成预览图以增强交互效果。\n             *\n             * 当 width 或者 height 的值介于 0 - 1 时，被当成百分比使用。\n             *\n             * `callback`中可以接收到两个参数。\n             * * 第一个为error，如果生成缩略图有错误，此error将为真。\n             * * 第二个为ret, 缩略图的Data URL值。\n             *\n             * **注意**\n             * Date URL在IE6/7中不支持，所以不用调用此方法了，直接显示一张暂不支持预览图片好了。\n             * 也可以借助服务端，将 base64 数据传给服务端，生成一个临时文件供预览。\n             *\n             * @method makeThumb\n             * @grammar makeThumb( file, callback ) => undefined\n             * @grammar makeThumb( file, callback, width, height ) => undefined\n             * @for Uploader\n             * @example\n             *\n             * uploader.on( 'fileQueued', function( file ) {\n             *     var $li = ...;\n             *\n             *     uploader.makeThumb( file, function( error, ret ) {\n             *         if ( error ) {\n             *             $li.text('预览错误');\n             *         } else {\n             *             $li.append('<img alt=\"\" src=\"' + ret + '\" />');\n             *         }\n             *     });\n             *\n             * });\n             */\n            makeThumb: function( file, cb, width, height ) {\n                var opts, image;\n    \n                file = this.request( 'get-file', file );\n    \n                // 只预览图片格式。\n                if ( !file.type.match( /^image/ ) ) {\n                    cb( true );\n                    return;\n                }\n    \n                opts = $.extend({}, this.options.thumb );\n    \n                // 如果传入的是object.\n                if ( $.isPlainObject( width ) ) {\n                    opts = $.extend( opts, width );\n                    width = null;\n                }\n    \n                width = width || opts.width;\n                height = height || opts.height;\n    \n                image = new Image( opts );\n    \n                image.once( 'load', function() {\n                    file._info = file._info || image.info();\n                    file._meta = file._meta || image.meta();\n    \n                    // 如果 width 的值介于 0 - 1\n                    // 说明设置的是百分比。\n                    if ( width <= 1 && width > 0 ) {\n                        width = file._info.width * width;\n                    }\n    \n                    // 同样的规则应用于 height\n                    if ( height <= 1 && height > 0 ) {\n                        height = file._info.height * height;\n                    }\n    \n                    image.resize( width, height );\n                });\n    \n                // 当 resize 完后\n                image.once( 'complete', function() {\n                    cb( false, image.getAsDataUrl( opts.type ) );\n                    image.destroy();\n                });\n    \n                image.once( 'error', function( reason ) {\n                    cb( reason || true );\n                    image.destroy();\n                });\n    \n                throttle( image, file.source.size, function() {\n                    file._info && image.info( file._info );\n                    file._meta && image.meta( file._meta );\n                    image.loadFromBlob( file.source );\n                });\n            },\n    \n            beforeSendFile: function( file ) {\n                var opts = this.options.compress || this.options.resize,\n                    compressSize = opts && opts.compressSize || 0,\n                    noCompressIfLarger = opts && opts.noCompressIfLarger || false,\n                    image, deferred;\n    \n                file = this.request( 'get-file', file );\n    \n                // 只压缩 jpeg 图片格式。\n                // gif 可能会丢失针\n                // bmp png 基本上尺寸都不大，且压缩比比较小。\n                if ( !opts || !~'image/jpeg,image/jpg'.indexOf( file.type ) ||\n                        file.size < compressSize ||\n                        file._compressed ) {\n                    return;\n                }\n    \n                opts = $.extend({}, opts );\n                deferred = Base.Deferred();\n    \n                image = new Image( opts );\n    \n                deferred.always(function() {\n                    image.destroy();\n                    image = null;\n                });\n                image.once( 'error', deferred.reject );\n                image.once( 'load', function() {\n                    var width = opts.width,\n                        height = opts.height;\n    \n                    file._info = file._info || image.info();\n                    file._meta = file._meta || image.meta();\n    \n                    // 如果 width 的值介于 0 - 1\n                    // 说明设置的是百分比。\n                    if ( width <= 1 && width > 0 ) {\n                        width = file._info.width * width;\n                    }\n    \n                    // 同样的规则应用于 height\n                    if ( height <= 1 && height > 0 ) {\n                        height = file._info.height * height;\n                    }\n    \n                    image.resize( width, height );\n                });\n    \n                image.once( 'complete', function() {\n                    var blob, size;\n    \n                    // 移动端 UC / qq 浏览器的无图模式下\n                    // ctx.getImageData 处理大图的时候会报 Exception\n                    // INDEX_SIZE_ERR: DOM Exception 1\n                    try {\n                        blob = image.getAsBlob( opts.type );\n    \n                        size = file.size;\n    \n                        // 如果压缩后，比原来还大则不用压缩后的。\n                        if ( !noCompressIfLarger || blob.size < size ) {\n                            // file.source.destroy && file.source.destroy();\n                            file.source = blob;\n                            file.size = blob.size;\n    \n                            file.trigger( 'resize', blob.size, size );\n                        }\n    \n                        // 标记，避免重复压缩。\n                        file._compressed = true;\n                        deferred.resolve();\n                    } catch ( e ) {\n                        // 出错了直接继续，让其上传原始图片\n                        deferred.resolve();\n                    }\n                });\n    \n                file._info && image.info( file._info );\n                file._meta && image.meta( file._meta );\n    \n                image.loadFromBlob( file.source );\n                return deferred.promise();\n            }\n        });\n    });\n    /**\n     * @fileOverview 文件属性封装\n     */\n    define('file',[\n        'base',\n        'mediator'\n    ], function( Base, Mediator ) {\n    \n        var $ = Base.$,\n            idPrefix = 'WU_FILE_',\n            idSuffix = 0,\n            rExt = /\\.([^.]+)$/,\n            statusMap = {};\n    \n        function gid() {\n            return idPrefix + idSuffix++;\n        }\n    \n        /**\n         * 文件类\n         * @class File\n         * @constructor 构造函数\n         * @grammar new File( source ) => File\n         * @param {Lib.File} source [lib.File](#Lib.File)实例, 此source对象是带有Runtime信息的。\n         */\n        function WUFile( source ) {\n    \n            /**\n             * 文件名，包括扩展名（后缀）\n             * @property name\n             * @type {string}\n             */\n            this.name = source.name || 'Untitled';\n    \n            /**\n             * 文件体积（字节）\n             * @property size\n             * @type {uint}\n             * @default 0\n             */\n            this.size = source.size || 0;\n    \n            /**\n             * 文件MIMETYPE类型，与文件类型的对应关系请参考[http://t.cn/z8ZnFny](http://t.cn/z8ZnFny)\n             * @property type\n             * @type {string}\n             * @default 'application/octet-stream'\n             */\n            this.type = source.type || 'application/octet-stream';\n    \n            /**\n             * 文件最后修改日期\n             * @property lastModifiedDate\n             * @type {int}\n             * @default 当前时间戳\n             */\n            this.lastModifiedDate = source.lastModifiedDate || (new Date() * 1);\n    \n            /**\n             * 文件ID，每个对象具有唯一ID，与文件名无关\n             * @property id\n             * @type {string}\n             */\n            this.id = gid();\n    \n            /**\n             * 文件扩展名，通过文件名获取，例如test.png的扩展名为png\n             * @property ext\n             * @type {string}\n             */\n            this.ext = rExt.exec( this.name ) ? RegExp.$1 : '';\n    \n    \n            /**\n             * 状态文字说明。在不同的status语境下有不同的用途。\n             * @property statusText\n             * @type {string}\n             */\n            this.statusText = '';\n    \n            // 存储文件状态，防止通过属性直接修改\n            statusMap[ this.id ] = WUFile.Status.INITED;\n    \n            this.source = source;\n            this.loaded = 0;\n    \n            this.on( 'error', function( msg ) {\n                this.setStatus( WUFile.Status.ERROR, msg );\n            });\n        }\n    \n        $.extend( WUFile.prototype, {\n    \n            /**\n             * 设置状态，状态变化时会触发`change`事件。\n             * @method setStatus\n             * @grammar setStatus( status[, statusText] );\n             * @param {File.Status|String} status [文件状态值](#WebUploader:File:File.Status)\n             * @param {String} [statusText=''] 状态说明，常在error时使用，用http, abort,server等来标记是由于什么原因导致文件错误。\n             */\n            setStatus: function( status, text ) {\n    \n                var prevStatus = statusMap[ this.id ];\n    \n                typeof text !== 'undefined' && (this.statusText = text);\n    \n                if ( status !== prevStatus ) {\n                    statusMap[ this.id ] = status;\n                    /**\n                     * 文件状态变化\n                     * @event statuschange\n                     */\n                    this.trigger( 'statuschange', status, prevStatus );\n                }\n    \n            },\n    \n            /**\n             * 获取文件状态\n             * @return {File.Status}\n             * @example\n                     文件状态具体包括以下几种类型：\n                     {\n                         // 初始化\n                        INITED:     0,\n                        // 已入队列\n                        QUEUED:     1,\n                        // 正在上传\n                        PROGRESS:     2,\n                        // 上传出错\n                        ERROR:         3,\n                        // 上传成功\n                        COMPLETE:     4,\n                        // 上传取消\n                        CANCELLED:     5\n                    }\n             */\n            getStatus: function() {\n                return statusMap[ this.id ];\n            },\n    \n            /**\n             * 获取文件原始信息。\n             * @return {*}\n             */\n            getSource: function() {\n                return this.source;\n            },\n    \n            destroy: function() {\n                this.off();\n                delete statusMap[ this.id ];\n            }\n        });\n    \n        Mediator.installTo( WUFile.prototype );\n    \n        /**\n         * 文件状态值，具体包括以下几种类型：\n         * * `inited` 初始状态\n         * * `queued` 已经进入队列, 等待上传\n         * * `progress` 上传中\n         * * `complete` 上传完成。\n         * * `error` 上传出错，可重试\n         * * `interrupt` 上传中断，可续传。\n         * * `invalid` 文件不合格，不能重试上传。会自动从队列中移除。\n         * * `cancelled` 文件被移除。\n         * @property {Object} Status\n         * @namespace File\n         * @class File\n         * @static\n         */\n        WUFile.Status = {\n            INITED:     'inited',    // 初始状态\n            QUEUED:     'queued',    // 已经进入队列, 等待上传\n            PROGRESS:   'progress',    // 上传中\n            ERROR:      'error',    // 上传出错，可重试\n            COMPLETE:   'complete',    // 上传完成。\n            CANCELLED:  'cancelled',    // 上传取消。\n            INTERRUPT:  'interrupt',    // 上传中断，可续传。\n            INVALID:    'invalid'    // 文件不合格，不能重试上传。\n        };\n    \n        return WUFile;\n    });\n    \n    /**\n     * @fileOverview 文件队列\n     */\n    define('queue',[\n        'base',\n        'mediator',\n        'file'\n    ], function( Base, Mediator, WUFile ) {\n    \n        var $ = Base.$,\n            STATUS = WUFile.Status;\n    \n        /**\n         * 文件队列, 用来存储各个状态中的文件。\n         * @class Queue\n         * @extends Mediator\n         */\n        function Queue() {\n    \n            /**\n             * 统计文件数。\n             * * `numOfQueue` 队列中的文件数。\n             * * `numOfSuccess` 上传成功的文件数\n             * * `numOfCancel` 被取消的文件数\n             * * `numOfProgress` 正在上传中的文件数\n             * * `numOfUploadFailed` 上传错误的文件数。\n             * * `numOfInvalid` 无效的文件数。\n             * * `numofDeleted` 被移除的文件数。\n             * @property {Object} stats\n             */\n            this.stats = {\n                numOfQueue: 0,\n                numOfSuccess: 0,\n                numOfCancel: 0,\n                numOfProgress: 0,\n                numOfUploadFailed: 0,\n                numOfInvalid: 0,\n                numofDeleted: 0,\n                numofInterrupt: 0\n            };\n    \n            // 上传队列，仅包括等待上传的文件\n            this._queue = [];\n    \n            // 存储所有文件\n            this._map = {};\n        }\n    \n        $.extend( Queue.prototype, {\n    \n            /**\n             * 将新文件加入对队列尾部\n             *\n             * @method append\n             * @param  {File} file   文件对象\n             */\n            append: function( file ) {\n                this._queue.push( file );\n                this._fileAdded( file );\n                return this;\n            },\n    \n            /**\n             * 将新文件加入对队列头部\n             *\n             * @method prepend\n             * @param  {File} file   文件对象\n             */\n            prepend: function( file ) {\n                this._queue.unshift( file );\n                this._fileAdded( file );\n                return this;\n            },\n    \n            /**\n             * 获取文件对象\n             *\n             * @method getFile\n             * @param  {String} fileId   文件ID\n             * @return {File}\n             */\n            getFile: function( fileId ) {\n                if ( typeof fileId !== 'string' ) {\n                    return fileId;\n                }\n                return this._map[ fileId ];\n            },\n    \n            /**\n             * 从队列中取出一个指定状态的文件。\n             * @grammar fetch( status ) => File\n             * @method fetch\n             * @param {String} status [文件状态值](#WebUploader:File:File.Status)\n             * @return {File} [File](#WebUploader:File)\n             */\n            fetch: function( status ) {\n                var len = this._queue.length,\n                    i, file;\n    \n                status = status || STATUS.QUEUED;\n    \n                for ( i = 0; i < len; i++ ) {\n                    file = this._queue[ i ];\n    \n                    if ( status === file.getStatus() ) {\n                        return file;\n                    }\n                }\n    \n                return null;\n            },\n    \n            /**\n             * 对队列进行排序，能够控制文件上传顺序。\n             * @grammar sort( fn ) => undefined\n             * @method sort\n             * @param {Function} fn 排序方法\n             */\n            sort: function( fn ) {\n                if ( typeof fn === 'function' ) {\n                    this._queue.sort( fn );\n                }\n            },\n    \n            /**\n             * 获取指定类型的文件列表, 列表中每一个成员为[File](#WebUploader:File)对象。\n             * @grammar getFiles( [status1[, status2 ...]] ) => Array\n             * @method getFiles\n             * @param {String} [status] [文件状态值](#WebUploader:File:File.Status)\n             */\n            getFiles: function() {\n                var sts = [].slice.call( arguments, 0 ),\n                    ret = [],\n                    i = 0,\n                    len = this._queue.length,\n                    file;\n    \n                for ( ; i < len; i++ ) {\n                    file = this._queue[ i ];\n    \n                    if ( sts.length && !~$.inArray( file.getStatus(), sts ) ) {\n                        continue;\n                    }\n    \n                    ret.push( file );\n                }\n    \n                return ret;\n            },\n    \n            /**\n             * 在队列中删除文件。\n             * @grammar removeFile( file ) => Array\n             * @method removeFile\n             * @param {File} 文件对象。\n             */\n            removeFile: function( file ) {\n                var me = this,\n                    existing = this._map[ file.id ];\n    \n                if ( existing ) {\n                    delete this._map[ file.id ];\n                    file.destroy();\n                    this.stats.numofDeleted++;\n                }\n            },\n    \n            _fileAdded: function( file ) {\n                var me = this,\n                    existing = this._map[ file.id ];\n    \n                if ( !existing ) {\n                    this._map[ file.id ] = file;\n    \n                    file.on( 'statuschange', function( cur, pre ) {\n                        me._onFileStatusChange( cur, pre );\n                    });\n                }\n            },\n    \n            _onFileStatusChange: function( curStatus, preStatus ) {\n                var stats = this.stats;\n    \n                switch ( preStatus ) {\n                    case STATUS.PROGRESS:\n                        stats.numOfProgress--;\n                        break;\n    \n                    case STATUS.QUEUED:\n                        stats.numOfQueue --;\n                        break;\n    \n                    case STATUS.ERROR:\n                        stats.numOfUploadFailed--;\n                        break;\n    \n                    case STATUS.INVALID:\n                        stats.numOfInvalid--;\n                        break;\n    \n                    case STATUS.INTERRUPT:\n                        stats.numofInterrupt--;\n                        break;\n                }\n    \n                switch ( curStatus ) {\n                    case STATUS.QUEUED:\n                        stats.numOfQueue++;\n                        break;\n    \n                    case STATUS.PROGRESS:\n                        stats.numOfProgress++;\n                        break;\n    \n                    case STATUS.ERROR:\n                        stats.numOfUploadFailed++;\n                        break;\n    \n                    case STATUS.COMPLETE:\n                        stats.numOfSuccess++;\n                        break;\n    \n                    case STATUS.CANCELLED:\n                        stats.numOfCancel++;\n                        break;\n    \n    \n                    case STATUS.INVALID:\n                        stats.numOfInvalid++;\n                        break;\n    \n                    case STATUS.INTERRUPT:\n                        stats.numofInterrupt++;\n                        break;\n                }\n            }\n    \n        });\n    \n        Mediator.installTo( Queue.prototype );\n    \n        return Queue;\n    });\n    /**\n     * @fileOverview 队列\n     */\n    define('widgets/queue',[\n        'base',\n        'uploader',\n        'queue',\n        'file',\n        'lib/file',\n        'runtime/client',\n        'widgets/widget'\n    ], function( Base, Uploader, Queue, WUFile, File, RuntimeClient ) {\n    \n        var $ = Base.$,\n            rExt = /\\.\\w+$/,\n            Status = WUFile.Status;\n    \n        return Uploader.register({\n            name: 'queue',\n    \n            init: function( opts ) {\n                var me = this,\n                    deferred, len, i, item, arr, accept, runtime;\n    \n                if ( $.isPlainObject( opts.accept ) ) {\n                    opts.accept = [ opts.accept ];\n                }\n    \n                // accept中的中生成匹配正则。\n                if ( opts.accept ) {\n                    arr = [];\n    \n                    for ( i = 0, len = opts.accept.length; i < len; i++ ) {\n                        item = opts.accept[ i ].extensions;\n                        item && arr.push( item );\n                    }\n    \n                    if ( arr.length ) {\n                        accept = '\\\\.' + arr.join(',')\n                                .replace( /,/g, '$|\\\\.' )\n                                .replace( /\\*/g, '.*' ) + '$';\n                    }\n    \n                    me.accept = new RegExp( accept, 'i' );\n                }\n    \n                me.queue = new Queue();\n                me.stats = me.queue.stats;\n    \n                // 如果当前不是html5运行时，那就算了。\n                // 不执行后续操作\n                if ( this.request('predict-runtime-type') !== 'html5' ) {\n                    return;\n                }\n    \n                // 创建一个 html5 运行时的 placeholder\n                // 以至于外部添加原生 File 对象的时候能正确包裹一下供 webuploader 使用。\n                deferred = Base.Deferred();\n                this.placeholder = runtime = new RuntimeClient('Placeholder');\n                runtime.connectRuntime({\n                    runtimeOrder: 'html5'\n                }, function() {\n                    me._ruid = runtime.getRuid();\n                    deferred.resolve();\n                });\n                return deferred.promise();\n            },\n    \n    \n            // 为了支持外部直接添加一个原生File对象。\n            _wrapFile: function( file ) {\n                if ( !(file instanceof WUFile) ) {\n    \n                    if ( !(file instanceof File) ) {\n                        if ( !this._ruid ) {\n                            throw new Error('Can\\'t add external files.');\n                        }\n                        file = new File( this._ruid, file );\n                    }\n    \n                    file = new WUFile( file );\n                }\n    \n                return file;\n            },\n    \n            // 判断文件是否可以被加入队列\n            acceptFile: function( file ) {\n                var invalid = !file || !file.size || this.accept &&\n    \n                        // 如果名字中有后缀，才做后缀白名单处理。\n                        rExt.exec( file.name ) && !this.accept.test( file.name );\n    \n                return !invalid;\n            },\n    \n    \n            /**\n             * @event beforeFileQueued\n             * @param {File} file File对象\n             * @description 当文件被加入队列之前触发，此事件的handler返回值为`false`，则此文件不会被添加进入队列。\n             * @for  Uploader\n             */\n    \n            /**\n             * @event fileQueued\n             * @param {File} file File对象\n             * @description 当文件被加入队列以后触发。\n             * @for  Uploader\n             */\n    \n            _addFile: function( file ) {\n                var me = this;\n    \n                file = me._wrapFile( file );\n    \n                // 不过类型判断允许不允许，先派送 `beforeFileQueued`\n                if ( !me.owner.trigger( 'beforeFileQueued', file ) ) {\n                    return;\n                }\n    \n                // 类型不匹配，则派送错误事件，并返回。\n                if ( !me.acceptFile( file ) ) {\n                    me.owner.trigger( 'error', 'Q_TYPE_DENIED', file );\n                    return;\n                }\n    \n                me.queue.append( file );\n                me.owner.trigger( 'fileQueued', file );\n                return file;\n            },\n    \n            getFile: function( fileId ) {\n                return this.queue.getFile( fileId );\n            },\n    \n            /**\n             * @event filesQueued\n             * @param {File} files 数组，内容为原始File(lib/File）对象。\n             * @description 当一批文件添加进队列以后触发。\n             * @for  Uploader\n             */\n            \n            /**\n             * @property {Boolean} [auto=false]\n             * @namespace options\n             * @for Uploader\n             * @description 设置为 true 后，不需要手动调用上传，有文件选择即开始上传。\n             * \n             */\n    \n            /**\n             * @method addFiles\n             * @grammar addFiles( file ) => undefined\n             * @grammar addFiles( [file1, file2 ...] ) => undefined\n             * @param {Array of File or File} [files] Files 对象 数组\n             * @description 添加文件到队列\n             * @for  Uploader\n             */\n            addFile: function( files ) {\n                var me = this;\n    \n                if ( !files.length ) {\n                    files = [ files ];\n                }\n    \n                files = $.map( files, function( file ) {\n                    return me._addFile( file );\n                });\n    \t\t\t\n    \t\t\tif ( files.length ) {\n    \n                    me.owner.trigger( 'filesQueued', files );\n    \n    \t\t\t\tif ( me.options.auto ) {\n    \t\t\t\t\tsetTimeout(function() {\n    \t\t\t\t\t\tme.request('start-upload');\n    \t\t\t\t\t}, 20 );\n    \t\t\t\t}\n                }\n            },\n    \n            getStats: function() {\n                return this.stats;\n            },\n    \n            /**\n             * @event fileDequeued\n             * @param {File} file File对象\n             * @description 当文件被移除队列后触发。\n             * @for  Uploader\n             */\n    \n             /**\n             * @method removeFile\n             * @grammar removeFile( file ) => undefined\n             * @grammar removeFile( id ) => undefined\n             * @grammar removeFile( file, true ) => undefined\n             * @grammar removeFile( id, true ) => undefined\n             * @param {File|id} file File对象或这File对象的id\n             * @description 移除某一文件, 默认只会标记文件状态为已取消，如果第二个参数为 `true` 则会从 queue 中移除。\n             * @for  Uploader\n             * @example\n             *\n             * $li.on('click', '.remove-this', function() {\n             *     uploader.removeFile( file );\n             * })\n             */\n            removeFile: function( file, remove ) {\n                var me = this;\n    \n                file = file.id ? file : me.queue.getFile( file );\n    \n                this.request( 'cancel-file', file );\n    \n                if ( remove ) {\n                    this.queue.removeFile( file );\n                }\n            },\n    \n            /**\n             * @method getFiles\n             * @grammar getFiles() => Array\n             * @grammar getFiles( status1, status2, status... ) => Array\n             * @description 返回指定状态的文件集合，不传参数将返回所有状态的文件。\n             * @for  Uploader\n             * @example\n             * console.log( uploader.getFiles() );    // => all files\n             * console.log( uploader.getFiles('error') )    // => all error files.\n             */\n            getFiles: function() {\n                return this.queue.getFiles.apply( this.queue, arguments );\n            },\n    \n            fetchFile: function() {\n                return this.queue.fetch.apply( this.queue, arguments );\n            },\n    \n            /**\n             * @method retry\n             * @grammar retry() => undefined\n             * @grammar retry( file ) => undefined\n             * @description 重试上传，重试指定文件，或者从出错的文件开始重新上传。\n             * @for  Uploader\n             * @example\n             * function retry() {\n             *     uploader.retry();\n             * }\n             */\n            retry: function( file, noForceStart ) {\n                var me = this,\n                    files, i, len;\n    \n                if ( file ) {\n                    file = file.id ? file : me.queue.getFile( file );\n                    file.setStatus( Status.QUEUED );\n                    noForceStart || me.request('start-upload');\n                    return;\n                }\n    \n                files = me.queue.getFiles( Status.ERROR );\n                i = 0;\n                len = files.length;\n    \n                for ( ; i < len; i++ ) {\n                    file = files[ i ];\n                    file.setStatus( Status.QUEUED );\n                }\n    \n                me.request('start-upload');\n            },\n    \n            /**\n             * @method sort\n             * @grammar sort( fn ) => undefined\n             * @description 排序队列中的文件，在上传之前调整可以控制上传顺序。\n             * @for  Uploader\n             */\n            sortFiles: function() {\n                return this.queue.sort.apply( this.queue, arguments );\n            },\n    \n            /**\n             * @event reset\n             * @description 当 uploader 被重置的时候触发。\n             * @for  Uploader\n             */\n    \n            /**\n             * @method reset\n             * @grammar reset() => undefined\n             * @description 重置uploader。目前只重置了队列。\n             * @for  Uploader\n             * @example\n             * uploader.reset();\n             */\n            reset: function() {\n                this.owner.trigger('reset');\n                this.queue = new Queue();\n                this.stats = this.queue.stats;\n            },\n    \n            destroy: function() {\n                this.reset();\n                this.placeholder && this.placeholder.destroy();\n            }\n        });\n    \n    });\n    /**\n     * @fileOverview 添加获取Runtime相关信息的方法。\n     */\n    define('widgets/runtime',[\n        'uploader',\n        'runtime/runtime',\n        'widgets/widget'\n    ], function( Uploader, Runtime ) {\n    \n        Uploader.support = function() {\n            return Runtime.hasRuntime.apply( Runtime, arguments );\n        };\n    \n        /**\n         * @property {Object} [runtimeOrder=html5,flash]\n         * @namespace options\n         * @for Uploader\n         * @description 指定运行时启动顺序。默认会想尝试 html5 是否支持，如果支持则使用 html5, 否则则使用 flash.\n         *\n         * 可以将此值设置成 `flash`，来强制使用 flash 运行时。\n         */\n    \n        return Uploader.register({\n            name: 'runtime',\n    \n            init: function() {\n                if ( !this.predictRuntimeType() ) {\n                    throw Error('Runtime Error');\n                }\n            },\n    \n            /**\n             * 预测Uploader将采用哪个`Runtime`\n             * @grammar predictRuntimeType() => String\n             * @method predictRuntimeType\n             * @for  Uploader\n             */\n            predictRuntimeType: function() {\n                var orders = this.options.runtimeOrder || Runtime.orders,\n                    type = this.type,\n                    i, len;\n    \n                if ( !type ) {\n                    orders = orders.split( /\\s*,\\s*/g );\n    \n                    for ( i = 0, len = orders.length; i < len; i++ ) {\n                        if ( Runtime.hasRuntime( orders[ i ] ) ) {\n                            this.type = type = orders[ i ];\n                            break;\n                        }\n                    }\n                }\n    \n                return type;\n            }\n        });\n    });\n    /**\n     * @fileOverview Transport\n     */\n    define('lib/transport',[\n        'base',\n        'runtime/client',\n        'mediator'\n    ], function( Base, RuntimeClient, Mediator ) {\n    \n        var $ = Base.$;\n    \n        function Transport( opts ) {\n            var me = this;\n    \n            opts = me.options = $.extend( true, {}, Transport.options, opts || {} );\n            RuntimeClient.call( this, 'Transport' );\n    \n            this._blob = null;\n            this._formData = opts.formData || {};\n            this._headers = opts.headers || {};\n    \n            this.on( 'progress', this._timeout );\n            this.on( 'load error', function() {\n                me.trigger( 'progress', 1 );\n                clearTimeout( me._timer );\n            });\n        }\n    \n        Transport.options = {\n            server: '',\n            method: 'POST',\n    \n            // 跨域时，是否允许携带cookie, 只有html5 runtime才有效\n            withCredentials: false,\n            fileVal: 'file',\n            timeout: 2 * 60 * 1000,    // 2分钟\n            formData: {},\n            headers: {},\n            sendAsBinary: false\n        };\n    \n        $.extend( Transport.prototype, {\n    \n            // 添加Blob, 只能添加一次，最后一次有效。\n            appendBlob: function( key, blob, filename ) {\n                var me = this,\n                    opts = me.options;\n    \n                if ( me.getRuid() ) {\n                    me.disconnectRuntime();\n                }\n    \n                // 连接到blob归属的同一个runtime.\n                me.connectRuntime( blob.ruid, function() {\n                    me.exec('init');\n                });\n    \n                me._blob = blob;\n                opts.fileVal = key || opts.fileVal;\n                opts.filename = filename || opts.filename;\n            },\n    \n            // 添加其他字段\n            append: function( key, value ) {\n                if ( typeof key === 'object' ) {\n                    $.extend( this._formData, key );\n                } else {\n                    this._formData[ key ] = value;\n                }\n            },\n    \n            setRequestHeader: function( key, value ) {\n                if ( typeof key === 'object' ) {\n                    $.extend( this._headers, key );\n                } else {\n                    this._headers[ key ] = value;\n                }\n            },\n    \n            send: function( method ) {\n                this.exec( 'send', method );\n                this._timeout();\n            },\n    \n            abort: function() {\n                clearTimeout( this._timer );\n                return this.exec('abort');\n            },\n    \n            destroy: function() {\n                this.trigger('destroy');\n                this.off();\n                this.exec('destroy');\n                this.disconnectRuntime();\n            },\n    \n            getResponse: function() {\n                return this.exec('getResponse');\n            },\n    \n            getResponseAsJson: function() {\n                return this.exec('getResponseAsJson');\n            },\n    \n            getStatus: function() {\n                return this.exec('getStatus');\n            },\n    \n            _timeout: function() {\n                var me = this,\n                    duration = me.options.timeout;\n    \n                if ( !duration ) {\n                    return;\n                }\n    \n                clearTimeout( me._timer );\n                me._timer = setTimeout(function() {\n                    me.abort();\n                    me.trigger( 'error', 'timeout' );\n                }, duration );\n            }\n    \n        });\n    \n        // 让Transport具备事件功能。\n        Mediator.installTo( Transport.prototype );\n    \n        return Transport;\n    });\n    /**\n     * @fileOverview 负责文件上传相关。\n     */\n    define('widgets/upload',[\n        'base',\n        'uploader',\n        'file',\n        'lib/transport',\n        'widgets/widget'\n    ], function( Base, Uploader, WUFile, Transport ) {\n    \n        var $ = Base.$,\n            isPromise = Base.isPromise,\n            Status = WUFile.Status;\n    \n        // 添加默认配置项\n        $.extend( Uploader.options, {\n    \n    \n            /**\n             * @property {Boolean} [prepareNextFile=false]\n             * @namespace options\n             * @for Uploader\n             * @description 是否允许在文件传输时提前把下一个文件准备好。\n             * 对于一个文件的准备工作比较耗时，比如图片压缩，md5序列化。\n             * 如果能提前在当前文件传输期处理，可以节省总体耗时。\n             */\n            prepareNextFile: false,\n    \n            /**\n             * @property {Boolean} [chunked=false]\n             * @namespace options\n             * @for Uploader\n             * @description 是否要分片处理大文件上传。\n             */\n            chunked: false,\n    \n            /**\n             * @property {Boolean} [chunkSize=5242880]\n             * @namespace options\n             * @for Uploader\n             * @description 如果要分片，分多大一片？ 默认大小为5M.\n             */\n            chunkSize: 5 * 1024 * 1024,\n    \n            /**\n             * @property {Boolean} [chunkRetry=2]\n             * @namespace options\n             * @for Uploader\n             * @description 如果某个分片由于网络问题出错，允许自动重传多少次？\n             */\n            chunkRetry: 2,\n    \n            /**\n             * @property {Boolean} [threads=3]\n             * @namespace options\n             * @for Uploader\n             * @description 上传并发数。允许同时最大上传进程数。\n             */\n            threads: 3,\n    \n    \n            /**\n             * @property {Object} [formData={}]\n             * @namespace options\n             * @for Uploader\n             * @description 文件上传请求的参数表，每次发送都会发送此对象中的参数。\n             */\n            formData: {}\n    \n            /**\n             * @property {Object} [fileVal='file']\n             * @namespace options\n             * @for Uploader\n             * @description 设置文件上传域的name。\n             */\n    \n            /**\n             * @property {Object} [sendAsBinary=false]\n             * @namespace options\n             * @for Uploader\n             * @description 是否已二进制的流的方式发送文件，这样整个上传内容`php://input`都为文件内容，\n             * 其他参数在$_GET数组中。\n             */\n        });\n    \n        // 负责将文件切片。\n        function CuteFile( file, chunkSize ) {\n            var pending = [],\n                blob = file.source,\n                total = blob.size,\n                chunks = chunkSize ? Math.ceil( total / chunkSize ) : 1,\n                start = 0,\n                index = 0,\n                len, api;\n    \n            api = {\n                file: file,\n    \n                has: function() {\n                    return !!pending.length;\n                },\n    \n                shift: function() {\n                    return pending.shift();\n                },\n    \n                unshift: function( block ) {\n                    pending.unshift( block );\n                }\n            };\n    \n            while ( index < chunks ) {\n                len = Math.min( chunkSize, total - start );\n    \n                pending.push({\n                    file: file,\n                    start: start,\n                    end: chunkSize ? (start + len) : total,\n                    total: total,\n                    chunks: chunks,\n                    chunk: index++,\n                    cuted: api\n                });\n                start += len;\n            }\n    \n            file.blocks = pending.concat();\n            file.remaning = pending.length;\n    \n            return api;\n        }\n    \n        Uploader.register({\n            name: 'upload',\n    \n            init: function() {\n                var owner = this.owner,\n                    me = this;\n    \n                this.runing = false;\n                this.progress = false;\n    \n                owner\n                    .on( 'startUpload', function() {\n                        me.progress = true;\n                    })\n                    .on( 'uploadFinished', function() {\n                        me.progress = false;\n                    });\n    \n                // 记录当前正在传的数据，跟threads相关\n                this.pool = [];\n    \n                // 缓存分好片的文件。\n                this.stack = [];\n    \n                // 缓存即将上传的文件。\n                this.pending = [];\n    \n                // 跟踪还有多少分片在上传中但是没有完成上传。\n                this.remaning = 0;\n                this.__tick = Base.bindFn( this._tick, this );\n    \n                // 销毁上传相关的属性。\n                owner.on( 'uploadComplete', function( file ) {\n    \n                    // 把其他块取消了。\n                    file.blocks && $.each( file.blocks, function( _, v ) {\n                        v.transport && (v.transport.abort(), v.transport.destroy());\n                        delete v.transport;\n                    });\n    \n                    delete file.blocks;\n                    delete file.remaning;\n                });\n            },\n    \n            reset: function() {\n                this.request( 'stop-upload', true );\n                this.runing = false;\n                this.pool = [];\n                this.stack = [];\n                this.pending = [];\n                this.remaning = 0;\n                this._trigged = false;\n                this._promise = null;\n            },\n    \n            /**\n             * @event startUpload\n             * @description 当开始上传流程时触发。\n             * @for  Uploader\n             */\n    \n            /**\n             * 开始上传。此方法可以从初始状态调用开始上传流程，也可以从暂停状态调用，继续上传流程。\n             *\n             * 可以指定开始某一个文件。\n             * @grammar upload() => undefined\n             * @grammar upload( file | fileId) => undefined\n             * @method upload\n             * @for  Uploader\n             */\n            startUpload: function(file) {\n                var me = this;\n    \n                // 移出invalid的文件\n                $.each( me.request( 'get-files', Status.INVALID ), function() {\n                    me.request( 'remove-file', this );\n                });\n    \n                // 如果指定了开始某个文件，则只开始指定的文件。\n                if ( file ) {\n                    file = file.id ? file : me.request( 'get-file', file );\n    \n                    if (file.getStatus() === Status.INTERRUPT) {\n                        file.setStatus( Status.QUEUED );\n    \n                        $.each( me.pool, function( _, v ) {\n    \n                            // 之前暂停过。\n                            if (v.file !== file) {\n                                return;\n                            }\n    \n                            v.transport && v.transport.send();\n                            file.setStatus( Status.PROGRESS );\n                        });\n    \n                        \n                    } else if (file.getStatus() !== Status.PROGRESS) {\n                        file.setStatus( Status.QUEUED );\n                    }\n                } else {\n                    $.each( me.request( 'get-files', [ Status.INITED ] ), function() {\n                        this.setStatus( Status.QUEUED );\n                    });\n                }\n    \n                if ( me.runing ) {\n                    return Base.nextTick( me.__tick );\n                }\n    \n                me.runing = true;\n                var files = [];\n    \n                // 如果有暂停的，则续传\n                file || $.each( me.pool, function( _, v ) {\n                    var file = v.file;\n    \n                    if ( file.getStatus() === Status.INTERRUPT ) {\n                        me._trigged = false;\n                        files.push(file);\n                        v.transport && v.transport.send();\n                    }\n                });\n    \n                $.each(files, function() {\n                    this.setStatus( Status.PROGRESS );\n                });\n    \n                file || $.each( me.request( 'get-files',\n                        Status.INTERRUPT ), function() {\n                    this.setStatus( Status.PROGRESS );\n                });\n    \n                me._trigged = false;\n                Base.nextTick( me.__tick );\n                me.owner.trigger('startUpload');\n            },\n    \n            /**\n             * @event stopUpload\n             * @description 当开始上传流程暂停时触发。\n             * @for  Uploader\n             */\n    \n            /**\n             * 暂停上传。第一个参数为是否中断上传当前正在上传的文件。\n             *\n             * 如果第一个参数是文件，则只暂停指定文件。\n             * @grammar stop() => undefined\n             * @grammar stop( true ) => undefined\n             * @grammar stop( file ) => undefined\n             * @method stop\n             * @for  Uploader\n             */\n            stopUpload: function( file, interrupt ) {\n                var me = this,\n                    block;\n    \n                if (file === true) {\n                    interrupt = file;\n                    file = null;\n                }\n    \n                if ( me.runing === false ) {\n                    return;\n                }\n    \n                // 如果只是暂停某个文件。\n                if ( file ) {\n                    file = file.id ? file : me.request( 'get-file', file );\n    \n                    if ( file.getStatus() !== Status.PROGRESS &&\n                            file.getStatus() !== Status.QUEUED ) {\n                        return;\n                    }\n    \n                    file.setStatus( Status.INTERRUPT );\n    \n    \n                    $.each( me.pool, function( _, v ) {\n    \n                        // 只 abort 指定的文件。\n                        if (v.file === file) {\n                            block = v;\n                            return false;\n                        }\n                    });\n    \n                    block.transport && block.transport.abort();\n    \n                    if (interrupt) {\n                        me._putback(block);\n                        me._popBlock(block);\n                    }\n    \n                    return Base.nextTick( me.__tick );\n                }\n    \n                me.runing = false;\n    \n                // 正在准备中的文件。\n                if (this._promise && this._promise.file) {\n                    this._promise.file.setStatus( Status.INTERRUPT );\n                }\n    \n                interrupt && $.each( me.pool, function( _, v ) {\n                    v.transport && v.transport.abort();\n                    v.file.setStatus( Status.INTERRUPT );\n                });\n    \n                me.owner.trigger('stopUpload');\n            },\n    \n            /**\n             * @method cancelFile\n             * @grammar cancelFile( file ) => undefined\n             * @grammar cancelFile( id ) => undefined\n             * @param {File|id} file File对象或这File对象的id\n             * @description 标记文件状态为已取消, 同时将中断文件传输。\n             * @for  Uploader\n             * @example\n             *\n             * $li.on('click', '.remove-this', function() {\n             *     uploader.cancelFile( file );\n             * })\n             */\n            cancelFile: function( file ) {\n                file = file.id ? file : this.request( 'get-file', file );\n    \n                // 如果正在上传。\n                file.blocks && $.each( file.blocks, function( _, v ) {\n                    var _tr = v.transport;\n    \n                    if ( _tr ) {\n                        _tr.abort();\n                        _tr.destroy();\n                        delete v.transport;\n                    }\n                });\n    \n                file.setStatus( Status.CANCELLED );\n                this.owner.trigger( 'fileDequeued', file );\n            },\n    \n            /**\n             * 判断`Uplaode`r是否正在上传中。\n             * @grammar isInProgress() => Boolean\n             * @method isInProgress\n             * @for  Uploader\n             */\n            isInProgress: function() {\n                return !!this.progress;\n            },\n    \n            _getStats: function() {\n                return this.request('get-stats');\n            },\n    \n            /**\n             * 掉过一个文件上传，直接标记指定文件为已上传状态。\n             * @grammar skipFile( file ) => undefined\n             * @method skipFile\n             * @for  Uploader\n             */\n            skipFile: function( file, status ) {\n                file = file.id ? file : this.request( 'get-file', file );\n    \n                file.setStatus( status || Status.COMPLETE );\n                file.skipped = true;\n    \n                // 如果正在上传。\n                file.blocks && $.each( file.blocks, function( _, v ) {\n                    var _tr = v.transport;\n    \n                    if ( _tr ) {\n                        _tr.abort();\n                        _tr.destroy();\n                        delete v.transport;\n                    }\n                });\n    \n                this.owner.trigger( 'uploadSkip', file );\n            },\n    \n            /**\n             * @event uploadFinished\n             * @description 当所有文件上传结束时触发。\n             * @for  Uploader\n             */\n            _tick: function() {\n                var me = this,\n                    opts = me.options,\n                    fn, val;\n    \n                // 上一个promise还没有结束，则等待完成后再执行。\n                if ( me._promise ) {\n                    return me._promise.always( me.__tick );\n                }\n    \n                // 还有位置，且还有文件要处理的话。\n                if ( me.pool.length < opts.threads && (val = me._nextBlock()) ) {\n                    me._trigged = false;\n    \n                    fn = function( val ) {\n                        me._promise = null;\n    \n                        // 有可能是reject过来的，所以要检测val的类型。\n                        val && val.file && me._startSend( val );\n                        Base.nextTick( me.__tick );\n                    };\n    \n                    me._promise = isPromise( val ) ? val.always( fn ) : fn( val );\n    \n                // 没有要上传的了，且没有正在传输的了。\n                } else if ( !me.remaning && !me._getStats().numOfQueue &&\n                    !me._getStats().numofInterrupt ) {\n                    me.runing = false;\n    \n                    me._trigged || Base.nextTick(function() {\n                        me.owner.trigger('uploadFinished');\n                    });\n                    me._trigged = true;\n                }\n            },\n    \n            _putback: function(block) {\n                var idx;\n    \n                block.cuted.unshift(block);\n                idx = this.stack.indexOf(block.cuted);\n    \n                if (!~idx) {\n                    this.stack.unshift(block.cuted);\n                }\n            },\n    \n            _getStack: function() {\n                var i = 0,\n                    act;\n    \n                while ( (act = this.stack[ i++ ]) ) {\n                    if ( act.has() && act.file.getStatus() === Status.PROGRESS ) {\n                        return act;\n                    } else if (!act.has() ||\n                            act.file.getStatus() !== Status.PROGRESS &&\n                            act.file.getStatus() !== Status.INTERRUPT ) {\n    \n                        // 把已经处理完了的，或者，状态为非 progress（上传中）、\n                        // interupt（暂停中） 的移除。\n                        this.stack.splice( --i, 1 );\n                    }\n                }\n    \n                return null;\n            },\n    \n            _nextBlock: function() {\n                var me = this,\n                    opts = me.options,\n                    act, next, done, preparing;\n    \n                // 如果当前文件还有没有需要传输的，则直接返回剩下的。\n                if ( (act = this._getStack()) ) {\n    \n                    // 是否提前准备下一个文件\n                    if ( opts.prepareNextFile && !me.pending.length ) {\n                        me._prepareNextFile();\n                    }\n    \n                    return act.shift();\n    \n                // 否则，如果正在运行，则准备下一个文件，并等待完成后返回下个分片。\n                } else if ( me.runing ) {\n    \n                    // 如果缓存中有，则直接在缓存中取，没有则去queue中取。\n                    if ( !me.pending.length && me._getStats().numOfQueue ) {\n                        me._prepareNextFile();\n                    }\n    \n                    next = me.pending.shift();\n                    done = function( file ) {\n                        if ( !file ) {\n                            return null;\n                        }\n    \n                        act = CuteFile( file, opts.chunked ? opts.chunkSize : 0 );\n                        me.stack.push(act);\n                        return act.shift();\n                    };\n    \n                    // 文件可能还在prepare中，也有可能已经完全准备好了。\n                    if ( isPromise( next) ) {\n                        preparing = next.file;\n                        next = next[ next.pipe ? 'pipe' : 'then' ]( done );\n                        next.file = preparing;\n                        return next;\n                    }\n    \n                    return done( next );\n                }\n            },\n    \n    \n            /**\n             * @event uploadStart\n             * @param {File} file File对象\n             * @description 某个文件开始上传前触发，一个文件只会触发一次。\n             * @for  Uploader\n             */\n            _prepareNextFile: function() {\n                var me = this,\n                    file = me.request('fetch-file'),\n                    pending = me.pending,\n                    promise;\n    \n                if ( file ) {\n                    promise = me.request( 'before-send-file', file, function() {\n    \n                        // 有可能文件被skip掉了。文件被skip掉后，状态坑定不是Queued.\n                        if ( file.getStatus() === Status.PROGRESS ||\n                            file.getStatus() === Status.INTERRUPT ) {\n                            return file;\n                        }\n    \n                        return me._finishFile( file );\n                    });\n    \n                    me.owner.trigger( 'uploadStart', file );\n                    file.setStatus( Status.PROGRESS );\n    \n                    promise.file = file;\n    \n                    // 如果还在pending中，则替换成文件本身。\n                    promise.done(function() {\n                        var idx = $.inArray( promise, pending );\n    \n                        ~idx && pending.splice( idx, 1, file );\n                    });\n    \n                    // befeore-send-file的钩子就有错误发生。\n                    promise.fail(function( reason ) {\n                        file.setStatus( Status.ERROR, reason );\n                        me.owner.trigger( 'uploadError', file, reason );\n                        me.owner.trigger( 'uploadComplete', file );\n                    });\n    \n                    pending.push( promise );\n                }\n            },\n    \n            // 让出位置了，可以让其他分片开始上传\n            _popBlock: function( block ) {\n                var idx = $.inArray( block, this.pool );\n    \n                this.pool.splice( idx, 1 );\n                block.file.remaning--;\n                this.remaning--;\n            },\n    \n            // 开始上传，可以被掉过。如果promise被reject了，则表示跳过此分片。\n            _startSend: function( block ) {\n                var me = this,\n                    file = block.file,\n                    promise;\n    \n                // 有可能在 before-send-file 的 promise 期间改变了文件状态。\n                // 如：暂停，取消\n                // 我们不能中断 promise, 但是可以在 promise 完后，不做上传操作。\n                if ( file.getStatus() !== Status.PROGRESS ) {\n    \n                    // 如果是中断，则还需要放回去。\n                    if (file.getStatus() === Status.INTERRUPT) {\n                        me._putback(block);\n                    }\n    \n                    return;\n                }\n    \n                me.pool.push( block );\n                me.remaning++;\n    \n                // 如果没有分片，则直接使用原始的。\n                // 不会丢失content-type信息。\n                block.blob = block.chunks === 1 ? file.source :\n                        file.source.slice( block.start, block.end );\n    \n                // hook, 每个分片发送之前可能要做些异步的事情。\n                promise = me.request( 'before-send', block, function() {\n    \n                    // 有可能文件已经上传出错了，所以不需要再传输了。\n                    if ( file.getStatus() === Status.PROGRESS ) {\n                        me._doSend( block );\n                    } else {\n                        me._popBlock( block );\n                        Base.nextTick( me.__tick );\n                    }\n                });\n    \n                // 如果为fail了，则跳过此分片。\n                promise.fail(function() {\n                    if ( file.remaning === 1 ) {\n                        me._finishFile( file ).always(function() {\n                            block.percentage = 1;\n                            me._popBlock( block );\n                            me.owner.trigger( 'uploadComplete', file );\n                            Base.nextTick( me.__tick );\n                        });\n                    } else {\n                        block.percentage = 1;\n                        me.updateFileProgress( file );\n                        me._popBlock( block );\n                        Base.nextTick( me.__tick );\n                    }\n                });\n            },\n    \n    \n            /**\n             * @event uploadBeforeSend\n             * @param {Object} object\n             * @param {Object} data 默认的上传参数，可以扩展此对象来控制上传参数。\n             * @param {Object} headers 可以扩展此对象来控制上传头部。\n             * @description 当某个文件的分块在发送前触发，主要用来询问是否要添加附带参数，大文件在开起分片上传的前提下此事件可能会触发多次。\n             * @for  Uploader\n             */\n    \n            /**\n             * @event uploadAccept\n             * @param {Object} object\n             * @param {Object} ret 服务端的返回数据，json格式，如果服务端不是json格式，从ret._raw中取数据，自行解析。\n             * @description 当某个文件上传到服务端响应后，会派送此事件来询问服务端响应是否有效。如果此事件handler返回值为`false`, 则此文件将派送`server`类型的`uploadError`事件。\n             * @for  Uploader\n             */\n    \n            /**\n             * @event uploadProgress\n             * @param {File} file File对象\n             * @param {Number} percentage 上传进度\n             * @description 上传过程中触发，携带上传进度。\n             * @for  Uploader\n             */\n    \n    \n            /**\n             * @event uploadError\n             * @param {File} file File对象\n             * @param {String} reason 出错的code\n             * @description 当文件上传出错时触发。\n             * @for  Uploader\n             */\n    \n            /**\n             * @event uploadSuccess\n             * @param {File} file File对象\n             * @param {Object} response 服务端返回的数据\n             * @description 当文件上传成功时触发。\n             * @for  Uploader\n             */\n    \n            /**\n             * @event uploadComplete\n             * @param {File} [file] File对象\n             * @description 不管成功或者失败，文件上传完成时触发。\n             * @for  Uploader\n             */\n    \n            // 做上传操作。\n            _doSend: function( block ) {\n                var me = this,\n                    owner = me.owner,\n                    opts = me.options,\n                    file = block.file,\n                    tr = new Transport( opts ),\n                    data = $.extend({}, opts.formData ),\n                    headers = $.extend({}, opts.headers ),\n                    requestAccept, ret;\n    \n                block.transport = tr;\n    \n                tr.on( 'destroy', function() {\n                    delete block.transport;\n                    me._popBlock( block );\n                    Base.nextTick( me.__tick );\n                });\n    \n                // 广播上传进度。以文件为单位。\n                tr.on( 'progress', function( percentage ) {\n                    block.percentage = percentage;\n                    me.updateFileProgress( file );\n                });\n    \n                // 用来询问，是否返回的结果是有错误的。\n                requestAccept = function( reject ) {\n                    var fn;\n    \n                    ret = tr.getResponseAsJson() || {};\n                    ret._raw = tr.getResponse();\n                    fn = function( value ) {\n                        reject = value;\n                    };\n    \n                    // 服务端响应了，不代表成功了，询问是否响应正确。\n                    if ( !owner.trigger( 'uploadAccept', block, ret, fn ) ) {\n                        reject = reject || 'server';\n                    }\n    \n                    return reject;\n                };\n    \n                // 尝试重试，然后广播文件上传出错。\n                tr.on( 'error', function( type, flag ) {\n                    block.retried = block.retried || 0;\n    \n                    // 自动重试\n                    if ( block.chunks > 1 && ~'http,abort'.indexOf( type ) &&\n                            block.retried < opts.chunkRetry ) {\n    \n                        block.retried++;\n                        tr.send();\n    \n                    } else {\n    \n                        // http status 500 ~ 600\n                        if ( !flag && type === 'server' ) {\n                            type = requestAccept( type );\n                        }\n    \n                        file.setStatus( Status.ERROR, type );\n                        owner.trigger( 'uploadError', file, type );\n                        owner.trigger( 'uploadComplete', file );\n                    }\n                });\n    \n                // 上传成功\n                tr.on( 'load', function() {\n                    var reason;\n    \n                    // 如果非预期，转向上传出错。\n                    if ( (reason = requestAccept()) ) {\n                        tr.trigger( 'error', reason, true );\n                        return;\n                    }\n    \n                    // 全部上传完成。\n                    if ( file.remaning === 1 ) {\n                        me._finishFile( file, ret );\n                    } else {\n                        tr.destroy();\n                    }\n                });\n    \n                // 配置默认的上传字段。\n                data = $.extend( data, {\n                    id: file.id,\n                    name: file.name,\n                    type: file.type,\n                    lastModifiedDate: file.lastModifiedDate,\n                    size: file.size\n                });\n    \n                block.chunks > 1 && $.extend( data, {\n                    chunks: block.chunks,\n                    chunk: block.chunk\n                });\n    \n                // 在发送之间可以添加字段什么的。。。\n                // 如果默认的字段不够使用，可以通过监听此事件来扩展\n                owner.trigger( 'uploadBeforeSend', block, data, headers );\n    \n                // 开始发送。\n                tr.appendBlob( opts.fileVal, block.blob, file.name );\n                tr.append( data );\n                tr.setRequestHeader( headers );\n                tr.send();\n            },\n    \n            // 完成上传。\n            _finishFile: function( file, ret, hds ) {\n                var owner = this.owner;\n    \n                return owner\n                        .request( 'after-send-file', arguments, function() {\n                            file.setStatus( Status.COMPLETE );\n                            owner.trigger( 'uploadSuccess', file, ret, hds );\n                        })\n                        .fail(function( reason ) {\n    \n                            // 如果外部已经标记为invalid什么的，不再改状态。\n                            if ( file.getStatus() === Status.PROGRESS ) {\n                                file.setStatus( Status.ERROR, reason );\n                            }\n    \n                            owner.trigger( 'uploadError', file, reason );\n                        })\n                        .always(function() {\n                            owner.trigger( 'uploadComplete', file );\n                        });\n            },\n    \n            updateFileProgress: function(file) {\n                var totalPercent = 0,\n                    uploaded = 0;\n    \n                if (!file.blocks) {\n                    return;\n                }\n    \n                $.each( file.blocks, function( _, v ) {\n                    uploaded += (v.percentage || 0) * (v.end - v.start);\n                });\n    \n                totalPercent = uploaded / file.size;\n                this.owner.trigger( 'uploadProgress', file, totalPercent || 0 );\n            }\n    \n        });\n    });\n    \n    /**\n     * @fileOverview 日志组件，主要用来收集错误信息，可以帮助 webuploader 更好的定位问题和发展。\n     *\n     * 如果您不想要启用此功能，请在打包的时候去掉 log 模块。\n     *\n     * 或者可以在初始化的时候通过 options.disableWidgets 属性禁用。\n     *\n     * 如：\n     * WebUploader.create({\n     *     ...\n     *\n     *     disableWidgets: 'log',\n     *\n     *     ...\n     * })\n     */\n    define('widgets/log',[\n        'base',\n        'uploader',\n        'widgets/widget'\n    ], function( Base, Uploader ) {\n        var $ = Base.$,\n            logUrl = ' http://static.tieba.baidu.com/tb/pms/img/st.gif??',\n            product = (location.hostname || location.host || 'protected').toLowerCase(),\n    \n            // 只针对 baidu 内部产品用户做统计功能。\n            enable = product && /baidu/i.exec(product),\n            base;\n    \n        if (!enable) {\n            return;\n        }\n    \n        base = {\n            dv: 3,\n            master: 'webuploader',\n            online: /test/.exec(product) ? 0 : 1,\n            module: '',\n            product: product,\n            type: 0\n        };\n    \n        function send(data) {\n            var obj = $.extend({}, base, data),\n                url = logUrl.replace(/^(.*)\\?/, '$1' + $.param( obj )),\n                image = new Image();\n    \n            image.src = url;\n        }\n    \n        return Uploader.register({\n            name: 'log',\n    \n            init: function() {\n                var owner = this.owner,\n                    count = 0,\n                    size = 0;\n    \n                owner\n                    .on('error', function(code) {\n                        send({\n                            type: 2,\n                            c_error_code: code\n                        });\n                    })\n                    .on('uploadError', function(file, reason) {\n                        send({\n                            type: 2,\n                            c_error_code: 'UPLOAD_ERROR',\n                            c_reason: '' + reason\n                        });\n                    })\n                    .on('uploadComplete', function(file) {\n                        count++;\n                        size += file.size;\n                    }).\n                    on('uploadFinished', function() {\n                        send({\n                            c_count: count,\n                            c_size: size\n                        });\n                        count = size = 0;\n                    });\n    \n                send({\n                    c_usage: 1\n                });\n            }\n        });\n    });\n    /**\n     * @fileOverview Runtime管理器，负责Runtime的选择, 连接\n     */\n    define('runtime/compbase',[],function() {\n    \n        function CompBase( owner, runtime ) {\n    \n            this.owner = owner;\n            this.options = owner.options;\n    \n            this.getRuntime = function() {\n                return runtime;\n            };\n    \n            this.getRuid = function() {\n                return runtime.uid;\n            };\n    \n            this.trigger = function() {\n                return owner.trigger.apply( owner, arguments );\n            };\n        }\n    \n        return CompBase;\n    });\n    /**\n     * @fileOverview Html5Runtime\n     */\n    define('runtime/html5/runtime',[\n        'base',\n        'runtime/runtime',\n        'runtime/compbase'\n    ], function( Base, Runtime, CompBase ) {\n    \n        var type = 'html5',\n            components = {};\n    \n        function Html5Runtime() {\n            var pool = {},\n                me = this,\n                destroy = this.destroy;\n    \n            Runtime.apply( me, arguments );\n            me.type = type;\n    \n    \n            // 这个方法的调用者，实际上是RuntimeClient\n            me.exec = function( comp, fn/*, args...*/) {\n                var client = this,\n                    uid = client.uid,\n                    args = Base.slice( arguments, 2 ),\n                    instance;\n    \n                if ( components[ comp ] ) {\n                    instance = pool[ uid ] = pool[ uid ] ||\n                            new components[ comp ]( client, me );\n    \n                    if ( instance[ fn ] ) {\n                        return instance[ fn ].apply( instance, args );\n                    }\n                }\n            };\n    \n            me.destroy = function() {\n                // @todo 删除池子中的所有实例\n                return destroy && destroy.apply( this, arguments );\n            };\n        }\n    \n        Base.inherits( Runtime, {\n            constructor: Html5Runtime,\n    \n            // 不需要连接其他程序，直接执行callback\n            init: function() {\n                var me = this;\n                setTimeout(function() {\n                    me.trigger('ready');\n                }, 1 );\n            }\n    \n        });\n    \n        // 注册Components\n        Html5Runtime.register = function( name, component ) {\n            var klass = components[ name ] = Base.inherits( CompBase, component );\n            return klass;\n        };\n    \n        // 注册html5运行时。\n        // 只有在支持的前提下注册。\n        if ( window.Blob && window.FileReader && window.DataView ) {\n            Runtime.addRuntime( type, Html5Runtime );\n        }\n    \n        return Html5Runtime;\n    });\n    /**\n     * @fileOverview Blob Html实现\n     */\n    define('runtime/html5/blob',[\n        'runtime/html5/runtime',\n        'lib/blob'\n    ], function( Html5Runtime, Blob ) {\n    \n        return Html5Runtime.register( 'Blob', {\n            slice: function( start, end ) {\n                var blob = this.owner.source,\n                    slice = blob.slice || blob.webkitSlice || blob.mozSlice;\n    \n                blob = slice.call( blob, start, end );\n    \n                return new Blob( this.getRuid(), blob );\n            }\n        });\n    });\n    /**\n     * @fileOverview FilePicker\n     */\n    define('runtime/html5/filepicker',[\n        'base',\n        'runtime/html5/runtime'\n    ], function( Base, Html5Runtime ) {\n    \n        var $ = Base.$;\n    \n        return Html5Runtime.register( 'FilePicker', {\n            init: function() {\n                var container = this.getRuntime().getContainer(),\n                    me = this,\n                    owner = me.owner,\n                    opts = me.options,\n                    label = this.label = $( document.createElement('label') ),\n                    input =  this.input = $( document.createElement('input') ),\n                    arr, i, len, mouseHandler;\n    \n                input.attr( 'type', 'file' );\n                input.attr( 'capture', 'camera');\n                input.attr( 'name', opts.name );\n                input.addClass('webuploader-element-invisible');\n    \n                label.on( 'click', function(e) {\n                    input.trigger('click');\n                    e.stopPropagation();\n                    owner.trigger('dialogopen');\n                });\n    \n                label.css({\n                    opacity: 0,\n                    width: '100%',\n                    height: '100%',\n                    display: 'block',\n                    cursor: 'pointer',\n                    background: '#ffffff'\n                });\n    \n                if ( opts.multiple ) {\n                    input.attr( 'multiple', 'multiple' );\n                }\n    \n                // @todo Firefox不支持单独指定后缀\n                if ( opts.accept && opts.accept.length > 0 ) {\n                    arr = [];\n    \n                    for ( i = 0, len = opts.accept.length; i < len; i++ ) {\n                        arr.push( opts.accept[ i ].mimeTypes );\n                    }\n    \n                    input.attr( 'accept', arr.join(',') );\n                }\n    \n                container.append( input );\n                container.append( label );\n    \n                mouseHandler = function( e ) {\n                    owner.trigger( e.type );\n                };\n    \n                input.on( 'change', function( e ) {\n                    var fn = arguments.callee,\n                        clone;\n    \n                    me.files = e.target.files;\n    \n                    // reset input\n                    clone = this.cloneNode( true );\n                    clone.value = null;\n                    this.parentNode.replaceChild( clone, this );\n    \n                    input.off();\n                    input = $( clone ).on( 'change', fn )\n                            .on( 'mouseenter mouseleave', mouseHandler );\n    \n                    owner.trigger('change');\n                });\n    \n                label.on( 'mouseenter mouseleave', mouseHandler );\n    \n            },\n    \n    \n            getFiles: function() {\n                return this.files;\n            },\n    \n            destroy: function() {\n                this.input.off();\n                this.label.off();\n            }\n        });\n    });\n    \n    /**\n     * Terms:\n     *\n     * Uint8Array, FileReader, BlobBuilder, atob, ArrayBuffer\n     * @fileOverview Image控件\n     */\n    define('runtime/html5/util',[\n        'base'\n    ], function( Base ) {\n    \n        var urlAPI = window.createObjectURL && window ||\n                window.URL && URL.revokeObjectURL && URL ||\n                window.webkitURL,\n            createObjectURL = Base.noop,\n            revokeObjectURL = createObjectURL;\n    \n        if ( urlAPI ) {\n    \n            // 更安全的方式调用，比如android里面就能把context改成其他的对象。\n            createObjectURL = function() {\n                return urlAPI.createObjectURL.apply( urlAPI, arguments );\n            };\n    \n            revokeObjectURL = function() {\n                return urlAPI.revokeObjectURL.apply( urlAPI, arguments );\n            };\n        }\n    \n        return {\n            createObjectURL: createObjectURL,\n            revokeObjectURL: revokeObjectURL,\n    \n            dataURL2Blob: function( dataURI ) {\n                var byteStr, intArray, ab, i, mimetype, parts;\n    \n                parts = dataURI.split(',');\n    \n                if ( ~parts[ 0 ].indexOf('base64') ) {\n                    byteStr = atob( parts[ 1 ] );\n                } else {\n                    byteStr = decodeURIComponent( parts[ 1 ] );\n                }\n    \n                ab = new ArrayBuffer( byteStr.length );\n                intArray = new Uint8Array( ab );\n    \n                for ( i = 0; i < byteStr.length; i++ ) {\n                    intArray[ i ] = byteStr.charCodeAt( i );\n                }\n    \n                mimetype = parts[ 0 ].split(':')[ 1 ].split(';')[ 0 ];\n    \n                return this.arrayBufferToBlob( ab, mimetype );\n            },\n    \n            dataURL2ArrayBuffer: function( dataURI ) {\n                var byteStr, intArray, i, parts;\n    \n                parts = dataURI.split(',');\n    \n                if ( ~parts[ 0 ].indexOf('base64') ) {\n                    byteStr = atob( parts[ 1 ] );\n                } else {\n                    byteStr = decodeURIComponent( parts[ 1 ] );\n                }\n    \n                intArray = new Uint8Array( byteStr.length );\n    \n                for ( i = 0; i < byteStr.length; i++ ) {\n                    intArray[ i ] = byteStr.charCodeAt( i );\n                }\n    \n                return intArray.buffer;\n            },\n    \n            arrayBufferToBlob: function( buffer, type ) {\n                var builder = window.BlobBuilder || window.WebKitBlobBuilder,\n                    bb;\n    \n                // android不支持直接new Blob, 只能借助blobbuilder.\n                if ( builder ) {\n                    bb = new builder();\n                    bb.append( buffer );\n                    return bb.getBlob( type );\n                }\n    \n                return new Blob([ buffer ], type ? { type: type } : {} );\n            },\n    \n            // 抽出来主要是为了解决android下面canvas.toDataUrl不支持jpeg.\n            // 你得到的结果是png.\n            canvasToDataUrl: function( canvas, type, quality ) {\n                return canvas.toDataURL( type, quality / 100 );\n            },\n    \n            // imagemeat会复写这个方法，如果用户选择加载那个文件了的话。\n            parseMeta: function( blob, callback ) {\n                callback( false, {});\n            },\n    \n            // imagemeat会复写这个方法，如果用户选择加载那个文件了的话。\n            updateImageHead: function( data ) {\n                return data;\n            }\n        };\n    });\n    /**\n     * Terms:\n     *\n     * Uint8Array, FileReader, BlobBuilder, atob, ArrayBuffer\n     * @fileOverview Image控件\n     */\n    define('runtime/html5/imagemeta',[\n        'runtime/html5/util'\n    ], function( Util ) {\n    \n        var api;\n    \n        api = {\n            parsers: {\n                0xffe1: []\n            },\n    \n            maxMetaDataSize: 262144,\n    \n            parse: function( blob, cb ) {\n                var me = this,\n                    fr = new FileReader();\n    \n                fr.onload = function() {\n                    cb( false, me._parse( this.result ) );\n                    fr = fr.onload = fr.onerror = null;\n                };\n    \n                fr.onerror = function( e ) {\n                    cb( e.message );\n                    fr = fr.onload = fr.onerror = null;\n                };\n    \n                blob = blob.slice( 0, me.maxMetaDataSize );\n                fr.readAsArrayBuffer( blob.getSource() );\n            },\n    \n            _parse: function( buffer, noParse ) {\n                if ( buffer.byteLength < 6 ) {\n                    return;\n                }\n    \n                var dataview = new DataView( buffer ),\n                    offset = 2,\n                    maxOffset = dataview.byteLength - 4,\n                    headLength = offset,\n                    ret = {},\n                    markerBytes, markerLength, parsers, i;\n    \n                if ( dataview.getUint16( 0 ) === 0xffd8 ) {\n    \n                    while ( offset < maxOffset ) {\n                        markerBytes = dataview.getUint16( offset );\n    \n                        if ( markerBytes >= 0xffe0 && markerBytes <= 0xffef ||\n                                markerBytes === 0xfffe ) {\n    \n                            markerLength = dataview.getUint16( offset + 2 ) + 2;\n    \n                            if ( offset + markerLength > dataview.byteLength ) {\n                                break;\n                            }\n    \n                            parsers = api.parsers[ markerBytes ];\n    \n                            if ( !noParse && parsers ) {\n                                for ( i = 0; i < parsers.length; i += 1 ) {\n                                    parsers[ i ].call( api, dataview, offset,\n                                            markerLength, ret );\n                                }\n                            }\n    \n                            offset += markerLength;\n                            headLength = offset;\n                        } else {\n                            break;\n                        }\n                    }\n    \n                    if ( headLength > 6 ) {\n                        if ( buffer.slice ) {\n                            ret.imageHead = buffer.slice( 2, headLength );\n                        } else {\n                            // Workaround for IE10, which does not yet\n                            // support ArrayBuffer.slice:\n                            ret.imageHead = new Uint8Array( buffer )\n                                    .subarray( 2, headLength );\n                        }\n                    }\n                }\n    \n                return ret;\n            },\n    \n            updateImageHead: function( buffer, head ) {\n                var data = this._parse( buffer, true ),\n                    buf1, buf2, bodyoffset;\n    \n    \n                bodyoffset = 2;\n                if ( data.imageHead ) {\n                    bodyoffset = 2 + data.imageHead.byteLength;\n                }\n    \n                if ( buffer.slice ) {\n                    buf2 = buffer.slice( bodyoffset );\n                } else {\n                    buf2 = new Uint8Array( buffer ).subarray( bodyoffset );\n                }\n    \n                buf1 = new Uint8Array( head.byteLength + 2 + buf2.byteLength );\n    \n                buf1[ 0 ] = 0xFF;\n                buf1[ 1 ] = 0xD8;\n                buf1.set( new Uint8Array( head ), 2 );\n                buf1.set( new Uint8Array( buf2 ), head.byteLength + 2 );\n    \n                return buf1.buffer;\n            }\n        };\n    \n        Util.parseMeta = function() {\n            return api.parse.apply( api, arguments );\n        };\n    \n        Util.updateImageHead = function() {\n            return api.updateImageHead.apply( api, arguments );\n        };\n    \n        return api;\n    });\n    /**\n     * 代码来自于：https://github.com/blueimp/JavaScript-Load-Image\n     * 暂时项目中只用了orientation.\n     *\n     * 去除了 Exif Sub IFD Pointer, GPS Info IFD Pointer, Exif Thumbnail.\n     * @fileOverview EXIF解析\n     */\n    \n    // Sample\n    // ====================================\n    // Make : Apple\n    // Model : iPhone 4S\n    // Orientation : 1\n    // XResolution : 72 [72/1]\n    // YResolution : 72 [72/1]\n    // ResolutionUnit : 2\n    // Software : QuickTime 7.7.1\n    // DateTime : 2013:09:01 22:53:55\n    // ExifIFDPointer : 190\n    // ExposureTime : 0.058823529411764705 [1/17]\n    // FNumber : 2.4 [12/5]\n    // ExposureProgram : Normal program\n    // ISOSpeedRatings : 800\n    // ExifVersion : 0220\n    // DateTimeOriginal : 2013:09:01 22:52:51\n    // DateTimeDigitized : 2013:09:01 22:52:51\n    // ComponentsConfiguration : YCbCr\n    // ShutterSpeedValue : 4.058893515764426\n    // ApertureValue : 2.5260688216892597 [4845/1918]\n    // BrightnessValue : -0.3126686601998395\n    // MeteringMode : Pattern\n    // Flash : Flash did not fire, compulsory flash mode\n    // FocalLength : 4.28 [107/25]\n    // SubjectArea : [4 values]\n    // FlashpixVersion : 0100\n    // ColorSpace : 1\n    // PixelXDimension : 2448\n    // PixelYDimension : 3264\n    // SensingMethod : One-chip color area sensor\n    // ExposureMode : 0\n    // WhiteBalance : Auto white balance\n    // FocalLengthIn35mmFilm : 35\n    // SceneCaptureType : Standard\n    define('runtime/html5/imagemeta/exif',[\n        'base',\n        'runtime/html5/imagemeta'\n    ], function( Base, ImageMeta ) {\n    \n        var EXIF = {};\n    \n        EXIF.ExifMap = function() {\n            return this;\n        };\n    \n        EXIF.ExifMap.prototype.map = {\n            'Orientation': 0x0112\n        };\n    \n        EXIF.ExifMap.prototype.get = function( id ) {\n            return this[ id ] || this[ this.map[ id ] ];\n        };\n    \n        EXIF.exifTagTypes = {\n            // byte, 8-bit unsigned int:\n            1: {\n                getValue: function( dataView, dataOffset ) {\n                    return dataView.getUint8( dataOffset );\n                },\n                size: 1\n            },\n    \n            // ascii, 8-bit byte:\n            2: {\n                getValue: function( dataView, dataOffset ) {\n                    return String.fromCharCode( dataView.getUint8( dataOffset ) );\n                },\n                size: 1,\n                ascii: true\n            },\n    \n            // short, 16 bit int:\n            3: {\n                getValue: function( dataView, dataOffset, littleEndian ) {\n                    return dataView.getUint16( dataOffset, littleEndian );\n                },\n                size: 2\n            },\n    \n            // long, 32 bit int:\n            4: {\n                getValue: function( dataView, dataOffset, littleEndian ) {\n                    return dataView.getUint32( dataOffset, littleEndian );\n                },\n                size: 4\n            },\n    \n            // rational = two long values,\n            // first is numerator, second is denominator:\n            5: {\n                getValue: function( dataView, dataOffset, littleEndian ) {\n                    return dataView.getUint32( dataOffset, littleEndian ) /\n                        dataView.getUint32( dataOffset + 4, littleEndian );\n                },\n                size: 8\n            },\n    \n            // slong, 32 bit signed int:\n            9: {\n                getValue: function( dataView, dataOffset, littleEndian ) {\n                    return dataView.getInt32( dataOffset, littleEndian );\n                },\n                size: 4\n            },\n    \n            // srational, two slongs, first is numerator, second is denominator:\n            10: {\n                getValue: function( dataView, dataOffset, littleEndian ) {\n                    return dataView.getInt32( dataOffset, littleEndian ) /\n                        dataView.getInt32( dataOffset + 4, littleEndian );\n                },\n                size: 8\n            }\n        };\n    \n        // undefined, 8-bit byte, value depending on field:\n        EXIF.exifTagTypes[ 7 ] = EXIF.exifTagTypes[ 1 ];\n    \n        EXIF.getExifValue = function( dataView, tiffOffset, offset, type, length,\n                littleEndian ) {\n    \n            var tagType = EXIF.exifTagTypes[ type ],\n                tagSize, dataOffset, values, i, str, c;\n    \n            if ( !tagType ) {\n                Base.log('Invalid Exif data: Invalid tag type.');\n                return;\n            }\n    \n            tagSize = tagType.size * length;\n    \n            // Determine if the value is contained in the dataOffset bytes,\n            // or if the value at the dataOffset is a pointer to the actual data:\n            dataOffset = tagSize > 4 ? tiffOffset + dataView.getUint32( offset + 8,\n                    littleEndian ) : (offset + 8);\n    \n            if ( dataOffset + tagSize > dataView.byteLength ) {\n                Base.log('Invalid Exif data: Invalid data offset.');\n                return;\n            }\n    \n            if ( length === 1 ) {\n                return tagType.getValue( dataView, dataOffset, littleEndian );\n            }\n    \n            values = [];\n    \n            for ( i = 0; i < length; i += 1 ) {\n                values[ i ] = tagType.getValue( dataView,\n                        dataOffset + i * tagType.size, littleEndian );\n            }\n    \n            if ( tagType.ascii ) {\n                str = '';\n    \n                // Concatenate the chars:\n                for ( i = 0; i < values.length; i += 1 ) {\n                    c = values[ i ];\n    \n                    // Ignore the terminating NULL byte(s):\n                    if ( c === '\\u0000' ) {\n                        break;\n                    }\n                    str += c;\n                }\n    \n                return str;\n            }\n            return values;\n        };\n    \n        EXIF.parseExifTag = function( dataView, tiffOffset, offset, littleEndian,\n                data ) {\n    \n            var tag = dataView.getUint16( offset, littleEndian );\n            data.exif[ tag ] = EXIF.getExifValue( dataView, tiffOffset, offset,\n                    dataView.getUint16( offset + 2, littleEndian ),    // tag type\n                    dataView.getUint32( offset + 4, littleEndian ),    // tag length\n                    littleEndian );\n        };\n    \n        EXIF.parseExifTags = function( dataView, tiffOffset, dirOffset,\n                littleEndian, data ) {\n    \n            var tagsNumber, dirEndOffset, i;\n    \n            if ( dirOffset + 6 > dataView.byteLength ) {\n                Base.log('Invalid Exif data: Invalid directory offset.');\n                return;\n            }\n    \n            tagsNumber = dataView.getUint16( dirOffset, littleEndian );\n            dirEndOffset = dirOffset + 2 + 12 * tagsNumber;\n    \n            if ( dirEndOffset + 4 > dataView.byteLength ) {\n                Base.log('Invalid Exif data: Invalid directory size.');\n                return;\n            }\n    \n            for ( i = 0; i < tagsNumber; i += 1 ) {\n                this.parseExifTag( dataView, tiffOffset,\n                        dirOffset + 2 + 12 * i,    // tag offset\n                        littleEndian, data );\n            }\n    \n            // Return the offset to the next directory:\n            return dataView.getUint32( dirEndOffset, littleEndian );\n        };\n    \n        // EXIF.getExifThumbnail = function(dataView, offset, length) {\n        //     var hexData,\n        //         i,\n        //         b;\n        //     if (!length || offset + length > dataView.byteLength) {\n        //         Base.log('Invalid Exif data: Invalid thumbnail data.');\n        //         return;\n        //     }\n        //     hexData = [];\n        //     for (i = 0; i < length; i += 1) {\n        //         b = dataView.getUint8(offset + i);\n        //         hexData.push((b < 16 ? '0' : '') + b.toString(16));\n        //     }\n        //     return 'data:image/jpeg,%' + hexData.join('%');\n        // };\n    \n        EXIF.parseExifData = function( dataView, offset, length, data ) {\n    \n            var tiffOffset = offset + 10,\n                littleEndian, dirOffset;\n    \n            // Check for the ASCII code for \"Exif\" (0x45786966):\n            if ( dataView.getUint32( offset + 4 ) !== 0x45786966 ) {\n                // No Exif data, might be XMP data instead\n                return;\n            }\n            if ( tiffOffset + 8 > dataView.byteLength ) {\n                Base.log('Invalid Exif data: Invalid segment size.');\n                return;\n            }\n    \n            // Check for the two null bytes:\n            if ( dataView.getUint16( offset + 8 ) !== 0x0000 ) {\n                Base.log('Invalid Exif data: Missing byte alignment offset.');\n                return;\n            }\n    \n            // Check the byte alignment:\n            switch ( dataView.getUint16( tiffOffset ) ) {\n                case 0x4949:\n                    littleEndian = true;\n                    break;\n    \n                case 0x4D4D:\n                    littleEndian = false;\n                    break;\n    \n                default:\n                    Base.log('Invalid Exif data: Invalid byte alignment marker.');\n                    return;\n            }\n    \n            // Check for the TIFF tag marker (0x002A):\n            if ( dataView.getUint16( tiffOffset + 2, littleEndian ) !== 0x002A ) {\n                Base.log('Invalid Exif data: Missing TIFF marker.');\n                return;\n            }\n    \n            // Retrieve the directory offset bytes, usually 0x00000008 or 8 decimal:\n            dirOffset = dataView.getUint32( tiffOffset + 4, littleEndian );\n            // Create the exif object to store the tags:\n            data.exif = new EXIF.ExifMap();\n            // Parse the tags of the main image directory and retrieve the\n            // offset to the next directory, usually the thumbnail directory:\n            dirOffset = EXIF.parseExifTags( dataView, tiffOffset,\n                    tiffOffset + dirOffset, littleEndian, data );\n    \n            // 尝试读取缩略图\n            // if ( dirOffset ) {\n            //     thumbnailData = {exif: {}};\n            //     dirOffset = EXIF.parseExifTags(\n            //         dataView,\n            //         tiffOffset,\n            //         tiffOffset + dirOffset,\n            //         littleEndian,\n            //         thumbnailData\n            //     );\n    \n            //     // Check for JPEG Thumbnail offset:\n            //     if (thumbnailData.exif[0x0201]) {\n            //         data.exif.Thumbnail = EXIF.getExifThumbnail(\n            //             dataView,\n            //             tiffOffset + thumbnailData.exif[0x0201],\n            //             thumbnailData.exif[0x0202] // Thumbnail data length\n            //         );\n            //     }\n            // }\n        };\n    \n        ImageMeta.parsers[ 0xffe1 ].push( EXIF.parseExifData );\n        return EXIF;\n    });\n    /**\n     * @fileOverview Image\n     */\n    define('runtime/html5/image',[\n        'base',\n        'runtime/html5/runtime',\n        'runtime/html5/util'\n    ], function( Base, Html5Runtime, Util ) {\n    \n        var BLANK = 'data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs%3D';\n    \n        return Html5Runtime.register( 'Image', {\n    \n            // flag: 标记是否被修改过。\n            modified: false,\n    \n            init: function() {\n                var me = this,\n                    img = new Image();\n    \n                img.onload = function() {\n    \n                    me._info = {\n                        type: me.type,\n                        width: this.width,\n                        height: this.height\n                    };\n    \n                    //debugger;\n    \n                    // 读取meta信息。\n                    if ( !me._metas && 'image/jpeg' === me.type ) {\n                        Util.parseMeta( me._blob, function( error, ret ) {\n                            me._metas = ret;\n                            me.owner.trigger('load');\n                        });\n                    } else {\n                        me.owner.trigger('load');\n                    }\n                };\n    \n                img.onerror = function() {\n                    me.owner.trigger('error');\n                };\n    \n                me._img = img;\n            },\n    \n            loadFromBlob: function( blob ) {\n                var me = this,\n                    img = me._img;\n    \n                me._blob = blob;\n                me.type = blob.type;\n                img.src = Util.createObjectURL( blob.getSource() );\n                me.owner.once( 'load', function() {\n                    Util.revokeObjectURL( img.src );\n                });\n            },\n    \n            resize: function( width, height ) {\n                var canvas = this._canvas ||\n                        (this._canvas = document.createElement('canvas'));\n    \n                this._resize( this._img, canvas, width, height );\n                this._blob = null;    // 没用了，可以删掉了。\n                this.modified = true;\n                this.owner.trigger( 'complete', 'resize' );\n            },\n    \n            crop: function( x, y, w, h, s ) {\n                var cvs = this._canvas ||\n                        (this._canvas = document.createElement('canvas')),\n                    opts = this.options,\n                    img = this._img,\n                    iw = img.naturalWidth,\n                    ih = img.naturalHeight,\n                    orientation = this.getOrientation();\n    \n                s = s || 1;\n    \n                // todo 解决 orientation 的问题。\n                // values that require 90 degree rotation\n                // if ( ~[ 5, 6, 7, 8 ].indexOf( orientation ) ) {\n    \n                //     switch ( orientation ) {\n                //         case 6:\n                //             tmp = x;\n                //             x = y;\n                //             y = iw * s - tmp - w;\n                //             console.log(ih * s, tmp, w)\n                //             break;\n                //     }\n    \n                //     (w ^= h, h ^= w, w ^= h);\n                // }\n    \n                cvs.width = w;\n                cvs.height = h;\n    \n                opts.preserveHeaders || this._rotate2Orientaion( cvs, orientation );\n                this._renderImageToCanvas( cvs, img, -x, -y, iw * s, ih * s );\n    \n                this._blob = null;    // 没用了，可以删掉了。\n                this.modified = true;\n                this.owner.trigger( 'complete', 'crop' );\n            },\n    \n            getAsBlob: function( type ) {\n                var blob = this._blob,\n                    opts = this.options,\n                    canvas;\n    \n                type = type || this.type;\n    \n                // blob需要重新生成。\n                if ( this.modified || this.type !== type ) {\n                    canvas = this._canvas;\n    \n                    if ( type === 'image/jpeg' ) {\n    \n                        blob = Util.canvasToDataUrl( canvas, type, opts.quality );\n    \n                        if ( opts.preserveHeaders && this._metas &&\n                                this._metas.imageHead ) {\n    \n                            blob = Util.dataURL2ArrayBuffer( blob );\n                            blob = Util.updateImageHead( blob,\n                                    this._metas.imageHead );\n                            blob = Util.arrayBufferToBlob( blob, type );\n                            return blob;\n                        }\n                    } else {\n                        blob = Util.canvasToDataUrl( canvas, type );\n                    }\n    \n                    blob = Util.dataURL2Blob( blob );\n                }\n    \n                return blob;\n            },\n    \n            getAsDataUrl: function( type ) {\n                var opts = this.options;\n    \n                type = type || this.type;\n    \n                if ( type === 'image/jpeg' ) {\n                    return Util.canvasToDataUrl( this._canvas, type, opts.quality );\n                } else {\n                    return this._canvas.toDataURL( type );\n                }\n            },\n    \n            getOrientation: function() {\n                return this._metas && this._metas.exif &&\n                        this._metas.exif.get('Orientation') || 1;\n            },\n    \n            info: function( val ) {\n    \n                // setter\n                if ( val ) {\n                    this._info = val;\n                    return this;\n                }\n    \n                // getter\n                return this._info;\n            },\n    \n            meta: function( val ) {\n    \n                // setter\n                if ( val ) {\n                    this._metas = val;\n                    return this;\n                }\n    \n                // getter\n                return this._metas;\n            },\n    \n            destroy: function() {\n                var canvas = this._canvas;\n                this._img.onload = null;\n    \n                if ( canvas ) {\n                    canvas.getContext('2d')\n                            .clearRect( 0, 0, canvas.width, canvas.height );\n                    canvas.width = canvas.height = 0;\n                    this._canvas = null;\n                }\n    \n                // 释放内存。非常重要，否则释放不了image的内存。\n                this._img.src = BLANK;\n                this._img = this._blob = null;\n            },\n    \n            _resize: function( img, cvs, width, height ) {\n                var opts = this.options,\n                    naturalWidth = img.width,\n                    naturalHeight = img.height,\n                    orientation = this.getOrientation(),\n                    scale, w, h, x, y;\n    \n                // values that require 90 degree rotation\n                if ( ~[ 5, 6, 7, 8 ].indexOf( orientation ) ) {\n    \n                    // 交换width, height的值。\n                    width ^= height;\n                    height ^= width;\n                    width ^= height;\n                }\n    \n                scale = Math[ opts.crop ? 'max' : 'min' ]( width / naturalWidth,\n                        height / naturalHeight );\n    \n                // 不允许放大。\n                opts.allowMagnify || (scale = Math.min( 1, scale ));\n    \n                w = naturalWidth * scale;\n                h = naturalHeight * scale;\n    \n                if ( opts.crop ) {\n                    cvs.width = width;\n                    cvs.height = height;\n                } else {\n                    cvs.width = w;\n                    cvs.height = h;\n                }\n    \n                x = (cvs.width - w) / 2;\n                y = (cvs.height - h) / 2;\n    \n                opts.preserveHeaders || this._rotate2Orientaion( cvs, orientation );\n    \n                this._renderImageToCanvas( cvs, img, x, y, w, h );\n            },\n    \n            _rotate2Orientaion: function( canvas, orientation ) {\n                var width = canvas.width,\n                    height = canvas.height,\n                    ctx = canvas.getContext('2d');\n    \n                switch ( orientation ) {\n                    case 5:\n                    case 6:\n                    case 7:\n                    case 8:\n                        canvas.width = height;\n                        canvas.height = width;\n                        break;\n                }\n    \n                switch ( orientation ) {\n                    case 2:    // horizontal flip\n                        ctx.translate( width, 0 );\n                        ctx.scale( -1, 1 );\n                        break;\n    \n                    case 3:    // 180 rotate left\n                        ctx.translate( width, height );\n                        ctx.rotate( Math.PI );\n                        break;\n    \n                    case 4:    // vertical flip\n                        ctx.translate( 0, height );\n                        ctx.scale( 1, -1 );\n                        break;\n    \n                    case 5:    // vertical flip + 90 rotate right\n                        ctx.rotate( 0.5 * Math.PI );\n                        ctx.scale( 1, -1 );\n                        break;\n    \n                    case 6:    // 90 rotate right\n                        ctx.rotate( 0.5 * Math.PI );\n                        ctx.translate( 0, -height );\n                        break;\n    \n                    case 7:    // horizontal flip + 90 rotate right\n                        ctx.rotate( 0.5 * Math.PI );\n                        ctx.translate( width, -height );\n                        ctx.scale( -1, 1 );\n                        break;\n    \n                    case 8:    // 90 rotate left\n                        ctx.rotate( -0.5 * Math.PI );\n                        ctx.translate( -width, 0 );\n                        break;\n                }\n            },\n    \n            // https://github.com/stomita/ios-imagefile-megapixel/\n            // blob/master/src/megapix-image.js\n            _renderImageToCanvas: (function() {\n    \n                // 如果不是ios, 不需要这么复杂！\n                if ( !Base.os.ios ) {\n                    return function( canvas ) {\n                        var args = Base.slice( arguments, 1 ),\n                            ctx = canvas.getContext('2d');\n    \n                        ctx.drawImage.apply( ctx, args );\n                    };\n                }\n    \n                /**\n                 * Detecting vertical squash in loaded image.\n                 * Fixes a bug which squash image vertically while drawing into\n                 * canvas for some images.\n                 */\n                function detectVerticalSquash( img, iw, ih ) {\n                    var canvas = document.createElement('canvas'),\n                        ctx = canvas.getContext('2d'),\n                        sy = 0,\n                        ey = ih,\n                        py = ih,\n                        data, alpha, ratio;\n    \n    \n                    canvas.width = 1;\n                    canvas.height = ih;\n                    ctx.drawImage( img, 0, 0 );\n                    data = ctx.getImageData( 0, 0, 1, ih ).data;\n    \n                    // search image edge pixel position in case\n                    // it is squashed vertically.\n                    while ( py > sy ) {\n                        alpha = data[ (py - 1) * 4 + 3 ];\n    \n                        if ( alpha === 0 ) {\n                            ey = py;\n                        } else {\n                            sy = py;\n                        }\n    \n                        py = (ey + sy) >> 1;\n                    }\n    \n                    ratio = (py / ih);\n                    return (ratio === 0) ? 1 : ratio;\n                }\n    \n                // fix ie7 bug\n                // http://stackoverflow.com/questions/11929099/\n                // html5-canvas-drawimage-ratio-bug-ios\n                if ( Base.os.ios >= 7 ) {\n                    return function( canvas, img, x, y, w, h ) {\n                        var iw = img.naturalWidth,\n                            ih = img.naturalHeight,\n                            vertSquashRatio = detectVerticalSquash( img, iw, ih );\n    \n                        return canvas.getContext('2d').drawImage( img, 0, 0,\n                                iw * vertSquashRatio, ih * vertSquashRatio,\n                                x, y, w, h );\n                    };\n                }\n    \n                /**\n                 * Detect subsampling in loaded image.\n                 * In iOS, larger images than 2M pixels may be\n                 * subsampled in rendering.\n                 */\n                function detectSubsampling( img ) {\n                    var iw = img.naturalWidth,\n                        ih = img.naturalHeight,\n                        canvas, ctx;\n    \n                    // subsampling may happen overmegapixel image\n                    if ( iw * ih > 1024 * 1024 ) {\n                        canvas = document.createElement('canvas');\n                        canvas.width = canvas.height = 1;\n                        ctx = canvas.getContext('2d');\n                        ctx.drawImage( img, -iw + 1, 0 );\n    \n                        // subsampled image becomes half smaller in rendering size.\n                        // check alpha channel value to confirm image is covering\n                        // edge pixel or not. if alpha value is 0\n                        // image is not covering, hence subsampled.\n                        return ctx.getImageData( 0, 0, 1, 1 ).data[ 3 ] === 0;\n                    } else {\n                        return false;\n                    }\n                }\n    \n    \n                return function( canvas, img, x, y, width, height ) {\n                    var iw = img.naturalWidth,\n                        ih = img.naturalHeight,\n                        ctx = canvas.getContext('2d'),\n                        subsampled = detectSubsampling( img ),\n                        doSquash = this.type === 'image/jpeg',\n                        d = 1024,\n                        sy = 0,\n                        dy = 0,\n                        tmpCanvas, tmpCtx, vertSquashRatio, dw, dh, sx, dx;\n    \n                    if ( subsampled ) {\n                        iw /= 2;\n                        ih /= 2;\n                    }\n    \n                    ctx.save();\n                    tmpCanvas = document.createElement('canvas');\n                    tmpCanvas.width = tmpCanvas.height = d;\n    \n                    tmpCtx = tmpCanvas.getContext('2d');\n                    vertSquashRatio = doSquash ?\n                            detectVerticalSquash( img, iw, ih ) : 1;\n    \n                    dw = Math.ceil( d * width / iw );\n                    dh = Math.ceil( d * height / ih / vertSquashRatio );\n    \n                    while ( sy < ih ) {\n                        sx = 0;\n                        dx = 0;\n                        while ( sx < iw ) {\n                            tmpCtx.clearRect( 0, 0, d, d );\n                            tmpCtx.drawImage( img, -sx, -sy );\n                            ctx.drawImage( tmpCanvas, 0, 0, d, d,\n                                    x + dx, y + dy, dw, dh );\n                            sx += d;\n                            dx += dw;\n                        }\n                        sy += d;\n                        dy += dh;\n                    }\n                    ctx.restore();\n                    tmpCanvas = tmpCtx = null;\n                };\n            })()\n        });\n    });\n    \n    /**\n     * 这个方式性能不行，但是可以解决android里面的toDataUrl的bug\n     * android里面toDataUrl('image/jpege')得到的结果却是png.\n     *\n     * 所以这里没辙，只能借助这个工具\n     * @fileOverview jpeg encoder\n     */\n    define('runtime/html5/jpegencoder',[], function( require, exports, module ) {\n    \n        /*\n          Copyright (c) 2008, Adobe Systems Incorporated\n          All rights reserved.\n    \n          Redistribution and use in source and binary forms, with or without\n          modification, are permitted provided that the following conditions are\n          met:\n    \n          * Redistributions of source code must retain the above copyright notice,\n            this list of conditions and the following disclaimer.\n    \n          * Redistributions in binary form must reproduce the above copyright\n            notice, this list of conditions and the following disclaimer in the\n            documentation and/or other materials provided with the distribution.\n    \n          * Neither the name of Adobe Systems Incorporated nor the names of its\n            contributors may be used to endorse or promote products derived from\n            this software without specific prior written permission.\n    \n          THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS\n          IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,\n          THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\n          PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR\n          CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\n          EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\n          PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n          PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n          LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n          NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n          SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n        */\n        /*\n        JPEG encoder ported to JavaScript and optimized by Andreas Ritter, www.bytestrom.eu, 11/2009\n    \n        Basic GUI blocking jpeg encoder\n        */\n    \n        function JPEGEncoder(quality) {\n          var self = this;\n            var fround = Math.round;\n            var ffloor = Math.floor;\n            var YTable = new Array(64);\n            var UVTable = new Array(64);\n            var fdtbl_Y = new Array(64);\n            var fdtbl_UV = new Array(64);\n            var YDC_HT;\n            var UVDC_HT;\n            var YAC_HT;\n            var UVAC_HT;\n    \n            var bitcode = new Array(65535);\n            var category = new Array(65535);\n            var outputfDCTQuant = new Array(64);\n            var DU = new Array(64);\n            var byteout = [];\n            var bytenew = 0;\n            var bytepos = 7;\n    \n            var YDU = new Array(64);\n            var UDU = new Array(64);\n            var VDU = new Array(64);\n            var clt = new Array(256);\n            var RGB_YUV_TABLE = new Array(2048);\n            var currentQuality;\n    \n            var ZigZag = [\n                     0, 1, 5, 6,14,15,27,28,\n                     2, 4, 7,13,16,26,29,42,\n                     3, 8,12,17,25,30,41,43,\n                     9,11,18,24,31,40,44,53,\n                    10,19,23,32,39,45,52,54,\n                    20,22,33,38,46,51,55,60,\n                    21,34,37,47,50,56,59,61,\n                    35,36,48,49,57,58,62,63\n                ];\n    \n            var std_dc_luminance_nrcodes = [0,0,1,5,1,1,1,1,1,1,0,0,0,0,0,0,0];\n            var std_dc_luminance_values = [0,1,2,3,4,5,6,7,8,9,10,11];\n            var std_ac_luminance_nrcodes = [0,0,2,1,3,3,2,4,3,5,5,4,4,0,0,1,0x7d];\n            var std_ac_luminance_values = [\n                    0x01,0x02,0x03,0x00,0x04,0x11,0x05,0x12,\n                    0x21,0x31,0x41,0x06,0x13,0x51,0x61,0x07,\n                    0x22,0x71,0x14,0x32,0x81,0x91,0xa1,0x08,\n                    0x23,0x42,0xb1,0xc1,0x15,0x52,0xd1,0xf0,\n                    0x24,0x33,0x62,0x72,0x82,0x09,0x0a,0x16,\n                    0x17,0x18,0x19,0x1a,0x25,0x26,0x27,0x28,\n                    0x29,0x2a,0x34,0x35,0x36,0x37,0x38,0x39,\n                    0x3a,0x43,0x44,0x45,0x46,0x47,0x48,0x49,\n                    0x4a,0x53,0x54,0x55,0x56,0x57,0x58,0x59,\n                    0x5a,0x63,0x64,0x65,0x66,0x67,0x68,0x69,\n                    0x6a,0x73,0x74,0x75,0x76,0x77,0x78,0x79,\n                    0x7a,0x83,0x84,0x85,0x86,0x87,0x88,0x89,\n                    0x8a,0x92,0x93,0x94,0x95,0x96,0x97,0x98,\n                    0x99,0x9a,0xa2,0xa3,0xa4,0xa5,0xa6,0xa7,\n                    0xa8,0xa9,0xaa,0xb2,0xb3,0xb4,0xb5,0xb6,\n                    0xb7,0xb8,0xb9,0xba,0xc2,0xc3,0xc4,0xc5,\n                    0xc6,0xc7,0xc8,0xc9,0xca,0xd2,0xd3,0xd4,\n                    0xd5,0xd6,0xd7,0xd8,0xd9,0xda,0xe1,0xe2,\n                    0xe3,0xe4,0xe5,0xe6,0xe7,0xe8,0xe9,0xea,\n                    0xf1,0xf2,0xf3,0xf4,0xf5,0xf6,0xf7,0xf8,\n                    0xf9,0xfa\n                ];\n    \n            var std_dc_chrominance_nrcodes = [0,0,3,1,1,1,1,1,1,1,1,1,0,0,0,0,0];\n            var std_dc_chrominance_values = [0,1,2,3,4,5,6,7,8,9,10,11];\n            var std_ac_chrominance_nrcodes = [0,0,2,1,2,4,4,3,4,7,5,4,4,0,1,2,0x77];\n            var std_ac_chrominance_values = [\n                    0x00,0x01,0x02,0x03,0x11,0x04,0x05,0x21,\n                    0x31,0x06,0x12,0x41,0x51,0x07,0x61,0x71,\n                    0x13,0x22,0x32,0x81,0x08,0x14,0x42,0x91,\n                    0xa1,0xb1,0xc1,0x09,0x23,0x33,0x52,0xf0,\n                    0x15,0x62,0x72,0xd1,0x0a,0x16,0x24,0x34,\n                    0xe1,0x25,0xf1,0x17,0x18,0x19,0x1a,0x26,\n                    0x27,0x28,0x29,0x2a,0x35,0x36,0x37,0x38,\n                    0x39,0x3a,0x43,0x44,0x45,0x46,0x47,0x48,\n                    0x49,0x4a,0x53,0x54,0x55,0x56,0x57,0x58,\n                    0x59,0x5a,0x63,0x64,0x65,0x66,0x67,0x68,\n                    0x69,0x6a,0x73,0x74,0x75,0x76,0x77,0x78,\n                    0x79,0x7a,0x82,0x83,0x84,0x85,0x86,0x87,\n                    0x88,0x89,0x8a,0x92,0x93,0x94,0x95,0x96,\n                    0x97,0x98,0x99,0x9a,0xa2,0xa3,0xa4,0xa5,\n                    0xa6,0xa7,0xa8,0xa9,0xaa,0xb2,0xb3,0xb4,\n                    0xb5,0xb6,0xb7,0xb8,0xb9,0xba,0xc2,0xc3,\n                    0xc4,0xc5,0xc6,0xc7,0xc8,0xc9,0xca,0xd2,\n                    0xd3,0xd4,0xd5,0xd6,0xd7,0xd8,0xd9,0xda,\n                    0xe2,0xe3,0xe4,0xe5,0xe6,0xe7,0xe8,0xe9,\n                    0xea,0xf2,0xf3,0xf4,0xf5,0xf6,0xf7,0xf8,\n                    0xf9,0xfa\n                ];\n    \n            function initQuantTables(sf){\n                    var YQT = [\n                        16, 11, 10, 16, 24, 40, 51, 61,\n                        12, 12, 14, 19, 26, 58, 60, 55,\n                        14, 13, 16, 24, 40, 57, 69, 56,\n                        14, 17, 22, 29, 51, 87, 80, 62,\n                        18, 22, 37, 56, 68,109,103, 77,\n                        24, 35, 55, 64, 81,104,113, 92,\n                        49, 64, 78, 87,103,121,120,101,\n                        72, 92, 95, 98,112,100,103, 99\n                    ];\n    \n                    for (var i = 0; i < 64; i++) {\n                        var t = ffloor((YQT[i]*sf+50)/100);\n                        if (t < 1) {\n                            t = 1;\n                        } else if (t > 255) {\n                            t = 255;\n                        }\n                        YTable[ZigZag[i]] = t;\n                    }\n                    var UVQT = [\n                        17, 18, 24, 47, 99, 99, 99, 99,\n                        18, 21, 26, 66, 99, 99, 99, 99,\n                        24, 26, 56, 99, 99, 99, 99, 99,\n                        47, 66, 99, 99, 99, 99, 99, 99,\n                        99, 99, 99, 99, 99, 99, 99, 99,\n                        99, 99, 99, 99, 99, 99, 99, 99,\n                        99, 99, 99, 99, 99, 99, 99, 99,\n                        99, 99, 99, 99, 99, 99, 99, 99\n                    ];\n                    for (var j = 0; j < 64; j++) {\n                        var u = ffloor((UVQT[j]*sf+50)/100);\n                        if (u < 1) {\n                            u = 1;\n                        } else if (u > 255) {\n                            u = 255;\n                        }\n                        UVTable[ZigZag[j]] = u;\n                    }\n                    var aasf = [\n                        1.0, 1.387039845, 1.306562965, 1.175875602,\n                        1.0, 0.785694958, 0.541196100, 0.275899379\n                    ];\n                    var k = 0;\n                    for (var row = 0; row < 8; row++)\n                    {\n                        for (var col = 0; col < 8; col++)\n                        {\n                            fdtbl_Y[k]  = (1.0 / (YTable [ZigZag[k]] * aasf[row] * aasf[col] * 8.0));\n                            fdtbl_UV[k] = (1.0 / (UVTable[ZigZag[k]] * aasf[row] * aasf[col] * 8.0));\n                            k++;\n                        }\n                    }\n                }\n    \n                function computeHuffmanTbl(nrcodes, std_table){\n                    var codevalue = 0;\n                    var pos_in_table = 0;\n                    var HT = new Array();\n                    for (var k = 1; k <= 16; k++) {\n                        for (var j = 1; j <= nrcodes[k]; j++) {\n                            HT[std_table[pos_in_table]] = [];\n                            HT[std_table[pos_in_table]][0] = codevalue;\n                            HT[std_table[pos_in_table]][1] = k;\n                            pos_in_table++;\n                            codevalue++;\n                        }\n                        codevalue*=2;\n                    }\n                    return HT;\n                }\n    \n                function initHuffmanTbl()\n                {\n                    YDC_HT = computeHuffmanTbl(std_dc_luminance_nrcodes,std_dc_luminance_values);\n                    UVDC_HT = computeHuffmanTbl(std_dc_chrominance_nrcodes,std_dc_chrominance_values);\n                    YAC_HT = computeHuffmanTbl(std_ac_luminance_nrcodes,std_ac_luminance_values);\n                    UVAC_HT = computeHuffmanTbl(std_ac_chrominance_nrcodes,std_ac_chrominance_values);\n                }\n    \n                function initCategoryNumber()\n                {\n                    var nrlower = 1;\n                    var nrupper = 2;\n                    for (var cat = 1; cat <= 15; cat++) {\n                        //Positive numbers\n                        for (var nr = nrlower; nr<nrupper; nr++) {\n                            category[32767+nr] = cat;\n                            bitcode[32767+nr] = [];\n                            bitcode[32767+nr][1] = cat;\n                            bitcode[32767+nr][0] = nr;\n                        }\n                        //Negative numbers\n                        for (var nrneg =-(nrupper-1); nrneg<=-nrlower; nrneg++) {\n                            category[32767+nrneg] = cat;\n                            bitcode[32767+nrneg] = [];\n                            bitcode[32767+nrneg][1] = cat;\n                            bitcode[32767+nrneg][0] = nrupper-1+nrneg;\n                        }\n                        nrlower <<= 1;\n                        nrupper <<= 1;\n                    }\n                }\n    \n                function initRGBYUVTable() {\n                    for(var i = 0; i < 256;i++) {\n                        RGB_YUV_TABLE[i]            =  19595 * i;\n                        RGB_YUV_TABLE[(i+ 256)>>0]  =  38470 * i;\n                        RGB_YUV_TABLE[(i+ 512)>>0]  =   7471 * i + 0x8000;\n                        RGB_YUV_TABLE[(i+ 768)>>0]  = -11059 * i;\n                        RGB_YUV_TABLE[(i+1024)>>0]  = -21709 * i;\n                        RGB_YUV_TABLE[(i+1280)>>0]  =  32768 * i + 0x807FFF;\n                        RGB_YUV_TABLE[(i+1536)>>0]  = -27439 * i;\n                        RGB_YUV_TABLE[(i+1792)>>0]  = - 5329 * i;\n                    }\n                }\n    \n                // IO functions\n                function writeBits(bs)\n                {\n                    var value = bs[0];\n                    var posval = bs[1]-1;\n                    while ( posval >= 0 ) {\n                        if (value & (1 << posval) ) {\n                            bytenew |= (1 << bytepos);\n                        }\n                        posval--;\n                        bytepos--;\n                        if (bytepos < 0) {\n                            if (bytenew == 0xFF) {\n                                writeByte(0xFF);\n                                writeByte(0);\n                            }\n                            else {\n                                writeByte(bytenew);\n                            }\n                            bytepos=7;\n                            bytenew=0;\n                        }\n                    }\n                }\n    \n                function writeByte(value)\n                {\n                    byteout.push(clt[value]); // write char directly instead of converting later\n                }\n    \n                function writeWord(value)\n                {\n                    writeByte((value>>8)&0xFF);\n                    writeByte((value   )&0xFF);\n                }\n    \n                // DCT & quantization core\n                function fDCTQuant(data, fdtbl)\n                {\n                    var d0, d1, d2, d3, d4, d5, d6, d7;\n                    /* Pass 1: process rows. */\n                    var dataOff=0;\n                    var i;\n                    var I8 = 8;\n                    var I64 = 64;\n                    for (i=0; i<I8; ++i)\n                    {\n                        d0 = data[dataOff];\n                        d1 = data[dataOff+1];\n                        d2 = data[dataOff+2];\n                        d3 = data[dataOff+3];\n                        d4 = data[dataOff+4];\n                        d5 = data[dataOff+5];\n                        d6 = data[dataOff+6];\n                        d7 = data[dataOff+7];\n    \n                        var tmp0 = d0 + d7;\n                        var tmp7 = d0 - d7;\n                        var tmp1 = d1 + d6;\n                        var tmp6 = d1 - d6;\n                        var tmp2 = d2 + d5;\n                        var tmp5 = d2 - d5;\n                        var tmp3 = d3 + d4;\n                        var tmp4 = d3 - d4;\n    \n                        /* Even part */\n                        var tmp10 = tmp0 + tmp3;    /* phase 2 */\n                        var tmp13 = tmp0 - tmp3;\n                        var tmp11 = tmp1 + tmp2;\n                        var tmp12 = tmp1 - tmp2;\n    \n                        data[dataOff] = tmp10 + tmp11; /* phase 3 */\n                        data[dataOff+4] = tmp10 - tmp11;\n    \n                        var z1 = (tmp12 + tmp13) * 0.707106781; /* c4 */\n                        data[dataOff+2] = tmp13 + z1; /* phase 5 */\n                        data[dataOff+6] = tmp13 - z1;\n    \n                        /* Odd part */\n                        tmp10 = tmp4 + tmp5; /* phase 2 */\n                        tmp11 = tmp5 + tmp6;\n                        tmp12 = tmp6 + tmp7;\n    \n                        /* The rotator is modified from fig 4-8 to avoid extra negations. */\n                        var z5 = (tmp10 - tmp12) * 0.382683433; /* c6 */\n                        var z2 = 0.541196100 * tmp10 + z5; /* c2-c6 */\n                        var z4 = 1.306562965 * tmp12 + z5; /* c2+c6 */\n                        var z3 = tmp11 * 0.707106781; /* c4 */\n    \n                        var z11 = tmp7 + z3;    /* phase 5 */\n                        var z13 = tmp7 - z3;\n    \n                        data[dataOff+5] = z13 + z2; /* phase 6 */\n                        data[dataOff+3] = z13 - z2;\n                        data[dataOff+1] = z11 + z4;\n                        data[dataOff+7] = z11 - z4;\n    \n                        dataOff += 8; /* advance pointer to next row */\n                    }\n    \n                    /* Pass 2: process columns. */\n                    dataOff = 0;\n                    for (i=0; i<I8; ++i)\n                    {\n                        d0 = data[dataOff];\n                        d1 = data[dataOff + 8];\n                        d2 = data[dataOff + 16];\n                        d3 = data[dataOff + 24];\n                        d4 = data[dataOff + 32];\n                        d5 = data[dataOff + 40];\n                        d6 = data[dataOff + 48];\n                        d7 = data[dataOff + 56];\n    \n                        var tmp0p2 = d0 + d7;\n                        var tmp7p2 = d0 - d7;\n                        var tmp1p2 = d1 + d6;\n                        var tmp6p2 = d1 - d6;\n                        var tmp2p2 = d2 + d5;\n                        var tmp5p2 = d2 - d5;\n                        var tmp3p2 = d3 + d4;\n                        var tmp4p2 = d3 - d4;\n    \n                        /* Even part */\n                        var tmp10p2 = tmp0p2 + tmp3p2;  /* phase 2 */\n                        var tmp13p2 = tmp0p2 - tmp3p2;\n                        var tmp11p2 = tmp1p2 + tmp2p2;\n                        var tmp12p2 = tmp1p2 - tmp2p2;\n    \n                        data[dataOff] = tmp10p2 + tmp11p2; /* phase 3 */\n                        data[dataOff+32] = tmp10p2 - tmp11p2;\n    \n                        var z1p2 = (tmp12p2 + tmp13p2) * 0.707106781; /* c4 */\n                        data[dataOff+16] = tmp13p2 + z1p2; /* phase 5 */\n                        data[dataOff+48] = tmp13p2 - z1p2;\n    \n                        /* Odd part */\n                        tmp10p2 = tmp4p2 + tmp5p2; /* phase 2 */\n                        tmp11p2 = tmp5p2 + tmp6p2;\n                        tmp12p2 = tmp6p2 + tmp7p2;\n    \n                        /* The rotator is modified from fig 4-8 to avoid extra negations. */\n                        var z5p2 = (tmp10p2 - tmp12p2) * 0.382683433; /* c6 */\n                        var z2p2 = 0.541196100 * tmp10p2 + z5p2; /* c2-c6 */\n                        var z4p2 = 1.306562965 * tmp12p2 + z5p2; /* c2+c6 */\n                        var z3p2 = tmp11p2 * 0.707106781; /* c4 */\n    \n                        var z11p2 = tmp7p2 + z3p2;  /* phase 5 */\n                        var z13p2 = tmp7p2 - z3p2;\n    \n                        data[dataOff+40] = z13p2 + z2p2; /* phase 6 */\n                        data[dataOff+24] = z13p2 - z2p2;\n                        data[dataOff+ 8] = z11p2 + z4p2;\n                        data[dataOff+56] = z11p2 - z4p2;\n    \n                        dataOff++; /* advance pointer to next column */\n                    }\n    \n                    // Quantize/descale the coefficients\n                    var fDCTQuant;\n                    for (i=0; i<I64; ++i)\n                    {\n                        // Apply the quantization and scaling factor & Round to nearest integer\n                        fDCTQuant = data[i]*fdtbl[i];\n                        outputfDCTQuant[i] = (fDCTQuant > 0.0) ? ((fDCTQuant + 0.5)|0) : ((fDCTQuant - 0.5)|0);\n                        //outputfDCTQuant[i] = fround(fDCTQuant);\n    \n                    }\n                    return outputfDCTQuant;\n                }\n    \n                function writeAPP0()\n                {\n                    writeWord(0xFFE0); // marker\n                    writeWord(16); // length\n                    writeByte(0x4A); // J\n                    writeByte(0x46); // F\n                    writeByte(0x49); // I\n                    writeByte(0x46); // F\n                    writeByte(0); // = \"JFIF\",'\\0'\n                    writeByte(1); // versionhi\n                    writeByte(1); // versionlo\n                    writeByte(0); // xyunits\n                    writeWord(1); // xdensity\n                    writeWord(1); // ydensity\n                    writeByte(0); // thumbnwidth\n                    writeByte(0); // thumbnheight\n                }\n    \n                function writeSOF0(width, height)\n                {\n                    writeWord(0xFFC0); // marker\n                    writeWord(17);   // length, truecolor YUV JPG\n                    writeByte(8);    // precision\n                    writeWord(height);\n                    writeWord(width);\n                    writeByte(3);    // nrofcomponents\n                    writeByte(1);    // IdY\n                    writeByte(0x11); // HVY\n                    writeByte(0);    // QTY\n                    writeByte(2);    // IdU\n                    writeByte(0x11); // HVU\n                    writeByte(1);    // QTU\n                    writeByte(3);    // IdV\n                    writeByte(0x11); // HVV\n                    writeByte(1);    // QTV\n                }\n    \n                function writeDQT()\n                {\n                    writeWord(0xFFDB); // marker\n                    writeWord(132);    // length\n                    writeByte(0);\n                    for (var i=0; i<64; i++) {\n                        writeByte(YTable[i]);\n                    }\n                    writeByte(1);\n                    for (var j=0; j<64; j++) {\n                        writeByte(UVTable[j]);\n                    }\n                }\n    \n                function writeDHT()\n                {\n                    writeWord(0xFFC4); // marker\n                    writeWord(0x01A2); // length\n    \n                    writeByte(0); // HTYDCinfo\n                    for (var i=0; i<16; i++) {\n                        writeByte(std_dc_luminance_nrcodes[i+1]);\n                    }\n                    for (var j=0; j<=11; j++) {\n                        writeByte(std_dc_luminance_values[j]);\n                    }\n    \n                    writeByte(0x10); // HTYACinfo\n                    for (var k=0; k<16; k++) {\n                        writeByte(std_ac_luminance_nrcodes[k+1]);\n                    }\n                    for (var l=0; l<=161; l++) {\n                        writeByte(std_ac_luminance_values[l]);\n                    }\n    \n                    writeByte(1); // HTUDCinfo\n                    for (var m=0; m<16; m++) {\n                        writeByte(std_dc_chrominance_nrcodes[m+1]);\n                    }\n                    for (var n=0; n<=11; n++) {\n                        writeByte(std_dc_chrominance_values[n]);\n                    }\n    \n                    writeByte(0x11); // HTUACinfo\n                    for (var o=0; o<16; o++) {\n                        writeByte(std_ac_chrominance_nrcodes[o+1]);\n                    }\n                    for (var p=0; p<=161; p++) {\n                        writeByte(std_ac_chrominance_values[p]);\n                    }\n                }\n    \n                function writeSOS()\n                {\n                    writeWord(0xFFDA); // marker\n                    writeWord(12); // length\n                    writeByte(3); // nrofcomponents\n                    writeByte(1); // IdY\n                    writeByte(0); // HTY\n                    writeByte(2); // IdU\n                    writeByte(0x11); // HTU\n                    writeByte(3); // IdV\n                    writeByte(0x11); // HTV\n                    writeByte(0); // Ss\n                    writeByte(0x3f); // Se\n                    writeByte(0); // Bf\n                }\n    \n                function processDU(CDU, fdtbl, DC, HTDC, HTAC){\n                    var EOB = HTAC[0x00];\n                    var M16zeroes = HTAC[0xF0];\n                    var pos;\n                    var I16 = 16;\n                    var I63 = 63;\n                    var I64 = 64;\n                    var DU_DCT = fDCTQuant(CDU, fdtbl);\n                    //ZigZag reorder\n                    for (var j=0;j<I64;++j) {\n                        DU[ZigZag[j]]=DU_DCT[j];\n                    }\n                    var Diff = DU[0] - DC; DC = DU[0];\n                    //Encode DC\n                    if (Diff==0) {\n                        writeBits(HTDC[0]); // Diff might be 0\n                    } else {\n                        pos = 32767+Diff;\n                        writeBits(HTDC[category[pos]]);\n                        writeBits(bitcode[pos]);\n                    }\n                    //Encode ACs\n                    var end0pos = 63; // was const... which is crazy\n                    for (; (end0pos>0)&&(DU[end0pos]==0); end0pos--) {};\n                    //end0pos = first element in reverse order !=0\n                    if ( end0pos == 0) {\n                        writeBits(EOB);\n                        return DC;\n                    }\n                    var i = 1;\n                    var lng;\n                    while ( i <= end0pos ) {\n                        var startpos = i;\n                        for (; (DU[i]==0) && (i<=end0pos); ++i) {}\n                        var nrzeroes = i-startpos;\n                        if ( nrzeroes >= I16 ) {\n                            lng = nrzeroes>>4;\n                            for (var nrmarker=1; nrmarker <= lng; ++nrmarker)\n                                writeBits(M16zeroes);\n                            nrzeroes = nrzeroes&0xF;\n                        }\n                        pos = 32767+DU[i];\n                        writeBits(HTAC[(nrzeroes<<4)+category[pos]]);\n                        writeBits(bitcode[pos]);\n                        i++;\n                    }\n                    if ( end0pos != I63 ) {\n                        writeBits(EOB);\n                    }\n                    return DC;\n                }\n    \n                function initCharLookupTable(){\n                    var sfcc = String.fromCharCode;\n                    for(var i=0; i < 256; i++){ ///// ACHTUNG // 255\n                        clt[i] = sfcc(i);\n                    }\n                }\n    \n                this.encode = function(image,quality) // image data object\n                {\n                    // var time_start = new Date().getTime();\n    \n                    if(quality) setQuality(quality);\n    \n                    // Initialize bit writer\n                    byteout = new Array();\n                    bytenew=0;\n                    bytepos=7;\n    \n                    // Add JPEG headers\n                    writeWord(0xFFD8); // SOI\n                    writeAPP0();\n                    writeDQT();\n                    writeSOF0(image.width,image.height);\n                    writeDHT();\n                    writeSOS();\n    \n    \n                    // Encode 8x8 macroblocks\n                    var DCY=0;\n                    var DCU=0;\n                    var DCV=0;\n    \n                    bytenew=0;\n                    bytepos=7;\n    \n    \n                    this.encode.displayName = \"_encode_\";\n    \n                    var imageData = image.data;\n                    var width = image.width;\n                    var height = image.height;\n    \n                    var quadWidth = width*4;\n                    var tripleWidth = width*3;\n    \n                    var x, y = 0;\n                    var r, g, b;\n                    var start,p, col,row,pos;\n                    while(y < height){\n                        x = 0;\n                        while(x < quadWidth){\n                        start = quadWidth * y + x;\n                        p = start;\n                        col = -1;\n                        row = 0;\n    \n                        for(pos=0; pos < 64; pos++){\n                            row = pos >> 3;// /8\n                            col = ( pos & 7 ) * 4; // %8\n                            p = start + ( row * quadWidth ) + col;\n    \n                            if(y+row >= height){ // padding bottom\n                                p-= (quadWidth*(y+1+row-height));\n                            }\n    \n                            if(x+col >= quadWidth){ // padding right\n                                p-= ((x+col) - quadWidth +4)\n                            }\n    \n                            r = imageData[ p++ ];\n                            g = imageData[ p++ ];\n                            b = imageData[ p++ ];\n    \n    \n                            /* // calculate YUV values dynamically\n                            YDU[pos]=((( 0.29900)*r+( 0.58700)*g+( 0.11400)*b))-128; //-0x80\n                            UDU[pos]=(((-0.16874)*r+(-0.33126)*g+( 0.50000)*b));\n                            VDU[pos]=((( 0.50000)*r+(-0.41869)*g+(-0.08131)*b));\n                            */\n    \n                            // use lookup table (slightly faster)\n                            YDU[pos] = ((RGB_YUV_TABLE[r]             + RGB_YUV_TABLE[(g +  256)>>0] + RGB_YUV_TABLE[(b +  512)>>0]) >> 16)-128;\n                            UDU[pos] = ((RGB_YUV_TABLE[(r +  768)>>0] + RGB_YUV_TABLE[(g + 1024)>>0] + RGB_YUV_TABLE[(b + 1280)>>0]) >> 16)-128;\n                            VDU[pos] = ((RGB_YUV_TABLE[(r + 1280)>>0] + RGB_YUV_TABLE[(g + 1536)>>0] + RGB_YUV_TABLE[(b + 1792)>>0]) >> 16)-128;\n    \n                        }\n    \n                        DCY = processDU(YDU, fdtbl_Y, DCY, YDC_HT, YAC_HT);\n                        DCU = processDU(UDU, fdtbl_UV, DCU, UVDC_HT, UVAC_HT);\n                        DCV = processDU(VDU, fdtbl_UV, DCV, UVDC_HT, UVAC_HT);\n                        x+=32;\n                        }\n                        y+=8;\n                    }\n    \n    \n                    ////////////////////////////////////////////////////////////////\n    \n                    // Do the bit alignment of the EOI marker\n                    if ( bytepos >= 0 ) {\n                        var fillbits = [];\n                        fillbits[1] = bytepos+1;\n                        fillbits[0] = (1<<(bytepos+1))-1;\n                        writeBits(fillbits);\n                    }\n    \n                    writeWord(0xFFD9); //EOI\n    \n                    var jpegDataUri = 'data:image/jpeg;base64,' + btoa(byteout.join(''));\n    \n                    byteout = [];\n    \n                    // benchmarking\n                    // var duration = new Date().getTime() - time_start;\n                    // console.log('Encoding time: '+ currentQuality + 'ms');\n                    //\n    \n                    return jpegDataUri\n            }\n    \n            function setQuality(quality){\n                if (quality <= 0) {\n                    quality = 1;\n                }\n                if (quality > 100) {\n                    quality = 100;\n                }\n    \n                if(currentQuality == quality) return // don't recalc if unchanged\n    \n                var sf = 0;\n                if (quality < 50) {\n                    sf = Math.floor(5000 / quality);\n                } else {\n                    sf = Math.floor(200 - quality*2);\n                }\n    \n                initQuantTables(sf);\n                currentQuality = quality;\n                // console.log('Quality set to: '+quality +'%');\n            }\n    \n            function init(){\n                // var time_start = new Date().getTime();\n                if(!quality) quality = 50;\n                // Create tables\n                initCharLookupTable()\n                initHuffmanTbl();\n                initCategoryNumber();\n                initRGBYUVTable();\n    \n                setQuality(quality);\n                // var duration = new Date().getTime() - time_start;\n                // console.log('Initialization '+ duration + 'ms');\n            }\n    \n            init();\n    \n        };\n    \n        JPEGEncoder.encode = function( data, quality ) {\n            var encoder = new JPEGEncoder( quality );\n    \n            return encoder.encode( data );\n        }\n    \n        return JPEGEncoder;\n    });\n    /**\n     * @fileOverview Fix android canvas.toDataUrl bug.\n     */\n    define('runtime/html5/androidpatch',[\n        'runtime/html5/util',\n        'runtime/html5/jpegencoder',\n        'base'\n    ], function( Util, encoder, Base ) {\n        var origin = Util.canvasToDataUrl,\n            supportJpeg;\n    \n        Util.canvasToDataUrl = function( canvas, type, quality ) {\n            var ctx, w, h, fragement, parts;\n    \n            // 非android手机直接跳过。\n            if ( !Base.os.android ) {\n                return origin.apply( null, arguments );\n            }\n    \n            // 检测是否canvas支持jpeg导出，根据数据格式来判断。\n            // JPEG 前两位分别是：255, 216\n            if ( type === 'image/jpeg' && typeof supportJpeg === 'undefined' ) {\n                fragement = origin.apply( null, arguments );\n    \n                parts = fragement.split(',');\n    \n                if ( ~parts[ 0 ].indexOf('base64') ) {\n                    fragement = atob( parts[ 1 ] );\n                } else {\n                    fragement = decodeURIComponent( parts[ 1 ] );\n                }\n    \n                fragement = fragement.substring( 0, 2 );\n    \n                supportJpeg = fragement.charCodeAt( 0 ) === 255 &&\n                        fragement.charCodeAt( 1 ) === 216;\n            }\n    \n            // 只有在android环境下才修复\n            if ( type === 'image/jpeg' && !supportJpeg ) {\n                w = canvas.width;\n                h = canvas.height;\n                ctx = canvas.getContext('2d');\n    \n                return encoder.encode( ctx.getImageData( 0, 0, w, h ), quality );\n            }\n    \n            return origin.apply( null, arguments );\n        };\n    });\n    /**\n     * @fileOverview Transport\n     * @todo 支持chunked传输，优势：\n     * 可以将大文件分成小块，挨个传输，可以提高大文件成功率，当失败的时候，也只需要重传那小部分，\n     * 而不需要重头再传一次。另外断点续传也需要用chunked方式。\n     */\n    define('runtime/html5/transport',[\n        'base',\n        'runtime/html5/runtime'\n    ], function( Base, Html5Runtime ) {\n    \n        var noop = Base.noop,\n            $ = Base.$;\n    \n        return Html5Runtime.register( 'Transport', {\n            init: function() {\n                this._status = 0;\n                this._response = null;\n            },\n    \n            send: function() {\n                var owner = this.owner,\n                    opts = this.options,\n                    xhr = this._initAjax(),\n                    blob = owner._blob,\n                    server = opts.server,\n                    formData, binary, fr;\n    \n                if ( opts.sendAsBinary ) {\n                    server += (/\\?/.test( server ) ? '&' : '?') +\n                            $.param( owner._formData );\n    \n                    binary = blob.getSource();\n                } else {\n                    formData = new FormData();\n                    $.each( owner._formData, function( k, v ) {\n                        formData.append( k, v );\n                    });\n    \n                    formData.append( opts.fileVal, blob.getSource(),\n                            opts.filename || owner._formData.name || '' );\n                }\n    \n                if ( opts.withCredentials && 'withCredentials' in xhr ) {\n                    xhr.open( opts.method, server, true );\n                    xhr.withCredentials = true;\n                } else {\n                    xhr.open( opts.method, server );\n                }\n    \n                this._setRequestHeader( xhr, opts.headers );\n    \n                if ( binary ) {\n                    // 强制设置成 content-type 为文件流。\n                    xhr.overrideMimeType &&\n                            xhr.overrideMimeType('application/octet-stream');\n    \n                    // android直接发送blob会导致服务端接收到的是空文件。\n                    // bug详情。\n                    // https://code.google.com/p/android/issues/detail?id=39882\n                    // 所以先用fileReader读取出来再通过arraybuffer的方式发送。\n                    if ( Base.os.android ) {\n                        fr = new FileReader();\n    \n                        fr.onload = function() {\n                            xhr.send( this.result );\n                            fr = fr.onload = null;\n                        };\n    \n                        fr.readAsArrayBuffer( binary );\n                    } else {\n                        xhr.send( binary );\n                    }\n                } else {\n                    xhr.send( formData );\n                }\n            },\n    \n            getResponse: function() {\n                return this._response;\n            },\n    \n            getResponseAsJson: function() {\n                return this._parseJson( this._response );\n            },\n    \n            getStatus: function() {\n                return this._status;\n            },\n    \n            abort: function() {\n                var xhr = this._xhr;\n    \n                if ( xhr ) {\n                    xhr.upload.onprogress = noop;\n                    xhr.onreadystatechange = noop;\n                    xhr.abort();\n    \n                    this._xhr = xhr = null;\n                }\n            },\n    \n            destroy: function() {\n                this.abort();\n            },\n    \n            _initAjax: function() {\n                var me = this,\n                    xhr = new XMLHttpRequest(),\n                    opts = this.options;\n    \n                if ( opts.withCredentials && !('withCredentials' in xhr) &&\n                        typeof XDomainRequest !== 'undefined' ) {\n                    xhr = new XDomainRequest();\n                }\n    \n                xhr.upload.onprogress = function( e ) {\n                    var percentage = 0;\n    \n                    if ( e.lengthComputable ) {\n                        percentage = e.loaded / e.total;\n                    }\n    \n                    return me.trigger( 'progress', percentage );\n                };\n    \n                xhr.onreadystatechange = function() {\n    \n                    if ( xhr.readyState !== 4 ) {\n                        return;\n                    }\n    \n                    xhr.upload.onprogress = noop;\n                    xhr.onreadystatechange = noop;\n                    me._xhr = null;\n                    me._status = xhr.status;\n    \n                    if ( xhr.status >= 200 && xhr.status < 300 ) {\n                        me._response = xhr.responseText;\n                        return me.trigger('load');\n                    } else if ( xhr.status >= 500 && xhr.status < 600 ) {\n                        me._response = xhr.responseText;\n                        return me.trigger( 'error', 'server' );\n                    }\n    \n    \n                    return me.trigger( 'error', me._status ? 'http' : 'abort' );\n                };\n    \n                me._xhr = xhr;\n                return xhr;\n            },\n    \n            _setRequestHeader: function( xhr, headers ) {\n                $.each( headers, function( key, val ) {\n                    xhr.setRequestHeader( key, val );\n                });\n            },\n    \n            _parseJson: function( str ) {\n                var json;\n    \n                try {\n                    json = JSON.parse( str );\n                } catch ( ex ) {\n                    json = {};\n                }\n    \n                return json;\n            }\n        });\n    });\n    define('webuploader',[\n        'base',\n        'widgets/filepicker',\n        'widgets/image',\n        'widgets/queue',\n        'widgets/runtime',\n        'widgets/upload',\n        'widgets/log',\n        'runtime/html5/blob',\n        'runtime/html5/filepicker',\n        'runtime/html5/imagemeta/exif',\n        'runtime/html5/image',\n        'runtime/html5/androidpatch',\n        'runtime/html5/transport'\n    ], function( Base ) {\n        return Base;\n    });\n    return require('webuploader');\n});\n"
  },
  {
    "path": "static/webuploader/webuploader.fis.js",
    "content": "/*! WebUploader 0.1.6 */\n\n\nvar jQuery = require('example:widget/ui/jquery/jquery.js');\n\nmodule.exports = (function( root, factory ) {\n    var modules = {},\n\n        // 内部require, 简单不完全实现。\n        // https://github.com/amdjs/amdjs-api/wiki/require\n        _require = function( deps, callback ) {\n            var args, len, i;\n\n            // 如果deps不是数组，则直接返回指定module\n            if ( typeof deps === 'string' ) {\n                return getModule( deps );\n            } else {\n                args = [];\n                for( len = deps.length, i = 0; i < len; i++ ) {\n                    args.push( getModule( deps[ i ] ) );\n                }\n\n                return callback.apply( null, args );\n            }\n        },\n\n        // 内部define，暂时不支持不指定id.\n        _define = function( id, deps, factory ) {\n            if ( arguments.length === 2 ) {\n                factory = deps;\n                deps = null;\n            }\n\n            _require( deps || [], function() {\n                setModule( id, factory, arguments );\n            });\n        },\n\n        // 设置module, 兼容CommonJs写法。\n        setModule = function( id, factory, args ) {\n            var module = {\n                    exports: factory\n                },\n                returned;\n\n            if ( typeof factory === 'function' ) {\n                args.length || (args = [ _require, module.exports, module ]);\n                returned = factory.apply( null, args );\n                returned !== undefined && (module.exports = returned);\n            }\n\n            modules[ id ] = module.exports;\n        },\n\n        // 根据id获取module\n        getModule = function( id ) {\n            var module = modules[ id ] || root[ id ];\n\n            if ( !module ) {\n                throw new Error( '`' + id + '` is undefined' );\n            }\n\n            return module;\n        },\n\n        // 将所有modules，将路径ids装换成对象。\n        exportsTo = function( obj ) {\n            var key, host, parts, part, last, ucFirst;\n\n            // make the first character upper case.\n            ucFirst = function( str ) {\n                return str && (str.charAt( 0 ).toUpperCase() + str.substr( 1 ));\n            };\n\n            for ( key in modules ) {\n                host = obj;\n\n                if ( !modules.hasOwnProperty( key ) ) {\n                    continue;\n                }\n\n                parts = key.split('/');\n                last = ucFirst( parts.pop() );\n\n                while( (part = ucFirst( parts.shift() )) ) {\n                    host[ part ] = host[ part ] || {};\n                    host = host[ part ];\n                }\n\n                host[ last ] = modules[ key ];\n            }\n\n            return obj;\n        },\n\n        makeExport = function( dollar ) {\n            root.__dollar = dollar;\n\n            // exports every module.\n            return exportsTo( factory( root, _define, _require ) );\n        };\n\n    return makeExport( jQuery );\n})( window, function( window, define, require ) {\n\n\n    /**\n     * @fileOverview jQuery or Zepto\n     * @require \"jquery\"\n     * @require \"zepto\"\n     */\n    define('dollar-third',[],function() {\n        var req = window.require;\n        var $ = window.__dollar || \n            window.jQuery || \n            window.Zepto || \n            req('jquery') || \n            req('zepto');\n    \n        if ( !$ ) {\n            throw new Error('jQuery or Zepto not found!');\n        }\n    \n        return $;\n    });\n    \n    /**\n     * @fileOverview Dom 操作相关\n     */\n    define('dollar',[\n        'dollar-third'\n    ], function( _ ) {\n        return _;\n    });\n    /**\n     * @fileOverview 使用jQuery的Promise\n     */\n    define('promise-third',[\n        'dollar'\n    ], function( $ ) {\n        return {\n            Deferred: $.Deferred,\n            when: $.when,\n    \n            isPromise: function( anything ) {\n                return anything && typeof anything.then === 'function';\n            }\n        };\n    });\n    /**\n     * @fileOverview Promise/A+\n     */\n    define('promise',[\n        'promise-third'\n    ], function( _ ) {\n        return _;\n    });\n    /**\n     * @fileOverview 基础类方法。\n     */\n    \n    /**\n     * Web Uploader内部类的详细说明，以下提及的功能类，都可以在`WebUploader`这个变量中访问到。\n     *\n     * As you know, Web Uploader的每个文件都是用过[AMD](https://github.com/amdjs/amdjs-api/wiki/AMD)规范中的`define`组织起来的, 每个Module都会有个module id.\n     * 默认module id为该文件的路径，而此路径将会转化成名字空间存放在WebUploader中。如：\n     *\n     * * module `base`：WebUploader.Base\n     * * module `file`: WebUploader.File\n     * * module `lib/dnd`: WebUploader.Lib.Dnd\n     * * module `runtime/html5/dnd`: WebUploader.Runtime.Html5.Dnd\n     *\n     *\n     * 以下文档中对类的使用可能省略掉了`WebUploader`前缀。\n     * @module WebUploader\n     * @title WebUploader API文档\n     */\n    define('base',[\n        'dollar',\n        'promise'\n    ], function( $, promise ) {\n    \n        var noop = function() {},\n            call = Function.call;\n    \n        // http://jsperf.com/uncurrythis\n        // 反科里化\n        function uncurryThis( fn ) {\n            return function() {\n                return call.apply( fn, arguments );\n            };\n        }\n    \n        function bindFn( fn, context ) {\n            return function() {\n                return fn.apply( context, arguments );\n            };\n        }\n    \n        function createObject( proto ) {\n            var f;\n    \n            if ( Object.create ) {\n                return Object.create( proto );\n            } else {\n                f = function() {};\n                f.prototype = proto;\n                return new f();\n            }\n        }\n    \n    \n        /**\n         * 基础类，提供一些简单常用的方法。\n         * @class Base\n         */\n        return {\n    \n            /**\n             * @property {String} version 当前版本号。\n             */\n            version: '0.1.6',\n    \n            /**\n             * @property {jQuery|Zepto} $ 引用依赖的jQuery或者Zepto对象。\n             */\n            $: $,\n    \n            Deferred: promise.Deferred,\n    \n            isPromise: promise.isPromise,\n    \n            when: promise.when,\n    \n            /**\n             * @description  简单的浏览器检查结果。\n             *\n             * * `webkit`  webkit版本号，如果浏览器为非webkit内核，此属性为`undefined`。\n             * * `chrome`  chrome浏览器版本号，如果浏览器为chrome，此属性为`undefined`。\n             * * `ie`  ie浏览器版本号，如果浏览器为非ie，此属性为`undefined`。**暂不支持ie10+**\n             * * `firefox`  firefox浏览器版本号，如果浏览器为非firefox，此属性为`undefined`。\n             * * `safari`  safari浏览器版本号，如果浏览器为非safari，此属性为`undefined`。\n             * * `opera`  opera浏览器版本号，如果浏览器为非opera，此属性为`undefined`。\n             *\n             * @property {Object} [browser]\n             */\n            browser: (function( ua ) {\n                var ret = {},\n                    webkit = ua.match( /WebKit\\/([\\d.]+)/ ),\n                    chrome = ua.match( /Chrome\\/([\\d.]+)/ ) ||\n                        ua.match( /CriOS\\/([\\d.]+)/ ),\n    \n                    ie = ua.match( /MSIE\\s([\\d\\.]+)/ ) ||\n                        ua.match( /(?:trident)(?:.*rv:([\\w.]+))?/i ),\n                    firefox = ua.match( /Firefox\\/([\\d.]+)/ ),\n                    safari = ua.match( /Safari\\/([\\d.]+)/ ),\n                    opera = ua.match( /OPR\\/([\\d.]+)/ );\n    \n                webkit && (ret.webkit = parseFloat( webkit[ 1 ] ));\n                chrome && (ret.chrome = parseFloat( chrome[ 1 ] ));\n                ie && (ret.ie = parseFloat( ie[ 1 ] ));\n                firefox && (ret.firefox = parseFloat( firefox[ 1 ] ));\n                safari && (ret.safari = parseFloat( safari[ 1 ] ));\n                opera && (ret.opera = parseFloat( opera[ 1 ] ));\n    \n                return ret;\n            })( navigator.userAgent ),\n    \n            /**\n             * @description  操作系统检查结果。\n             *\n             * * `android`  如果在android浏览器环境下，此值为对应的android版本号，否则为`undefined`。\n             * * `ios` 如果在ios浏览器环境下，此值为对应的ios版本号，否则为`undefined`。\n             * @property {Object} [os]\n             */\n            os: (function( ua ) {\n                var ret = {},\n    \n                    // osx = !!ua.match( /\\(Macintosh\\; Intel / ),\n                    android = ua.match( /(?:Android);?[\\s\\/]+([\\d.]+)?/ ),\n                    ios = ua.match( /(?:iPad|iPod|iPhone).*OS\\s([\\d_]+)/ );\n    \n                // osx && (ret.osx = true);\n                android && (ret.android = parseFloat( android[ 1 ] ));\n                ios && (ret.ios = parseFloat( ios[ 1 ].replace( /_/g, '.' ) ));\n    \n                return ret;\n            })( navigator.userAgent ),\n    \n            /**\n             * 实现类与类之间的继承。\n             * @method inherits\n             * @grammar Base.inherits( super ) => child\n             * @grammar Base.inherits( super, protos ) => child\n             * @grammar Base.inherits( super, protos, statics ) => child\n             * @param  {Class} super 父类\n             * @param  {Object | Function} [protos] 子类或者对象。如果对象中包含constructor，子类将是用此属性值。\n             * @param  {Function} [protos.constructor] 子类构造器，不指定的话将创建个临时的直接执行父类构造器的方法。\n             * @param  {Object} [statics] 静态属性或方法。\n             * @return {Class} 返回子类。\n             * @example\n             * function Person() {\n             *     console.log( 'Super' );\n             * }\n             * Person.prototype.hello = function() {\n             *     console.log( 'hello' );\n             * };\n             *\n             * var Manager = Base.inherits( Person, {\n             *     world: function() {\n             *         console.log( 'World' );\n             *     }\n             * });\n             *\n             * // 因为没有指定构造器，父类的构造器将会执行。\n             * var instance = new Manager();    // => Super\n             *\n             * // 继承子父类的方法\n             * instance.hello();    // => hello\n             * instance.world();    // => World\n             *\n             * // 子类的__super__属性指向父类\n             * console.log( Manager.__super__ === Person );    // => true\n             */\n            inherits: function( Super, protos, staticProtos ) {\n                var child;\n    \n                if ( typeof protos === 'function' ) {\n                    child = protos;\n                    protos = null;\n                } else if ( protos && protos.hasOwnProperty('constructor') ) {\n                    child = protos.constructor;\n                } else {\n                    child = function() {\n                        return Super.apply( this, arguments );\n                    };\n                }\n    \n                // 复制静态方法\n                $.extend( true, child, Super, staticProtos || {} );\n    \n                /* jshint camelcase: false */\n    \n                // 让子类的__super__属性指向父类。\n                child.__super__ = Super.prototype;\n    \n                // 构建原型，添加原型方法或属性。\n                // 暂时用Object.create实现。\n                child.prototype = createObject( Super.prototype );\n                protos && $.extend( true, child.prototype, protos );\n    \n                return child;\n            },\n    \n            /**\n             * 一个不做任何事情的方法。可以用来赋值给默认的callback.\n             * @method noop\n             */\n            noop: noop,\n    \n            /**\n             * 返回一个新的方法，此方法将已指定的`context`来执行。\n             * @grammar Base.bindFn( fn, context ) => Function\n             * @method bindFn\n             * @example\n             * var doSomething = function() {\n             *         console.log( this.name );\n             *     },\n             *     obj = {\n             *         name: 'Object Name'\n             *     },\n             *     aliasFn = Base.bind( doSomething, obj );\n             *\n             *  aliasFn();    // => Object Name\n             *\n             */\n            bindFn: bindFn,\n    \n            /**\n             * 引用Console.log如果存在的话，否则引用一个[空函数noop](#WebUploader:Base.noop)。\n             * @grammar Base.log( args... ) => undefined\n             * @method log\n             */\n            log: (function() {\n                if ( window.console ) {\n                    return bindFn( console.log, console );\n                }\n                return noop;\n            })(),\n    \n            nextTick: (function() {\n    \n                return function( cb ) {\n                    setTimeout( cb, 1 );\n                };\n    \n                // @bug 当浏览器不在当前窗口时就停了。\n                // var next = window.requestAnimationFrame ||\n                //     window.webkitRequestAnimationFrame ||\n                //     window.mozRequestAnimationFrame ||\n                //     function( cb ) {\n                //         window.setTimeout( cb, 1000 / 60 );\n                //     };\n    \n                // // fix: Uncaught TypeError: Illegal invocation\n                // return bindFn( next, window );\n            })(),\n    \n            /**\n             * 被[uncurrythis](http://www.2ality.com/2011/11/uncurrying-this.html)的数组slice方法。\n             * 将用来将非数组对象转化成数组对象。\n             * @grammar Base.slice( target, start[, end] ) => Array\n             * @method slice\n             * @example\n             * function doSomthing() {\n             *     var args = Base.slice( arguments, 1 );\n             *     console.log( args );\n             * }\n             *\n             * doSomthing( 'ignored', 'arg2', 'arg3' );    // => Array [\"arg2\", \"arg3\"]\n             */\n            slice: uncurryThis( [].slice ),\n    \n            /**\n             * 生成唯一的ID\n             * @method guid\n             * @grammar Base.guid() => String\n             * @grammar Base.guid( prefx ) => String\n             */\n            guid: (function() {\n                var counter = 0;\n    \n                return function( prefix ) {\n                    var guid = (+new Date()).toString( 32 ),\n                        i = 0;\n    \n                    for ( ; i < 5; i++ ) {\n                        guid += Math.floor( Math.random() * 65535 ).toString( 32 );\n                    }\n    \n                    return (prefix || 'wu_') + guid + (counter++).toString( 32 );\n                };\n            })(),\n    \n            /**\n             * 格式化文件大小, 输出成带单位的字符串\n             * @method formatSize\n             * @grammar Base.formatSize( size ) => String\n             * @grammar Base.formatSize( size, pointLength ) => String\n             * @grammar Base.formatSize( size, pointLength, units ) => String\n             * @param {Number} size 文件大小\n             * @param {Number} [pointLength=2] 精确到的小数点数。\n             * @param {Array} [units=[ 'B', 'K', 'M', 'G', 'TB' ]] 单位数组。从字节，到千字节，一直往上指定。如果单位数组里面只指定了到了K(千字节)，同时文件大小大于M, 此方法的输出将还是显示成多少K.\n             * @example\n             * console.log( Base.formatSize( 100 ) );    // => 100B\n             * console.log( Base.formatSize( 1024 ) );    // => 1.00K\n             * console.log( Base.formatSize( 1024, 0 ) );    // => 1K\n             * console.log( Base.formatSize( 1024 * 1024 ) );    // => 1.00M\n             * console.log( Base.formatSize( 1024 * 1024 * 1024 ) );    // => 1.00G\n             * console.log( Base.formatSize( 1024 * 1024 * 1024, 0, ['B', 'KB', 'MB'] ) );    // => 1024MB\n             */\n            formatSize: function( size, pointLength, units ) {\n                var unit;\n    \n                units = units || [ 'B', 'K', 'M', 'G', 'TB' ];\n    \n                while ( (unit = units.shift()) && size > 1024 ) {\n                    size = size / 1024;\n                }\n    \n                return (unit === 'B' ? size : size.toFixed( pointLength || 2 )) +\n                        unit;\n            }\n        };\n    });\n    /**\n     * 事件处理类，可以独立使用，也可以扩展给对象使用。\n     * @fileOverview Mediator\n     */\n    define('mediator',[\n        'base'\n    ], function( Base ) {\n        var $ = Base.$,\n            slice = [].slice,\n            separator = /\\s+/,\n            protos;\n    \n        // 根据条件过滤出事件handlers.\n        function findHandlers( arr, name, callback, context ) {\n            return $.grep( arr, function( handler ) {\n                return handler &&\n                        (!name || handler.e === name) &&\n                        (!callback || handler.cb === callback ||\n                        handler.cb._cb === callback) &&\n                        (!context || handler.ctx === context);\n            });\n        }\n    \n        function eachEvent( events, callback, iterator ) {\n            // 不支持对象，只支持多个event用空格隔开\n            $.each( (events || '').split( separator ), function( _, key ) {\n                iterator( key, callback );\n            });\n        }\n    \n        function triggerHanders( events, args ) {\n            var stoped = false,\n                i = -1,\n                len = events.length,\n                handler;\n    \n            while ( ++i < len ) {\n                handler = events[ i ];\n    \n                if ( handler.cb.apply( handler.ctx2, args ) === false ) {\n                    stoped = true;\n                    break;\n                }\n            }\n    \n            return !stoped;\n        }\n    \n        protos = {\n    \n            /**\n             * 绑定事件。\n             *\n             * `callback`方法在执行时，arguments将会来源于trigger的时候携带的参数。如\n             * ```javascript\n             * var obj = {};\n             *\n             * // 使得obj有事件行为\n             * Mediator.installTo( obj );\n             *\n             * obj.on( 'testa', function( arg1, arg2 ) {\n             *     console.log( arg1, arg2 ); // => 'arg1', 'arg2'\n             * });\n             *\n             * obj.trigger( 'testa', 'arg1', 'arg2' );\n             * ```\n             *\n             * 如果`callback`中，某一个方法`return false`了，则后续的其他`callback`都不会被执行到。\n             * 切会影响到`trigger`方法的返回值，为`false`。\n             *\n             * `on`还可以用来添加一个特殊事件`all`, 这样所有的事件触发都会响应到。同时此类`callback`中的arguments有一个不同处，\n             * 就是第一个参数为`type`，记录当前是什么事件在触发。此类`callback`的优先级比脚低，会再正常`callback`执行完后触发。\n             * ```javascript\n             * obj.on( 'all', function( type, arg1, arg2 ) {\n             *     console.log( type, arg1, arg2 ); // => 'testa', 'arg1', 'arg2'\n             * });\n             * ```\n             *\n             * @method on\n             * @grammar on( name, callback[, context] ) => self\n             * @param  {String}   name     事件名，支持多个事件用空格隔开\n             * @param  {Function} callback 事件处理器\n             * @param  {Object}   [context]  事件处理器的上下文。\n             * @return {self} 返回自身，方便链式\n             * @chainable\n             * @class Mediator\n             */\n            on: function( name, callback, context ) {\n                var me = this,\n                    set;\n    \n                if ( !callback ) {\n                    return this;\n                }\n    \n                set = this._events || (this._events = []);\n    \n                eachEvent( name, callback, function( name, callback ) {\n                    var handler = { e: name };\n    \n                    handler.cb = callback;\n                    handler.ctx = context;\n                    handler.ctx2 = context || me;\n                    handler.id = set.length;\n    \n                    set.push( handler );\n                });\n    \n                return this;\n            },\n    \n            /**\n             * 绑定事件，且当handler执行完后，自动解除绑定。\n             * @method once\n             * @grammar once( name, callback[, context] ) => self\n             * @param  {String}   name     事件名\n             * @param  {Function} callback 事件处理器\n             * @param  {Object}   [context]  事件处理器的上下文。\n             * @return {self} 返回自身，方便链式\n             * @chainable\n             */\n            once: function( name, callback, context ) {\n                var me = this;\n    \n                if ( !callback ) {\n                    return me;\n                }\n    \n                eachEvent( name, callback, function( name, callback ) {\n                    var once = function() {\n                            me.off( name, once );\n                            return callback.apply( context || me, arguments );\n                        };\n    \n                    once._cb = callback;\n                    me.on( name, once, context );\n                });\n    \n                return me;\n            },\n    \n            /**\n             * 解除事件绑定\n             * @method off\n             * @grammar off( [name[, callback[, context] ] ] ) => self\n             * @param  {String}   [name]     事件名\n             * @param  {Function} [callback] 事件处理器\n             * @param  {Object}   [context]  事件处理器的上下文。\n             * @return {self} 返回自身，方便链式\n             * @chainable\n             */\n            off: function( name, cb, ctx ) {\n                var events = this._events;\n    \n                if ( !events ) {\n                    return this;\n                }\n    \n                if ( !name && !cb && !ctx ) {\n                    this._events = [];\n                    return this;\n                }\n    \n                eachEvent( name, cb, function( name, cb ) {\n                    $.each( findHandlers( events, name, cb, ctx ), function() {\n                        delete events[ this.id ];\n                    });\n                });\n    \n                return this;\n            },\n    \n            /**\n             * 触发事件\n             * @method trigger\n             * @grammar trigger( name[, args...] ) => self\n             * @param  {String}   type     事件名\n             * @param  {*} [...] 任意参数\n             * @return {Boolean} 如果handler中return false了，则返回false, 否则返回true\n             */\n            trigger: function( type ) {\n                var args, events, allEvents;\n    \n                if ( !this._events || !type ) {\n                    return this;\n                }\n    \n                args = slice.call( arguments, 1 );\n                events = findHandlers( this._events, type );\n                allEvents = findHandlers( this._events, 'all' );\n    \n                return triggerHanders( events, args ) &&\n                        triggerHanders( allEvents, arguments );\n            }\n        };\n    \n        /**\n         * 中介者，它本身是个单例，但可以通过[installTo](#WebUploader:Mediator:installTo)方法，使任何对象具备事件行为。\n         * 主要目的是负责模块与模块之间的合作，降低耦合度。\n         *\n         * @class Mediator\n         */\n        return $.extend({\n    \n            /**\n             * 可以通过这个接口，使任何对象具备事件功能。\n             * @method installTo\n             * @param  {Object} obj 需要具备事件行为的对象。\n             * @return {Object} 返回obj.\n             */\n            installTo: function( obj ) {\n                return $.extend( obj, protos );\n            }\n    \n        }, protos );\n    });\n    /**\n     * @fileOverview Uploader上传类\n     */\n    define('uploader',[\n        'base',\n        'mediator'\n    ], function( Base, Mediator ) {\n    \n        var $ = Base.$;\n    \n        /**\n         * 上传入口类。\n         * @class Uploader\n         * @constructor\n         * @grammar new Uploader( opts ) => Uploader\n         * @example\n         * var uploader = WebUploader.Uploader({\n         *     swf: 'path_of_swf/Uploader.swf',\n         *\n         *     // 开起分片上传。\n         *     chunked: true\n         * });\n         */\n        function Uploader( opts ) {\n            this.options = $.extend( true, {}, Uploader.options, opts );\n            this._init( this.options );\n        }\n    \n        // default Options\n        // widgets中有相应扩展\n        Uploader.options = {};\n        Mediator.installTo( Uploader.prototype );\n    \n        // 批量添加纯命令式方法。\n        $.each({\n            upload: 'start-upload',\n            stop: 'stop-upload',\n            getFile: 'get-file',\n            getFiles: 'get-files',\n            addFile: 'add-file',\n            addFiles: 'add-file',\n            sort: 'sort-files',\n            removeFile: 'remove-file',\n            cancelFile: 'cancel-file',\n            skipFile: 'skip-file',\n            retry: 'retry',\n            isInProgress: 'is-in-progress',\n            makeThumb: 'make-thumb',\n            md5File: 'md5-file',\n            getDimension: 'get-dimension',\n            addButton: 'add-btn',\n            predictRuntimeType: 'predict-runtime-type',\n            refresh: 'refresh',\n            disable: 'disable',\n            enable: 'enable',\n            reset: 'reset'\n        }, function( fn, command ) {\n            Uploader.prototype[ fn ] = function() {\n                return this.request( command, arguments );\n            };\n        });\n    \n        $.extend( Uploader.prototype, {\n            state: 'pending',\n    \n            _init: function( opts ) {\n                var me = this;\n    \n                me.request( 'init', opts, function() {\n                    me.state = 'ready';\n                    me.trigger('ready');\n                });\n            },\n    \n            /**\n             * 获取或者设置Uploader配置项。\n             * @method option\n             * @grammar option( key ) => *\n             * @grammar option( key, val ) => self\n             * @example\n             *\n             * // 初始状态图片上传前不会压缩\n             * var uploader = new WebUploader.Uploader({\n             *     compress: null;\n             * });\n             *\n             * // 修改后图片上传前，尝试将图片压缩到1600 * 1600\n             * uploader.option( 'compress', {\n             *     width: 1600,\n             *     height: 1600\n             * });\n             */\n            option: function( key, val ) {\n                var opts = this.options;\n    \n                // setter\n                if ( arguments.length > 1 ) {\n    \n                    if ( $.isPlainObject( val ) &&\n                            $.isPlainObject( opts[ key ] ) ) {\n                        $.extend( opts[ key ], val );\n                    } else {\n                        opts[ key ] = val;\n                    }\n    \n                } else {    // getter\n                    return key ? opts[ key ] : opts;\n                }\n            },\n    \n            /**\n             * 获取文件统计信息。返回一个包含一下信息的对象。\n             * * `successNum` 上传成功的文件数\n             * * `progressNum` 上传中的文件数\n             * * `cancelNum` 被删除的文件数\n             * * `invalidNum` 无效的文件数\n             * * `uploadFailNum` 上传失败的文件数\n             * * `queueNum` 还在队列中的文件数\n             * * `interruptNum` 被暂停的文件数\n             * @method getStats\n             * @grammar getStats() => Object\n             */\n            getStats: function() {\n                // return this._mgr.getStats.apply( this._mgr, arguments );\n                var stats = this.request('get-stats');\n    \n                return stats ? {\n                    successNum: stats.numOfSuccess,\n                    progressNum: stats.numOfProgress,\n    \n                    // who care?\n                    // queueFailNum: 0,\n                    cancelNum: stats.numOfCancel,\n                    invalidNum: stats.numOfInvalid,\n                    uploadFailNum: stats.numOfUploadFailed,\n                    queueNum: stats.numOfQueue,\n                    interruptNum: stats.numofInterrupt\n                } : {};\n            },\n    \n            // 需要重写此方法来来支持opts.onEvent和instance.onEvent的处理器\n            trigger: function( type/*, args...*/ ) {\n                var args = [].slice.call( arguments, 1 ),\n                    opts = this.options,\n                    name = 'on' + type.substring( 0, 1 ).toUpperCase() +\n                        type.substring( 1 );\n    \n                if (\n                        // 调用通过on方法注册的handler.\n                        Mediator.trigger.apply( this, arguments ) === false ||\n    \n                        // 调用opts.onEvent\n                        $.isFunction( opts[ name ] ) &&\n                        opts[ name ].apply( this, args ) === false ||\n    \n                        // 调用this.onEvent\n                        $.isFunction( this[ name ] ) &&\n                        this[ name ].apply( this, args ) === false ||\n    \n                        // 广播所有uploader的事件。\n                        Mediator.trigger.apply( Mediator,\n                        [ this, type ].concat( args ) ) === false ) {\n    \n                    return false;\n                }\n    \n                return true;\n            },\n    \n            /**\n             * 销毁 webuploader 实例\n             * @method destroy\n             * @grammar destroy() => undefined\n             */\n            destroy: function() {\n                this.request( 'destroy', arguments );\n                this.off();\n            },\n    \n            // widgets/widget.js将补充此方法的详细文档。\n            request: Base.noop\n        });\n    \n        /**\n         * 创建Uploader实例，等同于new Uploader( opts );\n         * @method create\n         * @class Base\n         * @static\n         * @grammar Base.create( opts ) => Uploader\n         */\n        Base.create = Uploader.create = function( opts ) {\n            return new Uploader( opts );\n        };\n    \n        // 暴露Uploader，可以通过它来扩展业务逻辑。\n        Base.Uploader = Uploader;\n    \n        return Uploader;\n    });\n    /**\n     * @fileOverview Runtime管理器，负责Runtime的选择, 连接\n     */\n    define('runtime/runtime',[\n        'base',\n        'mediator'\n    ], function( Base, Mediator ) {\n    \n        var $ = Base.$,\n            factories = {},\n    \n            // 获取对象的第一个key\n            getFirstKey = function( obj ) {\n                for ( var key in obj ) {\n                    if ( obj.hasOwnProperty( key ) ) {\n                        return key;\n                    }\n                }\n                return null;\n            };\n    \n        // 接口类。\n        function Runtime( options ) {\n            this.options = $.extend({\n                container: document.body\n            }, options );\n            this.uid = Base.guid('rt_');\n        }\n    \n        $.extend( Runtime.prototype, {\n    \n            getContainer: function() {\n                var opts = this.options,\n                    parent, container;\n    \n                if ( this._container ) {\n                    return this._container;\n                }\n    \n                parent = $( opts.container || document.body );\n                container = $( document.createElement('div') );\n    \n                container.attr( 'id', 'rt_' + this.uid );\n                container.css({\n                    position: 'absolute',\n                    top: '0px',\n                    left: '0px',\n                    width: '1px',\n                    height: '1px',\n                    overflow: 'hidden'\n                });\n    \n                parent.append( container );\n                parent.addClass('webuploader-container');\n                this._container = container;\n                this._parent = parent;\n                return container;\n            },\n    \n            init: Base.noop,\n            exec: Base.noop,\n    \n            destroy: function() {\n                this._container && this._container.remove();\n                this._parent && this._parent.removeClass('webuploader-container');\n                this.off();\n            }\n        });\n    \n        Runtime.orders = 'html5,flash';\n    \n    \n        /**\n         * 添加Runtime实现。\n         * @param {String} type    类型\n         * @param {Runtime} factory 具体Runtime实现。\n         */\n        Runtime.addRuntime = function( type, factory ) {\n            factories[ type ] = factory;\n        };\n    \n        Runtime.hasRuntime = function( type ) {\n            return !!(type ? factories[ type ] : getFirstKey( factories ));\n        };\n    \n        Runtime.create = function( opts, orders ) {\n            var type, runtime;\n    \n            orders = orders || Runtime.orders;\n            $.each( orders.split( /\\s*,\\s*/g ), function() {\n                if ( factories[ this ] ) {\n                    type = this;\n                    return false;\n                }\n            });\n    \n            type = type || getFirstKey( factories );\n    \n            if ( !type ) {\n                throw new Error('Runtime Error');\n            }\n    \n            runtime = new factories[ type ]( opts );\n            return runtime;\n        };\n    \n        Mediator.installTo( Runtime.prototype );\n        return Runtime;\n    });\n    \n    /**\n     * @fileOverview Runtime管理器，负责Runtime的选择, 连接\n     */\n    define('runtime/client',[\n        'base',\n        'mediator',\n        'runtime/runtime'\n    ], function( Base, Mediator, Runtime ) {\n    \n        var cache;\n    \n        cache = (function() {\n            var obj = {};\n    \n            return {\n                add: function( runtime ) {\n                    obj[ runtime.uid ] = runtime;\n                },\n    \n                get: function( ruid, standalone ) {\n                    var i;\n    \n                    if ( ruid ) {\n                        return obj[ ruid ];\n                    }\n    \n                    for ( i in obj ) {\n                        // 有些类型不能重用，比如filepicker.\n                        if ( standalone && obj[ i ].__standalone ) {\n                            continue;\n                        }\n    \n                        return obj[ i ];\n                    }\n    \n                    return null;\n                },\n    \n                remove: function( runtime ) {\n                    delete obj[ runtime.uid ];\n                }\n            };\n        })();\n    \n        function RuntimeClient( component, standalone ) {\n            var deferred = Base.Deferred(),\n                runtime;\n    \n            this.uid = Base.guid('client_');\n    \n            // 允许runtime没有初始化之前，注册一些方法在初始化后执行。\n            this.runtimeReady = function( cb ) {\n                return deferred.done( cb );\n            };\n    \n            this.connectRuntime = function( opts, cb ) {\n    \n                // already connected.\n                if ( runtime ) {\n                    throw new Error('already connected!');\n                }\n    \n                deferred.done( cb );\n    \n                if ( typeof opts === 'string' && cache.get( opts ) ) {\n                    runtime = cache.get( opts );\n                }\n    \n                // 像filePicker只能独立存在，不能公用。\n                runtime = runtime || cache.get( null, standalone );\n    \n                // 需要创建\n                if ( !runtime ) {\n                    runtime = Runtime.create( opts, opts.runtimeOrder );\n                    runtime.__promise = deferred.promise();\n                    runtime.once( 'ready', deferred.resolve );\n                    runtime.init();\n                    cache.add( runtime );\n                    runtime.__client = 1;\n                } else {\n                    // 来自cache\n                    Base.$.extend( runtime.options, opts );\n                    runtime.__promise.then( deferred.resolve );\n                    runtime.__client++;\n                }\n    \n                standalone && (runtime.__standalone = standalone);\n                return runtime;\n            };\n    \n            this.getRuntime = function() {\n                return runtime;\n            };\n    \n            this.disconnectRuntime = function() {\n                if ( !runtime ) {\n                    return;\n                }\n    \n                runtime.__client--;\n    \n                if ( runtime.__client <= 0 ) {\n                    cache.remove( runtime );\n                    delete runtime.__promise;\n                    runtime.destroy();\n                }\n    \n                runtime = null;\n            };\n    \n            this.exec = function() {\n                if ( !runtime ) {\n                    return;\n                }\n    \n                var args = Base.slice( arguments );\n                component && args.unshift( component );\n    \n                return runtime.exec.apply( this, args );\n            };\n    \n            this.getRuid = function() {\n                return runtime && runtime.uid;\n            };\n    \n            this.destroy = (function( destroy ) {\n                return function() {\n                    destroy && destroy.apply( this, arguments );\n                    this.trigger('destroy');\n                    this.off();\n                    this.exec('destroy');\n                    this.disconnectRuntime();\n                };\n            })( this.destroy );\n        }\n    \n        Mediator.installTo( RuntimeClient.prototype );\n        return RuntimeClient;\n    });\n    /**\n     * @fileOverview 错误信息\n     */\n    define('lib/dnd',[\n        'base',\n        'mediator',\n        'runtime/client'\n    ], function( Base, Mediator, RuntimeClent ) {\n    \n        var $ = Base.$;\n    \n        function DragAndDrop( opts ) {\n            opts = this.options = $.extend({}, DragAndDrop.options, opts );\n    \n            opts.container = $( opts.container );\n    \n            if ( !opts.container.length ) {\n                return;\n            }\n    \n            RuntimeClent.call( this, 'DragAndDrop' );\n        }\n    \n        DragAndDrop.options = {\n            accept: null,\n            disableGlobalDnd: false\n        };\n    \n        Base.inherits( RuntimeClent, {\n            constructor: DragAndDrop,\n    \n            init: function() {\n                var me = this;\n    \n                me.connectRuntime( me.options, function() {\n                    me.exec('init');\n                    me.trigger('ready');\n                });\n            }\n        });\n    \n        Mediator.installTo( DragAndDrop.prototype );\n    \n        return DragAndDrop;\n    });\n    /**\n     * @fileOverview 组件基类。\n     */\n    define('widgets/widget',[\n        'base',\n        'uploader'\n    ], function( Base, Uploader ) {\n    \n        var $ = Base.$,\n            _init = Uploader.prototype._init,\n            _destroy = Uploader.prototype.destroy,\n            IGNORE = {},\n            widgetClass = [];\n    \n        function isArrayLike( obj ) {\n            if ( !obj ) {\n                return false;\n            }\n    \n            var length = obj.length,\n                type = $.type( obj );\n    \n            if ( obj.nodeType === 1 && length ) {\n                return true;\n            }\n    \n            return type === 'array' || type !== 'function' && type !== 'string' &&\n                    (length === 0 || typeof length === 'number' && length > 0 &&\n                    (length - 1) in obj);\n        }\n    \n        function Widget( uploader ) {\n            this.owner = uploader;\n            this.options = uploader.options;\n        }\n    \n        $.extend( Widget.prototype, {\n    \n            init: Base.noop,\n    \n            // 类Backbone的事件监听声明，监听uploader实例上的事件\n            // widget直接无法监听事件，事件只能通过uploader来传递\n            invoke: function( apiName, args ) {\n    \n                /*\n                    {\n                        'make-thumb': 'makeThumb'\n                    }\n                 */\n                var map = this.responseMap;\n    \n                // 如果无API响应声明则忽略\n                if ( !map || !(apiName in map) || !(map[ apiName ] in this) ||\n                        !$.isFunction( this[ map[ apiName ] ] ) ) {\n    \n                    return IGNORE;\n                }\n    \n                return this[ map[ apiName ] ].apply( this, args );\n    \n            },\n    \n            /**\n             * 发送命令。当传入`callback`或者`handler`中返回`promise`时。返回一个当所有`handler`中的promise都完成后完成的新`promise`。\n             * @method request\n             * @grammar request( command, args ) => * | Promise\n             * @grammar request( command, args, callback ) => Promise\n             * @for  Uploader\n             */\n            request: function() {\n                return this.owner.request.apply( this.owner, arguments );\n            }\n        });\n    \n        // 扩展Uploader.\n        $.extend( Uploader.prototype, {\n    \n            /**\n             * @property {String | Array} [disableWidgets=undefined]\n             * @namespace options\n             * @for Uploader\n             * @description 默认所有 Uploader.register 了的 widget 都会被加载，如果禁用某一部分，请通过此 option 指定黑名单。\n             */\n    \n            // 覆写_init用来初始化widgets\n            _init: function() {\n                var me = this,\n                    widgets = me._widgets = [],\n                    deactives = me.options.disableWidgets || '';\n    \n                $.each( widgetClass, function( _, klass ) {\n                    (!deactives || !~deactives.indexOf( klass._name )) &&\n                        widgets.push( new klass( me ) );\n                });\n    \n                return _init.apply( me, arguments );\n            },\n    \n            request: function( apiName, args, callback ) {\n                var i = 0,\n                    widgets = this._widgets,\n                    len = widgets && widgets.length,\n                    rlts = [],\n                    dfds = [],\n                    widget, rlt, promise, key;\n    \n                args = isArrayLike( args ) ? args : [ args ];\n    \n                for ( ; i < len; i++ ) {\n                    widget = widgets[ i ];\n                    rlt = widget.invoke( apiName, args );\n    \n                    if ( rlt !== IGNORE ) {\n    \n                        // Deferred对象\n                        if ( Base.isPromise( rlt ) ) {\n                            dfds.push( rlt );\n                        } else {\n                            rlts.push( rlt );\n                        }\n                    }\n                }\n    \n                // 如果有callback，则用异步方式。\n                if ( callback || dfds.length ) {\n                    promise = Base.when.apply( Base, dfds );\n                    key = promise.pipe ? 'pipe' : 'then';\n    \n                    // 很重要不能删除。删除了会死循环。\n                    // 保证执行顺序。让callback总是在下一个 tick 中执行。\n                    return promise[ key ](function() {\n                                var deferred = Base.Deferred(),\n                                    args = arguments;\n    \n                                if ( args.length === 1 ) {\n                                    args = args[ 0 ];\n                                }\n    \n                                setTimeout(function() {\n                                    deferred.resolve( args );\n                                }, 1 );\n    \n                                return deferred.promise();\n                            })[ callback ? key : 'done' ]( callback || Base.noop );\n                } else {\n                    return rlts[ 0 ];\n                }\n            },\n    \n            destroy: function() {\n                _destroy.apply( this, arguments );\n                this._widgets = null;\n            }\n        });\n    \n        /**\n         * 添加组件\n         * @grammar Uploader.register(proto);\n         * @grammar Uploader.register(map, proto);\n         * @param  {object} responseMap API 名称与函数实现的映射\n         * @param  {object} proto 组件原型，构造函数通过 constructor 属性定义\n         * @method Uploader.register\n         * @for Uploader\n         * @example\n         * Uploader.register({\n         *     'make-thumb': 'makeThumb'\n         * }, {\n         *     init: function( options ) {},\n         *     makeThumb: function() {}\n         * });\n         *\n         * Uploader.register({\n         *     'make-thumb': function() {\n         *         \n         *     }\n         * });\n         */\n        Uploader.register = Widget.register = function( responseMap, widgetProto ) {\n            var map = { init: 'init', destroy: 'destroy', name: 'anonymous' },\n                klass;\n    \n            if ( arguments.length === 1 ) {\n                widgetProto = responseMap;\n    \n                // 自动生成 map 表。\n                $.each(widgetProto, function(key) {\n                    if ( key[0] === '_' || key === 'name' ) {\n                        key === 'name' && (map.name = widgetProto.name);\n                        return;\n                    }\n    \n                    map[key.replace(/[A-Z]/g, '-$&').toLowerCase()] = key;\n                });\n    \n            } else {\n                map = $.extend( map, responseMap );\n            }\n    \n            widgetProto.responseMap = map;\n            klass = Base.inherits( Widget, widgetProto );\n            klass._name = map.name;\n            widgetClass.push( klass );\n    \n            return klass;\n        };\n    \n        /**\n         * 删除插件，只有在注册时指定了名字的才能被删除。\n         * @grammar Uploader.unRegister(name);\n         * @param  {string} name 组件名字\n         * @method Uploader.unRegister\n         * @for Uploader\n         * @example\n         *\n         * Uploader.register({\n         *     name: 'custom',\n         *     \n         *     'make-thumb': function() {\n         *         \n         *     }\n         * });\n         *\n         * Uploader.unRegister('custom');\n         */\n        Uploader.unRegister = Widget.unRegister = function( name ) {\n            if ( !name || name === 'anonymous' ) {\n                return;\n            }\n            \n            // 删除指定的插件。\n            for ( var i = widgetClass.length; i--; ) {\n                if ( widgetClass[i]._name === name ) {\n                    widgetClass.splice(i, 1)\n                }\n            }\n        };\n    \n        return Widget;\n    });\n    /**\n     * @fileOverview DragAndDrop Widget。\n     */\n    define('widgets/filednd',[\n        'base',\n        'uploader',\n        'lib/dnd',\n        'widgets/widget'\n    ], function( Base, Uploader, Dnd ) {\n        var $ = Base.$;\n    \n        Uploader.options.dnd = '';\n    \n        /**\n         * @property {Selector} [dnd=undefined]  指定Drag And Drop拖拽的容器，如果不指定，则不启动。\n         * @namespace options\n         * @for Uploader\n         */\n        \n        /**\n         * @property {Selector} [disableGlobalDnd=false]  是否禁掉整个页面的拖拽功能，如果不禁用，图片拖进来的时候会默认被浏览器打开。\n         * @namespace options\n         * @for Uploader\n         */\n    \n        /**\n         * @event dndAccept\n         * @param {DataTransferItemList} items DataTransferItem\n         * @description 阻止此事件可以拒绝某些类型的文件拖入进来。目前只有 chrome 提供这样的 API，且只能通过 mime-type 验证。\n         * @for  Uploader\n         */\n        return Uploader.register({\n            name: 'dnd',\n            \n            init: function( opts ) {\n    \n                if ( !opts.dnd ||\n                        this.request('predict-runtime-type') !== 'html5' ) {\n                    return;\n                }\n    \n                var me = this,\n                    deferred = Base.Deferred(),\n                    options = $.extend({}, {\n                        disableGlobalDnd: opts.disableGlobalDnd,\n                        container: opts.dnd,\n                        accept: opts.accept\n                    }),\n                    dnd;\n    \n                this.dnd = dnd = new Dnd( options );\n    \n                dnd.once( 'ready', deferred.resolve );\n                dnd.on( 'drop', function( files ) {\n                    me.request( 'add-file', [ files ]);\n                });\n    \n                // 检测文件是否全部允许添加。\n                dnd.on( 'accept', function( items ) {\n                    return me.owner.trigger( 'dndAccept', items );\n                });\n    \n                dnd.init();\n    \n                return deferred.promise();\n            },\n    \n            destroy: function() {\n                this.dnd && this.dnd.destroy();\n            }\n        });\n    });\n    \n    /**\n     * @fileOverview 错误信息\n     */\n    define('lib/filepaste',[\n        'base',\n        'mediator',\n        'runtime/client'\n    ], function( Base, Mediator, RuntimeClent ) {\n    \n        var $ = Base.$;\n    \n        function FilePaste( opts ) {\n            opts = this.options = $.extend({}, opts );\n            opts.container = $( opts.container || document.body );\n            RuntimeClent.call( this, 'FilePaste' );\n        }\n    \n        Base.inherits( RuntimeClent, {\n            constructor: FilePaste,\n    \n            init: function() {\n                var me = this;\n    \n                me.connectRuntime( me.options, function() {\n                    me.exec('init');\n                    me.trigger('ready');\n                });\n            }\n        });\n    \n        Mediator.installTo( FilePaste.prototype );\n    \n        return FilePaste;\n    });\n    /**\n     * @fileOverview 组件基类。\n     */\n    define('widgets/filepaste',[\n        'base',\n        'uploader',\n        'lib/filepaste',\n        'widgets/widget'\n    ], function( Base, Uploader, FilePaste ) {\n        var $ = Base.$;\n    \n        /**\n         * @property {Selector} [paste=undefined]  指定监听paste事件的容器，如果不指定，不启用此功能。此功能为通过粘贴来添加截屏的图片。建议设置为`document.body`.\n         * @namespace options\n         * @for Uploader\n         */\n        return Uploader.register({\n            name: 'paste',\n            \n            init: function( opts ) {\n    \n                if ( !opts.paste ||\n                        this.request('predict-runtime-type') !== 'html5' ) {\n                    return;\n                }\n    \n                var me = this,\n                    deferred = Base.Deferred(),\n                    options = $.extend({}, {\n                        container: opts.paste,\n                        accept: opts.accept\n                    }),\n                    paste;\n    \n                this.paste = paste = new FilePaste( options );\n    \n                paste.once( 'ready', deferred.resolve );\n                paste.on( 'paste', function( files ) {\n                    me.owner.request( 'add-file', [ files ]);\n                });\n                paste.init();\n    \n                return deferred.promise();\n            },\n    \n            destroy: function() {\n                this.paste && this.paste.destroy();\n            }\n        });\n    });\n    /**\n     * @fileOverview Blob\n     */\n    define('lib/blob',[\n        'base',\n        'runtime/client'\n    ], function( Base, RuntimeClient ) {\n    \n        function Blob( ruid, source ) {\n            var me = this;\n    \n            me.source = source;\n            me.ruid = ruid;\n            this.size = source.size || 0;\n    \n            // 如果没有指定 mimetype, 但是知道文件后缀。\n            if ( !source.type && this.ext &&\n                    ~'jpg,jpeg,png,gif,bmp'.indexOf( this.ext ) ) {\n                this.type = 'image/' + (this.ext === 'jpg' ? 'jpeg' : this.ext);\n            } else {\n                this.type = source.type || 'application/octet-stream';\n            }\n    \n            RuntimeClient.call( me, 'Blob' );\n            this.uid = source.uid || this.uid;\n    \n            if ( ruid ) {\n                me.connectRuntime( ruid );\n            }\n        }\n    \n        Base.inherits( RuntimeClient, {\n            constructor: Blob,\n    \n            slice: function( start, end ) {\n                return this.exec( 'slice', start, end );\n            },\n    \n            getSource: function() {\n                return this.source;\n            }\n        });\n    \n        return Blob;\n    });\n    /**\n     * 为了统一化Flash的File和HTML5的File而存在。\n     * 以至于要调用Flash里面的File，也可以像调用HTML5版本的File一下。\n     * @fileOverview File\n     */\n    define('lib/file',[\n        'base',\n        'lib/blob'\n    ], function( Base, Blob ) {\n    \n        var uid = 1,\n            rExt = /\\.([^.]+)$/;\n    \n        function File( ruid, file ) {\n            var ext;\n    \n            this.name = file.name || ('untitled' + uid++);\n            ext = rExt.exec( file.name ) ? RegExp.$1.toLowerCase() : '';\n    \n            // todo 支持其他类型文件的转换。\n            // 如果有 mimetype, 但是文件名里面没有找出后缀规律\n            if ( !ext && file.type ) {\n                ext = /\\/(jpg|jpeg|png|gif|bmp)$/i.exec( file.type ) ?\n                        RegExp.$1.toLowerCase() : '';\n                this.name += '.' + ext;\n            }\n    \n            this.ext = ext;\n            this.lastModifiedDate = file.lastModifiedDate ||\n                    (new Date()).toLocaleString();\n    \n            Blob.apply( this, arguments );\n        }\n    \n        return Base.inherits( Blob, File );\n    });\n    \n    /**\n     * @fileOverview 错误信息\n     */\n    define('lib/filepicker',[\n        'base',\n        'runtime/client',\n        'lib/file'\n    ], function( Base, RuntimeClient, File ) {\n    \n        var $ = Base.$;\n    \n        function FilePicker( opts ) {\n            opts = this.options = $.extend({}, FilePicker.options, opts );\n    \n            opts.container = $( opts.id );\n    \n            if ( !opts.container.length ) {\n                throw new Error('按钮指定错误');\n            }\n    \n            opts.innerHTML = opts.innerHTML || opts.label ||\n                    opts.container.html() || '';\n    \n            opts.button = $( opts.button || document.createElement('div') );\n            opts.button.html( opts.innerHTML );\n            opts.container.html( opts.button );\n    \n            RuntimeClient.call( this, 'FilePicker', true );\n        }\n    \n        FilePicker.options = {\n            button: null,\n            container: null,\n            label: null,\n            innerHTML: null,\n            multiple: true,\n            accept: null,\n            name: 'file',\n            style: 'webuploader-pick'   //pick element class attribute, default is \"webuploader-pick\"\n        };\n    \n        Base.inherits( RuntimeClient, {\n            constructor: FilePicker,\n    \n            init: function() {\n                var me = this,\n                    opts = me.options,\n                    button = opts.button,\n                    style = opts.style;\n    \n                if (style)\n                    button.addClass('webuploader-pick');\n    \n                me.on( 'all', function( type ) {\n                    var files;\n    \n                    switch ( type ) {\n                        case 'mouseenter':\n                            if (style)\n                                button.addClass('webuploader-pick-hover');\n                            break;\n    \n                        case 'mouseleave':\n                            if (style)\n                                button.removeClass('webuploader-pick-hover');\n                            break;\n    \n                        case 'change':\n                            files = me.exec('getFiles');\n                            me.trigger( 'select', $.map( files, function( file ) {\n                                file = new File( me.getRuid(), file );\n    \n                                // 记录来源。\n                                file._refer = opts.container;\n                                return file;\n                            }), opts.container );\n                            break;\n                    }\n                });\n    \n                me.connectRuntime( opts, function() {\n                    me.refresh();\n                    me.exec( 'init', opts );\n                    me.trigger('ready');\n                });\n    \n                this._resizeHandler = Base.bindFn( this.refresh, this );\n                $( window ).on( 'resize', this._resizeHandler );\n            },\n    \n            refresh: function() {\n                var shimContainer = this.getRuntime().getContainer(),\n                    button = this.options.button,\n                    width = button.outerWidth ?\n                            button.outerWidth() : button.width(),\n    \n                    height = button.outerHeight ?\n                            button.outerHeight() : button.height(),\n    \n                    pos = button.offset();\n    \n                width && height && shimContainer.css({\n                    bottom: 'auto',\n                    right: 'auto',\n                    width: width + 'px',\n                    height: height + 'px'\n                }).offset( pos );\n            },\n    \n            enable: function() {\n                var btn = this.options.button;\n    \n                btn.removeClass('webuploader-pick-disable');\n                this.refresh();\n            },\n    \n            disable: function() {\n                var btn = this.options.button;\n    \n                this.getRuntime().getContainer().css({\n                    top: '-99999px'\n                });\n    \n                btn.addClass('webuploader-pick-disable');\n            },\n    \n            destroy: function() {\n                var btn = this.options.button;\n                $( window ).off( 'resize', this._resizeHandler );\n                btn.removeClass('webuploader-pick-disable webuploader-pick-hover ' +\n                    'webuploader-pick');\n            }\n        });\n    \n        return FilePicker;\n    });\n    \n    /**\n     * @fileOverview 文件选择相关\n     */\n    define('widgets/filepicker',[\n        'base',\n        'uploader',\n        'lib/filepicker',\n        'widgets/widget'\n    ], function( Base, Uploader, FilePicker ) {\n        var $ = Base.$;\n    \n        $.extend( Uploader.options, {\n    \n            /**\n             * @property {Selector | Object} [pick=undefined]\n             * @namespace options\n             * @for Uploader\n             * @description 指定选择文件的按钮容器，不指定则不创建按钮。\n             *\n             * * `id` {Seletor|dom} 指定选择文件的按钮容器，不指定则不创建按钮。**注意** 这里虽然写的是 id, 但是不是只支持 id, 还支持 class, 或者 dom 节点。\n             * * `label` {String} 请采用 `innerHTML` 代替\n             * * `innerHTML` {String} 指定按钮文字。不指定时优先从指定的容器中看是否自带文字。\n             * * `multiple` {Boolean} 是否开起同时选择多个文件能力。\n             */\n            pick: null,\n    \n            /**\n             * @property {Arroy} [accept=null]\n             * @namespace options\n             * @for Uploader\n             * @description 指定接受哪些类型的文件。 由于目前还有ext转mimeType表，所以这里需要分开指定。\n             *\n             * * `title` {String} 文字描述\n             * * `extensions` {String} 允许的文件后缀，不带点，多个用逗号分割。\n             * * `mimeTypes` {String} 多个用逗号分割。\n             *\n             * 如：\n             *\n             * ```\n             * {\n             *     title: 'Images',\n             *     extensions: 'gif,jpg,jpeg,bmp,png',\n             *     mimeTypes: 'image/*'\n             * }\n             * ```\n             */\n            accept: null/*{\n                title: 'Images',\n                extensions: 'gif,jpg,jpeg,bmp,png',\n                mimeTypes: 'image/*'\n            }*/\n        });\n    \n        return Uploader.register({\n            name: 'picker',\n    \n            init: function( opts ) {\n                this.pickers = [];\n                return opts.pick && this.addBtn( opts.pick );\n            },\n    \n            refresh: function() {\n                $.each( this.pickers, function() {\n                    this.refresh();\n                });\n            },\n    \n            /**\n             * @method addBtn\n             * @for Uploader\n             * @grammar addBtn( pick ) => Promise\n             * @description\n             * 添加文件选择按钮，如果一个按钮不够，需要调用此方法来添加。参数跟[options.pick](#WebUploader:Uploader:options)一致。\n             * @example\n             * uploader.addBtn({\n             *     id: '#btnContainer',\n             *     innerHTML: '选择文件'\n             * });\n             */\n            addBtn: function( pick ) {\n                var me = this,\n                    opts = me.options,\n                    accept = opts.accept,\n                    promises = [];\n    \n                if ( !pick ) {\n                    return;\n                }\n    \n                $.isPlainObject( pick ) || (pick = {\n                    id: pick\n                });\n    \n                $( pick.id ).each(function() {\n                    var options, picker, deferred;\n    \n                    deferred = Base.Deferred();\n    \n                    options = $.extend({}, pick, {\n                        accept: $.isPlainObject( accept ) ? [ accept ] : accept,\n                        swf: opts.swf,\n                        runtimeOrder: opts.runtimeOrder,\n                        id: this\n                    });\n    \n                    picker = new FilePicker( options );\n    \n                    picker.once( 'ready', deferred.resolve );\n                    picker.on( 'select', function( files ) {\n                        me.owner.request( 'add-file', [ files ]);\n                    });\n                    picker.on('dialogopen', function() {\n                        me.owner.trigger('dialogOpen', picker.button);\n                    });\n                    picker.init();\n    \n                    me.pickers.push( picker );\n    \n                    promises.push( deferred.promise() );\n                });\n    \n                return Base.when.apply( Base, promises );\n            },\n    \n            disable: function() {\n                $.each( this.pickers, function() {\n                    this.disable();\n                });\n            },\n    \n            enable: function() {\n                $.each( this.pickers, function() {\n                    this.enable();\n                });\n            },\n    \n            destroy: function() {\n                $.each( this.pickers, function() {\n                    this.destroy();\n                });\n                this.pickers = null;\n            }\n        });\n    });\n    /**\n     * @fileOverview Image\n     */\n    define('lib/image',[\n        'base',\n        'runtime/client',\n        'lib/blob'\n    ], function( Base, RuntimeClient, Blob ) {\n        var $ = Base.$;\n    \n        // 构造器。\n        function Image( opts ) {\n            this.options = $.extend({}, Image.options, opts );\n            RuntimeClient.call( this, 'Image' );\n    \n            this.on( 'load', function() {\n                this._info = this.exec('info');\n                this._meta = this.exec('meta');\n            });\n        }\n    \n        // 默认选项。\n        Image.options = {\n    \n            // 默认的图片处理质量\n            quality: 90,\n    \n            // 是否裁剪\n            crop: false,\n    \n            // 是否保留头部信息\n            preserveHeaders: false,\n    \n            // 是否允许放大。\n            allowMagnify: false\n        };\n    \n        // 继承RuntimeClient.\n        Base.inherits( RuntimeClient, {\n            constructor: Image,\n    \n            info: function( val ) {\n    \n                // setter\n                if ( val ) {\n                    this._info = val;\n                    return this;\n                }\n    \n                // getter\n                return this._info;\n            },\n    \n            meta: function( val ) {\n    \n                // setter\n                if ( val ) {\n                    this._meta = val;\n                    return this;\n                }\n    \n                // getter\n                return this._meta;\n            },\n    \n            loadFromBlob: function( blob ) {\n                var me = this,\n                    ruid = blob.getRuid();\n    \n                this.connectRuntime( ruid, function() {\n                    me.exec( 'init', me.options );\n                    me.exec( 'loadFromBlob', blob );\n                });\n            },\n    \n            resize: function() {\n                var args = Base.slice( arguments );\n                return this.exec.apply( this, [ 'resize' ].concat( args ) );\n            },\n    \n            crop: function() {\n                var args = Base.slice( arguments );\n                return this.exec.apply( this, [ 'crop' ].concat( args ) );\n            },\n    \n            getAsDataUrl: function( type ) {\n                return this.exec( 'getAsDataUrl', type );\n            },\n    \n            getAsBlob: function( type ) {\n                var blob = this.exec( 'getAsBlob', type );\n    \n                return new Blob( this.getRuid(), blob );\n            }\n        });\n    \n        return Image;\n    });\n    /**\n     * @fileOverview 图片操作, 负责预览图片和上传前压缩图片\n     */\n    define('widgets/image',[\n        'base',\n        'uploader',\n        'lib/image',\n        'widgets/widget'\n    ], function( Base, Uploader, Image ) {\n    \n        var $ = Base.$,\n            throttle;\n    \n        // 根据要处理的文件大小来节流，一次不能处理太多，会卡。\n        throttle = (function( max ) {\n            var occupied = 0,\n                waiting = [],\n                tick = function() {\n                    var item;\n    \n                    while ( waiting.length && occupied < max ) {\n                        item = waiting.shift();\n                        occupied += item[ 0 ];\n                        item[ 1 ]();\n                    }\n                };\n    \n            return function( emiter, size, cb ) {\n                waiting.push([ size, cb ]);\n                emiter.once( 'destroy', function() {\n                    occupied -= size;\n                    setTimeout( tick, 1 );\n                });\n                setTimeout( tick, 1 );\n            };\n        })( 5 * 1024 * 1024 );\n    \n        $.extend( Uploader.options, {\n    \n            /**\n             * @property {Object} [thumb]\n             * @namespace options\n             * @for Uploader\n             * @description 配置生成缩略图的选项。\n             *\n             * 默认为：\n             *\n             * ```javascript\n             * {\n             *     width: 110,\n             *     height: 110,\n             *\n             *     // 图片质量，只有type为`image/jpeg`的时候才有效。\n             *     quality: 70,\n             *\n             *     // 是否允许放大，如果想要生成小图的时候不失真，此选项应该设置为false.\n             *     allowMagnify: true,\n             *\n             *     // 是否允许裁剪。\n             *     crop: true,\n             *\n             *     // 为空的话则保留原有图片格式。\n             *     // 否则强制转换成指定的类型。\n             *     type: 'image/jpeg'\n             * }\n             * ```\n             */\n            thumb: {\n                width: 110,\n                height: 110,\n                quality: 70,\n                allowMagnify: true,\n                crop: true,\n                preserveHeaders: false,\n    \n                // 为空的话则保留原有图片格式。\n                // 否则强制转换成指定的类型。\n                // IE 8下面 base64 大小不能超过 32K 否则预览失败，而非 jpeg 编码的图片很可\n                // 能会超过 32k, 所以这里设置成预览的时候都是 image/jpeg\n                type: 'image/jpeg'\n            },\n    \n            /**\n             * @property {Object} [compress]\n             * @namespace options\n             * @for Uploader\n             * @description 配置压缩的图片的选项。如果此选项为`false`, 则图片在上传前不进行压缩。\n             *\n             * 默认为：\n             *\n             * ```javascript\n             * {\n             *     width: 1600,\n             *     height: 1600,\n             *\n             *     // 图片质量，只有type为`image/jpeg`的时候才有效。\n             *     quality: 90,\n             *\n             *     // 是否允许放大，如果想要生成小图的时候不失真，此选项应该设置为false.\n             *     allowMagnify: false,\n             *\n             *     // 是否允许裁剪。\n             *     crop: false,\n             *\n             *     // 是否保留头部meta信息。\n             *     preserveHeaders: true,\n             *\n             *     // 如果发现压缩后文件大小比原来还大，则使用原来图片\n             *     // 此属性可能会影响图片自动纠正功能\n             *     noCompressIfLarger: false,\n             *\n             *     // 单位字节，如果图片大小小于此值，不会采用压缩。\n             *     compressSize: 0\n             * }\n             * ```\n             */\n            compress: {\n                width: 1600,\n                height: 1600,\n                quality: 90,\n                allowMagnify: false,\n                crop: false,\n                preserveHeaders: true\n            }\n        });\n    \n        return Uploader.register({\n    \n            name: 'image',\n    \n    \n            /**\n             * 生成缩略图，此过程为异步，所以需要传入`callback`。\n             * 通常情况在图片加入队里后调用此方法来生成预览图以增强交互效果。\n             *\n             * 当 width 或者 height 的值介于 0 - 1 时，被当成百分比使用。\n             *\n             * `callback`中可以接收到两个参数。\n             * * 第一个为error，如果生成缩略图有错误，此error将为真。\n             * * 第二个为ret, 缩略图的Data URL值。\n             *\n             * **注意**\n             * Date URL在IE6/7中不支持，所以不用调用此方法了，直接显示一张暂不支持预览图片好了。\n             * 也可以借助服务端，将 base64 数据传给服务端，生成一个临时文件供预览。\n             *\n             * @method makeThumb\n             * @grammar makeThumb( file, callback ) => undefined\n             * @grammar makeThumb( file, callback, width, height ) => undefined\n             * @for Uploader\n             * @example\n             *\n             * uploader.on( 'fileQueued', function( file ) {\n             *     var $li = ...;\n             *\n             *     uploader.makeThumb( file, function( error, ret ) {\n             *         if ( error ) {\n             *             $li.text('预览错误');\n             *         } else {\n             *             $li.append('<img alt=\"\" src=\"' + ret + '\" />');\n             *         }\n             *     });\n             *\n             * });\n             */\n            makeThumb: function( file, cb, width, height ) {\n                var opts, image;\n    \n                file = this.request( 'get-file', file );\n    \n                // 只预览图片格式。\n                if ( !file.type.match( /^image/ ) ) {\n                    cb( true );\n                    return;\n                }\n    \n                opts = $.extend({}, this.options.thumb );\n    \n                // 如果传入的是object.\n                if ( $.isPlainObject( width ) ) {\n                    opts = $.extend( opts, width );\n                    width = null;\n                }\n    \n                width = width || opts.width;\n                height = height || opts.height;\n    \n                image = new Image( opts );\n    \n                image.once( 'load', function() {\n                    file._info = file._info || image.info();\n                    file._meta = file._meta || image.meta();\n    \n                    // 如果 width 的值介于 0 - 1\n                    // 说明设置的是百分比。\n                    if ( width <= 1 && width > 0 ) {\n                        width = file._info.width * width;\n                    }\n    \n                    // 同样的规则应用于 height\n                    if ( height <= 1 && height > 0 ) {\n                        height = file._info.height * height;\n                    }\n    \n                    image.resize( width, height );\n                });\n    \n                // 当 resize 完后\n                image.once( 'complete', function() {\n                    cb( false, image.getAsDataUrl( opts.type ) );\n                    image.destroy();\n                });\n    \n                image.once( 'error', function( reason ) {\n                    cb( reason || true );\n                    image.destroy();\n                });\n    \n                throttle( image, file.source.size, function() {\n                    file._info && image.info( file._info );\n                    file._meta && image.meta( file._meta );\n                    image.loadFromBlob( file.source );\n                });\n            },\n    \n            beforeSendFile: function( file ) {\n                var opts = this.options.compress || this.options.resize,\n                    compressSize = opts && opts.compressSize || 0,\n                    noCompressIfLarger = opts && opts.noCompressIfLarger || false,\n                    image, deferred;\n    \n                file = this.request( 'get-file', file );\n    \n                // 只压缩 jpeg 图片格式。\n                // gif 可能会丢失针\n                // bmp png 基本上尺寸都不大，且压缩比比较小。\n                if ( !opts || !~'image/jpeg,image/jpg'.indexOf( file.type ) ||\n                        file.size < compressSize ||\n                        file._compressed ) {\n                    return;\n                }\n    \n                opts = $.extend({}, opts );\n                deferred = Base.Deferred();\n    \n                image = new Image( opts );\n    \n                deferred.always(function() {\n                    image.destroy();\n                    image = null;\n                });\n                image.once( 'error', deferred.reject );\n                image.once( 'load', function() {\n                    var width = opts.width,\n                        height = opts.height;\n    \n                    file._info = file._info || image.info();\n                    file._meta = file._meta || image.meta();\n    \n                    // 如果 width 的值介于 0 - 1\n                    // 说明设置的是百分比。\n                    if ( width <= 1 && width > 0 ) {\n                        width = file._info.width * width;\n                    }\n    \n                    // 同样的规则应用于 height\n                    if ( height <= 1 && height > 0 ) {\n                        height = file._info.height * height;\n                    }\n    \n                    image.resize( width, height );\n                });\n    \n                image.once( 'complete', function() {\n                    var blob, size;\n    \n                    // 移动端 UC / qq 浏览器的无图模式下\n                    // ctx.getImageData 处理大图的时候会报 Exception\n                    // INDEX_SIZE_ERR: DOM Exception 1\n                    try {\n                        blob = image.getAsBlob( opts.type );\n    \n                        size = file.size;\n    \n                        // 如果压缩后，比原来还大则不用压缩后的。\n                        if ( !noCompressIfLarger || blob.size < size ) {\n                            // file.source.destroy && file.source.destroy();\n                            file.source = blob;\n                            file.size = blob.size;\n    \n                            file.trigger( 'resize', blob.size, size );\n                        }\n    \n                        // 标记，避免重复压缩。\n                        file._compressed = true;\n                        deferred.resolve();\n                    } catch ( e ) {\n                        // 出错了直接继续，让其上传原始图片\n                        deferred.resolve();\n                    }\n                });\n    \n                file._info && image.info( file._info );\n                file._meta && image.meta( file._meta );\n    \n                image.loadFromBlob( file.source );\n                return deferred.promise();\n            }\n        });\n    });\n    /**\n     * @fileOverview 文件属性封装\n     */\n    define('file',[\n        'base',\n        'mediator'\n    ], function( Base, Mediator ) {\n    \n        var $ = Base.$,\n            idPrefix = 'WU_FILE_',\n            idSuffix = 0,\n            rExt = /\\.([^.]+)$/,\n            statusMap = {};\n    \n        function gid() {\n            return idPrefix + idSuffix++;\n        }\n    \n        /**\n         * 文件类\n         * @class File\n         * @constructor 构造函数\n         * @grammar new File( source ) => File\n         * @param {Lib.File} source [lib.File](#Lib.File)实例, 此source对象是带有Runtime信息的。\n         */\n        function WUFile( source ) {\n    \n            /**\n             * 文件名，包括扩展名（后缀）\n             * @property name\n             * @type {string}\n             */\n            this.name = source.name || 'Untitled';\n    \n            /**\n             * 文件体积（字节）\n             * @property size\n             * @type {uint}\n             * @default 0\n             */\n            this.size = source.size || 0;\n    \n            /**\n             * 文件MIMETYPE类型，与文件类型的对应关系请参考[http://t.cn/z8ZnFny](http://t.cn/z8ZnFny)\n             * @property type\n             * @type {string}\n             * @default 'application/octet-stream'\n             */\n            this.type = source.type || 'application/octet-stream';\n    \n            /**\n             * 文件最后修改日期\n             * @property lastModifiedDate\n             * @type {int}\n             * @default 当前时间戳\n             */\n            this.lastModifiedDate = source.lastModifiedDate || (new Date() * 1);\n    \n            /**\n             * 文件ID，每个对象具有唯一ID，与文件名无关\n             * @property id\n             * @type {string}\n             */\n            this.id = gid();\n    \n            /**\n             * 文件扩展名，通过文件名获取，例如test.png的扩展名为png\n             * @property ext\n             * @type {string}\n             */\n            this.ext = rExt.exec( this.name ) ? RegExp.$1 : '';\n    \n    \n            /**\n             * 状态文字说明。在不同的status语境下有不同的用途。\n             * @property statusText\n             * @type {string}\n             */\n            this.statusText = '';\n    \n            // 存储文件状态，防止通过属性直接修改\n            statusMap[ this.id ] = WUFile.Status.INITED;\n    \n            this.source = source;\n            this.loaded = 0;\n    \n            this.on( 'error', function( msg ) {\n                this.setStatus( WUFile.Status.ERROR, msg );\n            });\n        }\n    \n        $.extend( WUFile.prototype, {\n    \n            /**\n             * 设置状态，状态变化时会触发`change`事件。\n             * @method setStatus\n             * @grammar setStatus( status[, statusText] );\n             * @param {File.Status|String} status [文件状态值](#WebUploader:File:File.Status)\n             * @param {String} [statusText=''] 状态说明，常在error时使用，用http, abort,server等来标记是由于什么原因导致文件错误。\n             */\n            setStatus: function( status, text ) {\n    \n                var prevStatus = statusMap[ this.id ];\n    \n                typeof text !== 'undefined' && (this.statusText = text);\n    \n                if ( status !== prevStatus ) {\n                    statusMap[ this.id ] = status;\n                    /**\n                     * 文件状态变化\n                     * @event statuschange\n                     */\n                    this.trigger( 'statuschange', status, prevStatus );\n                }\n    \n            },\n    \n            /**\n             * 获取文件状态\n             * @return {File.Status}\n             * @example\n                     文件状态具体包括以下几种类型：\n                     {\n                         // 初始化\n                        INITED:     0,\n                        // 已入队列\n                        QUEUED:     1,\n                        // 正在上传\n                        PROGRESS:     2,\n                        // 上传出错\n                        ERROR:         3,\n                        // 上传成功\n                        COMPLETE:     4,\n                        // 上传取消\n                        CANCELLED:     5\n                    }\n             */\n            getStatus: function() {\n                return statusMap[ this.id ];\n            },\n    \n            /**\n             * 获取文件原始信息。\n             * @return {*}\n             */\n            getSource: function() {\n                return this.source;\n            },\n    \n            destroy: function() {\n                this.off();\n                delete statusMap[ this.id ];\n            }\n        });\n    \n        Mediator.installTo( WUFile.prototype );\n    \n        /**\n         * 文件状态值，具体包括以下几种类型：\n         * * `inited` 初始状态\n         * * `queued` 已经进入队列, 等待上传\n         * * `progress` 上传中\n         * * `complete` 上传完成。\n         * * `error` 上传出错，可重试\n         * * `interrupt` 上传中断，可续传。\n         * * `invalid` 文件不合格，不能重试上传。会自动从队列中移除。\n         * * `cancelled` 文件被移除。\n         * @property {Object} Status\n         * @namespace File\n         * @class File\n         * @static\n         */\n        WUFile.Status = {\n            INITED:     'inited',    // 初始状态\n            QUEUED:     'queued',    // 已经进入队列, 等待上传\n            PROGRESS:   'progress',    // 上传中\n            ERROR:      'error',    // 上传出错，可重试\n            COMPLETE:   'complete',    // 上传完成。\n            CANCELLED:  'cancelled',    // 上传取消。\n            INTERRUPT:  'interrupt',    // 上传中断，可续传。\n            INVALID:    'invalid'    // 文件不合格，不能重试上传。\n        };\n    \n        return WUFile;\n    });\n    \n    /**\n     * @fileOverview 文件队列\n     */\n    define('queue',[\n        'base',\n        'mediator',\n        'file'\n    ], function( Base, Mediator, WUFile ) {\n    \n        var $ = Base.$,\n            STATUS = WUFile.Status;\n    \n        /**\n         * 文件队列, 用来存储各个状态中的文件。\n         * @class Queue\n         * @extends Mediator\n         */\n        function Queue() {\n    \n            /**\n             * 统计文件数。\n             * * `numOfQueue` 队列中的文件数。\n             * * `numOfSuccess` 上传成功的文件数\n             * * `numOfCancel` 被取消的文件数\n             * * `numOfProgress` 正在上传中的文件数\n             * * `numOfUploadFailed` 上传错误的文件数。\n             * * `numOfInvalid` 无效的文件数。\n             * * `numofDeleted` 被移除的文件数。\n             * @property {Object} stats\n             */\n            this.stats = {\n                numOfQueue: 0,\n                numOfSuccess: 0,\n                numOfCancel: 0,\n                numOfProgress: 0,\n                numOfUploadFailed: 0,\n                numOfInvalid: 0,\n                numofDeleted: 0,\n                numofInterrupt: 0\n            };\n    \n            // 上传队列，仅包括等待上传的文件\n            this._queue = [];\n    \n            // 存储所有文件\n            this._map = {};\n        }\n    \n        $.extend( Queue.prototype, {\n    \n            /**\n             * 将新文件加入对队列尾部\n             *\n             * @method append\n             * @param  {File} file   文件对象\n             */\n            append: function( file ) {\n                this._queue.push( file );\n                this._fileAdded( file );\n                return this;\n            },\n    \n            /**\n             * 将新文件加入对队列头部\n             *\n             * @method prepend\n             * @param  {File} file   文件对象\n             */\n            prepend: function( file ) {\n                this._queue.unshift( file );\n                this._fileAdded( file );\n                return this;\n            },\n    \n            /**\n             * 获取文件对象\n             *\n             * @method getFile\n             * @param  {String} fileId   文件ID\n             * @return {File}\n             */\n            getFile: function( fileId ) {\n                if ( typeof fileId !== 'string' ) {\n                    return fileId;\n                }\n                return this._map[ fileId ];\n            },\n    \n            /**\n             * 从队列中取出一个指定状态的文件。\n             * @grammar fetch( status ) => File\n             * @method fetch\n             * @param {String} status [文件状态值](#WebUploader:File:File.Status)\n             * @return {File} [File](#WebUploader:File)\n             */\n            fetch: function( status ) {\n                var len = this._queue.length,\n                    i, file;\n    \n                status = status || STATUS.QUEUED;\n    \n                for ( i = 0; i < len; i++ ) {\n                    file = this._queue[ i ];\n    \n                    if ( status === file.getStatus() ) {\n                        return file;\n                    }\n                }\n    \n                return null;\n            },\n    \n            /**\n             * 对队列进行排序，能够控制文件上传顺序。\n             * @grammar sort( fn ) => undefined\n             * @method sort\n             * @param {Function} fn 排序方法\n             */\n            sort: function( fn ) {\n                if ( typeof fn === 'function' ) {\n                    this._queue.sort( fn );\n                }\n            },\n    \n            /**\n             * 获取指定类型的文件列表, 列表中每一个成员为[File](#WebUploader:File)对象。\n             * @grammar getFiles( [status1[, status2 ...]] ) => Array\n             * @method getFiles\n             * @param {String} [status] [文件状态值](#WebUploader:File:File.Status)\n             */\n            getFiles: function() {\n                var sts = [].slice.call( arguments, 0 ),\n                    ret = [],\n                    i = 0,\n                    len = this._queue.length,\n                    file;\n    \n                for ( ; i < len; i++ ) {\n                    file = this._queue[ i ];\n    \n                    if ( sts.length && !~$.inArray( file.getStatus(), sts ) ) {\n                        continue;\n                    }\n    \n                    ret.push( file );\n                }\n    \n                return ret;\n            },\n    \n            /**\n             * 在队列中删除文件。\n             * @grammar removeFile( file ) => Array\n             * @method removeFile\n             * @param {File} 文件对象。\n             */\n            removeFile: function( file ) {\n                var me = this,\n                    existing = this._map[ file.id ];\n    \n                if ( existing ) {\n                    delete this._map[ file.id ];\n                    file.destroy();\n                    this.stats.numofDeleted++;\n                }\n            },\n    \n            _fileAdded: function( file ) {\n                var me = this,\n                    existing = this._map[ file.id ];\n    \n                if ( !existing ) {\n                    this._map[ file.id ] = file;\n    \n                    file.on( 'statuschange', function( cur, pre ) {\n                        me._onFileStatusChange( cur, pre );\n                    });\n                }\n            },\n    \n            _onFileStatusChange: function( curStatus, preStatus ) {\n                var stats = this.stats;\n    \n                switch ( preStatus ) {\n                    case STATUS.PROGRESS:\n                        stats.numOfProgress--;\n                        break;\n    \n                    case STATUS.QUEUED:\n                        stats.numOfQueue --;\n                        break;\n    \n                    case STATUS.ERROR:\n                        stats.numOfUploadFailed--;\n                        break;\n    \n                    case STATUS.INVALID:\n                        stats.numOfInvalid--;\n                        break;\n    \n                    case STATUS.INTERRUPT:\n                        stats.numofInterrupt--;\n                        break;\n                }\n    \n                switch ( curStatus ) {\n                    case STATUS.QUEUED:\n                        stats.numOfQueue++;\n                        break;\n    \n                    case STATUS.PROGRESS:\n                        stats.numOfProgress++;\n                        break;\n    \n                    case STATUS.ERROR:\n                        stats.numOfUploadFailed++;\n                        break;\n    \n                    case STATUS.COMPLETE:\n                        stats.numOfSuccess++;\n                        break;\n    \n                    case STATUS.CANCELLED:\n                        stats.numOfCancel++;\n                        break;\n    \n    \n                    case STATUS.INVALID:\n                        stats.numOfInvalid++;\n                        break;\n    \n                    case STATUS.INTERRUPT:\n                        stats.numofInterrupt++;\n                        break;\n                }\n            }\n    \n        });\n    \n        Mediator.installTo( Queue.prototype );\n    \n        return Queue;\n    });\n    /**\n     * @fileOverview 队列\n     */\n    define('widgets/queue',[\n        'base',\n        'uploader',\n        'queue',\n        'file',\n        'lib/file',\n        'runtime/client',\n        'widgets/widget'\n    ], function( Base, Uploader, Queue, WUFile, File, RuntimeClient ) {\n    \n        var $ = Base.$,\n            rExt = /\\.\\w+$/,\n            Status = WUFile.Status;\n    \n        return Uploader.register({\n            name: 'queue',\n    \n            init: function( opts ) {\n                var me = this,\n                    deferred, len, i, item, arr, accept, runtime;\n    \n                if ( $.isPlainObject( opts.accept ) ) {\n                    opts.accept = [ opts.accept ];\n                }\n    \n                // accept中的中生成匹配正则。\n                if ( opts.accept ) {\n                    arr = [];\n    \n                    for ( i = 0, len = opts.accept.length; i < len; i++ ) {\n                        item = opts.accept[ i ].extensions;\n                        item && arr.push( item );\n                    }\n    \n                    if ( arr.length ) {\n                        accept = '\\\\.' + arr.join(',')\n                                .replace( /,/g, '$|\\\\.' )\n                                .replace( /\\*/g, '.*' ) + '$';\n                    }\n    \n                    me.accept = new RegExp( accept, 'i' );\n                }\n    \n                me.queue = new Queue();\n                me.stats = me.queue.stats;\n    \n                // 如果当前不是html5运行时，那就算了。\n                // 不执行后续操作\n                if ( this.request('predict-runtime-type') !== 'html5' ) {\n                    return;\n                }\n    \n                // 创建一个 html5 运行时的 placeholder\n                // 以至于外部添加原生 File 对象的时候能正确包裹一下供 webuploader 使用。\n                deferred = Base.Deferred();\n                this.placeholder = runtime = new RuntimeClient('Placeholder');\n                runtime.connectRuntime({\n                    runtimeOrder: 'html5'\n                }, function() {\n                    me._ruid = runtime.getRuid();\n                    deferred.resolve();\n                });\n                return deferred.promise();\n            },\n    \n    \n            // 为了支持外部直接添加一个原生File对象。\n            _wrapFile: function( file ) {\n                if ( !(file instanceof WUFile) ) {\n    \n                    if ( !(file instanceof File) ) {\n                        if ( !this._ruid ) {\n                            throw new Error('Can\\'t add external files.');\n                        }\n                        file = new File( this._ruid, file );\n                    }\n    \n                    file = new WUFile( file );\n                }\n    \n                return file;\n            },\n    \n            // 判断文件是否可以被加入队列\n            acceptFile: function( file ) {\n                var invalid = !file || !file.size || this.accept &&\n    \n                        // 如果名字中有后缀，才做后缀白名单处理。\n                        rExt.exec( file.name ) && !this.accept.test( file.name );\n    \n                return !invalid;\n            },\n    \n    \n            /**\n             * @event beforeFileQueued\n             * @param {File} file File对象\n             * @description 当文件被加入队列之前触发，此事件的handler返回值为`false`，则此文件不会被添加进入队列。\n             * @for  Uploader\n             */\n    \n            /**\n             * @event fileQueued\n             * @param {File} file File对象\n             * @description 当文件被加入队列以后触发。\n             * @for  Uploader\n             */\n    \n            _addFile: function( file ) {\n                var me = this;\n    \n                file = me._wrapFile( file );\n    \n                // 不过类型判断允许不允许，先派送 `beforeFileQueued`\n                if ( !me.owner.trigger( 'beforeFileQueued', file ) ) {\n                    return;\n                }\n    \n                // 类型不匹配，则派送错误事件，并返回。\n                if ( !me.acceptFile( file ) ) {\n                    me.owner.trigger( 'error', 'Q_TYPE_DENIED', file );\n                    return;\n                }\n    \n                me.queue.append( file );\n                me.owner.trigger( 'fileQueued', file );\n                return file;\n            },\n    \n            getFile: function( fileId ) {\n                return this.queue.getFile( fileId );\n            },\n    \n            /**\n             * @event filesQueued\n             * @param {File} files 数组，内容为原始File(lib/File）对象。\n             * @description 当一批文件添加进队列以后触发。\n             * @for  Uploader\n             */\n            \n            /**\n             * @property {Boolean} [auto=false]\n             * @namespace options\n             * @for Uploader\n             * @description 设置为 true 后，不需要手动调用上传，有文件选择即开始上传。\n             * \n             */\n    \n            /**\n             * @method addFiles\n             * @grammar addFiles( file ) => undefined\n             * @grammar addFiles( [file1, file2 ...] ) => undefined\n             * @param {Array of File or File} [files] Files 对象 数组\n             * @description 添加文件到队列\n             * @for  Uploader\n             */\n            addFile: function( files ) {\n                var me = this;\n    \n                if ( !files.length ) {\n                    files = [ files ];\n                }\n    \n                files = $.map( files, function( file ) {\n                    return me._addFile( file );\n                });\n    \t\t\t\n    \t\t\tif ( files.length ) {\n    \n                    me.owner.trigger( 'filesQueued', files );\n    \n    \t\t\t\tif ( me.options.auto ) {\n    \t\t\t\t\tsetTimeout(function() {\n    \t\t\t\t\t\tme.request('start-upload');\n    \t\t\t\t\t}, 20 );\n    \t\t\t\t}\n                }\n            },\n    \n            getStats: function() {\n                return this.stats;\n            },\n    \n            /**\n             * @event fileDequeued\n             * @param {File} file File对象\n             * @description 当文件被移除队列后触发。\n             * @for  Uploader\n             */\n    \n             /**\n             * @method removeFile\n             * @grammar removeFile( file ) => undefined\n             * @grammar removeFile( id ) => undefined\n             * @grammar removeFile( file, true ) => undefined\n             * @grammar removeFile( id, true ) => undefined\n             * @param {File|id} file File对象或这File对象的id\n             * @description 移除某一文件, 默认只会标记文件状态为已取消，如果第二个参数为 `true` 则会从 queue 中移除。\n             * @for  Uploader\n             * @example\n             *\n             * $li.on('click', '.remove-this', function() {\n             *     uploader.removeFile( file );\n             * })\n             */\n            removeFile: function( file, remove ) {\n                var me = this;\n    \n                file = file.id ? file : me.queue.getFile( file );\n    \n                this.request( 'cancel-file', file );\n    \n                if ( remove ) {\n                    this.queue.removeFile( file );\n                }\n            },\n    \n            /**\n             * @method getFiles\n             * @grammar getFiles() => Array\n             * @grammar getFiles( status1, status2, status... ) => Array\n             * @description 返回指定状态的文件集合，不传参数将返回所有状态的文件。\n             * @for  Uploader\n             * @example\n             * console.log( uploader.getFiles() );    // => all files\n             * console.log( uploader.getFiles('error') )    // => all error files.\n             */\n            getFiles: function() {\n                return this.queue.getFiles.apply( this.queue, arguments );\n            },\n    \n            fetchFile: function() {\n                return this.queue.fetch.apply( this.queue, arguments );\n            },\n    \n            /**\n             * @method retry\n             * @grammar retry() => undefined\n             * @grammar retry( file ) => undefined\n             * @description 重试上传，重试指定文件，或者从出错的文件开始重新上传。\n             * @for  Uploader\n             * @example\n             * function retry() {\n             *     uploader.retry();\n             * }\n             */\n            retry: function( file, noForceStart ) {\n                var me = this,\n                    files, i, len;\n    \n                if ( file ) {\n                    file = file.id ? file : me.queue.getFile( file );\n                    file.setStatus( Status.QUEUED );\n                    noForceStart || me.request('start-upload');\n                    return;\n                }\n    \n                files = me.queue.getFiles( Status.ERROR );\n                i = 0;\n                len = files.length;\n    \n                for ( ; i < len; i++ ) {\n                    file = files[ i ];\n                    file.setStatus( Status.QUEUED );\n                }\n    \n                me.request('start-upload');\n            },\n    \n            /**\n             * @method sort\n             * @grammar sort( fn ) => undefined\n             * @description 排序队列中的文件，在上传之前调整可以控制上传顺序。\n             * @for  Uploader\n             */\n            sortFiles: function() {\n                return this.queue.sort.apply( this.queue, arguments );\n            },\n    \n            /**\n             * @event reset\n             * @description 当 uploader 被重置的时候触发。\n             * @for  Uploader\n             */\n    \n            /**\n             * @method reset\n             * @grammar reset() => undefined\n             * @description 重置uploader。目前只重置了队列。\n             * @for  Uploader\n             * @example\n             * uploader.reset();\n             */\n            reset: function() {\n                this.owner.trigger('reset');\n                this.queue = new Queue();\n                this.stats = this.queue.stats;\n            },\n    \n            destroy: function() {\n                this.reset();\n                this.placeholder && this.placeholder.destroy();\n            }\n        });\n    \n    });\n    /**\n     * @fileOverview 添加获取Runtime相关信息的方法。\n     */\n    define('widgets/runtime',[\n        'uploader',\n        'runtime/runtime',\n        'widgets/widget'\n    ], function( Uploader, Runtime ) {\n    \n        Uploader.support = function() {\n            return Runtime.hasRuntime.apply( Runtime, arguments );\n        };\n    \n        /**\n         * @property {Object} [runtimeOrder=html5,flash]\n         * @namespace options\n         * @for Uploader\n         * @description 指定运行时启动顺序。默认会想尝试 html5 是否支持，如果支持则使用 html5, 否则则使用 flash.\n         *\n         * 可以将此值设置成 `flash`，来强制使用 flash 运行时。\n         */\n    \n        return Uploader.register({\n            name: 'runtime',\n    \n            init: function() {\n                if ( !this.predictRuntimeType() ) {\n                    throw Error('Runtime Error');\n                }\n            },\n    \n            /**\n             * 预测Uploader将采用哪个`Runtime`\n             * @grammar predictRuntimeType() => String\n             * @method predictRuntimeType\n             * @for  Uploader\n             */\n            predictRuntimeType: function() {\n                var orders = this.options.runtimeOrder || Runtime.orders,\n                    type = this.type,\n                    i, len;\n    \n                if ( !type ) {\n                    orders = orders.split( /\\s*,\\s*/g );\n    \n                    for ( i = 0, len = orders.length; i < len; i++ ) {\n                        if ( Runtime.hasRuntime( orders[ i ] ) ) {\n                            this.type = type = orders[ i ];\n                            break;\n                        }\n                    }\n                }\n    \n                return type;\n            }\n        });\n    });\n    /**\n     * @fileOverview Transport\n     */\n    define('lib/transport',[\n        'base',\n        'runtime/client',\n        'mediator'\n    ], function( Base, RuntimeClient, Mediator ) {\n    \n        var $ = Base.$;\n    \n        function Transport( opts ) {\n            var me = this;\n    \n            opts = me.options = $.extend( true, {}, Transport.options, opts || {} );\n            RuntimeClient.call( this, 'Transport' );\n    \n            this._blob = null;\n            this._formData = opts.formData || {};\n            this._headers = opts.headers || {};\n    \n            this.on( 'progress', this._timeout );\n            this.on( 'load error', function() {\n                me.trigger( 'progress', 1 );\n                clearTimeout( me._timer );\n            });\n        }\n    \n        Transport.options = {\n            server: '',\n            method: 'POST',\n    \n            // 跨域时，是否允许携带cookie, 只有html5 runtime才有效\n            withCredentials: false,\n            fileVal: 'file',\n            timeout: 2 * 60 * 1000,    // 2分钟\n            formData: {},\n            headers: {},\n            sendAsBinary: false\n        };\n    \n        $.extend( Transport.prototype, {\n    \n            // 添加Blob, 只能添加一次，最后一次有效。\n            appendBlob: function( key, blob, filename ) {\n                var me = this,\n                    opts = me.options;\n    \n                if ( me.getRuid() ) {\n                    me.disconnectRuntime();\n                }\n    \n                // 连接到blob归属的同一个runtime.\n                me.connectRuntime( blob.ruid, function() {\n                    me.exec('init');\n                });\n    \n                me._blob = blob;\n                opts.fileVal = key || opts.fileVal;\n                opts.filename = filename || opts.filename;\n            },\n    \n            // 添加其他字段\n            append: function( key, value ) {\n                if ( typeof key === 'object' ) {\n                    $.extend( this._formData, key );\n                } else {\n                    this._formData[ key ] = value;\n                }\n            },\n    \n            setRequestHeader: function( key, value ) {\n                if ( typeof key === 'object' ) {\n                    $.extend( this._headers, key );\n                } else {\n                    this._headers[ key ] = value;\n                }\n            },\n    \n            send: function( method ) {\n                this.exec( 'send', method );\n                this._timeout();\n            },\n    \n            abort: function() {\n                clearTimeout( this._timer );\n                return this.exec('abort');\n            },\n    \n            destroy: function() {\n                this.trigger('destroy');\n                this.off();\n                this.exec('destroy');\n                this.disconnectRuntime();\n            },\n    \n            getResponse: function() {\n                return this.exec('getResponse');\n            },\n    \n            getResponseAsJson: function() {\n                return this.exec('getResponseAsJson');\n            },\n    \n            getStatus: function() {\n                return this.exec('getStatus');\n            },\n    \n            _timeout: function() {\n                var me = this,\n                    duration = me.options.timeout;\n    \n                if ( !duration ) {\n                    return;\n                }\n    \n                clearTimeout( me._timer );\n                me._timer = setTimeout(function() {\n                    me.abort();\n                    me.trigger( 'error', 'timeout' );\n                }, duration );\n            }\n    \n        });\n    \n        // 让Transport具备事件功能。\n        Mediator.installTo( Transport.prototype );\n    \n        return Transport;\n    });\n    /**\n     * @fileOverview 负责文件上传相关。\n     */\n    define('widgets/upload',[\n        'base',\n        'uploader',\n        'file',\n        'lib/transport',\n        'widgets/widget'\n    ], function( Base, Uploader, WUFile, Transport ) {\n    \n        var $ = Base.$,\n            isPromise = Base.isPromise,\n            Status = WUFile.Status;\n    \n        // 添加默认配置项\n        $.extend( Uploader.options, {\n    \n    \n            /**\n             * @property {Boolean} [prepareNextFile=false]\n             * @namespace options\n             * @for Uploader\n             * @description 是否允许在文件传输时提前把下一个文件准备好。\n             * 对于一个文件的准备工作比较耗时，比如图片压缩，md5序列化。\n             * 如果能提前在当前文件传输期处理，可以节省总体耗时。\n             */\n            prepareNextFile: false,\n    \n            /**\n             * @property {Boolean} [chunked=false]\n             * @namespace options\n             * @for Uploader\n             * @description 是否要分片处理大文件上传。\n             */\n            chunked: false,\n    \n            /**\n             * @property {Boolean} [chunkSize=5242880]\n             * @namespace options\n             * @for Uploader\n             * @description 如果要分片，分多大一片？ 默认大小为5M.\n             */\n            chunkSize: 5 * 1024 * 1024,\n    \n            /**\n             * @property {Boolean} [chunkRetry=2]\n             * @namespace options\n             * @for Uploader\n             * @description 如果某个分片由于网络问题出错，允许自动重传多少次？\n             */\n            chunkRetry: 2,\n    \n            /**\n             * @property {Boolean} [threads=3]\n             * @namespace options\n             * @for Uploader\n             * @description 上传并发数。允许同时最大上传进程数。\n             */\n            threads: 3,\n    \n    \n            /**\n             * @property {Object} [formData={}]\n             * @namespace options\n             * @for Uploader\n             * @description 文件上传请求的参数表，每次发送都会发送此对象中的参数。\n             */\n            formData: {}\n    \n            /**\n             * @property {Object} [fileVal='file']\n             * @namespace options\n             * @for Uploader\n             * @description 设置文件上传域的name。\n             */\n    \n            /**\n             * @property {Object} [sendAsBinary=false]\n             * @namespace options\n             * @for Uploader\n             * @description 是否已二进制的流的方式发送文件，这样整个上传内容`php://input`都为文件内容，\n             * 其他参数在$_GET数组中。\n             */\n        });\n    \n        // 负责将文件切片。\n        function CuteFile( file, chunkSize ) {\n            var pending = [],\n                blob = file.source,\n                total = blob.size,\n                chunks = chunkSize ? Math.ceil( total / chunkSize ) : 1,\n                start = 0,\n                index = 0,\n                len, api;\n    \n            api = {\n                file: file,\n    \n                has: function() {\n                    return !!pending.length;\n                },\n    \n                shift: function() {\n                    return pending.shift();\n                },\n    \n                unshift: function( block ) {\n                    pending.unshift( block );\n                }\n            };\n    \n            while ( index < chunks ) {\n                len = Math.min( chunkSize, total - start );\n    \n                pending.push({\n                    file: file,\n                    start: start,\n                    end: chunkSize ? (start + len) : total,\n                    total: total,\n                    chunks: chunks,\n                    chunk: index++,\n                    cuted: api\n                });\n                start += len;\n            }\n    \n            file.blocks = pending.concat();\n            file.remaning = pending.length;\n    \n            return api;\n        }\n    \n        Uploader.register({\n            name: 'upload',\n    \n            init: function() {\n                var owner = this.owner,\n                    me = this;\n    \n                this.runing = false;\n                this.progress = false;\n    \n                owner\n                    .on( 'startUpload', function() {\n                        me.progress = true;\n                    })\n                    .on( 'uploadFinished', function() {\n                        me.progress = false;\n                    });\n    \n                // 记录当前正在传的数据，跟threads相关\n                this.pool = [];\n    \n                // 缓存分好片的文件。\n                this.stack = [];\n    \n                // 缓存即将上传的文件。\n                this.pending = [];\n    \n                // 跟踪还有多少分片在上传中但是没有完成上传。\n                this.remaning = 0;\n                this.__tick = Base.bindFn( this._tick, this );\n    \n                // 销毁上传相关的属性。\n                owner.on( 'uploadComplete', function( file ) {\n    \n                    // 把其他块取消了。\n                    file.blocks && $.each( file.blocks, function( _, v ) {\n                        v.transport && (v.transport.abort(), v.transport.destroy());\n                        delete v.transport;\n                    });\n    \n                    delete file.blocks;\n                    delete file.remaning;\n                });\n            },\n    \n            reset: function() {\n                this.request( 'stop-upload', true );\n                this.runing = false;\n                this.pool = [];\n                this.stack = [];\n                this.pending = [];\n                this.remaning = 0;\n                this._trigged = false;\n                this._promise = null;\n            },\n    \n            /**\n             * @event startUpload\n             * @description 当开始上传流程时触发。\n             * @for  Uploader\n             */\n    \n            /**\n             * 开始上传。此方法可以从初始状态调用开始上传流程，也可以从暂停状态调用，继续上传流程。\n             *\n             * 可以指定开始某一个文件。\n             * @grammar upload() => undefined\n             * @grammar upload( file | fileId) => undefined\n             * @method upload\n             * @for  Uploader\n             */\n            startUpload: function(file) {\n                var me = this;\n    \n                // 移出invalid的文件\n                $.each( me.request( 'get-files', Status.INVALID ), function() {\n                    me.request( 'remove-file', this );\n                });\n    \n                // 如果指定了开始某个文件，则只开始指定的文件。\n                if ( file ) {\n                    file = file.id ? file : me.request( 'get-file', file );\n    \n                    if (file.getStatus() === Status.INTERRUPT) {\n                        file.setStatus( Status.QUEUED );\n    \n                        $.each( me.pool, function( _, v ) {\n    \n                            // 之前暂停过。\n                            if (v.file !== file) {\n                                return;\n                            }\n    \n                            v.transport && v.transport.send();\n                            file.setStatus( Status.PROGRESS );\n                        });\n    \n                        \n                    } else if (file.getStatus() !== Status.PROGRESS) {\n                        file.setStatus( Status.QUEUED );\n                    }\n                } else {\n                    $.each( me.request( 'get-files', [ Status.INITED ] ), function() {\n                        this.setStatus( Status.QUEUED );\n                    });\n                }\n    \n                if ( me.runing ) {\n                    return Base.nextTick( me.__tick );\n                }\n    \n                me.runing = true;\n                var files = [];\n    \n                // 如果有暂停的，则续传\n                file || $.each( me.pool, function( _, v ) {\n                    var file = v.file;\n    \n                    if ( file.getStatus() === Status.INTERRUPT ) {\n                        me._trigged = false;\n                        files.push(file);\n                        v.transport && v.transport.send();\n                    }\n                });\n    \n                $.each(files, function() {\n                    this.setStatus( Status.PROGRESS );\n                });\n    \n                file || $.each( me.request( 'get-files',\n                        Status.INTERRUPT ), function() {\n                    this.setStatus( Status.PROGRESS );\n                });\n    \n                me._trigged = false;\n                Base.nextTick( me.__tick );\n                me.owner.trigger('startUpload');\n            },\n    \n            /**\n             * @event stopUpload\n             * @description 当开始上传流程暂停时触发。\n             * @for  Uploader\n             */\n    \n            /**\n             * 暂停上传。第一个参数为是否中断上传当前正在上传的文件。\n             *\n             * 如果第一个参数是文件，则只暂停指定文件。\n             * @grammar stop() => undefined\n             * @grammar stop( true ) => undefined\n             * @grammar stop( file ) => undefined\n             * @method stop\n             * @for  Uploader\n             */\n            stopUpload: function( file, interrupt ) {\n                var me = this,\n                    block;\n    \n                if (file === true) {\n                    interrupt = file;\n                    file = null;\n                }\n    \n                if ( me.runing === false ) {\n                    return;\n                }\n    \n                // 如果只是暂停某个文件。\n                if ( file ) {\n                    file = file.id ? file : me.request( 'get-file', file );\n    \n                    if ( file.getStatus() !== Status.PROGRESS &&\n                            file.getStatus() !== Status.QUEUED ) {\n                        return;\n                    }\n    \n                    file.setStatus( Status.INTERRUPT );\n    \n    \n                    $.each( me.pool, function( _, v ) {\n    \n                        // 只 abort 指定的文件。\n                        if (v.file === file) {\n                            block = v;\n                            return false;\n                        }\n                    });\n    \n                    block.transport && block.transport.abort();\n    \n                    if (interrupt) {\n                        me._putback(block);\n                        me._popBlock(block);\n                    }\n    \n                    return Base.nextTick( me.__tick );\n                }\n    \n                me.runing = false;\n    \n                // 正在准备中的文件。\n                if (this._promise && this._promise.file) {\n                    this._promise.file.setStatus( Status.INTERRUPT );\n                }\n    \n                interrupt && $.each( me.pool, function( _, v ) {\n                    v.transport && v.transport.abort();\n                    v.file.setStatus( Status.INTERRUPT );\n                });\n    \n                me.owner.trigger('stopUpload');\n            },\n    \n            /**\n             * @method cancelFile\n             * @grammar cancelFile( file ) => undefined\n             * @grammar cancelFile( id ) => undefined\n             * @param {File|id} file File对象或这File对象的id\n             * @description 标记文件状态为已取消, 同时将中断文件传输。\n             * @for  Uploader\n             * @example\n             *\n             * $li.on('click', '.remove-this', function() {\n             *     uploader.cancelFile( file );\n             * })\n             */\n            cancelFile: function( file ) {\n                file = file.id ? file : this.request( 'get-file', file );\n    \n                // 如果正在上传。\n                file.blocks && $.each( file.blocks, function( _, v ) {\n                    var _tr = v.transport;\n    \n                    if ( _tr ) {\n                        _tr.abort();\n                        _tr.destroy();\n                        delete v.transport;\n                    }\n                });\n    \n                file.setStatus( Status.CANCELLED );\n                this.owner.trigger( 'fileDequeued', file );\n            },\n    \n            /**\n             * 判断`Uplaode`r是否正在上传中。\n             * @grammar isInProgress() => Boolean\n             * @method isInProgress\n             * @for  Uploader\n             */\n            isInProgress: function() {\n                return !!this.progress;\n            },\n    \n            _getStats: function() {\n                return this.request('get-stats');\n            },\n    \n            /**\n             * 掉过一个文件上传，直接标记指定文件为已上传状态。\n             * @grammar skipFile( file ) => undefined\n             * @method skipFile\n             * @for  Uploader\n             */\n            skipFile: function( file, status ) {\n                file = file.id ? file : this.request( 'get-file', file );\n    \n                file.setStatus( status || Status.COMPLETE );\n                file.skipped = true;\n    \n                // 如果正在上传。\n                file.blocks && $.each( file.blocks, function( _, v ) {\n                    var _tr = v.transport;\n    \n                    if ( _tr ) {\n                        _tr.abort();\n                        _tr.destroy();\n                        delete v.transport;\n                    }\n                });\n    \n                this.owner.trigger( 'uploadSkip', file );\n            },\n    \n            /**\n             * @event uploadFinished\n             * @description 当所有文件上传结束时触发。\n             * @for  Uploader\n             */\n            _tick: function() {\n                var me = this,\n                    opts = me.options,\n                    fn, val;\n    \n                // 上一个promise还没有结束，则等待完成后再执行。\n                if ( me._promise ) {\n                    return me._promise.always( me.__tick );\n                }\n    \n                // 还有位置，且还有文件要处理的话。\n                if ( me.pool.length < opts.threads && (val = me._nextBlock()) ) {\n                    me._trigged = false;\n    \n                    fn = function( val ) {\n                        me._promise = null;\n    \n                        // 有可能是reject过来的，所以要检测val的类型。\n                        val && val.file && me._startSend( val );\n                        Base.nextTick( me.__tick );\n                    };\n    \n                    me._promise = isPromise( val ) ? val.always( fn ) : fn( val );\n    \n                // 没有要上传的了，且没有正在传输的了。\n                } else if ( !me.remaning && !me._getStats().numOfQueue &&\n                    !me._getStats().numofInterrupt ) {\n                    me.runing = false;\n    \n                    me._trigged || Base.nextTick(function() {\n                        me.owner.trigger('uploadFinished');\n                    });\n                    me._trigged = true;\n                }\n            },\n    \n            _putback: function(block) {\n                var idx;\n    \n                block.cuted.unshift(block);\n                idx = this.stack.indexOf(block.cuted);\n    \n                if (!~idx) {\n                    this.stack.unshift(block.cuted);\n                }\n            },\n    \n            _getStack: function() {\n                var i = 0,\n                    act;\n    \n                while ( (act = this.stack[ i++ ]) ) {\n                    if ( act.has() && act.file.getStatus() === Status.PROGRESS ) {\n                        return act;\n                    } else if (!act.has() ||\n                            act.file.getStatus() !== Status.PROGRESS &&\n                            act.file.getStatus() !== Status.INTERRUPT ) {\n    \n                        // 把已经处理完了的，或者，状态为非 progress（上传中）、\n                        // interupt（暂停中） 的移除。\n                        this.stack.splice( --i, 1 );\n                    }\n                }\n    \n                return null;\n            },\n    \n            _nextBlock: function() {\n                var me = this,\n                    opts = me.options,\n                    act, next, done, preparing;\n    \n                // 如果当前文件还有没有需要传输的，则直接返回剩下的。\n                if ( (act = this._getStack()) ) {\n    \n                    // 是否提前准备下一个文件\n                    if ( opts.prepareNextFile && !me.pending.length ) {\n                        me._prepareNextFile();\n                    }\n    \n                    return act.shift();\n    \n                // 否则，如果正在运行，则准备下一个文件，并等待完成后返回下个分片。\n                } else if ( me.runing ) {\n    \n                    // 如果缓存中有，则直接在缓存中取，没有则去queue中取。\n                    if ( !me.pending.length && me._getStats().numOfQueue ) {\n                        me._prepareNextFile();\n                    }\n    \n                    next = me.pending.shift();\n                    done = function( file ) {\n                        if ( !file ) {\n                            return null;\n                        }\n    \n                        act = CuteFile( file, opts.chunked ? opts.chunkSize : 0 );\n                        me.stack.push(act);\n                        return act.shift();\n                    };\n    \n                    // 文件可能还在prepare中，也有可能已经完全准备好了。\n                    if ( isPromise( next) ) {\n                        preparing = next.file;\n                        next = next[ next.pipe ? 'pipe' : 'then' ]( done );\n                        next.file = preparing;\n                        return next;\n                    }\n    \n                    return done( next );\n                }\n            },\n    \n    \n            /**\n             * @event uploadStart\n             * @param {File} file File对象\n             * @description 某个文件开始上传前触发，一个文件只会触发一次。\n             * @for  Uploader\n             */\n            _prepareNextFile: function() {\n                var me = this,\n                    file = me.request('fetch-file'),\n                    pending = me.pending,\n                    promise;\n    \n                if ( file ) {\n                    promise = me.request( 'before-send-file', file, function() {\n    \n                        // 有可能文件被skip掉了。文件被skip掉后，状态坑定不是Queued.\n                        if ( file.getStatus() === Status.PROGRESS ||\n                            file.getStatus() === Status.INTERRUPT ) {\n                            return file;\n                        }\n    \n                        return me._finishFile( file );\n                    });\n    \n                    me.owner.trigger( 'uploadStart', file );\n                    file.setStatus( Status.PROGRESS );\n    \n                    promise.file = file;\n    \n                    // 如果还在pending中，则替换成文件本身。\n                    promise.done(function() {\n                        var idx = $.inArray( promise, pending );\n    \n                        ~idx && pending.splice( idx, 1, file );\n                    });\n    \n                    // befeore-send-file的钩子就有错误发生。\n                    promise.fail(function( reason ) {\n                        file.setStatus( Status.ERROR, reason );\n                        me.owner.trigger( 'uploadError', file, reason );\n                        me.owner.trigger( 'uploadComplete', file );\n                    });\n    \n                    pending.push( promise );\n                }\n            },\n    \n            // 让出位置了，可以让其他分片开始上传\n            _popBlock: function( block ) {\n                var idx = $.inArray( block, this.pool );\n    \n                this.pool.splice( idx, 1 );\n                block.file.remaning--;\n                this.remaning--;\n            },\n    \n            // 开始上传，可以被掉过。如果promise被reject了，则表示跳过此分片。\n            _startSend: function( block ) {\n                var me = this,\n                    file = block.file,\n                    promise;\n    \n                // 有可能在 before-send-file 的 promise 期间改变了文件状态。\n                // 如：暂停，取消\n                // 我们不能中断 promise, 但是可以在 promise 完后，不做上传操作。\n                if ( file.getStatus() !== Status.PROGRESS ) {\n    \n                    // 如果是中断，则还需要放回去。\n                    if (file.getStatus() === Status.INTERRUPT) {\n                        me._putback(block);\n                    }\n    \n                    return;\n                }\n    \n                me.pool.push( block );\n                me.remaning++;\n    \n                // 如果没有分片，则直接使用原始的。\n                // 不会丢失content-type信息。\n                block.blob = block.chunks === 1 ? file.source :\n                        file.source.slice( block.start, block.end );\n    \n                // hook, 每个分片发送之前可能要做些异步的事情。\n                promise = me.request( 'before-send', block, function() {\n    \n                    // 有可能文件已经上传出错了，所以不需要再传输了。\n                    if ( file.getStatus() === Status.PROGRESS ) {\n                        me._doSend( block );\n                    } else {\n                        me._popBlock( block );\n                        Base.nextTick( me.__tick );\n                    }\n                });\n    \n                // 如果为fail了，则跳过此分片。\n                promise.fail(function() {\n                    if ( file.remaning === 1 ) {\n                        me._finishFile( file ).always(function() {\n                            block.percentage = 1;\n                            me._popBlock( block );\n                            me.owner.trigger( 'uploadComplete', file );\n                            Base.nextTick( me.__tick );\n                        });\n                    } else {\n                        block.percentage = 1;\n                        me.updateFileProgress( file );\n                        me._popBlock( block );\n                        Base.nextTick( me.__tick );\n                    }\n                });\n            },\n    \n    \n            /**\n             * @event uploadBeforeSend\n             * @param {Object} object\n             * @param {Object} data 默认的上传参数，可以扩展此对象来控制上传参数。\n             * @param {Object} headers 可以扩展此对象来控制上传头部。\n             * @description 当某个文件的分块在发送前触发，主要用来询问是否要添加附带参数，大文件在开起分片上传的前提下此事件可能会触发多次。\n             * @for  Uploader\n             */\n    \n            /**\n             * @event uploadAccept\n             * @param {Object} object\n             * @param {Object} ret 服务端的返回数据，json格式，如果服务端不是json格式，从ret._raw中取数据，自行解析。\n             * @description 当某个文件上传到服务端响应后，会派送此事件来询问服务端响应是否有效。如果此事件handler返回值为`false`, 则此文件将派送`server`类型的`uploadError`事件。\n             * @for  Uploader\n             */\n    \n            /**\n             * @event uploadProgress\n             * @param {File} file File对象\n             * @param {Number} percentage 上传进度\n             * @description 上传过程中触发，携带上传进度。\n             * @for  Uploader\n             */\n    \n    \n            /**\n             * @event uploadError\n             * @param {File} file File对象\n             * @param {String} reason 出错的code\n             * @description 当文件上传出错时触发。\n             * @for  Uploader\n             */\n    \n            /**\n             * @event uploadSuccess\n             * @param {File} file File对象\n             * @param {Object} response 服务端返回的数据\n             * @description 当文件上传成功时触发。\n             * @for  Uploader\n             */\n    \n            /**\n             * @event uploadComplete\n             * @param {File} [file] File对象\n             * @description 不管成功或者失败，文件上传完成时触发。\n             * @for  Uploader\n             */\n    \n            // 做上传操作。\n            _doSend: function( block ) {\n                var me = this,\n                    owner = me.owner,\n                    opts = me.options,\n                    file = block.file,\n                    tr = new Transport( opts ),\n                    data = $.extend({}, opts.formData ),\n                    headers = $.extend({}, opts.headers ),\n                    requestAccept, ret;\n    \n                block.transport = tr;\n    \n                tr.on( 'destroy', function() {\n                    delete block.transport;\n                    me._popBlock( block );\n                    Base.nextTick( me.__tick );\n                });\n    \n                // 广播上传进度。以文件为单位。\n                tr.on( 'progress', function( percentage ) {\n                    block.percentage = percentage;\n                    me.updateFileProgress( file );\n                });\n    \n                // 用来询问，是否返回的结果是有错误的。\n                requestAccept = function( reject ) {\n                    var fn;\n    \n                    ret = tr.getResponseAsJson() || {};\n                    ret._raw = tr.getResponse();\n                    fn = function( value ) {\n                        reject = value;\n                    };\n    \n                    // 服务端响应了，不代表成功了，询问是否响应正确。\n                    if ( !owner.trigger( 'uploadAccept', block, ret, fn ) ) {\n                        reject = reject || 'server';\n                    }\n    \n                    return reject;\n                };\n    \n                // 尝试重试，然后广播文件上传出错。\n                tr.on( 'error', function( type, flag ) {\n                    block.retried = block.retried || 0;\n    \n                    // 自动重试\n                    if ( block.chunks > 1 && ~'http,abort'.indexOf( type ) &&\n                            block.retried < opts.chunkRetry ) {\n    \n                        block.retried++;\n                        tr.send();\n    \n                    } else {\n    \n                        // http status 500 ~ 600\n                        if ( !flag && type === 'server' ) {\n                            type = requestAccept( type );\n                        }\n    \n                        file.setStatus( Status.ERROR, type );\n                        owner.trigger( 'uploadError', file, type );\n                        owner.trigger( 'uploadComplete', file );\n                    }\n                });\n    \n                // 上传成功\n                tr.on( 'load', function() {\n                    var reason;\n    \n                    // 如果非预期，转向上传出错。\n                    if ( (reason = requestAccept()) ) {\n                        tr.trigger( 'error', reason, true );\n                        return;\n                    }\n    \n                    // 全部上传完成。\n                    if ( file.remaning === 1 ) {\n                        me._finishFile( file, ret );\n                    } else {\n                        tr.destroy();\n                    }\n                });\n    \n                // 配置默认的上传字段。\n                data = $.extend( data, {\n                    id: file.id,\n                    name: file.name,\n                    type: file.type,\n                    lastModifiedDate: file.lastModifiedDate,\n                    size: file.size\n                });\n    \n                block.chunks > 1 && $.extend( data, {\n                    chunks: block.chunks,\n                    chunk: block.chunk\n                });\n    \n                // 在发送之间可以添加字段什么的。。。\n                // 如果默认的字段不够使用，可以通过监听此事件来扩展\n                owner.trigger( 'uploadBeforeSend', block, data, headers );\n    \n                // 开始发送。\n                tr.appendBlob( opts.fileVal, block.blob, file.name );\n                tr.append( data );\n                tr.setRequestHeader( headers );\n                tr.send();\n            },\n    \n            // 完成上传。\n            _finishFile: function( file, ret, hds ) {\n                var owner = this.owner;\n    \n                return owner\n                        .request( 'after-send-file', arguments, function() {\n                            file.setStatus( Status.COMPLETE );\n                            owner.trigger( 'uploadSuccess', file, ret, hds );\n                        })\n                        .fail(function( reason ) {\n    \n                            // 如果外部已经标记为invalid什么的，不再改状态。\n                            if ( file.getStatus() === Status.PROGRESS ) {\n                                file.setStatus( Status.ERROR, reason );\n                            }\n    \n                            owner.trigger( 'uploadError', file, reason );\n                        })\n                        .always(function() {\n                            owner.trigger( 'uploadComplete', file );\n                        });\n            },\n    \n            updateFileProgress: function(file) {\n                var totalPercent = 0,\n                    uploaded = 0;\n    \n                if (!file.blocks) {\n                    return;\n                }\n    \n                $.each( file.blocks, function( _, v ) {\n                    uploaded += (v.percentage || 0) * (v.end - v.start);\n                });\n    \n                totalPercent = uploaded / file.size;\n                this.owner.trigger( 'uploadProgress', file, totalPercent || 0 );\n            }\n    \n        });\n    });\n    \n    /**\n     * @fileOverview 各种验证，包括文件总大小是否超出、单文件是否超出和文件是否重复。\n     */\n    \n    define('widgets/validator',[\n        'base',\n        'uploader',\n        'file',\n        'widgets/widget'\n    ], function( Base, Uploader, WUFile ) {\n    \n        var $ = Base.$,\n            validators = {},\n            api;\n    \n        /**\n         * @event error\n         * @param {String} type 错误类型。\n         * @description 当validate不通过时，会以派送错误事件的形式通知调用者。通过`upload.on('error', handler)`可以捕获到此类错误，目前有以下错误会在特定的情况下派送错来。\n         *\n         * * `Q_EXCEED_NUM_LIMIT` 在设置了`fileNumLimit`且尝试给`uploader`添加的文件数量超出这个值时派送。\n         * * `Q_EXCEED_SIZE_LIMIT` 在设置了`Q_EXCEED_SIZE_LIMIT`且尝试给`uploader`添加的文件总大小超出这个值时派送。\n         * * `Q_TYPE_DENIED` 当文件类型不满足时触发。。\n         * @for  Uploader\n         */\n    \n        // 暴露给外面的api\n        api = {\n    \n            // 添加验证器\n            addValidator: function( type, cb ) {\n                validators[ type ] = cb;\n            },\n    \n            // 移除验证器\n            removeValidator: function( type ) {\n                delete validators[ type ];\n            }\n        };\n    \n        // 在Uploader初始化的时候启动Validators的初始化\n        Uploader.register({\n            name: 'validator',\n    \n            init: function() {\n                var me = this;\n                Base.nextTick(function() {\n                    $.each( validators, function() {\n                        this.call( me.owner );\n                    });\n                });\n            }\n        });\n    \n        /**\n         * @property {int} [fileNumLimit=undefined]\n         * @namespace options\n         * @for Uploader\n         * @description 验证文件总数量, 超出则不允许加入队列。\n         */\n        api.addValidator( 'fileNumLimit', function() {\n            var uploader = this,\n                opts = uploader.options,\n                count = 0,\n                max = parseInt( opts.fileNumLimit, 10 ),\n                flag = true;\n    \n            if ( !max ) {\n                return;\n            }\n    \n            uploader.on( 'beforeFileQueued', function( file ) {\n    \n                if ( count >= max && flag ) {\n                    flag = false;\n                    this.trigger( 'error', 'Q_EXCEED_NUM_LIMIT', max, file );\n                    setTimeout(function() {\n                        flag = true;\n                    }, 1 );\n                }\n    \n                return count >= max ? false : true;\n            });\n    \n            uploader.on( 'fileQueued', function() {\n                count++;\n            });\n    \n            uploader.on( 'fileDequeued', function() {\n                count--;\n            });\n    \n            uploader.on( 'reset', function() {\n                count = 0;\n            });\n        });\n    \n    \n        /**\n         * @property {int} [fileSizeLimit=undefined]\n         * @namespace options\n         * @for Uploader\n         * @description 验证文件总大小是否超出限制, 超出则不允许加入队列。\n         */\n        api.addValidator( 'fileSizeLimit', function() {\n            var uploader = this,\n                opts = uploader.options,\n                count = 0,\n                max = parseInt( opts.fileSizeLimit, 10 ),\n                flag = true;\n    \n            if ( !max ) {\n                return;\n            }\n    \n            uploader.on( 'beforeFileQueued', function( file ) {\n                var invalid = count + file.size > max;\n    \n                if ( invalid && flag ) {\n                    flag = false;\n                    this.trigger( 'error', 'Q_EXCEED_SIZE_LIMIT', max, file );\n                    setTimeout(function() {\n                        flag = true;\n                    }, 1 );\n                }\n    \n                return invalid ? false : true;\n            });\n    \n            uploader.on( 'fileQueued', function( file ) {\n                count += file.size;\n            });\n    \n            uploader.on( 'fileDequeued', function( file ) {\n                count -= file.size;\n            });\n    \n            uploader.on( 'reset', function() {\n                count = 0;\n            });\n        });\n    \n        /**\n         * @property {int} [fileSingleSizeLimit=undefined]\n         * @namespace options\n         * @for Uploader\n         * @description 验证单个文件大小是否超出限制, 超出则不允许加入队列。\n         */\n        api.addValidator( 'fileSingleSizeLimit', function() {\n            var uploader = this,\n                opts = uploader.options,\n                max = opts.fileSingleSizeLimit;\n    \n            if ( !max ) {\n                return;\n            }\n    \n            uploader.on( 'beforeFileQueued', function( file ) {\n    \n                if ( file.size > max ) {\n                    file.setStatus( WUFile.Status.INVALID, 'exceed_size' );\n                    this.trigger( 'error', 'F_EXCEED_SIZE', max, file );\n                    return false;\n                }\n    \n            });\n    \n        });\n    \n        /**\n         * @property {Boolean} [duplicate=undefined]\n         * @namespace options\n         * @for Uploader\n         * @description 去重， 根据文件名字、文件大小和最后修改时间来生成hash Key.\n         */\n        api.addValidator( 'duplicate', function() {\n            var uploader = this,\n                opts = uploader.options,\n                mapping = {};\n    \n            if ( opts.duplicate ) {\n                return;\n            }\n    \n            function hashString( str ) {\n                var hash = 0,\n                    i = 0,\n                    len = str.length,\n                    _char;\n    \n                for ( ; i < len; i++ ) {\n                    _char = str.charCodeAt( i );\n                    hash = _char + (hash << 6) + (hash << 16) - hash;\n                }\n    \n                return hash;\n            }\n    \n            uploader.on( 'beforeFileQueued', function( file ) {\n                var hash = file.__hash || (file.__hash = hashString( file.name +\n                        file.size + file.lastModifiedDate ));\n    \n                // 已经重复了\n                if ( mapping[ hash ] ) {\n                    this.trigger( 'error', 'F_DUPLICATE', file );\n                    return false;\n                }\n            });\n    \n            uploader.on( 'fileQueued', function( file ) {\n                var hash = file.__hash;\n    \n                hash && (mapping[ hash ] = true);\n            });\n    \n            uploader.on( 'fileDequeued', function( file ) {\n                var hash = file.__hash;\n    \n                hash && (delete mapping[ hash ]);\n            });\n    \n            uploader.on( 'reset', function() {\n                mapping = {};\n            });\n        });\n    \n        return api;\n    });\n    \n    /**\n     * @fileOverview Md5\n     */\n    define('lib/md5',[\n        'runtime/client',\n        'mediator'\n    ], function( RuntimeClient, Mediator ) {\n    \n        function Md5() {\n            RuntimeClient.call( this, 'Md5' );\n        }\n    \n        // 让 Md5 具备事件功能。\n        Mediator.installTo( Md5.prototype );\n    \n        Md5.prototype.loadFromBlob = function( blob ) {\n            var me = this;\n    \n            if ( me.getRuid() ) {\n                me.disconnectRuntime();\n            }\n    \n            // 连接到blob归属的同一个runtime.\n            me.connectRuntime( blob.ruid, function() {\n                me.exec('init');\n                me.exec( 'loadFromBlob', blob );\n            });\n        };\n    \n        Md5.prototype.getResult = function() {\n            return this.exec('getResult');\n        };\n    \n        return Md5;\n    });\n    /**\n     * @fileOverview 图片操作, 负责预览图片和上传前压缩图片\n     */\n    define('widgets/md5',[\n        'base',\n        'uploader',\n        'lib/md5',\n        'lib/blob',\n        'widgets/widget'\n    ], function( Base, Uploader, Md5, Blob ) {\n    \n        return Uploader.register({\n            name: 'md5',\n    \n    \n            /**\n             * 计算文件 md5 值，返回一个 promise 对象，可以监听 progress 进度。\n             *\n             *\n             * @method md5File\n             * @grammar md5File( file[, start[, end]] ) => promise\n             * @for Uploader\n             * @example\n             *\n             * uploader.on( 'fileQueued', function( file ) {\n             *     var $li = ...;\n             *\n             *     uploader.md5File( file )\n             *\n             *         // 及时显示进度\n             *         .progress(function(percentage) {\n             *             console.log('Percentage:', percentage);\n             *         })\n             *\n             *         // 完成\n             *         .then(function(val) {\n             *             console.log('md5 result:', val);\n             *         });\n             *\n             * });\n             */\n            md5File: function( file, start, end ) {\n                var md5 = new Md5(),\n                    deferred = Base.Deferred(),\n                    blob = (file instanceof Blob) ? file :\n                        this.request( 'get-file', file ).source;\n    \n                md5.on( 'progress load', function( e ) {\n                    e = e || {};\n                    deferred.notify( e.total ? e.loaded / e.total : 1 );\n                });\n    \n                md5.on( 'complete', function() {\n                    deferred.resolve( md5.getResult() );\n                });\n    \n                md5.on( 'error', function( reason ) {\n                    deferred.reject( reason );\n                });\n    \n                if ( arguments.length > 1 ) {\n                    start = start || 0;\n                    end = end || 0;\n                    start < 0 && (start = blob.size + start);\n                    end < 0 && (end = blob.size + end);\n                    end = Math.min( end, blob.size );\n                    blob = blob.slice( start, end );\n                }\n    \n                md5.loadFromBlob( blob );\n    \n                return deferred.promise();\n            }\n        });\n    });\n    /**\n     * @fileOverview Runtime管理器，负责Runtime的选择, 连接\n     */\n    define('runtime/compbase',[],function() {\n    \n        function CompBase( owner, runtime ) {\n    \n            this.owner = owner;\n            this.options = owner.options;\n    \n            this.getRuntime = function() {\n                return runtime;\n            };\n    \n            this.getRuid = function() {\n                return runtime.uid;\n            };\n    \n            this.trigger = function() {\n                return owner.trigger.apply( owner, arguments );\n            };\n        }\n    \n        return CompBase;\n    });\n    /**\n     * @fileOverview Html5Runtime\n     */\n    define('runtime/html5/runtime',[\n        'base',\n        'runtime/runtime',\n        'runtime/compbase'\n    ], function( Base, Runtime, CompBase ) {\n    \n        var type = 'html5',\n            components = {};\n    \n        function Html5Runtime() {\n            var pool = {},\n                me = this,\n                destroy = this.destroy;\n    \n            Runtime.apply( me, arguments );\n            me.type = type;\n    \n    \n            // 这个方法的调用者，实际上是RuntimeClient\n            me.exec = function( comp, fn/*, args...*/) {\n                var client = this,\n                    uid = client.uid,\n                    args = Base.slice( arguments, 2 ),\n                    instance;\n    \n                if ( components[ comp ] ) {\n                    instance = pool[ uid ] = pool[ uid ] ||\n                            new components[ comp ]( client, me );\n    \n                    if ( instance[ fn ] ) {\n                        return instance[ fn ].apply( instance, args );\n                    }\n                }\n            };\n    \n            me.destroy = function() {\n                // @todo 删除池子中的所有实例\n                return destroy && destroy.apply( this, arguments );\n            };\n        }\n    \n        Base.inherits( Runtime, {\n            constructor: Html5Runtime,\n    \n            // 不需要连接其他程序，直接执行callback\n            init: function() {\n                var me = this;\n                setTimeout(function() {\n                    me.trigger('ready');\n                }, 1 );\n            }\n    \n        });\n    \n        // 注册Components\n        Html5Runtime.register = function( name, component ) {\n            var klass = components[ name ] = Base.inherits( CompBase, component );\n            return klass;\n        };\n    \n        // 注册html5运行时。\n        // 只有在支持的前提下注册。\n        if ( window.Blob && window.FileReader && window.DataView ) {\n            Runtime.addRuntime( type, Html5Runtime );\n        }\n    \n        return Html5Runtime;\n    });\n    /**\n     * @fileOverview Blob Html实现\n     */\n    define('runtime/html5/blob',[\n        'runtime/html5/runtime',\n        'lib/blob'\n    ], function( Html5Runtime, Blob ) {\n    \n        return Html5Runtime.register( 'Blob', {\n            slice: function( start, end ) {\n                var blob = this.owner.source,\n                    slice = blob.slice || blob.webkitSlice || blob.mozSlice;\n    \n                blob = slice.call( blob, start, end );\n    \n                return new Blob( this.getRuid(), blob );\n            }\n        });\n    });\n    /**\n     * @fileOverview FilePaste\n     */\n    define('runtime/html5/dnd',[\n        'base',\n        'runtime/html5/runtime',\n        'lib/file'\n    ], function( Base, Html5Runtime, File ) {\n    \n        var $ = Base.$,\n            prefix = 'webuploader-dnd-';\n    \n        return Html5Runtime.register( 'DragAndDrop', {\n            init: function() {\n                var elem = this.elem = this.options.container;\n    \n                this.dragEnterHandler = Base.bindFn( this._dragEnterHandler, this );\n                this.dragOverHandler = Base.bindFn( this._dragOverHandler, this );\n                this.dragLeaveHandler = Base.bindFn( this._dragLeaveHandler, this );\n                this.dropHandler = Base.bindFn( this._dropHandler, this );\n                this.dndOver = false;\n    \n                elem.on( 'dragenter', this.dragEnterHandler );\n                elem.on( 'dragover', this.dragOverHandler );\n                elem.on( 'dragleave', this.dragLeaveHandler );\n                elem.on( 'drop', this.dropHandler );\n    \n                if ( this.options.disableGlobalDnd ) {\n                    $( document ).on( 'dragover', this.dragOverHandler );\n                    $( document ).on( 'drop', this.dropHandler );\n                }\n            },\n    \n            _dragEnterHandler: function( e ) {\n                var me = this,\n                    denied = me._denied || false,\n                    items;\n    \n                e = e.originalEvent || e;\n    \n                if ( !me.dndOver ) {\n                    me.dndOver = true;\n    \n                    // 注意只有 chrome 支持。\n                    items = e.dataTransfer.items;\n    \n                    if ( items && items.length ) {\n                        me._denied = denied = !me.trigger( 'accept', items );\n                    }\n    \n                    me.elem.addClass( prefix + 'over' );\n                    me.elem[ denied ? 'addClass' :\n                            'removeClass' ]( prefix + 'denied' );\n                }\n    \n                e.dataTransfer.dropEffect = denied ? 'none' : 'copy';\n    \n                return false;\n            },\n    \n            _dragOverHandler: function( e ) {\n                // 只处理框内的。\n                var parentElem = this.elem.parent().get( 0 );\n                if ( parentElem && !$.contains( parentElem, e.currentTarget ) ) {\n                    return false;\n                }\n    \n                clearTimeout( this._leaveTimer );\n                this._dragEnterHandler.call( this, e );\n    \n                return false;\n            },\n    \n            _dragLeaveHandler: function() {\n                var me = this,\n                    handler;\n    \n                handler = function() {\n                    me.dndOver = false;\n                    me.elem.removeClass( prefix + 'over ' + prefix + 'denied' );\n                };\n    \n                clearTimeout( me._leaveTimer );\n                me._leaveTimer = setTimeout( handler, 100 );\n                return false;\n            },\n    \n            _dropHandler: function( e ) {\n                var me = this,\n                    ruid = me.getRuid(),\n                    parentElem = me.elem.parent().get( 0 ),\n                    dataTransfer, data;\n    \n                // 只处理框内的。\n                if ( parentElem && !$.contains( parentElem, e.currentTarget ) ) {\n                    return false;\n                }\n    \n                e = e.originalEvent || e;\n                dataTransfer = e.dataTransfer;\n    \n                // 如果是页面内拖拽，还不能处理，不阻止事件。\n                // 此处 ie11 下会报参数错误，\n                try {\n                    data = dataTransfer.getData('text/html');\n                } catch( err ) {\n                }\n    \n                me.dndOver = false;\n                me.elem.removeClass( prefix + 'over' );\n    \n                if ( data ) {\n                    return;\n                }\n    \n                me._getTansferFiles( dataTransfer, function( results ) {\n                    me.trigger( 'drop', $.map( results, function( file ) {\n                        return new File( ruid, file );\n                    }) );\n                });\n    \n                return false;\n            },\n    \n            // 如果传入 callback 则去查看文件夹，否则只管当前文件夹。\n            _getTansferFiles: function( dataTransfer, callback ) {\n                var results  = [],\n                    promises = [],\n                    items, files, file, item, i, len, canAccessFolder;\n    \n                items = dataTransfer.items;\n                files = dataTransfer.files;\n    \n                canAccessFolder = !!(items && items[ 0 ].webkitGetAsEntry);\n    \n                for ( i = 0, len = files.length; i < len; i++ ) {\n                    file = files[ i ];\n                    item = items && items[ i ];\n    \n                    if ( canAccessFolder && item.webkitGetAsEntry().isDirectory ) {\n    \n                        promises.push( this._traverseDirectoryTree(\n                                item.webkitGetAsEntry(), results ) );\n                    } else {\n                        results.push( file );\n                    }\n                }\n    \n                Base.when.apply( Base, promises ).done(function() {\n    \n                    if ( !results.length ) {\n                        return;\n                    }\n    \n                    callback( results );\n                });\n            },\n    \n            _traverseDirectoryTree: function( entry, results ) {\n                var deferred = Base.Deferred(),\n                    me = this;\n    \n                if ( entry.isFile ) {\n                    entry.file(function( file ) {\n                        results.push( file );\n                        deferred.resolve();\n                    });\n                } else if ( entry.isDirectory ) {\n                    entry.createReader().readEntries(function( entries ) {\n                        var len = entries.length,\n                            promises = [],\n                            arr = [],    // 为了保证顺序。\n                            i;\n    \n                        for ( i = 0; i < len; i++ ) {\n                            promises.push( me._traverseDirectoryTree(\n                                    entries[ i ], arr ) );\n                        }\n    \n                        Base.when.apply( Base, promises ).then(function() {\n                            results.push.apply( results, arr );\n                            deferred.resolve();\n                        }, deferred.reject );\n                    });\n                }\n    \n                return deferred.promise();\n            },\n    \n            destroy: function() {\n                var elem = this.elem;\n    \n                // 还没 init 就调用 destroy\n                if (!elem) {\n                    return;\n                }\n    \n                elem.off( 'dragenter', this.dragEnterHandler );\n                elem.off( 'dragover', this.dragOverHandler );\n                elem.off( 'dragleave', this.dragLeaveHandler );\n                elem.off( 'drop', this.dropHandler );\n    \n                if ( this.options.disableGlobalDnd ) {\n                    $( document ).off( 'dragover', this.dragOverHandler );\n                    $( document ).off( 'drop', this.dropHandler );\n                }\n            }\n        });\n    });\n    \n    /**\n     * @fileOverview FilePaste\n     */\n    define('runtime/html5/filepaste',[\n        'base',\n        'runtime/html5/runtime',\n        'lib/file'\n    ], function( Base, Html5Runtime, File ) {\n    \n        return Html5Runtime.register( 'FilePaste', {\n            init: function() {\n                var opts = this.options,\n                    elem = this.elem = opts.container,\n                    accept = '.*',\n                    arr, i, len, item;\n    \n                // accetp的mimeTypes中生成匹配正则。\n                if ( opts.accept ) {\n                    arr = [];\n    \n                    for ( i = 0, len = opts.accept.length; i < len; i++ ) {\n                        item = opts.accept[ i ].mimeTypes;\n                        item && arr.push( item );\n                    }\n    \n                    if ( arr.length ) {\n                        accept = arr.join(',');\n                        accept = accept.replace( /,/g, '|' ).replace( /\\*/g, '.*' );\n                    }\n                }\n                this.accept = accept = new RegExp( accept, 'i' );\n                this.hander = Base.bindFn( this._pasteHander, this );\n                elem.on( 'paste', this.hander );\n            },\n    \n            _pasteHander: function( e ) {\n                var allowed = [],\n                    ruid = this.getRuid(),\n                    items, item, blob, i, len;\n    \n                e = e.originalEvent || e;\n                items = e.clipboardData.items;\n    \n                for ( i = 0, len = items.length; i < len; i++ ) {\n                    item = items[ i ];\n    \n                    if ( item.kind !== 'file' || !(blob = item.getAsFile()) ) {\n                        continue;\n                    }\n    \n                    allowed.push( new File( ruid, blob ) );\n                }\n    \n                if ( allowed.length ) {\n                    // 不阻止非文件粘贴（文字粘贴）的事件冒泡\n                    e.preventDefault();\n                    e.stopPropagation();\n                    this.trigger( 'paste', allowed );\n                }\n            },\n    \n            destroy: function() {\n                this.elem.off( 'paste', this.hander );\n            }\n        });\n    });\n    \n    /**\n     * @fileOverview FilePicker\n     */\n    define('runtime/html5/filepicker',[\n        'base',\n        'runtime/html5/runtime'\n    ], function( Base, Html5Runtime ) {\n    \n        var $ = Base.$;\n    \n        return Html5Runtime.register( 'FilePicker', {\n            init: function() {\n                var container = this.getRuntime().getContainer(),\n                    me = this,\n                    owner = me.owner,\n                    opts = me.options,\n                    label = this.label = $( document.createElement('label') ),\n                    input =  this.input = $( document.createElement('input') ),\n                    arr, i, len, mouseHandler;\n    \n                input.attr( 'type', 'file' );\n                input.attr( 'capture', 'camera');\n                input.attr( 'name', opts.name );\n                input.addClass('webuploader-element-invisible');\n    \n                label.on( 'click', function(e) {\n                    input.trigger('click');\n                    e.stopPropagation();\n                    owner.trigger('dialogopen');\n                });\n    \n                label.css({\n                    opacity: 0,\n                    width: '100%',\n                    height: '100%',\n                    display: 'block',\n                    cursor: 'pointer',\n                    background: '#ffffff'\n                });\n    \n                if ( opts.multiple ) {\n                    input.attr( 'multiple', 'multiple' );\n                }\n    \n                // @todo Firefox不支持单独指定后缀\n                if ( opts.accept && opts.accept.length > 0 ) {\n                    arr = [];\n    \n                    for ( i = 0, len = opts.accept.length; i < len; i++ ) {\n                        arr.push( opts.accept[ i ].mimeTypes );\n                    }\n    \n                    input.attr( 'accept', arr.join(',') );\n                }\n    \n                container.append( input );\n                container.append( label );\n    \n                mouseHandler = function( e ) {\n                    owner.trigger( e.type );\n                };\n    \n                input.on( 'change', function( e ) {\n                    var fn = arguments.callee,\n                        clone;\n    \n                    me.files = e.target.files;\n    \n                    // reset input\n                    clone = this.cloneNode( true );\n                    clone.value = null;\n                    this.parentNode.replaceChild( clone, this );\n    \n                    input.off();\n                    input = $( clone ).on( 'change', fn )\n                            .on( 'mouseenter mouseleave', mouseHandler );\n    \n                    owner.trigger('change');\n                });\n    \n                label.on( 'mouseenter mouseleave', mouseHandler );\n    \n            },\n    \n    \n            getFiles: function() {\n                return this.files;\n            },\n    \n            destroy: function() {\n                this.input.off();\n                this.label.off();\n            }\n        });\n    });\n    \n    /**\n     * Terms:\n     *\n     * Uint8Array, FileReader, BlobBuilder, atob, ArrayBuffer\n     * @fileOverview Image控件\n     */\n    define('runtime/html5/util',[\n        'base'\n    ], function( Base ) {\n    \n        var urlAPI = window.createObjectURL && window ||\n                window.URL && URL.revokeObjectURL && URL ||\n                window.webkitURL,\n            createObjectURL = Base.noop,\n            revokeObjectURL = createObjectURL;\n    \n        if ( urlAPI ) {\n    \n            // 更安全的方式调用，比如android里面就能把context改成其他的对象。\n            createObjectURL = function() {\n                return urlAPI.createObjectURL.apply( urlAPI, arguments );\n            };\n    \n            revokeObjectURL = function() {\n                return urlAPI.revokeObjectURL.apply( urlAPI, arguments );\n            };\n        }\n    \n        return {\n            createObjectURL: createObjectURL,\n            revokeObjectURL: revokeObjectURL,\n    \n            dataURL2Blob: function( dataURI ) {\n                var byteStr, intArray, ab, i, mimetype, parts;\n    \n                parts = dataURI.split(',');\n    \n                if ( ~parts[ 0 ].indexOf('base64') ) {\n                    byteStr = atob( parts[ 1 ] );\n                } else {\n                    byteStr = decodeURIComponent( parts[ 1 ] );\n                }\n    \n                ab = new ArrayBuffer( byteStr.length );\n                intArray = new Uint8Array( ab );\n    \n                for ( i = 0; i < byteStr.length; i++ ) {\n                    intArray[ i ] = byteStr.charCodeAt( i );\n                }\n    \n                mimetype = parts[ 0 ].split(':')[ 1 ].split(';')[ 0 ];\n    \n                return this.arrayBufferToBlob( ab, mimetype );\n            },\n    \n            dataURL2ArrayBuffer: function( dataURI ) {\n                var byteStr, intArray, i, parts;\n    \n                parts = dataURI.split(',');\n    \n                if ( ~parts[ 0 ].indexOf('base64') ) {\n                    byteStr = atob( parts[ 1 ] );\n                } else {\n                    byteStr = decodeURIComponent( parts[ 1 ] );\n                }\n    \n                intArray = new Uint8Array( byteStr.length );\n    \n                for ( i = 0; i < byteStr.length; i++ ) {\n                    intArray[ i ] = byteStr.charCodeAt( i );\n                }\n    \n                return intArray.buffer;\n            },\n    \n            arrayBufferToBlob: function( buffer, type ) {\n                var builder = window.BlobBuilder || window.WebKitBlobBuilder,\n                    bb;\n    \n                // android不支持直接new Blob, 只能借助blobbuilder.\n                if ( builder ) {\n                    bb = new builder();\n                    bb.append( buffer );\n                    return bb.getBlob( type );\n                }\n    \n                return new Blob([ buffer ], type ? { type: type } : {} );\n            },\n    \n            // 抽出来主要是为了解决android下面canvas.toDataUrl不支持jpeg.\n            // 你得到的结果是png.\n            canvasToDataUrl: function( canvas, type, quality ) {\n                return canvas.toDataURL( type, quality / 100 );\n            },\n    \n            // imagemeat会复写这个方法，如果用户选择加载那个文件了的话。\n            parseMeta: function( blob, callback ) {\n                callback( false, {});\n            },\n    \n            // imagemeat会复写这个方法，如果用户选择加载那个文件了的话。\n            updateImageHead: function( data ) {\n                return data;\n            }\n        };\n    });\n    /**\n     * Terms:\n     *\n     * Uint8Array, FileReader, BlobBuilder, atob, ArrayBuffer\n     * @fileOverview Image控件\n     */\n    define('runtime/html5/imagemeta',[\n        'runtime/html5/util'\n    ], function( Util ) {\n    \n        var api;\n    \n        api = {\n            parsers: {\n                0xffe1: []\n            },\n    \n            maxMetaDataSize: 262144,\n    \n            parse: function( blob, cb ) {\n                var me = this,\n                    fr = new FileReader();\n    \n                fr.onload = function() {\n                    cb( false, me._parse( this.result ) );\n                    fr = fr.onload = fr.onerror = null;\n                };\n    \n                fr.onerror = function( e ) {\n                    cb( e.message );\n                    fr = fr.onload = fr.onerror = null;\n                };\n    \n                blob = blob.slice( 0, me.maxMetaDataSize );\n                fr.readAsArrayBuffer( blob.getSource() );\n            },\n    \n            _parse: function( buffer, noParse ) {\n                if ( buffer.byteLength < 6 ) {\n                    return;\n                }\n    \n                var dataview = new DataView( buffer ),\n                    offset = 2,\n                    maxOffset = dataview.byteLength - 4,\n                    headLength = offset,\n                    ret = {},\n                    markerBytes, markerLength, parsers, i;\n    \n                if ( dataview.getUint16( 0 ) === 0xffd8 ) {\n    \n                    while ( offset < maxOffset ) {\n                        markerBytes = dataview.getUint16( offset );\n    \n                        if ( markerBytes >= 0xffe0 && markerBytes <= 0xffef ||\n                                markerBytes === 0xfffe ) {\n    \n                            markerLength = dataview.getUint16( offset + 2 ) + 2;\n    \n                            if ( offset + markerLength > dataview.byteLength ) {\n                                break;\n                            }\n    \n                            parsers = api.parsers[ markerBytes ];\n    \n                            if ( !noParse && parsers ) {\n                                for ( i = 0; i < parsers.length; i += 1 ) {\n                                    parsers[ i ].call( api, dataview, offset,\n                                            markerLength, ret );\n                                }\n                            }\n    \n                            offset += markerLength;\n                            headLength = offset;\n                        } else {\n                            break;\n                        }\n                    }\n    \n                    if ( headLength > 6 ) {\n                        if ( buffer.slice ) {\n                            ret.imageHead = buffer.slice( 2, headLength );\n                        } else {\n                            // Workaround for IE10, which does not yet\n                            // support ArrayBuffer.slice:\n                            ret.imageHead = new Uint8Array( buffer )\n                                    .subarray( 2, headLength );\n                        }\n                    }\n                }\n    \n                return ret;\n            },\n    \n            updateImageHead: function( buffer, head ) {\n                var data = this._parse( buffer, true ),\n                    buf1, buf2, bodyoffset;\n    \n    \n                bodyoffset = 2;\n                if ( data.imageHead ) {\n                    bodyoffset = 2 + data.imageHead.byteLength;\n                }\n    \n                if ( buffer.slice ) {\n                    buf2 = buffer.slice( bodyoffset );\n                } else {\n                    buf2 = new Uint8Array( buffer ).subarray( bodyoffset );\n                }\n    \n                buf1 = new Uint8Array( head.byteLength + 2 + buf2.byteLength );\n    \n                buf1[ 0 ] = 0xFF;\n                buf1[ 1 ] = 0xD8;\n                buf1.set( new Uint8Array( head ), 2 );\n                buf1.set( new Uint8Array( buf2 ), head.byteLength + 2 );\n    \n                return buf1.buffer;\n            }\n        };\n    \n        Util.parseMeta = function() {\n            return api.parse.apply( api, arguments );\n        };\n    \n        Util.updateImageHead = function() {\n            return api.updateImageHead.apply( api, arguments );\n        };\n    \n        return api;\n    });\n    /**\n     * 代码来自于：https://github.com/blueimp/JavaScript-Load-Image\n     * 暂时项目中只用了orientation.\n     *\n     * 去除了 Exif Sub IFD Pointer, GPS Info IFD Pointer, Exif Thumbnail.\n     * @fileOverview EXIF解析\n     */\n    \n    // Sample\n    // ====================================\n    // Make : Apple\n    // Model : iPhone 4S\n    // Orientation : 1\n    // XResolution : 72 [72/1]\n    // YResolution : 72 [72/1]\n    // ResolutionUnit : 2\n    // Software : QuickTime 7.7.1\n    // DateTime : 2013:09:01 22:53:55\n    // ExifIFDPointer : 190\n    // ExposureTime : 0.058823529411764705 [1/17]\n    // FNumber : 2.4 [12/5]\n    // ExposureProgram : Normal program\n    // ISOSpeedRatings : 800\n    // ExifVersion : 0220\n    // DateTimeOriginal : 2013:09:01 22:52:51\n    // DateTimeDigitized : 2013:09:01 22:52:51\n    // ComponentsConfiguration : YCbCr\n    // ShutterSpeedValue : 4.058893515764426\n    // ApertureValue : 2.5260688216892597 [4845/1918]\n    // BrightnessValue : -0.3126686601998395\n    // MeteringMode : Pattern\n    // Flash : Flash did not fire, compulsory flash mode\n    // FocalLength : 4.28 [107/25]\n    // SubjectArea : [4 values]\n    // FlashpixVersion : 0100\n    // ColorSpace : 1\n    // PixelXDimension : 2448\n    // PixelYDimension : 3264\n    // SensingMethod : One-chip color area sensor\n    // ExposureMode : 0\n    // WhiteBalance : Auto white balance\n    // FocalLengthIn35mmFilm : 35\n    // SceneCaptureType : Standard\n    define('runtime/html5/imagemeta/exif',[\n        'base',\n        'runtime/html5/imagemeta'\n    ], function( Base, ImageMeta ) {\n    \n        var EXIF = {};\n    \n        EXIF.ExifMap = function() {\n            return this;\n        };\n    \n        EXIF.ExifMap.prototype.map = {\n            'Orientation': 0x0112\n        };\n    \n        EXIF.ExifMap.prototype.get = function( id ) {\n            return this[ id ] || this[ this.map[ id ] ];\n        };\n    \n        EXIF.exifTagTypes = {\n            // byte, 8-bit unsigned int:\n            1: {\n                getValue: function( dataView, dataOffset ) {\n                    return dataView.getUint8( dataOffset );\n                },\n                size: 1\n            },\n    \n            // ascii, 8-bit byte:\n            2: {\n                getValue: function( dataView, dataOffset ) {\n                    return String.fromCharCode( dataView.getUint8( dataOffset ) );\n                },\n                size: 1,\n                ascii: true\n            },\n    \n            // short, 16 bit int:\n            3: {\n                getValue: function( dataView, dataOffset, littleEndian ) {\n                    return dataView.getUint16( dataOffset, littleEndian );\n                },\n                size: 2\n            },\n    \n            // long, 32 bit int:\n            4: {\n                getValue: function( dataView, dataOffset, littleEndian ) {\n                    return dataView.getUint32( dataOffset, littleEndian );\n                },\n                size: 4\n            },\n    \n            // rational = two long values,\n            // first is numerator, second is denominator:\n            5: {\n                getValue: function( dataView, dataOffset, littleEndian ) {\n                    return dataView.getUint32( dataOffset, littleEndian ) /\n                        dataView.getUint32( dataOffset + 4, littleEndian );\n                },\n                size: 8\n            },\n    \n            // slong, 32 bit signed int:\n            9: {\n                getValue: function( dataView, dataOffset, littleEndian ) {\n                    return dataView.getInt32( dataOffset, littleEndian );\n                },\n                size: 4\n            },\n    \n            // srational, two slongs, first is numerator, second is denominator:\n            10: {\n                getValue: function( dataView, dataOffset, littleEndian ) {\n                    return dataView.getInt32( dataOffset, littleEndian ) /\n                        dataView.getInt32( dataOffset + 4, littleEndian );\n                },\n                size: 8\n            }\n        };\n    \n        // undefined, 8-bit byte, value depending on field:\n        EXIF.exifTagTypes[ 7 ] = EXIF.exifTagTypes[ 1 ];\n    \n        EXIF.getExifValue = function( dataView, tiffOffset, offset, type, length,\n                littleEndian ) {\n    \n            var tagType = EXIF.exifTagTypes[ type ],\n                tagSize, dataOffset, values, i, str, c;\n    \n            if ( !tagType ) {\n                Base.log('Invalid Exif data: Invalid tag type.');\n                return;\n            }\n    \n            tagSize = tagType.size * length;\n    \n            // Determine if the value is contained in the dataOffset bytes,\n            // or if the value at the dataOffset is a pointer to the actual data:\n            dataOffset = tagSize > 4 ? tiffOffset + dataView.getUint32( offset + 8,\n                    littleEndian ) : (offset + 8);\n    \n            if ( dataOffset + tagSize > dataView.byteLength ) {\n                Base.log('Invalid Exif data: Invalid data offset.');\n                return;\n            }\n    \n            if ( length === 1 ) {\n                return tagType.getValue( dataView, dataOffset, littleEndian );\n            }\n    \n            values = [];\n    \n            for ( i = 0; i < length; i += 1 ) {\n                values[ i ] = tagType.getValue( dataView,\n                        dataOffset + i * tagType.size, littleEndian );\n            }\n    \n            if ( tagType.ascii ) {\n                str = '';\n    \n                // Concatenate the chars:\n                for ( i = 0; i < values.length; i += 1 ) {\n                    c = values[ i ];\n    \n                    // Ignore the terminating NULL byte(s):\n                    if ( c === '\\u0000' ) {\n                        break;\n                    }\n                    str += c;\n                }\n    \n                return str;\n            }\n            return values;\n        };\n    \n        EXIF.parseExifTag = function( dataView, tiffOffset, offset, littleEndian,\n                data ) {\n    \n            var tag = dataView.getUint16( offset, littleEndian );\n            data.exif[ tag ] = EXIF.getExifValue( dataView, tiffOffset, offset,\n                    dataView.getUint16( offset + 2, littleEndian ),    // tag type\n                    dataView.getUint32( offset + 4, littleEndian ),    // tag length\n                    littleEndian );\n        };\n    \n        EXIF.parseExifTags = function( dataView, tiffOffset, dirOffset,\n                littleEndian, data ) {\n    \n            var tagsNumber, dirEndOffset, i;\n    \n            if ( dirOffset + 6 > dataView.byteLength ) {\n                Base.log('Invalid Exif data: Invalid directory offset.');\n                return;\n            }\n    \n            tagsNumber = dataView.getUint16( dirOffset, littleEndian );\n            dirEndOffset = dirOffset + 2 + 12 * tagsNumber;\n    \n            if ( dirEndOffset + 4 > dataView.byteLength ) {\n                Base.log('Invalid Exif data: Invalid directory size.');\n                return;\n            }\n    \n            for ( i = 0; i < tagsNumber; i += 1 ) {\n                this.parseExifTag( dataView, tiffOffset,\n                        dirOffset + 2 + 12 * i,    // tag offset\n                        littleEndian, data );\n            }\n    \n            // Return the offset to the next directory:\n            return dataView.getUint32( dirEndOffset, littleEndian );\n        };\n    \n        // EXIF.getExifThumbnail = function(dataView, offset, length) {\n        //     var hexData,\n        //         i,\n        //         b;\n        //     if (!length || offset + length > dataView.byteLength) {\n        //         Base.log('Invalid Exif data: Invalid thumbnail data.');\n        //         return;\n        //     }\n        //     hexData = [];\n        //     for (i = 0; i < length; i += 1) {\n        //         b = dataView.getUint8(offset + i);\n        //         hexData.push((b < 16 ? '0' : '') + b.toString(16));\n        //     }\n        //     return 'data:image/jpeg,%' + hexData.join('%');\n        // };\n    \n        EXIF.parseExifData = function( dataView, offset, length, data ) {\n    \n            var tiffOffset = offset + 10,\n                littleEndian, dirOffset;\n    \n            // Check for the ASCII code for \"Exif\" (0x45786966):\n            if ( dataView.getUint32( offset + 4 ) !== 0x45786966 ) {\n                // No Exif data, might be XMP data instead\n                return;\n            }\n            if ( tiffOffset + 8 > dataView.byteLength ) {\n                Base.log('Invalid Exif data: Invalid segment size.');\n                return;\n            }\n    \n            // Check for the two null bytes:\n            if ( dataView.getUint16( offset + 8 ) !== 0x0000 ) {\n                Base.log('Invalid Exif data: Missing byte alignment offset.');\n                return;\n            }\n    \n            // Check the byte alignment:\n            switch ( dataView.getUint16( tiffOffset ) ) {\n                case 0x4949:\n                    littleEndian = true;\n                    break;\n    \n                case 0x4D4D:\n                    littleEndian = false;\n                    break;\n    \n                default:\n                    Base.log('Invalid Exif data: Invalid byte alignment marker.');\n                    return;\n            }\n    \n            // Check for the TIFF tag marker (0x002A):\n            if ( dataView.getUint16( tiffOffset + 2, littleEndian ) !== 0x002A ) {\n                Base.log('Invalid Exif data: Missing TIFF marker.');\n                return;\n            }\n    \n            // Retrieve the directory offset bytes, usually 0x00000008 or 8 decimal:\n            dirOffset = dataView.getUint32( tiffOffset + 4, littleEndian );\n            // Create the exif object to store the tags:\n            data.exif = new EXIF.ExifMap();\n            // Parse the tags of the main image directory and retrieve the\n            // offset to the next directory, usually the thumbnail directory:\n            dirOffset = EXIF.parseExifTags( dataView, tiffOffset,\n                    tiffOffset + dirOffset, littleEndian, data );\n    \n            // 尝试读取缩略图\n            // if ( dirOffset ) {\n            //     thumbnailData = {exif: {}};\n            //     dirOffset = EXIF.parseExifTags(\n            //         dataView,\n            //         tiffOffset,\n            //         tiffOffset + dirOffset,\n            //         littleEndian,\n            //         thumbnailData\n            //     );\n    \n            //     // Check for JPEG Thumbnail offset:\n            //     if (thumbnailData.exif[0x0201]) {\n            //         data.exif.Thumbnail = EXIF.getExifThumbnail(\n            //             dataView,\n            //             tiffOffset + thumbnailData.exif[0x0201],\n            //             thumbnailData.exif[0x0202] // Thumbnail data length\n            //         );\n            //     }\n            // }\n        };\n    \n        ImageMeta.parsers[ 0xffe1 ].push( EXIF.parseExifData );\n        return EXIF;\n    });\n    /**\n     * 这个方式性能不行，但是可以解决android里面的toDataUrl的bug\n     * android里面toDataUrl('image/jpege')得到的结果却是png.\n     *\n     * 所以这里没辙，只能借助这个工具\n     * @fileOverview jpeg encoder\n     */\n    define('runtime/html5/jpegencoder',[], function( require, exports, module ) {\n    \n        /*\n          Copyright (c) 2008, Adobe Systems Incorporated\n          All rights reserved.\n    \n          Redistribution and use in source and binary forms, with or without\n          modification, are permitted provided that the following conditions are\n          met:\n    \n          * Redistributions of source code must retain the above copyright notice,\n            this list of conditions and the following disclaimer.\n    \n          * Redistributions in binary form must reproduce the above copyright\n            notice, this list of conditions and the following disclaimer in the\n            documentation and/or other materials provided with the distribution.\n    \n          * Neither the name of Adobe Systems Incorporated nor the names of its\n            contributors may be used to endorse or promote products derived from\n            this software without specific prior written permission.\n    \n          THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS\n          IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,\n          THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\n          PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR\n          CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\n          EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\n          PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n          PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n          LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n          NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n          SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n        */\n        /*\n        JPEG encoder ported to JavaScript and optimized by Andreas Ritter, www.bytestrom.eu, 11/2009\n    \n        Basic GUI blocking jpeg encoder\n        */\n    \n        function JPEGEncoder(quality) {\n          var self = this;\n            var fround = Math.round;\n            var ffloor = Math.floor;\n            var YTable = new Array(64);\n            var UVTable = new Array(64);\n            var fdtbl_Y = new Array(64);\n            var fdtbl_UV = new Array(64);\n            var YDC_HT;\n            var UVDC_HT;\n            var YAC_HT;\n            var UVAC_HT;\n    \n            var bitcode = new Array(65535);\n            var category = new Array(65535);\n            var outputfDCTQuant = new Array(64);\n            var DU = new Array(64);\n            var byteout = [];\n            var bytenew = 0;\n            var bytepos = 7;\n    \n            var YDU = new Array(64);\n            var UDU = new Array(64);\n            var VDU = new Array(64);\n            var clt = new Array(256);\n            var RGB_YUV_TABLE = new Array(2048);\n            var currentQuality;\n    \n            var ZigZag = [\n                     0, 1, 5, 6,14,15,27,28,\n                     2, 4, 7,13,16,26,29,42,\n                     3, 8,12,17,25,30,41,43,\n                     9,11,18,24,31,40,44,53,\n                    10,19,23,32,39,45,52,54,\n                    20,22,33,38,46,51,55,60,\n                    21,34,37,47,50,56,59,61,\n                    35,36,48,49,57,58,62,63\n                ];\n    \n            var std_dc_luminance_nrcodes = [0,0,1,5,1,1,1,1,1,1,0,0,0,0,0,0,0];\n            var std_dc_luminance_values = [0,1,2,3,4,5,6,7,8,9,10,11];\n            var std_ac_luminance_nrcodes = [0,0,2,1,3,3,2,4,3,5,5,4,4,0,0,1,0x7d];\n            var std_ac_luminance_values = [\n                    0x01,0x02,0x03,0x00,0x04,0x11,0x05,0x12,\n                    0x21,0x31,0x41,0x06,0x13,0x51,0x61,0x07,\n                    0x22,0x71,0x14,0x32,0x81,0x91,0xa1,0x08,\n                    0x23,0x42,0xb1,0xc1,0x15,0x52,0xd1,0xf0,\n                    0x24,0x33,0x62,0x72,0x82,0x09,0x0a,0x16,\n                    0x17,0x18,0x19,0x1a,0x25,0x26,0x27,0x28,\n                    0x29,0x2a,0x34,0x35,0x36,0x37,0x38,0x39,\n                    0x3a,0x43,0x44,0x45,0x46,0x47,0x48,0x49,\n                    0x4a,0x53,0x54,0x55,0x56,0x57,0x58,0x59,\n                    0x5a,0x63,0x64,0x65,0x66,0x67,0x68,0x69,\n                    0x6a,0x73,0x74,0x75,0x76,0x77,0x78,0x79,\n                    0x7a,0x83,0x84,0x85,0x86,0x87,0x88,0x89,\n                    0x8a,0x92,0x93,0x94,0x95,0x96,0x97,0x98,\n                    0x99,0x9a,0xa2,0xa3,0xa4,0xa5,0xa6,0xa7,\n                    0xa8,0xa9,0xaa,0xb2,0xb3,0xb4,0xb5,0xb6,\n                    0xb7,0xb8,0xb9,0xba,0xc2,0xc3,0xc4,0xc5,\n                    0xc6,0xc7,0xc8,0xc9,0xca,0xd2,0xd3,0xd4,\n                    0xd5,0xd6,0xd7,0xd8,0xd9,0xda,0xe1,0xe2,\n                    0xe3,0xe4,0xe5,0xe6,0xe7,0xe8,0xe9,0xea,\n                    0xf1,0xf2,0xf3,0xf4,0xf5,0xf6,0xf7,0xf8,\n                    0xf9,0xfa\n                ];\n    \n            var std_dc_chrominance_nrcodes = [0,0,3,1,1,1,1,1,1,1,1,1,0,0,0,0,0];\n            var std_dc_chrominance_values = [0,1,2,3,4,5,6,7,8,9,10,11];\n            var std_ac_chrominance_nrcodes = [0,0,2,1,2,4,4,3,4,7,5,4,4,0,1,2,0x77];\n            var std_ac_chrominance_values = [\n                    0x00,0x01,0x02,0x03,0x11,0x04,0x05,0x21,\n                    0x31,0x06,0x12,0x41,0x51,0x07,0x61,0x71,\n                    0x13,0x22,0x32,0x81,0x08,0x14,0x42,0x91,\n                    0xa1,0xb1,0xc1,0x09,0x23,0x33,0x52,0xf0,\n                    0x15,0x62,0x72,0xd1,0x0a,0x16,0x24,0x34,\n                    0xe1,0x25,0xf1,0x17,0x18,0x19,0x1a,0x26,\n                    0x27,0x28,0x29,0x2a,0x35,0x36,0x37,0x38,\n                    0x39,0x3a,0x43,0x44,0x45,0x46,0x47,0x48,\n                    0x49,0x4a,0x53,0x54,0x55,0x56,0x57,0x58,\n                    0x59,0x5a,0x63,0x64,0x65,0x66,0x67,0x68,\n                    0x69,0x6a,0x73,0x74,0x75,0x76,0x77,0x78,\n                    0x79,0x7a,0x82,0x83,0x84,0x85,0x86,0x87,\n                    0x88,0x89,0x8a,0x92,0x93,0x94,0x95,0x96,\n                    0x97,0x98,0x99,0x9a,0xa2,0xa3,0xa4,0xa5,\n                    0xa6,0xa7,0xa8,0xa9,0xaa,0xb2,0xb3,0xb4,\n                    0xb5,0xb6,0xb7,0xb8,0xb9,0xba,0xc2,0xc3,\n                    0xc4,0xc5,0xc6,0xc7,0xc8,0xc9,0xca,0xd2,\n                    0xd3,0xd4,0xd5,0xd6,0xd7,0xd8,0xd9,0xda,\n                    0xe2,0xe3,0xe4,0xe5,0xe6,0xe7,0xe8,0xe9,\n                    0xea,0xf2,0xf3,0xf4,0xf5,0xf6,0xf7,0xf8,\n                    0xf9,0xfa\n                ];\n    \n            function initQuantTables(sf){\n                    var YQT = [\n                        16, 11, 10, 16, 24, 40, 51, 61,\n                        12, 12, 14, 19, 26, 58, 60, 55,\n                        14, 13, 16, 24, 40, 57, 69, 56,\n                        14, 17, 22, 29, 51, 87, 80, 62,\n                        18, 22, 37, 56, 68,109,103, 77,\n                        24, 35, 55, 64, 81,104,113, 92,\n                        49, 64, 78, 87,103,121,120,101,\n                        72, 92, 95, 98,112,100,103, 99\n                    ];\n    \n                    for (var i = 0; i < 64; i++) {\n                        var t = ffloor((YQT[i]*sf+50)/100);\n                        if (t < 1) {\n                            t = 1;\n                        } else if (t > 255) {\n                            t = 255;\n                        }\n                        YTable[ZigZag[i]] = t;\n                    }\n                    var UVQT = [\n                        17, 18, 24, 47, 99, 99, 99, 99,\n                        18, 21, 26, 66, 99, 99, 99, 99,\n                        24, 26, 56, 99, 99, 99, 99, 99,\n                        47, 66, 99, 99, 99, 99, 99, 99,\n                        99, 99, 99, 99, 99, 99, 99, 99,\n                        99, 99, 99, 99, 99, 99, 99, 99,\n                        99, 99, 99, 99, 99, 99, 99, 99,\n                        99, 99, 99, 99, 99, 99, 99, 99\n                    ];\n                    for (var j = 0; j < 64; j++) {\n                        var u = ffloor((UVQT[j]*sf+50)/100);\n                        if (u < 1) {\n                            u = 1;\n                        } else if (u > 255) {\n                            u = 255;\n                        }\n                        UVTable[ZigZag[j]] = u;\n                    }\n                    var aasf = [\n                        1.0, 1.387039845, 1.306562965, 1.175875602,\n                        1.0, 0.785694958, 0.541196100, 0.275899379\n                    ];\n                    var k = 0;\n                    for (var row = 0; row < 8; row++)\n                    {\n                        for (var col = 0; col < 8; col++)\n                        {\n                            fdtbl_Y[k]  = (1.0 / (YTable [ZigZag[k]] * aasf[row] * aasf[col] * 8.0));\n                            fdtbl_UV[k] = (1.0 / (UVTable[ZigZag[k]] * aasf[row] * aasf[col] * 8.0));\n                            k++;\n                        }\n                    }\n                }\n    \n                function computeHuffmanTbl(nrcodes, std_table){\n                    var codevalue = 0;\n                    var pos_in_table = 0;\n                    var HT = new Array();\n                    for (var k = 1; k <= 16; k++) {\n                        for (var j = 1; j <= nrcodes[k]; j++) {\n                            HT[std_table[pos_in_table]] = [];\n                            HT[std_table[pos_in_table]][0] = codevalue;\n                            HT[std_table[pos_in_table]][1] = k;\n                            pos_in_table++;\n                            codevalue++;\n                        }\n                        codevalue*=2;\n                    }\n                    return HT;\n                }\n    \n                function initHuffmanTbl()\n                {\n                    YDC_HT = computeHuffmanTbl(std_dc_luminance_nrcodes,std_dc_luminance_values);\n                    UVDC_HT = computeHuffmanTbl(std_dc_chrominance_nrcodes,std_dc_chrominance_values);\n                    YAC_HT = computeHuffmanTbl(std_ac_luminance_nrcodes,std_ac_luminance_values);\n                    UVAC_HT = computeHuffmanTbl(std_ac_chrominance_nrcodes,std_ac_chrominance_values);\n                }\n    \n                function initCategoryNumber()\n                {\n                    var nrlower = 1;\n                    var nrupper = 2;\n                    for (var cat = 1; cat <= 15; cat++) {\n                        //Positive numbers\n                        for (var nr = nrlower; nr<nrupper; nr++) {\n                            category[32767+nr] = cat;\n                            bitcode[32767+nr] = [];\n                            bitcode[32767+nr][1] = cat;\n                            bitcode[32767+nr][0] = nr;\n                        }\n                        //Negative numbers\n                        for (var nrneg =-(nrupper-1); nrneg<=-nrlower; nrneg++) {\n                            category[32767+nrneg] = cat;\n                            bitcode[32767+nrneg] = [];\n                            bitcode[32767+nrneg][1] = cat;\n                            bitcode[32767+nrneg][0] = nrupper-1+nrneg;\n                        }\n                        nrlower <<= 1;\n                        nrupper <<= 1;\n                    }\n                }\n    \n                function initRGBYUVTable() {\n                    for(var i = 0; i < 256;i++) {\n                        RGB_YUV_TABLE[i]            =  19595 * i;\n                        RGB_YUV_TABLE[(i+ 256)>>0]  =  38470 * i;\n                        RGB_YUV_TABLE[(i+ 512)>>0]  =   7471 * i + 0x8000;\n                        RGB_YUV_TABLE[(i+ 768)>>0]  = -11059 * i;\n                        RGB_YUV_TABLE[(i+1024)>>0]  = -21709 * i;\n                        RGB_YUV_TABLE[(i+1280)>>0]  =  32768 * i + 0x807FFF;\n                        RGB_YUV_TABLE[(i+1536)>>0]  = -27439 * i;\n                        RGB_YUV_TABLE[(i+1792)>>0]  = - 5329 * i;\n                    }\n                }\n    \n                // IO functions\n                function writeBits(bs)\n                {\n                    var value = bs[0];\n                    var posval = bs[1]-1;\n                    while ( posval >= 0 ) {\n                        if (value & (1 << posval) ) {\n                            bytenew |= (1 << bytepos);\n                        }\n                        posval--;\n                        bytepos--;\n                        if (bytepos < 0) {\n                            if (bytenew == 0xFF) {\n                                writeByte(0xFF);\n                                writeByte(0);\n                            }\n                            else {\n                                writeByte(bytenew);\n                            }\n                            bytepos=7;\n                            bytenew=0;\n                        }\n                    }\n                }\n    \n                function writeByte(value)\n                {\n                    byteout.push(clt[value]); // write char directly instead of converting later\n                }\n    \n                function writeWord(value)\n                {\n                    writeByte((value>>8)&0xFF);\n                    writeByte((value   )&0xFF);\n                }\n    \n                // DCT & quantization core\n                function fDCTQuant(data, fdtbl)\n                {\n                    var d0, d1, d2, d3, d4, d5, d6, d7;\n                    /* Pass 1: process rows. */\n                    var dataOff=0;\n                    var i;\n                    var I8 = 8;\n                    var I64 = 64;\n                    for (i=0; i<I8; ++i)\n                    {\n                        d0 = data[dataOff];\n                        d1 = data[dataOff+1];\n                        d2 = data[dataOff+2];\n                        d3 = data[dataOff+3];\n                        d4 = data[dataOff+4];\n                        d5 = data[dataOff+5];\n                        d6 = data[dataOff+6];\n                        d7 = data[dataOff+7];\n    \n                        var tmp0 = d0 + d7;\n                        var tmp7 = d0 - d7;\n                        var tmp1 = d1 + d6;\n                        var tmp6 = d1 - d6;\n                        var tmp2 = d2 + d5;\n                        var tmp5 = d2 - d5;\n                        var tmp3 = d3 + d4;\n                        var tmp4 = d3 - d4;\n    \n                        /* Even part */\n                        var tmp10 = tmp0 + tmp3;    /* phase 2 */\n                        var tmp13 = tmp0 - tmp3;\n                        var tmp11 = tmp1 + tmp2;\n                        var tmp12 = tmp1 - tmp2;\n    \n                        data[dataOff] = tmp10 + tmp11; /* phase 3 */\n                        data[dataOff+4] = tmp10 - tmp11;\n    \n                        var z1 = (tmp12 + tmp13) * 0.707106781; /* c4 */\n                        data[dataOff+2] = tmp13 + z1; /* phase 5 */\n                        data[dataOff+6] = tmp13 - z1;\n    \n                        /* Odd part */\n                        tmp10 = tmp4 + tmp5; /* phase 2 */\n                        tmp11 = tmp5 + tmp6;\n                        tmp12 = tmp6 + tmp7;\n    \n                        /* The rotator is modified from fig 4-8 to avoid extra negations. */\n                        var z5 = (tmp10 - tmp12) * 0.382683433; /* c6 */\n                        var z2 = 0.541196100 * tmp10 + z5; /* c2-c6 */\n                        var z4 = 1.306562965 * tmp12 + z5; /* c2+c6 */\n                        var z3 = tmp11 * 0.707106781; /* c4 */\n    \n                        var z11 = tmp7 + z3;    /* phase 5 */\n                        var z13 = tmp7 - z3;\n    \n                        data[dataOff+5] = z13 + z2; /* phase 6 */\n                        data[dataOff+3] = z13 - z2;\n                        data[dataOff+1] = z11 + z4;\n                        data[dataOff+7] = z11 - z4;\n    \n                        dataOff += 8; /* advance pointer to next row */\n                    }\n    \n                    /* Pass 2: process columns. */\n                    dataOff = 0;\n                    for (i=0; i<I8; ++i)\n                    {\n                        d0 = data[dataOff];\n                        d1 = data[dataOff + 8];\n                        d2 = data[dataOff + 16];\n                        d3 = data[dataOff + 24];\n                        d4 = data[dataOff + 32];\n                        d5 = data[dataOff + 40];\n                        d6 = data[dataOff + 48];\n                        d7 = data[dataOff + 56];\n    \n                        var tmp0p2 = d0 + d7;\n                        var tmp7p2 = d0 - d7;\n                        var tmp1p2 = d1 + d6;\n                        var tmp6p2 = d1 - d6;\n                        var tmp2p2 = d2 + d5;\n                        var tmp5p2 = d2 - d5;\n                        var tmp3p2 = d3 + d4;\n                        var tmp4p2 = d3 - d4;\n    \n                        /* Even part */\n                        var tmp10p2 = tmp0p2 + tmp3p2;  /* phase 2 */\n                        var tmp13p2 = tmp0p2 - tmp3p2;\n                        var tmp11p2 = tmp1p2 + tmp2p2;\n                        var tmp12p2 = tmp1p2 - tmp2p2;\n    \n                        data[dataOff] = tmp10p2 + tmp11p2; /* phase 3 */\n                        data[dataOff+32] = tmp10p2 - tmp11p2;\n    \n                        var z1p2 = (tmp12p2 + tmp13p2) * 0.707106781; /* c4 */\n                        data[dataOff+16] = tmp13p2 + z1p2; /* phase 5 */\n                        data[dataOff+48] = tmp13p2 - z1p2;\n    \n                        /* Odd part */\n                        tmp10p2 = tmp4p2 + tmp5p2; /* phase 2 */\n                        tmp11p2 = tmp5p2 + tmp6p2;\n                        tmp12p2 = tmp6p2 + tmp7p2;\n    \n                        /* The rotator is modified from fig 4-8 to avoid extra negations. */\n                        var z5p2 = (tmp10p2 - tmp12p2) * 0.382683433; /* c6 */\n                        var z2p2 = 0.541196100 * tmp10p2 + z5p2; /* c2-c6 */\n                        var z4p2 = 1.306562965 * tmp12p2 + z5p2; /* c2+c6 */\n                        var z3p2 = tmp11p2 * 0.707106781; /* c4 */\n    \n                        var z11p2 = tmp7p2 + z3p2;  /* phase 5 */\n                        var z13p2 = tmp7p2 - z3p2;\n    \n                        data[dataOff+40] = z13p2 + z2p2; /* phase 6 */\n                        data[dataOff+24] = z13p2 - z2p2;\n                        data[dataOff+ 8] = z11p2 + z4p2;\n                        data[dataOff+56] = z11p2 - z4p2;\n    \n                        dataOff++; /* advance pointer to next column */\n                    }\n    \n                    // Quantize/descale the coefficients\n                    var fDCTQuant;\n                    for (i=0; i<I64; ++i)\n                    {\n                        // Apply the quantization and scaling factor & Round to nearest integer\n                        fDCTQuant = data[i]*fdtbl[i];\n                        outputfDCTQuant[i] = (fDCTQuant > 0.0) ? ((fDCTQuant + 0.5)|0) : ((fDCTQuant - 0.5)|0);\n                        //outputfDCTQuant[i] = fround(fDCTQuant);\n    \n                    }\n                    return outputfDCTQuant;\n                }\n    \n                function writeAPP0()\n                {\n                    writeWord(0xFFE0); // marker\n                    writeWord(16); // length\n                    writeByte(0x4A); // J\n                    writeByte(0x46); // F\n                    writeByte(0x49); // I\n                    writeByte(0x46); // F\n                    writeByte(0); // = \"JFIF\",'\\0'\n                    writeByte(1); // versionhi\n                    writeByte(1); // versionlo\n                    writeByte(0); // xyunits\n                    writeWord(1); // xdensity\n                    writeWord(1); // ydensity\n                    writeByte(0); // thumbnwidth\n                    writeByte(0); // thumbnheight\n                }\n    \n                function writeSOF0(width, height)\n                {\n                    writeWord(0xFFC0); // marker\n                    writeWord(17);   // length, truecolor YUV JPG\n                    writeByte(8);    // precision\n                    writeWord(height);\n                    writeWord(width);\n                    writeByte(3);    // nrofcomponents\n                    writeByte(1);    // IdY\n                    writeByte(0x11); // HVY\n                    writeByte(0);    // QTY\n                    writeByte(2);    // IdU\n                    writeByte(0x11); // HVU\n                    writeByte(1);    // QTU\n                    writeByte(3);    // IdV\n                    writeByte(0x11); // HVV\n                    writeByte(1);    // QTV\n                }\n    \n                function writeDQT()\n                {\n                    writeWord(0xFFDB); // marker\n                    writeWord(132);    // length\n                    writeByte(0);\n                    for (var i=0; i<64; i++) {\n                        writeByte(YTable[i]);\n                    }\n                    writeByte(1);\n                    for (var j=0; j<64; j++) {\n                        writeByte(UVTable[j]);\n                    }\n                }\n    \n                function writeDHT()\n                {\n                    writeWord(0xFFC4); // marker\n                    writeWord(0x01A2); // length\n    \n                    writeByte(0); // HTYDCinfo\n                    for (var i=0; i<16; i++) {\n                        writeByte(std_dc_luminance_nrcodes[i+1]);\n                    }\n                    for (var j=0; j<=11; j++) {\n                        writeByte(std_dc_luminance_values[j]);\n                    }\n    \n                    writeByte(0x10); // HTYACinfo\n                    for (var k=0; k<16; k++) {\n                        writeByte(std_ac_luminance_nrcodes[k+1]);\n                    }\n                    for (var l=0; l<=161; l++) {\n                        writeByte(std_ac_luminance_values[l]);\n                    }\n    \n                    writeByte(1); // HTUDCinfo\n                    for (var m=0; m<16; m++) {\n                        writeByte(std_dc_chrominance_nrcodes[m+1]);\n                    }\n                    for (var n=0; n<=11; n++) {\n                        writeByte(std_dc_chrominance_values[n]);\n                    }\n    \n                    writeByte(0x11); // HTUACinfo\n                    for (var o=0; o<16; o++) {\n                        writeByte(std_ac_chrominance_nrcodes[o+1]);\n                    }\n                    for (var p=0; p<=161; p++) {\n                        writeByte(std_ac_chrominance_values[p]);\n                    }\n                }\n    \n                function writeSOS()\n                {\n                    writeWord(0xFFDA); // marker\n                    writeWord(12); // length\n                    writeByte(3); // nrofcomponents\n                    writeByte(1); // IdY\n                    writeByte(0); // HTY\n                    writeByte(2); // IdU\n                    writeByte(0x11); // HTU\n                    writeByte(3); // IdV\n                    writeByte(0x11); // HTV\n                    writeByte(0); // Ss\n                    writeByte(0x3f); // Se\n                    writeByte(0); // Bf\n                }\n    \n                function processDU(CDU, fdtbl, DC, HTDC, HTAC){\n                    var EOB = HTAC[0x00];\n                    var M16zeroes = HTAC[0xF0];\n                    var pos;\n                    var I16 = 16;\n                    var I63 = 63;\n                    var I64 = 64;\n                    var DU_DCT = fDCTQuant(CDU, fdtbl);\n                    //ZigZag reorder\n                    for (var j=0;j<I64;++j) {\n                        DU[ZigZag[j]]=DU_DCT[j];\n                    }\n                    var Diff = DU[0] - DC; DC = DU[0];\n                    //Encode DC\n                    if (Diff==0) {\n                        writeBits(HTDC[0]); // Diff might be 0\n                    } else {\n                        pos = 32767+Diff;\n                        writeBits(HTDC[category[pos]]);\n                        writeBits(bitcode[pos]);\n                    }\n                    //Encode ACs\n                    var end0pos = 63; // was const... which is crazy\n                    for (; (end0pos>0)&&(DU[end0pos]==0); end0pos--) {};\n                    //end0pos = first element in reverse order !=0\n                    if ( end0pos == 0) {\n                        writeBits(EOB);\n                        return DC;\n                    }\n                    var i = 1;\n                    var lng;\n                    while ( i <= end0pos ) {\n                        var startpos = i;\n                        for (; (DU[i]==0) && (i<=end0pos); ++i) {}\n                        var nrzeroes = i-startpos;\n                        if ( nrzeroes >= I16 ) {\n                            lng = nrzeroes>>4;\n                            for (var nrmarker=1; nrmarker <= lng; ++nrmarker)\n                                writeBits(M16zeroes);\n                            nrzeroes = nrzeroes&0xF;\n                        }\n                        pos = 32767+DU[i];\n                        writeBits(HTAC[(nrzeroes<<4)+category[pos]]);\n                        writeBits(bitcode[pos]);\n                        i++;\n                    }\n                    if ( end0pos != I63 ) {\n                        writeBits(EOB);\n                    }\n                    return DC;\n                }\n    \n                function initCharLookupTable(){\n                    var sfcc = String.fromCharCode;\n                    for(var i=0; i < 256; i++){ ///// ACHTUNG // 255\n                        clt[i] = sfcc(i);\n                    }\n                }\n    \n                this.encode = function(image,quality) // image data object\n                {\n                    // var time_start = new Date().getTime();\n    \n                    if(quality) setQuality(quality);\n    \n                    // Initialize bit writer\n                    byteout = new Array();\n                    bytenew=0;\n                    bytepos=7;\n    \n                    // Add JPEG headers\n                    writeWord(0xFFD8); // SOI\n                    writeAPP0();\n                    writeDQT();\n                    writeSOF0(image.width,image.height);\n                    writeDHT();\n                    writeSOS();\n    \n    \n                    // Encode 8x8 macroblocks\n                    var DCY=0;\n                    var DCU=0;\n                    var DCV=0;\n    \n                    bytenew=0;\n                    bytepos=7;\n    \n    \n                    this.encode.displayName = \"_encode_\";\n    \n                    var imageData = image.data;\n                    var width = image.width;\n                    var height = image.height;\n    \n                    var quadWidth = width*4;\n                    var tripleWidth = width*3;\n    \n                    var x, y = 0;\n                    var r, g, b;\n                    var start,p, col,row,pos;\n                    while(y < height){\n                        x = 0;\n                        while(x < quadWidth){\n                        start = quadWidth * y + x;\n                        p = start;\n                        col = -1;\n                        row = 0;\n    \n                        for(pos=0; pos < 64; pos++){\n                            row = pos >> 3;// /8\n                            col = ( pos & 7 ) * 4; // %8\n                            p = start + ( row * quadWidth ) + col;\n    \n                            if(y+row >= height){ // padding bottom\n                                p-= (quadWidth*(y+1+row-height));\n                            }\n    \n                            if(x+col >= quadWidth){ // padding right\n                                p-= ((x+col) - quadWidth +4)\n                            }\n    \n                            r = imageData[ p++ ];\n                            g = imageData[ p++ ];\n                            b = imageData[ p++ ];\n    \n    \n                            /* // calculate YUV values dynamically\n                            YDU[pos]=((( 0.29900)*r+( 0.58700)*g+( 0.11400)*b))-128; //-0x80\n                            UDU[pos]=(((-0.16874)*r+(-0.33126)*g+( 0.50000)*b));\n                            VDU[pos]=((( 0.50000)*r+(-0.41869)*g+(-0.08131)*b));\n                            */\n    \n                            // use lookup table (slightly faster)\n                            YDU[pos] = ((RGB_YUV_TABLE[r]             + RGB_YUV_TABLE[(g +  256)>>0] + RGB_YUV_TABLE[(b +  512)>>0]) >> 16)-128;\n                            UDU[pos] = ((RGB_YUV_TABLE[(r +  768)>>0] + RGB_YUV_TABLE[(g + 1024)>>0] + RGB_YUV_TABLE[(b + 1280)>>0]) >> 16)-128;\n                            VDU[pos] = ((RGB_YUV_TABLE[(r + 1280)>>0] + RGB_YUV_TABLE[(g + 1536)>>0] + RGB_YUV_TABLE[(b + 1792)>>0]) >> 16)-128;\n    \n                        }\n    \n                        DCY = processDU(YDU, fdtbl_Y, DCY, YDC_HT, YAC_HT);\n                        DCU = processDU(UDU, fdtbl_UV, DCU, UVDC_HT, UVAC_HT);\n                        DCV = processDU(VDU, fdtbl_UV, DCV, UVDC_HT, UVAC_HT);\n                        x+=32;\n                        }\n                        y+=8;\n                    }\n    \n    \n                    ////////////////////////////////////////////////////////////////\n    \n                    // Do the bit alignment of the EOI marker\n                    if ( bytepos >= 0 ) {\n                        var fillbits = [];\n                        fillbits[1] = bytepos+1;\n                        fillbits[0] = (1<<(bytepos+1))-1;\n                        writeBits(fillbits);\n                    }\n    \n                    writeWord(0xFFD9); //EOI\n    \n                    var jpegDataUri = 'data:image/jpeg;base64,' + btoa(byteout.join(''));\n    \n                    byteout = [];\n    \n                    // benchmarking\n                    // var duration = new Date().getTime() - time_start;\n                    // console.log('Encoding time: '+ currentQuality + 'ms');\n                    //\n    \n                    return jpegDataUri\n            }\n    \n            function setQuality(quality){\n                if (quality <= 0) {\n                    quality = 1;\n                }\n                if (quality > 100) {\n                    quality = 100;\n                }\n    \n                if(currentQuality == quality) return // don't recalc if unchanged\n    \n                var sf = 0;\n                if (quality < 50) {\n                    sf = Math.floor(5000 / quality);\n                } else {\n                    sf = Math.floor(200 - quality*2);\n                }\n    \n                initQuantTables(sf);\n                currentQuality = quality;\n                // console.log('Quality set to: '+quality +'%');\n            }\n    \n            function init(){\n                // var time_start = new Date().getTime();\n                if(!quality) quality = 50;\n                // Create tables\n                initCharLookupTable()\n                initHuffmanTbl();\n                initCategoryNumber();\n                initRGBYUVTable();\n    \n                setQuality(quality);\n                // var duration = new Date().getTime() - time_start;\n                // console.log('Initialization '+ duration + 'ms');\n            }\n    \n            init();\n    \n        };\n    \n        JPEGEncoder.encode = function( data, quality ) {\n            var encoder = new JPEGEncoder( quality );\n    \n            return encoder.encode( data );\n        }\n    \n        return JPEGEncoder;\n    });\n    /**\n     * @fileOverview Fix android canvas.toDataUrl bug.\n     */\n    define('runtime/html5/androidpatch',[\n        'runtime/html5/util',\n        'runtime/html5/jpegencoder',\n        'base'\n    ], function( Util, encoder, Base ) {\n        var origin = Util.canvasToDataUrl,\n            supportJpeg;\n    \n        Util.canvasToDataUrl = function( canvas, type, quality ) {\n            var ctx, w, h, fragement, parts;\n    \n            // 非android手机直接跳过。\n            if ( !Base.os.android ) {\n                return origin.apply( null, arguments );\n            }\n    \n            // 检测是否canvas支持jpeg导出，根据数据格式来判断。\n            // JPEG 前两位分别是：255, 216\n            if ( type === 'image/jpeg' && typeof supportJpeg === 'undefined' ) {\n                fragement = origin.apply( null, arguments );\n    \n                parts = fragement.split(',');\n    \n                if ( ~parts[ 0 ].indexOf('base64') ) {\n                    fragement = atob( parts[ 1 ] );\n                } else {\n                    fragement = decodeURIComponent( parts[ 1 ] );\n                }\n    \n                fragement = fragement.substring( 0, 2 );\n    \n                supportJpeg = fragement.charCodeAt( 0 ) === 255 &&\n                        fragement.charCodeAt( 1 ) === 216;\n            }\n    \n            // 只有在android环境下才修复\n            if ( type === 'image/jpeg' && !supportJpeg ) {\n                w = canvas.width;\n                h = canvas.height;\n                ctx = canvas.getContext('2d');\n    \n                return encoder.encode( ctx.getImageData( 0, 0, w, h ), quality );\n            }\n    \n            return origin.apply( null, arguments );\n        };\n    });\n    /**\n     * @fileOverview Image\n     */\n    define('runtime/html5/image',[\n        'base',\n        'runtime/html5/runtime',\n        'runtime/html5/util'\n    ], function( Base, Html5Runtime, Util ) {\n    \n        var BLANK = 'data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs%3D';\n    \n        return Html5Runtime.register( 'Image', {\n    \n            // flag: 标记是否被修改过。\n            modified: false,\n    \n            init: function() {\n                var me = this,\n                    img = new Image();\n    \n                img.onload = function() {\n    \n                    me._info = {\n                        type: me.type,\n                        width: this.width,\n                        height: this.height\n                    };\n    \n                    //debugger;\n    \n                    // 读取meta信息。\n                    if ( !me._metas && 'image/jpeg' === me.type ) {\n                        Util.parseMeta( me._blob, function( error, ret ) {\n                            me._metas = ret;\n                            me.owner.trigger('load');\n                        });\n                    } else {\n                        me.owner.trigger('load');\n                    }\n                };\n    \n                img.onerror = function() {\n                    me.owner.trigger('error');\n                };\n    \n                me._img = img;\n            },\n    \n            loadFromBlob: function( blob ) {\n                var me = this,\n                    img = me._img;\n    \n                me._blob = blob;\n                me.type = blob.type;\n                img.src = Util.createObjectURL( blob.getSource() );\n                me.owner.once( 'load', function() {\n                    Util.revokeObjectURL( img.src );\n                });\n            },\n    \n            resize: function( width, height ) {\n                var canvas = this._canvas ||\n                        (this._canvas = document.createElement('canvas'));\n    \n                this._resize( this._img, canvas, width, height );\n                this._blob = null;    // 没用了，可以删掉了。\n                this.modified = true;\n                this.owner.trigger( 'complete', 'resize' );\n            },\n    \n            crop: function( x, y, w, h, s ) {\n                var cvs = this._canvas ||\n                        (this._canvas = document.createElement('canvas')),\n                    opts = this.options,\n                    img = this._img,\n                    iw = img.naturalWidth,\n                    ih = img.naturalHeight,\n                    orientation = this.getOrientation();\n    \n                s = s || 1;\n    \n                // todo 解决 orientation 的问题。\n                // values that require 90 degree rotation\n                // if ( ~[ 5, 6, 7, 8 ].indexOf( orientation ) ) {\n    \n                //     switch ( orientation ) {\n                //         case 6:\n                //             tmp = x;\n                //             x = y;\n                //             y = iw * s - tmp - w;\n                //             console.log(ih * s, tmp, w)\n                //             break;\n                //     }\n    \n                //     (w ^= h, h ^= w, w ^= h);\n                // }\n    \n                cvs.width = w;\n                cvs.height = h;\n    \n                opts.preserveHeaders || this._rotate2Orientaion( cvs, orientation );\n                this._renderImageToCanvas( cvs, img, -x, -y, iw * s, ih * s );\n    \n                this._blob = null;    // 没用了，可以删掉了。\n                this.modified = true;\n                this.owner.trigger( 'complete', 'crop' );\n            },\n    \n            getAsBlob: function( type ) {\n                var blob = this._blob,\n                    opts = this.options,\n                    canvas;\n    \n                type = type || this.type;\n    \n                // blob需要重新生成。\n                if ( this.modified || this.type !== type ) {\n                    canvas = this._canvas;\n    \n                    if ( type === 'image/jpeg' ) {\n    \n                        blob = Util.canvasToDataUrl( canvas, type, opts.quality );\n    \n                        if ( opts.preserveHeaders && this._metas &&\n                                this._metas.imageHead ) {\n    \n                            blob = Util.dataURL2ArrayBuffer( blob );\n                            blob = Util.updateImageHead( blob,\n                                    this._metas.imageHead );\n                            blob = Util.arrayBufferToBlob( blob, type );\n                            return blob;\n                        }\n                    } else {\n                        blob = Util.canvasToDataUrl( canvas, type );\n                    }\n    \n                    blob = Util.dataURL2Blob( blob );\n                }\n    \n                return blob;\n            },\n    \n            getAsDataUrl: function( type ) {\n                var opts = this.options;\n    \n                type = type || this.type;\n    \n                if ( type === 'image/jpeg' ) {\n                    return Util.canvasToDataUrl( this._canvas, type, opts.quality );\n                } else {\n                    return this._canvas.toDataURL( type );\n                }\n            },\n    \n            getOrientation: function() {\n                return this._metas && this._metas.exif &&\n                        this._metas.exif.get('Orientation') || 1;\n            },\n    \n            info: function( val ) {\n    \n                // setter\n                if ( val ) {\n                    this._info = val;\n                    return this;\n                }\n    \n                // getter\n                return this._info;\n            },\n    \n            meta: function( val ) {\n    \n                // setter\n                if ( val ) {\n                    this._metas = val;\n                    return this;\n                }\n    \n                // getter\n                return this._metas;\n            },\n    \n            destroy: function() {\n                var canvas = this._canvas;\n                this._img.onload = null;\n    \n                if ( canvas ) {\n                    canvas.getContext('2d')\n                            .clearRect( 0, 0, canvas.width, canvas.height );\n                    canvas.width = canvas.height = 0;\n                    this._canvas = null;\n                }\n    \n                // 释放内存。非常重要，否则释放不了image的内存。\n                this._img.src = BLANK;\n                this._img = this._blob = null;\n            },\n    \n            _resize: function( img, cvs, width, height ) {\n                var opts = this.options,\n                    naturalWidth = img.width,\n                    naturalHeight = img.height,\n                    orientation = this.getOrientation(),\n                    scale, w, h, x, y;\n    \n                // values that require 90 degree rotation\n                if ( ~[ 5, 6, 7, 8 ].indexOf( orientation ) ) {\n    \n                    // 交换width, height的值。\n                    width ^= height;\n                    height ^= width;\n                    width ^= height;\n                }\n    \n                scale = Math[ opts.crop ? 'max' : 'min' ]( width / naturalWidth,\n                        height / naturalHeight );\n    \n                // 不允许放大。\n                opts.allowMagnify || (scale = Math.min( 1, scale ));\n    \n                w = naturalWidth * scale;\n                h = naturalHeight * scale;\n    \n                if ( opts.crop ) {\n                    cvs.width = width;\n                    cvs.height = height;\n                } else {\n                    cvs.width = w;\n                    cvs.height = h;\n                }\n    \n                x = (cvs.width - w) / 2;\n                y = (cvs.height - h) / 2;\n    \n                opts.preserveHeaders || this._rotate2Orientaion( cvs, orientation );\n    \n                this._renderImageToCanvas( cvs, img, x, y, w, h );\n            },\n    \n            _rotate2Orientaion: function( canvas, orientation ) {\n                var width = canvas.width,\n                    height = canvas.height,\n                    ctx = canvas.getContext('2d');\n    \n                switch ( orientation ) {\n                    case 5:\n                    case 6:\n                    case 7:\n                    case 8:\n                        canvas.width = height;\n                        canvas.height = width;\n                        break;\n                }\n    \n                switch ( orientation ) {\n                    case 2:    // horizontal flip\n                        ctx.translate( width, 0 );\n                        ctx.scale( -1, 1 );\n                        break;\n    \n                    case 3:    // 180 rotate left\n                        ctx.translate( width, height );\n                        ctx.rotate( Math.PI );\n                        break;\n    \n                    case 4:    // vertical flip\n                        ctx.translate( 0, height );\n                        ctx.scale( 1, -1 );\n                        break;\n    \n                    case 5:    // vertical flip + 90 rotate right\n                        ctx.rotate( 0.5 * Math.PI );\n                        ctx.scale( 1, -1 );\n                        break;\n    \n                    case 6:    // 90 rotate right\n                        ctx.rotate( 0.5 * Math.PI );\n                        ctx.translate( 0, -height );\n                        break;\n    \n                    case 7:    // horizontal flip + 90 rotate right\n                        ctx.rotate( 0.5 * Math.PI );\n                        ctx.translate( width, -height );\n                        ctx.scale( -1, 1 );\n                        break;\n    \n                    case 8:    // 90 rotate left\n                        ctx.rotate( -0.5 * Math.PI );\n                        ctx.translate( -width, 0 );\n                        break;\n                }\n            },\n    \n            // https://github.com/stomita/ios-imagefile-megapixel/\n            // blob/master/src/megapix-image.js\n            _renderImageToCanvas: (function() {\n    \n                // 如果不是ios, 不需要这么复杂！\n                if ( !Base.os.ios ) {\n                    return function( canvas ) {\n                        var args = Base.slice( arguments, 1 ),\n                            ctx = canvas.getContext('2d');\n    \n                        ctx.drawImage.apply( ctx, args );\n                    };\n                }\n    \n                /**\n                 * Detecting vertical squash in loaded image.\n                 * Fixes a bug which squash image vertically while drawing into\n                 * canvas for some images.\n                 */\n                function detectVerticalSquash( img, iw, ih ) {\n                    var canvas = document.createElement('canvas'),\n                        ctx = canvas.getContext('2d'),\n                        sy = 0,\n                        ey = ih,\n                        py = ih,\n                        data, alpha, ratio;\n    \n    \n                    canvas.width = 1;\n                    canvas.height = ih;\n                    ctx.drawImage( img, 0, 0 );\n                    data = ctx.getImageData( 0, 0, 1, ih ).data;\n    \n                    // search image edge pixel position in case\n                    // it is squashed vertically.\n                    while ( py > sy ) {\n                        alpha = data[ (py - 1) * 4 + 3 ];\n    \n                        if ( alpha === 0 ) {\n                            ey = py;\n                        } else {\n                            sy = py;\n                        }\n    \n                        py = (ey + sy) >> 1;\n                    }\n    \n                    ratio = (py / ih);\n                    return (ratio === 0) ? 1 : ratio;\n                }\n    \n                // fix ie7 bug\n                // http://stackoverflow.com/questions/11929099/\n                // html5-canvas-drawimage-ratio-bug-ios\n                if ( Base.os.ios >= 7 ) {\n                    return function( canvas, img, x, y, w, h ) {\n                        var iw = img.naturalWidth,\n                            ih = img.naturalHeight,\n                            vertSquashRatio = detectVerticalSquash( img, iw, ih );\n    \n                        return canvas.getContext('2d').drawImage( img, 0, 0,\n                                iw * vertSquashRatio, ih * vertSquashRatio,\n                                x, y, w, h );\n                    };\n                }\n    \n                /**\n                 * Detect subsampling in loaded image.\n                 * In iOS, larger images than 2M pixels may be\n                 * subsampled in rendering.\n                 */\n                function detectSubsampling( img ) {\n                    var iw = img.naturalWidth,\n                        ih = img.naturalHeight,\n                        canvas, ctx;\n    \n                    // subsampling may happen overmegapixel image\n                    if ( iw * ih > 1024 * 1024 ) {\n                        canvas = document.createElement('canvas');\n                        canvas.width = canvas.height = 1;\n                        ctx = canvas.getContext('2d');\n                        ctx.drawImage( img, -iw + 1, 0 );\n    \n                        // subsampled image becomes half smaller in rendering size.\n                        // check alpha channel value to confirm image is covering\n                        // edge pixel or not. if alpha value is 0\n                        // image is not covering, hence subsampled.\n                        return ctx.getImageData( 0, 0, 1, 1 ).data[ 3 ] === 0;\n                    } else {\n                        return false;\n                    }\n                }\n    \n    \n                return function( canvas, img, x, y, width, height ) {\n                    var iw = img.naturalWidth,\n                        ih = img.naturalHeight,\n                        ctx = canvas.getContext('2d'),\n                        subsampled = detectSubsampling( img ),\n                        doSquash = this.type === 'image/jpeg',\n                        d = 1024,\n                        sy = 0,\n                        dy = 0,\n                        tmpCanvas, tmpCtx, vertSquashRatio, dw, dh, sx, dx;\n    \n                    if ( subsampled ) {\n                        iw /= 2;\n                        ih /= 2;\n                    }\n    \n                    ctx.save();\n                    tmpCanvas = document.createElement('canvas');\n                    tmpCanvas.width = tmpCanvas.height = d;\n    \n                    tmpCtx = tmpCanvas.getContext('2d');\n                    vertSquashRatio = doSquash ?\n                            detectVerticalSquash( img, iw, ih ) : 1;\n    \n                    dw = Math.ceil( d * width / iw );\n                    dh = Math.ceil( d * height / ih / vertSquashRatio );\n    \n                    while ( sy < ih ) {\n                        sx = 0;\n                        dx = 0;\n                        while ( sx < iw ) {\n                            tmpCtx.clearRect( 0, 0, d, d );\n                            tmpCtx.drawImage( img, -sx, -sy );\n                            ctx.drawImage( tmpCanvas, 0, 0, d, d,\n                                    x + dx, y + dy, dw, dh );\n                            sx += d;\n                            dx += dw;\n                        }\n                        sy += d;\n                        dy += dh;\n                    }\n                    ctx.restore();\n                    tmpCanvas = tmpCtx = null;\n                };\n            })()\n        });\n    });\n    \n    /**\n     * @fileOverview Transport\n     * @todo 支持chunked传输，优势：\n     * 可以将大文件分成小块，挨个传输，可以提高大文件成功率，当失败的时候，也只需要重传那小部分，\n     * 而不需要重头再传一次。另外断点续传也需要用chunked方式。\n     */\n    define('runtime/html5/transport',[\n        'base',\n        'runtime/html5/runtime'\n    ], function( Base, Html5Runtime ) {\n    \n        var noop = Base.noop,\n            $ = Base.$;\n    \n        return Html5Runtime.register( 'Transport', {\n            init: function() {\n                this._status = 0;\n                this._response = null;\n            },\n    \n            send: function() {\n                var owner = this.owner,\n                    opts = this.options,\n                    xhr = this._initAjax(),\n                    blob = owner._blob,\n                    server = opts.server,\n                    formData, binary, fr;\n    \n                if ( opts.sendAsBinary ) {\n                    server += (/\\?/.test( server ) ? '&' : '?') +\n                            $.param( owner._formData );\n    \n                    binary = blob.getSource();\n                } else {\n                    formData = new FormData();\n                    $.each( owner._formData, function( k, v ) {\n                        formData.append( k, v );\n                    });\n    \n                    formData.append( opts.fileVal, blob.getSource(),\n                            opts.filename || owner._formData.name || '' );\n                }\n    \n                if ( opts.withCredentials && 'withCredentials' in xhr ) {\n                    xhr.open( opts.method, server, true );\n                    xhr.withCredentials = true;\n                } else {\n                    xhr.open( opts.method, server );\n                }\n    \n                this._setRequestHeader( xhr, opts.headers );\n    \n                if ( binary ) {\n                    // 强制设置成 content-type 为文件流。\n                    xhr.overrideMimeType &&\n                            xhr.overrideMimeType('application/octet-stream');\n    \n                    // android直接发送blob会导致服务端接收到的是空文件。\n                    // bug详情。\n                    // https://code.google.com/p/android/issues/detail?id=39882\n                    // 所以先用fileReader读取出来再通过arraybuffer的方式发送。\n                    if ( Base.os.android ) {\n                        fr = new FileReader();\n    \n                        fr.onload = function() {\n                            xhr.send( this.result );\n                            fr = fr.onload = null;\n                        };\n    \n                        fr.readAsArrayBuffer( binary );\n                    } else {\n                        xhr.send( binary );\n                    }\n                } else {\n                    xhr.send( formData );\n                }\n            },\n    \n            getResponse: function() {\n                return this._response;\n            },\n    \n            getResponseAsJson: function() {\n                return this._parseJson( this._response );\n            },\n    \n            getStatus: function() {\n                return this._status;\n            },\n    \n            abort: function() {\n                var xhr = this._xhr;\n    \n                if ( xhr ) {\n                    xhr.upload.onprogress = noop;\n                    xhr.onreadystatechange = noop;\n                    xhr.abort();\n    \n                    this._xhr = xhr = null;\n                }\n            },\n    \n            destroy: function() {\n                this.abort();\n            },\n    \n            _initAjax: function() {\n                var me = this,\n                    xhr = new XMLHttpRequest(),\n                    opts = this.options;\n    \n                if ( opts.withCredentials && !('withCredentials' in xhr) &&\n                        typeof XDomainRequest !== 'undefined' ) {\n                    xhr = new XDomainRequest();\n                }\n    \n                xhr.upload.onprogress = function( e ) {\n                    var percentage = 0;\n    \n                    if ( e.lengthComputable ) {\n                        percentage = e.loaded / e.total;\n                    }\n    \n                    return me.trigger( 'progress', percentage );\n                };\n    \n                xhr.onreadystatechange = function() {\n    \n                    if ( xhr.readyState !== 4 ) {\n                        return;\n                    }\n    \n                    xhr.upload.onprogress = noop;\n                    xhr.onreadystatechange = noop;\n                    me._xhr = null;\n                    me._status = xhr.status;\n    \n                    if ( xhr.status >= 200 && xhr.status < 300 ) {\n                        me._response = xhr.responseText;\n                        return me.trigger('load');\n                    } else if ( xhr.status >= 500 && xhr.status < 600 ) {\n                        me._response = xhr.responseText;\n                        return me.trigger( 'error', 'server' );\n                    }\n    \n    \n                    return me.trigger( 'error', me._status ? 'http' : 'abort' );\n                };\n    \n                me._xhr = xhr;\n                return xhr;\n            },\n    \n            _setRequestHeader: function( xhr, headers ) {\n                $.each( headers, function( key, val ) {\n                    xhr.setRequestHeader( key, val );\n                });\n            },\n    \n            _parseJson: function( str ) {\n                var json;\n    \n                try {\n                    json = JSON.parse( str );\n                } catch ( ex ) {\n                    json = {};\n                }\n    \n                return json;\n            }\n        });\n    });\n    /**\n     * @fileOverview  Transport flash实现\n     */\n    define('runtime/html5/md5',[\n        'runtime/html5/runtime'\n    ], function( FlashRuntime ) {\n    \n        /*\n         * Fastest md5 implementation around (JKM md5)\n         * Credits: Joseph Myers\n         *\n         * @see http://www.myersdaily.org/joseph/javascript/md5-text.html\n         * @see http://jsperf.com/md5-shootout/7\n         */\n    \n        /* this function is much faster,\n          so if possible we use it. Some IEs\n          are the only ones I know of that\n          need the idiotic second function,\n          generated by an if clause.  */\n        var add32 = function (a, b) {\n            return (a + b) & 0xFFFFFFFF;\n        },\n    \n        cmn = function (q, a, b, x, s, t) {\n            a = add32(add32(a, q), add32(x, t));\n            return add32((a << s) | (a >>> (32 - s)), b);\n        },\n    \n        ff = function (a, b, c, d, x, s, t) {\n            return cmn((b & c) | ((~b) & d), a, b, x, s, t);\n        },\n    \n        gg = function (a, b, c, d, x, s, t) {\n            return cmn((b & d) | (c & (~d)), a, b, x, s, t);\n        },\n    \n        hh = function (a, b, c, d, x, s, t) {\n            return cmn(b ^ c ^ d, a, b, x, s, t);\n        },\n    \n        ii = function (a, b, c, d, x, s, t) {\n            return cmn(c ^ (b | (~d)), a, b, x, s, t);\n        },\n    \n        md5cycle = function (x, k) {\n            var a = x[0],\n                b = x[1],\n                c = x[2],\n                d = x[3];\n    \n            a = ff(a, b, c, d, k[0], 7, -680876936);\n            d = ff(d, a, b, c, k[1], 12, -389564586);\n            c = ff(c, d, a, b, k[2], 17, 606105819);\n            b = ff(b, c, d, a, k[3], 22, -1044525330);\n            a = ff(a, b, c, d, k[4], 7, -176418897);\n            d = ff(d, a, b, c, k[5], 12, 1200080426);\n            c = ff(c, d, a, b, k[6], 17, -1473231341);\n            b = ff(b, c, d, a, k[7], 22, -45705983);\n            a = ff(a, b, c, d, k[8], 7, 1770035416);\n            d = ff(d, a, b, c, k[9], 12, -1958414417);\n            c = ff(c, d, a, b, k[10], 17, -42063);\n            b = ff(b, c, d, a, k[11], 22, -1990404162);\n            a = ff(a, b, c, d, k[12], 7, 1804603682);\n            d = ff(d, a, b, c, k[13], 12, -40341101);\n            c = ff(c, d, a, b, k[14], 17, -1502002290);\n            b = ff(b, c, d, a, k[15], 22, 1236535329);\n    \n            a = gg(a, b, c, d, k[1], 5, -165796510);\n            d = gg(d, a, b, c, k[6], 9, -1069501632);\n            c = gg(c, d, a, b, k[11], 14, 643717713);\n            b = gg(b, c, d, a, k[0], 20, -373897302);\n            a = gg(a, b, c, d, k[5], 5, -701558691);\n            d = gg(d, a, b, c, k[10], 9, 38016083);\n            c = gg(c, d, a, b, k[15], 14, -660478335);\n            b = gg(b, c, d, a, k[4], 20, -405537848);\n            a = gg(a, b, c, d, k[9], 5, 568446438);\n            d = gg(d, a, b, c, k[14], 9, -1019803690);\n            c = gg(c, d, a, b, k[3], 14, -187363961);\n            b = gg(b, c, d, a, k[8], 20, 1163531501);\n            a = gg(a, b, c, d, k[13], 5, -1444681467);\n            d = gg(d, a, b, c, k[2], 9, -51403784);\n            c = gg(c, d, a, b, k[7], 14, 1735328473);\n            b = gg(b, c, d, a, k[12], 20, -1926607734);\n    \n            a = hh(a, b, c, d, k[5], 4, -378558);\n            d = hh(d, a, b, c, k[8], 11, -2022574463);\n            c = hh(c, d, a, b, k[11], 16, 1839030562);\n            b = hh(b, c, d, a, k[14], 23, -35309556);\n            a = hh(a, b, c, d, k[1], 4, -1530992060);\n            d = hh(d, a, b, c, k[4], 11, 1272893353);\n            c = hh(c, d, a, b, k[7], 16, -155497632);\n            b = hh(b, c, d, a, k[10], 23, -1094730640);\n            a = hh(a, b, c, d, k[13], 4, 681279174);\n            d = hh(d, a, b, c, k[0], 11, -358537222);\n            c = hh(c, d, a, b, k[3], 16, -722521979);\n            b = hh(b, c, d, a, k[6], 23, 76029189);\n            a = hh(a, b, c, d, k[9], 4, -640364487);\n            d = hh(d, a, b, c, k[12], 11, -421815835);\n            c = hh(c, d, a, b, k[15], 16, 530742520);\n            b = hh(b, c, d, a, k[2], 23, -995338651);\n    \n            a = ii(a, b, c, d, k[0], 6, -198630844);\n            d = ii(d, a, b, c, k[7], 10, 1126891415);\n            c = ii(c, d, a, b, k[14], 15, -1416354905);\n            b = ii(b, c, d, a, k[5], 21, -57434055);\n            a = ii(a, b, c, d, k[12], 6, 1700485571);\n            d = ii(d, a, b, c, k[3], 10, -1894986606);\n            c = ii(c, d, a, b, k[10], 15, -1051523);\n            b = ii(b, c, d, a, k[1], 21, -2054922799);\n            a = ii(a, b, c, d, k[8], 6, 1873313359);\n            d = ii(d, a, b, c, k[15], 10, -30611744);\n            c = ii(c, d, a, b, k[6], 15, -1560198380);\n            b = ii(b, c, d, a, k[13], 21, 1309151649);\n            a = ii(a, b, c, d, k[4], 6, -145523070);\n            d = ii(d, a, b, c, k[11], 10, -1120210379);\n            c = ii(c, d, a, b, k[2], 15, 718787259);\n            b = ii(b, c, d, a, k[9], 21, -343485551);\n    \n            x[0] = add32(a, x[0]);\n            x[1] = add32(b, x[1]);\n            x[2] = add32(c, x[2]);\n            x[3] = add32(d, x[3]);\n        },\n    \n        /* there needs to be support for Unicode here,\n           * unless we pretend that we can redefine the MD-5\n           * algorithm for multi-byte characters (perhaps\n           * by adding every four 16-bit characters and\n           * shortening the sum to 32 bits). Otherwise\n           * I suggest performing MD-5 as if every character\n           * was two bytes--e.g., 0040 0025 = @%--but then\n           * how will an ordinary MD-5 sum be matched?\n           * There is no way to standardize text to something\n           * like UTF-8 before transformation; speed cost is\n           * utterly prohibitive. The JavaScript standard\n           * itself needs to look at this: it should start\n           * providing access to strings as preformed UTF-8\n           * 8-bit unsigned value arrays.\n           */\n        md5blk = function (s) {\n            var md5blks = [],\n                i; /* Andy King said do it this way. */\n    \n            for (i = 0; i < 64; i += 4) {\n                md5blks[i >> 2] = s.charCodeAt(i) + (s.charCodeAt(i + 1) << 8) + (s.charCodeAt(i + 2) << 16) + (s.charCodeAt(i + 3) << 24);\n            }\n            return md5blks;\n        },\n    \n        md5blk_array = function (a) {\n            var md5blks = [],\n                i; /* Andy King said do it this way. */\n    \n            for (i = 0; i < 64; i += 4) {\n                md5blks[i >> 2] = a[i] + (a[i + 1] << 8) + (a[i + 2] << 16) + (a[i + 3] << 24);\n            }\n            return md5blks;\n        },\n    \n        md51 = function (s) {\n            var n = s.length,\n                state = [1732584193, -271733879, -1732584194, 271733878],\n                i,\n                length,\n                tail,\n                tmp,\n                lo,\n                hi;\n    \n            for (i = 64; i <= n; i += 64) {\n                md5cycle(state, md5blk(s.substring(i - 64, i)));\n            }\n            s = s.substring(i - 64);\n            length = s.length;\n            tail = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];\n            for (i = 0; i < length; i += 1) {\n                tail[i >> 2] |= s.charCodeAt(i) << ((i % 4) << 3);\n            }\n            tail[i >> 2] |= 0x80 << ((i % 4) << 3);\n            if (i > 55) {\n                md5cycle(state, tail);\n                for (i = 0; i < 16; i += 1) {\n                    tail[i] = 0;\n                }\n            }\n    \n            // Beware that the final length might not fit in 32 bits so we take care of that\n            tmp = n * 8;\n            tmp = tmp.toString(16).match(/(.*?)(.{0,8})$/);\n            lo = parseInt(tmp[2], 16);\n            hi = parseInt(tmp[1], 16) || 0;\n    \n            tail[14] = lo;\n            tail[15] = hi;\n    \n            md5cycle(state, tail);\n            return state;\n        },\n    \n        md51_array = function (a) {\n            var n = a.length,\n                state = [1732584193, -271733879, -1732584194, 271733878],\n                i,\n                length,\n                tail,\n                tmp,\n                lo,\n                hi;\n    \n            for (i = 64; i <= n; i += 64) {\n                md5cycle(state, md5blk_array(a.subarray(i - 64, i)));\n            }\n    \n            // Not sure if it is a bug, however IE10 will always produce a sub array of length 1\n            // containing the last element of the parent array if the sub array specified starts\n            // beyond the length of the parent array - weird.\n            // https://connect.microsoft.com/IE/feedback/details/771452/typed-array-subarray-issue\n            a = (i - 64) < n ? a.subarray(i - 64) : new Uint8Array(0);\n    \n            length = a.length;\n            tail = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];\n            for (i = 0; i < length; i += 1) {\n                tail[i >> 2] |= a[i] << ((i % 4) << 3);\n            }\n    \n            tail[i >> 2] |= 0x80 << ((i % 4) << 3);\n            if (i > 55) {\n                md5cycle(state, tail);\n                for (i = 0; i < 16; i += 1) {\n                    tail[i] = 0;\n                }\n            }\n    \n            // Beware that the final length might not fit in 32 bits so we take care of that\n            tmp = n * 8;\n            tmp = tmp.toString(16).match(/(.*?)(.{0,8})$/);\n            lo = parseInt(tmp[2], 16);\n            hi = parseInt(tmp[1], 16) || 0;\n    \n            tail[14] = lo;\n            tail[15] = hi;\n    \n            md5cycle(state, tail);\n    \n            return state;\n        },\n    \n        hex_chr = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f'],\n    \n        rhex = function (n) {\n            var s = '',\n                j;\n            for (j = 0; j < 4; j += 1) {\n                s += hex_chr[(n >> (j * 8 + 4)) & 0x0F] + hex_chr[(n >> (j * 8)) & 0x0F];\n            }\n            return s;\n        },\n    \n        hex = function (x) {\n            var i;\n            for (i = 0; i < x.length; i += 1) {\n                x[i] = rhex(x[i]);\n            }\n            return x.join('');\n        },\n    \n        md5 = function (s) {\n            return hex(md51(s));\n        },\n    \n    \n    \n        ////////////////////////////////////////////////////////////////////////////\n    \n        /**\n         * SparkMD5 OOP implementation.\n         *\n         * Use this class to perform an incremental md5, otherwise use the\n         * static methods instead.\n         */\n        SparkMD5 = function () {\n            // call reset to init the instance\n            this.reset();\n        };\n    \n    \n        // In some cases the fast add32 function cannot be used..\n        if (md5('hello') !== '5d41402abc4b2a76b9719d911017c592') {\n            add32 = function (x, y) {\n                var lsw = (x & 0xFFFF) + (y & 0xFFFF),\n                    msw = (x >> 16) + (y >> 16) + (lsw >> 16);\n                return (msw << 16) | (lsw & 0xFFFF);\n            };\n        }\n    \n    \n        /**\n         * Appends a string.\n         * A conversion will be applied if an utf8 string is detected.\n         *\n         * @param {String} str The string to be appended\n         *\n         * @return {SparkMD5} The instance itself\n         */\n        SparkMD5.prototype.append = function (str) {\n            // converts the string to utf8 bytes if necessary\n            if (/[\\u0080-\\uFFFF]/.test(str)) {\n                str = unescape(encodeURIComponent(str));\n            }\n    \n            // then append as binary\n            this.appendBinary(str);\n    \n            return this;\n        };\n    \n        /**\n         * Appends a binary string.\n         *\n         * @param {String} contents The binary string to be appended\n         *\n         * @return {SparkMD5} The instance itself\n         */\n        SparkMD5.prototype.appendBinary = function (contents) {\n            this._buff += contents;\n            this._length += contents.length;\n    \n            var length = this._buff.length,\n                i;\n    \n            for (i = 64; i <= length; i += 64) {\n                md5cycle(this._state, md5blk(this._buff.substring(i - 64, i)));\n            }\n    \n            this._buff = this._buff.substr(i - 64);\n    \n            return this;\n        };\n    \n        /**\n         * Finishes the incremental computation, reseting the internal state and\n         * returning the result.\n         * Use the raw parameter to obtain the raw result instead of the hex one.\n         *\n         * @param {Boolean} raw True to get the raw result, false to get the hex result\n         *\n         * @return {String|Array} The result\n         */\n        SparkMD5.prototype.end = function (raw) {\n            var buff = this._buff,\n                length = buff.length,\n                i,\n                tail = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],\n                ret;\n    \n            for (i = 0; i < length; i += 1) {\n                tail[i >> 2] |= buff.charCodeAt(i) << ((i % 4) << 3);\n            }\n    \n            this._finish(tail, length);\n            ret = !!raw ? this._state : hex(this._state);\n    \n            this.reset();\n    \n            return ret;\n        };\n    \n        /**\n         * Finish the final calculation based on the tail.\n         *\n         * @param {Array}  tail   The tail (will be modified)\n         * @param {Number} length The length of the remaining buffer\n         */\n        SparkMD5.prototype._finish = function (tail, length) {\n            var i = length,\n                tmp,\n                lo,\n                hi;\n    \n            tail[i >> 2] |= 0x80 << ((i % 4) << 3);\n            if (i > 55) {\n                md5cycle(this._state, tail);\n                for (i = 0; i < 16; i += 1) {\n                    tail[i] = 0;\n                }\n            }\n    \n            // Do the final computation based on the tail and length\n            // Beware that the final length may not fit in 32 bits so we take care of that\n            tmp = this._length * 8;\n            tmp = tmp.toString(16).match(/(.*?)(.{0,8})$/);\n            lo = parseInt(tmp[2], 16);\n            hi = parseInt(tmp[1], 16) || 0;\n    \n            tail[14] = lo;\n            tail[15] = hi;\n            md5cycle(this._state, tail);\n        };\n    \n        /**\n         * Resets the internal state of the computation.\n         *\n         * @return {SparkMD5} The instance itself\n         */\n        SparkMD5.prototype.reset = function () {\n            this._buff = \"\";\n            this._length = 0;\n            this._state = [1732584193, -271733879, -1732584194, 271733878];\n    \n            return this;\n        };\n    \n        /**\n         * Releases memory used by the incremental buffer and other aditional\n         * resources. If you plan to use the instance again, use reset instead.\n         */\n        SparkMD5.prototype.destroy = function () {\n            delete this._state;\n            delete this._buff;\n            delete this._length;\n        };\n    \n    \n        /**\n         * Performs the md5 hash on a string.\n         * A conversion will be applied if utf8 string is detected.\n         *\n         * @param {String}  str The string\n         * @param {Boolean} raw True to get the raw result, false to get the hex result\n         *\n         * @return {String|Array} The result\n         */\n        SparkMD5.hash = function (str, raw) {\n            // converts the string to utf8 bytes if necessary\n            if (/[\\u0080-\\uFFFF]/.test(str)) {\n                str = unescape(encodeURIComponent(str));\n            }\n    \n            var hash = md51(str);\n    \n            return !!raw ? hash : hex(hash);\n        };\n    \n        /**\n         * Performs the md5 hash on a binary string.\n         *\n         * @param {String}  content The binary string\n         * @param {Boolean} raw     True to get the raw result, false to get the hex result\n         *\n         * @return {String|Array} The result\n         */\n        SparkMD5.hashBinary = function (content, raw) {\n            var hash = md51(content);\n    \n            return !!raw ? hash : hex(hash);\n        };\n    \n        /**\n         * SparkMD5 OOP implementation for array buffers.\n         *\n         * Use this class to perform an incremental md5 ONLY for array buffers.\n         */\n        SparkMD5.ArrayBuffer = function () {\n            // call reset to init the instance\n            this.reset();\n        };\n    \n        ////////////////////////////////////////////////////////////////////////////\n    \n        /**\n         * Appends an array buffer.\n         *\n         * @param {ArrayBuffer} arr The array to be appended\n         *\n         * @return {SparkMD5.ArrayBuffer} The instance itself\n         */\n        SparkMD5.ArrayBuffer.prototype.append = function (arr) {\n            // TODO: we could avoid the concatenation here but the algorithm would be more complex\n            //       if you find yourself needing extra performance, please make a PR.\n            var buff = this._concatArrayBuffer(this._buff, arr),\n                length = buff.length,\n                i;\n    \n            this._length += arr.byteLength;\n    \n            for (i = 64; i <= length; i += 64) {\n                md5cycle(this._state, md5blk_array(buff.subarray(i - 64, i)));\n            }\n    \n            // Avoids IE10 weirdness (documented above)\n            this._buff = (i - 64) < length ? buff.subarray(i - 64) : new Uint8Array(0);\n    \n            return this;\n        };\n    \n        /**\n         * Finishes the incremental computation, reseting the internal state and\n         * returning the result.\n         * Use the raw parameter to obtain the raw result instead of the hex one.\n         *\n         * @param {Boolean} raw True to get the raw result, false to get the hex result\n         *\n         * @return {String|Array} The result\n         */\n        SparkMD5.ArrayBuffer.prototype.end = function (raw) {\n            var buff = this._buff,\n                length = buff.length,\n                tail = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],\n                i,\n                ret;\n    \n            for (i = 0; i < length; i += 1) {\n                tail[i >> 2] |= buff[i] << ((i % 4) << 3);\n            }\n    \n            this._finish(tail, length);\n            ret = !!raw ? this._state : hex(this._state);\n    \n            this.reset();\n    \n            return ret;\n        };\n    \n        SparkMD5.ArrayBuffer.prototype._finish = SparkMD5.prototype._finish;\n    \n        /**\n         * Resets the internal state of the computation.\n         *\n         * @return {SparkMD5.ArrayBuffer} The instance itself\n         */\n        SparkMD5.ArrayBuffer.prototype.reset = function () {\n            this._buff = new Uint8Array(0);\n            this._length = 0;\n            this._state = [1732584193, -271733879, -1732584194, 271733878];\n    \n            return this;\n        };\n    \n        /**\n         * Releases memory used by the incremental buffer and other aditional\n         * resources. If you plan to use the instance again, use reset instead.\n         */\n        SparkMD5.ArrayBuffer.prototype.destroy = SparkMD5.prototype.destroy;\n    \n        /**\n         * Concats two array buffers, returning a new one.\n         *\n         * @param  {ArrayBuffer} first  The first array buffer\n         * @param  {ArrayBuffer} second The second array buffer\n         *\n         * @return {ArrayBuffer} The new array buffer\n         */\n        SparkMD5.ArrayBuffer.prototype._concatArrayBuffer = function (first, second) {\n            var firstLength = first.length,\n                result = new Uint8Array(firstLength + second.byteLength);\n    \n            result.set(first);\n            result.set(new Uint8Array(second), firstLength);\n    \n            return result;\n        };\n    \n        /**\n         * Performs the md5 hash on an array buffer.\n         *\n         * @param {ArrayBuffer} arr The array buffer\n         * @param {Boolean}     raw True to get the raw result, false to get the hex result\n         *\n         * @return {String|Array} The result\n         */\n        SparkMD5.ArrayBuffer.hash = function (arr, raw) {\n            var hash = md51_array(new Uint8Array(arr));\n    \n            return !!raw ? hash : hex(hash);\n        };\n        \n        return FlashRuntime.register( 'Md5', {\n            init: function() {\n                // do nothing.\n            },\n    \n            loadFromBlob: function( file ) {\n                var blob = file.getSource(),\n                    chunkSize = 2 * 1024 * 1024,\n                    chunks = Math.ceil( blob.size / chunkSize ),\n                    chunk = 0,\n                    owner = this.owner,\n                    spark = new SparkMD5.ArrayBuffer(),\n                    me = this,\n                    blobSlice = blob.mozSlice || blob.webkitSlice || blob.slice,\n                    loadNext, fr;\n    \n                fr = new FileReader();\n    \n                loadNext = function() {\n                    var start, end;\n    \n                    start = chunk * chunkSize;\n                    end = Math.min( start + chunkSize, blob.size );\n    \n                    fr.onload = function( e ) {\n                        spark.append( e.target.result );\n                        owner.trigger( 'progress', {\n                            total: file.size,\n                            loaded: end\n                        });\n                    };\n    \n                    fr.onloadend = function() {\n                        fr.onloadend = fr.onload = null;\n    \n                        if ( ++chunk < chunks ) {\n                            setTimeout( loadNext, 1 );\n                        } else {\n                            setTimeout(function(){\n                                owner.trigger('load');\n                                me.result = spark.end();\n                                loadNext = file = blob = spark = null;\n                                owner.trigger('complete');\n                            }, 50 );\n                        }\n                    };\n    \n                    fr.readAsArrayBuffer( blobSlice.call( blob, start, end ) );\n                };\n    \n                loadNext();\n            },\n    \n            getResult: function() {\n                return this.result;\n            }\n        });\n    });\n    /**\n     * @fileOverview FlashRuntime\n     */\n    define('runtime/flash/runtime',[\n        'base',\n        'runtime/runtime',\n        'runtime/compbase'\n    ], function( Base, Runtime, CompBase ) {\n    \n        var $ = Base.$,\n            type = 'flash',\n            components = {};\n    \n    \n        function getFlashVersion() {\n            var version;\n    \n            try {\n                version = navigator.plugins[ 'Shockwave Flash' ];\n                version = version.description;\n            } catch ( ex ) {\n                try {\n                    version = new ActiveXObject('ShockwaveFlash.ShockwaveFlash')\n                            .GetVariable('$version');\n                } catch ( ex2 ) {\n                    version = '0.0';\n                }\n            }\n            version = version.match( /\\d+/g );\n            return parseFloat( version[ 0 ] + '.' + version[ 1 ], 10 );\n        }\n    \n        function FlashRuntime() {\n            var pool = {},\n                clients = {},\n                destroy = this.destroy,\n                me = this,\n                jsreciver = Base.guid('webuploader_');\n    \n            Runtime.apply( me, arguments );\n            me.type = type;\n    \n    \n            // 这个方法的调用者，实际上是RuntimeClient\n            me.exec = function( comp, fn/*, args...*/ ) {\n                var client = this,\n                    uid = client.uid,\n                    args = Base.slice( arguments, 2 ),\n                    instance;\n    \n                clients[ uid ] = client;\n    \n                if ( components[ comp ] ) {\n                    if ( !pool[ uid ] ) {\n                        pool[ uid ] = new components[ comp ]( client, me );\n                    }\n    \n                    instance = pool[ uid ];\n    \n                    if ( instance[ fn ] ) {\n                        return instance[ fn ].apply( instance, args );\n                    }\n                }\n    \n                return me.flashExec.apply( client, arguments );\n            };\n    \n            function handler( evt, obj ) {\n                var type = evt.type || evt,\n                    parts, uid;\n    \n                parts = type.split('::');\n                uid = parts[ 0 ];\n                type = parts[ 1 ];\n    \n                // console.log.apply( console, arguments );\n    \n                if ( type === 'Ready' && uid === me.uid ) {\n                    me.trigger('ready');\n                } else if ( clients[ uid ] ) {\n                    clients[ uid ].trigger( type.toLowerCase(), evt, obj );\n                }\n    \n                // Base.log( evt, obj );\n            }\n    \n            // flash的接受器。\n            window[ jsreciver ] = function() {\n                var args = arguments;\n    \n                // 为了能捕获得到。\n                setTimeout(function() {\n                    handler.apply( null, args );\n                }, 1 );\n            };\n    \n            this.jsreciver = jsreciver;\n    \n            this.destroy = function() {\n                // @todo 删除池子中的所有实例\n                return destroy && destroy.apply( this, arguments );\n            };\n    \n            this.flashExec = function( comp, fn ) {\n                var flash = me.getFlash(),\n                    args = Base.slice( arguments, 2 );\n    \n                return flash.exec( this.uid, comp, fn, args );\n            };\n    \n            // @todo\n        }\n    \n        Base.inherits( Runtime, {\n            constructor: FlashRuntime,\n    \n            init: function() {\n                var container = this.getContainer(),\n                    opts = this.options,\n                    html;\n    \n                // if not the minimal height, shims are not initialized\n                // in older browsers (e.g FF3.6, IE6,7,8, Safari 4.0,5.0, etc)\n                container.css({\n                    position: 'absolute',\n                    top: '-8px',\n                    left: '-8px',\n                    width: '9px',\n                    height: '9px',\n                    overflow: 'hidden'\n                });\n    \n                // insert flash object\n                html = '<object id=\"' + this.uid + '\" type=\"application/' +\n                        'x-shockwave-flash\" data=\"' +  opts.swf + '\" ';\n    \n                if ( Base.browser.ie ) {\n                    html += 'classid=\"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000\" ';\n                }\n    \n                html += 'width=\"100%\" height=\"100%\" style=\"outline:0\">'  +\n                    '<param name=\"movie\" value=\"' + opts.swf + '\" />' +\n                    '<param name=\"flashvars\" value=\"uid=' + this.uid +\n                    '&jsreciver=' + this.jsreciver + '\" />' +\n                    '<param name=\"wmode\" value=\"transparent\" />' +\n                    '<param name=\"allowscriptaccess\" value=\"always\" />' +\n                '</object>';\n    \n                container.html( html );\n            },\n    \n            getFlash: function() {\n                if ( this._flash ) {\n                    return this._flash;\n                }\n    \n                this._flash = $( '#' + this.uid ).get( 0 );\n                return this._flash;\n            }\n    \n        });\n    \n        FlashRuntime.register = function( name, component ) {\n            component = components[ name ] = Base.inherits( CompBase, $.extend({\n    \n                // @todo fix this later\n                flashExec: function() {\n                    var owner = this.owner,\n                        runtime = this.getRuntime();\n    \n                    return runtime.flashExec.apply( owner, arguments );\n                }\n            }, component ) );\n    \n            return component;\n        };\n    \n        if ( getFlashVersion() >= 11.4 ) {\n            Runtime.addRuntime( type, FlashRuntime );\n        }\n    \n        return FlashRuntime;\n    });\n    /**\n     * @fileOverview FilePicker\n     */\n    define('runtime/flash/filepicker',[\n        'base',\n        'runtime/flash/runtime'\n    ], function( Base, FlashRuntime ) {\n        var $ = Base.$;\n    \n        return FlashRuntime.register( 'FilePicker', {\n            init: function( opts ) {\n                var copy = $.extend({}, opts ),\n                    len, i;\n    \n                // 修复Flash再没有设置title的情况下无法弹出flash文件选择框的bug.\n                len = copy.accept && copy.accept.length;\n                for (  i = 0; i < len; i++ ) {\n                    if ( !copy.accept[ i ].title ) {\n                        copy.accept[ i ].title = 'Files';\n                    }\n                }\n    \n                delete copy.button;\n                delete copy.id;\n                delete copy.container;\n    \n                this.flashExec( 'FilePicker', 'init', copy );\n            },\n    \n            destroy: function() {\n                this.flashExec( 'FilePicker', 'destroy' );\n            }\n        });\n    });\n    /**\n     * @fileOverview 图片压缩\n     */\n    define('runtime/flash/image',[\n        'runtime/flash/runtime'\n    ], function( FlashRuntime ) {\n    \n        return FlashRuntime.register( 'Image', {\n            // init: function( options ) {\n            //     var owner = this.owner;\n    \n            //     this.flashExec( 'Image', 'init', options );\n            //     owner.on( 'load', function() {\n            //         debugger;\n            //     });\n            // },\n    \n            loadFromBlob: function( blob ) {\n                var owner = this.owner;\n    \n                owner.info() && this.flashExec( 'Image', 'info', owner.info() );\n                owner.meta() && this.flashExec( 'Image', 'meta', owner.meta() );\n    \n                this.flashExec( 'Image', 'loadFromBlob', blob.uid );\n            }\n        });\n    });\n    /**\n     * @fileOverview  Transport flash实现\n     */\n    define('runtime/flash/transport',[\n        'base',\n        'runtime/flash/runtime',\n        'runtime/client'\n    ], function( Base, FlashRuntime, RuntimeClient ) {\n        var $ = Base.$;\n    \n        return FlashRuntime.register( 'Transport', {\n            init: function() {\n                this._status = 0;\n                this._response = null;\n                this._responseJson = null;\n            },\n    \n            send: function() {\n                var owner = this.owner,\n                    opts = this.options,\n                    xhr = this._initAjax(),\n                    blob = owner._blob,\n                    server = opts.server,\n                    binary;\n    \n                xhr.connectRuntime( blob.ruid );\n    \n                if ( opts.sendAsBinary ) {\n                    server += (/\\?/.test( server ) ? '&' : '?') +\n                            $.param( owner._formData );\n    \n                    binary = blob.uid;\n                } else {\n                    $.each( owner._formData, function( k, v ) {\n                        xhr.exec( 'append', k, v );\n                    });\n    \n                    xhr.exec( 'appendBlob', opts.fileVal, blob.uid,\n                            opts.filename || owner._formData.name || '' );\n                }\n    \n                this._setRequestHeader( xhr, opts.headers );\n                xhr.exec( 'send', {\n                    method: opts.method,\n                    url: server,\n                    forceURLStream: opts.forceURLStream,\n                    mimeType: 'application/octet-stream'\n                }, binary );\n            },\n    \n            getStatus: function() {\n                return this._status;\n            },\n    \n            getResponse: function() {\n                return this._response || '';\n            },\n    \n            getResponseAsJson: function() {\n                return this._responseJson;\n            },\n    \n            abort: function() {\n                var xhr = this._xhr;\n    \n                if ( xhr ) {\n                    xhr.exec('abort');\n                    xhr.destroy();\n                    this._xhr = xhr = null;\n                }\n            },\n    \n            destroy: function() {\n                this.abort();\n            },\n    \n            _initAjax: function() {\n                var me = this,\n                    xhr = new RuntimeClient('XMLHttpRequest');\n    \n                xhr.on( 'uploadprogress progress', function( e ) {\n                    var percent = e.loaded / e.total;\n                    percent = Math.min( 1, Math.max( 0, percent ) );\n                    return me.trigger( 'progress', percent );\n                });\n    \n                xhr.on( 'load', function() {\n                    var status = xhr.exec('getStatus'),\n                        readBody = false,\n                        err = '',\n                        p;\n    \n                    xhr.off();\n                    me._xhr = null;\n    \n                    if ( status >= 200 && status < 300 ) {\n                        readBody = true;\n                    } else if ( status >= 500 && status < 600 ) {\n                        readBody = true;\n                        err = 'server';\n                    } else {\n                        err = 'http';\n                    }\n    \n                    if ( readBody ) {\n                        me._response = xhr.exec('getResponse');\n                        me._response = decodeURIComponent( me._response );\n    \n                        // flash 处理可能存在 bug, 没辙只能靠 js 了\n                        // try {\n                        //     me._responseJson = xhr.exec('getResponseAsJson');\n                        // } catch ( error ) {\n    \n                        p = function( s ) {\n                            try {\n                                if (window.JSON && window.JSON.parse) {\n                                    return JSON.parse(s);\n                                }\n    \n                                return new Function('return ' + s).call();\n                            } catch ( err ) {\n                                return {};\n                            }\n                        };\n                        me._responseJson  = me._response ? p(me._response) : {};\n    \n                        // }\n                    }\n    \n                    xhr.destroy();\n                    xhr = null;\n    \n                    return err ? me.trigger( 'error', err ) : me.trigger('load');\n                });\n    \n                xhr.on( 'error', function() {\n                    xhr.off();\n                    me._xhr = null;\n                    me.trigger( 'error', 'http' );\n                });\n    \n                me._xhr = xhr;\n                return xhr;\n            },\n    \n            _setRequestHeader: function( xhr, headers ) {\n                $.each( headers, function( key, val ) {\n                    xhr.exec( 'setRequestHeader', key, val );\n                });\n            }\n        });\n    });\n    \n    /**\n     * @fileOverview Blob Html实现\n     */\n    define('runtime/flash/blob',[\n        'runtime/flash/runtime',\n        'lib/blob'\n    ], function( FlashRuntime, Blob ) {\n    \n        return FlashRuntime.register( 'Blob', {\n            slice: function( start, end ) {\n                var blob = this.flashExec( 'Blob', 'slice', start, end );\n    \n                return new Blob( this.getRuid(), blob );\n            }\n        });\n    });\n    /**\n     * @fileOverview  Md5 flash实现\n     */\n    define('runtime/flash/md5',[\n        'runtime/flash/runtime'\n    ], function( FlashRuntime ) {\n        \n        return FlashRuntime.register( 'Md5', {\n            init: function() {\n                // do nothing.\n            },\n    \n            loadFromBlob: function( blob ) {\n                return this.flashExec( 'Md5', 'loadFromBlob', blob.uid );\n            }\n        });\n    });\n    /**\n     * @fileOverview 完全版本。\n     */\n    define('preset/all',[\n        'base',\n    \n        // widgets\n        'widgets/filednd',\n        'widgets/filepaste',\n        'widgets/filepicker',\n        'widgets/image',\n        'widgets/queue',\n        'widgets/runtime',\n        'widgets/upload',\n        'widgets/validator',\n        'widgets/md5',\n    \n        // runtimes\n        // html5\n        'runtime/html5/blob',\n        'runtime/html5/dnd',\n        'runtime/html5/filepaste',\n        'runtime/html5/filepicker',\n        'runtime/html5/imagemeta/exif',\n        'runtime/html5/androidpatch',\n        'runtime/html5/image',\n        'runtime/html5/transport',\n        'runtime/html5/md5',\n    \n        // flash\n        'runtime/flash/filepicker',\n        'runtime/flash/image',\n        'runtime/flash/transport',\n        'runtime/flash/blob',\n        'runtime/flash/md5'\n    ], function( Base ) {\n        return Base;\n    });\n    /**\n     * @fileOverview 日志组件，主要用来收集错误信息，可以帮助 webuploader 更好的定位问题和发展。\n     *\n     * 如果您不想要启用此功能，请在打包的时候去掉 log 模块。\n     *\n     * 或者可以在初始化的时候通过 options.disableWidgets 属性禁用。\n     *\n     * 如：\n     * WebUploader.create({\n     *     ...\n     *\n     *     disableWidgets: 'log',\n     *\n     *     ...\n     * })\n     */\n    define('widgets/log',[\n        'base',\n        'uploader',\n        'widgets/widget'\n    ], function( Base, Uploader ) {\n        var $ = Base.$,\n            logUrl = ' http://static.tieba.baidu.com/tb/pms/img/st.gif??',\n            product = (location.hostname || location.host || 'protected').toLowerCase(),\n    \n            // 只针对 baidu 内部产品用户做统计功能。\n            enable = product && /baidu/i.exec(product),\n            base;\n    \n        if (!enable) {\n            return;\n        }\n    \n        base = {\n            dv: 3,\n            master: 'webuploader',\n            online: /test/.exec(product) ? 0 : 1,\n            module: '',\n            product: product,\n            type: 0\n        };\n    \n        function send(data) {\n            var obj = $.extend({}, base, data),\n                url = logUrl.replace(/^(.*)\\?/, '$1' + $.param( obj )),\n                image = new Image();\n    \n            image.src = url;\n        }\n    \n        return Uploader.register({\n            name: 'log',\n    \n            init: function() {\n                var owner = this.owner,\n                    count = 0,\n                    size = 0;\n    \n                owner\n                    .on('error', function(code) {\n                        send({\n                            type: 2,\n                            c_error_code: code\n                        });\n                    })\n                    .on('uploadError', function(file, reason) {\n                        send({\n                            type: 2,\n                            c_error_code: 'UPLOAD_ERROR',\n                            c_reason: '' + reason\n                        });\n                    })\n                    .on('uploadComplete', function(file) {\n                        count++;\n                        size += file.size;\n                    }).\n                    on('uploadFinished', function() {\n                        send({\n                            c_count: count,\n                            c_size: size\n                        });\n                        count = size = 0;\n                    });\n    \n                send({\n                    c_usage: 1\n                });\n            }\n        });\n    });\n    /**\n     * @fileOverview Uploader上传类\n     */\n    define('webuploader',[\n        'preset/all',\n        'widgets/log'\n    ], function( preset ) {\n        return preset;\n    });\n\n    var _require = require;\n    return _require('webuploader');\n});\n"
  },
  {
    "path": "static/webuploader/webuploader.flashonly.js",
    "content": "/*! WebUploader 0.1.6 */\n\n\n/**\n * @fileOverview 让内部各个部件的代码可以用[amd](https://github.com/amdjs/amdjs-api/wiki/AMD)模块定义方式组织起来。\n *\n * AMD API 内部的简单不完全实现，请忽略。只有当WebUploader被合并成一个文件的时候才会引入。\n */\n(function( root, factory ) {\n    var modules = {},\n\n        // 内部require, 简单不完全实现。\n        // https://github.com/amdjs/amdjs-api/wiki/require\n        _require = function( deps, callback ) {\n            var args, len, i;\n\n            // 如果deps不是数组，则直接返回指定module\n            if ( typeof deps === 'string' ) {\n                return getModule( deps );\n            } else {\n                args = [];\n                for( len = deps.length, i = 0; i < len; i++ ) {\n                    args.push( getModule( deps[ i ] ) );\n                }\n\n                return callback.apply( null, args );\n            }\n        },\n\n        // 内部define，暂时不支持不指定id.\n        _define = function( id, deps, factory ) {\n            if ( arguments.length === 2 ) {\n                factory = deps;\n                deps = null;\n            }\n\n            _require( deps || [], function() {\n                setModule( id, factory, arguments );\n            });\n        },\n\n        // 设置module, 兼容CommonJs写法。\n        setModule = function( id, factory, args ) {\n            var module = {\n                    exports: factory\n                },\n                returned;\n\n            if ( typeof factory === 'function' ) {\n                args.length || (args = [ _require, module.exports, module ]);\n                returned = factory.apply( null, args );\n                returned !== undefined && (module.exports = returned);\n            }\n\n            modules[ id ] = module.exports;\n        },\n\n        // 根据id获取module\n        getModule = function( id ) {\n            var module = modules[ id ] || root[ id ];\n\n            if ( !module ) {\n                throw new Error( '`' + id + '` is undefined' );\n            }\n\n            return module;\n        },\n\n        // 将所有modules，将路径ids装换成对象。\n        exportsTo = function( obj ) {\n            var key, host, parts, part, last, ucFirst;\n\n            // make the first character upper case.\n            ucFirst = function( str ) {\n                return str && (str.charAt( 0 ).toUpperCase() + str.substr( 1 ));\n            };\n\n            for ( key in modules ) {\n                host = obj;\n\n                if ( !modules.hasOwnProperty( key ) ) {\n                    continue;\n                }\n\n                parts = key.split('/');\n                last = ucFirst( parts.pop() );\n\n                while( (part = ucFirst( parts.shift() )) ) {\n                    host[ part ] = host[ part ] || {};\n                    host = host[ part ];\n                }\n\n                host[ last ] = modules[ key ];\n            }\n\n            return obj;\n        },\n\n        makeExport = function( dollar ) {\n            root.__dollar = dollar;\n\n            // exports every module.\n            return exportsTo( factory( root, _define, _require ) );\n        },\n\n        origin;\n\n    if ( typeof module === 'object' && typeof module.exports === 'object' ) {\n\n        // For CommonJS and CommonJS-like environments where a proper window is present,\n        module.exports = makeExport();\n    } else if ( typeof define === 'function' && define.amd ) {\n\n        // Allow using this built library as an AMD module\n        // in another project. That other project will only\n        // see this AMD call, not the internal modules in\n        // the closure below.\n        define([ 'jquery' ], makeExport );\n    } else {\n\n        // Browser globals case. Just assign the\n        // result to a property on the global.\n        origin = root.WebUploader;\n        root.WebUploader = makeExport();\n        root.WebUploader.noConflict = function() {\n            root.WebUploader = origin;\n        };\n    }\n})( window, function( window, define, require ) {\n\n\n    /**\n     * @fileOverview jQuery or Zepto\n     * @require \"jquery\"\n     * @require \"zepto\"\n     */\n    define('dollar-third',[],function() {\n        var req = window.require;\n        var $ = window.__dollar || \n            window.jQuery || \n            window.Zepto || \n            req('jquery') || \n            req('zepto');\n    \n        if ( !$ ) {\n            throw new Error('jQuery or Zepto not found!');\n        }\n    \n        return $;\n    });\n    \n    /**\n     * @fileOverview Dom 操作相关\n     */\n    define('dollar',[\n        'dollar-third'\n    ], function( _ ) {\n        return _;\n    });\n    /**\n     * @fileOverview 使用jQuery的Promise\n     */\n    define('promise-third',[\n        'dollar'\n    ], function( $ ) {\n        return {\n            Deferred: $.Deferred,\n            when: $.when,\n    \n            isPromise: function( anything ) {\n                return anything && typeof anything.then === 'function';\n            }\n        };\n    });\n    /**\n     * @fileOverview Promise/A+\n     */\n    define('promise',[\n        'promise-third'\n    ], function( _ ) {\n        return _;\n    });\n    /**\n     * @fileOverview 基础类方法。\n     */\n    \n    /**\n     * Web Uploader内部类的详细说明，以下提及的功能类，都可以在`WebUploader`这个变量中访问到。\n     *\n     * As you know, Web Uploader的每个文件都是用过[AMD](https://github.com/amdjs/amdjs-api/wiki/AMD)规范中的`define`组织起来的, 每个Module都会有个module id.\n     * 默认module id为该文件的路径，而此路径将会转化成名字空间存放在WebUploader中。如：\n     *\n     * * module `base`：WebUploader.Base\n     * * module `file`: WebUploader.File\n     * * module `lib/dnd`: WebUploader.Lib.Dnd\n     * * module `runtime/html5/dnd`: WebUploader.Runtime.Html5.Dnd\n     *\n     *\n     * 以下文档中对类的使用可能省略掉了`WebUploader`前缀。\n     * @module WebUploader\n     * @title WebUploader API文档\n     */\n    define('base',[\n        'dollar',\n        'promise'\n    ], function( $, promise ) {\n    \n        var noop = function() {},\n            call = Function.call;\n    \n        // http://jsperf.com/uncurrythis\n        // 反科里化\n        function uncurryThis( fn ) {\n            return function() {\n                return call.apply( fn, arguments );\n            };\n        }\n    \n        function bindFn( fn, context ) {\n            return function() {\n                return fn.apply( context, arguments );\n            };\n        }\n    \n        function createObject( proto ) {\n            var f;\n    \n            if ( Object.create ) {\n                return Object.create( proto );\n            } else {\n                f = function() {};\n                f.prototype = proto;\n                return new f();\n            }\n        }\n    \n    \n        /**\n         * 基础类，提供一些简单常用的方法。\n         * @class Base\n         */\n        return {\n    \n            /**\n             * @property {String} version 当前版本号。\n             */\n            version: '0.1.6',\n    \n            /**\n             * @property {jQuery|Zepto} $ 引用依赖的jQuery或者Zepto对象。\n             */\n            $: $,\n    \n            Deferred: promise.Deferred,\n    \n            isPromise: promise.isPromise,\n    \n            when: promise.when,\n    \n            /**\n             * @description  简单的浏览器检查结果。\n             *\n             * * `webkit`  webkit版本号，如果浏览器为非webkit内核，此属性为`undefined`。\n             * * `chrome`  chrome浏览器版本号，如果浏览器为chrome，此属性为`undefined`。\n             * * `ie`  ie浏览器版本号，如果浏览器为非ie，此属性为`undefined`。**暂不支持ie10+**\n             * * `firefox`  firefox浏览器版本号，如果浏览器为非firefox，此属性为`undefined`。\n             * * `safari`  safari浏览器版本号，如果浏览器为非safari，此属性为`undefined`。\n             * * `opera`  opera浏览器版本号，如果浏览器为非opera，此属性为`undefined`。\n             *\n             * @property {Object} [browser]\n             */\n            browser: (function( ua ) {\n                var ret = {},\n                    webkit = ua.match( /WebKit\\/([\\d.]+)/ ),\n                    chrome = ua.match( /Chrome\\/([\\d.]+)/ ) ||\n                        ua.match( /CriOS\\/([\\d.]+)/ ),\n    \n                    ie = ua.match( /MSIE\\s([\\d\\.]+)/ ) ||\n                        ua.match( /(?:trident)(?:.*rv:([\\w.]+))?/i ),\n                    firefox = ua.match( /Firefox\\/([\\d.]+)/ ),\n                    safari = ua.match( /Safari\\/([\\d.]+)/ ),\n                    opera = ua.match( /OPR\\/([\\d.]+)/ );\n    \n                webkit && (ret.webkit = parseFloat( webkit[ 1 ] ));\n                chrome && (ret.chrome = parseFloat( chrome[ 1 ] ));\n                ie && (ret.ie = parseFloat( ie[ 1 ] ));\n                firefox && (ret.firefox = parseFloat( firefox[ 1 ] ));\n                safari && (ret.safari = parseFloat( safari[ 1 ] ));\n                opera && (ret.opera = parseFloat( opera[ 1 ] ));\n    \n                return ret;\n            })( navigator.userAgent ),\n    \n            /**\n             * @description  操作系统检查结果。\n             *\n             * * `android`  如果在android浏览器环境下，此值为对应的android版本号，否则为`undefined`。\n             * * `ios` 如果在ios浏览器环境下，此值为对应的ios版本号，否则为`undefined`。\n             * @property {Object} [os]\n             */\n            os: (function( ua ) {\n                var ret = {},\n    \n                    // osx = !!ua.match( /\\(Macintosh\\; Intel / ),\n                    android = ua.match( /(?:Android);?[\\s\\/]+([\\d.]+)?/ ),\n                    ios = ua.match( /(?:iPad|iPod|iPhone).*OS\\s([\\d_]+)/ );\n    \n                // osx && (ret.osx = true);\n                android && (ret.android = parseFloat( android[ 1 ] ));\n                ios && (ret.ios = parseFloat( ios[ 1 ].replace( /_/g, '.' ) ));\n    \n                return ret;\n            })( navigator.userAgent ),\n    \n            /**\n             * 实现类与类之间的继承。\n             * @method inherits\n             * @grammar Base.inherits( super ) => child\n             * @grammar Base.inherits( super, protos ) => child\n             * @grammar Base.inherits( super, protos, statics ) => child\n             * @param  {Class} super 父类\n             * @param  {Object | Function} [protos] 子类或者对象。如果对象中包含constructor，子类将是用此属性值。\n             * @param  {Function} [protos.constructor] 子类构造器，不指定的话将创建个临时的直接执行父类构造器的方法。\n             * @param  {Object} [statics] 静态属性或方法。\n             * @return {Class} 返回子类。\n             * @example\n             * function Person() {\n             *     console.log( 'Super' );\n             * }\n             * Person.prototype.hello = function() {\n             *     console.log( 'hello' );\n             * };\n             *\n             * var Manager = Base.inherits( Person, {\n             *     world: function() {\n             *         console.log( 'World' );\n             *     }\n             * });\n             *\n             * // 因为没有指定构造器，父类的构造器将会执行。\n             * var instance = new Manager();    // => Super\n             *\n             * // 继承子父类的方法\n             * instance.hello();    // => hello\n             * instance.world();    // => World\n             *\n             * // 子类的__super__属性指向父类\n             * console.log( Manager.__super__ === Person );    // => true\n             */\n            inherits: function( Super, protos, staticProtos ) {\n                var child;\n    \n                if ( typeof protos === 'function' ) {\n                    child = protos;\n                    protos = null;\n                } else if ( protos && protos.hasOwnProperty('constructor') ) {\n                    child = protos.constructor;\n                } else {\n                    child = function() {\n                        return Super.apply( this, arguments );\n                    };\n                }\n    \n                // 复制静态方法\n                $.extend( true, child, Super, staticProtos || {} );\n    \n                /* jshint camelcase: false */\n    \n                // 让子类的__super__属性指向父类。\n                child.__super__ = Super.prototype;\n    \n                // 构建原型，添加原型方法或属性。\n                // 暂时用Object.create实现。\n                child.prototype = createObject( Super.prototype );\n                protos && $.extend( true, child.prototype, protos );\n    \n                return child;\n            },\n    \n            /**\n             * 一个不做任何事情的方法。可以用来赋值给默认的callback.\n             * @method noop\n             */\n            noop: noop,\n    \n            /**\n             * 返回一个新的方法，此方法将已指定的`context`来执行。\n             * @grammar Base.bindFn( fn, context ) => Function\n             * @method bindFn\n             * @example\n             * var doSomething = function() {\n             *         console.log( this.name );\n             *     },\n             *     obj = {\n             *         name: 'Object Name'\n             *     },\n             *     aliasFn = Base.bind( doSomething, obj );\n             *\n             *  aliasFn();    // => Object Name\n             *\n             */\n            bindFn: bindFn,\n    \n            /**\n             * 引用Console.log如果存在的话，否则引用一个[空函数noop](#WebUploader:Base.noop)。\n             * @grammar Base.log( args... ) => undefined\n             * @method log\n             */\n            log: (function() {\n                if ( window.console ) {\n                    return bindFn( console.log, console );\n                }\n                return noop;\n            })(),\n    \n            nextTick: (function() {\n    \n                return function( cb ) {\n                    setTimeout( cb, 1 );\n                };\n    \n                // @bug 当浏览器不在当前窗口时就停了。\n                // var next = window.requestAnimationFrame ||\n                //     window.webkitRequestAnimationFrame ||\n                //     window.mozRequestAnimationFrame ||\n                //     function( cb ) {\n                //         window.setTimeout( cb, 1000 / 60 );\n                //     };\n    \n                // // fix: Uncaught TypeError: Illegal invocation\n                // return bindFn( next, window );\n            })(),\n    \n            /**\n             * 被[uncurrythis](http://www.2ality.com/2011/11/uncurrying-this.html)的数组slice方法。\n             * 将用来将非数组对象转化成数组对象。\n             * @grammar Base.slice( target, start[, end] ) => Array\n             * @method slice\n             * @example\n             * function doSomthing() {\n             *     var args = Base.slice( arguments, 1 );\n             *     console.log( args );\n             * }\n             *\n             * doSomthing( 'ignored', 'arg2', 'arg3' );    // => Array [\"arg2\", \"arg3\"]\n             */\n            slice: uncurryThis( [].slice ),\n    \n            /**\n             * 生成唯一的ID\n             * @method guid\n             * @grammar Base.guid() => String\n             * @grammar Base.guid( prefx ) => String\n             */\n            guid: (function() {\n                var counter = 0;\n    \n                return function( prefix ) {\n                    var guid = (+new Date()).toString( 32 ),\n                        i = 0;\n    \n                    for ( ; i < 5; i++ ) {\n                        guid += Math.floor( Math.random() * 65535 ).toString( 32 );\n                    }\n    \n                    return (prefix || 'wu_') + guid + (counter++).toString( 32 );\n                };\n            })(),\n    \n            /**\n             * 格式化文件大小, 输出成带单位的字符串\n             * @method formatSize\n             * @grammar Base.formatSize( size ) => String\n             * @grammar Base.formatSize( size, pointLength ) => String\n             * @grammar Base.formatSize( size, pointLength, units ) => String\n             * @param {Number} size 文件大小\n             * @param {Number} [pointLength=2] 精确到的小数点数。\n             * @param {Array} [units=[ 'B', 'K', 'M', 'G', 'TB' ]] 单位数组。从字节，到千字节，一直往上指定。如果单位数组里面只指定了到了K(千字节)，同时文件大小大于M, 此方法的输出将还是显示成多少K.\n             * @example\n             * console.log( Base.formatSize( 100 ) );    // => 100B\n             * console.log( Base.formatSize( 1024 ) );    // => 1.00K\n             * console.log( Base.formatSize( 1024, 0 ) );    // => 1K\n             * console.log( Base.formatSize( 1024 * 1024 ) );    // => 1.00M\n             * console.log( Base.formatSize( 1024 * 1024 * 1024 ) );    // => 1.00G\n             * console.log( Base.formatSize( 1024 * 1024 * 1024, 0, ['B', 'KB', 'MB'] ) );    // => 1024MB\n             */\n            formatSize: function( size, pointLength, units ) {\n                var unit;\n    \n                units = units || [ 'B', 'K', 'M', 'G', 'TB' ];\n    \n                while ( (unit = units.shift()) && size > 1024 ) {\n                    size = size / 1024;\n                }\n    \n                return (unit === 'B' ? size : size.toFixed( pointLength || 2 )) +\n                        unit;\n            }\n        };\n    });\n    /**\n     * 事件处理类，可以独立使用，也可以扩展给对象使用。\n     * @fileOverview Mediator\n     */\n    define('mediator',[\n        'base'\n    ], function( Base ) {\n        var $ = Base.$,\n            slice = [].slice,\n            separator = /\\s+/,\n            protos;\n    \n        // 根据条件过滤出事件handlers.\n        function findHandlers( arr, name, callback, context ) {\n            return $.grep( arr, function( handler ) {\n                return handler &&\n                        (!name || handler.e === name) &&\n                        (!callback || handler.cb === callback ||\n                        handler.cb._cb === callback) &&\n                        (!context || handler.ctx === context);\n            });\n        }\n    \n        function eachEvent( events, callback, iterator ) {\n            // 不支持对象，只支持多个event用空格隔开\n            $.each( (events || '').split( separator ), function( _, key ) {\n                iterator( key, callback );\n            });\n        }\n    \n        function triggerHanders( events, args ) {\n            var stoped = false,\n                i = -1,\n                len = events.length,\n                handler;\n    \n            while ( ++i < len ) {\n                handler = events[ i ];\n    \n                if ( handler.cb.apply( handler.ctx2, args ) === false ) {\n                    stoped = true;\n                    break;\n                }\n            }\n    \n            return !stoped;\n        }\n    \n        protos = {\n    \n            /**\n             * 绑定事件。\n             *\n             * `callback`方法在执行时，arguments将会来源于trigger的时候携带的参数。如\n             * ```javascript\n             * var obj = {};\n             *\n             * // 使得obj有事件行为\n             * Mediator.installTo( obj );\n             *\n             * obj.on( 'testa', function( arg1, arg2 ) {\n             *     console.log( arg1, arg2 ); // => 'arg1', 'arg2'\n             * });\n             *\n             * obj.trigger( 'testa', 'arg1', 'arg2' );\n             * ```\n             *\n             * 如果`callback`中，某一个方法`return false`了，则后续的其他`callback`都不会被执行到。\n             * 切会影响到`trigger`方法的返回值，为`false`。\n             *\n             * `on`还可以用来添加一个特殊事件`all`, 这样所有的事件触发都会响应到。同时此类`callback`中的arguments有一个不同处，\n             * 就是第一个参数为`type`，记录当前是什么事件在触发。此类`callback`的优先级比脚低，会再正常`callback`执行完后触发。\n             * ```javascript\n             * obj.on( 'all', function( type, arg1, arg2 ) {\n             *     console.log( type, arg1, arg2 ); // => 'testa', 'arg1', 'arg2'\n             * });\n             * ```\n             *\n             * @method on\n             * @grammar on( name, callback[, context] ) => self\n             * @param  {String}   name     事件名，支持多个事件用空格隔开\n             * @param  {Function} callback 事件处理器\n             * @param  {Object}   [context]  事件处理器的上下文。\n             * @return {self} 返回自身，方便链式\n             * @chainable\n             * @class Mediator\n             */\n            on: function( name, callback, context ) {\n                var me = this,\n                    set;\n    \n                if ( !callback ) {\n                    return this;\n                }\n    \n                set = this._events || (this._events = []);\n    \n                eachEvent( name, callback, function( name, callback ) {\n                    var handler = { e: name };\n    \n                    handler.cb = callback;\n                    handler.ctx = context;\n                    handler.ctx2 = context || me;\n                    handler.id = set.length;\n    \n                    set.push( handler );\n                });\n    \n                return this;\n            },\n    \n            /**\n             * 绑定事件，且当handler执行完后，自动解除绑定。\n             * @method once\n             * @grammar once( name, callback[, context] ) => self\n             * @param  {String}   name     事件名\n             * @param  {Function} callback 事件处理器\n             * @param  {Object}   [context]  事件处理器的上下文。\n             * @return {self} 返回自身，方便链式\n             * @chainable\n             */\n            once: function( name, callback, context ) {\n                var me = this;\n    \n                if ( !callback ) {\n                    return me;\n                }\n    \n                eachEvent( name, callback, function( name, callback ) {\n                    var once = function() {\n                            me.off( name, once );\n                            return callback.apply( context || me, arguments );\n                        };\n    \n                    once._cb = callback;\n                    me.on( name, once, context );\n                });\n    \n                return me;\n            },\n    \n            /**\n             * 解除事件绑定\n             * @method off\n             * @grammar off( [name[, callback[, context] ] ] ) => self\n             * @param  {String}   [name]     事件名\n             * @param  {Function} [callback] 事件处理器\n             * @param  {Object}   [context]  事件处理器的上下文。\n             * @return {self} 返回自身，方便链式\n             * @chainable\n             */\n            off: function( name, cb, ctx ) {\n                var events = this._events;\n    \n                if ( !events ) {\n                    return this;\n                }\n    \n                if ( !name && !cb && !ctx ) {\n                    this._events = [];\n                    return this;\n                }\n    \n                eachEvent( name, cb, function( name, cb ) {\n                    $.each( findHandlers( events, name, cb, ctx ), function() {\n                        delete events[ this.id ];\n                    });\n                });\n    \n                return this;\n            },\n    \n            /**\n             * 触发事件\n             * @method trigger\n             * @grammar trigger( name[, args...] ) => self\n             * @param  {String}   type     事件名\n             * @param  {*} [...] 任意参数\n             * @return {Boolean} 如果handler中return false了，则返回false, 否则返回true\n             */\n            trigger: function( type ) {\n                var args, events, allEvents;\n    \n                if ( !this._events || !type ) {\n                    return this;\n                }\n    \n                args = slice.call( arguments, 1 );\n                events = findHandlers( this._events, type );\n                allEvents = findHandlers( this._events, 'all' );\n    \n                return triggerHanders( events, args ) &&\n                        triggerHanders( allEvents, arguments );\n            }\n        };\n    \n        /**\n         * 中介者，它本身是个单例，但可以通过[installTo](#WebUploader:Mediator:installTo)方法，使任何对象具备事件行为。\n         * 主要目的是负责模块与模块之间的合作，降低耦合度。\n         *\n         * @class Mediator\n         */\n        return $.extend({\n    \n            /**\n             * 可以通过这个接口，使任何对象具备事件功能。\n             * @method installTo\n             * @param  {Object} obj 需要具备事件行为的对象。\n             * @return {Object} 返回obj.\n             */\n            installTo: function( obj ) {\n                return $.extend( obj, protos );\n            }\n    \n        }, protos );\n    });\n    /**\n     * @fileOverview Uploader上传类\n     */\n    define('uploader',[\n        'base',\n        'mediator'\n    ], function( Base, Mediator ) {\n    \n        var $ = Base.$;\n    \n        /**\n         * 上传入口类。\n         * @class Uploader\n         * @constructor\n         * @grammar new Uploader( opts ) => Uploader\n         * @example\n         * var uploader = WebUploader.Uploader({\n         *     swf: 'path_of_swf/Uploader.swf',\n         *\n         *     // 开起分片上传。\n         *     chunked: true\n         * });\n         */\n        function Uploader( opts ) {\n            this.options = $.extend( true, {}, Uploader.options, opts );\n            this._init( this.options );\n        }\n    \n        // default Options\n        // widgets中有相应扩展\n        Uploader.options = {};\n        Mediator.installTo( Uploader.prototype );\n    \n        // 批量添加纯命令式方法。\n        $.each({\n            upload: 'start-upload',\n            stop: 'stop-upload',\n            getFile: 'get-file',\n            getFiles: 'get-files',\n            addFile: 'add-file',\n            addFiles: 'add-file',\n            sort: 'sort-files',\n            removeFile: 'remove-file',\n            cancelFile: 'cancel-file',\n            skipFile: 'skip-file',\n            retry: 'retry',\n            isInProgress: 'is-in-progress',\n            makeThumb: 'make-thumb',\n            md5File: 'md5-file',\n            getDimension: 'get-dimension',\n            addButton: 'add-btn',\n            predictRuntimeType: 'predict-runtime-type',\n            refresh: 'refresh',\n            disable: 'disable',\n            enable: 'enable',\n            reset: 'reset'\n        }, function( fn, command ) {\n            Uploader.prototype[ fn ] = function() {\n                return this.request( command, arguments );\n            };\n        });\n    \n        $.extend( Uploader.prototype, {\n            state: 'pending',\n    \n            _init: function( opts ) {\n                var me = this;\n    \n                me.request( 'init', opts, function() {\n                    me.state = 'ready';\n                    me.trigger('ready');\n                });\n            },\n    \n            /**\n             * 获取或者设置Uploader配置项。\n             * @method option\n             * @grammar option( key ) => *\n             * @grammar option( key, val ) => self\n             * @example\n             *\n             * // 初始状态图片上传前不会压缩\n             * var uploader = new WebUploader.Uploader({\n             *     compress: null;\n             * });\n             *\n             * // 修改后图片上传前，尝试将图片压缩到1600 * 1600\n             * uploader.option( 'compress', {\n             *     width: 1600,\n             *     height: 1600\n             * });\n             */\n            option: function( key, val ) {\n                var opts = this.options;\n    \n                // setter\n                if ( arguments.length > 1 ) {\n    \n                    if ( $.isPlainObject( val ) &&\n                            $.isPlainObject( opts[ key ] ) ) {\n                        $.extend( opts[ key ], val );\n                    } else {\n                        opts[ key ] = val;\n                    }\n    \n                } else {    // getter\n                    return key ? opts[ key ] : opts;\n                }\n            },\n    \n            /**\n             * 获取文件统计信息。返回一个包含一下信息的对象。\n             * * `successNum` 上传成功的文件数\n             * * `progressNum` 上传中的文件数\n             * * `cancelNum` 被删除的文件数\n             * * `invalidNum` 无效的文件数\n             * * `uploadFailNum` 上传失败的文件数\n             * * `queueNum` 还在队列中的文件数\n             * * `interruptNum` 被暂停的文件数\n             * @method getStats\n             * @grammar getStats() => Object\n             */\n            getStats: function() {\n                // return this._mgr.getStats.apply( this._mgr, arguments );\n                var stats = this.request('get-stats');\n    \n                return stats ? {\n                    successNum: stats.numOfSuccess,\n                    progressNum: stats.numOfProgress,\n    \n                    // who care?\n                    // queueFailNum: 0,\n                    cancelNum: stats.numOfCancel,\n                    invalidNum: stats.numOfInvalid,\n                    uploadFailNum: stats.numOfUploadFailed,\n                    queueNum: stats.numOfQueue,\n                    interruptNum: stats.numofInterrupt\n                } : {};\n            },\n    \n            // 需要重写此方法来来支持opts.onEvent和instance.onEvent的处理器\n            trigger: function( type/*, args...*/ ) {\n                var args = [].slice.call( arguments, 1 ),\n                    opts = this.options,\n                    name = 'on' + type.substring( 0, 1 ).toUpperCase() +\n                        type.substring( 1 );\n    \n                if (\n                        // 调用通过on方法注册的handler.\n                        Mediator.trigger.apply( this, arguments ) === false ||\n    \n                        // 调用opts.onEvent\n                        $.isFunction( opts[ name ] ) &&\n                        opts[ name ].apply( this, args ) === false ||\n    \n                        // 调用this.onEvent\n                        $.isFunction( this[ name ] ) &&\n                        this[ name ].apply( this, args ) === false ||\n    \n                        // 广播所有uploader的事件。\n                        Mediator.trigger.apply( Mediator,\n                        [ this, type ].concat( args ) ) === false ) {\n    \n                    return false;\n                }\n    \n                return true;\n            },\n    \n            /**\n             * 销毁 webuploader 实例\n             * @method destroy\n             * @grammar destroy() => undefined\n             */\n            destroy: function() {\n                this.request( 'destroy', arguments );\n                this.off();\n            },\n    \n            // widgets/widget.js将补充此方法的详细文档。\n            request: Base.noop\n        });\n    \n        /**\n         * 创建Uploader实例，等同于new Uploader( opts );\n         * @method create\n         * @class Base\n         * @static\n         * @grammar Base.create( opts ) => Uploader\n         */\n        Base.create = Uploader.create = function( opts ) {\n            return new Uploader( opts );\n        };\n    \n        // 暴露Uploader，可以通过它来扩展业务逻辑。\n        Base.Uploader = Uploader;\n    \n        return Uploader;\n    });\n    /**\n     * @fileOverview Runtime管理器，负责Runtime的选择, 连接\n     */\n    define('runtime/runtime',[\n        'base',\n        'mediator'\n    ], function( Base, Mediator ) {\n    \n        var $ = Base.$,\n            factories = {},\n    \n            // 获取对象的第一个key\n            getFirstKey = function( obj ) {\n                for ( var key in obj ) {\n                    if ( obj.hasOwnProperty( key ) ) {\n                        return key;\n                    }\n                }\n                return null;\n            };\n    \n        // 接口类。\n        function Runtime( options ) {\n            this.options = $.extend({\n                container: document.body\n            }, options );\n            this.uid = Base.guid('rt_');\n        }\n    \n        $.extend( Runtime.prototype, {\n    \n            getContainer: function() {\n                var opts = this.options,\n                    parent, container;\n    \n                if ( this._container ) {\n                    return this._container;\n                }\n    \n                parent = $( opts.container || document.body );\n                container = $( document.createElement('div') );\n    \n                container.attr( 'id', 'rt_' + this.uid );\n                container.css({\n                    position: 'absolute',\n                    top: '0px',\n                    left: '0px',\n                    width: '1px',\n                    height: '1px',\n                    overflow: 'hidden'\n                });\n    \n                parent.append( container );\n                parent.addClass('webuploader-container');\n                this._container = container;\n                this._parent = parent;\n                return container;\n            },\n    \n            init: Base.noop,\n            exec: Base.noop,\n    \n            destroy: function() {\n                this._container && this._container.remove();\n                this._parent && this._parent.removeClass('webuploader-container');\n                this.off();\n            }\n        });\n    \n        Runtime.orders = 'html5,flash';\n    \n    \n        /**\n         * 添加Runtime实现。\n         * @param {String} type    类型\n         * @param {Runtime} factory 具体Runtime实现。\n         */\n        Runtime.addRuntime = function( type, factory ) {\n            factories[ type ] = factory;\n        };\n    \n        Runtime.hasRuntime = function( type ) {\n            return !!(type ? factories[ type ] : getFirstKey( factories ));\n        };\n    \n        Runtime.create = function( opts, orders ) {\n            var type, runtime;\n    \n            orders = orders || Runtime.orders;\n            $.each( orders.split( /\\s*,\\s*/g ), function() {\n                if ( factories[ this ] ) {\n                    type = this;\n                    return false;\n                }\n            });\n    \n            type = type || getFirstKey( factories );\n    \n            if ( !type ) {\n                throw new Error('Runtime Error');\n            }\n    \n            runtime = new factories[ type ]( opts );\n            return runtime;\n        };\n    \n        Mediator.installTo( Runtime.prototype );\n        return Runtime;\n    });\n    \n    /**\n     * @fileOverview Runtime管理器，负责Runtime的选择, 连接\n     */\n    define('runtime/client',[\n        'base',\n        'mediator',\n        'runtime/runtime'\n    ], function( Base, Mediator, Runtime ) {\n    \n        var cache;\n    \n        cache = (function() {\n            var obj = {};\n    \n            return {\n                add: function( runtime ) {\n                    obj[ runtime.uid ] = runtime;\n                },\n    \n                get: function( ruid, standalone ) {\n                    var i;\n    \n                    if ( ruid ) {\n                        return obj[ ruid ];\n                    }\n    \n                    for ( i in obj ) {\n                        // 有些类型不能重用，比如filepicker.\n                        if ( standalone && obj[ i ].__standalone ) {\n                            continue;\n                        }\n    \n                        return obj[ i ];\n                    }\n    \n                    return null;\n                },\n    \n                remove: function( runtime ) {\n                    delete obj[ runtime.uid ];\n                }\n            };\n        })();\n    \n        function RuntimeClient( component, standalone ) {\n            var deferred = Base.Deferred(),\n                runtime;\n    \n            this.uid = Base.guid('client_');\n    \n            // 允许runtime没有初始化之前，注册一些方法在初始化后执行。\n            this.runtimeReady = function( cb ) {\n                return deferred.done( cb );\n            };\n    \n            this.connectRuntime = function( opts, cb ) {\n    \n                // already connected.\n                if ( runtime ) {\n                    throw new Error('already connected!');\n                }\n    \n                deferred.done( cb );\n    \n                if ( typeof opts === 'string' && cache.get( opts ) ) {\n                    runtime = cache.get( opts );\n                }\n    \n                // 像filePicker只能独立存在，不能公用。\n                runtime = runtime || cache.get( null, standalone );\n    \n                // 需要创建\n                if ( !runtime ) {\n                    runtime = Runtime.create( opts, opts.runtimeOrder );\n                    runtime.__promise = deferred.promise();\n                    runtime.once( 'ready', deferred.resolve );\n                    runtime.init();\n                    cache.add( runtime );\n                    runtime.__client = 1;\n                } else {\n                    // 来自cache\n                    Base.$.extend( runtime.options, opts );\n                    runtime.__promise.then( deferred.resolve );\n                    runtime.__client++;\n                }\n    \n                standalone && (runtime.__standalone = standalone);\n                return runtime;\n            };\n    \n            this.getRuntime = function() {\n                return runtime;\n            };\n    \n            this.disconnectRuntime = function() {\n                if ( !runtime ) {\n                    return;\n                }\n    \n                runtime.__client--;\n    \n                if ( runtime.__client <= 0 ) {\n                    cache.remove( runtime );\n                    delete runtime.__promise;\n                    runtime.destroy();\n                }\n    \n                runtime = null;\n            };\n    \n            this.exec = function() {\n                if ( !runtime ) {\n                    return;\n                }\n    \n                var args = Base.slice( arguments );\n                component && args.unshift( component );\n    \n                return runtime.exec.apply( this, args );\n            };\n    \n            this.getRuid = function() {\n                return runtime && runtime.uid;\n            };\n    \n            this.destroy = (function( destroy ) {\n                return function() {\n                    destroy && destroy.apply( this, arguments );\n                    this.trigger('destroy');\n                    this.off();\n                    this.exec('destroy');\n                    this.disconnectRuntime();\n                };\n            })( this.destroy );\n        }\n    \n        Mediator.installTo( RuntimeClient.prototype );\n        return RuntimeClient;\n    });\n    /**\n     * @fileOverview Blob\n     */\n    define('lib/blob',[\n        'base',\n        'runtime/client'\n    ], function( Base, RuntimeClient ) {\n    \n        function Blob( ruid, source ) {\n            var me = this;\n    \n            me.source = source;\n            me.ruid = ruid;\n            this.size = source.size || 0;\n    \n            // 如果没有指定 mimetype, 但是知道文件后缀。\n            if ( !source.type && this.ext &&\n                    ~'jpg,jpeg,png,gif,bmp'.indexOf( this.ext ) ) {\n                this.type = 'image/' + (this.ext === 'jpg' ? 'jpeg' : this.ext);\n            } else {\n                this.type = source.type || 'application/octet-stream';\n            }\n    \n            RuntimeClient.call( me, 'Blob' );\n            this.uid = source.uid || this.uid;\n    \n            if ( ruid ) {\n                me.connectRuntime( ruid );\n            }\n        }\n    \n        Base.inherits( RuntimeClient, {\n            constructor: Blob,\n    \n            slice: function( start, end ) {\n                return this.exec( 'slice', start, end );\n            },\n    \n            getSource: function() {\n                return this.source;\n            }\n        });\n    \n        return Blob;\n    });\n    /**\n     * 为了统一化Flash的File和HTML5的File而存在。\n     * 以至于要调用Flash里面的File，也可以像调用HTML5版本的File一下。\n     * @fileOverview File\n     */\n    define('lib/file',[\n        'base',\n        'lib/blob'\n    ], function( Base, Blob ) {\n    \n        var uid = 1,\n            rExt = /\\.([^.]+)$/;\n    \n        function File( ruid, file ) {\n            var ext;\n    \n            this.name = file.name || ('untitled' + uid++);\n            ext = rExt.exec( file.name ) ? RegExp.$1.toLowerCase() : '';\n    \n            // todo 支持其他类型文件的转换。\n            // 如果有 mimetype, 但是文件名里面没有找出后缀规律\n            if ( !ext && file.type ) {\n                ext = /\\/(jpg|jpeg|png|gif|bmp)$/i.exec( file.type ) ?\n                        RegExp.$1.toLowerCase() : '';\n                this.name += '.' + ext;\n            }\n    \n            this.ext = ext;\n            this.lastModifiedDate = file.lastModifiedDate ||\n                    (new Date()).toLocaleString();\n    \n            Blob.apply( this, arguments );\n        }\n    \n        return Base.inherits( Blob, File );\n    });\n    \n    /**\n     * @fileOverview 错误信息\n     */\n    define('lib/filepicker',[\n        'base',\n        'runtime/client',\n        'lib/file'\n    ], function( Base, RuntimeClient, File ) {\n    \n        var $ = Base.$;\n    \n        function FilePicker( opts ) {\n            opts = this.options = $.extend({}, FilePicker.options, opts );\n    \n            opts.container = $( opts.id );\n    \n            if ( !opts.container.length ) {\n                throw new Error('按钮指定错误');\n            }\n    \n            opts.innerHTML = opts.innerHTML || opts.label ||\n                    opts.container.html() || '';\n    \n            opts.button = $( opts.button || document.createElement('div') );\n            opts.button.html( opts.innerHTML );\n            opts.container.html( opts.button );\n    \n            RuntimeClient.call( this, 'FilePicker', true );\n        }\n    \n        FilePicker.options = {\n            button: null,\n            container: null,\n            label: null,\n            innerHTML: null,\n            multiple: true,\n            accept: null,\n            name: 'file',\n            style: 'webuploader-pick'   //pick element class attribute, default is \"webuploader-pick\"\n        };\n    \n        Base.inherits( RuntimeClient, {\n            constructor: FilePicker,\n    \n            init: function() {\n                var me = this,\n                    opts = me.options,\n                    button = opts.button,\n                    style = opts.style;\n    \n                if (style)\n                    button.addClass('webuploader-pick');\n    \n                me.on( 'all', function( type ) {\n                    var files;\n    \n                    switch ( type ) {\n                        case 'mouseenter':\n                            if (style)\n                                button.addClass('webuploader-pick-hover');\n                            break;\n    \n                        case 'mouseleave':\n                            if (style)\n                                button.removeClass('webuploader-pick-hover');\n                            break;\n    \n                        case 'change':\n                            files = me.exec('getFiles');\n                            me.trigger( 'select', $.map( files, function( file ) {\n                                file = new File( me.getRuid(), file );\n    \n                                // 记录来源。\n                                file._refer = opts.container;\n                                return file;\n                            }), opts.container );\n                            break;\n                    }\n                });\n    \n                me.connectRuntime( opts, function() {\n                    me.refresh();\n                    me.exec( 'init', opts );\n                    me.trigger('ready');\n                });\n    \n                this._resizeHandler = Base.bindFn( this.refresh, this );\n                $( window ).on( 'resize', this._resizeHandler );\n            },\n    \n            refresh: function() {\n                var shimContainer = this.getRuntime().getContainer(),\n                    button = this.options.button,\n                    width = button.outerWidth ?\n                            button.outerWidth() : button.width(),\n    \n                    height = button.outerHeight ?\n                            button.outerHeight() : button.height(),\n    \n                    pos = button.offset();\n    \n                width && height && shimContainer.css({\n                    bottom: 'auto',\n                    right: 'auto',\n                    width: width + 'px',\n                    height: height + 'px'\n                }).offset( pos );\n            },\n    \n            enable: function() {\n                var btn = this.options.button;\n    \n                btn.removeClass('webuploader-pick-disable');\n                this.refresh();\n            },\n    \n            disable: function() {\n                var btn = this.options.button;\n    \n                this.getRuntime().getContainer().css({\n                    top: '-99999px'\n                });\n    \n                btn.addClass('webuploader-pick-disable');\n            },\n    \n            destroy: function() {\n                var btn = this.options.button;\n                $( window ).off( 'resize', this._resizeHandler );\n                btn.removeClass('webuploader-pick-disable webuploader-pick-hover ' +\n                    'webuploader-pick');\n            }\n        });\n    \n        return FilePicker;\n    });\n    \n    /**\n     * @fileOverview 组件基类。\n     */\n    define('widgets/widget',[\n        'base',\n        'uploader'\n    ], function( Base, Uploader ) {\n    \n        var $ = Base.$,\n            _init = Uploader.prototype._init,\n            _destroy = Uploader.prototype.destroy,\n            IGNORE = {},\n            widgetClass = [];\n    \n        function isArrayLike( obj ) {\n            if ( !obj ) {\n                return false;\n            }\n    \n            var length = obj.length,\n                type = $.type( obj );\n    \n            if ( obj.nodeType === 1 && length ) {\n                return true;\n            }\n    \n            return type === 'array' || type !== 'function' && type !== 'string' &&\n                    (length === 0 || typeof length === 'number' && length > 0 &&\n                    (length - 1) in obj);\n        }\n    \n        function Widget( uploader ) {\n            this.owner = uploader;\n            this.options = uploader.options;\n        }\n    \n        $.extend( Widget.prototype, {\n    \n            init: Base.noop,\n    \n            // 类Backbone的事件监听声明，监听uploader实例上的事件\n            // widget直接无法监听事件，事件只能通过uploader来传递\n            invoke: function( apiName, args ) {\n    \n                /*\n                    {\n                        'make-thumb': 'makeThumb'\n                    }\n                 */\n                var map = this.responseMap;\n    \n                // 如果无API响应声明则忽略\n                if ( !map || !(apiName in map) || !(map[ apiName ] in this) ||\n                        !$.isFunction( this[ map[ apiName ] ] ) ) {\n    \n                    return IGNORE;\n                }\n    \n                return this[ map[ apiName ] ].apply( this, args );\n    \n            },\n    \n            /**\n             * 发送命令。当传入`callback`或者`handler`中返回`promise`时。返回一个当所有`handler`中的promise都完成后完成的新`promise`。\n             * @method request\n             * @grammar request( command, args ) => * | Promise\n             * @grammar request( command, args, callback ) => Promise\n             * @for  Uploader\n             */\n            request: function() {\n                return this.owner.request.apply( this.owner, arguments );\n            }\n        });\n    \n        // 扩展Uploader.\n        $.extend( Uploader.prototype, {\n    \n            /**\n             * @property {String | Array} [disableWidgets=undefined]\n             * @namespace options\n             * @for Uploader\n             * @description 默认所有 Uploader.register 了的 widget 都会被加载，如果禁用某一部分，请通过此 option 指定黑名单。\n             */\n    \n            // 覆写_init用来初始化widgets\n            _init: function() {\n                var me = this,\n                    widgets = me._widgets = [],\n                    deactives = me.options.disableWidgets || '';\n    \n                $.each( widgetClass, function( _, klass ) {\n                    (!deactives || !~deactives.indexOf( klass._name )) &&\n                        widgets.push( new klass( me ) );\n                });\n    \n                return _init.apply( me, arguments );\n            },\n    \n            request: function( apiName, args, callback ) {\n                var i = 0,\n                    widgets = this._widgets,\n                    len = widgets && widgets.length,\n                    rlts = [],\n                    dfds = [],\n                    widget, rlt, promise, key;\n    \n                args = isArrayLike( args ) ? args : [ args ];\n    \n                for ( ; i < len; i++ ) {\n                    widget = widgets[ i ];\n                    rlt = widget.invoke( apiName, args );\n    \n                    if ( rlt !== IGNORE ) {\n    \n                        // Deferred对象\n                        if ( Base.isPromise( rlt ) ) {\n                            dfds.push( rlt );\n                        } else {\n                            rlts.push( rlt );\n                        }\n                    }\n                }\n    \n                // 如果有callback，则用异步方式。\n                if ( callback || dfds.length ) {\n                    promise = Base.when.apply( Base, dfds );\n                    key = promise.pipe ? 'pipe' : 'then';\n    \n                    // 很重要不能删除。删除了会死循环。\n                    // 保证执行顺序。让callback总是在下一个 tick 中执行。\n                    return promise[ key ](function() {\n                                var deferred = Base.Deferred(),\n                                    args = arguments;\n    \n                                if ( args.length === 1 ) {\n                                    args = args[ 0 ];\n                                }\n    \n                                setTimeout(function() {\n                                    deferred.resolve( args );\n                                }, 1 );\n    \n                                return deferred.promise();\n                            })[ callback ? key : 'done' ]( callback || Base.noop );\n                } else {\n                    return rlts[ 0 ];\n                }\n            },\n    \n            destroy: function() {\n                _destroy.apply( this, arguments );\n                this._widgets = null;\n            }\n        });\n    \n        /**\n         * 添加组件\n         * @grammar Uploader.register(proto);\n         * @grammar Uploader.register(map, proto);\n         * @param  {object} responseMap API 名称与函数实现的映射\n         * @param  {object} proto 组件原型，构造函数通过 constructor 属性定义\n         * @method Uploader.register\n         * @for Uploader\n         * @example\n         * Uploader.register({\n         *     'make-thumb': 'makeThumb'\n         * }, {\n         *     init: function( options ) {},\n         *     makeThumb: function() {}\n         * });\n         *\n         * Uploader.register({\n         *     'make-thumb': function() {\n         *         \n         *     }\n         * });\n         */\n        Uploader.register = Widget.register = function( responseMap, widgetProto ) {\n            var map = { init: 'init', destroy: 'destroy', name: 'anonymous' },\n                klass;\n    \n            if ( arguments.length === 1 ) {\n                widgetProto = responseMap;\n    \n                // 自动生成 map 表。\n                $.each(widgetProto, function(key) {\n                    if ( key[0] === '_' || key === 'name' ) {\n                        key === 'name' && (map.name = widgetProto.name);\n                        return;\n                    }\n    \n                    map[key.replace(/[A-Z]/g, '-$&').toLowerCase()] = key;\n                });\n    \n            } else {\n                map = $.extend( map, responseMap );\n            }\n    \n            widgetProto.responseMap = map;\n            klass = Base.inherits( Widget, widgetProto );\n            klass._name = map.name;\n            widgetClass.push( klass );\n    \n            return klass;\n        };\n    \n        /**\n         * 删除插件，只有在注册时指定了名字的才能被删除。\n         * @grammar Uploader.unRegister(name);\n         * @param  {string} name 组件名字\n         * @method Uploader.unRegister\n         * @for Uploader\n         * @example\n         *\n         * Uploader.register({\n         *     name: 'custom',\n         *     \n         *     'make-thumb': function() {\n         *         \n         *     }\n         * });\n         *\n         * Uploader.unRegister('custom');\n         */\n        Uploader.unRegister = Widget.unRegister = function( name ) {\n            if ( !name || name === 'anonymous' ) {\n                return;\n            }\n            \n            // 删除指定的插件。\n            for ( var i = widgetClass.length; i--; ) {\n                if ( widgetClass[i]._name === name ) {\n                    widgetClass.splice(i, 1)\n                }\n            }\n        };\n    \n        return Widget;\n    });\n    /**\n     * @fileOverview 文件选择相关\n     */\n    define('widgets/filepicker',[\n        'base',\n        'uploader',\n        'lib/filepicker',\n        'widgets/widget'\n    ], function( Base, Uploader, FilePicker ) {\n        var $ = Base.$;\n    \n        $.extend( Uploader.options, {\n    \n            /**\n             * @property {Selector | Object} [pick=undefined]\n             * @namespace options\n             * @for Uploader\n             * @description 指定选择文件的按钮容器，不指定则不创建按钮。\n             *\n             * * `id` {Seletor|dom} 指定选择文件的按钮容器，不指定则不创建按钮。**注意** 这里虽然写的是 id, 但是不是只支持 id, 还支持 class, 或者 dom 节点。\n             * * `label` {String} 请采用 `innerHTML` 代替\n             * * `innerHTML` {String} 指定按钮文字。不指定时优先从指定的容器中看是否自带文字。\n             * * `multiple` {Boolean} 是否开起同时选择多个文件能力。\n             */\n            pick: null,\n    \n            /**\n             * @property {Arroy} [accept=null]\n             * @namespace options\n             * @for Uploader\n             * @description 指定接受哪些类型的文件。 由于目前还有ext转mimeType表，所以这里需要分开指定。\n             *\n             * * `title` {String} 文字描述\n             * * `extensions` {String} 允许的文件后缀，不带点，多个用逗号分割。\n             * * `mimeTypes` {String} 多个用逗号分割。\n             *\n             * 如：\n             *\n             * ```\n             * {\n             *     title: 'Images',\n             *     extensions: 'gif,jpg,jpeg,bmp,png',\n             *     mimeTypes: 'image/*'\n             * }\n             * ```\n             */\n            accept: null/*{\n                title: 'Images',\n                extensions: 'gif,jpg,jpeg,bmp,png',\n                mimeTypes: 'image/*'\n            }*/\n        });\n    \n        return Uploader.register({\n            name: 'picker',\n    \n            init: function( opts ) {\n                this.pickers = [];\n                return opts.pick && this.addBtn( opts.pick );\n            },\n    \n            refresh: function() {\n                $.each( this.pickers, function() {\n                    this.refresh();\n                });\n            },\n    \n            /**\n             * @method addBtn\n             * @for Uploader\n             * @grammar addBtn( pick ) => Promise\n             * @description\n             * 添加文件选择按钮，如果一个按钮不够，需要调用此方法来添加。参数跟[options.pick](#WebUploader:Uploader:options)一致。\n             * @example\n             * uploader.addBtn({\n             *     id: '#btnContainer',\n             *     innerHTML: '选择文件'\n             * });\n             */\n            addBtn: function( pick ) {\n                var me = this,\n                    opts = me.options,\n                    accept = opts.accept,\n                    promises = [];\n    \n                if ( !pick ) {\n                    return;\n                }\n    \n                $.isPlainObject( pick ) || (pick = {\n                    id: pick\n                });\n    \n                $( pick.id ).each(function() {\n                    var options, picker, deferred;\n    \n                    deferred = Base.Deferred();\n    \n                    options = $.extend({}, pick, {\n                        accept: $.isPlainObject( accept ) ? [ accept ] : accept,\n                        swf: opts.swf,\n                        runtimeOrder: opts.runtimeOrder,\n                        id: this\n                    });\n    \n                    picker = new FilePicker( options );\n    \n                    picker.once( 'ready', deferred.resolve );\n                    picker.on( 'select', function( files ) {\n                        me.owner.request( 'add-file', [ files ]);\n                    });\n                    picker.on('dialogopen', function() {\n                        me.owner.trigger('dialogOpen', picker.button);\n                    });\n                    picker.init();\n    \n                    me.pickers.push( picker );\n    \n                    promises.push( deferred.promise() );\n                });\n    \n                return Base.when.apply( Base, promises );\n            },\n    \n            disable: function() {\n                $.each( this.pickers, function() {\n                    this.disable();\n                });\n            },\n    \n            enable: function() {\n                $.each( this.pickers, function() {\n                    this.enable();\n                });\n            },\n    \n            destroy: function() {\n                $.each( this.pickers, function() {\n                    this.destroy();\n                });\n                this.pickers = null;\n            }\n        });\n    });\n    /**\n     * @fileOverview Image\n     */\n    define('lib/image',[\n        'base',\n        'runtime/client',\n        'lib/blob'\n    ], function( Base, RuntimeClient, Blob ) {\n        var $ = Base.$;\n    \n        // 构造器。\n        function Image( opts ) {\n            this.options = $.extend({}, Image.options, opts );\n            RuntimeClient.call( this, 'Image' );\n    \n            this.on( 'load', function() {\n                this._info = this.exec('info');\n                this._meta = this.exec('meta');\n            });\n        }\n    \n        // 默认选项。\n        Image.options = {\n    \n            // 默认的图片处理质量\n            quality: 90,\n    \n            // 是否裁剪\n            crop: false,\n    \n            // 是否保留头部信息\n            preserveHeaders: false,\n    \n            // 是否允许放大。\n            allowMagnify: false\n        };\n    \n        // 继承RuntimeClient.\n        Base.inherits( RuntimeClient, {\n            constructor: Image,\n    \n            info: function( val ) {\n    \n                // setter\n                if ( val ) {\n                    this._info = val;\n                    return this;\n                }\n    \n                // getter\n                return this._info;\n            },\n    \n            meta: function( val ) {\n    \n                // setter\n                if ( val ) {\n                    this._meta = val;\n                    return this;\n                }\n    \n                // getter\n                return this._meta;\n            },\n    \n            loadFromBlob: function( blob ) {\n                var me = this,\n                    ruid = blob.getRuid();\n    \n                this.connectRuntime( ruid, function() {\n                    me.exec( 'init', me.options );\n                    me.exec( 'loadFromBlob', blob );\n                });\n            },\n    \n            resize: function() {\n                var args = Base.slice( arguments );\n                return this.exec.apply( this, [ 'resize' ].concat( args ) );\n            },\n    \n            crop: function() {\n                var args = Base.slice( arguments );\n                return this.exec.apply( this, [ 'crop' ].concat( args ) );\n            },\n    \n            getAsDataUrl: function( type ) {\n                return this.exec( 'getAsDataUrl', type );\n            },\n    \n            getAsBlob: function( type ) {\n                var blob = this.exec( 'getAsBlob', type );\n    \n                return new Blob( this.getRuid(), blob );\n            }\n        });\n    \n        return Image;\n    });\n    /**\n     * @fileOverview 图片操作, 负责预览图片和上传前压缩图片\n     */\n    define('widgets/image',[\n        'base',\n        'uploader',\n        'lib/image',\n        'widgets/widget'\n    ], function( Base, Uploader, Image ) {\n    \n        var $ = Base.$,\n            throttle;\n    \n        // 根据要处理的文件大小来节流，一次不能处理太多，会卡。\n        throttle = (function( max ) {\n            var occupied = 0,\n                waiting = [],\n                tick = function() {\n                    var item;\n    \n                    while ( waiting.length && occupied < max ) {\n                        item = waiting.shift();\n                        occupied += item[ 0 ];\n                        item[ 1 ]();\n                    }\n                };\n    \n            return function( emiter, size, cb ) {\n                waiting.push([ size, cb ]);\n                emiter.once( 'destroy', function() {\n                    occupied -= size;\n                    setTimeout( tick, 1 );\n                });\n                setTimeout( tick, 1 );\n            };\n        })( 5 * 1024 * 1024 );\n    \n        $.extend( Uploader.options, {\n    \n            /**\n             * @property {Object} [thumb]\n             * @namespace options\n             * @for Uploader\n             * @description 配置生成缩略图的选项。\n             *\n             * 默认为：\n             *\n             * ```javascript\n             * {\n             *     width: 110,\n             *     height: 110,\n             *\n             *     // 图片质量，只有type为`image/jpeg`的时候才有效。\n             *     quality: 70,\n             *\n             *     // 是否允许放大，如果想要生成小图的时候不失真，此选项应该设置为false.\n             *     allowMagnify: true,\n             *\n             *     // 是否允许裁剪。\n             *     crop: true,\n             *\n             *     // 为空的话则保留原有图片格式。\n             *     // 否则强制转换成指定的类型。\n             *     type: 'image/jpeg'\n             * }\n             * ```\n             */\n            thumb: {\n                width: 110,\n                height: 110,\n                quality: 70,\n                allowMagnify: true,\n                crop: true,\n                preserveHeaders: false,\n    \n                // 为空的话则保留原有图片格式。\n                // 否则强制转换成指定的类型。\n                // IE 8下面 base64 大小不能超过 32K 否则预览失败，而非 jpeg 编码的图片很可\n                // 能会超过 32k, 所以这里设置成预览的时候都是 image/jpeg\n                type: 'image/jpeg'\n            },\n    \n            /**\n             * @property {Object} [compress]\n             * @namespace options\n             * @for Uploader\n             * @description 配置压缩的图片的选项。如果此选项为`false`, 则图片在上传前不进行压缩。\n             *\n             * 默认为：\n             *\n             * ```javascript\n             * {\n             *     width: 1600,\n             *     height: 1600,\n             *\n             *     // 图片质量，只有type为`image/jpeg`的时候才有效。\n             *     quality: 90,\n             *\n             *     // 是否允许放大，如果想要生成小图的时候不失真，此选项应该设置为false.\n             *     allowMagnify: false,\n             *\n             *     // 是否允许裁剪。\n             *     crop: false,\n             *\n             *     // 是否保留头部meta信息。\n             *     preserveHeaders: true,\n             *\n             *     // 如果发现压缩后文件大小比原来还大，则使用原来图片\n             *     // 此属性可能会影响图片自动纠正功能\n             *     noCompressIfLarger: false,\n             *\n             *     // 单位字节，如果图片大小小于此值，不会采用压缩。\n             *     compressSize: 0\n             * }\n             * ```\n             */\n            compress: {\n                width: 1600,\n                height: 1600,\n                quality: 90,\n                allowMagnify: false,\n                crop: false,\n                preserveHeaders: true\n            }\n        });\n    \n        return Uploader.register({\n    \n            name: 'image',\n    \n    \n            /**\n             * 生成缩略图，此过程为异步，所以需要传入`callback`。\n             * 通常情况在图片加入队里后调用此方法来生成预览图以增强交互效果。\n             *\n             * 当 width 或者 height 的值介于 0 - 1 时，被当成百分比使用。\n             *\n             * `callback`中可以接收到两个参数。\n             * * 第一个为error，如果生成缩略图有错误，此error将为真。\n             * * 第二个为ret, 缩略图的Data URL值。\n             *\n             * **注意**\n             * Date URL在IE6/7中不支持，所以不用调用此方法了，直接显示一张暂不支持预览图片好了。\n             * 也可以借助服务端，将 base64 数据传给服务端，生成一个临时文件供预览。\n             *\n             * @method makeThumb\n             * @grammar makeThumb( file, callback ) => undefined\n             * @grammar makeThumb( file, callback, width, height ) => undefined\n             * @for Uploader\n             * @example\n             *\n             * uploader.on( 'fileQueued', function( file ) {\n             *     var $li = ...;\n             *\n             *     uploader.makeThumb( file, function( error, ret ) {\n             *         if ( error ) {\n             *             $li.text('预览错误');\n             *         } else {\n             *             $li.append('<img alt=\"\" src=\"' + ret + '\" />');\n             *         }\n             *     });\n             *\n             * });\n             */\n            makeThumb: function( file, cb, width, height ) {\n                var opts, image;\n    \n                file = this.request( 'get-file', file );\n    \n                // 只预览图片格式。\n                if ( !file.type.match( /^image/ ) ) {\n                    cb( true );\n                    return;\n                }\n    \n                opts = $.extend({}, this.options.thumb );\n    \n                // 如果传入的是object.\n                if ( $.isPlainObject( width ) ) {\n                    opts = $.extend( opts, width );\n                    width = null;\n                }\n    \n                width = width || opts.width;\n                height = height || opts.height;\n    \n                image = new Image( opts );\n    \n                image.once( 'load', function() {\n                    file._info = file._info || image.info();\n                    file._meta = file._meta || image.meta();\n    \n                    // 如果 width 的值介于 0 - 1\n                    // 说明设置的是百分比。\n                    if ( width <= 1 && width > 0 ) {\n                        width = file._info.width * width;\n                    }\n    \n                    // 同样的规则应用于 height\n                    if ( height <= 1 && height > 0 ) {\n                        height = file._info.height * height;\n                    }\n    \n                    image.resize( width, height );\n                });\n    \n                // 当 resize 完后\n                image.once( 'complete', function() {\n                    cb( false, image.getAsDataUrl( opts.type ) );\n                    image.destroy();\n                });\n    \n                image.once( 'error', function( reason ) {\n                    cb( reason || true );\n                    image.destroy();\n                });\n    \n                throttle( image, file.source.size, function() {\n                    file._info && image.info( file._info );\n                    file._meta && image.meta( file._meta );\n                    image.loadFromBlob( file.source );\n                });\n            },\n    \n            beforeSendFile: function( file ) {\n                var opts = this.options.compress || this.options.resize,\n                    compressSize = opts && opts.compressSize || 0,\n                    noCompressIfLarger = opts && opts.noCompressIfLarger || false,\n                    image, deferred;\n    \n                file = this.request( 'get-file', file );\n    \n                // 只压缩 jpeg 图片格式。\n                // gif 可能会丢失针\n                // bmp png 基本上尺寸都不大，且压缩比比较小。\n                if ( !opts || !~'image/jpeg,image/jpg'.indexOf( file.type ) ||\n                        file.size < compressSize ||\n                        file._compressed ) {\n                    return;\n                }\n    \n                opts = $.extend({}, opts );\n                deferred = Base.Deferred();\n    \n                image = new Image( opts );\n    \n                deferred.always(function() {\n                    image.destroy();\n                    image = null;\n                });\n                image.once( 'error', deferred.reject );\n                image.once( 'load', function() {\n                    var width = opts.width,\n                        height = opts.height;\n    \n                    file._info = file._info || image.info();\n                    file._meta = file._meta || image.meta();\n    \n                    // 如果 width 的值介于 0 - 1\n                    // 说明设置的是百分比。\n                    if ( width <= 1 && width > 0 ) {\n                        width = file._info.width * width;\n                    }\n    \n                    // 同样的规则应用于 height\n                    if ( height <= 1 && height > 0 ) {\n                        height = file._info.height * height;\n                    }\n    \n                    image.resize( width, height );\n                });\n    \n                image.once( 'complete', function() {\n                    var blob, size;\n    \n                    // 移动端 UC / qq 浏览器的无图模式下\n                    // ctx.getImageData 处理大图的时候会报 Exception\n                    // INDEX_SIZE_ERR: DOM Exception 1\n                    try {\n                        blob = image.getAsBlob( opts.type );\n    \n                        size = file.size;\n    \n                        // 如果压缩后，比原来还大则不用压缩后的。\n                        if ( !noCompressIfLarger || blob.size < size ) {\n                            // file.source.destroy && file.source.destroy();\n                            file.source = blob;\n                            file.size = blob.size;\n    \n                            file.trigger( 'resize', blob.size, size );\n                        }\n    \n                        // 标记，避免重复压缩。\n                        file._compressed = true;\n                        deferred.resolve();\n                    } catch ( e ) {\n                        // 出错了直接继续，让其上传原始图片\n                        deferred.resolve();\n                    }\n                });\n    \n                file._info && image.info( file._info );\n                file._meta && image.meta( file._meta );\n    \n                image.loadFromBlob( file.source );\n                return deferred.promise();\n            }\n        });\n    });\n    /**\n     * @fileOverview 文件属性封装\n     */\n    define('file',[\n        'base',\n        'mediator'\n    ], function( Base, Mediator ) {\n    \n        var $ = Base.$,\n            idPrefix = 'WU_FILE_',\n            idSuffix = 0,\n            rExt = /\\.([^.]+)$/,\n            statusMap = {};\n    \n        function gid() {\n            return idPrefix + idSuffix++;\n        }\n    \n        /**\n         * 文件类\n         * @class File\n         * @constructor 构造函数\n         * @grammar new File( source ) => File\n         * @param {Lib.File} source [lib.File](#Lib.File)实例, 此source对象是带有Runtime信息的。\n         */\n        function WUFile( source ) {\n    \n            /**\n             * 文件名，包括扩展名（后缀）\n             * @property name\n             * @type {string}\n             */\n            this.name = source.name || 'Untitled';\n    \n            /**\n             * 文件体积（字节）\n             * @property size\n             * @type {uint}\n             * @default 0\n             */\n            this.size = source.size || 0;\n    \n            /**\n             * 文件MIMETYPE类型，与文件类型的对应关系请参考[http://t.cn/z8ZnFny](http://t.cn/z8ZnFny)\n             * @property type\n             * @type {string}\n             * @default 'application/octet-stream'\n             */\n            this.type = source.type || 'application/octet-stream';\n    \n            /**\n             * 文件最后修改日期\n             * @property lastModifiedDate\n             * @type {int}\n             * @default 当前时间戳\n             */\n            this.lastModifiedDate = source.lastModifiedDate || (new Date() * 1);\n    \n            /**\n             * 文件ID，每个对象具有唯一ID，与文件名无关\n             * @property id\n             * @type {string}\n             */\n            this.id = gid();\n    \n            /**\n             * 文件扩展名，通过文件名获取，例如test.png的扩展名为png\n             * @property ext\n             * @type {string}\n             */\n            this.ext = rExt.exec( this.name ) ? RegExp.$1 : '';\n    \n    \n            /**\n             * 状态文字说明。在不同的status语境下有不同的用途。\n             * @property statusText\n             * @type {string}\n             */\n            this.statusText = '';\n    \n            // 存储文件状态，防止通过属性直接修改\n            statusMap[ this.id ] = WUFile.Status.INITED;\n    \n            this.source = source;\n            this.loaded = 0;\n    \n            this.on( 'error', function( msg ) {\n                this.setStatus( WUFile.Status.ERROR, msg );\n            });\n        }\n    \n        $.extend( WUFile.prototype, {\n    \n            /**\n             * 设置状态，状态变化时会触发`change`事件。\n             * @method setStatus\n             * @grammar setStatus( status[, statusText] );\n             * @param {File.Status|String} status [文件状态值](#WebUploader:File:File.Status)\n             * @param {String} [statusText=''] 状态说明，常在error时使用，用http, abort,server等来标记是由于什么原因导致文件错误。\n             */\n            setStatus: function( status, text ) {\n    \n                var prevStatus = statusMap[ this.id ];\n    \n                typeof text !== 'undefined' && (this.statusText = text);\n    \n                if ( status !== prevStatus ) {\n                    statusMap[ this.id ] = status;\n                    /**\n                     * 文件状态变化\n                     * @event statuschange\n                     */\n                    this.trigger( 'statuschange', status, prevStatus );\n                }\n    \n            },\n    \n            /**\n             * 获取文件状态\n             * @return {File.Status}\n             * @example\n                     文件状态具体包括以下几种类型：\n                     {\n                         // 初始化\n                        INITED:     0,\n                        // 已入队列\n                        QUEUED:     1,\n                        // 正在上传\n                        PROGRESS:     2,\n                        // 上传出错\n                        ERROR:         3,\n                        // 上传成功\n                        COMPLETE:     4,\n                        // 上传取消\n                        CANCELLED:     5\n                    }\n             */\n            getStatus: function() {\n                return statusMap[ this.id ];\n            },\n    \n            /**\n             * 获取文件原始信息。\n             * @return {*}\n             */\n            getSource: function() {\n                return this.source;\n            },\n    \n            destroy: function() {\n                this.off();\n                delete statusMap[ this.id ];\n            }\n        });\n    \n        Mediator.installTo( WUFile.prototype );\n    \n        /**\n         * 文件状态值，具体包括以下几种类型：\n         * * `inited` 初始状态\n         * * `queued` 已经进入队列, 等待上传\n         * * `progress` 上传中\n         * * `complete` 上传完成。\n         * * `error` 上传出错，可重试\n         * * `interrupt` 上传中断，可续传。\n         * * `invalid` 文件不合格，不能重试上传。会自动从队列中移除。\n         * * `cancelled` 文件被移除。\n         * @property {Object} Status\n         * @namespace File\n         * @class File\n         * @static\n         */\n        WUFile.Status = {\n            INITED:     'inited',    // 初始状态\n            QUEUED:     'queued',    // 已经进入队列, 等待上传\n            PROGRESS:   'progress',    // 上传中\n            ERROR:      'error',    // 上传出错，可重试\n            COMPLETE:   'complete',    // 上传完成。\n            CANCELLED:  'cancelled',    // 上传取消。\n            INTERRUPT:  'interrupt',    // 上传中断，可续传。\n            INVALID:    'invalid'    // 文件不合格，不能重试上传。\n        };\n    \n        return WUFile;\n    });\n    \n    /**\n     * @fileOverview 文件队列\n     */\n    define('queue',[\n        'base',\n        'mediator',\n        'file'\n    ], function( Base, Mediator, WUFile ) {\n    \n        var $ = Base.$,\n            STATUS = WUFile.Status;\n    \n        /**\n         * 文件队列, 用来存储各个状态中的文件。\n         * @class Queue\n         * @extends Mediator\n         */\n        function Queue() {\n    \n            /**\n             * 统计文件数。\n             * * `numOfQueue` 队列中的文件数。\n             * * `numOfSuccess` 上传成功的文件数\n             * * `numOfCancel` 被取消的文件数\n             * * `numOfProgress` 正在上传中的文件数\n             * * `numOfUploadFailed` 上传错误的文件数。\n             * * `numOfInvalid` 无效的文件数。\n             * * `numofDeleted` 被移除的文件数。\n             * @property {Object} stats\n             */\n            this.stats = {\n                numOfQueue: 0,\n                numOfSuccess: 0,\n                numOfCancel: 0,\n                numOfProgress: 0,\n                numOfUploadFailed: 0,\n                numOfInvalid: 0,\n                numofDeleted: 0,\n                numofInterrupt: 0\n            };\n    \n            // 上传队列，仅包括等待上传的文件\n            this._queue = [];\n    \n            // 存储所有文件\n            this._map = {};\n        }\n    \n        $.extend( Queue.prototype, {\n    \n            /**\n             * 将新文件加入对队列尾部\n             *\n             * @method append\n             * @param  {File} file   文件对象\n             */\n            append: function( file ) {\n                this._queue.push( file );\n                this._fileAdded( file );\n                return this;\n            },\n    \n            /**\n             * 将新文件加入对队列头部\n             *\n             * @method prepend\n             * @param  {File} file   文件对象\n             */\n            prepend: function( file ) {\n                this._queue.unshift( file );\n                this._fileAdded( file );\n                return this;\n            },\n    \n            /**\n             * 获取文件对象\n             *\n             * @method getFile\n             * @param  {String} fileId   文件ID\n             * @return {File}\n             */\n            getFile: function( fileId ) {\n                if ( typeof fileId !== 'string' ) {\n                    return fileId;\n                }\n                return this._map[ fileId ];\n            },\n    \n            /**\n             * 从队列中取出一个指定状态的文件。\n             * @grammar fetch( status ) => File\n             * @method fetch\n             * @param {String} status [文件状态值](#WebUploader:File:File.Status)\n             * @return {File} [File](#WebUploader:File)\n             */\n            fetch: function( status ) {\n                var len = this._queue.length,\n                    i, file;\n    \n                status = status || STATUS.QUEUED;\n    \n                for ( i = 0; i < len; i++ ) {\n                    file = this._queue[ i ];\n    \n                    if ( status === file.getStatus() ) {\n                        return file;\n                    }\n                }\n    \n                return null;\n            },\n    \n            /**\n             * 对队列进行排序，能够控制文件上传顺序。\n             * @grammar sort( fn ) => undefined\n             * @method sort\n             * @param {Function} fn 排序方法\n             */\n            sort: function( fn ) {\n                if ( typeof fn === 'function' ) {\n                    this._queue.sort( fn );\n                }\n            },\n    \n            /**\n             * 获取指定类型的文件列表, 列表中每一个成员为[File](#WebUploader:File)对象。\n             * @grammar getFiles( [status1[, status2 ...]] ) => Array\n             * @method getFiles\n             * @param {String} [status] [文件状态值](#WebUploader:File:File.Status)\n             */\n            getFiles: function() {\n                var sts = [].slice.call( arguments, 0 ),\n                    ret = [],\n                    i = 0,\n                    len = this._queue.length,\n                    file;\n    \n                for ( ; i < len; i++ ) {\n                    file = this._queue[ i ];\n    \n                    if ( sts.length && !~$.inArray( file.getStatus(), sts ) ) {\n                        continue;\n                    }\n    \n                    ret.push( file );\n                }\n    \n                return ret;\n            },\n    \n            /**\n             * 在队列中删除文件。\n             * @grammar removeFile( file ) => Array\n             * @method removeFile\n             * @param {File} 文件对象。\n             */\n            removeFile: function( file ) {\n                var me = this,\n                    existing = this._map[ file.id ];\n    \n                if ( existing ) {\n                    delete this._map[ file.id ];\n                    file.destroy();\n                    this.stats.numofDeleted++;\n                }\n            },\n    \n            _fileAdded: function( file ) {\n                var me = this,\n                    existing = this._map[ file.id ];\n    \n                if ( !existing ) {\n                    this._map[ file.id ] = file;\n    \n                    file.on( 'statuschange', function( cur, pre ) {\n                        me._onFileStatusChange( cur, pre );\n                    });\n                }\n            },\n    \n            _onFileStatusChange: function( curStatus, preStatus ) {\n                var stats = this.stats;\n    \n                switch ( preStatus ) {\n                    case STATUS.PROGRESS:\n                        stats.numOfProgress--;\n                        break;\n    \n                    case STATUS.QUEUED:\n                        stats.numOfQueue --;\n                        break;\n    \n                    case STATUS.ERROR:\n                        stats.numOfUploadFailed--;\n                        break;\n    \n                    case STATUS.INVALID:\n                        stats.numOfInvalid--;\n                        break;\n    \n                    case STATUS.INTERRUPT:\n                        stats.numofInterrupt--;\n                        break;\n                }\n    \n                switch ( curStatus ) {\n                    case STATUS.QUEUED:\n                        stats.numOfQueue++;\n                        break;\n    \n                    case STATUS.PROGRESS:\n                        stats.numOfProgress++;\n                        break;\n    \n                    case STATUS.ERROR:\n                        stats.numOfUploadFailed++;\n                        break;\n    \n                    case STATUS.COMPLETE:\n                        stats.numOfSuccess++;\n                        break;\n    \n                    case STATUS.CANCELLED:\n                        stats.numOfCancel++;\n                        break;\n    \n    \n                    case STATUS.INVALID:\n                        stats.numOfInvalid++;\n                        break;\n    \n                    case STATUS.INTERRUPT:\n                        stats.numofInterrupt++;\n                        break;\n                }\n            }\n    \n        });\n    \n        Mediator.installTo( Queue.prototype );\n    \n        return Queue;\n    });\n    /**\n     * @fileOverview 队列\n     */\n    define('widgets/queue',[\n        'base',\n        'uploader',\n        'queue',\n        'file',\n        'lib/file',\n        'runtime/client',\n        'widgets/widget'\n    ], function( Base, Uploader, Queue, WUFile, File, RuntimeClient ) {\n    \n        var $ = Base.$,\n            rExt = /\\.\\w+$/,\n            Status = WUFile.Status;\n    \n        return Uploader.register({\n            name: 'queue',\n    \n            init: function( opts ) {\n                var me = this,\n                    deferred, len, i, item, arr, accept, runtime;\n    \n                if ( $.isPlainObject( opts.accept ) ) {\n                    opts.accept = [ opts.accept ];\n                }\n    \n                // accept中的中生成匹配正则。\n                if ( opts.accept ) {\n                    arr = [];\n    \n                    for ( i = 0, len = opts.accept.length; i < len; i++ ) {\n                        item = opts.accept[ i ].extensions;\n                        item && arr.push( item );\n                    }\n    \n                    if ( arr.length ) {\n                        accept = '\\\\.' + arr.join(',')\n                                .replace( /,/g, '$|\\\\.' )\n                                .replace( /\\*/g, '.*' ) + '$';\n                    }\n    \n                    me.accept = new RegExp( accept, 'i' );\n                }\n    \n                me.queue = new Queue();\n                me.stats = me.queue.stats;\n    \n                // 如果当前不是html5运行时，那就算了。\n                // 不执行后续操作\n                if ( this.request('predict-runtime-type') !== 'html5' ) {\n                    return;\n                }\n    \n                // 创建一个 html5 运行时的 placeholder\n                // 以至于外部添加原生 File 对象的时候能正确包裹一下供 webuploader 使用。\n                deferred = Base.Deferred();\n                this.placeholder = runtime = new RuntimeClient('Placeholder');\n                runtime.connectRuntime({\n                    runtimeOrder: 'html5'\n                }, function() {\n                    me._ruid = runtime.getRuid();\n                    deferred.resolve();\n                });\n                return deferred.promise();\n            },\n    \n    \n            // 为了支持外部直接添加一个原生File对象。\n            _wrapFile: function( file ) {\n                if ( !(file instanceof WUFile) ) {\n    \n                    if ( !(file instanceof File) ) {\n                        if ( !this._ruid ) {\n                            throw new Error('Can\\'t add external files.');\n                        }\n                        file = new File( this._ruid, file );\n                    }\n    \n                    file = new WUFile( file );\n                }\n    \n                return file;\n            },\n    \n            // 判断文件是否可以被加入队列\n            acceptFile: function( file ) {\n                var invalid = !file || !file.size || this.accept &&\n    \n                        // 如果名字中有后缀，才做后缀白名单处理。\n                        rExt.exec( file.name ) && !this.accept.test( file.name );\n    \n                return !invalid;\n            },\n    \n    \n            /**\n             * @event beforeFileQueued\n             * @param {File} file File对象\n             * @description 当文件被加入队列之前触发，此事件的handler返回值为`false`，则此文件不会被添加进入队列。\n             * @for  Uploader\n             */\n    \n            /**\n             * @event fileQueued\n             * @param {File} file File对象\n             * @description 当文件被加入队列以后触发。\n             * @for  Uploader\n             */\n    \n            _addFile: function( file ) {\n                var me = this;\n    \n                file = me._wrapFile( file );\n    \n                // 不过类型判断允许不允许，先派送 `beforeFileQueued`\n                if ( !me.owner.trigger( 'beforeFileQueued', file ) ) {\n                    return;\n                }\n    \n                // 类型不匹配，则派送错误事件，并返回。\n                if ( !me.acceptFile( file ) ) {\n                    me.owner.trigger( 'error', 'Q_TYPE_DENIED', file );\n                    return;\n                }\n    \n                me.queue.append( file );\n                me.owner.trigger( 'fileQueued', file );\n                return file;\n            },\n    \n            getFile: function( fileId ) {\n                return this.queue.getFile( fileId );\n            },\n    \n            /**\n             * @event filesQueued\n             * @param {File} files 数组，内容为原始File(lib/File）对象。\n             * @description 当一批文件添加进队列以后触发。\n             * @for  Uploader\n             */\n            \n            /**\n             * @property {Boolean} [auto=false]\n             * @namespace options\n             * @for Uploader\n             * @description 设置为 true 后，不需要手动调用上传，有文件选择即开始上传。\n             * \n             */\n    \n            /**\n             * @method addFiles\n             * @grammar addFiles( file ) => undefined\n             * @grammar addFiles( [file1, file2 ...] ) => undefined\n             * @param {Array of File or File} [files] Files 对象 数组\n             * @description 添加文件到队列\n             * @for  Uploader\n             */\n            addFile: function( files ) {\n                var me = this;\n    \n                if ( !files.length ) {\n                    files = [ files ];\n                }\n    \n                files = $.map( files, function( file ) {\n                    return me._addFile( file );\n                });\n    \t\t\t\n    \t\t\tif ( files.length ) {\n    \n                    me.owner.trigger( 'filesQueued', files );\n    \n    \t\t\t\tif ( me.options.auto ) {\n    \t\t\t\t\tsetTimeout(function() {\n    \t\t\t\t\t\tme.request('start-upload');\n    \t\t\t\t\t}, 20 );\n    \t\t\t\t}\n                }\n            },\n    \n            getStats: function() {\n                return this.stats;\n            },\n    \n            /**\n             * @event fileDequeued\n             * @param {File} file File对象\n             * @description 当文件被移除队列后触发。\n             * @for  Uploader\n             */\n    \n             /**\n             * @method removeFile\n             * @grammar removeFile( file ) => undefined\n             * @grammar removeFile( id ) => undefined\n             * @grammar removeFile( file, true ) => undefined\n             * @grammar removeFile( id, true ) => undefined\n             * @param {File|id} file File对象或这File对象的id\n             * @description 移除某一文件, 默认只会标记文件状态为已取消，如果第二个参数为 `true` 则会从 queue 中移除。\n             * @for  Uploader\n             * @example\n             *\n             * $li.on('click', '.remove-this', function() {\n             *     uploader.removeFile( file );\n             * })\n             */\n            removeFile: function( file, remove ) {\n                var me = this;\n    \n                file = file.id ? file : me.queue.getFile( file );\n    \n                this.request( 'cancel-file', file );\n    \n                if ( remove ) {\n                    this.queue.removeFile( file );\n                }\n            },\n    \n            /**\n             * @method getFiles\n             * @grammar getFiles() => Array\n             * @grammar getFiles( status1, status2, status... ) => Array\n             * @description 返回指定状态的文件集合，不传参数将返回所有状态的文件。\n             * @for  Uploader\n             * @example\n             * console.log( uploader.getFiles() );    // => all files\n             * console.log( uploader.getFiles('error') )    // => all error files.\n             */\n            getFiles: function() {\n                return this.queue.getFiles.apply( this.queue, arguments );\n            },\n    \n            fetchFile: function() {\n                return this.queue.fetch.apply( this.queue, arguments );\n            },\n    \n            /**\n             * @method retry\n             * @grammar retry() => undefined\n             * @grammar retry( file ) => undefined\n             * @description 重试上传，重试指定文件，或者从出错的文件开始重新上传。\n             * @for  Uploader\n             * @example\n             * function retry() {\n             *     uploader.retry();\n             * }\n             */\n            retry: function( file, noForceStart ) {\n                var me = this,\n                    files, i, len;\n    \n                if ( file ) {\n                    file = file.id ? file : me.queue.getFile( file );\n                    file.setStatus( Status.QUEUED );\n                    noForceStart || me.request('start-upload');\n                    return;\n                }\n    \n                files = me.queue.getFiles( Status.ERROR );\n                i = 0;\n                len = files.length;\n    \n                for ( ; i < len; i++ ) {\n                    file = files[ i ];\n                    file.setStatus( Status.QUEUED );\n                }\n    \n                me.request('start-upload');\n            },\n    \n            /**\n             * @method sort\n             * @grammar sort( fn ) => undefined\n             * @description 排序队列中的文件，在上传之前调整可以控制上传顺序。\n             * @for  Uploader\n             */\n            sortFiles: function() {\n                return this.queue.sort.apply( this.queue, arguments );\n            },\n    \n            /**\n             * @event reset\n             * @description 当 uploader 被重置的时候触发。\n             * @for  Uploader\n             */\n    \n            /**\n             * @method reset\n             * @grammar reset() => undefined\n             * @description 重置uploader。目前只重置了队列。\n             * @for  Uploader\n             * @example\n             * uploader.reset();\n             */\n            reset: function() {\n                this.owner.trigger('reset');\n                this.queue = new Queue();\n                this.stats = this.queue.stats;\n            },\n    \n            destroy: function() {\n                this.reset();\n                this.placeholder && this.placeholder.destroy();\n            }\n        });\n    \n    });\n    /**\n     * @fileOverview 添加获取Runtime相关信息的方法。\n     */\n    define('widgets/runtime',[\n        'uploader',\n        'runtime/runtime',\n        'widgets/widget'\n    ], function( Uploader, Runtime ) {\n    \n        Uploader.support = function() {\n            return Runtime.hasRuntime.apply( Runtime, arguments );\n        };\n    \n        /**\n         * @property {Object} [runtimeOrder=html5,flash]\n         * @namespace options\n         * @for Uploader\n         * @description 指定运行时启动顺序。默认会想尝试 html5 是否支持，如果支持则使用 html5, 否则则使用 flash.\n         *\n         * 可以将此值设置成 `flash`，来强制使用 flash 运行时。\n         */\n    \n        return Uploader.register({\n            name: 'runtime',\n    \n            init: function() {\n                if ( !this.predictRuntimeType() ) {\n                    throw Error('Runtime Error');\n                }\n            },\n    \n            /**\n             * 预测Uploader将采用哪个`Runtime`\n             * @grammar predictRuntimeType() => String\n             * @method predictRuntimeType\n             * @for  Uploader\n             */\n            predictRuntimeType: function() {\n                var orders = this.options.runtimeOrder || Runtime.orders,\n                    type = this.type,\n                    i, len;\n    \n                if ( !type ) {\n                    orders = orders.split( /\\s*,\\s*/g );\n    \n                    for ( i = 0, len = orders.length; i < len; i++ ) {\n                        if ( Runtime.hasRuntime( orders[ i ] ) ) {\n                            this.type = type = orders[ i ];\n                            break;\n                        }\n                    }\n                }\n    \n                return type;\n            }\n        });\n    });\n    /**\n     * @fileOverview Transport\n     */\n    define('lib/transport',[\n        'base',\n        'runtime/client',\n        'mediator'\n    ], function( Base, RuntimeClient, Mediator ) {\n    \n        var $ = Base.$;\n    \n        function Transport( opts ) {\n            var me = this;\n    \n            opts = me.options = $.extend( true, {}, Transport.options, opts || {} );\n            RuntimeClient.call( this, 'Transport' );\n    \n            this._blob = null;\n            this._formData = opts.formData || {};\n            this._headers = opts.headers || {};\n    \n            this.on( 'progress', this._timeout );\n            this.on( 'load error', function() {\n                me.trigger( 'progress', 1 );\n                clearTimeout( me._timer );\n            });\n        }\n    \n        Transport.options = {\n            server: '',\n            method: 'POST',\n    \n            // 跨域时，是否允许携带cookie, 只有html5 runtime才有效\n            withCredentials: false,\n            fileVal: 'file',\n            timeout: 2 * 60 * 1000,    // 2分钟\n            formData: {},\n            headers: {},\n            sendAsBinary: false\n        };\n    \n        $.extend( Transport.prototype, {\n    \n            // 添加Blob, 只能添加一次，最后一次有效。\n            appendBlob: function( key, blob, filename ) {\n                var me = this,\n                    opts = me.options;\n    \n                if ( me.getRuid() ) {\n                    me.disconnectRuntime();\n                }\n    \n                // 连接到blob归属的同一个runtime.\n                me.connectRuntime( blob.ruid, function() {\n                    me.exec('init');\n                });\n    \n                me._blob = blob;\n                opts.fileVal = key || opts.fileVal;\n                opts.filename = filename || opts.filename;\n            },\n    \n            // 添加其他字段\n            append: function( key, value ) {\n                if ( typeof key === 'object' ) {\n                    $.extend( this._formData, key );\n                } else {\n                    this._formData[ key ] = value;\n                }\n            },\n    \n            setRequestHeader: function( key, value ) {\n                if ( typeof key === 'object' ) {\n                    $.extend( this._headers, key );\n                } else {\n                    this._headers[ key ] = value;\n                }\n            },\n    \n            send: function( method ) {\n                this.exec( 'send', method );\n                this._timeout();\n            },\n    \n            abort: function() {\n                clearTimeout( this._timer );\n                return this.exec('abort');\n            },\n    \n            destroy: function() {\n                this.trigger('destroy');\n                this.off();\n                this.exec('destroy');\n                this.disconnectRuntime();\n            },\n    \n            getResponse: function() {\n                return this.exec('getResponse');\n            },\n    \n            getResponseAsJson: function() {\n                return this.exec('getResponseAsJson');\n            },\n    \n            getStatus: function() {\n                return this.exec('getStatus');\n            },\n    \n            _timeout: function() {\n                var me = this,\n                    duration = me.options.timeout;\n    \n                if ( !duration ) {\n                    return;\n                }\n    \n                clearTimeout( me._timer );\n                me._timer = setTimeout(function() {\n                    me.abort();\n                    me.trigger( 'error', 'timeout' );\n                }, duration );\n            }\n    \n        });\n    \n        // 让Transport具备事件功能。\n        Mediator.installTo( Transport.prototype );\n    \n        return Transport;\n    });\n    /**\n     * @fileOverview 负责文件上传相关。\n     */\n    define('widgets/upload',[\n        'base',\n        'uploader',\n        'file',\n        'lib/transport',\n        'widgets/widget'\n    ], function( Base, Uploader, WUFile, Transport ) {\n    \n        var $ = Base.$,\n            isPromise = Base.isPromise,\n            Status = WUFile.Status;\n    \n        // 添加默认配置项\n        $.extend( Uploader.options, {\n    \n    \n            /**\n             * @property {Boolean} [prepareNextFile=false]\n             * @namespace options\n             * @for Uploader\n             * @description 是否允许在文件传输时提前把下一个文件准备好。\n             * 对于一个文件的准备工作比较耗时，比如图片压缩，md5序列化。\n             * 如果能提前在当前文件传输期处理，可以节省总体耗时。\n             */\n            prepareNextFile: false,\n    \n            /**\n             * @property {Boolean} [chunked=false]\n             * @namespace options\n             * @for Uploader\n             * @description 是否要分片处理大文件上传。\n             */\n            chunked: false,\n    \n            /**\n             * @property {Boolean} [chunkSize=5242880]\n             * @namespace options\n             * @for Uploader\n             * @description 如果要分片，分多大一片？ 默认大小为5M.\n             */\n            chunkSize: 5 * 1024 * 1024,\n    \n            /**\n             * @property {Boolean} [chunkRetry=2]\n             * @namespace options\n             * @for Uploader\n             * @description 如果某个分片由于网络问题出错，允许自动重传多少次？\n             */\n            chunkRetry: 2,\n    \n            /**\n             * @property {Boolean} [threads=3]\n             * @namespace options\n             * @for Uploader\n             * @description 上传并发数。允许同时最大上传进程数。\n             */\n            threads: 3,\n    \n    \n            /**\n             * @property {Object} [formData={}]\n             * @namespace options\n             * @for Uploader\n             * @description 文件上传请求的参数表，每次发送都会发送此对象中的参数。\n             */\n            formData: {}\n    \n            /**\n             * @property {Object} [fileVal='file']\n             * @namespace options\n             * @for Uploader\n             * @description 设置文件上传域的name。\n             */\n    \n            /**\n             * @property {Object} [sendAsBinary=false]\n             * @namespace options\n             * @for Uploader\n             * @description 是否已二进制的流的方式发送文件，这样整个上传内容`php://input`都为文件内容，\n             * 其他参数在$_GET数组中。\n             */\n        });\n    \n        // 负责将文件切片。\n        function CuteFile( file, chunkSize ) {\n            var pending = [],\n                blob = file.source,\n                total = blob.size,\n                chunks = chunkSize ? Math.ceil( total / chunkSize ) : 1,\n                start = 0,\n                index = 0,\n                len, api;\n    \n            api = {\n                file: file,\n    \n                has: function() {\n                    return !!pending.length;\n                },\n    \n                shift: function() {\n                    return pending.shift();\n                },\n    \n                unshift: function( block ) {\n                    pending.unshift( block );\n                }\n            };\n    \n            while ( index < chunks ) {\n                len = Math.min( chunkSize, total - start );\n    \n                pending.push({\n                    file: file,\n                    start: start,\n                    end: chunkSize ? (start + len) : total,\n                    total: total,\n                    chunks: chunks,\n                    chunk: index++,\n                    cuted: api\n                });\n                start += len;\n            }\n    \n            file.blocks = pending.concat();\n            file.remaning = pending.length;\n    \n            return api;\n        }\n    \n        Uploader.register({\n            name: 'upload',\n    \n            init: function() {\n                var owner = this.owner,\n                    me = this;\n    \n                this.runing = false;\n                this.progress = false;\n    \n                owner\n                    .on( 'startUpload', function() {\n                        me.progress = true;\n                    })\n                    .on( 'uploadFinished', function() {\n                        me.progress = false;\n                    });\n    \n                // 记录当前正在传的数据，跟threads相关\n                this.pool = [];\n    \n                // 缓存分好片的文件。\n                this.stack = [];\n    \n                // 缓存即将上传的文件。\n                this.pending = [];\n    \n                // 跟踪还有多少分片在上传中但是没有完成上传。\n                this.remaning = 0;\n                this.__tick = Base.bindFn( this._tick, this );\n    \n                // 销毁上传相关的属性。\n                owner.on( 'uploadComplete', function( file ) {\n    \n                    // 把其他块取消了。\n                    file.blocks && $.each( file.blocks, function( _, v ) {\n                        v.transport && (v.transport.abort(), v.transport.destroy());\n                        delete v.transport;\n                    });\n    \n                    delete file.blocks;\n                    delete file.remaning;\n                });\n            },\n    \n            reset: function() {\n                this.request( 'stop-upload', true );\n                this.runing = false;\n                this.pool = [];\n                this.stack = [];\n                this.pending = [];\n                this.remaning = 0;\n                this._trigged = false;\n                this._promise = null;\n            },\n    \n            /**\n             * @event startUpload\n             * @description 当开始上传流程时触发。\n             * @for  Uploader\n             */\n    \n            /**\n             * 开始上传。此方法可以从初始状态调用开始上传流程，也可以从暂停状态调用，继续上传流程。\n             *\n             * 可以指定开始某一个文件。\n             * @grammar upload() => undefined\n             * @grammar upload( file | fileId) => undefined\n             * @method upload\n             * @for  Uploader\n             */\n            startUpload: function(file) {\n                var me = this;\n    \n                // 移出invalid的文件\n                $.each( me.request( 'get-files', Status.INVALID ), function() {\n                    me.request( 'remove-file', this );\n                });\n    \n                // 如果指定了开始某个文件，则只开始指定的文件。\n                if ( file ) {\n                    file = file.id ? file : me.request( 'get-file', file );\n    \n                    if (file.getStatus() === Status.INTERRUPT) {\n                        file.setStatus( Status.QUEUED );\n    \n                        $.each( me.pool, function( _, v ) {\n    \n                            // 之前暂停过。\n                            if (v.file !== file) {\n                                return;\n                            }\n    \n                            v.transport && v.transport.send();\n                            file.setStatus( Status.PROGRESS );\n                        });\n    \n                        \n                    } else if (file.getStatus() !== Status.PROGRESS) {\n                        file.setStatus( Status.QUEUED );\n                    }\n                } else {\n                    $.each( me.request( 'get-files', [ Status.INITED ] ), function() {\n                        this.setStatus( Status.QUEUED );\n                    });\n                }\n    \n                if ( me.runing ) {\n                    return Base.nextTick( me.__tick );\n                }\n    \n                me.runing = true;\n                var files = [];\n    \n                // 如果有暂停的，则续传\n                file || $.each( me.pool, function( _, v ) {\n                    var file = v.file;\n    \n                    if ( file.getStatus() === Status.INTERRUPT ) {\n                        me._trigged = false;\n                        files.push(file);\n                        v.transport && v.transport.send();\n                    }\n                });\n    \n                $.each(files, function() {\n                    this.setStatus( Status.PROGRESS );\n                });\n    \n                file || $.each( me.request( 'get-files',\n                        Status.INTERRUPT ), function() {\n                    this.setStatus( Status.PROGRESS );\n                });\n    \n                me._trigged = false;\n                Base.nextTick( me.__tick );\n                me.owner.trigger('startUpload');\n            },\n    \n            /**\n             * @event stopUpload\n             * @description 当开始上传流程暂停时触发。\n             * @for  Uploader\n             */\n    \n            /**\n             * 暂停上传。第一个参数为是否中断上传当前正在上传的文件。\n             *\n             * 如果第一个参数是文件，则只暂停指定文件。\n             * @grammar stop() => undefined\n             * @grammar stop( true ) => undefined\n             * @grammar stop( file ) => undefined\n             * @method stop\n             * @for  Uploader\n             */\n            stopUpload: function( file, interrupt ) {\n                var me = this,\n                    block;\n    \n                if (file === true) {\n                    interrupt = file;\n                    file = null;\n                }\n    \n                if ( me.runing === false ) {\n                    return;\n                }\n    \n                // 如果只是暂停某个文件。\n                if ( file ) {\n                    file = file.id ? file : me.request( 'get-file', file );\n    \n                    if ( file.getStatus() !== Status.PROGRESS &&\n                            file.getStatus() !== Status.QUEUED ) {\n                        return;\n                    }\n    \n                    file.setStatus( Status.INTERRUPT );\n    \n    \n                    $.each( me.pool, function( _, v ) {\n    \n                        // 只 abort 指定的文件。\n                        if (v.file === file) {\n                            block = v;\n                            return false;\n                        }\n                    });\n    \n                    block.transport && block.transport.abort();\n    \n                    if (interrupt) {\n                        me._putback(block);\n                        me._popBlock(block);\n                    }\n    \n                    return Base.nextTick( me.__tick );\n                }\n    \n                me.runing = false;\n    \n                // 正在准备中的文件。\n                if (this._promise && this._promise.file) {\n                    this._promise.file.setStatus( Status.INTERRUPT );\n                }\n    \n                interrupt && $.each( me.pool, function( _, v ) {\n                    v.transport && v.transport.abort();\n                    v.file.setStatus( Status.INTERRUPT );\n                });\n    \n                me.owner.trigger('stopUpload');\n            },\n    \n            /**\n             * @method cancelFile\n             * @grammar cancelFile( file ) => undefined\n             * @grammar cancelFile( id ) => undefined\n             * @param {File|id} file File对象或这File对象的id\n             * @description 标记文件状态为已取消, 同时将中断文件传输。\n             * @for  Uploader\n             * @example\n             *\n             * $li.on('click', '.remove-this', function() {\n             *     uploader.cancelFile( file );\n             * })\n             */\n            cancelFile: function( file ) {\n                file = file.id ? file : this.request( 'get-file', file );\n    \n                // 如果正在上传。\n                file.blocks && $.each( file.blocks, function( _, v ) {\n                    var _tr = v.transport;\n    \n                    if ( _tr ) {\n                        _tr.abort();\n                        _tr.destroy();\n                        delete v.transport;\n                    }\n                });\n    \n                file.setStatus( Status.CANCELLED );\n                this.owner.trigger( 'fileDequeued', file );\n            },\n    \n            /**\n             * 判断`Uplaode`r是否正在上传中。\n             * @grammar isInProgress() => Boolean\n             * @method isInProgress\n             * @for  Uploader\n             */\n            isInProgress: function() {\n                return !!this.progress;\n            },\n    \n            _getStats: function() {\n                return this.request('get-stats');\n            },\n    \n            /**\n             * 掉过一个文件上传，直接标记指定文件为已上传状态。\n             * @grammar skipFile( file ) => undefined\n             * @method skipFile\n             * @for  Uploader\n             */\n            skipFile: function( file, status ) {\n                file = file.id ? file : this.request( 'get-file', file );\n    \n                file.setStatus( status || Status.COMPLETE );\n                file.skipped = true;\n    \n                // 如果正在上传。\n                file.blocks && $.each( file.blocks, function( _, v ) {\n                    var _tr = v.transport;\n    \n                    if ( _tr ) {\n                        _tr.abort();\n                        _tr.destroy();\n                        delete v.transport;\n                    }\n                });\n    \n                this.owner.trigger( 'uploadSkip', file );\n            },\n    \n            /**\n             * @event uploadFinished\n             * @description 当所有文件上传结束时触发。\n             * @for  Uploader\n             */\n            _tick: function() {\n                var me = this,\n                    opts = me.options,\n                    fn, val;\n    \n                // 上一个promise还没有结束，则等待完成后再执行。\n                if ( me._promise ) {\n                    return me._promise.always( me.__tick );\n                }\n    \n                // 还有位置，且还有文件要处理的话。\n                if ( me.pool.length < opts.threads && (val = me._nextBlock()) ) {\n                    me._trigged = false;\n    \n                    fn = function( val ) {\n                        me._promise = null;\n    \n                        // 有可能是reject过来的，所以要检测val的类型。\n                        val && val.file && me._startSend( val );\n                        Base.nextTick( me.__tick );\n                    };\n    \n                    me._promise = isPromise( val ) ? val.always( fn ) : fn( val );\n    \n                // 没有要上传的了，且没有正在传输的了。\n                } else if ( !me.remaning && !me._getStats().numOfQueue &&\n                    !me._getStats().numofInterrupt ) {\n                    me.runing = false;\n    \n                    me._trigged || Base.nextTick(function() {\n                        me.owner.trigger('uploadFinished');\n                    });\n                    me._trigged = true;\n                }\n            },\n    \n            _putback: function(block) {\n                var idx;\n    \n                block.cuted.unshift(block);\n                idx = this.stack.indexOf(block.cuted);\n    \n                if (!~idx) {\n                    this.stack.unshift(block.cuted);\n                }\n            },\n    \n            _getStack: function() {\n                var i = 0,\n                    act;\n    \n                while ( (act = this.stack[ i++ ]) ) {\n                    if ( act.has() && act.file.getStatus() === Status.PROGRESS ) {\n                        return act;\n                    } else if (!act.has() ||\n                            act.file.getStatus() !== Status.PROGRESS &&\n                            act.file.getStatus() !== Status.INTERRUPT ) {\n    \n                        // 把已经处理完了的，或者，状态为非 progress（上传中）、\n                        // interupt（暂停中） 的移除。\n                        this.stack.splice( --i, 1 );\n                    }\n                }\n    \n                return null;\n            },\n    \n            _nextBlock: function() {\n                var me = this,\n                    opts = me.options,\n                    act, next, done, preparing;\n    \n                // 如果当前文件还有没有需要传输的，则直接返回剩下的。\n                if ( (act = this._getStack()) ) {\n    \n                    // 是否提前准备下一个文件\n                    if ( opts.prepareNextFile && !me.pending.length ) {\n                        me._prepareNextFile();\n                    }\n    \n                    return act.shift();\n    \n                // 否则，如果正在运行，则准备下一个文件，并等待完成后返回下个分片。\n                } else if ( me.runing ) {\n    \n                    // 如果缓存中有，则直接在缓存中取，没有则去queue中取。\n                    if ( !me.pending.length && me._getStats().numOfQueue ) {\n                        me._prepareNextFile();\n                    }\n    \n                    next = me.pending.shift();\n                    done = function( file ) {\n                        if ( !file ) {\n                            return null;\n                        }\n    \n                        act = CuteFile( file, opts.chunked ? opts.chunkSize : 0 );\n                        me.stack.push(act);\n                        return act.shift();\n                    };\n    \n                    // 文件可能还在prepare中，也有可能已经完全准备好了。\n                    if ( isPromise( next) ) {\n                        preparing = next.file;\n                        next = next[ next.pipe ? 'pipe' : 'then' ]( done );\n                        next.file = preparing;\n                        return next;\n                    }\n    \n                    return done( next );\n                }\n            },\n    \n    \n            /**\n             * @event uploadStart\n             * @param {File} file File对象\n             * @description 某个文件开始上传前触发，一个文件只会触发一次。\n             * @for  Uploader\n             */\n            _prepareNextFile: function() {\n                var me = this,\n                    file = me.request('fetch-file'),\n                    pending = me.pending,\n                    promise;\n    \n                if ( file ) {\n                    promise = me.request( 'before-send-file', file, function() {\n    \n                        // 有可能文件被skip掉了。文件被skip掉后，状态坑定不是Queued.\n                        if ( file.getStatus() === Status.PROGRESS ||\n                            file.getStatus() === Status.INTERRUPT ) {\n                            return file;\n                        }\n    \n                        return me._finishFile( file );\n                    });\n    \n                    me.owner.trigger( 'uploadStart', file );\n                    file.setStatus( Status.PROGRESS );\n    \n                    promise.file = file;\n    \n                    // 如果还在pending中，则替换成文件本身。\n                    promise.done(function() {\n                        var idx = $.inArray( promise, pending );\n    \n                        ~idx && pending.splice( idx, 1, file );\n                    });\n    \n                    // befeore-send-file的钩子就有错误发生。\n                    promise.fail(function( reason ) {\n                        file.setStatus( Status.ERROR, reason );\n                        me.owner.trigger( 'uploadError', file, reason );\n                        me.owner.trigger( 'uploadComplete', file );\n                    });\n    \n                    pending.push( promise );\n                }\n            },\n    \n            // 让出位置了，可以让其他分片开始上传\n            _popBlock: function( block ) {\n                var idx = $.inArray( block, this.pool );\n    \n                this.pool.splice( idx, 1 );\n                block.file.remaning--;\n                this.remaning--;\n            },\n    \n            // 开始上传，可以被掉过。如果promise被reject了，则表示跳过此分片。\n            _startSend: function( block ) {\n                var me = this,\n                    file = block.file,\n                    promise;\n    \n                // 有可能在 before-send-file 的 promise 期间改变了文件状态。\n                // 如：暂停，取消\n                // 我们不能中断 promise, 但是可以在 promise 完后，不做上传操作。\n                if ( file.getStatus() !== Status.PROGRESS ) {\n    \n                    // 如果是中断，则还需要放回去。\n                    if (file.getStatus() === Status.INTERRUPT) {\n                        me._putback(block);\n                    }\n    \n                    return;\n                }\n    \n                me.pool.push( block );\n                me.remaning++;\n    \n                // 如果没有分片，则直接使用原始的。\n                // 不会丢失content-type信息。\n                block.blob = block.chunks === 1 ? file.source :\n                        file.source.slice( block.start, block.end );\n    \n                // hook, 每个分片发送之前可能要做些异步的事情。\n                promise = me.request( 'before-send', block, function() {\n    \n                    // 有可能文件已经上传出错了，所以不需要再传输了。\n                    if ( file.getStatus() === Status.PROGRESS ) {\n                        me._doSend( block );\n                    } else {\n                        me._popBlock( block );\n                        Base.nextTick( me.__tick );\n                    }\n                });\n    \n                // 如果为fail了，则跳过此分片。\n                promise.fail(function() {\n                    if ( file.remaning === 1 ) {\n                        me._finishFile( file ).always(function() {\n                            block.percentage = 1;\n                            me._popBlock( block );\n                            me.owner.trigger( 'uploadComplete', file );\n                            Base.nextTick( me.__tick );\n                        });\n                    } else {\n                        block.percentage = 1;\n                        me.updateFileProgress( file );\n                        me._popBlock( block );\n                        Base.nextTick( me.__tick );\n                    }\n                });\n            },\n    \n    \n            /**\n             * @event uploadBeforeSend\n             * @param {Object} object\n             * @param {Object} data 默认的上传参数，可以扩展此对象来控制上传参数。\n             * @param {Object} headers 可以扩展此对象来控制上传头部。\n             * @description 当某个文件的分块在发送前触发，主要用来询问是否要添加附带参数，大文件在开起分片上传的前提下此事件可能会触发多次。\n             * @for  Uploader\n             */\n    \n            /**\n             * @event uploadAccept\n             * @param {Object} object\n             * @param {Object} ret 服务端的返回数据，json格式，如果服务端不是json格式，从ret._raw中取数据，自行解析。\n             * @description 当某个文件上传到服务端响应后，会派送此事件来询问服务端响应是否有效。如果此事件handler返回值为`false`, 则此文件将派送`server`类型的`uploadError`事件。\n             * @for  Uploader\n             */\n    \n            /**\n             * @event uploadProgress\n             * @param {File} file File对象\n             * @param {Number} percentage 上传进度\n             * @description 上传过程中触发，携带上传进度。\n             * @for  Uploader\n             */\n    \n    \n            /**\n             * @event uploadError\n             * @param {File} file File对象\n             * @param {String} reason 出错的code\n             * @description 当文件上传出错时触发。\n             * @for  Uploader\n             */\n    \n            /**\n             * @event uploadSuccess\n             * @param {File} file File对象\n             * @param {Object} response 服务端返回的数据\n             * @description 当文件上传成功时触发。\n             * @for  Uploader\n             */\n    \n            /**\n             * @event uploadComplete\n             * @param {File} [file] File对象\n             * @description 不管成功或者失败，文件上传完成时触发。\n             * @for  Uploader\n             */\n    \n            // 做上传操作。\n            _doSend: function( block ) {\n                var me = this,\n                    owner = me.owner,\n                    opts = me.options,\n                    file = block.file,\n                    tr = new Transport( opts ),\n                    data = $.extend({}, opts.formData ),\n                    headers = $.extend({}, opts.headers ),\n                    requestAccept, ret;\n    \n                block.transport = tr;\n    \n                tr.on( 'destroy', function() {\n                    delete block.transport;\n                    me._popBlock( block );\n                    Base.nextTick( me.__tick );\n                });\n    \n                // 广播上传进度。以文件为单位。\n                tr.on( 'progress', function( percentage ) {\n                    block.percentage = percentage;\n                    me.updateFileProgress( file );\n                });\n    \n                // 用来询问，是否返回的结果是有错误的。\n                requestAccept = function( reject ) {\n                    var fn;\n    \n                    ret = tr.getResponseAsJson() || {};\n                    ret._raw = tr.getResponse();\n                    fn = function( value ) {\n                        reject = value;\n                    };\n    \n                    // 服务端响应了，不代表成功了，询问是否响应正确。\n                    if ( !owner.trigger( 'uploadAccept', block, ret, fn ) ) {\n                        reject = reject || 'server';\n                    }\n    \n                    return reject;\n                };\n    \n                // 尝试重试，然后广播文件上传出错。\n                tr.on( 'error', function( type, flag ) {\n                    block.retried = block.retried || 0;\n    \n                    // 自动重试\n                    if ( block.chunks > 1 && ~'http,abort'.indexOf( type ) &&\n                            block.retried < opts.chunkRetry ) {\n    \n                        block.retried++;\n                        tr.send();\n    \n                    } else {\n    \n                        // http status 500 ~ 600\n                        if ( !flag && type === 'server' ) {\n                            type = requestAccept( type );\n                        }\n    \n                        file.setStatus( Status.ERROR, type );\n                        owner.trigger( 'uploadError', file, type );\n                        owner.trigger( 'uploadComplete', file );\n                    }\n                });\n    \n                // 上传成功\n                tr.on( 'load', function() {\n                    var reason;\n    \n                    // 如果非预期，转向上传出错。\n                    if ( (reason = requestAccept()) ) {\n                        tr.trigger( 'error', reason, true );\n                        return;\n                    }\n    \n                    // 全部上传完成。\n                    if ( file.remaning === 1 ) {\n                        me._finishFile( file, ret );\n                    } else {\n                        tr.destroy();\n                    }\n                });\n    \n                // 配置默认的上传字段。\n                data = $.extend( data, {\n                    id: file.id,\n                    name: file.name,\n                    type: file.type,\n                    lastModifiedDate: file.lastModifiedDate,\n                    size: file.size\n                });\n    \n                block.chunks > 1 && $.extend( data, {\n                    chunks: block.chunks,\n                    chunk: block.chunk\n                });\n    \n                // 在发送之间可以添加字段什么的。。。\n                // 如果默认的字段不够使用，可以通过监听此事件来扩展\n                owner.trigger( 'uploadBeforeSend', block, data, headers );\n    \n                // 开始发送。\n                tr.appendBlob( opts.fileVal, block.blob, file.name );\n                tr.append( data );\n                tr.setRequestHeader( headers );\n                tr.send();\n            },\n    \n            // 完成上传。\n            _finishFile: function( file, ret, hds ) {\n                var owner = this.owner;\n    \n                return owner\n                        .request( 'after-send-file', arguments, function() {\n                            file.setStatus( Status.COMPLETE );\n                            owner.trigger( 'uploadSuccess', file, ret, hds );\n                        })\n                        .fail(function( reason ) {\n    \n                            // 如果外部已经标记为invalid什么的，不再改状态。\n                            if ( file.getStatus() === Status.PROGRESS ) {\n                                file.setStatus( Status.ERROR, reason );\n                            }\n    \n                            owner.trigger( 'uploadError', file, reason );\n                        })\n                        .always(function() {\n                            owner.trigger( 'uploadComplete', file );\n                        });\n            },\n    \n            updateFileProgress: function(file) {\n                var totalPercent = 0,\n                    uploaded = 0;\n    \n                if (!file.blocks) {\n                    return;\n                }\n    \n                $.each( file.blocks, function( _, v ) {\n                    uploaded += (v.percentage || 0) * (v.end - v.start);\n                });\n    \n                totalPercent = uploaded / file.size;\n                this.owner.trigger( 'uploadProgress', file, totalPercent || 0 );\n            }\n    \n        });\n    });\n    \n    /**\n     * @fileOverview 各种验证，包括文件总大小是否超出、单文件是否超出和文件是否重复。\n     */\n    \n    define('widgets/validator',[\n        'base',\n        'uploader',\n        'file',\n        'widgets/widget'\n    ], function( Base, Uploader, WUFile ) {\n    \n        var $ = Base.$,\n            validators = {},\n            api;\n    \n        /**\n         * @event error\n         * @param {String} type 错误类型。\n         * @description 当validate不通过时，会以派送错误事件的形式通知调用者。通过`upload.on('error', handler)`可以捕获到此类错误，目前有以下错误会在特定的情况下派送错来。\n         *\n         * * `Q_EXCEED_NUM_LIMIT` 在设置了`fileNumLimit`且尝试给`uploader`添加的文件数量超出这个值时派送。\n         * * `Q_EXCEED_SIZE_LIMIT` 在设置了`Q_EXCEED_SIZE_LIMIT`且尝试给`uploader`添加的文件总大小超出这个值时派送。\n         * * `Q_TYPE_DENIED` 当文件类型不满足时触发。。\n         * @for  Uploader\n         */\n    \n        // 暴露给外面的api\n        api = {\n    \n            // 添加验证器\n            addValidator: function( type, cb ) {\n                validators[ type ] = cb;\n            },\n    \n            // 移除验证器\n            removeValidator: function( type ) {\n                delete validators[ type ];\n            }\n        };\n    \n        // 在Uploader初始化的时候启动Validators的初始化\n        Uploader.register({\n            name: 'validator',\n    \n            init: function() {\n                var me = this;\n                Base.nextTick(function() {\n                    $.each( validators, function() {\n                        this.call( me.owner );\n                    });\n                });\n            }\n        });\n    \n        /**\n         * @property {int} [fileNumLimit=undefined]\n         * @namespace options\n         * @for Uploader\n         * @description 验证文件总数量, 超出则不允许加入队列。\n         */\n        api.addValidator( 'fileNumLimit', function() {\n            var uploader = this,\n                opts = uploader.options,\n                count = 0,\n                max = parseInt( opts.fileNumLimit, 10 ),\n                flag = true;\n    \n            if ( !max ) {\n                return;\n            }\n    \n            uploader.on( 'beforeFileQueued', function( file ) {\n    \n                if ( count >= max && flag ) {\n                    flag = false;\n                    this.trigger( 'error', 'Q_EXCEED_NUM_LIMIT', max, file );\n                    setTimeout(function() {\n                        flag = true;\n                    }, 1 );\n                }\n    \n                return count >= max ? false : true;\n            });\n    \n            uploader.on( 'fileQueued', function() {\n                count++;\n            });\n    \n            uploader.on( 'fileDequeued', function() {\n                count--;\n            });\n    \n            uploader.on( 'reset', function() {\n                count = 0;\n            });\n        });\n    \n    \n        /**\n         * @property {int} [fileSizeLimit=undefined]\n         * @namespace options\n         * @for Uploader\n         * @description 验证文件总大小是否超出限制, 超出则不允许加入队列。\n         */\n        api.addValidator( 'fileSizeLimit', function() {\n            var uploader = this,\n                opts = uploader.options,\n                count = 0,\n                max = parseInt( opts.fileSizeLimit, 10 ),\n                flag = true;\n    \n            if ( !max ) {\n                return;\n            }\n    \n            uploader.on( 'beforeFileQueued', function( file ) {\n                var invalid = count + file.size > max;\n    \n                if ( invalid && flag ) {\n                    flag = false;\n                    this.trigger( 'error', 'Q_EXCEED_SIZE_LIMIT', max, file );\n                    setTimeout(function() {\n                        flag = true;\n                    }, 1 );\n                }\n    \n                return invalid ? false : true;\n            });\n    \n            uploader.on( 'fileQueued', function( file ) {\n                count += file.size;\n            });\n    \n            uploader.on( 'fileDequeued', function( file ) {\n                count -= file.size;\n            });\n    \n            uploader.on( 'reset', function() {\n                count = 0;\n            });\n        });\n    \n        /**\n         * @property {int} [fileSingleSizeLimit=undefined]\n         * @namespace options\n         * @for Uploader\n         * @description 验证单个文件大小是否超出限制, 超出则不允许加入队列。\n         */\n        api.addValidator( 'fileSingleSizeLimit', function() {\n            var uploader = this,\n                opts = uploader.options,\n                max = opts.fileSingleSizeLimit;\n    \n            if ( !max ) {\n                return;\n            }\n    \n            uploader.on( 'beforeFileQueued', function( file ) {\n    \n                if ( file.size > max ) {\n                    file.setStatus( WUFile.Status.INVALID, 'exceed_size' );\n                    this.trigger( 'error', 'F_EXCEED_SIZE', max, file );\n                    return false;\n                }\n    \n            });\n    \n        });\n    \n        /**\n         * @property {Boolean} [duplicate=undefined]\n         * @namespace options\n         * @for Uploader\n         * @description 去重， 根据文件名字、文件大小和最后修改时间来生成hash Key.\n         */\n        api.addValidator( 'duplicate', function() {\n            var uploader = this,\n                opts = uploader.options,\n                mapping = {};\n    \n            if ( opts.duplicate ) {\n                return;\n            }\n    \n            function hashString( str ) {\n                var hash = 0,\n                    i = 0,\n                    len = str.length,\n                    _char;\n    \n                for ( ; i < len; i++ ) {\n                    _char = str.charCodeAt( i );\n                    hash = _char + (hash << 6) + (hash << 16) - hash;\n                }\n    \n                return hash;\n            }\n    \n            uploader.on( 'beforeFileQueued', function( file ) {\n                var hash = file.__hash || (file.__hash = hashString( file.name +\n                        file.size + file.lastModifiedDate ));\n    \n                // 已经重复了\n                if ( mapping[ hash ] ) {\n                    this.trigger( 'error', 'F_DUPLICATE', file );\n                    return false;\n                }\n            });\n    \n            uploader.on( 'fileQueued', function( file ) {\n                var hash = file.__hash;\n    \n                hash && (mapping[ hash ] = true);\n            });\n    \n            uploader.on( 'fileDequeued', function( file ) {\n                var hash = file.__hash;\n    \n                hash && (delete mapping[ hash ]);\n            });\n    \n            uploader.on( 'reset', function() {\n                mapping = {};\n            });\n        });\n    \n        return api;\n    });\n    \n    /**\n     * @fileOverview Runtime管理器，负责Runtime的选择, 连接\n     */\n    define('runtime/compbase',[],function() {\n    \n        function CompBase( owner, runtime ) {\n    \n            this.owner = owner;\n            this.options = owner.options;\n    \n            this.getRuntime = function() {\n                return runtime;\n            };\n    \n            this.getRuid = function() {\n                return runtime.uid;\n            };\n    \n            this.trigger = function() {\n                return owner.trigger.apply( owner, arguments );\n            };\n        }\n    \n        return CompBase;\n    });\n    /**\n     * @fileOverview FlashRuntime\n     */\n    define('runtime/flash/runtime',[\n        'base',\n        'runtime/runtime',\n        'runtime/compbase'\n    ], function( Base, Runtime, CompBase ) {\n    \n        var $ = Base.$,\n            type = 'flash',\n            components = {};\n    \n    \n        function getFlashVersion() {\n            var version;\n    \n            try {\n                version = navigator.plugins[ 'Shockwave Flash' ];\n                version = version.description;\n            } catch ( ex ) {\n                try {\n                    version = new ActiveXObject('ShockwaveFlash.ShockwaveFlash')\n                            .GetVariable('$version');\n                } catch ( ex2 ) {\n                    version = '0.0';\n                }\n            }\n            version = version.match( /\\d+/g );\n            return parseFloat( version[ 0 ] + '.' + version[ 1 ], 10 );\n        }\n    \n        function FlashRuntime() {\n            var pool = {},\n                clients = {},\n                destroy = this.destroy,\n                me = this,\n                jsreciver = Base.guid('webuploader_');\n    \n            Runtime.apply( me, arguments );\n            me.type = type;\n    \n    \n            // 这个方法的调用者，实际上是RuntimeClient\n            me.exec = function( comp, fn/*, args...*/ ) {\n                var client = this,\n                    uid = client.uid,\n                    args = Base.slice( arguments, 2 ),\n                    instance;\n    \n                clients[ uid ] = client;\n    \n                if ( components[ comp ] ) {\n                    if ( !pool[ uid ] ) {\n                        pool[ uid ] = new components[ comp ]( client, me );\n                    }\n    \n                    instance = pool[ uid ];\n    \n                    if ( instance[ fn ] ) {\n                        return instance[ fn ].apply( instance, args );\n                    }\n                }\n    \n                return me.flashExec.apply( client, arguments );\n            };\n    \n            function handler( evt, obj ) {\n                var type = evt.type || evt,\n                    parts, uid;\n    \n                parts = type.split('::');\n                uid = parts[ 0 ];\n                type = parts[ 1 ];\n    \n                // console.log.apply( console, arguments );\n    \n                if ( type === 'Ready' && uid === me.uid ) {\n                    me.trigger('ready');\n                } else if ( clients[ uid ] ) {\n                    clients[ uid ].trigger( type.toLowerCase(), evt, obj );\n                }\n    \n                // Base.log( evt, obj );\n            }\n    \n            // flash的接受器。\n            window[ jsreciver ] = function() {\n                var args = arguments;\n    \n                // 为了能捕获得到。\n                setTimeout(function() {\n                    handler.apply( null, args );\n                }, 1 );\n            };\n    \n            this.jsreciver = jsreciver;\n    \n            this.destroy = function() {\n                // @todo 删除池子中的所有实例\n                return destroy && destroy.apply( this, arguments );\n            };\n    \n            this.flashExec = function( comp, fn ) {\n                var flash = me.getFlash(),\n                    args = Base.slice( arguments, 2 );\n    \n                return flash.exec( this.uid, comp, fn, args );\n            };\n    \n            // @todo\n        }\n    \n        Base.inherits( Runtime, {\n            constructor: FlashRuntime,\n    \n            init: function() {\n                var container = this.getContainer(),\n                    opts = this.options,\n                    html;\n    \n                // if not the minimal height, shims are not initialized\n                // in older browsers (e.g FF3.6, IE6,7,8, Safari 4.0,5.0, etc)\n                container.css({\n                    position: 'absolute',\n                    top: '-8px',\n                    left: '-8px',\n                    width: '9px',\n                    height: '9px',\n                    overflow: 'hidden'\n                });\n    \n                // insert flash object\n                html = '<object id=\"' + this.uid + '\" type=\"application/' +\n                        'x-shockwave-flash\" data=\"' +  opts.swf + '\" ';\n    \n                if ( Base.browser.ie ) {\n                    html += 'classid=\"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000\" ';\n                }\n    \n                html += 'width=\"100%\" height=\"100%\" style=\"outline:0\">'  +\n                    '<param name=\"movie\" value=\"' + opts.swf + '\" />' +\n                    '<param name=\"flashvars\" value=\"uid=' + this.uid +\n                    '&jsreciver=' + this.jsreciver + '\" />' +\n                    '<param name=\"wmode\" value=\"transparent\" />' +\n                    '<param name=\"allowscriptaccess\" value=\"always\" />' +\n                '</object>';\n    \n                container.html( html );\n            },\n    \n            getFlash: function() {\n                if ( this._flash ) {\n                    return this._flash;\n                }\n    \n                this._flash = $( '#' + this.uid ).get( 0 );\n                return this._flash;\n            }\n    \n        });\n    \n        FlashRuntime.register = function( name, component ) {\n            component = components[ name ] = Base.inherits( CompBase, $.extend({\n    \n                // @todo fix this later\n                flashExec: function() {\n                    var owner = this.owner,\n                        runtime = this.getRuntime();\n    \n                    return runtime.flashExec.apply( owner, arguments );\n                }\n            }, component ) );\n    \n            return component;\n        };\n    \n        if ( getFlashVersion() >= 11.4 ) {\n            Runtime.addRuntime( type, FlashRuntime );\n        }\n    \n        return FlashRuntime;\n    });\n    /**\n     * @fileOverview FilePicker\n     */\n    define('runtime/flash/filepicker',[\n        'base',\n        'runtime/flash/runtime'\n    ], function( Base, FlashRuntime ) {\n        var $ = Base.$;\n    \n        return FlashRuntime.register( 'FilePicker', {\n            init: function( opts ) {\n                var copy = $.extend({}, opts ),\n                    len, i;\n    \n                // 修复Flash再没有设置title的情况下无法弹出flash文件选择框的bug.\n                len = copy.accept && copy.accept.length;\n                for (  i = 0; i < len; i++ ) {\n                    if ( !copy.accept[ i ].title ) {\n                        copy.accept[ i ].title = 'Files';\n                    }\n                }\n    \n                delete copy.button;\n                delete copy.id;\n                delete copy.container;\n    \n                this.flashExec( 'FilePicker', 'init', copy );\n            },\n    \n            destroy: function() {\n                this.flashExec( 'FilePicker', 'destroy' );\n            }\n        });\n    });\n    /**\n     * @fileOverview 图片压缩\n     */\n    define('runtime/flash/image',[\n        'runtime/flash/runtime'\n    ], function( FlashRuntime ) {\n    \n        return FlashRuntime.register( 'Image', {\n            // init: function( options ) {\n            //     var owner = this.owner;\n    \n            //     this.flashExec( 'Image', 'init', options );\n            //     owner.on( 'load', function() {\n            //         debugger;\n            //     });\n            // },\n    \n            loadFromBlob: function( blob ) {\n                var owner = this.owner;\n    \n                owner.info() && this.flashExec( 'Image', 'info', owner.info() );\n                owner.meta() && this.flashExec( 'Image', 'meta', owner.meta() );\n    \n                this.flashExec( 'Image', 'loadFromBlob', blob.uid );\n            }\n        });\n    });\n    /**\n     * @fileOverview Blob Html实现\n     */\n    define('runtime/flash/blob',[\n        'runtime/flash/runtime',\n        'lib/blob'\n    ], function( FlashRuntime, Blob ) {\n    \n        return FlashRuntime.register( 'Blob', {\n            slice: function( start, end ) {\n                var blob = this.flashExec( 'Blob', 'slice', start, end );\n    \n                return new Blob( this.getRuid(), blob );\n            }\n        });\n    });\n    /**\n     * @fileOverview  Transport flash实现\n     */\n    define('runtime/flash/transport',[\n        'base',\n        'runtime/flash/runtime',\n        'runtime/client'\n    ], function( Base, FlashRuntime, RuntimeClient ) {\n        var $ = Base.$;\n    \n        return FlashRuntime.register( 'Transport', {\n            init: function() {\n                this._status = 0;\n                this._response = null;\n                this._responseJson = null;\n            },\n    \n            send: function() {\n                var owner = this.owner,\n                    opts = this.options,\n                    xhr = this._initAjax(),\n                    blob = owner._blob,\n                    server = opts.server,\n                    binary;\n    \n                xhr.connectRuntime( blob.ruid );\n    \n                if ( opts.sendAsBinary ) {\n                    server += (/\\?/.test( server ) ? '&' : '?') +\n                            $.param( owner._formData );\n    \n                    binary = blob.uid;\n                } else {\n                    $.each( owner._formData, function( k, v ) {\n                        xhr.exec( 'append', k, v );\n                    });\n    \n                    xhr.exec( 'appendBlob', opts.fileVal, blob.uid,\n                            opts.filename || owner._formData.name || '' );\n                }\n    \n                this._setRequestHeader( xhr, opts.headers );\n                xhr.exec( 'send', {\n                    method: opts.method,\n                    url: server,\n                    forceURLStream: opts.forceURLStream,\n                    mimeType: 'application/octet-stream'\n                }, binary );\n            },\n    \n            getStatus: function() {\n                return this._status;\n            },\n    \n            getResponse: function() {\n                return this._response || '';\n            },\n    \n            getResponseAsJson: function() {\n                return this._responseJson;\n            },\n    \n            abort: function() {\n                var xhr = this._xhr;\n    \n                if ( xhr ) {\n                    xhr.exec('abort');\n                    xhr.destroy();\n                    this._xhr = xhr = null;\n                }\n            },\n    \n            destroy: function() {\n                this.abort();\n            },\n    \n            _initAjax: function() {\n                var me = this,\n                    xhr = new RuntimeClient('XMLHttpRequest');\n    \n                xhr.on( 'uploadprogress progress', function( e ) {\n                    var percent = e.loaded / e.total;\n                    percent = Math.min( 1, Math.max( 0, percent ) );\n                    return me.trigger( 'progress', percent );\n                });\n    \n                xhr.on( 'load', function() {\n                    var status = xhr.exec('getStatus'),\n                        readBody = false,\n                        err = '',\n                        p;\n    \n                    xhr.off();\n                    me._xhr = null;\n    \n                    if ( status >= 200 && status < 300 ) {\n                        readBody = true;\n                    } else if ( status >= 500 && status < 600 ) {\n                        readBody = true;\n                        err = 'server';\n                    } else {\n                        err = 'http';\n                    }\n    \n                    if ( readBody ) {\n                        me._response = xhr.exec('getResponse');\n                        me._response = decodeURIComponent( me._response );\n    \n                        // flash 处理可能存在 bug, 没辙只能靠 js 了\n                        // try {\n                        //     me._responseJson = xhr.exec('getResponseAsJson');\n                        // } catch ( error ) {\n    \n                        p = function( s ) {\n                            try {\n                                if (window.JSON && window.JSON.parse) {\n                                    return JSON.parse(s);\n                                }\n    \n                                return new Function('return ' + s).call();\n                            } catch ( err ) {\n                                return {};\n                            }\n                        };\n                        me._responseJson  = me._response ? p(me._response) : {};\n    \n                        // }\n                    }\n    \n                    xhr.destroy();\n                    xhr = null;\n    \n                    return err ? me.trigger( 'error', err ) : me.trigger('load');\n                });\n    \n                xhr.on( 'error', function() {\n                    xhr.off();\n                    me._xhr = null;\n                    me.trigger( 'error', 'http' );\n                });\n    \n                me._xhr = xhr;\n                return xhr;\n            },\n    \n            _setRequestHeader: function( xhr, headers ) {\n                $.each( headers, function( key, val ) {\n                    xhr.exec( 'setRequestHeader', key, val );\n                });\n            }\n        });\n    });\n    \n    /**\n     * @fileOverview 只有flash实现的文件版本。\n     */\n    define('preset/flashonly',[\n        'base',\n    \n        // widgets\n        'widgets/filepicker',\n        'widgets/image',\n        'widgets/queue',\n        'widgets/runtime',\n        'widgets/upload',\n        'widgets/validator',\n    \n        // runtimes\n    \n        // flash\n        'runtime/flash/filepicker',\n        'runtime/flash/image',\n        'runtime/flash/blob',\n        'runtime/flash/transport'\n    ], function( Base ) {\n        return Base;\n    });\n    define('webuploader',[\n        'preset/flashonly'\n    ], function( preset ) {\n        return preset;\n    });\n    return require('webuploader');\n});\n"
  },
  {
    "path": "static/webuploader/webuploader.html5nodepend.js",
    "content": "/*! WebUploader 0.1.6 */\n\n\n/**\n * @fileOverview 让内部各个部件的代码可以用[amd](https://github.com/amdjs/amdjs-api/wiki/AMD)模块定义方式组织起来。\n *\n * AMD API 内部的简单不完全实现，请忽略。只有当WebUploader被合并成一个文件的时候才会引入。\n */\n(function( root, factory ) {\n    var modules = {},\n\n        // 内部require, 简单不完全实现。\n        // https://github.com/amdjs/amdjs-api/wiki/require\n        _require = function( deps, callback ) {\n            var args, len, i;\n\n            // 如果deps不是数组，则直接返回指定module\n            if ( typeof deps === 'string' ) {\n                return getModule( deps );\n            } else {\n                args = [];\n                for( len = deps.length, i = 0; i < len; i++ ) {\n                    args.push( getModule( deps[ i ] ) );\n                }\n\n                return callback.apply( null, args );\n            }\n        },\n\n        // 内部define，暂时不支持不指定id.\n        _define = function( id, deps, factory ) {\n            if ( arguments.length === 2 ) {\n                factory = deps;\n                deps = null;\n            }\n\n            _require( deps || [], function() {\n                setModule( id, factory, arguments );\n            });\n        },\n\n        // 设置module, 兼容CommonJs写法。\n        setModule = function( id, factory, args ) {\n            var module = {\n                    exports: factory\n                },\n                returned;\n\n            if ( typeof factory === 'function' ) {\n                args.length || (args = [ _require, module.exports, module ]);\n                returned = factory.apply( null, args );\n                returned !== undefined && (module.exports = returned);\n            }\n\n            modules[ id ] = module.exports;\n        },\n\n        // 根据id获取module\n        getModule = function( id ) {\n            var module = modules[ id ] || root[ id ];\n\n            if ( !module ) {\n                throw new Error( '`' + id + '` is undefined' );\n            }\n\n            return module;\n        },\n\n        // 将所有modules，将路径ids装换成对象。\n        exportsTo = function( obj ) {\n            var key, host, parts, part, last, ucFirst;\n\n            // make the first character upper case.\n            ucFirst = function( str ) {\n                return str && (str.charAt( 0 ).toUpperCase() + str.substr( 1 ));\n            };\n\n            for ( key in modules ) {\n                host = obj;\n\n                if ( !modules.hasOwnProperty( key ) ) {\n                    continue;\n                }\n\n                parts = key.split('/');\n                last = ucFirst( parts.pop() );\n\n                while( (part = ucFirst( parts.shift() )) ) {\n                    host[ part ] = host[ part ] || {};\n                    host = host[ part ];\n                }\n\n                host[ last ] = modules[ key ];\n            }\n\n            return obj;\n        },\n\n        makeExport = function( dollar ) {\n            root.__dollar = dollar;\n\n            // exports every module.\n            return exportsTo( factory( root, _define, _require ) );\n        },\n\n        origin;\n\n    if ( typeof module === 'object' && typeof module.exports === 'object' ) {\n\n        // For CommonJS and CommonJS-like environments where a proper window is present,\n        module.exports = makeExport();\n    } else if ( typeof define === 'function' && define.amd ) {\n\n        // Allow using this built library as an AMD module\n        // in another project. That other project will only\n        // see this AMD call, not the internal modules in\n        // the closure below.\n        define([ 'jquery' ], makeExport );\n    } else {\n\n        // Browser globals case. Just assign the\n        // result to a property on the global.\n        origin = root.WebUploader;\n        root.WebUploader = makeExport();\n        root.WebUploader.noConflict = function() {\n            root.WebUploader = origin;\n        };\n    }\n})( window, function( window, define, require ) {\n\n\n    /**\n     * @fileOverview  jq-bridge 主要实现像jQuery一样的功能方法，可以替换成jQuery，\n     * 这里只实现了此组件所需的部分。\n     *\n     * **此文件的代码还不可用，还是直接用jquery吧**\n     * @beta\n     */\n    define('dollar-builtin',[],function() {\n        var doc = window.document,\n            emptyArray = [],\n            slice = emptyArray.slice,\n            class2type = {},\n            hasOwn = class2type.hasOwnProperty,\n            toString = class2type.toString,\n            rId = /^#(.*)$/;\n    \n        function each( obj, iterator ) {\n            var i;\n    \n            //add guard here\n            if(!obj) {\n                return;\n            }\n    \n            // like array\n            if ( typeof obj !== 'function' && typeof obj.length === 'number' ) {\n                for ( i = 0; i < obj.length; i++ ) {\n                    if ( iterator.call( obj[ i ], i, obj[ i ] ) === false ) {\n                        return obj;\n                    }\n                }\n            } else {\n                for ( i in obj ) {\n                    if ( hasOwn.call( obj, i ) && iterator.call( obj[ i ], i,\n                            obj[ i ] ) === false ) {\n                        return obj;\n                    }\n                }\n            }\n    \n            return obj;\n        }\n    \n        function extend( target, source, deep ) {\n            each( source, function( key, val ) {\n                if ( deep && typeof val === 'object' ) {\n                    if ( typeof target[ key ] !== 'object' ) {\n                        target[ key ] = type( val ) === 'array' ? [] : {};\n                    }\n                    extend( target[ key ], val, deep );\n                } else {\n                    target[ key ] = val;\n                }\n            });\n        }\n    \n        each( ('Boolean Number String Function Array Date RegExp Object' +\n                ' Error').split(' '), function( i, name ) {\n            class2type[ '[object ' + name + ']' ] = name.toLowerCase();\n        });\n    \n        function setAttribute( node, name, value ) {\n            value == null ? node.removeAttribute( name ) :\n                    node.setAttribute( name, value );\n        }\n    \n        /**\n         * 只支持ID选择。\n         */\n        function $( elem ) {\n            var api = {};\n    \n            elem = typeof elem === 'string' && rId.test( elem ) ?\n                    doc.getElementById( RegExp.$1 ) : elem;\n    \n            if ( elem ) {\n                api[ 0 ] = elem;\n                api.length = 1;\n            }\n    \n            return $.extend( api, {\n                _wrap: true,\n    \n                get: function() {\n                    return elem;\n                },\n    \n                /**\n                 * 添加className\n                 */\n                addClass: function( classname ) {\n                    elem.classList.add( classname );\n                    return this;\n                },\n    \n                removeClass: function( classname ) {\n                    elem.classList.remove( classname );\n                    return this;\n                },\n    \n                //$(...).each is used in the source\n                each: function(callback){\n                  [].every.call(this, function(el, idx){\n                    return callback.call(el, idx, el) !== false\n                  })\n                  return this\n                },\n    \n                html: function( html ) {\n                    if ( html ) {\n                        elem.innerHTML = html;\n                    }\n                    return elem.innerHTML;\n                },\n    \n                attr: function( key, val ) {\n                    if ( $.isObject( key ) ) {\n                        $.each( key, function( k, v ) {\n                            setAttribute( elem, k, v );\n                        });\n                    } else {\n                        setAttribute( elem, key, val );\n                    }\n                },\n    \n                empty: function() {\n                    elem.innerHTML = '';\n                    return this;\n                },\n    \n                before: function( el ) {\n                    elem.parentNode.insertBefore( el, elem );\n                },\n    \n                append: function( el ) {\n                    el = el._wrap ? el.get() : el;\n                    elem.appendChild( el );\n                },\n    \n                text: function() {\n                    return elem.textContent;\n                },\n    \n                // on\n                on: function( type, fn ) {\n                    if ( elem.addEventListener ) {\n                        elem.addEventListener( type, fn, false );\n                    } else if ( elem.attachEvent ) {\n                        elem.attachEvent( 'on' + type, fn );\n                    }\n    \n                    return this;\n                },\n    \n                // off\n                off: function( type, fn ) {\n                    if ( elem.removeEventListener ) {\n                        elem.removeEventListener( type, fn, false );\n                    } else if ( elem.attachEvent ) {\n                        elem.detachEvent( 'on' + type, fn );\n                    }\n                    return this;\n                }\n    \n            });\n        }\n    \n        $.each = each;\n        $.extend = function( /*[deep, ]*/target/*, source...*/ ) {\n            var args = slice.call( arguments, 1 ),\n                deep;\n    \n            if ( typeof target === 'boolean' ) {\n                deep = target;\n                target = args.shift();\n            }\n    \n            args.forEach(function( arg ) {\n                arg && extend( target, arg, deep );\n            });\n    \n            return target;\n        };\n    \n        function type( obj ) {\n    \n            /*jshint eqnull:true*/\n            return obj == null ? String( obj ) :\n                    class2type[ toString.call( obj ) ] || 'object';\n        }\n        $.type = type;\n    \n        //$.grep is used in the source\n        $.grep = function( elems, callback, invert ) {\n            var callbackInverse,\n                matches = [],\n                i = 0,\n                length = elems.length,\n                callbackExpect = !invert;\n    \n            // Go through the array, only saving the items\n            // that pass the validator function\n            for ( ; i < length; i++ ) {\n                callbackInverse = !callback( elems[ i ], i );\n                if ( callbackInverse !== callbackExpect ) {\n                    matches.push( elems[ i ] );\n                }\n            }\n    \n            return matches;\n        }\n    \n        $.isWindow = function( obj ) {\n            return obj && obj.window === obj;\n        };\n    \n        $.isPlainObject = function( obj ) {\n            if ( type( obj ) !== 'object' || obj.nodeType || $.isWindow( obj ) ) {\n                return false;\n            }\n    \n            try {\n                if ( obj.constructor && !hasOwn.call( obj.constructor.prototype,\n                        'isPrototypeOf' ) ) {\n                    return false;\n                }\n            } catch ( ex ) {\n                return false;\n            }\n    \n            return true;\n        };\n    \n        $.isObject = function( anything ) {\n            return type( anything ) === 'object';\n        };\n    \n        $.trim = function( str ) {\n            return str ? str.trim() : '';\n        };\n    \n        $.isFunction = function( obj ) {\n            return type( obj ) === 'function';\n        };\n    \n        emptyArray = null;\n    \n        return $;\n    });\n    \n    define('dollar',[\n        'dollar-builtin'\n    ], function( $ ) {\n        return $;\n    });\n    /**\n     * 直接来源于jquery的代码。\n     * @fileOverview Promise/A+\n     * @beta\n     */\n    define('promise-builtin',[\n        'dollar'\n    ], function( $ ) {\n    \n        var api;\n    \n        // 简单版Callbacks, 默认memory，可选once.\n        function Callbacks( once ) {\n            var list = [],\n                stack = !once && [],\n                fire = function( data ) {\n                    memory = data;\n                    fired = true;\n                    firingIndex = firingStart || 0;\n                    firingStart = 0;\n                    firingLength = list.length;\n                    firing = true;\n    \n                    for ( ; list && firingIndex < firingLength; firingIndex++ ) {\n                        list[ firingIndex ].apply( data[ 0 ], data[ 1 ] );\n                    }\n                    firing = false;\n    \n                    if ( list ) {\n                        if ( stack ) {\n                            stack.length && fire( stack.shift() );\n                        }  else {\n                            list = [];\n                        }\n                    }\n                },\n                self = {\n                    add: function() {\n                        if ( list ) {\n                            var start = list.length;\n                            (function add ( args ) {\n                                $.each( args, function( _, arg ) {\n                                    var type = $.type( arg );\n                                    if ( type === 'function' ) {\n                                        list.push( arg );\n                                    } else if ( arg && arg.length &&\n                                            type !== 'string' ) {\n    \n                                        add( arg );\n                                    }\n                                });\n                            })( arguments );\n    \n                            if ( firing ) {\n                                firingLength = list.length;\n                            } else if ( memory ) {\n                                firingStart = start;\n                                fire( memory );\n                            }\n                        }\n                        return this;\n                    },\n    \n                    disable: function() {\n                        list = stack = memory = undefined;\n                        return this;\n                    },\n    \n                    // Lock the list in its current state\n                    lock: function() {\n                        stack = undefined;\n                        if ( !memory ) {\n                            self.disable();\n                        }\n                        return this;\n                    },\n    \n                    fireWith: function( context, args ) {\n                        if ( list && (!fired || stack) ) {\n                            args = args || [];\n                            args = [ context, args.slice ? args.slice() : args ];\n                            if ( firing ) {\n                                stack.push( args );\n                            } else {\n                                fire( args );\n                            }\n                        }\n                        return this;\n                    },\n    \n                    fire: function() {\n                        self.fireWith( this, arguments );\n                        return this;\n                    }\n                },\n    \n                fired, firing, firingStart, firingLength, firingIndex, memory;\n    \n            return self;\n        }\n    \n        function Deferred( func ) {\n            var tuples = [\n                    // action, add listener, listener list, final state\n                    [ 'resolve', 'done', Callbacks( true ), 'resolved' ],\n                    [ 'reject', 'fail', Callbacks( true ), 'rejected' ],\n                    [ 'notify', 'progress', Callbacks() ]\n                ],\n                state = 'pending',\n                promise = {\n                    state: function() {\n                        return state;\n                    },\n                    always: function() {\n                        deferred.done( arguments ).fail( arguments );\n                        return this;\n                    },\n                    then: function( /* fnDone, fnFail, fnProgress */ ) {\n                        var fns = arguments;\n                        return Deferred(function( newDefer ) {\n                            $.each( tuples, function( i, tuple ) {\n                                var action = tuple[ 0 ],\n                                    fn = $.isFunction( fns[ i ] ) && fns[ i ];\n    \n                                // deferred[ done | fail | progress ] for\n                                // forwarding actions to newDefer\n                                deferred[ tuple[ 1 ] ](function() {\n                                    var returned;\n    \n                                    returned = fn && fn.apply( this, arguments );\n    \n                                    if ( returned &&\n                                            $.isFunction( returned.promise ) ) {\n    \n                                        returned.promise()\n                                                .done( newDefer.resolve )\n                                                .fail( newDefer.reject )\n                                                .progress( newDefer.notify );\n                                    } else {\n                                        newDefer[ action + 'With' ](\n                                                this === promise ?\n                                                newDefer.promise() :\n                                                this,\n                                                fn ? [ returned ] : arguments );\n                                    }\n                                });\n                            });\n                            fns = null;\n                        }).promise();\n                    },\n    \n                    // Get a promise for this deferred\n                    // If obj is provided, the promise aspect is added to the object\n                    promise: function( obj ) {\n    \n                        return obj != null ? $.extend( obj, promise ) : promise;\n                    }\n                },\n                deferred = {};\n    \n            // Keep pipe for back-compat\n            promise.pipe = promise.then;\n    \n            // Add list-specific methods\n            $.each( tuples, function( i, tuple ) {\n                var list = tuple[ 2 ],\n                    stateString = tuple[ 3 ];\n    \n                // promise[ done | fail | progress ] = list.add\n                promise[ tuple[ 1 ] ] = list.add;\n    \n                // Handle state\n                if ( stateString ) {\n                    list.add(function() {\n                        // state = [ resolved | rejected ]\n                        state = stateString;\n    \n                    // [ reject_list | resolve_list ].disable; progress_list.lock\n                    }, tuples[ i ^ 1 ][ 2 ].disable, tuples[ 2 ][ 2 ].lock );\n                }\n    \n                // deferred[ resolve | reject | notify ]\n                deferred[ tuple[ 0 ] ] = function() {\n                    deferred[ tuple[ 0 ] + 'With' ]( this === deferred ? promise :\n                            this, arguments );\n                    return this;\n                };\n                deferred[ tuple[ 0 ] + 'With' ] = list.fireWith;\n            });\n    \n            // Make the deferred a promise\n            promise.promise( deferred );\n    \n            // Call given func if any\n            if ( func ) {\n                func.call( deferred, deferred );\n            }\n    \n            // All done!\n            return deferred;\n        }\n    \n        api = {\n            /**\n             * 创建一个[Deferred](http://api.jquery.com/category/deferred-object/)对象。\n             * 详细的Deferred用法说明，请参照jQuery的API文档。\n             *\n             * Deferred对象在钩子回掉函数中经常要用到，用来处理需要等待的异步操作。\n             *\n             * @for  Base\n             * @method Deferred\n             * @grammar Base.Deferred() => Deferred\n             * @example\n             * // 在文件开始发送前做些异步操作。\n             * // WebUploader会等待此异步操作完成后，开始发送文件。\n             * Uploader.register({\n             *     'before-send-file': 'doSomthingAsync'\n             * }, {\n             *\n             *     doSomthingAsync: function() {\n             *         var deferred = Base.Deferred();\n             *\n             *         // 模拟一次异步操作。\n             *         setTimeout(deferred.resolve, 2000);\n             *\n             *         return deferred.promise();\n             *     }\n             * });\n             */\n            Deferred: Deferred,\n    \n            /**\n             * 判断传入的参数是否为一个promise对象。\n             * @method isPromise\n             * @grammar Base.isPromise( anything ) => Boolean\n             * @param  {*}  anything 检测对象。\n             * @return {Boolean}\n             * @for  Base\n             * @example\n             * console.log( Base.isPromise() );    // => false\n             * console.log( Base.isPromise({ key: '123' }) );    // => false\n             * console.log( Base.isPromise( Base.Deferred().promise() ) );    // => true\n             *\n             * // Deferred也是一个Promise\n             * console.log( Base.isPromise( Base.Deferred() ) );    // => true\n             */\n            isPromise: function( anything ) {\n                return anything && typeof anything.then === 'function';\n            },\n    \n            /**\n             * 返回一个promise，此promise在所有传入的promise都完成了后完成。\n             * 详细请查看[这里](http://api.jquery.com/jQuery.when/)。\n             *\n             * @method when\n             * @for  Base\n             * @grammar Base.when( promise1[, promise2[, promise3...]] ) => Promise\n             */\n            when: function( subordinate /* , ..., subordinateN */ ) {\n                var i = 0,\n                    slice = [].slice,\n                    resolveValues = slice.call( arguments ),\n                    length = resolveValues.length,\n    \n                    // the count of uncompleted subordinates\n                    remaining = length !== 1 || (subordinate &&\n                        $.isFunction( subordinate.promise )) ? length : 0,\n    \n                    // the master Deferred. If resolveValues consist of\n                    // only a single Deferred, just use that.\n                    deferred = remaining === 1 ? subordinate : Deferred(),\n    \n                    // Update function for both resolve and progress values\n                    updateFunc = function( i, contexts, values ) {\n                        return function( value ) {\n                            contexts[ i ] = this;\n                            values[ i ] = arguments.length > 1 ?\n                                    slice.call( arguments ) : value;\n    \n                            if ( values === progressValues ) {\n                                deferred.notifyWith( contexts, values );\n                            } else if ( !(--remaining) ) {\n                                deferred.resolveWith( contexts, values );\n                            }\n                        };\n                    },\n    \n                    progressValues, progressContexts, resolveContexts;\n    \n                // add listeners to Deferred subordinates; treat others as resolved\n                if ( length > 1 ) {\n                    progressValues = new Array( length );\n                    progressContexts = new Array( length );\n                    resolveContexts = new Array( length );\n                    for ( ; i < length; i++ ) {\n                        if ( resolveValues[ i ] &&\n                                $.isFunction( resolveValues[ i ].promise ) ) {\n    \n                            resolveValues[ i ].promise()\n                                    .done( updateFunc( i, resolveContexts,\n                                            resolveValues ) )\n                                    .fail( deferred.reject )\n                                    .progress( updateFunc( i, progressContexts,\n                                            progressValues ) );\n                        } else {\n                            --remaining;\n                        }\n                    }\n                }\n    \n                // if we're not waiting on anything, resolve the master\n                if ( !remaining ) {\n                    deferred.resolveWith( resolveContexts, resolveValues );\n                }\n    \n                return deferred.promise();\n            }\n        };\n    \n        return api;\n    });\n    define('promise',[\n        'promise-builtin'\n    ], function( $ ) {\n        return $;\n    });\n    /**\n     * @fileOverview 基础类方法。\n     */\n    \n    /**\n     * Web Uploader内部类的详细说明，以下提及的功能类，都可以在`WebUploader`这个变量中访问到。\n     *\n     * As you know, Web Uploader的每个文件都是用过[AMD](https://github.com/amdjs/amdjs-api/wiki/AMD)规范中的`define`组织起来的, 每个Module都会有个module id.\n     * 默认module id为该文件的路径，而此路径将会转化成名字空间存放在WebUploader中。如：\n     *\n     * * module `base`：WebUploader.Base\n     * * module `file`: WebUploader.File\n     * * module `lib/dnd`: WebUploader.Lib.Dnd\n     * * module `runtime/html5/dnd`: WebUploader.Runtime.Html5.Dnd\n     *\n     *\n     * 以下文档中对类的使用可能省略掉了`WebUploader`前缀。\n     * @module WebUploader\n     * @title WebUploader API文档\n     */\n    define('base',[\n        'dollar',\n        'promise'\n    ], function( $, promise ) {\n    \n        var noop = function() {},\n            call = Function.call;\n    \n        // http://jsperf.com/uncurrythis\n        // 反科里化\n        function uncurryThis( fn ) {\n            return function() {\n                return call.apply( fn, arguments );\n            };\n        }\n    \n        function bindFn( fn, context ) {\n            return function() {\n                return fn.apply( context, arguments );\n            };\n        }\n    \n        function createObject( proto ) {\n            var f;\n    \n            if ( Object.create ) {\n                return Object.create( proto );\n            } else {\n                f = function() {};\n                f.prototype = proto;\n                return new f();\n            }\n        }\n    \n    \n        /**\n         * 基础类，提供一些简单常用的方法。\n         * @class Base\n         */\n        return {\n    \n            /**\n             * @property {String} version 当前版本号。\n             */\n            version: '0.1.6',\n    \n            /**\n             * @property {jQuery|Zepto} $ 引用依赖的jQuery或者Zepto对象。\n             */\n            $: $,\n    \n            Deferred: promise.Deferred,\n    \n            isPromise: promise.isPromise,\n    \n            when: promise.when,\n    \n            /**\n             * @description  简单的浏览器检查结果。\n             *\n             * * `webkit`  webkit版本号，如果浏览器为非webkit内核，此属性为`undefined`。\n             * * `chrome`  chrome浏览器版本号，如果浏览器为chrome，此属性为`undefined`。\n             * * `ie`  ie浏览器版本号，如果浏览器为非ie，此属性为`undefined`。**暂不支持ie10+**\n             * * `firefox`  firefox浏览器版本号，如果浏览器为非firefox，此属性为`undefined`。\n             * * `safari`  safari浏览器版本号，如果浏览器为非safari，此属性为`undefined`。\n             * * `opera`  opera浏览器版本号，如果浏览器为非opera，此属性为`undefined`。\n             *\n             * @property {Object} [browser]\n             */\n            browser: (function( ua ) {\n                var ret = {},\n                    webkit = ua.match( /WebKit\\/([\\d.]+)/ ),\n                    chrome = ua.match( /Chrome\\/([\\d.]+)/ ) ||\n                        ua.match( /CriOS\\/([\\d.]+)/ ),\n    \n                    ie = ua.match( /MSIE\\s([\\d\\.]+)/ ) ||\n                        ua.match( /(?:trident)(?:.*rv:([\\w.]+))?/i ),\n                    firefox = ua.match( /Firefox\\/([\\d.]+)/ ),\n                    safari = ua.match( /Safari\\/([\\d.]+)/ ),\n                    opera = ua.match( /OPR\\/([\\d.]+)/ );\n    \n                webkit && (ret.webkit = parseFloat( webkit[ 1 ] ));\n                chrome && (ret.chrome = parseFloat( chrome[ 1 ] ));\n                ie && (ret.ie = parseFloat( ie[ 1 ] ));\n                firefox && (ret.firefox = parseFloat( firefox[ 1 ] ));\n                safari && (ret.safari = parseFloat( safari[ 1 ] ));\n                opera && (ret.opera = parseFloat( opera[ 1 ] ));\n    \n                return ret;\n            })( navigator.userAgent ),\n    \n            /**\n             * @description  操作系统检查结果。\n             *\n             * * `android`  如果在android浏览器环境下，此值为对应的android版本号，否则为`undefined`。\n             * * `ios` 如果在ios浏览器环境下，此值为对应的ios版本号，否则为`undefined`。\n             * @property {Object} [os]\n             */\n            os: (function( ua ) {\n                var ret = {},\n    \n                    // osx = !!ua.match( /\\(Macintosh\\; Intel / ),\n                    android = ua.match( /(?:Android);?[\\s\\/]+([\\d.]+)?/ ),\n                    ios = ua.match( /(?:iPad|iPod|iPhone).*OS\\s([\\d_]+)/ );\n    \n                // osx && (ret.osx = true);\n                android && (ret.android = parseFloat( android[ 1 ] ));\n                ios && (ret.ios = parseFloat( ios[ 1 ].replace( /_/g, '.' ) ));\n    \n                return ret;\n            })( navigator.userAgent ),\n    \n            /**\n             * 实现类与类之间的继承。\n             * @method inherits\n             * @grammar Base.inherits( super ) => child\n             * @grammar Base.inherits( super, protos ) => child\n             * @grammar Base.inherits( super, protos, statics ) => child\n             * @param  {Class} super 父类\n             * @param  {Object | Function} [protos] 子类或者对象。如果对象中包含constructor，子类将是用此属性值。\n             * @param  {Function} [protos.constructor] 子类构造器，不指定的话将创建个临时的直接执行父类构造器的方法。\n             * @param  {Object} [statics] 静态属性或方法。\n             * @return {Class} 返回子类。\n             * @example\n             * function Person() {\n             *     console.log( 'Super' );\n             * }\n             * Person.prototype.hello = function() {\n             *     console.log( 'hello' );\n             * };\n             *\n             * var Manager = Base.inherits( Person, {\n             *     world: function() {\n             *         console.log( 'World' );\n             *     }\n             * });\n             *\n             * // 因为没有指定构造器，父类的构造器将会执行。\n             * var instance = new Manager();    // => Super\n             *\n             * // 继承子父类的方法\n             * instance.hello();    // => hello\n             * instance.world();    // => World\n             *\n             * // 子类的__super__属性指向父类\n             * console.log( Manager.__super__ === Person );    // => true\n             */\n            inherits: function( Super, protos, staticProtos ) {\n                var child;\n    \n                if ( typeof protos === 'function' ) {\n                    child = protos;\n                    protos = null;\n                } else if ( protos && protos.hasOwnProperty('constructor') ) {\n                    child = protos.constructor;\n                } else {\n                    child = function() {\n                        return Super.apply( this, arguments );\n                    };\n                }\n    \n                // 复制静态方法\n                $.extend( true, child, Super, staticProtos || {} );\n    \n                /* jshint camelcase: false */\n    \n                // 让子类的__super__属性指向父类。\n                child.__super__ = Super.prototype;\n    \n                // 构建原型，添加原型方法或属性。\n                // 暂时用Object.create实现。\n                child.prototype = createObject( Super.prototype );\n                protos && $.extend( true, child.prototype, protos );\n    \n                return child;\n            },\n    \n            /**\n             * 一个不做任何事情的方法。可以用来赋值给默认的callback.\n             * @method noop\n             */\n            noop: noop,\n    \n            /**\n             * 返回一个新的方法，此方法将已指定的`context`来执行。\n             * @grammar Base.bindFn( fn, context ) => Function\n             * @method bindFn\n             * @example\n             * var doSomething = function() {\n             *         console.log( this.name );\n             *     },\n             *     obj = {\n             *         name: 'Object Name'\n             *     },\n             *     aliasFn = Base.bind( doSomething, obj );\n             *\n             *  aliasFn();    // => Object Name\n             *\n             */\n            bindFn: bindFn,\n    \n            /**\n             * 引用Console.log如果存在的话，否则引用一个[空函数noop](#WebUploader:Base.noop)。\n             * @grammar Base.log( args... ) => undefined\n             * @method log\n             */\n            log: (function() {\n                if ( window.console ) {\n                    return bindFn( console.log, console );\n                }\n                return noop;\n            })(),\n    \n            nextTick: (function() {\n    \n                return function( cb ) {\n                    setTimeout( cb, 1 );\n                };\n    \n                // @bug 当浏览器不在当前窗口时就停了。\n                // var next = window.requestAnimationFrame ||\n                //     window.webkitRequestAnimationFrame ||\n                //     window.mozRequestAnimationFrame ||\n                //     function( cb ) {\n                //         window.setTimeout( cb, 1000 / 60 );\n                //     };\n    \n                // // fix: Uncaught TypeError: Illegal invocation\n                // return bindFn( next, window );\n            })(),\n    \n            /**\n             * 被[uncurrythis](http://www.2ality.com/2011/11/uncurrying-this.html)的数组slice方法。\n             * 将用来将非数组对象转化成数组对象。\n             * @grammar Base.slice( target, start[, end] ) => Array\n             * @method slice\n             * @example\n             * function doSomthing() {\n             *     var args = Base.slice( arguments, 1 );\n             *     console.log( args );\n             * }\n             *\n             * doSomthing( 'ignored', 'arg2', 'arg3' );    // => Array [\"arg2\", \"arg3\"]\n             */\n            slice: uncurryThis( [].slice ),\n    \n            /**\n             * 生成唯一的ID\n             * @method guid\n             * @grammar Base.guid() => String\n             * @grammar Base.guid( prefx ) => String\n             */\n            guid: (function() {\n                var counter = 0;\n    \n                return function( prefix ) {\n                    var guid = (+new Date()).toString( 32 ),\n                        i = 0;\n    \n                    for ( ; i < 5; i++ ) {\n                        guid += Math.floor( Math.random() * 65535 ).toString( 32 );\n                    }\n    \n                    return (prefix || 'wu_') + guid + (counter++).toString( 32 );\n                };\n            })(),\n    \n            /**\n             * 格式化文件大小, 输出成带单位的字符串\n             * @method formatSize\n             * @grammar Base.formatSize( size ) => String\n             * @grammar Base.formatSize( size, pointLength ) => String\n             * @grammar Base.formatSize( size, pointLength, units ) => String\n             * @param {Number} size 文件大小\n             * @param {Number} [pointLength=2] 精确到的小数点数。\n             * @param {Array} [units=[ 'B', 'K', 'M', 'G', 'TB' ]] 单位数组。从字节，到千字节，一直往上指定。如果单位数组里面只指定了到了K(千字节)，同时文件大小大于M, 此方法的输出将还是显示成多少K.\n             * @example\n             * console.log( Base.formatSize( 100 ) );    // => 100B\n             * console.log( Base.formatSize( 1024 ) );    // => 1.00K\n             * console.log( Base.formatSize( 1024, 0 ) );    // => 1K\n             * console.log( Base.formatSize( 1024 * 1024 ) );    // => 1.00M\n             * console.log( Base.formatSize( 1024 * 1024 * 1024 ) );    // => 1.00G\n             * console.log( Base.formatSize( 1024 * 1024 * 1024, 0, ['B', 'KB', 'MB'] ) );    // => 1024MB\n             */\n            formatSize: function( size, pointLength, units ) {\n                var unit;\n    \n                units = units || [ 'B', 'K', 'M', 'G', 'TB' ];\n    \n                while ( (unit = units.shift()) && size > 1024 ) {\n                    size = size / 1024;\n                }\n    \n                return (unit === 'B' ? size : size.toFixed( pointLength || 2 )) +\n                        unit;\n            }\n        };\n    });\n    /**\n     * 事件处理类，可以独立使用，也可以扩展给对象使用。\n     * @fileOverview Mediator\n     */\n    define('mediator',[\n        'base'\n    ], function( Base ) {\n        var $ = Base.$,\n            slice = [].slice,\n            separator = /\\s+/,\n            protos;\n    \n        // 根据条件过滤出事件handlers.\n        function findHandlers( arr, name, callback, context ) {\n            return $.grep( arr, function( handler ) {\n                return handler &&\n                        (!name || handler.e === name) &&\n                        (!callback || handler.cb === callback ||\n                        handler.cb._cb === callback) &&\n                        (!context || handler.ctx === context);\n            });\n        }\n    \n        function eachEvent( events, callback, iterator ) {\n            // 不支持对象，只支持多个event用空格隔开\n            $.each( (events || '').split( separator ), function( _, key ) {\n                iterator( key, callback );\n            });\n        }\n    \n        function triggerHanders( events, args ) {\n            var stoped = false,\n                i = -1,\n                len = events.length,\n                handler;\n    \n            while ( ++i < len ) {\n                handler = events[ i ];\n    \n                if ( handler.cb.apply( handler.ctx2, args ) === false ) {\n                    stoped = true;\n                    break;\n                }\n            }\n    \n            return !stoped;\n        }\n    \n        protos = {\n    \n            /**\n             * 绑定事件。\n             *\n             * `callback`方法在执行时，arguments将会来源于trigger的时候携带的参数。如\n             * ```javascript\n             * var obj = {};\n             *\n             * // 使得obj有事件行为\n             * Mediator.installTo( obj );\n             *\n             * obj.on( 'testa', function( arg1, arg2 ) {\n             *     console.log( arg1, arg2 ); // => 'arg1', 'arg2'\n             * });\n             *\n             * obj.trigger( 'testa', 'arg1', 'arg2' );\n             * ```\n             *\n             * 如果`callback`中，某一个方法`return false`了，则后续的其他`callback`都不会被执行到。\n             * 切会影响到`trigger`方法的返回值，为`false`。\n             *\n             * `on`还可以用来添加一个特殊事件`all`, 这样所有的事件触发都会响应到。同时此类`callback`中的arguments有一个不同处，\n             * 就是第一个参数为`type`，记录当前是什么事件在触发。此类`callback`的优先级比脚低，会再正常`callback`执行完后触发。\n             * ```javascript\n             * obj.on( 'all', function( type, arg1, arg2 ) {\n             *     console.log( type, arg1, arg2 ); // => 'testa', 'arg1', 'arg2'\n             * });\n             * ```\n             *\n             * @method on\n             * @grammar on( name, callback[, context] ) => self\n             * @param  {String}   name     事件名，支持多个事件用空格隔开\n             * @param  {Function} callback 事件处理器\n             * @param  {Object}   [context]  事件处理器的上下文。\n             * @return {self} 返回自身，方便链式\n             * @chainable\n             * @class Mediator\n             */\n            on: function( name, callback, context ) {\n                var me = this,\n                    set;\n    \n                if ( !callback ) {\n                    return this;\n                }\n    \n                set = this._events || (this._events = []);\n    \n                eachEvent( name, callback, function( name, callback ) {\n                    var handler = { e: name };\n    \n                    handler.cb = callback;\n                    handler.ctx = context;\n                    handler.ctx2 = context || me;\n                    handler.id = set.length;\n    \n                    set.push( handler );\n                });\n    \n                return this;\n            },\n    \n            /**\n             * 绑定事件，且当handler执行完后，自动解除绑定。\n             * @method once\n             * @grammar once( name, callback[, context] ) => self\n             * @param  {String}   name     事件名\n             * @param  {Function} callback 事件处理器\n             * @param  {Object}   [context]  事件处理器的上下文。\n             * @return {self} 返回自身，方便链式\n             * @chainable\n             */\n            once: function( name, callback, context ) {\n                var me = this;\n    \n                if ( !callback ) {\n                    return me;\n                }\n    \n                eachEvent( name, callback, function( name, callback ) {\n                    var once = function() {\n                            me.off( name, once );\n                            return callback.apply( context || me, arguments );\n                        };\n    \n                    once._cb = callback;\n                    me.on( name, once, context );\n                });\n    \n                return me;\n            },\n    \n            /**\n             * 解除事件绑定\n             * @method off\n             * @grammar off( [name[, callback[, context] ] ] ) => self\n             * @param  {String}   [name]     事件名\n             * @param  {Function} [callback] 事件处理器\n             * @param  {Object}   [context]  事件处理器的上下文。\n             * @return {self} 返回自身，方便链式\n             * @chainable\n             */\n            off: function( name, cb, ctx ) {\n                var events = this._events;\n    \n                if ( !events ) {\n                    return this;\n                }\n    \n                if ( !name && !cb && !ctx ) {\n                    this._events = [];\n                    return this;\n                }\n    \n                eachEvent( name, cb, function( name, cb ) {\n                    $.each( findHandlers( events, name, cb, ctx ), function() {\n                        delete events[ this.id ];\n                    });\n                });\n    \n                return this;\n            },\n    \n            /**\n             * 触发事件\n             * @method trigger\n             * @grammar trigger( name[, args...] ) => self\n             * @param  {String}   type     事件名\n             * @param  {*} [...] 任意参数\n             * @return {Boolean} 如果handler中return false了，则返回false, 否则返回true\n             */\n            trigger: function( type ) {\n                var args, events, allEvents;\n    \n                if ( !this._events || !type ) {\n                    return this;\n                }\n    \n                args = slice.call( arguments, 1 );\n                events = findHandlers( this._events, type );\n                allEvents = findHandlers( this._events, 'all' );\n    \n                return triggerHanders( events, args ) &&\n                        triggerHanders( allEvents, arguments );\n            }\n        };\n    \n        /**\n         * 中介者，它本身是个单例，但可以通过[installTo](#WebUploader:Mediator:installTo)方法，使任何对象具备事件行为。\n         * 主要目的是负责模块与模块之间的合作，降低耦合度。\n         *\n         * @class Mediator\n         */\n        return $.extend({\n    \n            /**\n             * 可以通过这个接口，使任何对象具备事件功能。\n             * @method installTo\n             * @param  {Object} obj 需要具备事件行为的对象。\n             * @return {Object} 返回obj.\n             */\n            installTo: function( obj ) {\n                return $.extend( obj, protos );\n            }\n    \n        }, protos );\n    });\n    /**\n     * @fileOverview Uploader上传类\n     */\n    define('uploader',[\n        'base',\n        'mediator'\n    ], function( Base, Mediator ) {\n    \n        var $ = Base.$;\n    \n        /**\n         * 上传入口类。\n         * @class Uploader\n         * @constructor\n         * @grammar new Uploader( opts ) => Uploader\n         * @example\n         * var uploader = WebUploader.Uploader({\n         *     swf: 'path_of_swf/Uploader.swf',\n         *\n         *     // 开起分片上传。\n         *     chunked: true\n         * });\n         */\n        function Uploader( opts ) {\n            this.options = $.extend( true, {}, Uploader.options, opts );\n            this._init( this.options );\n        }\n    \n        // default Options\n        // widgets中有相应扩展\n        Uploader.options = {};\n        Mediator.installTo( Uploader.prototype );\n    \n        // 批量添加纯命令式方法。\n        $.each({\n            upload: 'start-upload',\n            stop: 'stop-upload',\n            getFile: 'get-file',\n            getFiles: 'get-files',\n            addFile: 'add-file',\n            addFiles: 'add-file',\n            sort: 'sort-files',\n            removeFile: 'remove-file',\n            cancelFile: 'cancel-file',\n            skipFile: 'skip-file',\n            retry: 'retry',\n            isInProgress: 'is-in-progress',\n            makeThumb: 'make-thumb',\n            md5File: 'md5-file',\n            getDimension: 'get-dimension',\n            addButton: 'add-btn',\n            predictRuntimeType: 'predict-runtime-type',\n            refresh: 'refresh',\n            disable: 'disable',\n            enable: 'enable',\n            reset: 'reset'\n        }, function( fn, command ) {\n            Uploader.prototype[ fn ] = function() {\n                return this.request( command, arguments );\n            };\n        });\n    \n        $.extend( Uploader.prototype, {\n            state: 'pending',\n    \n            _init: function( opts ) {\n                var me = this;\n    \n                me.request( 'init', opts, function() {\n                    me.state = 'ready';\n                    me.trigger('ready');\n                });\n            },\n    \n            /**\n             * 获取或者设置Uploader配置项。\n             * @method option\n             * @grammar option( key ) => *\n             * @grammar option( key, val ) => self\n             * @example\n             *\n             * // 初始状态图片上传前不会压缩\n             * var uploader = new WebUploader.Uploader({\n             *     compress: null;\n             * });\n             *\n             * // 修改后图片上传前，尝试将图片压缩到1600 * 1600\n             * uploader.option( 'compress', {\n             *     width: 1600,\n             *     height: 1600\n             * });\n             */\n            option: function( key, val ) {\n                var opts = this.options;\n    \n                // setter\n                if ( arguments.length > 1 ) {\n    \n                    if ( $.isPlainObject( val ) &&\n                            $.isPlainObject( opts[ key ] ) ) {\n                        $.extend( opts[ key ], val );\n                    } else {\n                        opts[ key ] = val;\n                    }\n    \n                } else {    // getter\n                    return key ? opts[ key ] : opts;\n                }\n            },\n    \n            /**\n             * 获取文件统计信息。返回一个包含一下信息的对象。\n             * * `successNum` 上传成功的文件数\n             * * `progressNum` 上传中的文件数\n             * * `cancelNum` 被删除的文件数\n             * * `invalidNum` 无效的文件数\n             * * `uploadFailNum` 上传失败的文件数\n             * * `queueNum` 还在队列中的文件数\n             * * `interruptNum` 被暂停的文件数\n             * @method getStats\n             * @grammar getStats() => Object\n             */\n            getStats: function() {\n                // return this._mgr.getStats.apply( this._mgr, arguments );\n                var stats = this.request('get-stats');\n    \n                return stats ? {\n                    successNum: stats.numOfSuccess,\n                    progressNum: stats.numOfProgress,\n    \n                    // who care?\n                    // queueFailNum: 0,\n                    cancelNum: stats.numOfCancel,\n                    invalidNum: stats.numOfInvalid,\n                    uploadFailNum: stats.numOfUploadFailed,\n                    queueNum: stats.numOfQueue,\n                    interruptNum: stats.numofInterrupt\n                } : {};\n            },\n    \n            // 需要重写此方法来来支持opts.onEvent和instance.onEvent的处理器\n            trigger: function( type/*, args...*/ ) {\n                var args = [].slice.call( arguments, 1 ),\n                    opts = this.options,\n                    name = 'on' + type.substring( 0, 1 ).toUpperCase() +\n                        type.substring( 1 );\n    \n                if (\n                        // 调用通过on方法注册的handler.\n                        Mediator.trigger.apply( this, arguments ) === false ||\n    \n                        // 调用opts.onEvent\n                        $.isFunction( opts[ name ] ) &&\n                        opts[ name ].apply( this, args ) === false ||\n    \n                        // 调用this.onEvent\n                        $.isFunction( this[ name ] ) &&\n                        this[ name ].apply( this, args ) === false ||\n    \n                        // 广播所有uploader的事件。\n                        Mediator.trigger.apply( Mediator,\n                        [ this, type ].concat( args ) ) === false ) {\n    \n                    return false;\n                }\n    \n                return true;\n            },\n    \n            /**\n             * 销毁 webuploader 实例\n             * @method destroy\n             * @grammar destroy() => undefined\n             */\n            destroy: function() {\n                this.request( 'destroy', arguments );\n                this.off();\n            },\n    \n            // widgets/widget.js将补充此方法的详细文档。\n            request: Base.noop\n        });\n    \n        /**\n         * 创建Uploader实例，等同于new Uploader( opts );\n         * @method create\n         * @class Base\n         * @static\n         * @grammar Base.create( opts ) => Uploader\n         */\n        Base.create = Uploader.create = function( opts ) {\n            return new Uploader( opts );\n        };\n    \n        // 暴露Uploader，可以通过它来扩展业务逻辑。\n        Base.Uploader = Uploader;\n    \n        return Uploader;\n    });\n    /**\n     * @fileOverview Runtime管理器，负责Runtime的选择, 连接\n     */\n    define('runtime/runtime',[\n        'base',\n        'mediator'\n    ], function( Base, Mediator ) {\n    \n        var $ = Base.$,\n            factories = {},\n    \n            // 获取对象的第一个key\n            getFirstKey = function( obj ) {\n                for ( var key in obj ) {\n                    if ( obj.hasOwnProperty( key ) ) {\n                        return key;\n                    }\n                }\n                return null;\n            };\n    \n        // 接口类。\n        function Runtime( options ) {\n            this.options = $.extend({\n                container: document.body\n            }, options );\n            this.uid = Base.guid('rt_');\n        }\n    \n        $.extend( Runtime.prototype, {\n    \n            getContainer: function() {\n                var opts = this.options,\n                    parent, container;\n    \n                if ( this._container ) {\n                    return this._container;\n                }\n    \n                parent = $( opts.container || document.body );\n                container = $( document.createElement('div') );\n    \n                container.attr( 'id', 'rt_' + this.uid );\n                container.css({\n                    position: 'absolute',\n                    top: '0px',\n                    left: '0px',\n                    width: '1px',\n                    height: '1px',\n                    overflow: 'hidden'\n                });\n    \n                parent.append( container );\n                parent.addClass('webuploader-container');\n                this._container = container;\n                this._parent = parent;\n                return container;\n            },\n    \n            init: Base.noop,\n            exec: Base.noop,\n    \n            destroy: function() {\n                this._container && this._container.remove();\n                this._parent && this._parent.removeClass('webuploader-container');\n                this.off();\n            }\n        });\n    \n        Runtime.orders = 'html5,flash';\n    \n    \n        /**\n         * 添加Runtime实现。\n         * @param {String} type    类型\n         * @param {Runtime} factory 具体Runtime实现。\n         */\n        Runtime.addRuntime = function( type, factory ) {\n            factories[ type ] = factory;\n        };\n    \n        Runtime.hasRuntime = function( type ) {\n            return !!(type ? factories[ type ] : getFirstKey( factories ));\n        };\n    \n        Runtime.create = function( opts, orders ) {\n            var type, runtime;\n    \n            orders = orders || Runtime.orders;\n            $.each( orders.split( /\\s*,\\s*/g ), function() {\n                if ( factories[ this ] ) {\n                    type = this;\n                    return false;\n                }\n            });\n    \n            type = type || getFirstKey( factories );\n    \n            if ( !type ) {\n                throw new Error('Runtime Error');\n            }\n    \n            runtime = new factories[ type ]( opts );\n            return runtime;\n        };\n    \n        Mediator.installTo( Runtime.prototype );\n        return Runtime;\n    });\n    \n    /**\n     * @fileOverview Runtime管理器，负责Runtime的选择, 连接\n     */\n    define('runtime/client',[\n        'base',\n        'mediator',\n        'runtime/runtime'\n    ], function( Base, Mediator, Runtime ) {\n    \n        var cache;\n    \n        cache = (function() {\n            var obj = {};\n    \n            return {\n                add: function( runtime ) {\n                    obj[ runtime.uid ] = runtime;\n                },\n    \n                get: function( ruid, standalone ) {\n                    var i;\n    \n                    if ( ruid ) {\n                        return obj[ ruid ];\n                    }\n    \n                    for ( i in obj ) {\n                        // 有些类型不能重用，比如filepicker.\n                        if ( standalone && obj[ i ].__standalone ) {\n                            continue;\n                        }\n    \n                        return obj[ i ];\n                    }\n    \n                    return null;\n                },\n    \n                remove: function( runtime ) {\n                    delete obj[ runtime.uid ];\n                }\n            };\n        })();\n    \n        function RuntimeClient( component, standalone ) {\n            var deferred = Base.Deferred(),\n                runtime;\n    \n            this.uid = Base.guid('client_');\n    \n            // 允许runtime没有初始化之前，注册一些方法在初始化后执行。\n            this.runtimeReady = function( cb ) {\n                return deferred.done( cb );\n            };\n    \n            this.connectRuntime = function( opts, cb ) {\n    \n                // already connected.\n                if ( runtime ) {\n                    throw new Error('already connected!');\n                }\n    \n                deferred.done( cb );\n    \n                if ( typeof opts === 'string' && cache.get( opts ) ) {\n                    runtime = cache.get( opts );\n                }\n    \n                // 像filePicker只能独立存在，不能公用。\n                runtime = runtime || cache.get( null, standalone );\n    \n                // 需要创建\n                if ( !runtime ) {\n                    runtime = Runtime.create( opts, opts.runtimeOrder );\n                    runtime.__promise = deferred.promise();\n                    runtime.once( 'ready', deferred.resolve );\n                    runtime.init();\n                    cache.add( runtime );\n                    runtime.__client = 1;\n                } else {\n                    // 来自cache\n                    Base.$.extend( runtime.options, opts );\n                    runtime.__promise.then( deferred.resolve );\n                    runtime.__client++;\n                }\n    \n                standalone && (runtime.__standalone = standalone);\n                return runtime;\n            };\n    \n            this.getRuntime = function() {\n                return runtime;\n            };\n    \n            this.disconnectRuntime = function() {\n                if ( !runtime ) {\n                    return;\n                }\n    \n                runtime.__client--;\n    \n                if ( runtime.__client <= 0 ) {\n                    cache.remove( runtime );\n                    delete runtime.__promise;\n                    runtime.destroy();\n                }\n    \n                runtime = null;\n            };\n    \n            this.exec = function() {\n                if ( !runtime ) {\n                    return;\n                }\n    \n                var args = Base.slice( arguments );\n                component && args.unshift( component );\n    \n                return runtime.exec.apply( this, args );\n            };\n    \n            this.getRuid = function() {\n                return runtime && runtime.uid;\n            };\n    \n            this.destroy = (function( destroy ) {\n                return function() {\n                    destroy && destroy.apply( this, arguments );\n                    this.trigger('destroy');\n                    this.off();\n                    this.exec('destroy');\n                    this.disconnectRuntime();\n                };\n            })( this.destroy );\n        }\n    \n        Mediator.installTo( RuntimeClient.prototype );\n        return RuntimeClient;\n    });\n    /**\n     * @fileOverview 错误信息\n     */\n    define('lib/dnd',[\n        'base',\n        'mediator',\n        'runtime/client'\n    ], function( Base, Mediator, RuntimeClent ) {\n    \n        var $ = Base.$;\n    \n        function DragAndDrop( opts ) {\n            opts = this.options = $.extend({}, DragAndDrop.options, opts );\n    \n            opts.container = $( opts.container );\n    \n            if ( !opts.container.length ) {\n                return;\n            }\n    \n            RuntimeClent.call( this, 'DragAndDrop' );\n        }\n    \n        DragAndDrop.options = {\n            accept: null,\n            disableGlobalDnd: false\n        };\n    \n        Base.inherits( RuntimeClent, {\n            constructor: DragAndDrop,\n    \n            init: function() {\n                var me = this;\n    \n                me.connectRuntime( me.options, function() {\n                    me.exec('init');\n                    me.trigger('ready');\n                });\n            }\n        });\n    \n        Mediator.installTo( DragAndDrop.prototype );\n    \n        return DragAndDrop;\n    });\n    /**\n     * @fileOverview 组件基类。\n     */\n    define('widgets/widget',[\n        'base',\n        'uploader'\n    ], function( Base, Uploader ) {\n    \n        var $ = Base.$,\n            _init = Uploader.prototype._init,\n            _destroy = Uploader.prototype.destroy,\n            IGNORE = {},\n            widgetClass = [];\n    \n        function isArrayLike( obj ) {\n            if ( !obj ) {\n                return false;\n            }\n    \n            var length = obj.length,\n                type = $.type( obj );\n    \n            if ( obj.nodeType === 1 && length ) {\n                return true;\n            }\n    \n            return type === 'array' || type !== 'function' && type !== 'string' &&\n                    (length === 0 || typeof length === 'number' && length > 0 &&\n                    (length - 1) in obj);\n        }\n    \n        function Widget( uploader ) {\n            this.owner = uploader;\n            this.options = uploader.options;\n        }\n    \n        $.extend( Widget.prototype, {\n    \n            init: Base.noop,\n    \n            // 类Backbone的事件监听声明，监听uploader实例上的事件\n            // widget直接无法监听事件，事件只能通过uploader来传递\n            invoke: function( apiName, args ) {\n    \n                /*\n                    {\n                        'make-thumb': 'makeThumb'\n                    }\n                 */\n                var map = this.responseMap;\n    \n                // 如果无API响应声明则忽略\n                if ( !map || !(apiName in map) || !(map[ apiName ] in this) ||\n                        !$.isFunction( this[ map[ apiName ] ] ) ) {\n    \n                    return IGNORE;\n                }\n    \n                return this[ map[ apiName ] ].apply( this, args );\n    \n            },\n    \n            /**\n             * 发送命令。当传入`callback`或者`handler`中返回`promise`时。返回一个当所有`handler`中的promise都完成后完成的新`promise`。\n             * @method request\n             * @grammar request( command, args ) => * | Promise\n             * @grammar request( command, args, callback ) => Promise\n             * @for  Uploader\n             */\n            request: function() {\n                return this.owner.request.apply( this.owner, arguments );\n            }\n        });\n    \n        // 扩展Uploader.\n        $.extend( Uploader.prototype, {\n    \n            /**\n             * @property {String | Array} [disableWidgets=undefined]\n             * @namespace options\n             * @for Uploader\n             * @description 默认所有 Uploader.register 了的 widget 都会被加载，如果禁用某一部分，请通过此 option 指定黑名单。\n             */\n    \n            // 覆写_init用来初始化widgets\n            _init: function() {\n                var me = this,\n                    widgets = me._widgets = [],\n                    deactives = me.options.disableWidgets || '';\n    \n                $.each( widgetClass, function( _, klass ) {\n                    (!deactives || !~deactives.indexOf( klass._name )) &&\n                        widgets.push( new klass( me ) );\n                });\n    \n                return _init.apply( me, arguments );\n            },\n    \n            request: function( apiName, args, callback ) {\n                var i = 0,\n                    widgets = this._widgets,\n                    len = widgets && widgets.length,\n                    rlts = [],\n                    dfds = [],\n                    widget, rlt, promise, key;\n    \n                args = isArrayLike( args ) ? args : [ args ];\n    \n                for ( ; i < len; i++ ) {\n                    widget = widgets[ i ];\n                    rlt = widget.invoke( apiName, args );\n    \n                    if ( rlt !== IGNORE ) {\n    \n                        // Deferred对象\n                        if ( Base.isPromise( rlt ) ) {\n                            dfds.push( rlt );\n                        } else {\n                            rlts.push( rlt );\n                        }\n                    }\n                }\n    \n                // 如果有callback，则用异步方式。\n                if ( callback || dfds.length ) {\n                    promise = Base.when.apply( Base, dfds );\n                    key = promise.pipe ? 'pipe' : 'then';\n    \n                    // 很重要不能删除。删除了会死循环。\n                    // 保证执行顺序。让callback总是在下一个 tick 中执行。\n                    return promise[ key ](function() {\n                                var deferred = Base.Deferred(),\n                                    args = arguments;\n    \n                                if ( args.length === 1 ) {\n                                    args = args[ 0 ];\n                                }\n    \n                                setTimeout(function() {\n                                    deferred.resolve( args );\n                                }, 1 );\n    \n                                return deferred.promise();\n                            })[ callback ? key : 'done' ]( callback || Base.noop );\n                } else {\n                    return rlts[ 0 ];\n                }\n            },\n    \n            destroy: function() {\n                _destroy.apply( this, arguments );\n                this._widgets = null;\n            }\n        });\n    \n        /**\n         * 添加组件\n         * @grammar Uploader.register(proto);\n         * @grammar Uploader.register(map, proto);\n         * @param  {object} responseMap API 名称与函数实现的映射\n         * @param  {object} proto 组件原型，构造函数通过 constructor 属性定义\n         * @method Uploader.register\n         * @for Uploader\n         * @example\n         * Uploader.register({\n         *     'make-thumb': 'makeThumb'\n         * }, {\n         *     init: function( options ) {},\n         *     makeThumb: function() {}\n         * });\n         *\n         * Uploader.register({\n         *     'make-thumb': function() {\n         *         \n         *     }\n         * });\n         */\n        Uploader.register = Widget.register = function( responseMap, widgetProto ) {\n            var map = { init: 'init', destroy: 'destroy', name: 'anonymous' },\n                klass;\n    \n            if ( arguments.length === 1 ) {\n                widgetProto = responseMap;\n    \n                // 自动生成 map 表。\n                $.each(widgetProto, function(key) {\n                    if ( key[0] === '_' || key === 'name' ) {\n                        key === 'name' && (map.name = widgetProto.name);\n                        return;\n                    }\n    \n                    map[key.replace(/[A-Z]/g, '-$&').toLowerCase()] = key;\n                });\n    \n            } else {\n                map = $.extend( map, responseMap );\n            }\n    \n            widgetProto.responseMap = map;\n            klass = Base.inherits( Widget, widgetProto );\n            klass._name = map.name;\n            widgetClass.push( klass );\n    \n            return klass;\n        };\n    \n        /**\n         * 删除插件，只有在注册时指定了名字的才能被删除。\n         * @grammar Uploader.unRegister(name);\n         * @param  {string} name 组件名字\n         * @method Uploader.unRegister\n         * @for Uploader\n         * @example\n         *\n         * Uploader.register({\n         *     name: 'custom',\n         *     \n         *     'make-thumb': function() {\n         *         \n         *     }\n         * });\n         *\n         * Uploader.unRegister('custom');\n         */\n        Uploader.unRegister = Widget.unRegister = function( name ) {\n            if ( !name || name === 'anonymous' ) {\n                return;\n            }\n            \n            // 删除指定的插件。\n            for ( var i = widgetClass.length; i--; ) {\n                if ( widgetClass[i]._name === name ) {\n                    widgetClass.splice(i, 1)\n                }\n            }\n        };\n    \n        return Widget;\n    });\n    /**\n     * @fileOverview DragAndDrop Widget。\n     */\n    define('widgets/filednd',[\n        'base',\n        'uploader',\n        'lib/dnd',\n        'widgets/widget'\n    ], function( Base, Uploader, Dnd ) {\n        var $ = Base.$;\n    \n        Uploader.options.dnd = '';\n    \n        /**\n         * @property {Selector} [dnd=undefined]  指定Drag And Drop拖拽的容器，如果不指定，则不启动。\n         * @namespace options\n         * @for Uploader\n         */\n        \n        /**\n         * @property {Selector} [disableGlobalDnd=false]  是否禁掉整个页面的拖拽功能，如果不禁用，图片拖进来的时候会默认被浏览器打开。\n         * @namespace options\n         * @for Uploader\n         */\n    \n        /**\n         * @event dndAccept\n         * @param {DataTransferItemList} items DataTransferItem\n         * @description 阻止此事件可以拒绝某些类型的文件拖入进来。目前只有 chrome 提供这样的 API，且只能通过 mime-type 验证。\n         * @for  Uploader\n         */\n        return Uploader.register({\n            name: 'dnd',\n            \n            init: function( opts ) {\n    \n                if ( !opts.dnd ||\n                        this.request('predict-runtime-type') !== 'html5' ) {\n                    return;\n                }\n    \n                var me = this,\n                    deferred = Base.Deferred(),\n                    options = $.extend({}, {\n                        disableGlobalDnd: opts.disableGlobalDnd,\n                        container: opts.dnd,\n                        accept: opts.accept\n                    }),\n                    dnd;\n    \n                this.dnd = dnd = new Dnd( options );\n    \n                dnd.once( 'ready', deferred.resolve );\n                dnd.on( 'drop', function( files ) {\n                    me.request( 'add-file', [ files ]);\n                });\n    \n                // 检测文件是否全部允许添加。\n                dnd.on( 'accept', function( items ) {\n                    return me.owner.trigger( 'dndAccept', items );\n                });\n    \n                dnd.init();\n    \n                return deferred.promise();\n            },\n    \n            destroy: function() {\n                this.dnd && this.dnd.destroy();\n            }\n        });\n    });\n    \n    /**\n     * @fileOverview 错误信息\n     */\n    define('lib/filepaste',[\n        'base',\n        'mediator',\n        'runtime/client'\n    ], function( Base, Mediator, RuntimeClent ) {\n    \n        var $ = Base.$;\n    \n        function FilePaste( opts ) {\n            opts = this.options = $.extend({}, opts );\n            opts.container = $( opts.container || document.body );\n            RuntimeClent.call( this, 'FilePaste' );\n        }\n    \n        Base.inherits( RuntimeClent, {\n            constructor: FilePaste,\n    \n            init: function() {\n                var me = this;\n    \n                me.connectRuntime( me.options, function() {\n                    me.exec('init');\n                    me.trigger('ready');\n                });\n            }\n        });\n    \n        Mediator.installTo( FilePaste.prototype );\n    \n        return FilePaste;\n    });\n    /**\n     * @fileOverview 组件基类。\n     */\n    define('widgets/filepaste',[\n        'base',\n        'uploader',\n        'lib/filepaste',\n        'widgets/widget'\n    ], function( Base, Uploader, FilePaste ) {\n        var $ = Base.$;\n    \n        /**\n         * @property {Selector} [paste=undefined]  指定监听paste事件的容器，如果不指定，不启用此功能。此功能为通过粘贴来添加截屏的图片。建议设置为`document.body`.\n         * @namespace options\n         * @for Uploader\n         */\n        return Uploader.register({\n            name: 'paste',\n            \n            init: function( opts ) {\n    \n                if ( !opts.paste ||\n                        this.request('predict-runtime-type') !== 'html5' ) {\n                    return;\n                }\n    \n                var me = this,\n                    deferred = Base.Deferred(),\n                    options = $.extend({}, {\n                        container: opts.paste,\n                        accept: opts.accept\n                    }),\n                    paste;\n    \n                this.paste = paste = new FilePaste( options );\n    \n                paste.once( 'ready', deferred.resolve );\n                paste.on( 'paste', function( files ) {\n                    me.owner.request( 'add-file', [ files ]);\n                });\n                paste.init();\n    \n                return deferred.promise();\n            },\n    \n            destroy: function() {\n                this.paste && this.paste.destroy();\n            }\n        });\n    });\n    /**\n     * @fileOverview Blob\n     */\n    define('lib/blob',[\n        'base',\n        'runtime/client'\n    ], function( Base, RuntimeClient ) {\n    \n        function Blob( ruid, source ) {\n            var me = this;\n    \n            me.source = source;\n            me.ruid = ruid;\n            this.size = source.size || 0;\n    \n            // 如果没有指定 mimetype, 但是知道文件后缀。\n            if ( !source.type && this.ext &&\n                    ~'jpg,jpeg,png,gif,bmp'.indexOf( this.ext ) ) {\n                this.type = 'image/' + (this.ext === 'jpg' ? 'jpeg' : this.ext);\n            } else {\n                this.type = source.type || 'application/octet-stream';\n            }\n    \n            RuntimeClient.call( me, 'Blob' );\n            this.uid = source.uid || this.uid;\n    \n            if ( ruid ) {\n                me.connectRuntime( ruid );\n            }\n        }\n    \n        Base.inherits( RuntimeClient, {\n            constructor: Blob,\n    \n            slice: function( start, end ) {\n                return this.exec( 'slice', start, end );\n            },\n    \n            getSource: function() {\n                return this.source;\n            }\n        });\n    \n        return Blob;\n    });\n    /**\n     * 为了统一化Flash的File和HTML5的File而存在。\n     * 以至于要调用Flash里面的File，也可以像调用HTML5版本的File一下。\n     * @fileOverview File\n     */\n    define('lib/file',[\n        'base',\n        'lib/blob'\n    ], function( Base, Blob ) {\n    \n        var uid = 1,\n            rExt = /\\.([^.]+)$/;\n    \n        function File( ruid, file ) {\n            var ext;\n    \n            this.name = file.name || ('untitled' + uid++);\n            ext = rExt.exec( file.name ) ? RegExp.$1.toLowerCase() : '';\n    \n            // todo 支持其他类型文件的转换。\n            // 如果有 mimetype, 但是文件名里面没有找出后缀规律\n            if ( !ext && file.type ) {\n                ext = /\\/(jpg|jpeg|png|gif|bmp)$/i.exec( file.type ) ?\n                        RegExp.$1.toLowerCase() : '';\n                this.name += '.' + ext;\n            }\n    \n            this.ext = ext;\n            this.lastModifiedDate = file.lastModifiedDate ||\n                    (new Date()).toLocaleString();\n    \n            Blob.apply( this, arguments );\n        }\n    \n        return Base.inherits( Blob, File );\n    });\n    \n    /**\n     * @fileOverview 错误信息\n     */\n    define('lib/filepicker',[\n        'base',\n        'runtime/client',\n        'lib/file'\n    ], function( Base, RuntimeClient, File ) {\n    \n        var $ = Base.$;\n    \n        function FilePicker( opts ) {\n            opts = this.options = $.extend({}, FilePicker.options, opts );\n    \n            opts.container = $( opts.id );\n    \n            if ( !opts.container.length ) {\n                throw new Error('按钮指定错误');\n            }\n    \n            opts.innerHTML = opts.innerHTML || opts.label ||\n                    opts.container.html() || '';\n    \n            opts.button = $( opts.button || document.createElement('div') );\n            opts.button.html( opts.innerHTML );\n            opts.container.html( opts.button );\n    \n            RuntimeClient.call( this, 'FilePicker', true );\n        }\n    \n        FilePicker.options = {\n            button: null,\n            container: null,\n            label: null,\n            innerHTML: null,\n            multiple: true,\n            accept: null,\n            name: 'file',\n            style: 'webuploader-pick'   //pick element class attribute, default is \"webuploader-pick\"\n        };\n    \n        Base.inherits( RuntimeClient, {\n            constructor: FilePicker,\n    \n            init: function() {\n                var me = this,\n                    opts = me.options,\n                    button = opts.button,\n                    style = opts.style;\n    \n                if (style)\n                    button.addClass('webuploader-pick');\n    \n                me.on( 'all', function( type ) {\n                    var files;\n    \n                    switch ( type ) {\n                        case 'mouseenter':\n                            if (style)\n                                button.addClass('webuploader-pick-hover');\n                            break;\n    \n                        case 'mouseleave':\n                            if (style)\n                                button.removeClass('webuploader-pick-hover');\n                            break;\n    \n                        case 'change':\n                            files = me.exec('getFiles');\n                            me.trigger( 'select', $.map( files, function( file ) {\n                                file = new File( me.getRuid(), file );\n    \n                                // 记录来源。\n                                file._refer = opts.container;\n                                return file;\n                            }), opts.container );\n                            break;\n                    }\n                });\n    \n                me.connectRuntime( opts, function() {\n                    me.refresh();\n                    me.exec( 'init', opts );\n                    me.trigger('ready');\n                });\n    \n                this._resizeHandler = Base.bindFn( this.refresh, this );\n                $( window ).on( 'resize', this._resizeHandler );\n            },\n    \n            refresh: function() {\n                var shimContainer = this.getRuntime().getContainer(),\n                    button = this.options.button,\n                    width = button.outerWidth ?\n                            button.outerWidth() : button.width(),\n    \n                    height = button.outerHeight ?\n                            button.outerHeight() : button.height(),\n    \n                    pos = button.offset();\n    \n                width && height && shimContainer.css({\n                    bottom: 'auto',\n                    right: 'auto',\n                    width: width + 'px',\n                    height: height + 'px'\n                }).offset( pos );\n            },\n    \n            enable: function() {\n                var btn = this.options.button;\n    \n                btn.removeClass('webuploader-pick-disable');\n                this.refresh();\n            },\n    \n            disable: function() {\n                var btn = this.options.button;\n    \n                this.getRuntime().getContainer().css({\n                    top: '-99999px'\n                });\n    \n                btn.addClass('webuploader-pick-disable');\n            },\n    \n            destroy: function() {\n                var btn = this.options.button;\n                $( window ).off( 'resize', this._resizeHandler );\n                btn.removeClass('webuploader-pick-disable webuploader-pick-hover ' +\n                    'webuploader-pick');\n            }\n        });\n    \n        return FilePicker;\n    });\n    \n    /**\n     * @fileOverview 文件选择相关\n     */\n    define('widgets/filepicker',[\n        'base',\n        'uploader',\n        'lib/filepicker',\n        'widgets/widget'\n    ], function( Base, Uploader, FilePicker ) {\n        var $ = Base.$;\n    \n        $.extend( Uploader.options, {\n    \n            /**\n             * @property {Selector | Object} [pick=undefined]\n             * @namespace options\n             * @for Uploader\n             * @description 指定选择文件的按钮容器，不指定则不创建按钮。\n             *\n             * * `id` {Seletor|dom} 指定选择文件的按钮容器，不指定则不创建按钮。**注意** 这里虽然写的是 id, 但是不是只支持 id, 还支持 class, 或者 dom 节点。\n             * * `label` {String} 请采用 `innerHTML` 代替\n             * * `innerHTML` {String} 指定按钮文字。不指定时优先从指定的容器中看是否自带文字。\n             * * `multiple` {Boolean} 是否开起同时选择多个文件能力。\n             */\n            pick: null,\n    \n            /**\n             * @property {Arroy} [accept=null]\n             * @namespace options\n             * @for Uploader\n             * @description 指定接受哪些类型的文件。 由于目前还有ext转mimeType表，所以这里需要分开指定。\n             *\n             * * `title` {String} 文字描述\n             * * `extensions` {String} 允许的文件后缀，不带点，多个用逗号分割。\n             * * `mimeTypes` {String} 多个用逗号分割。\n             *\n             * 如：\n             *\n             * ```\n             * {\n             *     title: 'Images',\n             *     extensions: 'gif,jpg,jpeg,bmp,png',\n             *     mimeTypes: 'image/*'\n             * }\n             * ```\n             */\n            accept: null/*{\n                title: 'Images',\n                extensions: 'gif,jpg,jpeg,bmp,png',\n                mimeTypes: 'image/*'\n            }*/\n        });\n    \n        return Uploader.register({\n            name: 'picker',\n    \n            init: function( opts ) {\n                this.pickers = [];\n                return opts.pick && this.addBtn( opts.pick );\n            },\n    \n            refresh: function() {\n                $.each( this.pickers, function() {\n                    this.refresh();\n                });\n            },\n    \n            /**\n             * @method addBtn\n             * @for Uploader\n             * @grammar addBtn( pick ) => Promise\n             * @description\n             * 添加文件选择按钮，如果一个按钮不够，需要调用此方法来添加。参数跟[options.pick](#WebUploader:Uploader:options)一致。\n             * @example\n             * uploader.addBtn({\n             *     id: '#btnContainer',\n             *     innerHTML: '选择文件'\n             * });\n             */\n            addBtn: function( pick ) {\n                var me = this,\n                    opts = me.options,\n                    accept = opts.accept,\n                    promises = [];\n    \n                if ( !pick ) {\n                    return;\n                }\n    \n                $.isPlainObject( pick ) || (pick = {\n                    id: pick\n                });\n    \n                $( pick.id ).each(function() {\n                    var options, picker, deferred;\n    \n                    deferred = Base.Deferred();\n    \n                    options = $.extend({}, pick, {\n                        accept: $.isPlainObject( accept ) ? [ accept ] : accept,\n                        swf: opts.swf,\n                        runtimeOrder: opts.runtimeOrder,\n                        id: this\n                    });\n    \n                    picker = new FilePicker( options );\n    \n                    picker.once( 'ready', deferred.resolve );\n                    picker.on( 'select', function( files ) {\n                        me.owner.request( 'add-file', [ files ]);\n                    });\n                    picker.on('dialogopen', function() {\n                        me.owner.trigger('dialogOpen', picker.button);\n                    });\n                    picker.init();\n    \n                    me.pickers.push( picker );\n    \n                    promises.push( deferred.promise() );\n                });\n    \n                return Base.when.apply( Base, promises );\n            },\n    \n            disable: function() {\n                $.each( this.pickers, function() {\n                    this.disable();\n                });\n            },\n    \n            enable: function() {\n                $.each( this.pickers, function() {\n                    this.enable();\n                });\n            },\n    \n            destroy: function() {\n                $.each( this.pickers, function() {\n                    this.destroy();\n                });\n                this.pickers = null;\n            }\n        });\n    });\n    /**\n     * @fileOverview Image\n     */\n    define('lib/image',[\n        'base',\n        'runtime/client',\n        'lib/blob'\n    ], function( Base, RuntimeClient, Blob ) {\n        var $ = Base.$;\n    \n        // 构造器。\n        function Image( opts ) {\n            this.options = $.extend({}, Image.options, opts );\n            RuntimeClient.call( this, 'Image' );\n    \n            this.on( 'load', function() {\n                this._info = this.exec('info');\n                this._meta = this.exec('meta');\n            });\n        }\n    \n        // 默认选项。\n        Image.options = {\n    \n            // 默认的图片处理质量\n            quality: 90,\n    \n            // 是否裁剪\n            crop: false,\n    \n            // 是否保留头部信息\n            preserveHeaders: false,\n    \n            // 是否允许放大。\n            allowMagnify: false\n        };\n    \n        // 继承RuntimeClient.\n        Base.inherits( RuntimeClient, {\n            constructor: Image,\n    \n            info: function( val ) {\n    \n                // setter\n                if ( val ) {\n                    this._info = val;\n                    return this;\n                }\n    \n                // getter\n                return this._info;\n            },\n    \n            meta: function( val ) {\n    \n                // setter\n                if ( val ) {\n                    this._meta = val;\n                    return this;\n                }\n    \n                // getter\n                return this._meta;\n            },\n    \n            loadFromBlob: function( blob ) {\n                var me = this,\n                    ruid = blob.getRuid();\n    \n                this.connectRuntime( ruid, function() {\n                    me.exec( 'init', me.options );\n                    me.exec( 'loadFromBlob', blob );\n                });\n            },\n    \n            resize: function() {\n                var args = Base.slice( arguments );\n                return this.exec.apply( this, [ 'resize' ].concat( args ) );\n            },\n    \n            crop: function() {\n                var args = Base.slice( arguments );\n                return this.exec.apply( this, [ 'crop' ].concat( args ) );\n            },\n    \n            getAsDataUrl: function( type ) {\n                return this.exec( 'getAsDataUrl', type );\n            },\n    \n            getAsBlob: function( type ) {\n                var blob = this.exec( 'getAsBlob', type );\n    \n                return new Blob( this.getRuid(), blob );\n            }\n        });\n    \n        return Image;\n    });\n    /**\n     * @fileOverview 图片操作, 负责预览图片和上传前压缩图片\n     */\n    define('widgets/image',[\n        'base',\n        'uploader',\n        'lib/image',\n        'widgets/widget'\n    ], function( Base, Uploader, Image ) {\n    \n        var $ = Base.$,\n            throttle;\n    \n        // 根据要处理的文件大小来节流，一次不能处理太多，会卡。\n        throttle = (function( max ) {\n            var occupied = 0,\n                waiting = [],\n                tick = function() {\n                    var item;\n    \n                    while ( waiting.length && occupied < max ) {\n                        item = waiting.shift();\n                        occupied += item[ 0 ];\n                        item[ 1 ]();\n                    }\n                };\n    \n            return function( emiter, size, cb ) {\n                waiting.push([ size, cb ]);\n                emiter.once( 'destroy', function() {\n                    occupied -= size;\n                    setTimeout( tick, 1 );\n                });\n                setTimeout( tick, 1 );\n            };\n        })( 5 * 1024 * 1024 );\n    \n        $.extend( Uploader.options, {\n    \n            /**\n             * @property {Object} [thumb]\n             * @namespace options\n             * @for Uploader\n             * @description 配置生成缩略图的选项。\n             *\n             * 默认为：\n             *\n             * ```javascript\n             * {\n             *     width: 110,\n             *     height: 110,\n             *\n             *     // 图片质量，只有type为`image/jpeg`的时候才有效。\n             *     quality: 70,\n             *\n             *     // 是否允许放大，如果想要生成小图的时候不失真，此选项应该设置为false.\n             *     allowMagnify: true,\n             *\n             *     // 是否允许裁剪。\n             *     crop: true,\n             *\n             *     // 为空的话则保留原有图片格式。\n             *     // 否则强制转换成指定的类型。\n             *     type: 'image/jpeg'\n             * }\n             * ```\n             */\n            thumb: {\n                width: 110,\n                height: 110,\n                quality: 70,\n                allowMagnify: true,\n                crop: true,\n                preserveHeaders: false,\n    \n                // 为空的话则保留原有图片格式。\n                // 否则强制转换成指定的类型。\n                // IE 8下面 base64 大小不能超过 32K 否则预览失败，而非 jpeg 编码的图片很可\n                // 能会超过 32k, 所以这里设置成预览的时候都是 image/jpeg\n                type: 'image/jpeg'\n            },\n    \n            /**\n             * @property {Object} [compress]\n             * @namespace options\n             * @for Uploader\n             * @description 配置压缩的图片的选项。如果此选项为`false`, 则图片在上传前不进行压缩。\n             *\n             * 默认为：\n             *\n             * ```javascript\n             * {\n             *     width: 1600,\n             *     height: 1600,\n             *\n             *     // 图片质量，只有type为`image/jpeg`的时候才有效。\n             *     quality: 90,\n             *\n             *     // 是否允许放大，如果想要生成小图的时候不失真，此选项应该设置为false.\n             *     allowMagnify: false,\n             *\n             *     // 是否允许裁剪。\n             *     crop: false,\n             *\n             *     // 是否保留头部meta信息。\n             *     preserveHeaders: true,\n             *\n             *     // 如果发现压缩后文件大小比原来还大，则使用原来图片\n             *     // 此属性可能会影响图片自动纠正功能\n             *     noCompressIfLarger: false,\n             *\n             *     // 单位字节，如果图片大小小于此值，不会采用压缩。\n             *     compressSize: 0\n             * }\n             * ```\n             */\n            compress: {\n                width: 1600,\n                height: 1600,\n                quality: 90,\n                allowMagnify: false,\n                crop: false,\n                preserveHeaders: true\n            }\n        });\n    \n        return Uploader.register({\n    \n            name: 'image',\n    \n    \n            /**\n             * 生成缩略图，此过程为异步，所以需要传入`callback`。\n             * 通常情况在图片加入队里后调用此方法来生成预览图以增强交互效果。\n             *\n             * 当 width 或者 height 的值介于 0 - 1 时，被当成百分比使用。\n             *\n             * `callback`中可以接收到两个参数。\n             * * 第一个为error，如果生成缩略图有错误，此error将为真。\n             * * 第二个为ret, 缩略图的Data URL值。\n             *\n             * **注意**\n             * Date URL在IE6/7中不支持，所以不用调用此方法了，直接显示一张暂不支持预览图片好了。\n             * 也可以借助服务端，将 base64 数据传给服务端，生成一个临时文件供预览。\n             *\n             * @method makeThumb\n             * @grammar makeThumb( file, callback ) => undefined\n             * @grammar makeThumb( file, callback, width, height ) => undefined\n             * @for Uploader\n             * @example\n             *\n             * uploader.on( 'fileQueued', function( file ) {\n             *     var $li = ...;\n             *\n             *     uploader.makeThumb( file, function( error, ret ) {\n             *         if ( error ) {\n             *             $li.text('预览错误');\n             *         } else {\n             *             $li.append('<img alt=\"\" src=\"' + ret + '\" />');\n             *         }\n             *     });\n             *\n             * });\n             */\n            makeThumb: function( file, cb, width, height ) {\n                var opts, image;\n    \n                file = this.request( 'get-file', file );\n    \n                // 只预览图片格式。\n                if ( !file.type.match( /^image/ ) ) {\n                    cb( true );\n                    return;\n                }\n    \n                opts = $.extend({}, this.options.thumb );\n    \n                // 如果传入的是object.\n                if ( $.isPlainObject( width ) ) {\n                    opts = $.extend( opts, width );\n                    width = null;\n                }\n    \n                width = width || opts.width;\n                height = height || opts.height;\n    \n                image = new Image( opts );\n    \n                image.once( 'load', function() {\n                    file._info = file._info || image.info();\n                    file._meta = file._meta || image.meta();\n    \n                    // 如果 width 的值介于 0 - 1\n                    // 说明设置的是百分比。\n                    if ( width <= 1 && width > 0 ) {\n                        width = file._info.width * width;\n                    }\n    \n                    // 同样的规则应用于 height\n                    if ( height <= 1 && height > 0 ) {\n                        height = file._info.height * height;\n                    }\n    \n                    image.resize( width, height );\n                });\n    \n                // 当 resize 完后\n                image.once( 'complete', function() {\n                    cb( false, image.getAsDataUrl( opts.type ) );\n                    image.destroy();\n                });\n    \n                image.once( 'error', function( reason ) {\n                    cb( reason || true );\n                    image.destroy();\n                });\n    \n                throttle( image, file.source.size, function() {\n                    file._info && image.info( file._info );\n                    file._meta && image.meta( file._meta );\n                    image.loadFromBlob( file.source );\n                });\n            },\n    \n            beforeSendFile: function( file ) {\n                var opts = this.options.compress || this.options.resize,\n                    compressSize = opts && opts.compressSize || 0,\n                    noCompressIfLarger = opts && opts.noCompressIfLarger || false,\n                    image, deferred;\n    \n                file = this.request( 'get-file', file );\n    \n                // 只压缩 jpeg 图片格式。\n                // gif 可能会丢失针\n                // bmp png 基本上尺寸都不大，且压缩比比较小。\n                if ( !opts || !~'image/jpeg,image/jpg'.indexOf( file.type ) ||\n                        file.size < compressSize ||\n                        file._compressed ) {\n                    return;\n                }\n    \n                opts = $.extend({}, opts );\n                deferred = Base.Deferred();\n    \n                image = new Image( opts );\n    \n                deferred.always(function() {\n                    image.destroy();\n                    image = null;\n                });\n                image.once( 'error', deferred.reject );\n                image.once( 'load', function() {\n                    var width = opts.width,\n                        height = opts.height;\n    \n                    file._info = file._info || image.info();\n                    file._meta = file._meta || image.meta();\n    \n                    // 如果 width 的值介于 0 - 1\n                    // 说明设置的是百分比。\n                    if ( width <= 1 && width > 0 ) {\n                        width = file._info.width * width;\n                    }\n    \n                    // 同样的规则应用于 height\n                    if ( height <= 1 && height > 0 ) {\n                        height = file._info.height * height;\n                    }\n    \n                    image.resize( width, height );\n                });\n    \n                image.once( 'complete', function() {\n                    var blob, size;\n    \n                    // 移动端 UC / qq 浏览器的无图模式下\n                    // ctx.getImageData 处理大图的时候会报 Exception\n                    // INDEX_SIZE_ERR: DOM Exception 1\n                    try {\n                        blob = image.getAsBlob( opts.type );\n    \n                        size = file.size;\n    \n                        // 如果压缩后，比原来还大则不用压缩后的。\n                        if ( !noCompressIfLarger || blob.size < size ) {\n                            // file.source.destroy && file.source.destroy();\n                            file.source = blob;\n                            file.size = blob.size;\n    \n                            file.trigger( 'resize', blob.size, size );\n                        }\n    \n                        // 标记，避免重复压缩。\n                        file._compressed = true;\n                        deferred.resolve();\n                    } catch ( e ) {\n                        // 出错了直接继续，让其上传原始图片\n                        deferred.resolve();\n                    }\n                });\n    \n                file._info && image.info( file._info );\n                file._meta && image.meta( file._meta );\n    \n                image.loadFromBlob( file.source );\n                return deferred.promise();\n            }\n        });\n    });\n    /**\n     * @fileOverview 文件属性封装\n     */\n    define('file',[\n        'base',\n        'mediator'\n    ], function( Base, Mediator ) {\n    \n        var $ = Base.$,\n            idPrefix = 'WU_FILE_',\n            idSuffix = 0,\n            rExt = /\\.([^.]+)$/,\n            statusMap = {};\n    \n        function gid() {\n            return idPrefix + idSuffix++;\n        }\n    \n        /**\n         * 文件类\n         * @class File\n         * @constructor 构造函数\n         * @grammar new File( source ) => File\n         * @param {Lib.File} source [lib.File](#Lib.File)实例, 此source对象是带有Runtime信息的。\n         */\n        function WUFile( source ) {\n    \n            /**\n             * 文件名，包括扩展名（后缀）\n             * @property name\n             * @type {string}\n             */\n            this.name = source.name || 'Untitled';\n    \n            /**\n             * 文件体积（字节）\n             * @property size\n             * @type {uint}\n             * @default 0\n             */\n            this.size = source.size || 0;\n    \n            /**\n             * 文件MIMETYPE类型，与文件类型的对应关系请参考[http://t.cn/z8ZnFny](http://t.cn/z8ZnFny)\n             * @property type\n             * @type {string}\n             * @default 'application/octet-stream'\n             */\n            this.type = source.type || 'application/octet-stream';\n    \n            /**\n             * 文件最后修改日期\n             * @property lastModifiedDate\n             * @type {int}\n             * @default 当前时间戳\n             */\n            this.lastModifiedDate = source.lastModifiedDate || (new Date() * 1);\n    \n            /**\n             * 文件ID，每个对象具有唯一ID，与文件名无关\n             * @property id\n             * @type {string}\n             */\n            this.id = gid();\n    \n            /**\n             * 文件扩展名，通过文件名获取，例如test.png的扩展名为png\n             * @property ext\n             * @type {string}\n             */\n            this.ext = rExt.exec( this.name ) ? RegExp.$1 : '';\n    \n    \n            /**\n             * 状态文字说明。在不同的status语境下有不同的用途。\n             * @property statusText\n             * @type {string}\n             */\n            this.statusText = '';\n    \n            // 存储文件状态，防止通过属性直接修改\n            statusMap[ this.id ] = WUFile.Status.INITED;\n    \n            this.source = source;\n            this.loaded = 0;\n    \n            this.on( 'error', function( msg ) {\n                this.setStatus( WUFile.Status.ERROR, msg );\n            });\n        }\n    \n        $.extend( WUFile.prototype, {\n    \n            /**\n             * 设置状态，状态变化时会触发`change`事件。\n             * @method setStatus\n             * @grammar setStatus( status[, statusText] );\n             * @param {File.Status|String} status [文件状态值](#WebUploader:File:File.Status)\n             * @param {String} [statusText=''] 状态说明，常在error时使用，用http, abort,server等来标记是由于什么原因导致文件错误。\n             */\n            setStatus: function( status, text ) {\n    \n                var prevStatus = statusMap[ this.id ];\n    \n                typeof text !== 'undefined' && (this.statusText = text);\n    \n                if ( status !== prevStatus ) {\n                    statusMap[ this.id ] = status;\n                    /**\n                     * 文件状态变化\n                     * @event statuschange\n                     */\n                    this.trigger( 'statuschange', status, prevStatus );\n                }\n    \n            },\n    \n            /**\n             * 获取文件状态\n             * @return {File.Status}\n             * @example\n                     文件状态具体包括以下几种类型：\n                     {\n                         // 初始化\n                        INITED:     0,\n                        // 已入队列\n                        QUEUED:     1,\n                        // 正在上传\n                        PROGRESS:     2,\n                        // 上传出错\n                        ERROR:         3,\n                        // 上传成功\n                        COMPLETE:     4,\n                        // 上传取消\n                        CANCELLED:     5\n                    }\n             */\n            getStatus: function() {\n                return statusMap[ this.id ];\n            },\n    \n            /**\n             * 获取文件原始信息。\n             * @return {*}\n             */\n            getSource: function() {\n                return this.source;\n            },\n    \n            destroy: function() {\n                this.off();\n                delete statusMap[ this.id ];\n            }\n        });\n    \n        Mediator.installTo( WUFile.prototype );\n    \n        /**\n         * 文件状态值，具体包括以下几种类型：\n         * * `inited` 初始状态\n         * * `queued` 已经进入队列, 等待上传\n         * * `progress` 上传中\n         * * `complete` 上传完成。\n         * * `error` 上传出错，可重试\n         * * `interrupt` 上传中断，可续传。\n         * * `invalid` 文件不合格，不能重试上传。会自动从队列中移除。\n         * * `cancelled` 文件被移除。\n         * @property {Object} Status\n         * @namespace File\n         * @class File\n         * @static\n         */\n        WUFile.Status = {\n            INITED:     'inited',    // 初始状态\n            QUEUED:     'queued',    // 已经进入队列, 等待上传\n            PROGRESS:   'progress',    // 上传中\n            ERROR:      'error',    // 上传出错，可重试\n            COMPLETE:   'complete',    // 上传完成。\n            CANCELLED:  'cancelled',    // 上传取消。\n            INTERRUPT:  'interrupt',    // 上传中断，可续传。\n            INVALID:    'invalid'    // 文件不合格，不能重试上传。\n        };\n    \n        return WUFile;\n    });\n    \n    /**\n     * @fileOverview 文件队列\n     */\n    define('queue',[\n        'base',\n        'mediator',\n        'file'\n    ], function( Base, Mediator, WUFile ) {\n    \n        var $ = Base.$,\n            STATUS = WUFile.Status;\n    \n        /**\n         * 文件队列, 用来存储各个状态中的文件。\n         * @class Queue\n         * @extends Mediator\n         */\n        function Queue() {\n    \n            /**\n             * 统计文件数。\n             * * `numOfQueue` 队列中的文件数。\n             * * `numOfSuccess` 上传成功的文件数\n             * * `numOfCancel` 被取消的文件数\n             * * `numOfProgress` 正在上传中的文件数\n             * * `numOfUploadFailed` 上传错误的文件数。\n             * * `numOfInvalid` 无效的文件数。\n             * * `numofDeleted` 被移除的文件数。\n             * @property {Object} stats\n             */\n            this.stats = {\n                numOfQueue: 0,\n                numOfSuccess: 0,\n                numOfCancel: 0,\n                numOfProgress: 0,\n                numOfUploadFailed: 0,\n                numOfInvalid: 0,\n                numofDeleted: 0,\n                numofInterrupt: 0\n            };\n    \n            // 上传队列，仅包括等待上传的文件\n            this._queue = [];\n    \n            // 存储所有文件\n            this._map = {};\n        }\n    \n        $.extend( Queue.prototype, {\n    \n            /**\n             * 将新文件加入对队列尾部\n             *\n             * @method append\n             * @param  {File} file   文件对象\n             */\n            append: function( file ) {\n                this._queue.push( file );\n                this._fileAdded( file );\n                return this;\n            },\n    \n            /**\n             * 将新文件加入对队列头部\n             *\n             * @method prepend\n             * @param  {File} file   文件对象\n             */\n            prepend: function( file ) {\n                this._queue.unshift( file );\n                this._fileAdded( file );\n                return this;\n            },\n    \n            /**\n             * 获取文件对象\n             *\n             * @method getFile\n             * @param  {String} fileId   文件ID\n             * @return {File}\n             */\n            getFile: function( fileId ) {\n                if ( typeof fileId !== 'string' ) {\n                    return fileId;\n                }\n                return this._map[ fileId ];\n            },\n    \n            /**\n             * 从队列中取出一个指定状态的文件。\n             * @grammar fetch( status ) => File\n             * @method fetch\n             * @param {String} status [文件状态值](#WebUploader:File:File.Status)\n             * @return {File} [File](#WebUploader:File)\n             */\n            fetch: function( status ) {\n                var len = this._queue.length,\n                    i, file;\n    \n                status = status || STATUS.QUEUED;\n    \n                for ( i = 0; i < len; i++ ) {\n                    file = this._queue[ i ];\n    \n                    if ( status === file.getStatus() ) {\n                        return file;\n                    }\n                }\n    \n                return null;\n            },\n    \n            /**\n             * 对队列进行排序，能够控制文件上传顺序。\n             * @grammar sort( fn ) => undefined\n             * @method sort\n             * @param {Function} fn 排序方法\n             */\n            sort: function( fn ) {\n                if ( typeof fn === 'function' ) {\n                    this._queue.sort( fn );\n                }\n            },\n    \n            /**\n             * 获取指定类型的文件列表, 列表中每一个成员为[File](#WebUploader:File)对象。\n             * @grammar getFiles( [status1[, status2 ...]] ) => Array\n             * @method getFiles\n             * @param {String} [status] [文件状态值](#WebUploader:File:File.Status)\n             */\n            getFiles: function() {\n                var sts = [].slice.call( arguments, 0 ),\n                    ret = [],\n                    i = 0,\n                    len = this._queue.length,\n                    file;\n    \n                for ( ; i < len; i++ ) {\n                    file = this._queue[ i ];\n    \n                    if ( sts.length && !~$.inArray( file.getStatus(), sts ) ) {\n                        continue;\n                    }\n    \n                    ret.push( file );\n                }\n    \n                return ret;\n            },\n    \n            /**\n             * 在队列中删除文件。\n             * @grammar removeFile( file ) => Array\n             * @method removeFile\n             * @param {File} 文件对象。\n             */\n            removeFile: function( file ) {\n                var me = this,\n                    existing = this._map[ file.id ];\n    \n                if ( existing ) {\n                    delete this._map[ file.id ];\n                    file.destroy();\n                    this.stats.numofDeleted++;\n                }\n            },\n    \n            _fileAdded: function( file ) {\n                var me = this,\n                    existing = this._map[ file.id ];\n    \n                if ( !existing ) {\n                    this._map[ file.id ] = file;\n    \n                    file.on( 'statuschange', function( cur, pre ) {\n                        me._onFileStatusChange( cur, pre );\n                    });\n                }\n            },\n    \n            _onFileStatusChange: function( curStatus, preStatus ) {\n                var stats = this.stats;\n    \n                switch ( preStatus ) {\n                    case STATUS.PROGRESS:\n                        stats.numOfProgress--;\n                        break;\n    \n                    case STATUS.QUEUED:\n                        stats.numOfQueue --;\n                        break;\n    \n                    case STATUS.ERROR:\n                        stats.numOfUploadFailed--;\n                        break;\n    \n                    case STATUS.INVALID:\n                        stats.numOfInvalid--;\n                        break;\n    \n                    case STATUS.INTERRUPT:\n                        stats.numofInterrupt--;\n                        break;\n                }\n    \n                switch ( curStatus ) {\n                    case STATUS.QUEUED:\n                        stats.numOfQueue++;\n                        break;\n    \n                    case STATUS.PROGRESS:\n                        stats.numOfProgress++;\n                        break;\n    \n                    case STATUS.ERROR:\n                        stats.numOfUploadFailed++;\n                        break;\n    \n                    case STATUS.COMPLETE:\n                        stats.numOfSuccess++;\n                        break;\n    \n                    case STATUS.CANCELLED:\n                        stats.numOfCancel++;\n                        break;\n    \n    \n                    case STATUS.INVALID:\n                        stats.numOfInvalid++;\n                        break;\n    \n                    case STATUS.INTERRUPT:\n                        stats.numofInterrupt++;\n                        break;\n                }\n            }\n    \n        });\n    \n        Mediator.installTo( Queue.prototype );\n    \n        return Queue;\n    });\n    /**\n     * @fileOverview 队列\n     */\n    define('widgets/queue',[\n        'base',\n        'uploader',\n        'queue',\n        'file',\n        'lib/file',\n        'runtime/client',\n        'widgets/widget'\n    ], function( Base, Uploader, Queue, WUFile, File, RuntimeClient ) {\n    \n        var $ = Base.$,\n            rExt = /\\.\\w+$/,\n            Status = WUFile.Status;\n    \n        return Uploader.register({\n            name: 'queue',\n    \n            init: function( opts ) {\n                var me = this,\n                    deferred, len, i, item, arr, accept, runtime;\n    \n                if ( $.isPlainObject( opts.accept ) ) {\n                    opts.accept = [ opts.accept ];\n                }\n    \n                // accept中的中生成匹配正则。\n                if ( opts.accept ) {\n                    arr = [];\n    \n                    for ( i = 0, len = opts.accept.length; i < len; i++ ) {\n                        item = opts.accept[ i ].extensions;\n                        item && arr.push( item );\n                    }\n    \n                    if ( arr.length ) {\n                        accept = '\\\\.' + arr.join(',')\n                                .replace( /,/g, '$|\\\\.' )\n                                .replace( /\\*/g, '.*' ) + '$';\n                    }\n    \n                    me.accept = new RegExp( accept, 'i' );\n                }\n    \n                me.queue = new Queue();\n                me.stats = me.queue.stats;\n    \n                // 如果当前不是html5运行时，那就算了。\n                // 不执行后续操作\n                if ( this.request('predict-runtime-type') !== 'html5' ) {\n                    return;\n                }\n    \n                // 创建一个 html5 运行时的 placeholder\n                // 以至于外部添加原生 File 对象的时候能正确包裹一下供 webuploader 使用。\n                deferred = Base.Deferred();\n                this.placeholder = runtime = new RuntimeClient('Placeholder');\n                runtime.connectRuntime({\n                    runtimeOrder: 'html5'\n                }, function() {\n                    me._ruid = runtime.getRuid();\n                    deferred.resolve();\n                });\n                return deferred.promise();\n            },\n    \n    \n            // 为了支持外部直接添加一个原生File对象。\n            _wrapFile: function( file ) {\n                if ( !(file instanceof WUFile) ) {\n    \n                    if ( !(file instanceof File) ) {\n                        if ( !this._ruid ) {\n                            throw new Error('Can\\'t add external files.');\n                        }\n                        file = new File( this._ruid, file );\n                    }\n    \n                    file = new WUFile( file );\n                }\n    \n                return file;\n            },\n    \n            // 判断文件是否可以被加入队列\n            acceptFile: function( file ) {\n                var invalid = !file || !file.size || this.accept &&\n    \n                        // 如果名字中有后缀，才做后缀白名单处理。\n                        rExt.exec( file.name ) && !this.accept.test( file.name );\n    \n                return !invalid;\n            },\n    \n    \n            /**\n             * @event beforeFileQueued\n             * @param {File} file File对象\n             * @description 当文件被加入队列之前触发，此事件的handler返回值为`false`，则此文件不会被添加进入队列。\n             * @for  Uploader\n             */\n    \n            /**\n             * @event fileQueued\n             * @param {File} file File对象\n             * @description 当文件被加入队列以后触发。\n             * @for  Uploader\n             */\n    \n            _addFile: function( file ) {\n                var me = this;\n    \n                file = me._wrapFile( file );\n    \n                // 不过类型判断允许不允许，先派送 `beforeFileQueued`\n                if ( !me.owner.trigger( 'beforeFileQueued', file ) ) {\n                    return;\n                }\n    \n                // 类型不匹配，则派送错误事件，并返回。\n                if ( !me.acceptFile( file ) ) {\n                    me.owner.trigger( 'error', 'Q_TYPE_DENIED', file );\n                    return;\n                }\n    \n                me.queue.append( file );\n                me.owner.trigger( 'fileQueued', file );\n                return file;\n            },\n    \n            getFile: function( fileId ) {\n                return this.queue.getFile( fileId );\n            },\n    \n            /**\n             * @event filesQueued\n             * @param {File} files 数组，内容为原始File(lib/File）对象。\n             * @description 当一批文件添加进队列以后触发。\n             * @for  Uploader\n             */\n            \n            /**\n             * @property {Boolean} [auto=false]\n             * @namespace options\n             * @for Uploader\n             * @description 设置为 true 后，不需要手动调用上传，有文件选择即开始上传。\n             * \n             */\n    \n            /**\n             * @method addFiles\n             * @grammar addFiles( file ) => undefined\n             * @grammar addFiles( [file1, file2 ...] ) => undefined\n             * @param {Array of File or File} [files] Files 对象 数组\n             * @description 添加文件到队列\n             * @for  Uploader\n             */\n            addFile: function( files ) {\n                var me = this;\n    \n                if ( !files.length ) {\n                    files = [ files ];\n                }\n    \n                files = $.map( files, function( file ) {\n                    return me._addFile( file );\n                });\n    \t\t\t\n    \t\t\tif ( files.length ) {\n    \n                    me.owner.trigger( 'filesQueued', files );\n    \n    \t\t\t\tif ( me.options.auto ) {\n    \t\t\t\t\tsetTimeout(function() {\n    \t\t\t\t\t\tme.request('start-upload');\n    \t\t\t\t\t}, 20 );\n    \t\t\t\t}\n                }\n            },\n    \n            getStats: function() {\n                return this.stats;\n            },\n    \n            /**\n             * @event fileDequeued\n             * @param {File} file File对象\n             * @description 当文件被移除队列后触发。\n             * @for  Uploader\n             */\n    \n             /**\n             * @method removeFile\n             * @grammar removeFile( file ) => undefined\n             * @grammar removeFile( id ) => undefined\n             * @grammar removeFile( file, true ) => undefined\n             * @grammar removeFile( id, true ) => undefined\n             * @param {File|id} file File对象或这File对象的id\n             * @description 移除某一文件, 默认只会标记文件状态为已取消，如果第二个参数为 `true` 则会从 queue 中移除。\n             * @for  Uploader\n             * @example\n             *\n             * $li.on('click', '.remove-this', function() {\n             *     uploader.removeFile( file );\n             * })\n             */\n            removeFile: function( file, remove ) {\n                var me = this;\n    \n                file = file.id ? file : me.queue.getFile( file );\n    \n                this.request( 'cancel-file', file );\n    \n                if ( remove ) {\n                    this.queue.removeFile( file );\n                }\n            },\n    \n            /**\n             * @method getFiles\n             * @grammar getFiles() => Array\n             * @grammar getFiles( status1, status2, status... ) => Array\n             * @description 返回指定状态的文件集合，不传参数将返回所有状态的文件。\n             * @for  Uploader\n             * @example\n             * console.log( uploader.getFiles() );    // => all files\n             * console.log( uploader.getFiles('error') )    // => all error files.\n             */\n            getFiles: function() {\n                return this.queue.getFiles.apply( this.queue, arguments );\n            },\n    \n            fetchFile: function() {\n                return this.queue.fetch.apply( this.queue, arguments );\n            },\n    \n            /**\n             * @method retry\n             * @grammar retry() => undefined\n             * @grammar retry( file ) => undefined\n             * @description 重试上传，重试指定文件，或者从出错的文件开始重新上传。\n             * @for  Uploader\n             * @example\n             * function retry() {\n             *     uploader.retry();\n             * }\n             */\n            retry: function( file, noForceStart ) {\n                var me = this,\n                    files, i, len;\n    \n                if ( file ) {\n                    file = file.id ? file : me.queue.getFile( file );\n                    file.setStatus( Status.QUEUED );\n                    noForceStart || me.request('start-upload');\n                    return;\n                }\n    \n                files = me.queue.getFiles( Status.ERROR );\n                i = 0;\n                len = files.length;\n    \n                for ( ; i < len; i++ ) {\n                    file = files[ i ];\n                    file.setStatus( Status.QUEUED );\n                }\n    \n                me.request('start-upload');\n            },\n    \n            /**\n             * @method sort\n             * @grammar sort( fn ) => undefined\n             * @description 排序队列中的文件，在上传之前调整可以控制上传顺序。\n             * @for  Uploader\n             */\n            sortFiles: function() {\n                return this.queue.sort.apply( this.queue, arguments );\n            },\n    \n            /**\n             * @event reset\n             * @description 当 uploader 被重置的时候触发。\n             * @for  Uploader\n             */\n    \n            /**\n             * @method reset\n             * @grammar reset() => undefined\n             * @description 重置uploader。目前只重置了队列。\n             * @for  Uploader\n             * @example\n             * uploader.reset();\n             */\n            reset: function() {\n                this.owner.trigger('reset');\n                this.queue = new Queue();\n                this.stats = this.queue.stats;\n            },\n    \n            destroy: function() {\n                this.reset();\n                this.placeholder && this.placeholder.destroy();\n            }\n        });\n    \n    });\n    /**\n     * @fileOverview 添加获取Runtime相关信息的方法。\n     */\n    define('widgets/runtime',[\n        'uploader',\n        'runtime/runtime',\n        'widgets/widget'\n    ], function( Uploader, Runtime ) {\n    \n        Uploader.support = function() {\n            return Runtime.hasRuntime.apply( Runtime, arguments );\n        };\n    \n        /**\n         * @property {Object} [runtimeOrder=html5,flash]\n         * @namespace options\n         * @for Uploader\n         * @description 指定运行时启动顺序。默认会想尝试 html5 是否支持，如果支持则使用 html5, 否则则使用 flash.\n         *\n         * 可以将此值设置成 `flash`，来强制使用 flash 运行时。\n         */\n    \n        return Uploader.register({\n            name: 'runtime',\n    \n            init: function() {\n                if ( !this.predictRuntimeType() ) {\n                    throw Error('Runtime Error');\n                }\n            },\n    \n            /**\n             * 预测Uploader将采用哪个`Runtime`\n             * @grammar predictRuntimeType() => String\n             * @method predictRuntimeType\n             * @for  Uploader\n             */\n            predictRuntimeType: function() {\n                var orders = this.options.runtimeOrder || Runtime.orders,\n                    type = this.type,\n                    i, len;\n    \n                if ( !type ) {\n                    orders = orders.split( /\\s*,\\s*/g );\n    \n                    for ( i = 0, len = orders.length; i < len; i++ ) {\n                        if ( Runtime.hasRuntime( orders[ i ] ) ) {\n                            this.type = type = orders[ i ];\n                            break;\n                        }\n                    }\n                }\n    \n                return type;\n            }\n        });\n    });\n    /**\n     * @fileOverview Transport\n     */\n    define('lib/transport',[\n        'base',\n        'runtime/client',\n        'mediator'\n    ], function( Base, RuntimeClient, Mediator ) {\n    \n        var $ = Base.$;\n    \n        function Transport( opts ) {\n            var me = this;\n    \n            opts = me.options = $.extend( true, {}, Transport.options, opts || {} );\n            RuntimeClient.call( this, 'Transport' );\n    \n            this._blob = null;\n            this._formData = opts.formData || {};\n            this._headers = opts.headers || {};\n    \n            this.on( 'progress', this._timeout );\n            this.on( 'load error', function() {\n                me.trigger( 'progress', 1 );\n                clearTimeout( me._timer );\n            });\n        }\n    \n        Transport.options = {\n            server: '',\n            method: 'POST',\n    \n            // 跨域时，是否允许携带cookie, 只有html5 runtime才有效\n            withCredentials: false,\n            fileVal: 'file',\n            timeout: 2 * 60 * 1000,    // 2分钟\n            formData: {},\n            headers: {},\n            sendAsBinary: false\n        };\n    \n        $.extend( Transport.prototype, {\n    \n            // 添加Blob, 只能添加一次，最后一次有效。\n            appendBlob: function( key, blob, filename ) {\n                var me = this,\n                    opts = me.options;\n    \n                if ( me.getRuid() ) {\n                    me.disconnectRuntime();\n                }\n    \n                // 连接到blob归属的同一个runtime.\n                me.connectRuntime( blob.ruid, function() {\n                    me.exec('init');\n                });\n    \n                me._blob = blob;\n                opts.fileVal = key || opts.fileVal;\n                opts.filename = filename || opts.filename;\n            },\n    \n            // 添加其他字段\n            append: function( key, value ) {\n                if ( typeof key === 'object' ) {\n                    $.extend( this._formData, key );\n                } else {\n                    this._formData[ key ] = value;\n                }\n            },\n    \n            setRequestHeader: function( key, value ) {\n                if ( typeof key === 'object' ) {\n                    $.extend( this._headers, key );\n                } else {\n                    this._headers[ key ] = value;\n                }\n            },\n    \n            send: function( method ) {\n                this.exec( 'send', method );\n                this._timeout();\n            },\n    \n            abort: function() {\n                clearTimeout( this._timer );\n                return this.exec('abort');\n            },\n    \n            destroy: function() {\n                this.trigger('destroy');\n                this.off();\n                this.exec('destroy');\n                this.disconnectRuntime();\n            },\n    \n            getResponse: function() {\n                return this.exec('getResponse');\n            },\n    \n            getResponseAsJson: function() {\n                return this.exec('getResponseAsJson');\n            },\n    \n            getStatus: function() {\n                return this.exec('getStatus');\n            },\n    \n            _timeout: function() {\n                var me = this,\n                    duration = me.options.timeout;\n    \n                if ( !duration ) {\n                    return;\n                }\n    \n                clearTimeout( me._timer );\n                me._timer = setTimeout(function() {\n                    me.abort();\n                    me.trigger( 'error', 'timeout' );\n                }, duration );\n            }\n    \n        });\n    \n        // 让Transport具备事件功能。\n        Mediator.installTo( Transport.prototype );\n    \n        return Transport;\n    });\n    /**\n     * @fileOverview 负责文件上传相关。\n     */\n    define('widgets/upload',[\n        'base',\n        'uploader',\n        'file',\n        'lib/transport',\n        'widgets/widget'\n    ], function( Base, Uploader, WUFile, Transport ) {\n    \n        var $ = Base.$,\n            isPromise = Base.isPromise,\n            Status = WUFile.Status;\n    \n        // 添加默认配置项\n        $.extend( Uploader.options, {\n    \n    \n            /**\n             * @property {Boolean} [prepareNextFile=false]\n             * @namespace options\n             * @for Uploader\n             * @description 是否允许在文件传输时提前把下一个文件准备好。\n             * 对于一个文件的准备工作比较耗时，比如图片压缩，md5序列化。\n             * 如果能提前在当前文件传输期处理，可以节省总体耗时。\n             */\n            prepareNextFile: false,\n    \n            /**\n             * @property {Boolean} [chunked=false]\n             * @namespace options\n             * @for Uploader\n             * @description 是否要分片处理大文件上传。\n             */\n            chunked: false,\n    \n            /**\n             * @property {Boolean} [chunkSize=5242880]\n             * @namespace options\n             * @for Uploader\n             * @description 如果要分片，分多大一片？ 默认大小为5M.\n             */\n            chunkSize: 5 * 1024 * 1024,\n    \n            /**\n             * @property {Boolean} [chunkRetry=2]\n             * @namespace options\n             * @for Uploader\n             * @description 如果某个分片由于网络问题出错，允许自动重传多少次？\n             */\n            chunkRetry: 2,\n    \n            /**\n             * @property {Boolean} [threads=3]\n             * @namespace options\n             * @for Uploader\n             * @description 上传并发数。允许同时最大上传进程数。\n             */\n            threads: 3,\n    \n    \n            /**\n             * @property {Object} [formData={}]\n             * @namespace options\n             * @for Uploader\n             * @description 文件上传请求的参数表，每次发送都会发送此对象中的参数。\n             */\n            formData: {}\n    \n            /**\n             * @property {Object} [fileVal='file']\n             * @namespace options\n             * @for Uploader\n             * @description 设置文件上传域的name。\n             */\n    \n            /**\n             * @property {Object} [sendAsBinary=false]\n             * @namespace options\n             * @for Uploader\n             * @description 是否已二进制的流的方式发送文件，这样整个上传内容`php://input`都为文件内容，\n             * 其他参数在$_GET数组中。\n             */\n        });\n    \n        // 负责将文件切片。\n        function CuteFile( file, chunkSize ) {\n            var pending = [],\n                blob = file.source,\n                total = blob.size,\n                chunks = chunkSize ? Math.ceil( total / chunkSize ) : 1,\n                start = 0,\n                index = 0,\n                len, api;\n    \n            api = {\n                file: file,\n    \n                has: function() {\n                    return !!pending.length;\n                },\n    \n                shift: function() {\n                    return pending.shift();\n                },\n    \n                unshift: function( block ) {\n                    pending.unshift( block );\n                }\n            };\n    \n            while ( index < chunks ) {\n                len = Math.min( chunkSize, total - start );\n    \n                pending.push({\n                    file: file,\n                    start: start,\n                    end: chunkSize ? (start + len) : total,\n                    total: total,\n                    chunks: chunks,\n                    chunk: index++,\n                    cuted: api\n                });\n                start += len;\n            }\n    \n            file.blocks = pending.concat();\n            file.remaning = pending.length;\n    \n            return api;\n        }\n    \n        Uploader.register({\n            name: 'upload',\n    \n            init: function() {\n                var owner = this.owner,\n                    me = this;\n    \n                this.runing = false;\n                this.progress = false;\n    \n                owner\n                    .on( 'startUpload', function() {\n                        me.progress = true;\n                    })\n                    .on( 'uploadFinished', function() {\n                        me.progress = false;\n                    });\n    \n                // 记录当前正在传的数据，跟threads相关\n                this.pool = [];\n    \n                // 缓存分好片的文件。\n                this.stack = [];\n    \n                // 缓存即将上传的文件。\n                this.pending = [];\n    \n                // 跟踪还有多少分片在上传中但是没有完成上传。\n                this.remaning = 0;\n                this.__tick = Base.bindFn( this._tick, this );\n    \n                // 销毁上传相关的属性。\n                owner.on( 'uploadComplete', function( file ) {\n    \n                    // 把其他块取消了。\n                    file.blocks && $.each( file.blocks, function( _, v ) {\n                        v.transport && (v.transport.abort(), v.transport.destroy());\n                        delete v.transport;\n                    });\n    \n                    delete file.blocks;\n                    delete file.remaning;\n                });\n            },\n    \n            reset: function() {\n                this.request( 'stop-upload', true );\n                this.runing = false;\n                this.pool = [];\n                this.stack = [];\n                this.pending = [];\n                this.remaning = 0;\n                this._trigged = false;\n                this._promise = null;\n            },\n    \n            /**\n             * @event startUpload\n             * @description 当开始上传流程时触发。\n             * @for  Uploader\n             */\n    \n            /**\n             * 开始上传。此方法可以从初始状态调用开始上传流程，也可以从暂停状态调用，继续上传流程。\n             *\n             * 可以指定开始某一个文件。\n             * @grammar upload() => undefined\n             * @grammar upload( file | fileId) => undefined\n             * @method upload\n             * @for  Uploader\n             */\n            startUpload: function(file) {\n                var me = this;\n    \n                // 移出invalid的文件\n                $.each( me.request( 'get-files', Status.INVALID ), function() {\n                    me.request( 'remove-file', this );\n                });\n    \n                // 如果指定了开始某个文件，则只开始指定的文件。\n                if ( file ) {\n                    file = file.id ? file : me.request( 'get-file', file );\n    \n                    if (file.getStatus() === Status.INTERRUPT) {\n                        file.setStatus( Status.QUEUED );\n    \n                        $.each( me.pool, function( _, v ) {\n    \n                            // 之前暂停过。\n                            if (v.file !== file) {\n                                return;\n                            }\n    \n                            v.transport && v.transport.send();\n                            file.setStatus( Status.PROGRESS );\n                        });\n    \n                        \n                    } else if (file.getStatus() !== Status.PROGRESS) {\n                        file.setStatus( Status.QUEUED );\n                    }\n                } else {\n                    $.each( me.request( 'get-files', [ Status.INITED ] ), function() {\n                        this.setStatus( Status.QUEUED );\n                    });\n                }\n    \n                if ( me.runing ) {\n                    return Base.nextTick( me.__tick );\n                }\n    \n                me.runing = true;\n                var files = [];\n    \n                // 如果有暂停的，则续传\n                file || $.each( me.pool, function( _, v ) {\n                    var file = v.file;\n    \n                    if ( file.getStatus() === Status.INTERRUPT ) {\n                        me._trigged = false;\n                        files.push(file);\n                        v.transport && v.transport.send();\n                    }\n                });\n    \n                $.each(files, function() {\n                    this.setStatus( Status.PROGRESS );\n                });\n    \n                file || $.each( me.request( 'get-files',\n                        Status.INTERRUPT ), function() {\n                    this.setStatus( Status.PROGRESS );\n                });\n    \n                me._trigged = false;\n                Base.nextTick( me.__tick );\n                me.owner.trigger('startUpload');\n            },\n    \n            /**\n             * @event stopUpload\n             * @description 当开始上传流程暂停时触发。\n             * @for  Uploader\n             */\n    \n            /**\n             * 暂停上传。第一个参数为是否中断上传当前正在上传的文件。\n             *\n             * 如果第一个参数是文件，则只暂停指定文件。\n             * @grammar stop() => undefined\n             * @grammar stop( true ) => undefined\n             * @grammar stop( file ) => undefined\n             * @method stop\n             * @for  Uploader\n             */\n            stopUpload: function( file, interrupt ) {\n                var me = this,\n                    block;\n    \n                if (file === true) {\n                    interrupt = file;\n                    file = null;\n                }\n    \n                if ( me.runing === false ) {\n                    return;\n                }\n    \n                // 如果只是暂停某个文件。\n                if ( file ) {\n                    file = file.id ? file : me.request( 'get-file', file );\n    \n                    if ( file.getStatus() !== Status.PROGRESS &&\n                            file.getStatus() !== Status.QUEUED ) {\n                        return;\n                    }\n    \n                    file.setStatus( Status.INTERRUPT );\n    \n    \n                    $.each( me.pool, function( _, v ) {\n    \n                        // 只 abort 指定的文件。\n                        if (v.file === file) {\n                            block = v;\n                            return false;\n                        }\n                    });\n    \n                    block.transport && block.transport.abort();\n    \n                    if (interrupt) {\n                        me._putback(block);\n                        me._popBlock(block);\n                    }\n    \n                    return Base.nextTick( me.__tick );\n                }\n    \n                me.runing = false;\n    \n                // 正在准备中的文件。\n                if (this._promise && this._promise.file) {\n                    this._promise.file.setStatus( Status.INTERRUPT );\n                }\n    \n                interrupt && $.each( me.pool, function( _, v ) {\n                    v.transport && v.transport.abort();\n                    v.file.setStatus( Status.INTERRUPT );\n                });\n    \n                me.owner.trigger('stopUpload');\n            },\n    \n            /**\n             * @method cancelFile\n             * @grammar cancelFile( file ) => undefined\n             * @grammar cancelFile( id ) => undefined\n             * @param {File|id} file File对象或这File对象的id\n             * @description 标记文件状态为已取消, 同时将中断文件传输。\n             * @for  Uploader\n             * @example\n             *\n             * $li.on('click', '.remove-this', function() {\n             *     uploader.cancelFile( file );\n             * })\n             */\n            cancelFile: function( file ) {\n                file = file.id ? file : this.request( 'get-file', file );\n    \n                // 如果正在上传。\n                file.blocks && $.each( file.blocks, function( _, v ) {\n                    var _tr = v.transport;\n    \n                    if ( _tr ) {\n                        _tr.abort();\n                        _tr.destroy();\n                        delete v.transport;\n                    }\n                });\n    \n                file.setStatus( Status.CANCELLED );\n                this.owner.trigger( 'fileDequeued', file );\n            },\n    \n            /**\n             * 判断`Uplaode`r是否正在上传中。\n             * @grammar isInProgress() => Boolean\n             * @method isInProgress\n             * @for  Uploader\n             */\n            isInProgress: function() {\n                return !!this.progress;\n            },\n    \n            _getStats: function() {\n                return this.request('get-stats');\n            },\n    \n            /**\n             * 掉过一个文件上传，直接标记指定文件为已上传状态。\n             * @grammar skipFile( file ) => undefined\n             * @method skipFile\n             * @for  Uploader\n             */\n            skipFile: function( file, status ) {\n                file = file.id ? file : this.request( 'get-file', file );\n    \n                file.setStatus( status || Status.COMPLETE );\n                file.skipped = true;\n    \n                // 如果正在上传。\n                file.blocks && $.each( file.blocks, function( _, v ) {\n                    var _tr = v.transport;\n    \n                    if ( _tr ) {\n                        _tr.abort();\n                        _tr.destroy();\n                        delete v.transport;\n                    }\n                });\n    \n                this.owner.trigger( 'uploadSkip', file );\n            },\n    \n            /**\n             * @event uploadFinished\n             * @description 当所有文件上传结束时触发。\n             * @for  Uploader\n             */\n            _tick: function() {\n                var me = this,\n                    opts = me.options,\n                    fn, val;\n    \n                // 上一个promise还没有结束，则等待完成后再执行。\n                if ( me._promise ) {\n                    return me._promise.always( me.__tick );\n                }\n    \n                // 还有位置，且还有文件要处理的话。\n                if ( me.pool.length < opts.threads && (val = me._nextBlock()) ) {\n                    me._trigged = false;\n    \n                    fn = function( val ) {\n                        me._promise = null;\n    \n                        // 有可能是reject过来的，所以要检测val的类型。\n                        val && val.file && me._startSend( val );\n                        Base.nextTick( me.__tick );\n                    };\n    \n                    me._promise = isPromise( val ) ? val.always( fn ) : fn( val );\n    \n                // 没有要上传的了，且没有正在传输的了。\n                } else if ( !me.remaning && !me._getStats().numOfQueue &&\n                    !me._getStats().numofInterrupt ) {\n                    me.runing = false;\n    \n                    me._trigged || Base.nextTick(function() {\n                        me.owner.trigger('uploadFinished');\n                    });\n                    me._trigged = true;\n                }\n            },\n    \n            _putback: function(block) {\n                var idx;\n    \n                block.cuted.unshift(block);\n                idx = this.stack.indexOf(block.cuted);\n    \n                if (!~idx) {\n                    this.stack.unshift(block.cuted);\n                }\n            },\n    \n            _getStack: function() {\n                var i = 0,\n                    act;\n    \n                while ( (act = this.stack[ i++ ]) ) {\n                    if ( act.has() && act.file.getStatus() === Status.PROGRESS ) {\n                        return act;\n                    } else if (!act.has() ||\n                            act.file.getStatus() !== Status.PROGRESS &&\n                            act.file.getStatus() !== Status.INTERRUPT ) {\n    \n                        // 把已经处理完了的，或者，状态为非 progress（上传中）、\n                        // interupt（暂停中） 的移除。\n                        this.stack.splice( --i, 1 );\n                    }\n                }\n    \n                return null;\n            },\n    \n            _nextBlock: function() {\n                var me = this,\n                    opts = me.options,\n                    act, next, done, preparing;\n    \n                // 如果当前文件还有没有需要传输的，则直接返回剩下的。\n                if ( (act = this._getStack()) ) {\n    \n                    // 是否提前准备下一个文件\n                    if ( opts.prepareNextFile && !me.pending.length ) {\n                        me._prepareNextFile();\n                    }\n    \n                    return act.shift();\n    \n                // 否则，如果正在运行，则准备下一个文件，并等待完成后返回下个分片。\n                } else if ( me.runing ) {\n    \n                    // 如果缓存中有，则直接在缓存中取，没有则去queue中取。\n                    if ( !me.pending.length && me._getStats().numOfQueue ) {\n                        me._prepareNextFile();\n                    }\n    \n                    next = me.pending.shift();\n                    done = function( file ) {\n                        if ( !file ) {\n                            return null;\n                        }\n    \n                        act = CuteFile( file, opts.chunked ? opts.chunkSize : 0 );\n                        me.stack.push(act);\n                        return act.shift();\n                    };\n    \n                    // 文件可能还在prepare中，也有可能已经完全准备好了。\n                    if ( isPromise( next) ) {\n                        preparing = next.file;\n                        next = next[ next.pipe ? 'pipe' : 'then' ]( done );\n                        next.file = preparing;\n                        return next;\n                    }\n    \n                    return done( next );\n                }\n            },\n    \n    \n            /**\n             * @event uploadStart\n             * @param {File} file File对象\n             * @description 某个文件开始上传前触发，一个文件只会触发一次。\n             * @for  Uploader\n             */\n            _prepareNextFile: function() {\n                var me = this,\n                    file = me.request('fetch-file'),\n                    pending = me.pending,\n                    promise;\n    \n                if ( file ) {\n                    promise = me.request( 'before-send-file', file, function() {\n    \n                        // 有可能文件被skip掉了。文件被skip掉后，状态坑定不是Queued.\n                        if ( file.getStatus() === Status.PROGRESS ||\n                            file.getStatus() === Status.INTERRUPT ) {\n                            return file;\n                        }\n    \n                        return me._finishFile( file );\n                    });\n    \n                    me.owner.trigger( 'uploadStart', file );\n                    file.setStatus( Status.PROGRESS );\n    \n                    promise.file = file;\n    \n                    // 如果还在pending中，则替换成文件本身。\n                    promise.done(function() {\n                        var idx = $.inArray( promise, pending );\n    \n                        ~idx && pending.splice( idx, 1, file );\n                    });\n    \n                    // befeore-send-file的钩子就有错误发生。\n                    promise.fail(function( reason ) {\n                        file.setStatus( Status.ERROR, reason );\n                        me.owner.trigger( 'uploadError', file, reason );\n                        me.owner.trigger( 'uploadComplete', file );\n                    });\n    \n                    pending.push( promise );\n                }\n            },\n    \n            // 让出位置了，可以让其他分片开始上传\n            _popBlock: function( block ) {\n                var idx = $.inArray( block, this.pool );\n    \n                this.pool.splice( idx, 1 );\n                block.file.remaning--;\n                this.remaning--;\n            },\n    \n            // 开始上传，可以被掉过。如果promise被reject了，则表示跳过此分片。\n            _startSend: function( block ) {\n                var me = this,\n                    file = block.file,\n                    promise;\n    \n                // 有可能在 before-send-file 的 promise 期间改变了文件状态。\n                // 如：暂停，取消\n                // 我们不能中断 promise, 但是可以在 promise 完后，不做上传操作。\n                if ( file.getStatus() !== Status.PROGRESS ) {\n    \n                    // 如果是中断，则还需要放回去。\n                    if (file.getStatus() === Status.INTERRUPT) {\n                        me._putback(block);\n                    }\n    \n                    return;\n                }\n    \n                me.pool.push( block );\n                me.remaning++;\n    \n                // 如果没有分片，则直接使用原始的。\n                // 不会丢失content-type信息。\n                block.blob = block.chunks === 1 ? file.source :\n                        file.source.slice( block.start, block.end );\n    \n                // hook, 每个分片发送之前可能要做些异步的事情。\n                promise = me.request( 'before-send', block, function() {\n    \n                    // 有可能文件已经上传出错了，所以不需要再传输了。\n                    if ( file.getStatus() === Status.PROGRESS ) {\n                        me._doSend( block );\n                    } else {\n                        me._popBlock( block );\n                        Base.nextTick( me.__tick );\n                    }\n                });\n    \n                // 如果为fail了，则跳过此分片。\n                promise.fail(function() {\n                    if ( file.remaning === 1 ) {\n                        me._finishFile( file ).always(function() {\n                            block.percentage = 1;\n                            me._popBlock( block );\n                            me.owner.trigger( 'uploadComplete', file );\n                            Base.nextTick( me.__tick );\n                        });\n                    } else {\n                        block.percentage = 1;\n                        me.updateFileProgress( file );\n                        me._popBlock( block );\n                        Base.nextTick( me.__tick );\n                    }\n                });\n            },\n    \n    \n            /**\n             * @event uploadBeforeSend\n             * @param {Object} object\n             * @param {Object} data 默认的上传参数，可以扩展此对象来控制上传参数。\n             * @param {Object} headers 可以扩展此对象来控制上传头部。\n             * @description 当某个文件的分块在发送前触发，主要用来询问是否要添加附带参数，大文件在开起分片上传的前提下此事件可能会触发多次。\n             * @for  Uploader\n             */\n    \n            /**\n             * @event uploadAccept\n             * @param {Object} object\n             * @param {Object} ret 服务端的返回数据，json格式，如果服务端不是json格式，从ret._raw中取数据，自行解析。\n             * @description 当某个文件上传到服务端响应后，会派送此事件来询问服务端响应是否有效。如果此事件handler返回值为`false`, 则此文件将派送`server`类型的`uploadError`事件。\n             * @for  Uploader\n             */\n    \n            /**\n             * @event uploadProgress\n             * @param {File} file File对象\n             * @param {Number} percentage 上传进度\n             * @description 上传过程中触发，携带上传进度。\n             * @for  Uploader\n             */\n    \n    \n            /**\n             * @event uploadError\n             * @param {File} file File对象\n             * @param {String} reason 出错的code\n             * @description 当文件上传出错时触发。\n             * @for  Uploader\n             */\n    \n            /**\n             * @event uploadSuccess\n             * @param {File} file File对象\n             * @param {Object} response 服务端返回的数据\n             * @description 当文件上传成功时触发。\n             * @for  Uploader\n             */\n    \n            /**\n             * @event uploadComplete\n             * @param {File} [file] File对象\n             * @description 不管成功或者失败，文件上传完成时触发。\n             * @for  Uploader\n             */\n    \n            // 做上传操作。\n            _doSend: function( block ) {\n                var me = this,\n                    owner = me.owner,\n                    opts = me.options,\n                    file = block.file,\n                    tr = new Transport( opts ),\n                    data = $.extend({}, opts.formData ),\n                    headers = $.extend({}, opts.headers ),\n                    requestAccept, ret;\n    \n                block.transport = tr;\n    \n                tr.on( 'destroy', function() {\n                    delete block.transport;\n                    me._popBlock( block );\n                    Base.nextTick( me.__tick );\n                });\n    \n                // 广播上传进度。以文件为单位。\n                tr.on( 'progress', function( percentage ) {\n                    block.percentage = percentage;\n                    me.updateFileProgress( file );\n                });\n    \n                // 用来询问，是否返回的结果是有错误的。\n                requestAccept = function( reject ) {\n                    var fn;\n    \n                    ret = tr.getResponseAsJson() || {};\n                    ret._raw = tr.getResponse();\n                    fn = function( value ) {\n                        reject = value;\n                    };\n    \n                    // 服务端响应了，不代表成功了，询问是否响应正确。\n                    if ( !owner.trigger( 'uploadAccept', block, ret, fn ) ) {\n                        reject = reject || 'server';\n                    }\n    \n                    return reject;\n                };\n    \n                // 尝试重试，然后广播文件上传出错。\n                tr.on( 'error', function( type, flag ) {\n                    block.retried = block.retried || 0;\n    \n                    // 自动重试\n                    if ( block.chunks > 1 && ~'http,abort'.indexOf( type ) &&\n                            block.retried < opts.chunkRetry ) {\n    \n                        block.retried++;\n                        tr.send();\n    \n                    } else {\n    \n                        // http status 500 ~ 600\n                        if ( !flag && type === 'server' ) {\n                            type = requestAccept( type );\n                        }\n    \n                        file.setStatus( Status.ERROR, type );\n                        owner.trigger( 'uploadError', file, type );\n                        owner.trigger( 'uploadComplete', file );\n                    }\n                });\n    \n                // 上传成功\n                tr.on( 'load', function() {\n                    var reason;\n    \n                    // 如果非预期，转向上传出错。\n                    if ( (reason = requestAccept()) ) {\n                        tr.trigger( 'error', reason, true );\n                        return;\n                    }\n    \n                    // 全部上传完成。\n                    if ( file.remaning === 1 ) {\n                        me._finishFile( file, ret );\n                    } else {\n                        tr.destroy();\n                    }\n                });\n    \n                // 配置默认的上传字段。\n                data = $.extend( data, {\n                    id: file.id,\n                    name: file.name,\n                    type: file.type,\n                    lastModifiedDate: file.lastModifiedDate,\n                    size: file.size\n                });\n    \n                block.chunks > 1 && $.extend( data, {\n                    chunks: block.chunks,\n                    chunk: block.chunk\n                });\n    \n                // 在发送之间可以添加字段什么的。。。\n                // 如果默认的字段不够使用，可以通过监听此事件来扩展\n                owner.trigger( 'uploadBeforeSend', block, data, headers );\n    \n                // 开始发送。\n                tr.appendBlob( opts.fileVal, block.blob, file.name );\n                tr.append( data );\n                tr.setRequestHeader( headers );\n                tr.send();\n            },\n    \n            // 完成上传。\n            _finishFile: function( file, ret, hds ) {\n                var owner = this.owner;\n    \n                return owner\n                        .request( 'after-send-file', arguments, function() {\n                            file.setStatus( Status.COMPLETE );\n                            owner.trigger( 'uploadSuccess', file, ret, hds );\n                        })\n                        .fail(function( reason ) {\n    \n                            // 如果外部已经标记为invalid什么的，不再改状态。\n                            if ( file.getStatus() === Status.PROGRESS ) {\n                                file.setStatus( Status.ERROR, reason );\n                            }\n    \n                            owner.trigger( 'uploadError', file, reason );\n                        })\n                        .always(function() {\n                            owner.trigger( 'uploadComplete', file );\n                        });\n            },\n    \n            updateFileProgress: function(file) {\n                var totalPercent = 0,\n                    uploaded = 0;\n    \n                if (!file.blocks) {\n                    return;\n                }\n    \n                $.each( file.blocks, function( _, v ) {\n                    uploaded += (v.percentage || 0) * (v.end - v.start);\n                });\n    \n                totalPercent = uploaded / file.size;\n                this.owner.trigger( 'uploadProgress', file, totalPercent || 0 );\n            }\n    \n        });\n    });\n    \n    /**\n     * @fileOverview 各种验证，包括文件总大小是否超出、单文件是否超出和文件是否重复。\n     */\n    \n    define('widgets/validator',[\n        'base',\n        'uploader',\n        'file',\n        'widgets/widget'\n    ], function( Base, Uploader, WUFile ) {\n    \n        var $ = Base.$,\n            validators = {},\n            api;\n    \n        /**\n         * @event error\n         * @param {String} type 错误类型。\n         * @description 当validate不通过时，会以派送错误事件的形式通知调用者。通过`upload.on('error', handler)`可以捕获到此类错误，目前有以下错误会在特定的情况下派送错来。\n         *\n         * * `Q_EXCEED_NUM_LIMIT` 在设置了`fileNumLimit`且尝试给`uploader`添加的文件数量超出这个值时派送。\n         * * `Q_EXCEED_SIZE_LIMIT` 在设置了`Q_EXCEED_SIZE_LIMIT`且尝试给`uploader`添加的文件总大小超出这个值时派送。\n         * * `Q_TYPE_DENIED` 当文件类型不满足时触发。。\n         * @for  Uploader\n         */\n    \n        // 暴露给外面的api\n        api = {\n    \n            // 添加验证器\n            addValidator: function( type, cb ) {\n                validators[ type ] = cb;\n            },\n    \n            // 移除验证器\n            removeValidator: function( type ) {\n                delete validators[ type ];\n            }\n        };\n    \n        // 在Uploader初始化的时候启动Validators的初始化\n        Uploader.register({\n            name: 'validator',\n    \n            init: function() {\n                var me = this;\n                Base.nextTick(function() {\n                    $.each( validators, function() {\n                        this.call( me.owner );\n                    });\n                });\n            }\n        });\n    \n        /**\n         * @property {int} [fileNumLimit=undefined]\n         * @namespace options\n         * @for Uploader\n         * @description 验证文件总数量, 超出则不允许加入队列。\n         */\n        api.addValidator( 'fileNumLimit', function() {\n            var uploader = this,\n                opts = uploader.options,\n                count = 0,\n                max = parseInt( opts.fileNumLimit, 10 ),\n                flag = true;\n    \n            if ( !max ) {\n                return;\n            }\n    \n            uploader.on( 'beforeFileQueued', function( file ) {\n    \n                if ( count >= max && flag ) {\n                    flag = false;\n                    this.trigger( 'error', 'Q_EXCEED_NUM_LIMIT', max, file );\n                    setTimeout(function() {\n                        flag = true;\n                    }, 1 );\n                }\n    \n                return count >= max ? false : true;\n            });\n    \n            uploader.on( 'fileQueued', function() {\n                count++;\n            });\n    \n            uploader.on( 'fileDequeued', function() {\n                count--;\n            });\n    \n            uploader.on( 'reset', function() {\n                count = 0;\n            });\n        });\n    \n    \n        /**\n         * @property {int} [fileSizeLimit=undefined]\n         * @namespace options\n         * @for Uploader\n         * @description 验证文件总大小是否超出限制, 超出则不允许加入队列。\n         */\n        api.addValidator( 'fileSizeLimit', function() {\n            var uploader = this,\n                opts = uploader.options,\n                count = 0,\n                max = parseInt( opts.fileSizeLimit, 10 ),\n                flag = true;\n    \n            if ( !max ) {\n                return;\n            }\n    \n            uploader.on( 'beforeFileQueued', function( file ) {\n                var invalid = count + file.size > max;\n    \n                if ( invalid && flag ) {\n                    flag = false;\n                    this.trigger( 'error', 'Q_EXCEED_SIZE_LIMIT', max, file );\n                    setTimeout(function() {\n                        flag = true;\n                    }, 1 );\n                }\n    \n                return invalid ? false : true;\n            });\n    \n            uploader.on( 'fileQueued', function( file ) {\n                count += file.size;\n            });\n    \n            uploader.on( 'fileDequeued', function( file ) {\n                count -= file.size;\n            });\n    \n            uploader.on( 'reset', function() {\n                count = 0;\n            });\n        });\n    \n        /**\n         * @property {int} [fileSingleSizeLimit=undefined]\n         * @namespace options\n         * @for Uploader\n         * @description 验证单个文件大小是否超出限制, 超出则不允许加入队列。\n         */\n        api.addValidator( 'fileSingleSizeLimit', function() {\n            var uploader = this,\n                opts = uploader.options,\n                max = opts.fileSingleSizeLimit;\n    \n            if ( !max ) {\n                return;\n            }\n    \n            uploader.on( 'beforeFileQueued', function( file ) {\n    \n                if ( file.size > max ) {\n                    file.setStatus( WUFile.Status.INVALID, 'exceed_size' );\n                    this.trigger( 'error', 'F_EXCEED_SIZE', max, file );\n                    return false;\n                }\n    \n            });\n    \n        });\n    \n        /**\n         * @property {Boolean} [duplicate=undefined]\n         * @namespace options\n         * @for Uploader\n         * @description 去重， 根据文件名字、文件大小和最后修改时间来生成hash Key.\n         */\n        api.addValidator( 'duplicate', function() {\n            var uploader = this,\n                opts = uploader.options,\n                mapping = {};\n    \n            if ( opts.duplicate ) {\n                return;\n            }\n    \n            function hashString( str ) {\n                var hash = 0,\n                    i = 0,\n                    len = str.length,\n                    _char;\n    \n                for ( ; i < len; i++ ) {\n                    _char = str.charCodeAt( i );\n                    hash = _char + (hash << 6) + (hash << 16) - hash;\n                }\n    \n                return hash;\n            }\n    \n            uploader.on( 'beforeFileQueued', function( file ) {\n                var hash = file.__hash || (file.__hash = hashString( file.name +\n                        file.size + file.lastModifiedDate ));\n    \n                // 已经重复了\n                if ( mapping[ hash ] ) {\n                    this.trigger( 'error', 'F_DUPLICATE', file );\n                    return false;\n                }\n            });\n    \n            uploader.on( 'fileQueued', function( file ) {\n                var hash = file.__hash;\n    \n                hash && (mapping[ hash ] = true);\n            });\n    \n            uploader.on( 'fileDequeued', function( file ) {\n                var hash = file.__hash;\n    \n                hash && (delete mapping[ hash ]);\n            });\n    \n            uploader.on( 'reset', function() {\n                mapping = {};\n            });\n        });\n    \n        return api;\n    });\n    \n    /**\n     * @fileOverview Runtime管理器，负责Runtime的选择, 连接\n     */\n    define('runtime/compbase',[],function() {\n    \n        function CompBase( owner, runtime ) {\n    \n            this.owner = owner;\n            this.options = owner.options;\n    \n            this.getRuntime = function() {\n                return runtime;\n            };\n    \n            this.getRuid = function() {\n                return runtime.uid;\n            };\n    \n            this.trigger = function() {\n                return owner.trigger.apply( owner, arguments );\n            };\n        }\n    \n        return CompBase;\n    });\n    /**\n     * @fileOverview Html5Runtime\n     */\n    define('runtime/html5/runtime',[\n        'base',\n        'runtime/runtime',\n        'runtime/compbase'\n    ], function( Base, Runtime, CompBase ) {\n    \n        var type = 'html5',\n            components = {};\n    \n        function Html5Runtime() {\n            var pool = {},\n                me = this,\n                destroy = this.destroy;\n    \n            Runtime.apply( me, arguments );\n            me.type = type;\n    \n    \n            // 这个方法的调用者，实际上是RuntimeClient\n            me.exec = function( comp, fn/*, args...*/) {\n                var client = this,\n                    uid = client.uid,\n                    args = Base.slice( arguments, 2 ),\n                    instance;\n    \n                if ( components[ comp ] ) {\n                    instance = pool[ uid ] = pool[ uid ] ||\n                            new components[ comp ]( client, me );\n    \n                    if ( instance[ fn ] ) {\n                        return instance[ fn ].apply( instance, args );\n                    }\n                }\n            };\n    \n            me.destroy = function() {\n                // @todo 删除池子中的所有实例\n                return destroy && destroy.apply( this, arguments );\n            };\n        }\n    \n        Base.inherits( Runtime, {\n            constructor: Html5Runtime,\n    \n            // 不需要连接其他程序，直接执行callback\n            init: function() {\n                var me = this;\n                setTimeout(function() {\n                    me.trigger('ready');\n                }, 1 );\n            }\n    \n        });\n    \n        // 注册Components\n        Html5Runtime.register = function( name, component ) {\n            var klass = components[ name ] = Base.inherits( CompBase, component );\n            return klass;\n        };\n    \n        // 注册html5运行时。\n        // 只有在支持的前提下注册。\n        if ( window.Blob && window.FileReader && window.DataView ) {\n            Runtime.addRuntime( type, Html5Runtime );\n        }\n    \n        return Html5Runtime;\n    });\n    /**\n     * @fileOverview Blob Html实现\n     */\n    define('runtime/html5/blob',[\n        'runtime/html5/runtime',\n        'lib/blob'\n    ], function( Html5Runtime, Blob ) {\n    \n        return Html5Runtime.register( 'Blob', {\n            slice: function( start, end ) {\n                var blob = this.owner.source,\n                    slice = blob.slice || blob.webkitSlice || blob.mozSlice;\n    \n                blob = slice.call( blob, start, end );\n    \n                return new Blob( this.getRuid(), blob );\n            }\n        });\n    });\n    /**\n     * @fileOverview FilePaste\n     */\n    define('runtime/html5/dnd',[\n        'base',\n        'runtime/html5/runtime',\n        'lib/file'\n    ], function( Base, Html5Runtime, File ) {\n    \n        var $ = Base.$,\n            prefix = 'webuploader-dnd-';\n    \n        return Html5Runtime.register( 'DragAndDrop', {\n            init: function() {\n                var elem = this.elem = this.options.container;\n    \n                this.dragEnterHandler = Base.bindFn( this._dragEnterHandler, this );\n                this.dragOverHandler = Base.bindFn( this._dragOverHandler, this );\n                this.dragLeaveHandler = Base.bindFn( this._dragLeaveHandler, this );\n                this.dropHandler = Base.bindFn( this._dropHandler, this );\n                this.dndOver = false;\n    \n                elem.on( 'dragenter', this.dragEnterHandler );\n                elem.on( 'dragover', this.dragOverHandler );\n                elem.on( 'dragleave', this.dragLeaveHandler );\n                elem.on( 'drop', this.dropHandler );\n    \n                if ( this.options.disableGlobalDnd ) {\n                    $( document ).on( 'dragover', this.dragOverHandler );\n                    $( document ).on( 'drop', this.dropHandler );\n                }\n            },\n    \n            _dragEnterHandler: function( e ) {\n                var me = this,\n                    denied = me._denied || false,\n                    items;\n    \n                e = e.originalEvent || e;\n    \n                if ( !me.dndOver ) {\n                    me.dndOver = true;\n    \n                    // 注意只有 chrome 支持。\n                    items = e.dataTransfer.items;\n    \n                    if ( items && items.length ) {\n                        me._denied = denied = !me.trigger( 'accept', items );\n                    }\n    \n                    me.elem.addClass( prefix + 'over' );\n                    me.elem[ denied ? 'addClass' :\n                            'removeClass' ]( prefix + 'denied' );\n                }\n    \n                e.dataTransfer.dropEffect = denied ? 'none' : 'copy';\n    \n                return false;\n            },\n    \n            _dragOverHandler: function( e ) {\n                // 只处理框内的。\n                var parentElem = this.elem.parent().get( 0 );\n                if ( parentElem && !$.contains( parentElem, e.currentTarget ) ) {\n                    return false;\n                }\n    \n                clearTimeout( this._leaveTimer );\n                this._dragEnterHandler.call( this, e );\n    \n                return false;\n            },\n    \n            _dragLeaveHandler: function() {\n                var me = this,\n                    handler;\n    \n                handler = function() {\n                    me.dndOver = false;\n                    me.elem.removeClass( prefix + 'over ' + prefix + 'denied' );\n                };\n    \n                clearTimeout( me._leaveTimer );\n                me._leaveTimer = setTimeout( handler, 100 );\n                return false;\n            },\n    \n            _dropHandler: function( e ) {\n                var me = this,\n                    ruid = me.getRuid(),\n                    parentElem = me.elem.parent().get( 0 ),\n                    dataTransfer, data;\n    \n                // 只处理框内的。\n                if ( parentElem && !$.contains( parentElem, e.currentTarget ) ) {\n                    return false;\n                }\n    \n                e = e.originalEvent || e;\n                dataTransfer = e.dataTransfer;\n    \n                // 如果是页面内拖拽，还不能处理，不阻止事件。\n                // 此处 ie11 下会报参数错误，\n                try {\n                    data = dataTransfer.getData('text/html');\n                } catch( err ) {\n                }\n    \n                me.dndOver = false;\n                me.elem.removeClass( prefix + 'over' );\n    \n                if ( data ) {\n                    return;\n                }\n    \n                me._getTansferFiles( dataTransfer, function( results ) {\n                    me.trigger( 'drop', $.map( results, function( file ) {\n                        return new File( ruid, file );\n                    }) );\n                });\n    \n                return false;\n            },\n    \n            // 如果传入 callback 则去查看文件夹，否则只管当前文件夹。\n            _getTansferFiles: function( dataTransfer, callback ) {\n                var results  = [],\n                    promises = [],\n                    items, files, file, item, i, len, canAccessFolder;\n    \n                items = dataTransfer.items;\n                files = dataTransfer.files;\n    \n                canAccessFolder = !!(items && items[ 0 ].webkitGetAsEntry);\n    \n                for ( i = 0, len = files.length; i < len; i++ ) {\n                    file = files[ i ];\n                    item = items && items[ i ];\n    \n                    if ( canAccessFolder && item.webkitGetAsEntry().isDirectory ) {\n    \n                        promises.push( this._traverseDirectoryTree(\n                                item.webkitGetAsEntry(), results ) );\n                    } else {\n                        results.push( file );\n                    }\n                }\n    \n                Base.when.apply( Base, promises ).done(function() {\n    \n                    if ( !results.length ) {\n                        return;\n                    }\n    \n                    callback( results );\n                });\n            },\n    \n            _traverseDirectoryTree: function( entry, results ) {\n                var deferred = Base.Deferred(),\n                    me = this;\n    \n                if ( entry.isFile ) {\n                    entry.file(function( file ) {\n                        results.push( file );\n                        deferred.resolve();\n                    });\n                } else if ( entry.isDirectory ) {\n                    entry.createReader().readEntries(function( entries ) {\n                        var len = entries.length,\n                            promises = [],\n                            arr = [],    // 为了保证顺序。\n                            i;\n    \n                        for ( i = 0; i < len; i++ ) {\n                            promises.push( me._traverseDirectoryTree(\n                                    entries[ i ], arr ) );\n                        }\n    \n                        Base.when.apply( Base, promises ).then(function() {\n                            results.push.apply( results, arr );\n                            deferred.resolve();\n                        }, deferred.reject );\n                    });\n                }\n    \n                return deferred.promise();\n            },\n    \n            destroy: function() {\n                var elem = this.elem;\n    \n                // 还没 init 就调用 destroy\n                if (!elem) {\n                    return;\n                }\n    \n                elem.off( 'dragenter', this.dragEnterHandler );\n                elem.off( 'dragover', this.dragOverHandler );\n                elem.off( 'dragleave', this.dragLeaveHandler );\n                elem.off( 'drop', this.dropHandler );\n    \n                if ( this.options.disableGlobalDnd ) {\n                    $( document ).off( 'dragover', this.dragOverHandler );\n                    $( document ).off( 'drop', this.dropHandler );\n                }\n            }\n        });\n    });\n    \n    /**\n     * @fileOverview FilePaste\n     */\n    define('runtime/html5/filepaste',[\n        'base',\n        'runtime/html5/runtime',\n        'lib/file'\n    ], function( Base, Html5Runtime, File ) {\n    \n        return Html5Runtime.register( 'FilePaste', {\n            init: function() {\n                var opts = this.options,\n                    elem = this.elem = opts.container,\n                    accept = '.*',\n                    arr, i, len, item;\n    \n                // accetp的mimeTypes中生成匹配正则。\n                if ( opts.accept ) {\n                    arr = [];\n    \n                    for ( i = 0, len = opts.accept.length; i < len; i++ ) {\n                        item = opts.accept[ i ].mimeTypes;\n                        item && arr.push( item );\n                    }\n    \n                    if ( arr.length ) {\n                        accept = arr.join(',');\n                        accept = accept.replace( /,/g, '|' ).replace( /\\*/g, '.*' );\n                    }\n                }\n                this.accept = accept = new RegExp( accept, 'i' );\n                this.hander = Base.bindFn( this._pasteHander, this );\n                elem.on( 'paste', this.hander );\n            },\n    \n            _pasteHander: function( e ) {\n                var allowed = [],\n                    ruid = this.getRuid(),\n                    items, item, blob, i, len;\n    \n                e = e.originalEvent || e;\n                items = e.clipboardData.items;\n    \n                for ( i = 0, len = items.length; i < len; i++ ) {\n                    item = items[ i ];\n    \n                    if ( item.kind !== 'file' || !(blob = item.getAsFile()) ) {\n                        continue;\n                    }\n    \n                    allowed.push( new File( ruid, blob ) );\n                }\n    \n                if ( allowed.length ) {\n                    // 不阻止非文件粘贴（文字粘贴）的事件冒泡\n                    e.preventDefault();\n                    e.stopPropagation();\n                    this.trigger( 'paste', allowed );\n                }\n            },\n    \n            destroy: function() {\n                this.elem.off( 'paste', this.hander );\n            }\n        });\n    });\n    \n    /**\n     * @fileOverview FilePicker\n     */\n    define('runtime/html5/filepicker',[\n        'base',\n        'runtime/html5/runtime'\n    ], function( Base, Html5Runtime ) {\n    \n        var $ = Base.$;\n    \n        return Html5Runtime.register( 'FilePicker', {\n            init: function() {\n                var container = this.getRuntime().getContainer(),\n                    me = this,\n                    owner = me.owner,\n                    opts = me.options,\n                    label = this.label = $( document.createElement('label') ),\n                    input =  this.input = $( document.createElement('input') ),\n                    arr, i, len, mouseHandler;\n    \n                input.attr( 'type', 'file' );\n                input.attr( 'capture', 'camera');\n                input.attr( 'name', opts.name );\n                input.addClass('webuploader-element-invisible');\n    \n                label.on( 'click', function(e) {\n                    input.trigger('click');\n                    e.stopPropagation();\n                    owner.trigger('dialogopen');\n                });\n    \n                label.css({\n                    opacity: 0,\n                    width: '100%',\n                    height: '100%',\n                    display: 'block',\n                    cursor: 'pointer',\n                    background: '#ffffff'\n                });\n    \n                if ( opts.multiple ) {\n                    input.attr( 'multiple', 'multiple' );\n                }\n    \n                // @todo Firefox不支持单独指定后缀\n                if ( opts.accept && opts.accept.length > 0 ) {\n                    arr = [];\n    \n                    for ( i = 0, len = opts.accept.length; i < len; i++ ) {\n                        arr.push( opts.accept[ i ].mimeTypes );\n                    }\n    \n                    input.attr( 'accept', arr.join(',') );\n                }\n    \n                container.append( input );\n                container.append( label );\n    \n                mouseHandler = function( e ) {\n                    owner.trigger( e.type );\n                };\n    \n                input.on( 'change', function( e ) {\n                    var fn = arguments.callee,\n                        clone;\n    \n                    me.files = e.target.files;\n    \n                    // reset input\n                    clone = this.cloneNode( true );\n                    clone.value = null;\n                    this.parentNode.replaceChild( clone, this );\n    \n                    input.off();\n                    input = $( clone ).on( 'change', fn )\n                            .on( 'mouseenter mouseleave', mouseHandler );\n    \n                    owner.trigger('change');\n                });\n    \n                label.on( 'mouseenter mouseleave', mouseHandler );\n    \n            },\n    \n    \n            getFiles: function() {\n                return this.files;\n            },\n    \n            destroy: function() {\n                this.input.off();\n                this.label.off();\n            }\n        });\n    });\n    \n    /**\n     * Terms:\n     *\n     * Uint8Array, FileReader, BlobBuilder, atob, ArrayBuffer\n     * @fileOverview Image控件\n     */\n    define('runtime/html5/util',[\n        'base'\n    ], function( Base ) {\n    \n        var urlAPI = window.createObjectURL && window ||\n                window.URL && URL.revokeObjectURL && URL ||\n                window.webkitURL,\n            createObjectURL = Base.noop,\n            revokeObjectURL = createObjectURL;\n    \n        if ( urlAPI ) {\n    \n            // 更安全的方式调用，比如android里面就能把context改成其他的对象。\n            createObjectURL = function() {\n                return urlAPI.createObjectURL.apply( urlAPI, arguments );\n            };\n    \n            revokeObjectURL = function() {\n                return urlAPI.revokeObjectURL.apply( urlAPI, arguments );\n            };\n        }\n    \n        return {\n            createObjectURL: createObjectURL,\n            revokeObjectURL: revokeObjectURL,\n    \n            dataURL2Blob: function( dataURI ) {\n                var byteStr, intArray, ab, i, mimetype, parts;\n    \n                parts = dataURI.split(',');\n    \n                if ( ~parts[ 0 ].indexOf('base64') ) {\n                    byteStr = atob( parts[ 1 ] );\n                } else {\n                    byteStr = decodeURIComponent( parts[ 1 ] );\n                }\n    \n                ab = new ArrayBuffer( byteStr.length );\n                intArray = new Uint8Array( ab );\n    \n                for ( i = 0; i < byteStr.length; i++ ) {\n                    intArray[ i ] = byteStr.charCodeAt( i );\n                }\n    \n                mimetype = parts[ 0 ].split(':')[ 1 ].split(';')[ 0 ];\n    \n                return this.arrayBufferToBlob( ab, mimetype );\n            },\n    \n            dataURL2ArrayBuffer: function( dataURI ) {\n                var byteStr, intArray, i, parts;\n    \n                parts = dataURI.split(',');\n    \n                if ( ~parts[ 0 ].indexOf('base64') ) {\n                    byteStr = atob( parts[ 1 ] );\n                } else {\n                    byteStr = decodeURIComponent( parts[ 1 ] );\n                }\n    \n                intArray = new Uint8Array( byteStr.length );\n    \n                for ( i = 0; i < byteStr.length; i++ ) {\n                    intArray[ i ] = byteStr.charCodeAt( i );\n                }\n    \n                return intArray.buffer;\n            },\n    \n            arrayBufferToBlob: function( buffer, type ) {\n                var builder = window.BlobBuilder || window.WebKitBlobBuilder,\n                    bb;\n    \n                // android不支持直接new Blob, 只能借助blobbuilder.\n                if ( builder ) {\n                    bb = new builder();\n                    bb.append( buffer );\n                    return bb.getBlob( type );\n                }\n    \n                return new Blob([ buffer ], type ? { type: type } : {} );\n            },\n    \n            // 抽出来主要是为了解决android下面canvas.toDataUrl不支持jpeg.\n            // 你得到的结果是png.\n            canvasToDataUrl: function( canvas, type, quality ) {\n                return canvas.toDataURL( type, quality / 100 );\n            },\n    \n            // imagemeat会复写这个方法，如果用户选择加载那个文件了的话。\n            parseMeta: function( blob, callback ) {\n                callback( false, {});\n            },\n    \n            // imagemeat会复写这个方法，如果用户选择加载那个文件了的话。\n            updateImageHead: function( data ) {\n                return data;\n            }\n        };\n    });\n    /**\n     * Terms:\n     *\n     * Uint8Array, FileReader, BlobBuilder, atob, ArrayBuffer\n     * @fileOverview Image控件\n     */\n    define('runtime/html5/imagemeta',[\n        'runtime/html5/util'\n    ], function( Util ) {\n    \n        var api;\n    \n        api = {\n            parsers: {\n                0xffe1: []\n            },\n    \n            maxMetaDataSize: 262144,\n    \n            parse: function( blob, cb ) {\n                var me = this,\n                    fr = new FileReader();\n    \n                fr.onload = function() {\n                    cb( false, me._parse( this.result ) );\n                    fr = fr.onload = fr.onerror = null;\n                };\n    \n                fr.onerror = function( e ) {\n                    cb( e.message );\n                    fr = fr.onload = fr.onerror = null;\n                };\n    \n                blob = blob.slice( 0, me.maxMetaDataSize );\n                fr.readAsArrayBuffer( blob.getSource() );\n            },\n    \n            _parse: function( buffer, noParse ) {\n                if ( buffer.byteLength < 6 ) {\n                    return;\n                }\n    \n                var dataview = new DataView( buffer ),\n                    offset = 2,\n                    maxOffset = dataview.byteLength - 4,\n                    headLength = offset,\n                    ret = {},\n                    markerBytes, markerLength, parsers, i;\n    \n                if ( dataview.getUint16( 0 ) === 0xffd8 ) {\n    \n                    while ( offset < maxOffset ) {\n                        markerBytes = dataview.getUint16( offset );\n    \n                        if ( markerBytes >= 0xffe0 && markerBytes <= 0xffef ||\n                                markerBytes === 0xfffe ) {\n    \n                            markerLength = dataview.getUint16( offset + 2 ) + 2;\n    \n                            if ( offset + markerLength > dataview.byteLength ) {\n                                break;\n                            }\n    \n                            parsers = api.parsers[ markerBytes ];\n    \n                            if ( !noParse && parsers ) {\n                                for ( i = 0; i < parsers.length; i += 1 ) {\n                                    parsers[ i ].call( api, dataview, offset,\n                                            markerLength, ret );\n                                }\n                            }\n    \n                            offset += markerLength;\n                            headLength = offset;\n                        } else {\n                            break;\n                        }\n                    }\n    \n                    if ( headLength > 6 ) {\n                        if ( buffer.slice ) {\n                            ret.imageHead = buffer.slice( 2, headLength );\n                        } else {\n                            // Workaround for IE10, which does not yet\n                            // support ArrayBuffer.slice:\n                            ret.imageHead = new Uint8Array( buffer )\n                                    .subarray( 2, headLength );\n                        }\n                    }\n                }\n    \n                return ret;\n            },\n    \n            updateImageHead: function( buffer, head ) {\n                var data = this._parse( buffer, true ),\n                    buf1, buf2, bodyoffset;\n    \n    \n                bodyoffset = 2;\n                if ( data.imageHead ) {\n                    bodyoffset = 2 + data.imageHead.byteLength;\n                }\n    \n                if ( buffer.slice ) {\n                    buf2 = buffer.slice( bodyoffset );\n                } else {\n                    buf2 = new Uint8Array( buffer ).subarray( bodyoffset );\n                }\n    \n                buf1 = new Uint8Array( head.byteLength + 2 + buf2.byteLength );\n    \n                buf1[ 0 ] = 0xFF;\n                buf1[ 1 ] = 0xD8;\n                buf1.set( new Uint8Array( head ), 2 );\n                buf1.set( new Uint8Array( buf2 ), head.byteLength + 2 );\n    \n                return buf1.buffer;\n            }\n        };\n    \n        Util.parseMeta = function() {\n            return api.parse.apply( api, arguments );\n        };\n    \n        Util.updateImageHead = function() {\n            return api.updateImageHead.apply( api, arguments );\n        };\n    \n        return api;\n    });\n    /**\n     * 代码来自于：https://github.com/blueimp/JavaScript-Load-Image\n     * 暂时项目中只用了orientation.\n     *\n     * 去除了 Exif Sub IFD Pointer, GPS Info IFD Pointer, Exif Thumbnail.\n     * @fileOverview EXIF解析\n     */\n    \n    // Sample\n    // ====================================\n    // Make : Apple\n    // Model : iPhone 4S\n    // Orientation : 1\n    // XResolution : 72 [72/1]\n    // YResolution : 72 [72/1]\n    // ResolutionUnit : 2\n    // Software : QuickTime 7.7.1\n    // DateTime : 2013:09:01 22:53:55\n    // ExifIFDPointer : 190\n    // ExposureTime : 0.058823529411764705 [1/17]\n    // FNumber : 2.4 [12/5]\n    // ExposureProgram : Normal program\n    // ISOSpeedRatings : 800\n    // ExifVersion : 0220\n    // DateTimeOriginal : 2013:09:01 22:52:51\n    // DateTimeDigitized : 2013:09:01 22:52:51\n    // ComponentsConfiguration : YCbCr\n    // ShutterSpeedValue : 4.058893515764426\n    // ApertureValue : 2.5260688216892597 [4845/1918]\n    // BrightnessValue : -0.3126686601998395\n    // MeteringMode : Pattern\n    // Flash : Flash did not fire, compulsory flash mode\n    // FocalLength : 4.28 [107/25]\n    // SubjectArea : [4 values]\n    // FlashpixVersion : 0100\n    // ColorSpace : 1\n    // PixelXDimension : 2448\n    // PixelYDimension : 3264\n    // SensingMethod : One-chip color area sensor\n    // ExposureMode : 0\n    // WhiteBalance : Auto white balance\n    // FocalLengthIn35mmFilm : 35\n    // SceneCaptureType : Standard\n    define('runtime/html5/imagemeta/exif',[\n        'base',\n        'runtime/html5/imagemeta'\n    ], function( Base, ImageMeta ) {\n    \n        var EXIF = {};\n    \n        EXIF.ExifMap = function() {\n            return this;\n        };\n    \n        EXIF.ExifMap.prototype.map = {\n            'Orientation': 0x0112\n        };\n    \n        EXIF.ExifMap.prototype.get = function( id ) {\n            return this[ id ] || this[ this.map[ id ] ];\n        };\n    \n        EXIF.exifTagTypes = {\n            // byte, 8-bit unsigned int:\n            1: {\n                getValue: function( dataView, dataOffset ) {\n                    return dataView.getUint8( dataOffset );\n                },\n                size: 1\n            },\n    \n            // ascii, 8-bit byte:\n            2: {\n                getValue: function( dataView, dataOffset ) {\n                    return String.fromCharCode( dataView.getUint8( dataOffset ) );\n                },\n                size: 1,\n                ascii: true\n            },\n    \n            // short, 16 bit int:\n            3: {\n                getValue: function( dataView, dataOffset, littleEndian ) {\n                    return dataView.getUint16( dataOffset, littleEndian );\n                },\n                size: 2\n            },\n    \n            // long, 32 bit int:\n            4: {\n                getValue: function( dataView, dataOffset, littleEndian ) {\n                    return dataView.getUint32( dataOffset, littleEndian );\n                },\n                size: 4\n            },\n    \n            // rational = two long values,\n            // first is numerator, second is denominator:\n            5: {\n                getValue: function( dataView, dataOffset, littleEndian ) {\n                    return dataView.getUint32( dataOffset, littleEndian ) /\n                        dataView.getUint32( dataOffset + 4, littleEndian );\n                },\n                size: 8\n            },\n    \n            // slong, 32 bit signed int:\n            9: {\n                getValue: function( dataView, dataOffset, littleEndian ) {\n                    return dataView.getInt32( dataOffset, littleEndian );\n                },\n                size: 4\n            },\n    \n            // srational, two slongs, first is numerator, second is denominator:\n            10: {\n                getValue: function( dataView, dataOffset, littleEndian ) {\n                    return dataView.getInt32( dataOffset, littleEndian ) /\n                        dataView.getInt32( dataOffset + 4, littleEndian );\n                },\n                size: 8\n            }\n        };\n    \n        // undefined, 8-bit byte, value depending on field:\n        EXIF.exifTagTypes[ 7 ] = EXIF.exifTagTypes[ 1 ];\n    \n        EXIF.getExifValue = function( dataView, tiffOffset, offset, type, length,\n                littleEndian ) {\n    \n            var tagType = EXIF.exifTagTypes[ type ],\n                tagSize, dataOffset, values, i, str, c;\n    \n            if ( !tagType ) {\n                Base.log('Invalid Exif data: Invalid tag type.');\n                return;\n            }\n    \n            tagSize = tagType.size * length;\n    \n            // Determine if the value is contained in the dataOffset bytes,\n            // or if the value at the dataOffset is a pointer to the actual data:\n            dataOffset = tagSize > 4 ? tiffOffset + dataView.getUint32( offset + 8,\n                    littleEndian ) : (offset + 8);\n    \n            if ( dataOffset + tagSize > dataView.byteLength ) {\n                Base.log('Invalid Exif data: Invalid data offset.');\n                return;\n            }\n    \n            if ( length === 1 ) {\n                return tagType.getValue( dataView, dataOffset, littleEndian );\n            }\n    \n            values = [];\n    \n            for ( i = 0; i < length; i += 1 ) {\n                values[ i ] = tagType.getValue( dataView,\n                        dataOffset + i * tagType.size, littleEndian );\n            }\n    \n            if ( tagType.ascii ) {\n                str = '';\n    \n                // Concatenate the chars:\n                for ( i = 0; i < values.length; i += 1 ) {\n                    c = values[ i ];\n    \n                    // Ignore the terminating NULL byte(s):\n                    if ( c === '\\u0000' ) {\n                        break;\n                    }\n                    str += c;\n                }\n    \n                return str;\n            }\n            return values;\n        };\n    \n        EXIF.parseExifTag = function( dataView, tiffOffset, offset, littleEndian,\n                data ) {\n    \n            var tag = dataView.getUint16( offset, littleEndian );\n            data.exif[ tag ] = EXIF.getExifValue( dataView, tiffOffset, offset,\n                    dataView.getUint16( offset + 2, littleEndian ),    // tag type\n                    dataView.getUint32( offset + 4, littleEndian ),    // tag length\n                    littleEndian );\n        };\n    \n        EXIF.parseExifTags = function( dataView, tiffOffset, dirOffset,\n                littleEndian, data ) {\n    \n            var tagsNumber, dirEndOffset, i;\n    \n            if ( dirOffset + 6 > dataView.byteLength ) {\n                Base.log('Invalid Exif data: Invalid directory offset.');\n                return;\n            }\n    \n            tagsNumber = dataView.getUint16( dirOffset, littleEndian );\n            dirEndOffset = dirOffset + 2 + 12 * tagsNumber;\n    \n            if ( dirEndOffset + 4 > dataView.byteLength ) {\n                Base.log('Invalid Exif data: Invalid directory size.');\n                return;\n            }\n    \n            for ( i = 0; i < tagsNumber; i += 1 ) {\n                this.parseExifTag( dataView, tiffOffset,\n                        dirOffset + 2 + 12 * i,    // tag offset\n                        littleEndian, data );\n            }\n    \n            // Return the offset to the next directory:\n            return dataView.getUint32( dirEndOffset, littleEndian );\n        };\n    \n        // EXIF.getExifThumbnail = function(dataView, offset, length) {\n        //     var hexData,\n        //         i,\n        //         b;\n        //     if (!length || offset + length > dataView.byteLength) {\n        //         Base.log('Invalid Exif data: Invalid thumbnail data.');\n        //         return;\n        //     }\n        //     hexData = [];\n        //     for (i = 0; i < length; i += 1) {\n        //         b = dataView.getUint8(offset + i);\n        //         hexData.push((b < 16 ? '0' : '') + b.toString(16));\n        //     }\n        //     return 'data:image/jpeg,%' + hexData.join('%');\n        // };\n    \n        EXIF.parseExifData = function( dataView, offset, length, data ) {\n    \n            var tiffOffset = offset + 10,\n                littleEndian, dirOffset;\n    \n            // Check for the ASCII code for \"Exif\" (0x45786966):\n            if ( dataView.getUint32( offset + 4 ) !== 0x45786966 ) {\n                // No Exif data, might be XMP data instead\n                return;\n            }\n            if ( tiffOffset + 8 > dataView.byteLength ) {\n                Base.log('Invalid Exif data: Invalid segment size.');\n                return;\n            }\n    \n            // Check for the two null bytes:\n            if ( dataView.getUint16( offset + 8 ) !== 0x0000 ) {\n                Base.log('Invalid Exif data: Missing byte alignment offset.');\n                return;\n            }\n    \n            // Check the byte alignment:\n            switch ( dataView.getUint16( tiffOffset ) ) {\n                case 0x4949:\n                    littleEndian = true;\n                    break;\n    \n                case 0x4D4D:\n                    littleEndian = false;\n                    break;\n    \n                default:\n                    Base.log('Invalid Exif data: Invalid byte alignment marker.');\n                    return;\n            }\n    \n            // Check for the TIFF tag marker (0x002A):\n            if ( dataView.getUint16( tiffOffset + 2, littleEndian ) !== 0x002A ) {\n                Base.log('Invalid Exif data: Missing TIFF marker.');\n                return;\n            }\n    \n            // Retrieve the directory offset bytes, usually 0x00000008 or 8 decimal:\n            dirOffset = dataView.getUint32( tiffOffset + 4, littleEndian );\n            // Create the exif object to store the tags:\n            data.exif = new EXIF.ExifMap();\n            // Parse the tags of the main image directory and retrieve the\n            // offset to the next directory, usually the thumbnail directory:\n            dirOffset = EXIF.parseExifTags( dataView, tiffOffset,\n                    tiffOffset + dirOffset, littleEndian, data );\n    \n            // 尝试读取缩略图\n            // if ( dirOffset ) {\n            //     thumbnailData = {exif: {}};\n            //     dirOffset = EXIF.parseExifTags(\n            //         dataView,\n            //         tiffOffset,\n            //         tiffOffset + dirOffset,\n            //         littleEndian,\n            //         thumbnailData\n            //     );\n    \n            //     // Check for JPEG Thumbnail offset:\n            //     if (thumbnailData.exif[0x0201]) {\n            //         data.exif.Thumbnail = EXIF.getExifThumbnail(\n            //             dataView,\n            //             tiffOffset + thumbnailData.exif[0x0201],\n            //             thumbnailData.exif[0x0202] // Thumbnail data length\n            //         );\n            //     }\n            // }\n        };\n    \n        ImageMeta.parsers[ 0xffe1 ].push( EXIF.parseExifData );\n        return EXIF;\n    });\n    /**\n     * @fileOverview Image\n     */\n    define('runtime/html5/image',[\n        'base',\n        'runtime/html5/runtime',\n        'runtime/html5/util'\n    ], function( Base, Html5Runtime, Util ) {\n    \n        var BLANK = 'data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs%3D';\n    \n        return Html5Runtime.register( 'Image', {\n    \n            // flag: 标记是否被修改过。\n            modified: false,\n    \n            init: function() {\n                var me = this,\n                    img = new Image();\n    \n                img.onload = function() {\n    \n                    me._info = {\n                        type: me.type,\n                        width: this.width,\n                        height: this.height\n                    };\n    \n                    //debugger;\n    \n                    // 读取meta信息。\n                    if ( !me._metas && 'image/jpeg' === me.type ) {\n                        Util.parseMeta( me._blob, function( error, ret ) {\n                            me._metas = ret;\n                            me.owner.trigger('load');\n                        });\n                    } else {\n                        me.owner.trigger('load');\n                    }\n                };\n    \n                img.onerror = function() {\n                    me.owner.trigger('error');\n                };\n    \n                me._img = img;\n            },\n    \n            loadFromBlob: function( blob ) {\n                var me = this,\n                    img = me._img;\n    \n                me._blob = blob;\n                me.type = blob.type;\n                img.src = Util.createObjectURL( blob.getSource() );\n                me.owner.once( 'load', function() {\n                    Util.revokeObjectURL( img.src );\n                });\n            },\n    \n            resize: function( width, height ) {\n                var canvas = this._canvas ||\n                        (this._canvas = document.createElement('canvas'));\n    \n                this._resize( this._img, canvas, width, height );\n                this._blob = null;    // 没用了，可以删掉了。\n                this.modified = true;\n                this.owner.trigger( 'complete', 'resize' );\n            },\n    \n            crop: function( x, y, w, h, s ) {\n                var cvs = this._canvas ||\n                        (this._canvas = document.createElement('canvas')),\n                    opts = this.options,\n                    img = this._img,\n                    iw = img.naturalWidth,\n                    ih = img.naturalHeight,\n                    orientation = this.getOrientation();\n    \n                s = s || 1;\n    \n                // todo 解决 orientation 的问题。\n                // values that require 90 degree rotation\n                // if ( ~[ 5, 6, 7, 8 ].indexOf( orientation ) ) {\n    \n                //     switch ( orientation ) {\n                //         case 6:\n                //             tmp = x;\n                //             x = y;\n                //             y = iw * s - tmp - w;\n                //             console.log(ih * s, tmp, w)\n                //             break;\n                //     }\n    \n                //     (w ^= h, h ^= w, w ^= h);\n                // }\n    \n                cvs.width = w;\n                cvs.height = h;\n    \n                opts.preserveHeaders || this._rotate2Orientaion( cvs, orientation );\n                this._renderImageToCanvas( cvs, img, -x, -y, iw * s, ih * s );\n    \n                this._blob = null;    // 没用了，可以删掉了。\n                this.modified = true;\n                this.owner.trigger( 'complete', 'crop' );\n            },\n    \n            getAsBlob: function( type ) {\n                var blob = this._blob,\n                    opts = this.options,\n                    canvas;\n    \n                type = type || this.type;\n    \n                // blob需要重新生成。\n                if ( this.modified || this.type !== type ) {\n                    canvas = this._canvas;\n    \n                    if ( type === 'image/jpeg' ) {\n    \n                        blob = Util.canvasToDataUrl( canvas, type, opts.quality );\n    \n                        if ( opts.preserveHeaders && this._metas &&\n                                this._metas.imageHead ) {\n    \n                            blob = Util.dataURL2ArrayBuffer( blob );\n                            blob = Util.updateImageHead( blob,\n                                    this._metas.imageHead );\n                            blob = Util.arrayBufferToBlob( blob, type );\n                            return blob;\n                        }\n                    } else {\n                        blob = Util.canvasToDataUrl( canvas, type );\n                    }\n    \n                    blob = Util.dataURL2Blob( blob );\n                }\n    \n                return blob;\n            },\n    \n            getAsDataUrl: function( type ) {\n                var opts = this.options;\n    \n                type = type || this.type;\n    \n                if ( type === 'image/jpeg' ) {\n                    return Util.canvasToDataUrl( this._canvas, type, opts.quality );\n                } else {\n                    return this._canvas.toDataURL( type );\n                }\n            },\n    \n            getOrientation: function() {\n                return this._metas && this._metas.exif &&\n                        this._metas.exif.get('Orientation') || 1;\n            },\n    \n            info: function( val ) {\n    \n                // setter\n                if ( val ) {\n                    this._info = val;\n                    return this;\n                }\n    \n                // getter\n                return this._info;\n            },\n    \n            meta: function( val ) {\n    \n                // setter\n                if ( val ) {\n                    this._metas = val;\n                    return this;\n                }\n    \n                // getter\n                return this._metas;\n            },\n    \n            destroy: function() {\n                var canvas = this._canvas;\n                this._img.onload = null;\n    \n                if ( canvas ) {\n                    canvas.getContext('2d')\n                            .clearRect( 0, 0, canvas.width, canvas.height );\n                    canvas.width = canvas.height = 0;\n                    this._canvas = null;\n                }\n    \n                // 释放内存。非常重要，否则释放不了image的内存。\n                this._img.src = BLANK;\n                this._img = this._blob = null;\n            },\n    \n            _resize: function( img, cvs, width, height ) {\n                var opts = this.options,\n                    naturalWidth = img.width,\n                    naturalHeight = img.height,\n                    orientation = this.getOrientation(),\n                    scale, w, h, x, y;\n    \n                // values that require 90 degree rotation\n                if ( ~[ 5, 6, 7, 8 ].indexOf( orientation ) ) {\n    \n                    // 交换width, height的值。\n                    width ^= height;\n                    height ^= width;\n                    width ^= height;\n                }\n    \n                scale = Math[ opts.crop ? 'max' : 'min' ]( width / naturalWidth,\n                        height / naturalHeight );\n    \n                // 不允许放大。\n                opts.allowMagnify || (scale = Math.min( 1, scale ));\n    \n                w = naturalWidth * scale;\n                h = naturalHeight * scale;\n    \n                if ( opts.crop ) {\n                    cvs.width = width;\n                    cvs.height = height;\n                } else {\n                    cvs.width = w;\n                    cvs.height = h;\n                }\n    \n                x = (cvs.width - w) / 2;\n                y = (cvs.height - h) / 2;\n    \n                opts.preserveHeaders || this._rotate2Orientaion( cvs, orientation );\n    \n                this._renderImageToCanvas( cvs, img, x, y, w, h );\n            },\n    \n            _rotate2Orientaion: function( canvas, orientation ) {\n                var width = canvas.width,\n                    height = canvas.height,\n                    ctx = canvas.getContext('2d');\n    \n                switch ( orientation ) {\n                    case 5:\n                    case 6:\n                    case 7:\n                    case 8:\n                        canvas.width = height;\n                        canvas.height = width;\n                        break;\n                }\n    \n                switch ( orientation ) {\n                    case 2:    // horizontal flip\n                        ctx.translate( width, 0 );\n                        ctx.scale( -1, 1 );\n                        break;\n    \n                    case 3:    // 180 rotate left\n                        ctx.translate( width, height );\n                        ctx.rotate( Math.PI );\n                        break;\n    \n                    case 4:    // vertical flip\n                        ctx.translate( 0, height );\n                        ctx.scale( 1, -1 );\n                        break;\n    \n                    case 5:    // vertical flip + 90 rotate right\n                        ctx.rotate( 0.5 * Math.PI );\n                        ctx.scale( 1, -1 );\n                        break;\n    \n                    case 6:    // 90 rotate right\n                        ctx.rotate( 0.5 * Math.PI );\n                        ctx.translate( 0, -height );\n                        break;\n    \n                    case 7:    // horizontal flip + 90 rotate right\n                        ctx.rotate( 0.5 * Math.PI );\n                        ctx.translate( width, -height );\n                        ctx.scale( -1, 1 );\n                        break;\n    \n                    case 8:    // 90 rotate left\n                        ctx.rotate( -0.5 * Math.PI );\n                        ctx.translate( -width, 0 );\n                        break;\n                }\n            },\n    \n            // https://github.com/stomita/ios-imagefile-megapixel/\n            // blob/master/src/megapix-image.js\n            _renderImageToCanvas: (function() {\n    \n                // 如果不是ios, 不需要这么复杂！\n                if ( !Base.os.ios ) {\n                    return function( canvas ) {\n                        var args = Base.slice( arguments, 1 ),\n                            ctx = canvas.getContext('2d');\n    \n                        ctx.drawImage.apply( ctx, args );\n                    };\n                }\n    \n                /**\n                 * Detecting vertical squash in loaded image.\n                 * Fixes a bug which squash image vertically while drawing into\n                 * canvas for some images.\n                 */\n                function detectVerticalSquash( img, iw, ih ) {\n                    var canvas = document.createElement('canvas'),\n                        ctx = canvas.getContext('2d'),\n                        sy = 0,\n                        ey = ih,\n                        py = ih,\n                        data, alpha, ratio;\n    \n    \n                    canvas.width = 1;\n                    canvas.height = ih;\n                    ctx.drawImage( img, 0, 0 );\n                    data = ctx.getImageData( 0, 0, 1, ih ).data;\n    \n                    // search image edge pixel position in case\n                    // it is squashed vertically.\n                    while ( py > sy ) {\n                        alpha = data[ (py - 1) * 4 + 3 ];\n    \n                        if ( alpha === 0 ) {\n                            ey = py;\n                        } else {\n                            sy = py;\n                        }\n    \n                        py = (ey + sy) >> 1;\n                    }\n    \n                    ratio = (py / ih);\n                    return (ratio === 0) ? 1 : ratio;\n                }\n    \n                // fix ie7 bug\n                // http://stackoverflow.com/questions/11929099/\n                // html5-canvas-drawimage-ratio-bug-ios\n                if ( Base.os.ios >= 7 ) {\n                    return function( canvas, img, x, y, w, h ) {\n                        var iw = img.naturalWidth,\n                            ih = img.naturalHeight,\n                            vertSquashRatio = detectVerticalSquash( img, iw, ih );\n    \n                        return canvas.getContext('2d').drawImage( img, 0, 0,\n                                iw * vertSquashRatio, ih * vertSquashRatio,\n                                x, y, w, h );\n                    };\n                }\n    \n                /**\n                 * Detect subsampling in loaded image.\n                 * In iOS, larger images than 2M pixels may be\n                 * subsampled in rendering.\n                 */\n                function detectSubsampling( img ) {\n                    var iw = img.naturalWidth,\n                        ih = img.naturalHeight,\n                        canvas, ctx;\n    \n                    // subsampling may happen overmegapixel image\n                    if ( iw * ih > 1024 * 1024 ) {\n                        canvas = document.createElement('canvas');\n                        canvas.width = canvas.height = 1;\n                        ctx = canvas.getContext('2d');\n                        ctx.drawImage( img, -iw + 1, 0 );\n    \n                        // subsampled image becomes half smaller in rendering size.\n                        // check alpha channel value to confirm image is covering\n                        // edge pixel or not. if alpha value is 0\n                        // image is not covering, hence subsampled.\n                        return ctx.getImageData( 0, 0, 1, 1 ).data[ 3 ] === 0;\n                    } else {\n                        return false;\n                    }\n                }\n    \n    \n                return function( canvas, img, x, y, width, height ) {\n                    var iw = img.naturalWidth,\n                        ih = img.naturalHeight,\n                        ctx = canvas.getContext('2d'),\n                        subsampled = detectSubsampling( img ),\n                        doSquash = this.type === 'image/jpeg',\n                        d = 1024,\n                        sy = 0,\n                        dy = 0,\n                        tmpCanvas, tmpCtx, vertSquashRatio, dw, dh, sx, dx;\n    \n                    if ( subsampled ) {\n                        iw /= 2;\n                        ih /= 2;\n                    }\n    \n                    ctx.save();\n                    tmpCanvas = document.createElement('canvas');\n                    tmpCanvas.width = tmpCanvas.height = d;\n    \n                    tmpCtx = tmpCanvas.getContext('2d');\n                    vertSquashRatio = doSquash ?\n                            detectVerticalSquash( img, iw, ih ) : 1;\n    \n                    dw = Math.ceil( d * width / iw );\n                    dh = Math.ceil( d * height / ih / vertSquashRatio );\n    \n                    while ( sy < ih ) {\n                        sx = 0;\n                        dx = 0;\n                        while ( sx < iw ) {\n                            tmpCtx.clearRect( 0, 0, d, d );\n                            tmpCtx.drawImage( img, -sx, -sy );\n                            ctx.drawImage( tmpCanvas, 0, 0, d, d,\n                                    x + dx, y + dy, dw, dh );\n                            sx += d;\n                            dx += dw;\n                        }\n                        sy += d;\n                        dy += dh;\n                    }\n                    ctx.restore();\n                    tmpCanvas = tmpCtx = null;\n                };\n            })()\n        });\n    });\n    \n    /**\n     * @fileOverview Transport\n     * @todo 支持chunked传输，优势：\n     * 可以将大文件分成小块，挨个传输，可以提高大文件成功率，当失败的时候，也只需要重传那小部分，\n     * 而不需要重头再传一次。另外断点续传也需要用chunked方式。\n     */\n    define('runtime/html5/transport',[\n        'base',\n        'runtime/html5/runtime'\n    ], function( Base, Html5Runtime ) {\n    \n        var noop = Base.noop,\n            $ = Base.$;\n    \n        return Html5Runtime.register( 'Transport', {\n            init: function() {\n                this._status = 0;\n                this._response = null;\n            },\n    \n            send: function() {\n                var owner = this.owner,\n                    opts = this.options,\n                    xhr = this._initAjax(),\n                    blob = owner._blob,\n                    server = opts.server,\n                    formData, binary, fr;\n    \n                if ( opts.sendAsBinary ) {\n                    server += (/\\?/.test( server ) ? '&' : '?') +\n                            $.param( owner._formData );\n    \n                    binary = blob.getSource();\n                } else {\n                    formData = new FormData();\n                    $.each( owner._formData, function( k, v ) {\n                        formData.append( k, v );\n                    });\n    \n                    formData.append( opts.fileVal, blob.getSource(),\n                            opts.filename || owner._formData.name || '' );\n                }\n    \n                if ( opts.withCredentials && 'withCredentials' in xhr ) {\n                    xhr.open( opts.method, server, true );\n                    xhr.withCredentials = true;\n                } else {\n                    xhr.open( opts.method, server );\n                }\n    \n                this._setRequestHeader( xhr, opts.headers );\n    \n                if ( binary ) {\n                    // 强制设置成 content-type 为文件流。\n                    xhr.overrideMimeType &&\n                            xhr.overrideMimeType('application/octet-stream');\n    \n                    // android直接发送blob会导致服务端接收到的是空文件。\n                    // bug详情。\n                    // https://code.google.com/p/android/issues/detail?id=39882\n                    // 所以先用fileReader读取出来再通过arraybuffer的方式发送。\n                    if ( Base.os.android ) {\n                        fr = new FileReader();\n    \n                        fr.onload = function() {\n                            xhr.send( this.result );\n                            fr = fr.onload = null;\n                        };\n    \n                        fr.readAsArrayBuffer( binary );\n                    } else {\n                        xhr.send( binary );\n                    }\n                } else {\n                    xhr.send( formData );\n                }\n            },\n    \n            getResponse: function() {\n                return this._response;\n            },\n    \n            getResponseAsJson: function() {\n                return this._parseJson( this._response );\n            },\n    \n            getStatus: function() {\n                return this._status;\n            },\n    \n            abort: function() {\n                var xhr = this._xhr;\n    \n                if ( xhr ) {\n                    xhr.upload.onprogress = noop;\n                    xhr.onreadystatechange = noop;\n                    xhr.abort();\n    \n                    this._xhr = xhr = null;\n                }\n            },\n    \n            destroy: function() {\n                this.abort();\n            },\n    \n            _initAjax: function() {\n                var me = this,\n                    xhr = new XMLHttpRequest(),\n                    opts = this.options;\n    \n                if ( opts.withCredentials && !('withCredentials' in xhr) &&\n                        typeof XDomainRequest !== 'undefined' ) {\n                    xhr = new XDomainRequest();\n                }\n    \n                xhr.upload.onprogress = function( e ) {\n                    var percentage = 0;\n    \n                    if ( e.lengthComputable ) {\n                        percentage = e.loaded / e.total;\n                    }\n    \n                    return me.trigger( 'progress', percentage );\n                };\n    \n                xhr.onreadystatechange = function() {\n    \n                    if ( xhr.readyState !== 4 ) {\n                        return;\n                    }\n    \n                    xhr.upload.onprogress = noop;\n                    xhr.onreadystatechange = noop;\n                    me._xhr = null;\n                    me._status = xhr.status;\n    \n                    if ( xhr.status >= 200 && xhr.status < 300 ) {\n                        me._response = xhr.responseText;\n                        return me.trigger('load');\n                    } else if ( xhr.status >= 500 && xhr.status < 600 ) {\n                        me._response = xhr.responseText;\n                        return me.trigger( 'error', 'server' );\n                    }\n    \n    \n                    return me.trigger( 'error', me._status ? 'http' : 'abort' );\n                };\n    \n                me._xhr = xhr;\n                return xhr;\n            },\n    \n            _setRequestHeader: function( xhr, headers ) {\n                $.each( headers, function( key, val ) {\n                    xhr.setRequestHeader( key, val );\n                });\n            },\n    \n            _parseJson: function( str ) {\n                var json;\n    \n                try {\n                    json = JSON.parse( str );\n                } catch ( ex ) {\n                    json = {};\n                }\n    \n                return json;\n            }\n        });\n    });\n    /**\n     * @fileOverview 只有html5实现的文件版本。\n     */\n    define('preset/html5only',[\n        'base',\n    \n        // widgets\n        'widgets/filednd',\n        'widgets/filepaste',\n        'widgets/filepicker',\n        'widgets/image',\n        'widgets/queue',\n        'widgets/runtime',\n        'widgets/upload',\n        'widgets/validator',\n    \n        // runtimes\n        // html5\n        'runtime/html5/blob',\n        'runtime/html5/dnd',\n        'runtime/html5/filepaste',\n        'runtime/html5/filepicker',\n        'runtime/html5/imagemeta/exif',\n        'runtime/html5/image',\n        'runtime/html5/transport'\n    ], function( Base ) {\n        return Base;\n    });\n    define('webuploader',[\n        'preset/html5only'\n    ], function( preset ) {\n        return preset;\n    });\n    return require('webuploader');\n});\n"
  },
  {
    "path": "static/webuploader/webuploader.html5only.js",
    "content": "/*! WebUploader 0.1.6 */\n\n\n/**\n * @fileOverview 让内部各个部件的代码可以用[amd](https://github.com/amdjs/amdjs-api/wiki/AMD)模块定义方式组织起来。\n *\n * AMD API 内部的简单不完全实现，请忽略。只有当WebUploader被合并成一个文件的时候才会引入。\n */\n(function( root, factory ) {\n    var modules = {},\n\n        // 内部require, 简单不完全实现。\n        // https://github.com/amdjs/amdjs-api/wiki/require\n        _require = function( deps, callback ) {\n            var args, len, i;\n\n            // 如果deps不是数组，则直接返回指定module\n            if ( typeof deps === 'string' ) {\n                return getModule( deps );\n            } else {\n                args = [];\n                for( len = deps.length, i = 0; i < len; i++ ) {\n                    args.push( getModule( deps[ i ] ) );\n                }\n\n                return callback.apply( null, args );\n            }\n        },\n\n        // 内部define，暂时不支持不指定id.\n        _define = function( id, deps, factory ) {\n            if ( arguments.length === 2 ) {\n                factory = deps;\n                deps = null;\n            }\n\n            _require( deps || [], function() {\n                setModule( id, factory, arguments );\n            });\n        },\n\n        // 设置module, 兼容CommonJs写法。\n        setModule = function( id, factory, args ) {\n            var module = {\n                    exports: factory\n                },\n                returned;\n\n            if ( typeof factory === 'function' ) {\n                args.length || (args = [ _require, module.exports, module ]);\n                returned = factory.apply( null, args );\n                returned !== undefined && (module.exports = returned);\n            }\n\n            modules[ id ] = module.exports;\n        },\n\n        // 根据id获取module\n        getModule = function( id ) {\n            var module = modules[ id ] || root[ id ];\n\n            if ( !module ) {\n                throw new Error( '`' + id + '` is undefined' );\n            }\n\n            return module;\n        },\n\n        // 将所有modules，将路径ids装换成对象。\n        exportsTo = function( obj ) {\n            var key, host, parts, part, last, ucFirst;\n\n            // make the first character upper case.\n            ucFirst = function( str ) {\n                return str && (str.charAt( 0 ).toUpperCase() + str.substr( 1 ));\n            };\n\n            for ( key in modules ) {\n                host = obj;\n\n                if ( !modules.hasOwnProperty( key ) ) {\n                    continue;\n                }\n\n                parts = key.split('/');\n                last = ucFirst( parts.pop() );\n\n                while( (part = ucFirst( parts.shift() )) ) {\n                    host[ part ] = host[ part ] || {};\n                    host = host[ part ];\n                }\n\n                host[ last ] = modules[ key ];\n            }\n\n            return obj;\n        },\n\n        makeExport = function( dollar ) {\n            root.__dollar = dollar;\n\n            // exports every module.\n            return exportsTo( factory( root, _define, _require ) );\n        },\n\n        origin;\n\n    if ( typeof module === 'object' && typeof module.exports === 'object' ) {\n\n        // For CommonJS and CommonJS-like environments where a proper window is present,\n        module.exports = makeExport();\n    } else if ( typeof define === 'function' && define.amd ) {\n\n        // Allow using this built library as an AMD module\n        // in another project. That other project will only\n        // see this AMD call, not the internal modules in\n        // the closure below.\n        define([ 'jquery' ], makeExport );\n    } else {\n\n        // Browser globals case. Just assign the\n        // result to a property on the global.\n        origin = root.WebUploader;\n        root.WebUploader = makeExport();\n        root.WebUploader.noConflict = function() {\n            root.WebUploader = origin;\n        };\n    }\n})( window, function( window, define, require ) {\n\n\n    /**\n     * @fileOverview jQuery or Zepto\n     * @require \"jquery\"\n     * @require \"zepto\"\n     */\n    define('dollar-third',[],function() {\n        var req = window.require;\n        var $ = window.__dollar || \n            window.jQuery || \n            window.Zepto || \n            req('jquery') || \n            req('zepto');\n    \n        if ( !$ ) {\n            throw new Error('jQuery or Zepto not found!');\n        }\n    \n        return $;\n    });\n    \n    /**\n     * @fileOverview Dom 操作相关\n     */\n    define('dollar',[\n        'dollar-third'\n    ], function( _ ) {\n        return _;\n    });\n    /**\n     * @fileOverview 使用jQuery的Promise\n     */\n    define('promise-third',[\n        'dollar'\n    ], function( $ ) {\n        return {\n            Deferred: $.Deferred,\n            when: $.when,\n    \n            isPromise: function( anything ) {\n                return anything && typeof anything.then === 'function';\n            }\n        };\n    });\n    /**\n     * @fileOverview Promise/A+\n     */\n    define('promise',[\n        'promise-third'\n    ], function( _ ) {\n        return _;\n    });\n    /**\n     * @fileOverview 基础类方法。\n     */\n    \n    /**\n     * Web Uploader内部类的详细说明，以下提及的功能类，都可以在`WebUploader`这个变量中访问到。\n     *\n     * As you know, Web Uploader的每个文件都是用过[AMD](https://github.com/amdjs/amdjs-api/wiki/AMD)规范中的`define`组织起来的, 每个Module都会有个module id.\n     * 默认module id为该文件的路径，而此路径将会转化成名字空间存放在WebUploader中。如：\n     *\n     * * module `base`：WebUploader.Base\n     * * module `file`: WebUploader.File\n     * * module `lib/dnd`: WebUploader.Lib.Dnd\n     * * module `runtime/html5/dnd`: WebUploader.Runtime.Html5.Dnd\n     *\n     *\n     * 以下文档中对类的使用可能省略掉了`WebUploader`前缀。\n     * @module WebUploader\n     * @title WebUploader API文档\n     */\n    define('base',[\n        'dollar',\n        'promise'\n    ], function( $, promise ) {\n    \n        var noop = function() {},\n            call = Function.call;\n    \n        // http://jsperf.com/uncurrythis\n        // 反科里化\n        function uncurryThis( fn ) {\n            return function() {\n                return call.apply( fn, arguments );\n            };\n        }\n    \n        function bindFn( fn, context ) {\n            return function() {\n                return fn.apply( context, arguments );\n            };\n        }\n    \n        function createObject( proto ) {\n            var f;\n    \n            if ( Object.create ) {\n                return Object.create( proto );\n            } else {\n                f = function() {};\n                f.prototype = proto;\n                return new f();\n            }\n        }\n    \n    \n        /**\n         * 基础类，提供一些简单常用的方法。\n         * @class Base\n         */\n        return {\n    \n            /**\n             * @property {String} version 当前版本号。\n             */\n            version: '0.1.6',\n    \n            /**\n             * @property {jQuery|Zepto} $ 引用依赖的jQuery或者Zepto对象。\n             */\n            $: $,\n    \n            Deferred: promise.Deferred,\n    \n            isPromise: promise.isPromise,\n    \n            when: promise.when,\n    \n            /**\n             * @description  简单的浏览器检查结果。\n             *\n             * * `webkit`  webkit版本号，如果浏览器为非webkit内核，此属性为`undefined`。\n             * * `chrome`  chrome浏览器版本号，如果浏览器为chrome，此属性为`undefined`。\n             * * `ie`  ie浏览器版本号，如果浏览器为非ie，此属性为`undefined`。**暂不支持ie10+**\n             * * `firefox`  firefox浏览器版本号，如果浏览器为非firefox，此属性为`undefined`。\n             * * `safari`  safari浏览器版本号，如果浏览器为非safari，此属性为`undefined`。\n             * * `opera`  opera浏览器版本号，如果浏览器为非opera，此属性为`undefined`。\n             *\n             * @property {Object} [browser]\n             */\n            browser: (function( ua ) {\n                var ret = {},\n                    webkit = ua.match( /WebKit\\/([\\d.]+)/ ),\n                    chrome = ua.match( /Chrome\\/([\\d.]+)/ ) ||\n                        ua.match( /CriOS\\/([\\d.]+)/ ),\n    \n                    ie = ua.match( /MSIE\\s([\\d\\.]+)/ ) ||\n                        ua.match( /(?:trident)(?:.*rv:([\\w.]+))?/i ),\n                    firefox = ua.match( /Firefox\\/([\\d.]+)/ ),\n                    safari = ua.match( /Safari\\/([\\d.]+)/ ),\n                    opera = ua.match( /OPR\\/([\\d.]+)/ );\n    \n                webkit && (ret.webkit = parseFloat( webkit[ 1 ] ));\n                chrome && (ret.chrome = parseFloat( chrome[ 1 ] ));\n                ie && (ret.ie = parseFloat( ie[ 1 ] ));\n                firefox && (ret.firefox = parseFloat( firefox[ 1 ] ));\n                safari && (ret.safari = parseFloat( safari[ 1 ] ));\n                opera && (ret.opera = parseFloat( opera[ 1 ] ));\n    \n                return ret;\n            })( navigator.userAgent ),\n    \n            /**\n             * @description  操作系统检查结果。\n             *\n             * * `android`  如果在android浏览器环境下，此值为对应的android版本号，否则为`undefined`。\n             * * `ios` 如果在ios浏览器环境下，此值为对应的ios版本号，否则为`undefined`。\n             * @property {Object} [os]\n             */\n            os: (function( ua ) {\n                var ret = {},\n    \n                    // osx = !!ua.match( /\\(Macintosh\\; Intel / ),\n                    android = ua.match( /(?:Android);?[\\s\\/]+([\\d.]+)?/ ),\n                    ios = ua.match( /(?:iPad|iPod|iPhone).*OS\\s([\\d_]+)/ );\n    \n                // osx && (ret.osx = true);\n                android && (ret.android = parseFloat( android[ 1 ] ));\n                ios && (ret.ios = parseFloat( ios[ 1 ].replace( /_/g, '.' ) ));\n    \n                return ret;\n            })( navigator.userAgent ),\n    \n            /**\n             * 实现类与类之间的继承。\n             * @method inherits\n             * @grammar Base.inherits( super ) => child\n             * @grammar Base.inherits( super, protos ) => child\n             * @grammar Base.inherits( super, protos, statics ) => child\n             * @param  {Class} super 父类\n             * @param  {Object | Function} [protos] 子类或者对象。如果对象中包含constructor，子类将是用此属性值。\n             * @param  {Function} [protos.constructor] 子类构造器，不指定的话将创建个临时的直接执行父类构造器的方法。\n             * @param  {Object} [statics] 静态属性或方法。\n             * @return {Class} 返回子类。\n             * @example\n             * function Person() {\n             *     console.log( 'Super' );\n             * }\n             * Person.prototype.hello = function() {\n             *     console.log( 'hello' );\n             * };\n             *\n             * var Manager = Base.inherits( Person, {\n             *     world: function() {\n             *         console.log( 'World' );\n             *     }\n             * });\n             *\n             * // 因为没有指定构造器，父类的构造器将会执行。\n             * var instance = new Manager();    // => Super\n             *\n             * // 继承子父类的方法\n             * instance.hello();    // => hello\n             * instance.world();    // => World\n             *\n             * // 子类的__super__属性指向父类\n             * console.log( Manager.__super__ === Person );    // => true\n             */\n            inherits: function( Super, protos, staticProtos ) {\n                var child;\n    \n                if ( typeof protos === 'function' ) {\n                    child = protos;\n                    protos = null;\n                } else if ( protos && protos.hasOwnProperty('constructor') ) {\n                    child = protos.constructor;\n                } else {\n                    child = function() {\n                        return Super.apply( this, arguments );\n                    };\n                }\n    \n                // 复制静态方法\n                $.extend( true, child, Super, staticProtos || {} );\n    \n                /* jshint camelcase: false */\n    \n                // 让子类的__super__属性指向父类。\n                child.__super__ = Super.prototype;\n    \n                // 构建原型，添加原型方法或属性。\n                // 暂时用Object.create实现。\n                child.prototype = createObject( Super.prototype );\n                protos && $.extend( true, child.prototype, protos );\n    \n                return child;\n            },\n    \n            /**\n             * 一个不做任何事情的方法。可以用来赋值给默认的callback.\n             * @method noop\n             */\n            noop: noop,\n    \n            /**\n             * 返回一个新的方法，此方法将已指定的`context`来执行。\n             * @grammar Base.bindFn( fn, context ) => Function\n             * @method bindFn\n             * @example\n             * var doSomething = function() {\n             *         console.log( this.name );\n             *     },\n             *     obj = {\n             *         name: 'Object Name'\n             *     },\n             *     aliasFn = Base.bind( doSomething, obj );\n             *\n             *  aliasFn();    // => Object Name\n             *\n             */\n            bindFn: bindFn,\n    \n            /**\n             * 引用Console.log如果存在的话，否则引用一个[空函数noop](#WebUploader:Base.noop)。\n             * @grammar Base.log( args... ) => undefined\n             * @method log\n             */\n            log: (function() {\n                if ( window.console ) {\n                    return bindFn( console.log, console );\n                }\n                return noop;\n            })(),\n    \n            nextTick: (function() {\n    \n                return function( cb ) {\n                    setTimeout( cb, 1 );\n                };\n    \n                // @bug 当浏览器不在当前窗口时就停了。\n                // var next = window.requestAnimationFrame ||\n                //     window.webkitRequestAnimationFrame ||\n                //     window.mozRequestAnimationFrame ||\n                //     function( cb ) {\n                //         window.setTimeout( cb, 1000 / 60 );\n                //     };\n    \n                // // fix: Uncaught TypeError: Illegal invocation\n                // return bindFn( next, window );\n            })(),\n    \n            /**\n             * 被[uncurrythis](http://www.2ality.com/2011/11/uncurrying-this.html)的数组slice方法。\n             * 将用来将非数组对象转化成数组对象。\n             * @grammar Base.slice( target, start[, end] ) => Array\n             * @method slice\n             * @example\n             * function doSomthing() {\n             *     var args = Base.slice( arguments, 1 );\n             *     console.log( args );\n             * }\n             *\n             * doSomthing( 'ignored', 'arg2', 'arg3' );    // => Array [\"arg2\", \"arg3\"]\n             */\n            slice: uncurryThis( [].slice ),\n    \n            /**\n             * 生成唯一的ID\n             * @method guid\n             * @grammar Base.guid() => String\n             * @grammar Base.guid( prefx ) => String\n             */\n            guid: (function() {\n                var counter = 0;\n    \n                return function( prefix ) {\n                    var guid = (+new Date()).toString( 32 ),\n                        i = 0;\n    \n                    for ( ; i < 5; i++ ) {\n                        guid += Math.floor( Math.random() * 65535 ).toString( 32 );\n                    }\n    \n                    return (prefix || 'wu_') + guid + (counter++).toString( 32 );\n                };\n            })(),\n    \n            /**\n             * 格式化文件大小, 输出成带单位的字符串\n             * @method formatSize\n             * @grammar Base.formatSize( size ) => String\n             * @grammar Base.formatSize( size, pointLength ) => String\n             * @grammar Base.formatSize( size, pointLength, units ) => String\n             * @param {Number} size 文件大小\n             * @param {Number} [pointLength=2] 精确到的小数点数。\n             * @param {Array} [units=[ 'B', 'K', 'M', 'G', 'TB' ]] 单位数组。从字节，到千字节，一直往上指定。如果单位数组里面只指定了到了K(千字节)，同时文件大小大于M, 此方法的输出将还是显示成多少K.\n             * @example\n             * console.log( Base.formatSize( 100 ) );    // => 100B\n             * console.log( Base.formatSize( 1024 ) );    // => 1.00K\n             * console.log( Base.formatSize( 1024, 0 ) );    // => 1K\n             * console.log( Base.formatSize( 1024 * 1024 ) );    // => 1.00M\n             * console.log( Base.formatSize( 1024 * 1024 * 1024 ) );    // => 1.00G\n             * console.log( Base.formatSize( 1024 * 1024 * 1024, 0, ['B', 'KB', 'MB'] ) );    // => 1024MB\n             */\n            formatSize: function( size, pointLength, units ) {\n                var unit;\n    \n                units = units || [ 'B', 'K', 'M', 'G', 'TB' ];\n    \n                while ( (unit = units.shift()) && size > 1024 ) {\n                    size = size / 1024;\n                }\n    \n                return (unit === 'B' ? size : size.toFixed( pointLength || 2 )) +\n                        unit;\n            }\n        };\n    });\n    /**\n     * 事件处理类，可以独立使用，也可以扩展给对象使用。\n     * @fileOverview Mediator\n     */\n    define('mediator',[\n        'base'\n    ], function( Base ) {\n        var $ = Base.$,\n            slice = [].slice,\n            separator = /\\s+/,\n            protos;\n    \n        // 根据条件过滤出事件handlers.\n        function findHandlers( arr, name, callback, context ) {\n            return $.grep( arr, function( handler ) {\n                return handler &&\n                        (!name || handler.e === name) &&\n                        (!callback || handler.cb === callback ||\n                        handler.cb._cb === callback) &&\n                        (!context || handler.ctx === context);\n            });\n        }\n    \n        function eachEvent( events, callback, iterator ) {\n            // 不支持对象，只支持多个event用空格隔开\n            $.each( (events || '').split( separator ), function( _, key ) {\n                iterator( key, callback );\n            });\n        }\n    \n        function triggerHanders( events, args ) {\n            var stoped = false,\n                i = -1,\n                len = events.length,\n                handler;\n    \n            while ( ++i < len ) {\n                handler = events[ i ];\n    \n                if ( handler.cb.apply( handler.ctx2, args ) === false ) {\n                    stoped = true;\n                    break;\n                }\n            }\n    \n            return !stoped;\n        }\n    \n        protos = {\n    \n            /**\n             * 绑定事件。\n             *\n             * `callback`方法在执行时，arguments将会来源于trigger的时候携带的参数。如\n             * ```javascript\n             * var obj = {};\n             *\n             * // 使得obj有事件行为\n             * Mediator.installTo( obj );\n             *\n             * obj.on( 'testa', function( arg1, arg2 ) {\n             *     console.log( arg1, arg2 ); // => 'arg1', 'arg2'\n             * });\n             *\n             * obj.trigger( 'testa', 'arg1', 'arg2' );\n             * ```\n             *\n             * 如果`callback`中，某一个方法`return false`了，则后续的其他`callback`都不会被执行到。\n             * 切会影响到`trigger`方法的返回值，为`false`。\n             *\n             * `on`还可以用来添加一个特殊事件`all`, 这样所有的事件触发都会响应到。同时此类`callback`中的arguments有一个不同处，\n             * 就是第一个参数为`type`，记录当前是什么事件在触发。此类`callback`的优先级比脚低，会再正常`callback`执行完后触发。\n             * ```javascript\n             * obj.on( 'all', function( type, arg1, arg2 ) {\n             *     console.log( type, arg1, arg2 ); // => 'testa', 'arg1', 'arg2'\n             * });\n             * ```\n             *\n             * @method on\n             * @grammar on( name, callback[, context] ) => self\n             * @param  {String}   name     事件名，支持多个事件用空格隔开\n             * @param  {Function} callback 事件处理器\n             * @param  {Object}   [context]  事件处理器的上下文。\n             * @return {self} 返回自身，方便链式\n             * @chainable\n             * @class Mediator\n             */\n            on: function( name, callback, context ) {\n                var me = this,\n                    set;\n    \n                if ( !callback ) {\n                    return this;\n                }\n    \n                set = this._events || (this._events = []);\n    \n                eachEvent( name, callback, function( name, callback ) {\n                    var handler = { e: name };\n    \n                    handler.cb = callback;\n                    handler.ctx = context;\n                    handler.ctx2 = context || me;\n                    handler.id = set.length;\n    \n                    set.push( handler );\n                });\n    \n                return this;\n            },\n    \n            /**\n             * 绑定事件，且当handler执行完后，自动解除绑定。\n             * @method once\n             * @grammar once( name, callback[, context] ) => self\n             * @param  {String}   name     事件名\n             * @param  {Function} callback 事件处理器\n             * @param  {Object}   [context]  事件处理器的上下文。\n             * @return {self} 返回自身，方便链式\n             * @chainable\n             */\n            once: function( name, callback, context ) {\n                var me = this;\n    \n                if ( !callback ) {\n                    return me;\n                }\n    \n                eachEvent( name, callback, function( name, callback ) {\n                    var once = function() {\n                            me.off( name, once );\n                            return callback.apply( context || me, arguments );\n                        };\n    \n                    once._cb = callback;\n                    me.on( name, once, context );\n                });\n    \n                return me;\n            },\n    \n            /**\n             * 解除事件绑定\n             * @method off\n             * @grammar off( [name[, callback[, context] ] ] ) => self\n             * @param  {String}   [name]     事件名\n             * @param  {Function} [callback] 事件处理器\n             * @param  {Object}   [context]  事件处理器的上下文。\n             * @return {self} 返回自身，方便链式\n             * @chainable\n             */\n            off: function( name, cb, ctx ) {\n                var events = this._events;\n    \n                if ( !events ) {\n                    return this;\n                }\n    \n                if ( !name && !cb && !ctx ) {\n                    this._events = [];\n                    return this;\n                }\n    \n                eachEvent( name, cb, function( name, cb ) {\n                    $.each( findHandlers( events, name, cb, ctx ), function() {\n                        delete events[ this.id ];\n                    });\n                });\n    \n                return this;\n            },\n    \n            /**\n             * 触发事件\n             * @method trigger\n             * @grammar trigger( name[, args...] ) => self\n             * @param  {String}   type     事件名\n             * @param  {*} [...] 任意参数\n             * @return {Boolean} 如果handler中return false了，则返回false, 否则返回true\n             */\n            trigger: function( type ) {\n                var args, events, allEvents;\n    \n                if ( !this._events || !type ) {\n                    return this;\n                }\n    \n                args = slice.call( arguments, 1 );\n                events = findHandlers( this._events, type );\n                allEvents = findHandlers( this._events, 'all' );\n    \n                return triggerHanders( events, args ) &&\n                        triggerHanders( allEvents, arguments );\n            }\n        };\n    \n        /**\n         * 中介者，它本身是个单例，但可以通过[installTo](#WebUploader:Mediator:installTo)方法，使任何对象具备事件行为。\n         * 主要目的是负责模块与模块之间的合作，降低耦合度。\n         *\n         * @class Mediator\n         */\n        return $.extend({\n    \n            /**\n             * 可以通过这个接口，使任何对象具备事件功能。\n             * @method installTo\n             * @param  {Object} obj 需要具备事件行为的对象。\n             * @return {Object} 返回obj.\n             */\n            installTo: function( obj ) {\n                return $.extend( obj, protos );\n            }\n    \n        }, protos );\n    });\n    /**\n     * @fileOverview Uploader上传类\n     */\n    define('uploader',[\n        'base',\n        'mediator'\n    ], function( Base, Mediator ) {\n    \n        var $ = Base.$;\n    \n        /**\n         * 上传入口类。\n         * @class Uploader\n         * @constructor\n         * @grammar new Uploader( opts ) => Uploader\n         * @example\n         * var uploader = WebUploader.Uploader({\n         *     swf: 'path_of_swf/Uploader.swf',\n         *\n         *     // 开起分片上传。\n         *     chunked: true\n         * });\n         */\n        function Uploader( opts ) {\n            this.options = $.extend( true, {}, Uploader.options, opts );\n            this._init( this.options );\n        }\n    \n        // default Options\n        // widgets中有相应扩展\n        Uploader.options = {};\n        Mediator.installTo( Uploader.prototype );\n    \n        // 批量添加纯命令式方法。\n        $.each({\n            upload: 'start-upload',\n            stop: 'stop-upload',\n            getFile: 'get-file',\n            getFiles: 'get-files',\n            addFile: 'add-file',\n            addFiles: 'add-file',\n            sort: 'sort-files',\n            removeFile: 'remove-file',\n            cancelFile: 'cancel-file',\n            skipFile: 'skip-file',\n            retry: 'retry',\n            isInProgress: 'is-in-progress',\n            makeThumb: 'make-thumb',\n            md5File: 'md5-file',\n            getDimension: 'get-dimension',\n            addButton: 'add-btn',\n            predictRuntimeType: 'predict-runtime-type',\n            refresh: 'refresh',\n            disable: 'disable',\n            enable: 'enable',\n            reset: 'reset'\n        }, function( fn, command ) {\n            Uploader.prototype[ fn ] = function() {\n                return this.request( command, arguments );\n            };\n        });\n    \n        $.extend( Uploader.prototype, {\n            state: 'pending',\n    \n            _init: function( opts ) {\n                var me = this;\n    \n                me.request( 'init', opts, function() {\n                    me.state = 'ready';\n                    me.trigger('ready');\n                });\n            },\n    \n            /**\n             * 获取或者设置Uploader配置项。\n             * @method option\n             * @grammar option( key ) => *\n             * @grammar option( key, val ) => self\n             * @example\n             *\n             * // 初始状态图片上传前不会压缩\n             * var uploader = new WebUploader.Uploader({\n             *     compress: null;\n             * });\n             *\n             * // 修改后图片上传前，尝试将图片压缩到1600 * 1600\n             * uploader.option( 'compress', {\n             *     width: 1600,\n             *     height: 1600\n             * });\n             */\n            option: function( key, val ) {\n                var opts = this.options;\n    \n                // setter\n                if ( arguments.length > 1 ) {\n    \n                    if ( $.isPlainObject( val ) &&\n                            $.isPlainObject( opts[ key ] ) ) {\n                        $.extend( opts[ key ], val );\n                    } else {\n                        opts[ key ] = val;\n                    }\n    \n                } else {    // getter\n                    return key ? opts[ key ] : opts;\n                }\n            },\n    \n            /**\n             * 获取文件统计信息。返回一个包含一下信息的对象。\n             * * `successNum` 上传成功的文件数\n             * * `progressNum` 上传中的文件数\n             * * `cancelNum` 被删除的文件数\n             * * `invalidNum` 无效的文件数\n             * * `uploadFailNum` 上传失败的文件数\n             * * `queueNum` 还在队列中的文件数\n             * * `interruptNum` 被暂停的文件数\n             * @method getStats\n             * @grammar getStats() => Object\n             */\n            getStats: function() {\n                // return this._mgr.getStats.apply( this._mgr, arguments );\n                var stats = this.request('get-stats');\n    \n                return stats ? {\n                    successNum: stats.numOfSuccess,\n                    progressNum: stats.numOfProgress,\n    \n                    // who care?\n                    // queueFailNum: 0,\n                    cancelNum: stats.numOfCancel,\n                    invalidNum: stats.numOfInvalid,\n                    uploadFailNum: stats.numOfUploadFailed,\n                    queueNum: stats.numOfQueue,\n                    interruptNum: stats.numofInterrupt\n                } : {};\n            },\n    \n            // 需要重写此方法来来支持opts.onEvent和instance.onEvent的处理器\n            trigger: function( type/*, args...*/ ) {\n                var args = [].slice.call( arguments, 1 ),\n                    opts = this.options,\n                    name = 'on' + type.substring( 0, 1 ).toUpperCase() +\n                        type.substring( 1 );\n    \n                if (\n                        // 调用通过on方法注册的handler.\n                        Mediator.trigger.apply( this, arguments ) === false ||\n    \n                        // 调用opts.onEvent\n                        $.isFunction( opts[ name ] ) &&\n                        opts[ name ].apply( this, args ) === false ||\n    \n                        // 调用this.onEvent\n                        $.isFunction( this[ name ] ) &&\n                        this[ name ].apply( this, args ) === false ||\n    \n                        // 广播所有uploader的事件。\n                        Mediator.trigger.apply( Mediator,\n                        [ this, type ].concat( args ) ) === false ) {\n    \n                    return false;\n                }\n    \n                return true;\n            },\n    \n            /**\n             * 销毁 webuploader 实例\n             * @method destroy\n             * @grammar destroy() => undefined\n             */\n            destroy: function() {\n                this.request( 'destroy', arguments );\n                this.off();\n            },\n    \n            // widgets/widget.js将补充此方法的详细文档。\n            request: Base.noop\n        });\n    \n        /**\n         * 创建Uploader实例，等同于new Uploader( opts );\n         * @method create\n         * @class Base\n         * @static\n         * @grammar Base.create( opts ) => Uploader\n         */\n        Base.create = Uploader.create = function( opts ) {\n            return new Uploader( opts );\n        };\n    \n        // 暴露Uploader，可以通过它来扩展业务逻辑。\n        Base.Uploader = Uploader;\n    \n        return Uploader;\n    });\n    /**\n     * @fileOverview Runtime管理器，负责Runtime的选择, 连接\n     */\n    define('runtime/runtime',[\n        'base',\n        'mediator'\n    ], function( Base, Mediator ) {\n    \n        var $ = Base.$,\n            factories = {},\n    \n            // 获取对象的第一个key\n            getFirstKey = function( obj ) {\n                for ( var key in obj ) {\n                    if ( obj.hasOwnProperty( key ) ) {\n                        return key;\n                    }\n                }\n                return null;\n            };\n    \n        // 接口类。\n        function Runtime( options ) {\n            this.options = $.extend({\n                container: document.body\n            }, options );\n            this.uid = Base.guid('rt_');\n        }\n    \n        $.extend( Runtime.prototype, {\n    \n            getContainer: function() {\n                var opts = this.options,\n                    parent, container;\n    \n                if ( this._container ) {\n                    return this._container;\n                }\n    \n                parent = $( opts.container || document.body );\n                container = $( document.createElement('div') );\n    \n                container.attr( 'id', 'rt_' + this.uid );\n                container.css({\n                    position: 'absolute',\n                    top: '0px',\n                    left: '0px',\n                    width: '1px',\n                    height: '1px',\n                    overflow: 'hidden'\n                });\n    \n                parent.append( container );\n                parent.addClass('webuploader-container');\n                this._container = container;\n                this._parent = parent;\n                return container;\n            },\n    \n            init: Base.noop,\n            exec: Base.noop,\n    \n            destroy: function() {\n                this._container && this._container.remove();\n                this._parent && this._parent.removeClass('webuploader-container');\n                this.off();\n            }\n        });\n    \n        Runtime.orders = 'html5,flash';\n    \n    \n        /**\n         * 添加Runtime实现。\n         * @param {String} type    类型\n         * @param {Runtime} factory 具体Runtime实现。\n         */\n        Runtime.addRuntime = function( type, factory ) {\n            factories[ type ] = factory;\n        };\n    \n        Runtime.hasRuntime = function( type ) {\n            return !!(type ? factories[ type ] : getFirstKey( factories ));\n        };\n    \n        Runtime.create = function( opts, orders ) {\n            var type, runtime;\n    \n            orders = orders || Runtime.orders;\n            $.each( orders.split( /\\s*,\\s*/g ), function() {\n                if ( factories[ this ] ) {\n                    type = this;\n                    return false;\n                }\n            });\n    \n            type = type || getFirstKey( factories );\n    \n            if ( !type ) {\n                throw new Error('Runtime Error');\n            }\n    \n            runtime = new factories[ type ]( opts );\n            return runtime;\n        };\n    \n        Mediator.installTo( Runtime.prototype );\n        return Runtime;\n    });\n    \n    /**\n     * @fileOverview Runtime管理器，负责Runtime的选择, 连接\n     */\n    define('runtime/client',[\n        'base',\n        'mediator',\n        'runtime/runtime'\n    ], function( Base, Mediator, Runtime ) {\n    \n        var cache;\n    \n        cache = (function() {\n            var obj = {};\n    \n            return {\n                add: function( runtime ) {\n                    obj[ runtime.uid ] = runtime;\n                },\n    \n                get: function( ruid, standalone ) {\n                    var i;\n    \n                    if ( ruid ) {\n                        return obj[ ruid ];\n                    }\n    \n                    for ( i in obj ) {\n                        // 有些类型不能重用，比如filepicker.\n                        if ( standalone && obj[ i ].__standalone ) {\n                            continue;\n                        }\n    \n                        return obj[ i ];\n                    }\n    \n                    return null;\n                },\n    \n                remove: function( runtime ) {\n                    delete obj[ runtime.uid ];\n                }\n            };\n        })();\n    \n        function RuntimeClient( component, standalone ) {\n            var deferred = Base.Deferred(),\n                runtime;\n    \n            this.uid = Base.guid('client_');\n    \n            // 允许runtime没有初始化之前，注册一些方法在初始化后执行。\n            this.runtimeReady = function( cb ) {\n                return deferred.done( cb );\n            };\n    \n            this.connectRuntime = function( opts, cb ) {\n    \n                // already connected.\n                if ( runtime ) {\n                    throw new Error('already connected!');\n                }\n    \n                deferred.done( cb );\n    \n                if ( typeof opts === 'string' && cache.get( opts ) ) {\n                    runtime = cache.get( opts );\n                }\n    \n                // 像filePicker只能独立存在，不能公用。\n                runtime = runtime || cache.get( null, standalone );\n    \n                // 需要创建\n                if ( !runtime ) {\n                    runtime = Runtime.create( opts, opts.runtimeOrder );\n                    runtime.__promise = deferred.promise();\n                    runtime.once( 'ready', deferred.resolve );\n                    runtime.init();\n                    cache.add( runtime );\n                    runtime.__client = 1;\n                } else {\n                    // 来自cache\n                    Base.$.extend( runtime.options, opts );\n                    runtime.__promise.then( deferred.resolve );\n                    runtime.__client++;\n                }\n    \n                standalone && (runtime.__standalone = standalone);\n                return runtime;\n            };\n    \n            this.getRuntime = function() {\n                return runtime;\n            };\n    \n            this.disconnectRuntime = function() {\n                if ( !runtime ) {\n                    return;\n                }\n    \n                runtime.__client--;\n    \n                if ( runtime.__client <= 0 ) {\n                    cache.remove( runtime );\n                    delete runtime.__promise;\n                    runtime.destroy();\n                }\n    \n                runtime = null;\n            };\n    \n            this.exec = function() {\n                if ( !runtime ) {\n                    return;\n                }\n    \n                var args = Base.slice( arguments );\n                component && args.unshift( component );\n    \n                return runtime.exec.apply( this, args );\n            };\n    \n            this.getRuid = function() {\n                return runtime && runtime.uid;\n            };\n    \n            this.destroy = (function( destroy ) {\n                return function() {\n                    destroy && destroy.apply( this, arguments );\n                    this.trigger('destroy');\n                    this.off();\n                    this.exec('destroy');\n                    this.disconnectRuntime();\n                };\n            })( this.destroy );\n        }\n    \n        Mediator.installTo( RuntimeClient.prototype );\n        return RuntimeClient;\n    });\n    /**\n     * @fileOverview 错误信息\n     */\n    define('lib/dnd',[\n        'base',\n        'mediator',\n        'runtime/client'\n    ], function( Base, Mediator, RuntimeClent ) {\n    \n        var $ = Base.$;\n    \n        function DragAndDrop( opts ) {\n            opts = this.options = $.extend({}, DragAndDrop.options, opts );\n    \n            opts.container = $( opts.container );\n    \n            if ( !opts.container.length ) {\n                return;\n            }\n    \n            RuntimeClent.call( this, 'DragAndDrop' );\n        }\n    \n        DragAndDrop.options = {\n            accept: null,\n            disableGlobalDnd: false\n        };\n    \n        Base.inherits( RuntimeClent, {\n            constructor: DragAndDrop,\n    \n            init: function() {\n                var me = this;\n    \n                me.connectRuntime( me.options, function() {\n                    me.exec('init');\n                    me.trigger('ready');\n                });\n            }\n        });\n    \n        Mediator.installTo( DragAndDrop.prototype );\n    \n        return DragAndDrop;\n    });\n    /**\n     * @fileOverview 组件基类。\n     */\n    define('widgets/widget',[\n        'base',\n        'uploader'\n    ], function( Base, Uploader ) {\n    \n        var $ = Base.$,\n            _init = Uploader.prototype._init,\n            _destroy = Uploader.prototype.destroy,\n            IGNORE = {},\n            widgetClass = [];\n    \n        function isArrayLike( obj ) {\n            if ( !obj ) {\n                return false;\n            }\n    \n            var length = obj.length,\n                type = $.type( obj );\n    \n            if ( obj.nodeType === 1 && length ) {\n                return true;\n            }\n    \n            return type === 'array' || type !== 'function' && type !== 'string' &&\n                    (length === 0 || typeof length === 'number' && length > 0 &&\n                    (length - 1) in obj);\n        }\n    \n        function Widget( uploader ) {\n            this.owner = uploader;\n            this.options = uploader.options;\n        }\n    \n        $.extend( Widget.prototype, {\n    \n            init: Base.noop,\n    \n            // 类Backbone的事件监听声明，监听uploader实例上的事件\n            // widget直接无法监听事件，事件只能通过uploader来传递\n            invoke: function( apiName, args ) {\n    \n                /*\n                    {\n                        'make-thumb': 'makeThumb'\n                    }\n                 */\n                var map = this.responseMap;\n    \n                // 如果无API响应声明则忽略\n                if ( !map || !(apiName in map) || !(map[ apiName ] in this) ||\n                        !$.isFunction( this[ map[ apiName ] ] ) ) {\n    \n                    return IGNORE;\n                }\n    \n                return this[ map[ apiName ] ].apply( this, args );\n    \n            },\n    \n            /**\n             * 发送命令。当传入`callback`或者`handler`中返回`promise`时。返回一个当所有`handler`中的promise都完成后完成的新`promise`。\n             * @method request\n             * @grammar request( command, args ) => * | Promise\n             * @grammar request( command, args, callback ) => Promise\n             * @for  Uploader\n             */\n            request: function() {\n                return this.owner.request.apply( this.owner, arguments );\n            }\n        });\n    \n        // 扩展Uploader.\n        $.extend( Uploader.prototype, {\n    \n            /**\n             * @property {String | Array} [disableWidgets=undefined]\n             * @namespace options\n             * @for Uploader\n             * @description 默认所有 Uploader.register 了的 widget 都会被加载，如果禁用某一部分，请通过此 option 指定黑名单。\n             */\n    \n            // 覆写_init用来初始化widgets\n            _init: function() {\n                var me = this,\n                    widgets = me._widgets = [],\n                    deactives = me.options.disableWidgets || '';\n    \n                $.each( widgetClass, function( _, klass ) {\n                    (!deactives || !~deactives.indexOf( klass._name )) &&\n                        widgets.push( new klass( me ) );\n                });\n    \n                return _init.apply( me, arguments );\n            },\n    \n            request: function( apiName, args, callback ) {\n                var i = 0,\n                    widgets = this._widgets,\n                    len = widgets && widgets.length,\n                    rlts = [],\n                    dfds = [],\n                    widget, rlt, promise, key;\n    \n                args = isArrayLike( args ) ? args : [ args ];\n    \n                for ( ; i < len; i++ ) {\n                    widget = widgets[ i ];\n                    rlt = widget.invoke( apiName, args );\n    \n                    if ( rlt !== IGNORE ) {\n    \n                        // Deferred对象\n                        if ( Base.isPromise( rlt ) ) {\n                            dfds.push( rlt );\n                        } else {\n                            rlts.push( rlt );\n                        }\n                    }\n                }\n    \n                // 如果有callback，则用异步方式。\n                if ( callback || dfds.length ) {\n                    promise = Base.when.apply( Base, dfds );\n                    key = promise.pipe ? 'pipe' : 'then';\n    \n                    // 很重要不能删除。删除了会死循环。\n                    // 保证执行顺序。让callback总是在下一个 tick 中执行。\n                    return promise[ key ](function() {\n                                var deferred = Base.Deferred(),\n                                    args = arguments;\n    \n                                if ( args.length === 1 ) {\n                                    args = args[ 0 ];\n                                }\n    \n                                setTimeout(function() {\n                                    deferred.resolve( args );\n                                }, 1 );\n    \n                                return deferred.promise();\n                            })[ callback ? key : 'done' ]( callback || Base.noop );\n                } else {\n                    return rlts[ 0 ];\n                }\n            },\n    \n            destroy: function() {\n                _destroy.apply( this, arguments );\n                this._widgets = null;\n            }\n        });\n    \n        /**\n         * 添加组件\n         * @grammar Uploader.register(proto);\n         * @grammar Uploader.register(map, proto);\n         * @param  {object} responseMap API 名称与函数实现的映射\n         * @param  {object} proto 组件原型，构造函数通过 constructor 属性定义\n         * @method Uploader.register\n         * @for Uploader\n         * @example\n         * Uploader.register({\n         *     'make-thumb': 'makeThumb'\n         * }, {\n         *     init: function( options ) {},\n         *     makeThumb: function() {}\n         * });\n         *\n         * Uploader.register({\n         *     'make-thumb': function() {\n         *         \n         *     }\n         * });\n         */\n        Uploader.register = Widget.register = function( responseMap, widgetProto ) {\n            var map = { init: 'init', destroy: 'destroy', name: 'anonymous' },\n                klass;\n    \n            if ( arguments.length === 1 ) {\n                widgetProto = responseMap;\n    \n                // 自动生成 map 表。\n                $.each(widgetProto, function(key) {\n                    if ( key[0] === '_' || key === 'name' ) {\n                        key === 'name' && (map.name = widgetProto.name);\n                        return;\n                    }\n    \n                    map[key.replace(/[A-Z]/g, '-$&').toLowerCase()] = key;\n                });\n    \n            } else {\n                map = $.extend( map, responseMap );\n            }\n    \n            widgetProto.responseMap = map;\n            klass = Base.inherits( Widget, widgetProto );\n            klass._name = map.name;\n            widgetClass.push( klass );\n    \n            return klass;\n        };\n    \n        /**\n         * 删除插件，只有在注册时指定了名字的才能被删除。\n         * @grammar Uploader.unRegister(name);\n         * @param  {string} name 组件名字\n         * @method Uploader.unRegister\n         * @for Uploader\n         * @example\n         *\n         * Uploader.register({\n         *     name: 'custom',\n         *     \n         *     'make-thumb': function() {\n         *         \n         *     }\n         * });\n         *\n         * Uploader.unRegister('custom');\n         */\n        Uploader.unRegister = Widget.unRegister = function( name ) {\n            if ( !name || name === 'anonymous' ) {\n                return;\n            }\n            \n            // 删除指定的插件。\n            for ( var i = widgetClass.length; i--; ) {\n                if ( widgetClass[i]._name === name ) {\n                    widgetClass.splice(i, 1)\n                }\n            }\n        };\n    \n        return Widget;\n    });\n    /**\n     * @fileOverview DragAndDrop Widget。\n     */\n    define('widgets/filednd',[\n        'base',\n        'uploader',\n        'lib/dnd',\n        'widgets/widget'\n    ], function( Base, Uploader, Dnd ) {\n        var $ = Base.$;\n    \n        Uploader.options.dnd = '';\n    \n        /**\n         * @property {Selector} [dnd=undefined]  指定Drag And Drop拖拽的容器，如果不指定，则不启动。\n         * @namespace options\n         * @for Uploader\n         */\n        \n        /**\n         * @property {Selector} [disableGlobalDnd=false]  是否禁掉整个页面的拖拽功能，如果不禁用，图片拖进来的时候会默认被浏览器打开。\n         * @namespace options\n         * @for Uploader\n         */\n    \n        /**\n         * @event dndAccept\n         * @param {DataTransferItemList} items DataTransferItem\n         * @description 阻止此事件可以拒绝某些类型的文件拖入进来。目前只有 chrome 提供这样的 API，且只能通过 mime-type 验证。\n         * @for  Uploader\n         */\n        return Uploader.register({\n            name: 'dnd',\n            \n            init: function( opts ) {\n    \n                if ( !opts.dnd ||\n                        this.request('predict-runtime-type') !== 'html5' ) {\n                    return;\n                }\n    \n                var me = this,\n                    deferred = Base.Deferred(),\n                    options = $.extend({}, {\n                        disableGlobalDnd: opts.disableGlobalDnd,\n                        container: opts.dnd,\n                        accept: opts.accept\n                    }),\n                    dnd;\n    \n                this.dnd = dnd = new Dnd( options );\n    \n                dnd.once( 'ready', deferred.resolve );\n                dnd.on( 'drop', function( files ) {\n                    me.request( 'add-file', [ files ]);\n                });\n    \n                // 检测文件是否全部允许添加。\n                dnd.on( 'accept', function( items ) {\n                    return me.owner.trigger( 'dndAccept', items );\n                });\n    \n                dnd.init();\n    \n                return deferred.promise();\n            },\n    \n            destroy: function() {\n                this.dnd && this.dnd.destroy();\n            }\n        });\n    });\n    \n    /**\n     * @fileOverview 错误信息\n     */\n    define('lib/filepaste',[\n        'base',\n        'mediator',\n        'runtime/client'\n    ], function( Base, Mediator, RuntimeClent ) {\n    \n        var $ = Base.$;\n    \n        function FilePaste( opts ) {\n            opts = this.options = $.extend({}, opts );\n            opts.container = $( opts.container || document.body );\n            RuntimeClent.call( this, 'FilePaste' );\n        }\n    \n        Base.inherits( RuntimeClent, {\n            constructor: FilePaste,\n    \n            init: function() {\n                var me = this;\n    \n                me.connectRuntime( me.options, function() {\n                    me.exec('init');\n                    me.trigger('ready');\n                });\n            }\n        });\n    \n        Mediator.installTo( FilePaste.prototype );\n    \n        return FilePaste;\n    });\n    /**\n     * @fileOverview 组件基类。\n     */\n    define('widgets/filepaste',[\n        'base',\n        'uploader',\n        'lib/filepaste',\n        'widgets/widget'\n    ], function( Base, Uploader, FilePaste ) {\n        var $ = Base.$;\n    \n        /**\n         * @property {Selector} [paste=undefined]  指定监听paste事件的容器，如果不指定，不启用此功能。此功能为通过粘贴来添加截屏的图片。建议设置为`document.body`.\n         * @namespace options\n         * @for Uploader\n         */\n        return Uploader.register({\n            name: 'paste',\n            \n            init: function( opts ) {\n    \n                if ( !opts.paste ||\n                        this.request('predict-runtime-type') !== 'html5' ) {\n                    return;\n                }\n    \n                var me = this,\n                    deferred = Base.Deferred(),\n                    options = $.extend({}, {\n                        container: opts.paste,\n                        accept: opts.accept\n                    }),\n                    paste;\n    \n                this.paste = paste = new FilePaste( options );\n    \n                paste.once( 'ready', deferred.resolve );\n                paste.on( 'paste', function( files ) {\n                    me.owner.request( 'add-file', [ files ]);\n                });\n                paste.init();\n    \n                return deferred.promise();\n            },\n    \n            destroy: function() {\n                this.paste && this.paste.destroy();\n            }\n        });\n    });\n    /**\n     * @fileOverview Blob\n     */\n    define('lib/blob',[\n        'base',\n        'runtime/client'\n    ], function( Base, RuntimeClient ) {\n    \n        function Blob( ruid, source ) {\n            var me = this;\n    \n            me.source = source;\n            me.ruid = ruid;\n            this.size = source.size || 0;\n    \n            // 如果没有指定 mimetype, 但是知道文件后缀。\n            if ( !source.type && this.ext &&\n                    ~'jpg,jpeg,png,gif,bmp'.indexOf( this.ext ) ) {\n                this.type = 'image/' + (this.ext === 'jpg' ? 'jpeg' : this.ext);\n            } else {\n                this.type = source.type || 'application/octet-stream';\n            }\n    \n            RuntimeClient.call( me, 'Blob' );\n            this.uid = source.uid || this.uid;\n    \n            if ( ruid ) {\n                me.connectRuntime( ruid );\n            }\n        }\n    \n        Base.inherits( RuntimeClient, {\n            constructor: Blob,\n    \n            slice: function( start, end ) {\n                return this.exec( 'slice', start, end );\n            },\n    \n            getSource: function() {\n                return this.source;\n            }\n        });\n    \n        return Blob;\n    });\n    /**\n     * 为了统一化Flash的File和HTML5的File而存在。\n     * 以至于要调用Flash里面的File，也可以像调用HTML5版本的File一下。\n     * @fileOverview File\n     */\n    define('lib/file',[\n        'base',\n        'lib/blob'\n    ], function( Base, Blob ) {\n    \n        var uid = 1,\n            rExt = /\\.([^.]+)$/;\n    \n        function File( ruid, file ) {\n            var ext;\n    \n            this.name = file.name || ('untitled' + uid++);\n            ext = rExt.exec( file.name ) ? RegExp.$1.toLowerCase() : '';\n    \n            // todo 支持其他类型文件的转换。\n            // 如果有 mimetype, 但是文件名里面没有找出后缀规律\n            if ( !ext && file.type ) {\n                ext = /\\/(jpg|jpeg|png|gif|bmp)$/i.exec( file.type ) ?\n                        RegExp.$1.toLowerCase() : '';\n                this.name += '.' + ext;\n            }\n    \n            this.ext = ext;\n            this.lastModifiedDate = file.lastModifiedDate ||\n                    (new Date()).toLocaleString();\n    \n            Blob.apply( this, arguments );\n        }\n    \n        return Base.inherits( Blob, File );\n    });\n    \n    /**\n     * @fileOverview 错误信息\n     */\n    define('lib/filepicker',[\n        'base',\n        'runtime/client',\n        'lib/file'\n    ], function( Base, RuntimeClient, File ) {\n    \n        var $ = Base.$;\n    \n        function FilePicker( opts ) {\n            opts = this.options = $.extend({}, FilePicker.options, opts );\n    \n            opts.container = $( opts.id );\n    \n            if ( !opts.container.length ) {\n                throw new Error('按钮指定错误');\n            }\n    \n            opts.innerHTML = opts.innerHTML || opts.label ||\n                    opts.container.html() || '';\n    \n            opts.button = $( opts.button || document.createElement('div') );\n            opts.button.html( opts.innerHTML );\n            opts.container.html( opts.button );\n    \n            RuntimeClient.call( this, 'FilePicker', true );\n        }\n    \n        FilePicker.options = {\n            button: null,\n            container: null,\n            label: null,\n            innerHTML: null,\n            multiple: true,\n            accept: null,\n            name: 'file',\n            style: 'webuploader-pick'   //pick element class attribute, default is \"webuploader-pick\"\n        };\n    \n        Base.inherits( RuntimeClient, {\n            constructor: FilePicker,\n    \n            init: function() {\n                var me = this,\n                    opts = me.options,\n                    button = opts.button,\n                    style = opts.style;\n    \n                if (style)\n                    button.addClass('webuploader-pick');\n    \n                me.on( 'all', function( type ) {\n                    var files;\n    \n                    switch ( type ) {\n                        case 'mouseenter':\n                            if (style)\n                                button.addClass('webuploader-pick-hover');\n                            break;\n    \n                        case 'mouseleave':\n                            if (style)\n                                button.removeClass('webuploader-pick-hover');\n                            break;\n    \n                        case 'change':\n                            files = me.exec('getFiles');\n                            me.trigger( 'select', $.map( files, function( file ) {\n                                file = new File( me.getRuid(), file );\n    \n                                // 记录来源。\n                                file._refer = opts.container;\n                                return file;\n                            }), opts.container );\n                            break;\n                    }\n                });\n    \n                me.connectRuntime( opts, function() {\n                    me.refresh();\n                    me.exec( 'init', opts );\n                    me.trigger('ready');\n                });\n    \n                this._resizeHandler = Base.bindFn( this.refresh, this );\n                $( window ).on( 'resize', this._resizeHandler );\n            },\n    \n            refresh: function() {\n                var shimContainer = this.getRuntime().getContainer(),\n                    button = this.options.button,\n                    width = button.outerWidth ?\n                            button.outerWidth() : button.width(),\n    \n                    height = button.outerHeight ?\n                            button.outerHeight() : button.height(),\n    \n                    pos = button.offset();\n    \n                width && height && shimContainer.css({\n                    bottom: 'auto',\n                    right: 'auto',\n                    width: width + 'px',\n                    height: height + 'px'\n                }).offset( pos );\n            },\n    \n            enable: function() {\n                var btn = this.options.button;\n    \n                btn.removeClass('webuploader-pick-disable');\n                this.refresh();\n            },\n    \n            disable: function() {\n                var btn = this.options.button;\n    \n                this.getRuntime().getContainer().css({\n                    top: '-99999px'\n                });\n    \n                btn.addClass('webuploader-pick-disable');\n            },\n    \n            destroy: function() {\n                var btn = this.options.button;\n                $( window ).off( 'resize', this._resizeHandler );\n                btn.removeClass('webuploader-pick-disable webuploader-pick-hover ' +\n                    'webuploader-pick');\n            }\n        });\n    \n        return FilePicker;\n    });\n    \n    /**\n     * @fileOverview 文件选择相关\n     */\n    define('widgets/filepicker',[\n        'base',\n        'uploader',\n        'lib/filepicker',\n        'widgets/widget'\n    ], function( Base, Uploader, FilePicker ) {\n        var $ = Base.$;\n    \n        $.extend( Uploader.options, {\n    \n            /**\n             * @property {Selector | Object} [pick=undefined]\n             * @namespace options\n             * @for Uploader\n             * @description 指定选择文件的按钮容器，不指定则不创建按钮。\n             *\n             * * `id` {Seletor|dom} 指定选择文件的按钮容器，不指定则不创建按钮。**注意** 这里虽然写的是 id, 但是不是只支持 id, 还支持 class, 或者 dom 节点。\n             * * `label` {String} 请采用 `innerHTML` 代替\n             * * `innerHTML` {String} 指定按钮文字。不指定时优先从指定的容器中看是否自带文字。\n             * * `multiple` {Boolean} 是否开起同时选择多个文件能力。\n             */\n            pick: null,\n    \n            /**\n             * @property {Arroy} [accept=null]\n             * @namespace options\n             * @for Uploader\n             * @description 指定接受哪些类型的文件。 由于目前还有ext转mimeType表，所以这里需要分开指定。\n             *\n             * * `title` {String} 文字描述\n             * * `extensions` {String} 允许的文件后缀，不带点，多个用逗号分割。\n             * * `mimeTypes` {String} 多个用逗号分割。\n             *\n             * 如：\n             *\n             * ```\n             * {\n             *     title: 'Images',\n             *     extensions: 'gif,jpg,jpeg,bmp,png',\n             *     mimeTypes: 'image/*'\n             * }\n             * ```\n             */\n            accept: null/*{\n                title: 'Images',\n                extensions: 'gif,jpg,jpeg,bmp,png',\n                mimeTypes: 'image/*'\n            }*/\n        });\n    \n        return Uploader.register({\n            name: 'picker',\n    \n            init: function( opts ) {\n                this.pickers = [];\n                return opts.pick && this.addBtn( opts.pick );\n            },\n    \n            refresh: function() {\n                $.each( this.pickers, function() {\n                    this.refresh();\n                });\n            },\n    \n            /**\n             * @method addBtn\n             * @for Uploader\n             * @grammar addBtn( pick ) => Promise\n             * @description\n             * 添加文件选择按钮，如果一个按钮不够，需要调用此方法来添加。参数跟[options.pick](#WebUploader:Uploader:options)一致。\n             * @example\n             * uploader.addBtn({\n             *     id: '#btnContainer',\n             *     innerHTML: '选择文件'\n             * });\n             */\n            addBtn: function( pick ) {\n                var me = this,\n                    opts = me.options,\n                    accept = opts.accept,\n                    promises = [];\n    \n                if ( !pick ) {\n                    return;\n                }\n    \n                $.isPlainObject( pick ) || (pick = {\n                    id: pick\n                });\n    \n                $( pick.id ).each(function() {\n                    var options, picker, deferred;\n    \n                    deferred = Base.Deferred();\n    \n                    options = $.extend({}, pick, {\n                        accept: $.isPlainObject( accept ) ? [ accept ] : accept,\n                        swf: opts.swf,\n                        runtimeOrder: opts.runtimeOrder,\n                        id: this\n                    });\n    \n                    picker = new FilePicker( options );\n    \n                    picker.once( 'ready', deferred.resolve );\n                    picker.on( 'select', function( files ) {\n                        me.owner.request( 'add-file', [ files ]);\n                    });\n                    picker.on('dialogopen', function() {\n                        me.owner.trigger('dialogOpen', picker.button);\n                    });\n                    picker.init();\n    \n                    me.pickers.push( picker );\n    \n                    promises.push( deferred.promise() );\n                });\n    \n                return Base.when.apply( Base, promises );\n            },\n    \n            disable: function() {\n                $.each( this.pickers, function() {\n                    this.disable();\n                });\n            },\n    \n            enable: function() {\n                $.each( this.pickers, function() {\n                    this.enable();\n                });\n            },\n    \n            destroy: function() {\n                $.each( this.pickers, function() {\n                    this.destroy();\n                });\n                this.pickers = null;\n            }\n        });\n    });\n    /**\n     * @fileOverview Image\n     */\n    define('lib/image',[\n        'base',\n        'runtime/client',\n        'lib/blob'\n    ], function( Base, RuntimeClient, Blob ) {\n        var $ = Base.$;\n    \n        // 构造器。\n        function Image( opts ) {\n            this.options = $.extend({}, Image.options, opts );\n            RuntimeClient.call( this, 'Image' );\n    \n            this.on( 'load', function() {\n                this._info = this.exec('info');\n                this._meta = this.exec('meta');\n            });\n        }\n    \n        // 默认选项。\n        Image.options = {\n    \n            // 默认的图片处理质量\n            quality: 90,\n    \n            // 是否裁剪\n            crop: false,\n    \n            // 是否保留头部信息\n            preserveHeaders: false,\n    \n            // 是否允许放大。\n            allowMagnify: false\n        };\n    \n        // 继承RuntimeClient.\n        Base.inherits( RuntimeClient, {\n            constructor: Image,\n    \n            info: function( val ) {\n    \n                // setter\n                if ( val ) {\n                    this._info = val;\n                    return this;\n                }\n    \n                // getter\n                return this._info;\n            },\n    \n            meta: function( val ) {\n    \n                // setter\n                if ( val ) {\n                    this._meta = val;\n                    return this;\n                }\n    \n                // getter\n                return this._meta;\n            },\n    \n            loadFromBlob: function( blob ) {\n                var me = this,\n                    ruid = blob.getRuid();\n    \n                this.connectRuntime( ruid, function() {\n                    me.exec( 'init', me.options );\n                    me.exec( 'loadFromBlob', blob );\n                });\n            },\n    \n            resize: function() {\n                var args = Base.slice( arguments );\n                return this.exec.apply( this, [ 'resize' ].concat( args ) );\n            },\n    \n            crop: function() {\n                var args = Base.slice( arguments );\n                return this.exec.apply( this, [ 'crop' ].concat( args ) );\n            },\n    \n            getAsDataUrl: function( type ) {\n                return this.exec( 'getAsDataUrl', type );\n            },\n    \n            getAsBlob: function( type ) {\n                var blob = this.exec( 'getAsBlob', type );\n    \n                return new Blob( this.getRuid(), blob );\n            }\n        });\n    \n        return Image;\n    });\n    /**\n     * @fileOverview 图片操作, 负责预览图片和上传前压缩图片\n     */\n    define('widgets/image',[\n        'base',\n        'uploader',\n        'lib/image',\n        'widgets/widget'\n    ], function( Base, Uploader, Image ) {\n    \n        var $ = Base.$,\n            throttle;\n    \n        // 根据要处理的文件大小来节流，一次不能处理太多，会卡。\n        throttle = (function( max ) {\n            var occupied = 0,\n                waiting = [],\n                tick = function() {\n                    var item;\n    \n                    while ( waiting.length && occupied < max ) {\n                        item = waiting.shift();\n                        occupied += item[ 0 ];\n                        item[ 1 ]();\n                    }\n                };\n    \n            return function( emiter, size, cb ) {\n                waiting.push([ size, cb ]);\n                emiter.once( 'destroy', function() {\n                    occupied -= size;\n                    setTimeout( tick, 1 );\n                });\n                setTimeout( tick, 1 );\n            };\n        })( 5 * 1024 * 1024 );\n    \n        $.extend( Uploader.options, {\n    \n            /**\n             * @property {Object} [thumb]\n             * @namespace options\n             * @for Uploader\n             * @description 配置生成缩略图的选项。\n             *\n             * 默认为：\n             *\n             * ```javascript\n             * {\n             *     width: 110,\n             *     height: 110,\n             *\n             *     // 图片质量，只有type为`image/jpeg`的时候才有效。\n             *     quality: 70,\n             *\n             *     // 是否允许放大，如果想要生成小图的时候不失真，此选项应该设置为false.\n             *     allowMagnify: true,\n             *\n             *     // 是否允许裁剪。\n             *     crop: true,\n             *\n             *     // 为空的话则保留原有图片格式。\n             *     // 否则强制转换成指定的类型。\n             *     type: 'image/jpeg'\n             * }\n             * ```\n             */\n            thumb: {\n                width: 110,\n                height: 110,\n                quality: 70,\n                allowMagnify: true,\n                crop: true,\n                preserveHeaders: false,\n    \n                // 为空的话则保留原有图片格式。\n                // 否则强制转换成指定的类型。\n                // IE 8下面 base64 大小不能超过 32K 否则预览失败，而非 jpeg 编码的图片很可\n                // 能会超过 32k, 所以这里设置成预览的时候都是 image/jpeg\n                type: 'image/jpeg'\n            },\n    \n            /**\n             * @property {Object} [compress]\n             * @namespace options\n             * @for Uploader\n             * @description 配置压缩的图片的选项。如果此选项为`false`, 则图片在上传前不进行压缩。\n             *\n             * 默认为：\n             *\n             * ```javascript\n             * {\n             *     width: 1600,\n             *     height: 1600,\n             *\n             *     // 图片质量，只有type为`image/jpeg`的时候才有效。\n             *     quality: 90,\n             *\n             *     // 是否允许放大，如果想要生成小图的时候不失真，此选项应该设置为false.\n             *     allowMagnify: false,\n             *\n             *     // 是否允许裁剪。\n             *     crop: false,\n             *\n             *     // 是否保留头部meta信息。\n             *     preserveHeaders: true,\n             *\n             *     // 如果发现压缩后文件大小比原来还大，则使用原来图片\n             *     // 此属性可能会影响图片自动纠正功能\n             *     noCompressIfLarger: false,\n             *\n             *     // 单位字节，如果图片大小小于此值，不会采用压缩。\n             *     compressSize: 0\n             * }\n             * ```\n             */\n            compress: {\n                width: 1600,\n                height: 1600,\n                quality: 90,\n                allowMagnify: false,\n                crop: false,\n                preserveHeaders: true\n            }\n        });\n    \n        return Uploader.register({\n    \n            name: 'image',\n    \n    \n            /**\n             * 生成缩略图，此过程为异步，所以需要传入`callback`。\n             * 通常情况在图片加入队里后调用此方法来生成预览图以增强交互效果。\n             *\n             * 当 width 或者 height 的值介于 0 - 1 时，被当成百分比使用。\n             *\n             * `callback`中可以接收到两个参数。\n             * * 第一个为error，如果生成缩略图有错误，此error将为真。\n             * * 第二个为ret, 缩略图的Data URL值。\n             *\n             * **注意**\n             * Date URL在IE6/7中不支持，所以不用调用此方法了，直接显示一张暂不支持预览图片好了。\n             * 也可以借助服务端，将 base64 数据传给服务端，生成一个临时文件供预览。\n             *\n             * @method makeThumb\n             * @grammar makeThumb( file, callback ) => undefined\n             * @grammar makeThumb( file, callback, width, height ) => undefined\n             * @for Uploader\n             * @example\n             *\n             * uploader.on( 'fileQueued', function( file ) {\n             *     var $li = ...;\n             *\n             *     uploader.makeThumb( file, function( error, ret ) {\n             *         if ( error ) {\n             *             $li.text('预览错误');\n             *         } else {\n             *             $li.append('<img alt=\"\" src=\"' + ret + '\" />');\n             *         }\n             *     });\n             *\n             * });\n             */\n            makeThumb: function( file, cb, width, height ) {\n                var opts, image;\n    \n                file = this.request( 'get-file', file );\n    \n                // 只预览图片格式。\n                if ( !file.type.match( /^image/ ) ) {\n                    cb( true );\n                    return;\n                }\n    \n                opts = $.extend({}, this.options.thumb );\n    \n                // 如果传入的是object.\n                if ( $.isPlainObject( width ) ) {\n                    opts = $.extend( opts, width );\n                    width = null;\n                }\n    \n                width = width || opts.width;\n                height = height || opts.height;\n    \n                image = new Image( opts );\n    \n                image.once( 'load', function() {\n                    file._info = file._info || image.info();\n                    file._meta = file._meta || image.meta();\n    \n                    // 如果 width 的值介于 0 - 1\n                    // 说明设置的是百分比。\n                    if ( width <= 1 && width > 0 ) {\n                        width = file._info.width * width;\n                    }\n    \n                    // 同样的规则应用于 height\n                    if ( height <= 1 && height > 0 ) {\n                        height = file._info.height * height;\n                    }\n    \n                    image.resize( width, height );\n                });\n    \n                // 当 resize 完后\n                image.once( 'complete', function() {\n                    cb( false, image.getAsDataUrl( opts.type ) );\n                    image.destroy();\n                });\n    \n                image.once( 'error', function( reason ) {\n                    cb( reason || true );\n                    image.destroy();\n                });\n    \n                throttle( image, file.source.size, function() {\n                    file._info && image.info( file._info );\n                    file._meta && image.meta( file._meta );\n                    image.loadFromBlob( file.source );\n                });\n            },\n    \n            beforeSendFile: function( file ) {\n                var opts = this.options.compress || this.options.resize,\n                    compressSize = opts && opts.compressSize || 0,\n                    noCompressIfLarger = opts && opts.noCompressIfLarger || false,\n                    image, deferred;\n    \n                file = this.request( 'get-file', file );\n    \n                // 只压缩 jpeg 图片格式。\n                // gif 可能会丢失针\n                // bmp png 基本上尺寸都不大，且压缩比比较小。\n                if ( !opts || !~'image/jpeg,image/jpg'.indexOf( file.type ) ||\n                        file.size < compressSize ||\n                        file._compressed ) {\n                    return;\n                }\n    \n                opts = $.extend({}, opts );\n                deferred = Base.Deferred();\n    \n                image = new Image( opts );\n    \n                deferred.always(function() {\n                    image.destroy();\n                    image = null;\n                });\n                image.once( 'error', deferred.reject );\n                image.once( 'load', function() {\n                    var width = opts.width,\n                        height = opts.height;\n    \n                    file._info = file._info || image.info();\n                    file._meta = file._meta || image.meta();\n    \n                    // 如果 width 的值介于 0 - 1\n                    // 说明设置的是百分比。\n                    if ( width <= 1 && width > 0 ) {\n                        width = file._info.width * width;\n                    }\n    \n                    // 同样的规则应用于 height\n                    if ( height <= 1 && height > 0 ) {\n                        height = file._info.height * height;\n                    }\n    \n                    image.resize( width, height );\n                });\n    \n                image.once( 'complete', function() {\n                    var blob, size;\n    \n                    // 移动端 UC / qq 浏览器的无图模式下\n                    // ctx.getImageData 处理大图的时候会报 Exception\n                    // INDEX_SIZE_ERR: DOM Exception 1\n                    try {\n                        blob = image.getAsBlob( opts.type );\n    \n                        size = file.size;\n    \n                        // 如果压缩后，比原来还大则不用压缩后的。\n                        if ( !noCompressIfLarger || blob.size < size ) {\n                            // file.source.destroy && file.source.destroy();\n                            file.source = blob;\n                            file.size = blob.size;\n    \n                            file.trigger( 'resize', blob.size, size );\n                        }\n    \n                        // 标记，避免重复压缩。\n                        file._compressed = true;\n                        deferred.resolve();\n                    } catch ( e ) {\n                        // 出错了直接继续，让其上传原始图片\n                        deferred.resolve();\n                    }\n                });\n    \n                file._info && image.info( file._info );\n                file._meta && image.meta( file._meta );\n    \n                image.loadFromBlob( file.source );\n                return deferred.promise();\n            }\n        });\n    });\n    /**\n     * @fileOverview 文件属性封装\n     */\n    define('file',[\n        'base',\n        'mediator'\n    ], function( Base, Mediator ) {\n    \n        var $ = Base.$,\n            idPrefix = 'WU_FILE_',\n            idSuffix = 0,\n            rExt = /\\.([^.]+)$/,\n            statusMap = {};\n    \n        function gid() {\n            return idPrefix + idSuffix++;\n        }\n    \n        /**\n         * 文件类\n         * @class File\n         * @constructor 构造函数\n         * @grammar new File( source ) => File\n         * @param {Lib.File} source [lib.File](#Lib.File)实例, 此source对象是带有Runtime信息的。\n         */\n        function WUFile( source ) {\n    \n            /**\n             * 文件名，包括扩展名（后缀）\n             * @property name\n             * @type {string}\n             */\n            this.name = source.name || 'Untitled';\n    \n            /**\n             * 文件体积（字节）\n             * @property size\n             * @type {uint}\n             * @default 0\n             */\n            this.size = source.size || 0;\n    \n            /**\n             * 文件MIMETYPE类型，与文件类型的对应关系请参考[http://t.cn/z8ZnFny](http://t.cn/z8ZnFny)\n             * @property type\n             * @type {string}\n             * @default 'application/octet-stream'\n             */\n            this.type = source.type || 'application/octet-stream';\n    \n            /**\n             * 文件最后修改日期\n             * @property lastModifiedDate\n             * @type {int}\n             * @default 当前时间戳\n             */\n            this.lastModifiedDate = source.lastModifiedDate || (new Date() * 1);\n    \n            /**\n             * 文件ID，每个对象具有唯一ID，与文件名无关\n             * @property id\n             * @type {string}\n             */\n            this.id = gid();\n    \n            /**\n             * 文件扩展名，通过文件名获取，例如test.png的扩展名为png\n             * @property ext\n             * @type {string}\n             */\n            this.ext = rExt.exec( this.name ) ? RegExp.$1 : '';\n    \n    \n            /**\n             * 状态文字说明。在不同的status语境下有不同的用途。\n             * @property statusText\n             * @type {string}\n             */\n            this.statusText = '';\n    \n            // 存储文件状态，防止通过属性直接修改\n            statusMap[ this.id ] = WUFile.Status.INITED;\n    \n            this.source = source;\n            this.loaded = 0;\n    \n            this.on( 'error', function( msg ) {\n                this.setStatus( WUFile.Status.ERROR, msg );\n            });\n        }\n    \n        $.extend( WUFile.prototype, {\n    \n            /**\n             * 设置状态，状态变化时会触发`change`事件。\n             * @method setStatus\n             * @grammar setStatus( status[, statusText] );\n             * @param {File.Status|String} status [文件状态值](#WebUploader:File:File.Status)\n             * @param {String} [statusText=''] 状态说明，常在error时使用，用http, abort,server等来标记是由于什么原因导致文件错误。\n             */\n            setStatus: function( status, text ) {\n    \n                var prevStatus = statusMap[ this.id ];\n    \n                typeof text !== 'undefined' && (this.statusText = text);\n    \n                if ( status !== prevStatus ) {\n                    statusMap[ this.id ] = status;\n                    /**\n                     * 文件状态变化\n                     * @event statuschange\n                     */\n                    this.trigger( 'statuschange', status, prevStatus );\n                }\n    \n            },\n    \n            /**\n             * 获取文件状态\n             * @return {File.Status}\n             * @example\n                     文件状态具体包括以下几种类型：\n                     {\n                         // 初始化\n                        INITED:     0,\n                        // 已入队列\n                        QUEUED:     1,\n                        // 正在上传\n                        PROGRESS:     2,\n                        // 上传出错\n                        ERROR:         3,\n                        // 上传成功\n                        COMPLETE:     4,\n                        // 上传取消\n                        CANCELLED:     5\n                    }\n             */\n            getStatus: function() {\n                return statusMap[ this.id ];\n            },\n    \n            /**\n             * 获取文件原始信息。\n             * @return {*}\n             */\n            getSource: function() {\n                return this.source;\n            },\n    \n            destroy: function() {\n                this.off();\n                delete statusMap[ this.id ];\n            }\n        });\n    \n        Mediator.installTo( WUFile.prototype );\n    \n        /**\n         * 文件状态值，具体包括以下几种类型：\n         * * `inited` 初始状态\n         * * `queued` 已经进入队列, 等待上传\n         * * `progress` 上传中\n         * * `complete` 上传完成。\n         * * `error` 上传出错，可重试\n         * * `interrupt` 上传中断，可续传。\n         * * `invalid` 文件不合格，不能重试上传。会自动从队列中移除。\n         * * `cancelled` 文件被移除。\n         * @property {Object} Status\n         * @namespace File\n         * @class File\n         * @static\n         */\n        WUFile.Status = {\n            INITED:     'inited',    // 初始状态\n            QUEUED:     'queued',    // 已经进入队列, 等待上传\n            PROGRESS:   'progress',    // 上传中\n            ERROR:      'error',    // 上传出错，可重试\n            COMPLETE:   'complete',    // 上传完成。\n            CANCELLED:  'cancelled',    // 上传取消。\n            INTERRUPT:  'interrupt',    // 上传中断，可续传。\n            INVALID:    'invalid'    // 文件不合格，不能重试上传。\n        };\n    \n        return WUFile;\n    });\n    \n    /**\n     * @fileOverview 文件队列\n     */\n    define('queue',[\n        'base',\n        'mediator',\n        'file'\n    ], function( Base, Mediator, WUFile ) {\n    \n        var $ = Base.$,\n            STATUS = WUFile.Status;\n    \n        /**\n         * 文件队列, 用来存储各个状态中的文件。\n         * @class Queue\n         * @extends Mediator\n         */\n        function Queue() {\n    \n            /**\n             * 统计文件数。\n             * * `numOfQueue` 队列中的文件数。\n             * * `numOfSuccess` 上传成功的文件数\n             * * `numOfCancel` 被取消的文件数\n             * * `numOfProgress` 正在上传中的文件数\n             * * `numOfUploadFailed` 上传错误的文件数。\n             * * `numOfInvalid` 无效的文件数。\n             * * `numofDeleted` 被移除的文件数。\n             * @property {Object} stats\n             */\n            this.stats = {\n                numOfQueue: 0,\n                numOfSuccess: 0,\n                numOfCancel: 0,\n                numOfProgress: 0,\n                numOfUploadFailed: 0,\n                numOfInvalid: 0,\n                numofDeleted: 0,\n                numofInterrupt: 0\n            };\n    \n            // 上传队列，仅包括等待上传的文件\n            this._queue = [];\n    \n            // 存储所有文件\n            this._map = {};\n        }\n    \n        $.extend( Queue.prototype, {\n    \n            /**\n             * 将新文件加入对队列尾部\n             *\n             * @method append\n             * @param  {File} file   文件对象\n             */\n            append: function( file ) {\n                this._queue.push( file );\n                this._fileAdded( file );\n                return this;\n            },\n    \n            /**\n             * 将新文件加入对队列头部\n             *\n             * @method prepend\n             * @param  {File} file   文件对象\n             */\n            prepend: function( file ) {\n                this._queue.unshift( file );\n                this._fileAdded( file );\n                return this;\n            },\n    \n            /**\n             * 获取文件对象\n             *\n             * @method getFile\n             * @param  {String} fileId   文件ID\n             * @return {File}\n             */\n            getFile: function( fileId ) {\n                if ( typeof fileId !== 'string' ) {\n                    return fileId;\n                }\n                return this._map[ fileId ];\n            },\n    \n            /**\n             * 从队列中取出一个指定状态的文件。\n             * @grammar fetch( status ) => File\n             * @method fetch\n             * @param {String} status [文件状态值](#WebUploader:File:File.Status)\n             * @return {File} [File](#WebUploader:File)\n             */\n            fetch: function( status ) {\n                var len = this._queue.length,\n                    i, file;\n    \n                status = status || STATUS.QUEUED;\n    \n                for ( i = 0; i < len; i++ ) {\n                    file = this._queue[ i ];\n    \n                    if ( status === file.getStatus() ) {\n                        return file;\n                    }\n                }\n    \n                return null;\n            },\n    \n            /**\n             * 对队列进行排序，能够控制文件上传顺序。\n             * @grammar sort( fn ) => undefined\n             * @method sort\n             * @param {Function} fn 排序方法\n             */\n            sort: function( fn ) {\n                if ( typeof fn === 'function' ) {\n                    this._queue.sort( fn );\n                }\n            },\n    \n            /**\n             * 获取指定类型的文件列表, 列表中每一个成员为[File](#WebUploader:File)对象。\n             * @grammar getFiles( [status1[, status2 ...]] ) => Array\n             * @method getFiles\n             * @param {String} [status] [文件状态值](#WebUploader:File:File.Status)\n             */\n            getFiles: function() {\n                var sts = [].slice.call( arguments, 0 ),\n                    ret = [],\n                    i = 0,\n                    len = this._queue.length,\n                    file;\n    \n                for ( ; i < len; i++ ) {\n                    file = this._queue[ i ];\n    \n                    if ( sts.length && !~$.inArray( file.getStatus(), sts ) ) {\n                        continue;\n                    }\n    \n                    ret.push( file );\n                }\n    \n                return ret;\n            },\n    \n            /**\n             * 在队列中删除文件。\n             * @grammar removeFile( file ) => Array\n             * @method removeFile\n             * @param {File} 文件对象。\n             */\n            removeFile: function( file ) {\n                var me = this,\n                    existing = this._map[ file.id ];\n    \n                if ( existing ) {\n                    delete this._map[ file.id ];\n                    file.destroy();\n                    this.stats.numofDeleted++;\n                }\n            },\n    \n            _fileAdded: function( file ) {\n                var me = this,\n                    existing = this._map[ file.id ];\n    \n                if ( !existing ) {\n                    this._map[ file.id ] = file;\n    \n                    file.on( 'statuschange', function( cur, pre ) {\n                        me._onFileStatusChange( cur, pre );\n                    });\n                }\n            },\n    \n            _onFileStatusChange: function( curStatus, preStatus ) {\n                var stats = this.stats;\n    \n                switch ( preStatus ) {\n                    case STATUS.PROGRESS:\n                        stats.numOfProgress--;\n                        break;\n    \n                    case STATUS.QUEUED:\n                        stats.numOfQueue --;\n                        break;\n    \n                    case STATUS.ERROR:\n                        stats.numOfUploadFailed--;\n                        break;\n    \n                    case STATUS.INVALID:\n                        stats.numOfInvalid--;\n                        break;\n    \n                    case STATUS.INTERRUPT:\n                        stats.numofInterrupt--;\n                        break;\n                }\n    \n                switch ( curStatus ) {\n                    case STATUS.QUEUED:\n                        stats.numOfQueue++;\n                        break;\n    \n                    case STATUS.PROGRESS:\n                        stats.numOfProgress++;\n                        break;\n    \n                    case STATUS.ERROR:\n                        stats.numOfUploadFailed++;\n                        break;\n    \n                    case STATUS.COMPLETE:\n                        stats.numOfSuccess++;\n                        break;\n    \n                    case STATUS.CANCELLED:\n                        stats.numOfCancel++;\n                        break;\n    \n    \n                    case STATUS.INVALID:\n                        stats.numOfInvalid++;\n                        break;\n    \n                    case STATUS.INTERRUPT:\n                        stats.numofInterrupt++;\n                        break;\n                }\n            }\n    \n        });\n    \n        Mediator.installTo( Queue.prototype );\n    \n        return Queue;\n    });\n    /**\n     * @fileOverview 队列\n     */\n    define('widgets/queue',[\n        'base',\n        'uploader',\n        'queue',\n        'file',\n        'lib/file',\n        'runtime/client',\n        'widgets/widget'\n    ], function( Base, Uploader, Queue, WUFile, File, RuntimeClient ) {\n    \n        var $ = Base.$,\n            rExt = /\\.\\w+$/,\n            Status = WUFile.Status;\n    \n        return Uploader.register({\n            name: 'queue',\n    \n            init: function( opts ) {\n                var me = this,\n                    deferred, len, i, item, arr, accept, runtime;\n    \n                if ( $.isPlainObject( opts.accept ) ) {\n                    opts.accept = [ opts.accept ];\n                }\n    \n                // accept中的中生成匹配正则。\n                if ( opts.accept ) {\n                    arr = [];\n    \n                    for ( i = 0, len = opts.accept.length; i < len; i++ ) {\n                        item = opts.accept[ i ].extensions;\n                        item && arr.push( item );\n                    }\n    \n                    if ( arr.length ) {\n                        accept = '\\\\.' + arr.join(',')\n                                .replace( /,/g, '$|\\\\.' )\n                                .replace( /\\*/g, '.*' ) + '$';\n                    }\n    \n                    me.accept = new RegExp( accept, 'i' );\n                }\n    \n                me.queue = new Queue();\n                me.stats = me.queue.stats;\n    \n                // 如果当前不是html5运行时，那就算了。\n                // 不执行后续操作\n                if ( this.request('predict-runtime-type') !== 'html5' ) {\n                    return;\n                }\n    \n                // 创建一个 html5 运行时的 placeholder\n                // 以至于外部添加原生 File 对象的时候能正确包裹一下供 webuploader 使用。\n                deferred = Base.Deferred();\n                this.placeholder = runtime = new RuntimeClient('Placeholder');\n                runtime.connectRuntime({\n                    runtimeOrder: 'html5'\n                }, function() {\n                    me._ruid = runtime.getRuid();\n                    deferred.resolve();\n                });\n                return deferred.promise();\n            },\n    \n    \n            // 为了支持外部直接添加一个原生File对象。\n            _wrapFile: function( file ) {\n                if ( !(file instanceof WUFile) ) {\n    \n                    if ( !(file instanceof File) ) {\n                        if ( !this._ruid ) {\n                            throw new Error('Can\\'t add external files.');\n                        }\n                        file = new File( this._ruid, file );\n                    }\n    \n                    file = new WUFile( file );\n                }\n    \n                return file;\n            },\n    \n            // 判断文件是否可以被加入队列\n            acceptFile: function( file ) {\n                var invalid = !file || !file.size || this.accept &&\n    \n                        // 如果名字中有后缀，才做后缀白名单处理。\n                        rExt.exec( file.name ) && !this.accept.test( file.name );\n    \n                return !invalid;\n            },\n    \n    \n            /**\n             * @event beforeFileQueued\n             * @param {File} file File对象\n             * @description 当文件被加入队列之前触发，此事件的handler返回值为`false`，则此文件不会被添加进入队列。\n             * @for  Uploader\n             */\n    \n            /**\n             * @event fileQueued\n             * @param {File} file File对象\n             * @description 当文件被加入队列以后触发。\n             * @for  Uploader\n             */\n    \n            _addFile: function( file ) {\n                var me = this;\n    \n                file = me._wrapFile( file );\n    \n                // 不过类型判断允许不允许，先派送 `beforeFileQueued`\n                if ( !me.owner.trigger( 'beforeFileQueued', file ) ) {\n                    return;\n                }\n    \n                // 类型不匹配，则派送错误事件，并返回。\n                if ( !me.acceptFile( file ) ) {\n                    me.owner.trigger( 'error', 'Q_TYPE_DENIED', file );\n                    return;\n                }\n    \n                me.queue.append( file );\n                me.owner.trigger( 'fileQueued', file );\n                return file;\n            },\n    \n            getFile: function( fileId ) {\n                return this.queue.getFile( fileId );\n            },\n    \n            /**\n             * @event filesQueued\n             * @param {File} files 数组，内容为原始File(lib/File）对象。\n             * @description 当一批文件添加进队列以后触发。\n             * @for  Uploader\n             */\n            \n            /**\n             * @property {Boolean} [auto=false]\n             * @namespace options\n             * @for Uploader\n             * @description 设置为 true 后，不需要手动调用上传，有文件选择即开始上传。\n             * \n             */\n    \n            /**\n             * @method addFiles\n             * @grammar addFiles( file ) => undefined\n             * @grammar addFiles( [file1, file2 ...] ) => undefined\n             * @param {Array of File or File} [files] Files 对象 数组\n             * @description 添加文件到队列\n             * @for  Uploader\n             */\n            addFile: function( files ) {\n                var me = this;\n    \n                if ( !files.length ) {\n                    files = [ files ];\n                }\n    \n                files = $.map( files, function( file ) {\n                    return me._addFile( file );\n                });\n    \t\t\t\n    \t\t\tif ( files.length ) {\n    \n                    me.owner.trigger( 'filesQueued', files );\n    \n    \t\t\t\tif ( me.options.auto ) {\n    \t\t\t\t\tsetTimeout(function() {\n    \t\t\t\t\t\tme.request('start-upload');\n    \t\t\t\t\t}, 20 );\n    \t\t\t\t}\n                }\n            },\n    \n            getStats: function() {\n                return this.stats;\n            },\n    \n            /**\n             * @event fileDequeued\n             * @param {File} file File对象\n             * @description 当文件被移除队列后触发。\n             * @for  Uploader\n             */\n    \n             /**\n             * @method removeFile\n             * @grammar removeFile( file ) => undefined\n             * @grammar removeFile( id ) => undefined\n             * @grammar removeFile( file, true ) => undefined\n             * @grammar removeFile( id, true ) => undefined\n             * @param {File|id} file File对象或这File对象的id\n             * @description 移除某一文件, 默认只会标记文件状态为已取消，如果第二个参数为 `true` 则会从 queue 中移除。\n             * @for  Uploader\n             * @example\n             *\n             * $li.on('click', '.remove-this', function() {\n             *     uploader.removeFile( file );\n             * })\n             */\n            removeFile: function( file, remove ) {\n                var me = this;\n    \n                file = file.id ? file : me.queue.getFile( file );\n    \n                this.request( 'cancel-file', file );\n    \n                if ( remove ) {\n                    this.queue.removeFile( file );\n                }\n            },\n    \n            /**\n             * @method getFiles\n             * @grammar getFiles() => Array\n             * @grammar getFiles( status1, status2, status... ) => Array\n             * @description 返回指定状态的文件集合，不传参数将返回所有状态的文件。\n             * @for  Uploader\n             * @example\n             * console.log( uploader.getFiles() );    // => all files\n             * console.log( uploader.getFiles('error') )    // => all error files.\n             */\n            getFiles: function() {\n                return this.queue.getFiles.apply( this.queue, arguments );\n            },\n    \n            fetchFile: function() {\n                return this.queue.fetch.apply( this.queue, arguments );\n            },\n    \n            /**\n             * @method retry\n             * @grammar retry() => undefined\n             * @grammar retry( file ) => undefined\n             * @description 重试上传，重试指定文件，或者从出错的文件开始重新上传。\n             * @for  Uploader\n             * @example\n             * function retry() {\n             *     uploader.retry();\n             * }\n             */\n            retry: function( file, noForceStart ) {\n                var me = this,\n                    files, i, len;\n    \n                if ( file ) {\n                    file = file.id ? file : me.queue.getFile( file );\n                    file.setStatus( Status.QUEUED );\n                    noForceStart || me.request('start-upload');\n                    return;\n                }\n    \n                files = me.queue.getFiles( Status.ERROR );\n                i = 0;\n                len = files.length;\n    \n                for ( ; i < len; i++ ) {\n                    file = files[ i ];\n                    file.setStatus( Status.QUEUED );\n                }\n    \n                me.request('start-upload');\n            },\n    \n            /**\n             * @method sort\n             * @grammar sort( fn ) => undefined\n             * @description 排序队列中的文件，在上传之前调整可以控制上传顺序。\n             * @for  Uploader\n             */\n            sortFiles: function() {\n                return this.queue.sort.apply( this.queue, arguments );\n            },\n    \n            /**\n             * @event reset\n             * @description 当 uploader 被重置的时候触发。\n             * @for  Uploader\n             */\n    \n            /**\n             * @method reset\n             * @grammar reset() => undefined\n             * @description 重置uploader。目前只重置了队列。\n             * @for  Uploader\n             * @example\n             * uploader.reset();\n             */\n            reset: function() {\n                this.owner.trigger('reset');\n                this.queue = new Queue();\n                this.stats = this.queue.stats;\n            },\n    \n            destroy: function() {\n                this.reset();\n                this.placeholder && this.placeholder.destroy();\n            }\n        });\n    \n    });\n    /**\n     * @fileOverview 添加获取Runtime相关信息的方法。\n     */\n    define('widgets/runtime',[\n        'uploader',\n        'runtime/runtime',\n        'widgets/widget'\n    ], function( Uploader, Runtime ) {\n    \n        Uploader.support = function() {\n            return Runtime.hasRuntime.apply( Runtime, arguments );\n        };\n    \n        /**\n         * @property {Object} [runtimeOrder=html5,flash]\n         * @namespace options\n         * @for Uploader\n         * @description 指定运行时启动顺序。默认会想尝试 html5 是否支持，如果支持则使用 html5, 否则则使用 flash.\n         *\n         * 可以将此值设置成 `flash`，来强制使用 flash 运行时。\n         */\n    \n        return Uploader.register({\n            name: 'runtime',\n    \n            init: function() {\n                if ( !this.predictRuntimeType() ) {\n                    throw Error('Runtime Error');\n                }\n            },\n    \n            /**\n             * 预测Uploader将采用哪个`Runtime`\n             * @grammar predictRuntimeType() => String\n             * @method predictRuntimeType\n             * @for  Uploader\n             */\n            predictRuntimeType: function() {\n                var orders = this.options.runtimeOrder || Runtime.orders,\n                    type = this.type,\n                    i, len;\n    \n                if ( !type ) {\n                    orders = orders.split( /\\s*,\\s*/g );\n    \n                    for ( i = 0, len = orders.length; i < len; i++ ) {\n                        if ( Runtime.hasRuntime( orders[ i ] ) ) {\n                            this.type = type = orders[ i ];\n                            break;\n                        }\n                    }\n                }\n    \n                return type;\n            }\n        });\n    });\n    /**\n     * @fileOverview Transport\n     */\n    define('lib/transport',[\n        'base',\n        'runtime/client',\n        'mediator'\n    ], function( Base, RuntimeClient, Mediator ) {\n    \n        var $ = Base.$;\n    \n        function Transport( opts ) {\n            var me = this;\n    \n            opts = me.options = $.extend( true, {}, Transport.options, opts || {} );\n            RuntimeClient.call( this, 'Transport' );\n    \n            this._blob = null;\n            this._formData = opts.formData || {};\n            this._headers = opts.headers || {};\n    \n            this.on( 'progress', this._timeout );\n            this.on( 'load error', function() {\n                me.trigger( 'progress', 1 );\n                clearTimeout( me._timer );\n            });\n        }\n    \n        Transport.options = {\n            server: '',\n            method: 'POST',\n    \n            // 跨域时，是否允许携带cookie, 只有html5 runtime才有效\n            withCredentials: false,\n            fileVal: 'file',\n            timeout: 2 * 60 * 1000,    // 2分钟\n            formData: {},\n            headers: {},\n            sendAsBinary: false\n        };\n    \n        $.extend( Transport.prototype, {\n    \n            // 添加Blob, 只能添加一次，最后一次有效。\n            appendBlob: function( key, blob, filename ) {\n                var me = this,\n                    opts = me.options;\n    \n                if ( me.getRuid() ) {\n                    me.disconnectRuntime();\n                }\n    \n                // 连接到blob归属的同一个runtime.\n                me.connectRuntime( blob.ruid, function() {\n                    me.exec('init');\n                });\n    \n                me._blob = blob;\n                opts.fileVal = key || opts.fileVal;\n                opts.filename = filename || opts.filename;\n            },\n    \n            // 添加其他字段\n            append: function( key, value ) {\n                if ( typeof key === 'object' ) {\n                    $.extend( this._formData, key );\n                } else {\n                    this._formData[ key ] = value;\n                }\n            },\n    \n            setRequestHeader: function( key, value ) {\n                if ( typeof key === 'object' ) {\n                    $.extend( this._headers, key );\n                } else {\n                    this._headers[ key ] = value;\n                }\n            },\n    \n            send: function( method ) {\n                this.exec( 'send', method );\n                this._timeout();\n            },\n    \n            abort: function() {\n                clearTimeout( this._timer );\n                return this.exec('abort');\n            },\n    \n            destroy: function() {\n                this.trigger('destroy');\n                this.off();\n                this.exec('destroy');\n                this.disconnectRuntime();\n            },\n    \n            getResponse: function() {\n                return this.exec('getResponse');\n            },\n    \n            getResponseAsJson: function() {\n                return this.exec('getResponseAsJson');\n            },\n    \n            getStatus: function() {\n                return this.exec('getStatus');\n            },\n    \n            _timeout: function() {\n                var me = this,\n                    duration = me.options.timeout;\n    \n                if ( !duration ) {\n                    return;\n                }\n    \n                clearTimeout( me._timer );\n                me._timer = setTimeout(function() {\n                    me.abort();\n                    me.trigger( 'error', 'timeout' );\n                }, duration );\n            }\n    \n        });\n    \n        // 让Transport具备事件功能。\n        Mediator.installTo( Transport.prototype );\n    \n        return Transport;\n    });\n    /**\n     * @fileOverview 负责文件上传相关。\n     */\n    define('widgets/upload',[\n        'base',\n        'uploader',\n        'file',\n        'lib/transport',\n        'widgets/widget'\n    ], function( Base, Uploader, WUFile, Transport ) {\n    \n        var $ = Base.$,\n            isPromise = Base.isPromise,\n            Status = WUFile.Status;\n    \n        // 添加默认配置项\n        $.extend( Uploader.options, {\n    \n    \n            /**\n             * @property {Boolean} [prepareNextFile=false]\n             * @namespace options\n             * @for Uploader\n             * @description 是否允许在文件传输时提前把下一个文件准备好。\n             * 对于一个文件的准备工作比较耗时，比如图片压缩，md5序列化。\n             * 如果能提前在当前文件传输期处理，可以节省总体耗时。\n             */\n            prepareNextFile: false,\n    \n            /**\n             * @property {Boolean} [chunked=false]\n             * @namespace options\n             * @for Uploader\n             * @description 是否要分片处理大文件上传。\n             */\n            chunked: false,\n    \n            /**\n             * @property {Boolean} [chunkSize=5242880]\n             * @namespace options\n             * @for Uploader\n             * @description 如果要分片，分多大一片？ 默认大小为5M.\n             */\n            chunkSize: 5 * 1024 * 1024,\n    \n            /**\n             * @property {Boolean} [chunkRetry=2]\n             * @namespace options\n             * @for Uploader\n             * @description 如果某个分片由于网络问题出错，允许自动重传多少次？\n             */\n            chunkRetry: 2,\n    \n            /**\n             * @property {Boolean} [threads=3]\n             * @namespace options\n             * @for Uploader\n             * @description 上传并发数。允许同时最大上传进程数。\n             */\n            threads: 3,\n    \n    \n            /**\n             * @property {Object} [formData={}]\n             * @namespace options\n             * @for Uploader\n             * @description 文件上传请求的参数表，每次发送都会发送此对象中的参数。\n             */\n            formData: {}\n    \n            /**\n             * @property {Object} [fileVal='file']\n             * @namespace options\n             * @for Uploader\n             * @description 设置文件上传域的name。\n             */\n    \n            /**\n             * @property {Object} [sendAsBinary=false]\n             * @namespace options\n             * @for Uploader\n             * @description 是否已二进制的流的方式发送文件，这样整个上传内容`php://input`都为文件内容，\n             * 其他参数在$_GET数组中。\n             */\n        });\n    \n        // 负责将文件切片。\n        function CuteFile( file, chunkSize ) {\n            var pending = [],\n                blob = file.source,\n                total = blob.size,\n                chunks = chunkSize ? Math.ceil( total / chunkSize ) : 1,\n                start = 0,\n                index = 0,\n                len, api;\n    \n            api = {\n                file: file,\n    \n                has: function() {\n                    return !!pending.length;\n                },\n    \n                shift: function() {\n                    return pending.shift();\n                },\n    \n                unshift: function( block ) {\n                    pending.unshift( block );\n                }\n            };\n    \n            while ( index < chunks ) {\n                len = Math.min( chunkSize, total - start );\n    \n                pending.push({\n                    file: file,\n                    start: start,\n                    end: chunkSize ? (start + len) : total,\n                    total: total,\n                    chunks: chunks,\n                    chunk: index++,\n                    cuted: api\n                });\n                start += len;\n            }\n    \n            file.blocks = pending.concat();\n            file.remaning = pending.length;\n    \n            return api;\n        }\n    \n        Uploader.register({\n            name: 'upload',\n    \n            init: function() {\n                var owner = this.owner,\n                    me = this;\n    \n                this.runing = false;\n                this.progress = false;\n    \n                owner\n                    .on( 'startUpload', function() {\n                        me.progress = true;\n                    })\n                    .on( 'uploadFinished', function() {\n                        me.progress = false;\n                    });\n    \n                // 记录当前正在传的数据，跟threads相关\n                this.pool = [];\n    \n                // 缓存分好片的文件。\n                this.stack = [];\n    \n                // 缓存即将上传的文件。\n                this.pending = [];\n    \n                // 跟踪还有多少分片在上传中但是没有完成上传。\n                this.remaning = 0;\n                this.__tick = Base.bindFn( this._tick, this );\n    \n                // 销毁上传相关的属性。\n                owner.on( 'uploadComplete', function( file ) {\n    \n                    // 把其他块取消了。\n                    file.blocks && $.each( file.blocks, function( _, v ) {\n                        v.transport && (v.transport.abort(), v.transport.destroy());\n                        delete v.transport;\n                    });\n    \n                    delete file.blocks;\n                    delete file.remaning;\n                });\n            },\n    \n            reset: function() {\n                this.request( 'stop-upload', true );\n                this.runing = false;\n                this.pool = [];\n                this.stack = [];\n                this.pending = [];\n                this.remaning = 0;\n                this._trigged = false;\n                this._promise = null;\n            },\n    \n            /**\n             * @event startUpload\n             * @description 当开始上传流程时触发。\n             * @for  Uploader\n             */\n    \n            /**\n             * 开始上传。此方法可以从初始状态调用开始上传流程，也可以从暂停状态调用，继续上传流程。\n             *\n             * 可以指定开始某一个文件。\n             * @grammar upload() => undefined\n             * @grammar upload( file | fileId) => undefined\n             * @method upload\n             * @for  Uploader\n             */\n            startUpload: function(file) {\n                var me = this;\n    \n                // 移出invalid的文件\n                $.each( me.request( 'get-files', Status.INVALID ), function() {\n                    me.request( 'remove-file', this );\n                });\n    \n                // 如果指定了开始某个文件，则只开始指定的文件。\n                if ( file ) {\n                    file = file.id ? file : me.request( 'get-file', file );\n    \n                    if (file.getStatus() === Status.INTERRUPT) {\n                        file.setStatus( Status.QUEUED );\n    \n                        $.each( me.pool, function( _, v ) {\n    \n                            // 之前暂停过。\n                            if (v.file !== file) {\n                                return;\n                            }\n    \n                            v.transport && v.transport.send();\n                            file.setStatus( Status.PROGRESS );\n                        });\n    \n                        \n                    } else if (file.getStatus() !== Status.PROGRESS) {\n                        file.setStatus( Status.QUEUED );\n                    }\n                } else {\n                    $.each( me.request( 'get-files', [ Status.INITED ] ), function() {\n                        this.setStatus( Status.QUEUED );\n                    });\n                }\n    \n                if ( me.runing ) {\n                    return Base.nextTick( me.__tick );\n                }\n    \n                me.runing = true;\n                var files = [];\n    \n                // 如果有暂停的，则续传\n                file || $.each( me.pool, function( _, v ) {\n                    var file = v.file;\n    \n                    if ( file.getStatus() === Status.INTERRUPT ) {\n                        me._trigged = false;\n                        files.push(file);\n                        v.transport && v.transport.send();\n                    }\n                });\n    \n                $.each(files, function() {\n                    this.setStatus( Status.PROGRESS );\n                });\n    \n                file || $.each( me.request( 'get-files',\n                        Status.INTERRUPT ), function() {\n                    this.setStatus( Status.PROGRESS );\n                });\n    \n                me._trigged = false;\n                Base.nextTick( me.__tick );\n                me.owner.trigger('startUpload');\n            },\n    \n            /**\n             * @event stopUpload\n             * @description 当开始上传流程暂停时触发。\n             * @for  Uploader\n             */\n    \n            /**\n             * 暂停上传。第一个参数为是否中断上传当前正在上传的文件。\n             *\n             * 如果第一个参数是文件，则只暂停指定文件。\n             * @grammar stop() => undefined\n             * @grammar stop( true ) => undefined\n             * @grammar stop( file ) => undefined\n             * @method stop\n             * @for  Uploader\n             */\n            stopUpload: function( file, interrupt ) {\n                var me = this,\n                    block;\n    \n                if (file === true) {\n                    interrupt = file;\n                    file = null;\n                }\n    \n                if ( me.runing === false ) {\n                    return;\n                }\n    \n                // 如果只是暂停某个文件。\n                if ( file ) {\n                    file = file.id ? file : me.request( 'get-file', file );\n    \n                    if ( file.getStatus() !== Status.PROGRESS &&\n                            file.getStatus() !== Status.QUEUED ) {\n                        return;\n                    }\n    \n                    file.setStatus( Status.INTERRUPT );\n    \n    \n                    $.each( me.pool, function( _, v ) {\n    \n                        // 只 abort 指定的文件。\n                        if (v.file === file) {\n                            block = v;\n                            return false;\n                        }\n                    });\n    \n                    block.transport && block.transport.abort();\n    \n                    if (interrupt) {\n                        me._putback(block);\n                        me._popBlock(block);\n                    }\n    \n                    return Base.nextTick( me.__tick );\n                }\n    \n                me.runing = false;\n    \n                // 正在准备中的文件。\n                if (this._promise && this._promise.file) {\n                    this._promise.file.setStatus( Status.INTERRUPT );\n                }\n    \n                interrupt && $.each( me.pool, function( _, v ) {\n                    v.transport && v.transport.abort();\n                    v.file.setStatus( Status.INTERRUPT );\n                });\n    \n                me.owner.trigger('stopUpload');\n            },\n    \n            /**\n             * @method cancelFile\n             * @grammar cancelFile( file ) => undefined\n             * @grammar cancelFile( id ) => undefined\n             * @param {File|id} file File对象或这File对象的id\n             * @description 标记文件状态为已取消, 同时将中断文件传输。\n             * @for  Uploader\n             * @example\n             *\n             * $li.on('click', '.remove-this', function() {\n             *     uploader.cancelFile( file );\n             * })\n             */\n            cancelFile: function( file ) {\n                file = file.id ? file : this.request( 'get-file', file );\n    \n                // 如果正在上传。\n                file.blocks && $.each( file.blocks, function( _, v ) {\n                    var _tr = v.transport;\n    \n                    if ( _tr ) {\n                        _tr.abort();\n                        _tr.destroy();\n                        delete v.transport;\n                    }\n                });\n    \n                file.setStatus( Status.CANCELLED );\n                this.owner.trigger( 'fileDequeued', file );\n            },\n    \n            /**\n             * 判断`Uplaode`r是否正在上传中。\n             * @grammar isInProgress() => Boolean\n             * @method isInProgress\n             * @for  Uploader\n             */\n            isInProgress: function() {\n                return !!this.progress;\n            },\n    \n            _getStats: function() {\n                return this.request('get-stats');\n            },\n    \n            /**\n             * 掉过一个文件上传，直接标记指定文件为已上传状态。\n             * @grammar skipFile( file ) => undefined\n             * @method skipFile\n             * @for  Uploader\n             */\n            skipFile: function( file, status ) {\n                file = file.id ? file : this.request( 'get-file', file );\n    \n                file.setStatus( status || Status.COMPLETE );\n                file.skipped = true;\n    \n                // 如果正在上传。\n                file.blocks && $.each( file.blocks, function( _, v ) {\n                    var _tr = v.transport;\n    \n                    if ( _tr ) {\n                        _tr.abort();\n                        _tr.destroy();\n                        delete v.transport;\n                    }\n                });\n    \n                this.owner.trigger( 'uploadSkip', file );\n            },\n    \n            /**\n             * @event uploadFinished\n             * @description 当所有文件上传结束时触发。\n             * @for  Uploader\n             */\n            _tick: function() {\n                var me = this,\n                    opts = me.options,\n                    fn, val;\n    \n                // 上一个promise还没有结束，则等待完成后再执行。\n                if ( me._promise ) {\n                    return me._promise.always( me.__tick );\n                }\n    \n                // 还有位置，且还有文件要处理的话。\n                if ( me.pool.length < opts.threads && (val = me._nextBlock()) ) {\n                    me._trigged = false;\n    \n                    fn = function( val ) {\n                        me._promise = null;\n    \n                        // 有可能是reject过来的，所以要检测val的类型。\n                        val && val.file && me._startSend( val );\n                        Base.nextTick( me.__tick );\n                    };\n    \n                    me._promise = isPromise( val ) ? val.always( fn ) : fn( val );\n    \n                // 没有要上传的了，且没有正在传输的了。\n                } else if ( !me.remaning && !me._getStats().numOfQueue &&\n                    !me._getStats().numofInterrupt ) {\n                    me.runing = false;\n    \n                    me._trigged || Base.nextTick(function() {\n                        me.owner.trigger('uploadFinished');\n                    });\n                    me._trigged = true;\n                }\n            },\n    \n            _putback: function(block) {\n                var idx;\n    \n                block.cuted.unshift(block);\n                idx = this.stack.indexOf(block.cuted);\n    \n                if (!~idx) {\n                    this.stack.unshift(block.cuted);\n                }\n            },\n    \n            _getStack: function() {\n                var i = 0,\n                    act;\n    \n                while ( (act = this.stack[ i++ ]) ) {\n                    if ( act.has() && act.file.getStatus() === Status.PROGRESS ) {\n                        return act;\n                    } else if (!act.has() ||\n                            act.file.getStatus() !== Status.PROGRESS &&\n                            act.file.getStatus() !== Status.INTERRUPT ) {\n    \n                        // 把已经处理完了的，或者，状态为非 progress（上传中）、\n                        // interupt（暂停中） 的移除。\n                        this.stack.splice( --i, 1 );\n                    }\n                }\n    \n                return null;\n            },\n    \n            _nextBlock: function() {\n                var me = this,\n                    opts = me.options,\n                    act, next, done, preparing;\n    \n                // 如果当前文件还有没有需要传输的，则直接返回剩下的。\n                if ( (act = this._getStack()) ) {\n    \n                    // 是否提前准备下一个文件\n                    if ( opts.prepareNextFile && !me.pending.length ) {\n                        me._prepareNextFile();\n                    }\n    \n                    return act.shift();\n    \n                // 否则，如果正在运行，则准备下一个文件，并等待完成后返回下个分片。\n                } else if ( me.runing ) {\n    \n                    // 如果缓存中有，则直接在缓存中取，没有则去queue中取。\n                    if ( !me.pending.length && me._getStats().numOfQueue ) {\n                        me._prepareNextFile();\n                    }\n    \n                    next = me.pending.shift();\n                    done = function( file ) {\n                        if ( !file ) {\n                            return null;\n                        }\n    \n                        act = CuteFile( file, opts.chunked ? opts.chunkSize : 0 );\n                        me.stack.push(act);\n                        return act.shift();\n                    };\n    \n                    // 文件可能还在prepare中，也有可能已经完全准备好了。\n                    if ( isPromise( next) ) {\n                        preparing = next.file;\n                        next = next[ next.pipe ? 'pipe' : 'then' ]( done );\n                        next.file = preparing;\n                        return next;\n                    }\n    \n                    return done( next );\n                }\n            },\n    \n    \n            /**\n             * @event uploadStart\n             * @param {File} file File对象\n             * @description 某个文件开始上传前触发，一个文件只会触发一次。\n             * @for  Uploader\n             */\n            _prepareNextFile: function() {\n                var me = this,\n                    file = me.request('fetch-file'),\n                    pending = me.pending,\n                    promise;\n    \n                if ( file ) {\n                    promise = me.request( 'before-send-file', file, function() {\n    \n                        // 有可能文件被skip掉了。文件被skip掉后，状态坑定不是Queued.\n                        if ( file.getStatus() === Status.PROGRESS ||\n                            file.getStatus() === Status.INTERRUPT ) {\n                            return file;\n                        }\n    \n                        return me._finishFile( file );\n                    });\n    \n                    me.owner.trigger( 'uploadStart', file );\n                    file.setStatus( Status.PROGRESS );\n    \n                    promise.file = file;\n    \n                    // 如果还在pending中，则替换成文件本身。\n                    promise.done(function() {\n                        var idx = $.inArray( promise, pending );\n    \n                        ~idx && pending.splice( idx, 1, file );\n                    });\n    \n                    // befeore-send-file的钩子就有错误发生。\n                    promise.fail(function( reason ) {\n                        file.setStatus( Status.ERROR, reason );\n                        me.owner.trigger( 'uploadError', file, reason );\n                        me.owner.trigger( 'uploadComplete', file );\n                    });\n    \n                    pending.push( promise );\n                }\n            },\n    \n            // 让出位置了，可以让其他分片开始上传\n            _popBlock: function( block ) {\n                var idx = $.inArray( block, this.pool );\n    \n                this.pool.splice( idx, 1 );\n                block.file.remaning--;\n                this.remaning--;\n            },\n    \n            // 开始上传，可以被掉过。如果promise被reject了，则表示跳过此分片。\n            _startSend: function( block ) {\n                var me = this,\n                    file = block.file,\n                    promise;\n    \n                // 有可能在 before-send-file 的 promise 期间改变了文件状态。\n                // 如：暂停，取消\n                // 我们不能中断 promise, 但是可以在 promise 完后，不做上传操作。\n                if ( file.getStatus() !== Status.PROGRESS ) {\n    \n                    // 如果是中断，则还需要放回去。\n                    if (file.getStatus() === Status.INTERRUPT) {\n                        me._putback(block);\n                    }\n    \n                    return;\n                }\n    \n                me.pool.push( block );\n                me.remaning++;\n    \n                // 如果没有分片，则直接使用原始的。\n                // 不会丢失content-type信息。\n                block.blob = block.chunks === 1 ? file.source :\n                        file.source.slice( block.start, block.end );\n    \n                // hook, 每个分片发送之前可能要做些异步的事情。\n                promise = me.request( 'before-send', block, function() {\n    \n                    // 有可能文件已经上传出错了，所以不需要再传输了。\n                    if ( file.getStatus() === Status.PROGRESS ) {\n                        me._doSend( block );\n                    } else {\n                        me._popBlock( block );\n                        Base.nextTick( me.__tick );\n                    }\n                });\n    \n                // 如果为fail了，则跳过此分片。\n                promise.fail(function() {\n                    if ( file.remaning === 1 ) {\n                        me._finishFile( file ).always(function() {\n                            block.percentage = 1;\n                            me._popBlock( block );\n                            me.owner.trigger( 'uploadComplete', file );\n                            Base.nextTick( me.__tick );\n                        });\n                    } else {\n                        block.percentage = 1;\n                        me.updateFileProgress( file );\n                        me._popBlock( block );\n                        Base.nextTick( me.__tick );\n                    }\n                });\n            },\n    \n    \n            /**\n             * @event uploadBeforeSend\n             * @param {Object} object\n             * @param {Object} data 默认的上传参数，可以扩展此对象来控制上传参数。\n             * @param {Object} headers 可以扩展此对象来控制上传头部。\n             * @description 当某个文件的分块在发送前触发，主要用来询问是否要添加附带参数，大文件在开起分片上传的前提下此事件可能会触发多次。\n             * @for  Uploader\n             */\n    \n            /**\n             * @event uploadAccept\n             * @param {Object} object\n             * @param {Object} ret 服务端的返回数据，json格式，如果服务端不是json格式，从ret._raw中取数据，自行解析。\n             * @description 当某个文件上传到服务端响应后，会派送此事件来询问服务端响应是否有效。如果此事件handler返回值为`false`, 则此文件将派送`server`类型的`uploadError`事件。\n             * @for  Uploader\n             */\n    \n            /**\n             * @event uploadProgress\n             * @param {File} file File对象\n             * @param {Number} percentage 上传进度\n             * @description 上传过程中触发，携带上传进度。\n             * @for  Uploader\n             */\n    \n    \n            /**\n             * @event uploadError\n             * @param {File} file File对象\n             * @param {String} reason 出错的code\n             * @description 当文件上传出错时触发。\n             * @for  Uploader\n             */\n    \n            /**\n             * @event uploadSuccess\n             * @param {File} file File对象\n             * @param {Object} response 服务端返回的数据\n             * @description 当文件上传成功时触发。\n             * @for  Uploader\n             */\n    \n            /**\n             * @event uploadComplete\n             * @param {File} [file] File对象\n             * @description 不管成功或者失败，文件上传完成时触发。\n             * @for  Uploader\n             */\n    \n            // 做上传操作。\n            _doSend: function( block ) {\n                var me = this,\n                    owner = me.owner,\n                    opts = me.options,\n                    file = block.file,\n                    tr = new Transport( opts ),\n                    data = $.extend({}, opts.formData ),\n                    headers = $.extend({}, opts.headers ),\n                    requestAccept, ret;\n    \n                block.transport = tr;\n    \n                tr.on( 'destroy', function() {\n                    delete block.transport;\n                    me._popBlock( block );\n                    Base.nextTick( me.__tick );\n                });\n    \n                // 广播上传进度。以文件为单位。\n                tr.on( 'progress', function( percentage ) {\n                    block.percentage = percentage;\n                    me.updateFileProgress( file );\n                });\n    \n                // 用来询问，是否返回的结果是有错误的。\n                requestAccept = function( reject ) {\n                    var fn;\n    \n                    ret = tr.getResponseAsJson() || {};\n                    ret._raw = tr.getResponse();\n                    fn = function( value ) {\n                        reject = value;\n                    };\n    \n                    // 服务端响应了，不代表成功了，询问是否响应正确。\n                    if ( !owner.trigger( 'uploadAccept', block, ret, fn ) ) {\n                        reject = reject || 'server';\n                    }\n    \n                    return reject;\n                };\n    \n                // 尝试重试，然后广播文件上传出错。\n                tr.on( 'error', function( type, flag ) {\n                    block.retried = block.retried || 0;\n    \n                    // 自动重试\n                    if ( block.chunks > 1 && ~'http,abort'.indexOf( type ) &&\n                            block.retried < opts.chunkRetry ) {\n    \n                        block.retried++;\n                        tr.send();\n    \n                    } else {\n    \n                        // http status 500 ~ 600\n                        if ( !flag && type === 'server' ) {\n                            type = requestAccept( type );\n                        }\n    \n                        file.setStatus( Status.ERROR, type );\n                        owner.trigger( 'uploadError', file, type );\n                        owner.trigger( 'uploadComplete', file );\n                    }\n                });\n    \n                // 上传成功\n                tr.on( 'load', function() {\n                    var reason;\n    \n                    // 如果非预期，转向上传出错。\n                    if ( (reason = requestAccept()) ) {\n                        tr.trigger( 'error', reason, true );\n                        return;\n                    }\n    \n                    // 全部上传完成。\n                    if ( file.remaning === 1 ) {\n                        me._finishFile( file, ret );\n                    } else {\n                        tr.destroy();\n                    }\n                });\n    \n                // 配置默认的上传字段。\n                data = $.extend( data, {\n                    id: file.id,\n                    name: file.name,\n                    type: file.type,\n                    lastModifiedDate: file.lastModifiedDate,\n                    size: file.size\n                });\n    \n                block.chunks > 1 && $.extend( data, {\n                    chunks: block.chunks,\n                    chunk: block.chunk\n                });\n    \n                // 在发送之间可以添加字段什么的。。。\n                // 如果默认的字段不够使用，可以通过监听此事件来扩展\n                owner.trigger( 'uploadBeforeSend', block, data, headers );\n    \n                // 开始发送。\n                tr.appendBlob( opts.fileVal, block.blob, file.name );\n                tr.append( data );\n                tr.setRequestHeader( headers );\n                tr.send();\n            },\n    \n            // 完成上传。\n            _finishFile: function( file, ret, hds ) {\n                var owner = this.owner;\n    \n                return owner\n                        .request( 'after-send-file', arguments, function() {\n                            file.setStatus( Status.COMPLETE );\n                            owner.trigger( 'uploadSuccess', file, ret, hds );\n                        })\n                        .fail(function( reason ) {\n    \n                            // 如果外部已经标记为invalid什么的，不再改状态。\n                            if ( file.getStatus() === Status.PROGRESS ) {\n                                file.setStatus( Status.ERROR, reason );\n                            }\n    \n                            owner.trigger( 'uploadError', file, reason );\n                        })\n                        .always(function() {\n                            owner.trigger( 'uploadComplete', file );\n                        });\n            },\n    \n            updateFileProgress: function(file) {\n                var totalPercent = 0,\n                    uploaded = 0;\n    \n                if (!file.blocks) {\n                    return;\n                }\n    \n                $.each( file.blocks, function( _, v ) {\n                    uploaded += (v.percentage || 0) * (v.end - v.start);\n                });\n    \n                totalPercent = uploaded / file.size;\n                this.owner.trigger( 'uploadProgress', file, totalPercent || 0 );\n            }\n    \n        });\n    });\n    \n    /**\n     * @fileOverview 各种验证，包括文件总大小是否超出、单文件是否超出和文件是否重复。\n     */\n    \n    define('widgets/validator',[\n        'base',\n        'uploader',\n        'file',\n        'widgets/widget'\n    ], function( Base, Uploader, WUFile ) {\n    \n        var $ = Base.$,\n            validators = {},\n            api;\n    \n        /**\n         * @event error\n         * @param {String} type 错误类型。\n         * @description 当validate不通过时，会以派送错误事件的形式通知调用者。通过`upload.on('error', handler)`可以捕获到此类错误，目前有以下错误会在特定的情况下派送错来。\n         *\n         * * `Q_EXCEED_NUM_LIMIT` 在设置了`fileNumLimit`且尝试给`uploader`添加的文件数量超出这个值时派送。\n         * * `Q_EXCEED_SIZE_LIMIT` 在设置了`Q_EXCEED_SIZE_LIMIT`且尝试给`uploader`添加的文件总大小超出这个值时派送。\n         * * `Q_TYPE_DENIED` 当文件类型不满足时触发。。\n         * @for  Uploader\n         */\n    \n        // 暴露给外面的api\n        api = {\n    \n            // 添加验证器\n            addValidator: function( type, cb ) {\n                validators[ type ] = cb;\n            },\n    \n            // 移除验证器\n            removeValidator: function( type ) {\n                delete validators[ type ];\n            }\n        };\n    \n        // 在Uploader初始化的时候启动Validators的初始化\n        Uploader.register({\n            name: 'validator',\n    \n            init: function() {\n                var me = this;\n                Base.nextTick(function() {\n                    $.each( validators, function() {\n                        this.call( me.owner );\n                    });\n                });\n            }\n        });\n    \n        /**\n         * @property {int} [fileNumLimit=undefined]\n         * @namespace options\n         * @for Uploader\n         * @description 验证文件总数量, 超出则不允许加入队列。\n         */\n        api.addValidator( 'fileNumLimit', function() {\n            var uploader = this,\n                opts = uploader.options,\n                count = 0,\n                max = parseInt( opts.fileNumLimit, 10 ),\n                flag = true;\n    \n            if ( !max ) {\n                return;\n            }\n    \n            uploader.on( 'beforeFileQueued', function( file ) {\n    \n                if ( count >= max && flag ) {\n                    flag = false;\n                    this.trigger( 'error', 'Q_EXCEED_NUM_LIMIT', max, file );\n                    setTimeout(function() {\n                        flag = true;\n                    }, 1 );\n                }\n    \n                return count >= max ? false : true;\n            });\n    \n            uploader.on( 'fileQueued', function() {\n                count++;\n            });\n    \n            uploader.on( 'fileDequeued', function() {\n                count--;\n            });\n    \n            uploader.on( 'reset', function() {\n                count = 0;\n            });\n        });\n    \n    \n        /**\n         * @property {int} [fileSizeLimit=undefined]\n         * @namespace options\n         * @for Uploader\n         * @description 验证文件总大小是否超出限制, 超出则不允许加入队列。\n         */\n        api.addValidator( 'fileSizeLimit', function() {\n            var uploader = this,\n                opts = uploader.options,\n                count = 0,\n                max = parseInt( opts.fileSizeLimit, 10 ),\n                flag = true;\n    \n            if ( !max ) {\n                return;\n            }\n    \n            uploader.on( 'beforeFileQueued', function( file ) {\n                var invalid = count + file.size > max;\n    \n                if ( invalid && flag ) {\n                    flag = false;\n                    this.trigger( 'error', 'Q_EXCEED_SIZE_LIMIT', max, file );\n                    setTimeout(function() {\n                        flag = true;\n                    }, 1 );\n                }\n    \n                return invalid ? false : true;\n            });\n    \n            uploader.on( 'fileQueued', function( file ) {\n                count += file.size;\n            });\n    \n            uploader.on( 'fileDequeued', function( file ) {\n                count -= file.size;\n            });\n    \n            uploader.on( 'reset', function() {\n                count = 0;\n            });\n        });\n    \n        /**\n         * @property {int} [fileSingleSizeLimit=undefined]\n         * @namespace options\n         * @for Uploader\n         * @description 验证单个文件大小是否超出限制, 超出则不允许加入队列。\n         */\n        api.addValidator( 'fileSingleSizeLimit', function() {\n            var uploader = this,\n                opts = uploader.options,\n                max = opts.fileSingleSizeLimit;\n    \n            if ( !max ) {\n                return;\n            }\n    \n            uploader.on( 'beforeFileQueued', function( file ) {\n    \n                if ( file.size > max ) {\n                    file.setStatus( WUFile.Status.INVALID, 'exceed_size' );\n                    this.trigger( 'error', 'F_EXCEED_SIZE', max, file );\n                    return false;\n                }\n    \n            });\n    \n        });\n    \n        /**\n         * @property {Boolean} [duplicate=undefined]\n         * @namespace options\n         * @for Uploader\n         * @description 去重， 根据文件名字、文件大小和最后修改时间来生成hash Key.\n         */\n        api.addValidator( 'duplicate', function() {\n            var uploader = this,\n                opts = uploader.options,\n                mapping = {};\n    \n            if ( opts.duplicate ) {\n                return;\n            }\n    \n            function hashString( str ) {\n                var hash = 0,\n                    i = 0,\n                    len = str.length,\n                    _char;\n    \n                for ( ; i < len; i++ ) {\n                    _char = str.charCodeAt( i );\n                    hash = _char + (hash << 6) + (hash << 16) - hash;\n                }\n    \n                return hash;\n            }\n    \n            uploader.on( 'beforeFileQueued', function( file ) {\n                var hash = file.__hash || (file.__hash = hashString( file.name +\n                        file.size + file.lastModifiedDate ));\n    \n                // 已经重复了\n                if ( mapping[ hash ] ) {\n                    this.trigger( 'error', 'F_DUPLICATE', file );\n                    return false;\n                }\n            });\n    \n            uploader.on( 'fileQueued', function( file ) {\n                var hash = file.__hash;\n    \n                hash && (mapping[ hash ] = true);\n            });\n    \n            uploader.on( 'fileDequeued', function( file ) {\n                var hash = file.__hash;\n    \n                hash && (delete mapping[ hash ]);\n            });\n    \n            uploader.on( 'reset', function() {\n                mapping = {};\n            });\n        });\n    \n        return api;\n    });\n    \n    /**\n     * @fileOverview Runtime管理器，负责Runtime的选择, 连接\n     */\n    define('runtime/compbase',[],function() {\n    \n        function CompBase( owner, runtime ) {\n    \n            this.owner = owner;\n            this.options = owner.options;\n    \n            this.getRuntime = function() {\n                return runtime;\n            };\n    \n            this.getRuid = function() {\n                return runtime.uid;\n            };\n    \n            this.trigger = function() {\n                return owner.trigger.apply( owner, arguments );\n            };\n        }\n    \n        return CompBase;\n    });\n    /**\n     * @fileOverview Html5Runtime\n     */\n    define('runtime/html5/runtime',[\n        'base',\n        'runtime/runtime',\n        'runtime/compbase'\n    ], function( Base, Runtime, CompBase ) {\n    \n        var type = 'html5',\n            components = {};\n    \n        function Html5Runtime() {\n            var pool = {},\n                me = this,\n                destroy = this.destroy;\n    \n            Runtime.apply( me, arguments );\n            me.type = type;\n    \n    \n            // 这个方法的调用者，实际上是RuntimeClient\n            me.exec = function( comp, fn/*, args...*/) {\n                var client = this,\n                    uid = client.uid,\n                    args = Base.slice( arguments, 2 ),\n                    instance;\n    \n                if ( components[ comp ] ) {\n                    instance = pool[ uid ] = pool[ uid ] ||\n                            new components[ comp ]( client, me );\n    \n                    if ( instance[ fn ] ) {\n                        return instance[ fn ].apply( instance, args );\n                    }\n                }\n            };\n    \n            me.destroy = function() {\n                // @todo 删除池子中的所有实例\n                return destroy && destroy.apply( this, arguments );\n            };\n        }\n    \n        Base.inherits( Runtime, {\n            constructor: Html5Runtime,\n    \n            // 不需要连接其他程序，直接执行callback\n            init: function() {\n                var me = this;\n                setTimeout(function() {\n                    me.trigger('ready');\n                }, 1 );\n            }\n    \n        });\n    \n        // 注册Components\n        Html5Runtime.register = function( name, component ) {\n            var klass = components[ name ] = Base.inherits( CompBase, component );\n            return klass;\n        };\n    \n        // 注册html5运行时。\n        // 只有在支持的前提下注册。\n        if ( window.Blob && window.FileReader && window.DataView ) {\n            Runtime.addRuntime( type, Html5Runtime );\n        }\n    \n        return Html5Runtime;\n    });\n    /**\n     * @fileOverview Blob Html实现\n     */\n    define('runtime/html5/blob',[\n        'runtime/html5/runtime',\n        'lib/blob'\n    ], function( Html5Runtime, Blob ) {\n    \n        return Html5Runtime.register( 'Blob', {\n            slice: function( start, end ) {\n                var blob = this.owner.source,\n                    slice = blob.slice || blob.webkitSlice || blob.mozSlice;\n    \n                blob = slice.call( blob, start, end );\n    \n                return new Blob( this.getRuid(), blob );\n            }\n        });\n    });\n    /**\n     * @fileOverview FilePaste\n     */\n    define('runtime/html5/dnd',[\n        'base',\n        'runtime/html5/runtime',\n        'lib/file'\n    ], function( Base, Html5Runtime, File ) {\n    \n        var $ = Base.$,\n            prefix = 'webuploader-dnd-';\n    \n        return Html5Runtime.register( 'DragAndDrop', {\n            init: function() {\n                var elem = this.elem = this.options.container;\n    \n                this.dragEnterHandler = Base.bindFn( this._dragEnterHandler, this );\n                this.dragOverHandler = Base.bindFn( this._dragOverHandler, this );\n                this.dragLeaveHandler = Base.bindFn( this._dragLeaveHandler, this );\n                this.dropHandler = Base.bindFn( this._dropHandler, this );\n                this.dndOver = false;\n    \n                elem.on( 'dragenter', this.dragEnterHandler );\n                elem.on( 'dragover', this.dragOverHandler );\n                elem.on( 'dragleave', this.dragLeaveHandler );\n                elem.on( 'drop', this.dropHandler );\n    \n                if ( this.options.disableGlobalDnd ) {\n                    $( document ).on( 'dragover', this.dragOverHandler );\n                    $( document ).on( 'drop', this.dropHandler );\n                }\n            },\n    \n            _dragEnterHandler: function( e ) {\n                var me = this,\n                    denied = me._denied || false,\n                    items;\n    \n                e = e.originalEvent || e;\n    \n                if ( !me.dndOver ) {\n                    me.dndOver = true;\n    \n                    // 注意只有 chrome 支持。\n                    items = e.dataTransfer.items;\n    \n                    if ( items && items.length ) {\n                        me._denied = denied = !me.trigger( 'accept', items );\n                    }\n    \n                    me.elem.addClass( prefix + 'over' );\n                    me.elem[ denied ? 'addClass' :\n                            'removeClass' ]( prefix + 'denied' );\n                }\n    \n                e.dataTransfer.dropEffect = denied ? 'none' : 'copy';\n    \n                return false;\n            },\n    \n            _dragOverHandler: function( e ) {\n                // 只处理框内的。\n                var parentElem = this.elem.parent().get( 0 );\n                if ( parentElem && !$.contains( parentElem, e.currentTarget ) ) {\n                    return false;\n                }\n    \n                clearTimeout( this._leaveTimer );\n                this._dragEnterHandler.call( this, e );\n    \n                return false;\n            },\n    \n            _dragLeaveHandler: function() {\n                var me = this,\n                    handler;\n    \n                handler = function() {\n                    me.dndOver = false;\n                    me.elem.removeClass( prefix + 'over ' + prefix + 'denied' );\n                };\n    \n                clearTimeout( me._leaveTimer );\n                me._leaveTimer = setTimeout( handler, 100 );\n                return false;\n            },\n    \n            _dropHandler: function( e ) {\n                var me = this,\n                    ruid = me.getRuid(),\n                    parentElem = me.elem.parent().get( 0 ),\n                    dataTransfer, data;\n    \n                // 只处理框内的。\n                if ( parentElem && !$.contains( parentElem, e.currentTarget ) ) {\n                    return false;\n                }\n    \n                e = e.originalEvent || e;\n                dataTransfer = e.dataTransfer;\n    \n                // 如果是页面内拖拽，还不能处理，不阻止事件。\n                // 此处 ie11 下会报参数错误，\n                try {\n                    data = dataTransfer.getData('text/html');\n                } catch( err ) {\n                }\n    \n                me.dndOver = false;\n                me.elem.removeClass( prefix + 'over' );\n    \n                if ( data ) {\n                    return;\n                }\n    \n                me._getTansferFiles( dataTransfer, function( results ) {\n                    me.trigger( 'drop', $.map( results, function( file ) {\n                        return new File( ruid, file );\n                    }) );\n                });\n    \n                return false;\n            },\n    \n            // 如果传入 callback 则去查看文件夹，否则只管当前文件夹。\n            _getTansferFiles: function( dataTransfer, callback ) {\n                var results  = [],\n                    promises = [],\n                    items, files, file, item, i, len, canAccessFolder;\n    \n                items = dataTransfer.items;\n                files = dataTransfer.files;\n    \n                canAccessFolder = !!(items && items[ 0 ].webkitGetAsEntry);\n    \n                for ( i = 0, len = files.length; i < len; i++ ) {\n                    file = files[ i ];\n                    item = items && items[ i ];\n    \n                    if ( canAccessFolder && item.webkitGetAsEntry().isDirectory ) {\n    \n                        promises.push( this._traverseDirectoryTree(\n                                item.webkitGetAsEntry(), results ) );\n                    } else {\n                        results.push( file );\n                    }\n                }\n    \n                Base.when.apply( Base, promises ).done(function() {\n    \n                    if ( !results.length ) {\n                        return;\n                    }\n    \n                    callback( results );\n                });\n            },\n    \n            _traverseDirectoryTree: function( entry, results ) {\n                var deferred = Base.Deferred(),\n                    me = this;\n    \n                if ( entry.isFile ) {\n                    entry.file(function( file ) {\n                        results.push( file );\n                        deferred.resolve();\n                    });\n                } else if ( entry.isDirectory ) {\n                    entry.createReader().readEntries(function( entries ) {\n                        var len = entries.length,\n                            promises = [],\n                            arr = [],    // 为了保证顺序。\n                            i;\n    \n                        for ( i = 0; i < len; i++ ) {\n                            promises.push( me._traverseDirectoryTree(\n                                    entries[ i ], arr ) );\n                        }\n    \n                        Base.when.apply( Base, promises ).then(function() {\n                            results.push.apply( results, arr );\n                            deferred.resolve();\n                        }, deferred.reject );\n                    });\n                }\n    \n                return deferred.promise();\n            },\n    \n            destroy: function() {\n                var elem = this.elem;\n    \n                // 还没 init 就调用 destroy\n                if (!elem) {\n                    return;\n                }\n    \n                elem.off( 'dragenter', this.dragEnterHandler );\n                elem.off( 'dragover', this.dragOverHandler );\n                elem.off( 'dragleave', this.dragLeaveHandler );\n                elem.off( 'drop', this.dropHandler );\n    \n                if ( this.options.disableGlobalDnd ) {\n                    $( document ).off( 'dragover', this.dragOverHandler );\n                    $( document ).off( 'drop', this.dropHandler );\n                }\n            }\n        });\n    });\n    \n    /**\n     * @fileOverview FilePaste\n     */\n    define('runtime/html5/filepaste',[\n        'base',\n        'runtime/html5/runtime',\n        'lib/file'\n    ], function( Base, Html5Runtime, File ) {\n    \n        return Html5Runtime.register( 'FilePaste', {\n            init: function() {\n                var opts = this.options,\n                    elem = this.elem = opts.container,\n                    accept = '.*',\n                    arr, i, len, item;\n    \n                // accetp的mimeTypes中生成匹配正则。\n                if ( opts.accept ) {\n                    arr = [];\n    \n                    for ( i = 0, len = opts.accept.length; i < len; i++ ) {\n                        item = opts.accept[ i ].mimeTypes;\n                        item && arr.push( item );\n                    }\n    \n                    if ( arr.length ) {\n                        accept = arr.join(',');\n                        accept = accept.replace( /,/g, '|' ).replace( /\\*/g, '.*' );\n                    }\n                }\n                this.accept = accept = new RegExp( accept, 'i' );\n                this.hander = Base.bindFn( this._pasteHander, this );\n                elem.on( 'paste', this.hander );\n            },\n    \n            _pasteHander: function( e ) {\n                var allowed = [],\n                    ruid = this.getRuid(),\n                    items, item, blob, i, len;\n    \n                e = e.originalEvent || e;\n                items = e.clipboardData.items;\n    \n                for ( i = 0, len = items.length; i < len; i++ ) {\n                    item = items[ i ];\n    \n                    if ( item.kind !== 'file' || !(blob = item.getAsFile()) ) {\n                        continue;\n                    }\n    \n                    allowed.push( new File( ruid, blob ) );\n                }\n    \n                if ( allowed.length ) {\n                    // 不阻止非文件粘贴（文字粘贴）的事件冒泡\n                    e.preventDefault();\n                    e.stopPropagation();\n                    this.trigger( 'paste', allowed );\n                }\n            },\n    \n            destroy: function() {\n                this.elem.off( 'paste', this.hander );\n            }\n        });\n    });\n    \n    /**\n     * @fileOverview FilePicker\n     */\n    define('runtime/html5/filepicker',[\n        'base',\n        'runtime/html5/runtime'\n    ], function( Base, Html5Runtime ) {\n    \n        var $ = Base.$;\n    \n        return Html5Runtime.register( 'FilePicker', {\n            init: function() {\n                var container = this.getRuntime().getContainer(),\n                    me = this,\n                    owner = me.owner,\n                    opts = me.options,\n                    label = this.label = $( document.createElement('label') ),\n                    input =  this.input = $( document.createElement('input') ),\n                    arr, i, len, mouseHandler;\n    \n                input.attr( 'type', 'file' );\n                input.attr( 'capture', 'camera');\n                input.attr( 'name', opts.name );\n                input.addClass('webuploader-element-invisible');\n    \n                label.on( 'click', function(e) {\n                    input.trigger('click');\n                    e.stopPropagation();\n                    owner.trigger('dialogopen');\n                });\n    \n                label.css({\n                    opacity: 0,\n                    width: '100%',\n                    height: '100%',\n                    display: 'block',\n                    cursor: 'pointer',\n                    background: '#ffffff'\n                });\n    \n                if ( opts.multiple ) {\n                    input.attr( 'multiple', 'multiple' );\n                }\n    \n                // @todo Firefox不支持单独指定后缀\n                if ( opts.accept && opts.accept.length > 0 ) {\n                    arr = [];\n    \n                    for ( i = 0, len = opts.accept.length; i < len; i++ ) {\n                        arr.push( opts.accept[ i ].mimeTypes );\n                    }\n    \n                    input.attr( 'accept', arr.join(',') );\n                }\n    \n                container.append( input );\n                container.append( label );\n    \n                mouseHandler = function( e ) {\n                    owner.trigger( e.type );\n                };\n    \n                input.on( 'change', function( e ) {\n                    var fn = arguments.callee,\n                        clone;\n    \n                    me.files = e.target.files;\n    \n                    // reset input\n                    clone = this.cloneNode( true );\n                    clone.value = null;\n                    this.parentNode.replaceChild( clone, this );\n    \n                    input.off();\n                    input = $( clone ).on( 'change', fn )\n                            .on( 'mouseenter mouseleave', mouseHandler );\n    \n                    owner.trigger('change');\n                });\n    \n                label.on( 'mouseenter mouseleave', mouseHandler );\n    \n            },\n    \n    \n            getFiles: function() {\n                return this.files;\n            },\n    \n            destroy: function() {\n                this.input.off();\n                this.label.off();\n            }\n        });\n    });\n    \n    /**\n     * Terms:\n     *\n     * Uint8Array, FileReader, BlobBuilder, atob, ArrayBuffer\n     * @fileOverview Image控件\n     */\n    define('runtime/html5/util',[\n        'base'\n    ], function( Base ) {\n    \n        var urlAPI = window.createObjectURL && window ||\n                window.URL && URL.revokeObjectURL && URL ||\n                window.webkitURL,\n            createObjectURL = Base.noop,\n            revokeObjectURL = createObjectURL;\n    \n        if ( urlAPI ) {\n    \n            // 更安全的方式调用，比如android里面就能把context改成其他的对象。\n            createObjectURL = function() {\n                return urlAPI.createObjectURL.apply( urlAPI, arguments );\n            };\n    \n            revokeObjectURL = function() {\n                return urlAPI.revokeObjectURL.apply( urlAPI, arguments );\n            };\n        }\n    \n        return {\n            createObjectURL: createObjectURL,\n            revokeObjectURL: revokeObjectURL,\n    \n            dataURL2Blob: function( dataURI ) {\n                var byteStr, intArray, ab, i, mimetype, parts;\n    \n                parts = dataURI.split(',');\n    \n                if ( ~parts[ 0 ].indexOf('base64') ) {\n                    byteStr = atob( parts[ 1 ] );\n                } else {\n                    byteStr = decodeURIComponent( parts[ 1 ] );\n                }\n    \n                ab = new ArrayBuffer( byteStr.length );\n                intArray = new Uint8Array( ab );\n    \n                for ( i = 0; i < byteStr.length; i++ ) {\n                    intArray[ i ] = byteStr.charCodeAt( i );\n                }\n    \n                mimetype = parts[ 0 ].split(':')[ 1 ].split(';')[ 0 ];\n    \n                return this.arrayBufferToBlob( ab, mimetype );\n            },\n    \n            dataURL2ArrayBuffer: function( dataURI ) {\n                var byteStr, intArray, i, parts;\n    \n                parts = dataURI.split(',');\n    \n                if ( ~parts[ 0 ].indexOf('base64') ) {\n                    byteStr = atob( parts[ 1 ] );\n                } else {\n                    byteStr = decodeURIComponent( parts[ 1 ] );\n                }\n    \n                intArray = new Uint8Array( byteStr.length );\n    \n                for ( i = 0; i < byteStr.length; i++ ) {\n                    intArray[ i ] = byteStr.charCodeAt( i );\n                }\n    \n                return intArray.buffer;\n            },\n    \n            arrayBufferToBlob: function( buffer, type ) {\n                var builder = window.BlobBuilder || window.WebKitBlobBuilder,\n                    bb;\n    \n                // android不支持直接new Blob, 只能借助blobbuilder.\n                if ( builder ) {\n                    bb = new builder();\n                    bb.append( buffer );\n                    return bb.getBlob( type );\n                }\n    \n                return new Blob([ buffer ], type ? { type: type } : {} );\n            },\n    \n            // 抽出来主要是为了解决android下面canvas.toDataUrl不支持jpeg.\n            // 你得到的结果是png.\n            canvasToDataUrl: function( canvas, type, quality ) {\n                return canvas.toDataURL( type, quality / 100 );\n            },\n    \n            // imagemeat会复写这个方法，如果用户选择加载那个文件了的话。\n            parseMeta: function( blob, callback ) {\n                callback( false, {});\n            },\n    \n            // imagemeat会复写这个方法，如果用户选择加载那个文件了的话。\n            updateImageHead: function( data ) {\n                return data;\n            }\n        };\n    });\n    /**\n     * Terms:\n     *\n     * Uint8Array, FileReader, BlobBuilder, atob, ArrayBuffer\n     * @fileOverview Image控件\n     */\n    define('runtime/html5/imagemeta',[\n        'runtime/html5/util'\n    ], function( Util ) {\n    \n        var api;\n    \n        api = {\n            parsers: {\n                0xffe1: []\n            },\n    \n            maxMetaDataSize: 262144,\n    \n            parse: function( blob, cb ) {\n                var me = this,\n                    fr = new FileReader();\n    \n                fr.onload = function() {\n                    cb( false, me._parse( this.result ) );\n                    fr = fr.onload = fr.onerror = null;\n                };\n    \n                fr.onerror = function( e ) {\n                    cb( e.message );\n                    fr = fr.onload = fr.onerror = null;\n                };\n    \n                blob = blob.slice( 0, me.maxMetaDataSize );\n                fr.readAsArrayBuffer( blob.getSource() );\n            },\n    \n            _parse: function( buffer, noParse ) {\n                if ( buffer.byteLength < 6 ) {\n                    return;\n                }\n    \n                var dataview = new DataView( buffer ),\n                    offset = 2,\n                    maxOffset = dataview.byteLength - 4,\n                    headLength = offset,\n                    ret = {},\n                    markerBytes, markerLength, parsers, i;\n    \n                if ( dataview.getUint16( 0 ) === 0xffd8 ) {\n    \n                    while ( offset < maxOffset ) {\n                        markerBytes = dataview.getUint16( offset );\n    \n                        if ( markerBytes >= 0xffe0 && markerBytes <= 0xffef ||\n                                markerBytes === 0xfffe ) {\n    \n                            markerLength = dataview.getUint16( offset + 2 ) + 2;\n    \n                            if ( offset + markerLength > dataview.byteLength ) {\n                                break;\n                            }\n    \n                            parsers = api.parsers[ markerBytes ];\n    \n                            if ( !noParse && parsers ) {\n                                for ( i = 0; i < parsers.length; i += 1 ) {\n                                    parsers[ i ].call( api, dataview, offset,\n                                            markerLength, ret );\n                                }\n                            }\n    \n                            offset += markerLength;\n                            headLength = offset;\n                        } else {\n                            break;\n                        }\n                    }\n    \n                    if ( headLength > 6 ) {\n                        if ( buffer.slice ) {\n                            ret.imageHead = buffer.slice( 2, headLength );\n                        } else {\n                            // Workaround for IE10, which does not yet\n                            // support ArrayBuffer.slice:\n                            ret.imageHead = new Uint8Array( buffer )\n                                    .subarray( 2, headLength );\n                        }\n                    }\n                }\n    \n                return ret;\n            },\n    \n            updateImageHead: function( buffer, head ) {\n                var data = this._parse( buffer, true ),\n                    buf1, buf2, bodyoffset;\n    \n    \n                bodyoffset = 2;\n                if ( data.imageHead ) {\n                    bodyoffset = 2 + data.imageHead.byteLength;\n                }\n    \n                if ( buffer.slice ) {\n                    buf2 = buffer.slice( bodyoffset );\n                } else {\n                    buf2 = new Uint8Array( buffer ).subarray( bodyoffset );\n                }\n    \n                buf1 = new Uint8Array( head.byteLength + 2 + buf2.byteLength );\n    \n                buf1[ 0 ] = 0xFF;\n                buf1[ 1 ] = 0xD8;\n                buf1.set( new Uint8Array( head ), 2 );\n                buf1.set( new Uint8Array( buf2 ), head.byteLength + 2 );\n    \n                return buf1.buffer;\n            }\n        };\n    \n        Util.parseMeta = function() {\n            return api.parse.apply( api, arguments );\n        };\n    \n        Util.updateImageHead = function() {\n            return api.updateImageHead.apply( api, arguments );\n        };\n    \n        return api;\n    });\n    /**\n     * 代码来自于：https://github.com/blueimp/JavaScript-Load-Image\n     * 暂时项目中只用了orientation.\n     *\n     * 去除了 Exif Sub IFD Pointer, GPS Info IFD Pointer, Exif Thumbnail.\n     * @fileOverview EXIF解析\n     */\n    \n    // Sample\n    // ====================================\n    // Make : Apple\n    // Model : iPhone 4S\n    // Orientation : 1\n    // XResolution : 72 [72/1]\n    // YResolution : 72 [72/1]\n    // ResolutionUnit : 2\n    // Software : QuickTime 7.7.1\n    // DateTime : 2013:09:01 22:53:55\n    // ExifIFDPointer : 190\n    // ExposureTime : 0.058823529411764705 [1/17]\n    // FNumber : 2.4 [12/5]\n    // ExposureProgram : Normal program\n    // ISOSpeedRatings : 800\n    // ExifVersion : 0220\n    // DateTimeOriginal : 2013:09:01 22:52:51\n    // DateTimeDigitized : 2013:09:01 22:52:51\n    // ComponentsConfiguration : YCbCr\n    // ShutterSpeedValue : 4.058893515764426\n    // ApertureValue : 2.5260688216892597 [4845/1918]\n    // BrightnessValue : -0.3126686601998395\n    // MeteringMode : Pattern\n    // Flash : Flash did not fire, compulsory flash mode\n    // FocalLength : 4.28 [107/25]\n    // SubjectArea : [4 values]\n    // FlashpixVersion : 0100\n    // ColorSpace : 1\n    // PixelXDimension : 2448\n    // PixelYDimension : 3264\n    // SensingMethod : One-chip color area sensor\n    // ExposureMode : 0\n    // WhiteBalance : Auto white balance\n    // FocalLengthIn35mmFilm : 35\n    // SceneCaptureType : Standard\n    define('runtime/html5/imagemeta/exif',[\n        'base',\n        'runtime/html5/imagemeta'\n    ], function( Base, ImageMeta ) {\n    \n        var EXIF = {};\n    \n        EXIF.ExifMap = function() {\n            return this;\n        };\n    \n        EXIF.ExifMap.prototype.map = {\n            'Orientation': 0x0112\n        };\n    \n        EXIF.ExifMap.prototype.get = function( id ) {\n            return this[ id ] || this[ this.map[ id ] ];\n        };\n    \n        EXIF.exifTagTypes = {\n            // byte, 8-bit unsigned int:\n            1: {\n                getValue: function( dataView, dataOffset ) {\n                    return dataView.getUint8( dataOffset );\n                },\n                size: 1\n            },\n    \n            // ascii, 8-bit byte:\n            2: {\n                getValue: function( dataView, dataOffset ) {\n                    return String.fromCharCode( dataView.getUint8( dataOffset ) );\n                },\n                size: 1,\n                ascii: true\n            },\n    \n            // short, 16 bit int:\n            3: {\n                getValue: function( dataView, dataOffset, littleEndian ) {\n                    return dataView.getUint16( dataOffset, littleEndian );\n                },\n                size: 2\n            },\n    \n            // long, 32 bit int:\n            4: {\n                getValue: function( dataView, dataOffset, littleEndian ) {\n                    return dataView.getUint32( dataOffset, littleEndian );\n                },\n                size: 4\n            },\n    \n            // rational = two long values,\n            // first is numerator, second is denominator:\n            5: {\n                getValue: function( dataView, dataOffset, littleEndian ) {\n                    return dataView.getUint32( dataOffset, littleEndian ) /\n                        dataView.getUint32( dataOffset + 4, littleEndian );\n                },\n                size: 8\n            },\n    \n            // slong, 32 bit signed int:\n            9: {\n                getValue: function( dataView, dataOffset, littleEndian ) {\n                    return dataView.getInt32( dataOffset, littleEndian );\n                },\n                size: 4\n            },\n    \n            // srational, two slongs, first is numerator, second is denominator:\n            10: {\n                getValue: function( dataView, dataOffset, littleEndian ) {\n                    return dataView.getInt32( dataOffset, littleEndian ) /\n                        dataView.getInt32( dataOffset + 4, littleEndian );\n                },\n                size: 8\n            }\n        };\n    \n        // undefined, 8-bit byte, value depending on field:\n        EXIF.exifTagTypes[ 7 ] = EXIF.exifTagTypes[ 1 ];\n    \n        EXIF.getExifValue = function( dataView, tiffOffset, offset, type, length,\n                littleEndian ) {\n    \n            var tagType = EXIF.exifTagTypes[ type ],\n                tagSize, dataOffset, values, i, str, c;\n    \n            if ( !tagType ) {\n                Base.log('Invalid Exif data: Invalid tag type.');\n                return;\n            }\n    \n            tagSize = tagType.size * length;\n    \n            // Determine if the value is contained in the dataOffset bytes,\n            // or if the value at the dataOffset is a pointer to the actual data:\n            dataOffset = tagSize > 4 ? tiffOffset + dataView.getUint32( offset + 8,\n                    littleEndian ) : (offset + 8);\n    \n            if ( dataOffset + tagSize > dataView.byteLength ) {\n                Base.log('Invalid Exif data: Invalid data offset.');\n                return;\n            }\n    \n            if ( length === 1 ) {\n                return tagType.getValue( dataView, dataOffset, littleEndian );\n            }\n    \n            values = [];\n    \n            for ( i = 0; i < length; i += 1 ) {\n                values[ i ] = tagType.getValue( dataView,\n                        dataOffset + i * tagType.size, littleEndian );\n            }\n    \n            if ( tagType.ascii ) {\n                str = '';\n    \n                // Concatenate the chars:\n                for ( i = 0; i < values.length; i += 1 ) {\n                    c = values[ i ];\n    \n                    // Ignore the terminating NULL byte(s):\n                    if ( c === '\\u0000' ) {\n                        break;\n                    }\n                    str += c;\n                }\n    \n                return str;\n            }\n            return values;\n        };\n    \n        EXIF.parseExifTag = function( dataView, tiffOffset, offset, littleEndian,\n                data ) {\n    \n            var tag = dataView.getUint16( offset, littleEndian );\n            data.exif[ tag ] = EXIF.getExifValue( dataView, tiffOffset, offset,\n                    dataView.getUint16( offset + 2, littleEndian ),    // tag type\n                    dataView.getUint32( offset + 4, littleEndian ),    // tag length\n                    littleEndian );\n        };\n    \n        EXIF.parseExifTags = function( dataView, tiffOffset, dirOffset,\n                littleEndian, data ) {\n    \n            var tagsNumber, dirEndOffset, i;\n    \n            if ( dirOffset + 6 > dataView.byteLength ) {\n                Base.log('Invalid Exif data: Invalid directory offset.');\n                return;\n            }\n    \n            tagsNumber = dataView.getUint16( dirOffset, littleEndian );\n            dirEndOffset = dirOffset + 2 + 12 * tagsNumber;\n    \n            if ( dirEndOffset + 4 > dataView.byteLength ) {\n                Base.log('Invalid Exif data: Invalid directory size.');\n                return;\n            }\n    \n            for ( i = 0; i < tagsNumber; i += 1 ) {\n                this.parseExifTag( dataView, tiffOffset,\n                        dirOffset + 2 + 12 * i,    // tag offset\n                        littleEndian, data );\n            }\n    \n            // Return the offset to the next directory:\n            return dataView.getUint32( dirEndOffset, littleEndian );\n        };\n    \n        // EXIF.getExifThumbnail = function(dataView, offset, length) {\n        //     var hexData,\n        //         i,\n        //         b;\n        //     if (!length || offset + length > dataView.byteLength) {\n        //         Base.log('Invalid Exif data: Invalid thumbnail data.');\n        //         return;\n        //     }\n        //     hexData = [];\n        //     for (i = 0; i < length; i += 1) {\n        //         b = dataView.getUint8(offset + i);\n        //         hexData.push((b < 16 ? '0' : '') + b.toString(16));\n        //     }\n        //     return 'data:image/jpeg,%' + hexData.join('%');\n        // };\n    \n        EXIF.parseExifData = function( dataView, offset, length, data ) {\n    \n            var tiffOffset = offset + 10,\n                littleEndian, dirOffset;\n    \n            // Check for the ASCII code for \"Exif\" (0x45786966):\n            if ( dataView.getUint32( offset + 4 ) !== 0x45786966 ) {\n                // No Exif data, might be XMP data instead\n                return;\n            }\n            if ( tiffOffset + 8 > dataView.byteLength ) {\n                Base.log('Invalid Exif data: Invalid segment size.');\n                return;\n            }\n    \n            // Check for the two null bytes:\n            if ( dataView.getUint16( offset + 8 ) !== 0x0000 ) {\n                Base.log('Invalid Exif data: Missing byte alignment offset.');\n                return;\n            }\n    \n            // Check the byte alignment:\n            switch ( dataView.getUint16( tiffOffset ) ) {\n                case 0x4949:\n                    littleEndian = true;\n                    break;\n    \n                case 0x4D4D:\n                    littleEndian = false;\n                    break;\n    \n                default:\n                    Base.log('Invalid Exif data: Invalid byte alignment marker.');\n                    return;\n            }\n    \n            // Check for the TIFF tag marker (0x002A):\n            if ( dataView.getUint16( tiffOffset + 2, littleEndian ) !== 0x002A ) {\n                Base.log('Invalid Exif data: Missing TIFF marker.');\n                return;\n            }\n    \n            // Retrieve the directory offset bytes, usually 0x00000008 or 8 decimal:\n            dirOffset = dataView.getUint32( tiffOffset + 4, littleEndian );\n            // Create the exif object to store the tags:\n            data.exif = new EXIF.ExifMap();\n            // Parse the tags of the main image directory and retrieve the\n            // offset to the next directory, usually the thumbnail directory:\n            dirOffset = EXIF.parseExifTags( dataView, tiffOffset,\n                    tiffOffset + dirOffset, littleEndian, data );\n    \n            // 尝试读取缩略图\n            // if ( dirOffset ) {\n            //     thumbnailData = {exif: {}};\n            //     dirOffset = EXIF.parseExifTags(\n            //         dataView,\n            //         tiffOffset,\n            //         tiffOffset + dirOffset,\n            //         littleEndian,\n            //         thumbnailData\n            //     );\n    \n            //     // Check for JPEG Thumbnail offset:\n            //     if (thumbnailData.exif[0x0201]) {\n            //         data.exif.Thumbnail = EXIF.getExifThumbnail(\n            //             dataView,\n            //             tiffOffset + thumbnailData.exif[0x0201],\n            //             thumbnailData.exif[0x0202] // Thumbnail data length\n            //         );\n            //     }\n            // }\n        };\n    \n        ImageMeta.parsers[ 0xffe1 ].push( EXIF.parseExifData );\n        return EXIF;\n    });\n    /**\n     * @fileOverview Image\n     */\n    define('runtime/html5/image',[\n        'base',\n        'runtime/html5/runtime',\n        'runtime/html5/util'\n    ], function( Base, Html5Runtime, Util ) {\n    \n        var BLANK = 'data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs%3D';\n    \n        return Html5Runtime.register( 'Image', {\n    \n            // flag: 标记是否被修改过。\n            modified: false,\n    \n            init: function() {\n                var me = this,\n                    img = new Image();\n    \n                img.onload = function() {\n    \n                    me._info = {\n                        type: me.type,\n                        width: this.width,\n                        height: this.height\n                    };\n    \n                    //debugger;\n    \n                    // 读取meta信息。\n                    if ( !me._metas && 'image/jpeg' === me.type ) {\n                        Util.parseMeta( me._blob, function( error, ret ) {\n                            me._metas = ret;\n                            me.owner.trigger('load');\n                        });\n                    } else {\n                        me.owner.trigger('load');\n                    }\n                };\n    \n                img.onerror = function() {\n                    me.owner.trigger('error');\n                };\n    \n                me._img = img;\n            },\n    \n            loadFromBlob: function( blob ) {\n                var me = this,\n                    img = me._img;\n    \n                me._blob = blob;\n                me.type = blob.type;\n                img.src = Util.createObjectURL( blob.getSource() );\n                me.owner.once( 'load', function() {\n                    Util.revokeObjectURL( img.src );\n                });\n            },\n    \n            resize: function( width, height ) {\n                var canvas = this._canvas ||\n                        (this._canvas = document.createElement('canvas'));\n    \n                this._resize( this._img, canvas, width, height );\n                this._blob = null;    // 没用了，可以删掉了。\n                this.modified = true;\n                this.owner.trigger( 'complete', 'resize' );\n            },\n    \n            crop: function( x, y, w, h, s ) {\n                var cvs = this._canvas ||\n                        (this._canvas = document.createElement('canvas')),\n                    opts = this.options,\n                    img = this._img,\n                    iw = img.naturalWidth,\n                    ih = img.naturalHeight,\n                    orientation = this.getOrientation();\n    \n                s = s || 1;\n    \n                // todo 解决 orientation 的问题。\n                // values that require 90 degree rotation\n                // if ( ~[ 5, 6, 7, 8 ].indexOf( orientation ) ) {\n    \n                //     switch ( orientation ) {\n                //         case 6:\n                //             tmp = x;\n                //             x = y;\n                //             y = iw * s - tmp - w;\n                //             console.log(ih * s, tmp, w)\n                //             break;\n                //     }\n    \n                //     (w ^= h, h ^= w, w ^= h);\n                // }\n    \n                cvs.width = w;\n                cvs.height = h;\n    \n                opts.preserveHeaders || this._rotate2Orientaion( cvs, orientation );\n                this._renderImageToCanvas( cvs, img, -x, -y, iw * s, ih * s );\n    \n                this._blob = null;    // 没用了，可以删掉了。\n                this.modified = true;\n                this.owner.trigger( 'complete', 'crop' );\n            },\n    \n            getAsBlob: function( type ) {\n                var blob = this._blob,\n                    opts = this.options,\n                    canvas;\n    \n                type = type || this.type;\n    \n                // blob需要重新生成。\n                if ( this.modified || this.type !== type ) {\n                    canvas = this._canvas;\n    \n                    if ( type === 'image/jpeg' ) {\n    \n                        blob = Util.canvasToDataUrl( canvas, type, opts.quality );\n    \n                        if ( opts.preserveHeaders && this._metas &&\n                                this._metas.imageHead ) {\n    \n                            blob = Util.dataURL2ArrayBuffer( blob );\n                            blob = Util.updateImageHead( blob,\n                                    this._metas.imageHead );\n                            blob = Util.arrayBufferToBlob( blob, type );\n                            return blob;\n                        }\n                    } else {\n                        blob = Util.canvasToDataUrl( canvas, type );\n                    }\n    \n                    blob = Util.dataURL2Blob( blob );\n                }\n    \n                return blob;\n            },\n    \n            getAsDataUrl: function( type ) {\n                var opts = this.options;\n    \n                type = type || this.type;\n    \n                if ( type === 'image/jpeg' ) {\n                    return Util.canvasToDataUrl( this._canvas, type, opts.quality );\n                } else {\n                    return this._canvas.toDataURL( type );\n                }\n            },\n    \n            getOrientation: function() {\n                return this._metas && this._metas.exif &&\n                        this._metas.exif.get('Orientation') || 1;\n            },\n    \n            info: function( val ) {\n    \n                // setter\n                if ( val ) {\n                    this._info = val;\n                    return this;\n                }\n    \n                // getter\n                return this._info;\n            },\n    \n            meta: function( val ) {\n    \n                // setter\n                if ( val ) {\n                    this._metas = val;\n                    return this;\n                }\n    \n                // getter\n                return this._metas;\n            },\n    \n            destroy: function() {\n                var canvas = this._canvas;\n                this._img.onload = null;\n    \n                if ( canvas ) {\n                    canvas.getContext('2d')\n                            .clearRect( 0, 0, canvas.width, canvas.height );\n                    canvas.width = canvas.height = 0;\n                    this._canvas = null;\n                }\n    \n                // 释放内存。非常重要，否则释放不了image的内存。\n                this._img.src = BLANK;\n                this._img = this._blob = null;\n            },\n    \n            _resize: function( img, cvs, width, height ) {\n                var opts = this.options,\n                    naturalWidth = img.width,\n                    naturalHeight = img.height,\n                    orientation = this.getOrientation(),\n                    scale, w, h, x, y;\n    \n                // values that require 90 degree rotation\n                if ( ~[ 5, 6, 7, 8 ].indexOf( orientation ) ) {\n    \n                    // 交换width, height的值。\n                    width ^= height;\n                    height ^= width;\n                    width ^= height;\n                }\n    \n                scale = Math[ opts.crop ? 'max' : 'min' ]( width / naturalWidth,\n                        height / naturalHeight );\n    \n                // 不允许放大。\n                opts.allowMagnify || (scale = Math.min( 1, scale ));\n    \n                w = naturalWidth * scale;\n                h = naturalHeight * scale;\n    \n                if ( opts.crop ) {\n                    cvs.width = width;\n                    cvs.height = height;\n                } else {\n                    cvs.width = w;\n                    cvs.height = h;\n                }\n    \n                x = (cvs.width - w) / 2;\n                y = (cvs.height - h) / 2;\n    \n                opts.preserveHeaders || this._rotate2Orientaion( cvs, orientation );\n    \n                this._renderImageToCanvas( cvs, img, x, y, w, h );\n            },\n    \n            _rotate2Orientaion: function( canvas, orientation ) {\n                var width = canvas.width,\n                    height = canvas.height,\n                    ctx = canvas.getContext('2d');\n    \n                switch ( orientation ) {\n                    case 5:\n                    case 6:\n                    case 7:\n                    case 8:\n                        canvas.width = height;\n                        canvas.height = width;\n                        break;\n                }\n    \n                switch ( orientation ) {\n                    case 2:    // horizontal flip\n                        ctx.translate( width, 0 );\n                        ctx.scale( -1, 1 );\n                        break;\n    \n                    case 3:    // 180 rotate left\n                        ctx.translate( width, height );\n                        ctx.rotate( Math.PI );\n                        break;\n    \n                    case 4:    // vertical flip\n                        ctx.translate( 0, height );\n                        ctx.scale( 1, -1 );\n                        break;\n    \n                    case 5:    // vertical flip + 90 rotate right\n                        ctx.rotate( 0.5 * Math.PI );\n                        ctx.scale( 1, -1 );\n                        break;\n    \n                    case 6:    // 90 rotate right\n                        ctx.rotate( 0.5 * Math.PI );\n                        ctx.translate( 0, -height );\n                        break;\n    \n                    case 7:    // horizontal flip + 90 rotate right\n                        ctx.rotate( 0.5 * Math.PI );\n                        ctx.translate( width, -height );\n                        ctx.scale( -1, 1 );\n                        break;\n    \n                    case 8:    // 90 rotate left\n                        ctx.rotate( -0.5 * Math.PI );\n                        ctx.translate( -width, 0 );\n                        break;\n                }\n            },\n    \n            // https://github.com/stomita/ios-imagefile-megapixel/\n            // blob/master/src/megapix-image.js\n            _renderImageToCanvas: (function() {\n    \n                // 如果不是ios, 不需要这么复杂！\n                if ( !Base.os.ios ) {\n                    return function( canvas ) {\n                        var args = Base.slice( arguments, 1 ),\n                            ctx = canvas.getContext('2d');\n    \n                        ctx.drawImage.apply( ctx, args );\n                    };\n                }\n    \n                /**\n                 * Detecting vertical squash in loaded image.\n                 * Fixes a bug which squash image vertically while drawing into\n                 * canvas for some images.\n                 */\n                function detectVerticalSquash( img, iw, ih ) {\n                    var canvas = document.createElement('canvas'),\n                        ctx = canvas.getContext('2d'),\n                        sy = 0,\n                        ey = ih,\n                        py = ih,\n                        data, alpha, ratio;\n    \n    \n                    canvas.width = 1;\n                    canvas.height = ih;\n                    ctx.drawImage( img, 0, 0 );\n                    data = ctx.getImageData( 0, 0, 1, ih ).data;\n    \n                    // search image edge pixel position in case\n                    // it is squashed vertically.\n                    while ( py > sy ) {\n                        alpha = data[ (py - 1) * 4 + 3 ];\n    \n                        if ( alpha === 0 ) {\n                            ey = py;\n                        } else {\n                            sy = py;\n                        }\n    \n                        py = (ey + sy) >> 1;\n                    }\n    \n                    ratio = (py / ih);\n                    return (ratio === 0) ? 1 : ratio;\n                }\n    \n                // fix ie7 bug\n                // http://stackoverflow.com/questions/11929099/\n                // html5-canvas-drawimage-ratio-bug-ios\n                if ( Base.os.ios >= 7 ) {\n                    return function( canvas, img, x, y, w, h ) {\n                        var iw = img.naturalWidth,\n                            ih = img.naturalHeight,\n                            vertSquashRatio = detectVerticalSquash( img, iw, ih );\n    \n                        return canvas.getContext('2d').drawImage( img, 0, 0,\n                                iw * vertSquashRatio, ih * vertSquashRatio,\n                                x, y, w, h );\n                    };\n                }\n    \n                /**\n                 * Detect subsampling in loaded image.\n                 * In iOS, larger images than 2M pixels may be\n                 * subsampled in rendering.\n                 */\n                function detectSubsampling( img ) {\n                    var iw = img.naturalWidth,\n                        ih = img.naturalHeight,\n                        canvas, ctx;\n    \n                    // subsampling may happen overmegapixel image\n                    if ( iw * ih > 1024 * 1024 ) {\n                        canvas = document.createElement('canvas');\n                        canvas.width = canvas.height = 1;\n                        ctx = canvas.getContext('2d');\n                        ctx.drawImage( img, -iw + 1, 0 );\n    \n                        // subsampled image becomes half smaller in rendering size.\n                        // check alpha channel value to confirm image is covering\n                        // edge pixel or not. if alpha value is 0\n                        // image is not covering, hence subsampled.\n                        return ctx.getImageData( 0, 0, 1, 1 ).data[ 3 ] === 0;\n                    } else {\n                        return false;\n                    }\n                }\n    \n    \n                return function( canvas, img, x, y, width, height ) {\n                    var iw = img.naturalWidth,\n                        ih = img.naturalHeight,\n                        ctx = canvas.getContext('2d'),\n                        subsampled = detectSubsampling( img ),\n                        doSquash = this.type === 'image/jpeg',\n                        d = 1024,\n                        sy = 0,\n                        dy = 0,\n                        tmpCanvas, tmpCtx, vertSquashRatio, dw, dh, sx, dx;\n    \n                    if ( subsampled ) {\n                        iw /= 2;\n                        ih /= 2;\n                    }\n    \n                    ctx.save();\n                    tmpCanvas = document.createElement('canvas');\n                    tmpCanvas.width = tmpCanvas.height = d;\n    \n                    tmpCtx = tmpCanvas.getContext('2d');\n                    vertSquashRatio = doSquash ?\n                            detectVerticalSquash( img, iw, ih ) : 1;\n    \n                    dw = Math.ceil( d * width / iw );\n                    dh = Math.ceil( d * height / ih / vertSquashRatio );\n    \n                    while ( sy < ih ) {\n                        sx = 0;\n                        dx = 0;\n                        while ( sx < iw ) {\n                            tmpCtx.clearRect( 0, 0, d, d );\n                            tmpCtx.drawImage( img, -sx, -sy );\n                            ctx.drawImage( tmpCanvas, 0, 0, d, d,\n                                    x + dx, y + dy, dw, dh );\n                            sx += d;\n                            dx += dw;\n                        }\n                        sy += d;\n                        dy += dh;\n                    }\n                    ctx.restore();\n                    tmpCanvas = tmpCtx = null;\n                };\n            })()\n        });\n    });\n    \n    /**\n     * @fileOverview Transport\n     * @todo 支持chunked传输，优势：\n     * 可以将大文件分成小块，挨个传输，可以提高大文件成功率，当失败的时候，也只需要重传那小部分，\n     * 而不需要重头再传一次。另外断点续传也需要用chunked方式。\n     */\n    define('runtime/html5/transport',[\n        'base',\n        'runtime/html5/runtime'\n    ], function( Base, Html5Runtime ) {\n    \n        var noop = Base.noop,\n            $ = Base.$;\n    \n        return Html5Runtime.register( 'Transport', {\n            init: function() {\n                this._status = 0;\n                this._response = null;\n            },\n    \n            send: function() {\n                var owner = this.owner,\n                    opts = this.options,\n                    xhr = this._initAjax(),\n                    blob = owner._blob,\n                    server = opts.server,\n                    formData, binary, fr;\n    \n                if ( opts.sendAsBinary ) {\n                    server += (/\\?/.test( server ) ? '&' : '?') +\n                            $.param( owner._formData );\n    \n                    binary = blob.getSource();\n                } else {\n                    formData = new FormData();\n                    $.each( owner._formData, function( k, v ) {\n                        formData.append( k, v );\n                    });\n    \n                    formData.append( opts.fileVal, blob.getSource(),\n                            opts.filename || owner._formData.name || '' );\n                }\n    \n                if ( opts.withCredentials && 'withCredentials' in xhr ) {\n                    xhr.open( opts.method, server, true );\n                    xhr.withCredentials = true;\n                } else {\n                    xhr.open( opts.method, server );\n                }\n    \n                this._setRequestHeader( xhr, opts.headers );\n    \n                if ( binary ) {\n                    // 强制设置成 content-type 为文件流。\n                    xhr.overrideMimeType &&\n                            xhr.overrideMimeType('application/octet-stream');\n    \n                    // android直接发送blob会导致服务端接收到的是空文件。\n                    // bug详情。\n                    // https://code.google.com/p/android/issues/detail?id=39882\n                    // 所以先用fileReader读取出来再通过arraybuffer的方式发送。\n                    if ( Base.os.android ) {\n                        fr = new FileReader();\n    \n                        fr.onload = function() {\n                            xhr.send( this.result );\n                            fr = fr.onload = null;\n                        };\n    \n                        fr.readAsArrayBuffer( binary );\n                    } else {\n                        xhr.send( binary );\n                    }\n                } else {\n                    xhr.send( formData );\n                }\n            },\n    \n            getResponse: function() {\n                return this._response;\n            },\n    \n            getResponseAsJson: function() {\n                return this._parseJson( this._response );\n            },\n    \n            getStatus: function() {\n                return this._status;\n            },\n    \n            abort: function() {\n                var xhr = this._xhr;\n    \n                if ( xhr ) {\n                    xhr.upload.onprogress = noop;\n                    xhr.onreadystatechange = noop;\n                    xhr.abort();\n    \n                    this._xhr = xhr = null;\n                }\n            },\n    \n            destroy: function() {\n                this.abort();\n            },\n    \n            _initAjax: function() {\n                var me = this,\n                    xhr = new XMLHttpRequest(),\n                    opts = this.options;\n    \n                if ( opts.withCredentials && !('withCredentials' in xhr) &&\n                        typeof XDomainRequest !== 'undefined' ) {\n                    xhr = new XDomainRequest();\n                }\n    \n                xhr.upload.onprogress = function( e ) {\n                    var percentage = 0;\n    \n                    if ( e.lengthComputable ) {\n                        percentage = e.loaded / e.total;\n                    }\n    \n                    return me.trigger( 'progress', percentage );\n                };\n    \n                xhr.onreadystatechange = function() {\n    \n                    if ( xhr.readyState !== 4 ) {\n                        return;\n                    }\n    \n                    xhr.upload.onprogress = noop;\n                    xhr.onreadystatechange = noop;\n                    me._xhr = null;\n                    me._status = xhr.status;\n    \n                    if ( xhr.status >= 200 && xhr.status < 300 ) {\n                        me._response = xhr.responseText;\n                        return me.trigger('load');\n                    } else if ( xhr.status >= 500 && xhr.status < 600 ) {\n                        me._response = xhr.responseText;\n                        return me.trigger( 'error', 'server' );\n                    }\n    \n    \n                    return me.trigger( 'error', me._status ? 'http' : 'abort' );\n                };\n    \n                me._xhr = xhr;\n                return xhr;\n            },\n    \n            _setRequestHeader: function( xhr, headers ) {\n                $.each( headers, function( key, val ) {\n                    xhr.setRequestHeader( key, val );\n                });\n            },\n    \n            _parseJson: function( str ) {\n                var json;\n    \n                try {\n                    json = JSON.parse( str );\n                } catch ( ex ) {\n                    json = {};\n                }\n    \n                return json;\n            }\n        });\n    });\n    /**\n     * @fileOverview 只有html5实现的文件版本。\n     */\n    define('preset/html5only',[\n        'base',\n    \n        // widgets\n        'widgets/filednd',\n        'widgets/filepaste',\n        'widgets/filepicker',\n        'widgets/image',\n        'widgets/queue',\n        'widgets/runtime',\n        'widgets/upload',\n        'widgets/validator',\n    \n        // runtimes\n        // html5\n        'runtime/html5/blob',\n        'runtime/html5/dnd',\n        'runtime/html5/filepaste',\n        'runtime/html5/filepicker',\n        'runtime/html5/imagemeta/exif',\n        'runtime/html5/image',\n        'runtime/html5/transport'\n    ], function( Base ) {\n        return Base;\n    });\n    define('webuploader',[\n        'preset/html5only'\n    ], function( preset ) {\n        return preset;\n    });\n    return require('webuploader');\n});\n"
  },
  {
    "path": "static/webuploader/webuploader.js",
    "content": "/*! WebUploader 0.1.6 */\n\n\n/**\n * @fileOverview 让内部各个部件的代码可以用[amd](https://github.com/amdjs/amdjs-api/wiki/AMD)模块定义方式组织起来。\n *\n * AMD API 内部的简单不完全实现，请忽略。只有当WebUploader被合并成一个文件的时候才会引入。\n */\n(function( root, factory ) {\n    var modules = {},\n\n        // 内部require, 简单不完全实现。\n        // https://github.com/amdjs/amdjs-api/wiki/require\n        _require = function( deps, callback ) {\n            var args, len, i;\n\n            // 如果deps不是数组，则直接返回指定module\n            if ( typeof deps === 'string' ) {\n                return getModule( deps );\n            } else {\n                args = [];\n                for( len = deps.length, i = 0; i < len; i++ ) {\n                    args.push( getModule( deps[ i ] ) );\n                }\n\n                return callback.apply( null, args );\n            }\n        },\n\n        // 内部define，暂时不支持不指定id.\n        _define = function( id, deps, factory ) {\n            if ( arguments.length === 2 ) {\n                factory = deps;\n                deps = null;\n            }\n\n            _require( deps || [], function() {\n                setModule( id, factory, arguments );\n            });\n        },\n\n        // 设置module, 兼容CommonJs写法。\n        setModule = function( id, factory, args ) {\n            var module = {\n                    exports: factory\n                },\n                returned;\n\n            if ( typeof factory === 'function' ) {\n                args.length || (args = [ _require, module.exports, module ]);\n                returned = factory.apply( null, args );\n                returned !== undefined && (module.exports = returned);\n            }\n\n            modules[ id ] = module.exports;\n        },\n\n        // 根据id获取module\n        getModule = function( id ) {\n            var module = modules[ id ] || root[ id ];\n\n            if ( !module ) {\n                throw new Error( '`' + id + '` is undefined' );\n            }\n\n            return module;\n        },\n\n        // 将所有modules，将路径ids装换成对象。\n        exportsTo = function( obj ) {\n            var key, host, parts, part, last, ucFirst;\n\n            // make the first character upper case.\n            ucFirst = function( str ) {\n                return str && (str.charAt( 0 ).toUpperCase() + str.substr( 1 ));\n            };\n\n            for ( key in modules ) {\n                host = obj;\n\n                if ( !modules.hasOwnProperty( key ) ) {\n                    continue;\n                }\n\n                parts = key.split('/');\n                last = ucFirst( parts.pop() );\n\n                while( (part = ucFirst( parts.shift() )) ) {\n                    host[ part ] = host[ part ] || {};\n                    host = host[ part ];\n                }\n\n                host[ last ] = modules[ key ];\n            }\n\n            return obj;\n        },\n\n        makeExport = function( dollar ) {\n            root.__dollar = dollar;\n\n            // exports every module.\n            return exportsTo( factory( root, _define, _require ) );\n        },\n\n        origin;\n\n    if ( typeof module === 'object' && typeof module.exports === 'object' ) {\n\n        // For CommonJS and CommonJS-like environments where a proper window is present,\n        module.exports = makeExport();\n    } else if ( typeof define === 'function' && define.amd ) {\n\n        // Allow using this built library as an AMD module\n        // in another project. That other project will only\n        // see this AMD call, not the internal modules in\n        // the closure below.\n        define([ 'jquery' ], makeExport );\n    } else {\n\n        // Browser globals case. Just assign the\n        // result to a property on the global.\n        origin = root.WebUploader;\n        root.WebUploader = makeExport();\n        root.WebUploader.noConflict = function() {\n            root.WebUploader = origin;\n        };\n    }\n})( window, function( window, define, require ) {\n\n\n    /**\n     * @fileOverview jQuery or Zepto\n     * @require \"jquery\"\n     * @require \"zepto\"\n     */\n    define('dollar-third',[],function() {\n        var req = window.require;\n        var $ = window.__dollar || \n            window.jQuery || \n            window.Zepto || \n            req('jquery') || \n            req('zepto');\n    \n        if ( !$ ) {\n            throw new Error('jQuery or Zepto not found!');\n        }\n    \n        return $;\n    });\n    \n    /**\n     * @fileOverview Dom 操作相关\n     */\n    define('dollar',[\n        'dollar-third'\n    ], function( _ ) {\n        return _;\n    });\n    /**\n     * @fileOverview 使用jQuery的Promise\n     */\n    define('promise-third',[\n        'dollar'\n    ], function( $ ) {\n        return {\n            Deferred: $.Deferred,\n            when: $.when,\n    \n            isPromise: function( anything ) {\n                return anything && typeof anything.then === 'function';\n            }\n        };\n    });\n    /**\n     * @fileOverview Promise/A+\n     */\n    define('promise',[\n        'promise-third'\n    ], function( _ ) {\n        return _;\n    });\n    /**\n     * @fileOverview 基础类方法。\n     */\n    \n    /**\n     * Web Uploader内部类的详细说明，以下提及的功能类，都可以在`WebUploader`这个变量中访问到。\n     *\n     * As you know, Web Uploader的每个文件都是用过[AMD](https://github.com/amdjs/amdjs-api/wiki/AMD)规范中的`define`组织起来的, 每个Module都会有个module id.\n     * 默认module id为该文件的路径，而此路径将会转化成名字空间存放在WebUploader中。如：\n     *\n     * * module `base`：WebUploader.Base\n     * * module `file`: WebUploader.File\n     * * module `lib/dnd`: WebUploader.Lib.Dnd\n     * * module `runtime/html5/dnd`: WebUploader.Runtime.Html5.Dnd\n     *\n     *\n     * 以下文档中对类的使用可能省略掉了`WebUploader`前缀。\n     * @module WebUploader\n     * @title WebUploader API文档\n     */\n    define('base',[\n        'dollar',\n        'promise'\n    ], function( $, promise ) {\n    \n        var noop = function() {},\n            call = Function.call;\n    \n        // http://jsperf.com/uncurrythis\n        // 反科里化\n        function uncurryThis( fn ) {\n            return function() {\n                return call.apply( fn, arguments );\n            };\n        }\n    \n        function bindFn( fn, context ) {\n            return function() {\n                return fn.apply( context, arguments );\n            };\n        }\n    \n        function createObject( proto ) {\n            var f;\n    \n            if ( Object.create ) {\n                return Object.create( proto );\n            } else {\n                f = function() {};\n                f.prototype = proto;\n                return new f();\n            }\n        }\n    \n    \n        /**\n         * 基础类，提供一些简单常用的方法。\n         * @class Base\n         */\n        return {\n    \n            /**\n             * @property {String} version 当前版本号。\n             */\n            version: '0.1.6',\n    \n            /**\n             * @property {jQuery|Zepto} $ 引用依赖的jQuery或者Zepto对象。\n             */\n            $: $,\n    \n            Deferred: promise.Deferred,\n    \n            isPromise: promise.isPromise,\n    \n            when: promise.when,\n    \n            /**\n             * @description  简单的浏览器检查结果。\n             *\n             * * `webkit`  webkit版本号，如果浏览器为非webkit内核，此属性为`undefined`。\n             * * `chrome`  chrome浏览器版本号，如果浏览器为chrome，此属性为`undefined`。\n             * * `ie`  ie浏览器版本号，如果浏览器为非ie，此属性为`undefined`。**暂不支持ie10+**\n             * * `firefox`  firefox浏览器版本号，如果浏览器为非firefox，此属性为`undefined`。\n             * * `safari`  safari浏览器版本号，如果浏览器为非safari，此属性为`undefined`。\n             * * `opera`  opera浏览器版本号，如果浏览器为非opera，此属性为`undefined`。\n             *\n             * @property {Object} [browser]\n             */\n            browser: (function( ua ) {\n                var ret = {},\n                    webkit = ua.match( /WebKit\\/([\\d.]+)/ ),\n                    chrome = ua.match( /Chrome\\/([\\d.]+)/ ) ||\n                        ua.match( /CriOS\\/([\\d.]+)/ ),\n    \n                    ie = ua.match( /MSIE\\s([\\d\\.]+)/ ) ||\n                        ua.match( /(?:trident)(?:.*rv:([\\w.]+))?/i ),\n                    firefox = ua.match( /Firefox\\/([\\d.]+)/ ),\n                    safari = ua.match( /Safari\\/([\\d.]+)/ ),\n                    opera = ua.match( /OPR\\/([\\d.]+)/ );\n    \n                webkit && (ret.webkit = parseFloat( webkit[ 1 ] ));\n                chrome && (ret.chrome = parseFloat( chrome[ 1 ] ));\n                ie && (ret.ie = parseFloat( ie[ 1 ] ));\n                firefox && (ret.firefox = parseFloat( firefox[ 1 ] ));\n                safari && (ret.safari = parseFloat( safari[ 1 ] ));\n                opera && (ret.opera = parseFloat( opera[ 1 ] ));\n    \n                return ret;\n            })( navigator.userAgent ),\n    \n            /**\n             * @description  操作系统检查结果。\n             *\n             * * `android`  如果在android浏览器环境下，此值为对应的android版本号，否则为`undefined`。\n             * * `ios` 如果在ios浏览器环境下，此值为对应的ios版本号，否则为`undefined`。\n             * @property {Object} [os]\n             */\n            os: (function( ua ) {\n                var ret = {},\n    \n                    // osx = !!ua.match( /\\(Macintosh\\; Intel / ),\n                    android = ua.match( /(?:Android);?[\\s\\/]+([\\d.]+)?/ ),\n                    ios = ua.match( /(?:iPad|iPod|iPhone).*OS\\s([\\d_]+)/ );\n    \n                // osx && (ret.osx = true);\n                android && (ret.android = parseFloat( android[ 1 ] ));\n                ios && (ret.ios = parseFloat( ios[ 1 ].replace( /_/g, '.' ) ));\n    \n                return ret;\n            })( navigator.userAgent ),\n    \n            /**\n             * 实现类与类之间的继承。\n             * @method inherits\n             * @grammar Base.inherits( super ) => child\n             * @grammar Base.inherits( super, protos ) => child\n             * @grammar Base.inherits( super, protos, statics ) => child\n             * @param  {Class} super 父类\n             * @param  {Object | Function} [protos] 子类或者对象。如果对象中包含constructor，子类将是用此属性值。\n             * @param  {Function} [protos.constructor] 子类构造器，不指定的话将创建个临时的直接执行父类构造器的方法。\n             * @param  {Object} [statics] 静态属性或方法。\n             * @return {Class} 返回子类。\n             * @example\n             * function Person() {\n             *     console.log( 'Super' );\n             * }\n             * Person.prototype.hello = function() {\n             *     console.log( 'hello' );\n             * };\n             *\n             * var Manager = Base.inherits( Person, {\n             *     world: function() {\n             *         console.log( 'World' );\n             *     }\n             * });\n             *\n             * // 因为没有指定构造器，父类的构造器将会执行。\n             * var instance = new Manager();    // => Super\n             *\n             * // 继承子父类的方法\n             * instance.hello();    // => hello\n             * instance.world();    // => World\n             *\n             * // 子类的__super__属性指向父类\n             * console.log( Manager.__super__ === Person );    // => true\n             */\n            inherits: function( Super, protos, staticProtos ) {\n                var child;\n    \n                if ( typeof protos === 'function' ) {\n                    child = protos;\n                    protos = null;\n                } else if ( protos && protos.hasOwnProperty('constructor') ) {\n                    child = protos.constructor;\n                } else {\n                    child = function() {\n                        return Super.apply( this, arguments );\n                    };\n                }\n    \n                // 复制静态方法\n                $.extend( true, child, Super, staticProtos || {} );\n    \n                /* jshint camelcase: false */\n    \n                // 让子类的__super__属性指向父类。\n                child.__super__ = Super.prototype;\n    \n                // 构建原型，添加原型方法或属性。\n                // 暂时用Object.create实现。\n                child.prototype = createObject( Super.prototype );\n                protos && $.extend( true, child.prototype, protos );\n    \n                return child;\n            },\n    \n            /**\n             * 一个不做任何事情的方法。可以用来赋值给默认的callback.\n             * @method noop\n             */\n            noop: noop,\n    \n            /**\n             * 返回一个新的方法，此方法将已指定的`context`来执行。\n             * @grammar Base.bindFn( fn, context ) => Function\n             * @method bindFn\n             * @example\n             * var doSomething = function() {\n             *         console.log( this.name );\n             *     },\n             *     obj = {\n             *         name: 'Object Name'\n             *     },\n             *     aliasFn = Base.bind( doSomething, obj );\n             *\n             *  aliasFn();    // => Object Name\n             *\n             */\n            bindFn: bindFn,\n    \n            /**\n             * 引用Console.log如果存在的话，否则引用一个[空函数noop](#WebUploader:Base.noop)。\n             * @grammar Base.log( args... ) => undefined\n             * @method log\n             */\n            log: (function() {\n                if ( window.console ) {\n                    return bindFn( console.log, console );\n                }\n                return noop;\n            })(),\n    \n            nextTick: (function() {\n    \n                return function( cb ) {\n                    setTimeout( cb, 1 );\n                };\n    \n                // @bug 当浏览器不在当前窗口时就停了。\n                // var next = window.requestAnimationFrame ||\n                //     window.webkitRequestAnimationFrame ||\n                //     window.mozRequestAnimationFrame ||\n                //     function( cb ) {\n                //         window.setTimeout( cb, 1000 / 60 );\n                //     };\n    \n                // // fix: Uncaught TypeError: Illegal invocation\n                // return bindFn( next, window );\n            })(),\n    \n            /**\n             * 被[uncurrythis](http://www.2ality.com/2011/11/uncurrying-this.html)的数组slice方法。\n             * 将用来将非数组对象转化成数组对象。\n             * @grammar Base.slice( target, start[, end] ) => Array\n             * @method slice\n             * @example\n             * function doSomthing() {\n             *     var args = Base.slice( arguments, 1 );\n             *     console.log( args );\n             * }\n             *\n             * doSomthing( 'ignored', 'arg2', 'arg3' );    // => Array [\"arg2\", \"arg3\"]\n             */\n            slice: uncurryThis( [].slice ),\n    \n            /**\n             * 生成唯一的ID\n             * @method guid\n             * @grammar Base.guid() => String\n             * @grammar Base.guid( prefx ) => String\n             */\n            guid: (function() {\n                var counter = 0;\n    \n                return function( prefix ) {\n                    var guid = (+new Date()).toString( 32 ),\n                        i = 0;\n    \n                    for ( ; i < 5; i++ ) {\n                        guid += Math.floor( Math.random() * 65535 ).toString( 32 );\n                    }\n    \n                    return (prefix || 'wu_') + guid + (counter++).toString( 32 );\n                };\n            })(),\n    \n            /**\n             * 格式化文件大小, 输出成带单位的字符串\n             * @method formatSize\n             * @grammar Base.formatSize( size ) => String\n             * @grammar Base.formatSize( size, pointLength ) => String\n             * @grammar Base.formatSize( size, pointLength, units ) => String\n             * @param {Number} size 文件大小\n             * @param {Number} [pointLength=2] 精确到的小数点数。\n             * @param {Array} [units=[ 'B', 'K', 'M', 'G', 'TB' ]] 单位数组。从字节，到千字节，一直往上指定。如果单位数组里面只指定了到了K(千字节)，同时文件大小大于M, 此方法的输出将还是显示成多少K.\n             * @example\n             * console.log( Base.formatSize( 100 ) );    // => 100B\n             * console.log( Base.formatSize( 1024 ) );    // => 1.00K\n             * console.log( Base.formatSize( 1024, 0 ) );    // => 1K\n             * console.log( Base.formatSize( 1024 * 1024 ) );    // => 1.00M\n             * console.log( Base.formatSize( 1024 * 1024 * 1024 ) );    // => 1.00G\n             * console.log( Base.formatSize( 1024 * 1024 * 1024, 0, ['B', 'KB', 'MB'] ) );    // => 1024MB\n             */\n            formatSize: function( size, pointLength, units ) {\n                var unit;\n    \n                units = units || [ 'B', 'K', 'M', 'G', 'TB' ];\n    \n                while ( (unit = units.shift()) && size > 1024 ) {\n                    size = size / 1024;\n                }\n    \n                return (unit === 'B' ? size : size.toFixed( pointLength || 2 )) +\n                        unit;\n            }\n        };\n    });\n    /**\n     * 事件处理类，可以独立使用，也可以扩展给对象使用。\n     * @fileOverview Mediator\n     */\n    define('mediator',[\n        'base'\n    ], function( Base ) {\n        var $ = Base.$,\n            slice = [].slice,\n            separator = /\\s+/,\n            protos;\n    \n        // 根据条件过滤出事件handlers.\n        function findHandlers( arr, name, callback, context ) {\n            return $.grep( arr, function( handler ) {\n                return handler &&\n                        (!name || handler.e === name) &&\n                        (!callback || handler.cb === callback ||\n                        handler.cb._cb === callback) &&\n                        (!context || handler.ctx === context);\n            });\n        }\n    \n        function eachEvent( events, callback, iterator ) {\n            // 不支持对象，只支持多个event用空格隔开\n            $.each( (events || '').split( separator ), function( _, key ) {\n                iterator( key, callback );\n            });\n        }\n    \n        function triggerHanders( events, args ) {\n            var stoped = false,\n                i = -1,\n                len = events.length,\n                handler;\n    \n            while ( ++i < len ) {\n                handler = events[ i ];\n    \n                if ( handler.cb.apply( handler.ctx2, args ) === false ) {\n                    stoped = true;\n                    break;\n                }\n            }\n    \n            return !stoped;\n        }\n    \n        protos = {\n    \n            /**\n             * 绑定事件。\n             *\n             * `callback`方法在执行时，arguments将会来源于trigger的时候携带的参数。如\n             * ```javascript\n             * var obj = {};\n             *\n             * // 使得obj有事件行为\n             * Mediator.installTo( obj );\n             *\n             * obj.on( 'testa', function( arg1, arg2 ) {\n             *     console.log( arg1, arg2 ); // => 'arg1', 'arg2'\n             * });\n             *\n             * obj.trigger( 'testa', 'arg1', 'arg2' );\n             * ```\n             *\n             * 如果`callback`中，某一个方法`return false`了，则后续的其他`callback`都不会被执行到。\n             * 切会影响到`trigger`方法的返回值，为`false`。\n             *\n             * `on`还可以用来添加一个特殊事件`all`, 这样所有的事件触发都会响应到。同时此类`callback`中的arguments有一个不同处，\n             * 就是第一个参数为`type`，记录当前是什么事件在触发。此类`callback`的优先级比脚低，会再正常`callback`执行完后触发。\n             * ```javascript\n             * obj.on( 'all', function( type, arg1, arg2 ) {\n             *     console.log( type, arg1, arg2 ); // => 'testa', 'arg1', 'arg2'\n             * });\n             * ```\n             *\n             * @method on\n             * @grammar on( name, callback[, context] ) => self\n             * @param  {String}   name     事件名，支持多个事件用空格隔开\n             * @param  {Function} callback 事件处理器\n             * @param  {Object}   [context]  事件处理器的上下文。\n             * @return {self} 返回自身，方便链式\n             * @chainable\n             * @class Mediator\n             */\n            on: function( name, callback, context ) {\n                var me = this,\n                    set;\n    \n                if ( !callback ) {\n                    return this;\n                }\n    \n                set = this._events || (this._events = []);\n    \n                eachEvent( name, callback, function( name, callback ) {\n                    var handler = { e: name };\n    \n                    handler.cb = callback;\n                    handler.ctx = context;\n                    handler.ctx2 = context || me;\n                    handler.id = set.length;\n    \n                    set.push( handler );\n                });\n    \n                return this;\n            },\n    \n            /**\n             * 绑定事件，且当handler执行完后，自动解除绑定。\n             * @method once\n             * @grammar once( name, callback[, context] ) => self\n             * @param  {String}   name     事件名\n             * @param  {Function} callback 事件处理器\n             * @param  {Object}   [context]  事件处理器的上下文。\n             * @return {self} 返回自身，方便链式\n             * @chainable\n             */\n            once: function( name, callback, context ) {\n                var me = this;\n    \n                if ( !callback ) {\n                    return me;\n                }\n    \n                eachEvent( name, callback, function( name, callback ) {\n                    var once = function() {\n                            me.off( name, once );\n                            return callback.apply( context || me, arguments );\n                        };\n    \n                    once._cb = callback;\n                    me.on( name, once, context );\n                });\n    \n                return me;\n            },\n    \n            /**\n             * 解除事件绑定\n             * @method off\n             * @grammar off( [name[, callback[, context] ] ] ) => self\n             * @param  {String}   [name]     事件名\n             * @param  {Function} [callback] 事件处理器\n             * @param  {Object}   [context]  事件处理器的上下文。\n             * @return {self} 返回自身，方便链式\n             * @chainable\n             */\n            off: function( name, cb, ctx ) {\n                var events = this._events;\n    \n                if ( !events ) {\n                    return this;\n                }\n    \n                if ( !name && !cb && !ctx ) {\n                    this._events = [];\n                    return this;\n                }\n    \n                eachEvent( name, cb, function( name, cb ) {\n                    $.each( findHandlers( events, name, cb, ctx ), function() {\n                        delete events[ this.id ];\n                    });\n                });\n    \n                return this;\n            },\n    \n            /**\n             * 触发事件\n             * @method trigger\n             * @grammar trigger( name[, args...] ) => self\n             * @param  {String}   type     事件名\n             * @param  {*} [...] 任意参数\n             * @return {Boolean} 如果handler中return false了，则返回false, 否则返回true\n             */\n            trigger: function( type ) {\n                var args, events, allEvents;\n    \n                if ( !this._events || !type ) {\n                    return this;\n                }\n    \n                args = slice.call( arguments, 1 );\n                events = findHandlers( this._events, type );\n                allEvents = findHandlers( this._events, 'all' );\n    \n                return triggerHanders( events, args ) &&\n                        triggerHanders( allEvents, arguments );\n            }\n        };\n    \n        /**\n         * 中介者，它本身是个单例，但可以通过[installTo](#WebUploader:Mediator:installTo)方法，使任何对象具备事件行为。\n         * 主要目的是负责模块与模块之间的合作，降低耦合度。\n         *\n         * @class Mediator\n         */\n        return $.extend({\n    \n            /**\n             * 可以通过这个接口，使任何对象具备事件功能。\n             * @method installTo\n             * @param  {Object} obj 需要具备事件行为的对象。\n             * @return {Object} 返回obj.\n             */\n            installTo: function( obj ) {\n                return $.extend( obj, protos );\n            }\n    \n        }, protos );\n    });\n    /**\n     * @fileOverview Uploader上传类\n     */\n    define('uploader',[\n        'base',\n        'mediator'\n    ], function( Base, Mediator ) {\n    \n        var $ = Base.$;\n    \n        /**\n         * 上传入口类。\n         * @class Uploader\n         * @constructor\n         * @grammar new Uploader( opts ) => Uploader\n         * @example\n         * var uploader = WebUploader.Uploader({\n         *     swf: 'path_of_swf/Uploader.swf',\n         *\n         *     // 开起分片上传。\n         *     chunked: true\n         * });\n         */\n        function Uploader( opts ) {\n            this.options = $.extend( true, {}, Uploader.options, opts );\n            this._init( this.options );\n        }\n    \n        // default Options\n        // widgets中有相应扩展\n        Uploader.options = {};\n        Mediator.installTo( Uploader.prototype );\n    \n        // 批量添加纯命令式方法。\n        $.each({\n            upload: 'start-upload',\n            stop: 'stop-upload',\n            getFile: 'get-file',\n            getFiles: 'get-files',\n            addFile: 'add-file',\n            addFiles: 'add-file',\n            sort: 'sort-files',\n            removeFile: 'remove-file',\n            cancelFile: 'cancel-file',\n            skipFile: 'skip-file',\n            retry: 'retry',\n            isInProgress: 'is-in-progress',\n            makeThumb: 'make-thumb',\n            md5File: 'md5-file',\n            getDimension: 'get-dimension',\n            addButton: 'add-btn',\n            predictRuntimeType: 'predict-runtime-type',\n            refresh: 'refresh',\n            disable: 'disable',\n            enable: 'enable',\n            reset: 'reset'\n        }, function( fn, command ) {\n            Uploader.prototype[ fn ] = function() {\n                return this.request( command, arguments );\n            };\n        });\n    \n        $.extend( Uploader.prototype, {\n            state: 'pending',\n    \n            _init: function( opts ) {\n                var me = this;\n    \n                me.request( 'init', opts, function() {\n                    me.state = 'ready';\n                    me.trigger('ready');\n                });\n            },\n    \n            /**\n             * 获取或者设置Uploader配置项。\n             * @method option\n             * @grammar option( key ) => *\n             * @grammar option( key, val ) => self\n             * @example\n             *\n             * // 初始状态图片上传前不会压缩\n             * var uploader = new WebUploader.Uploader({\n             *     compress: null;\n             * });\n             *\n             * // 修改后图片上传前，尝试将图片压缩到1600 * 1600\n             * uploader.option( 'compress', {\n             *     width: 1600,\n             *     height: 1600\n             * });\n             */\n            option: function( key, val ) {\n                var opts = this.options;\n    \n                // setter\n                if ( arguments.length > 1 ) {\n    \n                    if ( $.isPlainObject( val ) &&\n                            $.isPlainObject( opts[ key ] ) ) {\n                        $.extend( opts[ key ], val );\n                    } else {\n                        opts[ key ] = val;\n                    }\n    \n                } else {    // getter\n                    return key ? opts[ key ] : opts;\n                }\n            },\n    \n            /**\n             * 获取文件统计信息。返回一个包含一下信息的对象。\n             * * `successNum` 上传成功的文件数\n             * * `progressNum` 上传中的文件数\n             * * `cancelNum` 被删除的文件数\n             * * `invalidNum` 无效的文件数\n             * * `uploadFailNum` 上传失败的文件数\n             * * `queueNum` 还在队列中的文件数\n             * * `interruptNum` 被暂停的文件数\n             * @method getStats\n             * @grammar getStats() => Object\n             */\n            getStats: function() {\n                // return this._mgr.getStats.apply( this._mgr, arguments );\n                var stats = this.request('get-stats');\n    \n                return stats ? {\n                    successNum: stats.numOfSuccess,\n                    progressNum: stats.numOfProgress,\n    \n                    // who care?\n                    // queueFailNum: 0,\n                    cancelNum: stats.numOfCancel,\n                    invalidNum: stats.numOfInvalid,\n                    uploadFailNum: stats.numOfUploadFailed,\n                    queueNum: stats.numOfQueue,\n                    interruptNum: stats.numofInterrupt\n                } : {};\n            },\n    \n            // 需要重写此方法来来支持opts.onEvent和instance.onEvent的处理器\n            trigger: function( type/*, args...*/ ) {\n                var args = [].slice.call( arguments, 1 ),\n                    opts = this.options,\n                    name = 'on' + type.substring( 0, 1 ).toUpperCase() +\n                        type.substring( 1 );\n    \n                if (\n                        // 调用通过on方法注册的handler.\n                        Mediator.trigger.apply( this, arguments ) === false ||\n    \n                        // 调用opts.onEvent\n                        $.isFunction( opts[ name ] ) &&\n                        opts[ name ].apply( this, args ) === false ||\n    \n                        // 调用this.onEvent\n                        $.isFunction( this[ name ] ) &&\n                        this[ name ].apply( this, args ) === false ||\n    \n                        // 广播所有uploader的事件。\n                        Mediator.trigger.apply( Mediator,\n                        [ this, type ].concat( args ) ) === false ) {\n    \n                    return false;\n                }\n    \n                return true;\n            },\n    \n            /**\n             * 销毁 webuploader 实例\n             * @method destroy\n             * @grammar destroy() => undefined\n             */\n            destroy: function() {\n                this.request( 'destroy', arguments );\n                this.off();\n            },\n    \n            // widgets/widget.js将补充此方法的详细文档。\n            request: Base.noop\n        });\n    \n        /**\n         * 创建Uploader实例，等同于new Uploader( opts );\n         * @method create\n         * @class Base\n         * @static\n         * @grammar Base.create( opts ) => Uploader\n         */\n        Base.create = Uploader.create = function( opts ) {\n            return new Uploader( opts );\n        };\n    \n        // 暴露Uploader，可以通过它来扩展业务逻辑。\n        Base.Uploader = Uploader;\n    \n        return Uploader;\n    });\n    /**\n     * @fileOverview Runtime管理器，负责Runtime的选择, 连接\n     */\n    define('runtime/runtime',[\n        'base',\n        'mediator'\n    ], function( Base, Mediator ) {\n    \n        var $ = Base.$,\n            factories = {},\n    \n            // 获取对象的第一个key\n            getFirstKey = function( obj ) {\n                for ( var key in obj ) {\n                    if ( obj.hasOwnProperty( key ) ) {\n                        return key;\n                    }\n                }\n                return null;\n            };\n    \n        // 接口类。\n        function Runtime( options ) {\n            this.options = $.extend({\n                container: document.body\n            }, options );\n            this.uid = Base.guid('rt_');\n        }\n    \n        $.extend( Runtime.prototype, {\n    \n            getContainer: function() {\n                var opts = this.options,\n                    parent, container;\n    \n                if ( this._container ) {\n                    return this._container;\n                }\n    \n                parent = $( opts.container || document.body );\n                container = $( document.createElement('div') );\n    \n                container.attr( 'id', 'rt_' + this.uid );\n                container.css({\n                    position: 'absolute',\n                    top: '0px',\n                    left: '0px',\n                    width: '1px',\n                    height: '1px',\n                    overflow: 'hidden'\n                });\n    \n                parent.append( container );\n                parent.addClass('webuploader-container');\n                this._container = container;\n                this._parent = parent;\n                return container;\n            },\n    \n            init: Base.noop,\n            exec: Base.noop,\n    \n            destroy: function() {\n                this._container && this._container.remove();\n                this._parent && this._parent.removeClass('webuploader-container');\n                this.off();\n            }\n        });\n    \n        Runtime.orders = 'html5,flash';\n    \n    \n        /**\n         * 添加Runtime实现。\n         * @param {String} type    类型\n         * @param {Runtime} factory 具体Runtime实现。\n         */\n        Runtime.addRuntime = function( type, factory ) {\n            factories[ type ] = factory;\n        };\n    \n        Runtime.hasRuntime = function( type ) {\n            return !!(type ? factories[ type ] : getFirstKey( factories ));\n        };\n    \n        Runtime.create = function( opts, orders ) {\n            var type, runtime;\n    \n            orders = orders || Runtime.orders;\n            $.each( orders.split( /\\s*,\\s*/g ), function() {\n                if ( factories[ this ] ) {\n                    type = this;\n                    return false;\n                }\n            });\n    \n            type = type || getFirstKey( factories );\n    \n            if ( !type ) {\n                throw new Error('Runtime Error');\n            }\n    \n            runtime = new factories[ type ]( opts );\n            return runtime;\n        };\n    \n        Mediator.installTo( Runtime.prototype );\n        return Runtime;\n    });\n    \n    /**\n     * @fileOverview Runtime管理器，负责Runtime的选择, 连接\n     */\n    define('runtime/client',[\n        'base',\n        'mediator',\n        'runtime/runtime'\n    ], function( Base, Mediator, Runtime ) {\n    \n        var cache;\n    \n        cache = (function() {\n            var obj = {};\n    \n            return {\n                add: function( runtime ) {\n                    obj[ runtime.uid ] = runtime;\n                },\n    \n                get: function( ruid, standalone ) {\n                    var i;\n    \n                    if ( ruid ) {\n                        return obj[ ruid ];\n                    }\n    \n                    for ( i in obj ) {\n                        // 有些类型不能重用，比如filepicker.\n                        if ( standalone && obj[ i ].__standalone ) {\n                            continue;\n                        }\n    \n                        return obj[ i ];\n                    }\n    \n                    return null;\n                },\n    \n                remove: function( runtime ) {\n                    delete obj[ runtime.uid ];\n                }\n            };\n        })();\n    \n        function RuntimeClient( component, standalone ) {\n            var deferred = Base.Deferred(),\n                runtime;\n    \n            this.uid = Base.guid('client_');\n    \n            // 允许runtime没有初始化之前，注册一些方法在初始化后执行。\n            this.runtimeReady = function( cb ) {\n                return deferred.done( cb );\n            };\n    \n            this.connectRuntime = function( opts, cb ) {\n    \n                // already connected.\n                if ( runtime ) {\n                    throw new Error('already connected!');\n                }\n    \n                deferred.done( cb );\n    \n                if ( typeof opts === 'string' && cache.get( opts ) ) {\n                    runtime = cache.get( opts );\n                }\n    \n                // 像filePicker只能独立存在，不能公用。\n                runtime = runtime || cache.get( null, standalone );\n    \n                // 需要创建\n                if ( !runtime ) {\n                    runtime = Runtime.create( opts, opts.runtimeOrder );\n                    runtime.__promise = deferred.promise();\n                    runtime.once( 'ready', deferred.resolve );\n                    runtime.init();\n                    cache.add( runtime );\n                    runtime.__client = 1;\n                } else {\n                    // 来自cache\n                    Base.$.extend( runtime.options, opts );\n                    runtime.__promise.then( deferred.resolve );\n                    runtime.__client++;\n                }\n    \n                standalone && (runtime.__standalone = standalone);\n                return runtime;\n            };\n    \n            this.getRuntime = function() {\n                return runtime;\n            };\n    \n            this.disconnectRuntime = function() {\n                if ( !runtime ) {\n                    return;\n                }\n    \n                runtime.__client--;\n    \n                if ( runtime.__client <= 0 ) {\n                    cache.remove( runtime );\n                    delete runtime.__promise;\n                    runtime.destroy();\n                }\n    \n                runtime = null;\n            };\n    \n            this.exec = function() {\n                if ( !runtime ) {\n                    return;\n                }\n    \n                var args = Base.slice( arguments );\n                component && args.unshift( component );\n    \n                return runtime.exec.apply( this, args );\n            };\n    \n            this.getRuid = function() {\n                return runtime && runtime.uid;\n            };\n    \n            this.destroy = (function( destroy ) {\n                return function() {\n                    destroy && destroy.apply( this, arguments );\n                    this.trigger('destroy');\n                    this.off();\n                    this.exec('destroy');\n                    this.disconnectRuntime();\n                };\n            })( this.destroy );\n        }\n    \n        Mediator.installTo( RuntimeClient.prototype );\n        return RuntimeClient;\n    });\n    /**\n     * @fileOverview 错误信息\n     */\n    define('lib/dnd',[\n        'base',\n        'mediator',\n        'runtime/client'\n    ], function( Base, Mediator, RuntimeClent ) {\n    \n        var $ = Base.$;\n    \n        function DragAndDrop( opts ) {\n            opts = this.options = $.extend({}, DragAndDrop.options, opts );\n    \n            opts.container = $( opts.container );\n    \n            if ( !opts.container.length ) {\n                return;\n            }\n    \n            RuntimeClent.call( this, 'DragAndDrop' );\n        }\n    \n        DragAndDrop.options = {\n            accept: null,\n            disableGlobalDnd: false\n        };\n    \n        Base.inherits( RuntimeClent, {\n            constructor: DragAndDrop,\n    \n            init: function() {\n                var me = this;\n    \n                me.connectRuntime( me.options, function() {\n                    me.exec('init');\n                    me.trigger('ready');\n                });\n            }\n        });\n    \n        Mediator.installTo( DragAndDrop.prototype );\n    \n        return DragAndDrop;\n    });\n    /**\n     * @fileOverview 组件基类。\n     */\n    define('widgets/widget',[\n        'base',\n        'uploader'\n    ], function( Base, Uploader ) {\n    \n        var $ = Base.$,\n            _init = Uploader.prototype._init,\n            _destroy = Uploader.prototype.destroy,\n            IGNORE = {},\n            widgetClass = [];\n    \n        function isArrayLike( obj ) {\n            if ( !obj ) {\n                return false;\n            }\n    \n            var length = obj.length,\n                type = $.type( obj );\n    \n            if ( obj.nodeType === 1 && length ) {\n                return true;\n            }\n    \n            return type === 'array' || type !== 'function' && type !== 'string' &&\n                    (length === 0 || typeof length === 'number' && length > 0 &&\n                    (length - 1) in obj);\n        }\n    \n        function Widget( uploader ) {\n            this.owner = uploader;\n            this.options = uploader.options;\n        }\n    \n        $.extend( Widget.prototype, {\n    \n            init: Base.noop,\n    \n            // 类Backbone的事件监听声明，监听uploader实例上的事件\n            // widget直接无法监听事件，事件只能通过uploader来传递\n            invoke: function( apiName, args ) {\n    \n                /*\n                    {\n                        'make-thumb': 'makeThumb'\n                    }\n                 */\n                var map = this.responseMap;\n    \n                // 如果无API响应声明则忽略\n                if ( !map || !(apiName in map) || !(map[ apiName ] in this) ||\n                        !$.isFunction( this[ map[ apiName ] ] ) ) {\n    \n                    return IGNORE;\n                }\n    \n                return this[ map[ apiName ] ].apply( this, args );\n    \n            },\n    \n            /**\n             * 发送命令。当传入`callback`或者`handler`中返回`promise`时。返回一个当所有`handler`中的promise都完成后完成的新`promise`。\n             * @method request\n             * @grammar request( command, args ) => * | Promise\n             * @grammar request( command, args, callback ) => Promise\n             * @for  Uploader\n             */\n            request: function() {\n                return this.owner.request.apply( this.owner, arguments );\n            }\n        });\n    \n        // 扩展Uploader.\n        $.extend( Uploader.prototype, {\n    \n            /**\n             * @property {String | Array} [disableWidgets=undefined]\n             * @namespace options\n             * @for Uploader\n             * @description 默认所有 Uploader.register 了的 widget 都会被加载，如果禁用某一部分，请通过此 option 指定黑名单。\n             */\n    \n            // 覆写_init用来初始化widgets\n            _init: function() {\n                var me = this,\n                    widgets = me._widgets = [],\n                    deactives = me.options.disableWidgets || '';\n    \n                $.each( widgetClass, function( _, klass ) {\n                    (!deactives || !~deactives.indexOf( klass._name )) &&\n                        widgets.push( new klass( me ) );\n                });\n    \n                return _init.apply( me, arguments );\n            },\n    \n            request: function( apiName, args, callback ) {\n                var i = 0,\n                    widgets = this._widgets,\n                    len = widgets && widgets.length,\n                    rlts = [],\n                    dfds = [],\n                    widget, rlt, promise, key;\n    \n                args = isArrayLike( args ) ? args : [ args ];\n    \n                for ( ; i < len; i++ ) {\n                    widget = widgets[ i ];\n                    rlt = widget.invoke( apiName, args );\n    \n                    if ( rlt !== IGNORE ) {\n    \n                        // Deferred对象\n                        if ( Base.isPromise( rlt ) ) {\n                            dfds.push( rlt );\n                        } else {\n                            rlts.push( rlt );\n                        }\n                    }\n                }\n    \n                // 如果有callback，则用异步方式。\n                if ( callback || dfds.length ) {\n                    promise = Base.when.apply( Base, dfds );\n                    key = promise.pipe ? 'pipe' : 'then';\n    \n                    // 很重要不能删除。删除了会死循环。\n                    // 保证执行顺序。让callback总是在下一个 tick 中执行。\n                    return promise[ key ](function() {\n                                var deferred = Base.Deferred(),\n                                    args = arguments;\n    \n                                if ( args.length === 1 ) {\n                                    args = args[ 0 ];\n                                }\n    \n                                setTimeout(function() {\n                                    deferred.resolve( args );\n                                }, 1 );\n    \n                                return deferred.promise();\n                            })[ callback ? key : 'done' ]( callback || Base.noop );\n                } else {\n                    return rlts[ 0 ];\n                }\n            },\n    \n            destroy: function() {\n                _destroy.apply( this, arguments );\n                this._widgets = null;\n            }\n        });\n    \n        /**\n         * 添加组件\n         * @grammar Uploader.register(proto);\n         * @grammar Uploader.register(map, proto);\n         * @param  {object} responseMap API 名称与函数实现的映射\n         * @param  {object} proto 组件原型，构造函数通过 constructor 属性定义\n         * @method Uploader.register\n         * @for Uploader\n         * @example\n         * Uploader.register({\n         *     'make-thumb': 'makeThumb'\n         * }, {\n         *     init: function( options ) {},\n         *     makeThumb: function() {}\n         * });\n         *\n         * Uploader.register({\n         *     'make-thumb': function() {\n         *         \n         *     }\n         * });\n         */\n        Uploader.register = Widget.register = function( responseMap, widgetProto ) {\n            var map = { init: 'init', destroy: 'destroy', name: 'anonymous' },\n                klass;\n    \n            if ( arguments.length === 1 ) {\n                widgetProto = responseMap;\n    \n                // 自动生成 map 表。\n                $.each(widgetProto, function(key) {\n                    if ( key[0] === '_' || key === 'name' ) {\n                        key === 'name' && (map.name = widgetProto.name);\n                        return;\n                    }\n    \n                    map[key.replace(/[A-Z]/g, '-$&').toLowerCase()] = key;\n                });\n    \n            } else {\n                map = $.extend( map, responseMap );\n            }\n    \n            widgetProto.responseMap = map;\n            klass = Base.inherits( Widget, widgetProto );\n            klass._name = map.name;\n            widgetClass.push( klass );\n    \n            return klass;\n        };\n    \n        /**\n         * 删除插件，只有在注册时指定了名字的才能被删除。\n         * @grammar Uploader.unRegister(name);\n         * @param  {string} name 组件名字\n         * @method Uploader.unRegister\n         * @for Uploader\n         * @example\n         *\n         * Uploader.register({\n         *     name: 'custom',\n         *     \n         *     'make-thumb': function() {\n         *         \n         *     }\n         * });\n         *\n         * Uploader.unRegister('custom');\n         */\n        Uploader.unRegister = Widget.unRegister = function( name ) {\n            if ( !name || name === 'anonymous' ) {\n                return;\n            }\n            \n            // 删除指定的插件。\n            for ( var i = widgetClass.length; i--; ) {\n                if ( widgetClass[i]._name === name ) {\n                    widgetClass.splice(i, 1)\n                }\n            }\n        };\n    \n        return Widget;\n    });\n    /**\n     * @fileOverview DragAndDrop Widget。\n     */\n    define('widgets/filednd',[\n        'base',\n        'uploader',\n        'lib/dnd',\n        'widgets/widget'\n    ], function( Base, Uploader, Dnd ) {\n        var $ = Base.$;\n    \n        Uploader.options.dnd = '';\n    \n        /**\n         * @property {Selector} [dnd=undefined]  指定Drag And Drop拖拽的容器，如果不指定，则不启动。\n         * @namespace options\n         * @for Uploader\n         */\n        \n        /**\n         * @property {Selector} [disableGlobalDnd=false]  是否禁掉整个页面的拖拽功能，如果不禁用，图片拖进来的时候会默认被浏览器打开。\n         * @namespace options\n         * @for Uploader\n         */\n    \n        /**\n         * @event dndAccept\n         * @param {DataTransferItemList} items DataTransferItem\n         * @description 阻止此事件可以拒绝某些类型的文件拖入进来。目前只有 chrome 提供这样的 API，且只能通过 mime-type 验证。\n         * @for  Uploader\n         */\n        return Uploader.register({\n            name: 'dnd',\n            \n            init: function( opts ) {\n    \n                if ( !opts.dnd ||\n                        this.request('predict-runtime-type') !== 'html5' ) {\n                    return;\n                }\n    \n                var me = this,\n                    deferred = Base.Deferred(),\n                    options = $.extend({}, {\n                        disableGlobalDnd: opts.disableGlobalDnd,\n                        container: opts.dnd,\n                        accept: opts.accept\n                    }),\n                    dnd;\n    \n                this.dnd = dnd = new Dnd( options );\n    \n                dnd.once( 'ready', deferred.resolve );\n                dnd.on( 'drop', function( files ) {\n                    me.request( 'add-file', [ files ]);\n                });\n    \n                // 检测文件是否全部允许添加。\n                dnd.on( 'accept', function( items ) {\n                    return me.owner.trigger( 'dndAccept', items );\n                });\n    \n                dnd.init();\n    \n                return deferred.promise();\n            },\n    \n            destroy: function() {\n                this.dnd && this.dnd.destroy();\n            }\n        });\n    });\n    \n    /**\n     * @fileOverview 错误信息\n     */\n    define('lib/filepaste',[\n        'base',\n        'mediator',\n        'runtime/client'\n    ], function( Base, Mediator, RuntimeClent ) {\n    \n        var $ = Base.$;\n    \n        function FilePaste( opts ) {\n            opts = this.options = $.extend({}, opts );\n            opts.container = $( opts.container || document.body );\n            RuntimeClent.call( this, 'FilePaste' );\n        }\n    \n        Base.inherits( RuntimeClent, {\n            constructor: FilePaste,\n    \n            init: function() {\n                var me = this;\n    \n                me.connectRuntime( me.options, function() {\n                    me.exec('init');\n                    me.trigger('ready');\n                });\n            }\n        });\n    \n        Mediator.installTo( FilePaste.prototype );\n    \n        return FilePaste;\n    });\n    /**\n     * @fileOverview 组件基类。\n     */\n    define('widgets/filepaste',[\n        'base',\n        'uploader',\n        'lib/filepaste',\n        'widgets/widget'\n    ], function( Base, Uploader, FilePaste ) {\n        var $ = Base.$;\n    \n        /**\n         * @property {Selector} [paste=undefined]  指定监听paste事件的容器，如果不指定，不启用此功能。此功能为通过粘贴来添加截屏的图片。建议设置为`document.body`.\n         * @namespace options\n         * @for Uploader\n         */\n        return Uploader.register({\n            name: 'paste',\n            \n            init: function( opts ) {\n    \n                if ( !opts.paste ||\n                        this.request('predict-runtime-type') !== 'html5' ) {\n                    return;\n                }\n    \n                var me = this,\n                    deferred = Base.Deferred(),\n                    options = $.extend({}, {\n                        container: opts.paste,\n                        accept: opts.accept\n                    }),\n                    paste;\n    \n                this.paste = paste = new FilePaste( options );\n    \n                paste.once( 'ready', deferred.resolve );\n                paste.on( 'paste', function( files ) {\n                    me.owner.request( 'add-file', [ files ]);\n                });\n                paste.init();\n    \n                return deferred.promise();\n            },\n    \n            destroy: function() {\n                this.paste && this.paste.destroy();\n            }\n        });\n    });\n    /**\n     * @fileOverview Blob\n     */\n    define('lib/blob',[\n        'base',\n        'runtime/client'\n    ], function( Base, RuntimeClient ) {\n    \n        function Blob( ruid, source ) {\n            var me = this;\n    \n            me.source = source;\n            me.ruid = ruid;\n            this.size = source.size || 0;\n    \n            // 如果没有指定 mimetype, 但是知道文件后缀。\n            if ( !source.type && this.ext &&\n                    ~'jpg,jpeg,png,gif,bmp'.indexOf( this.ext ) ) {\n                this.type = 'image/' + (this.ext === 'jpg' ? 'jpeg' : this.ext);\n            } else {\n                this.type = source.type || 'application/octet-stream';\n            }\n    \n            RuntimeClient.call( me, 'Blob' );\n            this.uid = source.uid || this.uid;\n    \n            if ( ruid ) {\n                me.connectRuntime( ruid );\n            }\n        }\n    \n        Base.inherits( RuntimeClient, {\n            constructor: Blob,\n    \n            slice: function( start, end ) {\n                return this.exec( 'slice', start, end );\n            },\n    \n            getSource: function() {\n                return this.source;\n            }\n        });\n    \n        return Blob;\n    });\n    /**\n     * 为了统一化Flash的File和HTML5的File而存在。\n     * 以至于要调用Flash里面的File，也可以像调用HTML5版本的File一下。\n     * @fileOverview File\n     */\n    define('lib/file',[\n        'base',\n        'lib/blob'\n    ], function( Base, Blob ) {\n    \n        var uid = 1,\n            rExt = /\\.([^.]+)$/;\n    \n        function File( ruid, file ) {\n            var ext;\n    \n            this.name = file.name || ('untitled' + uid++);\n            ext = rExt.exec( file.name ) ? RegExp.$1.toLowerCase() : '';\n    \n            // todo 支持其他类型文件的转换。\n            // 如果有 mimetype, 但是文件名里面没有找出后缀规律\n            if ( !ext && file.type ) {\n                ext = /\\/(jpg|jpeg|png|gif|bmp)$/i.exec( file.type ) ?\n                        RegExp.$1.toLowerCase() : '';\n                this.name += '.' + ext;\n            }\n    \n            this.ext = ext;\n            this.lastModifiedDate = file.lastModifiedDate ||\n                    (new Date()).toLocaleString();\n    \n            Blob.apply( this, arguments );\n        }\n    \n        return Base.inherits( Blob, File );\n    });\n    \n    /**\n     * @fileOverview 错误信息\n     */\n    define('lib/filepicker',[\n        'base',\n        'runtime/client',\n        'lib/file'\n    ], function( Base, RuntimeClient, File ) {\n    \n        var $ = Base.$;\n    \n        function FilePicker( opts ) {\n            opts = this.options = $.extend({}, FilePicker.options, opts );\n    \n            opts.container = $( opts.id );\n    \n            if ( !opts.container.length ) {\n                throw new Error('按钮指定错误');\n            }\n    \n            opts.innerHTML = opts.innerHTML || opts.label ||\n                    opts.container.html() || '';\n    \n            opts.button = $( opts.button || document.createElement('div') );\n            opts.button.html( opts.innerHTML );\n            opts.container.html( opts.button );\n    \n            RuntimeClient.call( this, 'FilePicker', true );\n        }\n    \n        FilePicker.options = {\n            button: null,\n            container: null,\n            label: null,\n            innerHTML: null,\n            multiple: true,\n            accept: null,\n            name: 'file',\n            style: 'webuploader-pick'   //pick element class attribute, default is \"webuploader-pick\"\n        };\n    \n        Base.inherits( RuntimeClient, {\n            constructor: FilePicker,\n    \n            init: function() {\n                var me = this,\n                    opts = me.options,\n                    button = opts.button,\n                    style = opts.style;\n    \n                if (style)\n                    button.addClass('webuploader-pick');\n    \n                me.on( 'all', function( type ) {\n                    var files;\n    \n                    switch ( type ) {\n                        case 'mouseenter':\n                            if (style)\n                                button.addClass('webuploader-pick-hover');\n                            break;\n    \n                        case 'mouseleave':\n                            if (style)\n                                button.removeClass('webuploader-pick-hover');\n                            break;\n    \n                        case 'change':\n                            files = me.exec('getFiles');\n                            me.trigger( 'select', $.map( files, function( file ) {\n                                file = new File( me.getRuid(), file );\n    \n                                // 记录来源。\n                                file._refer = opts.container;\n                                return file;\n                            }), opts.container );\n                            break;\n                    }\n                });\n    \n                me.connectRuntime( opts, function() {\n                    me.refresh();\n                    me.exec( 'init', opts );\n                    me.trigger('ready');\n                });\n    \n                this._resizeHandler = Base.bindFn( this.refresh, this );\n                $( window ).on( 'resize', this._resizeHandler );\n            },\n    \n            refresh: function() {\n                var shimContainer = this.getRuntime().getContainer(),\n                    button = this.options.button,\n                    width = button.outerWidth ?\n                            button.outerWidth() : button.width(),\n    \n                    height = button.outerHeight ?\n                            button.outerHeight() : button.height(),\n    \n                    pos = button.offset();\n    \n                width && height && shimContainer.css({\n                    bottom: 'auto',\n                    right: 'auto',\n                    width: width + 'px',\n                    height: height + 'px'\n                }).offset( pos );\n            },\n    \n            enable: function() {\n                var btn = this.options.button;\n    \n                btn.removeClass('webuploader-pick-disable');\n                this.refresh();\n            },\n    \n            disable: function() {\n                var btn = this.options.button;\n    \n                this.getRuntime().getContainer().css({\n                    top: '-99999px'\n                });\n    \n                btn.addClass('webuploader-pick-disable');\n            },\n    \n            destroy: function() {\n                var btn = this.options.button;\n                $( window ).off( 'resize', this._resizeHandler );\n                btn.removeClass('webuploader-pick-disable webuploader-pick-hover ' +\n                    'webuploader-pick');\n            }\n        });\n    \n        return FilePicker;\n    });\n    \n    /**\n     * @fileOverview 文件选择相关\n     */\n    define('widgets/filepicker',[\n        'base',\n        'uploader',\n        'lib/filepicker',\n        'widgets/widget'\n    ], function( Base, Uploader, FilePicker ) {\n        var $ = Base.$;\n    \n        $.extend( Uploader.options, {\n    \n            /**\n             * @property {Selector | Object} [pick=undefined]\n             * @namespace options\n             * @for Uploader\n             * @description 指定选择文件的按钮容器，不指定则不创建按钮。\n             *\n             * * `id` {Seletor|dom} 指定选择文件的按钮容器，不指定则不创建按钮。**注意** 这里虽然写的是 id, 但是不是只支持 id, 还支持 class, 或者 dom 节点。\n             * * `label` {String} 请采用 `innerHTML` 代替\n             * * `innerHTML` {String} 指定按钮文字。不指定时优先从指定的容器中看是否自带文字。\n             * * `multiple` {Boolean} 是否开起同时选择多个文件能力。\n             */\n            pick: null,\n    \n            /**\n             * @property {Arroy} [accept=null]\n             * @namespace options\n             * @for Uploader\n             * @description 指定接受哪些类型的文件。 由于目前还有ext转mimeType表，所以这里需要分开指定。\n             *\n             * * `title` {String} 文字描述\n             * * `extensions` {String} 允许的文件后缀，不带点，多个用逗号分割。\n             * * `mimeTypes` {String} 多个用逗号分割。\n             *\n             * 如：\n             *\n             * ```\n             * {\n             *     title: 'Images',\n             *     extensions: 'gif,jpg,jpeg,bmp,png',\n             *     mimeTypes: 'image/*'\n             * }\n             * ```\n             */\n            accept: null/*{\n                title: 'Images',\n                extensions: 'gif,jpg,jpeg,bmp,png',\n                mimeTypes: 'image/*'\n            }*/\n        });\n    \n        return Uploader.register({\n            name: 'picker',\n    \n            init: function( opts ) {\n                this.pickers = [];\n                return opts.pick && this.addBtn( opts.pick );\n            },\n    \n            refresh: function() {\n                $.each( this.pickers, function() {\n                    this.refresh();\n                });\n            },\n    \n            /**\n             * @method addBtn\n             * @for Uploader\n             * @grammar addBtn( pick ) => Promise\n             * @description\n             * 添加文件选择按钮，如果一个按钮不够，需要调用此方法来添加。参数跟[options.pick](#WebUploader:Uploader:options)一致。\n             * @example\n             * uploader.addBtn({\n             *     id: '#btnContainer',\n             *     innerHTML: '选择文件'\n             * });\n             */\n            addBtn: function( pick ) {\n                var me = this,\n                    opts = me.options,\n                    accept = opts.accept,\n                    promises = [];\n    \n                if ( !pick ) {\n                    return;\n                }\n    \n                $.isPlainObject( pick ) || (pick = {\n                    id: pick\n                });\n    \n                $( pick.id ).each(function() {\n                    var options, picker, deferred;\n    \n                    deferred = Base.Deferred();\n    \n                    options = $.extend({}, pick, {\n                        accept: $.isPlainObject( accept ) ? [ accept ] : accept,\n                        swf: opts.swf,\n                        runtimeOrder: opts.runtimeOrder,\n                        id: this\n                    });\n    \n                    picker = new FilePicker( options );\n    \n                    picker.once( 'ready', deferred.resolve );\n                    picker.on( 'select', function( files ) {\n                        me.owner.request( 'add-file', [ files ]);\n                    });\n                    picker.on('dialogopen', function() {\n                        me.owner.trigger('dialogOpen', picker.button);\n                    });\n                    picker.init();\n    \n                    me.pickers.push( picker );\n    \n                    promises.push( deferred.promise() );\n                });\n    \n                return Base.when.apply( Base, promises );\n            },\n    \n            disable: function() {\n                $.each( this.pickers, function() {\n                    this.disable();\n                });\n            },\n    \n            enable: function() {\n                $.each( this.pickers, function() {\n                    this.enable();\n                });\n            },\n    \n            destroy: function() {\n                $.each( this.pickers, function() {\n                    this.destroy();\n                });\n                this.pickers = null;\n            }\n        });\n    });\n    /**\n     * @fileOverview Image\n     */\n    define('lib/image',[\n        'base',\n        'runtime/client',\n        'lib/blob'\n    ], function( Base, RuntimeClient, Blob ) {\n        var $ = Base.$;\n    \n        // 构造器。\n        function Image( opts ) {\n            this.options = $.extend({}, Image.options, opts );\n            RuntimeClient.call( this, 'Image' );\n    \n            this.on( 'load', function() {\n                this._info = this.exec('info');\n                this._meta = this.exec('meta');\n            });\n        }\n    \n        // 默认选项。\n        Image.options = {\n    \n            // 默认的图片处理质量\n            quality: 90,\n    \n            // 是否裁剪\n            crop: false,\n    \n            // 是否保留头部信息\n            preserveHeaders: false,\n    \n            // 是否允许放大。\n            allowMagnify: false\n        };\n    \n        // 继承RuntimeClient.\n        Base.inherits( RuntimeClient, {\n            constructor: Image,\n    \n            info: function( val ) {\n    \n                // setter\n                if ( val ) {\n                    this._info = val;\n                    return this;\n                }\n    \n                // getter\n                return this._info;\n            },\n    \n            meta: function( val ) {\n    \n                // setter\n                if ( val ) {\n                    this._meta = val;\n                    return this;\n                }\n    \n                // getter\n                return this._meta;\n            },\n    \n            loadFromBlob: function( blob ) {\n                var me = this,\n                    ruid = blob.getRuid();\n    \n                this.connectRuntime( ruid, function() {\n                    me.exec( 'init', me.options );\n                    me.exec( 'loadFromBlob', blob );\n                });\n            },\n    \n            resize: function() {\n                var args = Base.slice( arguments );\n                return this.exec.apply( this, [ 'resize' ].concat( args ) );\n            },\n    \n            crop: function() {\n                var args = Base.slice( arguments );\n                return this.exec.apply( this, [ 'crop' ].concat( args ) );\n            },\n    \n            getAsDataUrl: function( type ) {\n                return this.exec( 'getAsDataUrl', type );\n            },\n    \n            getAsBlob: function( type ) {\n                var blob = this.exec( 'getAsBlob', type );\n    \n                return new Blob( this.getRuid(), blob );\n            }\n        });\n    \n        return Image;\n    });\n    /**\n     * @fileOverview 图片操作, 负责预览图片和上传前压缩图片\n     */\n    define('widgets/image',[\n        'base',\n        'uploader',\n        'lib/image',\n        'widgets/widget'\n    ], function( Base, Uploader, Image ) {\n    \n        var $ = Base.$,\n            throttle;\n    \n        // 根据要处理的文件大小来节流，一次不能处理太多，会卡。\n        throttle = (function( max ) {\n            var occupied = 0,\n                waiting = [],\n                tick = function() {\n                    var item;\n    \n                    while ( waiting.length && occupied < max ) {\n                        item = waiting.shift();\n                        occupied += item[ 0 ];\n                        item[ 1 ]();\n                    }\n                };\n    \n            return function( emiter, size, cb ) {\n                waiting.push([ size, cb ]);\n                emiter.once( 'destroy', function() {\n                    occupied -= size;\n                    setTimeout( tick, 1 );\n                });\n                setTimeout( tick, 1 );\n            };\n        })( 5 * 1024 * 1024 );\n    \n        $.extend( Uploader.options, {\n    \n            /**\n             * @property {Object} [thumb]\n             * @namespace options\n             * @for Uploader\n             * @description 配置生成缩略图的选项。\n             *\n             * 默认为：\n             *\n             * ```javascript\n             * {\n             *     width: 110,\n             *     height: 110,\n             *\n             *     // 图片质量，只有type为`image/jpeg`的时候才有效。\n             *     quality: 70,\n             *\n             *     // 是否允许放大，如果想要生成小图的时候不失真，此选项应该设置为false.\n             *     allowMagnify: true,\n             *\n             *     // 是否允许裁剪。\n             *     crop: true,\n             *\n             *     // 为空的话则保留原有图片格式。\n             *     // 否则强制转换成指定的类型。\n             *     type: 'image/jpeg'\n             * }\n             * ```\n             */\n            thumb: {\n                width: 110,\n                height: 110,\n                quality: 70,\n                allowMagnify: true,\n                crop: true,\n                preserveHeaders: false,\n    \n                // 为空的话则保留原有图片格式。\n                // 否则强制转换成指定的类型。\n                // IE 8下面 base64 大小不能超过 32K 否则预览失败，而非 jpeg 编码的图片很可\n                // 能会超过 32k, 所以这里设置成预览的时候都是 image/jpeg\n                type: 'image/jpeg'\n            },\n    \n            /**\n             * @property {Object} [compress]\n             * @namespace options\n             * @for Uploader\n             * @description 配置压缩的图片的选项。如果此选项为`false`, 则图片在上传前不进行压缩。\n             *\n             * 默认为：\n             *\n             * ```javascript\n             * {\n             *     width: 1600,\n             *     height: 1600,\n             *\n             *     // 图片质量，只有type为`image/jpeg`的时候才有效。\n             *     quality: 90,\n             *\n             *     // 是否允许放大，如果想要生成小图的时候不失真，此选项应该设置为false.\n             *     allowMagnify: false,\n             *\n             *     // 是否允许裁剪。\n             *     crop: false,\n             *\n             *     // 是否保留头部meta信息。\n             *     preserveHeaders: true,\n             *\n             *     // 如果发现压缩后文件大小比原来还大，则使用原来图片\n             *     // 此属性可能会影响图片自动纠正功能\n             *     noCompressIfLarger: false,\n             *\n             *     // 单位字节，如果图片大小小于此值，不会采用压缩。\n             *     compressSize: 0\n             * }\n             * ```\n             */\n            compress: {\n                width: 1600,\n                height: 1600,\n                quality: 90,\n                allowMagnify: false,\n                crop: false,\n                preserveHeaders: true\n            }\n        });\n    \n        return Uploader.register({\n    \n            name: 'image',\n    \n    \n            /**\n             * 生成缩略图，此过程为异步，所以需要传入`callback`。\n             * 通常情况在图片加入队里后调用此方法来生成预览图以增强交互效果。\n             *\n             * 当 width 或者 height 的值介于 0 - 1 时，被当成百分比使用。\n             *\n             * `callback`中可以接收到两个参数。\n             * * 第一个为error，如果生成缩略图有错误，此error将为真。\n             * * 第二个为ret, 缩略图的Data URL值。\n             *\n             * **注意**\n             * Date URL在IE6/7中不支持，所以不用调用此方法了，直接显示一张暂不支持预览图片好了。\n             * 也可以借助服务端，将 base64 数据传给服务端，生成一个临时文件供预览。\n             *\n             * @method makeThumb\n             * @grammar makeThumb( file, callback ) => undefined\n             * @grammar makeThumb( file, callback, width, height ) => undefined\n             * @for Uploader\n             * @example\n             *\n             * uploader.on( 'fileQueued', function( file ) {\n             *     var $li = ...;\n             *\n             *     uploader.makeThumb( file, function( error, ret ) {\n             *         if ( error ) {\n             *             $li.text('预览错误');\n             *         } else {\n             *             $li.append('<img alt=\"\" src=\"' + ret + '\" />');\n             *         }\n             *     });\n             *\n             * });\n             */\n            makeThumb: function( file, cb, width, height ) {\n                var opts, image;\n    \n                file = this.request( 'get-file', file );\n    \n                // 只预览图片格式。\n                if ( !file.type.match( /^image/ ) ) {\n                    cb( true );\n                    return;\n                }\n    \n                opts = $.extend({}, this.options.thumb );\n    \n                // 如果传入的是object.\n                if ( $.isPlainObject( width ) ) {\n                    opts = $.extend( opts, width );\n                    width = null;\n                }\n    \n                width = width || opts.width;\n                height = height || opts.height;\n    \n                image = new Image( opts );\n    \n                image.once( 'load', function() {\n                    file._info = file._info || image.info();\n                    file._meta = file._meta || image.meta();\n    \n                    // 如果 width 的值介于 0 - 1\n                    // 说明设置的是百分比。\n                    if ( width <= 1 && width > 0 ) {\n                        width = file._info.width * width;\n                    }\n    \n                    // 同样的规则应用于 height\n                    if ( height <= 1 && height > 0 ) {\n                        height = file._info.height * height;\n                    }\n    \n                    image.resize( width, height );\n                });\n    \n                // 当 resize 完后\n                image.once( 'complete', function() {\n                    cb( false, image.getAsDataUrl( opts.type ) );\n                    image.destroy();\n                });\n    \n                image.once( 'error', function( reason ) {\n                    cb( reason || true );\n                    image.destroy();\n                });\n    \n                throttle( image, file.source.size, function() {\n                    file._info && image.info( file._info );\n                    file._meta && image.meta( file._meta );\n                    image.loadFromBlob( file.source );\n                });\n            },\n    \n            beforeSendFile: function( file ) {\n                var opts = this.options.compress || this.options.resize,\n                    compressSize = opts && opts.compressSize || 0,\n                    noCompressIfLarger = opts && opts.noCompressIfLarger || false,\n                    image, deferred;\n    \n                file = this.request( 'get-file', file );\n    \n                // 只压缩 jpeg 图片格式。\n                // gif 可能会丢失针\n                // bmp png 基本上尺寸都不大，且压缩比比较小。\n                if ( !opts || !~'image/jpeg,image/jpg'.indexOf( file.type ) ||\n                        file.size < compressSize ||\n                        file._compressed ) {\n                    return;\n                }\n    \n                opts = $.extend({}, opts );\n                deferred = Base.Deferred();\n    \n                image = new Image( opts );\n    \n                deferred.always(function() {\n                    image.destroy();\n                    image = null;\n                });\n                image.once( 'error', deferred.reject );\n                image.once( 'load', function() {\n                    var width = opts.width,\n                        height = opts.height;\n    \n                    file._info = file._info || image.info();\n                    file._meta = file._meta || image.meta();\n    \n                    // 如果 width 的值介于 0 - 1\n                    // 说明设置的是百分比。\n                    if ( width <= 1 && width > 0 ) {\n                        width = file._info.width * width;\n                    }\n    \n                    // 同样的规则应用于 height\n                    if ( height <= 1 && height > 0 ) {\n                        height = file._info.height * height;\n                    }\n    \n                    image.resize( width, height );\n                });\n    \n                image.once( 'complete', function() {\n                    var blob, size;\n    \n                    // 移动端 UC / qq 浏览器的无图模式下\n                    // ctx.getImageData 处理大图的时候会报 Exception\n                    // INDEX_SIZE_ERR: DOM Exception 1\n                    try {\n                        blob = image.getAsBlob( opts.type );\n    \n                        size = file.size;\n    \n                        // 如果压缩后，比原来还大则不用压缩后的。\n                        if ( !noCompressIfLarger || blob.size < size ) {\n                            // file.source.destroy && file.source.destroy();\n                            file.source = blob;\n                            file.size = blob.size;\n    \n                            file.trigger( 'resize', blob.size, size );\n                        }\n    \n                        // 标记，避免重复压缩。\n                        file._compressed = true;\n                        deferred.resolve();\n                    } catch ( e ) {\n                        // 出错了直接继续，让其上传原始图片\n                        deferred.resolve();\n                    }\n                });\n    \n                file._info && image.info( file._info );\n                file._meta && image.meta( file._meta );\n    \n                image.loadFromBlob( file.source );\n                return deferred.promise();\n            }\n        });\n    });\n    /**\n     * @fileOverview 文件属性封装\n     */\n    define('file',[\n        'base',\n        'mediator'\n    ], function( Base, Mediator ) {\n    \n        var $ = Base.$,\n            idPrefix = 'WU_FILE_',\n            idSuffix = 0,\n            rExt = /\\.([^.]+)$/,\n            statusMap = {};\n    \n        function gid() {\n            return idPrefix + idSuffix++;\n        }\n    \n        /**\n         * 文件类\n         * @class File\n         * @constructor 构造函数\n         * @grammar new File( source ) => File\n         * @param {Lib.File} source [lib.File](#Lib.File)实例, 此source对象是带有Runtime信息的。\n         */\n        function WUFile( source ) {\n    \n            /**\n             * 文件名，包括扩展名（后缀）\n             * @property name\n             * @type {string}\n             */\n            this.name = source.name || 'Untitled';\n    \n            /**\n             * 文件体积（字节）\n             * @property size\n             * @type {uint}\n             * @default 0\n             */\n            this.size = source.size || 0;\n    \n            /**\n             * 文件MIMETYPE类型，与文件类型的对应关系请参考[http://t.cn/z8ZnFny](http://t.cn/z8ZnFny)\n             * @property type\n             * @type {string}\n             * @default 'application/octet-stream'\n             */\n            this.type = source.type || 'application/octet-stream';\n    \n            /**\n             * 文件最后修改日期\n             * @property lastModifiedDate\n             * @type {int}\n             * @default 当前时间戳\n             */\n            this.lastModifiedDate = source.lastModifiedDate || (new Date() * 1);\n    \n            /**\n             * 文件ID，每个对象具有唯一ID，与文件名无关\n             * @property id\n             * @type {string}\n             */\n            this.id = gid();\n    \n            /**\n             * 文件扩展名，通过文件名获取，例如test.png的扩展名为png\n             * @property ext\n             * @type {string}\n             */\n            this.ext = rExt.exec( this.name ) ? RegExp.$1 : '';\n    \n    \n            /**\n             * 状态文字说明。在不同的status语境下有不同的用途。\n             * @property statusText\n             * @type {string}\n             */\n            this.statusText = '';\n    \n            // 存储文件状态，防止通过属性直接修改\n            statusMap[ this.id ] = WUFile.Status.INITED;\n    \n            this.source = source;\n            this.loaded = 0;\n    \n            this.on( 'error', function( msg ) {\n                this.setStatus( WUFile.Status.ERROR, msg );\n            });\n        }\n    \n        $.extend( WUFile.prototype, {\n    \n            /**\n             * 设置状态，状态变化时会触发`change`事件。\n             * @method setStatus\n             * @grammar setStatus( status[, statusText] );\n             * @param {File.Status|String} status [文件状态值](#WebUploader:File:File.Status)\n             * @param {String} [statusText=''] 状态说明，常在error时使用，用http, abort,server等来标记是由于什么原因导致文件错误。\n             */\n            setStatus: function( status, text ) {\n    \n                var prevStatus = statusMap[ this.id ];\n    \n                typeof text !== 'undefined' && (this.statusText = text);\n    \n                if ( status !== prevStatus ) {\n                    statusMap[ this.id ] = status;\n                    /**\n                     * 文件状态变化\n                     * @event statuschange\n                     */\n                    this.trigger( 'statuschange', status, prevStatus );\n                }\n    \n            },\n    \n            /**\n             * 获取文件状态\n             * @return {File.Status}\n             * @example\n                     文件状态具体包括以下几种类型：\n                     {\n                         // 初始化\n                        INITED:     0,\n                        // 已入队列\n                        QUEUED:     1,\n                        // 正在上传\n                        PROGRESS:     2,\n                        // 上传出错\n                        ERROR:         3,\n                        // 上传成功\n                        COMPLETE:     4,\n                        // 上传取消\n                        CANCELLED:     5\n                    }\n             */\n            getStatus: function() {\n                return statusMap[ this.id ];\n            },\n    \n            /**\n             * 获取文件原始信息。\n             * @return {*}\n             */\n            getSource: function() {\n                return this.source;\n            },\n    \n            destroy: function() {\n                this.off();\n                delete statusMap[ this.id ];\n            }\n        });\n    \n        Mediator.installTo( WUFile.prototype );\n    \n        /**\n         * 文件状态值，具体包括以下几种类型：\n         * * `inited` 初始状态\n         * * `queued` 已经进入队列, 等待上传\n         * * `progress` 上传中\n         * * `complete` 上传完成。\n         * * `error` 上传出错，可重试\n         * * `interrupt` 上传中断，可续传。\n         * * `invalid` 文件不合格，不能重试上传。会自动从队列中移除。\n         * * `cancelled` 文件被移除。\n         * @property {Object} Status\n         * @namespace File\n         * @class File\n         * @static\n         */\n        WUFile.Status = {\n            INITED:     'inited',    // 初始状态\n            QUEUED:     'queued',    // 已经进入队列, 等待上传\n            PROGRESS:   'progress',    // 上传中\n            ERROR:      'error',    // 上传出错，可重试\n            COMPLETE:   'complete',    // 上传完成。\n            CANCELLED:  'cancelled',    // 上传取消。\n            INTERRUPT:  'interrupt',    // 上传中断，可续传。\n            INVALID:    'invalid'    // 文件不合格，不能重试上传。\n        };\n    \n        return WUFile;\n    });\n    \n    /**\n     * @fileOverview 文件队列\n     */\n    define('queue',[\n        'base',\n        'mediator',\n        'file'\n    ], function( Base, Mediator, WUFile ) {\n    \n        var $ = Base.$,\n            STATUS = WUFile.Status;\n    \n        /**\n         * 文件队列, 用来存储各个状态中的文件。\n         * @class Queue\n         * @extends Mediator\n         */\n        function Queue() {\n    \n            /**\n             * 统计文件数。\n             * * `numOfQueue` 队列中的文件数。\n             * * `numOfSuccess` 上传成功的文件数\n             * * `numOfCancel` 被取消的文件数\n             * * `numOfProgress` 正在上传中的文件数\n             * * `numOfUploadFailed` 上传错误的文件数。\n             * * `numOfInvalid` 无效的文件数。\n             * * `numofDeleted` 被移除的文件数。\n             * @property {Object} stats\n             */\n            this.stats = {\n                numOfQueue: 0,\n                numOfSuccess: 0,\n                numOfCancel: 0,\n                numOfProgress: 0,\n                numOfUploadFailed: 0,\n                numOfInvalid: 0,\n                numofDeleted: 0,\n                numofInterrupt: 0\n            };\n    \n            // 上传队列，仅包括等待上传的文件\n            this._queue = [];\n    \n            // 存储所有文件\n            this._map = {};\n        }\n    \n        $.extend( Queue.prototype, {\n    \n            /**\n             * 将新文件加入对队列尾部\n             *\n             * @method append\n             * @param  {File} file   文件对象\n             */\n            append: function( file ) {\n                this._queue.push( file );\n                this._fileAdded( file );\n                return this;\n            },\n    \n            /**\n             * 将新文件加入对队列头部\n             *\n             * @method prepend\n             * @param  {File} file   文件对象\n             */\n            prepend: function( file ) {\n                this._queue.unshift( file );\n                this._fileAdded( file );\n                return this;\n            },\n    \n            /**\n             * 获取文件对象\n             *\n             * @method getFile\n             * @param  {String} fileId   文件ID\n             * @return {File}\n             */\n            getFile: function( fileId ) {\n                if ( typeof fileId !== 'string' ) {\n                    return fileId;\n                }\n                return this._map[ fileId ];\n            },\n    \n            /**\n             * 从队列中取出一个指定状态的文件。\n             * @grammar fetch( status ) => File\n             * @method fetch\n             * @param {String} status [文件状态值](#WebUploader:File:File.Status)\n             * @return {File} [File](#WebUploader:File)\n             */\n            fetch: function( status ) {\n                var len = this._queue.length,\n                    i, file;\n    \n                status = status || STATUS.QUEUED;\n    \n                for ( i = 0; i < len; i++ ) {\n                    file = this._queue[ i ];\n    \n                    if ( status === file.getStatus() ) {\n                        return file;\n                    }\n                }\n    \n                return null;\n            },\n    \n            /**\n             * 对队列进行排序，能够控制文件上传顺序。\n             * @grammar sort( fn ) => undefined\n             * @method sort\n             * @param {Function} fn 排序方法\n             */\n            sort: function( fn ) {\n                if ( typeof fn === 'function' ) {\n                    this._queue.sort( fn );\n                }\n            },\n    \n            /**\n             * 获取指定类型的文件列表, 列表中每一个成员为[File](#WebUploader:File)对象。\n             * @grammar getFiles( [status1[, status2 ...]] ) => Array\n             * @method getFiles\n             * @param {String} [status] [文件状态值](#WebUploader:File:File.Status)\n             */\n            getFiles: function() {\n                var sts = [].slice.call( arguments, 0 ),\n                    ret = [],\n                    i = 0,\n                    len = this._queue.length,\n                    file;\n    \n                for ( ; i < len; i++ ) {\n                    file = this._queue[ i ];\n    \n                    if ( sts.length && !~$.inArray( file.getStatus(), sts ) ) {\n                        continue;\n                    }\n    \n                    ret.push( file );\n                }\n    \n                return ret;\n            },\n    \n            /**\n             * 在队列中删除文件。\n             * @grammar removeFile( file ) => Array\n             * @method removeFile\n             * @param {File} 文件对象。\n             */\n            removeFile: function( file ) {\n                var me = this,\n                    existing = this._map[ file.id ];\n    \n                if ( existing ) {\n                    delete this._map[ file.id ];\n                    file.destroy();\n                    this.stats.numofDeleted++;\n                }\n            },\n    \n            _fileAdded: function( file ) {\n                var me = this,\n                    existing = this._map[ file.id ];\n    \n                if ( !existing ) {\n                    this._map[ file.id ] = file;\n    \n                    file.on( 'statuschange', function( cur, pre ) {\n                        me._onFileStatusChange( cur, pre );\n                    });\n                }\n            },\n    \n            _onFileStatusChange: function( curStatus, preStatus ) {\n                var stats = this.stats;\n    \n                switch ( preStatus ) {\n                    case STATUS.PROGRESS:\n                        stats.numOfProgress--;\n                        break;\n    \n                    case STATUS.QUEUED:\n                        stats.numOfQueue --;\n                        break;\n    \n                    case STATUS.ERROR:\n                        stats.numOfUploadFailed--;\n                        break;\n    \n                    case STATUS.INVALID:\n                        stats.numOfInvalid--;\n                        break;\n    \n                    case STATUS.INTERRUPT:\n                        stats.numofInterrupt--;\n                        break;\n                }\n    \n                switch ( curStatus ) {\n                    case STATUS.QUEUED:\n                        stats.numOfQueue++;\n                        break;\n    \n                    case STATUS.PROGRESS:\n                        stats.numOfProgress++;\n                        break;\n    \n                    case STATUS.ERROR:\n                        stats.numOfUploadFailed++;\n                        break;\n    \n                    case STATUS.COMPLETE:\n                        stats.numOfSuccess++;\n                        break;\n    \n                    case STATUS.CANCELLED:\n                        stats.numOfCancel++;\n                        break;\n    \n    \n                    case STATUS.INVALID:\n                        stats.numOfInvalid++;\n                        break;\n    \n                    case STATUS.INTERRUPT:\n                        stats.numofInterrupt++;\n                        break;\n                }\n            }\n    \n        });\n    \n        Mediator.installTo( Queue.prototype );\n    \n        return Queue;\n    });\n    /**\n     * @fileOverview 队列\n     */\n    define('widgets/queue',[\n        'base',\n        'uploader',\n        'queue',\n        'file',\n        'lib/file',\n        'runtime/client',\n        'widgets/widget'\n    ], function( Base, Uploader, Queue, WUFile, File, RuntimeClient ) {\n    \n        var $ = Base.$,\n            rExt = /\\.\\w+$/,\n            Status = WUFile.Status;\n    \n        return Uploader.register({\n            name: 'queue',\n    \n            init: function( opts ) {\n                var me = this,\n                    deferred, len, i, item, arr, accept, runtime;\n    \n                if ( $.isPlainObject( opts.accept ) ) {\n                    opts.accept = [ opts.accept ];\n                }\n    \n                // accept中的中生成匹配正则。\n                if ( opts.accept ) {\n                    arr = [];\n    \n                    for ( i = 0, len = opts.accept.length; i < len; i++ ) {\n                        item = opts.accept[ i ].extensions;\n                        item && arr.push( item );\n                    }\n    \n                    if ( arr.length ) {\n                        accept = '\\\\.' + arr.join(',')\n                                .replace( /,/g, '$|\\\\.' )\n                                .replace( /\\*/g, '.*' ) + '$';\n                    }\n    \n                    me.accept = new RegExp( accept, 'i' );\n                }\n    \n                me.queue = new Queue();\n                me.stats = me.queue.stats;\n    \n                // 如果当前不是html5运行时，那就算了。\n                // 不执行后续操作\n                if ( this.request('predict-runtime-type') !== 'html5' ) {\n                    return;\n                }\n    \n                // 创建一个 html5 运行时的 placeholder\n                // 以至于外部添加原生 File 对象的时候能正确包裹一下供 webuploader 使用。\n                deferred = Base.Deferred();\n                this.placeholder = runtime = new RuntimeClient('Placeholder');\n                runtime.connectRuntime({\n                    runtimeOrder: 'html5'\n                }, function() {\n                    me._ruid = runtime.getRuid();\n                    deferred.resolve();\n                });\n                return deferred.promise();\n            },\n    \n    \n            // 为了支持外部直接添加一个原生File对象。\n            _wrapFile: function( file ) {\n                if ( !(file instanceof WUFile) ) {\n    \n                    if ( !(file instanceof File) ) {\n                        if ( !this._ruid ) {\n                            throw new Error('Can\\'t add external files.');\n                        }\n                        file = new File( this._ruid, file );\n                    }\n    \n                    file = new WUFile( file );\n                }\n    \n                return file;\n            },\n    \n            // 判断文件是否可以被加入队列\n            acceptFile: function( file ) {\n                var invalid = !file || !file.size || this.accept &&\n    \n                        // 如果名字中有后缀，才做后缀白名单处理。\n                        rExt.exec( file.name ) && !this.accept.test( file.name );\n    \n                return !invalid;\n            },\n    \n    \n            /**\n             * @event beforeFileQueued\n             * @param {File} file File对象\n             * @description 当文件被加入队列之前触发，此事件的handler返回值为`false`，则此文件不会被添加进入队列。\n             * @for  Uploader\n             */\n    \n            /**\n             * @event fileQueued\n             * @param {File} file File对象\n             * @description 当文件被加入队列以后触发。\n             * @for  Uploader\n             */\n    \n            _addFile: function( file ) {\n                var me = this;\n    \n                file = me._wrapFile( file );\n    \n                // 不过类型判断允许不允许，先派送 `beforeFileQueued`\n                if ( !me.owner.trigger( 'beforeFileQueued', file ) ) {\n                    return;\n                }\n    \n                // 类型不匹配，则派送错误事件，并返回。\n                if ( !me.acceptFile( file ) ) {\n                    me.owner.trigger( 'error', 'Q_TYPE_DENIED', file );\n                    return;\n                }\n    \n                me.queue.append( file );\n                me.owner.trigger( 'fileQueued', file );\n                return file;\n            },\n    \n            getFile: function( fileId ) {\n                return this.queue.getFile( fileId );\n            },\n    \n            /**\n             * @event filesQueued\n             * @param {File} files 数组，内容为原始File(lib/File）对象。\n             * @description 当一批文件添加进队列以后触发。\n             * @for  Uploader\n             */\n            \n            /**\n             * @property {Boolean} [auto=false]\n             * @namespace options\n             * @for Uploader\n             * @description 设置为 true 后，不需要手动调用上传，有文件选择即开始上传。\n             * \n             */\n    \n            /**\n             * @method addFiles\n             * @grammar addFiles( file ) => undefined\n             * @grammar addFiles( [file1, file2 ...] ) => undefined\n             * @param {Array of File or File} [files] Files 对象 数组\n             * @description 添加文件到队列\n             * @for  Uploader\n             */\n            addFile: function( files ) {\n                var me = this;\n    \n                if ( !files.length ) {\n                    files = [ files ];\n                }\n    \n                files = $.map( files, function( file ) {\n                    return me._addFile( file );\n                });\n    \t\t\t\n    \t\t\tif ( files.length ) {\n    \n                    me.owner.trigger( 'filesQueued', files );\n    \n    \t\t\t\tif ( me.options.auto ) {\n    \t\t\t\t\tsetTimeout(function() {\n    \t\t\t\t\t\tme.request('start-upload');\n    \t\t\t\t\t}, 20 );\n    \t\t\t\t}\n                }\n            },\n    \n            getStats: function() {\n                return this.stats;\n            },\n    \n            /**\n             * @event fileDequeued\n             * @param {File} file File对象\n             * @description 当文件被移除队列后触发。\n             * @for  Uploader\n             */\n    \n             /**\n             * @method removeFile\n             * @grammar removeFile( file ) => undefined\n             * @grammar removeFile( id ) => undefined\n             * @grammar removeFile( file, true ) => undefined\n             * @grammar removeFile( id, true ) => undefined\n             * @param {File|id} file File对象或这File对象的id\n             * @description 移除某一文件, 默认只会标记文件状态为已取消，如果第二个参数为 `true` 则会从 queue 中移除。\n             * @for  Uploader\n             * @example\n             *\n             * $li.on('click', '.remove-this', function() {\n             *     uploader.removeFile( file );\n             * })\n             */\n            removeFile: function( file, remove ) {\n                var me = this;\n    \n                file = file.id ? file : me.queue.getFile( file );\n    \n                this.request( 'cancel-file', file );\n    \n                if ( remove ) {\n                    this.queue.removeFile( file );\n                }\n            },\n    \n            /**\n             * @method getFiles\n             * @grammar getFiles() => Array\n             * @grammar getFiles( status1, status2, status... ) => Array\n             * @description 返回指定状态的文件集合，不传参数将返回所有状态的文件。\n             * @for  Uploader\n             * @example\n             * console.log( uploader.getFiles() );    // => all files\n             * console.log( uploader.getFiles('error') )    // => all error files.\n             */\n            getFiles: function() {\n                return this.queue.getFiles.apply( this.queue, arguments );\n            },\n    \n            fetchFile: function() {\n                return this.queue.fetch.apply( this.queue, arguments );\n            },\n    \n            /**\n             * @method retry\n             * @grammar retry() => undefined\n             * @grammar retry( file ) => undefined\n             * @description 重试上传，重试指定文件，或者从出错的文件开始重新上传。\n             * @for  Uploader\n             * @example\n             * function retry() {\n             *     uploader.retry();\n             * }\n             */\n            retry: function( file, noForceStart ) {\n                var me = this,\n                    files, i, len;\n    \n                if ( file ) {\n                    file = file.id ? file : me.queue.getFile( file );\n                    file.setStatus( Status.QUEUED );\n                    noForceStart || me.request('start-upload');\n                    return;\n                }\n    \n                files = me.queue.getFiles( Status.ERROR );\n                i = 0;\n                len = files.length;\n    \n                for ( ; i < len; i++ ) {\n                    file = files[ i ];\n                    file.setStatus( Status.QUEUED );\n                }\n    \n                me.request('start-upload');\n            },\n    \n            /**\n             * @method sort\n             * @grammar sort( fn ) => undefined\n             * @description 排序队列中的文件，在上传之前调整可以控制上传顺序。\n             * @for  Uploader\n             */\n            sortFiles: function() {\n                return this.queue.sort.apply( this.queue, arguments );\n            },\n    \n            /**\n             * @event reset\n             * @description 当 uploader 被重置的时候触发。\n             * @for  Uploader\n             */\n    \n            /**\n             * @method reset\n             * @grammar reset() => undefined\n             * @description 重置uploader。目前只重置了队列。\n             * @for  Uploader\n             * @example\n             * uploader.reset();\n             */\n            reset: function() {\n                this.owner.trigger('reset');\n                this.queue = new Queue();\n                this.stats = this.queue.stats;\n            },\n    \n            destroy: function() {\n                this.reset();\n                this.placeholder && this.placeholder.destroy();\n            }\n        });\n    \n    });\n    /**\n     * @fileOverview 添加获取Runtime相关信息的方法。\n     */\n    define('widgets/runtime',[\n        'uploader',\n        'runtime/runtime',\n        'widgets/widget'\n    ], function( Uploader, Runtime ) {\n    \n        Uploader.support = function() {\n            return Runtime.hasRuntime.apply( Runtime, arguments );\n        };\n    \n        /**\n         * @property {Object} [runtimeOrder=html5,flash]\n         * @namespace options\n         * @for Uploader\n         * @description 指定运行时启动顺序。默认会想尝试 html5 是否支持，如果支持则使用 html5, 否则则使用 flash.\n         *\n         * 可以将此值设置成 `flash`，来强制使用 flash 运行时。\n         */\n    \n        return Uploader.register({\n            name: 'runtime',\n    \n            init: function() {\n                if ( !this.predictRuntimeType() ) {\n                    throw Error('Runtime Error');\n                }\n            },\n    \n            /**\n             * 预测Uploader将采用哪个`Runtime`\n             * @grammar predictRuntimeType() => String\n             * @method predictRuntimeType\n             * @for  Uploader\n             */\n            predictRuntimeType: function() {\n                var orders = this.options.runtimeOrder || Runtime.orders,\n                    type = this.type,\n                    i, len;\n    \n                if ( !type ) {\n                    orders = orders.split( /\\s*,\\s*/g );\n    \n                    for ( i = 0, len = orders.length; i < len; i++ ) {\n                        if ( Runtime.hasRuntime( orders[ i ] ) ) {\n                            this.type = type = orders[ i ];\n                            break;\n                        }\n                    }\n                }\n    \n                return type;\n            }\n        });\n    });\n    /**\n     * @fileOverview Transport\n     */\n    define('lib/transport',[\n        'base',\n        'runtime/client',\n        'mediator'\n    ], function( Base, RuntimeClient, Mediator ) {\n    \n        var $ = Base.$;\n    \n        function Transport( opts ) {\n            var me = this;\n    \n            opts = me.options = $.extend( true, {}, Transport.options, opts || {} );\n            RuntimeClient.call( this, 'Transport' );\n    \n            this._blob = null;\n            this._formData = opts.formData || {};\n            this._headers = opts.headers || {};\n    \n            this.on( 'progress', this._timeout );\n            this.on( 'load error', function() {\n                me.trigger( 'progress', 1 );\n                clearTimeout( me._timer );\n            });\n        }\n    \n        Transport.options = {\n            server: '',\n            method: 'POST',\n    \n            // 跨域时，是否允许携带cookie, 只有html5 runtime才有效\n            withCredentials: false,\n            fileVal: 'file',\n            timeout: 2 * 60 * 1000,    // 2分钟\n            formData: {},\n            headers: {},\n            sendAsBinary: false\n        };\n    \n        $.extend( Transport.prototype, {\n    \n            // 添加Blob, 只能添加一次，最后一次有效。\n            appendBlob: function( key, blob, filename ) {\n                var me = this,\n                    opts = me.options;\n    \n                if ( me.getRuid() ) {\n                    me.disconnectRuntime();\n                }\n    \n                // 连接到blob归属的同一个runtime.\n                me.connectRuntime( blob.ruid, function() {\n                    me.exec('init');\n                });\n    \n                me._blob = blob;\n                opts.fileVal = key || opts.fileVal;\n                opts.filename = filename || opts.filename;\n            },\n    \n            // 添加其他字段\n            append: function( key, value ) {\n                if ( typeof key === 'object' ) {\n                    $.extend( this._formData, key );\n                } else {\n                    this._formData[ key ] = value;\n                }\n            },\n    \n            setRequestHeader: function( key, value ) {\n                if ( typeof key === 'object' ) {\n                    $.extend( this._headers, key );\n                } else {\n                    this._headers[ key ] = value;\n                }\n            },\n    \n            send: function( method ) {\n                this.exec( 'send', method );\n                this._timeout();\n            },\n    \n            abort: function() {\n                clearTimeout( this._timer );\n                return this.exec('abort');\n            },\n    \n            destroy: function() {\n                this.trigger('destroy');\n                this.off();\n                this.exec('destroy');\n                this.disconnectRuntime();\n            },\n    \n            getResponse: function() {\n                return this.exec('getResponse');\n            },\n    \n            getResponseAsJson: function() {\n                return this.exec('getResponseAsJson');\n            },\n    \n            getStatus: function() {\n                return this.exec('getStatus');\n            },\n    \n            _timeout: function() {\n                var me = this,\n                    duration = me.options.timeout;\n    \n                if ( !duration ) {\n                    return;\n                }\n    \n                clearTimeout( me._timer );\n                me._timer = setTimeout(function() {\n                    me.abort();\n                    me.trigger( 'error', 'timeout' );\n                }, duration );\n            }\n    \n        });\n    \n        // 让Transport具备事件功能。\n        Mediator.installTo( Transport.prototype );\n    \n        return Transport;\n    });\n    /**\n     * @fileOverview 负责文件上传相关。\n     */\n    define('widgets/upload',[\n        'base',\n        'uploader',\n        'file',\n        'lib/transport',\n        'widgets/widget'\n    ], function( Base, Uploader, WUFile, Transport ) {\n    \n        var $ = Base.$,\n            isPromise = Base.isPromise,\n            Status = WUFile.Status;\n    \n        // 添加默认配置项\n        $.extend( Uploader.options, {\n    \n    \n            /**\n             * @property {Boolean} [prepareNextFile=false]\n             * @namespace options\n             * @for Uploader\n             * @description 是否允许在文件传输时提前把下一个文件准备好。\n             * 对于一个文件的准备工作比较耗时，比如图片压缩，md5序列化。\n             * 如果能提前在当前文件传输期处理，可以节省总体耗时。\n             */\n            prepareNextFile: false,\n    \n            /**\n             * @property {Boolean} [chunked=false]\n             * @namespace options\n             * @for Uploader\n             * @description 是否要分片处理大文件上传。\n             */\n            chunked: false,\n    \n            /**\n             * @property {Boolean} [chunkSize=5242880]\n             * @namespace options\n             * @for Uploader\n             * @description 如果要分片，分多大一片？ 默认大小为5M.\n             */\n            chunkSize: 5 * 1024 * 1024,\n    \n            /**\n             * @property {Boolean} [chunkRetry=2]\n             * @namespace options\n             * @for Uploader\n             * @description 如果某个分片由于网络问题出错，允许自动重传多少次？\n             */\n            chunkRetry: 2,\n    \n            /**\n             * @property {Boolean} [threads=3]\n             * @namespace options\n             * @for Uploader\n             * @description 上传并发数。允许同时最大上传进程数。\n             */\n            threads: 3,\n    \n    \n            /**\n             * @property {Object} [formData={}]\n             * @namespace options\n             * @for Uploader\n             * @description 文件上传请求的参数表，每次发送都会发送此对象中的参数。\n             */\n            formData: {}\n    \n            /**\n             * @property {Object} [fileVal='file']\n             * @namespace options\n             * @for Uploader\n             * @description 设置文件上传域的name。\n             */\n    \n            /**\n             * @property {Object} [sendAsBinary=false]\n             * @namespace options\n             * @for Uploader\n             * @description 是否已二进制的流的方式发送文件，这样整个上传内容`php://input`都为文件内容，\n             * 其他参数在$_GET数组中。\n             */\n        });\n    \n        // 负责将文件切片。\n        function CuteFile( file, chunkSize ) {\n            var pending = [],\n                blob = file.source,\n                total = blob.size,\n                chunks = chunkSize ? Math.ceil( total / chunkSize ) : 1,\n                start = 0,\n                index = 0,\n                len, api;\n    \n            api = {\n                file: file,\n    \n                has: function() {\n                    return !!pending.length;\n                },\n    \n                shift: function() {\n                    return pending.shift();\n                },\n    \n                unshift: function( block ) {\n                    pending.unshift( block );\n                }\n            };\n    \n            while ( index < chunks ) {\n                len = Math.min( chunkSize, total - start );\n    \n                pending.push({\n                    file: file,\n                    start: start,\n                    end: chunkSize ? (start + len) : total,\n                    total: total,\n                    chunks: chunks,\n                    chunk: index++,\n                    cuted: api\n                });\n                start += len;\n            }\n    \n            file.blocks = pending.concat();\n            file.remaning = pending.length;\n    \n            return api;\n        }\n    \n        Uploader.register({\n            name: 'upload',\n    \n            init: function() {\n                var owner = this.owner,\n                    me = this;\n    \n                this.runing = false;\n                this.progress = false;\n    \n                owner\n                    .on( 'startUpload', function() {\n                        me.progress = true;\n                    })\n                    .on( 'uploadFinished', function() {\n                        me.progress = false;\n                    });\n    \n                // 记录当前正在传的数据，跟threads相关\n                this.pool = [];\n    \n                // 缓存分好片的文件。\n                this.stack = [];\n    \n                // 缓存即将上传的文件。\n                this.pending = [];\n    \n                // 跟踪还有多少分片在上传中但是没有完成上传。\n                this.remaning = 0;\n                this.__tick = Base.bindFn( this._tick, this );\n    \n                // 销毁上传相关的属性。\n                owner.on( 'uploadComplete', function( file ) {\n    \n                    // 把其他块取消了。\n                    file.blocks && $.each( file.blocks, function( _, v ) {\n                        v.transport && (v.transport.abort(), v.transport.destroy());\n                        delete v.transport;\n                    });\n    \n                    delete file.blocks;\n                    delete file.remaning;\n                });\n            },\n    \n            reset: function() {\n                this.request( 'stop-upload', true );\n                this.runing = false;\n                this.pool = [];\n                this.stack = [];\n                this.pending = [];\n                this.remaning = 0;\n                this._trigged = false;\n                this._promise = null;\n            },\n    \n            /**\n             * @event startUpload\n             * @description 当开始上传流程时触发。\n             * @for  Uploader\n             */\n    \n            /**\n             * 开始上传。此方法可以从初始状态调用开始上传流程，也可以从暂停状态调用，继续上传流程。\n             *\n             * 可以指定开始某一个文件。\n             * @grammar upload() => undefined\n             * @grammar upload( file | fileId) => undefined\n             * @method upload\n             * @for  Uploader\n             */\n            startUpload: function(file) {\n                var me = this;\n    \n                // 移出invalid的文件\n                $.each( me.request( 'get-files', Status.INVALID ), function() {\n                    me.request( 'remove-file', this );\n                });\n    \n                // 如果指定了开始某个文件，则只开始指定的文件。\n                if ( file ) {\n                    file = file.id ? file : me.request( 'get-file', file );\n    \n                    if (file.getStatus() === Status.INTERRUPT) {\n                        file.setStatus( Status.QUEUED );\n    \n                        $.each( me.pool, function( _, v ) {\n    \n                            // 之前暂停过。\n                            if (v.file !== file) {\n                                return;\n                            }\n    \n                            v.transport && v.transport.send();\n                            file.setStatus( Status.PROGRESS );\n                        });\n    \n                        \n                    } else if (file.getStatus() !== Status.PROGRESS) {\n                        file.setStatus( Status.QUEUED );\n                    }\n                } else {\n                    $.each( me.request( 'get-files', [ Status.INITED ] ), function() {\n                        this.setStatus( Status.QUEUED );\n                    });\n                }\n    \n                if ( me.runing ) {\n                    return Base.nextTick( me.__tick );\n                }\n    \n                me.runing = true;\n                var files = [];\n    \n                // 如果有暂停的，则续传\n                file || $.each( me.pool, function( _, v ) {\n                    var file = v.file;\n    \n                    if ( file.getStatus() === Status.INTERRUPT ) {\n                        me._trigged = false;\n                        files.push(file);\n                        v.transport && v.transport.send();\n                    }\n                });\n    \n                $.each(files, function() {\n                    this.setStatus( Status.PROGRESS );\n                });\n    \n                file || $.each( me.request( 'get-files',\n                        Status.INTERRUPT ), function() {\n                    this.setStatus( Status.PROGRESS );\n                });\n    \n                me._trigged = false;\n                Base.nextTick( me.__tick );\n                me.owner.trigger('startUpload');\n            },\n    \n            /**\n             * @event stopUpload\n             * @description 当开始上传流程暂停时触发。\n             * @for  Uploader\n             */\n    \n            /**\n             * 暂停上传。第一个参数为是否中断上传当前正在上传的文件。\n             *\n             * 如果第一个参数是文件，则只暂停指定文件。\n             * @grammar stop() => undefined\n             * @grammar stop( true ) => undefined\n             * @grammar stop( file ) => undefined\n             * @method stop\n             * @for  Uploader\n             */\n            stopUpload: function( file, interrupt ) {\n                var me = this,\n                    block;\n    \n                if (file === true) {\n                    interrupt = file;\n                    file = null;\n                }\n    \n                if ( me.runing === false ) {\n                    return;\n                }\n    \n                // 如果只是暂停某个文件。\n                if ( file ) {\n                    file = file.id ? file : me.request( 'get-file', file );\n    \n                    if ( file.getStatus() !== Status.PROGRESS &&\n                            file.getStatus() !== Status.QUEUED ) {\n                        return;\n                    }\n    \n                    file.setStatus( Status.INTERRUPT );\n    \n    \n                    $.each( me.pool, function( _, v ) {\n    \n                        // 只 abort 指定的文件。\n                        if (v.file === file) {\n                            block = v;\n                            return false;\n                        }\n                    });\n    \n                    block.transport && block.transport.abort();\n    \n                    if (interrupt) {\n                        me._putback(block);\n                        me._popBlock(block);\n                    }\n    \n                    return Base.nextTick( me.__tick );\n                }\n    \n                me.runing = false;\n    \n                // 正在准备中的文件。\n                if (this._promise && this._promise.file) {\n                    this._promise.file.setStatus( Status.INTERRUPT );\n                }\n    \n                interrupt && $.each( me.pool, function( _, v ) {\n                    v.transport && v.transport.abort();\n                    v.file.setStatus( Status.INTERRUPT );\n                });\n    \n                me.owner.trigger('stopUpload');\n            },\n    \n            /**\n             * @method cancelFile\n             * @grammar cancelFile( file ) => undefined\n             * @grammar cancelFile( id ) => undefined\n             * @param {File|id} file File对象或这File对象的id\n             * @description 标记文件状态为已取消, 同时将中断文件传输。\n             * @for  Uploader\n             * @example\n             *\n             * $li.on('click', '.remove-this', function() {\n             *     uploader.cancelFile( file );\n             * })\n             */\n            cancelFile: function( file ) {\n                file = file.id ? file : this.request( 'get-file', file );\n    \n                // 如果正在上传。\n                file.blocks && $.each( file.blocks, function( _, v ) {\n                    var _tr = v.transport;\n    \n                    if ( _tr ) {\n                        _tr.abort();\n                        _tr.destroy();\n                        delete v.transport;\n                    }\n                });\n    \n                file.setStatus( Status.CANCELLED );\n                this.owner.trigger( 'fileDequeued', file );\n            },\n    \n            /**\n             * 判断`Uplaode`r是否正在上传中。\n             * @grammar isInProgress() => Boolean\n             * @method isInProgress\n             * @for  Uploader\n             */\n            isInProgress: function() {\n                return !!this.progress;\n            },\n    \n            _getStats: function() {\n                return this.request('get-stats');\n            },\n    \n            /**\n             * 掉过一个文件上传，直接标记指定文件为已上传状态。\n             * @grammar skipFile( file ) => undefined\n             * @method skipFile\n             * @for  Uploader\n             */\n            skipFile: function( file, status ) {\n                file = file.id ? file : this.request( 'get-file', file );\n    \n                file.setStatus( status || Status.COMPLETE );\n                file.skipped = true;\n    \n                // 如果正在上传。\n                file.blocks && $.each( file.blocks, function( _, v ) {\n                    var _tr = v.transport;\n    \n                    if ( _tr ) {\n                        _tr.abort();\n                        _tr.destroy();\n                        delete v.transport;\n                    }\n                });\n    \n                this.owner.trigger( 'uploadSkip', file );\n            },\n    \n            /**\n             * @event uploadFinished\n             * @description 当所有文件上传结束时触发。\n             * @for  Uploader\n             */\n            _tick: function() {\n                var me = this,\n                    opts = me.options,\n                    fn, val;\n    \n                // 上一个promise还没有结束，则等待完成后再执行。\n                if ( me._promise ) {\n                    return me._promise.always( me.__tick );\n                }\n    \n                // 还有位置，且还有文件要处理的话。\n                if ( me.pool.length < opts.threads && (val = me._nextBlock()) ) {\n                    me._trigged = false;\n    \n                    fn = function( val ) {\n                        me._promise = null;\n    \n                        // 有可能是reject过来的，所以要检测val的类型。\n                        val && val.file && me._startSend( val );\n                        Base.nextTick( me.__tick );\n                    };\n    \n                    me._promise = isPromise( val ) ? val.always( fn ) : fn( val );\n    \n                // 没有要上传的了，且没有正在传输的了。\n                } else if ( !me.remaning && !me._getStats().numOfQueue &&\n                    !me._getStats().numofInterrupt ) {\n                    me.runing = false;\n    \n                    me._trigged || Base.nextTick(function() {\n                        me.owner.trigger('uploadFinished');\n                    });\n                    me._trigged = true;\n                }\n            },\n    \n            _putback: function(block) {\n                var idx;\n    \n                block.cuted.unshift(block);\n                idx = this.stack.indexOf(block.cuted);\n    \n                if (!~idx) {\n                    this.stack.unshift(block.cuted);\n                }\n            },\n    \n            _getStack: function() {\n                var i = 0,\n                    act;\n    \n                while ( (act = this.stack[ i++ ]) ) {\n                    if ( act.has() && act.file.getStatus() === Status.PROGRESS ) {\n                        return act;\n                    } else if (!act.has() ||\n                            act.file.getStatus() !== Status.PROGRESS &&\n                            act.file.getStatus() !== Status.INTERRUPT ) {\n    \n                        // 把已经处理完了的，或者，状态为非 progress（上传中）、\n                        // interupt（暂停中） 的移除。\n                        this.stack.splice( --i, 1 );\n                    }\n                }\n    \n                return null;\n            },\n    \n            _nextBlock: function() {\n                var me = this,\n                    opts = me.options,\n                    act, next, done, preparing;\n    \n                // 如果当前文件还有没有需要传输的，则直接返回剩下的。\n                if ( (act = this._getStack()) ) {\n    \n                    // 是否提前准备下一个文件\n                    if ( opts.prepareNextFile && !me.pending.length ) {\n                        me._prepareNextFile();\n                    }\n    \n                    return act.shift();\n    \n                // 否则，如果正在运行，则准备下一个文件，并等待完成后返回下个分片。\n                } else if ( me.runing ) {\n    \n                    // 如果缓存中有，则直接在缓存中取，没有则去queue中取。\n                    if ( !me.pending.length && me._getStats().numOfQueue ) {\n                        me._prepareNextFile();\n                    }\n    \n                    next = me.pending.shift();\n                    done = function( file ) {\n                        if ( !file ) {\n                            return null;\n                        }\n    \n                        act = CuteFile( file, opts.chunked ? opts.chunkSize : 0 );\n                        me.stack.push(act);\n                        return act.shift();\n                    };\n    \n                    // 文件可能还在prepare中，也有可能已经完全准备好了。\n                    if ( isPromise( next) ) {\n                        preparing = next.file;\n                        next = next[ next.pipe ? 'pipe' : 'then' ]( done );\n                        next.file = preparing;\n                        return next;\n                    }\n    \n                    return done( next );\n                }\n            },\n    \n    \n            /**\n             * @event uploadStart\n             * @param {File} file File对象\n             * @description 某个文件开始上传前触发，一个文件只会触发一次。\n             * @for  Uploader\n             */\n            _prepareNextFile: function() {\n                var me = this,\n                    file = me.request('fetch-file'),\n                    pending = me.pending,\n                    promise;\n    \n                if ( file ) {\n                    promise = me.request( 'before-send-file', file, function() {\n    \n                        // 有可能文件被skip掉了。文件被skip掉后，状态坑定不是Queued.\n                        if ( file.getStatus() === Status.PROGRESS ||\n                            file.getStatus() === Status.INTERRUPT ) {\n                            return file;\n                        }\n    \n                        return me._finishFile( file );\n                    });\n    \n                    me.owner.trigger( 'uploadStart', file );\n                    file.setStatus( Status.PROGRESS );\n    \n                    promise.file = file;\n    \n                    // 如果还在pending中，则替换成文件本身。\n                    promise.done(function() {\n                        var idx = $.inArray( promise, pending );\n    \n                        ~idx && pending.splice( idx, 1, file );\n                    });\n    \n                    // befeore-send-file的钩子就有错误发生。\n                    promise.fail(function( reason ) {\n                        file.setStatus( Status.ERROR, reason );\n                        me.owner.trigger( 'uploadError', file, reason );\n                        me.owner.trigger( 'uploadComplete', file );\n                    });\n    \n                    pending.push( promise );\n                }\n            },\n    \n            // 让出位置了，可以让其他分片开始上传\n            _popBlock: function( block ) {\n                var idx = $.inArray( block, this.pool );\n    \n                this.pool.splice( idx, 1 );\n                block.file.remaning--;\n                this.remaning--;\n            },\n    \n            // 开始上传，可以被掉过。如果promise被reject了，则表示跳过此分片。\n            _startSend: function( block ) {\n                var me = this,\n                    file = block.file,\n                    promise;\n    \n                // 有可能在 before-send-file 的 promise 期间改变了文件状态。\n                // 如：暂停，取消\n                // 我们不能中断 promise, 但是可以在 promise 完后，不做上传操作。\n                if ( file.getStatus() !== Status.PROGRESS ) {\n    \n                    // 如果是中断，则还需要放回去。\n                    if (file.getStatus() === Status.INTERRUPT) {\n                        me._putback(block);\n                    }\n    \n                    return;\n                }\n    \n                me.pool.push( block );\n                me.remaning++;\n    \n                // 如果没有分片，则直接使用原始的。\n                // 不会丢失content-type信息。\n                block.blob = block.chunks === 1 ? file.source :\n                        file.source.slice( block.start, block.end );\n    \n                // hook, 每个分片发送之前可能要做些异步的事情。\n                promise = me.request( 'before-send', block, function() {\n    \n                    // 有可能文件已经上传出错了，所以不需要再传输了。\n                    if ( file.getStatus() === Status.PROGRESS ) {\n                        me._doSend( block );\n                    } else {\n                        me._popBlock( block );\n                        Base.nextTick( me.__tick );\n                    }\n                });\n    \n                // 如果为fail了，则跳过此分片。\n                promise.fail(function() {\n                    if ( file.remaning === 1 ) {\n                        me._finishFile( file ).always(function() {\n                            block.percentage = 1;\n                            me._popBlock( block );\n                            me.owner.trigger( 'uploadComplete', file );\n                            Base.nextTick( me.__tick );\n                        });\n                    } else {\n                        block.percentage = 1;\n                        me.updateFileProgress( file );\n                        me._popBlock( block );\n                        Base.nextTick( me.__tick );\n                    }\n                });\n            },\n    \n    \n            /**\n             * @event uploadBeforeSend\n             * @param {Object} object\n             * @param {Object} data 默认的上传参数，可以扩展此对象来控制上传参数。\n             * @param {Object} headers 可以扩展此对象来控制上传头部。\n             * @description 当某个文件的分块在发送前触发，主要用来询问是否要添加附带参数，大文件在开起分片上传的前提下此事件可能会触发多次。\n             * @for  Uploader\n             */\n    \n            /**\n             * @event uploadAccept\n             * @param {Object} object\n             * @param {Object} ret 服务端的返回数据，json格式，如果服务端不是json格式，从ret._raw中取数据，自行解析。\n             * @description 当某个文件上传到服务端响应后，会派送此事件来询问服务端响应是否有效。如果此事件handler返回值为`false`, 则此文件将派送`server`类型的`uploadError`事件。\n             * @for  Uploader\n             */\n    \n            /**\n             * @event uploadProgress\n             * @param {File} file File对象\n             * @param {Number} percentage 上传进度\n             * @description 上传过程中触发，携带上传进度。\n             * @for  Uploader\n             */\n    \n    \n            /**\n             * @event uploadError\n             * @param {File} file File对象\n             * @param {String} reason 出错的code\n             * @description 当文件上传出错时触发。\n             * @for  Uploader\n             */\n    \n            /**\n             * @event uploadSuccess\n             * @param {File} file File对象\n             * @param {Object} response 服务端返回的数据\n             * @description 当文件上传成功时触发。\n             * @for  Uploader\n             */\n    \n            /**\n             * @event uploadComplete\n             * @param {File} [file] File对象\n             * @description 不管成功或者失败，文件上传完成时触发。\n             * @for  Uploader\n             */\n    \n            // 做上传操作。\n            _doSend: function( block ) {\n                var me = this,\n                    owner = me.owner,\n                    opts = me.options,\n                    file = block.file,\n                    tr = new Transport( opts ),\n                    data = $.extend({}, opts.formData ),\n                    headers = $.extend({}, opts.headers ),\n                    requestAccept, ret;\n    \n                block.transport = tr;\n    \n                tr.on( 'destroy', function() {\n                    delete block.transport;\n                    me._popBlock( block );\n                    Base.nextTick( me.__tick );\n                });\n    \n                // 广播上传进度。以文件为单位。\n                tr.on( 'progress', function( percentage ) {\n                    block.percentage = percentage;\n                    me.updateFileProgress( file );\n                });\n    \n                // 用来询问，是否返回的结果是有错误的。\n                requestAccept = function( reject ) {\n                    var fn;\n    \n                    ret = tr.getResponseAsJson() || {};\n                    ret._raw = tr.getResponse();\n                    fn = function( value ) {\n                        reject = value;\n                    };\n    \n                    // 服务端响应了，不代表成功了，询问是否响应正确。\n                    if ( !owner.trigger( 'uploadAccept', block, ret, fn ) ) {\n                        reject = reject || 'server';\n                    }\n    \n                    return reject;\n                };\n    \n                // 尝试重试，然后广播文件上传出错。\n                tr.on( 'error', function( type, flag ) {\n                    block.retried = block.retried || 0;\n    \n                    // 自动重试\n                    if ( block.chunks > 1 && ~'http,abort'.indexOf( type ) &&\n                            block.retried < opts.chunkRetry ) {\n    \n                        block.retried++;\n                        tr.send();\n    \n                    } else {\n    \n                        // http status 500 ~ 600\n                        if ( !flag && type === 'server' ) {\n                            type = requestAccept( type );\n                        }\n    \n                        file.setStatus( Status.ERROR, type );\n                        owner.trigger( 'uploadError', file, type );\n                        owner.trigger( 'uploadComplete', file );\n                    }\n                });\n    \n                // 上传成功\n                tr.on( 'load', function() {\n                    var reason;\n    \n                    // 如果非预期，转向上传出错。\n                    if ( (reason = requestAccept()) ) {\n                        tr.trigger( 'error', reason, true );\n                        return;\n                    }\n    \n                    // 全部上传完成。\n                    if ( file.remaning === 1 ) {\n                        me._finishFile( file, ret );\n                    } else {\n                        tr.destroy();\n                    }\n                });\n    \n                // 配置默认的上传字段。\n                data = $.extend( data, {\n                    id: file.id,\n                    name: file.name,\n                    type: file.type,\n                    lastModifiedDate: file.lastModifiedDate,\n                    size: file.size\n                });\n    \n                block.chunks > 1 && $.extend( data, {\n                    chunks: block.chunks,\n                    chunk: block.chunk\n                });\n    \n                // 在发送之间可以添加字段什么的。。。\n                // 如果默认的字段不够使用，可以通过监听此事件来扩展\n                owner.trigger( 'uploadBeforeSend', block, data, headers );\n    \n                // 开始发送。\n                tr.appendBlob( opts.fileVal, block.blob, file.name );\n                tr.append( data );\n                tr.setRequestHeader( headers );\n                tr.send();\n            },\n    \n            // 完成上传。\n            _finishFile: function( file, ret, hds ) {\n                var owner = this.owner;\n    \n                return owner\n                        .request( 'after-send-file', arguments, function() {\n                            file.setStatus( Status.COMPLETE );\n                            owner.trigger( 'uploadSuccess', file, ret, hds );\n                        })\n                        .fail(function( reason ) {\n    \n                            // 如果外部已经标记为invalid什么的，不再改状态。\n                            if ( file.getStatus() === Status.PROGRESS ) {\n                                file.setStatus( Status.ERROR, reason );\n                            }\n    \n                            owner.trigger( 'uploadError', file, reason );\n                        })\n                        .always(function() {\n                            owner.trigger( 'uploadComplete', file );\n                        });\n            },\n    \n            updateFileProgress: function(file) {\n                var totalPercent = 0,\n                    uploaded = 0;\n    \n                if (!file.blocks) {\n                    return;\n                }\n    \n                $.each( file.blocks, function( _, v ) {\n                    uploaded += (v.percentage || 0) * (v.end - v.start);\n                });\n    \n                totalPercent = uploaded / file.size;\n                this.owner.trigger( 'uploadProgress', file, totalPercent || 0 );\n            }\n    \n        });\n    });\n    \n    /**\n     * @fileOverview 各种验证，包括文件总大小是否超出、单文件是否超出和文件是否重复。\n     */\n    \n    define('widgets/validator',[\n        'base',\n        'uploader',\n        'file',\n        'widgets/widget'\n    ], function( Base, Uploader, WUFile ) {\n    \n        var $ = Base.$,\n            validators = {},\n            api;\n    \n        /**\n         * @event error\n         * @param {String} type 错误类型。\n         * @description 当validate不通过时，会以派送错误事件的形式通知调用者。通过`upload.on('error', handler)`可以捕获到此类错误，目前有以下错误会在特定的情况下派送错来。\n         *\n         * * `Q_EXCEED_NUM_LIMIT` 在设置了`fileNumLimit`且尝试给`uploader`添加的文件数量超出这个值时派送。\n         * * `Q_EXCEED_SIZE_LIMIT` 在设置了`Q_EXCEED_SIZE_LIMIT`且尝试给`uploader`添加的文件总大小超出这个值时派送。\n         * * `Q_TYPE_DENIED` 当文件类型不满足时触发。。\n         * @for  Uploader\n         */\n    \n        // 暴露给外面的api\n        api = {\n    \n            // 添加验证器\n            addValidator: function( type, cb ) {\n                validators[ type ] = cb;\n            },\n    \n            // 移除验证器\n            removeValidator: function( type ) {\n                delete validators[ type ];\n            }\n        };\n    \n        // 在Uploader初始化的时候启动Validators的初始化\n        Uploader.register({\n            name: 'validator',\n    \n            init: function() {\n                var me = this;\n                Base.nextTick(function() {\n                    $.each( validators, function() {\n                        this.call( me.owner );\n                    });\n                });\n            }\n        });\n    \n        /**\n         * @property {int} [fileNumLimit=undefined]\n         * @namespace options\n         * @for Uploader\n         * @description 验证文件总数量, 超出则不允许加入队列。\n         */\n        api.addValidator( 'fileNumLimit', function() {\n            var uploader = this,\n                opts = uploader.options,\n                count = 0,\n                max = parseInt( opts.fileNumLimit, 10 ),\n                flag = true;\n    \n            if ( !max ) {\n                return;\n            }\n    \n            uploader.on( 'beforeFileQueued', function( file ) {\n    \n                if ( count >= max && flag ) {\n                    flag = false;\n                    this.trigger( 'error', 'Q_EXCEED_NUM_LIMIT', max, file );\n                    setTimeout(function() {\n                        flag = true;\n                    }, 1 );\n                }\n    \n                return count >= max ? false : true;\n            });\n    \n            uploader.on( 'fileQueued', function() {\n                count++;\n            });\n    \n            uploader.on( 'fileDequeued', function() {\n                count--;\n            });\n    \n            uploader.on( 'reset', function() {\n                count = 0;\n            });\n        });\n    \n    \n        /**\n         * @property {int} [fileSizeLimit=undefined]\n         * @namespace options\n         * @for Uploader\n         * @description 验证文件总大小是否超出限制, 超出则不允许加入队列。\n         */\n        api.addValidator( 'fileSizeLimit', function() {\n            var uploader = this,\n                opts = uploader.options,\n                count = 0,\n                max = parseInt( opts.fileSizeLimit, 10 ),\n                flag = true;\n    \n            if ( !max ) {\n                return;\n            }\n    \n            uploader.on( 'beforeFileQueued', function( file ) {\n                var invalid = count + file.size > max;\n    \n                if ( invalid && flag ) {\n                    flag = false;\n                    this.trigger( 'error', 'Q_EXCEED_SIZE_LIMIT', max, file );\n                    setTimeout(function() {\n                        flag = true;\n                    }, 1 );\n                }\n    \n                return invalid ? false : true;\n            });\n    \n            uploader.on( 'fileQueued', function( file ) {\n                count += file.size;\n            });\n    \n            uploader.on( 'fileDequeued', function( file ) {\n                count -= file.size;\n            });\n    \n            uploader.on( 'reset', function() {\n                count = 0;\n            });\n        });\n    \n        /**\n         * @property {int} [fileSingleSizeLimit=undefined]\n         * @namespace options\n         * @for Uploader\n         * @description 验证单个文件大小是否超出限制, 超出则不允许加入队列。\n         */\n        api.addValidator( 'fileSingleSizeLimit', function() {\n            var uploader = this,\n                opts = uploader.options,\n                max = opts.fileSingleSizeLimit;\n    \n            if ( !max ) {\n                return;\n            }\n    \n            uploader.on( 'beforeFileQueued', function( file ) {\n    \n                if ( file.size > max ) {\n                    file.setStatus( WUFile.Status.INVALID, 'exceed_size' );\n                    this.trigger( 'error', 'F_EXCEED_SIZE', max, file );\n                    return false;\n                }\n    \n            });\n    \n        });\n    \n        /**\n         * @property {Boolean} [duplicate=undefined]\n         * @namespace options\n         * @for Uploader\n         * @description 去重， 根据文件名字、文件大小和最后修改时间来生成hash Key.\n         */\n        api.addValidator( 'duplicate', function() {\n            var uploader = this,\n                opts = uploader.options,\n                mapping = {};\n    \n            if ( opts.duplicate ) {\n                return;\n            }\n    \n            function hashString( str ) {\n                var hash = 0,\n                    i = 0,\n                    len = str.length,\n                    _char;\n    \n                for ( ; i < len; i++ ) {\n                    _char = str.charCodeAt( i );\n                    hash = _char + (hash << 6) + (hash << 16) - hash;\n                }\n    \n                return hash;\n            }\n    \n            uploader.on( 'beforeFileQueued', function( file ) {\n                var hash = file.__hash || (file.__hash = hashString( file.name +\n                        file.size + file.lastModifiedDate ));\n    \n                // 已经重复了\n                if ( mapping[ hash ] ) {\n                    this.trigger( 'error', 'F_DUPLICATE', file );\n                    return false;\n                }\n            });\n    \n            uploader.on( 'fileQueued', function( file ) {\n                var hash = file.__hash;\n    \n                hash && (mapping[ hash ] = true);\n            });\n    \n            uploader.on( 'fileDequeued', function( file ) {\n                var hash = file.__hash;\n    \n                hash && (delete mapping[ hash ]);\n            });\n    \n            uploader.on( 'reset', function() {\n                mapping = {};\n            });\n        });\n    \n        return api;\n    });\n    \n    /**\n     * @fileOverview Md5\n     */\n    define('lib/md5',[\n        'runtime/client',\n        'mediator'\n    ], function( RuntimeClient, Mediator ) {\n    \n        function Md5() {\n            RuntimeClient.call( this, 'Md5' );\n        }\n    \n        // 让 Md5 具备事件功能。\n        Mediator.installTo( Md5.prototype );\n    \n        Md5.prototype.loadFromBlob = function( blob ) {\n            var me = this;\n    \n            if ( me.getRuid() ) {\n                me.disconnectRuntime();\n            }\n    \n            // 连接到blob归属的同一个runtime.\n            me.connectRuntime( blob.ruid, function() {\n                me.exec('init');\n                me.exec( 'loadFromBlob', blob );\n            });\n        };\n    \n        Md5.prototype.getResult = function() {\n            return this.exec('getResult');\n        };\n    \n        return Md5;\n    });\n    /**\n     * @fileOverview 图片操作, 负责预览图片和上传前压缩图片\n     */\n    define('widgets/md5',[\n        'base',\n        'uploader',\n        'lib/md5',\n        'lib/blob',\n        'widgets/widget'\n    ], function( Base, Uploader, Md5, Blob ) {\n    \n        return Uploader.register({\n            name: 'md5',\n    \n    \n            /**\n             * 计算文件 md5 值，返回一个 promise 对象，可以监听 progress 进度。\n             *\n             *\n             * @method md5File\n             * @grammar md5File( file[, start[, end]] ) => promise\n             * @for Uploader\n             * @example\n             *\n             * uploader.on( 'fileQueued', function( file ) {\n             *     var $li = ...;\n             *\n             *     uploader.md5File( file )\n             *\n             *         // 及时显示进度\n             *         .progress(function(percentage) {\n             *             console.log('Percentage:', percentage);\n             *         })\n             *\n             *         // 完成\n             *         .then(function(val) {\n             *             console.log('md5 result:', val);\n             *         });\n             *\n             * });\n             */\n            md5File: function( file, start, end ) {\n                var md5 = new Md5(),\n                    deferred = Base.Deferred(),\n                    blob = (file instanceof Blob) ? file :\n                        this.request( 'get-file', file ).source;\n    \n                md5.on( 'progress load', function( e ) {\n                    e = e || {};\n                    deferred.notify( e.total ? e.loaded / e.total : 1 );\n                });\n    \n                md5.on( 'complete', function() {\n                    deferred.resolve( md5.getResult() );\n                });\n    \n                md5.on( 'error', function( reason ) {\n                    deferred.reject( reason );\n                });\n    \n                if ( arguments.length > 1 ) {\n                    start = start || 0;\n                    end = end || 0;\n                    start < 0 && (start = blob.size + start);\n                    end < 0 && (end = blob.size + end);\n                    end = Math.min( end, blob.size );\n                    blob = blob.slice( start, end );\n                }\n    \n                md5.loadFromBlob( blob );\n    \n                return deferred.promise();\n            }\n        });\n    });\n    /**\n     * @fileOverview Runtime管理器，负责Runtime的选择, 连接\n     */\n    define('runtime/compbase',[],function() {\n    \n        function CompBase( owner, runtime ) {\n    \n            this.owner = owner;\n            this.options = owner.options;\n    \n            this.getRuntime = function() {\n                return runtime;\n            };\n    \n            this.getRuid = function() {\n                return runtime.uid;\n            };\n    \n            this.trigger = function() {\n                return owner.trigger.apply( owner, arguments );\n            };\n        }\n    \n        return CompBase;\n    });\n    /**\n     * @fileOverview Html5Runtime\n     */\n    define('runtime/html5/runtime',[\n        'base',\n        'runtime/runtime',\n        'runtime/compbase'\n    ], function( Base, Runtime, CompBase ) {\n    \n        var type = 'html5',\n            components = {};\n    \n        function Html5Runtime() {\n            var pool = {},\n                me = this,\n                destroy = this.destroy;\n    \n            Runtime.apply( me, arguments );\n            me.type = type;\n    \n    \n            // 这个方法的调用者，实际上是RuntimeClient\n            me.exec = function( comp, fn/*, args...*/) {\n                var client = this,\n                    uid = client.uid,\n                    args = Base.slice( arguments, 2 ),\n                    instance;\n    \n                if ( components[ comp ] ) {\n                    instance = pool[ uid ] = pool[ uid ] ||\n                            new components[ comp ]( client, me );\n    \n                    if ( instance[ fn ] ) {\n                        return instance[ fn ].apply( instance, args );\n                    }\n                }\n            };\n    \n            me.destroy = function() {\n                // @todo 删除池子中的所有实例\n                return destroy && destroy.apply( this, arguments );\n            };\n        }\n    \n        Base.inherits( Runtime, {\n            constructor: Html5Runtime,\n    \n            // 不需要连接其他程序，直接执行callback\n            init: function() {\n                var me = this;\n                setTimeout(function() {\n                    me.trigger('ready');\n                }, 1 );\n            }\n    \n        });\n    \n        // 注册Components\n        Html5Runtime.register = function( name, component ) {\n            var klass = components[ name ] = Base.inherits( CompBase, component );\n            return klass;\n        };\n    \n        // 注册html5运行时。\n        // 只有在支持的前提下注册。\n        if ( window.Blob && window.FileReader && window.DataView ) {\n            Runtime.addRuntime( type, Html5Runtime );\n        }\n    \n        return Html5Runtime;\n    });\n    /**\n     * @fileOverview Blob Html实现\n     */\n    define('runtime/html5/blob',[\n        'runtime/html5/runtime',\n        'lib/blob'\n    ], function( Html5Runtime, Blob ) {\n    \n        return Html5Runtime.register( 'Blob', {\n            slice: function( start, end ) {\n                var blob = this.owner.source,\n                    slice = blob.slice || blob.webkitSlice || blob.mozSlice;\n    \n                blob = slice.call( blob, start, end );\n    \n                return new Blob( this.getRuid(), blob );\n            }\n        });\n    });\n    /**\n     * @fileOverview FilePaste\n     */\n    define('runtime/html5/dnd',[\n        'base',\n        'runtime/html5/runtime',\n        'lib/file'\n    ], function( Base, Html5Runtime, File ) {\n    \n        var $ = Base.$,\n            prefix = 'webuploader-dnd-';\n    \n        return Html5Runtime.register( 'DragAndDrop', {\n            init: function() {\n                var elem = this.elem = this.options.container;\n    \n                this.dragEnterHandler = Base.bindFn( this._dragEnterHandler, this );\n                this.dragOverHandler = Base.bindFn( this._dragOverHandler, this );\n                this.dragLeaveHandler = Base.bindFn( this._dragLeaveHandler, this );\n                this.dropHandler = Base.bindFn( this._dropHandler, this );\n                this.dndOver = false;\n    \n                elem.on( 'dragenter', this.dragEnterHandler );\n                elem.on( 'dragover', this.dragOverHandler );\n                elem.on( 'dragleave', this.dragLeaveHandler );\n                elem.on( 'drop', this.dropHandler );\n    \n                if ( this.options.disableGlobalDnd ) {\n                    $( document ).on( 'dragover', this.dragOverHandler );\n                    $( document ).on( 'drop', this.dropHandler );\n                }\n            },\n    \n            _dragEnterHandler: function( e ) {\n                var me = this,\n                    denied = me._denied || false,\n                    items;\n    \n                e = e.originalEvent || e;\n    \n                if ( !me.dndOver ) {\n                    me.dndOver = true;\n    \n                    // 注意只有 chrome 支持。\n                    items = e.dataTransfer.items;\n    \n                    if ( items && items.length ) {\n                        me._denied = denied = !me.trigger( 'accept', items );\n                    }\n    \n                    me.elem.addClass( prefix + 'over' );\n                    me.elem[ denied ? 'addClass' :\n                            'removeClass' ]( prefix + 'denied' );\n                }\n    \n                e.dataTransfer.dropEffect = denied ? 'none' : 'copy';\n    \n                return false;\n            },\n    \n            _dragOverHandler: function( e ) {\n                // 只处理框内的。\n                var parentElem = this.elem.parent().get( 0 );\n                if ( parentElem && !$.contains( parentElem, e.currentTarget ) ) {\n                    return false;\n                }\n    \n                clearTimeout( this._leaveTimer );\n                this._dragEnterHandler.call( this, e );\n    \n                return false;\n            },\n    \n            _dragLeaveHandler: function() {\n                var me = this,\n                    handler;\n    \n                handler = function() {\n                    me.dndOver = false;\n                    me.elem.removeClass( prefix + 'over ' + prefix + 'denied' );\n                };\n    \n                clearTimeout( me._leaveTimer );\n                me._leaveTimer = setTimeout( handler, 100 );\n                return false;\n            },\n    \n            _dropHandler: function( e ) {\n                var me = this,\n                    ruid = me.getRuid(),\n                    parentElem = me.elem.parent().get( 0 ),\n                    dataTransfer, data;\n    \n                // 只处理框内的。\n                if ( parentElem && !$.contains( parentElem, e.currentTarget ) ) {\n                    return false;\n                }\n    \n                e = e.originalEvent || e;\n                dataTransfer = e.dataTransfer;\n    \n                // 如果是页面内拖拽，还不能处理，不阻止事件。\n                // 此处 ie11 下会报参数错误，\n                try {\n                    data = dataTransfer.getData('text/html');\n                } catch( err ) {\n                }\n    \n                me.dndOver = false;\n                me.elem.removeClass( prefix + 'over' );\n    \n                if ( data ) {\n                    return;\n                }\n    \n                me._getTansferFiles( dataTransfer, function( results ) {\n                    me.trigger( 'drop', $.map( results, function( file ) {\n                        return new File( ruid, file );\n                    }) );\n                });\n    \n                return false;\n            },\n    \n            // 如果传入 callback 则去查看文件夹，否则只管当前文件夹。\n            _getTansferFiles: function( dataTransfer, callback ) {\n                var results  = [],\n                    promises = [],\n                    items, files, file, item, i, len, canAccessFolder;\n    \n                items = dataTransfer.items;\n                files = dataTransfer.files;\n    \n                canAccessFolder = !!(items && items[ 0 ].webkitGetAsEntry);\n    \n                for ( i = 0, len = files.length; i < len; i++ ) {\n                    file = files[ i ];\n                    item = items && items[ i ];\n    \n                    if ( canAccessFolder && item.webkitGetAsEntry().isDirectory ) {\n    \n                        promises.push( this._traverseDirectoryTree(\n                                item.webkitGetAsEntry(), results ) );\n                    } else {\n                        results.push( file );\n                    }\n                }\n    \n                Base.when.apply( Base, promises ).done(function() {\n    \n                    if ( !results.length ) {\n                        return;\n                    }\n    \n                    callback( results );\n                });\n            },\n    \n            _traverseDirectoryTree: function( entry, results ) {\n                var deferred = Base.Deferred(),\n                    me = this;\n    \n                if ( entry.isFile ) {\n                    entry.file(function( file ) {\n                        results.push( file );\n                        deferred.resolve();\n                    });\n                } else if ( entry.isDirectory ) {\n                    entry.createReader().readEntries(function( entries ) {\n                        var len = entries.length,\n                            promises = [],\n                            arr = [],    // 为了保证顺序。\n                            i;\n    \n                        for ( i = 0; i < len; i++ ) {\n                            promises.push( me._traverseDirectoryTree(\n                                    entries[ i ], arr ) );\n                        }\n    \n                        Base.when.apply( Base, promises ).then(function() {\n                            results.push.apply( results, arr );\n                            deferred.resolve();\n                        }, deferred.reject );\n                    });\n                }\n    \n                return deferred.promise();\n            },\n    \n            destroy: function() {\n                var elem = this.elem;\n    \n                // 还没 init 就调用 destroy\n                if (!elem) {\n                    return;\n                }\n    \n                elem.off( 'dragenter', this.dragEnterHandler );\n                elem.off( 'dragover', this.dragOverHandler );\n                elem.off( 'dragleave', this.dragLeaveHandler );\n                elem.off( 'drop', this.dropHandler );\n    \n                if ( this.options.disableGlobalDnd ) {\n                    $( document ).off( 'dragover', this.dragOverHandler );\n                    $( document ).off( 'drop', this.dropHandler );\n                }\n            }\n        });\n    });\n    \n    /**\n     * @fileOverview FilePaste\n     */\n    define('runtime/html5/filepaste',[\n        'base',\n        'runtime/html5/runtime',\n        'lib/file'\n    ], function( Base, Html5Runtime, File ) {\n    \n        return Html5Runtime.register( 'FilePaste', {\n            init: function() {\n                var opts = this.options,\n                    elem = this.elem = opts.container,\n                    accept = '.*',\n                    arr, i, len, item;\n    \n                // accetp的mimeTypes中生成匹配正则。\n                if ( opts.accept ) {\n                    arr = [];\n    \n                    for ( i = 0, len = opts.accept.length; i < len; i++ ) {\n                        item = opts.accept[ i ].mimeTypes;\n                        item && arr.push( item );\n                    }\n    \n                    if ( arr.length ) {\n                        accept = arr.join(',');\n                        accept = accept.replace( /,/g, '|' ).replace( /\\*/g, '.*' );\n                    }\n                }\n                this.accept = accept = new RegExp( accept, 'i' );\n                this.hander = Base.bindFn( this._pasteHander, this );\n                elem.on( 'paste', this.hander );\n            },\n    \n            _pasteHander: function( e ) {\n                var allowed = [],\n                    ruid = this.getRuid(),\n                    items, item, blob, i, len;\n    \n                e = e.originalEvent || e;\n                items = e.clipboardData.items;\n    \n                for ( i = 0, len = items.length; i < len; i++ ) {\n                    item = items[ i ];\n    \n                    if ( item.kind !== 'file' || !(blob = item.getAsFile()) ) {\n                        continue;\n                    }\n    \n                    allowed.push( new File( ruid, blob ) );\n                }\n    \n                if ( allowed.length ) {\n                    // 不阻止非文件粘贴（文字粘贴）的事件冒泡\n                    e.preventDefault();\n                    e.stopPropagation();\n                    this.trigger( 'paste', allowed );\n                }\n            },\n    \n            destroy: function() {\n                this.elem.off( 'paste', this.hander );\n            }\n        });\n    });\n    \n    /**\n     * @fileOverview FilePicker\n     */\n    define('runtime/html5/filepicker',[\n        'base',\n        'runtime/html5/runtime'\n    ], function( Base, Html5Runtime ) {\n    \n        var $ = Base.$;\n    \n        return Html5Runtime.register( 'FilePicker', {\n            init: function() {\n                var container = this.getRuntime().getContainer(),\n                    me = this,\n                    owner = me.owner,\n                    opts = me.options,\n                    label = this.label = $( document.createElement('label') ),\n                    input =  this.input = $( document.createElement('input') ),\n                    arr, i, len, mouseHandler;\n    \n                input.attr( 'type', 'file' );\n                input.attr( 'capture', 'camera');\n                input.attr( 'name', opts.name );\n                input.addClass('webuploader-element-invisible');\n    \n                label.on( 'click', function(e) {\n                    input.trigger('click');\n                    e.stopPropagation();\n                    owner.trigger('dialogopen');\n                });\n    \n                label.css({\n                    opacity: 0,\n                    width: '100%',\n                    height: '100%',\n                    display: 'block',\n                    cursor: 'pointer',\n                    background: '#ffffff'\n                });\n    \n                if ( opts.multiple ) {\n                    input.attr( 'multiple', 'multiple' );\n                }\n    \n                // @todo Firefox不支持单独指定后缀\n                if ( opts.accept && opts.accept.length > 0 ) {\n                    arr = [];\n    \n                    for ( i = 0, len = opts.accept.length; i < len; i++ ) {\n                        arr.push( opts.accept[ i ].mimeTypes );\n                    }\n    \n                    input.attr( 'accept', arr.join(',') );\n                }\n    \n                container.append( input );\n                container.append( label );\n    \n                mouseHandler = function( e ) {\n                    owner.trigger( e.type );\n                };\n    \n                input.on( 'change', function( e ) {\n                    var fn = arguments.callee,\n                        clone;\n    \n                    me.files = e.target.files;\n    \n                    // reset input\n                    clone = this.cloneNode( true );\n                    clone.value = null;\n                    this.parentNode.replaceChild( clone, this );\n    \n                    input.off();\n                    input = $( clone ).on( 'change', fn )\n                            .on( 'mouseenter mouseleave', mouseHandler );\n    \n                    owner.trigger('change');\n                });\n    \n                label.on( 'mouseenter mouseleave', mouseHandler );\n    \n            },\n    \n    \n            getFiles: function() {\n                return this.files;\n            },\n    \n            destroy: function() {\n                this.input.off();\n                this.label.off();\n            }\n        });\n    });\n    \n    /**\n     * Terms:\n     *\n     * Uint8Array, FileReader, BlobBuilder, atob, ArrayBuffer\n     * @fileOverview Image控件\n     */\n    define('runtime/html5/util',[\n        'base'\n    ], function( Base ) {\n    \n        var urlAPI = window.createObjectURL && window ||\n                window.URL && URL.revokeObjectURL && URL ||\n                window.webkitURL,\n            createObjectURL = Base.noop,\n            revokeObjectURL = createObjectURL;\n    \n        if ( urlAPI ) {\n    \n            // 更安全的方式调用，比如android里面就能把context改成其他的对象。\n            createObjectURL = function() {\n                return urlAPI.createObjectURL.apply( urlAPI, arguments );\n            };\n    \n            revokeObjectURL = function() {\n                return urlAPI.revokeObjectURL.apply( urlAPI, arguments );\n            };\n        }\n    \n        return {\n            createObjectURL: createObjectURL,\n            revokeObjectURL: revokeObjectURL,\n    \n            dataURL2Blob: function( dataURI ) {\n                var byteStr, intArray, ab, i, mimetype, parts;\n    \n                parts = dataURI.split(',');\n    \n                if ( ~parts[ 0 ].indexOf('base64') ) {\n                    byteStr = atob( parts[ 1 ] );\n                } else {\n                    byteStr = decodeURIComponent( parts[ 1 ] );\n                }\n    \n                ab = new ArrayBuffer( byteStr.length );\n                intArray = new Uint8Array( ab );\n    \n                for ( i = 0; i < byteStr.length; i++ ) {\n                    intArray[ i ] = byteStr.charCodeAt( i );\n                }\n    \n                mimetype = parts[ 0 ].split(':')[ 1 ].split(';')[ 0 ];\n    \n                return this.arrayBufferToBlob( ab, mimetype );\n            },\n    \n            dataURL2ArrayBuffer: function( dataURI ) {\n                var byteStr, intArray, i, parts;\n    \n                parts = dataURI.split(',');\n    \n                if ( ~parts[ 0 ].indexOf('base64') ) {\n                    byteStr = atob( parts[ 1 ] );\n                } else {\n                    byteStr = decodeURIComponent( parts[ 1 ] );\n                }\n    \n                intArray = new Uint8Array( byteStr.length );\n    \n                for ( i = 0; i < byteStr.length; i++ ) {\n                    intArray[ i ] = byteStr.charCodeAt( i );\n                }\n    \n                return intArray.buffer;\n            },\n    \n            arrayBufferToBlob: function( buffer, type ) {\n                var builder = window.BlobBuilder || window.WebKitBlobBuilder,\n                    bb;\n    \n                // android不支持直接new Blob, 只能借助blobbuilder.\n                if ( builder ) {\n                    bb = new builder();\n                    bb.append( buffer );\n                    return bb.getBlob( type );\n                }\n    \n                return new Blob([ buffer ], type ? { type: type } : {} );\n            },\n    \n            // 抽出来主要是为了解决android下面canvas.toDataUrl不支持jpeg.\n            // 你得到的结果是png.\n            canvasToDataUrl: function( canvas, type, quality ) {\n                return canvas.toDataURL( type, quality / 100 );\n            },\n    \n            // imagemeat会复写这个方法，如果用户选择加载那个文件了的话。\n            parseMeta: function( blob, callback ) {\n                callback( false, {});\n            },\n    \n            // imagemeat会复写这个方法，如果用户选择加载那个文件了的话。\n            updateImageHead: function( data ) {\n                return data;\n            }\n        };\n    });\n    /**\n     * Terms:\n     *\n     * Uint8Array, FileReader, BlobBuilder, atob, ArrayBuffer\n     * @fileOverview Image控件\n     */\n    define('runtime/html5/imagemeta',[\n        'runtime/html5/util'\n    ], function( Util ) {\n    \n        var api;\n    \n        api = {\n            parsers: {\n                0xffe1: []\n            },\n    \n            maxMetaDataSize: 262144,\n    \n            parse: function( blob, cb ) {\n                var me = this,\n                    fr = new FileReader();\n    \n                fr.onload = function() {\n                    cb( false, me._parse( this.result ) );\n                    fr = fr.onload = fr.onerror = null;\n                };\n    \n                fr.onerror = function( e ) {\n                    cb( e.message );\n                    fr = fr.onload = fr.onerror = null;\n                };\n    \n                blob = blob.slice( 0, me.maxMetaDataSize );\n                fr.readAsArrayBuffer( blob.getSource() );\n            },\n    \n            _parse: function( buffer, noParse ) {\n                if ( buffer.byteLength < 6 ) {\n                    return;\n                }\n    \n                var dataview = new DataView( buffer ),\n                    offset = 2,\n                    maxOffset = dataview.byteLength - 4,\n                    headLength = offset,\n                    ret = {},\n                    markerBytes, markerLength, parsers, i;\n    \n                if ( dataview.getUint16( 0 ) === 0xffd8 ) {\n    \n                    while ( offset < maxOffset ) {\n                        markerBytes = dataview.getUint16( offset );\n    \n                        if ( markerBytes >= 0xffe0 && markerBytes <= 0xffef ||\n                                markerBytes === 0xfffe ) {\n    \n                            markerLength = dataview.getUint16( offset + 2 ) + 2;\n    \n                            if ( offset + markerLength > dataview.byteLength ) {\n                                break;\n                            }\n    \n                            parsers = api.parsers[ markerBytes ];\n    \n                            if ( !noParse && parsers ) {\n                                for ( i = 0; i < parsers.length; i += 1 ) {\n                                    parsers[ i ].call( api, dataview, offset,\n                                            markerLength, ret );\n                                }\n                            }\n    \n                            offset += markerLength;\n                            headLength = offset;\n                        } else {\n                            break;\n                        }\n                    }\n    \n                    if ( headLength > 6 ) {\n                        if ( buffer.slice ) {\n                            ret.imageHead = buffer.slice( 2, headLength );\n                        } else {\n                            // Workaround for IE10, which does not yet\n                            // support ArrayBuffer.slice:\n                            ret.imageHead = new Uint8Array( buffer )\n                                    .subarray( 2, headLength );\n                        }\n                    }\n                }\n    \n                return ret;\n            },\n    \n            updateImageHead: function( buffer, head ) {\n                var data = this._parse( buffer, true ),\n                    buf1, buf2, bodyoffset;\n    \n    \n                bodyoffset = 2;\n                if ( data.imageHead ) {\n                    bodyoffset = 2 + data.imageHead.byteLength;\n                }\n    \n                if ( buffer.slice ) {\n                    buf2 = buffer.slice( bodyoffset );\n                } else {\n                    buf2 = new Uint8Array( buffer ).subarray( bodyoffset );\n                }\n    \n                buf1 = new Uint8Array( head.byteLength + 2 + buf2.byteLength );\n    \n                buf1[ 0 ] = 0xFF;\n                buf1[ 1 ] = 0xD8;\n                buf1.set( new Uint8Array( head ), 2 );\n                buf1.set( new Uint8Array( buf2 ), head.byteLength + 2 );\n    \n                return buf1.buffer;\n            }\n        };\n    \n        Util.parseMeta = function() {\n            return api.parse.apply( api, arguments );\n        };\n    \n        Util.updateImageHead = function() {\n            return api.updateImageHead.apply( api, arguments );\n        };\n    \n        return api;\n    });\n    /**\n     * 代码来自于：https://github.com/blueimp/JavaScript-Load-Image\n     * 暂时项目中只用了orientation.\n     *\n     * 去除了 Exif Sub IFD Pointer, GPS Info IFD Pointer, Exif Thumbnail.\n     * @fileOverview EXIF解析\n     */\n    \n    // Sample\n    // ====================================\n    // Make : Apple\n    // Model : iPhone 4S\n    // Orientation : 1\n    // XResolution : 72 [72/1]\n    // YResolution : 72 [72/1]\n    // ResolutionUnit : 2\n    // Software : QuickTime 7.7.1\n    // DateTime : 2013:09:01 22:53:55\n    // ExifIFDPointer : 190\n    // ExposureTime : 0.058823529411764705 [1/17]\n    // FNumber : 2.4 [12/5]\n    // ExposureProgram : Normal program\n    // ISOSpeedRatings : 800\n    // ExifVersion : 0220\n    // DateTimeOriginal : 2013:09:01 22:52:51\n    // DateTimeDigitized : 2013:09:01 22:52:51\n    // ComponentsConfiguration : YCbCr\n    // ShutterSpeedValue : 4.058893515764426\n    // ApertureValue : 2.5260688216892597 [4845/1918]\n    // BrightnessValue : -0.3126686601998395\n    // MeteringMode : Pattern\n    // Flash : Flash did not fire, compulsory flash mode\n    // FocalLength : 4.28 [107/25]\n    // SubjectArea : [4 values]\n    // FlashpixVersion : 0100\n    // ColorSpace : 1\n    // PixelXDimension : 2448\n    // PixelYDimension : 3264\n    // SensingMethod : One-chip color area sensor\n    // ExposureMode : 0\n    // WhiteBalance : Auto white balance\n    // FocalLengthIn35mmFilm : 35\n    // SceneCaptureType : Standard\n    define('runtime/html5/imagemeta/exif',[\n        'base',\n        'runtime/html5/imagemeta'\n    ], function( Base, ImageMeta ) {\n    \n        var EXIF = {};\n    \n        EXIF.ExifMap = function() {\n            return this;\n        };\n    \n        EXIF.ExifMap.prototype.map = {\n            'Orientation': 0x0112\n        };\n    \n        EXIF.ExifMap.prototype.get = function( id ) {\n            return this[ id ] || this[ this.map[ id ] ];\n        };\n    \n        EXIF.exifTagTypes = {\n            // byte, 8-bit unsigned int:\n            1: {\n                getValue: function( dataView, dataOffset ) {\n                    return dataView.getUint8( dataOffset );\n                },\n                size: 1\n            },\n    \n            // ascii, 8-bit byte:\n            2: {\n                getValue: function( dataView, dataOffset ) {\n                    return String.fromCharCode( dataView.getUint8( dataOffset ) );\n                },\n                size: 1,\n                ascii: true\n            },\n    \n            // short, 16 bit int:\n            3: {\n                getValue: function( dataView, dataOffset, littleEndian ) {\n                    return dataView.getUint16( dataOffset, littleEndian );\n                },\n                size: 2\n            },\n    \n            // long, 32 bit int:\n            4: {\n                getValue: function( dataView, dataOffset, littleEndian ) {\n                    return dataView.getUint32( dataOffset, littleEndian );\n                },\n                size: 4\n            },\n    \n            // rational = two long values,\n            // first is numerator, second is denominator:\n            5: {\n                getValue: function( dataView, dataOffset, littleEndian ) {\n                    return dataView.getUint32( dataOffset, littleEndian ) /\n                        dataView.getUint32( dataOffset + 4, littleEndian );\n                },\n                size: 8\n            },\n    \n            // slong, 32 bit signed int:\n            9: {\n                getValue: function( dataView, dataOffset, littleEndian ) {\n                    return dataView.getInt32( dataOffset, littleEndian );\n                },\n                size: 4\n            },\n    \n            // srational, two slongs, first is numerator, second is denominator:\n            10: {\n                getValue: function( dataView, dataOffset, littleEndian ) {\n                    return dataView.getInt32( dataOffset, littleEndian ) /\n                        dataView.getInt32( dataOffset + 4, littleEndian );\n                },\n                size: 8\n            }\n        };\n    \n        // undefined, 8-bit byte, value depending on field:\n        EXIF.exifTagTypes[ 7 ] = EXIF.exifTagTypes[ 1 ];\n    \n        EXIF.getExifValue = function( dataView, tiffOffset, offset, type, length,\n                littleEndian ) {\n    \n            var tagType = EXIF.exifTagTypes[ type ],\n                tagSize, dataOffset, values, i, str, c;\n    \n            if ( !tagType ) {\n                Base.log('Invalid Exif data: Invalid tag type.');\n                return;\n            }\n    \n            tagSize = tagType.size * length;\n    \n            // Determine if the value is contained in the dataOffset bytes,\n            // or if the value at the dataOffset is a pointer to the actual data:\n            dataOffset = tagSize > 4 ? tiffOffset + dataView.getUint32( offset + 8,\n                    littleEndian ) : (offset + 8);\n    \n            if ( dataOffset + tagSize > dataView.byteLength ) {\n                Base.log('Invalid Exif data: Invalid data offset.');\n                return;\n            }\n    \n            if ( length === 1 ) {\n                return tagType.getValue( dataView, dataOffset, littleEndian );\n            }\n    \n            values = [];\n    \n            for ( i = 0; i < length; i += 1 ) {\n                values[ i ] = tagType.getValue( dataView,\n                        dataOffset + i * tagType.size, littleEndian );\n            }\n    \n            if ( tagType.ascii ) {\n                str = '';\n    \n                // Concatenate the chars:\n                for ( i = 0; i < values.length; i += 1 ) {\n                    c = values[ i ];\n    \n                    // Ignore the terminating NULL byte(s):\n                    if ( c === '\\u0000' ) {\n                        break;\n                    }\n                    str += c;\n                }\n    \n                return str;\n            }\n            return values;\n        };\n    \n        EXIF.parseExifTag = function( dataView, tiffOffset, offset, littleEndian,\n                data ) {\n    \n            var tag = dataView.getUint16( offset, littleEndian );\n            data.exif[ tag ] = EXIF.getExifValue( dataView, tiffOffset, offset,\n                    dataView.getUint16( offset + 2, littleEndian ),    // tag type\n                    dataView.getUint32( offset + 4, littleEndian ),    // tag length\n                    littleEndian );\n        };\n    \n        EXIF.parseExifTags = function( dataView, tiffOffset, dirOffset,\n                littleEndian, data ) {\n    \n            var tagsNumber, dirEndOffset, i;\n    \n            if ( dirOffset + 6 > dataView.byteLength ) {\n                Base.log('Invalid Exif data: Invalid directory offset.');\n                return;\n            }\n    \n            tagsNumber = dataView.getUint16( dirOffset, littleEndian );\n            dirEndOffset = dirOffset + 2 + 12 * tagsNumber;\n    \n            if ( dirEndOffset + 4 > dataView.byteLength ) {\n                Base.log('Invalid Exif data: Invalid directory size.');\n                return;\n            }\n    \n            for ( i = 0; i < tagsNumber; i += 1 ) {\n                this.parseExifTag( dataView, tiffOffset,\n                        dirOffset + 2 + 12 * i,    // tag offset\n                        littleEndian, data );\n            }\n    \n            // Return the offset to the next directory:\n            return dataView.getUint32( dirEndOffset, littleEndian );\n        };\n    \n        // EXIF.getExifThumbnail = function(dataView, offset, length) {\n        //     var hexData,\n        //         i,\n        //         b;\n        //     if (!length || offset + length > dataView.byteLength) {\n        //         Base.log('Invalid Exif data: Invalid thumbnail data.');\n        //         return;\n        //     }\n        //     hexData = [];\n        //     for (i = 0; i < length; i += 1) {\n        //         b = dataView.getUint8(offset + i);\n        //         hexData.push((b < 16 ? '0' : '') + b.toString(16));\n        //     }\n        //     return 'data:image/jpeg,%' + hexData.join('%');\n        // };\n    \n        EXIF.parseExifData = function( dataView, offset, length, data ) {\n    \n            var tiffOffset = offset + 10,\n                littleEndian, dirOffset;\n    \n            // Check for the ASCII code for \"Exif\" (0x45786966):\n            if ( dataView.getUint32( offset + 4 ) !== 0x45786966 ) {\n                // No Exif data, might be XMP data instead\n                return;\n            }\n            if ( tiffOffset + 8 > dataView.byteLength ) {\n                Base.log('Invalid Exif data: Invalid segment size.');\n                return;\n            }\n    \n            // Check for the two null bytes:\n            if ( dataView.getUint16( offset + 8 ) !== 0x0000 ) {\n                Base.log('Invalid Exif data: Missing byte alignment offset.');\n                return;\n            }\n    \n            // Check the byte alignment:\n            switch ( dataView.getUint16( tiffOffset ) ) {\n                case 0x4949:\n                    littleEndian = true;\n                    break;\n    \n                case 0x4D4D:\n                    littleEndian = false;\n                    break;\n    \n                default:\n                    Base.log('Invalid Exif data: Invalid byte alignment marker.');\n                    return;\n            }\n    \n            // Check for the TIFF tag marker (0x002A):\n            if ( dataView.getUint16( tiffOffset + 2, littleEndian ) !== 0x002A ) {\n                Base.log('Invalid Exif data: Missing TIFF marker.');\n                return;\n            }\n    \n            // Retrieve the directory offset bytes, usually 0x00000008 or 8 decimal:\n            dirOffset = dataView.getUint32( tiffOffset + 4, littleEndian );\n            // Create the exif object to store the tags:\n            data.exif = new EXIF.ExifMap();\n            // Parse the tags of the main image directory and retrieve the\n            // offset to the next directory, usually the thumbnail directory:\n            dirOffset = EXIF.parseExifTags( dataView, tiffOffset,\n                    tiffOffset + dirOffset, littleEndian, data );\n    \n            // 尝试读取缩略图\n            // if ( dirOffset ) {\n            //     thumbnailData = {exif: {}};\n            //     dirOffset = EXIF.parseExifTags(\n            //         dataView,\n            //         tiffOffset,\n            //         tiffOffset + dirOffset,\n            //         littleEndian,\n            //         thumbnailData\n            //     );\n    \n            //     // Check for JPEG Thumbnail offset:\n            //     if (thumbnailData.exif[0x0201]) {\n            //         data.exif.Thumbnail = EXIF.getExifThumbnail(\n            //             dataView,\n            //             tiffOffset + thumbnailData.exif[0x0201],\n            //             thumbnailData.exif[0x0202] // Thumbnail data length\n            //         );\n            //     }\n            // }\n        };\n    \n        ImageMeta.parsers[ 0xffe1 ].push( EXIF.parseExifData );\n        return EXIF;\n    });\n    /**\n     * 这个方式性能不行，但是可以解决android里面的toDataUrl的bug\n     * android里面toDataUrl('image/jpege')得到的结果却是png.\n     *\n     * 所以这里没辙，只能借助这个工具\n     * @fileOverview jpeg encoder\n     */\n    define('runtime/html5/jpegencoder',[], function( require, exports, module ) {\n    \n        /*\n          Copyright (c) 2008, Adobe Systems Incorporated\n          All rights reserved.\n    \n          Redistribution and use in source and binary forms, with or without\n          modification, are permitted provided that the following conditions are\n          met:\n    \n          * Redistributions of source code must retain the above copyright notice,\n            this list of conditions and the following disclaimer.\n    \n          * Redistributions in binary form must reproduce the above copyright\n            notice, this list of conditions and the following disclaimer in the\n            documentation and/or other materials provided with the distribution.\n    \n          * Neither the name of Adobe Systems Incorporated nor the names of its\n            contributors may be used to endorse or promote products derived from\n            this software without specific prior written permission.\n    \n          THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS\n          IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,\n          THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\n          PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR\n          CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\n          EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\n          PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n          PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n          LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n          NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n          SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n        */\n        /*\n        JPEG encoder ported to JavaScript and optimized by Andreas Ritter, www.bytestrom.eu, 11/2009\n    \n        Basic GUI blocking jpeg encoder\n        */\n    \n        function JPEGEncoder(quality) {\n          var self = this;\n            var fround = Math.round;\n            var ffloor = Math.floor;\n            var YTable = new Array(64);\n            var UVTable = new Array(64);\n            var fdtbl_Y = new Array(64);\n            var fdtbl_UV = new Array(64);\n            var YDC_HT;\n            var UVDC_HT;\n            var YAC_HT;\n            var UVAC_HT;\n    \n            var bitcode = new Array(65535);\n            var category = new Array(65535);\n            var outputfDCTQuant = new Array(64);\n            var DU = new Array(64);\n            var byteout = [];\n            var bytenew = 0;\n            var bytepos = 7;\n    \n            var YDU = new Array(64);\n            var UDU = new Array(64);\n            var VDU = new Array(64);\n            var clt = new Array(256);\n            var RGB_YUV_TABLE = new Array(2048);\n            var currentQuality;\n    \n            var ZigZag = [\n                     0, 1, 5, 6,14,15,27,28,\n                     2, 4, 7,13,16,26,29,42,\n                     3, 8,12,17,25,30,41,43,\n                     9,11,18,24,31,40,44,53,\n                    10,19,23,32,39,45,52,54,\n                    20,22,33,38,46,51,55,60,\n                    21,34,37,47,50,56,59,61,\n                    35,36,48,49,57,58,62,63\n                ];\n    \n            var std_dc_luminance_nrcodes = [0,0,1,5,1,1,1,1,1,1,0,0,0,0,0,0,0];\n            var std_dc_luminance_values = [0,1,2,3,4,5,6,7,8,9,10,11];\n            var std_ac_luminance_nrcodes = [0,0,2,1,3,3,2,4,3,5,5,4,4,0,0,1,0x7d];\n            var std_ac_luminance_values = [\n                    0x01,0x02,0x03,0x00,0x04,0x11,0x05,0x12,\n                    0x21,0x31,0x41,0x06,0x13,0x51,0x61,0x07,\n                    0x22,0x71,0x14,0x32,0x81,0x91,0xa1,0x08,\n                    0x23,0x42,0xb1,0xc1,0x15,0x52,0xd1,0xf0,\n                    0x24,0x33,0x62,0x72,0x82,0x09,0x0a,0x16,\n                    0x17,0x18,0x19,0x1a,0x25,0x26,0x27,0x28,\n                    0x29,0x2a,0x34,0x35,0x36,0x37,0x38,0x39,\n                    0x3a,0x43,0x44,0x45,0x46,0x47,0x48,0x49,\n                    0x4a,0x53,0x54,0x55,0x56,0x57,0x58,0x59,\n                    0x5a,0x63,0x64,0x65,0x66,0x67,0x68,0x69,\n                    0x6a,0x73,0x74,0x75,0x76,0x77,0x78,0x79,\n                    0x7a,0x83,0x84,0x85,0x86,0x87,0x88,0x89,\n                    0x8a,0x92,0x93,0x94,0x95,0x96,0x97,0x98,\n                    0x99,0x9a,0xa2,0xa3,0xa4,0xa5,0xa6,0xa7,\n                    0xa8,0xa9,0xaa,0xb2,0xb3,0xb4,0xb5,0xb6,\n                    0xb7,0xb8,0xb9,0xba,0xc2,0xc3,0xc4,0xc5,\n                    0xc6,0xc7,0xc8,0xc9,0xca,0xd2,0xd3,0xd4,\n                    0xd5,0xd6,0xd7,0xd8,0xd9,0xda,0xe1,0xe2,\n                    0xe3,0xe4,0xe5,0xe6,0xe7,0xe8,0xe9,0xea,\n                    0xf1,0xf2,0xf3,0xf4,0xf5,0xf6,0xf7,0xf8,\n                    0xf9,0xfa\n                ];\n    \n            var std_dc_chrominance_nrcodes = [0,0,3,1,1,1,1,1,1,1,1,1,0,0,0,0,0];\n            var std_dc_chrominance_values = [0,1,2,3,4,5,6,7,8,9,10,11];\n            var std_ac_chrominance_nrcodes = [0,0,2,1,2,4,4,3,4,7,5,4,4,0,1,2,0x77];\n            var std_ac_chrominance_values = [\n                    0x00,0x01,0x02,0x03,0x11,0x04,0x05,0x21,\n                    0x31,0x06,0x12,0x41,0x51,0x07,0x61,0x71,\n                    0x13,0x22,0x32,0x81,0x08,0x14,0x42,0x91,\n                    0xa1,0xb1,0xc1,0x09,0x23,0x33,0x52,0xf0,\n                    0x15,0x62,0x72,0xd1,0x0a,0x16,0x24,0x34,\n                    0xe1,0x25,0xf1,0x17,0x18,0x19,0x1a,0x26,\n                    0x27,0x28,0x29,0x2a,0x35,0x36,0x37,0x38,\n                    0x39,0x3a,0x43,0x44,0x45,0x46,0x47,0x48,\n                    0x49,0x4a,0x53,0x54,0x55,0x56,0x57,0x58,\n                    0x59,0x5a,0x63,0x64,0x65,0x66,0x67,0x68,\n                    0x69,0x6a,0x73,0x74,0x75,0x76,0x77,0x78,\n                    0x79,0x7a,0x82,0x83,0x84,0x85,0x86,0x87,\n                    0x88,0x89,0x8a,0x92,0x93,0x94,0x95,0x96,\n                    0x97,0x98,0x99,0x9a,0xa2,0xa3,0xa4,0xa5,\n                    0xa6,0xa7,0xa8,0xa9,0xaa,0xb2,0xb3,0xb4,\n                    0xb5,0xb6,0xb7,0xb8,0xb9,0xba,0xc2,0xc3,\n                    0xc4,0xc5,0xc6,0xc7,0xc8,0xc9,0xca,0xd2,\n                    0xd3,0xd4,0xd5,0xd6,0xd7,0xd8,0xd9,0xda,\n                    0xe2,0xe3,0xe4,0xe5,0xe6,0xe7,0xe8,0xe9,\n                    0xea,0xf2,0xf3,0xf4,0xf5,0xf6,0xf7,0xf8,\n                    0xf9,0xfa\n                ];\n    \n            function initQuantTables(sf){\n                    var YQT = [\n                        16, 11, 10, 16, 24, 40, 51, 61,\n                        12, 12, 14, 19, 26, 58, 60, 55,\n                        14, 13, 16, 24, 40, 57, 69, 56,\n                        14, 17, 22, 29, 51, 87, 80, 62,\n                        18, 22, 37, 56, 68,109,103, 77,\n                        24, 35, 55, 64, 81,104,113, 92,\n                        49, 64, 78, 87,103,121,120,101,\n                        72, 92, 95, 98,112,100,103, 99\n                    ];\n    \n                    for (var i = 0; i < 64; i++) {\n                        var t = ffloor((YQT[i]*sf+50)/100);\n                        if (t < 1) {\n                            t = 1;\n                        } else if (t > 255) {\n                            t = 255;\n                        }\n                        YTable[ZigZag[i]] = t;\n                    }\n                    var UVQT = [\n                        17, 18, 24, 47, 99, 99, 99, 99,\n                        18, 21, 26, 66, 99, 99, 99, 99,\n                        24, 26, 56, 99, 99, 99, 99, 99,\n                        47, 66, 99, 99, 99, 99, 99, 99,\n                        99, 99, 99, 99, 99, 99, 99, 99,\n                        99, 99, 99, 99, 99, 99, 99, 99,\n                        99, 99, 99, 99, 99, 99, 99, 99,\n                        99, 99, 99, 99, 99, 99, 99, 99\n                    ];\n                    for (var j = 0; j < 64; j++) {\n                        var u = ffloor((UVQT[j]*sf+50)/100);\n                        if (u < 1) {\n                            u = 1;\n                        } else if (u > 255) {\n                            u = 255;\n                        }\n                        UVTable[ZigZag[j]] = u;\n                    }\n                    var aasf = [\n                        1.0, 1.387039845, 1.306562965, 1.175875602,\n                        1.0, 0.785694958, 0.541196100, 0.275899379\n                    ];\n                    var k = 0;\n                    for (var row = 0; row < 8; row++)\n                    {\n                        for (var col = 0; col < 8; col++)\n                        {\n                            fdtbl_Y[k]  = (1.0 / (YTable [ZigZag[k]] * aasf[row] * aasf[col] * 8.0));\n                            fdtbl_UV[k] = (1.0 / (UVTable[ZigZag[k]] * aasf[row] * aasf[col] * 8.0));\n                            k++;\n                        }\n                    }\n                }\n    \n                function computeHuffmanTbl(nrcodes, std_table){\n                    var codevalue = 0;\n                    var pos_in_table = 0;\n                    var HT = new Array();\n                    for (var k = 1; k <= 16; k++) {\n                        for (var j = 1; j <= nrcodes[k]; j++) {\n                            HT[std_table[pos_in_table]] = [];\n                            HT[std_table[pos_in_table]][0] = codevalue;\n                            HT[std_table[pos_in_table]][1] = k;\n                            pos_in_table++;\n                            codevalue++;\n                        }\n                        codevalue*=2;\n                    }\n                    return HT;\n                }\n    \n                function initHuffmanTbl()\n                {\n                    YDC_HT = computeHuffmanTbl(std_dc_luminance_nrcodes,std_dc_luminance_values);\n                    UVDC_HT = computeHuffmanTbl(std_dc_chrominance_nrcodes,std_dc_chrominance_values);\n                    YAC_HT = computeHuffmanTbl(std_ac_luminance_nrcodes,std_ac_luminance_values);\n                    UVAC_HT = computeHuffmanTbl(std_ac_chrominance_nrcodes,std_ac_chrominance_values);\n                }\n    \n                function initCategoryNumber()\n                {\n                    var nrlower = 1;\n                    var nrupper = 2;\n                    for (var cat = 1; cat <= 15; cat++) {\n                        //Positive numbers\n                        for (var nr = nrlower; nr<nrupper; nr++) {\n                            category[32767+nr] = cat;\n                            bitcode[32767+nr] = [];\n                            bitcode[32767+nr][1] = cat;\n                            bitcode[32767+nr][0] = nr;\n                        }\n                        //Negative numbers\n                        for (var nrneg =-(nrupper-1); nrneg<=-nrlower; nrneg++) {\n                            category[32767+nrneg] = cat;\n                            bitcode[32767+nrneg] = [];\n                            bitcode[32767+nrneg][1] = cat;\n                            bitcode[32767+nrneg][0] = nrupper-1+nrneg;\n                        }\n                        nrlower <<= 1;\n                        nrupper <<= 1;\n                    }\n                }\n    \n                function initRGBYUVTable() {\n                    for(var i = 0; i < 256;i++) {\n                        RGB_YUV_TABLE[i]            =  19595 * i;\n                        RGB_YUV_TABLE[(i+ 256)>>0]  =  38470 * i;\n                        RGB_YUV_TABLE[(i+ 512)>>0]  =   7471 * i + 0x8000;\n                        RGB_YUV_TABLE[(i+ 768)>>0]  = -11059 * i;\n                        RGB_YUV_TABLE[(i+1024)>>0]  = -21709 * i;\n                        RGB_YUV_TABLE[(i+1280)>>0]  =  32768 * i + 0x807FFF;\n                        RGB_YUV_TABLE[(i+1536)>>0]  = -27439 * i;\n                        RGB_YUV_TABLE[(i+1792)>>0]  = - 5329 * i;\n                    }\n                }\n    \n                // IO functions\n                function writeBits(bs)\n                {\n                    var value = bs[0];\n                    var posval = bs[1]-1;\n                    while ( posval >= 0 ) {\n                        if (value & (1 << posval) ) {\n                            bytenew |= (1 << bytepos);\n                        }\n                        posval--;\n                        bytepos--;\n                        if (bytepos < 0) {\n                            if (bytenew == 0xFF) {\n                                writeByte(0xFF);\n                                writeByte(0);\n                            }\n                            else {\n                                writeByte(bytenew);\n                            }\n                            bytepos=7;\n                            bytenew=0;\n                        }\n                    }\n                }\n    \n                function writeByte(value)\n                {\n                    byteout.push(clt[value]); // write char directly instead of converting later\n                }\n    \n                function writeWord(value)\n                {\n                    writeByte((value>>8)&0xFF);\n                    writeByte((value   )&0xFF);\n                }\n    \n                // DCT & quantization core\n                function fDCTQuant(data, fdtbl)\n                {\n                    var d0, d1, d2, d3, d4, d5, d6, d7;\n                    /* Pass 1: process rows. */\n                    var dataOff=0;\n                    var i;\n                    var I8 = 8;\n                    var I64 = 64;\n                    for (i=0; i<I8; ++i)\n                    {\n                        d0 = data[dataOff];\n                        d1 = data[dataOff+1];\n                        d2 = data[dataOff+2];\n                        d3 = data[dataOff+3];\n                        d4 = data[dataOff+4];\n                        d5 = data[dataOff+5];\n                        d6 = data[dataOff+6];\n                        d7 = data[dataOff+7];\n    \n                        var tmp0 = d0 + d7;\n                        var tmp7 = d0 - d7;\n                        var tmp1 = d1 + d6;\n                        var tmp6 = d1 - d6;\n                        var tmp2 = d2 + d5;\n                        var tmp5 = d2 - d5;\n                        var tmp3 = d3 + d4;\n                        var tmp4 = d3 - d4;\n    \n                        /* Even part */\n                        var tmp10 = tmp0 + tmp3;    /* phase 2 */\n                        var tmp13 = tmp0 - tmp3;\n                        var tmp11 = tmp1 + tmp2;\n                        var tmp12 = tmp1 - tmp2;\n    \n                        data[dataOff] = tmp10 + tmp11; /* phase 3 */\n                        data[dataOff+4] = tmp10 - tmp11;\n    \n                        var z1 = (tmp12 + tmp13) * 0.707106781; /* c4 */\n                        data[dataOff+2] = tmp13 + z1; /* phase 5 */\n                        data[dataOff+6] = tmp13 - z1;\n    \n                        /* Odd part */\n                        tmp10 = tmp4 + tmp5; /* phase 2 */\n                        tmp11 = tmp5 + tmp6;\n                        tmp12 = tmp6 + tmp7;\n    \n                        /* The rotator is modified from fig 4-8 to avoid extra negations. */\n                        var z5 = (tmp10 - tmp12) * 0.382683433; /* c6 */\n                        var z2 = 0.541196100 * tmp10 + z5; /* c2-c6 */\n                        var z4 = 1.306562965 * tmp12 + z5; /* c2+c6 */\n                        var z3 = tmp11 * 0.707106781; /* c4 */\n    \n                        var z11 = tmp7 + z3;    /* phase 5 */\n                        var z13 = tmp7 - z3;\n    \n                        data[dataOff+5] = z13 + z2; /* phase 6 */\n                        data[dataOff+3] = z13 - z2;\n                        data[dataOff+1] = z11 + z4;\n                        data[dataOff+7] = z11 - z4;\n    \n                        dataOff += 8; /* advance pointer to next row */\n                    }\n    \n                    /* Pass 2: process columns. */\n                    dataOff = 0;\n                    for (i=0; i<I8; ++i)\n                    {\n                        d0 = data[dataOff];\n                        d1 = data[dataOff + 8];\n                        d2 = data[dataOff + 16];\n                        d3 = data[dataOff + 24];\n                        d4 = data[dataOff + 32];\n                        d5 = data[dataOff + 40];\n                        d6 = data[dataOff + 48];\n                        d7 = data[dataOff + 56];\n    \n                        var tmp0p2 = d0 + d7;\n                        var tmp7p2 = d0 - d7;\n                        var tmp1p2 = d1 + d6;\n                        var tmp6p2 = d1 - d6;\n                        var tmp2p2 = d2 + d5;\n                        var tmp5p2 = d2 - d5;\n                        var tmp3p2 = d3 + d4;\n                        var tmp4p2 = d3 - d4;\n    \n                        /* Even part */\n                        var tmp10p2 = tmp0p2 + tmp3p2;  /* phase 2 */\n                        var tmp13p2 = tmp0p2 - tmp3p2;\n                        var tmp11p2 = tmp1p2 + tmp2p2;\n                        var tmp12p2 = tmp1p2 - tmp2p2;\n    \n                        data[dataOff] = tmp10p2 + tmp11p2; /* phase 3 */\n                        data[dataOff+32] = tmp10p2 - tmp11p2;\n    \n                        var z1p2 = (tmp12p2 + tmp13p2) * 0.707106781; /* c4 */\n                        data[dataOff+16] = tmp13p2 + z1p2; /* phase 5 */\n                        data[dataOff+48] = tmp13p2 - z1p2;\n    \n                        /* Odd part */\n                        tmp10p2 = tmp4p2 + tmp5p2; /* phase 2 */\n                        tmp11p2 = tmp5p2 + tmp6p2;\n                        tmp12p2 = tmp6p2 + tmp7p2;\n    \n                        /* The rotator is modified from fig 4-8 to avoid extra negations. */\n                        var z5p2 = (tmp10p2 - tmp12p2) * 0.382683433; /* c6 */\n                        var z2p2 = 0.541196100 * tmp10p2 + z5p2; /* c2-c6 */\n                        var z4p2 = 1.306562965 * tmp12p2 + z5p2; /* c2+c6 */\n                        var z3p2 = tmp11p2 * 0.707106781; /* c4 */\n    \n                        var z11p2 = tmp7p2 + z3p2;  /* phase 5 */\n                        var z13p2 = tmp7p2 - z3p2;\n    \n                        data[dataOff+40] = z13p2 + z2p2; /* phase 6 */\n                        data[dataOff+24] = z13p2 - z2p2;\n                        data[dataOff+ 8] = z11p2 + z4p2;\n                        data[dataOff+56] = z11p2 - z4p2;\n    \n                        dataOff++; /* advance pointer to next column */\n                    }\n    \n                    // Quantize/descale the coefficients\n                    var fDCTQuant;\n                    for (i=0; i<I64; ++i)\n                    {\n                        // Apply the quantization and scaling factor & Round to nearest integer\n                        fDCTQuant = data[i]*fdtbl[i];\n                        outputfDCTQuant[i] = (fDCTQuant > 0.0) ? ((fDCTQuant + 0.5)|0) : ((fDCTQuant - 0.5)|0);\n                        //outputfDCTQuant[i] = fround(fDCTQuant);\n    \n                    }\n                    return outputfDCTQuant;\n                }\n    \n                function writeAPP0()\n                {\n                    writeWord(0xFFE0); // marker\n                    writeWord(16); // length\n                    writeByte(0x4A); // J\n                    writeByte(0x46); // F\n                    writeByte(0x49); // I\n                    writeByte(0x46); // F\n                    writeByte(0); // = \"JFIF\",'\\0'\n                    writeByte(1); // versionhi\n                    writeByte(1); // versionlo\n                    writeByte(0); // xyunits\n                    writeWord(1); // xdensity\n                    writeWord(1); // ydensity\n                    writeByte(0); // thumbnwidth\n                    writeByte(0); // thumbnheight\n                }\n    \n                function writeSOF0(width, height)\n                {\n                    writeWord(0xFFC0); // marker\n                    writeWord(17);   // length, truecolor YUV JPG\n                    writeByte(8);    // precision\n                    writeWord(height);\n                    writeWord(width);\n                    writeByte(3);    // nrofcomponents\n                    writeByte(1);    // IdY\n                    writeByte(0x11); // HVY\n                    writeByte(0);    // QTY\n                    writeByte(2);    // IdU\n                    writeByte(0x11); // HVU\n                    writeByte(1);    // QTU\n                    writeByte(3);    // IdV\n                    writeByte(0x11); // HVV\n                    writeByte(1);    // QTV\n                }\n    \n                function writeDQT()\n                {\n                    writeWord(0xFFDB); // marker\n                    writeWord(132);    // length\n                    writeByte(0);\n                    for (var i=0; i<64; i++) {\n                        writeByte(YTable[i]);\n                    }\n                    writeByte(1);\n                    for (var j=0; j<64; j++) {\n                        writeByte(UVTable[j]);\n                    }\n                }\n    \n                function writeDHT()\n                {\n                    writeWord(0xFFC4); // marker\n                    writeWord(0x01A2); // length\n    \n                    writeByte(0); // HTYDCinfo\n                    for (var i=0; i<16; i++) {\n                        writeByte(std_dc_luminance_nrcodes[i+1]);\n                    }\n                    for (var j=0; j<=11; j++) {\n                        writeByte(std_dc_luminance_values[j]);\n                    }\n    \n                    writeByte(0x10); // HTYACinfo\n                    for (var k=0; k<16; k++) {\n                        writeByte(std_ac_luminance_nrcodes[k+1]);\n                    }\n                    for (var l=0; l<=161; l++) {\n                        writeByte(std_ac_luminance_values[l]);\n                    }\n    \n                    writeByte(1); // HTUDCinfo\n                    for (var m=0; m<16; m++) {\n                        writeByte(std_dc_chrominance_nrcodes[m+1]);\n                    }\n                    for (var n=0; n<=11; n++) {\n                        writeByte(std_dc_chrominance_values[n]);\n                    }\n    \n                    writeByte(0x11); // HTUACinfo\n                    for (var o=0; o<16; o++) {\n                        writeByte(std_ac_chrominance_nrcodes[o+1]);\n                    }\n                    for (var p=0; p<=161; p++) {\n                        writeByte(std_ac_chrominance_values[p]);\n                    }\n                }\n    \n                function writeSOS()\n                {\n                    writeWord(0xFFDA); // marker\n                    writeWord(12); // length\n                    writeByte(3); // nrofcomponents\n                    writeByte(1); // IdY\n                    writeByte(0); // HTY\n                    writeByte(2); // IdU\n                    writeByte(0x11); // HTU\n                    writeByte(3); // IdV\n                    writeByte(0x11); // HTV\n                    writeByte(0); // Ss\n                    writeByte(0x3f); // Se\n                    writeByte(0); // Bf\n                }\n    \n                function processDU(CDU, fdtbl, DC, HTDC, HTAC){\n                    var EOB = HTAC[0x00];\n                    var M16zeroes = HTAC[0xF0];\n                    var pos;\n                    var I16 = 16;\n                    var I63 = 63;\n                    var I64 = 64;\n                    var DU_DCT = fDCTQuant(CDU, fdtbl);\n                    //ZigZag reorder\n                    for (var j=0;j<I64;++j) {\n                        DU[ZigZag[j]]=DU_DCT[j];\n                    }\n                    var Diff = DU[0] - DC; DC = DU[0];\n                    //Encode DC\n                    if (Diff==0) {\n                        writeBits(HTDC[0]); // Diff might be 0\n                    } else {\n                        pos = 32767+Diff;\n                        writeBits(HTDC[category[pos]]);\n                        writeBits(bitcode[pos]);\n                    }\n                    //Encode ACs\n                    var end0pos = 63; // was const... which is crazy\n                    for (; (end0pos>0)&&(DU[end0pos]==0); end0pos--) {};\n                    //end0pos = first element in reverse order !=0\n                    if ( end0pos == 0) {\n                        writeBits(EOB);\n                        return DC;\n                    }\n                    var i = 1;\n                    var lng;\n                    while ( i <= end0pos ) {\n                        var startpos = i;\n                        for (; (DU[i]==0) && (i<=end0pos); ++i) {}\n                        var nrzeroes = i-startpos;\n                        if ( nrzeroes >= I16 ) {\n                            lng = nrzeroes>>4;\n                            for (var nrmarker=1; nrmarker <= lng; ++nrmarker)\n                                writeBits(M16zeroes);\n                            nrzeroes = nrzeroes&0xF;\n                        }\n                        pos = 32767+DU[i];\n                        writeBits(HTAC[(nrzeroes<<4)+category[pos]]);\n                        writeBits(bitcode[pos]);\n                        i++;\n                    }\n                    if ( end0pos != I63 ) {\n                        writeBits(EOB);\n                    }\n                    return DC;\n                }\n    \n                function initCharLookupTable(){\n                    var sfcc = String.fromCharCode;\n                    for(var i=0; i < 256; i++){ ///// ACHTUNG // 255\n                        clt[i] = sfcc(i);\n                    }\n                }\n    \n                this.encode = function(image,quality) // image data object\n                {\n                    // var time_start = new Date().getTime();\n    \n                    if(quality) setQuality(quality);\n    \n                    // Initialize bit writer\n                    byteout = new Array();\n                    bytenew=0;\n                    bytepos=7;\n    \n                    // Add JPEG headers\n                    writeWord(0xFFD8); // SOI\n                    writeAPP0();\n                    writeDQT();\n                    writeSOF0(image.width,image.height);\n                    writeDHT();\n                    writeSOS();\n    \n    \n                    // Encode 8x8 macroblocks\n                    var DCY=0;\n                    var DCU=0;\n                    var DCV=0;\n    \n                    bytenew=0;\n                    bytepos=7;\n    \n    \n                    this.encode.displayName = \"_encode_\";\n    \n                    var imageData = image.data;\n                    var width = image.width;\n                    var height = image.height;\n    \n                    var quadWidth = width*4;\n                    var tripleWidth = width*3;\n    \n                    var x, y = 0;\n                    var r, g, b;\n                    var start,p, col,row,pos;\n                    while(y < height){\n                        x = 0;\n                        while(x < quadWidth){\n                        start = quadWidth * y + x;\n                        p = start;\n                        col = -1;\n                        row = 0;\n    \n                        for(pos=0; pos < 64; pos++){\n                            row = pos >> 3;// /8\n                            col = ( pos & 7 ) * 4; // %8\n                            p = start + ( row * quadWidth ) + col;\n    \n                            if(y+row >= height){ // padding bottom\n                                p-= (quadWidth*(y+1+row-height));\n                            }\n    \n                            if(x+col >= quadWidth){ // padding right\n                                p-= ((x+col) - quadWidth +4)\n                            }\n    \n                            r = imageData[ p++ ];\n                            g = imageData[ p++ ];\n                            b = imageData[ p++ ];\n    \n    \n                            /* // calculate YUV values dynamically\n                            YDU[pos]=((( 0.29900)*r+( 0.58700)*g+( 0.11400)*b))-128; //-0x80\n                            UDU[pos]=(((-0.16874)*r+(-0.33126)*g+( 0.50000)*b));\n                            VDU[pos]=((( 0.50000)*r+(-0.41869)*g+(-0.08131)*b));\n                            */\n    \n                            // use lookup table (slightly faster)\n                            YDU[pos] = ((RGB_YUV_TABLE[r]             + RGB_YUV_TABLE[(g +  256)>>0] + RGB_YUV_TABLE[(b +  512)>>0]) >> 16)-128;\n                            UDU[pos] = ((RGB_YUV_TABLE[(r +  768)>>0] + RGB_YUV_TABLE[(g + 1024)>>0] + RGB_YUV_TABLE[(b + 1280)>>0]) >> 16)-128;\n                            VDU[pos] = ((RGB_YUV_TABLE[(r + 1280)>>0] + RGB_YUV_TABLE[(g + 1536)>>0] + RGB_YUV_TABLE[(b + 1792)>>0]) >> 16)-128;\n    \n                        }\n    \n                        DCY = processDU(YDU, fdtbl_Y, DCY, YDC_HT, YAC_HT);\n                        DCU = processDU(UDU, fdtbl_UV, DCU, UVDC_HT, UVAC_HT);\n                        DCV = processDU(VDU, fdtbl_UV, DCV, UVDC_HT, UVAC_HT);\n                        x+=32;\n                        }\n                        y+=8;\n                    }\n    \n    \n                    ////////////////////////////////////////////////////////////////\n    \n                    // Do the bit alignment of the EOI marker\n                    if ( bytepos >= 0 ) {\n                        var fillbits = [];\n                        fillbits[1] = bytepos+1;\n                        fillbits[0] = (1<<(bytepos+1))-1;\n                        writeBits(fillbits);\n                    }\n    \n                    writeWord(0xFFD9); //EOI\n    \n                    var jpegDataUri = 'data:image/jpeg;base64,' + btoa(byteout.join(''));\n    \n                    byteout = [];\n    \n                    // benchmarking\n                    // var duration = new Date().getTime() - time_start;\n                    // console.log('Encoding time: '+ currentQuality + 'ms');\n                    //\n    \n                    return jpegDataUri\n            }\n    \n            function setQuality(quality){\n                if (quality <= 0) {\n                    quality = 1;\n                }\n                if (quality > 100) {\n                    quality = 100;\n                }\n    \n                if(currentQuality == quality) return // don't recalc if unchanged\n    \n                var sf = 0;\n                if (quality < 50) {\n                    sf = Math.floor(5000 / quality);\n                } else {\n                    sf = Math.floor(200 - quality*2);\n                }\n    \n                initQuantTables(sf);\n                currentQuality = quality;\n                // console.log('Quality set to: '+quality +'%');\n            }\n    \n            function init(){\n                // var time_start = new Date().getTime();\n                if(!quality) quality = 50;\n                // Create tables\n                initCharLookupTable()\n                initHuffmanTbl();\n                initCategoryNumber();\n                initRGBYUVTable();\n    \n                setQuality(quality);\n                // var duration = new Date().getTime() - time_start;\n                // console.log('Initialization '+ duration + 'ms');\n            }\n    \n            init();\n    \n        };\n    \n        JPEGEncoder.encode = function( data, quality ) {\n            var encoder = new JPEGEncoder( quality );\n    \n            return encoder.encode( data );\n        }\n    \n        return JPEGEncoder;\n    });\n    /**\n     * @fileOverview Fix android canvas.toDataUrl bug.\n     */\n    define('runtime/html5/androidpatch',[\n        'runtime/html5/util',\n        'runtime/html5/jpegencoder',\n        'base'\n    ], function( Util, encoder, Base ) {\n        var origin = Util.canvasToDataUrl,\n            supportJpeg;\n    \n        Util.canvasToDataUrl = function( canvas, type, quality ) {\n            var ctx, w, h, fragement, parts;\n    \n            // 非android手机直接跳过。\n            if ( !Base.os.android ) {\n                return origin.apply( null, arguments );\n            }\n    \n            // 检测是否canvas支持jpeg导出，根据数据格式来判断。\n            // JPEG 前两位分别是：255, 216\n            if ( type === 'image/jpeg' && typeof supportJpeg === 'undefined' ) {\n                fragement = origin.apply( null, arguments );\n    \n                parts = fragement.split(',');\n    \n                if ( ~parts[ 0 ].indexOf('base64') ) {\n                    fragement = atob( parts[ 1 ] );\n                } else {\n                    fragement = decodeURIComponent( parts[ 1 ] );\n                }\n    \n                fragement = fragement.substring( 0, 2 );\n    \n                supportJpeg = fragement.charCodeAt( 0 ) === 255 &&\n                        fragement.charCodeAt( 1 ) === 216;\n            }\n    \n            // 只有在android环境下才修复\n            if ( type === 'image/jpeg' && !supportJpeg ) {\n                w = canvas.width;\n                h = canvas.height;\n                ctx = canvas.getContext('2d');\n    \n                return encoder.encode( ctx.getImageData( 0, 0, w, h ), quality );\n            }\n    \n            return origin.apply( null, arguments );\n        };\n    });\n    /**\n     * @fileOverview Image\n     */\n    define('runtime/html5/image',[\n        'base',\n        'runtime/html5/runtime',\n        'runtime/html5/util'\n    ], function( Base, Html5Runtime, Util ) {\n    \n        var BLANK = 'data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs%3D';\n    \n        return Html5Runtime.register( 'Image', {\n    \n            // flag: 标记是否被修改过。\n            modified: false,\n    \n            init: function() {\n                var me = this,\n                    img = new Image();\n    \n                img.onload = function() {\n    \n                    me._info = {\n                        type: me.type,\n                        width: this.width,\n                        height: this.height\n                    };\n    \n                    //debugger;\n    \n                    // 读取meta信息。\n                    if ( !me._metas && 'image/jpeg' === me.type ) {\n                        Util.parseMeta( me._blob, function( error, ret ) {\n                            me._metas = ret;\n                            me.owner.trigger('load');\n                        });\n                    } else {\n                        me.owner.trigger('load');\n                    }\n                };\n    \n                img.onerror = function() {\n                    me.owner.trigger('error');\n                };\n    \n                me._img = img;\n            },\n    \n            loadFromBlob: function( blob ) {\n                var me = this,\n                    img = me._img;\n    \n                me._blob = blob;\n                me.type = blob.type;\n                img.src = Util.createObjectURL( blob.getSource() );\n                me.owner.once( 'load', function() {\n                    Util.revokeObjectURL( img.src );\n                });\n            },\n    \n            resize: function( width, height ) {\n                var canvas = this._canvas ||\n                        (this._canvas = document.createElement('canvas'));\n    \n                this._resize( this._img, canvas, width, height );\n                this._blob = null;    // 没用了，可以删掉了。\n                this.modified = true;\n                this.owner.trigger( 'complete', 'resize' );\n            },\n    \n            crop: function( x, y, w, h, s ) {\n                var cvs = this._canvas ||\n                        (this._canvas = document.createElement('canvas')),\n                    opts = this.options,\n                    img = this._img,\n                    iw = img.naturalWidth,\n                    ih = img.naturalHeight,\n                    orientation = this.getOrientation();\n    \n                s = s || 1;\n    \n                // todo 解决 orientation 的问题。\n                // values that require 90 degree rotation\n                // if ( ~[ 5, 6, 7, 8 ].indexOf( orientation ) ) {\n    \n                //     switch ( orientation ) {\n                //         case 6:\n                //             tmp = x;\n                //             x = y;\n                //             y = iw * s - tmp - w;\n                //             console.log(ih * s, tmp, w)\n                //             break;\n                //     }\n    \n                //     (w ^= h, h ^= w, w ^= h);\n                // }\n    \n                cvs.width = w;\n                cvs.height = h;\n    \n                opts.preserveHeaders || this._rotate2Orientaion( cvs, orientation );\n                this._renderImageToCanvas( cvs, img, -x, -y, iw * s, ih * s );\n    \n                this._blob = null;    // 没用了，可以删掉了。\n                this.modified = true;\n                this.owner.trigger( 'complete', 'crop' );\n            },\n    \n            getAsBlob: function( type ) {\n                var blob = this._blob,\n                    opts = this.options,\n                    canvas;\n    \n                type = type || this.type;\n    \n                // blob需要重新生成。\n                if ( this.modified || this.type !== type ) {\n                    canvas = this._canvas;\n    \n                    if ( type === 'image/jpeg' ) {\n    \n                        blob = Util.canvasToDataUrl( canvas, type, opts.quality );\n    \n                        if ( opts.preserveHeaders && this._metas &&\n                                this._metas.imageHead ) {\n    \n                            blob = Util.dataURL2ArrayBuffer( blob );\n                            blob = Util.updateImageHead( blob,\n                                    this._metas.imageHead );\n                            blob = Util.arrayBufferToBlob( blob, type );\n                            return blob;\n                        }\n                    } else {\n                        blob = Util.canvasToDataUrl( canvas, type );\n                    }\n    \n                    blob = Util.dataURL2Blob( blob );\n                }\n    \n                return blob;\n            },\n    \n            getAsDataUrl: function( type ) {\n                var opts = this.options;\n    \n                type = type || this.type;\n    \n                if ( type === 'image/jpeg' ) {\n                    return Util.canvasToDataUrl( this._canvas, type, opts.quality );\n                } else {\n                    return this._canvas.toDataURL( type );\n                }\n            },\n    \n            getOrientation: function() {\n                return this._metas && this._metas.exif &&\n                        this._metas.exif.get('Orientation') || 1;\n            },\n    \n            info: function( val ) {\n    \n                // setter\n                if ( val ) {\n                    this._info = val;\n                    return this;\n                }\n    \n                // getter\n                return this._info;\n            },\n    \n            meta: function( val ) {\n    \n                // setter\n                if ( val ) {\n                    this._metas = val;\n                    return this;\n                }\n    \n                // getter\n                return this._metas;\n            },\n    \n            destroy: function() {\n                var canvas = this._canvas;\n                this._img.onload = null;\n    \n                if ( canvas ) {\n                    canvas.getContext('2d')\n                            .clearRect( 0, 0, canvas.width, canvas.height );\n                    canvas.width = canvas.height = 0;\n                    this._canvas = null;\n                }\n    \n                // 释放内存。非常重要，否则释放不了image的内存。\n                this._img.src = BLANK;\n                this._img = this._blob = null;\n            },\n    \n            _resize: function( img, cvs, width, height ) {\n                var opts = this.options,\n                    naturalWidth = img.width,\n                    naturalHeight = img.height,\n                    orientation = this.getOrientation(),\n                    scale, w, h, x, y;\n    \n                // values that require 90 degree rotation\n                if ( ~[ 5, 6, 7, 8 ].indexOf( orientation ) ) {\n    \n                    // 交换width, height的值。\n                    width ^= height;\n                    height ^= width;\n                    width ^= height;\n                }\n    \n                scale = Math[ opts.crop ? 'max' : 'min' ]( width / naturalWidth,\n                        height / naturalHeight );\n    \n                // 不允许放大。\n                opts.allowMagnify || (scale = Math.min( 1, scale ));\n    \n                w = naturalWidth * scale;\n                h = naturalHeight * scale;\n    \n                if ( opts.crop ) {\n                    cvs.width = width;\n                    cvs.height = height;\n                } else {\n                    cvs.width = w;\n                    cvs.height = h;\n                }\n    \n                x = (cvs.width - w) / 2;\n                y = (cvs.height - h) / 2;\n    \n                opts.preserveHeaders || this._rotate2Orientaion( cvs, orientation );\n    \n                this._renderImageToCanvas( cvs, img, x, y, w, h );\n            },\n    \n            _rotate2Orientaion: function( canvas, orientation ) {\n                var width = canvas.width,\n                    height = canvas.height,\n                    ctx = canvas.getContext('2d');\n    \n                switch ( orientation ) {\n                    case 5:\n                    case 6:\n                    case 7:\n                    case 8:\n                        canvas.width = height;\n                        canvas.height = width;\n                        break;\n                }\n    \n                switch ( orientation ) {\n                    case 2:    // horizontal flip\n                        ctx.translate( width, 0 );\n                        ctx.scale( -1, 1 );\n                        break;\n    \n                    case 3:    // 180 rotate left\n                        ctx.translate( width, height );\n                        ctx.rotate( Math.PI );\n                        break;\n    \n                    case 4:    // vertical flip\n                        ctx.translate( 0, height );\n                        ctx.scale( 1, -1 );\n                        break;\n    \n                    case 5:    // vertical flip + 90 rotate right\n                        ctx.rotate( 0.5 * Math.PI );\n                        ctx.scale( 1, -1 );\n                        break;\n    \n                    case 6:    // 90 rotate right\n                        ctx.rotate( 0.5 * Math.PI );\n                        ctx.translate( 0, -height );\n                        break;\n    \n                    case 7:    // horizontal flip + 90 rotate right\n                        ctx.rotate( 0.5 * Math.PI );\n                        ctx.translate( width, -height );\n                        ctx.scale( -1, 1 );\n                        break;\n    \n                    case 8:    // 90 rotate left\n                        ctx.rotate( -0.5 * Math.PI );\n                        ctx.translate( -width, 0 );\n                        break;\n                }\n            },\n    \n            // https://github.com/stomita/ios-imagefile-megapixel/\n            // blob/master/src/megapix-image.js\n            _renderImageToCanvas: (function() {\n    \n                // 如果不是ios, 不需要这么复杂！\n                if ( !Base.os.ios ) {\n                    return function( canvas ) {\n                        var args = Base.slice( arguments, 1 ),\n                            ctx = canvas.getContext('2d');\n    \n                        ctx.drawImage.apply( ctx, args );\n                    };\n                }\n    \n                /**\n                 * Detecting vertical squash in loaded image.\n                 * Fixes a bug which squash image vertically while drawing into\n                 * canvas for some images.\n                 */\n                function detectVerticalSquash( img, iw, ih ) {\n                    var canvas = document.createElement('canvas'),\n                        ctx = canvas.getContext('2d'),\n                        sy = 0,\n                        ey = ih,\n                        py = ih,\n                        data, alpha, ratio;\n    \n    \n                    canvas.width = 1;\n                    canvas.height = ih;\n                    ctx.drawImage( img, 0, 0 );\n                    data = ctx.getImageData( 0, 0, 1, ih ).data;\n    \n                    // search image edge pixel position in case\n                    // it is squashed vertically.\n                    while ( py > sy ) {\n                        alpha = data[ (py - 1) * 4 + 3 ];\n    \n                        if ( alpha === 0 ) {\n                            ey = py;\n                        } else {\n                            sy = py;\n                        }\n    \n                        py = (ey + sy) >> 1;\n                    }\n    \n                    ratio = (py / ih);\n                    return (ratio === 0) ? 1 : ratio;\n                }\n    \n                // fix ie7 bug\n                // http://stackoverflow.com/questions/11929099/\n                // html5-canvas-drawimage-ratio-bug-ios\n                if ( Base.os.ios >= 7 ) {\n                    return function( canvas, img, x, y, w, h ) {\n                        var iw = img.naturalWidth,\n                            ih = img.naturalHeight,\n                            vertSquashRatio = detectVerticalSquash( img, iw, ih );\n    \n                        return canvas.getContext('2d').drawImage( img, 0, 0,\n                                iw * vertSquashRatio, ih * vertSquashRatio,\n                                x, y, w, h );\n                    };\n                }\n    \n                /**\n                 * Detect subsampling in loaded image.\n                 * In iOS, larger images than 2M pixels may be\n                 * subsampled in rendering.\n                 */\n                function detectSubsampling( img ) {\n                    var iw = img.naturalWidth,\n                        ih = img.naturalHeight,\n                        canvas, ctx;\n    \n                    // subsampling may happen overmegapixel image\n                    if ( iw * ih > 1024 * 1024 ) {\n                        canvas = document.createElement('canvas');\n                        canvas.width = canvas.height = 1;\n                        ctx = canvas.getContext('2d');\n                        ctx.drawImage( img, -iw + 1, 0 );\n    \n                        // subsampled image becomes half smaller in rendering size.\n                        // check alpha channel value to confirm image is covering\n                        // edge pixel or not. if alpha value is 0\n                        // image is not covering, hence subsampled.\n                        return ctx.getImageData( 0, 0, 1, 1 ).data[ 3 ] === 0;\n                    } else {\n                        return false;\n                    }\n                }\n    \n    \n                return function( canvas, img, x, y, width, height ) {\n                    var iw = img.naturalWidth,\n                        ih = img.naturalHeight,\n                        ctx = canvas.getContext('2d'),\n                        subsampled = detectSubsampling( img ),\n                        doSquash = this.type === 'image/jpeg',\n                        d = 1024,\n                        sy = 0,\n                        dy = 0,\n                        tmpCanvas, tmpCtx, vertSquashRatio, dw, dh, sx, dx;\n    \n                    if ( subsampled ) {\n                        iw /= 2;\n                        ih /= 2;\n                    }\n    \n                    ctx.save();\n                    tmpCanvas = document.createElement('canvas');\n                    tmpCanvas.width = tmpCanvas.height = d;\n    \n                    tmpCtx = tmpCanvas.getContext('2d');\n                    vertSquashRatio = doSquash ?\n                            detectVerticalSquash( img, iw, ih ) : 1;\n    \n                    dw = Math.ceil( d * width / iw );\n                    dh = Math.ceil( d * height / ih / vertSquashRatio );\n    \n                    while ( sy < ih ) {\n                        sx = 0;\n                        dx = 0;\n                        while ( sx < iw ) {\n                            tmpCtx.clearRect( 0, 0, d, d );\n                            tmpCtx.drawImage( img, -sx, -sy );\n                            ctx.drawImage( tmpCanvas, 0, 0, d, d,\n                                    x + dx, y + dy, dw, dh );\n                            sx += d;\n                            dx += dw;\n                        }\n                        sy += d;\n                        dy += dh;\n                    }\n                    ctx.restore();\n                    tmpCanvas = tmpCtx = null;\n                };\n            })()\n        });\n    });\n    \n    /**\n     * @fileOverview Transport\n     * @todo 支持chunked传输，优势：\n     * 可以将大文件分成小块，挨个传输，可以提高大文件成功率，当失败的时候，也只需要重传那小部分，\n     * 而不需要重头再传一次。另外断点续传也需要用chunked方式。\n     */\n    define('runtime/html5/transport',[\n        'base',\n        'runtime/html5/runtime'\n    ], function( Base, Html5Runtime ) {\n    \n        var noop = Base.noop,\n            $ = Base.$;\n    \n        return Html5Runtime.register( 'Transport', {\n            init: function() {\n                this._status = 0;\n                this._response = null;\n            },\n    \n            send: function() {\n                var owner = this.owner,\n                    opts = this.options,\n                    xhr = this._initAjax(),\n                    blob = owner._blob,\n                    server = opts.server,\n                    formData, binary, fr;\n    \n                if ( opts.sendAsBinary ) {\n                    server += (/\\?/.test( server ) ? '&' : '?') +\n                            $.param( owner._formData );\n    \n                    binary = blob.getSource();\n                } else {\n                    formData = new FormData();\n                    $.each( owner._formData, function( k, v ) {\n                        formData.append( k, v );\n                    });\n    \n                    formData.append( opts.fileVal, blob.getSource(),\n                            opts.filename || owner._formData.name || '' );\n                }\n    \n                if ( opts.withCredentials && 'withCredentials' in xhr ) {\n                    xhr.open( opts.method, server, true );\n                    xhr.withCredentials = true;\n                } else {\n                    xhr.open( opts.method, server );\n                }\n    \n                this._setRequestHeader( xhr, opts.headers );\n    \n                if ( binary ) {\n                    // 强制设置成 content-type 为文件流。\n                    xhr.overrideMimeType &&\n                            xhr.overrideMimeType('application/octet-stream');\n    \n                    // android直接发送blob会导致服务端接收到的是空文件。\n                    // bug详情。\n                    // https://code.google.com/p/android/issues/detail?id=39882\n                    // 所以先用fileReader读取出来再通过arraybuffer的方式发送。\n                    if ( Base.os.android ) {\n                        fr = new FileReader();\n    \n                        fr.onload = function() {\n                            xhr.send( this.result );\n                            fr = fr.onload = null;\n                        };\n    \n                        fr.readAsArrayBuffer( binary );\n                    } else {\n                        xhr.send( binary );\n                    }\n                } else {\n                    xhr.send( formData );\n                }\n            },\n    \n            getResponse: function() {\n                return this._response;\n            },\n    \n            getResponseAsJson: function() {\n                return this._parseJson( this._response );\n            },\n    \n            getStatus: function() {\n                return this._status;\n            },\n    \n            abort: function() {\n                var xhr = this._xhr;\n    \n                if ( xhr ) {\n                    xhr.upload.onprogress = noop;\n                    xhr.onreadystatechange = noop;\n                    xhr.abort();\n    \n                    this._xhr = xhr = null;\n                }\n            },\n    \n            destroy: function() {\n                this.abort();\n            },\n    \n            _initAjax: function() {\n                var me = this,\n                    xhr = new XMLHttpRequest(),\n                    opts = this.options;\n    \n                if ( opts.withCredentials && !('withCredentials' in xhr) &&\n                        typeof XDomainRequest !== 'undefined' ) {\n                    xhr = new XDomainRequest();\n                }\n    \n                xhr.upload.onprogress = function( e ) {\n                    var percentage = 0;\n    \n                    if ( e.lengthComputable ) {\n                        percentage = e.loaded / e.total;\n                    }\n    \n                    return me.trigger( 'progress', percentage );\n                };\n    \n                xhr.onreadystatechange = function() {\n    \n                    if ( xhr.readyState !== 4 ) {\n                        return;\n                    }\n    \n                    xhr.upload.onprogress = noop;\n                    xhr.onreadystatechange = noop;\n                    me._xhr = null;\n                    me._status = xhr.status;\n    \n                    if ( xhr.status >= 200 && xhr.status < 300 ) {\n                        me._response = xhr.responseText;\n                        return me.trigger('load');\n                    } else if ( xhr.status >= 500 && xhr.status < 600 ) {\n                        me._response = xhr.responseText;\n                        return me.trigger( 'error', 'server' );\n                    }\n    \n    \n                    return me.trigger( 'error', me._status ? 'http' : 'abort' );\n                };\n    \n                me._xhr = xhr;\n                return xhr;\n            },\n    \n            _setRequestHeader: function( xhr, headers ) {\n                $.each( headers, function( key, val ) {\n                    xhr.setRequestHeader( key, val );\n                });\n            },\n    \n            _parseJson: function( str ) {\n                var json;\n    \n                try {\n                    json = JSON.parse( str );\n                } catch ( ex ) {\n                    json = {};\n                }\n    \n                return json;\n            }\n        });\n    });\n    /**\n     * @fileOverview  Transport flash实现\n     */\n    define('runtime/html5/md5',[\n        'runtime/html5/runtime'\n    ], function( FlashRuntime ) {\n    \n        /*\n         * Fastest md5 implementation around (JKM md5)\n         * Credits: Joseph Myers\n         *\n         * @see http://www.myersdaily.org/joseph/javascript/md5-text.html\n         * @see http://jsperf.com/md5-shootout/7\n         */\n    \n        /* this function is much faster,\n          so if possible we use it. Some IEs\n          are the only ones I know of that\n          need the idiotic second function,\n          generated by an if clause.  */\n        var add32 = function (a, b) {\n            return (a + b) & 0xFFFFFFFF;\n        },\n    \n        cmn = function (q, a, b, x, s, t) {\n            a = add32(add32(a, q), add32(x, t));\n            return add32((a << s) | (a >>> (32 - s)), b);\n        },\n    \n        ff = function (a, b, c, d, x, s, t) {\n            return cmn((b & c) | ((~b) & d), a, b, x, s, t);\n        },\n    \n        gg = function (a, b, c, d, x, s, t) {\n            return cmn((b & d) | (c & (~d)), a, b, x, s, t);\n        },\n    \n        hh = function (a, b, c, d, x, s, t) {\n            return cmn(b ^ c ^ d, a, b, x, s, t);\n        },\n    \n        ii = function (a, b, c, d, x, s, t) {\n            return cmn(c ^ (b | (~d)), a, b, x, s, t);\n        },\n    \n        md5cycle = function (x, k) {\n            var a = x[0],\n                b = x[1],\n                c = x[2],\n                d = x[3];\n    \n            a = ff(a, b, c, d, k[0], 7, -680876936);\n            d = ff(d, a, b, c, k[1], 12, -389564586);\n            c = ff(c, d, a, b, k[2], 17, 606105819);\n            b = ff(b, c, d, a, k[3], 22, -1044525330);\n            a = ff(a, b, c, d, k[4], 7, -176418897);\n            d = ff(d, a, b, c, k[5], 12, 1200080426);\n            c = ff(c, d, a, b, k[6], 17, -1473231341);\n            b = ff(b, c, d, a, k[7], 22, -45705983);\n            a = ff(a, b, c, d, k[8], 7, 1770035416);\n            d = ff(d, a, b, c, k[9], 12, -1958414417);\n            c = ff(c, d, a, b, k[10], 17, -42063);\n            b = ff(b, c, d, a, k[11], 22, -1990404162);\n            a = ff(a, b, c, d, k[12], 7, 1804603682);\n            d = ff(d, a, b, c, k[13], 12, -40341101);\n            c = ff(c, d, a, b, k[14], 17, -1502002290);\n            b = ff(b, c, d, a, k[15], 22, 1236535329);\n    \n            a = gg(a, b, c, d, k[1], 5, -165796510);\n            d = gg(d, a, b, c, k[6], 9, -1069501632);\n            c = gg(c, d, a, b, k[11], 14, 643717713);\n            b = gg(b, c, d, a, k[0], 20, -373897302);\n            a = gg(a, b, c, d, k[5], 5, -701558691);\n            d = gg(d, a, b, c, k[10], 9, 38016083);\n            c = gg(c, d, a, b, k[15], 14, -660478335);\n            b = gg(b, c, d, a, k[4], 20, -405537848);\n            a = gg(a, b, c, d, k[9], 5, 568446438);\n            d = gg(d, a, b, c, k[14], 9, -1019803690);\n            c = gg(c, d, a, b, k[3], 14, -187363961);\n            b = gg(b, c, d, a, k[8], 20, 1163531501);\n            a = gg(a, b, c, d, k[13], 5, -1444681467);\n            d = gg(d, a, b, c, k[2], 9, -51403784);\n            c = gg(c, d, a, b, k[7], 14, 1735328473);\n            b = gg(b, c, d, a, k[12], 20, -1926607734);\n    \n            a = hh(a, b, c, d, k[5], 4, -378558);\n            d = hh(d, a, b, c, k[8], 11, -2022574463);\n            c = hh(c, d, a, b, k[11], 16, 1839030562);\n            b = hh(b, c, d, a, k[14], 23, -35309556);\n            a = hh(a, b, c, d, k[1], 4, -1530992060);\n            d = hh(d, a, b, c, k[4], 11, 1272893353);\n            c = hh(c, d, a, b, k[7], 16, -155497632);\n            b = hh(b, c, d, a, k[10], 23, -1094730640);\n            a = hh(a, b, c, d, k[13], 4, 681279174);\n            d = hh(d, a, b, c, k[0], 11, -358537222);\n            c = hh(c, d, a, b, k[3], 16, -722521979);\n            b = hh(b, c, d, a, k[6], 23, 76029189);\n            a = hh(a, b, c, d, k[9], 4, -640364487);\n            d = hh(d, a, b, c, k[12], 11, -421815835);\n            c = hh(c, d, a, b, k[15], 16, 530742520);\n            b = hh(b, c, d, a, k[2], 23, -995338651);\n    \n            a = ii(a, b, c, d, k[0], 6, -198630844);\n            d = ii(d, a, b, c, k[7], 10, 1126891415);\n            c = ii(c, d, a, b, k[14], 15, -1416354905);\n            b = ii(b, c, d, a, k[5], 21, -57434055);\n            a = ii(a, b, c, d, k[12], 6, 1700485571);\n            d = ii(d, a, b, c, k[3], 10, -1894986606);\n            c = ii(c, d, a, b, k[10], 15, -1051523);\n            b = ii(b, c, d, a, k[1], 21, -2054922799);\n            a = ii(a, b, c, d, k[8], 6, 1873313359);\n            d = ii(d, a, b, c, k[15], 10, -30611744);\n            c = ii(c, d, a, b, k[6], 15, -1560198380);\n            b = ii(b, c, d, a, k[13], 21, 1309151649);\n            a = ii(a, b, c, d, k[4], 6, -145523070);\n            d = ii(d, a, b, c, k[11], 10, -1120210379);\n            c = ii(c, d, a, b, k[2], 15, 718787259);\n            b = ii(b, c, d, a, k[9], 21, -343485551);\n    \n            x[0] = add32(a, x[0]);\n            x[1] = add32(b, x[1]);\n            x[2] = add32(c, x[2]);\n            x[3] = add32(d, x[3]);\n        },\n    \n        /* there needs to be support for Unicode here,\n           * unless we pretend that we can redefine the MD-5\n           * algorithm for multi-byte characters (perhaps\n           * by adding every four 16-bit characters and\n           * shortening the sum to 32 bits). Otherwise\n           * I suggest performing MD-5 as if every character\n           * was two bytes--e.g., 0040 0025 = @%--but then\n           * how will an ordinary MD-5 sum be matched?\n           * There is no way to standardize text to something\n           * like UTF-8 before transformation; speed cost is\n           * utterly prohibitive. The JavaScript standard\n           * itself needs to look at this: it should start\n           * providing access to strings as preformed UTF-8\n           * 8-bit unsigned value arrays.\n           */\n        md5blk = function (s) {\n            var md5blks = [],\n                i; /* Andy King said do it this way. */\n    \n            for (i = 0; i < 64; i += 4) {\n                md5blks[i >> 2] = s.charCodeAt(i) + (s.charCodeAt(i + 1) << 8) + (s.charCodeAt(i + 2) << 16) + (s.charCodeAt(i + 3) << 24);\n            }\n            return md5blks;\n        },\n    \n        md5blk_array = function (a) {\n            var md5blks = [],\n                i; /* Andy King said do it this way. */\n    \n            for (i = 0; i < 64; i += 4) {\n                md5blks[i >> 2] = a[i] + (a[i + 1] << 8) + (a[i + 2] << 16) + (a[i + 3] << 24);\n            }\n            return md5blks;\n        },\n    \n        md51 = function (s) {\n            var n = s.length,\n                state = [1732584193, -271733879, -1732584194, 271733878],\n                i,\n                length,\n                tail,\n                tmp,\n                lo,\n                hi;\n    \n            for (i = 64; i <= n; i += 64) {\n                md5cycle(state, md5blk(s.substring(i - 64, i)));\n            }\n            s = s.substring(i - 64);\n            length = s.length;\n            tail = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];\n            for (i = 0; i < length; i += 1) {\n                tail[i >> 2] |= s.charCodeAt(i) << ((i % 4) << 3);\n            }\n            tail[i >> 2] |= 0x80 << ((i % 4) << 3);\n            if (i > 55) {\n                md5cycle(state, tail);\n                for (i = 0; i < 16; i += 1) {\n                    tail[i] = 0;\n                }\n            }\n    \n            // Beware that the final length might not fit in 32 bits so we take care of that\n            tmp = n * 8;\n            tmp = tmp.toString(16).match(/(.*?)(.{0,8})$/);\n            lo = parseInt(tmp[2], 16);\n            hi = parseInt(tmp[1], 16) || 0;\n    \n            tail[14] = lo;\n            tail[15] = hi;\n    \n            md5cycle(state, tail);\n            return state;\n        },\n    \n        md51_array = function (a) {\n            var n = a.length,\n                state = [1732584193, -271733879, -1732584194, 271733878],\n                i,\n                length,\n                tail,\n                tmp,\n                lo,\n                hi;\n    \n            for (i = 64; i <= n; i += 64) {\n                md5cycle(state, md5blk_array(a.subarray(i - 64, i)));\n            }\n    \n            // Not sure if it is a bug, however IE10 will always produce a sub array of length 1\n            // containing the last element of the parent array if the sub array specified starts\n            // beyond the length of the parent array - weird.\n            // https://connect.microsoft.com/IE/feedback/details/771452/typed-array-subarray-issue\n            a = (i - 64) < n ? a.subarray(i - 64) : new Uint8Array(0);\n    \n            length = a.length;\n            tail = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];\n            for (i = 0; i < length; i += 1) {\n                tail[i >> 2] |= a[i] << ((i % 4) << 3);\n            }\n    \n            tail[i >> 2] |= 0x80 << ((i % 4) << 3);\n            if (i > 55) {\n                md5cycle(state, tail);\n                for (i = 0; i < 16; i += 1) {\n                    tail[i] = 0;\n                }\n            }\n    \n            // Beware that the final length might not fit in 32 bits so we take care of that\n            tmp = n * 8;\n            tmp = tmp.toString(16).match(/(.*?)(.{0,8})$/);\n            lo = parseInt(tmp[2], 16);\n            hi = parseInt(tmp[1], 16) || 0;\n    \n            tail[14] = lo;\n            tail[15] = hi;\n    \n            md5cycle(state, tail);\n    \n            return state;\n        },\n    \n        hex_chr = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f'],\n    \n        rhex = function (n) {\n            var s = '',\n                j;\n            for (j = 0; j < 4; j += 1) {\n                s += hex_chr[(n >> (j * 8 + 4)) & 0x0F] + hex_chr[(n >> (j * 8)) & 0x0F];\n            }\n            return s;\n        },\n    \n        hex = function (x) {\n            var i;\n            for (i = 0; i < x.length; i += 1) {\n                x[i] = rhex(x[i]);\n            }\n            return x.join('');\n        },\n    \n        md5 = function (s) {\n            return hex(md51(s));\n        },\n    \n    \n    \n        ////////////////////////////////////////////////////////////////////////////\n    \n        /**\n         * SparkMD5 OOP implementation.\n         *\n         * Use this class to perform an incremental md5, otherwise use the\n         * static methods instead.\n         */\n        SparkMD5 = function () {\n            // call reset to init the instance\n            this.reset();\n        };\n    \n    \n        // In some cases the fast add32 function cannot be used..\n        if (md5('hello') !== '5d41402abc4b2a76b9719d911017c592') {\n            add32 = function (x, y) {\n                var lsw = (x & 0xFFFF) + (y & 0xFFFF),\n                    msw = (x >> 16) + (y >> 16) + (lsw >> 16);\n                return (msw << 16) | (lsw & 0xFFFF);\n            };\n        }\n    \n    \n        /**\n         * Appends a string.\n         * A conversion will be applied if an utf8 string is detected.\n         *\n         * @param {String} str The string to be appended\n         *\n         * @return {SparkMD5} The instance itself\n         */\n        SparkMD5.prototype.append = function (str) {\n            // converts the string to utf8 bytes if necessary\n            if (/[\\u0080-\\uFFFF]/.test(str)) {\n                str = unescape(encodeURIComponent(str));\n            }\n    \n            // then append as binary\n            this.appendBinary(str);\n    \n            return this;\n        };\n    \n        /**\n         * Appends a binary string.\n         *\n         * @param {String} contents The binary string to be appended\n         *\n         * @return {SparkMD5} The instance itself\n         */\n        SparkMD5.prototype.appendBinary = function (contents) {\n            this._buff += contents;\n            this._length += contents.length;\n    \n            var length = this._buff.length,\n                i;\n    \n            for (i = 64; i <= length; i += 64) {\n                md5cycle(this._state, md5blk(this._buff.substring(i - 64, i)));\n            }\n    \n            this._buff = this._buff.substr(i - 64);\n    \n            return this;\n        };\n    \n        /**\n         * Finishes the incremental computation, reseting the internal state and\n         * returning the result.\n         * Use the raw parameter to obtain the raw result instead of the hex one.\n         *\n         * @param {Boolean} raw True to get the raw result, false to get the hex result\n         *\n         * @return {String|Array} The result\n         */\n        SparkMD5.prototype.end = function (raw) {\n            var buff = this._buff,\n                length = buff.length,\n                i,\n                tail = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],\n                ret;\n    \n            for (i = 0; i < length; i += 1) {\n                tail[i >> 2] |= buff.charCodeAt(i) << ((i % 4) << 3);\n            }\n    \n            this._finish(tail, length);\n            ret = !!raw ? this._state : hex(this._state);\n    \n            this.reset();\n    \n            return ret;\n        };\n    \n        /**\n         * Finish the final calculation based on the tail.\n         *\n         * @param {Array}  tail   The tail (will be modified)\n         * @param {Number} length The length of the remaining buffer\n         */\n        SparkMD5.prototype._finish = function (tail, length) {\n            var i = length,\n                tmp,\n                lo,\n                hi;\n    \n            tail[i >> 2] |= 0x80 << ((i % 4) << 3);\n            if (i > 55) {\n                md5cycle(this._state, tail);\n                for (i = 0; i < 16; i += 1) {\n                    tail[i] = 0;\n                }\n            }\n    \n            // Do the final computation based on the tail and length\n            // Beware that the final length may not fit in 32 bits so we take care of that\n            tmp = this._length * 8;\n            tmp = tmp.toString(16).match(/(.*?)(.{0,8})$/);\n            lo = parseInt(tmp[2], 16);\n            hi = parseInt(tmp[1], 16) || 0;\n    \n            tail[14] = lo;\n            tail[15] = hi;\n            md5cycle(this._state, tail);\n        };\n    \n        /**\n         * Resets the internal state of the computation.\n         *\n         * @return {SparkMD5} The instance itself\n         */\n        SparkMD5.prototype.reset = function () {\n            this._buff = \"\";\n            this._length = 0;\n            this._state = [1732584193, -271733879, -1732584194, 271733878];\n    \n            return this;\n        };\n    \n        /**\n         * Releases memory used by the incremental buffer and other aditional\n         * resources. If you plan to use the instance again, use reset instead.\n         */\n        SparkMD5.prototype.destroy = function () {\n            delete this._state;\n            delete this._buff;\n            delete this._length;\n        };\n    \n    \n        /**\n         * Performs the md5 hash on a string.\n         * A conversion will be applied if utf8 string is detected.\n         *\n         * @param {String}  str The string\n         * @param {Boolean} raw True to get the raw result, false to get the hex result\n         *\n         * @return {String|Array} The result\n         */\n        SparkMD5.hash = function (str, raw) {\n            // converts the string to utf8 bytes if necessary\n            if (/[\\u0080-\\uFFFF]/.test(str)) {\n                str = unescape(encodeURIComponent(str));\n            }\n    \n            var hash = md51(str);\n    \n            return !!raw ? hash : hex(hash);\n        };\n    \n        /**\n         * Performs the md5 hash on a binary string.\n         *\n         * @param {String}  content The binary string\n         * @param {Boolean} raw     True to get the raw result, false to get the hex result\n         *\n         * @return {String|Array} The result\n         */\n        SparkMD5.hashBinary = function (content, raw) {\n            var hash = md51(content);\n    \n            return !!raw ? hash : hex(hash);\n        };\n    \n        /**\n         * SparkMD5 OOP implementation for array buffers.\n         *\n         * Use this class to perform an incremental md5 ONLY for array buffers.\n         */\n        SparkMD5.ArrayBuffer = function () {\n            // call reset to init the instance\n            this.reset();\n        };\n    \n        ////////////////////////////////////////////////////////////////////////////\n    \n        /**\n         * Appends an array buffer.\n         *\n         * @param {ArrayBuffer} arr The array to be appended\n         *\n         * @return {SparkMD5.ArrayBuffer} The instance itself\n         */\n        SparkMD5.ArrayBuffer.prototype.append = function (arr) {\n            // TODO: we could avoid the concatenation here but the algorithm would be more complex\n            //       if you find yourself needing extra performance, please make a PR.\n            var buff = this._concatArrayBuffer(this._buff, arr),\n                length = buff.length,\n                i;\n    \n            this._length += arr.byteLength;\n    \n            for (i = 64; i <= length; i += 64) {\n                md5cycle(this._state, md5blk_array(buff.subarray(i - 64, i)));\n            }\n    \n            // Avoids IE10 weirdness (documented above)\n            this._buff = (i - 64) < length ? buff.subarray(i - 64) : new Uint8Array(0);\n    \n            return this;\n        };\n    \n        /**\n         * Finishes the incremental computation, reseting the internal state and\n         * returning the result.\n         * Use the raw parameter to obtain the raw result instead of the hex one.\n         *\n         * @param {Boolean} raw True to get the raw result, false to get the hex result\n         *\n         * @return {String|Array} The result\n         */\n        SparkMD5.ArrayBuffer.prototype.end = function (raw) {\n            var buff = this._buff,\n                length = buff.length,\n                tail = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],\n                i,\n                ret;\n    \n            for (i = 0; i < length; i += 1) {\n                tail[i >> 2] |= buff[i] << ((i % 4) << 3);\n            }\n    \n            this._finish(tail, length);\n            ret = !!raw ? this._state : hex(this._state);\n    \n            this.reset();\n    \n            return ret;\n        };\n    \n        SparkMD5.ArrayBuffer.prototype._finish = SparkMD5.prototype._finish;\n    \n        /**\n         * Resets the internal state of the computation.\n         *\n         * @return {SparkMD5.ArrayBuffer} The instance itself\n         */\n        SparkMD5.ArrayBuffer.prototype.reset = function () {\n            this._buff = new Uint8Array(0);\n            this._length = 0;\n            this._state = [1732584193, -271733879, -1732584194, 271733878];\n    \n            return this;\n        };\n    \n        /**\n         * Releases memory used by the incremental buffer and other aditional\n         * resources. If you plan to use the instance again, use reset instead.\n         */\n        SparkMD5.ArrayBuffer.prototype.destroy = SparkMD5.prototype.destroy;\n    \n        /**\n         * Concats two array buffers, returning a new one.\n         *\n         * @param  {ArrayBuffer} first  The first array buffer\n         * @param  {ArrayBuffer} second The second array buffer\n         *\n         * @return {ArrayBuffer} The new array buffer\n         */\n        SparkMD5.ArrayBuffer.prototype._concatArrayBuffer = function (first, second) {\n            var firstLength = first.length,\n                result = new Uint8Array(firstLength + second.byteLength);\n    \n            result.set(first);\n            result.set(new Uint8Array(second), firstLength);\n    \n            return result;\n        };\n    \n        /**\n         * Performs the md5 hash on an array buffer.\n         *\n         * @param {ArrayBuffer} arr The array buffer\n         * @param {Boolean}     raw True to get the raw result, false to get the hex result\n         *\n         * @return {String|Array} The result\n         */\n        SparkMD5.ArrayBuffer.hash = function (arr, raw) {\n            var hash = md51_array(new Uint8Array(arr));\n    \n            return !!raw ? hash : hex(hash);\n        };\n        \n        return FlashRuntime.register( 'Md5', {\n            init: function() {\n                // do nothing.\n            },\n    \n            loadFromBlob: function( file ) {\n                var blob = file.getSource(),\n                    chunkSize = 2 * 1024 * 1024,\n                    chunks = Math.ceil( blob.size / chunkSize ),\n                    chunk = 0,\n                    owner = this.owner,\n                    spark = new SparkMD5.ArrayBuffer(),\n                    me = this,\n                    blobSlice = blob.mozSlice || blob.webkitSlice || blob.slice,\n                    loadNext, fr;\n    \n                fr = new FileReader();\n    \n                loadNext = function() {\n                    var start, end;\n    \n                    start = chunk * chunkSize;\n                    end = Math.min( start + chunkSize, blob.size );\n    \n                    fr.onload = function( e ) {\n                        spark.append( e.target.result );\n                        owner.trigger( 'progress', {\n                            total: file.size,\n                            loaded: end\n                        });\n                    };\n    \n                    fr.onloadend = function() {\n                        fr.onloadend = fr.onload = null;\n    \n                        if ( ++chunk < chunks ) {\n                            setTimeout( loadNext, 1 );\n                        } else {\n                            setTimeout(function(){\n                                owner.trigger('load');\n                                me.result = spark.end();\n                                loadNext = file = blob = spark = null;\n                                owner.trigger('complete');\n                            }, 50 );\n                        }\n                    };\n    \n                    fr.readAsArrayBuffer( blobSlice.call( blob, start, end ) );\n                };\n    \n                loadNext();\n            },\n    \n            getResult: function() {\n                return this.result;\n            }\n        });\n    });\n    /**\n     * @fileOverview FlashRuntime\n     */\n    define('runtime/flash/runtime',[\n        'base',\n        'runtime/runtime',\n        'runtime/compbase'\n    ], function( Base, Runtime, CompBase ) {\n    \n        var $ = Base.$,\n            type = 'flash',\n            components = {};\n    \n    \n        function getFlashVersion() {\n            var version;\n    \n            try {\n                version = navigator.plugins[ 'Shockwave Flash' ];\n                version = version.description;\n            } catch ( ex ) {\n                try {\n                    version = new ActiveXObject('ShockwaveFlash.ShockwaveFlash')\n                            .GetVariable('$version');\n                } catch ( ex2 ) {\n                    version = '0.0';\n                }\n            }\n            version = version.match( /\\d+/g );\n            return parseFloat( version[ 0 ] + '.' + version[ 1 ], 10 );\n        }\n    \n        function FlashRuntime() {\n            var pool = {},\n                clients = {},\n                destroy = this.destroy,\n                me = this,\n                jsreciver = Base.guid('webuploader_');\n    \n            Runtime.apply( me, arguments );\n            me.type = type;\n    \n    \n            // 这个方法的调用者，实际上是RuntimeClient\n            me.exec = function( comp, fn/*, args...*/ ) {\n                var client = this,\n                    uid = client.uid,\n                    args = Base.slice( arguments, 2 ),\n                    instance;\n    \n                clients[ uid ] = client;\n    \n                if ( components[ comp ] ) {\n                    if ( !pool[ uid ] ) {\n                        pool[ uid ] = new components[ comp ]( client, me );\n                    }\n    \n                    instance = pool[ uid ];\n    \n                    if ( instance[ fn ] ) {\n                        return instance[ fn ].apply( instance, args );\n                    }\n                }\n    \n                return me.flashExec.apply( client, arguments );\n            };\n    \n            function handler( evt, obj ) {\n                var type = evt.type || evt,\n                    parts, uid;\n    \n                parts = type.split('::');\n                uid = parts[ 0 ];\n                type = parts[ 1 ];\n    \n                // console.log.apply( console, arguments );\n    \n                if ( type === 'Ready' && uid === me.uid ) {\n                    me.trigger('ready');\n                } else if ( clients[ uid ] ) {\n                    clients[ uid ].trigger( type.toLowerCase(), evt, obj );\n                }\n    \n                // Base.log( evt, obj );\n            }\n    \n            // flash的接受器。\n            window[ jsreciver ] = function() {\n                var args = arguments;\n    \n                // 为了能捕获得到。\n                setTimeout(function() {\n                    handler.apply( null, args );\n                }, 1 );\n            };\n    \n            this.jsreciver = jsreciver;\n    \n            this.destroy = function() {\n                // @todo 删除池子中的所有实例\n                return destroy && destroy.apply( this, arguments );\n            };\n    \n            this.flashExec = function( comp, fn ) {\n                var flash = me.getFlash(),\n                    args = Base.slice( arguments, 2 );\n    \n                return flash.exec( this.uid, comp, fn, args );\n            };\n    \n            // @todo\n        }\n    \n        Base.inherits( Runtime, {\n            constructor: FlashRuntime,\n    \n            init: function() {\n                var container = this.getContainer(),\n                    opts = this.options,\n                    html;\n    \n                // if not the minimal height, shims are not initialized\n                // in older browsers (e.g FF3.6, IE6,7,8, Safari 4.0,5.0, etc)\n                container.css({\n                    position: 'absolute',\n                    top: '-8px',\n                    left: '-8px',\n                    width: '9px',\n                    height: '9px',\n                    overflow: 'hidden'\n                });\n    \n                // insert flash object\n                html = '<object id=\"' + this.uid + '\" type=\"application/' +\n                        'x-shockwave-flash\" data=\"' +  opts.swf + '\" ';\n    \n                if ( Base.browser.ie ) {\n                    html += 'classid=\"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000\" ';\n                }\n    \n                html += 'width=\"100%\" height=\"100%\" style=\"outline:0\">'  +\n                    '<param name=\"movie\" value=\"' + opts.swf + '\" />' +\n                    '<param name=\"flashvars\" value=\"uid=' + this.uid +\n                    '&jsreciver=' + this.jsreciver + '\" />' +\n                    '<param name=\"wmode\" value=\"transparent\" />' +\n                    '<param name=\"allowscriptaccess\" value=\"always\" />' +\n                '</object>';\n    \n                container.html( html );\n            },\n    \n            getFlash: function() {\n                if ( this._flash ) {\n                    return this._flash;\n                }\n    \n                this._flash = $( '#' + this.uid ).get( 0 );\n                return this._flash;\n            }\n    \n        });\n    \n        FlashRuntime.register = function( name, component ) {\n            component = components[ name ] = Base.inherits( CompBase, $.extend({\n    \n                // @todo fix this later\n                flashExec: function() {\n                    var owner = this.owner,\n                        runtime = this.getRuntime();\n    \n                    return runtime.flashExec.apply( owner, arguments );\n                }\n            }, component ) );\n    \n            return component;\n        };\n    \n        if ( getFlashVersion() >= 11.4 ) {\n            Runtime.addRuntime( type, FlashRuntime );\n        }\n    \n        return FlashRuntime;\n    });\n    /**\n     * @fileOverview FilePicker\n     */\n    define('runtime/flash/filepicker',[\n        'base',\n        'runtime/flash/runtime'\n    ], function( Base, FlashRuntime ) {\n        var $ = Base.$;\n    \n        return FlashRuntime.register( 'FilePicker', {\n            init: function( opts ) {\n                var copy = $.extend({}, opts ),\n                    len, i;\n    \n                // 修复Flash再没有设置title的情况下无法弹出flash文件选择框的bug.\n                len = copy.accept && copy.accept.length;\n                for (  i = 0; i < len; i++ ) {\n                    if ( !copy.accept[ i ].title ) {\n                        copy.accept[ i ].title = 'Files';\n                    }\n                }\n    \n                delete copy.button;\n                delete copy.id;\n                delete copy.container;\n    \n                this.flashExec( 'FilePicker', 'init', copy );\n            },\n    \n            destroy: function() {\n                this.flashExec( 'FilePicker', 'destroy' );\n            }\n        });\n    });\n    /**\n     * @fileOverview 图片压缩\n     */\n    define('runtime/flash/image',[\n        'runtime/flash/runtime'\n    ], function( FlashRuntime ) {\n    \n        return FlashRuntime.register( 'Image', {\n            // init: function( options ) {\n            //     var owner = this.owner;\n    \n            //     this.flashExec( 'Image', 'init', options );\n            //     owner.on( 'load', function() {\n            //         debugger;\n            //     });\n            // },\n    \n            loadFromBlob: function( blob ) {\n                var owner = this.owner;\n    \n                owner.info() && this.flashExec( 'Image', 'info', owner.info() );\n                owner.meta() && this.flashExec( 'Image', 'meta', owner.meta() );\n    \n                this.flashExec( 'Image', 'loadFromBlob', blob.uid );\n            }\n        });\n    });\n    /**\n     * @fileOverview  Transport flash实现\n     */\n    define('runtime/flash/transport',[\n        'base',\n        'runtime/flash/runtime',\n        'runtime/client'\n    ], function( Base, FlashRuntime, RuntimeClient ) {\n        var $ = Base.$;\n    \n        return FlashRuntime.register( 'Transport', {\n            init: function() {\n                this._status = 0;\n                this._response = null;\n                this._responseJson = null;\n            },\n    \n            send: function() {\n                var owner = this.owner,\n                    opts = this.options,\n                    xhr = this._initAjax(),\n                    blob = owner._blob,\n                    server = opts.server,\n                    binary;\n    \n                xhr.connectRuntime( blob.ruid );\n    \n                if ( opts.sendAsBinary ) {\n                    server += (/\\?/.test( server ) ? '&' : '?') +\n                            $.param( owner._formData );\n    \n                    binary = blob.uid;\n                } else {\n                    $.each( owner._formData, function( k, v ) {\n                        xhr.exec( 'append', k, v );\n                    });\n    \n                    xhr.exec( 'appendBlob', opts.fileVal, blob.uid,\n                            opts.filename || owner._formData.name || '' );\n                }\n    \n                this._setRequestHeader( xhr, opts.headers );\n                xhr.exec( 'send', {\n                    method: opts.method,\n                    url: server,\n                    forceURLStream: opts.forceURLStream,\n                    mimeType: 'application/octet-stream'\n                }, binary );\n            },\n    \n            getStatus: function() {\n                return this._status;\n            },\n    \n            getResponse: function() {\n                return this._response || '';\n            },\n    \n            getResponseAsJson: function() {\n                return this._responseJson;\n            },\n    \n            abort: function() {\n                var xhr = this._xhr;\n    \n                if ( xhr ) {\n                    xhr.exec('abort');\n                    xhr.destroy();\n                    this._xhr = xhr = null;\n                }\n            },\n    \n            destroy: function() {\n                this.abort();\n            },\n    \n            _initAjax: function() {\n                var me = this,\n                    xhr = new RuntimeClient('XMLHttpRequest');\n    \n                xhr.on( 'uploadprogress progress', function( e ) {\n                    var percent = e.loaded / e.total;\n                    percent = Math.min( 1, Math.max( 0, percent ) );\n                    return me.trigger( 'progress', percent );\n                });\n    \n                xhr.on( 'load', function() {\n                    var status = xhr.exec('getStatus'),\n                        readBody = false,\n                        err = '',\n                        p;\n    \n                    xhr.off();\n                    me._xhr = null;\n    \n                    if ( status >= 200 && status < 300 ) {\n                        readBody = true;\n                    } else if ( status >= 500 && status < 600 ) {\n                        readBody = true;\n                        err = 'server';\n                    } else {\n                        err = 'http';\n                    }\n    \n                    if ( readBody ) {\n                        me._response = xhr.exec('getResponse');\n                        me._response = decodeURIComponent( me._response );\n    \n                        // flash 处理可能存在 bug, 没辙只能靠 js 了\n                        // try {\n                        //     me._responseJson = xhr.exec('getResponseAsJson');\n                        // } catch ( error ) {\n    \n                        p = function( s ) {\n                            try {\n                                if (window.JSON && window.JSON.parse) {\n                                    return JSON.parse(s);\n                                }\n    \n                                return new Function('return ' + s).call();\n                            } catch ( err ) {\n                                return {};\n                            }\n                        };\n                        me._responseJson  = me._response ? p(me._response) : {};\n    \n                        // }\n                    }\n    \n                    xhr.destroy();\n                    xhr = null;\n    \n                    return err ? me.trigger( 'error', err ) : me.trigger('load');\n                });\n    \n                xhr.on( 'error', function() {\n                    xhr.off();\n                    me._xhr = null;\n                    me.trigger( 'error', 'http' );\n                });\n    \n                me._xhr = xhr;\n                return xhr;\n            },\n    \n            _setRequestHeader: function( xhr, headers ) {\n                $.each( headers, function( key, val ) {\n                    xhr.exec( 'setRequestHeader', key, val );\n                });\n            }\n        });\n    });\n    \n    /**\n     * @fileOverview Blob Html实现\n     */\n    define('runtime/flash/blob',[\n        'runtime/flash/runtime',\n        'lib/blob'\n    ], function( FlashRuntime, Blob ) {\n    \n        return FlashRuntime.register( 'Blob', {\n            slice: function( start, end ) {\n                var blob = this.flashExec( 'Blob', 'slice', start, end );\n    \n                return new Blob( this.getRuid(), blob );\n            }\n        });\n    });\n    /**\n     * @fileOverview  Md5 flash实现\n     */\n    define('runtime/flash/md5',[\n        'runtime/flash/runtime'\n    ], function( FlashRuntime ) {\n        \n        return FlashRuntime.register( 'Md5', {\n            init: function() {\n                // do nothing.\n            },\n    \n            loadFromBlob: function( blob ) {\n                return this.flashExec( 'Md5', 'loadFromBlob', blob.uid );\n            }\n        });\n    });\n    /**\n     * @fileOverview 完全版本。\n     */\n    define('preset/all',[\n        'base',\n    \n        // widgets\n        'widgets/filednd',\n        'widgets/filepaste',\n        'widgets/filepicker',\n        'widgets/image',\n        'widgets/queue',\n        'widgets/runtime',\n        'widgets/upload',\n        'widgets/validator',\n        'widgets/md5',\n    \n        // runtimes\n        // html5\n        'runtime/html5/blob',\n        'runtime/html5/dnd',\n        'runtime/html5/filepaste',\n        'runtime/html5/filepicker',\n        'runtime/html5/imagemeta/exif',\n        'runtime/html5/androidpatch',\n        'runtime/html5/image',\n        'runtime/html5/transport',\n        'runtime/html5/md5',\n    \n        // flash\n        'runtime/flash/filepicker',\n        'runtime/flash/image',\n        'runtime/flash/transport',\n        'runtime/flash/blob',\n        'runtime/flash/md5'\n    ], function( Base ) {\n        return Base;\n    });\n    /**\n     * @fileOverview 日志组件，主要用来收集错误信息，可以帮助 webuploader 更好的定位问题和发展。\n     *\n     * 如果您不想要启用此功能，请在打包的时候去掉 log 模块。\n     *\n     * 或者可以在初始化的时候通过 options.disableWidgets 属性禁用。\n     *\n     * 如：\n     * WebUploader.create({\n     *     ...\n     *\n     *     disableWidgets: 'log',\n     *\n     *     ...\n     * })\n     */\n    define('widgets/log',[\n        'base',\n        'uploader',\n        'widgets/widget'\n    ], function( Base, Uploader ) {\n        var $ = Base.$,\n            logUrl = ' http://static.tieba.baidu.com/tb/pms/img/st.gif??',\n            product = (location.hostname || location.host || 'protected').toLowerCase(),\n    \n            // 只针对 baidu 内部产品用户做统计功能。\n            enable = product && /baidu/i.exec(product),\n            base;\n    \n        if (!enable) {\n            return;\n        }\n    \n        base = {\n            dv: 3,\n            master: 'webuploader',\n            online: /test/.exec(product) ? 0 : 1,\n            module: '',\n            product: product,\n            type: 0\n        };\n    \n        function send(data) {\n            var obj = $.extend({}, base, data),\n                url = logUrl.replace(/^(.*)\\?/, '$1' + $.param( obj )),\n                image = new Image();\n    \n            image.src = url;\n        }\n    \n        return Uploader.register({\n            name: 'log',\n    \n            init: function() {\n                var owner = this.owner,\n                    count = 0,\n                    size = 0;\n    \n                owner\n                    .on('error', function(code) {\n                        send({\n                            type: 2,\n                            c_error_code: code\n                        });\n                    })\n                    .on('uploadError', function(file, reason) {\n                        send({\n                            type: 2,\n                            c_error_code: 'UPLOAD_ERROR',\n                            c_reason: '' + reason\n                        });\n                    })\n                    .on('uploadComplete', function(file) {\n                        count++;\n                        size += file.size;\n                    }).\n                    on('uploadFinished', function() {\n                        send({\n                            c_count: count,\n                            c_size: size\n                        });\n                        count = size = 0;\n                    });\n    \n                send({\n                    c_usage: 1\n                });\n            }\n        });\n    });\n    /**\n     * @fileOverview Uploader上传类\n     */\n    define('webuploader',[\n        'preset/all',\n        'widgets/log'\n    ], function( preset ) {\n        return preset;\n    });\n    return require('webuploader');\n});\n"
  },
  {
    "path": "static/webuploader/webuploader.noimage.js",
    "content": "/*! WebUploader 0.1.6 */\n\n\n/**\n * @fileOverview 让内部各个部件的代码可以用[amd](https://github.com/amdjs/amdjs-api/wiki/AMD)模块定义方式组织起来。\n *\n * AMD API 内部的简单不完全实现，请忽略。只有当WebUploader被合并成一个文件的时候才会引入。\n */\n(function( root, factory ) {\n    var modules = {},\n\n        // 内部require, 简单不完全实现。\n        // https://github.com/amdjs/amdjs-api/wiki/require\n        _require = function( deps, callback ) {\n            var args, len, i;\n\n            // 如果deps不是数组，则直接返回指定module\n            if ( typeof deps === 'string' ) {\n                return getModule( deps );\n            } else {\n                args = [];\n                for( len = deps.length, i = 0; i < len; i++ ) {\n                    args.push( getModule( deps[ i ] ) );\n                }\n\n                return callback.apply( null, args );\n            }\n        },\n\n        // 内部define，暂时不支持不指定id.\n        _define = function( id, deps, factory ) {\n            if ( arguments.length === 2 ) {\n                factory = deps;\n                deps = null;\n            }\n\n            _require( deps || [], function() {\n                setModule( id, factory, arguments );\n            });\n        },\n\n        // 设置module, 兼容CommonJs写法。\n        setModule = function( id, factory, args ) {\n            var module = {\n                    exports: factory\n                },\n                returned;\n\n            if ( typeof factory === 'function' ) {\n                args.length || (args = [ _require, module.exports, module ]);\n                returned = factory.apply( null, args );\n                returned !== undefined && (module.exports = returned);\n            }\n\n            modules[ id ] = module.exports;\n        },\n\n        // 根据id获取module\n        getModule = function( id ) {\n            var module = modules[ id ] || root[ id ];\n\n            if ( !module ) {\n                throw new Error( '`' + id + '` is undefined' );\n            }\n\n            return module;\n        },\n\n        // 将所有modules，将路径ids装换成对象。\n        exportsTo = function( obj ) {\n            var key, host, parts, part, last, ucFirst;\n\n            // make the first character upper case.\n            ucFirst = function( str ) {\n                return str && (str.charAt( 0 ).toUpperCase() + str.substr( 1 ));\n            };\n\n            for ( key in modules ) {\n                host = obj;\n\n                if ( !modules.hasOwnProperty( key ) ) {\n                    continue;\n                }\n\n                parts = key.split('/');\n                last = ucFirst( parts.pop() );\n\n                while( (part = ucFirst( parts.shift() )) ) {\n                    host[ part ] = host[ part ] || {};\n                    host = host[ part ];\n                }\n\n                host[ last ] = modules[ key ];\n            }\n\n            return obj;\n        },\n\n        makeExport = function( dollar ) {\n            root.__dollar = dollar;\n\n            // exports every module.\n            return exportsTo( factory( root, _define, _require ) );\n        },\n\n        origin;\n\n    if ( typeof module === 'object' && typeof module.exports === 'object' ) {\n\n        // For CommonJS and CommonJS-like environments where a proper window is present,\n        module.exports = makeExport();\n    } else if ( typeof define === 'function' && define.amd ) {\n\n        // Allow using this built library as an AMD module\n        // in another project. That other project will only\n        // see this AMD call, not the internal modules in\n        // the closure below.\n        define([ 'jquery' ], makeExport );\n    } else {\n\n        // Browser globals case. Just assign the\n        // result to a property on the global.\n        origin = root.WebUploader;\n        root.WebUploader = makeExport();\n        root.WebUploader.noConflict = function() {\n            root.WebUploader = origin;\n        };\n    }\n})( window, function( window, define, require ) {\n\n\n    /**\n     * @fileOverview jQuery or Zepto\n     * @require \"jquery\"\n     * @require \"zepto\"\n     */\n    define('dollar-third',[],function() {\n        var req = window.require;\n        var $ = window.__dollar || \n            window.jQuery || \n            window.Zepto || \n            req('jquery') || \n            req('zepto');\n    \n        if ( !$ ) {\n            throw new Error('jQuery or Zepto not found!');\n        }\n    \n        return $;\n    });\n    \n    /**\n     * @fileOverview Dom 操作相关\n     */\n    define('dollar',[\n        'dollar-third'\n    ], function( _ ) {\n        return _;\n    });\n    /**\n     * @fileOverview 使用jQuery的Promise\n     */\n    define('promise-third',[\n        'dollar'\n    ], function( $ ) {\n        return {\n            Deferred: $.Deferred,\n            when: $.when,\n    \n            isPromise: function( anything ) {\n                return anything && typeof anything.then === 'function';\n            }\n        };\n    });\n    /**\n     * @fileOverview Promise/A+\n     */\n    define('promise',[\n        'promise-third'\n    ], function( _ ) {\n        return _;\n    });\n    /**\n     * @fileOverview 基础类方法。\n     */\n    \n    /**\n     * Web Uploader内部类的详细说明，以下提及的功能类，都可以在`WebUploader`这个变量中访问到。\n     *\n     * As you know, Web Uploader的每个文件都是用过[AMD](https://github.com/amdjs/amdjs-api/wiki/AMD)规范中的`define`组织起来的, 每个Module都会有个module id.\n     * 默认module id为该文件的路径，而此路径将会转化成名字空间存放在WebUploader中。如：\n     *\n     * * module `base`：WebUploader.Base\n     * * module `file`: WebUploader.File\n     * * module `lib/dnd`: WebUploader.Lib.Dnd\n     * * module `runtime/html5/dnd`: WebUploader.Runtime.Html5.Dnd\n     *\n     *\n     * 以下文档中对类的使用可能省略掉了`WebUploader`前缀。\n     * @module WebUploader\n     * @title WebUploader API文档\n     */\n    define('base',[\n        'dollar',\n        'promise'\n    ], function( $, promise ) {\n    \n        var noop = function() {},\n            call = Function.call;\n    \n        // http://jsperf.com/uncurrythis\n        // 反科里化\n        function uncurryThis( fn ) {\n            return function() {\n                return call.apply( fn, arguments );\n            };\n        }\n    \n        function bindFn( fn, context ) {\n            return function() {\n                return fn.apply( context, arguments );\n            };\n        }\n    \n        function createObject( proto ) {\n            var f;\n    \n            if ( Object.create ) {\n                return Object.create( proto );\n            } else {\n                f = function() {};\n                f.prototype = proto;\n                return new f();\n            }\n        }\n    \n    \n        /**\n         * 基础类，提供一些简单常用的方法。\n         * @class Base\n         */\n        return {\n    \n            /**\n             * @property {String} version 当前版本号。\n             */\n            version: '0.1.6',\n    \n            /**\n             * @property {jQuery|Zepto} $ 引用依赖的jQuery或者Zepto对象。\n             */\n            $: $,\n    \n            Deferred: promise.Deferred,\n    \n            isPromise: promise.isPromise,\n    \n            when: promise.when,\n    \n            /**\n             * @description  简单的浏览器检查结果。\n             *\n             * * `webkit`  webkit版本号，如果浏览器为非webkit内核，此属性为`undefined`。\n             * * `chrome`  chrome浏览器版本号，如果浏览器为chrome，此属性为`undefined`。\n             * * `ie`  ie浏览器版本号，如果浏览器为非ie，此属性为`undefined`。**暂不支持ie10+**\n             * * `firefox`  firefox浏览器版本号，如果浏览器为非firefox，此属性为`undefined`。\n             * * `safari`  safari浏览器版本号，如果浏览器为非safari，此属性为`undefined`。\n             * * `opera`  opera浏览器版本号，如果浏览器为非opera，此属性为`undefined`。\n             *\n             * @property {Object} [browser]\n             */\n            browser: (function( ua ) {\n                var ret = {},\n                    webkit = ua.match( /WebKit\\/([\\d.]+)/ ),\n                    chrome = ua.match( /Chrome\\/([\\d.]+)/ ) ||\n                        ua.match( /CriOS\\/([\\d.]+)/ ),\n    \n                    ie = ua.match( /MSIE\\s([\\d\\.]+)/ ) ||\n                        ua.match( /(?:trident)(?:.*rv:([\\w.]+))?/i ),\n                    firefox = ua.match( /Firefox\\/([\\d.]+)/ ),\n                    safari = ua.match( /Safari\\/([\\d.]+)/ ),\n                    opera = ua.match( /OPR\\/([\\d.]+)/ );\n    \n                webkit && (ret.webkit = parseFloat( webkit[ 1 ] ));\n                chrome && (ret.chrome = parseFloat( chrome[ 1 ] ));\n                ie && (ret.ie = parseFloat( ie[ 1 ] ));\n                firefox && (ret.firefox = parseFloat( firefox[ 1 ] ));\n                safari && (ret.safari = parseFloat( safari[ 1 ] ));\n                opera && (ret.opera = parseFloat( opera[ 1 ] ));\n    \n                return ret;\n            })( navigator.userAgent ),\n    \n            /**\n             * @description  操作系统检查结果。\n             *\n             * * `android`  如果在android浏览器环境下，此值为对应的android版本号，否则为`undefined`。\n             * * `ios` 如果在ios浏览器环境下，此值为对应的ios版本号，否则为`undefined`。\n             * @property {Object} [os]\n             */\n            os: (function( ua ) {\n                var ret = {},\n    \n                    // osx = !!ua.match( /\\(Macintosh\\; Intel / ),\n                    android = ua.match( /(?:Android);?[\\s\\/]+([\\d.]+)?/ ),\n                    ios = ua.match( /(?:iPad|iPod|iPhone).*OS\\s([\\d_]+)/ );\n    \n                // osx && (ret.osx = true);\n                android && (ret.android = parseFloat( android[ 1 ] ));\n                ios && (ret.ios = parseFloat( ios[ 1 ].replace( /_/g, '.' ) ));\n    \n                return ret;\n            })( navigator.userAgent ),\n    \n            /**\n             * 实现类与类之间的继承。\n             * @method inherits\n             * @grammar Base.inherits( super ) => child\n             * @grammar Base.inherits( super, protos ) => child\n             * @grammar Base.inherits( super, protos, statics ) => child\n             * @param  {Class} super 父类\n             * @param  {Object | Function} [protos] 子类或者对象。如果对象中包含constructor，子类将是用此属性值。\n             * @param  {Function} [protos.constructor] 子类构造器，不指定的话将创建个临时的直接执行父类构造器的方法。\n             * @param  {Object} [statics] 静态属性或方法。\n             * @return {Class} 返回子类。\n             * @example\n             * function Person() {\n             *     console.log( 'Super' );\n             * }\n             * Person.prototype.hello = function() {\n             *     console.log( 'hello' );\n             * };\n             *\n             * var Manager = Base.inherits( Person, {\n             *     world: function() {\n             *         console.log( 'World' );\n             *     }\n             * });\n             *\n             * // 因为没有指定构造器，父类的构造器将会执行。\n             * var instance = new Manager();    // => Super\n             *\n             * // 继承子父类的方法\n             * instance.hello();    // => hello\n             * instance.world();    // => World\n             *\n             * // 子类的__super__属性指向父类\n             * console.log( Manager.__super__ === Person );    // => true\n             */\n            inherits: function( Super, protos, staticProtos ) {\n                var child;\n    \n                if ( typeof protos === 'function' ) {\n                    child = protos;\n                    protos = null;\n                } else if ( protos && protos.hasOwnProperty('constructor') ) {\n                    child = protos.constructor;\n                } else {\n                    child = function() {\n                        return Super.apply( this, arguments );\n                    };\n                }\n    \n                // 复制静态方法\n                $.extend( true, child, Super, staticProtos || {} );\n    \n                /* jshint camelcase: false */\n    \n                // 让子类的__super__属性指向父类。\n                child.__super__ = Super.prototype;\n    \n                // 构建原型，添加原型方法或属性。\n                // 暂时用Object.create实现。\n                child.prototype = createObject( Super.prototype );\n                protos && $.extend( true, child.prototype, protos );\n    \n                return child;\n            },\n    \n            /**\n             * 一个不做任何事情的方法。可以用来赋值给默认的callback.\n             * @method noop\n             */\n            noop: noop,\n    \n            /**\n             * 返回一个新的方法，此方法将已指定的`context`来执行。\n             * @grammar Base.bindFn( fn, context ) => Function\n             * @method bindFn\n             * @example\n             * var doSomething = function() {\n             *         console.log( this.name );\n             *     },\n             *     obj = {\n             *         name: 'Object Name'\n             *     },\n             *     aliasFn = Base.bind( doSomething, obj );\n             *\n             *  aliasFn();    // => Object Name\n             *\n             */\n            bindFn: bindFn,\n    \n            /**\n             * 引用Console.log如果存在的话，否则引用一个[空函数noop](#WebUploader:Base.noop)。\n             * @grammar Base.log( args... ) => undefined\n             * @method log\n             */\n            log: (function() {\n                if ( window.console ) {\n                    return bindFn( console.log, console );\n                }\n                return noop;\n            })(),\n    \n            nextTick: (function() {\n    \n                return function( cb ) {\n                    setTimeout( cb, 1 );\n                };\n    \n                // @bug 当浏览器不在当前窗口时就停了。\n                // var next = window.requestAnimationFrame ||\n                //     window.webkitRequestAnimationFrame ||\n                //     window.mozRequestAnimationFrame ||\n                //     function( cb ) {\n                //         window.setTimeout( cb, 1000 / 60 );\n                //     };\n    \n                // // fix: Uncaught TypeError: Illegal invocation\n                // return bindFn( next, window );\n            })(),\n    \n            /**\n             * 被[uncurrythis](http://www.2ality.com/2011/11/uncurrying-this.html)的数组slice方法。\n             * 将用来将非数组对象转化成数组对象。\n             * @grammar Base.slice( target, start[, end] ) => Array\n             * @method slice\n             * @example\n             * function doSomthing() {\n             *     var args = Base.slice( arguments, 1 );\n             *     console.log( args );\n             * }\n             *\n             * doSomthing( 'ignored', 'arg2', 'arg3' );    // => Array [\"arg2\", \"arg3\"]\n             */\n            slice: uncurryThis( [].slice ),\n    \n            /**\n             * 生成唯一的ID\n             * @method guid\n             * @grammar Base.guid() => String\n             * @grammar Base.guid( prefx ) => String\n             */\n            guid: (function() {\n                var counter = 0;\n    \n                return function( prefix ) {\n                    var guid = (+new Date()).toString( 32 ),\n                        i = 0;\n    \n                    for ( ; i < 5; i++ ) {\n                        guid += Math.floor( Math.random() * 65535 ).toString( 32 );\n                    }\n    \n                    return (prefix || 'wu_') + guid + (counter++).toString( 32 );\n                };\n            })(),\n    \n            /**\n             * 格式化文件大小, 输出成带单位的字符串\n             * @method formatSize\n             * @grammar Base.formatSize( size ) => String\n             * @grammar Base.formatSize( size, pointLength ) => String\n             * @grammar Base.formatSize( size, pointLength, units ) => String\n             * @param {Number} size 文件大小\n             * @param {Number} [pointLength=2] 精确到的小数点数。\n             * @param {Array} [units=[ 'B', 'K', 'M', 'G', 'TB' ]] 单位数组。从字节，到千字节，一直往上指定。如果单位数组里面只指定了到了K(千字节)，同时文件大小大于M, 此方法的输出将还是显示成多少K.\n             * @example\n             * console.log( Base.formatSize( 100 ) );    // => 100B\n             * console.log( Base.formatSize( 1024 ) );    // => 1.00K\n             * console.log( Base.formatSize( 1024, 0 ) );    // => 1K\n             * console.log( Base.formatSize( 1024 * 1024 ) );    // => 1.00M\n             * console.log( Base.formatSize( 1024 * 1024 * 1024 ) );    // => 1.00G\n             * console.log( Base.formatSize( 1024 * 1024 * 1024, 0, ['B', 'KB', 'MB'] ) );    // => 1024MB\n             */\n            formatSize: function( size, pointLength, units ) {\n                var unit;\n    \n                units = units || [ 'B', 'K', 'M', 'G', 'TB' ];\n    \n                while ( (unit = units.shift()) && size > 1024 ) {\n                    size = size / 1024;\n                }\n    \n                return (unit === 'B' ? size : size.toFixed( pointLength || 2 )) +\n                        unit;\n            }\n        };\n    });\n    /**\n     * 事件处理类，可以独立使用，也可以扩展给对象使用。\n     * @fileOverview Mediator\n     */\n    define('mediator',[\n        'base'\n    ], function( Base ) {\n        var $ = Base.$,\n            slice = [].slice,\n            separator = /\\s+/,\n            protos;\n    \n        // 根据条件过滤出事件handlers.\n        function findHandlers( arr, name, callback, context ) {\n            return $.grep( arr, function( handler ) {\n                return handler &&\n                        (!name || handler.e === name) &&\n                        (!callback || handler.cb === callback ||\n                        handler.cb._cb === callback) &&\n                        (!context || handler.ctx === context);\n            });\n        }\n    \n        function eachEvent( events, callback, iterator ) {\n            // 不支持对象，只支持多个event用空格隔开\n            $.each( (events || '').split( separator ), function( _, key ) {\n                iterator( key, callback );\n            });\n        }\n    \n        function triggerHanders( events, args ) {\n            var stoped = false,\n                i = -1,\n                len = events.length,\n                handler;\n    \n            while ( ++i < len ) {\n                handler = events[ i ];\n    \n                if ( handler.cb.apply( handler.ctx2, args ) === false ) {\n                    stoped = true;\n                    break;\n                }\n            }\n    \n            return !stoped;\n        }\n    \n        protos = {\n    \n            /**\n             * 绑定事件。\n             *\n             * `callback`方法在执行时，arguments将会来源于trigger的时候携带的参数。如\n             * ```javascript\n             * var obj = {};\n             *\n             * // 使得obj有事件行为\n             * Mediator.installTo( obj );\n             *\n             * obj.on( 'testa', function( arg1, arg2 ) {\n             *     console.log( arg1, arg2 ); // => 'arg1', 'arg2'\n             * });\n             *\n             * obj.trigger( 'testa', 'arg1', 'arg2' );\n             * ```\n             *\n             * 如果`callback`中，某一个方法`return false`了，则后续的其他`callback`都不会被执行到。\n             * 切会影响到`trigger`方法的返回值，为`false`。\n             *\n             * `on`还可以用来添加一个特殊事件`all`, 这样所有的事件触发都会响应到。同时此类`callback`中的arguments有一个不同处，\n             * 就是第一个参数为`type`，记录当前是什么事件在触发。此类`callback`的优先级比脚低，会再正常`callback`执行完后触发。\n             * ```javascript\n             * obj.on( 'all', function( type, arg1, arg2 ) {\n             *     console.log( type, arg1, arg2 ); // => 'testa', 'arg1', 'arg2'\n             * });\n             * ```\n             *\n             * @method on\n             * @grammar on( name, callback[, context] ) => self\n             * @param  {String}   name     事件名，支持多个事件用空格隔开\n             * @param  {Function} callback 事件处理器\n             * @param  {Object}   [context]  事件处理器的上下文。\n             * @return {self} 返回自身，方便链式\n             * @chainable\n             * @class Mediator\n             */\n            on: function( name, callback, context ) {\n                var me = this,\n                    set;\n    \n                if ( !callback ) {\n                    return this;\n                }\n    \n                set = this._events || (this._events = []);\n    \n                eachEvent( name, callback, function( name, callback ) {\n                    var handler = { e: name };\n    \n                    handler.cb = callback;\n                    handler.ctx = context;\n                    handler.ctx2 = context || me;\n                    handler.id = set.length;\n    \n                    set.push( handler );\n                });\n    \n                return this;\n            },\n    \n            /**\n             * 绑定事件，且当handler执行完后，自动解除绑定。\n             * @method once\n             * @grammar once( name, callback[, context] ) => self\n             * @param  {String}   name     事件名\n             * @param  {Function} callback 事件处理器\n             * @param  {Object}   [context]  事件处理器的上下文。\n             * @return {self} 返回自身，方便链式\n             * @chainable\n             */\n            once: function( name, callback, context ) {\n                var me = this;\n    \n                if ( !callback ) {\n                    return me;\n                }\n    \n                eachEvent( name, callback, function( name, callback ) {\n                    var once = function() {\n                            me.off( name, once );\n                            return callback.apply( context || me, arguments );\n                        };\n    \n                    once._cb = callback;\n                    me.on( name, once, context );\n                });\n    \n                return me;\n            },\n    \n            /**\n             * 解除事件绑定\n             * @method off\n             * @grammar off( [name[, callback[, context] ] ] ) => self\n             * @param  {String}   [name]     事件名\n             * @param  {Function} [callback] 事件处理器\n             * @param  {Object}   [context]  事件处理器的上下文。\n             * @return {self} 返回自身，方便链式\n             * @chainable\n             */\n            off: function( name, cb, ctx ) {\n                var events = this._events;\n    \n                if ( !events ) {\n                    return this;\n                }\n    \n                if ( !name && !cb && !ctx ) {\n                    this._events = [];\n                    return this;\n                }\n    \n                eachEvent( name, cb, function( name, cb ) {\n                    $.each( findHandlers( events, name, cb, ctx ), function() {\n                        delete events[ this.id ];\n                    });\n                });\n    \n                return this;\n            },\n    \n            /**\n             * 触发事件\n             * @method trigger\n             * @grammar trigger( name[, args...] ) => self\n             * @param  {String}   type     事件名\n             * @param  {*} [...] 任意参数\n             * @return {Boolean} 如果handler中return false了，则返回false, 否则返回true\n             */\n            trigger: function( type ) {\n                var args, events, allEvents;\n    \n                if ( !this._events || !type ) {\n                    return this;\n                }\n    \n                args = slice.call( arguments, 1 );\n                events = findHandlers( this._events, type );\n                allEvents = findHandlers( this._events, 'all' );\n    \n                return triggerHanders( events, args ) &&\n                        triggerHanders( allEvents, arguments );\n            }\n        };\n    \n        /**\n         * 中介者，它本身是个单例，但可以通过[installTo](#WebUploader:Mediator:installTo)方法，使任何对象具备事件行为。\n         * 主要目的是负责模块与模块之间的合作，降低耦合度。\n         *\n         * @class Mediator\n         */\n        return $.extend({\n    \n            /**\n             * 可以通过这个接口，使任何对象具备事件功能。\n             * @method installTo\n             * @param  {Object} obj 需要具备事件行为的对象。\n             * @return {Object} 返回obj.\n             */\n            installTo: function( obj ) {\n                return $.extend( obj, protos );\n            }\n    \n        }, protos );\n    });\n    /**\n     * @fileOverview Uploader上传类\n     */\n    define('uploader',[\n        'base',\n        'mediator'\n    ], function( Base, Mediator ) {\n    \n        var $ = Base.$;\n    \n        /**\n         * 上传入口类。\n         * @class Uploader\n         * @constructor\n         * @grammar new Uploader( opts ) => Uploader\n         * @example\n         * var uploader = WebUploader.Uploader({\n         *     swf: 'path_of_swf/Uploader.swf',\n         *\n         *     // 开起分片上传。\n         *     chunked: true\n         * });\n         */\n        function Uploader( opts ) {\n            this.options = $.extend( true, {}, Uploader.options, opts );\n            this._init( this.options );\n        }\n    \n        // default Options\n        // widgets中有相应扩展\n        Uploader.options = {};\n        Mediator.installTo( Uploader.prototype );\n    \n        // 批量添加纯命令式方法。\n        $.each({\n            upload: 'start-upload',\n            stop: 'stop-upload',\n            getFile: 'get-file',\n            getFiles: 'get-files',\n            addFile: 'add-file',\n            addFiles: 'add-file',\n            sort: 'sort-files',\n            removeFile: 'remove-file',\n            cancelFile: 'cancel-file',\n            skipFile: 'skip-file',\n            retry: 'retry',\n            isInProgress: 'is-in-progress',\n            makeThumb: 'make-thumb',\n            md5File: 'md5-file',\n            getDimension: 'get-dimension',\n            addButton: 'add-btn',\n            predictRuntimeType: 'predict-runtime-type',\n            refresh: 'refresh',\n            disable: 'disable',\n            enable: 'enable',\n            reset: 'reset'\n        }, function( fn, command ) {\n            Uploader.prototype[ fn ] = function() {\n                return this.request( command, arguments );\n            };\n        });\n    \n        $.extend( Uploader.prototype, {\n            state: 'pending',\n    \n            _init: function( opts ) {\n                var me = this;\n    \n                me.request( 'init', opts, function() {\n                    me.state = 'ready';\n                    me.trigger('ready');\n                });\n            },\n    \n            /**\n             * 获取或者设置Uploader配置项。\n             * @method option\n             * @grammar option( key ) => *\n             * @grammar option( key, val ) => self\n             * @example\n             *\n             * // 初始状态图片上传前不会压缩\n             * var uploader = new WebUploader.Uploader({\n             *     compress: null;\n             * });\n             *\n             * // 修改后图片上传前，尝试将图片压缩到1600 * 1600\n             * uploader.option( 'compress', {\n             *     width: 1600,\n             *     height: 1600\n             * });\n             */\n            option: function( key, val ) {\n                var opts = this.options;\n    \n                // setter\n                if ( arguments.length > 1 ) {\n    \n                    if ( $.isPlainObject( val ) &&\n                            $.isPlainObject( opts[ key ] ) ) {\n                        $.extend( opts[ key ], val );\n                    } else {\n                        opts[ key ] = val;\n                    }\n    \n                } else {    // getter\n                    return key ? opts[ key ] : opts;\n                }\n            },\n    \n            /**\n             * 获取文件统计信息。返回一个包含一下信息的对象。\n             * * `successNum` 上传成功的文件数\n             * * `progressNum` 上传中的文件数\n             * * `cancelNum` 被删除的文件数\n             * * `invalidNum` 无效的文件数\n             * * `uploadFailNum` 上传失败的文件数\n             * * `queueNum` 还在队列中的文件数\n             * * `interruptNum` 被暂停的文件数\n             * @method getStats\n             * @grammar getStats() => Object\n             */\n            getStats: function() {\n                // return this._mgr.getStats.apply( this._mgr, arguments );\n                var stats = this.request('get-stats');\n    \n                return stats ? {\n                    successNum: stats.numOfSuccess,\n                    progressNum: stats.numOfProgress,\n    \n                    // who care?\n                    // queueFailNum: 0,\n                    cancelNum: stats.numOfCancel,\n                    invalidNum: stats.numOfInvalid,\n                    uploadFailNum: stats.numOfUploadFailed,\n                    queueNum: stats.numOfQueue,\n                    interruptNum: stats.numofInterrupt\n                } : {};\n            },\n    \n            // 需要重写此方法来来支持opts.onEvent和instance.onEvent的处理器\n            trigger: function( type/*, args...*/ ) {\n                var args = [].slice.call( arguments, 1 ),\n                    opts = this.options,\n                    name = 'on' + type.substring( 0, 1 ).toUpperCase() +\n                        type.substring( 1 );\n    \n                if (\n                        // 调用通过on方法注册的handler.\n                        Mediator.trigger.apply( this, arguments ) === false ||\n    \n                        // 调用opts.onEvent\n                        $.isFunction( opts[ name ] ) &&\n                        opts[ name ].apply( this, args ) === false ||\n    \n                        // 调用this.onEvent\n                        $.isFunction( this[ name ] ) &&\n                        this[ name ].apply( this, args ) === false ||\n    \n                        // 广播所有uploader的事件。\n                        Mediator.trigger.apply( Mediator,\n                        [ this, type ].concat( args ) ) === false ) {\n    \n                    return false;\n                }\n    \n                return true;\n            },\n    \n            /**\n             * 销毁 webuploader 实例\n             * @method destroy\n             * @grammar destroy() => undefined\n             */\n            destroy: function() {\n                this.request( 'destroy', arguments );\n                this.off();\n            },\n    \n            // widgets/widget.js将补充此方法的详细文档。\n            request: Base.noop\n        });\n    \n        /**\n         * 创建Uploader实例，等同于new Uploader( opts );\n         * @method create\n         * @class Base\n         * @static\n         * @grammar Base.create( opts ) => Uploader\n         */\n        Base.create = Uploader.create = function( opts ) {\n            return new Uploader( opts );\n        };\n    \n        // 暴露Uploader，可以通过它来扩展业务逻辑。\n        Base.Uploader = Uploader;\n    \n        return Uploader;\n    });\n    /**\n     * @fileOverview Runtime管理器，负责Runtime的选择, 连接\n     */\n    define('runtime/runtime',[\n        'base',\n        'mediator'\n    ], function( Base, Mediator ) {\n    \n        var $ = Base.$,\n            factories = {},\n    \n            // 获取对象的第一个key\n            getFirstKey = function( obj ) {\n                for ( var key in obj ) {\n                    if ( obj.hasOwnProperty( key ) ) {\n                        return key;\n                    }\n                }\n                return null;\n            };\n    \n        // 接口类。\n        function Runtime( options ) {\n            this.options = $.extend({\n                container: document.body\n            }, options );\n            this.uid = Base.guid('rt_');\n        }\n    \n        $.extend( Runtime.prototype, {\n    \n            getContainer: function() {\n                var opts = this.options,\n                    parent, container;\n    \n                if ( this._container ) {\n                    return this._container;\n                }\n    \n                parent = $( opts.container || document.body );\n                container = $( document.createElement('div') );\n    \n                container.attr( 'id', 'rt_' + this.uid );\n                container.css({\n                    position: 'absolute',\n                    top: '0px',\n                    left: '0px',\n                    width: '1px',\n                    height: '1px',\n                    overflow: 'hidden'\n                });\n    \n                parent.append( container );\n                parent.addClass('webuploader-container');\n                this._container = container;\n                this._parent = parent;\n                return container;\n            },\n    \n            init: Base.noop,\n            exec: Base.noop,\n    \n            destroy: function() {\n                this._container && this._container.remove();\n                this._parent && this._parent.removeClass('webuploader-container');\n                this.off();\n            }\n        });\n    \n        Runtime.orders = 'html5,flash';\n    \n    \n        /**\n         * 添加Runtime实现。\n         * @param {String} type    类型\n         * @param {Runtime} factory 具体Runtime实现。\n         */\n        Runtime.addRuntime = function( type, factory ) {\n            factories[ type ] = factory;\n        };\n    \n        Runtime.hasRuntime = function( type ) {\n            return !!(type ? factories[ type ] : getFirstKey( factories ));\n        };\n    \n        Runtime.create = function( opts, orders ) {\n            var type, runtime;\n    \n            orders = orders || Runtime.orders;\n            $.each( orders.split( /\\s*,\\s*/g ), function() {\n                if ( factories[ this ] ) {\n                    type = this;\n                    return false;\n                }\n            });\n    \n            type = type || getFirstKey( factories );\n    \n            if ( !type ) {\n                throw new Error('Runtime Error');\n            }\n    \n            runtime = new factories[ type ]( opts );\n            return runtime;\n        };\n    \n        Mediator.installTo( Runtime.prototype );\n        return Runtime;\n    });\n    \n    /**\n     * @fileOverview Runtime管理器，负责Runtime的选择, 连接\n     */\n    define('runtime/client',[\n        'base',\n        'mediator',\n        'runtime/runtime'\n    ], function( Base, Mediator, Runtime ) {\n    \n        var cache;\n    \n        cache = (function() {\n            var obj = {};\n    \n            return {\n                add: function( runtime ) {\n                    obj[ runtime.uid ] = runtime;\n                },\n    \n                get: function( ruid, standalone ) {\n                    var i;\n    \n                    if ( ruid ) {\n                        return obj[ ruid ];\n                    }\n    \n                    for ( i in obj ) {\n                        // 有些类型不能重用，比如filepicker.\n                        if ( standalone && obj[ i ].__standalone ) {\n                            continue;\n                        }\n    \n                        return obj[ i ];\n                    }\n    \n                    return null;\n                },\n    \n                remove: function( runtime ) {\n                    delete obj[ runtime.uid ];\n                }\n            };\n        })();\n    \n        function RuntimeClient( component, standalone ) {\n            var deferred = Base.Deferred(),\n                runtime;\n    \n            this.uid = Base.guid('client_');\n    \n            // 允许runtime没有初始化之前，注册一些方法在初始化后执行。\n            this.runtimeReady = function( cb ) {\n                return deferred.done( cb );\n            };\n    \n            this.connectRuntime = function( opts, cb ) {\n    \n                // already connected.\n                if ( runtime ) {\n                    throw new Error('already connected!');\n                }\n    \n                deferred.done( cb );\n    \n                if ( typeof opts === 'string' && cache.get( opts ) ) {\n                    runtime = cache.get( opts );\n                }\n    \n                // 像filePicker只能独立存在，不能公用。\n                runtime = runtime || cache.get( null, standalone );\n    \n                // 需要创建\n                if ( !runtime ) {\n                    runtime = Runtime.create( opts, opts.runtimeOrder );\n                    runtime.__promise = deferred.promise();\n                    runtime.once( 'ready', deferred.resolve );\n                    runtime.init();\n                    cache.add( runtime );\n                    runtime.__client = 1;\n                } else {\n                    // 来自cache\n                    Base.$.extend( runtime.options, opts );\n                    runtime.__promise.then( deferred.resolve );\n                    runtime.__client++;\n                }\n    \n                standalone && (runtime.__standalone = standalone);\n                return runtime;\n            };\n    \n            this.getRuntime = function() {\n                return runtime;\n            };\n    \n            this.disconnectRuntime = function() {\n                if ( !runtime ) {\n                    return;\n                }\n    \n                runtime.__client--;\n    \n                if ( runtime.__client <= 0 ) {\n                    cache.remove( runtime );\n                    delete runtime.__promise;\n                    runtime.destroy();\n                }\n    \n                runtime = null;\n            };\n    \n            this.exec = function() {\n                if ( !runtime ) {\n                    return;\n                }\n    \n                var args = Base.slice( arguments );\n                component && args.unshift( component );\n    \n                return runtime.exec.apply( this, args );\n            };\n    \n            this.getRuid = function() {\n                return runtime && runtime.uid;\n            };\n    \n            this.destroy = (function( destroy ) {\n                return function() {\n                    destroy && destroy.apply( this, arguments );\n                    this.trigger('destroy');\n                    this.off();\n                    this.exec('destroy');\n                    this.disconnectRuntime();\n                };\n            })( this.destroy );\n        }\n    \n        Mediator.installTo( RuntimeClient.prototype );\n        return RuntimeClient;\n    });\n    /**\n     * @fileOverview 错误信息\n     */\n    define('lib/dnd',[\n        'base',\n        'mediator',\n        'runtime/client'\n    ], function( Base, Mediator, RuntimeClent ) {\n    \n        var $ = Base.$;\n    \n        function DragAndDrop( opts ) {\n            opts = this.options = $.extend({}, DragAndDrop.options, opts );\n    \n            opts.container = $( opts.container );\n    \n            if ( !opts.container.length ) {\n                return;\n            }\n    \n            RuntimeClent.call( this, 'DragAndDrop' );\n        }\n    \n        DragAndDrop.options = {\n            accept: null,\n            disableGlobalDnd: false\n        };\n    \n        Base.inherits( RuntimeClent, {\n            constructor: DragAndDrop,\n    \n            init: function() {\n                var me = this;\n    \n                me.connectRuntime( me.options, function() {\n                    me.exec('init');\n                    me.trigger('ready');\n                });\n            }\n        });\n    \n        Mediator.installTo( DragAndDrop.prototype );\n    \n        return DragAndDrop;\n    });\n    /**\n     * @fileOverview 组件基类。\n     */\n    define('widgets/widget',[\n        'base',\n        'uploader'\n    ], function( Base, Uploader ) {\n    \n        var $ = Base.$,\n            _init = Uploader.prototype._init,\n            _destroy = Uploader.prototype.destroy,\n            IGNORE = {},\n            widgetClass = [];\n    \n        function isArrayLike( obj ) {\n            if ( !obj ) {\n                return false;\n            }\n    \n            var length = obj.length,\n                type = $.type( obj );\n    \n            if ( obj.nodeType === 1 && length ) {\n                return true;\n            }\n    \n            return type === 'array' || type !== 'function' && type !== 'string' &&\n                    (length === 0 || typeof length === 'number' && length > 0 &&\n                    (length - 1) in obj);\n        }\n    \n        function Widget( uploader ) {\n            this.owner = uploader;\n            this.options = uploader.options;\n        }\n    \n        $.extend( Widget.prototype, {\n    \n            init: Base.noop,\n    \n            // 类Backbone的事件监听声明，监听uploader实例上的事件\n            // widget直接无法监听事件，事件只能通过uploader来传递\n            invoke: function( apiName, args ) {\n    \n                /*\n                    {\n                        'make-thumb': 'makeThumb'\n                    }\n                 */\n                var map = this.responseMap;\n    \n                // 如果无API响应声明则忽略\n                if ( !map || !(apiName in map) || !(map[ apiName ] in this) ||\n                        !$.isFunction( this[ map[ apiName ] ] ) ) {\n    \n                    return IGNORE;\n                }\n    \n                return this[ map[ apiName ] ].apply( this, args );\n    \n            },\n    \n            /**\n             * 发送命令。当传入`callback`或者`handler`中返回`promise`时。返回一个当所有`handler`中的promise都完成后完成的新`promise`。\n             * @method request\n             * @grammar request( command, args ) => * | Promise\n             * @grammar request( command, args, callback ) => Promise\n             * @for  Uploader\n             */\n            request: function() {\n                return this.owner.request.apply( this.owner, arguments );\n            }\n        });\n    \n        // 扩展Uploader.\n        $.extend( Uploader.prototype, {\n    \n            /**\n             * @property {String | Array} [disableWidgets=undefined]\n             * @namespace options\n             * @for Uploader\n             * @description 默认所有 Uploader.register 了的 widget 都会被加载，如果禁用某一部分，请通过此 option 指定黑名单。\n             */\n    \n            // 覆写_init用来初始化widgets\n            _init: function() {\n                var me = this,\n                    widgets = me._widgets = [],\n                    deactives = me.options.disableWidgets || '';\n    \n                $.each( widgetClass, function( _, klass ) {\n                    (!deactives || !~deactives.indexOf( klass._name )) &&\n                        widgets.push( new klass( me ) );\n                });\n    \n                return _init.apply( me, arguments );\n            },\n    \n            request: function( apiName, args, callback ) {\n                var i = 0,\n                    widgets = this._widgets,\n                    len = widgets && widgets.length,\n                    rlts = [],\n                    dfds = [],\n                    widget, rlt, promise, key;\n    \n                args = isArrayLike( args ) ? args : [ args ];\n    \n                for ( ; i < len; i++ ) {\n                    widget = widgets[ i ];\n                    rlt = widget.invoke( apiName, args );\n    \n                    if ( rlt !== IGNORE ) {\n    \n                        // Deferred对象\n                        if ( Base.isPromise( rlt ) ) {\n                            dfds.push( rlt );\n                        } else {\n                            rlts.push( rlt );\n                        }\n                    }\n                }\n    \n                // 如果有callback，则用异步方式。\n                if ( callback || dfds.length ) {\n                    promise = Base.when.apply( Base, dfds );\n                    key = promise.pipe ? 'pipe' : 'then';\n    \n                    // 很重要不能删除。删除了会死循环。\n                    // 保证执行顺序。让callback总是在下一个 tick 中执行。\n                    return promise[ key ](function() {\n                                var deferred = Base.Deferred(),\n                                    args = arguments;\n    \n                                if ( args.length === 1 ) {\n                                    args = args[ 0 ];\n                                }\n    \n                                setTimeout(function() {\n                                    deferred.resolve( args );\n                                }, 1 );\n    \n                                return deferred.promise();\n                            })[ callback ? key : 'done' ]( callback || Base.noop );\n                } else {\n                    return rlts[ 0 ];\n                }\n            },\n    \n            destroy: function() {\n                _destroy.apply( this, arguments );\n                this._widgets = null;\n            }\n        });\n    \n        /**\n         * 添加组件\n         * @grammar Uploader.register(proto);\n         * @grammar Uploader.register(map, proto);\n         * @param  {object} responseMap API 名称与函数实现的映射\n         * @param  {object} proto 组件原型，构造函数通过 constructor 属性定义\n         * @method Uploader.register\n         * @for Uploader\n         * @example\n         * Uploader.register({\n         *     'make-thumb': 'makeThumb'\n         * }, {\n         *     init: function( options ) {},\n         *     makeThumb: function() {}\n         * });\n         *\n         * Uploader.register({\n         *     'make-thumb': function() {\n         *         \n         *     }\n         * });\n         */\n        Uploader.register = Widget.register = function( responseMap, widgetProto ) {\n            var map = { init: 'init', destroy: 'destroy', name: 'anonymous' },\n                klass;\n    \n            if ( arguments.length === 1 ) {\n                widgetProto = responseMap;\n    \n                // 自动生成 map 表。\n                $.each(widgetProto, function(key) {\n                    if ( key[0] === '_' || key === 'name' ) {\n                        key === 'name' && (map.name = widgetProto.name);\n                        return;\n                    }\n    \n                    map[key.replace(/[A-Z]/g, '-$&').toLowerCase()] = key;\n                });\n    \n            } else {\n                map = $.extend( map, responseMap );\n            }\n    \n            widgetProto.responseMap = map;\n            klass = Base.inherits( Widget, widgetProto );\n            klass._name = map.name;\n            widgetClass.push( klass );\n    \n            return klass;\n        };\n    \n        /**\n         * 删除插件，只有在注册时指定了名字的才能被删除。\n         * @grammar Uploader.unRegister(name);\n         * @param  {string} name 组件名字\n         * @method Uploader.unRegister\n         * @for Uploader\n         * @example\n         *\n         * Uploader.register({\n         *     name: 'custom',\n         *     \n         *     'make-thumb': function() {\n         *         \n         *     }\n         * });\n         *\n         * Uploader.unRegister('custom');\n         */\n        Uploader.unRegister = Widget.unRegister = function( name ) {\n            if ( !name || name === 'anonymous' ) {\n                return;\n            }\n            \n            // 删除指定的插件。\n            for ( var i = widgetClass.length; i--; ) {\n                if ( widgetClass[i]._name === name ) {\n                    widgetClass.splice(i, 1)\n                }\n            }\n        };\n    \n        return Widget;\n    });\n    /**\n     * @fileOverview DragAndDrop Widget。\n     */\n    define('widgets/filednd',[\n        'base',\n        'uploader',\n        'lib/dnd',\n        'widgets/widget'\n    ], function( Base, Uploader, Dnd ) {\n        var $ = Base.$;\n    \n        Uploader.options.dnd = '';\n    \n        /**\n         * @property {Selector} [dnd=undefined]  指定Drag And Drop拖拽的容器，如果不指定，则不启动。\n         * @namespace options\n         * @for Uploader\n         */\n        \n        /**\n         * @property {Selector} [disableGlobalDnd=false]  是否禁掉整个页面的拖拽功能，如果不禁用，图片拖进来的时候会默认被浏览器打开。\n         * @namespace options\n         * @for Uploader\n         */\n    \n        /**\n         * @event dndAccept\n         * @param {DataTransferItemList} items DataTransferItem\n         * @description 阻止此事件可以拒绝某些类型的文件拖入进来。目前只有 chrome 提供这样的 API，且只能通过 mime-type 验证。\n         * @for  Uploader\n         */\n        return Uploader.register({\n            name: 'dnd',\n            \n            init: function( opts ) {\n    \n                if ( !opts.dnd ||\n                        this.request('predict-runtime-type') !== 'html5' ) {\n                    return;\n                }\n    \n                var me = this,\n                    deferred = Base.Deferred(),\n                    options = $.extend({}, {\n                        disableGlobalDnd: opts.disableGlobalDnd,\n                        container: opts.dnd,\n                        accept: opts.accept\n                    }),\n                    dnd;\n    \n                this.dnd = dnd = new Dnd( options );\n    \n                dnd.once( 'ready', deferred.resolve );\n                dnd.on( 'drop', function( files ) {\n                    me.request( 'add-file', [ files ]);\n                });\n    \n                // 检测文件是否全部允许添加。\n                dnd.on( 'accept', function( items ) {\n                    return me.owner.trigger( 'dndAccept', items );\n                });\n    \n                dnd.init();\n    \n                return deferred.promise();\n            },\n    \n            destroy: function() {\n                this.dnd && this.dnd.destroy();\n            }\n        });\n    });\n    \n    /**\n     * @fileOverview 错误信息\n     */\n    define('lib/filepaste',[\n        'base',\n        'mediator',\n        'runtime/client'\n    ], function( Base, Mediator, RuntimeClent ) {\n    \n        var $ = Base.$;\n    \n        function FilePaste( opts ) {\n            opts = this.options = $.extend({}, opts );\n            opts.container = $( opts.container || document.body );\n            RuntimeClent.call( this, 'FilePaste' );\n        }\n    \n        Base.inherits( RuntimeClent, {\n            constructor: FilePaste,\n    \n            init: function() {\n                var me = this;\n    \n                me.connectRuntime( me.options, function() {\n                    me.exec('init');\n                    me.trigger('ready');\n                });\n            }\n        });\n    \n        Mediator.installTo( FilePaste.prototype );\n    \n        return FilePaste;\n    });\n    /**\n     * @fileOverview 组件基类。\n     */\n    define('widgets/filepaste',[\n        'base',\n        'uploader',\n        'lib/filepaste',\n        'widgets/widget'\n    ], function( Base, Uploader, FilePaste ) {\n        var $ = Base.$;\n    \n        /**\n         * @property {Selector} [paste=undefined]  指定监听paste事件的容器，如果不指定，不启用此功能。此功能为通过粘贴来添加截屏的图片。建议设置为`document.body`.\n         * @namespace options\n         * @for Uploader\n         */\n        return Uploader.register({\n            name: 'paste',\n            \n            init: function( opts ) {\n    \n                if ( !opts.paste ||\n                        this.request('predict-runtime-type') !== 'html5' ) {\n                    return;\n                }\n    \n                var me = this,\n                    deferred = Base.Deferred(),\n                    options = $.extend({}, {\n                        container: opts.paste,\n                        accept: opts.accept\n                    }),\n                    paste;\n    \n                this.paste = paste = new FilePaste( options );\n    \n                paste.once( 'ready', deferred.resolve );\n                paste.on( 'paste', function( files ) {\n                    me.owner.request( 'add-file', [ files ]);\n                });\n                paste.init();\n    \n                return deferred.promise();\n            },\n    \n            destroy: function() {\n                this.paste && this.paste.destroy();\n            }\n        });\n    });\n    /**\n     * @fileOverview Blob\n     */\n    define('lib/blob',[\n        'base',\n        'runtime/client'\n    ], function( Base, RuntimeClient ) {\n    \n        function Blob( ruid, source ) {\n            var me = this;\n    \n            me.source = source;\n            me.ruid = ruid;\n            this.size = source.size || 0;\n    \n            // 如果没有指定 mimetype, 但是知道文件后缀。\n            if ( !source.type && this.ext &&\n                    ~'jpg,jpeg,png,gif,bmp'.indexOf( this.ext ) ) {\n                this.type = 'image/' + (this.ext === 'jpg' ? 'jpeg' : this.ext);\n            } else {\n                this.type = source.type || 'application/octet-stream';\n            }\n    \n            RuntimeClient.call( me, 'Blob' );\n            this.uid = source.uid || this.uid;\n    \n            if ( ruid ) {\n                me.connectRuntime( ruid );\n            }\n        }\n    \n        Base.inherits( RuntimeClient, {\n            constructor: Blob,\n    \n            slice: function( start, end ) {\n                return this.exec( 'slice', start, end );\n            },\n    \n            getSource: function() {\n                return this.source;\n            }\n        });\n    \n        return Blob;\n    });\n    /**\n     * 为了统一化Flash的File和HTML5的File而存在。\n     * 以至于要调用Flash里面的File，也可以像调用HTML5版本的File一下。\n     * @fileOverview File\n     */\n    define('lib/file',[\n        'base',\n        'lib/blob'\n    ], function( Base, Blob ) {\n    \n        var uid = 1,\n            rExt = /\\.([^.]+)$/;\n    \n        function File( ruid, file ) {\n            var ext;\n    \n            this.name = file.name || ('untitled' + uid++);\n            ext = rExt.exec( file.name ) ? RegExp.$1.toLowerCase() : '';\n    \n            // todo 支持其他类型文件的转换。\n            // 如果有 mimetype, 但是文件名里面没有找出后缀规律\n            if ( !ext && file.type ) {\n                ext = /\\/(jpg|jpeg|png|gif|bmp)$/i.exec( file.type ) ?\n                        RegExp.$1.toLowerCase() : '';\n                this.name += '.' + ext;\n            }\n    \n            this.ext = ext;\n            this.lastModifiedDate = file.lastModifiedDate ||\n                    (new Date()).toLocaleString();\n    \n            Blob.apply( this, arguments );\n        }\n    \n        return Base.inherits( Blob, File );\n    });\n    \n    /**\n     * @fileOverview 错误信息\n     */\n    define('lib/filepicker',[\n        'base',\n        'runtime/client',\n        'lib/file'\n    ], function( Base, RuntimeClient, File ) {\n    \n        var $ = Base.$;\n    \n        function FilePicker( opts ) {\n            opts = this.options = $.extend({}, FilePicker.options, opts );\n    \n            opts.container = $( opts.id );\n    \n            if ( !opts.container.length ) {\n                throw new Error('按钮指定错误');\n            }\n    \n            opts.innerHTML = opts.innerHTML || opts.label ||\n                    opts.container.html() || '';\n    \n            opts.button = $( opts.button || document.createElement('div') );\n            opts.button.html( opts.innerHTML );\n            opts.container.html( opts.button );\n    \n            RuntimeClient.call( this, 'FilePicker', true );\n        }\n    \n        FilePicker.options = {\n            button: null,\n            container: null,\n            label: null,\n            innerHTML: null,\n            multiple: true,\n            accept: null,\n            name: 'file',\n            style: 'webuploader-pick'   //pick element class attribute, default is \"webuploader-pick\"\n        };\n    \n        Base.inherits( RuntimeClient, {\n            constructor: FilePicker,\n    \n            init: function() {\n                var me = this,\n                    opts = me.options,\n                    button = opts.button,\n                    style = opts.style;\n    \n                if (style)\n                    button.addClass('webuploader-pick');\n    \n                me.on( 'all', function( type ) {\n                    var files;\n    \n                    switch ( type ) {\n                        case 'mouseenter':\n                            if (style)\n                                button.addClass('webuploader-pick-hover');\n                            break;\n    \n                        case 'mouseleave':\n                            if (style)\n                                button.removeClass('webuploader-pick-hover');\n                            break;\n    \n                        case 'change':\n                            files = me.exec('getFiles');\n                            me.trigger( 'select', $.map( files, function( file ) {\n                                file = new File( me.getRuid(), file );\n    \n                                // 记录来源。\n                                file._refer = opts.container;\n                                return file;\n                            }), opts.container );\n                            break;\n                    }\n                });\n    \n                me.connectRuntime( opts, function() {\n                    me.refresh();\n                    me.exec( 'init', opts );\n                    me.trigger('ready');\n                });\n    \n                this._resizeHandler = Base.bindFn( this.refresh, this );\n                $( window ).on( 'resize', this._resizeHandler );\n            },\n    \n            refresh: function() {\n                var shimContainer = this.getRuntime().getContainer(),\n                    button = this.options.button,\n                    width = button.outerWidth ?\n                            button.outerWidth() : button.width(),\n    \n                    height = button.outerHeight ?\n                            button.outerHeight() : button.height(),\n    \n                    pos = button.offset();\n    \n                width && height && shimContainer.css({\n                    bottom: 'auto',\n                    right: 'auto',\n                    width: width + 'px',\n                    height: height + 'px'\n                }).offset( pos );\n            },\n    \n            enable: function() {\n                var btn = this.options.button;\n    \n                btn.removeClass('webuploader-pick-disable');\n                this.refresh();\n            },\n    \n            disable: function() {\n                var btn = this.options.button;\n    \n                this.getRuntime().getContainer().css({\n                    top: '-99999px'\n                });\n    \n                btn.addClass('webuploader-pick-disable');\n            },\n    \n            destroy: function() {\n                var btn = this.options.button;\n                $( window ).off( 'resize', this._resizeHandler );\n                btn.removeClass('webuploader-pick-disable webuploader-pick-hover ' +\n                    'webuploader-pick');\n            }\n        });\n    \n        return FilePicker;\n    });\n    \n    /**\n     * @fileOverview 文件选择相关\n     */\n    define('widgets/filepicker',[\n        'base',\n        'uploader',\n        'lib/filepicker',\n        'widgets/widget'\n    ], function( Base, Uploader, FilePicker ) {\n        var $ = Base.$;\n    \n        $.extend( Uploader.options, {\n    \n            /**\n             * @property {Selector | Object} [pick=undefined]\n             * @namespace options\n             * @for Uploader\n             * @description 指定选择文件的按钮容器，不指定则不创建按钮。\n             *\n             * * `id` {Seletor|dom} 指定选择文件的按钮容器，不指定则不创建按钮。**注意** 这里虽然写的是 id, 但是不是只支持 id, 还支持 class, 或者 dom 节点。\n             * * `label` {String} 请采用 `innerHTML` 代替\n             * * `innerHTML` {String} 指定按钮文字。不指定时优先从指定的容器中看是否自带文字。\n             * * `multiple` {Boolean} 是否开起同时选择多个文件能力。\n             */\n            pick: null,\n    \n            /**\n             * @property {Arroy} [accept=null]\n             * @namespace options\n             * @for Uploader\n             * @description 指定接受哪些类型的文件。 由于目前还有ext转mimeType表，所以这里需要分开指定。\n             *\n             * * `title` {String} 文字描述\n             * * `extensions` {String} 允许的文件后缀，不带点，多个用逗号分割。\n             * * `mimeTypes` {String} 多个用逗号分割。\n             *\n             * 如：\n             *\n             * ```\n             * {\n             *     title: 'Images',\n             *     extensions: 'gif,jpg,jpeg,bmp,png',\n             *     mimeTypes: 'image/*'\n             * }\n             * ```\n             */\n            accept: null/*{\n                title: 'Images',\n                extensions: 'gif,jpg,jpeg,bmp,png',\n                mimeTypes: 'image/*'\n            }*/\n        });\n    \n        return Uploader.register({\n            name: 'picker',\n    \n            init: function( opts ) {\n                this.pickers = [];\n                return opts.pick && this.addBtn( opts.pick );\n            },\n    \n            refresh: function() {\n                $.each( this.pickers, function() {\n                    this.refresh();\n                });\n            },\n    \n            /**\n             * @method addBtn\n             * @for Uploader\n             * @grammar addBtn( pick ) => Promise\n             * @description\n             * 添加文件选择按钮，如果一个按钮不够，需要调用此方法来添加。参数跟[options.pick](#WebUploader:Uploader:options)一致。\n             * @example\n             * uploader.addBtn({\n             *     id: '#btnContainer',\n             *     innerHTML: '选择文件'\n             * });\n             */\n            addBtn: function( pick ) {\n                var me = this,\n                    opts = me.options,\n                    accept = opts.accept,\n                    promises = [];\n    \n                if ( !pick ) {\n                    return;\n                }\n    \n                $.isPlainObject( pick ) || (pick = {\n                    id: pick\n                });\n    \n                $( pick.id ).each(function() {\n                    var options, picker, deferred;\n    \n                    deferred = Base.Deferred();\n    \n                    options = $.extend({}, pick, {\n                        accept: $.isPlainObject( accept ) ? [ accept ] : accept,\n                        swf: opts.swf,\n                        runtimeOrder: opts.runtimeOrder,\n                        id: this\n                    });\n    \n                    picker = new FilePicker( options );\n    \n                    picker.once( 'ready', deferred.resolve );\n                    picker.on( 'select', function( files ) {\n                        me.owner.request( 'add-file', [ files ]);\n                    });\n                    picker.on('dialogopen', function() {\n                        me.owner.trigger('dialogOpen', picker.button);\n                    });\n                    picker.init();\n    \n                    me.pickers.push( picker );\n    \n                    promises.push( deferred.promise() );\n                });\n    \n                return Base.when.apply( Base, promises );\n            },\n    \n            disable: function() {\n                $.each( this.pickers, function() {\n                    this.disable();\n                });\n            },\n    \n            enable: function() {\n                $.each( this.pickers, function() {\n                    this.enable();\n                });\n            },\n    \n            destroy: function() {\n                $.each( this.pickers, function() {\n                    this.destroy();\n                });\n                this.pickers = null;\n            }\n        });\n    });\n    /**\n     * @fileOverview 文件属性封装\n     */\n    define('file',[\n        'base',\n        'mediator'\n    ], function( Base, Mediator ) {\n    \n        var $ = Base.$,\n            idPrefix = 'WU_FILE_',\n            idSuffix = 0,\n            rExt = /\\.([^.]+)$/,\n            statusMap = {};\n    \n        function gid() {\n            return idPrefix + idSuffix++;\n        }\n    \n        /**\n         * 文件类\n         * @class File\n         * @constructor 构造函数\n         * @grammar new File( source ) => File\n         * @param {Lib.File} source [lib.File](#Lib.File)实例, 此source对象是带有Runtime信息的。\n         */\n        function WUFile( source ) {\n    \n            /**\n             * 文件名，包括扩展名（后缀）\n             * @property name\n             * @type {string}\n             */\n            this.name = source.name || 'Untitled';\n    \n            /**\n             * 文件体积（字节）\n             * @property size\n             * @type {uint}\n             * @default 0\n             */\n            this.size = source.size || 0;\n    \n            /**\n             * 文件MIMETYPE类型，与文件类型的对应关系请参考[http://t.cn/z8ZnFny](http://t.cn/z8ZnFny)\n             * @property type\n             * @type {string}\n             * @default 'application/octet-stream'\n             */\n            this.type = source.type || 'application/octet-stream';\n    \n            /**\n             * 文件最后修改日期\n             * @property lastModifiedDate\n             * @type {int}\n             * @default 当前时间戳\n             */\n            this.lastModifiedDate = source.lastModifiedDate || (new Date() * 1);\n    \n            /**\n             * 文件ID，每个对象具有唯一ID，与文件名无关\n             * @property id\n             * @type {string}\n             */\n            this.id = gid();\n    \n            /**\n             * 文件扩展名，通过文件名获取，例如test.png的扩展名为png\n             * @property ext\n             * @type {string}\n             */\n            this.ext = rExt.exec( this.name ) ? RegExp.$1 : '';\n    \n    \n            /**\n             * 状态文字说明。在不同的status语境下有不同的用途。\n             * @property statusText\n             * @type {string}\n             */\n            this.statusText = '';\n    \n            // 存储文件状态，防止通过属性直接修改\n            statusMap[ this.id ] = WUFile.Status.INITED;\n    \n            this.source = source;\n            this.loaded = 0;\n    \n            this.on( 'error', function( msg ) {\n                this.setStatus( WUFile.Status.ERROR, msg );\n            });\n        }\n    \n        $.extend( WUFile.prototype, {\n    \n            /**\n             * 设置状态，状态变化时会触发`change`事件。\n             * @method setStatus\n             * @grammar setStatus( status[, statusText] );\n             * @param {File.Status|String} status [文件状态值](#WebUploader:File:File.Status)\n             * @param {String} [statusText=''] 状态说明，常在error时使用，用http, abort,server等来标记是由于什么原因导致文件错误。\n             */\n            setStatus: function( status, text ) {\n    \n                var prevStatus = statusMap[ this.id ];\n    \n                typeof text !== 'undefined' && (this.statusText = text);\n    \n                if ( status !== prevStatus ) {\n                    statusMap[ this.id ] = status;\n                    /**\n                     * 文件状态变化\n                     * @event statuschange\n                     */\n                    this.trigger( 'statuschange', status, prevStatus );\n                }\n    \n            },\n    \n            /**\n             * 获取文件状态\n             * @return {File.Status}\n             * @example\n                     文件状态具体包括以下几种类型：\n                     {\n                         // 初始化\n                        INITED:     0,\n                        // 已入队列\n                        QUEUED:     1,\n                        // 正在上传\n                        PROGRESS:     2,\n                        // 上传出错\n                        ERROR:         3,\n                        // 上传成功\n                        COMPLETE:     4,\n                        // 上传取消\n                        CANCELLED:     5\n                    }\n             */\n            getStatus: function() {\n                return statusMap[ this.id ];\n            },\n    \n            /**\n             * 获取文件原始信息。\n             * @return {*}\n             */\n            getSource: function() {\n                return this.source;\n            },\n    \n            destroy: function() {\n                this.off();\n                delete statusMap[ this.id ];\n            }\n        });\n    \n        Mediator.installTo( WUFile.prototype );\n    \n        /**\n         * 文件状态值，具体包括以下几种类型：\n         * * `inited` 初始状态\n         * * `queued` 已经进入队列, 等待上传\n         * * `progress` 上传中\n         * * `complete` 上传完成。\n         * * `error` 上传出错，可重试\n         * * `interrupt` 上传中断，可续传。\n         * * `invalid` 文件不合格，不能重试上传。会自动从队列中移除。\n         * * `cancelled` 文件被移除。\n         * @property {Object} Status\n         * @namespace File\n         * @class File\n         * @static\n         */\n        WUFile.Status = {\n            INITED:     'inited',    // 初始状态\n            QUEUED:     'queued',    // 已经进入队列, 等待上传\n            PROGRESS:   'progress',    // 上传中\n            ERROR:      'error',    // 上传出错，可重试\n            COMPLETE:   'complete',    // 上传完成。\n            CANCELLED:  'cancelled',    // 上传取消。\n            INTERRUPT:  'interrupt',    // 上传中断，可续传。\n            INVALID:    'invalid'    // 文件不合格，不能重试上传。\n        };\n    \n        return WUFile;\n    });\n    \n    /**\n     * @fileOverview 文件队列\n     */\n    define('queue',[\n        'base',\n        'mediator',\n        'file'\n    ], function( Base, Mediator, WUFile ) {\n    \n        var $ = Base.$,\n            STATUS = WUFile.Status;\n    \n        /**\n         * 文件队列, 用来存储各个状态中的文件。\n         * @class Queue\n         * @extends Mediator\n         */\n        function Queue() {\n    \n            /**\n             * 统计文件数。\n             * * `numOfQueue` 队列中的文件数。\n             * * `numOfSuccess` 上传成功的文件数\n             * * `numOfCancel` 被取消的文件数\n             * * `numOfProgress` 正在上传中的文件数\n             * * `numOfUploadFailed` 上传错误的文件数。\n             * * `numOfInvalid` 无效的文件数。\n             * * `numofDeleted` 被移除的文件数。\n             * @property {Object} stats\n             */\n            this.stats = {\n                numOfQueue: 0,\n                numOfSuccess: 0,\n                numOfCancel: 0,\n                numOfProgress: 0,\n                numOfUploadFailed: 0,\n                numOfInvalid: 0,\n                numofDeleted: 0,\n                numofInterrupt: 0\n            };\n    \n            // 上传队列，仅包括等待上传的文件\n            this._queue = [];\n    \n            // 存储所有文件\n            this._map = {};\n        }\n    \n        $.extend( Queue.prototype, {\n    \n            /**\n             * 将新文件加入对队列尾部\n             *\n             * @method append\n             * @param  {File} file   文件对象\n             */\n            append: function( file ) {\n                this._queue.push( file );\n                this._fileAdded( file );\n                return this;\n            },\n    \n            /**\n             * 将新文件加入对队列头部\n             *\n             * @method prepend\n             * @param  {File} file   文件对象\n             */\n            prepend: function( file ) {\n                this._queue.unshift( file );\n                this._fileAdded( file );\n                return this;\n            },\n    \n            /**\n             * 获取文件对象\n             *\n             * @method getFile\n             * @param  {String} fileId   文件ID\n             * @return {File}\n             */\n            getFile: function( fileId ) {\n                if ( typeof fileId !== 'string' ) {\n                    return fileId;\n                }\n                return this._map[ fileId ];\n            },\n    \n            /**\n             * 从队列中取出一个指定状态的文件。\n             * @grammar fetch( status ) => File\n             * @method fetch\n             * @param {String} status [文件状态值](#WebUploader:File:File.Status)\n             * @return {File} [File](#WebUploader:File)\n             */\n            fetch: function( status ) {\n                var len = this._queue.length,\n                    i, file;\n    \n                status = status || STATUS.QUEUED;\n    \n                for ( i = 0; i < len; i++ ) {\n                    file = this._queue[ i ];\n    \n                    if ( status === file.getStatus() ) {\n                        return file;\n                    }\n                }\n    \n                return null;\n            },\n    \n            /**\n             * 对队列进行排序，能够控制文件上传顺序。\n             * @grammar sort( fn ) => undefined\n             * @method sort\n             * @param {Function} fn 排序方法\n             */\n            sort: function( fn ) {\n                if ( typeof fn === 'function' ) {\n                    this._queue.sort( fn );\n                }\n            },\n    \n            /**\n             * 获取指定类型的文件列表, 列表中每一个成员为[File](#WebUploader:File)对象。\n             * @grammar getFiles( [status1[, status2 ...]] ) => Array\n             * @method getFiles\n             * @param {String} [status] [文件状态值](#WebUploader:File:File.Status)\n             */\n            getFiles: function() {\n                var sts = [].slice.call( arguments, 0 ),\n                    ret = [],\n                    i = 0,\n                    len = this._queue.length,\n                    file;\n    \n                for ( ; i < len; i++ ) {\n                    file = this._queue[ i ];\n    \n                    if ( sts.length && !~$.inArray( file.getStatus(), sts ) ) {\n                        continue;\n                    }\n    \n                    ret.push( file );\n                }\n    \n                return ret;\n            },\n    \n            /**\n             * 在队列中删除文件。\n             * @grammar removeFile( file ) => Array\n             * @method removeFile\n             * @param {File} 文件对象。\n             */\n            removeFile: function( file ) {\n                var me = this,\n                    existing = this._map[ file.id ];\n    \n                if ( existing ) {\n                    delete this._map[ file.id ];\n                    file.destroy();\n                    this.stats.numofDeleted++;\n                }\n            },\n    \n            _fileAdded: function( file ) {\n                var me = this,\n                    existing = this._map[ file.id ];\n    \n                if ( !existing ) {\n                    this._map[ file.id ] = file;\n    \n                    file.on( 'statuschange', function( cur, pre ) {\n                        me._onFileStatusChange( cur, pre );\n                    });\n                }\n            },\n    \n            _onFileStatusChange: function( curStatus, preStatus ) {\n                var stats = this.stats;\n    \n                switch ( preStatus ) {\n                    case STATUS.PROGRESS:\n                        stats.numOfProgress--;\n                        break;\n    \n                    case STATUS.QUEUED:\n                        stats.numOfQueue --;\n                        break;\n    \n                    case STATUS.ERROR:\n                        stats.numOfUploadFailed--;\n                        break;\n    \n                    case STATUS.INVALID:\n                        stats.numOfInvalid--;\n                        break;\n    \n                    case STATUS.INTERRUPT:\n                        stats.numofInterrupt--;\n                        break;\n                }\n    \n                switch ( curStatus ) {\n                    case STATUS.QUEUED:\n                        stats.numOfQueue++;\n                        break;\n    \n                    case STATUS.PROGRESS:\n                        stats.numOfProgress++;\n                        break;\n    \n                    case STATUS.ERROR:\n                        stats.numOfUploadFailed++;\n                        break;\n    \n                    case STATUS.COMPLETE:\n                        stats.numOfSuccess++;\n                        break;\n    \n                    case STATUS.CANCELLED:\n                        stats.numOfCancel++;\n                        break;\n    \n    \n                    case STATUS.INVALID:\n                        stats.numOfInvalid++;\n                        break;\n    \n                    case STATUS.INTERRUPT:\n                        stats.numofInterrupt++;\n                        break;\n                }\n            }\n    \n        });\n    \n        Mediator.installTo( Queue.prototype );\n    \n        return Queue;\n    });\n    /**\n     * @fileOverview 队列\n     */\n    define('widgets/queue',[\n        'base',\n        'uploader',\n        'queue',\n        'file',\n        'lib/file',\n        'runtime/client',\n        'widgets/widget'\n    ], function( Base, Uploader, Queue, WUFile, File, RuntimeClient ) {\n    \n        var $ = Base.$,\n            rExt = /\\.\\w+$/,\n            Status = WUFile.Status;\n    \n        return Uploader.register({\n            name: 'queue',\n    \n            init: function( opts ) {\n                var me = this,\n                    deferred, len, i, item, arr, accept, runtime;\n    \n                if ( $.isPlainObject( opts.accept ) ) {\n                    opts.accept = [ opts.accept ];\n                }\n    \n                // accept中的中生成匹配正则。\n                if ( opts.accept ) {\n                    arr = [];\n    \n                    for ( i = 0, len = opts.accept.length; i < len; i++ ) {\n                        item = opts.accept[ i ].extensions;\n                        item && arr.push( item );\n                    }\n    \n                    if ( arr.length ) {\n                        accept = '\\\\.' + arr.join(',')\n                                .replace( /,/g, '$|\\\\.' )\n                                .replace( /\\*/g, '.*' ) + '$';\n                    }\n    \n                    me.accept = new RegExp( accept, 'i' );\n                }\n    \n                me.queue = new Queue();\n                me.stats = me.queue.stats;\n    \n                // 如果当前不是html5运行时，那就算了。\n                // 不执行后续操作\n                if ( this.request('predict-runtime-type') !== 'html5' ) {\n                    return;\n                }\n    \n                // 创建一个 html5 运行时的 placeholder\n                // 以至于外部添加原生 File 对象的时候能正确包裹一下供 webuploader 使用。\n                deferred = Base.Deferred();\n                this.placeholder = runtime = new RuntimeClient('Placeholder');\n                runtime.connectRuntime({\n                    runtimeOrder: 'html5'\n                }, function() {\n                    me._ruid = runtime.getRuid();\n                    deferred.resolve();\n                });\n                return deferred.promise();\n            },\n    \n    \n            // 为了支持外部直接添加一个原生File对象。\n            _wrapFile: function( file ) {\n                if ( !(file instanceof WUFile) ) {\n    \n                    if ( !(file instanceof File) ) {\n                        if ( !this._ruid ) {\n                            throw new Error('Can\\'t add external files.');\n                        }\n                        file = new File( this._ruid, file );\n                    }\n    \n                    file = new WUFile( file );\n                }\n    \n                return file;\n            },\n    \n            // 判断文件是否可以被加入队列\n            acceptFile: function( file ) {\n                var invalid = !file || !file.size || this.accept &&\n    \n                        // 如果名字中有后缀，才做后缀白名单处理。\n                        rExt.exec( file.name ) && !this.accept.test( file.name );\n    \n                return !invalid;\n            },\n    \n    \n            /**\n             * @event beforeFileQueued\n             * @param {File} file File对象\n             * @description 当文件被加入队列之前触发，此事件的handler返回值为`false`，则此文件不会被添加进入队列。\n             * @for  Uploader\n             */\n    \n            /**\n             * @event fileQueued\n             * @param {File} file File对象\n             * @description 当文件被加入队列以后触发。\n             * @for  Uploader\n             */\n    \n            _addFile: function( file ) {\n                var me = this;\n    \n                file = me._wrapFile( file );\n    \n                // 不过类型判断允许不允许，先派送 `beforeFileQueued`\n                if ( !me.owner.trigger( 'beforeFileQueued', file ) ) {\n                    return;\n                }\n    \n                // 类型不匹配，则派送错误事件，并返回。\n                if ( !me.acceptFile( file ) ) {\n                    me.owner.trigger( 'error', 'Q_TYPE_DENIED', file );\n                    return;\n                }\n    \n                me.queue.append( file );\n                me.owner.trigger( 'fileQueued', file );\n                return file;\n            },\n    \n            getFile: function( fileId ) {\n                return this.queue.getFile( fileId );\n            },\n    \n            /**\n             * @event filesQueued\n             * @param {File} files 数组，内容为原始File(lib/File）对象。\n             * @description 当一批文件添加进队列以后触发。\n             * @for  Uploader\n             */\n            \n            /**\n             * @property {Boolean} [auto=false]\n             * @namespace options\n             * @for Uploader\n             * @description 设置为 true 后，不需要手动调用上传，有文件选择即开始上传。\n             * \n             */\n    \n            /**\n             * @method addFiles\n             * @grammar addFiles( file ) => undefined\n             * @grammar addFiles( [file1, file2 ...] ) => undefined\n             * @param {Array of File or File} [files] Files 对象 数组\n             * @description 添加文件到队列\n             * @for  Uploader\n             */\n            addFile: function( files ) {\n                var me = this;\n    \n                if ( !files.length ) {\n                    files = [ files ];\n                }\n    \n                files = $.map( files, function( file ) {\n                    return me._addFile( file );\n                });\n    \t\t\t\n    \t\t\tif ( files.length ) {\n    \n                    me.owner.trigger( 'filesQueued', files );\n    \n    \t\t\t\tif ( me.options.auto ) {\n    \t\t\t\t\tsetTimeout(function() {\n    \t\t\t\t\t\tme.request('start-upload');\n    \t\t\t\t\t}, 20 );\n    \t\t\t\t}\n                }\n            },\n    \n            getStats: function() {\n                return this.stats;\n            },\n    \n            /**\n             * @event fileDequeued\n             * @param {File} file File对象\n             * @description 当文件被移除队列后触发。\n             * @for  Uploader\n             */\n    \n             /**\n             * @method removeFile\n             * @grammar removeFile( file ) => undefined\n             * @grammar removeFile( id ) => undefined\n             * @grammar removeFile( file, true ) => undefined\n             * @grammar removeFile( id, true ) => undefined\n             * @param {File|id} file File对象或这File对象的id\n             * @description 移除某一文件, 默认只会标记文件状态为已取消，如果第二个参数为 `true` 则会从 queue 中移除。\n             * @for  Uploader\n             * @example\n             *\n             * $li.on('click', '.remove-this', function() {\n             *     uploader.removeFile( file );\n             * })\n             */\n            removeFile: function( file, remove ) {\n                var me = this;\n    \n                file = file.id ? file : me.queue.getFile( file );\n    \n                this.request( 'cancel-file', file );\n    \n                if ( remove ) {\n                    this.queue.removeFile( file );\n                }\n            },\n    \n            /**\n             * @method getFiles\n             * @grammar getFiles() => Array\n             * @grammar getFiles( status1, status2, status... ) => Array\n             * @description 返回指定状态的文件集合，不传参数将返回所有状态的文件。\n             * @for  Uploader\n             * @example\n             * console.log( uploader.getFiles() );    // => all files\n             * console.log( uploader.getFiles('error') )    // => all error files.\n             */\n            getFiles: function() {\n                return this.queue.getFiles.apply( this.queue, arguments );\n            },\n    \n            fetchFile: function() {\n                return this.queue.fetch.apply( this.queue, arguments );\n            },\n    \n            /**\n             * @method retry\n             * @grammar retry() => undefined\n             * @grammar retry( file ) => undefined\n             * @description 重试上传，重试指定文件，或者从出错的文件开始重新上传。\n             * @for  Uploader\n             * @example\n             * function retry() {\n             *     uploader.retry();\n             * }\n             */\n            retry: function( file, noForceStart ) {\n                var me = this,\n                    files, i, len;\n    \n                if ( file ) {\n                    file = file.id ? file : me.queue.getFile( file );\n                    file.setStatus( Status.QUEUED );\n                    noForceStart || me.request('start-upload');\n                    return;\n                }\n    \n                files = me.queue.getFiles( Status.ERROR );\n                i = 0;\n                len = files.length;\n    \n                for ( ; i < len; i++ ) {\n                    file = files[ i ];\n                    file.setStatus( Status.QUEUED );\n                }\n    \n                me.request('start-upload');\n            },\n    \n            /**\n             * @method sort\n             * @grammar sort( fn ) => undefined\n             * @description 排序队列中的文件，在上传之前调整可以控制上传顺序。\n             * @for  Uploader\n             */\n            sortFiles: function() {\n                return this.queue.sort.apply( this.queue, arguments );\n            },\n    \n            /**\n             * @event reset\n             * @description 当 uploader 被重置的时候触发。\n             * @for  Uploader\n             */\n    \n            /**\n             * @method reset\n             * @grammar reset() => undefined\n             * @description 重置uploader。目前只重置了队列。\n             * @for  Uploader\n             * @example\n             * uploader.reset();\n             */\n            reset: function() {\n                this.owner.trigger('reset');\n                this.queue = new Queue();\n                this.stats = this.queue.stats;\n            },\n    \n            destroy: function() {\n                this.reset();\n                this.placeholder && this.placeholder.destroy();\n            }\n        });\n    \n    });\n    /**\n     * @fileOverview 添加获取Runtime相关信息的方法。\n     */\n    define('widgets/runtime',[\n        'uploader',\n        'runtime/runtime',\n        'widgets/widget'\n    ], function( Uploader, Runtime ) {\n    \n        Uploader.support = function() {\n            return Runtime.hasRuntime.apply( Runtime, arguments );\n        };\n    \n        /**\n         * @property {Object} [runtimeOrder=html5,flash]\n         * @namespace options\n         * @for Uploader\n         * @description 指定运行时启动顺序。默认会想尝试 html5 是否支持，如果支持则使用 html5, 否则则使用 flash.\n         *\n         * 可以将此值设置成 `flash`，来强制使用 flash 运行时。\n         */\n    \n        return Uploader.register({\n            name: 'runtime',\n    \n            init: function() {\n                if ( !this.predictRuntimeType() ) {\n                    throw Error('Runtime Error');\n                }\n            },\n    \n            /**\n             * 预测Uploader将采用哪个`Runtime`\n             * @grammar predictRuntimeType() => String\n             * @method predictRuntimeType\n             * @for  Uploader\n             */\n            predictRuntimeType: function() {\n                var orders = this.options.runtimeOrder || Runtime.orders,\n                    type = this.type,\n                    i, len;\n    \n                if ( !type ) {\n                    orders = orders.split( /\\s*,\\s*/g );\n    \n                    for ( i = 0, len = orders.length; i < len; i++ ) {\n                        if ( Runtime.hasRuntime( orders[ i ] ) ) {\n                            this.type = type = orders[ i ];\n                            break;\n                        }\n                    }\n                }\n    \n                return type;\n            }\n        });\n    });\n    /**\n     * @fileOverview Transport\n     */\n    define('lib/transport',[\n        'base',\n        'runtime/client',\n        'mediator'\n    ], function( Base, RuntimeClient, Mediator ) {\n    \n        var $ = Base.$;\n    \n        function Transport( opts ) {\n            var me = this;\n    \n            opts = me.options = $.extend( true, {}, Transport.options, opts || {} );\n            RuntimeClient.call( this, 'Transport' );\n    \n            this._blob = null;\n            this._formData = opts.formData || {};\n            this._headers = opts.headers || {};\n    \n            this.on( 'progress', this._timeout );\n            this.on( 'load error', function() {\n                me.trigger( 'progress', 1 );\n                clearTimeout( me._timer );\n            });\n        }\n    \n        Transport.options = {\n            server: '',\n            method: 'POST',\n    \n            // 跨域时，是否允许携带cookie, 只有html5 runtime才有效\n            withCredentials: false,\n            fileVal: 'file',\n            timeout: 2 * 60 * 1000,    // 2分钟\n            formData: {},\n            headers: {},\n            sendAsBinary: false\n        };\n    \n        $.extend( Transport.prototype, {\n    \n            // 添加Blob, 只能添加一次，最后一次有效。\n            appendBlob: function( key, blob, filename ) {\n                var me = this,\n                    opts = me.options;\n    \n                if ( me.getRuid() ) {\n                    me.disconnectRuntime();\n                }\n    \n                // 连接到blob归属的同一个runtime.\n                me.connectRuntime( blob.ruid, function() {\n                    me.exec('init');\n                });\n    \n                me._blob = blob;\n                opts.fileVal = key || opts.fileVal;\n                opts.filename = filename || opts.filename;\n            },\n    \n            // 添加其他字段\n            append: function( key, value ) {\n                if ( typeof key === 'object' ) {\n                    $.extend( this._formData, key );\n                } else {\n                    this._formData[ key ] = value;\n                }\n            },\n    \n            setRequestHeader: function( key, value ) {\n                if ( typeof key === 'object' ) {\n                    $.extend( this._headers, key );\n                } else {\n                    this._headers[ key ] = value;\n                }\n            },\n    \n            send: function( method ) {\n                this.exec( 'send', method );\n                this._timeout();\n            },\n    \n            abort: function() {\n                clearTimeout( this._timer );\n                return this.exec('abort');\n            },\n    \n            destroy: function() {\n                this.trigger('destroy');\n                this.off();\n                this.exec('destroy');\n                this.disconnectRuntime();\n            },\n    \n            getResponse: function() {\n                return this.exec('getResponse');\n            },\n    \n            getResponseAsJson: function() {\n                return this.exec('getResponseAsJson');\n            },\n    \n            getStatus: function() {\n                return this.exec('getStatus');\n            },\n    \n            _timeout: function() {\n                var me = this,\n                    duration = me.options.timeout;\n    \n                if ( !duration ) {\n                    return;\n                }\n    \n                clearTimeout( me._timer );\n                me._timer = setTimeout(function() {\n                    me.abort();\n                    me.trigger( 'error', 'timeout' );\n                }, duration );\n            }\n    \n        });\n    \n        // 让Transport具备事件功能。\n        Mediator.installTo( Transport.prototype );\n    \n        return Transport;\n    });\n    /**\n     * @fileOverview 负责文件上传相关。\n     */\n    define('widgets/upload',[\n        'base',\n        'uploader',\n        'file',\n        'lib/transport',\n        'widgets/widget'\n    ], function( Base, Uploader, WUFile, Transport ) {\n    \n        var $ = Base.$,\n            isPromise = Base.isPromise,\n            Status = WUFile.Status;\n    \n        // 添加默认配置项\n        $.extend( Uploader.options, {\n    \n    \n            /**\n             * @property {Boolean} [prepareNextFile=false]\n             * @namespace options\n             * @for Uploader\n             * @description 是否允许在文件传输时提前把下一个文件准备好。\n             * 对于一个文件的准备工作比较耗时，比如图片压缩，md5序列化。\n             * 如果能提前在当前文件传输期处理，可以节省总体耗时。\n             */\n            prepareNextFile: false,\n    \n            /**\n             * @property {Boolean} [chunked=false]\n             * @namespace options\n             * @for Uploader\n             * @description 是否要分片处理大文件上传。\n             */\n            chunked: false,\n    \n            /**\n             * @property {Boolean} [chunkSize=5242880]\n             * @namespace options\n             * @for Uploader\n             * @description 如果要分片，分多大一片？ 默认大小为5M.\n             */\n            chunkSize: 5 * 1024 * 1024,\n    \n            /**\n             * @property {Boolean} [chunkRetry=2]\n             * @namespace options\n             * @for Uploader\n             * @description 如果某个分片由于网络问题出错，允许自动重传多少次？\n             */\n            chunkRetry: 2,\n    \n            /**\n             * @property {Boolean} [threads=3]\n             * @namespace options\n             * @for Uploader\n             * @description 上传并发数。允许同时最大上传进程数。\n             */\n            threads: 3,\n    \n    \n            /**\n             * @property {Object} [formData={}]\n             * @namespace options\n             * @for Uploader\n             * @description 文件上传请求的参数表，每次发送都会发送此对象中的参数。\n             */\n            formData: {}\n    \n            /**\n             * @property {Object} [fileVal='file']\n             * @namespace options\n             * @for Uploader\n             * @description 设置文件上传域的name。\n             */\n    \n            /**\n             * @property {Object} [sendAsBinary=false]\n             * @namespace options\n             * @for Uploader\n             * @description 是否已二进制的流的方式发送文件，这样整个上传内容`php://input`都为文件内容，\n             * 其他参数在$_GET数组中。\n             */\n        });\n    \n        // 负责将文件切片。\n        function CuteFile( file, chunkSize ) {\n            var pending = [],\n                blob = file.source,\n                total = blob.size,\n                chunks = chunkSize ? Math.ceil( total / chunkSize ) : 1,\n                start = 0,\n                index = 0,\n                len, api;\n    \n            api = {\n                file: file,\n    \n                has: function() {\n                    return !!pending.length;\n                },\n    \n                shift: function() {\n                    return pending.shift();\n                },\n    \n                unshift: function( block ) {\n                    pending.unshift( block );\n                }\n            };\n    \n            while ( index < chunks ) {\n                len = Math.min( chunkSize, total - start );\n    \n                pending.push({\n                    file: file,\n                    start: start,\n                    end: chunkSize ? (start + len) : total,\n                    total: total,\n                    chunks: chunks,\n                    chunk: index++,\n                    cuted: api\n                });\n                start += len;\n            }\n    \n            file.blocks = pending.concat();\n            file.remaning = pending.length;\n    \n            return api;\n        }\n    \n        Uploader.register({\n            name: 'upload',\n    \n            init: function() {\n                var owner = this.owner,\n                    me = this;\n    \n                this.runing = false;\n                this.progress = false;\n    \n                owner\n                    .on( 'startUpload', function() {\n                        me.progress = true;\n                    })\n                    .on( 'uploadFinished', function() {\n                        me.progress = false;\n                    });\n    \n                // 记录当前正在传的数据，跟threads相关\n                this.pool = [];\n    \n                // 缓存分好片的文件。\n                this.stack = [];\n    \n                // 缓存即将上传的文件。\n                this.pending = [];\n    \n                // 跟踪还有多少分片在上传中但是没有完成上传。\n                this.remaning = 0;\n                this.__tick = Base.bindFn( this._tick, this );\n    \n                // 销毁上传相关的属性。\n                owner.on( 'uploadComplete', function( file ) {\n    \n                    // 把其他块取消了。\n                    file.blocks && $.each( file.blocks, function( _, v ) {\n                        v.transport && (v.transport.abort(), v.transport.destroy());\n                        delete v.transport;\n                    });\n    \n                    delete file.blocks;\n                    delete file.remaning;\n                });\n            },\n    \n            reset: function() {\n                this.request( 'stop-upload', true );\n                this.runing = false;\n                this.pool = [];\n                this.stack = [];\n                this.pending = [];\n                this.remaning = 0;\n                this._trigged = false;\n                this._promise = null;\n            },\n    \n            /**\n             * @event startUpload\n             * @description 当开始上传流程时触发。\n             * @for  Uploader\n             */\n    \n            /**\n             * 开始上传。此方法可以从初始状态调用开始上传流程，也可以从暂停状态调用，继续上传流程。\n             *\n             * 可以指定开始某一个文件。\n             * @grammar upload() => undefined\n             * @grammar upload( file | fileId) => undefined\n             * @method upload\n             * @for  Uploader\n             */\n            startUpload: function(file) {\n                var me = this;\n    \n                // 移出invalid的文件\n                $.each( me.request( 'get-files', Status.INVALID ), function() {\n                    me.request( 'remove-file', this );\n                });\n    \n                // 如果指定了开始某个文件，则只开始指定的文件。\n                if ( file ) {\n                    file = file.id ? file : me.request( 'get-file', file );\n    \n                    if (file.getStatus() === Status.INTERRUPT) {\n                        file.setStatus( Status.QUEUED );\n    \n                        $.each( me.pool, function( _, v ) {\n    \n                            // 之前暂停过。\n                            if (v.file !== file) {\n                                return;\n                            }\n    \n                            v.transport && v.transport.send();\n                            file.setStatus( Status.PROGRESS );\n                        });\n    \n                        \n                    } else if (file.getStatus() !== Status.PROGRESS) {\n                        file.setStatus( Status.QUEUED );\n                    }\n                } else {\n                    $.each( me.request( 'get-files', [ Status.INITED ] ), function() {\n                        this.setStatus( Status.QUEUED );\n                    });\n                }\n    \n                if ( me.runing ) {\n                    return Base.nextTick( me.__tick );\n                }\n    \n                me.runing = true;\n                var files = [];\n    \n                // 如果有暂停的，则续传\n                file || $.each( me.pool, function( _, v ) {\n                    var file = v.file;\n    \n                    if ( file.getStatus() === Status.INTERRUPT ) {\n                        me._trigged = false;\n                        files.push(file);\n                        v.transport && v.transport.send();\n                    }\n                });\n    \n                $.each(files, function() {\n                    this.setStatus( Status.PROGRESS );\n                });\n    \n                file || $.each( me.request( 'get-files',\n                        Status.INTERRUPT ), function() {\n                    this.setStatus( Status.PROGRESS );\n                });\n    \n                me._trigged = false;\n                Base.nextTick( me.__tick );\n                me.owner.trigger('startUpload');\n            },\n    \n            /**\n             * @event stopUpload\n             * @description 当开始上传流程暂停时触发。\n             * @for  Uploader\n             */\n    \n            /**\n             * 暂停上传。第一个参数为是否中断上传当前正在上传的文件。\n             *\n             * 如果第一个参数是文件，则只暂停指定文件。\n             * @grammar stop() => undefined\n             * @grammar stop( true ) => undefined\n             * @grammar stop( file ) => undefined\n             * @method stop\n             * @for  Uploader\n             */\n            stopUpload: function( file, interrupt ) {\n                var me = this,\n                    block;\n    \n                if (file === true) {\n                    interrupt = file;\n                    file = null;\n                }\n    \n                if ( me.runing === false ) {\n                    return;\n                }\n    \n                // 如果只是暂停某个文件。\n                if ( file ) {\n                    file = file.id ? file : me.request( 'get-file', file );\n    \n                    if ( file.getStatus() !== Status.PROGRESS &&\n                            file.getStatus() !== Status.QUEUED ) {\n                        return;\n                    }\n    \n                    file.setStatus( Status.INTERRUPT );\n    \n    \n                    $.each( me.pool, function( _, v ) {\n    \n                        // 只 abort 指定的文件。\n                        if (v.file === file) {\n                            block = v;\n                            return false;\n                        }\n                    });\n    \n                    block.transport && block.transport.abort();\n    \n                    if (interrupt) {\n                        me._putback(block);\n                        me._popBlock(block);\n                    }\n    \n                    return Base.nextTick( me.__tick );\n                }\n    \n                me.runing = false;\n    \n                // 正在准备中的文件。\n                if (this._promise && this._promise.file) {\n                    this._promise.file.setStatus( Status.INTERRUPT );\n                }\n    \n                interrupt && $.each( me.pool, function( _, v ) {\n                    v.transport && v.transport.abort();\n                    v.file.setStatus( Status.INTERRUPT );\n                });\n    \n                me.owner.trigger('stopUpload');\n            },\n    \n            /**\n             * @method cancelFile\n             * @grammar cancelFile( file ) => undefined\n             * @grammar cancelFile( id ) => undefined\n             * @param {File|id} file File对象或这File对象的id\n             * @description 标记文件状态为已取消, 同时将中断文件传输。\n             * @for  Uploader\n             * @example\n             *\n             * $li.on('click', '.remove-this', function() {\n             *     uploader.cancelFile( file );\n             * })\n             */\n            cancelFile: function( file ) {\n                file = file.id ? file : this.request( 'get-file', file );\n    \n                // 如果正在上传。\n                file.blocks && $.each( file.blocks, function( _, v ) {\n                    var _tr = v.transport;\n    \n                    if ( _tr ) {\n                        _tr.abort();\n                        _tr.destroy();\n                        delete v.transport;\n                    }\n                });\n    \n                file.setStatus( Status.CANCELLED );\n                this.owner.trigger( 'fileDequeued', file );\n            },\n    \n            /**\n             * 判断`Uplaode`r是否正在上传中。\n             * @grammar isInProgress() => Boolean\n             * @method isInProgress\n             * @for  Uploader\n             */\n            isInProgress: function() {\n                return !!this.progress;\n            },\n    \n            _getStats: function() {\n                return this.request('get-stats');\n            },\n    \n            /**\n             * 掉过一个文件上传，直接标记指定文件为已上传状态。\n             * @grammar skipFile( file ) => undefined\n             * @method skipFile\n             * @for  Uploader\n             */\n            skipFile: function( file, status ) {\n                file = file.id ? file : this.request( 'get-file', file );\n    \n                file.setStatus( status || Status.COMPLETE );\n                file.skipped = true;\n    \n                // 如果正在上传。\n                file.blocks && $.each( file.blocks, function( _, v ) {\n                    var _tr = v.transport;\n    \n                    if ( _tr ) {\n                        _tr.abort();\n                        _tr.destroy();\n                        delete v.transport;\n                    }\n                });\n    \n                this.owner.trigger( 'uploadSkip', file );\n            },\n    \n            /**\n             * @event uploadFinished\n             * @description 当所有文件上传结束时触发。\n             * @for  Uploader\n             */\n            _tick: function() {\n                var me = this,\n                    opts = me.options,\n                    fn, val;\n    \n                // 上一个promise还没有结束，则等待完成后再执行。\n                if ( me._promise ) {\n                    return me._promise.always( me.__tick );\n                }\n    \n                // 还有位置，且还有文件要处理的话。\n                if ( me.pool.length < opts.threads && (val = me._nextBlock()) ) {\n                    me._trigged = false;\n    \n                    fn = function( val ) {\n                        me._promise = null;\n    \n                        // 有可能是reject过来的，所以要检测val的类型。\n                        val && val.file && me._startSend( val );\n                        Base.nextTick( me.__tick );\n                    };\n    \n                    me._promise = isPromise( val ) ? val.always( fn ) : fn( val );\n    \n                // 没有要上传的了，且没有正在传输的了。\n                } else if ( !me.remaning && !me._getStats().numOfQueue &&\n                    !me._getStats().numofInterrupt ) {\n                    me.runing = false;\n    \n                    me._trigged || Base.nextTick(function() {\n                        me.owner.trigger('uploadFinished');\n                    });\n                    me._trigged = true;\n                }\n            },\n    \n            _putback: function(block) {\n                var idx;\n    \n                block.cuted.unshift(block);\n                idx = this.stack.indexOf(block.cuted);\n    \n                if (!~idx) {\n                    this.stack.unshift(block.cuted);\n                }\n            },\n    \n            _getStack: function() {\n                var i = 0,\n                    act;\n    \n                while ( (act = this.stack[ i++ ]) ) {\n                    if ( act.has() && act.file.getStatus() === Status.PROGRESS ) {\n                        return act;\n                    } else if (!act.has() ||\n                            act.file.getStatus() !== Status.PROGRESS &&\n                            act.file.getStatus() !== Status.INTERRUPT ) {\n    \n                        // 把已经处理完了的，或者，状态为非 progress（上传中）、\n                        // interupt（暂停中） 的移除。\n                        this.stack.splice( --i, 1 );\n                    }\n                }\n    \n                return null;\n            },\n    \n            _nextBlock: function() {\n                var me = this,\n                    opts = me.options,\n                    act, next, done, preparing;\n    \n                // 如果当前文件还有没有需要传输的，则直接返回剩下的。\n                if ( (act = this._getStack()) ) {\n    \n                    // 是否提前准备下一个文件\n                    if ( opts.prepareNextFile && !me.pending.length ) {\n                        me._prepareNextFile();\n                    }\n    \n                    return act.shift();\n    \n                // 否则，如果正在运行，则准备下一个文件，并等待完成后返回下个分片。\n                } else if ( me.runing ) {\n    \n                    // 如果缓存中有，则直接在缓存中取，没有则去queue中取。\n                    if ( !me.pending.length && me._getStats().numOfQueue ) {\n                        me._prepareNextFile();\n                    }\n    \n                    next = me.pending.shift();\n                    done = function( file ) {\n                        if ( !file ) {\n                            return null;\n                        }\n    \n                        act = CuteFile( file, opts.chunked ? opts.chunkSize : 0 );\n                        me.stack.push(act);\n                        return act.shift();\n                    };\n    \n                    // 文件可能还在prepare中，也有可能已经完全准备好了。\n                    if ( isPromise( next) ) {\n                        preparing = next.file;\n                        next = next[ next.pipe ? 'pipe' : 'then' ]( done );\n                        next.file = preparing;\n                        return next;\n                    }\n    \n                    return done( next );\n                }\n            },\n    \n    \n            /**\n             * @event uploadStart\n             * @param {File} file File对象\n             * @description 某个文件开始上传前触发，一个文件只会触发一次。\n             * @for  Uploader\n             */\n            _prepareNextFile: function() {\n                var me = this,\n                    file = me.request('fetch-file'),\n                    pending = me.pending,\n                    promise;\n    \n                if ( file ) {\n                    promise = me.request( 'before-send-file', file, function() {\n    \n                        // 有可能文件被skip掉了。文件被skip掉后，状态坑定不是Queued.\n                        if ( file.getStatus() === Status.PROGRESS ||\n                            file.getStatus() === Status.INTERRUPT ) {\n                            return file;\n                        }\n    \n                        return me._finishFile( file );\n                    });\n    \n                    me.owner.trigger( 'uploadStart', file );\n                    file.setStatus( Status.PROGRESS );\n    \n                    promise.file = file;\n    \n                    // 如果还在pending中，则替换成文件本身。\n                    promise.done(function() {\n                        var idx = $.inArray( promise, pending );\n    \n                        ~idx && pending.splice( idx, 1, file );\n                    });\n    \n                    // befeore-send-file的钩子就有错误发生。\n                    promise.fail(function( reason ) {\n                        file.setStatus( Status.ERROR, reason );\n                        me.owner.trigger( 'uploadError', file, reason );\n                        me.owner.trigger( 'uploadComplete', file );\n                    });\n    \n                    pending.push( promise );\n                }\n            },\n    \n            // 让出位置了，可以让其他分片开始上传\n            _popBlock: function( block ) {\n                var idx = $.inArray( block, this.pool );\n    \n                this.pool.splice( idx, 1 );\n                block.file.remaning--;\n                this.remaning--;\n            },\n    \n            // 开始上传，可以被掉过。如果promise被reject了，则表示跳过此分片。\n            _startSend: function( block ) {\n                var me = this,\n                    file = block.file,\n                    promise;\n    \n                // 有可能在 before-send-file 的 promise 期间改变了文件状态。\n                // 如：暂停，取消\n                // 我们不能中断 promise, 但是可以在 promise 完后，不做上传操作。\n                if ( file.getStatus() !== Status.PROGRESS ) {\n    \n                    // 如果是中断，则还需要放回去。\n                    if (file.getStatus() === Status.INTERRUPT) {\n                        me._putback(block);\n                    }\n    \n                    return;\n                }\n    \n                me.pool.push( block );\n                me.remaning++;\n    \n                // 如果没有分片，则直接使用原始的。\n                // 不会丢失content-type信息。\n                block.blob = block.chunks === 1 ? file.source :\n                        file.source.slice( block.start, block.end );\n    \n                // hook, 每个分片发送之前可能要做些异步的事情。\n                promise = me.request( 'before-send', block, function() {\n    \n                    // 有可能文件已经上传出错了，所以不需要再传输了。\n                    if ( file.getStatus() === Status.PROGRESS ) {\n                        me._doSend( block );\n                    } else {\n                        me._popBlock( block );\n                        Base.nextTick( me.__tick );\n                    }\n                });\n    \n                // 如果为fail了，则跳过此分片。\n                promise.fail(function() {\n                    if ( file.remaning === 1 ) {\n                        me._finishFile( file ).always(function() {\n                            block.percentage = 1;\n                            me._popBlock( block );\n                            me.owner.trigger( 'uploadComplete', file );\n                            Base.nextTick( me.__tick );\n                        });\n                    } else {\n                        block.percentage = 1;\n                        me.updateFileProgress( file );\n                        me._popBlock( block );\n                        Base.nextTick( me.__tick );\n                    }\n                });\n            },\n    \n    \n            /**\n             * @event uploadBeforeSend\n             * @param {Object} object\n             * @param {Object} data 默认的上传参数，可以扩展此对象来控制上传参数。\n             * @param {Object} headers 可以扩展此对象来控制上传头部。\n             * @description 当某个文件的分块在发送前触发，主要用来询问是否要添加附带参数，大文件在开起分片上传的前提下此事件可能会触发多次。\n             * @for  Uploader\n             */\n    \n            /**\n             * @event uploadAccept\n             * @param {Object} object\n             * @param {Object} ret 服务端的返回数据，json格式，如果服务端不是json格式，从ret._raw中取数据，自行解析。\n             * @description 当某个文件上传到服务端响应后，会派送此事件来询问服务端响应是否有效。如果此事件handler返回值为`false`, 则此文件将派送`server`类型的`uploadError`事件。\n             * @for  Uploader\n             */\n    \n            /**\n             * @event uploadProgress\n             * @param {File} file File对象\n             * @param {Number} percentage 上传进度\n             * @description 上传过程中触发，携带上传进度。\n             * @for  Uploader\n             */\n    \n    \n            /**\n             * @event uploadError\n             * @param {File} file File对象\n             * @param {String} reason 出错的code\n             * @description 当文件上传出错时触发。\n             * @for  Uploader\n             */\n    \n            /**\n             * @event uploadSuccess\n             * @param {File} file File对象\n             * @param {Object} response 服务端返回的数据\n             * @description 当文件上传成功时触发。\n             * @for  Uploader\n             */\n    \n            /**\n             * @event uploadComplete\n             * @param {File} [file] File对象\n             * @description 不管成功或者失败，文件上传完成时触发。\n             * @for  Uploader\n             */\n    \n            // 做上传操作。\n            _doSend: function( block ) {\n                var me = this,\n                    owner = me.owner,\n                    opts = me.options,\n                    file = block.file,\n                    tr = new Transport( opts ),\n                    data = $.extend({}, opts.formData ),\n                    headers = $.extend({}, opts.headers ),\n                    requestAccept, ret;\n    \n                block.transport = tr;\n    \n                tr.on( 'destroy', function() {\n                    delete block.transport;\n                    me._popBlock( block );\n                    Base.nextTick( me.__tick );\n                });\n    \n                // 广播上传进度。以文件为单位。\n                tr.on( 'progress', function( percentage ) {\n                    block.percentage = percentage;\n                    me.updateFileProgress( file );\n                });\n    \n                // 用来询问，是否返回的结果是有错误的。\n                requestAccept = function( reject ) {\n                    var fn;\n    \n                    ret = tr.getResponseAsJson() || {};\n                    ret._raw = tr.getResponse();\n                    fn = function( value ) {\n                        reject = value;\n                    };\n    \n                    // 服务端响应了，不代表成功了，询问是否响应正确。\n                    if ( !owner.trigger( 'uploadAccept', block, ret, fn ) ) {\n                        reject = reject || 'server';\n                    }\n    \n                    return reject;\n                };\n    \n                // 尝试重试，然后广播文件上传出错。\n                tr.on( 'error', function( type, flag ) {\n                    block.retried = block.retried || 0;\n    \n                    // 自动重试\n                    if ( block.chunks > 1 && ~'http,abort'.indexOf( type ) &&\n                            block.retried < opts.chunkRetry ) {\n    \n                        block.retried++;\n                        tr.send();\n    \n                    } else {\n    \n                        // http status 500 ~ 600\n                        if ( !flag && type === 'server' ) {\n                            type = requestAccept( type );\n                        }\n    \n                        file.setStatus( Status.ERROR, type );\n                        owner.trigger( 'uploadError', file, type );\n                        owner.trigger( 'uploadComplete', file );\n                    }\n                });\n    \n                // 上传成功\n                tr.on( 'load', function() {\n                    var reason;\n    \n                    // 如果非预期，转向上传出错。\n                    if ( (reason = requestAccept()) ) {\n                        tr.trigger( 'error', reason, true );\n                        return;\n                    }\n    \n                    // 全部上传完成。\n                    if ( file.remaning === 1 ) {\n                        me._finishFile( file, ret );\n                    } else {\n                        tr.destroy();\n                    }\n                });\n    \n                // 配置默认的上传字段。\n                data = $.extend( data, {\n                    id: file.id,\n                    name: file.name,\n                    type: file.type,\n                    lastModifiedDate: file.lastModifiedDate,\n                    size: file.size\n                });\n    \n                block.chunks > 1 && $.extend( data, {\n                    chunks: block.chunks,\n                    chunk: block.chunk\n                });\n    \n                // 在发送之间可以添加字段什么的。。。\n                // 如果默认的字段不够使用，可以通过监听此事件来扩展\n                owner.trigger( 'uploadBeforeSend', block, data, headers );\n    \n                // 开始发送。\n                tr.appendBlob( opts.fileVal, block.blob, file.name );\n                tr.append( data );\n                tr.setRequestHeader( headers );\n                tr.send();\n            },\n    \n            // 完成上传。\n            _finishFile: function( file, ret, hds ) {\n                var owner = this.owner;\n    \n                return owner\n                        .request( 'after-send-file', arguments, function() {\n                            file.setStatus( Status.COMPLETE );\n                            owner.trigger( 'uploadSuccess', file, ret, hds );\n                        })\n                        .fail(function( reason ) {\n    \n                            // 如果外部已经标记为invalid什么的，不再改状态。\n                            if ( file.getStatus() === Status.PROGRESS ) {\n                                file.setStatus( Status.ERROR, reason );\n                            }\n    \n                            owner.trigger( 'uploadError', file, reason );\n                        })\n                        .always(function() {\n                            owner.trigger( 'uploadComplete', file );\n                        });\n            },\n    \n            updateFileProgress: function(file) {\n                var totalPercent = 0,\n                    uploaded = 0;\n    \n                if (!file.blocks) {\n                    return;\n                }\n    \n                $.each( file.blocks, function( _, v ) {\n                    uploaded += (v.percentage || 0) * (v.end - v.start);\n                });\n    \n                totalPercent = uploaded / file.size;\n                this.owner.trigger( 'uploadProgress', file, totalPercent || 0 );\n            }\n    \n        });\n    });\n    \n    /**\n     * @fileOverview 各种验证，包括文件总大小是否超出、单文件是否超出和文件是否重复。\n     */\n    \n    define('widgets/validator',[\n        'base',\n        'uploader',\n        'file',\n        'widgets/widget'\n    ], function( Base, Uploader, WUFile ) {\n    \n        var $ = Base.$,\n            validators = {},\n            api;\n    \n        /**\n         * @event error\n         * @param {String} type 错误类型。\n         * @description 当validate不通过时，会以派送错误事件的形式通知调用者。通过`upload.on('error', handler)`可以捕获到此类错误，目前有以下错误会在特定的情况下派送错来。\n         *\n         * * `Q_EXCEED_NUM_LIMIT` 在设置了`fileNumLimit`且尝试给`uploader`添加的文件数量超出这个值时派送。\n         * * `Q_EXCEED_SIZE_LIMIT` 在设置了`Q_EXCEED_SIZE_LIMIT`且尝试给`uploader`添加的文件总大小超出这个值时派送。\n         * * `Q_TYPE_DENIED` 当文件类型不满足时触发。。\n         * @for  Uploader\n         */\n    \n        // 暴露给外面的api\n        api = {\n    \n            // 添加验证器\n            addValidator: function( type, cb ) {\n                validators[ type ] = cb;\n            },\n    \n            // 移除验证器\n            removeValidator: function( type ) {\n                delete validators[ type ];\n            }\n        };\n    \n        // 在Uploader初始化的时候启动Validators的初始化\n        Uploader.register({\n            name: 'validator',\n    \n            init: function() {\n                var me = this;\n                Base.nextTick(function() {\n                    $.each( validators, function() {\n                        this.call( me.owner );\n                    });\n                });\n            }\n        });\n    \n        /**\n         * @property {int} [fileNumLimit=undefined]\n         * @namespace options\n         * @for Uploader\n         * @description 验证文件总数量, 超出则不允许加入队列。\n         */\n        api.addValidator( 'fileNumLimit', function() {\n            var uploader = this,\n                opts = uploader.options,\n                count = 0,\n                max = parseInt( opts.fileNumLimit, 10 ),\n                flag = true;\n    \n            if ( !max ) {\n                return;\n            }\n    \n            uploader.on( 'beforeFileQueued', function( file ) {\n    \n                if ( count >= max && flag ) {\n                    flag = false;\n                    this.trigger( 'error', 'Q_EXCEED_NUM_LIMIT', max, file );\n                    setTimeout(function() {\n                        flag = true;\n                    }, 1 );\n                }\n    \n                return count >= max ? false : true;\n            });\n    \n            uploader.on( 'fileQueued', function() {\n                count++;\n            });\n    \n            uploader.on( 'fileDequeued', function() {\n                count--;\n            });\n    \n            uploader.on( 'reset', function() {\n                count = 0;\n            });\n        });\n    \n    \n        /**\n         * @property {int} [fileSizeLimit=undefined]\n         * @namespace options\n         * @for Uploader\n         * @description 验证文件总大小是否超出限制, 超出则不允许加入队列。\n         */\n        api.addValidator( 'fileSizeLimit', function() {\n            var uploader = this,\n                opts = uploader.options,\n                count = 0,\n                max = parseInt( opts.fileSizeLimit, 10 ),\n                flag = true;\n    \n            if ( !max ) {\n                return;\n            }\n    \n            uploader.on( 'beforeFileQueued', function( file ) {\n                var invalid = count + file.size > max;\n    \n                if ( invalid && flag ) {\n                    flag = false;\n                    this.trigger( 'error', 'Q_EXCEED_SIZE_LIMIT', max, file );\n                    setTimeout(function() {\n                        flag = true;\n                    }, 1 );\n                }\n    \n                return invalid ? false : true;\n            });\n    \n            uploader.on( 'fileQueued', function( file ) {\n                count += file.size;\n            });\n    \n            uploader.on( 'fileDequeued', function( file ) {\n                count -= file.size;\n            });\n    \n            uploader.on( 'reset', function() {\n                count = 0;\n            });\n        });\n    \n        /**\n         * @property {int} [fileSingleSizeLimit=undefined]\n         * @namespace options\n         * @for Uploader\n         * @description 验证单个文件大小是否超出限制, 超出则不允许加入队列。\n         */\n        api.addValidator( 'fileSingleSizeLimit', function() {\n            var uploader = this,\n                opts = uploader.options,\n                max = opts.fileSingleSizeLimit;\n    \n            if ( !max ) {\n                return;\n            }\n    \n            uploader.on( 'beforeFileQueued', function( file ) {\n    \n                if ( file.size > max ) {\n                    file.setStatus( WUFile.Status.INVALID, 'exceed_size' );\n                    this.trigger( 'error', 'F_EXCEED_SIZE', max, file );\n                    return false;\n                }\n    \n            });\n    \n        });\n    \n        /**\n         * @property {Boolean} [duplicate=undefined]\n         * @namespace options\n         * @for Uploader\n         * @description 去重， 根据文件名字、文件大小和最后修改时间来生成hash Key.\n         */\n        api.addValidator( 'duplicate', function() {\n            var uploader = this,\n                opts = uploader.options,\n                mapping = {};\n    \n            if ( opts.duplicate ) {\n                return;\n            }\n    \n            function hashString( str ) {\n                var hash = 0,\n                    i = 0,\n                    len = str.length,\n                    _char;\n    \n                for ( ; i < len; i++ ) {\n                    _char = str.charCodeAt( i );\n                    hash = _char + (hash << 6) + (hash << 16) - hash;\n                }\n    \n                return hash;\n            }\n    \n            uploader.on( 'beforeFileQueued', function( file ) {\n                var hash = file.__hash || (file.__hash = hashString( file.name +\n                        file.size + file.lastModifiedDate ));\n    \n                // 已经重复了\n                if ( mapping[ hash ] ) {\n                    this.trigger( 'error', 'F_DUPLICATE', file );\n                    return false;\n                }\n            });\n    \n            uploader.on( 'fileQueued', function( file ) {\n                var hash = file.__hash;\n    \n                hash && (mapping[ hash ] = true);\n            });\n    \n            uploader.on( 'fileDequeued', function( file ) {\n                var hash = file.__hash;\n    \n                hash && (delete mapping[ hash ]);\n            });\n    \n            uploader.on( 'reset', function() {\n                mapping = {};\n            });\n        });\n    \n        return api;\n    });\n    \n    /**\n     * @fileOverview Runtime管理器，负责Runtime的选择, 连接\n     */\n    define('runtime/compbase',[],function() {\n    \n        function CompBase( owner, runtime ) {\n    \n            this.owner = owner;\n            this.options = owner.options;\n    \n            this.getRuntime = function() {\n                return runtime;\n            };\n    \n            this.getRuid = function() {\n                return runtime.uid;\n            };\n    \n            this.trigger = function() {\n                return owner.trigger.apply( owner, arguments );\n            };\n        }\n    \n        return CompBase;\n    });\n    /**\n     * @fileOverview Html5Runtime\n     */\n    define('runtime/html5/runtime',[\n        'base',\n        'runtime/runtime',\n        'runtime/compbase'\n    ], function( Base, Runtime, CompBase ) {\n    \n        var type = 'html5',\n            components = {};\n    \n        function Html5Runtime() {\n            var pool = {},\n                me = this,\n                destroy = this.destroy;\n    \n            Runtime.apply( me, arguments );\n            me.type = type;\n    \n    \n            // 这个方法的调用者，实际上是RuntimeClient\n            me.exec = function( comp, fn/*, args...*/) {\n                var client = this,\n                    uid = client.uid,\n                    args = Base.slice( arguments, 2 ),\n                    instance;\n    \n                if ( components[ comp ] ) {\n                    instance = pool[ uid ] = pool[ uid ] ||\n                            new components[ comp ]( client, me );\n    \n                    if ( instance[ fn ] ) {\n                        return instance[ fn ].apply( instance, args );\n                    }\n                }\n            };\n    \n            me.destroy = function() {\n                // @todo 删除池子中的所有实例\n                return destroy && destroy.apply( this, arguments );\n            };\n        }\n    \n        Base.inherits( Runtime, {\n            constructor: Html5Runtime,\n    \n            // 不需要连接其他程序，直接执行callback\n            init: function() {\n                var me = this;\n                setTimeout(function() {\n                    me.trigger('ready');\n                }, 1 );\n            }\n    \n        });\n    \n        // 注册Components\n        Html5Runtime.register = function( name, component ) {\n            var klass = components[ name ] = Base.inherits( CompBase, component );\n            return klass;\n        };\n    \n        // 注册html5运行时。\n        // 只有在支持的前提下注册。\n        if ( window.Blob && window.FileReader && window.DataView ) {\n            Runtime.addRuntime( type, Html5Runtime );\n        }\n    \n        return Html5Runtime;\n    });\n    /**\n     * @fileOverview Blob Html实现\n     */\n    define('runtime/html5/blob',[\n        'runtime/html5/runtime',\n        'lib/blob'\n    ], function( Html5Runtime, Blob ) {\n    \n        return Html5Runtime.register( 'Blob', {\n            slice: function( start, end ) {\n                var blob = this.owner.source,\n                    slice = blob.slice || blob.webkitSlice || blob.mozSlice;\n    \n                blob = slice.call( blob, start, end );\n    \n                return new Blob( this.getRuid(), blob );\n            }\n        });\n    });\n    /**\n     * @fileOverview FilePaste\n     */\n    define('runtime/html5/dnd',[\n        'base',\n        'runtime/html5/runtime',\n        'lib/file'\n    ], function( Base, Html5Runtime, File ) {\n    \n        var $ = Base.$,\n            prefix = 'webuploader-dnd-';\n    \n        return Html5Runtime.register( 'DragAndDrop', {\n            init: function() {\n                var elem = this.elem = this.options.container;\n    \n                this.dragEnterHandler = Base.bindFn( this._dragEnterHandler, this );\n                this.dragOverHandler = Base.bindFn( this._dragOverHandler, this );\n                this.dragLeaveHandler = Base.bindFn( this._dragLeaveHandler, this );\n                this.dropHandler = Base.bindFn( this._dropHandler, this );\n                this.dndOver = false;\n    \n                elem.on( 'dragenter', this.dragEnterHandler );\n                elem.on( 'dragover', this.dragOverHandler );\n                elem.on( 'dragleave', this.dragLeaveHandler );\n                elem.on( 'drop', this.dropHandler );\n    \n                if ( this.options.disableGlobalDnd ) {\n                    $( document ).on( 'dragover', this.dragOverHandler );\n                    $( document ).on( 'drop', this.dropHandler );\n                }\n            },\n    \n            _dragEnterHandler: function( e ) {\n                var me = this,\n                    denied = me._denied || false,\n                    items;\n    \n                e = e.originalEvent || e;\n    \n                if ( !me.dndOver ) {\n                    me.dndOver = true;\n    \n                    // 注意只有 chrome 支持。\n                    items = e.dataTransfer.items;\n    \n                    if ( items && items.length ) {\n                        me._denied = denied = !me.trigger( 'accept', items );\n                    }\n    \n                    me.elem.addClass( prefix + 'over' );\n                    me.elem[ denied ? 'addClass' :\n                            'removeClass' ]( prefix + 'denied' );\n                }\n    \n                e.dataTransfer.dropEffect = denied ? 'none' : 'copy';\n    \n                return false;\n            },\n    \n            _dragOverHandler: function( e ) {\n                // 只处理框内的。\n                var parentElem = this.elem.parent().get( 0 );\n                if ( parentElem && !$.contains( parentElem, e.currentTarget ) ) {\n                    return false;\n                }\n    \n                clearTimeout( this._leaveTimer );\n                this._dragEnterHandler.call( this, e );\n    \n                return false;\n            },\n    \n            _dragLeaveHandler: function() {\n                var me = this,\n                    handler;\n    \n                handler = function() {\n                    me.dndOver = false;\n                    me.elem.removeClass( prefix + 'over ' + prefix + 'denied' );\n                };\n    \n                clearTimeout( me._leaveTimer );\n                me._leaveTimer = setTimeout( handler, 100 );\n                return false;\n            },\n    \n            _dropHandler: function( e ) {\n                var me = this,\n                    ruid = me.getRuid(),\n                    parentElem = me.elem.parent().get( 0 ),\n                    dataTransfer, data;\n    \n                // 只处理框内的。\n                if ( parentElem && !$.contains( parentElem, e.currentTarget ) ) {\n                    return false;\n                }\n    \n                e = e.originalEvent || e;\n                dataTransfer = e.dataTransfer;\n    \n                // 如果是页面内拖拽，还不能处理，不阻止事件。\n                // 此处 ie11 下会报参数错误，\n                try {\n                    data = dataTransfer.getData('text/html');\n                } catch( err ) {\n                }\n    \n                me.dndOver = false;\n                me.elem.removeClass( prefix + 'over' );\n    \n                if ( data ) {\n                    return;\n                }\n    \n                me._getTansferFiles( dataTransfer, function( results ) {\n                    me.trigger( 'drop', $.map( results, function( file ) {\n                        return new File( ruid, file );\n                    }) );\n                });\n    \n                return false;\n            },\n    \n            // 如果传入 callback 则去查看文件夹，否则只管当前文件夹。\n            _getTansferFiles: function( dataTransfer, callback ) {\n                var results  = [],\n                    promises = [],\n                    items, files, file, item, i, len, canAccessFolder;\n    \n                items = dataTransfer.items;\n                files = dataTransfer.files;\n    \n                canAccessFolder = !!(items && items[ 0 ].webkitGetAsEntry);\n    \n                for ( i = 0, len = files.length; i < len; i++ ) {\n                    file = files[ i ];\n                    item = items && items[ i ];\n    \n                    if ( canAccessFolder && item.webkitGetAsEntry().isDirectory ) {\n    \n                        promises.push( this._traverseDirectoryTree(\n                                item.webkitGetAsEntry(), results ) );\n                    } else {\n                        results.push( file );\n                    }\n                }\n    \n                Base.when.apply( Base, promises ).done(function() {\n    \n                    if ( !results.length ) {\n                        return;\n                    }\n    \n                    callback( results );\n                });\n            },\n    \n            _traverseDirectoryTree: function( entry, results ) {\n                var deferred = Base.Deferred(),\n                    me = this;\n    \n                if ( entry.isFile ) {\n                    entry.file(function( file ) {\n                        results.push( file );\n                        deferred.resolve();\n                    });\n                } else if ( entry.isDirectory ) {\n                    entry.createReader().readEntries(function( entries ) {\n                        var len = entries.length,\n                            promises = [],\n                            arr = [],    // 为了保证顺序。\n                            i;\n    \n                        for ( i = 0; i < len; i++ ) {\n                            promises.push( me._traverseDirectoryTree(\n                                    entries[ i ], arr ) );\n                        }\n    \n                        Base.when.apply( Base, promises ).then(function() {\n                            results.push.apply( results, arr );\n                            deferred.resolve();\n                        }, deferred.reject );\n                    });\n                }\n    \n                return deferred.promise();\n            },\n    \n            destroy: function() {\n                var elem = this.elem;\n    \n                // 还没 init 就调用 destroy\n                if (!elem) {\n                    return;\n                }\n    \n                elem.off( 'dragenter', this.dragEnterHandler );\n                elem.off( 'dragover', this.dragOverHandler );\n                elem.off( 'dragleave', this.dragLeaveHandler );\n                elem.off( 'drop', this.dropHandler );\n    \n                if ( this.options.disableGlobalDnd ) {\n                    $( document ).off( 'dragover', this.dragOverHandler );\n                    $( document ).off( 'drop', this.dropHandler );\n                }\n            }\n        });\n    });\n    \n    /**\n     * @fileOverview FilePaste\n     */\n    define('runtime/html5/filepaste',[\n        'base',\n        'runtime/html5/runtime',\n        'lib/file'\n    ], function( Base, Html5Runtime, File ) {\n    \n        return Html5Runtime.register( 'FilePaste', {\n            init: function() {\n                var opts = this.options,\n                    elem = this.elem = opts.container,\n                    accept = '.*',\n                    arr, i, len, item;\n    \n                // accetp的mimeTypes中生成匹配正则。\n                if ( opts.accept ) {\n                    arr = [];\n    \n                    for ( i = 0, len = opts.accept.length; i < len; i++ ) {\n                        item = opts.accept[ i ].mimeTypes;\n                        item && arr.push( item );\n                    }\n    \n                    if ( arr.length ) {\n                        accept = arr.join(',');\n                        accept = accept.replace( /,/g, '|' ).replace( /\\*/g, '.*' );\n                    }\n                }\n                this.accept = accept = new RegExp( accept, 'i' );\n                this.hander = Base.bindFn( this._pasteHander, this );\n                elem.on( 'paste', this.hander );\n            },\n    \n            _pasteHander: function( e ) {\n                var allowed = [],\n                    ruid = this.getRuid(),\n                    items, item, blob, i, len;\n    \n                e = e.originalEvent || e;\n                items = e.clipboardData.items;\n    \n                for ( i = 0, len = items.length; i < len; i++ ) {\n                    item = items[ i ];\n    \n                    if ( item.kind !== 'file' || !(blob = item.getAsFile()) ) {\n                        continue;\n                    }\n    \n                    allowed.push( new File( ruid, blob ) );\n                }\n    \n                if ( allowed.length ) {\n                    // 不阻止非文件粘贴（文字粘贴）的事件冒泡\n                    e.preventDefault();\n                    e.stopPropagation();\n                    this.trigger( 'paste', allowed );\n                }\n            },\n    \n            destroy: function() {\n                this.elem.off( 'paste', this.hander );\n            }\n        });\n    });\n    \n    /**\n     * @fileOverview FilePicker\n     */\n    define('runtime/html5/filepicker',[\n        'base',\n        'runtime/html5/runtime'\n    ], function( Base, Html5Runtime ) {\n    \n        var $ = Base.$;\n    \n        return Html5Runtime.register( 'FilePicker', {\n            init: function() {\n                var container = this.getRuntime().getContainer(),\n                    me = this,\n                    owner = me.owner,\n                    opts = me.options,\n                    label = this.label = $( document.createElement('label') ),\n                    input =  this.input = $( document.createElement('input') ),\n                    arr, i, len, mouseHandler;\n    \n                input.attr( 'type', 'file' );\n                input.attr( 'capture', 'camera');\n                input.attr( 'name', opts.name );\n                input.addClass('webuploader-element-invisible');\n    \n                label.on( 'click', function(e) {\n                    input.trigger('click');\n                    e.stopPropagation();\n                    owner.trigger('dialogopen');\n                });\n    \n                label.css({\n                    opacity: 0,\n                    width: '100%',\n                    height: '100%',\n                    display: 'block',\n                    cursor: 'pointer',\n                    background: '#ffffff'\n                });\n    \n                if ( opts.multiple ) {\n                    input.attr( 'multiple', 'multiple' );\n                }\n    \n                // @todo Firefox不支持单独指定后缀\n                if ( opts.accept && opts.accept.length > 0 ) {\n                    arr = [];\n    \n                    for ( i = 0, len = opts.accept.length; i < len; i++ ) {\n                        arr.push( opts.accept[ i ].mimeTypes );\n                    }\n    \n                    input.attr( 'accept', arr.join(',') );\n                }\n    \n                container.append( input );\n                container.append( label );\n    \n                mouseHandler = function( e ) {\n                    owner.trigger( e.type );\n                };\n    \n                input.on( 'change', function( e ) {\n                    var fn = arguments.callee,\n                        clone;\n    \n                    me.files = e.target.files;\n    \n                    // reset input\n                    clone = this.cloneNode( true );\n                    clone.value = null;\n                    this.parentNode.replaceChild( clone, this );\n    \n                    input.off();\n                    input = $( clone ).on( 'change', fn )\n                            .on( 'mouseenter mouseleave', mouseHandler );\n    \n                    owner.trigger('change');\n                });\n    \n                label.on( 'mouseenter mouseleave', mouseHandler );\n    \n            },\n    \n    \n            getFiles: function() {\n                return this.files;\n            },\n    \n            destroy: function() {\n                this.input.off();\n                this.label.off();\n            }\n        });\n    });\n    \n    /**\n     * @fileOverview Transport\n     * @todo 支持chunked传输，优势：\n     * 可以将大文件分成小块，挨个传输，可以提高大文件成功率，当失败的时候，也只需要重传那小部分，\n     * 而不需要重头再传一次。另外断点续传也需要用chunked方式。\n     */\n    define('runtime/html5/transport',[\n        'base',\n        'runtime/html5/runtime'\n    ], function( Base, Html5Runtime ) {\n    \n        var noop = Base.noop,\n            $ = Base.$;\n    \n        return Html5Runtime.register( 'Transport', {\n            init: function() {\n                this._status = 0;\n                this._response = null;\n            },\n    \n            send: function() {\n                var owner = this.owner,\n                    opts = this.options,\n                    xhr = this._initAjax(),\n                    blob = owner._blob,\n                    server = opts.server,\n                    formData, binary, fr;\n    \n                if ( opts.sendAsBinary ) {\n                    server += (/\\?/.test( server ) ? '&' : '?') +\n                            $.param( owner._formData );\n    \n                    binary = blob.getSource();\n                } else {\n                    formData = new FormData();\n                    $.each( owner._formData, function( k, v ) {\n                        formData.append( k, v );\n                    });\n    \n                    formData.append( opts.fileVal, blob.getSource(),\n                            opts.filename || owner._formData.name || '' );\n                }\n    \n                if ( opts.withCredentials && 'withCredentials' in xhr ) {\n                    xhr.open( opts.method, server, true );\n                    xhr.withCredentials = true;\n                } else {\n                    xhr.open( opts.method, server );\n                }\n    \n                this._setRequestHeader( xhr, opts.headers );\n    \n                if ( binary ) {\n                    // 强制设置成 content-type 为文件流。\n                    xhr.overrideMimeType &&\n                            xhr.overrideMimeType('application/octet-stream');\n    \n                    // android直接发送blob会导致服务端接收到的是空文件。\n                    // bug详情。\n                    // https://code.google.com/p/android/issues/detail?id=39882\n                    // 所以先用fileReader读取出来再通过arraybuffer的方式发送。\n                    if ( Base.os.android ) {\n                        fr = new FileReader();\n    \n                        fr.onload = function() {\n                            xhr.send( this.result );\n                            fr = fr.onload = null;\n                        };\n    \n                        fr.readAsArrayBuffer( binary );\n                    } else {\n                        xhr.send( binary );\n                    }\n                } else {\n                    xhr.send( formData );\n                }\n            },\n    \n            getResponse: function() {\n                return this._response;\n            },\n    \n            getResponseAsJson: function() {\n                return this._parseJson( this._response );\n            },\n    \n            getStatus: function() {\n                return this._status;\n            },\n    \n            abort: function() {\n                var xhr = this._xhr;\n    \n                if ( xhr ) {\n                    xhr.upload.onprogress = noop;\n                    xhr.onreadystatechange = noop;\n                    xhr.abort();\n    \n                    this._xhr = xhr = null;\n                }\n            },\n    \n            destroy: function() {\n                this.abort();\n            },\n    \n            _initAjax: function() {\n                var me = this,\n                    xhr = new XMLHttpRequest(),\n                    opts = this.options;\n    \n                if ( opts.withCredentials && !('withCredentials' in xhr) &&\n                        typeof XDomainRequest !== 'undefined' ) {\n                    xhr = new XDomainRequest();\n                }\n    \n                xhr.upload.onprogress = function( e ) {\n                    var percentage = 0;\n    \n                    if ( e.lengthComputable ) {\n                        percentage = e.loaded / e.total;\n                    }\n    \n                    return me.trigger( 'progress', percentage );\n                };\n    \n                xhr.onreadystatechange = function() {\n    \n                    if ( xhr.readyState !== 4 ) {\n                        return;\n                    }\n    \n                    xhr.upload.onprogress = noop;\n                    xhr.onreadystatechange = noop;\n                    me._xhr = null;\n                    me._status = xhr.status;\n    \n                    if ( xhr.status >= 200 && xhr.status < 300 ) {\n                        me._response = xhr.responseText;\n                        return me.trigger('load');\n                    } else if ( xhr.status >= 500 && xhr.status < 600 ) {\n                        me._response = xhr.responseText;\n                        return me.trigger( 'error', 'server' );\n                    }\n    \n    \n                    return me.trigger( 'error', me._status ? 'http' : 'abort' );\n                };\n    \n                me._xhr = xhr;\n                return xhr;\n            },\n    \n            _setRequestHeader: function( xhr, headers ) {\n                $.each( headers, function( key, val ) {\n                    xhr.setRequestHeader( key, val );\n                });\n            },\n    \n            _parseJson: function( str ) {\n                var json;\n    \n                try {\n                    json = JSON.parse( str );\n                } catch ( ex ) {\n                    json = {};\n                }\n    \n                return json;\n            }\n        });\n    });\n    /**\n     * @fileOverview FlashRuntime\n     */\n    define('runtime/flash/runtime',[\n        'base',\n        'runtime/runtime',\n        'runtime/compbase'\n    ], function( Base, Runtime, CompBase ) {\n    \n        var $ = Base.$,\n            type = 'flash',\n            components = {};\n    \n    \n        function getFlashVersion() {\n            var version;\n    \n            try {\n                version = navigator.plugins[ 'Shockwave Flash' ];\n                version = version.description;\n            } catch ( ex ) {\n                try {\n                    version = new ActiveXObject('ShockwaveFlash.ShockwaveFlash')\n                            .GetVariable('$version');\n                } catch ( ex2 ) {\n                    version = '0.0';\n                }\n            }\n            version = version.match( /\\d+/g );\n            return parseFloat( version[ 0 ] + '.' + version[ 1 ], 10 );\n        }\n    \n        function FlashRuntime() {\n            var pool = {},\n                clients = {},\n                destroy = this.destroy,\n                me = this,\n                jsreciver = Base.guid('webuploader_');\n    \n            Runtime.apply( me, arguments );\n            me.type = type;\n    \n    \n            // 这个方法的调用者，实际上是RuntimeClient\n            me.exec = function( comp, fn/*, args...*/ ) {\n                var client = this,\n                    uid = client.uid,\n                    args = Base.slice( arguments, 2 ),\n                    instance;\n    \n                clients[ uid ] = client;\n    \n                if ( components[ comp ] ) {\n                    if ( !pool[ uid ] ) {\n                        pool[ uid ] = new components[ comp ]( client, me );\n                    }\n    \n                    instance = pool[ uid ];\n    \n                    if ( instance[ fn ] ) {\n                        return instance[ fn ].apply( instance, args );\n                    }\n                }\n    \n                return me.flashExec.apply( client, arguments );\n            };\n    \n            function handler( evt, obj ) {\n                var type = evt.type || evt,\n                    parts, uid;\n    \n                parts = type.split('::');\n                uid = parts[ 0 ];\n                type = parts[ 1 ];\n    \n                // console.log.apply( console, arguments );\n    \n                if ( type === 'Ready' && uid === me.uid ) {\n                    me.trigger('ready');\n                } else if ( clients[ uid ] ) {\n                    clients[ uid ].trigger( type.toLowerCase(), evt, obj );\n                }\n    \n                // Base.log( evt, obj );\n            }\n    \n            // flash的接受器。\n            window[ jsreciver ] = function() {\n                var args = arguments;\n    \n                // 为了能捕获得到。\n                setTimeout(function() {\n                    handler.apply( null, args );\n                }, 1 );\n            };\n    \n            this.jsreciver = jsreciver;\n    \n            this.destroy = function() {\n                // @todo 删除池子中的所有实例\n                return destroy && destroy.apply( this, arguments );\n            };\n    \n            this.flashExec = function( comp, fn ) {\n                var flash = me.getFlash(),\n                    args = Base.slice( arguments, 2 );\n    \n                return flash.exec( this.uid, comp, fn, args );\n            };\n    \n            // @todo\n        }\n    \n        Base.inherits( Runtime, {\n            constructor: FlashRuntime,\n    \n            init: function() {\n                var container = this.getContainer(),\n                    opts = this.options,\n                    html;\n    \n                // if not the minimal height, shims are not initialized\n                // in older browsers (e.g FF3.6, IE6,7,8, Safari 4.0,5.0, etc)\n                container.css({\n                    position: 'absolute',\n                    top: '-8px',\n                    left: '-8px',\n                    width: '9px',\n                    height: '9px',\n                    overflow: 'hidden'\n                });\n    \n                // insert flash object\n                html = '<object id=\"' + this.uid + '\" type=\"application/' +\n                        'x-shockwave-flash\" data=\"' +  opts.swf + '\" ';\n    \n                if ( Base.browser.ie ) {\n                    html += 'classid=\"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000\" ';\n                }\n    \n                html += 'width=\"100%\" height=\"100%\" style=\"outline:0\">'  +\n                    '<param name=\"movie\" value=\"' + opts.swf + '\" />' +\n                    '<param name=\"flashvars\" value=\"uid=' + this.uid +\n                    '&jsreciver=' + this.jsreciver + '\" />' +\n                    '<param name=\"wmode\" value=\"transparent\" />' +\n                    '<param name=\"allowscriptaccess\" value=\"always\" />' +\n                '</object>';\n    \n                container.html( html );\n            },\n    \n            getFlash: function() {\n                if ( this._flash ) {\n                    return this._flash;\n                }\n    \n                this._flash = $( '#' + this.uid ).get( 0 );\n                return this._flash;\n            }\n    \n        });\n    \n        FlashRuntime.register = function( name, component ) {\n            component = components[ name ] = Base.inherits( CompBase, $.extend({\n    \n                // @todo fix this later\n                flashExec: function() {\n                    var owner = this.owner,\n                        runtime = this.getRuntime();\n    \n                    return runtime.flashExec.apply( owner, arguments );\n                }\n            }, component ) );\n    \n            return component;\n        };\n    \n        if ( getFlashVersion() >= 11.4 ) {\n            Runtime.addRuntime( type, FlashRuntime );\n        }\n    \n        return FlashRuntime;\n    });\n    /**\n     * @fileOverview FilePicker\n     */\n    define('runtime/flash/filepicker',[\n        'base',\n        'runtime/flash/runtime'\n    ], function( Base, FlashRuntime ) {\n        var $ = Base.$;\n    \n        return FlashRuntime.register( 'FilePicker', {\n            init: function( opts ) {\n                var copy = $.extend({}, opts ),\n                    len, i;\n    \n                // 修复Flash再没有设置title的情况下无法弹出flash文件选择框的bug.\n                len = copy.accept && copy.accept.length;\n                for (  i = 0; i < len; i++ ) {\n                    if ( !copy.accept[ i ].title ) {\n                        copy.accept[ i ].title = 'Files';\n                    }\n                }\n    \n                delete copy.button;\n                delete copy.id;\n                delete copy.container;\n    \n                this.flashExec( 'FilePicker', 'init', copy );\n            },\n    \n            destroy: function() {\n                this.flashExec( 'FilePicker', 'destroy' );\n            }\n        });\n    });\n    /**\n     * @fileOverview  Transport flash实现\n     */\n    define('runtime/flash/transport',[\n        'base',\n        'runtime/flash/runtime',\n        'runtime/client'\n    ], function( Base, FlashRuntime, RuntimeClient ) {\n        var $ = Base.$;\n    \n        return FlashRuntime.register( 'Transport', {\n            init: function() {\n                this._status = 0;\n                this._response = null;\n                this._responseJson = null;\n            },\n    \n            send: function() {\n                var owner = this.owner,\n                    opts = this.options,\n                    xhr = this._initAjax(),\n                    blob = owner._blob,\n                    server = opts.server,\n                    binary;\n    \n                xhr.connectRuntime( blob.ruid );\n    \n                if ( opts.sendAsBinary ) {\n                    server += (/\\?/.test( server ) ? '&' : '?') +\n                            $.param( owner._formData );\n    \n                    binary = blob.uid;\n                } else {\n                    $.each( owner._formData, function( k, v ) {\n                        xhr.exec( 'append', k, v );\n                    });\n    \n                    xhr.exec( 'appendBlob', opts.fileVal, blob.uid,\n                            opts.filename || owner._formData.name || '' );\n                }\n    \n                this._setRequestHeader( xhr, opts.headers );\n                xhr.exec( 'send', {\n                    method: opts.method,\n                    url: server,\n                    forceURLStream: opts.forceURLStream,\n                    mimeType: 'application/octet-stream'\n                }, binary );\n            },\n    \n            getStatus: function() {\n                return this._status;\n            },\n    \n            getResponse: function() {\n                return this._response || '';\n            },\n    \n            getResponseAsJson: function() {\n                return this._responseJson;\n            },\n    \n            abort: function() {\n                var xhr = this._xhr;\n    \n                if ( xhr ) {\n                    xhr.exec('abort');\n                    xhr.destroy();\n                    this._xhr = xhr = null;\n                }\n            },\n    \n            destroy: function() {\n                this.abort();\n            },\n    \n            _initAjax: function() {\n                var me = this,\n                    xhr = new RuntimeClient('XMLHttpRequest');\n    \n                xhr.on( 'uploadprogress progress', function( e ) {\n                    var percent = e.loaded / e.total;\n                    percent = Math.min( 1, Math.max( 0, percent ) );\n                    return me.trigger( 'progress', percent );\n                });\n    \n                xhr.on( 'load', function() {\n                    var status = xhr.exec('getStatus'),\n                        readBody = false,\n                        err = '',\n                        p;\n    \n                    xhr.off();\n                    me._xhr = null;\n    \n                    if ( status >= 200 && status < 300 ) {\n                        readBody = true;\n                    } else if ( status >= 500 && status < 600 ) {\n                        readBody = true;\n                        err = 'server';\n                    } else {\n                        err = 'http';\n                    }\n    \n                    if ( readBody ) {\n                        me._response = xhr.exec('getResponse');\n                        me._response = decodeURIComponent( me._response );\n    \n                        // flash 处理可能存在 bug, 没辙只能靠 js 了\n                        // try {\n                        //     me._responseJson = xhr.exec('getResponseAsJson');\n                        // } catch ( error ) {\n    \n                        p = function( s ) {\n                            try {\n                                if (window.JSON && window.JSON.parse) {\n                                    return JSON.parse(s);\n                                }\n    \n                                return new Function('return ' + s).call();\n                            } catch ( err ) {\n                                return {};\n                            }\n                        };\n                        me._responseJson  = me._response ? p(me._response) : {};\n    \n                        // }\n                    }\n    \n                    xhr.destroy();\n                    xhr = null;\n    \n                    return err ? me.trigger( 'error', err ) : me.trigger('load');\n                });\n    \n                xhr.on( 'error', function() {\n                    xhr.off();\n                    me._xhr = null;\n                    me.trigger( 'error', 'http' );\n                });\n    \n                me._xhr = xhr;\n                return xhr;\n            },\n    \n            _setRequestHeader: function( xhr, headers ) {\n                $.each( headers, function( key, val ) {\n                    xhr.exec( 'setRequestHeader', key, val );\n                });\n            }\n        });\n    });\n    \n    /**\n     * @fileOverview Blob Html实现\n     */\n    define('runtime/flash/blob',[\n        'runtime/flash/runtime',\n        'lib/blob'\n    ], function( FlashRuntime, Blob ) {\n    \n        return FlashRuntime.register( 'Blob', {\n            slice: function( start, end ) {\n                var blob = this.flashExec( 'Blob', 'slice', start, end );\n    \n                return new Blob( this.getRuid(), blob );\n            }\n        });\n    });\n    /**\n     * @fileOverview 没有图像处理的版本。\n     */\n    define('preset/withoutimage',[\n        'base',\n    \n        // widgets\n        'widgets/filednd',\n        'widgets/filepaste',\n        'widgets/filepicker',\n        'widgets/queue',\n        'widgets/runtime',\n        'widgets/upload',\n        'widgets/validator',\n    \n        // runtimes\n        // html5\n        'runtime/html5/blob',\n        'runtime/html5/dnd',\n        'runtime/html5/filepaste',\n        'runtime/html5/filepicker',\n        'runtime/html5/transport',\n    \n        // flash\n        'runtime/flash/filepicker',\n        'runtime/flash/transport',\n        'runtime/flash/blob'\n    ], function( Base ) {\n        return Base;\n    });\n    define('webuploader',[\n        'preset/withoutimage'\n    ], function( preset ) {\n        return preset;\n    });\n    return require('webuploader');\n});\n"
  },
  {
    "path": "static/webuploader/webuploader.nolog.js",
    "content": "/*! WebUploader 0.1.6 */\n\n\n/**\n * @fileOverview 让内部各个部件的代码可以用[amd](https://github.com/amdjs/amdjs-api/wiki/AMD)模块定义方式组织起来。\n *\n * AMD API 内部的简单不完全实现，请忽略。只有当WebUploader被合并成一个文件的时候才会引入。\n */\n(function( root, factory ) {\n    var modules = {},\n\n        // 内部require, 简单不完全实现。\n        // https://github.com/amdjs/amdjs-api/wiki/require\n        _require = function( deps, callback ) {\n            var args, len, i;\n\n            // 如果deps不是数组，则直接返回指定module\n            if ( typeof deps === 'string' ) {\n                return getModule( deps );\n            } else {\n                args = [];\n                for( len = deps.length, i = 0; i < len; i++ ) {\n                    args.push( getModule( deps[ i ] ) );\n                }\n\n                return callback.apply( null, args );\n            }\n        },\n\n        // 内部define，暂时不支持不指定id.\n        _define = function( id, deps, factory ) {\n            if ( arguments.length === 2 ) {\n                factory = deps;\n                deps = null;\n            }\n\n            _require( deps || [], function() {\n                setModule( id, factory, arguments );\n            });\n        },\n\n        // 设置module, 兼容CommonJs写法。\n        setModule = function( id, factory, args ) {\n            var module = {\n                    exports: factory\n                },\n                returned;\n\n            if ( typeof factory === 'function' ) {\n                args.length || (args = [ _require, module.exports, module ]);\n                returned = factory.apply( null, args );\n                returned !== undefined && (module.exports = returned);\n            }\n\n            modules[ id ] = module.exports;\n        },\n\n        // 根据id获取module\n        getModule = function( id ) {\n            var module = modules[ id ] || root[ id ];\n\n            if ( !module ) {\n                throw new Error( '`' + id + '` is undefined' );\n            }\n\n            return module;\n        },\n\n        // 将所有modules，将路径ids装换成对象。\n        exportsTo = function( obj ) {\n            var key, host, parts, part, last, ucFirst;\n\n            // make the first character upper case.\n            ucFirst = function( str ) {\n                return str && (str.charAt( 0 ).toUpperCase() + str.substr( 1 ));\n            };\n\n            for ( key in modules ) {\n                host = obj;\n\n                if ( !modules.hasOwnProperty( key ) ) {\n                    continue;\n                }\n\n                parts = key.split('/');\n                last = ucFirst( parts.pop() );\n\n                while( (part = ucFirst( parts.shift() )) ) {\n                    host[ part ] = host[ part ] || {};\n                    host = host[ part ];\n                }\n\n                host[ last ] = modules[ key ];\n            }\n\n            return obj;\n        },\n\n        makeExport = function( dollar ) {\n            root.__dollar = dollar;\n\n            // exports every module.\n            return exportsTo( factory( root, _define, _require ) );\n        },\n\n        origin;\n\n    if ( typeof module === 'object' && typeof module.exports === 'object' ) {\n\n        // For CommonJS and CommonJS-like environments where a proper window is present,\n        module.exports = makeExport();\n    } else if ( typeof define === 'function' && define.amd ) {\n\n        // Allow using this built library as an AMD module\n        // in another project. That other project will only\n        // see this AMD call, not the internal modules in\n        // the closure below.\n        define([ 'jquery' ], makeExport );\n    } else {\n\n        // Browser globals case. Just assign the\n        // result to a property on the global.\n        origin = root.WebUploader;\n        root.WebUploader = makeExport();\n        root.WebUploader.noConflict = function() {\n            root.WebUploader = origin;\n        };\n    }\n})( window, function( window, define, require ) {\n\n\n    /**\n     * @fileOverview jQuery or Zepto\n     * @require \"jquery\"\n     * @require \"zepto\"\n     */\n    define('dollar-third',[],function() {\n        var req = window.require;\n        var $ = window.__dollar || \n            window.jQuery || \n            window.Zepto || \n            req('jquery') || \n            req('zepto');\n    \n        if ( !$ ) {\n            throw new Error('jQuery or Zepto not found!');\n        }\n    \n        return $;\n    });\n    \n    /**\n     * @fileOverview Dom 操作相关\n     */\n    define('dollar',[\n        'dollar-third'\n    ], function( _ ) {\n        return _;\n    });\n    /**\n     * @fileOverview 使用jQuery的Promise\n     */\n    define('promise-third',[\n        'dollar'\n    ], function( $ ) {\n        return {\n            Deferred: $.Deferred,\n            when: $.when,\n    \n            isPromise: function( anything ) {\n                return anything && typeof anything.then === 'function';\n            }\n        };\n    });\n    /**\n     * @fileOverview Promise/A+\n     */\n    define('promise',[\n        'promise-third'\n    ], function( _ ) {\n        return _;\n    });\n    /**\n     * @fileOverview 基础类方法。\n     */\n    \n    /**\n     * Web Uploader内部类的详细说明，以下提及的功能类，都可以在`WebUploader`这个变量中访问到。\n     *\n     * As you know, Web Uploader的每个文件都是用过[AMD](https://github.com/amdjs/amdjs-api/wiki/AMD)规范中的`define`组织起来的, 每个Module都会有个module id.\n     * 默认module id为该文件的路径，而此路径将会转化成名字空间存放在WebUploader中。如：\n     *\n     * * module `base`：WebUploader.Base\n     * * module `file`: WebUploader.File\n     * * module `lib/dnd`: WebUploader.Lib.Dnd\n     * * module `runtime/html5/dnd`: WebUploader.Runtime.Html5.Dnd\n     *\n     *\n     * 以下文档中对类的使用可能省略掉了`WebUploader`前缀。\n     * @module WebUploader\n     * @title WebUploader API文档\n     */\n    define('base',[\n        'dollar',\n        'promise'\n    ], function( $, promise ) {\n    \n        var noop = function() {},\n            call = Function.call;\n    \n        // http://jsperf.com/uncurrythis\n        // 反科里化\n        function uncurryThis( fn ) {\n            return function() {\n                return call.apply( fn, arguments );\n            };\n        }\n    \n        function bindFn( fn, context ) {\n            return function() {\n                return fn.apply( context, arguments );\n            };\n        }\n    \n        function createObject( proto ) {\n            var f;\n    \n            if ( Object.create ) {\n                return Object.create( proto );\n            } else {\n                f = function() {};\n                f.prototype = proto;\n                return new f();\n            }\n        }\n    \n    \n        /**\n         * 基础类，提供一些简单常用的方法。\n         * @class Base\n         */\n        return {\n    \n            /**\n             * @property {String} version 当前版本号。\n             */\n            version: '0.1.6',\n    \n            /**\n             * @property {jQuery|Zepto} $ 引用依赖的jQuery或者Zepto对象。\n             */\n            $: $,\n    \n            Deferred: promise.Deferred,\n    \n            isPromise: promise.isPromise,\n    \n            when: promise.when,\n    \n            /**\n             * @description  简单的浏览器检查结果。\n             *\n             * * `webkit`  webkit版本号，如果浏览器为非webkit内核，此属性为`undefined`。\n             * * `chrome`  chrome浏览器版本号，如果浏览器为chrome，此属性为`undefined`。\n             * * `ie`  ie浏览器版本号，如果浏览器为非ie，此属性为`undefined`。**暂不支持ie10+**\n             * * `firefox`  firefox浏览器版本号，如果浏览器为非firefox，此属性为`undefined`。\n             * * `safari`  safari浏览器版本号，如果浏览器为非safari，此属性为`undefined`。\n             * * `opera`  opera浏览器版本号，如果浏览器为非opera，此属性为`undefined`。\n             *\n             * @property {Object} [browser]\n             */\n            browser: (function( ua ) {\n                var ret = {},\n                    webkit = ua.match( /WebKit\\/([\\d.]+)/ ),\n                    chrome = ua.match( /Chrome\\/([\\d.]+)/ ) ||\n                        ua.match( /CriOS\\/([\\d.]+)/ ),\n    \n                    ie = ua.match( /MSIE\\s([\\d\\.]+)/ ) ||\n                        ua.match( /(?:trident)(?:.*rv:([\\w.]+))?/i ),\n                    firefox = ua.match( /Firefox\\/([\\d.]+)/ ),\n                    safari = ua.match( /Safari\\/([\\d.]+)/ ),\n                    opera = ua.match( /OPR\\/([\\d.]+)/ );\n    \n                webkit && (ret.webkit = parseFloat( webkit[ 1 ] ));\n                chrome && (ret.chrome = parseFloat( chrome[ 1 ] ));\n                ie && (ret.ie = parseFloat( ie[ 1 ] ));\n                firefox && (ret.firefox = parseFloat( firefox[ 1 ] ));\n                safari && (ret.safari = parseFloat( safari[ 1 ] ));\n                opera && (ret.opera = parseFloat( opera[ 1 ] ));\n    \n                return ret;\n            })( navigator.userAgent ),\n    \n            /**\n             * @description  操作系统检查结果。\n             *\n             * * `android`  如果在android浏览器环境下，此值为对应的android版本号，否则为`undefined`。\n             * * `ios` 如果在ios浏览器环境下，此值为对应的ios版本号，否则为`undefined`。\n             * @property {Object} [os]\n             */\n            os: (function( ua ) {\n                var ret = {},\n    \n                    // osx = !!ua.match( /\\(Macintosh\\; Intel / ),\n                    android = ua.match( /(?:Android);?[\\s\\/]+([\\d.]+)?/ ),\n                    ios = ua.match( /(?:iPad|iPod|iPhone).*OS\\s([\\d_]+)/ );\n    \n                // osx && (ret.osx = true);\n                android && (ret.android = parseFloat( android[ 1 ] ));\n                ios && (ret.ios = parseFloat( ios[ 1 ].replace( /_/g, '.' ) ));\n    \n                return ret;\n            })( navigator.userAgent ),\n    \n            /**\n             * 实现类与类之间的继承。\n             * @method inherits\n             * @grammar Base.inherits( super ) => child\n             * @grammar Base.inherits( super, protos ) => child\n             * @grammar Base.inherits( super, protos, statics ) => child\n             * @param  {Class} super 父类\n             * @param  {Object | Function} [protos] 子类或者对象。如果对象中包含constructor，子类将是用此属性值。\n             * @param  {Function} [protos.constructor] 子类构造器，不指定的话将创建个临时的直接执行父类构造器的方法。\n             * @param  {Object} [statics] 静态属性或方法。\n             * @return {Class} 返回子类。\n             * @example\n             * function Person() {\n             *     console.log( 'Super' );\n             * }\n             * Person.prototype.hello = function() {\n             *     console.log( 'hello' );\n             * };\n             *\n             * var Manager = Base.inherits( Person, {\n             *     world: function() {\n             *         console.log( 'World' );\n             *     }\n             * });\n             *\n             * // 因为没有指定构造器，父类的构造器将会执行。\n             * var instance = new Manager();    // => Super\n             *\n             * // 继承子父类的方法\n             * instance.hello();    // => hello\n             * instance.world();    // => World\n             *\n             * // 子类的__super__属性指向父类\n             * console.log( Manager.__super__ === Person );    // => true\n             */\n            inherits: function( Super, protos, staticProtos ) {\n                var child;\n    \n                if ( typeof protos === 'function' ) {\n                    child = protos;\n                    protos = null;\n                } else if ( protos && protos.hasOwnProperty('constructor') ) {\n                    child = protos.constructor;\n                } else {\n                    child = function() {\n                        return Super.apply( this, arguments );\n                    };\n                }\n    \n                // 复制静态方法\n                $.extend( true, child, Super, staticProtos || {} );\n    \n                /* jshint camelcase: false */\n    \n                // 让子类的__super__属性指向父类。\n                child.__super__ = Super.prototype;\n    \n                // 构建原型，添加原型方法或属性。\n                // 暂时用Object.create实现。\n                child.prototype = createObject( Super.prototype );\n                protos && $.extend( true, child.prototype, protos );\n    \n                return child;\n            },\n    \n            /**\n             * 一个不做任何事情的方法。可以用来赋值给默认的callback.\n             * @method noop\n             */\n            noop: noop,\n    \n            /**\n             * 返回一个新的方法，此方法将已指定的`context`来执行。\n             * @grammar Base.bindFn( fn, context ) => Function\n             * @method bindFn\n             * @example\n             * var doSomething = function() {\n             *         console.log( this.name );\n             *     },\n             *     obj = {\n             *         name: 'Object Name'\n             *     },\n             *     aliasFn = Base.bind( doSomething, obj );\n             *\n             *  aliasFn();    // => Object Name\n             *\n             */\n            bindFn: bindFn,\n    \n            /**\n             * 引用Console.log如果存在的话，否则引用一个[空函数noop](#WebUploader:Base.noop)。\n             * @grammar Base.log( args... ) => undefined\n             * @method log\n             */\n            log: (function() {\n                if ( window.console ) {\n                    return bindFn( console.log, console );\n                }\n                return noop;\n            })(),\n    \n            nextTick: (function() {\n    \n                return function( cb ) {\n                    setTimeout( cb, 1 );\n                };\n    \n                // @bug 当浏览器不在当前窗口时就停了。\n                // var next = window.requestAnimationFrame ||\n                //     window.webkitRequestAnimationFrame ||\n                //     window.mozRequestAnimationFrame ||\n                //     function( cb ) {\n                //         window.setTimeout( cb, 1000 / 60 );\n                //     };\n    \n                // // fix: Uncaught TypeError: Illegal invocation\n                // return bindFn( next, window );\n            })(),\n    \n            /**\n             * 被[uncurrythis](http://www.2ality.com/2011/11/uncurrying-this.html)的数组slice方法。\n             * 将用来将非数组对象转化成数组对象。\n             * @grammar Base.slice( target, start[, end] ) => Array\n             * @method slice\n             * @example\n             * function doSomthing() {\n             *     var args = Base.slice( arguments, 1 );\n             *     console.log( args );\n             * }\n             *\n             * doSomthing( 'ignored', 'arg2', 'arg3' );    // => Array [\"arg2\", \"arg3\"]\n             */\n            slice: uncurryThis( [].slice ),\n    \n            /**\n             * 生成唯一的ID\n             * @method guid\n             * @grammar Base.guid() => String\n             * @grammar Base.guid( prefx ) => String\n             */\n            guid: (function() {\n                var counter = 0;\n    \n                return function( prefix ) {\n                    var guid = (+new Date()).toString( 32 ),\n                        i = 0;\n    \n                    for ( ; i < 5; i++ ) {\n                        guid += Math.floor( Math.random() * 65535 ).toString( 32 );\n                    }\n    \n                    return (prefix || 'wu_') + guid + (counter++).toString( 32 );\n                };\n            })(),\n    \n            /**\n             * 格式化文件大小, 输出成带单位的字符串\n             * @method formatSize\n             * @grammar Base.formatSize( size ) => String\n             * @grammar Base.formatSize( size, pointLength ) => String\n             * @grammar Base.formatSize( size, pointLength, units ) => String\n             * @param {Number} size 文件大小\n             * @param {Number} [pointLength=2] 精确到的小数点数。\n             * @param {Array} [units=[ 'B', 'K', 'M', 'G', 'TB' ]] 单位数组。从字节，到千字节，一直往上指定。如果单位数组里面只指定了到了K(千字节)，同时文件大小大于M, 此方法的输出将还是显示成多少K.\n             * @example\n             * console.log( Base.formatSize( 100 ) );    // => 100B\n             * console.log( Base.formatSize( 1024 ) );    // => 1.00K\n             * console.log( Base.formatSize( 1024, 0 ) );    // => 1K\n             * console.log( Base.formatSize( 1024 * 1024 ) );    // => 1.00M\n             * console.log( Base.formatSize( 1024 * 1024 * 1024 ) );    // => 1.00G\n             * console.log( Base.formatSize( 1024 * 1024 * 1024, 0, ['B', 'KB', 'MB'] ) );    // => 1024MB\n             */\n            formatSize: function( size, pointLength, units ) {\n                var unit;\n    \n                units = units || [ 'B', 'K', 'M', 'G', 'TB' ];\n    \n                while ( (unit = units.shift()) && size > 1024 ) {\n                    size = size / 1024;\n                }\n    \n                return (unit === 'B' ? size : size.toFixed( pointLength || 2 )) +\n                        unit;\n            }\n        };\n    });\n    /**\n     * 事件处理类，可以独立使用，也可以扩展给对象使用。\n     * @fileOverview Mediator\n     */\n    define('mediator',[\n        'base'\n    ], function( Base ) {\n        var $ = Base.$,\n            slice = [].slice,\n            separator = /\\s+/,\n            protos;\n    \n        // 根据条件过滤出事件handlers.\n        function findHandlers( arr, name, callback, context ) {\n            return $.grep( arr, function( handler ) {\n                return handler &&\n                        (!name || handler.e === name) &&\n                        (!callback || handler.cb === callback ||\n                        handler.cb._cb === callback) &&\n                        (!context || handler.ctx === context);\n            });\n        }\n    \n        function eachEvent( events, callback, iterator ) {\n            // 不支持对象，只支持多个event用空格隔开\n            $.each( (events || '').split( separator ), function( _, key ) {\n                iterator( key, callback );\n            });\n        }\n    \n        function triggerHanders( events, args ) {\n            var stoped = false,\n                i = -1,\n                len = events.length,\n                handler;\n    \n            while ( ++i < len ) {\n                handler = events[ i ];\n    \n                if ( handler.cb.apply( handler.ctx2, args ) === false ) {\n                    stoped = true;\n                    break;\n                }\n            }\n    \n            return !stoped;\n        }\n    \n        protos = {\n    \n            /**\n             * 绑定事件。\n             *\n             * `callback`方法在执行时，arguments将会来源于trigger的时候携带的参数。如\n             * ```javascript\n             * var obj = {};\n             *\n             * // 使得obj有事件行为\n             * Mediator.installTo( obj );\n             *\n             * obj.on( 'testa', function( arg1, arg2 ) {\n             *     console.log( arg1, arg2 ); // => 'arg1', 'arg2'\n             * });\n             *\n             * obj.trigger( 'testa', 'arg1', 'arg2' );\n             * ```\n             *\n             * 如果`callback`中，某一个方法`return false`了，则后续的其他`callback`都不会被执行到。\n             * 切会影响到`trigger`方法的返回值，为`false`。\n             *\n             * `on`还可以用来添加一个特殊事件`all`, 这样所有的事件触发都会响应到。同时此类`callback`中的arguments有一个不同处，\n             * 就是第一个参数为`type`，记录当前是什么事件在触发。此类`callback`的优先级比脚低，会再正常`callback`执行完后触发。\n             * ```javascript\n             * obj.on( 'all', function( type, arg1, arg2 ) {\n             *     console.log( type, arg1, arg2 ); // => 'testa', 'arg1', 'arg2'\n             * });\n             * ```\n             *\n             * @method on\n             * @grammar on( name, callback[, context] ) => self\n             * @param  {String}   name     事件名，支持多个事件用空格隔开\n             * @param  {Function} callback 事件处理器\n             * @param  {Object}   [context]  事件处理器的上下文。\n             * @return {self} 返回自身，方便链式\n             * @chainable\n             * @class Mediator\n             */\n            on: function( name, callback, context ) {\n                var me = this,\n                    set;\n    \n                if ( !callback ) {\n                    return this;\n                }\n    \n                set = this._events || (this._events = []);\n    \n                eachEvent( name, callback, function( name, callback ) {\n                    var handler = { e: name };\n    \n                    handler.cb = callback;\n                    handler.ctx = context;\n                    handler.ctx2 = context || me;\n                    handler.id = set.length;\n    \n                    set.push( handler );\n                });\n    \n                return this;\n            },\n    \n            /**\n             * 绑定事件，且当handler执行完后，自动解除绑定。\n             * @method once\n             * @grammar once( name, callback[, context] ) => self\n             * @param  {String}   name     事件名\n             * @param  {Function} callback 事件处理器\n             * @param  {Object}   [context]  事件处理器的上下文。\n             * @return {self} 返回自身，方便链式\n             * @chainable\n             */\n            once: function( name, callback, context ) {\n                var me = this;\n    \n                if ( !callback ) {\n                    return me;\n                }\n    \n                eachEvent( name, callback, function( name, callback ) {\n                    var once = function() {\n                            me.off( name, once );\n                            return callback.apply( context || me, arguments );\n                        };\n    \n                    once._cb = callback;\n                    me.on( name, once, context );\n                });\n    \n                return me;\n            },\n    \n            /**\n             * 解除事件绑定\n             * @method off\n             * @grammar off( [name[, callback[, context] ] ] ) => self\n             * @param  {String}   [name]     事件名\n             * @param  {Function} [callback] 事件处理器\n             * @param  {Object}   [context]  事件处理器的上下文。\n             * @return {self} 返回自身，方便链式\n             * @chainable\n             */\n            off: function( name, cb, ctx ) {\n                var events = this._events;\n    \n                if ( !events ) {\n                    return this;\n                }\n    \n                if ( !name && !cb && !ctx ) {\n                    this._events = [];\n                    return this;\n                }\n    \n                eachEvent( name, cb, function( name, cb ) {\n                    $.each( findHandlers( events, name, cb, ctx ), function() {\n                        delete events[ this.id ];\n                    });\n                });\n    \n                return this;\n            },\n    \n            /**\n             * 触发事件\n             * @method trigger\n             * @grammar trigger( name[, args...] ) => self\n             * @param  {String}   type     事件名\n             * @param  {*} [...] 任意参数\n             * @return {Boolean} 如果handler中return false了，则返回false, 否则返回true\n             */\n            trigger: function( type ) {\n                var args, events, allEvents;\n    \n                if ( !this._events || !type ) {\n                    return this;\n                }\n    \n                args = slice.call( arguments, 1 );\n                events = findHandlers( this._events, type );\n                allEvents = findHandlers( this._events, 'all' );\n    \n                return triggerHanders( events, args ) &&\n                        triggerHanders( allEvents, arguments );\n            }\n        };\n    \n        /**\n         * 中介者，它本身是个单例，但可以通过[installTo](#WebUploader:Mediator:installTo)方法，使任何对象具备事件行为。\n         * 主要目的是负责模块与模块之间的合作，降低耦合度。\n         *\n         * @class Mediator\n         */\n        return $.extend({\n    \n            /**\n             * 可以通过这个接口，使任何对象具备事件功能。\n             * @method installTo\n             * @param  {Object} obj 需要具备事件行为的对象。\n             * @return {Object} 返回obj.\n             */\n            installTo: function( obj ) {\n                return $.extend( obj, protos );\n            }\n    \n        }, protos );\n    });\n    /**\n     * @fileOverview Uploader上传类\n     */\n    define('uploader',[\n        'base',\n        'mediator'\n    ], function( Base, Mediator ) {\n    \n        var $ = Base.$;\n    \n        /**\n         * 上传入口类。\n         * @class Uploader\n         * @constructor\n         * @grammar new Uploader( opts ) => Uploader\n         * @example\n         * var uploader = WebUploader.Uploader({\n         *     swf: 'path_of_swf/Uploader.swf',\n         *\n         *     // 开起分片上传。\n         *     chunked: true\n         * });\n         */\n        function Uploader( opts ) {\n            this.options = $.extend( true, {}, Uploader.options, opts );\n            this._init( this.options );\n        }\n    \n        // default Options\n        // widgets中有相应扩展\n        Uploader.options = {};\n        Mediator.installTo( Uploader.prototype );\n    \n        // 批量添加纯命令式方法。\n        $.each({\n            upload: 'start-upload',\n            stop: 'stop-upload',\n            getFile: 'get-file',\n            getFiles: 'get-files',\n            addFile: 'add-file',\n            addFiles: 'add-file',\n            sort: 'sort-files',\n            removeFile: 'remove-file',\n            cancelFile: 'cancel-file',\n            skipFile: 'skip-file',\n            retry: 'retry',\n            isInProgress: 'is-in-progress',\n            makeThumb: 'make-thumb',\n            md5File: 'md5-file',\n            getDimension: 'get-dimension',\n            addButton: 'add-btn',\n            predictRuntimeType: 'predict-runtime-type',\n            refresh: 'refresh',\n            disable: 'disable',\n            enable: 'enable',\n            reset: 'reset'\n        }, function( fn, command ) {\n            Uploader.prototype[ fn ] = function() {\n                return this.request( command, arguments );\n            };\n        });\n    \n        $.extend( Uploader.prototype, {\n            state: 'pending',\n    \n            _init: function( opts ) {\n                var me = this;\n    \n                me.request( 'init', opts, function() {\n                    me.state = 'ready';\n                    me.trigger('ready');\n                });\n            },\n    \n            /**\n             * 获取或者设置Uploader配置项。\n             * @method option\n             * @grammar option( key ) => *\n             * @grammar option( key, val ) => self\n             * @example\n             *\n             * // 初始状态图片上传前不会压缩\n             * var uploader = new WebUploader.Uploader({\n             *     compress: null;\n             * });\n             *\n             * // 修改后图片上传前，尝试将图片压缩到1600 * 1600\n             * uploader.option( 'compress', {\n             *     width: 1600,\n             *     height: 1600\n             * });\n             */\n            option: function( key, val ) {\n                var opts = this.options;\n    \n                // setter\n                if ( arguments.length > 1 ) {\n    \n                    if ( $.isPlainObject( val ) &&\n                            $.isPlainObject( opts[ key ] ) ) {\n                        $.extend( opts[ key ], val );\n                    } else {\n                        opts[ key ] = val;\n                    }\n    \n                } else {    // getter\n                    return key ? opts[ key ] : opts;\n                }\n            },\n    \n            /**\n             * 获取文件统计信息。返回一个包含一下信息的对象。\n             * * `successNum` 上传成功的文件数\n             * * `progressNum` 上传中的文件数\n             * * `cancelNum` 被删除的文件数\n             * * `invalidNum` 无效的文件数\n             * * `uploadFailNum` 上传失败的文件数\n             * * `queueNum` 还在队列中的文件数\n             * * `interruptNum` 被暂停的文件数\n             * @method getStats\n             * @grammar getStats() => Object\n             */\n            getStats: function() {\n                // return this._mgr.getStats.apply( this._mgr, arguments );\n                var stats = this.request('get-stats');\n    \n                return stats ? {\n                    successNum: stats.numOfSuccess,\n                    progressNum: stats.numOfProgress,\n    \n                    // who care?\n                    // queueFailNum: 0,\n                    cancelNum: stats.numOfCancel,\n                    invalidNum: stats.numOfInvalid,\n                    uploadFailNum: stats.numOfUploadFailed,\n                    queueNum: stats.numOfQueue,\n                    interruptNum: stats.numofInterrupt\n                } : {};\n            },\n    \n            // 需要重写此方法来来支持opts.onEvent和instance.onEvent的处理器\n            trigger: function( type/*, args...*/ ) {\n                var args = [].slice.call( arguments, 1 ),\n                    opts = this.options,\n                    name = 'on' + type.substring( 0, 1 ).toUpperCase() +\n                        type.substring( 1 );\n    \n                if (\n                        // 调用通过on方法注册的handler.\n                        Mediator.trigger.apply( this, arguments ) === false ||\n    \n                        // 调用opts.onEvent\n                        $.isFunction( opts[ name ] ) &&\n                        opts[ name ].apply( this, args ) === false ||\n    \n                        // 调用this.onEvent\n                        $.isFunction( this[ name ] ) &&\n                        this[ name ].apply( this, args ) === false ||\n    \n                        // 广播所有uploader的事件。\n                        Mediator.trigger.apply( Mediator,\n                        [ this, type ].concat( args ) ) === false ) {\n    \n                    return false;\n                }\n    \n                return true;\n            },\n    \n            /**\n             * 销毁 webuploader 实例\n             * @method destroy\n             * @grammar destroy() => undefined\n             */\n            destroy: function() {\n                this.request( 'destroy', arguments );\n                this.off();\n            },\n    \n            // widgets/widget.js将补充此方法的详细文档。\n            request: Base.noop\n        });\n    \n        /**\n         * 创建Uploader实例，等同于new Uploader( opts );\n         * @method create\n         * @class Base\n         * @static\n         * @grammar Base.create( opts ) => Uploader\n         */\n        Base.create = Uploader.create = function( opts ) {\n            return new Uploader( opts );\n        };\n    \n        // 暴露Uploader，可以通过它来扩展业务逻辑。\n        Base.Uploader = Uploader;\n    \n        return Uploader;\n    });\n    /**\n     * @fileOverview Runtime管理器，负责Runtime的选择, 连接\n     */\n    define('runtime/runtime',[\n        'base',\n        'mediator'\n    ], function( Base, Mediator ) {\n    \n        var $ = Base.$,\n            factories = {},\n    \n            // 获取对象的第一个key\n            getFirstKey = function( obj ) {\n                for ( var key in obj ) {\n                    if ( obj.hasOwnProperty( key ) ) {\n                        return key;\n                    }\n                }\n                return null;\n            };\n    \n        // 接口类。\n        function Runtime( options ) {\n            this.options = $.extend({\n                container: document.body\n            }, options );\n            this.uid = Base.guid('rt_');\n        }\n    \n        $.extend( Runtime.prototype, {\n    \n            getContainer: function() {\n                var opts = this.options,\n                    parent, container;\n    \n                if ( this._container ) {\n                    return this._container;\n                }\n    \n                parent = $( opts.container || document.body );\n                container = $( document.createElement('div') );\n    \n                container.attr( 'id', 'rt_' + this.uid );\n                container.css({\n                    position: 'absolute',\n                    top: '0px',\n                    left: '0px',\n                    width: '1px',\n                    height: '1px',\n                    overflow: 'hidden'\n                });\n    \n                parent.append( container );\n                parent.addClass('webuploader-container');\n                this._container = container;\n                this._parent = parent;\n                return container;\n            },\n    \n            init: Base.noop,\n            exec: Base.noop,\n    \n            destroy: function() {\n                this._container && this._container.remove();\n                this._parent && this._parent.removeClass('webuploader-container');\n                this.off();\n            }\n        });\n    \n        Runtime.orders = 'html5,flash';\n    \n    \n        /**\n         * 添加Runtime实现。\n         * @param {String} type    类型\n         * @param {Runtime} factory 具体Runtime实现。\n         */\n        Runtime.addRuntime = function( type, factory ) {\n            factories[ type ] = factory;\n        };\n    \n        Runtime.hasRuntime = function( type ) {\n            return !!(type ? factories[ type ] : getFirstKey( factories ));\n        };\n    \n        Runtime.create = function( opts, orders ) {\n            var type, runtime;\n    \n            orders = orders || Runtime.orders;\n            $.each( orders.split( /\\s*,\\s*/g ), function() {\n                if ( factories[ this ] ) {\n                    type = this;\n                    return false;\n                }\n            });\n    \n            type = type || getFirstKey( factories );\n    \n            if ( !type ) {\n                throw new Error('Runtime Error');\n            }\n    \n            runtime = new factories[ type ]( opts );\n            return runtime;\n        };\n    \n        Mediator.installTo( Runtime.prototype );\n        return Runtime;\n    });\n    \n    /**\n     * @fileOverview Runtime管理器，负责Runtime的选择, 连接\n     */\n    define('runtime/client',[\n        'base',\n        'mediator',\n        'runtime/runtime'\n    ], function( Base, Mediator, Runtime ) {\n    \n        var cache;\n    \n        cache = (function() {\n            var obj = {};\n    \n            return {\n                add: function( runtime ) {\n                    obj[ runtime.uid ] = runtime;\n                },\n    \n                get: function( ruid, standalone ) {\n                    var i;\n    \n                    if ( ruid ) {\n                        return obj[ ruid ];\n                    }\n    \n                    for ( i in obj ) {\n                        // 有些类型不能重用，比如filepicker.\n                        if ( standalone && obj[ i ].__standalone ) {\n                            continue;\n                        }\n    \n                        return obj[ i ];\n                    }\n    \n                    return null;\n                },\n    \n                remove: function( runtime ) {\n                    delete obj[ runtime.uid ];\n                }\n            };\n        })();\n    \n        function RuntimeClient( component, standalone ) {\n            var deferred = Base.Deferred(),\n                runtime;\n    \n            this.uid = Base.guid('client_');\n    \n            // 允许runtime没有初始化之前，注册一些方法在初始化后执行。\n            this.runtimeReady = function( cb ) {\n                return deferred.done( cb );\n            };\n    \n            this.connectRuntime = function( opts, cb ) {\n    \n                // already connected.\n                if ( runtime ) {\n                    throw new Error('already connected!');\n                }\n    \n                deferred.done( cb );\n    \n                if ( typeof opts === 'string' && cache.get( opts ) ) {\n                    runtime = cache.get( opts );\n                }\n    \n                // 像filePicker只能独立存在，不能公用。\n                runtime = runtime || cache.get( null, standalone );\n    \n                // 需要创建\n                if ( !runtime ) {\n                    runtime = Runtime.create( opts, opts.runtimeOrder );\n                    runtime.__promise = deferred.promise();\n                    runtime.once( 'ready', deferred.resolve );\n                    runtime.init();\n                    cache.add( runtime );\n                    runtime.__client = 1;\n                } else {\n                    // 来自cache\n                    Base.$.extend( runtime.options, opts );\n                    runtime.__promise.then( deferred.resolve );\n                    runtime.__client++;\n                }\n    \n                standalone && (runtime.__standalone = standalone);\n                return runtime;\n            };\n    \n            this.getRuntime = function() {\n                return runtime;\n            };\n    \n            this.disconnectRuntime = function() {\n                if ( !runtime ) {\n                    return;\n                }\n    \n                runtime.__client--;\n    \n                if ( runtime.__client <= 0 ) {\n                    cache.remove( runtime );\n                    delete runtime.__promise;\n                    runtime.destroy();\n                }\n    \n                runtime = null;\n            };\n    \n            this.exec = function() {\n                if ( !runtime ) {\n                    return;\n                }\n    \n                var args = Base.slice( arguments );\n                component && args.unshift( component );\n    \n                return runtime.exec.apply( this, args );\n            };\n    \n            this.getRuid = function() {\n                return runtime && runtime.uid;\n            };\n    \n            this.destroy = (function( destroy ) {\n                return function() {\n                    destroy && destroy.apply( this, arguments );\n                    this.trigger('destroy');\n                    this.off();\n                    this.exec('destroy');\n                    this.disconnectRuntime();\n                };\n            })( this.destroy );\n        }\n    \n        Mediator.installTo( RuntimeClient.prototype );\n        return RuntimeClient;\n    });\n    /**\n     * @fileOverview 错误信息\n     */\n    define('lib/dnd',[\n        'base',\n        'mediator',\n        'runtime/client'\n    ], function( Base, Mediator, RuntimeClent ) {\n    \n        var $ = Base.$;\n    \n        function DragAndDrop( opts ) {\n            opts = this.options = $.extend({}, DragAndDrop.options, opts );\n    \n            opts.container = $( opts.container );\n    \n            if ( !opts.container.length ) {\n                return;\n            }\n    \n            RuntimeClent.call( this, 'DragAndDrop' );\n        }\n    \n        DragAndDrop.options = {\n            accept: null,\n            disableGlobalDnd: false\n        };\n    \n        Base.inherits( RuntimeClent, {\n            constructor: DragAndDrop,\n    \n            init: function() {\n                var me = this;\n    \n                me.connectRuntime( me.options, function() {\n                    me.exec('init');\n                    me.trigger('ready');\n                });\n            }\n        });\n    \n        Mediator.installTo( DragAndDrop.prototype );\n    \n        return DragAndDrop;\n    });\n    /**\n     * @fileOverview 组件基类。\n     */\n    define('widgets/widget',[\n        'base',\n        'uploader'\n    ], function( Base, Uploader ) {\n    \n        var $ = Base.$,\n            _init = Uploader.prototype._init,\n            _destroy = Uploader.prototype.destroy,\n            IGNORE = {},\n            widgetClass = [];\n    \n        function isArrayLike( obj ) {\n            if ( !obj ) {\n                return false;\n            }\n    \n            var length = obj.length,\n                type = $.type( obj );\n    \n            if ( obj.nodeType === 1 && length ) {\n                return true;\n            }\n    \n            return type === 'array' || type !== 'function' && type !== 'string' &&\n                    (length === 0 || typeof length === 'number' && length > 0 &&\n                    (length - 1) in obj);\n        }\n    \n        function Widget( uploader ) {\n            this.owner = uploader;\n            this.options = uploader.options;\n        }\n    \n        $.extend( Widget.prototype, {\n    \n            init: Base.noop,\n    \n            // 类Backbone的事件监听声明，监听uploader实例上的事件\n            // widget直接无法监听事件，事件只能通过uploader来传递\n            invoke: function( apiName, args ) {\n    \n                /*\n                    {\n                        'make-thumb': 'makeThumb'\n                    }\n                 */\n                var map = this.responseMap;\n    \n                // 如果无API响应声明则忽略\n                if ( !map || !(apiName in map) || !(map[ apiName ] in this) ||\n                        !$.isFunction( this[ map[ apiName ] ] ) ) {\n    \n                    return IGNORE;\n                }\n    \n                return this[ map[ apiName ] ].apply( this, args );\n    \n            },\n    \n            /**\n             * 发送命令。当传入`callback`或者`handler`中返回`promise`时。返回一个当所有`handler`中的promise都完成后完成的新`promise`。\n             * @method request\n             * @grammar request( command, args ) => * | Promise\n             * @grammar request( command, args, callback ) => Promise\n             * @for  Uploader\n             */\n            request: function() {\n                return this.owner.request.apply( this.owner, arguments );\n            }\n        });\n    \n        // 扩展Uploader.\n        $.extend( Uploader.prototype, {\n    \n            /**\n             * @property {String | Array} [disableWidgets=undefined]\n             * @namespace options\n             * @for Uploader\n             * @description 默认所有 Uploader.register 了的 widget 都会被加载，如果禁用某一部分，请通过此 option 指定黑名单。\n             */\n    \n            // 覆写_init用来初始化widgets\n            _init: function() {\n                var me = this,\n                    widgets = me._widgets = [],\n                    deactives = me.options.disableWidgets || '';\n    \n                $.each( widgetClass, function( _, klass ) {\n                    (!deactives || !~deactives.indexOf( klass._name )) &&\n                        widgets.push( new klass( me ) );\n                });\n    \n                return _init.apply( me, arguments );\n            },\n    \n            request: function( apiName, args, callback ) {\n                var i = 0,\n                    widgets = this._widgets,\n                    len = widgets && widgets.length,\n                    rlts = [],\n                    dfds = [],\n                    widget, rlt, promise, key;\n    \n                args = isArrayLike( args ) ? args : [ args ];\n    \n                for ( ; i < len; i++ ) {\n                    widget = widgets[ i ];\n                    rlt = widget.invoke( apiName, args );\n    \n                    if ( rlt !== IGNORE ) {\n    \n                        // Deferred对象\n                        if ( Base.isPromise( rlt ) ) {\n                            dfds.push( rlt );\n                        } else {\n                            rlts.push( rlt );\n                        }\n                    }\n                }\n    \n                // 如果有callback，则用异步方式。\n                if ( callback || dfds.length ) {\n                    promise = Base.when.apply( Base, dfds );\n                    key = promise.pipe ? 'pipe' : 'then';\n    \n                    // 很重要不能删除。删除了会死循环。\n                    // 保证执行顺序。让callback总是在下一个 tick 中执行。\n                    return promise[ key ](function() {\n                                var deferred = Base.Deferred(),\n                                    args = arguments;\n    \n                                if ( args.length === 1 ) {\n                                    args = args[ 0 ];\n                                }\n    \n                                setTimeout(function() {\n                                    deferred.resolve( args );\n                                }, 1 );\n    \n                                return deferred.promise();\n                            })[ callback ? key : 'done' ]( callback || Base.noop );\n                } else {\n                    return rlts[ 0 ];\n                }\n            },\n    \n            destroy: function() {\n                _destroy.apply( this, arguments );\n                this._widgets = null;\n            }\n        });\n    \n        /**\n         * 添加组件\n         * @grammar Uploader.register(proto);\n         * @grammar Uploader.register(map, proto);\n         * @param  {object} responseMap API 名称与函数实现的映射\n         * @param  {object} proto 组件原型，构造函数通过 constructor 属性定义\n         * @method Uploader.register\n         * @for Uploader\n         * @example\n         * Uploader.register({\n         *     'make-thumb': 'makeThumb'\n         * }, {\n         *     init: function( options ) {},\n         *     makeThumb: function() {}\n         * });\n         *\n         * Uploader.register({\n         *     'make-thumb': function() {\n         *         \n         *     }\n         * });\n         */\n        Uploader.register = Widget.register = function( responseMap, widgetProto ) {\n            var map = { init: 'init', destroy: 'destroy', name: 'anonymous' },\n                klass;\n    \n            if ( arguments.length === 1 ) {\n                widgetProto = responseMap;\n    \n                // 自动生成 map 表。\n                $.each(widgetProto, function(key) {\n                    if ( key[0] === '_' || key === 'name' ) {\n                        key === 'name' && (map.name = widgetProto.name);\n                        return;\n                    }\n    \n                    map[key.replace(/[A-Z]/g, '-$&').toLowerCase()] = key;\n                });\n    \n            } else {\n                map = $.extend( map, responseMap );\n            }\n    \n            widgetProto.responseMap = map;\n            klass = Base.inherits( Widget, widgetProto );\n            klass._name = map.name;\n            widgetClass.push( klass );\n    \n            return klass;\n        };\n    \n        /**\n         * 删除插件，只有在注册时指定了名字的才能被删除。\n         * @grammar Uploader.unRegister(name);\n         * @param  {string} name 组件名字\n         * @method Uploader.unRegister\n         * @for Uploader\n         * @example\n         *\n         * Uploader.register({\n         *     name: 'custom',\n         *     \n         *     'make-thumb': function() {\n         *         \n         *     }\n         * });\n         *\n         * Uploader.unRegister('custom');\n         */\n        Uploader.unRegister = Widget.unRegister = function( name ) {\n            if ( !name || name === 'anonymous' ) {\n                return;\n            }\n            \n            // 删除指定的插件。\n            for ( var i = widgetClass.length; i--; ) {\n                if ( widgetClass[i]._name === name ) {\n                    widgetClass.splice(i, 1)\n                }\n            }\n        };\n    \n        return Widget;\n    });\n    /**\n     * @fileOverview DragAndDrop Widget。\n     */\n    define('widgets/filednd',[\n        'base',\n        'uploader',\n        'lib/dnd',\n        'widgets/widget'\n    ], function( Base, Uploader, Dnd ) {\n        var $ = Base.$;\n    \n        Uploader.options.dnd = '';\n    \n        /**\n         * @property {Selector} [dnd=undefined]  指定Drag And Drop拖拽的容器，如果不指定，则不启动。\n         * @namespace options\n         * @for Uploader\n         */\n        \n        /**\n         * @property {Selector} [disableGlobalDnd=false]  是否禁掉整个页面的拖拽功能，如果不禁用，图片拖进来的时候会默认被浏览器打开。\n         * @namespace options\n         * @for Uploader\n         */\n    \n        /**\n         * @event dndAccept\n         * @param {DataTransferItemList} items DataTransferItem\n         * @description 阻止此事件可以拒绝某些类型的文件拖入进来。目前只有 chrome 提供这样的 API，且只能通过 mime-type 验证。\n         * @for  Uploader\n         */\n        return Uploader.register({\n            name: 'dnd',\n            \n            init: function( opts ) {\n    \n                if ( !opts.dnd ||\n                        this.request('predict-runtime-type') !== 'html5' ) {\n                    return;\n                }\n    \n                var me = this,\n                    deferred = Base.Deferred(),\n                    options = $.extend({}, {\n                        disableGlobalDnd: opts.disableGlobalDnd,\n                        container: opts.dnd,\n                        accept: opts.accept\n                    }),\n                    dnd;\n    \n                this.dnd = dnd = new Dnd( options );\n    \n                dnd.once( 'ready', deferred.resolve );\n                dnd.on( 'drop', function( files ) {\n                    me.request( 'add-file', [ files ]);\n                });\n    \n                // 检测文件是否全部允许添加。\n                dnd.on( 'accept', function( items ) {\n                    return me.owner.trigger( 'dndAccept', items );\n                });\n    \n                dnd.init();\n    \n                return deferred.promise();\n            },\n    \n            destroy: function() {\n                this.dnd && this.dnd.destroy();\n            }\n        });\n    });\n    \n    /**\n     * @fileOverview 错误信息\n     */\n    define('lib/filepaste',[\n        'base',\n        'mediator',\n        'runtime/client'\n    ], function( Base, Mediator, RuntimeClent ) {\n    \n        var $ = Base.$;\n    \n        function FilePaste( opts ) {\n            opts = this.options = $.extend({}, opts );\n            opts.container = $( opts.container || document.body );\n            RuntimeClent.call( this, 'FilePaste' );\n        }\n    \n        Base.inherits( RuntimeClent, {\n            constructor: FilePaste,\n    \n            init: function() {\n                var me = this;\n    \n                me.connectRuntime( me.options, function() {\n                    me.exec('init');\n                    me.trigger('ready');\n                });\n            }\n        });\n    \n        Mediator.installTo( FilePaste.prototype );\n    \n        return FilePaste;\n    });\n    /**\n     * @fileOverview 组件基类。\n     */\n    define('widgets/filepaste',[\n        'base',\n        'uploader',\n        'lib/filepaste',\n        'widgets/widget'\n    ], function( Base, Uploader, FilePaste ) {\n        var $ = Base.$;\n    \n        /**\n         * @property {Selector} [paste=undefined]  指定监听paste事件的容器，如果不指定，不启用此功能。此功能为通过粘贴来添加截屏的图片。建议设置为`document.body`.\n         * @namespace options\n         * @for Uploader\n         */\n        return Uploader.register({\n            name: 'paste',\n            \n            init: function( opts ) {\n    \n                if ( !opts.paste ||\n                        this.request('predict-runtime-type') !== 'html5' ) {\n                    return;\n                }\n    \n                var me = this,\n                    deferred = Base.Deferred(),\n                    options = $.extend({}, {\n                        container: opts.paste,\n                        accept: opts.accept\n                    }),\n                    paste;\n    \n                this.paste = paste = new FilePaste( options );\n    \n                paste.once( 'ready', deferred.resolve );\n                paste.on( 'paste', function( files ) {\n                    me.owner.request( 'add-file', [ files ]);\n                });\n                paste.init();\n    \n                return deferred.promise();\n            },\n    \n            destroy: function() {\n                this.paste && this.paste.destroy();\n            }\n        });\n    });\n    /**\n     * @fileOverview Blob\n     */\n    define('lib/blob',[\n        'base',\n        'runtime/client'\n    ], function( Base, RuntimeClient ) {\n    \n        function Blob( ruid, source ) {\n            var me = this;\n    \n            me.source = source;\n            me.ruid = ruid;\n            this.size = source.size || 0;\n    \n            // 如果没有指定 mimetype, 但是知道文件后缀。\n            if ( !source.type && this.ext &&\n                    ~'jpg,jpeg,png,gif,bmp'.indexOf( this.ext ) ) {\n                this.type = 'image/' + (this.ext === 'jpg' ? 'jpeg' : this.ext);\n            } else {\n                this.type = source.type || 'application/octet-stream';\n            }\n    \n            RuntimeClient.call( me, 'Blob' );\n            this.uid = source.uid || this.uid;\n    \n            if ( ruid ) {\n                me.connectRuntime( ruid );\n            }\n        }\n    \n        Base.inherits( RuntimeClient, {\n            constructor: Blob,\n    \n            slice: function( start, end ) {\n                return this.exec( 'slice', start, end );\n            },\n    \n            getSource: function() {\n                return this.source;\n            }\n        });\n    \n        return Blob;\n    });\n    /**\n     * 为了统一化Flash的File和HTML5的File而存在。\n     * 以至于要调用Flash里面的File，也可以像调用HTML5版本的File一下。\n     * @fileOverview File\n     */\n    define('lib/file',[\n        'base',\n        'lib/blob'\n    ], function( Base, Blob ) {\n    \n        var uid = 1,\n            rExt = /\\.([^.]+)$/;\n    \n        function File( ruid, file ) {\n            var ext;\n    \n            this.name = file.name || ('untitled' + uid++);\n            ext = rExt.exec( file.name ) ? RegExp.$1.toLowerCase() : '';\n    \n            // todo 支持其他类型文件的转换。\n            // 如果有 mimetype, 但是文件名里面没有找出后缀规律\n            if ( !ext && file.type ) {\n                ext = /\\/(jpg|jpeg|png|gif|bmp)$/i.exec( file.type ) ?\n                        RegExp.$1.toLowerCase() : '';\n                this.name += '.' + ext;\n            }\n    \n            this.ext = ext;\n            this.lastModifiedDate = file.lastModifiedDate ||\n                    (new Date()).toLocaleString();\n    \n            Blob.apply( this, arguments );\n        }\n    \n        return Base.inherits( Blob, File );\n    });\n    \n    /**\n     * @fileOverview 错误信息\n     */\n    define('lib/filepicker',[\n        'base',\n        'runtime/client',\n        'lib/file'\n    ], function( Base, RuntimeClient, File ) {\n    \n        var $ = Base.$;\n    \n        function FilePicker( opts ) {\n            opts = this.options = $.extend({}, FilePicker.options, opts );\n    \n            opts.container = $( opts.id );\n    \n            if ( !opts.container.length ) {\n                throw new Error('按钮指定错误');\n            }\n    \n            opts.innerHTML = opts.innerHTML || opts.label ||\n                    opts.container.html() || '';\n    \n            opts.button = $( opts.button || document.createElement('div') );\n            opts.button.html( opts.innerHTML );\n            opts.container.html( opts.button );\n    \n            RuntimeClient.call( this, 'FilePicker', true );\n        }\n    \n        FilePicker.options = {\n            button: null,\n            container: null,\n            label: null,\n            innerHTML: null,\n            multiple: true,\n            accept: null,\n            name: 'file',\n            style: 'webuploader-pick'   //pick element class attribute, default is \"webuploader-pick\"\n        };\n    \n        Base.inherits( RuntimeClient, {\n            constructor: FilePicker,\n    \n            init: function() {\n                var me = this,\n                    opts = me.options,\n                    button = opts.button,\n                    style = opts.style;\n    \n                if (style)\n                    button.addClass('webuploader-pick');\n    \n                me.on( 'all', function( type ) {\n                    var files;\n    \n                    switch ( type ) {\n                        case 'mouseenter':\n                            if (style)\n                                button.addClass('webuploader-pick-hover');\n                            break;\n    \n                        case 'mouseleave':\n                            if (style)\n                                button.removeClass('webuploader-pick-hover');\n                            break;\n    \n                        case 'change':\n                            files = me.exec('getFiles');\n                            me.trigger( 'select', $.map( files, function( file ) {\n                                file = new File( me.getRuid(), file );\n    \n                                // 记录来源。\n                                file._refer = opts.container;\n                                return file;\n                            }), opts.container );\n                            break;\n                    }\n                });\n    \n                me.connectRuntime( opts, function() {\n                    me.refresh();\n                    me.exec( 'init', opts );\n                    me.trigger('ready');\n                });\n    \n                this._resizeHandler = Base.bindFn( this.refresh, this );\n                $( window ).on( 'resize', this._resizeHandler );\n            },\n    \n            refresh: function() {\n                var shimContainer = this.getRuntime().getContainer(),\n                    button = this.options.button,\n                    width = button.outerWidth ?\n                            button.outerWidth() : button.width(),\n    \n                    height = button.outerHeight ?\n                            button.outerHeight() : button.height(),\n    \n                    pos = button.offset();\n    \n                width && height && shimContainer.css({\n                    bottom: 'auto',\n                    right: 'auto',\n                    width: width + 'px',\n                    height: height + 'px'\n                }).offset( pos );\n            },\n    \n            enable: function() {\n                var btn = this.options.button;\n    \n                btn.removeClass('webuploader-pick-disable');\n                this.refresh();\n            },\n    \n            disable: function() {\n                var btn = this.options.button;\n    \n                this.getRuntime().getContainer().css({\n                    top: '-99999px'\n                });\n    \n                btn.addClass('webuploader-pick-disable');\n            },\n    \n            destroy: function() {\n                var btn = this.options.button;\n                $( window ).off( 'resize', this._resizeHandler );\n                btn.removeClass('webuploader-pick-disable webuploader-pick-hover ' +\n                    'webuploader-pick');\n            }\n        });\n    \n        return FilePicker;\n    });\n    \n    /**\n     * @fileOverview 文件选择相关\n     */\n    define('widgets/filepicker',[\n        'base',\n        'uploader',\n        'lib/filepicker',\n        'widgets/widget'\n    ], function( Base, Uploader, FilePicker ) {\n        var $ = Base.$;\n    \n        $.extend( Uploader.options, {\n    \n            /**\n             * @property {Selector | Object} [pick=undefined]\n             * @namespace options\n             * @for Uploader\n             * @description 指定选择文件的按钮容器，不指定则不创建按钮。\n             *\n             * * `id` {Seletor|dom} 指定选择文件的按钮容器，不指定则不创建按钮。**注意** 这里虽然写的是 id, 但是不是只支持 id, 还支持 class, 或者 dom 节点。\n             * * `label` {String} 请采用 `innerHTML` 代替\n             * * `innerHTML` {String} 指定按钮文字。不指定时优先从指定的容器中看是否自带文字。\n             * * `multiple` {Boolean} 是否开起同时选择多个文件能力。\n             */\n            pick: null,\n    \n            /**\n             * @property {Arroy} [accept=null]\n             * @namespace options\n             * @for Uploader\n             * @description 指定接受哪些类型的文件。 由于目前还有ext转mimeType表，所以这里需要分开指定。\n             *\n             * * `title` {String} 文字描述\n             * * `extensions` {String} 允许的文件后缀，不带点，多个用逗号分割。\n             * * `mimeTypes` {String} 多个用逗号分割。\n             *\n             * 如：\n             *\n             * ```\n             * {\n             *     title: 'Images',\n             *     extensions: 'gif,jpg,jpeg,bmp,png',\n             *     mimeTypes: 'image/*'\n             * }\n             * ```\n             */\n            accept: null/*{\n                title: 'Images',\n                extensions: 'gif,jpg,jpeg,bmp,png',\n                mimeTypes: 'image/*'\n            }*/\n        });\n    \n        return Uploader.register({\n            name: 'picker',\n    \n            init: function( opts ) {\n                this.pickers = [];\n                return opts.pick && this.addBtn( opts.pick );\n            },\n    \n            refresh: function() {\n                $.each( this.pickers, function() {\n                    this.refresh();\n                });\n            },\n    \n            /**\n             * @method addBtn\n             * @for Uploader\n             * @grammar addBtn( pick ) => Promise\n             * @description\n             * 添加文件选择按钮，如果一个按钮不够，需要调用此方法来添加。参数跟[options.pick](#WebUploader:Uploader:options)一致。\n             * @example\n             * uploader.addBtn({\n             *     id: '#btnContainer',\n             *     innerHTML: '选择文件'\n             * });\n             */\n            addBtn: function( pick ) {\n                var me = this,\n                    opts = me.options,\n                    accept = opts.accept,\n                    promises = [];\n    \n                if ( !pick ) {\n                    return;\n                }\n    \n                $.isPlainObject( pick ) || (pick = {\n                    id: pick\n                });\n    \n                $( pick.id ).each(function() {\n                    var options, picker, deferred;\n    \n                    deferred = Base.Deferred();\n    \n                    options = $.extend({}, pick, {\n                        accept: $.isPlainObject( accept ) ? [ accept ] : accept,\n                        swf: opts.swf,\n                        runtimeOrder: opts.runtimeOrder,\n                        id: this\n                    });\n    \n                    picker = new FilePicker( options );\n    \n                    picker.once( 'ready', deferred.resolve );\n                    picker.on( 'select', function( files ) {\n                        me.owner.request( 'add-file', [ files ]);\n                    });\n                    picker.on('dialogopen', function() {\n                        me.owner.trigger('dialogOpen', picker.button);\n                    });\n                    picker.init();\n    \n                    me.pickers.push( picker );\n    \n                    promises.push( deferred.promise() );\n                });\n    \n                return Base.when.apply( Base, promises );\n            },\n    \n            disable: function() {\n                $.each( this.pickers, function() {\n                    this.disable();\n                });\n            },\n    \n            enable: function() {\n                $.each( this.pickers, function() {\n                    this.enable();\n                });\n            },\n    \n            destroy: function() {\n                $.each( this.pickers, function() {\n                    this.destroy();\n                });\n                this.pickers = null;\n            }\n        });\n    });\n    /**\n     * @fileOverview Image\n     */\n    define('lib/image',[\n        'base',\n        'runtime/client',\n        'lib/blob'\n    ], function( Base, RuntimeClient, Blob ) {\n        var $ = Base.$;\n    \n        // 构造器。\n        function Image( opts ) {\n            this.options = $.extend({}, Image.options, opts );\n            RuntimeClient.call( this, 'Image' );\n    \n            this.on( 'load', function() {\n                this._info = this.exec('info');\n                this._meta = this.exec('meta');\n            });\n        }\n    \n        // 默认选项。\n        Image.options = {\n    \n            // 默认的图片处理质量\n            quality: 90,\n    \n            // 是否裁剪\n            crop: false,\n    \n            // 是否保留头部信息\n            preserveHeaders: false,\n    \n            // 是否允许放大。\n            allowMagnify: false\n        };\n    \n        // 继承RuntimeClient.\n        Base.inherits( RuntimeClient, {\n            constructor: Image,\n    \n            info: function( val ) {\n    \n                // setter\n                if ( val ) {\n                    this._info = val;\n                    return this;\n                }\n    \n                // getter\n                return this._info;\n            },\n    \n            meta: function( val ) {\n    \n                // setter\n                if ( val ) {\n                    this._meta = val;\n                    return this;\n                }\n    \n                // getter\n                return this._meta;\n            },\n    \n            loadFromBlob: function( blob ) {\n                var me = this,\n                    ruid = blob.getRuid();\n    \n                this.connectRuntime( ruid, function() {\n                    me.exec( 'init', me.options );\n                    me.exec( 'loadFromBlob', blob );\n                });\n            },\n    \n            resize: function() {\n                var args = Base.slice( arguments );\n                return this.exec.apply( this, [ 'resize' ].concat( args ) );\n            },\n    \n            crop: function() {\n                var args = Base.slice( arguments );\n                return this.exec.apply( this, [ 'crop' ].concat( args ) );\n            },\n    \n            getAsDataUrl: function( type ) {\n                return this.exec( 'getAsDataUrl', type );\n            },\n    \n            getAsBlob: function( type ) {\n                var blob = this.exec( 'getAsBlob', type );\n    \n                return new Blob( this.getRuid(), blob );\n            }\n        });\n    \n        return Image;\n    });\n    /**\n     * @fileOverview 图片操作, 负责预览图片和上传前压缩图片\n     */\n    define('widgets/image',[\n        'base',\n        'uploader',\n        'lib/image',\n        'widgets/widget'\n    ], function( Base, Uploader, Image ) {\n    \n        var $ = Base.$,\n            throttle;\n    \n        // 根据要处理的文件大小来节流，一次不能处理太多，会卡。\n        throttle = (function( max ) {\n            var occupied = 0,\n                waiting = [],\n                tick = function() {\n                    var item;\n    \n                    while ( waiting.length && occupied < max ) {\n                        item = waiting.shift();\n                        occupied += item[ 0 ];\n                        item[ 1 ]();\n                    }\n                };\n    \n            return function( emiter, size, cb ) {\n                waiting.push([ size, cb ]);\n                emiter.once( 'destroy', function() {\n                    occupied -= size;\n                    setTimeout( tick, 1 );\n                });\n                setTimeout( tick, 1 );\n            };\n        })( 5 * 1024 * 1024 );\n    \n        $.extend( Uploader.options, {\n    \n            /**\n             * @property {Object} [thumb]\n             * @namespace options\n             * @for Uploader\n             * @description 配置生成缩略图的选项。\n             *\n             * 默认为：\n             *\n             * ```javascript\n             * {\n             *     width: 110,\n             *     height: 110,\n             *\n             *     // 图片质量，只有type为`image/jpeg`的时候才有效。\n             *     quality: 70,\n             *\n             *     // 是否允许放大，如果想要生成小图的时候不失真，此选项应该设置为false.\n             *     allowMagnify: true,\n             *\n             *     // 是否允许裁剪。\n             *     crop: true,\n             *\n             *     // 为空的话则保留原有图片格式。\n             *     // 否则强制转换成指定的类型。\n             *     type: 'image/jpeg'\n             * }\n             * ```\n             */\n            thumb: {\n                width: 110,\n                height: 110,\n                quality: 70,\n                allowMagnify: true,\n                crop: true,\n                preserveHeaders: false,\n    \n                // 为空的话则保留原有图片格式。\n                // 否则强制转换成指定的类型。\n                // IE 8下面 base64 大小不能超过 32K 否则预览失败，而非 jpeg 编码的图片很可\n                // 能会超过 32k, 所以这里设置成预览的时候都是 image/jpeg\n                type: 'image/jpeg'\n            },\n    \n            /**\n             * @property {Object} [compress]\n             * @namespace options\n             * @for Uploader\n             * @description 配置压缩的图片的选项。如果此选项为`false`, 则图片在上传前不进行压缩。\n             *\n             * 默认为：\n             *\n             * ```javascript\n             * {\n             *     width: 1600,\n             *     height: 1600,\n             *\n             *     // 图片质量，只有type为`image/jpeg`的时候才有效。\n             *     quality: 90,\n             *\n             *     // 是否允许放大，如果想要生成小图的时候不失真，此选项应该设置为false.\n             *     allowMagnify: false,\n             *\n             *     // 是否允许裁剪。\n             *     crop: false,\n             *\n             *     // 是否保留头部meta信息。\n             *     preserveHeaders: true,\n             *\n             *     // 如果发现压缩后文件大小比原来还大，则使用原来图片\n             *     // 此属性可能会影响图片自动纠正功能\n             *     noCompressIfLarger: false,\n             *\n             *     // 单位字节，如果图片大小小于此值，不会采用压缩。\n             *     compressSize: 0\n             * }\n             * ```\n             */\n            compress: {\n                width: 1600,\n                height: 1600,\n                quality: 90,\n                allowMagnify: false,\n                crop: false,\n                preserveHeaders: true\n            }\n        });\n    \n        return Uploader.register({\n    \n            name: 'image',\n    \n    \n            /**\n             * 生成缩略图，此过程为异步，所以需要传入`callback`。\n             * 通常情况在图片加入队里后调用此方法来生成预览图以增强交互效果。\n             *\n             * 当 width 或者 height 的值介于 0 - 1 时，被当成百分比使用。\n             *\n             * `callback`中可以接收到两个参数。\n             * * 第一个为error，如果生成缩略图有错误，此error将为真。\n             * * 第二个为ret, 缩略图的Data URL值。\n             *\n             * **注意**\n             * Date URL在IE6/7中不支持，所以不用调用此方法了，直接显示一张暂不支持预览图片好了。\n             * 也可以借助服务端，将 base64 数据传给服务端，生成一个临时文件供预览。\n             *\n             * @method makeThumb\n             * @grammar makeThumb( file, callback ) => undefined\n             * @grammar makeThumb( file, callback, width, height ) => undefined\n             * @for Uploader\n             * @example\n             *\n             * uploader.on( 'fileQueued', function( file ) {\n             *     var $li = ...;\n             *\n             *     uploader.makeThumb( file, function( error, ret ) {\n             *         if ( error ) {\n             *             $li.text('预览错误');\n             *         } else {\n             *             $li.append('<img alt=\"\" src=\"' + ret + '\" />');\n             *         }\n             *     });\n             *\n             * });\n             */\n            makeThumb: function( file, cb, width, height ) {\n                var opts, image;\n    \n                file = this.request( 'get-file', file );\n    \n                // 只预览图片格式。\n                if ( !file.type.match( /^image/ ) ) {\n                    cb( true );\n                    return;\n                }\n    \n                opts = $.extend({}, this.options.thumb );\n    \n                // 如果传入的是object.\n                if ( $.isPlainObject( width ) ) {\n                    opts = $.extend( opts, width );\n                    width = null;\n                }\n    \n                width = width || opts.width;\n                height = height || opts.height;\n    \n                image = new Image( opts );\n    \n                image.once( 'load', function() {\n                    file._info = file._info || image.info();\n                    file._meta = file._meta || image.meta();\n    \n                    // 如果 width 的值介于 0 - 1\n                    // 说明设置的是百分比。\n                    if ( width <= 1 && width > 0 ) {\n                        width = file._info.width * width;\n                    }\n    \n                    // 同样的规则应用于 height\n                    if ( height <= 1 && height > 0 ) {\n                        height = file._info.height * height;\n                    }\n    \n                    image.resize( width, height );\n                });\n    \n                // 当 resize 完后\n                image.once( 'complete', function() {\n                    cb( false, image.getAsDataUrl( opts.type ) );\n                    image.destroy();\n                });\n    \n                image.once( 'error', function( reason ) {\n                    cb( reason || true );\n                    image.destroy();\n                });\n    \n                throttle( image, file.source.size, function() {\n                    file._info && image.info( file._info );\n                    file._meta && image.meta( file._meta );\n                    image.loadFromBlob( file.source );\n                });\n            },\n    \n            beforeSendFile: function( file ) {\n                var opts = this.options.compress || this.options.resize,\n                    compressSize = opts && opts.compressSize || 0,\n                    noCompressIfLarger = opts && opts.noCompressIfLarger || false,\n                    image, deferred;\n    \n                file = this.request( 'get-file', file );\n    \n                // 只压缩 jpeg 图片格式。\n                // gif 可能会丢失针\n                // bmp png 基本上尺寸都不大，且压缩比比较小。\n                if ( !opts || !~'image/jpeg,image/jpg'.indexOf( file.type ) ||\n                        file.size < compressSize ||\n                        file._compressed ) {\n                    return;\n                }\n    \n                opts = $.extend({}, opts );\n                deferred = Base.Deferred();\n    \n                image = new Image( opts );\n    \n                deferred.always(function() {\n                    image.destroy();\n                    image = null;\n                });\n                image.once( 'error', deferred.reject );\n                image.once( 'load', function() {\n                    var width = opts.width,\n                        height = opts.height;\n    \n                    file._info = file._info || image.info();\n                    file._meta = file._meta || image.meta();\n    \n                    // 如果 width 的值介于 0 - 1\n                    // 说明设置的是百分比。\n                    if ( width <= 1 && width > 0 ) {\n                        width = file._info.width * width;\n                    }\n    \n                    // 同样的规则应用于 height\n                    if ( height <= 1 && height > 0 ) {\n                        height = file._info.height * height;\n                    }\n    \n                    image.resize( width, height );\n                });\n    \n                image.once( 'complete', function() {\n                    var blob, size;\n    \n                    // 移动端 UC / qq 浏览器的无图模式下\n                    // ctx.getImageData 处理大图的时候会报 Exception\n                    // INDEX_SIZE_ERR: DOM Exception 1\n                    try {\n                        blob = image.getAsBlob( opts.type );\n    \n                        size = file.size;\n    \n                        // 如果压缩后，比原来还大则不用压缩后的。\n                        if ( !noCompressIfLarger || blob.size < size ) {\n                            // file.source.destroy && file.source.destroy();\n                            file.source = blob;\n                            file.size = blob.size;\n    \n                            file.trigger( 'resize', blob.size, size );\n                        }\n    \n                        // 标记，避免重复压缩。\n                        file._compressed = true;\n                        deferred.resolve();\n                    } catch ( e ) {\n                        // 出错了直接继续，让其上传原始图片\n                        deferred.resolve();\n                    }\n                });\n    \n                file._info && image.info( file._info );\n                file._meta && image.meta( file._meta );\n    \n                image.loadFromBlob( file.source );\n                return deferred.promise();\n            }\n        });\n    });\n    /**\n     * @fileOverview 文件属性封装\n     */\n    define('file',[\n        'base',\n        'mediator'\n    ], function( Base, Mediator ) {\n    \n        var $ = Base.$,\n            idPrefix = 'WU_FILE_',\n            idSuffix = 0,\n            rExt = /\\.([^.]+)$/,\n            statusMap = {};\n    \n        function gid() {\n            return idPrefix + idSuffix++;\n        }\n    \n        /**\n         * 文件类\n         * @class File\n         * @constructor 构造函数\n         * @grammar new File( source ) => File\n         * @param {Lib.File} source [lib.File](#Lib.File)实例, 此source对象是带有Runtime信息的。\n         */\n        function WUFile( source ) {\n    \n            /**\n             * 文件名，包括扩展名（后缀）\n             * @property name\n             * @type {string}\n             */\n            this.name = source.name || 'Untitled';\n    \n            /**\n             * 文件体积（字节）\n             * @property size\n             * @type {uint}\n             * @default 0\n             */\n            this.size = source.size || 0;\n    \n            /**\n             * 文件MIMETYPE类型，与文件类型的对应关系请参考[http://t.cn/z8ZnFny](http://t.cn/z8ZnFny)\n             * @property type\n             * @type {string}\n             * @default 'application/octet-stream'\n             */\n            this.type = source.type || 'application/octet-stream';\n    \n            /**\n             * 文件最后修改日期\n             * @property lastModifiedDate\n             * @type {int}\n             * @default 当前时间戳\n             */\n            this.lastModifiedDate = source.lastModifiedDate || (new Date() * 1);\n    \n            /**\n             * 文件ID，每个对象具有唯一ID，与文件名无关\n             * @property id\n             * @type {string}\n             */\n            this.id = gid();\n    \n            /**\n             * 文件扩展名，通过文件名获取，例如test.png的扩展名为png\n             * @property ext\n             * @type {string}\n             */\n            this.ext = rExt.exec( this.name ) ? RegExp.$1 : '';\n    \n    \n            /**\n             * 状态文字说明。在不同的status语境下有不同的用途。\n             * @property statusText\n             * @type {string}\n             */\n            this.statusText = '';\n    \n            // 存储文件状态，防止通过属性直接修改\n            statusMap[ this.id ] = WUFile.Status.INITED;\n    \n            this.source = source;\n            this.loaded = 0;\n    \n            this.on( 'error', function( msg ) {\n                this.setStatus( WUFile.Status.ERROR, msg );\n            });\n        }\n    \n        $.extend( WUFile.prototype, {\n    \n            /**\n             * 设置状态，状态变化时会触发`change`事件。\n             * @method setStatus\n             * @grammar setStatus( status[, statusText] );\n             * @param {File.Status|String} status [文件状态值](#WebUploader:File:File.Status)\n             * @param {String} [statusText=''] 状态说明，常在error时使用，用http, abort,server等来标记是由于什么原因导致文件错误。\n             */\n            setStatus: function( status, text ) {\n    \n                var prevStatus = statusMap[ this.id ];\n    \n                typeof text !== 'undefined' && (this.statusText = text);\n    \n                if ( status !== prevStatus ) {\n                    statusMap[ this.id ] = status;\n                    /**\n                     * 文件状态变化\n                     * @event statuschange\n                     */\n                    this.trigger( 'statuschange', status, prevStatus );\n                }\n    \n            },\n    \n            /**\n             * 获取文件状态\n             * @return {File.Status}\n             * @example\n                     文件状态具体包括以下几种类型：\n                     {\n                         // 初始化\n                        INITED:     0,\n                        // 已入队列\n                        QUEUED:     1,\n                        // 正在上传\n                        PROGRESS:     2,\n                        // 上传出错\n                        ERROR:         3,\n                        // 上传成功\n                        COMPLETE:     4,\n                        // 上传取消\n                        CANCELLED:     5\n                    }\n             */\n            getStatus: function() {\n                return statusMap[ this.id ];\n            },\n    \n            /**\n             * 获取文件原始信息。\n             * @return {*}\n             */\n            getSource: function() {\n                return this.source;\n            },\n    \n            destroy: function() {\n                this.off();\n                delete statusMap[ this.id ];\n            }\n        });\n    \n        Mediator.installTo( WUFile.prototype );\n    \n        /**\n         * 文件状态值，具体包括以下几种类型：\n         * * `inited` 初始状态\n         * * `queued` 已经进入队列, 等待上传\n         * * `progress` 上传中\n         * * `complete` 上传完成。\n         * * `error` 上传出错，可重试\n         * * `interrupt` 上传中断，可续传。\n         * * `invalid` 文件不合格，不能重试上传。会自动从队列中移除。\n         * * `cancelled` 文件被移除。\n         * @property {Object} Status\n         * @namespace File\n         * @class File\n         * @static\n         */\n        WUFile.Status = {\n            INITED:     'inited',    // 初始状态\n            QUEUED:     'queued',    // 已经进入队列, 等待上传\n            PROGRESS:   'progress',    // 上传中\n            ERROR:      'error',    // 上传出错，可重试\n            COMPLETE:   'complete',    // 上传完成。\n            CANCELLED:  'cancelled',    // 上传取消。\n            INTERRUPT:  'interrupt',    // 上传中断，可续传。\n            INVALID:    'invalid'    // 文件不合格，不能重试上传。\n        };\n    \n        return WUFile;\n    });\n    \n    /**\n     * @fileOverview 文件队列\n     */\n    define('queue',[\n        'base',\n        'mediator',\n        'file'\n    ], function( Base, Mediator, WUFile ) {\n    \n        var $ = Base.$,\n            STATUS = WUFile.Status;\n    \n        /**\n         * 文件队列, 用来存储各个状态中的文件。\n         * @class Queue\n         * @extends Mediator\n         */\n        function Queue() {\n    \n            /**\n             * 统计文件数。\n             * * `numOfQueue` 队列中的文件数。\n             * * `numOfSuccess` 上传成功的文件数\n             * * `numOfCancel` 被取消的文件数\n             * * `numOfProgress` 正在上传中的文件数\n             * * `numOfUploadFailed` 上传错误的文件数。\n             * * `numOfInvalid` 无效的文件数。\n             * * `numofDeleted` 被移除的文件数。\n             * @property {Object} stats\n             */\n            this.stats = {\n                numOfQueue: 0,\n                numOfSuccess: 0,\n                numOfCancel: 0,\n                numOfProgress: 0,\n                numOfUploadFailed: 0,\n                numOfInvalid: 0,\n                numofDeleted: 0,\n                numofInterrupt: 0\n            };\n    \n            // 上传队列，仅包括等待上传的文件\n            this._queue = [];\n    \n            // 存储所有文件\n            this._map = {};\n        }\n    \n        $.extend( Queue.prototype, {\n    \n            /**\n             * 将新文件加入对队列尾部\n             *\n             * @method append\n             * @param  {File} file   文件对象\n             */\n            append: function( file ) {\n                this._queue.push( file );\n                this._fileAdded( file );\n                return this;\n            },\n    \n            /**\n             * 将新文件加入对队列头部\n             *\n             * @method prepend\n             * @param  {File} file   文件对象\n             */\n            prepend: function( file ) {\n                this._queue.unshift( file );\n                this._fileAdded( file );\n                return this;\n            },\n    \n            /**\n             * 获取文件对象\n             *\n             * @method getFile\n             * @param  {String} fileId   文件ID\n             * @return {File}\n             */\n            getFile: function( fileId ) {\n                if ( typeof fileId !== 'string' ) {\n                    return fileId;\n                }\n                return this._map[ fileId ];\n            },\n    \n            /**\n             * 从队列中取出一个指定状态的文件。\n             * @grammar fetch( status ) => File\n             * @method fetch\n             * @param {String} status [文件状态值](#WebUploader:File:File.Status)\n             * @return {File} [File](#WebUploader:File)\n             */\n            fetch: function( status ) {\n                var len = this._queue.length,\n                    i, file;\n    \n                status = status || STATUS.QUEUED;\n    \n                for ( i = 0; i < len; i++ ) {\n                    file = this._queue[ i ];\n    \n                    if ( status === file.getStatus() ) {\n                        return file;\n                    }\n                }\n    \n                return null;\n            },\n    \n            /**\n             * 对队列进行排序，能够控制文件上传顺序。\n             * @grammar sort( fn ) => undefined\n             * @method sort\n             * @param {Function} fn 排序方法\n             */\n            sort: function( fn ) {\n                if ( typeof fn === 'function' ) {\n                    this._queue.sort( fn );\n                }\n            },\n    \n            /**\n             * 获取指定类型的文件列表, 列表中每一个成员为[File](#WebUploader:File)对象。\n             * @grammar getFiles( [status1[, status2 ...]] ) => Array\n             * @method getFiles\n             * @param {String} [status] [文件状态值](#WebUploader:File:File.Status)\n             */\n            getFiles: function() {\n                var sts = [].slice.call( arguments, 0 ),\n                    ret = [],\n                    i = 0,\n                    len = this._queue.length,\n                    file;\n    \n                for ( ; i < len; i++ ) {\n                    file = this._queue[ i ];\n    \n                    if ( sts.length && !~$.inArray( file.getStatus(), sts ) ) {\n                        continue;\n                    }\n    \n                    ret.push( file );\n                }\n    \n                return ret;\n            },\n    \n            /**\n             * 在队列中删除文件。\n             * @grammar removeFile( file ) => Array\n             * @method removeFile\n             * @param {File} 文件对象。\n             */\n            removeFile: function( file ) {\n                var me = this,\n                    existing = this._map[ file.id ];\n    \n                if ( existing ) {\n                    delete this._map[ file.id ];\n                    file.destroy();\n                    this.stats.numofDeleted++;\n                }\n            },\n    \n            _fileAdded: function( file ) {\n                var me = this,\n                    existing = this._map[ file.id ];\n    \n                if ( !existing ) {\n                    this._map[ file.id ] = file;\n    \n                    file.on( 'statuschange', function( cur, pre ) {\n                        me._onFileStatusChange( cur, pre );\n                    });\n                }\n            },\n    \n            _onFileStatusChange: function( curStatus, preStatus ) {\n                var stats = this.stats;\n    \n                switch ( preStatus ) {\n                    case STATUS.PROGRESS:\n                        stats.numOfProgress--;\n                        break;\n    \n                    case STATUS.QUEUED:\n                        stats.numOfQueue --;\n                        break;\n    \n                    case STATUS.ERROR:\n                        stats.numOfUploadFailed--;\n                        break;\n    \n                    case STATUS.INVALID:\n                        stats.numOfInvalid--;\n                        break;\n    \n                    case STATUS.INTERRUPT:\n                        stats.numofInterrupt--;\n                        break;\n                }\n    \n                switch ( curStatus ) {\n                    case STATUS.QUEUED:\n                        stats.numOfQueue++;\n                        break;\n    \n                    case STATUS.PROGRESS:\n                        stats.numOfProgress++;\n                        break;\n    \n                    case STATUS.ERROR:\n                        stats.numOfUploadFailed++;\n                        break;\n    \n                    case STATUS.COMPLETE:\n                        stats.numOfSuccess++;\n                        break;\n    \n                    case STATUS.CANCELLED:\n                        stats.numOfCancel++;\n                        break;\n    \n    \n                    case STATUS.INVALID:\n                        stats.numOfInvalid++;\n                        break;\n    \n                    case STATUS.INTERRUPT:\n                        stats.numofInterrupt++;\n                        break;\n                }\n            }\n    \n        });\n    \n        Mediator.installTo( Queue.prototype );\n    \n        return Queue;\n    });\n    /**\n     * @fileOverview 队列\n     */\n    define('widgets/queue',[\n        'base',\n        'uploader',\n        'queue',\n        'file',\n        'lib/file',\n        'runtime/client',\n        'widgets/widget'\n    ], function( Base, Uploader, Queue, WUFile, File, RuntimeClient ) {\n    \n        var $ = Base.$,\n            rExt = /\\.\\w+$/,\n            Status = WUFile.Status;\n    \n        return Uploader.register({\n            name: 'queue',\n    \n            init: function( opts ) {\n                var me = this,\n                    deferred, len, i, item, arr, accept, runtime;\n    \n                if ( $.isPlainObject( opts.accept ) ) {\n                    opts.accept = [ opts.accept ];\n                }\n    \n                // accept中的中生成匹配正则。\n                if ( opts.accept ) {\n                    arr = [];\n    \n                    for ( i = 0, len = opts.accept.length; i < len; i++ ) {\n                        item = opts.accept[ i ].extensions;\n                        item && arr.push( item );\n                    }\n    \n                    if ( arr.length ) {\n                        accept = '\\\\.' + arr.join(',')\n                                .replace( /,/g, '$|\\\\.' )\n                                .replace( /\\*/g, '.*' ) + '$';\n                    }\n    \n                    me.accept = new RegExp( accept, 'i' );\n                }\n    \n                me.queue = new Queue();\n                me.stats = me.queue.stats;\n    \n                // 如果当前不是html5运行时，那就算了。\n                // 不执行后续操作\n                if ( this.request('predict-runtime-type') !== 'html5' ) {\n                    return;\n                }\n    \n                // 创建一个 html5 运行时的 placeholder\n                // 以至于外部添加原生 File 对象的时候能正确包裹一下供 webuploader 使用。\n                deferred = Base.Deferred();\n                this.placeholder = runtime = new RuntimeClient('Placeholder');\n                runtime.connectRuntime({\n                    runtimeOrder: 'html5'\n                }, function() {\n                    me._ruid = runtime.getRuid();\n                    deferred.resolve();\n                });\n                return deferred.promise();\n            },\n    \n    \n            // 为了支持外部直接添加一个原生File对象。\n            _wrapFile: function( file ) {\n                if ( !(file instanceof WUFile) ) {\n    \n                    if ( !(file instanceof File) ) {\n                        if ( !this._ruid ) {\n                            throw new Error('Can\\'t add external files.');\n                        }\n                        file = new File( this._ruid, file );\n                    }\n    \n                    file = new WUFile( file );\n                }\n    \n                return file;\n            },\n    \n            // 判断文件是否可以被加入队列\n            acceptFile: function( file ) {\n                var invalid = !file || !file.size || this.accept &&\n    \n                        // 如果名字中有后缀，才做后缀白名单处理。\n                        rExt.exec( file.name ) && !this.accept.test( file.name );\n    \n                return !invalid;\n            },\n    \n    \n            /**\n             * @event beforeFileQueued\n             * @param {File} file File对象\n             * @description 当文件被加入队列之前触发，此事件的handler返回值为`false`，则此文件不会被添加进入队列。\n             * @for  Uploader\n             */\n    \n            /**\n             * @event fileQueued\n             * @param {File} file File对象\n             * @description 当文件被加入队列以后触发。\n             * @for  Uploader\n             */\n    \n            _addFile: function( file ) {\n                var me = this;\n    \n                file = me._wrapFile( file );\n    \n                // 不过类型判断允许不允许，先派送 `beforeFileQueued`\n                if ( !me.owner.trigger( 'beforeFileQueued', file ) ) {\n                    return;\n                }\n    \n                // 类型不匹配，则派送错误事件，并返回。\n                if ( !me.acceptFile( file ) ) {\n                    me.owner.trigger( 'error', 'Q_TYPE_DENIED', file );\n                    return;\n                }\n    \n                me.queue.append( file );\n                me.owner.trigger( 'fileQueued', file );\n                return file;\n            },\n    \n            getFile: function( fileId ) {\n                return this.queue.getFile( fileId );\n            },\n    \n            /**\n             * @event filesQueued\n             * @param {File} files 数组，内容为原始File(lib/File）对象。\n             * @description 当一批文件添加进队列以后触发。\n             * @for  Uploader\n             */\n            \n            /**\n             * @property {Boolean} [auto=false]\n             * @namespace options\n             * @for Uploader\n             * @description 设置为 true 后，不需要手动调用上传，有文件选择即开始上传。\n             * \n             */\n    \n            /**\n             * @method addFiles\n             * @grammar addFiles( file ) => undefined\n             * @grammar addFiles( [file1, file2 ...] ) => undefined\n             * @param {Array of File or File} [files] Files 对象 数组\n             * @description 添加文件到队列\n             * @for  Uploader\n             */\n            addFile: function( files ) {\n                var me = this;\n    \n                if ( !files.length ) {\n                    files = [ files ];\n                }\n    \n                files = $.map( files, function( file ) {\n                    return me._addFile( file );\n                });\n    \t\t\t\n    \t\t\tif ( files.length ) {\n    \n                    me.owner.trigger( 'filesQueued', files );\n    \n    \t\t\t\tif ( me.options.auto ) {\n    \t\t\t\t\tsetTimeout(function() {\n    \t\t\t\t\t\tme.request('start-upload');\n    \t\t\t\t\t}, 20 );\n    \t\t\t\t}\n                }\n            },\n    \n            getStats: function() {\n                return this.stats;\n            },\n    \n            /**\n             * @event fileDequeued\n             * @param {File} file File对象\n             * @description 当文件被移除队列后触发。\n             * @for  Uploader\n             */\n    \n             /**\n             * @method removeFile\n             * @grammar removeFile( file ) => undefined\n             * @grammar removeFile( id ) => undefined\n             * @grammar removeFile( file, true ) => undefined\n             * @grammar removeFile( id, true ) => undefined\n             * @param {File|id} file File对象或这File对象的id\n             * @description 移除某一文件, 默认只会标记文件状态为已取消，如果第二个参数为 `true` 则会从 queue 中移除。\n             * @for  Uploader\n             * @example\n             *\n             * $li.on('click', '.remove-this', function() {\n             *     uploader.removeFile( file );\n             * })\n             */\n            removeFile: function( file, remove ) {\n                var me = this;\n    \n                file = file.id ? file : me.queue.getFile( file );\n    \n                this.request( 'cancel-file', file );\n    \n                if ( remove ) {\n                    this.queue.removeFile( file );\n                }\n            },\n    \n            /**\n             * @method getFiles\n             * @grammar getFiles() => Array\n             * @grammar getFiles( status1, status2, status... ) => Array\n             * @description 返回指定状态的文件集合，不传参数将返回所有状态的文件。\n             * @for  Uploader\n             * @example\n             * console.log( uploader.getFiles() );    // => all files\n             * console.log( uploader.getFiles('error') )    // => all error files.\n             */\n            getFiles: function() {\n                return this.queue.getFiles.apply( this.queue, arguments );\n            },\n    \n            fetchFile: function() {\n                return this.queue.fetch.apply( this.queue, arguments );\n            },\n    \n            /**\n             * @method retry\n             * @grammar retry() => undefined\n             * @grammar retry( file ) => undefined\n             * @description 重试上传，重试指定文件，或者从出错的文件开始重新上传。\n             * @for  Uploader\n             * @example\n             * function retry() {\n             *     uploader.retry();\n             * }\n             */\n            retry: function( file, noForceStart ) {\n                var me = this,\n                    files, i, len;\n    \n                if ( file ) {\n                    file = file.id ? file : me.queue.getFile( file );\n                    file.setStatus( Status.QUEUED );\n                    noForceStart || me.request('start-upload');\n                    return;\n                }\n    \n                files = me.queue.getFiles( Status.ERROR );\n                i = 0;\n                len = files.length;\n    \n                for ( ; i < len; i++ ) {\n                    file = files[ i ];\n                    file.setStatus( Status.QUEUED );\n                }\n    \n                me.request('start-upload');\n            },\n    \n            /**\n             * @method sort\n             * @grammar sort( fn ) => undefined\n             * @description 排序队列中的文件，在上传之前调整可以控制上传顺序。\n             * @for  Uploader\n             */\n            sortFiles: function() {\n                return this.queue.sort.apply( this.queue, arguments );\n            },\n    \n            /**\n             * @event reset\n             * @description 当 uploader 被重置的时候触发。\n             * @for  Uploader\n             */\n    \n            /**\n             * @method reset\n             * @grammar reset() => undefined\n             * @description 重置uploader。目前只重置了队列。\n             * @for  Uploader\n             * @example\n             * uploader.reset();\n             */\n            reset: function() {\n                this.owner.trigger('reset');\n                this.queue = new Queue();\n                this.stats = this.queue.stats;\n            },\n    \n            destroy: function() {\n                this.reset();\n                this.placeholder && this.placeholder.destroy();\n            }\n        });\n    \n    });\n    /**\n     * @fileOverview 添加获取Runtime相关信息的方法。\n     */\n    define('widgets/runtime',[\n        'uploader',\n        'runtime/runtime',\n        'widgets/widget'\n    ], function( Uploader, Runtime ) {\n    \n        Uploader.support = function() {\n            return Runtime.hasRuntime.apply( Runtime, arguments );\n        };\n    \n        /**\n         * @property {Object} [runtimeOrder=html5,flash]\n         * @namespace options\n         * @for Uploader\n         * @description 指定运行时启动顺序。默认会想尝试 html5 是否支持，如果支持则使用 html5, 否则则使用 flash.\n         *\n         * 可以将此值设置成 `flash`，来强制使用 flash 运行时。\n         */\n    \n        return Uploader.register({\n            name: 'runtime',\n    \n            init: function() {\n                if ( !this.predictRuntimeType() ) {\n                    throw Error('Runtime Error');\n                }\n            },\n    \n            /**\n             * 预测Uploader将采用哪个`Runtime`\n             * @grammar predictRuntimeType() => String\n             * @method predictRuntimeType\n             * @for  Uploader\n             */\n            predictRuntimeType: function() {\n                var orders = this.options.runtimeOrder || Runtime.orders,\n                    type = this.type,\n                    i, len;\n    \n                if ( !type ) {\n                    orders = orders.split( /\\s*,\\s*/g );\n    \n                    for ( i = 0, len = orders.length; i < len; i++ ) {\n                        if ( Runtime.hasRuntime( orders[ i ] ) ) {\n                            this.type = type = orders[ i ];\n                            break;\n                        }\n                    }\n                }\n    \n                return type;\n            }\n        });\n    });\n    /**\n     * @fileOverview Transport\n     */\n    define('lib/transport',[\n        'base',\n        'runtime/client',\n        'mediator'\n    ], function( Base, RuntimeClient, Mediator ) {\n    \n        var $ = Base.$;\n    \n        function Transport( opts ) {\n            var me = this;\n    \n            opts = me.options = $.extend( true, {}, Transport.options, opts || {} );\n            RuntimeClient.call( this, 'Transport' );\n    \n            this._blob = null;\n            this._formData = opts.formData || {};\n            this._headers = opts.headers || {};\n    \n            this.on( 'progress', this._timeout );\n            this.on( 'load error', function() {\n                me.trigger( 'progress', 1 );\n                clearTimeout( me._timer );\n            });\n        }\n    \n        Transport.options = {\n            server: '',\n            method: 'POST',\n    \n            // 跨域时，是否允许携带cookie, 只有html5 runtime才有效\n            withCredentials: false,\n            fileVal: 'file',\n            timeout: 2 * 60 * 1000,    // 2分钟\n            formData: {},\n            headers: {},\n            sendAsBinary: false\n        };\n    \n        $.extend( Transport.prototype, {\n    \n            // 添加Blob, 只能添加一次，最后一次有效。\n            appendBlob: function( key, blob, filename ) {\n                var me = this,\n                    opts = me.options;\n    \n                if ( me.getRuid() ) {\n                    me.disconnectRuntime();\n                }\n    \n                // 连接到blob归属的同一个runtime.\n                me.connectRuntime( blob.ruid, function() {\n                    me.exec('init');\n                });\n    \n                me._blob = blob;\n                opts.fileVal = key || opts.fileVal;\n                opts.filename = filename || opts.filename;\n            },\n    \n            // 添加其他字段\n            append: function( key, value ) {\n                if ( typeof key === 'object' ) {\n                    $.extend( this._formData, key );\n                } else {\n                    this._formData[ key ] = value;\n                }\n            },\n    \n            setRequestHeader: function( key, value ) {\n                if ( typeof key === 'object' ) {\n                    $.extend( this._headers, key );\n                } else {\n                    this._headers[ key ] = value;\n                }\n            },\n    \n            send: function( method ) {\n                this.exec( 'send', method );\n                this._timeout();\n            },\n    \n            abort: function() {\n                clearTimeout( this._timer );\n                return this.exec('abort');\n            },\n    \n            destroy: function() {\n                this.trigger('destroy');\n                this.off();\n                this.exec('destroy');\n                this.disconnectRuntime();\n            },\n    \n            getResponse: function() {\n                return this.exec('getResponse');\n            },\n    \n            getResponseAsJson: function() {\n                return this.exec('getResponseAsJson');\n            },\n    \n            getStatus: function() {\n                return this.exec('getStatus');\n            },\n    \n            _timeout: function() {\n                var me = this,\n                    duration = me.options.timeout;\n    \n                if ( !duration ) {\n                    return;\n                }\n    \n                clearTimeout( me._timer );\n                me._timer = setTimeout(function() {\n                    me.abort();\n                    me.trigger( 'error', 'timeout' );\n                }, duration );\n            }\n    \n        });\n    \n        // 让Transport具备事件功能。\n        Mediator.installTo( Transport.prototype );\n    \n        return Transport;\n    });\n    /**\n     * @fileOverview 负责文件上传相关。\n     */\n    define('widgets/upload',[\n        'base',\n        'uploader',\n        'file',\n        'lib/transport',\n        'widgets/widget'\n    ], function( Base, Uploader, WUFile, Transport ) {\n    \n        var $ = Base.$,\n            isPromise = Base.isPromise,\n            Status = WUFile.Status;\n    \n        // 添加默认配置项\n        $.extend( Uploader.options, {\n    \n    \n            /**\n             * @property {Boolean} [prepareNextFile=false]\n             * @namespace options\n             * @for Uploader\n             * @description 是否允许在文件传输时提前把下一个文件准备好。\n             * 对于一个文件的准备工作比较耗时，比如图片压缩，md5序列化。\n             * 如果能提前在当前文件传输期处理，可以节省总体耗时。\n             */\n            prepareNextFile: false,\n    \n            /**\n             * @property {Boolean} [chunked=false]\n             * @namespace options\n             * @for Uploader\n             * @description 是否要分片处理大文件上传。\n             */\n            chunked: false,\n    \n            /**\n             * @property {Boolean} [chunkSize=5242880]\n             * @namespace options\n             * @for Uploader\n             * @description 如果要分片，分多大一片？ 默认大小为5M.\n             */\n            chunkSize: 5 * 1024 * 1024,\n    \n            /**\n             * @property {Boolean} [chunkRetry=2]\n             * @namespace options\n             * @for Uploader\n             * @description 如果某个分片由于网络问题出错，允许自动重传多少次？\n             */\n            chunkRetry: 2,\n    \n            /**\n             * @property {Boolean} [threads=3]\n             * @namespace options\n             * @for Uploader\n             * @description 上传并发数。允许同时最大上传进程数。\n             */\n            threads: 3,\n    \n    \n            /**\n             * @property {Object} [formData={}]\n             * @namespace options\n             * @for Uploader\n             * @description 文件上传请求的参数表，每次发送都会发送此对象中的参数。\n             */\n            formData: {}\n    \n            /**\n             * @property {Object} [fileVal='file']\n             * @namespace options\n             * @for Uploader\n             * @description 设置文件上传域的name。\n             */\n    \n            /**\n             * @property {Object} [sendAsBinary=false]\n             * @namespace options\n             * @for Uploader\n             * @description 是否已二进制的流的方式发送文件，这样整个上传内容`php://input`都为文件内容，\n             * 其他参数在$_GET数组中。\n             */\n        });\n    \n        // 负责将文件切片。\n        function CuteFile( file, chunkSize ) {\n            var pending = [],\n                blob = file.source,\n                total = blob.size,\n                chunks = chunkSize ? Math.ceil( total / chunkSize ) : 1,\n                start = 0,\n                index = 0,\n                len, api;\n    \n            api = {\n                file: file,\n    \n                has: function() {\n                    return !!pending.length;\n                },\n    \n                shift: function() {\n                    return pending.shift();\n                },\n    \n                unshift: function( block ) {\n                    pending.unshift( block );\n                }\n            };\n    \n            while ( index < chunks ) {\n                len = Math.min( chunkSize, total - start );\n    \n                pending.push({\n                    file: file,\n                    start: start,\n                    end: chunkSize ? (start + len) : total,\n                    total: total,\n                    chunks: chunks,\n                    chunk: index++,\n                    cuted: api\n                });\n                start += len;\n            }\n    \n            file.blocks = pending.concat();\n            file.remaning = pending.length;\n    \n            return api;\n        }\n    \n        Uploader.register({\n            name: 'upload',\n    \n            init: function() {\n                var owner = this.owner,\n                    me = this;\n    \n                this.runing = false;\n                this.progress = false;\n    \n                owner\n                    .on( 'startUpload', function() {\n                        me.progress = true;\n                    })\n                    .on( 'uploadFinished', function() {\n                        me.progress = false;\n                    });\n    \n                // 记录当前正在传的数据，跟threads相关\n                this.pool = [];\n    \n                // 缓存分好片的文件。\n                this.stack = [];\n    \n                // 缓存即将上传的文件。\n                this.pending = [];\n    \n                // 跟踪还有多少分片在上传中但是没有完成上传。\n                this.remaning = 0;\n                this.__tick = Base.bindFn( this._tick, this );\n    \n                // 销毁上传相关的属性。\n                owner.on( 'uploadComplete', function( file ) {\n    \n                    // 把其他块取消了。\n                    file.blocks && $.each( file.blocks, function( _, v ) {\n                        v.transport && (v.transport.abort(), v.transport.destroy());\n                        delete v.transport;\n                    });\n    \n                    delete file.blocks;\n                    delete file.remaning;\n                });\n            },\n    \n            reset: function() {\n                this.request( 'stop-upload', true );\n                this.runing = false;\n                this.pool = [];\n                this.stack = [];\n                this.pending = [];\n                this.remaning = 0;\n                this._trigged = false;\n                this._promise = null;\n            },\n    \n            /**\n             * @event startUpload\n             * @description 当开始上传流程时触发。\n             * @for  Uploader\n             */\n    \n            /**\n             * 开始上传。此方法可以从初始状态调用开始上传流程，也可以从暂停状态调用，继续上传流程。\n             *\n             * 可以指定开始某一个文件。\n             * @grammar upload() => undefined\n             * @grammar upload( file | fileId) => undefined\n             * @method upload\n             * @for  Uploader\n             */\n            startUpload: function(file) {\n                var me = this;\n    \n                // 移出invalid的文件\n                $.each( me.request( 'get-files', Status.INVALID ), function() {\n                    me.request( 'remove-file', this );\n                });\n    \n                // 如果指定了开始某个文件，则只开始指定的文件。\n                if ( file ) {\n                    file = file.id ? file : me.request( 'get-file', file );\n    \n                    if (file.getStatus() === Status.INTERRUPT) {\n                        file.setStatus( Status.QUEUED );\n    \n                        $.each( me.pool, function( _, v ) {\n    \n                            // 之前暂停过。\n                            if (v.file !== file) {\n                                return;\n                            }\n    \n                            v.transport && v.transport.send();\n                            file.setStatus( Status.PROGRESS );\n                        });\n    \n                        \n                    } else if (file.getStatus() !== Status.PROGRESS) {\n                        file.setStatus( Status.QUEUED );\n                    }\n                } else {\n                    $.each( me.request( 'get-files', [ Status.INITED ] ), function() {\n                        this.setStatus( Status.QUEUED );\n                    });\n                }\n    \n                if ( me.runing ) {\n                    return Base.nextTick( me.__tick );\n                }\n    \n                me.runing = true;\n                var files = [];\n    \n                // 如果有暂停的，则续传\n                file || $.each( me.pool, function( _, v ) {\n                    var file = v.file;\n    \n                    if ( file.getStatus() === Status.INTERRUPT ) {\n                        me._trigged = false;\n                        files.push(file);\n                        v.transport && v.transport.send();\n                    }\n                });\n    \n                $.each(files, function() {\n                    this.setStatus( Status.PROGRESS );\n                });\n    \n                file || $.each( me.request( 'get-files',\n                        Status.INTERRUPT ), function() {\n                    this.setStatus( Status.PROGRESS );\n                });\n    \n                me._trigged = false;\n                Base.nextTick( me.__tick );\n                me.owner.trigger('startUpload');\n            },\n    \n            /**\n             * @event stopUpload\n             * @description 当开始上传流程暂停时触发。\n             * @for  Uploader\n             */\n    \n            /**\n             * 暂停上传。第一个参数为是否中断上传当前正在上传的文件。\n             *\n             * 如果第一个参数是文件，则只暂停指定文件。\n             * @grammar stop() => undefined\n             * @grammar stop( true ) => undefined\n             * @grammar stop( file ) => undefined\n             * @method stop\n             * @for  Uploader\n             */\n            stopUpload: function( file, interrupt ) {\n                var me = this,\n                    block;\n    \n                if (file === true) {\n                    interrupt = file;\n                    file = null;\n                }\n    \n                if ( me.runing === false ) {\n                    return;\n                }\n    \n                // 如果只是暂停某个文件。\n                if ( file ) {\n                    file = file.id ? file : me.request( 'get-file', file );\n    \n                    if ( file.getStatus() !== Status.PROGRESS &&\n                            file.getStatus() !== Status.QUEUED ) {\n                        return;\n                    }\n    \n                    file.setStatus( Status.INTERRUPT );\n    \n    \n                    $.each( me.pool, function( _, v ) {\n    \n                        // 只 abort 指定的文件。\n                        if (v.file === file) {\n                            block = v;\n                            return false;\n                        }\n                    });\n    \n                    block.transport && block.transport.abort();\n    \n                    if (interrupt) {\n                        me._putback(block);\n                        me._popBlock(block);\n                    }\n    \n                    return Base.nextTick( me.__tick );\n                }\n    \n                me.runing = false;\n    \n                // 正在准备中的文件。\n                if (this._promise && this._promise.file) {\n                    this._promise.file.setStatus( Status.INTERRUPT );\n                }\n    \n                interrupt && $.each( me.pool, function( _, v ) {\n                    v.transport && v.transport.abort();\n                    v.file.setStatus( Status.INTERRUPT );\n                });\n    \n                me.owner.trigger('stopUpload');\n            },\n    \n            /**\n             * @method cancelFile\n             * @grammar cancelFile( file ) => undefined\n             * @grammar cancelFile( id ) => undefined\n             * @param {File|id} file File对象或这File对象的id\n             * @description 标记文件状态为已取消, 同时将中断文件传输。\n             * @for  Uploader\n             * @example\n             *\n             * $li.on('click', '.remove-this', function() {\n             *     uploader.cancelFile( file );\n             * })\n             */\n            cancelFile: function( file ) {\n                file = file.id ? file : this.request( 'get-file', file );\n    \n                // 如果正在上传。\n                file.blocks && $.each( file.blocks, function( _, v ) {\n                    var _tr = v.transport;\n    \n                    if ( _tr ) {\n                        _tr.abort();\n                        _tr.destroy();\n                        delete v.transport;\n                    }\n                });\n    \n                file.setStatus( Status.CANCELLED );\n                this.owner.trigger( 'fileDequeued', file );\n            },\n    \n            /**\n             * 判断`Uplaode`r是否正在上传中。\n             * @grammar isInProgress() => Boolean\n             * @method isInProgress\n             * @for  Uploader\n             */\n            isInProgress: function() {\n                return !!this.progress;\n            },\n    \n            _getStats: function() {\n                return this.request('get-stats');\n            },\n    \n            /**\n             * 掉过一个文件上传，直接标记指定文件为已上传状态。\n             * @grammar skipFile( file ) => undefined\n             * @method skipFile\n             * @for  Uploader\n             */\n            skipFile: function( file, status ) {\n                file = file.id ? file : this.request( 'get-file', file );\n    \n                file.setStatus( status || Status.COMPLETE );\n                file.skipped = true;\n    \n                // 如果正在上传。\n                file.blocks && $.each( file.blocks, function( _, v ) {\n                    var _tr = v.transport;\n    \n                    if ( _tr ) {\n                        _tr.abort();\n                        _tr.destroy();\n                        delete v.transport;\n                    }\n                });\n    \n                this.owner.trigger( 'uploadSkip', file );\n            },\n    \n            /**\n             * @event uploadFinished\n             * @description 当所有文件上传结束时触发。\n             * @for  Uploader\n             */\n            _tick: function() {\n                var me = this,\n                    opts = me.options,\n                    fn, val;\n    \n                // 上一个promise还没有结束，则等待完成后再执行。\n                if ( me._promise ) {\n                    return me._promise.always( me.__tick );\n                }\n    \n                // 还有位置，且还有文件要处理的话。\n                if ( me.pool.length < opts.threads && (val = me._nextBlock()) ) {\n                    me._trigged = false;\n    \n                    fn = function( val ) {\n                        me._promise = null;\n    \n                        // 有可能是reject过来的，所以要检测val的类型。\n                        val && val.file && me._startSend( val );\n                        Base.nextTick( me.__tick );\n                    };\n    \n                    me._promise = isPromise( val ) ? val.always( fn ) : fn( val );\n    \n                // 没有要上传的了，且没有正在传输的了。\n                } else if ( !me.remaning && !me._getStats().numOfQueue &&\n                    !me._getStats().numofInterrupt ) {\n                    me.runing = false;\n    \n                    me._trigged || Base.nextTick(function() {\n                        me.owner.trigger('uploadFinished');\n                    });\n                    me._trigged = true;\n                }\n            },\n    \n            _putback: function(block) {\n                var idx;\n    \n                block.cuted.unshift(block);\n                idx = this.stack.indexOf(block.cuted);\n    \n                if (!~idx) {\n                    this.stack.unshift(block.cuted);\n                }\n            },\n    \n            _getStack: function() {\n                var i = 0,\n                    act;\n    \n                while ( (act = this.stack[ i++ ]) ) {\n                    if ( act.has() && act.file.getStatus() === Status.PROGRESS ) {\n                        return act;\n                    } else if (!act.has() ||\n                            act.file.getStatus() !== Status.PROGRESS &&\n                            act.file.getStatus() !== Status.INTERRUPT ) {\n    \n                        // 把已经处理完了的，或者，状态为非 progress（上传中）、\n                        // interupt（暂停中） 的移除。\n                        this.stack.splice( --i, 1 );\n                    }\n                }\n    \n                return null;\n            },\n    \n            _nextBlock: function() {\n                var me = this,\n                    opts = me.options,\n                    act, next, done, preparing;\n    \n                // 如果当前文件还有没有需要传输的，则直接返回剩下的。\n                if ( (act = this._getStack()) ) {\n    \n                    // 是否提前准备下一个文件\n                    if ( opts.prepareNextFile && !me.pending.length ) {\n                        me._prepareNextFile();\n                    }\n    \n                    return act.shift();\n    \n                // 否则，如果正在运行，则准备下一个文件，并等待完成后返回下个分片。\n                } else if ( me.runing ) {\n    \n                    // 如果缓存中有，则直接在缓存中取，没有则去queue中取。\n                    if ( !me.pending.length && me._getStats().numOfQueue ) {\n                        me._prepareNextFile();\n                    }\n    \n                    next = me.pending.shift();\n                    done = function( file ) {\n                        if ( !file ) {\n                            return null;\n                        }\n    \n                        act = CuteFile( file, opts.chunked ? opts.chunkSize : 0 );\n                        me.stack.push(act);\n                        return act.shift();\n                    };\n    \n                    // 文件可能还在prepare中，也有可能已经完全准备好了。\n                    if ( isPromise( next) ) {\n                        preparing = next.file;\n                        next = next[ next.pipe ? 'pipe' : 'then' ]( done );\n                        next.file = preparing;\n                        return next;\n                    }\n    \n                    return done( next );\n                }\n            },\n    \n    \n            /**\n             * @event uploadStart\n             * @param {File} file File对象\n             * @description 某个文件开始上传前触发，一个文件只会触发一次。\n             * @for  Uploader\n             */\n            _prepareNextFile: function() {\n                var me = this,\n                    file = me.request('fetch-file'),\n                    pending = me.pending,\n                    promise;\n    \n                if ( file ) {\n                    promise = me.request( 'before-send-file', file, function() {\n    \n                        // 有可能文件被skip掉了。文件被skip掉后，状态坑定不是Queued.\n                        if ( file.getStatus() === Status.PROGRESS ||\n                            file.getStatus() === Status.INTERRUPT ) {\n                            return file;\n                        }\n    \n                        return me._finishFile( file );\n                    });\n    \n                    me.owner.trigger( 'uploadStart', file );\n                    file.setStatus( Status.PROGRESS );\n    \n                    promise.file = file;\n    \n                    // 如果还在pending中，则替换成文件本身。\n                    promise.done(function() {\n                        var idx = $.inArray( promise, pending );\n    \n                        ~idx && pending.splice( idx, 1, file );\n                    });\n    \n                    // befeore-send-file的钩子就有错误发生。\n                    promise.fail(function( reason ) {\n                        file.setStatus( Status.ERROR, reason );\n                        me.owner.trigger( 'uploadError', file, reason );\n                        me.owner.trigger( 'uploadComplete', file );\n                    });\n    \n                    pending.push( promise );\n                }\n            },\n    \n            // 让出位置了，可以让其他分片开始上传\n            _popBlock: function( block ) {\n                var idx = $.inArray( block, this.pool );\n    \n                this.pool.splice( idx, 1 );\n                block.file.remaning--;\n                this.remaning--;\n            },\n    \n            // 开始上传，可以被掉过。如果promise被reject了，则表示跳过此分片。\n            _startSend: function( block ) {\n                var me = this,\n                    file = block.file,\n                    promise;\n    \n                // 有可能在 before-send-file 的 promise 期间改变了文件状态。\n                // 如：暂停，取消\n                // 我们不能中断 promise, 但是可以在 promise 完后，不做上传操作。\n                if ( file.getStatus() !== Status.PROGRESS ) {\n    \n                    // 如果是中断，则还需要放回去。\n                    if (file.getStatus() === Status.INTERRUPT) {\n                        me._putback(block);\n                    }\n    \n                    return;\n                }\n    \n                me.pool.push( block );\n                me.remaning++;\n    \n                // 如果没有分片，则直接使用原始的。\n                // 不会丢失content-type信息。\n                block.blob = block.chunks === 1 ? file.source :\n                        file.source.slice( block.start, block.end );\n    \n                // hook, 每个分片发送之前可能要做些异步的事情。\n                promise = me.request( 'before-send', block, function() {\n    \n                    // 有可能文件已经上传出错了，所以不需要再传输了。\n                    if ( file.getStatus() === Status.PROGRESS ) {\n                        me._doSend( block );\n                    } else {\n                        me._popBlock( block );\n                        Base.nextTick( me.__tick );\n                    }\n                });\n    \n                // 如果为fail了，则跳过此分片。\n                promise.fail(function() {\n                    if ( file.remaning === 1 ) {\n                        me._finishFile( file ).always(function() {\n                            block.percentage = 1;\n                            me._popBlock( block );\n                            me.owner.trigger( 'uploadComplete', file );\n                            Base.nextTick( me.__tick );\n                        });\n                    } else {\n                        block.percentage = 1;\n                        me.updateFileProgress( file );\n                        me._popBlock( block );\n                        Base.nextTick( me.__tick );\n                    }\n                });\n            },\n    \n    \n            /**\n             * @event uploadBeforeSend\n             * @param {Object} object\n             * @param {Object} data 默认的上传参数，可以扩展此对象来控制上传参数。\n             * @param {Object} headers 可以扩展此对象来控制上传头部。\n             * @description 当某个文件的分块在发送前触发，主要用来询问是否要添加附带参数，大文件在开起分片上传的前提下此事件可能会触发多次。\n             * @for  Uploader\n             */\n    \n            /**\n             * @event uploadAccept\n             * @param {Object} object\n             * @param {Object} ret 服务端的返回数据，json格式，如果服务端不是json格式，从ret._raw中取数据，自行解析。\n             * @description 当某个文件上传到服务端响应后，会派送此事件来询问服务端响应是否有效。如果此事件handler返回值为`false`, 则此文件将派送`server`类型的`uploadError`事件。\n             * @for  Uploader\n             */\n    \n            /**\n             * @event uploadProgress\n             * @param {File} file File对象\n             * @param {Number} percentage 上传进度\n             * @description 上传过程中触发，携带上传进度。\n             * @for  Uploader\n             */\n    \n    \n            /**\n             * @event uploadError\n             * @param {File} file File对象\n             * @param {String} reason 出错的code\n             * @description 当文件上传出错时触发。\n             * @for  Uploader\n             */\n    \n            /**\n             * @event uploadSuccess\n             * @param {File} file File对象\n             * @param {Object} response 服务端返回的数据\n             * @description 当文件上传成功时触发。\n             * @for  Uploader\n             */\n    \n            /**\n             * @event uploadComplete\n             * @param {File} [file] File对象\n             * @description 不管成功或者失败，文件上传完成时触发。\n             * @for  Uploader\n             */\n    \n            // 做上传操作。\n            _doSend: function( block ) {\n                var me = this,\n                    owner = me.owner,\n                    opts = me.options,\n                    file = block.file,\n                    tr = new Transport( opts ),\n                    data = $.extend({}, opts.formData ),\n                    headers = $.extend({}, opts.headers ),\n                    requestAccept, ret;\n    \n                block.transport = tr;\n    \n                tr.on( 'destroy', function() {\n                    delete block.transport;\n                    me._popBlock( block );\n                    Base.nextTick( me.__tick );\n                });\n    \n                // 广播上传进度。以文件为单位。\n                tr.on( 'progress', function( percentage ) {\n                    block.percentage = percentage;\n                    me.updateFileProgress( file );\n                });\n    \n                // 用来询问，是否返回的结果是有错误的。\n                requestAccept = function( reject ) {\n                    var fn;\n    \n                    ret = tr.getResponseAsJson() || {};\n                    ret._raw = tr.getResponse();\n                    fn = function( value ) {\n                        reject = value;\n                    };\n    \n                    // 服务端响应了，不代表成功了，询问是否响应正确。\n                    if ( !owner.trigger( 'uploadAccept', block, ret, fn ) ) {\n                        reject = reject || 'server';\n                    }\n    \n                    return reject;\n                };\n    \n                // 尝试重试，然后广播文件上传出错。\n                tr.on( 'error', function( type, flag ) {\n                    block.retried = block.retried || 0;\n    \n                    // 自动重试\n                    if ( block.chunks > 1 && ~'http,abort'.indexOf( type ) &&\n                            block.retried < opts.chunkRetry ) {\n    \n                        block.retried++;\n                        tr.send();\n    \n                    } else {\n    \n                        // http status 500 ~ 600\n                        if ( !flag && type === 'server' ) {\n                            type = requestAccept( type );\n                        }\n    \n                        file.setStatus( Status.ERROR, type );\n                        owner.trigger( 'uploadError', file, type );\n                        owner.trigger( 'uploadComplete', file );\n                    }\n                });\n    \n                // 上传成功\n                tr.on( 'load', function() {\n                    var reason;\n    \n                    // 如果非预期，转向上传出错。\n                    if ( (reason = requestAccept()) ) {\n                        tr.trigger( 'error', reason, true );\n                        return;\n                    }\n    \n                    // 全部上传完成。\n                    if ( file.remaning === 1 ) {\n                        me._finishFile( file, ret );\n                    } else {\n                        tr.destroy();\n                    }\n                });\n    \n                // 配置默认的上传字段。\n                data = $.extend( data, {\n                    id: file.id,\n                    name: file.name,\n                    type: file.type,\n                    lastModifiedDate: file.lastModifiedDate,\n                    size: file.size\n                });\n    \n                block.chunks > 1 && $.extend( data, {\n                    chunks: block.chunks,\n                    chunk: block.chunk\n                });\n    \n                // 在发送之间可以添加字段什么的。。。\n                // 如果默认的字段不够使用，可以通过监听此事件来扩展\n                owner.trigger( 'uploadBeforeSend', block, data, headers );\n    \n                // 开始发送。\n                tr.appendBlob( opts.fileVal, block.blob, file.name );\n                tr.append( data );\n                tr.setRequestHeader( headers );\n                tr.send();\n            },\n    \n            // 完成上传。\n            _finishFile: function( file, ret, hds ) {\n                var owner = this.owner;\n    \n                return owner\n                        .request( 'after-send-file', arguments, function() {\n                            file.setStatus( Status.COMPLETE );\n                            owner.trigger( 'uploadSuccess', file, ret, hds );\n                        })\n                        .fail(function( reason ) {\n    \n                            // 如果外部已经标记为invalid什么的，不再改状态。\n                            if ( file.getStatus() === Status.PROGRESS ) {\n                                file.setStatus( Status.ERROR, reason );\n                            }\n    \n                            owner.trigger( 'uploadError', file, reason );\n                        })\n                        .always(function() {\n                            owner.trigger( 'uploadComplete', file );\n                        });\n            },\n    \n            updateFileProgress: function(file) {\n                var totalPercent = 0,\n                    uploaded = 0;\n    \n                if (!file.blocks) {\n                    return;\n                }\n    \n                $.each( file.blocks, function( _, v ) {\n                    uploaded += (v.percentage || 0) * (v.end - v.start);\n                });\n    \n                totalPercent = uploaded / file.size;\n                this.owner.trigger( 'uploadProgress', file, totalPercent || 0 );\n            }\n    \n        });\n    });\n    \n    /**\n     * @fileOverview 各种验证，包括文件总大小是否超出、单文件是否超出和文件是否重复。\n     */\n    \n    define('widgets/validator',[\n        'base',\n        'uploader',\n        'file',\n        'widgets/widget'\n    ], function( Base, Uploader, WUFile ) {\n    \n        var $ = Base.$,\n            validators = {},\n            api;\n    \n        /**\n         * @event error\n         * @param {String} type 错误类型。\n         * @description 当validate不通过时，会以派送错误事件的形式通知调用者。通过`upload.on('error', handler)`可以捕获到此类错误，目前有以下错误会在特定的情况下派送错来。\n         *\n         * * `Q_EXCEED_NUM_LIMIT` 在设置了`fileNumLimit`且尝试给`uploader`添加的文件数量超出这个值时派送。\n         * * `Q_EXCEED_SIZE_LIMIT` 在设置了`Q_EXCEED_SIZE_LIMIT`且尝试给`uploader`添加的文件总大小超出这个值时派送。\n         * * `Q_TYPE_DENIED` 当文件类型不满足时触发。。\n         * @for  Uploader\n         */\n    \n        // 暴露给外面的api\n        api = {\n    \n            // 添加验证器\n            addValidator: function( type, cb ) {\n                validators[ type ] = cb;\n            },\n    \n            // 移除验证器\n            removeValidator: function( type ) {\n                delete validators[ type ];\n            }\n        };\n    \n        // 在Uploader初始化的时候启动Validators的初始化\n        Uploader.register({\n            name: 'validator',\n    \n            init: function() {\n                var me = this;\n                Base.nextTick(function() {\n                    $.each( validators, function() {\n                        this.call( me.owner );\n                    });\n                });\n            }\n        });\n    \n        /**\n         * @property {int} [fileNumLimit=undefined]\n         * @namespace options\n         * @for Uploader\n         * @description 验证文件总数量, 超出则不允许加入队列。\n         */\n        api.addValidator( 'fileNumLimit', function() {\n            var uploader = this,\n                opts = uploader.options,\n                count = 0,\n                max = parseInt( opts.fileNumLimit, 10 ),\n                flag = true;\n    \n            if ( !max ) {\n                return;\n            }\n    \n            uploader.on( 'beforeFileQueued', function( file ) {\n    \n                if ( count >= max && flag ) {\n                    flag = false;\n                    this.trigger( 'error', 'Q_EXCEED_NUM_LIMIT', max, file );\n                    setTimeout(function() {\n                        flag = true;\n                    }, 1 );\n                }\n    \n                return count >= max ? false : true;\n            });\n    \n            uploader.on( 'fileQueued', function() {\n                count++;\n            });\n    \n            uploader.on( 'fileDequeued', function() {\n                count--;\n            });\n    \n            uploader.on( 'reset', function() {\n                count = 0;\n            });\n        });\n    \n    \n        /**\n         * @property {int} [fileSizeLimit=undefined]\n         * @namespace options\n         * @for Uploader\n         * @description 验证文件总大小是否超出限制, 超出则不允许加入队列。\n         */\n        api.addValidator( 'fileSizeLimit', function() {\n            var uploader = this,\n                opts = uploader.options,\n                count = 0,\n                max = parseInt( opts.fileSizeLimit, 10 ),\n                flag = true;\n    \n            if ( !max ) {\n                return;\n            }\n    \n            uploader.on( 'beforeFileQueued', function( file ) {\n                var invalid = count + file.size > max;\n    \n                if ( invalid && flag ) {\n                    flag = false;\n                    this.trigger( 'error', 'Q_EXCEED_SIZE_LIMIT', max, file );\n                    setTimeout(function() {\n                        flag = true;\n                    }, 1 );\n                }\n    \n                return invalid ? false : true;\n            });\n    \n            uploader.on( 'fileQueued', function( file ) {\n                count += file.size;\n            });\n    \n            uploader.on( 'fileDequeued', function( file ) {\n                count -= file.size;\n            });\n    \n            uploader.on( 'reset', function() {\n                count = 0;\n            });\n        });\n    \n        /**\n         * @property {int} [fileSingleSizeLimit=undefined]\n         * @namespace options\n         * @for Uploader\n         * @description 验证单个文件大小是否超出限制, 超出则不允许加入队列。\n         */\n        api.addValidator( 'fileSingleSizeLimit', function() {\n            var uploader = this,\n                opts = uploader.options,\n                max = opts.fileSingleSizeLimit;\n    \n            if ( !max ) {\n                return;\n            }\n    \n            uploader.on( 'beforeFileQueued', function( file ) {\n    \n                if ( file.size > max ) {\n                    file.setStatus( WUFile.Status.INVALID, 'exceed_size' );\n                    this.trigger( 'error', 'F_EXCEED_SIZE', max, file );\n                    return false;\n                }\n    \n            });\n    \n        });\n    \n        /**\n         * @property {Boolean} [duplicate=undefined]\n         * @namespace options\n         * @for Uploader\n         * @description 去重， 根据文件名字、文件大小和最后修改时间来生成hash Key.\n         */\n        api.addValidator( 'duplicate', function() {\n            var uploader = this,\n                opts = uploader.options,\n                mapping = {};\n    \n            if ( opts.duplicate ) {\n                return;\n            }\n    \n            function hashString( str ) {\n                var hash = 0,\n                    i = 0,\n                    len = str.length,\n                    _char;\n    \n                for ( ; i < len; i++ ) {\n                    _char = str.charCodeAt( i );\n                    hash = _char + (hash << 6) + (hash << 16) - hash;\n                }\n    \n                return hash;\n            }\n    \n            uploader.on( 'beforeFileQueued', function( file ) {\n                var hash = file.__hash || (file.__hash = hashString( file.name +\n                        file.size + file.lastModifiedDate ));\n    \n                // 已经重复了\n                if ( mapping[ hash ] ) {\n                    this.trigger( 'error', 'F_DUPLICATE', file );\n                    return false;\n                }\n            });\n    \n            uploader.on( 'fileQueued', function( file ) {\n                var hash = file.__hash;\n    \n                hash && (mapping[ hash ] = true);\n            });\n    \n            uploader.on( 'fileDequeued', function( file ) {\n                var hash = file.__hash;\n    \n                hash && (delete mapping[ hash ]);\n            });\n    \n            uploader.on( 'reset', function() {\n                mapping = {};\n            });\n        });\n    \n        return api;\n    });\n    \n    /**\n     * @fileOverview Md5\n     */\n    define('lib/md5',[\n        'runtime/client',\n        'mediator'\n    ], function( RuntimeClient, Mediator ) {\n    \n        function Md5() {\n            RuntimeClient.call( this, 'Md5' );\n        }\n    \n        // 让 Md5 具备事件功能。\n        Mediator.installTo( Md5.prototype );\n    \n        Md5.prototype.loadFromBlob = function( blob ) {\n            var me = this;\n    \n            if ( me.getRuid() ) {\n                me.disconnectRuntime();\n            }\n    \n            // 连接到blob归属的同一个runtime.\n            me.connectRuntime( blob.ruid, function() {\n                me.exec('init');\n                me.exec( 'loadFromBlob', blob );\n            });\n        };\n    \n        Md5.prototype.getResult = function() {\n            return this.exec('getResult');\n        };\n    \n        return Md5;\n    });\n    /**\n     * @fileOverview 图片操作, 负责预览图片和上传前压缩图片\n     */\n    define('widgets/md5',[\n        'base',\n        'uploader',\n        'lib/md5',\n        'lib/blob',\n        'widgets/widget'\n    ], function( Base, Uploader, Md5, Blob ) {\n    \n        return Uploader.register({\n            name: 'md5',\n    \n    \n            /**\n             * 计算文件 md5 值，返回一个 promise 对象，可以监听 progress 进度。\n             *\n             *\n             * @method md5File\n             * @grammar md5File( file[, start[, end]] ) => promise\n             * @for Uploader\n             * @example\n             *\n             * uploader.on( 'fileQueued', function( file ) {\n             *     var $li = ...;\n             *\n             *     uploader.md5File( file )\n             *\n             *         // 及时显示进度\n             *         .progress(function(percentage) {\n             *             console.log('Percentage:', percentage);\n             *         })\n             *\n             *         // 完成\n             *         .then(function(val) {\n             *             console.log('md5 result:', val);\n             *         });\n             *\n             * });\n             */\n            md5File: function( file, start, end ) {\n                var md5 = new Md5(),\n                    deferred = Base.Deferred(),\n                    blob = (file instanceof Blob) ? file :\n                        this.request( 'get-file', file ).source;\n    \n                md5.on( 'progress load', function( e ) {\n                    e = e || {};\n                    deferred.notify( e.total ? e.loaded / e.total : 1 );\n                });\n    \n                md5.on( 'complete', function() {\n                    deferred.resolve( md5.getResult() );\n                });\n    \n                md5.on( 'error', function( reason ) {\n                    deferred.reject( reason );\n                });\n    \n                if ( arguments.length > 1 ) {\n                    start = start || 0;\n                    end = end || 0;\n                    start < 0 && (start = blob.size + start);\n                    end < 0 && (end = blob.size + end);\n                    end = Math.min( end, blob.size );\n                    blob = blob.slice( start, end );\n                }\n    \n                md5.loadFromBlob( blob );\n    \n                return deferred.promise();\n            }\n        });\n    });\n    /**\n     * @fileOverview Runtime管理器，负责Runtime的选择, 连接\n     */\n    define('runtime/compbase',[],function() {\n    \n        function CompBase( owner, runtime ) {\n    \n            this.owner = owner;\n            this.options = owner.options;\n    \n            this.getRuntime = function() {\n                return runtime;\n            };\n    \n            this.getRuid = function() {\n                return runtime.uid;\n            };\n    \n            this.trigger = function() {\n                return owner.trigger.apply( owner, arguments );\n            };\n        }\n    \n        return CompBase;\n    });\n    /**\n     * @fileOverview Html5Runtime\n     */\n    define('runtime/html5/runtime',[\n        'base',\n        'runtime/runtime',\n        'runtime/compbase'\n    ], function( Base, Runtime, CompBase ) {\n    \n        var type = 'html5',\n            components = {};\n    \n        function Html5Runtime() {\n            var pool = {},\n                me = this,\n                destroy = this.destroy;\n    \n            Runtime.apply( me, arguments );\n            me.type = type;\n    \n    \n            // 这个方法的调用者，实际上是RuntimeClient\n            me.exec = function( comp, fn/*, args...*/) {\n                var client = this,\n                    uid = client.uid,\n                    args = Base.slice( arguments, 2 ),\n                    instance;\n    \n                if ( components[ comp ] ) {\n                    instance = pool[ uid ] = pool[ uid ] ||\n                            new components[ comp ]( client, me );\n    \n                    if ( instance[ fn ] ) {\n                        return instance[ fn ].apply( instance, args );\n                    }\n                }\n            };\n    \n            me.destroy = function() {\n                // @todo 删除池子中的所有实例\n                return destroy && destroy.apply( this, arguments );\n            };\n        }\n    \n        Base.inherits( Runtime, {\n            constructor: Html5Runtime,\n    \n            // 不需要连接其他程序，直接执行callback\n            init: function() {\n                var me = this;\n                setTimeout(function() {\n                    me.trigger('ready');\n                }, 1 );\n            }\n    \n        });\n    \n        // 注册Components\n        Html5Runtime.register = function( name, component ) {\n            var klass = components[ name ] = Base.inherits( CompBase, component );\n            return klass;\n        };\n    \n        // 注册html5运行时。\n        // 只有在支持的前提下注册。\n        if ( window.Blob && window.FileReader && window.DataView ) {\n            Runtime.addRuntime( type, Html5Runtime );\n        }\n    \n        return Html5Runtime;\n    });\n    /**\n     * @fileOverview Blob Html实现\n     */\n    define('runtime/html5/blob',[\n        'runtime/html5/runtime',\n        'lib/blob'\n    ], function( Html5Runtime, Blob ) {\n    \n        return Html5Runtime.register( 'Blob', {\n            slice: function( start, end ) {\n                var blob = this.owner.source,\n                    slice = blob.slice || blob.webkitSlice || blob.mozSlice;\n    \n                blob = slice.call( blob, start, end );\n    \n                return new Blob( this.getRuid(), blob );\n            }\n        });\n    });\n    /**\n     * @fileOverview FilePaste\n     */\n    define('runtime/html5/dnd',[\n        'base',\n        'runtime/html5/runtime',\n        'lib/file'\n    ], function( Base, Html5Runtime, File ) {\n    \n        var $ = Base.$,\n            prefix = 'webuploader-dnd-';\n    \n        return Html5Runtime.register( 'DragAndDrop', {\n            init: function() {\n                var elem = this.elem = this.options.container;\n    \n                this.dragEnterHandler = Base.bindFn( this._dragEnterHandler, this );\n                this.dragOverHandler = Base.bindFn( this._dragOverHandler, this );\n                this.dragLeaveHandler = Base.bindFn( this._dragLeaveHandler, this );\n                this.dropHandler = Base.bindFn( this._dropHandler, this );\n                this.dndOver = false;\n    \n                elem.on( 'dragenter', this.dragEnterHandler );\n                elem.on( 'dragover', this.dragOverHandler );\n                elem.on( 'dragleave', this.dragLeaveHandler );\n                elem.on( 'drop', this.dropHandler );\n    \n                if ( this.options.disableGlobalDnd ) {\n                    $( document ).on( 'dragover', this.dragOverHandler );\n                    $( document ).on( 'drop', this.dropHandler );\n                }\n            },\n    \n            _dragEnterHandler: function( e ) {\n                var me = this,\n                    denied = me._denied || false,\n                    items;\n    \n                e = e.originalEvent || e;\n    \n                if ( !me.dndOver ) {\n                    me.dndOver = true;\n    \n                    // 注意只有 chrome 支持。\n                    items = e.dataTransfer.items;\n    \n                    if ( items && items.length ) {\n                        me._denied = denied = !me.trigger( 'accept', items );\n                    }\n    \n                    me.elem.addClass( prefix + 'over' );\n                    me.elem[ denied ? 'addClass' :\n                            'removeClass' ]( prefix + 'denied' );\n                }\n    \n                e.dataTransfer.dropEffect = denied ? 'none' : 'copy';\n    \n                return false;\n            },\n    \n            _dragOverHandler: function( e ) {\n                // 只处理框内的。\n                var parentElem = this.elem.parent().get( 0 );\n                if ( parentElem && !$.contains( parentElem, e.currentTarget ) ) {\n                    return false;\n                }\n    \n                clearTimeout( this._leaveTimer );\n                this._dragEnterHandler.call( this, e );\n    \n                return false;\n            },\n    \n            _dragLeaveHandler: function() {\n                var me = this,\n                    handler;\n    \n                handler = function() {\n                    me.dndOver = false;\n                    me.elem.removeClass( prefix + 'over ' + prefix + 'denied' );\n                };\n    \n                clearTimeout( me._leaveTimer );\n                me._leaveTimer = setTimeout( handler, 100 );\n                return false;\n            },\n    \n            _dropHandler: function( e ) {\n                var me = this,\n                    ruid = me.getRuid(),\n                    parentElem = me.elem.parent().get( 0 ),\n                    dataTransfer, data;\n    \n                // 只处理框内的。\n                if ( parentElem && !$.contains( parentElem, e.currentTarget ) ) {\n                    return false;\n                }\n    \n                e = e.originalEvent || e;\n                dataTransfer = e.dataTransfer;\n    \n                // 如果是页面内拖拽，还不能处理，不阻止事件。\n                // 此处 ie11 下会报参数错误，\n                try {\n                    data = dataTransfer.getData('text/html');\n                } catch( err ) {\n                }\n    \n                me.dndOver = false;\n                me.elem.removeClass( prefix + 'over' );\n    \n                if ( data ) {\n                    return;\n                }\n    \n                me._getTansferFiles( dataTransfer, function( results ) {\n                    me.trigger( 'drop', $.map( results, function( file ) {\n                        return new File( ruid, file );\n                    }) );\n                });\n    \n                return false;\n            },\n    \n            // 如果传入 callback 则去查看文件夹，否则只管当前文件夹。\n            _getTansferFiles: function( dataTransfer, callback ) {\n                var results  = [],\n                    promises = [],\n                    items, files, file, item, i, len, canAccessFolder;\n    \n                items = dataTransfer.items;\n                files = dataTransfer.files;\n    \n                canAccessFolder = !!(items && items[ 0 ].webkitGetAsEntry);\n    \n                for ( i = 0, len = files.length; i < len; i++ ) {\n                    file = files[ i ];\n                    item = items && items[ i ];\n    \n                    if ( canAccessFolder && item.webkitGetAsEntry().isDirectory ) {\n    \n                        promises.push( this._traverseDirectoryTree(\n                                item.webkitGetAsEntry(), results ) );\n                    } else {\n                        results.push( file );\n                    }\n                }\n    \n                Base.when.apply( Base, promises ).done(function() {\n    \n                    if ( !results.length ) {\n                        return;\n                    }\n    \n                    callback( results );\n                });\n            },\n    \n            _traverseDirectoryTree: function( entry, results ) {\n                var deferred = Base.Deferred(),\n                    me = this;\n    \n                if ( entry.isFile ) {\n                    entry.file(function( file ) {\n                        results.push( file );\n                        deferred.resolve();\n                    });\n                } else if ( entry.isDirectory ) {\n                    entry.createReader().readEntries(function( entries ) {\n                        var len = entries.length,\n                            promises = [],\n                            arr = [],    // 为了保证顺序。\n                            i;\n    \n                        for ( i = 0; i < len; i++ ) {\n                            promises.push( me._traverseDirectoryTree(\n                                    entries[ i ], arr ) );\n                        }\n    \n                        Base.when.apply( Base, promises ).then(function() {\n                            results.push.apply( results, arr );\n                            deferred.resolve();\n                        }, deferred.reject );\n                    });\n                }\n    \n                return deferred.promise();\n            },\n    \n            destroy: function() {\n                var elem = this.elem;\n    \n                // 还没 init 就调用 destroy\n                if (!elem) {\n                    return;\n                }\n    \n                elem.off( 'dragenter', this.dragEnterHandler );\n                elem.off( 'dragover', this.dragOverHandler );\n                elem.off( 'dragleave', this.dragLeaveHandler );\n                elem.off( 'drop', this.dropHandler );\n    \n                if ( this.options.disableGlobalDnd ) {\n                    $( document ).off( 'dragover', this.dragOverHandler );\n                    $( document ).off( 'drop', this.dropHandler );\n                }\n            }\n        });\n    });\n    \n    /**\n     * @fileOverview FilePaste\n     */\n    define('runtime/html5/filepaste',[\n        'base',\n        'runtime/html5/runtime',\n        'lib/file'\n    ], function( Base, Html5Runtime, File ) {\n    \n        return Html5Runtime.register( 'FilePaste', {\n            init: function() {\n                var opts = this.options,\n                    elem = this.elem = opts.container,\n                    accept = '.*',\n                    arr, i, len, item;\n    \n                // accetp的mimeTypes中生成匹配正则。\n                if ( opts.accept ) {\n                    arr = [];\n    \n                    for ( i = 0, len = opts.accept.length; i < len; i++ ) {\n                        item = opts.accept[ i ].mimeTypes;\n                        item && arr.push( item );\n                    }\n    \n                    if ( arr.length ) {\n                        accept = arr.join(',');\n                        accept = accept.replace( /,/g, '|' ).replace( /\\*/g, '.*' );\n                    }\n                }\n                this.accept = accept = new RegExp( accept, 'i' );\n                this.hander = Base.bindFn( this._pasteHander, this );\n                elem.on( 'paste', this.hander );\n            },\n    \n            _pasteHander: function( e ) {\n                var allowed = [],\n                    ruid = this.getRuid(),\n                    items, item, blob, i, len;\n    \n                e = e.originalEvent || e;\n                items = e.clipboardData.items;\n    \n                for ( i = 0, len = items.length; i < len; i++ ) {\n                    item = items[ i ];\n    \n                    if ( item.kind !== 'file' || !(blob = item.getAsFile()) ) {\n                        continue;\n                    }\n    \n                    allowed.push( new File( ruid, blob ) );\n                }\n    \n                if ( allowed.length ) {\n                    // 不阻止非文件粘贴（文字粘贴）的事件冒泡\n                    e.preventDefault();\n                    e.stopPropagation();\n                    this.trigger( 'paste', allowed );\n                }\n            },\n    \n            destroy: function() {\n                this.elem.off( 'paste', this.hander );\n            }\n        });\n    });\n    \n    /**\n     * @fileOverview FilePicker\n     */\n    define('runtime/html5/filepicker',[\n        'base',\n        'runtime/html5/runtime'\n    ], function( Base, Html5Runtime ) {\n    \n        var $ = Base.$;\n    \n        return Html5Runtime.register( 'FilePicker', {\n            init: function() {\n                var container = this.getRuntime().getContainer(),\n                    me = this,\n                    owner = me.owner,\n                    opts = me.options,\n                    label = this.label = $( document.createElement('label') ),\n                    input =  this.input = $( document.createElement('input') ),\n                    arr, i, len, mouseHandler;\n    \n                input.attr( 'type', 'file' );\n                input.attr( 'capture', 'camera');\n                input.attr( 'name', opts.name );\n                input.addClass('webuploader-element-invisible');\n    \n                label.on( 'click', function(e) {\n                    input.trigger('click');\n                    e.stopPropagation();\n                    owner.trigger('dialogopen');\n                });\n    \n                label.css({\n                    opacity: 0,\n                    width: '100%',\n                    height: '100%',\n                    display: 'block',\n                    cursor: 'pointer',\n                    background: '#ffffff'\n                });\n    \n                if ( opts.multiple ) {\n                    input.attr( 'multiple', 'multiple' );\n                }\n    \n                // @todo Firefox不支持单独指定后缀\n                if ( opts.accept && opts.accept.length > 0 ) {\n                    arr = [];\n    \n                    for ( i = 0, len = opts.accept.length; i < len; i++ ) {\n                        arr.push( opts.accept[ i ].mimeTypes );\n                    }\n    \n                    input.attr( 'accept', arr.join(',') );\n                }\n    \n                container.append( input );\n                container.append( label );\n    \n                mouseHandler = function( e ) {\n                    owner.trigger( e.type );\n                };\n    \n                input.on( 'change', function( e ) {\n                    var fn = arguments.callee,\n                        clone;\n    \n                    me.files = e.target.files;\n    \n                    // reset input\n                    clone = this.cloneNode( true );\n                    clone.value = null;\n                    this.parentNode.replaceChild( clone, this );\n    \n                    input.off();\n                    input = $( clone ).on( 'change', fn )\n                            .on( 'mouseenter mouseleave', mouseHandler );\n    \n                    owner.trigger('change');\n                });\n    \n                label.on( 'mouseenter mouseleave', mouseHandler );\n    \n            },\n    \n    \n            getFiles: function() {\n                return this.files;\n            },\n    \n            destroy: function() {\n                this.input.off();\n                this.label.off();\n            }\n        });\n    });\n    \n    /**\n     * Terms:\n     *\n     * Uint8Array, FileReader, BlobBuilder, atob, ArrayBuffer\n     * @fileOverview Image控件\n     */\n    define('runtime/html5/util',[\n        'base'\n    ], function( Base ) {\n    \n        var urlAPI = window.createObjectURL && window ||\n                window.URL && URL.revokeObjectURL && URL ||\n                window.webkitURL,\n            createObjectURL = Base.noop,\n            revokeObjectURL = createObjectURL;\n    \n        if ( urlAPI ) {\n    \n            // 更安全的方式调用，比如android里面就能把context改成其他的对象。\n            createObjectURL = function() {\n                return urlAPI.createObjectURL.apply( urlAPI, arguments );\n            };\n    \n            revokeObjectURL = function() {\n                return urlAPI.revokeObjectURL.apply( urlAPI, arguments );\n            };\n        }\n    \n        return {\n            createObjectURL: createObjectURL,\n            revokeObjectURL: revokeObjectURL,\n    \n            dataURL2Blob: function( dataURI ) {\n                var byteStr, intArray, ab, i, mimetype, parts;\n    \n                parts = dataURI.split(',');\n    \n                if ( ~parts[ 0 ].indexOf('base64') ) {\n                    byteStr = atob( parts[ 1 ] );\n                } else {\n                    byteStr = decodeURIComponent( parts[ 1 ] );\n                }\n    \n                ab = new ArrayBuffer( byteStr.length );\n                intArray = new Uint8Array( ab );\n    \n                for ( i = 0; i < byteStr.length; i++ ) {\n                    intArray[ i ] = byteStr.charCodeAt( i );\n                }\n    \n                mimetype = parts[ 0 ].split(':')[ 1 ].split(';')[ 0 ];\n    \n                return this.arrayBufferToBlob( ab, mimetype );\n            },\n    \n            dataURL2ArrayBuffer: function( dataURI ) {\n                var byteStr, intArray, i, parts;\n    \n                parts = dataURI.split(',');\n    \n                if ( ~parts[ 0 ].indexOf('base64') ) {\n                    byteStr = atob( parts[ 1 ] );\n                } else {\n                    byteStr = decodeURIComponent( parts[ 1 ] );\n                }\n    \n                intArray = new Uint8Array( byteStr.length );\n    \n                for ( i = 0; i < byteStr.length; i++ ) {\n                    intArray[ i ] = byteStr.charCodeAt( i );\n                }\n    \n                return intArray.buffer;\n            },\n    \n            arrayBufferToBlob: function( buffer, type ) {\n                var builder = window.BlobBuilder || window.WebKitBlobBuilder,\n                    bb;\n    \n                // android不支持直接new Blob, 只能借助blobbuilder.\n                if ( builder ) {\n                    bb = new builder();\n                    bb.append( buffer );\n                    return bb.getBlob( type );\n                }\n    \n                return new Blob([ buffer ], type ? { type: type } : {} );\n            },\n    \n            // 抽出来主要是为了解决android下面canvas.toDataUrl不支持jpeg.\n            // 你得到的结果是png.\n            canvasToDataUrl: function( canvas, type, quality ) {\n                return canvas.toDataURL( type, quality / 100 );\n            },\n    \n            // imagemeat会复写这个方法，如果用户选择加载那个文件了的话。\n            parseMeta: function( blob, callback ) {\n                callback( false, {});\n            },\n    \n            // imagemeat会复写这个方法，如果用户选择加载那个文件了的话。\n            updateImageHead: function( data ) {\n                return data;\n            }\n        };\n    });\n    /**\n     * Terms:\n     *\n     * Uint8Array, FileReader, BlobBuilder, atob, ArrayBuffer\n     * @fileOverview Image控件\n     */\n    define('runtime/html5/imagemeta',[\n        'runtime/html5/util'\n    ], function( Util ) {\n    \n        var api;\n    \n        api = {\n            parsers: {\n                0xffe1: []\n            },\n    \n            maxMetaDataSize: 262144,\n    \n            parse: function( blob, cb ) {\n                var me = this,\n                    fr = new FileReader();\n    \n                fr.onload = function() {\n                    cb( false, me._parse( this.result ) );\n                    fr = fr.onload = fr.onerror = null;\n                };\n    \n                fr.onerror = function( e ) {\n                    cb( e.message );\n                    fr = fr.onload = fr.onerror = null;\n                };\n    \n                blob = blob.slice( 0, me.maxMetaDataSize );\n                fr.readAsArrayBuffer( blob.getSource() );\n            },\n    \n            _parse: function( buffer, noParse ) {\n                if ( buffer.byteLength < 6 ) {\n                    return;\n                }\n    \n                var dataview = new DataView( buffer ),\n                    offset = 2,\n                    maxOffset = dataview.byteLength - 4,\n                    headLength = offset,\n                    ret = {},\n                    markerBytes, markerLength, parsers, i;\n    \n                if ( dataview.getUint16( 0 ) === 0xffd8 ) {\n    \n                    while ( offset < maxOffset ) {\n                        markerBytes = dataview.getUint16( offset );\n    \n                        if ( markerBytes >= 0xffe0 && markerBytes <= 0xffef ||\n                                markerBytes === 0xfffe ) {\n    \n                            markerLength = dataview.getUint16( offset + 2 ) + 2;\n    \n                            if ( offset + markerLength > dataview.byteLength ) {\n                                break;\n                            }\n    \n                            parsers = api.parsers[ markerBytes ];\n    \n                            if ( !noParse && parsers ) {\n                                for ( i = 0; i < parsers.length; i += 1 ) {\n                                    parsers[ i ].call( api, dataview, offset,\n                                            markerLength, ret );\n                                }\n                            }\n    \n                            offset += markerLength;\n                            headLength = offset;\n                        } else {\n                            break;\n                        }\n                    }\n    \n                    if ( headLength > 6 ) {\n                        if ( buffer.slice ) {\n                            ret.imageHead = buffer.slice( 2, headLength );\n                        } else {\n                            // Workaround for IE10, which does not yet\n                            // support ArrayBuffer.slice:\n                            ret.imageHead = new Uint8Array( buffer )\n                                    .subarray( 2, headLength );\n                        }\n                    }\n                }\n    \n                return ret;\n            },\n    \n            updateImageHead: function( buffer, head ) {\n                var data = this._parse( buffer, true ),\n                    buf1, buf2, bodyoffset;\n    \n    \n                bodyoffset = 2;\n                if ( data.imageHead ) {\n                    bodyoffset = 2 + data.imageHead.byteLength;\n                }\n    \n                if ( buffer.slice ) {\n                    buf2 = buffer.slice( bodyoffset );\n                } else {\n                    buf2 = new Uint8Array( buffer ).subarray( bodyoffset );\n                }\n    \n                buf1 = new Uint8Array( head.byteLength + 2 + buf2.byteLength );\n    \n                buf1[ 0 ] = 0xFF;\n                buf1[ 1 ] = 0xD8;\n                buf1.set( new Uint8Array( head ), 2 );\n                buf1.set( new Uint8Array( buf2 ), head.byteLength + 2 );\n    \n                return buf1.buffer;\n            }\n        };\n    \n        Util.parseMeta = function() {\n            return api.parse.apply( api, arguments );\n        };\n    \n        Util.updateImageHead = function() {\n            return api.updateImageHead.apply( api, arguments );\n        };\n    \n        return api;\n    });\n    /**\n     * 代码来自于：https://github.com/blueimp/JavaScript-Load-Image\n     * 暂时项目中只用了orientation.\n     *\n     * 去除了 Exif Sub IFD Pointer, GPS Info IFD Pointer, Exif Thumbnail.\n     * @fileOverview EXIF解析\n     */\n    \n    // Sample\n    // ====================================\n    // Make : Apple\n    // Model : iPhone 4S\n    // Orientation : 1\n    // XResolution : 72 [72/1]\n    // YResolution : 72 [72/1]\n    // ResolutionUnit : 2\n    // Software : QuickTime 7.7.1\n    // DateTime : 2013:09:01 22:53:55\n    // ExifIFDPointer : 190\n    // ExposureTime : 0.058823529411764705 [1/17]\n    // FNumber : 2.4 [12/5]\n    // ExposureProgram : Normal program\n    // ISOSpeedRatings : 800\n    // ExifVersion : 0220\n    // DateTimeOriginal : 2013:09:01 22:52:51\n    // DateTimeDigitized : 2013:09:01 22:52:51\n    // ComponentsConfiguration : YCbCr\n    // ShutterSpeedValue : 4.058893515764426\n    // ApertureValue : 2.5260688216892597 [4845/1918]\n    // BrightnessValue : -0.3126686601998395\n    // MeteringMode : Pattern\n    // Flash : Flash did not fire, compulsory flash mode\n    // FocalLength : 4.28 [107/25]\n    // SubjectArea : [4 values]\n    // FlashpixVersion : 0100\n    // ColorSpace : 1\n    // PixelXDimension : 2448\n    // PixelYDimension : 3264\n    // SensingMethod : One-chip color area sensor\n    // ExposureMode : 0\n    // WhiteBalance : Auto white balance\n    // FocalLengthIn35mmFilm : 35\n    // SceneCaptureType : Standard\n    define('runtime/html5/imagemeta/exif',[\n        'base',\n        'runtime/html5/imagemeta'\n    ], function( Base, ImageMeta ) {\n    \n        var EXIF = {};\n    \n        EXIF.ExifMap = function() {\n            return this;\n        };\n    \n        EXIF.ExifMap.prototype.map = {\n            'Orientation': 0x0112\n        };\n    \n        EXIF.ExifMap.prototype.get = function( id ) {\n            return this[ id ] || this[ this.map[ id ] ];\n        };\n    \n        EXIF.exifTagTypes = {\n            // byte, 8-bit unsigned int:\n            1: {\n                getValue: function( dataView, dataOffset ) {\n                    return dataView.getUint8( dataOffset );\n                },\n                size: 1\n            },\n    \n            // ascii, 8-bit byte:\n            2: {\n                getValue: function( dataView, dataOffset ) {\n                    return String.fromCharCode( dataView.getUint8( dataOffset ) );\n                },\n                size: 1,\n                ascii: true\n            },\n    \n            // short, 16 bit int:\n            3: {\n                getValue: function( dataView, dataOffset, littleEndian ) {\n                    return dataView.getUint16( dataOffset, littleEndian );\n                },\n                size: 2\n            },\n    \n            // long, 32 bit int:\n            4: {\n                getValue: function( dataView, dataOffset, littleEndian ) {\n                    return dataView.getUint32( dataOffset, littleEndian );\n                },\n                size: 4\n            },\n    \n            // rational = two long values,\n            // first is numerator, second is denominator:\n            5: {\n                getValue: function( dataView, dataOffset, littleEndian ) {\n                    return dataView.getUint32( dataOffset, littleEndian ) /\n                        dataView.getUint32( dataOffset + 4, littleEndian );\n                },\n                size: 8\n            },\n    \n            // slong, 32 bit signed int:\n            9: {\n                getValue: function( dataView, dataOffset, littleEndian ) {\n                    return dataView.getInt32( dataOffset, littleEndian );\n                },\n                size: 4\n            },\n    \n            // srational, two slongs, first is numerator, second is denominator:\n            10: {\n                getValue: function( dataView, dataOffset, littleEndian ) {\n                    return dataView.getInt32( dataOffset, littleEndian ) /\n                        dataView.getInt32( dataOffset + 4, littleEndian );\n                },\n                size: 8\n            }\n        };\n    \n        // undefined, 8-bit byte, value depending on field:\n        EXIF.exifTagTypes[ 7 ] = EXIF.exifTagTypes[ 1 ];\n    \n        EXIF.getExifValue = function( dataView, tiffOffset, offset, type, length,\n                littleEndian ) {\n    \n            var tagType = EXIF.exifTagTypes[ type ],\n                tagSize, dataOffset, values, i, str, c;\n    \n            if ( !tagType ) {\n                Base.log('Invalid Exif data: Invalid tag type.');\n                return;\n            }\n    \n            tagSize = tagType.size * length;\n    \n            // Determine if the value is contained in the dataOffset bytes,\n            // or if the value at the dataOffset is a pointer to the actual data:\n            dataOffset = tagSize > 4 ? tiffOffset + dataView.getUint32( offset + 8,\n                    littleEndian ) : (offset + 8);\n    \n            if ( dataOffset + tagSize > dataView.byteLength ) {\n                Base.log('Invalid Exif data: Invalid data offset.');\n                return;\n            }\n    \n            if ( length === 1 ) {\n                return tagType.getValue( dataView, dataOffset, littleEndian );\n            }\n    \n            values = [];\n    \n            for ( i = 0; i < length; i += 1 ) {\n                values[ i ] = tagType.getValue( dataView,\n                        dataOffset + i * tagType.size, littleEndian );\n            }\n    \n            if ( tagType.ascii ) {\n                str = '';\n    \n                // Concatenate the chars:\n                for ( i = 0; i < values.length; i += 1 ) {\n                    c = values[ i ];\n    \n                    // Ignore the terminating NULL byte(s):\n                    if ( c === '\\u0000' ) {\n                        break;\n                    }\n                    str += c;\n                }\n    \n                return str;\n            }\n            return values;\n        };\n    \n        EXIF.parseExifTag = function( dataView, tiffOffset, offset, littleEndian,\n                data ) {\n    \n            var tag = dataView.getUint16( offset, littleEndian );\n            data.exif[ tag ] = EXIF.getExifValue( dataView, tiffOffset, offset,\n                    dataView.getUint16( offset + 2, littleEndian ),    // tag type\n                    dataView.getUint32( offset + 4, littleEndian ),    // tag length\n                    littleEndian );\n        };\n    \n        EXIF.parseExifTags = function( dataView, tiffOffset, dirOffset,\n                littleEndian, data ) {\n    \n            var tagsNumber, dirEndOffset, i;\n    \n            if ( dirOffset + 6 > dataView.byteLength ) {\n                Base.log('Invalid Exif data: Invalid directory offset.');\n                return;\n            }\n    \n            tagsNumber = dataView.getUint16( dirOffset, littleEndian );\n            dirEndOffset = dirOffset + 2 + 12 * tagsNumber;\n    \n            if ( dirEndOffset + 4 > dataView.byteLength ) {\n                Base.log('Invalid Exif data: Invalid directory size.');\n                return;\n            }\n    \n            for ( i = 0; i < tagsNumber; i += 1 ) {\n                this.parseExifTag( dataView, tiffOffset,\n                        dirOffset + 2 + 12 * i,    // tag offset\n                        littleEndian, data );\n            }\n    \n            // Return the offset to the next directory:\n            return dataView.getUint32( dirEndOffset, littleEndian );\n        };\n    \n        // EXIF.getExifThumbnail = function(dataView, offset, length) {\n        //     var hexData,\n        //         i,\n        //         b;\n        //     if (!length || offset + length > dataView.byteLength) {\n        //         Base.log('Invalid Exif data: Invalid thumbnail data.');\n        //         return;\n        //     }\n        //     hexData = [];\n        //     for (i = 0; i < length; i += 1) {\n        //         b = dataView.getUint8(offset + i);\n        //         hexData.push((b < 16 ? '0' : '') + b.toString(16));\n        //     }\n        //     return 'data:image/jpeg,%' + hexData.join('%');\n        // };\n    \n        EXIF.parseExifData = function( dataView, offset, length, data ) {\n    \n            var tiffOffset = offset + 10,\n                littleEndian, dirOffset;\n    \n            // Check for the ASCII code for \"Exif\" (0x45786966):\n            if ( dataView.getUint32( offset + 4 ) !== 0x45786966 ) {\n                // No Exif data, might be XMP data instead\n                return;\n            }\n            if ( tiffOffset + 8 > dataView.byteLength ) {\n                Base.log('Invalid Exif data: Invalid segment size.');\n                return;\n            }\n    \n            // Check for the two null bytes:\n            if ( dataView.getUint16( offset + 8 ) !== 0x0000 ) {\n                Base.log('Invalid Exif data: Missing byte alignment offset.');\n                return;\n            }\n    \n            // Check the byte alignment:\n            switch ( dataView.getUint16( tiffOffset ) ) {\n                case 0x4949:\n                    littleEndian = true;\n                    break;\n    \n                case 0x4D4D:\n                    littleEndian = false;\n                    break;\n    \n                default:\n                    Base.log('Invalid Exif data: Invalid byte alignment marker.');\n                    return;\n            }\n    \n            // Check for the TIFF tag marker (0x002A):\n            if ( dataView.getUint16( tiffOffset + 2, littleEndian ) !== 0x002A ) {\n                Base.log('Invalid Exif data: Missing TIFF marker.');\n                return;\n            }\n    \n            // Retrieve the directory offset bytes, usually 0x00000008 or 8 decimal:\n            dirOffset = dataView.getUint32( tiffOffset + 4, littleEndian );\n            // Create the exif object to store the tags:\n            data.exif = new EXIF.ExifMap();\n            // Parse the tags of the main image directory and retrieve the\n            // offset to the next directory, usually the thumbnail directory:\n            dirOffset = EXIF.parseExifTags( dataView, tiffOffset,\n                    tiffOffset + dirOffset, littleEndian, data );\n    \n            // 尝试读取缩略图\n            // if ( dirOffset ) {\n            //     thumbnailData = {exif: {}};\n            //     dirOffset = EXIF.parseExifTags(\n            //         dataView,\n            //         tiffOffset,\n            //         tiffOffset + dirOffset,\n            //         littleEndian,\n            //         thumbnailData\n            //     );\n    \n            //     // Check for JPEG Thumbnail offset:\n            //     if (thumbnailData.exif[0x0201]) {\n            //         data.exif.Thumbnail = EXIF.getExifThumbnail(\n            //             dataView,\n            //             tiffOffset + thumbnailData.exif[0x0201],\n            //             thumbnailData.exif[0x0202] // Thumbnail data length\n            //         );\n            //     }\n            // }\n        };\n    \n        ImageMeta.parsers[ 0xffe1 ].push( EXIF.parseExifData );\n        return EXIF;\n    });\n    /**\n     * 这个方式性能不行，但是可以解决android里面的toDataUrl的bug\n     * android里面toDataUrl('image/jpege')得到的结果却是png.\n     *\n     * 所以这里没辙，只能借助这个工具\n     * @fileOverview jpeg encoder\n     */\n    define('runtime/html5/jpegencoder',[], function( require, exports, module ) {\n    \n        /*\n          Copyright (c) 2008, Adobe Systems Incorporated\n          All rights reserved.\n    \n          Redistribution and use in source and binary forms, with or without\n          modification, are permitted provided that the following conditions are\n          met:\n    \n          * Redistributions of source code must retain the above copyright notice,\n            this list of conditions and the following disclaimer.\n    \n          * Redistributions in binary form must reproduce the above copyright\n            notice, this list of conditions and the following disclaimer in the\n            documentation and/or other materials provided with the distribution.\n    \n          * Neither the name of Adobe Systems Incorporated nor the names of its\n            contributors may be used to endorse or promote products derived from\n            this software without specific prior written permission.\n    \n          THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS\n          IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,\n          THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\n          PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR\n          CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\n          EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\n          PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n          PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n          LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n          NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n          SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n        */\n        /*\n        JPEG encoder ported to JavaScript and optimized by Andreas Ritter, www.bytestrom.eu, 11/2009\n    \n        Basic GUI blocking jpeg encoder\n        */\n    \n        function JPEGEncoder(quality) {\n          var self = this;\n            var fround = Math.round;\n            var ffloor = Math.floor;\n            var YTable = new Array(64);\n            var UVTable = new Array(64);\n            var fdtbl_Y = new Array(64);\n            var fdtbl_UV = new Array(64);\n            var YDC_HT;\n            var UVDC_HT;\n            var YAC_HT;\n            var UVAC_HT;\n    \n            var bitcode = new Array(65535);\n            var category = new Array(65535);\n            var outputfDCTQuant = new Array(64);\n            var DU = new Array(64);\n            var byteout = [];\n            var bytenew = 0;\n            var bytepos = 7;\n    \n            var YDU = new Array(64);\n            var UDU = new Array(64);\n            var VDU = new Array(64);\n            var clt = new Array(256);\n            var RGB_YUV_TABLE = new Array(2048);\n            var currentQuality;\n    \n            var ZigZag = [\n                     0, 1, 5, 6,14,15,27,28,\n                     2, 4, 7,13,16,26,29,42,\n                     3, 8,12,17,25,30,41,43,\n                     9,11,18,24,31,40,44,53,\n                    10,19,23,32,39,45,52,54,\n                    20,22,33,38,46,51,55,60,\n                    21,34,37,47,50,56,59,61,\n                    35,36,48,49,57,58,62,63\n                ];\n    \n            var std_dc_luminance_nrcodes = [0,0,1,5,1,1,1,1,1,1,0,0,0,0,0,0,0];\n            var std_dc_luminance_values = [0,1,2,3,4,5,6,7,8,9,10,11];\n            var std_ac_luminance_nrcodes = [0,0,2,1,3,3,2,4,3,5,5,4,4,0,0,1,0x7d];\n            var std_ac_luminance_values = [\n                    0x01,0x02,0x03,0x00,0x04,0x11,0x05,0x12,\n                    0x21,0x31,0x41,0x06,0x13,0x51,0x61,0x07,\n                    0x22,0x71,0x14,0x32,0x81,0x91,0xa1,0x08,\n                    0x23,0x42,0xb1,0xc1,0x15,0x52,0xd1,0xf0,\n                    0x24,0x33,0x62,0x72,0x82,0x09,0x0a,0x16,\n                    0x17,0x18,0x19,0x1a,0x25,0x26,0x27,0x28,\n                    0x29,0x2a,0x34,0x35,0x36,0x37,0x38,0x39,\n                    0x3a,0x43,0x44,0x45,0x46,0x47,0x48,0x49,\n                    0x4a,0x53,0x54,0x55,0x56,0x57,0x58,0x59,\n                    0x5a,0x63,0x64,0x65,0x66,0x67,0x68,0x69,\n                    0x6a,0x73,0x74,0x75,0x76,0x77,0x78,0x79,\n                    0x7a,0x83,0x84,0x85,0x86,0x87,0x88,0x89,\n                    0x8a,0x92,0x93,0x94,0x95,0x96,0x97,0x98,\n                    0x99,0x9a,0xa2,0xa3,0xa4,0xa5,0xa6,0xa7,\n                    0xa8,0xa9,0xaa,0xb2,0xb3,0xb4,0xb5,0xb6,\n                    0xb7,0xb8,0xb9,0xba,0xc2,0xc3,0xc4,0xc5,\n                    0xc6,0xc7,0xc8,0xc9,0xca,0xd2,0xd3,0xd4,\n                    0xd5,0xd6,0xd7,0xd8,0xd9,0xda,0xe1,0xe2,\n                    0xe3,0xe4,0xe5,0xe6,0xe7,0xe8,0xe9,0xea,\n                    0xf1,0xf2,0xf3,0xf4,0xf5,0xf6,0xf7,0xf8,\n                    0xf9,0xfa\n                ];\n    \n            var std_dc_chrominance_nrcodes = [0,0,3,1,1,1,1,1,1,1,1,1,0,0,0,0,0];\n            var std_dc_chrominance_values = [0,1,2,3,4,5,6,7,8,9,10,11];\n            var std_ac_chrominance_nrcodes = [0,0,2,1,2,4,4,3,4,7,5,4,4,0,1,2,0x77];\n            var std_ac_chrominance_values = [\n                    0x00,0x01,0x02,0x03,0x11,0x04,0x05,0x21,\n                    0x31,0x06,0x12,0x41,0x51,0x07,0x61,0x71,\n                    0x13,0x22,0x32,0x81,0x08,0x14,0x42,0x91,\n                    0xa1,0xb1,0xc1,0x09,0x23,0x33,0x52,0xf0,\n                    0x15,0x62,0x72,0xd1,0x0a,0x16,0x24,0x34,\n                    0xe1,0x25,0xf1,0x17,0x18,0x19,0x1a,0x26,\n                    0x27,0x28,0x29,0x2a,0x35,0x36,0x37,0x38,\n                    0x39,0x3a,0x43,0x44,0x45,0x46,0x47,0x48,\n                    0x49,0x4a,0x53,0x54,0x55,0x56,0x57,0x58,\n                    0x59,0x5a,0x63,0x64,0x65,0x66,0x67,0x68,\n                    0x69,0x6a,0x73,0x74,0x75,0x76,0x77,0x78,\n                    0x79,0x7a,0x82,0x83,0x84,0x85,0x86,0x87,\n                    0x88,0x89,0x8a,0x92,0x93,0x94,0x95,0x96,\n                    0x97,0x98,0x99,0x9a,0xa2,0xa3,0xa4,0xa5,\n                    0xa6,0xa7,0xa8,0xa9,0xaa,0xb2,0xb3,0xb4,\n                    0xb5,0xb6,0xb7,0xb8,0xb9,0xba,0xc2,0xc3,\n                    0xc4,0xc5,0xc6,0xc7,0xc8,0xc9,0xca,0xd2,\n                    0xd3,0xd4,0xd5,0xd6,0xd7,0xd8,0xd9,0xda,\n                    0xe2,0xe3,0xe4,0xe5,0xe6,0xe7,0xe8,0xe9,\n                    0xea,0xf2,0xf3,0xf4,0xf5,0xf6,0xf7,0xf8,\n                    0xf9,0xfa\n                ];\n    \n            function initQuantTables(sf){\n                    var YQT = [\n                        16, 11, 10, 16, 24, 40, 51, 61,\n                        12, 12, 14, 19, 26, 58, 60, 55,\n                        14, 13, 16, 24, 40, 57, 69, 56,\n                        14, 17, 22, 29, 51, 87, 80, 62,\n                        18, 22, 37, 56, 68,109,103, 77,\n                        24, 35, 55, 64, 81,104,113, 92,\n                        49, 64, 78, 87,103,121,120,101,\n                        72, 92, 95, 98,112,100,103, 99\n                    ];\n    \n                    for (var i = 0; i < 64; i++) {\n                        var t = ffloor((YQT[i]*sf+50)/100);\n                        if (t < 1) {\n                            t = 1;\n                        } else if (t > 255) {\n                            t = 255;\n                        }\n                        YTable[ZigZag[i]] = t;\n                    }\n                    var UVQT = [\n                        17, 18, 24, 47, 99, 99, 99, 99,\n                        18, 21, 26, 66, 99, 99, 99, 99,\n                        24, 26, 56, 99, 99, 99, 99, 99,\n                        47, 66, 99, 99, 99, 99, 99, 99,\n                        99, 99, 99, 99, 99, 99, 99, 99,\n                        99, 99, 99, 99, 99, 99, 99, 99,\n                        99, 99, 99, 99, 99, 99, 99, 99,\n                        99, 99, 99, 99, 99, 99, 99, 99\n                    ];\n                    for (var j = 0; j < 64; j++) {\n                        var u = ffloor((UVQT[j]*sf+50)/100);\n                        if (u < 1) {\n                            u = 1;\n                        } else if (u > 255) {\n                            u = 255;\n                        }\n                        UVTable[ZigZag[j]] = u;\n                    }\n                    var aasf = [\n                        1.0, 1.387039845, 1.306562965, 1.175875602,\n                        1.0, 0.785694958, 0.541196100, 0.275899379\n                    ];\n                    var k = 0;\n                    for (var row = 0; row < 8; row++)\n                    {\n                        for (var col = 0; col < 8; col++)\n                        {\n                            fdtbl_Y[k]  = (1.0 / (YTable [ZigZag[k]] * aasf[row] * aasf[col] * 8.0));\n                            fdtbl_UV[k] = (1.0 / (UVTable[ZigZag[k]] * aasf[row] * aasf[col] * 8.0));\n                            k++;\n                        }\n                    }\n                }\n    \n                function computeHuffmanTbl(nrcodes, std_table){\n                    var codevalue = 0;\n                    var pos_in_table = 0;\n                    var HT = new Array();\n                    for (var k = 1; k <= 16; k++) {\n                        for (var j = 1; j <= nrcodes[k]; j++) {\n                            HT[std_table[pos_in_table]] = [];\n                            HT[std_table[pos_in_table]][0] = codevalue;\n                            HT[std_table[pos_in_table]][1] = k;\n                            pos_in_table++;\n                            codevalue++;\n                        }\n                        codevalue*=2;\n                    }\n                    return HT;\n                }\n    \n                function initHuffmanTbl()\n                {\n                    YDC_HT = computeHuffmanTbl(std_dc_luminance_nrcodes,std_dc_luminance_values);\n                    UVDC_HT = computeHuffmanTbl(std_dc_chrominance_nrcodes,std_dc_chrominance_values);\n                    YAC_HT = computeHuffmanTbl(std_ac_luminance_nrcodes,std_ac_luminance_values);\n                    UVAC_HT = computeHuffmanTbl(std_ac_chrominance_nrcodes,std_ac_chrominance_values);\n                }\n    \n                function initCategoryNumber()\n                {\n                    var nrlower = 1;\n                    var nrupper = 2;\n                    for (var cat = 1; cat <= 15; cat++) {\n                        //Positive numbers\n                        for (var nr = nrlower; nr<nrupper; nr++) {\n                            category[32767+nr] = cat;\n                            bitcode[32767+nr] = [];\n                            bitcode[32767+nr][1] = cat;\n                            bitcode[32767+nr][0] = nr;\n                        }\n                        //Negative numbers\n                        for (var nrneg =-(nrupper-1); nrneg<=-nrlower; nrneg++) {\n                            category[32767+nrneg] = cat;\n                            bitcode[32767+nrneg] = [];\n                            bitcode[32767+nrneg][1] = cat;\n                            bitcode[32767+nrneg][0] = nrupper-1+nrneg;\n                        }\n                        nrlower <<= 1;\n                        nrupper <<= 1;\n                    }\n                }\n    \n                function initRGBYUVTable() {\n                    for(var i = 0; i < 256;i++) {\n                        RGB_YUV_TABLE[i]            =  19595 * i;\n                        RGB_YUV_TABLE[(i+ 256)>>0]  =  38470 * i;\n                        RGB_YUV_TABLE[(i+ 512)>>0]  =   7471 * i + 0x8000;\n                        RGB_YUV_TABLE[(i+ 768)>>0]  = -11059 * i;\n                        RGB_YUV_TABLE[(i+1024)>>0]  = -21709 * i;\n                        RGB_YUV_TABLE[(i+1280)>>0]  =  32768 * i + 0x807FFF;\n                        RGB_YUV_TABLE[(i+1536)>>0]  = -27439 * i;\n                        RGB_YUV_TABLE[(i+1792)>>0]  = - 5329 * i;\n                    }\n                }\n    \n                // IO functions\n                function writeBits(bs)\n                {\n                    var value = bs[0];\n                    var posval = bs[1]-1;\n                    while ( posval >= 0 ) {\n                        if (value & (1 << posval) ) {\n                            bytenew |= (1 << bytepos);\n                        }\n                        posval--;\n                        bytepos--;\n                        if (bytepos < 0) {\n                            if (bytenew == 0xFF) {\n                                writeByte(0xFF);\n                                writeByte(0);\n                            }\n                            else {\n                                writeByte(bytenew);\n                            }\n                            bytepos=7;\n                            bytenew=0;\n                        }\n                    }\n                }\n    \n                function writeByte(value)\n                {\n                    byteout.push(clt[value]); // write char directly instead of converting later\n                }\n    \n                function writeWord(value)\n                {\n                    writeByte((value>>8)&0xFF);\n                    writeByte((value   )&0xFF);\n                }\n    \n                // DCT & quantization core\n                function fDCTQuant(data, fdtbl)\n                {\n                    var d0, d1, d2, d3, d4, d5, d6, d7;\n                    /* Pass 1: process rows. */\n                    var dataOff=0;\n                    var i;\n                    var I8 = 8;\n                    var I64 = 64;\n                    for (i=0; i<I8; ++i)\n                    {\n                        d0 = data[dataOff];\n                        d1 = data[dataOff+1];\n                        d2 = data[dataOff+2];\n                        d3 = data[dataOff+3];\n                        d4 = data[dataOff+4];\n                        d5 = data[dataOff+5];\n                        d6 = data[dataOff+6];\n                        d7 = data[dataOff+7];\n    \n                        var tmp0 = d0 + d7;\n                        var tmp7 = d0 - d7;\n                        var tmp1 = d1 + d6;\n                        var tmp6 = d1 - d6;\n                        var tmp2 = d2 + d5;\n                        var tmp5 = d2 - d5;\n                        var tmp3 = d3 + d4;\n                        var tmp4 = d3 - d4;\n    \n                        /* Even part */\n                        var tmp10 = tmp0 + tmp3;    /* phase 2 */\n                        var tmp13 = tmp0 - tmp3;\n                        var tmp11 = tmp1 + tmp2;\n                        var tmp12 = tmp1 - tmp2;\n    \n                        data[dataOff] = tmp10 + tmp11; /* phase 3 */\n                        data[dataOff+4] = tmp10 - tmp11;\n    \n                        var z1 = (tmp12 + tmp13) * 0.707106781; /* c4 */\n                        data[dataOff+2] = tmp13 + z1; /* phase 5 */\n                        data[dataOff+6] = tmp13 - z1;\n    \n                        /* Odd part */\n                        tmp10 = tmp4 + tmp5; /* phase 2 */\n                        tmp11 = tmp5 + tmp6;\n                        tmp12 = tmp6 + tmp7;\n    \n                        /* The rotator is modified from fig 4-8 to avoid extra negations. */\n                        var z5 = (tmp10 - tmp12) * 0.382683433; /* c6 */\n                        var z2 = 0.541196100 * tmp10 + z5; /* c2-c6 */\n                        var z4 = 1.306562965 * tmp12 + z5; /* c2+c6 */\n                        var z3 = tmp11 * 0.707106781; /* c4 */\n    \n                        var z11 = tmp7 + z3;    /* phase 5 */\n                        var z13 = tmp7 - z3;\n    \n                        data[dataOff+5] = z13 + z2; /* phase 6 */\n                        data[dataOff+3] = z13 - z2;\n                        data[dataOff+1] = z11 + z4;\n                        data[dataOff+7] = z11 - z4;\n    \n                        dataOff += 8; /* advance pointer to next row */\n                    }\n    \n                    /* Pass 2: process columns. */\n                    dataOff = 0;\n                    for (i=0; i<I8; ++i)\n                    {\n                        d0 = data[dataOff];\n                        d1 = data[dataOff + 8];\n                        d2 = data[dataOff + 16];\n                        d3 = data[dataOff + 24];\n                        d4 = data[dataOff + 32];\n                        d5 = data[dataOff + 40];\n                        d6 = data[dataOff + 48];\n                        d7 = data[dataOff + 56];\n    \n                        var tmp0p2 = d0 + d7;\n                        var tmp7p2 = d0 - d7;\n                        var tmp1p2 = d1 + d6;\n                        var tmp6p2 = d1 - d6;\n                        var tmp2p2 = d2 + d5;\n                        var tmp5p2 = d2 - d5;\n                        var tmp3p2 = d3 + d4;\n                        var tmp4p2 = d3 - d4;\n    \n                        /* Even part */\n                        var tmp10p2 = tmp0p2 + tmp3p2;  /* phase 2 */\n                        var tmp13p2 = tmp0p2 - tmp3p2;\n                        var tmp11p2 = tmp1p2 + tmp2p2;\n                        var tmp12p2 = tmp1p2 - tmp2p2;\n    \n                        data[dataOff] = tmp10p2 + tmp11p2; /* phase 3 */\n                        data[dataOff+32] = tmp10p2 - tmp11p2;\n    \n                        var z1p2 = (tmp12p2 + tmp13p2) * 0.707106781; /* c4 */\n                        data[dataOff+16] = tmp13p2 + z1p2; /* phase 5 */\n                        data[dataOff+48] = tmp13p2 - z1p2;\n    \n                        /* Odd part */\n                        tmp10p2 = tmp4p2 + tmp5p2; /* phase 2 */\n                        tmp11p2 = tmp5p2 + tmp6p2;\n                        tmp12p2 = tmp6p2 + tmp7p2;\n    \n                        /* The rotator is modified from fig 4-8 to avoid extra negations. */\n                        var z5p2 = (tmp10p2 - tmp12p2) * 0.382683433; /* c6 */\n                        var z2p2 = 0.541196100 * tmp10p2 + z5p2; /* c2-c6 */\n                        var z4p2 = 1.306562965 * tmp12p2 + z5p2; /* c2+c6 */\n                        var z3p2 = tmp11p2 * 0.707106781; /* c4 */\n    \n                        var z11p2 = tmp7p2 + z3p2;  /* phase 5 */\n                        var z13p2 = tmp7p2 - z3p2;\n    \n                        data[dataOff+40] = z13p2 + z2p2; /* phase 6 */\n                        data[dataOff+24] = z13p2 - z2p2;\n                        data[dataOff+ 8] = z11p2 + z4p2;\n                        data[dataOff+56] = z11p2 - z4p2;\n    \n                        dataOff++; /* advance pointer to next column */\n                    }\n    \n                    // Quantize/descale the coefficients\n                    var fDCTQuant;\n                    for (i=0; i<I64; ++i)\n                    {\n                        // Apply the quantization and scaling factor & Round to nearest integer\n                        fDCTQuant = data[i]*fdtbl[i];\n                        outputfDCTQuant[i] = (fDCTQuant > 0.0) ? ((fDCTQuant + 0.5)|0) : ((fDCTQuant - 0.5)|0);\n                        //outputfDCTQuant[i] = fround(fDCTQuant);\n    \n                    }\n                    return outputfDCTQuant;\n                }\n    \n                function writeAPP0()\n                {\n                    writeWord(0xFFE0); // marker\n                    writeWord(16); // length\n                    writeByte(0x4A); // J\n                    writeByte(0x46); // F\n                    writeByte(0x49); // I\n                    writeByte(0x46); // F\n                    writeByte(0); // = \"JFIF\",'\\0'\n                    writeByte(1); // versionhi\n                    writeByte(1); // versionlo\n                    writeByte(0); // xyunits\n                    writeWord(1); // xdensity\n                    writeWord(1); // ydensity\n                    writeByte(0); // thumbnwidth\n                    writeByte(0); // thumbnheight\n                }\n    \n                function writeSOF0(width, height)\n                {\n                    writeWord(0xFFC0); // marker\n                    writeWord(17);   // length, truecolor YUV JPG\n                    writeByte(8);    // precision\n                    writeWord(height);\n                    writeWord(width);\n                    writeByte(3);    // nrofcomponents\n                    writeByte(1);    // IdY\n                    writeByte(0x11); // HVY\n                    writeByte(0);    // QTY\n                    writeByte(2);    // IdU\n                    writeByte(0x11); // HVU\n                    writeByte(1);    // QTU\n                    writeByte(3);    // IdV\n                    writeByte(0x11); // HVV\n                    writeByte(1);    // QTV\n                }\n    \n                function writeDQT()\n                {\n                    writeWord(0xFFDB); // marker\n                    writeWord(132);    // length\n                    writeByte(0);\n                    for (var i=0; i<64; i++) {\n                        writeByte(YTable[i]);\n                    }\n                    writeByte(1);\n                    for (var j=0; j<64; j++) {\n                        writeByte(UVTable[j]);\n                    }\n                }\n    \n                function writeDHT()\n                {\n                    writeWord(0xFFC4); // marker\n                    writeWord(0x01A2); // length\n    \n                    writeByte(0); // HTYDCinfo\n                    for (var i=0; i<16; i++) {\n                        writeByte(std_dc_luminance_nrcodes[i+1]);\n                    }\n                    for (var j=0; j<=11; j++) {\n                        writeByte(std_dc_luminance_values[j]);\n                    }\n    \n                    writeByte(0x10); // HTYACinfo\n                    for (var k=0; k<16; k++) {\n                        writeByte(std_ac_luminance_nrcodes[k+1]);\n                    }\n                    for (var l=0; l<=161; l++) {\n                        writeByte(std_ac_luminance_values[l]);\n                    }\n    \n                    writeByte(1); // HTUDCinfo\n                    for (var m=0; m<16; m++) {\n                        writeByte(std_dc_chrominance_nrcodes[m+1]);\n                    }\n                    for (var n=0; n<=11; n++) {\n                        writeByte(std_dc_chrominance_values[n]);\n                    }\n    \n                    writeByte(0x11); // HTUACinfo\n                    for (var o=0; o<16; o++) {\n                        writeByte(std_ac_chrominance_nrcodes[o+1]);\n                    }\n                    for (var p=0; p<=161; p++) {\n                        writeByte(std_ac_chrominance_values[p]);\n                    }\n                }\n    \n                function writeSOS()\n                {\n                    writeWord(0xFFDA); // marker\n                    writeWord(12); // length\n                    writeByte(3); // nrofcomponents\n                    writeByte(1); // IdY\n                    writeByte(0); // HTY\n                    writeByte(2); // IdU\n                    writeByte(0x11); // HTU\n                    writeByte(3); // IdV\n                    writeByte(0x11); // HTV\n                    writeByte(0); // Ss\n                    writeByte(0x3f); // Se\n                    writeByte(0); // Bf\n                }\n    \n                function processDU(CDU, fdtbl, DC, HTDC, HTAC){\n                    var EOB = HTAC[0x00];\n                    var M16zeroes = HTAC[0xF0];\n                    var pos;\n                    var I16 = 16;\n                    var I63 = 63;\n                    var I64 = 64;\n                    var DU_DCT = fDCTQuant(CDU, fdtbl);\n                    //ZigZag reorder\n                    for (var j=0;j<I64;++j) {\n                        DU[ZigZag[j]]=DU_DCT[j];\n                    }\n                    var Diff = DU[0] - DC; DC = DU[0];\n                    //Encode DC\n                    if (Diff==0) {\n                        writeBits(HTDC[0]); // Diff might be 0\n                    } else {\n                        pos = 32767+Diff;\n                        writeBits(HTDC[category[pos]]);\n                        writeBits(bitcode[pos]);\n                    }\n                    //Encode ACs\n                    var end0pos = 63; // was const... which is crazy\n                    for (; (end0pos>0)&&(DU[end0pos]==0); end0pos--) {};\n                    //end0pos = first element in reverse order !=0\n                    if ( end0pos == 0) {\n                        writeBits(EOB);\n                        return DC;\n                    }\n                    var i = 1;\n                    var lng;\n                    while ( i <= end0pos ) {\n                        var startpos = i;\n                        for (; (DU[i]==0) && (i<=end0pos); ++i) {}\n                        var nrzeroes = i-startpos;\n                        if ( nrzeroes >= I16 ) {\n                            lng = nrzeroes>>4;\n                            for (var nrmarker=1; nrmarker <= lng; ++nrmarker)\n                                writeBits(M16zeroes);\n                            nrzeroes = nrzeroes&0xF;\n                        }\n                        pos = 32767+DU[i];\n                        writeBits(HTAC[(nrzeroes<<4)+category[pos]]);\n                        writeBits(bitcode[pos]);\n                        i++;\n                    }\n                    if ( end0pos != I63 ) {\n                        writeBits(EOB);\n                    }\n                    return DC;\n                }\n    \n                function initCharLookupTable(){\n                    var sfcc = String.fromCharCode;\n                    for(var i=0; i < 256; i++){ ///// ACHTUNG // 255\n                        clt[i] = sfcc(i);\n                    }\n                }\n    \n                this.encode = function(image,quality) // image data object\n                {\n                    // var time_start = new Date().getTime();\n    \n                    if(quality) setQuality(quality);\n    \n                    // Initialize bit writer\n                    byteout = new Array();\n                    bytenew=0;\n                    bytepos=7;\n    \n                    // Add JPEG headers\n                    writeWord(0xFFD8); // SOI\n                    writeAPP0();\n                    writeDQT();\n                    writeSOF0(image.width,image.height);\n                    writeDHT();\n                    writeSOS();\n    \n    \n                    // Encode 8x8 macroblocks\n                    var DCY=0;\n                    var DCU=0;\n                    var DCV=0;\n    \n                    bytenew=0;\n                    bytepos=7;\n    \n    \n                    this.encode.displayName = \"_encode_\";\n    \n                    var imageData = image.data;\n                    var width = image.width;\n                    var height = image.height;\n    \n                    var quadWidth = width*4;\n                    var tripleWidth = width*3;\n    \n                    var x, y = 0;\n                    var r, g, b;\n                    var start,p, col,row,pos;\n                    while(y < height){\n                        x = 0;\n                        while(x < quadWidth){\n                        start = quadWidth * y + x;\n                        p = start;\n                        col = -1;\n                        row = 0;\n    \n                        for(pos=0; pos < 64; pos++){\n                            row = pos >> 3;// /8\n                            col = ( pos & 7 ) * 4; // %8\n                            p = start + ( row * quadWidth ) + col;\n    \n                            if(y+row >= height){ // padding bottom\n                                p-= (quadWidth*(y+1+row-height));\n                            }\n    \n                            if(x+col >= quadWidth){ // padding right\n                                p-= ((x+col) - quadWidth +4)\n                            }\n    \n                            r = imageData[ p++ ];\n                            g = imageData[ p++ ];\n                            b = imageData[ p++ ];\n    \n    \n                            /* // calculate YUV values dynamically\n                            YDU[pos]=((( 0.29900)*r+( 0.58700)*g+( 0.11400)*b))-128; //-0x80\n                            UDU[pos]=(((-0.16874)*r+(-0.33126)*g+( 0.50000)*b));\n                            VDU[pos]=((( 0.50000)*r+(-0.41869)*g+(-0.08131)*b));\n                            */\n    \n                            // use lookup table (slightly faster)\n                            YDU[pos] = ((RGB_YUV_TABLE[r]             + RGB_YUV_TABLE[(g +  256)>>0] + RGB_YUV_TABLE[(b +  512)>>0]) >> 16)-128;\n                            UDU[pos] = ((RGB_YUV_TABLE[(r +  768)>>0] + RGB_YUV_TABLE[(g + 1024)>>0] + RGB_YUV_TABLE[(b + 1280)>>0]) >> 16)-128;\n                            VDU[pos] = ((RGB_YUV_TABLE[(r + 1280)>>0] + RGB_YUV_TABLE[(g + 1536)>>0] + RGB_YUV_TABLE[(b + 1792)>>0]) >> 16)-128;\n    \n                        }\n    \n                        DCY = processDU(YDU, fdtbl_Y, DCY, YDC_HT, YAC_HT);\n                        DCU = processDU(UDU, fdtbl_UV, DCU, UVDC_HT, UVAC_HT);\n                        DCV = processDU(VDU, fdtbl_UV, DCV, UVDC_HT, UVAC_HT);\n                        x+=32;\n                        }\n                        y+=8;\n                    }\n    \n    \n                    ////////////////////////////////////////////////////////////////\n    \n                    // Do the bit alignment of the EOI marker\n                    if ( bytepos >= 0 ) {\n                        var fillbits = [];\n                        fillbits[1] = bytepos+1;\n                        fillbits[0] = (1<<(bytepos+1))-1;\n                        writeBits(fillbits);\n                    }\n    \n                    writeWord(0xFFD9); //EOI\n    \n                    var jpegDataUri = 'data:image/jpeg;base64,' + btoa(byteout.join(''));\n    \n                    byteout = [];\n    \n                    // benchmarking\n                    // var duration = new Date().getTime() - time_start;\n                    // console.log('Encoding time: '+ currentQuality + 'ms');\n                    //\n    \n                    return jpegDataUri\n            }\n    \n            function setQuality(quality){\n                if (quality <= 0) {\n                    quality = 1;\n                }\n                if (quality > 100) {\n                    quality = 100;\n                }\n    \n                if(currentQuality == quality) return // don't recalc if unchanged\n    \n                var sf = 0;\n                if (quality < 50) {\n                    sf = Math.floor(5000 / quality);\n                } else {\n                    sf = Math.floor(200 - quality*2);\n                }\n    \n                initQuantTables(sf);\n                currentQuality = quality;\n                // console.log('Quality set to: '+quality +'%');\n            }\n    \n            function init(){\n                // var time_start = new Date().getTime();\n                if(!quality) quality = 50;\n                // Create tables\n                initCharLookupTable()\n                initHuffmanTbl();\n                initCategoryNumber();\n                initRGBYUVTable();\n    \n                setQuality(quality);\n                // var duration = new Date().getTime() - time_start;\n                // console.log('Initialization '+ duration + 'ms');\n            }\n    \n            init();\n    \n        };\n    \n        JPEGEncoder.encode = function( data, quality ) {\n            var encoder = new JPEGEncoder( quality );\n    \n            return encoder.encode( data );\n        }\n    \n        return JPEGEncoder;\n    });\n    /**\n     * @fileOverview Fix android canvas.toDataUrl bug.\n     */\n    define('runtime/html5/androidpatch',[\n        'runtime/html5/util',\n        'runtime/html5/jpegencoder',\n        'base'\n    ], function( Util, encoder, Base ) {\n        var origin = Util.canvasToDataUrl,\n            supportJpeg;\n    \n        Util.canvasToDataUrl = function( canvas, type, quality ) {\n            var ctx, w, h, fragement, parts;\n    \n            // 非android手机直接跳过。\n            if ( !Base.os.android ) {\n                return origin.apply( null, arguments );\n            }\n    \n            // 检测是否canvas支持jpeg导出，根据数据格式来判断。\n            // JPEG 前两位分别是：255, 216\n            if ( type === 'image/jpeg' && typeof supportJpeg === 'undefined' ) {\n                fragement = origin.apply( null, arguments );\n    \n                parts = fragement.split(',');\n    \n                if ( ~parts[ 0 ].indexOf('base64') ) {\n                    fragement = atob( parts[ 1 ] );\n                } else {\n                    fragement = decodeURIComponent( parts[ 1 ] );\n                }\n    \n                fragement = fragement.substring( 0, 2 );\n    \n                supportJpeg = fragement.charCodeAt( 0 ) === 255 &&\n                        fragement.charCodeAt( 1 ) === 216;\n            }\n    \n            // 只有在android环境下才修复\n            if ( type === 'image/jpeg' && !supportJpeg ) {\n                w = canvas.width;\n                h = canvas.height;\n                ctx = canvas.getContext('2d');\n    \n                return encoder.encode( ctx.getImageData( 0, 0, w, h ), quality );\n            }\n    \n            return origin.apply( null, arguments );\n        };\n    });\n    /**\n     * @fileOverview Image\n     */\n    define('runtime/html5/image',[\n        'base',\n        'runtime/html5/runtime',\n        'runtime/html5/util'\n    ], function( Base, Html5Runtime, Util ) {\n    \n        var BLANK = 'data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs%3D';\n    \n        return Html5Runtime.register( 'Image', {\n    \n            // flag: 标记是否被修改过。\n            modified: false,\n    \n            init: function() {\n                var me = this,\n                    img = new Image();\n    \n                img.onload = function() {\n    \n                    me._info = {\n                        type: me.type,\n                        width: this.width,\n                        height: this.height\n                    };\n    \n                    //debugger;\n    \n                    // 读取meta信息。\n                    if ( !me._metas && 'image/jpeg' === me.type ) {\n                        Util.parseMeta( me._blob, function( error, ret ) {\n                            me._metas = ret;\n                            me.owner.trigger('load');\n                        });\n                    } else {\n                        me.owner.trigger('load');\n                    }\n                };\n    \n                img.onerror = function() {\n                    me.owner.trigger('error');\n                };\n    \n                me._img = img;\n            },\n    \n            loadFromBlob: function( blob ) {\n                var me = this,\n                    img = me._img;\n    \n                me._blob = blob;\n                me.type = blob.type;\n                img.src = Util.createObjectURL( blob.getSource() );\n                me.owner.once( 'load', function() {\n                    Util.revokeObjectURL( img.src );\n                });\n            },\n    \n            resize: function( width, height ) {\n                var canvas = this._canvas ||\n                        (this._canvas = document.createElement('canvas'));\n    \n                this._resize( this._img, canvas, width, height );\n                this._blob = null;    // 没用了，可以删掉了。\n                this.modified = true;\n                this.owner.trigger( 'complete', 'resize' );\n            },\n    \n            crop: function( x, y, w, h, s ) {\n                var cvs = this._canvas ||\n                        (this._canvas = document.createElement('canvas')),\n                    opts = this.options,\n                    img = this._img,\n                    iw = img.naturalWidth,\n                    ih = img.naturalHeight,\n                    orientation = this.getOrientation();\n    \n                s = s || 1;\n    \n                // todo 解决 orientation 的问题。\n                // values that require 90 degree rotation\n                // if ( ~[ 5, 6, 7, 8 ].indexOf( orientation ) ) {\n    \n                //     switch ( orientation ) {\n                //         case 6:\n                //             tmp = x;\n                //             x = y;\n                //             y = iw * s - tmp - w;\n                //             console.log(ih * s, tmp, w)\n                //             break;\n                //     }\n    \n                //     (w ^= h, h ^= w, w ^= h);\n                // }\n    \n                cvs.width = w;\n                cvs.height = h;\n    \n                opts.preserveHeaders || this._rotate2Orientaion( cvs, orientation );\n                this._renderImageToCanvas( cvs, img, -x, -y, iw * s, ih * s );\n    \n                this._blob = null;    // 没用了，可以删掉了。\n                this.modified = true;\n                this.owner.trigger( 'complete', 'crop' );\n            },\n    \n            getAsBlob: function( type ) {\n                var blob = this._blob,\n                    opts = this.options,\n                    canvas;\n    \n                type = type || this.type;\n    \n                // blob需要重新生成。\n                if ( this.modified || this.type !== type ) {\n                    canvas = this._canvas;\n    \n                    if ( type === 'image/jpeg' ) {\n    \n                        blob = Util.canvasToDataUrl( canvas, type, opts.quality );\n    \n                        if ( opts.preserveHeaders && this._metas &&\n                                this._metas.imageHead ) {\n    \n                            blob = Util.dataURL2ArrayBuffer( blob );\n                            blob = Util.updateImageHead( blob,\n                                    this._metas.imageHead );\n                            blob = Util.arrayBufferToBlob( blob, type );\n                            return blob;\n                        }\n                    } else {\n                        blob = Util.canvasToDataUrl( canvas, type );\n                    }\n    \n                    blob = Util.dataURL2Blob( blob );\n                }\n    \n                return blob;\n            },\n    \n            getAsDataUrl: function( type ) {\n                var opts = this.options;\n    \n                type = type || this.type;\n    \n                if ( type === 'image/jpeg' ) {\n                    return Util.canvasToDataUrl( this._canvas, type, opts.quality );\n                } else {\n                    return this._canvas.toDataURL( type );\n                }\n            },\n    \n            getOrientation: function() {\n                return this._metas && this._metas.exif &&\n                        this._metas.exif.get('Orientation') || 1;\n            },\n    \n            info: function( val ) {\n    \n                // setter\n                if ( val ) {\n                    this._info = val;\n                    return this;\n                }\n    \n                // getter\n                return this._info;\n            },\n    \n            meta: function( val ) {\n    \n                // setter\n                if ( val ) {\n                    this._metas = val;\n                    return this;\n                }\n    \n                // getter\n                return this._metas;\n            },\n    \n            destroy: function() {\n                var canvas = this._canvas;\n                this._img.onload = null;\n    \n                if ( canvas ) {\n                    canvas.getContext('2d')\n                            .clearRect( 0, 0, canvas.width, canvas.height );\n                    canvas.width = canvas.height = 0;\n                    this._canvas = null;\n                }\n    \n                // 释放内存。非常重要，否则释放不了image的内存。\n                this._img.src = BLANK;\n                this._img = this._blob = null;\n            },\n    \n            _resize: function( img, cvs, width, height ) {\n                var opts = this.options,\n                    naturalWidth = img.width,\n                    naturalHeight = img.height,\n                    orientation = this.getOrientation(),\n                    scale, w, h, x, y;\n    \n                // values that require 90 degree rotation\n                if ( ~[ 5, 6, 7, 8 ].indexOf( orientation ) ) {\n    \n                    // 交换width, height的值。\n                    width ^= height;\n                    height ^= width;\n                    width ^= height;\n                }\n    \n                scale = Math[ opts.crop ? 'max' : 'min' ]( width / naturalWidth,\n                        height / naturalHeight );\n    \n                // 不允许放大。\n                opts.allowMagnify || (scale = Math.min( 1, scale ));\n    \n                w = naturalWidth * scale;\n                h = naturalHeight * scale;\n    \n                if ( opts.crop ) {\n                    cvs.width = width;\n                    cvs.height = height;\n                } else {\n                    cvs.width = w;\n                    cvs.height = h;\n                }\n    \n                x = (cvs.width - w) / 2;\n                y = (cvs.height - h) / 2;\n    \n                opts.preserveHeaders || this._rotate2Orientaion( cvs, orientation );\n    \n                this._renderImageToCanvas( cvs, img, x, y, w, h );\n            },\n    \n            _rotate2Orientaion: function( canvas, orientation ) {\n                var width = canvas.width,\n                    height = canvas.height,\n                    ctx = canvas.getContext('2d');\n    \n                switch ( orientation ) {\n                    case 5:\n                    case 6:\n                    case 7:\n                    case 8:\n                        canvas.width = height;\n                        canvas.height = width;\n                        break;\n                }\n    \n                switch ( orientation ) {\n                    case 2:    // horizontal flip\n                        ctx.translate( width, 0 );\n                        ctx.scale( -1, 1 );\n                        break;\n    \n                    case 3:    // 180 rotate left\n                        ctx.translate( width, height );\n                        ctx.rotate( Math.PI );\n                        break;\n    \n                    case 4:    // vertical flip\n                        ctx.translate( 0, height );\n                        ctx.scale( 1, -1 );\n                        break;\n    \n                    case 5:    // vertical flip + 90 rotate right\n                        ctx.rotate( 0.5 * Math.PI );\n                        ctx.scale( 1, -1 );\n                        break;\n    \n                    case 6:    // 90 rotate right\n                        ctx.rotate( 0.5 * Math.PI );\n                        ctx.translate( 0, -height );\n                        break;\n    \n                    case 7:    // horizontal flip + 90 rotate right\n                        ctx.rotate( 0.5 * Math.PI );\n                        ctx.translate( width, -height );\n                        ctx.scale( -1, 1 );\n                        break;\n    \n                    case 8:    // 90 rotate left\n                        ctx.rotate( -0.5 * Math.PI );\n                        ctx.translate( -width, 0 );\n                        break;\n                }\n            },\n    \n            // https://github.com/stomita/ios-imagefile-megapixel/\n            // blob/master/src/megapix-image.js\n            _renderImageToCanvas: (function() {\n    \n                // 如果不是ios, 不需要这么复杂！\n                if ( !Base.os.ios ) {\n                    return function( canvas ) {\n                        var args = Base.slice( arguments, 1 ),\n                            ctx = canvas.getContext('2d');\n    \n                        ctx.drawImage.apply( ctx, args );\n                    };\n                }\n    \n                /**\n                 * Detecting vertical squash in loaded image.\n                 * Fixes a bug which squash image vertically while drawing into\n                 * canvas for some images.\n                 */\n                function detectVerticalSquash( img, iw, ih ) {\n                    var canvas = document.createElement('canvas'),\n                        ctx = canvas.getContext('2d'),\n                        sy = 0,\n                        ey = ih,\n                        py = ih,\n                        data, alpha, ratio;\n    \n    \n                    canvas.width = 1;\n                    canvas.height = ih;\n                    ctx.drawImage( img, 0, 0 );\n                    data = ctx.getImageData( 0, 0, 1, ih ).data;\n    \n                    // search image edge pixel position in case\n                    // it is squashed vertically.\n                    while ( py > sy ) {\n                        alpha = data[ (py - 1) * 4 + 3 ];\n    \n                        if ( alpha === 0 ) {\n                            ey = py;\n                        } else {\n                            sy = py;\n                        }\n    \n                        py = (ey + sy) >> 1;\n                    }\n    \n                    ratio = (py / ih);\n                    return (ratio === 0) ? 1 : ratio;\n                }\n    \n                // fix ie7 bug\n                // http://stackoverflow.com/questions/11929099/\n                // html5-canvas-drawimage-ratio-bug-ios\n                if ( Base.os.ios >= 7 ) {\n                    return function( canvas, img, x, y, w, h ) {\n                        var iw = img.naturalWidth,\n                            ih = img.naturalHeight,\n                            vertSquashRatio = detectVerticalSquash( img, iw, ih );\n    \n                        return canvas.getContext('2d').drawImage( img, 0, 0,\n                                iw * vertSquashRatio, ih * vertSquashRatio,\n                                x, y, w, h );\n                    };\n                }\n    \n                /**\n                 * Detect subsampling in loaded image.\n                 * In iOS, larger images than 2M pixels may be\n                 * subsampled in rendering.\n                 */\n                function detectSubsampling( img ) {\n                    var iw = img.naturalWidth,\n                        ih = img.naturalHeight,\n                        canvas, ctx;\n    \n                    // subsampling may happen overmegapixel image\n                    if ( iw * ih > 1024 * 1024 ) {\n                        canvas = document.createElement('canvas');\n                        canvas.width = canvas.height = 1;\n                        ctx = canvas.getContext('2d');\n                        ctx.drawImage( img, -iw + 1, 0 );\n    \n                        // subsampled image becomes half smaller in rendering size.\n                        // check alpha channel value to confirm image is covering\n                        // edge pixel or not. if alpha value is 0\n                        // image is not covering, hence subsampled.\n                        return ctx.getImageData( 0, 0, 1, 1 ).data[ 3 ] === 0;\n                    } else {\n                        return false;\n                    }\n                }\n    \n    \n                return function( canvas, img, x, y, width, height ) {\n                    var iw = img.naturalWidth,\n                        ih = img.naturalHeight,\n                        ctx = canvas.getContext('2d'),\n                        subsampled = detectSubsampling( img ),\n                        doSquash = this.type === 'image/jpeg',\n                        d = 1024,\n                        sy = 0,\n                        dy = 0,\n                        tmpCanvas, tmpCtx, vertSquashRatio, dw, dh, sx, dx;\n    \n                    if ( subsampled ) {\n                        iw /= 2;\n                        ih /= 2;\n                    }\n    \n                    ctx.save();\n                    tmpCanvas = document.createElement('canvas');\n                    tmpCanvas.width = tmpCanvas.height = d;\n    \n                    tmpCtx = tmpCanvas.getContext('2d');\n                    vertSquashRatio = doSquash ?\n                            detectVerticalSquash( img, iw, ih ) : 1;\n    \n                    dw = Math.ceil( d * width / iw );\n                    dh = Math.ceil( d * height / ih / vertSquashRatio );\n    \n                    while ( sy < ih ) {\n                        sx = 0;\n                        dx = 0;\n                        while ( sx < iw ) {\n                            tmpCtx.clearRect( 0, 0, d, d );\n                            tmpCtx.drawImage( img, -sx, -sy );\n                            ctx.drawImage( tmpCanvas, 0, 0, d, d,\n                                    x + dx, y + dy, dw, dh );\n                            sx += d;\n                            dx += dw;\n                        }\n                        sy += d;\n                        dy += dh;\n                    }\n                    ctx.restore();\n                    tmpCanvas = tmpCtx = null;\n                };\n            })()\n        });\n    });\n    \n    /**\n     * @fileOverview Transport\n     * @todo 支持chunked传输，优势：\n     * 可以将大文件分成小块，挨个传输，可以提高大文件成功率，当失败的时候，也只需要重传那小部分，\n     * 而不需要重头再传一次。另外断点续传也需要用chunked方式。\n     */\n    define('runtime/html5/transport',[\n        'base',\n        'runtime/html5/runtime'\n    ], function( Base, Html5Runtime ) {\n    \n        var noop = Base.noop,\n            $ = Base.$;\n    \n        return Html5Runtime.register( 'Transport', {\n            init: function() {\n                this._status = 0;\n                this._response = null;\n            },\n    \n            send: function() {\n                var owner = this.owner,\n                    opts = this.options,\n                    xhr = this._initAjax(),\n                    blob = owner._blob,\n                    server = opts.server,\n                    formData, binary, fr;\n    \n                if ( opts.sendAsBinary ) {\n                    server += (/\\?/.test( server ) ? '&' : '?') +\n                            $.param( owner._formData );\n    \n                    binary = blob.getSource();\n                } else {\n                    formData = new FormData();\n                    $.each( owner._formData, function( k, v ) {\n                        formData.append( k, v );\n                    });\n    \n                    formData.append( opts.fileVal, blob.getSource(),\n                            opts.filename || owner._formData.name || '' );\n                }\n    \n                if ( opts.withCredentials && 'withCredentials' in xhr ) {\n                    xhr.open( opts.method, server, true );\n                    xhr.withCredentials = true;\n                } else {\n                    xhr.open( opts.method, server );\n                }\n    \n                this._setRequestHeader( xhr, opts.headers );\n    \n                if ( binary ) {\n                    // 强制设置成 content-type 为文件流。\n                    xhr.overrideMimeType &&\n                            xhr.overrideMimeType('application/octet-stream');\n    \n                    // android直接发送blob会导致服务端接收到的是空文件。\n                    // bug详情。\n                    // https://code.google.com/p/android/issues/detail?id=39882\n                    // 所以先用fileReader读取出来再通过arraybuffer的方式发送。\n                    if ( Base.os.android ) {\n                        fr = new FileReader();\n    \n                        fr.onload = function() {\n                            xhr.send( this.result );\n                            fr = fr.onload = null;\n                        };\n    \n                        fr.readAsArrayBuffer( binary );\n                    } else {\n                        xhr.send( binary );\n                    }\n                } else {\n                    xhr.send( formData );\n                }\n            },\n    \n            getResponse: function() {\n                return this._response;\n            },\n    \n            getResponseAsJson: function() {\n                return this._parseJson( this._response );\n            },\n    \n            getStatus: function() {\n                return this._status;\n            },\n    \n            abort: function() {\n                var xhr = this._xhr;\n    \n                if ( xhr ) {\n                    xhr.upload.onprogress = noop;\n                    xhr.onreadystatechange = noop;\n                    xhr.abort();\n    \n                    this._xhr = xhr = null;\n                }\n            },\n    \n            destroy: function() {\n                this.abort();\n            },\n    \n            _initAjax: function() {\n                var me = this,\n                    xhr = new XMLHttpRequest(),\n                    opts = this.options;\n    \n                if ( opts.withCredentials && !('withCredentials' in xhr) &&\n                        typeof XDomainRequest !== 'undefined' ) {\n                    xhr = new XDomainRequest();\n                }\n    \n                xhr.upload.onprogress = function( e ) {\n                    var percentage = 0;\n    \n                    if ( e.lengthComputable ) {\n                        percentage = e.loaded / e.total;\n                    }\n    \n                    return me.trigger( 'progress', percentage );\n                };\n    \n                xhr.onreadystatechange = function() {\n    \n                    if ( xhr.readyState !== 4 ) {\n                        return;\n                    }\n    \n                    xhr.upload.onprogress = noop;\n                    xhr.onreadystatechange = noop;\n                    me._xhr = null;\n                    me._status = xhr.status;\n    \n                    if ( xhr.status >= 200 && xhr.status < 300 ) {\n                        me._response = xhr.responseText;\n                        return me.trigger('load');\n                    } else if ( xhr.status >= 500 && xhr.status < 600 ) {\n                        me._response = xhr.responseText;\n                        return me.trigger( 'error', 'server' );\n                    }\n    \n    \n                    return me.trigger( 'error', me._status ? 'http' : 'abort' );\n                };\n    \n                me._xhr = xhr;\n                return xhr;\n            },\n    \n            _setRequestHeader: function( xhr, headers ) {\n                $.each( headers, function( key, val ) {\n                    xhr.setRequestHeader( key, val );\n                });\n            },\n    \n            _parseJson: function( str ) {\n                var json;\n    \n                try {\n                    json = JSON.parse( str );\n                } catch ( ex ) {\n                    json = {};\n                }\n    \n                return json;\n            }\n        });\n    });\n    /**\n     * @fileOverview  Transport flash实现\n     */\n    define('runtime/html5/md5',[\n        'runtime/html5/runtime'\n    ], function( FlashRuntime ) {\n    \n        /*\n         * Fastest md5 implementation around (JKM md5)\n         * Credits: Joseph Myers\n         *\n         * @see http://www.myersdaily.org/joseph/javascript/md5-text.html\n         * @see http://jsperf.com/md5-shootout/7\n         */\n    \n        /* this function is much faster,\n          so if possible we use it. Some IEs\n          are the only ones I know of that\n          need the idiotic second function,\n          generated by an if clause.  */\n        var add32 = function (a, b) {\n            return (a + b) & 0xFFFFFFFF;\n        },\n    \n        cmn = function (q, a, b, x, s, t) {\n            a = add32(add32(a, q), add32(x, t));\n            return add32((a << s) | (a >>> (32 - s)), b);\n        },\n    \n        ff = function (a, b, c, d, x, s, t) {\n            return cmn((b & c) | ((~b) & d), a, b, x, s, t);\n        },\n    \n        gg = function (a, b, c, d, x, s, t) {\n            return cmn((b & d) | (c & (~d)), a, b, x, s, t);\n        },\n    \n        hh = function (a, b, c, d, x, s, t) {\n            return cmn(b ^ c ^ d, a, b, x, s, t);\n        },\n    \n        ii = function (a, b, c, d, x, s, t) {\n            return cmn(c ^ (b | (~d)), a, b, x, s, t);\n        },\n    \n        md5cycle = function (x, k) {\n            var a = x[0],\n                b = x[1],\n                c = x[2],\n                d = x[3];\n    \n            a = ff(a, b, c, d, k[0], 7, -680876936);\n            d = ff(d, a, b, c, k[1], 12, -389564586);\n            c = ff(c, d, a, b, k[2], 17, 606105819);\n            b = ff(b, c, d, a, k[3], 22, -1044525330);\n            a = ff(a, b, c, d, k[4], 7, -176418897);\n            d = ff(d, a, b, c, k[5], 12, 1200080426);\n            c = ff(c, d, a, b, k[6], 17, -1473231341);\n            b = ff(b, c, d, a, k[7], 22, -45705983);\n            a = ff(a, b, c, d, k[8], 7, 1770035416);\n            d = ff(d, a, b, c, k[9], 12, -1958414417);\n            c = ff(c, d, a, b, k[10], 17, -42063);\n            b = ff(b, c, d, a, k[11], 22, -1990404162);\n            a = ff(a, b, c, d, k[12], 7, 1804603682);\n            d = ff(d, a, b, c, k[13], 12, -40341101);\n            c = ff(c, d, a, b, k[14], 17, -1502002290);\n            b = ff(b, c, d, a, k[15], 22, 1236535329);\n    \n            a = gg(a, b, c, d, k[1], 5, -165796510);\n            d = gg(d, a, b, c, k[6], 9, -1069501632);\n            c = gg(c, d, a, b, k[11], 14, 643717713);\n            b = gg(b, c, d, a, k[0], 20, -373897302);\n            a = gg(a, b, c, d, k[5], 5, -701558691);\n            d = gg(d, a, b, c, k[10], 9, 38016083);\n            c = gg(c, d, a, b, k[15], 14, -660478335);\n            b = gg(b, c, d, a, k[4], 20, -405537848);\n            a = gg(a, b, c, d, k[9], 5, 568446438);\n            d = gg(d, a, b, c, k[14], 9, -1019803690);\n            c = gg(c, d, a, b, k[3], 14, -187363961);\n            b = gg(b, c, d, a, k[8], 20, 1163531501);\n            a = gg(a, b, c, d, k[13], 5, -1444681467);\n            d = gg(d, a, b, c, k[2], 9, -51403784);\n            c = gg(c, d, a, b, k[7], 14, 1735328473);\n            b = gg(b, c, d, a, k[12], 20, -1926607734);\n    \n            a = hh(a, b, c, d, k[5], 4, -378558);\n            d = hh(d, a, b, c, k[8], 11, -2022574463);\n            c = hh(c, d, a, b, k[11], 16, 1839030562);\n            b = hh(b, c, d, a, k[14], 23, -35309556);\n            a = hh(a, b, c, d, k[1], 4, -1530992060);\n            d = hh(d, a, b, c, k[4], 11, 1272893353);\n            c = hh(c, d, a, b, k[7], 16, -155497632);\n            b = hh(b, c, d, a, k[10], 23, -1094730640);\n            a = hh(a, b, c, d, k[13], 4, 681279174);\n            d = hh(d, a, b, c, k[0], 11, -358537222);\n            c = hh(c, d, a, b, k[3], 16, -722521979);\n            b = hh(b, c, d, a, k[6], 23, 76029189);\n            a = hh(a, b, c, d, k[9], 4, -640364487);\n            d = hh(d, a, b, c, k[12], 11, -421815835);\n            c = hh(c, d, a, b, k[15], 16, 530742520);\n            b = hh(b, c, d, a, k[2], 23, -995338651);\n    \n            a = ii(a, b, c, d, k[0], 6, -198630844);\n            d = ii(d, a, b, c, k[7], 10, 1126891415);\n            c = ii(c, d, a, b, k[14], 15, -1416354905);\n            b = ii(b, c, d, a, k[5], 21, -57434055);\n            a = ii(a, b, c, d, k[12], 6, 1700485571);\n            d = ii(d, a, b, c, k[3], 10, -1894986606);\n            c = ii(c, d, a, b, k[10], 15, -1051523);\n            b = ii(b, c, d, a, k[1], 21, -2054922799);\n            a = ii(a, b, c, d, k[8], 6, 1873313359);\n            d = ii(d, a, b, c, k[15], 10, -30611744);\n            c = ii(c, d, a, b, k[6], 15, -1560198380);\n            b = ii(b, c, d, a, k[13], 21, 1309151649);\n            a = ii(a, b, c, d, k[4], 6, -145523070);\n            d = ii(d, a, b, c, k[11], 10, -1120210379);\n            c = ii(c, d, a, b, k[2], 15, 718787259);\n            b = ii(b, c, d, a, k[9], 21, -343485551);\n    \n            x[0] = add32(a, x[0]);\n            x[1] = add32(b, x[1]);\n            x[2] = add32(c, x[2]);\n            x[3] = add32(d, x[3]);\n        },\n    \n        /* there needs to be support for Unicode here,\n           * unless we pretend that we can redefine the MD-5\n           * algorithm for multi-byte characters (perhaps\n           * by adding every four 16-bit characters and\n           * shortening the sum to 32 bits). Otherwise\n           * I suggest performing MD-5 as if every character\n           * was two bytes--e.g., 0040 0025 = @%--but then\n           * how will an ordinary MD-5 sum be matched?\n           * There is no way to standardize text to something\n           * like UTF-8 before transformation; speed cost is\n           * utterly prohibitive. The JavaScript standard\n           * itself needs to look at this: it should start\n           * providing access to strings as preformed UTF-8\n           * 8-bit unsigned value arrays.\n           */\n        md5blk = function (s) {\n            var md5blks = [],\n                i; /* Andy King said do it this way. */\n    \n            for (i = 0; i < 64; i += 4) {\n                md5blks[i >> 2] = s.charCodeAt(i) + (s.charCodeAt(i + 1) << 8) + (s.charCodeAt(i + 2) << 16) + (s.charCodeAt(i + 3) << 24);\n            }\n            return md5blks;\n        },\n    \n        md5blk_array = function (a) {\n            var md5blks = [],\n                i; /* Andy King said do it this way. */\n    \n            for (i = 0; i < 64; i += 4) {\n                md5blks[i >> 2] = a[i] + (a[i + 1] << 8) + (a[i + 2] << 16) + (a[i + 3] << 24);\n            }\n            return md5blks;\n        },\n    \n        md51 = function (s) {\n            var n = s.length,\n                state = [1732584193, -271733879, -1732584194, 271733878],\n                i,\n                length,\n                tail,\n                tmp,\n                lo,\n                hi;\n    \n            for (i = 64; i <= n; i += 64) {\n                md5cycle(state, md5blk(s.substring(i - 64, i)));\n            }\n            s = s.substring(i - 64);\n            length = s.length;\n            tail = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];\n            for (i = 0; i < length; i += 1) {\n                tail[i >> 2] |= s.charCodeAt(i) << ((i % 4) << 3);\n            }\n            tail[i >> 2] |= 0x80 << ((i % 4) << 3);\n            if (i > 55) {\n                md5cycle(state, tail);\n                for (i = 0; i < 16; i += 1) {\n                    tail[i] = 0;\n                }\n            }\n    \n            // Beware that the final length might not fit in 32 bits so we take care of that\n            tmp = n * 8;\n            tmp = tmp.toString(16).match(/(.*?)(.{0,8})$/);\n            lo = parseInt(tmp[2], 16);\n            hi = parseInt(tmp[1], 16) || 0;\n    \n            tail[14] = lo;\n            tail[15] = hi;\n    \n            md5cycle(state, tail);\n            return state;\n        },\n    \n        md51_array = function (a) {\n            var n = a.length,\n                state = [1732584193, -271733879, -1732584194, 271733878],\n                i,\n                length,\n                tail,\n                tmp,\n                lo,\n                hi;\n    \n            for (i = 64; i <= n; i += 64) {\n                md5cycle(state, md5blk_array(a.subarray(i - 64, i)));\n            }\n    \n            // Not sure if it is a bug, however IE10 will always produce a sub array of length 1\n            // containing the last element of the parent array if the sub array specified starts\n            // beyond the length of the parent array - weird.\n            // https://connect.microsoft.com/IE/feedback/details/771452/typed-array-subarray-issue\n            a = (i - 64) < n ? a.subarray(i - 64) : new Uint8Array(0);\n    \n            length = a.length;\n            tail = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];\n            for (i = 0; i < length; i += 1) {\n                tail[i >> 2] |= a[i] << ((i % 4) << 3);\n            }\n    \n            tail[i >> 2] |= 0x80 << ((i % 4) << 3);\n            if (i > 55) {\n                md5cycle(state, tail);\n                for (i = 0; i < 16; i += 1) {\n                    tail[i] = 0;\n                }\n            }\n    \n            // Beware that the final length might not fit in 32 bits so we take care of that\n            tmp = n * 8;\n            tmp = tmp.toString(16).match(/(.*?)(.{0,8})$/);\n            lo = parseInt(tmp[2], 16);\n            hi = parseInt(tmp[1], 16) || 0;\n    \n            tail[14] = lo;\n            tail[15] = hi;\n    \n            md5cycle(state, tail);\n    \n            return state;\n        },\n    \n        hex_chr = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f'],\n    \n        rhex = function (n) {\n            var s = '',\n                j;\n            for (j = 0; j < 4; j += 1) {\n                s += hex_chr[(n >> (j * 8 + 4)) & 0x0F] + hex_chr[(n >> (j * 8)) & 0x0F];\n            }\n            return s;\n        },\n    \n        hex = function (x) {\n            var i;\n            for (i = 0; i < x.length; i += 1) {\n                x[i] = rhex(x[i]);\n            }\n            return x.join('');\n        },\n    \n        md5 = function (s) {\n            return hex(md51(s));\n        },\n    \n    \n    \n        ////////////////////////////////////////////////////////////////////////////\n    \n        /**\n         * SparkMD5 OOP implementation.\n         *\n         * Use this class to perform an incremental md5, otherwise use the\n         * static methods instead.\n         */\n        SparkMD5 = function () {\n            // call reset to init the instance\n            this.reset();\n        };\n    \n    \n        // In some cases the fast add32 function cannot be used..\n        if (md5('hello') !== '5d41402abc4b2a76b9719d911017c592') {\n            add32 = function (x, y) {\n                var lsw = (x & 0xFFFF) + (y & 0xFFFF),\n                    msw = (x >> 16) + (y >> 16) + (lsw >> 16);\n                return (msw << 16) | (lsw & 0xFFFF);\n            };\n        }\n    \n    \n        /**\n         * Appends a string.\n         * A conversion will be applied if an utf8 string is detected.\n         *\n         * @param {String} str The string to be appended\n         *\n         * @return {SparkMD5} The instance itself\n         */\n        SparkMD5.prototype.append = function (str) {\n            // converts the string to utf8 bytes if necessary\n            if (/[\\u0080-\\uFFFF]/.test(str)) {\n                str = unescape(encodeURIComponent(str));\n            }\n    \n            // then append as binary\n            this.appendBinary(str);\n    \n            return this;\n        };\n    \n        /**\n         * Appends a binary string.\n         *\n         * @param {String} contents The binary string to be appended\n         *\n         * @return {SparkMD5} The instance itself\n         */\n        SparkMD5.prototype.appendBinary = function (contents) {\n            this._buff += contents;\n            this._length += contents.length;\n    \n            var length = this._buff.length,\n                i;\n    \n            for (i = 64; i <= length; i += 64) {\n                md5cycle(this._state, md5blk(this._buff.substring(i - 64, i)));\n            }\n    \n            this._buff = this._buff.substr(i - 64);\n    \n            return this;\n        };\n    \n        /**\n         * Finishes the incremental computation, reseting the internal state and\n         * returning the result.\n         * Use the raw parameter to obtain the raw result instead of the hex one.\n         *\n         * @param {Boolean} raw True to get the raw result, false to get the hex result\n         *\n         * @return {String|Array} The result\n         */\n        SparkMD5.prototype.end = function (raw) {\n            var buff = this._buff,\n                length = buff.length,\n                i,\n                tail = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],\n                ret;\n    \n            for (i = 0; i < length; i += 1) {\n                tail[i >> 2] |= buff.charCodeAt(i) << ((i % 4) << 3);\n            }\n    \n            this._finish(tail, length);\n            ret = !!raw ? this._state : hex(this._state);\n    \n            this.reset();\n    \n            return ret;\n        };\n    \n        /**\n         * Finish the final calculation based on the tail.\n         *\n         * @param {Array}  tail   The tail (will be modified)\n         * @param {Number} length The length of the remaining buffer\n         */\n        SparkMD5.prototype._finish = function (tail, length) {\n            var i = length,\n                tmp,\n                lo,\n                hi;\n    \n            tail[i >> 2] |= 0x80 << ((i % 4) << 3);\n            if (i > 55) {\n                md5cycle(this._state, tail);\n                for (i = 0; i < 16; i += 1) {\n                    tail[i] = 0;\n                }\n            }\n    \n            // Do the final computation based on the tail and length\n            // Beware that the final length may not fit in 32 bits so we take care of that\n            tmp = this._length * 8;\n            tmp = tmp.toString(16).match(/(.*?)(.{0,8})$/);\n            lo = parseInt(tmp[2], 16);\n            hi = parseInt(tmp[1], 16) || 0;\n    \n            tail[14] = lo;\n            tail[15] = hi;\n            md5cycle(this._state, tail);\n        };\n    \n        /**\n         * Resets the internal state of the computation.\n         *\n         * @return {SparkMD5} The instance itself\n         */\n        SparkMD5.prototype.reset = function () {\n            this._buff = \"\";\n            this._length = 0;\n            this._state = [1732584193, -271733879, -1732584194, 271733878];\n    \n            return this;\n        };\n    \n        /**\n         * Releases memory used by the incremental buffer and other aditional\n         * resources. If you plan to use the instance again, use reset instead.\n         */\n        SparkMD5.prototype.destroy = function () {\n            delete this._state;\n            delete this._buff;\n            delete this._length;\n        };\n    \n    \n        /**\n         * Performs the md5 hash on a string.\n         * A conversion will be applied if utf8 string is detected.\n         *\n         * @param {String}  str The string\n         * @param {Boolean} raw True to get the raw result, false to get the hex result\n         *\n         * @return {String|Array} The result\n         */\n        SparkMD5.hash = function (str, raw) {\n            // converts the string to utf8 bytes if necessary\n            if (/[\\u0080-\\uFFFF]/.test(str)) {\n                str = unescape(encodeURIComponent(str));\n            }\n    \n            var hash = md51(str);\n    \n            return !!raw ? hash : hex(hash);\n        };\n    \n        /**\n         * Performs the md5 hash on a binary string.\n         *\n         * @param {String}  content The binary string\n         * @param {Boolean} raw     True to get the raw result, false to get the hex result\n         *\n         * @return {String|Array} The result\n         */\n        SparkMD5.hashBinary = function (content, raw) {\n            var hash = md51(content);\n    \n            return !!raw ? hash : hex(hash);\n        };\n    \n        /**\n         * SparkMD5 OOP implementation for array buffers.\n         *\n         * Use this class to perform an incremental md5 ONLY for array buffers.\n         */\n        SparkMD5.ArrayBuffer = function () {\n            // call reset to init the instance\n            this.reset();\n        };\n    \n        ////////////////////////////////////////////////////////////////////////////\n    \n        /**\n         * Appends an array buffer.\n         *\n         * @param {ArrayBuffer} arr The array to be appended\n         *\n         * @return {SparkMD5.ArrayBuffer} The instance itself\n         */\n        SparkMD5.ArrayBuffer.prototype.append = function (arr) {\n            // TODO: we could avoid the concatenation here but the algorithm would be more complex\n            //       if you find yourself needing extra performance, please make a PR.\n            var buff = this._concatArrayBuffer(this._buff, arr),\n                length = buff.length,\n                i;\n    \n            this._length += arr.byteLength;\n    \n            for (i = 64; i <= length; i += 64) {\n                md5cycle(this._state, md5blk_array(buff.subarray(i - 64, i)));\n            }\n    \n            // Avoids IE10 weirdness (documented above)\n            this._buff = (i - 64) < length ? buff.subarray(i - 64) : new Uint8Array(0);\n    \n            return this;\n        };\n    \n        /**\n         * Finishes the incremental computation, reseting the internal state and\n         * returning the result.\n         * Use the raw parameter to obtain the raw result instead of the hex one.\n         *\n         * @param {Boolean} raw True to get the raw result, false to get the hex result\n         *\n         * @return {String|Array} The result\n         */\n        SparkMD5.ArrayBuffer.prototype.end = function (raw) {\n            var buff = this._buff,\n                length = buff.length,\n                tail = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],\n                i,\n                ret;\n    \n            for (i = 0; i < length; i += 1) {\n                tail[i >> 2] |= buff[i] << ((i % 4) << 3);\n            }\n    \n            this._finish(tail, length);\n            ret = !!raw ? this._state : hex(this._state);\n    \n            this.reset();\n    \n            return ret;\n        };\n    \n        SparkMD5.ArrayBuffer.prototype._finish = SparkMD5.prototype._finish;\n    \n        /**\n         * Resets the internal state of the computation.\n         *\n         * @return {SparkMD5.ArrayBuffer} The instance itself\n         */\n        SparkMD5.ArrayBuffer.prototype.reset = function () {\n            this._buff = new Uint8Array(0);\n            this._length = 0;\n            this._state = [1732584193, -271733879, -1732584194, 271733878];\n    \n            return this;\n        };\n    \n        /**\n         * Releases memory used by the incremental buffer and other aditional\n         * resources. If you plan to use the instance again, use reset instead.\n         */\n        SparkMD5.ArrayBuffer.prototype.destroy = SparkMD5.prototype.destroy;\n    \n        /**\n         * Concats two array buffers, returning a new one.\n         *\n         * @param  {ArrayBuffer} first  The first array buffer\n         * @param  {ArrayBuffer} second The second array buffer\n         *\n         * @return {ArrayBuffer} The new array buffer\n         */\n        SparkMD5.ArrayBuffer.prototype._concatArrayBuffer = function (first, second) {\n            var firstLength = first.length,\n                result = new Uint8Array(firstLength + second.byteLength);\n    \n            result.set(first);\n            result.set(new Uint8Array(second), firstLength);\n    \n            return result;\n        };\n    \n        /**\n         * Performs the md5 hash on an array buffer.\n         *\n         * @param {ArrayBuffer} arr The array buffer\n         * @param {Boolean}     raw True to get the raw result, false to get the hex result\n         *\n         * @return {String|Array} The result\n         */\n        SparkMD5.ArrayBuffer.hash = function (arr, raw) {\n            var hash = md51_array(new Uint8Array(arr));\n    \n            return !!raw ? hash : hex(hash);\n        };\n        \n        return FlashRuntime.register( 'Md5', {\n            init: function() {\n                // do nothing.\n            },\n    \n            loadFromBlob: function( file ) {\n                var blob = file.getSource(),\n                    chunkSize = 2 * 1024 * 1024,\n                    chunks = Math.ceil( blob.size / chunkSize ),\n                    chunk = 0,\n                    owner = this.owner,\n                    spark = new SparkMD5.ArrayBuffer(),\n                    me = this,\n                    blobSlice = blob.mozSlice || blob.webkitSlice || blob.slice,\n                    loadNext, fr;\n    \n                fr = new FileReader();\n    \n                loadNext = function() {\n                    var start, end;\n    \n                    start = chunk * chunkSize;\n                    end = Math.min( start + chunkSize, blob.size );\n    \n                    fr.onload = function( e ) {\n                        spark.append( e.target.result );\n                        owner.trigger( 'progress', {\n                            total: file.size,\n                            loaded: end\n                        });\n                    };\n    \n                    fr.onloadend = function() {\n                        fr.onloadend = fr.onload = null;\n    \n                        if ( ++chunk < chunks ) {\n                            setTimeout( loadNext, 1 );\n                        } else {\n                            setTimeout(function(){\n                                owner.trigger('load');\n                                me.result = spark.end();\n                                loadNext = file = blob = spark = null;\n                                owner.trigger('complete');\n                            }, 50 );\n                        }\n                    };\n    \n                    fr.readAsArrayBuffer( blobSlice.call( blob, start, end ) );\n                };\n    \n                loadNext();\n            },\n    \n            getResult: function() {\n                return this.result;\n            }\n        });\n    });\n    /**\n     * @fileOverview FlashRuntime\n     */\n    define('runtime/flash/runtime',[\n        'base',\n        'runtime/runtime',\n        'runtime/compbase'\n    ], function( Base, Runtime, CompBase ) {\n    \n        var $ = Base.$,\n            type = 'flash',\n            components = {};\n    \n    \n        function getFlashVersion() {\n            var version;\n    \n            try {\n                version = navigator.plugins[ 'Shockwave Flash' ];\n                version = version.description;\n            } catch ( ex ) {\n                try {\n                    version = new ActiveXObject('ShockwaveFlash.ShockwaveFlash')\n                            .GetVariable('$version');\n                } catch ( ex2 ) {\n                    version = '0.0';\n                }\n            }\n            version = version.match( /\\d+/g );\n            return parseFloat( version[ 0 ] + '.' + version[ 1 ], 10 );\n        }\n    \n        function FlashRuntime() {\n            var pool = {},\n                clients = {},\n                destroy = this.destroy,\n                me = this,\n                jsreciver = Base.guid('webuploader_');\n    \n            Runtime.apply( me, arguments );\n            me.type = type;\n    \n    \n            // 这个方法的调用者，实际上是RuntimeClient\n            me.exec = function( comp, fn/*, args...*/ ) {\n                var client = this,\n                    uid = client.uid,\n                    args = Base.slice( arguments, 2 ),\n                    instance;\n    \n                clients[ uid ] = client;\n    \n                if ( components[ comp ] ) {\n                    if ( !pool[ uid ] ) {\n                        pool[ uid ] = new components[ comp ]( client, me );\n                    }\n    \n                    instance = pool[ uid ];\n    \n                    if ( instance[ fn ] ) {\n                        return instance[ fn ].apply( instance, args );\n                    }\n                }\n    \n                return me.flashExec.apply( client, arguments );\n            };\n    \n            function handler( evt, obj ) {\n                var type = evt.type || evt,\n                    parts, uid;\n    \n                parts = type.split('::');\n                uid = parts[ 0 ];\n                type = parts[ 1 ];\n    \n                // console.log.apply( console, arguments );\n    \n                if ( type === 'Ready' && uid === me.uid ) {\n                    me.trigger('ready');\n                } else if ( clients[ uid ] ) {\n                    clients[ uid ].trigger( type.toLowerCase(), evt, obj );\n                }\n    \n                // Base.log( evt, obj );\n            }\n    \n            // flash的接受器。\n            window[ jsreciver ] = function() {\n                var args = arguments;\n    \n                // 为了能捕获得到。\n                setTimeout(function() {\n                    handler.apply( null, args );\n                }, 1 );\n            };\n    \n            this.jsreciver = jsreciver;\n    \n            this.destroy = function() {\n                // @todo 删除池子中的所有实例\n                return destroy && destroy.apply( this, arguments );\n            };\n    \n            this.flashExec = function( comp, fn ) {\n                var flash = me.getFlash(),\n                    args = Base.slice( arguments, 2 );\n    \n                return flash.exec( this.uid, comp, fn, args );\n            };\n    \n            // @todo\n        }\n    \n        Base.inherits( Runtime, {\n            constructor: FlashRuntime,\n    \n            init: function() {\n                var container = this.getContainer(),\n                    opts = this.options,\n                    html;\n    \n                // if not the minimal height, shims are not initialized\n                // in older browsers (e.g FF3.6, IE6,7,8, Safari 4.0,5.0, etc)\n                container.css({\n                    position: 'absolute',\n                    top: '-8px',\n                    left: '-8px',\n                    width: '9px',\n                    height: '9px',\n                    overflow: 'hidden'\n                });\n    \n                // insert flash object\n                html = '<object id=\"' + this.uid + '\" type=\"application/' +\n                        'x-shockwave-flash\" data=\"' +  opts.swf + '\" ';\n    \n                if ( Base.browser.ie ) {\n                    html += 'classid=\"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000\" ';\n                }\n    \n                html += 'width=\"100%\" height=\"100%\" style=\"outline:0\">'  +\n                    '<param name=\"movie\" value=\"' + opts.swf + '\" />' +\n                    '<param name=\"flashvars\" value=\"uid=' + this.uid +\n                    '&jsreciver=' + this.jsreciver + '\" />' +\n                    '<param name=\"wmode\" value=\"transparent\" />' +\n                    '<param name=\"allowscriptaccess\" value=\"always\" />' +\n                '</object>';\n    \n                container.html( html );\n            },\n    \n            getFlash: function() {\n                if ( this._flash ) {\n                    return this._flash;\n                }\n    \n                this._flash = $( '#' + this.uid ).get( 0 );\n                return this._flash;\n            }\n    \n        });\n    \n        FlashRuntime.register = function( name, component ) {\n            component = components[ name ] = Base.inherits( CompBase, $.extend({\n    \n                // @todo fix this later\n                flashExec: function() {\n                    var owner = this.owner,\n                        runtime = this.getRuntime();\n    \n                    return runtime.flashExec.apply( owner, arguments );\n                }\n            }, component ) );\n    \n            return component;\n        };\n    \n        if ( getFlashVersion() >= 11.4 ) {\n            Runtime.addRuntime( type, FlashRuntime );\n        }\n    \n        return FlashRuntime;\n    });\n    /**\n     * @fileOverview FilePicker\n     */\n    define('runtime/flash/filepicker',[\n        'base',\n        'runtime/flash/runtime'\n    ], function( Base, FlashRuntime ) {\n        var $ = Base.$;\n    \n        return FlashRuntime.register( 'FilePicker', {\n            init: function( opts ) {\n                var copy = $.extend({}, opts ),\n                    len, i;\n    \n                // 修复Flash再没有设置title的情况下无法弹出flash文件选择框的bug.\n                len = copy.accept && copy.accept.length;\n                for (  i = 0; i < len; i++ ) {\n                    if ( !copy.accept[ i ].title ) {\n                        copy.accept[ i ].title = 'Files';\n                    }\n                }\n    \n                delete copy.button;\n                delete copy.id;\n                delete copy.container;\n    \n                this.flashExec( 'FilePicker', 'init', copy );\n            },\n    \n            destroy: function() {\n                this.flashExec( 'FilePicker', 'destroy' );\n            }\n        });\n    });\n    /**\n     * @fileOverview 图片压缩\n     */\n    define('runtime/flash/image',[\n        'runtime/flash/runtime'\n    ], function( FlashRuntime ) {\n    \n        return FlashRuntime.register( 'Image', {\n            // init: function( options ) {\n            //     var owner = this.owner;\n    \n            //     this.flashExec( 'Image', 'init', options );\n            //     owner.on( 'load', function() {\n            //         debugger;\n            //     });\n            // },\n    \n            loadFromBlob: function( blob ) {\n                var owner = this.owner;\n    \n                owner.info() && this.flashExec( 'Image', 'info', owner.info() );\n                owner.meta() && this.flashExec( 'Image', 'meta', owner.meta() );\n    \n                this.flashExec( 'Image', 'loadFromBlob', blob.uid );\n            }\n        });\n    });\n    /**\n     * @fileOverview  Transport flash实现\n     */\n    define('runtime/flash/transport',[\n        'base',\n        'runtime/flash/runtime',\n        'runtime/client'\n    ], function( Base, FlashRuntime, RuntimeClient ) {\n        var $ = Base.$;\n    \n        return FlashRuntime.register( 'Transport', {\n            init: function() {\n                this._status = 0;\n                this._response = null;\n                this._responseJson = null;\n            },\n    \n            send: function() {\n                var owner = this.owner,\n                    opts = this.options,\n                    xhr = this._initAjax(),\n                    blob = owner._blob,\n                    server = opts.server,\n                    binary;\n    \n                xhr.connectRuntime( blob.ruid );\n    \n                if ( opts.sendAsBinary ) {\n                    server += (/\\?/.test( server ) ? '&' : '?') +\n                            $.param( owner._formData );\n    \n                    binary = blob.uid;\n                } else {\n                    $.each( owner._formData, function( k, v ) {\n                        xhr.exec( 'append', k, v );\n                    });\n    \n                    xhr.exec( 'appendBlob', opts.fileVal, blob.uid,\n                            opts.filename || owner._formData.name || '' );\n                }\n    \n                this._setRequestHeader( xhr, opts.headers );\n                xhr.exec( 'send', {\n                    method: opts.method,\n                    url: server,\n                    forceURLStream: opts.forceURLStream,\n                    mimeType: 'application/octet-stream'\n                }, binary );\n            },\n    \n            getStatus: function() {\n                return this._status;\n            },\n    \n            getResponse: function() {\n                return this._response || '';\n            },\n    \n            getResponseAsJson: function() {\n                return this._responseJson;\n            },\n    \n            abort: function() {\n                var xhr = this._xhr;\n    \n                if ( xhr ) {\n                    xhr.exec('abort');\n                    xhr.destroy();\n                    this._xhr = xhr = null;\n                }\n            },\n    \n            destroy: function() {\n                this.abort();\n            },\n    \n            _initAjax: function() {\n                var me = this,\n                    xhr = new RuntimeClient('XMLHttpRequest');\n    \n                xhr.on( 'uploadprogress progress', function( e ) {\n                    var percent = e.loaded / e.total;\n                    percent = Math.min( 1, Math.max( 0, percent ) );\n                    return me.trigger( 'progress', percent );\n                });\n    \n                xhr.on( 'load', function() {\n                    var status = xhr.exec('getStatus'),\n                        readBody = false,\n                        err = '',\n                        p;\n    \n                    xhr.off();\n                    me._xhr = null;\n    \n                    if ( status >= 200 && status < 300 ) {\n                        readBody = true;\n                    } else if ( status >= 500 && status < 600 ) {\n                        readBody = true;\n                        err = 'server';\n                    } else {\n                        err = 'http';\n                    }\n    \n                    if ( readBody ) {\n                        me._response = xhr.exec('getResponse');\n                        me._response = decodeURIComponent( me._response );\n    \n                        // flash 处理可能存在 bug, 没辙只能靠 js 了\n                        // try {\n                        //     me._responseJson = xhr.exec('getResponseAsJson');\n                        // } catch ( error ) {\n    \n                        p = function( s ) {\n                            try {\n                                if (window.JSON && window.JSON.parse) {\n                                    return JSON.parse(s);\n                                }\n    \n                                return new Function('return ' + s).call();\n                            } catch ( err ) {\n                                return {};\n                            }\n                        };\n                        me._responseJson  = me._response ? p(me._response) : {};\n    \n                        // }\n                    }\n    \n                    xhr.destroy();\n                    xhr = null;\n    \n                    return err ? me.trigger( 'error', err ) : me.trigger('load');\n                });\n    \n                xhr.on( 'error', function() {\n                    xhr.off();\n                    me._xhr = null;\n                    me.trigger( 'error', 'http' );\n                });\n    \n                me._xhr = xhr;\n                return xhr;\n            },\n    \n            _setRequestHeader: function( xhr, headers ) {\n                $.each( headers, function( key, val ) {\n                    xhr.exec( 'setRequestHeader', key, val );\n                });\n            }\n        });\n    });\n    \n    /**\n     * @fileOverview Blob Html实现\n     */\n    define('runtime/flash/blob',[\n        'runtime/flash/runtime',\n        'lib/blob'\n    ], function( FlashRuntime, Blob ) {\n    \n        return FlashRuntime.register( 'Blob', {\n            slice: function( start, end ) {\n                var blob = this.flashExec( 'Blob', 'slice', start, end );\n    \n                return new Blob( this.getRuid(), blob );\n            }\n        });\n    });\n    /**\n     * @fileOverview  Md5 flash实现\n     */\n    define('runtime/flash/md5',[\n        'runtime/flash/runtime'\n    ], function( FlashRuntime ) {\n        \n        return FlashRuntime.register( 'Md5', {\n            init: function() {\n                // do nothing.\n            },\n    \n            loadFromBlob: function( blob ) {\n                return this.flashExec( 'Md5', 'loadFromBlob', blob.uid );\n            }\n        });\n    });\n    /**\n     * @fileOverview 完全版本。\n     */\n    define('preset/all',[\n        'base',\n    \n        // widgets\n        'widgets/filednd',\n        'widgets/filepaste',\n        'widgets/filepicker',\n        'widgets/image',\n        'widgets/queue',\n        'widgets/runtime',\n        'widgets/upload',\n        'widgets/validator',\n        'widgets/md5',\n    \n        // runtimes\n        // html5\n        'runtime/html5/blob',\n        'runtime/html5/dnd',\n        'runtime/html5/filepaste',\n        'runtime/html5/filepicker',\n        'runtime/html5/imagemeta/exif',\n        'runtime/html5/androidpatch',\n        'runtime/html5/image',\n        'runtime/html5/transport',\n        'runtime/html5/md5',\n    \n        // flash\n        'runtime/flash/filepicker',\n        'runtime/flash/image',\n        'runtime/flash/transport',\n        'runtime/flash/blob',\n        'runtime/flash/md5'\n    ], function( Base ) {\n        return Base;\n    });\n    define('webuploader',[\n        'preset/all'\n    ], function( preset ) {\n        return preset;\n    });\n    return require('webuploader');\n});\n"
  },
  {
    "path": "static/webuploader/webuploader.withoutimage.js",
    "content": "/*! WebUploader 0.1.5 */\n\n\n/**\n * @fileOverview 让内部各个部件的代码可以用[amd](https://github.com/amdjs/amdjs-api/wiki/AMD)模块定义方式组织起来。\n *\n * AMD API 内部的简单不完全实现，请忽略。只有当WebUploader被合并成一个文件的时候才会引入。\n */\n(function( root, factory ) {\n    var modules = {},\n\n        // 内部require, 简单不完全实现。\n        // https://github.com/amdjs/amdjs-api/wiki/require\n        _require = function( deps, callback ) {\n            var args, len, i;\n\n            // 如果deps不是数组，则直接返回指定module\n            if ( typeof deps === 'string' ) {\n                return getModule( deps );\n            } else {\n                args = [];\n                for( len = deps.length, i = 0; i < len; i++ ) {\n                    args.push( getModule( deps[ i ] ) );\n                }\n\n                return callback.apply( null, args );\n            }\n        },\n\n        // 内部define，暂时不支持不指定id.\n        _define = function( id, deps, factory ) {\n            if ( arguments.length === 2 ) {\n                factory = deps;\n                deps = null;\n            }\n\n            _require( deps || [], function() {\n                setModule( id, factory, arguments );\n            });\n        },\n\n        // 设置module, 兼容CommonJs写法。\n        setModule = function( id, factory, args ) {\n            var module = {\n                    exports: factory\n                },\n                returned;\n\n            if ( typeof factory === 'function' ) {\n                args.length || (args = [ _require, module.exports, module ]);\n                returned = factory.apply( null, args );\n                returned !== undefined && (module.exports = returned);\n            }\n\n            modules[ id ] = module.exports;\n        },\n\n        // 根据id获取module\n        getModule = function( id ) {\n            var module = modules[ id ] || root[ id ];\n\n            if ( !module ) {\n                throw new Error( '`' + id + '` is undefined' );\n            }\n\n            return module;\n        },\n\n        // 将所有modules，将路径ids装换成对象。\n        exportsTo = function( obj ) {\n            var key, host, parts, part, last, ucFirst;\n\n            // make the first character upper case.\n            ucFirst = function( str ) {\n                return str && (str.charAt( 0 ).toUpperCase() + str.substr( 1 ));\n            };\n\n            for ( key in modules ) {\n                host = obj;\n\n                if ( !modules.hasOwnProperty( key ) ) {\n                    continue;\n                }\n\n                parts = key.split('/');\n                last = ucFirst( parts.pop() );\n\n                while( (part = ucFirst( parts.shift() )) ) {\n                    host[ part ] = host[ part ] || {};\n                    host = host[ part ];\n                }\n\n                host[ last ] = modules[ key ];\n            }\n\n            return obj;\n        },\n\n        makeExport = function( dollar ) {\n            root.__dollar = dollar;\n\n            // exports every module.\n            return exportsTo( factory( root, _define, _require ) );\n        },\n\n        origin;\n\n    if ( typeof module === 'object' && typeof module.exports === 'object' ) {\n\n        // For CommonJS and CommonJS-like environments where a proper window is present,\n        module.exports = makeExport();\n    } else if ( typeof define === 'function' && define.amd ) {\n\n        // Allow using this built library as an AMD module\n        // in another project. That other project will only\n        // see this AMD call, not the internal modules in\n        // the closure below.\n        define([ 'jquery' ], makeExport );\n    } else {\n\n        // Browser globals case. Just assign the\n        // result to a property on the global.\n        origin = root.WebUploader;\n        root.WebUploader = makeExport();\n        root.WebUploader.noConflict = function() {\n            root.WebUploader = origin;\n        };\n    }\n})( window, function( window, define, require ) {\n\n\n    /**\n     * @fileOverview jQuery or Zepto\n     */\n    define('dollar-third',[],function() {\n        var $ = window.__dollar || window.jQuery || window.Zepto;\n    \n        if ( !$ ) {\n            throw new Error('jQuery or Zepto not found!');\n        }\n    \n        return $;\n    });\n    /**\n     * @fileOverview Dom 操作相关\n     */\n    define('dollar',[\n        'dollar-third'\n    ], function( _ ) {\n        return _;\n    });\n    /**\n     * @fileOverview 使用jQuery的Promise\n     */\n    define('promise-third',[\n        'dollar'\n    ], function( $ ) {\n        return {\n            Deferred: $.Deferred,\n            when: $.when,\n    \n            isPromise: function( anything ) {\n                return anything && typeof anything.then === 'function';\n            }\n        };\n    });\n    /**\n     * @fileOverview Promise/A+\n     */\n    define('promise',[\n        'promise-third'\n    ], function( _ ) {\n        return _;\n    });\n    /**\n     * @fileOverview 基础类方法。\n     */\n    \n    /**\n     * Web Uploader内部类的详细说明，以下提及的功能类，都可以在`WebUploader`这个变量中访问到。\n     *\n     * As you know, Web Uploader的每个文件都是用过[AMD](https://github.com/amdjs/amdjs-api/wiki/AMD)规范中的`define`组织起来的, 每个Module都会有个module id.\n     * 默认module id为该文件的路径，而此路径将会转化成名字空间存放在WebUploader中。如：\n     *\n     * * module `base`：WebUploader.Base\n     * * module `file`: WebUploader.File\n     * * module `lib/dnd`: WebUploader.Lib.Dnd\n     * * module `runtime/html5/dnd`: WebUploader.Runtime.Html5.Dnd\n     *\n     *\n     * 以下文档中对类的使用可能省略掉了`WebUploader`前缀。\n     * @module WebUploader\n     * @title WebUploader API文档\n     */\n    define('base',[\n        'dollar',\n        'promise'\n    ], function( $, promise ) {\n    \n        var noop = function() {},\n            call = Function.call;\n    \n        // http://jsperf.com/uncurrythis\n        // 反科里化\n        function uncurryThis( fn ) {\n            return function() {\n                return call.apply( fn, arguments );\n            };\n        }\n    \n        function bindFn( fn, context ) {\n            return function() {\n                return fn.apply( context, arguments );\n            };\n        }\n    \n        function createObject( proto ) {\n            var f;\n    \n            if ( Object.create ) {\n                return Object.create( proto );\n            } else {\n                f = function() {};\n                f.prototype = proto;\n                return new f();\n            }\n        }\n    \n    \n        /**\n         * 基础类，提供一些简单常用的方法。\n         * @class Base\n         */\n        return {\n    \n            /**\n             * @property {String} version 当前版本号。\n             */\n            version: '0.1.5',\n    \n            /**\n             * @property {jQuery|Zepto} $ 引用依赖的jQuery或者Zepto对象。\n             */\n            $: $,\n    \n            Deferred: promise.Deferred,\n    \n            isPromise: promise.isPromise,\n    \n            when: promise.when,\n    \n            /**\n             * @description  简单的浏览器检查结果。\n             *\n             * * `webkit`  webkit版本号，如果浏览器为非webkit内核，此属性为`undefined`。\n             * * `chrome`  chrome浏览器版本号，如果浏览器为chrome，此属性为`undefined`。\n             * * `ie`  ie浏览器版本号，如果浏览器为非ie，此属性为`undefined`。**暂不支持ie10+**\n             * * `firefox`  firefox浏览器版本号，如果浏览器为非firefox，此属性为`undefined`。\n             * * `safari`  safari浏览器版本号，如果浏览器为非safari，此属性为`undefined`。\n             * * `opera`  opera浏览器版本号，如果浏览器为非opera，此属性为`undefined`。\n             *\n             * @property {Object} [browser]\n             */\n            browser: (function( ua ) {\n                var ret = {},\n                    webkit = ua.match( /WebKit\\/([\\d.]+)/ ),\n                    chrome = ua.match( /Chrome\\/([\\d.]+)/ ) ||\n                        ua.match( /CriOS\\/([\\d.]+)/ ),\n    \n                    ie = ua.match( /MSIE\\s([\\d\\.]+)/ ) ||\n                        ua.match( /(?:trident)(?:.*rv:([\\w.]+))?/i ),\n                    firefox = ua.match( /Firefox\\/([\\d.]+)/ ),\n                    safari = ua.match( /Safari\\/([\\d.]+)/ ),\n                    opera = ua.match( /OPR\\/([\\d.]+)/ );\n    \n                webkit && (ret.webkit = parseFloat( webkit[ 1 ] ));\n                chrome && (ret.chrome = parseFloat( chrome[ 1 ] ));\n                ie && (ret.ie = parseFloat( ie[ 1 ] ));\n                firefox && (ret.firefox = parseFloat( firefox[ 1 ] ));\n                safari && (ret.safari = parseFloat( safari[ 1 ] ));\n                opera && (ret.opera = parseFloat( opera[ 1 ] ));\n    \n                return ret;\n            })( navigator.userAgent ),\n    \n            /**\n             * @description  操作系统检查结果。\n             *\n             * * `android`  如果在android浏览器环境下，此值为对应的android版本号，否则为`undefined`。\n             * * `ios` 如果在ios浏览器环境下，此值为对应的ios版本号，否则为`undefined`。\n             * @property {Object} [os]\n             */\n            os: (function( ua ) {\n                var ret = {},\n    \n                    // osx = !!ua.match( /\\(Macintosh\\; Intel / ),\n                    android = ua.match( /(?:Android);?[\\s\\/]+([\\d.]+)?/ ),\n                    ios = ua.match( /(?:iPad|iPod|iPhone).*OS\\s([\\d_]+)/ );\n    \n                // osx && (ret.osx = true);\n                android && (ret.android = parseFloat( android[ 1 ] ));\n                ios && (ret.ios = parseFloat( ios[ 1 ].replace( /_/g, '.' ) ));\n    \n                return ret;\n            })( navigator.userAgent ),\n    \n            /**\n             * 实现类与类之间的继承。\n             * @method inherits\n             * @grammar Base.inherits( super ) => child\n             * @grammar Base.inherits( super, protos ) => child\n             * @grammar Base.inherits( super, protos, statics ) => child\n             * @param  {Class} super 父类\n             * @param  {Object | Function} [protos] 子类或者对象。如果对象中包含constructor，子类将是用此属性值。\n             * @param  {Function} [protos.constructor] 子类构造器，不指定的话将创建个临时的直接执行父类构造器的方法。\n             * @param  {Object} [statics] 静态属性或方法。\n             * @return {Class} 返回子类。\n             * @example\n             * function Person() {\n             *     console.log( 'Super' );\n             * }\n             * Person.prototype.hello = function() {\n             *     console.log( 'hello' );\n             * };\n             *\n             * var Manager = Base.inherits( Person, {\n             *     world: function() {\n             *         console.log( 'World' );\n             *     }\n             * });\n             *\n             * // 因为没有指定构造器，父类的构造器将会执行。\n             * var instance = new Manager();    // => Super\n             *\n             * // 继承子父类的方法\n             * instance.hello();    // => hello\n             * instance.world();    // => World\n             *\n             * // 子类的__super__属性指向父类\n             * console.log( Manager.__super__ === Person );    // => true\n             */\n            inherits: function( Super, protos, staticProtos ) {\n                var child;\n    \n                if ( typeof protos === 'function' ) {\n                    child = protos;\n                    protos = null;\n                } else if ( protos && protos.hasOwnProperty('constructor') ) {\n                    child = protos.constructor;\n                } else {\n                    child = function() {\n                        return Super.apply( this, arguments );\n                    };\n                }\n    \n                // 复制静态方法\n                $.extend( true, child, Super, staticProtos || {} );\n    \n                /* jshint camelcase: false */\n    \n                // 让子类的__super__属性指向父类。\n                child.__super__ = Super.prototype;\n    \n                // 构建原型，添加原型方法或属性。\n                // 暂时用Object.create实现。\n                child.prototype = createObject( Super.prototype );\n                protos && $.extend( true, child.prototype, protos );\n    \n                return child;\n            },\n    \n            /**\n             * 一个不做任何事情的方法。可以用来赋值给默认的callback.\n             * @method noop\n             */\n            noop: noop,\n    \n            /**\n             * 返回一个新的方法，此方法将已指定的`context`来执行。\n             * @grammar Base.bindFn( fn, context ) => Function\n             * @method bindFn\n             * @example\n             * var doSomething = function() {\n             *         console.log( this.name );\n             *     },\n             *     obj = {\n             *         name: 'Object Name'\n             *     },\n             *     aliasFn = Base.bind( doSomething, obj );\n             *\n             *  aliasFn();    // => Object Name\n             *\n             */\n            bindFn: bindFn,\n    \n            /**\n             * 引用Console.log如果存在的话，否则引用一个[空函数noop](#WebUploader:Base.noop)。\n             * @grammar Base.log( args... ) => undefined\n             * @method log\n             */\n            log: (function() {\n                if ( window.console ) {\n                    return bindFn( console.log, console );\n                }\n                return noop;\n            })(),\n    \n            nextTick: (function() {\n    \n                return function( cb ) {\n                    setTimeout( cb, 1 );\n                };\n    \n                // @bug 当浏览器不在当前窗口时就停了。\n                // var next = window.requestAnimationFrame ||\n                //     window.webkitRequestAnimationFrame ||\n                //     window.mozRequestAnimationFrame ||\n                //     function( cb ) {\n                //         window.setTimeout( cb, 1000 / 60 );\n                //     };\n    \n                // // fix: Uncaught TypeError: Illegal invocation\n                // return bindFn( next, window );\n            })(),\n    \n            /**\n             * 被[uncurrythis](http://www.2ality.com/2011/11/uncurrying-this.html)的数组slice方法。\n             * 将用来将非数组对象转化成数组对象。\n             * @grammar Base.slice( target, start[, end] ) => Array\n             * @method slice\n             * @example\n             * function doSomthing() {\n             *     var args = Base.slice( arguments, 1 );\n             *     console.log( args );\n             * }\n             *\n             * doSomthing( 'ignored', 'arg2', 'arg3' );    // => Array [\"arg2\", \"arg3\"]\n             */\n            slice: uncurryThis( [].slice ),\n    \n            /**\n             * 生成唯一的ID\n             * @method guid\n             * @grammar Base.guid() => String\n             * @grammar Base.guid( prefx ) => String\n             */\n            guid: (function() {\n                var counter = 0;\n    \n                return function( prefix ) {\n                    var guid = (+new Date()).toString( 32 ),\n                        i = 0;\n    \n                    for ( ; i < 5; i++ ) {\n                        guid += Math.floor( Math.random() * 65535 ).toString( 32 );\n                    }\n    \n                    return (prefix || 'wu_') + guid + (counter++).toString( 32 );\n                };\n            })(),\n    \n            /**\n             * 格式化文件大小, 输出成带单位的字符串\n             * @method formatSize\n             * @grammar Base.formatSize( size ) => String\n             * @grammar Base.formatSize( size, pointLength ) => String\n             * @grammar Base.formatSize( size, pointLength, units ) => String\n             * @param {Number} size 文件大小\n             * @param {Number} [pointLength=2] 精确到的小数点数。\n             * @param {Array} [units=[ 'B', 'K', 'M', 'G', 'TB' ]] 单位数组。从字节，到千字节，一直往上指定。如果单位数组里面只指定了到了K(千字节)，同时文件大小大于M, 此方法的输出将还是显示成多少K.\n             * @example\n             * console.log( Base.formatSize( 100 ) );    // => 100B\n             * console.log( Base.formatSize( 1024 ) );    // => 1.00K\n             * console.log( Base.formatSize( 1024, 0 ) );    // => 1K\n             * console.log( Base.formatSize( 1024 * 1024 ) );    // => 1.00M\n             * console.log( Base.formatSize( 1024 * 1024 * 1024 ) );    // => 1.00G\n             * console.log( Base.formatSize( 1024 * 1024 * 1024, 0, ['B', 'KB', 'MB'] ) );    // => 1024MB\n             */\n            formatSize: function( size, pointLength, units ) {\n                var unit;\n    \n                units = units || [ 'B', 'K', 'M', 'G', 'TB' ];\n    \n                while ( (unit = units.shift()) && size > 1024 ) {\n                    size = size / 1024;\n                }\n    \n                return (unit === 'B' ? size : size.toFixed( pointLength || 2 )) +\n                        unit;\n            }\n        };\n    });\n    /**\n     * 事件处理类，可以独立使用，也可以扩展给对象使用。\n     * @fileOverview Mediator\n     */\n    define('mediator',[\n        'base'\n    ], function( Base ) {\n        var $ = Base.$,\n            slice = [].slice,\n            separator = /\\s+/,\n            protos;\n    \n        // 根据条件过滤出事件handlers.\n        function findHandlers( arr, name, callback, context ) {\n            return $.grep( arr, function( handler ) {\n                return handler &&\n                        (!name || handler.e === name) &&\n                        (!callback || handler.cb === callback ||\n                        handler.cb._cb === callback) &&\n                        (!context || handler.ctx === context);\n            });\n        }\n    \n        function eachEvent( events, callback, iterator ) {\n            // 不支持对象，只支持多个event用空格隔开\n            $.each( (events || '').split( separator ), function( _, key ) {\n                iterator( key, callback );\n            });\n        }\n    \n        function triggerHanders( events, args ) {\n            var stoped = false,\n                i = -1,\n                len = events.length,\n                handler;\n    \n            while ( ++i < len ) {\n                handler = events[ i ];\n    \n                if ( handler.cb.apply( handler.ctx2, args ) === false ) {\n                    stoped = true;\n                    break;\n                }\n            }\n    \n            return !stoped;\n        }\n    \n        protos = {\n    \n            /**\n             * 绑定事件。\n             *\n             * `callback`方法在执行时，arguments将会来源于trigger的时候携带的参数。如\n             * ```javascript\n             * var obj = {};\n             *\n             * // 使得obj有事件行为\n             * Mediator.installTo( obj );\n             *\n             * obj.on( 'testa', function( arg1, arg2 ) {\n             *     console.log( arg1, arg2 ); // => 'arg1', 'arg2'\n             * });\n             *\n             * obj.trigger( 'testa', 'arg1', 'arg2' );\n             * ```\n             *\n             * 如果`callback`中，某一个方法`return false`了，则后续的其他`callback`都不会被执行到。\n             * 切会影响到`trigger`方法的返回值，为`false`。\n             *\n             * `on`还可以用来添加一个特殊事件`all`, 这样所有的事件触发都会响应到。同时此类`callback`中的arguments有一个不同处，\n             * 就是第一个参数为`type`，记录当前是什么事件在触发。此类`callback`的优先级比脚低，会再正常`callback`执行完后触发。\n             * ```javascript\n             * obj.on( 'all', function( type, arg1, arg2 ) {\n             *     console.log( type, arg1, arg2 ); // => 'testa', 'arg1', 'arg2'\n             * });\n             * ```\n             *\n             * @method on\n             * @grammar on( name, callback[, context] ) => self\n             * @param  {String}   name     事件名，支持多个事件用空格隔开\n             * @param  {Function} callback 事件处理器\n             * @param  {Object}   [context]  事件处理器的上下文。\n             * @return {self} 返回自身，方便链式\n             * @chainable\n             * @class Mediator\n             */\n            on: function( name, callback, context ) {\n                var me = this,\n                    set;\n    \n                if ( !callback ) {\n                    return this;\n                }\n    \n                set = this._events || (this._events = []);\n    \n                eachEvent( name, callback, function( name, callback ) {\n                    var handler = { e: name };\n    \n                    handler.cb = callback;\n                    handler.ctx = context;\n                    handler.ctx2 = context || me;\n                    handler.id = set.length;\n    \n                    set.push( handler );\n                });\n    \n                return this;\n            },\n    \n            /**\n             * 绑定事件，且当handler执行完后，自动解除绑定。\n             * @method once\n             * @grammar once( name, callback[, context] ) => self\n             * @param  {String}   name     事件名\n             * @param  {Function} callback 事件处理器\n             * @param  {Object}   [context]  事件处理器的上下文。\n             * @return {self} 返回自身，方便链式\n             * @chainable\n             */\n            once: function( name, callback, context ) {\n                var me = this;\n    \n                if ( !callback ) {\n                    return me;\n                }\n    \n                eachEvent( name, callback, function( name, callback ) {\n                    var once = function() {\n                            me.off( name, once );\n                            return callback.apply( context || me, arguments );\n                        };\n    \n                    once._cb = callback;\n                    me.on( name, once, context );\n                });\n    \n                return me;\n            },\n    \n            /**\n             * 解除事件绑定\n             * @method off\n             * @grammar off( [name[, callback[, context] ] ] ) => self\n             * @param  {String}   [name]     事件名\n             * @param  {Function} [callback] 事件处理器\n             * @param  {Object}   [context]  事件处理器的上下文。\n             * @return {self} 返回自身，方便链式\n             * @chainable\n             */\n            off: function( name, cb, ctx ) {\n                var events = this._events;\n    \n                if ( !events ) {\n                    return this;\n                }\n    \n                if ( !name && !cb && !ctx ) {\n                    this._events = [];\n                    return this;\n                }\n    \n                eachEvent( name, cb, function( name, cb ) {\n                    $.each( findHandlers( events, name, cb, ctx ), function() {\n                        delete events[ this.id ];\n                    });\n                });\n    \n                return this;\n            },\n    \n            /**\n             * 触发事件\n             * @method trigger\n             * @grammar trigger( name[, args...] ) => self\n             * @param  {String}   type     事件名\n             * @param  {*} [...] 任意参数\n             * @return {Boolean} 如果handler中return false了，则返回false, 否则返回true\n             */\n            trigger: function( type ) {\n                var args, events, allEvents;\n    \n                if ( !this._events || !type ) {\n                    return this;\n                }\n    \n                args = slice.call( arguments, 1 );\n                events = findHandlers( this._events, type );\n                allEvents = findHandlers( this._events, 'all' );\n    \n                return triggerHanders( events, args ) &&\n                        triggerHanders( allEvents, arguments );\n            }\n        };\n    \n        /**\n         * 中介者，它本身是个单例，但可以通过[installTo](#WebUploader:Mediator:installTo)方法，使任何对象具备事件行为。\n         * 主要目的是负责模块与模块之间的合作，降低耦合度。\n         *\n         * @class Mediator\n         */\n        return $.extend({\n    \n            /**\n             * 可以通过这个接口，使任何对象具备事件功能。\n             * @method installTo\n             * @param  {Object} obj 需要具备事件行为的对象。\n             * @return {Object} 返回obj.\n             */\n            installTo: function( obj ) {\n                return $.extend( obj, protos );\n            }\n    \n        }, protos );\n    });\n    /**\n     * @fileOverview Uploader上传类\n     */\n    define('uploader',[\n        'base',\n        'mediator'\n    ], function( Base, Mediator ) {\n    \n        var $ = Base.$;\n    \n        /**\n         * 上传入口类。\n         * @class Uploader\n         * @constructor\n         * @grammar new Uploader( opts ) => Uploader\n         * @example\n         * var uploader = WebUploader.Uploader({\n         *     swf: 'path_of_swf/Uploader.swf',\n         *\n         *     // 开起分片上传。\n         *     chunked: true\n         * });\n         */\n        function Uploader( opts ) {\n            this.options = $.extend( true, {}, Uploader.options, opts );\n            this._init( this.options );\n        }\n    \n        // default Options\n        // widgets中有相应扩展\n        Uploader.options = {};\n        Mediator.installTo( Uploader.prototype );\n    \n        // 批量添加纯命令式方法。\n        $.each({\n            upload: 'start-upload',\n            stop: 'stop-upload',\n            getFile: 'get-file',\n            getFiles: 'get-files',\n            addFile: 'add-file',\n            addFiles: 'add-file',\n            sort: 'sort-files',\n            removeFile: 'remove-file',\n            cancelFile: 'cancel-file',\n            skipFile: 'skip-file',\n            retry: 'retry',\n            isInProgress: 'is-in-progress',\n            makeThumb: 'make-thumb',\n            md5File: 'md5-file',\n            getDimension: 'get-dimension',\n            addButton: 'add-btn',\n            predictRuntimeType: 'predict-runtime-type',\n            refresh: 'refresh',\n            disable: 'disable',\n            enable: 'enable',\n            reset: 'reset'\n        }, function( fn, command ) {\n            Uploader.prototype[ fn ] = function() {\n                return this.request( command, arguments );\n            };\n        });\n    \n        $.extend( Uploader.prototype, {\n            state: 'pending',\n    \n            _init: function( opts ) {\n                var me = this;\n    \n                me.request( 'init', opts, function() {\n                    me.state = 'ready';\n                    me.trigger('ready');\n                });\n            },\n    \n            /**\n             * 获取或者设置Uploader配置项。\n             * @method option\n             * @grammar option( key ) => *\n             * @grammar option( key, val ) => self\n             * @example\n             *\n             * // 初始状态图片上传前不会压缩\n             * var uploader = new WebUploader.Uploader({\n             *     compress: null;\n             * });\n             *\n             * // 修改后图片上传前，尝试将图片压缩到1600 * 1600\n             * uploader.option( 'compress', {\n             *     width: 1600,\n             *     height: 1600\n             * });\n             */\n            option: function( key, val ) {\n                var opts = this.options;\n    \n                // setter\n                if ( arguments.length > 1 ) {\n    \n                    if ( $.isPlainObject( val ) &&\n                            $.isPlainObject( opts[ key ] ) ) {\n                        $.extend( opts[ key ], val );\n                    } else {\n                        opts[ key ] = val;\n                    }\n    \n                } else {    // getter\n                    return key ? opts[ key ] : opts;\n                }\n            },\n    \n            /**\n             * 获取文件统计信息。返回一个包含一下信息的对象。\n             * * `successNum` 上传成功的文件数\n             * * `progressNum` 上传中的文件数\n             * * `cancelNum` 被删除的文件数\n             * * `invalidNum` 无效的文件数\n             * * `uploadFailNum` 上传失败的文件数\n             * * `queueNum` 还在队列中的文件数\n             * * `interruptNum` 被暂停的文件数\n             * @method getStats\n             * @grammar getStats() => Object\n             */\n            getStats: function() {\n                // return this._mgr.getStats.apply( this._mgr, arguments );\n                var stats = this.request('get-stats');\n    \n                return stats ? {\n                    successNum: stats.numOfSuccess,\n                    progressNum: stats.numOfProgress,\n    \n                    // who care?\n                    // queueFailNum: 0,\n                    cancelNum: stats.numOfCancel,\n                    invalidNum: stats.numOfInvalid,\n                    uploadFailNum: stats.numOfUploadFailed,\n                    queueNum: stats.numOfQueue,\n                    interruptNum: stats.numofInterrupt\n                } : {};\n            },\n    \n            // 需要重写此方法来来支持opts.onEvent和instance.onEvent的处理器\n            trigger: function( type/*, args...*/ ) {\n                var args = [].slice.call( arguments, 1 ),\n                    opts = this.options,\n                    name = 'on' + type.substring( 0, 1 ).toUpperCase() +\n                        type.substring( 1 );\n    \n                if (\n                        // 调用通过on方法注册的handler.\n                        Mediator.trigger.apply( this, arguments ) === false ||\n    \n                        // 调用opts.onEvent\n                        $.isFunction( opts[ name ] ) &&\n                        opts[ name ].apply( this, args ) === false ||\n    \n                        // 调用this.onEvent\n                        $.isFunction( this[ name ] ) &&\n                        this[ name ].apply( this, args ) === false ||\n    \n                        // 广播所有uploader的事件。\n                        Mediator.trigger.apply( Mediator,\n                        [ this, type ].concat( args ) ) === false ) {\n    \n                    return false;\n                }\n    \n                return true;\n            },\n    \n            /**\n             * 销毁 webuploader 实例\n             * @method destroy\n             * @grammar destroy() => undefined\n             */\n            destroy: function() {\n                this.request( 'destroy', arguments );\n                this.off();\n            },\n    \n            // widgets/widget.js将补充此方法的详细文档。\n            request: Base.noop\n        });\n    \n        /**\n         * 创建Uploader实例，等同于new Uploader( opts );\n         * @method create\n         * @class Base\n         * @static\n         * @grammar Base.create( opts ) => Uploader\n         */\n        Base.create = Uploader.create = function( opts ) {\n            return new Uploader( opts );\n        };\n    \n        // 暴露Uploader，可以通过它来扩展业务逻辑。\n        Base.Uploader = Uploader;\n    \n        return Uploader;\n    });\n    /**\n     * @fileOverview Runtime管理器，负责Runtime的选择, 连接\n     */\n    define('runtime/runtime',[\n        'base',\n        'mediator'\n    ], function( Base, Mediator ) {\n    \n        var $ = Base.$,\n            factories = {},\n    \n            // 获取对象的第一个key\n            getFirstKey = function( obj ) {\n                for ( var key in obj ) {\n                    if ( obj.hasOwnProperty( key ) ) {\n                        return key;\n                    }\n                }\n                return null;\n            };\n    \n        // 接口类。\n        function Runtime( options ) {\n            this.options = $.extend({\n                container: document.body\n            }, options );\n            this.uid = Base.guid('rt_');\n        }\n    \n        $.extend( Runtime.prototype, {\n    \n            getContainer: function() {\n                var opts = this.options,\n                    parent, container;\n    \n                if ( this._container ) {\n                    return this._container;\n                }\n    \n                parent = $( opts.container || document.body );\n                container = $( document.createElement('div') );\n    \n                container.attr( 'id', 'rt_' + this.uid );\n                container.css({\n                    position: 'absolute',\n                    top: '0px',\n                    left: '0px',\n                    width: '1px',\n                    height: '1px',\n                    overflow: 'hidden'\n                });\n    \n                parent.append( container );\n                parent.addClass('webuploader-container');\n                this._container = container;\n                this._parent = parent;\n                return container;\n            },\n    \n            init: Base.noop,\n            exec: Base.noop,\n    \n            destroy: function() {\n                this._container && this._container.remove();\n                this._parent && this._parent.removeClass('webuploader-container');\n                this.off();\n            }\n        });\n    \n        Runtime.orders = 'html5,flash';\n    \n    \n        /**\n         * 添加Runtime实现。\n         * @param {String} type    类型\n         * @param {Runtime} factory 具体Runtime实现。\n         */\n        Runtime.addRuntime = function( type, factory ) {\n            factories[ type ] = factory;\n        };\n    \n        Runtime.hasRuntime = function( type ) {\n            return !!(type ? factories[ type ] : getFirstKey( factories ));\n        };\n    \n        Runtime.create = function( opts, orders ) {\n            var type, runtime;\n    \n            orders = orders || Runtime.orders;\n            $.each( orders.split( /\\s*,\\s*/g ), function() {\n                if ( factories[ this ] ) {\n                    type = this;\n                    return false;\n                }\n            });\n    \n            type = type || getFirstKey( factories );\n    \n            if ( !type ) {\n                throw new Error('Runtime Error');\n            }\n    \n            runtime = new factories[ type ]( opts );\n            return runtime;\n        };\n    \n        Mediator.installTo( Runtime.prototype );\n        return Runtime;\n    });\n    \n    /**\n     * @fileOverview Runtime管理器，负责Runtime的选择, 连接\n     */\n    define('runtime/client',[\n        'base',\n        'mediator',\n        'runtime/runtime'\n    ], function( Base, Mediator, Runtime ) {\n    \n        var cache;\n    \n        cache = (function() {\n            var obj = {};\n    \n            return {\n                add: function( runtime ) {\n                    obj[ runtime.uid ] = runtime;\n                },\n    \n                get: function( ruid, standalone ) {\n                    var i;\n    \n                    if ( ruid ) {\n                        return obj[ ruid ];\n                    }\n    \n                    for ( i in obj ) {\n                        // 有些类型不能重用，比如filepicker.\n                        if ( standalone && obj[ i ].__standalone ) {\n                            continue;\n                        }\n    \n                        return obj[ i ];\n                    }\n    \n                    return null;\n                },\n    \n                remove: function( runtime ) {\n                    delete obj[ runtime.uid ];\n                }\n            };\n        })();\n    \n        function RuntimeClient( component, standalone ) {\n            var deferred = Base.Deferred(),\n                runtime;\n    \n            this.uid = Base.guid('client_');\n    \n            // 允许runtime没有初始化之前，注册一些方法在初始化后执行。\n            this.runtimeReady = function( cb ) {\n                return deferred.done( cb );\n            };\n    \n            this.connectRuntime = function( opts, cb ) {\n    \n                // already connected.\n                if ( runtime ) {\n                    throw new Error('already connected!');\n                }\n    \n                deferred.done( cb );\n    \n                if ( typeof opts === 'string' && cache.get( opts ) ) {\n                    runtime = cache.get( opts );\n                }\n    \n                // 像filePicker只能独立存在，不能公用。\n                runtime = runtime || cache.get( null, standalone );\n    \n                // 需要创建\n                if ( !runtime ) {\n                    runtime = Runtime.create( opts, opts.runtimeOrder );\n                    runtime.__promise = deferred.promise();\n                    runtime.once( 'ready', deferred.resolve );\n                    runtime.init();\n                    cache.add( runtime );\n                    runtime.__client = 1;\n                } else {\n                    // 来自cache\n                    Base.$.extend( runtime.options, opts );\n                    runtime.__promise.then( deferred.resolve );\n                    runtime.__client++;\n                }\n    \n                standalone && (runtime.__standalone = standalone);\n                return runtime;\n            };\n    \n            this.getRuntime = function() {\n                return runtime;\n            };\n    \n            this.disconnectRuntime = function() {\n                if ( !runtime ) {\n                    return;\n                }\n    \n                runtime.__client--;\n    \n                if ( runtime.__client <= 0 ) {\n                    cache.remove( runtime );\n                    delete runtime.__promise;\n                    runtime.destroy();\n                }\n    \n                runtime = null;\n            };\n    \n            this.exec = function() {\n                if ( !runtime ) {\n                    return;\n                }\n    \n                var args = Base.slice( arguments );\n                component && args.unshift( component );\n    \n                return runtime.exec.apply( this, args );\n            };\n    \n            this.getRuid = function() {\n                return runtime && runtime.uid;\n            };\n    \n            this.destroy = (function( destroy ) {\n                return function() {\n                    destroy && destroy.apply( this, arguments );\n                    this.trigger('destroy');\n                    this.off();\n                    this.exec('destroy');\n                    this.disconnectRuntime();\n                };\n            })( this.destroy );\n        }\n    \n        Mediator.installTo( RuntimeClient.prototype );\n        return RuntimeClient;\n    });\n    /**\n     * @fileOverview 错误信息\n     */\n    define('lib/dnd',[\n        'base',\n        'mediator',\n        'runtime/client'\n    ], function( Base, Mediator, RuntimeClent ) {\n    \n        var $ = Base.$;\n    \n        function DragAndDrop( opts ) {\n            opts = this.options = $.extend({}, DragAndDrop.options, opts );\n    \n            opts.container = $( opts.container );\n    \n            if ( !opts.container.length ) {\n                return;\n            }\n    \n            RuntimeClent.call( this, 'DragAndDrop' );\n        }\n    \n        DragAndDrop.options = {\n            accept: null,\n            disableGlobalDnd: false\n        };\n    \n        Base.inherits( RuntimeClent, {\n            constructor: DragAndDrop,\n    \n            init: function() {\n                var me = this;\n    \n                me.connectRuntime( me.options, function() {\n                    me.exec('init');\n                    me.trigger('ready');\n                });\n            }\n        });\n    \n        Mediator.installTo( DragAndDrop.prototype );\n    \n        return DragAndDrop;\n    });\n    /**\n     * @fileOverview 组件基类。\n     */\n    define('widgets/widget',[\n        'base',\n        'uploader'\n    ], function( Base, Uploader ) {\n    \n        var $ = Base.$,\n            _init = Uploader.prototype._init,\n            _destroy = Uploader.prototype.destroy,\n            IGNORE = {},\n            widgetClass = [];\n    \n        function isArrayLike( obj ) {\n            if ( !obj ) {\n                return false;\n            }\n    \n            var length = obj.length,\n                type = $.type( obj );\n    \n            if ( obj.nodeType === 1 && length ) {\n                return true;\n            }\n    \n            return type === 'array' || type !== 'function' && type !== 'string' &&\n                    (length === 0 || typeof length === 'number' && length > 0 &&\n                    (length - 1) in obj);\n        }\n    \n        function Widget( uploader ) {\n            this.owner = uploader;\n            this.options = uploader.options;\n        }\n    \n        $.extend( Widget.prototype, {\n    \n            init: Base.noop,\n    \n            // 类Backbone的事件监听声明，监听uploader实例上的事件\n            // widget直接无法监听事件，事件只能通过uploader来传递\n            invoke: function( apiName, args ) {\n    \n                /*\n                    {\n                        'make-thumb': 'makeThumb'\n                    }\n                 */\n                var map = this.responseMap;\n    \n                // 如果无API响应声明则忽略\n                if ( !map || !(apiName in map) || !(map[ apiName ] in this) ||\n                        !$.isFunction( this[ map[ apiName ] ] ) ) {\n    \n                    return IGNORE;\n                }\n    \n                return this[ map[ apiName ] ].apply( this, args );\n    \n            },\n    \n            /**\n             * 发送命令。当传入`callback`或者`handler`中返回`promise`时。返回一个当所有`handler`中的promise都完成后完成的新`promise`。\n             * @method request\n             * @grammar request( command, args ) => * | Promise\n             * @grammar request( command, args, callback ) => Promise\n             * @for  Uploader\n             */\n            request: function() {\n                return this.owner.request.apply( this.owner, arguments );\n            }\n        });\n    \n        // 扩展Uploader.\n        $.extend( Uploader.prototype, {\n    \n            /**\n             * @property {String | Array} [disableWidgets=undefined]\n             * @namespace options\n             * @for Uploader\n             * @description 默认所有 Uploader.register 了的 widget 都会被加载，如果禁用某一部分，请通过此 option 指定黑名单。\n             */\n    \n            // 覆写_init用来初始化widgets\n            _init: function() {\n                var me = this,\n                    widgets = me._widgets = [],\n                    deactives = me.options.disableWidgets || '';\n    \n                $.each( widgetClass, function( _, klass ) {\n                    (!deactives || !~deactives.indexOf( klass._name )) &&\n                        widgets.push( new klass( me ) );\n                });\n    \n                return _init.apply( me, arguments );\n            },\n    \n            request: function( apiName, args, callback ) {\n                var i = 0,\n                    widgets = this._widgets,\n                    len = widgets && widgets.length,\n                    rlts = [],\n                    dfds = [],\n                    widget, rlt, promise, key;\n    \n                args = isArrayLike( args ) ? args : [ args ];\n    \n                for ( ; i < len; i++ ) {\n                    widget = widgets[ i ];\n                    rlt = widget.invoke( apiName, args );\n    \n                    if ( rlt !== IGNORE ) {\n    \n                        // Deferred对象\n                        if ( Base.isPromise( rlt ) ) {\n                            dfds.push( rlt );\n                        } else {\n                            rlts.push( rlt );\n                        }\n                    }\n                }\n    \n                // 如果有callback，则用异步方式。\n                if ( callback || dfds.length ) {\n                    promise = Base.when.apply( Base, dfds );\n                    key = promise.pipe ? 'pipe' : 'then';\n    \n                    // 很重要不能删除。删除了会死循环。\n                    // 保证执行顺序。让callback总是在下一个 tick 中执行。\n                    return promise[ key ](function() {\n                                var deferred = Base.Deferred(),\n                                    args = arguments;\n    \n                                if ( args.length === 1 ) {\n                                    args = args[ 0 ];\n                                }\n    \n                                setTimeout(function() {\n                                    deferred.resolve( args );\n                                }, 1 );\n    \n                                return deferred.promise();\n                            })[ callback ? key : 'done' ]( callback || Base.noop );\n                } else {\n                    return rlts[ 0 ];\n                }\n            },\n    \n            destroy: function() {\n                _destroy.apply( this, arguments );\n                this._widgets = null;\n            }\n        });\n    \n        /**\n         * 添加组件\n         * @grammar Uploader.register(proto);\n         * @grammar Uploader.register(map, proto);\n         * @param  {object} responseMap API 名称与函数实现的映射\n         * @param  {object} proto 组件原型，构造函数通过 constructor 属性定义\n         * @method Uploader.register\n         * @for Uploader\n         * @example\n         * Uploader.register({\n         *     'make-thumb': 'makeThumb'\n         * }, {\n         *     init: function( options ) {},\n         *     makeThumb: function() {}\n         * });\n         *\n         * Uploader.register({\n         *     'make-thumb': function() {\n         *         \n         *     }\n         * });\n         */\n        Uploader.register = Widget.register = function( responseMap, widgetProto ) {\n            var map = { init: 'init', destroy: 'destroy', name: 'anonymous' },\n                klass;\n    \n            if ( arguments.length === 1 ) {\n                widgetProto = responseMap;\n    \n                // 自动生成 map 表。\n                $.each(widgetProto, function(key) {\n                    if ( key[0] === '_' || key === 'name' ) {\n                        key === 'name' && (map.name = widgetProto.name);\n                        return;\n                    }\n    \n                    map[key.replace(/[A-Z]/g, '-$&').toLowerCase()] = key;\n                });\n    \n            } else {\n                map = $.extend( map, responseMap );\n            }\n    \n            widgetProto.responseMap = map;\n            klass = Base.inherits( Widget, widgetProto );\n            klass._name = map.name;\n            widgetClass.push( klass );\n    \n            return klass;\n        };\n    \n        /**\n         * 删除插件，只有在注册时指定了名字的才能被删除。\n         * @grammar Uploader.unRegister(name);\n         * @param  {string} name 组件名字\n         * @method Uploader.unRegister\n         * @for Uploader\n         * @example\n         *\n         * Uploader.register({\n         *     name: 'custom',\n         *     \n         *     'make-thumb': function() {\n         *         \n         *     }\n         * });\n         *\n         * Uploader.unRegister('custom');\n         */\n        Uploader.unRegister = Widget.unRegister = function( name ) {\n            if ( !name || name === 'anonymous' ) {\n                return;\n            }\n            \n            // 删除指定的插件。\n            for ( var i = widgetClass.length; i--; ) {\n                if ( widgetClass[i]._name === name ) {\n                    widgetClass.splice(i, 1)\n                }\n            }\n        };\n    \n        return Widget;\n    });\n    /**\n     * @fileOverview DragAndDrop Widget。\n     */\n    define('widgets/filednd',[\n        'base',\n        'uploader',\n        'lib/dnd',\n        'widgets/widget'\n    ], function( Base, Uploader, Dnd ) {\n        var $ = Base.$;\n    \n        Uploader.options.dnd = '';\n    \n        /**\n         * @property {Selector} [dnd=undefined]  指定Drag And Drop拖拽的容器，如果不指定，则不启动。\n         * @namespace options\n         * @for Uploader\n         */\n        \n        /**\n         * @property {Selector} [disableGlobalDnd=false]  是否禁掉整个页面的拖拽功能，如果不禁用，图片拖进来的时候会默认被浏览器打开。\n         * @namespace options\n         * @for Uploader\n         */\n    \n        /**\n         * @event dndAccept\n         * @param {DataTransferItemList} items DataTransferItem\n         * @description 阻止此事件可以拒绝某些类型的文件拖入进来。目前只有 chrome 提供这样的 API，且只能通过 mime-type 验证。\n         * @for  Uploader\n         */\n        return Uploader.register({\n            name: 'dnd',\n            \n            init: function( opts ) {\n    \n                if ( !opts.dnd ||\n                        this.request('predict-runtime-type') !== 'html5' ) {\n                    return;\n                }\n    \n                var me = this,\n                    deferred = Base.Deferred(),\n                    options = $.extend({}, {\n                        disableGlobalDnd: opts.disableGlobalDnd,\n                        container: opts.dnd,\n                        accept: opts.accept\n                    }),\n                    dnd;\n    \n                this.dnd = dnd = new Dnd( options );\n    \n                dnd.once( 'ready', deferred.resolve );\n                dnd.on( 'drop', function( files ) {\n                    me.request( 'add-file', [ files ]);\n                });\n    \n                // 检测文件是否全部允许添加。\n                dnd.on( 'accept', function( items ) {\n                    return me.owner.trigger( 'dndAccept', items );\n                });\n    \n                dnd.init();\n    \n                return deferred.promise();\n            },\n    \n            destroy: function() {\n                this.dnd && this.dnd.destroy();\n            }\n        });\n    });\n    \n    /**\n     * @fileOverview 错误信息\n     */\n    define('lib/filepaste',[\n        'base',\n        'mediator',\n        'runtime/client'\n    ], function( Base, Mediator, RuntimeClent ) {\n    \n        var $ = Base.$;\n    \n        function FilePaste( opts ) {\n            opts = this.options = $.extend({}, opts );\n            opts.container = $( opts.container || document.body );\n            RuntimeClent.call( this, 'FilePaste' );\n        }\n    \n        Base.inherits( RuntimeClent, {\n            constructor: FilePaste,\n    \n            init: function() {\n                var me = this;\n    \n                me.connectRuntime( me.options, function() {\n                    me.exec('init');\n                    me.trigger('ready');\n                });\n            }\n        });\n    \n        Mediator.installTo( FilePaste.prototype );\n    \n        return FilePaste;\n    });\n    /**\n     * @fileOverview 组件基类。\n     */\n    define('widgets/filepaste',[\n        'base',\n        'uploader',\n        'lib/filepaste',\n        'widgets/widget'\n    ], function( Base, Uploader, FilePaste ) {\n        var $ = Base.$;\n    \n        /**\n         * @property {Selector} [paste=undefined]  指定监听paste事件的容器，如果不指定，不启用此功能。此功能为通过粘贴来添加截屏的图片。建议设置为`document.body`.\n         * @namespace options\n         * @for Uploader\n         */\n        return Uploader.register({\n            name: 'paste',\n            \n            init: function( opts ) {\n    \n                if ( !opts.paste ||\n                        this.request('predict-runtime-type') !== 'html5' ) {\n                    return;\n                }\n    \n                var me = this,\n                    deferred = Base.Deferred(),\n                    options = $.extend({}, {\n                        container: opts.paste,\n                        accept: opts.accept\n                    }),\n                    paste;\n    \n                this.paste = paste = new FilePaste( options );\n    \n                paste.once( 'ready', deferred.resolve );\n                paste.on( 'paste', function( files ) {\n                    me.owner.request( 'add-file', [ files ]);\n                });\n                paste.init();\n    \n                return deferred.promise();\n            },\n    \n            destroy: function() {\n                this.paste && this.paste.destroy();\n            }\n        });\n    });\n    /**\n     * @fileOverview Blob\n     */\n    define('lib/blob',[\n        'base',\n        'runtime/client'\n    ], function( Base, RuntimeClient ) {\n    \n        function Blob( ruid, source ) {\n            var me = this;\n    \n            me.source = source;\n            me.ruid = ruid;\n            this.size = source.size || 0;\n    \n            // 如果没有指定 mimetype, 但是知道文件后缀。\n            if ( !source.type && this.ext &&\n                    ~'jpg,jpeg,png,gif,bmp'.indexOf( this.ext ) ) {\n                this.type = 'image/' + (this.ext === 'jpg' ? 'jpeg' : this.ext);\n            } else {\n                this.type = source.type || 'application/octet-stream';\n            }\n    \n            RuntimeClient.call( me, 'Blob' );\n            this.uid = source.uid || this.uid;\n    \n            if ( ruid ) {\n                me.connectRuntime( ruid );\n            }\n        }\n    \n        Base.inherits( RuntimeClient, {\n            constructor: Blob,\n    \n            slice: function( start, end ) {\n                return this.exec( 'slice', start, end );\n            },\n    \n            getSource: function() {\n                return this.source;\n            }\n        });\n    \n        return Blob;\n    });\n    /**\n     * 为了统一化Flash的File和HTML5的File而存在。\n     * 以至于要调用Flash里面的File，也可以像调用HTML5版本的File一下。\n     * @fileOverview File\n     */\n    define('lib/file',[\n        'base',\n        'lib/blob'\n    ], function( Base, Blob ) {\n    \n        var uid = 1,\n            rExt = /\\.([^.]+)$/;\n    \n        function File( ruid, file ) {\n            var ext;\n    \n            this.name = file.name || ('untitled' + uid++);\n            ext = rExt.exec( file.name ) ? RegExp.$1.toLowerCase() : '';\n    \n            // todo 支持其他类型文件的转换。\n            // 如果有 mimetype, 但是文件名里面没有找出后缀规律\n            if ( !ext && file.type ) {\n                ext = /\\/(jpg|jpeg|png|gif|bmp)$/i.exec( file.type ) ?\n                        RegExp.$1.toLowerCase() : '';\n                this.name += '.' + ext;\n            }\n    \n            this.ext = ext;\n            this.lastModifiedDate = file.lastModifiedDate ||\n                    (new Date()).toLocaleString();\n    \n            Blob.apply( this, arguments );\n        }\n    \n        return Base.inherits( Blob, File );\n    });\n    \n    /**\n     * @fileOverview 错误信息\n     */\n    define('lib/filepicker',[\n        'base',\n        'runtime/client',\n        'lib/file'\n    ], function( Base, RuntimeClent, File ) {\n    \n        var $ = Base.$;\n    \n        function FilePicker( opts ) {\n            opts = this.options = $.extend({}, FilePicker.options, opts );\n    \n            opts.container = $( opts.id );\n    \n            if ( !opts.container.length ) {\n                throw new Error('按钮指定错误');\n            }\n    \n            opts.innerHTML = opts.innerHTML || opts.label ||\n                    opts.container.html() || '';\n    \n            opts.button = $( opts.button || document.createElement('div') );\n            opts.button.html( opts.innerHTML );\n            opts.container.html( opts.button );\n    \n            RuntimeClent.call( this, 'FilePicker', true );\n        }\n    \n        FilePicker.options = {\n            button: null,\n            container: null,\n            label: null,\n            innerHTML: null,\n            multiple: true,\n            accept: null,\n            name: 'file'\n        };\n    \n        Base.inherits( RuntimeClent, {\n            constructor: FilePicker,\n    \n            init: function() {\n                var me = this,\n                    opts = me.options,\n                    button = opts.button;\n    \n                button.addClass('webuploader-pick');\n    \n                me.on( 'all', function( type ) {\n                    var files;\n    \n                    switch ( type ) {\n                        case 'mouseenter':\n                            button.addClass('webuploader-pick-hover');\n                            break;\n    \n                        case 'mouseleave':\n                            button.removeClass('webuploader-pick-hover');\n                            break;\n    \n                        case 'change':\n                            files = me.exec('getFiles');\n                            me.trigger( 'select', $.map( files, function( file ) {\n                                file = new File( me.getRuid(), file );\n    \n                                // 记录来源。\n                                file._refer = opts.container;\n                                return file;\n                            }), opts.container );\n                            break;\n                    }\n                });\n    \n                me.connectRuntime( opts, function() {\n                    me.refresh();\n                    me.exec( 'init', opts );\n                    me.trigger('ready');\n                });\n    \n                this._resizeHandler = Base.bindFn( this.refresh, this );\n                $( window ).on( 'resize', this._resizeHandler );\n            },\n    \n            refresh: function() {\n                var shimContainer = this.getRuntime().getContainer(),\n                    button = this.options.button,\n                    width = button.outerWidth ?\n                            button.outerWidth() : button.width(),\n    \n                    height = button.outerHeight ?\n                            button.outerHeight() : button.height(),\n    \n                    pos = button.offset();\n    \n                width && height && shimContainer.css({\n                    bottom: 'auto',\n                    right: 'auto',\n                    width: width + 'px',\n                    height: height + 'px'\n                }).offset( pos );\n            },\n    \n            enable: function() {\n                var btn = this.options.button;\n    \n                btn.removeClass('webuploader-pick-disable');\n                this.refresh();\n            },\n    \n            disable: function() {\n                var btn = this.options.button;\n    \n                this.getRuntime().getContainer().css({\n                    top: '-99999px'\n                });\n    \n                btn.addClass('webuploader-pick-disable');\n            },\n    \n            destroy: function() {\n                var btn = this.options.button;\n                $( window ).off( 'resize', this._resizeHandler );\n                btn.removeClass('webuploader-pick-disable webuploader-pick-hover ' +\n                    'webuploader-pick');\n            }\n        });\n    \n        return FilePicker;\n    });\n    \n    /**\n     * @fileOverview 文件选择相关\n     */\n    define('widgets/filepicker',[\n        'base',\n        'uploader',\n        'lib/filepicker',\n        'widgets/widget'\n    ], function( Base, Uploader, FilePicker ) {\n        var $ = Base.$;\n    \n        $.extend( Uploader.options, {\n    \n            /**\n             * @property {Selector | Object} [pick=undefined]\n             * @namespace options\n             * @for Uploader\n             * @description 指定选择文件的按钮容器，不指定则不创建按钮。\n             *\n             * * `id` {Seletor} 指定选择文件的按钮容器，不指定则不创建按钮。\n             * * `label` {String} 请采用 `innerHTML` 代替\n             * * `innerHTML` {String} 指定按钮文字。不指定时优先从指定的容器中看是否自带文字。\n             * * `multiple` {Boolean} 是否开起同时选择多个文件能力。\n             */\n            pick: null,\n    \n            /**\n             * @property {Arroy} [accept=null]\n             * @namespace options\n             * @for Uploader\n             * @description 指定接受哪些类型的文件。 由于目前还有ext转mimeType表，所以这里需要分开指定。\n             *\n             * * `title` {String} 文字描述\n             * * `extensions` {String} 允许的文件后缀，不带点，多个用逗号分割。\n             * * `mimeTypes` {String} 多个用逗号分割。\n             *\n             * 如：\n             *\n             * ```\n             * {\n             *     title: 'Images',\n             *     extensions: 'gif,jpg,jpeg,bmp,png',\n             *     mimeTypes: 'image/*'\n             * }\n             * ```\n             */\n            accept: null/*{\n                title: 'Images',\n                extensions: 'gif,jpg,jpeg,bmp,png',\n                mimeTypes: 'image/*'\n            }*/\n        });\n    \n        return Uploader.register({\n            name: 'picker',\n    \n            init: function( opts ) {\n                this.pickers = [];\n                return opts.pick && this.addBtn( opts.pick );\n            },\n    \n            refresh: function() {\n                $.each( this.pickers, function() {\n                    this.refresh();\n                });\n            },\n    \n            /**\n             * @method addButton\n             * @for Uploader\n             * @grammar addButton( pick ) => Promise\n             * @description\n             * 添加文件选择按钮，如果一个按钮不够，需要调用此方法来添加。参数跟[options.pick](#WebUploader:Uploader:options)一致。\n             * @example\n             * uploader.addButton({\n             *     id: '#btnContainer',\n             *     innerHTML: '选择文件'\n             * });\n             */\n            addBtn: function( pick ) {\n                var me = this,\n                    opts = me.options,\n                    accept = opts.accept,\n                    promises = [];\n    \n                if ( !pick ) {\n                    return;\n                }\n                \n                $.isPlainObject( pick ) || (pick = {\n                    id: pick\n                });\n    \n                $( pick.id ).each(function() {\n                    var options, picker, deferred;\n    \n                    deferred = Base.Deferred();\n    \n                    options = $.extend({}, pick, {\n                        accept: $.isPlainObject( accept ) ? [ accept ] : accept,\n                        swf: opts.swf,\n                        runtimeOrder: opts.runtimeOrder,\n                        id: this\n                    });\n    \n                    picker = new FilePicker( options );\n    \n                    picker.once( 'ready', deferred.resolve );\n                    picker.on( 'select', function( files ) {\n                        me.owner.request( 'add-file', [ files ]);\n                    });\n                    picker.init();\n    \n                    me.pickers.push( picker );\n    \n                    promises.push( deferred.promise() );\n                });\n    \n                return Base.when.apply( Base, promises );\n            },\n    \n            disable: function() {\n                $.each( this.pickers, function() {\n                    this.disable();\n                });\n            },\n    \n            enable: function() {\n                $.each( this.pickers, function() {\n                    this.enable();\n                });\n            },\n    \n            destroy: function() {\n                $.each( this.pickers, function() {\n                    this.destroy();\n                });\n                this.pickers = null;\n            }\n        });\n    });\n    /**\n     * @fileOverview 文件属性封装\n     */\n    define('file',[\n        'base',\n        'mediator'\n    ], function( Base, Mediator ) {\n    \n        var $ = Base.$,\n            idPrefix = 'WU_FILE_',\n            idSuffix = 0,\n            rExt = /\\.([^.]+)$/,\n            statusMap = {};\n    \n        function gid() {\n            return idPrefix + idSuffix++;\n        }\n    \n        /**\n         * 文件类\n         * @class File\n         * @constructor 构造函数\n         * @grammar new File( source ) => File\n         * @param {Lib.File} source [lib.File](#Lib.File)实例, 此source对象是带有Runtime信息的。\n         */\n        function WUFile( source ) {\n    \n            /**\n             * 文件名，包括扩展名（后缀）\n             * @property name\n             * @type {string}\n             */\n            this.name = source.name || 'Untitled';\n    \n            /**\n             * 文件体积（字节）\n             * @property size\n             * @type {uint}\n             * @default 0\n             */\n            this.size = source.size || 0;\n    \n            /**\n             * 文件MIMETYPE类型，与文件类型的对应关系请参考[http://t.cn/z8ZnFny](http://t.cn/z8ZnFny)\n             * @property type\n             * @type {string}\n             * @default 'application/octet-stream'\n             */\n            this.type = source.type || 'application/octet-stream';\n    \n            /**\n             * 文件最后修改日期\n             * @property lastModifiedDate\n             * @type {int}\n             * @default 当前时间戳\n             */\n            this.lastModifiedDate = source.lastModifiedDate || (new Date() * 1);\n    \n            /**\n             * 文件ID，每个对象具有唯一ID，与文件名无关\n             * @property id\n             * @type {string}\n             */\n            this.id = gid();\n    \n            /**\n             * 文件扩展名，通过文件名获取，例如test.png的扩展名为png\n             * @property ext\n             * @type {string}\n             */\n            this.ext = rExt.exec( this.name ) ? RegExp.$1 : '';\n    \n    \n            /**\n             * 状态文字说明。在不同的status语境下有不同的用途。\n             * @property statusText\n             * @type {string}\n             */\n            this.statusText = '';\n    \n            // 存储文件状态，防止通过属性直接修改\n            statusMap[ this.id ] = WUFile.Status.INITED;\n    \n            this.source = source;\n            this.loaded = 0;\n    \n            this.on( 'error', function( msg ) {\n                this.setStatus( WUFile.Status.ERROR, msg );\n            });\n        }\n    \n        $.extend( WUFile.prototype, {\n    \n            /**\n             * 设置状态，状态变化时会触发`change`事件。\n             * @method setStatus\n             * @grammar setStatus( status[, statusText] );\n             * @param {File.Status|String} status [文件状态值](#WebUploader:File:File.Status)\n             * @param {String} [statusText=''] 状态说明，常在error时使用，用http, abort,server等来标记是由于什么原因导致文件错误。\n             */\n            setStatus: function( status, text ) {\n    \n                var prevStatus = statusMap[ this.id ];\n    \n                typeof text !== 'undefined' && (this.statusText = text);\n    \n                if ( status !== prevStatus ) {\n                    statusMap[ this.id ] = status;\n                    /**\n                     * 文件状态变化\n                     * @event statuschange\n                     */\n                    this.trigger( 'statuschange', status, prevStatus );\n                }\n    \n            },\n    \n            /**\n             * 获取文件状态\n             * @return {File.Status}\n             * @example\n                     文件状态具体包括以下几种类型：\n                     {\n                         // 初始化\n                        INITED:     0,\n                        // 已入队列\n                        QUEUED:     1,\n                        // 正在上传\n                        PROGRESS:     2,\n                        // 上传出错\n                        ERROR:         3,\n                        // 上传成功\n                        COMPLETE:     4,\n                        // 上传取消\n                        CANCELLED:     5\n                    }\n             */\n            getStatus: function() {\n                return statusMap[ this.id ];\n            },\n    \n            /**\n             * 获取文件原始信息。\n             * @return {*}\n             */\n            getSource: function() {\n                return this.source;\n            },\n    \n            destroy: function() {\n                this.off();\n                delete statusMap[ this.id ];\n            }\n        });\n    \n        Mediator.installTo( WUFile.prototype );\n    \n        /**\n         * 文件状态值，具体包括以下几种类型：\n         * * `inited` 初始状态\n         * * `queued` 已经进入队列, 等待上传\n         * * `progress` 上传中\n         * * `complete` 上传完成。\n         * * `error` 上传出错，可重试\n         * * `interrupt` 上传中断，可续传。\n         * * `invalid` 文件不合格，不能重试上传。会自动从队列中移除。\n         * * `cancelled` 文件被移除。\n         * @property {Object} Status\n         * @namespace File\n         * @class File\n         * @static\n         */\n        WUFile.Status = {\n            INITED:     'inited',    // 初始状态\n            QUEUED:     'queued',    // 已经进入队列, 等待上传\n            PROGRESS:   'progress',    // 上传中\n            ERROR:      'error',    // 上传出错，可重试\n            COMPLETE:   'complete',    // 上传完成。\n            CANCELLED:  'cancelled',    // 上传取消。\n            INTERRUPT:  'interrupt',    // 上传中断，可续传。\n            INVALID:    'invalid'    // 文件不合格，不能重试上传。\n        };\n    \n        return WUFile;\n    });\n    \n    /**\n     * @fileOverview 文件队列\n     */\n    define('queue',[\n        'base',\n        'mediator',\n        'file'\n    ], function( Base, Mediator, WUFile ) {\n    \n        var $ = Base.$,\n            STATUS = WUFile.Status;\n    \n        /**\n         * 文件队列, 用来存储各个状态中的文件。\n         * @class Queue\n         * @extends Mediator\n         */\n        function Queue() {\n    \n            /**\n             * 统计文件数。\n             * * `numOfQueue` 队列中的文件数。\n             * * `numOfSuccess` 上传成功的文件数\n             * * `numOfCancel` 被取消的文件数\n             * * `numOfProgress` 正在上传中的文件数\n             * * `numOfUploadFailed` 上传错误的文件数。\n             * * `numOfInvalid` 无效的文件数。\n             * * `numofDeleted` 被移除的文件数。\n             * @property {Object} stats\n             */\n            this.stats = {\n                numOfQueue: 0,\n                numOfSuccess: 0,\n                numOfCancel: 0,\n                numOfProgress: 0,\n                numOfUploadFailed: 0,\n                numOfInvalid: 0,\n                numofDeleted: 0,\n                numofInterrupt: 0,\n            };\n    \n            // 上传队列，仅包括等待上传的文件\n            this._queue = [];\n    \n            // 存储所有文件\n            this._map = {};\n        }\n    \n        $.extend( Queue.prototype, {\n    \n            /**\n             * 将新文件加入对队列尾部\n             *\n             * @method append\n             * @param  {File} file   文件对象\n             */\n            append: function( file ) {\n                this._queue.push( file );\n                this._fileAdded( file );\n                return this;\n            },\n    \n            /**\n             * 将新文件加入对队列头部\n             *\n             * @method prepend\n             * @param  {File} file   文件对象\n             */\n            prepend: function( file ) {\n                this._queue.unshift( file );\n                this._fileAdded( file );\n                return this;\n            },\n    \n            /**\n             * 获取文件对象\n             *\n             * @method getFile\n             * @param  {String} fileId   文件ID\n             * @return {File}\n             */\n            getFile: function( fileId ) {\n                if ( typeof fileId !== 'string' ) {\n                    return fileId;\n                }\n                return this._map[ fileId ];\n            },\n    \n            /**\n             * 从队列中取出一个指定状态的文件。\n             * @grammar fetch( status ) => File\n             * @method fetch\n             * @param {String} status [文件状态值](#WebUploader:File:File.Status)\n             * @return {File} [File](#WebUploader:File)\n             */\n            fetch: function( status ) {\n                var len = this._queue.length,\n                    i, file;\n    \n                status = status || STATUS.QUEUED;\n    \n                for ( i = 0; i < len; i++ ) {\n                    file = this._queue[ i ];\n    \n                    if ( status === file.getStatus() ) {\n                        return file;\n                    }\n                }\n    \n                return null;\n            },\n    \n            /**\n             * 对队列进行排序，能够控制文件上传顺序。\n             * @grammar sort( fn ) => undefined\n             * @method sort\n             * @param {Function} fn 排序方法\n             */\n            sort: function( fn ) {\n                if ( typeof fn === 'function' ) {\n                    this._queue.sort( fn );\n                }\n            },\n    \n            /**\n             * 获取指定类型的文件列表, 列表中每一个成员为[File](#WebUploader:File)对象。\n             * @grammar getFiles( [status1[, status2 ...]] ) => Array\n             * @method getFiles\n             * @param {String} [status] [文件状态值](#WebUploader:File:File.Status)\n             */\n            getFiles: function() {\n                var sts = [].slice.call( arguments, 0 ),\n                    ret = [],\n                    i = 0,\n                    len = this._queue.length,\n                    file;\n    \n                for ( ; i < len; i++ ) {\n                    file = this._queue[ i ];\n    \n                    if ( sts.length && !~$.inArray( file.getStatus(), sts ) ) {\n                        continue;\n                    }\n    \n                    ret.push( file );\n                }\n    \n                return ret;\n            },\n    \n            /**\n             * 在队列中删除文件。\n             * @grammar removeFile( file ) => Array\n             * @method removeFile\n             * @param {File} 文件对象。\n             */\n            removeFile: function( file ) {\n                var me = this,\n                    existing = this._map[ file.id ];\n    \n                if ( existing ) {\n                    delete this._map[ file.id ];\n                    file.destroy();\n                    this.stats.numofDeleted++;\n                }\n            },\n    \n            _fileAdded: function( file ) {\n                var me = this,\n                    existing = this._map[ file.id ];\n    \n                if ( !existing ) {\n                    this._map[ file.id ] = file;\n    \n                    file.on( 'statuschange', function( cur, pre ) {\n                        me._onFileStatusChange( cur, pre );\n                    });\n                }\n            },\n    \n            _onFileStatusChange: function( curStatus, preStatus ) {\n                var stats = this.stats;\n    \n                switch ( preStatus ) {\n                    case STATUS.PROGRESS:\n                        stats.numOfProgress--;\n                        break;\n    \n                    case STATUS.QUEUED:\n                        stats.numOfQueue --;\n                        break;\n    \n                    case STATUS.ERROR:\n                        stats.numOfUploadFailed--;\n                        break;\n    \n                    case STATUS.INVALID:\n                        stats.numOfInvalid--;\n                        break;\n    \n                    case STATUS.INTERRUPT:\n                        stats.numofInterrupt--;\n                        break;\n                }\n    \n                switch ( curStatus ) {\n                    case STATUS.QUEUED:\n                        stats.numOfQueue++;\n                        break;\n    \n                    case STATUS.PROGRESS:\n                        stats.numOfProgress++;\n                        break;\n    \n                    case STATUS.ERROR:\n                        stats.numOfUploadFailed++;\n                        break;\n    \n                    case STATUS.COMPLETE:\n                        stats.numOfSuccess++;\n                        break;\n    \n                    case STATUS.CANCELLED:\n                        stats.numOfCancel++;\n                        break;\n    \n    \n                    case STATUS.INVALID:\n                        stats.numOfInvalid++;\n                        break;\n    \n                    case STATUS.INTERRUPT:\n                        stats.numofInterrupt++;\n                        break;\n                }\n            }\n    \n        });\n    \n        Mediator.installTo( Queue.prototype );\n    \n        return Queue;\n    });\n    /**\n     * @fileOverview 队列\n     */\n    define('widgets/queue',[\n        'base',\n        'uploader',\n        'queue',\n        'file',\n        'lib/file',\n        'runtime/client',\n        'widgets/widget'\n    ], function( Base, Uploader, Queue, WUFile, File, RuntimeClient ) {\n    \n        var $ = Base.$,\n            rExt = /\\.\\w+$/,\n            Status = WUFile.Status;\n    \n        return Uploader.register({\n            name: 'queue',\n    \n            init: function( opts ) {\n                var me = this,\n                    deferred, len, i, item, arr, accept, runtime;\n    \n                if ( $.isPlainObject( opts.accept ) ) {\n                    opts.accept = [ opts.accept ];\n                }\n    \n                // accept中的中生成匹配正则。\n                if ( opts.accept ) {\n                    arr = [];\n    \n                    for ( i = 0, len = opts.accept.length; i < len; i++ ) {\n                        item = opts.accept[ i ].extensions;\n                        item && arr.push( item );\n                    }\n    \n                    if ( arr.length ) {\n                        accept = '\\\\.' + arr.join(',')\n                                .replace( /,/g, '$|\\\\.' )\n                                .replace( /\\*/g, '.*' ) + '$';\n                    }\n    \n                    me.accept = new RegExp( accept, 'i' );\n                }\n    \n                me.queue = new Queue();\n                me.stats = me.queue.stats;\n    \n                // 如果当前不是html5运行时，那就算了。\n                // 不执行后续操作\n                if ( this.request('predict-runtime-type') !== 'html5' ) {\n                    return;\n                }\n    \n                // 创建一个 html5 运行时的 placeholder\n                // 以至于外部添加原生 File 对象的时候能正确包裹一下供 webuploader 使用。\n                deferred = Base.Deferred();\n                this.placeholder = runtime = new RuntimeClient('Placeholder');\n                runtime.connectRuntime({\n                    runtimeOrder: 'html5'\n                }, function() {\n                    me._ruid = runtime.getRuid();\n                    deferred.resolve();\n                });\n                return deferred.promise();\n            },\n    \n    \n            // 为了支持外部直接添加一个原生File对象。\n            _wrapFile: function( file ) {\n                if ( !(file instanceof WUFile) ) {\n    \n                    if ( !(file instanceof File) ) {\n                        if ( !this._ruid ) {\n                            throw new Error('Can\\'t add external files.');\n                        }\n                        file = new File( this._ruid, file );\n                    }\n    \n                    file = new WUFile( file );\n                }\n    \n                return file;\n            },\n    \n            // 判断文件是否可以被加入队列\n            acceptFile: function( file ) {\n                var invalid = !file || !file.size || this.accept &&\n    \n                        // 如果名字中有后缀，才做后缀白名单处理。\n                        rExt.exec( file.name ) && !this.accept.test( file.name );\n    \n                return !invalid;\n            },\n    \n    \n            /**\n             * @event beforeFileQueued\n             * @param {File} file File对象\n             * @description 当文件被加入队列之前触发，此事件的handler返回值为`false`，则此文件不会被添加进入队列。\n             * @for  Uploader\n             */\n    \n            /**\n             * @event fileQueued\n             * @param {File} file File对象\n             * @description 当文件被加入队列以后触发。\n             * @for  Uploader\n             */\n    \n            _addFile: function( file ) {\n                var me = this;\n    \n                file = me._wrapFile( file );\n    \n                // 不过类型判断允许不允许，先派送 `beforeFileQueued`\n                if ( !me.owner.trigger( 'beforeFileQueued', file ) ) {\n                    return;\n                }\n    \n                // 类型不匹配，则派送错误事件，并返回。\n                if ( !me.acceptFile( file ) ) {\n                    me.owner.trigger( 'error', 'Q_TYPE_DENIED', file );\n                    return;\n                }\n    \n                me.queue.append( file );\n                me.owner.trigger( 'fileQueued', file );\n                return file;\n            },\n    \n            getFile: function( fileId ) {\n                return this.queue.getFile( fileId );\n            },\n    \n            /**\n             * @event filesQueued\n             * @param {File} files 数组，内容为原始File(lib/File）对象。\n             * @description 当一批文件添加进队列以后触发。\n             * @for  Uploader\n             */\n            \n            /**\n             * @property {Boolean} [auto=false]\n             * @namespace options\n             * @for Uploader\n             * @description 设置为 true 后，不需要手动调用上传，有文件选择即开始上传。\n             * \n             */\n    \n            /**\n             * @method addFiles\n             * @grammar addFiles( file ) => undefined\n             * @grammar addFiles( [file1, file2 ...] ) => undefined\n             * @param {Array of File or File} [files] Files 对象 数组\n             * @description 添加文件到队列\n             * @for  Uploader\n             */\n            addFile: function( files ) {\n                var me = this;\n    \n                if ( !files.length ) {\n                    files = [ files ];\n                }\n    \n                files = $.map( files, function( file ) {\n                    return me._addFile( file );\n                });\n    \n                me.owner.trigger( 'filesQueued', files );\n    \n                if ( me.options.auto ) {\n                    setTimeout(function() {\n                        me.request('start-upload');\n                    }, 20 );\n                }\n            },\n    \n            getStats: function() {\n                return this.stats;\n            },\n    \n            /**\n             * @event fileDequeued\n             * @param {File} file File对象\n             * @description 当文件被移除队列后触发。\n             * @for  Uploader\n             */\n    \n             /**\n             * @method removeFile\n             * @grammar removeFile( file ) => undefined\n             * @grammar removeFile( id ) => undefined\n             * @grammar removeFile( file, true ) => undefined\n             * @grammar removeFile( id, true ) => undefined\n             * @param {File|id} file File对象或这File对象的id\n             * @description 移除某一文件, 默认只会标记文件状态为已取消，如果第二个参数为 `true` 则会从 queue 中移除。\n             * @for  Uploader\n             * @example\n             *\n             * $li.on('click', '.remove-this', function() {\n             *     uploader.removeFile( file );\n             * })\n             */\n            removeFile: function( file, remove ) {\n                var me = this;\n    \n                file = file.id ? file : me.queue.getFile( file );\n    \n                this.request( 'cancel-file', file );\n    \n                if ( remove ) {\n                    this.queue.removeFile( file );\n                }\n            },\n    \n            /**\n             * @method getFiles\n             * @grammar getFiles() => Array\n             * @grammar getFiles( status1, status2, status... ) => Array\n             * @description 返回指定状态的文件集合，不传参数将返回所有状态的文件。\n             * @for  Uploader\n             * @example\n             * console.log( uploader.getFiles() );    // => all files\n             * console.log( uploader.getFiles('error') )    // => all error files.\n             */\n            getFiles: function() {\n                return this.queue.getFiles.apply( this.queue, arguments );\n            },\n    \n            fetchFile: function() {\n                return this.queue.fetch.apply( this.queue, arguments );\n            },\n    \n            /**\n             * @method retry\n             * @grammar retry() => undefined\n             * @grammar retry( file ) => undefined\n             * @description 重试上传，重试指定文件，或者从出错的文件开始重新上传。\n             * @for  Uploader\n             * @example\n             * function retry() {\n             *     uploader.retry();\n             * }\n             */\n            retry: function( file, noForceStart ) {\n                var me = this,\n                    files, i, len;\n    \n                if ( file ) {\n                    file = file.id ? file : me.queue.getFile( file );\n                    file.setStatus( Status.QUEUED );\n                    noForceStart || me.request('start-upload');\n                    return;\n                }\n    \n                files = me.queue.getFiles( Status.ERROR );\n                i = 0;\n                len = files.length;\n    \n                for ( ; i < len; i++ ) {\n                    file = files[ i ];\n                    file.setStatus( Status.QUEUED );\n                }\n    \n                me.request('start-upload');\n            },\n    \n            /**\n             * @method sort\n             * @grammar sort( fn ) => undefined\n             * @description 排序队列中的文件，在上传之前调整可以控制上传顺序。\n             * @for  Uploader\n             */\n            sortFiles: function() {\n                return this.queue.sort.apply( this.queue, arguments );\n            },\n    \n            /**\n             * @event reset\n             * @description 当 uploader 被重置的时候触发。\n             * @for  Uploader\n             */\n    \n            /**\n             * @method reset\n             * @grammar reset() => undefined\n             * @description 重置uploader。目前只重置了队列。\n             * @for  Uploader\n             * @example\n             * uploader.reset();\n             */\n            reset: function() {\n                this.owner.trigger('reset');\n                this.queue = new Queue();\n                this.stats = this.queue.stats;\n            },\n    \n            destroy: function() {\n                this.reset();\n                this.placeholder && this.placeholder.destroy();\n            }\n        });\n    \n    });\n    /**\n     * @fileOverview 添加获取Runtime相关信息的方法。\n     */\n    define('widgets/runtime',[\n        'uploader',\n        'runtime/runtime',\n        'widgets/widget'\n    ], function( Uploader, Runtime ) {\n    \n        Uploader.support = function() {\n            return Runtime.hasRuntime.apply( Runtime, arguments );\n        };\n    \n        return Uploader.register({\n            name: 'runtime',\n    \n            init: function() {\n                if ( !this.predictRuntimeType() ) {\n                    throw Error('Runtime Error');\n                }\n            },\n    \n            /**\n             * 预测Uploader将采用哪个`Runtime`\n             * @grammar predictRuntimeType() => String\n             * @method predictRuntimeType\n             * @for  Uploader\n             */\n            predictRuntimeType: function() {\n                var orders = this.options.runtimeOrder || Runtime.orders,\n                    type = this.type,\n                    i, len;\n    \n                if ( !type ) {\n                    orders = orders.split( /\\s*,\\s*/g );\n    \n                    for ( i = 0, len = orders.length; i < len; i++ ) {\n                        if ( Runtime.hasRuntime( orders[ i ] ) ) {\n                            this.type = type = orders[ i ];\n                            break;\n                        }\n                    }\n                }\n    \n                return type;\n            }\n        });\n    });\n    /**\n     * @fileOverview Transport\n     */\n    define('lib/transport',[\n        'base',\n        'runtime/client',\n        'mediator'\n    ], function( Base, RuntimeClient, Mediator ) {\n    \n        var $ = Base.$;\n    \n        function Transport( opts ) {\n            var me = this;\n    \n            opts = me.options = $.extend( true, {}, Transport.options, opts || {} );\n            RuntimeClient.call( this, 'Transport' );\n    \n            this._blob = null;\n            this._formData = opts.formData || {};\n            this._headers = opts.headers || {};\n    \n            this.on( 'progress', this._timeout );\n            this.on( 'load error', function() {\n                me.trigger( 'progress', 1 );\n                clearTimeout( me._timer );\n            });\n        }\n    \n        Transport.options = {\n            server: '',\n            method: 'POST',\n    \n            // 跨域时，是否允许携带cookie, 只有html5 runtime才有效\n            withCredentials: false,\n            fileVal: 'file',\n            timeout: 2 * 60 * 1000,    // 2分钟\n            formData: {},\n            headers: {},\n            sendAsBinary: false\n        };\n    \n        $.extend( Transport.prototype, {\n    \n            // 添加Blob, 只能添加一次，最后一次有效。\n            appendBlob: function( key, blob, filename ) {\n                var me = this,\n                    opts = me.options;\n    \n                if ( me.getRuid() ) {\n                    me.disconnectRuntime();\n                }\n    \n                // 连接到blob归属的同一个runtime.\n                me.connectRuntime( blob.ruid, function() {\n                    me.exec('init');\n                });\n    \n                me._blob = blob;\n                opts.fileVal = key || opts.fileVal;\n                opts.filename = filename || opts.filename;\n            },\n    \n            // 添加其他字段\n            append: function( key, value ) {\n                if ( typeof key === 'object' ) {\n                    $.extend( this._formData, key );\n                } else {\n                    this._formData[ key ] = value;\n                }\n            },\n    \n            setRequestHeader: function( key, value ) {\n                if ( typeof key === 'object' ) {\n                    $.extend( this._headers, key );\n                } else {\n                    this._headers[ key ] = value;\n                }\n            },\n    \n            send: function( method ) {\n                this.exec( 'send', method );\n                this._timeout();\n            },\n    \n            abort: function() {\n                clearTimeout( this._timer );\n                return this.exec('abort');\n            },\n    \n            destroy: function() {\n                this.trigger('destroy');\n                this.off();\n                this.exec('destroy');\n                this.disconnectRuntime();\n            },\n    \n            getResponse: function() {\n                return this.exec('getResponse');\n            },\n    \n            getResponseAsJson: function() {\n                return this.exec('getResponseAsJson');\n            },\n    \n            getStatus: function() {\n                return this.exec('getStatus');\n            },\n    \n            _timeout: function() {\n                var me = this,\n                    duration = me.options.timeout;\n    \n                if ( !duration ) {\n                    return;\n                }\n    \n                clearTimeout( me._timer );\n                me._timer = setTimeout(function() {\n                    me.abort();\n                    me.trigger( 'error', 'timeout' );\n                }, duration );\n            }\n    \n        });\n    \n        // 让Transport具备事件功能。\n        Mediator.installTo( Transport.prototype );\n    \n        return Transport;\n    });\n    /**\n     * @fileOverview 负责文件上传相关。\n     */\n    define('widgets/upload',[\n        'base',\n        'uploader',\n        'file',\n        'lib/transport',\n        'widgets/widget'\n    ], function( Base, Uploader, WUFile, Transport ) {\n    \n        var $ = Base.$,\n            isPromise = Base.isPromise,\n            Status = WUFile.Status;\n    \n        // 添加默认配置项\n        $.extend( Uploader.options, {\n    \n    \n            /**\n             * @property {Boolean} [prepareNextFile=false]\n             * @namespace options\n             * @for Uploader\n             * @description 是否允许在文件传输时提前把下一个文件准备好。\n             * 对于一个文件的准备工作比较耗时，比如图片压缩，md5序列化。\n             * 如果能提前在当前文件传输期处理，可以节省总体耗时。\n             */\n            prepareNextFile: false,\n    \n            /**\n             * @property {Boolean} [chunked=false]\n             * @namespace options\n             * @for Uploader\n             * @description 是否要分片处理大文件上传。\n             */\n            chunked: false,\n    \n            /**\n             * @property {Boolean} [chunkSize=5242880]\n             * @namespace options\n             * @for Uploader\n             * @description 如果要分片，分多大一片？ 默认大小为5M.\n             */\n            chunkSize: 5 * 1024 * 1024,\n    \n            /**\n             * @property {Boolean} [chunkRetry=2]\n             * @namespace options\n             * @for Uploader\n             * @description 如果某个分片由于网络问题出错，允许自动重传多少次？\n             */\n            chunkRetry: 2,\n    \n            /**\n             * @property {Boolean} [threads=3]\n             * @namespace options\n             * @for Uploader\n             * @description 上传并发数。允许同时最大上传进程数。\n             */\n            threads: 3,\n    \n    \n            /**\n             * @property {Object} [formData={}]\n             * @namespace options\n             * @for Uploader\n             * @description 文件上传请求的参数表，每次发送都会发送此对象中的参数。\n             */\n            formData: {}\n    \n            /**\n             * @property {Object} [fileVal='file']\n             * @namespace options\n             * @for Uploader\n             * @description 设置文件上传域的name。\n             */\n    \n            /**\n             * @property {Object} [method='POST']\n             * @namespace options\n             * @for Uploader\n             * @description 文件上传方式，`POST`或者`GET`。\n             */\n    \n            /**\n             * @property {Object} [sendAsBinary=false]\n             * @namespace options\n             * @for Uploader\n             * @description 是否已二进制的流的方式发送文件，这样整个上传内容`php://input`都为文件内容，\n             * 其他参数在$_GET数组中。\n             */\n        });\n    \n        // 负责将文件切片。\n        function CuteFile( file, chunkSize ) {\n            var pending = [],\n                blob = file.source,\n                total = blob.size,\n                chunks = chunkSize ? Math.ceil( total / chunkSize ) : 1,\n                start = 0,\n                index = 0,\n                len, api;\n    \n            api = {\n                file: file,\n    \n                has: function() {\n                    return !!pending.length;\n                },\n    \n                shift: function() {\n                    return pending.shift();\n                },\n    \n                unshift: function( block ) {\n                    pending.unshift( block );\n                }\n            };\n    \n            while ( index < chunks ) {\n                len = Math.min( chunkSize, total - start );\n    \n                pending.push({\n                    file: file,\n                    start: start,\n                    end: chunkSize ? (start + len) : total,\n                    total: total,\n                    chunks: chunks,\n                    chunk: index++,\n                    cuted: api\n                });\n                start += len;\n            }\n    \n            file.blocks = pending.concat();\n            file.remaning = pending.length;\n    \n            return api;\n        }\n    \n        Uploader.register({\n            name: 'upload',\n    \n            init: function() {\n                var owner = this.owner,\n                    me = this;\n    \n                this.runing = false;\n                this.progress = false;\n    \n                owner\n                    .on( 'startUpload', function() {\n                        me.progress = true;\n                    })\n                    .on( 'uploadFinished', function() {\n                        me.progress = false;\n                    });\n    \n                // 记录当前正在传的数据，跟threads相关\n                this.pool = [];\n    \n                // 缓存分好片的文件。\n                this.stack = [];\n    \n                // 缓存即将上传的文件。\n                this.pending = [];\n    \n                // 跟踪还有多少分片在上传中但是没有完成上传。\n                this.remaning = 0;\n                this.__tick = Base.bindFn( this._tick, this );\n    \n                owner.on( 'uploadComplete', function( file ) {\n                    \n                    // 把其他块取消了。\n                    file.blocks && $.each( file.blocks, function( _, v ) {\n                        v.transport && (v.transport.abort(), v.transport.destroy());\n                        delete v.transport;\n                    });\n    \n                    delete file.blocks;\n                    delete file.remaning;\n                });\n            },\n    \n            reset: function() {\n                this.request( 'stop-upload', true );\n                this.runing = false;\n                this.pool = [];\n                this.stack = [];\n                this.pending = [];\n                this.remaning = 0;\n                this._trigged = false;\n                this._promise = null;\n            },\n    \n            /**\n             * @event startUpload\n             * @description 当开始上传流程时触发。\n             * @for  Uploader\n             */\n    \n            /**\n             * 开始上传。此方法可以从初始状态调用开始上传流程，也可以从暂停状态调用，继续上传流程。\n             *\n             * 可以指定开始某一个文件。\n             * @grammar upload() => undefined\n             * @grammar upload( file | fileId) => undefined\n             * @method upload\n             * @for  Uploader\n             */\n            startUpload: function(file) {\n                var me = this;\n    \n                // 移出invalid的文件\n                $.each( me.request( 'get-files', Status.INVALID ), function() {\n                    me.request( 'remove-file', this );\n                });\n    \n                // 如果指定了开始某个文件，则只开始指定文件。\n                if ( file ) {\n                    file = file.id ? file : me.request( 'get-file', file );\n    \n                    if (file.getStatus() === Status.INTERRUPT) {\n                        $.each( me.pool, function( _, v ) {\n                        \n                            // 之前暂停过。\n                            if (v.file !== file) {\n                                return;\n                            }\n    \n                            v.transport && v.transport.send();\n                        });\n                        \n                        file.setStatus( Status.QUEUED );\n                    } else if (file.getStatus() === Status.PROGRESS) {\n                        return;\n                    } else {\n                        file.setStatus( Status.QUEUED );\n                    }\n                } else {\n                    $.each( me.request( 'get-files', [ Status.INITED ] ), function() {\n                        this.setStatus( Status.QUEUED );\n                    });\n                }\n    \n                if ( me.runing ) {\n                    return;\n                }\n    \n                me.runing = true;\n    \n                // 如果有暂停的，则续传\n                $.each( me.pool, function( _, v ) {\n                    var file = v.file;\n    \n                    if ( file.getStatus() === Status.INTERRUPT ) {\n                        file.setStatus( Status.PROGRESS );\n                        me._trigged = false;\n                        v.transport && v.transport.send();\n                    }\n                });\n    \n                file || $.each( me.request( 'get-files',\n                        Status.INTERRUPT ), function() {\n                    this.setStatus( Status.PROGRESS );\n                });\n    \n                me._trigged = false;\n                Base.nextTick( me.__tick );\n                me.owner.trigger('startUpload');\n            },\n    \n            /**\n             * @event stopUpload\n             * @description 当开始上传流程暂停时触发。\n             * @for  Uploader\n             */\n    \n            /**\n             * 暂停上传。第一个参数为是否中断上传当前正在上传的文件。\n             *\n             * 如果第一个参数是文件，则只暂停指定文件。\n             * @grammar stop() => undefined\n             * @grammar stop( true ) => undefined\n             * @grammar stop( file ) => undefined\n             * @method stop\n             * @for  Uploader\n             */\n            stopUpload: function( file, interrupt ) {\n                var me = this;\n    \n                if (file === true) {\n                    interrupt = file;\n                    file = null;\n                }\n    \n                if ( me.runing === false ) {\n                    return;\n                }\n    \n                // 如果只是暂停某个文件。\n                if ( file ) {\n                    file = file.id ? file : me.request( 'get-file', file );\n    \n                    if ( file.getStatus() !== Status.PROGRESS &&\n                            file.getStatus() !== Status.QUEUED ) {\n                        return;\n                    }\n    \n                    file.setStatus( Status.INTERRUPT );\n                    $.each( me.pool, function( _, v ) {\n                        \n                        // 只 abort 指定的文件。\n                        if (v.file !== file) {\n                            return;\n                        }\n    \n                        v.transport && v.transport.abort();\n                        me._putback(v);\n                        me._popBlock(v);\n                    });\n    \n                    return Base.nextTick( me.__tick );\n                }\n    \n                me.runing = false;\n    \n                if (this._promise && this._promise.file) {\n                    this._promise.file.setStatus( Status.INTERRUPT );\n                }\n    \n                interrupt && $.each( me.pool, function( _, v ) {\n                    v.transport && v.transport.abort();\n                    v.file.setStatus( Status.INTERRUPT );\n                });\n    \n                me.owner.trigger('stopUpload');\n            },\n    \n            /**\n             * @method cancelFile\n             * @grammar cancelFile( file ) => undefined\n             * @grammar cancelFile( id ) => undefined\n             * @param {File|id} file File对象或这File对象的id\n             * @description 标记文件状态为已取消, 同时将中断文件传输。\n             * @for  Uploader\n             * @example\n             *\n             * $li.on('click', '.remove-this', function() {\n             *     uploader.cancelFile( file );\n             * })\n             */\n            cancelFile: function( file ) {\n                file = file.id ? file : this.request( 'get-file', file );\n    \n                // 如果正在上传。\n                file.blocks && $.each( file.blocks, function( _, v ) {\n                    var _tr = v.transport;\n    \n                    if ( _tr ) {\n                        _tr.abort();\n                        _tr.destroy();\n                        delete v.transport;\n                    }\n                });\n    \n                file.setStatus( Status.CANCELLED );\n                this.owner.trigger( 'fileDequeued', file );\n            },\n    \n            /**\n             * 判断`Uplaode`r是否正在上传中。\n             * @grammar isInProgress() => Boolean\n             * @method isInProgress\n             * @for  Uploader\n             */\n            isInProgress: function() {\n                return !!this.progress;\n            },\n    \n            _getStats: function() {\n                return this.request('get-stats');\n            },\n    \n            /**\n             * 掉过一个文件上传，直接标记指定文件为已上传状态。\n             * @grammar skipFile( file ) => undefined\n             * @method skipFile\n             * @for  Uploader\n             */\n            skipFile: function( file, status ) {\n                file = file.id ? file : this.request( 'get-file', file );\n    \n                file.setStatus( status || Status.COMPLETE );\n                file.skipped = true;\n    \n                // 如果正在上传。\n                file.blocks && $.each( file.blocks, function( _, v ) {\n                    var _tr = v.transport;\n    \n                    if ( _tr ) {\n                        _tr.abort();\n                        _tr.destroy();\n                        delete v.transport;\n                    }\n                });\n    \n                this.owner.trigger( 'uploadSkip', file );\n            },\n    \n            /**\n             * @event uploadFinished\n             * @description 当所有文件上传结束时触发。\n             * @for  Uploader\n             */\n            _tick: function() {\n                var me = this,\n                    opts = me.options,\n                    fn, val;\n    \n                // 上一个promise还没有结束，则等待完成后再执行。\n                if ( me._promise ) {\n                    return me._promise.always( me.__tick );\n                }\n    \n                // 还有位置，且还有文件要处理的话。\n                if ( me.pool.length < opts.threads && (val = me._nextBlock()) ) {\n                    me._trigged = false;\n    \n                    fn = function( val ) {\n                        me._promise = null;\n    \n                        // 有可能是reject过来的，所以要检测val的类型。\n                        val && val.file && me._startSend( val );\n                        Base.nextTick( me.__tick );\n                    };\n    \n                    me._promise = isPromise( val ) ? val.always( fn ) : fn( val );\n    \n                // 没有要上传的了，且没有正在传输的了。\n                } else if ( !me.remaning && !me._getStats().numOfQueue &&\n                    !me._getStats().numofInterrupt ) {\n                    me.runing = false;\n    \n                    me._trigged || Base.nextTick(function() {\n                        me.owner.trigger('uploadFinished');\n                    });\n                    me._trigged = true;\n                }\n            },\n    \n            _putback: function(block) {\n                var idx;\n    \n                block.cuted.unshift(block);\n                idx = this.stack.indexOf(block.cuted);\n    \n                if (!~idx) {\n                    this.stack.unshift(block.cuted);\n                }\n            },\n    \n            _getStack: function() {\n                var i = 0,\n                    act;\n    \n                while ( (act = this.stack[ i++ ]) ) {\n                    if ( act.has() && act.file.getStatus() === Status.PROGRESS ) {\n                        return act;\n                    } else if (!act.has() ||\n                            act.file.getStatus() !== Status.PROGRESS &&\n                            act.file.getStatus() !== Status.INTERRUPT ) {\n    \n                        // 把已经处理完了的，或者，状态为非 progress（上传中）、\n                        // interupt（暂停中） 的移除。\n                        this.stack.splice( --i, 1 );\n                    }\n                }\n    \n                return null;\n            },\n    \n            _nextBlock: function() {\n                var me = this,\n                    opts = me.options,\n                    act, next, done, preparing;\n    \n                // 如果当前文件还有没有需要传输的，则直接返回剩下的。\n                if ( (act = this._getStack()) ) {\n    \n                    // 是否提前准备下一个文件\n                    if ( opts.prepareNextFile && !me.pending.length ) {\n                        me._prepareNextFile();\n                    }\n    \n                    return act.shift();\n    \n                // 否则，如果正在运行，则准备下一个文件，并等待完成后返回下个分片。\n                } else if ( me.runing ) {\n    \n                    // 如果缓存中有，则直接在缓存中取，没有则去queue中取。\n                    if ( !me.pending.length && me._getStats().numOfQueue ) {\n                        me._prepareNextFile();\n                    }\n    \n                    next = me.pending.shift();\n                    done = function( file ) {\n                        if ( !file ) {\n                            return null;\n                        }\n                            \n                        act = CuteFile( file, opts.chunked ? opts.chunkSize : 0 );\n                        me.stack.push(act);\n                        return act.shift();\n                    };\n    \n                    // 文件可能还在prepare中，也有可能已经完全准备好了。\n                    if ( isPromise( next) ) {\n                        preparing = next.file;\n                        next = next[ next.pipe ? 'pipe' : 'then' ]( done );\n                        next.file = preparing;\n                        return next;\n                    }\n    \n                    return done( next );\n                }\n            },\n    \n    \n            /**\n             * @event uploadStart\n             * @param {File} file File对象\n             * @description 某个文件开始上传前触发，一个文件只会触发一次。\n             * @for  Uploader\n             */\n            _prepareNextFile: function() {\n                var me = this,\n                    file = me.request('fetch-file'),\n                    pending = me.pending,\n                    promise;\n    \n                if ( file ) {\n                    promise = me.request( 'before-send-file', file, function() {\n    \n                        // 有可能文件被skip掉了。文件被skip掉后，状态坑定不是Queued.\n                        if ( file.getStatus() === Status.PROGRESS || \n                            file.getStatus() === Status.INTERRUPT ) {\n                            return file;\n                        }\n    \n                        return me._finishFile( file );\n                    });\n    \n                    me.owner.trigger( 'uploadStart', file );\n                    file.setStatus( Status.PROGRESS );\n    \n                    promise.file = file;\n    \n                    // 如果还在pending中，则替换成文件本身。\n                    promise.done(function() {\n                        var idx = $.inArray( promise, pending );\n    \n                        ~idx && pending.splice( idx, 1, file );\n                    });\n    \n                    // befeore-send-file的钩子就有错误发生。\n                    promise.fail(function( reason ) {\n                        file.setStatus( Status.ERROR, reason );\n                        me.owner.trigger( 'uploadError', file, reason );\n                        me.owner.trigger( 'uploadComplete', file );\n                    });\n    \n                    pending.push( promise );\n                }\n            },\n    \n            // 让出位置了，可以让其他分片开始上传\n            _popBlock: function( block ) {\n                var idx = $.inArray( block, this.pool );\n    \n                this.pool.splice( idx, 1 );\n                block.file.remaning--;\n                this.remaning--;\n            },\n    \n            // 开始上传，可以被掉过。如果promise被reject了，则表示跳过此分片。\n            _startSend: function( block ) {\n                var me = this,\n                    file = block.file,\n                    promise;\n    \n                // 有可能在 before-send-file 的 promise 期间改变了文件状态。\n                // 如：暂停，取消\n                // 我们不能中断 promise, 但是可以在 promise 完后，不做上传操作。\n                if ( file.getStatus() !== Status.PROGRESS ) {\n                    \n                    // 如果是中断，则还需要放回去。\n                    if (file.getStatus() === Status.INTERRUPT) {\n                        me._putback(block);\n                    }\n    \n                    return;\n                }\n    \n                me.pool.push( block );\n                me.remaning++;\n    \n                // 如果没有分片，则直接使用原始的。\n                // 不会丢失content-type信息。\n                block.blob = block.chunks === 1 ? file.source :\n                        file.source.slice( block.start, block.end );\n    \n                // hook, 每个分片发送之前可能要做些异步的事情。\n                promise = me.request( 'before-send', block, function() {\n    \n                    // 有可能文件已经上传出错了，所以不需要再传输了。\n                    if ( file.getStatus() === Status.PROGRESS ) {\n                        me._doSend( block );\n                    } else {\n                        me._popBlock( block );\n                        Base.nextTick( me.__tick );\n                    }\n                });\n    \n                // 如果为fail了，则跳过此分片。\n                promise.fail(function() {\n                    if ( file.remaning === 1 ) {\n                        me._finishFile( file ).always(function() {\n                            block.percentage = 1;\n                            me._popBlock( block );\n                            me.owner.trigger( 'uploadComplete', file );\n                            Base.nextTick( me.__tick );\n                        });\n                    } else {\n                        block.percentage = 1;\n                        me._popBlock( block );\n                        Base.nextTick( me.__tick );\n                    }\n                });\n            },\n    \n    \n            /**\n             * @event uploadBeforeSend\n             * @param {Object} object\n             * @param {Object} data 默认的上传参数，可以扩展此对象来控制上传参数。\n             * @param {Object} headers 可以扩展此对象来控制上传头部。\n             * @description 当某个文件的分块在发送前触发，主要用来询问是否要添加附带参数，大文件在开起分片上传的前提下此事件可能会触发多次。\n             * @for  Uploader\n             */\n    \n            /**\n             * @event uploadAccept\n             * @param {Object} object\n             * @param {Object} ret 服务端的返回数据，json格式，如果服务端不是json格式，从ret._raw中取数据，自行解析。\n             * @description 当某个文件上传到服务端响应后，会派送此事件来询问服务端响应是否有效。如果此事件handler返回值为`false`, 则此文件将派送`server`类型的`uploadError`事件。\n             * @for  Uploader\n             */\n    \n            /**\n             * @event uploadProgress\n             * @param {File} file File对象\n             * @param {Number} percentage 上传进度\n             * @description 上传过程中触发，携带上传进度。\n             * @for  Uploader\n             */\n    \n    \n            /**\n             * @event uploadError\n             * @param {File} file File对象\n             * @param {String} reason 出错的code\n             * @description 当文件上传出错时触发。\n             * @for  Uploader\n             */\n    \n            /**\n             * @event uploadSuccess\n             * @param {File} file File对象\n             * @param {Object} response 服务端返回的数据\n             * @description 当文件上传成功时触发。\n             * @for  Uploader\n             */\n    \n            /**\n             * @event uploadComplete\n             * @param {File} [file] File对象\n             * @description 不管成功或者失败，文件上传完成时触发。\n             * @for  Uploader\n             */\n    \n            // 做上传操作。\n            _doSend: function( block ) {\n                var me = this,\n                    owner = me.owner,\n                    opts = me.options,\n                    file = block.file,\n                    tr = new Transport( opts ),\n                    data = $.extend({}, opts.formData ),\n                    headers = $.extend({}, opts.headers ),\n                    requestAccept, ret;\n    \n                block.transport = tr;\n    \n                tr.on( 'destroy', function() {\n                    delete block.transport;\n                    me._popBlock( block );\n                    Base.nextTick( me.__tick );\n                });\n    \n                // 广播上传进度。以文件为单位。\n                tr.on( 'progress', function( percentage ) {\n                    var totalPercent = 0,\n                        uploaded = 0;\n    \n                    // 可能没有abort掉，progress还是执行进来了。\n                    // if ( !file.blocks ) {\n                    //     return;\n                    // }\n    \n                    totalPercent = block.percentage = percentage;\n    \n                    if ( block.chunks > 1 ) {    // 计算文件的整体速度。\n                        $.each( file.blocks, function( _, v ) {\n                            uploaded += (v.percentage || 0) * (v.end - v.start);\n                        });\n    \n                        totalPercent = uploaded / file.size;\n                    }\n    \n                    owner.trigger( 'uploadProgress', file, totalPercent || 0 );\n                });\n    \n                // 用来询问，是否返回的结果是有错误的。\n                requestAccept = function( reject ) {\n                    var fn;\n    \n                    ret = tr.getResponseAsJson() || {};\n                    ret._raw = tr.getResponse();\n                    fn = function( value ) {\n                        reject = value;\n                    };\n    \n                    // 服务端响应了，不代表成功了，询问是否响应正确。\n                    if ( !owner.trigger( 'uploadAccept', block, ret, fn ) ) {\n                        reject = reject || 'server';\n                    }\n    \n                    return reject;\n                };\n    \n                // 尝试重试，然后广播文件上传出错。\n                tr.on( 'error', function( type, flag ) {\n                    block.retried = block.retried || 0;\n    \n                    // 自动重试\n                    if ( block.chunks > 1 && ~'http,abort'.indexOf( type ) &&\n                            block.retried < opts.chunkRetry ) {\n    \n                        block.retried++;\n                        tr.send();\n    \n                    } else {\n    \n                        // http status 500 ~ 600\n                        if ( !flag && type === 'server' ) {\n                            type = requestAccept( type );\n                        }\n    \n                        file.setStatus( Status.ERROR, type );\n                        owner.trigger( 'uploadError', file, type );\n                        owner.trigger( 'uploadComplete', file );\n                    }\n                });\n    \n                // 上传成功\n                tr.on( 'load', function() {\n                    var reason;\n    \n                    // 如果非预期，转向上传出错。\n                    if ( (reason = requestAccept()) ) {\n                        tr.trigger( 'error', reason, true );\n                        return;\n                    }\n    \n                    // 全部上传完成。\n                    if ( file.remaning === 1 ) {\n                        me._finishFile( file, ret );\n                    } else {\n                        tr.destroy();\n                    }\n                });\n    \n                // 配置默认的上传字段。\n                data = $.extend( data, {\n                    id: file.id,\n                    name: file.name,\n                    type: file.type,\n                    lastModifiedDate: file.lastModifiedDate,\n                    size: file.size\n                });\n    \n                block.chunks > 1 && $.extend( data, {\n                    chunks: block.chunks,\n                    chunk: block.chunk\n                });\n    \n                // 在发送之间可以添加字段什么的。。。\n                // 如果默认的字段不够使用，可以通过监听此事件来扩展\n                owner.trigger( 'uploadBeforeSend', block, data, headers );\n    \n                // 开始发送。\n                tr.appendBlob( opts.fileVal, block.blob, file.name );\n                tr.append( data );\n                tr.setRequestHeader( headers );\n                tr.send();\n            },\n    \n            // 完成上传。\n            _finishFile: function( file, ret, hds ) {\n                var owner = this.owner;\n    \n                return owner\n                        .request( 'after-send-file', arguments, function() {\n                            file.setStatus( Status.COMPLETE );\n                            owner.trigger( 'uploadSuccess', file, ret, hds );\n                        })\n                        .fail(function( reason ) {\n    \n                            // 如果外部已经标记为invalid什么的，不再改状态。\n                            if ( file.getStatus() === Status.PROGRESS ) {\n                                file.setStatus( Status.ERROR, reason );\n                            }\n    \n                            owner.trigger( 'uploadError', file, reason );\n                        })\n                        .always(function() {\n                            owner.trigger( 'uploadComplete', file );\n                        });\n            }\n    \n        });\n    });\n    /**\n     * @fileOverview 各种验证，包括文件总大小是否超出、单文件是否超出和文件是否重复。\n     */\n    \n    define('widgets/validator',[\n        'base',\n        'uploader',\n        'file',\n        'widgets/widget'\n    ], function( Base, Uploader, WUFile ) {\n    \n        var $ = Base.$,\n            validators = {},\n            api;\n    \n        /**\n         * @event error\n         * @param {String} type 错误类型。\n         * @description 当validate不通过时，会以派送错误事件的形式通知调用者。通过`upload.on('error', handler)`可以捕获到此类错误，目前有以下错误会在特定的情况下派送错来。\n         *\n         * * `Q_EXCEED_NUM_LIMIT` 在设置了`fileNumLimit`且尝试给`uploader`添加的文件数量超出这个值时派送。\n         * * `Q_EXCEED_SIZE_LIMIT` 在设置了`Q_EXCEED_SIZE_LIMIT`且尝试给`uploader`添加的文件总大小超出这个值时派送。\n         * * `Q_TYPE_DENIED` 当文件类型不满足时触发。。\n         * @for  Uploader\n         */\n    \n        // 暴露给外面的api\n        api = {\n    \n            // 添加验证器\n            addValidator: function( type, cb ) {\n                validators[ type ] = cb;\n            },\n    \n            // 移除验证器\n            removeValidator: function( type ) {\n                delete validators[ type ];\n            }\n        };\n    \n        // 在Uploader初始化的时候启动Validators的初始化\n        Uploader.register({\n            name: 'validator',\n    \n            init: function() {\n                var me = this;\n                Base.nextTick(function() {\n                    $.each( validators, function() {\n                        this.call( me.owner );\n                    });\n                });\n            }\n        });\n    \n        /**\n         * @property {int} [fileNumLimit=undefined]\n         * @namespace options\n         * @for Uploader\n         * @description 验证文件总数量, 超出则不允许加入队列。\n         */\n        api.addValidator( 'fileNumLimit', function() {\n            var uploader = this,\n                opts = uploader.options,\n                count = 0,\n                max = parseInt( opts.fileNumLimit, 10 ),\n                flag = true;\n    \n            if ( !max ) {\n                return;\n            }\n    \n            uploader.on( 'beforeFileQueued', function( file ) {\n    \n                if ( count >= max && flag ) {\n                    flag = false;\n                    this.trigger( 'error', 'Q_EXCEED_NUM_LIMIT', max, file );\n                    setTimeout(function() {\n                        flag = true;\n                    }, 1 );\n                }\n    \n                return count >= max ? false : true;\n            });\n    \n            uploader.on( 'fileQueued', function() {\n                count++;\n            });\n    \n            uploader.on( 'fileDequeued', function() {\n                count--;\n            });\n    \n            uploader.on( 'reset', function() {\n                count = 0;\n            });\n        });\n    \n    \n        /**\n         * @property {int} [fileSizeLimit=undefined]\n         * @namespace options\n         * @for Uploader\n         * @description 验证文件总大小是否超出限制, 超出则不允许加入队列。\n         */\n        api.addValidator( 'fileSizeLimit', function() {\n            var uploader = this,\n                opts = uploader.options,\n                count = 0,\n                max = parseInt( opts.fileSizeLimit, 10 ),\n                flag = true;\n    \n            if ( !max ) {\n                return;\n            }\n    \n            uploader.on( 'beforeFileQueued', function( file ) {\n                var invalid = count + file.size > max;\n    \n                if ( invalid && flag ) {\n                    flag = false;\n                    this.trigger( 'error', 'Q_EXCEED_SIZE_LIMIT', max, file );\n                    setTimeout(function() {\n                        flag = true;\n                    }, 1 );\n                }\n    \n                return invalid ? false : true;\n            });\n    \n            uploader.on( 'fileQueued', function( file ) {\n                count += file.size;\n            });\n    \n            uploader.on( 'fileDequeued', function( file ) {\n                count -= file.size;\n            });\n    \n            uploader.on( 'reset', function() {\n                count = 0;\n            });\n        });\n    \n        /**\n         * @property {int} [fileSingleSizeLimit=undefined]\n         * @namespace options\n         * @for Uploader\n         * @description 验证单个文件大小是否超出限制, 超出则不允许加入队列。\n         */\n        api.addValidator( 'fileSingleSizeLimit', function() {\n            var uploader = this,\n                opts = uploader.options,\n                max = opts.fileSingleSizeLimit;\n    \n            if ( !max ) {\n                return;\n            }\n    \n            uploader.on( 'beforeFileQueued', function( file ) {\n    \n                if ( file.size > max ) {\n                    file.setStatus( WUFile.Status.INVALID, 'exceed_size' );\n                    this.trigger( 'error', 'F_EXCEED_SIZE', max, file );\n                    return false;\n                }\n    \n            });\n    \n        });\n    \n        /**\n         * @property {Boolean} [duplicate=undefined]\n         * @namespace options\n         * @for Uploader\n         * @description 去重， 根据文件名字、文件大小和最后修改时间来生成hash Key.\n         */\n        api.addValidator( 'duplicate', function() {\n            var uploader = this,\n                opts = uploader.options,\n                mapping = {};\n    \n            if ( opts.duplicate ) {\n                return;\n            }\n    \n            function hashString( str ) {\n                var hash = 0,\n                    i = 0,\n                    len = str.length,\n                    _char;\n    \n                for ( ; i < len; i++ ) {\n                    _char = str.charCodeAt( i );\n                    hash = _char + (hash << 6) + (hash << 16) - hash;\n                }\n    \n                return hash;\n            }\n    \n            uploader.on( 'beforeFileQueued', function( file ) {\n                var hash = file.__hash || (file.__hash = hashString( file.name +\n                        file.size + file.lastModifiedDate ));\n    \n                // 已经重复了\n                if ( mapping[ hash ] ) {\n                    this.trigger( 'error', 'F_DUPLICATE', file );\n                    return false;\n                }\n            });\n    \n            uploader.on( 'fileQueued', function( file ) {\n                var hash = file.__hash;\n    \n                hash && (mapping[ hash ] = true);\n            });\n    \n            uploader.on( 'fileDequeued', function( file ) {\n                var hash = file.__hash;\n    \n                hash && (delete mapping[ hash ]);\n            });\n    \n            uploader.on( 'reset', function() {\n                mapping = {};\n            });\n        });\n    \n        return api;\n    });\n    \n    /**\n     * @fileOverview Runtime管理器，负责Runtime的选择, 连接\n     */\n    define('runtime/compbase',[],function() {\n    \n        function CompBase( owner, runtime ) {\n    \n            this.owner = owner;\n            this.options = owner.options;\n    \n            this.getRuntime = function() {\n                return runtime;\n            };\n    \n            this.getRuid = function() {\n                return runtime.uid;\n            };\n    \n            this.trigger = function() {\n                return owner.trigger.apply( owner, arguments );\n            };\n        }\n    \n        return CompBase;\n    });\n    /**\n     * @fileOverview Html5Runtime\n     */\n    define('runtime/html5/runtime',[\n        'base',\n        'runtime/runtime',\n        'runtime/compbase'\n    ], function( Base, Runtime, CompBase ) {\n    \n        var type = 'html5',\n            components = {};\n    \n        function Html5Runtime() {\n            var pool = {},\n                me = this,\n                destroy = this.destroy;\n    \n            Runtime.apply( me, arguments );\n            me.type = type;\n    \n    \n            // 这个方法的调用者，实际上是RuntimeClient\n            me.exec = function( comp, fn/*, args...*/) {\n                var client = this,\n                    uid = client.uid,\n                    args = Base.slice( arguments, 2 ),\n                    instance;\n    \n                if ( components[ comp ] ) {\n                    instance = pool[ uid ] = pool[ uid ] ||\n                            new components[ comp ]( client, me );\n    \n                    if ( instance[ fn ] ) {\n                        return instance[ fn ].apply( instance, args );\n                    }\n                }\n            };\n    \n            me.destroy = function() {\n                // @todo 删除池子中的所有实例\n                return destroy && destroy.apply( this, arguments );\n            };\n        }\n    \n        Base.inherits( Runtime, {\n            constructor: Html5Runtime,\n    \n            // 不需要连接其他程序，直接执行callback\n            init: function() {\n                var me = this;\n                setTimeout(function() {\n                    me.trigger('ready');\n                }, 1 );\n            }\n    \n        });\n    \n        // 注册Components\n        Html5Runtime.register = function( name, component ) {\n            var klass = components[ name ] = Base.inherits( CompBase, component );\n            return klass;\n        };\n    \n        // 注册html5运行时。\n        // 只有在支持的前提下注册。\n        if ( window.Blob && window.FileReader && window.DataView ) {\n            Runtime.addRuntime( type, Html5Runtime );\n        }\n    \n        return Html5Runtime;\n    });\n    /**\n     * @fileOverview Blob Html实现\n     */\n    define('runtime/html5/blob',[\n        'runtime/html5/runtime',\n        'lib/blob'\n    ], function( Html5Runtime, Blob ) {\n    \n        return Html5Runtime.register( 'Blob', {\n            slice: function( start, end ) {\n                var blob = this.owner.source,\n                    slice = blob.slice || blob.webkitSlice || blob.mozSlice;\n    \n                blob = slice.call( blob, start, end );\n    \n                return new Blob( this.getRuid(), blob );\n            }\n        });\n    });\n    /**\n     * @fileOverview FilePaste\n     */\n    define('runtime/html5/dnd',[\n        'base',\n        'runtime/html5/runtime',\n        'lib/file'\n    ], function( Base, Html5Runtime, File ) {\n    \n        var $ = Base.$,\n            prefix = 'webuploader-dnd-';\n    \n        return Html5Runtime.register( 'DragAndDrop', {\n            init: function() {\n                var elem = this.elem = this.options.container;\n    \n                this.dragEnterHandler = Base.bindFn( this._dragEnterHandler, this );\n                this.dragOverHandler = Base.bindFn( this._dragOverHandler, this );\n                this.dragLeaveHandler = Base.bindFn( this._dragLeaveHandler, this );\n                this.dropHandler = Base.bindFn( this._dropHandler, this );\n                this.dndOver = false;\n    \n                elem.on( 'dragenter', this.dragEnterHandler );\n                elem.on( 'dragover', this.dragOverHandler );\n                elem.on( 'dragleave', this.dragLeaveHandler );\n                elem.on( 'drop', this.dropHandler );\n    \n                if ( this.options.disableGlobalDnd ) {\n                    $( document ).on( 'dragover', this.dragOverHandler );\n                    $( document ).on( 'drop', this.dropHandler );\n                }\n            },\n    \n            _dragEnterHandler: function( e ) {\n                var me = this,\n                    denied = me._denied || false,\n                    items;\n    \n                e = e.originalEvent || e;\n    \n                if ( !me.dndOver ) {\n                    me.dndOver = true;\n    \n                    // 注意只有 chrome 支持。\n                    items = e.dataTransfer.items;\n    \n                    if ( items && items.length ) {\n                        me._denied = denied = !me.trigger( 'accept', items );\n                    }\n    \n                    me.elem.addClass( prefix + 'over' );\n                    me.elem[ denied ? 'addClass' :\n                            'removeClass' ]( prefix + 'denied' );\n                }\n    \n                e.dataTransfer.dropEffect = denied ? 'none' : 'copy';\n    \n                return false;\n            },\n    \n            _dragOverHandler: function( e ) {\n                // 只处理框内的。\n                var parentElem = this.elem.parent().get( 0 );\n                if ( parentElem && !$.contains( parentElem, e.currentTarget ) ) {\n                    return false;\n                }\n    \n                clearTimeout( this._leaveTimer );\n                this._dragEnterHandler.call( this, e );\n    \n                return false;\n            },\n    \n            _dragLeaveHandler: function() {\n                var me = this,\n                    handler;\n    \n                handler = function() {\n                    me.dndOver = false;\n                    me.elem.removeClass( prefix + 'over ' + prefix + 'denied' );\n                };\n    \n                clearTimeout( me._leaveTimer );\n                me._leaveTimer = setTimeout( handler, 100 );\n                return false;\n            },\n    \n            _dropHandler: function( e ) {\n                var me = this,\n                    ruid = me.getRuid(),\n                    parentElem = me.elem.parent().get( 0 ),\n                    dataTransfer, data;\n    \n                // 只处理框内的。\n                if ( parentElem && !$.contains( parentElem, e.currentTarget ) ) {\n                    return false;\n                }\n    \n                e = e.originalEvent || e;\n                dataTransfer = e.dataTransfer;\n    \n                // 如果是页面内拖拽，还不能处理，不阻止事件。\n                // 此处 ie11 下会报参数错误，\n                try {\n                    data = dataTransfer.getData('text/html');\n                } catch( err ) {\n                }\n    \n                if ( data ) {\n                    return;\n                }\n    \n                me._getTansferFiles( dataTransfer, function( results ) {\n                    me.trigger( 'drop', $.map( results, function( file ) {\n                        return new File( ruid, file );\n                    }) );\n                });\n    \n                me.dndOver = false;\n                me.elem.removeClass( prefix + 'over' );\n                return false;\n            },\n    \n            // 如果传入 callback 则去查看文件夹，否则只管当前文件夹。\n            _getTansferFiles: function( dataTransfer, callback ) {\n                var results  = [],\n                    promises = [],\n                    items, files, file, item, i, len, canAccessFolder;\n    \n                items = dataTransfer.items;\n                files = dataTransfer.files;\n    \n                canAccessFolder = !!(items && items[ 0 ].webkitGetAsEntry);\n    \n                for ( i = 0, len = files.length; i < len; i++ ) {\n                    file = files[ i ];\n                    item = items && items[ i ];\n    \n                    if ( canAccessFolder && item.webkitGetAsEntry().isDirectory ) {\n    \n                        promises.push( this._traverseDirectoryTree(\n                                item.webkitGetAsEntry(), results ) );\n                    } else {\n                        results.push( file );\n                    }\n                }\n    \n                Base.when.apply( Base, promises ).done(function() {\n    \n                    if ( !results.length ) {\n                        return;\n                    }\n    \n                    callback( results );\n                });\n            },\n    \n            _traverseDirectoryTree: function( entry, results ) {\n                var deferred = Base.Deferred(),\n                    me = this;\n    \n                if ( entry.isFile ) {\n                    entry.file(function( file ) {\n                        results.push( file );\n                        deferred.resolve();\n                    });\n                } else if ( entry.isDirectory ) {\n                    entry.createReader().readEntries(function( entries ) {\n                        var len = entries.length,\n                            promises = [],\n                            arr = [],    // 为了保证顺序。\n                            i;\n    \n                        for ( i = 0; i < len; i++ ) {\n                            promises.push( me._traverseDirectoryTree(\n                                    entries[ i ], arr ) );\n                        }\n    \n                        Base.when.apply( Base, promises ).then(function() {\n                            results.push.apply( results, arr );\n                            deferred.resolve();\n                        }, deferred.reject );\n                    });\n                }\n    \n                return deferred.promise();\n            },\n    \n            destroy: function() {\n                var elem = this.elem;\n    \n                // 还没 init 就调用 destroy\n                if (!elem) {\n                    return;\n                }\n                \n                elem.off( 'dragenter', this.dragEnterHandler );\n                elem.off( 'dragover', this.dragOverHandler );\n                elem.off( 'dragleave', this.dragLeaveHandler );\n                elem.off( 'drop', this.dropHandler );\n    \n                if ( this.options.disableGlobalDnd ) {\n                    $( document ).off( 'dragover', this.dragOverHandler );\n                    $( document ).off( 'drop', this.dropHandler );\n                }\n            }\n        });\n    });\n    \n    /**\n     * @fileOverview FilePaste\n     */\n    define('runtime/html5/filepaste',[\n        'base',\n        'runtime/html5/runtime',\n        'lib/file'\n    ], function( Base, Html5Runtime, File ) {\n    \n        return Html5Runtime.register( 'FilePaste', {\n            init: function() {\n                var opts = this.options,\n                    elem = this.elem = opts.container,\n                    accept = '.*',\n                    arr, i, len, item;\n    \n                // accetp的mimeTypes中生成匹配正则。\n                if ( opts.accept ) {\n                    arr = [];\n    \n                    for ( i = 0, len = opts.accept.length; i < len; i++ ) {\n                        item = opts.accept[ i ].mimeTypes;\n                        item && arr.push( item );\n                    }\n    \n                    if ( arr.length ) {\n                        accept = arr.join(',');\n                        accept = accept.replace( /,/g, '|' ).replace( /\\*/g, '.*' );\n                    }\n                }\n                this.accept = accept = new RegExp( accept, 'i' );\n                this.hander = Base.bindFn( this._pasteHander, this );\n                elem.on( 'paste', this.hander );\n            },\n    \n            _pasteHander: function( e ) {\n                var allowed = [],\n                    ruid = this.getRuid(),\n                    items, item, blob, i, len;\n    \n                e = e.originalEvent || e;\n                items = e.clipboardData.items;\n    \n                for ( i = 0, len = items.length; i < len; i++ ) {\n                    item = items[ i ];\n    \n                    if ( item.kind !== 'file' || !(blob = item.getAsFile()) ) {\n                        continue;\n                    }\n    \n                    allowed.push( new File( ruid, blob ) );\n                }\n    \n                if ( allowed.length ) {\n                    // 不阻止非文件粘贴（文字粘贴）的事件冒泡\n                    e.preventDefault();\n                    e.stopPropagation();\n                    this.trigger( 'paste', allowed );\n                }\n            },\n    \n            destroy: function() {\n                this.elem.off( 'paste', this.hander );\n            }\n        });\n    });\n    \n    /**\n     * @fileOverview FilePicker\n     */\n    define('runtime/html5/filepicker',[\n        'base',\n        'runtime/html5/runtime'\n    ], function( Base, Html5Runtime ) {\n    \n        var $ = Base.$;\n    \n        return Html5Runtime.register( 'FilePicker', {\n            init: function() {\n                var container = this.getRuntime().getContainer(),\n                    me = this,\n                    owner = me.owner,\n                    opts = me.options,\n                    label = this.label = $( document.createElement('label') ),\n                    input =  this.input = $( document.createElement('input') ),\n                    arr, i, len, mouseHandler;\n    \n                input.attr( 'type', 'file' );\n                input.attr( 'name', opts.name );\n                input.addClass('webuploader-element-invisible');\n    \n                label.on( 'click', function() {\n                    input.trigger('click');\n                });\n    \n                label.css({\n                    opacity: 0,\n                    width: '100%',\n                    height: '100%',\n                    display: 'block',\n                    cursor: 'pointer',\n                    background: '#ffffff'\n                });\n    \n                if ( opts.multiple ) {\n                    input.attr( 'multiple', 'multiple' );\n                }\n    \n                // @todo Firefox不支持单独指定后缀\n                if ( opts.accept && opts.accept.length > 0 ) {\n                    arr = [];\n    \n                    for ( i = 0, len = opts.accept.length; i < len; i++ ) {\n                        arr.push( opts.accept[ i ].mimeTypes );\n                    }\n    \n                    input.attr( 'accept', arr.join(',') );\n                }\n    \n                container.append( input );\n                container.append( label );\n    \n                mouseHandler = function( e ) {\n                    owner.trigger( e.type );\n                };\n    \n                input.on( 'change', function( e ) {\n                    var fn = arguments.callee,\n                        clone;\n    \n                    me.files = e.target.files;\n    \n                    // reset input\n                    clone = this.cloneNode( true );\n                    clone.value = null;\n                    this.parentNode.replaceChild( clone, this );\n    \n                    input.off();\n                    input = $( clone ).on( 'change', fn )\n                            .on( 'mouseenter mouseleave', mouseHandler );\n    \n                    owner.trigger('change');\n                });\n    \n                label.on( 'mouseenter mouseleave', mouseHandler );\n    \n            },\n    \n    \n            getFiles: function() {\n                return this.files;\n            },\n    \n            destroy: function() {\n                this.input.off();\n                this.label.off();\n            }\n        });\n    });\n    /**\n     * @fileOverview Transport\n     * @todo 支持chunked传输，优势：\n     * 可以将大文件分成小块，挨个传输，可以提高大文件成功率，当失败的时候，也只需要重传那小部分，\n     * 而不需要重头再传一次。另外断点续传也需要用chunked方式。\n     */\n    define('runtime/html5/transport',[\n        'base',\n        'runtime/html5/runtime'\n    ], function( Base, Html5Runtime ) {\n    \n        var noop = Base.noop,\n            $ = Base.$;\n    \n        return Html5Runtime.register( 'Transport', {\n            init: function() {\n                this._status = 0;\n                this._response = null;\n            },\n    \n            send: function() {\n                var owner = this.owner,\n                    opts = this.options,\n                    xhr = this._initAjax(),\n                    blob = owner._blob,\n                    server = opts.server,\n                    formData, binary, fr;\n    \n                if ( opts.sendAsBinary ) {\n                    server += (/\\?/.test( server ) ? '&' : '?') +\n                            $.param( owner._formData );\n    \n                    binary = blob.getSource();\n                } else {\n                    formData = new FormData();\n                    $.each( owner._formData, function( k, v ) {\n                        formData.append( k, v );\n                    });\n    \n                    formData.append( opts.fileVal, blob.getSource(),\n                            opts.filename || owner._formData.name || '' );\n                }\n    \n                if ( opts.withCredentials && 'withCredentials' in xhr ) {\n                    xhr.open( opts.method, server, true );\n                    xhr.withCredentials = true;\n                } else {\n                    xhr.open( opts.method, server );\n                }\n    \n                this._setRequestHeader( xhr, opts.headers );\n    \n                if ( binary ) {\n                    // 强制设置成 content-type 为文件流。\n                    xhr.overrideMimeType &&\n                            xhr.overrideMimeType('application/octet-stream');\n    \n                    // android直接发送blob会导致服务端接收到的是空文件。\n                    // bug详情。\n                    // https://code.google.com/p/android/issues/detail?id=39882\n                    // 所以先用fileReader读取出来再通过arraybuffer的方式发送。\n                    if ( Base.os.android ) {\n                        fr = new FileReader();\n    \n                        fr.onload = function() {\n                            xhr.send( this.result );\n                            fr = fr.onload = null;\n                        };\n    \n                        fr.readAsArrayBuffer( binary );\n                    } else {\n                        xhr.send( binary );\n                    }\n                } else {\n                    xhr.send( formData );\n                }\n            },\n    \n            getResponse: function() {\n                return this._response;\n            },\n    \n            getResponseAsJson: function() {\n                return this._parseJson( this._response );\n            },\n    \n            getStatus: function() {\n                return this._status;\n            },\n    \n            abort: function() {\n                var xhr = this._xhr;\n    \n                if ( xhr ) {\n                    xhr.upload.onprogress = noop;\n                    xhr.onreadystatechange = noop;\n                    xhr.abort();\n    \n                    this._xhr = xhr = null;\n                }\n            },\n    \n            destroy: function() {\n                this.abort();\n            },\n    \n            _initAjax: function() {\n                var me = this,\n                    xhr = new XMLHttpRequest(),\n                    opts = this.options;\n    \n                if ( opts.withCredentials && !('withCredentials' in xhr) &&\n                        typeof XDomainRequest !== 'undefined' ) {\n                    xhr = new XDomainRequest();\n                }\n    \n                xhr.upload.onprogress = function( e ) {\n                    var percentage = 0;\n    \n                    if ( e.lengthComputable ) {\n                        percentage = e.loaded / e.total;\n                    }\n    \n                    return me.trigger( 'progress', percentage );\n                };\n    \n                xhr.onreadystatechange = function() {\n    \n                    if ( xhr.readyState !== 4 ) {\n                        return;\n                    }\n    \n                    xhr.upload.onprogress = noop;\n                    xhr.onreadystatechange = noop;\n                    me._xhr = null;\n                    me._status = xhr.status;\n    \n                    if ( xhr.status >= 200 && xhr.status < 300 ) {\n                        me._response = xhr.responseText;\n                        return me.trigger('load');\n                    } else if ( xhr.status >= 500 && xhr.status < 600 ) {\n                        me._response = xhr.responseText;\n                        return me.trigger( 'error', 'server' );\n                    }\n    \n    \n                    return me.trigger( 'error', me._status ? 'http' : 'abort' );\n                };\n    \n                me._xhr = xhr;\n                return xhr;\n            },\n    \n            _setRequestHeader: function( xhr, headers ) {\n                $.each( headers, function( key, val ) {\n                    xhr.setRequestHeader( key, val );\n                });\n            },\n    \n            _parseJson: function( str ) {\n                var json;\n    \n                try {\n                    json = JSON.parse( str );\n                } catch ( ex ) {\n                    json = {};\n                }\n    \n                return json;\n            }\n        });\n    });\n    /**\n     * @fileOverview FlashRuntime\n     */\n    define('runtime/flash/runtime',[\n        'base',\n        'runtime/runtime',\n        'runtime/compbase'\n    ], function( Base, Runtime, CompBase ) {\n    \n        var $ = Base.$,\n            type = 'flash',\n            components = {};\n    \n    \n        function getFlashVersion() {\n            var version;\n    \n            try {\n                version = navigator.plugins[ 'Shockwave Flash' ];\n                version = version.description;\n            } catch ( ex ) {\n                try {\n                    version = new ActiveXObject('ShockwaveFlash.ShockwaveFlash')\n                            .GetVariable('$version');\n                } catch ( ex2 ) {\n                    version = '0.0';\n                }\n            }\n            version = version.match( /\\d+/g );\n            return parseFloat( version[ 0 ] + '.' + version[ 1 ], 10 );\n        }\n    \n        function FlashRuntime() {\n            var pool = {},\n                clients = {},\n                destroy = this.destroy,\n                me = this,\n                jsreciver = Base.guid('webuploader_');\n    \n            Runtime.apply( me, arguments );\n            me.type = type;\n    \n    \n            // 这个方法的调用者，实际上是RuntimeClient\n            me.exec = function( comp, fn/*, args...*/ ) {\n                var client = this,\n                    uid = client.uid,\n                    args = Base.slice( arguments, 2 ),\n                    instance;\n    \n                clients[ uid ] = client;\n    \n                if ( components[ comp ] ) {\n                    if ( !pool[ uid ] ) {\n                        pool[ uid ] = new components[ comp ]( client, me );\n                    }\n    \n                    instance = pool[ uid ];\n    \n                    if ( instance[ fn ] ) {\n                        return instance[ fn ].apply( instance, args );\n                    }\n                }\n    \n                return me.flashExec.apply( client, arguments );\n            };\n    \n            function handler( evt, obj ) {\n                var type = evt.type || evt,\n                    parts, uid;\n    \n                parts = type.split('::');\n                uid = parts[ 0 ];\n                type = parts[ 1 ];\n    \n                // console.log.apply( console, arguments );\n    \n                if ( type === 'Ready' && uid === me.uid ) {\n                    me.trigger('ready');\n                } else if ( clients[ uid ] ) {\n                    clients[ uid ].trigger( type.toLowerCase(), evt, obj );\n                }\n    \n                // Base.log( evt, obj );\n            }\n    \n            // flash的接受器。\n            window[ jsreciver ] = function() {\n                var args = arguments;\n    \n                // 为了能捕获得到。\n                setTimeout(function() {\n                    handler.apply( null, args );\n                }, 1 );\n            };\n    \n            this.jsreciver = jsreciver;\n    \n            this.destroy = function() {\n                // @todo 删除池子中的所有实例\n                return destroy && destroy.apply( this, arguments );\n            };\n    \n            this.flashExec = function( comp, fn ) {\n                var flash = me.getFlash(),\n                    args = Base.slice( arguments, 2 );\n    \n                return flash.exec( this.uid, comp, fn, args );\n            };\n    \n            // @todo\n        }\n    \n        Base.inherits( Runtime, {\n            constructor: FlashRuntime,\n    \n            init: function() {\n                var container = this.getContainer(),\n                    opts = this.options,\n                    html;\n    \n                // if not the minimal height, shims are not initialized\n                // in older browsers (e.g FF3.6, IE6,7,8, Safari 4.0,5.0, etc)\n                container.css({\n                    position: 'absolute',\n                    top: '-8px',\n                    left: '-8px',\n                    width: '9px',\n                    height: '9px',\n                    overflow: 'hidden'\n                });\n    \n                // insert flash object\n                html = '<object id=\"' + this.uid + '\" type=\"application/' +\n                        'x-shockwave-flash\" data=\"' +  opts.swf + '\" ';\n    \n                if ( Base.browser.ie ) {\n                    html += 'classid=\"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000\" ';\n                }\n    \n                html += 'width=\"100%\" height=\"100%\" style=\"outline:0\">'  +\n                    '<param name=\"movie\" value=\"' + opts.swf + '\" />' +\n                    '<param name=\"flashvars\" value=\"uid=' + this.uid +\n                    '&jsreciver=' + this.jsreciver + '\" />' +\n                    '<param name=\"wmode\" value=\"transparent\" />' +\n                    '<param name=\"allowscriptaccess\" value=\"always\" />' +\n                '</object>';\n    \n                container.html( html );\n            },\n    \n            getFlash: function() {\n                if ( this._flash ) {\n                    return this._flash;\n                }\n    \n                this._flash = $( '#' + this.uid ).get( 0 );\n                return this._flash;\n            }\n    \n        });\n    \n        FlashRuntime.register = function( name, component ) {\n            component = components[ name ] = Base.inherits( CompBase, $.extend({\n    \n                // @todo fix this later\n                flashExec: function() {\n                    var owner = this.owner,\n                        runtime = this.getRuntime();\n    \n                    return runtime.flashExec.apply( owner, arguments );\n                }\n            }, component ) );\n    \n            return component;\n        };\n    \n        if ( getFlashVersion() >= 11.4 ) {\n            Runtime.addRuntime( type, FlashRuntime );\n        }\n    \n        return FlashRuntime;\n    });\n    /**\n     * @fileOverview FilePicker\n     */\n    define('runtime/flash/filepicker',[\n        'base',\n        'runtime/flash/runtime'\n    ], function( Base, FlashRuntime ) {\n        var $ = Base.$;\n    \n        return FlashRuntime.register( 'FilePicker', {\n            init: function( opts ) {\n                var copy = $.extend({}, opts ),\n                    len, i;\n    \n                // 修复Flash再没有设置title的情况下无法弹出flash文件选择框的bug.\n                len = copy.accept && copy.accept.length;\n                for (  i = 0; i < len; i++ ) {\n                    if ( !copy.accept[ i ].title ) {\n                        copy.accept[ i ].title = 'Files';\n                    }\n                }\n    \n                delete copy.button;\n                delete copy.id;\n                delete copy.container;\n    \n                this.flashExec( 'FilePicker', 'init', copy );\n            },\n    \n            destroy: function() {\n                this.flashExec( 'FilePicker', 'destroy' );\n            }\n        });\n    });\n    /**\n     * @fileOverview  Transport flash实现\n     */\n    define('runtime/flash/transport',[\n        'base',\n        'runtime/flash/runtime',\n        'runtime/client'\n    ], function( Base, FlashRuntime, RuntimeClient ) {\n        var $ = Base.$;\n    \n        return FlashRuntime.register( 'Transport', {\n            init: function() {\n                this._status = 0;\n                this._response = null;\n                this._responseJson = null;\n            },\n    \n            send: function() {\n                var owner = this.owner,\n                    opts = this.options,\n                    xhr = this._initAjax(),\n                    blob = owner._blob,\n                    server = opts.server,\n                    binary;\n    \n                xhr.connectRuntime( blob.ruid );\n    \n                if ( opts.sendAsBinary ) {\n                    server += (/\\?/.test( server ) ? '&' : '?') +\n                            $.param( owner._formData );\n    \n                    binary = blob.uid;\n                } else {\n                    $.each( owner._formData, function( k, v ) {\n                        xhr.exec( 'append', k, v );\n                    });\n    \n                    xhr.exec( 'appendBlob', opts.fileVal, blob.uid,\n                            opts.filename || owner._formData.name || '' );\n                }\n    \n                this._setRequestHeader( xhr, opts.headers );\n                xhr.exec( 'send', {\n                    method: opts.method,\n                    url: server,\n                    forceURLStream: opts.forceURLStream,\n                    mimeType: 'application/octet-stream'\n                }, binary );\n            },\n    \n            getStatus: function() {\n                return this._status;\n            },\n    \n            getResponse: function() {\n                return this._response || '';\n            },\n    \n            getResponseAsJson: function() {\n                return this._responseJson;\n            },\n    \n            abort: function() {\n                var xhr = this._xhr;\n    \n                if ( xhr ) {\n                    xhr.exec('abort');\n                    xhr.destroy();\n                    this._xhr = xhr = null;\n                }\n            },\n    \n            destroy: function() {\n                this.abort();\n            },\n    \n            _initAjax: function() {\n                var me = this,\n                    xhr = new RuntimeClient('XMLHttpRequest');\n    \n                xhr.on( 'uploadprogress progress', function( e ) {\n                    var percent = e.loaded / e.total;\n                    percent = Math.min( 1, Math.max( 0, percent ) );\n                    return me.trigger( 'progress', percent );\n                });\n    \n                xhr.on( 'load', function() {\n                    var status = xhr.exec('getStatus'),\n                        readBody = false,\n                        err = '',\n                        p;\n    \n                    xhr.off();\n                    me._xhr = null;\n    \n                    if ( status >= 200 && status < 300 ) {\n                        readBody = true;\n                    } else if ( status >= 500 && status < 600 ) {\n                        readBody = true;\n                        err = 'server';\n                    } else {\n                        err = 'http';\n                    }\n    \n                    if ( readBody ) {\n                        me._response = xhr.exec('getResponse');\n                        me._response = decodeURIComponent( me._response );\n    \n                        // flash 处理可能存在 bug, 没辙只能靠 js 了\n                        // try {\n                        //     me._responseJson = xhr.exec('getResponseAsJson');\n                        // } catch ( error ) {\n                            \n                        p = window.JSON && window.JSON.parse || function( s ) {\n                            try {\n                                return new Function('return ' + s).call();\n                            } catch ( err ) {\n                                return {};\n                            }\n                        };\n                        me._responseJson  = me._response ? p(me._response) : {};\n                            \n                        // }\n                    }\n                    \n                    xhr.destroy();\n                    xhr = null;\n    \n                    return err ? me.trigger( 'error', err ) : me.trigger('load');\n                });\n    \n                xhr.on( 'error', function() {\n                    xhr.off();\n                    me._xhr = null;\n                    me.trigger( 'error', 'http' );\n                });\n    \n                me._xhr = xhr;\n                return xhr;\n            },\n    \n            _setRequestHeader: function( xhr, headers ) {\n                $.each( headers, function( key, val ) {\n                    xhr.exec( 'setRequestHeader', key, val );\n                });\n            }\n        });\n    });\n    /**\n     * @fileOverview 没有图像处理的版本。\n     */\n    define('preset/withoutimage',[\n        'base',\n    \n        // widgets\n        'widgets/filednd',\n        'widgets/filepaste',\n        'widgets/filepicker',\n        'widgets/queue',\n        'widgets/runtime',\n        'widgets/upload',\n        'widgets/validator',\n    \n        // runtimes\n        // html5\n        'runtime/html5/blob',\n        'runtime/html5/dnd',\n        'runtime/html5/filepaste',\n        'runtime/html5/filepicker',\n        'runtime/html5/transport',\n    \n        // flash\n        'runtime/flash/filepicker',\n        'runtime/flash/transport'\n    ], function( Base ) {\n        return Base;\n    });\n    define('webuploader',[\n        'preset/withoutimage'\n    ], function( preset ) {\n        return preset;\n    });\n    return require('webuploader');\n});\n"
  },
  {
    "path": "uploads/.gitkeep",
    "content": ""
  },
  {
    "path": "utils/auth2/auth2.go",
    "content": "package auth2\n\nimport (\n\t\"context\"\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"io\"\n\t\"net/http\"\n\t\"time\"\n)\n\ntype UserInfo struct {\n\tUserId string `json:\"userid\"` // 企业成员userid\n\tName   string `json:\"name\"`   // 姓名\n\tAvatar string `json:\"avatar\"` // 头像\n\tMobile string `json:\"mobile\"` // 手机号\n\tMail   string `json:\"mail\"`   // 邮箱\n}\n\nfunc NewAccessToken(token IAccessToken) AccessTokenCache {\n\treturn AccessTokenCache{\n\t\tAccessToken: token.GetToken(),\n\t\tExpireIn:    token.GetExpireIn(),\n\t\tExpireTime:  token.GetExpireTime(),\n\t}\n}\n\ntype AccessTokenCache struct {\n\tExpireIn    time.Duration\n\tExpireTime  time.Time\n\tAccessToken string\n}\n\nfunc (a AccessTokenCache) GetToken() string {\n\treturn a.AccessToken\n}\n\nfunc (a AccessTokenCache) GetExpireIn() time.Duration {\n\treturn a.ExpireIn\n}\n\nfunc (a AccessTokenCache) GetExpireTime() time.Time {\n\treturn a.ExpireTime\n}\n\nfunc (a AccessTokenCache) IsExpired() bool {\n\treturn time.Now().After(a.ExpireTime)\n}\n\ntype IAccessToken interface {\n\tGetToken() string\n\tGetExpireIn() time.Duration\n\tGetExpireTime() time.Time\n}\n\ntype Client interface {\n\tGetAccessToken(ctx context.Context) (IAccessToken, error)\n\tSetAccessToken(token IAccessToken)\n\tBuildURL(callback string, isAppBrowser bool) string\n\tValidateCallback(state string) error\n\tGetUserInfo(ctx context.Context, code string) (UserInfo, error)\n}\n\ntype IResponse interface {\n\tAsError() error\n}\n\nfunc Request(req *http.Request, v IResponse) error {\n\tresponse, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\treturn err\n\t}\n\tdefer response.Body.Close()\n\n\tb, err := io.ReadAll(response.Body)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tif response.StatusCode != http.StatusOK {\n\t\treturn fmt.Errorf(\"status = %d, msg = %s\", response.StatusCode, string(b))\n\t}\n\n\tif err := json.Unmarshal(b, v); err != nil {\n\t\treturn err\n\t}\n\n\treturn v.AsError()\n}\n"
  },
  {
    "path": "utils/auth2/dingtalk/dingtalk.go",
    "content": "package dingtalk\n\nimport (\n\t\"bytes\"\n\t\"context\"\n\t\"encoding/json\"\n\t\"errors\"\n\t\"fmt\"\n\t\"github.com/mindoc-org/mindoc/utils/auth2\"\n\t\"net/http\"\n\t\"net/url\"\n\t\"time\"\n)\n\nconst (\n\tAppName = \"dingtalk\"\n\n\tcallbackState = \"mindoc\"\n)\n\ntype BasicResponse struct {\n\tMessage string `json:\"errmsg\"`\n\tCode    int    `json:\"errcode\"`\n}\n\nfunc (r *BasicResponse) Error() string {\n\treturn fmt.Sprintf(\"errcode=%d, errmsg=%s\", r.Code, r.Message)\n}\n\nfunc (r *BasicResponse) AsError() error {\n\tif r == nil {\n\t\treturn nil\n\t}\n\n\tif r.Code != 0 || r.Message != \"ok\" {\n\t\treturn r\n\t}\n\treturn nil\n}\n\ntype AccessToken struct {\n\t// 文档: https://open.dingtalk.com/document/orgapp/obtain-orgapp-token\n\t*BasicResponse\n\n\tAccessToken string `json:\"access_token\"`\n\tExpireIn    int    `json:\"expires_in\"`\n\n\tcreateTime time.Time\n}\n\nfunc (a AccessToken) GetToken() string {\n\treturn a.AccessToken\n}\n\nfunc (a AccessToken) GetExpireIn() time.Duration {\n\treturn time.Duration(a.ExpireIn) * time.Second\n}\n\nfunc (a AccessToken) GetExpireTime() time.Time {\n\treturn a.createTime.Add(a.GetExpireIn())\n}\n\ntype UserAccessToken struct {\n\t// 文档: https://open.dingtalk.com/document/orgapp/obtain-user-token\n\t*BasicResponse // 此接口未返回错误代码信息，仅仅能检查HTTP状态码\n\n\tExpireIn     int    `json:\"expireIn\"`\n\tAccessToken  string `json:\"accessToken\"`\n\tRefreshToken string `json:\"refreshToken\"`\n\tCorpId       string `json:\"corpId\"`\n}\n\ntype UserInfo struct {\n\t// 文档: https://open.dingtalk.com/document/orgapp/dingtalk-retrieve-user-information\n\t*BasicResponse\n\n\tNickName  string `json:\"nick\"`\n\tAvatar    string `json:\"avatarUrl\"`\n\tMobile    string `json:\"mobile\"`\n\tOpenId    string `json:\"openId\"`\n\tUnionId   string `json:\"unionId\"`\n\tEmail     string `json:\"email\"`\n\tStateCode string `json:\"stateCode\"`\n}\n\ntype UserIdByUnion struct {\n\t// 文档: https://open.dingtalk.com/document/isvapp/query-a-user-by-the-union-id\n\t*BasicResponse\n\n\tRequestId string `json:\"request_id\"`\n\tResult    struct {\n\t\tContactType int    `json:\"contact_type\"`\n\t\tUserId      string `json:\"userid\"`\n\t} `json:\"result\"`\n}\n\nfunc NewClient(appSecret string, appKey string) auth2.Client {\n\treturn NewDingtalkClient(appSecret, appKey)\n}\n\nfunc NewDingtalkClient(appSecret string, appKey string) *DingtalkClient {\n\treturn &DingtalkClient{AppSecret: appSecret, AppKey: appKey}\n}\n\ntype DingtalkClient struct {\n\tAppSecret string\n\tAppKey    string\n\n\ttoken auth2.IAccessToken\n}\n\nfunc (d *DingtalkClient) GetAccessToken(ctx context.Context) (auth2.IAccessToken, error) {\n\tif d.token != nil {\n\t\treturn d.token, nil\n\t}\n\n\tendpoint := fmt.Sprintf(\"https://oapi.dingtalk.com/gettoken?appkey=%s&appsecret=%s\", d.AppKey, d.AppSecret)\n\treq, _ := http.NewRequestWithContext(ctx, http.MethodGet, endpoint, nil)\n\n\tvar token AccessToken\n\tif err := auth2.Request(req, &token); err != nil {\n\t\treturn nil, err\n\t}\n\n\ttoken.createTime = time.Now()\n\treturn token, nil\n}\n\nfunc (d *DingtalkClient) SetAccessToken(token auth2.IAccessToken) {\n\td.token = token\n}\n\nfunc (d *DingtalkClient) BuildURL(callback string, _ bool) string {\n\tv := url.Values{}\n\tv.Set(\"redirect_uri\", callback)\n\tv.Set(\"response_type\", \"code\")\n\tv.Set(\"client_id\", d.AppKey)\n\tv.Set(\"scope\", \"openid\")\n\tv.Set(\"state\", callbackState)\n\tv.Set(\"prompt\", \"consent\")\n\treturn \"https://login.dingtalk.com/oauth2/auth?\" + v.Encode()\n}\n\nfunc (d *DingtalkClient) ValidateCallback(state string) error {\n\tif state != callbackState {\n\t\treturn errors.New(\"auth2.state.wrong\")\n\t}\n\treturn nil\n}\n\nfunc (d *DingtalkClient) getUserAccessToken(ctx context.Context, code string) (UserAccessToken, error) {\n\tval := map[string]string{\n\t\t\"clientId\":     d.AppKey,\n\t\t\"clientSecret\": d.AppSecret,\n\t\t\"code\":         code,\n\t\t\"grantType\":    \"authorization_code\",\n\t}\n\n\tjv, _ := json.Marshal(val)\n\n\tendpoint := \"https://api.dingtalk.com/v1.0/oauth2/userAccessToken\"\n\treq, _ := http.NewRequestWithContext(ctx, http.MethodPost, endpoint, bytes.NewBuffer(jv))\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\n\tvar token UserAccessToken\n\tif err := auth2.Request(req, &token); err != nil {\n\t\treturn token, err\n\t}\n\n\treturn token, nil\n}\n\nfunc (d *DingtalkClient) getUserInfo(ctx context.Context, userToken UserAccessToken, unionId string) (UserInfo, error) {\n\tvar user UserInfo\n\n\tendpoint := fmt.Sprintf(\"https://api.dingtalk.com/v1.0/contact/users/%s\", unionId)\n\treq, _ := http.NewRequestWithContext(ctx, http.MethodGet, endpoint, nil)\n\treq.Header.Set(\"x-acs-dingtalk-access-token\", userToken.AccessToken)\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\n\tif err := auth2.Request(req, &user); err != nil {\n\t\treturn user, err\n\t}\n\treturn user, nil\n}\n\nfunc (d *DingtalkClient) getUserIdByUnion(ctx context.Context, union string) (UserIdByUnion, error) {\n\tvar userId UserIdByUnion\n\ttoken, err := d.GetAccessToken(ctx)\n\tif err != nil {\n\t\treturn userId, err\n\t}\n\tendpoint := fmt.Sprintf(\"https://oapi.dingtalk.com/topapi/user/getbyunionid?access_token=%s\", token.GetToken())\n\tb, _ := json.Marshal(map[string]string{\n\t\t\"unionid\": union,\n\t})\n\treq, _ := http.NewRequestWithContext(ctx, http.MethodPost, endpoint, bytes.NewBuffer(b))\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\n\tif err := auth2.Request(req, &userId); err != nil {\n\t\treturn userId, err\n\t}\n\n\treturn userId, nil\n}\n\nfunc (d *DingtalkClient) GetUserInfo(ctx context.Context, code string) (auth2.UserInfo, error) {\n\tvar info auth2.UserInfo\n\tuserToken, err := d.getUserAccessToken(ctx, code)\n\tif err != nil {\n\t\treturn info, err\n\t}\n\n\tuserInfo, err := d.getUserInfo(ctx, userToken, \"me\")\n\tif err != nil {\n\t\treturn info, err\n\t}\n\n\tuserId, err := d.getUserIdByUnion(ctx, userInfo.UnionId)\n\tif err != nil {\n\t\treturn info, err\n\t}\n\n\tif userId.Result.ContactType > 0 {\n\t\treturn info, errors.New(\"auth2.user.outer\")\n\t}\n\n\tinfo.UserId = userId.Result.UserId\n\tinfo.Mail = userInfo.Email\n\tinfo.Mobile = userInfo.Mobile\n\tinfo.Name = userInfo.NickName\n\tinfo.Avatar = userInfo.Avatar\n\treturn info, nil\n}\n"
  },
  {
    "path": "utils/auth2/wecom/wecom.go",
    "content": "package wecom\n\nimport (\n\t\"bytes\"\n\t\"context\"\n\t\"encoding/json\"\n\t\"errors\"\n\t\"fmt\"\n\t\"github.com/mindoc-org/mindoc/utils/auth2\"\n\t\"net/http\"\n\t\"net/url\"\n\t\"time\"\n)\n\n// doc\n// - 全局错误码: https://work.weixin.qq.com/api/doc/90000/90139/90313\n\nconst (\n\tAppName = \"workwx\"\n\n\tauth2Url      = \"https://open.weixin.qq.com/connect/oauth2/authorize\"\n\tssoUrl        = \"https://login.work.weixin.qq.com/wwlogin/sso/login\"\n\tcallbackState = \"mindoc\"\n)\n\ntype BasicResponse struct {\n\tErrCode int    `json:\"errcode\"`\n\tErrMsg  string `json:\"errmsg\"`\n}\n\nfunc (r *BasicResponse) Error() string {\n\treturn fmt.Sprintf(\"errcode=%d,errmsg=%s\", r.ErrCode, r.ErrMsg)\n}\n\nfunc (r *BasicResponse) AsError() error {\n\tif r == nil {\n\t\treturn nil\n\t}\n\n\tif r.ErrCode != 0 {\n\t\treturn r\n\t}\n\treturn nil\n}\n\n// 获取用户Id-请求响应结构\ntype UserIdResponse struct {\n\t// 接口文档: https://developer.work.weixin.qq.com/document/path/91023\n\t*BasicResponse\n\n\tUserId         string `json:\"userid\"`          // 企业成员UserID\n\tUserTicket     string `json:\"user_ticket\"`     // 用于获取敏感信息\n\tOpenId         string `json:\"openid\"`          // 非企业成员的标识，对当前企业唯一\n\tExternalUserId string `json:\"external_userid\"` // 外部联系人ID\n}\n\n// 获取用户信息-请求响应结构\ntype UserInfoResponse struct {\n\t// 接口文档: https://developer.work.weixin.qq.com/document/path/90196\n\t*BasicResponse\n\n\tUserId         string `json:\"userid\"`            // 企业成员UserID\n\tName           string `json:\"name\"`              // 成员名称\n\tDepartment     []int  `json:\"department\"`        // 成员所属部门id列表\n\tIsLeaderInDept []int  `json:\"is_leader_in_dept\"` // 表示在所在的部门内是否为上级\n\tIsLeader       int    `json:\"isleader\"`          // 是否是部门上级(领导)\n\tAlias          string `json:\"alias\"`             // 别名\n\tStatus         int    `json:\"status\"`            // 激活状态: 1=已激活，2=已禁用，4=未激活，5=退出企业\n\tMainDepartment int    `json:\"main_department\"`   // 主部门\n}\n\ntype UserPrivateInfoResponse struct {\n\t// 文档地址: https://developer.work.weixin.qq.com/document/path/95833\n\t*BasicResponse\n\n\tUserId  string `json:\"userid\"`   // 企业成员userid\n\tGender  string `json:\"gender\"`   // 成员性别\n\tAvatar  string `json:\"avatar\"`   // 头像\n\tQrCode  string `json:\"qr_code\"`  // 二维码\n\tMobile  string `json:\"mobile\"`   // 手机号\n\tMail    string `json:\"mail\"`     // 邮箱\n\tBizMail string `json:\"biz_mail\"` // 企业邮箱\n\tAddress string `json:\"address\"`  // 地址\n}\n\n// 访问凭据缓存-结构\ntype AccessToken struct {\n\t*BasicResponse\n\n\tAccessToken string `json:\"access_token\"`\n\tExpiresIn   int    `json:\"expires_in\"`\n\n\tcreateTime time.Time `json:\"create_time\"`\n}\n\nfunc (a AccessToken) GetToken() string {\n\treturn a.AccessToken\n}\n\nfunc (a AccessToken) GetExpireIn() time.Duration {\n\treturn time.Duration(a.ExpiresIn) * time.Second\n}\n\nfunc (a AccessToken) GetExpireTime() time.Time {\n\treturn a.createTime.Add(a.GetExpireIn())\n}\n\n// 企业微信用户敏感信息-结构\ntype WorkWeixinUserPrivateInfo struct {\n\tUserId  string `json:\"userid\"`   // 企业成员userid\n\tName    string `json:\"name\"`     // 姓名\n\tGender  string `json:\"gender\"`   // 成员性别\n\tAvatar  string `json:\"avatar\"`   // 头像\n\tQrCode  string `json:\"qr_code\"`  // 二维码\n\tMobile  string `json:\"mobile\"`   // 手机号\n\tMail    string `json:\"mail\"`     // 邮箱\n\tBizMail string `json:\"biz_mail\"` // 企业邮箱\n\tAddress string `json:\"address\"`  // 地址\n}\n\n// 企业微信用户信息-结构\ntype WorkWeixinUserInfo struct {\n\tUserId         string `json:\"UserId\"`            // 企业成员UserID\n\tName           string `json:\"name\"`              // 成员名称\n\tHideMobile     int    `json:\"hide_mobile\"`       // 是否隐藏了手机号码\n\tMobile         string `json:\"mobile\"`            // 手机号码\n\tDepartment     []int  `json:\"department\"`        // 成员所属部门id列表\n\tEmail          string `json:\"email\"`             // 邮箱\n\tIsLeaderInDept []int  `json:\"is_leader_in_dept\"` // 表示在所在的部门内是否为上级\n\tIsLeader       int    `json:\"isleader\"`          // 是否是部门上级(领导)\n\tAvatar         string `json:\"avatar\"`            // 头像url\n\tAlias          string `json:\"alias\"`             // 别名\n\tStatus         int    `json:\"status\"`            // 激活状态: 1=已激活，2=已禁用，4=未激活，5=退出企业\n\tMainDepartment int    `json:\"main_department\"`   // 主部门\n}\n\nfunc NewClient(corpId, appId, appSecrete string) auth2.Client {\n\treturn NewWorkWechatClient(corpId, appId, appSecrete)\n}\nfunc NewWorkWechatClient(corpId, appId, appSecrete string) *WorkWechatClient {\n\treturn &WorkWechatClient{\n\t\tCorpId:    corpId,\n\t\tAppId:     appId,\n\t\tAppSecret: appSecrete,\n\t}\n}\n\ntype WorkWechatClient struct {\n\tCorpId    string\n\tAppId     string\n\tAppSecret string\n\n\ttoken auth2.IAccessToken\n}\n\nfunc (c *WorkWechatClient) GetAccessToken(ctx context.Context) (auth2.IAccessToken, error) {\n\tif c.token != nil {\n\t\treturn c.token, nil\n\t}\n\n\tendpoint := fmt.Sprintf(\"https://qyapi.weixin.qq.com/cgi-bin/gettoken?corpid=%s&corpsecret=%s\", c.CorpId, c.AppSecret)\n\treq, _ := http.NewRequestWithContext(ctx, http.MethodGet, endpoint, nil)\n\n\tvar token AccessToken\n\tif err := auth2.Request(req, &token); err != nil {\n\t\treturn token, err\n\t}\n\ttoken.createTime = time.Now()\n\treturn token, nil\n}\n\nfunc (c *WorkWechatClient) SetAccessToken(token auth2.IAccessToken) {\n\tc.token = token\n\treturn\n}\n\nfunc (c *WorkWechatClient) BuildURL(callback string, isAppBrowser bool) string {\n\tvar endpoint string\n\tif isAppBrowser {\n\t\t// 企业微信内-网页授权登录\n\t\turlFmt := \"%s?appid=%s&agentid=%s&redirect_uri=%s&response_type=code&scope=snsapi_privateinfo&state=%s#wechat_redirect\"\n\t\tendpoint = fmt.Sprintf(urlFmt, auth2Url, c.CorpId, c.AppId, url.PathEscape(callback), callbackState)\n\t} else {\n\t\t// 浏览器内-扫码授权登录\n\t\turlFmt := \"%s?login_type=CorpApp&appid=%s&agentid=%s&redirect_uri=%s&state=%s\"\n\t\tendpoint = fmt.Sprintf(urlFmt, ssoUrl, c.CorpId, c.AppId, url.PathEscape(callback), callbackState)\n\t}\n\treturn endpoint\n}\n\nfunc (c *WorkWechatClient) ValidateCallback(state string) error {\n\tif state != callbackState {\n\t\treturn errors.New(\"auth2.state.wrong\")\n\t}\n\treturn nil\n}\n\nfunc (c *WorkWechatClient) getUserId(ctx context.Context, code string) (UserIdResponse, error) {\n\tvar userId UserIdResponse\n\n\ttoken, err := c.GetAccessToken(ctx)\n\tif err != nil {\n\t\treturn userId, err\n\t}\n\tendpoint := fmt.Sprintf(\"https://qyapi.weixin.qq.com/cgi-bin/auth/getuserinfo?access_token=%s&code=%s\", token.GetToken(), code)\n\treq, _ := http.NewRequestWithContext(ctx, http.MethodGet, endpoint, nil)\n\n\tif err := auth2.Request(req, &userId); err != nil {\n\t\treturn userId, err\n\t}\n\n\tif userId.UserId == \"\" {\n\t\treturn userId, errors.New(\"auth2.userid.empty\")\n\t}\n\n\treturn userId, nil\n}\n\nfunc (c *WorkWechatClient) getUserInfo(ctx context.Context, userid string) (UserInfoResponse, error) {\n\tvar userInfo UserInfoResponse\n\ttoken, err := c.GetAccessToken(ctx)\n\tif err != nil {\n\t\treturn userInfo, err\n\t}\n\n\tendpoint := fmt.Sprintf(\"https://qyapi.weixin.qq.com/cgi-bin/user/get?access_token=%s&userid=%s\", token.GetToken(), userid)\n\treq, _ := http.NewRequestWithContext(ctx, http.MethodGet, endpoint, nil)\n\n\tif err := auth2.Request(req, &userInfo); err != nil {\n\t\treturn userInfo, err\n\t}\n\treturn userInfo, nil\n}\n\nfunc (c *WorkWechatClient) getUserPrivateInfo(ctx context.Context, ticket string) (UserPrivateInfoResponse, error) {\n\tvar userInfo UserPrivateInfoResponse\n\n\ttoken, err := c.GetAccessToken(ctx)\n\tif err != nil {\n\t\treturn userInfo, err\n\t}\n\tendpoint := fmt.Sprintf(\"https://qyapi.weixin.qq.com/cgi-bin/auth/getuserdetail?access_token=%s\", token.GetToken())\n\n\tb, _ := json.Marshal(map[string]string{\n\t\t\"user_ticket\": ticket,\n\t})\n\n\treq, _ := http.NewRequestWithContext(ctx, http.MethodPost, endpoint, bytes.NewBuffer(b))\n\n\tif err := auth2.Request(req, &userInfo); err != nil {\n\t\treturn userInfo, err\n\t}\n\treturn userInfo, nil\n}\n\nfunc (c *WorkWechatClient) GetUserInfo(ctx context.Context, code string) (auth2.UserInfo, error) {\n\tvar info auth2.UserInfo\n\n\tuserid, err := c.getUserId(ctx, code)\n\tif err != nil {\n\t\treturn info, err\n\t}\n\n\tuserInfo, err := c.getUserInfo(ctx, userid.UserId)\n\tif err != nil {\n\t\treturn info, err\n\t}\n\n\tinfo.UserId = userInfo.UserId\n\tinfo.Name = userInfo.Name\n\n\tif userid.UserTicket == \"\" {\n\t\treturn info, nil\n\t}\n\n\tprivate, err := c.getUserPrivateInfo(ctx, userid.UserTicket)\n\tif err != nil {\n\t\treturn info, err\n\t}\n\n\tinfo.Mail = private.BizMail\n\tinfo.Avatar = private.Avatar\n\tinfo.Mobile = private.Mobile\n\treturn info, nil\n}\n"
  },
  {
    "path": "utils/cryptil/cryptil.go",
    "content": "package cryptil\n\nimport (\n\t\"crypto/hmac\"\n\t\"crypto/md5\"\n\t\"crypto/sha1\"\n\t\"encoding/base64\"\n\t\"fmt\"\n\t\"strconv\"\n\t\"strings\"\n\t\"time\"\n\t\"io\"\n\t\"crypto/rand\"\n)\n\nvar stdChars = []byte(\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789\")\n\n//对称加密与解密之加密【从Beego中提取出来的】\n//@param            value           需要加密的字符串\n//@param            secret          加密密钥\n//@return           encrypt\t\t\t返回的加密后的字符串\nfunc Encrypt(value, secret string) (encrypt string) {\n\tvs := base64.URLEncoding.EncodeToString([]byte(value))\n\ttimestamp := strconv.FormatInt(time.Now().UnixNano(), 10)\n\th := hmac.New(sha1.New, []byte(secret))\n\tfmt.Fprintf(h, \"%s%s\", vs, timestamp)\n\tsig := fmt.Sprintf(\"%02x\", h.Sum(nil))\n\treturn strings.Join([]string{vs, timestamp, sig}, \".\")\n}\n\n//对称加密与解密之解密【从Beego中提取出来的】\n//@param            value           需要解密的字符串\n//@param            secret          密钥\n//@return           decrypt\t\t\t返回解密后的字符串\nfunc Decrypt(value, secret string) (decrypt string) {\n\tparts := strings.SplitN(value, \".\", 3)\n\tif len(parts) != 3 {\n\t\treturn \"\"\n\t}\n\tvs := parts[0]\n\ttimestamp := parts[1]\n\tsig := parts[2]\n\th := hmac.New(sha1.New, []byte(secret))\n\tfmt.Fprintf(h, \"%s%s\", vs, timestamp)\n\tif fmt.Sprintf(\"%02x\", h.Sum(nil)) != sig {\n\t\treturn \"\"\n\t}\n\tres, _ := base64.URLEncoding.DecodeString(vs)\n\treturn string(res)\n}\n\n//MD5加密\n//@param\t\t\tstr\t\t\t需要加密的字符串\n//@param\t\t\tsalt\t\t盐值\n//@return\t\t\tCryptStr\t加密后返回的字符串\nfunc Md5Crypt(str string, salt ...interface{}) (CryptStr string) {\n\tif l := len(salt); l > 0 {\n\t\tslice := make([]string, l+1)\n\t\tstr = fmt.Sprintf(str+strings.Join(slice, \"%v\"), salt...)\n\t}\n\treturn fmt.Sprintf(\"%x\", md5.Sum([]byte(str)))\n}\n\n//SHA1加密\n//@param\t\t\tstr\t\t\t需要加密的字符串\n//@param\t\t\tsalt\t\t盐值\n//@return\t\t\tCryptStr\t加密后返回的字符串\nfunc Sha1Crypt(str string, salt ...interface{}) (CryptStr string) {\n\tif l := len(salt); l > 0 {\n\t\tslice := make([]string, l+1)\n\t\tstr = fmt.Sprintf(str+strings.Join(slice, \"%v\"), salt...)\n\t}\n\treturn fmt.Sprintf(\"%x\", sha1.Sum([]byte(str)))\n}\n\n//生成Guid字串\nfunc UniqueId() string {\n\tb := make([]byte, 48)\n\n\tif _, err := io.ReadFull(rand.Reader, b); err != nil {\n\t\treturn \"\"\n\t}\n\treturn Md5Crypt(base64.URLEncoding.EncodeToString(b))\n}\n\n//生成指定长度的字符串.\nfunc NewRandChars(length int) string {\n\tif length == 0 {\n\t\treturn \"\"\n\t}\n\tclen := len(stdChars)\n\tif clen < 2 || clen > 256 {\n\t\tpanic(\"Wrong charset length for NewLenChars()\")\n\t}\n\tmaxrb := 255 - (256 % clen)\n\tb := make([]byte, length)\n\tr := make([]byte, length+(length/4)) // storage for random bytes.\n\ti := 0\n\tfor {\n\t\tif _, err := rand.Read(r); err != nil {\n\t\t\tpanic(\"Error reading random bytes: \" + err.Error())\n\t\t}\n\t\tfor _, rb := range r {\n\t\t\tc := int(rb)\n\t\t\tif c > maxrb {\n\t\t\t\tcontinue // Skip this number to avoid modulo bias.\n\t\t\t}\n\t\t\tb[i] = stdChars[c%clen]\n\t\t\ti++\n\t\t\tif i == length {\n\t\t\t\treturn string(b)\n\t\t\t}\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "utils/dingtalk/dingtalk.go",
    "content": "package dingtalk\n\nimport (\n\t\"crypto/hmac\"\n\t\"crypto/sha256\"\n\t\"encoding/base64\"\n\t\"encoding/json\"\n\t\"errors\"\n\t\"fmt\"\n\t\"io/ioutil\"\n\t\"net/http\"\n\t\"net/url\"\n\t\"strconv\"\n\t\"strings\"\n\t\"time\"\n)\n\n// DingTalkAgent 用于钉钉交互\ntype DingTalkAgent struct {\n\tAppSecret   string\n\tAppKey      string\n\tAccessToken string\n}\n\n// NewDingTalkAgent 钉钉交互构造函数\nfunc NewDingTalkAgent(appSecret, appKey string) *DingTalkAgent {\n\treturn &DingTalkAgent{\n\t\tAppSecret: appSecret,\n\t\tAppKey:    appKey,\n\t}\n}\n\n// GetUserIDByCode 通过临时code获取当前用户ID\nfunc (d *DingTalkAgent) GetUserIDByCode(code string) (string, error) {\n\turlEndpoint, err := url.Parse(\"https://oapi.dingtalk.com/user/getuserinfo\")\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\n\tquery := url.Values{}\n\tquery.Set(\"access_token\", d.AccessToken)\n\tquery.Set(\"code\", code)\n\n\turlEndpoint.RawQuery = query.Encode()\n\turlPath := urlEndpoint.String()\n\n\tresp, err := http.Get(urlPath)\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\tbody, err := ioutil.ReadAll(resp.Body)\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\n\t// 解析钉钉返回数据\n\tvar rdata map[string]interface{}\n\terr = json.Unmarshal(body, &rdata)\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\n\terrcode := rdata[\"errcode\"].(float64)\n\tif errcode != 0 {\n\t\treturn \"\", fmt.Errorf(\"登录错误: %.0f, %s\", errcode, rdata[\"errmsg\"].(string))\n\t}\n\n\tuserid := rdata[\"userid\"].(string)\n\treturn userid, nil\n}\n\n// GetUserNameAndAvatarByUserID 通过userid获取当前用户姓名和头像\nfunc (d *DingTalkAgent) GetUserNameAndAvatarByUserID(userid string) (string, string, error) {\n\turlEndpoint, err := url.Parse(\"https://oapi.dingtalk.com/topapi/v2/user/get\")\n\tif err != nil {\n\t\treturn \"\", \"\", err\n\t}\n\n\tquery := url.Values{}\n\tquery.Set(\"access_token\", d.AccessToken)\n\n\turlEndpoint.RawQuery = query.Encode()\n\turlPath := urlEndpoint.String()\n\n\tresp, err := http.PostForm(urlPath, url.Values{\"userid\": {userid}})\n\tif err != nil {\n\t\treturn \"\", \"\", err\n\t}\n\tbody, err := ioutil.ReadAll(resp.Body)\n\tif err != nil {\n\t\treturn \"\", \"\", err\n\t}\n\n\t// 解析钉钉返回数据\n\tvar rdata map[string]interface{}\n\terr = json.Unmarshal(body, &rdata)\n\tif err != nil {\n\t\treturn \"\", \"\", err\n\t}\n\n\terrcode := rdata[\"errcode\"].(float64)\n\tif errcode != 0 {\n\t\treturn \"\", \"\", fmt.Errorf(\"登录错误: %.0f, %s\", errcode, rdata[\"errmsg\"].(string))\n\t}\n\n\tuserinfo := rdata[\"result\"].(map[string]interface{})\n\tusername := userinfo[\"name\"].(string)\n\tavatar := userinfo[\"avatar\"].(string)\n\treturn username, avatar, nil\n}\n\n// GetUserIDByUnionID 根据UnionID获取用户Userid\nfunc (d *DingTalkAgent) GetUserIDByUnionID(unionid string) (string, error) {\n\turlEndpoint, err := url.Parse(\"https://oapi.dingtalk.com/topapi/user/getbyunionid\")\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\n\tquery := url.Values{}\n\tquery.Set(\"access_token\", d.AccessToken)\n\turlEndpoint.RawQuery = query.Encode()\n\turlPath := urlEndpoint.String()\n\n\tresp, err := http.PostForm(urlPath, url.Values{\"unionid\": {unionid}})\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\tbody, err := ioutil.ReadAll(resp.Body)\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\t// 解析钉钉返回数据\n\tvar rdata map[string]interface{}\n\terr = json.Unmarshal(body, &rdata)\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\n\terrcode := rdata[\"errcode\"].(float64)\n\tif errcode != 0 {\n\t\treturn \"\", fmt.Errorf(\"登录错误: %.0f, %s\", errcode, rdata[\"errmsg\"].(string))\n\t}\n\n\tresult := rdata[\"result\"].(map[string]interface{})\n\tif result[\"contact_type\"].(float64) != 0 {\n\t\treturn \"\", errors.New(\"该用户不属于企业内部员工，无法登录。\")\n\t}\n\tuserid := result[\"userid\"].(string)\n\treturn userid, nil\n}\n\n// GetAccesstoken 获取钉钉请求Token\nfunc (d *DingTalkAgent) GetAccesstoken() (err error) {\n\n\turl := fmt.Sprintf(\"https://oapi.dingtalk.com/gettoken?appkey=%s&appsecret=%s\", d.AppKey, d.AppSecret)\n\tresp, err := http.Get(url)\n\tif err != nil {\n\t\treturn err\n\t}\n\tbody, err := ioutil.ReadAll(resp.Body)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tvar i map[string]interface{}\n\terr = json.Unmarshal(body, &i)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tif i[\"errcode\"].(float64) == 0 {\n\t\td.AccessToken = i[\"access_token\"].(string)\n\t\treturn nil\n\t}\n\treturn errors.New(\"accesstoken获取错误：\" + i[\"errmsg\"].(string))\n}\n\n// DingtalkQRLogin 用于钉钉扫码登录\ntype DingtalkQRLogin struct {\n\tAppSecret string\n\tAppKey    string\n}\n\n// NewDingtalkQRLogin 构造钉钉扫码登录实例\nfunc NewDingtalkQRLogin(appSecret, appKey string) DingtalkQRLogin {\n\treturn DingtalkQRLogin{\n\t\tAppSecret: appSecret,\n\t\tAppKey:    appKey,\n\t}\n}\n\n// GetUnionIDByCode 获取扫码用户UnionID\nfunc (d *DingtalkQRLogin) GetUnionIDByCode(code string) (userid string, err error) {\n\tvar resp *http.Response\n\t//服务端通过临时授权码获取授权用户的个人信息\n\ttimestamp := strconv.FormatInt(time.Now().UnixNano()/1000000, 10) // 毫秒时间戳\n\tsignature := d.encodeSHA256(timestamp)                            // 加密签名\n\turlPath := fmt.Sprintf(\n\t\t\"https://oapi.dingtalk.com/sns/getuserinfo_bycode?accessKey=%s&timestamp=%s&signature=%s\",\n\t\td.AppKey, timestamp, signature)\n\n\t// 构造请求数据\n\tparam := struct {\n\t\tTmp_auth_code string `json:\"tmp_auth_code\"`\n\t}{code}\n\tparaByte, _ := json.Marshal(param)\n\tparaString := string(paraByte)\n\n\tresp, err = http.Post(urlPath, \"application/json;charset=UTF-8\", strings.NewReader(paraString))\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\n\tbody, err := ioutil.ReadAll(resp.Body)\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\n\t// 解析钉钉返回数据\n\tvar rdata map[string]interface{}\n\terr = json.Unmarshal(body, &rdata)\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\terrcode := rdata[\"errcode\"].(float64)\n\tif errcode != 0 {\n\t\treturn \"\", fmt.Errorf(\"登录错误: %.0f, %s\", errcode, rdata[\"errmsg\"].(string))\n\t}\n\tunionid := rdata[\"user_info\"].(map[string]interface{})[\"unionid\"].(string)\n\treturn unionid, nil\n}\n\nfunc (d *DingtalkQRLogin) encodeSHA256(timestamp string) string {\n\t// 钉钉签名算法实现\n\th := hmac.New(sha256.New, []byte(d.AppSecret))\n\th.Write([]byte(timestamp))\n\tsum := h.Sum(nil) // 二进制流\n\ttmpMsg := base64.StdEncoding.EncodeToString(sum)\n\n\tuv := url.Values{}\n\tuv.Add(\"0\", tmpMsg)\n\tmessage := uv.Encode()[2:]\n\n\treturn message\n}\n"
  },
  {
    "path": "utils/docx2md.go",
    "content": "// https://github.com/mattn/docx2md\n// License MIT\npackage utils\n\nimport (\n\t\"archive/zip\"\n\t\"bytes\"\n\t\"encoding/base64\"\n\t\"encoding/xml\"\n\t\"errors\"\n\t_ \"flag\"\n\t\"fmt\"\n\t\"io\"\n\t\"io/ioutil\"\n\t\"log\"\n\t\"os\"\n\t\"path\"\n\t\"path/filepath\"\n\t_ \"runtime\"\n\t\"strconv\"\n\t\"strings\"\n\n\t\"github.com/mattn/go-runewidth\"\n)\n\n// Relationship is\ntype Relationship struct {\n\tText       string `xml:\",chardata\"`\n\tID         string `xml:\"Id,attr\"`\n\tType       string `xml:\"Type,attr\"`\n\tTarget     string `xml:\"Target,attr\"`\n\tTargetMode string `xml:\"TargetMode,attr\"`\n}\n\n// Relationships is\ntype Relationships struct {\n\tXMLName      xml.Name       `xml:\"Relationships\"`\n\tText         string         `xml:\",chardata\"`\n\tXmlns        string         `xml:\"xmlns,attr\"`\n\tRelationship []Relationship `xml:\"Relationship\"`\n}\n\n// TextVal is\ntype TextVal struct {\n\tText string `xml:\",chardata\"`\n\tVal  string `xml:\"val,attr\"`\n}\n\n// NumberingLvl is\ntype NumberingLvl struct {\n\tText      string  `xml:\",chardata\"`\n\tIlvl      string  `xml:\"ilvl,attr\"`\n\tTplc      string  `xml:\"tplc,attr\"`\n\tTentative string  `xml:\"tentative,attr\"`\n\tStart     TextVal `xml:\"start\"`\n\tNumFmt    TextVal `xml:\"numFmt\"`\n\tLvlText   TextVal `xml:\"lvlText\"`\n\tLvlJc     TextVal `xml:\"lvlJc\"`\n\tPPr       struct {\n\t\tText string `xml:\",chardata\"`\n\t\tInd  struct {\n\t\t\tText    string `xml:\",chardata\"`\n\t\t\tLeft    string `xml:\"left,attr\"`\n\t\t\tHanging string `xml:\"hanging,attr\"`\n\t\t} `xml:\"ind\"`\n\t} `xml:\"pPr\"`\n\tRPr struct {\n\t\tText string `xml:\",chardata\"`\n\t\tU    struct {\n\t\t\tText string `xml:\",chardata\"`\n\t\t\tVal  string `xml:\"val,attr\"`\n\t\t} `xml:\"u\"`\n\t\tRFonts struct {\n\t\t\tText string `xml:\",chardata\"`\n\t\t\tHint string `xml:\"hint,attr\"`\n\t\t} `xml:\"rFonts\"`\n\t} `xml:\"rPr\"`\n}\n\n// Numbering is\ntype Numbering struct {\n\tXMLName     xml.Name `xml:\"numbering\"`\n\tText        string   `xml:\",chardata\"`\n\tWpc         string   `xml:\"wpc,attr\"`\n\tCx          string   `xml:\"cx,attr\"`\n\tCx1         string   `xml:\"cx1,attr\"`\n\tMc          string   `xml:\"mc,attr\"`\n\tO           string   `xml:\"o,attr\"`\n\tR           string   `xml:\"r,attr\"`\n\tM           string   `xml:\"m,attr\"`\n\tV           string   `xml:\"v,attr\"`\n\tWp14        string   `xml:\"wp14,attr\"`\n\tWp          string   `xml:\"wp,attr\"`\n\tW10         string   `xml:\"w10,attr\"`\n\tW           string   `xml:\"w,attr\"`\n\tW14         string   `xml:\"w14,attr\"`\n\tW15         string   `xml:\"w15,attr\"`\n\tW16se       string   `xml:\"w16se,attr\"`\n\tWpg         string   `xml:\"wpg,attr\"`\n\tWpi         string   `xml:\"wpi,attr\"`\n\tWne         string   `xml:\"wne,attr\"`\n\tWps         string   `xml:\"wps,attr\"`\n\tIgnorable   string   `xml:\"Ignorable,attr\"`\n\tAbstractNum []struct {\n\t\tText                       string         `xml:\",chardata\"`\n\t\tAbstractNumID              string         `xml:\"abstractNumId,attr\"`\n\t\tRestartNumberingAfterBreak string         `xml:\"restartNumberingAfterBreak,attr\"`\n\t\tNsid                       TextVal        `xml:\"nsid\"`\n\t\tMultiLevelType             TextVal        `xml:\"multiLevelType\"`\n\t\tTmpl                       TextVal        `xml:\"tmpl\"`\n\t\tLvl                        []NumberingLvl `xml:\"lvl\"`\n\t} `xml:\"abstractNum\"`\n\tNum []struct {\n\t\tText          string  `xml:\",chardata\"`\n\t\tNumID         string  `xml:\"numId,attr\"`\n\t\tAbstractNumID TextVal `xml:\"abstractNumId\"`\n\t} `xml:\"num\"`\n}\n\ntype file struct {\n\trels  Relationships\n\tnum   Numbering\n\tr     *zip.ReadCloser\n\tembed bool\n\tlist  map[string]int\n\tname  string\n}\n\n// Node is\ntype Node struct {\n\tXMLName xml.Name\n\tAttrs   []xml.Attr `xml:\"-\"`\n\tContent []byte     `xml:\",innerxml\"`\n\tNodes   []Node     `xml:\",any\"`\n}\n\n// UnmarshalXML is\nfunc (n *Node) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {\n\tn.Attrs = start.Attr\n\ttype node Node\n\n\treturn d.DecodeElement((*node)(n), &start)\n}\n\nfunc escape(s, set string) string {\n\treplacer := []string{}\n\tfor _, r := range []rune(set) {\n\t\trs := string(r)\n\t\treplacer = append(replacer, rs, `\\`+rs)\n\t}\n\treturn strings.NewReplacer(replacer...).Replace(s)\n}\n\nfunc (zf *file) extract(rel *Relationship, w io.Writer) error {\n\terr := os.MkdirAll(\n\t\tfilepath.Join(\"uploads\",\n\t\t\tstrings.TrimSuffix(zf.name, \".docx\"),\n\t\t\tfilepath.Dir(rel.Target)),\n\t\t0755)\n\tif err != nil {\n\t\treturn err\n\t}\n\tfor _, f := range zf.r.File {\n\t\tif f.Name != \"word/\"+rel.Target {\n\t\t\tcontinue\n\t\t}\n\t\trc, err := f.Open()\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tdefer rc.Close()\n\n\t\tb := make([]byte, f.UncompressedSize64)\n\t\tn, err := rc.Read(b)\n\t\tif err != nil && err != io.EOF {\n\t\t\treturn err\n\t\t}\n\t\tif zf.embed {\n\t\t\tfmt.Fprintf(w, \"![](data:image/png;base64,%s)\",\n\t\t\t\tbase64.StdEncoding.EncodeToString(b[:n]))\n\t\t} else {\n\t\t\terr = ioutil.WriteFile(\n\t\t\t\tfilepath.Join(\"uploads\",\n\t\t\t\t\tstrings.TrimSuffix(zf.name, \".docx\"),\n\t\t\t\t\trel.Target),\n\t\t\t\tb, 0644)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\tfmt.Fprintf(w, \"![](%s)\", \"/\"+filepath.Join(\n\t\t\t\t\"uploads\",\n\t\t\t\tstrings.TrimSuffix(zf.name, \".docx\"),\n\t\t\t\tescape(rel.Target, \"()\")))\n\t\t}\n\t\tbreak\n\t}\n\treturn nil\n}\n\nfunc attr(attrs []xml.Attr, name string) (string, bool) {\n\tfor _, attr := range attrs {\n\t\tif attr.Name.Local == name {\n\t\t\treturn attr.Value, true\n\t\t}\n\t}\n\treturn \"\", false\n}\n\nfunc (zf *file) walk(node *Node, w io.Writer) error {\n\tswitch node.XMLName.Local {\n\tcase \"hyperlink\":\n\t\tfmt.Fprint(w, \"[\")\n\t\tvar cbuf bytes.Buffer\n\t\tfor _, n := range node.Nodes {\n\t\t\tif err := zf.walk(&n, &cbuf); err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t}\n\t\tfmt.Fprint(w, escape(cbuf.String(), \"[]\"))\n\t\tfmt.Fprint(w, \"]\")\n\n\t\tfmt.Fprint(w, \"(\")\n\t\tif id, ok := attr(node.Attrs, \"id\"); ok {\n\t\t\tfor _, rel := range zf.rels.Relationship {\n\t\t\t\tif id == rel.ID {\n\t\t\t\t\tfmt.Fprint(w, escape(rel.Target, \"()\"))\n\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tfmt.Fprint(w, \")\")\n\tcase \"t\":\n\t\tfmt.Fprint(w, string(node.Content))\n\tcase \"pPr\":\n\t\tcode := false\n\t\tfor _, n := range node.Nodes {\n\t\t\tswitch n.XMLName.Local {\n\t\t\tcase \"ind\":\n\t\t\t\tif left, ok := attr(n.Attrs, \"left\"); ok {\n\t\t\t\t\tif i, err := strconv.Atoi(left); err == nil && i > 0 {\n\t\t\t\t\t\tfmt.Fprint(w, strings.Repeat(\"  \", i/360))\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\tcase \"pStyle\":\n\t\t\t\tif val, ok := attr(n.Attrs, \"val\"); ok {\n\t\t\t\t\tif strings.HasPrefix(val, \"Heading\") {\n\t\t\t\t\t\tif i, err := strconv.Atoi(val[7:]); err == nil && i > 0 {\n\t\t\t\t\t\t\tfmt.Fprint(w, strings.Repeat(\"#\", i)+\" \")\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if val == \"Code\" {\n\t\t\t\t\t\tcode = true\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif i, err := strconv.Atoi(val); err == nil && i > 0 {\n\t\t\t\t\t\t\tfmt.Fprint(w, strings.Repeat(\"#\", i)+\" \")\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\tcase \"numPr\":\n\t\t\t\tnumID := \"\"\n\t\t\t\tilvl := \"\"\n\t\t\t\tnumFmt := \"\"\n\t\t\t\tstart := 1\n\t\t\t\tind := 0\n\t\t\t\tfor _, nn := range n.Nodes {\n\t\t\t\t\tif nn.XMLName.Local == \"numId\" {\n\t\t\t\t\t\tif val, ok := attr(nn.Attrs, \"val\"); ok {\n\t\t\t\t\t\t\tnumID = val\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif nn.XMLName.Local == \"ilvl\" {\n\t\t\t\t\t\tif val, ok := attr(nn.Attrs, \"val\"); ok {\n\t\t\t\t\t\t\tilvl = val\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tfor _, num := range zf.num.Num {\n\t\t\t\t\tif numID != num.NumID {\n\t\t\t\t\t\tcontinue\n\t\t\t\t\t}\n\t\t\t\t\tfor _, abnum := range zf.num.AbstractNum {\n\t\t\t\t\t\tif abnum.AbstractNumID != num.AbstractNumID.Val {\n\t\t\t\t\t\t\tcontinue\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfor _, ablvl := range abnum.Lvl {\n\t\t\t\t\t\t\tif ablvl.Ilvl != ilvl {\n\t\t\t\t\t\t\t\tcontinue\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif i, err := strconv.Atoi(ablvl.Start.Val); err == nil {\n\t\t\t\t\t\t\t\tstart = i\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif i, err := strconv.Atoi(ablvl.PPr.Ind.Left); err == nil {\n\t\t\t\t\t\t\t\tind = i / 360\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tnumFmt = ablvl.NumFmt.Val\n\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak\n\t\t\t\t\t}\n\t\t\t\t\tbreak\n\t\t\t\t}\n\n\t\t\t\tfmt.Fprint(w, strings.Repeat(\"  \", ind))\n\t\t\t\tswitch numFmt {\n\t\t\t\tcase \"decimal\", \"aiueoFullWidth\":\n\t\t\t\t\tkey := fmt.Sprintf(\"%s:%d\", numID, ind)\n\t\t\t\t\tcur, ok := zf.list[key]\n\t\t\t\t\tif !ok {\n\t\t\t\t\t\tzf.list[key] = start\n\t\t\t\t\t} else {\n\t\t\t\t\t\tzf.list[key] = cur + 1\n\t\t\t\t\t}\n\t\t\t\t\tfmt.Fprintf(w, \"%d. \", zf.list[key])\n\t\t\t\tcase \"bullet\":\n\t\t\t\t\tfmt.Fprint(w, \"* \")\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif code {\n\t\t\tfmt.Fprint(w, \"`\")\n\t\t}\n\t\tfor _, n := range node.Nodes {\n\t\t\tif err := zf.walk(&n, w); err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t}\n\t\tif code {\n\t\t\tfmt.Fprint(w, \"`\")\n\t\t}\n\tcase \"tbl\":\n\t\tvar rows [][]string\n\t\tfor _, tr := range node.Nodes {\n\t\t\tif tr.XMLName.Local != \"tr\" {\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tvar cols []string\n\t\t\tfor _, tc := range tr.Nodes {\n\t\t\t\tif tc.XMLName.Local != \"tc\" {\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\t\t\t\tvar cbuf bytes.Buffer\n\t\t\t\tif err := zf.walk(&tc, &cbuf); err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t\tcols = append(cols, strings.Replace(cbuf.String(), \"\\n\", \"\", -1))\n\t\t\t}\n\t\t\trows = append(rows, cols)\n\t\t}\n\t\tmaxcol := 0\n\t\tfor _, cols := range rows {\n\t\t\tif len(cols) > maxcol {\n\t\t\t\tmaxcol = len(cols)\n\t\t\t}\n\t\t}\n\t\twidths := make([]int, maxcol)\n\t\tfor _, row := range rows {\n\t\t\tfor i := 0; i < maxcol; i++ {\n\t\t\t\tif i < len(row) {\n\t\t\t\t\twidth := runewidth.StringWidth(row[i])\n\t\t\t\t\tif widths[i] < width {\n\t\t\t\t\t\twidths[i] = width\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tfor i, row := range rows {\n\t\t\tif i == 0 {\n\t\t\t\tfor j := 0; j < maxcol; j++ {\n\t\t\t\t\tfmt.Fprint(w, \"|\")\n\t\t\t\t\tfmt.Fprint(w, strings.Repeat(\" \", widths[j]))\n\t\t\t\t}\n\t\t\t\tfmt.Fprint(w, \"|\\n\")\n\t\t\t\tfor j := 0; j < maxcol; j++ {\n\t\t\t\t\tfmt.Fprint(w, \"|\")\n\t\t\t\t\tfmt.Fprint(w, strings.Repeat(\"-\", widths[j]))\n\t\t\t\t}\n\t\t\t\tfmt.Fprint(w, \"|\\n\")\n\t\t\t}\n\t\t\tfor j := 0; j < maxcol; j++ {\n\t\t\t\tfmt.Fprint(w, \"|\")\n\t\t\t\tif j < len(row) {\n\t\t\t\t\twidth := runewidth.StringWidth(row[j])\n\t\t\t\t\tfmt.Fprint(w, escape(row[j], \"|\"))\n\t\t\t\t\tfmt.Fprint(w, strings.Repeat(\" \", widths[j]-width))\n\t\t\t\t} else {\n\t\t\t\t\tfmt.Fprint(w, strings.Repeat(\" \", widths[j]))\n\t\t\t\t}\n\t\t\t}\n\t\t\tfmt.Fprint(w, \"|\\n\")\n\t\t}\n\t\tfmt.Fprint(w, \"\\n\")\n\tcase \"r\":\n\t\tbold := false\n\t\titalic := false\n\t\tstrike := false\n\t\tfor _, n := range node.Nodes {\n\t\t\tif n.XMLName.Local != \"rPr\" {\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tfor _, nn := range n.Nodes {\n\t\t\t\tswitch nn.XMLName.Local {\n\t\t\t\tcase \"b\":\n\t\t\t\t\tbold = true\n\t\t\t\tcase \"i\":\n\t\t\t\t\titalic = true\n\t\t\t\tcase \"strike\":\n\t\t\t\t\tstrike = true\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif strike {\n\t\t\tfmt.Fprint(w, \"~~\")\n\t\t}\n\t\tif bold {\n\t\t\tfmt.Fprint(w, \"**\")\n\t\t}\n\t\tif italic {\n\t\t\tfmt.Fprint(w, \"*\")\n\t\t}\n\t\tvar cbuf bytes.Buffer\n\t\tfor _, n := range node.Nodes {\n\t\t\tif err := zf.walk(&n, &cbuf); err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t}\n\t\tfmt.Fprint(w, escape(cbuf.String(), `*~\\`))\n\t\tif italic {\n\t\t\tfmt.Fprint(w, \"*\")\n\t\t}\n\t\tif bold {\n\t\t\tfmt.Fprint(w, \"**\")\n\t\t}\n\t\tif strike {\n\t\t\tfmt.Fprint(w, \"~~\")\n\t\t}\n\tcase \"p\":\n\t\tfor _, n := range node.Nodes {\n\t\t\tif err := zf.walk(&n, w); err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t}\n\t\tfmt.Fprintln(w)\n\tcase \"blip\":\n\t\tif id, ok := attr(node.Attrs, \"embed\"); ok {\n\t\t\tfor _, rel := range zf.rels.Relationship {\n\t\t\t\tif id != rel.ID {\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\t\t\t\tif err := zf.extract(&rel, w); err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\tcase \"Fallback\":\n\tcase \"txbxContent\":\n\t\tvar cbuf bytes.Buffer\n\t\tfor _, n := range node.Nodes {\n\t\t\tif err := zf.walk(&n, &cbuf); err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t}\n\t\tfmt.Fprintln(w, \"\\n```\\n\"+cbuf.String()+\"```\")\n\tdefault:\n\t\tfor _, n := range node.Nodes {\n\t\t\tif err := zf.walk(&n, w); err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t}\n\t}\n\n\treturn nil\n}\n\nfunc readFile(f *zip.File) (*Node, error) {\n\trc, err := f.Open()\n\tdefer rc.Close()\n\n\tb, _ := ioutil.ReadAll(rc)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tvar node Node\n\terr = xml.Unmarshal(b, &node)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn &node, nil\n}\n\nfunc findFile(files []*zip.File, target string) *zip.File {\n\tfor _, f := range files {\n\t\tif ok, _ := path.Match(target, f.Name); ok {\n\t\t\treturn f\n\t\t}\n\t}\n\treturn nil\n}\n\nfunc Docx2md(arg string, embed bool) (string, error) {\n\tr, err := zip.OpenReader(arg)\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\tdefer r.Close()\n\n\tvar rels Relationships\n\tvar num Numbering\n\n\tfor _, f := range r.File {\n\t\tswitch f.Name {\n\t\tcase \"word/_rels/document.xml.rels\":\n\t\t\trc, err := f.Open()\n\t\t\tdefer rc.Close()\n\n\t\t\tb, _ := ioutil.ReadAll(rc)\n\t\t\tif err != nil {\n\t\t\t\treturn \"\", err\n\t\t\t}\n\n\t\t\terr = xml.Unmarshal(b, &rels)\n\t\t\tif err != nil {\n\t\t\t\treturn \"\", err\n\t\t\t}\n\t\tcase \"word/numbering.xml\":\n\t\t\trc, err := f.Open()\n\t\t\tdefer rc.Close()\n\n\t\t\tb, _ := ioutil.ReadAll(rc)\n\t\t\tif err != nil {\n\t\t\t\treturn \"\", err\n\t\t\t}\n\n\t\t\terr = xml.Unmarshal(b, &num)\n\t\t\tif err != nil {\n\t\t\t\treturn \"\", err\n\t\t\t}\n\t\t}\n\t}\n\n\tf := findFile(r.File, \"word/document*.xml\")\n\tif f == nil {\n\t\treturn \"\", errors.New(\"incorrect document\")\n\t}\n\tnode, err := readFile(f)\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\n\tfileNames := strings.Split(arg, \"/\")\n\tfileName := fileNames[len(fileNames)-1]\n\t// make sure the file name\n\tif !strings.HasSuffix(fileName, \".docx\") {\n\t\tlog.Fatal(\"File name must end with .docx\")\n\t}\n\n\tvar buf bytes.Buffer\n\tzf := &file{\n\t\tr:     r,\n\t\trels:  rels,\n\t\tnum:   num,\n\t\tembed: embed,\n\t\tlist:  make(map[string]int),\n\t\tname:  fileName,\n\t}\n\terr = zf.walk(node, &buf)\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\n\treturn buf.String(), nil\n}\n"
  },
  {
    "path": "utils/filetil/filetil.go",
    "content": "package filetil\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"io\"\n\t\"io/ioutil\"\n\t\"math\"\n\t\"os\"\n\t\"path/filepath\"\n\t\"strings\"\n)\n\n//==================================\n//更多文件和目录的操作，使用filepath包和os包\n//==================================\n\ntype FileTypeStrategy interface {\n\tGetFilePath(filePath, fileName, ext string) string\n}\n\ntype ImageStrategy struct{}\n\nfunc (i ImageStrategy) GetFilePath(filePath, fileName, ext string) string {\n\treturn filepath.Join(filePath, \"images\", fileName+ext)\n}\n\ntype VideoStrategy struct{}\n\nfunc (v VideoStrategy) GetFilePath(filePath, fileName, ext string) string {\n\treturn filepath.Join(filePath, \"videos\", fileName+ext)\n}\n\ntype DefaultStrategy struct{}\n\nfunc (d DefaultStrategy) GetFilePath(filePath, fileName, ext string) string {\n\treturn filepath.Join(filePath, \"files\", fileName+ext)\n}\n\n// 返回的目录扫描结果\ntype FileList struct {\n\tIsDir   bool   //是否是目录\n\tPath    string //文件路径\n\tExt     string //文件扩展名\n\tName    string //文件名\n\tSize    int64  //文件大小\n\tModTime int64  //文件修改时间戳\n}\n\n// 目录扫描\n// @param\t\t\tdir\t\t\t需要扫描的目录\n// @return\t\t\tfl\t\t\t文件列表\n// @return\t\t\terr\t\t\t错误\nfunc ScanFiles(dir string) (fl []FileList, err error) {\n\terr = filepath.Walk(dir, func(path string, info os.FileInfo, err error) error {\n\t\tif err == nil {\n\t\t\tpath = strings.Replace(path, \"\\\\\", \"/\", -1) //文件路径处理\n\t\t\tfl = append(fl, FileList{\n\t\t\t\tIsDir:   info.IsDir(),\n\t\t\t\tPath:    path,\n\t\t\t\tExt:     strings.ToLower(filepath.Ext(path)),\n\t\t\t\tName:    info.Name(),\n\t\t\t\tSize:    info.Size(),\n\t\t\t\tModTime: info.ModTime().Unix(),\n\t\t\t})\n\t\t}\n\t\treturn err\n\t})\n\treturn\n}\n\n// 拷贝文件\nfunc CopyFile(source string, dst string) (err error) {\n\tsourceFile, err := os.Open(source)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tdefer sourceFile.Close()\n\n\t_, err = os.Stat(filepath.Dir(dst))\n\n\tif err != nil {\n\t\tif os.IsNotExist(err) {\n\t\t\tos.MkdirAll(filepath.Dir(dst), 0766)\n\t\t} else {\n\t\t\treturn err\n\t\t}\n\t}\n\n\tdestFile, err := os.Create(dst)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tdefer destFile.Close()\n\n\t_, err = io.Copy(destFile, sourceFile)\n\tif err == nil {\n\t\tsourceInfo, err := os.Stat(source)\n\t\tif err != nil {\n\t\t\terr = os.Chmod(dst, sourceInfo.Mode())\n\t\t}\n\n\t}\n\n\treturn\n}\n\n// 拷贝目录\nfunc CopyDir(source string, dest string) (err error) {\n\n\t// get properties of source dir\n\tsourceInfo, err := os.Stat(source)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\t// create dest dir\n\terr = os.MkdirAll(dest, sourceInfo.Mode())\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tdirectory, _ := os.Open(source)\n\n\tobjects, err := directory.Readdir(-1)\n\n\tfor _, obj := range objects {\n\n\t\tsourceFilePointer := filepath.Join(source, obj.Name())\n\n\t\tdestinationFilePointer := filepath.Join(dest, obj.Name())\n\n\t\tif obj.IsDir() {\n\t\t\t// create sub-directories - recursively\n\t\t\terr = CopyDir(sourceFilePointer, destinationFilePointer)\n\t\t\tif err != nil {\n\t\t\t\tfmt.Println(err)\n\t\t\t}\n\t\t} else {\n\t\t\t// perform copy\n\t\t\terr = CopyFile(sourceFilePointer, destinationFilePointer)\n\t\t\tif err != nil {\n\t\t\t\tfmt.Println(err)\n\t\t\t}\n\t\t}\n\n\t}\n\treturn\n}\n\nfunc RemoveDir(dir string) error {\n\treturn os.RemoveAll(dir)\n}\n\nfunc AbsolutePath(p string) (string, error) {\n\n\tif strings.HasPrefix(p, \"~\") {\n\t\thome := os.Getenv(\"HOME\")\n\t\tif home == \"\" {\n\t\t\tpanic(fmt.Sprintf(\"can not found HOME in envs, '%s' AbsPh Failed!\", p))\n\t\t}\n\t\tp = fmt.Sprint(home, string(p[1:]))\n\t}\n\ts, err := filepath.Abs(p)\n\n\tif nil != err {\n\t\treturn \"\", err\n\t}\n\treturn s, nil\n}\n\n// FileExists reports whether the named file or directory exists.\nfunc FileExists(path string) bool {\n\t_, err := os.Stat(path)\n\tif err == nil {\n\t\treturn true\n\t}\n\tif os.IsNotExist(err) {\n\t\treturn false\n\t}\n\n\treturn false\n}\n\nfunc FormatBytes(size int64) string {\n\tunits := []string{\" B\", \" KB\", \" MB\", \" GB\", \" TB\"}\n\n\ts := float64(size)\n\n\ti := 0\n\n\tfor ; s >= 1024 && i < 4; i++ {\n\t\ts /= 1024\n\t}\n\n\treturn fmt.Sprintf(\"%.2f%s\", s, units[i])\n}\n\nfunc Round(val float64, places int) float64 {\n\tvar t float64\n\tf := math.Pow10(places)\n\tx := val * f\n\tif math.IsInf(x, 0) || math.IsNaN(x) {\n\t\treturn val\n\t}\n\tif x >= 0.0 {\n\t\tt = math.Ceil(x)\n\t\tif (t - x) > 0.50000000001 {\n\t\t\tt -= 1.0\n\t\t}\n\t} else {\n\t\tt = math.Ceil(-x)\n\t\tif (t + x) > 0.50000000001 {\n\t\t\tt -= 1.0\n\t\t}\n\t\tt = -t\n\t}\n\tx = t / f\n\n\tif !math.IsInf(x, 0) {\n\t\treturn x\n\t}\n\n\treturn t\n}\n\n// 判断指定目录下是否存在指定后缀的文件\nfunc HasFileOfExt(path string, exts []string) bool {\n\terr := filepath.Walk(path, func(path string, info os.FileInfo, err error) error {\n\t\tif !info.IsDir() {\n\n\t\t\text := filepath.Ext(info.Name())\n\n\t\t\tfor _, item := range exts {\n\t\t\t\tif strings.EqualFold(ext, item) {\n\t\t\t\t\treturn os.ErrExist\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\t\treturn nil\n\t})\n\n\treturn err == os.ErrExist\n}\n\n// IsImageExt 判断是否是图片后缀\nfunc IsImageExt(filename string) bool {\n\text := filepath.Ext(filename)\n\n\treturn strings.EqualFold(ext, \".jpg\") ||\n\t\tstrings.EqualFold(ext, \".jpeg\") ||\n\t\tstrings.EqualFold(ext, \".png\") ||\n\t\tstrings.EqualFold(ext, \".gif\") ||\n\t\tstrings.EqualFold(ext, \".svg\") ||\n\t\tstrings.EqualFold(ext, \".bmp\") ||\n\t\tstrings.EqualFold(ext, \".webp\")\n}\n\n// IsImageExt 判断是否是视频后缀\nfunc IsVideoExt(filename string) bool {\n\text := filepath.Ext(filename)\n\n\treturn strings.EqualFold(ext, \".mp4\") ||\n\t\tstrings.EqualFold(ext, \".webm\") ||\n\t\tstrings.EqualFold(ext, \".ogg\") ||\n\t\tstrings.EqualFold(ext, \".avi\") ||\n\t\tstrings.EqualFold(ext, \".flv\") ||\n\t\tstrings.EqualFold(ext, \".mov\")\n}\n\n// 忽略字符串中的BOM头\nfunc ReadFileAndIgnoreUTF8BOM(filename string) ([]byte, error) {\n\n\tdata, err := ioutil.ReadFile(filename)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tif data == nil {\n\t\treturn nil, nil\n\t}\n\tdata = bytes.Replace(data, []byte(\"\\r\"), []byte(\"\"), -1)\n\tif len(data) >= 3 && data[0] == 0xef && data[1] == 0xbb && data[2] == 0xbf {\n\t\treturn data[3:], err\n\t}\n\n\treturn data, nil\n}\n"
  },
  {
    "path": "utils/gob.go",
    "content": "package utils\n\nimport (\n\t\"bytes\"\n\t\"encoding/gob\"\n)\n\n//解码\nfunc Decode(value string, r interface{}) error {\n\n\tnetwork := bytes.NewBuffer([]byte(value))\n\n\tdec := gob.NewDecoder(network)\n\n\treturn dec.Decode(r)\n}\n\n//编码\nfunc Encode(value interface{}) (string, error) {\n\tnetwork := bytes.NewBuffer(nil)\n\n\tenc := gob.NewEncoder(network)\n\n\terr := enc.Encode(value)\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\n\treturn network.String(), nil\n}\n"
  },
  {
    "path": "utils/gopool/gopool.go",
    "content": "package gopool\n\nimport (\n\t\"sync\"\n\t\"errors\"\n\t\"fmt\"\n)\nvar (\n\tErrHandlerIsExist = errors.New(\"指定的键已存在\")\n\tErrWorkerChanClosed = errors.New(\"队列已关闭\")\n)\ntype ChannelHandler func()\n\ntype entry struct {\n\thandler ChannelHandler\n\tkey string\n}\n\ntype ChannelPool struct {\n\tmaxWorkerNum int\n\tmaxPoolNum int\n\twait *sync.WaitGroup\n\tcache *sync.Map\n\tworker chan *entry\n\tlimit chan bool\n\tisClosed bool\n\tonce *sync.Once\n}\n\nfunc NewChannelPool(maxWorkerNum, maxPoolNum int) (*ChannelPool) {\n\tif maxWorkerNum <= 0 {\n\t\tmaxWorkerNum = 1\n\t}\n\tif maxPoolNum <= 0 {\n\t\tmaxWorkerNum = 100\n\t}\n\treturn &ChannelPool{\n\t\tmaxWorkerNum: maxWorkerNum,\n\t\tmaxPoolNum: maxPoolNum,\n\t\twait: &sync.WaitGroup{},\n\t\tcache: &sync.Map{},\n\t\tworker: make(chan  *entry, maxWorkerNum),\n\t\tlimit: make(chan bool, maxWorkerNum),\n\t\tisClosed: false,\n\t\tonce: &sync.Once{},\n\t}\n}\n\nfunc (pool *ChannelPool) LoadOrStore(key string,value ChannelHandler) error  {\n\tif pool.isClosed {\n\t\treturn ErrWorkerChanClosed\n\t}\n\tif _,loaded := pool.cache.LoadOrStore(key,false); loaded {\n\t\treturn ErrHandlerIsExist\n\t}else{\n\t\tpool.worker <- &entry{handler:value,key:key}\n\t\treturn  nil\n\t}\n}\n\nfunc (pool *ChannelPool) Start() {\n\tpool.once.Do(func() {\n\t\tgo func() {\n\t\t\tfor i :=0; i < pool.maxWorkerNum; i ++ {\n\t\t\t\tpool.limit <- true\n\t\t\t}\n\t\t\tfor {\n\t\t\t\tactual, isClosed := <-pool.worker\n\t\t\t\t//当队列被关闭，则跳出循环\n\t\t\t\tif actual == nil && !isClosed {\n\t\t\t\t\tfmt.Println(\"工作队列已关闭\")\n\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t\tlimit := <-pool.limit\n\n\t\t\t\tif limit {\n\t\t\t\t\tpool.wait.Add(1)\n\t\t\t\t\tgo func(actual *entry) {\n\t\t\t\t\t\tdefer func() {\n\t\t\t\t\t\t\tpool.cache.Delete(actual.key)\n\t\t\t\t\t\t\tpool.limit <- true\n\t\t\t\t\t\t\tpool.wait.Done()\n\t\t\t\t\t\t}()\n\n\t\t\t\t\t\tactual.handler()\n\n\t\t\t\t\t}(actual)\n\t\t\t\t}\n\t\t\t}\n\t\t}()\n\t})\n}\n\nfunc (pool *ChannelPool) Wait() {\n\tclose(pool.worker)\n\n\tpool.wait.Wait()\n}\n\n"
  },
  {
    "path": "utils/html.go",
    "content": "package utils\n\nimport (\n\t\"bytes\"\n\t\"regexp\"\n\t\"strings\"\n\n\t\"github.com/PuerkitoBio/goquery\"\n\t\"github.com/mindoc-org/mindoc/conf\"\n)\n\nfunc StripTags(s string) string {\n\n\t//将HTML标签全转换成小写\n\tre, _ := regexp.Compile(\"\\\\<[\\\\S\\\\s]+?\\\\>\")\n\tsrc := re.ReplaceAllStringFunc(s, strings.ToLower)\n\n\t//去除STYLE\n\tre, _ = regexp.Compile(\"\\\\<style[\\\\S\\\\s]+?\\\\</style\\\\>\")\n\tsrc = re.ReplaceAllString(src, \"\")\n\n\t//去除SCRIPT\n\tre, _ = regexp.Compile(\"\\\\<script[\\\\S\\\\s]+?\\\\</script\\\\>\")\n\tsrc = re.ReplaceAllString(src, \"\")\n\n\t//去除所有尖括号内的HTML代码，并换成换行符\n\tre, _ = regexp.Compile(\"\\\\<[\\\\S\\\\s]+?\\\\>\")\n\tsrc = re.ReplaceAllString(src, \"\\n\")\n\n\t//去除连续的换行符\n\tre, _ = regexp.Compile(\"\\\\s{2,}\")\n\tsrc = re.ReplaceAllString(src, \"\\n\")\n\n\treturn src\n}\n\n// 自动提取文章摘要\nfunc AutoSummary(body string, l int) string {\n\n\t//匹配图片，如果图片语法是在代码块中，这里同样会处理\n\tre := regexp.MustCompile(`<p>(.*?)</p>`)\n\n\tcontents := re.FindAllString(body, -1)\n\n\tif len(contents) <= 0 {\n\t\treturn \"\"\n\t}\n\tcontent := \"\"\n\tfor _, s := range contents {\n\t\tb := strings.Replace(StripTags(s), \"\\n\", \"\", -1)\n\n\t\tif l <= 0 {\n\t\t\tbreak\n\t\t}\n\t\tl = l - len([]rune(b))\n\n\t\tcontent += b\n\n\t}\n\treturn content\n}\n\n// 安全处理HTML文档，过滤危险标签和属性.\nfunc SafetyProcessor(html string) string {\n\n\t//安全过滤，移除危险标签和属性\n\tif docQuery, err := goquery.NewDocumentFromReader(bytes.NewBufferString(html)); err == nil {\n\t\tdocQuery.Find(\"script\").Remove()\n\t\tdocQuery.Find(\"form\").Remove()\n\t\tdocQuery.Find(\"link\").Remove()\n\t\tdocQuery.Find(\"applet\").Remove()\n\t\tdocQuery.Find(\"frame\").Remove()\n\t\tdocQuery.Find(\"meta\").Remove()\n\t\tif !conf.GetEnableIframe() {\n\t\t\tdocQuery.Find(\"iframe\").Remove()\n\t\t}\n\t\tdocQuery.Find(\"*\").Each(func(i int, selection *goquery.Selection) {\n\n\t\t\tif href, ok := selection.Attr(\"href\"); ok && strings.HasPrefix(href, \"javascript:\") {\n\t\t\t\tselection.SetAttr(\"href\", \"#\")\n\t\t\t}\n\t\t\tif src, ok := selection.Attr(\"src\"); ok && strings.HasPrefix(src, \"javascript:\") {\n\t\t\t\tselection.SetAttr(\"src\", \"#\")\n\t\t\t}\n\n\t\t\tselection.RemoveAttr(\"onafterprint\").\n\t\t\t\tRemoveAttr(\"onbeforeprint\").\n\t\t\t\tRemoveAttr(\"onbeforeunload\").\n\t\t\t\tRemoveAttr(\"onload\").\n\t\t\t\tRemoveAttr(\"onclick\").\n\t\t\t\tRemoveAttr(\"onkeydown\").\n\t\t\t\tRemoveAttr(\"onkeypress\").\n\t\t\t\tRemoveAttr(\"onkeyup\").\n\t\t\t\tRemoveAttr(\"ondblclick\").\n\t\t\t\tRemoveAttr(\"onmousedown\").\n\t\t\t\tRemoveAttr(\"onmousemove\").\n\t\t\t\tRemoveAttr(\"onmouseout\").\n\t\t\t\tRemoveAttr(\"onmouseover\").\n\t\t\t\tRemoveAttr(\"onmouseup\")\n\t\t})\n\n\t\t//处理外链\n\t\tdocQuery.Find(\"a\").Each(func(i int, contentSelection *goquery.Selection) {\n\t\t\tif src, ok := contentSelection.Attr(\"href\"); ok {\n\t\t\t\tif strings.HasPrefix(src, \"http://\") || strings.HasPrefix(src, \"https://\") {\n\t\t\t\t\tif conf.BaseUrl != \"\" && !strings.HasPrefix(src, conf.BaseUrl) {\n\t\t\t\t\t\tcontentSelection.SetAttr(\"target\", \"_blank\")\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t})\n\t\t//添加文档标签包裹\n\t\tif selector := docQuery.Find(\"div.whole-article-wrap\").First(); selector.Size() <= 0 {\n\t\t\tdocQuery.Find(\"body\").Children().WrapAllHtml(\"<div class=\\\"whole-article-wrap\\\"></div>\")\n\t\t}\n\t\t//解决文档内容缺少包裹标签的问题\n\t\tif selector := docQuery.Find(\"div.markdown-article\").First(); selector.Size() <= 0 {\n\t\t\tif selector := docQuery.Find(\"div.markdown-toc\").First(); selector.Size() > 0 {\n\t\t\t\tdocQuery.Find(\"div.markdown-toc\").NextAll().WrapAllHtml(\"<div class=\\\"markdown-article\\\"></div>\")\n\t\t\t} else if selector := docQuery.Find(\"dir.toc\").First(); selector.Size() > 0 {\n\t\t\t\tdocQuery.Find(\"dir.toc\").NextAll().WrapAllHtml(\"<div class=\\\"markdown-article\\\"></div>\")\n\t\t\t}\n\t\t}\n\n\t\tif html, err := docQuery.Html(); err == nil {\n\t\t\treturn strings.TrimSuffix(strings.TrimPrefix(strings.TrimSpace(html), \"<html><head></head><body>\"), \"</body></html>\")\n\t\t}\n\t}\n\treturn html\n}\n"
  },
  {
    "path": "utils/krand.go",
    "content": "package utils\n\nimport (\n\t\"math/rand\"\n\t\"time\"\n)\n\nconst (\n\tKC_RAND_KIND_NUM   = 0 // 纯数字\n\tKC_RAND_KIND_LOWER = 1 // 小写字母\n\tKC_RAND_KIND_UPPER = 2 // 大写字母\n\tKC_RAND_KIND_ALL   = 3 // 数字、大小写字母\n)\n\n// 随机字符串\nfunc Krand(size int, kind int) []byte {\n\tikind, kinds, result := kind, [][]int{[]int{10, 48}, []int{26, 97}, []int{26, 65}}, make([]byte, size)\n\tis_all := kind > 2 || kind < 0\n\trand.Seed(time.Now().UnixNano())\n\tfor i := 0; i < size; i++ {\n\t\tif is_all { // random ikind\n\t\t\tikind = rand.Intn(3)\n\t\t}\n\t\tscope, base := kinds[ikind][0], kinds[ikind][1]\n\t\tresult[i] = uint8(base + rand.Intn(scope))\n\t}\n\n\treturn result\n}\n"
  },
  {
    "path": "utils/ldap.go",
    "content": "package utils\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\n\t\"github.com/beego/beego/v2/core/logs\"\n\t\"github.com/go-ldap/ldap/v3\"\n)\n\n/*\n对应的config\nldap:\n  host: hostname.yourdomain.com //ldap服务器地址\n  port: 3268 //ldap服务器端口\n  attribute: mail //用户名对应ldap object属性\n  base: DC=yourdomain,DC=com //搜寻范围\n  user: CN=ldap helper,OU=yourdomain.com,DC=yourdomain,DC=com //第一次绑定用户\n  password: p@sswd //第一次绑定密码\n  ssl: false //使用使用ssl\n*/\n\nfunc ValidLDAPLogin(password string) (result bool, err error) {\n\tresult = false\n\terr = nil\n\tlc, err := ldap.DialURL(fmt.Sprintf(\"ldap://%s:%d\", \"192.168.3.104\", 389))\n\tif err != nil {\n\t\tlogs.Error(\"DialURL => \", err)\n\t\treturn\n\t}\n\n\tdefer lc.Close()\n\terr = lc.Bind(\"cn=admin,dc=minho,dc=com\", \"123456\")\n\tif err != nil {\n\t\tlogs.Error(\"Bind => \", err)\n\t\treturn\n\t}\n\tsearchRequest := ldap.NewSearchRequest(\n\t\t\"DC=minho,DC=com\",\n\t\tldap.ScopeWholeSubtree, ldap.NeverDerefAliases, 0, 0, false,\n\t\tfmt.Sprintf(\"(&(objectClass=User)(%s=%s))\", \"mail\", \"longfei6671@163.com\"),\n\t\t[]string{\"dn\"},\n\t\tnil,\n\t)\n\tsearchResult, err := lc.Search(searchRequest)\n\tif err != nil {\n\t\tlogs.Error(\"Search => \", err)\n\t\treturn\n\t}\n\tif len(searchResult.Entries) != 1 {\n\t\terr = errors.New(\"ldap.no_user_found_or_many_users_found\")\n\t\treturn\n\t}\n\tfmt.Printf(\"%+v = %d\", searchResult.Entries, len(searchResult.Entries))\n\n\tuserdn := searchResult.Entries[0].DN\n\n\terr = lc.Bind(userdn, password)\n\tif err == nil {\n\t\tresult = true\n\t} else {\n\t\tlogs.Error(\"Bind2 => \", err)\n\t\terr = nil\n\t}\n\treturn\n}\n\nfunc AddMember(account, password string) error {\n\tlc, err := ldap.DialURL(fmt.Sprintf(\"ldap://%s:%d\", \"192.168.3.104\", 389))\n\tif err != nil {\n\t\tlogs.Error(\"DialURL => \", err)\n\t\treturn err\n\t}\n\n\tdefer lc.Close()\n\tuser := fmt.Sprintf(\"cn=%s,dc=minho,dc=com\", account)\n\n\tmember := ldap.NewAddRequest(user, []ldap.Control{})\n\n\tmember.Attribute(\"mail\", []string{\"longfei6671@163.com\"})\n\n\terr = lc.Add(member)\n\n\tif err == nil {\n\n\t\terr = lc.Bind(user, \"\")\n\t\tif err != nil {\n\t\t\tlogs.Error(\"Bind => \", err)\n\t\t\treturn err\n\t\t}\n\t\tpasswordModifyRequest := ldap.NewPasswordModifyRequest(user, \"\", \"1q2w3e__ABC\")\n\t\t_, err = lc.PasswordModify(passwordModifyRequest)\n\n\t\tif err != nil {\n\t\t\tlogs.Error(\"PasswordModify => \", err)\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t}\n\tlogs.Error(\"Add => \", err)\n\treturn err\n}\n\nfunc ModifyPassword(account, old_password, new_password string) error {\n\tl, err := ldap.DialURL(fmt.Sprintf(\"ldap://%s:%d\", \"192.168.3.104\", 389))\n\tif err != nil {\n\t\tlogs.Error(\"DialURL => \", err)\n\t}\n\tdefer l.Close()\n\n\tuser := fmt.Sprintf(\"cn=%s,dc=minho,dc=com\", account)\n\terr = l.Bind(user, old_password)\n\tif err != nil {\n\t\tlogs.Error(\"Bind => \", err)\n\t\treturn err\n\t}\n\n\tpasswordModifyRequest := ldap.NewPasswordModifyRequest(user, old_password, new_password)\n\t_, err = l.PasswordModify(passwordModifyRequest)\n\n\tif err != nil {\n\t\tlogs.Error(fmt.Sprintf(\"Password could not be changed: %s\", err.Error()))\n\t\treturn err\n\t}\n\treturn nil\n}\n"
  },
  {
    "path": "utils/pagination/pagination.go",
    "content": "package pagination\n\nimport (\n\t\"fmt\"\n\t\"html/template\"\n\t\"math\"\n\t\"net/http\"\n\t\"net/url\"\n\t\"strconv\"\n\t\"strings\"\n\n\t\"github.com/beego/beego/v2/server/web\"\n\t\"github.com/beego/i18n\"\n)\n\n//Pagination 分页器\ntype Pagination struct {\n\tRequest *http.Request\n\tTotal   int\n\tPernum  int\n\tBaseUrl string\n}\n\n//NewPagination 新建分页器\nfunc NewPagination(req *http.Request, total int, pernum int, baseUrl string) *Pagination {\n\treturn &Pagination{\n\t\tRequest: req,\n\t\tTotal:   total,\n\t\tPernum:  pernum,\n\t\tBaseUrl: baseUrl,\n\t}\n}\n\nfunc (p *Pagination) HtmlPages() template.HTML {\n\treturn template.HTML(p.Pages())\n}\n\n//Pages 渲染生成html分页标签\nfunc (p *Pagination) Pages() string {\n\tqueryParams := p.Request.URL.Query()\n\t//从当前请求中获取page\n\tpage := queryParams.Get(\"page\")\n\tif page == \"\" {\n\t\tpage = \"1\"\n\t}\n\t//将页码转换成整型，以便计算\n\tpagenum, _ := strconv.Atoi(page)\n\tif pagenum == 0 {\n\t\treturn \"\"\n\t}\n\n\t//计算总页数\n\tvar totalPageNum = int(math.Ceil(float64(p.Total) / float64(p.Pernum)))\n\n\tlang := p.getLang()\n\n\t//首页链接\n\tvar firstLink string\n\t//上一页链接\n\tvar prevLink string\n\t//下一页链接\n\tvar nextLink string\n\t//末页链接\n\tvar lastLink string\n\t//中间页码链接\n\tvar pageLinks []string\n\n\t//首页和上一页链接\n\tif pagenum > 1 {\n\t\tfirstLink = fmt.Sprintf(`<li><a href=\"%s\">%s</a></li>`, p.pageURL(\"1\"), i18n.Tr(lang, \"page.first\"))\n\t\tprevLink = fmt.Sprintf(`<li><a href=\"%s\">%s</a></li>`, p.pageURL(strconv.Itoa(pagenum-1)), i18n.Tr(lang, \"page.prev\"))\n\t} else {\n\t\tfirstLink = fmt.Sprintf(`<li class=\"disabled\"><a href=\"#\">%s</a></li>`, i18n.Tr(lang, \"page.first\"))\n\t\tprevLink = fmt.Sprintf(`<li class=\"disabled\"><a href=\"#\">%s</a></li>`, i18n.Tr(lang, \"page.prev\"))\n\t}\n\n\t//末页和下一页\n\tif pagenum < totalPageNum {\n\t\tlastLink = fmt.Sprintf(`<li><a href=\"%s\">%s</a></li>`, p.pageURL(strconv.Itoa(totalPageNum)), i18n.Tr(lang, \"page.last\"))\n\t\tnextLink = fmt.Sprintf(`<li><a href=\"%s\">%s</a></li>`, p.pageURL(strconv.Itoa(pagenum+1)), i18n.Tr(lang, \"page.next\"))\n\t} else {\n\t\tlastLink = fmt.Sprintf(`<li class=\"disabled\"><a href=\"#\">%s</a></li>`, i18n.Tr(lang, \"page.last\"))\n\t\tnextLink = fmt.Sprintf(`<li class=\"disabled\"><a href=\"#\">%s</a></li>`, i18n.Tr(lang, \"page.next\"))\n\t}\n\n\t//生成中间页码链接\n\tpageLinks = make([]string, 0, 10)\n\tstartPos := pagenum - 3\n\tendPos := pagenum + 3\n\tif startPos < 1 {\n\t\tendPos = endPos + int(math.Abs(float64(startPos))) + 1\n\t\tstartPos = 1\n\t}\n\tif endPos > totalPageNum {\n\t\tendPos = totalPageNum\n\t}\n\tfor i := startPos; i <= endPos; i++ {\n\t\tvar s string\n\t\tif i == pagenum {\n\t\t\ts = fmt.Sprintf(`<li class=\"active\"><a href=\"%s\">%d</a></li>`, p.pageURL(strconv.Itoa(i)), i)\n\t\t} else {\n\t\t\ts = fmt.Sprintf(`<li><a href=\"%s\">%d</a></li>`, p.pageURL(strconv.Itoa(i)), i)\n\t\t}\n\t\tpageLinks = append(pageLinks, s)\n\t}\n\n\treturn fmt.Sprintf(`<ul class=\"pagination\">%s%s%s%s%s</ul>`, firstLink, prevLink, strings.Join(pageLinks, \"\"), nextLink, lastLink)\n}\n\n//pageURL 生成分页url\nfunc (p *Pagination) pageURL(page string) string {\n\t//基于当前url新建一个url对象\n\tu, _ := url.Parse(p.BaseUrl + p.Request.URL.String())\n\tq := u.Query()\n\tq.Set(\"page\", page)\n\tu.RawQuery = q.Encode()\n\treturn u.String()\n}\n\nfunc (p *Pagination) getLang() string {\n\tlang, _ := web.AppConfig.String(\"default_lang\")\n\tulang := p.Request.FormValue(\"lang\")\n\tif len(ulang) == 0 {\n\t\tclang, err := p.Request.Cookie(\"lang\")\n\t\tif err != nil {\n\t\t\treturn lang\n\t\t}\n\t\tulang = clang.Value\n\t}\n\tif !i18n.IsExist(ulang) {\n\t\treturn lang\n\t}\n\treturn ulang\n}\n\ntype Page struct {\n\tPageNo\t\tint         `json:\"PageNo\"`\n\tPageSize\tint         `json:\"PageSize\"`\n\tTotalPage\tint         `json:\"TotalPage\"`\n\tTotalCount\tint         `json:\"TotalCount\"`\n\tFirstPage\tbool        `json:\"FirstPage\"`\n\tLastPage\tbool        `json:\"LastPage\"`\n\tList\t\tinterface{} `json:\"List\"`\n}\n\nfunc PageUtil(count int, pageNo int, pageSize int, list interface{}) Page {\n\ttp := count / pageSize\n\tif count%pageSize > 0 {\n\t\ttp = count/pageSize + 1\n\t}\n\treturn Page {\n\t\tPageNo: pageNo,\n\t\tPageSize: pageSize,\n\t\tTotalPage: tp,\n\t\tTotalCount: count,\n\t\tFirstPage: pageNo == 1,\n\t\tLastPage: pageNo == tp,\n\t\tList: list,\n\t}\n}\n"
  },
  {
    "path": "utils/password.go",
    "content": "package utils\n\nimport (\n\t\"crypto/md5\"\n\t\"crypto/rand\"\n\t\"crypto/sha256\"\n\t\"crypto/sha512\"\n\t\"encoding/base64\"\n\t\"encoding/hex\"\n\t\"io\"\n\tmt \"math/rand\"\n\t\"strconv\"\n\t\"strings\"\n)\n\nconst (\n\tsaltSize            = 16\n\tdelmiter            = \"$\"\n\tstretching_password = 500\n\tsalt_local_secret   = \"ahfw*&TGdsfnbi*^Wt\"\n)\n\n//加密密码\nfunc PasswordHash(pass string) (string, error) {\n\n\tsaltSecret, err := salt_secret()\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\n\tsalt, err := salt(salt_local_secret + saltSecret)\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\n\tinteration := randInt(1, 20)\n\n\thash, err := hash(pass, saltSecret, salt, int64(interation))\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\tinterationString := strconv.Itoa(interation)\n\tpassword := saltSecret + delmiter + interationString + delmiter + hash + delmiter + salt\n\n\treturn password, nil\n\n}\n\n//校验密码是否有效\nfunc PasswordVerify(hashing string, pass string) (bool, error) {\n\tdata := trimSaltHash(hashing)\n\n\tinteration, _ := strconv.ParseInt(data[\"interation_string\"], 10, 64)\n\n\thas, err := hash(pass, data[\"salt_secret\"], data[\"salt\"], int64(interation))\n\tif err != nil {\n\t\treturn false, err\n\t}\n\n\tif (data[\"salt_secret\"] + delmiter + data[\"interation_string\"] + delmiter + has + delmiter + data[\"salt\"]) == hashing {\n\t\treturn true, nil\n\t} else {\n\t\treturn false, nil\n\t}\n\n}\n\nfunc hash(pass string, salt_secret string, salt string, interation int64) (string, error) {\n\tvar passSalt = salt_secret + pass + salt + salt_secret + pass + salt + pass + pass + salt\n\tvar i int\n\n\thashPass := salt_local_secret\n\thashStart := sha512.New()\n\thashCenter := sha256.New()\n\thashOutput := sha256.New224()\n\n\ti = 0\n\tfor i <= stretching_password {\n\t\ti = i + 1\n\t\t_, err := hashStart.Write([]byte(passSalt + hashPass))\n\t\tif err != nil {\n\t\t\treturn \"\", err\n\t\t}\n\t\thashPass = hex.EncodeToString(hashStart.Sum(nil))\n\t}\n\n\ti = 0\n\tfor int64(i) <= interation {\n\t\ti = i + 1\n\t\thashPass = hashPass + hashPass\n\t}\n\n\ti = 0\n\tfor i <= stretching_password {\n\t\ti = i + 1\n\t\t_, err := hashCenter.Write([]byte(hashPass + salt_secret))\n\t\tif err != nil {\n\t\t\treturn \"\", err\n\t\t}\n\t\thashPass = hex.EncodeToString(hashCenter.Sum(nil))\n\t}\n\tif _,err := hashOutput.Write([]byte(hashPass + salt_local_secret)); err != nil {\n\t\treturn \"\", err\n\t}\n\thashPass = hex.EncodeToString(hashOutput.Sum(nil))\n\n\treturn hashPass, nil\n}\n\nfunc trimSaltHash(hash string) map[string]string {\n\tstr := strings.Split(hash, delmiter)\n\n\treturn map[string]string{\n\t\t\"salt_secret\":       str[0],\n\t\t\"interation_string\": str[1],\n\t\t\"hash\":              str[2],\n\t\t\"salt\":              str[3],\n\t}\n}\nfunc salt(secret string) (string, error) {\n\n\tbuf := make([]byte, saltSize, saltSize+md5.Size)\n\t_, err := io.ReadFull(rand.Reader, buf)\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\n\thash := md5.New()\n\thash.Write(buf)\n\thash.Write([]byte(secret))\n\treturn hex.EncodeToString(hash.Sum(buf)), nil\n}\n\nfunc salt_secret() (string, error) {\n\trb := make([]byte, randInt(10, 100))\n\t_, err := rand.Read(rb)\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\n\treturn base64.URLEncoding.EncodeToString(rb), nil\n}\n\nfunc randInt(min int, max int) int {\n\treturn min + mt.Intn(max-min)\n}\n"
  },
  {
    "path": "utils/requests/requests.go",
    "content": "package requests\n\nimport (\n\t\"io\"\n\t\"net/http\"\n\t\"net/url\"\n\t\"os\"\n\t\"fmt\"\n)\n\n//下载远程文件并保存到指定位置\nfunc DownloadAndSaveFile(remoteUrl, dstFile string) (error) {\n\tclient := &http.Client{}\n\turi, err := url.Parse(remoteUrl)\n\tif err != nil {\n\t\treturn err\n\t}\n\t// Create the file\n\tout, err := os.Create(dstFile)\n\tif err != nil  {\n\t\treturn err\n\t}\n\tdefer out.Close()\n\n\trequest, err := http.NewRequest(\"GET\", uri.String(), nil)\n\trequest.Header.Add(\"Connection\", \"close\")\n\trequest.Header.Add(\"Host\", uri.Host)\n\trequest.Header.Add(\"Referer\", uri.String())\n\trequest.Header.Add(\"User-Agent\", \"Mozilla/5.0 (Windows NT 6.1; WOW64; rv:12.0) Gecko/20100101 Firefox/12.0\")\n\n\tresp, err := client.Do(request)\n\tif err != nil {\n\t\treturn err\n\t}\n\tdefer resp.Body.Close()\n\n\n\tif resp.StatusCode == http.StatusOK {\n\t\t_, err = io.Copy(out, resp.Body)\n\t}else{\n\t\treturn fmt.Errorf(\"bad status: %s\", resp.Status)\n\t}\n\treturn nil\n}\n"
  },
  {
    "path": "utils/segmenter/segmenter.go",
    "content": "package segmenter\n\nimport (\n\t\"os\"\n\t\"path/filepath\"\n\t\"strings\"\n\t\"sync\"\n\n\t\"github.com/beego/beego/v2/core/logs\"\n\t\"github.com/mindoc-org/mindoc/conf\"\n\t\"github.com/yanyiwu/gojieba\"\n)\n\nvar (\n\t// jieba 分词器实例\n\tsegmenterOnce sync.Once\n\tjiebaCut      *gojieba.Jieba\n)\n\n// getDictDir 获取词典目录\nfunc getDictDir() string {\n\t// 使用项目根目录下的 conf/jieba 目录\n\treturn filepath.Join(conf.WorkingDirectory, \"conf\", \"jieba\")\n}\n\n// ensureDictDir 确保词典目录存在\nfunc ensureDictDir() error {\n\tdictDir := getDictDir()\n\tif _, err := os.Stat(dictDir); os.IsNotExist(err) {\n\t\treturn os.MkdirAll(dictDir, 0755)\n\t}\n\treturn nil\n}\n\n// initJieba 初始化 jieba 分词器\nfunc initJieba() {\n\tsegmenterOnce.Do(func() {\n\t\t// 确保词典目录存在\n\t\tif err := ensureDictDir(); err != nil {\n\t\t\tlogs.Error(\"创建词典目录失败 ->\", err)\n\t\t}\n\t\t// 创建分词器\n\t\tjiebaCut = gojieba.NewJieba()\n\t\tlogs.Info(\"jieba分词器初始化完成\")\n\t})\n}\n\n// Segment 中文分词器\n// 使用 jieba 分词库的搜索引擎模式进行分词\nfunc Segment(text string) []string {\n\ttext = strings.TrimSpace(text)\n\tif text == \"\" {\n\t\treturn []string{}\n\t}\n\n\t// 初始化分词器\n\tinitJieba()\n\t// 使用 jieba 分词，搜索引擎模式\n\t// CutForSearch 第二个参数为 true 表示使用 HMM 模型\n\twords := jiebaCut.CutForSearch(text, true)\n\t// 过滤结果\n\tresult := make([]string, 0)\n\tfor _, word := range words {\n\t\tword = strings.TrimSpace(word)\n\t\tif word == \"\" {\n\t\t\tcontinue\n\t\t}\n\t\t// 转小写（英文）\n\t\tword = strings.ToLower(word)\n\t\tresult = append(result, word)\n\t}\n\n\treturn result\n}\n"
  },
  {
    "path": "utils/sqltil/sql.go",
    "content": "package sqltil\n\nimport \"strings\"\n\n//转义like语法的%_符号\nfunc EscapeLike(keyword string) string {\n\treturn strings.Replace(strings.Replace(keyword,\"_\",\"\\\\_\",-1),\"%\",\"\\\\%\",-1)\n}\n"
  },
  {
    "path": "utils/template_fun.go",
    "content": "package utils\n\nfunc Asset(p string, cdn string) string {\n\treturn cdn + p\n}\n"
  },
  {
    "path": "utils/url.go",
    "content": "package utils\n\nimport (\n\t\"strings\"\n)\n\nfunc JoinURI(elem ...string) string {\n\tif len(elem) <= 0 {\n\t\treturn \"\"\n\t}\n\turi := \"\"\n\n\tfor i, u := range elem {\n\t\tu = strings.Replace(u, \"\\\\\", \"/\", -1)\n\n\t\tif i == 0 {\n\t\t\tif !strings.HasSuffix(u, \"/\") {\n\t\t\t\tu = u + \"/\"\n\t\t\t}\n\t\t\turi = u\n\t\t} else {\n\t\t\tu = strings.Replace(u, \"//\", \"/\", -1)\n\t\t\tif strings.HasPrefix(u, \"/\") {\n\t\t\t\tu = string(u[1:])\n\t\t\t}\n\t\t\turi += u\n\t\t}\n\t}\n\treturn uri\n}"
  },
  {
    "path": "utils/wkhtmltopdf/options.go",
    "content": "package wkhtmltopdf\n\nimport (\n\t\"fmt\"\n\t\"reflect\"\n)\n\n//A list of options that can be set from code to make it easier to see which options are available\ntype globalOptions struct {\n\tCookieJar         stringOption //Read and write cookies from and to the supplied cookie jar file\n\tCopies            uintOption   //Number of copies to print into the pdf file (default 1)\n\tDpi               uintOption   //Change the dpi explicitly (this has no effect on X11 based systems)\n\tExtendedHelp      boolOption   //Display more extensive help, detailing less common command switches\n\tGrayscale         boolOption   //PDF will be generated in grayscale\n\tHelp              boolOption   //Display help\n\tHTMLDoc           boolOption   //Output program html help\n\tImageDpi          uintOption   //When embedding images scale them down to this dpi (default 600)\n\tImageQuality      uintOption   //When jpeg compressing images use this quality (default 94)\n\tLicense           boolOption   //Output license information and exit\n\tLowquality        boolOption   //Generates lower quality pdf/ps. Useful to shrink the result document space\n\tManPage           boolOption   //Output program man page\n\tMarginBottom      uintOption   //Set the page bottom margin\n\tMarginLeft        uintOption   //Set the page left margin (default 10mm)\n\tMarginRight       uintOption   //Set the page right margin (default 10mm)\n\tMarginTop         uintOption   //Set the page top margin\n\tOrientation       stringOption // Set orientation to Landscape or Portrait (default Portrait)\n\tNoCollate         boolOption   //Do not collate when printing multiple copies (default collate)\n\tPageHeight        uintOption   //Page height\n\tPageSize          stringOption //Set paper size to: A4, Letter, etc. (default A4)\n\tPageWidth         uintOption   //Page width\n\tNoPdfCompression  boolOption   //Do not use lossless compression on pdf objects\n\tQuiet             boolOption   //Be less verbose\n\tReadArgsFromStdin boolOption   //Read command line arguments from stdin\n\tReadme            boolOption   //Output program readme\n\tTitle             stringOption //The title of the generated pdf file (The title of the first document is used if not specified)\n\tVersion           boolOption   //Output version information and exit\n}\n\nfunc (gopt *globalOptions) Args() []string {\n\treturn optsToArgs(gopt)\n}\n\ntype outlineOptions struct {\n\tDumpDefaultTocXsl boolOption   //Dump the default TOC xsl style sheet to stdout\n\tDumpOutline       stringOption //Dump the outline to a file\n\tNoOutline         boolOption   //Do not put an outline into the pdf\n\tOutlineDepth      uintOption   //Set the depth of the outline (default 4)\n}\n\nfunc (oopt *outlineOptions) Args() []string {\n\treturn optsToArgs(oopt)\n}\n\ntype pageOptions struct {\n\tAllow                     sliceOption  //Allow the file or files from the specified folder to be loaded (repeatable)\n\tNoBackground              boolOption   //Do not print background\n\tCacheDir                  stringOption //Web cache directory\n\tCheckboxCheckedSvg        stringOption //Use this SVG file when rendering checked checkboxes\n\tCheckboxSvg               stringOption //Use this SVG file when rendering unchecked checkboxes\n\tCookie                    mapOption    //Set an additional cookie (repeatable), value should be url encoded\n\tCustomHeader              mapOption    //Set an additional HTTP header (repeatable)\n\tCustomHeaderPropagation   boolOption   //Add HTTP headers specified by --custom-header for each resource request\n\tNoCustomHeaderPropagation boolOption   //Do not add HTTP headers specified by --custom-header for each resource request\n\tDebugJavascript           boolOption   //Show javascript debugging output\n\tDefaultHeader             boolOption   //Add a default header, with the name of the page to the left, and the page number to the right, this is short for: --header-left='[webpage]' --header-right='[page]/[toPage]' --top 2cm --header-line\n\tEncoding                  stringOption //Set the default text encoding, for input\n\tDisableExternalLinks      boolOption   //Do not make links to remote web pages\n\tEnableForms               boolOption   //Turn HTML form fields into pdf form fields\n\tNoImages                  boolOption   //Do not load or print images\n\tDisableInternalLinks      boolOption   //Do not make local links\n\tDisableJavascript         boolOption   //Do not allow web pages to run javascript\n\tJavascriptDelay           uintOption   //Wait some milliseconds for javascript finish (default 200)\n\tLoadErrorHandling         stringOption //Specify how to handle pages that fail to load: abort, ignore or skip (default abort)\n\tLoadMediaErrorHandling    stringOption //Specify how to handle media files that fail to load: abort, ignore or skip (default ignore)\n\tDisableLocalFileAccess    boolOption   //Do not allowed conversion of a local file to read in other local files, unless explicitly allowed with --allow\n\tMinimumFontSize           uintOption   //Minimum font size\n\tExcludeFromOutline        boolOption   //Do not include the page in the table of contents and outlines\n\tPageOffset                uintOption   //Set the starting page number (default 0)\n\tPassword                  stringOption //HTTP Authentication password\n\tEnablePlugins             boolOption   //Enable installed plugins (plugins will likely not work)\n\tPost                      mapOption    //Add an additional post field (repeatable)\n\tPostFile                  mapOption    //Post an additional file (repeatable)\n\tPrintMediaType            boolOption   //Use print media-type instead of screen\n\tProxy                     stringOption //Use a proxy\n\tRadiobuttonCheckedSvg     stringOption //Use this SVG file when rendering checked radiobuttons\n\tRadiobuttonSvg            stringOption //Use this SVG file when rendering unchecked radiobuttons\n\tRunScript                 sliceOption  //Run this additional javascript after the page is done loading (repeatable)\n\tDisableSmartShrinking     boolOption   //Disable the intelligent shrinking strategy used by WebKit that makes the pixel/dpi ratio none constant\n\tNoStopSlowScripts         boolOption   //Do not Stop slow running javascripts\n\tEnableTocBackLinks        boolOption   //Link from section header to toc\n\tUserStyleSheet            stringOption //Specify a user style sheet, to load with every page\n\tUsername                  stringOption //HTTP Authentication username\n\tViewportSize              stringOption //Set viewport size if you have custom scrollbars or css attribute overflow to emulate window size\n\tWindowStatus              stringOption //Wait until window.status is equal to this string before rendering page\n\tZoom                      floatOption  //Use this zoom factor (default 1)\n}\n\nfunc (popt *pageOptions) Args() []string {\n\treturn optsToArgs(popt)\n}\n\ntype headerAndFooterOptions struct {\n\tFooterCenter   stringOption //Centered footer text\n\tFooterFontName stringOption //Set footer font name (default Arial)\n\tFooterFontSize uintOption   //Set footer font size (default 12)\n\tFooterHTML     stringOption //Adds a html footer\n\tFooterLeft     stringOption //Left aligned footer text\n\tFooterLine     boolOption   //Display line above the footer\n\tFooterRight    stringOption //Right aligned footer text\n\tFooterSpacing  floatOption  //Spacing between footer and content in mm (default 0)\n\tHeaderCenter   stringOption //Centered header text\n\tHeaderFontName stringOption //Set header font name (default Arial)\n\tHeaderFontSize uintOption   //Set header font size (default 12)\n\tHeaderHTML     stringOption //Adds a html header\n\tHeaderLeft     stringOption //Left aligned header text\n\tHeaderLine     boolOption   //Display line below the header\n\tHeaderRight    stringOption //Right aligned header text\n\tHeaderSpacing  floatOption  //Spacing between header and content in mm (default 0)\n\tReplace        mapOption    //Replace [name] with value in header and footer (repeatable)\n}\n\nfunc (hopt *headerAndFooterOptions) Args() []string {\n\treturn optsToArgs(hopt)\n}\n\ntype tocOptions struct {\n\tDisableDottedLines  boolOption   //Do not use dotted lines in the toc\n\tTocHeaderText       stringOption //The header text of the toc (default Table of Contents)\n\tTocLevelIndentation uintOption   //For each level of headings in the toc indent by this length (default 1em)\n\tDisableTocLinks     boolOption   //Do not link from toc to sections\n\tTocTextSizeShrink   floatOption  //For each level of headings in the toc the font is scaled by this factor\n\tXslStyleSheet       stringOption //Use the supplied xsl style sheet for printing the table of content\n}\n\nfunc (topt *tocOptions) Args() []string {\n\treturn optsToArgs(topt)\n}\n\ntype argParser interface {\n\tParse() []string //Used in the cmd call\n}\n\ntype stringOption struct {\n\toption string\n\tvalue  string\n}\n\nfunc (so stringOption) Parse() []string {\n\targs := []string{}\n\tif so.value == \"\" {\n\t\treturn args\n\t}\n\targs = append(args, \"--\"+so.option)\n\targs = append(args, so.value)\n\treturn args\n}\n\nfunc (so *stringOption) Set(value string) {\n\tso.value = value\n}\n\ntype sliceOption struct {\n\toption string\n\tvalue  []string\n}\n\nfunc (so sliceOption) Parse() []string {\n\targs := []string{}\n\tif len(so.value) == 0 {\n\t\treturn args\n\t}\n\tfor _, v := range so.value {\n\t\targs = append(args, \"--\"+so.option)\n\t\targs = append(args, v)\n\t}\n\treturn args\n}\n\nfunc (so *sliceOption) Set(value string) {\n\tso.value = append(so.value, value)\n}\n\ntype mapOption struct {\n\toption string\n\tvalue  map[string]string\n}\n\nfunc (mo mapOption) Parse() []string {\n\targs := []string{}\n\tif mo.value == nil || len(mo.value) == 0 {\n\t\treturn args\n\t}\n\tfor k, v := range mo.value {\n\t\targs = append(args, \"--\"+mo.option)\n\t\targs = append(args, k)\n\t\targs = append(args, v)\n\t}\n\treturn args\n}\n\nfunc (mo *mapOption) Set(key, value string) {\n\tif mo.value == nil {\n\t\tmo.value = make(map[string]string)\n\t}\n\tmo.value[key] = value\n}\n\ntype uintOption struct {\n\toption string\n\tvalue  uint\n\tisSet  bool\n}\n\nfunc (io uintOption) Parse() []string {\n\targs := []string{}\n\tif io.isSet == false {\n\t\treturn args\n\t}\n\targs = append(args, \"--\"+io.option)\n\targs = append(args, fmt.Sprintf(\"%d\", io.value))\n\treturn args\n}\n\nfunc (io *uintOption) Set(value uint) {\n\tio.isSet = true\n\tio.value = value\n}\n\ntype floatOption struct {\n\toption string\n\tvalue  float64\n\tisSet  bool\n}\n\nfunc (fo floatOption) Parse() []string {\n\targs := []string{}\n\tif fo.isSet == false {\n\t\treturn args\n\t}\n\targs = append(args, \"--\"+fo.option)\n\targs = append(args, fmt.Sprintf(\"%.3f\", fo.value))\n\treturn args\n}\n\nfunc (fo *floatOption) Set(value float64) {\n\tfo.isSet = true\n\tfo.value = value\n}\n\ntype boolOption struct {\n\toption string\n\tvalue  bool\n}\n\nfunc (bo boolOption) Parse() []string {\n\tif bo.value {\n\t\treturn []string{\"--\" + bo.option}\n\t}\n\treturn []string{}\n}\n\nfunc (bo *boolOption) Set(value bool) {\n\tbo.value = value\n}\n\nfunc newGlobalOptions() globalOptions {\n\treturn globalOptions{\n\t\tCookieJar:         stringOption{option: \"cookie-jar\"},\n\t\tCopies:            uintOption{option: \"copies\"},\n\t\tDpi:               uintOption{option: \"dpi\"},\n\t\tExtendedHelp:      boolOption{option: \"extended-help\"},\n\t\tGrayscale:         boolOption{option: \"grayscale\"},\n\t\tHelp:              boolOption{option: \"true\"},\n\t\tHTMLDoc:           boolOption{option: \"htmldoc\"},\n\t\tImageDpi:          uintOption{option: \"image-dpi\"},\n\t\tImageQuality:      uintOption{option: \"image-quality\"},\n\t\tLicense:           boolOption{option: \"license\"},\n\t\tLowquality:        boolOption{option: \"lowquality\"},\n\t\tManPage:           boolOption{option: \"manpage\"},\n\t\tMarginBottom:      uintOption{option: \"margin-bottom\"},\n\t\tMarginLeft:        uintOption{option: \"margin-left\"},\n\t\tMarginRight:       uintOption{option: \"margin-right\"},\n\t\tMarginTop:         uintOption{option: \"margin-top\"},\n\t\tOrientation:       stringOption{option: \"orientation\"},\n\t\tNoCollate:         boolOption{option: \"nocollate\"},\n\t\tPageHeight:        uintOption{option: \"page-height\"},\n\t\tPageSize:          stringOption{option: \"page-size\"},\n\t\tPageWidth:         uintOption{option: \"page-width\"},\n\t\tNoPdfCompression:  boolOption{option: \"no-pdf-compression\"},\n\t\tQuiet:             boolOption{option: \"quiet\"},\n\t\tReadArgsFromStdin: boolOption{option: \"read-args-from-stdin\"},\n\t\tReadme:            boolOption{option: \"readme\"},\n\t\tTitle:             stringOption{option: \"title\"},\n\t\tVersion:           boolOption{option: \"version\"},\n\t}\n}\n\nfunc newOutlineOptions() outlineOptions {\n\treturn outlineOptions{\n\t\tDumpDefaultTocXsl: boolOption{option: \"dump-default-toc-xsl\"},\n\t\tDumpOutline:       stringOption{option: \"dump-outline\"},\n\t\tNoOutline:         boolOption{option: \"no-outline\"},\n\t\tOutlineDepth:      uintOption{option: \"outline-depth\"},\n\t}\n}\n\nfunc newPageOptions() pageOptions {\n\treturn pageOptions{\n\t\tAllow:                     sliceOption{option: \"allow\"},\n\t\tNoBackground:              boolOption{option: \"no-background\"},\n\t\tCacheDir:                  stringOption{option: \"cache-dir\"},\n\t\tCheckboxCheckedSvg:        stringOption{option: \"checkbox-checked-svg\"},\n\t\tCheckboxSvg:               stringOption{option: \"checkbox-svg\"},\n\t\tCookie:                    mapOption{option: \"cookie\"},\n\t\tCustomHeader:              mapOption{option: \"custom-header\"},\n\t\tCustomHeaderPropagation:   boolOption{option: \"custom-header-propagation\"},\n\t\tNoCustomHeaderPropagation: boolOption{option: \"no-custom-header-propagation\"},\n\t\tDebugJavascript:           boolOption{option: \"debug-javascript\"},\n\t\tDefaultHeader:             boolOption{option: \"default-header\"},\n\t\tEncoding:                  stringOption{option: \"encoding\"},\n\t\tDisableExternalLinks:      boolOption{option: \"disable-external-links\"},\n\t\tEnableForms:               boolOption{option: \"enable-forms\"},\n\t\tNoImages:                  boolOption{option: \"no-images\"},\n\t\tDisableInternalLinks:      boolOption{option: \"disable-internal-links\"},\n\t\tDisableJavascript:         boolOption{option: \"disable-javascript \"},\n\t\tJavascriptDelay:           uintOption{option: \"javascript-delay\"},\n\t\tLoadErrorHandling:         stringOption{option: \"load-error-handling\"},\n\t\tLoadMediaErrorHandling:    stringOption{option: \"load-media-error-handling\"},\n\t\tDisableLocalFileAccess:    boolOption{option: \"disable-local-file-access\"},\n\t\tMinimumFontSize:           uintOption{option: \"minimum-font-size\"},\n\t\tExcludeFromOutline:        boolOption{option: \"exclude-from-outline\"},\n\t\tPageOffset:                uintOption{option: \"page-offset\"},\n\t\tPassword:                  stringOption{option: \"password\"},\n\t\tEnablePlugins:             boolOption{option: \"enable-plugins\"},\n\t\tPost:                      mapOption{option: \"post\"},\n\t\tPostFile:                  mapOption{option: \"post-file\"},\n\t\tPrintMediaType:            boolOption{option: \"print-media-type\"},\n\t\tProxy:                     stringOption{option: \"proxy\"},\n\t\tRadiobuttonCheckedSvg: stringOption{option: \"radiobutton-checked-svg\"},\n\t\tRadiobuttonSvg:        stringOption{option: \"radiobutton-svg\"},\n\t\tRunScript:             sliceOption{option: \"run-script\"},\n\t\tDisableSmartShrinking: boolOption{option: \"disable-smart-shrinking\"},\n\t\tNoStopSlowScripts:     boolOption{option: \"no-stop-slow-scripts\"},\n\t\tEnableTocBackLinks:    boolOption{option: \"enable-toc-back-links\"},\n\t\tUserStyleSheet:        stringOption{option: \"user-style-sheet\"},\n\t\tUsername:              stringOption{option: \"username\"},\n\t\tViewportSize:          stringOption{option: \"viewport-size\"},\n\t\tWindowStatus:          stringOption{option: \"window-status\"},\n\t\tZoom:                  floatOption{option: \"zoom\"},\n\t}\n}\n\nfunc newHeaderAndFooterOptions() headerAndFooterOptions {\n\treturn headerAndFooterOptions{\n\t\tFooterCenter:   stringOption{option: \"footer-center\"},\n\t\tFooterFontName: stringOption{option: \"footer-font-name\"},\n\t\tFooterFontSize: uintOption{option: \"footer-font-size\"},\n\t\tFooterHTML:     stringOption{option: \"footer-html\"},\n\t\tFooterLeft:     stringOption{option: \"footer-left\"},\n\t\tFooterLine:     boolOption{option: \"footer-line\"},\n\t\tFooterRight:    stringOption{option: \"footer-right\"},\n\t\tFooterSpacing:  floatOption{option: \"footer-spacing\"},\n\t\tHeaderCenter:   stringOption{option: \"header-center\"},\n\t\tHeaderFontName: stringOption{option: \"header-font-name\"},\n\t\tHeaderFontSize: uintOption{option: \"header-font-size\"},\n\t\tHeaderHTML:     stringOption{option: \"header-html\"},\n\t\tHeaderLeft:     stringOption{option: \"header-left\"},\n\t\tHeaderLine:     boolOption{option: \"header-line\"},\n\t\tHeaderRight:    stringOption{option: \"header-right\"},\n\t\tHeaderSpacing:  floatOption{option: \"header-spacing\"},\n\t\tReplace:        mapOption{option: \"replace\"},\n\t}\n}\n\nfunc newTocOptions() tocOptions {\n\treturn tocOptions{\n\t\tDisableDottedLines:  boolOption{option: \"disable-dotted-lines\"},\n\t\tTocHeaderText:       stringOption{option: \"toc-header-text\"},\n\t\tTocLevelIndentation: uintOption{option: \"toc-level-indentation\"},\n\t\tDisableTocLinks:     boolOption{option: \"disable-toc-links\"},\n\t\tTocTextSizeShrink:   floatOption{option: \"toc-text-size-shrink\"},\n\t\tXslStyleSheet:       stringOption{option: \"xsl-style-sheet\"},\n\t}\n}\n\nfunc optsToArgs(opts interface{}) []string {\n\targs := []string{}\n\trv := reflect.Indirect(reflect.ValueOf(opts))\n\tif rv.Kind() != reflect.Struct {\n\t\treturn args\n\t}\n\tfor i := 0; i < rv.NumField(); i++ {\n\t\tprsr, ok := rv.Field(i).Interface().(argParser)\n\t\tif ok {\n\t\t\ts := prsr.Parse()\n\t\t\tif len(s) > 0 {\n\t\t\t\targs = append(args, s...)\n\t\t\t}\n\t\t}\n\t}\n\treturn args\n}\n\n// Constants for orientation modes\nconst (\n\tOrientationLandscape = \"Landscape\" // Landscape mode\n\tOrientationPortrait  = \"Portrait\"  // Portrait mode\n)\n\n// Constants for page sizes\nconst (\n\tPageSizeA0        = \"A0\"        //\t841 x 1189 mm\n\tPageSizeA1        = \"A1\"        //\t594 x 841 mm\n\tPageSizeA2        = \"A2\"        //\t420 x 594 mm\n\tPageSizeA3        = \"A3\"        //\t297 x 420 mm\n\tPageSizeA4        = \"A4\"        //\t210 x 297 mm, 8.26\n\tPageSizeA5        = \"A5\"        //\t148 x 210 mm\n\tPageSizeA6        = \"A6\"        //\t105 x 148 mm\n\tPageSizeA7        = \"A7\"        //\t74 x 105 mm\n\tPageSizeA8        = \"A8\"        //\t52 x 74 mm\n\tPageSizeA9        = \"A9\"        //\t37 x 52 mm\n\tPageSizeB0        = \"B0\"        //\t1000 x 1414 mm\n\tPageSizeB1        = \"B1\"        //\t707 x 1000 mm\n\tPageSizeB2        = \"B2\"        //\t500 x 707 mm\n\tPageSizeB3        = \"B3\"        //\t353 x 500 mm\n\tPageSizeB4        = \"B4\"        //\t250 x 353 mm\n\tPageSizeB5        = \"B5\"        //\t176 x 250 mm, 6.93\n\tPageSizeB6        = \"B6\"        //\t125 x 176 mm\n\tPageSizeB7        = \"B7\"        //\t88 x 125 mm\n\tPageSizeB8        = \"B8\"        //\t62 x 88 mm\n\tPageSizeB9        = \"B9\"        //\t33 x 62 mm\n\tPageSizeB10       = \"B10\"       //\t31 x 44 mm\n\tPageSizeC5E       = \"C5E\"       //\t163 x 229 mm\n\tPageSizeComm10E   = \"Comm10E\"   //\t105 x 241 mm, U.S. Common 10 Envelope\n\tPageSizeDLE       = \"DLE\"       //\t110 x 220 mm\n\tPageSizeExecutive = \"Executive\" //\t7.5 x 10 inches, 190.5 x 254 mm\n\tPageSizeFolio     = \"Folio\"     //\t210 x 330 mm\n\tPageSizeLedger    = \"Ledger\"    //\t431.8 x 279.4 mm\n\tPageSizeLegal     = \"Legal\"     //\t8.5 x 14 inches, 215.9 x 355.6 mm\n\tPageSizeLetter    = \"Letter\"    //\t8.5 x 11 inches, 215.9 x 279.4 mm\n\tPageSizeTabloid   = \"Tabloid\"   //\t279.4 x 431.8 mm\n\tPageSizeCustom    = \"Custom\"    //\tUnknown, or a user defined size.\n)\n"
  },
  {
    "path": "utils/wkhtmltopdf/wkhtmltopdf.go",
    "content": "// Package wkhtmltopdf contains wrappers around the wkhtmltopdf commandline tool\npackage wkhtmltopdf\n\nimport (\n\t\"bytes\"\n\t\"errors\"\n\t\"fmt\"\n\t\"io\"\n\t\"io/ioutil\"\n\t\"os\"\n\t\"os/exec\"\n\t\"path/filepath\"\n\t\"strings\"\n)\n\nvar binPath string //the cached paths as used by findPath()\n\n// SetPath sets the path to wkhtmltopdf\nfunc SetPath(path string) {\n\tbinPath = path\n}\n\n// GetPath gets the path to wkhtmltopdf\nfunc GetPath() string {\n\treturn binPath\n}\n\n// Page is the input struct for each page\ntype Page struct {\n\tInput string\n\tPageOptions\n}\n\n// InputFile returns the input string and is part of the page interface\nfunc (p *Page) InputFile() string {\n\treturn p.Input\n}\n\n// Args returns the argument slice and is part of the page interface\nfunc (p *Page) Args() []string {\n\treturn p.PageOptions.Args()\n}\n\n// Reader returns the io.Reader and is part of the page interface\nfunc (p *Page) Reader() io.Reader {\n\treturn nil\n}\n\n// NewPage creates a new input page from a local or web resource (filepath or URL)\nfunc NewPage(input string) *Page {\n\treturn &Page{\n\t\tInput:       input,\n\t\tPageOptions: NewPageOptions(),\n\t}\n}\n\n// PageReader is one input page (a HTML document) that is read from an io.Reader\n// You can add only one Page from a reader\ntype PageReader struct {\n\tInput io.Reader\n\tPageOptions\n}\n\n// InputFile returns the input string and is part of the page interface\nfunc (pr *PageReader) InputFile() string {\n\treturn \"-\"\n}\n\n// Args returns the argument slice and is part of the page interface\nfunc (pr *PageReader) Args() []string {\n\treturn pr.PageOptions.Args()\n}\n\n//Reader returns the io.Reader and is part of the page interface\nfunc (pr *PageReader) Reader() io.Reader {\n\treturn pr.Input\n}\n\n// NewPageReader creates a new PageReader from an io.Reader\nfunc NewPageReader(input io.Reader) *PageReader {\n\treturn &PageReader{\n\t\tInput:       input,\n\t\tPageOptions: NewPageOptions(),\n\t}\n}\n\ntype page interface {\n\tArgs() []string\n\tInputFile() string\n\tReader() io.Reader\n}\n\n// PageOptions are options for each input page\ntype PageOptions struct {\n\tpageOptions\n\theaderAndFooterOptions\n}\n\n// Args returns the argument slice\nfunc (po *PageOptions) Args() []string {\n\treturn append(append([]string{}, po.pageOptions.Args()...), po.headerAndFooterOptions.Args()...)\n}\n\n// NewPageOptions returns a new PageOptions struct with all options\nfunc NewPageOptions() PageOptions {\n\treturn PageOptions{\n\t\tpageOptions:            newPageOptions(),\n\t\theaderAndFooterOptions: newHeaderAndFooterOptions(),\n\t}\n}\n\n// cover page\ntype cover struct {\n\tInput string\n\tpageOptions\n}\n\n// table of contents\ntype toc struct {\n\tInclude bool\n\tallTocOptions\n}\n\ntype allTocOptions struct {\n\tpageOptions\n\ttocOptions\n}\n\n// PDFGenerator is the main wkhtmltopdf struct, always use NewPDFGenerator to obtain a new PDFGenerator struct\ntype PDFGenerator struct {\n\tglobalOptions\n\toutlineOptions\n\n\tCover      cover\n\tTOC        toc\n\tOutputFile string //filename to write to, default empty (writes to internal buffer)\n\n\tbinPath string\n\toutbuf  bytes.Buffer\n\tpages   []page\n}\n\n//Args returns the commandline arguments as a string slice\nfunc (pdfg *PDFGenerator) Args() []string {\n\targs := []string{}\n\targs = append(args, pdfg.globalOptions.Args()...)\n\targs = append(args, pdfg.outlineOptions.Args()...)\n\tif pdfg.Cover.Input != \"\" {\n\t\targs = append(args, \"cover\")\n\t\targs = append(args, pdfg.Cover.Input)\n\t\targs = append(args, pdfg.Cover.pageOptions.Args()...)\n\t}\n\tif pdfg.TOC.Include {\n\t\targs = append(args, \"toc\")\n\t\targs = append(args, pdfg.TOC.pageOptions.Args()...)\n\t\targs = append(args, pdfg.TOC.tocOptions.Args()...)\n\t}\n\tfor _, page := range pdfg.pages {\n\t\targs = append(args, \"page\")\n\t\targs = append(args, page.InputFile())\n\t\targs = append(args, page.Args()...)\n\t}\n\tif pdfg.OutputFile != \"\" {\n\t\targs = append(args, pdfg.OutputFile)\n\t} else {\n\t\targs = append(args, \"-\")\n\t}\n\treturn args\n}\n\n// ArgString returns Args as a single string\nfunc (pdfg *PDFGenerator) ArgString() string {\n\treturn strings.Join(pdfg.Args(), \" \")\n}\n\n// AddPage adds a new input page to the document.\n// A page is an input HTML page, it can span multiple pages in the output document.\n// It is a Page when read from file or URL or a PageReader when read from memory.\nfunc (pdfg *PDFGenerator) AddPage(p page) {\n\tpdfg.pages = append(pdfg.pages, p)\n}\n\n// SetPages resets all pages\nfunc (pdfg *PDFGenerator) SetPages(p []page) {\n\tpdfg.pages = p\n}\n\n// Buffer returns the embedded output buffer used if OutputFile is empty\nfunc (pdfg *PDFGenerator) Buffer() *bytes.Buffer {\n\treturn &pdfg.outbuf\n}\n\n// Bytes returns the output byte slice from the output buffer used if OutputFile is empty\nfunc (pdfg *PDFGenerator) Bytes() []byte {\n\treturn pdfg.outbuf.Bytes()\n}\n\n// WriteFile writes the contents of the output buffer to a file\nfunc (pdfg *PDFGenerator) WriteFile(filename string) error {\n\treturn ioutil.WriteFile(filename, pdfg.Bytes(), 0666)\n}\n\n//findPath finds the path to wkhtmltopdf by\n//- first looking in the current dir\n//- looking in the PATH and PATHEXT environment dirs\n//- using the WKHTMLTOPDF_PATH environment dir\n//The path is cached, meaning you can not change the location of wkhtmltopdf in\n//a running program once it has been found\nfunc (pdfg *PDFGenerator) findPath() error {\n\tconst exe = \"wkhtmltopdf\"\n\tif binPath != \"\" {\n\t\tpdfg.binPath = binPath\n\t\treturn nil\n\t}\n\texeDir, err := filepath.Abs(filepath.Dir(os.Args[0]))\n\tif err != nil {\n\t\treturn err\n\t}\n\tpath, err := exec.LookPath(filepath.Join(exeDir, exe))\n\tif err == nil && path != \"\" {\n\t\tbinPath = path\n\t\tpdfg.binPath = path\n\t\treturn nil\n\t}\n\tpath, err = exec.LookPath(exe)\n\tif err == nil && path != \"\" {\n\t\tbinPath = path\n\t\tpdfg.binPath = path\n\t\treturn nil\n\t}\n\tdir := os.Getenv(\"WKHTMLTOPDF_PATH\")\n\tif dir == \"\" {\n\t\treturn fmt.Errorf(\"%s not found\", exe)\n\t}\n\tpath, err = exec.LookPath(filepath.Join(dir, exe))\n\tif err == nil && path != \"\" {\n\t\tbinPath = path\n\t\tpdfg.binPath = path\n\t\treturn nil\n\t}\n\treturn fmt.Errorf(\"%s not found\", exe)\n}\n\n// Create creates the PDF document and stores it in the internal buffer if no error is returned\nfunc (pdfg *PDFGenerator) Create() error {\n\treturn pdfg.run()\n}\n\nfunc (pdfg *PDFGenerator) run() error {\n\n\terrbuf := &bytes.Buffer{}\n\n\tcmd := exec.Command(pdfg.binPath, pdfg.Args()...)\n\n\tcmd.Stdout = &pdfg.outbuf\n\tcmd.Stderr = errbuf\n\t//if there is a pageReader page (from Stdin) we set Stdin to that reader\n\tfor _, page := range pdfg.pages {\n\t\tif page.Reader() != nil {\n\t\t\tcmd.Stdin = page.Reader()\n\t\t\tbreak\n\t\t}\n\t}\n\n\terr := cmd.Run()\n\tif err != nil {\n\t\terrStr := errbuf.String()\n\t\tif strings.TrimSpace(errStr) == \"\" {\n\t\t\terrStr = err.Error()\n\t\t}\n\t\treturn errors.New(errStr)\n\t}\n\treturn nil\n}\n\n// NewPDFGenerator returns a new PDFGenerator struct with all options created and\n// checks if wkhtmltopdf can be found on the system\nfunc NewPDFGenerator() (*PDFGenerator, error) {\n\tpdfg := &PDFGenerator{\n\t\tglobalOptions:  newGlobalOptions(),\n\t\toutlineOptions: newOutlineOptions(),\n\t\tCover: cover{\n\t\t\tpageOptions: newPageOptions(),\n\t\t},\n\t\tTOC: toc{\n\t\t\tallTocOptions: allTocOptions{\n\t\t\t\ttocOptions:  newTocOptions(),\n\t\t\t\tpageOptions: newPageOptions(),\n\t\t\t},\n\t\t},\n\t}\n\terr := pdfg.findPath()\n\treturn pdfg, err\n}\n"
  },
  {
    "path": "utils/workweixin/workweixin.go",
    "content": "package workweixin\n\nimport (\n\t\"context\"\n\t\"crypto/tls\"\n\t\"encoding/json\"\n\t\"errors\"\n\n\t\"net/http\"\n\t\"time\"\n\n\t\"github.com/beego/beego/v2/client/httplib\"\n\t\"github.com/beego/beego/v2/core/logs\"\n\t\"github.com/mindoc-org/mindoc/cache\"\n\t\"github.com/mindoc-org/mindoc/conf\"\n)\n\n// doc\n// - 全局错误码: https://work.weixin.qq.com/api/doc/90000/90139/90313\n\nconst (\n\tAccessTokenCacheKey = \"access-token-cache-key\"\n\t// ContactAccessTokenCacheKey = \"contact-access-token-cache-key\"\n)\n\n// 获取访问凭据-请求响应结构\ntype AccessTokenResponse struct {\n\tErrCode     int    `json:\"errcode\"`\n\tErrMsg      string `json:\"errmsg\"`\n\tAccessToken string `json:\"access_token\"` // 获取到的凭证,最长为512字节\n\tExpiresIn   int    `json:\"expires_in\"`   // 凭证的有效时间（秒）\n}\n\n// 获取用户Id-请求响应结构\ntype UserIdResponse struct {\n\t// 接口文档: https://developer.work.weixin.qq.com/document/path/91023\n\tErrCode        int    `json:\"errcode\"`\n\tErrMsg         string `json:\"errmsg\"`\n\tUserId         string `json:\"userid\"`          // 企业成员UserID\n\tUserTicket     string `json:\"user_ticket\"`     // 用于获取敏感信息\n\tOpenId         string `json:\"openid\"`          // 非企业成员的标识，对当前企业唯一\n\tExternalUserId string `json:\"external_userid\"` // 外部联系人ID\n}\n\n// 获取成员ID列表-请求响应结构\ntype UserListIdResponse struct {\n\tErrCode    int                      `json:\"errcode\"`\n\tErrMsg     string                   `json:\"errmsg\"`\n\tNextCursor string                   `json:\"next_cursor\"` // 分页游标,下次请求时填写以获取之后分页的记录\n\tDeptUser   []WorkWeixinDeptUserInfo `json:\"dept_user\"`   // 用户-部门关系列表\n\n}\n\n// 获取用户信息-请求响应结构\ntype UserInfoResponse struct {\n\tErrCode        int    `json:\"errcode\"`\n\tErrMsg         string `json:\"errmsg\"`\n\tUserId         string `json:\"UserId\"`            // 企业成员UserID\n\tName           string `json:\"name\"`              // 成员名称\n\tHideMobile     int    `json:\"hide_mobile\"`       // 是否隐藏了手机号码\n\tMobile         string `json:\"mobile\"`            // 手机号码\n\tDepartment     []int  `json:\"department\"`        // 成员所属部门id列表\n\tEmail          string `json:\"email\"`             // 邮箱\n\tIsLeaderInDept []int  `json:\"is_leader_in_dept\"` // 表示在所在的部门内是否为上级\n\tIsLeader       int    `json:\"isleader\"`          // 是否是部门上级(领导)\n\tAvatar         string `json:\"avatar\"`            // 头像url\n\tAlias          string `json:\"alias\"`             // 别名\n\tStatus         int    `json:\"status\"`            // 激活状态: 1=已激活，2=已禁用，4=未激活，5=退出企业\n\tMainDepartment int    `json:\"main_department\"`   // 主部门\n}\n\ntype UserPrivateInfoResponse struct {\n\t// 文档地址: https://developer.work.weixin.qq.com/document/path/95833\n\tErrCode int    `json:\"errcode\"`\n\tErrMsg  string `json:\"errmsg\"`\n\tUserId  string `json:\"userid\"`   // 企业成员userid\n\tGender  string `json:\"gender\"`   // 成员性别\n\tAvatar  string `json:\"avatar\"`   // 头像\n\tQrCode  string `json:\"qr_code\"`  // 二维码\n\tMobile  string `json:\"mobile\"`   // 手机号\n\tMail    string `json:\"mail\"`     // 邮箱\n\tBizMail string `json:\"biz_mail\"` // 企业邮箱\n\tAddress string `json:\"address\"`  // 地址\n}\n\n// 访问凭据缓存-结构\ntype AccessTokenCache struct {\n\tAccessToken string    `json:\"access_token\"`\n\tExpiresIn   int       `json:\"expires_in\"`\n\tUpdateTime  time.Time `json:\"update_time\"`\n}\n\n// 企业微信用户敏感信息-结构\ntype WorkWeixinUserPrivateInfo struct {\n\tUserId  string `json:\"userid\"`   // 企业成员userid\n\tName    string `json:\"name\"`     // 姓名\n\tGender  string `json:\"gender\"`   // 成员性别\n\tAvatar  string `json:\"avatar\"`   // 头像\n\tQrCode  string `json:\"qr_code\"`  // 二维码\n\tMobile  string `json:\"mobile\"`   // 手机号\n\tMail    string `json:\"mail\"`     // 邮箱\n\tBizMail string `json:\"biz_mail\"` // 企业邮箱\n\tAddress string `json:\"address\"`  // 地址\n}\n\n// 企业微信用户信息-结构\ntype WorkWeixinDeptUserInfo struct {\n\tUserId     string `json:\"UserId\"`     // 企业成员UserID\n\tDepartment int    `json:\"department\"` // 成员所属部门id列表\n}\n\n// 企业微信用户信息-结构\ntype WorkWeixinUserInfo struct {\n\tUserId         string `json:\"UserId\"`            // 企业成员UserID\n\tName           string `json:\"name\"`              // 成员名称\n\tHideMobile     int    `json:\"hide_mobile\"`       // 是否隐藏了手机号码\n\tMobile         string `json:\"mobile\"`            // 手机号码\n\tDepartment     []int  `json:\"department\"`        // 成员所属部门id列表\n\tEmail          string `json:\"email\"`             // 邮箱\n\tIsLeaderInDept []int  `json:\"is_leader_in_dept\"` // 表示在所在的部门内是否为上级\n\tIsLeader       int    `json:\"isleader\"`          // 是否是部门上级(领导)\n\tAvatar         string `json:\"avatar\"`            // 头像url\n\tAlias          string `json:\"alias\"`             // 别名\n\tStatus         int    `json:\"status\"`            // 激活状态: 1=已激活，2=已禁用，4=未激活，5=退出企业\n\tMainDepartment int    `json:\"main_department\"`   // 主部门\n}\n\nfunc httpFilter(next httplib.Filter) httplib.Filter {\n\treturn func(ctx context.Context, req *httplib.BeegoHTTPRequest) (*http.Response, error) {\n\t\tr := req.GetRequest()\n\t\tlogs.Info(\"filter-url: \", r.URL)\n\t\t// Never forget invoke this. Or the request will not be sent\n\t\treturn next(ctx, req)\n\t}\n}\n\n// 获取访问凭据-请求\nfunc RequestAccessToken(corpid string, secret string) (cache_token AccessTokenCache, ok bool) {\n\turl := \"https://qyapi.weixin.qq.com/cgi-bin/gettoken\"\n\treq := httplib.Get(url)\n\treq.Param(\"corpid\", corpid)     // 企业ID\n\treq.Param(\"corpsecret\", secret) // 应用的凭证密钥\n\treq.SetTLSClientConfig(&tls.Config{InsecureSkipVerify: false})\n\treq.AddFilters(httpFilter)\n\tresp, err := req.Response()\n\t_ = resp\n\tvar token AccessTokenCache\n\tif err != nil {\n\t\tlogs.Error(err)\n\t\treturn token, false\n\t}\n\tvar atr AccessTokenResponse\n\terr = req.ToJSON(&atr)\n\tif err != nil {\n\t\tlogs.Error(err)\n\t\treturn token, false\n\t}\n\ttoken = AccessTokenCache{\n\t\tAccessToken: atr.AccessToken,\n\t\tExpiresIn:   atr.ExpiresIn,\n\t\tUpdateTime:  time.Now(),\n\t}\n\treturn token, true\n}\n\n// 获取访问凭据\nfunc GetAccessToken() (access_token string, ok bool) {\n\tvar cache_token AccessTokenCache\n\tcache_key := AccessTokenCacheKey\n\terr := cache.Get(cache_key, &cache_token)\n\tif err == nil {\n\t\tlogs.Info(\"AccessToken从缓存读取成功\")\n\t\t// TODO: access_token有效期判断, 刷新\n\t\treturn cache_token.AccessToken, true\n\t} else {\n\t\tlogs.Warning(err)\n\t\tworkweixinConfig := conf.GetWorkWeixinConfig()\n\t\tlogs.Debug(\"corp_id: \", workweixinConfig.CorpId)\n\t\tlogs.Debug(\"agent_id: \", workweixinConfig.AgentId)\n\t\tlogs.Debug(\"secret: \", workweixinConfig.Secret)\n\t\tsecret := workweixinConfig.Secret\n\t\tnew_token, ok := RequestAccessToken(workweixinConfig.CorpId, secret)\n\t\tif ok {\n\t\t\tlogs.Debug(new_token)\n\t\t\tif err = cache.Put(cache_key, new_token, time.Second*time.Duration(new_token.ExpiresIn)); err == nil {\n\t\t\t\tlogs.Info(\"AccessToken缓存写入成功\")\n\t\t\t\treturn new_token.AccessToken, true\n\t\t\t}\n\t\t\tlogs.Warning(\"AccessToken缓存写入失败\")\n\t\t\treturn \"\", false\n\t\t}\n\t\tlogs.Warning(\"AccessToken请求失败\")\n\t\treturn \"\", false\n\t}\n}\n\n// 获取用户id-请求\nfunc RequestUserId(access_token string, code string) (user_id string, ticket string, ok bool) {\n\turl := \"https://qyapi.weixin.qq.com/cgi-bin/auth/getuserinfo\"\n\treq := httplib.Get(url)\n\treq.Param(\"access_token\", access_token) // 应用调用接口凭证\n\treq.Param(\"code\", code)                 // 通过成员授权获取到的code\n\treq.SetTLSClientConfig(&tls.Config{InsecureSkipVerify: false})\n\treq.AddFilters(httpFilter)\n\tresp, err := req.Response()\n\t_ = resp\n\tif err != nil {\n\t\tlogs.Error(err)\n\t\treturn \"\", \"\", false\n\t}\n\tvar uir UserIdResponse\n\terr = req.ToJSON(&uir)\n\tif err != nil {\n\t\tlogs.Error(err)\n\t\treturn \"\", \"\", false\n\t}\n\treturn uir.UserId, uir.UserTicket, uir.UserId != \"\"\n}\n\nfunc RequestUserPrivateInfo(access_token, userid, ticket string) (WorkWeixinUserPrivateInfo, error) {\n\turl := \"https://qyapi.weixin.qq.com/cgi-bin/auth/getuserdetail?access_token=\" + access_token\n\treq := httplib.Post(url)\n\tbody := map[string]string{\n\t\t\"user_ticket\": ticket,\n\t}\n\tb, _ := json.Marshal(body)\n\treq.Body(b)\n\n\treq.SetTLSClientConfig(&tls.Config{InsecureSkipVerify: false})\n\treq.AddFilters(httpFilter)\n\tresp, err := req.Response()\n\t_ = resp\n\tvar uir UserPrivateInfoResponse\n\tvar info WorkWeixinUserPrivateInfo\n\tif err != nil {\n\t\tlogs.Error(err)\n\t\treturn info, err\n\t}\n\terr = req.ToJSON(&uir)\n\tif err != nil {\n\t\tlogs.Error(err)\n\t\treturn info, err\n\t}\n\n\tif uir.ErrCode != 0 {\n\t\treturn info, errors.New(uir.ErrMsg)\n\t}\n\n\tuser_info, err, _ := RequestUserInfo(access_token, userid)\n\tif err != nil {\n\t\treturn info, err\n\t}\n\n\tinfo = WorkWeixinUserPrivateInfo{\n\t\tUserId:  userid,\n\t\tName:    user_info.Name,\n\t\tGender:  uir.Gender,\n\t\tAvatar:  uir.Avatar,\n\t\tQrCode:  uir.QrCode,\n\t\tMobile:  uir.Mobile,\n\t\tMail:    uir.Mail,\n\t\tBizMail: uir.BizMail,\n\t\tAddress: uir.Address,\n\t}\n\treturn info, nil\n}\n\n/*\n获取用户详细信息-请求\n从2022年8月15日10点开始，“企业管理后台 - 管理工具 - 通讯录同步”的新增IP将不能再调用此接口\nurl:https://developer.work.weixin.qq.com/document/path/96079\n*/\nfunc RequestUserInfo(contact_access_token string, userid string) (user_info WorkWeixinUserInfo, error_msg error, ok bool) {\n\turl := \"https://qyapi.weixin.qq.com/cgi-bin/user/get\"\n\treq := httplib.Get(url)\n\treq.Param(\"access_token\", contact_access_token) // 通讯录应用调用接口凭证\n\treq.Param(\"userid\", userid)                     // 成员UserID\n\treq.SetTLSClientConfig(&tls.Config{InsecureSkipVerify: false})\n\treq.AddFilters(httpFilter)\n\tresp_str, err := req.String()\n\t_ = resp_str\n\tvar info WorkWeixinUserInfo\n\tif err != nil {\n\t\tlogs.Error(err)\n\t\treturn info, err, false\n\t} else {\n\t\tlogs.Debug(resp_str)\n\t}\n\tvar uir UserInfoResponse\n\terr = req.ToJSON(&uir)\n\tif err != nil {\n\t\tlogs.Error(err)\n\t\treturn info, err, false\n\t}\n\tif uir.ErrCode != 0 {\n\t\treturn info, errors.New(uir.ErrMsg), false\n\t}\n\tinfo = WorkWeixinUserInfo{\n\t\tUserId:         uir.UserId,\n\t\tName:           uir.Name,\n\t\tHideMobile:     uir.HideMobile,\n\t\tMobile:         uir.Mobile,\n\t\tDepartment:     uir.Department,\n\t\tEmail:          uir.Email,\n\t\tIsLeaderInDept: uir.IsLeaderInDept,\n\t\tIsLeader:       uir.IsLeader,\n\t\tAvatar:         uir.Avatar,\n\t\tAlias:          uir.Alias,\n\t\tStatus:         uir.Status,\n\t\tMainDepartment: uir.MainDepartment,\n\t}\n\treturn info, nil, true\n}\n\n/*\n获取成员ID列表\n*/\nfunc GetUserListId(contact_access_token string, userid string) (user_info WorkWeixinDeptUserInfo, error_msg string, ok bool) {\n\turl := \"https://qyapi.weixin.qq.com/cgi-bin/user/list_id\"\n\treq := httplib.Get(url)\n\treq.Param(\"access_token\", contact_access_token) // 通讯录应用调用接口凭证\n\treq.SetTLSClientConfig(&tls.Config{InsecureSkipVerify: false})\n\treq.AddFilters(httpFilter)\n\trespStr, err := req.String()\n\t_ = respStr\n\n\tvar info WorkWeixinDeptUserInfo\n\tif err != nil {\n\t\tlogs.Error(err)\n\t\treturn info, \"请求失败\", false\n\t} else {\n\t\tlogs.Debug(respStr)\n\t}\n\n\t// 返回响应\n\tvar uir UserListIdResponse\n\t//获取用户信息失败: 请求数据结果错误\n\terr = req.ToJSON(&uir)\n\tif err != nil {\n\t\tlogs.Error(err)\n\t\treturn info, \"请求数据结果错误\", false\n\t}\n\n\tif uir.ErrCode != 0 {\n\t\treturn info, uir.ErrMsg, false\n\t}\n\n\t// 判断userid 中是否还有当前用户id\n\tfor i := 0; i < len(uir.DeptUser); i++ {\n\t\tif uir.DeptUser[i].UserId == userid {\n\t\t\tinfo = WorkWeixinDeptUserInfo{\n\t\t\t\tUserId: uir.DeptUser[i].UserId,\n\t\t\t}\n\t\t\treturn info, \"\", true\n\t\t}\n\t}\n\treturn info, uir.ErrMsg, false\n}\n"
  },
  {
    "path": "utils/ziptil/ziptil.go",
    "content": "package ziptil\n\nimport (\n\t\"archive/zip\"\n\t\"fmt\"\n\t\"io\"\n\t\"os\"\n\t\"path/filepath\"\n\t\"strings\"\n)\n\n//解压zip文件\n//@param\t\t\tzipFile\t\t\t需要解压的zip文件\n//@param\t\t\tdest\t\t\t需要解压到的目录\n//@return\t\t\terr\t\t\t\t返回错误\nfunc Unzip(zipFile, dest string) (err error) {\n\tdest = strings.TrimSuffix(dest, \"/\") + \"/\" // Make sure suffix with \"/\".\n\t// 打开一个zip格式文件\n\tr, err := zip.OpenReader(zipFile)\n\tif err != nil {\n\t\treturn err\n\t}\n\tdefer r.Close()\n\t// 迭代压缩文件中的文件，打印出文件中的内容\n\tfor _, f := range r.File {\n\t\tif !f.FileInfo().IsDir() {\n\t\t\tpath := filepath.Join(dest, f.Name)\n\n\t\t\t// logs.Debug(\"file name: \", f.Name, \",dest:\", dest,\n\t\t\t// \t\",absolute path: \", filepath.Join(dest, f.Name),\n\t\t\t// \t\",absolute dir: \", filepath.Dir(path),\n\t\t\t// \t\",relative dir: \", filepath.Dir(f.Name))\n\n\t\t\tif dir := filepath.Dir(path); !strings.Contains(dir, \"__MACOSX\") {\n\t\t\t\t// This branch : 非目录，且不包含__MACOSX目录\n\n\t\t\t\t/*\tResolve the Zip Slip problem.(Solution: The decompressed file must be in the DEST directory.)\n\t\t\t\t\tReferences: https://github.com/golang/go/issues/25849\n\t\t\t\t\t\t\t\thttps://github.com/mholt/archiver/blob/e4ef56d48eb029648b0e895bb0b6a393ef0829c3/archiver.go#L110-L119 */\n\t\t\t\tif !strings.HasPrefix(path, filepath.Clean(dest)+string(os.PathSeparator)) {\n\t\t\t\t\treturn fmt.Errorf(\"illegal file path: %s\", path)\n\t\t\t\t}\n\n\t\t\t\tos.MkdirAll(dir, 0777)\n\t\t\t\tif fcreate, err := os.Create(path); err == nil {\n\t\t\t\t\tif rc, err := f.Open(); err == nil {\n\t\t\t\t\t\tio.Copy(fcreate, rc)\n\t\t\t\t\t\trc.Close() //不要用defer来关闭，如果文件太多的话，会报too many open files 的错误\n\t\t\t\t\t\tfcreate.Close()\n\t\t\t\t\t} else {\n\t\t\t\t\t\tfcreate.Close()\n\t\t\t\t\t\treturn err\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn nil\n}\n\n//压缩文件\nfunc Zip(source, target string) error {\n\tzipFile, err := os.Create(target)\n\tif err != nil {\n\t\treturn err\n\t}\n\tdefer zipFile.Close()\n\n\tarchive := zip.NewWriter(zipFile)\n\tdefer archive.Close()\n\tsource = strings.Replace(source, \"\\\\\", \"/\", -1)\n\n\tfilepath.Walk(source, func(path string, info os.FileInfo, err error) error {\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tpath = strings.Replace(path, \"\\\\\", \"/\", -1)\n\n\t\tif path == source {\n\t\t\treturn nil\n\t\t}\n\t\theader, err := zip.FileInfoHeader(info)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\theader.Name = strings.TrimPrefix(strings.TrimPrefix(strings.Replace(path, \"\\\\\", \"/\", -1), source), \"/\")\n\n\t\tif info.IsDir() {\n\t\t\theader.Name += \"/\"\n\t\t} else {\n\t\t\theader.Method = zip.Deflate\n\t\t}\n\n\t\twriter, err := archive.CreateHeader(header)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\tif info.IsDir() {\n\t\t\treturn nil\n\t\t}\n\n\t\tfile, err := os.Open(path)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tdefer file.Close()\n\t\t_, err = io.Copy(writer, file)\n\t\treturn err\n\t})\n\n\treturn err\n}\n\n////压缩指定文件或文件夹\n////@param\t\t\tdest\t\t\t压缩后的zip文件目标，如/usr/local/hello.zip\n////@param\t\t\tfilepath\t\t需要压缩的文件或者文件夹\n////@return\t\t\terr\t\t\t\t错误。如果返回错误，则会删除dest文件\n//func Zip(dest string, filepath ...string) (err error) {\n//\tif len(filepath) == 0 {\n//\t\treturn errors.New(\"lack of file\")\n//\t}\n//\t//创建文件\n//\tfzip, err := os.Create(dest)\n//\tif err != nil {\n//\t\treturn err\n//\t}\n//\tdefer fzip.Close()\n//\n//\tvar filelist []filetil.FileList\n//\tfor _, file := range filepath {\n//\t\tif info, err := os.Stat(file); err == nil {\n//\t\t\tif info.IsDir() { //目录，则扫描文件\n//\t\t\t\tif f, _ := filetil.ScanFiles(file); len(f) > 0 {\n//\t\t\t\t\tfilelist = append(filelist, f...)\n//\t\t\t\t}\n//\t\t\t} else { //文件\n//\t\t\t\tfilelist = append(filelist, filetil.FileList{\n//\t\t\t\t\tIsDir: false,\n//\t\t\t\t\tName:  info.Name(),\n//\t\t\t\t\tPath:  file,\n//\t\t\t\t})\n//\t\t\t}\n//\t\t} else {\n//\t\t\treturn err\n//\t\t}\n//\t}\n//\tw := zip.NewWriter(fzip)\n//\tdefer w.Close()\n//\tfor _, file := range filelist {\n//\t\tif !file.IsDir {\n//\t\t\tif fw, err := w.Create(strings.TrimLeft(file.Path, \"./\")); err != nil {\n//\t\t\t\treturn err\n//\t\t\t} else {\n//\t\t\t\tif fileContent, err := ioutil.ReadFile(file.Path); err != nil {\n//\t\t\t\t\treturn err\n//\t\t\t\t} else {\n//\t\t\t\t\tif _, err = fw.Write(fileContent); err != nil {\n//\t\t\t\t\t\treturn err\n//\t\t\t\t\t}\n//\t\t\t\t}\n//\t\t\t}\n//\t\t}\n//\t}\n//\treturn\n//}\n\nfunc Compress(dst string, src string) (err error) {\n\td, _ := os.Create(dst)\n\tdefer d.Close()\n\tw := zip.NewWriter(d)\n\tdefer w.Close()\n\n\tsrc = strings.Replace(src, \"\\\\\", \"/\", -1)\n\tf, err := os.Open(src)\n\n\tif err != nil {\n\t\treturn err\n\t}\n\n\t//prefix := src[strings.LastIndex(src,\"/\"):]\n\n\terr = compress(f, \"\", w)\n\n\tif err != nil {\n\t\treturn err\n\t}\n\n\treturn nil\n}\n\nfunc compress(file *os.File, prefix string, zw *zip.Writer) error {\n\tinfo, err := file.Stat()\n\tif err != nil {\n\t\treturn err\n\t}\n\tif info.IsDir() {\n\t\tif prefix != \"\" {\n\t\t\tprefix = prefix + \"/\" + info.Name()\n\t\t} else {\n\t\t\tprefix = info.Name()\n\t\t}\n\t\tfileInfos, err := file.Readdir(-1)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tfor _, fi := range fileInfos {\n\t\t\tf, err := os.Open(file.Name() + \"/\" + fi.Name())\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\terr = compress(f, prefix, zw)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t}\n\t} else {\n\t\theader, err := zip.FileInfoHeader(info)\n\t\tif prefix != \"\" {\n\t\t\theader.Name = prefix + \"/\" + header.Name\n\t\t}\n\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\twriter, err := zw.CreateHeader(header)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = io.Copy(writer, file)\n\t\tfile.Close()\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\treturn nil\n}\n"
  },
  {
    "path": "views/account/auth2_callback.tpl",
    "content": "<!DOCTYPE html>\n<html lang=\"zh-cn\">\n<head>\n    <meta charset=\"utf-8\">\n    <link rel=\"shortcut icon\" href=\"{{cdnimg \"/static/favicon.ico\"}}\">\n    <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge,chrome=1\" />\n    <meta name=\"renderer\" content=\"webkit\" />\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n    <meta name=\"author\" content=\"MinDoc\" />\n    <title>用户登录 - Powered by MinDoc</title>\n    <meta name=\"keywords\" content=\"MinDoc,文档在线管理系统,WIKI,wiki,wiki在线,文档在线管理,接口文档在线管理,接口文档管理\">\n    <meta name=\"description\" content=\"MinDoc文档在线管理系统 {{.site_description}}\">\n    <!-- Bootstrap -->\n    <link href=\"{{cdncss \"/static/bootstrap/css/bootstrap.min.css\"}}\" rel=\"stylesheet\">\n    <link href=\"{{cdncss \"/static/font-awesome/css/font-awesome.min.css\"}}\" rel=\"stylesheet\">\n    <link href=\"{{cdncss \"/static/css/main.css\" \"version\"}}\" rel=\"stylesheet\">\n    <style type=\"text/css\">\n        .login > .login-body {\n            text-align: center;\n            padding-top: 1.5em;\n        }\n        .login > .login-body > a > strong:hover {\n            border-bottom: 1px solid #337ab7;\n        }\n        .login > .login-body > a > strong {\n            font-size: 1.5em;\n            vertical-align: middle;\n            padding: 0.5em;\n        }\n        .bind-existed-form > .form-group {\n            margin: auto 1.5em;\n            margin-top: 1em;\n        }\n    </style>\n    <!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->\n    <script src=\"{{cdnjs \"/static/jquery/1.12.4/jquery.min.js\"}}\"></script>\n    <script type=\"text/javascript\">\n        window.bind_existed = {{ .bind_existed }};\n        window.user_info_json = {{ .user_info_json }};\n        window.server_error_msg = \"{{ .error_msg }}\";\n        window.home_url = \"{{ .BaseUrl }}\";\n        window.account_bind = \"{{urlfor \"AccountController.Auth2BindAccount\" \":app\" .app}}\";\n        window.account_auto_create = \"{{urlfor \"AccountController.Auth2AutoAccount\" \":app\" .app}}\";\n    </script>\n</head>\n<body class=\"manual-container\">\n<header class=\"navbar navbar-static-top smart-nav navbar-fixed-top manual-header\" role=\"banner\">\n    <div class=\"container\">\n        <div class=\"navbar-header col-sm-12 col-md-6 col-lg-5\">\n            <a href=\"{{.BaseUrl}}\" class=\"navbar-brand\">{{.SITE_NAME}}</a>\n        </div>\n    </div>\n</header>\n<div class=\"container manual-body\">\n    <div class=\"row login\">\n        <div class=\"login-body\">\n            返回 <a href=\"{{ .BaseUrl }}\"><strong>首页</strong></a>\n        </div>\n    </div>\n    <div class=\"clearfix\"></div>\n    <script type=\"text/x-template\" id=\"bind-existed-template\">\n        <div role=\"form\" class=\"bind-existed-form\">\n            {{ .xsrfdata }}\n            <div class=\"form-group\">\n                <div class=\"input-group\">\n                    <div class=\"input-group-addon\">\n                        <i class=\"fa fa-user\"></i>\n                    </div>\n                    <input type=\"text\" class=\"form-control\" placeholder=\"邮箱 / 用户名\" name=\"account\" id=\"account\" autocomplete=\"off\">\n                </div>\n            </div>\n            <div class=\"form-group\">\n                <div class=\"input-group\">\n                    <div class=\"input-group-addon\">\n                        <i class=\"fa fa-lock\"></i>\n                    </div>\n                    <input type=\"password\" class=\"form-control\" placeholder=\"密码\" name=\"password\" id=\"password\" autocomplete=\"off\">\n                </div>\n            </div>\n        </div>\n    </script>\n</div>\n{{template \"widgets/footer.tpl\" .}}\n<!-- Include all compiled plugins (below), or include individual files as needed -->\n<script src=\"{{cdnjs \"/static/bootstrap/js/bootstrap.min.js\"}}\" type=\"text/javascript\"></script>\n<script src=\"{{cdnjs \"/static/layer/layer.js\"}}\" type=\"text/javascript\"></script>\n<script type=\"text/javascript\">\n    function showBindAccount() {\n        layer.confirm([\n            '检测到当前登录企业微信未绑定已有账户, 是否需要绑定已有账户?<br />',\n            '<ul style=\"padding-left: 1.2em;\">',\n                '<li>若已有账户， 请 <strong>去绑定</strong></li>',\n                '<li>若没有现有账户, 请 <strong>忽略绑定</strong></li>',\n            '</ul>'\n        ].join(''), {\n            title: \"WIKI-绑定提示\",\n            move: false,\n            area: 'auto',\n            offset: 'auto',\n            icon: 3,\n            btn: ['去绑定','忽略绑定'],\n        }, function(index, layero){\n            // layer.close(index);\n            // layer.msg(window.home_url);\n            // TODO: 现有账户[用户名+密码]查询现有账户 依据Session[user_info]绑定更新现有账户\n            console.log(\"yes\");\n            layer.open({\n                title: \"绑定已有账户\",\n                type: 1,\n                move: false,\n                area: 'auto',\n                offset: 'auto',\n                content: $('#bind-existed-template').html(),\n                btn: ['绑定','取消'],\n                yes: function(index, layero){\n                    $.ajax({\n                        url: window.account_bind,\n                        type: 'POST',\n                        beforeSend: function(request) {\n                            request.setRequestHeader(\"X-Xsrftoken\", $('.bind-existed-form input[name=\"_xsrf\"]').val());\n                        },\n                        data: {\n                            account: $('#account').val(),\n                            password: $('#password').val()\n                        },\n                        dataType: 'json',\n                        success: function(data) {\n                            if(data.errcode == 0) {\n                                layer.close(index);\n                                // layer.msg(JSON.stringify(data), {icon: 1, time: 15500});\n                                window.location.href = window.home_url;\n                            }\n                            else {\n                                layer.msg(data.message, {icon: 5, time: 3500});\n                            }\n                        },\n                        error: function(data) {\n                            console.log(data);\n                        }\n                    });\n                    return false;\n                },\n                cancel: function(index, layero){ \n                    // return false; // 不关闭\n                    layer.close(index);\n                    window.location.href = window.home_url;\n                }\n            });\n        }, function(index){\n            /*\n            // TODO: 依据Session[user_info]创建新账户\n            console.log(\"no\");\n            var msg = '';\n            // msg = \"<pre>\" + JSON.stringify(window.location, null, 4) + \"</pre>\";\n            msg = \"<pre>\" + JSON.stringify(window.user_info_json, null, 4) + \"</pre>\";\n            // msg = \"<pre>\" + window.user_info_json + \"</pre>\";\n            layer.open({\n                title: \"Degug-UserInfo\",\n                type: 1,\n                skin: 'layui-layer-rim',\n                move: false,\n                area: 'auto',\n                offset: 'auto',\n                content: msg\n            });\n            */\n            $.ajax({\n                url: window.account_auto_create,\n                type: 'GET',\n                beforeSend: function(request) {\n                    request.setRequestHeader(\"X-Xsrftoken\", $('.bind-existed-form input[name=\"_xsrf\"]').val());\n                },\n                data: {},\n                dataType: 'json',\n                success: function(data) {\n                    if(data.errcode == 0) {\n                        layer.close(index);\n                        layer.msg(JSON.stringify(data), {icon: 1, time: 15500});\n                        window.location.href = window.home_url;\n                    }\n                    else {\n                        layer.msg(data.message, {icon: 5, time: 3500});\n                    }\n                },\n                error: function(data) {\n                    console.log(data);\n                }\n            });\n            return false;\n        });\n    }\n    $(document).ready(function () {\n        $('#debug-panel').val($('html').html());\n        if (!!window.server_error_msg && window.server_error_msg.length > 0) {\n            layer.msg(window.server_error_msg, {icon: 5, time: 3500});\n        } else {\n            if (window.bind_existed === false) {\n                showBindAccount();\n            } else {\n                // alert(typeof window.bind_existed);\n                // alert('_' + window.bind_existed + '_');\n                window.location.href = window.home_url;\n            }\n        }\n    });\n</script>\n</body>\n</html>"
  },
  {
    "path": "views/account/find_password_setp1.tpl",
    "content": "<!DOCTYPE html>\n<html lang=\"zh-cn\">\n<head>\n    <meta charset=\"utf-8\">\n    <link rel=\"shortcut icon\" href=\"{{cdnimg \"/static/favicon.ico\"}}\">\n    <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge,chrome=1\" />\n    <meta name=\"renderer\" content=\"webkit\" />\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n    <meta name=\"author\" content=\"MinDoc\" />\n    <title>{{i18n .Lang \"common.account_recovery\"}} - Powered by MinDoc</title>\n\n    <!-- Bootstrap -->\n    <link href=\"{{cdncss \"/static/bootstrap/css/bootstrap.min.css\"}}\" rel=\"stylesheet\">\n    <link href=\"{{cdncss \"/static/font-awesome/css/font-awesome.min.css\"}}\" rel=\"stylesheet\">\n    <link href=\"{{cdncss \"/static/css/main.css\" \"version\"}}\" rel=\"stylesheet\">\n    <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->\n    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->\n    <!--[if lt IE 9]>\n    <script src=\"/static/html5shiv/3.7.3/html5shiv.min.js\"></script>\n    <script src=\"/static/respond.js/1.4.2/respond.min.js\"></script>\n    <![endif]-->\n    <!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->\n    <script src=\"{{cdnjs \"/static/jquery/1.12.4/jquery.min.js\"}}\"></script>\n</head>\n<body class=\"manual-container\">\n<header class=\"navbar navbar-static-top smart-nav navbar-fixed-top manual-header\" role=\"banner\">\n    <div class=\"container\">\n        <div class=\"navbar-header col-sm-12 col-md-6 col-lg-5\">\n            <a href=\"{{.BaseUrl}}\" class=\"navbar-brand\">{{.SITE_NAME}}</a>\n        </div>\n    </div>\n</header>\n<div class=\"container manual-body\">\n    <div class=\"row login\">\n        <div class=\"login-body\">\n            <form role=\"form\" method=\"post\" id=\"findPasswordForm\">\n            {{ .xsrfdata }}\n                <h3 class=\"text-center\">{{i18n .Lang \"common.account_recovery\"}}</h3>\n                <div class=\"form-group\">\n                    <div class=\"input-group\">\n                        <div class=\"input-group-addon\">\n                            <i class=\"fa fa-at\"></i>\n                        </div>\n                        <input type=\"text\" class=\"form-control\" placeholder=\"{{i18n .Lang \"common.email\"}}\" name=\"email\" id=\"email\" autocomplete=\"off\">\n                    </div>\n                </div>\n                <div class=\"form-group\">\n                    <div class=\"input-group\" style=\"float: left;width: 195px;\">\n                        <div class=\"input-group-addon\">\n                            <i class=\"fa fa-check-square\"></i>\n                        </div>\n                        <input type=\"text\" name=\"code\" id=\"code\" class=\"form-control\" style=\"width: 150px\" maxlength=\"5\" placeholder=\"{{i18n .Lang \"common.captcha\"}}\" autocomplete=\"off\">&nbsp;\n                    </div>\n                    <img id=\"captcha-img\" style=\"width: 140px;height: 40px;display: inline-block;float: right\" src=\"{{urlfor \"AccountController.Captcha\"}}\" onclick=\"this.src='{{urlfor \"AccountController.Captcha\"}}?key=login&t='+(new Date()).getTime();\" title=\"{{i18n .Lang \"message.click_to_change\"}}\">\n                    <div class=\"clearfix\"></div>\n                </div>\n\n                <div class=\"form-group\">\n                    <button type=\"submit\" id=\"btnSendMail\" class=\"btn btn-success\" style=\"width: 100%\"  data-loading-text=\"{{i18n .Lang \"message.processing\"}}\" autocomplete=\"off\">{{i18n .Lang \"common.account_recovery\"}}</button>\n                </div>\n\n            </form>\n        </div>\n    </div>\n    <div class=\"clearfix\"></div>\n</div>\n{{template \"widgets/footer.tpl\" .}}\n<!-- Include all compiled plugins (below), or include individual files as needed -->\n<script src=\"{{cdnjs \"/static/bootstrap/js/bootstrap.min.js\"}}\" type=\"text/javascript\"></script>\n<script src=\"{{cdnjs \"/static/layer/layer.js\"}}\" type=\"text/javascript\"></script>\n<script src=\"{{cdnjs \"/static/js/jquery.form.js\"}}\" type=\"text/javascript\"></script>\n<script type=\"text/javascript\">\n    $(function () {\n        $(\"#email,#code\").on('focus',function () {\n            $(this).tooltip('destroy').parents('.form-group').removeClass('has-error');;\n        });\n\n        $(document).keydown(function (e) {\n            var event = document.all ? window.event : e;\n            if(event.keyCode == 13){\n                $(\"#btn-login\").click();\n            }\n        });\n\n        $(\"#findPasswordForm\").ajaxForm({\n            beforeSubmit : function () {\n                var $btn = $(this).button('loading');\n\n                var email = $.trim($(\"#email\").val());\n                if(email === \"\"){\n                    $(\"#email\").tooltip({placement:\"auto\",title : \"{{i18n .Lang \"message.email_empty\"}}\",trigger : 'manual'})\n                        .tooltip('show')\n                        .parents('.form-group').addClass('has-error');\n                    $btn.button('reset');\n                    return false;\n\n                }\n                var code = $.trim($(\"#code\").val());\n                if(code === \"\"){\n                    $(\"#code\").tooltip({title : '{{i18n .Lang \"message.captcha_empty\"}}',trigger : 'manual'})\n                        .tooltip('show')\n                        .parents('.form-group').addClass('has-error');\n                    $btn.button('reset');\n                    return false;\n                }\n                $(\"#btnSendMail\").button(\"loading\");\n            },\n            success : function (res) {\n\n                if(res.errcode !== 0){\n                    $(\"#captcha-img\").click();\n                    $(\"#code\").val('');\n                    layer.msg(res.message);\n                    $(\"#btnSendMail\").button('reset');\n                }else{\n                    alert(\"{{i18n .Lang \"message.email_sent\"}}\")\n                    window.location = res.data;\n                }\n            },\n            error :function () {\n                $(\"#captcha-img\").click();\n                $(\"#code\").val('');\n                layer.msg('{{i18n .Lang \"message.system_error\"}}');\n                $(\"#btnSendMail\").button('reset');\n            }\n        });\n\n    });\n</script>\n</body>\n</html>"
  },
  {
    "path": "views/account/find_password_setp2.tpl",
    "content": "<!DOCTYPE html>\n<html lang=\"zh-cn\">\n<head>\n    <meta charset=\"utf-8\">\n    <link rel=\"shortcut icon\" href=\"{{cdnimg \"/static/favicon.ico\"}}\">\n    <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge,chrome=1\" />\n    <meta name=\"renderer\" content=\"webkit\" />\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n    <meta name=\"author\" content=\"MinDoc\" />\n    <title>{{i18n .Lang \"common.account_recovery\"}} - Powered by MinDoc</title>\n\n    <!-- Bootstrap -->\n    <link href=\"{{cdncss \"/static/bootstrap/css/bootstrap.min.css\"}}\" rel=\"stylesheet\">\n    <link href=\"{{cdncss \"/static/font-awesome/css/font-awesome.min.css\"}}\" rel=\"stylesheet\">\n    <link href=\"{{cdncss \"/static/css/main.css\" \"version\"}}\" rel=\"stylesheet\">\n    <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->\n    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->\n    <!--[if lt IE 9]>\n    <script src=\"/static/html5shiv/3.7.3/html5shiv.min.js\"></script>\n    <script src=\"/static/respond.js/1.4.2/respond.min.js\"></script>\n    <![endif]-->\n    <!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->\n    <script src=\"{{cdnjs \"/static/jquery/1.12.4/jquery.min.js\"}}\"></script>\n</head>\n<body class=\"manual-container\">\n<header class=\"navbar navbar-static-top smart-nav navbar-fixed-top manual-header\" role=\"banner\">\n    <div class=\"container\">\n        <div class=\"navbar-header col-sm-12 col-md-6 col-lg-5\">\n            <a href=\"{{.BaseUrl}}\" class=\"navbar-brand\">{{.SITE_NAME}}</a>\n        </div>\n    </div>\n</header>\n<div class=\"container manual-body\">\n    <div class=\"row login\">\n        <div class=\"login-body\">\n            <form role=\"form\" method=\"post\" id=\"findPasswordForm\" action=\"{{urlfor \"AccountController.ValidEmail\"}}\">\n            {{ .xsrfdata }}\n                <input type=\"hidden\" name=\"token\" value=\"{{.Token}}\">\n                <input type=\"hidden\" name=\"mail\" value=\"{{.Email}}\">\n                <h3 class=\"text-center\">{{i18n .Lang \"common.account_recovery\"}}</h3>\n                <div class=\"form-group\">\n                    <label for=\"newPasswd\">{{i18n .Lang \"common.new_password\"}}</label>\n                    <input type=\"password\" class=\"form-control\" name=\"password1\" id=\"newPassword\" maxlength=\"20\" placeholder=\"{{i18n .Lang \"common.new_password\"}}\"  autocomplete=\"off\">\n                </div>\n                <div class=\"form-group\">\n                    <label for=\"configPasswd\">{{i18n .Lang \"common.confirm_password\"}}</label>\n                    <input type=\"password\" class=\"form-control\" id=\"confirmPassword\" name=\"password2\" maxlength=\"20\" placeholder=\"{{i18n .Lang \"common.confirm_password\"}}\"  autocomplete=\"off\">\n                </div>\n\n                <div class=\"form-group\">\n                    <div class=\"input-group\" style=\"float: left;width: 195px;\">\n                        <div class=\"input-group-addon\">\n                            <i class=\"fa fa-check-square\"></i>\n                        </div>\n                        <input type=\"text\" name=\"code\" id=\"code\" class=\"form-control\" style=\"width: 150px\" maxlength=\"5\" placeholder=\"{{i18n .Lang \"common.captcha\"}}\" autocomplete=\"off\">&nbsp;\n                    </div>\n                    <img id=\"captcha-img\" style=\"width: 140px;height: 40px;display: inline-block;float: right\" src=\"{{urlfor \"AccountController.Captcha\"}}\" onclick=\"this.src='{{urlfor \"AccountController.Captcha\"}}?key=login&t='+(new Date()).getTime();\" title=\"点击换一张\">\n                    <div class=\"clearfix\"></div>\n                </div>\n                <div class=\"form-group\">\n                    <button type=\"submit\" id=\"btnSendMail\" class=\"btn btn-success\" style=\"width: 100%\"  data-loading-text=\"{{i18n .Lang \"message.processing\"}}\" autocomplete=\"off\">{{i18n .Lang \"common.account_recovery\"}}</button>\n                </div>\n\n            </form>\n        </div>\n    </div>\n    <div class=\"clearfix\"></div>\n</div>\n{{template \"widgets/footer.tpl\" .}}\n<!-- Include all compiled plugins (below), or include individual files as needed -->\n<script src=\"{{cdnjs \"/static/bootstrap/js/bootstrap.min.js\"}}\" type=\"text/javascript\"></script>\n<script src=\"{{cdnjs \"/static/layer/layer.js\"}}\" type=\"text/javascript\"></script>\n<script src=\"{{cdnjs \"/static/js/jquery.form.js\"}}\" type=\"text/javascript\"></script>\n<script type=\"text/javascript\">\n    $(function () {\n        $(\"#email,#code\").on('focus',function () {\n            $(this).tooltip('destroy').parents('.form-group').removeClass('has-error');;\n        });\n\n        $(document).keydown(function (e) {\n            var event = document.all ? window.event : e;\n            if(event.keyCode == 13){\n                $(\"#btn-login\").click();\n            }\n        });\n\n        $(\"#findPasswordForm\").ajaxForm({\n            beforeSubmit : function () {\n\n                var newPassword = $.trim($(\"#newPassword\").val());\n                var confirmPassword = $.trim($(\"#confirmPassword\").val());\n                var code = $.trim($(\"#code\").val());\n\n                if(newPassword === \"\"){\n                    $(\"#newPassword\").tooltip({placement:\"auto\",title : \"{{i18n .Lang \"message.password_empty\"}}\",trigger : 'manual'})\n                        .tooltip('show')\n                        .parents('.form-group').addClass('has-error');\n\n                    return false;\n\n                }else if(confirmPassword === \"\"){\n                    $(\"#confirmPassword\").tooltip({placement:\"auto\",title : \"{{i18n .Lang \"message.confirm_password_empty\"}}\",trigger : 'manual'})\n                        .tooltip('show')\n                        .parents('.form-group').addClass('has-error');\n\n                    return false;\n                }else if(newPassword !== confirmPassword) {\n                    $(\"#confirmPassword\").tooltip({placement:\"auto\",title : \"{{i18n .Lang \"message.incorrect_confirm_password\"}}\",trigger : 'manual'})\n                        .tooltip('show')\n                        .parents('.form-group').addClass('has-error');\n\n                    return false;\n                }else if(code === \"\"){\n                    $(\"#code\").tooltip({title : '{{i18n .Lang \"message.captcha_empty\"}}',trigger : 'manual'})\n                        .tooltip('show')\n                        .parents('.form-group').addClass('has-error');\n\n                    return false;\n                }\n\n                $(\"#btnSendMail\").button(\"loading\");\n            },\n            success : function (res) {\n\n                if(res.errcode !== 0){\n                    $(\"#captcha-img\").click();\n                    $(\"#code\").val('');\n                    layer.msg(res.message);\n                    $(\"#btnSendMail\").button('reset');\n                }else{\n                    window.location = res.data;\n                }\n            },\n            error :function () {\n                $(\"#captcha-img\").click();\n                $(\"#code\").val('');\n                layer.msg('{{i18n .Lang \"message.system_error\"}}');\n                $(\"#btnSendMail\").button('reset');\n            }\n        });\n\n    });\n</script>\n</body>\n</html>"
  },
  {
    "path": "views/account/login.tpl",
    "content": "<!DOCTYPE html>\n<html lang=\"zh-cn\">\n<head>\n    <meta charset=\"utf-8\">\n    <link rel=\"shortcut icon\" href=\"{{cdnimg \"/static/favicon.ico\"}}\">\n    <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge,chrome=1\" />\n    <meta name=\"renderer\" content=\"webkit\" />\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n    <meta name=\"author\" content=\"MinDoc\" />\n    <title>{{i18n .Lang \"common.login\"}} - Powered by MinDoc</title>\n    <meta name=\"keywords\" content=\"MinDoc,文档在线管理系统,WIKI,wiki,wiki在线,文档在线管理,接口文档在线管理,接口文档管理\">\n    <meta name=\"description\" content=\"MinDoc文档在线管理系统 {{.site_description}}\">\n    <!-- Bootstrap -->\n    <link href=\"{{cdncss \"/static/bootstrap/css/bootstrap.min.css\"}}\" rel=\"stylesheet\">\n    <link href=\"{{cdncss \"/static/font-awesome/css/font-awesome.min.css\"}}\" rel=\"stylesheet\">\n    <link href=\"{{cdncss \"/static/css/main.css\" \"version\"}}\" rel=\"stylesheet\">\n    <style>\n        .line {\n            height:0;\n            border-top: 1px solid #cccccc;\n            text-align:center;\n            margin: 14px 0;\n        }\n        .line > .text {\n            position:relative;\n            top:-12px;\n            background-color:#fff;\n            padding: 5px;\n        }\n        .icon-box {\n            align-items: center;\n            justify-content: center;\n            display: flex;\n            display: -webkit-flex;\n        }\n\n        .icon {\n            box-sizing: border-box;\n            display: inline-block;\n            padding: 10px;\n            border-radius: 50%;\n            cursor: pointer;\n            margin: 0 5px;\n        }\n        .icon-disable {\n            background-color: #cccccc;\n            cursor: not-allowed;\n        }\n        .icon-disable:hover {\n            background-color: #bbbbbb;\n        }\n\n        .icon > img {\n            height: 24px;\n        }\n    </style>\n    <!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->\n    <script src=\"{{cdnjs \"/static/jquery/1.12.4/jquery.min.js\"}}\"></script>\n</head>\n<body class=\"manual-container\">\n<header class=\"navbar navbar-static-top smart-nav navbar-fixed-top manual-header\" role=\"banner\">\n    <div class=\"container\">\n        <div class=\"navbar-header col-sm-12 col-md-6 col-lg-5\">\n            <a href=\"{{.BaseUrl}}\" class=\"navbar-brand\">{{.SITE_NAME}}</a>\n        </div>\n    </div>\n</header>\n<div class=\"container manual-body\">\n    <div class=\"row login\">\n        <div class=\"login-body\">\n            <form role=\"form\" method=\"post\">\n            {{ .xsrfdata }}\n                <h3 class=\"text-center\">{{i18n .Lang \"common.login\"}}</h3>\n                <div class=\"form-group\">\n                    <div class=\"input-group\">\n                        <div class=\"input-group-addon\">\n                            <i class=\"fa fa-user\"></i>\n                        </div>\n                        <input type=\"text\" class=\"form-control\" placeholder=\"{{i18n .Lang \"common.email\"}} / {{i18n .Lang \"common.username\"}}\" name=\"account\" id=\"account\" autocomplete=\"off\">\n                    </div>\n                </div>\n                <div class=\"form-group\">\n                    <div class=\"input-group\">\n                        <div class=\"input-group-addon\">\n                            <i class=\"fa fa-lock\"></i>\n                        </div>\n                        <input type=\"password\" class=\"form-control\" placeholder=\"{{i18n .Lang \"common.password\"}}\" name=\"password\" id=\"password\" autocomplete=\"off\">\n                    </div>\n                </div>\n                {{if .ENABLED_CAPTCHA }}\n                {{if ne .ENABLED_CAPTCHA \"false\"}}\n                <div class=\"form-group\">\n                    <div class=\"input-group\" style=\"float: left;width: 195px;\">\n                        <div class=\"input-group-addon\">\n                            <i class=\"fa fa-check-square\"></i>\n                        </div>\n                        <input type=\"text\" name=\"code\" id=\"code\" class=\"form-control\" style=\"width: 150px\" maxlength=\"5\" placeholder=\"{{i18n .Lang \"common.captcha\"}}\" autocomplete=\"off\">&nbsp;\n                    </div>\n                    <img id=\"captcha-img\" style=\"width: 140px;height: 40px;display: inline-block;float: right\" src=\"{{urlfor \"AccountController.Captcha\"}}\" onclick=\"this.src='{{urlfor \"AccountController.Captcha\"}}?key=login&t='+(new Date()).getTime();\" title={{i18n .Lang \"message.click_to_change\"}}>\n                    <div class=\"clearfix\"></div>\n                </div>\n                {{end}}\n                {{end}}\n                <div class=\"checkbox\">\n                    <label>\n                        <input type=\"checkbox\" name=\"is_remember\" value=\"yes\"> {{i18n .Lang \"common.keep_login\"}}\n                    </label>\n                    <a href=\"{{urlfor \"AccountController.FindPassword\" }}\" style=\"display: inline-block;float: right\">{{i18n .Lang \"common.forgot_password\"}}</a>\n                </div>\n                <div class=\"form-group\">\n                    <button type=\"button\" id=\"btn-login\" class=\"btn btn-success\" style=\"width: 100%\"  data-loading-text=\"{{i18n .Lang \"message.logging_in\"}}\" autocomplete=\"off\">{{i18n .Lang \"common.login\"}}</button>\n                </div>\n                {{if .ENABLED_REGISTER}}\n                    {{if ne .ENABLED_REGISTER \"false\"}}\n                        <div class=\"form-group\">\n                            {{i18n .Lang \"message.no_account_yet\"}} <a href=\"{{urlfor \"AccountController.Register\" }}\" title={{i18n .Lang \"common.register\"}}>{{i18n .Lang \"common.register\"}}</a>\n                        </div>\n                    {{end}}\n                {{end}}\n                <div class=\"third-party\">\n                    <div class=\"line\">\n                        <span class=\"text\">{{i18n .Lang \"common.third_party_login\"}}</span>\n                    </div>\n                    <div class=\"icon-box\">\n                        <div class=\"icon {{ if .CanLoginDingTalk }}btn-success{{else}}icon-disable{{end}}\" title=\"{{i18n .Lang \"common.dingtalk_login\"}}\" data-url=\"{{ .dingtalk_login_url }}\">\n                            <img alt=\"{{i18n .Lang \"common.dingtalk_login\"}}\" src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAAAXNSR0IArs4c6QAAA9hJREFUaEPNmVvoZ1MUxz/fPOBR8uJBya0QXmRqhsZtasq4xQMP7h5GyiR5MIkHlOQBDyaEcmvGrTBCYjDuKbmUW3jyQF7kEsrSd9pHx+9/fufss8/5/85v1e7/6/9ba+31OXutfdbeP9EgEfE6cChwN3CXpL+a9Jbhf2oBWJ+++wN42DCSvliGoOsx5ADU9R8zjKRXlwWkL0AV905gO7BD0p9TwswDuAG4NSOwrxPIdkmfZeiPrjIP4Fjg456z7TCMpGd62g1SbwSwx4h4DzihwLvBnV6G+a7AvpdJG8BW4JZe3v6v/HsN5OUBflpN2wCOBj4daeLdLvi0Kj+O5HOPm7kAKY2eAzaNOOHPgH3uGZL+Geq7C8AvM7+VV0O8gxnkeUlvlE7QCpBW4QrgYmBd6SQZdh8ATwFPSvo+Q/8/lU6ASjMizksgZ/SZoKfub4ZIIC/m2GYD1ECOAs5MY03OJIU6HwIPSLqvzb6rBo4A3MB9A3wOvAXslvR+Sq8TU5EbyLqrIR8BWyR5J1shnSsQEd8CBzfYurhdfIbyOBXYmMZhq0CyTtLbs35zAO4HXMg58mgqRgPdNDKMt92zSgAuAB7Pib5B5wfAUG7Dz01Qha7YJenk3gAp118BTi+deSS7OyVdVwrg4A0xpWyU9FIRQFqFmwemwBD4JyRdWLQL1Y0iYiqINdXWXbwClWFEXAVcCxwy5JH2sPWtyJZ5+p3baJNhRBwAHAfsm8Y+M3/3ArwD1Yfb876NoVtvP/25B6MigJm02h/wEdTDUNXnHg95rupWSbe1OSoGSPVwDnDMGJE2+PAlgZ++G7y5MgTAbUNWx1gIeJmkh7psiwHS1upj4vldkxR8/7Qkt++dMghglSB+AU6R5C60UwYDJIgx3w83Ssq+DRkFIEG4oO9oeT/8BPhK0nXj1GuSN4HTJP3d+eiTwmgACWI/YENq/KoXnS/IdlYHkogw5IqmLMWzSdILucFbb1SAnIkjwoegkxp0d82zb2qjK92FAkTEQcCXgN/cOfIrcHzb7xKLBvDW6FuHXLlI0iNtyosGuB24PjN6/yJ0TZfuogFeA1YcCxuCfEfS2q7gF1rEEXE4cGBDUN5W3dVW4rxfK+mTpQJoCiYiLgFm+53LJT2YE/xCV2AOgG/drqx9d68kH5iyZaE1MBtVRLhl9lWlJTvv634mA4iII9N1peNx3q/PbeCWBeBq4J4UzGZJ27LzpqY45Qo8C5wNbJO0uST4SYs4ItydfpVSJ7v7nAWdZAVST+Tr+g2S3i19+pOtQERcCuxdmveTF3FEeL8vzvs6wL8iyC9AZnHsagAAAABJRU5ErkJggg==\">\n                        </div>\n                        <div class=\"icon {{ if .CanLoginWorkWeixin }}btn-success{{else}}icon-disable{{end}}\" title=\"{{i18n .Lang \"common.wecom_login\"}}\" data-url=\"{{ .workweixin_login_url }}\">\n                            <img alt=\"{{i18n .Lang \"common.wecom_login\"}}\" src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAAAXNSR0IArs4c6QAABE9JREFUaEPtmVvIpWMUx3//IkkYhgkXTBiFHEPjVCYXJscJMyOHMEUZN0NOuWEuJCPHhBnqk0MuhmYaoswFQoYoTAqNHBqH0IyRK9Jfa/e80/u93/vt5917v/vb31ez6m1fPOv0f9Z6nrWetcUMJ81w/xkIgO3DgTOBY4H9St8fwPfAD+l3o6T/hrFZPQOwfSFwMXBGcryJX/8CLwFvAgFmexOhJjyNASTHbwQuaqK4C8/PwDPAakm/DKgrn0K25wKPAIsGNVaRL4DcJyki1Bd1jYDt84ExYE5f2psJvQ8s6TcakwKwfTuwqpkPA3NtAxZI+qJXTbUAbJ8DvN2rshb4T5H0aS96JgCwfRTwdS9KWuY9UFJcw41oHADbewMbgIjAqGiDpEuaGq8CeBK4qanwEPlWSHqsif6dAGwfCsQh2reJ4JB5vgPmS/otZ6cM4C7g/pzAFK4vl/RUzl4ZQOz+cTmBKVx/VdLlOXsdACl9ovGaTrRd0v45hwoAZwHv5ZhHsD5L0o5udgsAV6ZucQQ+djU5T9KWJgCmwwF+AViTimg0d1GLfpW0qQmA61LTNqoIrJW0pB/jRQqdCnzcj4IWZDZLOj5dJvsApwOHAW9JilddVyoA7AX8CeyWExjC+kpJ9yYAH6SXXmHmaElfZVMoCX8GnDAEB3Mqo41+x/bVQJyDMq2TdGlTALEL9+SsDWG9ABAvvnUV/f8AR0jaOpndciU+GPgEOGQITtapjPy+W9LLKQNmRd4DcR7LdK2k57MAkpKpiMJK4MP4JP2V7M4HFsZZsB1ZsLg08YhrNNZqC1q1nR5mFOIwLpI07rFk+/o0NFgj6Y5ip20HiOWpHoxJWlYXhboX2Q2poLSZSTskRYp0yHZcm2enbynwmqSYNU0g20VWzJH0e5VhsjfxQ8CtLSJYJmnM9pHAw5XZUgy5TuvWMqRmMyYj8eA6Js2V3pW0vttU4nXgghZAbJIUxSl2vu6MNWqbbb8IXFXyp6O3G4DYrY1ADLYGoS2S5iUAMemovrezDxfbJwN104oFucFWvNCi0RuEduZ/zazpR+AkSTEXmpRs3wY8WGHYJml2DkDc0VcM4n2SvUXSoykKNwNPAF8CjwPfRCXOAIih8MISz0fA05KeywGI+zru6DZoD0lRWceRbadOOEBOuOttr0jX7OfA+phwSwoAHcoBiOnxQTXeB7ComnsCB6RvduV3MxDft0C0AlslvVEDoHAwClZEJhzspJTtE9OEcG2q2hMGXjkAsTtlioP0gKRQ2BrZXg3E6D4onI+UCTC7A+cW3WqdwRyA4tYIx6NSxoupdUr/9ESlDocL+htYWhe1sgM5APHAmNvP1LhXlLZfAS6ryD0rKTqDSanxPzS9OtQrv+1rgGrXuUrSnTMCQDq05bMQF8ViST/NGAAJRLQd53U7uI3PQK9pMAr+aXMG+gW/C0C/O9eW3K4ItLWT/eqZ8RH4H4Zge30AMjOdAAAAAElFTkSuQmCC\">\n                        </div>\n                    </div>\n                </div>\n            </form>\n        </div>\n    </div>\n    <div class=\"clearfix\"></div>\n</div>\n{{template \"widgets/footer.tpl\" .}}\n<!-- Include all compiled plugins (below), or include individual files as needed -->\n<script src=\"{{cdnjs \"/static/bootstrap/js/bootstrap.min.js\"}}\" type=\"text/javascript\"></script>\n<script src=\"{{cdnjs \"/static/layer/layer.js\"}}\" type=\"text/javascript\"></script>\n\n<script type=\"text/javascript\">\n    $(document).ready(function () {\n        $(\"#account,#password,#code\").on('focus', function () {\n            $(this).tooltip('destroy').parents('.form-group').removeClass('has-error');\n        });\n\n        $(document).keydown(function (e) {\n            var event = document.all ? window.event : e;\n            if (event.keyCode === 13) {\n                $(\"#btn-login\").click();\n            }\n        });\n\n        $(\".icon\").on('click', function (){\n           if ($(this).hasClass(\"icon-disable\")) {\n               return;\n           }\n           window.location.href = $(this).data(\"url\");\n        })\n\n        $(\"#btn-login\").on('click', function () {\n            $(this).tooltip('destroy').parents('.form-group').removeClass('has-error');\n            var $btn = $(this).button('loading');\n\n            var account = $.trim($(\"#account\").val());\n            var password = $.trim($(\"#password\").val());\n            var code = $(\"#code\").val();\n\n            if (account === \"\") {\n                $(\"#account\").tooltip({ placement: \"auto\", title: \"{{i18n .Lang \"message.account_empty\"}}\", trigger: 'manual' })\n                    .tooltip('show')\n                    .parents('.form-group').addClass('has-error');\n                $btn.button('reset');\n                return false;\n            } else if (password === \"\") {\n                $(\"#password\").tooltip({ title: '{{i18n .Lang \"message.password_empty\"}}', trigger: 'manual' })\n                    .tooltip('show')\n                    .parents('.form-group').addClass('has-error');\n                $btn.button('reset');\n                return false;\n            } else if (code !== undefined && code === \"\") {\n                $(\"#code\").tooltip({ title: '{{i18n .Lang \"message.captcha_empty\"}}', trigger: 'manual' })\n                    .tooltip('show')\n                    .parents('.form-group').addClass('has-error');\n                $btn.button('reset');\n                return false;\n            } else {\n                $.ajax({\n                    url: \"{{urlfor \"AccountController.Login\" \"url\" .url}}\",\n                    data: $(\"form\").serializeArray(),\n                    dataType: \"json\",\n                    type: \"POST\",\n                    success: function (res) {\n                        if (res.errcode !== 0) {\n                            $(\"#captcha-img\").click();\n                            $(\"#code\").val('');\n                            layer.msg(res.message);\n                            $btn.button('reset');\n                        } else {\n                            turl = res.data;\n                            if (turl === \"\") {\n                                turl = \"/\";\n                            }\n                            window.location = turl;\n                        }\n                    },\n                    error: function () {\n                        $(\"#captcha-img\").click();\n                        $(\"#code\").val('');\n                        layer.msg('{{i18n .Lang \"message.system_error\"}}');\n                        $btn.button('reset');\n                    }\n                });\n            }\n\n            return false;\n        });\n    });\n</script>\n</body>\n</html>"
  },
  {
    "path": "views/account/mail_template.tpl",
    "content": "<!DOCTYPE html>\n<html>\n<head>\n    <meta http-equiv=\"Content-Type\" content=\"text/html;charset=utf-8\"/>\n    <title>找回密码 - Powered by MinDoc</title>\n    <style type=\"text/css\">\n        .ua-macos::-webkit-scrollbar{ display: none; }\n        html,body{background-color: transparent;margin:0;padding: 0;}\n        body{font: 16px/1.5 \"Microsoft Yahei\", \"微软雅黑\", verdana;word-wrap:break-word;}\n        .js-dialog{font-size: 14px;}\n        pre, .js-pre {\n            white-space: pre-wrap;\n            white-space: -moz-pre-wrap;\n            white-space: -pre-wrap;\n            white-space: -o-pre-wrap;\n            word-wrap: break-word;\n            font: 16px/1.5 \"Microsoft Yahei\", \"微软雅黑\", verdana;\n            padding:8px 10px;margin:0;\n        }\n        .rm_line{border-top:2px solid #F1F1F1; font-size:0; margin:15px 0}\n        .atchImg img{border:2px solid #c3d9ff;}\n        .lnkTxt{ color:#0066CC}\n        .rm_PicArea *{ font-family: \"Microsoft Yahei\", \"微软雅黑\", verdana;font-size:16px;font-weight:700;}\n        .fbk3{ color:#333; line-height:160%}\n        .fTip{ font-size:11px; font-weight:normal}\n\n        img{border:none;vertical-align: middle;}\n        iframe{display:none;}\n        *{word-break:break-word;}\n        #neteaseEncryptedMail{display:none;}\n        #jy-translate{\n            position: absolute;\n            max-width: 500px;\n            min-width: 100px;\n            _width:300px;\n            border: 1px solid rgb(204, 204, 204);\n            padding: 4px 18px 4px 10px;\n            background-color: #f9f9f9;\n            -webkit-border-radius:3px;\n            -moz-border-radius:3px;\n            border-radius:3px;\n            -webkit-box-shadow:#dddddd 0px 0px 10px;\n            -moz-box-shadow:#dddddd 0px 0px 10px;\n            box-shadow:#dddddd 0px 0px 10px;\n        }\n        #jy-translate h2,\n        #jy-translate p{color:#555;margin:0;padding:0;}\n        #jy-translate h2{line-height: 28px;font-size: 14px;}\n        #jy-translate p{line-height: 24px;font-size: 12px;}\n        #jy-translate h2 span{font-weight:normal;}\n        .ua-noyahei,\n        .ua-noyahei .pre,\n        .ua-noyahei .js-pre,\n        .ua-noyahei .rm_PicArea *{font-family: \\5b8b\\4f53, sans-serif;}\n        .ua-macos,\n        .ua-macos .pre,\n        .ua-macos .js-pre,\n        .ua-macos .rm_PicArea *{font-family: \"Lucida Grande\",\"Hiragino Sans GB\",\"Hiragino Sans GB W3\", verdana;}\n\n        .jy-contact{float: left;}\n        .jy-contact-hover{background: #eee;}\n        .jy-contact img.oprt{width: 23px;height: 23px;border: 0;vertical-align: middle;cursor: pointer;}\n    </style>\n</head>\n<body onunload=\"\" class=\"js-body\">\n<div>\n    <div class=\"wrapper\" style=\"margin: 20px auto 0; width: 500px; padding-top:16px; padding-bottom:10px;\">\n        <div class=\"header clearfix\">\n            <a class=\"logo\" href=\"{{.BaseUrl}}\" target=\"_blank\"><b>{{.SITE_NAME}}</b></a>\n        </div>\n        <br style=\"clear:both; height:0\">\n        <div class=\"content\" style=\"background: none repeat scroll 0 0 #FFFFFF; border: 1px solid #E9E9E9; margin: 2px 0 0; padding: 30px;\">\n\n            <p>您好: </p>\n\n            <p>您在 {{.SITE_NAME}} 提交了找回密码申请。<br>如果您没有提交修改密码的申请, 请忽略本邮件</p>\n\n            <p style=\"border-top: 1px solid #DDDDDD;margin: 15px 0 25px;padding: 15px;\">\n                请点击链接继续: <a href=\"{{.url}}\" target=\"_blank\">{{.url}}</a>\n            </p>\n            <p>\n                好的密码，不但应该容易记住，还要尽量符合以下强度标准：\n            <ul>\n                <li>包含大小写字母、数字和符号</li>\n                <li>不少于 10 位 </li>\n                <li>不包含生日、手机号码等易被猜出的信息</li>\n            </ul>\n            </p>\n            <p class=\"footer\" style=\"border-top: 1px solid #DDDDDD; padding-top:6px; margin-top:25px; color:#838383;\">\n                请勿回复本邮件, 此邮箱未受监控, 您不会得到任何回复. 要获得帮助, 请登录网站<br><br>\n                <a href=\"{{.BaseUrl}}\" target=\"_blank\">{{.SITE_NAME}}</a>\n            </p>\n        </div>\n    </div>\n</div>\n</body>\n</html>"
  },
  {
    "path": "views/account/register.tpl",
    "content": "<!DOCTYPE html>\n<html lang=\"zh-cn\">\n<head>\n    <meta charset=\"utf-8\">\n    <link rel=\"shortcut icon\" href=\"{{cdnimg \"/static/favicon.ico\"}}\">\n    <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge,chrome=1\" />\n    <meta name=\"renderer\" content=\"webkit\" />\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n    <meta name=\"author\" content=\"MinDoc\" />\n    <title>{{i18n .Lang \"common.new_account\"}} - Powered by MinDoc</title>\n\n    <!-- Bootstrap -->\n    <link href=\"{{cdncss \"/static/bootstrap/css/bootstrap.min.css\"}}\" rel=\"stylesheet\">\n    <link href=\"{{cdncss \"/static/font-awesome/css/font-awesome.min.css\"}}\" rel=\"stylesheet\">\n    <link href=\"{{cdncss \"/static/css/main.css\" \"version\"}}\" rel=\"stylesheet\">\n    <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->\n    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->\n    <!--[if lt IE 9]>\n    <script src=\"/static/html5shiv/3.7.3/html5shiv.min.js\"></script>\n    <script src=\"/static/respond.js/1.4.2/respond.min.js\"></script>\n    <![endif]-->\n    <!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->\n    <script src=\"{{cdnjs \"/static/jquery/1.12.4/jquery.min.js\"}}\"></script>\n</head>\n<body class=\"manual-container\">\n<header class=\"navbar navbar-static-top smart-nav navbar-fixed-top manual-header\" role=\"banner\">\n    <div class=\"container\">\n        <div class=\"navbar-header col-sm-12 col-md-6 col-lg-5\">\n            <a href=\"{{.BaseUrl}}\" class=\"navbar-brand\">{{.SITE_NAME}}</a>\n        </div>\n    </div>\n</header>\n<div class=\"container manual-body\">\n    <div class=\"row login\">\n        <div class=\"login-body\">\n            <form role=\"form\" method=\"post\" id=\"registerForm\">\n            {{ .xsrfdata }}\n                <h3 class=\"text-center\">{{i18n .Lang \"common.new_account\"}}</h3>\n                <div class=\"form-group\">\n                    <div class=\"input-group\">\n                        <div class=\"input-group-addon\">\n                            <i class=\"fa fa-user\"></i>\n                        </div>\n                        <input type=\"text\" class=\"form-control\" placeholder=\"{{i18n .Lang \"common.username\"}}\" name=\"account\" id=\"account\" autocomplete=\"off\">\n                    </div>\n                </div>\n                <div class=\"form-group\">\n                    <div class=\"input-group\">\n                        <div class=\"input-group-addon\">\n                            <i class=\"fa fa-lock\"></i>\n                        </div>\n                        <input type=\"password\" class=\"form-control\" placeholder=\"{{i18n .Lang \"common.password\"}}\" name=\"password1\" id=\"password1\" autocomplete=\"off\">\n                    </div>\n                </div>\n                <div class=\"form-group\">\n                    <div class=\"input-group\">\n                        <div class=\"input-group-addon\">\n                            <i class=\"fa fa-lock\"></i>\n                        </div>\n                        <input type=\"password\" class=\"form-control\" placeholder=\"{{i18n .Lang \"common.confirm_password\"}}\" name=\"password2\" id=\"password2\" autocomplete=\"off\">\n                    </div>\n                </div>\n                <div class=\"form-group\">\n                    <div class=\"input-group\">\n                        <div class=\"input-group-addon\" style=\"padding: 6px 9px;\"><i class=\"fa fa-envelope\"></i></div>\n                        <input type=\"email\" class=\"form-control\" placeholder=\"{{i18n .Lang \"common.email\"}}\" name=\"email\" id=\"email\" autocomplete=\"off\">\n                    </div>\n                </div>\n\n                <div class=\"form-group\">\n                    <div class=\"input-group\" style=\"float: left;width: 195px;\">\n                        <div class=\"input-group-addon\">\n                            <i class=\"fa fa-check-square\"></i>\n                        </div>\n                        <input type=\"text\" name=\"code\" id=\"code\" class=\"form-control\" style=\"width: 150px\" maxlength=\"5\" placeholder=\"{{i18n .Lang \"common.captcha\"}}\" autocomplete=\"off\">&nbsp;\n                    </div>\n                    <img id=\"captcha-img\" style=\"width: 140px;height: 40px;display: inline-block;float: right\" src=\"{{urlfor \"AccountController.Captcha\"}}\" onclick=\"this.src='{{urlfor \"AccountController.Captcha\"}}?key=login&t='+(new Date()).getTime();\" title=\"{{i18n .Lang \"message.click_to_change\"}}\">\n                    <div class=\"clearfix\"></div>\n                </div>\n\n                <div class=\"form-group\">\n                    <button type=\"submit\" id=\"btnRegister\" class=\"btn btn-success\" style=\"width: 100%\"  data-loading-text=\"{{i18n .Lang \"message.processing\"}}\" autocomplete=\"off\">{{i18n .Lang \"common.register\"}}</button>\n                </div>\n                {{if ne .ENABLED_REGISTER \"false\"}}\n                <div class=\"form-group\">\n                    {{i18n .Lang \"message.has_account\"}} <a href=\"{{urlfor \"AccountController.Login\" }}\" title=\"{{i18n .Lang \"common.login\"}}\">{{i18n .Lang \"common.login\"}}</a>\n                </div>\n                {{end}}\n            </form>\n        </div>\n    </div>\n    <div class=\"clearfix\"></div>\n</div>\n{{template \"widgets/footer.tpl\" .}}\n<!-- Include all compiled plugins (below), or include individual files as needed -->\n<script src=\"{{cdnjs \"/static/bootstrap/js/bootstrap.min.js\"}}\" type=\"text/javascript\"></script>\n<script src=\"{{cdnjs \"/static/layer/layer.js\"}}\" type=\"text/javascript\"></script>\n<script src=\"{{cdnjs \"/static/js/jquery.form.js\"}}\" type=\"text/javascript\"></script>\n<script type=\"text/javascript\">\n    $(function () {\n        $(\"#account,#password,#confirm_password,#code\").on('focus',function () {\n            $(this).tooltip('destroy').parents('.form-group').removeClass('has-error');\n        });\n\n        $(document).keyup(function (e) {\n            var event = document.all ? window.event : e;\n            if(event.keyCode === 13){\n                $(\"#btnRegister\").trigger(\"click\");\n            }\n        });\n        $(\"#registerForm\").ajaxForm({\n            beforeSubmit : function () {\n                var account = $.trim($(\"#account\").val());\n                var password = $.trim($(\"#password1\").val());\n                var confirmPassword = $.trim($(\"#password2\").val());\n                var code = $.trim($(\"#code\").val());\n                var email = $.trim($(\"#email\").val());\n\n                if(account === \"\"){\n                    $(\"#account\").focus().tooltip({placement:\"auto\",title : \"{{i18n .Lang \"message.account_empty\"}}\",trigger : 'manual'})\n                        .tooltip('show')\n                        .parents('.form-group').addClass('has-error');\n                    return false;\n\n                }else if(password === \"\"){\n                    $(\"#password\").focus().tooltip({title : '{{i18n .Lang \"message.password_empty\"}}',trigger : 'manual'})\n                        .tooltip('show')\n                        .parents('.form-group').addClass('has-error');\n                    return false;\n                }else if(confirmPassword !== password){\n                    $(\"#confirm_password\").focus().tooltip({title : '{{i18n .Lang \"message.confirm_password_empty\"}}',trigger : 'manual'})\n                        .tooltip('show')\n                        .parents('.form-group').addClass('has-error');\n                    return false;\n                }else if(email === \"\"){\n                    $(\"#email\").focus().tooltip({title : '{{i18n .Lang \"message.email_empty\"}}',trigger : 'manual'})\n                        .tooltip('show')\n                        .parents('.form-group').addClass('has-error');\n                    return false;\n                }else if(code !== undefined && code === \"\"){\n                    $(\"#code\").focus().tooltip({title : '{{i18n .Lang \"message.captcha_empty\"}}',trigger : 'manual'})\n                        .tooltip('show')\n                        .parents('.form-group').addClass('has-error');\n                    return false;\n                }else {\n\n                    $(\"button[type='submit']\").button('loading');\n                }\n            },\n            success : function (res) {\n                $(\"button[type='submit']\").button('reset');\n                if(res.errcode === 0){\n                    window.location = \"{{urlfor \"AccountController.Login\"}}\";\n                }else{\n                    $(\"#captcha-img\").click();\n                    $(\"#code\").val('');\n                    layer.msg(res.message);\n                }\n            }\n        });\n    });\n</script>\n</body>\n</html>"
  },
  {
    "path": "views/blog/index.tpl",
    "content": "<!DOCTYPE html>\n<html lang=\"zh-CN\">\n<head>\n    <meta charset=\"utf-8\">\n    <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n    <meta name=\"renderer\" content=\"webkit\">\n    <meta name=\"author\" content=\"Minho\" />\n    <meta name=\"site\" content=\"https://www.iminho.me\" />\n    <meta name=\"keywords\" content=\"{{.Model.BlogTitle}}\">\n    <meta name=\"description\" content=\"{{.Model.BlogTitle}}-{{.Description}}\">\n    <title>{{.Model.BlogTitle}} - Powered by MinDoc</title>\n\n    <!-- Bootstrap -->\n    <link href=\"{{cdncss \"/static/bootstrap/css/bootstrap.min.css\"}}\" rel=\"stylesheet\">\n\n    <link href=\"{{cdncss \"/static/font-awesome/css/font-awesome.min.css\"}}\" rel=\"stylesheet\">\n    <link href=\"{{cdncss \"/static/editor.md/lib/sequence/sequence-diagram-min.css\"}}\" rel=\"stylesheet\">\n    <link href=\"{{cdncss \"/static/css/kancloud.css\" \"version\"}}\" rel=\"stylesheet\">\n    <link href=\"{{cdncss \"/static/editor.md/css/editormd.preview.css\"}}\" rel=\"stylesheet\">\n    <link href=\"{{cdncss \"/static/css/markdown.preview.css\" \"version\"}}\" rel=\"stylesheet\">\n    <link href=\"{{cdncss (print \"/static/editor.md/lib/highlight/styles/\" .HighlightStyle \".css\") \"version\"}}\" rel=\"stylesheet\">\n    <link href=\"{{cdncss \"/static/katex/katex.min.css\"}}\" rel=\"stylesheet\">\n    <link href=\"{{cdncss \"/static/css/print.css\"}}\" media=\"print\" rel=\"stylesheet\">\n    <link href=\"{{cdncss \"/static/css/main.css\" \"version\"}}\" rel=\"stylesheet\">\n    <style type=\"text/css\">\n        .header{\n            min-height: 1rem;\n            font-size: 26px;\n            font-weight: 400;\n            display: block;\n            margin: 20px auto;\n        }\n        .blog-meta{\n            display: inline-block;\n        }\n        .blog-meta>.item{\n            display: inline-block;\n            color: #666666;\n            vertical-align: middle;\n        }\n\n        .blog-footer{\n            margin: 25px auto;\n            /*border-top: 1px solid #E5E5E5;*/\n            padding: 20px 1px;\n            line-height: 35px;\n        }\n        .blog-footer span{\n            margin-right: 8px;\n            padding: 6px 8px;\n            font-size: 12px;\n            border: 1px solid #e3e3e3;\n            color: #4d4d4d\n        }\n        .blog-footer a:hover{\n            color: #ca0c16;\n        }\n        .footer{\n            margin-top: 0;\n        }\n        .user_img img {\n            display: block;\n            width: 24px;\n            height: 24px;\n            border-radius: 50%;\n            -o-object-fit: cover;\n            object-fit: cover;\n            overflow: hidden;\n        }\n    </style>\n</head>\n<body>\n<div class=\"manual-reader manual-container manual-search-reader\">\n{{template \"widgets/header.tpl\" .}}\n    <div class=\"container manual-body\">\n        <div class=\"search-head\" style=\"border-bottom-width: 1px;\">\n            <h1 class=\"header\">\n               {{.Model.BlogTitle}}\n            </h1>\n            <div class=\"blog-meta\">\n                <div class=\"item user_img\"><img src=\"{{cdnimg .Model.MemberAvatar}}\" align=\"{{.Model.CreateName}}\"> </div>\n                <div class=\"item\">&nbsp;{{.Model.CreateName}}</div>\n                <div class=\"item\">{{i18n .Lang \"blog.posted_on\"}}</div>\n                <div class=\"item\">{{date_format .Model.Created \"2006-01-02 15:04:05\"}}</div>\n                <div class=\"item\">{{.Model.ModifyRealName}}</div>\n                <div class=\"item\">{{i18n .Lang \"blog.modified_on\"}}</div>\n                <div class=\"item\">{{date_format .Model.Modified \"2006-01-02 15:04:05\"}}</div>\n                {{if eq .Member.MemberId .Model.MemberId}}\n                    <div class=\"item\"><a href='{{urlfor \"BlogController.ManageEdit\" \":id\" .Model.BlogId}}' title=\"{{i18n .Lang \"blog.edit_blog\"}}\"><i class=\"fa fa-edit\"></i> {{i18n .Lang \"common.edit\"}}</a></div>\n                {{end}}\n            </div>\n        </div>\n        <div class=\"row\">\n            <div class=\"article-body  markdown-body editormd-preview-container content\">\n                {{.Content}}\n                {{if .Model.AttachList}}\n                <div class=\"attach-list\"><strong>{{i18n .Lang \"doc.attachment\"}}</strong><ul>\n                {{range $index,$item := .Model.AttachList}}\n                <li><a href=\"{{$item.HttpPath}}\" title=\"{{$item.FileName}}\">{{$item.FileName}}</a> </li>\n                {{end}}\n                </ul>\n                {{end}}\n            </div>\n        </div>\n        <div class=\"row blog-footer\">\n            <p>\n                <span>{{i18n .Lang \"blog.prev\"}}</span>\n            {{if .Previous}}\n                <a href=\"{{urlfor \"BlogController.Index\" \":id\" .Previous.BlogId}}\" title=\"{{.Previous.BlogTitle}}\">{{.Previous.BlogTitle}}\n                </a>\n            {{else}}\n               {{i18n .Lang \"blog.no\"}}\n            {{end}}\n            </p>\n            <p>\n                <span>{{i18n .Lang \"blog.next\"}}</span>\n            {{if .Next}}\n                <a href=\"{{urlfor \"BlogController.Index\" \":id\" .Next.BlogId}}\" title=\"{{.Next.BlogTitle}}\">{{.Next.BlogTitle}}</a>\n            {{else}}\n                {{i18n .Lang \"blog.no\"}}\n            {{end}}\n            </p>\n        </div>\n    </div>\n{{template \"widgets/footer.tpl\" .}}\n    </div>\n</div>\n<script src=\"{{cdnjs \"/static/jquery/1.12.4/jquery.min.js\"}}\"></script>\n<script src=\"{{cdnjs \"/static/bootstrap/js/bootstrap.min.js\"}}\"></script>\n{{.Scripts}}\n</body>\n</html>"
  },
  {
    "path": "views/blog/index_password.tpl",
    "content": "<!DOCTYPE html>\n<html lang=\"zh-cn\">\n<head>\n    <meta charset=\"utf-8\">\n    <link rel=\"shortcut icon\" href=\"{{cdnimg \"/static/favicon.ico\"}}\">\n    <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge,chrome=1\" />\n    <meta name=\"renderer\" content=\"webkit\" />\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n    <title>{{i18n .Lang \"doc.input_pwd\"}} - Powered by MinDoc</title>\n    <script src=\"{{cdnjs \"static/jquery/1.12.4/jquery.min.js\"}}\"></script>\n    <script src=\"{{cdnjs \"static/js/jquery.form.js\"}}\"></script>\n    <style type=\"text/css\">\n    body{ background: #f2f2f2;}\n    .d_button{ cursor: pointer;}\n    @media(min-width : 450px){\n        .auth_form{\n            width: 400px;\n            border: 1px solid #ccc;\n            background-color: #fff;\n            position: absolute;\n            top: 20%;\n            left: 50%;\n            margin-left: -220px;\n            padding: 20px;\n        }\n    .tit{\n        font-size: 18px;\n    }\n        .inp{\n            height: 30px;\n            width: 387px;\n            font-size: 14px;\n            padding: 5px;\n        }\n        .btn{\n            margin-top: 10px;\n            float: right;\n        }\n    }\n    @media(max-width : 449px){\n        body{\n            margin: 0 auto;\n        }\n    .auth_form{\n        background-color: #fff;\n        border-top: 1px solid #ccc;\n        border-bottom: 1px solid #ccc;\n        width: 100%;\n        margin-top: 40px;\n    }\n        .shell{\n            width: 90%;\n            margin: 10px auto;\n        }\n        .tit{\n            font-size: 18px;\n        }\n        .inp{\n            height: 30px;\n            width: 96.5%;\n            font-size: 14px;\n            padding: 5px;\n        }\n        .btn{\n            margin-top: 10px;\n            float: right;\n        }\n    }\n    .clear{\n        clear: both;\n    }\n    .button {\n        color: #fff;\n        background-color: #428bca;\n        border-radius: 4px;\n        display: inline-block;\n        padding: 6px 12px;\n        margin-bottom: 0;\n        font-size: 14px;\n        font-weight: 400;\n        line-height: 1.42857143;\n        text-align: center;\n        white-space: nowrap;\n        vertical-align: middle;\n        -ms-touch-action: manipulation;\n        touch-action: manipulation;\n        cursor: pointer;\n        -webkit-user-select: none;\n        -moz-user-select: none;\n        -ms-user-select: none;\n        user-select: none;\n        border: 1px solid #357ebd;\n    }\n    </style>\n</head>\n<body>\n<div class=\"auth_form\">\n<div class=\"shell\">\n        <form action=\"{{urlfor \"BlogController.Index\" \":id\" .Model.BlogId}}\" method=\"post\" id=\"auth_form\">\n        <input type=\"hidden\" value=\"{{.Model.BlogId}}\" name=\"blogId\" />\n    <div class=\"tit\">\n        {{i18n .Lang \"doc.input_pwd\"}}\n    </div>\n    <div style=\"margin-top: 10px;\">\n        <input type=\"password\" name=\"password\" placeholder=\"{{i18n .Lang \"blog.access_pass\"}}\" class=\"inp\"/>\n    </div>\n    <div class=\"btn\">\n        <span id=\"error\" style=\"color: #919191; font-size: 13px;\">{{i18n .Lang \"blog.private_blog_tips\"}}</span>\n        <input type=\"submit\" value=\"{{i18n .Lang \"doc.commit\"}}\" class=\"button\"/>\n    </div>\n    <div class=\"clear\"></div>\n</form>\n</div>\n</div>\n<script type=\"text/javascript\">\n$(\"#auth_form\").ajaxForm({\n    beforeSerialize: function () {\n        var pwd = $(\"#auth_form input[name='password']\").val();\n        if (pwd === \"\") {\n            $(\"#error\").html(\"{{i18n .Lang \"doc.input_pwd\"}}\");\n            return false;\n        }\n    },\n    dataType: \"json\",\n    success: function (res) {\n        if (res.errcode === 0) {\n            window.location.reload();\n        } else {\n            $(\"#auth_form input[name='password']\").val(\"\").focus();\n            $(\"#error\").html(res.message);\n        }\n    }\n});\n</script>\n\n        <script src=\"{{cdnjs \"static/bootstrap/js/bootstrap.min.js\"}}\"></script>\n</body>\n</html>"
  },
  {
    "path": "views/blog/list.tpl",
    "content": "<!DOCTYPE html>\n<html lang=\"zh-CN\">\n<head>\n    <meta charset=\"utf-8\">\n    <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n    <title>{{i18n .Lang \"blog.blog_list\"}} - Powered by MinDoc</title>\n    <meta name=\"keywords\" content=\"MinDoc,文档在线管理系统,WIKI,wiki,wiki在线,文档在线管理,接口文档在线管理,接口文档管理\">\n    <meta name=\"description\" content=\"MinDoc文档在线管理系统 {{.site_description}}\">\n    <!-- Bootstrap -->\n    <link href=\"{{cdncss \"/static/bootstrap/css/bootstrap.min.css\"}}\" rel=\"stylesheet\">\n    <link href=\"{{cdncss \"/static/font-awesome/css/font-awesome.min.css\"}}\" rel=\"stylesheet\">\n    <link href=\"{{cdncss \"/static/css/main.css\" \"version\"}}\" rel=\"stylesheet\">\n\n    <style type=\"text/css\">\n        .footer{margin-top: 0;}\n        .label {\n            background-color: #00b5ad!important;\n            border-color: #00b5ad!important;\n            color: #fff!important;\n            font-weight: 400;\n        }\n    </style>\n</head>\n<body>\n<div class=\"manual-reader manual-container manual-search-reader\">\n{{template \"widgets/header.tpl\" .}}\n    <div class=\"container manual-body\">\n        <div class=\"row\">\n            <div class=\"manual-list\">\n            {{range $index,$item := .Lists}}\n                <div class=\"search-item\">\n                    <div class=\"title\">{{if eq $item.BlogStatus \"password\"}}<span class=\"label\">{{i18n $.Lang \"blog.encrypt\"}}</span>{{end}} <a href=\"{{urlfor \"BlogController.Index\" \":id\" $item.BlogId}}\" title=\"{{$item.BlogTitle}}\">{{$item.BlogTitle}}</a> </div>\n                    <div class=\"description\">\n                    {{$item.BlogExcerpt}}\n                    </div>\n                    {{/*<div class=\"site\">{{urlfor \"BlogController.Index\" \":id\" $item.BlogId}}</div>*/}}\n                    <div class=\"source\">\n                        <span class=\"item\">{{i18n $.Lang \"blog.author\"}}：{{$item.CreateName}}</span>\n                        <span class=\"item\">{{i18n $.Lang \"blog.update_time\"}}：{{date_format  $item.Modified \"2006-01-02 15:04:05\"}}</span>\n                    </div>\n                </div>\n            {{else}}\n                <div class=\"search-empty\">\n                    <img src=\"{{cdnimg \"/static/images/search_empty.png\"}}\" class=\"empty-image\">\n                    <span class=\"empty-text\">{{i18n $.Lang \"blog.no_blog\"}}</span>\n                </div>\n            {{end}}\n                <nav class=\"pagination-container\">\n                {{.PageHtml}}\n                </nav>\n                <div class=\"clearfix\"></div>\n            </div>\n        </div>\n    </div>\n{{template \"widgets/footer.tpl\" .}}\n</div>\n<script src=\"{{cdnjs \"/static/jquery/1.12.4/jquery.min.js\"}}\"></script>\n<script src=\"{{cdnjs \"/static/bootstrap/js/bootstrap.min.js\"}}\"></script>\n{{.Scripts}}\n</body>\n</html>"
  },
  {
    "path": "views/blog/manage_edit.tpl",
    "content": "<!DOCTYPE html>\n<html lang=\"zh-CN\">\n<head>\n    <meta charset=\"utf-8\">\n    <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n\n    <title>{{i18n .Lang \"blog.edit_title\"}} - Powered by MinDoc</title>\n    <script type=\"text/javascript\">\n        window.baseUrl = \"{{.BaseUrl}}\";\n        window.katex = { js: \"{{cdnjs \"/static/katex/katex\"}}\",css: \"{{cdncss \"/static/katex/katex\"}}\"};\n        window.editormdLib = \"{{cdnjs \"/static/editor.md/lib/\"}}\";\n        window.editor = null;\n        window.editURL = \"{{urlfor \"BlogController.ManageEdit\" \"blogId\" .Model.BlogId}}\";\n        window.imageUploadURL = \"{{urlfor \"BlogController.Upload\" \"blogId\" .Model.BlogId}}\";\n        window.fileUploadURL = \"\";\n        window.blogId = {{.Model.BlogId}};\n        window.blogVersion = {{.Model.Version}};\n        window.removeAttachURL = \"{{urlfor \"BlogController.RemoveAttachment\" \":id\" .Model.BlogId}}\";\n        window.highlightStyle = \"{{.HighlightStyle}}\";\n        window.lang = {{i18n $.Lang \"common.js_lang\"}};\n    </script>\n    <!-- Bootstrap -->\n    <link href=\"{{cdncss \"/static/bootstrap/css/bootstrap.min.css\"}}\" rel=\"stylesheet\">\n    <link href=\"{{cdncss \"/static/font-awesome/css/font-awesome.min.css\"}}\" rel=\"stylesheet\">\n    <link href=\"{{cdncss \"/static/jstree/3.3.4/themes/default/style.min.css\"}}\" rel=\"stylesheet\">\n    <link href=\"{{cdncss \"/static/editor.md/css/editormd.css\" \"version\"}}\" rel=\"stylesheet\">\n\n    <link href=\"{{cdncss \"/static/css/jstree.css\"}}\" rel=\"stylesheet\">\n    <link href=\"{{cdncss \"/static/webuploader/webuploader.css\"}}\" rel=\"stylesheet\">\n    <link href=\"{{cdncss \"/static/css/markdown.css\" \"version\"}}\" rel=\"stylesheet\">\n    <link href=\"{{cdncss \"/static/css/markdown.preview.css\" \"version\"}}\" rel=\"stylesheet\">\n</head>\n<body>\n\n<div class=\"m-manual manual-editor\">\n    <div class=\"manual-head\" id=\"editormd-tools\" style=\"min-width: 1200px; position:absolute;\">\n        <div class=\"editormd-group\">\n            <a href=\"{{urlfor \"BlogController.ManageList\"}}\" data-toggle=\"tooltip\" data-title=\"{{i18n .Lang \"doc.backward\"}}\"><i class=\"fa fa-chevron-left\" aria-hidden=\"true\"></i></a>\n        </div>\n        <div class=\"editormd-group\">\n            <a href=\"javascript:;\" id=\"markdown-save\" data-toggle=\"tooltip\" data-title=\"{{i18n .Lang \"doc.save\"}}\" class=\"disabled save\"><i class=\"fa fa-save\" aria-hidden=\"true\" name=\"save\"></i></a>\n        </div>\n        <div class=\"editormd-group\">\n            <a href=\"javascript:;\" data-toggle=\"tooltip\" data-title=\"{{i18n .Lang \"doc.undo\"}} (Ctrl-Z)\"><i class=\"fa fa-undo first\" name=\"undo\" unselectable=\"on\"></i></a>\n            <a href=\"javascript:;\" data-toggle=\"tooltip\" data-title=\"{{i18n .Lang \"doc.redo\"}} (Ctrl-Y)\"><i class=\"fa fa-repeat last\" name=\"redo\" unselectable=\"on\"></i></a>\n        </div>\n        <div class=\"editormd-group\">\n            <a href=\"javascript:;\" data-toggle=\"tooltip\" data-title=\"{{i18n .Lang \"doc.bold\"}}\"><i class=\"fa fa-bold first\" name=\"bold\" unselectable=\"on\"></i></a>\n            <a href=\"javascript:;\" data-toggle=\"tooltip\" data-title=\"{{i18n .Lang \"doc.italic\"}}\"><i class=\"fa fa-italic item\" name=\"italic\" unselectable=\"on\"></i></a>\n            <a href=\"javascript:;\" data-toggle=\"tooltip\" data-title=\"{{i18n .Lang \"doc.strikethrough\"}}\"><i class=\"fa fa-strikethrough last\" name=\"del\" unselectable=\"on\"></i></a>\n        </div>\n        <div class=\"editormd-group\">\n            <a href=\"javascript:;\" data-toggle=\"tooltip\" data-title=\"{{i18n .Lang \"doc.h1\"}}\"><i class=\"fa editormd-bold first\" name=\"h1\" unselectable=\"on\">H1</i></a>\n            <a href=\"javascript:;\" data-toggle=\"tooltip\" data-title=\"{{i18n .Lang \"doc.h2\"}}\"><i class=\"fa editormd-bold item\" name=\"h2\" unselectable=\"on\">H2</i></a>\n            <a href=\"javascript:;\" data-toggle=\"tooltip\" data-title=\"{{i18n .Lang \"doc.h3\"}}\"><i class=\"fa editormd-bold item\" name=\"h3\" unselectable=\"on\">H3</i></a>\n            <a href=\"javascript:;\" data-toggle=\"tooltip\" data-title=\"{{i18n .Lang \"doc.h4\"}}\"><i class=\"fa editormd-bold item\" name=\"h4\" unselectable=\"on\">H4</i></a>\n            <a href=\"javascript:;\" data-toggle=\"tooltip\" data-title=\"{{i18n .Lang \"doc.h5\"}}\"><i class=\"fa editormd-bold item\" name=\"h5\" unselectable=\"on\">H5</i></a>\n            <a href=\"javascript:;\" data-toggle=\"tooltip\" data-title=\"{{i18n .Lang \"doc.h6\"}}\"><i class=\"fa editormd-bold last\" name=\"h6\" unselectable=\"on\">H6</i></a>\n        </div>\n        <div class=\"editormd-group\">\n            <a href=\"javascript:;\" data-toggle=\"tooltip\" data-title=\"{{i18n .Lang \"doc.unorder_list\"}}\"><i class=\"fa fa-list-ul first\" name=\"list-ul\" unselectable=\"on\"></i></a>\n            <a href=\"javascript:;\" data-toggle=\"tooltip\" data-title=\"{{i18n .Lang \"doc.order_list\"}}\"><i class=\"fa fa-list-ol item\" name=\"list-ol\" unselectable=\"on\"></i></a>\n            <a href=\"javascript:;\" data-toggle=\"tooltip\" data-title=\"{{i18n .Lang \"doc.hline\"}}\"><i class=\"fa fa-minus last\" name=\"hr\" unselectable=\"on\"></i></a>\n        </div>\n        <div class=\"editormd-group\">\n            <a href=\"javascript:;\" data-toggle=\"tooltip\" data-title=\"{{i18n .Lang \"doc.link\"}}\"><i class=\"fa fa-link first\" name=\"link\" unselectable=\"on\"></i></a>\n            <a href=\"javascript:;\" data-toggle=\"tooltip\" data-title=\"{{i18n .Lang \"doc.ref_link\"}}\"><i class=\"fa fa-anchor item\" name=\"reference-link\" unselectable=\"on\"></i></a>\n            <a href=\"javascript:;\" data-toggle=\"tooltip\" data-title=\"{{i18n .Lang \"doc.add_pic\"}}\"><i class=\"fa fa-picture-o item\" name=\"image\" unselectable=\"on\"></i></a>\n            <a href=\"javascript:;\" data-toggle=\"tooltip\" data-title=\"{{i18n .Lang \"doc.code\"}}\"><i class=\"fa fa-code item\" name=\"code\" unselectable=\"on\"></i></a>\n            <a href=\"javascript:;\" data-toggle=\"tooltip\" data-title=\"{{i18n .Lang \"doc.code_block\"}}\" unselectable=\"on\"><i class=\"fa fa-file-code-o item\" name=\"code-block\" unselectable=\"on\"></i></a>\n            <a href=\"javascript:;\" data-toggle=\"tooltip\" data-title=\"{{i18n .Lang \"doc.table\"}}\"><i class=\"fa fa-table item\" name=\"table\" unselectable=\"on\"></i></a>\n            <a href=\"javascript:;\" data-toggle=\"tooltip\" data-title=\"{{i18n .Lang \"doc.quote\"}}\"><i class=\"fa fa-quote-right item\" name=\"quote\" unselectable=\"on\"></i></a>\n            <a href=\"javascript:;\" data-toggle=\"tooltip\" data-title=\"{{i18n .Lang \"doc.gfm_task\"}}\"><i class=\"fa fa-tasks item\" name=\"tasks\" aria-hidden=\"true\"></i></a>\n            <a href=\"javascript:;\" data-toggle=\"tooltip\" data-title=\"{{i18n .Lang \"doc.attachment\"}}\"><i class=\"fa fa-paperclip item\" aria-hidden=\"true\" name=\"attachment\"></i></a>\n            <a href=\"javascript:;\" data-toggle=\"tooltip\" data-title=\"{{i18n .Lang \"doc.template\"}}\"><i class=\"fa fa-tachometer last\" name=\"template\"></i></a>\n\n        </div>\n\n        <div class=\"editormd-group pull-right\">\n            <a href=\"javascript:;\" data-toggle=\"tooltip\" data-title=\"{{i18n .Lang \"doc.close_preview\"}}\"><i class=\"fa fa-eye-slash first\" name=\"watch\" unselectable=\"on\"></i></a>\n            <a href=\"javascript:;\" data-toggle=\"tooltip\" data-title=\"{{i18n .Lang \"doc.help\"}}\"><i class=\"fa fa-question-circle-o last\" aria-hidden=\"true\" name=\"help\"></i></a>\n        </div>\n\n        <div class=\"editormd-group\">\n            <a href=\"javascript:;\" data-toggle=\"tooltip\" data-title=\"\"></a>\n            <a href=\"javascript:;\" data-toggle=\"tooltip\" data-title=\"\"></a>\n        </div>\n\n        <div class=\"clearfix\"></div>\n    </div>\n    <div class=\"manual-body\">\n        <div class=\"manual-editor-container\" id=\"manualEditorContainer\" style=\"min-width: 920px;left: 0;\">\n            <div class=\"manual-editormd\">\n                <div id=\"docEditor\" class=\"manual-editormd-active\"><textarea style=\"display: none\">{{str2html .Model.BlogContent}}</textarea> </div>\n            </div>\n            <div class=\"manual-editor-status\">\n                <div id=\"attachInfo\" class=\"item\">0 {{i18n .Lang \"doc.attachments\"}}</div>\n            </div>\n        </div>\n\n    </div>\n</div>\n\n<!-- Modal -->\n\n<div class=\"modal fade\" id=\"uploadAttachModal\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"uploadAttachModalLabel\">\n    <div class=\"modal-dialog\" role=\"document\">\n        <form method=\"post\" id=\"uploadAttachModalForm\" class=\"form-horizontal\">\n            <div class=\"modal-content\">\n                <div class=\"modal-header\">\n                    <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\"><span aria-hidden=\"true\">&times;</span></button>\n                    <h4 class=\"modal-title\" id=\"myModalLabel\">{{i18n .Lang \"doc.upload_attachment\"}}</h4>\n                </div>\n                <div class=\"modal-body\">\n                    <div class=\"attach-drop-panel\">\n                        <div class=\"upload-container\" id=\"filePicker\"><i class=\"fa fa-upload\" aria-hidden=\"true\"></i></div>\n                    </div>\n                    <div class=\"attach-list\" id=\"attachList\">\n                        <template v-for=\"item in lists\">\n                            <div class=\"attach-item\" :id=\"item.attachment_id\">\n                                <template v-if=\"item.state == 'wait'\">\n                                    <div class=\"progress\">\n                                        <div class=\"progress-bar progress-bar-success\" role=\"progressbar\" aria-valuenow=\"40\" aria-valuemin=\"0\" aria-valuemax=\"100\">\n                                            <span class=\"sr-only\">0% Complete (success)</span>\n                                        </div>\n                                    </div>\n                                </template>\n                                <template v-else-if=\"item.state == 'error'\">\n                                    <span class=\"error-message\">${item.message}</span>\n                                    <button type=\"button\" class=\"btn btn-sm close\" @click=\"removeAttach(item.attachment_id)\">\n                                        <i class=\"fa fa-remove\" aria-hidden=\"true\"></i>\n                                    </button>\n                                </template>\n                                <template v-else>\n                                    <a :href=\"item.http_path\" target=\"_blank\" :title=\"item.file_name\">${item.file_name}</a>\n                                    <span class=\"text\">(${ formatBytes(item.file_size) })</span>\n                                    <span class=\"error-message\">${item.message}</span>\n                                    <button type=\"button\" class=\"btn btn-sm close\" @click=\"removeAttach(item.attachment_id)\">\n                                        <i class=\"fa fa-remove\" aria-hidden=\"true\"></i>\n                                    </button>\n                                    <div class=\"clearfix\"></div>\n                                </template>\n                            </div>\n                        </template>\n                    </div>\n                </div>\n                <div class=\"modal-footer\">\n                    <span id=\"add-error-message\" class=\"error-message\"></span>\n                    <button type=\"button\" class=\"btn btn-default\" data-dismiss=\"modal\">{{i18n .Lang \"common.cancel\"}}</button>\n                    <button type=\"button\" class=\"btn btn-primary\" id=\"btnUploadAttachFile\" data-dismiss=\"modal\">{{i18n .Lang \"common.confirm\"}}</button>\n                </div>\n            </div>\n        </form>\n    </div>\n</div>\n<!-- Modal -->\n\n\n<div class=\"modal fade\" id=\"documentTemplateModal\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"{{i18n .Lang \"doc.choose_template_type\"}}\" aria-hidden=\"true\">\n    <div class=\"modal-dialog\">\n        <div class=\"modal-content\">\n            <div class=\"modal-header\">\n                <h4 class=\"modal-title\" id=\"modal-title\">{{i18n .Lang \"doc.choose_template_type\"}}</h4>\n            </div>\n            <div class=\"modal-body template-list\">\n                <div class=\"container\">\n                    <div class=\"section\">\n                        <a data-type=\"normal\" href=\"javascript:;\"><i class=\"fa fa-file-o\"></i></a>\n                        <h3><a data-type=\"normal\" href=\"javascript:;\">{{i18n .Lang \"doc.normal_tpl\"}}</a></h3>\n                        <ul>\n                            <li>{{i18n .Lang \"doc.tpl_default_type\"}}</li>\n                            <li>{{i18n .Lang \"doc.tpl_plain_text\"}}</li>\n                        </ul>\n                    </div>\n                    <div class=\"section\">\n                        <a data-type=\"api\" href=\"javascript:;\"><i class=\"fa fa-file-code-o\"></i></a>\n                        <h3><a data-type=\"api\" href=\"javascript:;\">{{i18n .Lang \"doc.api_tpl\"}}</a></h3>\n                        <ul>\n                            <li>{{i18n .Lang \"doc.for_api_doc\"}}</li>\n                            <li>{{i18n .Lang \"doc.code_highlight\"}}</li>\n                        </ul>\n                    </div>\n                    <div class=\"section\">\n                        <a data-type=\"code\" href=\"javascript:;\"><i class=\"fa fa-book\"></i></a>\n\n                        <h3><a data-type=\"code\" href=\"javascript:;\">{{i18n .Lang \"doc.data_dict\"}}</a></h3>\n                        <ul>\n                            <li>{{i18n .Lang \"doc.for_data_dict\"}}</li>\n                            <li>{{i18n .Lang \"doc.form_support\"}}</li>\n                        </ul>\n                    </div>\n                </div>\n\n            </div>\n            <div class=\"modal-footer\">\n                <button type=\"button\" class=\"btn btn-default\" data-dismiss=\"modal\">{{i18n .Lang \"common.cancel\"}}</button>\n            </div>\n        </div>\n    </div>\n</div>\n<template id=\"template-normal\">\n{{template \"document/template_normal.tpl\"}}\n</template>\n<template id=\"template-api\">\n{{template \"document/template_api.tpl\"}}\n</template>\n<template id=\"template-code\">\n{{template \"document/template_code.tpl\"}}\n</template>\n<script src=\"{{cdnjs \"/static/jquery/1.12.4/jquery.min.js\"}}\"></script>\n<script src=\"{{cdnjs \"/static/vuejs/vue.min.js\"}}\" type=\"text/javascript\"></script>\n<script src=\"{{cdnjs \"/static/bootstrap/js/bootstrap.min.js\"}}\"></script>\n<script src=\"{{cdnjs \"/static/webuploader/webuploader.min.js\"}}\" type=\"text/javascript\"></script>\n<script src=\"{{cdnjs \"/static/jstree/3.3.4/jstree.min.js\"}}\" type=\"text/javascript\"></script>\n<script src=\"{{cdnjs \"/static/editor.md/editormd.min.js\" \"version\"}}\" type=\"text/javascript\"></script>\n<script src=\"{{cdnjs \"/static/layer/layer.js\"}}\" type=\"text/javascript\" ></script>\n<script src=\"{{cdnjs \"/static/js/jquery.form.js\"}}\" type=\"text/javascript\"></script>\n<script src=\"{{cdnjs \"/static/js/array.js\" \"version\"}}\" type=\"text/javascript\"></script>\n<script src=\"{{cdnjs \"/static/js/editor.js\" \"version\"}}\" type=\"text/javascript\"></script>\n<script src=\"{{cdnjs \"/static/js/blog.js\" \"version\"}}\" type=\"text/javascript\"></script>\n<script type=\"text/javascript\">\n    $(function () {\n        editLangPath = {{cdnjs \"/static/editor.md/languages/\"}} + lang\n        if(lang != 'zh-CN') {\n            editormd.loadScript(editLangPath, function(){\n                window.editor.lang = editormd.defaults.lang;\n                window.editor.recreate()\n            });\n        }\n        window.vueApp.lists = {{.AttachList}};\n        $(\"#attachInfo\").on(\"click\",function () {\n            $(\"#uploadAttachModal\").modal(\"show\");\n        });\n        window.uploader = null;\n\n        $(\"#uploadAttachModal\").on(\"shown.bs.modal\",function () {\n            if(window.uploader === null){\n                try {\n                    window.uploader = WebUploader.create({\n                        auto: true,\n                        dnd : true,\n                        swf: '{{.BaseUrl}}/static/webuploader/Uploader.swf',\n                        server: '{{urlfor \"BlogController.Upload\"}}',\n                        formData : { \"blogId\" : {{.Model.BlogId}}},\n                        pick: \"#filePicker\",\n                        fileVal : \"editormd-file-file\",\n                        fileSingleSizeLimit: {{.UploadFileSize}},\n                        compress : false\n                    }).on( 'fileQueued', function( file ) {\n                        var item = {\n                            state : \"wait\",\n                            attachment_id : file.id,\n                            file_size : file.size,\n                            file_name : file.name,\n                            message : \"{{i18n .Lang \"doc.uploading\"}}\"\n                        };\n                        window.vueApp.lists.push(item);\n\n                    }).on(\"uploadError\",function (file,reason) {\n                        for(var i in window.vueApp.lists){\n                            var item = window.vueApp.lists[i];\n                            if(item.attachment_id == file.id){\n                                item.state = \"error\";\n                                item.message = \"{{i18n .Lang \"message.upload_failed\"}}:\" + reason;\n                                break;\n                            }\n                        }\n\n                    }).on(\"uploadSuccess\",function (file, res) {\n\n                        for(var index in window.vueApp.lists){\n                            var item = window.vueApp.lists[index];\n                            if(item.attachment_id === file.id){\n                                if(res.errcode === 0) {\n                                    window.vueApp.lists.splice(index, 1, res.attach ? res.attach : res.data);\n                                }else{\n                                    item.message = res.message;\n                                    item.state = \"error\";\n                                }\n                            }\n                        }\n                    }).on(\"uploadProgress\",function (file, percentage) {\n                        var $li = $( '#'+file.id ),\n                                $percent = $li.find('.progress .progress-bar');\n\n                        $percent.css( 'width', percentage * 100 + '%' );\n                    }).on(\"error\", function (type) {\n                        if(type === \"F_EXCEED_SIZE\"){\n                            layer.msg(\"{{i18n .Lang \"message.upload_file_size_limit\"}}\");\n                        }\n                        console.log(type);\n                    });\n                }catch(e){\n                    console.log(e);\n                }\n            }\n        });\n    });\n</script>\n</body>\n</html>"
  },
  {
    "path": "views/blog/manage_list.tpl",
    "content": "<!DOCTYPE html>\n<html lang=\"zh-CN\">\n<head>\n    <meta charset=\"utf-8\">\n    <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n\n    <title>{{i18n .Lang \"common.my_blog\"}} - Powered by MinDoc</title>\n\n    <!-- Bootstrap -->\n    <link href=\"{{cdncss \"/static/bootstrap/css/bootstrap.min.css\"}}\" rel=\"stylesheet\" type=\"text/css\">\n    <link href=\"{{cdncss \"/static/font-awesome/css/font-awesome.min.css\"}}\" rel=\"stylesheet\" type=\"text/css\">\n    <link href=\"{{cdncss \"/static/bootstrap/plugins/bootstrap-fileinput/4.4.7/css/fileinput.min.css\"}}\" rel=\"stylesheet\" type=\"text/css\">\n    <link href=\"{{cdncss \"/static/bootstrap/plugins/bootstrap-fileinput/4.4.7/themes/explorer-fa/theme.css\"}}\" rel=\"stylesheet\" type=\"text/css\">\n    <link href=\"{{cdncss \"/static/css/main.css\" \"version\"}}\" rel=\"stylesheet\">\n    <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->\n    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->\n    <!--[if lt IE 9]>\n    <script src=\"/static/html5shiv/3.7.3/html5shiv.min.js\"></script>\n    <script src=\"/static/respond.js/1.4.2/respond.min.js\"></script>\n    <![endif]-->\n</head>\n<body>\n<div class=\"manual-reader\">\n{{template \"widgets/header.tpl\" .}}\n    <div class=\"container manual-body\">\n        <div class=\"row\">\n            <div class=\"page-left\">\n                <ul class=\"menu\">\n                    <li {{if eq .ControllerName \"BookController\"}}class=\"active\"{{end}}><a href=\"{{urlfor \"BookController.Index\"}}\" class=\"item\"><i class=\"fa fa-sitemap\" aria-hidden=\"true\"></i> {{i18n .Lang \"common.my_project\"}}</a> </li>\n                    <li {{if eq .ControllerName \"BlogController\"}}class=\"active\"{{end}}><a href=\"{{urlfor \"BlogController.ManageList\"}}\" class=\"item\"><i class=\"fa fa-file\" aria-hidden=\"true\"></i> {{i18n .Lang \"common.my_blog\"}}</a> </li>\n                </ul>\n            </div>\n            <div class=\"page-right\">\n                <div class=\"m-box\">\n                    <div class=\"box-head\">\n                        <strong class=\"box-title\">{{i18n .Lang \"blog.blog_list\"}}</strong>\n                        &nbsp;\n                        {{if eq .Member.Role 0 1 2 }}\n                        <a href=\"{{urlfor \"BlogController.ManageSetting\"}}\" class=\"btn btn-success btn-sm pull-right\">{{i18n .Lang \"blog.add_blog\"}}</a>\n                        {{end}}\n                    </div>\n                </div>\n                <div class=\"box-body\" id=\"blogList\">\n                    <div class=\"ui items\">\n                        {{range $index,$item := .ModelList}}\n                            <div class=\"item blog-item\">\n                                <div class=\"content\">\n                                    <a class=\"header\" href=\"{{urlfor \"BlogController.Index\" \":id\" $item.BlogId}}\" target=\"_blank\">\n                                        {{if eq $item.BlogStatus \"password\"}}\n                                        <div class=\"ui teal label horizontal\" data-tooltip=\"{{i18n $.Lang \"blog.encryption\"}}\">{{i18n $.Lang \"blog.encrypt\"}}</div>\n                                        {{end}}\n                                        {{$item.BlogTitle}}\n                                    </a>\n                                    <div class=\"description\">\n                                        <p class=\"line-clamp\">{{$item.BlogExcerpt}}&nbsp;</p>\n                                    </div>\n                                    <div class=\"extra\">\n                                        <div>\n                                            <div class=\"ui horizontal small list\">\n                                                <div class=\"item\"><i class=\"fa fa-clock-o\"></i> {{date_format $item.Modified \"2006-01-02 15:04:05\"}}</div>\n                                                <div class=\"item\"><a href=\"{{urlfor \"BlogController.ManageEdit\" \":id\" $item.BlogId}}\" title=\"{{i18n $.Lang \"blog.edit_blog\"}}\" target=\"_blank\"><i class=\"fa fa-edit\"></i> {{i18n $.Lang \"blog.edit\"}}</a></div>\n                                                <div class=\"item\"><a class=\"delete-btn\" title=\"{{i18n $.Lang \"blog.delete_blog\"}}\" data-id=\"{{$item.BlogId}}\"><i class=\"fa fa-trash\"></i> {{i18n $.Lang \"blog.delete\"}}</a></div>\n                                                <div class=\"item\"><a href=\"{{urlfor \"BlogController.ManageSetting\" \":id\" $item.BlogId}}\" title=\"{{i18n $.Lang \"blog.setting_blog\"}}\" class=\"setting-btn\"><i class=\"fa fa-gear\"></i> {{i18n $.Lang \"common.setting\"}}</a></div>\n                                            </div>\n                                        </div>\n                                    </div>\n                                </div>\n                            </div>\n                        {{else}}\n                        <div class=\"text-center\">{{i18n .Lang \"blog.no_blog\"}}</div>\n                        {{end}}\n                    </div>\n                    <nav class=\"pagination-container\">\n                        {{.PageHtml}}\n                    </nav>\n                </div>\n            </div>\n        </div>\n    </div>\n{{template \"widgets/footer.tpl\" .}}\n</div>\n\n\n<!-- Delete Book Modal -->\n<div class=\"modal fade\" id=\"deleteBlogModal\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"deleteBlogModalLabel\">\n    <div class=\"modal-dialog\" role=\"document\">\n        <form method=\"post\" id=\"deleteBlogForm\" action=\"{{urlfor \"BlogController.ManageDelete\"}}\">\n            <input type=\"hidden\" name=\"blog_id\" value=\"\">\n            <div class=\"modal-content\">\n                <div class=\"modal-header\">\n                    <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\"><span aria-hidden=\"true\">&times;</span></button>\n                    <h4 class=\"modal-title\">{{i18n .Lang \"blog.delete_blog\"}}</h4>\n                </div>\n                <div class=\"modal-body\">\n                    <span style=\"font-size: 14px;font-weight: 400;\">{{i18n .Lang \"message.confirm_delete_blog\"}}</span>\n                    <p></p>\n                    <p class=\"text error-message\">{{i18n .Lang \"message.delete_blog_tips\"}}</p>\n                </div>\n                <div class=\"modal-footer\">\n                    <span id=\"form-error-message2\" class=\"error-message\"></span>\n                    <button type=\"button\" class=\"btn btn-default\" data-dismiss=\"modal\">{{i18n .Lang \"common.cancel\"}}</button>\n                    <button type=\"submit\" id=\"btnDeleteBlog\" class=\"btn btn-primary\" data-loading-text=\"{{i18n .Lang \"message.process\"}}\">{{i18n .Lang \"common.confirm_delete\"}}</button>\n                </div>\n            </div>\n        </form>\n    </div>\n</div>\n\n<script src=\"{{cdnjs \"/static/jquery/1.12.4/jquery.min.js\"}}\" type=\"text/javascript\"></script>\n<script src=\"{{cdnjs \"/static/bootstrap/js/bootstrap.min.js\"}}\" type=\"text/javascript\"></script>\n<script src=\"{{cdnjs \"/static/vuejs/vue.min.js\"}}\" type=\"text/javascript\"></script>\n<script src=\"{{cdnjs \"/static/js/jquery.form.js\"}}\" type=\"text/javascript\"></script>\n<script src=\"{{cdnjs \"/static/bootstrap/plugins/bootstrap-fileinput/4.4.7/js/fileinput.min.js\"}}\"></script>\n<script src=\"{{cdnjs \"/static/bootstrap/plugins/bootstrap-fileinput/4.4.7/js/locales/zh.js\"}}\"></script>\n<script src=\"{{cdnjs \"/static/layer/layer.js\"}}\" type=\"text/javascript\" ></script>\n<script src=\"{{cdnjs \"/static/js/main.js\"}}\" type=\"text/javascript\"></script>\n<script type=\"text/javascript\">\n\n    /**\n     * 删除项目\n     */\n    function deleteBlog($id) {\n        $(\"#deleteBlogModal\").find(\"input[name='blog_id']\").val($id);\n        $(\"#deleteBlogModal\").modal(\"show\");\n    }\n    function copyBook($id){\n        var index = layer.load()\n        $.ajax({\n            url : \"{{urlfor \"BookController.Copy\"}}\" ,\n            data : {\"identify\":$id},\n            type : \"POST\",\n            dataType : \"json\",\n            success : function ($res) {\n                layer.close(index);\n                if ($res.errcode === 0) {\n                    window.app.lists.splice(0, 0, $res.data);\n                    $(\"#addBookDialogModal\").modal(\"hide\");\n                } else {\n                    layer.msg($res.message);\n                }\n            },\n            error : function () {\n                layer.close(index);\n                layer.msg({{i18n .Lang \"message.system_error\"}});\n            }\n        });\n    }\n\n    $(function () {\n\n        $(\"#blogList .delete-btn\").click(function () {\n            deleteBlog($(this).attr(\"data-id\"));\n        });\n        /**\n         * 删除项目\n         */\n        $(\"#deleteBlogForm\").ajaxForm({\n            beforeSubmit : function () {\n                $(\"#btnDeleteBlog\").button(\"loading\");\n            },\n            success : function ($res) {\n                if($res.errcode === 0){\n                    window.location = window.location.href;\n                }else{\n                    showError(res.message,\"#form-error-message2\");\n                }\n                $(\"#btnDeleteBlog\").button(\"reset\");\n            },\n            error : function () {\n                showError({{i18n .Lang \"message.system_error\"}},\"#form-error-message2\");\n                $(\"#btnDeleteBlog\").button(\"reset\");\n            }\n        });\n    });\n</script>\n</body>\n</html>\n"
  },
  {
    "path": "views/blog/manage_setting.tpl",
    "content": "<!DOCTYPE html>\n<html lang=\"zh-CN\">\n<head>\n    <meta charset=\"utf-8\">\n    <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n\n    <title>{{i18n .Lang \"blog.blog_setting\"}} - Powered by MinDoc</title>\n\n    <!-- Bootstrap -->\n    <link href=\"{{cdncss \"/static/bootstrap/css/bootstrap.min.css\"}}\" rel=\"stylesheet\">\n    <link href=\"{{cdncss \"/static/font-awesome/css/font-awesome.min.css\"}}\" rel=\"stylesheet\">\n    <link href=\"{{cdncss \"/static/css/main.css\" \"version\"}}\" rel=\"stylesheet\">\n    <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->\n    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->\n    <!--[if lt IE 9]>\n    <script src=\"/static/html5shiv/3.7.3/html5shiv.min.js\"></script>\n    <script src=\"/static/respond.js/1.4.2/respond.min.js\"></script>\n    <![endif]-->\n</head>\n<body>\n<div class=\"manual-reader\">\n    {{template \"widgets/header.tpl\" .}}\n    <div class=\"container manual-body\">\n        <div class=\"row\">\n            <div class=\"page-left\">\n                <ul class=\"menu\">\n                    <li {{if eq .ControllerName \"BookController\"}}class=\"active\"{{end}}><a href=\"{{urlfor \"BookController.Index\"}}\" class=\"item\"><i class=\"fa fa-sitemap\" aria-hidden=\"true\"></i> {{i18n .Lang \"common.my_project\"}}</a> </li>\n                    <li {{if eq .ControllerName \"BlogController\"}}class=\"active\"{{end}}><a href=\"{{urlfor \"BlogController.ManageList\"}}\" class=\"item\"><i class=\"fa fa-file\" aria-hidden=\"true\"></i> {{i18n .Lang \"common.my_blog\"}}</a> </li>\n                </ul>\n            </div>\n            <div class=\"page-right\">\n                <div class=\"m-box\">\n                    <div class=\"box-head\">\n                        <strong class=\"box-title\"> {{i18n .Lang \"blog.blog_setting\"}}</strong>\n                    </div>\n                </div>\n                <div class=\"box-body\">\n                    <form method=\"post\" id=\"gloablEditForm\" action=\"{{urlfor \"BlogController.ManageSetting\"}}\">\n                        <input type=\"hidden\" name=\"id\" id=\"blogId\" value=\"{{.Model.BlogId}}\">\n                        <input type=\"hidden\" name=\"identify\" value=\"{{.Model.BlogIdentify}}\">\n                        <input type=\"hidden\" name=\"document_id\" value=\"{{.Model.DocumentId}}\">\n                        <input type=\"hidden\" name=\"order_index\" value=\"{{.Model.OrderIndex}}\">\n                        <div class=\"form-group\">\n                            <label>{{i18n .Lang \"blog.title\"}}</label>\n                            <input type=\"text\" class=\"form-control\" name=\"title\" id=\"title\" placeholder=\"{{i18n .Lang \"blog.title\"}}\" value=\"{{.Model.BlogTitle}}\">\n                        </div>\n\n\n                        <div class=\"form-group\">\n                            <label>{{i18n .Lang \"blog.type\"}}</label>\n                            <div class=\"radio\">\n                                <label class=\"radio-inline\">\n                                    <input type=\"radio\" {{if eq .Model.BlogType 0}}checked{{end}} name=\"blog_type\" value=\"0\">{{i18n .Lang \"blog.normal_blog\"}}<span class=\"text\"></span>\n                                </label>\n                                <label class=\"radio-inline\">\n                                    <input type=\"radio\" {{if eq .Model.BlogType 1}}checked{{end}} name=\"blog_type\" value=\"1\">{{i18n .Lang \"blog.link_blog\"}}<span class=\"text\"></span>\n                                </label>\n                            </div>\n                        </div>\n                        <div class=\"form-group\" id=\"blogLinkDocument\"{{if ne .Model.BlogType 1}} style=\"display: none;\" {{end}}>\n                            <label>{{i18n .Lang \"blog.ref_doc\"}}</label>\n                            <div class=\"row\">\n                                <div class=\"col-sm-6\">\n                                    <input type=\"text\" class=\"form-control\" placeholder=\"{{i18n .Lang \"message.input_proj_id_pls\"}}\" name=\"bookIdentify\" value=\"{{.Model.BookIdentify}}\">\n                                </div>\n                                <div class=\"col-sm-6\">\n                                    <input type=\"text\" class=\"form-control\" placeholder=\"{{i18n .Lang \"message.input_doc_id_pls\"}}\" name=\"documentIdentify\" value=\"{{.Model.DocumentIdentify}}\">\n                                </div>\n                            </div>\n\n                        </div>\n                        <div class=\"form-group\">\n                            <label>{{i18n .Lang \"blog.blog_status\"}}</label>\n                            <div class=\"radio\">\n                                <label class=\"radio-inline\">\n                                    <input type=\"radio\" {{if eq .Model.BlogStatus \"public\"}}checked{{end}} name=\"status\" value=\"public\">{{i18n .Lang \"blog.public\"}}<span class=\"text\"></span>\n                                </label>\n                                <label class=\"radio-inline\">\n                                    <input type=\"radio\" {{if eq .Model.BlogStatus \"password\"}}checked{{end}} name=\"status\" value=\"password\">{{i18n .Lang \"blog.encryption\"}}<span class=\"text\"></span>\n                                </label>\n                                <label class=\"radio-inline\">\n                                    <input type=\"radio\" {{if eq .Model.BlogStatus \"private\"}}checked{{end}} name=\"status\" value=\"private\">{{i18n .Lang \"blog.private\"}}<span class=\"text\"></span>\n                                </label>\n                            </div>\n                        </div>\n                        <div class=\"form-group\"{{if ne .Model.BlogStatus \"password\"}} style=\"display: none;\"{{end}} id=\"blogPassword\">\n                            <label>{{i18n .Lang \"blog.blog_pwd\"}}</label>\n                            <input type=\"password\" class=\"form-control\" name=\"password\" id=\"password\" placeholder=\"{{i18n .Lang \"blog.blog_pwd\"}}\" value=\"{{.Model.Password}}\" maxlength=\"20\">\n                        </div>\n                        <div class=\"form-group\">\n                            <label>{{i18n .Lang \"blog.blog_digest\"}}</label>\n                            <textarea rows=\"3\" class=\"form-control\" name=\"excerpt\" style=\"height: 90px\" placeholder=\"{{i18n .Lang \"blog.blog_digest\"}}\">{{.Model.BlogExcerpt}}</textarea>\n                            <p class=\"text\">{{i18n .Lang \"message.blog_digest_tips\"}}</p>\n                        </div>\n\n                        <div class=\"form-group\">\n                            <button type=\"submit\" id=\"btnSaveBlogInfo\" class=\"btn btn-success\" data-loading-text=\"{{i18n .Lang \"message.processing\"}}\">{{i18n .Lang \"common.save\"}}</button>\n                            <a href=\"{{.Referer}}\" title=\"{{i18n .Lang \"doc.backward\"}}\" class=\"btn btn-info\">{{i18n .Lang \"doc.backward\"}}</a>\n                            <span id=\"form-error-message\" class=\"error-message\"></span>\n                        </div>\n                    </form>\n\n                    <div class=\"clearfix\"></div>\n\n                </div>\n            </div>\n        </div>\n    </div>\n    {{template \"widgets/footer.tpl\" .}}\n</div>\n\n\n<script src=\"{{cdnjs \"/static/jquery/1.12.4/jquery.min.js\"}}\" type=\"text/javascript\"></script>\n<script src=\"{{cdnjs \"/static/bootstrap/js/bootstrap.min.js\"}}\" type=\"text/javascript\"></script>\n<script src=\"{{cdnjs \"/static/js/jquery.form.js\"}}\" type=\"text/javascript\"></script>\n<script src=\"{{cdnjs \"/static/js/main.js\"}}\" type=\"text/javascript\"></script>\n<script type=\"text/javascript\">\n    $(function () {\n        const blogId = Number($(\"#blogId\").val());\n        $(\"#gloablEditForm\").ajaxForm({\n            beforeSubmit : function () {\n                var title = $.trim($(\"#title\").val());\n\n                if (title === \"\"){\n                    return showError(\"{{i18n .Lang \"message.blog_title_empty\"}}\");\n                }\n                $(\"#btnSaveBlogInfo\").button(\"loading\");\n            },success : function ($res) {\n                if($res.errcode === 0) {\n                    showSuccess(\"{{i18n .Lang \"message.success\"}}\");\n                    $(\"#blogId\").val($res.data.blog_id);\n                    if (blogId === 0) {\n                        // 优化新增文章后直接跳转到编辑页面\n                        window.location.href = {{urlfor \"BlogController.ManageEdit\" \":id\" \"xxx\"}}.replace(\"xxx\", $res.data.blog_id)\n                    }\n                }else{\n                    showError($res.message);\n                }\n                $(\"#btnSaveBlogInfo\").button(\"reset\");\n            }, error : function () {\n                showError(\"{{i18n .Lang \"message.system_error\"}}\");\n                $(\"#btnSaveBlogInfo\").button(\"reset\");\n            }\n        }).find(\"input[name='status']\").change(function () {\n            var $status = $(this).val();\n            if($status === \"password\"){\n                $(\"#blogPassword\").show();\n            }else{\n                $(\"#blogPassword\").hide();\n            }\n        });\n        $(\"#gloablEditForm\").find(\"input[name='blog_type']\").change(function () {\n            var $link = $(this).val();\n            if($link == 1){\n                $(\"#blogLinkDocument\").show();\n            }else{\n                $(\"#blogLinkDocument\").hide();\n            }\n        });\n    });\n</script>\n</body>\n</html>"
  },
  {
    "path": "views/book/dashboard.tpl",
    "content": "<!DOCTYPE html>\n<html lang=\"zh-CN\" xmlns=\"http://www.w3.org/1999/html\">\n<head>\n    <meta charset=\"utf-8\">\n    <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n\n    <title>{{i18n $.Lang \"blog.summary\"}} - Powered by MinDoc</title>\n\n    <!-- Bootstrap -->\n    <link href=\"{{cdncss \"/static/bootstrap/css/bootstrap.min.css\"}}\" rel=\"stylesheet\">\n    <link href=\"{{cdncss \"/static/font-awesome/css/font-awesome.min.css\"}}\" rel=\"stylesheet\">\n\n    <link href=\"{{cdncss \"/static/css/main.css\" \"version\"}}\" rel=\"stylesheet\">\n    <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->\n    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->\n    <!--[if lt IE 9]>\n    <script src=\"/static/html5shiv/3.7.3/html5shiv.min.js\"></script>\n    <script src=\"/static/respond.js/1.4.2/respond.min.js\"></script>\n    <![endif]-->\n</head>\n<body>\n<div class=\"manual-reader\">\n    {{template \"widgets/header.tpl\" .}}\n    <div class=\"container manual-body\">\n        <div class=\"row\">\n            <div class=\"page-left\">\n                <ul class=\"menu\">\n                    <li class=\"active\"><a href=\"{{urlfor \"BookController.Dashboard\" \":key\" .Model.Identify}}\" class=\"item\"><i class=\"fa fa-dashboard\" aria-hidden=\"true\"></i> {{i18n $.Lang \"blog.summary\"}}</a> </li>\n                    {{if eq .Model.RoleId 0 1}}\n                        <li><a href=\"{{urlfor \"BookController.Users\" \":key\" .Model.Identify}}\" class=\"item\"><i class=\"fa fa-user\" aria-hidden=\"true\"></i> {{i18n $.Lang \"blog.member\"}}</a> </li>\n                        <li><a href=\"{{urlfor \"BookController.Team\" \":key\" .Model.Identify}}\" class=\"item\"><i class=\"fa fa-group\" aria-hidden=\"true\"></i> {{i18n $.Lang \"blog.team\"}}</a> </li>\n                        <li><a href=\"{{urlfor \"BookController.Setting\" \":key\" .Model.Identify}}\" class=\"item\"><i class=\"fa fa-gear\" aria-hidden=\"true\"></i> {{i18n $.Lang \"common.setting\"}}</a> </li>\n                    {{end}}\n                </ul>\n\n            </div>\n            <div class=\"page-right\">\n                <div class=\"m-box\">\n                    <div class=\"box-head\">\n                        <strong class=\"box-title\">\n                            {{if eq .Model.PrivatelyOwned 0}}\n                            <i class=\"fa fa-unlock\" aria-hidden=\"true\" title=\"{{i18n $.Lang \"blog.public_project\"}}\" data-toggle=\"tooltip\"></i>\n                            {{else}}\n                            <i class=\"fa fa-lock\" aria-hidden=\"true\" title=\"{{i18n $.Lang \"blog.private_project\"}}\" data-toggle=\"tooltip\"></i>\n                            {{end}}\n                            {{.Model.BookName}}\n                        </strong>\n                        {{if ne .Model.RoleId 3}}\n                        <a href=\"{{urlfor \"DocumentController.Edit\" \":key\" .Model.Identify \":id\" \"\"}}\" class=\"btn btn-default btn-sm pull-right\" target=\"_blank\"><i class=\"fa fa-edit\" aria-hidden=\"true\"></i> {{i18n $.Lang \"blog.edit\"}}</a>\n                        {{end}}\n                        <a href=\"{{urlfor \"DocumentController.Index\" \":key\" .Model.Identify}}\" class=\"btn btn-default btn-sm pull-right\" style=\"margin-right: 5px;\" target=\"_blank\"><i class=\"fa fa-eye\"></i> {{i18n $.Lang \"blog.read\"}}</a>\n\n                        {{if eq .Model.RoleId 0 1 2}}\n                        <button class=\"btn btn-default btn-sm pull-right\" style=\"margin-right: 5px;\" id=\"btnRelease\"><i class=\"fa fa-upload\" aria-hidden=\"true\"></i> {{i18n $.Lang \"blog.publish\"}}</button>\n                        {{end}}\n                    </div>\n                </div>\n                <div class=\"box-body\">\n                    <div class=\"dashboard\">\n                        <div class=\"pull-left\" style=\"width: 200px;margin-bottom: 15px;\">\n                            <div class=\"book-image\">\n                                <img src=\"{{cdnimg .Model.Cover}}\" onerror=\"this.src='{{cdnimg \"/static/images/book.jpg\"}}'\" style=\"border: 1px solid #666;width: 175px;\">\n                            </div>\n                        </div>\n\n                            <div class=\"list\">\n                                <span class=\"title\">{{i18n $.Lang \"blog.creator\"}}：</span>\n                                <span class=\"body\">{{.Model.CreateName}}</span>\n                            </div>\n                            <div class=\"list\">\n                                <span class=\"title\">{{i18n $.Lang \"blog.doc_amount\"}}：</span>\n                                <span class=\"body\">{{.Model.DocCount}} {{i18n $.Lang \"blog.doc_unit\"}}</span>\n                            </div>\n                            <div class=\"list\">\n                                <span class=\"title\">{{i18n $.Lang \"blog.create_time\"}}：</span>\n                                <span class=\"body\"> {{date_format .Model.CreateTime \"2006-01-02 15:04:05\"}} </span>\n                            </div>\n                            <div class=\"list\">\n                                <span class=\"title\">{{i18n $.Lang \"blog.update_time\"}}：</span>\n                                <span class=\"body\"> {{date_format .Model.CreateTime \"2006-01-02 15:04:05\"}} </span>\n                            </div>\n                        <div class=\"list\">\n                            <span class=\"title\">{{i18n $.Lang \"blog.project_role\"}}：</span>\n                            <span class=\"body\">{{.Model.RoleName}}</span>\n                        </div>\n                       <!-- {{/* <div class=\"list\">\n                            <span class=\"title\">{{i18n $.Lang \"blog.comment_amount\"}}：</span>\n                            <span class=\"body\">{{.Model.CommentCount}} {{i18n $.Lang \"blog.comment_unit\"}}</span>\n                        </div>*/}}\n                        -->\n                    <div class=\"list\">\n                        <span class=\"title\">{{i18n $.Lang \"blog.project_desc\"}}：</span>\n                        <span class=\"body\">{{.Model.Label}}</span>\n                    </div>\n                        <div class=\"summary\">{{.Description}} </div>\n\n                    </div>\n                </div>\n            </div>\n        </div>\n    </div>\n    {{template \"widgets/footer.tpl\" .}}\n</div>\n<script src=\"{{cdnjs \"/static/jquery/1.12.4/jquery.min.js\"}}\"></script>\n<script src=\"{{cdnjs \"/static/bootstrap/js/bootstrap.min.js\"}}\"></script>\n<script src=\"{{cdnjs \"/static/layer/layer.js\"}}\"></script>\n<script src=\"{{cdnjs \"/static/js/main.js\"}}\" type=\"text/javascript\"></script>\n<script type=\"text/javascript\">\n    $(function () {\n        $(\"#btnRelease\").on(\"click\",function () {\n            $.ajax({\n                url : \"{{urlfor \"BookController.Release\" \":key\" .Model.Identify}}\",\n                data :{\"identify\" : \"{{.Model.Identify}}\" },\n                type : \"post\",\n                dataType : \"json\",\n                success : function (res) {\n                    if(res.errcode === 0){\n                        layer.msg(\"{{i18n $.Lang \"message.publish_to_queue\"}}\");\n                    }else{\n                        layer.msg(res.message);\n                    }\n                }\n            });\n        });\n\n    });\n</script>\n</body>\n</html>"
  },
  {
    "path": "views/book/index.tpl",
    "content": "<!DOCTYPE html>\n<html lang=\"zh-CN\">\n<head>\n    <meta charset=\"utf-8\">\n    <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n\n    <title>{{i18n $.Lang \"common.my_project\"}} - Powered by MinDoc</title>\n\n    <!-- Bootstrap -->\n    <link href=\"{{cdncss \"/static/bootstrap/css/bootstrap.min.css\"}}\" rel=\"stylesheet\" type=\"text/css\">\n    <link href=\"{{cdncss \"/static/font-awesome/css/font-awesome.min.css\"}}\" rel=\"stylesheet\" type=\"text/css\">\n    <link href=\"{{cdncss \"/static/bootstrap/plugins/bootstrap-fileinput/4.4.7/css/fileinput.min.css\"}}\" rel=\"stylesheet\" type=\"text/css\">\n    <link href=\"{{cdncss \"/static/bootstrap/plugins/bootstrap-fileinput/4.4.7/themes/explorer-fa/theme.css\"}}\" rel=\"stylesheet\" type=\"text/css\">\n    <link href=\"{{cdncss \"/static/select2/4.0.5/css/select2.min.css\"}}\" rel=\"stylesheet\">\n    <link href=\"{{cdncss \"/static/css/main.css\" \"version\"}}\" rel=\"stylesheet\">\n    <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->\n    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->\n    <!--[if lt IE 9]>\n    <script src=\"/static/html5shiv/3.7.3/html5shiv.min.js\"></script>\n    <script src=\"/static/respond.js/1.4.2/respond.min.js\"></script>\n    <![endif]-->\n</head>\n<body>\n<div class=\"manual-reader\">\n    {{template \"widgets/header.tpl\" .}}\n    <div class=\"container manual-body\">\n        <div class=\"row\">\n            <div class=\"page-left\">\n                <ul class=\"menu\">\n                    <li {{if eq .ControllerName \"BookController\"}}class=\"active\"{{end}}><a href=\"{{urlfor \"BookController.Index\"}}\" class=\"item\"><i class=\"fa fa-sitemap\" aria-hidden=\"true\"></i> {{i18n $.Lang \"common.my_project\"}}</a> </li>\n                    <li {{if eq .ControllerName \"BlogController\"}}class=\"active\"{{end}}><a href=\"{{urlfor \"BlogController.ManageList\"}}\" class=\"item\"><i class=\"fa fa-file\" aria-hidden=\"true\"></i> {{i18n $.Lang \"common.my_blog\"}}</a> </li>\n                </ul>\n            </div>\n            <div class=\"page-right\">\n                <div class=\"m-box\">\n                    <div class=\"box-head\">\n                        <strong class=\"box-title\">{{i18n $.Lang \"blog.project_list\"}}</strong>\n                        &nbsp;\n                        {{if eq .Member.Role 0 1 2 }}\n                        <button type=\"button\" data-toggle=\"modal\" data-target=\"#addBookDialogModal\" class=\"btn btn-success btn-sm pull-right\">{{i18n $.Lang \"blog.add_project\"}}</button>\n                        <button type=\"button\" data-toggle=\"modal\" data-target=\"#importBookDialogModal\" class=\"btn btn-primary btn-sm pull-right\" style=\"margin-right: 5px;\">{{i18n $.Lang \"blog.import_project\"}}</button>\n                        {{end}}\n                    </div>\n                </div>\n                <div class=\"box-body\" id=\"bookList\">\n                    <div class=\"book-list\">\n                        <template v-if=\"lists.length <= 0\">\n                        <div class=\"text-center\">{{i18n $.Lang \"message.no_data\"}}</div>\n                        </template>\n                        <template v-else>\n\n                        <div class=\"list-item\" v-for=\"item in lists\">\n                            <div class=\"book-title\">\n                                <div class=\"pull-left\">\n                                    <a :href=\"'{{.BaseUrl}}/book/' + item.identify + '/dashboard'\" title=\"{{i18n $.Lang \"blog.project_summary\"}}\" data-toggle=\"tooltip\">\n                                       <template v-if=\"item.privately_owned == 0\">\n                                           <i class=\"fa fa-unlock\" aria-hidden=\"true\"></i>\n                                       </template>\n                                       <template v-else-if=\"item.privately_owned == 1\">\n                                           <i class=\"fa fa-lock\" aria-hidden=\"true\"></i>\n                                       </template>\n                                        ${item.book_name}\n                                    </a>\n                                </div>\n                                <div class=\"pull-right\">\n                                    <div class=\"btn-group\">\n                                        <a  :href=\"'{{.BaseUrl}}/book/' + item.identify + '/dashboard'\" class=\"btn btn-default\">{{i18n $.Lang \"common.setting\"}}</a>\n\n                                        <a href=\"javascript:;\" class=\"btn btn-default dropdown-toggle\" data-toggle=\"dropdown\" aria-haspopup=\"true\" aria-expanded=\"false\">\n                                            <span class=\"caret\"></span>\n                                            <span class=\"sr-only\">Toggle Dropdown</span>\n                                        </a>\n                                        <ul class=\"dropdown-menu\">\n                                            <li><a :href=\"'{{urlfor \"DocumentController.Index\" \":key\" \"\"}}' + item.identify\" target=\"_blank\">{{i18n $.Lang \"blog.read\"}}</a></li>\n                                            <template v-if=\"item.role_id != 3\">\n                                            <li><a :href=\"'{{.BaseUrl}}/api/' + item.identify + '/edit'\" target=\"_blank\">{{i18n $.Lang \"blog.edit\"}}</a></li>\n                                            </template>\n                                            <template v-if=\"item.role_id == 0\">\n                                            <li><a :href=\"'javascript:deleteBook(\\''+item.identify+'\\');'\">{{i18n $.Lang \"blog.delete\"}}</a></li>\n                                            <li><a :href=\"'javascript:copyBook(\\''+item.identify+'\\');'\">{{i18n $.Lang \"blog.copy\"}}</a></li>\n                                            </template>\n                                        </ul>\n\n                                    </div>\n\n                                    {{/*<a :href=\"'{{urlfor \"DocumentController.Index\" \":key\" \"\"}}' + item.identify\" title=\"{{i18n $.Lang \"blog.view\"}}\" data-toggle=\"tooltip\" target=\"_blank\"><i class=\"fa fa-eye\"></i> {{i18n $.Lang \"blog.view\"}}</a>*/}}\n                                    {{/*<template v-if=\"item.role_id != 3\">*/}}\n                                        {{/*<a :href=\"'/api/' + item.identify + '/edit'\" title=\"{{i18n $.Lang \"blog.edit_doc\"}}\" data-toggle=\"tooltip\" target=\"_blank\"><i class=\"fa fa-edit\" aria-hidden=\"true\"></i> {{i18n $.Lang \"blog.edit_doc\"}}</a>*/}}\n                                    {{/*</template>*/}}\n                                </div>\n                                <div class=\"clearfix\"></div>\n                            </div>\n                            <div class=\"desc-text\">\n                                    <template v-if=\"item.description === ''\">\n                                        &nbsp;\n                                    </template>\n                                    <template v-else=\"\">\n                                        <a :href=\"'{{.BaseUrl}}/book/' + item.identify + '/dashboard'\" title=\"{{i18n $.Lang \"blog.project_summary\"}}\" style=\"font-size: 12px;\">\n                                        ${item.description}\n                                        </a>\n                                    </template>\n                            </div>\n                            <div class=\"info\">\n                                <span title=\"{{i18n $.Lang \"blog.create_time\"}}\" data-toggle=\"tooltip\" data-placement=\"bottom\"><i class=\"fa fa-clock-o\"></i>\n                                    ${(new Date(item.create_time)).format(\"yyyy-MM-dd hh:mm:ss\")}\n\n                                </span>\n                                <span title=\"{{i18n $.Lang \"blog.creator\"}}\" data-toggle=\"tooltip\" data-placement=\"bottom\"><i class=\"fa fa-user\"></i> ${item.create_name}</span>\n                                <span title=\"{{i18n $.Lang \"blog.doc_amount\"}}\" data-toggle=\"tooltip\" data-placement=\"bottom\"><i class=\"fa fa-pie-chart\"></i> ${item.doc_count}</span>\n                                <span title=\"{{i18n $.Lang \"blog.project_role\"}}\" data-toggle=\"tooltip\" data-placement=\"bottom\"><i class=\"fa fa-user-secret\"></i> ${item.role_name}</span>\n                                <template v-if=\"item.last_modify_text !== ''\">\n                                    <span title=\"{{i18n $.Lang \"blog.last_edit\"}}\" data-toggle=\"tooltip\" data-placement=\"bottom\"><i class=\"fa fa-pencil\"></i> {{i18n $.Lang \"blog.last_edit\"}}: ${item.last_modify_text}</span>\n                                </template>\n\n                            </div>\n                        </div>\n                        </template>\n                    </div>\n                    <template v-if=\"lists.length >= 0\">\n                        <nav class=\"pagination-container\">\n                            {{.PageHtml}}\n                        </nav>\n                    </template>\n                </div>\n            </div>\n        </div>\n    </div>\n    {{template \"widgets/footer.tpl\" .}}\n</div>\n<!-- Modal -->\n<div class=\"modal fade\" id=\"addBookDialogModal\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"addBookDialogModalLabel\">\n    <div class=\"modal-dialog modal-lg\" role=\"document\" style=\"min-width: 900px;\">\n        <form method=\"post\" autocomplete=\"off\" action=\"{{urlfor \"BookController.Create\"}}\" id=\"addBookDialogForm\" enctype=\"multipart/form-data\">\n        <div class=\"modal-content\">\n            <div class=\"modal-header\">\n                <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\"><span aria-hidden=\"true\">&times;</span></button>\n                <h4 class=\"modal-title\" id=\"myModalLabel\">{{i18n $.Lang \"blog.add_project\"}}</h4>\n            </div>\n            <div class=\"modal-body\">\n                <div class=\"form-group\">\n                    <div class=\"pull-left\" style=\"width: 620px\">\n                        <div class=\"form-group required\">\n                            <label class=\"text-label col-sm-2\">{{i18n $.Lang \"common.project_space\"}}</label>\n                            <div class=\"col-sm-10\">\n                                <select class=\"js-data-example-ajax-add form-control\" multiple=\"multiple\" name=\"itemId\" id=\"itemId\">\n                                {{if .Item}}<option value=\"{{.Item.ItemId}}\" selected>{{.Item.ItemName}}</option> {{end}}\n                                </select>\n                                <p class=\"text\">{{i18n $.Lang \"message.project_must_belong_space\"}}</p>\n                            </div>\n                            <div class=\"clearfix\"></div>\n                        </div>\n                        <div class=\"form-group required\">\n                            <label class=\"text-label col-sm-2\">{{i18n $.Lang \"blog.project_title\"}}</label>\n                            <div class=\"col-sm-10\">\n                                <input type=\"text\" class=\"form-control\" placeholder=\"{{i18n $.Lang \"message.project_title_placeholder\"}}\" name=\"book_name\" id=\"bookName\">\n                                <p class=\"text\">{{i18n $.Lang \"message.project_title_tips\"}}</p>\n                            </div>\n                            <div class=\"clearfix\"></div>\n                        </div>\n                        <div class=\"form-group required\">\n                           <label class=\"text-label col-sm-2\">{{i18n $.Lang \"blog.project_id\"}}</label>\n                            <div class=\"col-sm-10\">\n                                <input type=\"text\" class=\"form-control\" placeholder=\"{{i18n $.Lang \"message.project_id_placeholder\"}}\" name=\"identify\" id=\"identify\">\n                                <p class=\"text\">{{i18n $.Lang \"message.project_id_tips\"}}</p>\n                            </div>\n                            <div class=\"clearfix\"></div>\n                        </div>\n                        <div class=\"form-group\">\n                            <textarea name=\"description\" id=\"description\" class=\"form-control\" placeholder=\"{{i18n $.Lang \"message.project_desc_placeholder\"}}\" style=\"height: 90px;\"></textarea>\n                        </div>\n                        <div class=\"form-group\">\n                            <div class=\"col-lg-4\">\n                                <label>\n                                    <input type=\"radio\" name=\"privately_owned\" value=\"0\" checked> {{i18n $.Lang \"blog.public\"}}<span class=\"text\">{{i18n $.Lang \"message.project_public_desc\"}}</span>\n                                </label>\n                            </div>\n                            <div class=\"col-lg-8\">\n                                <label>\n                                    <input type=\"radio\" name=\"privately_owned\" value=\"1\"> {{i18n $.Lang \"blog.private\"}}<span class=\"text\">{{i18n $.Lang \"message.project_private_desc\"}}</span>\n                                </label>\n                            </div>\n                            <div class=\"clearfix\"></div>\n                        </div>\n                        <!--选择编辑器模式-->\n                        <div class=\"form-group\">\n                            <label>{{i18n $.Lang \"blog.text_editor\"}}</label>\n                            <div class=\"col-lg-20\">\n                                <label class=\"radio-inline\">\n                                    <input type=\"radio\" name=\"editor\" value=\"markdown\"> Markdown\n                                </label>\n                                <label class=\"radio-inline\">\n                                    <input type=\"radio\" name=\"editor\" checked value=\"cherry_markdown\"> Markdown (cherry)\n                                </label>\n                                <label class=\"radio-inline\">\n                                    <input type=\"radio\" name=\"editor\" value=\"new_html\"> Html (Quill)\n                                </label>\n                                <label class=\"radio-inline\">\n                                    <input type=\"radio\" name=\"editor\" value=\"html\"> Html (wangEditor)\n                                </label>\n                            </div>\n                            <div class=\"clearfix\"></div>\n                        </div>\n                    </div>\n                    <div class=\"pull-right text-center\" style=\"width: 235px;\">\n                        <canvas id=\"bookCover\" height=\"230px\" width=\"170px\"><img src=\"{{cdnimg \"/static/images/book.jpg\"}}\"> </canvas>\n                        <p class=\"text\">{{i18n $.Lang \"message.project_cover_desc\"}}</p>\n                    </div>\n                </div>\n\n\n                <div class=\"clearfix\"></div>\n            </div>\n            <div class=\"modal-footer\">\n                <span id=\"form-error-message\"></span>\n                <button type=\"button\" class=\"btn btn-default\" data-dismiss=\"modal\">{{i18n $.Lang \"common.cancel\"}}</button>\n                <button type=\"button\" class=\"btn btn-success\" id=\"btnSaveDocument\" data-loading-text=\"{{i18n $.Lang \"common.processing\"}}\">{{i18n $.Lang \"common.save\"}}</button>\n            </div>\n        </div>\n        </form>\n    </div>\n</div>\n<!--END Modal-->\n<!-- importBookDialogModal -->\n<div class=\"modal fade\" id=\"importBookDialogModal\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"importBookDialogModalLabel\">\n    <div class=\"modal-dialog\" role=\"document\" style=\"min-width: 900px;\">\n        <form method=\"post\" autocomplete=\"off\" action=\"{{urlfor \"BookController.Import\"}}\" id=\"importBookDialogForm\" enctype=\"multipart/form-data\">\n            <div class=\"modal-content\">\n                <div class=\"modal-header\">\n                    <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\"><span aria-hidden=\"true\">&times;</span></button>\n                    <h4 class=\"modal-title\">{{i18n $.Lang \"blog.import_project\"}}</h4>\n                </div>\n                <div class=\"modal-body\">\n                    <div class=\"form-group\">\n                        <div class=\"form-group required\">\n                            <label class=\"text-label\">{{i18n $.Lang \"common.project_space\"}}</label>\n                            <select class=\"js-data-example-ajax-import form-control\" multiple=\"multiple\" name=\"itemId\">\n                                {{if .Item}}<option value=\"{{.Item.ItemId}}\" selected>{{.Item.ItemName}}</option> {{end}}\n                            </select>\n                            <p class=\"text\">{{i18n $.Lang \"message.project_must_belong_space\"}}</p>\n                        </div>\n                        <div class=\"form-group required\">\n                            <label class=\"text-label\">{{i18n $.Lang \"blog.project_title\"}}</label>\n                            <input type=\"text\" class=\"form-control\" placeholder=\"{{i18n $.Lang \"message.project_title_placeholder\"}}\" name=\"book_name\" maxlength=\"100\" value=\"\">\n                            <p class=\"text\">{{i18n $.Lang \"blog.project_title_tips\"}}</p>\n                        </div>\n                        <div class=\"form-group required\">\n                            <label class=\"text-label\">{{i18n $.Lang \"blog.project_id\"}}</label>\n                            <input type=\"text\" class=\"form-control\"  placeholder=\"{{i18n $.Lang \"message.project_id_placeholder\"}}\" name=\"identify\" value=\"\">\n                            <div class=\"clearfix\"></div>\n                            <p class=\"text\">{{i18n $.Lang \"blog.project_id_tips\"}}</p>\n                        </div>\n                        <div class=\"form-group\">\n                            <label class=\"text-label\">{{i18n $.Lang \"blog.project_desc\"}}</label>\n                            <textarea name=\"description\" id=\"description\" class=\"form-control\" placeholder=\"{{i18n $.Lang \"message.project_desc_placeholder\"}}\" style=\"height: 90px;\"></textarea>\n                        </div>\n                        <div class=\"form-group\">\n                            <div class=\"col-lg-4\">\n                                <label>\n                                    <input type=\"radio\" name=\"privately_owned\" value=\"0\" checked> {{i18n $.Lang \"blog.public\"}}<span class=\"text\">{{i18n $.Lang \"message.project_public_desc\"}}</span>\n                                </label>\n                            </div>\n                            <div class=\"col-lg-8\">\n                                <label>\n                                    <input type=\"radio\" name=\"privately_owned\" value=\"1\"> {{i18n $.Lang \"blog.private\"}}<span class=\"text\">{{i18n $.Lang \"message.project_private_desc\"}}</span>\n                                </label>\n                            </div>\n                            <div class=\"clearfix\"></div>\n                        </div>\n                        <div class=\"form-group\">\n                            <div class=\"file-loading\">\n                                <input id=\"import-book-upload\" name=\"import-file\" type=\"file\" accept=\".zip,.docx\">\n                            </div>\n                            <div id=\"kartik-file-errors\"></div>\n                        </div>\n                    </div>\n                    <div class=\"clearfix\"></div>\n                </div>\n                <div class=\"modal-footer\">\n                    <span id=\"import-book-form-error-message\" style=\"background-color: #ffffff;border: none;margin: 0;padding: 0;\"></span>\n                    <button type=\"button\" class=\"btn btn-default\" data-dismiss=\"modal\">{{i18n $.Lang \"common.cancel\"}}</button>\n                    <button type=\"button\" class=\"btn btn-success\" id=\"btnImportBook\" data-loading-text=\"{{i18n $.Lang \"common.processing\"}}\">{{i18n $.Lang \"common.create\"}}</button>\n                </div>\n            </div>\n        </form>\n    </div>\n</div>\n<!--END importBookDialogModal-->\n<!-- Delete Book Modal -->\n<div class=\"modal fade\" id=\"deleteBookModal\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"deleteBookModalLabel\">\n    <div class=\"modal-dialog\" role=\"document\">\n        <form method=\"post\" id=\"deleteBookForm\" action=\"{{urlfor \"BookController.Delete\"}}\">\n            <input type=\"hidden\" name=\"identify\" value=\"\">\n            <div class=\"modal-content\">\n                <div class=\"modal-header\">\n                    <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\"><span aria-hidden=\"true\">&times;</span></button>\n                    <h4 class=\"modal-title\">{{i18n $.Lang \"blog.delete_project\"}}</h4>\n                </div>\n                <div class=\"modal-body\">\n                    <span style=\"font-size: 14px;font-weight: 400;\">{{i18n $.Lang \"message.confirm_delete_project\"}}</span>\n                    <p></p>\n                    <p class=\"text error-message\">{{i18n $.Lang \"message.warning_delete_project\"}}</p>\n                </div>\n                <div class=\"modal-footer\">\n                    <span id=\"form-error-message2\" class=\"error-message\"></span>\n                    <button type=\"button\" class=\"btn btn-default\" data-dismiss=\"modal\">{{i18n $.Lang \"common.cancel\"}}</button>\n                    <button type=\"submit\" id=\"btnDeleteBook\" class=\"btn btn-primary\" data-loading-text=\"{{i18n $.Lang \"common.processing\"}}\">{{i18n $.Lang \"common.confirm_delete\"}}</button>\n                </div>\n            </div>\n        </form>\n    </div>\n</div>\n\n<script src=\"{{cdnjs \"/static/jquery/1.12.4/jquery.min.js\"}}\" type=\"text/javascript\"></script>\n<script src=\"{{cdnjs \"/static/bootstrap/js/bootstrap.min.js\"}}\" type=\"text/javascript\"></script>\n<script src=\"{{cdnjs \"/static/vuejs/vue.min.js\"}}\" type=\"text/javascript\"></script>\n<script src=\"{{cdnjs \"/static/js/jquery.form.js\"}}\" type=\"text/javascript\"></script>\n<script src=\"{{cdnjs \"/static/bootstrap/plugins/bootstrap-fileinput/4.4.7/js/fileinput.min.js\"}}\"></script>\n<script src=\"{{cdnjs \"/static/bootstrap/plugins/bootstrap-fileinput/4.4.7/js/locales/zh.js\"}}\"></script>\n<script src=\"{{cdnjs \"/static/layer/layer.js\"}}\" type=\"text/javascript\" ></script>\n<script src=\"{{cdnjs \"/static/select2/4.0.5/js/select2.full.min.js\"}}\"></script>\n<script src=\"{{cdnjs \"/static/select2/4.0.5/js/i18n/zh-CN.js\"}}\"></script>\n<script src=\"{{cdnjs \"/static/js/main.js\"}}\" type=\"text/javascript\"></script>\n<script type=\"text/javascript\">\n    /**\n     * 绘制项目封面\n     * @param $id\n     * @param $font\n     */\n    function drawBookCover($id,$font) {\n        var draw = document.getElementById($id);\n        //确认浏览器是否支持<canvas>元素\n        if (draw.getContext) {\n            var context = draw.getContext('2d');\n\n            //绘制红色矩形,绿色描边\n            context.fillStyle = '#eee';\n            context.strokeStyle = '#d4d4d5';\n            context.strokeRect(0,0,170,230);\n            context.fillRect(0,0,170,230);\n\n            //设置字体样式\n            context.font = \"600 20px Helvetica\";\n            context.textAlign = \"left\";\n            //设置字体填充颜色\n            context.fillStyle = \"#3E403E\";\n\n            var font = $.trim($font);\n\n            var lineWidth = 0; //当前行的绘制的宽度\n            var lastTextIndex = 0; //已经绘制上canvas最后的一个字符的下标\n            var drawWidth = 155,lineHeight = 25,drawStartX = 15,drawStartY=65;\n            //由于改变canvas 的高度会导致绘制的纹理被清空，所以，不预先绘制，先放入到一个数组当中\n            var arr = [];\n            for(var i = 0; i<font.length; i++){\n                //获取当前的截取的字符串的宽度\n                lineWidth = context.measureText(font.substr(lastTextIndex,i-lastTextIndex)).width;\n\n                if(lineWidth > drawWidth){\n                    //判断最后一位是否是标点符号\n                    if(judgePunctuationMarks(font[i-1])){\n                        arr.push(font.substr(lastTextIndex,i-lastTextIndex));\n                        lastTextIndex = i;\n                    }else{\n                        arr.push(font.substr(lastTextIndex,i-lastTextIndex-1));\n                        lastTextIndex = i-1;\n                    }\n                }\n                //将最后多余的一部分添加到数组\n                if(i === font.length - 1){\n                    arr.push(font.substr(lastTextIndex,i-lastTextIndex+1));\n                }\n            }\n\n            for(var i =0; i<arr.length; i++){\n                context.fillText(arr[i],drawStartX,drawStartY+i*lineHeight);\n            }\n\n            //判断是否是需要避开的标签符号\n            function judgePunctuationMarks(value) {\n                var arr = [\".\",\",\",\";\",\"?\",\"!\",\":\",\"\\\"\",\"，\",\"。\",\"？\",\"！\",\"；\",\"：\",\"、\"];\n                for(var i = 0; i< arr.length; i++){\n                    if(value === arr[i]){\n                        return true;\n                    }\n                }\n                return false;\n            }\n\n        }else{\n            console.log(\"浏览器不支持\")\n        }\n    }\n\n    /**\n     * 将base64格式的图片转换为二进制\n     * @param dataURI\n     * @returns {Blob}\n     */\n    function dataURItoBlob(dataURI) {\n        var byteString = atob(dataURI.split(',')[1]);\n        var mimeString = dataURI.split(',')[0].split(':')[1].split(';')[0];\n        var ab = new ArrayBuffer(byteString.length);\n        var ia = new Uint8Array(ab);\n        for (var i = 0; i < byteString.length; i++) {\n            ia[i] = byteString.charCodeAt(i);\n        }\n\n        return new Blob([ab], {type: mimeString});\n    }\n    /**\n     * 删除项目\n     */\n    function deleteBook($id) {\n        $(\"#deleteBookModal\").find(\"input[name='identify']\").val($id);\n        $(\"#deleteBookModal\").modal(\"show\");\n    }\n    /**\n     * 复制项目\n     * */\n    function copyBook($id){\n        var index = layer.load()\n        $.ajax({\n           url : \"{{urlfor \"BookController.Copy\"}}\" ,\n            data : {\"identify\":$id},\n            type : \"POST\",\n            dataType : \"json\",\n            success : function ($res) {\n                layer.close(index);\n                if ($res.errcode === 0) {\n                    window.app.lists.splice(0, 0, $res.data);\n                    $(\"#addBookDialogModal\").modal(\"hide\");\n                } else {\n                    layer.msg($res.message);\n                }\n            },\n            error : function () {\n                layer.close(index);\n                layer.msg('{{i18n $.Lang \"message.system_error\"}}');\n            }\n        });\n    }\n\n    $(function () {\n        /**\n         * 处理创建项目弹窗\n         * */\n        $(\"#addBookDialogModal\").on(\"show.bs.modal\",function () {\n            window.bookDialogModal = $(this).find(\"#addBookDialogForm\").html();\n            drawBookCover(\"bookCover\",\"{{i18n $.Lang \"blog.default_cover\"}}\");\n            $('.js-data-example-ajax-add').select2({\n                language: \"{{i18n $.Lang \"common.js_lang\"}}\",\n                minimumInputLength : 1,\n                minimumResultsForSearch: Infinity,\n                maximumSelectionLength:1,\n                width : \"100%\",\n                ajax: {\n                    url: '{{urlfor \"BookController.ItemsetsSearch\"}}',\n                    dataType: 'json',\n                    data: function (params) {\n                        return {\n                            q: params.term, // search term\n                            page: params.page\n                        };\n                    },\n                    processResults: function (data, params) {\n                        return {\n                            results : data.data.results\n                        }\n                    }\n                }\n            });\n        }).on(\"hidden.bs.modal\",function () {\n            $(this).find(\"#addBookDialogForm\").html(window.bookDialogModal);\n        });\n        /**\n         * 处理导入项目弹窗\n         * */\n        $(\"#importBookDialogModal\").on(\"show.bs.modal\",function () {\n            window.importBookDialogModal = $(this).find(\"#importBookDialogForm\").html();\n            $(\"#import-book-upload\").fileinput({\n                'uploadUrl':\"{{urlfor \"BookController.Import\"}}\",\n                'theme': 'fa',\n                'showPreview': false,\n                'showUpload' : false,\n                'required': true,\n                'validateInitialCount': true,\n                \"language\" : \"{{i18n $.Lang \"common.upload_lang\"}}\",\n                'allowedFileExtensions': ['zip', 'docx'],\n                'msgPlaceholder' : '{{i18n $.Lang \"message.file_type_placeholder\"}}',\n                'elErrorContainer' : \"#import-book-form-error-message\",\n                'uploadExtraData' : function () {\n                    var book = {};\n                    var $then = $(\"#importBookDialogForm\");\n                    book.book_name = $then.find(\"input[name='book_name']\").val();\n                    book.identify = $then.find(\"input[name='identify']\").val();\n                    book.description = $then.find('textarea[name=\"description\"]').val();\n                    book.itemId = $then.find(\"select[name='itemId']\").val();\n\n                    return book;\n                }\n            });\n            $('.js-data-example-ajax-import').select2({\n                language: \"{{i18n $.Lang \"common.js_lang\"}}\",\n                minimumInputLength : 1,\n                minimumResultsForSearch: Infinity,\n                maximumSelectionLength:1,\n                width : \"100%\",\n                ajax: {\n                    url: '{{urlfor \"BookController.ItemsetsSearch\"}}',\n                    dataType: 'json',\n                    data: function (params) {\n                        return {\n                            q: params.term, // search term\n                            page: params.page\n                        };\n                    },\n                    processResults: function (data, params) {\n                        return {\n                            results : data.data.results\n                        }\n                    }\n                }\n            });\n        }).on(\"hidden.bs.modal\",function () {\n            $(this).find(\"#importBookDialogForm\").html(window.importBookDialogModal);\n        });\n\n        /**\n         * 创建项目\n         */\n        $(\"body\").on(\"click\",\"#btnSaveDocument\",function () {\n            var $this = $(this);\n\n            var itemId = $(\"#itemId\").val();\n            if (itemId <= 0) {\n                return showError(\"{{i18n $.Lang \"message.project_space_empty\"}}\")\n            }\n            var bookName = $.trim($(\"#bookName\").val());\n            if (bookName === \"\") {\n                return showError(\"{{i18n $.Lang \"message.project_title_empty\"}}\")\n            }\n            if (bookName.length > 100) {\n                return showError(\"{{i18n $.Lang \"message.project_title_tips\"}}\");\n            }\n\n            var identify = $.trim($(\"#identify\").val());\n            if (identify === \"\") {\n                return showError(\"{{i18n $.Lang \"message.project_id_empty\"}}\");\n            }\n            if (identify.length > 50) {\n                return showError(\"{{i18n $.Lang \"message.project_id_length\"}}\");\n            }\n            var description = $.trim($(\"#description\").val());\n\n            if (description.length > 500) {\n                return showError(\"{{i18n $.Lang \"message.project_desc_placeholder\"}}\");\n            }\n\n            $this.button(\"loading\");\n\n            var draw = document.getElementById(\"bookCover\");\n            var form = document.getElementById(\"addBookDialogForm\");\n            var fd = new FormData(form);\n            if (draw.getContext) {\n                var dataURL = draw.toDataURL(\"png\", 100);\n\n                var blob = dataURItoBlob(dataURL);\n\n                fd.append('image-file', blob,(new Date()).valueOf() + \".png\");\n            }\n\n            $.ajax({\n                url : \"{{urlfor \"BookController.Create\"}}\",\n                data: fd,\n                type: \"POST\",\n                dataType :\"json\",\n                processData: false,\n                contentType: false\n            }).success(function (res) {\n                $this.button(\"reset\");\n                if (res.errcode === 0) {\n                    window.app.lists.splice(0, 0, res.data);\n                    $(\"#addBookDialogModal\").modal(\"hide\");\n                } else {\n                    showError(res.message);\n                }\n                $this.button(\"reset\");\n            }).error(function () {\n                $this.button(\"reset\");\n                return showError(\"{{i18n $.Lang \"message.system_error\"}}\");\n            });\n            return false;\n        }).on(\"blur\",\"#bookName\",function () {\n            var txt = $(\"#bookName\").val();\n            if(txt !== \"\"){\n                drawBookCover(\"bookCover\",txt);\n            }\n        }).on(\"click\",\"#btnImportBook\",function () {\n\n            var $then = $(this).parents(\"#importBookDialogForm\");\n\n            var itemId = $then.find(\"input[name='itemId']\").val();\n            if (itemId <= 0) {\n                return showError(\"{{i18n $.Lang \"message.project_space_empty\"}}\")\n            }\n\n            var bookName = $.trim($then.find(\"input[name='book_name']\").val());\n\n            if (bookName === \"\") {\n                return showError(\"{{i18n $.Lang \"message.project_title_empty\"}}\",\"#import-book-form-error-message\");\n            }\n            if (bookName.length > 100) {\n                return showError(\"{{i18n $.Lang \"message.project_title_tips\"}}\",\"#import-book-form-error-message\");\n            }\n\n            var identify = $.trim($then.find(\"input[name='identify']\").val());\n            if (identify === \"\") {\n                return showError(\"{{i18n $.Lang \"message.project_id_empty\"}}\",\"#import-book-form-error-message\");\n            }\n            var description = $.trim($then.find('textarea[name=\"description\"]').val());\n            if (description.length > 500) {\n                return showError(\"{{i18n $.Lang \"message.project_decs_placeholder\"}}\",\"#import-book-form-error-message\");\n            }\n            var filesCount = $('#import-book-upload').fileinput('getFilesCount');\n\n            if (filesCount <= 0) {\n                return showError(\"{{i18n $.Lang \"message.import_file_empty\"}}\",\"#import-book-form-error-message\");\n            }\n            //$(\"#importBookDialogForm\").submit();\n            $(\"#btnImportBook\").button(\"loading\");\n            $('#import-book-upload').fileinput('upload');\n        }).on(\"fileuploaded\",\"#import-book-upload\",function (event, data, previewId, index){\n\n            if(data.response.errcode === 0 || data.response.errcode === '0'){\n                showSuccess(data.response.message,\"#import-book-form-error-message\");\n            }else{\n                showError(data.response.message,\"#import-book-form-error-message\");\n            }\n            $(\"#btnImportBook\").button(\"reset\");\n            return true;\n        });\n\n        /**\n         * 删除项目\n         */\n        $(\"#deleteBookForm\").ajaxForm({\n            beforeSubmit : function () {\n                $(\"#btnDeleteBook\").button(\"loading\");\n            },\n            success : function (res) {\n                if(res.errcode === 0){\n                    window.location = window.location.href;\n                }else{\n                    showError(res.message,\"#form-error-message2\");\n                }\n                $(\"#btnDeleteBook\").button(\"reset\");\n            },\n            error : function () {\n                showError(\"{{i18n $.Lang \"message.system_error\"}}\",\"#form-error-message2\");\n                $(\"#btnDeleteBook\").button(\"reset\");\n            }\n        });\n\n\n\n        window.app = new Vue({\n            el : \"#bookList\",\n            data : {\n                lists : {{.Result}}\n            },\n            delimiters : ['${','}'],\n            methods : {\n            }\n        });\n        Vue.nextTick(function () {\n            $(\"[data-toggle='tooltip']\").tooltip();\n        });\n    });\n</script>\n</body>\n</html>\n"
  },
  {
    "path": "views/book/setting.tpl",
    "content": "<!DOCTYPE html>\n<html lang=\"zh-CN\">\n<head>\n    <meta charset=\"utf-8\">\n    <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n\n    <title>{{i18n $.Lang \"common.setting\"}} - {{.Model.BookName}} - Powered by MinDoc</title>\n\n    <!-- Bootstrap -->\n    <link href=\"{{cdncss \"/static/bootstrap/css/bootstrap.min.css\"}}\" rel=\"stylesheet\">\n    <link href=\"{{cdncss \"/static/font-awesome/css/font-awesome.min.css\"}}\" rel=\"stylesheet\">\n    <link href=\"{{cdncss \"/static/webuploader/webuploader.css\"}}\" rel=\"stylesheet\">\n    <link href=\"{{cdncss \"/static/cropper/2.3.4/cropper.min.css\"}}\" rel=\"stylesheet\">\n    <link href=\"{{cdncss \"/static/bootstrap/plugins/tagsinput/bootstrap-tagsinput.css\"}}\" rel=\"stylesheet\">\n    <link href=\"{{cdncss \"/static/bootstrap/plugins/bootstrap-switch/css/bootstrap3//bootstrap-switch.min.css\"}}\" rel=\"stylesheet\">\n    <link href=\"{{cdncss \"/static/select2/4.0.5/css/select2.min.css\"}}\" rel=\"stylesheet\">\n    <link href=\"{{cdncss \"/static/css/main.css\" \"version\"}}\" rel=\"stylesheet\">\n\n</head>\n<body>\n<div class=\"manual-reader\">\n    {{template \"widgets/header.tpl\" .}}\n    <div class=\"container manual-body\">\n        <div class=\"row\">\n            <div class=\"page-left\">\n                <ul class=\"menu\">\n                    <li><a href=\"{{urlfor \"BookController.Dashboard\" \":key\" .Model.Identify}}\" class=\"item\"><i class=\"fa fa-dashboard\" aria-hidden=\"true\"></i> {{i18n $.Lang \"blog.summary\"}}</a> </li>\n                    <li><a href=\"{{urlfor \"BookController.Users\" \":key\" .Model.Identify}}\" class=\"item\"><i class=\"fa fa-user\" aria-hidden=\"true\"></i> {{i18n $.Lang \"blog.member\"}}</a> </li>\n                    <li><a href=\"{{urlfor \"BookController.Team\" \":key\" .Model.Identify}}\" class=\"item\"><i class=\"fa fa-group\" aria-hidden=\"true\"></i> {{i18n $.Lang \"blog.team\"}}</a> </li>\n                    <li class=\"active\"><a href=\"{{urlfor \"BookController.Setting\" \":key\" .Model.Identify}}\" class=\"item\"><i class=\"fa fa-gear\" aria-hidden=\"true\"></i> {{i18n $.Lang \"common.setting\"}}</a> </li>\n                </ul>\n\n            </div>\n            <div class=\"page-right\">\n                <div class=\"m-box\">\n                    <div class=\"box-head\">\n                        <strong class=\"box-title\"> {{i18n $.Lang \"blog.project_setting\"}}</strong>\n                        {{if eq .Model.RoleId 0}}\n                        <button type=\"button\"  class=\"btn btn-success btn-sm pull-right\" data-toggle=\"modal\" data-target=\"#transferBookModal\">{{i18n $.Lang \"blog.handover_project\"}}</button>\n                        {{if eq .Model.PrivatelyOwned 1}}\n                        <button type=\"button\"  class=\"btn btn-success btn-sm pull-right\" data-toggle=\"modal\" data-target=\"#changePrivatelyOwnedModal\" style=\"margin-right: 5px;\">{{i18n $.Lang \"blog.make_public\"}}</button>\n                        {{else}}\n                        <button type=\"button\"  class=\"btn btn-danger btn-sm pull-right\" data-toggle=\"modal\" data-target=\"#changePrivatelyOwnedModal\" style=\"margin-right: 5px;\">{{i18n $.Lang \"blog.make_private\"}}</button>\n                        {{end}}\n                        <button type=\"button\"  class=\"btn btn-danger btn-sm pull-right\" style=\"margin-right: 5px;\" data-toggle=\"modal\" data-target=\"#deleteBookModal\">{{i18n $.Lang \"blog.delete_project\"}}</button>\n                        {{end}}\n\n                    </div>\n                </div>\n                <div class=\"box-body\" style=\"padding-right: 200px;\">\n                    <div class=\"form-left\">\n                        <form method=\"post\" id=\"bookEditForm\" action=\"{{urlfor \"BookController.SaveBook\"}}\">\n                            <input type=\"hidden\" name=\"identify\" value=\"{{.Model.Identify}}\">\n                            <div class=\"form-group\">\n                                <label>{{i18n $.Lang \"blog.project_title\"}}</label>\n                                <input type=\"text\" class=\"form-control\" name=\"book_name\" id=\"bookName\" placeholder=\"{{i18n $.Lang \"blog.project_title\"}}\" value=\"{{.Model.BookName}}\">\n                            </div>\n                            <div class=\"form-group\">\n                                <label>{{i18n $.Lang \"blog.project_id\"}}</label>\n                                <input type=\"text\" class=\"form-control\" value=\"{{urlfor \"DocumentController.Index\" \":key\" .Model.Identify}}\" placeholder=\"{{i18n $.Lang \"blog.project_id\"}}\" disabled>\n                                <p class=\"text\">{{i18n $.Lang \"message.project_id_desc\"}}</p>\n                            </div>\n                            <div class=\"form-group\">\n                                <label>{{i18n $.Lang \"common.project_space\"}}</label>\n                                <select class=\"js-data-example-ajax form-control\" multiple=\"multiple\" name=\"itemId\">\n                                    <option value=\"{{.Model.ItemId}}\" selected=\"selected\">{{.Model.ItemName}}</option>\n                                </select>\n                            </div>\n                            <div class=\"form-group\">\n                                <label>{{i18n $.Lang \"blog.history_record_amount\"}}</label>\n                                <input type=\"text\" class=\"form-control\" name=\"history_count\" value=\"{{.Model.HistoryCount}}\" placeholder=\"{{i18n $.Lang \"blog.history_record_amount\"}}\">\n                                <p class=\"text\">{{i18n $.Lang \"message.history_record_amount_desc\"}}</p>\n                            </div>\n                            <div class=\"form-group\">\n                                <label>{{i18n $.Lang \"blog.corp_id\"}}</label>\n                                <input type=\"text\" class=\"form-control\" name=\"publisher\" value=\"{{.Model.Publisher}}\" placeholder=\"{{i18n $.Lang \"blog.corp_id\"}}\">\n                                <p class=\"text\">{{i18n $.Lang \"message.corp_id_desc\"}}</p>\n                            </div>\n                            <div class=\"form-group\">\n                                <label>{{i18n $.Lang \"blog.project_desc\"}}</label>\n                                <textarea rows=\"3\" class=\"form-control\" name=\"description\" style=\"height: 90px\" placeholder=\"{{i18n $.Lang \"blog.project_desc\"}}\">{{.Model.Description}}</textarea>\n                                <p class=\"text\">{{i18n $.Lang \"message.project_desc_desc\"}}</p>\n                            </div>\n                            <div class=\"form-group\">\n                                <label>{{i18n $.Lang \"blog.text_editor\"}}</label>\n                                <div class=\"radio\">\n                                    <label class=\"radio-inline\">\n                                        <input type=\"radio\"{{if eq .Model.Editor \"markdown\"}} checked{{end}} name=\"editor\" value=\"markdown\"> Markdown {{i18n $.Lang \"blog.text_editor\"}}\n                                    </label>\n                                    <label class=\"radio-inline\">\n                                        <input type=\"radio\"{{if eq .Model.Editor \"cherry_markdown\"}} checked{{end}} name=\"editor\" value=\"cherry_markdown\"> Markdown {{i18n $.Lang \"blog.text_editor\"}}(cherry)\n                                    </label>\n                                    <label class=\"radio-inline\">\n                                        <input type=\"radio\"{{if eq .Model.Editor \"new_html\"}} checked{{end}} name=\"editor\" value=\"new_html\"> Html {{i18n $.Lang \"blog.text_editor\"}}(Quill)\n                                    </label>\n                                    <label class=\"radio-inline\">\n                                        <input type=\"radio\"{{if eq .Model.Editor \"html\"}} checked{{end}} name=\"editor\" value=\"html\"> Html {{i18n $.Lang \"blog.text_editor\"}}(wangEditor)\n                                    </label>\n                    <!-- 3xxx 20240603 -->\n                    <label class=\"radio-inline\">\n                      <input type=\"radio\" {{if eq .Model.Editor \"froala\"}} checked{{end}} name=\"editor\" value=\"froala\"> Froala {{i18n $.Lang \"blog.text_editor\"}}\n                    </label>\n                                </div>\n                            </div>\n                            <div class=\"form-group\">\n                                <label>评论</label>\n                                <div class=\"radio\">\n                                    <label class=\"radio-inline\">\n                                        <input type=\"radio\"{{if eq .Model.CommentStatus \"closed\"}} checked{{end}} name=\"comment_status\" value=\"closed\"> 关闭评论\n                                    </label>\n                                    <label class=\"radio-inline\">\n                                        <input type=\"radio\"{{if eq .Model.CommentStatus \"open\"}} checked{{end}} name=\"comment_status\" value=\"open\"> 开启评论\n                                    </label>\n                                    <!--label class=\"radio-inline\">\n                                        <input type=\"radio\"{{if eq .Model.CommentStatus \"registered_only\"}} checked{{end}} name=\"comment_status\" value=\"registered_only\"> 注册用户可见\n                                    </label>\n                                    <label class=\"radio-inline\">\n                                        <input type=\"radio\"{{if eq .Model.CommentStatus \"group_only\"}} checked{{end}} name=\"comment_status\" value=\"group_only\"> 成员可见\n                                    </label-->\n                                </div>\n                            </div>\n                {{if eq .Model.PrivatelyOwned 1}}\n                <div class=\"form-group\">\n                    <label>{{i18n $.Lang \"blog.access_pass\"}}</label>\n                    <input type=\"text\" name=\"bPassword\" id=\"bPassword\" class=\"form-control\" placeholder=\"{{i18n $.Lang \"blog.access_pass\"}}\" value=\"{{.Model.BookPassword}}\">\n                    <p class=\"text\">{{i18n $.Lang \"message.access_pass_desc\"}}</p>\n                </div>\n                {{end}}\n\n                <div class=\"form-group\">\n                    <label for=\"autoRelease\">{{i18n $.Lang \"blog.print_text\"}}</label>\n                    <div class=\"controls\">\n                        <div class=\"switch switch-small\" data-on=\"primary\" data-off=\"info\">\n                            <input type=\"checkbox\" id=\"autoSave\" name=\"print_state\"{{if .Model.PrintState }} checked{{end}} data-size=\"small\" placeholder=\"{{i18n $.Lang \"blog.print_text\"}}\">\n                        </div>\n                    </div>\n                </div>\n\n                <div class=\"form-group\">\n                    <label for=\"autoRelease\">{{i18n $.Lang \"blog.auto_publish\"}}</label>\n                    <div class=\"controls\">\n                        <div class=\"switch switch-small\" data-on=\"primary\" data-off=\"info\">\n                            <input type=\"checkbox\" id=\"autoRelease\" name=\"auto_release\"{{if .Model.AutoRelease }} checked{{end}} data-size=\"small\">\n                        </div>\n                        <p class=\"text\">{{i18n $.Lang \"message.auto_publish_desc\"}}</p>\n                    </div>\n                </div>\n                <div class=\"form-group\">\n                    <label for=\"autoRelease\">{{i18n $.Lang \"blog.enable_export\"}}</label>\n                    <div class=\"controls\">\n                        <div class=\"switch switch-small\" data-on=\"primary\" data-off=\"info\">\n                            <input type=\"checkbox\" id=\"isDownload\" name=\"is_download\"{{if .Model.IsDownload }} checked{{end}} data-size=\"small\" placeholder=\"{{i18n $.Lang \"blog.enable_export\"}}\">\n                        </div>\n                        <p class=\"text\">{{i18n $.Lang \"message.enable_export_desc\"}}</p>\n\n                    </div>\n                </div>\n                <div class=\"form-group\">\n                    <label for=\"autoRelease\">{{i18n $.Lang \"blog.enable_share\"}}</label>\n                    <div class=\"controls\">\n                        <div class=\"switch switch-small\" data-on=\"primary\" data-off=\"info\">\n                            <input type=\"checkbox\" id=\"enableShare\" name=\"enable_share\"{{if .Model.IsEnableShare }} checked{{end}} data-size=\"small\" placeholder=\"{{i18n $.Lang \"blog.enable_share\"}}\">\n                        </div>\n                        <p class=\"text\">{{i18n $.Lang \"message.enable_share_desc\"}}</p>\n                    </div>\n                </div>\n                <div class=\"form-group\">\n                    <label for=\"autoRelease\">{{i18n $.Lang \"blog.set_first_as_home\"}}</label>\n                    <div class=\"controls\">\n                        <div class=\"switch switch-small\" data-on=\"primary\" data-off=\"info\">\n                            <input type=\"checkbox\" id=\"isUseFirstDocument\" name=\"is_use_first_document\"{{if .Model.IsUseFirstDocument }} checked{{end}} data-size=\"small\" placeholder=\"{{i18n $.Lang \"blog.set_first_as_home\"}}\">\n                        </div>\n                    </div>\n                </div>\n                <div class=\"form-group\">\n                    <label for=\"autoRelease\">{{i18n $.Lang \"blog.auto_save\"}}</label>\n                    <div class=\"controls\">\n                        <div class=\"switch switch-small\" data-on=\"primary\" data-off=\"info\">\n                            <input type=\"checkbox\" id=\"autoSave\" name=\"auto_save\"{{if .Model.AutoSave }} checked{{end}} data-size=\"small\" placeholder=\"{{i18n $.Lang \"blog.auto_save\"}}\">\n                        </div>\n                        <p class=\"text\">{{i18n $.Lang \"message.auto_save_desc\"}}</p>\n                    </div>\n                </div>\n                <div class=\"form-group\">\n                    <button type=\"submit\" id=\"btnSaveBookInfo\" class=\"btn btn-success\" data-loading-text=\"{{i18n $.Lang \"common.processing\"}}\">{{i18n $.Lang \"common.save\"}}</button>\n                    <span id=\"form-error-message\" class=\"error-message\"></span>\n                </div>\n                </form>\n            </div>\n            <div class=\"form-right\">\n                <label>\n                    <a href=\"javascript:;\" data-toggle=\"modal\" data-target=\"#upload-logo-panel\">\n                        <img src=\"{{cdnimg .Model.Cover}}\" onerror=\"this.src='{{cdnimg \"/static/images/book.png\"}}'\" alt=\"{{i18n $.Lang \"blog.cover\"}}\" style=\"max-width: 120px;border: 1px solid #999\" id=\"headimgurl\">\n                    </a>\n                </label>\n                <p class=\"text\">{{i18n $.Lang \"blog.click_change_cover\"}}</p>\n            </div>\n            <div class=\"clearfix\"></div>\n\n        </div>\n    </div>\n</div>\n</div>\n{{template \"widgets/footer.tpl\" .}}\n</div>\n<!-- Modal -->\n<div class=\"modal fade\" id=\"changePrivatelyOwnedModal\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"changePrivatelyOwnedModalLabel\">\n    <div class=\"modal-dialog\" role=\"document\">\n        <form method=\"post\" action=\"{{urlfor \"BookController.PrivatelyOwned\" }}\" id=\"changePrivatelyOwnedForm\">\n            <input type=\"hidden\" name=\"identify\" value=\"{{.Model.Identify}}\">\n            <input type=\"hidden\" name=\"status\" value=\"{{if eq .Model.PrivatelyOwned 0}}close{{else}}open{{end}}\">\n            <div class=\"modal-content\">\n                <div class=\"modal-header\">\n                    <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\"><span aria-hidden=\"true\">&times;</span></button>\n                    <h4 class=\"modal-title\">\n                        {{if eq .Model.PrivatelyOwned 0}}\n                        {{i18n $.Lang \"blog.make_private\"}}\n                        {{else}}\n                        {{i18n $.Lang \"blog.make_public\"}}\n                        {{end}}\n                    </h4>\n                </div>\n                <div class=\"modal-body\">\n                    {{if eq .Model.PrivatelyOwned 0}}\n                    <span style=\"font-size: 14px;font-weight: 400;\">{{i18n $.Lang \"message.confirm_into_private\"}}</span>\n                    <p></p>\n                    <p class=\"text error-message\">{{i18n $.Lang \"message.into_private_notice\"}}</p>\n                    {{else}}\n                    <span style=\"font-size: 14px;font-weight: 400;\">{{i18n $.Lang \"message.confirm_into_public\"}}</span>\n                    <p></p>\n                    <p class=\"text error-message\">{{i18n $.Lang \"message.into_public_notice\"}}</p>\n                    {{end}}\n                </div>\n                <div class=\"modal-footer\">\n                    <span class=\"error-message\" id=\"form-error-message1\"></span>\n                    <button type=\"button\" class=\"btn btn-default\" data-dismiss=\"modal\">{{i18n $.Lang \"common.cancel\"}}</button>\n                    <button type=\"submit\" class=\"btn btn-primary\" data-loading-text=\"{{i18n $.Lang \"common.processing\"}}\" id=\"btnChangePrivatelyOwned\">{{i18n $.Lang \"common.confirm\"}}</button>\n                </div>\n            </div>\n        </form>\n    </div>\n</div>\n<!-- Start Modal -->\n<div class=\"modal fade\" id=\"upload-logo-panel\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"{{i18n $.Lang \"blog.change_cover\"}}\" aria-hidden=\"true\">\n    <div class=\"modal-dialog\">\n        <div class=\"modal-content\">\n            <div class=\"modal-header\">\n                <button type=\"button\" class=\"close\" data-dismiss=\"modal\"><span aria-hidden=\"true\">&times;</span><span class=\"sr-only\">Close</span></button>\n                <h4 class=\"modal-title\">{{i18n $.Lang \"blog.change_cover\"}}</h4>\n            </div>\n            <div class=\"modal-body\">\n                <div class=\"wraper\">\n                    <div id=\"image-wraper\">\n\n                    </div>\n                </div>\n                <div class=\"watch-crop-list\">\n                    <div class=\"preview-title\">{{i18n $.Lang \"blog.preview\"}}</div>\n                    <ul>\n                        <li>\n                            <div class=\"img-preview preview-lg\"></div>\n                        </li>\n                        <li>\n                            <div class=\"img-preview preview-sm\"></div>\n                        </li>\n                    </ul>\n                </div>\n                <div style=\"clear: both\"></div>\n            </div>\n            <div class=\"modal-footer\">\n                <span id=\"error-message\"></span>\n                <div id=\"filePicker\" class=\"btn\">{{i18n $.Lang \"blog.choose\"}}</div>\n                <button type=\"button\" id=\"saveImage\" class=\"btn btn-success\" style=\"height: 40px;width: 77px;\" data-loading-text=\"{{i18n $.Lang \"blog.processing\"}}\">{{i18n $.Lang \"blog.upload\"}}</button>\n            </div>\n        </div>\n    </div>\n</div>\n<!--END Modal-->\n\n<!-- Delete Book Modal -->\n<div class=\"modal fade\" id=\"deleteBookModal\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"deleteBookModalLabel\">\n    <div class=\"modal-dialog\" role=\"document\">\n        <form method=\"post\" id=\"deleteBookForm\" action=\"{{urlfor \"BookController.Delete\"}}\">\n            <input type=\"hidden\" name=\"identify\" value=\"{{.Model.Identify}}\">\n            <div class=\"modal-content\">\n                <div class=\"modal-header\">\n                    <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\"><span aria-hidden=\"true\">&times;</span></button>\n                    <h4 class=\"modal-title\">{{i18n $.Lang \"blog.delete_project\"}}</h4>\n                </div>\n                <div class=\"modal-body\">\n                    <span style=\"font-size: 14px;font-weight: 400;\">{{i18n $.Lang \"confirm_delete_project\"}}</span>\n                    <p></p>\n                    <p class=\"text error-message\">{{i18n $.Lang \"message.warning_delete_project\"}}</p>\n                </div>\n                <div class=\"modal-footer\">\n                    <span id=\"form-error-message2\" class=\"error-message\"></span>\n                    <button type=\"button\" class=\"btn btn-default\" data-dismiss=\"modal\">{{i18n $.Lang \"common.cancel\"}}</button>\n                    <button type=\"submit\" id=\"btnDeleteBook\" class=\"btn btn-primary\" data-loading-text=\"{{i18n $.Lang \"common.processing\"}}\">{{i18n $.Lang \"common.confirm_delete\"}}</button>\n                </div>\n            </div>\n        </form>\n    </div>\n</div>\n<!-- Modal -->\n<div class=\"modal fade\" id=\"transferBookModal\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"transferBookModalLabel\">\n    <div class=\"modal-dialog\" role=\"document\">\n        <form action=\"{{urlfor \"BookController.Transfer\"}}\" method=\"post\" id=\"transferBookForm\">\n            <input type=\"hidden\" name=\"identify\" value=\"{{.Model.Identify}}\">\n            <div class=\"modal-content\">\n                <div class=\"modal-header\">\n                    <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\"><span aria-hidden=\"true\">&times;</span></button>\n                    <h4 class=\"modal-title\" id=\"myModalLabel\">{{i18n $.Lang \"blog.handover_project\"}}</h4>\n                </div>\n                <div class=\"modal-body\">\n                    <div class=\"form-group\">\n                        <label class=\"col-sm-2 control-label\">{{i18n $.Lang \"blog.recipient_account\"}}</label>\n                        <div class=\"col-sm-10\">\n                            <input type=\"text\" name=\"account\" class=\"form-control\" placeholder=\"{{i18n $.Lang \"blog.recipient_account\"}}\" id=\"receiveAccount\" maxlength=\"50\">\n                        </div>\n                    </div>\n                    <div class=\"clearfix\"></div>\n                </div>\n                <div class=\"modal-footer\">\n                    <span id=\"form-error-message3\" class=\"error-message\"></span>\n                    <button type=\"button\" class=\"btn btn-default\" data-dismiss=\"modal\">{{i18n $.Lang \"common.cancel\"}}</button>\n                    <button type=\"submit\" id=\"btnTransferBook\" class=\"btn btn-primary\">{{i18n $.Lang \"common.comfirm\"}}</button>\n                </div>\n            </div>\n        </form>\n    </div>\n</div>\n\n<script src=\"{{cdnjs \"/static/jquery/1.12.4/jquery.min.js\"}}\" type=\"text/javascript\"></script>\n<script src=\"{{cdnjs \"/static/bootstrap/js/bootstrap.min.js\"}}\" type=\"text/javascript\"></script>\n<script src=\"{{cdnjs \"/static/webuploader/webuploader.min.js\"}}\" type=\"text/javascript\"></script>\n<script src=\"{{cdnjs \"/static/cropper/2.3.4/cropper.min.js\"}}\" type=\"text/javascript\"></script>\n<script src=\"{{cdnjs \"/static/js/jquery.form.js\"}}\" type=\"text/javascript\"></script>\n<script src=\"{{cdnjs \"/static/bootstrap/plugins/tagsinput/bootstrap-tagsinput.min.js\"}}\" type=\"text/javascript\"></script>\n<script src=\"{{cdnjs \"/static/bootstrap/plugins/bootstrap-switch/js/bootstrap-switch.min.js\"}}\" type=\"text/javascript\"></script>\n<script src=\"{{cdnjs \"/static/select2/4.0.5/js/select2.full.min.js\"}}\"></script>\n<script src=\"{{cdnjs \"/static/select2/4.0.5/js/i18n/zh-CN.js\"}}\"></script>\n<script src=\"{{cdnjs \"/static/js/main.js\"}}\" type=\"text/javascript\"></script>\n<script type=\"text/javascript\">\n    $(function () {\n        $(\"#upload-logo-panel\").on(\"hidden.bs.modal\",function () {\n            $(\"#upload-logo-panel\").find(\".modal-body\").html(window.modalHtml);\n        }).on(\"show.bs.modal\",function () {\n            window.modalHtml = $(\"#upload-logo-panel\").find(\".modal-body\").html();\n        });\n        $(\"#autoRelease,#enableShare,#isDownload,#isUseFirstDocument,#autoSave\").bootstrapSwitch();\n\n        $('input[name=\"label\"]').tagsinput({\n            confirmKeys: [13,44],\n            maxTags: 10,\n            trimValue: true,\n            cancelConfirmKeysOnEmpty : false\n        });\n\n        $(\"#changePrivatelyOwnedForm\").ajaxForm({\n            beforeSubmit :function () {\n                $(\"#btnChangePrivatelyOwned\").button(\"loading\");\n            },\n            success :function (res) {\n                if(res.errcode === 0){\n                    window.location = window.location.href;\n                    return;\n                }else{\n                    showError(res.message,\"#form-error-message1\");\n                }\n                $(\"#btnChangePrivatelyOwned\").button(\"reset\");\n            },\n            error :function () {\n                showError(\"{{i18n $.Lang \"message.system_error\"}}\",\"#form-error-message1\");\n                $(\"#btnChangePrivatelyOwned\").button(\"reset\");\n            }\n        });\n\n        $(\"#createToken,#deleteToken\").on(\"click\",function () {\n            var btn = $(this).button(\"loading\");\n            var action = $(this).attr(\"data-action\");\n            $.ajax({\n                url : \"{{urlfor \"BookController.CreateToken\"}}\",\n                type :\"post\",\n                data : { \"identify\" : {{.Model.Identify}} , \"action\" : action },\n                dataType : \"json\",\n                success : function (res) {\n                    if(res.errcode === 0){\n                        $(\"#token\").val(res.data);\n                    }else{\n                        alert(res.message);\n                    }\n                    btn.button(\"reset\");\n                },\n                error : function () {\n                    btn.button(\"reset\");\n                    alert(\"{{i18n $.Lang \"message.system_error\"}}\");\n                }\n            }) ;\n        });\n        $(\"#token\").on(\"focus\",function () {\n            $(this).select();\n        });\n        $(\"#bookEditForm\").ajaxForm({\n            beforeSubmit : function () {\n                var bookName = $.trim($(\"#bookName\").val());\n                if (bookName === \"\") {\n                    return showError(\"{{i18n $.Lang \"message.project_name_empty\"}}\");\n                }\n                $(\"#btnSaveBookInfo\").button(\"loading\");\n            },\n            success : function (res) {\n                if(res.errcode === 0){\n                    showSuccess(\"{{i18n $.Lang \"message.success\"}}\")\n                }else{\n                    showError(\"{{i18n $.Lang \"message.failed\"}}\")\n                }\n                $(\"#btnSaveBookInfo\").button(\"reset\");\n            },\n            error : function () {\n                showError(\"{{i18n $.Lang \"message.system_error\"}}\");\n                $(\"#btnSaveBookInfo\").button(\"reset\");\n            }\n        });\n        $(\"#deleteBookForm\").ajaxForm({\n            beforeSubmit : function () {\n                $(\"#btnDeleteBook\").button(\"loading\");\n            },\n            success : function (res) {\n                if(res.errcode === 0){\n                    window.location = \"{{urlfor \"BookController.Index\"}}\";\n                }else{\n                    showError(res.message,\"#form-error-message2\");\n                }\n                $(\"#btnDeleteBook\").button(\"reset\");\n            },\n            error : function () {\n                showError(\"{{i18n $.Lang \"message.system_error\"}}\",\"#form-error-message2\");\n                $(\"#btnDeleteBook\").button(\"reset\");\n            }\n        });\n        $(\"#transferBookForm\").ajaxForm({\n            beforeSubmit : function () {\n                var account = $.trim($(\"#receiveAccount\").val());\n                if (account === \"\"){\n                    return showError(\"{{i18n $.Lang \"message.receive_account_empty\"}}\",\"#form-error-message3\")\n                }\n                $(\"#btnTransferBook\").button(\"loading\");\n            },\n            success : function (res) {\n                if(res.errcode === 0){\n                    window.location = window.location.href;\n                }else{\n                    showError(res.message,\"#form-error-message3\");\n                }\n                $(\"#btnTransferBook\").button(\"reset\");\n            },\n            error : function () {\n                $(\"#btnTransferBook\").button(\"reset\");\n            }\n        });\n        $('.js-data-example-ajax').select2({\n            language: \"{{i18n $.Lang \"common.js_lang\"}}\",\n            minimumInputLength : 1,\n            minimumResultsForSearch: Infinity,\n            maximumSelectionLength:1,\n            width : \"100%\",\n            ajax: {\n                url: '{{urlfor \"BookController.ItemsetsSearch\"}}',\n                dataType: 'json',\n                data: function (params) {\n                    return {\n                        q: params.term, // search term\n                        page: params.page\n                    };\n                },\n                processResults: function (data, params) {\n                    return {\n                        results : data.data.results\n                    }\n                }\n            }\n        });\n        try {\n            var uploader = WebUploader.create({\n                auto: false,\n                swf: '{{.BaseUrl}}/static/webuploader/Uploader.swf',\n                server: '{{urlfor \"BookController.UploadCover\"}}',\n                formData : { \"identify\" : {{.Model.Identify}} },\n                pick: \"#filePicker\",\n                fileVal : \"image-file\",\n                fileNumLimit : 1,\n                compress : false,\n                accept: {\n                    title: 'Images',\n                    extensions: 'jpg,jpeg,png',\n                    mimeTypes: 'image/jpg,image/jpeg,image/png'\n                }\n            }).on(\"beforeFileQueued\",function (file) {\n                uploader.reset();\n            }).on( 'fileQueued', function( file ) {\n                uploader.makeThumb( file, function( error, src ) {\n                    $img = '<img src=\"' + src +'\" style=\"max-width: 360px;max-height: 360px;\">';\n                    if ( error ) {\n                        $img.replaceWith('<span>{{i18n $.Lang \"message.cannot_preview\"}}</span>');\n                        return;\n                    }\n\n                    $(\"#image-wraper\").html($img);\n                    window.ImageCropper = $('#image-wraper>img').cropper({\n                        aspectRatio: 175 / 230,\n                        dragMode : 'move',\n                        viewMode : 1,\n                        preview : \".img-preview\"\n                    });\n                }, 1, 1 );\n            }).on(\"uploadError\",function (file,reason) {\n                console.log(reason);\n                $(\"#error-message\").text(\"{{i18n $.Lang \"message.upload_failed\"}}:\" + reason);\n\n            }).on(\"uploadSuccess\",function (file, res) {\n\n                if(res.errcode === 0){\n                    console.log(res);\n                    $(\"#upload-logo-panel\").modal('hide');\n                    $(\"#headimgurl\").attr('src',res.data);\n                }else{\n                    $(\"#error-message\").text(res.message);\n                }\n            }).on(\"beforeFileQueued\",function (file) {\n                if(file.size > 1024*1024*2){\n                    uploader.removeFile(file);\n                    uploader.reset();\n                    alert(\"{{i18n $.Lang \"message.upload_file_size_limit\"}}\");\n                    return false;\n                }\n            }).on(\"uploadComplete\",function () {\n                $(\"#saveImage\").button('reset');\n            });\n            $(\"#saveImage\").on(\"click\",function () {\n                var files = uploader.getFiles();\n                if(files.length > 0) {\n                    $(\"#saveImage\").button('loading');\n                    var cropper = window.ImageCropper.cropper(\"getData\");\n\n                    uploader.option(\"formData\", cropper);\n\n                    uploader.upload();\n                }else{\n                    alert(\"{{i18n $.Lang \"message.choose_pic_file\"}}\");\n                }\n            });\n        }catch(e){\n            console.log(e);\n        }\n    });\n</script>\n</body>\n</html>"
  },
  {
    "path": "views/book/team.tpl",
    "content": "<!DOCTYPE html>\n<html lang=\"zh-CN\">\n<head>\n    <meta charset=\"utf-8\">\n    <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n\n    <title>{{i18n $.Lang \"blog.team\"}} - {{.Model.BookName}} - Powered by MinDoc</title>\n\n    <!-- Bootstrap -->\n    <link href=\"{{cdncss \"/static/bootstrap/css/bootstrap.min.css\"}}\" rel=\"stylesheet\">\n    <link href=\"{{cdncss \"/static/font-awesome/css/font-awesome.min.css\"}}\" rel=\"stylesheet\">\n    <link href=\"{{cdncss \"/static/select2/4.0.5/css/select2.min.css\"}}\" rel=\"stylesheet\">\n\n    <link href=\"{{cdncss \"/static/css/main.css\" \"version\"}}\" rel=\"stylesheet\">\n\n    <style type=\"text/css\">\n        .table > tbody > tr > td {\n            vertical-align: middle;\n        }\n    </style>\n</head>\n<body>\n<div class=\"manual-reader\">\n{{template \"widgets/header.tpl\" .}}\n    <div class=\"container manual-body\">\n        <div class=\"row\">\n            <div class=\"page-left\">\n                <ul class=\"menu\">\n                    <li><a href=\"{{urlfor \"BookController.Dashboard\" \":key\" .Model.Identify}}\" class=\"item\"><i class=\"fa fa-dashboard\" aria-hidden=\"true\"></i> {{i18n $.Lang \"blog.summary\"}}</a></li>\n                {{if eq .Model.RoleId 0 1}}\n                    <li><a href=\"{{urlfor \"BookController.Users\" \":key\" .Model.Identify}}\" class=\"item\"><i class=\"fa fa-user\" aria-hidden=\"true\"></i> {{i18n $.Lang \"blog.member\"}}</a></li>\n                    <li class=\"active\"><a href=\"{{urlfor \"BookController.Team\" \":key\" .Model.Identify}}\" class=\"item\"><i class=\"fa fa-group\" aria-hidden=\"true\"></i> {{i18n $.Lang \"blog.team\"}}</a></li>\n                    <li><a href=\"{{urlfor \"BookController.Setting\" \":key\" .Model.Identify}}\" class=\"item\"><i class=\"fa fa-gear\" aria-hidden=\"true\"></i> {{i18n $.Lang \"common.setting\"}}</a></li>\n                {{end}}\n                </ul>\n\n            </div>\n            <div class=\"page-right\">\n                <div class=\"m-box\">\n                    <div class=\"box-head\">\n                        <strong class=\"box-title\"> {{i18n $.Lang \"blog.team_manage\"}}</strong>\n                    {{if eq .Model.RoleId 0}}\n                        <button type=\"button\" class=\"btn btn-success btn-sm pull-right\" data-toggle=\"modal\" data-target=\"#addTeamDialogModal\"><i class=\"fa fa-user-plus\" aria-hidden=\"true\"></i>\n                            {{i18n $.Lang \"blog.add_team\"}}\n                        </button>\n                    {{end}}\n                    </div>\n                </div>\n                <div class=\"box-body\">\n                    <div class=\"users-list\" id=\"teamList\">\n                        <template v-if=\"lists.length <= 0\">\n                            <div class=\"text-center\">{{i18n $.Lang \"message.no_data\"}}</div>\n                        </template>\n                        <template v-else>\n                            <table class=\"table\">\n                                <thead>\n                                <tr>\n                                    <th>{{i18n $.Lang \"blog.team_name\"}}</th>\n                                    <th width=\"100\">{{i18n $.Lang \"blog.member_amount\"}}</th>\n                                    <th width=\"180\">{{i18n $.Lang \"blog.join_time\"}}</th>\n                                    <th align=\"center\" width=\"220px\">{{i18n $.Lang \"common.operate\"}}</th>\n                                </tr>\n                                </thead>\n                                <tbody>\n                                <tr v-for=\"item in lists\">\n                                    <td>${item.team_name}</td>\n                                    <td>${item.member_count}</td>\n                                    <td>${(new Date(item.create_time)).format(\"yyyy-MM-dd hh:mm:ss\")}</td>\n                                    <td>\n                                        <button type=\"button\" class=\"btn btn-danger btn-sm\" @click=\"deleteTeam(item.team_id,$event)\" data-loading-text=\"{{i18n $.Lang \"common.processing\"}}\">{{i18n $.Lang \"blog.delete\"}}</button>\n                                    </td>\n                                </tr>\n                                </tbody>\n                            </table>\n                        </template>\n                        <nav class=\"pagination-container\">\n                        {{.PageHtml}}\n                        </nav>\n                    </div>\n                </div>\n            </div>\n        </div>\n    </div>\n{{template \"widgets/footer.tpl\" .}}\n</div>\n\n<div class=\"modal fade\" id=\"addTeamDialogModal\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"addTeamDialogModalLabel\">\n    <div class=\"modal-dialog\" role=\"document\">\n        <form method=\"post\" autocomplete=\"off\" id=\"addTeamDialogForm\" class=\"form-horizontal\" action=\"{{urlfor \"BookController.TeamAdd\"}}\">\n            <input type=\"hidden\" name=\"bookId\" value=\"{{.Model.BookId}}\">\n            <input type=\"hidden\" name=\"identify\" value=\"{{.Model.Identify}}\">\n            <div class=\"modal-content\">\n                <div class=\"modal-header\">\n                    <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\"><span aria-hidden=\"true\">&times;</span></button>\n                    <h4 class=\"modal-title\" id=\"myModalLabel\">{{i18n $.Lang \"blog.add_team\"}}</h4>\n                </div>\n                <div class=\"modal-body\">\n                    <div class=\"form-group\">\n                        <label class=\"col-sm-3 control-label\" for=\"account\">{{i18n $.Lang \"blog.team_name\"}}<span class=\"error-message\">*</span></label>\n                        <div class=\"col-sm-9\">\n                            <select type=\"text\" name=\"teamId\" id=\"teamId\" class=\"js-data-example-ajax form-control\" multiple=\"multiple\"></select>\n                        </div>\n                    </div>\n                    <div class=\"clearfix\"></div>\n                </div>\n                <div class=\"modal-footer\">\n                    <span id=\"form-error-message\"></span>\n                    <button type=\"button\" class=\"btn btn-default\" data-dismiss=\"modal\">{{i18n $.Lang \"common.cancel\"}}</button>\n                    <button type=\"submit\" class=\"btn btn-success\" data-loading-text=\"{{i18n $.Lang \"common.processing\"}}\" id=\"btnAddTeam\">{{i18n $.Lang \"common.save\"}}\n                    </button>\n                </div>\n            </div>\n        </form>\n    </div>\n</div><!--END Modal-->\n\n\n<script src=\"{{cdnjs \"/static/jquery/1.12.4/jquery.min.js\"}}\"></script>\n<script src=\"{{cdnjs \"/static/bootstrap/js/bootstrap.min.js\"}}\"></script>\n<script src=\"{{cdnjs \"/static/vuejs/vue.min.js\"}}\"></script>\n<script src=\"{{cdnjs \"/static/js/jquery.form.js\"}}\" type=\"text/javascript\"></script>\n<script src=\"{{cdnjs \"/static/select2/4.0.5/js/select2.full.min.js\"}}\"></script>\n<script src=\"{{cdnjs \"/static/select2/4.0.5/js/i18n/zh-CN.js\"}}\"></script>\n<script src=\"{{cdnjs \"/static/js/main.js\"}}\" type=\"text/javascript\"></script>\n<script type=\"text/javascript\">\n    $(function () {\n\n        $(\"#addTeamDialogModal\").on(\"show.bs.modal\", function () {\n            window.addTeamDialogModalHtml = $(this).find(\"form\").html();\n            $('.js-data-example-ajax').select2({\n                language: \"{{i18n $.Lang \"common.js_lang\"}}\",\n                minimumInputLength: 1,\n                minimumResultsForSearch: Infinity,\n                maximumSelectionLength: 1,\n                width: \"100%\",\n                ajax: {\n                    url: '{{urlfor \"BookController.TeamSearch\" \"identify\" .Model.Identify}}',\n                    dataType: 'json',\n                    data: function (params) {\n                        return {\n                            q: params.term, // search term\n                            page: params.page\n                        };\n                    },\n                    processResults: function (data, params) {\n                        return {\n                            results: data.data.results\n                        }\n                    }\n                }\n            });\n        }).on(\"hidden.bs.modal\", function () {\n            $(this).find(\"form\").html(window.addTeamDialogModalHtml);\n        }).on(\"shown.bs.modal\", function () {\n            $(this).find(\"input[name='teamId']\").focus();\n        });\n\n\n        $(\"#addTeamDialogForm\").ajaxForm({\n            beforeSubmit: function () {\n                var teamId = $.trim($(\"#addTeamDialogForm select[name='teamId']\").val());\n                if (teamId == \"\") {\n                    return showError(\"{{i18n $.Lang \"message.team_name_empty\"}}\");\n                }\n                $(\"#btnAddTeam\").button(\"loading\");\n                return true;\n            },\n            success: function ($res) {\n                if ($res.errcode === 0) {\n                    app.lists.splice(0, 0, $res.data);\n                    $(\"#addTeamDialogModal\").modal(\"hide\");\n                } else {\n                    showError($res.message);\n                }\n            },\n            error: function () {\n                showError(\"{{i18n $.Lang \"message.system_error\"}}\");\n            },\n            complete: function () {\n                $(\"#btnAddTeam\").button(\"reset\");\n            }\n        });\n\n        var app = new Vue({\n            el: \"#teamList\",\n            data: {\n                lists: {{.Result}}\n            },\n            delimiters: ['${', '}'],\n            methods: {\n                deleteTeam: function (id, e) {\n                    var $this = this;\n                    $.ajax({\n                        url: \"{{urlfor \"BookController.TeamDelete\"}}\",\n                        type: \"post\",\n                        data: {\"teamId\": id, \"identify\": \"{{.Model.Identify}}\"},\n                        dataType: \"json\",\n                        success: function ($res) {\n                            if ($res.errcode === 0) {\n                                for (var index in $this.lists) {\n                                    var item = $this.lists[index];\n                                    if (item.team_relationship_id == id) {\n                                        $this.lists.splice(index, 1);\n                                        break;\n                                    }\n                                }\n                            } else {\n                                alert(\"{{i18n $.Lang \"message.operate_failed\"}}：\" + res.message);\n                            }\n                        }\n                    });\n                }\n            }\n        });\n        Vue.nextTick(function () {\n            $(\"[data-toggle='tooltip']\").tooltip();\n        });\n    });\n</script>\n</body>\n</html>"
  },
  {
    "path": "views/book/users.tpl",
    "content": "<!DOCTYPE html>\n<html lang=\"zh-CN\">\n<head>\n    <meta charset=\"utf-8\">\n    <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n\n    <title>{{i18n $.Lang \"blog.member\"}} - Powered by MinDoc</title>\n\n    <!-- Bootstrap -->\n    <link href=\"{{cdncss \"/static/bootstrap/css/bootstrap.min.css\"}}\" rel=\"stylesheet\">\n    <link href=\"{{cdncss \"/static/font-awesome/css/font-awesome.min.css\"}}\" rel=\"stylesheet\">\n    <link href=\"{{cdncss \"/static/select2/4.0.5/css/select2.min.css\"}}\" rel=\"stylesheet\">\n    <link href=\"{{cdncss \"/static/css/main.css\" \"version\"}}\" rel=\"stylesheet\">\n\n</head>\n<body>\n<div class=\"manual-reader\">\n    {{template \"widgets/header.tpl\" .}}\n    <div class=\"container manual-body\">\n        <div class=\"row\">\n            <div class=\"page-left\">\n                <ul class=\"menu\">\n                    <li><a href=\"{{urlfor \"BookController.Dashboard\" \":key\" .Model.Identify}}\" class=\"item\"><i class=\"fa fa-dashboard\" aria-hidden=\"true\"></i> {{i18n $.Lang \"blog.summary\"}}</a> </li>\n                {{if eq .Model.RoleId 0 1}}\n                    <li class=\"active\"><a href=\"{{urlfor \"BookController.Users\" \":key\" .Model.Identify}}\" class=\"item\"><i class=\"fa fa-user\" aria-hidden=\"true\"></i> {{i18n $.Lang \"blog.member\"}}</a> </li>\n                    <li><a href=\"{{urlfor \"BookController.Team\" \":key\" .Model.Identify}}\" class=\"item\"><i class=\"fa fa-group\" aria-hidden=\"true\"></i> {{i18n $.Lang \"blog.team\"}}</a> </li>\n                    <li><a href=\"{{urlfor \"BookController.Setting\" \":key\" .Model.Identify}}\" class=\"item\"><i class=\"fa fa-gear\" aria-hidden=\"true\"></i> {{i18n $.Lang \"common.setting\"}}</a> </li>\n                {{end}}\n                </ul>\n\n            </div>\n            <div class=\"page-right\">\n                <div class=\"m-box\">\n                    <div class=\"box-head\">\n                        <strong class=\"box-title\"> {{i18n $.Lang \"blog.member_manage\"}}</strong>\n                        {{if eq .Model.RoleId 0 1}}\n                        <button type=\"button\"  class=\"btn btn-success btn-sm pull-right\" data-toggle=\"modal\" data-target=\"#addBookMemberDialogModal\"><i class=\"fa fa-user-plus\" aria-hidden=\"true\"></i> {{i18n $.Lang \"blog.add_member\"}}</button>\n                        {{end}}\n                    </div>\n                </div>\n                <div class=\"box-body\" id=\"userList\">\n                    <div class=\"users-list\">\n                        <template v-if=\"lists.length <= 0\">\n                            <div class=\"text-center\">{{i18n $.Lang \"message.no_data\"}}</div>\n                        </template>\n                        <template v-else>\n                            <div class=\"list-item\" v-for=\"item in lists\">\n                                <img :src=\"item.avatar\" onerror=\"this.src='{{cdnimg \"/static/images/middle.gif\"}}'\" class=\"img-circle\" width=\"34\" height=\"34\">\n                                <span>${item.account}</span>\n                                <span style=\"font-size: 12px;color: #484848\" v-if=\"item.real_name != ''\">[${item.real_name}]</span>\n                                <div class=\"operate\">\n                                    <template v-if=\"item.role_id == 0\">\n                                        {{i18n $.Lang \"blog.creator\"}}\n                                    </template>\n                                   <template v-else>\n                                       <template v-if=\"(book.role_id == 1 || book.role_id == 0) && member.member_id != item.member_id\">\n                                           <div class=\"btn-group\">\n                                               <button type=\"button\" class=\"btn btn-default btn-sm\"  data-toggle=\"dropdown\" aria-haspopup=\"true\" aria-expanded=\"false\">\n                                                   ${item.role_name}\n                                                   <span class=\"caret\"></span></button>\n                                               <ul class=\"dropdown-menu\">\n                                                   <li><a href=\"javascript:;\" @click=\"setBookMemberRole(item.member_id,1)\">{{i18n $.Lang \"blog.administrator\"}}</a> </li>\n                                                   <li><a href=\"javascript:;\" @click=\"setBookMemberRole(item.member_id,2)\">{{i18n $.Lang \"blog.editor\"}}</a> </li>\n                                                   <li><a href=\"javascript:;\" @click=\"setBookMemberRole(item.member_id,3)\">{{i18n $.Lang \"blog.observer\"}}</a> </li>\n                                               </ul>\n                                           </div>\n                                           <button type=\"button\" class=\"btn btn-danger btn-sm\" @click=\"removeBookMember(item.member_id)\">{{i18n $.Lang \"common.remove\"}}</button>\n                                       </template>\n                                       <template v-else>\n                                           <template v-if=\"item.role_id == 1\">\n                                               {{i18n $.Lang \"blog.administrator\"}}\n                                           </template>\n                                           <template v-else-if=\"item.role_id == 2\">\n                                               {{i18n $.Lang \"blog.editor\"}}\n                                           </template>\n                                           <template v-else-if=\"item.role_id == 3\">\n                                               {{i18n $.Lang \"blog.observer\"}}\n                                           </template>\n                                       </template>\n                                   </template>\n                                </div>\n                            </div>\n                        </template>\n                    </div>\n                    <template v-if=\"lists.length >= 0\">\n                       <nav class=\"pagination-container\">\n                        {{.PageHtml}}\n                        </nav>\n                    </template>\n                </div>\n            </div>\n        </div>\n    </div>\n    {{template \"widgets/footer.tpl\" .}}\n</div>\n<!-- Modal -->\n<div class=\"modal fade\" id=\"addBookMemberDialogModal\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"addBookMemberDialogModalLabel\">\n    <div class=\"modal-dialog modal-sm\" role=\"document\" style=\"width: 400px;\">\n        <form method=\"post\" autocomplete=\"off\" class=\"form-horizontal\" action=\"{{urlfor \"BookMemberController.AddMember\"}}\" id=\"addBookMemberDialogForm\">\n            <input type=\"hidden\" name=\"identify\" value=\"{{.Model.Identify}}\">\n            <div class=\"modal-content\">\n                <div class=\"modal-header\">\n                    <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\"><span aria-hidden=\"true\">&times;</span></button>\n                    <h4 class=\"modal-title\" id=\"myModalLabel\">{{i18n $.Lang \"blog.add_member\"}}</h4>\n                </div>\n                <div class=\"modal-body\">\n                    <div class=\"form-group\">\n                        <label class=\"col-sm-2 control-label\">{{i18n $.Lang \"common.account\"}}</label>\n                       <div class=\"col-sm-10\">\n                           {{/*<input type=\"text\" name=\"account\" class=\"form-control\" placeholder=\"{{i18n $.Lang \"common.username\"}}\" id=\"account\" maxlength=\"50\">*/}}\n                           <select class=\"js-data-example-ajax form-control\" multiple=\"multiple\" name=\"account\" id=\"account\"></select>\n                       </div>\n                    </div>\n                    <div class=\"form-group\">\n                        <label class=\"col-sm-2 control-label\">{{i18n $.Lang \"common.role\"}}</label>\n                        <div class=\"col-sm-10\">\n                            <select name=\"role_id\" class=\"form-control\">\n                                <option value=\"1\">{{i18n $.Lang \"blog.administrator\"}}</option>\n                                <option value=\"2\">{{i18n $.Lang \"blog.editor\"}}</option>\n                                <option value=\"3\">{{i18n $.Lang \"blog.observer\"}}</option>\n                            </select>\n                        </div>\n                    </div>\n\n                    <div class=\"clearfix\"></div>\n                </div>\n                <div class=\"modal-footer\">\n                    <span id=\"form-error-message\"></span>\n                    <button type=\"button\" class=\"btn btn-default\" data-dismiss=\"modal\">{{i18n $.Lang \"common.cancel\"}}</button>\n                    <button type=\"submit\" class=\"btn btn-success\" data-loading-text=\"{{i18n $.Lang \"common.processing\"}}\" id=\"btnAddMember\">{{i18n $.Lang \"common.save\"}}</button>\n                </div>\n            </div>\n        </form>\n    </div>\n</div><!--END Modal-->\n<script src=\"{{cdnjs \"/static/jquery/1.12.4/jquery.min.js\"}}\"></script>\n<script src=\"{{cdnjs \"/static/bootstrap/js/bootstrap.min.js\"}}\"></script>\n<script src=\"{{cdnjs \"/static/vuejs/vue.min.js\"}}\"></script>\n<script src=\"{{cdnjs \"/static/js/jquery.form.js\"}}\" type=\"text/javascript\"></script>\n<script src=\"{{cdnjs \"/static/select2/4.0.5/js/select2.full.min.js\"}}\"></script>\n<script src=\"{{cdnjs \"/static/select2/4.0.5/js/i18n/zh-CN.js\"}}\"></script>\n<script src=\"{{cdnjs \"/static/js/main.js\"}}\" type=\"text/javascript\"></script>\n<script type=\"text/javascript\">\n    $(function () {\n\n        var modalCache = $(\"#addBookMemberDialogModal form\").html();\n\n        /**\n         * 添加用户\n         */\n        $(\"#addBookMemberDialogForm\").ajaxForm({\n            beforeSubmit : function () {\n                var account = $.trim($(\"#account\").val());\n                if(account === \"\"){\n                    return showError(\"{{i18n $.Lang \"message.account_empty\"}}\");\n                }\n                $(\"#btnAddMember\").button(\"loading\");\n            },\n            success : function (res) {\n                if(res.errcode === 0){\n                    app.lists.splice(0,0,res.data);\n                    $(\"#addBookMemberDialogModal\").modal(\"hide\");\n                }else{\n                    showError(res.message);\n                }\n                $(\"#btnAddMember\").button(\"reset\");\n            }\n        });\n        $(\"#addBookMemberDialogModal\").on(\"hidden.bs.modal\",function () {\n            $(this).find(\"form\").html(modalCache);\n        }).on(\"show.bs.modal\",function () {\n            $('.js-data-example-ajax').select2({\n                language: \"{{i18n $.Lang \"common.js_lang\"}}\",\n                minimumInputLength : 1,\n                minimumResultsForSearch: Infinity,\n                maximumSelectionLength:1,\n                width : \"100%\",\n                ajax: {\n                    url: '{{urlfor \"SearchController.User\" \":key\" .Model.Identify}}',\n                    dataType: 'json',\n                    data: function (params) {\n                        return {\n                            q: params.term, // search term\n                            page: params.page\n                        };\n                    },\n                    processResults: function (data, params) {\n                        console.log(data)\n                        return {\n                            results : data.data.results\n                        }\n                    }\n                }\n            });\n        });\n\n        var app = new Vue({\n            el : \"#userList\",\n            data : {\n                lists : {{.Result}},\n                member : {\n                    member_role : {{.Member.Role}},\n                    member_id : {{.Member.MemberId}}\n                },\n                book : {\n                    role_id : {{.Model.RoleId}},\n                    identify : {{.Model.Identify}}\n                }\n            },\n            delimiters : ['${','}'],\n            methods : {\n                setBookMemberRole : function (member_id, role_id) {\n                    var $this = this;\n                    $.ajax({\n                       url : \"{{urlfor \"BookMemberController.ChangeRole\"}}\",\n                        data : { \"identify\" : $this.book.identify,\"member_id\" : member_id,\"role_id\" : role_id },\n                        type :\"post\",\n                        dataType : \"json\",\n                        success : function (res) {\n                            console.log(res);\n                            if (res.errcode === 0){\n                                for(var index in $this.lists){\n                                    var item = $this.lists[index];\n                                    if (item.member_id === member_id){\n                                        $this.lists.splice(index,1,res.data);\n                                    }\n                                }\n                            }else{\n                                alert(res.message);\n                            }\n                        }\n                    });\n                },\n                removeBookMember : function (member_id) {\n                    var $this = this;\n                    $.ajax({\n                        url : \"{{urlfor \"BookMemberController.RemoveMember\"}}\",\n                        type :\"post\",\n                        dataType :\"json\",\n                        data :{ \"identify\" : $this.book.identify,\"member_id\" : member_id},\n                        success : function (res) {\n                            if(res.errcode === 0){\n                                for(var index in $this.lists){\n                                    if($this.lists[index].member_id === member_id){\n                                        $this.lists.splice(index,1);\n                                        break;\n                                    }\n                                }\n                            }else{\n                                alert(res.message);\n                            }\n                        }\n                    });\n                }\n            }\n        });\n        Vue.nextTick(function () {\n            $(\"[data-toggle='tooltip']\").tooltip();\n        });\n    });\n</script>\n</body>\n</html>"
  },
  {
    "path": "views/comment/index.tpl",
    "content": "<!DOCTYPE html>\n<html lang=\"zh-CN\">\n<head>\n    <meta charset=\"utf-8\">\n    <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n\n    <title>用户中心 - Powered by MinDoc</title>\n\n    <!-- Bootstrap -->\n    <link href=\"/static/bootstrap/css/bootstrap.min.css\" rel=\"stylesheet\">\n    <link href=\"/static/font-awesome/css/font-awesome.min.css\" rel=\"stylesheet\">\n\n    <link href=\"/static/css/main.css\" rel=\"stylesheet\">\n    <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->\n    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->\n    <!--[if lt IE 9]>\n    <script src=\"/static/html5shiv/3.7.3/html5shiv.min.js\"></script>\n    <script src=\"/static/respond.js/1.4.2/respond.min.js\"></script>\n    <![endif]-->\n</head>\n<body>\n<div class=\"manual-reader\">\n    {{template \"widgets/header.tpl\" .}}\n    <div class=\"container manual-body\">\n        <div class=\"row\">\n            <div class=\"page-left\">\n                <ul class=\"menu\">\n                    <li class=\"active\"><a href=\"{{urlfor \"SettingController.Index\"}}\" class=\"item\"><i class=\"fa fa-sitemap\" aria-hidden=\"true\"></i> 基本信息</a> </li>\n                    <li><a href=\"{{urlfor \"SettingController.Password\"}}\" class=\"item\"><i class=\"fa fa-user\" aria-hidden=\"true\"></i> 修改密码</a> </li>\n                </ul>\n            </div>\n            <div class=\"page-right\">\n                <div class=\"m-box\">\n                    <div class=\"box-head\">\n                        <strong class=\"box-title\">基本信息</strong>\n                    </div>\n                </div>\n                <div class=\"box-body\" style=\"padding-right: 200px;\">\n                    <div class=\"form-left\">\n                        <form role=\"form\" method=\"post\" id=\"memberInfoForm\">\n                            <div class=\"form-group\">\n                                <label>用户名</label>\n                                <input type=\"text\" class=\"form-control disabled\">\n                            </div>\n                            <div class=\"form-group\">\n                                <label for=\"user-nickname\">昵称</label>\n                                <input type=\"text\" class=\"form-control\" name=\"userNickname\" id=\"user-nickname\" max=\"20\" placeholder=\"昵称\" value=\"admin\">\n                            </div>\n                            <div class=\"form-group\">\n                                <label for=\"user-email\">邮箱<strong class=\"text-danger\">*</strong></label>\n                                <input type=\"email\" class=\"form-control\" value=\"longfei6671@163.com\" id=\"user-email\" name=\"userEmail\" max=\"100\" placeholder=\"邮箱\">\n                            </div>\n                            <div class=\"form-group\">\n                                <label>手机号</label>\n                                <input type=\"text\" class=\"form-control\" id=\"user-phone\" name=\"userPhone\" maxlength=\"20\" title=\"手机号码\" placeholder=\"手机号码\" value=\"\">\n                            </div>\n                            <div class=\"form-group\">\n                                <label class=\"description\">描述</label>\n                                <textarea class=\"form-control\" rows=\"3\" title=\"描述\" name=\"description\" id=\"description\" maxlength=\"500\"></textarea>\n                                <p style=\"color: #999;font-size: 12px;\">描述不能超过500字</p>\n                            </div>\n                            <div class=\"form-group\">\n                                <button type=\"submit\" class=\"btn btn-success\" data-loading-text=\"保存中...\">保存修改</button>\n                                <span id=\"form-error-message\" class=\"error-message\"></span>\n                            </div>\n                        </form>\n                    </div>\n                    <div class=\"form-right\">\n                        <label>\n                            <a href=\"javascript:;\" data-toggle=\"modal\" data-target=\"#upload-logo-panel\">\n                                <img src=\"/uploads/user/201612/58649aefa944e_58649aef.JPG\" onerror=\"this.src='https://wiki.iminho.me/static/images/middle.gif'\" class=\"img-circle\" alt=\"头像\" style=\"max-width: 120px;max-height: 120px;\" id=\"headimgurl\">\n                            </a>\n                        </label>\n                    </div>\n                </div>\n            </div>\n        </div>\n    </div>\n</div>\n<script src=\"/static/jquery/1.12.4/jquery.min.js\"></script>\n<script src=\"/static/bootstrap/js/bootstrap.min.js\"></script>\n</body>\n</html>"
  },
  {
    "path": "views/document/cherry_markdown_edit_template.tpl",
    "content": "<!DOCTYPE html>\n<html lang=\"zh-CN\">\n<head>\n    <meta charset=\"utf-8\">\n    <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n\n    <title>{{i18n .Lang \"doc.edit_doc\"}} - Powered by MinDoc</title>\n    <script type=\"text/javascript\">\n        window.IS_ENABLE_IFRAME = '{{conf \"enable_iframe\" }}' === 'true';\n        window.BASE_URL = '{{urlfor \"HomeController.Index\" }}';\n    </script>\n    <script type=\"text/javascript\">\n        window.treeCatalog = null;\n        window.baseUrl = \"{{.BaseUrl}}\";\n        window.saveing = false;\n        window.katex = { js: \"{{cdnjs \"/static/katex/katex\"}}\",css: \"{{cdncss \"/static/katex/katex\"}}\"};\n        window.editor = null;\n        window.imageUploadURL = \"{{urlfor \"DocumentController.Upload\" \"identify\" .Model.Identify}}\";\n        window.fileUploadURL = \"{{urlfor \"DocumentController.Upload\" \"identify\" .Model.Identify}}\";\n        window.documentCategory = {{.Result}};\n        window.book = {{.ModelResult}};\n        window.selectNode = null;\n        window.deleteURL = \"{{urlfor \"DocumentController.Delete\" \":key\" .Model.Identify}}\";\n        window.editURL = \"{{urlfor \"DocumentController.Content\" \":key\" .Model.Identify \":id\" \"\"}}\";\n        window.releaseURL = \"{{urlfor \"BookController.Release\" \":key\" .Model.Identify}}\";\n        window.sortURL = \"{{urlfor \"BookController.SaveSort\" \":key\" .Model.Identify}}\";\n        window.historyURL = \"{{urlfor \"DocumentController.History\"}}\";\n        window.removeAttachURL = \"{{urlfor \"DocumentController.RemoveAttachment\"}}\";\n        window.highlightStyle = \"{{.HighlightStyle}}\";\n        window.template = { \"getUrl\":\"{{urlfor \"TemplateController.Get\"}}\", \"listUrl\" : \"{{urlfor \"TemplateController.List\"}}\", \"deleteUrl\" : \"{{urlfor \"TemplateController.Delete\"}}\", \"saveUrl\" :\"{{urlfor \"TemplateController.Add\"}}\"}\n        window.lang = {{i18n $.Lang \"common.js_lang\"}};\n    </script>\n    <!-- Bootstrap -->\n    <link href=\"{{cdncss \"/static/bootstrap/css/bootstrap.min.css\"}}\" rel=\"stylesheet\">\n    <link href=\"{{cdncss \"/static/font-awesome/css/font-awesome.min.css\"}}\" rel=\"stylesheet\">\n    <link href=\"{{cdncss \"/static/jstree/3.3.4/themes/default/style.min.css\"}}\" rel=\"stylesheet\">\n\n    <link href=\"{{cdncss \"/static/css/jstree.css\"}}\" rel=\"stylesheet\">\n    <link href=\"{{cdncss \"/static/webuploader/webuploader.css\"}}\" rel=\"stylesheet\">\n    <link href=\"{{cdncss \"/static/css/markdown.css\" \"version\"}}\" rel=\"stylesheet\">\n    <link href=\"{{cdncss \"/static/cherry/cherry-markdown.css\" \"version\"}}\" rel=\"stylesheet\">\n    <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->\n    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->\n    <!--[if lt IE 9]>\n    <script src=\"/static/html5shiv/3.7.3/html5shiv.min.js\"></script>\n    <script src=\"/static/respond.js/1.4.2/respond.min.js\"></script>\n    <![endif]-->\n    <style type=\"text/css\">\n        .text{\n            font-size: 12px;\n            color: #999999;\n            font-weight: 200;\n        }\n    </style>\n</head>\n<body>\n\n<div class=\"m-manual manual-editor\">\n    <div class=\"markdown-body\">\n        <div class=\"markdown-category\" id=\"manualCategory\" style=\"position:absolute;\">\n            <div class=\"markdown-nav\">\n                <div class=\"nav-item active\"><i class=\"fa fa-bars\" aria-hidden=\"true\"></i> {{i18n .Lang \"doc.document\"}}</div>\n                <div class=\"nav-plus pull-right\" id=\"btnAddDocument\" data-toggle=\"tooltip\" data-title=\"{{i18n .Lang \"doc.create_doc\"}}\" data-direction=\"right\"><i class=\"fa fa-plus\" aria-hidden=\"true\"></i></div>\n                <div class=\"clearfix\"></div>\n            </div>\n            <div class=\"markdown-tree editor-status\" id=\"sidebar\"> </div>\n            <div class=\"markdown-editor-status\">\n                <div id=\"attachInfo\" class=\"item\">0 {{i18n .Lang \"doc.attachments\"}}</div>\n            </div>\n        </div>\n        <div class=\"markdown-editor-container\" id=\"manualEditorContainer\" style=\"min-width: 920px;\">            \n        </div>\n\n    </div>\n</div>\n<!-- 创建文档 -->\n<div class=\"modal fade\" id=\"addDocumentModal\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"addDocumentModalLabel\">\n    <div class=\"modal-dialog\" role=\"document\">\n        <form method=\"post\" action=\"{{urlfor \"DocumentController.Create\" \":key\" .Model.Identify}}\" id=\"addDocumentForm\" class=\"form-horizontal\">\n            <input type=\"hidden\" name=\"identify\" value=\"{{.Model.Identify}}\">\n            <input type=\"hidden\" name=\"doc_id\" value=\"0\">\n            <input type=\"hidden\" name=\"parent_id\" value=\"0\">\n        <div class=\"modal-content\">\n            <div class=\"modal-header\">\n                <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\"><span aria-hidden=\"true\">&times;</span></button>\n                <h4 class=\"modal-title\" id=\"myModalLabel\">{{i18n .Lang \"doc.create_doc\"}}</h4>\n            </div>\n            <div class=\"modal-body\">\n                <div class=\"form-group\">\n                    <label class=\"col-sm-2 control-label\">{{i18n .Lang \"doc.doc_name\"}} <span class=\"error-message\">*</span></label>\n                    <div class=\"col-sm-10\">\n                        <input type=\"text\" name=\"doc_name\" id=\"documentName\" placeholder=\"{{i18n .Lang \"doc.doc_name\"}}\" class=\"form-control\"  maxlength=\"50\">\n                        <p style=\"color: #999;font-size: 12px;\">{{i18n .Lang \"doc.doc_name_tips\"}}</p>\n\n                    </div>\n                </div>\n                <div class=\"form-group\">\n                    <label class=\"col-sm-2 control-label\">{{i18n .Lang \"doc.doc_id\"}} <span class=\"error-message\">&nbsp;</span></label>\n                    <div class=\"col-sm-10\">\n                        <input type=\"text\" name=\"doc_identify\" id=\"documentIdentify\" placeholder=\"{{i18n .Lang \"doc.doc_id\"}}\" class=\"form-control\" maxlength=\"50\">\n                        <p style=\"color: #999;font-size: 12px;\">{{i18n .Lang \"doc.doc_id_tips\"}}</p>\n                    </div>\n\n                </div>\n                <div class=\"form-group\">\n                        <div class=\"col-lg-4\">\n                            <label>\n                                <input type=\"radio\" name=\"is_open\" value=\"1\"> {{i18n .Lang \"doc.expand\"}}<span class=\"text\">{{i18n .Lang \"doc.expand_desc\"}}</span>\n                            </label>\n                        </div>\n                        <div class=\"col-lg-4\">\n                            <label>\n                                <input type=\"radio\" name=\"is_open\" value=\"0\" checked> {{i18n .Lang \"doc.fold\"}}<span class=\"text\">{{i18n .Lang \"doc.fold_desc\"}}</span>\n                            </label>\n                        </div>\n                    <div class=\"col-lg-4\">\n                        <label>\n                            <input type=\"radio\" name=\"is_open\" value=\"2\"> {{i18n .Lang \"doc.empty_contents\"}}<span class=\"text\">{{i18n .Lang \"doc.empty_contents_desc\"}}</span>\n                        </label>\n                    </div>\n                    <div class=\"clearfix\"></div>\n                </div>\n            </div>\n            <div class=\"modal-footer\">\n                <span id=\"add-error-message\" class=\"error-message\"></span>\n                <button type=\"button\" class=\"btn btn-default\" data-dismiss=\"modal\">{{i18n .Lang \"common.cancel\"}}</button>\n                <button type=\"submit\" class=\"btn btn-primary\" id=\"btnSaveDocument\" data-loading-text=\"{{i18n .Lang \"message.processing\"}}\">{{i18n .Lang \"doc.save\"}}</button>\n            </div>\n        </div>\n        </form>\n    </div>\n</div>\n\n<!-- 显示附件 --->\n<div class=\"modal fade\" id=\"uploadAttachModal\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"uploadAttachModalLabel\">\n    <div class=\"modal-dialog\" role=\"document\">\n        <form method=\"post\" id=\"uploadAttachModalForm\" class=\"form-horizontal\">\n            <div class=\"modal-content\">\n                <div class=\"modal-header\">\n                    <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\"><span aria-hidden=\"true\">&times;</span></button>\n                    <h4 class=\"modal-title\" id=\"myModalLabel\">{{i18n .Lang \"doc.upload_attachment\"}}</h4>\n                </div>\n                <div class=\"modal-body\">\n                    <div class=\"attach-drop-panel\">\n                        <div class=\"upload-container\" id=\"filePicker\"><i class=\"fa fa-upload\" aria-hidden=\"true\"></i></div>\n                    </div>\n                    <div class=\"attach-list\" id=\"attachList\">\n                        <template v-for=\"item in lists\">\n                            <div class=\"attach-item\" :id=\"item.attachment_id\">\n                                <template v-if=\"item.state == 'wait'\">\n                                    <div class=\"progress\">\n                                        <div class=\"progress-bar progress-bar-success\" role=\"progressbar\" aria-valuenow=\"40\" aria-valuemin=\"0\" aria-valuemax=\"100\">\n                                            <span class=\"sr-only\">0% Complete (success)</span>\n                                        </div>\n                                    </div>\n                                </template>\n                                <template v-else-if=\"item.state == 'error'\">\n                                    <span class=\"error-message\">${item.message}</span>\n                                    <button type=\"button\" class=\"btn btn-sm close\" @click=\"removeAttach(item.attachment_id)\">\n                                        <i class=\"fa fa-remove\" aria-hidden=\"true\"></i>\n                                    </button>\n                                </template>\n                                <template v-else>\n                                    <a :href=\"item.http_path\" target=\"_blank\" :title=\"item.file_name\">${item.file_name}</a>\n                                    <span class=\"text\">(${ formatBytes(item.file_size) })</span>\n                                    <span class=\"error-message\">${item.message}</span>\n                                    <button type=\"button\" class=\"btn btn-sm close\" @click=\"removeAttach(item.attachment_id)\">\n                                        <i class=\"fa fa-remove\" aria-hidden=\"true\"></i>\n                                    </button>\n                                    <div class=\"clearfix\"></div>\n                                </template>\n                            </div>\n                        </template>\n                    </div>\n                </div>\n                <div class=\"modal-footer\">\n                    <span id=\"add-error-message\" class=\"error-message\"></span>\n                    <button type=\"button\" class=\"btn btn-default\" data-dismiss=\"modal\">{{i18n .Lang \"common.cancel\"}}</button>\n                    <button type=\"button\" class=\"btn btn-primary\" id=\"btnUploadAttachFile\" data-dismiss=\"modal\">{{i18n .Lang \"common.confirm\"}}</button>\n                </div>\n            </div>\n        </form>\n    </div>\n</div>\n<!-- 显示文档历史 -->\n<div class=\"modal fade\" id=\"documentHistoryModal\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"documentHistoryModalModalLabel\">\n    <div class=\"modal-dialog\" role=\"document\">\n        <div class=\"modal-content\">\n            <div class=\"modal-header\">\n                <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\"><span aria-hidden=\"true\">&times;</span></button>\n                <h4 class=\"modal-title\">{{i18n .Lang \"doc.doc_history\"}}</h4>\n            </div>\n            <div class=\"modal-body text-center\" id=\"historyList\">\n\n            </div>\n            <div class=\"modal-footer\">\n                <button type=\"button\" class=\"btn btn-default\" data-dismiss=\"modal\">{{i18n .Lang \"doc.close\"}}</button>\n            </div>\n        </div>\n    </div>\n</div>\n<!--- 选择模板--->\n<div class=\"modal fade\" id=\"documentTemplateModal\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"{{i18n .Lang \"doc.choose_template_type\"}}\" aria-hidden=\"true\">\n    <div class=\"modal-dialog\" style=\"width: 780px;\">\n        <div class=\"modal-content\">\n            <div class=\"modal-header\">\n                <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\"><span aria-hidden=\"true\">&times;</span></button>\n                <h4 class=\"modal-title\" id=\"modal-title\">{{i18n .Lang \"doc.choose_template_type\"}}</h4>\n            </div>\n            <div class=\"modal-body template-list\">\n                <div class=\"container\">\n                    <div class=\"section\">\n                        <a data-type=\"normal\" href=\"javascript:;\"><i class=\"fa fa-file-o\"></i></a>\n                        <h3><a data-type=\"normal\" href=\"javascript:;\">{{i18n .Lang \"doc.normal_tpl\"}}</a></h3>\n                        <ul>\n                            <li>{{i18n .Lang \"doc.tpl_default_type\"}}</li>\n                            <li>{{i18n .Lang \"doc.tpl_plain_text\"}}</li>\n                        </ul>\n                    </div>\n                    <div class=\"section\">\n                        <a data-type=\"api\" href=\"javascript:;\"><i class=\"fa fa-file-code-o\"></i></a>\n                        <h3><a data-type=\"api\" href=\"javascript:;\">{{i18n .Lang \"doc.api_tpl\"}}</a></h3>\n                        <ul>\n                            <li>{{i18n .Lang \"doc.for_api_doc\"}}</li>\n                            <li>{{i18n .Lang \"doc.code_highlight\"}}</li>\n                        </ul>\n                    </div>\n                    <div class=\"section\">\n                        <a data-type=\"code\" href=\"javascript:;\"><i class=\"fa fa-book\"></i></a>\n\n                        <h3><a data-type=\"code\" href=\"javascript:;\">{{i18n .Lang \"doc.data_dict\"}}</a></h3>\n                        <ul>\n                            <li>{{i18n .Lang \"doc.for_data_dict\"}}</li>\n                            <li>{{i18n .Lang \"doc.form_support\"}}</li>\n                        </ul>\n                    </div>\n                    <div class=\"section\">\n                        <a data-type=\"customs\" href=\"javascript:;\"><i class=\"fa fa-briefcase\"></i></a>\n\n                        <h3><a data-type=\"customs\" href=\"javascript:;\">{{i18n .Lang \"doc.custom_tpl\"}}</a></h3>\n                        <ul>\n                            <li>{{i18n .Lang \"doc.any_type_doc\"}}</li>\n                            <li>{{i18n .Lang \"doc.as_global_tpl\"}}</li>\n                        </ul>\n                    </div>\n                </div>\n\n            </div>\n            <div class=\"modal-footer\">\n                <button type=\"button\" class=\"btn btn-default\" data-dismiss=\"modal\">{{i18n .Lang \"common.cancel\"}}</button>\n            </div>\n        </div>\n    </div>\n</div>\n<!--- 显示自定义模板--->\n<div class=\"modal fade\" id=\"displayCustomsTemplateModal\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"displayCustomsTemplateModalLabel\">\n    <div class=\"modal-dialog\" role=\"document\" style=\"width: 750px;\">\n        <div class=\"modal-content\">\n            <div class=\"modal-header\">\n                <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\"><span aria-hidden=\"true\">&times;</span></button>\n                <h4 class=\"modal-title\">{{i18n .Lang \"doc.custom_tpl\"}}</h4>\n            </div>\n            <div class=\"modal-body text-center\" id=\"displayCustomsTemplateList\">\n                <div class=\"table-responsive\">\n                    <table class=\"table table-hover\">\n                        <thead>\n                        <tr>\n                            <td>#</td>\n                            <td class=\"col-sm-3\">{{i18n $.Lang \"doc.tpl_name\"}}</td>\n                            <td class=\"col-sm-2\">{{i18n $.Lang \"doc.tpl_type\"}}</td>\n                            <td class=\"col-sm-2\">{{i18n $.Lang \"doc.creator\"}}</td>\n                            <td class=\"col-sm-3\">{{i18n $.Lang \"doc.create_time\"}}</td>\n                            <td class=\"col-sm-2\">{{i18n $.Lang \"doc.operation\"}}</td>\n                        </tr>\n                        </thead>\n                        <tbody>\n                        <tr>\n                            <td colspan=\"7\" class=\"text-center\">{{i18n .Lang \"message.no_data\"}}</td>\n                        </tr>\n                        </tbody>\n                    </table>\n                </div>\n            </div>\n            <div class=\"modal-footer\">\n                <button type=\"button\" class=\"btn btn-default\" data-dismiss=\"modal\">{{i18n .Lang \"doc.close\"}}</button>\n            </div>\n        </div>\n    </div>\n</div>\n<!--- 创建模板--->\n<div class=\"modal fade\" id=\"saveTemplateModal\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"saveTemplateModalLabel\">\n    <div class=\"modal-dialog\" role=\"document\">\n        <div class=\"modal-content\">\n            <form method=\"post\" action=\"{{urlfor \"TemplateController.Add\"}}\" id=\"saveTemplateForm\" class=\"form-horizontal\">\n                <input type=\"hidden\" name=\"identify\" value=\"{{.Model.Identify}}\">\n                <input type=\"hidden\" name=\"content\">\n                <div class=\"modal-header\">\n                    <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\"><span aria-hidden=\"true\">&times;</span></button>\n                    <h4 class=\"modal-title\">{{i18n .Lang \"doc.save_as_tpl\"}}</h4>\n                </div>\n                <div class=\"modal-body text-center\">\n                    <div class=\"form-group\">\n                        <label class=\"col-sm-2 control-label\">{{i18n .Lang \"doc.tpl_name\"}} <span class=\"error-message\">*</span></label>\n                        <div class=\"col-sm-10\">\n                            <input type=\"text\" name=\"template_name\" id=\"templateName\" placeholder=\"{{i18n .Lang \"doc.tpl_name\"}}\" class=\"form-control\"  maxlength=\"50\">\n                        </div>\n                    </div>\n                    {{if eq .Member.Role 0 1}}\n                    <div class=\"form-group\">\n                        <div class=\"col-lg-6\">\n                            <label>\n                                <input type=\"radio\" name=\"is_global\" value=\"1\"> {{i18n .Lang \"doc.global_tpl\"}}<span class=\"text\">{{i18n .Lang \"doc.global_tpl_desc\"}}</span>\n                            </label>\n                        </div>\n                        <div class=\"col-lg-6\">\n                            <label>\n                                <input type=\"radio\" name=\"is_global\" value=\"0\" checked> {{i18n .Lang \"doc.project_tpl\"}}<span class=\"text\">{{i18n .Lang \"doc.project_tpl_desc\"}}</span>\n                            </label>\n                        </div>\n                        <div class=\"clearfix\"></div>\n                    </div>\n                    {{end}}\n                </div>\n                <div class=\"modal-footer\">\n                    <span class=\"error-message show-error-message\"></span>\n                    <button type=\"button\" class=\"btn btn-default\" data-dismiss=\"modal\">{{i18n .Lang \"common.cancel\"}}</button>\n                    <button type=\"submit\" class=\"btn btn-primary\" id=\"btnSaveTemplate\" data-loading-text=\"{{i18n .Lang \"message.processing\"}}\">{{i18n .Lang \"doc.save\"}}</button>\n                </div>\n            </form>\n        </div>\n    </div>\n</div>\n<!--- json转换为表格 -->\n<div class=\"modal fade\" id=\"convertJsonToTableModal\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"convertJsonToTableModalLabel\">\n    <div class=\"modal-dialog\" role=\"document\">\n        <div class=\"modal-content\">\n            <form method=\"post\" id=\"convertJsonToTableForm\" class=\"form-horizontal\">\n                <div class=\"modal-header\">\n                    <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\"><span aria-hidden=\"true\">&times;</span></button>\n                    <h4 class=\"modal-title\">{{i18n .Lang \"doc.json_to_table\"}}</h4>\n                </div>\n                <div class=\"modal-body text-center\">\n                        <textarea type=\"text\" name=\"jsonContent\" id=\"jsonContent\" placeholder=\"Json\" class=\"form-control\" style=\"height: 300px;resize: none\"></textarea>\n\n                </div>\n                <div class=\"modal-footer\">\n                    <span id=\"json-error-message\"></span>\n                    <button type=\"button\" class=\"btn btn-default\" data-dismiss=\"modal\">{{i18n .Lang \"common.cancel\"}}</button>\n                    <button type=\"button\" class=\"btn btn-primary\" id=\"btnInsertTable\" data-loading-text=\"{{i18n .Lang \"message.processing\"}}\">{{i18n .Lang \"doc.insert\"}}</button>\n                </div>\n            </form>\n        </div>\n    </div>\n</div>\n<template id=\"template-normal\">\n{{if eq .Lang \"en-us\"}}\n{{template \"document/template_normal-en.tpl\"}}\n{{else}}\n{{template \"document/template_normal.tpl\"}}\n{{end}}\n</template>\n<template id=\"template-api\">\n{{if eq .Lang \"en-us\"}}\n{{template \"document/template_api-en.tpl\"}}\n{{else}}\n{{template \"document/template_api.tpl\"}}\n{{end}}\n</template>\n<template id=\"template-code\">\n{{if eq .Lang \"en-us\"}}\n{{template \"document/template_code-en.tpl\"}}\n{{else}}\n{{template \"document/template_code.tpl\"}}\n{{end}}\n</template>\n<script src=\"{{cdnjs \"/static/js/array.js\" \"version\"}}\" type=\"text/javascript\"></script>\n<script src=\"{{cdnjs \"/static/jquery/1.12.4/jquery.min.js\"}}\"></script>\n<script src=\"{{cdnjs \"/static/vuejs/vue.min.js\"}}\" type=\"text/javascript\"></script>\n<script src=\"{{cdnjs \"/static/bootstrap/js/bootstrap.min.js\"}}\"></script>\n<script src=\"{{cdnjs \"/static/webuploader/webuploader.min.js\"}}\" type=\"text/javascript\"></script>\n<script src=\"{{cdnjs \"/static/jstree/3.3.4/jstree.min.js\"}}\" type=\"text/javascript\"></script>\n<script src=\"{{cdnjs \"/static/layer/layer.js\"}}\" type=\"text/javascript\" ></script>\n<script src=\"{{cdnjs \"/static/js/jquery.form.js\"}}\" type=\"text/javascript\"></script>\n<script src=\"{{cdnjs \"/static/js/array.js\" \"version\"}}\" type=\"text/javascript\"></script>\n<script src=\"{{cdnjs \"/static/js/editor.js\" \"version\"}}\" type=\"text/javascript\"></script>\n<script src=\"{{cdnjs \"/static/js/cherry_markdown.js\" \"version\"}}\" type=\"text/javascript\"></script>\n<script src=\"{{cdnjs \"/static/cherry/cherry-markdown.js\" \"version\"}}\" type=\"text/javascript\"></script>\n<script src=\"{{cdnjs \"/static/js/custom-elements-builtin-0.6.5.min.js\"}}\" type=\"text/javascript\"></script>\n<script src=\"{{cdnjs \"/static/js/x-frame-bypass-1.0.2.js\"}}\" type=\"text/javascript\"></script>\n<script src=\"{{cdnjs \"/static/mammoth/mammoth.browser.js\"}}\" type=\"text/javascript\"></script>\n<script src=\"{{cdnjs \"/static/turndown/turndown.js\"}}\" type=\"text/javascript\"></script>\n<script src=\"{{cdnjs \"/static/js/word-to-html.js\"}}\" type=\"text/javascript\"></script>\n<script src=\"{{cdnjs \"/static/js/html-to-markdown.js\"}}\" type=\"text/javascript\"></script>\n<script type=\"text/javascript\">\n    $(function () {\n        \n        $(\"#attachInfo\").on(\"click\",function () {\n            $(\"#uploadAttachModal\").modal(\"show\");\n        });\n        window.uploader = null;\n\n        $(\"#uploadAttachModal\").on(\"shown.bs.modal\",function () {\n            if(window.uploader === null){\n                try {\n                    window.uploader = WebUploader.create({\n                        auto: true,\n                        dnd : true,\n                        swf: '{{.BaseUrl}}/static/webuploader/Uploader.swf',\n                        server: '{{urlfor \"DocumentController.Upload\"}}',\n                        formData : { \"identify\" : {{.Model.Identify}},\"doc_id\" :  window.selectNode.id },\n                        pick: \"#filePicker\",\n                        fileVal : \"editormd-file-file\",\n                        compress : false,\n                        fileSingleSizeLimit: {{.UploadFileSize}}\n                    }).on(\"beforeFileQueued\",function (file) {\n                        // uploader.reset();\n                        this.options.formData.doc_id = window.selectNode.id;\n                    }).on( 'fileQueued', function( file ) {\n                        var item = {\n                            state : \"wait\",\n                            attachment_id : file.id,\n                            file_size : file.size,\n                            file_name : file.name,\n                            message : \"{{i18n .Lang \"doc.uploading\"}}\"\n                        };\n                        window.vueApp.lists.push(item);\n\n                    }).on(\"uploadError\",function (file,reason) {\n                        for(var i in window.vueApp.lists){\n                            var item = window.vueApp.lists[i];\n                            if(item.attachment_id == file.id){\n                                item.state = \"error\";\n                                item.message = \"{{i18n .Lang \"message.upload_failed\"}}:\" + reason;\n                                break;\n                            }\n                        }\n\n                    }).on(\"uploadSuccess\",function (file, res) {\n\n                        for(var index in window.vueApp.lists){\n                            var item = window.vueApp.lists[index];\n                            if(item.attachment_id === file.id){\n                                if(res.errcode === 0) {\n                                    window.vueApp.lists.splice(index, 1, res.attach ? res.attach : res.data);\n                                }else{\n                                    item.message = res.message;\n                                    item.state = \"error\";\n                                }\n                            }\n                        }\n                    }).on(\"uploadProgress\",function (file, percentage) {\n                        var $li = $( '#'+file.id ),\n                            $percent = $li.find('.progress .progress-bar');\n\n                        $percent.css( 'width', percentage * 100 + '%' );\n                    }).on(\"error\", function (type) {\n                        if(type === \"F_EXCEED_SIZE\"){\n                            layer.msg(\"{{i18n .Lang \"message.upload_file_size_limit\"}}\");\n                        }\n                        console.log(type);\n                    });\n                }catch(e){\n                    console.log(e);\n                }\n            }\n        });\n    });\n</script>\n</body>\n</html>"
  },
  {
    "path": "views/document/cherry_read.tpl",
    "content": "<!DOCTYPE html>\n<html lang=\"zh-CN\">\n<head>\n\n    <title>{{.Title}} - Powered by MinDoc</title>\n\n    <meta charset=\"utf-8\">\n    <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n    <meta name=\"renderer\" content=\"webkit\">\n    <meta name=\"author\" content=\"Minho\" />\n    <meta name=\"site\" content=\"https://www.iminho.me\" />\n    <meta name=\"keywords\" content=\"MinDoc,文档在线管理系统,WIKI,wiki,wiki在线,文档在线管理,接口文档在线管理,接口文档管理,{{.Model.BookName}},{{.Title}}\">\n    <meta name=\"description\" content=\"{{.Title}}-{{if .Description}}{{.Description}}{{else}}{{.Model.Description}}{{end}}\">\n\n    <!-- Bootstrap -->\n    <link href=\"{{cdncss \"/static/bootstrap/css/bootstrap.min.css\"}}\" rel=\"stylesheet\">\n\n    <link href=\"{{cdncss \"/static/jstree/3.3.4/themes/default/style.min.css\"}}\" rel=\"stylesheet\">\n    <link href=\"{{cdncss \"/static/font-awesome/css/font-awesome.min.css\"}}\" rel=\"stylesheet\">\n    <link href=\"{{cdncss \"/static/nprogress/nprogress.css\"}}\" rel=\"stylesheet\">\n    <link href=\"{{cdncss \"/static/css/kancloud.css\" \"version\"}}\" rel=\"stylesheet\">\n    <link href=\"{{cdncss \"/static/css/jstree.css\"}}\" rel=\"stylesheet\">\n    <link href=\"{{cdncss \"/static/css/markdown.css\" \"version\"}}\" rel=\"stylesheet\">\n    <link href=\"{{cdncss \"/static/cherry/cherry-markdown.css\" \"version\"}}\" rel=\"stylesheet\">\n    <link href=\"{{cdncss \"/static/prismjs/prismjs.css\"}}\" rel=\"stylesheet\">\n    <link href=\"{{cdncss \"/static/katex/katex.min.css\"}}\" rel=\"stylesheet\">\n    <link href=\"{{cdncss \"/static/css/print.css\" \"version\"}}\" media=\"print\" rel=\"stylesheet\">\n\n    <script type=\"text/javascript\">\n        window.IS_ENABLE_IFRAME = '{{conf \"enable_iframe\" }}' === 'true';\n        window.BASE_URL = '{{urlfor \"HomeController.Index\" }}';\n        window.IS_DOCUMENT_INDEX = '{{if .IS_DOCUMENT_INDEX}}true{{end}}' === 'true';\n        window.IS_DISPLAY_COMMENT = '{{if .Model.IsDisplayComment}}true{{end}}' === 'true';\n    </script>\n    <script type=\"text/javascript\">window.book={\"identify\":\"{{.Model.Identify}}\"};</script>\n    <style>\n        .btn-mobile {\n            position: absolute;\n            right: 10px;\n            top: 10px;\n        }\n\n        .not-show-comment {\n            display: none;\n        }\n\n        @media screen and (min-width: 840px) {\n            .btn-mobile{\n                display: none;\n            }\n        }\n    </style>\n</head>\n<body>\n<div class=\"m-manual manual-mode-view manual-reader\">\n    <header class=\"navbar navbar-static-top manual-head\" role=\"banner\">\n        <div class=\"container-fluid\">\n            <div class=\"navbar-header pull-left manual-title\">\n                <span class=\"slidebar\" id=\"slidebar\"><i class=\"fa fa-align-justify\"></i></span>\n                <a href=\"{{urlfor \"DocumentController.Index\" \":key\" .Model.Identify}}\" title=\"{{.Model.BookName}}\" class=\"book-title\">{{.Model.BookName}}</a>\n                <span style=\"font-size: 12px;font-weight: 100;\"></span>\n            </div>\n            <a href=\"{{urlfor \"HomeController.Index\"}}\" class=\"btn btn-default btn-mobile\"> <i class=\"fa fa-home\" aria-hidden=\"true\"></i> {{i18n .Lang \"common.home\"}}</a>\n            <div class=\"navbar-header pull-right manual-menu\">\n                <div class=\"dropdown pull-left\" style=\"margin-right: 10px;\">\n                    <a href=\"{{urlfor \"HomeController.Index\"}}\" class=\"btn btn-default\"><i class=\"fa fa-home\" aria-hidden=\"true\"></i> {{i18n .Lang \"common.home\"}}</a>\n                </div>\n                {{if gt .Member.MemberId 0}}\n                {{if eq .Model.RoleId 0 1 2}}\n                <div class=\"dropdown pull-left\" style=\"margin-right: 10px;\">\n                    <a href=\"{{urlfor \"DocumentController.Edit\" \":key\" .Model.Identify \":id\" \"\"}}\" class=\"btn btn-danger\"><i class=\"fa fa-edit\" aria-hidden=\"true\"></i> {{i18n .Lang \"blog.edit\"}}</a>\n                    {{if eq .Model.RoleId 0 1}}\n                    <a href=\"{{urlfor \"BookController.Users\" \":key\" .Model.Identify}}\" class=\"btn btn-success\"><i class=\"fa fa-user\" aria-hidden=\"true\"></i> {{i18n .Lang \"blog.member\"}}</a>\n                    <a href=\"{{urlfor \"BookController.Setting\" \":key\" .Model.Identify}}\" class=\"btn btn-primary\"><i class=\"fa fa-gear\" aria-hidden=\"true\"></i> {{i18n .Lang \"common.setting\"}}</a>\n                    {{end}}\n                </div>\n                {{end}}\n                {{end}}\n                <a href=\"javascript:window.print();\" id=\"printSinglePage\" class=\"btn btn-default\" style=\"margin-right: 10px;\"><i class=\"fa fa-print\"></i> {{i18n .Lang \"doc.print\"}}</a>\n                <div class=\"dropdown pull-right\" style=\"margin-right: 10px;\">\n                {{if eq .Model.PrivatelyOwned 0}}\n                {{if .Model.IsEnableShare}}\n                    <button type=\"button\" class=\"btn btn-success\" data-toggle=\"modal\" data-target=\"#shareProject\"><i class=\"fa fa-share-square\" aria-hidden=\"true\"></i> {{i18n .Lang \"doc.share\"}}</button>\n                {{end}}\n                {{end}}\n                </div>\n                {{if .Model.IsDownload}}\n                <div class=\"dropdown pull-right\" style=\"margin-right: 10px;\">\n                    <button type=\"button\" class=\"btn btn-primary\" data-toggle=\"dropdown\" aria-haspopup=\"true\" aria-expanded=\"false\">\n                        <i class=\"fa fa-cloud-download\" aria-hidden=\"true\"></i> {{i18n .Lang \"doc.download\"}} <span class=\"caret\"></span>\n                    </button>\n                    <ul class=\"dropdown-menu\" role=\"menu\" aria-labelledby=\"dLabel\" style=\"margin-top: -5px;\">\n                        <li><a href=\"{{urlfor \"DocumentController.Export\" \":key\" .Model.Identify \"output\" \"pdf\"}}\" target=\"_blank\">PDF</a> </li>\n                        <li><a href=\"{{urlfor \"DocumentController.Export\" \":key\" .Model.Identify \"output\" \"epub\"}}\" target=\"_blank\">EPUB</a> </li>\n                        <li><a href=\"{{urlfor \"DocumentController.Export\" \":key\" .Model.Identify \"output\" \"mobi\"}}\" target=\"_blank\">MOBI</a> </li>\n                        <li><a href=\"{{urlfor \"DocumentController.Export\" \":key\" .Model.Identify \"output\" \"docx\"}}\" target=\"_blank\">Word</a> </li>\n                        {{if eq .Model.Editor \"cherry_markdown\"}}\n                        <li><a href=\"{{urlfor \"DocumentController.Export\" \":key\" .Model.Identify \"output\" \"markdown\"}}\" target=\"_blank\">Markdown</a> </li>\n                        {{end}}\n                    </ul>\n                </div>\n                {{end}}\n            </div>\n        </div>\n    </header>\n    <article class=\"container-fluid manual-body\">\n        <div class=\"manual-left\">\n            <div class=\"manual-tab\">\n                <div class=\"tab-navg\">\n                    <span data-mode=\"view\" class=\"navg-item active\"><i class=\"fa fa-align-justify\"></i><b class=\"text\">{{i18n .Lang \"doc.contents\"}}</b></span>\n                    <span data-mode=\"search\" class=\"navg-item\"><i class=\"fa fa-search\"></i><b class=\"text\">{{i18n .Lang \"doc.search\"}}</b></span>\n                    <span id=\"handlerMenuShow\" style=\"float: right;display: inline-block;padding: 5px;cursor: pointer;\">\n                        <i class=\"fa fa-angle-left\" style=\"font-size: 20px;padding-right: 5px;\"></i>\n                        <span class=\"pull-right\" style=\"padding-top: 4px;\">{{i18n .Lang \"doc.expand\"}}</span>\n                    </span>\n                </div>\n                <div class=\"tab-util\">\n                    <span class=\"manual-fullscreen-switch\">\n                        <b class=\"open fa fa-angle-right\" title=\"{{i18n .Lang \"doc.expand\"}}\"></b>\n                        <b class=\"close fa fa-angle-left\" title=\"{{i18n .Lang \"doc.close\"}}\"></b>\n                    </span>\n                </div>\n                <div class=\"tab-wrap\">\n                    <div class=\"tab-item manual-catalog\">\n                        <div class=\"catalog-list read-book-preview\" id=\"sidebar\">\n                        {{.Result}}\n                        </div>\n\n                    </div>\n                    <div class=\"tab-item manual-search\">\n                        <div class=\"search-container\">\n                            <div class=\"search-form\">\n                                <form id=\"searchForm\" action=\"{{urlfor \"DocumentController.Search\" \":key\" .Model.Identify}}\" method=\"post\">\n                                    <div class=\"form-group\">\n                                        <input type=\"search\" placeholder=\"{{i18n .Lang \"message.search_placeholder\"}}\" class=\"form-control\" name=\"keyword\">\n                                        <button type=\"submit\" class=\"btn btn-default btn-search\" id=\"btnSearch\">\n                                            <i class=\"fa fa-search\"></i>\n                                        </button>\n                                    </div>\n                                </form>\n                            </div>\n                            <div class=\"search-result\">\n                                <div class=\"search-empty\">\n                                    <i class=\"fa fa-search-plus\" aria-hidden=\"true\"></i>\n                                    <b class=\"text\">{{i18n .Lang \"message.no_search_result\"}}</b>\n                                </div>\n                                <ul class=\"search-list\" id=\"searchList\">\n                                </ul>\n                            </div>\n                        </div>\n                    </div>\n                </div>\n            </div>\n            <div class=\"m-copyright\">\n                <p>\n                    <div id=\"view_count\">{{i18n .Lang \"doc.view_count\"}}：{{.ViewCount}}</div>\n                    {{i18n $.Lang \"doc.doc_publish_by\"}} <a href=\"https://www.iminho.me\" target=\"_blank\">MinDoc</a> {{i18n $.Lang \"doc.doc_publish\"}}\n                </p>\n            </div>\n        </div>\n        <div class=\"manual-right\">\n            <div id=\"view_container\" class=\"manual-article {{if eq .Model.Editor \"cherry_markdown\"}} cherry cherry-markdown {{.MarkdownTheme}} {{end}}\">\n                <div class=\"article-content\">\n                    <div class=\"article-head {{if eq .Model.Editor \"cherry_markdown\"}} markdown-article-head {{end}}\">\n                        <div class=\"container-fluid\">\n                            <div class=\"row\">\n                                <div class=\"col-md-2\">\n                                </div>\n                                <div class=\"col-md-8 text-center {{if eq .Model.Editor \"cherry_markdown\"}} markdown-title {{else}} editor-content{{end}}\">\n                                    <h1 id=\"article-title\">{{.Title}}</h1>\n                                </div>\n                                <div class=\"col-md-2\">\n                                </div>\n                            </div>\n                        </div>\n                    </div>\n                    <div class=\"article-body {{if eq .Model.Editor \"cherry_markdown\"}} markdown-article-body {{else}} editor-content{{end}}\"  id=\"page-content\">\n                        {{.Content}}\n                    </div>\n\n                    {{if .Model.IsDisplayComment}}\n                    <div id=\"articleComment\" class=\"m-comment{{if .IS_DOCUMENT_INDEX}} not-show-comment{{end}}\">\n                        <!-- 评论列表 -->\n                        <div class=\"comment-list\" id=\"commentList\">\n                            {{range $i, $c := .Page.List}}\n                            <div class=\"comment-item\" data-id=\"{{$c.CommentId}}\">\n                                <p class=\"info\"><a class=\"name\">{{$c.Author}}</a><span class=\"date\">{{date $c.CommentDate \"Y-m-d H:i:s\"}}</span></p>\n                                <div class=\"content\">{{$c.Content}}</div>\n                                <p class=\"util\">\n                                    <span class=\"operate {{if eq $c.ShowDel 1}}toggle{{end}}\">\n                                        <span class=\"number\">{{$c.Index}}#</span>\n                                        {{if eq $c.ShowDel 1}}\n                                        <i class=\"delete e-delete glyphicon glyphicon-remove\" style=\"color:red\" onclick=\"onDelComment({{$c.CommentId}})\"></i>\n                                        {{end}}\n                                    </span>\n                                </p>\n                            </div>\n                            {{end}}\n                        </div>\n\n                        <!-- 翻页 -->\n                        <ul id=\"page\"></ul>\n\n                        <!-- 发表评论 -->\n                        <div class=\"comment-post\">\n                            <form class=\"form\" id=\"commentForm\" action=\"{{urlfor \"CommentController.Create\"}}\" method=\"post\">\n                                <label class=\"enter w-textarea textarea-full\">\n                                    <textarea class=\"textarea-input form-control\" name=\"content\" id=\"commentContent\" placeholder=\"文明上网，理性发言\" style=\"height: 72px;\"></textarea>\n                                    <input type=\"hidden\" name=\"doc_id\" id=\"doc_id\" value=\"{{.DocumentId}}\">\n                                </label>\n                                <div class=\"pull-right\">\n                                    <button class=\"btn btn-success btn-sm\" type=\"submit\" id=\"btnSubmitComment\" data-loading-text=\"提交中...\">提交评论</button>\n                                </div>\n                            </form>\n                        </div>\n                    </div>\n                    {{end}}\n\n                    <div class=\"jump-top\">\n                        <a href=\"javascript:;\" class=\"view-backtop\"><i class=\"fa fa-arrow-up\" aria-hidden=\"true\"></i></a>\n                    </div>\n                </div>\n\n            </div>\n        </div>\n        <div class=\"manual-progress\"><b class=\"progress-bar\"></b></div>\n    </article>\n    <div class=\"manual-mask\"></div>\n</div>\n{{if .Model.IsEnableShare}}\n<!-- 分享项目 -->\n<div class=\"modal fade\" id=\"shareProject\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"myModalLabel\" aria-hidden=\"true\">\n    <div class=\"modal-dialog\">\n        <div class=\"modal-content\">\n            <div class=\"modal-header\">\n                <button type=\"button\" class=\"close\" data-dismiss=\"modal\"><span aria-hidden=\"true\">&times;</span><span class=\"sr-only\">Close</span></button>\n                <h4 class=\"modal-title\" id=\"myModalLabel\">{{i18n .Lang \"doc.share_project\"}}</h4>\n            </div>\n            <div class=\"modal-body\">\n                <div class=\"row\">\n                    <div class=\"col-sm-12 text-center\" style=\"padding-bottom: 15px;\">\n                        <img src=\"{{urlfor \"DocumentController.QrCode\" \":key\" .Model.Identify}}\" alt=\"扫一扫手机阅读\" />\n                    </div>\n                </div>\n                <div class=\"form-group\">\n                    <label for=\"shareUrl\" class=\"col-sm-2 control-label\">{{i18n .Lang \"doc.share_url\"}}</label>\n                    <div class=\"col-sm-10\">\n                        <input type=\"text\" value=\"{{urlfor \"DocumentController.Index\" \":key\" .Model.Identify}}\" class=\"form-control\" onmouseover=\"this.select()\" id=\"shareUrl\" title=\"{{i18n .Lang \"doc.share_url\"}}\">\n                    </div>\n                    <div class=\"clearfix\"></div>\n                </div>\n            </div>\n            <div class=\"modal-footer\">\n                <button type=\"button\" class=\"btn btn-default\" data-dismiss=\"modal\">{{i18n .Lang \"doc.close\"}}</button>\n            </div>\n        </div>\n    </div>\n</div>\n{{end}}\n<!-- 下载项目 -->\n<div class=\"modal fade\" id=\"downloadBookModal\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"myModalLabel\" aria-hidden=\"true\">\n    <div class=\"modal-dialog\">\n        <div class=\"modal-content\">\n            <div class=\"modal-header\">\n                <button type=\"button\" class=\"close\" data-dismiss=\"modal\"><span aria-hidden=\"true\">&times;</span><span class=\"sr-only\">Close</span></button>\n                <h4 class=\"modal-title\" id=\"myModalLabel\">{{i18n .Lang \"doc.share_project\"}}</h4>\n            </div>\n            <div class=\"modal-body\">\n                <div class=\"row\">\n                    <div class=\"col-sm-12 text-center\" style=\"padding-bottom: 15px;\">\n                        <img src=\"{{urlfor \"DocumentController.QrCode\" \":key\" .Model.Identify}}\" alt=\"扫一扫手机阅读\" />\n                    </div>\n                </div>\n                <div class=\"form-group\">\n                    <label for=\"downloadUrl\" class=\"col-sm-2 control-label\">{{i18n .Lang \"doc.share_url\"}}</label>\n                    <div class=\"col-sm-10\">\n                        <input type=\"text\" value=\"{{urlfor \"DocumentController.Index\" \":key\" .Model.Identify}}\" class=\"form-control\" onmouseover=\"this.select()\" id=\"downloadUrl\" title=\"{{i18n .Lang \"doc.share_url\"}}\">\n                    </div>\n                    <div class=\"clearfix\"></div>\n                </div>\n            </div>\n            <div class=\"modal-footer\">\n                <button type=\"button\" class=\"btn btn-default\" data-dismiss=\"modal\">{{i18n .Lang \"doc.close\"}}</button>\n            </div>\n        </div>\n    </div>\n</div>\n\n<script src=\"{{cdnjs \"/static/jquery/1.12.4/jquery.min.js\"}}\"></script>\n<script src=\"{{cdnjs \"/static/bootstrap/js/bootstrap.min.js\"}}\"></script>\n<script src=\"{{cdnjs \"/static/bootstrap-paginator/bootstrap-paginator.min.js\"}}\"></script>\n<script src=\"{{cdnjs \"/static/js/jquery.form.js\"}}\" type=\"text/javascript\"></script>\n<script src=\"{{cdnjs \"/static/layer/layer.js\"}}\" type=\"text/javascript\"></script>\n<script src=\"{{cdnjs \"/static/jstree/3.3.4/jstree.min.js\"}}\" type=\"text/javascript\"></script>\n<script src=\"{{cdnjs \"/static/nprogress/nprogress.js\"}}\" type=\"text/javascript\"></script>\n<script src=\"{{cdnjs \"/static/cherry/cherry-markdown.js\"}}\" type=\"text/javascript\"></script>\n<script src=\"{{cdnjs \"/static/editor.md/lib/highlight/highlight.js\"}}\" type=\"text/javascript\"></script>\n<script src=\"{{cdnjs \"/static/js/jquery.highlight.js\"}}\" type=\"text/javascript\"></script>\n<script src=\"{{cdnjs \"/static/js/clipboard.min.js\" \"version\"}}\" type=\"text/javascript\"></script>\n<script src=\"{{cdnjs \"/static/prismjs/prismjs.js\"}}\" type=\"text/javascript\"></script>\n<script src=\"{{cdnjs \"/static/js/kancloud.js\" \"version\"}}\" type=\"text/javascript\"></script>\n<script src=\"{{cdnjs \"/static/js/splitbar.js\" \"version\"}}\" type=\"text/javascript\"></script>\n<script src=\"{{cdnjs \"/static/js/custom-elements-builtin-0.6.5.min.js\"}}\" type=\"text/javascript\"></script>\n<script src=\"{{cdnjs \"/static/js/x-frame-bypass-1.0.2.js\"}}\" type=\"text/javascript\"></script>\n<script type=\"text/javascript\">\n$(function () {\n    $(\"#searchList\").on(\"click\",\"a\",function () {\n        var id = $(this).attr(\"data-id\");\n        var url = \"{{urlfor \"DocumentController.Read\" \":key\" .Model.Identify \":id\" \"\"}}/\" + id;\n        $(this).parent(\"li\").siblings().find(\"a\").removeClass(\"active\");\n        $(this).addClass(\"active\");\n        loadDocument(url,id,function (body) {\n            return $(body).highlight(window.keyword);\n        });\n    });\n\n    window.menuControl = true;\n    window.foldSetting = '{{.FoldSetting}}';\n    if (foldSetting == 'open' || foldSetting == 'first') {\n        $('#handlerMenuShow').find('span').text('{{i18n .Lang \"doc.fold\"}}');\n        $('#handlerMenuShow').find('i').attr(\"class\",\"fa fa-angle-down\");\n        if (foldSetting == 'open') {\n            window.jsTree.jstree().open_all();\n        }\n        if (foldSetting == 'first') {\n            window.jsTree.jstree('close_all');\n            var $target = $('.jstree-container-ul').children('li').filter(function(index){\n                if($(this).attr('aria-expanded')==false||$(this).attr('aria-expanded')){\n                    return $(this);\n                }else{\n                    delete $(this);\n                }\n            });\n            $target.children('i').trigger('click');\n        }\n    } else {\n        menuControl = false;\n        window.jsTree.jstree('close_all');\n    }\n    $('#handlerMenuShow').on('click', function(){\n        if(menuControl){\n            $(this).find('span').text('{{i18n .Lang \"doc.expand\"}}');\n            $(this).find('i').attr(\"class\",\"fa fa-angle-left\");\n            window.menuControl = false;\n            window.jsTree.jstree('close_all');\n        }else{\n            window.menuControl = true\n            $(this).find('span').text('{{i18n .Lang \"doc.fold\"}}');\n            $(this).find('i').attr(\"class\",\"fa fa-angle-down\");\n            window.jsTree.jstree().open_all();\n        }\n    });\n\n    if (!window.IS_DOCUMENT_INDEX && IS_DISPLAY_COMMENT) {\n        pageClicked(-1, parseInt($('#doc_id').val()));\n    }\n});\n</script>\n{{.Scripts}}\n</body>\n</html>"
  },
  {
    "path": "views/document/compare.tpl",
    "content": "\n<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n    <meta charset=\"utf-8\" />\n    <title>{{i18n .Lang \"doc.comparision\"}} - Powered by MinDoc</title>\n    <link rel=\"shortcut icon\" href=\"{{cdnimg \"/favicon.ico\"}}\" />\n    <link href=\"{{cdncss \"/static/fonts/notosans.css\"}}\" rel='stylesheet' type='text/css' />\n    <link type='text/css' rel='stylesheet' href=\"{{cdncss \"/static/mergely/editor/lib/wicked-ui.css\"}}\" />\n    <link type='text/css' rel='stylesheet' href=\"{{cdncss \"/static/mergely/editor/lib/tipsy/tipsy.css\"}}\" />\n    <link type=\"text/css\" rel=\"stylesheet\" href=\"{{cdncss \"/static/mergely/editor/lib/farbtastic/farbtastic.css\"}}\" />\n    <link type=\"text/css\" rel=\"stylesheet\" href=\"{{cdncss \"/static/mergely/lib/codemirror.css\"}}\" />\n    <link type=\"text/css\" rel=\"stylesheet\" href=\"{{cdncss \"/static/mergely/lib/mergely.css\"}}\" />\n    <link type='text/css' rel='stylesheet' href=\"{{cdncss \"/static/mergely/editor/editor.css\"}}\" />\n\n    <script type=\"text/javascript\" src=\"{{cdnjs \"/static/jquery/1.12.4/jquery.min.js\"}}\"></script>\n    <script type=\"text/javascript\" src=\"{{cdnjs \"/static/mergely/editor/lib/wicked-ui.js\"}}\"></script>\n    <script type=\"text/javascript\" src=\"{{cdnjs \"/static/mergely/editor/lib/tipsy/jquery.tipsy.js\"}}\"></script>\n    <script type=\"text/javascript\" src=\"{{cdnjs \"/static/mergely/editor/lib/farbtastic/farbtastic.js\"}}\"></script>\n    <script type=\"text/javascript\" src=\"{{cdnjs \"/static/mergely/lib/codemirror.min.js\"}}\"></script>\n    <script type=\"text/javascript\" src=\"{{cdnjs \"/static/mergely/lib/mergely.min.js\"}}\"></script>\n    <script type=\"text/javascript\" src=\"{{cdnjs \"/static/mergely/editor/editor.js\"}}\"></script>\n    <script type=\"text/javascript\" src=\"{{cdnjs \"/static/mergely/lib/searchcursor.js\"}}\"></script>\n    <script type=\"text/javascript\">\n        var key = '';\n       // var isSample = key === 'usaindep';\n    </script>\n</head>\n<body style=\"visibility:hidden\">\n<!-- toolbar -->\n<ul id=\"toolbar\">\n    <li id=\"tb-file-save\" data-icon=\"icon-save\" title=\"{{i18n .Lang \"common.save\"}}\">{{i18n .Lang \"doc.save_merge\"}}</li>\n    <li class=\"separator\"></li>\n    <li id=\"tb-view-change-prev\" data-icon=\"icon-arrow-up\" title=\"{{i18n .Lang \"doc.prev_diff\"}}\">{{i18n .Lang \"doc.prev_diff\"}}</li>\n    <li id=\"tb-view-change-next\" data-icon=\"icon-arrow-down\" title=\"{{i18n .Lang \"doc.next_diff\"}}\">{{i18n .Lang \"doc.next_diff\"}}</li>\n    <li class=\"separator\"></li>\n    <li id=\"tb-edit-right-merge-left\" data-icon=\"icon-arrow-left-v\" title=\"{{i18n .Lang \"doc.merge_to_left\"}}\">{{i18n .Lang \"doc.merge_to_left\"}}</li>\n    <li id=\"tb-edit-left-merge-right\" data-icon=\"icon-arrow-right-v\" title=\"{{i18n .Lang \"doc.merge_to_right\"}}\">{{i18n .Lang \"doc.merge_to_right\"}}</li>\n    <li id=\"tb-view-swap\" data-icon=\"icon-swap\" title=\"{{i18n .Lang \"doc.exchange_left_right\"}}\">{{i18n .Lang \"doc.exchange_left_right\"}}</li>\n</ul>\n\n<!-- find -->\n<div class=\"find\">\n    <input type=\"text\" placeholder=\"{{i18n .Lang \"message.keyword_placeholder\"}}\"/>\n    <button class=\"find-prev\"><span class=\"icon icon-arrow-up\"></span></button>\n    <button class=\"find-next\"><span class=\"icon icon-arrow-down\"></span></button>\n    <button class=\"find-close\"><span class=\"icon icon-x-mark\"></span></button>\n</div>\n<!-- editor -->\n<div style=\"position: absolute;top: 33px;bottom: 10px;left: 5px;right: 5px;overflow-y: hidden;padding-bottom: 2px;\">\n    <div id=\"mergely\"></div>\n</div>\n<template id=\"historyContent\">{{.HistoryContent}}</template>\n<template id=\"documentContent\">{{.Content}}</template>\n<script type=\"text/javascript\" src=\"{{cdnjs \"/static/layer/layer.js\"}}\"></script>\n\n</body>\n</html>\n"
  },
  {
    "path": "views/document/default_read.tpl",
    "content": "<!DOCTYPE html>\n<html lang=\"zh-CN\">\n<head>\n\n    <title>{{.Title}} - Powered by MinDoc</title>\n\n    <meta charset=\"utf-8\">\n    <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n    <meta name=\"renderer\" content=\"webkit\">\n    <meta name=\"author\" content=\"Minho\" />\n    <meta name=\"site\" content=\"https://www.iminho.me\" />\n    <meta name=\"keywords\" content=\"MinDoc,文档在线管理系统,WIKI,wiki,wiki在线,文档在线管理,接口文档在线管理,接口文档管理,{{.Model.BookName}},{{.Title}}\">\n    <meta name=\"description\" content=\"{{.Title}}-{{if .Description}}{{.Description}}{{else}}{{.Model.Description}}{{end}}\">\n\n    <!-- Bootstrap -->\n    <link href=\"{{cdncss \"/static/bootstrap/css/bootstrap.min.css\"}}\" rel=\"stylesheet\">\n\n    <link href=\"{{cdncss \"/static/jstree/3.3.4/themes/default/style.min.css\"}}\" rel=\"stylesheet\">\n    <link href=\"{{cdncss \"/static/font-awesome/css/font-awesome.min.css\"}}\" rel=\"stylesheet\">\n    <link href=\"{{cdncss \"/static/nprogress/nprogress.css\"}}\" rel=\"stylesheet\">\n    <link href=\"{{cdncss \"/static/css/kancloud.css\" \"version\"}}\" rel=\"stylesheet\">\n    <link href=\"{{cdncss \"/static/css/jstree.css\"}}\" rel=\"stylesheet\">\n    <link href=\"{{cdncss \"/static/editor.md/lib/sequence/sequence-diagram-min.css\" \"version\"}}\" rel=\"stylesheet\">\n    <link href=\"{{cdncss \"/static/editor.md/css/editormd.preview.css\" \"version\"}}\" rel=\"stylesheet\">\n    <link href=\"{{cdncss \"/static/css/markdown.preview.css\" \"version\"}}\" rel=\"stylesheet\">\n    <link href=\"{{cdncss (print \"/static/editor.md/lib/highlight/styles/\" .HighlightStyle \".css\") \"version\"}}\" rel=\"stylesheet\">\n    <link href=\"{{cdncss \"/static/prismjs/prismjs.css\"}}\" rel=\"stylesheet\">\n    <link href=\"{{cdncss \"/static/katex/katex.min.css\"}}\" rel=\"stylesheet\">\n    <link href=\"{{cdncss \"/static/css/print.css\" \"version\"}}\" media=\"print\" rel=\"stylesheet\">\n\n    <script type=\"text/javascript\">\n        window.IS_ENABLE_IFRAME = '{{conf \"enable_iframe\" }}' === 'true';\n        window.BASE_URL = '{{urlfor \"HomeController.Index\" }}';\n        window.IS_DOCUMENT_INDEX = '{{if .IS_DOCUMENT_INDEX}}true{{end}}' === 'true';\n        window.IS_DISPLAY_COMMENT = '{{if .Model.IsDisplayComment}}true{{end}}' === 'true';\n    </script>\n    <script type=\"text/javascript\">window.book={\"identify\": '{{.Model.Identify}}'};</script>\n    <style>\n        .btn-mobile {\n            position: absolute;\n            right: 10px;\n            top: 10px;\n        }\n\n        .not-show-comment {\n            display: none;\n        }\n\n        @media screen and (min-width: 840px) {\n            .btn-mobile{\n                display: none;\n            }\n        }\n\n        .svg {\n            display: inline-block;\n            position: relative;\n            width: 100%;\n            height: 100%;\n            vertical-align: middle;\n            overflow: auto;\n        }\n    </style>\n</head>\n<body>\n<div class=\"m-manual manual-mode-view manual-reader\">\n    <header class=\"navbar navbar-static-top manual-head\" role=\"banner\">\n        <div class=\"container-fluid\">\n            <div class=\"navbar-header pull-left manual-title\">\n                <span class=\"slidebar\" id=\"slidebar\"><i class=\"fa fa-align-justify\"></i></span>\n                <a href=\"{{urlfor \"DocumentController.Index\" \":key\" .Model.Identify}}\" title=\"{{.Model.BookName}}\" class=\"book-title\">{{.Model.BookName}}</a>\n                <span style=\"font-size: 12px;font-weight: 100;\"></span>\n            </div>\n            <a href=\"{{urlfor \"HomeController.Index\"}}\" class=\"btn btn-default btn-mobile\"> <i class=\"fa fa-home\" aria-hidden=\"true\"></i> {{i18n .Lang \"common.home\"}}</a>\n            <div class=\"navbar-header pull-right manual-menu\">\n                <div class=\"dropdown pull-left\" style=\"margin-right: 10px;\">\n                    <a href=\"{{urlfor \"HomeController.Index\"}}\" class=\"btn btn-default\"><i class=\"fa fa-home\" aria-hidden=\"true\"></i> {{i18n .Lang \"common.home\"}}</a>\n                </div>\n                {{if gt .Member.MemberId 0}}\n                {{if eq .Model.RoleId 0 1 2}}\n                <div class=\"dropdown pull-left\" style=\"margin-right: 10px;\">\n                    <a href=\"{{urlfor \"DocumentController.Edit\" \":key\" .Model.Identify \":id\" \"\"}}\" class=\"btn btn-danger\"><i class=\"fa fa-edit\" aria-hidden=\"true\"></i> {{i18n .Lang \"blog.edit\"}}</a>\n                    {{if eq .Model.RoleId 0 1}}\n                    <a href=\"{{urlfor \"BookController.Users\" \":key\" .Model.Identify}}\" class=\"btn btn-success\"><i class=\"fa fa-user\" aria-hidden=\"true\"></i> {{i18n .Lang \"blog.member\"}}</a>\n                    <a href=\"{{urlfor \"BookController.Setting\" \":key\" .Model.Identify}}\" class=\"btn btn-primary\"><i class=\"fa fa-gear\" aria-hidden=\"true\"></i> {{i18n .Lang \"common.setting\"}}</a>\n                    {{end}}\n                </div>\n                {{end}}\n                {{end}}\n                {{if .Model.PrintState}}\n                <a href=\"javascript:window.print();\" id=\"printSinglePage\" class=\"btn btn-default\" style=\"margin-right: 10px;\"><i class=\"fa fa-print\"></i> {{i18n .Lang \"doc.print\"}}</a>\n                {{end}}\n                <div class=\"dropdown pull-right\" style=\"margin-right: 10px;\">\n                {{if eq .Model.PrivatelyOwned 0}}\n                {{if .Model.IsEnableShare}}\n                    <button type=\"button\" class=\"btn btn-success\" data-toggle=\"modal\" data-target=\"#shareProject\"><i class=\"fa fa-share-square\" aria-hidden=\"true\"></i> {{i18n .Lang \"doc.share\"}}</button>\n                {{end}}\n                {{end}}\n                </div>\n                {{if .Model.IsDownload}}\n                <div class=\"dropdown pull-right\" style=\"margin-right: 10px;\">\n                    <button type=\"button\" class=\"btn btn-primary\" data-toggle=\"dropdown\" aria-haspopup=\"true\" aria-expanded=\"false\">\n                        <i class=\"fa fa-cloud-download\" aria-hidden=\"true\"></i> {{i18n .Lang \"doc.download\"}} <span class=\"caret\"></span>\n                    </button>\n                    <ul class=\"dropdown-menu\" role=\"menu\" aria-labelledby=\"dLabel\" style=\"margin-top: -5px;\">\n                        <li><a href=\"{{urlfor \"DocumentController.Export\" \":key\" .Model.Identify \"output\" \"pdf\"}}\" target=\"_blank\">PDF</a> </li>\n                        <li><a href=\"{{urlfor \"DocumentController.Export\" \":key\" .Model.Identify \"output\" \"epub\"}}\" target=\"_blank\">EPUB</a> </li>\n                        <li><a href=\"{{urlfor \"DocumentController.Export\" \":key\" .Model.Identify \"output\" \"mobi\"}}\" target=\"_blank\">MOBI</a> </li>\n                        <li><a href=\"{{urlfor \"DocumentController.Export\" \":key\" .Model.Identify \"output\" \"docx\"}}\" target=\"_blank\">Word</a> </li>\n                        {{if eq .Model.Editor \"markdown\"}}\n                        <li><a href=\"{{urlfor \"DocumentController.Export\" \":key\" .Model.Identify \"output\" \"markdown\"}}\" target=\"_blank\">Markdown</a> </li>\n                        {{end}}\n                    </ul>\n                </div>\n                {{end}}\n            </div>\n        </div>\n    </header>\n    <article class=\"container-fluid manual-body\">\n        <div class=\"manual-left\">\n            <div class=\"manual-tab\">\n                <div class=\"tab-navg\">\n                    <span data-mode=\"view\" class=\"navg-item active\"><i class=\"fa fa-align-justify\"></i><b class=\"text\">{{i18n .Lang \"doc.contents\"}}</b></span>\n                    <span data-mode=\"search\" class=\"navg-item\"><i class=\"fa fa-search\"></i><b class=\"text\">{{i18n .Lang \"doc.search\"}}</b></span>\n                    <span id=\"handlerMenuShow\" style=\"float: right;display: inline-block;padding: 5px;cursor: pointer;\">\n                        <i class=\"fa fa-angle-left\" style=\"font-size: 20px;padding-right: 5px;\"></i>\n                        <span class=\"pull-right\" style=\"padding-top: 4px;\">{{i18n .Lang \"doc.expand\"}}</span>\n                    </span>\n                </div>\n                <div class=\"tab-util\">\n                    <span class=\"manual-fullscreen-switch\">\n                        <b class=\"open fa fa-angle-right\" title=\"{{i18n .Lang \"doc.expand\"}}\"></b>\n                        <b class=\"close fa fa-angle-left\" title=\"{{i18n .Lang \"doc.close\"}}\"></b>\n                    </span>\n                </div>\n                <div class=\"tab-wrap\">\n                    <div class=\"tab-item manual-catalog\">\n                        <div class=\"catalog-list read-book-preview\" id=\"sidebar\">\n                        {{.Result}}\n                        </div>\n\n                    </div>\n                    <div class=\"tab-item manual-search\">\n                        <div class=\"search-container\">\n                            <div class=\"search-form\">\n                                <form id=\"searchForm\" action=\"{{urlfor \"DocumentController.Search\" \":key\" .Model.Identify}}\" method=\"post\">\n                                    <div class=\"form-group\">\n                                        <input type=\"search\" placeholder=\"{{i18n .Lang \"message.search_placeholder\"}}\" class=\"form-control\" name=\"keyword\">\n                                        <button type=\"submit\" class=\"btn btn-default btn-search\" id=\"btnSearch\">\n                                            <i class=\"fa fa-search\"></i>\n                                        </button>\n                                    </div>\n                                </form>\n                            </div>\n                            <div class=\"search-result\">\n                                <div class=\"search-empty\">\n                                    <i class=\"fa fa-search-plus\" aria-hidden=\"true\"></i>\n                                    <b class=\"text\">{{i18n .Lang \"message.no_search_result\"}}</b>\n                                </div>\n                                <ul class=\"search-list\" id=\"searchList\">\n                                </ul>\n                            </div>\n                        </div>\n                    </div>\n                </div>\n            </div>\n            <div class=\"m-copyright\">\n                <p>\n                    <div id=\"view_count\">{{i18n .Lang \"doc.view_count\"}}：{{.ViewCount}}</div>\n                    {{i18n $.Lang \"doc.doc_publish_by\"}} <a href=\"https://www.iminho.me\" target=\"_blank\">MinDoc</a> {{i18n $.Lang \"doc.doc_publish\"}}\n                </p>\n            </div>\n        </div>\n        <div class=\"manual-right\">\n            <div class=\"manual-article\">\n                <div class=\"article-head\">\n                    <div class=\"container-fluid\">\n                        <div class=\"row\">\n                            <div class=\"col-md-2\">\n\n                            </div>\n                            <div class=\"col-md-8 text-center\">\n                                <h1 id=\"article-title\">{{.Title}}</h1>\n                            </div>\n                            <div class=\"col-md-2\">\n                            </div>\n                        </div>\n                    </div>\n                </div>\n                <div class=\"article-content\">\n                    <div class=\"article-body  {{if eq .Model.Editor \"markdown\"}}markdown-body editormd-preview-container{{else}}editor-content{{end}}\"  id=\"page-content\">\n                        {{.Content}}\n                    </div>\n\n                    {{if .Model.IsDisplayComment}}\n                    <div id=\"articleComment\" class=\"m-comment{{if .IS_DOCUMENT_INDEX}} not-show-comment{{end}}\">\n                        <!-- 评论列表 -->\n                        <div class=\"comment-list\" id=\"commentList\">\n                            {{range $i, $c := .Page.List}}\n                            <div class=\"comment-item\" data-id=\"{{$c.CommentId}}\">\n                                <p class=\"info\"><a class=\"name\">{{$c.Author}}</a><span class=\"date\">{{date $c.CommentDate \"Y-m-d H:i:s\"}}</span></p>\n                                <div class=\"content\">{{$c.Content}}</div>\n                                <p class=\"util\">\n                                    <span class=\"operate {{if eq $c.ShowDel 1}}toggle{{end}}\">\n                                        <span class=\"number\">{{$c.Index}}#</span>\n                                        {{if eq $c.ShowDel 1}}\n                                        <i class=\"delete e-delete glyphicon glyphicon-remove\" style=\"color:red\" onclick=\"onDelComment({{$c.CommentId}})\"></i>\n                                        {{end}}\n                                    </span>\n                                </p>\n                            </div>\n                            {{end}}\n                        </div>\n\n                        <!-- 翻页 -->\n                        <ul id=\"page\"></ul>\n\n                        <!-- 发表评论 -->\n                        <div class=\"comment-post\">\n                            <form class=\"form\" id=\"commentForm\" action=\"{{urlfor \"CommentController.Create\"}}\" method=\"post\">\n                                <label class=\"enter w-textarea textarea-full\">\n                                    <textarea class=\"textarea-input form-control\" name=\"content\" id=\"commentContent\" placeholder=\"文明上网，理性发言\" style=\"height: 72px;\"></textarea>\n                                    <input type=\"hidden\" name=\"doc_id\" id=\"doc_id\" value=\"{{.DocumentId}}\">\n                                </label>\n                                <div class=\"pull-right\">\n                                    <button class=\"btn btn-success btn-sm\" type=\"submit\" id=\"btnSubmitComment\" data-loading-text=\"提交中...\">提交评论</button>\n                                </div>\n                            </form>\n                        </div>\n                    </div>\n                    {{end}}\n\n                    <div class=\"jump-top\">\n                        <a href=\"javascript:;\" class=\"view-backtop\"><i class=\"fa fa-arrow-up\" aria-hidden=\"true\"></i></a>\n                    </div>\n                </div>\n\n            </div>\n        </div>\n        <div class=\"manual-progress\"><b class=\"progress-bar\"></b></div>\n    </article>\n    <div class=\"manual-mask\"></div>\n</div>\n{{if .Model.IsEnableShare}}\n<!-- 分享项目 -->\n<div class=\"modal fade\" id=\"shareProject\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"myModalLabel\" aria-hidden=\"true\">\n    <div class=\"modal-dialog\">\n        <div class=\"modal-content\">\n            <div class=\"modal-header\">\n                <button type=\"button\" class=\"close\" data-dismiss=\"modal\"><span aria-hidden=\"true\">&times;</span><span class=\"sr-only\">Close</span></button>\n                <h4 class=\"modal-title\" id=\"myModalLabel\">{{i18n .Lang \"doc.share_project\"}}</h4>\n            </div>\n            <div class=\"modal-body\">\n                <div class=\"row\">\n                    <div class=\"col-sm-12 text-center\" style=\"padding-bottom: 15px;\">\n                        <img src=\"{{urlfor \"DocumentController.QrCode\" \":key\" .Model.Identify}}\" alt=\"扫一扫手机阅读\" />\n                    </div>\n                </div>\n                <div class=\"form-group\">\n                    <label for=\"password\" class=\"col-sm-2 control-label\">{{i18n .Lang \"doc.share_url\"}}</label>\n                    <div class=\"col-sm-10\">\n                        <input type=\"text\" value=\"{{urlfor \"DocumentController.Index\" \":key\" .Model.Identify}}\" class=\"form-control\" onmouseover=\"this.select()\" id=\"projectUrl\" title=\"{{i18n .Lang \"doc.share_url\"}}\">\n                    </div>\n                    <div class=\"clearfix\"></div>\n                </div>\n            </div>\n            <div class=\"modal-footer\">\n                <button type=\"button\" class=\"btn btn-default\" data-dismiss=\"modal\">{{i18n .Lang \"doc.close\"}}</button>\n            </div>\n        </div>\n    </div>\n</div>\n{{end}}\n<!-- 下载项目 -->\n<div class=\"modal fade\" id=\"downloadBookModal\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"myModalLabel\" aria-hidden=\"true\">\n    <div class=\"modal-dialog\">\n        <div class=\"modal-content\">\n            <div class=\"modal-header\">\n                <button type=\"button\" class=\"close\" data-dismiss=\"modal\"><span aria-hidden=\"true\">&times;</span><span class=\"sr-only\">Close</span></button>\n                <h4 class=\"modal-title\" id=\"myModalLabel\">{{i18n .Lang \"doc.share_project\"}}</h4>\n            </div>\n            <div class=\"modal-body\">\n                <div class=\"row\">\n                    <div class=\"col-sm-12 text-center\" style=\"padding-bottom: 15px;\">\n                        <img src=\"{{urlfor \"DocumentController.QrCode\" \":key\" .Model.Identify}}\" alt=\"扫一扫手机阅读\" />\n                    </div>\n                </div>\n                <div class=\"form-group\">\n                    <label for=\"password\" class=\"col-sm-2 control-label\">{{i18n .Lang \"doc.share_url\"}}</label>\n                    <div class=\"col-sm-10\">\n                        <input type=\"text\" value=\"{{urlfor \"DocumentController.Index\" \":key\" .Model.Identify}}\" class=\"form-control\" onmouseover=\"this.select()\" id=\"projectUrl\" title=\"{{i18n .Lang \"doc.share_url\"}}\">\n                    </div>\n                    <div class=\"clearfix\"></div>\n                </div>\n            </div>\n            <div class=\"modal-footer\">\n                <button type=\"button\" class=\"btn btn-default\" data-dismiss=\"modal\">{{i18n .Lang \"doc.close\"}}</button>\n            </div>\n        </div>\n    </div>\n</div>\n\n<script src=\"{{cdnjs \"/static/jquery/1.12.4/jquery.min.js\"}}\"></script>\n<script src=\"{{cdnjs \"/static/bootstrap/js/bootstrap.min.js\"}}\"></script>\n<script src=\"{{cdnjs \"/static/bootstrap-paginator/bootstrap-paginator.min.js\"}}\"></script>\n<script src=\"{{cdnjs \"/static/js/jquery.form.js\"}}\" type=\"text/javascript\"></script>\n<script src=\"{{cdnjs \"/static/layer/layer.js\"}}\" type=\"text/javascript\"></script>\n<script src=\"{{cdnjs \"/static/jstree/3.3.4/jstree.min.js\"}}\" type=\"text/javascript\"></script>\n<script src=\"{{cdnjs \"/static/nprogress/nprogress.js\"}}\" type=\"text/javascript\"></script>\n<script src=\"{{cdnjs \"/static/editor.md/lib/highlight/highlight.js\"}}\" type=\"text/javascript\"></script>\n<script src=\"{{cdnjs \"/static/js/jquery.highlight.js\"}}\" type=\"text/javascript\"></script>\n<script src=\"{{cdnjs \"/static/js/clipboard.min.js\" \"version\"}}\" type=\"text/javascript\"></script>\n<script src=\"{{cdnjs \"/static/prismjs/prismjs.js\"}}\" type=\"text/javascript\"></script>\n<script src=\"{{cdnjs \"/static/js/kancloud.js\" \"version\"}}\" type=\"text/javascript\"></script>\n<script src=\"{{cdnjs \"/static/js/splitbar.js\" \"version\"}}\" type=\"text/javascript\"></script>\n<script src=\"{{cdnjs \"/static/js/custom-elements-builtin-0.6.5.min.js\"}}\" type=\"text/javascript\"></script>\n<script src=\"{{cdnjs \"/static/js/x-frame-bypass-1.0.2.js\"}}\" type=\"text/javascript\"></script>\n<script type=\"text/javascript\">\n$(function () {\n    $(\"#searchList\").on(\"click\",\"a\",function () {\n        var id = $(this).attr(\"data-id\");\n        var url = \"{{urlfor \"DocumentController.Read\" \":key\" .Model.Identify \":id\" \"\"}}/\" + id;\n        $(this).parent(\"li\").siblings().find(\"a\").removeClass(\"active\");\n        $(this).addClass(\"active\");\n        loadDocument(url,id,function (body) {\n            return $(body).highlight(window.keyword);\n        });\n    });\n\n    window.menuControl = true;\n    window.foldSetting = '{{.FoldSetting}}';\n    if (foldSetting == 'open' || foldSetting == 'first') {\n        $('#handlerMenuShow').find('span').text('{{i18n .Lang \"doc.fold\"}}');\n        $('#handlerMenuShow').find('i').attr(\"class\",\"fa fa-angle-down\");\n        if (foldSetting == 'open') {\n            window.jsTree.jstree().open_all();\n        }\n        if (foldSetting == 'first') {\n            window.jsTree.jstree('close_all');\n            var $target = $('.jstree-container-ul').children('li').filter(function(index){\n                if($(this).attr('aria-expanded')==false||$(this).attr('aria-expanded')){\n                    return $(this);\n                }else{\n                    delete $(this);\n                }\n            });\n            $target.children('i').trigger('click');\n        }\n    } else {\n        menuControl = false;\n        window.jsTree.jstree('close_all');\n    }\n    $('#handlerMenuShow').on('click', function(){\n        if(menuControl){\n            $(this).find('span').text('{{i18n .Lang \"doc.expand\"}}');\n            $(this).find('i').attr(\"class\",\"fa fa-angle-left\");\n            window.menuControl = false;\n            window.jsTree.jstree('close_all');\n        }else{\n            window.menuControl = true\n            $(this).find('span').text('{{i18n .Lang \"doc.fold\"}}');\n            $(this).find('i').attr(\"class\",\"fa fa-angle-down\");\n            window.jsTree.jstree().open_all();\n        }\n    });\n\n    if (!window.IS_DOCUMENT_INDEX && IS_DISPLAY_COMMENT) {\n        pageClicked(-1, parseInt($('#doc_id').val()));\n    }\n});\n</script>\n{{.Scripts}}\n</body>\n</html>"
  },
  {
    "path": "views/document/document_password.tpl",
    "content": "<!DOCTYPE html>\n<html lang=\"zh-cn\">\n<head>\n    <meta charset=\"utf-8\">\n    <link rel=\"shortcut icon\" href=\"{{cdnimg \"favicon.ico\"}}\">\n    <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge,chrome=1\" />\n    <meta name=\"renderer\" content=\"webkit\" />\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n    <title>{{i18n .Lang \"doc.input_pwd\"}} - Powered by MinDoc</title>\n    <script src=\"{{cdnjs \"static/jquery/1.12.4/jquery.min.js\"}}\"></script>\n    <script src=\"{{cdnjs \"static/js/jquery.form.js\"}}\"></script>\n    <style type=\"text/css\">\n    body{ background: #f2f2f2;}\n    .d_button{ cursor: pointer;}\n    @media(min-width : 450px){\n        .auth_form{\n            width: 400px;\n            border: 1px solid #ccc;\n            background-color: #fff;\n            position: absolute;\n            top: 20%;\n            left: 50%;\n            margin-left: -220px;\n            padding: 20px;\n        }\n    .tit{\n        font-size: 18px;\n    }\n        .inp{\n            height: 30px;\n            width: 387px;\n            font-size: 14px;\n            padding: 5px;\n        }\n        .btn{\n            margin-top: 10px;\n            float: right;\n        }\n    }\n    @media(max-width : 449px){\n        body{\n            margin: 0 auto;\n        }\n    .auth_form{\n        background-color: #fff;\n        border-top: 1px solid #ccc;\n        border-bottom: 1px solid #ccc;\n        width: 100%;\n        margin-top: 40px;\n    }\n        .shell{\n            width: 90%;\n            margin: 10px auto;\n        }\n        .tit{\n            font-size: 18px;\n        }\n        .inp{\n            height: 30px;\n            width: 96.5%;\n            font-size: 14px;\n            padding: 5px;\n        }\n        .btn{\n            margin-top: 10px;\n            float: right;\n        }\n    }\n    .clear{\n        clear: both;\n    }\n    .button {\n        color: #fff;\n        background-color: #428bca;\n        border-radius: 4px;\n        display: inline-block;\n        padding: 6px 12px;\n        margin-bottom: 0;\n        font-size: 14px;\n        font-weight: 400;\n        line-height: 1.42857143;\n        text-align: center;\n        white-space: nowrap;\n        vertical-align: middle;\n        -ms-touch-action: manipulation;\n        touch-action: manipulation;\n        cursor: pointer;\n        -webkit-user-select: none;\n        -moz-user-select: none;\n        -ms-user-select: none;\n        user-select: none;\n        border: 1px solid #357ebd;\n    }\n    </style>\n    <script type=\"text/javascript\">\n        window.IS_ENABLE_IFRAME = '{{conf \"enable_iframe\" }}' === 'true';\n        window.BASE_URL = '{{urlfor \"HomeController.Index\" }}';\n    </script>\n</head>\n<body>\n<div class=\"auth_form\">\n<div class=\"shell\">\n        <form action=\"{{urlfor \"DocumentController.CheckPassword\" \":key\" .Identify}}\" method=\"post\" id=\"auth_form\">\n            <div class=\"tit\">{{i18n .Lang \"doc.input_pwd\"}}</div>\n            <div style=\"margin-top: 10px;\">\n                <input type=\"password\" name=\"bPassword\" placeholder=\"{{i18n .Lang \"doc.read_pwd\"}}\" class=\"inp\"/>\n            </div>\n            <div class=\"btn\">\n                <span id=\"error\" style=\"color: #919191; font-size: 13px;\"></span>\n                <input type=\"submit\" value=\"{{i18n .Lang \"doc.commit\"}}\" class=\"button\"/>\n            </div>\n            <div class=\"clear\"></div>\n        </form>\n</div>\n</div>\n<script src=\"{{cdnjs \"/static/js/custom-elements-builtin-0.6.5.min.js\"}}\" type=\"text/javascript\"></script>\n<script src=\"{{cdnjs \"/static/js/x-frame-bypass-1.0.2.js\"}}\" type=\"text/javascript\"></script>\n<script type=\"text/javascript\">\n$(\"#auth_form\").ajaxForm({\n    beforeSerialize: function () {\n        var pwd = $(\"#auth_form input[name='bPassword']\").val();\n        if (pwd === \"\") {\n            $(\"#error\").html(\"{{i18n .Lang \"doc.input_pwd\"}}\");\n            return false;\n        }\n    },\n    dataType: \"json\",\n    success: function (res) {\n        if (res.errcode === 0) {\n            window.location.reload();\n        } else {\n            $(\"#auth_form input[name='password']\").val(\"\").focus();\n            $(\"#error\").html(res.message);\n        }\n    }\n});\n</script>\n</body>\n</html>"
  },
  {
    "path": "views/document/export.tpl",
    "content": "<!DOCTYPE html>\n<html lang=\"zh-CN\">\n<head>\n    <meta charset=\"utf-8\"/>\n    <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\"/>\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1, user-scalable=no\"/>\n    <title>{{.Model.BookName}} - Powered by MinDoc</title>\n    <link href=\"styles/css/kancloud.css\" rel=\"stylesheet\">\n    <link href=\"styles/editor.md/css/editormd.preview.css\" rel=\"stylesheet\"/>\n    <link href=\"styles/css/markdown.preview.css\" rel=\"stylesheet\"/>\n    <link href=\"styles/css/github.css\" rel=\"stylesheet\"/>\n    <link href=\"styles/css/export.css\" rel=\"stylesheet\"/>\n    <link href=\"styles/font-awesome/css/font-awesome.css\" />\n</head>\n\n<body>\n    <h1 class=\"article-title\">{{.Lists.DocumentName}}</h1>\n    <div class=\"article-body markdown-body editormd-preview-container\"  id=\"page-content\">\n    {{str2html .Lists.Release}}\n    </div>\n</body>\n</html>"
  },
  {
    "path": "views/document/froala_edit_template.tpl",
    "content": "<!DOCTYPE html>\n<html lang=\"zh-CN\">\n\n<head>\n  <meta charset=\"utf-8\">\n  <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n  <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n  <title>{{i18n .Lang \"doc.edit_doc\"}} - Powered by MinDoc</title>\n  <style type=\"text/css\">\n  .w-e-menu.selected>i {\n    color: #44B036 !important;\n  }\n  </style>\n  <script type=\"text/javascript\">\n  window.IS_ENABLE_IFRAME = '{{conf \"enable_iframe\" }}' === 'true';\n  window.BASE_URL = '{{urlfor \"HomeController.Index\" }}';\n  </script>\n    <script type=\"text/javascript\">\n        window.editor = null;\n        window.imageUploadURL = \"{{urlfor \"DocumentController.Upload\" \"identify\" .Model.Identify}}\";\n        window.fileUploadURL = \"{{urlfor \"DocumentController.Upload\" \"identify\" .Model.Identify}}\";\n        window.documentCategory = {{.Result}};\n        window.book = {{.ModelResult}};\n        window.selectNode = null;\n        window.deleteURL = \"{{urlfor \"DocumentController.Delete\" \":key\" .Model.Identify}}\";\n        window.editURL = \"{{urlfor \"DocumentController.Content\" \":key\" .Model.Identify \":id\" \"\"}}\";\n        window.releaseURL = \"{{urlfor \"BookController.Release\" \":key\" .Model.Identify}}\";\n        window.sortURL = \"{{urlfor \"BookController.SaveSort\" \":key\" .Model.Identify}}\";\n        window.baiduMapKey = \"{{.BaiDuMapKey}}\";\n        window.historyURL = \"{{urlfor \"DocumentController.History\"}}\";\n        window.removeAttachURL = \"{{urlfor \"DocumentController.RemoveAttachment\"}}\";\n        window.vueApp = null;\n        window.lang = {{i18n $.Lang \"common.js_lang\"}};\n    </script>\n  <!-- Bootstrap -->\n  <link href=\"{{cdncss \"/static/bootstrap/css/bootstrap.min.css\"}}\" rel=\"stylesheet\">\n  <link href=\"{{cdncss \"/static/font-awesome/css/font-awesome.min.css\"}}\" rel=\"stylesheet\">\n  <link href=\"{{cdncss \"/static/jstree/3.3.4/themes/default/style.min.css\"}}\" rel=\"stylesheet\">\n  <link href=\"{{cdncss (print \"/static/editor.md/lib/highlight/styles/\" .HighlightStyle \".css\") \"version\"}}\" rel=\"stylesheet\">\n  <link href=\"{{cdncss \"/static/webuploader/webuploader.css\"}}\" rel=\"stylesheet\">\n  <link href=\"{{cdncss \"/static/css/jstree.css\"}}\" rel=\"stylesheet\">\n  <link href=\"{{cdncss \"/static/css/markdown.css\"}}\" rel=\"stylesheet\">\n\n  <link rel=\"stylesheet\" href=\"/static/froala/css/codemirror.min.css\">\n\n  <link rel=\"stylesheet\" href=\"/static/froala/css/froala_editor.min.css\">\n  <link rel=\"stylesheet\" href=\"/static/froala/css/froala_style.min.css\">\n  <link rel=\"stylesheet\" href=\"/static/froala/css/plugins/code_view.css\">\n  <link rel=\"stylesheet\" href=\"/static/froala/css/plugins/draggable.css\">\n  <link rel=\"stylesheet\" href=\"/static/froala/css/plugins/colors.css\">\n  <link rel=\"stylesheet\" href=\"/static/froala/css/plugins/emoticons.css\">\n  <link rel=\"stylesheet\" href=\"/static/froala/css/plugins/image_manager.css\">\n  <link rel=\"stylesheet\" href=\"/static/froala/css/plugins/image.css\">\n  <link rel=\"stylesheet\" href=\"/static/froala/css/plugins/line_breaker.css\">\n  <link rel=\"stylesheet\" href=\"/static/froala/css/plugins/table.css\">\n  <link rel=\"stylesheet\" href=\"/static/froala/css/plugins/char_counter.css\">\n  <link rel=\"stylesheet\" href=\"/static/froala/css/plugins/video.css\">\n  <link rel=\"stylesheet\" href=\"/static/froala/css/plugins/fullscreen.css\">\n  <link rel=\"stylesheet\" href=\"/static/froala/css/plugins/file.css\">\n  <link rel=\"stylesheet\" href=\"/static/froala/css/plugins/quick_insert.css\">\n  <link rel=\"stylesheet\" href=\"/static/froala/css/plugins/help.css\">\n  <!-- <link rel=\"stylesheet\" href=\"/static/froala/css/third_party/spell_checker.css\"> -->\n  <link rel=\"stylesheet\" href=\"/static/froala/css/plugins/special_characters.css\">\n\n</head>\n\n<body>\n  <div class=\"m-manual manual-editor\">\n\n    <div class=\"manual-body\">\n      <div class=\"manual-category\" id=\"manualCategory\" style=\"top: 0;\">\n        <div class=\"manual-nav\">\n          <div class=\"nav-item active\"><i class=\"fa fa-bars\" aria-hidden=\"true\"></i> {{i18n .Lang \"doc.document\"}}</div>\n          <div class=\"nav-plus pull-right\" data-toggle=\"tooltip\" data-title=\"{{i18n .Lang \"doc.backward\"}}\" data-direction=\"right\">\n            <a style=\"color: #999999;\" href=\"{{urlfor \"BookController.Dashboard\" \":key\" .Model.Identify}}\" target=\"_blank\"><i class=\"fa fa-chevron-left\" aria-hidden=\"true\"></i></a>\n          </div>\n          <div class=\"nav-plus pull-right\" id=\"btnAddDocument\" data-toggle=\"tooltip\" data-title=\"{{i18n .Lang \"doc.create_doc\"}}\" data-direction=\"right\"><i class=\"fa fa-plus\" aria-hidden=\"true\"></i></div>\n          <div class=\"clearfix\"></div>\n        </div>\n        <div class=\"manual-tree\" id=\"sidebar\">\n        </div>\n      </div>\n      <div class=\"manual-editor-container\" id=\"manualEditorContainer\" style=\"top: 0;\">\n          <div class=\"manual-wangEditor\">\n              <div id=\"froalaEditor\" class=\"manual-editormd-active\" style=\"height: 100%\"></div>\n          </div>\n        <div class=\"manual-editor-status\">\n          <div id=\"attachInfo\" class=\"item\" style=\"display: inline-block; padding: 0 3em;\">0 {{i18n .Lang \"doc.attachments\"}}</div>\n        </div>\n      </div>\n    </div>\n  </div>\n  <!-- Modal -->\n  <div class=\"modal fade\" id=\"addDocumentModal\" tabindex=\"-1\" style=\"z-index: 10001 !important;\" role=\"dialog\" aria-labelledby=\"addDocumentModalLabel\">\n    <div class=\"modal-dialog\" role=\"document\">\n      <form method=\"post\" action=\"{{urlfor \"DocumentController.Create\" \":key\" .Model.Identify}}\" id=\"addDocumentForm\" class=\"form-horizontal\">\n        <input type=\"hidden\" name=\"identify\" value=\"{{.Model.Identify}}\">\n        <input type=\"hidden\" name=\"doc_id\" value=\"0\">\n        <input type=\"hidden\" name=\"parent_id\" value=\"0\">\n        <div class=\"modal-content\">\n          <div class=\"modal-header\">\n            <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\"><span aria-hidden=\"true\">&times;</span></button>\n            <h4 class=\"modal-title\" id=\"myModalLabel\">{{i18n .Lang \"doc.create_doc\"}}</h4>\n          </div>\n          <div class=\"modal-body\">\n            <div class=\"form-group\">\n              <label class=\"col-sm-2 control-label\">{{i18n .Lang \"doc.doc_name\"}} <span class=\"error-message\">*</span></label>\n              <div class=\"col-sm-10\">\n                <input type=\"text\" name=\"doc_name\" id=\"documentName\" placeholder=\"{{i18n .Lang \"doc.doc_name\"}}\" class=\"form-control\" maxlength=\"50\">\n                <p style=\"color: #999;font-size: 12px;\">{{i18n .Lang \"doc.doc_name_tips\"}}</p>\n              </div>\n            </div>\n            <div class=\"form-group\">\n              <label class=\"col-sm-2 control-label\">{{i18n .Lang \"doc.doc_id\"}}</label>\n              <div class=\"col-sm-10\">\n                <input type=\"text\" name=\"doc_identify\" id=\"documentIdentify\" placeholder=\"{{i18n .Lang \"doc.doc_id\"}}\" class=\"form-control\" maxlength=\"50\">\n                <p style=\"color: #999;font-size: 12px;\">{{i18n .Lang \"doc.doc_id_tips\"}}</p>\n              </div>\n            </div>\n          </div>\n          <div class=\"modal-footer\">\n            <span id=\"add-error-message\" class=\"error-message\"></span>\n            <button type=\"button\" class=\"btn btn-default\" data-dismiss=\"modal\">{{i18n .Lang \"common.cancel\"}}</button>\n            <button type=\"submit\" class=\"btn btn-primary\" id=\"btnSaveDocument\" data-loading-text=\"{{i18n .Lang \"message.processing\"}}\">{{i18n .Lang \"doc.save\"}}</button>\n          </div>\n        </div>\n      </form>\n    </div>\n  </div>\n  <div class=\"modal fade\" id=\"uploadAttachModal\" tabindex=\"-1\" style=\"z-index: 10001 !important;\" role=\"dialog\" aria-labelledby=\"uploadAttachModalLabel\">\n    <div class=\"modal-dialog\" role=\"document\">\n      <form method=\"post\" action=\"{{urlfor \"DocumentController.Create\" \":key\" .Model.Identify}}\" id=\"addDocumentForm\" class=\"form-horizontal\">\n        <input type=\"hidden\" name=\"identify\" value=\"{{.Model.Identify}}\">\n        <input type=\"hidden\" name=\"doc_id\" value=\"0\">\n        <input type=\"hidden\" name=\"parent_id\" value=\"0\">\n        <div class=\"modal-content\">\n          <div class=\"modal-header\">\n            <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\"><span aria-hidden=\"true\">&times;</span></button>\n            <h4 class=\"modal-title\" id=\"myModalLabel\">{{i18n .Lang \"doc.upload_attachment\"}}</h4>\n          </div>\n          <div class=\"modal-body\">\n            <div class=\"attach-drop-panel\">\n              <div class=\"upload-container\" id=\"filePicker\"><i class=\"fa fa-upload\" aria-hidden=\"true\"></i></div>\n            </div>\n            <div class=\"attach-list\" id=\"attachList\">\n              <template v-for=\"item in lists\">\n                <div class=\"attach-item\" :id=\"item.attachment_id\">\n                  <template v-if=\"item.state == 'wait'\">\n                    <div class=\"progress\">\n                      <div class=\"progress-bar progress-bar-success\" role=\"progressbar\" aria-valuenow=\"40\" aria-valuemin=\"0\" aria-valuemax=\"100\">\n                        <span class=\"sr-only\">0% Complete (success)</span>\n                      </div>\n                    </div>\n                  </template>\n                  <template v-else-if=\"item.state == 'error'\">\n                    <span class=\"error-message\">${item.message}</span>\n                    <button type=\"button\" class=\"btn btn-sm close\" @click=\"removeAttach(item.attachment_id)\">\n                      <i class=\"fa fa-remove\" aria-hidden=\"true\"></i>\n                    </button>\n                  </template>\n                  <template v-else>\n                    <a :href=\"item.http_path\" target=\"_blank\" :title=\"item.file_name\">${item.file_name}</a>\n                    <span class=\"text\">(${(item.file_size/1024/1024).toFixed(4)}MB)</span>\n                    <span class=\"error-message\">${item.message}</span>\n                    <button type=\"button\" class=\"btn btn-sm close\" @click=\"removeAttach(item.attachment_id)\">\n                      <i class=\"fa fa-remove\" aria-hidden=\"true\"></i>\n                    </button>\n                    <div class=\"clearfix\"></div>\n                  </template>\n                </div>\n              </template>\n            </div>\n          </div>\n          <div class=\"modal-footer\">\n            <span id=\"add-error-message\" class=\"error-message\"></span>\n            <button type=\"button\" class=\"btn btn-default\" data-dismiss=\"modal\">{{i18n .Lang \"common.cancel\"}}</button>\n            <button type=\"button\" class=\"btn btn-primary\" id=\"btnUploadAttachFile\" data-dismiss=\"modal\">{{i18n .Lang \"common.confirm\"}}</button>\n          </div>\n        </div>\n      </form>\n    </div>\n  </div>\n  <!-- <script src=\"https://cdn.jsdelivr.net/npm/i18next/i18next.min.js\"></script> -->\n  <script src=\"{{cdnjs \"/static/jquery/1.12.4/jquery.min.js\"}}\"></script>\n  <script src=\"{{cdnjs \"/static/bootstrap/js/bootstrap.min.js\"}}\"></script>\n  <script src=\"{{cdnjs \"/static/vuejs/vue.min.js\"}}\" type=\"text/javascript\"></script>\n  <script src=\"{{cdnjs \"/static/jstree/3.3.4/jstree.min.js\"}}\" type=\"text/javascript\"></script>\n  <script src=\"{{cdnjs \"/static/webuploader/webuploader.min.js\"}}\" type=\"text/javascript\"></script>\n  <script src=\"{{cdnjs \"/static/js/class2browser.js\"}}\" type=\"text/javascript\"></script>\n<!--   <script src=\"{{cdnjs \"/static/wangEditor/wangEditor.min.js\"}}\" type=\"text/javascript\"></script>\n  <script src=\"{{cdnjs \"/static/js/wangEditor-plugins/save-menu.js\"}}\" type=\"text/javascript\"></script>\n  <script src=\"{{cdnjs \"/static/js/wangEditor-plugins/release-menu.js\"}}\" type=\"text/javascript\"></script>\n  <script src=\"{{cdnjs \"/static/js/wangEditor-plugins/attach-menu.js\"}}\" type=\"text/javascript\"></script>\n  <script src=\"{{cdnjs \"/static/js/wangEditor-plugins/history-menu.js\"}}\" type=\"text/javascript\"></script> -->\n  <script src=\"{{cdnjs \"/static/layer/layer.js\"}}\" type=\"text/javascript\"></script>\n  <script src=\"{{cdnjs \"/static/to-markdown/dist/to-markdown.js\"}}\" type=\"text/javascript\"></script>\n  <script src=\"{{cdnjs \"/static/js/jquery.form.js\"}}\" type=\"text/javascript\"></script>\n  <script src=\"{{cdnjs \"/static/js/editor.js\"}}\" type=\"text/javascript\"></script>\n  <script src=\"{{cdnjs \"/static/js/froala-editor.js\"}}\" type=\"text/javascript\"></script>\n  <script src=\"{{cdnjs \"/static/js/custom-elements-builtin-0.6.5.min.js\"}}\" type=\"text/javascript\"></script>\n  <script src=\"{{cdnjs \"/static/js/x-frame-bypass-1.0.2.js\"}}\" type=\"text/javascript\"></script>\n\n  <script type=\"text/javascript\" src=\"/static/froala/js/froala_editor.min.js\"></script>\n  <script type=\"text/javascript\" src=\"/static/froala/js/plugins/align.min.js\"></script>\n  <script type=\"text/javascript\" src=\"/static/froala/js/plugins/char_counter.min.js\"></script>\n  <script type=\"text/javascript\" src=\"/static/froala/js/plugins/code_beautifier.min.js\"></script>\n  <script type=\"text/javascript\" src=\"/static/froala/js/plugins/code_view.min.js\"></script>\n  <script type=\"text/javascript\" src=\"/static/froala/js/plugins/colors.min.js\"></script>\n  <script type=\"text/javascript\" src=\"/static/froala/js/plugins/draggable.min.js\"></script>\n  <script type=\"text/javascript\" src=\"/static/froala/js/plugins/emoticons.min.js\"></script>\n  <script type=\"text/javascript\" src=\"/static/froala/js/plugins/entities.min.js\"></script>\n  <script type=\"text/javascript\" src=\"/static/froala/js/plugins/file.min.js\"></script>\n  <script type=\"text/javascript\" src=\"/static/froala/js/plugins/font_size.min.js\"></script>\n  <script type=\"text/javascript\" src=\"/static/froala/js/plugins/font_family.min.js\"></script>\n  <script type=\"text/javascript\" src=\"/static/froala/js/plugins/fullscreen.min.js\"></script>\n  <script type=\"text/javascript\" src=\"/static/froala/js/plugins/image.min.js\"></script>\n  <script type=\"text/javascript\" src=\"/static/froala/js/plugins/image_manager.min.js\"></script>\n  <script type=\"text/javascript\" src=\"/static/froala/js/plugins/line_breaker.min.js\"></script>\n  <script type=\"text/javascript\" src=\"/static/froala/js/plugins/inline_style.min.js\"></script>\n  <script type=\"text/javascript\" src=\"/static/froala/js/plugins/link.min.js\"></script>\n  <script type=\"text/javascript\" src=\"/static/froala/js/plugins/lists.min.js\"></script>\n  <script type=\"text/javascript\" src=\"/static/froala/js/plugins/paragraph_format.min.js\"></script>\n  <script type=\"text/javascript\" src=\"/static/froala/js/plugins/paragraph_style.min.js\"></script>\n  <script type=\"text/javascript\" src=\"/static/froala/js/plugins/quick_insert.min.js\"></script>\n  <script type=\"text/javascript\" src=\"/static/froala/js/plugins/quote.min.js\"></script>\n  <script type=\"text/javascript\" src=\"/static/froala/js/plugins/table.min.js\"></script>\n  <script type=\"text/javascript\" src=\"/static/froala/js/plugins/save.min.js\"></script>\n  <script type=\"text/javascript\" src=\"/static/froala/js/plugins/url.min.js\"></script>\n  <script type=\"text/javascript\" src=\"/static/froala/js/plugins/video.min.js\"></script>\n  <script type=\"text/javascript\" src=\"/static/froala/js/plugins/help.min.js\"></script>\n  <script type=\"text/javascript\" src=\"/static/froala/js/plugins/print.min.js\"></script>\n  <!-- <script type=\"text/javascript\" src=\"/static/froala/js/third_party/spell_checker.min.js\"></script> -->\n  <script type=\"text/javascript\" src=\"/static/froala/js/plugins/special_characters.min.js\"></script>\n  <script type=\"text/javascript\" src=\"/static/froala/js/plugins/word_paste.min.js\"></script>\n  <script src=\"/static/froala/js/languages/zh_cn.js\"></script>\n\n  <script type=\"text/javascript\">\n  $(function() {\n    lang = {{ i18n $.Lang \"common.js_lang\" }};\n    $(\"#attachInfo\").on(\"click\", function() {\n      $(\"#uploadAttachModal\").modal(\"show\");\n    });\n\n    window.uploader = null;\n\n    $(\"#uploadAttachModal\").on(\"shown.bs.modal\", function() {\n      if (window.uploader === null) {\n        try {\n          window.uploader = WebUploader.create({\n            auto: true,\n            dnd: true,\n            swf: '{{.BaseUrl}}/static/webuploader/Uploader.swf',\n            server: '{{urlfor \"DocumentController.Upload\"}}',\n            formData: { \"identify\": {{.Model.Identify }}, \"doc_id\": window.selectNode.id },\n            pick: \"#filePicker\",\n            fileVal: \"editormd-file-file\",\n            fileNumLimit: 1,\n            compress: false\n          }).on(\"beforeFileQueued\", function(file) {\n            uploader.reset();\n          }).on('fileQueued', function(file) {\n            var item = {\n              state: \"wait\",\n              attachment_id: file.id,\n              file_size: file.size,\n              file_name: file.name,\n              message: \"{{i18n .Lang \"              doc.uploading \"}}\"\n            };\n            window.vueApp.lists.splice(0, 0, item);\n\n          }).on(\"uploadError\", function(file, reason) {\n            for (var i in window.vueApp.lists) {\n              var item = window.vueApp.lists[i];\n              if (item.attachment_id == file.id) {\n                item.state = \"error\";\n                item.message = \"{{i18n .Lang \"                message.upload_failed \"}}:\" + reason;\n                break;\n              }\n            }\n\n          }).on(\"uploadSuccess\", function(file, res) {\n\n            for (var index in window.vueApp.lists) {\n              var item = window.vueApp.lists[index];\n              if (item.attachment_id === file.id) {\n                if (res.errcode === 0) {\n                  window.vueApp.lists.splice(index, 1, res.attach);\n                } else {\n                  item.message = res.message;\n                  item.state = \"error\";\n                }\n                break;\n              }\n            }\n\n          }).on(\"beforeFileQueued\", function(file) {\n\n          }).on(\"uploadComplete\", function() {\n\n          }).on(\"uploadProgress\", function(file, percentage) {\n            var $li = $('#' + file.id),\n              $percent = $li.find('.progress .progress-bar');\n\n            $percent.css('width', percentage * 100 + '%');\n          });\n        } catch (e) {\n          console.log(e);\n        }\n      }\n    });\n  });\n\n  </script>\n</body>\n\n</html>"
  },
  {
    "path": "views/document/history.tpl",
    "content": "\n<!DOCTYPE html>\n<html lang=\"zh-cn\">\n<head>\n    <meta charset=\"utf-8\">\n    <link rel=\"shortcut icon\" href=\"{{cdnimg \"/static/favicon.ico\"}}\">\n    <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge,chrome=1\" />\n    <meta name=\"renderer\" content=\"webkit\" />\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n    <meta name=\"author\" content=\"SmartWiki\" />\n    <title>{{i18n .Lang \"doc.his_ver\"}} - Powered by MinDoc</title>\n\n    <!-- Bootstrap -->\n    <link href=\"{{cdncss \"/static/bootstrap/css/bootstrap.min.css\"}}\" rel=\"stylesheet\">\n\n    <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->\n    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->\n    <!--[if lt IE 9]>\n    <script src=\"/static/html5shiv/3.7.3/html5shiv.min.js\"></script>\n    <script src=\"/static/respond.js/1.4.2/respond.min.js\"></script>\n    <![endif]-->\n    <!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->\n    <script src=\"{{cdnjs \"/static/jquery/1.12.4/jquery.min.js\"}}\"></script>\n    <style type=\"text/css\">\n        .container{margin: 5px auto;}\n    </style>\n</head>\n<body>\n<div class=\"container\">\n    <div class=\"table-responsive\">\n        <table class=\"table table-hover\">\n            <thead>\n            <tr>\n                <td>#</td>\n                <td class=\"col-sm-6\">{{i18n .Lang \"doc.update_time\"}}</td>\n                <td class=\"col-sm-2\">{{i18n .Lang \"doc.updater\"}}</td>\n                <td class=\"col-sm=2\">{{i18n .Lang \"doc.version\"}}</td>\n                <td class=\"col-sm-2\">{{i18n .Lang \"doc.operation\"}}</td>\n            </tr>\n            </thead>\n            <tbody>\n            {{range $index,$item := .List}}\n            <tr>\n                <td>{{$item.HistoryId}}</td>\n                <td>{{date_format $item.ModifyTime \"2006-01-02 15:04:05\"}}</td>\n                <td>{{$item.ModifyName}}</td>\n                <td>{{$item.Version}}</td>\n                <td>\n                    <button class=\"btn btn-danger btn-sm delete-btn\" data-id=\"{{$item.HistoryId}}\" data-loading-text=\"{{i18n $.Lang \"message.processing\"}}\">\n                        {{i18n $.Lang \"doc.delete\"}}\n                    </button>\n                    <button class=\"btn btn-success btn-sm restore-btn\" data-id=\"{{$item.HistoryId}}\" data-loading-text=\"{{i18n $.Lang \"message.processing\"}}\">\n                        {{i18n $.Lang \"doc.recover\"}}\n                    </button>\n                    {{if eq $.Model.Editor \"markdown\"}}\n                    <button class=\"btn btn-success btn-sm compare-btn\" data-id=\"{{$item.HistoryId}}\">\n                        {{i18n $.Lang \"doc.merge\"}}\n                    </button>\n                    {{end}}\n                </td>\n            </tr>\n            {{else}}\n            <tr>\n                <td colspan=\"6\" class=\"text-center\">暂无数据</td>\n            </tr>\n            {{end}}\n            </tbody>\n        </table>\n    </div>\n    <nav>\n        {{.PageHtml}}\n    </nav>\n</div>\n<!-- Include all compiled plugins (below), or include individual files as needed -->\n<script src=\"{{cdnjs \"/static/bootstrap/js/bootstrap.min.js\"}}\"></script>\n<script src=\"{{cdnjs \"/static/layer/layer.js\"}}\" type=\"text/javascript\" ></script>\n<script type=\"text/javascript\">\n    $(function () {\n        $(\".delete-btn\").on(\"click\",function () {\n            var id = $(this).attr('data-id');\n            var $btn = $(this).button('loading');\n            var $then = $(this);\n\n            if(!id){\n                layer.msg('{{i18n .Lang \"message.param_error\"}}');\n            }else{\n                $.ajax({\n                    url : \"{{urlfor \"DocumentController.DeleteHistory\"}}\",\n                    type : \"post\",\n                    dataType : \"json\",\n                    data : { \"identify\" : \"{{.Model.Identify}}\",\"doc_id\" : \"{{.Document.DocumentId}}\" ,\"history_id\" : id },\n                    success :function (res) {\n                        if(res.errcode === 0){\n                            $then.parents('tr').remove().empty();\n                        }else{\n                            layer.msg(res.message);\n                        }\n                    },\n                    error : function () {\n                        $btn.button('reset');\n                    }\n                })\n            }\n        });\n\n        $(\".restore-btn\").on(\"click\",function () {\n            var id = $(this).attr('data-id');\n            var $btn = $(this).button('loading');\n            var $then = $(this);\n            var index = parent.layer.getFrameIndex(window.name);\n\n            if(!id){\n                layer.msg('{{i18n .Lang \"message.param_error\"}}');\n            }else{\n                $.ajax({\n                    url : \"{{urlfor \"DocumentController.RestoreHistory\"}}\",\n                    type : \"post\",\n                    dataType : \"json\",\n                    data : { \"identify\" : \"{{.Model.Identify}}\",\"doc_id\" : \"{{.Document.DocumentId}}\" ,\"history_id\" : id },\n                    success :function (res) {\n                        if(res.errcode === 0){\n                            var $node = { \"node\" : { \"id\" : res.data.doc_id}};\n\n                            parent.loadDocument($node);\n                            parent.layer.close(index);\n                        }else{\n                            layer.msg(res.message);\n                        }\n                    },\n                    error : function () {\n                        $btn.button('reset');\n                    }\n                })\n            }\n        });\n        $(\".compare-btn\").on(\"click\",function () {\n            var historyId = $(this).attr(\"data-id\");\n\n            window.compareIndex = window.top.layer.open({\n                type: 2,\n                title: '{{i18n .Lang \"doc.comparison_title\"}}',\n                shade: 0.8,\n                area: ['380px', '90%'],\n                content: \"{{urlfor \"DocumentController.Compare\" \":key\" .Model.Identify \":id\" \"\"}}\" + historyId\n            });\n            window.top.layer.full(window.compareIndex);\n        });\n    });\n</script>\n</body>\n</html>"
  },
  {
    "path": "views/document/html_edit_template.tpl",
    "content": "<!DOCTYPE html>\n<html lang=\"zh-CN\">\n<head>\n    <meta charset=\"utf-8\">\n    <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n\n    <title>{{i18n .Lang \"doc.edit_doc\"}} - Powered by MinDoc</title>\n    <style type=\"text/css\">\n        .w-e-menu.selected > i {\n            color: #44B036 !important;\n        }\n    </style>\n    <script type=\"text/javascript\">\n        window.IS_ENABLE_IFRAME = '{{conf \"enable_iframe\" }}' === 'true';\n        window.BASE_URL = '{{urlfor \"HomeController.Index\" }}';\n    </script>\n    <script type=\"text/javascript\">\n        window.editor = null;\n        window.imageUploadURL = \"{{urlfor \"DocumentController.Upload\" \"identify\" .Model.Identify}}\";\n        window.fileUploadURL = \"{{urlfor \"DocumentController.Upload\" \"identify\" .Model.Identify}}\";\n        window.documentCategory = {{.Result}};\n        window.book = {{.ModelResult}};\n        window.selectNode = null;\n        window.deleteURL = \"{{urlfor \"DocumentController.Delete\" \":key\" .Model.Identify}}\";\n        window.editURL = \"{{urlfor \"DocumentController.Content\" \":key\" .Model.Identify \":id\" \"\"}}\";\n        window.releaseURL = \"{{urlfor \"BookController.Release\" \":key\" .Model.Identify}}\";\n        window.sortURL = \"{{urlfor \"BookController.SaveSort\" \":key\" .Model.Identify}}\";\n        window.baiduMapKey = \"{{.BaiDuMapKey}}\";\n        window.historyURL = \"{{urlfor \"DocumentController.History\"}}\";\n        window.removeAttachURL = \"{{urlfor \"DocumentController.RemoveAttachment\"}}\";\n        window.vueApp = null;\n        window.lang = {{i18n $.Lang \"common.js_lang\"}};\n    </script>\n    <!-- Bootstrap -->\n    <link href=\"{{cdncss \"/static/bootstrap/css/bootstrap.min.css\"}}\" rel=\"stylesheet\">\n    <link href=\"{{cdncss \"/static/font-awesome/css/font-awesome.min.css\"}}\" rel=\"stylesheet\">\n    <link href=\"{{cdncss \"/static/jstree/3.3.4/themes/default/style.min.css\"}}\" rel=\"stylesheet\">\n    <!-- <link href=\"{{cdncss \"/static/wangEditor/css/wangEditor.min.css\"}}\" rel=\"stylesheet\"> -->\n\n    <link href=\"{{cdncss (print \"/static/editor.md/lib/highlight/styles/\" .HighlightStyle \".css\") \"version\"}}\" rel=\"stylesheet\">\n    <link href=\"{{cdncss \"/static/webuploader/webuploader.css\"}}\" rel=\"stylesheet\">\n\n    <link href=\"{{cdncss \"/static/css/jstree.css\"}}\" rel=\"stylesheet\">\n    <link href=\"{{cdncss \"/static/css/markdown.css\"}}\" rel=\"stylesheet\">\n    <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->\n    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->\n    <!--[if lt IE 9]>\n    <script src=\"/static/html5shiv/3.7.3/html5shiv.min.js\"></script>\n    <script src=\"/static/respond.js/1.4.2/respond.min.js\"></script>\n    <![endif]-->\n</head>\n<body>\n\n<div class=\"m-manual manual-editor\">\n    <!--{{/*<div class=\"manual-head\" id=\"editormd-tools\">\n        <div class=\"editormd-group\">\n            <a href=\"{{urlfor \"BookController.Dashboard\" \":key\" .Model.Identify}}\" data-toggle=\"tooltip\" data-title=\"{{i18n .Lang \"doc.backward\"}}\"><i class=\"fa fa-chevron-left\" aria-hidden=\"true\"></i></a>\n        </div>\n        <div class=\"editormd-group\">\n            <a href=\"javascript:;\" id=\"markdown-save\" data-toggle=\"tooltip\" data-title=\"{{i18n .Lang \"doc.save\"}}\" class=\"disabled save\"><i class=\"fa fa-save\" aria-hidden=\"true\" name=\"save\"></i></a>\n        </div>\n\n\n        <div class=\"editormd-group\">\n            <a href=\"javascript:;\" data-toggle=\"tooltip\" data-title=\"{{i18n .Lang \"doc.modify_history\"}}\"><i class=\"fa fa-history item\" name=\"history\" aria-hidden=\"true\"></i></a>\n            <a href=\"javascript:;\" data-toggle=\"tooltip\" data-title=\"{{i18n .Lang \"doc.sidebar\"}}\"><i class=\"fa fa-columns item\" aria-hidden=\"true\" name=\"sidebar\"></i></a>\n            <a href=\"javascript:;\" data-toggle=\"tooltip\" data-title=\"{{i18n .Lang \"doc.help\"}}\"><i class=\"fa fa-question-circle-o last\" aria-hidden=\"true\" name=\"help\"></i></a>\n        </div>\n\n        <div class=\"editormd-group\">\n            <a href=\"javascript:;\" data-toggle=\"tooltip\" data-title=\"{{i18n .Lang \"doc.publish\"}}\"><i class=\"fa fa-cloud-upload\" name=\"release\" aria-hidden=\"true\"></i></a>\n        </div>\n\n        <div class=\"editormd-group\">\n            <a href=\"javascript:;\" data-toggle=\"tooltip\" data-title=\"\"></a>\n            <a href=\"javascript:;\" data-toggle=\"tooltip\" data-title=\"\"></a>\n        </div>\n\n        <div class=\"clearfix\"></div>\n    </div>*/}}-->\n    <div class=\"manual-body\">\n        <div class=\"manual-category\" id=\"manualCategory\" style=\"top: 0;\">\n            <div class=\"manual-nav\">\n                <div class=\"nav-item active\"><i class=\"fa fa-bars\" aria-hidden=\"true\"></i> {{i18n .Lang \"doc.document\"}}</div>\n                <div class=\"nav-plus pull-right\" data-toggle=\"tooltip\" data-title=\"{{i18n .Lang \"doc.backward\"}}\" data-direction=\"right\">\n                    <a style=\"color: #999999;\" href=\"{{urlfor \"BookController.Dashboard\" \":key\" .Model.Identify}}\" target=\"_blank\"><i class=\"fa fa-chevron-left\" aria-hidden=\"true\"></i></a>\n                </div>\n                <div class=\"nav-plus pull-right\" id=\"btnAddDocument\" data-toggle=\"tooltip\" data-title=\"{{i18n .Lang \"doc.create_doc\"}}\" data-direction=\"right\"><i class=\"fa fa-plus\" aria-hidden=\"true\"></i></div>\n                <div class=\"clearfix\"></div>\n            </div>\n            <div class=\"manual-tree\" id=\"sidebar\">\n\n            </div>\n        </div>\n        <div class=\"manual-editor-container\" id=\"manualEditorContainer\" style=\"top: 0;\">\n            <div class=\"manual-wangEditor\">\n                <div id=\"htmlEditor\" class=\"manual-editormd-active\" style=\"height: 100%\"></div>\n            </div>\n            <div class=\"manual-editor-status\">\n                <div id=\"attachInfo\" class=\"item\" style=\"display: inline-block; padding: 0 3em;\">0 {{i18n .Lang \"doc.attachments\"}}</div>\n            </div>\n        </div>\n\n    </div>\n</div>\n<!-- Modal -->\n<div class=\"modal fade\" id=\"addDocumentModal\" tabindex=\"-1\" style=\"z-index: 10001 !important;\" role=\"dialog\" aria-labelledby=\"addDocumentModalLabel\">\n    <div class=\"modal-dialog\" role=\"document\">\n        <form method=\"post\" action=\"{{urlfor \"DocumentController.Create\" \":key\" .Model.Identify}}\" id=\"addDocumentForm\" class=\"form-horizontal\">\n            <input type=\"hidden\" name=\"identify\" value=\"{{.Model.Identify}}\">\n            <input type=\"hidden\" name=\"doc_id\" value=\"0\">\n            <input type=\"hidden\" name=\"parent_id\" value=\"0\">\n            <div class=\"modal-content\">\n                <div class=\"modal-header\">\n                    <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\"><span aria-hidden=\"true\">&times;</span></button>\n                    <h4 class=\"modal-title\" id=\"myModalLabel\">{{i18n .Lang \"doc.create_doc\"}}</h4>\n                </div>\n                <div class=\"modal-body\">\n                    <div class=\"form-group\">\n                        <label class=\"col-sm-2 control-label\">{{i18n .Lang \"doc.doc_name\"}} <span class=\"error-message\">*</span></label>\n                        <div class=\"col-sm-10\">\n                            <input type=\"text\" name=\"doc_name\" id=\"documentName\" placeholder=\"{{i18n .Lang \"doc.doc_name\"}}\" class=\"form-control\"  maxlength=\"50\">\n                            <p style=\"color: #999;font-size: 12px;\">{{i18n .Lang \"doc.doc_name_tips\"}}</p>\n                        </div>\n                    </div>\n                    <div class=\"form-group\">\n                        <label class=\"col-sm-2 control-label\">{{i18n .Lang \"doc.doc_id\"}}</label>\n                        <div class=\"col-sm-10\">\n                            <input type=\"text\" name=\"doc_identify\" id=\"documentIdentify\" placeholder=\"{{i18n .Lang \"doc.doc_id\"}}\" class=\"form-control\" maxlength=\"50\">\n                            <p style=\"color: #999;font-size: 12px;\">{{i18n .Lang \"doc.doc_id_tips\"}}</p>\n                        </div>\n\n                    </div>\n                </div>\n                <div class=\"modal-footer\">\n                    <span id=\"add-error-message\" class=\"error-message\"></span>\n                    <button type=\"button\" class=\"btn btn-default\" data-dismiss=\"modal\">{{i18n .Lang \"common.cancel\"}}</button>\n                    <button type=\"submit\" class=\"btn btn-primary\" id=\"btnSaveDocument\" data-loading-text=\"{{i18n .Lang \"message.processing\"}}\">{{i18n .Lang \"doc.save\"}}</button>\n                </div>\n            </div>\n        </form>\n    </div>\n</div>\n<div class=\"modal fade\" id=\"uploadAttachModal\" tabindex=\"-1\" style=\"z-index: 10001 !important;\" role=\"dialog\" aria-labelledby=\"uploadAttachModalLabel\">\n    <div class=\"modal-dialog\" role=\"document\">\n        <form method=\"post\" action=\"{{urlfor \"DocumentController.Create\" \":key\" .Model.Identify}}\" id=\"addDocumentForm\" class=\"form-horizontal\">\n            <input type=\"hidden\" name=\"identify\" value=\"{{.Model.Identify}}\">\n            <input type=\"hidden\" name=\"doc_id\" value=\"0\">\n            <input type=\"hidden\" name=\"parent_id\" value=\"0\">\n            <div class=\"modal-content\">\n                <div class=\"modal-header\">\n                    <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\"><span aria-hidden=\"true\">&times;</span></button>\n                    <h4 class=\"modal-title\" id=\"myModalLabel\">{{i18n .Lang \"doc.upload_attachment\"}}</h4>\n                </div>\n                <div class=\"modal-body\">\n                    <div class=\"attach-drop-panel\">\n                        <div class=\"upload-container\" id=\"filePicker\"><i class=\"fa fa-upload\" aria-hidden=\"true\"></i></div>\n                    </div>\n                    <div class=\"attach-list\" id=\"attachList\">\n                        <template v-for=\"item in lists\">\n                            <div class=\"attach-item\" :id=\"item.attachment_id\">\n                                <template v-if=\"item.state == 'wait'\">\n                                    <div class=\"progress\">\n                                        <div class=\"progress-bar progress-bar-success\" role=\"progressbar\" aria-valuenow=\"40\" aria-valuemin=\"0\" aria-valuemax=\"100\">\n                                            <span class=\"sr-only\">0% Complete (success)</span>\n                                        </div>\n                                    </div>\n                                </template>\n                                <template v-else-if=\"item.state == 'error'\">\n                                    <span class=\"error-message\">${item.message}</span>\n                                    <button type=\"button\" class=\"btn btn-sm close\" @click=\"removeAttach(item.attachment_id)\">\n                                        <i class=\"fa fa-remove\" aria-hidden=\"true\"></i>\n                                    </button>\n                                </template>\n                                <template v-else>\n                                    <a :href=\"item.http_path\" target=\"_blank\" :title=\"item.file_name\">${item.file_name}</a>\n                                    <span class=\"text\">(${(item.file_size/1024/1024).toFixed(4)}MB)</span>\n                                    <span class=\"error-message\">${item.message}</span>\n                                    <button type=\"button\" class=\"btn btn-sm close\" @click=\"removeAttach(item.attachment_id)\">\n                                        <i class=\"fa fa-remove\" aria-hidden=\"true\"></i>\n                                    </button>\n                                    <div class=\"clearfix\"></div>\n                                </template>\n                            </div>\n                        </template>\n                    </div>\n                </div>\n                <div class=\"modal-footer\">\n                    <span id=\"add-error-message\" class=\"error-message\"></span>\n                    <button type=\"button\" class=\"btn btn-default\" data-dismiss=\"modal\">{{i18n .Lang \"common.cancel\"}}</button>\n                    <button type=\"button\" class=\"btn btn-primary\" id=\"btnUploadAttachFile\" data-dismiss=\"modal\">{{i18n .Lang \"common.confirm\"}}</button>\n                </div>\n            </div>\n        </form>\n    </div>\n</div>\n\n<script src=\"https://cdn.jsdelivr.net/npm/i18next/i18next.min.js\"></script>\n<script src=\"{{cdnjs \"/static/jquery/1.12.4/jquery.min.js\"}}\"></script>\n<script src=\"{{cdnjs \"/static/bootstrap/js/bootstrap.min.js\"}}\"></script>\n<script src=\"{{cdnjs \"/static/vuejs/vue.min.js\"}}\" type=\"text/javascript\"></script>\n<script src=\"{{cdnjs \"/static/jstree/3.3.4/jstree.min.js\"}}\" type=\"text/javascript\"></script>\n<script src=\"{{cdnjs \"/static/webuploader/webuploader.min.js\"}}\" type=\"text/javascript\"></script>\n<script src=\"{{cdnjs \"/static/js/class2browser.js\"}}\" type=\"text/javascript\"></script>\n<script src=\"{{cdnjs \"/static/wangEditor/wangEditor.min.js\"}}\" type=\"text/javascript\"></script>\n<script src=\"{{cdnjs \"/static/js/wangEditor-plugins/save-menu.js\"}}\" type=\"text/javascript\"></script>\n<script src=\"{{cdnjs \"/static/js/wangEditor-plugins/release-menu.js\"}}\" type=\"text/javascript\"></script>\n<script src=\"{{cdnjs \"/static/js/wangEditor-plugins/attach-menu.js\"}}\" type=\"text/javascript\"></script>\n<script src=\"{{cdnjs \"/static/js/wangEditor-plugins/history-menu.js\"}}\" type=\"text/javascript\"></script>\n<script src=\"{{cdnjs \"/static/layer/layer.js\"}}\" type=\"text/javascript\" ></script>\n<script src=\"{{cdnjs \"/static/to-markdown/dist/to-markdown.js\"}}\" type=\"text/javascript\"></script>\n<script src=\"{{cdnjs \"/static/js/jquery.form.js\"}}\" type=\"text/javascript\"></script>\n<script src=\"{{cdnjs \"/static/js/editor.js\"}}\" type=\"text/javascript\"></script>\n<script src=\"{{cdnjs \"/static/js/html-editor.js\"}}\" type=\"text/javascript\"></script>\n<script src=\"{{cdnjs \"/static/js/custom-elements-builtin-0.6.5.min.js\"}}\" type=\"text/javascript\"></script>\n<script src=\"{{cdnjs \"/static/js/x-frame-bypass-1.0.2.js\"}}\" type=\"text/javascript\"></script>\n<script type=\"text/javascript\">\n    $(function () {\n        lang = {{i18n $.Lang \"common.js_lang\"}};\n        $(\"#attachInfo\").on(\"click\",function () {\n            $(\"#uploadAttachModal\").modal(\"show\");\n        });\n\n        window.uploader = null;\n\n        $(\"#uploadAttachModal\").on(\"shown.bs.modal\",function () {\n            if(window.uploader === null){\n                try {\n                    window.uploader = WebUploader.create({\n                        auto: true,\n                        dnd : true,\n                        swf: '{{.BaseUrl}}/static/webuploader/Uploader.swf',\n                        server: '{{urlfor \"DocumentController.Upload\"}}',\n                        formData : { \"identify\" : {{.Model.Identify}},\"doc_id\" :  window.selectNode.id },\n                        pick: \"#filePicker\",\n                        fileVal : \"editormd-file-file\",\n                        fileNumLimit : 1,\n                        compress : false\n                    }).on(\"beforeFileQueued\",function (file) {\n                        uploader.reset();\n                    }).on( 'fileQueued', function( file ) {\n                       var item = {\n                           state : \"wait\",\n                           attachment_id : file.id,\n                           file_size : file.size,\n                           file_name : file.name,\n                           message : \"{{i18n .Lang \"doc.uploading\"}}\"\n                       };\n                       window.vueApp.lists.splice(0,0,item);\n\n                    }).on(\"uploadError\",function (file,reason) {\n                       for(var i in window.vueApp.lists){\n                           var item = window.vueApp.lists[i];\n                           if(item.attachment_id == file.id){\n                               item.state = \"error\";\n                               item.message = \"{{i18n .Lang \"message.upload_failed\"}}:\" + reason;\n                               break;\n                           }\n                       }\n\n                    }).on(\"uploadSuccess\",function (file, res) {\n\n                        for(var index in window.vueApp.lists){\n                            var item = window.vueApp.lists[index];\n                            if(item.attachment_id === file.id){\n                                if(res.errcode === 0) {\n                                    window.vueApp.lists.splice(index, 1, res.attach);\n                                }else{\n                                    item.message = res.message;\n                                    item.state = \"error\";\n                                }\n                                break;\n                            }\n                        }\n\n                    }).on(\"beforeFileQueued\",function (file) {\n\n                    }).on(\"uploadComplete\",function () {\n\n                    }).on(\"uploadProgress\",function (file, percentage) {\n                        var $li = $( '#'+file.id ),\n                            $percent = $li.find('.progress .progress-bar');\n\n                        $percent.css( 'width', percentage * 100 + '%' );\n                    });\n                }catch(e){\n                    console.log(e);\n                }\n            }\n        });\n    });\n</script>\n</body>\n</html>"
  },
  {
    "path": "views/document/index.tpl",
    "content": ""
  },
  {
    "path": "views/document/kancloud_read_template.tpl",
    "content": "<!DOCTYPE html>\n<html lang=\"zh-CN\">\n<head>\n    <meta charset=\"utf-8\">\n    <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n\n    <title>编辑文档 - Powered by MinDoc</title>\n\n    <!-- Bootstrap -->\n    <link href=\"{{cdncss \"/static/bootstrap/css/bootstrap.min.css\"}}\" rel=\"stylesheet\">\n    <link href=\"{{cdncss \"/static/font-awesome/css/font-awesome.min.css\"}}\" rel=\"stylesheet\">\n    <link href=\"{{cdncss \"/static/jstree/3.3.4/themes/default/style.min.css\"}}\" rel=\"stylesheet\">\n    <link href=\"{{cdncss \"/static/css/kancloud.css\" \"version\"}}\" rel=\"stylesheet\">\n    <link href=\"{{cdncss \"/static/jquery/plugins/imgbox/imgbox.css\" \"version\"}}\" rel=\"stylesheet\">\n    <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->\n    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->\n    <!--[if lt IE 9]>\n    <script src=\"/static/html5shiv/3.7.3/html5shiv.min.js\"></script>\n    <script src=\"/static/respond.js/1.4.2/respond.min.js\"></script>\n    <![endif]-->\n    <script type=\"text/javascript\">\n        window.IS_ENABLE_IFRAME = '{{conf \"enable_iframe\" }}' === 'true';\n        window.BASE_URL = '{{urlfor \"HomeController.Index\" }}';\n    </script>\n</head>\n<body>\n<div class=\"m-manual manual-reader\">\n    <header class=\"navbar navbar-static-top manual-head\" role=\"banner\">\n        <div class=\"container-fluid\">\n            <div class=\"navbar-header pull-left manual-title\">\n                <span class=\"slidebar\" id=\"slidebar\"><i class=\"fa fa-align-justify\"></i></span>\n\n                <span style=\"font-size: 12px;font-weight: 100;\">v 0.1.1</span>\n            </div>\n            <div class=\"navbar-header pull-right manual-menu\">\n                <div class=\"dropdown\">\n                    <button id=\"dLabel\" class=\"btn btn-default\" type=\"button\" data-toggle=\"dropdown\" aria-haspopup=\"true\" aria-expanded=\"false\">\n                        项目\n                        <span class=\"caret\"></span>\n                    </button>\n                    <ul class=\"dropdown-menu dropdown-menu-right\" role=\"menu\" aria-labelledby=\"dLabel\">\n                        <li><a href=\"javascript:\" data-toggle=\"modal\" data-target=\"#shareProject\">项目分享</a> </li>\n                        <li role=\"presentation\" class=\"divider\"></li>\n                        <li><a href=\"https://wiki.iminho.me/export/1\" target=\"_blank\">项目导出</a> </li>\n                        <li><a href=\"https://wiki.iminho.me\" title=\"返回首页\">返回首页</a> </li>\n                    </ul>\n                </div>\n            </div>\n        </div>\n    </header>\n    <article class=\"container-fluid manual-body\">\n        <div class=\"manual-left\">\n            <div class=\"manual-tab\">\n                <div class=\"tab-navg\">\n                    <span data-mode=\"view\" class=\"navg-item active\"><i class=\"fa fa-align-justify\"></i><b class=\"text\">目录</b></span>\n                </div>\n                <div class=\"tab-wrap\">\n                    <div class=\"tab-item manual-catalog\">\n                        <div class=\"catalog-list read-book-preview\" id=\"sidebar\">\n                            <ul><li id=\"1\" class=\"jstree-open\"><a href=\"https://wiki.iminho.me/docs/show/1\" title=\"项目简介\" class=\"jstree-clicked\">项目简介</a></li><li id=\"8\"><a href=\"https://wiki.iminho.me/docs/show/8\" title=\"使用手册\">使用手册</a><ul><li id=\"135\"><a href=\"https://wiki.iminho.me/docs/show/135\" title=\"SmartWiki依赖扩展\">SmartWiki依赖扩展</a></li><li id=\"9\"><a href=\"https://wiki.iminho.me/docs/show/9\" title=\"SmartWiki安装与部署\">SmartWiki安装与部署</a></li><li id=\"10\"><a href=\"https://wiki.iminho.me/docs/show/10\" title=\"密码找回与邮件配置\">密码找回与邮件配置</a></li><li id=\"21\"><a href=\"https://wiki.iminho.me/docs/show/21\" title=\"Artisan命令安装SmartWiki\">Artisan命令安装SmartWiki</a></li><li id=\"22\"><a href=\"https://wiki.iminho.me/docs/show/22\" title=\"在Docker中使用SmartWiki\">在Docker中使用SmartWiki</a></li><li id=\"105\"><a href=\"https://wiki.iminho.me/docs/show/105\" title=\"图片和附件配置\">图片和附件配置</a></li><li id=\"133\"><a href=\"https://wiki.iminho.me/docs/show/133\" title=\"查看SmartWiki版本\">查看SmartWiki版本</a></li><li id=\"134\"><a href=\"https://wiki.iminho.me/docs/show/134\" title=\"使用phpStudy安装SmartWiki\">使用phpStudy安装SmartWiki</a></li><li id=\"138\"><a href=\"https://wiki.iminho.me/docs/show/138\" title=\"接口管理和测试工具\">接口管理和测试工具</a></li></ul></li><li id=\"90\"><a href=\"https://wiki.iminho.me/docs/show/90\" title=\"PHP环境搭建\">PHP环境搭建</a><ul><li id=\"18\"><a href=\"https://wiki.iminho.me/docs/show/18\" title=\"Linux命令行下Nginx+PHP-FPM安装与配置\">Linux命令行下Nginx+PHP-FPM安装与配置</a></li><li id=\"17\"><a href=\"https://wiki.iminho.me/docs/show/17\" title=\"Linux命令行下Apache+PHP安装与配置\">Linux命令行下Apache+PHP安装与配置</a></li><li id=\"91\"><a href=\"https://wiki.iminho.me/docs/show/91\" title=\"Linux下使用XAMPP搭建PHP环境\">Linux下使用XAMPP搭建PHP环境</a></li><li id=\"92\"><a href=\"https://wiki.iminho.me/docs/show/92\" title=\"Windows下使用phpStudy搭建php环境\">Windows下使用phpStudy搭建php环境</a></li></ul></li><li id=\"4\"><a href=\"https://wiki.iminho.me/docs/show/4\" title=\"Composer安装\">Composer安装</a></li><li id=\"5\"><a href=\"https://wiki.iminho.me/docs/show/5\" title=\"更新日志\">更新日志</a></li><li id=\"6\"><a href=\"https://wiki.iminho.me/docs/show/6\" title=\"常见问题\">常见问题</a></li></ul>\n                        </div>\n\n                    </div>\n                </div>\n            </div>\n            <div class=\"m-copyright\">\n                <p>\n                    本文档使用 <a href=\"https://www.iminho.me\" target=\"_blank\">MinDoc</a> 发布\n                </p>\n            </div>\n        </div>\n        <div class=\"manual-right\">\n            <div class=\"manual-article\">\n                <div class=\"article-head\">\n                    <div class=\"container-fluid\">\n                        <div class=\"row\">\n                            <div class=\"col-md-2\">\n\n                            </div>\n                            <div class=\"col-md-8 text-center\">\n                                <h1 id=\"article-title\">项目简介</h1>\n                            </div>\n                            <div class=\"col-md-2\">\n\n                            </div>\n                        </div>\n                    </div>\n\n                </div>\n                <div class=\"article-content\">\n                    <div class=\"article-body editor-content\"  id=\"page-content\">\n                        <h2 id=\"h2-u7b80u4ecb\"><a name=\"简介\" class=\"reference-link\"></a><span class=\"header-link octicon octicon-link\"></span>简介</h2>\n                        <p>SmartWiki是一款针对IT团队开发的简单好用的文档管理系统。\n                            可以用来储存日常接口文档，数据库字典，手册说明等文档。内置项目管理，用户管理，权限管理等功能，能够满足大部分中小团队的文档管理需求。</p>\n                        <h2 id=\"h2-u4f7fu7528\"><a name=\"使用\" class=\"reference-link\"></a><span class=\"header-link octicon octicon-link\"></span>使用</h2>\n                        <pre><code>git clone https://github.com/lifei6671/SmartWiki.git\n</code></pre>\n                        <p>配置laravel的运行环境,然后打开首页会自动跳转到安装页面。</p>\n                        <p>因为laravel使用了composer，所以需要服务器安装composer进行包的还原。</p>\n                        <h2 id=\"h2-u90e8u5206u622au56fe\"><a name=\"部分截图\" class=\"reference-link\"></a><span class=\"header-link octicon octicon-link\"></span>部分截图</h2>\n                        <p><strong>个人资料</strong></p>\n                        <p><img src=\"https://raw.githubusercontent.com/lifei6671/SmartWiki/master/storage/app/images/20161124082553.png\" alt=\"个人资料\" /></p>\n                        <p><strong>我的项目</strong></p>\n                        <p><img src=\"https://raw.githubusercontent.com/lifei6671/SmartWiki/master/storage/app/images/20161124082647.png\" alt=\"我的项目\" /></p>\n                        <p><strong>项目参与用户</strong></p>\n                        <p><img src=\"https://raw.githubusercontent.com/lifei6671/SmartWiki/master/storage/app/images/20161124082703.png\" alt=\"项目参与用户\" /></p>\n                        <p><strong>文档编辑</strong></p>\n                        <p><img src=\"https://raw.githubusercontent.com/lifei6671/SmartWiki/master/storage/app/images/20161124082810.png\" alt=\"文档编辑\" /></p>\n                        <p><strong>文档模板</strong></p>\n                        <p><img src=\"https://raw.githubusercontent.com/lifei6671/SmartWiki/master/storage/app/images/20161124082844.png\" alt=\"文档模板\" /></p>\n                        <h2 id=\"h2-u4f7fu7528u7684u6280u672f\"><a name=\"使用的技术\" class=\"reference-link\"></a><span class=\"header-link octicon octicon-link\"></span>使用的技术</h2>\n                        <ul>\n                            <li>laravel 5.2</li>\n                            <li>mysql 5.6</li>\n                            <li>editor.md</li>\n                            <li>bootstrap 3.2</li>\n                            <li>jquery 库</li>\n                            <li>layer 弹出层框架</li>\n                            <li>webuploader 文件上传框架</li>\n                            <li>Nprogress 库</li>\n                            <li>jstree</li>\n                            <li>font awesome 字体库</li>\n                            <li>cropper 图片剪裁库</li>\n                        </ul>\n                        <h2 id=\"h2-u529fu80fd\"><a name=\"功能\" class=\"reference-link\"></a><span class=\"header-link octicon octicon-link\"></span>功能</h2>\n                        <ol>\n                            <li>项目管理，可以对项目进行编辑更改，成员添加等。</li>\n                            <li>文档管理，添加和删除文档，文档历史恢复等。</li>\n                            <li>用户管理，添加和禁用用户，个人资料更改等。</li>\n                            <li>用户权限管理 ， 实现用户角色的变更。</li>\n                            <li>项目加密，可以设置项目公开状态为私密、半公开、全公开。</li>\n                            <li>站点配置，二次开发时可以添加自定义配置项。</li>\n                        </ol>\n                        <h2 id=\"h2-u5f85u5b9eu73b0\"><a name=\"待实现\" class=\"reference-link\"></a><span class=\"header-link octicon octicon-link\"></span>待实现</h2>\n                        <ol>\n                            <li>项目导出</li>\n                            <li>角色细分</li>\n                            <li>文档搜索</li>\n                        </ol>\n                        <h2 id=\"h2-u4f5cu8005\"><a name=\"作者\" class=\"reference-link\"></a><span class=\"header-link octicon octicon-link\"></span>作者</h2>\n                        <p>一个纯粹的PHPer。<a href=\"http://www.iminho.me\">个人网站</a></p>\n\n                    </div>\n                </div>\n            </div>\n        </div>\n        <div class=\"manual-progress\"><b class=\"progress-bar\"></b></div>\n    </article>\n    <div class=\"manual-mask\"></div>\n</div>\n\n<!-- Share Modal -->\n<div class=\"modal fade\" id=\"shareProject\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"myModalLabel\" aria-hidden=\"true\">\n    <div class=\"modal-dialog\">\n        <div class=\"modal-content\">\n            <div class=\"modal-header\">\n                <button type=\"button\" class=\"close\" data-dismiss=\"modal\"><span aria-hidden=\"true\">&times;</span><span class=\"sr-only\">Close</span></button>\n                <h4 class=\"modal-title\" id=\"myModalLabel\">项目分享</h4>\n            </div>\n            <div class=\"modal-body\">\n                <div class=\"form-group\">\n                    <label for=\"password\" class=\"col-sm-2 control-label\">项目地址</label>\n                    <div class=\"col-sm-10\">\n                        <input type=\"text\" value=\"https://wiki.iminho.me/show/1\" class=\"form-control\" onmouseover=\"this.select()\" id=\"projectUrl\" title=\"项目地址\">\n                    </div>\n                    <div class=\"clearfix\"></div>\n                </div>\n            </div>\n            <div class=\"modal-footer\">\n                <button type=\"button\" class=\"btn btn-default\" data-dismiss=\"modal\">关闭</button>\n            </div>\n        </div>\n    </div>\n</div>\n<script src=\"{{cdnjs \"/static/jquery/1.12.4/jquery.min.js\"}}\"></script>\n<script src=\"{{cdnjs \"/static/bootstrap/js/bootstrap.min.js\"}}\"></script>\n<script src=\"{{cdnjs \"/static/jstree/3.3.4/jstree.min.js\"}}\" type=\"text/javascript\"></script>\n<script src=\"{{cdnjs \"/static/jquery/plugins/imgbox/jquery.imgbox.pack.js\"}}\"></script>\n<script src=\"{{cdnjs \"/static/js/custom-elements-builtin-0.6.5.min.js\"}}\" type=\"text/javascript\"></script>\n<script src=\"{{cdnjs \"/static/js/x-frame-bypass-1.0.2.js\"}}\" type=\"text/javascript\"></script>\n<script type=\"text/javascript\">\n    $(function () {\n        $(\"#sidebar\").jstree({\n            'plugins':[\"wholerow\",\"types\"],\n            \"types\": {\n                \"default\" : {\n                    \"icon\" : false  // 删除默认图标\n                }\n            },\n            'core' : {\n                'check_callback' : false,\n                \"multiple\" : false ,\n                'animation' : 0\n            }\n        });\n        $(\"img\").imgbox();\n    });\n</script>\n</body>\n</html>"
  },
  {
    "path": "views/document/markdown_edit_template.tpl",
    "content": "<!DOCTYPE html>\n<html lang=\"zh-CN\">\n<head>\n    <meta charset=\"utf-8\">\n    <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n\n    <title>{{i18n .Lang \"doc.edit_doc\"}} - Powered by MinDoc</title>\n    <script type=\"text/javascript\">\n        window.IS_ENABLE_IFRAME = '{{conf \"enable_iframe\" }}' === 'true';\n        window.BASE_URL = '{{urlfor \"HomeController.Index\" }}';\n    </script>\n    <script type=\"text/javascript\">\n        window.treeCatalog = null;\n        window.baseUrl = \"{{.BaseUrl}}\";\n        window.saveing = false;\n        window.katex = { js: \"{{cdnjs \"/static/katex/katex\"}}\",css: \"{{cdncss \"/static/katex/katex\"}}\"};\n        window.editormdLib = \"{{cdnjs \"/static/editor.md/lib/\"}}\";\n        window.editor = null;\n        window.imageUploadURL = \"{{urlfor \"DocumentController.Upload\" \"identify\" .Model.Identify}}\";\n        window.fileUploadURL = \"{{urlfor \"DocumentController.Upload\" \"identify\" .Model.Identify}}\";\n        window.documentCategory = {{.Result}};\n        window.book = {{.ModelResult}};\n        window.selectNode = null;\n        window.deleteURL = \"{{urlfor \"DocumentController.Delete\" \":key\" .Model.Identify}}\";\n        window.editURL = \"{{urlfor \"DocumentController.Content\" \":key\" .Model.Identify \":id\" \"\"}}\";\n        window.releaseURL = \"{{urlfor \"BookController.Release\" \":key\" .Model.Identify}}\";\n        window.sortURL = \"{{urlfor \"BookController.SaveSort\" \":key\" .Model.Identify}}\";\n        window.historyURL = \"{{urlfor \"DocumentController.History\"}}\";\n        window.removeAttachURL = \"{{urlfor \"DocumentController.RemoveAttachment\"}}\";\n        window.highlightStyle = \"{{.HighlightStyle}}\";\n        window.template = { \"getUrl\":\"{{urlfor \"TemplateController.Get\"}}\", \"listUrl\" : \"{{urlfor \"TemplateController.List\"}}\", \"deleteUrl\" : \"{{urlfor \"TemplateController.Delete\"}}\", \"saveUrl\" :\"{{urlfor \"TemplateController.Add\"}}\"}\n        window.lang = {{i18n $.Lang \"common.js_lang\"}};\n    </script>\n    <!-- Bootstrap -->\n    <link href=\"{{cdncss \"/static/bootstrap/css/bootstrap.min.css\"}}\" rel=\"stylesheet\">\n    <link href=\"{{cdncss \"/static/font-awesome/css/font-awesome.min.css\"}}\" rel=\"stylesheet\">\n    <link href=\"{{cdncss \"/static/jstree/3.3.4/themes/default/style.min.css\"}}\" rel=\"stylesheet\">\n    <link href=\"{{cdncss \"/static/editor.md/css/editormd.css\" \"version\"}}\" rel=\"stylesheet\">\n\n    <link href=\"{{cdncss \"/static/css/jstree.css\"}}\" rel=\"stylesheet\">\n    <link href=\"{{cdncss \"/static/webuploader/webuploader.css\"}}\" rel=\"stylesheet\">\n    <link href=\"{{cdncss \"/static/css/markdown.css\" \"version\"}}\" rel=\"stylesheet\">\n    <link href=\"{{cdncss \"/static/css/markdown.preview.css\" \"version\"}}\" rel=\"stylesheet\">\n    <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->\n    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->\n    <!--[if lt IE 9]>\n    <script src=\"/static/html5shiv/3.7.3/html5shiv.min.js\"></script>\n    <script src=\"/static/respond.js/1.4.2/respond.min.js\"></script>\n    <![endif]-->\n    <style type=\"text/css\">\n        .text{\n            font-size: 12px;\n            color: #999999;\n            font-weight: 200;\n        }\n    </style>\n</head>\n<body>\n\n<div class=\"m-manual manual-editor\">\n    <div class=\"manual-head\" id=\"editormd-tools\" style=\"min-width: 1200px; position:absolute;\">\n        <div class=\"editormd-group\">\n            <!--a href=\"{{urlfor \"BookController.Index\"}}\" data-toggle=\"tooltip\" data-title=\"{{i18n .Lang \"doc.backward\"}}\"><i class=\"fa fa-chevron-left\" aria-hidden=\"true\"></i></a-->\n            <a href=\"javascript:\" onclick=\"self.location=document.referrer;\" data-toggle=\"tooltip\" data-title=\"{{i18n .Lang \"doc.backward\"}}\"><i class=\"fa fa-chevron-left\" aria-hidden=\"true\"></i></a>\n        </div>\n        <div class=\"editormd-group\">\n            <a href=\"javascript:;\" id=\"markdown-save\" data-toggle=\"tooltip\" data-title=\"{{i18n .Lang \"doc.save\"}}\" class=\"disabled save\"><i class=\"fa fa-save first\" aria-hidden=\"true\" name=\"save\"></i></a>\n            <a href=\"javascript:;\" id=\"markdown-template\" data-toggle=\"tooltip\" data-title=\"{{i18n .Lang \"doc.save_as_tpl\"}}\" class=\"template\"><i class=\"fa fa-briefcase last\" aria-hidden=\"true\" name=\"save-template\"></i></a>\n        </div>\n        <div class=\"editormd-group\">\n            <a href=\"javascript:;\" data-toggle=\"tooltip\" data-title=\"{{i18n .Lang \"doc.undo\"}} (Ctrl-Z)\"><i class=\"fa fa-undo first\" name=\"undo\" unselectable=\"on\"></i></a>\n            <a href=\"javascript:;\" data-toggle=\"tooltip\" data-title=\"{{i18n .Lang \"doc.redo\"}} (Ctrl-Y)\"><i class=\"fa fa-repeat last\" name=\"redo\" unselectable=\"on\"></i></a>\n        </div>\n        <div class=\"editormd-group\">\n            <a href=\"javascript:;\" data-toggle=\"tooltip\" data-title=\"{{i18n .Lang \"doc.bold\"}}\"><i class=\"fa fa-bold first\" name=\"bold\" unselectable=\"on\"></i></a>\n            <a href=\"javascript:;\" data-toggle=\"tooltip\" data-title=\"{{i18n .Lang \"doc.italic\"}}\"><i class=\"fa fa-italic item\" name=\"italic\" unselectable=\"on\"></i></a>\n            <a href=\"javascript:;\" data-toggle=\"tooltip\" data-title=\"{{i18n .Lang \"doc.strikethrough\"}}\"><i class=\"fa fa-strikethrough last\" name=\"del\" unselectable=\"on\"></i></a>\n        </div>\n        <div class=\"editormd-group\">\n            <a href=\"javascript:;\" data-toggle=\"tooltip\" data-title=\"{{i18n .Lang \"doc.h1\"}}\"><i class=\"fa editormd-bold first\" name=\"h1\" unselectable=\"on\">H1</i></a>\n            <a href=\"javascript:;\" data-toggle=\"tooltip\" data-title=\"{{i18n .Lang \"doc.h2\"}}\"><i class=\"fa editormd-bold item\" name=\"h2\" unselectable=\"on\">H2</i></a>\n            <a href=\"javascript:;\" data-toggle=\"tooltip\" data-title=\"{{i18n .Lang \"doc.unorder_list\"}}\"><i class=\"fa fa-list-ul first\" name=\"list-ul\" unselectable=\"on\"></i></a>\n            <a href=\"javascript:;\" data-toggle=\"tooltip\" data-title=\"{{i18n .Lang \"doc.order_list\"}}\"><i class=\"fa fa-list-ol item\" name=\"list-ol\" unselectable=\"on\"></i></a>\n            <a href=\"javascript:;\" data-toggle=\"tooltip\" data-title=\"{{i18n .Lang \"doc.hline\"}}\"><i class=\"fa fa-minus last\" name=\"hr\" unselectable=\"on\"></i></a>\n        </div>\n        <div class=\"editormd-group\">\n            <a href=\"javascript:;\" data-toggle=\"tooltip\" data-title=\"{{i18n .Lang \"doc.link\"}}\"><i class=\"fa fa-link first\" name=\"link\" unselectable=\"on\"></i></a>\n            <a href=\"javascript:;\" data-toggle=\"tooltip\" data-title=\"{{i18n .Lang \"doc.ref_link\"}}\"><i class=\"fa fa-anchor item\" name=\"reference-link\" unselectable=\"on\"></i></a>\n            <a href=\"javascript:;\" data-toggle=\"tooltip\" data-title=\"{{i18n .Lang \"doc.add_pic\"}}\"><i class=\"fa fa-picture-o item\" name=\"image\" unselectable=\"on\"></i></a>\n            <a href=\"javascript:;\" data-toggle=\"tooltip\" data-title=\"{{i18n .Lang \"doc.code\"}}\"><i class=\"fa fa-code item\" name=\"code\" unselectable=\"on\"></i></a>\n            <a href=\"javascript:;\" data-toggle=\"tooltip\" data-title=\"{{i18n .Lang \"doc.code_block\"}}\" unselectable=\"on\"><i class=\"fa fa-file-code-o item\" name=\"code-block\" unselectable=\"on\"></i></a>\n            <a href=\"javascript:;\" data-toggle=\"tooltip\" data-title=\"{{i18n .Lang \"doc.table\"}}\"><i class=\"fa fa-table item\" name=\"table\" unselectable=\"on\"></i></a>\n            <a href=\"javascript:;\" data-toggle=\"tooltip\" data-title=\"{{i18n .Lang \"doc.quote\"}}\"><i class=\"fa fa-quote-right item\" name=\"quote\" unselectable=\"on\"></i></a>\n            <a href=\"javascript:;\" data-toggle=\"tooltip\" data-title=\"{{i18n .Lang \"doc.gfm_task\"}}\"><i class=\"fa fa-tasks item\" name=\"tasks\" aria-hidden=\"true\"></i></a>\n            <a href=\"javascript:;\" data-toggle=\"tooltip\" data-title=\"{{i18n .Lang \"doc.attachment\"}}\"><i class=\"fa fa-paperclip item\" aria-hidden=\"true\" name=\"attachment\"></i></a>\n            <a href=\"javascript:;\" data-toggle=\"tooltip\" data-title=\"{{i18n .Lang \"doc.json_to_table\"}}\"><i class=\"fa fa-wrench item\" aria-hidden=\"true\" name=\"json\"></i></a>\n            <a href=\"javascript:;\" data-toggle=\"tooltip\" data-title=\"{{i18n .Lang \"doc.draw\"}}\"><i class=\"fa fa-paint-brush item\" aria-hidden=\"true\" name=\"drawio\"></i></a>\n            <a href=\"javascript:;\" data-toggle=\"tooltip\" data-title=\"{{i18n .Lang \"doc.template\"}}\"><i class=\"fa fa-tachometer last\" name=\"template\"></i></a>\n\n            <a href=\"javascript:;\" data-toggle=\"tooltip\" data-title=\"{{i18n .Lang \"doc.word_to_html\"}}\"><i class=\"fa fa-file-word-o last\" name=\"wordToContent\"></i></a>\n\n            <a href=\"javascript:;\" data-toggle=\"tooltip\" data-title=\"{{i18n .Lang \"doc.html_to_markdown\"}}\"><i class=\"fa fa-html5 last\" name=\"htmlToMarkdown\"></i></a>\n\n        </div>\n\n        <div class=\"editormd-group pull-right\">\n            <a href=\"javascript:;\" data-toggle=\"tooltip\" data-title=\"{{i18n .Lang \"doc.close_preview\"}}\"><i class=\"fa fa-eye-slash first\" name=\"watch\" unselectable=\"on\"></i></a>\n            <a href=\"javascript:;\" data-toggle=\"tooltip\" data-title=\"{{i18n .Lang \"doc.modify_history\"}}\"><i class=\"fa fa-history item\" name=\"history\" aria-hidden=\"true\"></i></a>\n            <a href=\"javascript:;\" data-toggle=\"tooltip\" data-title=\"{{i18n .Lang \"doc.sidebar\"}}\"><i class=\"fa fa-columns item\" aria-hidden=\"true\" name=\"sidebar\"></i></a>\n            <a href=\"javascript:;\" data-toggle=\"tooltip\" data-title=\"{{i18n .Lang \"doc.help\"}}\"><i class=\"fa fa-question-circle-o last\" aria-hidden=\"true\" name=\"help\"></i></a>\n            <a href=\"javascript:;\" data-toggle=\"tooltip\" data-title=\"{{i18n .Lang \"doc.changetheme\"}}\"><i class=\"fa fa-paint-brush item\" aria-hidden=\"true\" name=\"changetheme\"></i></a>\n        </div>\n\n        <div class=\"editormd-group pull-right\">\n            <!--<a target=\"_blank\" href=\"{{urlfor \"DocumentController.Read\" \":key\" .Model.Identify \":id\" \"\"}}\" data-toggle=\"tooltip\" data-title=\"{{i18n .Lang \"blog.preview\"}}\"><i class=\"fa fa-external-link\" name=\"preview-open\" aria-hidden=\"true\"></i></a>-->\n            <a href=\"{{urlfor \"DocumentController.Read\" \":key\" .Model.Identify \":id\" \"\"}}\" data-toggle=\"tooltip\" data-title=\"{{i18n .Lang \"blog.preview\"}}\"><i class=\"fa fa-external-link\" name=\"preview-open\" aria-hidden=\"true\"></i></a>\n            <a href=\"javascript:;\" data-toggle=\"tooltip\" data-title=\"{{i18n .Lang \"doc.publish\"}}\"><i class=\"fa fa-cloud-upload\" name=\"release\" aria-hidden=\"true\"></i></a>\n        </div>\n\n        <div class=\"editormd-group\">\n            <a href=\"javascript:;\" data-toggle=\"tooltip\" data-title=\"\"></a>\n            <a href=\"javascript:;\" data-toggle=\"tooltip\" data-title=\"\"></a>\n        </div>\n\n        <div class=\"clearfix\"></div>\n    </div>\n    <div class=\"manual-body\">\n        <div class=\"manual-category\" id=\"manualCategory\" style=\"position:absolute;\">\n            <div class=\"manual-nav\">\n                <div class=\"nav-item active\"><i class=\"fa fa-bars\" aria-hidden=\"true\"></i> {{i18n .Lang \"doc.document\"}}</div>\n                <div class=\"nav-plus pull-right\" id=\"btnAddDocument\" data-toggle=\"tooltip\" data-title=\"{{i18n .Lang \"doc.create_doc\"}}\" data-direction=\"right\"><i class=\"fa fa-plus\" aria-hidden=\"true\"></i></div>\n                <div class=\"clearfix\"></div>\n            </div>\n            <div class=\"manual-tree\" id=\"sidebar\"> </div>\n        </div>\n        <div class=\"manual-editor-container\" id=\"manualEditorContainer\" style=\"min-width: 920px;\">\n            <div class=\"manual-editormd\">\n                <div id=\"docEditor\" class=\"manual-editormd-active\"></div>\n            </div>\n            <div class=\"manual-editor-status\">\n                <div id=\"attachInfo\" class=\"item\">0 {{i18n .Lang \"doc.attachments\"}}</div>\n            </div>\n        </div>\n\n    </div>\n</div>\n<!-- 创建文档 -->\n<div class=\"modal fade\" id=\"addDocumentModal\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"addDocumentModalLabel\">\n    <div class=\"modal-dialog\" role=\"document\">\n        <form method=\"post\" action=\"{{urlfor \"DocumentController.Create\" \":key\" .Model.Identify}}\" id=\"addDocumentForm\" class=\"form-horizontal\">\n            <input type=\"hidden\" name=\"identify\" value=\"{{.Model.Identify}}\">\n            <input type=\"hidden\" name=\"doc_id\" value=\"0\">\n            <input type=\"hidden\" name=\"parent_id\" value=\"0\">\n        <div class=\"modal-content\">\n            <div class=\"modal-header\">\n                <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\"><span aria-hidden=\"true\">&times;</span></button>\n                <h4 class=\"modal-title\" id=\"myModalLabel\">{{i18n .Lang \"doc.create_doc\"}}</h4>\n            </div>\n            <div class=\"modal-body\">\n                <div class=\"form-group\">\n                    <label class=\"col-sm-2 control-label\">{{i18n .Lang \"doc.doc_name\"}} <span class=\"error-message\">*</span></label>\n                    <div class=\"col-sm-10\">\n                        <input type=\"text\" name=\"doc_name\" id=\"documentName\" placeholder=\"{{i18n .Lang \"doc.doc_name\"}}\" class=\"form-control\"  maxlength=\"50\">\n                        <p style=\"color: #999;font-size: 12px;\">{{i18n .Lang \"doc.doc_name_tips\"}}</p>\n\n                    </div>\n                </div>\n                <div class=\"form-group\">\n                    <label class=\"col-sm-2 control-label\">{{i18n .Lang \"doc.doc_id\"}} <span class=\"error-message\">&nbsp;</span></label>\n                    <div class=\"col-sm-10\">\n                        <input type=\"text\" name=\"doc_identify\" id=\"documentIdentify\" placeholder=\"{{i18n .Lang \"doc.doc_id\"}}\" class=\"form-control\" maxlength=\"50\">\n                        <p style=\"color: #999;font-size: 12px;\">{{i18n .Lang \"doc.doc_id_tips\"}}</p>\n                    </div>\n\n                </div>\n                <div class=\"form-group\">\n                        <div class=\"col-lg-4\">\n                            <label>\n                                <input type=\"radio\" name=\"is_open\" value=\"1\"> {{i18n .Lang \"doc.expand\"}}<span class=\"text\">{{i18n .Lang \"doc.expand_desc\"}}</span>\n                            </label>\n                        </div>\n                        <div class=\"col-lg-4\">\n                            <label>\n                                <input type=\"radio\" name=\"is_open\" value=\"0\" checked> {{i18n .Lang \"doc.fold\"}}<span class=\"text\">{{i18n .Lang \"doc.fold_desc\"}}</span>\n                            </label>\n                        </div>\n                    <div class=\"col-lg-4\">\n                        <label>\n                            <input type=\"radio\" name=\"is_open\" value=\"2\"> {{i18n .Lang \"doc.empty_contents\"}}<span class=\"text\">{{i18n .Lang \"doc.empty_contents_desc\"}}</span>\n                        </label>\n                    </div>\n                    <div class=\"clearfix\"></div>\n                </div>\n            </div>\n            <div class=\"modal-footer\">\n                <span id=\"add-error-message\" class=\"error-message\"></span>\n                <button type=\"button\" class=\"btn btn-default\" data-dismiss=\"modal\">{{i18n .Lang \"common.cancel\"}}</button>\n                <button type=\"submit\" class=\"btn btn-primary\" id=\"btnSaveDocument\" data-loading-text=\"{{i18n .Lang \"message.processing\"}}\">{{i18n .Lang \"doc.save\"}}</button>\n            </div>\n        </div>\n        </form>\n    </div>\n</div>\n\n<!-- 显示附件 --->\n<div class=\"modal fade\" id=\"uploadAttachModal\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"uploadAttachModalLabel\">\n    <div class=\"modal-dialog\" role=\"document\">\n        <form method=\"post\" id=\"uploadAttachModalForm\" class=\"form-horizontal\">\n            <div class=\"modal-content\">\n                <div class=\"modal-header\">\n                    <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\"><span aria-hidden=\"true\">&times;</span></button>\n                    <h4 class=\"modal-title\" id=\"myModalLabel\">{{i18n .Lang \"doc.upload_attachment\"}}</h4>\n                </div>\n                <div class=\"modal-body\">\n                    <div class=\"attach-drop-panel\">\n                        <div class=\"upload-container\" id=\"filePicker\"><i class=\"fa fa-upload\" aria-hidden=\"true\"></i></div>\n                    </div>\n                    <div class=\"attach-list\" id=\"attachList\">\n                        <template v-for=\"item in lists\">\n                            <div class=\"attach-item\" :id=\"item.attachment_id\">\n                                <template v-if=\"item.state == 'wait'\">\n                                    <div class=\"progress\">\n                                        <div class=\"progress-bar progress-bar-success\" role=\"progressbar\" aria-valuenow=\"40\" aria-valuemin=\"0\" aria-valuemax=\"100\">\n                                            <span class=\"sr-only\">0% Complete (success)</span>\n                                        </div>\n                                    </div>\n                                </template>\n                                <template v-else-if=\"item.state == 'error'\">\n                                    <span class=\"error-message\">${item.message}</span>\n                                    <button type=\"button\" class=\"btn btn-sm close\" @click=\"removeAttach(item.attachment_id)\">\n                                        <i class=\"fa fa-remove\" aria-hidden=\"true\"></i>\n                                    </button>\n                                </template>\n                                <template v-else>\n                                    <a :href=\"item.http_path\" target=\"_blank\" :title=\"item.file_name\">${item.file_name}</a>\n                                    <span class=\"text\">(${ formatBytes(item.file_size) })</span>\n                                    <span class=\"error-message\">${item.message}</span>\n                                    <button type=\"button\" class=\"btn btn-sm close\" @click=\"removeAttach(item.attachment_id)\">\n                                        <i class=\"fa fa-remove\" aria-hidden=\"true\"></i>\n                                    </button>\n                                    <div class=\"clearfix\"></div>\n                                </template>\n                            </div>\n                        </template>\n                    </div>\n                </div>\n                <div class=\"modal-footer\">\n                    <span id=\"add-error-message\" class=\"error-message\"></span>\n                    <button type=\"button\" class=\"btn btn-default\" data-dismiss=\"modal\">{{i18n .Lang \"common.cancel\"}}</button>\n                    <button type=\"button\" class=\"btn btn-primary\" id=\"btnUploadAttachFile\" data-dismiss=\"modal\">{{i18n .Lang \"common.confirm\"}}</button>\n                </div>\n            </div>\n        </form>\n    </div>\n</div>\n<!-- 显示文档历史 -->\n<div class=\"modal fade\" id=\"documentHistoryModal\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"documentHistoryModalModalLabel\">\n    <div class=\"modal-dialog\" role=\"document\">\n        <div class=\"modal-content\">\n            <div class=\"modal-header\">\n                <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\"><span aria-hidden=\"true\">&times;</span></button>\n                <h4 class=\"modal-title\">{{i18n .Lang \"doc.doc_history\"}}</h4>\n            </div>\n            <div class=\"modal-body text-center\" id=\"historyList\">\n\n            </div>\n            <div class=\"modal-footer\">\n                <button type=\"button\" class=\"btn btn-default\" data-dismiss=\"modal\">{{i18n .Lang \"doc.close\"}}</button>\n            </div>\n        </div>\n    </div>\n</div>\n<!--- 选择模板--->\n<div class=\"modal fade\" id=\"documentTemplateModal\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"{{i18n .Lang \"doc.choose_template_type\"}}\" aria-hidden=\"true\">\n    <div class=\"modal-dialog\" style=\"width: 780px;\">\n        <div class=\"modal-content\">\n            <div class=\"modal-header\">\n                <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\"><span aria-hidden=\"true\">&times;</span></button>\n                <h4 class=\"modal-title\" id=\"modal-title\">{{i18n .Lang \"doc.choose_template_type\"}}</h4>\n            </div>\n            <div class=\"modal-body template-list\">\n                <div class=\"container\">\n                    <div class=\"section\">\n                        <a data-type=\"normal\" href=\"javascript:;\"><i class=\"fa fa-file-o\"></i></a>\n                        <h3><a data-type=\"normal\" href=\"javascript:;\">{{i18n .Lang \"doc.normal_tpl\"}}</a></h3>\n                        <ul>\n                            <li>{{i18n .Lang \"doc.tpl_default_type\"}}</li>\n                            <li>{{i18n .Lang \"doc.tpl_plain_text\"}}</li>\n                        </ul>\n                    </div>\n                    <div class=\"section\">\n                        <a data-type=\"api\" href=\"javascript:;\"><i class=\"fa fa-file-code-o\"></i></a>\n                        <h3><a data-type=\"api\" href=\"javascript:;\">{{i18n .Lang \"doc.api_tpl\"}}</a></h3>\n                        <ul>\n                            <li>{{i18n .Lang \"doc.for_api_doc\"}}</li>\n                            <li>{{i18n .Lang \"doc.code_highlight\"}}</li>\n                        </ul>\n                    </div>\n                    <div class=\"section\">\n                        <a data-type=\"code\" href=\"javascript:;\"><i class=\"fa fa-book\"></i></a>\n\n                        <h3><a data-type=\"code\" href=\"javascript:;\">{{i18n .Lang \"doc.data_dict\"}}</a></h3>\n                        <ul>\n                            <li>{{i18n .Lang \"doc.for_data_dict\"}}</li>\n                            <li>{{i18n .Lang \"doc.form_support\"}}</li>\n                        </ul>\n                    </div>\n                    <div class=\"section\">\n                        <a data-type=\"customs\" href=\"javascript:;\"><i class=\"fa fa-briefcase\"></i></a>\n\n                        <h3><a data-type=\"customs\" href=\"javascript:;\">{{i18n .Lang \"doc.custom_tpl\"}}</a></h3>\n                        <ul>\n                            <li>{{i18n .Lang \"doc.any_type_doc\"}}</li>\n                            <li>{{i18n .Lang \"doc.as_global_tpl\"}}</li>\n                        </ul>\n                    </div>\n                </div>\n\n            </div>\n            <div class=\"modal-footer\">\n                <button type=\"button\" class=\"btn btn-default\" data-dismiss=\"modal\">{{i18n .Lang \"common.cancel\"}}</button>\n            </div>\n        </div>\n    </div>\n</div>\n<!--- 显示自定义模板--->\n<div class=\"modal fade\" id=\"displayCustomsTemplateModal\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"displayCustomsTemplateModalLabel\">\n    <div class=\"modal-dialog\" role=\"document\" style=\"width: 750px;\">\n        <div class=\"modal-content\">\n            <div class=\"modal-header\">\n                <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\"><span aria-hidden=\"true\">&times;</span></button>\n                <h4 class=\"modal-title\">{{i18n .Lang \"doc.custom_tpl\"}}</h4>\n            </div>\n            <div class=\"modal-body text-center\" id=\"displayCustomsTemplateList\">\n                <div class=\"table-responsive\">\n                    <table class=\"table table-hover\">\n                        <thead>\n                        <tr>\n                            <td>#</td>\n                            <td class=\"col-sm-3\">{{i18n $.Lang \"doc.tpl_name\"}}</td>\n                            <td class=\"col-sm-2\">{{i18n $.Lang \"doc.tpl_type\"}}</td>\n                            <td class=\"col-sm-2\">{{i18n $.Lang \"doc.creator\"}}</td>\n                            <td class=\"col-sm-3\">{{i18n $.Lang \"doc.create_time\"}}</td>\n                            <td class=\"col-sm-2\">{{i18n $.Lang \"doc.operation\"}}</td>\n                        </tr>\n                        </thead>\n                        <tbody>\n                        <tr>\n                            <td colspan=\"7\" class=\"text-center\">{{i18n .Lang \"message.no_data\"}}</td>\n                        </tr>\n                        </tbody>\n                    </table>\n                </div>\n            </div>\n            <div class=\"modal-footer\">\n                <button type=\"button\" class=\"btn btn-default\" data-dismiss=\"modal\">{{i18n .Lang \"doc.close\"}}</button>\n            </div>\n        </div>\n    </div>\n</div>\n<!--- 创建模板--->\n<div class=\"modal fade\" id=\"saveTemplateModal\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"saveTemplateModalLabel\">\n    <div class=\"modal-dialog\" role=\"document\">\n        <div class=\"modal-content\">\n            <form method=\"post\" action=\"{{urlfor \"TemplateController.Add\"}}\" id=\"saveTemplateForm\" class=\"form-horizontal\">\n                <input type=\"hidden\" name=\"identify\" value=\"{{.Model.Identify}}\">\n                <input type=\"hidden\" name=\"content\">\n                <div class=\"modal-header\">\n                    <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\"><span aria-hidden=\"true\">&times;</span></button>\n                    <h4 class=\"modal-title\">{{i18n .Lang \"doc.save_as_tpl\"}}</h4>\n                </div>\n                <div class=\"modal-body text-center\">\n                    <div class=\"form-group\">\n                        <label class=\"col-sm-2 control-label\">{{i18n .Lang \"doc.tpl_name\"}} <span class=\"error-message\">*</span></label>\n                        <div class=\"col-sm-10\">\n                            <input type=\"text\" name=\"template_name\" id=\"templateName\" placeholder=\"{{i18n .Lang \"doc.tpl_name\"}}\" class=\"form-control\"  maxlength=\"50\">\n                        </div>\n                    </div>\n                    {{if eq .Member.Role 0 1}}\n                    <div class=\"form-group\">\n                        <div class=\"col-lg-6\">\n                            <label>\n                                <input type=\"radio\" name=\"is_global\" value=\"1\"> {{i18n .Lang \"doc.global_tpl\"}}<span class=\"text\">{{i18n .Lang \"doc.global_tpl_desc\"}}</span>\n                            </label>\n                        </div>\n                        <div class=\"col-lg-6\">\n                            <label>\n                                <input type=\"radio\" name=\"is_global\" value=\"0\" checked> {{i18n .Lang \"doc.project_tpl\"}}<span class=\"text\">{{i18n .Lang \"doc.project_tpl_desc\"}}</span>\n                            </label>\n                        </div>\n                        <div class=\"clearfix\"></div>\n                    </div>\n                    {{end}}\n                </div>\n                <div class=\"modal-footer\">\n                    <span class=\"error-message show-error-message\"></span>\n                    <button type=\"button\" class=\"btn btn-default\" data-dismiss=\"modal\">{{i18n .Lang \"common.cancel\"}}</button>\n                    <button type=\"submit\" class=\"btn btn-primary\" id=\"btnSaveTemplate\" data-loading-text=\"{{i18n .Lang \"message.processing\"}}\">{{i18n .Lang \"doc.save\"}}</button>\n                </div>\n            </form>\n        </div>\n    </div>\n</div>\n<!--- json转换为表格 -->\n<div class=\"modal fade\" id=\"convertJsonToTableModal\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"convertJsonToTableModalLabel\">\n    <div class=\"modal-dialog\" role=\"document\">\n        <div class=\"modal-content\">\n            <form method=\"post\" id=\"convertJsonToTableForm\" class=\"form-horizontal\">\n                <div class=\"modal-header\">\n                    <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\"><span aria-hidden=\"true\">&times;</span></button>\n                    <h4 class=\"modal-title\">{{i18n .Lang \"doc.json_to_table\"}}</h4>\n                </div>\n                <div class=\"modal-body text-center\">\n                        <textarea type=\"text\" name=\"jsonContent\" id=\"jsonContent\" placeholder=\"Json\" class=\"form-control\" style=\"height: 300px;resize: none\"></textarea>\n\n                </div>\n                <div class=\"modal-footer\">\n                    <span id=\"json-error-message\"></span>\n                    <button type=\"button\" class=\"btn btn-default\" data-dismiss=\"modal\">{{i18n .Lang \"common.cancel\"}}</button>\n                    <button type=\"button\" class=\"btn btn-primary\" id=\"btnInsertTable\" data-loading-text=\"{{i18n .Lang \"message.processing\"}}\">{{i18n .Lang \"doc.insert\"}}</button>\n                </div>\n            </form>\n        </div>\n    </div>\n</div>\n<template id=\"template-normal\">\n{{if eq .Lang \"en-us\"}}\n{{template \"document/template_normal-en.tpl\"}}\n{{else}}\n{{template \"document/template_normal.tpl\"}}\n{{end}}\n</template>\n<template id=\"template-api\">\n{{if eq .Lang \"en-us\"}}\n{{template \"document/template_api-en.tpl\"}}\n{{else}}\n{{template \"document/template_api.tpl\"}}\n{{end}}\n</template>\n<template id=\"template-code\">\n{{if eq .Lang \"en-us\"}}\n{{template \"document/template_code-en.tpl\"}}\n{{else}}\n{{template \"document/template_code.tpl\"}}\n{{end}}\n</template>\n<script src=\"{{cdnjs \"/static/js/array.js\" \"version\"}}\" type=\"text/javascript\"></script>\n<script src=\"{{cdnjs \"/static/jquery/1.12.4/jquery.min.js\"}}\"></script>\n<script src=\"{{cdnjs \"/static/vuejs/vue.min.js\"}}\" type=\"text/javascript\"></script>\n<script src=\"{{cdnjs \"/static/bootstrap/js/bootstrap.min.js\"}}\"></script>\n<script src=\"{{cdnjs \"/static/webuploader/webuploader.min.js\"}}\" type=\"text/javascript\"></script>\n<script src=\"{{cdnjs \"/static/jstree/3.3.4/jstree.min.js\"}}\" type=\"text/javascript\"></script>\n<script src=\"{{cdnjs \"/static/editor.md/editormd.js\" \"version\"}}\" type=\"text/javascript\"></script>\n<script src=\"{{cdnjs \"/static/layer/layer.js\"}}\" type=\"text/javascript\" ></script>\n<script src=\"{{cdnjs \"/static/js/jquery.form.js\"}}\" type=\"text/javascript\"></script>\n<script src=\"{{cdnjs \"/static/js/array.js\" \"version\"}}\" type=\"text/javascript\"></script>\n<script src=\"{{cdnjs \"/static/js/editor.js\" \"version\"}}\" type=\"text/javascript\"></script>\n<script src=\"{{cdnjs \"/static/table-editor/dist/index.js\" \"version\"}}\" type=\"text/javascript\"></script>\n<script src=\"{{cdnjs \"/static/js/markdown.js\" \"version\"}}\" type=\"text/javascript\"></script>\n<script src=\"{{cdnjs \"/static/js/custom-elements-builtin-0.6.5.min.js\"}}\" type=\"text/javascript\"></script>\n<script src=\"{{cdnjs \"/static/js/x-frame-bypass-1.0.2.js\"}}\" type=\"text/javascript\"></script>\n<script src=\"{{cdnjs \"/static/mammoth/mammoth.browser.js\"}}\" type=\"text/javascript\"></script>\n<script src=\"{{cdnjs \"/static/turndown/turndown.js\"}}\" type=\"text/javascript\"></script>\n<script src=\"{{cdnjs \"/static/js/word-to-html.js\"}}\" type=\"text/javascript\"></script>\n<script src=\"{{cdnjs \"/static/js/html-to-markdown.js\"}}\" type=\"text/javascript\"></script>\n<script type=\"text/javascript\">\n    $(function () {\n        editLangPath = {{cdnjs \"/static/editor.md/languages/\"}} + lang\n        if(lang != 'zh-CN') {\n            editormd.loadScript(editLangPath, function(){\n                window.editor.lang = editormd.defaults.lang;\n                window.editor.recreate()\n            });\n        }\n        \n        $(\"#attachInfo\").on(\"click\",function () {\n            $(\"#uploadAttachModal\").modal(\"show\");\n        });\n        window.uploader = null;\n\n        $(\"#uploadAttachModal\").on(\"shown.bs.modal\",function () {\n            if(window.uploader === null){\n                try {\n                    window.uploader = WebUploader.create({\n                        auto: true,\n                        dnd : true,\n                        swf: '{{.BaseUrl}}/static/webuploader/Uploader.swf',\n                        server: '{{urlfor \"DocumentController.Upload\"}}',\n                        formData : { \"identify\" : {{.Model.Identify}},\"doc_id\" :  window.selectNode.id },\n                        pick: \"#filePicker\",\n                        fileVal : \"editormd-file-file\",\n                        compress : false,\n                        fileSingleSizeLimit: {{.UploadFileSize}}\n                    }).on(\"beforeFileQueued\",function (file) {\n                        // uploader.reset();\n                        this.options.formData.doc_id = window.selectNode.id;\n                    }).on( 'fileQueued', function( file ) {\n                        var item = {\n                            state : \"wait\",\n                            attachment_id : file.id,\n                            file_size : file.size,\n                            file_name : file.name,\n                            message : \"{{i18n .Lang \"doc.uploading\"}}\"\n                        };\n                        window.vueApp.lists.push(item);\n\n                    }).on(\"uploadError\",function (file,reason) {\n                        for(var i in window.vueApp.lists){\n                            var item = window.vueApp.lists[i];\n                            if(item.attachment_id == file.id){\n                                item.state = \"error\";\n                                item.message = \"{{i18n .Lang \"message.upload_failed\"}}:\" + reason;\n                                break;\n                            }\n                        }\n\n                    }).on(\"uploadSuccess\",function (file, res) {\n                        for(var index in window.vueApp.lists){\n                            var item = window.vueApp.lists[index];\n                            if(item.attachment_id === file.id){\n                                if(res.errcode === 0) {\n                                    window.vueApp.lists.splice(index, 1, res.attach ? res.attach : res.data);\n                                }else{\n                                    item.message = res.message;\n                                    item.state = \"error\";\n                                }\n                            }\n                        }\n                    }).on(\"uploadProgress\",function (file, percentage) {\n                        var $li = $( '#'+file.id ),\n                            $percent = $li.find('.progress .progress-bar');\n\n                        $percent.css( 'width', percentage * 100 + '%' );\n                    }).on(\"error\", function (type) {\n                        if(type === \"F_EXCEED_SIZE\"){\n                            layer.msg(\"{{i18n .Lang \"message.upload_file_size_limit\"}}\");\n                        }\n                        console.log(type);\n                    });\n                }catch(e){\n                    console.log(e);\n                }\n            }\n        });\n    });\n</script>\n</body>\n</html>"
  },
  {
    "path": "views/document/new_html_edit_template.tpl",
    "content": "<!DOCTYPE html>\n<html lang=\"zh-CN\">\n<head>\n    <meta charset=\"utf-8\">\n    <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n\n    <title>{{i18n .Lang \"doc.edit_doc\"}} - Powered by MinDoc</title>\n    <script type=\"text/javascript\">\n        window.IS_ENABLE_IFRAME = '{{conf \"enable_iframe\" }}' === 'true';\n        window.BASE_URL = '{{urlfor \"HomeController.Index\" }}';\n    </script>\n    <script type=\"text/javascript\">\n        window.editor = null;\n        window.imageUploadURL = \"{{urlfor \"DocumentController.Upload\" \"identify\" .Model.Identify}}\";\n        window.fileUploadURL = \"{{urlfor \"DocumentController.Upload\" \"identify\" .Model.Identify}}\";\n        window.documentCategory = {{.Result}};\n        window.book = {{.ModelResult}};\n        window.selectNode = null;\n        window.deleteURL = \"{{urlfor \"DocumentController.Delete\" \":key\" .Model.Identify}}\";\n        window.editURL = \"{{urlfor \"DocumentController.Content\" \":key\" .Model.Identify \":id\" \"\"}}\";\n        window.releaseURL = \"{{urlfor \"BookController.Release\" \":key\" .Model.Identify}}\";\n        window.sortURL = \"{{urlfor \"BookController.SaveSort\" \":key\" .Model.Identify}}\";\n        window.historyURL = \"{{urlfor \"DocumentController.History\"}}\";\n        window.removeAttachURL = \"{{urlfor \"DocumentController.RemoveAttachment\"}}\";\n        window.highlightStyle = \"{{.HighlightStyle}}\";\n        window.lang = {{i18n $.Lang \"common.js_lang\"}};\n    </script>\n    <!-- Bootstrap -->\n    <link href=\"{{cdncss \"/static/bootstrap/css/bootstrap.min.css\"}}\" rel=\"stylesheet\">\n    <link href=\"{{cdncss \"/static/font-awesome/css/font-awesome.min.css\"}}\" rel=\"stylesheet\">\n    <link href=\"{{cdncss \"/static/jstree/3.3.4/themes/default/style.min.css\"}}\" rel=\"stylesheet\">\n    <link href=\"{{cdncss \"/static/css/jstree.css\"}}\" rel=\"stylesheet\">\n    <link href=\"{{cdncss \"/static/webuploader/webuploader.css\"}}\" rel=\"stylesheet\">\n    <link href=\"{{cdncss \"/static/css/markdown.css\" \"version\"}}\" rel=\"stylesheet\">\n    <link href=\"{{cdncss \"/static/prettify/themes/atelier-estuary-dark.min.css\"}}\" rel=\"stylesheet\">\n    <link href=\"{{cdncss \"/static/css/markdown.preview.css\" \"version\"}}\" rel=\"stylesheet\">\n    <link href=\"{{cdncss (print \"/static/editor.md/lib/highlight/styles/\" .HighlightStyle \".css\") \"version\"}}\" rel=\"stylesheet\">\n    <link href=\"{{cdncss \"/static/katex/katex.min.css\"}}\" rel=\"stylesheet\">\n    <link href=\"{{cdncss \"/static/quill/quill.core.css\"}}\" rel=\"stylesheet\">\n    <link href=\"{{cdncss \"/static/quill/quill.snow.css\"}}\" rel=\"stylesheet\">\n    <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->\n    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->\n    <!--[if lt IE 9]>\n    <script src=\"/static/html5shiv/3.7.3/html5shiv.min.js\"></script>\n    <script src=\"/static/respond.js/1.4.2/respond.min.js\"></script>\n    <![endif]-->\n    <style type=\"text/css\">\n        .modal{z-index: 999999999;}\n        #docEditor {\n            overflow:auto;\n            border: 1px solid #ddd;\n            border-left: none;\n            height: 100%;\n            outline:none;\n            padding: 5px 5px 30px 5px;\n        }\n        #docEditor p{\n            margin-bottom: 14px;\n            line-height: 1.7em;\n            font-size: 14px;\n            color: #5D5D5D;\n        }\n        .ql-picker-options{z-index: 99999;}\n        .btn-info{background-color: #ffffff !important;}\n        .btn-info>i{background-color: #cacbcd !important; color: #393939 !important; box-shadow: inset 0 0 0 1px transparent,inset 0 0 0 0 rgba(34,36,38,.15);}\n        .editor-wrapper>pre{padding: 0;}\n        .editor-wrapper .editor-code{\n            font-size: 13px;\n            line-height: 1.8em;\n            color: #dcdcdc;\n            border-radius: 3px;\n            display: block;\n            overflow-x: auto;\n            padding: 0.5em;\n            background: #3f3f3f;\n        }\n        .editor-wrapper-selected .editor-code{border: 1px solid #1e88e5;}\n\n        .ql-toolbar.ql-snow{\n            border: none !important;\n        }\n        .editor-group{\n            float: left;\n            height: 32px;\n            margin-right: 10px;\n        }\n\n        .editor-group .editor-item,.editor-group .editor-item-select>.ql-picker-label{\n            float: left;\n            display: inline-block;\n            min-width: 34px;\n            height: 30px !important;\n            padding: 5px;\n            line-height: 30px;\n            text-align: center;\n            color: #4b4b4b;\n            border-top: 1px solid #ccc !important;\n            border-left: 1px solid #ccc !important;\n            border-bottom: 1px solid #ccc !important;\n            background: #fff;\n            border-radius: 0;\n            font-size: 12px\n        }\n        .ql-snow .ql-picker.ql-expanded .ql-picker-options{\n            margin-top: 5px;\n        }\n        .editor-group .editor-item-select>.ql-picker-label{\n            border-right: 1px solid #ccc !important;\n        }\n        .editor-group .editor-item-single-select>.ql-picker-label{\n            border-radius: 4px;\n            padding: 0;\n        }\n\n        .editor-group .editor-item-last{\n            border-right: 1px solid #ccc !important;\n            border-radius: 0 4px 4px 0;\n        }\n        .editor-group .editor-item-first{\n            border-right: 0;\n            border-radius: 4px  0 0 4px;\n        }\n        .editor-group .disabled:hover{\n            background: #ffffff !important;\n        }\n        .editor-group .editor-item-change:hover{\n             background-color: #58CB48 !important;\n        }\n        .editor-group  .editor-item:hover {\n            background-color: #e4e4e4;\n            color: #4b4b4b !important;\n        }\n\n        .editor-group a{\n            float: left;\n        }\n\n        .editor-group .change i{\n            color: #ffffff;\n            background-color: #44B036 !important;\n            border: 1px #44B036 solid !important;\n        }\n        .editor-group .change i:hover{\n            background-color: #58CB48 !important;\n        }\n        .editor-group .disabled i:hover{\n            background: #ffffff !important;\n        }\n        .editor-group a.disabled{\n            border-color: #c9c9c9;\n            opacity: .6;\n            cursor: default\n        }\n        .editor-group a>i{\n            display: inline-block;\n            width: 34px !important;\n            height: 30px !important;\n            line-height: 30px;\n            text-align: center;\n            color: #4b4b4b;\n            border: 1px solid #ccc;\n            background: #fff;\n            border-radius: 4px;\n            font-size: 15px\n        }\n        .editor-group a>i.item{\n            border-radius: 0;\n            border-right: 0;\n        }\n        .editor-group a>i.last{\n            border-bottom-left-radius:0;\n            border-top-left-radius:0;\n        }\n        .editor-group a>i.first{\n            border-right: 0;\n            border-bottom-right-radius:0;\n            border-top-right-radius:0;\n        }\n        .editor-group  a i:hover {\n            background-color: #e4e4e4\n        }\n\n        .editor-group  a i:after {\n            display: block;\n            overflow: hidden;\n            line-height: 30px;\n            text-align: center;\n            font-family: icomoon,Helvetica,Arial,sans-serif;\n            font-style: normal;\n        }\n    </style>\n</head>\n<body>\n\n<div class=\"m-manual manual-editor\">\n    <div class=\"manual-head btn-toolbar\" id=\"editormd-tools\"  style=\"min-width: 1260px;\" data-role=\"editor-toolbar\" data-target=\"#editor\">\n        <div class=\"editor-group\">\n            <a href=\"{{urlfor \"BookController.Index\"}}\" data-toggle=\"tooltip\" data-title=\"{{i18n .Lang \"doc.backward\"}}\"><i class=\"fa fa-chevron-left\" aria-hidden=\"true\"></i></a>\n        </div>\n        <div class=\"editor-group\">\n            <a href=\"javascript:;\" id=\"markdown-save\" data-toggle=\"tooltip\" data-title=\"{{i18n .Lang \"doc.save\"}}\" class=\"disabled save\"><i class=\"fa fa-save first\" aria-hidden=\"true\" name=\"save\"></i></a>\n            <a href=\"javascript:;\" data-toggle=\"tooltip\" data-title=\"{{i18n .Lang \"doc.publish\"}}\" id=\"btnRelease\"><i class=\"fa fa-cloud-upload last\" name=\"release\" aria-hidden=\"true\"></i></a>\n        </div>\n        <div class=\"editor-group\">\n            <a href=\"javascript:;\" data-toggle=\"tooltip\" data-title=\"{{i18n .Lang \"doc.undo\"}} (Ctrl-Z)\" class=\"ql-undo\"><i class=\"fa fa-undo first\" name=\"undo\" unselectable=\"on\"></i></a>\n            <a href=\"javascript:;\" data-toggle=\"tooltip\" data-title=\"{{i18n .Lang \"doc.redo\"}} (Ctrl-Y)\" class=\"ql-redo\"><i class=\"fa fa-repeat last\" name=\"redo\" unselectable=\"on\"></i></a>\n        </div>\n        <div class=\"editor-group\">\n            <select data-toggle=\"tooltip\" data-title=\"{{i18n .Lang \"doc.font_size\"}}\" title=\"{{i18n .Lang \"doc.font_size\"}}\" class=\"ql-size editor-item-select editor-item-single-select\"></select>\n        </div>\n        <div class=\"editor-group\">\n            <button data-toggle=\"tooltip\" data-title=\"{{i18n .Lang \"doc.bold\"}}\" class=\"ql-bold editor-item editor-item-first\"></button>\n            <button data-toggle=\"tooltip\" data-title=\"{{i18n .Lang \"doc.italic\"}}\" class=\"ql-italic editor-item\"></button>\n            <button data-toggle=\"tooltip\" data-title=\"{{i18n .Lang \"doc.strikethrough\"}}\" class=\"ql-strike editor-item\"></button>\n            <button data-toggle=\"tooltip\" data-title=\"{{i18n .Lang \"doc.underscore\"}}\" class=\"ql-underline editor-item editor-item-last\"></button>\n        </div>\n        <div class=\"editor-group\">\n            <button data-toggle=\"tooltip\" data-title=\"{{i18n .Lang \"doc.h1\"}}\" class=\"ql-header editor-item editor-item-first\" value=\"1\"></button>\n            <button data-toggle=\"tooltip\" data-title=\"{{i18n .Lang \"doc.h2\"}}\" class=\"ql-header editor-item\" value=\"2\"></button>\n            <button data-toggle=\"tooltip\" data-title=\"{{i18n .Lang \"doc.h3\"}}\" class=\"ql-header editor-item\" value=\"3\"></button>\n            <button data-toggle=\"tooltip\" data-title=\"{{i18n .Lang \"doc.h4\"}}\" class=\"ql-header editor-item\" value=\"4\"></button>\n            <button data-toggle=\"tooltip\" data-title=\"{{i18n .Lang \"doc.h5\"}}\" class=\"ql-header editor-item\" value=\"5\"></button>\n            <button data-toggle=\"tooltip\" data-title=\"{{i18n .Lang \"doc.h6\"}}\" class=\"ql-header editor-item editor-item-last\" value=\"6\"></button>\n        </div>\n        <div class=\"editor-group\">\n            <button data-toggle=\"tooltip\" data-title=\"{{i18n .Lang \"doc.unorder_list\"}}\" class=\"ql-list editor-item editor-item-first\" value=\"ordered\"></button>\n            <button data-toggle=\"tooltip\" data-title=\"{{i18n .Lang \"doc.order_list\"}}\" class=\"ql-list editor-item\" value=\"bullet\"></button>\n            <button data-toggle=\"tooltip\" data-title=\"{{i18n .Lang \"doc.right_intent\"}}\" class=\"ql-indent editor-item\" value=\"-1\"></button>\n            <button data-toggle=\"tooltip\" data-title=\"{{i18n .Lang \"doc.left_intent\"}}\" class=\"ql-indent editor-item\" value=\"+1\"></button>\n            <button data-toggle=\"tooltip\" data-title=\"{{i18n .Lang \"doc.subscript\"}}\" class=\"ql-script editor-item\" value=\"sub\"></button>\n            <button data-toggle=\"tooltip\" data-title=\"{{i18n .Lang \"doc.superscript\"}}\" class=\"ql-script editor-item editor-item-last\" value=\"super\"></button>\n        </div>\n        <div class=\"editor-group ql-formats\">\n            <button data-toggle=\"tooltip\" data-title=\"{{i18n .Lang \"doc.link\"}}\" class=\"ql-link editor-item editor-item-first\"></button>\n            <button data-toggle=\"tooltip\" data-title=\"{{i18n .Lang \"doc.clear_format\"}}\" class=\"ql-clean editor-item\"></button>\n            <button data-toggle=\"tooltip\" data-title=\"{{i18n .Lang \"doc.add_pic\"}}\" class=\"ql-image editor-item\"></button>\n            <button data-toggle=\"tooltip\" data-title=\"{{i18n .Lang \"doc.add_video\"}}\" class=\"ql-video editor-item\"></button>\n            <button data-toggle=\"tooltip\" data-title=\"{{i18n .Lang \"doc.code\"}}\" class=\"ql-code-block editor-item\"></button>\n            <button data-toggle=\"tooltip\" data-title=\"{{i18n .Lang \"doc.quote\"}}\" class=\"ql-blockquote editor-item\"><i class=\"fa fa-quote-right item\" name=\"quote\" unselectable=\"on\"></i></button>\n            <button data-toggle=\"tooltip\" data-title=\"{{i18n .Lang \"doc.formula\"}}\" class=\"ql-formula editor-item\"><i class=\"fa fa-tasks item\" name=\"tasks\" aria-hidden=\"true\"></i></button>\n            <select data-toggle=\"tooltip\" data-title=\"{{i18n .Lang \"doc.font_color\"}}\" class=\"ql-color ql-picker ql-color-picker editor-item-select\" ></select>\n            <select data-toggle=\"tooltip\" data-title=\"{{i18n .Lang \"doc.bg_color\"}}\" class=\"ql-background editor-item-select\"></select>\n            <a href=\"javascript:;\" data-toggle=\"tooltip\" data-title=\"{{i18n .Lang \"doc.attachment\"}}\" id=\"btnUploadFile\"><i class=\"fa fa-paperclip last\" aria-hidden=\"true\" name=\"attachment\"></i></a>\n\n        </div>\n\n        <div class=\"clearfix\"></div>\n    </div>\n    <div class=\"manual-body\">\n        <div class=\"manual-category\" id=\"manualCategory\" style=\" border-right: 1px solid #DDDDDD;width: 281px;position: absolute;\">\n            <div class=\"manual-nav\">\n                <div class=\"nav-item active\"><i class=\"fa fa-bars\" aria-hidden=\"true\"></i> {{i18n .Lang \"doc.document\"}}</div>\n                <div class=\"nav-plus pull-right\" id=\"btnAddDocument\" data-toggle=\"tooltip\" data-title=\"{{i18n .Lang \"doc.create_doc\"}}\" data-direction=\"right\"><i class=\"fa fa-plus\" aria-hidden=\"true\"></i></div>\n                <div class=\"clearfix\"></div>\n            </div>\n            <div class=\"manual-tree\" id=\"sidebar\"> </div>\n        </div>\n        <div class=\"manual-editor-container\" id=\"manualEditorContainer\" style=\"min-width: 980px;\">\n            <div class=\"manual-editormd\" style=\"bottom: 0;\">\n                <div id=\"docEditor\" class=\"manual-editormd-active ql-editor ql-blank  editor-content\"></div>\n                <div class=\"manual-editor-status\" style=\"border-top: 1px solid #DDDDDD;\">\n                    <div id=\"attachInfo\" class=\"item\">0 {{i18n .Lang \"doc.attachments\"}}</div>\n                </div>\n            </div>\n        </div>\n    </div>\n</div>\n<!-- 添加文档 -->\n<div class=\"modal fade\" id=\"addDocumentModal\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"addDocumentModalLabel\">\n    <div class=\"modal-dialog\" role=\"document\">\n        <form method=\"post\" action=\"{{urlfor \"DocumentController.Create\" \":key\" .Model.Identify}}\" id=\"addDocumentForm\" class=\"form-horizontal\">\n            <input type=\"hidden\" name=\"identify\" value=\"{{.Model.Identify}}\">\n            <input type=\"hidden\" name=\"doc_id\" value=\"0\">\n            <input type=\"hidden\" name=\"parent_id\" value=\"0\">\n            <div class=\"modal-content\">\n                <div class=\"modal-header\">\n                    <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\"><span aria-hidden=\"true\">&times;</span></button>\n                    <h4 class=\"modal-title\" id=\"myModalLabel\">{{i18n .Lang \"doc.create_doc\"}}</h4>\n                </div>\n                <div class=\"modal-body\">\n                    <div class=\"form-group\">\n                        <label class=\"col-sm-2 control-label\">{{i18n .Lang \"doc.doc_name\"}} <span class=\"error-message\">*</span></label>\n                        <div class=\"col-sm-10\">\n                            <input type=\"text\" name=\"doc_name\" id=\"documentName\" placeholder=\"{{i18n .Lang \"doc.doc_name\"}}\" class=\"form-control\"  maxlength=\"50\">\n                            <p style=\"color: #999;font-size: 12px;\">{{i18n .Lang \"doc.doc_name_tips\"}}</p>\n                        </div>\n                    </div>\n                    <div class=\"form-group\">\n                        <label class=\"col-sm-2 control-label\">{{i18n .Lang \"doc.doc_id\"}}</label>\n                        <div class=\"col-sm-10\">\n                            <input type=\"text\" name=\"doc_identify\" id=\"documentIdentify\" placeholder=\"{{i18n .Lang \"doc.doc_id\"}}\" class=\"form-control\" maxlength=\"50\">\n                            <p style=\"color: #999;font-size: 12px;\">{{i18n .Lang \"doc.doc_id_tips\"}}</p>\n                        </div>\n\n                    </div>\n                </div>\n                <div class=\"modal-footer\">\n                    <span id=\"add-error-message\" class=\"error-message\"></span>\n                    <button type=\"button\" class=\"btn btn-default\" data-dismiss=\"modal\">{{i18n .Lang \"common.cancel\"}}</button>\n                    <button type=\"submit\" class=\"btn btn-primary\" id=\"btnSaveDocument\" data-loading-text=\"{{i18n .Lang \"message.processing\"}}\">{{i18n .Lang \"doc.save\"}}</button>\n                </div>\n            </div>\n        </form>\n    </div>\n</div>\n<!--附件上传-->\n<div class=\"modal fade\" id=\"uploadAttachModal\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"uploadAttachModalLabel\">\n    <div class=\"modal-dialog\" role=\"document\">\n        <form method=\"post\" id=\"uploadAttachModalForm\" class=\"form-horizontal\">\n            <div class=\"modal-content\">\n                <div class=\"modal-header\">\n                    <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\"><span aria-hidden=\"true\">&times;</span></button>\n                    <h4 class=\"modal-title\" id=\"myModalLabel\">{{i18n .Lang \"doc.upload_attachment\"}}</h4>\n                </div>\n                <div class=\"modal-body\">\n                    <div class=\"attach-drop-panel\">\n                        <div class=\"upload-container\" id=\"filePicker\">\n                                <i class=\"fa fa-upload\" aria-hidden=\"true\"></i>\n                        </div>\n                    </div>\n                    <div class=\"attach-list\" id=\"attachList\">\n                        <template v-for=\"item in lists\">\n                            <div class=\"attach-item\" :id=\"item.attachment_id\">\n                                <template v-if=\"item.state == 'wait'\">\n                                    <div class=\"progress\">\n                                        <div class=\"progress-bar progress-bar-success\" role=\"progressbar\" aria-valuenow=\"40\" aria-valuemin=\"0\" aria-valuemax=\"100\">\n                                            <span class=\"sr-only\">0% Complete (success)</span>\n                                        </div>\n                                    </div>\n                                </template>\n                                <template v-else-if=\"item.state == 'error'\">\n                                    <span class=\"error-message\">${item.message}</span>\n                                    <button type=\"button\" class=\"btn btn-sm close\" @click=\"removeAttach(item.attachment_id)\">\n                                        <i class=\"fa fa-remove\" aria-hidden=\"true\"></i>\n                                    </button>\n                                </template>\n                                <template v-else>\n                                    <a :href=\"item.http_path\" target=\"_blank\" :title=\"item.file_name\">${item.file_name}</a>\n                                    <span class=\"text\">(${ formatBytes(item.file_size) })</span>\n                                    <span class=\"error-message\">${item.message}</span>\n                                    <button type=\"button\" class=\"btn btn-sm close\" @click=\"removeAttach(item.attachment_id)\">\n                                        <i class=\"fa fa-remove\" aria-hidden=\"true\"></i>\n                                    </button>\n                                    <div class=\"clearfix\"></div>\n                                </template>\n                            </div>\n                        </template>\n                    </div>\n                </div>\n                <div class=\"modal-footer\">\n                    <span id=\"add-error-message\" class=\"error-message\"></span>\n                    <button type=\"button\" class=\"btn btn-default\" data-dismiss=\"modal\">{{i18n .Lang \"common.cancel\"}}</button>\n                    <button type=\"button\" class=\"btn btn-primary\" id=\"btnUploadAttachFile\" data-dismiss=\"modal\">{{i18n .Lang \"common.confirm\"}}</button>\n                </div>\n            </div>\n        </form>\n    </div>\n</div>\n<!-- Modal -->\n<div class=\"modal fade\" id=\"documentHistoryModal\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"documentHistoryModalModalLabel\">\n    <div class=\"modal-dialog\" role=\"document\">\n        <div class=\"modal-content\">\n            <div class=\"modal-header\">\n                <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\"><span aria-hidden=\"true\">&times;</span></button>\n                <h4 class=\"modal-title\">{{i18n .Lang \"doc.doc_history\"}}</h4>\n            </div>\n            <div class=\"modal-body text-center\" id=\"historyList\">\n\n            </div>\n            <div class=\"modal-footer\">\n                <button type=\"button\" class=\"btn btn-default\" data-dismiss=\"modal\">{{i18n .Lang \"doc.close\"}}</button>\n            </div>\n        </div>\n    </div>\n</div>\n\n<script src=\"{{cdnjs \"/static/jquery/1.12.4/jquery.min.js\"}}\"></script>\n<script src=\"{{cdnjs \"/static/vuejs/vue.min.js\"}}\" type=\"text/javascript\"></script>\n<script src=\"{{cdnjs \"/static/bootstrap/js/bootstrap.min.js\"}}\"></script>\n<script src=\"{{cdnjs \"/static/webuploader/webuploader.min.js\"}}\" type=\"text/javascript\"></script>\n<script src=\"{{cdnjs \"/static/jstree/3.3.4/jstree.min.js\"}}\" type=\"text/javascript\"></script>\n<script src=\"{{cdnjs \"/static/katex/katex.min.js\"}}\" type=\"text/javascript\"></script>\n<script src=\"{{cdnjs \"/static/to-markdown/dist/to-markdown.js\"}}\" type=\"text/javascript\"></script>\n<script src=\"{{cdnjs \"/static/quill/quill.js\"}}\" type=\"text/javascript\"></script>\n<script src=\"{{cdnjs \"/static/quill/quill.icons.js\"}}\" type=\"text/javascript\"></script>\n<script src=\"{{cdnjs \"/static/layer/layer.js\"}}\" type=\"text/javascript\" ></script>\n<script src=\"{{cdnjs \"/static/js/jquery.form.js\"}}\" type=\"text/javascript\"></script>\n<script src=\"{{cdnjs \"/static/editor.md/lib/highlight/highlight.js\"}}\" type=\"text/javascript\"></script>\n<script src=\"{{cdnjs \"/static/js/array.js\" \"version\"}}\" type=\"text/javascript\"></script>\n<script src=\"{{cdnjs \"/static/js/editor.js\"}}\" type=\"text/javascript\"></script>\n<script src=\"{{cdnjs \"/static/js/quill.js\"}}\" type=\"text/javascript\"></script>\n<script src=\"{{cdnjs \"/static/js/custom-elements-builtin-0.6.5.min.js\"}}\" type=\"text/javascript\"></script>\n<script src=\"{{cdnjs \"/static/js/x-frame-bypass-1.0.2.js\"}}\" type=\"text/javascript\"></script>\n<script type=\"text/javascript\">\n    $(function () {\n        lang = {{i18n $.Lang \"common.js_lang\"}};\n        hljs.configure({   // optionally configure hljs\n            languages: ['javascript', 'ruby', 'python']\n        });\n        $(\".editor-code\").on(\"dblclick\",function () {\n            var code = $(this).html();\n            $(\"#createCodeToolbarModal\").find(\"textarea\").val(code);\n            $(\"#createCodeToolbarModal\").modal(\"show\");\n        }).on(\"click\",function (e) {\n            e.preventDefault();\n            e.stopPropagation();\n            console.log($(this).parents(\".editor-wrapper\").html())\n            $(this).parents(\".editor-wrapper\").addClass(\"editor-wrapper-selected\");\n        });\n\n        $(\"#attachInfo,#btnUploadFile\").on(\"click\",function () {\n            $(\"#uploadAttachModal\").modal(\"show\");\n        });\n\n\n        /**\n         * 文件上传\n         */\n        $(\"#uploadAttachModal\").on(\"shown.bs.modal\",function () {\n            if(window.uploader === null){\n                try {\n                    window.uploader = WebUploader.create({\n                        auto: true,\n                        dnd : true,\n                        swf: '{{.BaseUrl}}/static/webuploader/Uploader.swf',\n                        server: '{{urlfor \"DocumentController.Upload\"}}',\n                        formData : { \"identify\" : {{.Model.Identify}},\"doc_id\" :  window.selectNode.id },\n                        pick: \"#filePicker\",\n                        fileVal : \"editormd-file-file\",\n                        compress : false,\n                        fileSingleSizeLimit: {{.UploadFileSize}}\n                    }).on(\"beforeFileQueued\",function (file) {\n                        this.options.formData.doc_id = window.selectNode.id;\n                    }).on( 'fileQueued', function( file ) {\n                        var item = {\n                            state : \"wait\",\n                            attachment_id : file.id,\n                            file_size : file.size,\n                            file_name : file.name,\n                            message : \"{{i18n .Lang \"doc.uploading\"}}\"\n                        };\n                        window.vueApp.lists.push(item);\n\n                    }).on(\"uploadError\",function (file,reason) {\n                        for(var i in window.vueApp.lists){\n                            var item = window.vueApp.lists[i];\n                            if(item.attachment_id == file.id){\n                                item.state = \"error\";\n                                item.message = \"{{i18n .Lang \"message.upload_failed\"}}:\" + reason;\n                                break;\n                            }\n                        }\n\n                    }).on(\"uploadSuccess\",function (file, res) {\n                        for(var index in window.vueApp.lists){\n                            var item = window.vueApp.lists[index];\n                            if(item.attachment_id === file.id){\n                                if(res.errcode === 0) {\n                                    window.vueApp.lists.splice(index, 1, res.attach);\n\n                                }else{\n                                    item.message = res.message;\n                                    item.state = \"error\";\n                                }\n                            }\n                        }\n\n                    }).on(\"uploadProgress\",function (file, percentage) {\n                        var $li = $( '#'+file.id ),\n                                $percent = $li.find('.progress .progress-bar');\n\n                        $percent.css( 'width', percentage * 100 + '%' );\n                    }).on(\"error\", function (type) {\n                        if(type === \"F_EXCEED_SIZE\"){\n                            layer.msg(\"{{i18n .Lang \"message.upload_file_size_limit\"}}\");\n                        }\n                        console.log(type);\n                    });\n                }catch(e){\n                    console.log(e);\n                }\n            }\n        });\n    });\n</script>\n</body>\n</html>"
  },
  {
    "path": "views/document/template_api-en.tpl",
    "content": "#### Introduction：\n\n- User Login\n\n#### Version：\n\n|ver|Maker|Set date|Revision date|\n|:----    |:---|:----- |-----   |\n|2.1.0 |Ben  |2021-04-15 |  xxxx-xx-xx |\n\n#### Request URL:\n\n- http://xx.com/api/login\n\n#### Request Method：\n\n- GET\n- POST\n\n#### Request Header：\n\n|Paramter|Must|Type|Description|\n|:----    |:---|:----- |-----   |\n|Content-Type |Y  |string |request type： application/json   |\n|Content-MD5 |Y  |string | request sign    |\n\n\n#### request paramters:\n\n|Paramter|Must|Type|description|\n|:----    |:---|:----- |-----   |\n|username |Y  |string |   |\n|password |Y  |string |    |\n\n#### Return Example:\n\n**Correct Return:**\n\n```\n{\n    \"errcode\": 0,\n    \"data\": {\n        \"uid\": \"1\",\n        \"account\": \"admin\",\n        \"nickname\": \"Minho\",\n        \"group_level\": 0 ,\n        \"create_time\": \"1436864169\",\n        \"last_login_time\": \"0\",\n    }\n}\n```\n\n**Error Return:**\n\n\n```\n{\n    \"errcode\": 500,\n    \"errmsg\": \"invalid appid\"\n}\n```\n\n#### Return Paramters:\n\n|Paramter|Type|description|\n|:-----  |:-----|-----                           |\n|group_level |int   |user group id，1：Super administrator；2：normal  |\n\n#### Remark:\n\n- Check Error Code for more return error message"
  },
  {
    "path": "views/document/template_api.tpl",
    "content": "#### 简要描述：\n\n- 用户登录接口\n\n#### 接口版本：\n\n|版本号|制定人|制定日期|修订日期|\n|:----    |:---|:----- |-----   |\n|2.1.0 |秦亮  |2017-03-20 |  xxxx-xx-xx |\n\n#### 请求URL:\n\n- http://xx.com/api/login\n\n#### 请求方式：\n\n- GET\n- POST\n\n#### 请求头：\n\n|参数名|是否必须|类型|说明|\n|:----    |:---|:----- |-----   |\n|Content-Type |是  |string |请求类型： application/json   |\n|Content-MD5 |是  |string | 请求内容签名    |\n\n\n#### 请求参数:\n\n|参数名|是否必须|类型|说明|\n|:----    |:---|:----- |-----   |\n|username |是  |string |用户名   |\n|password |是  |string | 密码    |\n\n#### 返回示例:\n\n**正确时返回:**\n\n```\n{\n    \"errcode\": 0,\n    \"data\": {\n        \"uid\": \"1\",\n        \"account\": \"admin\",\n        \"nickname\": \"Minho\",\n        \"group_level\": 0 ,\n        \"create_time\": \"1436864169\",\n        \"last_login_time\": \"0\",\n    }\n}\n```\n\n**错误时返回:**\n\n\n```\n{\n    \"errcode\": 500,\n    \"errmsg\": \"invalid appid\"\n}\n```\n\n#### 返回参数说明:\n\n|参数名|类型|说明|\n|:-----  |:-----|-----                           |\n|group_level |int   |用户组id，1：超级管理员；2：普通用户；3：只读用户  |\n\n#### 备注:\n\n- 更多返回错误代码请看首页的错误代码描述"
  },
  {
    "path": "views/document/template_code-en.tpl",
    "content": "### Data Dictionary\n\n#### User Table, Store user information\n\n|Column|Type|IsNull|Default|Commnet|\n|:----    |:-------    |:--- |-- -|------      |\n|uid\t  |int(10)     |No\t|\t |\t           |\n|username |varchar(20) |No\t|    |\t \t|\n|password |varchar(50) |No   |    |\t \t\t |\n|name     |varchar(15) |Yes   |    |    nickname     |\n|reg_time |int(11)     |No   | 0  |   register time  |\n\n#### Remark: N/A"
  },
  {
    "path": "views/document/template_code.tpl",
    "content": "### 数据库字典\n\n#### 用户表，储存用户信息\n\n|字段|类型|空|默认|注释|\n|:----    |:-------    |:--- |-- -|------      |\n|uid\t  |int(10)     |否\t|\t |\t           |\n|username |varchar(20) |否\t|    |\t 用户名\t|\n|password |varchar(50) |否   |    |\t 密码\t\t |\n|name     |varchar(15) |是   |    |    昵称     |\n|reg_time |int(11)     |否   | 0  |   注册时间  |\n\n#### 备注：无"
  },
  {
    "path": "views/document/template_normal-en.tpl",
    "content": "# MinDoc Introduction\n\n[![Build Status](https://travis-ci.org/lifei6671/mindoc.svg?branch=master)](https://travis-ci.org/lifei6671/mindoc)\n\nMinDoc is a simple and easy-to-use document management system developed for IT teams.\n\nMinDoc The predecessor of Mindoc was the SmartWiki documentation system. SmartWiki is a document management system developed based on the PHP framework laravel. Because the deployment of PHP is too complicated for ordinary users, it is convenient for users to deploy and use Golang instead.\n\nThe origin of the development is that the company’s IT department needs a simple and practical system for project interface document management and sharing. Its function and interface are derived from kancloud.\n\nIt can be used to store API documents, database dictionaries, manual instructions and other documents. Built-in project management, user management, authority management and other functions can meet the document management needs of most small and medium-sized teams.\n\nDemo site: [http://doc.iminho.me](http://doc.iminho.me)\n\n# Installation and use\n\n**If the golang is not installed on your server, please manually set an environment variable as follows: the key name is ZONEINFO, and the value is MinDoc and /lib/time/zoneinfo.zip in the directory.**\n\n**Windows tutorial:** [https://github.com/mindoc-org/mindoc/blob/master/README_WIN.md](docs/README_WIN.md)\n\n**Linux  tutorial:**  [https://github.com/mindoc-org/mindoc/blob/master/README_LINUX.md](docs/README_LINUX.md)\n\n**PDF Export configuration tutorial**  [https://github.com/mindoc-org/mindoc/blob/master/docs/README_LINUX.md](docs/WKHTMLTOPDF.md)\n\nFor users without Golang experience, you can download the compiled program from here. [https://github.com/mindoc-org/mindoc/releases](https://github.com/mindoc-org/mindoc/releases) \n\nIf you have Golang development experience, it is recommended to compile and install.\n\n```bash\ngit clone https://github.com/mindoc-org/mindoc.git\n\ngo get -d ./...\n\ngo build -ldflags \"-w\"\n\n```\n\nMinDoc uses MySQL to store data, and the encoding must be `utf8mb4_general_ci`.\n\nPlease Change database config locate in `conf/app.conf` before install.\n\nIf `app.conf` does not exist in the conf directory, please rename `app.conf.example` to `app.conf`.\n\nIf the install.lock file exists in the root directory, it means that the database has been initialized. If you want to reinitialize the database,  delete the file and restart the program.\n\n**The default program will automatically create the table and initialize a super administrator user: admin password: 123456. Please reset your password after logging in.**\n\n## Linux Running in Background\n\nIf you want the program to run in the background, you can execute the following command:\n\n```bash\nnohup ./godoc &\n```\n\nThis command will make the program execute in the background, but the service will not start automatically after the server restarts.\n\nUsing supervisor as a service can automatically restart MinDoc after the server restarts.\n\n## Windows Running in Background\n\nRunning in the background under Windows requires the help of CMD command line commands：\n\n```bash\n# Create slave.vbs file in the MinDoc root directory:\n\nSet ws = CreateObject(\"Wscript.Shell\")\nws.run \"cmd /c start.bat\",vbhide\n\n# Create start.bat file:\n@echo off\n\ngodoc_windows_amd64.exe\n\n```\n\nDouble-click slave.bat to start, After the program initializes the database, an install.lock file will be created in this directory, indicating that the installation has been successful.\n\nIf you compile it yourself, you can use the following command to compile a program that does not rely on the cmd command to run in the background:\n\n```bash\ngo build -ldflags \"-H=windowsgui\"\n```\nCompiled by this command runs in the background by default on Windows.\n\nPlease add MinDoc to the boot list.\n\n## Password retrieval\n\nThe password retrieval function depends on the mail service. Therefore, you need to configure the mail service to use this function. The configuration is located in `conf/app.conf`\n\n\n```bash\n\n#mail service configuration\nenable_mail=true\nsmtp_user_name=admin@iminho.me\nsmtp_host=smtp.ym.163.com\nsmtp_password=1q2w3e__ABC\nsmtp_port=25\nform_user_name=admin@iminho.me\nmail_expired=30\n```\n\n\n# Use Docker deployment\n\nRefer to the built-in Dockerfile project files to compile the mirror.\n\nThe following environment variables need to be provided when starting the mirror:\n\n```ini\nMYSQL_PORT_3306_TCP_ADDR    MySQL Address\nMYSQL_PORT_3306_TCP_PORT    MySQL Port\nMYSQL_INSTANCE_NAME         MySQL Database name\nMYSQL_USERNAME              MySQL Username\nMYSQL_PASSWORD              MySQL Password\nHTTP_PORT                   Listen Port\n```\n\nFor Example\n\n```bash\ndocker run -p 8181:8181 -e MYSQL_PORT_3306_TCP_ADDR=127.0.0.1 -e MYSQL_PORT_3306_TCP_PORT=3306 -e MYSQL_INSTANCE_NAME=mindoc_db -e MYSQL_USERNAME=root -e MYSQL_PASSWORD=123456 -e httpport=8181 -d daocloud.io/lifei6671/mindoc:latest\n```\n\n# Technology used\n\n- beego 1.8.1\n- mysql 5.6\n- editor.md\n- bootstrap 3.2\n- jquery \n- layer \n- webuploader \n- Nprogress \n- jstree \n- font awesome \n- cropper \n- highlight \n- to-markdown \n- wangEditor\n\n\n# Main function\n\n- Project management, you can edit the project, add members, etc.\n- Document management, adding and deleting documents, etc.\n- Comment management, you can manage document comments and comments posted by yourself.\n- User management, adding and disabling users, changing personal information, etc.\n- User authority management, change user roles.\n- Project encryption, you can set the public status of the project, and private projects need to be accessed through Token.\n- Site configuration, anonymous access, verification code, etc.\n\n# Contributing\n\nWe welcome you to report issue or pull request on the GitHub.\n\nIf you are not familiar with GitHub's Fork and Pull development model, you can read the GitHub documentation (https://help.github.com/articles/using-pull-requests) for more information.\n\n"
  },
  {
    "path": "views/document/template_normal.tpl",
    "content": "# MinDoc 简介\n\n[![Build Status](https://travis-ci.org/lifei6671/mindoc.svg?branch=master)](https://travis-ci.org/lifei6671/mindoc)\n\nMinDoc 是一款针对IT团队开发的简单好用的文档管理系统。\n\nMinDoc 的前身是 SmartWiki 文档系统。SmartWiki 是基于 PHP 框架 laravel 开发的一款文档管理系统。因 PHP 的部署对普通用户来说太复杂，所以改用 Golang 开发。可以方便用户部署和实用。\n\n开发缘起是公司IT部门需要一款简单实用的项目接口文档管理和分享的系统。其功能和界面源于 kancloud 。\n\n可以用来储存日常接口文档，数据库字典，手册说明等文档。内置项目管理，用户管理，权限管理等功能，能够满足大部分中小团队的文档管理需求。\n\n演示站点： [http://doc.iminho.me](http://doc.iminho.me)\n\n# 安装与使用\n\n**如果你的服务器上没有安装golang程序请手动设置一个环境变量如下：键名为 ZONEINFO，值为MinDoc跟目录下的/lib/time/zoneinfo.zip 。**\n\n**Windows 教程:** [https://github.com/mindoc-org/mindoc/blob/master/README_WIN.md](docs/README_WIN.md)\n\n**Linux  教程:**  [https://github.com/mindoc-org/mindoc/blob/master/README_LINUX.md](docs/README_LINUX.md)\n\n**PDF 导出配置教程**  [https://github.com/mindoc-org/mindoc/blob/master/docs/README_LINUX.md](docs/WKHTMLTOPDF.md)\n\n对于没有Golang使用经验的用户，可以从 [https://github.com/mindoc-org/mindoc/releases](https://github.com/mindoc-org/mindoc/releases) 这里下载编译完的程序。\n\n如果有Golang开发经验，建议通过编译安装。\n\n```bash\ngit clone https://github.com/mindoc-org/mindoc.git\n\ngo get -d ./...\n\ngo build -ldflags \"-w\"\n\n```\n\nMinDoc 使用MySQL储存数据，且编码必须是`utf8mb4_general_ci`。请在安装前，把数据库配置填充到项目目录下的 conf/app.conf 中。\n\n如果conf目录下不存在 app.conf 请重命名 app.conf.example 为 app.conf。\n\n如果 MinDoc 根目录下存在 install.lock 文件表示已经初始化过数据库，想要重新初始化数据库，只需要删除该文件重新启动程序即可。\n\n**默认程序会自动创建表，同时初始化一个超级管理员用户：admin 密码：123456 。请登录后重新设置密码。**\n\n## Linux 下后台运行\n\n在 Linux 如果想让程序后台运行可以执行如下命令：\n\n```bash\n#使程序后台运行\nnohup ./godoc &\n```\n\n该命令会使程序后台执行，但是服务器重启后不会自动启动服务。\n\n使用 supervisor 做服务，可以使服务器重启后自动重启 MinDoc。\n\n## Windows 下后台运行\n\nWindows 下后台运行需要借助 CMD 命令行命令：\n\n```bash\n#在MinDoc根目录下新建一个slave.vbs文件：\n\nSet ws = CreateObject(\"Wscript.Shell\")\nws.run \"cmd /c start.bat\",vbhide\n\n#再建一个start.bat文件：\n@echo off\n\ngodoc_windows_amd64.exe\n\n```\n\n启动时双击slave.vbs即可，等待程序初始化完数据库会在该目录下创建一个install.lock文件，标识已安装成功。\n\n如果是自己编译，可以用以下命令即可编译出不依赖cmd命令的后台运行的程序：\n\n```bash\ngo build -ldflags \"-H=windowsgui\"\n```\n通过该命令编译的Golang程序在Windows上默认后台运行。\n\n请将将 MinDoc 加入开机启动列表，使程序开机启动。\n\n## 密码找回功能\n\n密码找回功能依赖邮件服务，因此，需要配置邮件服务才能使用该功能,该配置位于 `conf/app.conf` 中：\n\n```bash\n\n#邮件配置\n#是否启用邮件\nenable_mail=true\n#smtp服务器的账号\nsmtp_user_name=admin@iminho.me\n#smtp服务器的地址\nsmtp_host=smtp.ym.163.com\n#密码\nsmtp_password=1q2w3e__ABC\n#端口号\nsmtp_port=25\n#邮件发送人的地址\nform_user_name=admin@iminho.me\n#邮件有效期30分钟\nmail_expired=30\n```\n\n\n# 使用Docker部署\n\n如果是Docker用户，可参考项目内置的Dockerfile文件编译镜像。\n\n在启动镜像时需要提供如下的环境变量：\n\n```ini\nMYSQL_PORT_3306_TCP_ADDR    MySQL地址\nMYSQL_PORT_3306_TCP_PORT    MySQL端口号\nMYSQL_INSTANCE_NAME         MySQL数据库名称\nMYSQL_USERNAME              MySQL账号\nMYSQL_PASSWORD              MySQL密码\nHTTP_PORT                   程序监听的端口号\n```\n\n举个栗子\n\n```bash\ndocker run -p 8181:8181 -e MYSQL_PORT_3306_TCP_ADDR=127.0.0.1 -e MYSQL_PORT_3306_TCP_PORT=3306 -e MYSQL_INSTANCE_NAME=mindoc_db -e MYSQL_USERNAME=root -e MYSQL_PASSWORD=123456 -e httpport=8181 -d daocloud.io/lifei6671/mindoc:latest\n```\n\n# 项目截图\n\n**创建项目**\n\n![创建项目](https://raw.githubusercontent.com/lifei6671/mindoc/master/uploads/20170501204438.png)\n\n**项目列表**\n\n![项目列表](https://raw.githubusercontent.com/lifei6671/mindoc/master/uploads/20170501203542.png)\n\n**项目概述**\n\n![项目概述](https://raw.githubusercontent.com/lifei6671/mindoc/master/uploads/20170501203619.png)\n\n**项目成员**\n\n![项目成员](https://raw.githubusercontent.com/lifei6671/mindoc/master/uploads/20170501203637.png)\n\n**项目设置**\n\n![项目设置](https://raw.githubusercontent.com/lifei6671/mindoc/master/uploads/20170501203656.png)\n\n**基于Editor.md开发的Markdown编辑器**\n\n![基于Editor.md开发的Markdown编辑器](https://raw.githubusercontent.com/lifei6671/mindoc/master/uploads/20170501203854.png)\n\n**基于wangEditor开发的富文本编辑器**\n\n![基于wangEditor开发的富文本编辑器](https://raw.githubusercontent.com/lifei6671/mindoc/master/uploads/20170501204651.png)\n\n**项目预览**\n\n![项目预览](https://raw.githubusercontent.com/lifei6671/mindoc/master/uploads/20170501204609.png)\n\n**超级管理员后台**\n\n![超级管理员后台](https://raw.githubusercontent.com/lifei6671/mindoc/master/uploads/20170501204710.png)\n\n\n# 使用的技术\n\n- beego 1.8.1\n- mysql 5.6\n- editor.md\n- bootstrap 3.2\n- jquery 库\n- layer 弹出层框架\n- webuploader 文件上传框架\n- Nprogress 库\n- jstree 树状结构库\n- font awesome 字体库\n- cropper 图片剪裁库\n- layer 弹出层框架\n- highlight 代码高亮库\n- to-markdown HTML转Markdown库\n- wangEditor 富文本编辑器\n\n\n# 主要功能\n\n- 项目管理，可以对项目进行编辑更改，成员添加等。\n- 文档管理，添加和删除文档等。\n- 评论管理，可以管理文档评论和自己发布的评论。\n- 用户管理，添加和禁用用户，个人资料更改等。\n- 用户权限管理 ， 实现用户角色的变更。\n- 项目加密，可以设置项目公开状态，私有项目需要通过Token访问。\n- 站点配置，可开启匿名访问、验证码等。\n\n# 参与开发\n\n我们欢迎您在 MinDoc 项目的 GitHub 上报告 issue 或者 pull request。\n\n如果您还不熟悉GitHub的Fork and Pull开发模式，您可以阅读GitHub的文档（https://help.github.com/articles/using-pull-requests） 获得更多的信息。\n\n# 关于作者\n\n一个不纯粹的PHPer，一个不自由的 gopher 。\n"
  },
  {
    "path": "views/errors/403.tpl",
    "content": "<!DOCTYPE html>\n<html>\n<head>\n    <meta charset=\"utf-8\">\n    <meta name=\"author\" content=\"Minho\" />\n    <link rel=\"shortcut icon\" href=\"{{cdnimg \"/static/favicon.ico\"}}\">\n    <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge,chrome=1\" />\n    <meta name=\"renderer\" content=\"webkit\" />\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n    <title>{{i18n .Lang \"message.no_permission\"}} - Powered by MinDoc</title>\n    <link href=\"{{cdncss \"/static/fonts/lato-100.css\"}}\" rel=\"stylesheet\" type=\"text/css\">\n    <style type=\"text/css\">\n        html, body {\n            height: 100%;\n        }\n\n        body {\n            margin: 0;\n            padding: 0;\n            width: 100%;\n            color: #B0BEC5;\n            display: table;\n            font-weight: 100;\n            font-family: 'Lato',\"Microsoft Yahei\",\"Helvetica Neue\",Helvetica,Arial,sans-serif;\n        }\n\n        .container {\n            text-align: center;\n            display: table-cell;\n            vertical-align: middle;\n        }\n\n        .content {\n            text-align: center;\n            display: inline-block;\n        }\n\n        .title {\n            font-size: 72px;\n            margin-bottom: 40px;\n            color: red;\n        }\n    </style>\n</head>\n<body>\n<div class=\"container\">\n    <div class=\"content\">\n        <div class=\"title\">HTTP 403 : {{i18n .Lang \"message.no_permission\"}}</div>\n    </div>\n</div>\n</body>\n</html>\n"
  },
  {
    "path": "views/errors/404.tpl",
    "content": "<!DOCTYPE html>\n<html>\n<head>\n    <meta charset=\"utf-8\">\n    <meta name=\"author\" content=\"Minho\" />\n    <link rel=\"shortcut icon\" href=\"{{cdnimg \"/static/favicon.ico\"}}\">\n    <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge,chrome=1\" />\n    <meta name=\"renderer\" content=\"webkit\" />\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n    <title>{{i18n .Lang \"message.page_not_existed\"}} - Powered by MinDoc</title>\n    <link href=\"{{cdncss \"/static/fonts/lato-100.css\"}}\" rel=\"stylesheet\" type=\"text/css\">\n    <style type=\"text/css\">\n        html, body {\n            height: 100%;\n        }\n\n        body {\n            margin: 0;\n            padding: 0;\n            width: 100%;\n            color: #B0BEC5;\n            display: table;\n            font-weight: 100;\n            font-family: 'Lato',\"Microsoft Yahei\",\"Helvetica Neue\",Helvetica,Arial,sans-serif;\n        }\n\n        .container {\n            text-align: center;\n            display: table-cell;\n            vertical-align: middle;\n        }\n\n        .content {\n            text-align: center;\n            display: inline-block;\n        }\n\n        .title {\n            font-size: 72px;\n            margin-bottom: 40px;\n        }\n    </style>\n</head>\n<body>\n<div class=\"container\">\n    <div class=\"content\">\n        <div class=\"title\">HTTP 404 : {{i18n .Lang \"message.page_not_existed\"}}.</div>\n    </div>\n</div>\n</body>\n</html>\n"
  },
  {
    "path": "views/errors/error.tpl",
    "content": "<!DOCTYPE html>\n<html>\n<head>\n    <meta charset=\"utf-8\">\n    <meta name=\"author\" content=\"Minho\" />\n    <link rel=\"shortcut icon\" href=\"{{cdnimg \"/static/favicon.ico\"}}\">\n    <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge,chrome=1\" />\n    <meta name=\"renderer\" content=\"webkit\" />\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n    <title> {{if eq 200 .ErrorCode}}{{i18n .Lang \"message.tips\"}}{{else if eq 404 .ErrorCode}}{{i18n .Lang \"message.page_not_existed\"}}{{else}}{{i18n .Lang \"message.system_error\"}}{{end}} - Powered by MinDoc</title>\n    <link href=\"{{cdncss \"/static/fonts/lato-100.css\"}}\" rel=\"stylesheet\" type=\"text/css\">\n    <style type=\"text/css\">\n        html, body {\n            height: 100%;\n        }\n\n        body {\n            margin: 0;\n            padding: 0;\n            width: 100%;\n            color: #B0BEC5;\n            display: table;\n            font-weight: 100;\n            font-family: 'Lato';\n        }\n\n        .container {\n            text-align: center;\n            display: table-cell;\n            vertical-align: middle;\n        }\n\n        .content {\n            text-align: center;\n            display: inline-block;\n        }\n\n        .title {\n            font-size: 72px;\n            margin-bottom: 40px;\n        }\n    </style>\n</head>\n<body>\n<div class=\"container\">\n    <div class=\"content\">\n        {{if .ErrorMessage}}\n        {{if .ErrorCode}}\n        <div class=\"title\">HTTP {{.ErrorCode}} ： {{.ErrorMessage}}</div>\n        {{else}}\n        <div class=\"title\">HTTP 500 ： {{.ErrorMessage}}</div>\n        {{end}}\n        {{else}}\n        <div class=\"title\">HTTP 500 ： {{i18n .Lang \"message.system_error\"}}</div>\n        {{end}}\n    </div>\n</div>\n</body>\n</html>\n"
  },
  {
    "path": "views/home/index.tpl",
    "content": "<!DOCTYPE html>\n<html lang=\"zh-CN\">\n<head>\n    <title>{{.SITE_NAME}} - Powered by MinDoc</title>\n    <meta charset=\"utf-8\">\n    <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n    <meta name=\"renderer\" content=\"webkit\">\n    <meta name=\"author\" content=\"Minho\" />\n    <meta name=\"site\" content=\"https://www.iminho.me\" />\n    <meta name=\"keywords\" content=\"MinDoc,文档在线管理系统,WIKI,wiki,wiki在线,文档在线管理,接口文档在线管理,接口文档管理\">\n    <meta name=\"description\" content=\"MinDoc文档在线管理系统 {{.site_description}}\">\n    <!-- Bootstrap -->\n    <link href=\"{{cdncss \"/static/bootstrap/css/bootstrap.min.css\"}}\" rel=\"stylesheet\">\n    <link href=\"{{cdncss \"/static/font-awesome/css/font-awesome.min.css\"}}\" rel=\"stylesheet\">\n    <link href=\"{{cdncss \"/static/css/main.css\" \"version\"}}\" rel=\"stylesheet\">\n    <script type=\"text/javascript\">\n        window.updateBookOrder = \"{{urlfor \"BookController.UpdateBookOrder\"}}\";\n    </script>\n</head>\n<body>\n<div class=\"manual-reader manual-container\">\n    {{template \"widgets/header.tpl\" .}}\n    <div class=\"container manual-body\">\n        <div class=\"row\">\n             <div class=\"manual-list\">\n                {{range $index,$item := .Lists}}\n                    <div class=\"list-item\" data-id=\"{{$item.BookId}}\">\n                        <dl class=\"manual-item-standard\">\n                            <dt>\n                                <a href=\"{{urlfor \"DocumentController.Index\" \":key\" $item.Identify}}\" title=\"{{$item.BookName}}-{{$item.CreateName}}\">\n                                    <img src=\"{{cdnimg $item.Cover}}\" class=\"cover\" alt=\"{{$item.BookName}}-{{$item.CreateName}}\" onerror=\"this.src='{{cdnimg \"static/images/book.jpg\"}}';\">\n                                </a>\n                            </dt>\n                            <dd>\n                                <a href=\"{{urlfor \"DocumentController.Index\" \":key\" $item.Identify}}\" class=\"name\" title=\"{{$item.BookName}}-{{$item.CreateName}}\">{{$item.BookName}}</a>\n                            </dd>\n                            <dd>\n                            <span class=\"author\">\n                                <b class=\"text\">{{i18n $.Lang \"blog.author\"}}</b>\n                                <b class=\"text\">-</b>\n                                <b class=\"text\">{{if eq $item.RealName \"\" }}{{$item.CreateName}}{{else}}{{$item.RealName}}{{end}}</b>\n                            </span>\n                            </dd>\n                        </dl>\n                    </div>\n                {{else}}\n                    <div class=\"text-center\" style=\"height: 200px;margin: 100px;font-size: 28px;\">{{i18n $.Lang \"message.no_project\"}}</div>\n                {{end}}\n                <div class=\"clearfix\"></div>\n            </div>\n            <nav class=\"pagination-container\">\n                {{if gt .TotalPages 1}}\n                    {{.PageHtml}}\n                {{end}}\n                <div class=\"clearfix\"></div>\n            </nav>\n        </div>\n    </div>\n    {{template \"widgets/footer.tpl\" .}}\n</div>\n<script src=\"{{cdnjs \"/static/jquery/1.12.4/jquery.min.js\"}}\" type=\"text/javascript\"></script>\n<script src=\"{{cdnjs \"/static/bootstrap/js/bootstrap.min.js\"}}\" type=\"text/javascript\"></script>\n<script src=\"{{cdnjs \"/static/layer/layer.js\"}}\"></script>\n<script src=\"{{cdnjs \"/static/js/sort.js\"}}\" type=\"text/javascript\"></script>\n{{.Scripts}}\n</body>\n</html>"
  },
  {
    "path": "views/items/index.tpl",
    "content": "<!DOCTYPE html>\n<html lang=\"zh-CN\">\n<head>\n    <meta charset=\"utf-8\">\n    <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n\n    <title>{{i18n .Lang \"project.prj_space_list\"}} - Powered by MinDoc</title>\n    <meta name=\"keywords\" content=\"MinDoc,文档在线管理系统,WIKI,wiki,wiki在线,文档在线管理,接口文档在线管理,接口文档管理\">\n    <meta name=\"description\" content=\"MinDoc文档在线管理系统 {{.site_description}}\">\n    <meta name=\"author\" content=\"Minho\" />\n    <meta name=\"site\" content=\"https://www.iminho.me\" />\n    <!-- Bootstrap -->\n    <link href=\"{{cdncss \"/static/bootstrap/css/bootstrap.min.css\"}}\" rel=\"stylesheet\">\n    <link href=\"{{cdncss \"/static/font-awesome/css/font-awesome.min.css\"}}\" rel=\"stylesheet\">\n\n    <link href=\"{{cdncss \"/static/css/main.css\" \"version\"}}\" rel=\"stylesheet\">\n\n</head>\n<body>\n<div class=\"manual-reader manual-container manual-search-reader\">\n{{template \"widgets/header.tpl\" .}}\n    <div class=\"container manual-body\">\n        <div class=\"search-head\">\n            <strong class=\"search-title\">{{i18n .Lang \"project.prj_space_list\"}}</strong>\n        </div>\n        <div class=\"row\">\n            <div class=\"hide tag-container-outer\" style=\"border: 0;margin-top: 0;padding: 5px 15px;min-height: 200px;\">\n                <div class=\"attach-list\" id=\"ItemsetsList\">\n                {{range $index,$item := .Lists}}\n                    <a href=\"{{urlfor \"ItemsetsController.List\" \":key\" $item.ItemKey}}\" class=\"ui-card\" title=\"{{$item.ItemName}}\">\n                    <div class=\"header\">{{$item.ItemName}}</div>\n                        <div class=\"description\">{{i18n $.Lang \"project.prj_amount\"}}：{{$item.BookNumber}} &nbsp; {{i18n $.Lang \"project.creator\"}}：{{$item.CreateName}}<br/> {{i18n $.Lang \"project.create_time\"}}：{{$item.CreateTimeString}}</div>\n                    </a>\n                {{else}}\n                    <div class=\"search-empty\">\n                        <img src=\"{{cdnimg \"/static/images/search_empty.png\"}}\" class=\"empty-image\">\n                        <span class=\"empty-text\">{{i18n .Lang \"project.no_projct_space\"}}</span>\n                    </div>\n                {{end}}\n                </div>\n            </div>\n\n            <nav class=\"pagination-container\">\n                {{if gt .TotalPages 1}}\n                    {{.PageHtml}}\n                {{end}}\n                <div class=\"clearfix\"></div>\n            </nav>\n        </div>\n    </div>\n{{template \"widgets/footer.tpl\" .}}\n</div>\n<script src=\"{{cdnjs \"/static/jquery/1.12.4/jquery.min.js\"}}\" type=\"text/javascript\"></script>\n<script src=\"{{cdnjs \"/static/bootstrap/js/bootstrap.min.js\"}}\" type=\"text/javascript\"></script>\n{{.Scripts}}\n</body>\n</html>"
  },
  {
    "path": "views/items/list.tpl",
    "content": "<!DOCTYPE html>\n<html lang=\"zh-CN\">\n<head>\n    <meta charset=\"utf-8\">\n    <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n\n    <title>{{i18n .Lang \"project.prj_space_list_of\" .Model.ItemName}} - Powered by MinDoc</title>\n    <meta name=\"keywords\" content=\"MinDoc,文档在线管理系统,WIKI,wiki,wiki在线,文档在线管理,接口文档在线管理,接口文档管理,{{.Model.ItemName}}\">\n    <meta name=\"description\" content=\"MinDoc文档在线管理系统 {{.site_description}}\">\n    <!-- Bootstrap -->\n    <link href=\"{{cdncss \"/static/bootstrap/css/bootstrap.min.css\"}}\" rel=\"stylesheet\">\n    <link href=\"{{cdncss \"/static/font-awesome/css/font-awesome.min.css\"}}\" rel=\"stylesheet\">\n\n    <link href=\"{{cdncss \"/static/css/main.css\" \"version\"}}\" rel=\"stylesheet\">\n</head>\n<body>\n<div class=\"manual-reader manual-container manual-search-reader\">\n{{template \"widgets/header.tpl\" .}}\n    <div class=\"container manual-body\">\n        <div class=\"search-head\">\n            <strong class=\"search-title\">{{i18n .Lang \"project.search_title\" .Model.ItemName}}</strong>\n        </div>\n        <div class=\"row\">\n            <div class=\"manual-list\">\n            {{range $index,$item := .Lists}}\n                <div class=\"list-item\">\n                    <dl class=\"manual-item-standard\">\n                        <dt>\n                            <a href=\"{{urlfor \"DocumentController.Index\" \":key\" $item.Identify}}\" title=\"{{$item.BookName}}-{{$item.CreateName}}\" target=\"_blank\">\n                                <img src=\"{{cdnimg $item.Cover}}\" class=\"cover\" alt=\"{{$item.BookName}}-{{$item.CreateName}}\">\n                            </a>\n                        </dt>\n                        <dd>\n                            <a href=\"{{urlfor \"DocumentController.Index\" \":key\" $item.Identify}}\" class=\"name\" title=\"{{$item.BookName}}-{{$item.CreateName}}\" target=\"_blank\">{{$item.BookName}}</a>\n                        </dd>\n                        <dd>\n                            <span class=\"author\">\n                                <b class=\"text\">{{i18n $.Lang \"project.author\"}}</b>\n                                <b class=\"text\">-</b>\n                                <b class=\"text\">{{if eq $item.RealName \"\" }}{{$item.CreateName}}{{else}}{{$item.RealName}}{{end}}</b>\n                            </span>\n                        </dd>\n                    </dl>\n                </div>\n            {{else}}\n                <div class=\"search-empty\">\n                    <img src=\"{{cdnimg \"/static/images/search_empty.png\"}}\" class=\"empty-image\">\n                    <span class=\"empty-text\">{{i18n .Lang \"project.no_project\"}}</span>\n                </div>\n            {{end}}\n\n                <div class=\"clearfix\"></div>\n            </div>\n            <nav class=\"pagination-container\">\n                {{if gt .TotalPages 1}}\n                    {{.PageHtml}}\n                {{end}}\n                <div class=\"clearfix\"></div>\n            </nav>\n        </div>\n    </div>\n{{template \"widgets/footer.tpl\" .}}\n</div>\n<script src=\"{{cdnjs \"/static/jquery/1.12.4/jquery.min.js\"}}\"></script>\n<script src=\"{{cdnjs \"/static/bootstrap/js/bootstrap.min.js\"}}\"></script>\n{{.Scripts}}\n</body>\n</html>"
  },
  {
    "path": "views/label/index.tpl",
    "content": "<!DOCTYPE html>\n<html lang=\"zh-CN\">\n<head>\n    <meta charset=\"utf-8\">\n    <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n\n    <title>{{.LabelName}} - Powered by MinDoc</title>\n    <meta name=\"keywords\" content=\"MinDoc,文档在线管理系统,WIKI,wiki,wiki在线,文档在线管理,接口文档在线管理,接口文档管理,{{.LabelName}}\">\n    <meta name=\"description\" content=\"MinDoc文档在线管理系统 {{.site_description}}\">\n    <!-- Bootstrap -->\n    <link href=\"{{cdncss \"/static/bootstrap/css/bootstrap.min.css\"}}\" rel=\"stylesheet\">\n    <link href=\"{{cdncss \"/static/font-awesome/css/font-awesome.min.css\"}}\" rel=\"stylesheet\">\n\n    <link href=\"{{cdncss \"/static/css/main.css\" \"version\"}}\" rel=\"stylesheet\">\n</head>\n<body>\n<div class=\"manual-reader manual-container manual-search-reader\">\n    {{template \"widgets/header.tpl\" .}}\n    <div class=\"container manual-body\">\n        <div class=\"search-head\">\n            <strong class=\"search-title\">显示标签为\"{{.LabelName}}\"的项目</strong>\n        </div>\n        <div class=\"row\">\n            <div class=\"manual-list\">\n                {{range $index,$item := .Lists}}\n                <div class=\"list-item\">\n                    <dl class=\"manual-item-standard\">\n                        <dt>\n                            <a href=\"{{urlfor \"DocumentController.Index\" \":key\" $item.Identify}}\" title=\"{{$item.BookName}}-{{$item.CreateName}}\" target=\"_blank\">\n                                <img src=\"{{cdnimg $item.Cover}}\" class=\"cover\" alt=\"{{$item.BookName}}-{{$item.CreateName}}\">\n                            </a>\n                        </dt>\n                        <dd>\n                            <a href=\"{{urlfor \"DocumentController.Index\" \":key\" $item.Identify}}\" class=\"name\" title=\"{{$item.BookName}}-{{$item.CreateName}}\" target=\"_blank\">{{$item.BookName}}</a>\n                        </dd>\n                        <dd>\n                            <span class=\"author\">\n                                <b class=\"text\">作者</b>\n                                <b class=\"text\">-</b>\n                                <b class=\"text\">{{if eq $item.RealName \"\" }}{{$item.CreateName}}{{else}}{{$item.RealName}}{{end}}</b>\n                            </span>\n                        </dd>\n                    </dl>\n                </div>\n                {{else}}\n                    <div class=\"text-center\" style=\"height: 200px;margin: 100px;font-size: 28px;\">暂无项目</div>\n                {{end}}\n\n                <div class=\"clearfix\"></div>\n            </div>\n            <nav class=\"pagination-container\">\n                {{.PageHtml}}\n            </nav>\n        </div>\n    </div>\n    {{template \"widgets/footer.tpl\" .}}\n</div>\n<script src=\"{{cdnjs \"/static/jquery/1.12.4/jquery.min.js\"}}\"></script>\n<script src=\"{{cdnjs \"/static/bootstrap/js/bootstrap.min.js\"}}\"></script>\n{{.Scripts}}\n</body>\n</html>"
  },
  {
    "path": "views/label/list.tpl",
    "content": "<!DOCTYPE html>\n<html lang=\"zh-CN\">\n<head>\n    <meta charset=\"utf-8\">\n    <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n\n    <title>标签列表 - Powered by MinDoc</title>\n    <meta name=\"keywords\" content=\"MinDoc,文档在线管理系统,WIKI,wiki,wiki在线,文档在线管理,接口文档在线管理,接口文档管理\">\n    <meta name=\"description\" content=\"MinDoc文档在线管理系统 {{.site_description}}\">\n    <meta name=\"author\" content=\"Minho\" />\n    <meta name=\"site\" content=\"https://www.iminho.me\" />\n    <!-- Bootstrap -->\n    <link href=\"{{cdncss \"/static/bootstrap/css/bootstrap.min.css\"}}\" rel=\"stylesheet\">\n    <link href=\"{{cdncss \"/static/font-awesome/css/font-awesome.min.css\"}}\" rel=\"stylesheet\">\n\n    <link href=\"{{cdncss \"/static/css/main.css\" \"version\"}}\" rel=\"stylesheet\">\n</head>\n<body>\n<div class=\"manual-reader manual-container manual-search-reader\">\n    {{template \"widgets/header.tpl\" .}}\n    <div class=\"container manual-body\">\n        <div class=\"search-head\">\n            <strong class=\"search-title\">显示标签列表</strong>\n        </div>\n        <div class=\"row\">\n            <div class=\"hide tag-container-outer\" style=\"border: 0;margin-top: 0;padding: 5px 15px;min-height: 200px;\">\n                <span class=\"tags\">\n                    {{range  $index,$item := .Labels}}\n                    <a href=\"{{urlfor \"LabelController.Index\" \":key\" $item.LabelName}}\">{{$item.LabelName}}<span class=\"detail\">{{$item.BookNumber}}</span></a>\n                    {{else}}\n                    <div class=\"text-center\">暂无标签</div>\n                    {{end}}\n                </span>\n            </div>\n\n            <nav class=\"pagination-container\">\n                {{if gt .TotalPages 1}}\n                {{.PageHtml}}\n                {{end}}\n                <div class=\"clearfix\"></div>\n            </nav>\n        </div>\n    </div>\n    {{template \"widgets/footer.tpl\" .}}\n</div>\n<script src=\"{{cdnjs \"/static/jquery/1.12.4/jquery.min.js\"}}\" type=\"text/javascript\"></script>\n<script src=\"{{cdnjs \"/static/bootstrap/js/bootstrap.min.js\"}}\" type=\"text/javascript\"></script>\n{{.Scripts}}\n</body>\n</html>"
  },
  {
    "path": "views/manager/attach_detailed.tpl",
    "content": "<!DOCTYPE html>\n<html lang=\"zh-CN\">\n<head>\n    <meta charset=\"utf-8\">\n    <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n\n    <title>{{i18n .Lang \"mgr.attachment_mgr\"}} - Powered by MinDoc</title>\n\n    <!-- Bootstrap -->\n    <link href=\"{{cdncss \"/static/bootstrap/css/bootstrap.min.css\"}}\" rel=\"stylesheet\" type=\"text/css\">\n    <link href=\"{{cdncss \"/static/font-awesome/css/font-awesome.min.css\"}}\" rel=\"stylesheet\" type=\"text/css\">\n\n    <link href=\"{{cdncss \"/static/css/main.css\" \"version\"}}\" rel=\"stylesheet\">\n    <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->\n    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->\n    <!--[if lt IE 9]>\n    <script src=\"{{cdnjs \"/static/html5shiv/3.7.3/html5shiv.min.js\"}}\"></script>\n    <script src=\"{{cdnjs \"/static/respond.js/1.4.2/respond.min.js\" }}\"></script>\n    <![endif]-->\n</head>\n<body>\n<div class=\"manual-reader\">\n    {{template \"widgets/header.tpl\" .}}\n    <div class=\"container manual-body\">\n        <div class=\"row\">\n        {{template \"manager/widgets.tpl\" .}}\n            <div class=\"page-right\">\n                <div class=\"m-box\">\n                    <div class=\"box-head\">\n                        <strong class=\"box-title\">{{i18n .Lang \"mgr.attachment_mgr\"}}</strong>\n                    </div>\n                </div>\n                <div class=\"box-body\">\n                <form>\n                    <div class=\"form-group\">\n                        <label>{{i18n .Lang \"mgr.file_name\"}}</label>\n                        <input type=\"text\" value=\"{{.Model.FileName}}\" class=\"form-control input-readonly\" readonly>\n                    </div>\n                    <div class=\"form-group\">\n                        <label>{{i18n .Lang \"mgr.is_exist\"}}</label>\n                            {{if .Model.IsExist }}\n                            <input type=\"text\" value=\"{{i18n .Lang \"mgr.exist\"}}\" class=\"form-control input-readonly\" readonly>\n                            {{else}}\n                            <input type=\"text\" value=\"{{i18n .Lang \"mgr.deleted\"}}\" class=\"form-control input-readonly\" readonly>\n                            {{end}}\n                    </div>\n                    <div class=\"form-group\">\n                        <label>{{i18n .Lang \"mgr.proj_blog_name\"}}</label>\n                        <input type=\"text\" value=\"{{.Model.BookName}}\" class=\"form-control input-readonly\" readonly>\n                    </div>\n                    {{if ne .Model.BookId 0}}\n                    <div class=\"form-group\">\n                        <label>{{i18n .Lang \"mgr.doc_name\"}}</label>\n                        <input type=\"text\" value=\"{{.Model.DocumentName}}\" class=\"form-control input-readonly\" readonly>\n                    </div>\n                    {{end}}\n                    <div class=\"form-group\">\n                        <label>{{i18n .Lang \"mgr.file_path\"}}</label>\n                        <input type=\"text\" value=\"{{.Model.FilePath}}\" class=\"form-control input-readonly\" readonly>\n                    </div>\n                    <div class=\"form-group\">\n                        <label>{{i18n .Lang \"mgr.download_path\"}}</label>\n                        <input type=\"text\" value=\"{{.Model.HttpPath}}\" class=\"form-control input-readonly\" readonly>\n                    </div>\n                    <div class=\"form-group\">\n                        <label>{{i18n .Lang \"mgr.file_size\"}}</label>\n                        <input type=\"text\" value=\"{{.Model.FileShortSize}}\" class=\"form-control input-readonly\" readonly>\n                    </div>\n                    <div class=\"form-group\">\n                        <label>{{i18n .Lang \"mgr.upload_time\"}}</label>\n                        <input type=\"text\" value=\"{{date_format .Model.CreateTime \"2006-01-02 15:04:05\"}}\" class=\"form-control input-readonly\" readonly>\n                    </div>\n                    <div class=\"form-group\">\n                        <label>{{i18n .Lang \"uc.account\"}}</label>\n                        <input type=\"text\" value=\"{{ .Model.Account }}\" class=\"form-control input-readonly\" readonly>\n                    </div>\n                    <div class=\"form-group\">\n                        <a href=\"{{urlfor \"ManagerController.AttachList\" }}\" class=\"btn btn-success btn-sm\">{{i18n .Lang \"common.back\"}}</a>\n                        {{if .Model.IsExist }}\n                        <a href=\"{{.Model.LocalHttpPath}}\" class=\"btn btn-default btn-sm\" target=\"_blank\" title=\"{{i18n .Lang \"mgr.download_title\"}}\">{{i18n .Lang \"mgr.download\"}}</a>\n                        {{end}}\n                    </div>\n                </form>\n                </div>\n            </div>\n        </div>\n    </div>\n    {{template \"widgets/footer.tpl\" .}}\n</div>\n\n<script src=\"{{cdnjs \"/static/jquery/1.12.4/jquery.min.js\"}}\"></script>\n<script src=\"{{cdnjs \"/static/bootstrap/js/bootstrap.min.js\"}}\"></script>\n<script src=\"{{cdnjs \"/static/vuejs/vue.min.js\"}}\" type=\"text/javascript\"></script>\n<script src=\"{{cdnjs \"/static/js/jquery.form.js\"}}\" type=\"text/javascript\"></script>\n<script src=\"{{cdnjs \"/static/js/main.js\"}}\" type=\"text/javascript\"></script>\n\n</body>\n</html>"
  },
  {
    "path": "views/manager/attach_list.tpl",
    "content": "<!DOCTYPE html>\n<html lang=\"zh-CN\">\n<head>\n    <meta charset=\"utf-8\">\n    <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n\n    <title>{{i18n .Lang \"mgr.attachment_mgr\"}} - Powered by MinDoc</title>\n\n    <!-- Bootstrap -->\n    <link href=\"{{cdncss \"/static/bootstrap/css/bootstrap.min.css\"}}\" rel=\"stylesheet\" type=\"text/css\">\n    <link href=\"{{cdncss \"/static/font-awesome/css/font-awesome.min.css\"}}\" rel=\"stylesheet\" type=\"text/css\">\n\n    <link href=\"{{cdncss \"/static/css/main.css\" \"version\"}}\" rel=\"stylesheet\">\n    <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->\n    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->\n    <!--[if lt IE 9]>\n    <script src=\"{{cdnjs \"/static/html5shiv/3.7.3/html5shiv.min.js\"}}\"></script>\n    <script src=\"{{cdnjs \"/static/respond.js/1.4.2/respond.min.js\" }}\"></script>\n    <![endif]-->\n</head>\n<body>\n<div class=\"manual-reader\">\n    {{template \"widgets/header.tpl\" .}}\n    <div class=\"container manual-body\">\n        <div class=\"row\">\n        {{template \"manager/widgets.tpl\" .}}\n            <div class=\"page-right\">\n                <div class=\"m-box\">\n                    <div class=\"box-head\" id=\"attachAll\">\n                        <strong class=\"box-title\">{{i18n .Lang \"mgr.attachment_mgr\"}}</strong>\n                        <button type=\"button\" data-method=\"clean\" class=\"btn btn-danger btn-sm\" data-loading-text=\"{{i18n $.Lang \"message.processing\"}}\">{{i18n $.Lang \"common.clean\"}}</button>\n                    </div>\n                </div>\n                <div class=\"box-body\">\n                    <div class=\"attach-list\" id=\"attachList\">\n                        <table class=\"table\">\n                            <thead>\n                            <tr>\n                                <th>#</th>\n                                <th>{{i18n .Lang \"mgr.attachment_name\"}}</th>\n                                <th>{{i18n .Lang \"mgr.proj_blog_name\"}}</th>\n                                <th>{{i18n .Lang \"mgr.file_size\"}}</th>\n                                <th>{{i18n .Lang \"mgr.is_exist\"}}</th>\n                                <th>{{i18n .Lang \"common.operate\"}}</th>\n                            </tr>\n                            </thead>\n                            <tbody>\n                            {{range $index,$item := .Lists}}\n                            <tr>\n                                <td>{{$item.AttachmentId}}</td>\n                                <td>{{$item.FileName}}</td>\n                                <td>{{$item.BookName}}</td>\n                                <td>{{$item.FileShortSize}}</td>\n                                <td>{{ if $item.IsExist }} {{i18n $.Lang \"commont.yes\"}}{{else}}{{i18n $.Lang \"common.no\"}}{{end}}</td>\n                                <td>\n                                    <button type=\"button\" data-method=\"delete\" class=\"btn btn-danger btn-sm\" data-id=\"{{$item.AttachmentId}}\" data-loading-text=\"{{i18n $.Lang \"message.processing\"}}\">{{i18n $.Lang \"common.delete\"}}</button>\n                                    <a href=\"{{urlfor \"ManagerController.AttachDetailed\" \":id\" $item.AttachmentId}}\" class=\"btn btn-success btn-sm\">{{i18n $.Lang \"common.detail\"}}</a>\n\n                                </td>\n                            </tr>\n                            {{else}}\n                            <tr><td class=\"text-center\" colspan=\"6\">{{i18n .Lang \"message.no_data\"}}</td></tr>\n                            {{end}}\n                            </tbody>\n                        </table>\n                        <nav class=\"pagination-container\">\n                            {{.PageHtml}}\n                        </nav>\n                    </div>\n                </div>\n            </div>\n        </div>\n    </div>\n    {{template \"widgets/footer.tpl\" .}}\n</div>\n\n<script src=\"{{cdnjs \"/static/jquery/1.12.4/jquery.min.js\"}}\"></script>\n<script src=\"{{cdnjs \"/static/bootstrap/js/bootstrap.min.js\"}}\"></script>\n<script src=\"{{cdnjs \"/static/js/jquery.form.js\"}}\" type=\"text/javascript\"></script>\n<script src=\"{{cdnjs \"/static/layer/layer.js\" }}\" type=\"text/javascript\"></script>\n<script type=\"text/javascript\">\n    $(function () {\n        $(\"#attachList\").on(\"click\",\"button[data-method='delete']\",function () {\n            var id = $(this).attr(\"data-id\");\n            var $this = $(this);\n            $(this).button(\"loading\");\n            $.ajax({\n                url : \"{{urlfor \"ManagerController.AttachDelete\"}}\",\n                data : { \"attach_id\" : id },\n                type : \"post\",\n                dataType : \"json\",\n                success : function (res) {\n                    if(res.errcode === 0){\n                        $this.closest(\"tr\").remove().empty();\n                    }else {\n                        layer.msg(res.message);\n                    }\n                },\n                error : function () {\n                    layer.msg({{i18n .Lang \"message.system_error\"}});\n                },\n                complete : function () {\n                    $this.button(\"reset\");\n                }\n            });\n        });\n\n        $(\"#attachAll\").on(\"click\",\"button[data-method='clean']\",function () {\n            var $this = $(this);\n            $(this).button(\"loading\");\n            $.ajax({\n                url : \"{{urlfor \"ManagerController.AttachClean\"}}\",\n                type : \"post\",\n                dataType : \"json\",\n                success : function (res) {\n                    if(res.errcode === 0){\n                        alert(\"done\");\n                    }else {\n                        layer.msg(res.message);\n                    }\n                },\n                error : function () {\n                    layer.msg({{i18n .Lang \"message.system_error\"}});\n                },\n                complete : function () {\n                    $this.button(\"reset\");\n                }\n            });\n        });\n    });\n</script>\n</body>\n</html>"
  },
  {
    "path": "views/manager/books.tpl",
    "content": "<!DOCTYPE html>\n<html lang=\"zh-CN\">\n<head>\n    <meta charset=\"utf-8\">\n    <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n\n    <title>{{i18n .Lang \"mgr.project_mgrt\"}} - Powered by MinDoc</title>\n\n    <!-- Bootstrap -->\n    <link href=\"{{cdncss \"/static/bootstrap/css/bootstrap.min.css\"}}\" rel=\"stylesheet\" type=\"text/css\">\n    <link href=\"{{cdncss \"/static/font-awesome/css/font-awesome.min.css\"}}\" rel=\"stylesheet\" type=\"text/css\">\n\n    <link href=\"{{cdncss \"/static/css/main.css\" \"version\"}}\" rel=\"stylesheet\">\n    <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->\n    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->\n    <!--[if lt IE 9]>\n    <script src=\"{{cdnjs \"/static/html5shiv/3.7.3/html5shiv.min.js\"}}\"></script>\n    <script src=\"{{cdnjs \"/static/respond.js/1.4.2/respond.min.js\" }}\"></script>\n    <![endif]-->\n</head>\n<body>\n<div class=\"manual-reader\">\n    {{template \"widgets/header.tpl\" .}}\n    <div class=\"container manual-body\">\n        <div class=\"row\">\n            {{template \"manager/widgets.tpl\" .}}\n            <div class=\"page-right\">\n                <div class=\"m-box\">\n                    <div class=\"box-head\">\n                        <strong class=\"box-title\">{{i18n .Lang \"mgr.proj_list\"}}</strong>\n                    </div>\n                </div>\n                <div class=\"box-body\" id=\"bookList\">\n                    <div class=\"book-list\">\n\n                        {{range $index,$item := .Lists}}\n                        <div class=\"list-item\">\n                                <div class=\"book-title\">\n                                    <div class=\"pull-left\">\n                                        <a href=\"{{urlfor \"ManagerController.EditBook\" \":key\" $item.Identify}}\" title=\"{{i18n .Lang \"mgr.edit_proj\"}}\" data-toggle=\"tooltip\">\n                                            {{if eq $item.PrivatelyOwned 0}}\n                                            <i class=\"fa fa-unlock\" aria-hidden=\"true\"></i>\n                                            {{else}}\n                                            <i class=\"fa fa-lock\" aria-hidden=\"true\"></i>\n                                            {{end}}\n                                            {{$item.BookName}}\n                                        </a>\n                                    </div>\n                                    <div class=\"pull-right\">\n                                        <div class=\"btn-group\">\n                                            <a href=\"{{urlfor \"DocumentController.Edit\" \":key\" $item.Identify \":id\" \"\"}}\" class=\"btn btn-default\" target=\"_blank\">{{i18n $.Lang \"common.edit\"}}</a>\n                                            <a href=\"javascript:;\" class=\"btn btn-default dropdown-toggle\" data-toggle=\"dropdown\" aria-haspopup=\"true\" aria-expanded=\"false\">\n                                                <span class=\"caret\"></span>\n                                                <span class=\"sr-only\">Toggle Dropdown</span>\n                                            </a>\n\n                                            <ul class=\"dropdown-menu\">\n                                                <li><a href=\"{{urlfor \"DocumentController.Index\" \":key\" $item.Identify}}\" target=\"_blank\">{{i18n $.Lang \"common.read\"}}</a></li>\n                                                <li><a href=\"{{urlfor \"ManagerController.EditBook\" \":key\" $item.Identify}}\">{{i18n $.Lang \"common.setting\"}}</a></li>\n                                                <li><a href=\"javascript:deleteBook('{{$item.BookId}}');\">{{i18n $.Lang \"common.delete\"}}</a> </li>\n                                            </ul>\n                                        </div>\n                                        {{/*<a href=\"{{urlfor \"DocumentController.Index\" \":key\" $item.Identify}}\" title=\"查看文档\" data-toggle=\"tooltip\" target=\"_blank\"><i class=\"fa fa-eye\"></i> 查看文档</a>*/}}\n                                        {{/*<a href=\"{{urlfor \"DocumentController.Edit\" \":key\" $item.Identify \":id\" \"\"}}\" title=\"编辑文档\" data-toggle=\"tooltip\" target=\"_blank\"><i class=\"fa fa-edit\" aria-hidden=\"true\"></i> 编辑文档</a>*/}}\n                                    </div>\n                                    <div class=\"clearfix\"></div>\n                                </div>\n                                <div class=\"desc-text\">\n                                    {{if eq $item.Description \"\"}}\n                                    &nbsp;\n                                    {{else}}\n                                        <a href=\"{{urlfor \"ManagerController.EditBook\" \":key\" $item.Identify}}\" title=\"{{i18n .Lang \"mgr.edit_proj\"}}\" style=\"font-size: 12px;\" target=\"_blank\">\n                                            {{$item.Description}}\n                                        </a>\n                                    {{end}}\n                                </div>\n                                <div class=\"info\">\n                                <span title=\"{{i18n $.Lang \"mgr.create_time\"}}\" data-toggle=\"tooltip\" data-placement=\"bottom\"><i class=\"fa fa-clock-o\"></i>\n                                    {{date_format $item.CreateTime \"2006-01-02 15:04:05\"}}\n\n                                </span>\n                                    <span title=\"{{i18n $.Lang \"mgr.creator\"}}\" data-toggle=\"tooltip\" data-placement=\"bottom\"><i class=\"fa fa-user\"></i> {{if eq $item.RealName \"\" }}{{$item.CreateName}}{{else}}{{$item.RealName}}{{end}}</span>\n                                    <span title=\"{{i18n $.Lang \"mgr.doc_amount\"}}\" data-toggle=\"tooltip\" data-placement=\"bottom\"><i class=\"fa fa-pie-chart\"></i> {{$item.DocCount}}</span>\n                                   {{if ne $item.LastModifyText \"\"}}\n                                    <span title=\"{{i18n $.Lang \"mgr.last_edit\"}}\" data-toggle=\"tooltip\" data-placement=\"bottom\"><i class=\"fa fa-pencil\"></i> {{i18n .Lang \"mgr.last_edit\"}}: {{$item.LastModifyText}}</span>\n                                    {{end}}\n\n                                </div>\n                            </div>\n                        {{else}}\n                        <div class=\"text-center\">{{i18n .Lang \"message.no_data\"}}</div>\n                        {{end}}\n                    </div>\n                    <nav class=\"pagination-container\">\n                        {{.PageHtml}}\n                    </nav>\n                </div>\n            </div>\n        </div>\n    </div>\n    {{template \"widgets/footer.tpl\" .}}\n</div>\n<!-- Delete Book Modal -->\n<div class=\"modal fade\" id=\"deleteBookModal\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"deleteBookModalLabel\">\n    <div class=\"modal-dialog\" role=\"document\">\n        <form method=\"post\" id=\"deleteBookForm\" action=\"{{urlfor \"ManagerController.DeleteBook\"}}\">\n            <input type=\"hidden\" name=\"book_id\" value=\"\">\n            <div class=\"modal-content\">\n                <div class=\"modal-header\">\n                    <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\"><span aria-hidden=\"true\">&times;</span></button>\n                    <h4 class=\"modal-title\">{{i18n .Lang \"mgr.delete_project\"}}</h4>\n                </div>\n                <div class=\"modal-body\">\n                    <span style=\"font-size: 14px;font-weight: 400;\">{{i18n .Lang \"message.confirm_delete_project\"}}</span>\n                    <p></p>\n                    <p class=\"text error-message\">{{i18n .Lang \"message.warning_delete_project\"}}</p>\n                </div>\n                <div class=\"modal-footer\">\n                    <span id=\"form-error-message2\" class=\"error-message\"></span>\n                    <button type=\"button\" class=\"btn btn-default\" data-dismiss=\"modal\">{{i18n .Lang \"common.cancel\"}}</button>\n                    <button type=\"submit\" id=\"btnDeleteBook\" class=\"btn btn-primary\" data-loading-text=\"{{i18n .Lang \"message.processing\"}}\">{{i18n .Lang \"common.confirm\"}}</button>\n                </div>\n            </div>\n        </form>\n    </div>\n</div>\n<script src=\"{{cdnjs \"/static/jquery/1.12.4/jquery.min.js\"}}\"></script>\n<script src=\"{{cdnjs \"/static/bootstrap/js/bootstrap.min.js\"}}\"></script>\n<script src=\"{{cdnjs \"/static/vuejs/vue.min.js\"}}\" type=\"text/javascript\"></script>\n<script src=\"{{cdnjs \"/static/js/jquery.form.js\"}}\" type=\"text/javascript\"></script>\n<script src=\"{{cdnjs \"/static/js/main.js\"}}\" type=\"text/javascript\"></script>\n<script type=\"text/javascript\">\n        /**\n         * 删除项目\n         */\n        function deleteBook($id) {\n            $(\"#deleteBookModal\").find(\"input[name='book_id']\").val($id);\n            $(\"#deleteBookModal\").modal(\"show\");\n        }\n        $(function () {\n            /**\n             * 删除项目\n             */\n            $(\"#deleteBookForm\").ajaxForm({\n                beforeSubmit : function () {\n                    $(\"#btnDeleteBook\").button(\"loading\");\n                },\n                success : function (res) {\n                    if(res.errcode === 0){\n                        window.location = window.location.href;\n                    }else{\n                        showError(res.message,\"#form-error-message2\");\n                    }\n                    $(\"#btnDeleteBook\").button(\"reset\");\n                },\n                error : function () {\n                    showError({{i18n .Lang \"message.system_error\"}},\"#form-error-message2\");\n                    $(\"#btnDeleteBook\").button(\"reset\");\n                }\n            });\n        });\n</script>\n</body>\n</html>"
  },
  {
    "path": "views/manager/comments.tpl",
    "content": "<!DOCTYPE html>\n<html lang=\"zh-CN\">\n<head>\n    <meta charset=\"utf-8\">\n    <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n\n    <title>用户中心 - Powered by MinDoc</title>\n\n    <!-- Bootstrap -->\n    <link href=\"/static/bootstrap/css/bootstrap.min.css\" rel=\"stylesheet\">\n    <link href=\"/static/font-awesome/css/font-awesome.min.css\" rel=\"stylesheet\">\n\n    <link href=\"/static/css/main.css\" rel=\"stylesheet\">\n    <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->\n    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->\n    <!--[if lt IE 9]>\n    <script src=\"/static/html5shiv/3.7.3/html5shiv.min.js\"></script>\n    <script src=\"/static/respond.js/1.4.2/respond.min.js\"></script>\n    <![endif]-->\n</head>\n<body>\n<div class=\"manual-reader\">\n    {{template \"widgets/header.tpl\" .}}\n    <div class=\"container manual-body\">\n        <div class=\"row\">\n            <div class=\"page-left\">\n                <ul class=\"menu\">\n                    <li><a href=\"{{urlfor \"ManagerController.Index\"}}\" class=\"item\"><i class=\"fa fa-dashboard\" aria-hidden=\"true\"></i> 仪表盘</a> </li>\n                    <li><a href=\"{{urlfor \"ManagerController.Users\" }}\" class=\"item\"><i class=\"fa fa-users\" aria-hidden=\"true\"></i> 用户管理</a> </li>\n                    <li><a href=\"{{urlfor \"ManagerController.Books\" }}\" class=\"item\"><i class=\"fa fa-book\" aria-hidden=\"true\"></i> 项目管理</a> </li>\n                    <li class=\"active\"><a href=\"{{urlfor \"ManagerController.Comments\" }}\" class=\"item\"><i class=\"fa fa-comments-o\" aria-hidden=\"true\"></i> 评论管理</a> </li>\n                    <li><a href=\"{{urlfor \"ManagerController.Setting\" }}\" class=\"item\"><i class=\"fa fa-cogs\" aria-hidden=\"true\"></i> 配置管理</a> </li>\n                </ul>\n            </div>\n            <div class=\"page-right\">\n                <div class=\"m-box\">\n                    <div class=\"box-head\">\n                        <strong class=\"box-title\">评论管理</strong>\n                    </div>\n                </div>\n                <div class=\"box-body\">\n\n                </div>\n            </div>\n        </div>\n    </div>\n</div>\n<script src=\"/static/jquery/1.12.4/jquery.min.js\"></script>\n<script src=\"/static/bootstrap/js/bootstrap.min.js\"></script>\n</body>\n</html>"
  },
  {
    "path": "views/manager/config.tpl",
    "content": "<!DOCTYPE html>\n<html lang=\"zh-CN\">\n<head>\n    <meta charset=\"utf-8\">\n    <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n\n    <title>{{i18n .Lang \"mgr.config_file\"}} - Powered by MinDoc</title>\n\n    <!-- Bootstrap -->\n    <link href=\"{{cdncss \"/static/bootstrap/css/bootstrap.min.css\"}}\" rel=\"stylesheet\">\n    <link href=\"{{cdncss \"/static/font-awesome/css/font-awesome.min.css\"}}\" rel=\"stylesheet\">\n    <link href=\"{{cdncss \"/static/editor.md/css/editormd.css\"}}\" rel=\"stylesheet\">\n    <link href=\"{{cdncss \"/static/css/main.css\" \"version\"}}\" rel=\"stylesheet\">\n</head>\n<body>\n<div class=\"manual-reader\">\n{{template \"widgets/header.tpl\" .}}\n    <div class=\"container manual-body\">\n        <div class=\"row\">\n        {{template \"manager/widgets.tpl\" .}}\n            <div class=\"page-right\">\n                <div class=\"m-box\">\n                    <div class=\"box-head\">\n                        <strong class=\"box-title\"> {{i18n .Lang \"mgr.config_mgr\"}}</strong>\n                    </div>\n                </div>\n                <div class=\"box-body\">\n                    <form method=\"post\" id=\"configFileContainerForm\" action=\"{{urlfor \"ManagerController.Config\"}}\">\n                        <div id=\"configFileContainer\">\n                            <textarea style=\"display:none;\" name=\"configFileTextArea\">{{.ConfigContent}}</textarea>\n                        </div>\n\n                        <div class=\"form-group\">\n                            <button type=\"submit\" id=\"btnSaveConfigFile\" class=\"btn btn-success\" data-loading-text=\"{{i18n .Lang \"message.processing\"}}\">{{i18n .Lang \"common.save\"}}</button>\n                            <span id=\"form-error-message\" class=\"error-message\"></span>\n                        </div>\n                    </form>\n\n                    <div class=\"clearfix\"></div>\n\n                </div>\n            </div>\n        </div>\n    </div>\n{{template \"widgets/footer.tpl\" .}}\n</div>\n\n\n<script src=\"{{cdnjs \"/static/jquery/1.12.4/jquery.min.js\"}}\" type=\"text/javascript\"></script>\n<script src=\"{{cdnjs \"/static/bootstrap/js/bootstrap.min.js\"}}\" type=\"text/javascript\"></script>\n<script src=\"{{cdnjs \"/static/js/jquery.form.js\"}}\" type=\"text/javascript\"></script>\n<script src=\"{{cdnjs \"/static/editor.md/editormd.min.js\" \"version\"}}\" type=\"text/javascript\"></script>\n<script src=\"{{cdnjs \"/static/js/main.js\"}}\" type=\"text/javascript\"></script>\n<script type=\"text/javascript\">\n    $(function() {\n        var configEditor = editormd(\"configFileContainer\", {\n            width            : \"100%\",\n            height           : 720,\n            watch            : false,\n            toolbar          : false,\n            codeFold         : true,\n            searchReplace    : true,\n            placeholder      : \"\",\n            mode             : \"text/x-properties\",\n            path             : \"{{cdnjs \"/static/editor.md/lib/\"}}\"\n        });\n\n        $(\"#configFileContainerForm\").ajaxForm({\n            beforeSubmit : function () {\n                $(\"#btnSaveBookInfo\").button(\"loading\");\n            },success : function (res) {\n                if(res.errcode === 0) {\n                    showSuccess(\"保存成功\", \"#form-error-message\")\n                }else{\n                    showError(res.message);\n                }\n                $(\"#btnSaveConfigFile\").button(\"reset\");\n            }\n        });\n    });\n</script>\n</body>\n</html>"
  },
  {
    "path": "views/manager/edit_book.tpl",
    "content": "<!DOCTYPE html>\n<html lang=\"zh-CN\">\n<head>\n    <meta charset=\"utf-8\">\n    <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n\n    <title>{{i18n .Lang \"mgr.edit_proj\"}} - Powered by MinDoc</title>\n\n    <!-- Bootstrap -->\n    <link href=\"{{cdncss \"/static/bootstrap/css/bootstrap.min.css\"}}\" rel=\"stylesheet\">\n    <link href=\"{{cdncss \"/static/bootstrap/plugins/tagsinput/bootstrap-tagsinput.css\"}}\" rel=\"stylesheet\">\n    <link href=\"{{cdncss \"/static/bootstrap/plugins/bootstrap-switch/css/bootstrap3//bootstrap-switch.min.css\"}}\" rel=\"stylesheet\">\n    <link href=\"{{cdncss \"/static/font-awesome/css/font-awesome.min.css\"}}\" rel=\"stylesheet\">\n    <link href=\"{{cdncss \"/static/webuploader/webuploader.css\"}}\" rel=\"stylesheet\">\n    <link href=\"{{cdncss \"/static/cropper/2.3.4/cropper.min.css\"}}\" rel=\"stylesheet\">\n    <link href=\"{{cdncss \"/static/select2/4.0.5/css/select2.min.css\"}}\" rel=\"stylesheet\">\n    <link href=\"{{cdncss \"/static/css/main.css\" \"version\"}}\" rel=\"stylesheet\">\n</head>\n<body>\n<div class=\"manual-reader\">\n    {{template \"widgets/header.tpl\" .}}\n    <div class=\"container manual-body\">\n        <div class=\"row\">\n        {{template \"manager/widgets.tpl\" .}}\n            <div class=\"page-right\">\n                <div class=\"m-box\">\n                    <div class=\"box-head\">\n                        <strong class=\"box-title\"> {{i18n .Lang \"blog.project_setting\"}}</strong>\n                        <button type=\"button\"  class=\"btn btn-success btn-sm pull-right\" data-toggle=\"modal\" data-target=\"#transferBookModal\">{{i18n .Lang \"blog.handover_project\"}}</button>\n                        {{if eq .Model.PrivatelyOwned 1}}\n                        <button type=\"button\"  class=\"btn btn-success btn-sm pull-right\" data-toggle=\"modal\" data-target=\"#changePrivatelyOwnedModal\" style=\"margin-right: 5px;\">{{i18n .Lang \"blog.make_public\"}}</button>\n                        {{else}}\n                        <button type=\"button\"  class=\"btn btn-danger btn-sm pull-right\" data-toggle=\"modal\" data-target=\"#changePrivatelyOwnedModal\" style=\"margin-right: 5px;\">{{i18n .Lang \"blog.make_private\"}}</button>\n                        {{end}}\n                        <button type=\"button\"  class=\"btn btn-danger btn-sm pull-right\" style=\"margin-right: 5px;\" data-toggle=\"modal\" data-target=\"#deleteBookModal\">{{i18n .Lang \"blog.delete_project\"}}</button>\n                    </div>\n                </div>\n                <div class=\"box-body\" style=\"padding-right: 200px;\">\n                    <div class=\"form-left\">\n                        <form method=\"post\" id=\"bookEditForm\" action=\"{{urlfor \"ManagerController.EditBook\" \":key\" .Model.Identify}}\">\n                            <input type=\"hidden\" name=\"identify\" value=\"{{.Model.Identify}}\">\n                            <div class=\"form-group\">\n                                <label>{{i18n .Lang \"mgr.proj_name\"}}</label>\n                                <input type=\"text\" class=\"form-control\" name=\"book_name\" id=\"bookName\" placeholder=\"{{i18n .Lang \"mgr.proj_name\"}}\" value=\"{{.Model.BookName}}\">\n                            </div>\n                            <div class=\"form-group\">\n                                <label>{{i18n .Lang \"blog.project_id\"}}</label>\n                                <input type=\"text\" class=\"form-control\" value=\"{{urlfor \"DocumentController.Index\" \":key\" .Model.Identify}}\" disabled placeholder=\"{{i18n .Lang \"blog.project_id\"}}\">\n                            </div>\n                            <div class=\"form-group\">\n                                <label>{{i18n .Lang \"common.project_space\"}}</label>\n                                <select class=\"js-data-example-ajax form-control\" multiple=\"multiple\" name=\"itemId\">\n                                    <option value=\"{{.Model.ItemId}}\" selected=\"selected\">{{.Model.ItemName}}</option>\n                                </select>\n                            </div>\n                            <div class=\"form-group\">\n                                <label>{{i18n .Lang \"blog.history_record_amount\"}}</label>\n                                <input type=\"text\" class=\"form-control\" name=\"history_count\" value=\"{{.Model.HistoryCount}}\" placeholder=\"{{i18n .Lang \"blog.history_record_amount\"}}\">\n                                <p class=\"text\">{{i18n .Lang \"message.history_record_amount_desc\"}}</p>\n                            </div>\n                            <div class=\"form-group\">\n                                <label>{{i18n .Lang \"blog.corp_id\"}}</label>\n                                <input type=\"text\" class=\"form-control\" name=\"publisher\" value=\"{{.Model.Publisher}}\" placeholder=\"{{i18n $.Lang \"blog.corp_id\"}}\">\n                                <p class=\"text\">{{i18n .Lang \"message.corp_id_desc\"}}</p>\n                            </div>\n                            <div class=\"form-group\">\n                                <label>{{i18n .Lang \"blog.project_order\"}}</label>\n                                <input type=\"number\" min=\"0\" class=\"form-control\" value=\"{{.Model.OrderIndex}}\" name=\"order_index\" placeholder=\"{{i18n .Lang \"blog.project_order\"}}\">\n                                <p class=\"text\">{{i18n .Lang \"message.project_order_desc\"}}</p>\n                            </div>\n                            <div class=\"form-group\">\n                                <label>{{i18n .Lang \"blog.project_desc\"}}</label>\n                                <textarea rows=\"3\" class=\"form-control\" name=\"description\" style=\"height: 90px\" placeholder=\"{{i18n .Lang \"blog.project_desc\"}}\">{{.Model.Description}}</textarea>\n                                <p class=\"text\">{{i18n .Lang \"message.project_desc_placeholder\"}}</p>\n                            </div>\n\n                            <div class=\"form-group\">\n                                <label>{{i18n .Lang \"blog.project_label\"}}</label>\n                                <input type=\"text\" class=\"form-control\" name=\"label\" placeholder=\"{{i18n .Lang \"blog.project_label\"}}\" value=\"{{.Model.Label}}\">\n                                <p class=\"text\">{{i18n .Lang \"message.project_label_desc\"}}</p>\n                            </div>\n                            {{if eq .Model.PrivatelyOwned 1}}\n                            <div class=\"form-group\">\n                                <label>{{i18n .Lang \"blog.access_token\"}}</label>\n                                <div class=\"row\">\n                                    <div class=\"col-sm-9\">\n                                        <input type=\"text\" name=\"token\" id=\"token\" class=\"form-control\" placeholder=\"{{i18n .Lang \"blog.access_token\"}}\" readonly value=\"{{.Model.PrivateToken}}\">\n                                    </div>\n                                    <div class=\"col-sm-3\">\n                                        <button type=\"button\" class=\"btn btn-success btn-sm\" id=\"createToken\" data-loading-text=\"{{i18n .Lang \"common.generate\"}}\" data-action=\"create\">{{i18n .Lang \"common.generate\"}}</button>\n                                        <button type=\"button\" class=\"btn btn-danger btn-sm\" id=\"deleteToken\" data-loading-text=\"{{i18n .Lang \"common.delete\"}}\" data-action=\"delete\">{{i18n .Lang \"common.delete\"}}</button>\n                                    </div>\n                                </div>\n                            </div>\n                                <div class=\"form-group\">\n                                    <label>{{i18n $.Lang \"blog.access_pass\"}}</label>\n                                    <input type=\"text\" name=\"bPassword\" id=\"bPassword\" class=\"form-control\" placeholder=\"{{i18n $.Lang \"blog.access_pass\"}}\" value=\"{{.Model.BookPassword}}\">\n                                    <p class=\"text\">{{i18n $.Lang \"message.access_pass_desc\"}}</p>\n                                </div>\n                            {{end}}\n                            <div class=\"form-group\">\n                                <label for=\"autoRelease\">{{i18n $.Lang \"blog.auto_publish\"}}</label>\n                                <div class=\"controls\">\n                                    <div class=\"switch switch-small\" data-on=\"primary\" data-off=\"info\">\n                                        <input type=\"checkbox\" id=\"autoRelease\" name=\"auto_release\"{{if .Model.AutoRelease }} checked{{end}} data-size=\"small\">\n                                    </div>\n                                </div>\n                            </div>\n                            <div class=\"form-group\">\n                                <label for=\"autoRelease\">{{i18n $.Lang \"blog.enable_export\"}}</label>\n                                <div class=\"controls\">\n                                    <div class=\"switch switch-small\" data-on=\"primary\" data-off=\"info\">\n                                        <input type=\"checkbox\" id=\"isDownload\" name=\"is_download\"{{if .Model.IsDownload }} checked{{end}} data-size=\"small\" placeholder=\"{{i18n $.Lang \"blog.enable_export\"}}\">\n                                    </div>\n                                </div>\n                            </div>\n                            <div class=\"form-group\">\n                                <label for=\"autoRelease\">{{i18n $.Lang \"blog.enable_share\"}}</label>\n                                <div class=\"controls\">\n                                    <div class=\"switch switch-small\" data-on=\"primary\" data-off=\"info\">\n                                        <input type=\"checkbox\" id=\"enableShare\" name=\"enable_share\"{{if .Model.IsEnableShare }} checked{{end}} data-size=\"small\" placeholder=\"{{i18n $.Lang \"blog.enable_share\"}}\">\n                                    </div>\n                                </div>\n                            </div>\n                            <div class=\"form-group\">\n                                <label for=\"autoRelease\">{{i18n $.Lang \"blog.set_first_as_home\"}}</label>\n                                <div class=\"controls\">\n                                    <div class=\"switch switch-small\" data-on=\"primary\" data-off=\"info\">\n                                        <input type=\"checkbox\" id=\"is_use_first_document\" name=\"is_use_first_document\"{{if .Model.IsUseFirstDocument }} checked{{end}} data-size=\"small\" placeholder=\"{{i18n $.Lang \"blog.set_first_as_home\"}}\">\n                                    </div>\n                                </div>\n                            </div>\n                            <div class=\"form-group\">\n                                <button type=\"submit\" id=\"btnSaveBookInfo\" class=\"btn btn-success\" data-loading-text=\"{{i18n $.Lang \"common.processing\"}}\">{{i18n $.Lang \"common.save\"}}</button>\n                                <span id=\"form-error-message\" class=\"error-message\"></span>\n                            </div>\n                        </form>\n                    </div>\n                    <div class=\"form-right\">\n                        <label>\n                           <img src=\"{{.Model.Cover}}\" onerror=\"this.src='/static/images/book.png'\" alt=\"{{i18n .Lang \"blog.cover\"}}\" style=\"max-width: 120px;border: 1px solid #999\" id=\"headimgurl\">\n                        </label>\n                    </div>\n                    <div class=\"clearfix\"></div>\n\n                </div>\n            </div>\n        </div>\n    </div>\n    {{template \"widgets/footer.tpl\" .}}\n</div>\n<div class=\"modal fade\" id=\"changePrivatelyOwnedModal\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"changePrivatelyOwnedModalLabel\">\n    <div class=\"modal-dialog\" role=\"document\">\n        <form method=\"post\" action=\"{{urlfor \"ManagerController.PrivatelyOwned\" }}\" id=\"changePrivatelyOwnedForm\">\n            <input type=\"hidden\" name=\"identify\" value=\"{{.Model.Identify}}\">\n            <input type=\"hidden\" name=\"status\" value=\"{{if eq .Model.PrivatelyOwned 0}}close{{else}}open{{end}}\">\n            <div class=\"modal-content\">\n                <div class=\"modal-header\">\n                    <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\"><span aria-hidden=\"true\">&times;</span></button>\n                    <h4 class=\"modal-title\">\n                        {{if eq .Model.PrivatelyOwned 0}}\n                        {{i18n $.Lang \"blog.make_private\"}}\n                        {{else}}\n                        {{i18n $.Lang \"blog.make_public\"}}\n                        {{end}}\n                    </h4>\n                </div>\n                <div class=\"modal-body\">\n                    {{if eq .Model.PrivatelyOwned 0}}\n                    <span style=\"font-size: 14px;font-weight: 400;\">{{i18n $.Lang \"message.confirm_into_private\"}}</span>\n                    <p></p>\n                    <p class=\"text error-message\">{{i18n $.Lang \"message.into_private_notice\"}}</p>\n                    {{else}}\n                    <span style=\"font-size: 14px;font-weight: 400;\">{{i18n $.Lang \"message.confirm_into_public\"}}</span>\n                    <p></p>\n                    <p class=\"text error-message\">{{i18n $.Lang \"message.into_public_notice\"}}</p>\n                    {{end}}\n                </div>\n                <div class=\"modal-footer\">\n                    <span class=\"error-message\" id=\"form-error-message1\"></span>\n                    <button type=\"button\" class=\"btn btn-default\" data-dismiss=\"modal\">{{i18n .Lang \"common.cancel\"}}</button>\n                    <button type=\"submit\" class=\"btn btn-primary\" data-loading-text=\"{{i18n .Lang \"message.processing\"}}\" id=\"btnChangePrivatelyOwned\">{{i18n .Lang \"common.confirm\"}}</button>\n                </div>\n            </div>\n        </form>\n    </div>\n</div>\n\n<!-- Delete Book Modal -->\n<div class=\"modal fade\" id=\"deleteBookModal\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"deleteBookModalLabel\">\n    <div class=\"modal-dialog\" role=\"document\">\n        <form method=\"post\" id=\"deleteBookForm\" action=\"{{urlfor \"ManagerController.DeleteBook\"}}\">\n            <input type=\"hidden\" name=\"book_id\" value=\"{{.Model.BookId}}\">\n            <div class=\"modal-content\">\n                <div class=\"modal-header\">\n                    <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\"><span aria-hidden=\"true\">&times;</span></button>\n                    <h4 class=\"modal-title\">{{i18n .Lang \"blog.delete_project\"}}</h4>\n                </div>\n                <div class=\"modal-body\">\n                    <span style=\"font-size: 14px;font-weight: 400;\">{{i18n .Lang \"message.confirm_delete_project\"}}</span>\n                    <p></p>\n                    <p class=\"text error-message\">{{i18n .Lang \"message.warning_delete_project\"}}</p>\n                </div>\n                <div class=\"modal-footer\">\n                    <span id=\"form-error-message2\" class=\"error-message\"></span>\n                    <button type=\"button\" class=\"btn btn-default\" data-dismiss=\"modal\">{{i18n .Lang \"common.cancel\"}}</button>\n                    <button type=\"submit\" id=\"btnDeleteBook\" class=\"btn btn-primary\" data-loading-text=\"{{i18n .Lang \"message.processing\"}}\">{{i18n .Lang \"common.confirm_delete\"}}</button>\n                </div>\n            </div>\n        </form>\n    </div>\n</div>\n<div class=\"modal fade\" id=\"transferBookModal\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"transferBookModalLabel\">\n    <div class=\"modal-dialog\" role=\"document\">\n        <form action=\"{{urlfor \"ManagerController.Transfer\"}}\" method=\"post\" id=\"transferBookForm\">\n            <input type=\"hidden\" name=\"identify\" value=\"{{.Model.Identify}}\">\n            <div class=\"modal-content\">\n                <div class=\"modal-header\">\n                    <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\"><span aria-hidden=\"true\">&times;</span></button>\n                    <h4 class=\"modal-title\" id=\"myModalLabel\">{{i18n $.Lang \"blog.handover_project\"}}</h4>\n                </div>\n                <div class=\"modal-body\">\n                    <div class=\"form-group\">\n                        <label class=\"col-sm-2 control-label\">{{i18n $.Lang \"blog.recipient_account\"}}</label>\n                        <div class=\"col-sm-10\">\n                            <input type=\"text\" name=\"account\" class=\"form-control\" placeholder=\"{{i18n $.Lang \"blog.recipient_account\"}}\" id=\"receiveAccount\" maxlength=\"50\">\n                        </div>\n                    </div>\n                    <div class=\"clearfix\"></div>\n                </div>\n                <div class=\"modal-footer\">\n                    <span id=\"form-error-message3\" class=\"error-message\"></span>\n                    <button type=\"button\" class=\"btn btn-default\" data-dismiss=\"modal\">{{i18n .Lang \"common.cancel\"}}</button>\n                    <button type=\"submit\" id=\"btnTransferBook\" daata-loading-text=\"{{i18n $.Lang \"message.processing\"}}\" class=\"btn btn-primary\">{{i18n $.Lang \"common.comfirm\"}}</button>\n                </div>\n            </div>\n        </form>\n    </div>\n</div>\n<script src=\"{{cdnjs \"/static/jquery/1.12.4/jquery.min.js\"}}\" type=\"text/javascript\"></script>\n<script src=\"{{cdnjs \"/static/bootstrap/js/bootstrap.min.js\"}}\" type=\"text/javascript\"></script>\n<script src=\"{{cdnjs \"/static/webuploader/webuploader.min.js\"}}\" type=\"text/javascript\"></script>\n<script src=\"{{cdnjs \"/static/cropper/2.3.4/cropper.min.js\"}}\" type=\"text/javascript\"></script>\n<script src=\"{{cdnjs \"/static/js/jquery.form.js\"}}\" type=\"text/javascript\"></script>\n<script src=\"{{cdnjs \"/static/bootstrap/plugins/tagsinput/bootstrap-tagsinput.min.js\"}}\" type=\"text/javascript\"></script>\n<script src=\"{{cdnjs \"/static/bootstrap/plugins/bootstrap-switch/js/bootstrap-switch.min.js\"}}\" type=\"text/javascript\"></script>\n<script src=\"{{cdnjs \"/static/select2/4.0.5/js/select2.full.min.js\"}}\"></script>\n<script src=\"{{cdnjs \"/static/select2/4.0.5/js/i18n/zh-CN.js\"}}\"></script>\n<script src=\"{{cdnjs \"/static/js/main.js\"}}\" type=\"text/javascript\"></script>\n<script type=\"text/javascript\">\n    $(function () {\n        $(\"#autoRelease,#enableShare,#isDownload,#is_use_first_document\").bootstrapSwitch();\n        $(\"#upload-logo-panel\").on(\"hidden.bs.modal\",function () {\n            $(\"#upload-logo-panel\").find(\".modal-body\").html(window.modalHtml);\n        }).on(\"show.bs.modal\",function () {\n            window.modalHtml = $(\"#upload-logo-panel\").find(\".modal-body\").html();\n        });\n        $(\"#createToken,#deleteToken\").on(\"click\",function () {\n            var btn = $(this).button(\"loading\");\n            var action = $(this).attr(\"data-action\");\n            $.ajax({\n                url : \"{{urlfor \"ManagerController.CreateToken\"}}\",\n                type :\"post\",\n                data : { \"identify\" : {{.Model.Identify}} , \"action\" : action },\n                dataType : \"json\",\n                success : function (res) {\n                    if(res.errcode === 0){\n                        $(\"#token\").val(res.data);\n                    }else{\n                        alert(res.message);\n                    }\n                    btn.button(\"reset\");\n                },\n                error : function () {\n                    btn.button(\"reset\");\n                    alert({{i18n $.Lang \"message.system_error\"}});\n                }\n            }) ;\n        });\n        $(\"#token\").on(\"focus\",function () {\n            $(this).select();\n        });\n        $(\"#bookEditForm\").ajaxForm({\n            beforeSubmit : function () {\n                var bookName = $.trim($(\"#bookName\").val());\n                if (bookName === \"\") {\n                    return showError(\"{{i18n $.Lang \"message.project_name_empty\"}}\");\n                }\n                $(\"#btnSaveBookInfo\").button(\"loading\");\n            },\n            success : function (res) {\n                if(res.errcode === 0){\n                    showSuccess(\"{{i18n $.Lang \"message.success\"}}\")\n                }else{\n                    showError(\"{{i18n $.Lang \"message.failed\"}}\")\n                }\n                $(\"#btnSaveBookInfo\").button(\"reset\");\n            },\n            error : function () {\n                showError(\"{{i18n $.Lang \"message.system_error\"}}\");\n                $(\"#btnSaveBookInfo\").button(\"reset\");\n            }\n        });\n        $(\"#deleteBookForm\").ajaxForm({\n            beforeSubmit : function () {\n                $(\"#btnDeleteBook\").button(\"loading\");\n            },\n            success : function (res) {\n                if(res.errcode === 0){\n                    window.location = \"{{urlfor \"ManagerController.Books\"}}\";\n                }else{\n                    $(\"#btnDeleteBook\").button(\"reset\");\n                    showError(res.message,\"#form-error-message2\");\n                }\n            }\n        });\n        $(\"#transferBookForm\").ajaxForm({\n            beforeSubmit : function () {\n                var account = $.trim($(\"#receiveAccount\").val());\n                if (account === \"\"){\n                    return showError(\"{{i18n $.Lang \"message.receive_account_empty\"}}\",\"#form-error-message3\")\n                }\n                $(\"#btnTransferBook\").button(\"loading\");\n            },\n            success : function (res) {\n                if(res.errcode === 0){\n                    window.location = window.location.href;\n                }else{\n                    showError(res.message,\"#form-error-message3\");\n                }\n                $(\"#btnTransferBook\").button(\"reset\");\n            },\n            error : function () {\n                $(\"#btnTransferBook\").button(\"reset\");\n            }\n        });\n        $(\"#changePrivatelyOwnedForm\").ajaxForm({\n            beforeSubmit :function () {\n                $(\"#btnChangePrivatelyOwned\").button(\"loading\");\n            },\n            success :function (res) {\n                if(res.errcode === 0){\n                    window.location = window.location.href;\n                    return;\n                }else{\n                    showError(res.message,\"#form-error-message1\");\n                }\n                $(\"#btnChangePrivatelyOwned\").button(\"reset\");\n            },\n            error :function () {\n                showError(\"{{i18n $.Lang \"message.system_error\"}}\",\"#form-error-message1\");\n                $(\"#btnChangePrivatelyOwned\").button(\"reset\");\n            }\n        });\n        $('.js-data-example-ajax').select2({\n            language: \"{{i18n $.Lang \"common.js_lang\"}}\",\n            minimumInputLength : 1,\n            minimumResultsForSearch: Infinity,\n            maximumSelectionLength:1,\n            width : \"100%\",\n            ajax: {\n                url: '{{urlfor \"BookController.ItemsetsSearch\"}}',\n                dataType: 'json',\n                data: function (params) {\n                    return {\n                        q: params.term, // search term\n                        page: params.page\n                    };\n                },\n                processResults: function (data, params) {\n                    return {\n                        results : data.data.results\n                    }\n                }\n            }\n        });\n    });\n\n</script>\n</body>\n</html>"
  },
  {
    "path": "views/manager/edit_users.tpl",
    "content": "<!DOCTYPE html>\n<html lang=\"zh-CN\">\n<head>\n    <meta charset=\"utf-8\">\n    <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n\n    <title>{{i18n .Lang \"uc.edit_user\"}} - Powered by MinDoc</title>\n\n    <!-- Bootstrap -->\n    <link href=\"{{cdncss \"/static/bootstrap/css/bootstrap.min.css\"}}\" rel=\"stylesheet\">\n    <link href=\"{{cdncss \"/static/font-awesome/css/font-awesome.min.css\"}}\" rel=\"stylesheet\">\n    <link href=\"{{cdncss \"/static/css/main.css\" \"version\"}}\" rel=\"stylesheet\">\n    <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->\n    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->\n    <!--[if lt IE 9]>\n    <script src=\"/static/html5shiv/3.7.3/html5shiv.min.js\"></script>\n    <script src=\"/static/respond.js/1.4.2/respond.min.js\"></script>\n    <![endif]-->\n</head>\n<body>\n<div class=\"manual-reader\">\n    {{template \"widgets/header.tpl\" .}}\n    <div class=\"container manual-body\">\n        <div class=\"row\">\n        {{template \"manager/widgets.tpl\" .}}\n            <div class=\"page-right\">\n                <div class=\"m-box\">\n                    <div class=\"box-head\">\n                        <strong class=\"box-title\"> {{i18n .Lang \"uc.edit_user\"}}</strong>\n                    </div>\n                </div>\n                <div class=\"box-body col-lg-6 col-sm-12\">\n                    <form method=\"post\" id=\"saveMemberInfoForm\">\n                        <div class=\"form-group\">\n                            <label>{{i18n .Lang \"uc.username\"}}</label>\n                            <input type=\"text\" class=\"form-control\" name=\"account\" disabled placeholder=\"{{i18n .Lang \"uc.username\"}}\" value=\"{{.Model.Account}}\">\n                        </div>\n                        <div class=\"form-group\">\n                            <label>{{i18n .Lang \"uc.realname\"}}</label>\n                            <input type=\"text\" name=\"real_name\" class=\"form-control\" value=\"{{.Model.RealName}}\" placeholder=\"{{i18n .Lang \"uc.realname\"}}\">\n                        </div>\n                        <div class=\"form-group\">\n                            <label>{{i18n .Lang \"uc.password\"}}</label>\n                            <input type=\"password\" class=\"form-control\" name=\"password1\" placeholder=\"{{i18n .Lang \"uc.password\"}}\" maxlength=\"50\">\n                            <p style=\"color: #999;font-size: 12px;\">{{i18n .Lang \"uc.pwd_tips\"}}</p>\n                        </div>\n                        <div class=\"form-group\">\n                            <label>{{i18n .Lang \"uc.confirm_pwd\"}}</label>\n                            <input type=\"password\" class=\"form-control\" name=\"password2\" placeholder=\"{{i18n .Lang \"uc.confirm_pwd\"}}\" maxlength=\"50\">\n                        </div>\n                        <div class=\"form-group\">\n                            <label>{{i18n .Lang \"uc.email\"}} <strong class=\"text-danger\">*</strong></label>\n                            <input type=\"email\" class=\"form-control\" name=\"email\" placeholder=\"{{i18n .Lang \"uc.email\"}}\" value=\"{{.Model.Email}}\" maxlength=\"50\">\n                        </div>\n                        <div class=\"form-group\">\n                            <label>{{i18n .Lang \"uc.mobile\"}}</label>\n                            <input type=\"text\" class=\"form-control\" name=\"phone\" placeholder=\"{{i18n .Lang \"uc.mobile\"}}\" maxlength=\"50\" value=\"{{.Model.Phone}}\">\n                        </div>\n                        <div class=\"form-group\">\n                            <label class=\"description\">{{i18n .Lang \"uc.description\"}}</label>\n                            <textarea class=\"form-control\" rows=\"3\" title=\"{{i18n .Lang \"uc.description\"}}\" name=\"description\" id=\"description\" maxlength=\"500\" >{{.Model.Description}}</textarea>\n                            <p style=\"color: #999;font-size: 12px;\">{{i18n .Lang \"uc.description_tips\"}}</p>\n                        </div>\n                        <div class=\"form-group\">\n                            <button type=\"submit\" id=\"btnMemberInfo\" class=\"btn btn-success\" data-loading-text=\"{{i18n .Lang \"message.processing\"}}\">{{i18n .Lang \"common.save\"}}</button>\n                            <span id=\"form-error-message\" class=\"error-message\"></span>\n                        </div>\n                    </form>\n\n                    <div class=\"clearfix\"></div>\n\n                </div>\n            </div>\n        </div>\n    </div>\n    {{template \"widgets/footer.tpl\" .}}\n</div>\n\n\n<script src=\"{{cdnjs \"/static/jquery/1.12.4/jquery.min.js\"}}\" type=\"text/javascript\"></script>\n<script src=\"{{cdnjs \"/static/bootstrap/js/bootstrap.min.js\"}}\" type=\"text/javascript\"></script>\n<script src=\"{{cdnjs \"/static/js/jquery.form.js\"}}\" type=\"text/javascript\"></script>\n<script src=\"{{cdnjs \"/static/js/main.js\"}}\" type=\"text/javascript\"></script>\n<script type=\"text/javascript\">\n    $(function () {\n        $(\"#saveMemberInfoForm\").ajaxForm({\n            beforeSubmit : function () {\n                var $then = $(\"#saveMemberInfoForm\");\n\n                var email = $.trim($then.find(\"input[name='email']\").val());\n                var password1 = $.trim($then.find(\"input[name='password1']\").val());\n                var password2 = $.trim($then.find(\"input[name='password2']\").val());\n                if (email === \"\"){\n                    return showError({{i18n .Lang \"message.email_empty\"}});\n                }\n                if (password1 !== \"\" && password1 !== password2){\n                    return showError({{i18n .Lang \"message.wrong_confirm_pwd\"}});\n                }\n                $(\"#btnMemberInfo\").button(\"loading\");\n            },success : function (res) {\n                if(res.errcode === 0) {\n                    showSuccess({{i18n .Lang \"message.success\"}})\n                }else{\n                    showError(res.message);\n                }\n                $(\"#btnMemberInfo\").button(\"reset\");\n            }\n        });\n    });\n</script>\n</body>\n</html>"
  },
  {
    "path": "views/manager/index.tpl",
    "content": "<!DOCTYPE html>\n<html lang=\"zh-CN\">\n<head>\n    <meta charset=\"utf-8\">\n    <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n\n    <title>{{i18n .Lang \"mgr.dashboard_mgr\"}} - Powered by MinDoc</title>\n\n    <!-- Bootstrap -->\n    <link href=\"{{cdncss \"/static/bootstrap/css/bootstrap.min.css\"}}\" rel=\"stylesheet\">\n    <link href=\"{{cdncss \"/static/font-awesome/css/font-awesome.min.css\"}}\" rel=\"stylesheet\">\n\n    <link href=\"{{cdncss \"/static/css/main.css\" \"version\"}}\" rel=\"stylesheet\">\n    <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->\n    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->\n    <!--[if lt IE 9]>\n    <script src=\"/static/html5shiv/3.7.3/html5shiv.min.js\"></script>\n    <script src=\"/static/respond.js/1.4.2/respond.min.js\"></script>\n    <![endif]-->\n</head>\n<body>\n<div class=\"manual-reader\">\n    {{template \"widgets/header.tpl\" .}}\n    <div class=\"container manual-body\">\n        <div class=\"row\">\n        {{template \"manager/widgets.tpl\" .}}\n            <div class=\"page-right\">\n                <div class=\"m-box\">\n                    <div class=\"box-head\">\n                        <strong class=\"box-title\">{{i18n .Lang \"mgr.dashboard_mgr\"}}</strong>\n                    </div>\n                </div>\n                <div class=\"box-body manager\">\n                    <a href=\"{{urlfor \"ManagerController.Books\"}}\" class=\"dashboard-item\">\n                        <span class=\"fa fa-book\" aria-hidden=\"true\"></span>\n                        <span class=\"fa-class\">{{i18n .Lang \"mgr.proj_amount\"}}</span>\n                        <span class=\"fa-class\">{{.Model.BookNumber}}</span>\n                    </a>\n                    <div class=\"dashboard-item\">\n                        <span class=\"fa fa-file-text-o\" aria-hidden=\"true\"></span>\n                        <span class=\"fa-class\">{{i18n .Lang \"mgr.blog_amount\"}}</span>\n                        <span class=\"fa-class\">{{.Model.DocumentNumber}}</span>\n                    </div>\n                    <a href=\"{{urlfor \"ManagerController.Users\"}}\" class=\"dashboard-item\">\n                            <span class=\"fa fa-users\" aria-hidden=\"true\"></span>\n                            <span class=\"fa-class\">{{i18n .Lang \"mgr.member_amount\"}}</span>\n                            <span class=\"fa-class\">{{.Model.MemberNumber}}</span>\n                    </a>\n                    <!--\n                    {{/*\n                    <div class=\"dashboard-item\">\n                        <span class=\"fa fa-comments-o\" aria-hidden=\"true\"></span>\n                        <span class=\"fa-class\">{{i18n .Lang \"mgr.comment_amount\"}}</span>\n                        <span class=\"fa-class\">{{.Model.CommentNumber}}</span>\n                    </div>\n                */}}-->\n                    <a href=\"{{urlfor \"ManagerController.AttachList\" }}\" class=\"dashboard-item\">\n                        <span class=\"fa fa-cloud-download\" aria-hidden=\"true\"></span>\n                        <span class=\"fa-class\">{{i18n .Lang \"mgr.attachment_amount\"}}</span>\n                        <span class=\"fa-class\">{{.Model.AttachmentNumber}}</span>\n                    </a>\n                </div>\n            </div>\n        </div>\n    </div>\n</div>\n<script src=\"{{cdnjs \"/static/jquery/1.12.4/jquery.min.js\"}}\"></script>\n<script src=\"{{cdnjs \"/static/bootstrap/js/bootstrap.min.js\"}}\"></script>\n</body>\n</html>"
  },
  {
    "path": "views/manager/itemsets.tpl",
    "content": "<!DOCTYPE html>\n<html lang=\"zh-CN\">\n<head>\n    <meta charset=\"utf-8\">\n    <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n\n    <title>{{i18n .Lang \"mgr.project_space_mgr\"}} - Powered by MinDoc</title>\n\n    <!-- Bootstrap -->\n    <link href=\"{{cdncss \"/static/bootstrap/css/bootstrap.min.css\"}}\" rel=\"stylesheet\" type=\"text/css\">\n    <link href=\"{{cdncss \"/static/font-awesome/css/font-awesome.min.css\"}}\" rel=\"stylesheet\" type=\"text/css\">\n\n    <link href=\"{{cdncss \"/static/css/main.css\" \"version\"}}\" rel=\"stylesheet\">\n</head>\n<body>\n<div class=\"manual-reader\">\n{{template \"widgets/header.tpl\" .}}\n    <div class=\"container manual-body\">\n        <div class=\"row\">\n        {{template \"manager/widgets.tpl\" .}}\n            <div class=\"page-right\">\n                <div class=\"m-box\">\n                    <div class=\"box-head\">\n                        <strong class=\"box-title\">{{i18n .Lang \"mgr.project_space_mgr\"}}</strong>\n                    {{if eq .Member.Role 0}}\n                        <button type=\"button\" class=\"btn btn-success btn-sm pull-right\" data-toggle=\"modal\" data-target=\"#addItemsetsDialogModal\"><i class=\"fa fa-plus\" aria-hidden=\"true\"></i> {{i18n .Lang \"mgr.create_proj_space\"}}</button>\n                    {{end}}\n                    </div>\n                </div>\n                <div class=\"box-body\">\n                    <div class=\"attach-list\" id=\"ItemsetsList\">\n                        <table class=\"table\">\n                            <thead>\n                            <tr>\n                                <th width=\"10%\">#</th>\n                                <th width=\"30%\">{{i18n .Lang \"mgr.proj_space_name\"}}</th>\n                                <th width=\"20%\">{{i18n .Lang \"mgr.proj_space_id\"}}</th>\n                                <th width=\"20%\">{{i18n .Lang \"mgr.proj_amount\"}}</th>\n                                <th>{{i18n .Lang \"common.operate\"}}</th>\n                            </tr>\n                            </thead>\n                            <tbody>\n                            {{range $index,$item := .Lists}}\n                            <tr>\n                                <td>{{$item.ItemId}}</td>\n                                <td>{{$item.ItemName}}</td>\n                                <td>{{$item.ItemKey}}</td>\n                                <td>{{$item.BookNumber}}</td>\n                                <td>\n                                    <button type=\"button\" class=\"btn btn-sm btn-default\" data-id=\"{{$item.ItemId}}\" data-method=\"edit\" data-name=\"{{$item.ItemName}}\" data-key=\"{{$item.ItemKey}}\">{{i18n $.Lang \"common.edit\"}}</button>\n                                    {{if ne $item.ItemId 1}}\n                                    <button type=\"button\" data-method=\"delete\" class=\"btn btn-danger btn-sm\" data-id=\"{{$item.ItemId}}\" data-loading-text=\"{{i18n $.Lang \"message.processing\"}}\">{{i18n $.Lang \"common.delete\"}}</button>\n                                    {{end}}\n                                    <a href=\"{{urlfor \"ItemsetsController.List\" \":key\" $item.ItemKey}}\" class=\"btn btn-success btn-sm\" target=\"_blank\">{{i18n $.Lang \"common.detail\"}}</a>\n                                </td>\n                            </tr>\n                            {{else}}\n                            <tr><td class=\"text-center\" colspan=\"6\">{{i18n .Lang \"message.no_data\"}}</td></tr>\n                            {{end}}\n                            </tbody>\n                        </table>\n                        <nav class=\"pagination-container\">\n                        {{.PageHtml}}\n                        </nav>\n                    </div>\n                </div>\n            </div>\n        </div>\n    </div>\n{{template \"widgets/footer.tpl\" .}}\n</div>\n<!-- Modal -->\n<div class=\"modal fade\" id=\"addItemsetsDialogModal\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"addItemsetsDialogModalLabel\">\n    <div class=\"modal-dialog\">\n        <form method=\"post\" autocomplete=\"off\" class=\"form-horizontal\" action=\"{{urlfor \"ManagerController.ItemsetsEdit\"}}\" id=\"addItemsetsDialogForm\">\n            <div class=\"modal-content\">\n                <div class=\"modal-header\">\n                    <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\"><span aria-hidden=\"true\">&times;</span></button>\n                    <h4 class=\"modal-title\" id=\"myModalLabel\">{{i18n .Lang \"mgr.create_proj_space\"}}</h4>\n                </div>\n                <div class=\"modal-body\">\n                    <div class=\"form-group\">\n                        <label class=\"col-sm-4 control-label\" for=\"account\">{{i18n .Lang \"mgr.proj_space_name\"}}<span class=\"error-message\">*</span></label>\n                        <div class=\"col-sm-8\">\n                            <input type=\"text\" name=\"itemName\" class=\"form-control\" placeholder=\"{{i18n .Lang \"mgr.proj_space_name\"}}\" id=\"itemName\" maxlength=\"50\">\n                        </div>\n                    </div>\n                    <div class=\"form-group\">\n                        <label class=\"col-sm-4 control-label\" for=\"itemKey\">{{i18n .Lang \"mgr.proj_space_id\"}}<span class=\"error-message\">*</span></label>\n                        <div class=\"col-sm-8\">\n                            <input type=\"text\" name=\"itemKey\" id=\"itemKey\" class=\"form-control\" placeholder=\"{{i18n .Lang \"mgr.proj_space_id\"}}\" maxlength=\"50\">\n                            <p class=\"text\">{{i18n .Lang \"message.proj_space_id_tips\"}}</p>\n                        </div>\n                    </div>\n                    <div class=\"clearfix\"></div>\n                </div>\n                <div class=\"modal-footer\">\n                    <span id=\"create-form-error-message\"></span>\n                    <button type=\"button\" class=\"btn btn-default\" data-dismiss=\"modal\">{{i18n .Lang \"common.cancel\"}}</button>\n                    <button type=\"submit\" class=\"btn btn-success\" data-loading-text=\"{{i18n .Lang \"message.processing\"}}\" id=\"btnAddItemsets\">{{i18n .Lang \"common.save\"}}\n                    </button>\n                </div>\n            </div>\n        </form>\n    </div>\n</div><!--END Modal-->\n<div class=\"modal fade\" id=\"editItemsetsDialogModal\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"editItemsetsDialogModalLabel\">\n    <div class=\"modal-dialog\" role=\"document\">\n        <form method=\"post\" autocomplete=\"off\" class=\"form-horizontal\" action=\"{{urlfor \"ManagerController.ItemsetsEdit\"}}\" id=\"editItemsetsDialogForm\">\n            <input type=\"hidden\" name=\"itemId\" value=\"\">\n            <div class=\"modal-content\">\n                <div class=\"modal-header\">\n                    <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\"><span aria-hidden=\"true\">&times;</span></button>\n                    <h4 class=\"modal-title\" id=\"myModalLabel\">{{i18n .Lang \"mgr.edit_proj_space\"}}</h4>\n                </div>\n                <div class=\"modal-body\">\n                    <div class=\"form-group\">\n                        <label class=\"col-sm-4 control-label\" for=\"itemName\">{{i18n .Lang \"mgr.proj_space_name\"}}<span class=\"error-message\">*</span></label>\n                        <div class=\"col-sm-8\">\n                            <input type=\"text\" name=\"itemName\" id=\"itemName\" class=\"form-control\" placeholder=\"{{i18n .Lang \"mgr.proj_space_name\"}}\" maxlength=\"50\">\n                        </div>\n                    </div>\n                    <div class=\"form-group\">\n                        <label class=\"col-sm-4 control-label\" for=\"itemKey\">{{i18n .Lang \"mgr.proj_space_id\"}}<span class=\"error-message\">*</span></label>\n                        <div class=\"col-sm-8\">\n                            <input type=\"text\" name=\"itemKey\" id=\"itemKey\" class=\"form-control\" placeholder=\"{{i18n .Lang \"mgr.proj_space_id\"}}\" maxlength=\"50\">\n                        </div>\n                    </div>\n                    <div class=\"clearfix\"></div>\n                </div>\n                <div class=\"modal-footer\">\n                    <span id=\"edit-form-error-message\"></span>\n                    <button type=\"button\" class=\"btn btn-default\" data-dismiss=\"modal\">{{i18n .Lang \"common.cancel\"}}</button>\n                    <button type=\"submit\" class=\"btn btn-success\" data-loading-text=\"{{i18n .Lang \"message.processing\"}}\" id=\"btnEditItemsets\">{{i18n .Lang \"common.save\"}}\n                    </button>\n                </div>\n            </div>\n        </form>\n    </div>\n</div><!--END Modal-->\n<script src=\"{{cdnjs \"/static/jquery/1.12.4/jquery.min.js\"}}\"></script>\n<script src=\"{{cdnjs \"/static/bootstrap/js/bootstrap.min.js\"}}\"></script>\n<script src=\"{{cdnjs \"/static/js/jquery.form.js\"}}\" type=\"text/javascript\"></script>\n<script src=\"{{cdnjs \"/static/layer/layer.js\" }}\" type=\"text/javascript\"></script>\n<script src=\"{{cdnjs \"/static/js/main.js\"}}\" type=\"text/javascript\"></script>\n\n<script type=\"text/javascript\">\n    $(function () {\n        var editItemsetsDialogModal = $(\"#editItemsetsDialogModal\");\n        var addItemsetsDialogForm = $(\"#addItemsetsDialogForm\");\n        var editItemsetsDialogForm = $(\"#editItemsetsDialogForm\");\n\n        editItemsetsDialogModal.on(\"shown.bs.modal\",function () {\n            editItemsetsDialogModal.find(\"input[name='itemName']\").focus();\n        });\n        $(\"#addItemsetsDialogModal\").on(\"show.bs.modal\", function () {\n            window.addItemsetsDialogModalHtml = $(this).find(\"form\").html();\n        }).on(\"hidden.bs.modal\", function () {\n            $(this).find(\"form\").html(window.addItemsetsDialogModalHtml);\n        });\n\n        addItemsetsDialogForm.ajaxForm({\n            beforeSubmit: function () {\n                var $itemName = addItemsetsDialogForm.find(\"input[name='itemName']\").val();\n                var $itemKey =  addItemsetsDialogForm.find(\"input[name='itemKey']\").val();\n\n                if ($itemName == \"\") {\n                    showError(\"{{i18n .Lang \"message.proj_space_name_empty\"}}\",\"#create-form-error-message\");\n                }\n                if ($itemKey == \"\") {\n                    showError(\"{{i18n .Lang \"message.proj_space_id_empty\"}}\",\"#create-form-error-message\");\n                }\n                $(\"#btnAddItemsets\").button(\"loading\");\n                showError(\"\",\"#create-form-error-message\");\n                return true;\n            },\n            success: function ($res) {\n                if ($res.errcode === 0) {\n                    window.location = window.document.location;\n                } else {\n                    showError($res.message,\"#create-form-error-message\");\n                }\n            },\n            error: function () {\n                showError({{i18n .Lang \"message.system_error\"}},\"#create-form-error-message\");\n            },\n            complete: function () {\n                $(\"#btnAddItemsets\").button(\"reset\");\n            }\n        });\n\n        editItemsetsDialogForm.ajaxForm({\n           beforeSubmit: function () {\n               var $itemName = editItemsetsDialogForm.find(\"input[name='itemName']\").val();\n               var $itemKey =  editItemsetsDialogForm.find(\"input[name='itemKey']\").val();\n\n               if ($itemName == \"\") {\n                   showError(\"{{i18n .Lang \"message.proj_space_name_empty\"}}\",\"#edit-form-error-message\");\n               }\n               if ($itemKey == \"\") {\n                   showError(\"{{i18n .Lang \"message.proj_space_id_empty\"}}\",\"#edit-form-error-message\");\n               }\n               $(\"#btnEditItemsets\").button(\"loading\");\n               showError(\"\",\"#edit-form-error-message\");\n               return true;\n           } ,\n            success : function ($res) {\n                if ($res.errcode === 0) {\n                    window.location = window.document.location;\n                } else {\n                    showError($res.message,\"#edit-form-error-message\");\n                }\n            },\n            error: function () {\n                showError({{i18n .Lang \"message.system_error\"}},\"#edit-form-error-message\");\n            },\n            complete: function () {\n                $(\"#btnEditItemsets\").button(\"reset\");\n            }\n        });\n\n        $(\"#ItemsetsList\").on(\"click\",\"button[data-method='delete']\",function () {\n            var id = $(this).attr(\"data-id\");\n            var $this = $(this);\n            $(this).button(\"loading\");\n            $.ajax({\n                url : \"{{urlfor \"ManagerController.ItemsetsDelete\"}}\",\n                data: {\"itemId\":id},\n                type : \"post\",\n                dataType : \"json\",\n                success : function (res) {\n                    if(res.errcode === 0){\n                        $this.closest(\"tr\").remove().empty();\n                    }else {\n                        layer.msg(res.message);\n                    }\n                },\n                error : function () {\n                    layer.msg({{i18n .Lang \"message.system_error\"}});\n                },\n                complete : function () {\n                    $this.button(\"reset\");\n                }\n            });\n        }).on(\"click\",\"button[data-method='edit']\",function () {\n            var $itemId = $(this).attr(\"data-id\");\n            var $itemName = $(this).attr(\"data-name\");\n            var $itemKey = $(this).attr(\"data-key\");\n\n            editItemsetsDialogModal.find(\"input[name='itemId']\").val($itemId);\n            editItemsetsDialogModal.find(\"input[name='itemName']\").val($itemName);\n            editItemsetsDialogModal.find(\"input[name='itemKey']\").val($itemKey);\n\n            editItemsetsDialogModal.modal(\"show\");\n        });\n    });\n</script>\n</body>\n</html>"
  },
  {
    "path": "views/manager/label_list.tpl",
    "content": "<!DOCTYPE html>\n<html lang=\"zh-CN\">\n<head>\n    <meta charset=\"utf-8\">\n    <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n\n    <title>{{i18n .Lang \"mgr.label_mgr\"}} - Powered by MinDoc</title>\n\n    <!-- Bootstrap -->\n    <link href=\"{{cdncss \"/static/bootstrap/css/bootstrap.min.css\"}}\" rel=\"stylesheet\" type=\"text/css\">\n    <link href=\"{{cdncss \"/static/font-awesome/css/font-awesome.min.css\"}}\" rel=\"stylesheet\" type=\"text/css\">\n\n    <link href=\"{{cdncss \"/static/css/main.css\" \"version\"}}\" rel=\"stylesheet\">\n    <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->\n    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->\n    <!--[if lt IE 9]>\n    <script src=\"{{cdnjs \"/static/html5shiv/3.7.3/html5shiv.min.js\"}}\"></script>\n    <script src=\"{{cdnjs \"/static/respond.js/1.4.2/respond.min.js\" }}\"></script>\n    <![endif]-->\n</head>\n<body>\n<div class=\"manual-reader\">\n{{template \"widgets/header.tpl\" .}}\n    <div class=\"container manual-body\">\n        <div class=\"row\">\n        {{template \"manager/widgets.tpl\" .}}\n            <div class=\"page-right\">\n                <div class=\"m-box\">\n                    <div class=\"box-head\">\n                        <strong class=\"box-title\">{{i18n .Lang \"mgr.label_mgr\"}}</strong>\n                    </div>\n                </div>\n                <div class=\"box-body\">\n                    <div class=\"attach-list\" id=\"labelList\">\n                        <table class=\"table\">\n                            <thead>\n                            <tr>\n                                <th width=\"10%\">#</th>\n                                <th width=\"55%\">{{i18n .Lang \"mgr.label_name\"}}</th>\n                                <th width=\"20%\">{{i18n .Lang \"mgr.used_quantity\"}}</th>\n                                <th>{{i18n .Lang \"common.operate\"}}</th>\n                            </tr>\n                            </thead>\n                            <tbody>\n                            {{range $index,$item := .Lists}}\n                            <tr>\n                                <td>{{$item.LabelId}}</td>\n                                <td>{{$item.LabelName}}</td>\n                                <td>{{$item.BookNumber}}</td>\n                                <td>\n                                    <button type=\"button\" data-method=\"delete\" class=\"btn btn-danger btn-sm\" data-id=\"{{$item.LabelId}}\" data-loading-text=\"{{i18n $.Lang \"message.processing\"}}\">{{i18n $.Lang \"common.delete\"}}</button>\n                                    <a href=\"{{urlfor \"LabelController.Index\" \":key\" $item.LabelName}}\" class=\"btn btn-success btn-sm\" target=\"_blank\">{{i18n $.Lang \"common.detail\"}}</a>\n\n                                </td>\n                            </tr>\n                            {{else}}\n                            <tr><td class=\"text-center\" colspan=\"6\">{{i18n .Lang \"message.no_data\"}}</td></tr>\n                            {{end}}\n                            </tbody>\n                        </table>\n                        <nav class=\"pagination-container\">\n                        {{.PageHtml}}\n                        </nav>\n                    </div>\n                </div>\n            </div>\n        </div>\n    </div>\n{{template \"widgets/footer.tpl\" .}}\n</div>\n\n<script src=\"{{cdnjs \"/static/jquery/1.12.4/jquery.min.js\"}}\"></script>\n<script src=\"{{cdnjs \"/static/bootstrap/js/bootstrap.min.js\"}}\"></script>\n<script src=\"{{cdnjs \"/static/js/jquery.form.js\"}}\" type=\"text/javascript\"></script>\n<script src=\"{{cdnjs \"/static/layer/layer.js\" }}\" type=\"text/javascript\"></script>\n<script type=\"text/javascript\">\n    $(function () {\n        $(\"#labelList\").on(\"click\",\"button[data-method='delete']\",function () {\n            var id = $(this).attr(\"data-id\");\n            var $this = $(this);\n            $(this).button(\"loading\");\n            $.ajax({\n                url : \"{{urlfor \"ManagerController.LabelDelete\" \":id\" \"\"}}\" + id,\n                type : \"post\",\n                dataType : \"json\",\n                success : function (res) {\n                    if(res.errcode === 0){\n                        $this.closest(\"tr\").remove().empty();\n                    }else {\n                        layer.msg(res.message);\n                    }\n                },\n                error : function () {\n                    layer.msg({{i18n .Lang \"message.system_error\"}});\n                },\n                complete : function () {\n                    $this.button(\"reset\");\n                }\n            });\n        });\n    });\n</script>\n</body>\n</html>"
  },
  {
    "path": "views/manager/setting.tpl",
    "content": "<!DOCTYPE html>\n<html lang=\"zh-CN\">\n<head>\n    <meta charset=\"utf-8\">\n    <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n\n    <title>{{i18n .Lang \"mgr.config_mgr\"}} - Powered by MinDoc</title>\n\n    <!-- Bootstrap -->\n    <link href=\"{{cdncss \"/static/bootstrap/css/bootstrap.min.css\"}}\" rel=\"stylesheet\">\n    <link href=\"{{cdncss \"/static/font-awesome/css/font-awesome.min.css\"}}\" rel=\"stylesheet\">\n    <link href=\"{{cdncss \"/static/css/main.css\" \"version\"}}\" rel=\"stylesheet\">\n    <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->\n    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->\n    <!--[if lt IE 9]>\n    <script src=\"/static/html5shiv/3.7.3/html5shiv.min.js\"></script>\n    <script src=\"/static/respond.js/1.4.2/respond.min.js\"></script>\n    <![endif]-->\n</head>\n<body>\n<div class=\"manual-reader\">\n    {{template \"widgets/header.tpl\" .}}\n    <div class=\"container manual-body\">\n        <div class=\"row\">\n        {{template \"manager/widgets.tpl\" .}}\n            <div class=\"page-right\">\n                <div class=\"m-box\">\n                    <div class=\"box-head\">\n                        <strong class=\"box-title\"> {{i18n .Lang \"mgr.config_mgr\"}}</strong>\n                    </div>\n                </div>\n                <div class=\"box-body\">\n                    <form method=\"post\" id=\"gloablEditForm\" action=\"{{urlfor \"ManagerController.Setting\"}}\">\n                        <div class=\"form-group\">\n                            <label>{{i18n .Lang \"mgr.site_name\"}}</label>\n                            <input type=\"text\" class=\"form-control\" name=\"SITE_NAME\" id=\"siteName\" placeholder=\"{{i18n .Lang \"mgr.site_name\"}}\" value=\"{{.SITE_NAME}}\">\n                        </div>\n                        <div class=\"form-group\">\n                            <label>{{i18n .Lang \"mgr.domain_icp\"}}</label>\n                            <input type=\"text\" class=\"form-control\" name=\"site_beian\" id=\"siteName\" placeholder=\"{{i18n .Lang \"mgr.domain_icp\"}}\" value=\"{{.site_beian}}\" maxlength=\"50\">\n                        </div>\n                        <div class=\"form-group\">\n                            <label>{{i18n .Lang \"mgr.site_desc\"}}</label>\n                            <textarea rows=\"3\" class=\"form-control\" name=\"site_description\" style=\"height: 90px\" placeholder=\"{{i18n .Lang \"mgr.site_desc\"}}\">{{.site_description}}</textarea>\n                            <p class=\"text\">{{i18n .Lang \"mgr.site_desc_tips\"}}</p>\n                        </div>\n                        <div class=\"form-group\">\n                            <label>{{i18n .Lang \"mgr.language\"}}</label>\n                            <select name=\"language\" class=\"form-control\">\n                                {{$curLang := .Lang}}\n                                {{range $langKey, $langName := .i18n_map }}\n                                    <option value=\"{{$langKey}}\" {{if eq $langKey $curLang}}selected{{end}}>{{$langName}}</option>\n                                {{end}}\n                            </select>\n                        </div>\n                            <div class=\"form-group\">\n                                <label>{{i18n .Lang \"mgr.enable_anonymous_access\"}}</label>\n                                <div class=\"radio\">\n                                    <label class=\"radio-inline\">\n                                        <input type=\"radio\" {{if eq .ENABLE_ANONYMOUS \"true\"}}checked{{end}} name=\"ENABLE_ANONYMOUS\" value=\"true\">{{i18n .Lang \"mgr.enable\"}}<span class=\"text\"></span>\n                                    </label>\n                                    <label class=\"radio-inline\">\n                                        <input type=\"radio\" {{if eq .ENABLE_ANONYMOUS \"false\"}}checked{{end}} name=\"ENABLE_ANONYMOUS\" value=\"false\">{{i18n .Lang \"mgr.disable\"}}<span class=\"text\"></span>\n                                    </label>\n                                </div>\n                            </div>\n                        <div class=\"form-group\">\n                            <label>{{i18n .Lang \"mgr.enable_register\"}}</label>\n                            <div class=\"radio\">\n                                <label class=\"radio-inline\">\n                                    <input type=\"radio\" {{if eq .ENABLED_REGISTER \"true\"}}checked{{end}} name=\"ENABLED_REGISTER\" value=\"true\">{{i18n .Lang \"mgr.enable\"}}<span class=\"text\"></span>\n                                </label>\n                                <label class=\"radio-inline\">\n                                    <input type=\"radio\" {{if eq .ENABLED_REGISTER \"false\"}}checked{{end}} name=\"ENABLED_REGISTER\" value=\"false\">{{i18n .Lang \"mgr.disable\"}}<span class=\"text\"></span>\n                                </label>\n                            </div>\n                        </div>\n                        <div class=\"form-group\">\n                            <label>{{i18n .Lang \"mgr.enable_captcha\"}}</label>\n                            <div class=\"radio\">\n                                <label class=\"radio-inline\">\n                                    <input type=\"radio\" {{if eq .ENABLED_CAPTCHA \"true\"}}checked{{end}} name=\"ENABLED_CAPTCHA\" value=\"true\">{{i18n .Lang \"mgr.enable\"}}<span class=\"text\"></span>\n                                </label>\n                                <label class=\"radio-inline\">\n                                    <input type=\"radio\" {{if eq .ENABLED_CAPTCHA \"false\"}}checked{{end}} name=\"ENABLED_CAPTCHA\" value=\"false\">{{i18n .Lang \"mgr.disable\"}}<span class=\"text\"></span>\n                                </label>\n                            </div>\n                        </div>\n                        <div class=\"form-group\">\n                            <label>{{i18n .Lang \"mgr.enable_doc_his\"}}</label>\n                            <div class=\"radio\">\n                                <label class=\"radio-inline\">\n                                    <input type=\"radio\" {{if eq .ENABLE_DOCUMENT_HISTORY \"true\"}}checked{{end}} name=\"ENABLE_DOCUMENT_HISTORY\" value=\"true\">{{i18n .Lang \"mgr.enable\"}}<span class=\"text\"></span>\n                                </label>\n                                <label class=\"radio-inline\">\n                                    <input type=\"radio\" {{if eq .ENABLE_DOCUMENT_HISTORY \"false\"}}checked{{end}} name=\"ENABLE_DOCUMENT_HISTORY\" value=\"false\">{{i18n .Lang \"mgr.disable\"}}<span class=\"text\"></span>\n                                </label>\n                            </div>\n                        </div>\n\n                        <div class=\"form-group\">\n                            <button type=\"submit\" id=\"btnSaveBookInfo\" class=\"btn btn-success\" data-loading-text=\"{{i18n .Lang \"message.processing\"}}\">{{i18n .Lang \"common.save\"}}</button>\n                            <span id=\"form-error-message\" class=\"error-message\"></span>\n                        </div>\n                        </form>\n\n                    <div class=\"clearfix\"></div>\n\n                </div>\n            </div>\n        </div>\n    </div>\n    {{template \"widgets/footer.tpl\" .}}\n</div>\n\n\n<script src=\"{{cdnjs \"/static/jquery/1.12.4/jquery.min.js\"}}\" type=\"text/javascript\"></script>\n<script src=\"{{cdnjs \"/static/bootstrap/js/bootstrap.min.js\"}}\" type=\"text/javascript\"></script>\n<script src=\"{{cdnjs \"/static/js/jquery.form.js\"}}\" type=\"text/javascript\"></script>\n<script src=\"{{cdnjs \"/static/js/main.js\"}}\" type=\"text/javascript\"></script>\n<script type=\"text/javascript\">\n    $(function () {\n        $(\"#gloablEditForm\").ajaxForm({\n            beforeSubmit : function () {\n                var title = $.trim($(\"#siteName\").val());\n\n                if (title === \"\"){\n                    return showError({{i18n .Lang \"message.site_name_empty\"}});\n                }\n                $(\"#btnSaveBookInfo\").button(\"loading\");\n            },success : function (res) {\n                if(res.errcode === 0) {\n                    showSuccess({{i18n .Lang \"message.success\"}})\n                    window.location.reload()\n                }else{\n                    showError(res.message);\n                }\n                $(\"#btnSaveBookInfo\").button(\"reset\");\n            }\n        });\n    });\n</script>\n</body>\n</html>"
  },
  {
    "path": "views/manager/team.tpl",
    "content": "<!DOCTYPE html>\n<html lang=\"zh-CN\">\n<head>\n    <meta charset=\"utf-8\">\n    <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n\n    <title>{{i18n .Lang \"mgr.team_mgr\"}} - Powered by MinDoc</title>\n\n    <!-- Bootstrap -->\n    <link href=\"{{cdncss \"/static/bootstrap/css/bootstrap.min.css\"}}\" rel=\"stylesheet\">\n    <link href=\"{{cdncss \"/static/font-awesome/css/font-awesome.min.css\"}}\" rel=\"stylesheet\">\n    <link href=\"{{cdncss \"/static/css/main.css\" \"version\"}}\" rel=\"stylesheet\">\n\n    <style type=\"text/css\">\n        .table > tbody > tr > td {\n            vertical-align: middle;\n        }\n    </style>\n</head>\n<body>\n<div class=\"manual-reader\">\n{{template \"widgets/header.tpl\" .}}\n    <div class=\"container manual-body\">\n        <div class=\"row\">\n        {{template \"manager/widgets.tpl\" .}}\n            <div class=\"page-right\">\n                <div class=\"m-box\">\n                    <div class=\"box-head\">\n                        <strong class=\"box-title\"> {{i18n .Lang \"mgr.team_mgr\"}}</strong>\n                    {{if eq .Member.Role 0}}\n                        <button type=\"button\" class=\"btn btn-success btn-sm pull-right\" data-toggle=\"modal\"\n                                data-target=\"#addTeamDialogModal\"><i class=\"fa fa-user-plus\" aria-hidden=\"true\"></i>\n                            {{i18n .Lang \"mgr.create_team\"}}\n                        </button>\n                    {{end}}\n                    </div>\n                </div>\n                <div class=\"box-body\">\n                    <div class=\"users-list\" id=\"teamList\">\n                        <template v-if=\"lists.length <= 0\">\n                            <div class=\"text-center\">{{i18n .Lang \"message.no_data\"}}</div>\n                        </template>\n                        <template v-else>\n                            <table class=\"table\">\n                                <thead>\n                                <tr>\n                                    <th>{{i18n .Lang \"mgr.team_name\"}}</th>\n                                    <th width=\"150px\">{{i18n .Lang \"mgr.member_amount\"}}</th>\n                                    <th width=\"150px\">{{i18n .Lang \"mgr.proj_amount\"}}</th>\n                                    <th align=\"center\" width=\"260px\">{{i18n .Lang \"common.operate\"}}</th>\n                                </tr>\n                                </thead>\n                                <tbody>\n                                <tr v-for=\"item in lists\">\n                                    <td>${item.team_name}</td>\n                                    <td>${item.member_count}</td>\n                                    <td>${item.book_count}</td>\n                                    <td>\n                                        <a :href=\"'{{urlfor \"ManagerController.TeamBookList\" \":id\" \"\"}}' + item.team_id\" class=\"btn btn-primary btn-sm\">{{i18n .Lang \"mgr.proj\"}}</a>\n                                        <a :href=\"'{{urlfor \"ManagerController.TeamMemberList\" \":id\" \"\"}}' + item.team_id\" type=\"button\" class=\"btn btn-success btn-sm\">{{i18n .Lang \"mgr.member\"}}</a>\n                                        <button type=\"button\" class=\"btn btn-sm btn-default\" @click=\"editTeam(item.team_id)\">{{i18n .Lang \"common.edit\"}}</button>\n                                        <button type=\"button\" class=\"btn btn-danger btn-sm\" @click=\"deleteTeam(item.team_id,$event)\" data-loading-text=\"{{i18n .Lang \"message.processing\"}}\">{{i18n .Lang \"common.delete\"}}</button>\n                                    </td>\n                                </tr>\n                                </tbody>\n                            </table>\n                        </template>\n                        <nav class=\"pagination-container\">\n                        {{.PageHtml}}\n                        </nav>\n                    </div>\n                </div>\n            </div>\n        </div>\n    </div>\n{{template \"widgets/footer.tpl\" .}}\n</div>\n<!-- Modal -->\n<div class=\"modal fade\" id=\"addTeamDialogModal\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"addTeamDialogModalLabel\">\n    <div class=\"modal-dialog\" role=\"document\">\n        <form method=\"post\" autocomplete=\"off\" class=\"form-horizontal\"\n              action=\"{{urlfor \"ManagerController.TeamCreate\"}}\" id=\"addTeamDialogForm\">\n            <div class=\"modal-content\">\n                <div class=\"modal-header\">\n                    <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\"><span\n                            aria-hidden=\"true\">&times;</span></button>\n                    <h4 class=\"modal-title\" id=\"myModalLabel\">{{i18n .Lang \"mgr.create_team\"}}</h4>\n                </div>\n                <div class=\"modal-body\">\n                    <div class=\"form-group\">\n                        <label class=\"col-sm-2 control-label\" for=\"account\">{{i18n .Lang \"mgr.team_name\"}}<span\n                                class=\"error-message\">*</span></label>\n                        <div class=\"col-sm-10\">\n                            <input type=\"text\" name=\"teamName\" class=\"form-control\" placeholder=\"{{i18n .Lang \"mgr.team_name\"}}\" id=\"teamName\" maxlength=\"50\">\n                        </div>\n                    </div>\n                    <div class=\"clearfix\"></div>\n                </div>\n                <div class=\"modal-footer\">\n                    <span id=\"form-error-message\"></span>\n                    <button type=\"button\" class=\"btn btn-default\" data-dismiss=\"modal\">{{i18n .Lang \"common.cancel\"}}</button>\n                    <button type=\"submit\" class=\"btn btn-success\" data-loading-text=\"{{i18n .Lang \"message.processing\"}}\" id=\"btnAddTeam\">{{i18n .Lang \"common.save\"}}\n                    </button>\n                </div>\n            </div>\n        </form>\n    </div>\n</div><!--END Modal-->\n<div class=\"modal fade\" id=\"editTeamDialogModal\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"editTeamDialogModalLabel\">\n    <div class=\"modal-dialog\" role=\"document\">\n        <form method=\"post\" autocomplete=\"off\" class=\"form-horizontal\" action=\"{{urlfor \"ManagerController.TeamEdit\"}}\" id=\"editTeamDialogForm\">\n            <input type=\"hidden\" name=\"teamId\" value=\"\">\n            <div class=\"modal-content\">\n                <div class=\"modal-header\">\n                    <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\"><span\n                            aria-hidden=\"true\">&times;</span></button>\n                    <h4 class=\"modal-title\" id=\"myModalLabel\">{{i18n .Lang \"mgr.edit_team\"}}</h4>\n                </div>\n                <div class=\"modal-body\">\n                    <div class=\"form-group\">\n                        <label class=\"col-sm-2 control-label\" for=\"account\">{{i18n .Lang \"mgr.team_name\"}}<span class=\"error-message\">*</span></label>\n                        <div class=\"col-sm-10\">\n                            <input type=\"text\" name=\"teamName\" class=\"form-control\" placeholder=\"{{i18n .Lang \"mgr.team_name\"}}\" maxlength=\"50\">\n                        </div>\n                    </div>\n                    <div class=\"clearfix\"></div>\n                </div>\n                <div class=\"modal-footer\">\n                    <span id=\"form-error-message\"></span>\n                    <button type=\"button\" class=\"btn btn-default\" data-dismiss=\"modal\">{{i18n .Lang \"common.cancel\"}}</button>\n                    <button type=\"submit\" class=\"btn btn-success\" data-loading-text=\"{{i18n .Lang \"message.processing\"}}\" id=\"btnEditTeam\">{{i18n .Lang \"common.save\"}}\n                    </button>\n                </div>\n            </div>\n        </form>\n    </div>\n</div><!--END Modal-->\n\n\n<script src=\"{{cdnjs \"/static/jquery/1.12.4/jquery.min.js\"}}\"></script>\n\n\n<script src=\"{{cdnjs \"/static/bootstrap/js/bootstrap.min.js\"}}\"></script>\n<script src=\"{{cdnjs \"/static/vuejs/vue.min.js\"}}\"></script>\n<script src=\"{{cdnjs \"/static/js/jquery.form.js\"}}\" type=\"text/javascript\"></script>\n<script src=\"{{cdnjs \"/static/js/main.js\"}}\" type=\"text/javascript\"></script>\n<script type=\"text/javascript\">\n    $(function () {\n        var editTeamDialogModal = $(\"#editTeamDialogModal\");\n\n        $(\"#addTeamDialogModal\").on(\"show.bs.modal\", function () {\n            window.addTeamDialogModalHtml = $(this).find(\"form\").html();\n        }).on(\"hidden.bs.modal\", function () {\n            $(this).find(\"form\").html(window.addTeamDialogModalHtml);\n        });\n        $(\"#addTeamDialogForm\").ajaxForm({\n            beforeSubmit: function () {\n                var account = $.trim($(\"#addTeamDialogForm #teamName\").val());\n                if (account === \"\") {\n                    return showError({{i18n .Lang \"message.team_name_empty\"}});\n                }\n                $(\"#btnAddTeam\").button(\"loading\");\n                return true;\n            },\n            success: function ($res) {\n                if ($res.errcode === 0) {\n                    app.lists.splice(0, 0, $res.data);\n                    $(\"#addTeamDialogModal\").modal(\"hide\");\n                } else {\n                    showError($res.message);\n                }\n            },\n            error: function () {\n                showError({{i18n .Lang \"message.system_error\"}});\n            },\n            complete: function () {\n                $(\"#btnAddTeam\").button(\"reset\");\n            }\n        });\n\n        editTeamDialogModal.on(\"shown.bs.modal\",function () {\n           $(this).find(\"input[name='teamName']\").focus();\n        });\n        $(\"#editTeamDialogForm\").ajaxForm({\n            beforeSubmit: function () {\n                var account = $.trim(editTeamDialogModal.find(\"input[name='teamName']\").val());\n                if (account === \"\") {\n                    return showError({{i18n .Lang \"message.team_name_empty\"}});\n                }\n                $(\"#btnEditTeam\").button(\"loading\");\n                return true;\n            },success :function ($res) {\n                if ($res.errcode === 0) {\n                    for (var index in app.lists) {\n                        var item = app.lists[index];\n                        if (item.team_id == $res.data.team_id) {\n                            app.lists.splice(index, 1, $res.data);\n                            break;\n                        }\n                    }\n                    editTeamDialogModal.modal(\"hide\");\n                }else {\n                    showError($res.message);\n                }\n            },\n            error: function () {\n                showError({{i18n .Lang \"message.system_error\"}});\n            },\n            complete: function () {\n                $(\"#btnEditTeam\").button(\"reset\");\n            }\n        });\n\n        var app = new Vue({\n            el: \"#teamList\",\n            data: {\n                lists: {{.Result}}\n            },\n            delimiters: ['${', '}'],\n            methods: {\n                deleteTeam: function (id, e) {\n                    var $this = this;\n                    $.ajax({\n                        url: \"{{urlfor \"ManagerController.TeamDelete\"}}\",\n                        type: \"post\",\n                        data: {\"teamId\": id},\n                        dataType: \"json\",\n                        success: function (res) {\n                            if (res.errcode === 0) {\n\n                                for (var index in $this.lists) {\n                                    var item = $this.lists[index];\n                                    if (item.team_id == id) {\n                                        $this.lists.splice(index, 1);\n                                        break;\n                                    }\n                                }\n                            } else {\n                                alert(\"操作失败：\" + res.message);\n                            }\n                        }\n                    });\n                },\n                editTeam : function (id, e) {\n                    var $this = this;\n                    for (var index in $this.lists) {\n                        var item = $this.lists[index];\n                        if (item.team_id == id) {\n                            editTeamDialogModal.find(\"input[name='teamName']\").val(item.team_name);\n                            editTeamDialogModal.find(\"input[name='teamId']\").val(item.team_id);\n                            editTeamDialogModal.modal(\"show\");\n                            break;\n                        }\n                    }\n                }\n            }\n        });\n        Vue.nextTick(function () {\n            $(\"[data-toggle='tooltip']\").tooltip();\n        });\n    });\n</script>\n</body>\n</html>"
  },
  {
    "path": "views/manager/team_book_list.tpl",
    "content": "<!DOCTYPE html>\n<html lang=\"zh-CN\">\n<head>\n    <meta charset=\"utf-8\">\n    <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n\n    <title>{{i18n .Lang \"mgr.team_proj\"}} - Powered by MinDoc</title>\n\n    <!-- Bootstrap -->\n    <link href=\"{{cdncss \"/static/bootstrap/css/bootstrap.min.css\"}}\" rel=\"stylesheet\" type=\"text/css\">\n    <link href=\"{{cdncss \"/static/font-awesome/css/font-awesome.min.css\"}}\" rel=\"stylesheet\" type=\"text/css\">\n    <link href=\"{{cdncss \"/static/select2/4.0.5/css/select2.min.css\"}}\" rel=\"stylesheet\">\n\n    <link href=\"{{cdncss \"/static/css/main.css\" \"version\"}}\" rel=\"stylesheet\">\n</head>\n<body>\n<div class=\"manual-reader\">\n{{template \"widgets/header.tpl\" .}}\n    <div class=\"container manual-body\">\n        <div class=\"row\">\n        {{template \"manager/widgets.tpl\" .}}\n            <div class=\"page-right\">\n                <div class=\"m-box\">\n                    <div class=\"box-head\">\n                        <strong class=\"box-title\">{{.Model.TeamName}} - {{i18n .Lang \"mgr.team_proj\"}}</strong>\n                        <button type=\"button\"  class=\"btn btn-success btn-sm pull-right\" data-toggle=\"modal\" data-target=\"#addTeamBookDialogModal\"><i class=\"fa fa-book\" aria-hidden=\"true\"></i> {{i18n .Lang \"mgr.add_proj\"}}</button>\n                    </div>\n                </div>\n                <div class=\"box-body\">\n                    <div class=\"attach-list\" id=\"teamBookList\">\n                        <table class=\"table\">\n                            <thead>\n                            <tr>\n                                <th>{{i18n .Lang \"mgr.proj_name\"}}</th>\n                                <th>{{i18n .Lang \"mgr.proj_author\"}}</th>\n                                <th>{{i18n .Lang \"mgr.join_time\"}}</th>\n                                <th>{{i18n .Lang \"common.operate\"}}</th>\n                            </tr>\n                            </thead>\n                            <tbody>\n                            <template v-if=\"lists.length <= 0\">\n                                <tr class=\"text-center\"><td colspan=\"4\">{{i18n .Lang \"message.no_data\"}}</td></tr>\n                            </template>\n                            <template v-else>\n                            <tr v-for=\"item in lists\">\n                                <td>${item.book_name}</td>\n                                <td>${item.book_member_name}</td>\n                                <td>${(new Date(item.create_time)).format(\"yyyy-MM-dd hh:mm:ss\")}</td>\n                                <td>\n                                    <button type=\"button\" data-method=\"delete\" class=\"btn btn-danger btn-sm\" @click=\"deleteTeamBook(item.team_relationship_id)\" data-loading-text=\"{{i18n .Lang \"message.processing\"}}\">{{i18n .Lang \"common.delete\"}}</button>\n                                </td>\n                            </tr>\n                            </template>\n                            </tbody>\n                        </table>\n\n                        <nav class=\"pagination-container\">\n                        {{.PageHtml}}\n                        </nav>\n                    </div>\n                </div>\n            </div>\n        </div>\n    </div>\n{{template \"widgets/footer.tpl\" .}}\n</div>\n<!-- Modal -->\n<div class=\"modal fade\" id=\"addTeamBookDialogModal\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"addTeamBookDialogModalLabel\">\n    <div class=\"modal-dialog modal-sm\" role=\"document\" style=\"width: 450px;\">\n        <form method=\"post\" autocomplete=\"off\" class=\"form-horizontal\" action=\"{{urlfor \"ManagerController.TeamBookAdd\"}}\" id=\"addTeamBookDialogForm\">\n            <input type=\"hidden\" name=\"teamId\" value=\"{{.Model.TeamId}}\">\n            <div class=\"modal-content\">\n                <div class=\"modal-header\">\n                    <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\"><span aria-hidden=\"true\">&times;</span></button>\n                    <h4 class=\"modal-title\" id=\"myModalLabel\">{{i18n .Lang \"mgr.join_proj\"}}</h4>\n                </div>\n                <div class=\"modal-body\">\n                    <div class=\"form-group\">\n                        <label class=\"col-sm-3 control-label\">{{i18n .Lang \"mgr.proj_name\"}}</label>\n                        <div class=\"col-sm-9\">\n                            <select class=\"js-data-example-ajax form-control\" multiple=\"multiple\" name=\"bookId\" id=\"bookId\"></select>\n                        </div>\n                    </div>\n                    <div class=\"clearfix\"></div>\n                </div>\n                <div class=\"modal-footer\">\n                    <span id=\"form-error-message\"></span>\n                    <button type=\"button\" class=\"btn btn-default\" data-dismiss=\"modal\">{{i18n .Lang \"common.cancel\"}}</button>\n                    <button type=\"submit\" class=\"btn btn-success\" data-loading-text=\"{{i18n .Lang \"message.processing\"}}\" id=\"btnAddBook\">{{i18n .Lang \"common.save\"}}</button>\n                </div>\n            </div>\n        </form>\n    </div>\n</div><!--END Modal-->\n<script src=\"{{cdnjs \"/static/jquery/1.12.4/jquery.min.js\"}}\"></script>\n<script src=\"{{cdnjs \"/static/vuejs/vue.min.js\"}}\"></script>\n<script src=\"{{cdnjs \"/static/bootstrap/js/bootstrap.min.js\"}}\"></script>\n<script src=\"{{cdnjs \"/static/js/jquery.form.js\"}}\" type=\"text/javascript\"></script>\n<script src=\"{{cdnjs \"/static/layer/layer.js\" }}\" type=\"text/javascript\"></script>\n<script src=\"{{cdnjs \"/static/select2/4.0.5/js/select2.full.min.js\"}}\"></script>\n<script src=\"{{cdnjs \"/static/select2/4.0.5/js/i18n/zh-CN.js\"}}\"></script>\n<script src=\"{{cdnjs \"/static/js/main.js\"}}\" type=\"text/javascript\"></script>\n<script type=\"text/javascript\">\n    $(function () {\n        var modalCache = $(\"#addTeamBookDialogModal form\").html();\n\n        $(\"#addTeamBookDialogForm\").ajaxForm({\n            beforeSubmit : function () {\n                var memberId = $.trim($(\"#bookId\").val());\n                if(memberId === \"\"){\n                    return showError({{i18n .Lang \"message.proj_empty\"}});\n                }\n                $(\"#btnAddBook\").button(\"loading\");\n            },\n            success : function (res) {\n                if(res.errcode === 0){\n                    app.lists.splice(0,0,res.data);\n                    $(\"#addTeamBookDialogModal\").modal(\"hide\");\n                }else{\n                    showError(res.message);\n                }\n                $(\"#btnAddBook\").button(\"reset\");\n            }\n        });\n\n        $(\"#addTeamBookDialogModal\").on(\"hidden.bs.modal\",function () {\n            $(this).find(\"form\").html(modalCache);\n        }).on(\"show.bs.modal\",function () {\n            $('.js-data-example-ajax').select2({\n                language: {{i18n .Lang \"common.js_lang\"}},\n                minimumInputLength : 1,\n                minimumResultsForSearch: Infinity,\n                maximumSelectionLength:1,\n                width : \"100%\",\n                ajax: {\n                    url: '{{urlfor \"ManagerController.TeamSearchBook\" \"teamId\" .Model.TeamId}}',\n                    dataType: 'json',\n                    data: function (params) {\n                        return {\n                            q: params.term, // search term\n                            page: params.page\n                        };\n                    },\n                    processResults: function (data, params) {\n                        return {\n                            results : data.data.results\n                        }\n                    }\n                }\n            });\n        });\n\n        var app = new Vue({\n            el: \"#teamBookList\",\n            data: {\n                lists: {{.Result}}\n            },\n            delimiters: ['${', '}'],\n            methods: {\n                deleteTeamBook: function ($id, $e) {\n                    var $this = this;\n                    $.ajax({\n                        url : \"{{urlfor \"ManagerController.TeamBookDelete\"}}\",\n                        data : { \"teamRelId\" : $id },\n                        type : \"post\",\n                        dataType : \"json\",\n                        success : function ($res) {\n                            if($res.errcode === 0){\n                                for (var index in $this.lists) {\n                                    var item = $this.lists[index];\n                                    if (item.team_relationship_id == $id) {\n                                        $this.lists.splice(index,1);\n                                        break;\n                                    }\n                                }\n                            }else {\n                                layer.msg(res.message);\n                            }\n                        },\n                        error : function () {\n                            layer.msg({{i18n .Lang \"message.system_error\"}});\n                        }\n                    });\n                }\n            }\n        });\n    });\n</script>\n</body>\n</html>"
  },
  {
    "path": "views/manager/team_member_list.tpl",
    "content": "<!DOCTYPE html>\n<html lang=\"zh-CN\">\n<head>\n    <meta charset=\"utf-8\">\n    <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n\n    <title>{{i18n .Lang \"mgr.team_member_mgr\"}} - Powered by MinDoc</title>\n\n    <!-- Bootstrap -->\n    <link href=\"{{cdncss \"/static/bootstrap/css/bootstrap.min.css\"}}\" rel=\"stylesheet\">\n    <link href=\"{{cdncss \"/static/font-awesome/css/font-awesome.min.css\"}}\" rel=\"stylesheet\">\n    <link href=\"{{cdncss \"/static/select2/4.0.5/css/select2.min.css\"}}\" rel=\"stylesheet\">\n    <link href=\"{{cdncss \"/static/css/main.css\" \"version\"}}\" rel=\"stylesheet\">\n    <style type=\"text/css\">\n        .table>tbody>tr>td{vertical-align: middle;}\n    </style>\n</head>\n<body>\n<div class=\"manual-reader\">\n{{template \"widgets/header.tpl\" .}}\n    <div class=\"container manual-body\">\n        <div class=\"row\">\n        {{template \"manager/widgets.tpl\" .}}\n            <div class=\"page-right\">\n                <div class=\"m-box\">\n                    <div class=\"box-head\">\n                        <strong class=\"box-title\">{{.Model.TeamName}} - {{i18n .Lang \"mgr.member_mgr\"}}</strong>\n                        <button type=\"button\"  class=\"btn btn-success btn-sm pull-right\" data-toggle=\"modal\" data-target=\"#addTeamMemberDialogModal\"><i class=\"fa fa-user-plus\" aria-hidden=\"true\"></i> {{i18n .Lang \"mgr.add_member\"}}</button>\n                    </div>\n                </div>\n                <div class=\"box-body\">\n                    <div class=\"users-list\" id=\"teamMemberList\">\n                        <template v-if=\"lists.length <= 0\">\n                            <div class=\"text-center\">{{i18n .Lang \"message.no_data\"}}</div>\n                        </template>\n                        <template v-else>\n                            <table class=\"table\">\n                                <thead>\n                                <tr>\n                                    <th width=\"80\">{{i18n .Lang \"uc.avatar\"}}</th>\n                                    <th width=\"100\">{{i18n .Lang \"uc.username\"}}</th>\n                                    <th width=\"100\">{{i18n .Lang \"uc.realname\"}}</th>\n                                    <th width=\"150\">{{i18n .Lang \"uc.role\"}}</th>\n                                    <th width=\"80px\">{{i18n .Lang \"common.operate\"}}</th>\n                                </tr>\n                                </thead>\n                                <tbody>\n                                <tr v-for=\"item in lists\">\n                                    <td><img :src=\"item.avatar\" onerror=\"this.src='{{cdnimg \"/static/images/middle.gif\"}}'\" class=\"img-circle\" width=\"34\" height=\"34\"></td>\n                                    <td>${item.account}</td>\n                                    <td>${item.real_name}</td>\n                                    <td>\n                                        <div class=\"btn-group\">\n                                            <button type=\"button\" class=\"btn btn-default btn-sm\"  data-toggle=\"dropdown\" aria-haspopup=\"true\" aria-expanded=\"false\">\n                                                {{i18n .Lang \"uc.role\"}}：${item.role_name}\n                                                <span class=\"caret\"></span></button>\n                                            <ul class=\"dropdown-menu\">\n                                                <li><a href=\"javascript:;\" @click=\"setTeamMemberRole(item.member_id,1)\">{{i18n .Lang \"common.administrator\"}} <p class=\"text\">{{i18n .Lang \"common.admin_right\"}}</p></a> </li>\n                                                <li><a href=\"javascript:;\" @click=\"setTeamMemberRole(item.member_id,2)\">{{i18n .Lang \"common.editor\"}} <p class=\"text\">{{i18n .Lang \"common.editor_right\"}}</p></a> </li>\n                                                <li><a href=\"javascript:;\" @click=\"setTeamMemberRole(item.member_id,3)\">{{i18n .Lang \"common.observer\"}} <p class=\"text\">{{i18n .Lang \"common.observer_right\"}}</p></a> </li>\n                                            </ul>\n                                        </div>\n                                    </td>\n                                    <td>\n                                        <button type=\"button\" class=\"btn btn-danger btn-sm\" @click=\"deleteMember(item.member_id,$event)\" data-loading-text=\"{{i18n .Lang \"message.processing\"}}\">{{i18n .Lang \"common.delete\"}}</button>\n                                    </td>\n                                </tr>\n                                </tbody>\n                            </table>\n                        </template>\n                        <nav class=\"pagination-container\">\n                        {{.PageHtml}}\n                        </nav>\n                    </div>\n                </div>\n            </div>\n        </div>\n    </div>\n{{template \"widgets/footer.tpl\" .}}\n</div>\n<!-- Modal -->\n<div class=\"modal fade\" id=\"addTeamMemberDialogModal\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"addTeamMemberDialogModalLabel\">\n    <div class=\"modal-dialog modal-sm\" role=\"document\" style=\"width: 400px;\">\n        <form method=\"post\" autocomplete=\"off\" class=\"form-horizontal\" action=\"{{urlfor \"ManagerController.TeamMemberAdd\"}}\" id=\"addTeamMemberDialogForm\">\n            <input type=\"hidden\" name=\"teamId\" value=\"{{.Model.TeamId}}\">\n            <div class=\"modal-content\">\n                <div class=\"modal-header\">\n                    <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\"><span aria-hidden=\"true\">&times;</span></button>\n                    <h4 class=\"modal-title\" id=\"myModalLabel\">{{i18n .Lang \"mgr.add_member\"}}</h4>\n                </div>\n                <div class=\"modal-body\">\n                    <div class=\"form-group\">\n                        <label class=\"col-sm-2 control-label\">{{i18n .Lang \"uc.username\"}}</label>\n                        <div class=\"col-sm-10\">\n                            <select class=\"js-data-example-ajax form-control\" multiple=\"multiple\" name=\"memberId\" id=\"memberId\"></select>\n                        </div>\n                    </div>\n                    <div class=\"form-group\">\n                        <label class=\"col-sm-2 control-label\">{{i18n .Lang \"uc.role\"}}</label>\n                        <div class=\"col-sm-10\">\n                            <select name=\"roleId\" class=\"form-control\">\n                                <option value=\"1\">{{i18n .Lang \"common.administrator\"}}</option>\n                                <option value=\"2\">{{i18n .Lang \"common.editor\"}}</option>\n                                <option value=\"3\">{{i18n .Lang \"common.observer\"}}</option>\n                            </select>\n                        </div>\n                    </div>\n\n                    <div class=\"clearfix\"></div>\n                </div>\n                <div class=\"modal-footer\">\n                    <span id=\"form-error-message\"></span>\n                    <button type=\"button\" class=\"btn btn-default\" data-dismiss=\"modal\">{{i18n .Lang \"common.cancel\"}}</button>\n                    <button type=\"submit\" class=\"btn btn-success\" data-loading-text=\"{{i18n .Lang \"message.processing\"}}\" id=\"btnAddMember\">{{i18n .Lang \"common.save\"}}</button>\n                </div>\n            </div>\n        </form>\n    </div>\n</div><!--END Modal-->\n\n<script src=\"{{cdnjs \"/static/jquery/1.12.4/jquery.min.js\"}}\"></script>\n<script src=\"{{cdnjs \"/static/bootstrap/js/bootstrap.min.js\"}}\"></script>\n<script src=\"{{cdnjs \"/static/vuejs/vue.min.js\"}}\"></script>\n<script src=\"{{cdnjs \"/static/js/jquery.form.js\"}}\" type=\"text/javascript\"></script>\n<script src=\"{{cdnjs \"/static/select2/4.0.5/js/select2.full.min.js\"}}\"></script>\n<script src=\"{{cdnjs \"/static/select2/4.0.5/js/i18n/zh-CN.js\"}}\"></script>\n<script src=\"{{cdnjs \"/static/js/main.js\"}}\" type=\"text/javascript\"></script>\n<script type=\"text/javascript\">\n    $(function () {\n        var modalCache = $(\"#addTeamMemberDialogModal form\").html();\n\n        /**\n         * 添加用户\n         */\n        $(\"#addTeamMemberDialogForm\").ajaxForm({\n            beforeSubmit : function () {\n                var memberId = $.trim($(\"#memberId\").val());\n                if(memberId === \"\"){\n                    return showError({{i18n .Lang \"message.account_empty\"}});\n                }\n                $(\"#btnAddMember\").button(\"loading\");\n            },\n            success : function (res) {\n                if(res.errcode === 0){\n                    app.lists.splice(0,0,res.data);\n                    $(\"#addTeamMemberDialogModal\").modal(\"hide\");\n                }else{\n                    showError(res.message);\n                }\n                $(\"#btnAddMember\").button(\"reset\");\n            }\n        });\n        $(\"#addTeamMemberDialogModal\").on(\"hidden.bs.modal\",function () {\n            $(this).find(\"form\").html(modalCache);\n        }).on(\"show.bs.modal\",function () {\n            $('.js-data-example-ajax').select2({\n                language: {{i18n .Lang \"common.js_lang\"}},\n                minimumInputLength : 1,\n                minimumResultsForSearch: Infinity,\n                maximumSelectionLength:1,\n                width : \"100%\",\n                ajax: {\n                    url: '{{urlfor \"ManagerController.TeamSearchMember\" \"teamId\" .Model.TeamId}}',\n                    dataType: 'json',\n                    data: function (params) {\n                        return {\n                            q: params.term, // search term\n                            page: params.page\n                        };\n                    },\n                    processResults: function (data, params) {\n                        return {\n                            results : data.data.results\n                        }\n                    }\n                }\n            });\n        });\n\n        var app = new Vue({\n            el : \"#teamMemberList\",\n            data : {\n                lists : {{.Result}}\n            },\n            delimiters : ['${','}'],\n            methods : {\n                setTeamMemberRole : function (member_id, role) {\n                    var $this = this;\n                    $.ajax({\n                        url :\"{{urlfor \"ManagerController.TeamChangeMemberRole\"}}\",\n                        dataType :\"json\",\n                        type :\"post\",\n                        data : { \"memberId\" : member_id,\"roleId\" : role ,\"teamId\":{{.Model.TeamId}}},\n                        success : function (res) {\n                            if(res.errcode === 0){\n                                for (var index in $this.lists) {\n                                    var item = $this.lists[index];\n\n                                    if (item.member_id === member_id) {\n\n                                        $this.lists.splice(index,1,res.data);\n                                        break;\n                                    }\n                                }\n                            }else{\n                                alert(\"操作失败：\" + res.message);\n                            }\n                        }\n                    })\n                },\n                deleteMember : function (id, e) {\n                    var $this = this;\n                    $.ajax({\n                        url : \"{{urlfor \"ManagerController.TeamMemberDelete\"}}\",\n                        type : \"post\",\n                        data : { \"memberId\":id ,\"teamId\":{{.Model.TeamId}}},\n                        dataType : \"json\",\n                        success : function (res) {\n                            if (res.errcode === 0) {\n\n                                for (var index in $this.lists) {\n                                    var item = $this.lists[index];\n                                    if (item.member_id == id) {\n                                        $this.lists.splice(index,1);\n                                        break;\n                                    }\n                                }\n                            } else {\n                                alert(\"操作失败：\" + res.message);\n                            }\n                        }\n                    });\n                }\n            }\n        });\n        Vue.nextTick(function () {\n            $(\"[data-toggle='tooltip']\").tooltip();\n        });\n    });\n</script>\n</body>\n</html>"
  },
  {
    "path": "views/manager/users.tpl",
    "content": "<!DOCTYPE html>\n<html lang=\"zh-CN\">\n<head>\n    <meta charset=\"utf-8\">\n    <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n\n    <title>{{i18n .Lang \"mgr.user_mgr\"}} - Powered by MinDoc</title>\n\n    <!-- Bootstrap -->\n    <link href=\"{{cdncss \"/static/bootstrap/css/bootstrap.min.css\"}}\" rel=\"stylesheet\">\n    <link href=\"{{cdncss \"/static/font-awesome/css/font-awesome.min.css\"}}\" rel=\"stylesheet\">\n\n    <link href=\"{{cdncss \"/static/css/main.css\" \"version\"}}\" rel=\"stylesheet\">\n    <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->\n    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->\n    <!--[if lt IE 9]>\n    <script src=\"/static/html5shiv/3.7.3/html5shiv.min.js\"></script>\n    <script src=\"/static/respond.js/1.4.2/respond.min.js\"></script>\n    <![endif]-->\n    <style type=\"text/css\">\n        .table>tbody>tr>td{vertical-align: middle;}\n    </style>\n</head>\n<body>\n<div class=\"manual-reader\">\n    {{template \"widgets/header.tpl\" .}}\n    <div class=\"container manual-body\">\n        <div class=\"row\">\n        {{template \"manager/widgets.tpl\" .}}\n            <div class=\"page-right\">\n                <div class=\"m-box\">\n                    <div class=\"box-head\">\n                        <strong class=\"box-title\"> {{i18n .Lang \"mgr.member_mgr\"}}</strong>\n                        {{if eq .Member.Role 0}}\n                        <button type=\"button\"  class=\"btn btn-success btn-sm pull-right\" data-toggle=\"modal\" data-target=\"#addMemberDialogModal\"><i class=\"fa fa-user-plus\" aria-hidden=\"true\"></i> {{i18n .Lang \"mgr.add_member\"}}</button>\n                        {{end}}\n                    </div>\n                </div>\n                <div class=\"box-body\">\n                    <div class=\"users-list\" id=\"userList\">\n                        <template v-if=\"lists.length <= 0\">\n                            <div class=\"text-center\">{{i18n .Lang \"message.no_data\"}}</div>\n                        </template>\n                        <template v-else>\n                            <table class=\"table\">\n                                <thead>\n                                <tr>\n                                    <th width=\"80\">ID</th>\n                                    <th width=\"80\">{{i18n .Lang \"uc.avatar\"}}</th>\n                                    <th>{{i18n .Lang \"uc.username\"}}</th>\n                                    <th>{{i18n .Lang \"uc.realname\"}}</th>\n                                    <th>{{i18n .Lang \"uc.role\"}}</th>\n                                    <th>{{i18n .Lang \"uc.type\"}}</th>\n                                    <th>{{i18n .Lang \"uc.status\"}}</th>\n                                    <th>{{i18n .Lang \"common.operate\"}}</th>\n                                </tr>\n                                </thead>\n                                <tbody>\n                                <tr v-for=\"item in lists\">\n                                    <td>${item.member_id}</td>\n                                    <td><img :src=\"item.avatar\" onerror=\"this.src='{{cdnimg \"/static/images/middle.gif\"}}'\" class=\"img-circle\" width=\"34\" height=\"34\"></td>\n                                    <td>${item.account}</td>\n                                    <td>${item.real_name}</td>\n                                    <td>\n                                        <template v-if=\"item.role == 0\">\n                                            {{i18n $.Lang \"uc.super_admin\"}}\n                                        </template>\n                                        <template v-else-if=\"item.member_id == {{.Member.MemberId}}\">\n                                            ${item.role_name}\n                                        </template>\n                                        <template v-else>\n                                            <div class=\"btn-group\">\n                                            <button type=\"button\" class=\"btn btn-default btn-sm\"  data-toggle=\"dropdown\" aria-haspopup=\"true\" aria-expanded=\"false\">\n                                                ${item.role_name}\n                                                <span class=\"caret\"></span></button>\n                                            <ul class=\"dropdown-menu\">\n                                                <li><a href=\"javascript:;\" @click=\"setMemberRole(item.member_id,1)\">{{i18n $.Lang \"uc.admin\"}}</a> </li>\n                                                <li><a href=\"javascript:;\" @click=\"setMemberRole(item.member_id,2)\">{{i18n $.Lang \"uc.user\"}}</a> </li>\n                                                <li><a href=\"javascript:;\" @click=\"setMemberRole(item.member_id,3)\">{{i18n $.Lang \"uc.read_usr\"}}</a> </li>\n                                            </ul>\n                                            </div>\n                                        </template>\n                                    </td>\n                                    <td>\n                                        ${item.auth_method}\n                                    </td>\n                                    <td>\n                                        <template v-if=\"item.status == 0\">\n                                            <span class=\"label label-success\">{{i18n .Lang \"uc.normal\"}}</span>\n                                        </template>\n                                        <template v-else>\n                                            <span class=\"label label-danger\">{{i18n .Lang \"uc.disable\"}}</span>\n                                        </template>\n                                    </td>\n\n                                    <td>\n                                        <template v-if=\"item.member_id == {{.Member.MemberId}}\">\n\n                                        </template>\n                                        <template v-else-if=\"item.role != 0\">\n                                            <a :href=\"'{{urlfor \"ManagerController.EditMember\" \":id\" \"\"}}' + item.member_id\" class=\"btn btn-sm btn-default\" @click=\"editMember(item.member_id)\">\n                                                {{i18n .Lang \"common.edit\"}}\n                                            </a>\n                                            <template v-if=\"item.status == 0\">\n                                                <button type=\"button\" class=\"btn btn-danger btn-sm\" @click=\"setMemberStatus(item.member_id,1,$event)\" data-loading-text=\"{{i18n .Lang \"message.processing\"}}\">{{i18n .Lang \"uc.disable\"}}</button>\n                                            </template>\n                                            <template v-else>\n                                                <button type=\"button\" class=\"btn btn-success btn-sm\" @click=\"setMemberStatus(item.member_id,0,$event)\" data-loading-text=\"{{i18n .Lang \"message.processing\"}}\">{{i18n .Lang \"uc.enable\"}}</button>\n                                            </template>\n                                            <button type=\"button\" class=\"btn btn-danger btn-sm\" @click=\"deleteMember(item.member_id,$event)\" data-loading-text=\"{{i18n .Lang \"message.processing\"}}\">{{i18n .Lang \"common.delete\"}}</button>\n                                        </template>\n                                    </td>\n                                </tr>\n                                </tbody>\n                            </table>\n                        </template>\n                        <nav class=\"pagination-container\">\n                            {{.PageHtml}}\n                        </nav>\n                    </div>\n                </div>\n            </div>\n        </div>\n    </div>\n    {{template \"widgets/footer.tpl\" .}}\n</div>\n<!-- Modal -->\n<div class=\"modal fade\" id=\"addMemberDialogModal\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"addMemberDialogModalLabel\">\n    <div class=\"modal-dialog\" role=\"document\">\n        <form method=\"post\" autocomplete=\"off\" class=\"form-horizontal\" action=\"{{urlfor \"ManagerController.CreateMember\"}}\" id=\"addMemberDialogForm\">\n            <div class=\"modal-content\">\n                <div class=\"modal-header\">\n                    <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\"><span aria-hidden=\"true\">&times;</span></button>\n                    <h4 class=\"modal-title\" id=\"myModalLabel\">{{i18n .Lang \"uc.create_user\"}}</h4>\n                </div>\n                <div class=\"modal-body\">\n                    <div class=\"form-group\">\n                        <label class=\"col-sm-2 control-label\" for=\"account\">{{i18n .Lang \"uc.username\"}}<span class=\"error-message\">*</span></label>\n                        <div class=\"col-sm-10\">\n                            <input type=\"text\" name=\"account\" class=\"form-control\" placeholder=\"{{i18n .Lang \"uc.username\"}}\" id=\"account\" maxlength=\"50\">\n                        </div>\n                    </div>\n                    <div class=\"form-group\">\n                        <label class=\"col-sm-2 control-label\" for=\"password1\">{{i18n .Lang \"uc.password\"}}<span class=\"error-message\">*</span></label>\n                        <div class=\"col-sm-10\">\n                            <input type=\"password\" class=\"form-control\" placeholder=\"{{i18n .Lang \"uc.password\"}}\" name=\"password1\" id=\"password1\" maxlength=\"50\">\n                        </div>\n                    </div>\n                    <div class=\"form-group\">\n                        <label class=\"col-sm-2 control-label\" for=\"password2\">{{i18n .Lang \"uc.confirm_pwd\"}}<span class=\"error-message\">*</span></label>\n                        <div class=\"col-sm-10\">\n                            <input type=\"password\" class=\"form-control\" placeholder=\"{{i18n .Lang \"uc.confirm_pwd\"}}\" name=\"password2\" id=\"password2\" maxlength=\"50\">\n                        </div>\n                    </div>\n                    <div class=\"form-group\">\n                        <label class=\"col-sm-2 control-label\" for=\"email\">{{i18n .Lang \"uc.email\"}}<span class=\"error-message\">*</span></label>\n                        <div class=\"col-sm-10\">\n                            <input type=\"email\" class=\"form-control\" placeholder=\"{{i18n .Lang \"uc.email\"}}\" name=\"email\" id=\"email\" maxlength=\"50\">\n                        </div>\n                    </div>\n                    <div class=\"form-group\">\n                        <label class=\"col-sm-2 control-label\">{{i18n .Lang \"uc.realname\"}}</label>\n                        <div class=\"col-sm-10\">\n                            <input type=\"text\" name=\"real_name\" class=\"form-control\" value=\"\" placeholder=\"{{i18n .Lang \"uc.realname\"}}\">\n                        </div>\n                    </div>\n                    <div class=\"form-group\">\n                        <label class=\"col-sm-2 control-label\">{{i18n .Lang \"uc.mobile\"}}</label>\n                        <div class=\"col-sm-10\">\n                            <input type=\"text\" class=\"form-control\" placeholder=\"{{i18n .Lang \"uc.mobile\"}}\" name=\"phone\" maxlength=\"50\">\n                        </div>\n                    </div>\n                    <div class=\"form-group\">\n                        <label class=\"col-sm-2 control-label\">{{i18n .Lang \"uc.role\"}}</label>\n                        <div class=\"col-sm-10\">\n                            <select name=\"role\" class=\"form-control\">\n                                <option value=\"1\">{{i18n .Lang \"uc.admin\"}}</option>\n                                <option value=\"2\">{{i18n .Lang \"uc.user\"}}</option>\n                            </select>\n                        </div>\n                    </div>\n                    <div class=\"form-group\">\n\n                    </div>\n                    <div class=\"clearfix\"></div>\n                </div>\n                <div class=\"modal-footer\">\n                    <span id=\"form-error-message\"></span>\n                    <button type=\"button\" class=\"btn btn-default\" data-dismiss=\"modal\">{{i18n .Lang \"common.cancel\"}}</button>\n                    <button type=\"submit\" class=\"btn btn-success\" data-loading-text=\"{{i18n .Lang \"message.processing\"}}\" id=\"btnAddMember\">{{i18n .Lang \"common.save\"}}</button>\n                </div>\n            </div>\n        </form>\n    </div>\n</div><!--END Modal-->\n<script src=\"{{cdnjs \"/static/jquery/1.12.4/jquery.min.js\"}}\"></script>\n<script src=\"{{cdnjs \"/static/bootstrap/js/bootstrap.min.js\"}}\"></script>\n<script src=\"{{cdnjs \"/static/vuejs/vue.min.js\"}}\"></script>\n<script src=\"{{cdnjs \"/static/js/jquery.form.js\"}}\" type=\"text/javascript\"></script>\n<script src=\"{{cdnjs \"/static/js/main.js\"}}\" type=\"text/javascript\"></script>\n<script type=\"text/javascript\">\n    $(function () {\n        $(\"#addMemberDialogModal\").on(\"show.bs.modal\",function () {\n            window.addMemberDialogModalHtml = $(this).find(\"form\").html();\n        }).on(\"hidden.bs.modal\",function () {\n            $(this).find(\"form\").html(window.addMemberDialogModalHtml);\n        });\n        $(\"#addMemberDialogForm\").ajaxForm({\n            beforeSubmit : function () {\n                var account = $.trim($(\"#account\").val());\n                if(account === \"\"){\n                    return showError({{i18n .Lang \"message.account_empty\"}});\n                }\n                var password1 = $.trim($(\"#password1\").val());\n                var password2 = $(\"#password2\").val();\n                if (password1 === \"\") {\n                    return showError({{i18n .Lang \"message.password_empty\"}});\n                }\n                if (password1 !== password2) {\n                    return showError({{i18n .Lang \"message.confirm_pwd_empty\"}});\n                }\n                var email = $.trim($(\"#email\").val());\n\n                if (email === \"\") {\n                    return showError({{i18n .Lang \"message.email_empty\"}});\n                }\n                $(\"#btnAddMember\").button(\"loading\");\n                return true;\n            },\n            success : function (res) {\n                if(res.errcode === 0){\n                    app.lists.splice(0,0,res.data);\n                    $(\"#addMemberDialogModal\").modal(\"hide\");\n                }else{\n                    showError(res.message);\n                }\n                $(\"#btnAddMember\").button(\"reset\");\n            },\n            error : function () {\n                showError({{i18n .Lang \"message.system_error\"}});\n                $(\"#btnAddMember\").button(\"reset\");\n            }\n        });\n\n        var app = new Vue({\n            el : \"#userList\",\n            data : {\n                lists : {{.Result}}\n            },\n            delimiters : ['${','}'],\n            methods : {\n                setMemberStatus : function (id,status,e) {\n                    var $this = this;\n                    $.ajax({\n                        url : \"{{urlfor \"ManagerController.UpdateMemberStatus\"}}\",\n                        type : \"post\",\n                        data : { \"member_id\":id,\"status\" : status},\n                        dataType : \"json\",\n                        success : function (res) {\n                            if (res.errcode === 0) {\n\n                                for (var index in $this.lists) {\n                                    var item = $this.lists[index];\n\n                                    if (item.member_id === id) {\n                                        console.log(item);\n                                        $this.lists[index].status = status;\n                                        break;\n                                        //$this.lists.splice(index,1,item);\n                                    }\n                                }\n                            } else {\n                                alert(\"{{i18n .Lang \"message.failed\"}}：\" + res.message);\n                            }\n                        }\n                    })\n\n                },\n                setMemberRole : function (member_id, role) {\n                    var $this = this;\n                    $.ajax({\n                        url :\"{{urlfor \"ManagerController.ChangeMemberRole\"}}\",\n                        dataType :\"json\",\n                        type :\"post\",\n                        data : { \"member_id\" : member_id,\"role\" : role },\n                        success : function (res) {\n                            if(res.errcode === 0){\n                                for (var index in $this.lists) {\n                                    var item = $this.lists[index];\n\n                                    if (item.member_id === member_id) {\n\n                                        $this.lists.splice(index,1,res.data);\n                                        break;\n                                    }\n                                }\n                            }else{\n                                alert(\"{{i18n .Lang \"message.failed\"}}：\" + res.message);\n                            }\n                        }\n                    })\n                },\n                deleteMember : function (id, e) {\n                    var $this = this;\n                    $.ajax({\n                        url : \"{{urlfor \"ManagerController.DeleteMember\"}}\",\n                        type : \"post\",\n                        data : { \"id\":id },\n                        dataType : \"json\",\n                        success : function (res) {\n                            if (res.errcode === 0) {\n\n                                for (var index in $this.lists) {\n                                    var item = $this.lists[index];\n                                    if (item.member_id == id) {\n                                        console.log(item);\n                                        $this.lists.splice(index,1);\n                                        break;\n                                    }\n                                }\n                            } else {\n                                alert(\"{{i18n .Lang \"message.failed\"}}：\" + res.message);\n                            }\n                        }\n                    });\n\n                }\n            }\n        });\n        Vue.nextTick(function () {\n            $(\"[data-toggle='tooltip']\").tooltip();\n        });\n    });\n</script>\n</body>\n</html>"
  },
  {
    "path": "views/manager/widgets.tpl",
    "content": "<div class=\"page-left\">\n    <ul class=\"menu\">\n        <li{{if eq \"index\" .Action}} class=\"active\"{{end}}><a href=\"{{urlfor \"ManagerController.Index\"}}\" class=\"item\"><i class=\"fa fa-dashboard\" aria-hidden=\"true\"></i> {{i18n .Lang \"mgr.dashboard_menu\"}}</a> </li>\n        <li{{if eq \"users\" .Action}} class=\"active\"{{end}}><a href=\"{{urlfor \"ManagerController.Users\" }}\" class=\"item\"><i class=\"fa fa-user\" aria-hidden=\"true\"></i> {{i18n .Lang \"mgr.user_menu\"}}</a> </li>\n        <li{{if eq \"team\" .Action}} class=\"active\"{{end}}><a href=\"{{urlfor \"ManagerController.Team\" }}\" class=\"item\"><i class=\"fa fa-group\" aria-hidden=\"true\"></i> {{i18n .Lang \"mgr.team_menu\"}}</a> </li>\n        <li{{if eq \"books\" .Action}} class=\"active\"{{end}}><a href=\"{{urlfor \"ManagerController.Books\" }}\" class=\"item\"><i class=\"fa fa-book\" aria-hidden=\"true\"></i> {{i18n .Lang \"mgr.project_menu\"}}</a> </li>\n        <li{{if eq \"itemsets\" .Action}} class=\"active\"{{end}}><a href=\"{{urlfor \"ManagerController.Itemsets\" }}\" class=\"item\"><i class=\"fa fa-archive\" aria-hidden=\"true\"></i> {{i18n .Lang \"mgr.project_space_menu\"}}</a> </li>\n\n    {{/*<li><a href=\"{{urlfor \"ManagerController.Comments\" }}\" class=\"item\"><i class=\"fa fa-comments-o\" aria-hidden=\"true\"></i> {{i18n .Lang \"mgr.comment_menu\"}}</a> </li>*/}}\n        <li{{if eq \"setting\" .Action}} class=\"active\"{{end}}><a href=\"{{urlfor \"ManagerController.Setting\" }}\" class=\"item\"><i class=\"fa fa-cogs\" aria-hidden=\"true\"></i> {{i18n .Lang \"mgr.config_menu\"}}</a> </li>\n        {{/*<li{{if eq \"config\" .Action}} class=\"active\"{{end}}><a href=\"{{urlfor \"ManagerController.Config\" }}\" class=\"item\"><i class=\"fa fa-file\" aria-hidden=\"true\"></i> {{i18n .Lang \"mgr.config_file\"}}</a> </li>*/}}\n        <li{{if eq \"attach\" .Action}} class=\"active\"{{end}}><a href=\"{{urlfor \"ManagerController.AttachList\" }}\" class=\"item\"><i class=\"fa fa-cloud-upload\" aria-hidden=\"true\"></i> {{i18n .Lang \"mgr.attachment_menu\"}}</a> </li>\n        <li{{if eq \"label\" .Action}} class=\"active\"{{end}}><a href=\"{{urlfor \"ManagerController.LabelList\" }}\" class=\"item\"><i class=\"fa fa-bookmark\" aria-hidden=\"true\"></i> {{i18n .Lang \"mgr.label_menu\"}}</a> </li>\n    </ul>\n</div>"
  },
  {
    "path": "views/search/index.tpl",
    "content": "<!DOCTYPE html>\n<html lang=\"zh-CN\">\n<head>\n    <meta charset=\"utf-8\">\n    <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n\n    <title>{{i18n .Lang \"search.title\"}} - Powered by MinDoc</title>\n    <meta name=\"keywords\" content=\"MinDoc,文档在线管理系统,WIKI,wiki,wiki在线,文档在线管理,接口文档在线管理,接口文档管理,{{.Keyword}}\">\n    <meta name=\"description\" content=\"MinDoc文档在线管理系统 {{.site_description}}\">\n    <!-- Bootstrap -->\n    <link href=\"{{cdncss \"/static/bootstrap/css/bootstrap.min.css\"}}\" rel=\"stylesheet\">\n    <link href=\"{{cdncss \"/static/font-awesome/css/font-awesome.min.css\"}}\" rel=\"stylesheet\">\n\n    <link href=\"{{cdncss \"/static/css/main.css\" \"version\"}}\" rel=\"stylesheet\">\n</head>\n<body>\n<div class=\"manual-reader manual-container manual-search-reader\">\n    {{template \"widgets/header.tpl\" .}}\n    <div class=\"container manual-body\">\n        <div class=\"search-head\">\n            <strong class=\"search-title\">{{i18n .Lang \"search.search_title\" .Keyword}}</strong>\n        </div>\n        <div class=\"row\">\n            <div class=\"manual-list\">\n                {{range $index,$item := .Lists}}\n                <div class=\"search-item\">\n                    <div class=\"title\">\n                {{if eq $item.SearchType \"document\"}}\n                    <span class=\"label mark-doc\">{{i18n $.Lang \"search.doc\"}}</span>\n                        <a href=\"{{urlfor \"DocumentController.Read\" \":key\" $item.BookIdentify \":id\" $item.Identify}}\" title=\"{{$item.DocumentName}}\" target=\"_blank\">{{str2html $item.DocumentName}}</a>\n                 {{else if eq $item.SearchType \"book\"}}\n                    <span class=\"label mark-book\">{{i18n $.Lang \"search.prj\"}}</span>\n                    <a href=\"{{urlfor \"DocumentController.Index\" \":key\" $item.Identify}}\" title=\"{{$item.BookName}}\" target=\"_blank\"> {{str2html $item.DocumentName}}</a>\n                {{else}}\n                    <span class=\"label mark-blog\">{{i18n $.Lang \"search.blog\"}}</span>\n                        <a href=\"{{urlfor \"BlogController.Index\" \":id\" $item.DocumentId}}\" title=\"{{$item.DocumentName}}\" target=\"_blank\"> {{str2html $item.DocumentName}}</a>\n                {{end}}\n                    </div>\n                    <div class=\"description\">\n                        {{str2html $item.Description}}\n                    </div>\n                    <div class=\"source\">\n                        {{if eq $item.SearchType \"document\"}}\n                        <span class=\"item\">{{i18n $.Lang \"search.from_proj\"}}：<a href=\"{{urlfor \"DocumentController.Index\" \":key\" $item.BookIdentify}}\" target=\"_blank\">{{$item.BookName}}</a></span>\n                        {{else if eq $item.SearchType \"book\"}}\n                            <span class=\"item\">{{i18n $.Lang \"search.prj\"}}：<a href=\"{{urlfor \"DocumentController.Index\" \":key\" $item.Identify}}\" target=\"_blank\">{{$item.BookName}}</a></span>\n                        {{else}}\n                        <span class=\"item\">{{i18n $.Lang \"search.from_blog\"}}：<a href=\"{{urlfor \"BlogController.Index\" \":id\" $item.DocumentId}}\" target=\"_blank\">{{$item.BookName}}</a></span>\n                        {{end}}\n                        <span class=\"item\">{{i18n $.Lang \"search.author\"}}：{{$item.Author}}</span>\n                        <span class=\"item\">{{i18n $.Lang \"search.update_time\"}}：{{date_format  $item.ModifyTime \"2006-01-02 15:04:05\"}}</span>\n                    </div>\n                </div>\n                {{else}}\n                <div class=\"search-empty\">\n                    <img src=\"{{cdnimg \"/static/images/search_empty.png\"}}\" class=\"empty-image\">\n\t\t\t\t\t<span class=\"empty-text\">{{i18n .Lang \"search.no_result\"}}</span>\n                </div>\n                {{end}}\n                <nav class=\"pagination-container\">\n                    {{.PageHtml}}\n                </nav>\n                <div class=\"clearfix\"></div>\n            </div>\n        </div>\n    </div>\n    {{template \"widgets/footer.tpl\" .}}\n</div>\n<script src=\"{{cdnjs \"/static/jquery/1.12.4/jquery.min.js\"}}\"></script>\n<script src=\"{{cdnjs \"/static/bootstrap/js/bootstrap.min.js\"}}\"></script>\n{{.Scripts}}\n</body>\n</html>"
  },
  {
    "path": "views/setting/index.tpl",
    "content": "<!DOCTYPE html>\n<html lang=\"zh-CN\">\n<head>\n    <meta charset=\"utf-8\">\n    <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n\n    <title>{{i18n .Lang \"uc.user_center\"}} - Powered by MinDoc</title>\n\n    <!-- Bootstrap -->\n    <link href=\"{{cdncss \"/static/bootstrap/css/bootstrap.min.css\"}}\" rel=\"stylesheet\">\n    <link href=\"{{cdncss \"/static/font-awesome/css/font-awesome.min.css\"}}\" rel=\"stylesheet\">\n    <link href=\"{{cdncss \"/static/webuploader/webuploader.css\"}}\" rel=\"stylesheet\">\n    <link href=\"{{cdncss \"/static/cropper/2.3.4/cropper.min.css\"}}\" rel=\"stylesheet\">\n    <link href=\"{{cdncss \"/static/css/main.css\" \"version\"}}\" rel=\"stylesheet\">\n\n    <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->\n    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->\n    <!--[if lt IE 9]>\n    <script src=\"/static/html5shiv/3.7.3/html5shiv.min.js\"></script>\n    <script src=\"/static/respond.js/1.4.2/respond.min.js\"></script>\n    <![endif]-->\n</head>\n<body>\n<div class=\"manual-reader\">\n    {{template \"widgets/header.tpl\" .}}\n    <div class=\"container manual-body\">\n        <div class=\"row\">\n            <div class=\"page-left\">\n                <ul class=\"menu\">\n                    <li class=\"active\"><a href=\"{{urlfor \"SettingController.Index\"}}\" class=\"item\"><i class=\"fa fa-sitemap\" aria-hidden=\"true\"></i> {{i18n .Lang \"uc.base_info\"}}</a> </li>\n                    {{if ne .Member.AuthMethod \"ldap\"}}\n                    <li><a href=\"{{urlfor \"SettingController.Password\"}}\" class=\"item\"><i class=\"fa fa-user\" aria-hidden=\"true\"></i> {{i18n .Lang \"uc.change_pwd\"}}</a> </li>\n                    {{end}}\n                </ul>\n            </div>\n            <div class=\"page-right\">\n                <div class=\"m-box\">\n                    <div class=\"box-head\">\n                        <strong class=\"box-title\">{{i18n .Lang \"uc.base_info\"}}</strong>\n                    </div>\n                </div>\n                <div class=\"box-body\" style=\"padding-right: 200px;\">\n                    <div class=\"form-left\">\n                        <form role=\"form\" method=\"post\" id=\"memberInfoForm\">\n                            <div class=\"form-group\">\n                                <label>{{i18n .Lang \"uc.username\"}}</label>\n                                <input type=\"text\" class=\"form-control disabled\" value=\"{{.Member.Account}}\" disabled placeholder=\"{{i18n .Lang \"uc.username\"}}\">\n                            </div>\n                            <div class=\"form-group\">\n                                <label>{{i18n .Lang \"uc.realname\"}}</label>\n                                <input type=\"text\" name=\"real_name\" class=\"form-control\" value=\"{{.Member.RealName}}\" placeholder=\"{{i18n .Lang \"uc.realname\"}}\">\n                            </div>\n                            <div class=\"form-group\">\n                                <label for=\"user-email\">{{i18n .Lang \"uc.email\"}}<strong class=\"text-danger\">*</strong></label>\n                                <input type=\"email\" class=\"form-control\" value=\"{{.Member.Email}}\" id=\"userEmail\" name=\"email\" max=\"100\" placeholder=\"{{i18n .Lang \"uc.email\"}}\">\n                            </div>\n                            <div class=\"form-group\">\n                                <label>{{i18n .Lang \"uc.mobile\"}}</label>\n                                <input type=\"text\" class=\"form-control\" id=\"userPhone\" name=\"phone\" maxlength=\"20\" title=\"{{i18n .Lang \"uc.mobile\"}}\" placeholder=\"{{i18n .Lang \"uc.mobile\"}}\" value=\"{{.Member.Phone}}\">\n                            </div>\n                            <div class=\"form-group\">\n                                <label class=\"description\">{{i18n .Lang \"uc.description\"}}</label>\n                                <textarea class=\"form-control\" rows=\"3\" title=\"{{i18n .Lang \"uc.description\"}}\" name=\"description\" id=\"description\" maxlength=\"500\">{{.Member.Description}}</textarea>\n                                <p style=\"color: #999;font-size: 12px;\">{{i18n .Lang \"uc.description_tips\"}}</p>\n                            </div>\n                            <div class=\"form-group\">\n                                <button type=\"submit\" class=\"btn btn-success\" data-loading-text=\"{{i18n .Lang \"message.processing\"}}\">{{i18n .Lang \"common.save\"}}</button>\n                                <span id=\"form-error-message\" class=\"error-message\"></span>\n                            </div>\n                        </form>\n                    </div>\n                    <div class=\"form-right\">\n                        <label>\n                            <a href=\"#\" onclick=\"return false;\" data-toggle=\"modal\" data-target=\"#upload-logo-panel\">\n                                <img src=\"{{cdnimg .Member.Avatar}}\" onerror=\"this.src='{{cdnimg \"static/images/middle.gif\"}}'\" class=\"img-circle\" alt=\"{{i18n .Lang \"uc.avatar\"}}\" style=\"max-width: 120px;max-height: 120px;\" id=\"headimgurl\">\n                            </a>\n                        </label>\n                    </div>\n                </div>\n            </div>\n        </div>\n    </div>\n    {{template \"widgets/footer.tpl\" .}}\n</div>\n<!-- Start Modal -->\n<div class=\"modal fade\" id=\"upload-logo-panel\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"{{i18n .Lang \"uc.change_avatar\"}})\" aria-hidden=\"true\">\n    <div class=\"modal-dialog\">\n        <div class=\"modal-content\">\n            <div class=\"modal-header\">\n                <button type=\"button\" class=\"close\" data-dismiss=\"modal\"><span aria-hidden=\"true\">&times;</span><span class=\"sr-only\">Close</span></button>\n                <h4 class=\"modal-title\">{{i18n .Lang \"uc.change_avatar\"}}</h4>\n            </div>\n            <div class=\"modal-body\">\n                <div class=\"wraper\">\n                    <div id=\"image-wraper\">\n\n                    </div>\n                </div>\n                <div class=\"watch-crop-list\">\n                    <div class=\"preview-title\">{{i18n .Lang \"uc.change_avatar\"}}</div>\n                    <ul>\n                        <li>\n                            <div class=\"img-preview preview-lg\"></div>\n                        </li>\n                        <li>\n                            <div class=\"img-preview preview-sm\"></div>\n                        </li>\n                    </ul>\n                </div>\n                <div style=\"clear: both\"></div>\n            </div>\n            <div class=\"modal-footer\">\n                <span id=\"error-message\"></span>\n                <div id=\"filePicker\" class=\"btn\">{{i18n .Lang \"blog.choose\"}}</div>\n                <button type=\"button\" id=\"saveImage\" class=\"btn btn-success\" style=\"height: 40px;width: 77px;\" data-loading-text=\"{{i18n .Lang \"message.processing\"}}\">{{i18n .Lang \"blog.upload\"}}</button>\n            </div>\n        </div>\n    </div>\n</div>\n<!--END Modal-->\n<script src=\"{{cdnjs \"/static/jquery/1.12.4/jquery.min.js\"}}\" type=\"text/javascript\"></script>\n<script src=\"{{cdnjs \"/static/bootstrap/js/bootstrap.min.js\"}}\" type=\"text/javascript\"></script>\n<script src=\"{{cdnjs \"/static/webuploader/webuploader.min.js\"}}\" type=\"text/javascript\"></script>\n<script src=\"{{cdnjs \"/static/cropper/2.3.4/cropper.min.js\"}}\" type=\"text/javascript\"></script>\n<script src=\"{{cdnjs \"/static/js/jquery.form.js\"}}\" type=\"text/javascript\"></script>\n<script src=\"{{cdnjs \"/static/js/main.js\"}}\" type=\"text/javascript\"></script>\n<script type=\"text/javascript\">\n    $(function () {\n        $(\"#upload-logo-panel\").on(\"hidden.bs.modal\",function () {\n            $(\"#upload-logo-panel\").find(\".modal-body\").html(window.modalHtml);\n        }).on(\"show.bs.modal\",function () {\n            window.modalHtml = $(\"#upload-logo-panel\").find(\".modal-body\").html();\n        });\n\n\n        $(\"#memberInfoForm\").ajaxForm({\n            beforeSubmit : function () {\n\n                var email = $.trim($(\"#userEmail\").val());\n                if(!email){\n                    return showError('{{i18n .Lang \"message.email_empty\"}}');\n                }\n                $(\"button[type='submit']\").button('loading');\n            },\n            success : function (res) {\n                $(\"button[type='submit']\").button('reset');\n                if(res.errcode === 0){\n                    showSuccess(\"{{i18n .Lang \"message.success\"}}\");\n                }else{\n                    showError(res.message);\n                }\n            }\n        });\n\n        try {\n            var uploader = WebUploader.create({\n                auto: false,\n                swf: '/static/webuploader/Uploader.swf',\n                server: '{{urlfor \"SettingController.Upload\"}}',\n                pick: \"#filePicker\",\n                fileVal : \"image-file\",\n                fileNumLimit : 1,\n                compress : false,\n                accept: {\n                    title: 'Images',\n                    extensions: 'jpg,jpeg,png',\n                    mimeTypes: 'image/jpg,image/jpeg,image/png'\n                }\n            }).on(\"beforeFileQueued\",function (file) {\n                uploader.reset();\n            }).on( 'fileQueued', function( file ) {\n                uploader.makeThumb( file, function( error, src ) {\n                    $img = '<img src=\"' + src +'\" style=\"max-width: 360px;max-height: 360px;\">';\n                    if ( error ) {\n                        $img.replaceWith('<span>{{i18n .Lang \"message.cannot_preview\"}}</span>');\n                        return;\n                    }\n\n                    $(\"#image-wraper\").html($img);\n                    window.ImageCropper = $('#image-wraper>img').cropper({\n                        aspectRatio: 1 / 1,\n                        dragMode : 'move',\n                        viewMode : 1,\n                        preview : \".img-preview\"\n                    });\n                }, 1, 1 );\n            }).on(\"uploadError\",function (file,reason) {\n                console.log(reason);\n                $(\"#error-message\").text(\"{{i18n .Lang \"message.upload_failed\"}}:\" + reason);\n\n            }).on(\"uploadSuccess\",function (file, res) {\n\n                if(res.errcode === 0){\n                    console.log(res);\n                    $(\"#upload-logo-panel\").modal('hide');\n                    $(\"#headimgurl\").attr('src',res.data);\n                }else{\n                    $(\"#error-message\").text(res.message);\n                }\n            }).on(\"beforeFileQueued\",function (file) {\n                if(file.size > 1024*1024*2){\n                    uploader.removeFile(file);\n                    uploader.reset();\n                    alert(\"文件必须小于2MB\");\n                    return false;\n                }\n            }).on(\"uploadComplete\",function () {\n                $(\"#saveImage\").button('reset');\n            });\n            $(\"#saveImage\").on(\"click\",function () {\n                var files = uploader.getFiles();\n                if(files.length > 0) {\n                    $(\"#saveImage\").button('loading');\n                    var cropper = window.ImageCropper.cropper(\"getData\");\n\n                    uploader.option(\"formData\", cropper);\n\n                    uploader.upload();\n                }else{\n                    alert(\"请选择头像\");\n                }\n            });\n        }catch(e){\n            console.log(e);\n        }\n    });\n</script>\n</body>\n</html>\n"
  },
  {
    "path": "views/setting/password.tpl",
    "content": "<!DOCTYPE html>\n<html lang=\"zh-CN\">\n<head>\n    <meta charset=\"utf-8\">\n    <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n\n    <title>{{i18n .Lang \"uc.user_center\"}} - Powered by MinDoc</title>\n\n    <!-- Bootstrap -->\n    <link href=\"{{cdncss \"/static/bootstrap/css/bootstrap.min.css\"}}\" rel=\"stylesheet\">\n    <link href=\"{{cdncss \"/static/font-awesome/css/font-awesome.min.css\"}}\" rel=\"stylesheet\">\n\n    <link href=\"{{cdncss \"/static/css/main.css\" \"version\"}}\" rel=\"stylesheet\">\n    <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->\n    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->\n    <!--[if lt IE 9]>\n    <script src=\"/static/html5shiv/3.7.3/html5shiv.min.js\"></script>\n    <script src=\"/static/respond.js/1.4.2/respond.min.js\"></script>\n    <![endif]-->\n</head>\n<body>\n<div class=\"manual-reader\">\n    {{template \"widgets/header.tpl\" .}}\n    <div class=\"container manual-body\">\n        <div class=\"row\">\n            <div class=\"page-left\">\n                <ul class=\"menu\">\n                    <li><a href=\"{{urlfor \"SettingController.Index\"}}\" class=\"item\"><i class=\"fa fa-sitemap\" aria-hidden=\"true\"></i> {{i18n .Lang \"uc.base_info\"}}</a> </li>\n                    <li class=\"active\"><a href=\"{{urlfor \"SettingController.Password\"}}\" class=\"item\"><i class=\"fa fa-user\" aria-hidden=\"true\"></i> {{i18n .Lang \"uc.change_pwd\"}}</a> </li>\n                </ul>\n            </div>\n            <div class=\"page-right\">\n                <div class=\"m-box\">\n                    <div class=\"box-head\">\n                        <strong class=\"box-title\">{{i18n .Lang \"uc.change_pwd\"}}</strong>\n                    </div>\n                </div>\n                <div class=\"box-body\" style=\"width: 300px;\">\n                    <form role=\"form\" method=\"post\" id=\"securityForm\">\n                        <div class=\"form-group\">\n                            <label for=\"password1\">{{i18n .Lang \"uc.origin_pwd\"}}</label>\n                            <input type=\"password\" name=\"password1\" id=\"password1\" class=\"form-control disabled\" placeholder=\"{{i18n .Lang \"uc.origin_pwd\"}}\">\n                        </div>\n                        <div class=\"form-group\">\n                            <label for=\"password2\">{{i18n .Lang \"uc.new_pwd\"}}</label>\n                            <input type=\"password\" class=\"form-control\" name=\"password2\" id=\"password2\" max=\"50\" placeholder=\"{{i18n .Lang \"uc.new_pwd\"}}\">\n                        </div>\n                        <div class=\"form-group\">\n                            <label for=\"password3\">{{i18n .Lang \"uc.confirm_pwd\"}}</label>\n                            <input type=\"password\" class=\"form-control\" id=\"password3\" name=\"password3\" placeholder=\"{{i18n .Lang \"uc.confirm_pwd\"}}\">\n                        </div>\n                        <div class=\"form-group\">\n                            <span id=\"form-error-message\" class=\"error-message\"></span>\n                        </div>\n                        <div class=\"form-group\">\n                            <button type=\"submit\" class=\"btn btn-success\" data-loading-text=\"{{i18n .Lang \"message.processing\"}}\">{{i18n .Lang \"common.save\"}}</button>\n                        </div>\n                    </form>\n                </div>\n            </div>\n        </div>\n    </div>\n    {{template \"widgets/footer.tpl\" .}}\n</div>\n<script src=\"{{cdnjs \"/static/jquery/1.12.4/jquery.min.js\"}}\" type=\"text/javascript\"></script>\n<script src=\"{{cdnjs \"/static/bootstrap/js/bootstrap.min.js\"}}\" type=\"text/javascript\"></script>\n<script src=\"{{cdnjs \"/static/js/jquery.form.js\"}}\" type=\"text/javascript\"></script>\n<script src=\"{{cdnjs \"/static/js/main.js\"}}\" type=\"text/javascript\"></script>\n<script type=\"text/javascript\">\n    $(function () {\n\n        $(\"#securityForm\").ajaxForm({\n            beforeSubmit : function () {\n                var oldPasswd = $(\"#password1\").val();\n                var newPasswd = $(\"#password2\").val();\n                var confirmPassword = $(\"#password3\").val();\n                if(!oldPasswd ){\n                    showError({{i18n .Lang \"message.origin_pwd_empty\"}});\n                    return false;\n                }\n                if(!newPasswd){\n                    showError({{i18n .Lang \"message.new_pwd_empty\"}});\n                    return false;\n                }\n                if(!confirmPassword){\n                    showError({{i18n .Lang \"message.confirm_pwd_empty\"}});\n                    return false;\n                }\n                if(confirmPassword !== newPasswd){\n                    showError({{i18n .Lang \"message.wrong_confirm_pwd\"}});\n                    return false;\n                }\n            },\n            success : function (res) {\n                if(res.errcode === 0){\n                    showSuccess({{i18n .Lang \"message.success\"}});\n                    $(\"#password1\").val('');\n                    $(\"#password2\").val('');\n                    $(\"#password3\").val('');\n                }else{\n                    showError(res.message);\n                }\n            }\n        }) ;\n    });\n</script>\n</body>\n</html>"
  },
  {
    "path": "views/template/list.tpl",
    "content": "<div class=\"table-responsive\" id=\"templateListContainer\">\n    <table class=\"table table-hover\">\n        <thead>\n        <tr>\n            <td>#</td>\n            <td class=\"col-sm-2\">{{i18n $.Lang \"doc.tpl_name\"}}</td>\n            <td class=\"col-sm-2\">{{i18n $.Lang \"doc.tpl_type\"}}</td>\n            <td class=\"col-sm-2\">{{i18n $.Lang \"doc.creator\"}}</td>\n            <td class=\"col-sm-3\">{{i18n $.Lang \"doc.create_time\"}}</td>\n            <td class=\"col-sm-3\">{{i18n $.Lang \"doc.operation\"}}</td>\n        </tr>\n        </thead>\n        <tbody>\n        {{if .ErrorMessage}}\n        <tr>\n            <td colspan=\"6\" class=\"text-center\">{{.ErrorMessage}}</td>\n        </tr>\n        {{else}}\n        {{range $index,$item := .List}}\n        <tr>\n            <td>{{$item.TemplateId}}</td>\n            <td>{{$item.TemplateName}}</td>\n            <td>{{if $item.IsGlobal}}{{i18n $.Lang \"doc.global_tpl\"}}{{else}}{{i18n $.Lang \"doc.project_tpl\"}}{{end}}</td>\n            <td>{{$item.CreateName}}</td>\n            <td>{{date_format $item.CreateTime \"2006-01-02 15:04:05\"}}</td>\n            <td>\n                <button class=\"btn btn-primary btn-sm btn-insert\" data-id=\"{{$item.TemplateId}}\">\n                    {{i18n $.Lang \"doc.insert\"}}\n                </button>\n                <button class=\"btn btn-danger btn-sm btn-delete\" data-id=\"{{$item.TemplateId}}\" data-loading-text=\"删除中...\">\n                    {{i18n $.Lang \"doc.delete\"}}\n                </button>\n            </td>\n        </tr>\n        {{else}}\n        <tr>\n            <td colspan=\"6\" class=\"text-center\">{{i18n .Lang \"message.no_data\"}}</td>\n        </tr>\n        {{end}}\n        {{end}}\n        </tbody>\n    </table>\n</div>\n"
  },
  {
    "path": "views/template.tpl",
    "content": "<!DOCTYPE html>\n<html lang=\"zh-CN\">\n<head>\n    <meta charset=\"utf-8\">\n    <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n\n    <title>用户中心 - Powered by MinDoc</title>\n\n    <!-- Bootstrap -->\n    <link href=\"/static/bootstrap/css/bootstrap.min.css\" rel=\"stylesheet\">\n    <link href=\"/static/font-awesome/css/font-awesome.min.css\" rel=\"stylesheet\">\n\n    <link href=\"/static/css/main.css\" rel=\"stylesheet\">\n    <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->\n    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->\n    <!--[if lt IE 9]>\n    <script src=\"/static/html5shiv/3.7.3/html5shiv.min.js\"></script>\n    <script src=\"/static/respond.js/1.4.2/respond.min.js\"></script>\n    <![endif]-->\n</head>\n<body>\n<div class=\"manual-reader\">\n    {{template \"widgets/header.tpl\" .}}\n    <div class=\"container manual-body\">\n        <div class=\"row\">\n            <div class=\"page-left\">\n                <ul class=\"menu\">\n                    <li class=\"active\"><a href=\"{{urlfor \"SettingController.Index\"}}\" class=\"item\"><i class=\"fa fa-sitemap\" aria-hidden=\"true\"></i> 基本信息</a> </li>\n                    <li><a href=\"{{urlfor \"SettingController.Password\"}}\" class=\"item\"><i class=\"fa fa-user\" aria-hidden=\"true\"></i> 修改密码</a> </li>\n                </ul>\n            </div>\n            <div class=\"page-right\">\n                <div class=\"m-box\">\n                    <div class=\"box-head\">\n                        <strong class=\"box-title\">基本信息</strong>\n                    </div>\n                </div>\n                <div class=\"box-body\" style=\"padding-right: 200px;\">\n                    <div class=\"form-left\">\n                        <form role=\"form\" method=\"post\" id=\"memberInfoForm\">\n                            <div class=\"form-group\">\n                                <label>用户名</label>\n                                <input type=\"text\" class=\"form-control disabled\">\n                            </div>\n                            <div class=\"form-group\">\n                                <label for=\"user-nickname\">昵称</label>\n                                <input type=\"text\" class=\"form-control\" name=\"userNickname\" id=\"user-nickname\" max=\"20\" placeholder=\"昵称\" value=\"admin\">\n                            </div>\n                            <div class=\"form-group\">\n                                <label for=\"user-email\">邮箱<strong class=\"text-danger\">*</strong></label>\n                                <input type=\"email\" class=\"form-control\" value=\"longfei6671@163.com\" id=\"user-email\" name=\"userEmail\" max=\"100\" placeholder=\"邮箱\">\n                            </div>\n                            <div class=\"form-group\">\n                                <label>手机号</label>\n                                <input type=\"text\" class=\"form-control\" id=\"user-phone\" name=\"userPhone\" maxlength=\"20\" title=\"手机号码\" placeholder=\"手机号码\" value=\"\">\n                            </div>\n                            <div class=\"form-group\">\n                                <label class=\"description\">描述</label>\n                                <textarea class=\"form-control\" rows=\"3\" title=\"描述\" name=\"description\" id=\"description\" maxlength=\"500\"></textarea>\n                                <p style=\"color: #999;font-size: 12px;\">描述不能超过500字</p>\n                            </div>\n                            <div class=\"form-group\">\n                                <button type=\"submit\" class=\"btn btn-success\" data-loading-text=\"保存中...\">保存修改</button>\n                                <span id=\"form-error-message\" class=\"error-message\"></span>\n                            </div>\n                        </form>\n                    </div>\n                    <div class=\"form-right\">\n                        <label>\n                            <a href=\"javascript:;\" data-toggle=\"modal\" data-target=\"#upload-logo-panel\">\n                                <img src=\"/uploads/user/201612/58649aefa944e_58649aef.JPG\" onerror=\"this.src='https://wiki.iminho.me/static/images/middle.gif'\" class=\"img-circle\" alt=\"头像\" style=\"max-width: 120px;max-height: 120px;\" id=\"headimgurl\">\n                            </a>\n                        </label>\n                    </div>\n                </div>\n            </div>\n        </div>\n    </div>\n</div>\n<script src=\"{{cdnjs \"/static/jquery/1.12.4/jquery.min.js\"}}\"></script>\n<script src=\"{{cdnjs \"/static/bootstrap/js/bootstrap.min.js\"}}\"></script>\n</body>\n</html>"
  },
  {
    "path": "views/widgets/footer.tpl",
    "content": "<div class=\"footer\">\n    <div class=\"container\">\n        <div class=\"row text-center border-top\">\n            <span><a href=\"https://mindoc.cn\" target=\"_blank\">{{i18n .Lang \"common.official_website\"}}</a></span>\n            <span>&nbsp;·&nbsp;</span>\n            <span><a href=\"https://github.com/mindoc-org/mindoc/issues\" target=\"_blank\">{{i18n .Lang \"common.feedback\"}}</a></span>\n            <span>&nbsp;·&nbsp;</span>\n            <span><a href=\"https://github.com/mindoc-org/mindoc\" target=\"_blank\">{{i18n .Lang \"common.source_code\"}}</a></span>\n            <span>&nbsp;·&nbsp;</span>\n            <span><a href=\"https://mindoc.cn/docs/mindochelp\" target=\"_blank\">{{i18n .Lang \"common.manual\"}}</a></span>\n        </div>\n        {{if .site_beian}}\n        <div class=\"row text-center\">\n            <a href=\"https://beian.miit.gov.cn/\" target=\"_blank\">{{.site_beian}}</a>\n        </div>\n        {{end}}\n    </div>\n</div>\n"
  },
  {
    "path": "views/widgets/header.tpl",
    "content": "<header class=\"navbar navbar-static-top navbar-fixed-top manual-header\" role=\"banner\">\n    <div class=\"container\">\n        <div class=\"navbar-header col-sm-12 col-md-9 col-lg-8\">\n            <a href=\"{{.BaseUrl}}/\" class=\"navbar-brand\" title=\"{{.SITE_NAME}}\">\n                {{if .SITE_TITLE}}\n                {{.SITE_TITLE}}\n                {{else}}\n                {{.SITE_NAME}}\n                {{end}}\n            </a>\n            <nav class=\"collapse navbar-collapse col-sm-10\">\n                <ul class=\"nav navbar-nav\">\n                    <li {{if eq .ControllerName \"HomeController\"}}class=\"active\"{{end}}>\n                        <a href=\"{{urlfor \"HomeController.Index\" }}\" title={{i18n .Lang \"common.home\"}}>{{i18n .Lang \"common.home\"}}</a>\n                    </li>\n                    <li {{if eq .ControllerName \"BlogController\"}}{{if eq  .ActionName \"List\" \"Index\"}}class=\"active\"{{end}}{{end}}>\n                        <a href=\"{{urlfor \"BlogController.List\" }}\" title={{i18n .Lang \"common.blog\"}}>{{i18n .Lang \"common.blog\"}}</a>\n                    </li>\n                    <li {{if eq .ControllerName \"ItemsetsController\"}}class=\"active\"{{end}}>\n                        <a href=\"{{urlfor \"ItemsetsController.Index\" }}\" title={{i18n .Lang \"common.project_space\"}}>{{i18n .Lang \"common.project_space\"}}</a>\n                    </li>\n                </ul>\n                <div class=\"searchbar pull-left visible-lg-inline-block visible-md-inline-block\">\n                    <form class=\"form-inline\" action=\"{{urlfor \"SearchController.IndexV2\"}}\" method=\"get\">\n                        <input class=\"form-control\" name=\"keyword\" type=\"search\" style=\"width: 230px;\" placeholder=\"{{i18n .Lang \"message.keyword_placeholder\"}}\" value=\"{{.Keyword}}\">\n                        <button class=\"search-btn\">\n                            <i class=\"fa fa-search\"></i>\n                        </button>\n                    </form>\n                </div>\n            </nav>\n            <div style=\"display: inline-block;\" class=\"navbar-mobile\">\n                <a href=\"{{urlfor \"HomeController.Index\" }}\" title={{i18n .Lang \"common.home\"}}>{{i18n .Lang \"common.home\"}}</a>\n                <a href=\"{{urlfor \"BlogController.List\" }}\" title={{i18n .Lang \"common.blog\"}}>{{i18n .Lang \"common.blog\"}}</a>\n            </div>\n\n            <div class=\"btn-group dropdown-menu-right pull-right slidebar visible-xs-inline-block visible-sm-inline-block\">\n                <button class=\"btn btn-default dropdown-toggle hidden-lg\" type=\"button\" data-toggle=\"dropdown\"><i class=\"fa fa-align-justify\"></i></button>\n                <ul class=\"dropdown-menu\" role=\"menu\">\n                    {{if gt .Member.MemberId 0}}\n                            <li>\n                                <a href=\"{{urlfor \"SettingController.Index\"}}\" title={{i18n .Lang \"common.person_center\"}}><i class=\"fa fa-user\" aria-hidden=\"true\"></i> {{i18n .Lang \"common.person_center\"}}</a>\n                            </li>\n                            <li>\n                                <a href=\"{{urlfor \"BookController.Index\"}}\" title={{i18n .Lang \"common.my_project\"}}><i class=\"fa fa-book\" aria-hidden=\"true\"></i> {{i18n .Lang \"common.my_project\"}}</a>\n                            </li>\n                            <li>\n                                <a href=\"{{urlfor \"BlogController.ManageList\"}}\" title={{i18n .Lang \"common.my_blog\"}}><i class=\"fa fa-file\" aria-hidden=\"true\"></i> {{i18n .Lang \"common.my_blog\"}}</a>\n                            </li>\n                            {{if eq .Member.Role 0 }}\n                            <li>\n                                <a href=\"{{urlfor \"ManagerController.Index\"}}\" title={{i18n .Lang \"common.manage\"}}><i class=\"fa fa-university\" aria-hidden=\"true\"></i> {{i18n .Lang \"common.manage\"}}</a>\n                            </li>\n                            {{end}}\n                            <li>\n                                <a href=\"{{urlfor \"AccountController.Logout\"}}\" title={{i18n .Lang \"common.logout\"}}><i class=\"fa fa-sign-out\"></i> {{i18n .Lang \"common.logout\"}}</a>\n                            </li>\n\n                    {{else}}\n                    <li><a href=\"{{urlfor \"AccountController.Login\"}}\" title={{i18n .Lang \"common.login\"}}>{{i18n .Lang \"common.login\"}}</a></li>\n                    {{end}}\n                </ul>\n            </div>\n\n        </div>\n        <nav class=\"navbar-collapse hidden-xs hidden-sm\" role=\"navigation\">\n            <ul class=\"nav navbar-nav navbar-right\">\n                {{if gt .Member.MemberId 0}}\n                <li>\n                    <div class=\"img user-info\" data-toggle=\"dropdown\">\n                        <img src=\"{{cdnimg .Member.Avatar}}\" onerror=\"this.src='{{cdnimg \"/static/images/headimgurl.jpg\"}}';\" class=\"img-circle userbar-avatar\" alt=\"{{.Member.Account}}\">\n                        <div class=\"userbar-content\">\n                            <span>{{.Member.Account}}</span>\n                            <div>{{i18n .Lang .Member.RoleName}}</div>\n                        </div>\n                        <i class=\"fa fa-chevron-down\" aria-hidden=\"true\"></i>\n                    </div>\n                    <ul class=\"dropdown-menu user-info-dropdown\" role=\"menu\">\n                        <li>\n                            <a href=\"{{urlfor \"SettingController.Index\"}}\" title={{i18n .Lang \"common.person_center\"}}><i class=\"fa fa-user\" aria-hidden=\"true\"></i> {{i18n .Lang \"common.person_center\"}}</a>\n                        </li>\n                        <li>\n                            <a href=\"{{urlfor \"BookController.Index\"}}\" title={{i18n .Lang \"common.my_project\"}}><i class=\"fa fa-book\" aria-hidden=\"true\"></i> {{i18n .Lang \"common.my_project\"}}</a>\n                        </li>\n                        <li>\n                            <a href=\"{{urlfor \"BlogController.ManageList\"}}\" title={{i18n .Lang \"common.my_blog\"}}><i class=\"fa fa-file\" aria-hidden=\"true\"></i> {{i18n .Lang \"common.my_blog\"}}</a>\n                        </li>\n                        {{if eq .Member.Role 0  1}}\n                        <li>\n                            <a href=\"{{urlfor \"ManagerController.Index\"}}\" title={{i18n .Lang \"common.manage\"}}><i class=\"fa fa-university\" aria-hidden=\"true\"></i> {{i18n .Lang \"common.manage\"}}</a>\n                        </li>\n                        {{end}}\n                        <li>\n                            <a href=\"{{urlfor \"AccountController.Logout\"}}\" title={{i18n .Lang \"common.logout\"}}><i class=\"fa fa-sign-out\"></i> {{i18n .Lang \"common.logout\"}}</a>\n                        </li>\n                    </ul>\n                </li>\n                {{else}}\n                <li><a href=\"{{urlfor \"AccountController.Login\"}}\" title={{i18n .Lang \"common.login\"}}>{{i18n .Lang \"common.login\"}}</a></li>\n                {{end}}\n            </ul>\n        </nav>\n    </div>\n</header>\n"
  },
  {
    "path": "views/widgets/ie.tpl",
    "content": "<!--[if lte IE 8]>\n<div class=\"m-browsehappy\">\n    <div class=\"browsehappy-inner\">\n        <h3 class=\"title\">对不起！<br>您的浏览器版本太低，请升级你的浏览器</h3>\n        <p class=\"suggest\">建议使用：</p>\n        <p class=\"brower\">\n                    <span class=\"item\">\n                        <a class=\"ie image\" href=\"https://www.microsoft.com/en-us/download/internet-explorer.aspx\" target=\"_blank\" title=\"下载Internet Explorer浏览器\"></a>\n                        <b class=\"text\">ie9+</b>\n                    </span>\n            <span class=\"item\">\n                        <a class=\"chrome image\" href=\"http://www.google.cn/intl/zh-CN/chrome/browser/?spm=1.7274553.0.0.benzR1\" target=\"_blank\" title=\"下载Chrome浏览器\"></a>\n                        <b class=\"text\">chrome</b>\n                    </span>\n        </p>\n        <p class=\"from\">来自MinDoc的提醒</p>\n        <b class=\"browsehappy-arrow\"></b>\n    </div>\n</div>\n<script>\n    window.nonsupportIE = true;\n</script>\n<![endif]-->"
  }
]